Merged branch api-cleanup
diff --git a/applications/auto-scale/gui/.gitignore b/applications/auto-scale/gui/.gitignore
index 01b919d..429d79a 100644
--- a/applications/auto-scale/gui/.gitignore
+++ b/applications/auto-scale/gui/.gitignore
@@ -5,3 +5,5 @@
.idea/
.tmp/
dist/
+src/vendor
+src/.tmp
diff --git a/applications/auto-scale/gui/bower.json b/applications/auto-scale/gui/bower.json
index 0ec36ae..3286dd3 100644
--- a/applications/auto-scale/gui/bower.json
+++ b/applications/auto-scale/gui/bower.json
@@ -15,10 +15,10 @@
"tests"
],
"dependencies": {
- "angular-chart.js": "~0.8.7",
+ "angular-chart.js": "~0.10.2",
"angular-animate": "~1.4.8",
"ui.bootstrap": "~0.14.3",
- "jquery": "~2.1.4",
+ "jquery": "~2.2.3",
"angular": "~1.4.7",
"angular-ui-router": "~0.2.15",
"ng-lodash": "~0.3.0",
@@ -34,5 +34,10 @@
},
"devDependencies": {
"angular-mocks": "~1.4.8"
+ },
+ "resolutions": {
+ "jquery": "~2.1.4",
+ "angular-chart.js": "~0.8.7",
+ "Chart.js": "~1.0.1"
}
}
diff --git a/applications/auto-scale/gui/env/default.js b/applications/auto-scale/gui/env/default.js
index 8d4546d..2153a31 100644
--- a/applications/auto-scale/gui/env/default.js
+++ b/applications/auto-scale/gui/env/default.js
@@ -1,3 +1,3 @@
module.exports = {
- host: 'http://clnode015.clemson.cloudlab.us:9991'
-}
\ No newline at end of file
+ host: 'http://130.127.133.58:9991/'
+}
diff --git a/applications/auto-scale/gui/src/vendor/Chart.js/.bower.json b/applications/auto-scale/gui/src/vendor/Chart.js/.bower.json
deleted file mode 100644
index 6173781..0000000
--- a/applications/auto-scale/gui/src/vendor/Chart.js/.bower.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "name": "Chart.js",
- "version": "1.0.2",
- "description": "Simple HTML5 Charts using the canvas element",
- "homepage": "https://github.com/nnnick/Chart.js",
- "author": "nnnick",
- "main": [
- "Chart.js"
- ],
- "dependencies": {},
- "_release": "1.0.2",
- "_resolution": {
- "type": "version",
- "tag": "v1.0.2",
- "commit": "930b16a0af59201dcfcd1594b0e7540db4d04c9f"
- },
- "_source": "git://github.com/nnnick/Chart.js.git",
- "_target": "~1.0.1",
- "_originalSource": "Chart.js"
-}
\ No newline at end of file
diff --git a/applications/auto-scale/gui/src/vendor/Chart.js/.gitignore b/applications/auto-scale/gui/src/vendor/Chart.js/.gitignore
deleted file mode 100644
index 3969d0a..0000000
--- a/applications/auto-scale/gui/src/vendor/Chart.js/.gitignore
+++ /dev/null
@@ -1,7 +0,0 @@
-
-.DS_Store
-
-node_modules/*
-custom/*
-
-docs/index.md
diff --git a/applications/auto-scale/gui/src/vendor/Chart.js/.travis.yml b/applications/auto-scale/gui/src/vendor/Chart.js/.travis.yml
deleted file mode 100644
index c66ea5f..0000000
--- a/applications/auto-scale/gui/src/vendor/Chart.js/.travis.yml
+++ /dev/null
@@ -1,13 +0,0 @@
-language: node_js
-node_js:
- - "0.11"
- - "0.10"
-
-before_script:
- - npm install
-
-script:
- - gulp test
-
-notifications:
- slack: chartjs:pcfCZR6ugg5TEcaLtmIfQYuA
diff --git a/applications/auto-scale/gui/src/vendor/Chart.js/CONTRIBUTING.md b/applications/auto-scale/gui/src/vendor/Chart.js/CONTRIBUTING.md
deleted file mode 100644
index 714bdd2..0000000
--- a/applications/auto-scale/gui/src/vendor/Chart.js/CONTRIBUTING.md
+++ /dev/null
@@ -1,55 +0,0 @@
-Contributing to Chart.js
-========================
-
-Contributions to Chart.js are welcome and encouraged, but please have a look through the guidelines in this document before raising an issue, or writing code for the project.
-
-
-Using issues
-------------
-
-The [issue tracker](https://github.com/nnnick/Chart.js/issues) is the preferred channel for reporting bugs, requesting new features and submitting pull requests.
-
-If you're suggesting a new chart type, please take a look at [writing new chart types](https://github.com/nnnick/Chart.js/blob/master/docs/06-Advanced.md#writing-new-chart-types) in the documentation, and some of the [community extensions](https://github.com/nnnick/Chart.js/blob/master/docs/06-Advanced.md#community-extensions) that have been created already.
-
-To keep the library lightweight for everyone, it's unlikely we'll add many more chart types to the core of Chart.js, but issues are a good medium to design and spec out how new chart types could work and look.
-
-Please do not use issues for support requests. For help using Chart.js, please take a look at the [`chartjs`](http://stackoverflow.com/questions/tagged/chartjs) tag on Stack Overflow.
-
-
-Reporting bugs
---------------
-
-Well structured, detailed bug reports are hugely valuable for the project.
-
-Guidlines for reporting bugs:
-
- - Check the issue search to see if it has already been reported
- - Isolate the problem to a simple test case
- - Provide a demonstration of the problem on [JS Bin](http://jsbin.com) or similar
-
-Please provide any additional details associated with the bug, if it's browser or screen density specific, or only happens with a certain configuration or data.
-
-
-Pull requests
--------------
-
-Clear, concise pull requests are excellent at continuing the project's community driven growth. But please review [these guidelines](https://github.com/blog/1943-how-to-write-the-perfect-pull-request) and the guidelines below before starting work on the project.
-
-Guidlines:
-
- - Please create an issue first:
- - For bugs, we can discuss the fixing approach
- - For enhancements, we can discuss if it is within the project scope and avoid duplicate effort
- - Please make changes to the files in [`/src`](https://github.com/nnnick/Chart.js/tree/master/src), not `Chart.js` or `Chart.min.js` in the repo root directory, this avoids merge conflicts
- - Tabs for indentation, not spaces please
- - If adding new functionality, please also update the relevant `.md` file in [`/docs`](https://github.com/nnnick/Chart.js/tree/master/docs)
- - Please make your commits in logical sections with clear commit messages
-
-Joining the Project
--------------
- - Active committers and contributors are invited to introduce yourself and request commit access to this project. Please send an email to hello@nickdownie.com or file an issue.
-
-License
--------
-
-By contributing your code, you agree to license your contribution under the [MIT license](https://github.com/nnnick/Chart.js/blob/master/LICENSE.md).
diff --git a/applications/auto-scale/gui/src/vendor/Chart.js/Chart.min.js b/applications/auto-scale/gui/src/vendor/Chart.js/Chart.min.js
deleted file mode 100644
index 3a0a2c8..0000000
--- a/applications/auto-scale/gui/src/vendor/Chart.js/Chart.min.js
+++ /dev/null
@@ -1,11 +0,0 @@
-/*!
- * Chart.js
- * http://chartjs.org/
- * Version: 1.0.2
- *
- * Copyright 2015 Nick Downie
- * Released under the MIT license
- * https://github.com/nnnick/Chart.js/blob/master/LICENSE.md
- */
-(function(){"use strict";var t=this,i=t.Chart,e=function(t){this.canvas=t.canvas,this.ctx=t;var i=function(t,i){return t["offset"+i]?t["offset"+i]:document.defaultView.getComputedStyle(t).getPropertyValue(i)},e=this.width=i(t.canvas,"Width"),n=this.height=i(t.canvas,"Height");t.canvas.width=e,t.canvas.height=n;var e=this.width=t.canvas.width,n=this.height=t.canvas.height;return this.aspectRatio=this.width/this.height,s.retinaScale(this),this};e.defaults={global:{animation:!0,animationSteps:60,animationEasing:"easeOutQuart",showScale:!0,scaleOverride:!1,scaleSteps:null,scaleStepWidth:null,scaleStartValue:null,scaleLineColor:"rgba(0,0,0,.1)",scaleLineWidth:1,scaleShowLabels:!0,scaleLabel:"<%=value%>",scaleIntegersOnly:!0,scaleBeginAtZero:!1,scaleFontFamily:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",scaleFontSize:12,scaleFontStyle:"normal",scaleFontColor:"#666",responsive:!1,maintainAspectRatio:!0,showTooltips:!0,customTooltips:!1,tooltipEvents:["mousemove","touchstart","touchmove","mouseout"],tooltipFillColor:"rgba(0,0,0,0.8)",tooltipFontFamily:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",tooltipFontSize:14,tooltipFontStyle:"normal",tooltipFontColor:"#fff",tooltipTitleFontFamily:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",tooltipTitleFontSize:14,tooltipTitleFontStyle:"bold",tooltipTitleFontColor:"#fff",tooltipYPadding:6,tooltipXPadding:6,tooltipCaretSize:8,tooltipCornerRadius:6,tooltipXOffset:10,tooltipTemplate:"<%if (label){%><%=label%>: <%}%><%= value %>",multiTooltipTemplate:"<%= value %>",multiTooltipKeyBackground:"#fff",onAnimationProgress:function(){},onAnimationComplete:function(){}}},e.types={};var s=e.helpers={},n=s.each=function(t,i,e){var s=Array.prototype.slice.call(arguments,3);if(t)if(t.length===+t.length){var n;for(n=0;n<t.length;n++)i.apply(e,[t[n],n].concat(s))}else for(var o in t)i.apply(e,[t[o],o].concat(s))},o=s.clone=function(t){var i={};return n(t,function(e,s){t.hasOwnProperty(s)&&(i[s]=e)}),i},a=s.extend=function(t){return n(Array.prototype.slice.call(arguments,1),function(i){n(i,function(e,s){i.hasOwnProperty(s)&&(t[s]=e)})}),t},h=s.merge=function(){var t=Array.prototype.slice.call(arguments,0);return t.unshift({}),a.apply(null,t)},l=s.indexOf=function(t,i){if(Array.prototype.indexOf)return t.indexOf(i);for(var e=0;e<t.length;e++)if(t[e]===i)return e;return-1},r=(s.where=function(t,i){var e=[];return s.each(t,function(t){i(t)&&e.push(t)}),e},s.findNextWhere=function(t,i,e){e||(e=-1);for(var s=e+1;s<t.length;s++){var n=t[s];if(i(n))return n}},s.findPreviousWhere=function(t,i,e){e||(e=t.length);for(var s=e-1;s>=0;s--){var n=t[s];if(i(n))return n}},s.inherits=function(t){var i=this,e=t&&t.hasOwnProperty("constructor")?t.constructor:function(){return i.apply(this,arguments)},s=function(){this.constructor=e};return s.prototype=i.prototype,e.prototype=new s,e.extend=r,t&&a(e.prototype,t),e.__super__=i.prototype,e}),c=s.noop=function(){},u=s.uid=function(){var t=0;return function(){return"chart-"+t++}}(),d=s.warn=function(t){window.console&&"function"==typeof window.console.warn&&console.warn(t)},p=s.amd="function"==typeof define&&define.amd,f=s.isNumber=function(t){return!isNaN(parseFloat(t))&&isFinite(t)},g=s.max=function(t){return Math.max.apply(Math,t)},m=s.min=function(t){return Math.min.apply(Math,t)},v=(s.cap=function(t,i,e){if(f(i)){if(t>i)return i}else if(f(e)&&e>t)return e;return t},s.getDecimalPlaces=function(t){return t%1!==0&&f(t)?t.toString().split(".")[1].length:0}),S=s.radians=function(t){return t*(Math.PI/180)},x=(s.getAngleFromPoint=function(t,i){var e=i.x-t.x,s=i.y-t.y,n=Math.sqrt(e*e+s*s),o=2*Math.PI+Math.atan2(s,e);return 0>e&&0>s&&(o+=2*Math.PI),{angle:o,distance:n}},s.aliasPixel=function(t){return t%2===0?0:.5}),y=(s.splineCurve=function(t,i,e,s){var n=Math.sqrt(Math.pow(i.x-t.x,2)+Math.pow(i.y-t.y,2)),o=Math.sqrt(Math.pow(e.x-i.x,2)+Math.pow(e.y-i.y,2)),a=s*n/(n+o),h=s*o/(n+o);return{inner:{x:i.x-a*(e.x-t.x),y:i.y-a*(e.y-t.y)},outer:{x:i.x+h*(e.x-t.x),y:i.y+h*(e.y-t.y)}}},s.calculateOrderOfMagnitude=function(t){return Math.floor(Math.log(t)/Math.LN10)}),C=(s.calculateScaleRange=function(t,i,e,s,n){var o=2,a=Math.floor(i/(1.5*e)),h=o>=a,l=g(t),r=m(t);l===r&&(l+=.5,r>=.5&&!s?r-=.5:l+=.5);for(var c=Math.abs(l-r),u=y(c),d=Math.ceil(l/(1*Math.pow(10,u)))*Math.pow(10,u),p=s?0:Math.floor(r/(1*Math.pow(10,u)))*Math.pow(10,u),f=d-p,v=Math.pow(10,u),S=Math.round(f/v);(S>a||a>2*S)&&!h;)if(S>a)v*=2,S=Math.round(f/v),S%1!==0&&(h=!0);else if(n&&u>=0){if(v/2%1!==0)break;v/=2,S=Math.round(f/v)}else v/=2,S=Math.round(f/v);return h&&(S=o,v=f/S),{steps:S,stepValue:v,min:p,max:p+S*v}},s.template=function(t,i){function e(t,i){var e=/\W/.test(t)?new Function("obj","var p=[],print=function(){p.push.apply(p,arguments);};with(obj){p.push('"+t.replace(/[\r\t\n]/g," ").split("<%").join(" ").replace(/((^|%>)[^\t]*)'/g,"$1\r").replace(/\t=(.*?)%>/g,"',$1,'").split(" ").join("');").split("%>").join("p.push('").split("\r").join("\\'")+"');}return p.join('');"):s[t]=s[t];return i?e(i):e}if(t instanceof Function)return t(i);var s={};return e(t,i)}),w=(s.generateLabels=function(t,i,e,s){var o=new Array(i);return labelTemplateString&&n(o,function(i,n){o[n]=C(t,{value:e+s*(n+1)})}),o},s.easingEffects={linear:function(t){return t},easeInQuad:function(t){return t*t},easeOutQuad:function(t){return-1*t*(t-2)},easeInOutQuad:function(t){return(t/=.5)<1?.5*t*t:-0.5*(--t*(t-2)-1)},easeInCubic:function(t){return t*t*t},easeOutCubic:function(t){return 1*((t=t/1-1)*t*t+1)},easeInOutCubic:function(t){return(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},easeInQuart:function(t){return t*t*t*t},easeOutQuart:function(t){return-1*((t=t/1-1)*t*t*t-1)},easeInOutQuart:function(t){return(t/=.5)<1?.5*t*t*t*t:-0.5*((t-=2)*t*t*t-2)},easeInQuint:function(t){return 1*(t/=1)*t*t*t*t},easeOutQuint:function(t){return 1*((t=t/1-1)*t*t*t*t+1)},easeInOutQuint:function(t){return(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},easeInSine:function(t){return-1*Math.cos(t/1*(Math.PI/2))+1},easeOutSine:function(t){return 1*Math.sin(t/1*(Math.PI/2))},easeInOutSine:function(t){return-0.5*(Math.cos(Math.PI*t/1)-1)},easeInExpo:function(t){return 0===t?1:1*Math.pow(2,10*(t/1-1))},easeOutExpo:function(t){return 1===t?1:1*(-Math.pow(2,-10*t/1)+1)},easeInOutExpo:function(t){return 0===t?0:1===t?1:(t/=.5)<1?.5*Math.pow(2,10*(t-1)):.5*(-Math.pow(2,-10*--t)+2)},easeInCirc:function(t){return t>=1?t:-1*(Math.sqrt(1-(t/=1)*t)-1)},easeOutCirc:function(t){return 1*Math.sqrt(1-(t=t/1-1)*t)},easeInOutCirc:function(t){return(t/=.5)<1?-0.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},easeInElastic:function(t){var i=1.70158,e=0,s=1;return 0===t?0:1==(t/=1)?1:(e||(e=.3),s<Math.abs(1)?(s=1,i=e/4):i=e/(2*Math.PI)*Math.asin(1/s),-(s*Math.pow(2,10*(t-=1))*Math.sin(2*(1*t-i)*Math.PI/e)))},easeOutElastic:function(t){var i=1.70158,e=0,s=1;return 0===t?0:1==(t/=1)?1:(e||(e=.3),s<Math.abs(1)?(s=1,i=e/4):i=e/(2*Math.PI)*Math.asin(1/s),s*Math.pow(2,-10*t)*Math.sin(2*(1*t-i)*Math.PI/e)+1)},easeInOutElastic:function(t){var i=1.70158,e=0,s=1;return 0===t?0:2==(t/=.5)?1:(e||(e=.3*1.5),s<Math.abs(1)?(s=1,i=e/4):i=e/(2*Math.PI)*Math.asin(1/s),1>t?-.5*s*Math.pow(2,10*(t-=1))*Math.sin(2*(1*t-i)*Math.PI/e):s*Math.pow(2,-10*(t-=1))*Math.sin(2*(1*t-i)*Math.PI/e)*.5+1)},easeInBack:function(t){var i=1.70158;return 1*(t/=1)*t*((i+1)*t-i)},easeOutBack:function(t){var i=1.70158;return 1*((t=t/1-1)*t*((i+1)*t+i)+1)},easeInOutBack:function(t){var i=1.70158;return(t/=.5)<1?.5*t*t*(((i*=1.525)+1)*t-i):.5*((t-=2)*t*(((i*=1.525)+1)*t+i)+2)},easeInBounce:function(t){return 1-w.easeOutBounce(1-t)},easeOutBounce:function(t){return(t/=1)<1/2.75?7.5625*t*t:2/2.75>t?1*(7.5625*(t-=1.5/2.75)*t+.75):2.5/2.75>t?1*(7.5625*(t-=2.25/2.75)*t+.9375):1*(7.5625*(t-=2.625/2.75)*t+.984375)},easeInOutBounce:function(t){return.5>t?.5*w.easeInBounce(2*t):.5*w.easeOutBounce(2*t-1)+.5}}),b=s.requestAnimFrame=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(t){return window.setTimeout(t,1e3/60)}}(),P=s.cancelAnimFrame=function(){return window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||window.oCancelAnimationFrame||window.msCancelAnimationFrame||function(t){return window.clearTimeout(t,1e3/60)}}(),L=(s.animationLoop=function(t,i,e,s,n,o){var a=0,h=w[e]||w.linear,l=function(){a++;var e=a/i,r=h(e);t.call(o,r,e,a),s.call(o,r,e),i>a?o.animationFrame=b(l):n.apply(o)};b(l)},s.getRelativePosition=function(t){var i,e,s=t.originalEvent||t,n=t.currentTarget||t.srcElement,o=n.getBoundingClientRect();return s.touches?(i=s.touches[0].clientX-o.left,e=s.touches[0].clientY-o.top):(i=s.clientX-o.left,e=s.clientY-o.top),{x:i,y:e}},s.addEvent=function(t,i,e){t.addEventListener?t.addEventListener(i,e):t.attachEvent?t.attachEvent("on"+i,e):t["on"+i]=e}),k=s.removeEvent=function(t,i,e){t.removeEventListener?t.removeEventListener(i,e,!1):t.detachEvent?t.detachEvent("on"+i,e):t["on"+i]=c},F=(s.bindEvents=function(t,i,e){t.events||(t.events={}),n(i,function(i){t.events[i]=function(){e.apply(t,arguments)},L(t.chart.canvas,i,t.events[i])})},s.unbindEvents=function(t,i){n(i,function(i,e){k(t.chart.canvas,e,i)})}),R=s.getMaximumWidth=function(t){var i=t.parentNode;return i.clientWidth},T=s.getMaximumHeight=function(t){var i=t.parentNode;return i.clientHeight},A=(s.getMaximumSize=s.getMaximumWidth,s.retinaScale=function(t){var i=t.ctx,e=t.canvas.width,s=t.canvas.height;window.devicePixelRatio&&(i.canvas.style.width=e+"px",i.canvas.style.height=s+"px",i.canvas.height=s*window.devicePixelRatio,i.canvas.width=e*window.devicePixelRatio,i.scale(window.devicePixelRatio,window.devicePixelRatio))}),M=s.clear=function(t){t.ctx.clearRect(0,0,t.width,t.height)},W=s.fontString=function(t,i,e){return i+" "+t+"px "+e},z=s.longestText=function(t,i,e){t.font=i;var s=0;return n(e,function(i){var e=t.measureText(i).width;s=e>s?e:s}),s},B=s.drawRoundedRectangle=function(t,i,e,s,n,o){t.beginPath(),t.moveTo(i+o,e),t.lineTo(i+s-o,e),t.quadraticCurveTo(i+s,e,i+s,e+o),t.lineTo(i+s,e+n-o),t.quadraticCurveTo(i+s,e+n,i+s-o,e+n),t.lineTo(i+o,e+n),t.quadraticCurveTo(i,e+n,i,e+n-o),t.lineTo(i,e+o),t.quadraticCurveTo(i,e,i+o,e),t.closePath()};e.instances={},e.Type=function(t,i,s){this.options=i,this.chart=s,this.id=u(),e.instances[this.id]=this,i.responsive&&this.resize(),this.initialize.call(this,t)},a(e.Type.prototype,{initialize:function(){return this},clear:function(){return M(this.chart),this},stop:function(){return P(this.animationFrame),this},resize:function(t){this.stop();var i=this.chart.canvas,e=R(this.chart.canvas),s=this.options.maintainAspectRatio?e/this.chart.aspectRatio:T(this.chart.canvas);return i.width=this.chart.width=e,i.height=this.chart.height=s,A(this.chart),"function"==typeof t&&t.apply(this,Array.prototype.slice.call(arguments,1)),this},reflow:c,render:function(t){return t&&this.reflow(),this.options.animation&&!t?s.animationLoop(this.draw,this.options.animationSteps,this.options.animationEasing,this.options.onAnimationProgress,this.options.onAnimationComplete,this):(this.draw(),this.options.onAnimationComplete.call(this)),this},generateLegend:function(){return C(this.options.legendTemplate,this)},destroy:function(){this.clear(),F(this,this.events);var t=this.chart.canvas;t.width=this.chart.width,t.height=this.chart.height,t.style.removeProperty?(t.style.removeProperty("width"),t.style.removeProperty("height")):(t.style.removeAttribute("width"),t.style.removeAttribute("height")),delete e.instances[this.id]},showTooltip:function(t,i){"undefined"==typeof this.activeElements&&(this.activeElements=[]);var o=function(t){var i=!1;return t.length!==this.activeElements.length?i=!0:(n(t,function(t,e){t!==this.activeElements[e]&&(i=!0)},this),i)}.call(this,t);if(o||i){if(this.activeElements=t,this.draw(),this.options.customTooltips&&this.options.customTooltips(!1),t.length>0)if(this.datasets&&this.datasets.length>1){for(var a,h,r=this.datasets.length-1;r>=0&&(a=this.datasets[r].points||this.datasets[r].bars||this.datasets[r].segments,h=l(a,t[0]),-1===h);r--);var c=[],u=[],d=function(){var t,i,e,n,o,a=[],l=[],r=[];return s.each(this.datasets,function(i){t=i.points||i.bars||i.segments,t[h]&&t[h].hasValue()&&a.push(t[h])}),s.each(a,function(t){l.push(t.x),r.push(t.y),c.push(s.template(this.options.multiTooltipTemplate,t)),u.push({fill:t._saved.fillColor||t.fillColor,stroke:t._saved.strokeColor||t.strokeColor})},this),o=m(r),e=g(r),n=m(l),i=g(l),{x:n>this.chart.width/2?n:i,y:(o+e)/2}}.call(this,h);new e.MultiTooltip({x:d.x,y:d.y,xPadding:this.options.tooltipXPadding,yPadding:this.options.tooltipYPadding,xOffset:this.options.tooltipXOffset,fillColor:this.options.tooltipFillColor,textColor:this.options.tooltipFontColor,fontFamily:this.options.tooltipFontFamily,fontStyle:this.options.tooltipFontStyle,fontSize:this.options.tooltipFontSize,titleTextColor:this.options.tooltipTitleFontColor,titleFontFamily:this.options.tooltipTitleFontFamily,titleFontStyle:this.options.tooltipTitleFontStyle,titleFontSize:this.options.tooltipTitleFontSize,cornerRadius:this.options.tooltipCornerRadius,labels:c,legendColors:u,legendColorBackground:this.options.multiTooltipKeyBackground,title:t[0].label,chart:this.chart,ctx:this.chart.ctx,custom:this.options.customTooltips}).draw()}else n(t,function(t){var i=t.tooltipPosition();new e.Tooltip({x:Math.round(i.x),y:Math.round(i.y),xPadding:this.options.tooltipXPadding,yPadding:this.options.tooltipYPadding,fillColor:this.options.tooltipFillColor,textColor:this.options.tooltipFontColor,fontFamily:this.options.tooltipFontFamily,fontStyle:this.options.tooltipFontStyle,fontSize:this.options.tooltipFontSize,caretHeight:this.options.tooltipCaretSize,cornerRadius:this.options.tooltipCornerRadius,text:C(this.options.tooltipTemplate,t),chart:this.chart,custom:this.options.customTooltips}).draw()},this);return this}},toBase64Image:function(){return this.chart.canvas.toDataURL.apply(this.chart.canvas,arguments)}}),e.Type.extend=function(t){var i=this,s=function(){return i.apply(this,arguments)};if(s.prototype=o(i.prototype),a(s.prototype,t),s.extend=e.Type.extend,t.name||i.prototype.name){var n=t.name||i.prototype.name,l=e.defaults[i.prototype.name]?o(e.defaults[i.prototype.name]):{};e.defaults[n]=a(l,t.defaults),e.types[n]=s,e.prototype[n]=function(t,i){var o=h(e.defaults.global,e.defaults[n],i||{});return new s(t,o,this)}}else d("Name not provided for this chart, so it hasn't been registered");return i},e.Element=function(t){a(this,t),this.initialize.apply(this,arguments),this.save()},a(e.Element.prototype,{initialize:function(){},restore:function(t){return t?n(t,function(t){this[t]=this._saved[t]},this):a(this,this._saved),this},save:function(){return this._saved=o(this),delete this._saved._saved,this},update:function(t){return n(t,function(t,i){this._saved[i]=this[i],this[i]=t},this),this},transition:function(t,i){return n(t,function(t,e){this[e]=(t-this._saved[e])*i+this._saved[e]},this),this},tooltipPosition:function(){return{x:this.x,y:this.y}},hasValue:function(){return f(this.value)}}),e.Element.extend=r,e.Point=e.Element.extend({display:!0,inRange:function(t,i){var e=this.hitDetectionRadius+this.radius;return Math.pow(t-this.x,2)+Math.pow(i-this.y,2)<Math.pow(e,2)},draw:function(){if(this.display){var t=this.ctx;t.beginPath(),t.arc(this.x,this.y,this.radius,0,2*Math.PI),t.closePath(),t.strokeStyle=this.strokeColor,t.lineWidth=this.strokeWidth,t.fillStyle=this.fillColor,t.fill(),t.stroke()}}}),e.Arc=e.Element.extend({inRange:function(t,i){var e=s.getAngleFromPoint(this,{x:t,y:i}),n=e.angle>=this.startAngle&&e.angle<=this.endAngle,o=e.distance>=this.innerRadius&&e.distance<=this.outerRadius;return n&&o},tooltipPosition:function(){var t=this.startAngle+(this.endAngle-this.startAngle)/2,i=(this.outerRadius-this.innerRadius)/2+this.innerRadius;return{x:this.x+Math.cos(t)*i,y:this.y+Math.sin(t)*i}},draw:function(t){var i=this.ctx;i.beginPath(),i.arc(this.x,this.y,this.outerRadius,this.startAngle,this.endAngle),i.arc(this.x,this.y,this.innerRadius,this.endAngle,this.startAngle,!0),i.closePath(),i.strokeStyle=this.strokeColor,i.lineWidth=this.strokeWidth,i.fillStyle=this.fillColor,i.fill(),i.lineJoin="bevel",this.showStroke&&i.stroke()}}),e.Rectangle=e.Element.extend({draw:function(){var t=this.ctx,i=this.width/2,e=this.x-i,s=this.x+i,n=this.base-(this.base-this.y),o=this.strokeWidth/2;this.showStroke&&(e+=o,s-=o,n+=o),t.beginPath(),t.fillStyle=this.fillColor,t.strokeStyle=this.strokeColor,t.lineWidth=this.strokeWidth,t.moveTo(e,this.base),t.lineTo(e,n),t.lineTo(s,n),t.lineTo(s,this.base),t.fill(),this.showStroke&&t.stroke()},height:function(){return this.base-this.y},inRange:function(t,i){return t>=this.x-this.width/2&&t<=this.x+this.width/2&&i>=this.y&&i<=this.base}}),e.Tooltip=e.Element.extend({draw:function(){var t=this.chart.ctx;t.font=W(this.fontSize,this.fontStyle,this.fontFamily),this.xAlign="center",this.yAlign="above";var i=this.caretPadding=2,e=t.measureText(this.text).width+2*this.xPadding,s=this.fontSize+2*this.yPadding,n=s+this.caretHeight+i;this.x+e/2>this.chart.width?this.xAlign="left":this.x-e/2<0&&(this.xAlign="right"),this.y-n<0&&(this.yAlign="below");var o=this.x-e/2,a=this.y-n;if(t.fillStyle=this.fillColor,this.custom)this.custom(this);else{switch(this.yAlign){case"above":t.beginPath(),t.moveTo(this.x,this.y-i),t.lineTo(this.x+this.caretHeight,this.y-(i+this.caretHeight)),t.lineTo(this.x-this.caretHeight,this.y-(i+this.caretHeight)),t.closePath(),t.fill();break;case"below":a=this.y+i+this.caretHeight,t.beginPath(),t.moveTo(this.x,this.y+i),t.lineTo(this.x+this.caretHeight,this.y+i+this.caretHeight),t.lineTo(this.x-this.caretHeight,this.y+i+this.caretHeight),t.closePath(),t.fill()}switch(this.xAlign){case"left":o=this.x-e+(this.cornerRadius+this.caretHeight);break;case"right":o=this.x-(this.cornerRadius+this.caretHeight)}B(t,o,a,e,s,this.cornerRadius),t.fill(),t.fillStyle=this.textColor,t.textAlign="center",t.textBaseline="middle",t.fillText(this.text,o+e/2,a+s/2)}}}),e.MultiTooltip=e.Element.extend({initialize:function(){this.font=W(this.fontSize,this.fontStyle,this.fontFamily),this.titleFont=W(this.titleFontSize,this.titleFontStyle,this.titleFontFamily),this.height=this.labels.length*this.fontSize+(this.labels.length-1)*(this.fontSize/2)+2*this.yPadding+1.5*this.titleFontSize,this.ctx.font=this.titleFont;var t=this.ctx.measureText(this.title).width,i=z(this.ctx,this.font,this.labels)+this.fontSize+3,e=g([i,t]);this.width=e+2*this.xPadding;var s=this.height/2;this.y-s<0?this.y=s:this.y+s>this.chart.height&&(this.y=this.chart.height-s),this.x>this.chart.width/2?this.x-=this.xOffset+this.width:this.x+=this.xOffset},getLineHeight:function(t){var i=this.y-this.height/2+this.yPadding,e=t-1;return 0===t?i+this.titleFontSize/2:i+(1.5*this.fontSize*e+this.fontSize/2)+1.5*this.titleFontSize},draw:function(){if(this.custom)this.custom(this);else{B(this.ctx,this.x,this.y-this.height/2,this.width,this.height,this.cornerRadius);var t=this.ctx;t.fillStyle=this.fillColor,t.fill(),t.closePath(),t.textAlign="left",t.textBaseline="middle",t.fillStyle=this.titleTextColor,t.font=this.titleFont,t.fillText(this.title,this.x+this.xPadding,this.getLineHeight(0)),t.font=this.font,s.each(this.labels,function(i,e){t.fillStyle=this.textColor,t.fillText(i,this.x+this.xPadding+this.fontSize+3,this.getLineHeight(e+1)),t.fillStyle=this.legendColorBackground,t.fillRect(this.x+this.xPadding,this.getLineHeight(e+1)-this.fontSize/2,this.fontSize,this.fontSize),t.fillStyle=this.legendColors[e].fill,t.fillRect(this.x+this.xPadding,this.getLineHeight(e+1)-this.fontSize/2,this.fontSize,this.fontSize)},this)}}}),e.Scale=e.Element.extend({initialize:function(){this.fit()},buildYLabels:function(){this.yLabels=[];for(var t=v(this.stepValue),i=0;i<=this.steps;i++)this.yLabels.push(C(this.templateString,{value:(this.min+i*this.stepValue).toFixed(t)}));this.yLabelWidth=this.display&&this.showLabels?z(this.ctx,this.font,this.yLabels):0},addXLabel:function(t){this.xLabels.push(t),this.valuesCount++,this.fit()},removeXLabel:function(){this.xLabels.shift(),this.valuesCount--,this.fit()},fit:function(){this.startPoint=this.display?this.fontSize:0,this.endPoint=this.display?this.height-1.5*this.fontSize-5:this.height,this.startPoint+=this.padding,this.endPoint-=this.padding;var t,i=this.endPoint-this.startPoint;for(this.calculateYRange(i),this.buildYLabels(),this.calculateXLabelRotation();i>this.endPoint-this.startPoint;)i=this.endPoint-this.startPoint,t=this.yLabelWidth,this.calculateYRange(i),this.buildYLabels(),t<this.yLabelWidth&&this.calculateXLabelRotation()},calculateXLabelRotation:function(){this.ctx.font=this.font;var t,i,e=this.ctx.measureText(this.xLabels[0]).width,s=this.ctx.measureText(this.xLabels[this.xLabels.length-1]).width;if(this.xScalePaddingRight=s/2+3,this.xScalePaddingLeft=e/2>this.yLabelWidth+10?e/2:this.yLabelWidth+10,this.xLabelRotation=0,this.display){var n,o=z(this.ctx,this.font,this.xLabels);this.xLabelWidth=o;for(var a=Math.floor(this.calculateX(1)-this.calculateX(0))-6;this.xLabelWidth>a&&0===this.xLabelRotation||this.xLabelWidth>a&&this.xLabelRotation<=90&&this.xLabelRotation>0;)n=Math.cos(S(this.xLabelRotation)),t=n*e,i=n*s,t+this.fontSize/2>this.yLabelWidth+8&&(this.xScalePaddingLeft=t+this.fontSize/2),this.xScalePaddingRight=this.fontSize/2,this.xLabelRotation++,this.xLabelWidth=n*o;this.xLabelRotation>0&&(this.endPoint-=Math.sin(S(this.xLabelRotation))*o+3)}else this.xLabelWidth=0,this.xScalePaddingRight=this.padding,this.xScalePaddingLeft=this.padding},calculateYRange:c,drawingArea:function(){return this.startPoint-this.endPoint},calculateY:function(t){var i=this.drawingArea()/(this.min-this.max);return this.endPoint-i*(t-this.min)},calculateX:function(t){var i=(this.xLabelRotation>0,this.width-(this.xScalePaddingLeft+this.xScalePaddingRight)),e=i/Math.max(this.valuesCount-(this.offsetGridLines?0:1),1),s=e*t+this.xScalePaddingLeft;return this.offsetGridLines&&(s+=e/2),Math.round(s)},update:function(t){s.extend(this,t),this.fit()},draw:function(){var t=this.ctx,i=(this.endPoint-this.startPoint)/this.steps,e=Math.round(this.xScalePaddingLeft);this.display&&(t.fillStyle=this.textColor,t.font=this.font,n(this.yLabels,function(n,o){var a=this.endPoint-i*o,h=Math.round(a),l=this.showHorizontalLines;t.textAlign="right",t.textBaseline="middle",this.showLabels&&t.fillText(n,e-10,a),0!==o||l||(l=!0),l&&t.beginPath(),o>0?(t.lineWidth=this.gridLineWidth,t.strokeStyle=this.gridLineColor):(t.lineWidth=this.lineWidth,t.strokeStyle=this.lineColor),h+=s.aliasPixel(t.lineWidth),l&&(t.moveTo(e,h),t.lineTo(this.width,h),t.stroke(),t.closePath()),t.lineWidth=this.lineWidth,t.strokeStyle=this.lineColor,t.beginPath(),t.moveTo(e-5,h),t.lineTo(e,h),t.stroke(),t.closePath()},this),n(this.xLabels,function(i,e){var s=this.calculateX(e)+x(this.lineWidth),n=this.calculateX(e-(this.offsetGridLines?.5:0))+x(this.lineWidth),o=this.xLabelRotation>0,a=this.showVerticalLines;0!==e||a||(a=!0),a&&t.beginPath(),e>0?(t.lineWidth=this.gridLineWidth,t.strokeStyle=this.gridLineColor):(t.lineWidth=this.lineWidth,t.strokeStyle=this.lineColor),a&&(t.moveTo(n,this.endPoint),t.lineTo(n,this.startPoint-3),t.stroke(),t.closePath()),t.lineWidth=this.lineWidth,t.strokeStyle=this.lineColor,t.beginPath(),t.moveTo(n,this.endPoint),t.lineTo(n,this.endPoint+5),t.stroke(),t.closePath(),t.save(),t.translate(s,o?this.endPoint+12:this.endPoint+8),t.rotate(-1*S(this.xLabelRotation)),t.font=this.font,t.textAlign=o?"right":"center",t.textBaseline=o?"middle":"top",t.fillText(i,0,0),t.restore()},this))}}),e.RadialScale=e.Element.extend({initialize:function(){this.size=m([this.height,this.width]),this.drawingArea=this.display?this.size/2-(this.fontSize/2+this.backdropPaddingY):this.size/2},calculateCenterOffset:function(t){var i=this.drawingArea/(this.max-this.min);return(t-this.min)*i},update:function(){this.lineArc?this.drawingArea=this.display?this.size/2-(this.fontSize/2+this.backdropPaddingY):this.size/2:this.setScaleSize(),this.buildYLabels()},buildYLabels:function(){this.yLabels=[];for(var t=v(this.stepValue),i=0;i<=this.steps;i++)this.yLabels.push(C(this.templateString,{value:(this.min+i*this.stepValue).toFixed(t)}))},getCircumference:function(){return 2*Math.PI/this.valuesCount},setScaleSize:function(){var t,i,e,s,n,o,a,h,l,r,c,u,d=m([this.height/2-this.pointLabelFontSize-5,this.width/2]),p=this.width,g=0;for(this.ctx.font=W(this.pointLabelFontSize,this.pointLabelFontStyle,this.pointLabelFontFamily),i=0;i<this.valuesCount;i++)t=this.getPointPosition(i,d),e=this.ctx.measureText(C(this.templateString,{value:this.labels[i]})).width+5,0===i||i===this.valuesCount/2?(s=e/2,t.x+s>p&&(p=t.x+s,n=i),t.x-s<g&&(g=t.x-s,a=i)):i<this.valuesCount/2?t.x+e>p&&(p=t.x+e,n=i):i>this.valuesCount/2&&t.x-e<g&&(g=t.x-e,a=i);l=g,r=Math.ceil(p-this.width),o=this.getIndexAngle(n),h=this.getIndexAngle(a),c=r/Math.sin(o+Math.PI/2),u=l/Math.sin(h+Math.PI/2),c=f(c)?c:0,u=f(u)?u:0,this.drawingArea=d-(u+c)/2,this.setCenterPoint(u,c)},setCenterPoint:function(t,i){var e=this.width-i-this.drawingArea,s=t+this.drawingArea;this.xCenter=(s+e)/2,this.yCenter=this.height/2},getIndexAngle:function(t){var i=2*Math.PI/this.valuesCount;return t*i-Math.PI/2},getPointPosition:function(t,i){var e=this.getIndexAngle(t);return{x:Math.cos(e)*i+this.xCenter,y:Math.sin(e)*i+this.yCenter}},draw:function(){if(this.display){var t=this.ctx;if(n(this.yLabels,function(i,e){if(e>0){var s,n=e*(this.drawingArea/this.steps),o=this.yCenter-n;if(this.lineWidth>0)if(t.strokeStyle=this.lineColor,t.lineWidth=this.lineWidth,this.lineArc)t.beginPath(),t.arc(this.xCenter,this.yCenter,n,0,2*Math.PI),t.closePath(),t.stroke();else{t.beginPath();for(var a=0;a<this.valuesCount;a++)s=this.getPointPosition(a,this.calculateCenterOffset(this.min+e*this.stepValue)),0===a?t.moveTo(s.x,s.y):t.lineTo(s.x,s.y);t.closePath(),t.stroke()}if(this.showLabels){if(t.font=W(this.fontSize,this.fontStyle,this.fontFamily),this.showLabelBackdrop){var h=t.measureText(i).width;t.fillStyle=this.backdropColor,t.fillRect(this.xCenter-h/2-this.backdropPaddingX,o-this.fontSize/2-this.backdropPaddingY,h+2*this.backdropPaddingX,this.fontSize+2*this.backdropPaddingY)}t.textAlign="center",t.textBaseline="middle",t.fillStyle=this.fontColor,t.fillText(i,this.xCenter,o)}}},this),!this.lineArc){t.lineWidth=this.angleLineWidth,t.strokeStyle=this.angleLineColor;for(var i=this.valuesCount-1;i>=0;i--){if(this.angleLineWidth>0){var e=this.getPointPosition(i,this.calculateCenterOffset(this.max));t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(e.x,e.y),t.stroke(),t.closePath()}var s=this.getPointPosition(i,this.calculateCenterOffset(this.max)+5);t.font=W(this.pointLabelFontSize,this.pointLabelFontStyle,this.pointLabelFontFamily),t.fillStyle=this.pointLabelFontColor;var o=this.labels.length,a=this.labels.length/2,h=a/2,l=h>i||i>o-h,r=i===h||i===o-h;t.textAlign=0===i?"center":i===a?"center":a>i?"left":"right",t.textBaseline=r?"middle":l?"bottom":"top",t.fillText(this.labels[i],s.x,s.y)}}}}}),s.addEvent(window,"resize",function(){var t;return function(){clearTimeout(t),t=setTimeout(function(){n(e.instances,function(t){t.options.responsive&&t.resize(t.render,!0)})},50)}}()),p?define(function(){return e}):"object"==typeof module&&module.exports&&(module.exports=e),t.Chart=e,e.noConflict=function(){return t.Chart=i,e}}).call(this),function(){"use strict";var t=this,i=t.Chart,e=i.helpers,s={scaleBeginAtZero:!0,scaleShowGridLines:!0,scaleGridLineColor:"rgba(0,0,0,.05)",scaleGridLineWidth:1,scaleShowHorizontalLines:!0,scaleShowVerticalLines:!0,barShowStroke:!0,barStrokeWidth:2,barValueSpacing:5,barDatasetSpacing:1,legendTemplate:'<ul class="<%=name.toLowerCase()%>-legend"><% for (var i=0; i<datasets.length; i++){%><li><span style="background-color:<%=datasets[i].fillColor%>"></span><%if(datasets[i].label){%><%=datasets[i].label%><%}%></li><%}%></ul>'};i.Type.extend({name:"Bar",defaults:s,initialize:function(t){var s=this.options;this.ScaleClass=i.Scale.extend({offsetGridLines:!0,calculateBarX:function(t,i,e){var n=this.calculateBaseWidth(),o=this.calculateX(e)-n/2,a=this.calculateBarWidth(t);return o+a*i+i*s.barDatasetSpacing+a/2},calculateBaseWidth:function(){return this.calculateX(1)-this.calculateX(0)-2*s.barValueSpacing},calculateBarWidth:function(t){var i=this.calculateBaseWidth()-(t-1)*s.barDatasetSpacing;return i/t}}),this.datasets=[],this.options.showTooltips&&e.bindEvents(this,this.options.tooltipEvents,function(t){var i="mouseout"!==t.type?this.getBarsAtEvent(t):[];this.eachBars(function(t){t.restore(["fillColor","strokeColor"])}),e.each(i,function(t){t.fillColor=t.highlightFill,t.strokeColor=t.highlightStroke}),this.showTooltip(i)}),this.BarClass=i.Rectangle.extend({strokeWidth:this.options.barStrokeWidth,showStroke:this.options.barShowStroke,ctx:this.chart.ctx}),e.each(t.datasets,function(i){var s={label:i.label||null,fillColor:i.fillColor,strokeColor:i.strokeColor,bars:[]};this.datasets.push(s),e.each(i.data,function(e,n){s.bars.push(new this.BarClass({value:e,label:t.labels[n],datasetLabel:i.label,strokeColor:i.strokeColor,fillColor:i.fillColor,highlightFill:i.highlightFill||i.fillColor,highlightStroke:i.highlightStroke||i.strokeColor}))},this)},this),this.buildScale(t.labels),this.BarClass.prototype.base=this.scale.endPoint,this.eachBars(function(t,i,s){e.extend(t,{width:this.scale.calculateBarWidth(this.datasets.length),x:this.scale.calculateBarX(this.datasets.length,s,i),y:this.scale.endPoint}),t.save()},this),this.render()},update:function(){this.scale.update(),e.each(this.activeElements,function(t){t.restore(["fillColor","strokeColor"])}),this.eachBars(function(t){t.save()}),this.render()},eachBars:function(t){e.each(this.datasets,function(i,s){e.each(i.bars,t,this,s)},this)},getBarsAtEvent:function(t){for(var i,s=[],n=e.getRelativePosition(t),o=function(t){s.push(t.bars[i])},a=0;a<this.datasets.length;a++)for(i=0;i<this.datasets[a].bars.length;i++)if(this.datasets[a].bars[i].inRange(n.x,n.y))return e.each(this.datasets,o),s;return s},buildScale:function(t){var i=this,s=function(){var t=[];return i.eachBars(function(i){t.push(i.value)}),t},n={templateString:this.options.scaleLabel,height:this.chart.height,width:this.chart.width,ctx:this.chart.ctx,textColor:this.options.scaleFontColor,fontSize:this.options.scaleFontSize,fontStyle:this.options.scaleFontStyle,fontFamily:this.options.scaleFontFamily,valuesCount:t.length,beginAtZero:this.options.scaleBeginAtZero,integersOnly:this.options.scaleIntegersOnly,calculateYRange:function(t){var i=e.calculateScaleRange(s(),t,this.fontSize,this.beginAtZero,this.integersOnly);e.extend(this,i)},xLabels:t,font:e.fontString(this.options.scaleFontSize,this.options.scaleFontStyle,this.options.scaleFontFamily),lineWidth:this.options.scaleLineWidth,lineColor:this.options.scaleLineColor,showHorizontalLines:this.options.scaleShowHorizontalLines,showVerticalLines:this.options.scaleShowVerticalLines,gridLineWidth:this.options.scaleShowGridLines?this.options.scaleGridLineWidth:0,gridLineColor:this.options.scaleShowGridLines?this.options.scaleGridLineColor:"rgba(0,0,0,0)",padding:this.options.showScale?0:this.options.barShowStroke?this.options.barStrokeWidth:0,showLabels:this.options.scaleShowLabels,display:this.options.showScale};this.options.scaleOverride&&e.extend(n,{calculateYRange:e.noop,steps:this.options.scaleSteps,stepValue:this.options.scaleStepWidth,min:this.options.scaleStartValue,max:this.options.scaleStartValue+this.options.scaleSteps*this.options.scaleStepWidth}),this.scale=new this.ScaleClass(n)},addData:function(t,i){e.each(t,function(t,e){this.datasets[e].bars.push(new this.BarClass({value:t,label:i,x:this.scale.calculateBarX(this.datasets.length,e,this.scale.valuesCount+1),y:this.scale.endPoint,width:this.scale.calculateBarWidth(this.datasets.length),base:this.scale.endPoint,strokeColor:this.datasets[e].strokeColor,fillColor:this.datasets[e].fillColor}))
-},this),this.scale.addXLabel(i),this.update()},removeData:function(){this.scale.removeXLabel(),e.each(this.datasets,function(t){t.bars.shift()},this),this.update()},reflow:function(){e.extend(this.BarClass.prototype,{y:this.scale.endPoint,base:this.scale.endPoint});var t=e.extend({height:this.chart.height,width:this.chart.width});this.scale.update(t)},draw:function(t){var i=t||1;this.clear();this.chart.ctx;this.scale.draw(i),e.each(this.datasets,function(t,s){e.each(t.bars,function(t,e){t.hasValue()&&(t.base=this.scale.endPoint,t.transition({x:this.scale.calculateBarX(this.datasets.length,s,e),y:this.scale.calculateY(t.value),width:this.scale.calculateBarWidth(this.datasets.length)},i).draw())},this)},this)}})}.call(this),function(){"use strict";var t=this,i=t.Chart,e=i.helpers,s={segmentShowStroke:!0,segmentStrokeColor:"#fff",segmentStrokeWidth:2,percentageInnerCutout:50,animationSteps:100,animationEasing:"easeOutBounce",animateRotate:!0,animateScale:!1,legendTemplate:'<ul class="<%=name.toLowerCase()%>-legend"><% for (var i=0; i<segments.length; i++){%><li><span style="background-color:<%=segments[i].fillColor%>"></span><%if(segments[i].label){%><%=segments[i].label%><%}%></li><%}%></ul>'};i.Type.extend({name:"Doughnut",defaults:s,initialize:function(t){this.segments=[],this.outerRadius=(e.min([this.chart.width,this.chart.height])-this.options.segmentStrokeWidth/2)/2,this.SegmentArc=i.Arc.extend({ctx:this.chart.ctx,x:this.chart.width/2,y:this.chart.height/2}),this.options.showTooltips&&e.bindEvents(this,this.options.tooltipEvents,function(t){var i="mouseout"!==t.type?this.getSegmentsAtEvent(t):[];e.each(this.segments,function(t){t.restore(["fillColor"])}),e.each(i,function(t){t.fillColor=t.highlightColor}),this.showTooltip(i)}),this.calculateTotal(t),e.each(t,function(t,i){this.addData(t,i,!0)},this),this.render()},getSegmentsAtEvent:function(t){var i=[],s=e.getRelativePosition(t);return e.each(this.segments,function(t){t.inRange(s.x,s.y)&&i.push(t)},this),i},addData:function(t,i,e){var s=i||this.segments.length;this.segments.splice(s,0,new this.SegmentArc({value:t.value,outerRadius:this.options.animateScale?0:this.outerRadius,innerRadius:this.options.animateScale?0:this.outerRadius/100*this.options.percentageInnerCutout,fillColor:t.color,highlightColor:t.highlight||t.color,showStroke:this.options.segmentShowStroke,strokeWidth:this.options.segmentStrokeWidth,strokeColor:this.options.segmentStrokeColor,startAngle:1.5*Math.PI,circumference:this.options.animateRotate?0:this.calculateCircumference(t.value),label:t.label})),e||(this.reflow(),this.update())},calculateCircumference:function(t){return 2*Math.PI*(Math.abs(t)/this.total)},calculateTotal:function(t){this.total=0,e.each(t,function(t){this.total+=Math.abs(t.value)},this)},update:function(){this.calculateTotal(this.segments),e.each(this.activeElements,function(t){t.restore(["fillColor"])}),e.each(this.segments,function(t){t.save()}),this.render()},removeData:function(t){var i=e.isNumber(t)?t:this.segments.length-1;this.segments.splice(i,1),this.reflow(),this.update()},reflow:function(){e.extend(this.SegmentArc.prototype,{x:this.chart.width/2,y:this.chart.height/2}),this.outerRadius=(e.min([this.chart.width,this.chart.height])-this.options.segmentStrokeWidth/2)/2,e.each(this.segments,function(t){t.update({outerRadius:this.outerRadius,innerRadius:this.outerRadius/100*this.options.percentageInnerCutout})},this)},draw:function(t){var i=t?t:1;this.clear(),e.each(this.segments,function(t,e){t.transition({circumference:this.calculateCircumference(t.value),outerRadius:this.outerRadius,innerRadius:this.outerRadius/100*this.options.percentageInnerCutout},i),t.endAngle=t.startAngle+t.circumference,t.draw(),0===e&&(t.startAngle=1.5*Math.PI),e<this.segments.length-1&&(this.segments[e+1].startAngle=t.endAngle)},this)}}),i.types.Doughnut.extend({name:"Pie",defaults:e.merge(s,{percentageInnerCutout:0})})}.call(this),function(){"use strict";var t=this,i=t.Chart,e=i.helpers,s={scaleShowGridLines:!0,scaleGridLineColor:"rgba(0,0,0,.05)",scaleGridLineWidth:1,scaleShowHorizontalLines:!0,scaleShowVerticalLines:!0,bezierCurve:!0,bezierCurveTension:.4,pointDot:!0,pointDotRadius:4,pointDotStrokeWidth:1,pointHitDetectionRadius:20,datasetStroke:!0,datasetStrokeWidth:2,datasetFill:!0,legendTemplate:'<ul class="<%=name.toLowerCase()%>-legend"><% for (var i=0; i<datasets.length; i++){%><li><span style="background-color:<%=datasets[i].strokeColor%>"></span><%if(datasets[i].label){%><%=datasets[i].label%><%}%></li><%}%></ul>'};i.Type.extend({name:"Line",defaults:s,initialize:function(t){this.PointClass=i.Point.extend({strokeWidth:this.options.pointDotStrokeWidth,radius:this.options.pointDotRadius,display:this.options.pointDot,hitDetectionRadius:this.options.pointHitDetectionRadius,ctx:this.chart.ctx,inRange:function(t){return Math.pow(t-this.x,2)<Math.pow(this.radius+this.hitDetectionRadius,2)}}),this.datasets=[],this.options.showTooltips&&e.bindEvents(this,this.options.tooltipEvents,function(t){var i="mouseout"!==t.type?this.getPointsAtEvent(t):[];this.eachPoints(function(t){t.restore(["fillColor","strokeColor"])}),e.each(i,function(t){t.fillColor=t.highlightFill,t.strokeColor=t.highlightStroke}),this.showTooltip(i)}),e.each(t.datasets,function(i){var s={label:i.label||null,fillColor:i.fillColor,strokeColor:i.strokeColor,pointColor:i.pointColor,pointStrokeColor:i.pointStrokeColor,points:[]};this.datasets.push(s),e.each(i.data,function(e,n){s.points.push(new this.PointClass({value:e,label:t.labels[n],datasetLabel:i.label,strokeColor:i.pointStrokeColor,fillColor:i.pointColor,highlightFill:i.pointHighlightFill||i.pointColor,highlightStroke:i.pointHighlightStroke||i.pointStrokeColor}))},this),this.buildScale(t.labels),this.eachPoints(function(t,i){e.extend(t,{x:this.scale.calculateX(i),y:this.scale.endPoint}),t.save()},this)},this),this.render()},update:function(){this.scale.update(),e.each(this.activeElements,function(t){t.restore(["fillColor","strokeColor"])}),this.eachPoints(function(t){t.save()}),this.render()},eachPoints:function(t){e.each(this.datasets,function(i){e.each(i.points,t,this)},this)},getPointsAtEvent:function(t){var i=[],s=e.getRelativePosition(t);return e.each(this.datasets,function(t){e.each(t.points,function(t){t.inRange(s.x,s.y)&&i.push(t)})},this),i},buildScale:function(t){var s=this,n=function(){var t=[];return s.eachPoints(function(i){t.push(i.value)}),t},o={templateString:this.options.scaleLabel,height:this.chart.height,width:this.chart.width,ctx:this.chart.ctx,textColor:this.options.scaleFontColor,fontSize:this.options.scaleFontSize,fontStyle:this.options.scaleFontStyle,fontFamily:this.options.scaleFontFamily,valuesCount:t.length,beginAtZero:this.options.scaleBeginAtZero,integersOnly:this.options.scaleIntegersOnly,calculateYRange:function(t){var i=e.calculateScaleRange(n(),t,this.fontSize,this.beginAtZero,this.integersOnly);e.extend(this,i)},xLabels:t,font:e.fontString(this.options.scaleFontSize,this.options.scaleFontStyle,this.options.scaleFontFamily),lineWidth:this.options.scaleLineWidth,lineColor:this.options.scaleLineColor,showHorizontalLines:this.options.scaleShowHorizontalLines,showVerticalLines:this.options.scaleShowVerticalLines,gridLineWidth:this.options.scaleShowGridLines?this.options.scaleGridLineWidth:0,gridLineColor:this.options.scaleShowGridLines?this.options.scaleGridLineColor:"rgba(0,0,0,0)",padding:this.options.showScale?0:this.options.pointDotRadius+this.options.pointDotStrokeWidth,showLabels:this.options.scaleShowLabels,display:this.options.showScale};this.options.scaleOverride&&e.extend(o,{calculateYRange:e.noop,steps:this.options.scaleSteps,stepValue:this.options.scaleStepWidth,min:this.options.scaleStartValue,max:this.options.scaleStartValue+this.options.scaleSteps*this.options.scaleStepWidth}),this.scale=new i.Scale(o)},addData:function(t,i){e.each(t,function(t,e){this.datasets[e].points.push(new this.PointClass({value:t,label:i,x:this.scale.calculateX(this.scale.valuesCount+1),y:this.scale.endPoint,strokeColor:this.datasets[e].pointStrokeColor,fillColor:this.datasets[e].pointColor}))},this),this.scale.addXLabel(i),this.update()},removeData:function(){this.scale.removeXLabel(),e.each(this.datasets,function(t){t.points.shift()},this),this.update()},reflow:function(){var t=e.extend({height:this.chart.height,width:this.chart.width});this.scale.update(t)},draw:function(t){var i=t||1;this.clear();var s=this.chart.ctx,n=function(t){return null!==t.value},o=function(t,i,s){return e.findNextWhere(i,n,s)||t},a=function(t,i,s){return e.findPreviousWhere(i,n,s)||t};this.scale.draw(i),e.each(this.datasets,function(t){var h=e.where(t.points,n);e.each(t.points,function(t,e){t.hasValue()&&t.transition({y:this.scale.calculateY(t.value),x:this.scale.calculateX(e)},i)},this),this.options.bezierCurve&&e.each(h,function(t,i){var s=i>0&&i<h.length-1?this.options.bezierCurveTension:0;t.controlPoints=e.splineCurve(a(t,h,i),t,o(t,h,i),s),t.controlPoints.outer.y>this.scale.endPoint?t.controlPoints.outer.y=this.scale.endPoint:t.controlPoints.outer.y<this.scale.startPoint&&(t.controlPoints.outer.y=this.scale.startPoint),t.controlPoints.inner.y>this.scale.endPoint?t.controlPoints.inner.y=this.scale.endPoint:t.controlPoints.inner.y<this.scale.startPoint&&(t.controlPoints.inner.y=this.scale.startPoint)},this),s.lineWidth=this.options.datasetStrokeWidth,s.strokeStyle=t.strokeColor,s.beginPath(),e.each(h,function(t,i){if(0===i)s.moveTo(t.x,t.y);else if(this.options.bezierCurve){var e=a(t,h,i);s.bezierCurveTo(e.controlPoints.outer.x,e.controlPoints.outer.y,t.controlPoints.inner.x,t.controlPoints.inner.y,t.x,t.y)}else s.lineTo(t.x,t.y)},this),s.stroke(),this.options.datasetFill&&h.length>0&&(s.lineTo(h[h.length-1].x,this.scale.endPoint),s.lineTo(h[0].x,this.scale.endPoint),s.fillStyle=t.fillColor,s.closePath(),s.fill()),e.each(h,function(t){t.draw()})},this)}})}.call(this),function(){"use strict";var t=this,i=t.Chart,e=i.helpers,s={scaleShowLabelBackdrop:!0,scaleBackdropColor:"rgba(255,255,255,0.75)",scaleBeginAtZero:!0,scaleBackdropPaddingY:2,scaleBackdropPaddingX:2,scaleShowLine:!0,segmentShowStroke:!0,segmentStrokeColor:"#fff",segmentStrokeWidth:2,animationSteps:100,animationEasing:"easeOutBounce",animateRotate:!0,animateScale:!1,legendTemplate:'<ul class="<%=name.toLowerCase()%>-legend"><% for (var i=0; i<segments.length; i++){%><li><span style="background-color:<%=segments[i].fillColor%>"></span><%if(segments[i].label){%><%=segments[i].label%><%}%></li><%}%></ul>'};i.Type.extend({name:"PolarArea",defaults:s,initialize:function(t){this.segments=[],this.SegmentArc=i.Arc.extend({showStroke:this.options.segmentShowStroke,strokeWidth:this.options.segmentStrokeWidth,strokeColor:this.options.segmentStrokeColor,ctx:this.chart.ctx,innerRadius:0,x:this.chart.width/2,y:this.chart.height/2}),this.scale=new i.RadialScale({display:this.options.showScale,fontStyle:this.options.scaleFontStyle,fontSize:this.options.scaleFontSize,fontFamily:this.options.scaleFontFamily,fontColor:this.options.scaleFontColor,showLabels:this.options.scaleShowLabels,showLabelBackdrop:this.options.scaleShowLabelBackdrop,backdropColor:this.options.scaleBackdropColor,backdropPaddingY:this.options.scaleBackdropPaddingY,backdropPaddingX:this.options.scaleBackdropPaddingX,lineWidth:this.options.scaleShowLine?this.options.scaleLineWidth:0,lineColor:this.options.scaleLineColor,lineArc:!0,width:this.chart.width,height:this.chart.height,xCenter:this.chart.width/2,yCenter:this.chart.height/2,ctx:this.chart.ctx,templateString:this.options.scaleLabel,valuesCount:t.length}),this.updateScaleRange(t),this.scale.update(),e.each(t,function(t,i){this.addData(t,i,!0)},this),this.options.showTooltips&&e.bindEvents(this,this.options.tooltipEvents,function(t){var i="mouseout"!==t.type?this.getSegmentsAtEvent(t):[];e.each(this.segments,function(t){t.restore(["fillColor"])}),e.each(i,function(t){t.fillColor=t.highlightColor}),this.showTooltip(i)}),this.render()},getSegmentsAtEvent:function(t){var i=[],s=e.getRelativePosition(t);return e.each(this.segments,function(t){t.inRange(s.x,s.y)&&i.push(t)},this),i},addData:function(t,i,e){var s=i||this.segments.length;this.segments.splice(s,0,new this.SegmentArc({fillColor:t.color,highlightColor:t.highlight||t.color,label:t.label,value:t.value,outerRadius:this.options.animateScale?0:this.scale.calculateCenterOffset(t.value),circumference:this.options.animateRotate?0:this.scale.getCircumference(),startAngle:1.5*Math.PI})),e||(this.reflow(),this.update())},removeData:function(t){var i=e.isNumber(t)?t:this.segments.length-1;this.segments.splice(i,1),this.reflow(),this.update()},calculateTotal:function(t){this.total=0,e.each(t,function(t){this.total+=t.value},this),this.scale.valuesCount=this.segments.length},updateScaleRange:function(t){var i=[];e.each(t,function(t){i.push(t.value)});var s=this.options.scaleOverride?{steps:this.options.scaleSteps,stepValue:this.options.scaleStepWidth,min:this.options.scaleStartValue,max:this.options.scaleStartValue+this.options.scaleSteps*this.options.scaleStepWidth}:e.calculateScaleRange(i,e.min([this.chart.width,this.chart.height])/2,this.options.scaleFontSize,this.options.scaleBeginAtZero,this.options.scaleIntegersOnly);e.extend(this.scale,s,{size:e.min([this.chart.width,this.chart.height]),xCenter:this.chart.width/2,yCenter:this.chart.height/2})},update:function(){this.calculateTotal(this.segments),e.each(this.segments,function(t){t.save()}),this.reflow(),this.render()},reflow:function(){e.extend(this.SegmentArc.prototype,{x:this.chart.width/2,y:this.chart.height/2}),this.updateScaleRange(this.segments),this.scale.update(),e.extend(this.scale,{xCenter:this.chart.width/2,yCenter:this.chart.height/2}),e.each(this.segments,function(t){t.update({outerRadius:this.scale.calculateCenterOffset(t.value)})},this)},draw:function(t){var i=t||1;this.clear(),e.each(this.segments,function(t,e){t.transition({circumference:this.scale.getCircumference(),outerRadius:this.scale.calculateCenterOffset(t.value)},i),t.endAngle=t.startAngle+t.circumference,0===e&&(t.startAngle=1.5*Math.PI),e<this.segments.length-1&&(this.segments[e+1].startAngle=t.endAngle),t.draw()},this),this.scale.draw()}})}.call(this),function(){"use strict";var t=this,i=t.Chart,e=i.helpers;i.Type.extend({name:"Radar",defaults:{scaleShowLine:!0,angleShowLineOut:!0,scaleShowLabels:!1,scaleBeginAtZero:!0,angleLineColor:"rgba(0,0,0,.1)",angleLineWidth:1,pointLabelFontFamily:"'Arial'",pointLabelFontStyle:"normal",pointLabelFontSize:10,pointLabelFontColor:"#666",pointDot:!0,pointDotRadius:3,pointDotStrokeWidth:1,pointHitDetectionRadius:20,datasetStroke:!0,datasetStrokeWidth:2,datasetFill:!0,legendTemplate:'<ul class="<%=name.toLowerCase()%>-legend"><% for (var i=0; i<datasets.length; i++){%><li><span style="background-color:<%=datasets[i].strokeColor%>"></span><%if(datasets[i].label){%><%=datasets[i].label%><%}%></li><%}%></ul>'},initialize:function(t){this.PointClass=i.Point.extend({strokeWidth:this.options.pointDotStrokeWidth,radius:this.options.pointDotRadius,display:this.options.pointDot,hitDetectionRadius:this.options.pointHitDetectionRadius,ctx:this.chart.ctx}),this.datasets=[],this.buildScale(t),this.options.showTooltips&&e.bindEvents(this,this.options.tooltipEvents,function(t){var i="mouseout"!==t.type?this.getPointsAtEvent(t):[];this.eachPoints(function(t){t.restore(["fillColor","strokeColor"])}),e.each(i,function(t){t.fillColor=t.highlightFill,t.strokeColor=t.highlightStroke}),this.showTooltip(i)}),e.each(t.datasets,function(i){var s={label:i.label||null,fillColor:i.fillColor,strokeColor:i.strokeColor,pointColor:i.pointColor,pointStrokeColor:i.pointStrokeColor,points:[]};this.datasets.push(s),e.each(i.data,function(e,n){var o;this.scale.animation||(o=this.scale.getPointPosition(n,this.scale.calculateCenterOffset(e))),s.points.push(new this.PointClass({value:e,label:t.labels[n],datasetLabel:i.label,x:this.options.animation?this.scale.xCenter:o.x,y:this.options.animation?this.scale.yCenter:o.y,strokeColor:i.pointStrokeColor,fillColor:i.pointColor,highlightFill:i.pointHighlightFill||i.pointColor,highlightStroke:i.pointHighlightStroke||i.pointStrokeColor}))},this)},this),this.render()},eachPoints:function(t){e.each(this.datasets,function(i){e.each(i.points,t,this)},this)},getPointsAtEvent:function(t){var i=e.getRelativePosition(t),s=e.getAngleFromPoint({x:this.scale.xCenter,y:this.scale.yCenter},i),n=2*Math.PI/this.scale.valuesCount,o=Math.round((s.angle-1.5*Math.PI)/n),a=[];return(o>=this.scale.valuesCount||0>o)&&(o=0),s.distance<=this.scale.drawingArea&&e.each(this.datasets,function(t){a.push(t.points[o])}),a},buildScale:function(t){this.scale=new i.RadialScale({display:this.options.showScale,fontStyle:this.options.scaleFontStyle,fontSize:this.options.scaleFontSize,fontFamily:this.options.scaleFontFamily,fontColor:this.options.scaleFontColor,showLabels:this.options.scaleShowLabels,showLabelBackdrop:this.options.scaleShowLabelBackdrop,backdropColor:this.options.scaleBackdropColor,backdropPaddingY:this.options.scaleBackdropPaddingY,backdropPaddingX:this.options.scaleBackdropPaddingX,lineWidth:this.options.scaleShowLine?this.options.scaleLineWidth:0,lineColor:this.options.scaleLineColor,angleLineColor:this.options.angleLineColor,angleLineWidth:this.options.angleShowLineOut?this.options.angleLineWidth:0,pointLabelFontColor:this.options.pointLabelFontColor,pointLabelFontSize:this.options.pointLabelFontSize,pointLabelFontFamily:this.options.pointLabelFontFamily,pointLabelFontStyle:this.options.pointLabelFontStyle,height:this.chart.height,width:this.chart.width,xCenter:this.chart.width/2,yCenter:this.chart.height/2,ctx:this.chart.ctx,templateString:this.options.scaleLabel,labels:t.labels,valuesCount:t.datasets[0].data.length}),this.scale.setScaleSize(),this.updateScaleRange(t.datasets),this.scale.buildYLabels()},updateScaleRange:function(t){var i=function(){var i=[];return e.each(t,function(t){t.data?i=i.concat(t.data):e.each(t.points,function(t){i.push(t.value)})}),i}(),s=this.options.scaleOverride?{steps:this.options.scaleSteps,stepValue:this.options.scaleStepWidth,min:this.options.scaleStartValue,max:this.options.scaleStartValue+this.options.scaleSteps*this.options.scaleStepWidth}:e.calculateScaleRange(i,e.min([this.chart.width,this.chart.height])/2,this.options.scaleFontSize,this.options.scaleBeginAtZero,this.options.scaleIntegersOnly);e.extend(this.scale,s)},addData:function(t,i){this.scale.valuesCount++,e.each(t,function(t,e){var s=this.scale.getPointPosition(this.scale.valuesCount,this.scale.calculateCenterOffset(t));this.datasets[e].points.push(new this.PointClass({value:t,label:i,x:s.x,y:s.y,strokeColor:this.datasets[e].pointStrokeColor,fillColor:this.datasets[e].pointColor}))},this),this.scale.labels.push(i),this.reflow(),this.update()},removeData:function(){this.scale.valuesCount--,this.scale.labels.shift(),e.each(this.datasets,function(t){t.points.shift()},this),this.reflow(),this.update()},update:function(){this.eachPoints(function(t){t.save()}),this.reflow(),this.render()},reflow:function(){e.extend(this.scale,{width:this.chart.width,height:this.chart.height,size:e.min([this.chart.width,this.chart.height]),xCenter:this.chart.width/2,yCenter:this.chart.height/2}),this.updateScaleRange(this.datasets),this.scale.setScaleSize(),this.scale.buildYLabels()},draw:function(t){var i=t||1,s=this.chart.ctx;this.clear(),this.scale.draw(),e.each(this.datasets,function(t){e.each(t.points,function(t,e){t.hasValue()&&t.transition(this.scale.getPointPosition(e,this.scale.calculateCenterOffset(t.value)),i)},this),s.lineWidth=this.options.datasetStrokeWidth,s.strokeStyle=t.strokeColor,s.beginPath(),e.each(t.points,function(t,i){0===i?s.moveTo(t.x,t.y):s.lineTo(t.x,t.y)},this),s.closePath(),s.stroke(),s.fillStyle=t.fillColor,s.fill(),e.each(t.points,function(t){t.hasValue()&&t.draw()})},this)}})}.call(this);
\ No newline at end of file
diff --git a/applications/auto-scale/gui/src/vendor/Chart.js/LICENSE.md b/applications/auto-scale/gui/src/vendor/Chart.js/LICENSE.md
deleted file mode 100644
index e10bc0f..0000000
--- a/applications/auto-scale/gui/src/vendor/Chart.js/LICENSE.md
+++ /dev/null
@@ -1,7 +0,0 @@
-Copyright (c) 2013-2015 Nick Downie
-
-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.
diff --git a/applications/auto-scale/gui/src/vendor/Chart.js/README.md b/applications/auto-scale/gui/src/vendor/Chart.js/README.md
deleted file mode 100644
index 7c4fa8b..0000000
--- a/applications/auto-scale/gui/src/vendor/Chart.js/README.md
+++ /dev/null
@@ -1,20 +0,0 @@
-# Chart.js
-
-[](https://travis-ci.org/nnnick/Chart.js) [](https://codeclimate.com/github/nnnick/Chart.js)
-
-
-*Simple HTML5 Charts using the canvas element* [chartjs.org](http://www.chartjs.org)
-
-## Documentation
-
-You can find documentation at [chartjs.org/docs](http://www.chartjs.org/docs/). The markdown files that build the site are available under `/docs`. Please note - in some of the json examples of configuration you might notice some liquid tags - this is just for the generating the site html, please disregard.
-
-## Bugs, issues and contributing
-
-Before submitting an issue or a pull request to the project, please take a moment to look over the [contributing guidelines](https://github.com/nnnick/Chart.js/blob/master/CONTRIBUTING.md) first.
-
-For support using Chart.js, please post questions with the [`chartjs` tag on Stack Overflow](http://stackoverflow.com/questions/tagged/chartjs).
-
-## License
-
-Chart.js is available under the [MIT license](http://opensource.org/licenses/MIT).
diff --git a/applications/auto-scale/gui/src/vendor/Chart.js/bower.json b/applications/auto-scale/gui/src/vendor/Chart.js/bower.json
deleted file mode 100644
index f26f81e..0000000
--- a/applications/auto-scale/gui/src/vendor/Chart.js/bower.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
- "name": "Chart.js",
- "version": "1.0.2",
- "description": "Simple HTML5 Charts using the canvas element",
- "homepage": "https://github.com/nnnick/Chart.js",
- "author": "nnnick",
- "main": [
- "Chart.js"
- ],
- "dependencies": {}
-}
\ No newline at end of file
diff --git a/applications/auto-scale/gui/src/vendor/Chart.js/docs/00-Getting-Started.md b/applications/auto-scale/gui/src/vendor/Chart.js/docs/00-Getting-Started.md
deleted file mode 100644
index 273b10f..0000000
--- a/applications/auto-scale/gui/src/vendor/Chart.js/docs/00-Getting-Started.md
+++ /dev/null
@@ -1,203 +0,0 @@
----
-title: Getting started
-anchor: getting-started
----
-
-###Include Chart.js
-
-First we need to include the Chart.js library on the page. The library occupies a global variable of `Chart`.
-
-```html
-<script src="Chart.js"></script>
-```
-
-Alternatively, if you're using an AMD loader for JavaScript modules, that is also supported in the Chart.js core. Please note: the library will still occupy a global variable of `Chart`, even if it detects `define` and `define.amd`. If this is a problem, you can call `noConflict` to restore the global Chart variable to it's previous owner.
-
-```javascript
-// Using requirejs
-require(['path/to/Chartjs'], function(Chart){
- // Use Chart.js as normal here.
-
- // Chart.noConflict restores the Chart global variable to it's previous owner
- // The function returns what was previously Chart, allowing you to reassign.
- var Chartjs = Chart.noConflict();
-
-});
-```
-
-You can also grab Chart.js using bower:
-
-```bash
-bower install Chart.js --save
-```
-
-###Creating a chart
-
-To create a chart, we need to instantiate the `Chart` class. To do this, we need to pass in the 2d context of where we want to draw the chart. Here's an example.
-
-```html
-<canvas id="myChart" width="400" height="400"></canvas>
-```
-
-```javascript
-// Get the context of the canvas element we want to select
-var ctx = document.getElementById("myChart").getContext("2d");
-var myNewChart = new Chart(ctx).PolarArea(data);
-```
-
-We can also get the context of our canvas with jQuery. To do this, we need to get the DOM node out of the jQuery collection, and call the `getContext("2d")` method on that.
-
-```javascript
-// Get context with jQuery - using jQuery's .get() method.
-var ctx = $("#myChart").get(0).getContext("2d");
-// This will get the first returned node in the jQuery collection.
-var myNewChart = new Chart(ctx);
-```
-
-After we've instantiated the Chart class on the canvas we want to draw on, Chart.js will handle the scaling for retina displays.
-
-With the Chart class set up, we can go on to create one of the charts Chart.js has available. In the example below, we would be drawing a Polar area chart.
-
-```javascript
-new Chart(ctx).PolarArea(data, options);
-```
-
-We call a method of the name of the chart we want to create. We pass in the data for that chart type, and the options for that chart as parameters. Chart.js will merge the global defaults with chart type specific defaults, then merge any options passed in as a second argument after data.
-
-###Global chart configuration
-
-This concept was introduced in Chart.js 1.0 to keep configuration DRY, and allow for changing options globally across chart types, avoiding the need to specify options for each instance, or the default for a particular chart type.
-
-```javascript
-Chart.defaults.global = {
- // Boolean - Whether to animate the chart
- animation: true,
-
- // Number - Number of animation steps
- animationSteps: 60,
-
- // String - Animation easing effect
- animationEasing: "easeOutQuart",
-
- // Boolean - If we should show the scale at all
- showScale: true,
-
- // Boolean - If we want to override with a hard coded scale
- scaleOverride: false,
-
- // ** Required if scaleOverride is true **
- // Number - The number of steps in a hard coded scale
- scaleSteps: null,
- // Number - The value jump in the hard coded scale
- scaleStepWidth: null,
- // Number - The scale starting value
- scaleStartValue: null,
-
- // String - Colour of the scale line
- scaleLineColor: "rgba(0,0,0,.1)",
-
- // Number - Pixel width of the scale line
- scaleLineWidth: 1,
-
- // Boolean - Whether to show labels on the scale
- scaleShowLabels: true,
-
- // Interpolated JS string - can access value
- scaleLabel: "<%=value%>",
-
- // Boolean - Whether the scale should stick to integers, not floats even if drawing space is there
- scaleIntegersOnly: true,
-
- // Boolean - Whether the scale should start at zero, or an order of magnitude down from the lowest value
- scaleBeginAtZero: false,
-
- // String - Scale label font declaration for the scale label
- scaleFontFamily: "'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",
-
- // Number - Scale label font size in pixels
- scaleFontSize: 12,
-
- // String - Scale label font weight style
- scaleFontStyle: "normal",
-
- // String - Scale label font colour
- scaleFontColor: "#666",
-
- // Boolean - whether or not the chart should be responsive and resize when the browser does.
- responsive: false,
-
- // Boolean - whether to maintain the starting aspect ratio or not when responsive, if set to false, will take up entire container
- maintainAspectRatio: true,
-
- // Boolean - Determines whether to draw tooltips on the canvas or not
- showTooltips: true,
-
- // Function - Determines whether to execute the customTooltips function instead of drawing the built in tooltips (See [Advanced - External Tooltips](#advanced-usage-custom-tooltips))
- customTooltips: false,
-
- // Array - Array of string names to attach tooltip events
- tooltipEvents: ["mousemove", "touchstart", "touchmove"],
-
- // String - Tooltip background colour
- tooltipFillColor: "rgba(0,0,0,0.8)",
-
- // String - Tooltip label font declaration for the scale label
- tooltipFontFamily: "'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",
-
- // Number - Tooltip label font size in pixels
- tooltipFontSize: 14,
-
- // String - Tooltip font weight style
- tooltipFontStyle: "normal",
-
- // String - Tooltip label font colour
- tooltipFontColor: "#fff",
-
- // String - Tooltip title font declaration for the scale label
- tooltipTitleFontFamily: "'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",
-
- // Number - Tooltip title font size in pixels
- tooltipTitleFontSize: 14,
-
- // String - Tooltip title font weight style
- tooltipTitleFontStyle: "bold",
-
- // String - Tooltip title font colour
- tooltipTitleFontColor: "#fff",
-
- // Number - pixel width of padding around tooltip text
- tooltipYPadding: 6,
-
- // Number - pixel width of padding around tooltip text
- tooltipXPadding: 6,
-
- // Number - Size of the caret on the tooltip
- tooltipCaretSize: 8,
-
- // Number - Pixel radius of the tooltip border
- tooltipCornerRadius: 6,
-
- // Number - Pixel offset from point x to tooltip edge
- tooltipXOffset: 10,
- {% raw %}
- // String - Template string for single tooltips
- tooltipTemplate: "<%if (label){%><%=label%>: <%}%><%= value %>",
- {% endraw %}
- // String - Template string for multiple tooltips
- multiTooltipTemplate: "<%= value %>",
-
- // Function - Will fire on animation progression.
- onAnimationProgress: function(){},
-
- // Function - Will fire on animation completion.
- onAnimationComplete: function(){}
-}
-```
-
-If for example, you wanted all charts created to be responsive, and resize when the browser window does, the following setting can be changed:
-
-```javascript
-Chart.defaults.global.responsive = true;
-```
-
-Now, every time we create a chart, `options.responsive` will be `true`.
diff --git a/applications/auto-scale/gui/src/vendor/Chart.js/docs/01-Line-Chart.md b/applications/auto-scale/gui/src/vendor/Chart.js/docs/01-Line-Chart.md
deleted file mode 100644
index 1a5ae84..0000000
--- a/applications/auto-scale/gui/src/vendor/Chart.js/docs/01-Line-Chart.md
+++ /dev/null
@@ -1,166 +0,0 @@
----
-title: Line Chart
-anchor: line-chart
----
-###Introduction
-A line chart is a way of plotting data points on a line.
-
-Often, it is used to show trend data, and the comparison of two data sets.
-
-<div class="canvas-holder">
- <canvas width="250" height="125"></canvas>
-</div>
-
-###Example usage
-```javascript
-var myLineChart = new Chart(ctx).Line(data, options);
-```
-###Data structure
-
-```javascript
-var data = {
- labels: ["January", "February", "March", "April", "May", "June", "July"],
- datasets: [
- {
- label: "My First dataset",
- fillColor: "rgba(220,220,220,0.2)",
- strokeColor: "rgba(220,220,220,1)",
- pointColor: "rgba(220,220,220,1)",
- pointStrokeColor: "#fff",
- pointHighlightFill: "#fff",
- pointHighlightStroke: "rgba(220,220,220,1)",
- data: [65, 59, 80, 81, 56, 55, 40]
- },
- {
- label: "My Second dataset",
- fillColor: "rgba(151,187,205,0.2)",
- strokeColor: "rgba(151,187,205,1)",
- pointColor: "rgba(151,187,205,1)",
- pointStrokeColor: "#fff",
- pointHighlightFill: "#fff",
- pointHighlightStroke: "rgba(151,187,205,1)",
- data: [28, 48, 40, 19, 86, 27, 90]
- }
- ]
-};
-```
-
-The line chart requires an array of labels for each of the data points. This is shown on the X axis.
-The data for line charts is broken up into an array of datasets. Each dataset has a colour for the fill, a colour for the line and colours for the points and strokes of the points. These colours are strings just like CSS. You can use RGBA, RGB, HEX or HSL notation.
-
-The label key on each dataset is optional, and can be used when generating a scale for the chart.
-
-### Chart options
-
-These are the customisation options specific to Line charts. These options are merged with the [global chart configuration options](#getting-started-global-chart-configuration), and form the options of the chart.
-
-```javascript
-{
-
- ///Boolean - Whether grid lines are shown across the chart
- scaleShowGridLines : true,
-
- //String - Colour of the grid lines
- scaleGridLineColor : "rgba(0,0,0,.05)",
-
- //Number - Width of the grid lines
- scaleGridLineWidth : 1,
-
- //Boolean - Whether to show horizontal lines (except X axis)
- scaleShowHorizontalLines: true,
-
- //Boolean - Whether to show vertical lines (except Y axis)
- scaleShowVerticalLines: true,
-
- //Boolean - Whether the line is curved between points
- bezierCurve : true,
-
- //Number - Tension of the bezier curve between points
- bezierCurveTension : 0.4,
-
- //Boolean - Whether to show a dot for each point
- pointDot : true,
-
- //Number - Radius of each point dot in pixels
- pointDotRadius : 4,
-
- //Number - Pixel width of point dot stroke
- pointDotStrokeWidth : 1,
-
- //Number - amount extra to add to the radius to cater for hit detection outside the drawn point
- pointHitDetectionRadius : 20,
-
- //Boolean - Whether to show a stroke for datasets
- datasetStroke : true,
-
- //Number - Pixel width of dataset stroke
- datasetStrokeWidth : 2,
-
- //Boolean - Whether to fill the dataset with a colour
- datasetFill : true,
- {% raw %}
- //String - A legend template
- legendTemplate : "<ul class=\"<%=name.toLowerCase()%>-legend\"><% for (var i=0; i<datasets.length; i++){%><li><span style=\"background-color:<%=datasets[i].strokeColor%>\"></span><%if(datasets[i].label){%><%=datasets[i].label%><%}%></li><%}%></ul>"
- {% endraw %}
-};
-```
-
-You can override these for your `Chart` instance by passing a second argument into the `Line` method as an object with the keys you want to override.
-
-For example, we could have a line chart without bezier curves between points by doing the following:
-
-```javascript
-new Chart(ctx).Line(data, {
- bezierCurve: false
-});
-// This will create a chart with all of the default options, merged from the global config,
-// and the Line chart defaults, but this particular instance will have `bezierCurve` set to false.
-```
-
-We can also change these defaults values for each Line type that is created, this object is available at `Chart.defaults.Line`.
-
-
-### Prototype methods
-
-#### .getPointsAtEvent( event )
-
-Calling `getPointsAtEvent(event)` on your Chart instance passing an argument of an event, or jQuery event, will return the point elements that are at that the same position of that event.
-
-```javascript
-canvas.onclick = function(evt){
- var activePoints = myLineChart.getPointsAtEvent(evt);
- // => activePoints is an array of points on the canvas that are at the same position as the click event.
-};
-```
-
-This functionality may be useful for implementing DOM based tooltips, or triggering custom behaviour in your application.
-
-#### .update( )
-
-Calling `update()` on your Chart instance will re-render the chart with any updated values, allowing you to edit the value of multiple existing points, then render those in one animated render loop.
-
-```javascript
-myLineChart.datasets[0].points[2].value = 50;
-// Would update the first dataset's value of 'March' to be 50
-myLineChart.update();
-// Calling update now animates the position of March from 90 to 50.
-```
-
-#### .addData( valuesArray, label )
-
-Calling `addData(valuesArray, label)` on your Chart instance passing an array of values for each dataset, along with a label for those points.
-
-```javascript
-// The values array passed into addData should be one for each dataset in the chart
-myLineChart.addData([40, 60], "August");
-// This new data will now animate at the end of the chart.
-```
-
-#### .removeData( )
-
-Calling `removeData()` on your Chart instance will remove the first value for all datasets on the chart.
-
-```javascript
-myLineChart.removeData();
-// The chart will remove the first point and animate other points into place
-```
diff --git a/applications/auto-scale/gui/src/vendor/Chart.js/docs/02-Bar-Chart.md b/applications/auto-scale/gui/src/vendor/Chart.js/docs/02-Bar-Chart.md
deleted file mode 100644
index cc23f38..0000000
--- a/applications/auto-scale/gui/src/vendor/Chart.js/docs/02-Bar-Chart.md
+++ /dev/null
@@ -1,149 +0,0 @@
----
-title: Bar Chart
-anchor: bar-chart
----
-
-### Introduction
-A bar chart is a way of showing data as bars.
-
-It is sometimes used to show trend data, and the comparison of multiple data sets side by side.
-
-<div class="canvas-holder">
- <canvas width="250" height="125"></canvas>
-</div>
-
-### Example usage
-```javascript
-var myBarChart = new Chart(ctx).Bar(data, options);
-```
-
-### Data structure
-
-```javascript
-var data = {
- labels: ["January", "February", "March", "April", "May", "June", "July"],
- datasets: [
- {
- label: "My First dataset",
- fillColor: "rgba(220,220,220,0.5)",
- strokeColor: "rgba(220,220,220,0.8)",
- highlightFill: "rgba(220,220,220,0.75)",
- highlightStroke: "rgba(220,220,220,1)",
- data: [65, 59, 80, 81, 56, 55, 40]
- },
- {
- label: "My Second dataset",
- fillColor: "rgba(151,187,205,0.5)",
- strokeColor: "rgba(151,187,205,0.8)",
- highlightFill: "rgba(151,187,205,0.75)",
- highlightStroke: "rgba(151,187,205,1)",
- data: [28, 48, 40, 19, 86, 27, 90]
- }
- ]
-};
-```
-The bar chart has the a very similar data structure to the line chart, and has an array of datasets, each with colours and an array of data. Again, colours are in CSS format.
-We have an array of labels too for display. In the example, we are showing the same data as the previous line chart example.
-
-The label key on each dataset is optional, and can be used when generating a scale for the chart.
-
-### Chart Options
-
-These are the customisation options specific to Bar charts. These options are merged with the [global chart configuration options](#getting-started-global-chart-configuration), and form the options of the chart.
-
-```javascript
-{
- //Boolean - Whether the scale should start at zero, or an order of magnitude down from the lowest value
- scaleBeginAtZero : true,
-
- //Boolean - Whether grid lines are shown across the chart
- scaleShowGridLines : true,
-
- //String - Colour of the grid lines
- scaleGridLineColor : "rgba(0,0,0,.05)",
-
- //Number - Width of the grid lines
- scaleGridLineWidth : 1,
-
- //Boolean - Whether to show horizontal lines (except X axis)
- scaleShowHorizontalLines: true,
-
- //Boolean - Whether to show vertical lines (except Y axis)
- scaleShowVerticalLines: true,
-
- //Boolean - If there is a stroke on each bar
- barShowStroke : true,
-
- //Number - Pixel width of the bar stroke
- barStrokeWidth : 2,
-
- //Number - Spacing between each of the X value sets
- barValueSpacing : 5,
-
- //Number - Spacing between data sets within X values
- barDatasetSpacing : 1,
- {% raw %}
- //String - A legend template
- legendTemplate : "<ul class=\"<%=name.toLowerCase()%>-legend\"><% for (var i=0; i<datasets.length; i++){%><li><span style=\"background-color:<%=datasets[i].fillColor%>\"></span><%if(datasets[i].label){%><%=datasets[i].label%><%}%></li><%}%></ul>"
- {% endraw %}
-}
-```
-
-You can override these for your `Chart` instance by passing a second argument into the `Bar` method as an object with the keys you want to override.
-
-For example, we could have a bar chart without a stroke on each bar by doing the following:
-
-```javascript
-new Chart(ctx).Bar(data, {
- barShowStroke: false
-});
-// This will create a chart with all of the default options, merged from the global config,
-// and the Bar chart defaults but this particular instance will have `barShowStroke` set to false.
-```
-
-We can also change these defaults values for each Bar type that is created, this object is available at `Chart.defaults.Bar`.
-
-### Prototype methods
-
-#### .getBarsAtEvent( event )
-
-Calling `getBarsAtEvent(event)` on your Chart instance passing an argument of an event, or jQuery event, will return the bar elements that are at that the same position of that event.
-
-```javascript
-canvas.onclick = function(evt){
- var activeBars = myBarChart.getBarsAtEvent(evt);
- // => activeBars is an array of bars on the canvas that are at the same position as the click event.
-};
-```
-
-This functionality may be useful for implementing DOM based tooltips, or triggering custom behaviour in your application.
-
-#### .update( )
-
-Calling `update()` on your Chart instance will re-render the chart with any updated values, allowing you to edit the value of multiple existing points, then render those in one animated render loop.
-
-```javascript
-myBarChart.datasets[0].bars[2].value = 50;
-// Would update the first dataset's value of 'March' to be 50
-myBarChart.update();
-// Calling update now animates the position of March from 90 to 50.
-```
-
-#### .addData( valuesArray, label )
-
-Calling `addData(valuesArray, label)` on your Chart instance passing an array of values for each dataset, along with a label for those bars.
-
-```javascript
-// The values array passed into addData should be one for each dataset in the chart
-myBarChart.addData([40, 60], "August");
-// The new data will now animate at the end of the chart.
-```
-
-#### .removeData( )
-
-Calling `removeData()` on your Chart instance will remove the first value for all datasets on the chart.
-
-```javascript
-myBarChart.removeData();
-// The chart will now animate and remove the first bar
-```
diff --git a/applications/auto-scale/gui/src/vendor/Chart.js/docs/03-Radar-Chart.md b/applications/auto-scale/gui/src/vendor/Chart.js/docs/03-Radar-Chart.md
deleted file mode 100644
index 03dcf6e..0000000
--- a/applications/auto-scale/gui/src/vendor/Chart.js/docs/03-Radar-Chart.md
+++ /dev/null
@@ -1,177 +0,0 @@
----
-title: Radar Chart
-anchor: radar-chart
----
-
-###Introduction
-A radar chart is a way of showing multiple data points and the variation between them.
-
-They are often useful for comparing the points of two or more different data sets.
-
-<div class="canvas-holder">
- <canvas width="250" height="125"></canvas>
-</div>
-
-###Example usage
-
-```javascript
-var myRadarChart = new Chart(ctx).Radar(data, options);
-```
-
-###Data structure
-```javascript
-var data = {
- labels: ["Eating", "Drinking", "Sleeping", "Designing", "Coding", "Cycling", "Running"],
- datasets: [
- {
- label: "My First dataset",
- fillColor: "rgba(220,220,220,0.2)",
- strokeColor: "rgba(220,220,220,1)",
- pointColor: "rgba(220,220,220,1)",
- pointStrokeColor: "#fff",
- pointHighlightFill: "#fff",
- pointHighlightStroke: "rgba(220,220,220,1)",
- data: [65, 59, 90, 81, 56, 55, 40]
- },
- {
- label: "My Second dataset",
- fillColor: "rgba(151,187,205,0.2)",
- strokeColor: "rgba(151,187,205,1)",
- pointColor: "rgba(151,187,205,1)",
- pointStrokeColor: "#fff",
- pointHighlightFill: "#fff",
- pointHighlightStroke: "rgba(151,187,205,1)",
- data: [28, 48, 40, 19, 96, 27, 100]
- }
- ]
-};
-```
-For a radar chart, to provide context of what each point means, we include an array of strings that show around each point in the chart.
-For the radar chart data, we have an array of datasets. Each of these is an object, with a fill colour, a stroke colour, a colour for the fill of each point, and a colour for the stroke of each point. We also have an array of data values.
-
-The label key on each dataset is optional, and can be used when generating a scale for the chart.
-
-### Chart options
-
-These are the customisation options specific to Radar charts. These options are merged with the [global chart configuration options](#getting-started-global-chart-configuration), and form the options of the chart.
-
-
-```javascript
-{
- //Boolean - Whether to show lines for each scale point
- scaleShowLine : true,
-
- //Boolean - Whether we show the angle lines out of the radar
- angleShowLineOut : true,
-
- //Boolean - Whether to show labels on the scale
- scaleShowLabels : false,
-
- // Boolean - Whether the scale should begin at zero
- scaleBeginAtZero : true,
-
- //String - Colour of the angle line
- angleLineColor : "rgba(0,0,0,.1)",
-
- //Number - Pixel width of the angle line
- angleLineWidth : 1,
-
- //String - Point label font declaration
- pointLabelFontFamily : "'Arial'",
-
- //String - Point label font weight
- pointLabelFontStyle : "normal",
-
- //Number - Point label font size in pixels
- pointLabelFontSize : 10,
-
- //String - Point label font colour
- pointLabelFontColor : "#666",
-
- //Boolean - Whether to show a dot for each point
- pointDot : true,
-
- //Number - Radius of each point dot in pixels
- pointDotRadius : 3,
-
- //Number - Pixel width of point dot stroke
- pointDotStrokeWidth : 1,
-
- //Number - amount extra to add to the radius to cater for hit detection outside the drawn point
- pointHitDetectionRadius : 20,
-
- //Boolean - Whether to show a stroke for datasets
- datasetStroke : true,
-
- //Number - Pixel width of dataset stroke
- datasetStrokeWidth : 2,
-
- //Boolean - Whether to fill the dataset with a colour
- datasetFill : true,
- {% raw %}
- //String - A legend template
- legendTemplate : "<ul class=\"<%=name.toLowerCase()%>-legend\"><% for (var i=0; i<datasets.length; i++){%><li><span style=\"background-color:<%=datasets[i].strokeColor%>\"></span><%if(datasets[i].label){%><%=datasets[i].label%><%}%></li><%}%></ul>"
- {% endraw %}
-}
-```
-
-
-You can override these for your `Chart` instance by passing a second argument into the `Radar` method as an object with the keys you want to override.
-
-For example, we could have a radar chart without a point for each on piece of data by doing the following:
-
-```javascript
-new Chart(ctx).Radar(data, {
- pointDot: false
-});
-// This will create a chart with all of the default options, merged from the global config,
-// and the Bar chart defaults but this particular instance will have `pointDot` set to false.
-```
-
-We can also change these defaults values for each Radar type that is created, this object is available at `Chart.defaults.Radar`.
-
-
-### Prototype methods
-
-#### .getPointsAtEvent( event )
-
-Calling `getPointsAtEvent(event)` on your Chart instance passing an argument of an event, or jQuery event, will return the point elements that are at that the same position of that event.
-
-```javascript
-canvas.onclick = function(evt){
- var activePoints = myRadarChart.getPointsAtEvent(evt);
- // => activePoints is an array of points on the canvas that are at the same position as the click event.
-};
-```
-
-This functionality may be useful for implementing DOM based tooltips, or triggering custom behaviour in your application.
-
-#### .update( )
-
-Calling `update()` on your Chart instance will re-render the chart with any updated values, allowing you to edit the value of multiple existing points, then render those in one animated render loop.
-
-```javascript
-myRadarChart.datasets[0].points[2].value = 50;
-// Would update the first dataset's value of 'Sleeping' to be 50
-myRadarChart.update();
-// Calling update now animates the position of Sleeping from 90 to 50.
-```
-
-#### .addData( valuesArray, label )
-
-Calling `addData(valuesArray, label)` on your Chart instance passing an array of values for each dataset, along with a label for those points.
-
-```javascript
-// The values array passed into addData should be one for each dataset in the chart
-myRadarChart.addData([40, 60], "Dancing");
-// The new data will now animate at the end of the chart.
-```
-
-#### .removeData( )
-
-Calling `removeData()` on your Chart instance will remove the first value for all datasets on the chart.
-
-```javascript
-myRadarChart.removeData();
-// Other points will now animate to their correct positions.
-```
\ No newline at end of file
diff --git a/applications/auto-scale/gui/src/vendor/Chart.js/docs/04-Polar-Area-Chart.md b/applications/auto-scale/gui/src/vendor/Chart.js/docs/04-Polar-Area-Chart.md
deleted file mode 100644
index 658da54..0000000
--- a/applications/auto-scale/gui/src/vendor/Chart.js/docs/04-Polar-Area-Chart.md
+++ /dev/null
@@ -1,172 +0,0 @@
----
-title: Polar Area Chart
-anchor: polar-area-chart
----
-### Introduction
-Polar area charts are similar to pie charts, but each segment has the same angle - the radius of the segment differs depending on the value.
-
-This type of chart is often useful when we want to show a comparison data similar to a pie chart, but also show a scale of values for context.
-
-<div class="canvas-holder">
- <canvas width="250" height="125"></canvas>
-</div>
-
-### Example usage
-
-```javascript
-new Chart(ctx).PolarArea(data, options);
-```
-
-### Data structure
-
-```javascript
-var data = [
- {
- value: 300,
- color:"#F7464A",
- highlight: "#FF5A5E",
- label: "Red"
- },
- {
- value: 50,
- color: "#46BFBD",
- highlight: "#5AD3D1",
- label: "Green"
- },
- {
- value: 100,
- color: "#FDB45C",
- highlight: "#FFC870",
- label: "Yellow"
- },
- {
- value: 40,
- color: "#949FB1",
- highlight: "#A8B3C5",
- label: "Grey"
- },
- {
- value: 120,
- color: "#4D5360",
- highlight: "#616774",
- label: "Dark Grey"
- }
-
-];
-```
-As you can see, for the chart data you pass in an array of objects, with a value and a colour. The value attribute should be a number, while the color attribute should be a string. Similar to CSS, for this string you can use HEX notation, RGB, RGBA or HSL.
-
-### Chart options
-
-These are the customisation options specific to Polar Area charts. These options are merged with the [global chart configuration options](#getting-started-global-chart-configuration), and form the options of the chart.
-
-```javascript
-{
- //Boolean - Show a backdrop to the scale label
- scaleShowLabelBackdrop : true,
-
- //String - The colour of the label backdrop
- scaleBackdropColor : "rgba(255,255,255,0.75)",
-
- // Boolean - Whether the scale should begin at zero
- scaleBeginAtZero : true,
-
- //Number - The backdrop padding above & below the label in pixels
- scaleBackdropPaddingY : 2,
-
- //Number - The backdrop padding to the side of the label in pixels
- scaleBackdropPaddingX : 2,
-
- //Boolean - Show line for each value in the scale
- scaleShowLine : true,
-
- //Boolean - Stroke a line around each segment in the chart
- segmentShowStroke : true,
-
- //String - The colour of the stroke on each segement.
- segmentStrokeColor : "#fff",
-
- //Number - The width of the stroke value in pixels
- segmentStrokeWidth : 2,
-
- //Number - Amount of animation steps
- animationSteps : 100,
-
- //String - Animation easing effect.
- animationEasing : "easeOutBounce",
-
- //Boolean - Whether to animate the rotation of the chart
- animateRotate : true,
-
- //Boolean - Whether to animate scaling the chart from the centre
- animateScale : false,
- {% raw %}
- //String - A legend template
- legendTemplate : "<ul class=\"<%=name.toLowerCase()%>-legend\"><% for (var i=0; i<segments.length; i++){%><li><span style=\"background-color:<%=segments[i].fillColor%>\"></span><%if(segments[i].label){%><%=segments[i].label%><%}%></li><%}%></ul>"
- {% endraw %}
-}
-```
-
-You can override these for your `Chart` instance by passing a second argument into the `PolarArea` method as an object with the keys you want to override.
-
-For example, we could have a polar area chart with a black stroke on each segment like so:
-
-```javascript
-new Chart(ctx).PolarArea(data, {
- segmentStrokeColor: "#000000"
-});
-// This will create a chart with all of the default options, merged from the global config,
-// and the PolarArea chart defaults but this particular instance will have `segmentStrokeColor` set to `"#000000"`.
-```
-
-We can also change these defaults values for each PolarArea type that is created, this object is available at `Chart.defaults.PolarArea`.
-
-### Prototype methods
-
-#### .getSegmentsAtEvent( event )
-
-Calling `getSegmentsAtEvent(event)` on your Chart instance passing an argument of an event, or jQuery event, will return the segment elements that are at that the same position of that event.
-
-```javascript
-canvas.onclick = function(evt){
- var activePoints = myPolarAreaChart.getSegmentsAtEvent(evt);
- // => activePoints is an array of segments on the canvas that are at the same position as the click event.
-};
-```
-
-This functionality may be useful for implementing DOM based tooltips, or triggering custom behaviour in your application.
-
-#### .update( )
-
-Calling `update()` on your Chart instance will re-render the chart with any updated values, allowing you to edit the value of multiple existing points, then render those in one animated render loop.
-
-```javascript
-myPolarAreaChart.segments[1].value = 10;
-// Would update the first dataset's value of 'Green' to be 10
-myPolarAreaChart.update();
-// Calling update now animates the position of Green from 50 to 10.
-```
-
-#### .addData( segmentData, index )
-
-Calling `addData(segmentData, index)` on your Chart instance passing an object in the same format as in the constructor. There is an option second argument of 'index', this determines at what index the new segment should be inserted into the chart.
-
-```javascript
-// An object in the same format as the original data source
-myPolarAreaChart.addData({
- value: 130,
- color: "#B48EAD",
- highlight: "#C69CBE",
- label: "Purple"
-});
-// The new segment will now animate in.
-```
-
-#### .removeData( index )
-
-Calling `removeData(index)` on your Chart instance will remove segment at that particular index. If none is provided, it will default to the last segment.
-
-```javascript
-myPolarAreaChart.removeData();
-// Other segments will update to fill the empty space left.
-```
\ No newline at end of file
diff --git a/applications/auto-scale/gui/src/vendor/Chart.js/docs/05-Pie-Doughnut-Chart.md b/applications/auto-scale/gui/src/vendor/Chart.js/docs/05-Pie-Doughnut-Chart.md
deleted file mode 100644
index dd9de6f..0000000
--- a/applications/auto-scale/gui/src/vendor/Chart.js/docs/05-Pie-Doughnut-Chart.md
+++ /dev/null
@@ -1,158 +0,0 @@
----
-title: Pie & Doughnut Charts
-anchor: doughnut-pie-chart
----
-###Introduction
-Pie and doughnut charts are probably the most commonly used chart there are. They are divided into segments, the arc of each segment shows the proportional value of each piece of data.
-
-They are excellent at showing the relational proportions between data.
-
-Pie and doughnut charts are effectively the same class in Chart.js, but have one different default value - their `percentageInnerCutout`. This equates what percentage of the inner should be cut out. This defaults to `0` for pie charts, and `50` for doughnuts.
-
-They are also registered under two aliases in the `Chart` core. Other than their different default value, and different alias, they are exactly the same.
-
-<div class="canvas-holder half">
- <canvas width="250" height="125"></canvas>
-</div>
-
-<div class="canvas-holder half">
- <canvas width="250" height="125"></canvas>
-</div>
-
-
-### Example usage
-
-```javascript
-// For a pie chart
-var myPieChart = new Chart(ctx[0]).Pie(data,options);
-
-// And for a doughnut chart
-var myDoughnutChart = new Chart(ctx[1]).Doughnut(data,options);
-```
-
-### Data structure
-
-```javascript
-var data = [
- {
- value: 300,
- color:"#F7464A",
- highlight: "#FF5A5E",
- label: "Red"
- },
- {
- value: 50,
- color: "#46BFBD",
- highlight: "#5AD3D1",
- label: "Green"
- },
- {
- value: 100,
- color: "#FDB45C",
- highlight: "#FFC870",
- label: "Yellow"
- }
-]
-```
-
-For a pie chart, you must pass in an array of objects with a value and a color property. The value attribute should be a number, Chart.js will total all of the numbers and calculate the relative proportion of each. The color attribute should be a string. Similar to CSS, for this string you can use HEX notation, RGB, RGBA or HSL.
-
-### Chart options
-
-These are the customisation options specific to Pie & Doughnut charts. These options are merged with the [global chart configuration options](#getting-started-global-chart-configuration), and form the options of the chart.
-
-```javascript
-{
- //Boolean - Whether we should show a stroke on each segment
- segmentShowStroke : true,
-
- //String - The colour of each segment stroke
- segmentStrokeColor : "#fff",
-
- //Number - The width of each segment stroke
- segmentStrokeWidth : 2,
-
- //Number - The percentage of the chart that we cut out of the middle
- percentageInnerCutout : 50, // This is 0 for Pie charts
-
- //Number - Amount of animation steps
- animationSteps : 100,
-
- //String - Animation easing effect
- animationEasing : "easeOutBounce",
-
- //Boolean - Whether we animate the rotation of the Doughnut
- animateRotate : true,
-
- //Boolean - Whether we animate scaling the Doughnut from the centre
- animateScale : false,
- {% raw %}
- //String - A legend template
- legendTemplate : "<ul class=\"<%=name.toLowerCase()%>-legend\"><% for (var i=0; i<segments.length; i++){%><li><span style=\"background-color:<%=segments[i].fillColor%>\"></span><%if(segments[i].label){%><%=segments[i].label%><%}%></li><%}%></ul>"
- {% endraw %}
-}
-```
-You can override these for your `Chart` instance by passing a second argument into the `Doughnut` method as an object with the keys you want to override.
-
-For example, we could have a doughnut chart that animates by scaling out from the centre like so:
-
-```javascript
-new Chart(ctx).Doughnut(data, {
- animateScale: true
-});
-// This will create a chart with all of the default options, merged from the global config,
-// and the Doughnut chart defaults but this particular instance will have `animateScale` set to `true`.
-```
-
-We can also change these default values for each Doughnut type that is created, this object is available at `Chart.defaults.Doughnut`. Pie charts also have a clone of these defaults available to change at `Chart.defaults.Pie`, with the only difference being `percentageInnerCutout` being set to 0.
-
-### Prototype methods
-
-#### .getSegmentsAtEvent( event )
-
-Calling `getSegmentsAtEvent(event)` on your Chart instance passing an argument of an event, or jQuery event, will return the segment elements that are at the same position of that event.
-
-```javascript
-canvas.onclick = function(evt){
- var activePoints = myDoughnutChart.getSegmentsAtEvent(evt);
- // => activePoints is an array of segments on the canvas that are at the same position as the click event.
-};
-```
-
-This functionality may be useful for implementing DOM based tooltips, or triggering custom behaviour in your application.
-
-#### .update( )
-
-Calling `update()` on your Chart instance will re-render the chart with any updated values, allowing you to edit the value of multiple existing points, then render those in one animated render loop.
-
-```javascript
-myDoughnutChart.segments[1].value = 10;
-// Would update the first dataset's value of 'Green' to be 10
-myDoughnutChart.update();
-// Calling update now animates the circumference of the segment 'Green' from 50 to 10.
-// and transitions other segment widths
-```
-
-#### .addData( segmentData, index )
-
-Calling `addData(segmentData, index)` on your Chart instance passing an object in the same format as in the constructor. There is an optional second argument of 'index', this determines at what index the new segment should be inserted into the chart.
-
-```javascript
-// An object in the same format as the original data source
-myDoughnutChart.addData({
- value: 130,
- color: "#B48EAD",
- highlight: "#C69CBE",
- label: "Purple"
-});
-// The new segment will now animate in.
-```
-
-#### .removeData( index )
-
-Calling `removeData(index)` on your Chart instance will remove segment at that particular index. If none is provided, it will default to the last segment.
-
-```javascript
-myDoughnutChart.removeData();
-// Other segments will update to fill the empty space left.
-```
diff --git a/applications/auto-scale/gui/src/vendor/Chart.js/docs/06-Advanced.md b/applications/auto-scale/gui/src/vendor/Chart.js/docs/06-Advanced.md
deleted file mode 100644
index f0495bf..0000000
--- a/applications/auto-scale/gui/src/vendor/Chart.js/docs/06-Advanced.md
+++ /dev/null
@@ -1,185 +0,0 @@
----
-title: Advanced usage
-anchor: advanced-usage
----
-
-
-### Prototype methods
-
-For each chart, there are a set of global prototype methods on the shared `ChartType` which you may find useful. These are available on all charts created with Chart.js, but for the examples, let's use a line chart we've made.
-
-```javascript
-// For example:
-var myLineChart = new Chart(ctx).Line(data);
-```
-
-#### .clear()
-
-Will clear the chart canvas. Used extensively internally between animation frames, but you might find it useful.
-
-```javascript
-// Will clear the canvas that myLineChart is drawn on
-myLineChart.clear();
-// => returns 'this' for chainability
-```
-
-#### .stop()
-
-Use this to stop any current animation loop. This will pause the chart during any current animation frame. Call `.render()` to re-animate.
-
-```javascript
-// Stops the charts animation loop at its current frame
-myLineChart.stop();
-// => returns 'this' for chainability
-```
-
-#### .resize()
-
-Use this to manually resize the canvas element. This is run each time the browser is resized, but you can call this method manually if you change the size of the canvas nodes container element.
-
-```javascript
-// Resizes & redraws to fill its container element
-myLineChart.resize();
-// => returns 'this' for chainability
-```
-
-#### .destroy()
-
-Use this to destroy any chart instances that are created. This will clean up any references stored to the chart object within Chart.js, along with any associated event listeners attached by Chart.js.
-
-```javascript
-// Destroys a specific chart instance
-myLineChart.destroy();
-```
-
-#### .toBase64Image()
-
-This returns a base 64 encoded string of the chart in it's current state.
-
-```javascript
-myLineChart.toBase64Image();
-// => returns png data url of the image on the canvas
-```
-
-#### .generateLegend()
-
-Returns an HTML string of a legend for that chart. The template for this legend is at `legendTemplate` in the chart options.
-
-```javascript
-myLineChart.generateLegend();
-// => returns HTML string of a legend for this chart
-```
-
-### External Tooltips
-
-You can enable custom tooltips in the global or chart configuration like so:
-
-```javascript
-var myPieChart = new Chart(ctx).Pie(data, {
- customTooltips: function(tooltip) {
-
- // tooltip will be false if tooltip is not visible or should be hidden
- if (!tooltip) {
- return;
- }
-
- // Otherwise, tooltip will be an object with all tooltip properties like:
-
- // tooltip.caretHeight
- // tooltip.caretPadding
- // tooltip.chart
- // tooltip.cornerRadius
- // tooltip.fillColor
- // tooltip.font...
- // tooltip.text
- // tooltip.x
- // tooltip.y
- // etc...
-
- };
-});
-```
-
-See files `sample/pie-customTooltips.html` and `sample/line-customTooltips.html` for examples on how to get started.
-
-
-### Writing new chart types
-
-Chart.js 1.0 has been rewritten to provide a platform for developers to create their own custom chart types, and be able to share and utilise them through the Chart.js API.
-
-The format is relatively simple, there are a set of utility helper methods under `Chart.helpers`, including things such as looping over collections, requesting animation frames, and easing equations.
-
-On top of this, there are also some simple base classes of Chart elements, these all extend from `Chart.Element`, and include things such as points, bars and scales.
-
-```javascript
-Chart.Type.extend({
- // Passing in a name registers this chart in the Chart namespace
- name: "Scatter",
- // Providing a defaults will also register the deafults in the chart namespace
- defaults : {
- options: "Here",
- available: "at this.options"
- },
- // Initialize is fired when the chart is initialized - Data is passed in as a parameter
- // Config is automatically merged by the core of Chart.js, and is available at this.options
- initialize: function(data){
- this.chart.ctx // The drawing context for this chart
- this.chart.canvas // the canvas node for this chart
- },
- // Used to draw something on the canvas
- draw: function() {
- }
-});
-
-// Now we can create a new instance of our chart, using the Chart.js API
-new Chart(ctx).Scatter(data);
-// initialize is now run
-```
-
-### Extending existing chart types
-
-We can also extend existing chart types, and expose them to the API in the same way. Let's say for example, we might want to run some more code when we initialize every Line chart.
-
-```javascript
-// Notice now we're extending the particular Line chart type, rather than the base class.
-Chart.types.Line.extend({
- // Passing in a name registers this chart in the Chart namespace in the same way
- name: "LineAlt",
- initialize: function(data){
- console.log('My Line chart extension');
- Chart.types.Line.prototype.initialize.apply(this, arguments);
- }
-});
-
-// Creates a line chart in the same way
-new Chart(ctx).LineAlt(data);
-// but this logs 'My Line chart extension' in the console.
-```
-
-### Community extensions
-
-- <a href="https://github.com/Regaddi/Chart.StackedBar.js" target"_blank">Stacked Bar Chart</a> by <a href="https://twitter.com/Regaddi" target="_blank">@Regaddi</a>
-- <a href="https://github.com/CAYdenberg/Chart.js" target"_blank">Error bars (bar and line charts)</a> by <a href="https://twitter.com/CAYdenberg" target="_blank">@CAYdenberg</a>
-
-### Creating custom builds
-
-Chart.js uses <a href="http://gulpjs.com/" target="_blank">gulp</a> to build the library into a single JavaScript file. We can use this same build script with custom parameters in order to build a custom version.
-
-Firstly, we need to ensure development dependencies are installed. With node and npm installed, after cloning the Chart.js repo to a local directory, and navigating to that directory in the command line, we can run the following:
-
-```bash
-npm install
-npm install -g gulp
-```
-
-This will install the local development dependencies for Chart.js, along with a CLI for the JavaScript task runner <a href="http://gulpjs.com/" target="_blank">gulp</a>.
-
-Now, we can run the `gulp build` task, and pass in a comma seperated list of types as an argument to build a custom version of Chart.js with only specified chart types.
-
-Here we will create a version of Chart.js with only Line, Radar and Bar charts included:
-
-```bash
-gulp build --types=Line,Radar,Bar
-```
-
-This will output to the `/custom` directory, and write two files, Chart.js, and Chart.min.js with only those chart types included.
diff --git a/applications/auto-scale/gui/src/vendor/Chart.js/docs/07-Notes.md b/applications/auto-scale/gui/src/vendor/Chart.js/docs/07-Notes.md
deleted file mode 100644
index 8ba5a59..0000000
--- a/applications/auto-scale/gui/src/vendor/Chart.js/docs/07-Notes.md
+++ /dev/null
@@ -1,42 +0,0 @@
----
-title: Notes
-anchor: notes
----
-
-### Browser support
-Browser support for the canvas element is available in all modern & major mobile browsers <a href="http://caniuse.com/canvas" target="_blank">(caniuse.com/canvas)</a>.
-
-For IE8 & below, I would recommend using the polyfill ExplorerCanvas - available at <a href="https://code.google.com/p/explorercanvas/" target="_blank">https://code.google.com/p/explorercanvas/</a>. It falls back to Internet explorer's format VML when canvas support is not available. Example use:
-
-```html
-<head>
- <!--[if lte IE 8]>
- <script src="excanvas.js"></script>
- <![endif]-->
-</head>
-```
-
-Usually I would recommend feature detection to choose whether or not to load a polyfill, rather than IE conditional comments, however in this case, VML is a Microsoft proprietary format, so it will only work in IE.
-
-Some important points to note in my experience using ExplorerCanvas as a fallback.
-
-- Initialise charts on load rather than DOMContentReady when using the library, as sometimes a race condition will occur, and it will result in an error when trying to get the 2d context of a canvas.
-- New VML DOM elements are being created for each animation frame and there is no hardware acceleration. As a result animation is usually slow and jerky, with flashing text. It is a good idea to dynamically turn off animation based on canvas support. I recommend using the excellent <a href="http://modernizr.com/" target="_blank">Modernizr</a> to do this.
-- When declaring fonts, the library explorercanvas requires the font name to be in single quotes inside the string. For example, instead of your scaleFontFamily property being simply "Arial", explorercanvas support, use "'Arial'" instead. Chart.js does this for default values.
-
-### Bugs & issues
-
-Please report these on the GitHub page - at <a href="https://github.com/nnnick/Chart.js" target="_blank">github.com/nnnick/Chart.js</a>. If you could include a link to a simple <a href="http://jsbin.com/" target="_blank">jsbin</a> or similar to demonstrate the issue, that'd be really helpful.
-
-
-### Contributing
-New contributions to the library are welcome, just a couple of guidelines:
-
-- Tabs for indentation, not spaces please.
-- Please ensure you're changing the individual files in `/src`, not the concatenated output in the `Chart.js` file in the root of the repo.
-- Please check that your code will pass `jshint` code standards, `gulp jshint` will run this for you.
-- Please keep pull requests concise, and document new functionality in the relevant `.md` file.
-- Consider whether your changes are useful for all users, or if creating a Chart.js extension would be more appropriate.
-
-### License
-Chart.js is open source and available under the <a href="http://opensource.org/licenses/MIT" target="_blank">MIT license</a>.
\ No newline at end of file
diff --git a/applications/auto-scale/gui/src/vendor/Chart.js/gulpfile.js b/applications/auto-scale/gui/src/vendor/Chart.js/gulpfile.js
deleted file mode 100644
index e8fe1c7..0000000
--- a/applications/auto-scale/gui/src/vendor/Chart.js/gulpfile.js
+++ /dev/null
@@ -1,137 +0,0 @@
-var gulp = require('gulp'),
- concat = require('gulp-concat'),
- uglify = require('gulp-uglify'),
- util = require('gulp-util'),
- jshint = require('gulp-jshint'),
- size = require('gulp-size'),
- connect = require('gulp-connect'),
- replace = require('gulp-replace'),
- htmlv = require('gulp-html-validator'),
- inquirer = require('inquirer'),
- semver = require('semver'),
- exec = require('child_process').exec,
- fs = require('fs'),
- package = require('./package.json'),
- bower = require('./bower.json');
-
-var srcDir = './src/';
-/*
- * Usage : gulp build --types=Bar,Line,Doughnut
- * Output: - A built Chart.js file with Core and types Bar, Line and Doughnut concatenated together
- * - A minified version of this code, in Chart.min.js
- */
-
-gulp.task('build', function(){
-
- // Default to all of the chart types, with Chart.Core first
- var srcFiles = [FileName('Core')],
- isCustom = !!(util.env.types),
- outputDir = (isCustom) ? 'custom' : '.';
- if (isCustom){
- util.env.types.split(',').forEach(function(type){ return srcFiles.push(FileName(type))});
- }
- else{
- // Seems gulp-concat remove duplicates - nice!
- // So we can use this to sort out dependency order - aka include Core first!
- srcFiles.push(srcDir+'*');
- }
-
- return gulp.src(srcFiles)
- .pipe(concat('Chart.js'))
- .pipe(replace('{{ version }}', package.version))
- .pipe(gulp.dest(outputDir))
- .pipe(uglify({preserveComments:'some'}))
- .pipe(concat('Chart.min.js'))
- .pipe(gulp.dest(outputDir));
-
- function FileName(moduleName){
- return srcDir+'Chart.'+moduleName+'.js';
- };
-});
-
-/*
- * Usage : gulp bump
- * Prompts: Version increment to bump
- * Output: - New version number written into package.json & bower.json
- */
-
-gulp.task('bump', function(complete){
- util.log('Current version:', util.colors.cyan(package.version));
- var choices = ['major', 'premajor', 'minor', 'preminor', 'patch', 'prepatch', 'prerelease'].map(function(versionType){
- return versionType + ' (v' + semver.inc(package.version, versionType) + ')';
- });
- inquirer.prompt({
- type: 'list',
- name: 'version',
- message: 'What version update would you like?',
- choices: choices
- }, function(res){
- var increment = res.version.split(' ')[0],
- newVersion = semver.inc(package.version, increment);
-
- // Set the new versions into the bower/package object
- package.version = newVersion;
- bower.version = newVersion;
-
- // Write these to their own files, then build the output
- fs.writeFileSync('package.json', JSON.stringify(package, null, 2));
- fs.writeFileSync('bower.json', JSON.stringify(bower, null, 2));
-
- complete();
- });
-});
-
-gulp.task('release', ['build'], function(){
- exec('git tag -a v' + package.version);
-});
-
-gulp.task('jshint', function(){
- return gulp.src(srcDir + '*.js')
- .pipe(jshint())
- .pipe(jshint.reporter('default'));
-});
-
-gulp.task('valid', function(){
- return gulp.src('samples/*.html')
- .pipe(htmlv());
-});
-
-gulp.task('library-size', function(){
- return gulp.src('Chart.min.js')
- .pipe(size({
- gzip: true
- }));
-});
-
-gulp.task('module-sizes', function(){
- return gulp.src(srcDir + '*.js')
- .pipe(uglify({preserveComments:'some'}))
- .pipe(size({
- showFiles: true,
- gzip: true
- }))
-});
-
-gulp.task('watch', function(){
- gulp.watch('./src/*', ['build']);
-});
-
-gulp.task('test', ['jshint', 'valid']);
-
-gulp.task('size', ['library-size', 'module-sizes']);
-
-gulp.task('default', ['build', 'watch']);
-
-gulp.task('server', function(){
- connect.server({
- port: 8000
- });
-});
-
-// Convenience task for opening the project straight from the command line
-gulp.task('_open', function(){
- exec('open http://localhost:8000');
- exec('subl .');
-});
-
-gulp.task('dev', ['server', 'default']);
diff --git a/applications/auto-scale/gui/src/vendor/Chart.js/package.json b/applications/auto-scale/gui/src/vendor/Chart.js/package.json
deleted file mode 100644
index 9ac4a0e..0000000
--- a/applications/auto-scale/gui/src/vendor/Chart.js/package.json
+++ /dev/null
@@ -1,28 +0,0 @@
-{
- "name": "chart.js",
- "homepage": "http://www.chartjs.org",
- "description": "Simple HTML5 charts using the canvas element.",
- "version": "1.0.2",
- "main": "Chart.js",
- "repository": {
- "type": "git",
- "url": "https://github.com/nnnick/Chart.js.git"
- },
- "dependences": {},
- "devDependencies": {
- "gulp": "3.5.x",
- "gulp-concat": "~2.1.x",
- "gulp-connect": "~2.0.5",
- "gulp-jshint": "~1.5.1",
- "gulp-replace": "^0.4.0",
- "gulp-size": "~0.4.0",
- "gulp-uglify": "~0.2.x",
- "gulp-util": "~2.2.x",
- "gulp-html-validator": "^0.0.2",
- "inquirer": "^0.5.1",
- "semver": "^3.0.1"
- },
- "spm": {
- "main": "Chart.js"
- }
-}
\ No newline at end of file
diff --git a/applications/auto-scale/gui/src/vendor/Chart.js/samples/bar.html b/applications/auto-scale/gui/src/vendor/Chart.js/samples/bar.html
deleted file mode 100644
index 5bf4b5b..0000000
--- a/applications/auto-scale/gui/src/vendor/Chart.js/samples/bar.html
+++ /dev/null
@@ -1,45 +0,0 @@
-<!doctype html>
-<html>
- <head>
- <title>Bar Chart</title>
- <script src="../Chart.js"></script>
- </head>
- <body>
- <div style="width: 50%">
- <canvas id="canvas" height="450" width="600"></canvas>
- </div>
-
-
- <script>
- var randomScalingFactor = function(){ return Math.round(Math.random()*100)};
-
- var barChartData = {
- labels : ["January","February","March","April","May","June","July"],
- datasets : [
- {
- fillColor : "rgba(220,220,220,0.5)",
- strokeColor : "rgba(220,220,220,0.8)",
- highlightFill: "rgba(220,220,220,0.75)",
- highlightStroke: "rgba(220,220,220,1)",
- data : [randomScalingFactor(),randomScalingFactor(),randomScalingFactor(),randomScalingFactor(),randomScalingFactor(),randomScalingFactor(),randomScalingFactor()]
- },
- {
- fillColor : "rgba(151,187,205,0.5)",
- strokeColor : "rgba(151,187,205,0.8)",
- highlightFill : "rgba(151,187,205,0.75)",
- highlightStroke : "rgba(151,187,205,1)",
- data : [randomScalingFactor(),randomScalingFactor(),randomScalingFactor(),randomScalingFactor(),randomScalingFactor(),randomScalingFactor(),randomScalingFactor()]
- }
- ]
-
- }
- window.onload = function(){
- var ctx = document.getElementById("canvas").getContext("2d");
- window.myBar = new Chart(ctx).Bar(barChartData, {
- responsive : true
- });
- }
-
- </script>
- </body>
-</html>
diff --git a/applications/auto-scale/gui/src/vendor/Chart.js/samples/doughnut.html b/applications/auto-scale/gui/src/vendor/Chart.js/samples/doughnut.html
deleted file mode 100644
index fdf7539..0000000
--- a/applications/auto-scale/gui/src/vendor/Chart.js/samples/doughnut.html
+++ /dev/null
@@ -1,67 +0,0 @@
-<!doctype html>
-<html>
- <head>
- <title>Doughnut Chart</title>
- <script src="../Chart.js"></script>
- <style>
- body{
- padding: 0;
- margin: 0;
- }
- #canvas-holder{
- width:30%;
- }
- </style>
- </head>
- <body>
- <div id="canvas-holder">
- <canvas id="chart-area" width="500" height="500"/>
- </div>
-
-
- <script>
-
- var doughnutData = [
- {
- value: 300,
- color:"#F7464A",
- highlight: "#FF5A5E",
- label: "Red"
- },
- {
- value: 50,
- color: "#46BFBD",
- highlight: "#5AD3D1",
- label: "Green"
- },
- {
- value: 100,
- color: "#FDB45C",
- highlight: "#FFC870",
- label: "Yellow"
- },
- {
- value: 40,
- color: "#949FB1",
- highlight: "#A8B3C5",
- label: "Grey"
- },
- {
- value: 120,
- color: "#4D5360",
- highlight: "#616774",
- label: "Dark Grey"
- }
-
- ];
-
- window.onload = function(){
- var ctx = document.getElementById("chart-area").getContext("2d");
- window.myDoughnut = new Chart(ctx).Doughnut(doughnutData, {responsive : true});
- };
-
-
-
- </script>
- </body>
-</html>
diff --git a/applications/auto-scale/gui/src/vendor/Chart.js/samples/line-customTooltips.html b/applications/auto-scale/gui/src/vendor/Chart.js/samples/line-customTooltips.html
deleted file mode 100644
index 4dc46e1..0000000
--- a/applications/auto-scale/gui/src/vendor/Chart.js/samples/line-customTooltips.html
+++ /dev/null
@@ -1,129 +0,0 @@
-<!doctype html>
-<html>
-
-<head>
- <title>Line Chart with Custom Tooltips</title>
- <script src="../Chart.js"></script>
- <script src="http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
-
- <style>
- #canvas-holder1 {
- width: 300px;
- margin: 20px auto;
- }
- #canvas-holder2 {
- width: 50%;
- margin: 20px 25%;
- }
- #chartjs-tooltip {
- opacity: 1;
- position: absolute;
- background: rgba(0, 0, 0, .7);
- color: white;
- padding: 3px;
- border-radius: 3px;
- -webkit-transition: all .1s ease;
- transition: all .1s ease;
- pointer-events: none;
- -webkit-transform: translate(-50%, 0);
- transform: translate(-50%, 0);
- }
- .chartjs-tooltip-key{
- display:inline-block;
- width:10px;
- height:10px;
- }
- </style>
-</head>
-
-<body>
- <div id="canvas-holder1">
- <canvas id="chart1" width="300" height="30" />
- </div>
- <div id="canvas-holder2">
- <canvas id="chart2" width="450" height="600" />
- </div>
-
- <div id="chartjs-tooltip"></div>
-
-
- <script>
-
- Chart.defaults.global.pointHitDetectionRadius = 1;
- Chart.defaults.global.customTooltips = function(tooltip) {
-
- var tooltipEl = $('#chartjs-tooltip');
-
- if (!tooltip) {
- tooltipEl.css({
- opacity: 0
- });
- return;
- }
-
- tooltipEl.removeClass('above below');
- tooltipEl.addClass(tooltip.yAlign);
-
- var innerHtml = '';
- for (var i = tooltip.labels.length - 1; i >= 0; i--) {
- innerHtml += [
- '<div class="chartjs-tooltip-section">',
- ' <span class="chartjs-tooltip-key" style="background-color:' + tooltip.legendColors[i].fill + '"></span>',
- ' <span class="chartjs-tooltip-value">' + tooltip.labels[i] + '</span>',
- '</div>'
- ].join('');
- }
- tooltipEl.html(innerHtml);
-
- tooltipEl.css({
- opacity: 1,
- left: tooltip.chart.canvas.offsetLeft + tooltip.x + 'px',
- top: tooltip.chart.canvas.offsetTop + tooltip.y + 'px',
- fontFamily: tooltip.fontFamily,
- fontSize: tooltip.fontSize,
- fontStyle: tooltip.fontStyle,
- });
- };
- var randomScalingFactor = function() {
- return Math.round(Math.random() * 100);
- };
- var lineChartData = {
- labels: ["January", "February", "March", "April", "May", "June", "July"],
- datasets: [{
- label: "My First dataset",
- fillColor: "rgba(220,220,220,0.2)",
- strokeColor: "rgba(220,220,220,1)",
- pointColor: "rgba(220,220,220,1)",
- pointStrokeColor: "#fff",
- pointHighlightFill: "#fff",
- pointHighlightStroke: "rgba(220,220,220,1)",
- data: [randomScalingFactor(), randomScalingFactor(), randomScalingFactor(), randomScalingFactor(), randomScalingFactor(), randomScalingFactor(), randomScalingFactor()]
- }, {
- label: "My Second dataset",
- fillColor: "rgba(151,187,205,0.2)",
- strokeColor: "rgba(151,187,205,1)",
- pointColor: "rgba(151,187,205,1)",
- pointStrokeColor: "#fff",
- pointHighlightFill: "#fff",
- pointHighlightStroke: "rgba(151,187,205,1)",
- data: [randomScalingFactor(), randomScalingFactor(), randomScalingFactor(), randomScalingFactor(), randomScalingFactor(), randomScalingFactor(), randomScalingFactor()]
- }]
- };
-
- window.onload = function() {
- var ctx1 = document.getElementById("chart1").getContext("2d");
- window.myLine = new Chart(ctx1).Line(lineChartData, {
- showScale: false,
- pointDot : true,
- responsive: true
- });
-
- var ctx2 = document.getElementById("chart2").getContext("2d");
- window.myLine = new Chart(ctx2).Line(lineChartData, {
- responsive: true
- });
- };
- </script>
-</body>
-
-</html>
diff --git a/applications/auto-scale/gui/src/vendor/Chart.js/samples/line.html b/applications/auto-scale/gui/src/vendor/Chart.js/samples/line.html
deleted file mode 100644
index ccd0dad..0000000
--- a/applications/auto-scale/gui/src/vendor/Chart.js/samples/line.html
+++ /dev/null
@@ -1,54 +0,0 @@
-<!doctype html>
-<html>
- <head>
- <title>Line Chart</title>
- <script src="../Chart.js"></script>
- </head>
- <body>
- <div style="width:30%">
- <div>
- <canvas id="canvas" height="450" width="600"></canvas>
- </div>
- </div>
-
-
- <script>
- var randomScalingFactor = function(){ return Math.round(Math.random()*100)};
- var lineChartData = {
- labels : ["January","February","March","April","May","June","July"],
- datasets : [
- {
- label: "My First dataset",
- fillColor : "rgba(220,220,220,0.2)",
- strokeColor : "rgba(220,220,220,1)",
- pointColor : "rgba(220,220,220,1)",
- pointStrokeColor : "#fff",
- pointHighlightFill : "#fff",
- pointHighlightStroke : "rgba(220,220,220,1)",
- data : [randomScalingFactor(),randomScalingFactor(),randomScalingFactor(),randomScalingFactor(),randomScalingFactor(),randomScalingFactor(),randomScalingFactor()]
- },
- {
- label: "My Second dataset",
- fillColor : "rgba(151,187,205,0.2)",
- strokeColor : "rgba(151,187,205,1)",
- pointColor : "rgba(151,187,205,1)",
- pointStrokeColor : "#fff",
- pointHighlightFill : "#fff",
- pointHighlightStroke : "rgba(151,187,205,1)",
- data : [randomScalingFactor(),randomScalingFactor(),randomScalingFactor(),randomScalingFactor(),randomScalingFactor(),randomScalingFactor(),randomScalingFactor()]
- }
- ]
-
- }
-
- window.onload = function(){
- var ctx = document.getElementById("canvas").getContext("2d");
- window.myLine = new Chart(ctx).Line(lineChartData, {
- responsive: true
- });
- }
-
-
- </script>
- </body>
-</html>
diff --git a/applications/auto-scale/gui/src/vendor/Chart.js/samples/pie-customTooltips.html b/applications/auto-scale/gui/src/vendor/Chart.js/samples/pie-customTooltips.html
deleted file mode 100644
index 732317d..0000000
--- a/applications/auto-scale/gui/src/vendor/Chart.js/samples/pie-customTooltips.html
+++ /dev/null
@@ -1,156 +0,0 @@
-<!doctype html>
-<html>
-
-<head>
- <title>Pie Chart with Custom Tooltips</title>
- <script src="../Chart.js"></script>
- <script src="http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
-
- <style>
- #canvas-holder {
- width: 100%;
- margin-top: 50px;
- text-align: center;
- }
- #chartjs-tooltip {
- opacity: 1;
- position: absolute;
- background: rgba(0, 0, 0, .7);
- color: white;
- padding: 3px;
- border-radius: 3px;
- -webkit-transition: all .1s ease;
- transition: all .1s ease;
- pointer-events: none;
- -webkit-transform: translate(-50%, 0);
- transform: translate(-50%, 0);
- }
- #chartjs-tooltip.below {
- -webkit-transform: translate(-50%, 0);
- transform: translate(-50%, 0);
- }
- #chartjs-tooltip.below:before {
- border: solid;
- border-color: #111 transparent;
- border-color: rgba(0, 0, 0, .8) transparent;
- border-width: 0 8px 8px 8px;
- bottom: 1em;
- content: "";
- display: block;
- left: 50%;
- position: absolute;
- z-index: 99;
- -webkit-transform: translate(-50%, -100%);
- transform: translate(-50%, -100%);
- }
- #chartjs-tooltip.above {
- -webkit-transform: translate(-50%, -100%);
- transform: translate(-50%, -100%);
- }
- #chartjs-tooltip.above:before {
- border: solid;
- border-color: #111 transparent;
- border-color: rgba(0, 0, 0, .8) transparent;
- border-width: 8px 8px 0 8px;
- bottom: 1em;
- content: "";
- display: block;
- left: 50%;
- top: 100%;
- position: absolute;
- z-index: 99;
- -webkit-transform: translate(-50%, 0);
- transform: translate(-50%, 0);
- }
- </style>
-</head>
-
-<body>
- <div id="canvas-holder">
- <canvas id="chart-area1" width="50" height="50" />
- </div>
- <div id="canvas-holder">
- <canvas id="chart-area2" width="300" height="300" />
- </div>
-
- <div id="chartjs-tooltip"></div>
-
-
- <script>
- Chart.defaults.global.customTooltips = function(tooltip) {
-
- // Tooltip Element
- var tooltipEl = $('#chartjs-tooltip');
-
- // Hide if no tooltip
- if (!tooltip) {
- tooltipEl.css({
- opacity: 0
- });
- return;
- }
-
- // Set caret Position
- tooltipEl.removeClass('above below');
- tooltipEl.addClass(tooltip.yAlign);
-
- // Set Text
- tooltipEl.html(tooltip.text);
-
- // Find Y Location on page
- var top;
- if (tooltip.yAlign == 'above') {
- top = tooltip.y - tooltip.caretHeight - tooltip.caretPadding;
- } else {
- top = tooltip.y + tooltip.caretHeight + tooltip.caretPadding;
- }
-
- // Display, position, and set styles for font
- tooltipEl.css({
- opacity: 1,
- left: tooltip.chart.canvas.offsetLeft + tooltip.x + 'px',
- top: tooltip.chart.canvas.offsetTop + top + 'px',
- fontFamily: tooltip.fontFamily,
- fontSize: tooltip.fontSize,
- fontStyle: tooltip.fontStyle,
- });
- };
-
- var pieData = [{
- value: 300,
- color: "#F7464A",
- highlight: "#FF5A5E",
- label: "Red"
- }, {
- value: 50,
- color: "#46BFBD",
- highlight: "#5AD3D1",
- label: "Green"
- }, {
- value: 100,
- color: "#FDB45C",
- highlight: "#FFC870",
- label: "Yellow"
- }, {
- value: 40,
- color: "#949FB1",
- highlight: "#A8B3C5",
- label: "Grey"
- }, {
- value: 120,
- color: "#4D5360",
- highlight: "#616774",
- label: "Dark Grey"
- }];
-
- window.onload = function() {
- var ctx1 = document.getElementById("chart-area1").getContext("2d");
- window.myPie = new Chart(ctx1).Pie(pieData);
-
- var ctx2 = document.getElementById("chart-area2").getContext("2d");
- window.myPie = new Chart(ctx2).Pie(pieData);
- };
- </script>
-</body>
-
-</html>
diff --git a/applications/auto-scale/gui/src/vendor/Chart.js/samples/pie.html b/applications/auto-scale/gui/src/vendor/Chart.js/samples/pie.html
deleted file mode 100644
index 255a499..0000000
--- a/applications/auto-scale/gui/src/vendor/Chart.js/samples/pie.html
+++ /dev/null
@@ -1,58 +0,0 @@
-<!doctype html>
-<html>
- <head>
- <title>Pie Chart</title>
- <script src="../Chart.js"></script>
- </head>
- <body>
- <div id="canvas-holder">
- <canvas id="chart-area" width="300" height="300"/>
- </div>
-
-
- <script>
-
- var pieData = [
- {
- value: 300,
- color:"#F7464A",
- highlight: "#FF5A5E",
- label: "Red"
- },
- {
- value: 50,
- color: "#46BFBD",
- highlight: "#5AD3D1",
- label: "Green"
- },
- {
- value: 100,
- color: "#FDB45C",
- highlight: "#FFC870",
- label: "Yellow"
- },
- {
- value: 40,
- color: "#949FB1",
- highlight: "#A8B3C5",
- label: "Grey"
- },
- {
- value: 120,
- color: "#4D5360",
- highlight: "#616774",
- label: "Dark Grey"
- }
-
- ];
-
- window.onload = function(){
- var ctx = document.getElementById("chart-area").getContext("2d");
- window.myPie = new Chart(ctx).Pie(pieData);
- };
-
-
-
- </script>
- </body>
-</html>
diff --git a/applications/auto-scale/gui/src/vendor/Chart.js/samples/polar-area.html b/applications/auto-scale/gui/src/vendor/Chart.js/samples/polar-area.html
deleted file mode 100644
index d3d3f01..0000000
--- a/applications/auto-scale/gui/src/vendor/Chart.js/samples/polar-area.html
+++ /dev/null
@@ -1,60 +0,0 @@
-<!doctype html>
-<html>
- <head>
- <title>Polar Area Chart</title>
- <script src="../Chart.js"></script>
- </head>
- <body>
- <div id="canvas-holder" style="width:30%">
- <canvas id="chart-area" width="300" height="300"/>
- </div>
-
-
- <script>
-
- var polarData = [
- {
- value: 300,
- color:"#F7464A",
- highlight: "#FF5A5E",
- label: "Red"
- },
- {
- value: 50,
- color: "#46BFBD",
- highlight: "#5AD3D1",
- label: "Green"
- },
- {
- value: 100,
- color: "#FDB45C",
- highlight: "#FFC870",
- label: "Yellow"
- },
- {
- value: 40,
- color: "#949FB1",
- highlight: "#A8B3C5",
- label: "Grey"
- },
- {
- value: 120,
- color: "#4D5360",
- highlight: "#616774",
- label: "Dark Grey"
- }
-
- ];
-
- window.onload = function(){
- var ctx = document.getElementById("chart-area").getContext("2d");
- window.myPolarArea = new Chart(ctx).PolarArea(polarData, {
- responsive:true
- });
- };
-
-
-
- </script>
- </body>
-</html>
diff --git a/applications/auto-scale/gui/src/vendor/Chart.js/samples/radar.html b/applications/auto-scale/gui/src/vendor/Chart.js/samples/radar.html
deleted file mode 100644
index 6a04f87..0000000
--- a/applications/auto-scale/gui/src/vendor/Chart.js/samples/radar.html
+++ /dev/null
@@ -1,53 +0,0 @@
-<!doctype html>
-<html>
- <head>
- <title>Radar Chart</title>
- <script src="../Chart.js"></script>
- <meta name = "viewport" content = "initial-scale = 1, user-scalable = no">
- <style>
- canvas{
- }
- </style>
- </head>
- <body>
- <div style="width:30%">
- <canvas id="canvas" height="450" width="450"></canvas>
- </div>
-
-
- <script>
- var radarChartData = {
- labels: ["Eating", "Drinking", "Sleeping", "Designing", "Coding", "Cycling", "Running"],
- datasets: [
- {
- label: "My First dataset",
- fillColor: "rgba(220,220,220,0.2)",
- strokeColor: "rgba(220,220,220,1)",
- pointColor: "rgba(220,220,220,1)",
- pointStrokeColor: "#fff",
- pointHighlightFill: "#fff",
- pointHighlightStroke: "rgba(220,220,220,1)",
- data: [65,59,90,81,56,55,40]
- },
- {
- label: "My Second dataset",
- fillColor: "rgba(151,187,205,0.2)",
- strokeColor: "rgba(151,187,205,1)",
- pointColor: "rgba(151,187,205,1)",
- pointStrokeColor: "#fff",
- pointHighlightFill: "#fff",
- pointHighlightStroke: "rgba(151,187,205,1)",
- data: [28,48,40,19,96,27,100]
- }
- ]
- };
-
- window.onload = function(){
- window.myRadar = new Chart(document.getElementById("canvas").getContext("2d")).Radar(radarChartData, {
- responsive: true
- });
- }
-
- </script>
- </body>
-</html>
diff --git a/applications/auto-scale/gui/src/vendor/Chart.js/src/Chart.Bar.js b/applications/auto-scale/gui/src/vendor/Chart.js/src/Chart.Bar.js
deleted file mode 100644
index 87fb26d..0000000
--- a/applications/auto-scale/gui/src/vendor/Chart.js/src/Chart.Bar.js
+++ /dev/null
@@ -1,302 +0,0 @@
-(function(){
- "use strict";
-
- var root = this,
- Chart = root.Chart,
- helpers = Chart.helpers;
-
-
- var defaultConfig = {
- //Boolean - Whether the scale should start at zero, or an order of magnitude down from the lowest value
- scaleBeginAtZero : true,
-
- //Boolean - Whether grid lines are shown across the chart
- scaleShowGridLines : true,
-
- //String - Colour of the grid lines
- scaleGridLineColor : "rgba(0,0,0,.05)",
-
- //Number - Width of the grid lines
- scaleGridLineWidth : 1,
-
- //Boolean - Whether to show horizontal lines (except X axis)
- scaleShowHorizontalLines: true,
-
- //Boolean - Whether to show vertical lines (except Y axis)
- scaleShowVerticalLines: true,
-
- //Boolean - If there is a stroke on each bar
- barShowStroke : true,
-
- //Number - Pixel width of the bar stroke
- barStrokeWidth : 2,
-
- //Number - Spacing between each of the X value sets
- barValueSpacing : 5,
-
- //Number - Spacing between data sets within X values
- barDatasetSpacing : 1,
-
- //String - A legend template
- legendTemplate : "<ul class=\"<%=name.toLowerCase()%>-legend\"><% for (var i=0; i<datasets.length; i++){%><li><span style=\"background-color:<%=datasets[i].fillColor%>\"></span><%if(datasets[i].label){%><%=datasets[i].label%><%}%></li><%}%></ul>"
-
- };
-
-
- Chart.Type.extend({
- name: "Bar",
- defaults : defaultConfig,
- initialize: function(data){
-
- //Expose options as a scope variable here so we can access it in the ScaleClass
- var options = this.options;
-
- this.ScaleClass = Chart.Scale.extend({
- offsetGridLines : true,
- calculateBarX : function(datasetCount, datasetIndex, barIndex){
- //Reusable method for calculating the xPosition of a given bar based on datasetIndex & width of the bar
- var xWidth = this.calculateBaseWidth(),
- xAbsolute = this.calculateX(barIndex) - (xWidth/2),
- barWidth = this.calculateBarWidth(datasetCount);
-
- return xAbsolute + (barWidth * datasetIndex) + (datasetIndex * options.barDatasetSpacing) + barWidth/2;
- },
- calculateBaseWidth : function(){
- return (this.calculateX(1) - this.calculateX(0)) - (2*options.barValueSpacing);
- },
- calculateBarWidth : function(datasetCount){
- //The padding between datasets is to the right of each bar, providing that there are more than 1 dataset
- var baseWidth = this.calculateBaseWidth() - ((datasetCount - 1) * options.barDatasetSpacing);
-
- return (baseWidth / datasetCount);
- }
- });
-
- this.datasets = [];
-
- //Set up tooltip events on the chart
- if (this.options.showTooltips){
- helpers.bindEvents(this, this.options.tooltipEvents, function(evt){
- var activeBars = (evt.type !== 'mouseout') ? this.getBarsAtEvent(evt) : [];
-
- this.eachBars(function(bar){
- bar.restore(['fillColor', 'strokeColor']);
- });
- helpers.each(activeBars, function(activeBar){
- activeBar.fillColor = activeBar.highlightFill;
- activeBar.strokeColor = activeBar.highlightStroke;
- });
- this.showTooltip(activeBars);
- });
- }
-
- //Declare the extension of the default point, to cater for the options passed in to the constructor
- this.BarClass = Chart.Rectangle.extend({
- strokeWidth : this.options.barStrokeWidth,
- showStroke : this.options.barShowStroke,
- ctx : this.chart.ctx
- });
-
- //Iterate through each of the datasets, and build this into a property of the chart
- helpers.each(data.datasets,function(dataset,datasetIndex){
-
- var datasetObject = {
- label : dataset.label || null,
- fillColor : dataset.fillColor,
- strokeColor : dataset.strokeColor,
- bars : []
- };
-
- this.datasets.push(datasetObject);
-
- helpers.each(dataset.data,function(dataPoint,index){
- //Add a new point for each piece of data, passing any required data to draw.
- datasetObject.bars.push(new this.BarClass({
- value : dataPoint,
- label : data.labels[index],
- datasetLabel: dataset.label,
- strokeColor : dataset.strokeColor,
- fillColor : dataset.fillColor,
- highlightFill : dataset.highlightFill || dataset.fillColor,
- highlightStroke : dataset.highlightStroke || dataset.strokeColor
- }));
- },this);
-
- },this);
-
- this.buildScale(data.labels);
-
- this.BarClass.prototype.base = this.scale.endPoint;
-
- this.eachBars(function(bar, index, datasetIndex){
- helpers.extend(bar, {
- width : this.scale.calculateBarWidth(this.datasets.length),
- x: this.scale.calculateBarX(this.datasets.length, datasetIndex, index),
- y: this.scale.endPoint
- });
- bar.save();
- }, this);
-
- this.render();
- },
- update : function(){
- this.scale.update();
- // Reset any highlight colours before updating.
- helpers.each(this.activeElements, function(activeElement){
- activeElement.restore(['fillColor', 'strokeColor']);
- });
-
- this.eachBars(function(bar){
- bar.save();
- });
- this.render();
- },
- eachBars : function(callback){
- helpers.each(this.datasets,function(dataset, datasetIndex){
- helpers.each(dataset.bars, callback, this, datasetIndex);
- },this);
- },
- getBarsAtEvent : function(e){
- var barsArray = [],
- eventPosition = helpers.getRelativePosition(e),
- datasetIterator = function(dataset){
- barsArray.push(dataset.bars[barIndex]);
- },
- barIndex;
-
- for (var datasetIndex = 0; datasetIndex < this.datasets.length; datasetIndex++) {
- for (barIndex = 0; barIndex < this.datasets[datasetIndex].bars.length; barIndex++) {
- if (this.datasets[datasetIndex].bars[barIndex].inRange(eventPosition.x,eventPosition.y)){
- helpers.each(this.datasets, datasetIterator);
- return barsArray;
- }
- }
- }
-
- return barsArray;
- },
- buildScale : function(labels){
- var self = this;
-
- var dataTotal = function(){
- var values = [];
- self.eachBars(function(bar){
- values.push(bar.value);
- });
- return values;
- };
-
- var scaleOptions = {
- templateString : this.options.scaleLabel,
- height : this.chart.height,
- width : this.chart.width,
- ctx : this.chart.ctx,
- textColor : this.options.scaleFontColor,
- fontSize : this.options.scaleFontSize,
- fontStyle : this.options.scaleFontStyle,
- fontFamily : this.options.scaleFontFamily,
- valuesCount : labels.length,
- beginAtZero : this.options.scaleBeginAtZero,
- integersOnly : this.options.scaleIntegersOnly,
- calculateYRange: function(currentHeight){
- var updatedRanges = helpers.calculateScaleRange(
- dataTotal(),
- currentHeight,
- this.fontSize,
- this.beginAtZero,
- this.integersOnly
- );
- helpers.extend(this, updatedRanges);
- },
- xLabels : labels,
- font : helpers.fontString(this.options.scaleFontSize, this.options.scaleFontStyle, this.options.scaleFontFamily),
- lineWidth : this.options.scaleLineWidth,
- lineColor : this.options.scaleLineColor,
- showHorizontalLines : this.options.scaleShowHorizontalLines,
- showVerticalLines : this.options.scaleShowVerticalLines,
- gridLineWidth : (this.options.scaleShowGridLines) ? this.options.scaleGridLineWidth : 0,
- gridLineColor : (this.options.scaleShowGridLines) ? this.options.scaleGridLineColor : "rgba(0,0,0,0)",
- padding : (this.options.showScale) ? 0 : (this.options.barShowStroke) ? this.options.barStrokeWidth : 0,
- showLabels : this.options.scaleShowLabels,
- display : this.options.showScale
- };
-
- if (this.options.scaleOverride){
- helpers.extend(scaleOptions, {
- calculateYRange: helpers.noop,
- steps: this.options.scaleSteps,
- stepValue: this.options.scaleStepWidth,
- min: this.options.scaleStartValue,
- max: this.options.scaleStartValue + (this.options.scaleSteps * this.options.scaleStepWidth)
- });
- }
-
- this.scale = new this.ScaleClass(scaleOptions);
- },
- addData : function(valuesArray,label){
- //Map the values array for each of the datasets
- helpers.each(valuesArray,function(value,datasetIndex){
- //Add a new point for each piece of data, passing any required data to draw.
- this.datasets[datasetIndex].bars.push(new this.BarClass({
- value : value,
- label : label,
- x: this.scale.calculateBarX(this.datasets.length, datasetIndex, this.scale.valuesCount+1),
- y: this.scale.endPoint,
- width : this.scale.calculateBarWidth(this.datasets.length),
- base : this.scale.endPoint,
- strokeColor : this.datasets[datasetIndex].strokeColor,
- fillColor : this.datasets[datasetIndex].fillColor
- }));
- },this);
-
- this.scale.addXLabel(label);
- //Then re-render the chart.
- this.update();
- },
- removeData : function(){
- this.scale.removeXLabel();
- //Then re-render the chart.
- helpers.each(this.datasets,function(dataset){
- dataset.bars.shift();
- },this);
- this.update();
- },
- reflow : function(){
- helpers.extend(this.BarClass.prototype,{
- y: this.scale.endPoint,
- base : this.scale.endPoint
- });
- var newScaleProps = helpers.extend({
- height : this.chart.height,
- width : this.chart.width
- });
- this.scale.update(newScaleProps);
- },
- draw : function(ease){
- var easingDecimal = ease || 1;
- this.clear();
-
- var ctx = this.chart.ctx;
-
- this.scale.draw(easingDecimal);
-
- //Draw all the bars for each dataset
- helpers.each(this.datasets,function(dataset,datasetIndex){
- helpers.each(dataset.bars,function(bar,index){
- if (bar.hasValue()){
- bar.base = this.scale.endPoint;
- //Transition then draw
- bar.transition({
- x : this.scale.calculateBarX(this.datasets.length, datasetIndex, index),
- y : this.scale.calculateY(bar.value),
- width : this.scale.calculateBarWidth(this.datasets.length)
- }, easingDecimal).draw();
- }
- },this);
-
- },this);
- }
- });
-
-
-}).call(this);
diff --git a/applications/auto-scale/gui/src/vendor/Chart.js/src/Chart.Core.js b/applications/auto-scale/gui/src/vendor/Chart.js/src/Chart.Core.js
deleted file mode 100755
index 5dccd2e..0000000
--- a/applications/auto-scale/gui/src/vendor/Chart.js/src/Chart.Core.js
+++ /dev/null
@@ -1,2021 +0,0 @@
-/*!
- * Chart.js
- * http://chartjs.org/
- * Version: {{ version }}
- *
- * Copyright 2015 Nick Downie
- * Released under the MIT license
- * https://github.com/nnnick/Chart.js/blob/master/LICENSE.md
- */
-
-
-(function(){
-
- "use strict";
-
- //Declare root variable - window in the browser, global on the server
- var root = this,
- previous = root.Chart;
-
- //Occupy the global variable of Chart, and create a simple base class
- var Chart = function(context){
- var chart = this;
- this.canvas = context.canvas;
-
- this.ctx = context;
-
- //Variables global to the chart
- var computeDimension = function(element,dimension)
- {
- if (element['offset'+dimension])
- {
- return element['offset'+dimension];
- }
- else
- {
- return document.defaultView.getComputedStyle(element).getPropertyValue(dimension);
- }
- }
-
- var width = this.width = computeDimension(context.canvas,'Width');
- var height = this.height = computeDimension(context.canvas,'Height');
-
- // Firefox requires this to work correctly
- context.canvas.width = width;
- context.canvas.height = height;
-
- var width = this.width = context.canvas.width;
- var height = this.height = context.canvas.height;
- this.aspectRatio = this.width / this.height;
- //High pixel density displays - multiply the size of the canvas height/width by the device pixel ratio, then scale.
- helpers.retinaScale(this);
-
- return this;
- };
- //Globally expose the defaults to allow for user updating/changing
- Chart.defaults = {
- global: {
- // Boolean - Whether to animate the chart
- animation: true,
-
- // Number - Number of animation steps
- animationSteps: 60,
-
- // String - Animation easing effect
- animationEasing: "easeOutQuart",
-
- // Boolean - If we should show the scale at all
- showScale: true,
-
- // Boolean - If we want to override with a hard coded scale
- scaleOverride: false,
-
- // ** Required if scaleOverride is true **
- // Number - The number of steps in a hard coded scale
- scaleSteps: null,
- // Number - The value jump in the hard coded scale
- scaleStepWidth: null,
- // Number - The scale starting value
- scaleStartValue: null,
-
- // String - Colour of the scale line
- scaleLineColor: "rgba(0,0,0,.1)",
-
- // Number - Pixel width of the scale line
- scaleLineWidth: 1,
-
- // Boolean - Whether to show labels on the scale
- scaleShowLabels: true,
-
- // Interpolated JS string - can access value
- scaleLabel: "<%=value%>",
-
- // Boolean - Whether the scale should stick to integers, and not show any floats even if drawing space is there
- scaleIntegersOnly: true,
-
- // Boolean - Whether the scale should start at zero, or an order of magnitude down from the lowest value
- scaleBeginAtZero: false,
-
- // String - Scale label font declaration for the scale label
- scaleFontFamily: "'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",
-
- // Number - Scale label font size in pixels
- scaleFontSize: 12,
-
- // String - Scale label font weight style
- scaleFontStyle: "normal",
-
- // String - Scale label font colour
- scaleFontColor: "#666",
-
- // Boolean - whether or not the chart should be responsive and resize when the browser does.
- responsive: false,
-
- // Boolean - whether to maintain the starting aspect ratio or not when responsive, if set to false, will take up entire container
- maintainAspectRatio: true,
-
- // Boolean - Determines whether to draw tooltips on the canvas or not - attaches events to touchmove & mousemove
- showTooltips: true,
-
- // Boolean - Determines whether to draw built-in tooltip or call custom tooltip function
- customTooltips: false,
-
- // Array - Array of string names to attach tooltip events
- tooltipEvents: ["mousemove", "touchstart", "touchmove", "mouseout"],
-
- // String - Tooltip background colour
- tooltipFillColor: "rgba(0,0,0,0.8)",
-
- // String - Tooltip label font declaration for the scale label
- tooltipFontFamily: "'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",
-
- // Number - Tooltip label font size in pixels
- tooltipFontSize: 14,
-
- // String - Tooltip font weight style
- tooltipFontStyle: "normal",
-
- // String - Tooltip label font colour
- tooltipFontColor: "#fff",
-
- // String - Tooltip title font declaration for the scale label
- tooltipTitleFontFamily: "'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",
-
- // Number - Tooltip title font size in pixels
- tooltipTitleFontSize: 14,
-
- // String - Tooltip title font weight style
- tooltipTitleFontStyle: "bold",
-
- // String - Tooltip title font colour
- tooltipTitleFontColor: "#fff",
-
- // Number - pixel width of padding around tooltip text
- tooltipYPadding: 6,
-
- // Number - pixel width of padding around tooltip text
- tooltipXPadding: 6,
-
- // Number - Size of the caret on the tooltip
- tooltipCaretSize: 8,
-
- // Number - Pixel radius of the tooltip border
- tooltipCornerRadius: 6,
-
- // Number - Pixel offset from point x to tooltip edge
- tooltipXOffset: 10,
-
- // String - Template string for single tooltips
- tooltipTemplate: "<%if (label){%><%=label%>: <%}%><%= value %>",
-
- // String - Template string for single tooltips
- multiTooltipTemplate: "<%= value %>",
-
- // String - Colour behind the legend colour block
- multiTooltipKeyBackground: '#fff',
-
- // Function - Will fire on animation progression.
- onAnimationProgress: function(){},
-
- // Function - Will fire on animation completion.
- onAnimationComplete: function(){}
-
- }
- };
-
- //Create a dictionary of chart types, to allow for extension of existing types
- Chart.types = {};
-
- //Global Chart helpers object for utility methods and classes
- var helpers = Chart.helpers = {};
-
- //-- Basic js utility methods
- var each = helpers.each = function(loopable,callback,self){
- var additionalArgs = Array.prototype.slice.call(arguments, 3);
- // Check to see if null or undefined firstly.
- if (loopable){
- if (loopable.length === +loopable.length){
- var i;
- for (i=0; i<loopable.length; i++){
- callback.apply(self,[loopable[i], i].concat(additionalArgs));
- }
- }
- else{
- for (var item in loopable){
- callback.apply(self,[loopable[item],item].concat(additionalArgs));
- }
- }
- }
- },
- clone = helpers.clone = function(obj){
- var objClone = {};
- each(obj,function(value,key){
- if (obj.hasOwnProperty(key)) objClone[key] = value;
- });
- return objClone;
- },
- extend = helpers.extend = function(base){
- each(Array.prototype.slice.call(arguments,1), function(extensionObject) {
- each(extensionObject,function(value,key){
- if (extensionObject.hasOwnProperty(key)) base[key] = value;
- });
- });
- return base;
- },
- merge = helpers.merge = function(base,master){
- //Merge properties in left object over to a shallow clone of object right.
- var args = Array.prototype.slice.call(arguments,0);
- args.unshift({});
- return extend.apply(null, args);
- },
- indexOf = helpers.indexOf = function(arrayToSearch, item){
- if (Array.prototype.indexOf) {
- return arrayToSearch.indexOf(item);
- }
- else{
- for (var i = 0; i < arrayToSearch.length; i++) {
- if (arrayToSearch[i] === item) return i;
- }
- return -1;
- }
- },
- where = helpers.where = function(collection, filterCallback){
- var filtered = [];
-
- helpers.each(collection, function(item){
- if (filterCallback(item)){
- filtered.push(item);
- }
- });
-
- return filtered;
- },
- findNextWhere = helpers.findNextWhere = function(arrayToSearch, filterCallback, startIndex){
- // Default to start of the array
- if (!startIndex){
- startIndex = -1;
- }
- for (var i = startIndex + 1; i < arrayToSearch.length; i++) {
- var currentItem = arrayToSearch[i];
- if (filterCallback(currentItem)){
- return currentItem;
- }
- }
- },
- findPreviousWhere = helpers.findPreviousWhere = function(arrayToSearch, filterCallback, startIndex){
- // Default to end of the array
- if (!startIndex){
- startIndex = arrayToSearch.length;
- }
- for (var i = startIndex - 1; i >= 0; i--) {
- var currentItem = arrayToSearch[i];
- if (filterCallback(currentItem)){
- return currentItem;
- }
- }
- },
- inherits = helpers.inherits = function(extensions){
- //Basic javascript inheritance based on the model created in Backbone.js
- var parent = this;
- var ChartElement = (extensions && extensions.hasOwnProperty("constructor")) ? extensions.constructor : function(){ return parent.apply(this, arguments); };
-
- var Surrogate = function(){ this.constructor = ChartElement;};
- Surrogate.prototype = parent.prototype;
- ChartElement.prototype = new Surrogate();
-
- ChartElement.extend = inherits;
-
- if (extensions) extend(ChartElement.prototype, extensions);
-
- ChartElement.__super__ = parent.prototype;
-
- return ChartElement;
- },
- noop = helpers.noop = function(){},
- uid = helpers.uid = (function(){
- var id=0;
- return function(){
- return "chart-" + id++;
- };
- })(),
- warn = helpers.warn = function(str){
- //Method for warning of errors
- if (window.console && typeof window.console.warn == "function") console.warn(str);
- },
- amd = helpers.amd = (typeof define == 'function' && define.amd),
- //-- Math methods
- isNumber = helpers.isNumber = function(n){
- return !isNaN(parseFloat(n)) && isFinite(n);
- },
- max = helpers.max = function(array){
- return Math.max.apply( Math, array );
- },
- min = helpers.min = function(array){
- return Math.min.apply( Math, array );
- },
- cap = helpers.cap = function(valueToCap,maxValue,minValue){
- if(isNumber(maxValue)) {
- if( valueToCap > maxValue ) {
- return maxValue;
- }
- }
- else if(isNumber(minValue)){
- if ( valueToCap < minValue ){
- return minValue;
- }
- }
- return valueToCap;
- },
- getDecimalPlaces = helpers.getDecimalPlaces = function(num){
- if (num%1!==0 && isNumber(num)){
- return num.toString().split(".")[1].length;
- }
- else {
- return 0;
- }
- },
- toRadians = helpers.radians = function(degrees){
- return degrees * (Math.PI/180);
- },
- // Gets the angle from vertical upright to the point about a centre.
- getAngleFromPoint = helpers.getAngleFromPoint = function(centrePoint, anglePoint){
- var distanceFromXCenter = anglePoint.x - centrePoint.x,
- distanceFromYCenter = anglePoint.y - centrePoint.y,
- radialDistanceFromCenter = Math.sqrt( distanceFromXCenter * distanceFromXCenter + distanceFromYCenter * distanceFromYCenter);
-
-
- var angle = Math.PI * 2 + Math.atan2(distanceFromYCenter, distanceFromXCenter);
-
- //If the segment is in the top left quadrant, we need to add another rotation to the angle
- if (distanceFromXCenter < 0 && distanceFromYCenter < 0){
- angle += Math.PI*2;
- }
-
- return {
- angle: angle,
- distance: radialDistanceFromCenter
- };
- },
- aliasPixel = helpers.aliasPixel = function(pixelWidth){
- return (pixelWidth % 2 === 0) ? 0 : 0.5;
- },
- splineCurve = helpers.splineCurve = function(FirstPoint,MiddlePoint,AfterPoint,t){
- //Props to Rob Spencer at scaled innovation for his post on splining between points
- //http://scaledinnovation.com/analytics/splines/aboutSplines.html
- var d01=Math.sqrt(Math.pow(MiddlePoint.x-FirstPoint.x,2)+Math.pow(MiddlePoint.y-FirstPoint.y,2)),
- d12=Math.sqrt(Math.pow(AfterPoint.x-MiddlePoint.x,2)+Math.pow(AfterPoint.y-MiddlePoint.y,2)),
- fa=t*d01/(d01+d12),// scaling factor for triangle Ta
- fb=t*d12/(d01+d12);
- return {
- inner : {
- x : MiddlePoint.x-fa*(AfterPoint.x-FirstPoint.x),
- y : MiddlePoint.y-fa*(AfterPoint.y-FirstPoint.y)
- },
- outer : {
- x: MiddlePoint.x+fb*(AfterPoint.x-FirstPoint.x),
- y : MiddlePoint.y+fb*(AfterPoint.y-FirstPoint.y)
- }
- };
- },
- calculateOrderOfMagnitude = helpers.calculateOrderOfMagnitude = function(val){
- return Math.floor(Math.log(val) / Math.LN10);
- },
- calculateScaleRange = helpers.calculateScaleRange = function(valuesArray, drawingSize, textSize, startFromZero, integersOnly){
-
- //Set a minimum step of two - a point at the top of the graph, and a point at the base
- var minSteps = 2,
- maxSteps = Math.floor(drawingSize/(textSize * 1.5)),
- skipFitting = (minSteps >= maxSteps);
-
- var maxValue = max(valuesArray),
- minValue = min(valuesArray);
-
- // We need some degree of seperation here to calculate the scales if all the values are the same
- // Adding/minusing 0.5 will give us a range of 1.
- if (maxValue === minValue){
- maxValue += 0.5;
- // So we don't end up with a graph with a negative start value if we've said always start from zero
- if (minValue >= 0.5 && !startFromZero){
- minValue -= 0.5;
- }
- else{
- // Make up a whole number above the values
- maxValue += 0.5;
- }
- }
-
- var valueRange = Math.abs(maxValue - minValue),
- rangeOrderOfMagnitude = calculateOrderOfMagnitude(valueRange),
- graphMax = Math.ceil(maxValue / (1 * Math.pow(10, rangeOrderOfMagnitude))) * Math.pow(10, rangeOrderOfMagnitude),
- graphMin = (startFromZero) ? 0 : Math.floor(minValue / (1 * Math.pow(10, rangeOrderOfMagnitude))) * Math.pow(10, rangeOrderOfMagnitude),
- graphRange = graphMax - graphMin,
- stepValue = Math.pow(10, rangeOrderOfMagnitude),
- numberOfSteps = Math.round(graphRange / stepValue);
-
- //If we have more space on the graph we'll use it to give more definition to the data
- while((numberOfSteps > maxSteps || (numberOfSteps * 2) < maxSteps) && !skipFitting) {
- if(numberOfSteps > maxSteps){
- stepValue *=2;
- numberOfSteps = Math.round(graphRange/stepValue);
- // Don't ever deal with a decimal number of steps - cancel fitting and just use the minimum number of steps.
- if (numberOfSteps % 1 !== 0){
- skipFitting = true;
- }
- }
- //We can fit in double the amount of scale points on the scale
- else{
- //If user has declared ints only, and the step value isn't a decimal
- if (integersOnly && rangeOrderOfMagnitude >= 0){
- //If the user has said integers only, we need to check that making the scale more granular wouldn't make it a float
- if(stepValue/2 % 1 === 0){
- stepValue /=2;
- numberOfSteps = Math.round(graphRange/stepValue);
- }
- //If it would make it a float break out of the loop
- else{
- break;
- }
- }
- //If the scale doesn't have to be an int, make the scale more granular anyway.
- else{
- stepValue /=2;
- numberOfSteps = Math.round(graphRange/stepValue);
- }
-
- }
- }
-
- if (skipFitting){
- numberOfSteps = minSteps;
- stepValue = graphRange / numberOfSteps;
- }
-
- return {
- steps : numberOfSteps,
- stepValue : stepValue,
- min : graphMin,
- max : graphMin + (numberOfSteps * stepValue)
- };
-
- },
- /* jshint ignore:start */
- // Blows up jshint errors based on the new Function constructor
- //Templating methods
- //Javascript micro templating by John Resig - source at http://ejohn.org/blog/javascript-micro-templating/
- template = helpers.template = function(templateString, valuesObject){
-
- // If templateString is function rather than string-template - call the function for valuesObject
-
- if(templateString instanceof Function){
- return templateString(valuesObject);
- }
-
- var cache = {};
- function tmpl(str, data){
- // Figure out if we're getting a template, or if we need to
- // load the template - and be sure to cache the result.
- var fn = !/\W/.test(str) ?
- cache[str] = cache[str] :
-
- // Generate a reusable function that will serve as a template
- // generator (and which will be cached).
- new Function("obj",
- "var p=[],print=function(){p.push.apply(p,arguments);};" +
-
- // Introduce the data as local variables using with(){}
- "with(obj){p.push('" +
-
- // Convert the template into pure JavaScript
- str
- .replace(/[\r\t\n]/g, " ")
- .split("<%").join("\t")
- .replace(/((^|%>)[^\t]*)'/g, "$1\r")
- .replace(/\t=(.*?)%>/g, "',$1,'")
- .split("\t").join("');")
- .split("%>").join("p.push('")
- .split("\r").join("\\'") +
- "');}return p.join('');"
- );
-
- // Provide some basic currying to the user
- return data ? fn( data ) : fn;
- }
- return tmpl(templateString,valuesObject);
- },
- /* jshint ignore:end */
- generateLabels = helpers.generateLabels = function(templateString,numberOfSteps,graphMin,stepValue){
- var labelsArray = new Array(numberOfSteps);
- if (labelTemplateString){
- each(labelsArray,function(val,index){
- labelsArray[index] = template(templateString,{value: (graphMin + (stepValue*(index+1)))});
- });
- }
- return labelsArray;
- },
- //--Animation methods
- //Easing functions adapted from Robert Penner's easing equations
- //http://www.robertpenner.com/easing/
- easingEffects = helpers.easingEffects = {
- linear: function (t) {
- return t;
- },
- easeInQuad: function (t) {
- return t * t;
- },
- easeOutQuad: function (t) {
- return -1 * t * (t - 2);
- },
- easeInOutQuad: function (t) {
- if ((t /= 1 / 2) < 1) return 1 / 2 * t * t;
- return -1 / 2 * ((--t) * (t - 2) - 1);
- },
- easeInCubic: function (t) {
- return t * t * t;
- },
- easeOutCubic: function (t) {
- return 1 * ((t = t / 1 - 1) * t * t + 1);
- },
- easeInOutCubic: function (t) {
- if ((t /= 1 / 2) < 1) return 1 / 2 * t * t * t;
- return 1 / 2 * ((t -= 2) * t * t + 2);
- },
- easeInQuart: function (t) {
- return t * t * t * t;
- },
- easeOutQuart: function (t) {
- return -1 * ((t = t / 1 - 1) * t * t * t - 1);
- },
- easeInOutQuart: function (t) {
- if ((t /= 1 / 2) < 1) return 1 / 2 * t * t * t * t;
- return -1 / 2 * ((t -= 2) * t * t * t - 2);
- },
- easeInQuint: function (t) {
- return 1 * (t /= 1) * t * t * t * t;
- },
- easeOutQuint: function (t) {
- return 1 * ((t = t / 1 - 1) * t * t * t * t + 1);
- },
- easeInOutQuint: function (t) {
- if ((t /= 1 / 2) < 1) return 1 / 2 * t * t * t * t * t;
- return 1 / 2 * ((t -= 2) * t * t * t * t + 2);
- },
- easeInSine: function (t) {
- return -1 * Math.cos(t / 1 * (Math.PI / 2)) + 1;
- },
- easeOutSine: function (t) {
- return 1 * Math.sin(t / 1 * (Math.PI / 2));
- },
- easeInOutSine: function (t) {
- return -1 / 2 * (Math.cos(Math.PI * t / 1) - 1);
- },
- easeInExpo: function (t) {
- return (t === 0) ? 1 : 1 * Math.pow(2, 10 * (t / 1 - 1));
- },
- easeOutExpo: function (t) {
- return (t === 1) ? 1 : 1 * (-Math.pow(2, -10 * t / 1) + 1);
- },
- easeInOutExpo: function (t) {
- if (t === 0) return 0;
- if (t === 1) return 1;
- if ((t /= 1 / 2) < 1) return 1 / 2 * Math.pow(2, 10 * (t - 1));
- return 1 / 2 * (-Math.pow(2, -10 * --t) + 2);
- },
- easeInCirc: function (t) {
- if (t >= 1) return t;
- return -1 * (Math.sqrt(1 - (t /= 1) * t) - 1);
- },
- easeOutCirc: function (t) {
- return 1 * Math.sqrt(1 - (t = t / 1 - 1) * t);
- },
- easeInOutCirc: function (t) {
- if ((t /= 1 / 2) < 1) return -1 / 2 * (Math.sqrt(1 - t * t) - 1);
- return 1 / 2 * (Math.sqrt(1 - (t -= 2) * t) + 1);
- },
- easeInElastic: function (t) {
- var s = 1.70158;
- var p = 0;
- var a = 1;
- if (t === 0) return 0;
- if ((t /= 1) == 1) return 1;
- if (!p) p = 1 * 0.3;
- if (a < Math.abs(1)) {
- a = 1;
- s = p / 4;
- } else s = p / (2 * Math.PI) * Math.asin(1 / a);
- return -(a * Math.pow(2, 10 * (t -= 1)) * Math.sin((t * 1 - s) * (2 * Math.PI) / p));
- },
- easeOutElastic: function (t) {
- var s = 1.70158;
- var p = 0;
- var a = 1;
- if (t === 0) return 0;
- if ((t /= 1) == 1) return 1;
- if (!p) p = 1 * 0.3;
- if (a < Math.abs(1)) {
- a = 1;
- s = p / 4;
- } else s = p / (2 * Math.PI) * Math.asin(1 / a);
- return a * Math.pow(2, -10 * t) * Math.sin((t * 1 - s) * (2 * Math.PI) / p) + 1;
- },
- easeInOutElastic: function (t) {
- var s = 1.70158;
- var p = 0;
- var a = 1;
- if (t === 0) return 0;
- if ((t /= 1 / 2) == 2) return 1;
- if (!p) p = 1 * (0.3 * 1.5);
- if (a < Math.abs(1)) {
- a = 1;
- s = p / 4;
- } else s = p / (2 * Math.PI) * Math.asin(1 / a);
- if (t < 1) return -0.5 * (a * Math.pow(2, 10 * (t -= 1)) * Math.sin((t * 1 - s) * (2 * Math.PI) / p));
- return a * Math.pow(2, -10 * (t -= 1)) * Math.sin((t * 1 - s) * (2 * Math.PI) / p) * 0.5 + 1;
- },
- easeInBack: function (t) {
- var s = 1.70158;
- return 1 * (t /= 1) * t * ((s + 1) * t - s);
- },
- easeOutBack: function (t) {
- var s = 1.70158;
- return 1 * ((t = t / 1 - 1) * t * ((s + 1) * t + s) + 1);
- },
- easeInOutBack: function (t) {
- var s = 1.70158;
- if ((t /= 1 / 2) < 1) return 1 / 2 * (t * t * (((s *= (1.525)) + 1) * t - s));
- return 1 / 2 * ((t -= 2) * t * (((s *= (1.525)) + 1) * t + s) + 2);
- },
- easeInBounce: function (t) {
- return 1 - easingEffects.easeOutBounce(1 - t);
- },
- easeOutBounce: function (t) {
- if ((t /= 1) < (1 / 2.75)) {
- return 1 * (7.5625 * t * t);
- } else if (t < (2 / 2.75)) {
- return 1 * (7.5625 * (t -= (1.5 / 2.75)) * t + 0.75);
- } else if (t < (2.5 / 2.75)) {
- return 1 * (7.5625 * (t -= (2.25 / 2.75)) * t + 0.9375);
- } else {
- return 1 * (7.5625 * (t -= (2.625 / 2.75)) * t + 0.984375);
- }
- },
- easeInOutBounce: function (t) {
- if (t < 1 / 2) return easingEffects.easeInBounce(t * 2) * 0.5;
- return easingEffects.easeOutBounce(t * 2 - 1) * 0.5 + 1 * 0.5;
- }
- },
- //Request animation polyfill - http://www.paulirish.com/2011/requestanimationframe-for-smart-animating/
- requestAnimFrame = helpers.requestAnimFrame = (function(){
- return window.requestAnimationFrame ||
- window.webkitRequestAnimationFrame ||
- window.mozRequestAnimationFrame ||
- window.oRequestAnimationFrame ||
- window.msRequestAnimationFrame ||
- function(callback) {
- return window.setTimeout(callback, 1000 / 60);
- };
- })(),
- cancelAnimFrame = helpers.cancelAnimFrame = (function(){
- return window.cancelAnimationFrame ||
- window.webkitCancelAnimationFrame ||
- window.mozCancelAnimationFrame ||
- window.oCancelAnimationFrame ||
- window.msCancelAnimationFrame ||
- function(callback) {
- return window.clearTimeout(callback, 1000 / 60);
- };
- })(),
- animationLoop = helpers.animationLoop = function(callback,totalSteps,easingString,onProgress,onComplete,chartInstance){
-
- var currentStep = 0,
- easingFunction = easingEffects[easingString] || easingEffects.linear;
-
- var animationFrame = function(){
- currentStep++;
- var stepDecimal = currentStep/totalSteps;
- var easeDecimal = easingFunction(stepDecimal);
-
- callback.call(chartInstance,easeDecimal,stepDecimal, currentStep);
- onProgress.call(chartInstance,easeDecimal,stepDecimal);
- if (currentStep < totalSteps){
- chartInstance.animationFrame = requestAnimFrame(animationFrame);
- } else{
- onComplete.apply(chartInstance);
- }
- };
- requestAnimFrame(animationFrame);
- },
- //-- DOM methods
- getRelativePosition = helpers.getRelativePosition = function(evt){
- var mouseX, mouseY;
- var e = evt.originalEvent || evt,
- canvas = evt.currentTarget || evt.srcElement,
- boundingRect = canvas.getBoundingClientRect();
-
- if (e.touches){
- mouseX = e.touches[0].clientX - boundingRect.left;
- mouseY = e.touches[0].clientY - boundingRect.top;
-
- }
- else{
- mouseX = e.clientX - boundingRect.left;
- mouseY = e.clientY - boundingRect.top;
- }
-
- return {
- x : mouseX,
- y : mouseY
- };
-
- },
- addEvent = helpers.addEvent = function(node,eventType,method){
- if (node.addEventListener){
- node.addEventListener(eventType,method);
- } else if (node.attachEvent){
- node.attachEvent("on"+eventType, method);
- } else {
- node["on"+eventType] = method;
- }
- },
- removeEvent = helpers.removeEvent = function(node, eventType, handler){
- if (node.removeEventListener){
- node.removeEventListener(eventType, handler, false);
- } else if (node.detachEvent){
- node.detachEvent("on"+eventType,handler);
- } else{
- node["on" + eventType] = noop;
- }
- },
- bindEvents = helpers.bindEvents = function(chartInstance, arrayOfEvents, handler){
- // Create the events object if it's not already present
- if (!chartInstance.events) chartInstance.events = {};
-
- each(arrayOfEvents,function(eventName){
- chartInstance.events[eventName] = function(){
- handler.apply(chartInstance, arguments);
- };
- addEvent(chartInstance.chart.canvas,eventName,chartInstance.events[eventName]);
- });
- },
- unbindEvents = helpers.unbindEvents = function (chartInstance, arrayOfEvents) {
- each(arrayOfEvents, function(handler,eventName){
- removeEvent(chartInstance.chart.canvas, eventName, handler);
- });
- },
- getMaximumWidth = helpers.getMaximumWidth = function(domNode){
- var container = domNode.parentNode;
- // TODO = check cross browser stuff with this.
- return container.clientWidth;
- },
- getMaximumHeight = helpers.getMaximumHeight = function(domNode){
- var container = domNode.parentNode;
- // TODO = check cross browser stuff with this.
- return container.clientHeight;
- },
- getMaximumSize = helpers.getMaximumSize = helpers.getMaximumWidth, // legacy support
- retinaScale = helpers.retinaScale = function(chart){
- var ctx = chart.ctx,
- width = chart.canvas.width,
- height = chart.canvas.height;
-
- if (window.devicePixelRatio) {
- ctx.canvas.style.width = width + "px";
- ctx.canvas.style.height = height + "px";
- ctx.canvas.height = height * window.devicePixelRatio;
- ctx.canvas.width = width * window.devicePixelRatio;
- ctx.scale(window.devicePixelRatio, window.devicePixelRatio);
- }
- },
- //-- Canvas methods
- clear = helpers.clear = function(chart){
- chart.ctx.clearRect(0,0,chart.width,chart.height);
- },
- fontString = helpers.fontString = function(pixelSize,fontStyle,fontFamily){
- return fontStyle + " " + pixelSize+"px " + fontFamily;
- },
- longestText = helpers.longestText = function(ctx,font,arrayOfStrings){
- ctx.font = font;
- var longest = 0;
- each(arrayOfStrings,function(string){
- var textWidth = ctx.measureText(string).width;
- longest = (textWidth > longest) ? textWidth : longest;
- });
- return longest;
- },
- drawRoundedRectangle = helpers.drawRoundedRectangle = function(ctx,x,y,width,height,radius){
- ctx.beginPath();
- ctx.moveTo(x + radius, y);
- ctx.lineTo(x + width - radius, y);
- ctx.quadraticCurveTo(x + width, y, x + width, y + radius);
- ctx.lineTo(x + width, y + height - radius);
- ctx.quadraticCurveTo(x + width, y + height, x + width - radius, y + height);
- ctx.lineTo(x + radius, y + height);
- ctx.quadraticCurveTo(x, y + height, x, y + height - radius);
- ctx.lineTo(x, y + radius);
- ctx.quadraticCurveTo(x, y, x + radius, y);
- ctx.closePath();
- };
-
-
- //Store a reference to each instance - allowing us to globally resize chart instances on window resize.
- //Destroy method on the chart will remove the instance of the chart from this reference.
- Chart.instances = {};
-
- Chart.Type = function(data,options,chart){
- this.options = options;
- this.chart = chart;
- this.id = uid();
- //Add the chart instance to the global namespace
- Chart.instances[this.id] = this;
-
- // Initialize is always called when a chart type is created
- // By default it is a no op, but it should be extended
- if (options.responsive){
- this.resize();
- }
- this.initialize.call(this,data);
- };
-
- //Core methods that'll be a part of every chart type
- extend(Chart.Type.prototype,{
- initialize : function(){return this;},
- clear : function(){
- clear(this.chart);
- return this;
- },
- stop : function(){
- // Stops any current animation loop occuring
- cancelAnimFrame(this.animationFrame);
- return this;
- },
- resize : function(callback){
- this.stop();
- var canvas = this.chart.canvas,
- newWidth = getMaximumWidth(this.chart.canvas),
- newHeight = this.options.maintainAspectRatio ? newWidth / this.chart.aspectRatio : getMaximumHeight(this.chart.canvas);
-
- canvas.width = this.chart.width = newWidth;
- canvas.height = this.chart.height = newHeight;
-
- retinaScale(this.chart);
-
- if (typeof callback === "function"){
- callback.apply(this, Array.prototype.slice.call(arguments, 1));
- }
- return this;
- },
- reflow : noop,
- render : function(reflow){
- if (reflow){
- this.reflow();
- }
- if (this.options.animation && !reflow){
- helpers.animationLoop(
- this.draw,
- this.options.animationSteps,
- this.options.animationEasing,
- this.options.onAnimationProgress,
- this.options.onAnimationComplete,
- this
- );
- }
- else{
- this.draw();
- this.options.onAnimationComplete.call(this);
- }
- return this;
- },
- generateLegend : function(){
- return template(this.options.legendTemplate,this);
- },
- destroy : function(){
- this.clear();
- unbindEvents(this, this.events);
- var canvas = this.chart.canvas;
-
- // Reset canvas height/width attributes starts a fresh with the canvas context
- canvas.width = this.chart.width;
- canvas.height = this.chart.height;
-
- // < IE9 doesn't support removeProperty
- if (canvas.style.removeProperty) {
- canvas.style.removeProperty('width');
- canvas.style.removeProperty('height');
- } else {
- canvas.style.removeAttribute('width');
- canvas.style.removeAttribute('height');
- }
-
- delete Chart.instances[this.id];
- },
- showTooltip : function(ChartElements, forceRedraw){
- // Only redraw the chart if we've actually changed what we're hovering on.
- if (typeof this.activeElements === 'undefined') this.activeElements = [];
-
- var isChanged = (function(Elements){
- var changed = false;
-
- if (Elements.length !== this.activeElements.length){
- changed = true;
- return changed;
- }
-
- each(Elements, function(element, index){
- if (element !== this.activeElements[index]){
- changed = true;
- }
- }, this);
- return changed;
- }).call(this, ChartElements);
-
- if (!isChanged && !forceRedraw){
- return;
- }
- else{
- this.activeElements = ChartElements;
- }
- this.draw();
- if(this.options.customTooltips){
- this.options.customTooltips(false);
- }
- if (ChartElements.length > 0){
- // If we have multiple datasets, show a MultiTooltip for all of the data points at that index
- if (this.datasets && this.datasets.length > 1) {
- var dataArray,
- dataIndex;
-
- for (var i = this.datasets.length - 1; i >= 0; i--) {
- dataArray = this.datasets[i].points || this.datasets[i].bars || this.datasets[i].segments;
- dataIndex = indexOf(dataArray, ChartElements[0]);
- if (dataIndex !== -1){
- break;
- }
- }
- var tooltipLabels = [],
- tooltipColors = [],
- medianPosition = (function(index) {
-
- // Get all the points at that particular index
- var Elements = [],
- dataCollection,
- xPositions = [],
- yPositions = [],
- xMax,
- yMax,
- xMin,
- yMin;
- helpers.each(this.datasets, function(dataset){
- dataCollection = dataset.points || dataset.bars || dataset.segments;
- if (dataCollection[dataIndex] && dataCollection[dataIndex].hasValue()){
- Elements.push(dataCollection[dataIndex]);
- }
- });
-
- helpers.each(Elements, function(element) {
- xPositions.push(element.x);
- yPositions.push(element.y);
-
-
- //Include any colour information about the element
- tooltipLabels.push(helpers.template(this.options.multiTooltipTemplate, element));
- tooltipColors.push({
- fill: element._saved.fillColor || element.fillColor,
- stroke: element._saved.strokeColor || element.strokeColor
- });
-
- }, this);
-
- yMin = min(yPositions);
- yMax = max(yPositions);
-
- xMin = min(xPositions);
- xMax = max(xPositions);
-
- return {
- x: (xMin > this.chart.width/2) ? xMin : xMax,
- y: (yMin + yMax)/2
- };
- }).call(this, dataIndex);
-
- new Chart.MultiTooltip({
- x: medianPosition.x,
- y: medianPosition.y,
- xPadding: this.options.tooltipXPadding,
- yPadding: this.options.tooltipYPadding,
- xOffset: this.options.tooltipXOffset,
- fillColor: this.options.tooltipFillColor,
- textColor: this.options.tooltipFontColor,
- fontFamily: this.options.tooltipFontFamily,
- fontStyle: this.options.tooltipFontStyle,
- fontSize: this.options.tooltipFontSize,
- titleTextColor: this.options.tooltipTitleFontColor,
- titleFontFamily: this.options.tooltipTitleFontFamily,
- titleFontStyle: this.options.tooltipTitleFontStyle,
- titleFontSize: this.options.tooltipTitleFontSize,
- cornerRadius: this.options.tooltipCornerRadius,
- labels: tooltipLabels,
- legendColors: tooltipColors,
- legendColorBackground : this.options.multiTooltipKeyBackground,
- title: ChartElements[0].label,
- chart: this.chart,
- ctx: this.chart.ctx,
- custom: this.options.customTooltips
- }).draw();
-
- } else {
- each(ChartElements, function(Element) {
- var tooltipPosition = Element.tooltipPosition();
- new Chart.Tooltip({
- x: Math.round(tooltipPosition.x),
- y: Math.round(tooltipPosition.y),
- xPadding: this.options.tooltipXPadding,
- yPadding: this.options.tooltipYPadding,
- fillColor: this.options.tooltipFillColor,
- textColor: this.options.tooltipFontColor,
- fontFamily: this.options.tooltipFontFamily,
- fontStyle: this.options.tooltipFontStyle,
- fontSize: this.options.tooltipFontSize,
- caretHeight: this.options.tooltipCaretSize,
- cornerRadius: this.options.tooltipCornerRadius,
- text: template(this.options.tooltipTemplate, Element),
- chart: this.chart,
- custom: this.options.customTooltips
- }).draw();
- }, this);
- }
- }
- return this;
- },
- toBase64Image : function(){
- return this.chart.canvas.toDataURL.apply(this.chart.canvas, arguments);
- }
- });
-
- Chart.Type.extend = function(extensions){
-
- var parent = this;
-
- var ChartType = function(){
- return parent.apply(this,arguments);
- };
-
- //Copy the prototype object of the this class
- ChartType.prototype = clone(parent.prototype);
- //Now overwrite some of the properties in the base class with the new extensions
- extend(ChartType.prototype, extensions);
-
- ChartType.extend = Chart.Type.extend;
-
- if (extensions.name || parent.prototype.name){
-
- var chartName = extensions.name || parent.prototype.name;
- //Assign any potential default values of the new chart type
-
- //If none are defined, we'll use a clone of the chart type this is being extended from.
- //I.e. if we extend a line chart, we'll use the defaults from the line chart if our new chart
- //doesn't define some defaults of their own.
-
- var baseDefaults = (Chart.defaults[parent.prototype.name]) ? clone(Chart.defaults[parent.prototype.name]) : {};
-
- Chart.defaults[chartName] = extend(baseDefaults,extensions.defaults);
-
- Chart.types[chartName] = ChartType;
-
- //Register this new chart type in the Chart prototype
- Chart.prototype[chartName] = function(data,options){
- var config = merge(Chart.defaults.global, Chart.defaults[chartName], options || {});
- return new ChartType(data,config,this);
- };
- } else{
- warn("Name not provided for this chart, so it hasn't been registered");
- }
- return parent;
- };
-
- Chart.Element = function(configuration){
- extend(this,configuration);
- this.initialize.apply(this,arguments);
- this.save();
- };
- extend(Chart.Element.prototype,{
- initialize : function(){},
- restore : function(props){
- if (!props){
- extend(this,this._saved);
- } else {
- each(props,function(key){
- this[key] = this._saved[key];
- },this);
- }
- return this;
- },
- save : function(){
- this._saved = clone(this);
- delete this._saved._saved;
- return this;
- },
- update : function(newProps){
- each(newProps,function(value,key){
- this._saved[key] = this[key];
- this[key] = value;
- },this);
- return this;
- },
- transition : function(props,ease){
- each(props,function(value,key){
- this[key] = ((value - this._saved[key]) * ease) + this._saved[key];
- },this);
- return this;
- },
- tooltipPosition : function(){
- return {
- x : this.x,
- y : this.y
- };
- },
- hasValue: function(){
- return isNumber(this.value);
- }
- });
-
- Chart.Element.extend = inherits;
-
-
- Chart.Point = Chart.Element.extend({
- display: true,
- inRange: function(chartX,chartY){
- var hitDetectionRange = this.hitDetectionRadius + this.radius;
- return ((Math.pow(chartX-this.x, 2)+Math.pow(chartY-this.y, 2)) < Math.pow(hitDetectionRange,2));
- },
- draw : function(){
- if (this.display){
- var ctx = this.ctx;
- ctx.beginPath();
-
- ctx.arc(this.x, this.y, this.radius, 0, Math.PI*2);
- ctx.closePath();
-
- ctx.strokeStyle = this.strokeColor;
- ctx.lineWidth = this.strokeWidth;
-
- ctx.fillStyle = this.fillColor;
-
- ctx.fill();
- ctx.stroke();
- }
-
-
- //Quick debug for bezier curve splining
- //Highlights control points and the line between them.
- //Handy for dev - stripped in the min version.
-
- // ctx.save();
- // ctx.fillStyle = "black";
- // ctx.strokeStyle = "black"
- // ctx.beginPath();
- // ctx.arc(this.controlPoints.inner.x,this.controlPoints.inner.y, 2, 0, Math.PI*2);
- // ctx.fill();
-
- // ctx.beginPath();
- // ctx.arc(this.controlPoints.outer.x,this.controlPoints.outer.y, 2, 0, Math.PI*2);
- // ctx.fill();
-
- // ctx.moveTo(this.controlPoints.inner.x,this.controlPoints.inner.y);
- // ctx.lineTo(this.x, this.y);
- // ctx.lineTo(this.controlPoints.outer.x,this.controlPoints.outer.y);
- // ctx.stroke();
-
- // ctx.restore();
-
-
-
- }
- });
-
- Chart.Arc = Chart.Element.extend({
- inRange : function(chartX,chartY){
-
- var pointRelativePosition = helpers.getAngleFromPoint(this, {
- x: chartX,
- y: chartY
- });
-
- //Check if within the range of the open/close angle
- var betweenAngles = (pointRelativePosition.angle >= this.startAngle && pointRelativePosition.angle <= this.endAngle),
- withinRadius = (pointRelativePosition.distance >= this.innerRadius && pointRelativePosition.distance <= this.outerRadius);
-
- return (betweenAngles && withinRadius);
- //Ensure within the outside of the arc centre, but inside arc outer
- },
- tooltipPosition : function(){
- var centreAngle = this.startAngle + ((this.endAngle - this.startAngle) / 2),
- rangeFromCentre = (this.outerRadius - this.innerRadius) / 2 + this.innerRadius;
- return {
- x : this.x + (Math.cos(centreAngle) * rangeFromCentre),
- y : this.y + (Math.sin(centreAngle) * rangeFromCentre)
- };
- },
- draw : function(animationPercent){
-
- var easingDecimal = animationPercent || 1;
-
- var ctx = this.ctx;
-
- ctx.beginPath();
-
- ctx.arc(this.x, this.y, this.outerRadius, this.startAngle, this.endAngle);
-
- ctx.arc(this.x, this.y, this.innerRadius, this.endAngle, this.startAngle, true);
-
- ctx.closePath();
- ctx.strokeStyle = this.strokeColor;
- ctx.lineWidth = this.strokeWidth;
-
- ctx.fillStyle = this.fillColor;
-
- ctx.fill();
- ctx.lineJoin = 'bevel';
-
- if (this.showStroke){
- ctx.stroke();
- }
- }
- });
-
- Chart.Rectangle = Chart.Element.extend({
- draw : function(){
- var ctx = this.ctx,
- halfWidth = this.width/2,
- leftX = this.x - halfWidth,
- rightX = this.x + halfWidth,
- top = this.base - (this.base - this.y),
- halfStroke = this.strokeWidth / 2;
-
- // Canvas doesn't allow us to stroke inside the width so we can
- // adjust the sizes to fit if we're setting a stroke on the line
- if (this.showStroke){
- leftX += halfStroke;
- rightX -= halfStroke;
- top += halfStroke;
- }
-
- ctx.beginPath();
-
- ctx.fillStyle = this.fillColor;
- ctx.strokeStyle = this.strokeColor;
- ctx.lineWidth = this.strokeWidth;
-
- // It'd be nice to keep this class totally generic to any rectangle
- // and simply specify which border to miss out.
- ctx.moveTo(leftX, this.base);
- ctx.lineTo(leftX, top);
- ctx.lineTo(rightX, top);
- ctx.lineTo(rightX, this.base);
- ctx.fill();
- if (this.showStroke){
- ctx.stroke();
- }
- },
- height : function(){
- return this.base - this.y;
- },
- inRange : function(chartX,chartY){
- return (chartX >= this.x - this.width/2 && chartX <= this.x + this.width/2) && (chartY >= this.y && chartY <= this.base);
- }
- });
-
- Chart.Tooltip = Chart.Element.extend({
- draw : function(){
-
- var ctx = this.chart.ctx;
-
- ctx.font = fontString(this.fontSize,this.fontStyle,this.fontFamily);
-
- this.xAlign = "center";
- this.yAlign = "above";
-
- //Distance between the actual element.y position and the start of the tooltip caret
- var caretPadding = this.caretPadding = 2;
-
- var tooltipWidth = ctx.measureText(this.text).width + 2*this.xPadding,
- tooltipRectHeight = this.fontSize + 2*this.yPadding,
- tooltipHeight = tooltipRectHeight + this.caretHeight + caretPadding;
-
- if (this.x + tooltipWidth/2 >this.chart.width){
- this.xAlign = "left";
- } else if (this.x - tooltipWidth/2 < 0){
- this.xAlign = "right";
- }
-
- if (this.y - tooltipHeight < 0){
- this.yAlign = "below";
- }
-
-
- var tooltipX = this.x - tooltipWidth/2,
- tooltipY = this.y - tooltipHeight;
-
- ctx.fillStyle = this.fillColor;
-
- // Custom Tooltips
- if(this.custom){
- this.custom(this);
- }
- else{
- switch(this.yAlign)
- {
- case "above":
- //Draw a caret above the x/y
- ctx.beginPath();
- ctx.moveTo(this.x,this.y - caretPadding);
- ctx.lineTo(this.x + this.caretHeight, this.y - (caretPadding + this.caretHeight));
- ctx.lineTo(this.x - this.caretHeight, this.y - (caretPadding + this.caretHeight));
- ctx.closePath();
- ctx.fill();
- break;
- case "below":
- tooltipY = this.y + caretPadding + this.caretHeight;
- //Draw a caret below the x/y
- ctx.beginPath();
- ctx.moveTo(this.x, this.y + caretPadding);
- ctx.lineTo(this.x + this.caretHeight, this.y + caretPadding + this.caretHeight);
- ctx.lineTo(this.x - this.caretHeight, this.y + caretPadding + this.caretHeight);
- ctx.closePath();
- ctx.fill();
- break;
- }
-
- switch(this.xAlign)
- {
- case "left":
- tooltipX = this.x - tooltipWidth + (this.cornerRadius + this.caretHeight);
- break;
- case "right":
- tooltipX = this.x - (this.cornerRadius + this.caretHeight);
- break;
- }
-
- drawRoundedRectangle(ctx,tooltipX,tooltipY,tooltipWidth,tooltipRectHeight,this.cornerRadius);
-
- ctx.fill();
-
- ctx.fillStyle = this.textColor;
- ctx.textAlign = "center";
- ctx.textBaseline = "middle";
- ctx.fillText(this.text, tooltipX + tooltipWidth/2, tooltipY + tooltipRectHeight/2);
- }
- }
- });
-
- Chart.MultiTooltip = Chart.Element.extend({
- initialize : function(){
- this.font = fontString(this.fontSize,this.fontStyle,this.fontFamily);
-
- this.titleFont = fontString(this.titleFontSize,this.titleFontStyle,this.titleFontFamily);
-
- this.height = (this.labels.length * this.fontSize) + ((this.labels.length-1) * (this.fontSize/2)) + (this.yPadding*2) + this.titleFontSize *1.5;
-
- this.ctx.font = this.titleFont;
-
- var titleWidth = this.ctx.measureText(this.title).width,
- //Label has a legend square as well so account for this.
- labelWidth = longestText(this.ctx,this.font,this.labels) + this.fontSize + 3,
- longestTextWidth = max([labelWidth,titleWidth]);
-
- this.width = longestTextWidth + (this.xPadding*2);
-
-
- var halfHeight = this.height/2;
-
- //Check to ensure the height will fit on the canvas
- if (this.y - halfHeight < 0 ){
- this.y = halfHeight;
- } else if (this.y + halfHeight > this.chart.height){
- this.y = this.chart.height - halfHeight;
- }
-
- //Decide whether to align left or right based on position on canvas
- if (this.x > this.chart.width/2){
- this.x -= this.xOffset + this.width;
- } else {
- this.x += this.xOffset;
- }
-
-
- },
- getLineHeight : function(index){
- var baseLineHeight = this.y - (this.height/2) + this.yPadding,
- afterTitleIndex = index-1;
-
- //If the index is zero, we're getting the title
- if (index === 0){
- return baseLineHeight + this.titleFontSize/2;
- } else{
- return baseLineHeight + ((this.fontSize*1.5*afterTitleIndex) + this.fontSize/2) + this.titleFontSize * 1.5;
- }
-
- },
- draw : function(){
- // Custom Tooltips
- if(this.custom){
- this.custom(this);
- }
- else{
- drawRoundedRectangle(this.ctx,this.x,this.y - this.height/2,this.width,this.height,this.cornerRadius);
- var ctx = this.ctx;
- ctx.fillStyle = this.fillColor;
- ctx.fill();
- ctx.closePath();
-
- ctx.textAlign = "left";
- ctx.textBaseline = "middle";
- ctx.fillStyle = this.titleTextColor;
- ctx.font = this.titleFont;
-
- ctx.fillText(this.title,this.x + this.xPadding, this.getLineHeight(0));
-
- ctx.font = this.font;
- helpers.each(this.labels,function(label,index){
- ctx.fillStyle = this.textColor;
- ctx.fillText(label,this.x + this.xPadding + this.fontSize + 3, this.getLineHeight(index + 1));
-
- //A bit gnarly, but clearing this rectangle breaks when using explorercanvas (clears whole canvas)
- //ctx.clearRect(this.x + this.xPadding, this.getLineHeight(index + 1) - this.fontSize/2, this.fontSize, this.fontSize);
- //Instead we'll make a white filled block to put the legendColour palette over.
-
- ctx.fillStyle = this.legendColorBackground;
- ctx.fillRect(this.x + this.xPadding, this.getLineHeight(index + 1) - this.fontSize/2, this.fontSize, this.fontSize);
-
- ctx.fillStyle = this.legendColors[index].fill;
- ctx.fillRect(this.x + this.xPadding, this.getLineHeight(index + 1) - this.fontSize/2, this.fontSize, this.fontSize);
-
-
- },this);
- }
- }
- });
-
- Chart.Scale = Chart.Element.extend({
- initialize : function(){
- this.fit();
- },
- buildYLabels : function(){
- this.yLabels = [];
-
- var stepDecimalPlaces = getDecimalPlaces(this.stepValue);
-
- for (var i=0; i<=this.steps; i++){
- this.yLabels.push(template(this.templateString,{value:(this.min + (i * this.stepValue)).toFixed(stepDecimalPlaces)}));
- }
- this.yLabelWidth = (this.display && this.showLabels) ? longestText(this.ctx,this.font,this.yLabels) : 0;
- },
- addXLabel : function(label){
- this.xLabels.push(label);
- this.valuesCount++;
- this.fit();
- },
- removeXLabel : function(){
- this.xLabels.shift();
- this.valuesCount--;
- this.fit();
- },
- // Fitting loop to rotate x Labels and figure out what fits there, and also calculate how many Y steps to use
- fit: function(){
- // First we need the width of the yLabels, assuming the xLabels aren't rotated
-
- // To do that we need the base line at the top and base of the chart, assuming there is no x label rotation
- this.startPoint = (this.display) ? this.fontSize : 0;
- this.endPoint = (this.display) ? this.height - (this.fontSize * 1.5) - 5 : this.height; // -5 to pad labels
-
- // Apply padding settings to the start and end point.
- this.startPoint += this.padding;
- this.endPoint -= this.padding;
-
- // Cache the starting height, so can determine if we need to recalculate the scale yAxis
- var cachedHeight = this.endPoint - this.startPoint,
- cachedYLabelWidth;
-
- // Build the current yLabels so we have an idea of what size they'll be to start
- /*
- * This sets what is returned from calculateScaleRange as static properties of this class:
- *
- this.steps;
- this.stepValue;
- this.min;
- this.max;
- *
- */
- this.calculateYRange(cachedHeight);
-
- // With these properties set we can now build the array of yLabels
- // and also the width of the largest yLabel
- this.buildYLabels();
-
- this.calculateXLabelRotation();
-
- while((cachedHeight > this.endPoint - this.startPoint)){
- cachedHeight = this.endPoint - this.startPoint;
- cachedYLabelWidth = this.yLabelWidth;
-
- this.calculateYRange(cachedHeight);
- this.buildYLabels();
-
- // Only go through the xLabel loop again if the yLabel width has changed
- if (cachedYLabelWidth < this.yLabelWidth){
- this.calculateXLabelRotation();
- }
- }
-
- },
- calculateXLabelRotation : function(){
- //Get the width of each grid by calculating the difference
- //between x offsets between 0 and 1.
-
- this.ctx.font = this.font;
-
- var firstWidth = this.ctx.measureText(this.xLabels[0]).width,
- lastWidth = this.ctx.measureText(this.xLabels[this.xLabels.length - 1]).width,
- firstRotated,
- lastRotated;
-
-
- this.xScalePaddingRight = lastWidth/2 + 3;
- this.xScalePaddingLeft = (firstWidth/2 > this.yLabelWidth + 10) ? firstWidth/2 : this.yLabelWidth + 10;
-
- this.xLabelRotation = 0;
- if (this.display){
- var originalLabelWidth = longestText(this.ctx,this.font,this.xLabels),
- cosRotation,
- firstRotatedWidth;
- this.xLabelWidth = originalLabelWidth;
- //Allow 3 pixels x2 padding either side for label readability
- var xGridWidth = Math.floor(this.calculateX(1) - this.calculateX(0)) - 6;
-
- //Max label rotate should be 90 - also act as a loop counter
- while ((this.xLabelWidth > xGridWidth && this.xLabelRotation === 0) || (this.xLabelWidth > xGridWidth && this.xLabelRotation <= 90 && this.xLabelRotation > 0)){
- cosRotation = Math.cos(toRadians(this.xLabelRotation));
-
- firstRotated = cosRotation * firstWidth;
- lastRotated = cosRotation * lastWidth;
-
- // We're right aligning the text now.
- if (firstRotated + this.fontSize / 2 > this.yLabelWidth + 8){
- this.xScalePaddingLeft = firstRotated + this.fontSize / 2;
- }
- this.xScalePaddingRight = this.fontSize/2;
-
-
- this.xLabelRotation++;
- this.xLabelWidth = cosRotation * originalLabelWidth;
-
- }
- if (this.xLabelRotation > 0){
- this.endPoint -= Math.sin(toRadians(this.xLabelRotation))*originalLabelWidth + 3;
- }
- }
- else{
- this.xLabelWidth = 0;
- this.xScalePaddingRight = this.padding;
- this.xScalePaddingLeft = this.padding;
- }
-
- },
- // Needs to be overidden in each Chart type
- // Otherwise we need to pass all the data into the scale class
- calculateYRange: noop,
- drawingArea: function(){
- return this.startPoint - this.endPoint;
- },
- calculateY : function(value){
- var scalingFactor = this.drawingArea() / (this.min - this.max);
- return this.endPoint - (scalingFactor * (value - this.min));
- },
- calculateX : function(index){
- var isRotated = (this.xLabelRotation > 0),
- // innerWidth = (this.offsetGridLines) ? this.width - offsetLeft - this.padding : this.width - (offsetLeft + halfLabelWidth * 2) - this.padding,
- innerWidth = this.width - (this.xScalePaddingLeft + this.xScalePaddingRight),
- valueWidth = innerWidth/Math.max((this.valuesCount - ((this.offsetGridLines) ? 0 : 1)), 1),
- valueOffset = (valueWidth * index) + this.xScalePaddingLeft;
-
- if (this.offsetGridLines){
- valueOffset += (valueWidth/2);
- }
-
- return Math.round(valueOffset);
- },
- update : function(newProps){
- helpers.extend(this, newProps);
- this.fit();
- },
- draw : function(){
- var ctx = this.ctx,
- yLabelGap = (this.endPoint - this.startPoint) / this.steps,
- xStart = Math.round(this.xScalePaddingLeft);
- if (this.display){
- ctx.fillStyle = this.textColor;
- ctx.font = this.font;
- each(this.yLabels,function(labelString,index){
- var yLabelCenter = this.endPoint - (yLabelGap * index),
- linePositionY = Math.round(yLabelCenter),
- drawHorizontalLine = this.showHorizontalLines;
-
- ctx.textAlign = "right";
- ctx.textBaseline = "middle";
- if (this.showLabels){
- ctx.fillText(labelString,xStart - 10,yLabelCenter);
- }
-
- // This is X axis, so draw it
- if (index === 0 && !drawHorizontalLine){
- drawHorizontalLine = true;
- }
-
- if (drawHorizontalLine){
- ctx.beginPath();
- }
-
- if (index > 0){
- // This is a grid line in the centre, so drop that
- ctx.lineWidth = this.gridLineWidth;
- ctx.strokeStyle = this.gridLineColor;
- } else {
- // This is the first line on the scale
- ctx.lineWidth = this.lineWidth;
- ctx.strokeStyle = this.lineColor;
- }
-
- linePositionY += helpers.aliasPixel(ctx.lineWidth);
-
- if(drawHorizontalLine){
- ctx.moveTo(xStart, linePositionY);
- ctx.lineTo(this.width, linePositionY);
- ctx.stroke();
- ctx.closePath();
- }
-
- ctx.lineWidth = this.lineWidth;
- ctx.strokeStyle = this.lineColor;
- ctx.beginPath();
- ctx.moveTo(xStart - 5, linePositionY);
- ctx.lineTo(xStart, linePositionY);
- ctx.stroke();
- ctx.closePath();
-
- },this);
-
- each(this.xLabels,function(label,index){
- var xPos = this.calculateX(index) + aliasPixel(this.lineWidth),
- // Check to see if line/bar here and decide where to place the line
- linePos = this.calculateX(index - (this.offsetGridLines ? 0.5 : 0)) + aliasPixel(this.lineWidth),
- isRotated = (this.xLabelRotation > 0),
- drawVerticalLine = this.showVerticalLines;
-
- // This is Y axis, so draw it
- if (index === 0 && !drawVerticalLine){
- drawVerticalLine = true;
- }
-
- if (drawVerticalLine){
- ctx.beginPath();
- }
-
- if (index > 0){
- // This is a grid line in the centre, so drop that
- ctx.lineWidth = this.gridLineWidth;
- ctx.strokeStyle = this.gridLineColor;
- } else {
- // This is the first line on the scale
- ctx.lineWidth = this.lineWidth;
- ctx.strokeStyle = this.lineColor;
- }
-
- if (drawVerticalLine){
- ctx.moveTo(linePos,this.endPoint);
- ctx.lineTo(linePos,this.startPoint - 3);
- ctx.stroke();
- ctx.closePath();
- }
-
-
- ctx.lineWidth = this.lineWidth;
- ctx.strokeStyle = this.lineColor;
-
-
- // Small lines at the bottom of the base grid line
- ctx.beginPath();
- ctx.moveTo(linePos,this.endPoint);
- ctx.lineTo(linePos,this.endPoint + 5);
- ctx.stroke();
- ctx.closePath();
-
- ctx.save();
- ctx.translate(xPos,(isRotated) ? this.endPoint + 12 : this.endPoint + 8);
- ctx.rotate(toRadians(this.xLabelRotation)*-1);
- ctx.font = this.font;
- ctx.textAlign = (isRotated) ? "right" : "center";
- ctx.textBaseline = (isRotated) ? "middle" : "top";
- ctx.fillText(label, 0, 0);
- ctx.restore();
- },this);
-
- }
- }
-
- });
-
- Chart.RadialScale = Chart.Element.extend({
- initialize: function(){
- this.size = min([this.height, this.width]);
- this.drawingArea = (this.display) ? (this.size/2) - (this.fontSize/2 + this.backdropPaddingY) : (this.size/2);
- },
- calculateCenterOffset: function(value){
- // Take into account half font size + the yPadding of the top value
- var scalingFactor = this.drawingArea / (this.max - this.min);
-
- return (value - this.min) * scalingFactor;
- },
- update : function(){
- if (!this.lineArc){
- this.setScaleSize();
- } else {
- this.drawingArea = (this.display) ? (this.size/2) - (this.fontSize/2 + this.backdropPaddingY) : (this.size/2);
- }
- this.buildYLabels();
- },
- buildYLabels: function(){
- this.yLabels = [];
-
- var stepDecimalPlaces = getDecimalPlaces(this.stepValue);
-
- for (var i=0; i<=this.steps; i++){
- this.yLabels.push(template(this.templateString,{value:(this.min + (i * this.stepValue)).toFixed(stepDecimalPlaces)}));
- }
- },
- getCircumference : function(){
- return ((Math.PI*2) / this.valuesCount);
- },
- setScaleSize: function(){
- /*
- * Right, this is really confusing and there is a lot of maths going on here
- * The gist of the problem is here: https://gist.github.com/nnnick/696cc9c55f4b0beb8fe9
- *
- * Reaction: https://dl.dropboxusercontent.com/u/34601363/toomuchscience.gif
- *
- * Solution:
- *
- * We assume the radius of the polygon is half the size of the canvas at first
- * at each index we check if the text overlaps.
- *
- * Where it does, we store that angle and that index.
- *
- * After finding the largest index and angle we calculate how much we need to remove
- * from the shape radius to move the point inwards by that x.
- *
- * We average the left and right distances to get the maximum shape radius that can fit in the box
- * along with labels.
- *
- * Once we have that, we can find the centre point for the chart, by taking the x text protrusion
- * on each side, removing that from the size, halving it and adding the left x protrusion width.
- *
- * This will mean we have a shape fitted to the canvas, as large as it can be with the labels
- * and position it in the most space efficient manner
- *
- * https://dl.dropboxusercontent.com/u/34601363/yeahscience.gif
- */
-
-
- // Get maximum radius of the polygon. Either half the height (minus the text width) or half the width.
- // Use this to calculate the offset + change. - Make sure L/R protrusion is at least 0 to stop issues with centre points
- var largestPossibleRadius = min([(this.height/2 - this.pointLabelFontSize - 5), this.width/2]),
- pointPosition,
- i,
- textWidth,
- halfTextWidth,
- furthestRight = this.width,
- furthestRightIndex,
- furthestRightAngle,
- furthestLeft = 0,
- furthestLeftIndex,
- furthestLeftAngle,
- xProtrusionLeft,
- xProtrusionRight,
- radiusReductionRight,
- radiusReductionLeft,
- maxWidthRadius;
- this.ctx.font = fontString(this.pointLabelFontSize,this.pointLabelFontStyle,this.pointLabelFontFamily);
- for (i=0;i<this.valuesCount;i++){
- // 5px to space the text slightly out - similar to what we do in the draw function.
- pointPosition = this.getPointPosition(i, largestPossibleRadius);
- textWidth = this.ctx.measureText(template(this.templateString, { value: this.labels[i] })).width + 5;
- if (i === 0 || i === this.valuesCount/2){
- // If we're at index zero, or exactly the middle, we're at exactly the top/bottom
- // of the radar chart, so text will be aligned centrally, so we'll half it and compare
- // w/left and right text sizes
- halfTextWidth = textWidth/2;
- if (pointPosition.x + halfTextWidth > furthestRight) {
- furthestRight = pointPosition.x + halfTextWidth;
- furthestRightIndex = i;
- }
- if (pointPosition.x - halfTextWidth < furthestLeft) {
- furthestLeft = pointPosition.x - halfTextWidth;
- furthestLeftIndex = i;
- }
- }
- else if (i < this.valuesCount/2) {
- // Less than half the values means we'll left align the text
- if (pointPosition.x + textWidth > furthestRight) {
- furthestRight = pointPosition.x + textWidth;
- furthestRightIndex = i;
- }
- }
- else if (i > this.valuesCount/2){
- // More than half the values means we'll right align the text
- if (pointPosition.x - textWidth < furthestLeft) {
- furthestLeft = pointPosition.x - textWidth;
- furthestLeftIndex = i;
- }
- }
- }
-
- xProtrusionLeft = furthestLeft;
-
- xProtrusionRight = Math.ceil(furthestRight - this.width);
-
- furthestRightAngle = this.getIndexAngle(furthestRightIndex);
-
- furthestLeftAngle = this.getIndexAngle(furthestLeftIndex);
-
- radiusReductionRight = xProtrusionRight / Math.sin(furthestRightAngle + Math.PI/2);
-
- radiusReductionLeft = xProtrusionLeft / Math.sin(furthestLeftAngle + Math.PI/2);
-
- // Ensure we actually need to reduce the size of the chart
- radiusReductionRight = (isNumber(radiusReductionRight)) ? radiusReductionRight : 0;
- radiusReductionLeft = (isNumber(radiusReductionLeft)) ? radiusReductionLeft : 0;
-
- this.drawingArea = largestPossibleRadius - (radiusReductionLeft + radiusReductionRight)/2;
-
- //this.drawingArea = min([maxWidthRadius, (this.height - (2 * (this.pointLabelFontSize + 5)))/2])
- this.setCenterPoint(radiusReductionLeft, radiusReductionRight);
-
- },
- setCenterPoint: function(leftMovement, rightMovement){
-
- var maxRight = this.width - rightMovement - this.drawingArea,
- maxLeft = leftMovement + this.drawingArea;
-
- this.xCenter = (maxLeft + maxRight)/2;
- // Always vertically in the centre as the text height doesn't change
- this.yCenter = (this.height/2);
- },
-
- getIndexAngle : function(index){
- var angleMultiplier = (Math.PI * 2) / this.valuesCount;
- // Start from the top instead of right, so remove a quarter of the circle
-
- return index * angleMultiplier - (Math.PI/2);
- },
- getPointPosition : function(index, distanceFromCenter){
- var thisAngle = this.getIndexAngle(index);
- return {
- x : (Math.cos(thisAngle) * distanceFromCenter) + this.xCenter,
- y : (Math.sin(thisAngle) * distanceFromCenter) + this.yCenter
- };
- },
- draw: function(){
- if (this.display){
- var ctx = this.ctx;
- each(this.yLabels, function(label, index){
- // Don't draw a centre value
- if (index > 0){
- var yCenterOffset = index * (this.drawingArea/this.steps),
- yHeight = this.yCenter - yCenterOffset,
- pointPosition;
-
- // Draw circular lines around the scale
- if (this.lineWidth > 0){
- ctx.strokeStyle = this.lineColor;
- ctx.lineWidth = this.lineWidth;
-
- if(this.lineArc){
- ctx.beginPath();
- ctx.arc(this.xCenter, this.yCenter, yCenterOffset, 0, Math.PI*2);
- ctx.closePath();
- ctx.stroke();
- } else{
- ctx.beginPath();
- for (var i=0;i<this.valuesCount;i++)
- {
- pointPosition = this.getPointPosition(i, this.calculateCenterOffset(this.min + (index * this.stepValue)));
- if (i === 0){
- ctx.moveTo(pointPosition.x, pointPosition.y);
- } else {
- ctx.lineTo(pointPosition.x, pointPosition.y);
- }
- }
- ctx.closePath();
- ctx.stroke();
- }
- }
- if(this.showLabels){
- ctx.font = fontString(this.fontSize,this.fontStyle,this.fontFamily);
- if (this.showLabelBackdrop){
- var labelWidth = ctx.measureText(label).width;
- ctx.fillStyle = this.backdropColor;
- ctx.fillRect(
- this.xCenter - labelWidth/2 - this.backdropPaddingX,
- yHeight - this.fontSize/2 - this.backdropPaddingY,
- labelWidth + this.backdropPaddingX*2,
- this.fontSize + this.backdropPaddingY*2
- );
- }
- ctx.textAlign = 'center';
- ctx.textBaseline = "middle";
- ctx.fillStyle = this.fontColor;
- ctx.fillText(label, this.xCenter, yHeight);
- }
- }
- }, this);
-
- if (!this.lineArc){
- ctx.lineWidth = this.angleLineWidth;
- ctx.strokeStyle = this.angleLineColor;
- for (var i = this.valuesCount - 1; i >= 0; i--) {
- if (this.angleLineWidth > 0){
- var outerPosition = this.getPointPosition(i, this.calculateCenterOffset(this.max));
- ctx.beginPath();
- ctx.moveTo(this.xCenter, this.yCenter);
- ctx.lineTo(outerPosition.x, outerPosition.y);
- ctx.stroke();
- ctx.closePath();
- }
- // Extra 3px out for some label spacing
- var pointLabelPosition = this.getPointPosition(i, this.calculateCenterOffset(this.max) + 5);
- ctx.font = fontString(this.pointLabelFontSize,this.pointLabelFontStyle,this.pointLabelFontFamily);
- ctx.fillStyle = this.pointLabelFontColor;
-
- var labelsCount = this.labels.length,
- halfLabelsCount = this.labels.length/2,
- quarterLabelsCount = halfLabelsCount/2,
- upperHalf = (i < quarterLabelsCount || i > labelsCount - quarterLabelsCount),
- exactQuarter = (i === quarterLabelsCount || i === labelsCount - quarterLabelsCount);
- if (i === 0){
- ctx.textAlign = 'center';
- } else if(i === halfLabelsCount){
- ctx.textAlign = 'center';
- } else if (i < halfLabelsCount){
- ctx.textAlign = 'left';
- } else {
- ctx.textAlign = 'right';
- }
-
- // Set the correct text baseline based on outer positioning
- if (exactQuarter){
- ctx.textBaseline = 'middle';
- } else if (upperHalf){
- ctx.textBaseline = 'bottom';
- } else {
- ctx.textBaseline = 'top';
- }
-
- ctx.fillText(this.labels[i], pointLabelPosition.x, pointLabelPosition.y);
- }
- }
- }
- }
- });
-
- // Attach global event to resize each chart instance when the browser resizes
- helpers.addEvent(window, "resize", (function(){
- // Basic debounce of resize function so it doesn't hurt performance when resizing browser.
- var timeout;
- return function(){
- clearTimeout(timeout);
- timeout = setTimeout(function(){
- each(Chart.instances,function(instance){
- // If the responsive flag is set in the chart instance config
- // Cascade the resize event down to the chart.
- if (instance.options.responsive){
- instance.resize(instance.render, true);
- }
- });
- }, 50);
- };
- })());
-
-
- if (amd) {
- define(function(){
- return Chart;
- });
- } else if (typeof module === 'object' && module.exports) {
- module.exports = Chart;
- }
-
- root.Chart = Chart;
-
- Chart.noConflict = function(){
- root.Chart = previous;
- return Chart;
- };
-
-}).call(this);
diff --git a/applications/auto-scale/gui/src/vendor/Chart.js/src/Chart.Doughnut.js b/applications/auto-scale/gui/src/vendor/Chart.js/src/Chart.Doughnut.js
deleted file mode 100644
index a892b0e..0000000
--- a/applications/auto-scale/gui/src/vendor/Chart.js/src/Chart.Doughnut.js
+++ /dev/null
@@ -1,184 +0,0 @@
-(function(){
- "use strict";
-
- var root = this,
- Chart = root.Chart,
- //Cache a local reference to Chart.helpers
- helpers = Chart.helpers;
-
- var defaultConfig = {
- //Boolean - Whether we should show a stroke on each segment
- segmentShowStroke : true,
-
- //String - The colour of each segment stroke
- segmentStrokeColor : "#fff",
-
- //Number - The width of each segment stroke
- segmentStrokeWidth : 2,
-
- //The percentage of the chart that we cut out of the middle.
- percentageInnerCutout : 50,
-
- //Number - Amount of animation steps
- animationSteps : 100,
-
- //String - Animation easing effect
- animationEasing : "easeOutBounce",
-
- //Boolean - Whether we animate the rotation of the Doughnut
- animateRotate : true,
-
- //Boolean - Whether we animate scaling the Doughnut from the centre
- animateScale : false,
-
- //String - A legend template
- legendTemplate : "<ul class=\"<%=name.toLowerCase()%>-legend\"><% for (var i=0; i<segments.length; i++){%><li><span style=\"background-color:<%=segments[i].fillColor%>\"></span><%if(segments[i].label){%><%=segments[i].label%><%}%></li><%}%></ul>"
-
- };
-
-
- Chart.Type.extend({
- //Passing in a name registers this chart in the Chart namespace
- name: "Doughnut",
- //Providing a defaults will also register the deafults in the chart namespace
- defaults : defaultConfig,
- //Initialize is fired when the chart is initialized - Data is passed in as a parameter
- //Config is automatically merged by the core of Chart.js, and is available at this.options
- initialize: function(data){
-
- //Declare segments as a static property to prevent inheriting across the Chart type prototype
- this.segments = [];
- this.outerRadius = (helpers.min([this.chart.width,this.chart.height]) - this.options.segmentStrokeWidth/2)/2;
-
- this.SegmentArc = Chart.Arc.extend({
- ctx : this.chart.ctx,
- x : this.chart.width/2,
- y : this.chart.height/2
- });
-
- //Set up tooltip events on the chart
- if (this.options.showTooltips){
- helpers.bindEvents(this, this.options.tooltipEvents, function(evt){
- var activeSegments = (evt.type !== 'mouseout') ? this.getSegmentsAtEvent(evt) : [];
-
- helpers.each(this.segments,function(segment){
- segment.restore(["fillColor"]);
- });
- helpers.each(activeSegments,function(activeSegment){
- activeSegment.fillColor = activeSegment.highlightColor;
- });
- this.showTooltip(activeSegments);
- });
- }
- this.calculateTotal(data);
-
- helpers.each(data,function(datapoint, index){
- this.addData(datapoint, index, true);
- },this);
-
- this.render();
- },
- getSegmentsAtEvent : function(e){
- var segmentsArray = [];
-
- var location = helpers.getRelativePosition(e);
-
- helpers.each(this.segments,function(segment){
- if (segment.inRange(location.x,location.y)) segmentsArray.push(segment);
- },this);
- return segmentsArray;
- },
- addData : function(segment, atIndex, silent){
- var index = atIndex || this.segments.length;
- this.segments.splice(index, 0, new this.SegmentArc({
- value : segment.value,
- outerRadius : (this.options.animateScale) ? 0 : this.outerRadius,
- innerRadius : (this.options.animateScale) ? 0 : (this.outerRadius/100) * this.options.percentageInnerCutout,
- fillColor : segment.color,
- highlightColor : segment.highlight || segment.color,
- showStroke : this.options.segmentShowStroke,
- strokeWidth : this.options.segmentStrokeWidth,
- strokeColor : this.options.segmentStrokeColor,
- startAngle : Math.PI * 1.5,
- circumference : (this.options.animateRotate) ? 0 : this.calculateCircumference(segment.value),
- label : segment.label
- }));
- if (!silent){
- this.reflow();
- this.update();
- }
- },
- calculateCircumference : function(value){
- return (Math.PI*2)*(Math.abs(value) / this.total);
- },
- calculateTotal : function(data){
- this.total = 0;
- helpers.each(data,function(segment){
- this.total += Math.abs(segment.value);
- },this);
- },
- update : function(){
- this.calculateTotal(this.segments);
-
- // Reset any highlight colours before updating.
- helpers.each(this.activeElements, function(activeElement){
- activeElement.restore(['fillColor']);
- });
-
- helpers.each(this.segments,function(segment){
- segment.save();
- });
- this.render();
- },
-
- removeData: function(atIndex){
- var indexToDelete = (helpers.isNumber(atIndex)) ? atIndex : this.segments.length-1;
- this.segments.splice(indexToDelete, 1);
- this.reflow();
- this.update();
- },
-
- reflow : function(){
- helpers.extend(this.SegmentArc.prototype,{
- x : this.chart.width/2,
- y : this.chart.height/2
- });
- this.outerRadius = (helpers.min([this.chart.width,this.chart.height]) - this.options.segmentStrokeWidth/2)/2;
- helpers.each(this.segments, function(segment){
- segment.update({
- outerRadius : this.outerRadius,
- innerRadius : (this.outerRadius/100) * this.options.percentageInnerCutout
- });
- }, this);
- },
- draw : function(easeDecimal){
- var animDecimal = (easeDecimal) ? easeDecimal : 1;
- this.clear();
- helpers.each(this.segments,function(segment,index){
- segment.transition({
- circumference : this.calculateCircumference(segment.value),
- outerRadius : this.outerRadius,
- innerRadius : (this.outerRadius/100) * this.options.percentageInnerCutout
- },animDecimal);
-
- segment.endAngle = segment.startAngle + segment.circumference;
-
- segment.draw();
- if (index === 0){
- segment.startAngle = Math.PI * 1.5;
- }
- //Check to see if it's the last segment, if not get the next and update the start angle
- if (index < this.segments.length-1){
- this.segments[index+1].startAngle = segment.endAngle;
- }
- },this);
-
- }
- });
-
- Chart.types.Doughnut.extend({
- name : "Pie",
- defaults : helpers.merge(defaultConfig,{percentageInnerCutout : 0})
- });
-
-}).call(this);
\ No newline at end of file
diff --git a/applications/auto-scale/gui/src/vendor/Chart.js/src/Chart.Line.js b/applications/auto-scale/gui/src/vendor/Chart.js/src/Chart.Line.js
deleted file mode 100644
index 34ad85b..0000000
--- a/applications/auto-scale/gui/src/vendor/Chart.js/src/Chart.Line.js
+++ /dev/null
@@ -1,374 +0,0 @@
-(function(){
- "use strict";
-
- var root = this,
- Chart = root.Chart,
- helpers = Chart.helpers;
-
- var defaultConfig = {
-
- ///Boolean - Whether grid lines are shown across the chart
- scaleShowGridLines : true,
-
- //String - Colour of the grid lines
- scaleGridLineColor : "rgba(0,0,0,.05)",
-
- //Number - Width of the grid lines
- scaleGridLineWidth : 1,
-
- //Boolean - Whether to show horizontal lines (except X axis)
- scaleShowHorizontalLines: true,
-
- //Boolean - Whether to show vertical lines (except Y axis)
- scaleShowVerticalLines: true,
-
- //Boolean - Whether the line is curved between points
- bezierCurve : true,
-
- //Number - Tension of the bezier curve between points
- bezierCurveTension : 0.4,
-
- //Boolean - Whether to show a dot for each point
- pointDot : true,
-
- //Number - Radius of each point dot in pixels
- pointDotRadius : 4,
-
- //Number - Pixel width of point dot stroke
- pointDotStrokeWidth : 1,
-
- //Number - amount extra to add to the radius to cater for hit detection outside the drawn point
- pointHitDetectionRadius : 20,
-
- //Boolean - Whether to show a stroke for datasets
- datasetStroke : true,
-
- //Number - Pixel width of dataset stroke
- datasetStrokeWidth : 2,
-
- //Boolean - Whether to fill the dataset with a colour
- datasetFill : true,
-
- //String - A legend template
- legendTemplate : "<ul class=\"<%=name.toLowerCase()%>-legend\"><% for (var i=0; i<datasets.length; i++){%><li><span style=\"background-color:<%=datasets[i].strokeColor%>\"></span><%if(datasets[i].label){%><%=datasets[i].label%><%}%></li><%}%></ul>"
-
- };
-
-
- Chart.Type.extend({
- name: "Line",
- defaults : defaultConfig,
- initialize: function(data){
- //Declare the extension of the default point, to cater for the options passed in to the constructor
- this.PointClass = Chart.Point.extend({
- strokeWidth : this.options.pointDotStrokeWidth,
- radius : this.options.pointDotRadius,
- display: this.options.pointDot,
- hitDetectionRadius : this.options.pointHitDetectionRadius,
- ctx : this.chart.ctx,
- inRange : function(mouseX){
- return (Math.pow(mouseX-this.x, 2) < Math.pow(this.radius + this.hitDetectionRadius,2));
- }
- });
-
- this.datasets = [];
-
- //Set up tooltip events on the chart
- if (this.options.showTooltips){
- helpers.bindEvents(this, this.options.tooltipEvents, function(evt){
- var activePoints = (evt.type !== 'mouseout') ? this.getPointsAtEvent(evt) : [];
- this.eachPoints(function(point){
- point.restore(['fillColor', 'strokeColor']);
- });
- helpers.each(activePoints, function(activePoint){
- activePoint.fillColor = activePoint.highlightFill;
- activePoint.strokeColor = activePoint.highlightStroke;
- });
- this.showTooltip(activePoints);
- });
- }
-
- //Iterate through each of the datasets, and build this into a property of the chart
- helpers.each(data.datasets,function(dataset){
-
- var datasetObject = {
- label : dataset.label || null,
- fillColor : dataset.fillColor,
- strokeColor : dataset.strokeColor,
- pointColor : dataset.pointColor,
- pointStrokeColor : dataset.pointStrokeColor,
- points : []
- };
-
- this.datasets.push(datasetObject);
-
-
- helpers.each(dataset.data,function(dataPoint,index){
- //Add a new point for each piece of data, passing any required data to draw.
- datasetObject.points.push(new this.PointClass({
- value : dataPoint,
- label : data.labels[index],
- datasetLabel: dataset.label,
- strokeColor : dataset.pointStrokeColor,
- fillColor : dataset.pointColor,
- highlightFill : dataset.pointHighlightFill || dataset.pointColor,
- highlightStroke : dataset.pointHighlightStroke || dataset.pointStrokeColor
- }));
- },this);
-
- this.buildScale(data.labels);
-
-
- this.eachPoints(function(point, index){
- helpers.extend(point, {
- x: this.scale.calculateX(index),
- y: this.scale.endPoint
- });
- point.save();
- }, this);
-
- },this);
-
-
- this.render();
- },
- update : function(){
- this.scale.update();
- // Reset any highlight colours before updating.
- helpers.each(this.activeElements, function(activeElement){
- activeElement.restore(['fillColor', 'strokeColor']);
- });
- this.eachPoints(function(point){
- point.save();
- });
- this.render();
- },
- eachPoints : function(callback){
- helpers.each(this.datasets,function(dataset){
- helpers.each(dataset.points,callback,this);
- },this);
- },
- getPointsAtEvent : function(e){
- var pointsArray = [],
- eventPosition = helpers.getRelativePosition(e);
- helpers.each(this.datasets,function(dataset){
- helpers.each(dataset.points,function(point){
- if (point.inRange(eventPosition.x,eventPosition.y)) pointsArray.push(point);
- });
- },this);
- return pointsArray;
- },
- buildScale : function(labels){
- var self = this;
-
- var dataTotal = function(){
- var values = [];
- self.eachPoints(function(point){
- values.push(point.value);
- });
-
- return values;
- };
-
- var scaleOptions = {
- templateString : this.options.scaleLabel,
- height : this.chart.height,
- width : this.chart.width,
- ctx : this.chart.ctx,
- textColor : this.options.scaleFontColor,
- fontSize : this.options.scaleFontSize,
- fontStyle : this.options.scaleFontStyle,
- fontFamily : this.options.scaleFontFamily,
- valuesCount : labels.length,
- beginAtZero : this.options.scaleBeginAtZero,
- integersOnly : this.options.scaleIntegersOnly,
- calculateYRange : function(currentHeight){
- var updatedRanges = helpers.calculateScaleRange(
- dataTotal(),
- currentHeight,
- this.fontSize,
- this.beginAtZero,
- this.integersOnly
- );
- helpers.extend(this, updatedRanges);
- },
- xLabels : labels,
- font : helpers.fontString(this.options.scaleFontSize, this.options.scaleFontStyle, this.options.scaleFontFamily),
- lineWidth : this.options.scaleLineWidth,
- lineColor : this.options.scaleLineColor,
- showHorizontalLines : this.options.scaleShowHorizontalLines,
- showVerticalLines : this.options.scaleShowVerticalLines,
- gridLineWidth : (this.options.scaleShowGridLines) ? this.options.scaleGridLineWidth : 0,
- gridLineColor : (this.options.scaleShowGridLines) ? this.options.scaleGridLineColor : "rgba(0,0,0,0)",
- padding: (this.options.showScale) ? 0 : this.options.pointDotRadius + this.options.pointDotStrokeWidth,
- showLabels : this.options.scaleShowLabels,
- display : this.options.showScale
- };
-
- if (this.options.scaleOverride){
- helpers.extend(scaleOptions, {
- calculateYRange: helpers.noop,
- steps: this.options.scaleSteps,
- stepValue: this.options.scaleStepWidth,
- min: this.options.scaleStartValue,
- max: this.options.scaleStartValue + (this.options.scaleSteps * this.options.scaleStepWidth)
- });
- }
-
-
- this.scale = new Chart.Scale(scaleOptions);
- },
- addData : function(valuesArray,label){
- //Map the values array for each of the datasets
-
- helpers.each(valuesArray,function(value,datasetIndex){
- //Add a new point for each piece of data, passing any required data to draw.
- this.datasets[datasetIndex].points.push(new this.PointClass({
- value : value,
- label : label,
- x: this.scale.calculateX(this.scale.valuesCount+1),
- y: this.scale.endPoint,
- strokeColor : this.datasets[datasetIndex].pointStrokeColor,
- fillColor : this.datasets[datasetIndex].pointColor
- }));
- },this);
-
- this.scale.addXLabel(label);
- //Then re-render the chart.
- this.update();
- },
- removeData : function(){
- this.scale.removeXLabel();
- //Then re-render the chart.
- helpers.each(this.datasets,function(dataset){
- dataset.points.shift();
- },this);
- this.update();
- },
- reflow : function(){
- var newScaleProps = helpers.extend({
- height : this.chart.height,
- width : this.chart.width
- });
- this.scale.update(newScaleProps);
- },
- draw : function(ease){
- var easingDecimal = ease || 1;
- this.clear();
-
- var ctx = this.chart.ctx;
-
- // Some helper methods for getting the next/prev points
- var hasValue = function(item){
- return item.value !== null;
- },
- nextPoint = function(point, collection, index){
- return helpers.findNextWhere(collection, hasValue, index) || point;
- },
- previousPoint = function(point, collection, index){
- return helpers.findPreviousWhere(collection, hasValue, index) || point;
- };
-
- this.scale.draw(easingDecimal);
-
-
- helpers.each(this.datasets,function(dataset){
- var pointsWithValues = helpers.where(dataset.points, hasValue);
-
- //Transition each point first so that the line and point drawing isn't out of sync
- //We can use this extra loop to calculate the control points of this dataset also in this loop
-
- helpers.each(dataset.points, function(point, index){
- if (point.hasValue()){
- point.transition({
- y : this.scale.calculateY(point.value),
- x : this.scale.calculateX(index)
- }, easingDecimal);
- }
- },this);
-
-
- // Control points need to be calculated in a seperate loop, because we need to know the current x/y of the point
- // This would cause issues when there is no animation, because the y of the next point would be 0, so beziers would be skewed
- if (this.options.bezierCurve){
- helpers.each(pointsWithValues, function(point, index){
- var tension = (index > 0 && index < pointsWithValues.length - 1) ? this.options.bezierCurveTension : 0;
- point.controlPoints = helpers.splineCurve(
- previousPoint(point, pointsWithValues, index),
- point,
- nextPoint(point, pointsWithValues, index),
- tension
- );
-
- // Prevent the bezier going outside of the bounds of the graph
-
- // Cap puter bezier handles to the upper/lower scale bounds
- if (point.controlPoints.outer.y > this.scale.endPoint){
- point.controlPoints.outer.y = this.scale.endPoint;
- }
- else if (point.controlPoints.outer.y < this.scale.startPoint){
- point.controlPoints.outer.y = this.scale.startPoint;
- }
-
- // Cap inner bezier handles to the upper/lower scale bounds
- if (point.controlPoints.inner.y > this.scale.endPoint){
- point.controlPoints.inner.y = this.scale.endPoint;
- }
- else if (point.controlPoints.inner.y < this.scale.startPoint){
- point.controlPoints.inner.y = this.scale.startPoint;
- }
- },this);
- }
-
-
- //Draw the line between all the points
- ctx.lineWidth = this.options.datasetStrokeWidth;
- ctx.strokeStyle = dataset.strokeColor;
- ctx.beginPath();
-
- helpers.each(pointsWithValues, function(point, index){
- if (index === 0){
- ctx.moveTo(point.x, point.y);
- }
- else{
- if(this.options.bezierCurve){
- var previous = previousPoint(point, pointsWithValues, index);
-
- ctx.bezierCurveTo(
- previous.controlPoints.outer.x,
- previous.controlPoints.outer.y,
- point.controlPoints.inner.x,
- point.controlPoints.inner.y,
- point.x,
- point.y
- );
- }
- else{
- ctx.lineTo(point.x,point.y);
- }
- }
- }, this);
-
- ctx.stroke();
-
- if (this.options.datasetFill && pointsWithValues.length > 0){
- //Round off the line by going to the base of the chart, back to the start, then fill.
- ctx.lineTo(pointsWithValues[pointsWithValues.length - 1].x, this.scale.endPoint);
- ctx.lineTo(pointsWithValues[0].x, this.scale.endPoint);
- ctx.fillStyle = dataset.fillColor;
- ctx.closePath();
- ctx.fill();
- }
-
- //Now draw the points over the line
- //A little inefficient double looping, but better than the line
- //lagging behind the point positions
- helpers.each(pointsWithValues,function(point){
- point.draw();
- });
- },this);
- }
- });
-
-
-}).call(this);
diff --git a/applications/auto-scale/gui/src/vendor/Chart.js/src/Chart.PolarArea.js b/applications/auto-scale/gui/src/vendor/Chart.js/src/Chart.PolarArea.js
deleted file mode 100644
index 8f2b9c5..0000000
--- a/applications/auto-scale/gui/src/vendor/Chart.js/src/Chart.PolarArea.js
+++ /dev/null
@@ -1,250 +0,0 @@
-(function(){
- "use strict";
-
- var root = this,
- Chart = root.Chart,
- //Cache a local reference to Chart.helpers
- helpers = Chart.helpers;
-
- var defaultConfig = {
- //Boolean - Show a backdrop to the scale label
- scaleShowLabelBackdrop : true,
-
- //String - The colour of the label backdrop
- scaleBackdropColor : "rgba(255,255,255,0.75)",
-
- // Boolean - Whether the scale should begin at zero
- scaleBeginAtZero : true,
-
- //Number - The backdrop padding above & below the label in pixels
- scaleBackdropPaddingY : 2,
-
- //Number - The backdrop padding to the side of the label in pixels
- scaleBackdropPaddingX : 2,
-
- //Boolean - Show line for each value in the scale
- scaleShowLine : true,
-
- //Boolean - Stroke a line around each segment in the chart
- segmentShowStroke : true,
-
- //String - The colour of the stroke on each segement.
- segmentStrokeColor : "#fff",
-
- //Number - The width of the stroke value in pixels
- segmentStrokeWidth : 2,
-
- //Number - Amount of animation steps
- animationSteps : 100,
-
- //String - Animation easing effect.
- animationEasing : "easeOutBounce",
-
- //Boolean - Whether to animate the rotation of the chart
- animateRotate : true,
-
- //Boolean - Whether to animate scaling the chart from the centre
- animateScale : false,
-
- //String - A legend template
- legendTemplate : "<ul class=\"<%=name.toLowerCase()%>-legend\"><% for (var i=0; i<segments.length; i++){%><li><span style=\"background-color:<%=segments[i].fillColor%>\"></span><%if(segments[i].label){%><%=segments[i].label%><%}%></li><%}%></ul>"
- };
-
-
- Chart.Type.extend({
- //Passing in a name registers this chart in the Chart namespace
- name: "PolarArea",
- //Providing a defaults will also register the deafults in the chart namespace
- defaults : defaultConfig,
- //Initialize is fired when the chart is initialized - Data is passed in as a parameter
- //Config is automatically merged by the core of Chart.js, and is available at this.options
- initialize: function(data){
- this.segments = [];
- //Declare segment class as a chart instance specific class, so it can share props for this instance
- this.SegmentArc = Chart.Arc.extend({
- showStroke : this.options.segmentShowStroke,
- strokeWidth : this.options.segmentStrokeWidth,
- strokeColor : this.options.segmentStrokeColor,
- ctx : this.chart.ctx,
- innerRadius : 0,
- x : this.chart.width/2,
- y : this.chart.height/2
- });
- this.scale = new Chart.RadialScale({
- display: this.options.showScale,
- fontStyle: this.options.scaleFontStyle,
- fontSize: this.options.scaleFontSize,
- fontFamily: this.options.scaleFontFamily,
- fontColor: this.options.scaleFontColor,
- showLabels: this.options.scaleShowLabels,
- showLabelBackdrop: this.options.scaleShowLabelBackdrop,
- backdropColor: this.options.scaleBackdropColor,
- backdropPaddingY : this.options.scaleBackdropPaddingY,
- backdropPaddingX: this.options.scaleBackdropPaddingX,
- lineWidth: (this.options.scaleShowLine) ? this.options.scaleLineWidth : 0,
- lineColor: this.options.scaleLineColor,
- lineArc: true,
- width: this.chart.width,
- height: this.chart.height,
- xCenter: this.chart.width/2,
- yCenter: this.chart.height/2,
- ctx : this.chart.ctx,
- templateString: this.options.scaleLabel,
- valuesCount: data.length
- });
-
- this.updateScaleRange(data);
-
- this.scale.update();
-
- helpers.each(data,function(segment,index){
- this.addData(segment,index,true);
- },this);
-
- //Set up tooltip events on the chart
- if (this.options.showTooltips){
- helpers.bindEvents(this, this.options.tooltipEvents, function(evt){
- var activeSegments = (evt.type !== 'mouseout') ? this.getSegmentsAtEvent(evt) : [];
- helpers.each(this.segments,function(segment){
- segment.restore(["fillColor"]);
- });
- helpers.each(activeSegments,function(activeSegment){
- activeSegment.fillColor = activeSegment.highlightColor;
- });
- this.showTooltip(activeSegments);
- });
- }
-
- this.render();
- },
- getSegmentsAtEvent : function(e){
- var segmentsArray = [];
-
- var location = helpers.getRelativePosition(e);
-
- helpers.each(this.segments,function(segment){
- if (segment.inRange(location.x,location.y)) segmentsArray.push(segment);
- },this);
- return segmentsArray;
- },
- addData : function(segment, atIndex, silent){
- var index = atIndex || this.segments.length;
-
- this.segments.splice(index, 0, new this.SegmentArc({
- fillColor: segment.color,
- highlightColor: segment.highlight || segment.color,
- label: segment.label,
- value: segment.value,
- outerRadius: (this.options.animateScale) ? 0 : this.scale.calculateCenterOffset(segment.value),
- circumference: (this.options.animateRotate) ? 0 : this.scale.getCircumference(),
- startAngle: Math.PI * 1.5
- }));
- if (!silent){
- this.reflow();
- this.update();
- }
- },
- removeData: function(atIndex){
- var indexToDelete = (helpers.isNumber(atIndex)) ? atIndex : this.segments.length-1;
- this.segments.splice(indexToDelete, 1);
- this.reflow();
- this.update();
- },
- calculateTotal: function(data){
- this.total = 0;
- helpers.each(data,function(segment){
- this.total += segment.value;
- },this);
- this.scale.valuesCount = this.segments.length;
- },
- updateScaleRange: function(datapoints){
- var valuesArray = [];
- helpers.each(datapoints,function(segment){
- valuesArray.push(segment.value);
- });
-
- var scaleSizes = (this.options.scaleOverride) ?
- {
- steps: this.options.scaleSteps,
- stepValue: this.options.scaleStepWidth,
- min: this.options.scaleStartValue,
- max: this.options.scaleStartValue + (this.options.scaleSteps * this.options.scaleStepWidth)
- } :
- helpers.calculateScaleRange(
- valuesArray,
- helpers.min([this.chart.width, this.chart.height])/2,
- this.options.scaleFontSize,
- this.options.scaleBeginAtZero,
- this.options.scaleIntegersOnly
- );
-
- helpers.extend(
- this.scale,
- scaleSizes,
- {
- size: helpers.min([this.chart.width, this.chart.height]),
- xCenter: this.chart.width/2,
- yCenter: this.chart.height/2
- }
- );
-
- },
- update : function(){
- this.calculateTotal(this.segments);
-
- helpers.each(this.segments,function(segment){
- segment.save();
- });
-
- this.reflow();
- this.render();
- },
- reflow : function(){
- helpers.extend(this.SegmentArc.prototype,{
- x : this.chart.width/2,
- y : this.chart.height/2
- });
- this.updateScaleRange(this.segments);
- this.scale.update();
-
- helpers.extend(this.scale,{
- xCenter: this.chart.width/2,
- yCenter: this.chart.height/2
- });
-
- helpers.each(this.segments, function(segment){
- segment.update({
- outerRadius : this.scale.calculateCenterOffset(segment.value)
- });
- }, this);
-
- },
- draw : function(ease){
- var easingDecimal = ease || 1;
- //Clear & draw the canvas
- this.clear();
- helpers.each(this.segments,function(segment, index){
- segment.transition({
- circumference : this.scale.getCircumference(),
- outerRadius : this.scale.calculateCenterOffset(segment.value)
- },easingDecimal);
-
- segment.endAngle = segment.startAngle + segment.circumference;
-
- // If we've removed the first segment we need to set the first one to
- // start at the top.
- if (index === 0){
- segment.startAngle = Math.PI * 1.5;
- }
-
- //Check to see if it's the last segment, if not get the next and update the start angle
- if (index < this.segments.length - 1){
- this.segments[index+1].startAngle = segment.endAngle;
- }
- segment.draw();
- }, this);
- this.scale.draw();
- }
- });
-
-}).call(this);
\ No newline at end of file
diff --git a/applications/auto-scale/gui/src/vendor/Chart.js/src/Chart.Radar.js b/applications/auto-scale/gui/src/vendor/Chart.js/src/Chart.Radar.js
deleted file mode 100644
index 134fd2d..0000000
--- a/applications/auto-scale/gui/src/vendor/Chart.js/src/Chart.Radar.js
+++ /dev/null
@@ -1,343 +0,0 @@
-(function(){
- "use strict";
-
- var root = this,
- Chart = root.Chart,
- helpers = Chart.helpers;
-
-
-
- Chart.Type.extend({
- name: "Radar",
- defaults:{
- //Boolean - Whether to show lines for each scale point
- scaleShowLine : true,
-
- //Boolean - Whether we show the angle lines out of the radar
- angleShowLineOut : true,
-
- //Boolean - Whether to show labels on the scale
- scaleShowLabels : false,
-
- // Boolean - Whether the scale should begin at zero
- scaleBeginAtZero : true,
-
- //String - Colour of the angle line
- angleLineColor : "rgba(0,0,0,.1)",
-
- //Number - Pixel width of the angle line
- angleLineWidth : 1,
-
- //String - Point label font declaration
- pointLabelFontFamily : "'Arial'",
-
- //String - Point label font weight
- pointLabelFontStyle : "normal",
-
- //Number - Point label font size in pixels
- pointLabelFontSize : 10,
-
- //String - Point label font colour
- pointLabelFontColor : "#666",
-
- //Boolean - Whether to show a dot for each point
- pointDot : true,
-
- //Number - Radius of each point dot in pixels
- pointDotRadius : 3,
-
- //Number - Pixel width of point dot stroke
- pointDotStrokeWidth : 1,
-
- //Number - amount extra to add to the radius to cater for hit detection outside the drawn point
- pointHitDetectionRadius : 20,
-
- //Boolean - Whether to show a stroke for datasets
- datasetStroke : true,
-
- //Number - Pixel width of dataset stroke
- datasetStrokeWidth : 2,
-
- //Boolean - Whether to fill the dataset with a colour
- datasetFill : true,
-
- //String - A legend template
- legendTemplate : "<ul class=\"<%=name.toLowerCase()%>-legend\"><% for (var i=0; i<datasets.length; i++){%><li><span style=\"background-color:<%=datasets[i].strokeColor%>\"></span><%if(datasets[i].label){%><%=datasets[i].label%><%}%></li><%}%></ul>"
-
- },
-
- initialize: function(data){
- this.PointClass = Chart.Point.extend({
- strokeWidth : this.options.pointDotStrokeWidth,
- radius : this.options.pointDotRadius,
- display: this.options.pointDot,
- hitDetectionRadius : this.options.pointHitDetectionRadius,
- ctx : this.chart.ctx
- });
-
- this.datasets = [];
-
- this.buildScale(data);
-
- //Set up tooltip events on the chart
- if (this.options.showTooltips){
- helpers.bindEvents(this, this.options.tooltipEvents, function(evt){
- var activePointsCollection = (evt.type !== 'mouseout') ? this.getPointsAtEvent(evt) : [];
-
- this.eachPoints(function(point){
- point.restore(['fillColor', 'strokeColor']);
- });
- helpers.each(activePointsCollection, function(activePoint){
- activePoint.fillColor = activePoint.highlightFill;
- activePoint.strokeColor = activePoint.highlightStroke;
- });
-
- this.showTooltip(activePointsCollection);
- });
- }
-
- //Iterate through each of the datasets, and build this into a property of the chart
- helpers.each(data.datasets,function(dataset){
-
- var datasetObject = {
- label: dataset.label || null,
- fillColor : dataset.fillColor,
- strokeColor : dataset.strokeColor,
- pointColor : dataset.pointColor,
- pointStrokeColor : dataset.pointStrokeColor,
- points : []
- };
-
- this.datasets.push(datasetObject);
-
- helpers.each(dataset.data,function(dataPoint,index){
- //Add a new point for each piece of data, passing any required data to draw.
- var pointPosition;
- if (!this.scale.animation){
- pointPosition = this.scale.getPointPosition(index, this.scale.calculateCenterOffset(dataPoint));
- }
- datasetObject.points.push(new this.PointClass({
- value : dataPoint,
- label : data.labels[index],
- datasetLabel: dataset.label,
- x: (this.options.animation) ? this.scale.xCenter : pointPosition.x,
- y: (this.options.animation) ? this.scale.yCenter : pointPosition.y,
- strokeColor : dataset.pointStrokeColor,
- fillColor : dataset.pointColor,
- highlightFill : dataset.pointHighlightFill || dataset.pointColor,
- highlightStroke : dataset.pointHighlightStroke || dataset.pointStrokeColor
- }));
- },this);
-
- },this);
-
- this.render();
- },
- eachPoints : function(callback){
- helpers.each(this.datasets,function(dataset){
- helpers.each(dataset.points,callback,this);
- },this);
- },
-
- getPointsAtEvent : function(evt){
- var mousePosition = helpers.getRelativePosition(evt),
- fromCenter = helpers.getAngleFromPoint({
- x: this.scale.xCenter,
- y: this.scale.yCenter
- }, mousePosition);
-
- var anglePerIndex = (Math.PI * 2) /this.scale.valuesCount,
- pointIndex = Math.round((fromCenter.angle - Math.PI * 1.5) / anglePerIndex),
- activePointsCollection = [];
-
- // If we're at the top, make the pointIndex 0 to get the first of the array.
- if (pointIndex >= this.scale.valuesCount || pointIndex < 0){
- pointIndex = 0;
- }
-
- if (fromCenter.distance <= this.scale.drawingArea){
- helpers.each(this.datasets, function(dataset){
- activePointsCollection.push(dataset.points[pointIndex]);
- });
- }
-
- return activePointsCollection;
- },
-
- buildScale : function(data){
- this.scale = new Chart.RadialScale({
- display: this.options.showScale,
- fontStyle: this.options.scaleFontStyle,
- fontSize: this.options.scaleFontSize,
- fontFamily: this.options.scaleFontFamily,
- fontColor: this.options.scaleFontColor,
- showLabels: this.options.scaleShowLabels,
- showLabelBackdrop: this.options.scaleShowLabelBackdrop,
- backdropColor: this.options.scaleBackdropColor,
- backdropPaddingY : this.options.scaleBackdropPaddingY,
- backdropPaddingX: this.options.scaleBackdropPaddingX,
- lineWidth: (this.options.scaleShowLine) ? this.options.scaleLineWidth : 0,
- lineColor: this.options.scaleLineColor,
- angleLineColor : this.options.angleLineColor,
- angleLineWidth : (this.options.angleShowLineOut) ? this.options.angleLineWidth : 0,
- // Point labels at the edge of each line
- pointLabelFontColor : this.options.pointLabelFontColor,
- pointLabelFontSize : this.options.pointLabelFontSize,
- pointLabelFontFamily : this.options.pointLabelFontFamily,
- pointLabelFontStyle : this.options.pointLabelFontStyle,
- height : this.chart.height,
- width: this.chart.width,
- xCenter: this.chart.width/2,
- yCenter: this.chart.height/2,
- ctx : this.chart.ctx,
- templateString: this.options.scaleLabel,
- labels: data.labels,
- valuesCount: data.datasets[0].data.length
- });
-
- this.scale.setScaleSize();
- this.updateScaleRange(data.datasets);
- this.scale.buildYLabels();
- },
- updateScaleRange: function(datasets){
- var valuesArray = (function(){
- var totalDataArray = [];
- helpers.each(datasets,function(dataset){
- if (dataset.data){
- totalDataArray = totalDataArray.concat(dataset.data);
- }
- else {
- helpers.each(dataset.points, function(point){
- totalDataArray.push(point.value);
- });
- }
- });
- return totalDataArray;
- })();
-
-
- var scaleSizes = (this.options.scaleOverride) ?
- {
- steps: this.options.scaleSteps,
- stepValue: this.options.scaleStepWidth,
- min: this.options.scaleStartValue,
- max: this.options.scaleStartValue + (this.options.scaleSteps * this.options.scaleStepWidth)
- } :
- helpers.calculateScaleRange(
- valuesArray,
- helpers.min([this.chart.width, this.chart.height])/2,
- this.options.scaleFontSize,
- this.options.scaleBeginAtZero,
- this.options.scaleIntegersOnly
- );
-
- helpers.extend(
- this.scale,
- scaleSizes
- );
-
- },
- addData : function(valuesArray,label){
- //Map the values array for each of the datasets
- this.scale.valuesCount++;
- helpers.each(valuesArray,function(value,datasetIndex){
- var pointPosition = this.scale.getPointPosition(this.scale.valuesCount, this.scale.calculateCenterOffset(value));
- this.datasets[datasetIndex].points.push(new this.PointClass({
- value : value,
- label : label,
- x: pointPosition.x,
- y: pointPosition.y,
- strokeColor : this.datasets[datasetIndex].pointStrokeColor,
- fillColor : this.datasets[datasetIndex].pointColor
- }));
- },this);
-
- this.scale.labels.push(label);
-
- this.reflow();
-
- this.update();
- },
- removeData : function(){
- this.scale.valuesCount--;
- this.scale.labels.shift();
- helpers.each(this.datasets,function(dataset){
- dataset.points.shift();
- },this);
- this.reflow();
- this.update();
- },
- update : function(){
- this.eachPoints(function(point){
- point.save();
- });
- this.reflow();
- this.render();
- },
- reflow: function(){
- helpers.extend(this.scale, {
- width : this.chart.width,
- height: this.chart.height,
- size : helpers.min([this.chart.width, this.chart.height]),
- xCenter: this.chart.width/2,
- yCenter: this.chart.height/2
- });
- this.updateScaleRange(this.datasets);
- this.scale.setScaleSize();
- this.scale.buildYLabels();
- },
- draw : function(ease){
- var easeDecimal = ease || 1,
- ctx = this.chart.ctx;
- this.clear();
- this.scale.draw();
-
- helpers.each(this.datasets,function(dataset){
-
- //Transition each point first so that the line and point drawing isn't out of sync
- helpers.each(dataset.points,function(point,index){
- if (point.hasValue()){
- point.transition(this.scale.getPointPosition(index, this.scale.calculateCenterOffset(point.value)), easeDecimal);
- }
- },this);
-
-
-
- //Draw the line between all the points
- ctx.lineWidth = this.options.datasetStrokeWidth;
- ctx.strokeStyle = dataset.strokeColor;
- ctx.beginPath();
- helpers.each(dataset.points,function(point,index){
- if (index === 0){
- ctx.moveTo(point.x,point.y);
- }
- else{
- ctx.lineTo(point.x,point.y);
- }
- },this);
- ctx.closePath();
- ctx.stroke();
-
- ctx.fillStyle = dataset.fillColor;
- ctx.fill();
-
- //Now draw the points over the line
- //A little inefficient double looping, but better than the line
- //lagging behind the point positions
- helpers.each(dataset.points,function(point){
- if (point.hasValue()){
- point.draw();
- }
- });
-
- },this);
-
- }
-
- });
-
-
-
-
-
-}).call(this);
\ No newline at end of file
diff --git a/applications/auto-scale/gui/src/vendor/angular-animate/.bower.json b/applications/auto-scale/gui/src/vendor/angular-animate/.bower.json
deleted file mode 100644
index fd1a3db..0000000
--- a/applications/auto-scale/gui/src/vendor/angular-animate/.bower.json
+++ /dev/null
@@ -1,19 +0,0 @@
-{
- "name": "angular-animate",
- "version": "1.4.8",
- "main": "./angular-animate.js",
- "ignore": [],
- "dependencies": {
- "angular": "1.4.8"
- },
- "homepage": "https://github.com/angular/bower-angular-animate",
- "_release": "1.4.8",
- "_resolution": {
- "type": "version",
- "tag": "v1.4.8",
- "commit": "cc1d9740059f5e8fd43abf0e2e80695d43b3b6b1"
- },
- "_source": "git://github.com/angular/bower-angular-animate.git",
- "_target": "~1.4.8",
- "_originalSource": "angular-animate"
-}
\ No newline at end of file
diff --git a/applications/auto-scale/gui/src/vendor/angular-animate/angular-animate.min.js b/applications/auto-scale/gui/src/vendor/angular-animate/angular-animate.min.js
deleted file mode 100644
index 9461603..0000000
--- a/applications/auto-scale/gui/src/vendor/angular-animate/angular-animate.min.js
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- AngularJS v1.4.8
- (c) 2010-2015 Google, Inc. http://angularjs.org
- License: MIT
-*/
-(function(H,u,Sa){'use strict';function wa(a,b,c){if(!a)throw ngMinErr("areq",b||"?",c||"required");return a}function xa(a,b){if(!a&&!b)return"";if(!a)return b;if(!b)return a;X(a)&&(a=a.join(" "));X(b)&&(b=b.join(" "));return a+" "+b}function Ia(a){var b={};a&&(a.to||a.from)&&(b.to=a.to,b.from=a.from);return b}function T(a,b,c){var d="";a=X(a)?a:a&&I(a)&&a.length?a.split(/\s+/):[];q(a,function(a,s){a&&0<a.length&&(d+=0<s?" ":"",d+=c?b+a:a+b)});return d}function Ja(a){if(a instanceof L)switch(a.length){case 0:return[];
-case 1:if(1===a[0].nodeType)return a;break;default:return L(ma(a))}if(1===a.nodeType)return L(a)}function ma(a){if(!a[0])return a;for(var b=0;b<a.length;b++){var c=a[b];if(1==c.nodeType)return c}}function Ka(a,b,c){q(b,function(b){a.addClass(b,c)})}function La(a,b,c){q(b,function(b){a.removeClass(b,c)})}function N(a){return function(b,c){c.addClass&&(Ka(a,b,c.addClass),c.addClass=null);c.removeClass&&(La(a,b,c.removeClass),c.removeClass=null)}}function ia(a){a=a||{};if(!a.$$prepared){var b=a.domOperation||
-M;a.domOperation=function(){a.$$domOperationFired=!0;b();b=M};a.$$prepared=!0}return a}function da(a,b){ya(a,b);za(a,b)}function ya(a,b){b.from&&(a.css(b.from),b.from=null)}function za(a,b){b.to&&(a.css(b.to),b.to=null)}function Q(a,b,c){var d=(b.addClass||"")+" "+(c.addClass||""),e=(b.removeClass||"")+" "+(c.removeClass||"");a=Ma(a.attr("class"),d,e);c.preparationClasses&&(b.preparationClasses=Y(c.preparationClasses,b.preparationClasses),delete c.preparationClasses);d=b.domOperation!==M?b.domOperation:
-null;Aa(b,c);d&&(b.domOperation=d);b.addClass=a.addClass?a.addClass:null;b.removeClass=a.removeClass?a.removeClass:null;return b}function Ma(a,b,c){function d(a){I(a)&&(a=a.split(" "));var b={};q(a,function(a){a.length&&(b[a]=!0)});return b}var e={};a=d(a);b=d(b);q(b,function(a,b){e[b]=1});c=d(c);q(c,function(a,b){e[b]=1===e[b]?null:-1});var s={addClass:"",removeClass:""};q(e,function(b,c){var e,d;1===b?(e="addClass",d=!a[c]):-1===b&&(e="removeClass",d=a[c]);d&&(s[e].length&&(s[e]+=" "),s[e]+=c)});
-return s}function B(a){return a instanceof u.element?a[0]:a}function Na(a,b,c){var d="";b&&(d=T(b,"ng-",!0));c.addClass&&(d=Y(d,T(c.addClass,"-add")));c.removeClass&&(d=Y(d,T(c.removeClass,"-remove")));d.length&&(c.preparationClasses=d,a.addClass(d))}function ja(a,b){var c=b?"-"+b+"s":"";ea(a,[fa,c]);return[fa,c]}function na(a,b){var c=b?"paused":"",d=U+"PlayState";ea(a,[d,c]);return[d,c]}function ea(a,b){a.style[b[0]]=b[1]}function Y(a,b){return a?b?a+" "+b:a:b}function Ba(a,b,c){var d=Object.create(null),
-e=a.getComputedStyle(b)||{};q(c,function(a,b){var c=e[a];if(c){var v=c.charAt(0);if("-"===v||"+"===v||0<=v)c=Oa(c);0===c&&(c=null);d[b]=c}});return d}function Oa(a){var b=0;a=a.split(/\s*,\s*/);q(a,function(a){"s"==a.charAt(a.length-1)&&(a=a.substring(0,a.length-1));a=parseFloat(a)||0;b=b?Math.max(a,b):a});return b}function oa(a){return 0===a||null!=a}function Ca(a,b){var c=O,d=a+"s";b?c+="Duration":d+=" linear all";return[c,d]}function Da(){var a=Object.create(null);return{flush:function(){a=Object.create(null)},
-count:function(b){return(b=a[b])?b.total:0},get:function(b){return(b=a[b])&&b.value},put:function(b,c){a[b]?a[b].total++:a[b]={total:1,value:c}}}}function Ea(a,b,c){q(c,function(c){a[c]=V(a[c])?a[c]:b.style.getPropertyValue(c)})}var M=u.noop,Aa=u.extend,L=u.element,q=u.forEach,X=u.isArray,I=u.isString,pa=u.isObject,qa=u.isUndefined,V=u.isDefined,Fa=u.isFunction,ra=u.isElement,O,sa,U,ta;qa(H.ontransitionend)&&V(H.onwebkittransitionend)?(O="WebkitTransition",sa="webkitTransitionEnd transitionend"):
-(O="transition",sa="transitionend");qa(H.onanimationend)&&V(H.onwebkitanimationend)?(U="WebkitAnimation",ta="webkitAnimationEnd animationend"):(U="animation",ta="animationend");var ka=U+"Delay",ua=U+"Duration",fa=O+"Delay";H=O+"Duration";var Pa={transitionDuration:H,transitionDelay:fa,transitionProperty:O+"Property",animationDuration:ua,animationDelay:ka,animationIterationCount:U+"IterationCount"},Qa={transitionDuration:H,transitionDelay:fa,animationDuration:ua,animationDelay:ka};u.module("ngAnimate",
-[]).directive("ngAnimateChildren",[function(){return function(a,b,c){a=c.ngAnimateChildren;u.isString(a)&&0===a.length?b.data("$$ngAnimateChildren",!0):c.$observe("ngAnimateChildren",function(a){b.data("$$ngAnimateChildren","on"===a||"true"===a)})}}]).factory("$$rAFScheduler",["$$rAF",function(a){function b(a){d=d.concat(a);c()}function c(){if(d.length){for(var b=d.shift(),h=0;h<b.length;h++)b[h]();e||a(function(){e||c()})}}var d,e;d=b.queue=[];b.waitUntilQuiet=function(b){e&&e();e=a(function(){e=
-null;b();c()})};return b}]).factory("$$AnimateRunner",["$q","$sniffer","$$animateAsyncRun",function(a,b,c){function d(a){this.setHost(a);this._doneCallbacks=[];this._runInAnimationFrame=c();this._state=0}d.chain=function(a,b){function c(){if(d===a.length)b(!0);else a[d](function(a){!1===a?b(!1):(d++,c())})}var d=0;c()};d.all=function(a,b){function c(h){v=v&&h;++d===a.length&&b(v)}var d=0,v=!0;q(a,function(a){a.done(c)})};d.prototype={setHost:function(a){this.host=a||{}},done:function(a){2===this._state?
-a():this._doneCallbacks.push(a)},progress:M,getPromise:function(){if(!this.promise){var b=this;this.promise=a(function(a,c){b.done(function(b){!1===b?c():a()})})}return this.promise},then:function(a,b){return this.getPromise().then(a,b)},"catch":function(a){return this.getPromise()["catch"](a)},"finally":function(a){return this.getPromise()["finally"](a)},pause:function(){this.host.pause&&this.host.pause()},resume:function(){this.host.resume&&this.host.resume()},end:function(){this.host.end&&this.host.end();
-this._resolve(!0)},cancel:function(){this.host.cancel&&this.host.cancel();this._resolve(!1)},complete:function(a){var b=this;0===b._state&&(b._state=1,b._runInAnimationFrame(function(){b._resolve(a)}))},_resolve:function(a){2!==this._state&&(q(this._doneCallbacks,function(b){b(a)}),this._doneCallbacks.length=0,this._state=2)}};return d}]).factory("$$animateAsyncRun",["$$rAF",function(a){function b(b){c.push(b);1<c.length||a(function(){for(var a=0;a<c.length;a++)c[a]();c=[]})}var c=[];return function(){var a=
-!1;b(function(){a=!0});return function(c){a?c():b(c)}}}]).provider("$$animateQueue",["$animateProvider",function(a){function b(a,b,c,q){return d[a].some(function(a){return a(b,c,q)})}function c(a,b){a=a||{};var c=0<(a.addClass||"").length,d=0<(a.removeClass||"").length;return b?c&&d:c||d}var d=this.rules={skip:[],cancel:[],join:[]};d.join.push(function(a,b,d){return!b.structural&&c(b.options)});d.skip.push(function(a,b,d){return!b.structural&&!c(b.options)});d.skip.push(function(a,b,c){return"leave"==
-c.event&&b.structural});d.skip.push(function(a,b,c){return c.structural&&2===c.state&&!b.structural});d.cancel.push(function(a,b,c){return c.structural&&b.structural});d.cancel.push(function(a,b,c){return 2===c.state&&b.structural});d.cancel.push(function(a,b,c){a=b.options;c=c.options;return a.addClass&&a.addClass===c.removeClass||a.removeClass&&a.removeClass===c.addClass});this.$get=["$$rAF","$rootScope","$rootElement","$document","$$HashMap","$$animation","$$AnimateRunner","$templateRequest","$$jqLite",
-"$$forceReflow",function(d,s,h,g,v,r,$,u,R,C){function D(){var a=!1;return function(b){a?b():s.$$postDigest(function(){a=!0;b()})}}function K(a,b,c){var f=B(b),d=B(a),n=[];(a=t[c])&&q(a,function(a){a.node.contains(f)?n.push(a.callback):"leave"===c&&a.node.contains(d)&&n.push(a.callback)});return n}function l(a,f,k){function n(b,c,f,t){R(function(){var b=K(v,a,c);b.length&&d(function(){q(b,function(b){b(a,f,t)})})});b.progress(c,f,t)}function t(b){var c=a,f=k;f.preparationClasses&&(c.removeClass(f.preparationClasses),
-f.preparationClasses=null);f.activeClasses&&(c.removeClass(f.activeClasses),f.activeClasses=null);Ha(a,k);da(a,k);k.domOperation();h.complete(!b)}var A,v;if(a=Ja(a))A=B(a),v=a.parent();k=ia(k);var h=new $,R=D();X(k.addClass)&&(k.addClass=k.addClass.join(" "));k.addClass&&!I(k.addClass)&&(k.addClass=null);X(k.removeClass)&&(k.removeClass=k.removeClass.join(" "));k.removeClass&&!I(k.removeClass)&&(k.removeClass=null);k.from&&!pa(k.from)&&(k.from=null);k.to&&!pa(k.to)&&(k.to=null);if(!A)return t(),h;
-var z=[A.className,k.addClass,k.removeClass].join(" ");if(!Ra(z))return t(),h;var l=0<=["enter","move","leave"].indexOf(f),g=!G||F.get(A),z=!g&&m.get(A)||{},C=!!z.state;g||C&&1==z.state||(g=!la(a,v,f));if(g)return t(),h;l&&y(a);g={structural:l,element:a,event:f,close:t,options:k,runner:h};if(C){if(b("skip",a,g,z)){if(2===z.state)return t(),h;Q(a,z.options,k);return z.runner}if(b("cancel",a,g,z))if(2===z.state)z.runner.end();else if(z.structural)z.close();else return Q(a,z.options,g.options),z.runner;
-else if(b("join",a,g,z))if(2===z.state)Q(a,k,{});else return Na(a,l?f:null,k),f=g.event=z.event,k=Q(a,z.options,g.options),z.runner}else Q(a,k,{});(C=g.structural)||(C="animate"===g.event&&0<Object.keys(g.options.to||{}).length||c(g.options));if(!C)return t(),w(a),h;var u=(z.counter||0)+1;g.counter=u;x(a,1,g);s.$$postDigest(function(){var b=m.get(A),d=!b,b=b||{},K=0<(a.parent()||[]).length&&("animate"===b.event||b.structural||c(b.options));if(d||b.counter!==u||!K){d&&(Ha(a,k),da(a,k));if(d||l&&b.event!==
-f)k.domOperation(),h.end();K||w(a)}else f=!b.structural&&c(b.options,!0)?"setClass":b.event,x(a,2),b=r(a,f,b.options),b.done(function(b){t(!b);(b=m.get(A))&&b.counter===u&&w(B(a));n(h,f,"close",{})}),h.setHost(b),n(h,f,"start",{})});return h}function y(a){a=B(a).querySelectorAll("[data-ng-animate]");q(a,function(a){var b=parseInt(a.getAttribute("data-ng-animate")),c=m.get(a);switch(b){case 2:c.runner.end();case 1:c&&m.remove(a)}})}function w(a){a=B(a);a.removeAttribute("data-ng-animate");m.remove(a)}
-function f(a,b){return B(a)===B(b)}function la(a,b,c){c=L(g[0].body);var d=f(a,c)||"HTML"===a[0].nodeName,t=f(a,h),n=!1,w;for((a=a.data("$ngAnimatePin"))&&(b=a);b&&b.length;){t||(t=f(b,h));a=b[0];if(1!==a.nodeType)break;var x=m.get(a)||{};n||(n=x.structural||F.get(a));if(qa(w)||!0===w)a=b.data("$$ngAnimateChildren"),V(a)&&(w=a);if(n&&!1===w)break;t||(t=f(b,h),t||(a=b.data("$ngAnimatePin"))&&(b=a));d||(d=f(b,c));b=b.parent()}return(!n||w)&&t&&d}function x(a,b,c){c=c||{};c.state=b;a=B(a);a.setAttribute("data-ng-animate",
-b);c=(b=m.get(a))?Aa(b,c):c;m.put(a,c)}var m=new v,F=new v,G=null,A=s.$watch(function(){return 0===u.totalPendingRequests},function(a){a&&(A(),s.$$postDigest(function(){s.$$postDigest(function(){null===G&&(G=!0)})}))}),t={},n=a.classNameFilter(),Ra=n?function(a){return n.test(a)}:function(){return!0},Ha=N(R);return{on:function(a,b,c){b=ma(b);t[a]=t[a]||[];t[a].push({node:b,callback:c})},off:function(a,b,c){function f(a,b,c){var d=ma(b);return a.filter(function(a){return!(a.node===d&&(!c||a.callback===
-c))})}var d=t[a];d&&(t[a]=1===arguments.length?null:f(d,b,c))},pin:function(a,b){wa(ra(a),"element","not an element");wa(ra(b),"parentElement","not an element");a.data("$ngAnimatePin",b)},push:function(a,b,c,f){c=c||{};c.domOperation=f;return l(a,b,c)},enabled:function(a,b){var c=arguments.length;if(0===c)b=!!G;else if(ra(a)){var f=B(a),d=F.get(f);1===c?b=!d:(b=!!b)?d&&F.remove(f):F.put(f,!0)}else b=G=!!a;return b}}}]}]).provider("$$animation",["$animateProvider",function(a){function b(a){return a.data("$$animationRunner")}
-var c=this.drivers=[];this.$get=["$$jqLite","$rootScope","$injector","$$AnimateRunner","$$HashMap","$$rAFScheduler",function(a,e,s,h,g,v){function r(a){function b(a){if(a.processed)return a;a.processed=!0;var f=a.domNode,d=f.parentNode;e.put(f,a);for(var x;d;){if(x=e.get(d)){x.processed||(x=b(x));break}d=d.parentNode}(x||c).children.push(a);return a}var c={children:[]},d,e=new g;for(d=0;d<a.length;d++){var h=a[d];e.put(h.domNode,a[d]={domNode:h.domNode,fn:h.fn,children:[]})}for(d=0;d<a.length;d++)b(a[d]);
-return function(a){var b=[],c=[],d;for(d=0;d<a.children.length;d++)c.push(a.children[d]);a=c.length;var m=0,e=[];for(d=0;d<c.length;d++){var h=c[d];0>=a&&(a=m,m=0,b.push(e),e=[]);e.push(h.fn);h.children.forEach(function(a){m++;c.push(a)});a--}e.length&&b.push(e);return b}(c)}var $=[],u=N(a);return function(g,C,D){function K(a){a=a.hasAttribute("ng-animate-ref")?[a]:a.querySelectorAll("[ng-animate-ref]");var b=[];q(a,function(a){var c=a.getAttribute("ng-animate-ref");c&&c.length&&b.push(a)});return b}
-function l(a){var b=[],c={};q(a,function(a,f){var d=B(a.element),t=0<=["enter","move"].indexOf(a.event),d=a.structural?K(d):[];if(d.length){var m=t?"to":"from";q(d,function(a){var b=a.getAttribute("ng-animate-ref");c[b]=c[b]||{};c[b][m]={animationID:f,element:L(a)}})}else b.push(a)});var f={},d={};q(c,function(c,m){var w=c.from,e=c.to;if(w&&e){var h=a[w.animationID],g=a[e.animationID],x=w.animationID.toString();if(!d[x]){var A=d[x]={structural:!0,beforeStart:function(){h.beforeStart();g.beforeStart()},
-close:function(){h.close();g.close()},classes:y(h.classes,g.classes),from:h,to:g,anchors:[]};A.classes.length?b.push(A):(b.push(h),b.push(g))}d[x].anchors.push({out:w.element,"in":e.element})}else w=w?w.animationID:e.animationID,e=w.toString(),f[e]||(f[e]=!0,b.push(a[w]))});return b}function y(a,b){a=a.split(" ");b=b.split(" ");for(var c=[],f=0;f<a.length;f++){var d=a[f];if("ng-"!==d.substring(0,3))for(var m=0;m<b.length;m++)if(d===b[m]){c.push(d);break}}return c.join(" ")}function w(a){for(var b=
-c.length-1;0<=b;b--){var f=c[b];if(s.has(f)&&(f=s.get(f)(a)))return f}}function f(a,c){a.from&&a.to?(b(a.from.element).setHost(c),b(a.to.element).setHost(c)):b(a.element).setHost(c)}function la(){var a=b(g);!a||"leave"===C&&D.$$domOperationFired||a.end()}function x(b){g.off("$destroy",la);g.removeData("$$animationRunner");u(g,D);da(g,D);D.domOperation();A&&a.removeClass(g,A);g.removeClass("ng-animate");F.complete(!b)}D=ia(D);var m=0<=["enter","move","leave"].indexOf(C),F=new h({end:function(){x()},
-cancel:function(){x(!0)}});if(!c.length)return x(),F;g.data("$$animationRunner",F);var G=xa(g.attr("class"),xa(D.addClass,D.removeClass)),A=D.tempClasses;A&&(G+=" "+A,D.tempClasses=null);$.push({element:g,classes:G,event:C,structural:m,options:D,beforeStart:function(){g.addClass("ng-animate");A&&a.addClass(g,A)},close:x});g.on("$destroy",la);if(1<$.length)return F;e.$$postDigest(function(){var a=[];q($,function(c){b(c.element)?a.push(c):c.close()});$.length=0;var c=l(a),d=[];q(c,function(a){d.push({domNode:B(a.from?
-a.from.element:a.element),fn:function(){a.beforeStart();var c,d=a.close;if(b(a.anchors?a.from.element||a.to.element:a.element)){var m=w(a);m&&(c=m.start)}c?(c=c(),c.done(function(a){d(!a)}),f(a,c)):d()}})});v(r(d))});return F}}]}]).provider("$animateCss",["$animateProvider",function(a){var b=Da(),c=Da();this.$get=["$window","$$jqLite","$$AnimateRunner","$timeout","$$forceReflow","$sniffer","$$rAFScheduler","$animate",function(a,e,s,h,g,v,r,u){function Ga(a,b){var c=a.parentNode;return(c.$$ngAnimateParentKey||
-(c.$$ngAnimateParentKey=++l))+"-"+a.getAttribute("class")+"-"+b}function R(w,f,h,g){var m;0<b.count(h)&&(m=c.get(h),m||(f=T(f,"-stagger"),e.addClass(w,f),m=Ba(a,w,g),m.animationDuration=Math.max(m.animationDuration,0),m.transitionDuration=Math.max(m.transitionDuration,0),e.removeClass(w,f),c.put(h,m)));return m||{}}function C(a){y.push(a);r.waitUntilQuiet(function(){b.flush();c.flush();for(var a=g(),d=0;d<y.length;d++)y[d](a);y.length=0})}function D(c,f,e){f=b.get(e);f||(f=Ba(a,c,Pa),"infinite"===
-f.animationIterationCount&&(f.animationIterationCount=1));b.put(e,f);c=f;e=c.animationDelay;f=c.transitionDelay;c.maxDelay=e&&f?Math.max(e,f):e||f;c.maxDuration=Math.max(c.animationDuration*c.animationIterationCount,c.transitionDuration);return c}var K=N(e),l=0,y=[];return function(a,c){function d(){m()}function g(){m(!0)}function m(b){if(!(ga||va&&k)){ga=!0;k=!1;c.$$skipPreparationClasses||e.removeClass(a,Z);e.removeClass(a,Y);na(n,!1);ja(n,!1);q(y,function(a){n.style[a[0]]=""});K(a,c);da(a,c);Object.keys(t).length&&
-q(t,function(a,b){a?n.style.setProperty(b,a):n.style.removeProperty(b)});if(c.onDone)c.onDone();H&&H.complete(!b)}}function F(a){p.blockTransition&&ja(n,a);p.blockKeyframeAnimation&&na(n,!!a)}function G(){H=new s({end:d,cancel:g});C(M);m();return{$$willAnimate:!1,start:function(){return H},end:d}}function A(){function b(){if(!ga){F(!1);q(y,function(a){n.style[a[0]]=a[1]});K(a,c);e.addClass(a,Y);if(p.recalculateTimingStyles){ha=n.className+" "+Z;aa=Ga(n,ha);E=D(n,ha,aa);W=E.maxDelay;I=Math.max(W,0);
-J=E.maxDuration;if(0===J){m();return}p.hasTransitions=0<E.transitionDuration;p.hasAnimations=0<E.animationDuration}p.applyAnimationDelay&&(W="boolean"!==typeof c.delay&&oa(c.delay)?parseFloat(c.delay):W,I=Math.max(W,0),E.animationDelay=W,ca=[ka,W+"s"],y.push(ca),n.style[ca[0]]=ca[1]);N=1E3*I;z=1E3*J;if(c.easing){var k,l=c.easing;p.hasTransitions&&(k=O+"TimingFunction",y.push([k,l]),n.style[k]=l);p.hasAnimations&&(k=U+"TimingFunction",y.push([k,l]),n.style[k]=l)}E.transitionDuration&&x.push(sa);E.animationDuration&&
-x.push(ta);A=Date.now();var v=N+1.5*z;k=A+v;var l=a.data("$$animateCss")||[],r=!0;if(l.length){var G=l[0];(r=k>G.expectedEndTime)?h.cancel(G.timer):l.push(m)}r&&(v=h(d,v,!1),l[0]={timer:v,expectedEndTime:k},l.push(m),a.data("$$animateCss",l));a.on(x.join(" "),g);c.to&&(c.cleanupStyles&&Ea(t,n,Object.keys(c.to)),za(a,c))}}function d(){var b=a.data("$$animateCss");if(b){for(var c=1;c<b.length;c++)b[c]();a.removeData("$$animateCss")}}function g(a){a.stopPropagation();var b=a.originalEvent||a;a=b.$manualTimeStamp||
-b.timeStamp||Date.now();b=parseFloat(b.elapsedTime.toFixed(3));Math.max(a-A,0)>=N&&b>=J&&(va=!0,m())}if(!ga)if(n.parentNode){var A,x=[],l=function(a){if(va)k&&a&&(k=!1,m());else if(k=!a,E.animationDuration)if(a=na(n,k),k)y.push(a);else{var b=y,c=b.indexOf(a);0<=a&&b.splice(c,1)}},v=0<V&&(E.transitionDuration&&0===S.transitionDuration||E.animationDuration&&0===S.animationDuration)&&Math.max(S.animationDelay,S.transitionDelay);v?h(b,Math.floor(v*V*1E3),!1):b();L.resume=function(){l(!0)};L.pause=function(){l(!1)}}else m()}
-var t={},n=B(a);if(!n||!n.parentNode||!u.enabled())return G();c=ia(c);var y=[],r=a.attr("class"),l=Ia(c),ga,k,va,H,L,I,N,J,z;if(0===c.duration||!v.animations&&!v.transitions)return G();var ba=c.event&&X(c.event)?c.event.join(" "):c.event,Q="",P="";ba&&c.structural?Q=T(ba,"ng-",!0):ba&&(Q=ba);c.addClass&&(P+=T(c.addClass,"-add"));c.removeClass&&(P.length&&(P+=" "),P+=T(c.removeClass,"-remove"));c.applyClassesEarly&&P.length&&K(a,c);var Z=[Q,P].join(" ").trim(),ha=r+" "+Z,Y=T(Z,"-active"),r=l.to&&0<
-Object.keys(l.to).length;if(!(0<(c.keyframeStyle||"").length||r||Z))return G();var aa,S;0<c.stagger?(l=parseFloat(c.stagger),S={transitionDelay:l,animationDelay:l,transitionDuration:0,animationDuration:0}):(aa=Ga(n,ha),S=R(n,Z,aa,Qa));c.$$skipPreparationClasses||e.addClass(a,Z);c.transitionStyle&&(l=[O,c.transitionStyle],ea(n,l),y.push(l));0<=c.duration&&(l=0<n.style[O].length,l=Ca(c.duration,l),ea(n,l),y.push(l));c.keyframeStyle&&(l=[U,c.keyframeStyle],ea(n,l),y.push(l));var V=S?0<=c.staggerIndex?
-c.staggerIndex:b.count(aa):0;(ba=0===V)&&!c.skipBlocking&&ja(n,9999);var E=D(n,ha,aa),W=E.maxDelay;I=Math.max(W,0);J=E.maxDuration;var p={};p.hasTransitions=0<E.transitionDuration;p.hasAnimations=0<E.animationDuration;p.hasTransitionAll=p.hasTransitions&&"all"==E.transitionProperty;p.applyTransitionDuration=r&&(p.hasTransitions&&!p.hasTransitionAll||p.hasAnimations&&!p.hasTransitions);p.applyAnimationDuration=c.duration&&p.hasAnimations;p.applyTransitionDelay=oa(c.delay)&&(p.applyTransitionDuration||
-p.hasTransitions);p.applyAnimationDelay=oa(c.delay)&&p.hasAnimations;p.recalculateTimingStyles=0<P.length;if(p.applyTransitionDuration||p.applyAnimationDuration)J=c.duration?parseFloat(c.duration):J,p.applyTransitionDuration&&(p.hasTransitions=!0,E.transitionDuration=J,l=0<n.style[O+"Property"].length,y.push(Ca(J,l))),p.applyAnimationDuration&&(p.hasAnimations=!0,E.animationDuration=J,y.push([ua,J+"s"]));if(0===J&&!p.recalculateTimingStyles)return G();if(null!=c.delay){var ca=parseFloat(c.delay);
-p.applyTransitionDelay&&y.push([fa,ca+"s"]);p.applyAnimationDelay&&y.push([ka,ca+"s"])}null==c.duration&&0<E.transitionDuration&&(p.recalculateTimingStyles=p.recalculateTimingStyles||ba);N=1E3*I;z=1E3*J;c.skipBlocking||(p.blockTransition=0<E.transitionDuration,p.blockKeyframeAnimation=0<E.animationDuration&&0<S.animationDelay&&0===S.animationDuration);c.from&&(c.cleanupStyles&&Ea(t,n,Object.keys(c.from)),ya(a,c));p.blockTransition||p.blockKeyframeAnimation?F(J):c.skipBlocking||ja(n,!1);return{$$willAnimate:!0,
-end:d,start:function(){if(!ga)return L={end:d,cancel:g,resume:null,pause:null},H=new s(L),C(A),H}}}}]}]).provider("$$animateCssDriver",["$$animationProvider",function(a){a.drivers.push("$$animateCssDriver");this.$get=["$animateCss","$rootScope","$$AnimateRunner","$rootElement","$sniffer","$$jqLite","$document",function(a,c,d,e,s,h,g){function v(a){return a.replace(/\bng-\S+\b/g,"")}function r(a,b){I(a)&&(a=a.split(" "));I(b)&&(b=b.split(" "));return a.filter(function(a){return-1===b.indexOf(a)}).join(" ")}
-function u(c,e,g){function h(a){var b={},c=B(a).getBoundingClientRect();q(["width","height","top","left"],function(a){var d=c[a];switch(a){case "top":d+=C.scrollTop;break;case "left":d+=C.scrollLeft}b[a]=Math.floor(d)+"px"});return b}function f(){var c=v(g.attr("class")||""),d=r(c,m),c=r(m,c),d=a(x,{to:h(g),addClass:"ng-anchor-in "+d,removeClass:"ng-anchor-out "+c,delay:!0});return d.$$willAnimate?d:null}function s(){x.remove();e.removeClass("ng-animate-shim");g.removeClass("ng-animate-shim")}var x=
-L(B(e).cloneNode(!0)),m=v(x.attr("class")||"");e.addClass("ng-animate-shim");g.addClass("ng-animate-shim");x.addClass("ng-anchor");D.append(x);var F;c=function(){var c=a(x,{addClass:"ng-anchor-out",delay:!0,from:h(e)});return c.$$willAnimate?c:null}();if(!c&&(F=f(),!F))return s();var G=c||F;return{start:function(){function a(){c&&c.end()}var b,c=G.start();c.done(function(){c=null;if(!F&&(F=f()))return c=F.start(),c.done(function(){c=null;s();b.complete()}),c;s();b.complete()});return b=new d({end:a,
-cancel:a})}}}function H(a,b,c,e){var f=R(a,M),g=R(b,M),h=[];q(e,function(a){(a=u(c,a.out,a["in"]))&&h.push(a)});if(f||g||0!==h.length)return{start:function(){function a(){q(b,function(a){a.end()})}var b=[];f&&b.push(f.start());g&&b.push(g.start());q(h,function(a){b.push(a.start())});var c=new d({end:a,cancel:a});d.all(b,function(a){c.complete(a)});return c}}}function R(c){var d=c.element,e=c.options||{};c.structural&&(e.event=c.event,e.structural=!0,e.applyClassesEarly=!0,"leave"===c.event&&(e.onDone=
-e.domOperation));e.preparationClasses&&(e.event=Y(e.event,e.preparationClasses));c=a(d,e);return c.$$willAnimate?c:null}if(!s.animations&&!s.transitions)return M;var C=g[0].body;c=B(e);var D=L(c.parentNode&&11===c.parentNode.nodeType||C.contains(c)?c:C);N(h);return function(a){return a.from&&a.to?H(a.from,a.to,a.classes,a.anchors):R(a)}}]}]).provider("$$animateJs",["$animateProvider",function(a){this.$get=["$injector","$$AnimateRunner","$$jqLite",function(b,c,d){function e(c){c=X(c)?c:c.split(" ");
-for(var d=[],e={},r=0;r<c.length;r++){var q=c[r],s=a.$$registeredAnimations[q];s&&!e[q]&&(d.push(b.get(s)),e[q]=!0)}return d}var s=N(d);return function(a,b,d,r){function u(){r.domOperation();s(a,r)}function H(a,b,d,e,f){switch(d){case "animate":b=[b,e.from,e.to,f];break;case "setClass":b=[b,D,K,f];break;case "addClass":b=[b,D,f];break;case "removeClass":b=[b,K,f];break;default:b=[b,f]}b.push(e);if(a=a.apply(a,b))if(Fa(a.start)&&(a=a.start()),a instanceof c)a.done(f);else if(Fa(a))return a;return M}
-function B(a,b,d,e,f){var g=[];q(e,function(e){var h=e[f];h&&g.push(function(){var e,f,g=!1,k=function(a){g||(g=!0,(f||M)(a),e.complete(!a))};e=new c({end:function(){k()},cancel:function(){k(!0)}});f=H(h,a,b,d,function(a){k(!1===a)});return e})});return g}function C(a,b,d,e,f){var g=B(a,b,d,e,f);if(0===g.length){var h,l;"beforeSetClass"===f?(h=B(a,"removeClass",d,e,"beforeRemoveClass"),l=B(a,"addClass",d,e,"beforeAddClass")):"setClass"===f&&(h=B(a,"removeClass",d,e,"removeClass"),l=B(a,"addClass",
-d,e,"addClass"));h&&(g=g.concat(h));l&&(g=g.concat(l))}if(0!==g.length)return function(a){var b=[];g.length&&q(g,function(a){b.push(a())});b.length?c.all(b,a):a();return function(a){q(b,function(b){a?b.cancel():b.end()})}}}3===arguments.length&&pa(d)&&(r=d,d=null);r=ia(r);d||(d=a.attr("class")||"",r.addClass&&(d+=" "+r.addClass),r.removeClass&&(d+=" "+r.removeClass));var D=r.addClass,K=r.removeClass,l=e(d),y,w;if(l.length){var f,I;"leave"==b?(I="leave",f="afterLeave"):(I="before"+b.charAt(0).toUpperCase()+
-b.substr(1),f=b);"enter"!==b&&"move"!==b&&(y=C(a,b,r,l,I));w=C(a,b,r,l,f)}if(y||w)return{start:function(){function b(c){f=!0;u();da(a,r);g.complete(c)}var d,e=[];y&&e.push(function(a){d=y(a)});e.length?e.push(function(a){u();a(!0)}):u();w&&e.push(function(a){d=w(a)});var f=!1,g=new c({end:function(){f||((d||M)(void 0),b(void 0))},cancel:function(){f||((d||M)(!0),b(!0))}});c.chain(e,b);return g}}}}]}]).provider("$$animateJsDriver",["$$animationProvider",function(a){a.drivers.push("$$animateJsDriver");
-this.$get=["$$animateJs","$$AnimateRunner",function(a,c){function d(c){return a(c.element,c.event,c.classes,c.options)}return function(a){if(a.from&&a.to){var b=d(a.from),h=d(a.to);if(b||h)return{start:function(){function a(){return function(){q(d,function(a){a.end()})}}var d=[];b&&d.push(b.start());h&&d.push(h.start());c.all(d,function(a){e.complete(a)});var e=new c({end:a(),cancel:a()});return e}}}else return d(a)}}]}])})(window,window.angular);
-//# sourceMappingURL=angular-animate.min.js.map
diff --git a/applications/auto-scale/gui/src/vendor/angular-animate/angular-animate.min.js.map b/applications/auto-scale/gui/src/vendor/angular-animate/angular-animate.min.js.map
deleted file mode 100644
index 11d5fe5..0000000
--- a/applications/auto-scale/gui/src/vendor/angular-animate/angular-animate.min.js.map
+++ /dev/null
@@ -1,8 +0,0 @@
-{
-"version":3,
-"file":"angular-animate.min.js",
-"lineCount":55,
-"mappings":"A;;;;;aAKC,SAAQ,CAACA,CAAD,CAASC,CAAT,CAAkBC,EAAlB,CAA6B,CAyEtCC,QAASA,GAAS,CAACC,CAAD,CAAMC,CAAN,CAAYC,CAAZ,CAAoB,CACpC,GAAKF,CAAAA,CAAL,CACE,KAAMG,SAAA,CAAS,MAAT,CAA2CF,CAA3C,EAAmD,GAAnD,CAA0DC,CAA1D,EAAoE,UAApE,CAAN,CAEF,MAAOF,EAJ6B,CAOtCI,QAASA,GAAY,CAACC,CAAD,CAAGC,CAAH,CA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A,MAAAC,QAp1HX;",
-"sources":["angular-animate.js"],
-"names":["window","angular","undefined","assertArg","arg","name","reason","ngMinErr","mergeClasses","a","b","isArray","join","packageStyles","options","styles","to","from","pendClasses","classes","fix","isPrefix","className","isString","length","split","forEach","klass","i","stripCommentsFromElement","element","jqLite","ELEMENT_NODE","nodeType","extractElementNode","elm","$$addClass","$$jqLite","addClass","$$removeClass","removeClass","applyAnimationClassesFactory","prepareAnimationOptions","$$prepared","domOperation","noop","options.domOperation","$$domOperationFired","applyAnimationStyles","applyAnimationFromStyles","applyAnimationToStyles","css","mergeAnimationOptions","target","newOptions","toAdd","toRemove","resolveElementClasses","attr","preparationClasses","concatWithSpace","realDomOperation","extend","existing","splitClassesToLookup","obj","flags","value","key","ADD_CLASS","REMOVE_CLASS","val","prop","allow","getDomNode","applyGeneratedPreparationClasses","event","EVENT_CLASS_PREFIX","ADD_CLASS_SUFFIX","REMOVE_CLASS_SUFFIX","blockTransitions","node","duration","applyInlineStyle","TRANSITION_DELAY_PROP","blockKeyframeAnimations","applyBlock","ANIMATION_PROP","ANIMATION_PLAYSTATE_KEY","styleTuple","style","computeCssStyles","$window","properties","Object","create","detectedStyles","getComputedStyle","formalStyleName","actualStyleName","c","charAt","parseMaxTime","str","maxValue","values","substring","parseFloat","Math","max","truthyTimingValue","getCssTransitionDurationStyle","applyOnlyDuration","TRANSITION_PROP","DURATION_KEY","createLocalCacheLookup","cache","flush","count","entry","total","get","put","registerRestorableStyles","backup","isDefined","getPropertyValue","isObject","isUndefined","isFunction","isElement","TRANSITIONEND_EVENT","ANIMATIONEND_EVENT","ontransitionend","onwebkittransitionend","onanimationend","onwebkitanimationend","ANIMATION_DELAY_PROP","DELAY_KEY","ANIMATION_DURATION_PROP","TRANSITION_DURATION_PROP","DETECT_CSS_PROPERTIES","transitionDuration","transitionDelay","transitionProperty","PROPERTY_KEY","animationDuration","animationDelay","animationIterationCount","ANIMATION_ITERATION_COUNT_KEY","DETECT_STAGGER_CSS_PROPERTIES","module","directive","$$AnimateChildrenDirective","scope","attrs","ngAnimateChildren","data","NG_ANIMATE_CHILDREN_DATA","$observe","factory","$$rAFSchedulerFactory","$$rAF","scheduler","tasks","queue","concat","nextTick","items","shift","cancelFn","waitUntilQuiet","scheduler.waitUntilQuiet","fn","$$AnimateRunnerFactory","$q","$sniffer","$$animateAsyncRun","AnimateRunner","host","setHost","_doneCallbacks","_runInAnimationFrame","_state","chain","AnimateRunner.chain","callback","next","index","response","all","AnimateRunner.all","runners","onProgress","status","runner","done","prototype","DONE_COMPLETE_STATE","push","progress","getPromise","promise","self","resolve","reject","then","resolveHandler","rejectHandler","catch","handler","finally","pause","resume","end","_resolve","cancel","complete","INITIAL_STATE","DONE_PENDING_STATE","$$AnimateAsyncRunFactory","waitForTick","waitQueue","passed","provider","$$AnimateQueueProvider","$animateProvider","isAllowed","ruleType","currentAnimation","previousAnimation","rules","some","hasAnimationClasses","and","skip","newAnimation","structural","RUNNING_STATE","state","nO","cO","$get","$rootScope","$rootElement","$document","$$HashMap","$$animation","$$AnimateRunner","$templateRequest","$$forceReflow","postDigestTaskFactory","postDigestCalled","$$postDigest","findCallbacks","parent","targetNode","targetParentNode","matches","entries","callbackRegistry","contains","queueAnimation","notifyProgress","phase","runInNextPostDigestOrNow","callbacks","close","activeClasses","applyAnimationClasses","isAnimatableClassName","isStructural","indexOf","skipAnimations","animationsEnabled","disabledElementsLookup","existingAnimation","activeAnimationsLookup","hasExistingAnimation","PRE_DIGEST_STATE","areAnimationsAllowed","closeChildAnimations","skipAnimationFlag","cancelAnimationFlag","joinAnimationFlag","isValidAnimation","keys","clearElementAnimationState","counter","markElementAnimationState","animationDetails","animationCancelled","realRunner","children","querySelectorAll","child","parseInt","getAttribute","NG_ANIMATE_ATTR_NAME","remove","removeAttribute","isMatchingElement","nodeOrElmA","nodeOrElmB","parentElement","bodyElement","body","bodyElementDetected","nodeName","rootElementDetected","parentAnimationDetected","animateChildren","parentHost","NG_ANIMATE_PIN_DATA","parentNode","details","setAttribute","newValue","oldValue","deregisterWatch","$watch","totalPendingRequests","isEmpty","classNameFilter","test","on","container","off","filterFromRegistry","list","matchContainer","matchCallback","containerNode","filter","arguments","pin","enabled","bool","argCount","hasElement","recordExists","$$AnimationProvider","getRunner","RUNNER_STORAGE_KEY","drivers","$injector","$$rAFScheduler","sortAnimations","animations","processNode","processed","elementNode","domNode","lookup","parentEntry","tree","animation","flatten","result","remainingLevelEntries","nextLevelEntries","row","childEntry","animationQueue","getAnchorNodes","hasAttribute","NG_ANIMATE_REF_ATTR","SELECTOR","anchors","groupAnimations","preparedAnimations","refLookup","enterOrMove","anchorNodes","direction","anchor","animationID","usedIndicesLookup","anchorGroups","operations","fromAnimation","toAnimation","lookupKey","toString","group","beforeStart","cssClassesIntersection","indexKey","aa","j","invokeFirstDriver","driverName","has","driver","updateAnimationRunners","newRunner","handleDestroyedElement","rejected","removeData","tempClasses","NG_ANIMATE_CLASSNAME","groupedAnimations","toBeSortedAnimations","animationEntry","triggerAnimationStart","startAnimationFn","closeFn","targetElement","operation","start","animationRunner","$AnimateCssProvider","gcsLookup","gcsStaggerLookup","$timeout","$animate","gcsHashFn","extraClasses","parentCounter","computeCachedCssStaggerStyles","cacheKey","stagger","staggerClassName","rafWaitQueue","pageWidth","computeTimings","timings","aD","tD","maxDelay","maxDuration","init","endFn","animationClosed","animationCompleted","animationPaused","$$skipPreparationClasses","temporaryStyles","restoreStyles","setProperty","removeProperty","onDone","applyBlocking","blockTransition","blockKeyframeAnimation","closeAndReturnNoopAnimator","$$willAnimate","recalculateTimingStyles","fullClassName","relativeDelay","hasTransitions","hasAnimations","applyAnimationDelay","delay","delayStyle","maxDelayTime","ONE_SECOND","maxDurationTime","easing","easeProp","easeVal","TIMING_KEY","events","startTime","Date","now","timerTime","CLOSING_TIME_BUFFER","endTime","animationsData","ANIMATE_TIMER_KEY","setupFallbackTimer","currentTimerData","expectedEndTime","timer","onAnimationExpired","onAnimationProgress","cleanupStyles","stopPropagation","ev","originalEvent","timeStamp","$manualTimeStamp","elapsedTime","toFixed","ELAPSED_TIME_MAX_DECIMAL_PLACES","playPause","playAnimation","arr","splice","maxStagger","itemIndex","floor","runnerHost","runnerHost.resume","runnerHost.pause","transitions","method","structuralClassName","addRemoveClassName","applyClassesEarly","trim","ACTIVE_CLASS_SUFFIX","hasToStyles","keyframeStyle","staggerVal","transitionStyle","durationStyle","staggerIndex","isFirst","skipBlocking","SAFE_FAST_FORWARD_DURATION_VALUE","hasTransitionAll","applyTransitionDuration","applyAnimationDuration","applyTransitionDelay","$$AnimateCssDriverProvider","$$animationProvider","$animateCss","filterCssClasses","replace","getUniqueValues","prepareAnchoredAnimation","outAnchor","inAnchor","calculateAnchorStyles","coords","getBoundingClientRect","bodyNode","scrollTop","scrollLeft","prepareInAnimation","endingClasses","startingClasses","animator","clone","NG_ANIMATE_SHIM_CLASS_NAME","cloneNode","NG_ANIMATE_ANCHOR_CLASS_NAME","rootBodyElement","append","animatorIn","animatorOut","prepareOutAnimation","NG_OUT_ANCHOR_CLASS_NAME","startingAnimator","prepareFromToAnchorAnimation","prepareRegularAnimation","anchorAnimations","outElement","inElement","animationRunners","rootNode","initDriverFn","$$AnimateJsProvider","lookupAnimations","flagMap","animationFactory","$$registeredAnimations","applyOptions","executeAnimationFn","args","classesToAdd","classesToRemove","apply","groupEventedAnimations","fnName","ani","endProgressCb","resolved","onAnimationComplete","packageAnimations","startAnimation","animateFn","before","after","afterFn","beforeFn","toUpperCase","substr","onComplete","success","closeActiveAnimations","cancelled","$$AnimateJsDriverProvider","$$animateJs","prepareAnimation","endFnFactory"]
-}
diff --git a/applications/auto-scale/gui/src/vendor/angular-mocks/.bower.json b/applications/auto-scale/gui/src/vendor/angular-mocks/.bower.json
deleted file mode 100644
index 43f6085..0000000
--- a/applications/auto-scale/gui/src/vendor/angular-mocks/.bower.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "name": "angular-mocks",
- "version": "1.4.8",
- "main": "./angular-mocks.js",
- "ignore": [],
- "dependencies": {
- "angular": "1.4.8"
- },
- "homepage": "https://github.com/angular/bower-angular-mocks",
- "_release": "1.4.8",
- "_resolution": {
- "type": "version",
- "tag": "v1.4.8",
- "commit": "5f04a609ad4544f0e93344e10e9a402fdb33a5ad"
- },
- "_source": "git://github.com/angular/bower-angular-mocks.git",
- "_target": "~1.4.8",
- "_originalSource": "angular-mocks",
- "_direct": true
-}
\ No newline at end of file
diff --git a/applications/auto-scale/gui/src/vendor/angular/.bower.json b/applications/auto-scale/gui/src/vendor/angular/.bower.json
deleted file mode 100644
index e60c1b4..0000000
--- a/applications/auto-scale/gui/src/vendor/angular/.bower.json
+++ /dev/null
@@ -1,17 +0,0 @@
-{
- "name": "angular",
- "version": "1.4.8",
- "main": "./angular.js",
- "ignore": [],
- "dependencies": {},
- "homepage": "https://github.com/angular/bower-angular",
- "_release": "1.4.8",
- "_resolution": {
- "type": "version",
- "tag": "v1.4.8",
- "commit": "572a4fcc552c27c0f4bb1b9aab395249218c1255"
- },
- "_source": "git://github.com/angular/bower-angular.git",
- "_target": "1.x",
- "_originalSource": "angular"
-}
\ No newline at end of file
diff --git a/applications/auto-scale/gui/src/vendor/angular/angular.min.js b/applications/auto-scale/gui/src/vendor/angular/angular.min.js
deleted file mode 100644
index b4f9b07..0000000
--- a/applications/auto-scale/gui/src/vendor/angular/angular.min.js
+++ /dev/null
@@ -1,295 +0,0 @@
-/*
- AngularJS v1.4.8
- (c) 2010-2015 Google, Inc. http://angularjs.org
- License: MIT
-*/
-(function(S,X,u){'use strict';function G(a){return function(){var b=arguments[0],d;d="["+(a?a+":":"")+b+"] http://errors.angularjs.org/1.4.8/"+(a?a+"/":"")+b;for(b=1;b<arguments.length;b++){d=d+(1==b?"?":"&")+"p"+(b-1)+"=";var c=encodeURIComponent,e;e=arguments[b];e="function"==typeof e?e.toString().replace(/ \{[\s\S]*$/,""):"undefined"==typeof e?"undefined":"string"!=typeof e?JSON.stringify(e):e;d+=c(e)}return Error(d)}}function za(a){if(null==a||Xa(a))return!1;if(I(a)||E(a)||B&&a instanceof B)return!0;
-var b="length"in Object(a)&&a.length;return Q(b)&&(0<=b&&b-1 in a||"function"==typeof a.item)}function n(a,b,d){var c,e;if(a)if(z(a))for(c in a)"prototype"==c||"length"==c||"name"==c||a.hasOwnProperty&&!a.hasOwnProperty(c)||b.call(d,a[c],c,a);else if(I(a)||za(a)){var f="object"!==typeof a;c=0;for(e=a.length;c<e;c++)(f||c in a)&&b.call(d,a[c],c,a)}else if(a.forEach&&a.forEach!==n)a.forEach(b,d,a);else if(nc(a))for(c in a)b.call(d,a[c],c,a);else if("function"===typeof a.hasOwnProperty)for(c in a)a.hasOwnProperty(c)&&
-b.call(d,a[c],c,a);else for(c in a)qa.call(a,c)&&b.call(d,a[c],c,a);return a}function oc(a,b,d){for(var c=Object.keys(a).sort(),e=0;e<c.length;e++)b.call(d,a[c[e]],c[e]);return c}function pc(a){return function(b,d){a(d,b)}}function Td(){return++nb}function Mb(a,b,d){for(var c=a.$$hashKey,e=0,f=b.length;e<f;++e){var g=b[e];if(H(g)||z(g))for(var h=Object.keys(g),k=0,l=h.length;k<l;k++){var m=h[k],r=g[m];d&&H(r)?da(r)?a[m]=new Date(r.valueOf()):Ma(r)?a[m]=new RegExp(r):r.nodeName?a[m]=r.cloneNode(!0):
-Nb(r)?a[m]=r.clone():(H(a[m])||(a[m]=I(r)?[]:{}),Mb(a[m],[r],!0)):a[m]=r}}c?a.$$hashKey=c:delete a.$$hashKey;return a}function M(a){return Mb(a,ra.call(arguments,1),!1)}function Ud(a){return Mb(a,ra.call(arguments,1),!0)}function ea(a){return parseInt(a,10)}function Ob(a,b){return M(Object.create(a),b)}function x(){}function Ya(a){return a}function na(a){return function(){return a}}function qc(a){return z(a.toString)&&a.toString!==sa}function q(a){return"undefined"===typeof a}function y(a){return"undefined"!==
-typeof a}function H(a){return null!==a&&"object"===typeof a}function nc(a){return null!==a&&"object"===typeof a&&!rc(a)}function E(a){return"string"===typeof a}function Q(a){return"number"===typeof a}function da(a){return"[object Date]"===sa.call(a)}function z(a){return"function"===typeof a}function Ma(a){return"[object RegExp]"===sa.call(a)}function Xa(a){return a&&a.window===a}function Za(a){return a&&a.$evalAsync&&a.$watch}function $a(a){return"boolean"===typeof a}function sc(a){return a&&Q(a.length)&&
-Vd.test(sa.call(a))}function Nb(a){return!(!a||!(a.nodeName||a.prop&&a.attr&&a.find))}function Wd(a){var b={};a=a.split(",");var d;for(d=0;d<a.length;d++)b[a[d]]=!0;return b}function ta(a){return F(a.nodeName||a[0]&&a[0].nodeName)}function ab(a,b){var d=a.indexOf(b);0<=d&&a.splice(d,1);return d}function bb(a,b){function d(a,b){var d=b.$$hashKey,e;if(I(a)){e=0;for(var f=a.length;e<f;e++)b.push(c(a[e]))}else if(nc(a))for(e in a)b[e]=c(a[e]);else if(a&&"function"===typeof a.hasOwnProperty)for(e in a)a.hasOwnProperty(e)&&
-(b[e]=c(a[e]));else for(e in a)qa.call(a,e)&&(b[e]=c(a[e]));d?b.$$hashKey=d:delete b.$$hashKey;return b}function c(a){if(!H(a))return a;var b=e.indexOf(a);if(-1!==b)return f[b];if(Xa(a)||Za(a))throw Aa("cpws");var b=!1,c;I(a)?(c=[],b=!0):sc(a)?c=new a.constructor(a):da(a)?c=new Date(a.getTime()):Ma(a)?(c=new RegExp(a.source,a.toString().match(/[^\/]*$/)[0]),c.lastIndex=a.lastIndex):z(a.cloneNode)?c=a.cloneNode(!0):(c=Object.create(rc(a)),b=!0);e.push(a);f.push(c);return b?d(a,c):c}var e=[],f=[];if(b){if(sc(b))throw Aa("cpta");
-if(a===b)throw Aa("cpi");I(b)?b.length=0:n(b,function(a,c){"$$hashKey"!==c&&delete b[c]});e.push(a);f.push(b);return d(a,b)}return c(a)}function ia(a,b){if(I(a)){b=b||[];for(var d=0,c=a.length;d<c;d++)b[d]=a[d]}else if(H(a))for(d in b=b||{},a)if("$"!==d.charAt(0)||"$"!==d.charAt(1))b[d]=a[d];return b||a}function ma(a,b){if(a===b)return!0;if(null===a||null===b)return!1;if(a!==a&&b!==b)return!0;var d=typeof a,c;if(d==typeof b&&"object"==d)if(I(a)){if(!I(b))return!1;if((d=a.length)==b.length){for(c=
-0;c<d;c++)if(!ma(a[c],b[c]))return!1;return!0}}else{if(da(a))return da(b)?ma(a.getTime(),b.getTime()):!1;if(Ma(a))return Ma(b)?a.toString()==b.toString():!1;if(Za(a)||Za(b)||Xa(a)||Xa(b)||I(b)||da(b)||Ma(b))return!1;d=$();for(c in a)if("$"!==c.charAt(0)&&!z(a[c])){if(!ma(a[c],b[c]))return!1;d[c]=!0}for(c in b)if(!(c in d)&&"$"!==c.charAt(0)&&y(b[c])&&!z(b[c]))return!1;return!0}return!1}function cb(a,b,d){return a.concat(ra.call(b,d))}function tc(a,b){var d=2<arguments.length?ra.call(arguments,2):
-[];return!z(b)||b instanceof RegExp?b:d.length?function(){return arguments.length?b.apply(a,cb(d,arguments,0)):b.apply(a,d)}:function(){return arguments.length?b.apply(a,arguments):b.call(a)}}function Xd(a,b){var d=b;"string"===typeof a&&"$"===a.charAt(0)&&"$"===a.charAt(1)?d=u:Xa(b)?d="$WINDOW":b&&X===b?d="$DOCUMENT":Za(b)&&(d="$SCOPE");return d}function db(a,b){if("undefined"===typeof a)return u;Q(b)||(b=b?2:null);return JSON.stringify(a,Xd,b)}function uc(a){return E(a)?JSON.parse(a):a}function vc(a,
-b){var d=Date.parse("Jan 01, 1970 00:00:00 "+a)/6E4;return isNaN(d)?b:d}function Pb(a,b,d){d=d?-1:1;var c=vc(b,a.getTimezoneOffset());b=a;a=d*(c-a.getTimezoneOffset());b=new Date(b.getTime());b.setMinutes(b.getMinutes()+a);return b}function ua(a){a=B(a).clone();try{a.empty()}catch(b){}var d=B("<div>").append(a).html();try{return a[0].nodeType===Na?F(d):d.match(/^(<[^>]+>)/)[1].replace(/^<([\w\-]+)/,function(a,b){return"<"+F(b)})}catch(c){return F(d)}}function wc(a){try{return decodeURIComponent(a)}catch(b){}}
-function xc(a){var b={};n((a||"").split("&"),function(a){var c,e,f;a&&(e=a=a.replace(/\+/g,"%20"),c=a.indexOf("="),-1!==c&&(e=a.substring(0,c),f=a.substring(c+1)),e=wc(e),y(e)&&(f=y(f)?wc(f):!0,qa.call(b,e)?I(b[e])?b[e].push(f):b[e]=[b[e],f]:b[e]=f))});return b}function Qb(a){var b=[];n(a,function(a,c){I(a)?n(a,function(a){b.push(ja(c,!0)+(!0===a?"":"="+ja(a,!0)))}):b.push(ja(c,!0)+(!0===a?"":"="+ja(a,!0)))});return b.length?b.join("&"):""}function ob(a){return ja(a,!0).replace(/%26/gi,"&").replace(/%3D/gi,
-"=").replace(/%2B/gi,"+")}function ja(a,b){return encodeURIComponent(a).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%3B/gi,";").replace(/%20/g,b?"%20":"+")}function Yd(a,b){var d,c,e=Oa.length;for(c=0;c<e;++c)if(d=Oa[c]+b,E(d=a.getAttribute(d)))return d;return null}function Zd(a,b){var d,c,e={};n(Oa,function(b){b+="app";!d&&a.hasAttribute&&a.hasAttribute(b)&&(d=a,c=a.getAttribute(b))});n(Oa,function(b){b+="app";var e;!d&&(e=a.querySelector("["+b.replace(":",
-"\\:")+"]"))&&(d=e,c=e.getAttribute(b))});d&&(e.strictDi=null!==Yd(d,"strict-di"),b(d,c?[c]:[],e))}function yc(a,b,d){H(d)||(d={});d=M({strictDi:!1},d);var c=function(){a=B(a);if(a.injector()){var c=a[0]===X?"document":ua(a);throw Aa("btstrpd",c.replace(/</,"<").replace(/>/,">"));}b=b||[];b.unshift(["$provide",function(b){b.value("$rootElement",a)}]);d.debugInfoEnabled&&b.push(["$compileProvider",function(a){a.debugInfoEnabled(!0)}]);b.unshift("ng");c=eb(b,d.strictDi);c.invoke(["$rootScope",
-"$rootElement","$compile","$injector",function(a,b,c,d){a.$apply(function(){b.data("$injector",d);c(b)(a)})}]);return c},e=/^NG_ENABLE_DEBUG_INFO!/,f=/^NG_DEFER_BOOTSTRAP!/;S&&e.test(S.name)&&(d.debugInfoEnabled=!0,S.name=S.name.replace(e,""));if(S&&!f.test(S.name))return c();S.name=S.name.replace(f,"");fa.resumeBootstrap=function(a){n(a,function(a){b.push(a)});return c()};z(fa.resumeDeferredBootstrap)&&fa.resumeDeferredBootstrap()}function $d(){S.name="NG_ENABLE_DEBUG_INFO!"+S.name;S.location.reload()}
-function ae(a){a=fa.element(a).injector();if(!a)throw Aa("test");return a.get("$$testability")}function zc(a,b){b=b||"_";return a.replace(be,function(a,c){return(c?b:"")+a.toLowerCase()})}function ce(){var a;if(!Ac){var b=pb();(oa=q(b)?S.jQuery:b?S[b]:u)&&oa.fn.on?(B=oa,M(oa.fn,{scope:Pa.scope,isolateScope:Pa.isolateScope,controller:Pa.controller,injector:Pa.injector,inheritedData:Pa.inheritedData}),a=oa.cleanData,oa.cleanData=function(b){var c;if(Rb)Rb=!1;else for(var e=0,f;null!=(f=b[e]);e++)(c=
-oa._data(f,"events"))&&c.$destroy&&oa(f).triggerHandler("$destroy");a(b)}):B=N;fa.element=B;Ac=!0}}function qb(a,b,d){if(!a)throw Aa("areq",b||"?",d||"required");return a}function Qa(a,b,d){d&&I(a)&&(a=a[a.length-1]);qb(z(a),b,"not a function, got "+(a&&"object"===typeof a?a.constructor.name||"Object":typeof a));return a}function Ra(a,b){if("hasOwnProperty"===a)throw Aa("badname",b);}function Bc(a,b,d){if(!b)return a;b=b.split(".");for(var c,e=a,f=b.length,g=0;g<f;g++)c=b[g],a&&(a=(e=a)[c]);return!d&&
-z(a)?tc(e,a):a}function rb(a){for(var b=a[0],d=a[a.length-1],c,e=1;b!==d&&(b=b.nextSibling);e++)if(c||a[e]!==b)c||(c=B(ra.call(a,0,e))),c.push(b);return c||a}function $(){return Object.create(null)}function de(a){function b(a,b,c){return a[b]||(a[b]=c())}var d=G("$injector"),c=G("ng");a=b(a,"angular",Object);a.$$minErr=a.$$minErr||G;return b(a,"module",function(){var a={};return function(f,g,h){if("hasOwnProperty"===f)throw c("badname","module");g&&a.hasOwnProperty(f)&&(a[f]=null);return b(a,f,function(){function a(b,
-d,e,f){f||(f=c);return function(){f[e||"push"]([b,d,arguments]);return v}}function b(a,d){return function(b,e){e&&z(e)&&(e.$$moduleName=f);c.push([a,d,arguments]);return v}}if(!g)throw d("nomod",f);var c=[],e=[],t=[],A=a("$injector","invoke","push",e),v={_invokeQueue:c,_configBlocks:e,_runBlocks:t,requires:g,name:f,provider:b("$provide","provider"),factory:b("$provide","factory"),service:b("$provide","service"),value:a("$provide","value"),constant:a("$provide","constant","unshift"),decorator:b("$provide",
-"decorator"),animation:b("$animateProvider","register"),filter:b("$filterProvider","register"),controller:b("$controllerProvider","register"),directive:b("$compileProvider","directive"),config:A,run:function(a){t.push(a);return this}};h&&A(h);return v})}})}function ee(a){M(a,{bootstrap:yc,copy:bb,extend:M,merge:Ud,equals:ma,element:B,forEach:n,injector:eb,noop:x,bind:tc,toJson:db,fromJson:uc,identity:Ya,isUndefined:q,isDefined:y,isString:E,isFunction:z,isObject:H,isNumber:Q,isElement:Nb,isArray:I,
-version:fe,isDate:da,lowercase:F,uppercase:sb,callbacks:{counter:0},getTestability:ae,$$minErr:G,$$csp:Ba,reloadWithDebugInfo:$d});Sb=de(S);Sb("ng",["ngLocale"],["$provide",function(a){a.provider({$$sanitizeUri:ge});a.provider("$compile",Cc).directive({a:he,input:Dc,textarea:Dc,form:ie,script:je,select:ke,style:le,option:me,ngBind:ne,ngBindHtml:oe,ngBindTemplate:pe,ngClass:qe,ngClassEven:re,ngClassOdd:se,ngCloak:te,ngController:ue,ngForm:ve,ngHide:we,ngIf:xe,ngInclude:ye,ngInit:ze,ngNonBindable:Ae,
-ngPluralize:Be,ngRepeat:Ce,ngShow:De,ngStyle:Ee,ngSwitch:Fe,ngSwitchWhen:Ge,ngSwitchDefault:He,ngOptions:Ie,ngTransclude:Je,ngModel:Ke,ngList:Le,ngChange:Me,pattern:Ec,ngPattern:Ec,required:Fc,ngRequired:Fc,minlength:Gc,ngMinlength:Gc,maxlength:Hc,ngMaxlength:Hc,ngValue:Ne,ngModelOptions:Oe}).directive({ngInclude:Pe}).directive(tb).directive(Ic);a.provider({$anchorScroll:Qe,$animate:Re,$animateCss:Se,$$animateQueue:Te,$$AnimateRunner:Ue,$browser:Ve,$cacheFactory:We,$controller:Xe,$document:Ye,$exceptionHandler:Ze,
-$filter:Jc,$$forceReflow:$e,$interpolate:af,$interval:bf,$http:cf,$httpParamSerializer:df,$httpParamSerializerJQLike:ef,$httpBackend:ff,$xhrFactory:gf,$location:hf,$log:jf,$parse:kf,$rootScope:lf,$q:mf,$$q:nf,$sce:of,$sceDelegate:pf,$sniffer:qf,$templateCache:rf,$templateRequest:sf,$$testability:tf,$timeout:uf,$window:vf,$$rAF:wf,$$jqLite:xf,$$HashMap:yf,$$cookieReader:zf})}])}function fb(a){return a.replace(Af,function(a,d,c,e){return e?c.toUpperCase():c}).replace(Bf,"Moz$1")}function Kc(a){a=a.nodeType;
-return 1===a||!a||9===a}function Lc(a,b){var d,c,e=b.createDocumentFragment(),f=[];if(Tb.test(a)){d=d||e.appendChild(b.createElement("div"));c=(Cf.exec(a)||["",""])[1].toLowerCase();c=ka[c]||ka._default;d.innerHTML=c[1]+a.replace(Df,"<$1></$2>")+c[2];for(c=c[0];c--;)d=d.lastChild;f=cb(f,d.childNodes);d=e.firstChild;d.textContent=""}else f.push(b.createTextNode(a));e.textContent="";e.innerHTML="";n(f,function(a){e.appendChild(a)});return e}function N(a){if(a instanceof N)return a;var b;E(a)&&(a=U(a),
-b=!0);if(!(this instanceof N)){if(b&&"<"!=a.charAt(0))throw Ub("nosel");return new N(a)}if(b){b=X;var d;a=(d=Ef.exec(a))?[b.createElement(d[1])]:(d=Lc(a,b))?d.childNodes:[]}Mc(this,a)}function Vb(a){return a.cloneNode(!0)}function ub(a,b){b||vb(a);if(a.querySelectorAll)for(var d=a.querySelectorAll("*"),c=0,e=d.length;c<e;c++)vb(d[c])}function Nc(a,b,d,c){if(y(c))throw Ub("offargs");var e=(c=wb(a))&&c.events,f=c&&c.handle;if(f)if(b){var g=function(b){var c=e[b];y(d)&&ab(c||[],d);y(d)&&c&&0<c.length||
-(a.removeEventListener(b,f,!1),delete e[b])};n(b.split(" "),function(a){g(a);xb[a]&&g(xb[a])})}else for(b in e)"$destroy"!==b&&a.removeEventListener(b,f,!1),delete e[b]}function vb(a,b){var d=a.ng339,c=d&&gb[d];c&&(b?delete c.data[b]:(c.handle&&(c.events.$destroy&&c.handle({},"$destroy"),Nc(a)),delete gb[d],a.ng339=u))}function wb(a,b){var d=a.ng339,d=d&&gb[d];b&&!d&&(a.ng339=d=++Ff,d=gb[d]={events:{},data:{},handle:u});return d}function Wb(a,b,d){if(Kc(a)){var c=y(d),e=!c&&b&&!H(b),f=!b;a=(a=wb(a,
-!e))&&a.data;if(c)a[b]=d;else{if(f)return a;if(e)return a&&a[b];M(a,b)}}}function yb(a,b){return a.getAttribute?-1<(" "+(a.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").indexOf(" "+b+" "):!1}function zb(a,b){b&&a.setAttribute&&n(b.split(" "),function(b){a.setAttribute("class",U((" "+(a.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").replace(" "+U(b)+" "," ")))})}function Ab(a,b){if(b&&a.setAttribute){var d=(" "+(a.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ");n(b.split(" "),
-function(a){a=U(a);-1===d.indexOf(" "+a+" ")&&(d+=a+" ")});a.setAttribute("class",U(d))}}function Mc(a,b){if(b)if(b.nodeType)a[a.length++]=b;else{var d=b.length;if("number"===typeof d&&b.window!==b){if(d)for(var c=0;c<d;c++)a[a.length++]=b[c]}else a[a.length++]=b}}function Oc(a,b){return Bb(a,"$"+(b||"ngController")+"Controller")}function Bb(a,b,d){9==a.nodeType&&(a=a.documentElement);for(b=I(b)?b:[b];a;){for(var c=0,e=b.length;c<e;c++)if(y(d=B.data(a,b[c])))return d;a=a.parentNode||11===a.nodeType&&
-a.host}}function Pc(a){for(ub(a,!0);a.firstChild;)a.removeChild(a.firstChild)}function Xb(a,b){b||ub(a);var d=a.parentNode;d&&d.removeChild(a)}function Gf(a,b){b=b||S;if("complete"===b.document.readyState)b.setTimeout(a);else B(b).on("load",a)}function Qc(a,b){var d=Cb[b.toLowerCase()];return d&&Rc[ta(a)]&&d}function Hf(a,b){var d=function(c,d){c.isDefaultPrevented=function(){return c.defaultPrevented};var f=b[d||c.type],g=f?f.length:0;if(g){if(q(c.immediatePropagationStopped)){var h=c.stopImmediatePropagation;
-c.stopImmediatePropagation=function(){c.immediatePropagationStopped=!0;c.stopPropagation&&c.stopPropagation();h&&h.call(c)}}c.isImmediatePropagationStopped=function(){return!0===c.immediatePropagationStopped};var k=f.specialHandlerWrapper||If;1<g&&(f=ia(f));for(var l=0;l<g;l++)c.isImmediatePropagationStopped()||k(a,c,f[l])}};d.elem=a;return d}function If(a,b,d){d.call(a,b)}function Jf(a,b,d){var c=b.relatedTarget;c&&(c===a||Kf.call(a,c))||d.call(a,b)}function xf(){this.$get=function(){return M(N,
-{hasClass:function(a,b){a.attr&&(a=a[0]);return yb(a,b)},addClass:function(a,b){a.attr&&(a=a[0]);return Ab(a,b)},removeClass:function(a,b){a.attr&&(a=a[0]);return zb(a,b)}})}}function Ca(a,b){var d=a&&a.$$hashKey;if(d)return"function"===typeof d&&(d=a.$$hashKey()),d;d=typeof a;return d="function"==d||"object"==d&&null!==a?a.$$hashKey=d+":"+(b||Td)():d+":"+a}function Sa(a,b){if(b){var d=0;this.nextUid=function(){return++d}}n(a,this.put,this)}function Lf(a){return(a=a.toString().replace(Sc,"").match(Tc))?
-"function("+(a[1]||"").replace(/[\s\r\n]+/," ")+")":"fn"}function eb(a,b){function d(a){return function(b,c){if(H(b))n(b,pc(a));else return a(b,c)}}function c(a,b){Ra(a,"service");if(z(b)||I(b))b=t.instantiate(b);if(!b.$get)throw Da("pget",a);return r[a+"Provider"]=b}function e(a,b){return function(){var c=v.invoke(b,this);if(q(c))throw Da("undef",a);return c}}function f(a,b,d){return c(a,{$get:!1!==d?e(a,b):b})}function g(a){qb(q(a)||I(a),"modulesToLoad","not an array");var b=[],c;n(a,function(a){function d(a){var b,
-c;b=0;for(c=a.length;b<c;b++){var e=a[b],f=t.get(e[0]);f[e[1]].apply(f,e[2])}}if(!m.get(a)){m.put(a,!0);try{E(a)?(c=Sb(a),b=b.concat(g(c.requires)).concat(c._runBlocks),d(c._invokeQueue),d(c._configBlocks)):z(a)?b.push(t.invoke(a)):I(a)?b.push(t.invoke(a)):Qa(a,"module")}catch(e){throw I(a)&&(a=a[a.length-1]),e.message&&e.stack&&-1==e.stack.indexOf(e.message)&&(e=e.message+"\n"+e.stack),Da("modulerr",a,e.stack||e.message||e);}}});return b}function h(a,c){function d(b,e){if(a.hasOwnProperty(b)){if(a[b]===
-k)throw Da("cdep",b+" <- "+l.join(" <- "));return a[b]}try{return l.unshift(b),a[b]=k,a[b]=c(b,e)}catch(f){throw a[b]===k&&delete a[b],f;}finally{l.shift()}}function e(a,c,f,g){"string"===typeof f&&(g=f,f=null);var h=[],k=eb.$$annotate(a,b,g),l,m,t;m=0;for(l=k.length;m<l;m++){t=k[m];if("string"!==typeof t)throw Da("itkn",t);h.push(f&&f.hasOwnProperty(t)?f[t]:d(t,g))}I(a)&&(a=a[l]);return a.apply(c,h)}return{invoke:e,instantiate:function(a,b,c){var d=Object.create((I(a)?a[a.length-1]:a).prototype||
-null);a=e(a,d,b,c);return H(a)||z(a)?a:d},get:d,annotate:eb.$$annotate,has:function(b){return r.hasOwnProperty(b+"Provider")||a.hasOwnProperty(b)}}}b=!0===b;var k={},l=[],m=new Sa([],!0),r={$provide:{provider:d(c),factory:d(f),service:d(function(a,b){return f(a,["$injector",function(a){return a.instantiate(b)}])}),value:d(function(a,b){return f(a,na(b),!1)}),constant:d(function(a,b){Ra(a,"constant");r[a]=b;A[a]=b}),decorator:function(a,b){var c=t.get(a+"Provider"),d=c.$get;c.$get=function(){var a=
-v.invoke(d,c);return v.invoke(b,null,{$delegate:a})}}}},t=r.$injector=h(r,function(a,b){fa.isString(b)&&l.push(b);throw Da("unpr",l.join(" <- "));}),A={},v=A.$injector=h(A,function(a,b){var c=t.get(a+"Provider",b);return v.invoke(c.$get,c,u,a)});n(g(a),function(a){a&&v.invoke(a)});return v}function Qe(){var a=!0;this.disableAutoScrolling=function(){a=!1};this.$get=["$window","$location","$rootScope",function(b,d,c){function e(a){var b=null;Array.prototype.some.call(a,function(a){if("a"===ta(a))return b=
-a,!0});return b}function f(a){if(a){a.scrollIntoView();var c;c=g.yOffset;z(c)?c=c():Nb(c)?(c=c[0],c="fixed"!==b.getComputedStyle(c).position?0:c.getBoundingClientRect().bottom):Q(c)||(c=0);c&&(a=a.getBoundingClientRect().top,b.scrollBy(0,a-c))}else b.scrollTo(0,0)}function g(a){a=E(a)?a:d.hash();var b;a?(b=h.getElementById(a))?f(b):(b=e(h.getElementsByName(a)))?f(b):"top"===a&&f(null):f(null)}var h=b.document;a&&c.$watch(function(){return d.hash()},function(a,b){a===b&&""===a||Gf(function(){c.$evalAsync(g)})});
-return g}]}function hb(a,b){if(!a&&!b)return"";if(!a)return b;if(!b)return a;I(a)&&(a=a.join(" "));I(b)&&(b=b.join(" "));return a+" "+b}function Mf(a){E(a)&&(a=a.split(" "));var b=$();n(a,function(a){a.length&&(b[a]=!0)});return b}function Ea(a){return H(a)?a:{}}function Nf(a,b,d,c){function e(a){try{a.apply(null,ra.call(arguments,1))}finally{if(v--,0===v)for(;T.length;)try{T.pop()()}catch(b){d.error(b)}}}function f(){L=null;g();h()}function g(){a:{try{p=m.state;break a}catch(a){}p=void 0}p=q(p)?
-null:p;ma(p,J)&&(p=J);J=p}function h(){if(w!==k.url()||C!==p)w=k.url(),C=p,n(aa,function(a){a(k.url(),p)})}var k=this,l=a.location,m=a.history,r=a.setTimeout,t=a.clearTimeout,A={};k.isMock=!1;var v=0,T=[];k.$$completeOutstandingRequest=e;k.$$incOutstandingRequestCount=function(){v++};k.notifyWhenNoOutstandingRequests=function(a){0===v?a():T.push(a)};var p,C,w=l.href,ga=b.find("base"),L=null;g();C=p;k.url=function(b,d,e){q(e)&&(e=null);l!==a.location&&(l=a.location);m!==a.history&&(m=a.history);if(b){var f=
-C===e;if(w===b&&(!c.history||f))return k;var h=w&&Fa(w)===Fa(b);w=b;C=e;if(!c.history||h&&f){if(!h||L)L=b;d?l.replace(b):h?(d=l,e=b.indexOf("#"),e=-1===e?"":b.substr(e),d.hash=e):l.href=b;l.href!==b&&(L=b)}else m[d?"replaceState":"pushState"](e,"",b),g(),C=p;return k}return L||l.href.replace(/%27/g,"'")};k.state=function(){return p};var aa=[],D=!1,J=null;k.onUrlChange=function(b){if(!D){if(c.history)B(a).on("popstate",f);B(a).on("hashchange",f);D=!0}aa.push(b);return b};k.$$applicationDestroyed=function(){B(a).off("hashchange popstate",
-f)};k.$$checkUrlChange=h;k.baseHref=function(){var a=ga.attr("href");return a?a.replace(/^(https?\:)?\/\/[^\/]*/,""):""};k.defer=function(a,b){var c;v++;c=r(function(){delete A[c];e(a)},b||0);A[c]=!0;return c};k.defer.cancel=function(a){return A[a]?(delete A[a],t(a),e(x),!0):!1}}function Ve(){this.$get=["$window","$log","$sniffer","$document",function(a,b,d,c){return new Nf(a,c,b,d)}]}function We(){this.$get=function(){function a(a,c){function e(a){a!=r&&(t?t==a&&(t=a.n):t=a,f(a.n,a.p),f(a,r),r=a,
-r.n=null)}function f(a,b){a!=b&&(a&&(a.p=b),b&&(b.n=a))}if(a in b)throw G("$cacheFactory")("iid",a);var g=0,h=M({},c,{id:a}),k=$(),l=c&&c.capacity||Number.MAX_VALUE,m=$(),r=null,t=null;return b[a]={put:function(a,b){if(!q(b)){if(l<Number.MAX_VALUE){var c=m[a]||(m[a]={key:a});e(c)}a in k||g++;k[a]=b;g>l&&this.remove(t.key);return b}},get:function(a){if(l<Number.MAX_VALUE){var b=m[a];if(!b)return;e(b)}return k[a]},remove:function(a){if(l<Number.MAX_VALUE){var b=m[a];if(!b)return;b==r&&(r=b.p);b==t&&
-(t=b.n);f(b.n,b.p);delete m[a]}a in k&&(delete k[a],g--)},removeAll:function(){k=$();g=0;m=$();r=t=null},destroy:function(){m=h=k=null;delete b[a]},info:function(){return M({},h,{size:g})}}}var b={};a.info=function(){var a={};n(b,function(b,e){a[e]=b.info()});return a};a.get=function(a){return b[a]};return a}}function rf(){this.$get=["$cacheFactory",function(a){return a("templates")}]}function Cc(a,b){function d(a,b,c){var d=/^\s*([@&]|=(\*?))(\??)\s*(\w*)\s*$/,e={};n(a,function(a,f){var g=a.match(d);
-if(!g)throw ha("iscp",b,f,a,c?"controller bindings definition":"isolate scope definition");e[f]={mode:g[1][0],collection:"*"===g[2],optional:"?"===g[3],attrName:g[4]||f}});return e}function c(a){var b=a.charAt(0);if(!b||b!==F(b))throw ha("baddir",a);if(a!==a.trim())throw ha("baddir",a);}var e={},f=/^\s*directive\:\s*([\w\-]+)\s+(.*)$/,g=/(([\w\-]+)(?:\:([^;]+))?;?)/,h=Wd("ngSrc,ngSrcset,src,srcset"),k=/^(?:(\^\^?)?(\?)?(\^\^?)?)?/,l=/^(on[a-z]+|formaction)$/;this.directive=function t(b,f){Ra(b,"directive");
-E(b)?(c(b),qb(f,"directiveFactory"),e.hasOwnProperty(b)||(e[b]=[],a.factory(b+"Directive",["$injector","$exceptionHandler",function(a,c){var f=[];n(e[b],function(e,g){try{var h=a.invoke(e);z(h)?h={compile:na(h)}:!h.compile&&h.link&&(h.compile=na(h.link));h.priority=h.priority||0;h.index=g;h.name=h.name||b;h.require=h.require||h.controller&&h.name;h.restrict=h.restrict||"EA";var k=h,l=h,m=h.name,t={isolateScope:null,bindToController:null};H(l.scope)&&(!0===l.bindToController?(t.bindToController=d(l.scope,
-m,!0),t.isolateScope={}):t.isolateScope=d(l.scope,m,!1));H(l.bindToController)&&(t.bindToController=d(l.bindToController,m,!0));if(H(t.bindToController)){var v=l.controller,R=l.controllerAs;if(!v)throw ha("noctrl",m);var V;a:if(R&&E(R))V=R;else{if(E(v)){var n=Uc.exec(v);if(n){V=n[3];break a}}V=void 0}if(!V)throw ha("noident",m);}var s=k.$$bindings=t;H(s.isolateScope)&&(h.$$isolateBindings=s.isolateScope);h.$$moduleName=e.$$moduleName;f.push(h)}catch(u){c(u)}});return f}])),e[b].push(f)):n(b,pc(t));
-return this};this.aHrefSanitizationWhitelist=function(a){return y(a)?(b.aHrefSanitizationWhitelist(a),this):b.aHrefSanitizationWhitelist()};this.imgSrcSanitizationWhitelist=function(a){return y(a)?(b.imgSrcSanitizationWhitelist(a),this):b.imgSrcSanitizationWhitelist()};var m=!0;this.debugInfoEnabled=function(a){return y(a)?(m=a,this):m};this.$get=["$injector","$interpolate","$exceptionHandler","$templateRequest","$parse","$controller","$rootScope","$document","$sce","$animate","$$sanitizeUri",function(a,
-b,c,d,p,C,w,ga,L,aa,D){function J(a,b){try{a.addClass(b)}catch(c){}}function K(a,b,c,d,e){a instanceof B||(a=B(a));n(a,function(b,c){b.nodeType==Na&&b.nodeValue.match(/\S+/)&&(a[c]=B(b).wrap("<span></span>").parent()[0])});var f=O(a,b,a,c,d,e);K.$$addScopeClass(a);var g=null;return function(b,c,d){qb(b,"scope");e&&e.needsNewScope&&(b=b.$parent.$new());d=d||{};var h=d.parentBoundTranscludeFn,k=d.transcludeControllers;d=d.futureParentElement;h&&h.$$boundTransclude&&(h=h.$$boundTransclude);g||(g=(d=
-d&&d[0])?"foreignobject"!==ta(d)&&d.toString().match(/SVG/)?"svg":"html":"html");d="html"!==g?B(Yb(g,B("<div>").append(a).html())):c?Pa.clone.call(a):a;if(k)for(var l in k)d.data("$"+l+"Controller",k[l].instance);K.$$addScopeInfo(d,b);c&&c(d,b);f&&f(b,d,d,h);return d}}function O(a,b,c,d,e,f){function g(a,c,d,e){var f,k,l,m,t,w,D;if(p)for(D=Array(c.length),m=0;m<h.length;m+=3)f=h[m],D[f]=c[f];else D=c;m=0;for(t=h.length;m<t;)k=D[h[m++]],c=h[m++],f=h[m++],c?(c.scope?(l=a.$new(),K.$$addScopeInfo(B(k),
-l)):l=a,w=c.transcludeOnThisElement?R(a,c.transclude,e):!c.templateOnThisElement&&e?e:!e&&b?R(a,b):null,c(f,l,k,d,w)):f&&f(a,k.childNodes,u,e)}for(var h=[],k,l,m,t,p,w=0;w<a.length;w++){k=new fa;l=V(a[w],[],k,0===w?d:u,e);(f=l.length?Z(l,a[w],k,b,c,null,[],[],f):null)&&f.scope&&K.$$addScopeClass(k.$$element);k=f&&f.terminal||!(m=a[w].childNodes)||!m.length?null:O(m,f?(f.transcludeOnThisElement||!f.templateOnThisElement)&&f.transclude:b);if(f||k)h.push(w,f,k),t=!0,p=p||f;f=null}return t?g:null}function R(a,
-b,c){return function(d,e,f,g,h){d||(d=a.$new(!1,h),d.$$transcluded=!0);return b(d,e,{parentBoundTranscludeFn:c,transcludeControllers:f,futureParentElement:g})}}function V(a,b,c,d,e){var h=c.$attr,k;switch(a.nodeType){case 1:P(b,va(ta(a)),"E",d,e);for(var l,m,t,p=a.attributes,w=0,D=p&&p.length;w<D;w++){var K=!1,A=!1;l=p[w];k=l.name;m=U(l.value);l=va(k);if(t=ka.test(l))k=k.replace(Vc,"").substr(8).replace(/_(.)/g,function(a,b){return b.toUpperCase()});(l=l.match(la))&&G(l[1])&&(K=k,A=k.substr(0,k.length-
-5)+"end",k=k.substr(0,k.length-6));l=va(k.toLowerCase());h[l]=k;if(t||!c.hasOwnProperty(l))c[l]=m,Qc(a,l)&&(c[l]=!0);W(a,b,m,l,t);P(b,l,"A",d,e,K,A)}a=a.className;H(a)&&(a=a.animVal);if(E(a)&&""!==a)for(;k=g.exec(a);)l=va(k[2]),P(b,l,"C",d,e)&&(c[l]=U(k[3])),a=a.substr(k.index+k[0].length);break;case Na:if(11===Ha)for(;a.parentNode&&a.nextSibling&&a.nextSibling.nodeType===Na;)a.nodeValue+=a.nextSibling.nodeValue,a.parentNode.removeChild(a.nextSibling);N(b,a.nodeValue);break;case 8:try{if(k=f.exec(a.nodeValue))l=
-va(k[1]),P(b,l,"M",d,e)&&(c[l]=U(k[2]))}catch(R){}}b.sort(Ia);return b}function Ta(a,b,c){var d=[],e=0;if(b&&a.hasAttribute&&a.hasAttribute(b)){do{if(!a)throw ha("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 B(d)}function s(a,b,c){return function(d,e,f,g,h){e=Ta(e[0],b,c);return a(d,e,f,g,h)}}function Z(a,b,d,e,f,g,h,l,m){function t(a,b,c,d){if(a){c&&(a=s(a,c,d));a.require=q.require;a.directiveName=x;if(O===
-q||q.$$isolateScope)a=ca(a,{isolateScope:!0});h.push(a)}if(b){c&&(b=s(b,c,d));b.require=q.require;b.directiveName=x;if(O===q||q.$$isolateScope)b=ca(b,{isolateScope:!0});l.push(b)}}function p(a,b,c,d){var e;if(E(b)){var f=b.match(k);b=b.substring(f[0].length);var g=f[1]||f[3],f="?"===f[2];"^^"===g?c=c.parent():e=(e=d&&d[b])&&e.instance;e||(d="$"+b+"Controller",e=g?c.inheritedData(d):c.data(d));if(!e&&!f)throw ha("ctreq",b,a);}else if(I(b))for(e=[],g=0,f=b.length;g<f;g++)e[g]=p(a,b[g],c,d);return e||
-null}function w(a,b,c,d,e,f){var g=$(),h;for(h in d){var k=d[h],l={$scope:k===O||k.$$isolateScope?e:f,$element:a,$attrs:b,$transclude:c},m=k.controller;"@"==m&&(m=b[k.name]);l=C(m,l,!0,k.controllerAs);g[k.name]=l;aa||a.data("$"+k.name+"Controller",l.instance)}return g}function D(a,c,e,f,g){function k(a,b,c){var d;Za(a)||(c=b,b=a,a=u);aa&&(d=v);c||(c=aa?V.parent():V);return g(a,b,d,c,Ta)}var m,t,A,v,C,V,Ga;b===e?(f=d,V=d.$$element):(V=B(e),f=new fa(V,d));A=c;O?t=c.$new(!0):R&&(A=c.$parent);g&&(C=k,
-C.$$boundTransclude=g);T&&(v=w(V,f,C,T,t,c));O&&(K.$$addScopeInfo(V,t,!0,!(J&&(J===O||J===O.$$originalDirective))),K.$$addScopeClass(V,!0),t.$$isolateBindings=O.$$isolateBindings,(Ga=ba(c,f,t,t.$$isolateBindings,O))&&t.$on("$destroy",Ga));for(var n in v){Ga=T[n];var ga=v[n],L=Ga.$$bindings.bindToController;ga.identifier&&L&&(m=ba(A,f,ga.instance,L,Ga));var q=ga();q!==ga.instance&&(ga.instance=q,V.data("$"+Ga.name+"Controller",q),m&&m(),m=ba(A,f,ga.instance,L,Ga))}F=0;for(M=h.length;F<M;F++)m=h[F],
-ea(m,m.isolateScope?t:c,V,f,m.require&&p(m.directiveName,m.require,V,v),C);var Ta=c;O&&(O.template||null===O.templateUrl)&&(Ta=t);a&&a(Ta,e.childNodes,u,g);for(F=l.length-1;0<=F;F--)m=l[F],ea(m,m.isolateScope?t:c,V,f,m.require&&p(m.directiveName,m.require,V,v),C)}m=m||{};for(var A=-Number.MAX_VALUE,R=m.newScopeDirective,T=m.controllerDirectives,O=m.newIsolateScopeDirective,J=m.templateDirective,n=m.nonTlbTranscludeDirective,ga=!1,L=!1,aa=m.hasElementTranscludeDirective,Z=d.$$element=B(b),q,x,P,Ia=
-e,G,F=0,M=a.length;F<M;F++){q=a[F];var N=q.$$start,Q=q.$$end;N&&(Z=Ta(b,N,Q));P=u;if(A>q.priority)break;if(P=q.scope)q.templateUrl||(H(P)?(Ua("new/isolated scope",O||R,q,Z),O=q):Ua("new/isolated scope",O,q,Z)),R=R||q;x=q.name;!q.templateUrl&&q.controller&&(P=q.controller,T=T||$(),Ua("'"+x+"' controller",T[x],q,Z),T[x]=q);if(P=q.transclude)ga=!0,q.$$tlb||(Ua("transclusion",n,q,Z),n=q),"element"==P?(aa=!0,A=q.priority,P=Z,Z=d.$$element=B(X.createComment(" "+x+": "+d[x]+" ")),b=Z[0],Y(f,ra.call(P,0),
-b),Ia=K(P,e,A,g&&g.name,{nonTlbTranscludeDirective:n})):(P=B(Vb(b)).contents(),Z.empty(),Ia=K(P,e,u,u,{needsNewScope:q.$$isolateScope||q.$$newScope}));if(q.template)if(L=!0,Ua("template",J,q,Z),J=q,P=z(q.template)?q.template(Z,d):q.template,P=ja(P),q.replace){g=q;P=Tb.test(P)?Xc(Yb(q.templateNamespace,U(P))):[];b=P[0];if(1!=P.length||1!==b.nodeType)throw ha("tplrt",x,"");Y(f,Z,b);P={$attr:{}};var Wc=V(b,[],P),W=a.splice(F+1,a.length-(F+1));(O||R)&&y(Wc,O,R);a=a.concat(Wc).concat(W);S(d,P);M=a.length}else Z.html(P);
-if(q.templateUrl)L=!0,Ua("template",J,q,Z),J=q,q.replace&&(g=q),D=Of(a.splice(F,a.length-F),Z,d,f,ga&&Ia,h,l,{controllerDirectives:T,newScopeDirective:R!==q&&R,newIsolateScopeDirective:O,templateDirective:J,nonTlbTranscludeDirective:n}),M=a.length;else if(q.compile)try{G=q.compile(Z,d,Ia),z(G)?t(null,G,N,Q):G&&t(G.pre,G.post,N,Q)}catch(da){c(da,ua(Z))}q.terminal&&(D.terminal=!0,A=Math.max(A,q.priority))}D.scope=R&&!0===R.scope;D.transcludeOnThisElement=ga;D.templateOnThisElement=L;D.transclude=Ia;
-m.hasElementTranscludeDirective=aa;return D}function y(a,b,c){for(var d=0,e=a.length;d<e;d++)a[d]=Ob(a[d],{$$isolateScope:b,$$newScope:c})}function P(b,d,f,g,h,k,l){if(d===h)return null;h=null;if(e.hasOwnProperty(d)){var m;d=a.get(d+"Directive");for(var p=0,w=d.length;p<w;p++)try{m=d[p],(q(g)||g>m.priority)&&-1!=m.restrict.indexOf(f)&&(k&&(m=Ob(m,{$$start:k,$$end:l})),b.push(m),h=m)}catch(D){c(D)}}return h}function G(b){if(e.hasOwnProperty(b))for(var c=a.get(b+"Directive"),d=0,f=c.length;d<f;d++)if(b=
-c[d],b.multiElement)return!0;return!1}function S(a,b){var c=b.$attr,d=a.$attr,e=a.$$element;n(a,function(d,e){"$"!=e.charAt(0)&&(b[e]&&b[e]!==d&&(d+=("style"===e?";":" ")+b[e]),a.$set(e,d,!0,c[e]))});n(b,function(b,f){"class"==f?(J(e,b),a["class"]=(a["class"]?a["class"]+" ":"")+b):"style"==f?(e.attr("style",e.attr("style")+";"+b),a.style=(a.style?a.style+";":"")+b):"$"==f.charAt(0)||a.hasOwnProperty(f)||(a[f]=b,d[f]=c[f])})}function Of(a,b,c,e,f,g,h,k){var l=[],m,t,p=b[0],w=a.shift(),D=Ob(w,{templateUrl:null,
-transclude:null,replace:null,$$originalDirective:w}),A=z(w.templateUrl)?w.templateUrl(b,c):w.templateUrl,K=w.templateNamespace;b.empty();d(A).then(function(d){var T,v;d=ja(d);if(w.replace){d=Tb.test(d)?Xc(Yb(K,U(d))):[];T=d[0];if(1!=d.length||1!==T.nodeType)throw ha("tplrt",w.name,A);d={$attr:{}};Y(e,b,T);var C=V(T,[],d);H(w.scope)&&y(C,!0);a=C.concat(a);S(c,d)}else T=p,b.html(d);a.unshift(D);m=Z(a,T,c,f,b,w,g,h,k);n(e,function(a,c){a==T&&(e[c]=b[0])});for(t=O(b[0].childNodes,f);l.length;){d=l.shift();
-v=l.shift();var ga=l.shift(),L=l.shift(),C=b[0];if(!d.$$destroyed){if(v!==p){var q=v.className;k.hasElementTranscludeDirective&&w.replace||(C=Vb(T));Y(ga,B(v),C);J(B(C),q)}v=m.transcludeOnThisElement?R(d,m.transclude,L):L;m(t,d,C,e,v)}}l=null});return function(a,b,c,d,e){a=e;b.$$destroyed||(l?l.push(b,c,d,a):(m.transcludeOnThisElement&&(a=R(b,m.transclude,e)),m(t,b,c,d,a)))}}function Ia(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 Ua(a,
-b,c,d){function e(a){return a?" (module: "+a+")":""}if(b)throw ha("multidir",b.name,e(b.$$moduleName),c.name,e(c.$$moduleName),a,ua(d));}function N(a,c){var d=b(c,!0);d&&a.push({priority:0,compile:function(a){a=a.parent();var b=!!a.length;b&&K.$$addBindingClass(a);return function(a,c){var e=c.parent();b||K.$$addBindingClass(e);K.$$addBindingInfo(e,d.expressions);a.$watch(d,function(a){c[0].nodeValue=a})}}})}function Yb(a,b){a=F(a||"html");switch(a){case "svg":case "math":var c=X.createElement("div");
-c.innerHTML="<"+a+">"+b+"</"+a+">";return c.childNodes[0].childNodes;default:return b}}function Q(a,b){if("srcdoc"==b)return L.HTML;var c=ta(a);if("xlinkHref"==b||"form"==c&&"action"==b||"img"!=c&&("src"==b||"ngSrc"==b))return L.RESOURCE_URL}function W(a,c,d,e,f){var g=Q(a,e);f=h[e]||f;var k=b(d,!0,g,f);if(k){if("multiple"===e&&"select"===ta(a))throw ha("selmulti",ua(a));c.push({priority:100,compile:function(){return{pre:function(a,c,h){c=h.$$observers||(h.$$observers=$());if(l.test(e))throw ha("nodomevents");
-var m=h[e];m!==d&&(k=m&&b(m,!0,g,f),d=m);k&&(h[e]=k(a),(c[e]||(c[e]=[])).$$inter=!0,(h.$$observers&&h.$$observers[e].$$scope||a).$watch(k,function(a,b){"class"===e&&a!=b?h.$updateClass(a,b):h.$set(e,a)}))}}}})}}function Y(a,b,c){var d=b[0],e=b.length,f=d.parentNode,g,h;if(a)for(g=0,h=a.length;g<h;g++)if(a[g]==d){a[g++]=c;h=g+e-1;for(var k=a.length;g<k;g++,h++)h<k?a[g]=a[h]:delete a[g];a.length-=e-1;a.context===d&&(a.context=c);break}f&&f.replaceChild(c,d);a=X.createDocumentFragment();a.appendChild(d);
-B.hasData(d)&&(B.data(c,B.data(d)),oa?(Rb=!0,oa.cleanData([d])):delete B.cache[d[B.expando]]);d=1;for(e=b.length;d<e;d++)f=b[d],B(f).remove(),a.appendChild(f),delete b[d];b[0]=c;b.length=1}function ca(a,b){return M(function(){return a.apply(null,arguments)},a,b)}function ea(a,b,d,e,f,g){try{a(b,d,e,f,g)}catch(h){c(h,ua(d))}}function ba(a,c,d,e,f){var g=[];n(e,function(e,h){var k=e.attrName,l=e.optional,m,t,w,D;switch(e.mode){case "@":l||qa.call(c,k)||(d[h]=c[k]=void 0);c.$observe(k,function(a){E(a)&&
-(d[h]=a)});c.$$observers[k].$$scope=a;E(c[k])&&(d[h]=b(c[k])(a));break;case "=":if(!qa.call(c,k)){if(l)break;c[k]=void 0}if(l&&!c[k])break;t=p(c[k]);D=t.literal?ma:function(a,b){return a===b||a!==a&&b!==b};w=t.assign||function(){m=d[h]=t(a);throw ha("nonassign",c[k],f.name);};m=d[h]=t(a);l=function(b){D(b,d[h])||(D(b,m)?w(a,b=d[h]):d[h]=b);return m=b};l.$stateful=!0;l=e.collection?a.$watchCollection(c[k],l):a.$watch(p(c[k],l),null,t.literal);g.push(l);break;case "&":t=c.hasOwnProperty(k)?p(c[k]):
-x;if(t===x&&l)break;d[h]=function(b){return t(a,b)}}});return g.length&&function(){for(var a=0,b=g.length;a<b;++a)g[a]()}}var fa=function(a,b){if(b){var c=Object.keys(b),d,e,f;d=0;for(e=c.length;d<e;d++)f=c[d],this[f]=b[f]}else this.$attr={};this.$$element=a};fa.prototype={$normalize:va,$addClass:function(a){a&&0<a.length&&aa.addClass(this.$$element,a)},$removeClass:function(a){a&&0<a.length&&aa.removeClass(this.$$element,a)},$updateClass:function(a,b){var c=Yc(a,b);c&&c.length&&aa.addClass(this.$$element,
-c);(c=Yc(b,a))&&c.length&&aa.removeClass(this.$$element,c)},$set:function(a,b,d,e){var f=Qc(this.$$element[0],a),g=Zc[a],h=a;f?(this.$$element.prop(a,b),e=f):g&&(this[g]=b,h=g);this[a]=b;e?this.$attr[a]=e:(e=this.$attr[a])||(this.$attr[a]=e=zc(a,"-"));f=ta(this.$$element);if("a"===f&&"href"===a||"img"===f&&"src"===a)this[a]=b=D(b,"src"===a);else if("img"===f&&"srcset"===a){for(var f="",g=U(b),k=/(\s+\d+x\s*,|\s+\d+w\s*,|\s+,|,\s+)/,k=/\s/.test(g)?k:/(,)/,g=g.split(k),k=Math.floor(g.length/2),l=0;l<
-k;l++)var m=2*l,f=f+D(U(g[m]),!0),f=f+(" "+U(g[m+1]));g=U(g[2*l]).split(/\s/);f+=D(U(g[0]),!0);2===g.length&&(f+=" "+U(g[1]));this[a]=b=f}!1!==d&&(null===b||q(b)?this.$$element.removeAttr(e):this.$$element.attr(e,b));(a=this.$$observers)&&n(a[h],function(a){try{a(b)}catch(d){c(d)}})},$observe:function(a,b){var c=this,d=c.$$observers||(c.$$observers=$()),e=d[a]||(d[a]=[]);e.push(b);w.$evalAsync(function(){e.$$inter||!c.hasOwnProperty(a)||q(c[a])||b(c[a])});return function(){ab(e,b)}}};var da=b.startSymbol(),
-ia=b.endSymbol(),ja="{{"==da||"}}"==ia?Ya:function(a){return a.replace(/\{\{/g,da).replace(/}}/g,ia)},ka=/^ngAttr[A-Z]/,la=/^(.+)Start$/;K.$$addBindingInfo=m?function(a,b){var c=a.data("$binding")||[];I(b)?c=c.concat(b):c.push(b);a.data("$binding",c)}:x;K.$$addBindingClass=m?function(a){J(a,"ng-binding")}:x;K.$$addScopeInfo=m?function(a,b,c,d){a.data(c?d?"$isolateScopeNoTemplate":"$isolateScope":"$scope",b)}:x;K.$$addScopeClass=m?function(a,b){J(a,b?"ng-isolate-scope":"ng-scope")}:x;return K}]}function va(a){return fb(a.replace(Vc,
-""))}function Yc(a,b){var d="",c=a.split(/\s+/),e=b.split(/\s+/),f=0;a:for(;f<c.length;f++){for(var g=c[f],h=0;h<e.length;h++)if(g==e[h])continue a;d+=(0<d.length?" ":"")+g}return d}function Xc(a){a=B(a);var b=a.length;if(1>=b)return a;for(;b--;)8===a[b].nodeType&&Pf.call(a,b,1);return a}function Xe(){var a={},b=!1;this.register=function(b,c){Ra(b,"controller");H(b)?M(a,b):a[b]=c};this.allowGlobals=function(){b=!0};this.$get=["$injector","$window",function(d,c){function e(a,b,c,d){if(!a||!H(a.$scope))throw G("$controller")("noscp",
-d,b);a.$scope[b]=c}return function(f,g,h,k){var l,m,r;h=!0===h;k&&E(k)&&(r=k);if(E(f)){k=f.match(Uc);if(!k)throw Qf("ctrlfmt",f);m=k[1];r=r||k[3];f=a.hasOwnProperty(m)?a[m]:Bc(g.$scope,m,!0)||(b?Bc(c,m,!0):u);Qa(f,m,!0)}if(h)return h=(I(f)?f[f.length-1]:f).prototype,l=Object.create(h||null),r&&e(g,r,l,m||f.name),M(function(){var a=d.invoke(f,l,g,m);a!==l&&(H(a)||z(a))&&(l=a,r&&e(g,r,l,m||f.name));return l},{instance:l,identifier:r});l=d.instantiate(f,g,m);r&&e(g,r,l,m||f.name);return l}}]}function Ye(){this.$get=
-["$window",function(a){return B(a.document)}]}function Ze(){this.$get=["$log",function(a){return function(b,d){a.error.apply(a,arguments)}}]}function Zb(a){return H(a)?da(a)?a.toISOString():db(a):a}function df(){this.$get=function(){return function(a){if(!a)return"";var b=[];oc(a,function(a,c){null===a||q(a)||(I(a)?n(a,function(a,d){b.push(ja(c)+"="+ja(Zb(a)))}):b.push(ja(c)+"="+ja(Zb(a))))});return b.join("&")}}}function ef(){this.$get=function(){return function(a){function b(a,e,f){null===a||q(a)||
-(I(a)?n(a,function(a,c){b(a,e+"["+(H(a)?c:"")+"]")}):H(a)&&!da(a)?oc(a,function(a,c){b(a,e+(f?"":"[")+c+(f?"":"]"))}):d.push(ja(e)+"="+ja(Zb(a))))}if(!a)return"";var d=[];b(a,"",!0);return d.join("&")}}}function $b(a,b){if(E(a)){var d=a.replace(Rf,"").trim();if(d){var c=b("Content-Type");(c=c&&0===c.indexOf($c))||(c=(c=d.match(Sf))&&Tf[c[0]].test(d));c&&(a=uc(d))}}return a}function ad(a){var b=$(),d;E(a)?n(a.split("\n"),function(a){d=a.indexOf(":");var e=F(U(a.substr(0,d)));a=U(a.substr(d+1));e&&
-(b[e]=b[e]?b[e]+", "+a:a)}):H(a)&&n(a,function(a,d){var f=F(d),g=U(a);f&&(b[f]=b[f]?b[f]+", "+g:g)});return b}function bd(a){var b;return function(d){b||(b=ad(a));return d?(d=b[F(d)],void 0===d&&(d=null),d):b}}function cd(a,b,d,c){if(z(c))return c(a,b,d);n(c,function(c){a=c(a,b,d)});return a}function cf(){var a=this.defaults={transformResponse:[$b],transformRequest:[function(a){return H(a)&&"[object File]"!==sa.call(a)&&"[object Blob]"!==sa.call(a)&&"[object FormData]"!==sa.call(a)?db(a):a}],headers:{common:{Accept:"application/json, text/plain, */*"},
-post:ia(ac),put:ia(ac),patch:ia(ac)},xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",paramSerializer:"$httpParamSerializer"},b=!1;this.useApplyAsync=function(a){return y(a)?(b=!!a,this):b};var d=!0;this.useLegacyPromiseExtensions=function(a){return y(a)?(d=!!a,this):d};var c=this.interceptors=[];this.$get=["$httpBackend","$$cookieReader","$cacheFactory","$rootScope","$q","$injector",function(e,f,g,h,k,l){function m(b){function c(a){var b=M({},a);b.data=cd(a.data,a.headers,a.status,f.transformResponse);
-a=a.status;return 200<=a&&300>a?b:k.reject(b)}function e(a,b){var c,d={};n(a,function(a,e){z(a)?(c=a(b),null!=c&&(d[e]=c)):d[e]=a});return d}if(!fa.isObject(b))throw G("$http")("badreq",b);var f=M({method:"get",transformRequest:a.transformRequest,transformResponse:a.transformResponse,paramSerializer:a.paramSerializer},b);f.headers=function(b){var c=a.headers,d=M({},b.headers),f,g,h,c=M({},c.common,c[F(b.method)]);a:for(f in c){g=F(f);for(h in d)if(F(h)===g)continue a;d[f]=c[f]}return e(d,ia(b))}(b);
-f.method=sb(f.method);f.paramSerializer=E(f.paramSerializer)?l.get(f.paramSerializer):f.paramSerializer;var g=[function(b){var d=b.headers,e=cd(b.data,bd(d),u,b.transformRequest);q(e)&&n(d,function(a,b){"content-type"===F(b)&&delete d[b]});q(b.withCredentials)&&!q(a.withCredentials)&&(b.withCredentials=a.withCredentials);return r(b,e).then(c,c)},u],h=k.when(f);for(n(v,function(a){(a.request||a.requestError)&&g.unshift(a.request,a.requestError);(a.response||a.responseError)&&g.push(a.response,a.responseError)});g.length;){b=
-g.shift();var m=g.shift(),h=h.then(b,m)}d?(h.success=function(a){Qa(a,"fn");h.then(function(b){a(b.data,b.status,b.headers,f)});return h},h.error=function(a){Qa(a,"fn");h.then(null,function(b){a(b.data,b.status,b.headers,f)});return h}):(h.success=dd("success"),h.error=dd("error"));return h}function r(c,d){function g(a,c,d,e){function f(){l(c,a,d,e)}J&&(200<=a&&300>a?J.put(R,[a,c,ad(d),e]):J.remove(R));b?h.$applyAsync(f):(f(),h.$$phase||h.$apply())}function l(a,b,d,e){b=-1<=b?b:0;(200<=b&&300>b?n.resolve:
-n.reject)({data:a,status:b,headers:bd(d),config:c,statusText:e})}function r(a){l(a.data,a.status,ia(a.headers()),a.statusText)}function v(){var a=m.pendingRequests.indexOf(c);-1!==a&&m.pendingRequests.splice(a,1)}var n=k.defer(),D=n.promise,J,K,O=c.headers,R=t(c.url,c.paramSerializer(c.params));m.pendingRequests.push(c);D.then(v,v);!c.cache&&!a.cache||!1===c.cache||"GET"!==c.method&&"JSONP"!==c.method||(J=H(c.cache)?c.cache:H(a.cache)?a.cache:A);J&&(K=J.get(R),y(K)?K&&z(K.then)?K.then(r,r):I(K)?l(K[1],
-K[0],ia(K[2]),K[3]):l(K,200,{},"OK"):J.put(R,D));q(K)&&((K=ed(c.url)?f()[c.xsrfCookieName||a.xsrfCookieName]:u)&&(O[c.xsrfHeaderName||a.xsrfHeaderName]=K),e(c.method,R,d,g,O,c.timeout,c.withCredentials,c.responseType));return D}function t(a,b){0<b.length&&(a+=(-1==a.indexOf("?")?"?":"&")+b);return a}var A=g("$http");a.paramSerializer=E(a.paramSerializer)?l.get(a.paramSerializer):a.paramSerializer;var v=[];n(c,function(a){v.unshift(E(a)?l.get(a):l.invoke(a))});m.pendingRequests=[];(function(a){n(arguments,
-function(a){m[a]=function(b,c){return m(M({},c||{},{method:a,url:b}))}})})("get","delete","head","jsonp");(function(a){n(arguments,function(a){m[a]=function(b,c,d){return m(M({},d||{},{method:a,url:b,data:c}))}})})("post","put","patch");m.defaults=a;return m}]}function gf(){this.$get=function(){return function(){return new S.XMLHttpRequest}}}function ff(){this.$get=["$browser","$window","$document","$xhrFactory",function(a,b,d,c){return Uf(a,c,a.defer,b.angular.callbacks,d[0])}]}function Uf(a,b,d,
-c,e){function f(a,b,d){var f=e.createElement("script"),m=null;f.type="text/javascript";f.src=a;f.async=!0;m=function(a){f.removeEventListener("load",m,!1);f.removeEventListener("error",m,!1);e.body.removeChild(f);f=null;var g=-1,A="unknown";a&&("load"!==a.type||c[b].called||(a={type:"error"}),A=a.type,g="error"===a.type?404:200);d&&d(g,A)};f.addEventListener("load",m,!1);f.addEventListener("error",m,!1);e.body.appendChild(f);return m}return function(e,h,k,l,m,r,t,A){function v(){C&&C();w&&w.abort()}
-function T(b,c,e,f,g){y(L)&&d.cancel(L);C=w=null;b(c,e,f,g);a.$$completeOutstandingRequest(x)}a.$$incOutstandingRequestCount();h=h||a.url();if("jsonp"==F(e)){var p="_"+(c.counter++).toString(36);c[p]=function(a){c[p].data=a;c[p].called=!0};var C=f(h.replace("JSON_CALLBACK","angular.callbacks."+p),p,function(a,b){T(l,a,c[p].data,"",b);c[p]=x})}else{var w=b(e,h);w.open(e,h,!0);n(m,function(a,b){y(a)&&w.setRequestHeader(b,a)});w.onload=function(){var a=w.statusText||"",b="response"in w?w.response:w.responseText,
-c=1223===w.status?204:w.status;0===c&&(c=b?200:"file"==wa(h).protocol?404:0);T(l,c,b,w.getAllResponseHeaders(),a)};e=function(){T(l,-1,null,null,"")};w.onerror=e;w.onabort=e;t&&(w.withCredentials=!0);if(A)try{w.responseType=A}catch(ga){if("json"!==A)throw ga;}w.send(q(k)?null:k)}if(0<r)var L=d(v,r);else r&&z(r.then)&&r.then(v)}}function af(){var a="{{",b="}}";this.startSymbol=function(b){return b?(a=b,this):a};this.endSymbol=function(a){return a?(b=a,this):b};this.$get=["$parse","$exceptionHandler",
-"$sce",function(d,c,e){function f(a){return"\\\\\\"+a}function g(c){return c.replace(m,a).replace(r,b)}function h(f,h,m,r){function p(a){try{var b=a;a=m?e.getTrusted(m,b):e.valueOf(b);var d;if(r&&!y(a))d=a;else if(null==a)d="";else{switch(typeof a){case "string":break;case "number":a=""+a;break;default:a=db(a)}d=a}return d}catch(g){c(Ja.interr(f,g))}}r=!!r;for(var C,w,n=0,L=[],s=[],D=f.length,J=[],K=[];n<D;)if(-1!=(C=f.indexOf(a,n))&&-1!=(w=f.indexOf(b,C+k)))n!==C&&J.push(g(f.substring(n,C))),n=f.substring(C+
-k,w),L.push(n),s.push(d(n,p)),n=w+l,K.push(J.length),J.push("");else{n!==D&&J.push(g(f.substring(n)));break}m&&1<J.length&&Ja.throwNoconcat(f);if(!h||L.length){var O=function(a){for(var b=0,c=L.length;b<c;b++){if(r&&q(a[b]))return;J[K[b]]=a[b]}return J.join("")};return M(function(a){var b=0,d=L.length,e=Array(d);try{for(;b<d;b++)e[b]=s[b](a);return O(e)}catch(g){c(Ja.interr(f,g))}},{exp:f,expressions:L,$$watchDelegate:function(a,b){var c;return a.$watchGroup(s,function(d,e){var f=O(d);z(b)&&b.call(this,
-f,d!==e?c:f,a);c=f})}})}}var k=a.length,l=b.length,m=new RegExp(a.replace(/./g,f),"g"),r=new RegExp(b.replace(/./g,f),"g");h.startSymbol=function(){return a};h.endSymbol=function(){return b};return h}]}function bf(){this.$get=["$rootScope","$window","$q","$$q",function(a,b,d,c){function e(e,h,k,l){var m=4<arguments.length,r=m?ra.call(arguments,4):[],t=b.setInterval,A=b.clearInterval,v=0,n=y(l)&&!l,p=(n?c:d).defer(),C=p.promise;k=y(k)?k:0;C.then(null,null,m?function(){e.apply(null,r)}:e);C.$$intervalId=
-t(function(){p.notify(v++);0<k&&v>=k&&(p.resolve(v),A(C.$$intervalId),delete f[C.$$intervalId]);n||a.$apply()},h);f[C.$$intervalId]=p;return C}var f={};e.cancel=function(a){return a&&a.$$intervalId in f?(f[a.$$intervalId].reject("canceled"),b.clearInterval(a.$$intervalId),delete f[a.$$intervalId],!0):!1};return e}]}function bc(a){a=a.split("/");for(var b=a.length;b--;)a[b]=ob(a[b]);return a.join("/")}function fd(a,b){var d=wa(a);b.$$protocol=d.protocol;b.$$host=d.hostname;b.$$port=ea(d.port)||Vf[d.protocol]||
-null}function gd(a,b){var d="/"!==a.charAt(0);d&&(a="/"+a);var c=wa(a);b.$$path=decodeURIComponent(d&&"/"===c.pathname.charAt(0)?c.pathname.substring(1):c.pathname);b.$$search=xc(c.search);b.$$hash=decodeURIComponent(c.hash);b.$$path&&"/"!=b.$$path.charAt(0)&&(b.$$path="/"+b.$$path)}function pa(a,b){if(0===b.indexOf(a))return b.substr(a.length)}function Fa(a){var b=a.indexOf("#");return-1==b?a:a.substr(0,b)}function ib(a){return a.replace(/(#.+)|#$/,"$1")}function cc(a,b,d){this.$$html5=!0;d=d||"";
-fd(a,this);this.$$parse=function(a){var d=pa(b,a);if(!E(d))throw Db("ipthprfx",a,b);gd(d,this);this.$$path||(this.$$path="/");this.$$compose()};this.$$compose=function(){var a=Qb(this.$$search),d=this.$$hash?"#"+ob(this.$$hash):"";this.$$url=bc(this.$$path)+(a?"?"+a:"")+d;this.$$absUrl=b+this.$$url.substr(1)};this.$$parseLinkUrl=function(c,e){if(e&&"#"===e[0])return this.hash(e.slice(1)),!0;var f,g;y(f=pa(a,c))?(g=f,g=y(f=pa(d,f))?b+(pa("/",f)||f):a+g):y(f=pa(b,c))?g=b+f:b==c+"/"&&(g=b);g&&this.$$parse(g);
-return!!g}}function dc(a,b,d){fd(a,this);this.$$parse=function(c){var e=pa(a,c)||pa(b,c),f;q(e)||"#"!==e.charAt(0)?this.$$html5?f=e:(f="",q(e)&&(a=c,this.replace())):(f=pa(d,e),q(f)&&(f=e));gd(f,this);c=this.$$path;var e=a,g=/^\/[A-Z]:(\/.*)/;0===f.indexOf(e)&&(f=f.replace(e,""));g.exec(f)||(c=(f=g.exec(c))?f[1]:c);this.$$path=c;this.$$compose()};this.$$compose=function(){var b=Qb(this.$$search),e=this.$$hash?"#"+ob(this.$$hash):"";this.$$url=bc(this.$$path)+(b?"?"+b:"")+e;this.$$absUrl=a+(this.$$url?
-d+this.$$url:"")};this.$$parseLinkUrl=function(b,d){return Fa(a)==Fa(b)?(this.$$parse(b),!0):!1}}function hd(a,b,d){this.$$html5=!0;dc.apply(this,arguments);this.$$parseLinkUrl=function(c,e){if(e&&"#"===e[0])return this.hash(e.slice(1)),!0;var f,g;a==Fa(c)?f=c:(g=pa(b,c))?f=a+d+g:b===c+"/"&&(f=b);f&&this.$$parse(f);return!!f};this.$$compose=function(){var b=Qb(this.$$search),e=this.$$hash?"#"+ob(this.$$hash):"";this.$$url=bc(this.$$path)+(b?"?"+b:"")+e;this.$$absUrl=a+d+this.$$url}}function Eb(a){return function(){return this[a]}}
-function id(a,b){return function(d){if(q(d))return this[a];this[a]=b(d);this.$$compose();return this}}function hf(){var a="",b={enabled:!1,requireBase:!0,rewriteLinks:!0};this.hashPrefix=function(b){return y(b)?(a=b,this):a};this.html5Mode=function(a){return $a(a)?(b.enabled=a,this):H(a)?($a(a.enabled)&&(b.enabled=a.enabled),$a(a.requireBase)&&(b.requireBase=a.requireBase),$a(a.rewriteLinks)&&(b.rewriteLinks=a.rewriteLinks),this):b};this.$get=["$rootScope","$browser","$sniffer","$rootElement","$window",
-function(d,c,e,f,g){function h(a,b,d){var e=l.url(),f=l.$$state;try{c.url(a,b,d),l.$$state=c.state()}catch(g){throw l.url(e),l.$$state=f,g;}}function k(a,b){d.$broadcast("$locationChangeSuccess",l.absUrl(),a,l.$$state,b)}var l,m;m=c.baseHref();var r=c.url(),t;if(b.enabled){if(!m&&b.requireBase)throw Db("nobase");t=r.substring(0,r.indexOf("/",r.indexOf("//")+2))+(m||"/");m=e.history?cc:hd}else t=Fa(r),m=dc;var A=t.substr(0,Fa(t).lastIndexOf("/")+1);l=new m(t,A,"#"+a);l.$$parseLinkUrl(r,r);l.$$state=
-c.state();var v=/^\s*(javascript|mailto):/i;f.on("click",function(a){if(b.rewriteLinks&&!a.ctrlKey&&!a.metaKey&&!a.shiftKey&&2!=a.which&&2!=a.button){for(var e=B(a.target);"a"!==ta(e[0]);)if(e[0]===f[0]||!(e=e.parent())[0])return;var h=e.prop("href"),k=e.attr("href")||e.attr("xlink:href");H(h)&&"[object SVGAnimatedString]"===h.toString()&&(h=wa(h.animVal).href);v.test(h)||!h||e.attr("target")||a.isDefaultPrevented()||!l.$$parseLinkUrl(h,k)||(a.preventDefault(),l.absUrl()!=c.url()&&(d.$apply(),g.angular["ff-684208-preventDefault"]=
-!0))}});ib(l.absUrl())!=ib(r)&&c.url(l.absUrl(),!0);var n=!0;c.onUrlChange(function(a,b){q(pa(A,a))?g.location.href=a:(d.$evalAsync(function(){var c=l.absUrl(),e=l.$$state,f;a=ib(a);l.$$parse(a);l.$$state=b;f=d.$broadcast("$locationChangeStart",a,c,b,e).defaultPrevented;l.absUrl()===a&&(f?(l.$$parse(c),l.$$state=e,h(c,!1,e)):(n=!1,k(c,e)))}),d.$$phase||d.$digest())});d.$watch(function(){var a=ib(c.url()),b=ib(l.absUrl()),f=c.state(),g=l.$$replace,m=a!==b||l.$$html5&&e.history&&f!==l.$$state;if(n||
-m)n=!1,d.$evalAsync(function(){var b=l.absUrl(),c=d.$broadcast("$locationChangeStart",b,a,l.$$state,f).defaultPrevented;l.absUrl()===b&&(c?(l.$$parse(a),l.$$state=f):(m&&h(b,g,f===l.$$state?null:l.$$state),k(a,f)))});l.$$replace=!1});return l}]}function jf(){var a=!0,b=this;this.debugEnabled=function(b){return y(b)?(a=b,this):a};this.$get=["$window",function(d){function c(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=d.console||{},e=b[a]||b.log||x;a=!1;try{a=!!e.apply}catch(k){}return a?function(){var a=[];n(arguments,function(b){a.push(c(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(){a&&c.apply(b,arguments)}}()}}]}function Va(a,b){if("__defineGetter__"===a||"__defineSetter__"===a||"__lookupGetter__"===a||"__lookupSetter__"===
-a||"__proto__"===a)throw ba("isecfld",b);return a}function jd(a,b){a+="";if(!E(a))throw ba("iseccst",b);return a}function xa(a,b){if(a){if(a.constructor===a)throw ba("isecfn",b);if(a.window===a)throw ba("isecwindow",b);if(a.children&&(a.nodeName||a.prop&&a.attr&&a.find))throw ba("isecdom",b);if(a===Object)throw ba("isecobj",b);}return a}function kd(a,b){if(a){if(a.constructor===a)throw ba("isecfn",b);if(a===Wf||a===Xf||a===Yf)throw ba("isecff",b);}}function ld(a,b){if(a&&(a===(0).constructor||a===
-(!1).constructor||a==="".constructor||a==={}.constructor||a===[].constructor||a===Function.constructor))throw ba("isecaf",b);}function Zf(a,b){return"undefined"!==typeof a?a:b}function md(a,b){return"undefined"===typeof a?b:"undefined"===typeof b?a:a+b}function W(a,b){var d,c;switch(a.type){case s.Program:d=!0;n(a.body,function(a){W(a.expression,b);d=d&&a.expression.constant});a.constant=d;break;case s.Literal:a.constant=!0;a.toWatch=[];break;case s.UnaryExpression:W(a.argument,b);a.constant=a.argument.constant;
-a.toWatch=a.argument.toWatch;break;case s.BinaryExpression:W(a.left,b);W(a.right,b);a.constant=a.left.constant&&a.right.constant;a.toWatch=a.left.toWatch.concat(a.right.toWatch);break;case s.LogicalExpression:W(a.left,b);W(a.right,b);a.constant=a.left.constant&&a.right.constant;a.toWatch=a.constant?[]:[a];break;case s.ConditionalExpression:W(a.test,b);W(a.alternate,b);W(a.consequent,b);a.constant=a.test.constant&&a.alternate.constant&&a.consequent.constant;a.toWatch=a.constant?[]:[a];break;case s.Identifier:a.constant=
-!1;a.toWatch=[a];break;case s.MemberExpression:W(a.object,b);a.computed&&W(a.property,b);a.constant=a.object.constant&&(!a.computed||a.property.constant);a.toWatch=[a];break;case s.CallExpression:d=a.filter?!b(a.callee.name).$stateful:!1;c=[];n(a.arguments,function(a){W(a,b);d=d&&a.constant;a.constant||c.push.apply(c,a.toWatch)});a.constant=d;a.toWatch=a.filter&&!b(a.callee.name).$stateful?c:[a];break;case s.AssignmentExpression:W(a.left,b);W(a.right,b);a.constant=a.left.constant&&a.right.constant;
-a.toWatch=[a];break;case s.ArrayExpression:d=!0;c=[];n(a.elements,function(a){W(a,b);d=d&&a.constant;a.constant||c.push.apply(c,a.toWatch)});a.constant=d;a.toWatch=c;break;case s.ObjectExpression:d=!0;c=[];n(a.properties,function(a){W(a.value,b);d=d&&a.value.constant;a.value.constant||c.push.apply(c,a.value.toWatch)});a.constant=d;a.toWatch=c;break;case s.ThisExpression:a.constant=!1,a.toWatch=[]}}function nd(a){if(1==a.length){a=a[0].expression;var b=a.toWatch;return 1!==b.length?b:b[0]!==a?b:u}}
-function od(a){return a.type===s.Identifier||a.type===s.MemberExpression}function pd(a){if(1===a.body.length&&od(a.body[0].expression))return{type:s.AssignmentExpression,left:a.body[0].expression,right:{type:s.NGValueParameter},operator:"="}}function qd(a){return 0===a.body.length||1===a.body.length&&(a.body[0].expression.type===s.Literal||a.body[0].expression.type===s.ArrayExpression||a.body[0].expression.type===s.ObjectExpression)}function rd(a,b){this.astBuilder=a;this.$filter=b}function sd(a,
-b){this.astBuilder=a;this.$filter=b}function Fb(a){return"constructor"==a}function ec(a){return z(a.valueOf)?a.valueOf():$f.call(a)}function kf(){var a=$(),b=$();this.$get=["$filter",function(d){function c(a,b){return null==a||null==b?a===b:"object"===typeof a&&(a=ec(a),"object"===typeof a)?!1:a===b||a!==a&&b!==b}function e(a,b,d,e,f){var g=e.inputs,h;if(1===g.length){var k=c,g=g[0];return a.$watch(function(a){var b=g(a);c(b,k)||(h=e(a,u,u,[b]),k=b&&ec(b));return h},b,d,f)}for(var l=[],m=[],r=0,n=
-g.length;r<n;r++)l[r]=c,m[r]=null;return a.$watch(function(a){for(var b=!1,d=0,f=g.length;d<f;d++){var k=g[d](a);if(b||(b=!c(k,l[d])))m[d]=k,l[d]=k&&ec(k)}b&&(h=e(a,u,u,m));return h},b,d,f)}function f(a,b,c,d){var e,f;return e=a.$watch(function(a){return d(a)},function(a,c,d){f=a;z(b)&&b.apply(this,arguments);y(a)&&d.$$postDigest(function(){y(f)&&e()})},c)}function g(a,b,c,d){function e(a){var b=!0;n(a,function(a){y(a)||(b=!1)});return b}var f,g;return f=a.$watch(function(a){return d(a)},function(a,
-c,d){g=a;z(b)&&b.call(this,a,c,d);e(a)&&d.$$postDigest(function(){e(g)&&f()})},c)}function h(a,b,c,d){var e;return e=a.$watch(function(a){return d(a)},function(a,c,d){z(b)&&b.apply(this,arguments);e()},c)}function k(a,b){if(!b)return a;var c=a.$$watchDelegate,d=!1,c=c!==g&&c!==f?function(c,e,f,g){f=d&&g?g[0]:a(c,e,f,g);return b(f,c,e)}:function(c,d,e,f){e=a(c,d,e,f);c=b(e,c,d);return y(e)?c:e};a.$$watchDelegate&&a.$$watchDelegate!==e?c.$$watchDelegate=a.$$watchDelegate:b.$stateful||(c.$$watchDelegate=
-e,d=!a.inputs,c.inputs=a.inputs?a.inputs:[a]);return c}var l=Ba().noUnsafeEval,m={csp:l,expensiveChecks:!1},r={csp:l,expensiveChecks:!0};return function(c,l,v){var n,p,q;switch(typeof c){case "string":q=c=c.trim();var w=v?b:a;n=w[q];n||(":"===c.charAt(0)&&":"===c.charAt(1)&&(p=!0,c=c.substring(2)),v=v?r:m,n=new fc(v),n=(new gc(n,d,v)).parse(c),n.constant?n.$$watchDelegate=h:p?n.$$watchDelegate=n.literal?g:f:n.inputs&&(n.$$watchDelegate=e),w[q]=n);return k(n,l);case "function":return k(c,l);default:return x}}}]}
-function mf(){this.$get=["$rootScope","$exceptionHandler",function(a,b){return td(function(b){a.$evalAsync(b)},b)}]}function nf(){this.$get=["$browser","$exceptionHandler",function(a,b){return td(function(b){a.defer(b)},b)}]}function td(a,b){function d(a,b,c){function d(b){return function(c){e||(e=!0,b.call(a,c))}}var e=!1;return[d(b),d(c)]}function c(){this.$$state={status:0}}function e(a,b){return function(c){b.call(a,c)}}function f(c){!c.processScheduled&&c.pending&&(c.processScheduled=!0,a(function(){var a,
-d,e;e=c.pending;c.processScheduled=!1;c.pending=u;for(var f=0,g=e.length;f<g;++f){d=e[f][0];a=e[f][c.status];try{z(a)?d.resolve(a(c.value)):1===c.status?d.resolve(c.value):d.reject(c.value)}catch(h){d.reject(h),b(h)}}}))}function g(){this.promise=new c;this.resolve=e(this,this.resolve);this.reject=e(this,this.reject);this.notify=e(this,this.notify)}var h=G("$q",TypeError);M(c.prototype,{then:function(a,b,c){if(q(a)&&q(b)&&q(c))return this;var d=new g;this.$$state.pending=this.$$state.pending||[];
-this.$$state.pending.push([d,a,b,c]);0<this.$$state.status&&f(this.$$state);return d.promise},"catch":function(a){return this.then(null,a)},"finally":function(a,b){return this.then(function(b){return l(b,!0,a)},function(b){return l(b,!1,a)},b)}});M(g.prototype,{resolve:function(a){this.promise.$$state.status||(a===this.promise?this.$$reject(h("qcycle",a)):this.$$resolve(a))},$$resolve:function(a){var c,e;e=d(this,this.$$resolve,this.$$reject);try{if(H(a)||z(a))c=a&&a.then;z(c)?(this.promise.$$state.status=
--1,c.call(a,e[0],e[1],this.notify)):(this.promise.$$state.value=a,this.promise.$$state.status=1,f(this.promise.$$state))}catch(g){e[1](g),b(g)}},reject:function(a){this.promise.$$state.status||this.$$reject(a)},$$reject:function(a){this.promise.$$state.value=a;this.promise.$$state.status=2;f(this.promise.$$state)},notify:function(c){var d=this.promise.$$state.pending;0>=this.promise.$$state.status&&d&&d.length&&a(function(){for(var a,e,f=0,g=d.length;f<g;f++){e=d[f][0];a=d[f][3];try{e.notify(z(a)?
-a(c):c)}catch(h){b(h)}}})}});var k=function(a,b){var c=new g;b?c.resolve(a):c.reject(a);return c.promise},l=function(a,b,c){var d=null;try{z(c)&&(d=c())}catch(e){return k(e,!1)}return d&&z(d.then)?d.then(function(){return k(a,b)},function(a){return k(a,!1)}):k(a,b)},m=function(a,b,c,d){var e=new g;e.resolve(a);return e.promise.then(b,c,d)},r=function A(a){if(!z(a))throw h("norslvr",a);if(!(this instanceof A))return new A(a);var b=new g;a(function(a){b.resolve(a)},function(a){b.reject(a)});return b.promise};
-r.defer=function(){return new g};r.reject=function(a){var b=new g;b.reject(a);return b.promise};r.when=m;r.resolve=m;r.all=function(a){var b=new g,c=0,d=I(a)?[]:{};n(a,function(a,e){c++;m(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};return r}function wf(){this.$get=["$window","$timeout",function(a,b){var d=a.requestAnimationFrame||a.webkitRequestAnimationFrame,c=a.cancelAnimationFrame||a.webkitCancelAnimationFrame||
-a.webkitCancelRequestAnimationFrame,e=!!d,f=e?function(a){var b=d(a);return function(){c(b)}}:function(a){var c=b(a,16.66,!1);return function(){b.cancel(c)}};f.supported=e;return f}]}function lf(){function a(a){function b(){this.$$watchers=this.$$nextSibling=this.$$childHead=this.$$childTail=null;this.$$listeners={};this.$$listenerCount={};this.$$watchersCount=0;this.$id=++nb;this.$$ChildScope=null}b.prototype=a;return b}var b=10,d=G("$rootScope"),c=null,e=null;this.digestTtl=function(a){arguments.length&&
-(b=a);return b};this.$get=["$injector","$exceptionHandler","$parse","$browser",function(f,g,h,k){function l(a){a.currentScope.$$destroyed=!0}function m(a){9===Ha&&(a.$$childHead&&m(a.$$childHead),a.$$nextSibling&&m(a.$$nextSibling));a.$parent=a.$$nextSibling=a.$$prevSibling=a.$$childHead=a.$$childTail=a.$root=a.$$watchers=null}function r(){this.$id=++nb;this.$$phase=this.$parent=this.$$watchers=this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=null;this.$root=this;this.$$destroyed=
-!1;this.$$listeners={};this.$$listenerCount={};this.$$watchersCount=0;this.$$isolateBindings=null}function t(a){if(w.$$phase)throw d("inprog",w.$$phase);w.$$phase=a}function A(a,b){do a.$$watchersCount+=b;while(a=a.$parent)}function v(a,b,c){do a.$$listenerCount[c]-=b,0===a.$$listenerCount[c]&&delete a.$$listenerCount[c];while(a=a.$parent)}function s(){}function p(){for(;aa.length;)try{aa.shift()()}catch(a){g(a)}e=null}function C(){null===e&&(e=k.defer(function(){w.$apply(p)}))}r.prototype={constructor:r,
-$new:function(b,c){var d;c=c||this;b?(d=new r,d.$root=this.$root):(this.$$ChildScope||(this.$$ChildScope=a(this)),d=new this.$$ChildScope);d.$parent=c;d.$$prevSibling=c.$$childTail;c.$$childHead?(c.$$childTail.$$nextSibling=d,c.$$childTail=d):c.$$childHead=c.$$childTail=d;(b||c!=this)&&d.$on("$destroy",l);return d},$watch:function(a,b,d,e){var f=h(a);if(f.$$watchDelegate)return f.$$watchDelegate(this,b,d,f,a);var g=this,k=g.$$watchers,l={fn:b,last:s,get:f,exp:e||a,eq:!!d};c=null;z(b)||(l.fn=x);k||
-(k=g.$$watchers=[]);k.unshift(l);A(this,1);return function(){0<=ab(k,l)&&A(g,-1);c=null}},$watchGroup:function(a,b){function c(){h=!1;k?(k=!1,b(e,e,g)):b(e,d,g)}var d=Array(a.length),e=Array(a.length),f=[],g=this,h=!1,k=!0;if(!a.length){var l=!0;g.$evalAsync(function(){l&&b(e,e,g)});return function(){l=!1}}if(1===a.length)return this.$watch(a[0],function(a,c,f){e[0]=a;d[0]=c;b(e,a===c?e:d,f)});n(a,function(a,b){var k=g.$watch(a,function(a,f){e[b]=a;d[b]=f;h||(h=!0,g.$evalAsync(c))});f.push(k)});return function(){for(;f.length;)f.shift()()}},
-$watchCollection:function(a,b){function c(a){e=a;var b,d,g,h;if(!q(e)){if(H(e))if(za(e))for(f!==r&&(f=r,n=f.length=0,l++),a=e.length,n!==a&&(l++,f.length=n=a),b=0;b<a;b++)h=f[b],g=e[b],d=h!==h&&g!==g,d||h===g||(l++,f[b]=g);else{f!==t&&(f=t={},n=0,l++);a=0;for(b in e)qa.call(e,b)&&(a++,g=e[b],h=f[b],b in f?(d=h!==h&&g!==g,d||h===g||(l++,f[b]=g)):(n++,f[b]=g,l++));if(n>a)for(b in l++,f)qa.call(e,b)||(n--,delete f[b])}else f!==e&&(f=e,l++);return l}}c.$stateful=!0;var d=this,e,f,g,k=1<b.length,l=0,m=
-h(a,c),r=[],t={},p=!0,n=0;return this.$watch(m,function(){p?(p=!1,b(e,e,d)):b(e,g,d);if(k)if(H(e))if(za(e)){g=Array(e.length);for(var a=0;a<e.length;a++)g[a]=e[a]}else for(a in g={},e)qa.call(e,a)&&(g[a]=e[a]);else g=e})},$digest:function(){var a,f,h,l,m,r,n=b,A,q=[],v,C;t("$digest");k.$$checkUrlChange();this===w&&null!==e&&(k.defer.cancel(e),p());c=null;do{r=!1;for(A=this;u.length;){try{C=u.shift(),C.scope.$eval(C.expression,C.locals)}catch(aa){g(aa)}c=null}a:do{if(l=A.$$watchers)for(m=l.length;m--;)try{if(a=
-l[m])if((f=a.get(A))!==(h=a.last)&&!(a.eq?ma(f,h):"number"===typeof f&&"number"===typeof h&&isNaN(f)&&isNaN(h)))r=!0,c=a,a.last=a.eq?bb(f,null):f,a.fn(f,h===s?f:h,A),5>n&&(v=4-n,q[v]||(q[v]=[]),q[v].push({msg:z(a.exp)?"fn: "+(a.exp.name||a.exp.toString()):a.exp,newVal:f,oldVal:h}));else if(a===c){r=!1;break a}}catch(y){g(y)}if(!(l=A.$$watchersCount&&A.$$childHead||A!==this&&A.$$nextSibling))for(;A!==this&&!(l=A.$$nextSibling);)A=A.$parent}while(A=l);if((r||u.length)&&!n--)throw w.$$phase=null,d("infdig",
-b,q);}while(r||u.length);for(w.$$phase=null;L.length;)try{L.shift()()}catch(x){g(x)}},$destroy:function(){if(!this.$$destroyed){var a=this.$parent;this.$broadcast("$destroy");this.$$destroyed=!0;this===w&&k.$$applicationDestroyed();A(this,-this.$$watchersCount);for(var b in this.$$listenerCount)v(this,this.$$listenerCount[b],b);a&&a.$$childHead==this&&(a.$$childHead=this.$$nextSibling);a&&a.$$childTail==this&&(a.$$childTail=this.$$prevSibling);this.$$prevSibling&&(this.$$prevSibling.$$nextSibling=
-this.$$nextSibling);this.$$nextSibling&&(this.$$nextSibling.$$prevSibling=this.$$prevSibling);this.$destroy=this.$digest=this.$apply=this.$evalAsync=this.$applyAsync=x;this.$on=this.$watch=this.$watchGroup=function(){return x};this.$$listeners={};this.$$nextSibling=null;m(this)}},$eval:function(a,b){return h(a)(this,b)},$evalAsync:function(a,b){w.$$phase||u.length||k.defer(function(){u.length&&w.$digest()});u.push({scope:this,expression:a,locals:b})},$$postDigest:function(a){L.push(a)},$apply:function(a){try{t("$apply");
-try{return this.$eval(a)}finally{w.$$phase=null}}catch(b){g(b)}finally{try{w.$digest()}catch(c){throw g(c),c;}}},$applyAsync:function(a){function b(){c.$eval(a)}var c=this;a&&aa.push(b);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(){var d=c.indexOf(b);-1!==d&&(c[d]=null,v(e,1,a))}},$emit:function(a,b){var c=[],d,e=this,f=!1,h=
-{name:a,targetScope:e,stopPropagation:function(){f=!0},preventDefault:function(){h.defaultPrevented=!0},defaultPrevented:!1},k=cb([h],arguments,1),l,m;do{d=e.$$listeners[a]||c;h.currentScope=e;l=0;for(m=d.length;l<m;l++)if(d[l])try{d[l].apply(null,k)}catch(r){g(r)}else d.splice(l,1),l--,m--;if(f)return h.currentScope=null,h;e=e.$parent}while(e);h.currentScope=null;return h},$broadcast:function(a,b){var c=this,d=this,e={name:a,targetScope:this,preventDefault:function(){e.defaultPrevented=!0},defaultPrevented:!1};
-if(!this.$$listenerCount[a])return e;for(var f=cb([e],arguments,1),h,k;c=d;){e.currentScope=c;d=c.$$listeners[a]||[];h=0;for(k=d.length;h<k;h++)if(d[h])try{d[h].apply(null,f)}catch(l){g(l)}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}e.currentScope=null;return e}};var w=new r,u=w.$$asyncQueue=[],L=w.$$postDigestQueue=[],aa=w.$$applyAsyncQueue=[];return w}]}function ge(){var a=/^\s*(https?|ftp|mailto|tel|file):/,
-b=/^\s*((https?|ftp|file|blob):|data:image\/)/;this.aHrefSanitizationWhitelist=function(b){return y(b)?(a=b,this):a};this.imgSrcSanitizationWhitelist=function(a){return y(a)?(b=a,this):b};this.$get=function(){return function(d,c){var e=c?b:a,f;f=wa(d).href;return""===f||f.match(e)?d:"unsafe:"+f}}}function ag(a){if("self"===a)return a;if(E(a)){if(-1<a.indexOf("***"))throw ya("iwcard",a);a=ud(a).replace("\\*\\*",".*").replace("\\*","[^:/.?&;]*");return new RegExp("^"+a+"$")}if(Ma(a))return new RegExp("^"+
-a.source+"$");throw ya("imatcher");}function vd(a){var b=[];y(a)&&n(a,function(a){b.push(ag(a))});return b}function pf(){this.SCE_CONTEXTS=la;var a=["self"],b=[];this.resourceUrlWhitelist=function(b){arguments.length&&(a=vd(b));return a};this.resourceUrlBlacklist=function(a){arguments.length&&(b=vd(a));return b};this.$get=["$injector",function(d){function c(a,b){return"self"===a?ed(b):!!a.exec(b.href)}function e(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 f=function(a){throw ya("unsafe");};d.has("$sanitize")&&(f=d.get("$sanitize"));var g=e(),h={};h[la.HTML]=e(g);h[la.CSS]=e(g);h[la.URL]=e(g);h[la.JS]=e(g);h[la.RESOURCE_URL]=e(h[la.URL]);return{trustAs:function(a,b){var c=h.hasOwnProperty(a)?h[a]:null;if(!c)throw ya("icontext",a,b);if(null===b||q(b)||""===b)return b;if("string"!==typeof b)throw ya("itype",
-a);return new c(b)},getTrusted:function(d,e){if(null===e||q(e)||""===e)return e;var g=h.hasOwnProperty(d)?h[d]:null;if(g&&e instanceof g)return e.$$unwrapTrustedValue();if(d===la.RESOURCE_URL){var g=wa(e.toString()),r,t,n=!1;r=0;for(t=a.length;r<t;r++)if(c(a[r],g)){n=!0;break}if(n)for(r=0,t=b.length;r<t;r++)if(c(b[r],g)){n=!1;break}if(n)return e;throw ya("insecurl",e.toString());}if(d===la.HTML)return f(e);throw ya("unsafe");},valueOf:function(a){return a instanceof g?a.$$unwrapTrustedValue():a}}}]}
-function of(){var a=!0;this.enabled=function(b){arguments.length&&(a=!!b);return a};this.$get=["$parse","$sceDelegate",function(b,d){if(a&&8>Ha)throw ya("iequirks");var c=ia(la);c.isEnabled=function(){return a};c.trustAs=d.trustAs;c.getTrusted=d.getTrusted;c.valueOf=d.valueOf;a||(c.trustAs=c.getTrusted=function(a,b){return b},c.valueOf=Ya);c.parseAs=function(a,d){var e=b(d);return e.literal&&e.constant?e:b(d,function(b){return c.getTrusted(a,b)})};var e=c.parseAs,f=c.getTrusted,g=c.trustAs;n(la,function(a,
-b){var d=F(b);c[fb("parse_as_"+d)]=function(b){return e(a,b)};c[fb("get_trusted_"+d)]=function(b){return f(a,b)};c[fb("trust_as_"+d)]=function(b){return g(a,b)}});return c}]}function qf(){this.$get=["$window","$document",function(a,b){var d={},c=ea((/android (\d+)/.exec(F((a.navigator||{}).userAgent))||[])[1]),e=/Boxee/i.test((a.navigator||{}).userAgent),f=b[0]||{},g,h=/^(Moz|webkit|ms)(?=[A-Z])/,k=f.body&&f.body.style,l=!1,m=!1;if(k){for(var r in k)if(l=h.exec(r)){g=l[0];g=g.substr(0,1).toUpperCase()+
-g.substr(1);break}g||(g="WebkitOpacity"in k&&"webkit");l=!!("transition"in k||g+"Transition"in k);m=!!("animation"in k||g+"Animation"in k);!c||l&&m||(l=E(k.webkitTransition),m=E(k.webkitAnimation))}return{history:!(!a.history||!a.history.pushState||4>c||e),hasEvent:function(a){if("input"===a&&11>=Ha)return!1;if(q(d[a])){var b=f.createElement("div");d[a]="on"+a in b}return d[a]},csp:Ba(),vendorPrefix:g,transitions:l,animations:m,android:c}}]}function sf(){this.$get=["$templateCache","$http","$q","$sce",
-function(a,b,d,c){function e(f,g){e.totalPendingRequests++;E(f)&&a.get(f)||(f=c.getTrustedResourceUrl(f));var h=b.defaults&&b.defaults.transformResponse;I(h)?h=h.filter(function(a){return a!==$b}):h===$b&&(h=null);return b.get(f,{cache:a,transformResponse:h})["finally"](function(){e.totalPendingRequests--}).then(function(b){a.put(f,b.data);return b.data},function(a){if(!g)throw ha("tpload",f,a.status,a.statusText);return d.reject(a)})}e.totalPendingRequests=0;return e}]}function tf(){this.$get=["$rootScope",
-"$browser","$location",function(a,b,d){return{findBindings:function(a,b,d){a=a.getElementsByClassName("ng-binding");var g=[];n(a,function(a){var c=fa.element(a).data("$binding");c&&n(c,function(c){d?(new RegExp("(^|\\s)"+ud(b)+"(\\s|\\||$)")).test(c)&&g.push(a):-1!=c.indexOf(b)&&g.push(a)})});return g},findModels:function(a,b,d){for(var g=["ng-","data-ng-","ng\\:"],h=0;h<g.length;++h){var k=a.querySelectorAll("["+g[h]+"model"+(d?"=":"*=")+'"'+b+'"]');if(k.length)return k}},getLocation:function(){return d.url()},
-setLocation:function(b){b!==d.url()&&(d.url(b),a.$digest())},whenStable:function(a){b.notifyWhenNoOutstandingRequests(a)}}}]}function uf(){this.$get=["$rootScope","$browser","$q","$$q","$exceptionHandler",function(a,b,d,c,e){function f(f,k,l){z(f)||(l=k,k=f,f=x);var m=ra.call(arguments,3),r=y(l)&&!l,t=(r?c:d).defer(),n=t.promise,q;q=b.defer(function(){try{t.resolve(f.apply(null,m))}catch(b){t.reject(b),e(b)}finally{delete g[n.$$timeoutId]}r||a.$apply()},k);n.$$timeoutId=q;g[q]=t;return n}var g={};
-f.cancel=function(a){return a&&a.$$timeoutId in g?(g[a.$$timeoutId].reject("canceled"),delete g[a.$$timeoutId],b.defer.cancel(a.$$timeoutId)):!1};return f}]}function wa(a){Ha&&(Y.setAttribute("href",a),a=Y.href);Y.setAttribute("href",a);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 ed(a){a=
-E(a)?wa(a):a;return a.protocol===wd.protocol&&a.host===wd.host}function vf(){this.$get=na(S)}function xd(a){function b(a){try{return decodeURIComponent(a)}catch(b){return a}}var d=a[0]||{},c={},e="";return function(){var a,g,h,k,l;a=d.cookie||"";if(a!==e)for(e=a,a=e.split("; "),c={},h=0;h<a.length;h++)g=a[h],k=g.indexOf("="),0<k&&(l=b(g.substring(0,k)),q(c[l])&&(c[l]=b(g.substring(k+1))));return c}}function zf(){this.$get=xd}function Jc(a){function b(d,c){if(H(d)){var e={};n(d,function(a,c){e[c]=
-b(c,a)});return e}return a.factory(d+"Filter",c)}this.register=b;this.$get=["$injector",function(a){return function(b){return a.get(b+"Filter")}}];b("currency",yd);b("date",zd);b("filter",bg);b("json",cg);b("limitTo",dg);b("lowercase",eg);b("number",Ad);b("orderBy",Bd);b("uppercase",fg)}function bg(){return function(a,b,d){if(!za(a)){if(null==a)return a;throw G("filter")("notarray",a);}var c;switch(hc(b)){case "function":break;case "boolean":case "null":case "number":case "string":c=!0;case "object":b=
-gg(b,d,c);break;default:return a}return Array.prototype.filter.call(a,b)}}function gg(a,b,d){var c=H(a)&&"$"in a;!0===b?b=ma:z(b)||(b=function(a,b){if(q(a))return!1;if(null===a||null===b)return a===b;if(H(b)||H(a)&&!qc(a))return!1;a=F(""+a);b=F(""+b);return-1!==a.indexOf(b)});return function(e){return c&&!H(e)?Ka(e,a.$,b,!1):Ka(e,a,b,d)}}function Ka(a,b,d,c,e){var f=hc(a),g=hc(b);if("string"===g&&"!"===b.charAt(0))return!Ka(a,b.substring(1),d,c);if(I(a))return a.some(function(a){return Ka(a,b,d,c)});
-switch(f){case "object":var h;if(c){for(h in a)if("$"!==h.charAt(0)&&Ka(a[h],b,d,!0))return!0;return e?!1:Ka(a,b,d,!1)}if("object"===g){for(h in b)if(e=b[h],!z(e)&&!q(e)&&(f="$"===h,!Ka(f?a:a[h],e,d,f,f)))return!1;return!0}return d(a,b);case "function":return!1;default:return d(a,b)}}function hc(a){return null===a?"null":typeof a}function yd(a){var b=a.NUMBER_FORMATS;return function(a,c,e){q(c)&&(c=b.CURRENCY_SYM);q(e)&&(e=b.PATTERNS[1].maxFrac);return null==a?a:Cd(a,b.PATTERNS[1],b.GROUP_SEP,b.DECIMAL_SEP,
-e).replace(/\u00A4/g,c)}}function Ad(a){var b=a.NUMBER_FORMATS;return function(a,c){return null==a?a:Cd(a,b.PATTERNS[0],b.GROUP_SEP,b.DECIMAL_SEP,c)}}function Cd(a,b,d,c,e){if(H(a))return"";var f=0>a;a=Math.abs(a);var g=Infinity===a;if(!g&&!isFinite(a))return"";var h=a+"",k="",l=!1,m=[];g&&(k="\u221e");if(!g&&-1!==h.indexOf("e")){var r=h.match(/([\d\.]+)e(-?)(\d+)/);r&&"-"==r[2]&&r[3]>e+1?a=0:(k=h,l=!0)}if(g||l)0<e&&1>a&&(k=a.toFixed(e),a=parseFloat(k),k=k.replace(ic,c));else{g=(h.split(ic)[1]||"").length;
-q(e)&&(e=Math.min(Math.max(b.minFrac,g),b.maxFrac));a=+(Math.round(+(a.toString()+"e"+e)).toString()+"e"+-e);var g=(""+a).split(ic),h=g[0],g=g[1]||"",r=0,t=b.lgSize,n=b.gSize;if(h.length>=t+n)for(r=h.length-t,l=0;l<r;l++)0===(r-l)%n&&0!==l&&(k+=d),k+=h.charAt(l);for(l=r;l<h.length;l++)0===(h.length-l)%t&&0!==l&&(k+=d),k+=h.charAt(l);for(;g.length<e;)g+="0";e&&"0"!==e&&(k+=c+g.substr(0,e))}0===a&&(f=!1);m.push(f?b.negPre:b.posPre,k,f?b.negSuf:b.posSuf);return m.join("")}function Gb(a,b,d){var c="";
-0>a&&(c="-",a=-a);for(a=""+a;a.length<b;)a="0"+a;d&&(a=a.substr(a.length-b));return c+a}function ca(a,b,d,c){d=d||0;return function(e){e=e["get"+a]();if(0<d||e>-d)e+=d;0===e&&-12==d&&(e=12);return Gb(e,b,c)}}function Hb(a,b){return function(d,c){var e=d["get"+a](),f=sb(b?"SHORT"+a:a);return c[f][e]}}function Dd(a){var b=(new Date(a,0,1)).getDay();return new Date(a,0,(4>=b?5:12)-b)}function Ed(a){return function(b){var d=Dd(b.getFullYear());b=+new Date(b.getFullYear(),b.getMonth(),b.getDate()+(4-b.getDay()))-
-+d;b=1+Math.round(b/6048E5);return Gb(b,a)}}function jc(a,b){return 0>=a.getFullYear()?b.ERAS[0]:b.ERAS[1]}function zd(a){function b(a){var b;if(b=a.match(d)){a=new Date(0);var f=0,g=0,h=b[8]?a.setUTCFullYear:a.setFullYear,k=b[8]?a.setUTCHours:a.setHours;b[9]&&(f=ea(b[9]+b[10]),g=ea(b[9]+b[11]));h.call(a,ea(b[1]),ea(b[2])-1,ea(b[3]));f=ea(b[4]||0)-f;g=ea(b[5]||0)-g;h=ea(b[6]||0);b=Math.round(1E3*parseFloat("0."+(b[7]||0)));k.call(a,f,g,h,b)}return a}var d=/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/;
-return function(c,d,f){var g="",h=[],k,l;d=d||"mediumDate";d=a.DATETIME_FORMATS[d]||d;E(c)&&(c=hg.test(c)?ea(c):b(c));Q(c)&&(c=new Date(c));if(!da(c)||!isFinite(c.getTime()))return c;for(;d;)(l=ig.exec(d))?(h=cb(h,l,1),d=h.pop()):(h.push(d),d=null);var m=c.getTimezoneOffset();f&&(m=vc(f,c.getTimezoneOffset()),c=Pb(c,f,!0));n(h,function(b){k=jg[b];g+=k?k(c,a.DATETIME_FORMATS,m):b.replace(/(^'|'$)/g,"").replace(/''/g,"'")});return g}}function cg(){return function(a,b){q(b)&&(b=2);return db(a,b)}}function dg(){return function(a,
-b,d){b=Infinity===Math.abs(Number(b))?Number(b):ea(b);if(isNaN(b))return a;Q(a)&&(a=a.toString());if(!I(a)&&!E(a))return a;d=!d||isNaN(d)?0:ea(d);d=0>d?Math.max(0,a.length+d):d;return 0<=b?a.slice(d,d+b):0===d?a.slice(b,a.length):a.slice(Math.max(0,d+b),d)}}function Bd(a){function b(b,d){d=d?-1:1;return b.map(function(b){var c=1,h=Ya;if(z(b))h=b;else if(E(b)){if("+"==b.charAt(0)||"-"==b.charAt(0))c="-"==b.charAt(0)?-1:1,b=b.substring(1);if(""!==b&&(h=a(b),h.constant))var k=h(),h=function(a){return a[k]}}return{get:h,
-descending:c*d}})}function d(a){switch(typeof a){case "number":case "boolean":case "string":return!0;default:return!1}}return function(a,e,f){if(!za(a))return a;I(e)||(e=[e]);0===e.length&&(e=["+"]);var g=b(e,f);g.push({get:function(){return{}},descending:f?-1:1});a=Array.prototype.map.call(a,function(a,b){return{value:a,predicateValues:g.map(function(c){var e=c.get(a);c=typeof e;if(null===e)c="string",e="null";else if("string"===c)e=e.toLowerCase();else if("object"===c)a:{if("function"===typeof e.valueOf&&
-(e=e.valueOf(),d(e)))break a;if(qc(e)&&(e=e.toString(),d(e)))break a;e=b}return{value:e,type:c}})}});a.sort(function(a,b){for(var c=0,d=0,e=g.length;d<e;++d){var c=a.predicateValues[d],f=b.predicateValues[d],n=0;c.type===f.type?c.value!==f.value&&(n=c.value<f.value?-1:1):n=c.type<f.type?-1:1;if(c=n*g[d].descending)break}return c});return a=a.map(function(a){return a.value})}}function La(a){z(a)&&(a={link:a});a.restrict=a.restrict||"AC";return na(a)}function Fd(a,b,d,c,e){var f=this,g=[];f.$error=
-{};f.$$success={};f.$pending=u;f.$name=e(b.name||b.ngForm||"")(d);f.$dirty=!1;f.$pristine=!0;f.$valid=!0;f.$invalid=!1;f.$submitted=!1;f.$$parentForm=Ib;f.$rollbackViewValue=function(){n(g,function(a){a.$rollbackViewValue()})};f.$commitViewValue=function(){n(g,function(a){a.$commitViewValue()})};f.$addControl=function(a){Ra(a.$name,"input");g.push(a);a.$name&&(f[a.$name]=a);a.$$parentForm=f};f.$$renameControl=function(a,b){var c=a.$name;f[c]===a&&delete f[c];f[b]=a;a.$name=b};f.$removeControl=function(a){a.$name&&
-f[a.$name]===a&&delete f[a.$name];n(f.$pending,function(b,c){f.$setValidity(c,null,a)});n(f.$error,function(b,c){f.$setValidity(c,null,a)});n(f.$$success,function(b,c){f.$setValidity(c,null,a)});ab(g,a);a.$$parentForm=Ib};Gd({ctrl:this,$element:a,set:function(a,b,c){var d=a[b];d?-1===d.indexOf(c)&&d.push(c):a[b]=[c]},unset:function(a,b,c){var d=a[b];d&&(ab(d,c),0===d.length&&delete a[b])},$animate:c});f.$setDirty=function(){c.removeClass(a,Wa);c.addClass(a,Jb);f.$dirty=!0;f.$pristine=!1;f.$$parentForm.$setDirty()};
-f.$setPristine=function(){c.setClass(a,Wa,Jb+" ng-submitted");f.$dirty=!1;f.$pristine=!0;f.$submitted=!1;n(g,function(a){a.$setPristine()})};f.$setUntouched=function(){n(g,function(a){a.$setUntouched()})};f.$setSubmitted=function(){c.addClass(a,"ng-submitted");f.$submitted=!0;f.$$parentForm.$setSubmitted()}}function kc(a){a.$formatters.push(function(b){return a.$isEmpty(b)?b:b.toString()})}function jb(a,b,d,c,e,f){var g=F(b[0].type);if(!e.android){var h=!1;b.on("compositionstart",function(a){h=!0});
-b.on("compositionend",function(){h=!1;k()})}var k=function(a){l&&(f.defer.cancel(l),l=null);if(!h){var e=b.val();a=a&&a.type;"password"===g||d.ngTrim&&"false"===d.ngTrim||(e=U(e));(c.$viewValue!==e||""===e&&c.$$hasNativeValidators)&&c.$setViewValue(e,a)}};if(e.hasEvent("input"))b.on("input",k);else{var l,m=function(a,b,c){l||(l=f.defer(function(){l=null;b&&b.value===c||k(a)}))};b.on("keydown",function(a){var b=a.keyCode;91===b||15<b&&19>b||37<=b&&40>=b||m(a,this,this.value)});if(e.hasEvent("paste"))b.on("paste cut",
-m)}b.on("change",k);c.$render=function(){var a=c.$isEmpty(c.$viewValue)?"":c.$viewValue;b.val()!==a&&b.val(a)}}function Kb(a,b){return function(d,c){var e,f;if(da(d))return d;if(E(d)){'"'==d.charAt(0)&&'"'==d.charAt(d.length-1)&&(d=d.substring(1,d.length-1));if(kg.test(d))return new Date(d);a.lastIndex=0;if(e=a.exec(d))return e.shift(),f=c?{yyyy:c.getFullYear(),MM:c.getMonth()+1,dd:c.getDate(),HH:c.getHours(),mm:c.getMinutes(),ss:c.getSeconds(),sss:c.getMilliseconds()/1E3}:{yyyy:1970,MM:1,dd:1,HH:0,
-mm:0,ss:0,sss:0},n(e,function(a,c){c<b.length&&(f[b[c]]=+a)}),new Date(f.yyyy,f.MM-1,f.dd,f.HH,f.mm,f.ss||0,1E3*f.sss||0)}return NaN}}function kb(a,b,d,c){return function(e,f,g,h,k,l,m){function r(a){return a&&!(a.getTime&&a.getTime()!==a.getTime())}function n(a){return y(a)&&!da(a)?d(a)||u:a}Hd(e,f,g,h);jb(e,f,g,h,k,l);var A=h&&h.$options&&h.$options.timezone,v;h.$$parserName=a;h.$parsers.push(function(a){return h.$isEmpty(a)?null:b.test(a)?(a=d(a,v),A&&(a=Pb(a,A)),a):u});h.$formatters.push(function(a){if(a&&
-!da(a))throw lb("datefmt",a);if(r(a))return(v=a)&&A&&(v=Pb(v,A,!0)),m("date")(a,c,A);v=null;return""});if(y(g.min)||g.ngMin){var s;h.$validators.min=function(a){return!r(a)||q(s)||d(a)>=s};g.$observe("min",function(a){s=n(a);h.$validate()})}if(y(g.max)||g.ngMax){var p;h.$validators.max=function(a){return!r(a)||q(p)||d(a)<=p};g.$observe("max",function(a){p=n(a);h.$validate()})}}}function Hd(a,b,d,c){(c.$$hasNativeValidators=H(b[0].validity))&&c.$parsers.push(function(a){var c=b.prop("validity")||{};
-return c.badInput&&!c.typeMismatch?u:a})}function Id(a,b,d,c,e){if(y(c)){a=a(c);if(!a.constant)throw lb("constexpr",d,c);return a(b)}return e}function lc(a,b){a="ngClass"+a;return["$animate",function(d){function c(a,b){var c=[],d=0;a:for(;d<a.length;d++){for(var e=a[d],m=0;m<b.length;m++)if(e==b[m])continue a;c.push(e)}return c}function e(a){var b=[];return I(a)?(n(a,function(a){b=b.concat(e(a))}),b):E(a)?a.split(" "):H(a)?(n(a,function(a,c){a&&(b=b.concat(c.split(" ")))}),b):a}return{restrict:"AC",
-link:function(f,g,h){function k(a,b){var c=g.data("$classCounts")||$(),d=[];n(a,function(a){if(0<b||c[a])c[a]=(c[a]||0)+b,c[a]===+(0<b)&&d.push(a)});g.data("$classCounts",c);return d.join(" ")}function l(a){if(!0===b||f.$index%2===b){var l=e(a||[]);if(!m){var n=k(l,1);h.$addClass(n)}else if(!ma(a,m)){var q=e(m),n=c(l,q),l=c(q,l),n=k(n,1),l=k(l,-1);n&&n.length&&d.addClass(g,n);l&&l.length&&d.removeClass(g,l)}}m=ia(a)}var m;f.$watch(h[a],l,!0);h.$observe("class",function(b){l(f.$eval(h[a]))});"ngClass"!==
-a&&f.$watch("$index",function(c,d){var g=c&1;if(g!==(d&1)){var l=e(f.$eval(h[a]));g===b?(g=k(l,1),h.$addClass(g)):(g=k(l,-1),h.$removeClass(g))}})}}}]}function Gd(a){function b(a,b){b&&!f[a]?(k.addClass(e,a),f[a]=!0):!b&&f[a]&&(k.removeClass(e,a),f[a]=!1)}function d(a,c){a=a?"-"+zc(a,"-"):"";b(mb+a,!0===c);b(Jd+a,!1===c)}var c=a.ctrl,e=a.$element,f={},g=a.set,h=a.unset,k=a.$animate;f[Jd]=!(f[mb]=e.hasClass(mb));c.$setValidity=function(a,e,f){q(e)?(c.$pending||(c.$pending={}),g(c.$pending,a,f)):(c.$pending&&
-h(c.$pending,a,f),Kd(c.$pending)&&(c.$pending=u));$a(e)?e?(h(c.$error,a,f),g(c.$$success,a,f)):(g(c.$error,a,f),h(c.$$success,a,f)):(h(c.$error,a,f),h(c.$$success,a,f));c.$pending?(b(Ld,!0),c.$valid=c.$invalid=u,d("",null)):(b(Ld,!1),c.$valid=Kd(c.$error),c.$invalid=!c.$valid,d("",c.$valid));e=c.$pending&&c.$pending[a]?u:c.$error[a]?!1:c.$$success[a]?!0:null;d(a,e);c.$$parentForm.$setValidity(a,e,c)}}function Kd(a){if(a)for(var b in a)if(a.hasOwnProperty(b))return!1;return!0}var lg=/^\/(.+)\/([a-z]*)$/,
-F=function(a){return E(a)?a.toLowerCase():a},qa=Object.prototype.hasOwnProperty,sb=function(a){return E(a)?a.toUpperCase():a},Ha,B,oa,ra=[].slice,Pf=[].splice,mg=[].push,sa=Object.prototype.toString,rc=Object.getPrototypeOf,Aa=G("ng"),fa=S.angular||(S.angular={}),Sb,nb=0;Ha=X.documentMode;x.$inject=[];Ya.$inject=[];var I=Array.isArray,Vd=/^\[object (?:Uint8|Uint8Clamped|Uint16|Uint32|Int8|Int16|Int32|Float32|Float64)Array\]$/,U=function(a){return E(a)?a.trim():a},ud=function(a){return a.replace(/([-()\[\]{}+?*.$\^|,:#<!\\])/g,
-"\\$1").replace(/\x08/g,"\\x08")},Ba=function(){if(!y(Ba.rules)){var a=X.querySelector("[ng-csp]")||X.querySelector("[data-ng-csp]");if(a){var b=a.getAttribute("ng-csp")||a.getAttribute("data-ng-csp");Ba.rules={noUnsafeEval:!b||-1!==b.indexOf("no-unsafe-eval"),noInlineStyle:!b||-1!==b.indexOf("no-inline-style")}}else{a=Ba;try{new Function(""),b=!1}catch(d){b=!0}a.rules={noUnsafeEval:b,noInlineStyle:!1}}}return Ba.rules},pb=function(){if(y(pb.name_))return pb.name_;var a,b,d=Oa.length,c,e;for(b=0;b<
-d;++b)if(c=Oa[b],a=X.querySelector("["+c.replace(":","\\:")+"jq]")){e=a.getAttribute(c+"jq");break}return pb.name_=e},Oa=["ng-","data-ng-","ng:","x-ng-"],be=/[A-Z]/g,Ac=!1,Rb,Na=3,fe={full:"1.4.8",major:1,minor:4,dot:8,codeName:"ice-manipulation"};N.expando="ng339";var gb=N.cache={},Ff=1;N._data=function(a){return this.cache[a[this.expando]]||{}};var Af=/([\:\-\_]+(.))/g,Bf=/^moz([A-Z])/,xb={mouseleave:"mouseout",mouseenter:"mouseover"},Ub=G("jqLite"),Ef=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,Tb=/<|&#?\w+;/,
-Cf=/<([\w:-]+)/,Df=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,ka={option:[1,'<select multiple="multiple">',"</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};ka.optgroup=ka.option;ka.tbody=ka.tfoot=ka.colgroup=ka.caption=ka.thead;ka.th=ka.td;var Kf=Node.prototype.contains||function(a){return!!(this.compareDocumentPosition(a)&
-16)},Pa=N.prototype={ready:function(a){function b(){d||(d=!0,a())}var d=!1;"complete"===X.readyState?setTimeout(b):(this.on("DOMContentLoaded",b),N(S).on("load",b))},toString:function(){var a=[];n(this,function(b){a.push(""+b)});return"["+a.join(", ")+"]"},eq:function(a){return 0<=a?B(this[a]):B(this[this.length+a])},length:0,push:mg,sort:[].sort,splice:[].splice},Cb={};n("multiple selected checked disabled readOnly required open".split(" "),function(a){Cb[F(a)]=a});var Rc={};n("input select option textarea button form details".split(" "),
-function(a){Rc[a]=!0});var Zc={ngMinlength:"minlength",ngMaxlength:"maxlength",ngMin:"min",ngMax:"max",ngPattern:"pattern"};n({data:Wb,removeData:vb,hasData:function(a){for(var b in gb[a.ng339])return!0;return!1}},function(a,b){N[b]=a});n({data:Wb,inheritedData:Bb,scope:function(a){return B.data(a,"$scope")||Bb(a.parentNode||a,["$isolateScope","$scope"])},isolateScope:function(a){return B.data(a,"$isolateScope")||B.data(a,"$isolateScopeNoTemplate")},controller:Oc,injector:function(a){return Bb(a,
-"$injector")},removeAttr:function(a,b){a.removeAttribute(b)},hasClass:yb,css:function(a,b,d){b=fb(b);if(y(d))a.style[b]=d;else return a.style[b]},attr:function(a,b,d){var c=a.nodeType;if(c!==Na&&2!==c&&8!==c)if(c=F(b),Cb[c])if(y(d))d?(a[b]=!0,a.setAttribute(b,c)):(a[b]=!1,a.removeAttribute(c));else return a[b]||(a.attributes.getNamedItem(b)||x).specified?c:u;else if(y(d))a.setAttribute(b,d);else if(a.getAttribute)return a=a.getAttribute(b,2),null===a?u:a},prop:function(a,b,d){if(y(d))a[b]=d;else return a[b]},
-text:function(){function a(a,d){if(q(d)){var c=a.nodeType;return 1===c||c===Na?a.textContent:""}a.textContent=d}a.$dv="";return a}(),val:function(a,b){if(q(b)){if(a.multiple&&"select"===ta(a)){var d=[];n(a.options,function(a){a.selected&&d.push(a.value||a.text)});return 0===d.length?null:d}return a.value}a.value=b},html:function(a,b){if(q(b))return a.innerHTML;ub(a,!0);a.innerHTML=b},empty:Pc},function(a,b){N.prototype[b]=function(b,c){var e,f,g=this.length;if(a!==Pc&&q(2==a.length&&a!==yb&&a!==Oc?
-b:c)){if(H(b)){for(e=0;e<g;e++)if(a===Wb)a(this[e],b);else for(f in b)a(this[e],f,b[f]);return this}e=a.$dv;g=q(e)?Math.min(g,1):g;for(f=0;f<g;f++){var h=a(this[f],b,c);e=e?e+h:h}return e}for(e=0;e<g;e++)a(this[e],b,c);return this}});n({removeData:vb,on:function(a,b,d,c){if(y(c))throw Ub("onargs");if(Kc(a)){c=wb(a,!0);var e=c.events,f=c.handle;f||(f=c.handle=Hf(a,e));c=0<=b.indexOf(" ")?b.split(" "):[b];for(var g=c.length,h=function(b,c,g){var h=e[b];h||(h=e[b]=[],h.specialHandlerWrapper=c,"$destroy"===
-b||g||a.addEventListener(b,f,!1));h.push(d)};g--;)b=c[g],xb[b]?(h(xb[b],Jf),h(b,u,!0)):h(b)}},off:Nc,one:function(a,b,d){a=B(a);a.on(b,function e(){a.off(b,d);a.off(b,e)});a.on(b,d)},replaceWith:function(a,b){var d,c=a.parentNode;ub(a);n(new N(b),function(b){d?c.insertBefore(b,d.nextSibling):c.replaceChild(b,a);d=b})},children:function(a){var b=[];n(a.childNodes,function(a){1===a.nodeType&&b.push(a)});return b},contents:function(a){return a.contentDocument||a.childNodes||[]},append:function(a,b){var d=
-a.nodeType;if(1===d||11===d){b=new N(b);for(var d=0,c=b.length;d<c;d++)a.appendChild(b[d])}},prepend:function(a,b){if(1===a.nodeType){var d=a.firstChild;n(new N(b),function(b){a.insertBefore(b,d)})}},wrap:function(a,b){b=B(b).eq(0).clone()[0];var d=a.parentNode;d&&d.replaceChild(b,a);b.appendChild(a)},remove:Xb,detach:function(a){Xb(a,!0)},after:function(a,b){var d=a,c=a.parentNode;b=new N(b);for(var e=0,f=b.length;e<f;e++){var g=b[e];c.insertBefore(g,d.nextSibling);d=g}},addClass:Ab,removeClass:zb,
-toggleClass:function(a,b,d){b&&n(b.split(" "),function(b){var e=d;q(e)&&(e=!yb(a,b));(e?Ab:zb)(a,b)})},parent:function(a){return(a=a.parentNode)&&11!==a.nodeType?a:null},next:function(a){return a.nextElementSibling},find:function(a,b){return a.getElementsByTagName?a.getElementsByTagName(b):[]},clone:Vb,triggerHandler:function(a,b,d){var c,e,f=b.type||b,g=wb(a);if(g=(g=g&&g.events)&&g[f])c={preventDefault:function(){this.defaultPrevented=!0},isDefaultPrevented:function(){return!0===this.defaultPrevented},
-stopImmediatePropagation:function(){this.immediatePropagationStopped=!0},isImmediatePropagationStopped:function(){return!0===this.immediatePropagationStopped},stopPropagation:x,type:f,target:a},b.type&&(c=M(c,b)),b=ia(g),e=d?[c].concat(d):[c],n(b,function(b){c.isImmediatePropagationStopped()||b.apply(a,e)})}},function(a,b){N.prototype[b]=function(b,c,e){for(var f,g=0,h=this.length;g<h;g++)q(f)?(f=a(this[g],b,c,e),y(f)&&(f=B(f))):Mc(f,a(this[g],b,c,e));return y(f)?f:this};N.prototype.bind=N.prototype.on;
-N.prototype.unbind=N.prototype.off});Sa.prototype={put:function(a,b){this[Ca(a,this.nextUid)]=b},get:function(a){return this[Ca(a,this.nextUid)]},remove:function(a){var b=this[a=Ca(a,this.nextUid)];delete this[a];return b}};var yf=[function(){this.$get=[function(){return Sa}]}],Tc=/^[^\(]*\(\s*([^\)]*)\)/m,ng=/,/,og=/^\s*(_?)(\S+?)\1\s*$/,Sc=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg,Da=G("$injector");eb.$$annotate=function(a,b,d){var c;if("function"===typeof a){if(!(c=a.$inject)){c=[];if(a.length){if(b)throw E(d)&&
-d||(d=a.name||Lf(a)),Da("strictdi",d);b=a.toString().replace(Sc,"");b=b.match(Tc);n(b[1].split(ng),function(a){a.replace(og,function(a,b,d){c.push(d)})})}a.$inject=c}}else I(a)?(b=a.length-1,Qa(a[b],"fn"),c=a.slice(0,b)):Qa(a,"fn",!0);return c};var Md=G("$animate"),Ue=function(){this.$get=["$q","$$rAF",function(a,b){function d(){}d.all=x;d.chain=x;d.prototype={end:x,cancel:x,resume:x,pause:x,complete:x,then:function(c,d){return a(function(a){b(function(){a()})}).then(c,d)}};return d}]},Te=function(){var a=
-new Sa,b=[];this.$get=["$$AnimateRunner","$rootScope",function(d,c){function e(a,b,c){var d=!1;b&&(b=E(b)?b.split(" "):I(b)?b:[],n(b,function(b){b&&(d=!0,a[b]=c)}));return d}function f(){n(b,function(b){var c=a.get(b);if(c){var d=Mf(b.attr("class")),e="",f="";n(c,function(a,b){a!==!!d[b]&&(a?e+=(e.length?" ":"")+b:f+=(f.length?" ":"")+b)});n(b,function(a){e&&Ab(a,e);f&&zb(a,f)});a.remove(b)}});b.length=0}return{enabled:x,on:x,off:x,pin:x,push:function(g,h,k,l){l&&l();k=k||{};k.from&&g.css(k.from);
-k.to&&g.css(k.to);if(k.addClass||k.removeClass)if(h=k.addClass,l=k.removeClass,k=a.get(g)||{},h=e(k,h,!0),l=e(k,l,!1),h||l)a.put(g,k),b.push(g),1===b.length&&c.$$postDigest(f);return new d}}}]},Re=["$provide",function(a){var b=this;this.$$registeredAnimations=Object.create(null);this.register=function(d,c){if(d&&"."!==d.charAt(0))throw Md("notcsel",d);var e=d+"-animation";b.$$registeredAnimations[d.substr(1)]=e;a.factory(e,c)};this.classNameFilter=function(a){if(1===arguments.length&&(this.$$classNameFilter=
-a instanceof RegExp?a:null)&&/(\s+|\/)ng-animate(\s+|\/)/.test(this.$$classNameFilter.toString()))throw Md("nongcls","ng-animate");return this.$$classNameFilter};this.$get=["$$animateQueue",function(a){function b(a,c,d){if(d){var h;a:{for(h=0;h<d.length;h++){var k=d[h];if(1===k.nodeType){h=k;break a}}h=void 0}!h||h.parentNode||h.previousElementSibling||(d=null)}d?d.after(a):c.prepend(a)}return{on:a.on,off:a.off,pin:a.pin,enabled:a.enabled,cancel:function(a){a.end&&a.end()},enter:function(e,f,g,h){f=
-f&&B(f);g=g&&B(g);f=f||g.parent();b(e,f,g);return a.push(e,"enter",Ea(h))},move:function(e,f,g,h){f=f&&B(f);g=g&&B(g);f=f||g.parent();b(e,f,g);return a.push(e,"move",Ea(h))},leave:function(b,c){return a.push(b,"leave",Ea(c),function(){b.remove()})},addClass:function(b,c,g){g=Ea(g);g.addClass=hb(g.addclass,c);return a.push(b,"addClass",g)},removeClass:function(b,c,g){g=Ea(g);g.removeClass=hb(g.removeClass,c);return a.push(b,"removeClass",g)},setClass:function(b,c,g,h){h=Ea(h);h.addClass=hb(h.addClass,
-c);h.removeClass=hb(h.removeClass,g);return a.push(b,"setClass",h)},animate:function(b,c,g,h,k){k=Ea(k);k.from=k.from?M(k.from,c):c;k.to=k.to?M(k.to,g):g;k.tempClasses=hb(k.tempClasses,h||"ng-inline-animate");return a.push(b,"animate",k)}}}]}],Se=function(){this.$get=["$$rAF","$q",function(a,b){var d=function(){};d.prototype={done:function(a){this.defer&&this.defer[!0===a?"reject":"resolve"]()},end:function(){this.done()},cancel:function(){this.done(!0)},getPromise:function(){this.defer||(this.defer=
-b.defer());return this.defer.promise},then:function(a,b){return this.getPromise().then(a,b)},"catch":function(a){return this.getPromise()["catch"](a)},"finally":function(a){return this.getPromise()["finally"](a)}};return function(b,e){function f(){a(function(){e.addClass&&(b.addClass(e.addClass),e.addClass=null);e.removeClass&&(b.removeClass(e.removeClass),e.removeClass=null);e.to&&(b.css(e.to),e.to=null);g||h.done();g=!0});return h}e.cleanupStyles&&(e.from=e.to=null);e.from&&(b.css(e.from),e.from=
-null);var g,h=new d;return{start:f,end:f}}}]},ha=G("$compile");Cc.$inject=["$provide","$$sanitizeUriProvider"];var Vc=/^((?:x|data)[\:\-_])/i,Qf=G("$controller"),Uc=/^(\S+)(\s+as\s+(\w+))?$/,$e=function(){this.$get=["$document",function(a){return function(b){b?!b.nodeType&&b instanceof B&&(b=b[0]):b=a[0].body;return b.offsetWidth+1}}]},$c="application/json",ac={"Content-Type":$c+";charset=utf-8"},Sf=/^\[|^\{(?!\{)/,Tf={"[":/]$/,"{":/}$/},Rf=/^\)\]\}',?\n/,pg=G("$http"),dd=function(a){return function(){throw pg("legacy",
-a);}},Ja=fa.$interpolateMinErr=G("$interpolate");Ja.throwNoconcat=function(a){throw Ja("noconcat",a);};Ja.interr=function(a,b){return Ja("interr",a,b.toString())};var qg=/^([^\?#]*)(\?([^#]*))?(#(.*))?$/,Vf={http:80,https:443,ftp:21},Db=G("$location"),rg={$$html5:!1,$$replace:!1,absUrl:Eb("$$absUrl"),url:function(a){if(q(a))return this.$$url;var b=qg.exec(a);(b[1]||""===a)&&this.path(decodeURIComponent(b[1]));(b[2]||b[1]||""===a)&&this.search(b[3]||"");this.hash(b[5]||"");return this},protocol:Eb("$$protocol"),
-host:Eb("$$host"),port:Eb("$$port"),path:id("$$path",function(a){a=null!==a?a.toString():"";return"/"==a.charAt(0)?a:"/"+a}),search:function(a,b){switch(arguments.length){case 0:return this.$$search;case 1:if(E(a)||Q(a))a=a.toString(),this.$$search=xc(a);else if(H(a))a=bb(a,{}),n(a,function(b,c){null==b&&delete a[c]}),this.$$search=a;else throw Db("isrcharg");break;default:q(b)||null===b?delete this.$$search[a]:this.$$search[a]=b}this.$$compose();return this},hash:id("$$hash",function(a){return null!==
-a?a.toString():""}),replace:function(){this.$$replace=!0;return this}};n([hd,dc,cc],function(a){a.prototype=Object.create(rg);a.prototype.state=function(b){if(!arguments.length)return this.$$state;if(a!==cc||!this.$$html5)throw Db("nostate");this.$$state=q(b)?null:b;return this}});var ba=G("$parse"),Wf=Function.prototype.call,Xf=Function.prototype.apply,Yf=Function.prototype.bind,Lb=$();n("+ - * / % === !== == != < > <= >= && || ! = |".split(" "),function(a){Lb[a]=!0});var sg={n:"\n",f:"\f",r:"\r",
-t:"\t",v:"\v","'":"'",'"':'"'},fc=function(a){this.options=a};fc.prototype={constructor:fc,lex:function(a){this.text=a;this.index=0;for(this.tokens=[];this.index<this.text.length;)if(a=this.text.charAt(this.index),'"'===a||"'"===a)this.readString(a);else if(this.isNumber(a)||"."===a&&this.isNumber(this.peek()))this.readNumber();else if(this.isIdent(a))this.readIdent();else if(this.is(a,"(){}[].,;:?"))this.tokens.push({index:this.index,text:a}),this.index++;else if(this.isWhitespace(a))this.index++;
-else{var b=a+this.peek(),d=b+this.peek(2),c=Lb[b],e=Lb[d];Lb[a]||c||e?(a=e?d:c?b:a,this.tokens.push({index:this.index,text:a,operator:!0}),this.index+=a.length):this.throwError("Unexpected next character ",this.index,this.index+1)}return this.tokens},is:function(a,b){return-1!==b.indexOf(a)},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&&"string"===typeof 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,b,d){d=d||this.index;b=y(b)?"s "+b+"-"+this.index+" ["+this.text.substring(b,d)+"]":" "+d;throw ba("lexerr",a,b,this.text);},readNumber:function(){for(var a="",b=this.index;this.index<this.text.length;){var d=F(this.text.charAt(this.index));if("."==d||this.isNumber(d))a+=d;else{var c=this.peek();
-if("e"==d&&this.isExpOperator(c))a+=d;else if(this.isExpOperator(d)&&c&&this.isNumber(c)&&"e"==a.charAt(a.length-1))a+=d;else if(!this.isExpOperator(d)||c&&this.isNumber(c)||"e"!=a.charAt(a.length-1))break;else this.throwError("Invalid exponent")}this.index++}this.tokens.push({index:b,text:a,constant:!0,value:Number(a)})},readIdent:function(){for(var a=this.index;this.index<this.text.length;){var b=this.text.charAt(this.index);if(!this.isIdent(b)&&!this.isNumber(b))break;this.index++}this.tokens.push({index:a,
-text:this.text.slice(a,this.index),identifier:!0})},readString:function(a){var b=this.index;this.index++;for(var d="",c=a,e=!1;this.index<this.text.length;){var f=this.text.charAt(this.index),c=c+f;if(e)"u"===f?(e=this.text.substring(this.index+1,this.index+5),e.match(/[\da-f]{4}/i)||this.throwError("Invalid unicode escape [\\u"+e+"]"),this.index+=4,d+=String.fromCharCode(parseInt(e,16))):d+=sg[f]||f,e=!1;else if("\\"===f)e=!0;else{if(f===a){this.index++;this.tokens.push({index:b,text:c,constant:!0,
-value:d});return}d+=f}this.index++}this.throwError("Unterminated quote",b)}};var s=function(a,b){this.lexer=a;this.options=b};s.Program="Program";s.ExpressionStatement="ExpressionStatement";s.AssignmentExpression="AssignmentExpression";s.ConditionalExpression="ConditionalExpression";s.LogicalExpression="LogicalExpression";s.BinaryExpression="BinaryExpression";s.UnaryExpression="UnaryExpression";s.CallExpression="CallExpression";s.MemberExpression="MemberExpression";s.Identifier="Identifier";s.Literal=
-"Literal";s.ArrayExpression="ArrayExpression";s.Property="Property";s.ObjectExpression="ObjectExpression";s.ThisExpression="ThisExpression";s.NGValueParameter="NGValueParameter";s.prototype={ast:function(a){this.text=a;this.tokens=this.lexer.lex(a);a=this.program();0!==this.tokens.length&&this.throwError("is an unexpected token",this.tokens[0]);return a},program:function(){for(var a=[];;)if(0<this.tokens.length&&!this.peek("}",")",";","]")&&a.push(this.expressionStatement()),!this.expect(";"))return{type:s.Program,
-body:a}},expressionStatement:function(){return{type:s.ExpressionStatement,expression:this.filterChain()}},filterChain:function(){for(var a=this.expression();this.expect("|");)a=this.filter(a);return a},expression:function(){return this.assignment()},assignment:function(){var a=this.ternary();this.expect("=")&&(a={type:s.AssignmentExpression,left:a,right:this.assignment(),operator:"="});return a},ternary:function(){var a=this.logicalOR(),b,d;return this.expect("?")&&(b=this.expression(),this.consume(":"))?
-(d=this.expression(),{type:s.ConditionalExpression,test:a,alternate:b,consequent:d}):a},logicalOR:function(){for(var a=this.logicalAND();this.expect("||");)a={type:s.LogicalExpression,operator:"||",left:a,right:this.logicalAND()};return a},logicalAND:function(){for(var a=this.equality();this.expect("&&");)a={type:s.LogicalExpression,operator:"&&",left:a,right:this.equality()};return a},equality:function(){for(var a=this.relational(),b;b=this.expect("==","!=","===","!==");)a={type:s.BinaryExpression,
-operator:b.text,left:a,right:this.relational()};return a},relational:function(){for(var a=this.additive(),b;b=this.expect("<",">","<=",">=");)a={type:s.BinaryExpression,operator:b.text,left:a,right:this.additive()};return a},additive:function(){for(var a=this.multiplicative(),b;b=this.expect("+","-");)a={type:s.BinaryExpression,operator:b.text,left:a,right:this.multiplicative()};return a},multiplicative:function(){for(var a=this.unary(),b;b=this.expect("*","/","%");)a={type:s.BinaryExpression,operator:b.text,
-left:a,right:this.unary()};return a},unary:function(){var a;return(a=this.expect("+","-","!"))?{type:s.UnaryExpression,operator:a.text,prefix:!0,argument:this.unary()}:this.primary()},primary:function(){var a;this.expect("(")?(a=this.filterChain(),this.consume(")")):this.expect("[")?a=this.arrayDeclaration():this.expect("{")?a=this.object():this.constants.hasOwnProperty(this.peek().text)?a=bb(this.constants[this.consume().text]):this.peek().identifier?a=this.identifier():this.peek().constant?a=this.constant():
-this.throwError("not a primary expression",this.peek());for(var b;b=this.expect("(","[",".");)"("===b.text?(a={type:s.CallExpression,callee:a,arguments:this.parseArguments()},this.consume(")")):"["===b.text?(a={type:s.MemberExpression,object:a,property:this.expression(),computed:!0},this.consume("]")):"."===b.text?a={type:s.MemberExpression,object:a,property:this.identifier(),computed:!1}:this.throwError("IMPOSSIBLE");return a},filter:function(a){a=[a];for(var b={type:s.CallExpression,callee:this.identifier(),
-arguments:a,filter:!0};this.expect(":");)a.push(this.expression());return b},parseArguments:function(){var a=[];if(")"!==this.peekToken().text){do a.push(this.expression());while(this.expect(","))}return a},identifier:function(){var a=this.consume();a.identifier||this.throwError("is not a valid identifier",a);return{type:s.Identifier,name:a.text}},constant:function(){return{type:s.Literal,value:this.consume().value}},arrayDeclaration:function(){var a=[];if("]"!==this.peekToken().text){do{if(this.peek("]"))break;
-a.push(this.expression())}while(this.expect(","))}this.consume("]");return{type:s.ArrayExpression,elements:a}},object:function(){var a=[],b;if("}"!==this.peekToken().text){do{if(this.peek("}"))break;b={type:s.Property,kind:"init"};this.peek().constant?b.key=this.constant():this.peek().identifier?b.key=this.identifier():this.throwError("invalid key",this.peek());this.consume(":");b.value=this.expression();a.push(b)}while(this.expect(","))}this.consume("}");return{type:s.ObjectExpression,properties:a}},
-throwError:function(a,b){throw ba("syntax",b.text,a,b.index+1,this.text,this.text.substring(b.index));},consume:function(a){if(0===this.tokens.length)throw ba("ueoe",this.text);var b=this.expect(a);b||this.throwError("is unexpected, expecting ["+a+"]",this.peek());return b},peekToken:function(){if(0===this.tokens.length)throw ba("ueoe",this.text);return this.tokens[0]},peek:function(a,b,d,c){return this.peekAhead(0,a,b,d,c)},peekAhead:function(a,b,d,c,e){if(this.tokens.length>a){a=this.tokens[a];
-var f=a.text;if(f===b||f===d||f===c||f===e||!(b||d||c||e))return a}return!1},expect:function(a,b,d,c){return(a=this.peek(a,b,d,c))?(this.tokens.shift(),a):!1},constants:{"true":{type:s.Literal,value:!0},"false":{type:s.Literal,value:!1},"null":{type:s.Literal,value:null},undefined:{type:s.Literal,value:u},"this":{type:s.ThisExpression}}};rd.prototype={compile:function(a,b){var d=this,c=this.astBuilder.ast(a);this.state={nextId:0,filters:{},expensiveChecks:b,fn:{vars:[],body:[],own:{}},assign:{vars:[],
-body:[],own:{}},inputs:[]};W(c,d.$filter);var e="",f;this.stage="assign";if(f=pd(c))this.state.computing="assign",e=this.nextId(),this.recurse(f,e),this.return_(e),e="fn.assign="+this.generateFunction("assign","s,v,l");f=nd(c.body);d.stage="inputs";n(f,function(a,b){var c="fn"+b;d.state[c]={vars:[],body:[],own:{}};d.state.computing=c;var e=d.nextId();d.recurse(a,e);d.return_(e);d.state.inputs.push(c);a.watchId=b});this.state.computing="fn";this.stage="main";this.recurse(c);e='"'+this.USE+" "+this.STRICT+
-'";\n'+this.filterPrefix()+"var fn="+this.generateFunction("fn","s,l,a,i")+e+this.watchFns()+"return fn;";e=(new Function("$filter","ensureSafeMemberName","ensureSafeObject","ensureSafeFunction","getStringValue","ensureSafeAssignContext","ifDefined","plus","text",e))(this.$filter,Va,xa,kd,jd,ld,Zf,md,a);this.state=this.stage=u;e.literal=qd(c);e.constant=c.constant;return e},USE:"use",STRICT:"strict",watchFns:function(){var a=[],b=this.state.inputs,d=this;n(b,function(b){a.push("var "+b+"="+d.generateFunction(b,
-"s"))});b.length&&a.push("fn.inputs=["+b.join(",")+"];");return a.join("")},generateFunction:function(a,b){return"function("+b+"){"+this.varsPrefix(a)+this.body(a)+"};"},filterPrefix:function(){var a=[],b=this;n(this.state.filters,function(d,c){a.push(d+"=$filter("+b.escape(c)+")")});return a.length?"var "+a.join(",")+";":""},varsPrefix:function(a){return this.state[a].vars.length?"var "+this.state[a].vars.join(",")+";":""},body:function(a){return this.state[a].body.join("")},recurse:function(a,b,
-d,c,e,f){var g,h,k=this,l,m;c=c||x;if(!f&&y(a.watchId))b=b||this.nextId(),this.if_("i",this.lazyAssign(b,this.computedMember("i",a.watchId)),this.lazyRecurse(a,b,d,c,e,!0));else switch(a.type){case s.Program:n(a.body,function(b,c){k.recurse(b.expression,u,u,function(a){h=a});c!==a.body.length-1?k.current().body.push(h,";"):k.return_(h)});break;case s.Literal:m=this.escape(a.value);this.assign(b,m);c(m);break;case s.UnaryExpression:this.recurse(a.argument,u,u,function(a){h=a});m=a.operator+"("+this.ifDefined(h,
-0)+")";this.assign(b,m);c(m);break;case s.BinaryExpression:this.recurse(a.left,u,u,function(a){g=a});this.recurse(a.right,u,u,function(a){h=a});m="+"===a.operator?this.plus(g,h):"-"===a.operator?this.ifDefined(g,0)+a.operator+this.ifDefined(h,0):"("+g+")"+a.operator+"("+h+")";this.assign(b,m);c(m);break;case s.LogicalExpression:b=b||this.nextId();k.recurse(a.left,b);k.if_("&&"===a.operator?b:k.not(b),k.lazyRecurse(a.right,b));c(b);break;case s.ConditionalExpression:b=b||this.nextId();k.recurse(a.test,
-b);k.if_(b,k.lazyRecurse(a.alternate,b),k.lazyRecurse(a.consequent,b));c(b);break;case s.Identifier:b=b||this.nextId();d&&(d.context="inputs"===k.stage?"s":this.assign(this.nextId(),this.getHasOwnProperty("l",a.name)+"?l:s"),d.computed=!1,d.name=a.name);Va(a.name);k.if_("inputs"===k.stage||k.not(k.getHasOwnProperty("l",a.name)),function(){k.if_("inputs"===k.stage||"s",function(){e&&1!==e&&k.if_(k.not(k.nonComputedMember("s",a.name)),k.lazyAssign(k.nonComputedMember("s",a.name),"{}"));k.assign(b,k.nonComputedMember("s",
-a.name))})},b&&k.lazyAssign(b,k.nonComputedMember("l",a.name)));(k.state.expensiveChecks||Fb(a.name))&&k.addEnsureSafeObject(b);c(b);break;case s.MemberExpression:g=d&&(d.context=this.nextId())||this.nextId();b=b||this.nextId();k.recurse(a.object,g,u,function(){k.if_(k.notNull(g),function(){if(a.computed)h=k.nextId(),k.recurse(a.property,h),k.getStringValue(h),k.addEnsureSafeMemberName(h),e&&1!==e&&k.if_(k.not(k.computedMember(g,h)),k.lazyAssign(k.computedMember(g,h),"{}")),m=k.ensureSafeObject(k.computedMember(g,
-h)),k.assign(b,m),d&&(d.computed=!0,d.name=h);else{Va(a.property.name);e&&1!==e&&k.if_(k.not(k.nonComputedMember(g,a.property.name)),k.lazyAssign(k.nonComputedMember(g,a.property.name),"{}"));m=k.nonComputedMember(g,a.property.name);if(k.state.expensiveChecks||Fb(a.property.name))m=k.ensureSafeObject(m);k.assign(b,m);d&&(d.computed=!1,d.name=a.property.name)}},function(){k.assign(b,"undefined")});c(b)},!!e);break;case s.CallExpression:b=b||this.nextId();a.filter?(h=k.filter(a.callee.name),l=[],n(a.arguments,
-function(a){var b=k.nextId();k.recurse(a,b);l.push(b)}),m=h+"("+l.join(",")+")",k.assign(b,m),c(b)):(h=k.nextId(),g={},l=[],k.recurse(a.callee,h,g,function(){k.if_(k.notNull(h),function(){k.addEnsureSafeFunction(h);n(a.arguments,function(a){k.recurse(a,k.nextId(),u,function(a){l.push(k.ensureSafeObject(a))})});g.name?(k.state.expensiveChecks||k.addEnsureSafeObject(g.context),m=k.member(g.context,g.name,g.computed)+"("+l.join(",")+")"):m=h+"("+l.join(",")+")";m=k.ensureSafeObject(m);k.assign(b,m)},
-function(){k.assign(b,"undefined")});c(b)}));break;case s.AssignmentExpression:h=this.nextId();g={};if(!od(a.left))throw ba("lval");this.recurse(a.left,u,g,function(){k.if_(k.notNull(g.context),function(){k.recurse(a.right,h);k.addEnsureSafeObject(k.member(g.context,g.name,g.computed));k.addEnsureSafeAssignContext(g.context);m=k.member(g.context,g.name,g.computed)+a.operator+h;k.assign(b,m);c(b||m)})},1);break;case s.ArrayExpression:l=[];n(a.elements,function(a){k.recurse(a,k.nextId(),u,function(a){l.push(a)})});
-m="["+l.join(",")+"]";this.assign(b,m);c(m);break;case s.ObjectExpression:l=[];n(a.properties,function(a){k.recurse(a.value,k.nextId(),u,function(b){l.push(k.escape(a.key.type===s.Identifier?a.key.name:""+a.key.value)+":"+b)})});m="{"+l.join(",")+"}";this.assign(b,m);c(m);break;case s.ThisExpression:this.assign(b,"s");c("s");break;case s.NGValueParameter:this.assign(b,"v"),c("v")}},getHasOwnProperty:function(a,b){var d=a+"."+b,c=this.current().own;c.hasOwnProperty(d)||(c[d]=this.nextId(!1,a+"&&("+
-this.escape(b)+" in "+a+")"));return c[d]},assign:function(a,b){if(a)return this.current().body.push(a,"=",b,";"),a},filter:function(a){this.state.filters.hasOwnProperty(a)||(this.state.filters[a]=this.nextId(!0));return this.state.filters[a]},ifDefined:function(a,b){return"ifDefined("+a+","+this.escape(b)+")"},plus:function(a,b){return"plus("+a+","+b+")"},return_:function(a){this.current().body.push("return ",a,";")},if_:function(a,b,d){if(!0===a)b();else{var c=this.current().body;c.push("if(",a,
-"){");b();c.push("}");d&&(c.push("else{"),d(),c.push("}"))}},not:function(a){return"!("+a+")"},notNull:function(a){return a+"!=null"},nonComputedMember:function(a,b){return a+"."+b},computedMember:function(a,b){return a+"["+b+"]"},member:function(a,b,d){return d?this.computedMember(a,b):this.nonComputedMember(a,b)},addEnsureSafeObject:function(a){this.current().body.push(this.ensureSafeObject(a),";")},addEnsureSafeMemberName:function(a){this.current().body.push(this.ensureSafeMemberName(a),";")},
-addEnsureSafeFunction:function(a){this.current().body.push(this.ensureSafeFunction(a),";")},addEnsureSafeAssignContext:function(a){this.current().body.push(this.ensureSafeAssignContext(a),";")},ensureSafeObject:function(a){return"ensureSafeObject("+a+",text)"},ensureSafeMemberName:function(a){return"ensureSafeMemberName("+a+",text)"},ensureSafeFunction:function(a){return"ensureSafeFunction("+a+",text)"},getStringValue:function(a){this.assign(a,"getStringValue("+a+",text)")},ensureSafeAssignContext:function(a){return"ensureSafeAssignContext("+
-a+",text)"},lazyRecurse:function(a,b,d,c,e,f){var g=this;return function(){g.recurse(a,b,d,c,e,f)}},lazyAssign:function(a,b){var d=this;return function(){d.assign(a,b)}},stringEscapeRegex:/[^ a-zA-Z0-9]/g,stringEscapeFn:function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)},escape:function(a){if(E(a))return"'"+a.replace(this.stringEscapeRegex,this.stringEscapeFn)+"'";if(Q(a))return a.toString();if(!0===a)return"true";if(!1===a)return"false";if(null===a)return"null";if("undefined"===
-typeof a)return"undefined";throw ba("esc");},nextId:function(a,b){var d="v"+this.state.nextId++;a||this.current().vars.push(d+(b?"="+b:""));return d},current:function(){return this.state[this.state.computing]}};sd.prototype={compile:function(a,b){var d=this,c=this.astBuilder.ast(a);this.expression=a;this.expensiveChecks=b;W(c,d.$filter);var e,f;if(e=pd(c))f=this.recurse(e);e=nd(c.body);var g;e&&(g=[],n(e,function(a,b){var c=d.recurse(a);a.input=c;g.push(c);a.watchId=b}));var h=[];n(c.body,function(a){h.push(d.recurse(a.expression))});
-e=0===c.body.length?function(){}:1===c.body.length?h[0]:function(a,b){var c;n(h,function(d){c=d(a,b)});return c};f&&(e.assign=function(a,b,c){return f(a,c,b)});g&&(e.inputs=g);e.literal=qd(c);e.constant=c.constant;return e},recurse:function(a,b,d){var c,e,f=this,g;if(a.input)return this.inputs(a.input,a.watchId);switch(a.type){case s.Literal:return this.value(a.value,b);case s.UnaryExpression:return e=this.recurse(a.argument),this["unary"+a.operator](e,b);case s.BinaryExpression:return c=this.recurse(a.left),
-e=this.recurse(a.right),this["binary"+a.operator](c,e,b);case s.LogicalExpression:return c=this.recurse(a.left),e=this.recurse(a.right),this["binary"+a.operator](c,e,b);case s.ConditionalExpression:return this["ternary?:"](this.recurse(a.test),this.recurse(a.alternate),this.recurse(a.consequent),b);case s.Identifier:return Va(a.name,f.expression),f.identifier(a.name,f.expensiveChecks||Fb(a.name),b,d,f.expression);case s.MemberExpression:return c=this.recurse(a.object,!1,!!d),a.computed||(Va(a.property.name,
-f.expression),e=a.property.name),a.computed&&(e=this.recurse(a.property)),a.computed?this.computedMember(c,e,b,d,f.expression):this.nonComputedMember(c,e,f.expensiveChecks,b,d,f.expression);case s.CallExpression:return g=[],n(a.arguments,function(a){g.push(f.recurse(a))}),a.filter&&(e=this.$filter(a.callee.name)),a.filter||(e=this.recurse(a.callee,!0)),a.filter?function(a,c,d,f){for(var r=[],n=0;n<g.length;++n)r.push(g[n](a,c,d,f));a=e.apply(u,r,f);return b?{context:u,name:u,value:a}:a}:function(a,
-c,d,m){var r=e(a,c,d,m),n;if(null!=r.value){xa(r.context,f.expression);kd(r.value,f.expression);n=[];for(var q=0;q<g.length;++q)n.push(xa(g[q](a,c,d,m),f.expression));n=xa(r.value.apply(r.context,n),f.expression)}return b?{value:n}:n};case s.AssignmentExpression:return c=this.recurse(a.left,!0,1),e=this.recurse(a.right),function(a,d,g,m){var n=c(a,d,g,m);a=e(a,d,g,m);xa(n.value,f.expression);ld(n.context);n.context[n.name]=a;return b?{value:a}:a};case s.ArrayExpression:return g=[],n(a.elements,function(a){g.push(f.recurse(a))}),
-function(a,c,d,e){for(var f=[],n=0;n<g.length;++n)f.push(g[n](a,c,d,e));return b?{value:f}:f};case s.ObjectExpression:return g=[],n(a.properties,function(a){g.push({key:a.key.type===s.Identifier?a.key.name:""+a.key.value,value:f.recurse(a.value)})}),function(a,c,d,e){for(var f={},n=0;n<g.length;++n)f[g[n].key]=g[n].value(a,c,d,e);return b?{value:f}:f};case s.ThisExpression:return function(a){return b?{value:a}:a};case s.NGValueParameter:return function(a,c,d,e){return b?{value:d}:d}}},"unary+":function(a,
-b){return function(d,c,e,f){d=a(d,c,e,f);d=y(d)?+d:0;return b?{value:d}:d}},"unary-":function(a,b){return function(d,c,e,f){d=a(d,c,e,f);d=y(d)?-d:0;return b?{value:d}:d}},"unary!":function(a,b){return function(d,c,e,f){d=!a(d,c,e,f);return b?{value:d}:d}},"binary+":function(a,b,d){return function(c,e,f,g){var h=a(c,e,f,g);c=b(c,e,f,g);h=md(h,c);return d?{value:h}:h}},"binary-":function(a,b,d){return function(c,e,f,g){var h=a(c,e,f,g);c=b(c,e,f,g);h=(y(h)?h:0)-(y(c)?c:0);return d?{value:h}:h}},"binary*":function(a,
-b,d){return function(c,e,f,g){c=a(c,e,f,g)*b(c,e,f,g);return d?{value:c}:c}},"binary/":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)/b(c,e,f,g);return d?{value:c}:c}},"binary%":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)%b(c,e,f,g);return d?{value:c}:c}},"binary===":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)===b(c,e,f,g);return d?{value:c}:c}},"binary!==":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)!==b(c,e,f,g);return d?{value:c}:c}},"binary==":function(a,b,
-d){return function(c,e,f,g){c=a(c,e,f,g)==b(c,e,f,g);return d?{value:c}:c}},"binary!=":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)!=b(c,e,f,g);return d?{value:c}:c}},"binary<":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)<b(c,e,f,g);return d?{value:c}:c}},"binary>":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)>b(c,e,f,g);return d?{value:c}:c}},"binary<=":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)<=b(c,e,f,g);return d?{value:c}:c}},"binary>=":function(a,b,d){return function(c,
-e,f,g){c=a(c,e,f,g)>=b(c,e,f,g);return d?{value:c}:c}},"binary&&":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)&&b(c,e,f,g);return d?{value:c}:c}},"binary||":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)||b(c,e,f,g);return d?{value:c}:c}},"ternary?:":function(a,b,d,c){return function(e,f,g,h){e=a(e,f,g,h)?b(e,f,g,h):d(e,f,g,h);return c?{value:e}:e}},value:function(a,b){return function(){return b?{context:u,name:u,value:a}:a}},identifier:function(a,b,d,c,e){return function(f,g,h,k){f=
-g&&a in g?g:f;c&&1!==c&&f&&!f[a]&&(f[a]={});g=f?f[a]:u;b&&xa(g,e);return d?{context:f,name:a,value:g}:g}},computedMember:function(a,b,d,c,e){return function(f,g,h,k){var l=a(f,g,h,k),m,n;null!=l&&(m=b(f,g,h,k),m=jd(m),Va(m,e),c&&1!==c&&l&&!l[m]&&(l[m]={}),n=l[m],xa(n,e));return d?{context:l,name:m,value:n}:n}},nonComputedMember:function(a,b,d,c,e,f){return function(g,h,k,l){g=a(g,h,k,l);e&&1!==e&&g&&!g[b]&&(g[b]={});h=null!=g?g[b]:u;(d||Fb(b))&&xa(h,f);return c?{context:g,name:b,value:h}:h}},inputs:function(a,
-b){return function(d,c,e,f){return f?f[b]:a(d,c,e)}}};var gc=function(a,b,d){this.lexer=a;this.$filter=b;this.options=d;this.ast=new s(this.lexer);this.astCompiler=d.csp?new sd(this.ast,b):new rd(this.ast,b)};gc.prototype={constructor:gc,parse:function(a){return this.astCompiler.compile(a,this.options.expensiveChecks)}};$();$();var $f=Object.prototype.valueOf,ya=G("$sce"),la={HTML:"html",CSS:"css",URL:"url",RESOURCE_URL:"resourceUrl",JS:"js"},ha=G("$compile"),Y=X.createElement("a"),wd=wa(S.location.href);
-xd.$inject=["$document"];Jc.$inject=["$provide"];yd.$inject=["$locale"];Ad.$inject=["$locale"];var ic=".",jg={yyyy:ca("FullYear",4),yy:ca("FullYear",2,0,!0),y:ca("FullYear",1),MMMM:Hb("Month"),MMM:Hb("Month",!0),MM:ca("Month",2,1),M:ca("Month",1,1),dd:ca("Date",2),d:ca("Date",1),HH:ca("Hours",2),H:ca("Hours",1),hh:ca("Hours",2,-12),h:ca("Hours",1,-12),mm:ca("Minutes",2),m:ca("Minutes",1),ss:ca("Seconds",2),s:ca("Seconds",1),sss:ca("Milliseconds",3),EEEE:Hb("Day"),EEE:Hb("Day",!0),a:function(a,b){return 12>
-a.getHours()?b.AMPMS[0]:b.AMPMS[1]},Z:function(a,b,d){a=-1*d;return a=(0<=a?"+":"")+(Gb(Math[0<a?"floor":"ceil"](a/60),2)+Gb(Math.abs(a%60),2))},ww:Ed(2),w:Ed(1),G:jc,GG:jc,GGG:jc,GGGG:function(a,b){return 0>=a.getFullYear()?b.ERANAMES[0]:b.ERANAMES[1]}},ig=/((?:[^yMdHhmsaZEwG']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|d+|H+|h+|m+|s+|a|Z|G+|w+))(.*)/,hg=/^\-?\d+$/;zd.$inject=["$locale"];var eg=na(F),fg=na(sb);Bd.$inject=["$parse"];var he=na({restrict:"E",compile:function(a,b){if(!b.href&&!b.xlinkHref)return function(a,
-b){if("a"===b[0].nodeName.toLowerCase()){var e="[object SVGAnimatedString]"===sa.call(b.prop("href"))?"xlink:href":"href";b.on("click",function(a){b.attr(e)||a.preventDefault()})}}}}),tb={};n(Cb,function(a,b){function d(a,d,e){a.$watch(e[c],function(a){e.$set(b,!!a)})}if("multiple"!=a){var c=va("ng-"+b),e=d;"checked"===a&&(e=function(a,b,e){e.ngModel!==e[c]&&d(a,b,e)});tb[c]=function(){return{restrict:"A",priority:100,link:e}}}});n(Zc,function(a,b){tb[b]=function(){return{priority:100,link:function(a,
-c,e){if("ngPattern"===b&&"/"==e.ngPattern.charAt(0)&&(c=e.ngPattern.match(lg))){e.$set("ngPattern",new RegExp(c[1],c[2]));return}a.$watch(e[b],function(a){e.$set(b,a)})}}}});n(["src","srcset","href"],function(a){var b=va("ng-"+a);tb[b]=function(){return{priority:99,link:function(d,c,e){var f=a,g=a;"href"===a&&"[object SVGAnimatedString]"===sa.call(c.prop("href"))&&(g="xlinkHref",e.$attr[g]="xlink:href",f=null);e.$observe(b,function(b){b?(e.$set(g,b),Ha&&f&&c.prop(f,e[g])):"href"===a&&e.$set(g,null)})}}}});
-var Ib={$addControl:x,$$renameControl:function(a,b){a.$name=b},$removeControl:x,$setValidity:x,$setDirty:x,$setPristine:x,$setSubmitted:x};Fd.$inject=["$element","$attrs","$scope","$animate","$interpolate"];var Nd=function(a){return["$timeout","$parse",function(b,d){function c(a){return""===a?d('this[""]').assign:d(a).assign||x}return{name:"form",restrict:a?"EAC":"E",require:["form","^^?form"],controller:Fd,compile:function(d,f){d.addClass(Wa).addClass(mb);var g=f.name?"name":a&&f.ngForm?"ngForm":
-!1;return{pre:function(a,d,e,f){var n=f[0];if(!("action"in e)){var q=function(b){a.$apply(function(){n.$commitViewValue();n.$setSubmitted()});b.preventDefault()};d[0].addEventListener("submit",q,!1);d.on("$destroy",function(){b(function(){d[0].removeEventListener("submit",q,!1)},0,!1)})}(f[1]||n.$$parentForm).$addControl(n);var s=g?c(n.$name):x;g&&(s(a,n),e.$observe(g,function(b){n.$name!==b&&(s(a,u),n.$$parentForm.$$renameControl(n,b),s=c(n.$name),s(a,n))}));d.on("$destroy",function(){n.$$parentForm.$removeControl(n);
-s(a,u);M(n,Ib)})}}}}}]},ie=Nd(),ve=Nd(!0),kg=/\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z)/,tg=/^[A-Za-z][A-Za-z\d.+-]*:\/*(?:\w+(?::\w+)?@)?[^\s/]+(?::\d+)?(?:\/[\w#!:.?+=&%@\-/]*)?$/,ug=/^[a-z0-9!#$%&'*+\/=?^_`{|}~.-]+@[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$/i,vg=/^\s*(\-|\+)?(\d+|(\d*(\.\d*)))([eE][+-]?\d+)?\s*$/,Od=/^(\d{4})-(\d{2})-(\d{2})$/,Pd=/^(\d{4})-(\d\d)-(\d\d)T(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,mc=/^(\d{4})-W(\d\d)$/,Qd=/^(\d{4})-(\d\d)$/,
-Rd=/^(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,Sd={text:function(a,b,d,c,e,f){jb(a,b,d,c,e,f);kc(c)},date:kb("date",Od,Kb(Od,["yyyy","MM","dd"]),"yyyy-MM-dd"),"datetime-local":kb("datetimelocal",Pd,Kb(Pd,"yyyy MM dd HH mm ss sss".split(" ")),"yyyy-MM-ddTHH:mm:ss.sss"),time:kb("time",Rd,Kb(Rd,["HH","mm","ss","sss"]),"HH:mm:ss.sss"),week:kb("week",mc,function(a,b){if(da(a))return a;if(E(a)){mc.lastIndex=0;var d=mc.exec(a);if(d){var c=+d[1],e=+d[2],f=d=0,g=0,h=0,k=Dd(c),e=7*(e-1);b&&(d=b.getHours(),f=
-b.getMinutes(),g=b.getSeconds(),h=b.getMilliseconds());return new Date(c,0,k.getDate()+e,d,f,g,h)}}return NaN},"yyyy-Www"),month:kb("month",Qd,Kb(Qd,["yyyy","MM"]),"yyyy-MM"),number:function(a,b,d,c,e,f){Hd(a,b,d,c);jb(a,b,d,c,e,f);c.$$parserName="number";c.$parsers.push(function(a){return c.$isEmpty(a)?null:vg.test(a)?parseFloat(a):u});c.$formatters.push(function(a){if(!c.$isEmpty(a)){if(!Q(a))throw lb("numfmt",a);a=a.toString()}return a});if(y(d.min)||d.ngMin){var g;c.$validators.min=function(a){return c.$isEmpty(a)||
-q(g)||a>=g};d.$observe("min",function(a){y(a)&&!Q(a)&&(a=parseFloat(a,10));g=Q(a)&&!isNaN(a)?a:u;c.$validate()})}if(y(d.max)||d.ngMax){var h;c.$validators.max=function(a){return c.$isEmpty(a)||q(h)||a<=h};d.$observe("max",function(a){y(a)&&!Q(a)&&(a=parseFloat(a,10));h=Q(a)&&!isNaN(a)?a:u;c.$validate()})}},url:function(a,b,d,c,e,f){jb(a,b,d,c,e,f);kc(c);c.$$parserName="url";c.$validators.url=function(a,b){var d=a||b;return c.$isEmpty(d)||tg.test(d)}},email:function(a,b,d,c,e,f){jb(a,b,d,c,e,f);kc(c);
-c.$$parserName="email";c.$validators.email=function(a,b){var d=a||b;return c.$isEmpty(d)||ug.test(d)}},radio:function(a,b,d,c){q(d.name)&&b.attr("name",++nb);b.on("click",function(a){b[0].checked&&c.$setViewValue(d.value,a&&a.type)});c.$render=function(){b[0].checked=d.value==c.$viewValue};d.$observe("value",c.$render)},checkbox:function(a,b,d,c,e,f,g,h){var k=Id(h,a,"ngTrueValue",d.ngTrueValue,!0),l=Id(h,a,"ngFalseValue",d.ngFalseValue,!1);b.on("click",function(a){c.$setViewValue(b[0].checked,a&&
-a.type)});c.$render=function(){b[0].checked=c.$viewValue};c.$isEmpty=function(a){return!1===a};c.$formatters.push(function(a){return ma(a,k)});c.$parsers.push(function(a){return a?k:l})},hidden:x,button:x,submit:x,reset:x,file:x},Dc=["$browser","$sniffer","$filter","$parse",function(a,b,d,c){return{restrict:"E",require:["?ngModel"],link:{pre:function(e,f,g,h){h[0]&&(Sd[F(g.type)]||Sd.text)(e,f,g,h[0],b,a,d,c)}}}}],wg=/^(true|false|\d+)$/,Ne=function(){return{restrict:"A",priority:100,compile:function(a,
-b){return wg.test(b.ngValue)?function(a,b,e){e.$set("value",a.$eval(e.ngValue))}:function(a,b,e){a.$watch(e.ngValue,function(a){e.$set("value",a)})}}}},ne=["$compile",function(a){return{restrict:"AC",compile:function(b){a.$$addBindingClass(b);return function(b,c,e){a.$$addBindingInfo(c,e.ngBind);c=c[0];b.$watch(e.ngBind,function(a){c.textContent=q(a)?"":a})}}}}],pe=["$interpolate","$compile",function(a,b){return{compile:function(d){b.$$addBindingClass(d);return function(c,d,f){c=a(d.attr(f.$attr.ngBindTemplate));
-b.$$addBindingInfo(d,c.expressions);d=d[0];f.$observe("ngBindTemplate",function(a){d.textContent=q(a)?"":a})}}}}],oe=["$sce","$parse","$compile",function(a,b,d){return{restrict:"A",compile:function(c,e){var f=b(e.ngBindHtml),g=b(e.ngBindHtml,function(a){return(a||"").toString()});d.$$addBindingClass(c);return function(b,c,e){d.$$addBindingInfo(c,e.ngBindHtml);b.$watch(g,function(){c.html(a.getTrustedHtml(f(b))||"")})}}}}],Me=na({restrict:"A",require:"ngModel",link:function(a,b,d,c){c.$viewChangeListeners.push(function(){a.$eval(d.ngChange)})}}),
-qe=lc("",!0),se=lc("Odd",0),re=lc("Even",1),te=La({compile:function(a,b){b.$set("ngCloak",u);a.removeClass("ng-cloak")}}),ue=[function(){return{restrict:"A",scope:!0,controller:"@",priority:500}}],Ic={},xg={blur:!0,focus:!0};n("click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave keydown keyup keypress submit focus blur copy cut paste".split(" "),function(a){var b=va("ng-"+a);Ic[b]=["$parse","$rootScope",function(d,c){return{restrict:"A",compile:function(e,f){var g=
-d(f[b],null,!0);return function(b,d){d.on(a,function(d){var e=function(){g(b,{$event:d})};xg[a]&&c.$$phase?b.$evalAsync(e):b.$apply(e)})}}}}]});var xe=["$animate",function(a){return{multiElement:!0,transclude:"element",priority:600,terminal:!0,restrict:"A",$$tlb:!0,link:function(b,d,c,e,f){var g,h,k;b.$watch(c.ngIf,function(b){b?h||f(function(b,e){h=e;b[b.length++]=X.createComment(" end ngIf: "+c.ngIf+" ");g={clone:b};a.enter(b,d.parent(),d)}):(k&&(k.remove(),k=null),h&&(h.$destroy(),h=null),g&&(k=
-rb(g.clone),a.leave(k).then(function(){k=null}),g=null))})}}}],ye=["$templateRequest","$anchorScroll","$animate",function(a,b,d){return{restrict:"ECA",priority:400,terminal:!0,transclude:"element",controller:fa.noop,compile:function(c,e){var f=e.ngInclude||e.src,g=e.onload||"",h=e.autoscroll;return function(c,e,m,n,q){var s=0,v,u,p,C=function(){u&&(u.remove(),u=null);v&&(v.$destroy(),v=null);p&&(d.leave(p).then(function(){u=null}),u=p,p=null)};c.$watch(f,function(f){var m=function(){!y(h)||h&&!c.$eval(h)||
-b()},u=++s;f?(a(f,!0).then(function(a){if(u===s){var b=c.$new();n.template=a;a=q(b,function(a){C();d.enter(a,null,e).then(m)});v=b;p=a;v.$emit("$includeContentLoaded",f);c.$eval(g)}},function(){u===s&&(C(),c.$emit("$includeContentError",f))}),c.$emit("$includeContentRequested",f)):(C(),n.template=null)})}}}}],Pe=["$compile",function(a){return{restrict:"ECA",priority:-400,require:"ngInclude",link:function(b,d,c,e){/SVG/.test(d[0].toString())?(d.empty(),a(Lc(e.template,X).childNodes)(b,function(a){d.append(a)},
-{futureParentElement:d})):(d.html(e.template),a(d.contents())(b))}}}],ze=La({priority:450,compile:function(){return{pre:function(a,b,d){a.$eval(d.ngInit)}}}}),Le=function(){return{restrict:"A",priority:100,require:"ngModel",link:function(a,b,d,c){var e=b.attr(d.$attr.ngList)||", ",f="false"!==d.ngTrim,g=f?U(e):e;c.$parsers.push(function(a){if(!q(a)){var b=[];a&&n(a.split(g),function(a){a&&b.push(f?U(a):a)});return b}});c.$formatters.push(function(a){return I(a)?a.join(e):u});c.$isEmpty=function(a){return!a||
-!a.length}}}},mb="ng-valid",Jd="ng-invalid",Wa="ng-pristine",Jb="ng-dirty",Ld="ng-pending",lb=G("ngModel"),yg=["$scope","$exceptionHandler","$attrs","$element","$parse","$animate","$timeout","$rootScope","$q","$interpolate",function(a,b,d,c,e,f,g,h,k,l){this.$modelValue=this.$viewValue=Number.NaN;this.$$rawModelValue=u;this.$validators={};this.$asyncValidators={};this.$parsers=[];this.$formatters=[];this.$viewChangeListeners=[];this.$untouched=!0;this.$touched=!1;this.$pristine=!0;this.$dirty=!1;
-this.$valid=!0;this.$invalid=!1;this.$error={};this.$$success={};this.$pending=u;this.$name=l(d.name||"",!1)(a);this.$$parentForm=Ib;var m=e(d.ngModel),r=m.assign,t=m,s=r,v=null,B,p=this;this.$$setOptions=function(a){if((p.$options=a)&&a.getterSetter){var b=e(d.ngModel+"()"),f=e(d.ngModel+"($$$p)");t=function(a){var c=m(a);z(c)&&(c=b(a));return c};s=function(a,b){z(m(a))?f(a,{$$$p:p.$modelValue}):r(a,p.$modelValue)}}else if(!m.assign)throw lb("nonassign",d.ngModel,ua(c));};this.$render=x;this.$isEmpty=
-function(a){return q(a)||""===a||null===a||a!==a};var C=0;Gd({ctrl:this,$element:c,set:function(a,b){a[b]=!0},unset:function(a,b){delete a[b]},$animate:f});this.$setPristine=function(){p.$dirty=!1;p.$pristine=!0;f.removeClass(c,Jb);f.addClass(c,Wa)};this.$setDirty=function(){p.$dirty=!0;p.$pristine=!1;f.removeClass(c,Wa);f.addClass(c,Jb);p.$$parentForm.$setDirty()};this.$setUntouched=function(){p.$touched=!1;p.$untouched=!0;f.setClass(c,"ng-untouched","ng-touched")};this.$setTouched=function(){p.$touched=
-!0;p.$untouched=!1;f.setClass(c,"ng-touched","ng-untouched")};this.$rollbackViewValue=function(){g.cancel(v);p.$viewValue=p.$$lastCommittedViewValue;p.$render()};this.$validate=function(){if(!Q(p.$modelValue)||!isNaN(p.$modelValue)){var a=p.$$rawModelValue,b=p.$valid,c=p.$modelValue,d=p.$options&&p.$options.allowInvalid;p.$$runValidators(a,p.$$lastCommittedViewValue,function(e){d||b===e||(p.$modelValue=e?a:u,p.$modelValue!==c&&p.$$writeModelToScope())})}};this.$$runValidators=function(a,b,c){function d(){var c=
-!0;n(p.$validators,function(d,e){var g=d(a,b);c=c&&g;f(e,g)});return c?!0:(n(p.$asyncValidators,function(a,b){f(b,null)}),!1)}function e(){var c=[],d=!0;n(p.$asyncValidators,function(e,g){var h=e(a,b);if(!h||!z(h.then))throw lb("$asyncValidators",h);f(g,u);c.push(h.then(function(){f(g,!0)},function(a){d=!1;f(g,!1)}))});c.length?k.all(c).then(function(){g(d)},x):g(!0)}function f(a,b){h===C&&p.$setValidity(a,b)}function g(a){h===C&&c(a)}C++;var h=C;(function(){var a=p.$$parserName||"parse";if(q(B))f(a,
-null);else return B||(n(p.$validators,function(a,b){f(b,null)}),n(p.$asyncValidators,function(a,b){f(b,null)})),f(a,B),B;return!0})()?d()?e():g(!1):g(!1)};this.$commitViewValue=function(){var a=p.$viewValue;g.cancel(v);if(p.$$lastCommittedViewValue!==a||""===a&&p.$$hasNativeValidators)p.$$lastCommittedViewValue=a,p.$pristine&&this.$setDirty(),this.$$parseAndValidate()};this.$$parseAndValidate=function(){var b=p.$$lastCommittedViewValue;if(B=q(b)?u:!0)for(var c=0;c<p.$parsers.length;c++)if(b=p.$parsers[c](b),
-q(b)){B=!1;break}Q(p.$modelValue)&&isNaN(p.$modelValue)&&(p.$modelValue=t(a));var d=p.$modelValue,e=p.$options&&p.$options.allowInvalid;p.$$rawModelValue=b;e&&(p.$modelValue=b,p.$modelValue!==d&&p.$$writeModelToScope());p.$$runValidators(b,p.$$lastCommittedViewValue,function(a){e||(p.$modelValue=a?b:u,p.$modelValue!==d&&p.$$writeModelToScope())})};this.$$writeModelToScope=function(){s(a,p.$modelValue);n(p.$viewChangeListeners,function(a){try{a()}catch(c){b(c)}})};this.$setViewValue=function(a,b){p.$viewValue=
-a;p.$options&&!p.$options.updateOnDefault||p.$$debounceViewValueCommit(b)};this.$$debounceViewValueCommit=function(b){var c=0,d=p.$options;d&&y(d.debounce)&&(d=d.debounce,Q(d)?c=d:Q(d[b])?c=d[b]:Q(d["default"])&&(c=d["default"]));g.cancel(v);c?v=g(function(){p.$commitViewValue()},c):h.$$phase?p.$commitViewValue():a.$apply(function(){p.$commitViewValue()})};a.$watch(function(){var b=t(a);if(b!==p.$modelValue&&(p.$modelValue===p.$modelValue||b===b)){p.$modelValue=p.$$rawModelValue=b;B=u;for(var c=p.$formatters,
-d=c.length,e=b;d--;)e=c[d](e);p.$viewValue!==e&&(p.$viewValue=p.$$lastCommittedViewValue=e,p.$render(),p.$$runValidators(b,e,x))}return b})}],Ke=["$rootScope",function(a){return{restrict:"A",require:["ngModel","^?form","^?ngModelOptions"],controller:yg,priority:1,compile:function(b){b.addClass(Wa).addClass("ng-untouched").addClass(mb);return{pre:function(a,b,e,f){var g=f[0];b=f[1]||g.$$parentForm;g.$$setOptions(f[2]&&f[2].$options);b.$addControl(g);e.$observe("name",function(a){g.$name!==a&&g.$$parentForm.$$renameControl(g,
-a)});a.$on("$destroy",function(){g.$$parentForm.$removeControl(g)})},post:function(b,c,e,f){var g=f[0];if(g.$options&&g.$options.updateOn)c.on(g.$options.updateOn,function(a){g.$$debounceViewValueCommit(a&&a.type)});c.on("blur",function(c){g.$touched||(a.$$phase?b.$evalAsync(g.$setTouched):b.$apply(g.$setTouched))})}}}}}],zg=/(\s+|^)default(\s+|$)/,Oe=function(){return{restrict:"A",controller:["$scope","$attrs",function(a,b){var d=this;this.$options=bb(a.$eval(b.ngModelOptions));y(this.$options.updateOn)?
-(this.$options.updateOnDefault=!1,this.$options.updateOn=U(this.$options.updateOn.replace(zg,function(){d.$options.updateOnDefault=!0;return" "}))):this.$options.updateOnDefault=!0}]}},Ae=La({terminal:!0,priority:1E3}),Ag=G("ngOptions"),Bg=/^\s*([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+group\s+by\s+([\s\S]+?))?(?:\s+disable\s+when\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]+?))?$/,Ie=["$compile","$parse",function(a,
-b){function d(a,c,d){function e(a,b,c,d,f){this.selectValue=a;this.viewValue=b;this.label=c;this.group=d;this.disabled=f}function l(a){var b;if(!q&&za(a))b=a;else{b=[];for(var c in a)a.hasOwnProperty(c)&&"$"!==c.charAt(0)&&b.push(c)}return b}var m=a.match(Bg);if(!m)throw Ag("iexp",a,ua(c));var n=m[5]||m[7],q=m[6];a=/ as /.test(m[0])&&m[1];var s=m[9];c=b(m[2]?m[1]:n);var v=a&&b(a)||c,u=s&&b(s),p=s?function(a,b){return u(d,b)}:function(a){return Ca(a)},C=function(a,b){return p(a,z(a,b))},w=b(m[2]||
-m[1]),y=b(m[3]||""),B=b(m[4]||""),x=b(m[8]),D={},z=q?function(a,b){D[q]=b;D[n]=a;return D}:function(a){D[n]=a;return D};return{trackBy:s,getTrackByValue:C,getWatchables:b(x,function(a){var b=[];a=a||[];for(var c=l(a),e=c.length,f=0;f<e;f++){var g=a===c?f:c[f],k=z(a[g],g),g=p(a[g],k);b.push(g);if(m[2]||m[1])g=w(d,k),b.push(g);m[4]&&(k=B(d,k),b.push(k))}return b}),getOptions:function(){for(var a=[],b={},c=x(d)||[],f=l(c),g=f.length,m=0;m<g;m++){var n=c===f?m:f[m],r=z(c[n],n),q=v(d,r),n=p(q,r),t=w(d,
-r),u=y(d,r),r=B(d,r),q=new e(n,q,t,u,r);a.push(q);b[n]=q}return{items:a,selectValueMap:b,getOptionFromViewValue:function(a){return b[C(a)]},getViewValueFromOption:function(a){return s?fa.copy(a.viewValue):a.viewValue}}}}}var c=X.createElement("option"),e=X.createElement("optgroup");return{restrict:"A",terminal:!0,require:["select","?ngModel"],link:{pre:function(a,b,c,d){d[0].registerOption=x},post:function(b,g,h,k){function l(a,b){a.element=b;b.disabled=a.disabled;a.label!==b.label&&(b.label=a.label,
-b.textContent=a.label);a.value!==b.value&&(b.value=a.selectValue)}function m(a,b,c,d){b&&F(b.nodeName)===c?c=b:(c=d.cloneNode(!1),b?a.insertBefore(c,b):a.appendChild(c));return c}function r(a){for(var b;a;)b=a.nextSibling,Xb(a),a=b}function q(a){var b=p&&p[0],c=z&&z[0];if(b||c)for(;a&&(a===b||a===c||8===a.nodeType||""===a.value);)a=a.nextSibling;return a}function s(){var a=D&&u.readValue();D=E.getOptions();var b={},d=g[0].firstChild;x&&g.prepend(p);d=q(d);D.items.forEach(function(a){var f,h;a.group?
-(f=b[a.group],f||(f=m(g[0],d,"optgroup",e),d=f.nextSibling,f.label=a.group,f=b[a.group]={groupElement:f,currentOptionElement:f.firstChild}),h=m(f.groupElement,f.currentOptionElement,"option",c),l(a,h),f.currentOptionElement=h.nextSibling):(h=m(g[0],d,"option",c),l(a,h),d=h.nextSibling)});Object.keys(b).forEach(function(a){r(b[a].currentOptionElement)});r(d);v.$render();if(!v.$isEmpty(a)){var f=u.readValue();(E.trackBy?ma(a,f):a===f)||(v.$setViewValue(f),v.$render())}}var v=k[1];if(v){var u=k[0];k=
-h.multiple;for(var p,C=0,w=g.children(),y=w.length;C<y;C++)if(""===w[C].value){p=w.eq(C);break}var x=!!p,z=B(c.cloneNode(!1));z.val("?");var D,E=d(h.ngOptions,g,b);k?(v.$isEmpty=function(a){return!a||0===a.length},u.writeValue=function(a){D.items.forEach(function(a){a.element.selected=!1});a&&a.forEach(function(a){(a=D.getOptionFromViewValue(a))&&!a.disabled&&(a.element.selected=!0)})},u.readValue=function(){var a=g.val()||[],b=[];n(a,function(a){(a=D.selectValueMap[a])&&!a.disabled&&b.push(D.getViewValueFromOption(a))});
-return b},E.trackBy&&b.$watchCollection(function(){if(I(v.$viewValue))return v.$viewValue.map(function(a){return E.getTrackByValue(a)})},function(){v.$render()})):(u.writeValue=function(a){var b=D.getOptionFromViewValue(a);b&&!b.disabled?g[0].value!==b.selectValue&&(z.remove(),x||p.remove(),g[0].value=b.selectValue,b.element.selected=!0,b.element.setAttribute("selected","selected")):null===a||x?(z.remove(),x||g.prepend(p),g.val(""),p.prop("selected",!0),p.attr("selected",!0)):(x||p.remove(),g.prepend(z),
-g.val("?"),z.prop("selected",!0),z.attr("selected",!0))},u.readValue=function(){var a=D.selectValueMap[g.val()];return a&&!a.disabled?(x||p.remove(),z.remove(),D.getViewValueFromOption(a)):null},E.trackBy&&b.$watch(function(){return E.getTrackByValue(v.$viewValue)},function(){v.$render()}));x?(p.remove(),a(p)(b),p.removeClass("ng-scope")):p=B(c.cloneNode(!1));s();b.$watchCollection(E.getWatchables,s)}}}}}],Be=["$locale","$interpolate","$log",function(a,b,d){var c=/{}/g,e=/^when(Minus)?(.+)$/;return{link:function(f,
-g,h){function k(a){g.text(a||"")}var l=h.count,m=h.$attr.when&&g.attr(h.$attr.when),r=h.offset||0,s=f.$eval(m)||{},u={},v=b.startSymbol(),y=b.endSymbol(),p=v+l+"-"+r+y,C=fa.noop,w;n(h,function(a,b){var c=e.exec(b);c&&(c=(c[1]?"-":"")+F(c[2]),s[c]=g.attr(h.$attr[b]))});n(s,function(a,d){u[d]=b(a.replace(c,p))});f.$watch(l,function(b){var c=parseFloat(b),e=isNaN(c);e||c in s||(c=a.pluralCat(c-r));c===w||e&&Q(w)&&isNaN(w)||(C(),e=u[c],q(e)?(null!=b&&d.debug("ngPluralize: no rule defined for '"+c+"' in "+
-m),C=x,k()):C=f.$watch(e,k),w=c)})}}}],Ce=["$parse","$animate",function(a,b){var d=G("ngRepeat"),c=function(a,b,c,d,k,l,m){a[c]=d;k&&(a[k]=l);a.$index=b;a.$first=0===b;a.$last=b===m-1;a.$middle=!(a.$first||a.$last);a.$odd=!(a.$even=0===(b&1))};return{restrict:"A",multiElement:!0,transclude:"element",priority:1E3,terminal:!0,$$tlb:!0,compile:function(e,f){var g=f.ngRepeat,h=X.createComment(" end ngRepeat: "+g+" "),k=g.match(/^\s*([\s\S]+?)\s+in\s+([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+track\s+by\s+([\s\S]+?))?\s*$/);
-if(!k)throw d("iexp",g);var l=k[1],m=k[2],r=k[3],q=k[4],k=l.match(/^(?:(\s*[\$\w]+)|\(\s*([\$\w]+)\s*,\s*([\$\w]+)\s*\))$/);if(!k)throw d("iidexp",l);var s=k[3]||k[1],v=k[2];if(r&&(!/^[$a-zA-Z_][$a-zA-Z0-9_]*$/.test(r)||/^(null|undefined|this|\$index|\$first|\$middle|\$last|\$even|\$odd|\$parent|\$root|\$id)$/.test(r)))throw d("badident",r);var x,p,y,w,z={$id:Ca};q?x=a(q):(y=function(a,b){return Ca(b)},w=function(a){return a});return function(a,e,f,k,l){x&&(p=function(b,c,d){v&&(z[v]=b);z[s]=c;z.$index=
-d;return x(a,z)});var q=$();a.$watchCollection(m,function(f){var k,m,t=e[0],x,z=$(),D,E,H,F,I,G,J;r&&(a[r]=f);if(za(f))I=f,m=p||y;else for(J in m=p||w,I=[],f)qa.call(f,J)&&"$"!==J.charAt(0)&&I.push(J);D=I.length;J=Array(D);for(k=0;k<D;k++)if(E=f===I?k:I[k],H=f[E],F=m(E,H,k),q[F])G=q[F],delete q[F],z[F]=G,J[k]=G;else{if(z[F])throw n(J,function(a){a&&a.scope&&(q[a.id]=a)}),d("dupes",g,F,H);J[k]={id:F,scope:u,clone:u};z[F]=!0}for(x in q){G=q[x];F=rb(G.clone);b.leave(F);if(F[0].parentNode)for(k=0,m=F.length;k<
-m;k++)F[k].$$NG_REMOVED=!0;G.scope.$destroy()}for(k=0;k<D;k++)if(E=f===I?k:I[k],H=f[E],G=J[k],G.scope){x=t;do x=x.nextSibling;while(x&&x.$$NG_REMOVED);G.clone[0]!=x&&b.move(rb(G.clone),null,B(t));t=G.clone[G.clone.length-1];c(G.scope,k,s,H,v,E,D)}else l(function(a,d){G.scope=d;var e=h.cloneNode(!1);a[a.length++]=e;b.enter(a,null,B(t));t=e;G.clone=a;z[G.id]=G;c(G.scope,k,s,H,v,E,D)});q=z})}}}}],De=["$animate",function(a){return{restrict:"A",multiElement:!0,link:function(b,d,c){b.$watch(c.ngShow,function(b){a[b?
-"removeClass":"addClass"](d,"ng-hide",{tempClasses:"ng-hide-animate"})})}}}],we=["$animate",function(a){return{restrict:"A",multiElement:!0,link:function(b,d,c){b.$watch(c.ngHide,function(b){a[b?"addClass":"removeClass"](d,"ng-hide",{tempClasses:"ng-hide-animate"})})}}}],Ee=La(function(a,b,d){a.$watch(d.ngStyle,function(a,d){d&&a!==d&&n(d,function(a,c){b.css(c,"")});a&&b.css(a)},!0)}),Fe=["$animate",function(a){return{require:"ngSwitch",controller:["$scope",function(){this.cases={}}],link:function(b,
-d,c,e){var f=[],g=[],h=[],k=[],l=function(a,b){return function(){a.splice(b,1)}};b.$watch(c.ngSwitch||c.on,function(b){var c,d;c=0;for(d=h.length;c<d;++c)a.cancel(h[c]);c=h.length=0;for(d=k.length;c<d;++c){var q=rb(g[c].clone);k[c].$destroy();(h[c]=a.leave(q)).then(l(h,c))}g.length=0;k.length=0;(f=e.cases["!"+b]||e.cases["?"])&&n(f,function(b){b.transclude(function(c,d){k.push(d);var e=b.element;c[c.length++]=X.createComment(" end ngSwitchWhen: ");g.push({clone:c});a.enter(c,e.parent(),e)})})})}}}],
-Ge=La({transclude:"element",priority:1200,require:"^ngSwitch",multiElement:!0,link:function(a,b,d,c,e){c.cases["!"+d.ngSwitchWhen]=c.cases["!"+d.ngSwitchWhen]||[];c.cases["!"+d.ngSwitchWhen].push({transclude:e,element:b})}}),He=La({transclude:"element",priority:1200,require:"^ngSwitch",multiElement:!0,link:function(a,b,d,c,e){c.cases["?"]=c.cases["?"]||[];c.cases["?"].push({transclude:e,element:b})}}),Je=La({restrict:"EAC",link:function(a,b,d,c,e){if(!e)throw G("ngTransclude")("orphan",ua(b));e(function(a){b.empty();
-b.append(a)})}}),je=["$templateCache",function(a){return{restrict:"E",terminal:!0,compile:function(b,d){"text/ng-template"==d.type&&a.put(d.id,b[0].text)}}}],Cg={$setViewValue:x,$render:x},Dg=["$element","$scope","$attrs",function(a,b,d){var c=this,e=new Sa;c.ngModelCtrl=Cg;c.unknownOption=B(X.createElement("option"));c.renderUnknownOption=function(b){b="? "+Ca(b)+" ?";c.unknownOption.val(b);a.prepend(c.unknownOption);a.val(b)};b.$on("$destroy",function(){c.renderUnknownOption=x});c.removeUnknownOption=
-function(){c.unknownOption.parent()&&c.unknownOption.remove()};c.readValue=function(){c.removeUnknownOption();return a.val()};c.writeValue=function(b){c.hasOption(b)?(c.removeUnknownOption(),a.val(b),""===b&&c.emptyOption.prop("selected",!0)):null==b&&c.emptyOption?(c.removeUnknownOption(),a.val("")):c.renderUnknownOption(b)};c.addOption=function(a,b){Ra(a,'"option value"');""===a&&(c.emptyOption=b);var d=e.get(a)||0;e.put(a,d+1);c.ngModelCtrl.$render();b[0].hasAttribute("selected")&&(b[0].selected=
-!0)};c.removeOption=function(a){var b=e.get(a);b&&(1===b?(e.remove(a),""===a&&(c.emptyOption=u)):e.put(a,b-1))};c.hasOption=function(a){return!!e.get(a)};c.registerOption=function(a,b,d,e,l){if(e){var m;d.$observe("value",function(a){y(m)&&c.removeOption(m);m=a;c.addOption(a,b)})}else l?a.$watch(l,function(a,e){d.$set("value",a);e!==a&&c.removeOption(e);c.addOption(a,b)}):c.addOption(d.value,b);b.on("$destroy",function(){c.removeOption(d.value);c.ngModelCtrl.$render()})}}],ke=function(){return{restrict:"E",
-require:["select","?ngModel"],controller:Dg,priority:1,link:{pre:function(a,b,d,c){var e=c[1];if(e){var f=c[0];f.ngModelCtrl=e;e.$render=function(){f.writeValue(e.$viewValue)};b.on("change",function(){a.$apply(function(){e.$setViewValue(f.readValue())})});if(d.multiple){f.readValue=function(){var a=[];n(b.find("option"),function(b){b.selected&&a.push(b.value)});return a};f.writeValue=function(a){var c=new Sa(a);n(b.find("option"),function(a){a.selected=y(c.get(a.value))})};var g,h=NaN;a.$watch(function(){h!==
-e.$viewValue||ma(g,e.$viewValue)||(g=ia(e.$viewValue),e.$render());h=e.$viewValue});e.$isEmpty=function(a){return!a||0===a.length}}}}}}},me=["$interpolate",function(a){return{restrict:"E",priority:100,compile:function(b,d){if(y(d.value))var c=a(d.value,!0);else{var e=a(b.text(),!0);e||d.$set("value",b.text())}return function(a,b,d){var k=b.parent();(k=k.data("$selectController")||k.parent().data("$selectController"))&&k.registerOption(a,b,d,c,e)}}}}],le=na({restrict:"E",terminal:!1}),Fc=function(){return{restrict:"A",
-require:"?ngModel",link:function(a,b,d,c){c&&(d.required=!0,c.$validators.required=function(a,b){return!d.required||!c.$isEmpty(b)},d.$observe("required",function(){c.$validate()}))}}},Ec=function(){return{restrict:"A",require:"?ngModel",link:function(a,b,d,c){if(c){var e,f=d.ngPattern||d.pattern;d.$observe("pattern",function(a){E(a)&&0<a.length&&(a=new RegExp("^"+a+"$"));if(a&&!a.test)throw G("ngPattern")("noregexp",f,a,ua(b));e=a||u;c.$validate()});c.$validators.pattern=function(a,b){return c.$isEmpty(b)||
-q(e)||e.test(b)}}}}},Hc=function(){return{restrict:"A",require:"?ngModel",link:function(a,b,d,c){if(c){var e=-1;d.$observe("maxlength",function(a){a=ea(a);e=isNaN(a)?-1:a;c.$validate()});c.$validators.maxlength=function(a,b){return 0>e||c.$isEmpty(b)||b.length<=e}}}}},Gc=function(){return{restrict:"A",require:"?ngModel",link:function(a,b,d,c){if(c){var e=0;d.$observe("minlength",function(a){e=ea(a)||0;c.$validate()});c.$validators.minlength=function(a,b){return c.$isEmpty(b)||b.length>=e}}}}};S.angular.bootstrap?
-console.log("WARNING: Tried to load angular more than once."):(ce(),ee(fa),fa.module("ngLocale",[],["$provide",function(a){function b(a){a+="";var b=a.indexOf(".");return-1==b?0:a.length-b-1}a.value("$locale",{DATETIME_FORMATS:{AMPMS:["AM","PM"],DAY:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),ERANAMES:["Before Christ","Anno Domini"],ERAS:["BC","AD"],FIRSTDAYOFWEEK:6,MONTH:"January February March April May June July August September October November December".split(" "),SHORTDAY:"Sun Mon Tue Wed Thu Fri Sat".split(" "),
-SHORTMONTH:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),WEEKENDRANGE:[5,6],fullDate:"EEEE, MMMM d, y",longDate:"MMMM d, y",medium:"MMM d, y h:mm:ss a",mediumDate:"MMM d, y",mediumTime:"h:mm:ss a","short":"M/d/yy h:mm a",shortDate:"M/d/yy",shortTime:"h:mm a"},NUMBER_FORMATS:{CURRENCY_SYM:"$",DECIMAL_SEP:".",GROUP_SEP:",",PATTERNS:[{gSize:3,lgSize:3,maxFrac:3,minFrac:0,minInt:1,negPre:"-",negSuf:"",posPre:"",posSuf:""},{gSize:3,lgSize:3,maxFrac:2,minFrac:2,minInt:1,negPre:"-\u00a4",
-negSuf:"",posPre:"\u00a4",posSuf:""}]},id:"en-us",pluralCat:function(a,c){var e=a|0,f=c;u===f&&(f=Math.min(b(a),3));Math.pow(10,f);return 1==e&&0==f?"one":"other"}})}]),B(X).ready(function(){Zd(X,yc)}))})(window,document);!window.angular.$$csp().noInlineStyle&&window.angular.element(document.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:not(.ng-hide-animate){display:none !important;}ng\\:form{display:block;}.ng-animate-shim{visibility:hidden;}.ng-anchor{position:absolute;}</style>');
-//# sourceMappingURL=angular.min.js.map
diff --git a/applications/auto-scale/gui/src/vendor/angular/angular.min.js.gzip b/applications/auto-scale/gui/src/vendor/angular/angular.min.js.gzip
deleted file mode 100644
index db839d6..0000000
--- a/applications/auto-scale/gui/src/vendor/angular/angular.min.js.gzip
+++ /dev/null
Binary files differ
diff --git a/applications/auto-scale/gui/src/vendor/angular/angular.min.js.map b/applications/auto-scale/gui/src/vendor/angular/angular.min.js.map
deleted file mode 100644
index fbb9d46..0000000
--- a/applications/auto-scale/gui/src/vendor/angular/angular.min.js.map
+++ /dev/null
@@ -1,8 +0,0 @@
-{
-"version":3,
-"file":"angular.min.js",
-"lineCount":294,
-"mappings":"A;;;;;aAKC,SAAQ,CAACA,CAAD,CAASC,CAAT,CAAmBC,CAAnB,CAA8B,CAgCvCC,QAAAA,EAAAA,CAAAA,CAAAA,CAAAA,CAAAA,MAAAA,SAAAA,EAAAA,CAAAA,IAAAA,EAAAA,SAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,EAAAA,CAAAA,GAAAA,EAAAA,CAAAA,CAAAA,CAAAA,CAAAA,GAAAA,CAAAA,EAAAA,EAAAA,CAAAA,CAAAA,sCAAAA,EAAAA,CAAAA,CAAAA,CAAAA,CAAAA,GAAAA,CAAAA,EAAAA,EAAAA,CAAAA,KAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,SAAAA,OAAAA,CAAAA,CAAAA,EAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,EAAAA,CAAAA,EAAAA,CAAAA,CAAAA,GAAAA,CAAAA,GAAAA,EAAAA,GAAAA,EAAAA,CAAAA,CAAAA,CAAAA,EAAAA,GAAAA,KAAAA,EAAAA,kBAAAA,CAAAA,CAAAA,EAAAA,CAAAA,SAAAA,CAAAA,CAAAA,CAAAA,EAAAA,CAAAA,UAAAA,EAAAA,MAAAA,EAAAA,CAAAA,CAAAA,SAAAA,EAAAA,QAAAA,CAAAA,aAAAA,CAAAA,EAAAA,CAAAA,CAAAA,WAAAA,EAAAA,MAAAA,EAAAA,CAAAA,WAAAA,CAAAA,QAAAA,EAAAA,MAAAA,EAAAA,CAAAA,IAAAA,UAAAA,CAAAA,CAAA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s6C,KA2HsD,CA3HFC,OA2HpD,CAxGhB,CAA1B,CApB+D,CAAhC,CAA/B,CAgIE,CAAAz8E,CAAA,CAAOR,CAAP,CAAA44D,MAAA,CAAuB,QAAQ,EAAG,CAChC9tD,EAAA,CAAY9K,CAAZ,CAAsB+K,EAAtB,CADgC,CAAlC,CA5IF,CAls4BuC,CAAtC,CAAD,CAk14BGhL,MAl14BH,CAk14BWC,QAl14BX,CAo14BCs3D,EAAAv3D,MAAA4M,QAAAuwE,MAAA,EAAA5lB,cAAD,EAAyCv3D,MAAA4M,QAAArH,QAAA,CAAuBtF,QAAAm9E,KAAvB,CAAA7iB,QAAA,CAA8C,gRAA9C;",
-"sources":["angular.js"],
-"names":["window","document","undefined","minErr","isArrayLike","obj","isWindow","isArray","isString","jqLite","length","Object","isNumber","item","forEach","iterator","context","key","isFunction","hasOwnProperty","call","isPrimitive","isBlankObject","forEachSorted","keys","sort","i","reverseParams","iteratorFn","value","nextUid","uid","baseExtend","dst","objs","deep","h","$$hashKey","ii","isObject","j","jj","src","isDate","Date","valueOf","isRegExp","RegExp","nodeName","cloneNode","isElement","clone","extend","slice","arguments","merge","toInt","str","parseInt","inherit","parent","extra","create","noop","identity","$","valueFn","hasCustomToString","toString","isUndefined","isDefined","getPrototypeOf","isScope","$evalAsync","$watch","isBoolean","isTypedArray","TYPED_ARRAY_REGEXP","test","node","prop","attr","find","makeMap","items","split","nodeName_","element","lowercase","arrayRemove","array","index","indexOf","splice","copy","source","destination","copyRecurse","push","copyElement","stackSource","stackDest","ngMinErr","needsRecurse","constructor","getTime","match","lastIndex","shallowCopy","charAt","equals","o1","o2","t1","t2","keySet","createMap","concat","array1","array2","bind","self","fn","curryArgs","startIndex","apply","toJsonReplacer","val","toJson","pretty","JSON","stringify","fromJson","json","parse","timezoneToOffset","timezone","fallback","requestedTimezoneOffset","isNaN","convertTimezoneToLocal","date","reverse","timezoneOffset","getTimezoneOffset","setMinutes","getMinutes","minutes","startingTag","empty","e","elemHtml","append","html","nodeType","NODE_TYPE_TEXT","replace","tryDecodeURIComponent","decodeURIComponent","parseKeyValue","keyValue","splitPoint","substring","toKeyValue","parts","arrayValue","encodeUriQuery","join","encodeUriSegment","pctEncodeSpaces","encodeURIComponent","getNgAttribute","ngAttr","ngAttrPrefixes","getAttribute","angularInit","bootstrap","appElement","module","config","prefix","name","hasAttribute","candidate","querySelector","strictDi","modules","defaultConfig","doBootstrap","injector","tag","unshift","$provide","debugInfoEnabled","$compileProvider","createInjector","invoke","bootstrapApply","scope","compile","$apply","data","NG_ENABLE_DEBUG_INFO","NG_DEFER_BOOTSTRAP","angular","resumeBootstrap","angular.resumeBootstrap","extraModules","resumeDeferredBootstrap","reloadWithDebugInfo","location","reload","getTestability","rootElement","get","snake_case","separator","SNAKE_CASE_REGEXP","letter","pos","toLowerCase","bindJQuery","originalCleanData","bindJQueryFired","jqName","jq","jQuery","on","JQLitePrototype","isolateScope","controller","inheritedData","cleanData","jQuery.cleanData","elems","events","skipDestroyOnNextJQueryCleanData","elem","_data","$destroy","triggerHandler","JQLite","assertArg","arg","reason","assertArgFn","acceptArrayAnnotation","assertNotHasOwnProperty","getter","path","bindFnToScope","lastInstance","len","getBlockNodes","nodes","endNode","blockNodes","nextSibling","setupModuleLoader","ensure","factory","$injectorMinErr","$$minErr","requires","configFn","invokeLater","provider","method","insertMethod","queue","invokeQueue","moduleInstance","invokeLaterAndSetModuleName","recipeName","factoryFunction","$$moduleName","configBlocks","runBlocks","_invokeQueue","_configBlocks","_runBlocks","service","constant","decorator","animation","filter","directive","run","block","publishExternalAPI","version","uppercase","counter","csp","angularModule","ngModule","$$sanitizeUri","$$SanitizeUriProvider","$CompileProvider","a","htmlAnchorDirective","input","inputDirective","textarea","form","formDirective","script","scriptDirective","select","selectDirective","style","styleDirective","option","optionDirective","ngBind","ngBindDirective","ngBindHtml","ngBindHtmlDirective","ngBindTemplate","ngBindTemplateDirective","ngClass","ngClassDirective","ngClassEven","ngClassEvenDirective","ngClassOdd","ngClassOddDirective","ngCloak","ngCloakDirective","ngController","ngControllerDirective","ngForm","ngFormDirective","ngHide","ngHideDirective","ngIf","ngIfDirective","ngInclude","ngIncludeDirective","ngInit","ngInitDirective","ngNonBindable","ngNonBindableDirective","ngPluralize","ngPluralizeDirective","ngRepeat","ngRepeatDirective","ngShow","ngShowDirective","ngStyle","ngStyleDirective","ngSwitch","ngSwitchDirective","ngSwitchWhen","ngSwitchWhenDirective","ngSwitchDefault","ngSwitchDefaultDirective","ngOptions","ngOptionsDirective","ngTransclude","ngTranscludeDirective","ngModel","ngModelDirective","ngList","ngListDirective","ngChange","ngChangeDirective","pattern","patternDirective","ngPattern","required","requiredDirective","ngRequired","minlength","minlengthDirective","ngMinlength","maxlength","maxlengthDirective","ngMaxlength","ngValue","ngValueDirective","ngModelOptions","ngModelOptionsDirective","ngIncludeFillContentDirective","ngAttributeAliasDirectives","ngEventDirectives","$anchorScroll","$AnchorScrollProvider","$animate","$AnimateProvider","$animateCss","$CoreAnimateCssProvider","$$animateQueue","$$CoreAnimateQueueProvider","$$AnimateRunner","$$CoreAnimateRunnerProvider","$browser","$BrowserProvider","$cacheFactory","$CacheFactoryProvider","$controller","$ControllerProvider","$document","$DocumentProvider","$exceptionHandler","$ExceptionHandlerProvider","$filter","$FilterProvider","$$forceReflow","$$ForceReflowProvider","$interpolate","$InterpolateProvider","$interval","$IntervalProvider","$http","$HttpProvider","$httpParamSerializer","$HttpParamSerializerProvider","$httpParamSerializerJQLike","$HttpParamSerializerJQLikeProvider","$httpBackend","$HttpBackendProvider","$xhrFactory","$xhrFactoryProvider","$location","$LocationProvider","$log","$LogProvider","$parse","$ParseProvider","$rootScope","$RootScopeProvider","$q","$QProvider","$$q","$$QProvider","$sce","$SceProvider","$sceDelegate","$SceDelegateProvider","$sniffer","$SnifferProvider","$templateCache","$TemplateCacheProvider","$templateRequest","$TemplateRequestProvider","$$testability","$$TestabilityProvider","$timeout","$TimeoutProvider","$window","$WindowProvider","$$rAF","$$RAFProvider","$$jqLite","$$jqLiteProvider","$$HashMap","$$HashMapProvider","$$cookieReader","$$CookieReaderProvider","camelCase","SPECIAL_CHARS_REGEXP","_","offset","toUpperCase","MOZ_HACK_REGEXP","jqLiteAcceptsData","NODE_TYPE_ELEMENT","NODE_TYPE_DOCUMENT","jqLiteBuildFragment","tmp","fragment","createDocumentFragment","HTML_REGEXP","appendChild","createElement","TAG_NAME_REGEXP","exec","wrap","wrapMap","_default","innerHTML","XHTML_TAG_REGEXP","lastChild","childNodes","firstChild","textContent","createTextNode","argIsString","trim","jqLiteMinErr","parsed","SINGLE_TAG_REGEXP","jqLiteAddNodes","jqLiteClone","jqLiteDealoc","onlyDescendants","jqLiteRemoveData","querySelectorAll","descendants","l","jqLiteOff","type","unsupported","expandoStore","jqLiteExpandoStore","handle","removeHandler","listenerFns","removeEventListener","MOUSE_EVENT_MAP","expandoId","ng339","jqCache","createIfNecessary","jqId","jqLiteData","isSimpleSetter","isSimpleGetter","massGetter","jqLiteHasClass","selector","jqLiteRemoveClass","cssClasses","setAttribute","cssClass","jqLiteAddClass","existingClasses","root","elements","jqLiteController","jqLiteInheritedData","documentElement","names","parentNode","NODE_TYPE_DOCUMENT_FRAGMENT","host","jqLiteEmpty","removeChild","jqLiteRemove","keepData","jqLiteDocumentLoaded","action","win","readyState","setTimeout","getBooleanAttrName","booleanAttr","BOOLEAN_ATTR","BOOLEAN_ELEMENTS","createEventHandler","eventHandler","event","isDefaultPrevented","event.isDefaultPrevented","defaultPrevented","eventFns","eventFnsLength","immediatePropagationStopped","originalStopImmediatePropagation","stopImmediatePropagation","event.stopImmediatePropagation","stopPropagation","isImmediatePropagationStopped","event.isImmediatePropagationStopped","handlerWrapper","specialHandlerWrapper","defaultHandlerWrapper","handler","specialMouseHandlerWrapper","target","related","relatedTarget","jqLiteContains","$get","this.$get","hasClass","classes","addClass","removeClass","hashKey","nextUidFn","objType","HashMap","isolatedUid","this.nextUid","put","anonFn","args","fnText","STRIP_COMMENTS","FN_ARGS","modulesToLoad","supportObject","delegate","provider_","providerInjector","instantiate","providerCache","providerSuffix","enforceReturnValue","enforcedReturnValue","result","instanceInjector","factoryFn","enforce","loadModules","moduleFn","runInvokeQueue","invokeArgs","loadedModules","message","stack","createInternalInjector","cache","getService","serviceName","caller","INSTANTIATING","err","shift","locals","$inject","$$annotate","Type","instance","prototype","returnedValue","annotate","has","$injector","instanceCache","decorFn","origProvider","orig$get","origProvider.$get","origInstance","$delegate","autoScrollingEnabled","disableAutoScrolling","this.disableAutoScrolling","getFirstAnchor","list","Array","some","scrollTo","scrollIntoView","scroll","yOffset","getComputedStyle","position","getBoundingClientRect","bottom","elemTop","top","scrollBy","hash","elm","getElementById","getElementsByName","autoScrollWatch","autoScrollWatchAction","newVal","oldVal","mergeClasses","b","splitClasses","klass","prepareAnimateOptions","options","Browser","completeOutstandingRequest","outstandingRequestCount","outstandingRequestCallbacks","pop","error","cacheStateAndFireUrlChange","pendingLocation","cacheState","fireUrlChange","history","state","cachedState","lastCachedState","lastBrowserUrl","url","lastHistoryState","urlChangeListeners","listener","clearTimeout","pendingDeferIds","isMock","$$completeOutstandingRequest","$$incOutstandingRequestCount","self.$$incOutstandingRequestCount","notifyWhenNoOutstandingRequests","self.notifyWhenNoOutstandingRequests","callback","href","baseElement","self.url","sameState","sameBase","stripHash","substr","self.state","urlChangeInit","onUrlChange","self.onUrlChange","$$applicationDestroyed","self.$$applicationDestroyed","off","$$checkUrlChange","baseHref","self.baseHref","defer","self.defer","delay","timeoutId","cancel","self.defer.cancel","deferId","cacheFactory","cacheId","refresh","entry","freshEnd","staleEnd","n","link","p","nextEntry","prevEntry","caches","size","stats","id","capacity","Number","MAX_VALUE","lruHash","lruEntry","remove","removeAll","destroy","info","cacheFactory.info","cacheFactory.get","$$sanitizeUriProvider","parseIsolateBindings","directiveName","isController","LOCAL_REGEXP","bindings","definition","scopeName","$compileMinErr","mode","collection","optional","attrName","assertValidDirectiveName","hasDirectives","COMMENT_DIRECTIVE_REGEXP","CLASS_DIRECTIVE_REGEXP","ALL_OR_NOTHING_ATTRS","REQUIRE_PREFIX_REGEXP","EVENT_HANDLER_ATTR_REGEXP","this.directive","registerDirective","directiveFactory","Suffix","directives","priority","require","restrict","bindToController","controllerAs","CNTRL_REG","$$bindings","$$isolateBindings","aHrefSanitizationWhitelist","this.aHrefSanitizationWhitelist","regexp","imgSrcSanitizationWhitelist","this.imgSrcSanitizationWhitelist","this.debugInfoEnabled","enabled","safeAddClass","$element","className","$compileNodes","transcludeFn","maxPriority","ignoreDirective","previousCompileContext","nodeValue","compositeLinkFn","compileNodes","$$addScopeClass","namespace","publicLinkFn","cloneConnectFn","needsNewScope","$parent","$new","parentBoundTranscludeFn","transcludeControllers","futureParentElement","$$boundTransclude","$linkNode","wrapTemplate","controllerName","$$addScopeInfo","nodeList","$rootElement","childLinkFn","childScope","childBoundTranscludeFn","stableNodeList","nodeLinkFnFound","linkFns","idx","nodeLinkFn","transcludeOnThisElement","createBoundTranscludeFn","transclude","templateOnThisElement","attrs","linkFnFound","Attributes","collectDirectives","applyDirectivesToNode","$$element","terminal","previousBoundTranscludeFn","boundTranscludeFn","transcludedScope","cloneFn","controllers","containingScope","$$transcluded","attrsMap","$attr","addDirective","directiveNormalize","isNgAttr","nAttrs","attributes","attrStartName","attrEndName","ngAttrName","NG_ATTR_BINDING","PREFIX_REGEXP","multiElementMatch","MULTI_ELEMENT_DIR_RE","directiveIsMultiElement","nName","addAttrInterpolateDirective","animVal","msie","addTextInterpolateDirective","NODE_TYPE_COMMENT","byPriority","groupScan","attrStart","attrEnd","depth","groupElementsLinkFnWrapper","linkFn","compileNode","templateAttrs","jqCollection","originalReplaceDirective","preLinkFns","postLinkFns","addLinkFns","pre","post","newIsolateScopeDirective","$$isolateScope","cloneAndAnnotateFn","getControllers","elementControllers","inheritType","dataName","setupControllers","controllerDirectives","controllerKey","$scope","$attrs","$transclude","controllerInstance","hasElementTranscludeDirective","linkNode","controllersBoundTransclude","cloneAttachFn","scopeToChild","controllerScope","removeScopeBindingWatches","newScopeDirective","templateDirective","$$originalDirective","initializeDirectiveBindings","$on","controllerDirective","identifier","removeControllerBindingWatches","controllerResult","invokeLinkFn","template","templateUrl","terminalPriority","nonTlbTranscludeDirective","hasTranscludeDirective","hasTemplate","$compileNode","$template","childTranscludeFn","$$start","$$end","directiveValue","assertNoDuplicate","$$tlb","createComment","replaceWith","replaceDirective","contents","$$newScope","denormalizeTemplate","removeComments","templateNamespace","newTemplateAttrs","templateDirectives","unprocessedDirectives","markDirectiveScope","mergeTemplateAttributes","compileTemplateUrl","Math","max","newScope","tDirectives","startAttrName","endAttrName","multiElement","srcAttr","dstAttr","$set","tAttrs","linkQueue","afterTemplateNodeLinkFn","afterTemplateChildLinkFn","beforeTemplateCompileNode","origAsyncDirective","derivedSyncDirective","then","content","tempTemplateAttrs","beforeTemplateLinkNode","linkRootElement","$$destroyed","oldClasses","delayedNodeLinkFn","ignoreChildLinkFn","diff","what","previousDirective","wrapModuleNameIfDefined","moduleName","text","interpolateFn","textInterpolateCompileFn","templateNode","templateNodeParent","hasCompileParent","$$addBindingClass","textInterpolateLinkFn","$$addBindingInfo","expressions","interpolateFnWatchAction","wrapper","getTrustedContext","attrNormalizedName","HTML","RESOURCE_URL","allOrNothing","trustedContext","attrInterpolatePreLinkFn","$$observers","newValue","$$inter","$$scope","oldValue","$updateClass","elementsToRemove","newNode","firstElementToRemove","removeCount","j2","replaceChild","hasData","expando","k","kk","annotation","removeWatchCollection","lastValue","parentGet","parentSet","compare","$observe","literal","assign","parentValueWatch","parentValue","$stateful","removeWatch","$watchCollection","removeWatches","attributesToCopy","$normalize","$addClass","classVal","$removeClass","newClasses","toAdd","tokenDifference","toRemove","writeAttr","booleanKey","aliasedKey","ALIASED_ATTR","observer","trimmedSrcset","srcPattern","rawUris","nbrUrisWith2parts","floor","innerIdx","lastTuple","removeAttr","listeners","startSymbol","endSymbol","binding","isolated","noTemplate","str1","str2","values","tokens1","tokens2","token","jqNodes","globals","register","this.register","allowGlobals","this.allowGlobals","addIdentifier","expression","later","ident","$controllerMinErr","controllerPrototype","exception","cause","serializeValue","v","toISOString","ngParamSerializer","params","jQueryLikeParamSerializer","serialize","toSerialize","topLevel","defaultHttpResponseTransform","headers","tempData","JSON_PROTECTION_PREFIX","contentType","jsonStart","JSON_START","JSON_ENDS","parseHeaders","line","headerVal","headerKey","headersGetter","headersObj","transformData","status","fns","defaults","transformResponse","transformRequest","d","common","CONTENT_TYPE_APPLICATION_JSON","patch","xsrfCookieName","xsrfHeaderName","paramSerializer","useApplyAsync","this.useApplyAsync","useLegacyPromise","useLegacyPromiseExtensions","this.useLegacyPromiseExtensions","interceptorFactories","interceptors","requestConfig","response","resp","reject","executeHeaderFns","headerContent","processedHeaders","headerFn","header","mergeHeaders","defHeaders","reqHeaders","defHeaderName","lowercaseDefHeaderName","reqHeaderName","chain","serverRequest","reqData","withCredentials","sendReq","promise","when","reversedInterceptors","interceptor","request","requestError","responseError","thenFn","rejectFn","success","promise.success","promise.error","$httpMinErrLegacyFn","done","headersString","statusText","resolveHttpPromise","resolvePromise","$applyAsync","$$phase","deferred","resolve","resolvePromiseWithResult","removePendingReq","pendingRequests","cachedResp","buildUrl","defaultCache","xsrfValue","urlIsSameOrigin","timeout","responseType","serializedParams","interceptorFactory","createShortMethods","createShortMethodsWithData","createXhr","XMLHttpRequest","createHttpBackend","callbacks","$browserDefer","rawDocument","jsonpReq","callbackId","async","body","called","addEventListener","timeoutRequest","jsonpDone","xhr","abort","completeRequest","open","setRequestHeader","onload","xhr.onload","responseText","urlResolve","protocol","getAllResponseHeaders","onerror","onabort","send","this.startSymbol","this.endSymbol","escape","ch","unescapeText","escapedStartRegexp","escapedEndRegexp","mustHaveExpression","parseStringifyInterceptor","getTrusted","$interpolateMinErr","interr","endIndex","parseFns","textLength","expressionPositions","startSymbolLength","exp","endSymbolLength","throwNoconcat","compute","interpolationFn","$$watchDelegate","$watchGroup","interpolateFnWatcher","oldValues","currValue","$interpolate.startSymbol","$interpolate.endSymbol","interval","count","invokeApply","hasParams","setInterval","clearInterval","iteration","skipApply","$$intervalId","tick","notify","intervals","interval.cancel","encodePath","segments","parseAbsoluteUrl","absoluteUrl","locationObj","parsedUrl","$$protocol","$$host","hostname","$$port","port","DEFAULT_PORTS","parseAppUrl","relativeUrl","prefixed","$$path","pathname","$$search","search","$$hash","beginsWith","begin","whole","trimEmptyHash","LocationHtml5Url","appBase","appBaseNoFile","basePrefix","$$html5","$$parse","this.$$parse","pathUrl","$locationMinErr","$$compose","this.$$compose","$$url","$$absUrl","$$parseLinkUrl","this.$$parseLinkUrl","relHref","appUrl","prevAppUrl","rewrittenUrl","LocationHashbangUrl","hashPrefix","withoutBaseUrl","withoutHashUrl","windowsFilePathExp","base","firstPathSegmentMatch","LocationHashbangInHtml5Url","locationGetter","property","locationGetterSetter","preprocess","html5Mode","requireBase","rewriteLinks","this.hashPrefix","this.html5Mode","setBrowserUrlWithFallback","oldUrl","oldState","$$state","afterLocationChange","$broadcast","absUrl","LocationMode","initialUrl","lastIndexOf","IGNORE_URI_REGEXP","ctrlKey","metaKey","shiftKey","which","button","absHref","preventDefault","initializing","newUrl","newState","$digest","$locationWatch","currentReplace","$$replace","urlOrStateChanged","debug","debugEnabled","this.debugEnabled","flag","formatError","Error","sourceURL","consoleLog","console","logFn","log","hasApply","arg1","arg2","warn","ensureSafeMemberName","fullExpression","$parseMinErr","getStringValue","ensureSafeObject","children","ensureSafeFunction","CALL","APPLY","BIND","ensureSafeAssignContext","Function","ifDefined","plusFn","r","findConstantAndWatchExpressions","ast","allConstants","argsToWatch","AST","Program","expr","Literal","toWatch","UnaryExpression","argument","BinaryExpression","left","right","LogicalExpression","ConditionalExpression","alternate","consequent","Identifier","MemberExpression","object","computed","CallExpression","callee","AssignmentExpression","ArrayExpression","ObjectExpression","properties","ThisExpression","getInputs","lastExpression","isAssignable","assignableAST","NGValueParameter","operator","isLiteral","ASTCompiler","astBuilder","ASTInterpreter","isPossiblyDangerousMemberName","getValueOf","objectValueOf","cacheDefault","cacheExpensive","expressionInputDirtyCheck","oldValueOfValue","inputsWatchDelegate","objectEquality","parsedExpression","prettyPrintExpression","inputExpressions","inputs","lastResult","oldInputValueOf","expressionInputWatch","newInputValue","oldInputValueOfValues","oldInputValues","expressionInputsWatch","changed","oneTimeWatchDelegate","unwatch","oneTimeWatch","oneTimeListener","old","$$postDigest","oneTimeLiteralWatchDelegate","isAllDefined","allDefined","constantWatchDelegate","constantWatch","constantListener","addInterceptor","interceptorFn","watchDelegate","useInputs","regularInterceptedExpression","oneTimeInterceptedExpression","noUnsafeEval","$parseOptions","expensiveChecks","$parseOptionsExpensive","oneTime","cacheKey","parseOptions","lexer","Lexer","parser","Parser","qFactory","nextTick","exceptionHandler","callOnce","resolveFn","Promise","simpleBind","scheduleProcessQueue","processScheduled","pending","Deferred","$qMinErr","TypeError","onFulfilled","onRejected","progressBack","catch","finally","handleCallback","$$reject","$$resolve","progress","makePromise","resolved","isResolved","callbackOutput","errback","$Q","Q","resolver","all","promises","results","requestAnimationFrame","webkitRequestAnimationFrame","cancelAnimationFrame","webkitCancelAnimationFrame","webkitCancelRequestAnimationFrame","rafSupported","raf","timer","supported","createChildScopeClass","ChildScope","$$watchers","$$nextSibling","$$childHead","$$childTail","$$listeners","$$listenerCount","$$watchersCount","$id","$$ChildScope","TTL","$rootScopeMinErr","lastDirtyWatch","applyAsyncId","digestTtl","this.digestTtl","destroyChildScope","$event","currentScope","cleanUpScope","$$prevSibling","$root","Scope","beginPhase","phase","incrementWatchersCount","current","decrementListenerCount","initWatchVal","flushApplyAsync","applyAsyncQueue","scheduleApplyAsync","isolate","child","watchExp","watcher","last","eq","deregisterWatch","watchExpressions","watchGroupAction","changeReactionScheduled","firstRun","newValues","deregisterFns","shouldCall","deregisterWatchGroup","unwatchFn","watchGroupSubAction","$watchCollectionInterceptor","_value","bothNaN","newItem","oldItem","internalArray","oldLength","changeDetected","newLength","internalObject","veryOldValue","trackVeryOldValue","changeDetector","initRun","$watchCollectionAction","watch","watchers","dirty","ttl","watchLog","logIdx","asyncTask","asyncQueue","$eval","msg","next","postDigestQueue","eventName","this.$watchGroup","$applyAsyncExpression","namedListeners","indexOfListener","$emit","targetScope","listenerArgs","$$asyncQueue","$$postDigestQueue","$$applyAsyncQueue","sanitizeUri","uri","isImage","regex","normalizedVal","adjustMatcher","matcher","$sceMinErr","escapeForRegexp","adjustMatchers","matchers","adjustedMatchers","SCE_CONTEXTS","resourceUrlWhitelist","resourceUrlBlacklist","this.resourceUrlWhitelist","this.resourceUrlBlacklist","matchUrl","generateHolderType","Base","holderType","trustedValue","$$unwrapTrustedValue","this.$$unwrapTrustedValue","holderType.prototype.valueOf","holderType.prototype.toString","htmlSanitizer","trustedValueHolderBase","byType","CSS","URL","JS","trustAs","Constructor","maybeTrusted","allowed","this.enabled","sce","isEnabled","sce.isEnabled","sce.getTrusted","parseAs","sce.parseAs","enumValue","lName","eventSupport","android","userAgent","navigator","boxee","vendorPrefix","vendorRegex","bodyStyle","transitions","animations","webkitTransition","webkitAnimation","pushState","hasEvent","divElm","handleRequestFn","tpl","ignoreRequestError","totalPendingRequests","getTrustedResourceUrl","transformer","httpOptions","handleError","testability","testability.findBindings","opt_exactMatch","getElementsByClassName","matches","dataBinding","bindingName","testability.findModels","prefixes","attributeEquals","testability.getLocation","testability.setLocation","testability.whenStable","deferreds","$$timeoutId","timeout.cancel","urlParsingNode","requestUrl","originUrl","$$CookieReader","safeDecodeURIComponent","lastCookies","lastCookieString","cookieArray","cookie","currentCookieString","filters","suffix","currencyFilter","dateFilter","filterFilter","jsonFilter","limitToFilter","lowercaseFilter","numberFilter","orderByFilter","uppercaseFilter","comparator","matchAgainstAnyProp","getTypeForFilter","expressionType","predicateFn","createPredicateFn","shouldMatchPrimitives","actual","expected","deepCompare","dontMatchWholeObject","actualType","expectedType","expectedVal","matchAnyProperty","actualVal","$locale","formats","NUMBER_FORMATS","amount","currencySymbol","fractionSize","CURRENCY_SYM","PATTERNS","maxFrac","formatNumber","GROUP_SEP","DECIMAL_SEP","number","groupSep","decimalSep","isNegative","abs","isInfinity","Infinity","isFinite","numStr","formatedText","hasExponent","toFixed","parseFloat","fractionLen","min","minFrac","round","fraction","lgroup","lgSize","group","gSize","negPre","posPre","negSuf","posSuf","padNumber","num","digits","neg","dateGetter","dateStrGetter","shortForm","getFirstThursdayOfYear","year","dayOfWeekOnFirst","getDay","weekGetter","firstThurs","getFullYear","thisThurs","getMonth","getDate","eraGetter","ERAS","jsonStringToDate","string","R_ISO8601_STR","tzHour","tzMin","dateSetter","setUTCFullYear","setFullYear","timeSetter","setUTCHours","setHours","m","s","ms","format","DATETIME_FORMATS","NUMBER_STRING","DATE_FORMATS_SPLIT","dateTimezoneOffset","DATE_FORMATS","spacing","limit","processPredicates","sortPredicate","reverseOrder","map","predicate","descending","predicates","compareValues","getComparisonObject","predicateValues","doComparison","v1","v2","ngDirective","FormController","controls","$error","$$success","$pending","$name","$dirty","$pristine","$valid","$invalid","$submitted","$$parentForm","nullFormCtrl","$rollbackViewValue","form.$rollbackViewValue","control","$commitViewValue","form.$commitViewValue","$addControl","form.$addControl","$$renameControl","form.$$renameControl","newName","oldName","$removeControl","form.$removeControl","$setValidity","addSetValidityMethod","ctrl","set","unset","$setDirty","form.$setDirty","PRISTINE_CLASS","DIRTY_CLASS","$setPristine","form.$setPristine","setClass","SUBMITTED_CLASS","$setUntouched","form.$setUntouched","$setSubmitted","form.$setSubmitted","stringBasedInputType","$formatters","$isEmpty","baseInputType","composing","ev","ngTrim","$viewValue","$$hasNativeValidators","$setViewValue","deferListener","origValue","keyCode","$render","ctrl.$render","createDateParser","mapping","iso","ISO_DATE_REGEXP","yyyy","MM","dd","HH","getHours","mm","ss","getSeconds","sss","getMilliseconds","part","NaN","createDateInputType","parseDate","dynamicDateInputType","isValidDate","parseObservedDateValue","badInputChecker","$options","previousDate","$$parserName","$parsers","parsedDate","ngModelMinErr","ngMin","minVal","$validators","ctrl.$validators.min","$validate","ngMax","maxVal","ctrl.$validators.max","validity","VALIDITY_STATE_PROPERTY","badInput","typeMismatch","parseConstantExpr","parseFn","classDirective","arrayDifference","arrayClasses","digestClassCounts","classCounts","classesToUpdate","ngClassWatchAction","$index","old$index","mod","cachedToggleClass","switchValue","classCache","toggleValidationCss","validationErrorKey","isValid","VALID_CLASS","INVALID_CLASS","setValidity","isObjectEmpty","PENDING_CLASS","combinedState","REGEX_STRING_REGEXP","documentMode","rules","ngCspElement","ngCspAttribute","noInlineStyle","name_","el","full","major","minor","dot","codeName","JQLite._data","mouseleave","mouseenter","optgroup","tbody","tfoot","colgroup","caption","thead","th","td","Node","contains","compareDocumentPosition","ready","trigger","fired","removeData","jqLiteHasData","removeAttribute","css","NODE_TYPE_ATTRIBUTE","lowercasedName","specified","getNamedItem","ret","getText","$dv","multiple","selected","nodeCount","jqLiteOn","types","addHandler","noEventListener","one","onFn","replaceNode","insertBefore","contentDocument","prepend","wrapNode","detach","after","newElement","toggleClass","condition","classCondition","nextElementSibling","getElementsByTagName","extraParameters","dummyEvent","handlerArgs","eventFnsCopy","arg3","unbind","FN_ARG_SPLIT","FN_ARG","argDecl","underscore","$animateMinErr","AnimateRunner","end","resume","pause","complete","pass","fail","postDigestElements","updateData","handleCSSClassChanges","existing","pin","domOperation","from","to","classesAdded","add","classesRemoved","$$registeredAnimations","classNameFilter","this.classNameFilter","$$classNameFilter","reservedRegex","NG_ANIMATE_CLASSNAME","domInsert","parentElement","afterElement","afterNode","ELEMENT_NODE","previousElementSibling","runner","enter","move","leave","addclass","animate","tempClasses","RAFPromise","getPromise","f1","f2","closed","cleanupStyles","start","domNode","offsetWidth","APPLICATION_JSON","$httpMinErr","$interpolateMinErr.throwNoconcat","$interpolateMinErr.interr","PATH_MATCH","locationPrototype","paramValue","Location","Location.prototype.state","OPERATORS","ESCAPE","lex","tokens","readString","peek","readNumber","isIdent","readIdent","is","isWhitespace","ch2","ch3","op2","op3","op1","throwError","chars","isExpOperator","colStr","peekCh","quote","rawString","hex","String","fromCharCode","rep","ExpressionStatement","Property","program","expressionStatement","expect","filterChain","assignment","ternary","logicalOR","consume","logicalAND","equality","relational","additive","multiplicative","unary","primary","arrayDeclaration","constants","parseArguments","baseExpression","peekToken","kind","e1","e2","e3","e4","peekAhead","t","nextId","vars","own","assignable","stage","computing","recurse","return_","generateFunction","fnKey","intoId","watchId","fnString","USE","STRICT","filterPrefix","watchFns","varsPrefix","section","nameId","recursionFn","skipWatchIdCheck","if_","lazyAssign","computedMember","lazyRecurse","plus","not","getHasOwnProperty","nonComputedMember","addEnsureSafeObject","notNull","addEnsureSafeMemberName","addEnsureSafeFunction","member","addEnsureSafeAssignContext","filterName","defaultValue","stringEscapeRegex","stringEscapeFn","c","charCodeAt","skip","init","fn.assign","rhs","lhs","unary+","unary-","unary!","binary+","binary-","binary*","binary/","binary%","binary===","binary!==","binary==","binary!=","binary<","binary>","binary<=","binary>=","binary&&","binary||","ternary?:","astCompiler","yy","y","MMMM","MMM","M","H","hh","EEEE","EEE","ampmGetter","AMPMS","Z","timeZoneGetter","zone","paddedZone","ww","w","G","GG","GGG","GGGG","longEraGetter","ERANAMES","xlinkHref","propName","defaultLinkFn","normalized","ngBooleanAttrWatchAction","htmlAttr","ngAttrAliasWatchAction","nullFormRenameControl","formDirectiveFactory","isNgForm","getSetter","ngFormCompile","formElement","nameAttr","ngFormPreLink","ctrls","handleFormSubmission","setter","URL_REGEXP","EMAIL_REGEXP","NUMBER_REGEXP","DATE_REGEXP","DATETIMELOCAL_REGEXP","WEEK_REGEXP","MONTH_REGEXP","TIME_REGEXP","inputType","textInputType","weekParser","isoWeek","existingDate","week","hours","seconds","milliseconds","addDays","numberInputType","urlInputType","ctrl.$validators.url","modelValue","viewValue","emailInputType","email","ctrl.$validators.email","radioInputType","checked","checkboxInputType","trueValue","ngTrueValue","falseValue","ngFalseValue","ctrl.$isEmpty","CONSTANT_VALUE_REGEXP","tplAttr","ngValueConstantLink","ngValueLink","valueWatchAction","$compile","ngBindCompile","templateElement","ngBindLink","ngBindWatchAction","ngBindTemplateCompile","ngBindTemplateLink","ngBindHtmlCompile","tElement","ngBindHtmlGetter","ngBindHtmlWatch","ngBindHtmlLink","ngBindHtmlWatchAction","getTrustedHtml","$viewChangeListeners","forceAsyncEvents","ngEventHandler","previousElements","ngIfWatchAction","srcExp","onloadExp","autoScrollExp","autoscroll","changeCounter","previousElement","currentElement","cleanupLastIncludeContent","ngIncludeWatchAction","afterAnimation","thisChangeId","namespaceAdaptedClone","trimValues","NgModelController","$modelValue","$$rawModelValue","$asyncValidators","$untouched","$touched","parsedNgModel","parsedNgModelAssign","ngModelGet","ngModelSet","pendingDebounce","parserValid","$$setOptions","this.$$setOptions","getterSetter","invokeModelGetter","invokeModelSetter","$$$p","this.$isEmpty","currentValidationRunId","this.$setPristine","this.$setDirty","this.$setUntouched","UNTOUCHED_CLASS","TOUCHED_CLASS","$setTouched","this.$setTouched","this.$rollbackViewValue","$$lastCommittedViewValue","this.$validate","prevValid","prevModelValue","allowInvalid","$$runValidators","allValid","$$writeModelToScope","this.$$runValidators","doneCallback","processSyncValidators","syncValidatorsValid","validator","processAsyncValidators","validatorPromises","validationDone","localValidationRunId","processParseErrors","errorKey","this.$commitViewValue","$$parseAndValidate","this.$$parseAndValidate","this.$$writeModelToScope","this.$setViewValue","updateOnDefault","$$debounceViewValueCommit","this.$$debounceViewValueCommit","debounceDelay","debounce","ngModelWatch","formatters","ngModelCompile","ngModelPreLink","modelCtrl","formCtrl","ngModelPostLink","updateOn","DEFAULT_REGEXP","that","ngOptionsMinErr","NG_OPTIONS_REGEXP","parseOptionsExpression","optionsExp","selectElement","Option","selectValue","label","disabled","getOptionValuesKeys","optionValues","optionValuesKeys","keyName","itemKey","valueName","selectAs","trackBy","viewValueFn","trackByFn","getTrackByValueFn","getHashOfValue","getTrackByValue","getLocals","displayFn","groupByFn","disableWhenFn","valuesFn","getWatchables","watchedArray","optionValuesLength","disableWhen","getOptions","optionItems","selectValueMap","optionItem","getOptionFromViewValue","getViewValueFromOption","optionTemplate","optGroupTemplate","ngOptionsPreLink","registerOption","ngOptionsPostLink","updateOptionElement","addOrReuseElement","removeExcessElements","skipEmptyAndUnknownOptions","emptyOption_","emptyOption","unknownOption_","unknownOption","updateOptions","previousValue","selectCtrl","readValue","groupMap","providedEmptyOption","updateOption","optionElement","groupElement","currentOptionElement","ngModelCtrl","nextValue","ngModelCtrl.$isEmpty","writeValue","selectCtrl.writeValue","selectCtrl.readValue","selectedValues","selections","selectedOption","BRACE","IS_WHEN","updateElementText","newText","numberExp","whenExp","whens","whensExpFns","braceReplacement","watchRemover","lastCount","attributeName","tmpMatch","whenKey","ngPluralizeWatchAction","countIsNaN","pluralCat","whenExpFn","ngRepeatMinErr","updateScope","valueIdentifier","keyIdentifier","arrayLength","$first","$last","$middle","$odd","$even","ngRepeatCompile","ngRepeatEndComment","aliasAs","trackByExp","trackByExpGetter","trackByIdExpFn","trackByIdArrayFn","trackByIdObjFn","hashFnLocals","ngRepeatLink","lastBlockMap","ngRepeatAction","previousNode","nextNode","nextBlockMap","collectionLength","trackById","collectionKeys","nextBlockOrder","trackByIdFn","blockKey","ngRepeatTransclude","ngShowWatchAction","NG_HIDE_CLASS","NG_HIDE_IN_PROGRESS_CLASS","ngHideWatchAction","ngStyleWatchAction","newStyles","oldStyles","ngSwitchController","cases","selectedTranscludes","selectedElements","previousLeaveAnimations","selectedScopes","spliceFactory","ngSwitchWatchAction","selectedTransclude","caseElement","selectedScope","anchor","noopNgModelController","SelectController","optionsMap","renderUnknownOption","self.renderUnknownOption","unknownVal","removeUnknownOption","self.removeUnknownOption","self.readValue","self.writeValue","hasOption","addOption","self.addOption","removeOption","self.removeOption","self.hasOption","self.registerOption","optionScope","optionAttrs","interpolateValueFn","interpolateTextFn","valueAttributeObserveAction","interpolateWatchAction","selectPreLink","ngModelCtrl.$render","lastView","lastViewRef","selectMultipleWatch","selectCtrlName","ctrl.$validators.required","patternExp","ctrl.$validators.pattern","intVal","ctrl.$validators.maxlength","ctrl.$validators.minlength","getDecimals","opt_precision","pow","ONE","OTHER","$$csp","head"]
-}
diff --git a/applications/auto-scale/gui/src/vendor/bootstrap-css/css/bootstrap-theme.css.map b/applications/auto-scale/gui/src/vendor/bootstrap-css/css/bootstrap-theme.css.map
deleted file mode 100644
index 5a12d63..0000000
--- a/applications/auto-scale/gui/src/vendor/bootstrap-css/css/bootstrap-theme.css.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["less/theme.less","less/mixins/vendor-prefixes.less","bootstrap-theme.css","less/mixins/gradients.less","less/mixins/reset-filter.less"],"names":[],"mappings":"AAcA;;;;;;EAME,0CAAA;ECgDA,6FAAA;EACQ,qFAAA;EC5DT;AFgBC;;;;;;;;;;;;EC2CA,0DAAA;EACQ,kDAAA;EC7CT;AFVD;;;;;;EAiBI,mBAAA;EECH;AFiCC;;EAEE,wBAAA;EE/BH;AFoCD;EGnDI,0EAAA;EACA,qEAAA;EACA,+FAAA;EAAA,wEAAA;EAEA,wHAAA;ECnBF,qEAAA;EJiCA,6BAAA;EACA,uBAAA;EAgC2C,2BAAA;EAA2B,oBAAA;EEzBvE;AFLC;;EAEE,2BAAA;EACA,8BAAA;EEOH;AFJC;;EAEE,2BAAA;EACA,uBAAA;EEMH;AFHC;;;EAGE,2BAAA;EACA,wBAAA;EEKH;AFUD;EGpDI,0EAAA;EACA,qEAAA;EACA,+FAAA;EAAA,wEAAA;EAEA,wHAAA;ECnBF,qEAAA;EJiCA,6BAAA;EACA,uBAAA;EEgCD;AF9BC;;EAEE,2BAAA;EACA,8BAAA;EEgCH;AF7BC;;EAEE,2BAAA;EACA,uBAAA;EE+BH;AF5BC;;;EAGE,2BAAA;EACA,wBAAA;EE8BH;AFdD;EGrDI,0EAAA;EACA,qEAAA;EACA,+FAAA;EAAA,wEAAA;EAEA,wHAAA;ECnBF,qEAAA;EJiCA,6BAAA;EACA,uBAAA;EEyDD;AFvDC;;EAEE,2BAAA;EACA,8BAAA;EEyDH;AFtDC;;EAEE,2BAAA;EACA,uBAAA;EEw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A;ECgXT","file":"bootstrap-theme.css","sourcesContent":["\n//\n// Load core variables and mixins\n// --------------------------------------------------\n\n@import \"variables.less\";\n@import \"mixins.less\";\n\n\n//\n// Buttons\n// --------------------------------------------------\n\n// Common styles\n.btn-default,\n.btn-primary,\n.btn-success,\n.btn-info,\n.btn-warning,\n.btn-danger {\n text-shadow: 0 -1px 0 rgba(0,0,0,.2);\n @shadow: inset 0 1px 0 rgba(255,255,255,.15), 0 1px 1px rgba(0,0,0,.075);\n .box-shadow(@shadow);\n\n // Reset the shadow\n &:active,\n &.active {\n .box-shadow(inset 0 3px 5px rgba(0,0,0,.125));\n }\n\n .badge {\n text-shadow: none;\n }\n}\n\n// Mixin for generating new styles\n.btn-styles(@btn-color: #555) {\n #gradient > .vertical(@start-color: @btn-color; @end-color: darken(@btn-color, 12%));\n .reset-filter(); // Disable gradients for IE9 because filter bleeds through rounded corners; see https://github.com/twbs/bootstrap/issues/10620\n background-repeat: repeat-x;\n border-color: darken(@btn-color, 14%);\n\n &:hover,\n &:focus {\n background-color: darken(@btn-color, 12%);\n background-position: 0 -15px;\n }\n\n &:active,\n &.active {\n background-color: darken(@btn-color, 12%);\n border-color: darken(@btn-color, 14%);\n }\n\n &.disabled,\n &:disabled,\n &[disabled] {\n background-color: darken(@btn-color, 12%);\n background-image: none;\n }\n}\n\n// Common styles\n.btn {\n // Remove the gradient for the pressed/active state\n &:active,\n &.active {\n background-image: none;\n }\n}\n\n// Apply the mixin to the buttons\n.btn-default { .btn-styles(@btn-default-bg); text-shadow: 0 1px 0 #fff; border-color: #ccc; }\n.btn-primary { .btn-styles(@btn-primary-bg); }\n.btn-success { .btn-styles(@btn-success-bg); }\n.btn-info { .btn-styles(@btn-info-bg); }\n.btn-warning { .btn-styles(@btn-warning-bg); }\n.btn-danger { .btn-styles(@btn-danger-bg); }\n\n\n//\n// Images\n// --------------------------------------------------\n\n.thumbnail,\n.img-thumbnail {\n .box-shadow(0 1px 2px rgba(0,0,0,.075));\n}\n\n\n//\n// Dropdowns\n// --------------------------------------------------\n\n.dropdown-menu > li > a:hover,\n.dropdown-menu > li > a:focus {\n #gradient > .vertical(@start-color: @dropdown-link-hover-bg; @end-color: darken(@dropdown-link-hover-bg, 5%));\n background-color: darken(@dropdown-link-hover-bg, 5%);\n}\n.dropdown-menu > .active > a,\n.dropdown-menu > .active > a:hover,\n.dropdown-menu > .active > a:focus {\n #gradient > .vertical(@start-color: @dropdown-link-active-bg; @end-color: darken(@dropdown-link-active-bg, 5%));\n background-color: darken(@dropdown-link-active-bg, 5%);\n}\n\n\n//\n// Navbar\n// --------------------------------------------------\n\n// Default navbar\n.navbar-default {\n #gradient > .vertical(@start-color: lighten(@navbar-default-bg, 10%); @end-color: @navbar-default-bg);\n .reset-filter(); // Remove gradient in IE<10 to fix bug where dropdowns don't get triggered\n border-radius: @navbar-border-radius;\n @shadow: inset 0 1px 0 rgba(255,255,255,.15), 0 1px 5px rgba(0,0,0,.075);\n .box-shadow(@shadow);\n\n .navbar-nav > .open > a,\n .navbar-nav > .active > a {\n #gradient > .vertical(@start-color: darken(@navbar-default-link-active-bg, 5%); @end-color: darken(@navbar-default-link-active-bg, 2%));\n .box-shadow(inset 0 3px 9px rgba(0,0,0,.075));\n }\n}\n.navbar-brand,\n.navbar-nav > li > a {\n text-shadow: 0 1px 0 rgba(255,255,255,.25);\n}\n\n// Inverted navbar\n.navbar-inverse {\n #gradient > .vertical(@start-color: lighten(@navbar-inverse-bg, 10%); @end-color: @navbar-inverse-bg);\n .reset-filter(); // Remove gradient in IE<10 to fix bug where dropdowns don't get triggered; see https://github.com/twbs/bootstrap/issues/10257\n\n .navbar-nav > .open > a,\n .navbar-nav > .active > a {\n #gradient > .vertical(@start-color: @navbar-inverse-link-active-bg; @end-color: lighten(@navbar-inverse-link-active-bg, 2.5%));\n .box-shadow(inset 0 3px 9px rgba(0,0,0,.25));\n }\n\n .navbar-brand,\n .navbar-nav > li > a {\n text-shadow: 0 -1px 0 rgba(0,0,0,.25);\n }\n}\n\n// Undo rounded corners in static and fixed navbars\n.navbar-static-top,\n.navbar-fixed-top,\n.navbar-fixed-bottom {\n border-radius: 0;\n}\n\n// Fix active state of dropdown items in collapsed mode\n@media (max-width: @grid-float-breakpoint-max) {\n .navbar .navbar-nav .open .dropdown-menu > .active > a {\n &,\n &:hover,\n &:focus {\n color: #fff;\n #gradient > .vertical(@start-color: @dropdown-link-active-bg; @end-color: darken(@dropdown-link-active-bg, 5%));\n }\n }\n}\n\n\n//\n// Alerts\n// --------------------------------------------------\n\n// Common styles\n.alert {\n text-shadow: 0 1px 0 rgba(255,255,255,.2);\n @shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 1px 2px rgba(0,0,0,.05);\n .box-shadow(@shadow);\n}\n\n// Mixin for generating new styles\n.alert-styles(@color) {\n #gradient > .vertical(@start-color: @color; @end-color: darken(@color, 7.5%));\n border-color: darken(@color, 15%);\n}\n\n// Apply the mixin to the alerts\n.alert-success { .alert-styles(@alert-success-bg); }\n.alert-info { .alert-styles(@alert-info-bg); }\n.alert-warning { .alert-styles(@alert-warning-bg); }\n.alert-danger { .alert-styles(@alert-danger-bg); }\n\n\n//\n// Progress bars\n// --------------------------------------------------\n\n// Give the progress background some depth\n.progress {\n #gradient > .vertical(@start-color: darken(@progress-bg, 4%); @end-color: @progress-bg)\n}\n\n// Mixin for generating new styles\n.progress-bar-styles(@color) {\n #gradient > .vertical(@start-color: @color; @end-color: darken(@color, 10%));\n}\n\n// Apply the mixin to the progress bars\n.progress-bar { .progress-bar-styles(@progress-bar-bg); }\n.progress-bar-success { .progress-bar-styles(@progress-bar-success-bg); }\n.progress-bar-info { .progress-bar-styles(@progress-bar-info-bg); }\n.progress-bar-warning { .progress-bar-styles(@progress-bar-warning-bg); }\n.progress-bar-danger { .progress-bar-styles(@progress-bar-danger-bg); }\n\n// Reset the striped class because our mixins don't do multiple gradients and\n// the above custom styles override the new `.progress-bar-striped` in v3.2.0.\n.progress-bar-striped {\n #gradient > .striped();\n}\n\n\n//\n// List groups\n// --------------------------------------------------\n\n.list-group {\n border-radius: @border-radius-base;\n .box-shadow(0 1px 2px rgba(0,0,0,.075));\n}\n.list-group-item.active,\n.list-group-item.active:hover,\n.list-group-item.active:focus {\n text-shadow: 0 -1px 0 darken(@list-group-active-bg, 10%);\n #gradient > .vertical(@start-color: @list-group-active-bg; @end-color: darken(@list-group-active-bg, 7.5%));\n border-color: darken(@list-group-active-border, 7.5%);\n\n .badge {\n text-shadow: none;\n }\n}\n\n\n//\n// Panels\n// --------------------------------------------------\n\n// Common styles\n.panel {\n .box-shadow(0 1px 2px rgba(0,0,0,.05));\n}\n\n// Mixin for generating new styles\n.panel-heading-styles(@color) {\n #gradient > .vertical(@start-color: @color; @end-color: darken(@color, 5%));\n}\n\n// Apply the mixin to the panel headings only\n.panel-default > .panel-heading { .panel-heading-styles(@panel-default-heading-bg); }\n.panel-primary > .panel-heading { .panel-heading-styles(@panel-primary-heading-bg); }\n.panel-success > .panel-heading { .panel-heading-styles(@panel-success-heading-bg); }\n.panel-info > .panel-heading { .panel-heading-styles(@panel-info-heading-bg); }\n.panel-warning > .panel-heading { .panel-heading-styles(@panel-warning-heading-bg); }\n.panel-danger > .panel-heading { .panel-heading-styles(@panel-danger-heading-bg); }\n\n\n//\n// Wells\n// --------------------------------------------------\n\n.well {\n #gradient > .vertical(@start-color: darken(@well-bg, 5%); @end-color: @well-bg);\n border-color: darken(@well-bg, 10%);\n @shadow: inset 0 1px 3px rgba(0,0,0,.05), 0 1px 0 rgba(255,255,255,.1);\n .box-shadow(@shadow);\n}\n","// Vendor Prefixes\n//\n// All vendor mixins are deprecated as of v3.2.0 due to the introduction of\n// Autoprefixer in our Gruntfile. They will be removed in v4.\n\n// - Animations\n// - Backface visibility\n// - Box shadow\n// - Box sizing\n// - Content columns\n// - Hyphens\n// - Placeholder text\n// - Transformations\n// - Transitions\n// - User Select\n\n\n// Animations\n.animation(@animation) {\n -webkit-animation: @animation;\n -o-animation: @animation;\n animation: @animation;\n}\n.animation-name(@name) {\n -webkit-animation-name: @name;\n animation-name: @name;\n}\n.animation-duration(@duration) {\n -webkit-animation-duration: @duration;\n animation-duration: @duration;\n}\n.animation-timing-function(@timing-function) {\n -webkit-animation-timing-function: @timing-function;\n animation-timing-function: @timing-function;\n}\n.animation-delay(@delay) {\n -webkit-animation-delay: @delay;\n animation-delay: @delay;\n}\n.animation-iteration-count(@iteration-count) {\n -webkit-animation-iteration-count: @iteration-count;\n animation-iteration-count: @iteration-count;\n}\n.animation-direction(@direction) {\n -webkit-animation-direction: @direction;\n animation-direction: @direction;\n}\n.animation-fill-mode(@fill-mode) {\n -webkit-animation-fill-mode: @fill-mode;\n animation-fill-mode: @fill-mode;\n}\n\n// Backface visibility\n// Prevent browsers from flickering when using CSS 3D transforms.\n// Default value is `visible`, but can be changed to `hidden`\n\n.backface-visibility(@visibility){\n -webkit-backface-visibility: @visibility;\n -moz-backface-visibility: @visibility;\n backface-visibility: @visibility;\n}\n\n// Drop shadows\n//\n// Note: Deprecated `.box-shadow()` as of v3.1.0 since all of Bootstrap's\n// supported browsers that have box shadow capabilities now support it.\n\n.box-shadow(@shadow) {\n -webkit-box-shadow: @shadow; // iOS <4.3 & Android <4.1\n box-shadow: @shadow;\n}\n\n// Box sizing\n.box-sizing(@boxmodel) {\n -webkit-box-sizing: @boxmodel;\n -moz-box-sizing: @boxmodel;\n box-sizing: @boxmodel;\n}\n\n// CSS3 Content Columns\n.content-columns(@column-count; @column-gap: @grid-gutter-width) {\n -webkit-column-count: @column-count;\n -moz-column-count: @column-count;\n column-count: @column-count;\n -webkit-column-gap: @column-gap;\n -moz-column-gap: @column-gap;\n column-gap: @column-gap;\n}\n\n// Optional hyphenation\n.hyphens(@mode: auto) {\n word-wrap: break-word;\n -webkit-hyphens: @mode;\n -moz-hyphens: @mode;\n -ms-hyphens: @mode; // IE10+\n -o-hyphens: @mode;\n hyphens: @mode;\n}\n\n// Placeholder text\n.placeholder(@color: @input-color-placeholder) {\n // Firefox\n &::-moz-placeholder {\n color: @color;\n opacity: 1; // Override Firefox's unusual default opacity; see https://github.com/twbs/bootstrap/pull/11526\n }\n &:-ms-input-placeholder { color: @color; } // Internet Explorer 10+\n &::-webkit-input-placeholder { color: @color; } // Safari and Chrome\n}\n\n// Transformations\n.scale(@ratio) {\n -webkit-transform: scale(@ratio);\n -ms-transform: scale(@ratio); // IE9 only\n -o-transform: scale(@ratio);\n transform: scale(@ratio);\n}\n.scale(@ratioX; @ratioY) {\n -webkit-transform: scale(@ratioX, @ratioY);\n -ms-transform: scale(@ratioX, @ratioY); // IE9 only\n -o-transform: scale(@ratioX, @ratioY);\n transform: scale(@ratioX, @ratioY);\n}\n.scaleX(@ratio) {\n -webkit-transform: scaleX(@ratio);\n -ms-transform: scaleX(@ratio); // IE9 only\n -o-transform: scaleX(@ratio);\n transform: scaleX(@ratio);\n}\n.scaleY(@ratio) {\n -webkit-transform: scaleY(@ratio);\n -ms-transform: scaleY(@ratio); // IE9 only\n -o-transform: scaleY(@ratio);\n transform: scaleY(@ratio);\n}\n.skew(@x; @y) {\n -webkit-transform: skewX(@x) skewY(@y);\n -ms-transform: skewX(@x) skewY(@y); // See https://github.com/twbs/bootstrap/issues/4885; IE9+\n -o-transform: skewX(@x) skewY(@y);\n transform: skewX(@x) skewY(@y);\n}\n.translate(@x; @y) {\n -webkit-transform: translate(@x, @y);\n -ms-transform: translate(@x, @y); // IE9 only\n -o-transform: translate(@x, @y);\n transform: translate(@x, @y);\n}\n.translate3d(@x; @y; @z) {\n -webkit-transform: translate3d(@x, @y, @z);\n transform: translate3d(@x, @y, @z);\n}\n.rotate(@degrees) {\n -webkit-transform: rotate(@degrees);\n -ms-transform: rotate(@degrees); // IE9 only\n -o-transform: rotate(@degrees);\n transform: rotate(@degrees);\n}\n.rotateX(@degrees) {\n -webkit-transform: rotateX(@degrees);\n -ms-transform: rotateX(@degrees); // IE9 only\n -o-transform: rotateX(@degrees);\n transform: rotateX(@degrees);\n}\n.rotateY(@degrees) {\n -webkit-transform: rotateY(@degrees);\n -ms-transform: rotateY(@degrees); // IE9 only\n -o-transform: rotateY(@degrees);\n transform: rotateY(@degrees);\n}\n.perspective(@perspective) {\n -webkit-perspective: @perspective;\n -moz-perspective: @perspective;\n perspective: @perspective;\n}\n.perspective-origin(@perspective) {\n -webkit-perspective-origin: @perspective;\n -moz-perspective-origin: @perspective;\n perspective-origin: @perspective;\n}\n.transform-origin(@origin) {\n -webkit-transform-origin: @origin;\n -moz-transform-origin: @origin;\n -ms-transform-origin: @origin; // IE9 only\n transform-origin: @origin;\n}\n\n\n// Transitions\n\n.transition(@transition) {\n -webkit-transition: @transition;\n -o-transition: @transition;\n transition: @transition;\n}\n.transition-property(@transition-property) {\n -webkit-transition-property: @transition-property;\n transition-property: @transition-property;\n}\n.transition-delay(@transition-delay) {\n -webkit-transition-delay: @transition-delay;\n transition-delay: @transition-delay;\n}\n.transition-duration(@transition-duration) {\n -webkit-transition-duration: @transition-duration;\n transition-duration: @transition-duration;\n}\n.transition-timing-function(@timing-function) {\n -webkit-transition-timing-function: @timing-function;\n transition-timing-function: @timing-function;\n}\n.transition-transform(@transition) {\n -webkit-transition: -webkit-transform @transition;\n -moz-transition: -moz-transform @transition;\n -o-transition: -o-transform @transition;\n transition: transform @transition;\n}\n\n\n// User select\n// For selecting text on the page\n\n.user-select(@select) {\n -webkit-user-select: @select;\n -moz-user-select: @select;\n -ms-user-select: @select; // IE10+\n user-select: @select;\n}\n",".btn-default,\n.btn-primary,\n.btn-success,\n.btn-info,\n.btn-warning,\n.btn-danger {\n text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.2);\n -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 1px rgba(0, 0, 0, 0.075);\n box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 1px rgba(0, 0, 0, 0.075);\n}\n.btn-default:active,\n.btn-primary:active,\n.btn-success:active,\n.btn-info:active,\n.btn-warning:active,\n.btn-danger:active,\n.btn-default.active,\n.btn-primary.active,\n.btn-success.active,\n.btn-info.active,\n.btn-warning.active,\n.btn-danger.active {\n -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);\n box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);\n}\n.btn-default .badge,\n.btn-primary .badge,\n.btn-success .badge,\n.btn-info .badge,\n.btn-warning .badge,\n.btn-danger .badge {\n text-shadow: none;\n}\n.btn:active,\n.btn.active {\n background-image: none;\n}\n.btn-default {\n background-image: -webkit-linear-gradient(top, #ffffff 0%, #e0e0e0 100%);\n background-image: -o-linear-gradient(top, #ffffff 0%, #e0e0e0 100%);\n background-image: linear-gradient(to bottom, #ffffff 0%, #e0e0e0 100%);\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe0e0e0', GradientType=0);\n filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);\n background-repeat: repeat-x;\n border-color: #dbdbdb;\n text-shadow: 0 1px 0 #fff;\n border-color: #ccc;\n}\n.btn-default:hover,\n.btn-default:focus {\n background-color: #e0e0e0;\n background-position: 0 -15px;\n}\n.btn-default:active,\n.btn-default.active {\n background-color: #e0e0e0;\n border-color: #dbdbdb;\n}\n.btn-default.disabled,\n.btn-default:disabled,\n.btn-default[disabled] {\n background-color: #e0e0e0;\n background-image: none;\n}\n.btn-primary {\n background-image: -webkit-linear-gradient(top, #337ab7 0%, #265a88 100%);\n background-image: -o-linear-gradient(top, #337ab7 0%, #265a88 100%);\n background-image: linear-gradient(to bottom, #337ab7 0%, #265a88 100%);\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff265a88', GradientType=0);\n filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);\n background-repeat: repeat-x;\n border-color: #245580;\n}\n.btn-primary:hover,\n.btn-primary:focus {\n background-color: #265a88;\n background-position: 0 -15px;\n}\n.btn-primary:active,\n.btn-primary.active {\n background-color: #265a88;\n border-color: #245580;\n}\n.btn-primary.disabled,\n.btn-primary:disabled,\n.btn-primary[disabled] {\n background-color: #265a88;\n background-image: none;\n}\n.btn-success {\n background-image: -webkit-linear-gradient(top, #5cb85c 0%, #419641 100%);\n background-image: -o-linear-gradient(top, #5cb85c 0%, #419641 100%);\n background-image: linear-gradient(to bottom, #5cb85c 0%, #419641 100%);\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff419641', GradientType=0);\n filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);\n background-repeat: repeat-x;\n border-color: #3e8f3e;\n}\n.btn-success:hover,\n.btn-success:focus {\n background-color: #419641;\n background-position: 0 -15px;\n}\n.btn-success:active,\n.btn-success.active {\n background-color: #419641;\n border-color: #3e8f3e;\n}\n.btn-success.disabled,\n.btn-success:disabled,\n.btn-success[disabled] {\n background-color: #419641;\n background-image: none;\n}\n.btn-info {\n background-image: -webkit-linear-gradient(top, #5bc0de 0%, #2aabd2 100%);\n background-image: -o-linear-gradient(top, #5bc0de 0%, #2aabd2 100%);\n background-image: linear-gradient(to bottom, #5bc0de 0%, #2aabd2 100%);\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2aabd2', GradientType=0);\n filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);\n background-repeat: repeat-x;\n border-color: #28a4c9;\n}\n.btn-info:hover,\n.btn-info:focus {\n background-color: #2aabd2;\n background-position: 0 -15px;\n}\n.btn-info:active,\n.btn-info.active {\n background-color: #2aabd2;\n border-color: #28a4c9;\n}\n.btn-info.disabled,\n.btn-info:disabled,\n.btn-info[disabled] {\n background-color: #2aabd2;\n background-image: none;\n}\n.btn-warning {\n background-image: -webkit-linear-gradient(top, #f0ad4e 0%, #eb9316 100%);\n background-image: -o-linear-gradient(top, #f0ad4e 0%, #eb9316 100%);\n background-image: linear-gradient(to bottom, #f0ad4e 0%, #eb9316 100%);\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffeb9316', GradientType=0);\n filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);\n background-repeat: repeat-x;\n border-color: #e38d13;\n}\n.btn-warning:hover,\n.btn-warning:focus {\n background-color: #eb9316;\n background-position: 0 -15px;\n}\n.btn-warning:active,\n.btn-warning.active {\n background-color: #eb9316;\n border-color: #e38d13;\n}\n.btn-warning.disabled,\n.btn-warning:disabled,\n.btn-warning[disabled] {\n background-color: #eb9316;\n background-image: none;\n}\n.btn-danger {\n background-image: -webkit-linear-gradient(top, #d9534f 0%, #c12e2a 100%);\n background-image: -o-linear-gradient(top, #d9534f 0%, #c12e2a 100%);\n background-image: linear-gradient(to bottom, #d9534f 0%, #c12e2a 100%);\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc12e2a', GradientType=0);\n filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);\n background-repeat: repeat-x;\n border-color: #b92c28;\n}\n.btn-danger:hover,\n.btn-danger:focus {\n background-color: #c12e2a;\n background-position: 0 -15px;\n}\n.btn-danger:active,\n.btn-danger.active {\n background-color: #c12e2a;\n border-color: #b92c28;\n}\n.btn-danger.disabled,\n.btn-danger:disabled,\n.btn-danger[disabled] {\n background-color: #c12e2a;\n background-image: none;\n}\n.thumbnail,\n.img-thumbnail {\n -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.075);\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.075);\n}\n.dropdown-menu > li > a:hover,\n.dropdown-menu > li > a:focus {\n background-image: -webkit-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);\n background-image: -o-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);\n background-image: linear-gradient(to bottom, #f5f5f5 0%, #e8e8e8 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);\n background-color: #e8e8e8;\n}\n.dropdown-menu > .active > a,\n.dropdown-menu > .active > a:hover,\n.dropdown-menu > .active > a:focus {\n background-image: -webkit-linear-gradient(top, #337ab7 0%, #2e6da4 100%);\n background-image: -o-linear-gradient(top, #337ab7 0%, #2e6da4 100%);\n background-image: linear-gradient(to bottom, #337ab7 0%, #2e6da4 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);\n background-color: #2e6da4;\n}\n.navbar-default {\n background-image: -webkit-linear-gradient(top, #ffffff 0%, #f8f8f8 100%);\n background-image: -o-linear-gradient(top, #ffffff 0%, #f8f8f8 100%);\n background-image: linear-gradient(to bottom, #ffffff 0%, #f8f8f8 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff8f8f8', GradientType=0);\n filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);\n border-radius: 4px;\n -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 5px rgba(0, 0, 0, 0.075);\n box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 5px rgba(0, 0, 0, 0.075);\n}\n.navbar-default .navbar-nav > .open > a,\n.navbar-default .navbar-nav > .active > a {\n background-image: -webkit-linear-gradient(top, #dbdbdb 0%, #e2e2e2 100%);\n background-image: -o-linear-gradient(top, #dbdbdb 0%, #e2e2e2 100%);\n background-image: linear-gradient(to bottom, #dbdbdb 0%, #e2e2e2 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdbdbdb', endColorstr='#ffe2e2e2', GradientType=0);\n -webkit-box-shadow: inset 0 3px 9px rgba(0, 0, 0, 0.075);\n box-shadow: inset 0 3px 9px rgba(0, 0, 0, 0.075);\n}\n.navbar-brand,\n.navbar-nav > li > a {\n text-shadow: 0 1px 0 rgba(255, 255, 255, 0.25);\n}\n.navbar-inverse {\n background-image: -webkit-linear-gradient(top, #3c3c3c 0%, #222222 100%);\n background-image: -o-linear-gradient(top, #3c3c3c 0%, #222222 100%);\n background-image: linear-gradient(to bottom, #3c3c3c 0%, #222222 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff3c3c3c', endColorstr='#ff222222', GradientType=0);\n filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);\n}\n.navbar-inverse .navbar-nav > .open > a,\n.navbar-inverse .navbar-nav > .active > a {\n background-image: -webkit-linear-gradient(top, #080808 0%, #0f0f0f 100%);\n background-image: -o-linear-gradient(top, #080808 0%, #0f0f0f 100%);\n background-image: linear-gradient(to bottom, #080808 0%, #0f0f0f 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff080808', endColorstr='#ff0f0f0f', GradientType=0);\n -webkit-box-shadow: inset 0 3px 9px rgba(0, 0, 0, 0.25);\n box-shadow: inset 0 3px 9px rgba(0, 0, 0, 0.25);\n}\n.navbar-inverse .navbar-brand,\n.navbar-inverse .navbar-nav > li > a {\n text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);\n}\n.navbar-static-top,\n.navbar-fixed-top,\n.navbar-fixed-bottom {\n border-radius: 0;\n}\n@media (max-width: 767px) {\n .navbar .navbar-nav .open .dropdown-menu > .active > a,\n .navbar .navbar-nav .open .dropdown-menu > .active > a:hover,\n .navbar .navbar-nav .open .dropdown-menu > .active > a:focus {\n color: #fff;\n background-image: -webkit-linear-gradient(top, #337ab7 0%, #2e6da4 100%);\n background-image: -o-linear-gradient(top, #337ab7 0%, #2e6da4 100%);\n background-image: linear-gradient(to bottom, #337ab7 0%, #2e6da4 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);\n }\n}\n.alert {\n text-shadow: 0 1px 0 rgba(255, 255, 255, 0.2);\n -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 1px 2px rgba(0, 0, 0, 0.05);\n box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 1px 2px rgba(0, 0, 0, 0.05);\n}\n.alert-success {\n background-image: -webkit-linear-gradient(top, #dff0d8 0%, #c8e5bc 100%);\n background-image: -o-linear-gradient(top, #dff0d8 0%, #c8e5bc 100%);\n background-image: linear-gradient(to bottom, #dff0d8 0%, #c8e5bc 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffc8e5bc', GradientType=0);\n border-color: #b2dba1;\n}\n.alert-info {\n background-image: -webkit-linear-gradient(top, #d9edf7 0%, #b9def0 100%);\n background-image: -o-linear-gradient(top, #d9edf7 0%, #b9def0 100%);\n background-image: linear-gradient(to bottom, #d9edf7 0%, #b9def0 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffb9def0', GradientType=0);\n border-color: #9acfea;\n}\n.alert-warning {\n background-image: -webkit-linear-gradient(top, #fcf8e3 0%, #f8efc0 100%);\n background-image: -o-linear-gradient(top, #fcf8e3 0%, #f8efc0 100%);\n background-image: linear-gradient(to bottom, #fcf8e3 0%, #f8efc0 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fff8efc0', GradientType=0);\n border-color: #f5e79e;\n}\n.alert-danger {\n background-image: -webkit-linear-gradient(top, #f2dede 0%, #e7c3c3 100%);\n background-image: -o-linear-gradient(top, #f2dede 0%, #e7c3c3 100%);\n background-image: linear-gradient(to bottom, #f2dede 0%, #e7c3c3 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffe7c3c3', GradientType=0);\n border-color: #dca7a7;\n}\n.progress {\n background-image: -webkit-linear-gradient(top, #ebebeb 0%, #f5f5f5 100%);\n background-image: -o-linear-gradient(top, #ebebeb 0%, #f5f5f5 100%);\n background-image: linear-gradient(to bottom, #ebebeb 0%, #f5f5f5 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffebebeb', endColorstr='#fff5f5f5', GradientType=0);\n}\n.progress-bar {\n background-image: -webkit-linear-gradient(top, #337ab7 0%, #286090 100%);\n background-image: -o-linear-gradient(top, #337ab7 0%, #286090 100%);\n background-image: linear-gradient(to bottom, #337ab7 0%, #286090 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff286090', GradientType=0);\n}\n.progress-bar-success {\n background-image: -webkit-linear-gradient(top, #5cb85c 0%, #449d44 100%);\n background-image: -o-linear-gradient(top, #5cb85c 0%, #449d44 100%);\n background-image: linear-gradient(to bottom, #5cb85c 0%, #449d44 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff449d44', GradientType=0);\n}\n.progress-bar-info {\n background-image: -webkit-linear-gradient(top, #5bc0de 0%, #31b0d5 100%);\n background-image: -o-linear-gradient(top, #5bc0de 0%, #31b0d5 100%);\n background-image: linear-gradient(to bottom, #5bc0de 0%, #31b0d5 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff31b0d5', GradientType=0);\n}\n.progress-bar-warning {\n background-image: -webkit-linear-gradient(top, #f0ad4e 0%, #ec971f 100%);\n background-image: -o-linear-gradient(top, #f0ad4e 0%, #ec971f 100%);\n background-image: linear-gradient(to bottom, #f0ad4e 0%, #ec971f 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffec971f', GradientType=0);\n}\n.progress-bar-danger {\n background-image: -webkit-linear-gradient(top, #d9534f 0%, #c9302c 100%);\n background-image: -o-linear-gradient(top, #d9534f 0%, #c9302c 100%);\n background-image: linear-gradient(to bottom, #d9534f 0%, #c9302c 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc9302c', GradientType=0);\n}\n.progress-bar-striped {\n background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n}\n.list-group {\n border-radius: 4px;\n -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.075);\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.075);\n}\n.list-group-item.active,\n.list-group-item.active:hover,\n.list-group-item.active:focus {\n text-shadow: 0 -1px 0 #286090;\n background-image: -webkit-linear-gradient(top, #337ab7 0%, #2b669a 100%);\n background-image: -o-linear-gradient(top, #337ab7 0%, #2b669a 100%);\n background-image: linear-gradient(to bottom, #337ab7 0%, #2b669a 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2b669a', GradientType=0);\n border-color: #2b669a;\n}\n.list-group-item.active .badge,\n.list-group-item.active:hover .badge,\n.list-group-item.active:focus .badge {\n text-shadow: none;\n}\n.panel {\n -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);\n}\n.panel-default > .panel-heading {\n background-image: -webkit-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);\n background-image: -o-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);\n background-image: linear-gradient(to bottom, #f5f5f5 0%, #e8e8e8 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);\n}\n.panel-primary > .panel-heading {\n background-image: -webkit-linear-gradient(top, #337ab7 0%, #2e6da4 100%);\n background-image: -o-linear-gradient(top, #337ab7 0%, #2e6da4 100%);\n background-image: linear-gradient(to bottom, #337ab7 0%, #2e6da4 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);\n}\n.panel-success > .panel-heading {\n background-image: -webkit-linear-gradient(top, #dff0d8 0%, #d0e9c6 100%);\n background-image: -o-linear-gradient(top, #dff0d8 0%, #d0e9c6 100%);\n background-image: linear-gradient(to bottom, #dff0d8 0%, #d0e9c6 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffd0e9c6', GradientType=0);\n}\n.panel-info > .panel-heading {\n background-image: -webkit-linear-gradient(top, #d9edf7 0%, #c4e3f3 100%);\n background-image: -o-linear-gradient(top, #d9edf7 0%, #c4e3f3 100%);\n background-image: linear-gradient(to bottom, #d9edf7 0%, #c4e3f3 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffc4e3f3', GradientType=0);\n}\n.panel-warning > .panel-heading {\n background-image: -webkit-linear-gradient(top, #fcf8e3 0%, #faf2cc 100%);\n background-image: -o-linear-gradient(top, #fcf8e3 0%, #faf2cc 100%);\n background-image: linear-gradient(to bottom, #fcf8e3 0%, #faf2cc 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fffaf2cc', GradientType=0);\n}\n.panel-danger > .panel-heading {\n background-image: -webkit-linear-gradient(top, #f2dede 0%, #ebcccc 100%);\n background-image: -o-linear-gradient(top, #f2dede 0%, #ebcccc 100%);\n background-image: linear-gradient(to bottom, #f2dede 0%, #ebcccc 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffebcccc', GradientType=0);\n}\n.well {\n background-image: -webkit-linear-gradient(top, #e8e8e8 0%, #f5f5f5 100%);\n background-image: -o-linear-gradient(top, #e8e8e8 0%, #f5f5f5 100%);\n background-image: linear-gradient(to bottom, #e8e8e8 0%, #f5f5f5 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe8e8e8', endColorstr='#fff5f5f5', GradientType=0);\n border-color: #dcdcdc;\n -webkit-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 0 rgba(255, 255, 255, 0.1);\n box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 0 rgba(255, 255, 255, 0.1);\n}\n/*# sourceMappingURL=bootstrap-theme.css.map */","// Gradients\n\n#gradient {\n\n // Horizontal gradient, from left to right\n //\n // Creates two color stops, start and end, by specifying a color and position for each color stop.\n // Color stops are not available in IE9 and below.\n .horizontal(@start-color: #555; @end-color: #333; @start-percent: 0%; @end-percent: 100%) {\n background-image: -webkit-linear-gradient(left, @start-color @start-percent, @end-color @end-percent); // Safari 5.1-6, Chrome 10+\n background-image: -o-linear-gradient(left, @start-color @start-percent, @end-color @end-percent); // Opera 12\n background-image: linear-gradient(to right, @start-color @start-percent, @end-color @end-percent); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+\n background-repeat: repeat-x;\n filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=1)\",argb(@start-color),argb(@end-color))); // IE9 and down\n }\n\n // Vertical gradient, from top to bottom\n //\n // Creates two color stops, start and end, by specifying a color and position for each color stop.\n // Color stops are not available in IE9 and below.\n .vertical(@start-color: #555; @end-color: #333; @start-percent: 0%; @end-percent: 100%) {\n background-image: -webkit-linear-gradient(top, @start-color @start-percent, @end-color @end-percent); // Safari 5.1-6, Chrome 10+\n background-image: -o-linear-gradient(top, @start-color @start-percent, @end-color @end-percent); // Opera 12\n background-image: linear-gradient(to bottom, @start-color @start-percent, @end-color @end-percent); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+\n background-repeat: repeat-x;\n filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)\",argb(@start-color),argb(@end-color))); // IE9 and down\n }\n\n .directional(@start-color: #555; @end-color: #333; @deg: 45deg) {\n background-repeat: repeat-x;\n background-image: -webkit-linear-gradient(@deg, @start-color, @end-color); // Safari 5.1-6, Chrome 10+\n background-image: -o-linear-gradient(@deg, @start-color, @end-color); // Opera 12\n background-image: linear-gradient(@deg, @start-color, @end-color); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+\n }\n .horizontal-three-colors(@start-color: #00b3ee; @mid-color: #7a43b6; @color-stop: 50%; @end-color: #c3325f) {\n background-image: -webkit-linear-gradient(left, @start-color, @mid-color @color-stop, @end-color);\n background-image: -o-linear-gradient(left, @start-color, @mid-color @color-stop, @end-color);\n background-image: linear-gradient(to right, @start-color, @mid-color @color-stop, @end-color);\n background-repeat: no-repeat;\n filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=1)\",argb(@start-color),argb(@end-color))); // IE9 and down, gets no color-stop at all for proper fallback\n }\n .vertical-three-colors(@start-color: #00b3ee; @mid-color: #7a43b6; @color-stop: 50%; @end-color: #c3325f) {\n background-image: -webkit-linear-gradient(@start-color, @mid-color @color-stop, @end-color);\n background-image: -o-linear-gradient(@start-color, @mid-color @color-stop, @end-color);\n background-image: linear-gradient(@start-color, @mid-color @color-stop, @end-color);\n background-repeat: no-repeat;\n filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)\",argb(@start-color),argb(@end-color))); // IE9 and down, gets no color-stop at all for proper fallback\n }\n .radial(@inner-color: #555; @outer-color: #333) {\n background-image: -webkit-radial-gradient(circle, @inner-color, @outer-color);\n background-image: radial-gradient(circle, @inner-color, @outer-color);\n background-repeat: no-repeat;\n }\n .striped(@color: rgba(255,255,255,.15); @angle: 45deg) {\n background-image: -webkit-linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent);\n background-image: -o-linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent);\n background-image: linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent);\n }\n}\n","// Reset filters for IE\n//\n// When you need to remove a gradient background, do not forget to use this to reset\n// the IE filter for IE9 and below.\n\n.reset-filter() {\n filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(enabled = false)\"));\n}\n"]}
\ No newline at end of file
diff --git a/applications/auto-scale/gui/src/vendor/bootstrap-css/css/bootstrap-theme.min.css b/applications/auto-scale/gui/src/vendor/bootstrap-css/css/bootstrap-theme.min.css
deleted file mode 100644
index cefa3d1..0000000
--- a/applications/auto-scale/gui/src/vendor/bootstrap-css/css/bootstrap-theme.min.css
+++ /dev/null
@@ -1,5 +0,0 @@
-/*!
- * Bootstrap v3.3.4 (http://getbootstrap.com)
- * Copyright 2011-2015 Twitter, Inc.
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
- */.btn-danger,.btn-default,.btn-info,.btn-primary,.btn-success,.btn-warning{text-shadow:0 -1px 0 rgba(0,0,0,.2);-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 1px rgba(0,0,0,.075)}.btn-danger.active,.btn-danger:active,.btn-default.active,.btn-default:active,.btn-info.active,.btn-info:active,.btn-primary.active,.btn-primary:active,.btn-success.active,.btn-success:active,.btn-warning.active,.btn-warning:active{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn-danger .badge,.btn-default .badge,.btn-info .badge,.btn-primary .badge,.btn-success .badge,.btn-warning .badge{text-shadow:none}.btn.active,.btn:active{background-image:none}.btn-default{text-shadow:0 1px 0 #fff;background-image:-webkit-linear-gradient(top,#fff 0,#e0e0e0 100%);background-image:-o-linear-gradient(top,#fff 0,#e0e0e0 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#fff),to(#e0e0e0));background-image:linear-gradient(to bottom,#fff 0,#e0e0e0 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe0e0e0', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#dbdbdb;border-color:#ccc}.btn-default:focus,.btn-default:hover{background-color:#e0e0e0;background-position:0 -15px}.btn-default.active,.btn-default:active{background-color:#e0e0e0;border-color:#dbdbdb}.btn-default.disabled,.btn-default:disabled,.btn-default[disabled]{background-color:#e0e0e0;background-image:none}.btn-primary{background-image:-webkit-linear-gradient(top,#337ab7 0,#265a88 100%);background-image:-o-linear-gradient(top,#337ab7 0,#265a88 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#265a88));background-image:linear-gradient(to bottom,#337ab7 0,#265a88 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff265a88', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#245580}.btn-primary:focus,.btn-primary:hover{background-color:#265a88;background-position:0 -15px}.btn-primary.active,.btn-primary:active{background-color:#265a88;border-color:#245580}.btn-primary.disabled,.btn-primary:disabled,.btn-primary[disabled]{background-color:#265a88;background-image:none}.btn-success{background-image:-webkit-linear-gradient(top,#5cb85c 0,#419641 100%);background-image:-o-linear-gradient(top,#5cb85c 0,#419641 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#5cb85c),to(#419641));background-image:linear-gradient(to bottom,#5cb85c 0,#419641 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff419641', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#3e8f3e}.btn-success:focus,.btn-success:hover{background-color:#419641;background-position:0 -15px}.btn-success.active,.btn-success:active{background-color:#419641;border-color:#3e8f3e}.btn-success.disabled,.btn-success:disabled,.btn-success[disabled]{background-color:#419641;background-image:none}.btn-info{background-image:-webkit-linear-gradient(top,#5bc0de 0,#2aabd2 100%);background-image:-o-linear-gradient(top,#5bc0de 0,#2aabd2 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#5bc0de),to(#2aabd2));background-image:linear-gradient(to bottom,#5bc0de 0,#2aabd2 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2aabd2', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#28a4c9}.btn-info:focus,.btn-info:hover{background-color:#2aabd2;background-position:0 -15px}.btn-info.active,.btn-info:active{background-color:#2aabd2;border-color:#28a4c9}.btn-info.disabled,.btn-info:disabled,.btn-info[disabled]{background-color:#2aabd2;background-image:none}.btn-warning{background-image:-webkit-linear-gradient(top,#f0ad4e 0,#eb9316 100%);background-image:-o-linear-gradient(top,#f0ad4e 0,#eb9316 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f0ad4e),to(#eb9316));background-image:linear-gradient(to bottom,#f0ad4e 0,#eb9316 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffeb9316', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#e38d13}.btn-warning:focus,.btn-warning:hover{background-color:#eb9316;background-position:0 -15px}.btn-warning.active,.btn-warning:active{background-color:#eb9316;border-color:#e38d13}.btn-warning.disabled,.btn-warning:disabled,.btn-warning[disabled]{background-color:#eb9316;background-image:none}.btn-danger{background-image:-webkit-linear-gradient(top,#d9534f 0,#c12e2a 100%);background-image:-o-linear-gradient(top,#d9534f 0,#c12e2a 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#d9534f),to(#c12e2a));background-image:linear-gradient(to bottom,#d9534f 0,#c12e2a 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc12e2a', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#b92c28}.btn-danger:focus,.btn-danger:hover{background-color:#c12e2a;background-position:0 -15px}.btn-danger.active,.btn-danger:active{background-color:#c12e2a;border-color:#b92c28}.btn-danger.disabled,.btn-danger:disabled,.btn-danger[disabled]{background-color:#c12e2a;background-image:none}.img-thumbnail,.thumbnail{-webkit-box-shadow:0 1px 2px rgba(0,0,0,.075);box-shadow:0 1px 2px rgba(0,0,0,.075)}.dropdown-menu>li>a:focus,.dropdown-menu>li>a:hover{background-color:#e8e8e8;background-image:-webkit-linear-gradient(top,#f5f5f5 0,#e8e8e8 100%);background-image:-o-linear-gradient(top,#f5f5f5 0,#e8e8e8 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f5f5f5),to(#e8e8e8));background-image:linear-gradient(to bottom,#f5f5f5 0,#e8e8e8 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);background-repeat:repeat-x}.dropdown-menu>.active>a,.dropdown-menu>.active>a:focus,.dropdown-menu>.active>a:hover{background-color:#2e6da4;background-image:-webkit-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-o-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#2e6da4));background-image:linear-gradient(to bottom,#337ab7 0,#2e6da4 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);background-repeat:repeat-x}.navbar-default{background-image:-webkit-linear-gradient(top,#fff 0,#f8f8f8 100%);background-image:-o-linear-gradient(top,#fff 0,#f8f8f8 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#fff),to(#f8f8f8));background-image:linear-gradient(to bottom,#fff 0,#f8f8f8 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff8f8f8', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-radius:4px;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 5px rgba(0,0,0,.075);box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 5px rgba(0,0,0,.075)}.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.open>a{background-image:-webkit-linear-gradient(top,#dbdbdb 0,#e2e2e2 100%);background-image:-o-linear-gradient(top,#dbdbdb 0,#e2e2e2 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#dbdbdb),to(#e2e2e2));background-image:linear-gradient(to bottom,#dbdbdb 0,#e2e2e2 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdbdbdb', endColorstr='#ffe2e2e2', GradientType=0);background-repeat:repeat-x;-webkit-box-shadow:inset 0 3px 9px rgba(0,0,0,.075);box-shadow:inset 0 3px 9px rgba(0,0,0,.075)}.navbar-brand,.navbar-nav>li>a{text-shadow:0 1px 0 rgba(255,255,255,.25)}.navbar-inverse{background-image:-webkit-linear-gradient(top,#3c3c3c 0,#222 100%);background-image:-o-linear-gradient(top,#3c3c3c 0,#222 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#3c3c3c),to(#222));background-image:linear-gradient(to bottom,#3c3c3c 0,#222 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff3c3c3c', endColorstr='#ff222222', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x}.navbar-inverse .navbar-nav>.active>a,.navbar-inverse .navbar-nav>.open>a{background-image:-webkit-linear-gradient(top,#080808 0,#0f0f0f 100%);background-image:-o-linear-gradient(top,#080808 0,#0f0f0f 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#080808),to(#0f0f0f));background-image:linear-gradient(to bottom,#080808 0,#0f0f0f 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff080808', endColorstr='#ff0f0f0f', GradientType=0);background-repeat:repeat-x;-webkit-box-shadow:inset 0 3px 9px rgba(0,0,0,.25);box-shadow:inset 0 3px 9px rgba(0,0,0,.25)}.navbar-inverse .navbar-brand,.navbar-inverse .navbar-nav>li>a{text-shadow:0 -1px 0 rgba(0,0,0,.25)}.navbar-fixed-bottom,.navbar-fixed-top,.navbar-static-top{border-radius:0}@media (max-width:767px){.navbar .navbar-nav .open .dropdown-menu>.active>a,.navbar .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar .navbar-nav .open .dropdown-menu>.active>a:hover{color:#fff;background-image:-webkit-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-o-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#2e6da4));background-image:linear-gradient(to bottom,#337ab7 0,#2e6da4 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);background-repeat:repeat-x}}.alert{text-shadow:0 1px 0 rgba(255,255,255,.2);-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 2px rgba(0,0,0,.05);box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 2px rgba(0,0,0,.05)}.alert-success{background-image:-webkit-linear-gradient(top,#dff0d8 0,#c8e5bc 100%);background-image:-o-linear-gradient(top,#dff0d8 0,#c8e5bc 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#dff0d8),to(#c8e5bc));background-image:linear-gradient(to bottom,#dff0d8 0,#c8e5bc 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffc8e5bc', GradientType=0);background-repeat:repeat-x;border-color:#b2dba1}.alert-info{background-image:-webkit-linear-gradient(top,#d9edf7 0,#b9def0 100%);background-image:-o-linear-gradient(top,#d9edf7 0,#b9def0 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#d9edf7),to(#b9def0));background-image:linear-gradient(to bottom,#d9edf7 0,#b9def0 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffb9def0', GradientType=0);background-repeat:repeat-x;border-color:#9acfea}.alert-warning{background-image:-webkit-linear-gradient(top,#fcf8e3 0,#f8efc0 100%);background-image:-o-linear-gradient(top,#fcf8e3 0,#f8efc0 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#fcf8e3),to(#f8efc0));background-image:linear-gradient(to bottom,#fcf8e3 0,#f8efc0 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fff8efc0', GradientType=0);background-repeat:repeat-x;border-color:#f5e79e}.alert-danger{background-image:-webkit-linear-gradient(top,#f2dede 0,#e7c3c3 100%);background-image:-o-linear-gradient(top,#f2dede 0,#e7c3c3 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f2dede),to(#e7c3c3));background-image:linear-gradient(to bottom,#f2dede 0,#e7c3c3 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffe7c3c3', GradientType=0);background-repeat:repeat-x;border-color:#dca7a7}.progress{background-image:-webkit-linear-gradient(top,#ebebeb 0,#f5f5f5 100%);background-image:-o-linear-gradient(top,#ebebeb 0,#f5f5f5 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#ebebeb),to(#f5f5f5));background-image:linear-gradient(to bottom,#ebebeb 0,#f5f5f5 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffebebeb', endColorstr='#fff5f5f5', GradientType=0);background-repeat:repeat-x}.progress-bar{background-image:-webkit-linear-gradient(top,#337ab7 0,#286090 100%);background-image:-o-linear-gradient(top,#337ab7 0,#286090 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#286090));background-image:linear-gradient(to bottom,#337ab7 0,#286090 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff286090', GradientType=0);background-repeat:repeat-x}.progress-bar-success{background-image:-webkit-linear-gradient(top,#5cb85c 0,#449d44 100%);background-image:-o-linear-gradient(top,#5cb85c 0,#449d44 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#5cb85c),to(#449d44));background-image:linear-gradient(to bottom,#5cb85c 0,#449d44 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff449d44', GradientType=0);background-repeat:repeat-x}.progress-bar-info{background-image:-webkit-linear-gradient(top,#5bc0de 0,#31b0d5 100%);background-image:-o-linear-gradient(top,#5bc0de 0,#31b0d5 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#5bc0de),to(#31b0d5));background-image:linear-gradient(to bottom,#5bc0de 0,#31b0d5 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff31b0d5', GradientType=0);background-repeat:repeat-x}.progress-bar-warning{background-image:-webkit-linear-gradient(top,#f0ad4e 0,#ec971f 100%);background-image:-o-linear-gradient(top,#f0ad4e 0,#ec971f 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f0ad4e),to(#ec971f));background-image:linear-gradient(to bottom,#f0ad4e 0,#ec971f 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffec971f', GradientType=0);background-repeat:repeat-x}.progress-bar-danger{background-image:-webkit-linear-gradient(top,#d9534f 0,#c9302c 100%);background-image:-o-linear-gradient(top,#d9534f 0,#c9302c 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#d9534f),to(#c9302c));background-image:linear-gradient(to bottom,#d9534f 0,#c9302c 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc9302c', GradientType=0);background-repeat:repeat-x}.progress-bar-striped{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.list-group{border-radius:4px;-webkit-box-shadow:0 1px 2px rgba(0,0,0,.075);box-shadow:0 1px 2px rgba(0,0,0,.075)}.list-group-item.active,.list-group-item.active:focus,.list-group-item.active:hover{text-shadow:0 -1px 0 #286090;background-image:-webkit-linear-gradient(top,#337ab7 0,#2b669a 100%);background-image:-o-linear-gradient(top,#337ab7 0,#2b669a 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#2b669a));background-image:linear-gradient(to bottom,#337ab7 0,#2b669a 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2b669a', GradientType=0);background-repeat:repeat-x;border-color:#2b669a}.list-group-item.active .badge,.list-group-item.active:focus .badge,.list-group-item.active:hover .badge{text-shadow:none}.panel{-webkit-box-shadow:0 1px 2px rgba(0,0,0,.05);box-shadow:0 1px 2px rgba(0,0,0,.05)}.panel-default>.panel-heading{background-image:-webkit-linear-gradient(top,#f5f5f5 0,#e8e8e8 100%);background-image:-o-linear-gradient(top,#f5f5f5 0,#e8e8e8 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f5f5f5),to(#e8e8e8));background-image:linear-gradient(to bottom,#f5f5f5 0,#e8e8e8 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);background-repeat:repeat-x}.panel-primary>.panel-heading{background-image:-webkit-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-o-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#2e6da4));background-image:linear-gradient(to bottom,#337ab7 0,#2e6da4 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);background-repeat:repeat-x}.panel-success>.panel-heading{background-image:-webkit-linear-gradient(top,#dff0d8 0,#d0e9c6 100%);background-image:-o-linear-gradient(top,#dff0d8 0,#d0e9c6 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#dff0d8),to(#d0e9c6));background-image:linear-gradient(to bottom,#dff0d8 0,#d0e9c6 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffd0e9c6', GradientType=0);background-repeat:repeat-x}.panel-info>.panel-heading{background-image:-webkit-linear-gradient(top,#d9edf7 0,#c4e3f3 100%);background-image:-o-linear-gradient(top,#d9edf7 0,#c4e3f3 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#d9edf7),to(#c4e3f3));background-image:linear-gradient(to bottom,#d9edf7 0,#c4e3f3 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffc4e3f3', GradientType=0);background-repeat:repeat-x}.panel-warning>.panel-heading{background-image:-webkit-linear-gradient(top,#fcf8e3 0,#faf2cc 100%);background-image:-o-linear-gradient(top,#fcf8e3 0,#faf2cc 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#fcf8e3),to(#faf2cc));background-image:linear-gradient(to bottom,#fcf8e3 0,#faf2cc 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fffaf2cc', GradientType=0);background-repeat:repeat-x}.panel-danger>.panel-heading{background-image:-webkit-linear-gradient(top,#f2dede 0,#ebcccc 100%);background-image:-o-linear-gradient(top,#f2dede 0,#ebcccc 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f2dede),to(#ebcccc));background-image:linear-gradient(to bottom,#f2dede 0,#ebcccc 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffebcccc', GradientType=0);background-repeat:repeat-x}.well{background-image:-webkit-linear-gradient(top,#e8e8e8 0,#f5f5f5 100%);background-image:-o-linear-gradient(top,#e8e8e8 0,#f5f5f5 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#e8e8e8),to(#f5f5f5));background-image:linear-gradient(to bottom,#e8e8e8 0,#f5f5f5 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe8e8e8', endColorstr='#fff5f5f5', GradientType=0);background-repeat:repeat-x;border-color:#dcdcdc;-webkit-box-shadow:inset 0 1px 3px rgba(0,0,0,.05),0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 3px rgba(0,0,0,.05),0 1px 0 rgba(255,255,255,.1)}
\ No newline at end of file
diff --git a/applications/auto-scale/gui/src/vendor/bootstrap-css/css/bootstrap.css.map b/applications/auto-scale/gui/src/vendor/bootstrap-css/css/bootstrap.css.map
deleted file mode 100644
index 2fd84f3..0000000
--- a/applications/auto-scale/gui/src/vendor/bootstrap-css/css/bootstrap.css.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["bootstrap.css","less/normalize.less","less/print.less","less/glyphicons.less","less/scaffolding.less","less/mixins/vendor-prefixes.less","less/mixins/tab-focus.less","less/mixins/image.less","less/type.less","less/mixins/text-emphasis.less","less/mixins/background-variant.less","less/mixins/text-overflow.less","less/code.less","less/grid.less","less/mixins/grid.less","less/mixins/grid-framework.less","less/tables.less","less/mixins/table-row.less","less/forms.less","less/mixins/forms.less","less/buttons.less","less/mixins/buttons.less","less/mixins/opacity.less","less/component-animations.less","less/dropdowns.less","less/mixins/nav-divider.less","less/mixins/reset-filter.less","less/button-groups.less","less/mixins/border-radius.less","less/input-groups.less","less/navs.less","less/navbar.less","less/mixins/nav-vertical-align.less","less/utilities.less","less/breadcrumbs.less","less/pagination.less","less/mixins/pagination.less","less/pager.less","less/labels.less","less/mixins/labels.less","less/badges.less","less/jumbotron.less","less/thumbnails.less","less/alerts.less","less/mixins/alerts.less","less/progress-bars.less","less/mixins/gradients.less","less/mixins/progress-bar.less","less/media.less","less/list-group.less","less/mixins/list-group.less","less/panels.less","less/mixins/panels.less","less/responsive-embed.less","less/wells.less","less/close.less","less/modals.less","less/tooltip.less","less/popovers.less","less/carousel.less","less/mixins/clearfix.less","less/mixins/center-block.less","less/mixins/hide-text.less","less/responsive-utilities.less","less/mixins/responsive-visibility.less"],"names":[],"mappings":"AAAA,6DAA4D;ACQ5D;EACE,yBAAA;EACA,4BAAA;EACA,gCAAA;EDND;ACaD;EACE,WAAA;EDXD;ACwBD;;;;;;;;;;;;;EAaE,gBAAA;EDtBD;AC8BD;;;;EAIE,uBAAA;EACA,0BAAA;ED5BD;ACoCD;EACE,eAAA;EACA,WAAA;EDlCD;AC0CD;;EAEE,eAAA;EDxCD;ACkDD;EACE,+BAAA;EDhDD;ACuDD;;EAEE,YAAA;EDrDD;AC+DD;EACE,2BAAA;ED7DD;ACoED;;EAEE,mBAAA;EDlED;ACyED;EACE,oBAAA;EDvED;AC+ED;EACE,gBAAA;EACA,kBAAA;ED7ED;ACoFD;EACE,kBAAA;EACA,aAAA;EDlFD;ACyFD;EACE,gBAAA;EDvFD;AC8FD;;EAEE,gBAAA;EACA,gBAAA;EACA,oBAAA;EACA,0BAAA;ED5FD;AC+FD;EACE,aAAA;ED7FD;ACgGD;EACE,iBAAA;ED9FD;ACwGD;EACE,WAAA;EDtGD;AC6GD;EACE,k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7DD;Eet7DD;IACE,2BAAA;Ifw7DD;Eez7DD;IACE,kBAAA;If27DD;Ee57DD;IACE,2BAAA;If87DD;Ee/7DD;IACE,2BAAA;Ifi8DD;Eel8DD;IACE,kBAAA;Ifo8DD;Eer8DD;IACE,2BAAA;Ifu8DD;Eex8DD;IACE,0BAAA;If08DD;Ee38DD;IACE,iBAAA;If68DD;EACF;Aal8DD;EE9CI;IACE,aAAA;Ifm/DH;Ee5+DD;IACE,aAAA;If8+DD;Ee/+DD;IACE,qBAAA;Ifi/DD;Eel/DD;IACE,qBAAA;Ifo/DD;Eer/DD;IACE,YAAA;Ifu/DD;Eex/DD;IACE,qBAAA;If0/DD;Ee3/DD;IACE,qBAAA;If6/DD;Ee9/DD;IACE,YAAA;IfggED;EejgED;IACE,qBAAA;IfmgED;EepgED;IACE,qBAAA;IfsgED;EevgED;IACE,YAAA;IfygED;Ee1gED;IACE,qBAAA;If4gED;Ee7gED;IACE,oBAAA;If+gED;EejgED;IACE,aAAA;IfmgED;EepgED;IACE,qBAAA;IfsgED;EevgED;IACE,qBAAA;IfygED;Ee1gED;IACE,YAAA;If4gED;Ee7gED;IACE,qBAAA;If+gED;EehhED;IACE,qBAAA;IfkhED;EenhED;IACE,YAAA;IfqhED;EethED;IACE,qBAAA;IfwhED;EezhED;IACE,qBAAA;If2hED;Ee5hED;IACE,YAAA;If8hED;Ee/hED;IACE,qBAAA;IfiiED;EeliED;IACE,oBAAA;IfoiED;EehiED;IACE,aAAA;IfkiED;EeljED;IACE,YAAA;IfojED;EerjED;IACE,oBAAA;IfujED;EexjED;IACE,oBAAA;If0jED;Ee3jED;IACE,WAAA;If6jED;Ee9jED;IACE,oBAAA;IfgkED;EejkED;IACE,oBAAA;IfmkED;EepkED;IACE,WAAA;IfskED;EevkED;IACE,oBAAA;IfykED;Ee1kED;IACE,oBAAA;If4kED;Ee7kED;IACE,WAAA;If+kED;EehlED;IACE,oBAAA;IfklED;EenlED;IACE,mBAAA;IfqlED;EejlED;IACE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ICtIE,0BAAA;IhEk1MC;EACF;A+DxsMD;EAAA;IC3IE,0BAAA;IhEu1MC;EACF;A+DrsMD;ECnJE,0BAAA;EhE21MD;A+DlsMD;EAAA;ICjKE,2BAAA;IhEu2MC;EgEt2MD;IAAU,gBAAA;IhEy2MT;EgEx2MD;IAAU,+BAAA;IhE22MT;EgE12MD;;IACU,gCAAA;IhE62MT;EACF;A+DhtMD;EACE,0BAAA;E/DktMD;A+D7sMD;EAAA;IAFI,2BAAA;I/DmtMD;EACF;A+DjtMD;EACE,0BAAA;E/DmtMD;A+D9sMD;EAAA;IAFI,4BAAA;I/DotMD;EACF;A+DltMD;EACE,0BAAA;E/DotMD;A+D/sMD;EAAA;IAFI,kCAAA;I/DqtMD;EACF;A+D9sMD;EAAA;ICpLE,0BAAA;IhEs4MC;EACF","file":"bootstrap.css","sourcesContent":["/*! normalize.css v3.0.2 | MIT License | git.io/normalize */\nhtml {\n font-family: sans-serif;\n -ms-text-size-adjust: 100%;\n -webkit-text-size-adjust: 100%;\n}\nbody {\n margin: 0;\n}\narticle,\naside,\ndetails,\nfigcaption,\nfigure,\nfooter,\nheader,\nhgroup,\nmain,\nmenu,\nnav,\nsection,\nsummary {\n display: block;\n}\naudio,\ncanvas,\nprogress,\nvideo {\n display: inline-block;\n vertical-align: baseline;\n}\naudio:not([controls]) {\n display: none;\n height: 0;\n}\n[hidden],\ntemplate {\n display: none;\n}\na {\n background-color: transparent;\n}\na:active,\na:hover {\n outline: 0;\n}\nabbr[title] {\n border-bottom: 1px dotted;\n}\nb,\nstrong {\n font-weight: bold;\n}\ndfn {\n font-style: italic;\n}\nh1 {\n font-size: 2em;\n margin: 0.67em 0;\n}\nmark {\n background: #ff0;\n color: #000;\n}\nsmall {\n font-size: 80%;\n}\nsub,\nsup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n}\nsup {\n top: -0.5em;\n}\nsub {\n bottom: -0.25em;\n}\nimg {\n border: 0;\n}\nsvg:not(:root) {\n overflow: hidden;\n}\nfigure {\n margin: 1em 40px;\n}\nhr {\n -moz-box-sizing: content-box;\n box-sizing: content-box;\n height: 0;\n}\npre {\n overflow: auto;\n}\ncode,\nkbd,\npre,\nsamp {\n font-family: monospace, monospace;\n font-size: 1em;\n}\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n color: inherit;\n font: inherit;\n margin: 0;\n}\nbutton {\n overflow: visible;\n}\nbutton,\nselect {\n text-transform: none;\n}\nbutton,\nhtml input[type=\"button\"],\ninput[type=\"reset\"],\ninput[type=\"submit\"] {\n -webkit-appearance: button;\n cursor: pointer;\n}\nbutton[disabled],\nhtml input[disabled] {\n cursor: default;\n}\nbutton::-moz-focus-inner,\ninput::-moz-focus-inner {\n border: 0;\n padding: 0;\n}\ninput {\n line-height: normal;\n}\ninput[type=\"checkbox\"],\ninput[type=\"radio\"] {\n box-sizing: border-box;\n padding: 0;\n}\ninput[type=\"number\"]::-webkit-inner-spin-button,\ninput[type=\"number\"]::-webkit-outer-spin-button {\n height: auto;\n}\ninput[type=\"search\"] {\n -webkit-appearance: textfield;\n -moz-box-sizing: content-box;\n -webkit-box-sizing: content-box;\n box-sizing: content-box;\n}\ninput[type=\"search\"]::-webkit-search-cancel-button,\ninput[type=\"search\"]::-webkit-search-decoration {\n -webkit-appearance: none;\n}\nfieldset {\n border: 1px solid #c0c0c0;\n margin: 0 2px;\n padding: 0.35em 0.625em 0.75em;\n}\nlegend {\n border: 0;\n padding: 0;\n}\ntextarea {\n overflow: auto;\n}\noptgroup {\n font-weight: bold;\n}\ntable {\n border-collapse: collapse;\n border-spacing: 0;\n}\ntd,\nth {\n padding: 0;\n}\n/*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */\n@media print {\n *,\n *:before,\n *:after {\n background: transparent !important;\n color: #000 !important;\n box-shadow: none !important;\n text-shadow: none !important;\n }\n a,\n a:visited {\n text-decoration: underline;\n }\n a[href]:after {\n content: \" (\" attr(href) \")\";\n }\n abbr[title]:after {\n content: \" (\" attr(title) \")\";\n }\n a[href^=\"#\"]:after,\n a[href^=\"javascript:\"]:after {\n content: \"\";\n }\n pre,\n blockquote {\n border: 1px solid #999;\n page-break-inside: avoid;\n }\n thead {\n display: table-header-group;\n }\n tr,\n img {\n page-break-inside: avoid;\n }\n img {\n max-width: 100% !important;\n }\n p,\n h2,\n h3 {\n orphans: 3;\n widows: 3;\n }\n h2,\n h3 {\n page-break-after: avoid;\n }\n select {\n background: #fff !important;\n }\n .navbar {\n display: none;\n }\n .btn > .caret,\n .dropup > .btn > .caret {\n border-top-color: #000 !important;\n }\n .label {\n border: 1px solid #000;\n }\n .table {\n border-collapse: collapse !important;\n }\n .table td,\n .table th {\n background-color: #fff !important;\n }\n .table-bordered th,\n .table-bordered td {\n border: 1px solid #ddd !important;\n }\n}\n@font-face {\n font-family: 'Glyphicons Halflings';\n src: url('../fonts/glyphicons-halflings-regular.eot');\n src: url('../fonts/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'), url('../fonts/glyphicons-halflings-regular.woff2') format('woff2'), url('../fonts/glyphicons-halflings-regular.woff') format('woff'), url('../fonts/glyphicons-halflings-regular.ttf') format('truetype'), url('../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular') format('svg');\n}\n.glyphicon {\n position: relative;\n top: 1px;\n display: inline-block;\n font-family: 'Glyphicons Halflings';\n font-style: normal;\n font-weight: normal;\n line-height: 1;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n.glyphicon-asterisk:before {\n content: \"\\2a\";\n}\n.glyphicon-plus:before {\n content: \"\\2b\";\n}\n.glyphicon-euro:before,\n.glyphicon-eur:before {\n content: \"\\20ac\";\n}\n.glyphicon-minus:before {\n content: \"\\2212\";\n}\n.glyphicon-cloud:before {\n content: \"\\2601\";\n}\n.glyphicon-envelope:before {\n content: \"\\2709\";\n}\n.glyphicon-pencil:before {\n content: \"\\270f\";\n}\n.glyphicon-glass:before {\n content: \"\\e001\";\n}\n.glyphicon-music:before {\n content: \"\\e002\";\n}\n.glyphicon-search:before {\n content: \"\\e003\";\n}\n.glyphicon-heart:before {\n content: \"\\e005\";\n}\n.glyphicon-star:before {\n content: \"\\e006\";\n}\n.glyphicon-star-empty:before {\n content: \"\\e007\";\n}\n.glyphicon-user:before {\n content: \"\\e008\";\n}\n.glyphicon-film:before {\n content: \"\\e009\";\n}\n.glyphicon-th-large:before {\n content: \"\\e010\";\n}\n.glyphicon-th:before {\n content: \"\\e011\";\n}\n.glyphicon-th-list:before {\n content: \"\\e012\";\n}\n.glyphicon-ok:before {\n content: \"\\e013\";\n}\n.glyphicon-remove:before {\n content: \"\\e014\";\n}\n.glyphicon-zoom-in:before {\n content: \"\\e015\";\n}\n.glyphicon-zoom-out:before {\n content: \"\\e016\";\n}\n.glyphicon-off:before {\n content: \"\\e017\";\n}\n.glyphicon-signal:before {\n content: \"\\e018\";\n}\n.glyphicon-cog:before {\n content: \"\\e019\";\n}\n.glyphicon-trash:before {\n content: \"\\e020\";\n}\n.glyphicon-home:before {\n content: \"\\e021\";\n}\n.glyphicon-file:before {\n content: \"\\e022\";\n}\n.glyphicon-time:before {\n content: \"\\e023\";\n}\n.glyphicon-road:before {\n content: \"\\e024\";\n}\n.glyphicon-download-alt:before {\n content: \"\\e025\";\n}\n.glyphicon-download:before {\n content: \"\\e026\";\n}\n.glyphicon-upload:before {\n content: \"\\e027\";\n}\n.glyphicon-inbox:before {\n content: \"\\e028\";\n}\n.glyphicon-play-circle:before {\n content: \"\\e029\";\n}\n.glyphicon-repeat:before {\n content: \"\\e030\";\n}\n.glyphicon-refresh:before {\n content: \"\\e031\";\n}\n.glyphicon-list-alt:before {\n content: \"\\e032\";\n}\n.glyphicon-lock:before {\n content: \"\\e033\";\n}\n.glyphicon-flag:before {\n content: \"\\e034\";\n}\n.glyphicon-headphones:before {\n content: \"\\e035\";\n}\n.glyphicon-volume-off:before {\n content: \"\\e036\";\n}\n.glyphicon-volume-down:before {\n content: \"\\e037\";\n}\n.glyphicon-volume-up:before {\n content: \"\\e038\";\n}\n.glyphicon-qrcode:before {\n content: \"\\e039\";\n}\n.glyphicon-barcode:before {\n content: \"\\e040\";\n}\n.glyphicon-tag:before {\n content: \"\\e041\";\n}\n.glyphicon-tags:before {\n content: \"\\e042\";\n}\n.glyphicon-book:before {\n content: \"\\e043\";\n}\n.glyphicon-bookmark:before {\n content: \"\\e044\";\n}\n.glyphicon-print:before {\n content: \"\\e045\";\n}\n.glyphicon-camera:before {\n content: \"\\e046\";\n}\n.glyphicon-font:before {\n content: \"\\e047\";\n}\n.glyphicon-bold:before {\n content: \"\\e048\";\n}\n.glyphicon-italic:before {\n content: \"\\e049\";\n}\n.glyphicon-text-height:before {\n content: \"\\e050\";\n}\n.glyphicon-text-width:before {\n content: \"\\e051\";\n}\n.glyphicon-align-left:before {\n content: \"\\e052\";\n}\n.glyphicon-align-center:before {\n content: \"\\e053\";\n}\n.glyphicon-align-right:before {\n content: \"\\e054\";\n}\n.glyphicon-align-justify:before {\n content: \"\\e055\";\n}\n.glyphicon-list:before {\n content: \"\\e056\";\n}\n.glyphicon-indent-left:before {\n content: \"\\e057\";\n}\n.glyphicon-indent-right:before {\n content: \"\\e058\";\n}\n.glyphicon-facetime-video:before {\n content: \"\\e059\";\n}\n.glyphicon-picture:before {\n content: \"\\e060\";\n}\n.glyphicon-map-marker:before {\n content: \"\\e062\";\n}\n.glyphicon-adjust:before {\n content: \"\\e063\";\n}\n.glyphicon-tint:before {\n content: \"\\e064\";\n}\n.glyphicon-edit:before {\n content: \"\\e065\";\n}\n.glyphicon-share:before {\n content: \"\\e066\";\n}\n.glyphicon-check:before {\n content: \"\\e067\";\n}\n.glyphicon-move:before {\n content: \"\\e068\";\n}\n.glyphicon-step-backward:before {\n content: \"\\e069\";\n}\n.glyphicon-fast-backward:before {\n content: \"\\e070\";\n}\n.glyphicon-backward:before {\n content: \"\\e071\";\n}\n.glyphicon-play:before {\n content: \"\\e072\";\n}\n.glyphicon-pause:before {\n content: \"\\e073\";\n}\n.glyphicon-stop:before {\n content: \"\\e074\";\n}\n.glyphicon-forward:before {\n content: \"\\e075\";\n}\n.glyphicon-fast-forward:before {\n content: \"\\e076\";\n}\n.glyphicon-step-forward:before {\n content: \"\\e077\";\n}\n.glyphicon-eject:before {\n content: \"\\e078\";\n}\n.glyphicon-chevron-left:before {\n content: \"\\e079\";\n}\n.glyphicon-chevron-right:before {\n content: \"\\e080\";\n}\n.glyphicon-plus-sign:before {\n content: \"\\e081\";\n}\n.glyphicon-minus-sign:before {\n content: \"\\e082\";\n}\n.glyphicon-remove-sign:before {\n content: \"\\e083\";\n}\n.glyphicon-ok-sign:before {\n content: \"\\e084\";\n}\n.glyphicon-question-sign:before {\n content: \"\\e085\";\n}\n.glyphicon-info-sign:before {\n content: \"\\e086\";\n}\n.glyphicon-screenshot:before {\n content: \"\\e087\";\n}\n.glyphicon-remove-circle:before {\n content: \"\\e088\";\n}\n.glyphicon-ok-circle:before {\n content: \"\\e089\";\n}\n.glyphicon-ban-circle:before {\n content: \"\\e090\";\n}\n.glyphicon-arrow-left:before {\n content: \"\\e091\";\n}\n.glyphicon-arrow-right:before {\n content: \"\\e092\";\n}\n.glyphicon-arrow-up:before {\n content: \"\\e093\";\n}\n.glyphicon-arrow-down:before {\n content: \"\\e094\";\n}\n.glyphicon-share-alt:before {\n content: \"\\e095\";\n}\n.glyphicon-resize-full:before {\n content: \"\\e096\";\n}\n.glyphicon-resize-small:before {\n content: \"\\e097\";\n}\n.glyphicon-exclamation-sign:before {\n content: \"\\e101\";\n}\n.glyphicon-gift:before {\n content: \"\\e102\";\n}\n.glyphicon-leaf:before {\n content: \"\\e103\";\n}\n.glyphicon-fire:before {\n content: \"\\e104\";\n}\n.glyphicon-eye-open:before {\n content: \"\\e105\";\n}\n.glyphicon-eye-close:before {\n content: \"\\e106\";\n}\n.glyphicon-warning-sign:before {\n content: \"\\e107\";\n}\n.glyphicon-plane:before {\n content: \"\\e108\";\n}\n.glyphicon-calendar:before {\n content: \"\\e109\";\n}\n.glyphicon-random:before {\n content: \"\\e110\";\n}\n.glyphicon-comment:before {\n content: \"\\e111\";\n}\n.glyphicon-magnet:before {\n content: \"\\e112\";\n}\n.glyphicon-chevron-up:before {\n content: \"\\e113\";\n}\n.glyphicon-chevron-down:before {\n content: \"\\e114\";\n}\n.glyphicon-retweet:before {\n content: \"\\e115\";\n}\n.glyphicon-shopping-cart:before {\n content: \"\\e116\";\n}\n.glyphicon-folder-close:before {\n content: \"\\e117\";\n}\n.glyphicon-folder-open:before {\n content: \"\\e118\";\n}\n.glyphicon-resize-vertical:before {\n content: \"\\e119\";\n}\n.glyphicon-resize-horizontal:before {\n content: \"\\e120\";\n}\n.glyphicon-hdd:before {\n content: \"\\e121\";\n}\n.glyphicon-bullhorn:before {\n content: \"\\e122\";\n}\n.glyphicon-bell:before {\n content: \"\\e123\";\n}\n.glyphicon-certificate:before {\n content: \"\\e124\";\n}\n.glyphicon-thumbs-up:before {\n content: \"\\e125\";\n}\n.glyphicon-thumbs-down:before {\n content: \"\\e126\";\n}\n.glyphicon-hand-right:before {\n content: \"\\e127\";\n}\n.glyphicon-hand-left:before {\n content: \"\\e128\";\n}\n.glyphicon-hand-up:before {\n content: \"\\e129\";\n}\n.glyphicon-hand-down:before {\n content: \"\\e130\";\n}\n.glyphicon-circle-arrow-right:before {\n content: \"\\e131\";\n}\n.glyphicon-circle-arrow-left:before {\n content: \"\\e132\";\n}\n.glyphicon-circle-arrow-up:before {\n content: \"\\e133\";\n}\n.glyphicon-circle-arrow-down:before {\n content: \"\\e134\";\n}\n.glyphicon-globe:before {\n content: \"\\e135\";\n}\n.glyphicon-wrench:before {\n content: \"\\e136\";\n}\n.glyphicon-tasks:before {\n content: \"\\e137\";\n}\n.glyphicon-filter:before {\n content: \"\\e138\";\n}\n.glyphicon-briefcase:before {\n content: \"\\e139\";\n}\n.glyphicon-fullscreen:before {\n content: \"\\e140\";\n}\n.glyphicon-dashboard:before {\n content: \"\\e141\";\n}\n.glyphicon-paperclip:before {\n content: \"\\e142\";\n}\n.glyphicon-heart-empty:before {\n content: \"\\e143\";\n}\n.glyphicon-link:before {\n content: \"\\e144\";\n}\n.glyphicon-phone:before {\n content: \"\\e145\";\n}\n.glyphicon-pushpin:before {\n content: \"\\e146\";\n}\n.glyphicon-usd:before {\n content: \"\\e148\";\n}\n.glyphicon-gbp:before {\n content: \"\\e149\";\n}\n.glyphicon-sort:before {\n content: \"\\e150\";\n}\n.glyphicon-sort-by-alphabet:before {\n content: \"\\e151\";\n}\n.glyphicon-sort-by-alphabet-alt:before {\n content: \"\\e152\";\n}\n.glyphicon-sort-by-order:before {\n content: \"\\e153\";\n}\n.glyphicon-sort-by-order-alt:before {\n content: \"\\e154\";\n}\n.glyphicon-sort-by-attributes:before {\n content: \"\\e155\";\n}\n.glyphicon-sort-by-attributes-alt:before {\n content: \"\\e156\";\n}\n.glyphicon-unchecked:before {\n content: \"\\e157\";\n}\n.glyphicon-expand:before {\n content: \"\\e158\";\n}\n.glyphicon-collapse-down:before {\n content: \"\\e159\";\n}\n.glyphicon-collapse-up:before {\n content: \"\\e160\";\n}\n.glyphicon-log-in:before {\n content: \"\\e161\";\n}\n.glyphicon-flash:before {\n content: \"\\e162\";\n}\n.glyphicon-log-out:before {\n content: \"\\e163\";\n}\n.glyphicon-new-window:before {\n content: \"\\e164\";\n}\n.glyphicon-record:before {\n content: \"\\e165\";\n}\n.glyphicon-save:before {\n content: \"\\e166\";\n}\n.glyphicon-open:before {\n content: \"\\e167\";\n}\n.glyphicon-saved:before {\n content: \"\\e168\";\n}\n.glyphicon-import:before {\n content: \"\\e169\";\n}\n.glyphicon-export:before {\n content: \"\\e170\";\n}\n.glyphicon-send:before {\n content: \"\\e171\";\n}\n.glyphicon-floppy-disk:before {\n content: \"\\e172\";\n}\n.glyphicon-floppy-saved:before {\n content: \"\\e173\";\n}\n.glyphicon-floppy-remove:before {\n content: \"\\e174\";\n}\n.glyphicon-floppy-save:before {\n content: \"\\e175\";\n}\n.glyphicon-floppy-open:before {\n content: \"\\e176\";\n}\n.glyphicon-credit-card:before {\n content: \"\\e177\";\n}\n.glyphicon-transfer:before {\n content: \"\\e178\";\n}\n.glyphicon-cutlery:before {\n content: \"\\e179\";\n}\n.glyphicon-header:before {\n content: \"\\e180\";\n}\n.glyphicon-compressed:before {\n content: \"\\e181\";\n}\n.glyphicon-earphone:before {\n content: \"\\e182\";\n}\n.glyphicon-phone-alt:before {\n content: \"\\e183\";\n}\n.glyphicon-tower:before {\n content: \"\\e184\";\n}\n.glyphicon-stats:before {\n content: \"\\e185\";\n}\n.glyphicon-sd-video:before {\n content: \"\\e186\";\n}\n.glyphicon-hd-video:before {\n content: \"\\e187\";\n}\n.glyphicon-subtitles:before {\n content: \"\\e188\";\n}\n.glyphicon-sound-stereo:before {\n content: \"\\e189\";\n}\n.glyphicon-sound-dolby:before {\n content: \"\\e190\";\n}\n.glyphicon-sound-5-1:before {\n content: \"\\e191\";\n}\n.glyphicon-sound-6-1:before {\n content: \"\\e192\";\n}\n.glyphicon-sound-7-1:before {\n content: \"\\e193\";\n}\n.glyphicon-copyright-mark:before {\n content: \"\\e194\";\n}\n.glyphicon-registration-mark:before {\n content: \"\\e195\";\n}\n.glyphicon-cloud-download:before {\n content: \"\\e197\";\n}\n.glyphicon-cloud-upload:before {\n content: \"\\e198\";\n}\n.glyphicon-tree-conifer:before {\n content: \"\\e199\";\n}\n.glyphicon-tree-deciduous:before {\n content: \"\\e200\";\n}\n.glyphicon-cd:before {\n content: \"\\e201\";\n}\n.glyphicon-save-file:before {\n content: \"\\e202\";\n}\n.glyphicon-open-file:before {\n content: \"\\e203\";\n}\n.glyphicon-level-up:before {\n content: \"\\e204\";\n}\n.glyphicon-copy:before {\n content: \"\\e205\";\n}\n.glyphicon-paste:before {\n content: \"\\e206\";\n}\n.glyphicon-alert:before {\n content: \"\\e209\";\n}\n.glyphicon-equalizer:before {\n content: \"\\e210\";\n}\n.glyphicon-king:before {\n content: \"\\e211\";\n}\n.glyphicon-queen:before {\n content: \"\\e212\";\n}\n.glyphicon-pawn:before {\n content: \"\\e213\";\n}\n.glyphicon-bishop:before {\n content: \"\\e214\";\n}\n.glyphicon-knight:before {\n content: \"\\e215\";\n}\n.glyphicon-baby-formula:before {\n content: \"\\e216\";\n}\n.glyphicon-tent:before {\n content: \"\\26fa\";\n}\n.glyphicon-blackboard:before {\n content: \"\\e218\";\n}\n.glyphicon-bed:before {\n content: \"\\e219\";\n}\n.glyphicon-apple:before {\n content: \"\\f8ff\";\n}\n.glyphicon-erase:before {\n content: \"\\e221\";\n}\n.glyphicon-hourglass:before {\n content: \"\\231b\";\n}\n.glyphicon-lamp:before {\n content: \"\\e223\";\n}\n.glyphicon-duplicate:before {\n content: \"\\e224\";\n}\n.glyphicon-piggy-bank:before {\n content: \"\\e225\";\n}\n.glyphicon-scissors:before {\n content: \"\\e226\";\n}\n.glyphicon-bitcoin:before {\n content: \"\\e227\";\n}\n.glyphicon-btc:before {\n content: \"\\e227\";\n}\n.glyphicon-xbt:before {\n content: \"\\e227\";\n}\n.glyphicon-yen:before {\n content: \"\\00a5\";\n}\n.glyphicon-jpy:before {\n content: \"\\00a5\";\n}\n.glyphicon-ruble:before {\n content: \"\\20bd\";\n}\n.glyphicon-rub:before {\n content: \"\\20bd\";\n}\n.glyphicon-scale:before {\n content: \"\\e230\";\n}\n.glyphicon-ice-lolly:before {\n content: \"\\e231\";\n}\n.glyphicon-ice-lolly-tasted:before {\n content: \"\\e232\";\n}\n.glyphicon-education:before {\n content: \"\\e233\";\n}\n.glyphicon-option-horizontal:before {\n content: \"\\e234\";\n}\n.glyphicon-option-vertical:before {\n content: \"\\e235\";\n}\n.glyphicon-menu-hamburger:before {\n content: \"\\e236\";\n}\n.glyphicon-modal-window:before {\n content: \"\\e237\";\n}\n.glyphicon-oil:before {\n content: \"\\e238\";\n}\n.glyphicon-grain:before {\n content: \"\\e239\";\n}\n.glyphicon-sunglasses:before {\n content: \"\\e240\";\n}\n.glyphicon-text-size:before {\n content: \"\\e241\";\n}\n.glyphicon-text-color:before {\n content: \"\\e242\";\n}\n.glyphicon-text-background:before {\n content: \"\\e243\";\n}\n.glyphicon-object-align-top:before {\n content: \"\\e244\";\n}\n.glyphicon-object-align-bottom:before {\n content: \"\\e245\";\n}\n.glyphicon-object-align-horizontal:before {\n content: \"\\e246\";\n}\n.glyphicon-object-align-left:before {\n content: \"\\e247\";\n}\n.glyphicon-object-align-vertical:before {\n content: \"\\e248\";\n}\n.glyphicon-object-align-right:before {\n content: \"\\e249\";\n}\n.glyphicon-triangle-right:before {\n content: \"\\e250\";\n}\n.glyphicon-triangle-left:before {\n content: \"\\e251\";\n}\n.glyphicon-triangle-bottom:before {\n content: \"\\e252\";\n}\n.glyphicon-triangle-top:before {\n content: \"\\e253\";\n}\n.glyphicon-console:before {\n content: \"\\e254\";\n}\n.glyphicon-superscript:before {\n content: \"\\e255\";\n}\n.glyphicon-subscript:before {\n content: \"\\e256\";\n}\n.glyphicon-menu-left:before {\n content: \"\\e257\";\n}\n.glyphicon-menu-right:before {\n content: \"\\e258\";\n}\n.glyphicon-menu-down:before {\n content: \"\\e259\";\n}\n.glyphicon-menu-up:before {\n content: \"\\e260\";\n}\n* {\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n}\n*:before,\n*:after {\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n}\nhtml {\n font-size: 10px;\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n}\nbody {\n font-family: \"Helvetica Neue\", Helvetica, Arial, sans-serif;\n font-size: 14px;\n line-height: 1.42857143;\n color: #333333;\n background-color: #ffffff;\n}\ninput,\nbutton,\nselect,\ntextarea {\n font-family: inherit;\n font-size: inherit;\n line-height: inherit;\n}\na {\n color: #337ab7;\n text-decoration: none;\n}\na:hover,\na:focus {\n color: #23527c;\n text-decoration: underline;\n}\na:focus {\n outline: thin dotted;\n outline: 5px auto -webkit-focus-ring-color;\n outline-offset: -2px;\n}\nfigure {\n margin: 0;\n}\nimg {\n vertical-align: middle;\n}\n.img-responsive,\n.thumbnail > img,\n.thumbnail a > img,\n.carousel-inner > .item > img,\n.carousel-inner > .item > a > img {\n display: block;\n max-width: 100%;\n height: auto;\n}\n.img-rounded {\n border-radius: 6px;\n}\n.img-thumbnail {\n padding: 4px;\n line-height: 1.42857143;\n background-color: #ffffff;\n border: 1px solid #dddddd;\n border-radius: 4px;\n -webkit-transition: all 0.2s ease-in-out;\n -o-transition: all 0.2s ease-in-out;\n transition: all 0.2s ease-in-out;\n display: inline-block;\n max-width: 100%;\n height: auto;\n}\n.img-circle {\n border-radius: 50%;\n}\nhr {\n margin-top: 20px;\n margin-bottom: 20px;\n border: 0;\n border-top: 1px solid #eeeeee;\n}\n.sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n margin: -1px;\n padding: 0;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n border: 0;\n}\n.sr-only-focusable:active,\n.sr-only-focusable:focus {\n position: static;\n width: auto;\n height: auto;\n margin: 0;\n overflow: visible;\n clip: auto;\n}\n[role=\"button\"] {\n cursor: pointer;\n}\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\n.h1,\n.h2,\n.h3,\n.h4,\n.h5,\n.h6 {\n font-family: inherit;\n font-weight: 500;\n line-height: 1.1;\n color: inherit;\n}\nh1 small,\nh2 small,\nh3 small,\nh4 small,\nh5 small,\nh6 small,\n.h1 small,\n.h2 small,\n.h3 small,\n.h4 small,\n.h5 small,\n.h6 small,\nh1 .small,\nh2 .small,\nh3 .small,\nh4 .small,\nh5 .small,\nh6 .small,\n.h1 .small,\n.h2 .small,\n.h3 .small,\n.h4 .small,\n.h5 .small,\n.h6 .small {\n font-weight: normal;\n line-height: 1;\n color: #777777;\n}\nh1,\n.h1,\nh2,\n.h2,\nh3,\n.h3 {\n margin-top: 20px;\n margin-bottom: 10px;\n}\nh1 small,\n.h1 small,\nh2 small,\n.h2 small,\nh3 small,\n.h3 small,\nh1 .small,\n.h1 .small,\nh2 .small,\n.h2 .small,\nh3 .small,\n.h3 .small {\n font-size: 65%;\n}\nh4,\n.h4,\nh5,\n.h5,\nh6,\n.h6 {\n margin-top: 10px;\n margin-bottom: 10px;\n}\nh4 small,\n.h4 small,\nh5 small,\n.h5 small,\nh6 small,\n.h6 small,\nh4 .small,\n.h4 .small,\nh5 .small,\n.h5 .small,\nh6 .small,\n.h6 .small {\n font-size: 75%;\n}\nh1,\n.h1 {\n font-size: 36px;\n}\nh2,\n.h2 {\n font-size: 30px;\n}\nh3,\n.h3 {\n font-size: 24px;\n}\nh4,\n.h4 {\n font-size: 18px;\n}\nh5,\n.h5 {\n font-size: 14px;\n}\nh6,\n.h6 {\n font-size: 12px;\n}\np {\n margin: 0 0 10px;\n}\n.lead {\n margin-bottom: 20px;\n font-size: 16px;\n font-weight: 300;\n line-height: 1.4;\n}\n@media (min-width: 768px) {\n .lead {\n font-size: 21px;\n }\n}\nsmall,\n.small {\n font-size: 85%;\n}\nmark,\n.mark {\n background-color: #fcf8e3;\n padding: .2em;\n}\n.text-left {\n text-align: left;\n}\n.text-right {\n text-align: right;\n}\n.text-center {\n text-align: center;\n}\n.text-justify {\n text-align: justify;\n}\n.text-nowrap {\n white-space: nowrap;\n}\n.text-lowercase {\n text-transform: lowercase;\n}\n.text-uppercase {\n text-transform: uppercase;\n}\n.text-capitalize {\n text-transform: capitalize;\n}\n.text-muted {\n color: #777777;\n}\n.text-primary {\n color: #337ab7;\n}\na.text-primary:hover {\n color: #286090;\n}\n.text-success {\n color: #3c763d;\n}\na.text-success:hover {\n color: #2b542c;\n}\n.text-info {\n color: #31708f;\n}\na.text-info:hover {\n color: #245269;\n}\n.text-warning {\n color: #8a6d3b;\n}\na.text-warning:hover {\n color: #66512c;\n}\n.text-danger {\n color: #a94442;\n}\na.text-danger:hover {\n color: #843534;\n}\n.bg-primary {\n color: #fff;\n background-color: #337ab7;\n}\na.bg-primary:hover {\n background-color: #286090;\n}\n.bg-success {\n background-color: #dff0d8;\n}\na.bg-success:hover {\n background-color: #c1e2b3;\n}\n.bg-info {\n background-color: #d9edf7;\n}\na.bg-info:hover {\n background-color: #afd9ee;\n}\n.bg-warning {\n background-color: #fcf8e3;\n}\na.bg-warning:hover {\n background-color: #f7ecb5;\n}\n.bg-danger {\n background-color: #f2dede;\n}\na.bg-danger:hover {\n background-color: #e4b9b9;\n}\n.page-header {\n padding-bottom: 9px;\n margin: 40px 0 20px;\n border-bottom: 1px solid #eeeeee;\n}\nul,\nol {\n margin-top: 0;\n margin-bottom: 10px;\n}\nul ul,\nol ul,\nul ol,\nol ol {\n margin-bottom: 0;\n}\n.list-unstyled {\n padding-left: 0;\n list-style: none;\n}\n.list-inline {\n padding-left: 0;\n list-style: none;\n margin-left: -5px;\n}\n.list-inline > li {\n display: inline-block;\n padding-left: 5px;\n padding-right: 5px;\n}\ndl {\n margin-top: 0;\n margin-bottom: 20px;\n}\ndt,\ndd {\n line-height: 1.42857143;\n}\ndt {\n font-weight: bold;\n}\ndd {\n margin-left: 0;\n}\n@media (min-width: 768px) {\n .dl-horizontal dt {\n float: left;\n width: 160px;\n clear: left;\n text-align: right;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n .dl-horizontal dd {\n margin-left: 180px;\n }\n}\nabbr[title],\nabbr[data-original-title] {\n cursor: help;\n border-bottom: 1px dotted #777777;\n}\n.initialism {\n font-size: 90%;\n text-transform: uppercase;\n}\nblockquote {\n padding: 10px 20px;\n margin: 0 0 20px;\n font-size: 17.5px;\n border-left: 5px solid #eeeeee;\n}\nblockquote p:last-child,\nblockquote ul:last-child,\nblockquote ol:last-child {\n margin-bottom: 0;\n}\nblockquote footer,\nblockquote small,\nblockquote .small {\n display: block;\n font-size: 80%;\n line-height: 1.42857143;\n color: #777777;\n}\nblockquote footer:before,\nblockquote small:before,\nblockquote .small:before {\n content: '\\2014 \\00A0';\n}\n.blockquote-reverse,\nblockquote.pull-right {\n padding-right: 15px;\n padding-left: 0;\n border-right: 5px solid #eeeeee;\n border-left: 0;\n text-align: right;\n}\n.blockquote-reverse footer:before,\nblockquote.pull-right footer:before,\n.blockquote-reverse small:before,\nblockquote.pull-right small:before,\n.blockquote-reverse .small:before,\nblockquote.pull-right .small:before {\n content: '';\n}\n.blockquote-reverse footer:after,\nblockquote.pull-right footer:after,\n.blockquote-reverse small:after,\nblockquote.pull-right small:after,\n.blockquote-reverse .small:after,\nblockquote.pull-right .small:after {\n content: '\\00A0 \\2014';\n}\naddress {\n margin-bottom: 20px;\n font-style: normal;\n line-height: 1.42857143;\n}\ncode,\nkbd,\npre,\nsamp {\n font-family: Menlo, Monaco, Consolas, \"Courier New\", monospace;\n}\ncode {\n padding: 2px 4px;\n font-size: 90%;\n color: #c7254e;\n background-color: #f9f2f4;\n border-radius: 4px;\n}\nkbd {\n padding: 2px 4px;\n font-size: 90%;\n color: #ffffff;\n background-color: #333333;\n border-radius: 3px;\n box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.25);\n}\nkbd kbd {\n padding: 0;\n font-size: 100%;\n font-weight: bold;\n box-shadow: none;\n}\npre {\n display: block;\n padding: 9.5px;\n margin: 0 0 10px;\n font-size: 13px;\n line-height: 1.42857143;\n word-break: break-all;\n word-wrap: break-word;\n color: #333333;\n background-color: #f5f5f5;\n border: 1px solid #cccccc;\n border-radius: 4px;\n}\npre code {\n padding: 0;\n font-size: inherit;\n color: inherit;\n white-space: pre-wrap;\n background-color: transparent;\n border-radius: 0;\n}\n.pre-scrollable {\n max-height: 340px;\n overflow-y: scroll;\n}\n.container {\n margin-right: auto;\n margin-left: auto;\n padding-left: 15px;\n padding-right: 15px;\n}\n@media (min-width: 768px) {\n .container {\n width: 750px;\n }\n}\n@media (min-width: 992px) {\n .container {\n width: 970px;\n }\n}\n@media (min-width: 1200px) {\n .container {\n width: 1170px;\n }\n}\n.container-fluid {\n margin-right: auto;\n margin-left: auto;\n padding-left: 15px;\n padding-right: 15px;\n}\n.row {\n margin-left: -15px;\n margin-right: -15px;\n}\n.col-xs-1, .col-sm-1, .col-md-1, .col-lg-1, .col-xs-2, .col-sm-2, .col-md-2, .col-lg-2, .col-xs-3, .col-sm-3, .col-md-3, .col-lg-3, .col-xs-4, .col-sm-4, .col-md-4, .col-lg-4, .col-xs-5, .col-sm-5, .col-md-5, .col-lg-5, .col-xs-6, .col-sm-6, .col-md-6, .col-lg-6, .col-xs-7, .col-sm-7, .col-md-7, .col-lg-7, .col-xs-8, .col-sm-8, .col-md-8, .col-lg-8, .col-xs-9, .col-sm-9, .col-md-9, .col-lg-9, .col-xs-10, .col-sm-10, .col-md-10, .col-lg-10, .col-xs-11, .col-sm-11, .col-md-11, .col-lg-11, .col-xs-12, .col-sm-12, .col-md-12, .col-lg-12 {\n position: relative;\n min-height: 1px;\n padding-left: 15px;\n padding-right: 15px;\n}\n.col-xs-1, .col-xs-2, .col-xs-3, .col-xs-4, .col-xs-5, .col-xs-6, .col-xs-7, .col-xs-8, .col-xs-9, .col-xs-10, .col-xs-11, .col-xs-12 {\n float: left;\n}\n.col-xs-12 {\n width: 100%;\n}\n.col-xs-11 {\n width: 91.66666667%;\n}\n.col-xs-10 {\n width: 83.33333333%;\n}\n.col-xs-9 {\n width: 75%;\n}\n.col-xs-8 {\n width: 66.66666667%;\n}\n.col-xs-7 {\n width: 58.33333333%;\n}\n.col-xs-6 {\n width: 50%;\n}\n.col-xs-5 {\n width: 41.66666667%;\n}\n.col-xs-4 {\n width: 33.33333333%;\n}\n.col-xs-3 {\n width: 25%;\n}\n.col-xs-2 {\n width: 16.66666667%;\n}\n.col-xs-1 {\n width: 8.33333333%;\n}\n.col-xs-pull-12 {\n right: 100%;\n}\n.col-xs-pull-11 {\n right: 91.66666667%;\n}\n.col-xs-pull-10 {\n right: 83.33333333%;\n}\n.col-xs-pull-9 {\n right: 75%;\n}\n.col-xs-pull-8 {\n right: 66.66666667%;\n}\n.col-xs-pull-7 {\n right: 58.33333333%;\n}\n.col-xs-pull-6 {\n right: 50%;\n}\n.col-xs-pull-5 {\n right: 41.66666667%;\n}\n.col-xs-pull-4 {\n right: 33.33333333%;\n}\n.col-xs-pull-3 {\n right: 25%;\n}\n.col-xs-pull-2 {\n right: 16.66666667%;\n}\n.col-xs-pull-1 {\n right: 8.33333333%;\n}\n.col-xs-pull-0 {\n right: auto;\n}\n.col-xs-push-12 {\n left: 100%;\n}\n.col-xs-push-11 {\n left: 91.66666667%;\n}\n.col-xs-push-10 {\n left: 83.33333333%;\n}\n.col-xs-push-9 {\n left: 75%;\n}\n.col-xs-push-8 {\n left: 66.66666667%;\n}\n.col-xs-push-7 {\n left: 58.33333333%;\n}\n.col-xs-push-6 {\n left: 50%;\n}\n.col-xs-push-5 {\n left: 41.66666667%;\n}\n.col-xs-push-4 {\n left: 33.33333333%;\n}\n.col-xs-push-3 {\n left: 25%;\n}\n.col-xs-push-2 {\n left: 16.66666667%;\n}\n.col-xs-push-1 {\n left: 8.33333333%;\n}\n.col-xs-push-0 {\n left: auto;\n}\n.col-xs-offset-12 {\n margin-left: 100%;\n}\n.col-xs-offset-11 {\n margin-left: 91.66666667%;\n}\n.col-xs-offset-10 {\n margin-left: 83.33333333%;\n}\n.col-xs-offset-9 {\n margin-left: 75%;\n}\n.col-xs-offset-8 {\n margin-left: 66.66666667%;\n}\n.col-xs-offset-7 {\n margin-left: 58.33333333%;\n}\n.col-xs-offset-6 {\n margin-left: 50%;\n}\n.col-xs-offset-5 {\n margin-left: 41.66666667%;\n}\n.col-xs-offset-4 {\n margin-left: 33.33333333%;\n}\n.col-xs-offset-3 {\n margin-left: 25%;\n}\n.col-xs-offset-2 {\n margin-left: 16.66666667%;\n}\n.col-xs-offset-1 {\n margin-left: 8.33333333%;\n}\n.col-xs-offset-0 {\n margin-left: 0%;\n}\n@media (min-width: 768px) {\n .col-sm-1, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9, .col-sm-10, .col-sm-11, .col-sm-12 {\n float: left;\n }\n .col-sm-12 {\n width: 100%;\n }\n .col-sm-11 {\n width: 91.66666667%;\n }\n .col-sm-10 {\n width: 83.33333333%;\n }\n .col-sm-9 {\n width: 75%;\n }\n .col-sm-8 {\n width: 66.66666667%;\n }\n .col-sm-7 {\n width: 58.33333333%;\n }\n .col-sm-6 {\n width: 50%;\n }\n .col-sm-5 {\n width: 41.66666667%;\n }\n .col-sm-4 {\n width: 33.33333333%;\n }\n .col-sm-3 {\n width: 25%;\n }\n .col-sm-2 {\n width: 16.66666667%;\n }\n .col-sm-1 {\n width: 8.33333333%;\n }\n .col-sm-pull-12 {\n right: 100%;\n }\n .col-sm-pull-11 {\n right: 91.66666667%;\n }\n .col-sm-pull-10 {\n right: 83.33333333%;\n }\n .col-sm-pull-9 {\n right: 75%;\n }\n .col-sm-pull-8 {\n right: 66.66666667%;\n }\n .col-sm-pull-7 {\n right: 58.33333333%;\n }\n .col-sm-pull-6 {\n right: 50%;\n }\n .col-sm-pull-5 {\n right: 41.66666667%;\n }\n .col-sm-pull-4 {\n right: 33.33333333%;\n }\n .col-sm-pull-3 {\n right: 25%;\n }\n .col-sm-pull-2 {\n right: 16.66666667%;\n }\n .col-sm-pull-1 {\n right: 8.33333333%;\n }\n .col-sm-pull-0 {\n right: auto;\n }\n .col-sm-push-12 {\n left: 100%;\n }\n .col-sm-push-11 {\n left: 91.66666667%;\n }\n .col-sm-push-10 {\n left: 83.33333333%;\n }\n .col-sm-push-9 {\n left: 75%;\n }\n .col-sm-push-8 {\n left: 66.66666667%;\n }\n .col-sm-push-7 {\n left: 58.33333333%;\n }\n .col-sm-push-6 {\n left: 50%;\n }\n .col-sm-push-5 {\n left: 41.66666667%;\n }\n .col-sm-push-4 {\n left: 33.33333333%;\n }\n .col-sm-push-3 {\n left: 25%;\n }\n .col-sm-push-2 {\n left: 16.66666667%;\n }\n .col-sm-push-1 {\n left: 8.33333333%;\n }\n .col-sm-push-0 {\n left: auto;\n }\n .col-sm-offset-12 {\n margin-left: 100%;\n }\n .col-sm-offset-11 {\n margin-left: 91.66666667%;\n }\n .col-sm-offset-10 {\n margin-left: 83.33333333%;\n }\n .col-sm-offset-9 {\n margin-left: 75%;\n }\n .col-sm-offset-8 {\n margin-left: 66.66666667%;\n }\n .col-sm-offset-7 {\n margin-left: 58.33333333%;\n }\n .col-sm-offset-6 {\n margin-left: 50%;\n }\n .col-sm-offset-5 {\n margin-left: 41.66666667%;\n }\n .col-sm-offset-4 {\n margin-left: 33.33333333%;\n }\n .col-sm-offset-3 {\n margin-left: 25%;\n }\n .col-sm-offset-2 {\n margin-left: 16.66666667%;\n }\n .col-sm-offset-1 {\n margin-left: 8.33333333%;\n }\n .col-sm-offset-0 {\n margin-left: 0%;\n }\n}\n@media (min-width: 992px) {\n .col-md-1, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8, .col-md-9, .col-md-10, .col-md-11, .col-md-12 {\n float: left;\n }\n .col-md-12 {\n width: 100%;\n }\n .col-md-11 {\n width: 91.66666667%;\n }\n .col-md-10 {\n width: 83.33333333%;\n }\n .col-md-9 {\n width: 75%;\n }\n .col-md-8 {\n width: 66.66666667%;\n }\n .col-md-7 {\n width: 58.33333333%;\n }\n .col-md-6 {\n width: 50%;\n }\n .col-md-5 {\n width: 41.66666667%;\n }\n .col-md-4 {\n width: 33.33333333%;\n }\n .col-md-3 {\n width: 25%;\n }\n .col-md-2 {\n width: 16.66666667%;\n }\n .col-md-1 {\n width: 8.33333333%;\n }\n .col-md-pull-12 {\n right: 100%;\n }\n .col-md-pull-11 {\n right: 91.66666667%;\n }\n .col-md-pull-10 {\n right: 83.33333333%;\n }\n .col-md-pull-9 {\n right: 75%;\n }\n .col-md-pull-8 {\n right: 66.66666667%;\n }\n .col-md-pull-7 {\n right: 58.33333333%;\n }\n .col-md-pull-6 {\n right: 50%;\n }\n .col-md-pull-5 {\n right: 41.66666667%;\n }\n .col-md-pull-4 {\n right: 33.33333333%;\n }\n .col-md-pull-3 {\n right: 25%;\n }\n .col-md-pull-2 {\n right: 16.66666667%;\n }\n .col-md-pull-1 {\n right: 8.33333333%;\n }\n .col-md-pull-0 {\n right: auto;\n }\n .col-md-push-12 {\n left: 100%;\n }\n .col-md-push-11 {\n left: 91.66666667%;\n }\n .col-md-push-10 {\n left: 83.33333333%;\n }\n .col-md-push-9 {\n left: 75%;\n }\n .col-md-push-8 {\n left: 66.66666667%;\n }\n .col-md-push-7 {\n left: 58.33333333%;\n }\n .col-md-push-6 {\n left: 50%;\n }\n .col-md-push-5 {\n left: 41.66666667%;\n }\n .col-md-push-4 {\n left: 33.33333333%;\n }\n .col-md-push-3 {\n left: 25%;\n }\n .col-md-push-2 {\n left: 16.66666667%;\n }\n .col-md-push-1 {\n left: 8.33333333%;\n }\n .col-md-push-0 {\n left: auto;\n }\n .col-md-offset-12 {\n margin-left: 100%;\n }\n .col-md-offset-11 {\n margin-left: 91.66666667%;\n }\n .col-md-offset-10 {\n margin-left: 83.33333333%;\n }\n .col-md-offset-9 {\n margin-left: 75%;\n }\n .col-md-offset-8 {\n margin-left: 66.66666667%;\n }\n .col-md-offset-7 {\n margin-left: 58.33333333%;\n }\n .col-md-offset-6 {\n margin-left: 50%;\n }\n .col-md-offset-5 {\n margin-left: 41.66666667%;\n }\n .col-md-offset-4 {\n margin-left: 33.33333333%;\n }\n .col-md-offset-3 {\n margin-left: 25%;\n }\n .col-md-offset-2 {\n margin-left: 16.66666667%;\n }\n .col-md-offset-1 {\n margin-left: 8.33333333%;\n }\n .col-md-offset-0 {\n margin-left: 0%;\n }\n}\n@media (min-width: 1200px) {\n .col-lg-1, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6, .col-lg-7, .col-lg-8, .col-lg-9, .col-lg-10, .col-lg-11, .col-lg-12 {\n float: left;\n }\n .col-lg-12 {\n width: 100%;\n }\n .col-lg-11 {\n width: 91.66666667%;\n }\n .col-lg-10 {\n width: 83.33333333%;\n }\n .col-lg-9 {\n width: 75%;\n }\n .col-lg-8 {\n width: 66.66666667%;\n }\n .col-lg-7 {\n width: 58.33333333%;\n }\n .col-lg-6 {\n width: 50%;\n }\n .col-lg-5 {\n width: 41.66666667%;\n }\n .col-lg-4 {\n width: 33.33333333%;\n }\n .col-lg-3 {\n width: 25%;\n }\n .col-lg-2 {\n width: 16.66666667%;\n }\n .col-lg-1 {\n width: 8.33333333%;\n }\n .col-lg-pull-12 {\n right: 100%;\n }\n .col-lg-pull-11 {\n right: 91.66666667%;\n }\n .col-lg-pull-10 {\n right: 83.33333333%;\n }\n .col-lg-pull-9 {\n right: 75%;\n }\n .col-lg-pull-8 {\n right: 66.66666667%;\n }\n .col-lg-pull-7 {\n right: 58.33333333%;\n }\n .col-lg-pull-6 {\n right: 50%;\n }\n .col-lg-pull-5 {\n right: 41.66666667%;\n }\n .col-lg-pull-4 {\n right: 33.33333333%;\n }\n .col-lg-pull-3 {\n right: 25%;\n }\n .col-lg-pull-2 {\n right: 16.66666667%;\n }\n .col-lg-pull-1 {\n right: 8.33333333%;\n }\n .col-lg-pull-0 {\n right: auto;\n }\n .col-lg-push-12 {\n left: 100%;\n }\n .col-lg-push-11 {\n left: 91.66666667%;\n }\n .col-lg-push-10 {\n left: 83.33333333%;\n }\n .col-lg-push-9 {\n left: 75%;\n }\n .col-lg-push-8 {\n left: 66.66666667%;\n }\n .col-lg-push-7 {\n left: 58.33333333%;\n }\n .col-lg-push-6 {\n left: 50%;\n }\n .col-lg-push-5 {\n left: 41.66666667%;\n }\n .col-lg-push-4 {\n left: 33.33333333%;\n }\n .col-lg-push-3 {\n left: 25%;\n }\n .col-lg-push-2 {\n left: 16.66666667%;\n }\n .col-lg-push-1 {\n left: 8.33333333%;\n }\n .col-lg-push-0 {\n left: auto;\n }\n .col-lg-offset-12 {\n margin-left: 100%;\n }\n .col-lg-offset-11 {\n margin-left: 91.66666667%;\n }\n .col-lg-offset-10 {\n margin-left: 83.33333333%;\n }\n .col-lg-offset-9 {\n margin-left: 75%;\n }\n .col-lg-offset-8 {\n margin-left: 66.66666667%;\n }\n .col-lg-offset-7 {\n margin-left: 58.33333333%;\n }\n .col-lg-offset-6 {\n margin-left: 50%;\n }\n .col-lg-offset-5 {\n margin-left: 41.66666667%;\n }\n .col-lg-offset-4 {\n margin-left: 33.33333333%;\n }\n .col-lg-offset-3 {\n margin-left: 25%;\n }\n .col-lg-offset-2 {\n margin-left: 16.66666667%;\n }\n .col-lg-offset-1 {\n margin-left: 8.33333333%;\n }\n .col-lg-offset-0 {\n margin-left: 0%;\n }\n}\ntable {\n background-color: transparent;\n}\ncaption {\n padding-top: 8px;\n padding-bottom: 8px;\n color: #777777;\n text-align: left;\n}\nth {\n text-align: left;\n}\n.table {\n width: 100%;\n max-width: 100%;\n margin-bottom: 20px;\n}\n.table > thead > tr > th,\n.table > tbody > tr > th,\n.table > tfoot > tr > th,\n.table > thead > tr > td,\n.table > tbody > tr > td,\n.table > tfoot > tr > td {\n padding: 8px;\n line-height: 1.42857143;\n vertical-align: top;\n border-top: 1px solid #dddddd;\n}\n.table > thead > tr > th {\n vertical-align: bottom;\n border-bottom: 2px solid #dddddd;\n}\n.table > caption + thead > tr:first-child > th,\n.table > colgroup + thead > tr:first-child > th,\n.table > thead:first-child > tr:first-child > th,\n.table > caption + thead > tr:first-child > td,\n.table > colgroup + thead > tr:first-child > td,\n.table > thead:first-child > tr:first-child > td {\n border-top: 0;\n}\n.table > tbody + tbody {\n border-top: 2px solid #dddddd;\n}\n.table .table {\n background-color: #ffffff;\n}\n.table-condensed > thead > tr > th,\n.table-condensed > tbody > tr > th,\n.table-condensed > tfoot > tr > th,\n.table-condensed > thead > tr > td,\n.table-condensed > tbody > tr > td,\n.table-condensed > tfoot > tr > td {\n padding: 5px;\n}\n.table-bordered {\n border: 1px solid #dddddd;\n}\n.table-bordered > thead > tr > th,\n.table-bordered > tbody > tr > th,\n.table-bordered > tfoot > tr > th,\n.table-bordered > thead > tr > td,\n.table-bordered > tbody > tr > td,\n.table-bordered > tfoot > tr > td {\n border: 1px solid #dddddd;\n}\n.table-bordered > thead > tr > th,\n.table-bordered > thead > tr > td {\n border-bottom-width: 2px;\n}\n.table-striped > tbody > tr:nth-of-type(odd) {\n background-color: #f9f9f9;\n}\n.table-hover > tbody > tr:hover {\n background-color: #f5f5f5;\n}\ntable col[class*=\"col-\"] {\n position: static;\n float: none;\n display: table-column;\n}\ntable td[class*=\"col-\"],\ntable th[class*=\"col-\"] {\n position: static;\n float: none;\n display: table-cell;\n}\n.table > thead > tr > td.active,\n.table > tbody > tr > td.active,\n.table > tfoot > tr > td.active,\n.table > thead > tr > th.active,\n.table > tbody > tr > th.active,\n.table > tfoot > tr > th.active,\n.table > thead > tr.active > td,\n.table > tbody > tr.active > td,\n.table > tfoot > tr.active > td,\n.table > thead > tr.active > th,\n.table > tbody > tr.active > th,\n.table > tfoot > tr.active > th {\n background-color: #f5f5f5;\n}\n.table-hover > tbody > tr > td.active:hover,\n.table-hover > tbody > tr > th.active:hover,\n.table-hover > tbody > tr.active:hover > td,\n.table-hover > tbody > tr:hover > .active,\n.table-hover > tbody > tr.active:hover > th {\n background-color: #e8e8e8;\n}\n.table > thead > tr > td.success,\n.table > tbody > tr > td.success,\n.table > tfoot > tr > td.success,\n.table > thead > tr > th.success,\n.table > tbody > tr > th.success,\n.table > tfoot > tr > th.success,\n.table > thead > tr.success > td,\n.table > tbody > tr.success > td,\n.table > tfoot > tr.success > td,\n.table > thead > tr.success > th,\n.table > tbody > tr.success > th,\n.table > tfoot > tr.success > th {\n background-color: #dff0d8;\n}\n.table-hover > tbody > tr > td.success:hover,\n.table-hover > tbody > tr > th.success:hover,\n.table-hover > tbody > tr.success:hover > td,\n.table-hover > tbody > tr:hover > .success,\n.table-hover > tbody > tr.success:hover > th {\n background-color: #d0e9c6;\n}\n.table > thead > tr > td.info,\n.table > tbody > tr > td.info,\n.table > tfoot > tr > td.info,\n.table > thead > tr > th.info,\n.table > tbody > tr > th.info,\n.table > tfoot > tr > th.info,\n.table > thead > tr.info > td,\n.table > tbody > tr.info > td,\n.table > tfoot > tr.info > td,\n.table > thead > tr.info > th,\n.table > tbody > tr.info > th,\n.table > tfoot > tr.info > th {\n background-color: #d9edf7;\n}\n.table-hover > tbody > tr > td.info:hover,\n.table-hover > tbody > tr > th.info:hover,\n.table-hover > tbody > tr.info:hover > td,\n.table-hover > tbody > tr:hover > .info,\n.table-hover > tbody > tr.info:hover > th {\n background-color: #c4e3f3;\n}\n.table > thead > tr > td.warning,\n.table > tbody > tr > td.warning,\n.table > tfoot > tr > td.warning,\n.table > thead > tr > th.warning,\n.table > tbody > tr > th.warning,\n.table > tfoot > tr > th.warning,\n.table > thead > tr.warning > td,\n.table > tbody > tr.warning > td,\n.table > tfoot > tr.warning > td,\n.table > thead > tr.warning > th,\n.table > tbody > tr.warning > th,\n.table > tfoot > tr.warning > th {\n background-color: #fcf8e3;\n}\n.table-hover > tbody > tr > td.warning:hover,\n.table-hover > tbody > tr > th.warning:hover,\n.table-hover > tbody > tr.warning:hover > td,\n.table-hover > tbody > tr:hover > .warning,\n.table-hover > tbody > tr.warning:hover > th {\n background-color: #faf2cc;\n}\n.table > thead > tr > td.danger,\n.table > tbody > tr > td.danger,\n.table > tfoot > tr > td.danger,\n.table > thead > tr > th.danger,\n.table > tbody > tr > th.danger,\n.table > tfoot > tr > th.danger,\n.table > thead > tr.danger > td,\n.table > tbody > tr.danger > td,\n.table > tfoot > tr.danger > td,\n.table > thead > tr.danger > th,\n.table > tbody > tr.danger > th,\n.table > tfoot > tr.danger > th {\n background-color: #f2dede;\n}\n.table-hover > tbody > tr > td.danger:hover,\n.table-hover > tbody > tr > th.danger:hover,\n.table-hover > tbody > tr.danger:hover > td,\n.table-hover > tbody > tr:hover > .danger,\n.table-hover > tbody > tr.danger:hover > th {\n background-color: #ebcccc;\n}\n.table-responsive {\n overflow-x: auto;\n min-height: 0.01%;\n}\n@media screen and (max-width: 767px) {\n .table-responsive {\n width: 100%;\n margin-bottom: 15px;\n overflow-y: hidden;\n -ms-overflow-style: -ms-autohiding-scrollbar;\n border: 1px solid #dddddd;\n }\n .table-responsive > .table {\n margin-bottom: 0;\n }\n .table-responsive > .table > thead > tr > th,\n .table-responsive > .table > tbody > tr > th,\n .table-responsive > .table > tfoot > tr > th,\n .table-responsive > .table > thead > tr > td,\n .table-responsive > .table > tbody > tr > td,\n .table-responsive > .table > tfoot > tr > td {\n white-space: nowrap;\n }\n .table-responsive > .table-bordered {\n border: 0;\n }\n .table-responsive > .table-bordered > thead > tr > th:first-child,\n .table-responsive > .table-bordered > tbody > tr > th:first-child,\n .table-responsive > .table-bordered > tfoot > tr > th:first-child,\n .table-responsive > .table-bordered > thead > tr > td:first-child,\n .table-responsive > .table-bordered > tbody > tr > td:first-child,\n .table-responsive > .table-bordered > tfoot > tr > td:first-child {\n border-left: 0;\n }\n .table-responsive > .table-bordered > thead > tr > th:last-child,\n .table-responsive > .table-bordered > tbody > tr > th:last-child,\n .table-responsive > .table-bordered > tfoot > tr > th:last-child,\n .table-responsive > .table-bordered > thead > tr > td:last-child,\n .table-responsive > .table-bordered > tbody > tr > td:last-child,\n .table-responsive > .table-bordered > tfoot > tr > td:last-child {\n border-right: 0;\n }\n .table-responsive > .table-bordered > tbody > tr:last-child > th,\n .table-responsive > .table-bordered > tfoot > tr:last-child > th,\n .table-responsive > .table-bordered > tbody > tr:last-child > td,\n .table-responsive > .table-bordered > tfoot > tr:last-child > td {\n border-bottom: 0;\n }\n}\nfieldset {\n padding: 0;\n margin: 0;\n border: 0;\n min-width: 0;\n}\nlegend {\n display: block;\n width: 100%;\n padding: 0;\n margin-bottom: 20px;\n font-size: 21px;\n line-height: inherit;\n color: #333333;\n border: 0;\n border-bottom: 1px solid #e5e5e5;\n}\nlabel {\n display: inline-block;\n max-width: 100%;\n margin-bottom: 5px;\n font-weight: bold;\n}\ninput[type=\"search\"] {\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n}\ninput[type=\"radio\"],\ninput[type=\"checkbox\"] {\n margin: 4px 0 0;\n margin-top: 1px \\9;\n line-height: normal;\n}\ninput[type=\"file\"] {\n display: block;\n}\ninput[type=\"range\"] {\n display: block;\n width: 100%;\n}\nselect[multiple],\nselect[size] {\n height: auto;\n}\ninput[type=\"file\"]:focus,\ninput[type=\"radio\"]:focus,\ninput[type=\"checkbox\"]:focus {\n outline: thin dotted;\n outline: 5px auto -webkit-focus-ring-color;\n outline-offset: -2px;\n}\noutput {\n display: block;\n padding-top: 7px;\n font-size: 14px;\n line-height: 1.42857143;\n color: #555555;\n}\n.form-control {\n display: block;\n width: 100%;\n height: 34px;\n padding: 6px 12px;\n font-size: 14px;\n line-height: 1.42857143;\n color: #555555;\n background-color: #ffffff;\n background-image: none;\n border: 1px solid #cccccc;\n border-radius: 4px;\n -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n -webkit-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;\n -o-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;\n transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;\n}\n.form-control:focus {\n border-color: #66afe9;\n outline: 0;\n -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6);\n box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6);\n}\n.form-control::-moz-placeholder {\n color: #999999;\n opacity: 1;\n}\n.form-control:-ms-input-placeholder {\n color: #999999;\n}\n.form-control::-webkit-input-placeholder {\n color: #999999;\n}\n.form-control[disabled],\n.form-control[readonly],\nfieldset[disabled] .form-control {\n background-color: #eeeeee;\n opacity: 1;\n}\n.form-control[disabled],\nfieldset[disabled] .form-control {\n cursor: not-allowed;\n}\ntextarea.form-control {\n height: auto;\n}\ninput[type=\"search\"] {\n -webkit-appearance: none;\n}\n@media screen and (-webkit-min-device-pixel-ratio: 0) {\n input[type=\"date\"],\n input[type=\"time\"],\n input[type=\"datetime-local\"],\n input[type=\"month\"] {\n line-height: 34px;\n }\n input[type=\"date\"].input-sm,\n input[type=\"time\"].input-sm,\n input[type=\"datetime-local\"].input-sm,\n input[type=\"month\"].input-sm,\n .input-group-sm input[type=\"date\"],\n .input-group-sm input[type=\"time\"],\n .input-group-sm input[type=\"datetime-local\"],\n .input-group-sm input[type=\"month\"] {\n line-height: 30px;\n }\n input[type=\"date\"].input-lg,\n input[type=\"time\"].input-lg,\n input[type=\"datetime-local\"].input-lg,\n input[type=\"month\"].input-lg,\n .input-group-lg input[type=\"date\"],\n .input-group-lg input[type=\"time\"],\n .input-group-lg input[type=\"datetime-local\"],\n .input-group-lg input[type=\"month\"] {\n line-height: 46px;\n }\n}\n.form-group {\n margin-bottom: 15px;\n}\n.radio,\n.checkbox {\n position: relative;\n display: block;\n margin-top: 10px;\n margin-bottom: 10px;\n}\n.radio label,\n.checkbox label {\n min-height: 20px;\n padding-left: 20px;\n margin-bottom: 0;\n font-weight: normal;\n cursor: pointer;\n}\n.radio input[type=\"radio\"],\n.radio-inline input[type=\"radio\"],\n.checkbox input[type=\"checkbox\"],\n.checkbox-inline input[type=\"checkbox\"] {\n position: absolute;\n margin-left: -20px;\n margin-top: 4px \\9;\n}\n.radio + .radio,\n.checkbox + .checkbox {\n margin-top: -5px;\n}\n.radio-inline,\n.checkbox-inline {\n position: relative;\n display: inline-block;\n padding-left: 20px;\n margin-bottom: 0;\n vertical-align: middle;\n font-weight: normal;\n cursor: pointer;\n}\n.radio-inline + .radio-inline,\n.checkbox-inline + .checkbox-inline {\n margin-top: 0;\n margin-left: 10px;\n}\ninput[type=\"radio\"][disabled],\ninput[type=\"checkbox\"][disabled],\ninput[type=\"radio\"].disabled,\ninput[type=\"checkbox\"].disabled,\nfieldset[disabled] input[type=\"radio\"],\nfieldset[disabled] input[type=\"checkbox\"] {\n cursor: not-allowed;\n}\n.radio-inline.disabled,\n.checkbox-inline.disabled,\nfieldset[disabled] .radio-inline,\nfieldset[disabled] .checkbox-inline {\n cursor: not-allowed;\n}\n.radio.disabled label,\n.checkbox.disabled label,\nfieldset[disabled] .radio label,\nfieldset[disabled] .checkbox label {\n cursor: not-allowed;\n}\n.form-control-static {\n padding-top: 7px;\n padding-bottom: 7px;\n margin-bottom: 0;\n min-height: 34px;\n}\n.form-control-static.input-lg,\n.form-control-static.input-sm {\n padding-left: 0;\n padding-right: 0;\n}\n.input-sm {\n height: 30px;\n padding: 5px 10px;\n font-size: 12px;\n line-height: 1.5;\n border-radius: 3px;\n}\nselect.input-sm {\n height: 30px;\n line-height: 30px;\n}\ntextarea.input-sm,\nselect[multiple].input-sm {\n height: auto;\n}\n.form-group-sm .form-control {\n height: 30px;\n padding: 5px 10px;\n font-size: 12px;\n line-height: 1.5;\n border-radius: 3px;\n}\nselect.form-group-sm .form-control {\n height: 30px;\n line-height: 30px;\n}\ntextarea.form-group-sm .form-control,\nselect[multiple].form-group-sm .form-control {\n height: auto;\n}\n.form-group-sm .form-control-static {\n height: 30px;\n padding: 5px 10px;\n font-size: 12px;\n line-height: 1.5;\n min-height: 32px;\n}\n.input-lg {\n height: 46px;\n padding: 10px 16px;\n font-size: 18px;\n line-height: 1.3333333;\n border-radius: 6px;\n}\nselect.input-lg {\n height: 46px;\n line-height: 46px;\n}\ntextarea.input-lg,\nselect[multiple].input-lg {\n height: auto;\n}\n.form-group-lg .form-control {\n height: 46px;\n padding: 10px 16px;\n font-size: 18px;\n line-height: 1.3333333;\n border-radius: 6px;\n}\nselect.form-group-lg .form-control {\n height: 46px;\n line-height: 46px;\n}\ntextarea.form-group-lg .form-control,\nselect[multiple].form-group-lg .form-control {\n height: auto;\n}\n.form-group-lg .form-control-static {\n height: 46px;\n padding: 10px 16px;\n font-size: 18px;\n line-height: 1.3333333;\n min-height: 38px;\n}\n.has-feedback {\n position: relative;\n}\n.has-feedback .form-control {\n padding-right: 42.5px;\n}\n.form-control-feedback {\n position: absolute;\n top: 0;\n right: 0;\n z-index: 2;\n display: block;\n width: 34px;\n height: 34px;\n line-height: 34px;\n text-align: center;\n pointer-events: none;\n}\n.input-lg + .form-control-feedback {\n width: 46px;\n height: 46px;\n line-height: 46px;\n}\n.input-sm + .form-control-feedback {\n width: 30px;\n height: 30px;\n line-height: 30px;\n}\n.has-success .help-block,\n.has-success .control-label,\n.has-success .radio,\n.has-success .checkbox,\n.has-success .radio-inline,\n.has-success .checkbox-inline,\n.has-success.radio label,\n.has-success.checkbox label,\n.has-success.radio-inline label,\n.has-success.checkbox-inline label {\n color: #3c763d;\n}\n.has-success .form-control {\n border-color: #3c763d;\n -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n}\n.has-success .form-control:focus {\n border-color: #2b542c;\n -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #67b168;\n box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #67b168;\n}\n.has-success .input-group-addon {\n color: #3c763d;\n border-color: #3c763d;\n background-color: #dff0d8;\n}\n.has-success .form-control-feedback {\n color: #3c763d;\n}\n.has-warning .help-block,\n.has-warning .control-label,\n.has-warning .radio,\n.has-warning .checkbox,\n.has-warning .radio-inline,\n.has-warning .checkbox-inline,\n.has-warning.radio label,\n.has-warning.checkbox label,\n.has-warning.radio-inline label,\n.has-warning.checkbox-inline label {\n color: #8a6d3b;\n}\n.has-warning .form-control {\n border-color: #8a6d3b;\n -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n}\n.has-warning .form-control:focus {\n border-color: #66512c;\n -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #c0a16b;\n box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #c0a16b;\n}\n.has-warning .input-group-addon {\n color: #8a6d3b;\n border-color: #8a6d3b;\n background-color: #fcf8e3;\n}\n.has-warning .form-control-feedback {\n color: #8a6d3b;\n}\n.has-error .help-block,\n.has-error .control-label,\n.has-error .radio,\n.has-error .checkbox,\n.has-error .radio-inline,\n.has-error .checkbox-inline,\n.has-error.radio label,\n.has-error.checkbox label,\n.has-error.radio-inline label,\n.has-error.checkbox-inline label {\n color: #a94442;\n}\n.has-error .form-control {\n border-color: #a94442;\n -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n}\n.has-error .form-control:focus {\n border-color: #843534;\n -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #ce8483;\n box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #ce8483;\n}\n.has-error .input-group-addon {\n color: #a94442;\n border-color: #a94442;\n background-color: #f2dede;\n}\n.has-error .form-control-feedback {\n color: #a94442;\n}\n.has-feedback label ~ .form-control-feedback {\n top: 25px;\n}\n.has-feedback label.sr-only ~ .form-control-feedback {\n top: 0;\n}\n.help-block {\n display: block;\n margin-top: 5px;\n margin-bottom: 10px;\n color: #737373;\n}\n@media (min-width: 768px) {\n .form-inline .form-group {\n display: inline-block;\n margin-bottom: 0;\n vertical-align: middle;\n }\n .form-inline .form-control {\n display: inline-block;\n width: auto;\n vertical-align: middle;\n }\n .form-inline .form-control-static {\n display: inline-block;\n }\n .form-inline .input-group {\n display: inline-table;\n vertical-align: middle;\n }\n .form-inline .input-group .input-group-addon,\n .form-inline .input-group .input-group-btn,\n .form-inline .input-group .form-control {\n width: auto;\n }\n .form-inline .input-group > .form-control {\n width: 100%;\n }\n .form-inline .control-label {\n margin-bottom: 0;\n vertical-align: middle;\n }\n .form-inline .radio,\n .form-inline .checkbox {\n display: inline-block;\n margin-top: 0;\n margin-bottom: 0;\n vertical-align: middle;\n }\n .form-inline .radio label,\n .form-inline .checkbox label {\n padding-left: 0;\n }\n .form-inline .radio input[type=\"radio\"],\n .form-inline .checkbox input[type=\"checkbox\"] {\n position: relative;\n margin-left: 0;\n }\n .form-inline .has-feedback .form-control-feedback {\n top: 0;\n }\n}\n.form-horizontal .radio,\n.form-horizontal .checkbox,\n.form-horizontal .radio-inline,\n.form-horizontal .checkbox-inline {\n margin-top: 0;\n margin-bottom: 0;\n padding-top: 7px;\n}\n.form-horizontal .radio,\n.form-horizontal .checkbox {\n min-height: 27px;\n}\n.form-horizontal .form-group {\n margin-left: -15px;\n margin-right: -15px;\n}\n@media (min-width: 768px) {\n .form-horizontal .control-label {\n text-align: right;\n margin-bottom: 0;\n padding-top: 7px;\n }\n}\n.form-horizontal .has-feedback .form-control-feedback {\n right: 15px;\n}\n@media (min-width: 768px) {\n .form-horizontal .form-group-lg .control-label {\n padding-top: 14.333333px;\n }\n}\n@media (min-width: 768px) {\n .form-horizontal .form-group-sm .control-label {\n padding-top: 6px;\n }\n}\n.btn {\n display: inline-block;\n margin-bottom: 0;\n font-weight: normal;\n text-align: center;\n vertical-align: middle;\n touch-action: manipulation;\n cursor: pointer;\n background-image: none;\n border: 1px solid transparent;\n white-space: nowrap;\n padding: 6px 12px;\n font-size: 14px;\n line-height: 1.42857143;\n border-radius: 4px;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n.btn:focus,\n.btn:active:focus,\n.btn.active:focus,\n.btn.focus,\n.btn:active.focus,\n.btn.active.focus {\n outline: thin dotted;\n outline: 5px auto -webkit-focus-ring-color;\n outline-offset: -2px;\n}\n.btn:hover,\n.btn:focus,\n.btn.focus {\n color: #333333;\n text-decoration: none;\n}\n.btn:active,\n.btn.active {\n outline: 0;\n background-image: none;\n -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);\n box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);\n}\n.btn.disabled,\n.btn[disabled],\nfieldset[disabled] .btn {\n cursor: not-allowed;\n pointer-events: none;\n opacity: 0.65;\n filter: alpha(opacity=65);\n -webkit-box-shadow: none;\n box-shadow: none;\n}\n.btn-default {\n color: #333333;\n background-color: #ffffff;\n border-color: #cccccc;\n}\n.btn-default:hover,\n.btn-default:focus,\n.btn-default.focus,\n.btn-default:active,\n.btn-default.active,\n.open > .dropdown-toggle.btn-default {\n color: #333333;\n background-color: #e6e6e6;\n border-color: #adadad;\n}\n.btn-default:active,\n.btn-default.active,\n.open > .dropdown-toggle.btn-default {\n background-image: none;\n}\n.btn-default.disabled,\n.btn-default[disabled],\nfieldset[disabled] .btn-default,\n.btn-default.disabled:hover,\n.btn-default[disabled]:hover,\nfieldset[disabled] .btn-default:hover,\n.btn-default.disabled:focus,\n.btn-default[disabled]:focus,\nfieldset[disabled] .btn-default:focus,\n.btn-default.disabled.focus,\n.btn-default[disabled].focus,\nfieldset[disabled] .btn-default.focus,\n.btn-default.disabled:active,\n.btn-default[disabled]:active,\nfieldset[disabled] .btn-default:active,\n.btn-default.disabled.active,\n.btn-default[disabled].active,\nfieldset[disabled] .btn-default.active {\n background-color: #ffffff;\n border-color: #cccccc;\n}\n.btn-default .badge {\n color: #ffffff;\n background-color: #333333;\n}\n.btn-primary {\n color: #ffffff;\n background-color: #337ab7;\n border-color: #2e6da4;\n}\n.btn-primary:hover,\n.btn-primary:focus,\n.btn-primary.focus,\n.btn-primary:active,\n.btn-primary.active,\n.open > .dropdown-toggle.btn-primary {\n color: #ffffff;\n background-color: #286090;\n border-color: #204d74;\n}\n.btn-primary:active,\n.btn-primary.active,\n.open > .dropdown-toggle.btn-primary {\n background-image: none;\n}\n.btn-primary.disabled,\n.btn-primary[disabled],\nfieldset[disabled] .btn-primary,\n.btn-primary.disabled:hover,\n.btn-primary[disabled]:hover,\nfieldset[disabled] .btn-primary:hover,\n.btn-primary.disabled:focus,\n.btn-primary[disabled]:focus,\nfieldset[disabled] .btn-primary:focus,\n.btn-primary.disabled.focus,\n.btn-primary[disabled].focus,\nfieldset[disabled] .btn-primary.focus,\n.btn-primary.disabled:active,\n.btn-primary[disabled]:active,\nfieldset[disabled] .btn-primary:active,\n.btn-primary.disabled.active,\n.btn-primary[disabled].active,\nfieldset[disabled] .btn-primary.active {\n background-color: #337ab7;\n border-color: #2e6da4;\n}\n.btn-primary .badge {\n color: #337ab7;\n background-color: #ffffff;\n}\n.btn-success {\n color: #ffffff;\n background-color: #5cb85c;\n border-color: #4cae4c;\n}\n.btn-success:hover,\n.btn-success:focus,\n.btn-success.focus,\n.btn-success:active,\n.btn-success.active,\n.open > .dropdown-toggle.btn-success {\n color: #ffffff;\n background-color: #449d44;\n border-color: #398439;\n}\n.btn-success:active,\n.btn-success.active,\n.open > .dropdown-toggle.btn-success {\n background-image: none;\n}\n.btn-success.disabled,\n.btn-success[disabled],\nfieldset[disabled] .btn-success,\n.btn-success.disabled:hover,\n.btn-success[disabled]:hover,\nfieldset[disabled] .btn-success:hover,\n.btn-success.disabled:focus,\n.btn-success[disabled]:focus,\nfieldset[disabled] .btn-success:focus,\n.btn-success.disabled.focus,\n.btn-success[disabled].focus,\nfieldset[disabled] .btn-success.focus,\n.btn-success.disabled:active,\n.btn-success[disabled]:active,\nfieldset[disabled] .btn-success:active,\n.btn-success.disabled.active,\n.btn-success[disabled].active,\nfieldset[disabled] .btn-success.active {\n background-color: #5cb85c;\n border-color: #4cae4c;\n}\n.btn-success .badge {\n color: #5cb85c;\n background-color: #ffffff;\n}\n.btn-info {\n color: #ffffff;\n background-color: #5bc0de;\n border-color: #46b8da;\n}\n.btn-info:hover,\n.btn-info:focus,\n.btn-info.focus,\n.btn-info:active,\n.btn-info.active,\n.open > .dropdown-toggle.btn-info {\n color: #ffffff;\n background-color: #31b0d5;\n border-color: #269abc;\n}\n.btn-info:active,\n.btn-info.active,\n.open > .dropdown-toggle.btn-info {\n background-image: none;\n}\n.btn-info.disabled,\n.btn-info[disabled],\nfieldset[disabled] .btn-info,\n.btn-info.disabled:hover,\n.btn-info[disabled]:hover,\nfieldset[disabled] .btn-info:hover,\n.btn-info.disabled:focus,\n.btn-info[disabled]:focus,\nfieldset[disabled] .btn-info:focus,\n.btn-info.disabled.focus,\n.btn-info[disabled].focus,\nfieldset[disabled] .btn-info.focus,\n.btn-info.disabled:active,\n.btn-info[disabled]:active,\nfieldset[disabled] .btn-info:active,\n.btn-info.disabled.active,\n.btn-info[disabled].active,\nfieldset[disabled] .btn-info.active {\n background-color: #5bc0de;\n border-color: #46b8da;\n}\n.btn-info .badge {\n color: #5bc0de;\n background-color: #ffffff;\n}\n.btn-warning {\n color: #ffffff;\n background-color: #f0ad4e;\n border-color: #eea236;\n}\n.btn-warning:hover,\n.btn-warning:focus,\n.btn-warning.focus,\n.btn-warning:active,\n.btn-warning.active,\n.open > .dropdown-toggle.btn-warning {\n color: #ffffff;\n background-color: #ec971f;\n border-color: #d58512;\n}\n.btn-warning:active,\n.btn-warning.active,\n.open > .dropdown-toggle.btn-warning {\n background-image: none;\n}\n.btn-warning.disabled,\n.btn-warning[disabled],\nfieldset[disabled] .btn-warning,\n.btn-warning.disabled:hover,\n.btn-warning[disabled]:hover,\nfieldset[disabled] .btn-warning:hover,\n.btn-warning.disabled:focus,\n.btn-warning[disabled]:focus,\nfieldset[disabled] .btn-warning:focus,\n.btn-warning.disabled.focus,\n.btn-warning[disabled].focus,\nfieldset[disabled] .btn-warning.focus,\n.btn-warning.disabled:active,\n.btn-warning[disabled]:active,\nfieldset[disabled] .btn-warning:active,\n.btn-warning.disabled.active,\n.btn-warning[disabled].active,\nfieldset[disabled] .btn-warning.active {\n background-color: #f0ad4e;\n border-color: #eea236;\n}\n.btn-warning .badge {\n color: #f0ad4e;\n background-color: #ffffff;\n}\n.btn-danger {\n color: #ffffff;\n background-color: #d9534f;\n border-color: #d43f3a;\n}\n.btn-danger:hover,\n.btn-danger:focus,\n.btn-danger.focus,\n.btn-danger:active,\n.btn-danger.active,\n.open > .dropdown-toggle.btn-danger {\n color: #ffffff;\n background-color: #c9302c;\n border-color: #ac2925;\n}\n.btn-danger:active,\n.btn-danger.active,\n.open > .dropdown-toggle.btn-danger {\n background-image: none;\n}\n.btn-danger.disabled,\n.btn-danger[disabled],\nfieldset[disabled] .btn-danger,\n.btn-danger.disabled:hover,\n.btn-danger[disabled]:hover,\nfieldset[disabled] .btn-danger:hover,\n.btn-danger.disabled:focus,\n.btn-danger[disabled]:focus,\nfieldset[disabled] .btn-danger:focus,\n.btn-danger.disabled.focus,\n.btn-danger[disabled].focus,\nfieldset[disabled] .btn-danger.focus,\n.btn-danger.disabled:active,\n.btn-danger[disabled]:active,\nfieldset[disabled] .btn-danger:active,\n.btn-danger.disabled.active,\n.btn-danger[disabled].active,\nfieldset[disabled] .btn-danger.active {\n background-color: #d9534f;\n border-color: #d43f3a;\n}\n.btn-danger .badge {\n color: #d9534f;\n background-color: #ffffff;\n}\n.btn-link {\n color: #337ab7;\n font-weight: normal;\n border-radius: 0;\n}\n.btn-link,\n.btn-link:active,\n.btn-link.active,\n.btn-link[disabled],\nfieldset[disabled] .btn-link {\n background-color: transparent;\n -webkit-box-shadow: none;\n box-shadow: none;\n}\n.btn-link,\n.btn-link:hover,\n.btn-link:focus,\n.btn-link:active {\n border-color: transparent;\n}\n.btn-link:hover,\n.btn-link:focus {\n color: #23527c;\n text-decoration: underline;\n background-color: transparent;\n}\n.btn-link[disabled]:hover,\nfieldset[disabled] .btn-link:hover,\n.btn-link[disabled]:focus,\nfieldset[disabled] .btn-link:focus {\n color: #777777;\n text-decoration: none;\n}\n.btn-lg,\n.btn-group-lg > .btn {\n padding: 10px 16px;\n font-size: 18px;\n line-height: 1.3333333;\n border-radius: 6px;\n}\n.btn-sm,\n.btn-group-sm > .btn {\n padding: 5px 10px;\n font-size: 12px;\n line-height: 1.5;\n border-radius: 3px;\n}\n.btn-xs,\n.btn-group-xs > .btn {\n padding: 1px 5px;\n font-size: 12px;\n line-height: 1.5;\n border-radius: 3px;\n}\n.btn-block {\n display: block;\n width: 100%;\n}\n.btn-block + .btn-block {\n margin-top: 5px;\n}\ninput[type=\"submit\"].btn-block,\ninput[type=\"reset\"].btn-block,\ninput[type=\"button\"].btn-block {\n width: 100%;\n}\n.fade {\n opacity: 0;\n -webkit-transition: opacity 0.15s linear;\n -o-transition: opacity 0.15s linear;\n transition: opacity 0.15s linear;\n}\n.fade.in {\n opacity: 1;\n}\n.collapse {\n display: none;\n}\n.collapse.in {\n display: block;\n}\ntr.collapse.in {\n display: table-row;\n}\ntbody.collapse.in {\n display: table-row-group;\n}\n.collapsing {\n position: relative;\n height: 0;\n overflow: hidden;\n -webkit-transition-property: height, visibility;\n transition-property: height, visibility;\n -webkit-transition-duration: 0.35s;\n transition-duration: 0.35s;\n -webkit-transition-timing-function: ease;\n transition-timing-function: ease;\n}\n.caret {\n display: inline-block;\n width: 0;\n height: 0;\n margin-left: 2px;\n vertical-align: middle;\n border-top: 4px dashed;\n border-right: 4px solid transparent;\n border-left: 4px solid transparent;\n}\n.dropup,\n.dropdown {\n position: relative;\n}\n.dropdown-toggle:focus {\n outline: 0;\n}\n.dropdown-menu {\n position: absolute;\n top: 100%;\n left: 0;\n z-index: 1000;\n display: none;\n float: left;\n min-width: 160px;\n padding: 5px 0;\n margin: 2px 0 0;\n list-style: none;\n font-size: 14px;\n text-align: left;\n background-color: #ffffff;\n border: 1px solid #cccccc;\n border: 1px solid rgba(0, 0, 0, 0.15);\n border-radius: 4px;\n -webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);\n box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);\n background-clip: padding-box;\n}\n.dropdown-menu.pull-right {\n right: 0;\n left: auto;\n}\n.dropdown-menu .divider {\n height: 1px;\n margin: 9px 0;\n overflow: hidden;\n background-color: #e5e5e5;\n}\n.dropdown-menu > li > a {\n display: block;\n padding: 3px 20px;\n clear: both;\n font-weight: normal;\n line-height: 1.42857143;\n color: #333333;\n white-space: nowrap;\n}\n.dropdown-menu > li > a:hover,\n.dropdown-menu > li > a:focus {\n text-decoration: none;\n color: #262626;\n background-color: #f5f5f5;\n}\n.dropdown-menu > .active > a,\n.dropdown-menu > .active > a:hover,\n.dropdown-menu > .active > a:focus {\n color: #ffffff;\n text-decoration: none;\n outline: 0;\n background-color: #337ab7;\n}\n.dropdown-menu > .disabled > a,\n.dropdown-menu > .disabled > a:hover,\n.dropdown-menu > .disabled > a:focus {\n color: #777777;\n}\n.dropdown-menu > .disabled > a:hover,\n.dropdown-menu > .disabled > a:focus {\n text-decoration: none;\n background-color: transparent;\n background-image: none;\n filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);\n cursor: not-allowed;\n}\n.open > .dropdown-menu {\n display: block;\n}\n.open > a {\n outline: 0;\n}\n.dropdown-menu-right {\n left: auto;\n right: 0;\n}\n.dropdown-menu-left {\n left: 0;\n right: auto;\n}\n.dropdown-header {\n display: block;\n padding: 3px 20px;\n font-size: 12px;\n line-height: 1.42857143;\n color: #777777;\n white-space: nowrap;\n}\n.dropdown-backdrop {\n position: fixed;\n left: 0;\n right: 0;\n bottom: 0;\n top: 0;\n z-index: 990;\n}\n.pull-right > .dropdown-menu {\n right: 0;\n left: auto;\n}\n.dropup .caret,\n.navbar-fixed-bottom .dropdown .caret {\n border-top: 0;\n border-bottom: 4px solid;\n content: \"\";\n}\n.dropup .dropdown-menu,\n.navbar-fixed-bottom .dropdown .dropdown-menu {\n top: auto;\n bottom: 100%;\n margin-bottom: 2px;\n}\n@media (min-width: 768px) {\n .navbar-right .dropdown-menu {\n left: auto;\n right: 0;\n }\n .navbar-right .dropdown-menu-left {\n left: 0;\n right: auto;\n }\n}\n.btn-group,\n.btn-group-vertical {\n position: relative;\n display: inline-block;\n vertical-align: middle;\n}\n.btn-group > .btn,\n.btn-group-vertical > .btn {\n position: relative;\n float: left;\n}\n.btn-group > .btn:hover,\n.btn-group-vertical > .btn:hover,\n.btn-group > .btn:focus,\n.btn-group-vertical > .btn:focus,\n.btn-group > .btn:active,\n.btn-group-vertical > .btn:active,\n.btn-group > .btn.active,\n.btn-group-vertical > .btn.active {\n z-index: 2;\n}\n.btn-group .btn + .btn,\n.btn-group .btn + .btn-group,\n.btn-group .btn-group + .btn,\n.btn-group .btn-group + .btn-group {\n margin-left: -1px;\n}\n.btn-toolbar {\n margin-left: -5px;\n}\n.btn-toolbar .btn-group,\n.btn-toolbar .input-group {\n float: left;\n}\n.btn-toolbar > .btn,\n.btn-toolbar > .btn-group,\n.btn-toolbar > .input-group {\n margin-left: 5px;\n}\n.btn-group > .btn:not(:first-child):not(:last-child):not(.dropdown-toggle) {\n border-radius: 0;\n}\n.btn-group > .btn:first-child {\n margin-left: 0;\n}\n.btn-group > .btn:first-child:not(:last-child):not(.dropdown-toggle) {\n border-bottom-right-radius: 0;\n border-top-right-radius: 0;\n}\n.btn-group > .btn:last-child:not(:first-child),\n.btn-group > .dropdown-toggle:not(:first-child) {\n border-bottom-left-radius: 0;\n border-top-left-radius: 0;\n}\n.btn-group > .btn-group {\n float: left;\n}\n.btn-group > .btn-group:not(:first-child):not(:last-child) > .btn {\n border-radius: 0;\n}\n.btn-group > .btn-group:first-child:not(:last-child) > .btn:last-child,\n.btn-group > .btn-group:first-child:not(:last-child) > .dropdown-toggle {\n border-bottom-right-radius: 0;\n border-top-right-radius: 0;\n}\n.btn-group > .btn-group:last-child:not(:first-child) > .btn:first-child {\n border-bottom-left-radius: 0;\n border-top-left-radius: 0;\n}\n.btn-group .dropdown-toggle:active,\n.btn-group.open .dropdown-toggle {\n outline: 0;\n}\n.btn-group > .btn + .dropdown-toggle {\n padding-left: 8px;\n padding-right: 8px;\n}\n.btn-group > .btn-lg + .dropdown-toggle {\n padding-left: 12px;\n padding-right: 12px;\n}\n.btn-group.open .dropdown-toggle {\n -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);\n box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);\n}\n.btn-group.open .dropdown-toggle.btn-link {\n -webkit-box-shadow: none;\n box-shadow: none;\n}\n.btn .caret {\n margin-left: 0;\n}\n.btn-lg .caret {\n border-width: 5px 5px 0;\n border-bottom-width: 0;\n}\n.dropup .btn-lg .caret {\n border-width: 0 5px 5px;\n}\n.btn-group-vertical > .btn,\n.btn-group-vertical > .btn-group,\n.btn-group-vertical > .btn-group > .btn {\n display: block;\n float: none;\n width: 100%;\n max-width: 100%;\n}\n.btn-group-vertical > .btn-group > .btn {\n float: none;\n}\n.btn-group-vertical > .btn + .btn,\n.btn-group-vertical > .btn + .btn-group,\n.btn-group-vertical > .btn-group + .btn,\n.btn-group-vertical > .btn-group + .btn-group {\n margin-top: -1px;\n margin-left: 0;\n}\n.btn-group-vertical > .btn:not(:first-child):not(:last-child) {\n border-radius: 0;\n}\n.btn-group-vertical > .btn:first-child:not(:last-child) {\n border-top-right-radius: 4px;\n border-bottom-right-radius: 0;\n border-bottom-left-radius: 0;\n}\n.btn-group-vertical > .btn:last-child:not(:first-child) {\n border-bottom-left-radius: 4px;\n border-top-right-radius: 0;\n border-top-left-radius: 0;\n}\n.btn-group-vertical > .btn-group:not(:first-child):not(:last-child) > .btn {\n border-radius: 0;\n}\n.btn-group-vertical > .btn-group:first-child:not(:last-child) > .btn:last-child,\n.btn-group-vertical > .btn-group:first-child:not(:last-child) > .dropdown-toggle {\n border-bottom-right-radius: 0;\n border-bottom-left-radius: 0;\n}\n.btn-group-vertical > .btn-group:last-child:not(:first-child) > .btn:first-child {\n border-top-right-radius: 0;\n border-top-left-radius: 0;\n}\n.btn-group-justified {\n display: table;\n width: 100%;\n table-layout: fixed;\n border-collapse: separate;\n}\n.btn-group-justified > .btn,\n.btn-group-justified > .btn-group {\n float: none;\n display: table-cell;\n width: 1%;\n}\n.btn-group-justified > .btn-group .btn {\n width: 100%;\n}\n.btn-group-justified > .btn-group .dropdown-menu {\n left: auto;\n}\n[data-toggle=\"buttons\"] > .btn input[type=\"radio\"],\n[data-toggle=\"buttons\"] > .btn-group > .btn input[type=\"radio\"],\n[data-toggle=\"buttons\"] > .btn input[type=\"checkbox\"],\n[data-toggle=\"buttons\"] > .btn-group > .btn input[type=\"checkbox\"] {\n position: absolute;\n clip: rect(0, 0, 0, 0);\n pointer-events: none;\n}\n.input-group {\n position: relative;\n display: table;\n border-collapse: separate;\n}\n.input-group[class*=\"col-\"] {\n float: none;\n padding-left: 0;\n padding-right: 0;\n}\n.input-group .form-control {\n position: relative;\n z-index: 2;\n float: left;\n width: 100%;\n margin-bottom: 0;\n}\n.input-group-lg > .form-control,\n.input-group-lg > .input-group-addon,\n.input-group-lg > .input-group-btn > .btn {\n height: 46px;\n padding: 10px 16px;\n font-size: 18px;\n line-height: 1.3333333;\n border-radius: 6px;\n}\nselect.input-group-lg > .form-control,\nselect.input-group-lg > .input-group-addon,\nselect.input-group-lg > .input-group-btn > .btn {\n height: 46px;\n line-height: 46px;\n}\ntextarea.input-group-lg > .form-control,\ntextarea.input-group-lg > .input-group-addon,\ntextarea.input-group-lg > .input-group-btn > .btn,\nselect[multiple].input-group-lg > .form-control,\nselect[multiple].input-group-lg > .input-group-addon,\nselect[multiple].input-group-lg > .input-group-btn > .btn {\n height: auto;\n}\n.input-group-sm > .form-control,\n.input-group-sm > .input-group-addon,\n.input-group-sm > .input-group-btn > .btn {\n height: 30px;\n padding: 5px 10px;\n font-size: 12px;\n line-height: 1.5;\n border-radius: 3px;\n}\nselect.input-group-sm > .form-control,\nselect.input-group-sm > .input-group-addon,\nselect.input-group-sm > .input-group-btn > .btn {\n height: 30px;\n line-height: 30px;\n}\ntextarea.input-group-sm > .form-control,\ntextarea.input-group-sm > .input-group-addon,\ntextarea.input-group-sm > .input-group-btn > .btn,\nselect[multiple].input-group-sm > .form-control,\nselect[multiple].input-group-sm > .input-group-addon,\nselect[multiple].input-group-sm > .input-group-btn > .btn {\n height: auto;\n}\n.input-group-addon,\n.input-group-btn,\n.input-group .form-control {\n display: table-cell;\n}\n.input-group-addon:not(:first-child):not(:last-child),\n.input-group-btn:not(:first-child):not(:last-child),\n.input-group .form-control:not(:first-child):not(:last-child) {\n border-radius: 0;\n}\n.input-group-addon,\n.input-group-btn {\n width: 1%;\n white-space: nowrap;\n vertical-align: middle;\n}\n.input-group-addon {\n padding: 6px 12px;\n font-size: 14px;\n font-weight: normal;\n line-height: 1;\n color: #555555;\n text-align: center;\n background-color: #eeeeee;\n border: 1px solid #cccccc;\n border-radius: 4px;\n}\n.input-group-addon.input-sm {\n padding: 5px 10px;\n font-size: 12px;\n border-radius: 3px;\n}\n.input-group-addon.input-lg {\n padding: 10px 16px;\n font-size: 18px;\n border-radius: 6px;\n}\n.input-group-addon input[type=\"radio\"],\n.input-group-addon input[type=\"checkbox\"] {\n margin-top: 0;\n}\n.input-group .form-control:first-child,\n.input-group-addon:first-child,\n.input-group-btn:first-child > .btn,\n.input-group-btn:first-child > .btn-group > .btn,\n.input-group-btn:first-child > .dropdown-toggle,\n.input-group-btn:last-child > .btn:not(:last-child):not(.dropdown-toggle),\n.input-group-btn:last-child > .btn-group:not(:last-child) > .btn {\n border-bottom-right-radius: 0;\n border-top-right-radius: 0;\n}\n.input-group-addon:first-child {\n border-right: 0;\n}\n.input-group .form-control:last-child,\n.input-group-addon:last-child,\n.input-group-btn:last-child > .btn,\n.input-group-btn:last-child > .btn-group > .btn,\n.input-group-btn:last-child > .dropdown-toggle,\n.input-group-btn:first-child > .btn:not(:first-child),\n.input-group-btn:first-child > .btn-group:not(:first-child) > .btn {\n border-bottom-left-radius: 0;\n border-top-left-radius: 0;\n}\n.input-group-addon:last-child {\n border-left: 0;\n}\n.input-group-btn {\n position: relative;\n font-size: 0;\n white-space: nowrap;\n}\n.input-group-btn > .btn {\n position: relative;\n}\n.input-group-btn > .btn + .btn {\n margin-left: -1px;\n}\n.input-group-btn > .btn:hover,\n.input-group-btn > .btn:focus,\n.input-group-btn > .btn:active {\n z-index: 2;\n}\n.input-group-btn:first-child > .btn,\n.input-group-btn:first-child > .btn-group {\n margin-right: -1px;\n}\n.input-group-btn:last-child > .btn,\n.input-group-btn:last-child > .btn-group {\n margin-left: -1px;\n}\n.nav {\n margin-bottom: 0;\n padding-left: 0;\n list-style: none;\n}\n.nav > li {\n position: relative;\n display: block;\n}\n.nav > li > a {\n position: relative;\n display: block;\n padding: 10px 15px;\n}\n.nav > li > a:hover,\n.nav > li > a:focus {\n text-decoration: none;\n background-color: #eeeeee;\n}\n.nav > li.disabled > a {\n color: #777777;\n}\n.nav > li.disabled > a:hover,\n.nav > li.disabled > a:focus {\n color: #777777;\n text-decoration: none;\n background-color: transparent;\n cursor: not-allowed;\n}\n.nav .open > a,\n.nav .open > a:hover,\n.nav .open > a:focus {\n background-color: #eeeeee;\n border-color: #337ab7;\n}\n.nav .nav-divider {\n height: 1px;\n margin: 9px 0;\n overflow: hidden;\n background-color: #e5e5e5;\n}\n.nav > li > a > img {\n max-width: none;\n}\n.nav-tabs {\n border-bottom: 1px solid #dddddd;\n}\n.nav-tabs > li {\n float: left;\n margin-bottom: -1px;\n}\n.nav-tabs > li > a {\n margin-right: 2px;\n line-height: 1.42857143;\n border: 1px solid transparent;\n border-radius: 4px 4px 0 0;\n}\n.nav-tabs > li > a:hover {\n border-color: #eeeeee #eeeeee #dddddd;\n}\n.nav-tabs > li.active > a,\n.nav-tabs > li.active > a:hover,\n.nav-tabs > li.active > a:focus {\n color: #555555;\n background-color: #ffffff;\n border: 1px solid #dddddd;\n border-bottom-color: transparent;\n cursor: default;\n}\n.nav-tabs.nav-justified {\n width: 100%;\n border-bottom: 0;\n}\n.nav-tabs.nav-justified > li {\n float: none;\n}\n.nav-tabs.nav-justified > li > a {\n text-align: center;\n margin-bottom: 5px;\n}\n.nav-tabs.nav-justified > .dropdown .dropdown-menu {\n top: auto;\n left: auto;\n}\n@media (min-width: 768px) {\n .nav-tabs.nav-justified > li {\n display: table-cell;\n width: 1%;\n }\n .nav-tabs.nav-justified > li > a {\n margin-bottom: 0;\n }\n}\n.nav-tabs.nav-justified > li > a {\n margin-right: 0;\n border-radius: 4px;\n}\n.nav-tabs.nav-justified > .active > a,\n.nav-tabs.nav-justified > .active > a:hover,\n.nav-tabs.nav-justified > .active > a:focus {\n border: 1px solid #dddddd;\n}\n@media (min-width: 768px) {\n .nav-tabs.nav-justified > li > a {\n border-bottom: 1px solid #dddddd;\n border-radius: 4px 4px 0 0;\n }\n .nav-tabs.nav-justified > .active > a,\n .nav-tabs.nav-justified > .active > a:hover,\n .nav-tabs.nav-justified > .active > a:focus {\n border-bottom-color: #ffffff;\n }\n}\n.nav-pills > li {\n float: left;\n}\n.nav-pills > li > a {\n border-radius: 4px;\n}\n.nav-pills > li + li {\n margin-left: 2px;\n}\n.nav-pills > li.active > a,\n.nav-pills > li.active > a:hover,\n.nav-pills > li.active > a:focus {\n color: #ffffff;\n background-color: #337ab7;\n}\n.nav-stacked > li {\n float: none;\n}\n.nav-stacked > li + li {\n margin-top: 2px;\n margin-left: 0;\n}\n.nav-justified {\n width: 100%;\n}\n.nav-justified > li {\n float: none;\n}\n.nav-justified > li > a {\n text-align: center;\n margin-bottom: 5px;\n}\n.nav-justified > .dropdown .dropdown-menu {\n top: auto;\n left: auto;\n}\n@media (min-width: 768px) {\n .nav-justified > li {\n display: table-cell;\n width: 1%;\n }\n .nav-justified > li > a {\n margin-bottom: 0;\n }\n}\n.nav-tabs-justified {\n border-bottom: 0;\n}\n.nav-tabs-justified > li > a {\n margin-right: 0;\n border-radius: 4px;\n}\n.nav-tabs-justified > .active > a,\n.nav-tabs-justified > .active > a:hover,\n.nav-tabs-justified > .active > a:focus {\n border: 1px solid #dddddd;\n}\n@media (min-width: 768px) {\n .nav-tabs-justified > li > a {\n border-bottom: 1px solid #dddddd;\n border-radius: 4px 4px 0 0;\n }\n .nav-tabs-justified > .active > a,\n .nav-tabs-justified > .active > a:hover,\n .nav-tabs-justified > .active > a:focus {\n border-bottom-color: #ffffff;\n }\n}\n.tab-content > .tab-pane {\n display: none;\n}\n.tab-content > .active {\n display: block;\n}\n.nav-tabs .dropdown-menu {\n margin-top: -1px;\n border-top-right-radius: 0;\n border-top-left-radius: 0;\n}\n.navbar {\n position: relative;\n min-height: 50px;\n margin-bottom: 20px;\n border: 1px solid transparent;\n}\n@media (min-width: 768px) {\n .navbar {\n border-radius: 4px;\n }\n}\n@media (min-width: 768px) {\n .navbar-header {\n float: left;\n }\n}\n.navbar-collapse {\n overflow-x: visible;\n padding-right: 15px;\n padding-left: 15px;\n border-top: 1px solid transparent;\n box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);\n -webkit-overflow-scrolling: touch;\n}\n.navbar-collapse.in {\n overflow-y: auto;\n}\n@media (min-width: 768px) {\n .navbar-collapse {\n width: auto;\n border-top: 0;\n box-shadow: none;\n }\n .navbar-collapse.collapse {\n display: block !important;\n height: auto !important;\n padding-bottom: 0;\n overflow: visible !important;\n }\n .navbar-collapse.in {\n overflow-y: visible;\n }\n .navbar-fixed-top .navbar-collapse,\n .navbar-static-top .navbar-collapse,\n .navbar-fixed-bottom .navbar-collapse {\n padding-left: 0;\n padding-right: 0;\n }\n}\n.navbar-fixed-top .navbar-collapse,\n.navbar-fixed-bottom .navbar-collapse {\n max-height: 340px;\n}\n@media (max-device-width: 480px) and (orientation: landscape) {\n .navbar-fixed-top .navbar-collapse,\n .navbar-fixed-bottom .navbar-collapse {\n max-height: 200px;\n }\n}\n.container > .navbar-header,\n.container-fluid > .navbar-header,\n.container > .navbar-collapse,\n.container-fluid > .navbar-collapse {\n margin-right: -15px;\n margin-left: -15px;\n}\n@media (min-width: 768px) {\n .container > .navbar-header,\n .container-fluid > .navbar-header,\n .container > .navbar-collapse,\n .container-fluid > .navbar-collapse {\n margin-right: 0;\n margin-left: 0;\n }\n}\n.navbar-static-top {\n z-index: 1000;\n border-width: 0 0 1px;\n}\n@media (min-width: 768px) {\n .navbar-static-top {\n border-radius: 0;\n }\n}\n.navbar-fixed-top,\n.navbar-fixed-bottom {\n position: fixed;\n right: 0;\n left: 0;\n z-index: 1030;\n}\n@media (min-width: 768px) {\n .navbar-fixed-top,\n .navbar-fixed-bottom {\n border-radius: 0;\n }\n}\n.navbar-fixed-top {\n top: 0;\n border-width: 0 0 1px;\n}\n.navbar-fixed-bottom {\n bottom: 0;\n margin-bottom: 0;\n border-width: 1px 0 0;\n}\n.navbar-brand {\n float: left;\n padding: 15px 15px;\n font-size: 18px;\n line-height: 20px;\n height: 50px;\n}\n.navbar-brand:hover,\n.navbar-brand:focus {\n text-decoration: none;\n}\n.navbar-brand > img {\n display: block;\n}\n@media (min-width: 768px) {\n .navbar > .container .navbar-brand,\n .navbar > .container-fluid .navbar-brand {\n margin-left: -15px;\n }\n}\n.navbar-toggle {\n position: relative;\n float: right;\n margin-right: 15px;\n padding: 9px 10px;\n margin-top: 8px;\n margin-bottom: 8px;\n background-color: transparent;\n background-image: none;\n border: 1px solid transparent;\n border-radius: 4px;\n}\n.navbar-toggle:focus {\n outline: 0;\n}\n.navbar-toggle .icon-bar {\n display: block;\n width: 22px;\n height: 2px;\n border-radius: 1px;\n}\n.navbar-toggle .icon-bar + .icon-bar {\n margin-top: 4px;\n}\n@media (min-width: 768px) {\n .navbar-toggle {\n display: none;\n }\n}\n.navbar-nav {\n margin: 7.5px -15px;\n}\n.navbar-nav > li > a {\n padding-top: 10px;\n padding-bottom: 10px;\n line-height: 20px;\n}\n@media (max-width: 767px) {\n .navbar-nav .open .dropdown-menu {\n position: static;\n float: none;\n width: auto;\n margin-top: 0;\n background-color: transparent;\n border: 0;\n box-shadow: none;\n }\n .navbar-nav .open .dropdown-menu > li > a,\n .navbar-nav .open .dropdown-menu .dropdown-header {\n padding: 5px 15px 5px 25px;\n }\n .navbar-nav .open .dropdown-menu > li > a {\n line-height: 20px;\n }\n .navbar-nav .open .dropdown-menu > li > a:hover,\n .navbar-nav .open .dropdown-menu > li > a:focus {\n background-image: none;\n }\n}\n@media (min-width: 768px) {\n .navbar-nav {\n float: left;\n margin: 0;\n }\n .navbar-nav > li {\n float: left;\n }\n .navbar-nav > li > a {\n padding-top: 15px;\n padding-bottom: 15px;\n }\n}\n.navbar-form {\n margin-left: -15px;\n margin-right: -15px;\n padding: 10px 15px;\n border-top: 1px solid transparent;\n border-bottom: 1px solid transparent;\n -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1);\n box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1);\n margin-top: 8px;\n margin-bottom: 8px;\n}\n@media (min-width: 768px) {\n .navbar-form .form-group {\n display: inline-block;\n margin-bottom: 0;\n vertical-align: middle;\n }\n .navbar-form .form-control {\n display: inline-block;\n width: auto;\n vertical-align: middle;\n }\n .navbar-form .form-control-static {\n display: inline-block;\n }\n .navbar-form .input-group {\n display: inline-table;\n vertical-align: middle;\n }\n .navbar-form .input-group .input-group-addon,\n .navbar-form .input-group .input-group-btn,\n .navbar-form .input-group .form-control {\n width: auto;\n }\n .navbar-form .input-group > .form-control {\n width: 100%;\n }\n .navbar-form .control-label {\n margin-bottom: 0;\n vertical-align: middle;\n }\n .navbar-form .radio,\n .navbar-form .checkbox {\n display: inline-block;\n margin-top: 0;\n margin-bottom: 0;\n vertical-align: middle;\n }\n .navbar-form .radio label,\n .navbar-form .checkbox label {\n padding-left: 0;\n }\n .navbar-form .radio input[type=\"radio\"],\n .navbar-form .checkbox input[type=\"checkbox\"] {\n position: relative;\n margin-left: 0;\n }\n .navbar-form .has-feedback .form-control-feedback {\n top: 0;\n }\n}\n@media (max-width: 767px) {\n .navbar-form .form-group {\n margin-bottom: 5px;\n }\n .navbar-form .form-group:last-child {\n margin-bottom: 0;\n }\n}\n@media (min-width: 768px) {\n .navbar-form {\n width: auto;\n border: 0;\n margin-left: 0;\n margin-right: 0;\n padding-top: 0;\n padding-bottom: 0;\n -webkit-box-shadow: none;\n box-shadow: none;\n }\n}\n.navbar-nav > li > .dropdown-menu {\n margin-top: 0;\n border-top-right-radius: 0;\n border-top-left-radius: 0;\n}\n.navbar-fixed-bottom .navbar-nav > li > .dropdown-menu {\n margin-bottom: 0;\n border-top-right-radius: 4px;\n border-top-left-radius: 4px;\n border-bottom-right-radius: 0;\n border-bottom-left-radius: 0;\n}\n.navbar-btn {\n margin-top: 8px;\n margin-bottom: 8px;\n}\n.navbar-btn.btn-sm {\n margin-top: 10px;\n margin-bottom: 10px;\n}\n.navbar-btn.btn-xs {\n margin-top: 14px;\n margin-bottom: 14px;\n}\n.navbar-text {\n margin-top: 15px;\n margin-bottom: 15px;\n}\n@media (min-width: 768px) {\n .navbar-text {\n float: left;\n margin-left: 15px;\n margin-right: 15px;\n }\n}\n@media (min-width: 768px) {\n .navbar-left {\n float: left !important;\n }\n .navbar-right {\n float: right !important;\n margin-right: -15px;\n }\n .navbar-right ~ .navbar-right {\n margin-right: 0;\n }\n}\n.navbar-default {\n background-color: #f8f8f8;\n border-color: #e7e7e7;\n}\n.navbar-default .navbar-brand {\n color: #777777;\n}\n.navbar-default .navbar-brand:hover,\n.navbar-default .navbar-brand:focus {\n color: #5e5e5e;\n background-color: transparent;\n}\n.navbar-default .navbar-text {\n color: #777777;\n}\n.navbar-default .navbar-nav > li > a {\n color: #777777;\n}\n.navbar-default .navbar-nav > li > a:hover,\n.navbar-default .navbar-nav > li > a:focus {\n color: #333333;\n background-color: transparent;\n}\n.navbar-default .navbar-nav > .active > a,\n.navbar-default .navbar-nav > .active > a:hover,\n.navbar-default .navbar-nav > .active > a:focus {\n color: #555555;\n background-color: #e7e7e7;\n}\n.navbar-default .navbar-nav > .disabled > a,\n.navbar-default .navbar-nav > .disabled > a:hover,\n.navbar-default .navbar-nav > .disabled > a:focus {\n color: #cccccc;\n background-color: transparent;\n}\n.navbar-default .navbar-toggle {\n border-color: #dddddd;\n}\n.navbar-default .navbar-toggle:hover,\n.navbar-default .navbar-toggle:focus {\n background-color: #dddddd;\n}\n.navbar-default .navbar-toggle .icon-bar {\n background-color: #888888;\n}\n.navbar-default .navbar-collapse,\n.navbar-default .navbar-form {\n border-color: #e7e7e7;\n}\n.navbar-default .navbar-nav > .open > a,\n.navbar-default .navbar-nav > .open > a:hover,\n.navbar-default .navbar-nav > .open > a:focus {\n background-color: #e7e7e7;\n color: #555555;\n}\n@media (max-width: 767px) {\n .navbar-default .navbar-nav .open .dropdown-menu > li > a {\n color: #777777;\n }\n .navbar-default .navbar-nav .open .dropdown-menu > li > a:hover,\n .navbar-default .navbar-nav .open .dropdown-menu > li > a:focus {\n color: #333333;\n background-color: transparent;\n }\n .navbar-default .navbar-nav .open .dropdown-menu > .active > a,\n .navbar-default .navbar-nav .open .dropdown-menu > .active > a:hover,\n .navbar-default .navbar-nav .open .dropdown-menu > .active > a:focus {\n color: #555555;\n background-color: #e7e7e7;\n }\n .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a,\n .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a:hover,\n .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a:focus {\n color: #cccccc;\n background-color: transparent;\n }\n}\n.navbar-default .navbar-link {\n color: #777777;\n}\n.navbar-default .navbar-link:hover {\n color: #333333;\n}\n.navbar-default .btn-link {\n color: #777777;\n}\n.navbar-default .btn-link:hover,\n.navbar-default .btn-link:focus {\n color: #333333;\n}\n.navbar-default .btn-link[disabled]:hover,\nfieldset[disabled] .navbar-default .btn-link:hover,\n.navbar-default .btn-link[disabled]:focus,\nfieldset[disabled] .navbar-default .btn-link:focus {\n color: #cccccc;\n}\n.navbar-inverse {\n background-color: #222222;\n border-color: #080808;\n}\n.navbar-inverse .navbar-brand {\n color: #9d9d9d;\n}\n.navbar-inverse .navbar-brand:hover,\n.navbar-inverse .navbar-brand:focus {\n color: #ffffff;\n background-color: transparent;\n}\n.navbar-inverse .navbar-text {\n color: #9d9d9d;\n}\n.navbar-inverse .navbar-nav > li > a {\n color: #9d9d9d;\n}\n.navbar-inverse .navbar-nav > li > a:hover,\n.navbar-inverse .navbar-nav > li > a:focus {\n color: #ffffff;\n background-color: transparent;\n}\n.navbar-inverse .navbar-nav > .active > a,\n.navbar-inverse .navbar-nav > .active > a:hover,\n.navbar-inverse .navbar-nav > .active > a:focus {\n color: #ffffff;\n background-color: #080808;\n}\n.navbar-inverse .navbar-nav > .disabled > a,\n.navbar-inverse .navbar-nav > .disabled > a:hover,\n.navbar-inverse .navbar-nav > .disabled > a:focus {\n color: #444444;\n background-color: transparent;\n}\n.navbar-inverse .navbar-toggle {\n border-color: #333333;\n}\n.navbar-inverse .navbar-toggle:hover,\n.navbar-inverse .navbar-toggle:focus {\n background-color: #333333;\n}\n.navbar-inverse .navbar-toggle .icon-bar {\n background-color: #ffffff;\n}\n.navbar-inverse .navbar-collapse,\n.navbar-inverse .navbar-form {\n border-color: #101010;\n}\n.navbar-inverse .navbar-nav > .open > a,\n.navbar-inverse .navbar-nav > .open > a:hover,\n.navbar-inverse .navbar-nav > .open > a:focus {\n background-color: #080808;\n color: #ffffff;\n}\n@media (max-width: 767px) {\n .navbar-inverse .navbar-nav .open .dropdown-menu > .dropdown-header {\n border-color: #080808;\n }\n .navbar-inverse .navbar-nav .open .dropdown-menu .divider {\n background-color: #080808;\n }\n .navbar-inverse .navbar-nav .open .dropdown-menu > li > a {\n color: #9d9d9d;\n }\n .navbar-inverse .navbar-nav .open .dropdown-menu > li > a:hover,\n .navbar-inverse .navbar-nav .open .dropdown-menu > li > a:focus {\n color: #ffffff;\n background-color: transparent;\n }\n .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a,\n .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a:hover,\n .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a:focus {\n color: #ffffff;\n background-color: #080808;\n }\n .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a,\n .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a:hover,\n .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a:focus {\n color: #444444;\n background-color: transparent;\n }\n}\n.navbar-inverse .navbar-link {\n color: #9d9d9d;\n}\n.navbar-inverse .navbar-link:hover {\n color: #ffffff;\n}\n.navbar-inverse .btn-link {\n color: #9d9d9d;\n}\n.navbar-inverse .btn-link:hover,\n.navbar-inverse .btn-link:focus {\n color: #ffffff;\n}\n.navbar-inverse .btn-link[disabled]:hover,\nfieldset[disabled] .navbar-inverse .btn-link:hover,\n.navbar-inverse .btn-link[disabled]:focus,\nfieldset[disabled] .navbar-inverse .btn-link:focus {\n color: #444444;\n}\n.breadcrumb {\n padding: 8px 15px;\n margin-bottom: 20px;\n list-style: none;\n background-color: #f5f5f5;\n border-radius: 4px;\n}\n.breadcrumb > li {\n display: inline-block;\n}\n.breadcrumb > li + li:before {\n content: \"/\\00a0\";\n padding: 0 5px;\n color: #cccccc;\n}\n.breadcrumb > .active {\n color: #777777;\n}\n.pagination {\n display: inline-block;\n padding-left: 0;\n margin: 20px 0;\n border-radius: 4px;\n}\n.pagination > li {\n display: inline;\n}\n.pagination > li > a,\n.pagination > li > span {\n position: relative;\n float: left;\n padding: 6px 12px;\n line-height: 1.42857143;\n text-decoration: none;\n color: #337ab7;\n background-color: #ffffff;\n border: 1px solid #dddddd;\n margin-left: -1px;\n}\n.pagination > li:first-child > a,\n.pagination > li:first-child > span {\n margin-left: 0;\n border-bottom-left-radius: 4px;\n border-top-left-radius: 4px;\n}\n.pagination > li:last-child > a,\n.pagination > li:last-child > span {\n border-bottom-right-radius: 4px;\n border-top-right-radius: 4px;\n}\n.pagination > li > a:hover,\n.pagination > li > span:hover,\n.pagination > li > a:focus,\n.pagination > li > span:focus {\n color: #23527c;\n background-color: #eeeeee;\n border-color: #dddddd;\n}\n.pagination > .active > a,\n.pagination > .active > span,\n.pagination > .active > a:hover,\n.pagination > .active > span:hover,\n.pagination > .active > a:focus,\n.pagination > .active > span:focus {\n z-index: 2;\n color: #ffffff;\n background-color: #337ab7;\n border-color: #337ab7;\n cursor: default;\n}\n.pagination > .disabled > span,\n.pagination > .disabled > span:hover,\n.pagination > .disabled > span:focus,\n.pagination > .disabled > a,\n.pagination > .disabled > a:hover,\n.pagination > .disabled > a:focus {\n color: #777777;\n background-color: #ffffff;\n border-color: #dddddd;\n cursor: not-allowed;\n}\n.pagination-lg > li > a,\n.pagination-lg > li > span {\n padding: 10px 16px;\n font-size: 18px;\n}\n.pagination-lg > li:first-child > a,\n.pagination-lg > li:first-child > span {\n border-bottom-left-radius: 6px;\n border-top-left-radius: 6px;\n}\n.pagination-lg > li:last-child > a,\n.pagination-lg > li:last-child > span {\n border-bottom-right-radius: 6px;\n border-top-right-radius: 6px;\n}\n.pagination-sm > li > a,\n.pagination-sm > li > span {\n padding: 5px 10px;\n font-size: 12px;\n}\n.pagination-sm > li:first-child > a,\n.pagination-sm > li:first-child > span {\n border-bottom-left-radius: 3px;\n border-top-left-radius: 3px;\n}\n.pagination-sm > li:last-child > a,\n.pagination-sm > li:last-child > span {\n border-bottom-right-radius: 3px;\n border-top-right-radius: 3px;\n}\n.pager {\n padding-left: 0;\n margin: 20px 0;\n list-style: none;\n text-align: center;\n}\n.pager li {\n display: inline;\n}\n.pager li > a,\n.pager li > span {\n display: inline-block;\n padding: 5px 14px;\n background-color: #ffffff;\n border: 1px solid #dddddd;\n border-radius: 15px;\n}\n.pager li > a:hover,\n.pager li > a:focus {\n text-decoration: none;\n background-color: #eeeeee;\n}\n.pager .next > a,\n.pager .next > span {\n float: right;\n}\n.pager .previous > a,\n.pager .previous > span {\n float: left;\n}\n.pager .disabled > a,\n.pager .disabled > a:hover,\n.pager .disabled > a:focus,\n.pager .disabled > span {\n color: #777777;\n background-color: #ffffff;\n cursor: not-allowed;\n}\n.label {\n display: inline;\n padding: .2em .6em .3em;\n font-size: 75%;\n font-weight: bold;\n line-height: 1;\n color: #ffffff;\n text-align: center;\n white-space: nowrap;\n vertical-align: baseline;\n border-radius: .25em;\n}\na.label:hover,\na.label:focus {\n color: #ffffff;\n text-decoration: none;\n cursor: pointer;\n}\n.label:empty {\n display: none;\n}\n.btn .label {\n position: relative;\n top: -1px;\n}\n.label-default {\n background-color: #777777;\n}\n.label-default[href]:hover,\n.label-default[href]:focus {\n background-color: #5e5e5e;\n}\n.label-primary {\n background-color: #337ab7;\n}\n.label-primary[href]:hover,\n.label-primary[href]:focus {\n background-color: #286090;\n}\n.label-success {\n background-color: #5cb85c;\n}\n.label-success[href]:hover,\n.label-success[href]:focus {\n background-color: #449d44;\n}\n.label-info {\n background-color: #5bc0de;\n}\n.label-info[href]:hover,\n.label-info[href]:focus {\n background-color: #31b0d5;\n}\n.label-warning {\n background-color: #f0ad4e;\n}\n.label-warning[href]:hover,\n.label-warning[href]:focus {\n background-color: #ec971f;\n}\n.label-danger {\n background-color: #d9534f;\n}\n.label-danger[href]:hover,\n.label-danger[href]:focus {\n background-color: #c9302c;\n}\n.badge {\n display: inline-block;\n min-width: 10px;\n padding: 3px 7px;\n font-size: 12px;\n font-weight: bold;\n color: #ffffff;\n line-height: 1;\n vertical-align: baseline;\n white-space: nowrap;\n text-align: center;\n background-color: #777777;\n border-radius: 10px;\n}\n.badge:empty {\n display: none;\n}\n.btn .badge {\n position: relative;\n top: -1px;\n}\n.btn-xs .badge,\n.btn-group-xs > .btn .badge {\n top: 0;\n padding: 1px 5px;\n}\na.badge:hover,\na.badge:focus {\n color: #ffffff;\n text-decoration: none;\n cursor: pointer;\n}\n.list-group-item.active > .badge,\n.nav-pills > .active > a > .badge {\n color: #337ab7;\n background-color: #ffffff;\n}\n.list-group-item > .badge {\n float: right;\n}\n.list-group-item > .badge + .badge {\n margin-right: 5px;\n}\n.nav-pills > li > a > .badge {\n margin-left: 3px;\n}\n.jumbotron {\n padding: 30px 15px;\n margin-bottom: 30px;\n color: inherit;\n background-color: #eeeeee;\n}\n.jumbotron h1,\n.jumbotron .h1 {\n color: inherit;\n}\n.jumbotron p {\n margin-bottom: 15px;\n font-size: 21px;\n font-weight: 200;\n}\n.jumbotron > hr {\n border-top-color: #d5d5d5;\n}\n.container .jumbotron,\n.container-fluid .jumbotron {\n border-radius: 6px;\n}\n.jumbotron .container {\n max-width: 100%;\n}\n@media screen and (min-width: 768px) {\n .jumbotron {\n padding: 48px 0;\n }\n .container .jumbotron,\n .container-fluid .jumbotron {\n padding-left: 60px;\n padding-right: 60px;\n }\n .jumbotron h1,\n .jumbotron .h1 {\n font-size: 63px;\n }\n}\n.thumbnail {\n display: block;\n padding: 4px;\n margin-bottom: 20px;\n line-height: 1.42857143;\n background-color: #ffffff;\n border: 1px solid #dddddd;\n border-radius: 4px;\n -webkit-transition: border 0.2s ease-in-out;\n -o-transition: border 0.2s ease-in-out;\n transition: border 0.2s ease-in-out;\n}\n.thumbnail > img,\n.thumbnail a > img {\n margin-left: auto;\n margin-right: auto;\n}\na.thumbnail:hover,\na.thumbnail:focus,\na.thumbnail.active {\n border-color: #337ab7;\n}\n.thumbnail .caption {\n padding: 9px;\n color: #333333;\n}\n.alert {\n padding: 15px;\n margin-bottom: 20px;\n border: 1px solid transparent;\n border-radius: 4px;\n}\n.alert h4 {\n margin-top: 0;\n color: inherit;\n}\n.alert .alert-link {\n font-weight: bold;\n}\n.alert > p,\n.alert > ul {\n margin-bottom: 0;\n}\n.alert > p + p {\n margin-top: 5px;\n}\n.alert-dismissable,\n.alert-dismissible {\n padding-right: 35px;\n}\n.alert-dismissable .close,\n.alert-dismissible .close {\n position: relative;\n top: -2px;\n right: -21px;\n color: inherit;\n}\n.alert-success {\n background-color: #dff0d8;\n border-color: #d6e9c6;\n color: #3c763d;\n}\n.alert-success hr {\n border-top-color: #c9e2b3;\n}\n.alert-success .alert-link {\n color: #2b542c;\n}\n.alert-info {\n background-color: #d9edf7;\n border-color: #bce8f1;\n color: #31708f;\n}\n.alert-info hr {\n border-top-color: #a6e1ec;\n}\n.alert-info .alert-link {\n color: #245269;\n}\n.alert-warning {\n background-color: #fcf8e3;\n border-color: #faebcc;\n color: #8a6d3b;\n}\n.alert-warning hr {\n border-top-color: #f7e1b5;\n}\n.alert-warning .alert-link {\n color: #66512c;\n}\n.alert-danger {\n background-color: #f2dede;\n border-color: #ebccd1;\n color: #a94442;\n}\n.alert-danger hr {\n border-top-color: #e4b9c0;\n}\n.alert-danger .alert-link {\n color: #843534;\n}\n@-webkit-keyframes progress-bar-stripes {\n from {\n background-position: 40px 0;\n }\n to {\n background-position: 0 0;\n }\n}\n@keyframes progress-bar-stripes {\n from {\n background-position: 40px 0;\n }\n to {\n background-position: 0 0;\n }\n}\n.progress {\n overflow: hidden;\n height: 20px;\n margin-bottom: 20px;\n background-color: #f5f5f5;\n border-radius: 4px;\n -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);\n box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);\n}\n.progress-bar {\n float: left;\n width: 0%;\n height: 100%;\n font-size: 12px;\n line-height: 20px;\n color: #ffffff;\n text-align: center;\n background-color: #337ab7;\n -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15);\n box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15);\n -webkit-transition: width 0.6s ease;\n -o-transition: width 0.6s ease;\n transition: width 0.6s ease;\n}\n.progress-striped .progress-bar,\n.progress-bar-striped {\n background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-size: 40px 40px;\n}\n.progress.active .progress-bar,\n.progress-bar.active {\n -webkit-animation: progress-bar-stripes 2s linear infinite;\n -o-animation: progress-bar-stripes 2s linear infinite;\n animation: progress-bar-stripes 2s linear infinite;\n}\n.progress-bar-success {\n background-color: #5cb85c;\n}\n.progress-striped .progress-bar-success {\n background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n}\n.progress-bar-info {\n background-color: #5bc0de;\n}\n.progress-striped .progress-bar-info {\n background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n}\n.progress-bar-warning {\n background-color: #f0ad4e;\n}\n.progress-striped .progress-bar-warning {\n background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n}\n.progress-bar-danger {\n background-color: #d9534f;\n}\n.progress-striped .progress-bar-danger {\n background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n}\n.media {\n margin-top: 15px;\n}\n.media:first-child {\n margin-top: 0;\n}\n.media,\n.media-body {\n zoom: 1;\n overflow: hidden;\n}\n.media-body {\n width: 10000px;\n}\n.media-object {\n display: block;\n}\n.media-right,\n.media > .pull-right {\n padding-left: 10px;\n}\n.media-left,\n.media > .pull-left {\n padding-right: 10px;\n}\n.media-left,\n.media-right,\n.media-body {\n display: table-cell;\n vertical-align: top;\n}\n.media-middle {\n vertical-align: middle;\n}\n.media-bottom {\n vertical-align: bottom;\n}\n.media-heading {\n margin-top: 0;\n margin-bottom: 5px;\n}\n.media-list {\n padding-left: 0;\n list-style: none;\n}\n.list-group {\n margin-bottom: 20px;\n padding-left: 0;\n}\n.list-group-item {\n position: relative;\n display: block;\n padding: 10px 15px;\n margin-bottom: -1px;\n background-color: #ffffff;\n border: 1px solid #dddddd;\n}\n.list-group-item:first-child {\n border-top-right-radius: 4px;\n border-top-left-radius: 4px;\n}\n.list-group-item:last-child {\n margin-bottom: 0;\n border-bottom-right-radius: 4px;\n border-bottom-left-radius: 4px;\n}\na.list-group-item {\n color: #555555;\n}\na.list-group-item .list-group-item-heading {\n color: #333333;\n}\na.list-group-item:hover,\na.list-group-item:focus {\n text-decoration: none;\n color: #555555;\n background-color: #f5f5f5;\n}\n.list-group-item.disabled,\n.list-group-item.disabled:hover,\n.list-group-item.disabled:focus {\n background-color: #eeeeee;\n color: #777777;\n cursor: not-allowed;\n}\n.list-group-item.disabled .list-group-item-heading,\n.list-group-item.disabled:hover .list-group-item-heading,\n.list-group-item.disabled:focus .list-group-item-heading {\n color: inherit;\n}\n.list-group-item.disabled .list-group-item-text,\n.list-group-item.disabled:hover .list-group-item-text,\n.list-group-item.disabled:focus .list-group-item-text {\n color: #777777;\n}\n.list-group-item.active,\n.list-group-item.active:hover,\n.list-group-item.active:focus {\n z-index: 2;\n color: #ffffff;\n background-color: #337ab7;\n border-color: #337ab7;\n}\n.list-group-item.active .list-group-item-heading,\n.list-group-item.active:hover .list-group-item-heading,\n.list-group-item.active:focus .list-group-item-heading,\n.list-group-item.active .list-group-item-heading > small,\n.list-group-item.active:hover .list-group-item-heading > small,\n.list-group-item.active:focus .list-group-item-heading > small,\n.list-group-item.active .list-group-item-heading > .small,\n.list-group-item.active:hover .list-group-item-heading > .small,\n.list-group-item.active:focus .list-group-item-heading > .small {\n color: inherit;\n}\n.list-group-item.active .list-group-item-text,\n.list-group-item.active:hover .list-group-item-text,\n.list-group-item.active:focus .list-group-item-text {\n color: #c7ddef;\n}\n.list-group-item-success {\n color: #3c763d;\n background-color: #dff0d8;\n}\na.list-group-item-success {\n color: #3c763d;\n}\na.list-group-item-success .list-group-item-heading {\n color: inherit;\n}\na.list-group-item-success:hover,\na.list-group-item-success:focus {\n color: #3c763d;\n background-color: #d0e9c6;\n}\na.list-group-item-success.active,\na.list-group-item-success.active:hover,\na.list-group-item-success.active:focus {\n color: #fff;\n background-color: #3c763d;\n border-color: #3c763d;\n}\n.list-group-item-info {\n color: #31708f;\n background-color: #d9edf7;\n}\na.list-group-item-info {\n color: #31708f;\n}\na.list-group-item-info .list-group-item-heading {\n color: inherit;\n}\na.list-group-item-info:hover,\na.list-group-item-info:focus {\n color: #31708f;\n background-color: #c4e3f3;\n}\na.list-group-item-info.active,\na.list-group-item-info.active:hover,\na.list-group-item-info.active:focus {\n color: #fff;\n background-color: #31708f;\n border-color: #31708f;\n}\n.list-group-item-warning {\n color: #8a6d3b;\n background-color: #fcf8e3;\n}\na.list-group-item-warning {\n color: #8a6d3b;\n}\na.list-group-item-warning .list-group-item-heading {\n color: inherit;\n}\na.list-group-item-warning:hover,\na.list-group-item-warning:focus {\n color: #8a6d3b;\n background-color: #faf2cc;\n}\na.list-group-item-warning.active,\na.list-group-item-warning.active:hover,\na.list-group-item-warning.active:focus {\n color: #fff;\n background-color: #8a6d3b;\n border-color: #8a6d3b;\n}\n.list-group-item-danger {\n color: #a94442;\n background-color: #f2dede;\n}\na.list-group-item-danger {\n color: #a94442;\n}\na.list-group-item-danger .list-group-item-heading {\n color: inherit;\n}\na.list-group-item-danger:hover,\na.list-group-item-danger:focus {\n color: #a94442;\n background-color: #ebcccc;\n}\na.list-group-item-danger.active,\na.list-group-item-danger.active:hover,\na.list-group-item-danger.active:focus {\n color: #fff;\n background-color: #a94442;\n border-color: #a94442;\n}\n.list-group-item-heading {\n margin-top: 0;\n margin-bottom: 5px;\n}\n.list-group-item-text {\n margin-bottom: 0;\n line-height: 1.3;\n}\n.panel {\n margin-bottom: 20px;\n background-color: #ffffff;\n border: 1px solid transparent;\n border-radius: 4px;\n -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);\n box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);\n}\n.panel-body {\n padding: 15px;\n}\n.panel-heading {\n padding: 10px 15px;\n border-bottom: 1px solid transparent;\n border-top-right-radius: 3px;\n border-top-left-radius: 3px;\n}\n.panel-heading > .dropdown .dropdown-toggle {\n color: inherit;\n}\n.panel-title {\n margin-top: 0;\n margin-bottom: 0;\n font-size: 16px;\n color: inherit;\n}\n.panel-title > a,\n.panel-title > small,\n.panel-title > .small,\n.panel-title > small > a,\n.panel-title > .small > a {\n color: inherit;\n}\n.panel-footer {\n padding: 10px 15px;\n background-color: #f5f5f5;\n border-top: 1px solid #dddddd;\n border-bottom-right-radius: 3px;\n border-bottom-left-radius: 3px;\n}\n.panel > .list-group,\n.panel > .panel-collapse > .list-group {\n margin-bottom: 0;\n}\n.panel > .list-group .list-group-item,\n.panel > .panel-collapse > .list-group .list-group-item {\n border-width: 1px 0;\n border-radius: 0;\n}\n.panel > .list-group:first-child .list-group-item:first-child,\n.panel > .panel-collapse > .list-group:first-child .list-group-item:first-child {\n border-top: 0;\n border-top-right-radius: 3px;\n border-top-left-radius: 3px;\n}\n.panel > .list-group:last-child .list-group-item:last-child,\n.panel > .panel-collapse > .list-group:last-child .list-group-item:last-child {\n border-bottom: 0;\n border-bottom-right-radius: 3px;\n border-bottom-left-radius: 3px;\n}\n.panel-heading + .list-group .list-group-item:first-child {\n border-top-width: 0;\n}\n.list-group + .panel-footer {\n border-top-width: 0;\n}\n.panel > .table,\n.panel > .table-responsive > .table,\n.panel > .panel-collapse > .table {\n margin-bottom: 0;\n}\n.panel > .table caption,\n.panel > .table-responsive > .table caption,\n.panel > .panel-collapse > .table caption {\n padding-left: 15px;\n padding-right: 15px;\n}\n.panel > .table:first-child,\n.panel > .table-responsive:first-child > .table:first-child {\n border-top-right-radius: 3px;\n border-top-left-radius: 3px;\n}\n.panel > .table:first-child > thead:first-child > tr:first-child,\n.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child,\n.panel > .table:first-child > tbody:first-child > tr:first-child,\n.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child {\n border-top-left-radius: 3px;\n border-top-right-radius: 3px;\n}\n.panel > .table:first-child > thead:first-child > tr:first-child td:first-child,\n.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child td:first-child,\n.panel > .table:first-child > tbody:first-child > tr:first-child td:first-child,\n.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child td:first-child,\n.panel > .table:first-child > thead:first-child > tr:first-child th:first-child,\n.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child th:first-child,\n.panel > .table:first-child > tbody:first-child > tr:first-child th:first-child,\n.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child th:first-child {\n border-top-left-radius: 3px;\n}\n.panel > .table:first-child > thead:first-child > tr:first-child td:last-child,\n.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child td:last-child,\n.panel > .table:first-child > tbody:first-child > tr:first-child td:last-child,\n.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child td:last-child,\n.panel > .table:first-child > thead:first-child > tr:first-child th:last-child,\n.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child th:last-child,\n.panel > .table:first-child > tbody:first-child > tr:first-child th:last-child,\n.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child th:last-child {\n border-top-right-radius: 3px;\n}\n.panel > .table:last-child,\n.panel > .table-responsive:last-child > .table:last-child {\n border-bottom-right-radius: 3px;\n border-bottom-left-radius: 3px;\n}\n.panel > .table:last-child > tbody:last-child > tr:last-child,\n.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child,\n.panel > .table:last-child > tfoot:last-child > tr:last-child,\n.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child {\n border-bottom-left-radius: 3px;\n border-bottom-right-radius: 3px;\n}\n.panel > .table:last-child > tbody:last-child > tr:last-child td:first-child,\n.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child td:first-child,\n.panel > .table:last-child > tfoot:last-child > tr:last-child td:first-child,\n.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child td:first-child,\n.panel > .table:last-child > tbody:last-child > tr:last-child th:first-child,\n.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child th:first-child,\n.panel > .table:last-child > tfoot:last-child > tr:last-child th:first-child,\n.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child th:first-child {\n border-bottom-left-radius: 3px;\n}\n.panel > .table:last-child > tbody:last-child > tr:last-child td:last-child,\n.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child td:last-child,\n.panel > .table:last-child > tfoot:last-child > tr:last-child td:last-child,\n.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child td:last-child,\n.panel > .table:last-child > tbody:last-child > tr:last-child th:last-child,\n.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child th:last-child,\n.panel > .table:last-child > tfoot:last-child > tr:last-child th:last-child,\n.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child th:last-child {\n border-bottom-right-radius: 3px;\n}\n.panel > .panel-body + .table,\n.panel > .panel-body + .table-responsive,\n.panel > .table + .panel-body,\n.panel > .table-responsive + .panel-body {\n border-top: 1px solid #dddddd;\n}\n.panel > .table > tbody:first-child > tr:first-child th,\n.panel > .table > tbody:first-child > tr:first-child td {\n border-top: 0;\n}\n.panel > .table-bordered,\n.panel > .table-responsive > .table-bordered {\n border: 0;\n}\n.panel > .table-bordered > thead > tr > th:first-child,\n.panel > .table-responsive > .table-bordered > thead > tr > th:first-child,\n.panel > .table-bordered > tbody > tr > th:first-child,\n.panel > .table-responsive > .table-bordered > tbody > tr > th:first-child,\n.panel > .table-bordered > tfoot > tr > th:first-child,\n.panel > .table-responsive > .table-bordered > tfoot > tr > th:first-child,\n.panel > .table-bordered > thead > tr > td:first-child,\n.panel > .table-responsive > .table-bordered > thead > tr > td:first-child,\n.panel > .table-bordered > tbody > tr > td:first-child,\n.panel > .table-responsive > .table-bordered > tbody > tr > td:first-child,\n.panel > .table-bordered > tfoot > tr > td:first-child,\n.panel > .table-responsive > .table-bordered > tfoot > tr > td:first-child {\n border-left: 0;\n}\n.panel > .table-bordered > thead > tr > th:last-child,\n.panel > .table-responsive > .table-bordered > thead > tr > th:last-child,\n.panel > .table-bordered > tbody > tr > th:last-child,\n.panel > .table-responsive > .table-bordered > tbody > tr > th:last-child,\n.panel > .table-bordered > tfoot > tr > th:last-child,\n.panel > .table-responsive > .table-bordered > tfoot > tr > th:last-child,\n.panel > .table-bordered > thead > tr > td:last-child,\n.panel > .table-responsive > .table-bordered > thead > tr > td:last-child,\n.panel > .table-bordered > tbody > tr > td:last-child,\n.panel > .table-responsive > .table-bordered > tbody > tr > td:last-child,\n.panel > .table-bordered > tfoot > tr > td:last-child,\n.panel > .table-responsive > .table-bordered > tfoot > tr > td:last-child {\n border-right: 0;\n}\n.panel > .table-bordered > thead > tr:first-child > td,\n.panel > .table-responsive > .table-bordered > thead > tr:first-child > td,\n.panel > .table-bordered > tbody > tr:first-child > td,\n.panel > .table-responsive > .table-bordered > tbody > tr:first-child > td,\n.panel > .table-bordered > thead > tr:first-child > th,\n.panel > .table-responsive > .table-bordered > thead > tr:first-child > th,\n.panel > .table-bordered > tbody > tr:first-child > th,\n.panel > .table-responsive > .table-bordered > tbody > tr:first-child > th {\n border-bottom: 0;\n}\n.panel > .table-bordered > tbody > tr:last-child > td,\n.panel > .table-responsive > .table-bordered > tbody > tr:last-child > td,\n.panel > .table-bordered > tfoot > tr:last-child > td,\n.panel > .table-responsive > .table-bordered > tfoot > tr:last-child > td,\n.panel > .table-bordered > tbody > tr:last-child > th,\n.panel > .table-responsive > .table-bordered > tbody > tr:last-child > th,\n.panel > .table-bordered > tfoot > tr:last-child > th,\n.panel > .table-responsive > .table-bordered > tfoot > tr:last-child > th {\n border-bottom: 0;\n}\n.panel > .table-responsive {\n border: 0;\n margin-bottom: 0;\n}\n.panel-group {\n margin-bottom: 20px;\n}\n.panel-group .panel {\n margin-bottom: 0;\n border-radius: 4px;\n}\n.panel-group .panel + .panel {\n margin-top: 5px;\n}\n.panel-group .panel-heading {\n border-bottom: 0;\n}\n.panel-group .panel-heading + .panel-collapse > .panel-body,\n.panel-group .panel-heading + .panel-collapse > .list-group {\n border-top: 1px solid #dddddd;\n}\n.panel-group .panel-footer {\n border-top: 0;\n}\n.panel-group .panel-footer + .panel-collapse .panel-body {\n border-bottom: 1px solid #dddddd;\n}\n.panel-default {\n border-color: #dddddd;\n}\n.panel-default > .panel-heading {\n color: #333333;\n background-color: #f5f5f5;\n border-color: #dddddd;\n}\n.panel-default > .panel-heading + .panel-collapse > .panel-body {\n border-top-color: #dddddd;\n}\n.panel-default > .panel-heading .badge {\n color: #f5f5f5;\n background-color: #333333;\n}\n.panel-default > .panel-footer + .panel-collapse > .panel-body {\n border-bottom-color: #dddddd;\n}\n.panel-primary {\n border-color: #337ab7;\n}\n.panel-primary > .panel-heading {\n color: #ffffff;\n background-color: #337ab7;\n border-color: #337ab7;\n}\n.panel-primary > .panel-heading + .panel-collapse > .panel-body {\n border-top-color: #337ab7;\n}\n.panel-primary > .panel-heading .badge {\n color: #337ab7;\n background-color: #ffffff;\n}\n.panel-primary > .panel-footer + .panel-collapse > .panel-body {\n border-bottom-color: #337ab7;\n}\n.panel-success {\n border-color: #d6e9c6;\n}\n.panel-success > .panel-heading {\n color: #3c763d;\n background-color: #dff0d8;\n border-color: #d6e9c6;\n}\n.panel-success > .panel-heading + .panel-collapse > .panel-body {\n border-top-color: #d6e9c6;\n}\n.panel-success > .panel-heading .badge {\n color: #dff0d8;\n background-color: #3c763d;\n}\n.panel-success > .panel-footer + .panel-collapse > .panel-body {\n border-bottom-color: #d6e9c6;\n}\n.panel-info {\n border-color: #bce8f1;\n}\n.panel-info > .panel-heading {\n color: #31708f;\n background-color: #d9edf7;\n border-color: #bce8f1;\n}\n.panel-info > .panel-heading + .panel-collapse > .panel-body {\n border-top-color: #bce8f1;\n}\n.panel-info > .panel-heading .badge {\n color: #d9edf7;\n background-color: #31708f;\n}\n.panel-info > .panel-footer + .panel-collapse > .panel-body {\n border-bottom-color: #bce8f1;\n}\n.panel-warning {\n border-color: #faebcc;\n}\n.panel-warning > .panel-heading {\n color: #8a6d3b;\n background-color: #fcf8e3;\n border-color: #faebcc;\n}\n.panel-warning > .panel-heading + .panel-collapse > .panel-body {\n border-top-color: #faebcc;\n}\n.panel-warning > .panel-heading .badge {\n color: #fcf8e3;\n background-color: #8a6d3b;\n}\n.panel-warning > .panel-footer + .panel-collapse > .panel-body {\n border-bottom-color: #faebcc;\n}\n.panel-danger {\n border-color: #ebccd1;\n}\n.panel-danger > .panel-heading {\n color: #a94442;\n background-color: #f2dede;\n border-color: #ebccd1;\n}\n.panel-danger > .panel-heading + .panel-collapse > .panel-body {\n border-top-color: #ebccd1;\n}\n.panel-danger > .panel-heading .badge {\n color: #f2dede;\n background-color: #a94442;\n}\n.panel-danger > .panel-footer + .panel-collapse > .panel-body {\n border-bottom-color: #ebccd1;\n}\n.embed-responsive {\n position: relative;\n display: block;\n height: 0;\n padding: 0;\n overflow: hidden;\n}\n.embed-responsive .embed-responsive-item,\n.embed-responsive iframe,\n.embed-responsive embed,\n.embed-responsive object,\n.embed-responsive video {\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n height: 100%;\n width: 100%;\n border: 0;\n}\n.embed-responsive-16by9 {\n padding-bottom: 56.25%;\n}\n.embed-responsive-4by3 {\n padding-bottom: 75%;\n}\n.well {\n min-height: 20px;\n padding: 19px;\n margin-bottom: 20px;\n background-color: #f5f5f5;\n border: 1px solid #e3e3e3;\n border-radius: 4px;\n -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);\n box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);\n}\n.well blockquote {\n border-color: #ddd;\n border-color: rgba(0, 0, 0, 0.15);\n}\n.well-lg {\n padding: 24px;\n border-radius: 6px;\n}\n.well-sm {\n padding: 9px;\n border-radius: 3px;\n}\n.close {\n float: right;\n font-size: 21px;\n font-weight: bold;\n line-height: 1;\n color: #000000;\n text-shadow: 0 1px 0 #ffffff;\n opacity: 0.2;\n filter: alpha(opacity=20);\n}\n.close:hover,\n.close:focus {\n color: #000000;\n text-decoration: none;\n cursor: pointer;\n opacity: 0.5;\n filter: alpha(opacity=50);\n}\nbutton.close {\n padding: 0;\n cursor: pointer;\n background: transparent;\n border: 0;\n -webkit-appearance: none;\n}\n.modal-open {\n overflow: hidden;\n}\n.modal {\n display: none;\n overflow: hidden;\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: 1050;\n -webkit-overflow-scrolling: touch;\n outline: 0;\n}\n.modal.fade .modal-dialog {\n -webkit-transform: translate(0, -25%);\n -ms-transform: translate(0, -25%);\n -o-transform: translate(0, -25%);\n transform: translate(0, -25%);\n -webkit-transition: -webkit-transform 0.3s ease-out;\n -moz-transition: -moz-transform 0.3s ease-out;\n -o-transition: -o-transform 0.3s ease-out;\n transition: transform 0.3s ease-out;\n}\n.modal.in .modal-dialog {\n -webkit-transform: translate(0, 0);\n -ms-transform: translate(0, 0);\n -o-transform: translate(0, 0);\n transform: translate(0, 0);\n}\n.modal-open .modal {\n overflow-x: hidden;\n overflow-y: auto;\n}\n.modal-dialog {\n position: relative;\n width: auto;\n margin: 10px;\n}\n.modal-content {\n position: relative;\n background-color: #ffffff;\n border: 1px solid #999999;\n border: 1px solid rgba(0, 0, 0, 0.2);\n border-radius: 6px;\n -webkit-box-shadow: 0 3px 9px rgba(0, 0, 0, 0.5);\n box-shadow: 0 3px 9px rgba(0, 0, 0, 0.5);\n background-clip: padding-box;\n outline: 0;\n}\n.modal-backdrop {\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: 1040;\n background-color: #000000;\n}\n.modal-backdrop.fade {\n opacity: 0;\n filter: alpha(opacity=0);\n}\n.modal-backdrop.in {\n opacity: 0.5;\n filter: alpha(opacity=50);\n}\n.modal-header {\n padding: 15px;\n border-bottom: 1px solid #e5e5e5;\n min-height: 16.42857143px;\n}\n.modal-header .close {\n margin-top: -2px;\n}\n.modal-title {\n margin: 0;\n line-height: 1.42857143;\n}\n.modal-body {\n position: relative;\n padding: 15px;\n}\n.modal-footer {\n padding: 15px;\n text-align: right;\n border-top: 1px solid #e5e5e5;\n}\n.modal-footer .btn + .btn {\n margin-left: 5px;\n margin-bottom: 0;\n}\n.modal-footer .btn-group .btn + .btn {\n margin-left: -1px;\n}\n.modal-footer .btn-block + .btn-block {\n margin-left: 0;\n}\n.modal-scrollbar-measure {\n position: absolute;\n top: -9999px;\n width: 50px;\n height: 50px;\n overflow: scroll;\n}\n@media (min-width: 768px) {\n .modal-dialog {\n width: 600px;\n margin: 30px auto;\n }\n .modal-content {\n -webkit-box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);\n box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);\n }\n .modal-sm {\n width: 300px;\n }\n}\n@media (min-width: 992px) {\n .modal-lg {\n width: 900px;\n }\n}\n.tooltip {\n position: absolute;\n z-index: 1070;\n display: block;\n font-family: \"Helvetica Neue\", Helvetica, Arial, sans-serif;\n font-size: 12px;\n font-weight: normal;\n line-height: 1.4;\n opacity: 0;\n filter: alpha(opacity=0);\n}\n.tooltip.in {\n opacity: 0.9;\n filter: alpha(opacity=90);\n}\n.tooltip.top {\n margin-top: -3px;\n padding: 5px 0;\n}\n.tooltip.right {\n margin-left: 3px;\n padding: 0 5px;\n}\n.tooltip.bottom {\n margin-top: 3px;\n padding: 5px 0;\n}\n.tooltip.left {\n margin-left: -3px;\n padding: 0 5px;\n}\n.tooltip-inner {\n max-width: 200px;\n padding: 3px 8px;\n color: #ffffff;\n text-align: center;\n text-decoration: none;\n background-color: #000000;\n border-radius: 4px;\n}\n.tooltip-arrow {\n position: absolute;\n width: 0;\n height: 0;\n border-color: transparent;\n border-style: solid;\n}\n.tooltip.top .tooltip-arrow {\n bottom: 0;\n left: 50%;\n margin-left: -5px;\n border-width: 5px 5px 0;\n border-top-color: #000000;\n}\n.tooltip.top-left .tooltip-arrow {\n bottom: 0;\n right: 5px;\n margin-bottom: -5px;\n border-width: 5px 5px 0;\n border-top-color: #000000;\n}\n.tooltip.top-right .tooltip-arrow {\n bottom: 0;\n left: 5px;\n margin-bottom: -5px;\n border-width: 5px 5px 0;\n border-top-color: #000000;\n}\n.tooltip.right .tooltip-arrow {\n top: 50%;\n left: 0;\n margin-top: -5px;\n border-width: 5px 5px 5px 0;\n border-right-color: #000000;\n}\n.tooltip.left .tooltip-arrow {\n top: 50%;\n right: 0;\n margin-top: -5px;\n border-width: 5px 0 5px 5px;\n border-left-color: #000000;\n}\n.tooltip.bottom .tooltip-arrow {\n top: 0;\n left: 50%;\n margin-left: -5px;\n border-width: 0 5px 5px;\n border-bottom-color: #000000;\n}\n.tooltip.bottom-left .tooltip-arrow {\n top: 0;\n right: 5px;\n margin-top: -5px;\n border-width: 0 5px 5px;\n border-bottom-color: #000000;\n}\n.tooltip.bottom-right .tooltip-arrow {\n top: 0;\n left: 5px;\n margin-top: -5px;\n border-width: 0 5px 5px;\n border-bottom-color: #000000;\n}\n.popover {\n position: absolute;\n top: 0;\n left: 0;\n z-index: 1060;\n display: none;\n max-width: 276px;\n padding: 1px;\n font-family: \"Helvetica Neue\", Helvetica, Arial, sans-serif;\n font-size: 14px;\n font-weight: normal;\n line-height: 1.42857143;\n text-align: left;\n background-color: #ffffff;\n background-clip: padding-box;\n border: 1px solid #cccccc;\n border: 1px solid rgba(0, 0, 0, 0.2);\n border-radius: 6px;\n -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);\n box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);\n white-space: normal;\n}\n.popover.top {\n margin-top: -10px;\n}\n.popover.right {\n margin-left: 10px;\n}\n.popover.bottom {\n margin-top: 10px;\n}\n.popover.left {\n margin-left: -10px;\n}\n.popover-title {\n margin: 0;\n padding: 8px 14px;\n font-size: 14px;\n background-color: #f7f7f7;\n border-bottom: 1px solid #ebebeb;\n border-radius: 5px 5px 0 0;\n}\n.popover-content {\n padding: 9px 14px;\n}\n.popover > .arrow,\n.popover > .arrow:after {\n position: absolute;\n display: block;\n width: 0;\n height: 0;\n border-color: transparent;\n border-style: solid;\n}\n.popover > .arrow {\n border-width: 11px;\n}\n.popover > .arrow:after {\n border-width: 10px;\n content: \"\";\n}\n.popover.top > .arrow {\n left: 50%;\n margin-left: -11px;\n border-bottom-width: 0;\n border-top-color: #999999;\n border-top-color: rgba(0, 0, 0, 0.25);\n bottom: -11px;\n}\n.popover.top > .arrow:after {\n content: \" \";\n bottom: 1px;\n margin-left: -10px;\n border-bottom-width: 0;\n border-top-color: #ffffff;\n}\n.popover.right > .arrow {\n top: 50%;\n left: -11px;\n margin-top: -11px;\n border-left-width: 0;\n border-right-color: #999999;\n border-right-color: rgba(0, 0, 0, 0.25);\n}\n.popover.right > .arrow:after {\n content: \" \";\n left: 1px;\n bottom: -10px;\n border-left-width: 0;\n border-right-color: #ffffff;\n}\n.popover.bottom > .arrow {\n left: 50%;\n margin-left: -11px;\n border-top-width: 0;\n border-bottom-color: #999999;\n border-bottom-color: rgba(0, 0, 0, 0.25);\n top: -11px;\n}\n.popover.bottom > .arrow:after {\n content: \" \";\n top: 1px;\n margin-left: -10px;\n border-top-width: 0;\n border-bottom-color: #ffffff;\n}\n.popover.left > .arrow {\n top: 50%;\n right: -11px;\n margin-top: -11px;\n border-right-width: 0;\n border-left-color: #999999;\n border-left-color: rgba(0, 0, 0, 0.25);\n}\n.popover.left > .arrow:after {\n content: \" \";\n right: 1px;\n border-right-width: 0;\n border-left-color: #ffffff;\n bottom: -10px;\n}\n.carousel {\n position: relative;\n}\n.carousel-inner {\n position: relative;\n overflow: hidden;\n width: 100%;\n}\n.carousel-inner > .item {\n display: none;\n position: relative;\n -webkit-transition: 0.6s ease-in-out left;\n -o-transition: 0.6s ease-in-out left;\n transition: 0.6s ease-in-out left;\n}\n.carousel-inner > .item > img,\n.carousel-inner > .item > a > img {\n line-height: 1;\n}\n@media all and (transform-3d), (-webkit-transform-3d) {\n .carousel-inner > .item {\n -webkit-transition: -webkit-transform 0.6s ease-in-out;\n -moz-transition: -moz-transform 0.6s ease-in-out;\n -o-transition: -o-transform 0.6s ease-in-out;\n transition: transform 0.6s ease-in-out;\n -webkit-backface-visibility: hidden;\n -moz-backface-visibility: hidden;\n backface-visibility: hidden;\n -webkit-perspective: 1000;\n -moz-perspective: 1000;\n perspective: 1000;\n }\n .carousel-inner > .item.next,\n .carousel-inner > .item.active.right {\n -webkit-transform: translate3d(100%, 0, 0);\n transform: translate3d(100%, 0, 0);\n left: 0;\n }\n .carousel-inner > .item.prev,\n .carousel-inner > .item.active.left {\n -webkit-transform: translate3d(-100%, 0, 0);\n transform: translate3d(-100%, 0, 0);\n left: 0;\n }\n .carousel-inner > .item.next.left,\n .carousel-inner > .item.prev.right,\n .carousel-inner > .item.active {\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n left: 0;\n }\n}\n.carousel-inner > .active,\n.carousel-inner > .next,\n.carousel-inner > .prev {\n display: block;\n}\n.carousel-inner > .active {\n left: 0;\n}\n.carousel-inner > .next,\n.carousel-inner > .prev {\n position: absolute;\n top: 0;\n width: 100%;\n}\n.carousel-inner > .next {\n left: 100%;\n}\n.carousel-inner > .prev {\n left: -100%;\n}\n.carousel-inner > .next.left,\n.carousel-inner > .prev.right {\n left: 0;\n}\n.carousel-inner > .active.left {\n left: -100%;\n}\n.carousel-inner > .active.right {\n left: 100%;\n}\n.carousel-control {\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n width: 15%;\n opacity: 0.5;\n filter: alpha(opacity=50);\n font-size: 20px;\n color: #ffffff;\n text-align: center;\n text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);\n}\n.carousel-control.left {\n background-image: -webkit-linear-gradient(left, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.0001) 100%);\n background-image: -o-linear-gradient(left, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.0001) 100%);\n background-image: linear-gradient(to right, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.0001) 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1);\n}\n.carousel-control.right {\n left: auto;\n right: 0;\n background-image: -webkit-linear-gradient(left, rgba(0, 0, 0, 0.0001) 0%, rgba(0, 0, 0, 0.5) 100%);\n background-image: -o-linear-gradient(left, rgba(0, 0, 0, 0.0001) 0%, rgba(0, 0, 0, 0.5) 100%);\n background-image: linear-gradient(to right, rgba(0, 0, 0, 0.0001) 0%, rgba(0, 0, 0, 0.5) 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1);\n}\n.carousel-control:hover,\n.carousel-control:focus {\n outline: 0;\n color: #ffffff;\n text-decoration: none;\n opacity: 0.9;\n filter: alpha(opacity=90);\n}\n.carousel-control .icon-prev,\n.carousel-control .icon-next,\n.carousel-control .glyphicon-chevron-left,\n.carousel-control .glyphicon-chevron-right {\n position: absolute;\n top: 50%;\n z-index: 5;\n display: inline-block;\n}\n.carousel-control .icon-prev,\n.carousel-control .glyphicon-chevron-left {\n left: 50%;\n margin-left: -10px;\n}\n.carousel-control .icon-next,\n.carousel-control .glyphicon-chevron-right {\n right: 50%;\n margin-right: -10px;\n}\n.carousel-control .icon-prev,\n.carousel-control .icon-next {\n width: 20px;\n height: 20px;\n margin-top: -10px;\n line-height: 1;\n font-family: serif;\n}\n.carousel-control .icon-prev:before {\n content: '\\2039';\n}\n.carousel-control .icon-next:before {\n content: '\\203a';\n}\n.carousel-indicators {\n position: absolute;\n bottom: 10px;\n left: 50%;\n z-index: 15;\n width: 60%;\n margin-left: -30%;\n padding-left: 0;\n list-style: none;\n text-align: center;\n}\n.carousel-indicators li {\n display: inline-block;\n width: 10px;\n height: 10px;\n margin: 1px;\n text-indent: -999px;\n border: 1px solid #ffffff;\n border-radius: 10px;\n cursor: pointer;\n background-color: #000 \\9;\n background-color: rgba(0, 0, 0, 0);\n}\n.carousel-indicators .active {\n margin: 0;\n width: 12px;\n height: 12px;\n background-color: #ffffff;\n}\n.carousel-caption {\n position: absolute;\n left: 15%;\n right: 15%;\n bottom: 20px;\n z-index: 10;\n padding-top: 20px;\n padding-bottom: 20px;\n color: #ffffff;\n text-align: center;\n text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);\n}\n.carousel-caption .btn {\n text-shadow: none;\n}\n@media screen and (min-width: 768px) {\n .carousel-control .glyphicon-chevron-left,\n .carousel-control .glyphicon-chevron-right,\n .carousel-control .icon-prev,\n .carousel-control .icon-next {\n width: 30px;\n height: 30px;\n margin-top: -15px;\n font-size: 30px;\n }\n .carousel-control .glyphicon-chevron-left,\n .carousel-control .icon-prev {\n margin-left: -15px;\n }\n .carousel-control .glyphicon-chevron-right,\n .carousel-control .icon-next {\n margin-right: -15px;\n }\n .carousel-caption {\n left: 20%;\n right: 20%;\n padding-bottom: 30px;\n }\n .carousel-indicators {\n bottom: 20px;\n }\n}\n.clearfix:before,\n.clearfix:after,\n.dl-horizontal dd:before,\n.dl-horizontal dd:after,\n.container:before,\n.container:after,\n.container-fluid:before,\n.container-fluid:after,\n.row:before,\n.row:after,\n.form-horizontal .form-group:before,\n.form-horizontal .form-group:after,\n.btn-toolbar:before,\n.btn-toolbar:after,\n.btn-group-vertical > .btn-group:before,\n.btn-group-vertical > .btn-group:after,\n.nav:before,\n.nav:after,\n.navbar:before,\n.navbar:after,\n.navbar-header:before,\n.navbar-header:after,\n.navbar-collapse:before,\n.navbar-collapse:after,\n.pager:before,\n.pager:after,\n.panel-body:before,\n.panel-body:after,\n.modal-footer:before,\n.modal-footer:after {\n content: \" \";\n display: table;\n}\n.clearfix:after,\n.dl-horizontal dd:after,\n.container:after,\n.container-fluid:after,\n.row:after,\n.form-horizontal .form-group:after,\n.btn-toolbar:after,\n.btn-group-vertical > .btn-group:after,\n.nav:after,\n.navbar:after,\n.navbar-header:after,\n.navbar-collapse:after,\n.pager:after,\n.panel-body:after,\n.modal-footer:after {\n clear: both;\n}\n.center-block {\n display: block;\n margin-left: auto;\n margin-right: auto;\n}\n.pull-right {\n float: right !important;\n}\n.pull-left {\n float: left !important;\n}\n.hide {\n display: none !important;\n}\n.show {\n display: block !important;\n}\n.invisible {\n visibility: hidden;\n}\n.text-hide {\n font: 0/0 a;\n color: transparent;\n text-shadow: none;\n background-color: transparent;\n border: 0;\n}\n.hidden {\n display: none !important;\n}\n.affix {\n position: fixed;\n}\n@-ms-viewport {\n width: device-width;\n}\n.visible-xs,\n.visible-sm,\n.visible-md,\n.visible-lg {\n display: none !important;\n}\n.visible-xs-block,\n.visible-xs-inline,\n.visible-xs-inline-block,\n.visible-sm-block,\n.visible-sm-inline,\n.visible-sm-inline-block,\n.visible-md-block,\n.visible-md-inline,\n.visible-md-inline-block,\n.visible-lg-block,\n.visible-lg-inline,\n.visible-lg-inline-block {\n display: none !important;\n}\n@media (max-width: 767px) {\n .visible-xs {\n display: block !important;\n }\n table.visible-xs {\n display: table;\n }\n tr.visible-xs {\n display: table-row !important;\n }\n th.visible-xs,\n td.visible-xs {\n display: table-cell !important;\n }\n}\n@media (max-width: 767px) {\n .visible-xs-block {\n display: block !important;\n }\n}\n@media (max-width: 767px) {\n .visible-xs-inline {\n display: inline !important;\n }\n}\n@media (max-width: 767px) {\n .visible-xs-inline-block {\n display: inline-block !important;\n }\n}\n@media (min-width: 768px) and (max-width: 991px) {\n .visible-sm {\n display: block !important;\n }\n table.visible-sm {\n display: table;\n }\n tr.visible-sm {\n display: table-row !important;\n }\n th.visible-sm,\n td.visible-sm {\n display: table-cell !important;\n }\n}\n@media (min-width: 768px) and (max-width: 991px) {\n .visible-sm-block {\n display: block !important;\n }\n}\n@media (min-width: 768px) and (max-width: 991px) {\n .visible-sm-inline {\n display: inline !important;\n }\n}\n@media (min-width: 768px) and (max-width: 991px) {\n .visible-sm-inline-block {\n display: inline-block !important;\n }\n}\n@media (min-width: 992px) and (max-width: 1199px) {\n .visible-md {\n display: block !important;\n }\n table.visible-md {\n display: table;\n }\n tr.visible-md {\n display: table-row !important;\n }\n th.visible-md,\n td.visible-md {\n display: table-cell !important;\n }\n}\n@media (min-width: 992px) and (max-width: 1199px) {\n .visible-md-block {\n display: block !important;\n }\n}\n@media (min-width: 992px) and (max-width: 1199px) {\n .visible-md-inline {\n display: inline !important;\n }\n}\n@media (min-width: 992px) and (max-width: 1199px) {\n .visible-md-inline-block {\n display: inline-block !important;\n }\n}\n@media (min-width: 1200px) {\n .visible-lg {\n display: block !important;\n }\n table.visible-lg {\n display: table;\n }\n tr.visible-lg {\n display: table-row !important;\n }\n th.visible-lg,\n td.visible-lg {\n display: table-cell !important;\n }\n}\n@media (min-width: 1200px) {\n .visible-lg-block {\n display: block !important;\n }\n}\n@media (min-width: 1200px) {\n .visible-lg-inline {\n display: inline !important;\n }\n}\n@media (min-width: 1200px) {\n .visible-lg-inline-block {\n display: inline-block !important;\n }\n}\n@media (max-width: 767px) {\n .hidden-xs {\n display: none !important;\n }\n}\n@media (min-width: 768px) and (max-width: 991px) {\n .hidden-sm {\n display: none !important;\n }\n}\n@media (min-width: 992px) and (max-width: 1199px) {\n .hidden-md {\n display: none !important;\n }\n}\n@media (min-width: 1200px) {\n .hidden-lg {\n display: none !important;\n }\n}\n.visible-print {\n display: none !important;\n}\n@media print {\n .visible-print {\n display: block !important;\n }\n table.visible-print {\n display: table;\n }\n tr.visible-print {\n display: table-row !important;\n }\n th.visible-print,\n td.visible-print {\n display: table-cell !important;\n }\n}\n.visible-print-block {\n display: none !important;\n}\n@media print {\n .visible-print-block {\n display: block !important;\n }\n}\n.visible-print-inline {\n display: none !important;\n}\n@media print {\n .visible-print-inline {\n display: inline !important;\n }\n}\n.visible-print-inline-block {\n display: none !important;\n}\n@media print {\n .visible-print-inline-block {\n display: inline-block !important;\n }\n}\n@media print {\n .hidden-print {\n display: none !important;\n }\n}\n/*# sourceMappingURL=bootstrap.css.map */","/*! normalize.css v3.0.2 | MIT License | git.io/normalize */\n\n//\n// 1. Set default font family to sans-serif.\n// 2. Prevent iOS text size adjust after orientation change, without disabling\n// user zoom.\n//\n\nhtml {\n font-family: sans-serif; // 1\n -ms-text-size-adjust: 100%; // 2\n -webkit-text-size-adjust: 100%; // 2\n}\n\n//\n// Remove default margin.\n//\n\nbody {\n margin: 0;\n}\n\n// HTML5 display definitions\n// ==========================================================================\n\n//\n// Correct `block` display not defined for any HTML5 element in IE 8/9.\n// Correct `block` display not defined for `details` or `summary` in IE 10/11\n// and Firefox.\n// Correct `block` display not defined for `main` in IE 11.\n//\n\narticle,\naside,\ndetails,\nfigcaption,\nfigure,\nfooter,\nheader,\nhgroup,\nmain,\nmenu,\nnav,\nsection,\nsummary {\n display: block;\n}\n\n//\n// 1. Correct `inline-block` display not defined in IE 8/9.\n// 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera.\n//\n\naudio,\ncanvas,\nprogress,\nvideo {\n display: inline-block; // 1\n vertical-align: baseline; // 2\n}\n\n//\n// Prevent modern browsers from displaying `audio` without controls.\n// Remove excess height in iOS 5 devices.\n//\n\naudio:not([controls]) {\n display: none;\n height: 0;\n}\n\n//\n// Address `[hidden]` styling not present in IE 8/9/10.\n// Hide the `template` element in IE 8/9/11, Safari, and Firefox < 22.\n//\n\n[hidden],\ntemplate {\n display: none;\n}\n\n// Links\n// ==========================================================================\n\n//\n// Remove the gray background color from active links in IE 10.\n//\n\na {\n background-color: transparent;\n}\n\n//\n// Improve readability when focused and also mouse hovered in all browsers.\n//\n\na:active,\na:hover {\n outline: 0;\n}\n\n// Text-level semantics\n// ==========================================================================\n\n//\n// Address styling not present in IE 8/9/10/11, Safari, and Chrome.\n//\n\nabbr[title] {\n border-bottom: 1px dotted;\n}\n\n//\n// Address style set to `bolder` in Firefox 4+, Safari, and Chrome.\n//\n\nb,\nstrong {\n font-weight: bold;\n}\n\n//\n// Address styling not present in Safari and Chrome.\n//\n\ndfn {\n font-style: italic;\n}\n\n//\n// Address variable `h1` font-size and margin within `section` and `article`\n// contexts in Firefox 4+, Safari, and Chrome.\n//\n\nh1 {\n font-size: 2em;\n margin: 0.67em 0;\n}\n\n//\n// Address styling not present in IE 8/9.\n//\n\nmark {\n background: #ff0;\n color: #000;\n}\n\n//\n// Address inconsistent and variable font size in all browsers.\n//\n\nsmall {\n font-size: 80%;\n}\n\n//\n// Prevent `sub` and `sup` affecting `line-height` in all browsers.\n//\n\nsub,\nsup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n}\n\nsup {\n top: -0.5em;\n}\n\nsub {\n bottom: -0.25em;\n}\n\n// Embedded content\n// ==========================================================================\n\n//\n// Remove border when inside `a` element in IE 8/9/10.\n//\n\nimg {\n border: 0;\n}\n\n//\n// Correct overflow not hidden in IE 9/10/11.\n//\n\nsvg:not(:root) {\n overflow: hidden;\n}\n\n// Grouping content\n// ==========================================================================\n\n//\n// Address margin not present in IE 8/9 and Safari.\n//\n\nfigure {\n margin: 1em 40px;\n}\n\n//\n// Address differences between Firefox and other browsers.\n//\n\nhr {\n -moz-box-sizing: content-box;\n box-sizing: content-box;\n height: 0;\n}\n\n//\n// Contain overflow in all browsers.\n//\n\npre {\n overflow: auto;\n}\n\n//\n// Address odd `em`-unit font size rendering in all browsers.\n//\n\ncode,\nkbd,\npre,\nsamp {\n font-family: monospace, monospace;\n font-size: 1em;\n}\n\n// Forms\n// ==========================================================================\n\n//\n// Known limitation: by default, Chrome and Safari on OS X allow very limited\n// styling of `select`, unless a `border` property is set.\n//\n\n//\n// 1. Correct color not being inherited.\n// Known issue: affects color of disabled elements.\n// 2. Correct font properties not being inherited.\n// 3. Address margins set differently in Firefox 4+, Safari, and Chrome.\n//\n\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n color: inherit; // 1\n font: inherit; // 2\n margin: 0; // 3\n}\n\n//\n// Address `overflow` set to `hidden` in IE 8/9/10/11.\n//\n\nbutton {\n overflow: visible;\n}\n\n//\n// Address inconsistent `text-transform` inheritance for `button` and `select`.\n// All other form control elements do not inherit `text-transform` values.\n// Correct `button` style inheritance in Firefox, IE 8/9/10/11, and Opera.\n// Correct `select` style inheritance in Firefox.\n//\n\nbutton,\nselect {\n text-transform: none;\n}\n\n//\n// 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`\n// and `video` controls.\n// 2. Correct inability to style clickable `input` types in iOS.\n// 3. Improve usability and consistency of cursor style between image-type\n// `input` and others.\n//\n\nbutton,\nhtml input[type=\"button\"], // 1\ninput[type=\"reset\"],\ninput[type=\"submit\"] {\n -webkit-appearance: button; // 2\n cursor: pointer; // 3\n}\n\n//\n// Re-set default cursor for disabled elements.\n//\n\nbutton[disabled],\nhtml input[disabled] {\n cursor: default;\n}\n\n//\n// Remove inner padding and border in Firefox 4+.\n//\n\nbutton::-moz-focus-inner,\ninput::-moz-focus-inner {\n border: 0;\n padding: 0;\n}\n\n//\n// Address Firefox 4+ setting `line-height` on `input` using `!important` in\n// the UA stylesheet.\n//\n\ninput {\n line-height: normal;\n}\n\n//\n// It's recommended that you don't attempt to style these elements.\n// Firefox's implementation doesn't respect box-sizing, padding, or width.\n//\n// 1. Address box sizing set to `content-box` in IE 8/9/10.\n// 2. Remove excess padding in IE 8/9/10.\n//\n\ninput[type=\"checkbox\"],\ninput[type=\"radio\"] {\n box-sizing: border-box; // 1\n padding: 0; // 2\n}\n\n//\n// Fix the cursor style for Chrome's increment/decrement buttons. For certain\n// `font-size` values of the `input`, it causes the cursor style of the\n// decrement button to change from `default` to `text`.\n//\n\ninput[type=\"number\"]::-webkit-inner-spin-button,\ninput[type=\"number\"]::-webkit-outer-spin-button {\n height: auto;\n}\n\n//\n// 1. Address `appearance` set to `searchfield` in Safari and Chrome.\n// 2. Address `box-sizing` set to `border-box` in Safari and Chrome\n// (include `-moz` to future-proof).\n//\n\ninput[type=\"search\"] {\n -webkit-appearance: textfield; // 1\n -moz-box-sizing: content-box;\n -webkit-box-sizing: content-box; // 2\n box-sizing: content-box;\n}\n\n//\n// Remove inner padding and search cancel button in Safari and Chrome on OS X.\n// Safari (but not Chrome) clips the cancel button when the search input has\n// padding (and `textfield` appearance).\n//\n\ninput[type=\"search\"]::-webkit-search-cancel-button,\ninput[type=\"search\"]::-webkit-search-decoration {\n -webkit-appearance: none;\n}\n\n//\n// Define consistent border, margin, and padding.\n//\n\nfieldset {\n border: 1px solid #c0c0c0;\n margin: 0 2px;\n padding: 0.35em 0.625em 0.75em;\n}\n\n//\n// 1. Correct `color` not being inherited in IE 8/9/10/11.\n// 2. Remove padding so people aren't caught out if they zero out fieldsets.\n//\n\nlegend {\n border: 0; // 1\n padding: 0; // 2\n}\n\n//\n// Remove default vertical scrollbar in IE 8/9/10/11.\n//\n\ntextarea {\n overflow: auto;\n}\n\n//\n// Don't inherit the `font-weight` (applied by a rule above).\n// NOTE: the default cannot safely be changed in Chrome and Safari on OS X.\n//\n\noptgroup {\n font-weight: bold;\n}\n\n// Tables\n// ==========================================================================\n\n//\n// Remove most spacing between table cells.\n//\n\ntable {\n border-collapse: collapse;\n border-spacing: 0;\n}\n\ntd,\nth {\n padding: 0;\n}\n","/*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */\n\n// ==========================================================================\n// Print styles.\n// Inlined to avoid the additional HTTP request: h5bp.com/r\n// ==========================================================================\n\n@media print {\n *,\n *:before,\n *:after {\n background: transparent !important;\n color: #000 !important; // Black prints faster: h5bp.com/s\n box-shadow: none !important;\n text-shadow: none !important;\n }\n\n a,\n a:visited {\n text-decoration: underline;\n }\n\n a[href]:after {\n content: \" (\" attr(href) \")\";\n }\n\n abbr[title]:after {\n content: \" (\" attr(title) \")\";\n }\n\n // Don't show links that are fragment identifiers,\n // or use the `javascript:` pseudo protocol\n a[href^=\"#\"]:after,\n a[href^=\"javascript:\"]:after {\n content: \"\";\n }\n\n pre,\n blockquote {\n border: 1px solid #999;\n page-break-inside: avoid;\n }\n\n thead {\n display: table-header-group; // h5bp.com/t\n }\n\n tr,\n img {\n page-break-inside: avoid;\n }\n\n img {\n max-width: 100% !important;\n }\n\n p,\n h2,\n h3 {\n orphans: 3;\n widows: 3;\n }\n\n h2,\n h3 {\n page-break-after: avoid;\n }\n\n // Bootstrap specific changes start\n //\n // Chrome (OSX) fix for https://github.com/twbs/bootstrap/issues/11245\n // Once fixed, we can just straight up remove this.\n select {\n background: #fff !important;\n }\n\n // Bootstrap components\n .navbar {\n display: none;\n }\n .btn,\n .dropup > .btn {\n > .caret {\n border-top-color: #000 !important;\n }\n }\n .label {\n border: 1px solid #000;\n }\n\n .table {\n border-collapse: collapse !important;\n\n td,\n th {\n background-color: #fff !important;\n }\n }\n .table-bordered {\n th,\n td {\n border: 1px solid #ddd !important;\n }\n }\n\n // Bootstrap specific changes end\n}\n","//\n// Glyphicons for Bootstrap\n//\n// Since icons are fonts, they can be placed anywhere text is placed and are\n// thus automatically sized to match the surrounding child. To use, create an\n// inline element with the appropriate classes, like so:\n//\n// <a href=\"#\"><span class=\"glyphicon glyphicon-star\"></span> Star</a>\n\n// Import the fonts\n@font-face {\n font-family: 'Glyphicons Halflings';\n src: url('@{icon-font-path}@{icon-font-name}.eot');\n src: url('@{icon-font-path}@{icon-font-name}.eot?#iefix') format('embedded-opentype'),\n url('@{icon-font-path}@{icon-font-name}.woff2') format('woff2'),\n url('@{icon-font-path}@{icon-font-name}.woff') format('woff'),\n url('@{icon-font-path}@{icon-font-name}.ttf') format('truetype'),\n url('@{icon-font-path}@{icon-font-name}.svg#@{icon-font-svg-id}') format('svg');\n}\n\n// Catchall baseclass\n.glyphicon {\n position: relative;\n top: 1px;\n display: inline-block;\n font-family: 'Glyphicons Halflings';\n font-style: normal;\n font-weight: normal;\n line-height: 1;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\n// Individual icons\n.glyphicon-asterisk { &:before { content: \"\\2a\"; } }\n.glyphicon-plus { &:before { content: \"\\2b\"; } }\n.glyphicon-euro,\n.glyphicon-eur { &:before { content: \"\\20ac\"; } }\n.glyphicon-minus { &:before { content: \"\\2212\"; } }\n.glyphicon-cloud { &:before { content: \"\\2601\"; } }\n.glyphicon-envelope { &:before { content: \"\\2709\"; } }\n.glyphicon-pencil { &:before { content: \"\\270f\"; } }\n.glyphicon-glass { &:before { content: \"\\e001\"; } }\n.glyphicon-music { &:before { content: \"\\e002\"; } }\n.glyphicon-search { &:before { content: \"\\e003\"; } }\n.glyphicon-heart { &:before { content: \"\\e005\"; } }\n.glyphicon-star { &:before { content: \"\\e006\"; } }\n.glyphicon-star-empty { &:before { content: \"\\e007\"; } }\n.glyphicon-user { &:before { content: \"\\e008\"; } }\n.glyphicon-film { &:before { content: \"\\e009\"; } }\n.glyphicon-th-large { &:before { content: \"\\e010\"; } }\n.glyphicon-th { &:before { content: \"\\e011\"; } }\n.glyphicon-th-list { &:before { content: \"\\e012\"; } }\n.glyphicon-ok { &:before { content: \"\\e013\"; } }\n.glyphicon-remove { &:before { content: \"\\e014\"; } }\n.glyphicon-zoom-in { &:before { content: \"\\e015\"; } }\n.glyphicon-zoom-out { &:before { content: \"\\e016\"; } }\n.glyphicon-off { &:before { content: \"\\e017\"; } }\n.glyphicon-signal { &:before { content: \"\\e018\"; } }\n.glyphicon-cog { &:before { content: \"\\e019\"; } }\n.glyphicon-trash { &:before { content: \"\\e020\"; } }\n.glyphicon-home { &:before { content: \"\\e021\"; } }\n.glyphicon-file { &:before { content: \"\\e022\"; } }\n.glyphicon-time { &:before { content: \"\\e023\"; } }\n.glyphicon-road { &:before { content: \"\\e024\"; } }\n.glyphicon-download-alt { &:before { content: \"\\e025\"; } }\n.glyphicon-download { &:before { content: \"\\e026\"; } }\n.glyphicon-upload { &:before { content: \"\\e027\"; } }\n.glyphicon-inbox { &:before { content: \"\\e028\"; } }\n.glyphicon-play-circle { &:before { content: \"\\e029\"; } }\n.glyphicon-repeat { &:before { content: \"\\e030\"; } }\n.glyphicon-refresh { &:before { content: \"\\e031\"; } }\n.glyphicon-list-alt { &:before { content: \"\\e032\"; } }\n.glyphicon-lock { &:before { content: \"\\e033\"; } }\n.glyphicon-flag { &:before { content: \"\\e034\"; } }\n.glyphicon-headphones { &:before { content: \"\\e035\"; } }\n.glyphicon-volume-off { &:before { content: \"\\e036\"; } }\n.glyphicon-volume-down { &:before { content: \"\\e037\"; } }\n.glyphicon-volume-up { &:before { content: \"\\e038\"; } }\n.glyphicon-qrcode { &:before { content: \"\\e039\"; } }\n.glyphicon-barcode { &:before { content: \"\\e040\"; } }\n.glyphicon-tag { &:before { content: \"\\e041\"; } }\n.glyphicon-tags { &:before { content: \"\\e042\"; } }\n.glyphicon-book { &:before { content: \"\\e043\"; } }\n.glyphicon-bookmark { &:before { content: \"\\e044\"; } }\n.glyphicon-print { &:before { content: \"\\e045\"; } }\n.glyphicon-camera { &:before { content: \"\\e046\"; } }\n.glyphicon-font { &:before { content: \"\\e047\"; } }\n.glyphicon-bold { &:before { content: \"\\e048\"; } }\n.glyphicon-italic { &:before { content: \"\\e049\"; } }\n.glyphicon-text-height { &:before { content: \"\\e050\"; } }\n.glyphicon-text-width { &:before { content: \"\\e051\"; } }\n.glyphicon-align-left { &:before { content: \"\\e052\"; } }\n.glyphicon-align-center { &:before { content: \"\\e053\"; } }\n.glyphicon-align-right { &:before { content: \"\\e054\"; } }\n.glyphicon-align-justify { &:before { content: \"\\e055\"; } }\n.glyphicon-list { &:before { content: \"\\e056\"; } }\n.glyphicon-indent-left { &:before { content: \"\\e057\"; } }\n.glyphicon-indent-right { &:before { content: \"\\e058\"; } }\n.glyphicon-facetime-video { &:before { content: \"\\e059\"; } }\n.glyphicon-picture { &:before { content: \"\\e060\"; } }\n.glyphicon-map-marker { &:before { content: \"\\e062\"; } }\n.glyphicon-adjust { &:before { content: \"\\e063\"; } }\n.glyphicon-tint { &:before { content: \"\\e064\"; } }\n.glyphicon-edit { &:before { content: \"\\e065\"; } }\n.glyphicon-share { &:before { content: \"\\e066\"; } }\n.glyphicon-check { &:before { content: \"\\e067\"; } }\n.glyphicon-move { &:before { content: \"\\e068\"; } }\n.glyphicon-step-backward { &:before { content: \"\\e069\"; } }\n.glyphicon-fast-backward { &:before { content: \"\\e070\"; } }\n.glyphicon-backward { &:before { content: \"\\e071\"; } }\n.glyphicon-play { &:before { content: \"\\e072\"; } }\n.glyphicon-pause { &:before { content: \"\\e073\"; } }\n.glyphicon-stop { &:before { content: \"\\e074\"; } }\n.glyphicon-forward { &:before { content: \"\\e075\"; } }\n.glyphicon-fast-forward { &:before { content: \"\\e076\"; } }\n.glyphicon-step-forward { &:before { content: \"\\e077\"; } }\n.glyphicon-eject { &:before { content: \"\\e078\"; } }\n.glyphicon-chevron-left { &:before { content: \"\\e079\"; } }\n.glyphicon-chevron-right { &:before { content: \"\\e080\"; } }\n.glyphicon-plus-sign { &:before { content: \"\\e081\"; } }\n.glyphicon-minus-sign { &:before { content: \"\\e082\"; } }\n.glyphicon-remove-sign { &:before { content: \"\\e083\"; } }\n.glyphicon-ok-sign { &:before { content: \"\\e084\"; } }\n.glyphicon-question-sign { &:before { content: \"\\e085\"; } }\n.glyphicon-info-sign { &:before { content: \"\\e086\"; } }\n.glyphicon-screenshot { &:before { content: \"\\e087\"; } }\n.glyphicon-remove-circle { &:before { content: \"\\e088\"; } }\n.glyphicon-ok-circle { &:before { content: \"\\e089\"; } }\n.glyphicon-ban-circle { &:before { content: \"\\e090\"; } }\n.glyphicon-arrow-left { &:before { content: \"\\e091\"; } }\n.glyphicon-arrow-right { &:before { content: \"\\e092\"; } }\n.glyphicon-arrow-up { &:before { content: \"\\e093\"; } }\n.glyphicon-arrow-down { &:before { content: \"\\e094\"; } }\n.glyphicon-share-alt { &:before { content: \"\\e095\"; } }\n.glyphicon-resize-full { &:before { content: \"\\e096\"; } }\n.glyphicon-resize-small { &:before { content: \"\\e097\"; } }\n.glyphicon-exclamation-sign { &:before { content: \"\\e101\"; } }\n.glyphicon-gift { &:before { content: \"\\e102\"; } }\n.glyphicon-leaf { &:before { content: \"\\e103\"; } }\n.glyphicon-fire { &:before { content: \"\\e104\"; } }\n.glyphicon-eye-open { &:before { content: \"\\e105\"; } }\n.glyphicon-eye-close { &:before { content: \"\\e106\"; } }\n.glyphicon-warning-sign { &:before { content: \"\\e107\"; } }\n.glyphicon-plane { &:before { content: \"\\e108\"; } }\n.glyphicon-calendar { &:before { content: \"\\e109\"; } }\n.glyphicon-random { &:before { content: \"\\e110\"; } }\n.glyphicon-comment { &:before { content: \"\\e111\"; } }\n.glyphicon-magnet { &:before { content: \"\\e112\"; } }\n.glyphicon-chevron-up { &:before { content: \"\\e113\"; } }\n.glyphicon-chevron-down { &:before { content: \"\\e114\"; } }\n.glyphicon-retweet { &:before { content: \"\\e115\"; } }\n.glyphicon-shopping-cart { &:before { content: \"\\e116\"; } }\n.glyphicon-folder-close { &:before { content: \"\\e117\"; } }\n.glyphicon-folder-open { &:before { content: \"\\e118\"; } }\n.glyphicon-resize-vertical { &:before { content: \"\\e119\"; } }\n.glyphicon-resize-horizontal { &:before { content: \"\\e120\"; } }\n.glyphicon-hdd { &:before { content: \"\\e121\"; } }\n.glyphicon-bullhorn { &:before { content: \"\\e122\"; } }\n.glyphicon-bell { &:before { content: \"\\e123\"; } }\n.glyphicon-certificate { &:before { content: \"\\e124\"; } }\n.glyphicon-thumbs-up { &:before { content: \"\\e125\"; } }\n.glyphicon-thumbs-down { &:before { content: \"\\e126\"; } }\n.glyphicon-hand-right { &:before { content: \"\\e127\"; } }\n.glyphicon-hand-left { &:before { content: \"\\e128\"; } }\n.glyphicon-hand-up { &:before { content: \"\\e129\"; } }\n.glyphicon-hand-down { &:before { content: \"\\e130\"; } }\n.glyphicon-circle-arrow-right { &:before { content: \"\\e131\"; } }\n.glyphicon-circle-arrow-left { &:before { content: \"\\e132\"; } }\n.glyphicon-circle-arrow-up { &:before { content: \"\\e133\"; } }\n.glyphicon-circle-arrow-down { &:before { content: \"\\e134\"; } }\n.glyphicon-globe { &:before { content: \"\\e135\"; } }\n.glyphicon-wrench { &:before { content: \"\\e136\"; } }\n.glyphicon-tasks { &:before { content: \"\\e137\"; } }\n.glyphicon-filter { &:before { content: \"\\e138\"; } }\n.glyphicon-briefcase { &:before { content: \"\\e139\"; } }\n.glyphicon-fullscreen { &:before { content: \"\\e140\"; } }\n.glyphicon-dashboard { &:before { content: \"\\e141\"; } }\n.glyphicon-paperclip { &:before { content: \"\\e142\"; } }\n.glyphicon-heart-empty { &:before { content: \"\\e143\"; } }\n.glyphicon-link { &:before { content: \"\\e144\"; } }\n.glyphicon-phone { &:before { content: \"\\e145\"; } }\n.glyphicon-pushpin { &:before { content: \"\\e146\"; } }\n.glyphicon-usd { &:before { content: \"\\e148\"; } }\n.glyphicon-gbp { &:before { content: \"\\e149\"; } }\n.glyphicon-sort { &:before { content: \"\\e150\"; } }\n.glyphicon-sort-by-alphabet { &:before { content: \"\\e151\"; } }\n.glyphicon-sort-by-alphabet-alt { &:before { content: \"\\e152\"; } }\n.glyphicon-sort-by-order { &:before { content: \"\\e153\"; } }\n.glyphicon-sort-by-order-alt { &:before { content: \"\\e154\"; } }\n.glyphicon-sort-by-attributes { &:before { content: \"\\e155\"; } }\n.glyphicon-sort-by-attributes-alt { &:before { content: \"\\e156\"; } }\n.glyphicon-unchecked { &:before { content: \"\\e157\"; } }\n.glyphicon-expand { &:before { content: \"\\e158\"; } }\n.glyphicon-collapse-down { &:before { content: \"\\e159\"; } }\n.glyphicon-collapse-up { &:before { content: \"\\e160\"; } }\n.glyphicon-log-in { &:before { content: \"\\e161\"; } }\n.glyphicon-flash { &:before { content: \"\\e162\"; } }\n.glyphicon-log-out { &:before { content: \"\\e163\"; } }\n.glyphicon-new-window { &:before { content: \"\\e164\"; } }\n.glyphicon-record { &:before { content: \"\\e165\"; } }\n.glyphicon-save { &:before { content: \"\\e166\"; } }\n.glyphicon-open { &:before { content: \"\\e167\"; } }\n.glyphicon-saved { &:before { content: \"\\e168\"; } }\n.glyphicon-import { &:before { content: \"\\e169\"; } }\n.glyphicon-export { &:before { content: \"\\e170\"; } }\n.glyphicon-send { &:before { content: \"\\e171\"; } }\n.glyphicon-floppy-disk { &:before { content: \"\\e172\"; } }\n.glyphicon-floppy-saved { &:before { content: \"\\e173\"; } }\n.glyphicon-floppy-remove { &:before { content: \"\\e174\"; } }\n.glyphicon-floppy-save { &:before { content: \"\\e175\"; } }\n.glyphicon-floppy-open { &:before { content: \"\\e176\"; } }\n.glyphicon-credit-card { &:before { content: \"\\e177\"; } }\n.glyphicon-transfer { &:before { content: \"\\e178\"; } }\n.glyphicon-cutlery { &:before { content: \"\\e179\"; } }\n.glyphicon-header { &:before { content: \"\\e180\"; } }\n.glyphicon-compressed { &:before { content: \"\\e181\"; } }\n.glyphicon-earphone { &:before { content: \"\\e182\"; } }\n.glyphicon-phone-alt { &:before { content: \"\\e183\"; } }\n.glyphicon-tower { &:before { content: \"\\e184\"; } }\n.glyphicon-stats { &:before { content: \"\\e185\"; } }\n.glyphicon-sd-video { &:before { content: \"\\e186\"; } }\n.glyphicon-hd-video { &:before { content: \"\\e187\"; } }\n.glyphicon-subtitles { &:before { content: \"\\e188\"; } }\n.glyphicon-sound-stereo { &:before { content: \"\\e189\"; } }\n.glyphicon-sound-dolby { &:before { content: \"\\e190\"; } }\n.glyphicon-sound-5-1 { &:before { content: \"\\e191\"; } }\n.glyphicon-sound-6-1 { &:before { content: \"\\e192\"; } }\n.glyphicon-sound-7-1 { &:before { content: \"\\e193\"; } }\n.glyphicon-copyright-mark { &:before { content: \"\\e194\"; } }\n.glyphicon-registration-mark { &:before { content: \"\\e195\"; } }\n.glyphicon-cloud-download { &:before { content: \"\\e197\"; } }\n.glyphicon-cloud-upload { &:before { content: \"\\e198\"; } }\n.glyphicon-tree-conifer { &:before { content: \"\\e199\"; } }\n.glyphicon-tree-deciduous { &:before { content: \"\\e200\"; } }\n.glyphicon-cd { &:before { content: \"\\e201\"; } }\n.glyphicon-save-file { &:before { content: \"\\e202\"; } }\n.glyphicon-open-file { &:before { content: \"\\e203\"; } }\n.glyphicon-level-up { &:before { content: \"\\e204\"; } }\n.glyphicon-copy { &:before { content: \"\\e205\"; } }\n.glyphicon-paste { &:before { content: \"\\e206\"; } }\n// The following 2 Glyphicons are omitted for the time being because\n// they currently use Unicode codepoints that are outside the\n// Basic Multilingual Plane (BMP). Older buggy versions of WebKit can't handle\n// non-BMP codepoints in CSS string escapes, and thus can't display these two icons.\n// Notably, the bug affects some older versions of the Android Browser.\n// More info: https://github.com/twbs/bootstrap/issues/10106\n// .glyphicon-door { &:before { content: \"\\1f6aa\"; } }\n// .glyphicon-key { &:before { content: \"\\1f511\"; } }\n.glyphicon-alert { &:before { content: \"\\e209\"; } }\n.glyphicon-equalizer { &:before { content: \"\\e210\"; } }\n.glyphicon-king { &:before { content: \"\\e211\"; } }\n.glyphicon-queen { &:before { content: \"\\e212\"; } }\n.glyphicon-pawn { &:before { content: \"\\e213\"; } }\n.glyphicon-bishop { &:before { content: \"\\e214\"; } }\n.glyphicon-knight { &:before { content: \"\\e215\"; } }\n.glyphicon-baby-formula { &:before { content: \"\\e216\"; } }\n.glyphicon-tent { &:before { content: \"\\26fa\"; } }\n.glyphicon-blackboard { &:before { content: \"\\e218\"; } }\n.glyphicon-bed { &:before { content: \"\\e219\"; } }\n.glyphicon-apple { &:before { content: \"\\f8ff\"; } }\n.glyphicon-erase { &:before { content: \"\\e221\"; } }\n.glyphicon-hourglass { &:before { content: \"\\231b\"; } }\n.glyphicon-lamp { &:before { content: \"\\e223\"; } }\n.glyphicon-duplicate { &:before { content: \"\\e224\"; } }\n.glyphicon-piggy-bank { &:before { content: \"\\e225\"; } }\n.glyphicon-scissors { &:before { content: \"\\e226\"; } }\n.glyphicon-bitcoin { &:before { content: \"\\e227\"; } }\n.glyphicon-btc { &:before { content: \"\\e227\"; } }\n.glyphicon-xbt { &:before { content: \"\\e227\"; } }\n.glyphicon-yen { &:before { content: \"\\00a5\"; } }\n.glyphicon-jpy { &:before { content: \"\\00a5\"; } }\n.glyphicon-ruble { &:before { content: \"\\20bd\"; } }\n.glyphicon-rub { &:before { content: \"\\20bd\"; } }\n.glyphicon-scale { &:before { content: \"\\e230\"; } }\n.glyphicon-ice-lolly { &:before { content: \"\\e231\"; } }\n.glyphicon-ice-lolly-tasted { &:before { content: \"\\e232\"; } }\n.glyphicon-education { &:before { content: \"\\e233\"; } }\n.glyphicon-option-horizontal { &:before { content: \"\\e234\"; } }\n.glyphicon-option-vertical { &:before { content: \"\\e235\"; } }\n.glyphicon-menu-hamburger { &:before { content: \"\\e236\"; } }\n.glyphicon-modal-window { &:before { content: \"\\e237\"; } }\n.glyphicon-oil { &:before { content: \"\\e238\"; } }\n.glyphicon-grain { &:before { content: \"\\e239\"; } }\n.glyphicon-sunglasses { &:before { content: \"\\e240\"; } }\n.glyphicon-text-size { &:before { content: \"\\e241\"; } }\n.glyphicon-text-color { &:before { content: \"\\e242\"; } }\n.glyphicon-text-background { &:before { content: \"\\e243\"; } }\n.glyphicon-object-align-top { &:before { content: \"\\e244\"; } }\n.glyphicon-object-align-bottom { &:before { content: \"\\e245\"; } }\n.glyphicon-object-align-horizontal{ &:before { content: \"\\e246\"; } }\n.glyphicon-object-align-left { &:before { content: \"\\e247\"; } }\n.glyphicon-object-align-vertical { &:before { content: \"\\e248\"; } }\n.glyphicon-object-align-right { &:before { content: \"\\e249\"; } }\n.glyphicon-triangle-right { &:before { content: \"\\e250\"; } }\n.glyphicon-triangle-left { &:before { content: \"\\e251\"; } }\n.glyphicon-triangle-bottom { &:before { content: \"\\e252\"; } }\n.glyphicon-triangle-top { &:before { content: \"\\e253\"; } }\n.glyphicon-console { &:before { content: \"\\e254\"; } }\n.glyphicon-superscript { &:before { content: \"\\e255\"; } }\n.glyphicon-subscript { &:before { content: \"\\e256\"; } }\n.glyphicon-menu-left { &:before { content: \"\\e257\"; } }\n.glyphicon-menu-right { &:before { content: \"\\e258\"; } }\n.glyphicon-menu-down { &:before { content: \"\\e259\"; } }\n.glyphicon-menu-up { &:before { content: \"\\e260\"; } }\n","//\n// Scaffolding\n// --------------------------------------------------\n\n\n// Reset the box-sizing\n//\n// Heads up! This reset may cause conflicts with some third-party widgets.\n// For recommendations on resolving such conflicts, see\n// http://getbootstrap.com/getting-started/#third-box-sizing\n* {\n .box-sizing(border-box);\n}\n*:before,\n*:after {\n .box-sizing(border-box);\n}\n\n\n// Body reset\n\nhtml {\n font-size: 10px;\n -webkit-tap-highlight-color: rgba(0,0,0,0);\n}\n\nbody {\n font-family: @font-family-base;\n font-size: @font-size-base;\n line-height: @line-height-base;\n color: @text-color;\n background-color: @body-bg;\n}\n\n// Reset fonts for relevant elements\ninput,\nbutton,\nselect,\ntextarea {\n font-family: inherit;\n font-size: inherit;\n line-height: inherit;\n}\n\n\n// Links\n\na {\n color: @link-color;\n text-decoration: none;\n\n &:hover,\n &:focus {\n color: @link-hover-color;\n text-decoration: @link-hover-decoration;\n }\n\n &:focus {\n .tab-focus();\n }\n}\n\n\n// Figures\n//\n// We reset this here because previously Normalize had no `figure` margins. This\n// ensures we don't break anyone's use of the element.\n\nfigure {\n margin: 0;\n}\n\n\n// Images\n\nimg {\n vertical-align: middle;\n}\n\n// Responsive images (ensure images don't scale beyond their parents)\n.img-responsive {\n .img-responsive();\n}\n\n// Rounded corners\n.img-rounded {\n border-radius: @border-radius-large;\n}\n\n// Image thumbnails\n//\n// Heads up! This is mixin-ed into thumbnails.less for `.thumbnail`.\n.img-thumbnail {\n padding: @thumbnail-padding;\n line-height: @line-height-base;\n background-color: @thumbnail-bg;\n border: 1px solid @thumbnail-border;\n border-radius: @thumbnail-border-radius;\n .transition(all .2s ease-in-out);\n\n // Keep them at most 100% wide\n .img-responsive(inline-block);\n}\n\n// Perfect circle\n.img-circle {\n border-radius: 50%; // set radius in percents\n}\n\n\n// Horizontal rules\n\nhr {\n margin-top: @line-height-computed;\n margin-bottom: @line-height-computed;\n border: 0;\n border-top: 1px solid @hr-border;\n}\n\n\n// Only display content to screen readers\n//\n// See: http://a11yproject.com/posts/how-to-hide-content/\n\n.sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n margin: -1px;\n padding: 0;\n overflow: hidden;\n clip: rect(0,0,0,0);\n border: 0;\n}\n\n// Use in conjunction with .sr-only to only display content when it's focused.\n// Useful for \"Skip to main content\" links; see http://www.w3.org/TR/2013/NOTE-WCAG20-TECHS-20130905/G1\n// Credit: HTML5 Boilerplate\n\n.sr-only-focusable {\n &:active,\n &:focus {\n position: static;\n width: auto;\n height: auto;\n margin: 0;\n overflow: visible;\n clip: auto;\n }\n}\n\n\n// iOS \"clickable elements\" fix for role=\"button\"\n//\n// Fixes \"clickability\" issue (and more generally, the firing of events such as focus as well)\n// for traditionally non-focusable elements with role=\"button\"\n// see https://developer.mozilla.org/en-US/docs/Web/Events/click#Safari_Mobile\n// Upstream patch for normalize.css submitted: https://github.com/necolas/normalize.css/pull/379 - remove this fix once that is merged\n\n[role=\"button\"] {\n cursor: pointer;\n}","// Vendor Prefixes\n//\n// All vendor mixins are deprecated as of v3.2.0 due to the introduction of\n// Autoprefixer in our Gruntfile. They will be removed in v4.\n\n// - Animations\n// - Backface visibility\n// - Box shadow\n// - Box sizing\n// - Content columns\n// - Hyphens\n// - Placeholder text\n// - Transformations\n// - Transitions\n// - User Select\n\n\n// Animations\n.animation(@animation) {\n -webkit-animation: @animation;\n -o-animation: @animation;\n animation: @animation;\n}\n.animation-name(@name) {\n -webkit-animation-name: @name;\n animation-name: @name;\n}\n.animation-duration(@duration) {\n -webkit-animation-duration: @duration;\n animation-duration: @duration;\n}\n.animation-timing-function(@timing-function) {\n -webkit-animation-timing-function: @timing-function;\n animation-timing-function: @timing-function;\n}\n.animation-delay(@delay) {\n -webkit-animation-delay: @delay;\n animation-delay: @delay;\n}\n.animation-iteration-count(@iteration-count) {\n -webkit-animation-iteration-count: @iteration-count;\n animation-iteration-count: @iteration-count;\n}\n.animation-direction(@direction) {\n -webkit-animation-direction: @direction;\n animation-direction: @direction;\n}\n.animation-fill-mode(@fill-mode) {\n -webkit-animation-fill-mode: @fill-mode;\n animation-fill-mode: @fill-mode;\n}\n\n// Backface visibility\n// Prevent browsers from flickering when using CSS 3D transforms.\n// Default value is `visible`, but can be changed to `hidden`\n\n.backface-visibility(@visibility){\n -webkit-backface-visibility: @visibility;\n -moz-backface-visibility: @visibility;\n backface-visibility: @visibility;\n}\n\n// Drop shadows\n//\n// Note: Deprecated `.box-shadow()` as of v3.1.0 since all of Bootstrap's\n// supported browsers that have box shadow capabilities now support it.\n\n.box-shadow(@shadow) {\n -webkit-box-shadow: @shadow; // iOS <4.3 & Android <4.1\n box-shadow: @shadow;\n}\n\n// Box sizing\n.box-sizing(@boxmodel) {\n -webkit-box-sizing: @boxmodel;\n -moz-box-sizing: @boxmodel;\n box-sizing: @boxmodel;\n}\n\n// CSS3 Content Columns\n.content-columns(@column-count; @column-gap: @grid-gutter-width) {\n -webkit-column-count: @column-count;\n -moz-column-count: @column-count;\n column-count: @column-count;\n -webkit-column-gap: @column-gap;\n -moz-column-gap: @column-gap;\n column-gap: @column-gap;\n}\n\n// Optional hyphenation\n.hyphens(@mode: auto) {\n word-wrap: break-word;\n -webkit-hyphens: @mode;\n -moz-hyphens: @mode;\n -ms-hyphens: @mode; // IE10+\n -o-hyphens: @mode;\n hyphens: @mode;\n}\n\n// Placeholder text\n.placeholder(@color: @input-color-placeholder) {\n // Firefox\n &::-moz-placeholder {\n color: @color;\n opacity: 1; // Override Firefox's unusual default opacity; see https://github.com/twbs/bootstrap/pull/11526\n }\n &:-ms-input-placeholder { color: @color; } // Internet Explorer 10+\n &::-webkit-input-placeholder { color: @color; } // Safari and Chrome\n}\n\n// Transformations\n.scale(@ratio) {\n -webkit-transform: scale(@ratio);\n -ms-transform: scale(@ratio); // IE9 only\n -o-transform: scale(@ratio);\n transform: scale(@ratio);\n}\n.scale(@ratioX; @ratioY) {\n -webkit-transform: scale(@ratioX, @ratioY);\n -ms-transform: scale(@ratioX, @ratioY); // IE9 only\n -o-transform: scale(@ratioX, @ratioY);\n transform: scale(@ratioX, @ratioY);\n}\n.scaleX(@ratio) {\n -webkit-transform: scaleX(@ratio);\n -ms-transform: scaleX(@ratio); // IE9 only\n -o-transform: scaleX(@ratio);\n transform: scaleX(@ratio);\n}\n.scaleY(@ratio) {\n -webkit-transform: scaleY(@ratio);\n -ms-transform: scaleY(@ratio); // IE9 only\n -o-transform: scaleY(@ratio);\n transform: scaleY(@ratio);\n}\n.skew(@x; @y) {\n -webkit-transform: skewX(@x) skewY(@y);\n -ms-transform: skewX(@x) skewY(@y); // See https://github.com/twbs/bootstrap/issues/4885; IE9+\n -o-transform: skewX(@x) skewY(@y);\n transform: skewX(@x) skewY(@y);\n}\n.translate(@x; @y) {\n -webkit-transform: translate(@x, @y);\n -ms-transform: translate(@x, @y); // IE9 only\n -o-transform: translate(@x, @y);\n transform: translate(@x, @y);\n}\n.translate3d(@x; @y; @z) {\n -webkit-transform: translate3d(@x, @y, @z);\n transform: translate3d(@x, @y, @z);\n}\n.rotate(@degrees) {\n -webkit-transform: rotate(@degrees);\n -ms-transform: rotate(@degrees); // IE9 only\n -o-transform: rotate(@degrees);\n transform: rotate(@degrees);\n}\n.rotateX(@degrees) {\n -webkit-transform: rotateX(@degrees);\n -ms-transform: rotateX(@degrees); // IE9 only\n -o-transform: rotateX(@degrees);\n transform: rotateX(@degrees);\n}\n.rotateY(@degrees) {\n -webkit-transform: rotateY(@degrees);\n -ms-transform: rotateY(@degrees); // IE9 only\n -o-transform: rotateY(@degrees);\n transform: rotateY(@degrees);\n}\n.perspective(@perspective) {\n -webkit-perspective: @perspective;\n -moz-perspective: @perspective;\n perspective: @perspective;\n}\n.perspective-origin(@perspective) {\n -webkit-perspective-origin: @perspective;\n -moz-perspective-origin: @perspective;\n perspective-origin: @perspective;\n}\n.transform-origin(@origin) {\n -webkit-transform-origin: @origin;\n -moz-transform-origin: @origin;\n -ms-transform-origin: @origin; // IE9 only\n transform-origin: @origin;\n}\n\n\n// Transitions\n\n.transition(@transition) {\n -webkit-transition: @transition;\n -o-transition: @transition;\n transition: @transition;\n}\n.transition-property(@transition-property) {\n -webkit-transition-property: @transition-property;\n transition-property: @transition-property;\n}\n.transition-delay(@transition-delay) {\n -webkit-transition-delay: @transition-delay;\n transition-delay: @transition-delay;\n}\n.transition-duration(@transition-duration) {\n -webkit-transition-duration: @transition-duration;\n transition-duration: @transition-duration;\n}\n.transition-timing-function(@timing-function) {\n -webkit-transition-timing-function: @timing-function;\n transition-timing-function: @timing-function;\n}\n.transition-transform(@transition) {\n -webkit-transition: -webkit-transform @transition;\n -moz-transition: -moz-transform @transition;\n -o-transition: -o-transform @transition;\n transition: transform @transition;\n}\n\n\n// User select\n// For selecting text on the page\n\n.user-select(@select) {\n -webkit-user-select: @select;\n -moz-user-select: @select;\n -ms-user-select: @select; // IE10+\n user-select: @select;\n}\n","// WebKit-style focus\n\n.tab-focus() {\n // Default\n outline: thin dotted;\n // WebKit\n outline: 5px auto -webkit-focus-ring-color;\n outline-offset: -2px;\n}\n","// Image Mixins\n// - Responsive image\n// - Retina image\n\n\n// Responsive image\n//\n// Keep images from scaling beyond the width of their parents.\n.img-responsive(@display: block) {\n display: @display;\n max-width: 100%; // Part 1: Set a maximum relative to the parent\n height: auto; // Part 2: Scale the height according to the width, otherwise you get stretching\n}\n\n\n// Retina image\n//\n// Short retina mixin for setting background-image and -size. Note that the\n// spelling of `min--moz-device-pixel-ratio` is intentional.\n.img-retina(@file-1x; @file-2x; @width-1x; @height-1x) {\n background-image: url(\"@{file-1x}\");\n\n @media\n only screen and (-webkit-min-device-pixel-ratio: 2),\n only screen and ( min--moz-device-pixel-ratio: 2),\n only screen and ( -o-min-device-pixel-ratio: 2/1),\n only screen and ( min-device-pixel-ratio: 2),\n only screen and ( min-resolution: 192dpi),\n only screen and ( min-resolution: 2dppx) {\n background-image: url(\"@{file-2x}\");\n background-size: @width-1x @height-1x;\n }\n}\n","//\n// Typography\n// --------------------------------------------------\n\n\n// Headings\n// -------------------------\n\nh1, h2, h3, h4, h5, h6,\n.h1, .h2, .h3, .h4, .h5, .h6 {\n font-family: @headings-font-family;\n font-weight: @headings-font-weight;\n line-height: @headings-line-height;\n color: @headings-color;\n\n small,\n .small {\n font-weight: normal;\n line-height: 1;\n color: @headings-small-color;\n }\n}\n\nh1, .h1,\nh2, .h2,\nh3, .h3 {\n margin-top: @line-height-computed;\n margin-bottom: (@line-height-computed / 2);\n\n small,\n .small {\n font-size: 65%;\n }\n}\nh4, .h4,\nh5, .h5,\nh6, .h6 {\n margin-top: (@line-height-computed / 2);\n margin-bottom: (@line-height-computed / 2);\n\n small,\n .small {\n font-size: 75%;\n }\n}\n\nh1, .h1 { font-size: @font-size-h1; }\nh2, .h2 { font-size: @font-size-h2; }\nh3, .h3 { font-size: @font-size-h3; }\nh4, .h4 { font-size: @font-size-h4; }\nh5, .h5 { font-size: @font-size-h5; }\nh6, .h6 { font-size: @font-size-h6; }\n\n\n// Body text\n// -------------------------\n\np {\n margin: 0 0 (@line-height-computed / 2);\n}\n\n.lead {\n margin-bottom: @line-height-computed;\n font-size: floor((@font-size-base * 1.15));\n font-weight: 300;\n line-height: 1.4;\n\n @media (min-width: @screen-sm-min) {\n font-size: (@font-size-base * 1.5);\n }\n}\n\n\n// Emphasis & misc\n// -------------------------\n\n// Ex: (12px small font / 14px base font) * 100% = about 85%\nsmall,\n.small {\n font-size: floor((100% * @font-size-small / @font-size-base));\n}\n\nmark,\n.mark {\n background-color: @state-warning-bg;\n padding: .2em;\n}\n\n// Alignment\n.text-left { text-align: left; }\n.text-right { text-align: right; }\n.text-center { text-align: center; }\n.text-justify { text-align: justify; }\n.text-nowrap { white-space: nowrap; }\n\n// Transformation\n.text-lowercase { text-transform: lowercase; }\n.text-uppercase { text-transform: uppercase; }\n.text-capitalize { text-transform: capitalize; }\n\n// Contextual colors\n.text-muted {\n color: @text-muted;\n}\n.text-primary {\n .text-emphasis-variant(@brand-primary);\n}\n.text-success {\n .text-emphasis-variant(@state-success-text);\n}\n.text-info {\n .text-emphasis-variant(@state-info-text);\n}\n.text-warning {\n .text-emphasis-variant(@state-warning-text);\n}\n.text-danger {\n .text-emphasis-variant(@state-danger-text);\n}\n\n// Contextual backgrounds\n// For now we'll leave these alongside the text classes until v4 when we can\n// safely shift things around (per SemVer rules).\n.bg-primary {\n // Given the contrast here, this is the only class to have its color inverted\n // automatically.\n color: #fff;\n .bg-variant(@brand-primary);\n}\n.bg-success {\n .bg-variant(@state-success-bg);\n}\n.bg-info {\n .bg-variant(@state-info-bg);\n}\n.bg-warning {\n .bg-variant(@state-warning-bg);\n}\n.bg-danger {\n .bg-variant(@state-danger-bg);\n}\n\n\n// Page header\n// -------------------------\n\n.page-header {\n padding-bottom: ((@line-height-computed / 2) - 1);\n margin: (@line-height-computed * 2) 0 @line-height-computed;\n border-bottom: 1px solid @page-header-border-color;\n}\n\n\n// Lists\n// -------------------------\n\n// Unordered and Ordered lists\nul,\nol {\n margin-top: 0;\n margin-bottom: (@line-height-computed / 2);\n ul,\n ol {\n margin-bottom: 0;\n }\n}\n\n// List options\n\n// Unstyled keeps list items block level, just removes default browser padding and list-style\n.list-unstyled {\n padding-left: 0;\n list-style: none;\n}\n\n// Inline turns list items into inline-block\n.list-inline {\n .list-unstyled();\n margin-left: -5px;\n\n > li {\n display: inline-block;\n padding-left: 5px;\n padding-right: 5px;\n }\n}\n\n// Description Lists\ndl {\n margin-top: 0; // Remove browser default\n margin-bottom: @line-height-computed;\n}\ndt,\ndd {\n line-height: @line-height-base;\n}\ndt {\n font-weight: bold;\n}\ndd {\n margin-left: 0; // Undo browser default\n}\n\n// Horizontal description lists\n//\n// Defaults to being stacked without any of the below styles applied, until the\n// grid breakpoint is reached (default of ~768px).\n\n.dl-horizontal {\n dd {\n &:extend(.clearfix all); // Clear the floated `dt` if an empty `dd` is present\n }\n\n @media (min-width: @grid-float-breakpoint) {\n dt {\n float: left;\n width: (@dl-horizontal-offset - 20);\n clear: left;\n text-align: right;\n .text-overflow();\n }\n dd {\n margin-left: @dl-horizontal-offset;\n }\n }\n}\n\n\n// Misc\n// -------------------------\n\n// Abbreviations and acronyms\nabbr[title],\n// Add data-* attribute to help out our tooltip plugin, per https://github.com/twbs/bootstrap/issues/5257\nabbr[data-original-title] {\n cursor: help;\n border-bottom: 1px dotted @abbr-border-color;\n}\n.initialism {\n font-size: 90%;\n .text-uppercase();\n}\n\n// Blockquotes\nblockquote {\n padding: (@line-height-computed / 2) @line-height-computed;\n margin: 0 0 @line-height-computed;\n font-size: @blockquote-font-size;\n border-left: 5px solid @blockquote-border-color;\n\n p,\n ul,\n ol {\n &:last-child {\n margin-bottom: 0;\n }\n }\n\n // Note: Deprecated small and .small as of v3.1.0\n // Context: https://github.com/twbs/bootstrap/issues/11660\n footer,\n small,\n .small {\n display: block;\n font-size: 80%; // back to default font-size\n line-height: @line-height-base;\n color: @blockquote-small-color;\n\n &:before {\n content: '\\2014 \\00A0'; // em dash, nbsp\n }\n }\n}\n\n// Opposite alignment of blockquote\n//\n// Heads up: `blockquote.pull-right` has been deprecated as of v3.1.0.\n.blockquote-reverse,\nblockquote.pull-right {\n padding-right: 15px;\n padding-left: 0;\n border-right: 5px solid @blockquote-border-color;\n border-left: 0;\n text-align: right;\n\n // Account for citation\n footer,\n small,\n .small {\n &:before { content: ''; }\n &:after {\n content: '\\00A0 \\2014'; // nbsp, em dash\n }\n }\n}\n\n// Addresses\naddress {\n margin-bottom: @line-height-computed;\n font-style: normal;\n line-height: @line-height-base;\n}\n","// Typography\n\n.text-emphasis-variant(@color) {\n color: @color;\n a&:hover {\n color: darken(@color, 10%);\n }\n}\n","// Contextual backgrounds\n\n.bg-variant(@color) {\n background-color: @color;\n a&:hover {\n background-color: darken(@color, 10%);\n }\n}\n","// Text overflow\n// Requires inline-block or block for proper styling\n\n.text-overflow() {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n","//\n// Code (inline and block)\n// --------------------------------------------------\n\n\n// Inline and block code styles\ncode,\nkbd,\npre,\nsamp {\n font-family: @font-family-monospace;\n}\n\n// Inline code\ncode {\n padding: 2px 4px;\n font-size: 90%;\n color: @code-color;\n background-color: @code-bg;\n border-radius: @border-radius-base;\n}\n\n// User input typically entered via keyboard\nkbd {\n padding: 2px 4px;\n font-size: 90%;\n color: @kbd-color;\n background-color: @kbd-bg;\n border-radius: @border-radius-small;\n box-shadow: inset 0 -1px 0 rgba(0,0,0,.25);\n\n kbd {\n padding: 0;\n font-size: 100%;\n font-weight: bold;\n box-shadow: none;\n }\n}\n\n// Blocks of code\npre {\n display: block;\n padding: ((@line-height-computed - 1) / 2);\n margin: 0 0 (@line-height-computed / 2);\n font-size: (@font-size-base - 1); // 14px to 13px\n line-height: @line-height-base;\n word-break: break-all;\n word-wrap: break-word;\n color: @pre-color;\n background-color: @pre-bg;\n border: 1px solid @pre-border-color;\n border-radius: @border-radius-base;\n\n // Account for some code outputs that place code tags in pre tags\n code {\n padding: 0;\n font-size: inherit;\n color: inherit;\n white-space: pre-wrap;\n background-color: transparent;\n border-radius: 0;\n }\n}\n\n// Enable scrollable blocks of code\n.pre-scrollable {\n max-height: @pre-scrollable-max-height;\n overflow-y: scroll;\n}\n","//\n// Grid system\n// --------------------------------------------------\n\n\n// Container widths\n//\n// Set the container width, and override it for fixed navbars in media queries.\n\n.container {\n .container-fixed();\n\n @media (min-width: @screen-sm-min) {\n width: @container-sm;\n }\n @media (min-width: @screen-md-min) {\n width: @container-md;\n }\n @media (min-width: @screen-lg-min) {\n width: @container-lg;\n }\n}\n\n\n// Fluid container\n//\n// Utilizes the mixin meant for fixed width containers, but without any defined\n// width for fluid, full width layouts.\n\n.container-fluid {\n .container-fixed();\n}\n\n\n// Row\n//\n// Rows contain and clear the floats of your columns.\n\n.row {\n .make-row();\n}\n\n\n// Columns\n//\n// Common styles for small and large grid columns\n\n.make-grid-columns();\n\n\n// Extra small grid\n//\n// Columns, offsets, pushes, and pulls for extra small devices like\n// smartphones.\n\n.make-grid(xs);\n\n\n// Small grid\n//\n// Columns, offsets, pushes, and pulls for the small device range, from phones\n// to tablets.\n\n@media (min-width: @screen-sm-min) {\n .make-grid(sm);\n}\n\n\n// Medium grid\n//\n// Columns, offsets, pushes, and pulls for the desktop device range.\n\n@media (min-width: @screen-md-min) {\n .make-grid(md);\n}\n\n\n// Large grid\n//\n// Columns, offsets, pushes, and pulls for the large desktop device range.\n\n@media (min-width: @screen-lg-min) {\n .make-grid(lg);\n}\n","// Grid system\n//\n// Generate semantic grid columns with these mixins.\n\n// Centered container element\n.container-fixed(@gutter: @grid-gutter-width) {\n margin-right: auto;\n margin-left: auto;\n padding-left: (@gutter / 2);\n padding-right: (@gutter / 2);\n &:extend(.clearfix all);\n}\n\n// Creates a wrapper for a series of columns\n.make-row(@gutter: @grid-gutter-width) {\n margin-left: (@gutter / -2);\n margin-right: (@gutter / -2);\n &:extend(.clearfix all);\n}\n\n// Generate the extra small columns\n.make-xs-column(@columns; @gutter: @grid-gutter-width) {\n position: relative;\n float: left;\n width: percentage((@columns / @grid-columns));\n min-height: 1px;\n padding-left: (@gutter / 2);\n padding-right: (@gutter / 2);\n}\n.make-xs-column-offset(@columns) {\n margin-left: percentage((@columns / @grid-columns));\n}\n.make-xs-column-push(@columns) {\n left: percentage((@columns / @grid-columns));\n}\n.make-xs-column-pull(@columns) {\n right: percentage((@columns / @grid-columns));\n}\n\n// Generate the small columns\n.make-sm-column(@columns; @gutter: @grid-gutter-width) {\n position: relative;\n min-height: 1px;\n padding-left: (@gutter / 2);\n padding-right: (@gutter / 2);\n\n @media (min-width: @screen-sm-min) {\n float: left;\n width: percentage((@columns / @grid-columns));\n }\n}\n.make-sm-column-offset(@columns) {\n @media (min-width: @screen-sm-min) {\n margin-left: percentage((@columns / @grid-columns));\n }\n}\n.make-sm-column-push(@columns) {\n @media (min-width: @screen-sm-min) {\n left: percentage((@columns / @grid-columns));\n }\n}\n.make-sm-column-pull(@columns) {\n @media (min-width: @screen-sm-min) {\n right: percentage((@columns / @grid-columns));\n }\n}\n\n// Generate the medium columns\n.make-md-column(@columns; @gutter: @grid-gutter-width) {\n position: relative;\n min-height: 1px;\n padding-left: (@gutter / 2);\n padding-right: (@gutter / 2);\n\n @media (min-width: @screen-md-min) {\n float: left;\n width: percentage((@columns / @grid-columns));\n }\n}\n.make-md-column-offset(@columns) {\n @media (min-width: @screen-md-min) {\n margin-left: percentage((@columns / @grid-columns));\n }\n}\n.make-md-column-push(@columns) {\n @media (min-width: @screen-md-min) {\n left: percentage((@columns / @grid-columns));\n }\n}\n.make-md-column-pull(@columns) {\n @media (min-width: @screen-md-min) {\n right: percentage((@columns / @grid-columns));\n }\n}\n\n// Generate the large columns\n.make-lg-column(@columns; @gutter: @grid-gutter-width) {\n position: relative;\n min-height: 1px;\n padding-left: (@gutter / 2);\n padding-right: (@gutter / 2);\n\n @media (min-width: @screen-lg-min) {\n float: left;\n width: percentage((@columns / @grid-columns));\n }\n}\n.make-lg-column-offset(@columns) {\n @media (min-width: @screen-lg-min) {\n margin-left: percentage((@columns / @grid-columns));\n }\n}\n.make-lg-column-push(@columns) {\n @media (min-width: @screen-lg-min) {\n left: percentage((@columns / @grid-columns));\n }\n}\n.make-lg-column-pull(@columns) {\n @media (min-width: @screen-lg-min) {\n right: percentage((@columns / @grid-columns));\n }\n}\n","// Framework grid generation\n//\n// Used only by Bootstrap to generate the correct number of grid classes given\n// any value of `@grid-columns`.\n\n.make-grid-columns() {\n // Common styles for all sizes of grid columns, widths 1-12\n .col(@index) { // initial\n @item: ~\".col-xs-@{index}, .col-sm-@{index}, .col-md-@{index}, .col-lg-@{index}\";\n .col((@index + 1), @item);\n }\n .col(@index, @list) when (@index =< @grid-columns) { // general; \"=<\" isn't a typo\n @item: ~\".col-xs-@{index}, .col-sm-@{index}, .col-md-@{index}, .col-lg-@{index}\";\n .col((@index + 1), ~\"@{list}, @{item}\");\n }\n .col(@index, @list) when (@index > @grid-columns) { // terminal\n @{list} {\n position: relative;\n // Prevent columns from collapsing when empty\n min-height: 1px;\n // Inner gutter via padding\n padding-left: (@grid-gutter-width / 2);\n padding-right: (@grid-gutter-width / 2);\n }\n }\n .col(1); // kickstart it\n}\n\n.float-grid-columns(@class) {\n .col(@index) { // initial\n @item: ~\".col-@{class}-@{index}\";\n .col((@index + 1), @item);\n }\n .col(@index, @list) when (@index =< @grid-columns) { // general\n @item: ~\".col-@{class}-@{index}\";\n .col((@index + 1), ~\"@{list}, @{item}\");\n }\n .col(@index, @list) when (@index > @grid-columns) { // terminal\n @{list} {\n float: left;\n }\n }\n .col(1); // kickstart it\n}\n\n.calc-grid-column(@index, @class, @type) when (@type = width) and (@index > 0) {\n .col-@{class}-@{index} {\n width: percentage((@index / @grid-columns));\n }\n}\n.calc-grid-column(@index, @class, @type) when (@type = push) and (@index > 0) {\n .col-@{class}-push-@{index} {\n left: percentage((@index / @grid-columns));\n }\n}\n.calc-grid-column(@index, @class, @type) when (@type = push) and (@index = 0) {\n .col-@{class}-push-0 {\n left: auto;\n }\n}\n.calc-grid-column(@index, @class, @type) when (@type = pull) and (@index > 0) {\n .col-@{class}-pull-@{index} {\n right: percentage((@index / @grid-columns));\n }\n}\n.calc-grid-column(@index, @class, @type) when (@type = pull) and (@index = 0) {\n .col-@{class}-pull-0 {\n right: auto;\n }\n}\n.calc-grid-column(@index, @class, @type) when (@type = offset) {\n .col-@{class}-offset-@{index} {\n margin-left: percentage((@index / @grid-columns));\n }\n}\n\n// Basic looping in LESS\n.loop-grid-columns(@index, @class, @type) when (@index >= 0) {\n .calc-grid-column(@index, @class, @type);\n // next iteration\n .loop-grid-columns((@index - 1), @class, @type);\n}\n\n// Create grid for specific class\n.make-grid(@class) {\n .float-grid-columns(@class);\n .loop-grid-columns(@grid-columns, @class, width);\n .loop-grid-columns(@grid-columns, @class, pull);\n .loop-grid-columns(@grid-columns, @class, push);\n .loop-grid-columns(@grid-columns, @class, offset);\n}\n","//\n// Tables\n// --------------------------------------------------\n\n\ntable {\n background-color: @table-bg;\n}\ncaption {\n padding-top: @table-cell-padding;\n padding-bottom: @table-cell-padding;\n color: @text-muted;\n text-align: left;\n}\nth {\n text-align: left;\n}\n\n\n// Baseline styles\n\n.table {\n width: 100%;\n max-width: 100%;\n margin-bottom: @line-height-computed;\n // Cells\n > thead,\n > tbody,\n > tfoot {\n > tr {\n > th,\n > td {\n padding: @table-cell-padding;\n line-height: @line-height-base;\n vertical-align: top;\n border-top: 1px solid @table-border-color;\n }\n }\n }\n // Bottom align for column headings\n > thead > tr > th {\n vertical-align: bottom;\n border-bottom: 2px solid @table-border-color;\n }\n // Remove top border from thead by default\n > caption + thead,\n > colgroup + thead,\n > thead:first-child {\n > tr:first-child {\n > th,\n > td {\n border-top: 0;\n }\n }\n }\n // Account for multiple tbody instances\n > tbody + tbody {\n border-top: 2px solid @table-border-color;\n }\n\n // Nesting\n .table {\n background-color: @body-bg;\n }\n}\n\n\n// Condensed table w/ half padding\n\n.table-condensed {\n > thead,\n > tbody,\n > tfoot {\n > tr {\n > th,\n > td {\n padding: @table-condensed-cell-padding;\n }\n }\n }\n}\n\n\n// Bordered version\n//\n// Add borders all around the table and between all the columns.\n\n.table-bordered {\n border: 1px solid @table-border-color;\n > thead,\n > tbody,\n > tfoot {\n > tr {\n > th,\n > td {\n border: 1px solid @table-border-color;\n }\n }\n }\n > thead > tr {\n > th,\n > td {\n border-bottom-width: 2px;\n }\n }\n}\n\n\n// Zebra-striping\n//\n// Default zebra-stripe styles (alternating gray and transparent backgrounds)\n\n.table-striped {\n > tbody > tr:nth-of-type(odd) {\n background-color: @table-bg-accent;\n }\n}\n\n\n// Hover effect\n//\n// Placed here since it has to come after the potential zebra striping\n\n.table-hover {\n > tbody > tr:hover {\n background-color: @table-bg-hover;\n }\n}\n\n\n// Table cell sizing\n//\n// Reset default table behavior\n\ntable col[class*=\"col-\"] {\n position: static; // Prevent border hiding in Firefox and IE9-11 (see https://github.com/twbs/bootstrap/issues/11623)\n float: none;\n display: table-column;\n}\ntable {\n td,\n th {\n &[class*=\"col-\"] {\n position: static; // Prevent border hiding in Firefox and IE9-11 (see https://github.com/twbs/bootstrap/issues/11623)\n float: none;\n display: table-cell;\n }\n }\n}\n\n\n// Table backgrounds\n//\n// Exact selectors below required to override `.table-striped` and prevent\n// inheritance to nested tables.\n\n// Generate the contextual variants\n.table-row-variant(active; @table-bg-active);\n.table-row-variant(success; @state-success-bg);\n.table-row-variant(info; @state-info-bg);\n.table-row-variant(warning; @state-warning-bg);\n.table-row-variant(danger; @state-danger-bg);\n\n\n// Responsive tables\n//\n// Wrap your tables in `.table-responsive` and we'll make them mobile friendly\n// by enabling horizontal scrolling. Only applies <768px. Everything above that\n// will display normally.\n\n.table-responsive {\n overflow-x: auto;\n min-height: 0.01%; // Workaround for IE9 bug (see https://github.com/twbs/bootstrap/issues/14837)\n\n @media screen and (max-width: @screen-xs-max) {\n width: 100%;\n margin-bottom: (@line-height-computed * 0.75);\n overflow-y: hidden;\n -ms-overflow-style: -ms-autohiding-scrollbar;\n border: 1px solid @table-border-color;\n\n // Tighten up spacing\n > .table {\n margin-bottom: 0;\n\n // Ensure the content doesn't wrap\n > thead,\n > tbody,\n > tfoot {\n > tr {\n > th,\n > td {\n white-space: nowrap;\n }\n }\n }\n }\n\n // Special overrides for the bordered tables\n > .table-bordered {\n border: 0;\n\n // Nuke the appropriate borders so that the parent can handle them\n > thead,\n > tbody,\n > tfoot {\n > tr {\n > th:first-child,\n > td:first-child {\n border-left: 0;\n }\n > th:last-child,\n > td:last-child {\n border-right: 0;\n }\n }\n }\n\n // Only nuke the last row's bottom-border in `tbody` and `tfoot` since\n // chances are there will be only one `tr` in a `thead` and that would\n // remove the border altogether.\n > tbody,\n > tfoot {\n > tr:last-child {\n > th,\n > td {\n border-bottom: 0;\n }\n }\n }\n\n }\n }\n}\n","// Tables\n\n.table-row-variant(@state; @background) {\n // Exact selectors below required to override `.table-striped` and prevent\n // inheritance to nested tables.\n .table > thead > tr,\n .table > tbody > tr,\n .table > tfoot > tr {\n > td.@{state},\n > th.@{state},\n &.@{state} > td,\n &.@{state} > th {\n background-color: @background;\n }\n }\n\n // Hover states for `.table-hover`\n // Note: this is not available for cells or rows within `thead` or `tfoot`.\n .table-hover > tbody > tr {\n > td.@{state}:hover,\n > th.@{state}:hover,\n &.@{state}:hover > td,\n &:hover > .@{state},\n &.@{state}:hover > th {\n background-color: darken(@background, 5%);\n }\n }\n}\n","//\n// Forms\n// --------------------------------------------------\n\n\n// Normalize non-controls\n//\n// Restyle and baseline non-control form elements.\n\nfieldset {\n padding: 0;\n margin: 0;\n border: 0;\n // Chrome and Firefox set a `min-width: min-content;` on fieldsets,\n // so we reset that to ensure it behaves more like a standard block element.\n // See https://github.com/twbs/bootstrap/issues/12359.\n min-width: 0;\n}\n\nlegend {\n display: block;\n width: 100%;\n padding: 0;\n margin-bottom: @line-height-computed;\n font-size: (@font-size-base * 1.5);\n line-height: inherit;\n color: @legend-color;\n border: 0;\n border-bottom: 1px solid @legend-border-color;\n}\n\nlabel {\n display: inline-block;\n max-width: 100%; // Force IE8 to wrap long content (see https://github.com/twbs/bootstrap/issues/13141)\n margin-bottom: 5px;\n font-weight: bold;\n}\n\n\n// Normalize form controls\n//\n// While most of our form styles require extra classes, some basic normalization\n// is required to ensure optimum display with or without those classes to better\n// address browser inconsistencies.\n\n// Override content-box in Normalize (* isn't specific enough)\ninput[type=\"search\"] {\n .box-sizing(border-box);\n}\n\n// Position radios and checkboxes better\ninput[type=\"radio\"],\ninput[type=\"checkbox\"] {\n margin: 4px 0 0;\n margin-top: 1px \\9; // IE8-9\n line-height: normal;\n}\n\n// Set the height of file controls to match text inputs\ninput[type=\"file\"] {\n display: block;\n}\n\n// Make range inputs behave like textual form controls\ninput[type=\"range\"] {\n display: block;\n width: 100%;\n}\n\n// Make multiple select elements height not fixed\nselect[multiple],\nselect[size] {\n height: auto;\n}\n\n// Focus for file, radio, and checkbox\ninput[type=\"file\"]:focus,\ninput[type=\"radio\"]:focus,\ninput[type=\"checkbox\"]:focus {\n .tab-focus();\n}\n\n// Adjust output element\noutput {\n display: block;\n padding-top: (@padding-base-vertical + 1);\n font-size: @font-size-base;\n line-height: @line-height-base;\n color: @input-color;\n}\n\n\n// Common form controls\n//\n// Shared size and type resets for form controls. Apply `.form-control` to any\n// of the following form controls:\n//\n// select\n// textarea\n// input[type=\"text\"]\n// input[type=\"password\"]\n// input[type=\"datetime\"]\n// input[type=\"datetime-local\"]\n// input[type=\"date\"]\n// input[type=\"month\"]\n// input[type=\"time\"]\n// input[type=\"week\"]\n// input[type=\"number\"]\n// input[type=\"email\"]\n// input[type=\"url\"]\n// input[type=\"search\"]\n// input[type=\"tel\"]\n// input[type=\"color\"]\n\n.form-control {\n display: block;\n width: 100%;\n height: @input-height-base; // Make inputs at least the height of their button counterpart (base line-height + padding + border)\n padding: @padding-base-vertical @padding-base-horizontal;\n font-size: @font-size-base;\n line-height: @line-height-base;\n color: @input-color;\n background-color: @input-bg;\n background-image: none; // Reset unusual Firefox-on-Android default style; see https://github.com/necolas/normalize.css/issues/214\n border: 1px solid @input-border;\n border-radius: @input-border-radius; // Note: This has no effect on <select>s in some browsers, due to the limited stylability of <select>s in CSS.\n .box-shadow(inset 0 1px 1px rgba(0,0,0,.075));\n .transition(~\"border-color ease-in-out .15s, box-shadow ease-in-out .15s\");\n\n // Customize the `:focus` state to imitate native WebKit styles.\n .form-control-focus();\n\n // Placeholder\n .placeholder();\n\n // Disabled and read-only inputs\n //\n // HTML5 says that controls under a fieldset > legend:first-child won't be\n // disabled if the fieldset is disabled. Due to implementation difficulty, we\n // don't honor that edge case; we style them as disabled anyway.\n &[disabled],\n &[readonly],\n fieldset[disabled] & {\n background-color: @input-bg-disabled;\n opacity: 1; // iOS fix for unreadable disabled content; see https://github.com/twbs/bootstrap/issues/11655\n }\n\n &[disabled],\n fieldset[disabled] & {\n cursor: @cursor-disabled;\n }\n\n // Reset height for `textarea`s\n textarea& {\n height: auto;\n }\n}\n\n\n// Search inputs in iOS\n//\n// This overrides the extra rounded corners on search inputs in iOS so that our\n// `.form-control` class can properly style them. Note that this cannot simply\n// be added to `.form-control` as it's not specific enough. For details, see\n// https://github.com/twbs/bootstrap/issues/11586.\n\ninput[type=\"search\"] {\n -webkit-appearance: none;\n}\n\n\n// Special styles for iOS temporal inputs\n//\n// In Mobile Safari, setting `display: block` on temporal inputs causes the\n// text within the input to become vertically misaligned. As a workaround, we\n// set a pixel line-height that matches the given height of the input, but only\n// for Safari. See https://bugs.webkit.org/show_bug.cgi?id=139848\n\n@media screen and (-webkit-min-device-pixel-ratio: 0) {\n input[type=\"date\"],\n input[type=\"time\"],\n input[type=\"datetime-local\"],\n input[type=\"month\"] {\n line-height: @input-height-base;\n\n &.input-sm,\n .input-group-sm & {\n line-height: @input-height-small;\n }\n\n &.input-lg,\n .input-group-lg & {\n line-height: @input-height-large;\n }\n }\n}\n\n\n// Form groups\n//\n// Designed to help with the organization and spacing of vertical forms. For\n// horizontal forms, use the predefined grid classes.\n\n.form-group {\n margin-bottom: @form-group-margin-bottom;\n}\n\n\n// Checkboxes and radios\n//\n// Indent the labels to position radios/checkboxes as hanging controls.\n\n.radio,\n.checkbox {\n position: relative;\n display: block;\n margin-top: 10px;\n margin-bottom: 10px;\n\n label {\n min-height: @line-height-computed; // Ensure the input doesn't jump when there is no text\n padding-left: 20px;\n margin-bottom: 0;\n font-weight: normal;\n cursor: pointer;\n }\n}\n.radio input[type=\"radio\"],\n.radio-inline input[type=\"radio\"],\n.checkbox input[type=\"checkbox\"],\n.checkbox-inline input[type=\"checkbox\"] {\n position: absolute;\n margin-left: -20px;\n margin-top: 4px \\9;\n}\n\n.radio + .radio,\n.checkbox + .checkbox {\n margin-top: -5px; // Move up sibling radios or checkboxes for tighter spacing\n}\n\n// Radios and checkboxes on same line\n.radio-inline,\n.checkbox-inline {\n position: relative;\n display: inline-block;\n padding-left: 20px;\n margin-bottom: 0;\n vertical-align: middle;\n font-weight: normal;\n cursor: pointer;\n}\n.radio-inline + .radio-inline,\n.checkbox-inline + .checkbox-inline {\n margin-top: 0;\n margin-left: 10px; // space out consecutive inline controls\n}\n\n// Apply same disabled cursor tweak as for inputs\n// Some special care is needed because <label>s don't inherit their parent's `cursor`.\n//\n// Note: Neither radios nor checkboxes can be readonly.\ninput[type=\"radio\"],\ninput[type=\"checkbox\"] {\n &[disabled],\n &.disabled,\n fieldset[disabled] & {\n cursor: @cursor-disabled;\n }\n}\n// These classes are used directly on <label>s\n.radio-inline,\n.checkbox-inline {\n &.disabled,\n fieldset[disabled] & {\n cursor: @cursor-disabled;\n }\n}\n// These classes are used on elements with <label> descendants\n.radio,\n.checkbox {\n &.disabled,\n fieldset[disabled] & {\n label {\n cursor: @cursor-disabled;\n }\n }\n}\n\n\n// Static form control text\n//\n// Apply class to a `p` element to make any string of text align with labels in\n// a horizontal form layout.\n\n.form-control-static {\n // Size it appropriately next to real form controls\n padding-top: (@padding-base-vertical + 1);\n padding-bottom: (@padding-base-vertical + 1);\n // Remove default margin from `p`\n margin-bottom: 0;\n min-height: (@line-height-computed + @font-size-base);\n\n &.input-lg,\n &.input-sm {\n padding-left: 0;\n padding-right: 0;\n }\n}\n\n\n// Form control sizing\n//\n// Build on `.form-control` with modifier classes to decrease or increase the\n// height and font-size of form controls.\n//\n// The `.form-group-* form-control` variations are sadly duplicated to avoid the\n// issue documented in https://github.com/twbs/bootstrap/issues/15074.\n\n.input-sm {\n .input-size(@input-height-small; @padding-small-vertical; @padding-small-horizontal; @font-size-small; @line-height-small; @input-border-radius-small);\n}\n.form-group-sm {\n .form-control {\n .input-size(@input-height-small; @padding-small-vertical; @padding-small-horizontal; @font-size-small; @line-height-small; @input-border-radius-small);\n }\n .form-control-static {\n height: @input-height-small;\n padding: @padding-small-vertical @padding-small-horizontal;\n font-size: @font-size-small;\n line-height: @line-height-small;\n min-height: (@line-height-computed + @font-size-small);\n }\n}\n\n.input-lg {\n .input-size(@input-height-large; @padding-large-vertical; @padding-large-horizontal; @font-size-large; @line-height-large; @input-border-radius-large);\n}\n.form-group-lg {\n .form-control {\n .input-size(@input-height-large; @padding-large-vertical; @padding-large-horizontal; @font-size-large; @line-height-large; @input-border-radius-large);\n }\n .form-control-static {\n height: @input-height-large;\n padding: @padding-large-vertical @padding-large-horizontal;\n font-size: @font-size-large;\n line-height: @line-height-large;\n min-height: (@line-height-computed + @font-size-large);\n }\n}\n\n\n// Form control feedback states\n//\n// Apply contextual and semantic states to individual form controls.\n\n.has-feedback {\n // Enable absolute positioning\n position: relative;\n\n // Ensure icons don't overlap text\n .form-control {\n padding-right: (@input-height-base * 1.25);\n }\n}\n// Feedback icon (requires .glyphicon classes)\n.form-control-feedback {\n position: absolute;\n top: 0;\n right: 0;\n z-index: 2; // Ensure icon is above input groups\n display: block;\n width: @input-height-base;\n height: @input-height-base;\n line-height: @input-height-base;\n text-align: center;\n pointer-events: none;\n}\n.input-lg + .form-control-feedback {\n width: @input-height-large;\n height: @input-height-large;\n line-height: @input-height-large;\n}\n.input-sm + .form-control-feedback {\n width: @input-height-small;\n height: @input-height-small;\n line-height: @input-height-small;\n}\n\n// Feedback states\n.has-success {\n .form-control-validation(@state-success-text; @state-success-text; @state-success-bg);\n}\n.has-warning {\n .form-control-validation(@state-warning-text; @state-warning-text; @state-warning-bg);\n}\n.has-error {\n .form-control-validation(@state-danger-text; @state-danger-text; @state-danger-bg);\n}\n\n// Reposition feedback icon if input has visible label above\n.has-feedback label {\n\n & ~ .form-control-feedback {\n top: (@line-height-computed + 5); // Height of the `label` and its margin\n }\n &.sr-only ~ .form-control-feedback {\n top: 0;\n }\n}\n\n\n// Help text\n//\n// Apply to any element you wish to create light text for placement immediately\n// below a form control. Use for general help, formatting, or instructional text.\n\n.help-block {\n display: block; // account for any element using help-block\n margin-top: 5px;\n margin-bottom: 10px;\n color: lighten(@text-color, 25%); // lighten the text some for contrast\n}\n\n\n// Inline forms\n//\n// Make forms appear inline(-block) by adding the `.form-inline` class. Inline\n// forms begin stacked on extra small (mobile) devices and then go inline when\n// viewports reach <768px.\n//\n// Requires wrapping inputs and labels with `.form-group` for proper display of\n// default HTML form controls and our custom form controls (e.g., input groups).\n//\n// Heads up! This is mixin-ed into `.navbar-form` in navbars.less.\n\n.form-inline {\n\n // Kick in the inline\n @media (min-width: @screen-sm-min) {\n // Inline-block all the things for \"inline\"\n .form-group {\n display: inline-block;\n margin-bottom: 0;\n vertical-align: middle;\n }\n\n // In navbar-form, allow folks to *not* use `.form-group`\n .form-control {\n display: inline-block;\n width: auto; // Prevent labels from stacking above inputs in `.form-group`\n vertical-align: middle;\n }\n\n // Make static controls behave like regular ones\n .form-control-static {\n display: inline-block;\n }\n\n .input-group {\n display: inline-table;\n vertical-align: middle;\n\n .input-group-addon,\n .input-group-btn,\n .form-control {\n width: auto;\n }\n }\n\n // Input groups need that 100% width though\n .input-group > .form-control {\n width: 100%;\n }\n\n .control-label {\n margin-bottom: 0;\n vertical-align: middle;\n }\n\n // Remove default margin on radios/checkboxes that were used for stacking, and\n // then undo the floating of radios and checkboxes to match.\n .radio,\n .checkbox {\n display: inline-block;\n margin-top: 0;\n margin-bottom: 0;\n vertical-align: middle;\n\n label {\n padding-left: 0;\n }\n }\n .radio input[type=\"radio\"],\n .checkbox input[type=\"checkbox\"] {\n position: relative;\n margin-left: 0;\n }\n\n // Re-override the feedback icon.\n .has-feedback .form-control-feedback {\n top: 0;\n }\n }\n}\n\n\n// Horizontal forms\n//\n// Horizontal forms are built on grid classes and allow you to create forms with\n// labels on the left and inputs on the right.\n\n.form-horizontal {\n\n // Consistent vertical alignment of radios and checkboxes\n //\n // Labels also get some reset styles, but that is scoped to a media query below.\n .radio,\n .checkbox,\n .radio-inline,\n .checkbox-inline {\n margin-top: 0;\n margin-bottom: 0;\n padding-top: (@padding-base-vertical + 1); // Default padding plus a border\n }\n // Account for padding we're adding to ensure the alignment and of help text\n // and other content below items\n .radio,\n .checkbox {\n min-height: (@line-height-computed + (@padding-base-vertical + 1));\n }\n\n // Make form groups behave like rows\n .form-group {\n .make-row();\n }\n\n // Reset spacing and right align labels, but scope to media queries so that\n // labels on narrow viewports stack the same as a default form example.\n @media (min-width: @screen-sm-min) {\n .control-label {\n text-align: right;\n margin-bottom: 0;\n padding-top: (@padding-base-vertical + 1); // Default padding plus a border\n }\n }\n\n // Validation states\n //\n // Reposition the icon because it's now within a grid column and columns have\n // `position: relative;` on them. Also accounts for the grid gutter padding.\n .has-feedback .form-control-feedback {\n right: (@grid-gutter-width / 2);\n }\n\n // Form group sizes\n //\n // Quick utility class for applying `.input-lg` and `.input-sm` styles to the\n // inputs and labels within a `.form-group`.\n .form-group-lg {\n @media (min-width: @screen-sm-min) {\n .control-label {\n padding-top: ((@padding-large-vertical * @line-height-large) + 1);\n }\n }\n }\n .form-group-sm {\n @media (min-width: @screen-sm-min) {\n .control-label {\n padding-top: (@padding-small-vertical + 1);\n }\n }\n }\n}\n","// Form validation states\n//\n// Used in forms.less to generate the form validation CSS for warnings, errors,\n// and successes.\n\n.form-control-validation(@text-color: #555; @border-color: #ccc; @background-color: #f5f5f5) {\n // Color the label and help text\n .help-block,\n .control-label,\n .radio,\n .checkbox,\n .radio-inline,\n .checkbox-inline,\n &.radio label,\n &.checkbox label,\n &.radio-inline label,\n &.checkbox-inline label {\n color: @text-color;\n }\n // Set the border and box shadow on specific inputs to match\n .form-control {\n border-color: @border-color;\n .box-shadow(inset 0 1px 1px rgba(0,0,0,.075)); // Redeclare so transitions work\n &:focus {\n border-color: darken(@border-color, 10%);\n @shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 6px lighten(@border-color, 20%);\n .box-shadow(@shadow);\n }\n }\n // Set validation states also for addons\n .input-group-addon {\n color: @text-color;\n border-color: @border-color;\n background-color: @background-color;\n }\n // Optional feedback icon\n .form-control-feedback {\n color: @text-color;\n }\n}\n\n\n// Form control focus state\n//\n// Generate a customized focus state and for any input with the specified color,\n// which defaults to the `@input-border-focus` variable.\n//\n// We highly encourage you to not customize the default value, but instead use\n// this to tweak colors on an as-needed basis. This aesthetic change is based on\n// WebKit's default styles, but applicable to a wider range of browsers. Its\n// usability and accessibility should be taken into account with any change.\n//\n// Example usage: change the default blue border and shadow to white for better\n// contrast against a dark gray background.\n.form-control-focus(@color: @input-border-focus) {\n @color-rgba: rgba(red(@color), green(@color), blue(@color), .6);\n &:focus {\n border-color: @color;\n outline: 0;\n .box-shadow(~\"inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px @{color-rgba}\");\n }\n}\n\n// Form control sizing\n//\n// Relative text size, padding, and border-radii changes for form controls. For\n// horizontal sizing, wrap controls in the predefined grid classes. `<select>`\n// element gets special love because it's special, and that's a fact!\n.input-size(@input-height; @padding-vertical; @padding-horizontal; @font-size; @line-height; @border-radius) {\n height: @input-height;\n padding: @padding-vertical @padding-horizontal;\n font-size: @font-size;\n line-height: @line-height;\n border-radius: @border-radius;\n\n select& {\n height: @input-height;\n line-height: @input-height;\n }\n\n textarea&,\n select[multiple]& {\n height: auto;\n }\n}\n","//\n// Buttons\n// --------------------------------------------------\n\n\n// Base styles\n// --------------------------------------------------\n\n.btn {\n display: inline-block;\n margin-bottom: 0; // For input.btn\n font-weight: @btn-font-weight;\n text-align: center;\n vertical-align: middle;\n touch-action: manipulation;\n cursor: pointer;\n background-image: none; // Reset unusual Firefox-on-Android default style; see https://github.com/necolas/normalize.css/issues/214\n border: 1px solid transparent;\n white-space: nowrap;\n .button-size(@padding-base-vertical; @padding-base-horizontal; @font-size-base; @line-height-base; @border-radius-base);\n .user-select(none);\n\n &,\n &:active,\n &.active {\n &:focus,\n &.focus {\n .tab-focus();\n }\n }\n\n &:hover,\n &:focus,\n &.focus {\n color: @btn-default-color;\n text-decoration: none;\n }\n\n &:active,\n &.active {\n outline: 0;\n background-image: none;\n .box-shadow(inset 0 3px 5px rgba(0,0,0,.125));\n }\n\n &.disabled,\n &[disabled],\n fieldset[disabled] & {\n cursor: @cursor-disabled;\n pointer-events: none; // Future-proof disabling of clicks\n .opacity(.65);\n .box-shadow(none);\n }\n}\n\n\n// Alternate buttons\n// --------------------------------------------------\n\n.btn-default {\n .button-variant(@btn-default-color; @btn-default-bg; @btn-default-border);\n}\n.btn-primary {\n .button-variant(@btn-primary-color; @btn-primary-bg; @btn-primary-border);\n}\n// Success appears as green\n.btn-success {\n .button-variant(@btn-success-color; @btn-success-bg; @btn-success-border);\n}\n// Info appears as blue-green\n.btn-info {\n .button-variant(@btn-info-color; @btn-info-bg; @btn-info-border);\n}\n// Warning appears as orange\n.btn-warning {\n .button-variant(@btn-warning-color; @btn-warning-bg; @btn-warning-border);\n}\n// Danger and error appear as red\n.btn-danger {\n .button-variant(@btn-danger-color; @btn-danger-bg; @btn-danger-border);\n}\n\n\n// Link buttons\n// -------------------------\n\n// Make a button look and behave like a link\n.btn-link {\n color: @link-color;\n font-weight: normal;\n border-radius: 0;\n\n &,\n &:active,\n &.active,\n &[disabled],\n fieldset[disabled] & {\n background-color: transparent;\n .box-shadow(none);\n }\n &,\n &:hover,\n &:focus,\n &:active {\n border-color: transparent;\n }\n &:hover,\n &:focus {\n color: @link-hover-color;\n text-decoration: @link-hover-decoration;\n background-color: transparent;\n }\n &[disabled],\n fieldset[disabled] & {\n &:hover,\n &:focus {\n color: @btn-link-disabled-color;\n text-decoration: none;\n }\n }\n}\n\n\n// Button Sizes\n// --------------------------------------------------\n\n.btn-lg {\n // line-height: ensure even-numbered height of button next to large input\n .button-size(@padding-large-vertical; @padding-large-horizontal; @font-size-large; @line-height-large; @border-radius-large);\n}\n.btn-sm {\n // line-height: ensure proper height of button next to small input\n .button-size(@padding-small-vertical; @padding-small-horizontal; @font-size-small; @line-height-small; @border-radius-small);\n}\n.btn-xs {\n .button-size(@padding-xs-vertical; @padding-xs-horizontal; @font-size-small; @line-height-small; @border-radius-small);\n}\n\n\n// Block button\n// --------------------------------------------------\n\n.btn-block {\n display: block;\n width: 100%;\n}\n\n// Vertically space out multiple block buttons\n.btn-block + .btn-block {\n margin-top: 5px;\n}\n\n// Specificity overrides\ninput[type=\"submit\"],\ninput[type=\"reset\"],\ninput[type=\"button\"] {\n &.btn-block {\n width: 100%;\n }\n}\n","// Button variants\n//\n// Easily pump out default styles, as well as :hover, :focus, :active,\n// and disabled options for all buttons\n\n.button-variant(@color; @background; @border) {\n color: @color;\n background-color: @background;\n border-color: @border;\n\n &:hover,\n &:focus,\n &.focus,\n &:active,\n &.active,\n .open > .dropdown-toggle& {\n color: @color;\n background-color: darken(@background, 10%);\n border-color: darken(@border, 12%);\n }\n &:active,\n &.active,\n .open > .dropdown-toggle& {\n background-image: none;\n }\n &.disabled,\n &[disabled],\n fieldset[disabled] & {\n &,\n &:hover,\n &:focus,\n &.focus,\n &:active,\n &.active {\n background-color: @background;\n border-color: @border;\n }\n }\n\n .badge {\n color: @background;\n background-color: @color;\n }\n}\n\n// Button sizes\n.button-size(@padding-vertical; @padding-horizontal; @font-size; @line-height; @border-radius) {\n padding: @padding-vertical @padding-horizontal;\n font-size: @font-size;\n line-height: @line-height;\n border-radius: @border-radius;\n}\n","// Opacity\n\n.opacity(@opacity) {\n opacity: @opacity;\n // IE8 filter\n @opacity-ie: (@opacity * 100);\n filter: ~\"alpha(opacity=@{opacity-ie})\";\n}\n","//\n// Component animations\n// --------------------------------------------------\n\n// Heads up!\n//\n// We don't use the `.opacity()` mixin here since it causes a bug with text\n// fields in IE7-8. Source: https://github.com/twbs/bootstrap/pull/3552.\n\n.fade {\n opacity: 0;\n .transition(opacity .15s linear);\n &.in {\n opacity: 1;\n }\n}\n\n.collapse {\n display: none;\n\n &.in { display: block; }\n tr&.in { display: table-row; }\n tbody&.in { display: table-row-group; }\n}\n\n.collapsing {\n position: relative;\n height: 0;\n overflow: hidden;\n .transition-property(~\"height, visibility\");\n .transition-duration(.35s);\n .transition-timing-function(ease);\n}\n","//\n// Dropdown menus\n// --------------------------------------------------\n\n\n// Dropdown arrow/caret\n.caret {\n display: inline-block;\n width: 0;\n height: 0;\n margin-left: 2px;\n vertical-align: middle;\n border-top: @caret-width-base dashed;\n border-right: @caret-width-base solid transparent;\n border-left: @caret-width-base solid transparent;\n}\n\n// The dropdown wrapper (div)\n.dropup,\n.dropdown {\n position: relative;\n}\n\n// Prevent the focus on the dropdown toggle when closing dropdowns\n.dropdown-toggle:focus {\n outline: 0;\n}\n\n// The dropdown menu (ul)\n.dropdown-menu {\n position: absolute;\n top: 100%;\n left: 0;\n z-index: @zindex-dropdown;\n display: none; // none by default, but block on \"open\" of the menu\n float: left;\n min-width: 160px;\n padding: 5px 0;\n margin: 2px 0 0; // override default ul\n list-style: none;\n font-size: @font-size-base;\n text-align: left; // Ensures proper alignment if parent has it changed (e.g., modal footer)\n background-color: @dropdown-bg;\n border: 1px solid @dropdown-fallback-border; // IE8 fallback\n border: 1px solid @dropdown-border;\n border-radius: @border-radius-base;\n .box-shadow(0 6px 12px rgba(0,0,0,.175));\n background-clip: padding-box;\n\n // Aligns the dropdown menu to right\n //\n // Deprecated as of 3.1.0 in favor of `.dropdown-menu-[dir]`\n &.pull-right {\n right: 0;\n left: auto;\n }\n\n // Dividers (basically an hr) within the dropdown\n .divider {\n .nav-divider(@dropdown-divider-bg);\n }\n\n // Links within the dropdown menu\n > li > a {\n display: block;\n padding: 3px 20px;\n clear: both;\n font-weight: normal;\n line-height: @line-height-base;\n color: @dropdown-link-color;\n white-space: nowrap; // prevent links from randomly breaking onto new lines\n }\n}\n\n// Hover/Focus state\n.dropdown-menu > li > a {\n &:hover,\n &:focus {\n text-decoration: none;\n color: @dropdown-link-hover-color;\n background-color: @dropdown-link-hover-bg;\n }\n}\n\n// Active state\n.dropdown-menu > .active > a {\n &,\n &:hover,\n &:focus {\n color: @dropdown-link-active-color;\n text-decoration: none;\n outline: 0;\n background-color: @dropdown-link-active-bg;\n }\n}\n\n// Disabled state\n//\n// Gray out text and ensure the hover/focus state remains gray\n\n.dropdown-menu > .disabled > a {\n &,\n &:hover,\n &:focus {\n color: @dropdown-link-disabled-color;\n }\n\n // Nuke hover/focus effects\n &:hover,\n &:focus {\n text-decoration: none;\n background-color: transparent;\n background-image: none; // Remove CSS gradient\n .reset-filter();\n cursor: @cursor-disabled;\n }\n}\n\n// Open state for the dropdown\n.open {\n // Show the menu\n > .dropdown-menu {\n display: block;\n }\n\n // Remove the outline when :focus is triggered\n > a {\n outline: 0;\n }\n}\n\n// Menu positioning\n//\n// Add extra class to `.dropdown-menu` to flip the alignment of the dropdown\n// menu with the parent.\n.dropdown-menu-right {\n left: auto; // Reset the default from `.dropdown-menu`\n right: 0;\n}\n// With v3, we enabled auto-flipping if you have a dropdown within a right\n// aligned nav component. To enable the undoing of that, we provide an override\n// to restore the default dropdown menu alignment.\n//\n// This is only for left-aligning a dropdown menu within a `.navbar-right` or\n// `.pull-right` nav component.\n.dropdown-menu-left {\n left: 0;\n right: auto;\n}\n\n// Dropdown section headers\n.dropdown-header {\n display: block;\n padding: 3px 20px;\n font-size: @font-size-small;\n line-height: @line-height-base;\n color: @dropdown-header-color;\n white-space: nowrap; // as with > li > a\n}\n\n// Backdrop to catch body clicks on mobile, etc.\n.dropdown-backdrop {\n position: fixed;\n left: 0;\n right: 0;\n bottom: 0;\n top: 0;\n z-index: (@zindex-dropdown - 10);\n}\n\n// Right aligned dropdowns\n.pull-right > .dropdown-menu {\n right: 0;\n left: auto;\n}\n\n// Allow for dropdowns to go bottom up (aka, dropup-menu)\n//\n// Just add .dropup after the standard .dropdown class and you're set, bro.\n// TODO: abstract this so that the navbar fixed styles are not placed here?\n\n.dropup,\n.navbar-fixed-bottom .dropdown {\n // Reverse the caret\n .caret {\n border-top: 0;\n border-bottom: @caret-width-base solid;\n content: \"\";\n }\n // Different positioning for bottom up menu\n .dropdown-menu {\n top: auto;\n bottom: 100%;\n margin-bottom: 2px;\n }\n}\n\n\n// Component alignment\n//\n// Reiterate per navbar.less and the modified component alignment there.\n\n@media (min-width: @grid-float-breakpoint) {\n .navbar-right {\n .dropdown-menu {\n .dropdown-menu-right();\n }\n // Necessary for overrides of the default right aligned menu.\n // Will remove come v4 in all likelihood.\n .dropdown-menu-left {\n .dropdown-menu-left();\n }\n }\n}\n","// Horizontal dividers\n//\n// Dividers (basically an hr) within dropdowns and nav lists\n\n.nav-divider(@color: #e5e5e5) {\n height: 1px;\n margin: ((@line-height-computed / 2) - 1) 0;\n overflow: hidden;\n background-color: @color;\n}\n","// Reset filters for IE\n//\n// When you need to remove a gradient background, do not forget to use this to reset\n// the IE filter for IE9 and below.\n\n.reset-filter() {\n filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(enabled = false)\"));\n}\n","//\n// Button groups\n// --------------------------------------------------\n\n// Make the div behave like a button\n.btn-group,\n.btn-group-vertical {\n position: relative;\n display: inline-block;\n vertical-align: middle; // match .btn alignment given font-size hack above\n > .btn {\n position: relative;\n float: left;\n // Bring the \"active\" button to the front\n &:hover,\n &:focus,\n &:active,\n &.active {\n z-index: 2;\n }\n }\n}\n\n// Prevent double borders when buttons are next to each other\n.btn-group {\n .btn + .btn,\n .btn + .btn-group,\n .btn-group + .btn,\n .btn-group + .btn-group {\n margin-left: -1px;\n }\n}\n\n// Optional: Group multiple button groups together for a toolbar\n.btn-toolbar {\n margin-left: -5px; // Offset the first child's margin\n &:extend(.clearfix all);\n\n .btn-group,\n .input-group {\n float: left;\n }\n > .btn,\n > .btn-group,\n > .input-group {\n margin-left: 5px;\n }\n}\n\n.btn-group > .btn:not(:first-child):not(:last-child):not(.dropdown-toggle) {\n border-radius: 0;\n}\n\n// Set corners individual because sometimes a single button can be in a .btn-group and we need :first-child and :last-child to both match\n.btn-group > .btn:first-child {\n margin-left: 0;\n &:not(:last-child):not(.dropdown-toggle) {\n .border-right-radius(0);\n }\n}\n// Need .dropdown-toggle since :last-child doesn't apply given a .dropdown-menu immediately after it\n.btn-group > .btn:last-child:not(:first-child),\n.btn-group > .dropdown-toggle:not(:first-child) {\n .border-left-radius(0);\n}\n\n// Custom edits for including btn-groups within btn-groups (useful for including dropdown buttons within a btn-group)\n.btn-group > .btn-group {\n float: left;\n}\n.btn-group > .btn-group:not(:first-child):not(:last-child) > .btn {\n border-radius: 0;\n}\n.btn-group > .btn-group:first-child:not(:last-child) {\n > .btn:last-child,\n > .dropdown-toggle {\n .border-right-radius(0);\n }\n}\n.btn-group > .btn-group:last-child:not(:first-child) > .btn:first-child {\n .border-left-radius(0);\n}\n\n// On active and open, don't show outline\n.btn-group .dropdown-toggle:active,\n.btn-group.open .dropdown-toggle {\n outline: 0;\n}\n\n\n// Sizing\n//\n// Remix the default button sizing classes into new ones for easier manipulation.\n\n.btn-group-xs > .btn { &:extend(.btn-xs); }\n.btn-group-sm > .btn { &:extend(.btn-sm); }\n.btn-group-lg > .btn { &:extend(.btn-lg); }\n\n\n// Split button dropdowns\n// ----------------------\n\n// Give the line between buttons some depth\n.btn-group > .btn + .dropdown-toggle {\n padding-left: 8px;\n padding-right: 8px;\n}\n.btn-group > .btn-lg + .dropdown-toggle {\n padding-left: 12px;\n padding-right: 12px;\n}\n\n// The clickable button for toggling the menu\n// Remove the gradient and set the same inset shadow as the :active state\n.btn-group.open .dropdown-toggle {\n .box-shadow(inset 0 3px 5px rgba(0,0,0,.125));\n\n // Show no shadow for `.btn-link` since it has no other button styles.\n &.btn-link {\n .box-shadow(none);\n }\n}\n\n\n// Reposition the caret\n.btn .caret {\n margin-left: 0;\n}\n// Carets in other button sizes\n.btn-lg .caret {\n border-width: @caret-width-large @caret-width-large 0;\n border-bottom-width: 0;\n}\n// Upside down carets for .dropup\n.dropup .btn-lg .caret {\n border-width: 0 @caret-width-large @caret-width-large;\n}\n\n\n// Vertical button groups\n// ----------------------\n\n.btn-group-vertical {\n > .btn,\n > .btn-group,\n > .btn-group > .btn {\n display: block;\n float: none;\n width: 100%;\n max-width: 100%;\n }\n\n // Clear floats so dropdown menus can be properly placed\n > .btn-group {\n &:extend(.clearfix all);\n > .btn {\n float: none;\n }\n }\n\n > .btn + .btn,\n > .btn + .btn-group,\n > .btn-group + .btn,\n > .btn-group + .btn-group {\n margin-top: -1px;\n margin-left: 0;\n }\n}\n\n.btn-group-vertical > .btn {\n &:not(:first-child):not(:last-child) {\n border-radius: 0;\n }\n &:first-child:not(:last-child) {\n border-top-right-radius: @border-radius-base;\n .border-bottom-radius(0);\n }\n &:last-child:not(:first-child) {\n border-bottom-left-radius: @border-radius-base;\n .border-top-radius(0);\n }\n}\n.btn-group-vertical > .btn-group:not(:first-child):not(:last-child) > .btn {\n border-radius: 0;\n}\n.btn-group-vertical > .btn-group:first-child:not(:last-child) {\n > .btn:last-child,\n > .dropdown-toggle {\n .border-bottom-radius(0);\n }\n}\n.btn-group-vertical > .btn-group:last-child:not(:first-child) > .btn:first-child {\n .border-top-radius(0);\n}\n\n\n// Justified button groups\n// ----------------------\n\n.btn-group-justified {\n display: table;\n width: 100%;\n table-layout: fixed;\n border-collapse: separate;\n > .btn,\n > .btn-group {\n float: none;\n display: table-cell;\n width: 1%;\n }\n > .btn-group .btn {\n width: 100%;\n }\n\n > .btn-group .dropdown-menu {\n left: auto;\n }\n}\n\n\n// Checkbox and radio options\n//\n// In order to support the browser's form validation feedback, powered by the\n// `required` attribute, we have to \"hide\" the inputs via `clip`. We cannot use\n// `display: none;` or `visibility: hidden;` as that also hides the popover.\n// Simply visually hiding the inputs via `opacity` would leave them clickable in\n// certain cases which is prevented by using `clip` and `pointer-events`.\n// This way, we ensure a DOM element is visible to position the popover from.\n//\n// See https://github.com/twbs/bootstrap/pull/12794 and\n// https://github.com/twbs/bootstrap/pull/14559 for more information.\n\n[data-toggle=\"buttons\"] {\n > .btn,\n > .btn-group > .btn {\n input[type=\"radio\"],\n input[type=\"checkbox\"] {\n position: absolute;\n clip: rect(0,0,0,0);\n pointer-events: none;\n }\n }\n}\n","// Single side border-radius\n\n.border-top-radius(@radius) {\n border-top-right-radius: @radius;\n border-top-left-radius: @radius;\n}\n.border-right-radius(@radius) {\n border-bottom-right-radius: @radius;\n border-top-right-radius: @radius;\n}\n.border-bottom-radius(@radius) {\n border-bottom-right-radius: @radius;\n border-bottom-left-radius: @radius;\n}\n.border-left-radius(@radius) {\n border-bottom-left-radius: @radius;\n border-top-left-radius: @radius;\n}\n","//\n// Input groups\n// --------------------------------------------------\n\n// Base styles\n// -------------------------\n.input-group {\n position: relative; // For dropdowns\n display: table;\n border-collapse: separate; // prevent input groups from inheriting border styles from table cells when placed within a table\n\n // Undo padding and float of grid classes\n &[class*=\"col-\"] {\n float: none;\n padding-left: 0;\n padding-right: 0;\n }\n\n .form-control {\n // Ensure that the input is always above the *appended* addon button for\n // proper border colors.\n position: relative;\n z-index: 2;\n\n // IE9 fubars the placeholder attribute in text inputs and the arrows on\n // select elements in input groups. To fix it, we float the input. Details:\n // https://github.com/twbs/bootstrap/issues/11561#issuecomment-28936855\n float: left;\n\n width: 100%;\n margin-bottom: 0;\n }\n}\n\n// Sizing options\n//\n// Remix the default form control sizing classes into new ones for easier\n// manipulation.\n\n.input-group-lg > .form-control,\n.input-group-lg > .input-group-addon,\n.input-group-lg > .input-group-btn > .btn {\n .input-lg();\n}\n.input-group-sm > .form-control,\n.input-group-sm > .input-group-addon,\n.input-group-sm > .input-group-btn > .btn {\n .input-sm();\n}\n\n\n// Display as table-cell\n// -------------------------\n.input-group-addon,\n.input-group-btn,\n.input-group .form-control {\n display: table-cell;\n\n &:not(:first-child):not(:last-child) {\n border-radius: 0;\n }\n}\n// Addon and addon wrapper for buttons\n.input-group-addon,\n.input-group-btn {\n width: 1%;\n white-space: nowrap;\n vertical-align: middle; // Match the inputs\n}\n\n// Text input groups\n// -------------------------\n.input-group-addon {\n padding: @padding-base-vertical @padding-base-horizontal;\n font-size: @font-size-base;\n font-weight: normal;\n line-height: 1;\n color: @input-color;\n text-align: center;\n background-color: @input-group-addon-bg;\n border: 1px solid @input-group-addon-border-color;\n border-radius: @border-radius-base;\n\n // Sizing\n &.input-sm {\n padding: @padding-small-vertical @padding-small-horizontal;\n font-size: @font-size-small;\n border-radius: @border-radius-small;\n }\n &.input-lg {\n padding: @padding-large-vertical @padding-large-horizontal;\n font-size: @font-size-large;\n border-radius: @border-radius-large;\n }\n\n // Nuke default margins from checkboxes and radios to vertically center within.\n input[type=\"radio\"],\n input[type=\"checkbox\"] {\n margin-top: 0;\n }\n}\n\n// Reset rounded corners\n.input-group .form-control:first-child,\n.input-group-addon:first-child,\n.input-group-btn:first-child > .btn,\n.input-group-btn:first-child > .btn-group > .btn,\n.input-group-btn:first-child > .dropdown-toggle,\n.input-group-btn:last-child > .btn:not(:last-child):not(.dropdown-toggle),\n.input-group-btn:last-child > .btn-group:not(:last-child) > .btn {\n .border-right-radius(0);\n}\n.input-group-addon:first-child {\n border-right: 0;\n}\n.input-group .form-control:last-child,\n.input-group-addon:last-child,\n.input-group-btn:last-child > .btn,\n.input-group-btn:last-child > .btn-group > .btn,\n.input-group-btn:last-child > .dropdown-toggle,\n.input-group-btn:first-child > .btn:not(:first-child),\n.input-group-btn:first-child > .btn-group:not(:first-child) > .btn {\n .border-left-radius(0);\n}\n.input-group-addon:last-child {\n border-left: 0;\n}\n\n// Button input groups\n// -------------------------\n.input-group-btn {\n position: relative;\n // Jankily prevent input button groups from wrapping with `white-space` and\n // `font-size` in combination with `inline-block` on buttons.\n font-size: 0;\n white-space: nowrap;\n\n // Negative margin for spacing, position for bringing hovered/focused/actived\n // element above the siblings.\n > .btn {\n position: relative;\n + .btn {\n margin-left: -1px;\n }\n // Bring the \"active\" button to the front\n &:hover,\n &:focus,\n &:active {\n z-index: 2;\n }\n }\n\n // Negative margin to only have a 1px border between the two\n &:first-child {\n > .btn,\n > .btn-group {\n margin-right: -1px;\n }\n }\n &:last-child {\n > .btn,\n > .btn-group {\n margin-left: -1px;\n }\n }\n}\n","//\n// Navs\n// --------------------------------------------------\n\n\n// Base class\n// --------------------------------------------------\n\n.nav {\n margin-bottom: 0;\n padding-left: 0; // Override default ul/ol\n list-style: none;\n &:extend(.clearfix all);\n\n > li {\n position: relative;\n display: block;\n\n > a {\n position: relative;\n display: block;\n padding: @nav-link-padding;\n &:hover,\n &:focus {\n text-decoration: none;\n background-color: @nav-link-hover-bg;\n }\n }\n\n // Disabled state sets text to gray and nukes hover/tab effects\n &.disabled > a {\n color: @nav-disabled-link-color;\n\n &:hover,\n &:focus {\n color: @nav-disabled-link-hover-color;\n text-decoration: none;\n background-color: transparent;\n cursor: @cursor-disabled;\n }\n }\n }\n\n // Open dropdowns\n .open > a {\n &,\n &:hover,\n &:focus {\n background-color: @nav-link-hover-bg;\n border-color: @link-color;\n }\n }\n\n // Nav dividers (deprecated with v3.0.1)\n //\n // This should have been removed in v3 with the dropping of `.nav-list`, but\n // we missed it. We don't currently support this anywhere, but in the interest\n // of maintaining backward compatibility in case you use it, it's deprecated.\n .nav-divider {\n .nav-divider();\n }\n\n // Prevent IE8 from misplacing imgs\n //\n // See https://github.com/h5bp/html5-boilerplate/issues/984#issuecomment-3985989\n > li > a > img {\n max-width: none;\n }\n}\n\n\n// Tabs\n// -------------------------\n\n// Give the tabs something to sit on\n.nav-tabs {\n border-bottom: 1px solid @nav-tabs-border-color;\n > li {\n float: left;\n // Make the list-items overlay the bottom border\n margin-bottom: -1px;\n\n // Actual tabs (as links)\n > a {\n margin-right: 2px;\n line-height: @line-height-base;\n border: 1px solid transparent;\n border-radius: @border-radius-base @border-radius-base 0 0;\n &:hover {\n border-color: @nav-tabs-link-hover-border-color @nav-tabs-link-hover-border-color @nav-tabs-border-color;\n }\n }\n\n // Active state, and its :hover to override normal :hover\n &.active > a {\n &,\n &:hover,\n &:focus {\n color: @nav-tabs-active-link-hover-color;\n background-color: @nav-tabs-active-link-hover-bg;\n border: 1px solid @nav-tabs-active-link-hover-border-color;\n border-bottom-color: transparent;\n cursor: default;\n }\n }\n }\n // pulling this in mainly for less shorthand\n &.nav-justified {\n .nav-justified();\n .nav-tabs-justified();\n }\n}\n\n\n// Pills\n// -------------------------\n.nav-pills {\n > li {\n float: left;\n\n // Links rendered as pills\n > a {\n border-radius: @nav-pills-border-radius;\n }\n + li {\n margin-left: 2px;\n }\n\n // Active state\n &.active > a {\n &,\n &:hover,\n &:focus {\n color: @nav-pills-active-link-hover-color;\n background-color: @nav-pills-active-link-hover-bg;\n }\n }\n }\n}\n\n\n// Stacked pills\n.nav-stacked {\n > li {\n float: none;\n + li {\n margin-top: 2px;\n margin-left: 0; // no need for this gap between nav items\n }\n }\n}\n\n\n// Nav variations\n// --------------------------------------------------\n\n// Justified nav links\n// -------------------------\n\n.nav-justified {\n width: 100%;\n\n > li {\n float: none;\n > a {\n text-align: center;\n margin-bottom: 5px;\n }\n }\n\n > .dropdown .dropdown-menu {\n top: auto;\n left: auto;\n }\n\n @media (min-width: @screen-sm-min) {\n > li {\n display: table-cell;\n width: 1%;\n > a {\n margin-bottom: 0;\n }\n }\n }\n}\n\n// Move borders to anchors instead of bottom of list\n//\n// Mixin for adding on top the shared `.nav-justified` styles for our tabs\n.nav-tabs-justified {\n border-bottom: 0;\n\n > li > a {\n // Override margin from .nav-tabs\n margin-right: 0;\n border-radius: @border-radius-base;\n }\n\n > .active > a,\n > .active > a:hover,\n > .active > a:focus {\n border: 1px solid @nav-tabs-justified-link-border-color;\n }\n\n @media (min-width: @screen-sm-min) {\n > li > a {\n border-bottom: 1px solid @nav-tabs-justified-link-border-color;\n border-radius: @border-radius-base @border-radius-base 0 0;\n }\n > .active > a,\n > .active > a:hover,\n > .active > a:focus {\n border-bottom-color: @nav-tabs-justified-active-link-border-color;\n }\n }\n}\n\n\n// Tabbable tabs\n// -------------------------\n\n// Hide tabbable panes to start, show them when `.active`\n.tab-content {\n > .tab-pane {\n display: none;\n }\n > .active {\n display: block;\n }\n}\n\n\n// Dropdowns\n// -------------------------\n\n// Specific dropdowns\n.nav-tabs .dropdown-menu {\n // make dropdown border overlap tab border\n margin-top: -1px;\n // Remove the top rounded corners here since there is a hard edge above the menu\n .border-top-radius(0);\n}\n","//\n// Navbars\n// --------------------------------------------------\n\n\n// Wrapper and base class\n//\n// Provide a static navbar from which we expand to create full-width, fixed, and\n// other navbar variations.\n\n.navbar {\n position: relative;\n min-height: @navbar-height; // Ensure a navbar always shows (e.g., without a .navbar-brand in collapsed mode)\n margin-bottom: @navbar-margin-bottom;\n border: 1px solid transparent;\n\n // Prevent floats from breaking the navbar\n &:extend(.clearfix all);\n\n @media (min-width: @grid-float-breakpoint) {\n border-radius: @navbar-border-radius;\n }\n}\n\n\n// Navbar heading\n//\n// Groups `.navbar-brand` and `.navbar-toggle` into a single component for easy\n// styling of responsive aspects.\n\n.navbar-header {\n &:extend(.clearfix all);\n\n @media (min-width: @grid-float-breakpoint) {\n float: left;\n }\n}\n\n\n// Navbar collapse (body)\n//\n// Group your navbar content into this for easy collapsing and expanding across\n// various device sizes. By default, this content is collapsed when <768px, but\n// will expand past that for a horizontal display.\n//\n// To start (on mobile devices) the navbar links, forms, and buttons are stacked\n// vertically and include a `max-height` to overflow in case you have too much\n// content for the user's viewport.\n\n.navbar-collapse {\n overflow-x: visible;\n padding-right: @navbar-padding-horizontal;\n padding-left: @navbar-padding-horizontal;\n border-top: 1px solid transparent;\n box-shadow: inset 0 1px 0 rgba(255,255,255,.1);\n &:extend(.clearfix all);\n -webkit-overflow-scrolling: touch;\n\n &.in {\n overflow-y: auto;\n }\n\n @media (min-width: @grid-float-breakpoint) {\n width: auto;\n border-top: 0;\n box-shadow: none;\n\n &.collapse {\n display: block !important;\n height: auto !important;\n padding-bottom: 0; // Override default setting\n overflow: visible !important;\n }\n\n &.in {\n overflow-y: visible;\n }\n\n // Undo the collapse side padding for navbars with containers to ensure\n // alignment of right-aligned contents.\n .navbar-fixed-top &,\n .navbar-static-top &,\n .navbar-fixed-bottom & {\n padding-left: 0;\n padding-right: 0;\n }\n }\n}\n\n.navbar-fixed-top,\n.navbar-fixed-bottom {\n .navbar-collapse {\n max-height: @navbar-collapse-max-height;\n\n @media (max-device-width: @screen-xs-min) and (orientation: landscape) {\n max-height: 200px;\n }\n }\n}\n\n\n// Both navbar header and collapse\n//\n// When a container is present, change the behavior of the header and collapse.\n\n.container,\n.container-fluid {\n > .navbar-header,\n > .navbar-collapse {\n margin-right: -@navbar-padding-horizontal;\n margin-left: -@navbar-padding-horizontal;\n\n @media (min-width: @grid-float-breakpoint) {\n margin-right: 0;\n margin-left: 0;\n }\n }\n}\n\n\n//\n// Navbar alignment options\n//\n// Display the navbar across the entirety of the page or fixed it to the top or\n// bottom of the page.\n\n// Static top (unfixed, but 100% wide) navbar\n.navbar-static-top {\n z-index: @zindex-navbar;\n border-width: 0 0 1px;\n\n @media (min-width: @grid-float-breakpoint) {\n border-radius: 0;\n }\n}\n\n// Fix the top/bottom navbars when screen real estate supports it\n.navbar-fixed-top,\n.navbar-fixed-bottom {\n position: fixed;\n right: 0;\n left: 0;\n z-index: @zindex-navbar-fixed;\n\n // Undo the rounded corners\n @media (min-width: @grid-float-breakpoint) {\n border-radius: 0;\n }\n}\n.navbar-fixed-top {\n top: 0;\n border-width: 0 0 1px;\n}\n.navbar-fixed-bottom {\n bottom: 0;\n margin-bottom: 0; // override .navbar defaults\n border-width: 1px 0 0;\n}\n\n\n// Brand/project name\n\n.navbar-brand {\n float: left;\n padding: @navbar-padding-vertical @navbar-padding-horizontal;\n font-size: @font-size-large;\n line-height: @line-height-computed;\n height: @navbar-height;\n\n &:hover,\n &:focus {\n text-decoration: none;\n }\n\n > img {\n display: block;\n }\n\n @media (min-width: @grid-float-breakpoint) {\n .navbar > .container &,\n .navbar > .container-fluid & {\n margin-left: -@navbar-padding-horizontal;\n }\n }\n}\n\n\n// Navbar toggle\n//\n// Custom button for toggling the `.navbar-collapse`, powered by the collapse\n// JavaScript plugin.\n\n.navbar-toggle {\n position: relative;\n float: right;\n margin-right: @navbar-padding-horizontal;\n padding: 9px 10px;\n .navbar-vertical-align(34px);\n background-color: transparent;\n background-image: none; // Reset unusual Firefox-on-Android default style; see https://github.com/necolas/normalize.css/issues/214\n border: 1px solid transparent;\n border-radius: @border-radius-base;\n\n // We remove the `outline` here, but later compensate by attaching `:hover`\n // styles to `:focus`.\n &:focus {\n outline: 0;\n }\n\n // Bars\n .icon-bar {\n display: block;\n width: 22px;\n height: 2px;\n border-radius: 1px;\n }\n .icon-bar + .icon-bar {\n margin-top: 4px;\n }\n\n @media (min-width: @grid-float-breakpoint) {\n display: none;\n }\n}\n\n\n// Navbar nav links\n//\n// Builds on top of the `.nav` components with its own modifier class to make\n// the nav the full height of the horizontal nav (above 768px).\n\n.navbar-nav {\n margin: (@navbar-padding-vertical / 2) -@navbar-padding-horizontal;\n\n > li > a {\n padding-top: 10px;\n padding-bottom: 10px;\n line-height: @line-height-computed;\n }\n\n @media (max-width: @grid-float-breakpoint-max) {\n // Dropdowns get custom display when collapsed\n .open .dropdown-menu {\n position: static;\n float: none;\n width: auto;\n margin-top: 0;\n background-color: transparent;\n border: 0;\n box-shadow: none;\n > li > a,\n .dropdown-header {\n padding: 5px 15px 5px 25px;\n }\n > li > a {\n line-height: @line-height-computed;\n &:hover,\n &:focus {\n background-image: none;\n }\n }\n }\n }\n\n // Uncollapse the nav\n @media (min-width: @grid-float-breakpoint) {\n float: left;\n margin: 0;\n\n > li {\n float: left;\n > a {\n padding-top: @navbar-padding-vertical;\n padding-bottom: @navbar-padding-vertical;\n }\n }\n }\n}\n\n\n// Navbar form\n//\n// Extension of the `.form-inline` with some extra flavor for optimum display in\n// our navbars.\n\n.navbar-form {\n margin-left: -@navbar-padding-horizontal;\n margin-right: -@navbar-padding-horizontal;\n padding: 10px @navbar-padding-horizontal;\n border-top: 1px solid transparent;\n border-bottom: 1px solid transparent;\n @shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.1);\n .box-shadow(@shadow);\n\n // Mixin behavior for optimum display\n .form-inline();\n\n .form-group {\n @media (max-width: @grid-float-breakpoint-max) {\n margin-bottom: 5px;\n\n &:last-child {\n margin-bottom: 0;\n }\n }\n }\n\n // Vertically center in expanded, horizontal navbar\n .navbar-vertical-align(@input-height-base);\n\n // Undo 100% width for pull classes\n @media (min-width: @grid-float-breakpoint) {\n width: auto;\n border: 0;\n margin-left: 0;\n margin-right: 0;\n padding-top: 0;\n padding-bottom: 0;\n .box-shadow(none);\n }\n}\n\n\n// Dropdown menus\n\n// Menu position and menu carets\n.navbar-nav > li > .dropdown-menu {\n margin-top: 0;\n .border-top-radius(0);\n}\n// Menu position and menu caret support for dropups via extra dropup class\n.navbar-fixed-bottom .navbar-nav > li > .dropdown-menu {\n margin-bottom: 0;\n .border-top-radius(@navbar-border-radius);\n .border-bottom-radius(0);\n}\n\n\n// Buttons in navbars\n//\n// Vertically center a button within a navbar (when *not* in a form).\n\n.navbar-btn {\n .navbar-vertical-align(@input-height-base);\n\n &.btn-sm {\n .navbar-vertical-align(@input-height-small);\n }\n &.btn-xs {\n .navbar-vertical-align(22);\n }\n}\n\n\n// Text in navbars\n//\n// Add a class to make any element properly align itself vertically within the navbars.\n\n.navbar-text {\n .navbar-vertical-align(@line-height-computed);\n\n @media (min-width: @grid-float-breakpoint) {\n float: left;\n margin-left: @navbar-padding-horizontal;\n margin-right: @navbar-padding-horizontal;\n }\n}\n\n\n// Component alignment\n//\n// Repurpose the pull utilities as their own navbar utilities to avoid specificity\n// issues with parents and chaining. Only do this when the navbar is uncollapsed\n// though so that navbar contents properly stack and align in mobile.\n//\n// Declared after the navbar components to ensure more specificity on the margins.\n\n@media (min-width: @grid-float-breakpoint) {\n .navbar-left { .pull-left(); }\n .navbar-right {\n .pull-right();\n margin-right: -@navbar-padding-horizontal;\n\n ~ .navbar-right {\n margin-right: 0;\n }\n }\n}\n\n\n// Alternate navbars\n// --------------------------------------------------\n\n// Default navbar\n.navbar-default {\n background-color: @navbar-default-bg;\n border-color: @navbar-default-border;\n\n .navbar-brand {\n color: @navbar-default-brand-color;\n &:hover,\n &:focus {\n color: @navbar-default-brand-hover-color;\n background-color: @navbar-default-brand-hover-bg;\n }\n }\n\n .navbar-text {\n color: @navbar-default-color;\n }\n\n .navbar-nav {\n > li > a {\n color: @navbar-default-link-color;\n\n &:hover,\n &:focus {\n color: @navbar-default-link-hover-color;\n background-color: @navbar-default-link-hover-bg;\n }\n }\n > .active > a {\n &,\n &:hover,\n &:focus {\n color: @navbar-default-link-active-color;\n background-color: @navbar-default-link-active-bg;\n }\n }\n > .disabled > a {\n &,\n &:hover,\n &:focus {\n color: @navbar-default-link-disabled-color;\n background-color: @navbar-default-link-disabled-bg;\n }\n }\n }\n\n .navbar-toggle {\n border-color: @navbar-default-toggle-border-color;\n &:hover,\n &:focus {\n background-color: @navbar-default-toggle-hover-bg;\n }\n .icon-bar {\n background-color: @navbar-default-toggle-icon-bar-bg;\n }\n }\n\n .navbar-collapse,\n .navbar-form {\n border-color: @navbar-default-border;\n }\n\n // Dropdown menu items\n .navbar-nav {\n // Remove background color from open dropdown\n > .open > a {\n &,\n &:hover,\n &:focus {\n background-color: @navbar-default-link-active-bg;\n color: @navbar-default-link-active-color;\n }\n }\n\n @media (max-width: @grid-float-breakpoint-max) {\n // Dropdowns get custom display when collapsed\n .open .dropdown-menu {\n > li > a {\n color: @navbar-default-link-color;\n &:hover,\n &:focus {\n color: @navbar-default-link-hover-color;\n background-color: @navbar-default-link-hover-bg;\n }\n }\n > .active > a {\n &,\n &:hover,\n &:focus {\n color: @navbar-default-link-active-color;\n background-color: @navbar-default-link-active-bg;\n }\n }\n > .disabled > a {\n &,\n &:hover,\n &:focus {\n color: @navbar-default-link-disabled-color;\n background-color: @navbar-default-link-disabled-bg;\n }\n }\n }\n }\n }\n\n\n // Links in navbars\n //\n // Add a class to ensure links outside the navbar nav are colored correctly.\n\n .navbar-link {\n color: @navbar-default-link-color;\n &:hover {\n color: @navbar-default-link-hover-color;\n }\n }\n\n .btn-link {\n color: @navbar-default-link-color;\n &:hover,\n &:focus {\n color: @navbar-default-link-hover-color;\n }\n &[disabled],\n fieldset[disabled] & {\n &:hover,\n &:focus {\n color: @navbar-default-link-disabled-color;\n }\n }\n }\n}\n\n// Inverse navbar\n\n.navbar-inverse {\n background-color: @navbar-inverse-bg;\n border-color: @navbar-inverse-border;\n\n .navbar-brand {\n color: @navbar-inverse-brand-color;\n &:hover,\n &:focus {\n color: @navbar-inverse-brand-hover-color;\n background-color: @navbar-inverse-brand-hover-bg;\n }\n }\n\n .navbar-text {\n color: @navbar-inverse-color;\n }\n\n .navbar-nav {\n > li > a {\n color: @navbar-inverse-link-color;\n\n &:hover,\n &:focus {\n color: @navbar-inverse-link-hover-color;\n background-color: @navbar-inverse-link-hover-bg;\n }\n }\n > .active > a {\n &,\n &:hover,\n &:focus {\n color: @navbar-inverse-link-active-color;\n background-color: @navbar-inverse-link-active-bg;\n }\n }\n > .disabled > a {\n &,\n &:hover,\n &:focus {\n color: @navbar-inverse-link-disabled-color;\n background-color: @navbar-inverse-link-disabled-bg;\n }\n }\n }\n\n // Darken the responsive nav toggle\n .navbar-toggle {\n border-color: @navbar-inverse-toggle-border-color;\n &:hover,\n &:focus {\n background-color: @navbar-inverse-toggle-hover-bg;\n }\n .icon-bar {\n background-color: @navbar-inverse-toggle-icon-bar-bg;\n }\n }\n\n .navbar-collapse,\n .navbar-form {\n border-color: darken(@navbar-inverse-bg, 7%);\n }\n\n // Dropdowns\n .navbar-nav {\n > .open > a {\n &,\n &:hover,\n &:focus {\n background-color: @navbar-inverse-link-active-bg;\n color: @navbar-inverse-link-active-color;\n }\n }\n\n @media (max-width: @grid-float-breakpoint-max) {\n // Dropdowns get custom display\n .open .dropdown-menu {\n > .dropdown-header {\n border-color: @navbar-inverse-border;\n }\n .divider {\n background-color: @navbar-inverse-border;\n }\n > li > a {\n color: @navbar-inverse-link-color;\n &:hover,\n &:focus {\n color: @navbar-inverse-link-hover-color;\n background-color: @navbar-inverse-link-hover-bg;\n }\n }\n > .active > a {\n &,\n &:hover,\n &:focus {\n color: @navbar-inverse-link-active-color;\n background-color: @navbar-inverse-link-active-bg;\n }\n }\n > .disabled > a {\n &,\n &:hover,\n &:focus {\n color: @navbar-inverse-link-disabled-color;\n background-color: @navbar-inverse-link-disabled-bg;\n }\n }\n }\n }\n }\n\n .navbar-link {\n color: @navbar-inverse-link-color;\n &:hover {\n color: @navbar-inverse-link-hover-color;\n }\n }\n\n .btn-link {\n color: @navbar-inverse-link-color;\n &:hover,\n &:focus {\n color: @navbar-inverse-link-hover-color;\n }\n &[disabled],\n fieldset[disabled] & {\n &:hover,\n &:focus {\n color: @navbar-inverse-link-disabled-color;\n }\n }\n }\n}\n","// Navbar vertical align\n//\n// Vertically center elements in the navbar.\n// Example: an element has a height of 30px, so write out `.navbar-vertical-align(30px);` to calculate the appropriate top margin.\n\n.navbar-vertical-align(@element-height) {\n margin-top: ((@navbar-height - @element-height) / 2);\n margin-bottom: ((@navbar-height - @element-height) / 2);\n}\n","//\n// Utility classes\n// --------------------------------------------------\n\n\n// Floats\n// -------------------------\n\n.clearfix {\n .clearfix();\n}\n.center-block {\n .center-block();\n}\n.pull-right {\n float: right !important;\n}\n.pull-left {\n float: left !important;\n}\n\n\n// Toggling content\n// -------------------------\n\n// Note: Deprecated .hide in favor of .hidden or .sr-only (as appropriate) in v3.0.1\n.hide {\n display: none !important;\n}\n.show {\n display: block !important;\n}\n.invisible {\n visibility: hidden;\n}\n.text-hide {\n .text-hide();\n}\n\n\n// Hide from screenreaders and browsers\n//\n// Credit: HTML5 Boilerplate\n\n.hidden {\n display: none !important;\n}\n\n\n// For Affix plugin\n// -------------------------\n\n.affix {\n position: fixed;\n}\n","//\n// Breadcrumbs\n// --------------------------------------------------\n\n\n.breadcrumb {\n padding: @breadcrumb-padding-vertical @breadcrumb-padding-horizontal;\n margin-bottom: @line-height-computed;\n list-style: none;\n background-color: @breadcrumb-bg;\n border-radius: @border-radius-base;\n\n > li {\n display: inline-block;\n\n + li:before {\n content: \"@{breadcrumb-separator}\\00a0\"; // Unicode space added since inline-block means non-collapsing white-space\n padding: 0 5px;\n color: @breadcrumb-color;\n }\n }\n\n > .active {\n color: @breadcrumb-active-color;\n }\n}\n","//\n// Pagination (multiple pages)\n// --------------------------------------------------\n.pagination {\n display: inline-block;\n padding-left: 0;\n margin: @line-height-computed 0;\n border-radius: @border-radius-base;\n\n > li {\n display: inline; // Remove list-style and block-level defaults\n > a,\n > span {\n position: relative;\n float: left; // Collapse white-space\n padding: @padding-base-vertical @padding-base-horizontal;\n line-height: @line-height-base;\n text-decoration: none;\n color: @pagination-color;\n background-color: @pagination-bg;\n border: 1px solid @pagination-border;\n margin-left: -1px;\n }\n &:first-child {\n > a,\n > span {\n margin-left: 0;\n .border-left-radius(@border-radius-base);\n }\n }\n &:last-child {\n > a,\n > span {\n .border-right-radius(@border-radius-base);\n }\n }\n }\n\n > li > a,\n > li > span {\n &:hover,\n &:focus {\n color: @pagination-hover-color;\n background-color: @pagination-hover-bg;\n border-color: @pagination-hover-border;\n }\n }\n\n > .active > a,\n > .active > span {\n &,\n &:hover,\n &:focus {\n z-index: 2;\n color: @pagination-active-color;\n background-color: @pagination-active-bg;\n border-color: @pagination-active-border;\n cursor: default;\n }\n }\n\n > .disabled {\n > span,\n > span:hover,\n > span:focus,\n > a,\n > a:hover,\n > a:focus {\n color: @pagination-disabled-color;\n background-color: @pagination-disabled-bg;\n border-color: @pagination-disabled-border;\n cursor: @cursor-disabled;\n }\n }\n}\n\n// Sizing\n// --------------------------------------------------\n\n// Large\n.pagination-lg {\n .pagination-size(@padding-large-vertical; @padding-large-horizontal; @font-size-large; @border-radius-large);\n}\n\n// Small\n.pagination-sm {\n .pagination-size(@padding-small-vertical; @padding-small-horizontal; @font-size-small; @border-radius-small);\n}\n","// Pagination\n\n.pagination-size(@padding-vertical; @padding-horizontal; @font-size; @border-radius) {\n > li {\n > a,\n > span {\n padding: @padding-vertical @padding-horizontal;\n font-size: @font-size;\n }\n &:first-child {\n > a,\n > span {\n .border-left-radius(@border-radius);\n }\n }\n &:last-child {\n > a,\n > span {\n .border-right-radius(@border-radius);\n }\n }\n }\n}\n","//\n// Pager pagination\n// --------------------------------------------------\n\n\n.pager {\n padding-left: 0;\n margin: @line-height-computed 0;\n list-style: none;\n text-align: center;\n &:extend(.clearfix all);\n li {\n display: inline;\n > a,\n > span {\n display: inline-block;\n padding: 5px 14px;\n background-color: @pager-bg;\n border: 1px solid @pager-border;\n border-radius: @pager-border-radius;\n }\n\n > a:hover,\n > a:focus {\n text-decoration: none;\n background-color: @pager-hover-bg;\n }\n }\n\n .next {\n > a,\n > span {\n float: right;\n }\n }\n\n .previous {\n > a,\n > span {\n float: left;\n }\n }\n\n .disabled {\n > a,\n > a:hover,\n > a:focus,\n > span {\n color: @pager-disabled-color;\n background-color: @pager-bg;\n cursor: @cursor-disabled;\n }\n }\n}\n","//\n// Labels\n// --------------------------------------------------\n\n.label {\n display: inline;\n padding: .2em .6em .3em;\n font-size: 75%;\n font-weight: bold;\n line-height: 1;\n color: @label-color;\n text-align: center;\n white-space: nowrap;\n vertical-align: baseline;\n border-radius: .25em;\n\n // Add hover effects, but only for links\n a& {\n &:hover,\n &:focus {\n color: @label-link-hover-color;\n text-decoration: none;\n cursor: pointer;\n }\n }\n\n // Empty labels collapse automatically (not available in IE8)\n &:empty {\n display: none;\n }\n\n // Quick fix for labels in buttons\n .btn & {\n position: relative;\n top: -1px;\n }\n}\n\n// Colors\n// Contextual variations (linked labels get darker on :hover)\n\n.label-default {\n .label-variant(@label-default-bg);\n}\n\n.label-primary {\n .label-variant(@label-primary-bg);\n}\n\n.label-success {\n .label-variant(@label-success-bg);\n}\n\n.label-info {\n .label-variant(@label-info-bg);\n}\n\n.label-warning {\n .label-variant(@label-warning-bg);\n}\n\n.label-danger {\n .label-variant(@label-danger-bg);\n}\n","// Labels\n\n.label-variant(@color) {\n background-color: @color;\n\n &[href] {\n &:hover,\n &:focus {\n background-color: darken(@color, 10%);\n }\n }\n}\n","//\n// Badges\n// --------------------------------------------------\n\n\n// Base class\n.badge {\n display: inline-block;\n min-width: 10px;\n padding: 3px 7px;\n font-size: @font-size-small;\n font-weight: @badge-font-weight;\n color: @badge-color;\n line-height: @badge-line-height;\n vertical-align: baseline;\n white-space: nowrap;\n text-align: center;\n background-color: @badge-bg;\n border-radius: @badge-border-radius;\n\n // Empty badges collapse automatically (not available in IE8)\n &:empty {\n display: none;\n }\n\n // Quick fix for badges in buttons\n .btn & {\n position: relative;\n top: -1px;\n }\n\n .btn-xs &,\n .btn-group-xs > .btn & {\n top: 0;\n padding: 1px 5px;\n }\n\n // Hover state, but only for links\n a& {\n &:hover,\n &:focus {\n color: @badge-link-hover-color;\n text-decoration: none;\n cursor: pointer;\n }\n }\n\n // Account for badges in navs\n .list-group-item.active > &,\n .nav-pills > .active > a > & {\n color: @badge-active-color;\n background-color: @badge-active-bg;\n }\n\n .list-group-item > & {\n float: right;\n }\n\n .list-group-item > & + & {\n margin-right: 5px;\n }\n\n .nav-pills > li > a > & {\n margin-left: 3px;\n }\n}\n","//\n// Jumbotron\n// --------------------------------------------------\n\n\n.jumbotron {\n padding: @jumbotron-padding (@jumbotron-padding / 2);\n margin-bottom: @jumbotron-padding;\n color: @jumbotron-color;\n background-color: @jumbotron-bg;\n\n h1,\n .h1 {\n color: @jumbotron-heading-color;\n }\n\n p {\n margin-bottom: (@jumbotron-padding / 2);\n font-size: @jumbotron-font-size;\n font-weight: 200;\n }\n\n > hr {\n border-top-color: darken(@jumbotron-bg, 10%);\n }\n\n .container &,\n .container-fluid & {\n border-radius: @border-radius-large; // Only round corners at higher resolutions if contained in a container\n }\n\n .container {\n max-width: 100%;\n }\n\n @media screen and (min-width: @screen-sm-min) {\n padding: (@jumbotron-padding * 1.6) 0;\n\n .container &,\n .container-fluid & {\n padding-left: (@jumbotron-padding * 2);\n padding-right: (@jumbotron-padding * 2);\n }\n\n h1,\n .h1 {\n font-size: (@font-size-base * 4.5);\n }\n }\n}\n","//\n// Thumbnails\n// --------------------------------------------------\n\n\n// Mixin and adjust the regular image class\n.thumbnail {\n display: block;\n padding: @thumbnail-padding;\n margin-bottom: @line-height-computed;\n line-height: @line-height-base;\n background-color: @thumbnail-bg;\n border: 1px solid @thumbnail-border;\n border-radius: @thumbnail-border-radius;\n .transition(border .2s ease-in-out);\n\n > img,\n a > img {\n &:extend(.img-responsive);\n margin-left: auto;\n margin-right: auto;\n }\n\n // Add a hover state for linked versions only\n a&:hover,\n a&:focus,\n a&.active {\n border-color: @link-color;\n }\n\n // Image captions\n .caption {\n padding: @thumbnail-caption-padding;\n color: @thumbnail-caption-color;\n }\n}\n","//\n// Alerts\n// --------------------------------------------------\n\n\n// Base styles\n// -------------------------\n\n.alert {\n padding: @alert-padding;\n margin-bottom: @line-height-computed;\n border: 1px solid transparent;\n border-radius: @alert-border-radius;\n\n // Headings for larger alerts\n h4 {\n margin-top: 0;\n // Specified for the h4 to prevent conflicts of changing @headings-color\n color: inherit;\n }\n\n // Provide class for links that match alerts\n .alert-link {\n font-weight: @alert-link-font-weight;\n }\n\n // Improve alignment and spacing of inner content\n > p,\n > ul {\n margin-bottom: 0;\n }\n\n > p + p {\n margin-top: 5px;\n }\n}\n\n// Dismissible alerts\n//\n// Expand the right padding and account for the close button's positioning.\n\n.alert-dismissable, // The misspelled .alert-dismissable was deprecated in 3.2.0.\n.alert-dismissible {\n padding-right: (@alert-padding + 20);\n\n // Adjust close link position\n .close {\n position: relative;\n top: -2px;\n right: -21px;\n color: inherit;\n }\n}\n\n// Alternate styles\n//\n// Generate contextual modifier classes for colorizing the alert.\n\n.alert-success {\n .alert-variant(@alert-success-bg; @alert-success-border; @alert-success-text);\n}\n\n.alert-info {\n .alert-variant(@alert-info-bg; @alert-info-border; @alert-info-text);\n}\n\n.alert-warning {\n .alert-variant(@alert-warning-bg; @alert-warning-border; @alert-warning-text);\n}\n\n.alert-danger {\n .alert-variant(@alert-danger-bg; @alert-danger-border; @alert-danger-text);\n}\n","// Alerts\n\n.alert-variant(@background; @border; @text-color) {\n background-color: @background;\n border-color: @border;\n color: @text-color;\n\n hr {\n border-top-color: darken(@border, 5%);\n }\n .alert-link {\n color: darken(@text-color, 10%);\n }\n}\n","//\n// Progress bars\n// --------------------------------------------------\n\n\n// Bar animations\n// -------------------------\n\n// WebKit\n@-webkit-keyframes progress-bar-stripes {\n from { background-position: 40px 0; }\n to { background-position: 0 0; }\n}\n\n// Spec and IE10+\n@keyframes progress-bar-stripes {\n from { background-position: 40px 0; }\n to { background-position: 0 0; }\n}\n\n\n// Bar itself\n// -------------------------\n\n// Outer container\n.progress {\n overflow: hidden;\n height: @line-height-computed;\n margin-bottom: @line-height-computed;\n background-color: @progress-bg;\n border-radius: @progress-border-radius;\n .box-shadow(inset 0 1px 2px rgba(0,0,0,.1));\n}\n\n// Bar of progress\n.progress-bar {\n float: left;\n width: 0%;\n height: 100%;\n font-size: @font-size-small;\n line-height: @line-height-computed;\n color: @progress-bar-color;\n text-align: center;\n background-color: @progress-bar-bg;\n .box-shadow(inset 0 -1px 0 rgba(0,0,0,.15));\n .transition(width .6s ease);\n}\n\n// Striped bars\n//\n// `.progress-striped .progress-bar` is deprecated as of v3.2.0 in favor of the\n// `.progress-bar-striped` class, which you just add to an existing\n// `.progress-bar`.\n.progress-striped .progress-bar,\n.progress-bar-striped {\n #gradient > .striped();\n background-size: 40px 40px;\n}\n\n// Call animation for the active one\n//\n// `.progress.active .progress-bar` is deprecated as of v3.2.0 in favor of the\n// `.progress-bar.active` approach.\n.progress.active .progress-bar,\n.progress-bar.active {\n .animation(progress-bar-stripes 2s linear infinite);\n}\n\n\n// Variations\n// -------------------------\n\n.progress-bar-success {\n .progress-bar-variant(@progress-bar-success-bg);\n}\n\n.progress-bar-info {\n .progress-bar-variant(@progress-bar-info-bg);\n}\n\n.progress-bar-warning {\n .progress-bar-variant(@progress-bar-warning-bg);\n}\n\n.progress-bar-danger {\n .progress-bar-variant(@progress-bar-danger-bg);\n}\n","// Gradients\n\n#gradient {\n\n // Horizontal gradient, from left to right\n //\n // Creates two color stops, start and end, by specifying a color and position for each color stop.\n // Color stops are not available in IE9 and below.\n .horizontal(@start-color: #555; @end-color: #333; @start-percent: 0%; @end-percent: 100%) {\n background-image: -webkit-linear-gradient(left, @start-color @start-percent, @end-color @end-percent); // Safari 5.1-6, Chrome 10+\n background-image: -o-linear-gradient(left, @start-color @start-percent, @end-color @end-percent); // Opera 12\n background-image: linear-gradient(to right, @start-color @start-percent, @end-color @end-percent); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+\n background-repeat: repeat-x;\n filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=1)\",argb(@start-color),argb(@end-color))); // IE9 and down\n }\n\n // Vertical gradient, from top to bottom\n //\n // Creates two color stops, start and end, by specifying a color and position for each color stop.\n // Color stops are not available in IE9 and below.\n .vertical(@start-color: #555; @end-color: #333; @start-percent: 0%; @end-percent: 100%) {\n background-image: -webkit-linear-gradient(top, @start-color @start-percent, @end-color @end-percent); // Safari 5.1-6, Chrome 10+\n background-image: -o-linear-gradient(top, @start-color @start-percent, @end-color @end-percent); // Opera 12\n background-image: linear-gradient(to bottom, @start-color @start-percent, @end-color @end-percent); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+\n background-repeat: repeat-x;\n filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)\",argb(@start-color),argb(@end-color))); // IE9 and down\n }\n\n .directional(@start-color: #555; @end-color: #333; @deg: 45deg) {\n background-repeat: repeat-x;\n background-image: -webkit-linear-gradient(@deg, @start-color, @end-color); // Safari 5.1-6, Chrome 10+\n background-image: -o-linear-gradient(@deg, @start-color, @end-color); // Opera 12\n background-image: linear-gradient(@deg, @start-color, @end-color); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+\n }\n .horizontal-three-colors(@start-color: #00b3ee; @mid-color: #7a43b6; @color-stop: 50%; @end-color: #c3325f) {\n background-image: -webkit-linear-gradient(left, @start-color, @mid-color @color-stop, @end-color);\n background-image: -o-linear-gradient(left, @start-color, @mid-color @color-stop, @end-color);\n background-image: linear-gradient(to right, @start-color, @mid-color @color-stop, @end-color);\n background-repeat: no-repeat;\n filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=1)\",argb(@start-color),argb(@end-color))); // IE9 and down, gets no color-stop at all for proper fallback\n }\n .vertical-three-colors(@start-color: #00b3ee; @mid-color: #7a43b6; @color-stop: 50%; @end-color: #c3325f) {\n background-image: -webkit-linear-gradient(@start-color, @mid-color @color-stop, @end-color);\n background-image: -o-linear-gradient(@start-color, @mid-color @color-stop, @end-color);\n background-image: linear-gradient(@start-color, @mid-color @color-stop, @end-color);\n background-repeat: no-repeat;\n filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)\",argb(@start-color),argb(@end-color))); // IE9 and down, gets no color-stop at all for proper fallback\n }\n .radial(@inner-color: #555; @outer-color: #333) {\n background-image: -webkit-radial-gradient(circle, @inner-color, @outer-color);\n background-image: radial-gradient(circle, @inner-color, @outer-color);\n background-repeat: no-repeat;\n }\n .striped(@color: rgba(255,255,255,.15); @angle: 45deg) {\n background-image: -webkit-linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent);\n background-image: -o-linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent);\n background-image: linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent);\n }\n}\n","// Progress bars\n\n.progress-bar-variant(@color) {\n background-color: @color;\n\n // Deprecated parent class requirement as of v3.2.0\n .progress-striped & {\n #gradient > .striped();\n }\n}\n",".media {\n // Proper spacing between instances of .media\n margin-top: 15px;\n\n &:first-child {\n margin-top: 0;\n }\n}\n\n.media,\n.media-body {\n zoom: 1;\n overflow: hidden;\n}\n\n.media-body {\n width: 10000px;\n}\n\n.media-object {\n display: block;\n}\n\n.media-right,\n.media > .pull-right {\n padding-left: 10px;\n}\n\n.media-left,\n.media > .pull-left {\n padding-right: 10px;\n}\n\n.media-left,\n.media-right,\n.media-body {\n display: table-cell;\n vertical-align: top;\n}\n\n.media-middle {\n vertical-align: middle;\n}\n\n.media-bottom {\n vertical-align: bottom;\n}\n\n// Reset margins on headings for tighter default spacing\n.media-heading {\n margin-top: 0;\n margin-bottom: 5px;\n}\n\n// Media list variation\n//\n// Undo default ul/ol styles\n.media-list {\n padding-left: 0;\n list-style: none;\n}\n","//\n// List groups\n// --------------------------------------------------\n\n\n// Base class\n//\n// Easily usable on <ul>, <ol>, or <div>.\n\n.list-group {\n // No need to set list-style: none; since .list-group-item is block level\n margin-bottom: 20px;\n padding-left: 0; // reset padding because ul and ol\n}\n\n\n// Individual list items\n//\n// Use on `li`s or `div`s within the `.list-group` parent.\n\n.list-group-item {\n position: relative;\n display: block;\n padding: 10px 15px;\n // Place the border on the list items and negative margin up for better styling\n margin-bottom: -1px;\n background-color: @list-group-bg;\n border: 1px solid @list-group-border;\n\n // Round the first and last items\n &:first-child {\n .border-top-radius(@list-group-border-radius);\n }\n &:last-child {\n margin-bottom: 0;\n .border-bottom-radius(@list-group-border-radius);\n }\n}\n\n\n// Linked list items\n//\n// Use anchor elements instead of `li`s or `div`s to create linked list items.\n// Includes an extra `.active` modifier class for showing selected items.\n\na.list-group-item {\n color: @list-group-link-color;\n\n .list-group-item-heading {\n color: @list-group-link-heading-color;\n }\n\n // Hover state\n &:hover,\n &:focus {\n text-decoration: none;\n color: @list-group-link-hover-color;\n background-color: @list-group-hover-bg;\n }\n}\n\n.list-group-item {\n // Disabled state\n &.disabled,\n &.disabled:hover,\n &.disabled:focus {\n background-color: @list-group-disabled-bg;\n color: @list-group-disabled-color;\n cursor: @cursor-disabled;\n\n // Force color to inherit for custom content\n .list-group-item-heading {\n color: inherit;\n }\n .list-group-item-text {\n color: @list-group-disabled-text-color;\n }\n }\n\n // Active class on item itself, not parent\n &.active,\n &.active:hover,\n &.active:focus {\n z-index: 2; // Place active items above their siblings for proper border styling\n color: @list-group-active-color;\n background-color: @list-group-active-bg;\n border-color: @list-group-active-border;\n\n // Force color to inherit for custom content\n .list-group-item-heading,\n .list-group-item-heading > small,\n .list-group-item-heading > .small {\n color: inherit;\n }\n .list-group-item-text {\n color: @list-group-active-text-color;\n }\n }\n}\n\n\n// Contextual variants\n//\n// Add modifier classes to change text and background color on individual items.\n// Organizationally, this must come after the `:hover` states.\n\n.list-group-item-variant(success; @state-success-bg; @state-success-text);\n.list-group-item-variant(info; @state-info-bg; @state-info-text);\n.list-group-item-variant(warning; @state-warning-bg; @state-warning-text);\n.list-group-item-variant(danger; @state-danger-bg; @state-danger-text);\n\n\n// Custom content options\n//\n// Extra classes for creating well-formatted content within `.list-group-item`s.\n\n.list-group-item-heading {\n margin-top: 0;\n margin-bottom: 5px;\n}\n.list-group-item-text {\n margin-bottom: 0;\n line-height: 1.3;\n}\n","// List Groups\n\n.list-group-item-variant(@state; @background; @color) {\n .list-group-item-@{state} {\n color: @color;\n background-color: @background;\n\n a& {\n color: @color;\n\n .list-group-item-heading {\n color: inherit;\n }\n\n &:hover,\n &:focus {\n color: @color;\n background-color: darken(@background, 5%);\n }\n &.active,\n &.active:hover,\n &.active:focus {\n color: #fff;\n background-color: @color;\n border-color: @color;\n }\n }\n }\n}\n","//\n// Panels\n// --------------------------------------------------\n\n\n// Base class\n.panel {\n margin-bottom: @line-height-computed;\n background-color: @panel-bg;\n border: 1px solid transparent;\n border-radius: @panel-border-radius;\n .box-shadow(0 1px 1px rgba(0,0,0,.05));\n}\n\n// Panel contents\n.panel-body {\n padding: @panel-body-padding;\n &:extend(.clearfix all);\n}\n\n// Optional heading\n.panel-heading {\n padding: @panel-heading-padding;\n border-bottom: 1px solid transparent;\n .border-top-radius((@panel-border-radius - 1));\n\n > .dropdown .dropdown-toggle {\n color: inherit;\n }\n}\n\n// Within heading, strip any `h*` tag of its default margins for spacing.\n.panel-title {\n margin-top: 0;\n margin-bottom: 0;\n font-size: ceil((@font-size-base * 1.125));\n color: inherit;\n\n > a,\n > small,\n > .small,\n > small > a,\n > .small > a {\n color: inherit;\n }\n}\n\n// Optional footer (stays gray in every modifier class)\n.panel-footer {\n padding: @panel-footer-padding;\n background-color: @panel-footer-bg;\n border-top: 1px solid @panel-inner-border;\n .border-bottom-radius((@panel-border-radius - 1));\n}\n\n\n// List groups in panels\n//\n// By default, space out list group content from panel headings to account for\n// any kind of custom content between the two.\n\n.panel {\n > .list-group,\n > .panel-collapse > .list-group {\n margin-bottom: 0;\n\n .list-group-item {\n border-width: 1px 0;\n border-radius: 0;\n }\n\n // Add border top radius for first one\n &:first-child {\n .list-group-item:first-child {\n border-top: 0;\n .border-top-radius((@panel-border-radius - 1));\n }\n }\n // Add border bottom radius for last one\n &:last-child {\n .list-group-item:last-child {\n border-bottom: 0;\n .border-bottom-radius((@panel-border-radius - 1));\n }\n }\n }\n}\n// Collapse space between when there's no additional content.\n.panel-heading + .list-group {\n .list-group-item:first-child {\n border-top-width: 0;\n }\n}\n.list-group + .panel-footer {\n border-top-width: 0;\n}\n\n// Tables in panels\n//\n// Place a non-bordered `.table` within a panel (not within a `.panel-body`) and\n// watch it go full width.\n\n.panel {\n > .table,\n > .table-responsive > .table,\n > .panel-collapse > .table {\n margin-bottom: 0;\n\n caption {\n padding-left: @panel-body-padding;\n padding-right: @panel-body-padding;\n }\n }\n // Add border top radius for first one\n > .table:first-child,\n > .table-responsive:first-child > .table:first-child {\n .border-top-radius((@panel-border-radius - 1));\n\n > thead:first-child,\n > tbody:first-child {\n > tr:first-child {\n border-top-left-radius: (@panel-border-radius - 1);\n border-top-right-radius: (@panel-border-radius - 1);\n\n td:first-child,\n th:first-child {\n border-top-left-radius: (@panel-border-radius - 1);\n }\n td:last-child,\n th:last-child {\n border-top-right-radius: (@panel-border-radius - 1);\n }\n }\n }\n }\n // Add border bottom radius for last one\n > .table:last-child,\n > .table-responsive:last-child > .table:last-child {\n .border-bottom-radius((@panel-border-radius - 1));\n\n > tbody:last-child,\n > tfoot:last-child {\n > tr:last-child {\n border-bottom-left-radius: (@panel-border-radius - 1);\n border-bottom-right-radius: (@panel-border-radius - 1);\n\n td:first-child,\n th:first-child {\n border-bottom-left-radius: (@panel-border-radius - 1);\n }\n td:last-child,\n th:last-child {\n border-bottom-right-radius: (@panel-border-radius - 1);\n }\n }\n }\n }\n > .panel-body + .table,\n > .panel-body + .table-responsive,\n > .table + .panel-body,\n > .table-responsive + .panel-body {\n border-top: 1px solid @table-border-color;\n }\n > .table > tbody:first-child > tr:first-child th,\n > .table > tbody:first-child > tr:first-child td {\n border-top: 0;\n }\n > .table-bordered,\n > .table-responsive > .table-bordered {\n border: 0;\n > thead,\n > tbody,\n > tfoot {\n > tr {\n > th:first-child,\n > td:first-child {\n border-left: 0;\n }\n > th:last-child,\n > td:last-child {\n border-right: 0;\n }\n }\n }\n > thead,\n > tbody {\n > tr:first-child {\n > td,\n > th {\n border-bottom: 0;\n }\n }\n }\n > tbody,\n > tfoot {\n > tr:last-child {\n > td,\n > th {\n border-bottom: 0;\n }\n }\n }\n }\n > .table-responsive {\n border: 0;\n margin-bottom: 0;\n }\n}\n\n\n// Collapsable panels (aka, accordion)\n//\n// Wrap a series of panels in `.panel-group` to turn them into an accordion with\n// the help of our collapse JavaScript plugin.\n\n.panel-group {\n margin-bottom: @line-height-computed;\n\n // Tighten up margin so it's only between panels\n .panel {\n margin-bottom: 0;\n border-radius: @panel-border-radius;\n\n + .panel {\n margin-top: 5px;\n }\n }\n\n .panel-heading {\n border-bottom: 0;\n\n + .panel-collapse > .panel-body,\n + .panel-collapse > .list-group {\n border-top: 1px solid @panel-inner-border;\n }\n }\n\n .panel-footer {\n border-top: 0;\n + .panel-collapse .panel-body {\n border-bottom: 1px solid @panel-inner-border;\n }\n }\n}\n\n\n// Contextual variations\n.panel-default {\n .panel-variant(@panel-default-border; @panel-default-text; @panel-default-heading-bg; @panel-default-border);\n}\n.panel-primary {\n .panel-variant(@panel-primary-border; @panel-primary-text; @panel-primary-heading-bg; @panel-primary-border);\n}\n.panel-success {\n .panel-variant(@panel-success-border; @panel-success-text; @panel-success-heading-bg; @panel-success-border);\n}\n.panel-info {\n .panel-variant(@panel-info-border; @panel-info-text; @panel-info-heading-bg; @panel-info-border);\n}\n.panel-warning {\n .panel-variant(@panel-warning-border; @panel-warning-text; @panel-warning-heading-bg; @panel-warning-border);\n}\n.panel-danger {\n .panel-variant(@panel-danger-border; @panel-danger-text; @panel-danger-heading-bg; @panel-danger-border);\n}\n","// Panels\n\n.panel-variant(@border; @heading-text-color; @heading-bg-color; @heading-border) {\n border-color: @border;\n\n & > .panel-heading {\n color: @heading-text-color;\n background-color: @heading-bg-color;\n border-color: @heading-border;\n\n + .panel-collapse > .panel-body {\n border-top-color: @border;\n }\n .badge {\n color: @heading-bg-color;\n background-color: @heading-text-color;\n }\n }\n & > .panel-footer {\n + .panel-collapse > .panel-body {\n border-bottom-color: @border;\n }\n }\n}\n","// Embeds responsive\n//\n// Credit: Nicolas Gallagher and SUIT CSS.\n\n.embed-responsive {\n position: relative;\n display: block;\n height: 0;\n padding: 0;\n overflow: hidden;\n\n .embed-responsive-item,\n iframe,\n embed,\n object,\n video {\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n height: 100%;\n width: 100%;\n border: 0;\n }\n}\n\n// Modifier class for 16:9 aspect ratio\n.embed-responsive-16by9 {\n padding-bottom: 56.25%;\n}\n\n// Modifier class for 4:3 aspect ratio\n.embed-responsive-4by3 {\n padding-bottom: 75%;\n}\n","//\n// Wells\n// --------------------------------------------------\n\n\n// Base class\n.well {\n min-height: 20px;\n padding: 19px;\n margin-bottom: 20px;\n background-color: @well-bg;\n border: 1px solid @well-border;\n border-radius: @border-radius-base;\n .box-shadow(inset 0 1px 1px rgba(0,0,0,.05));\n blockquote {\n border-color: #ddd;\n border-color: rgba(0,0,0,.15);\n }\n}\n\n// Sizes\n.well-lg {\n padding: 24px;\n border-radius: @border-radius-large;\n}\n.well-sm {\n padding: 9px;\n border-radius: @border-radius-small;\n}\n","//\n// Close icons\n// --------------------------------------------------\n\n\n.close {\n float: right;\n font-size: (@font-size-base * 1.5);\n font-weight: @close-font-weight;\n line-height: 1;\n color: @close-color;\n text-shadow: @close-text-shadow;\n .opacity(.2);\n\n &:hover,\n &:focus {\n color: @close-color;\n text-decoration: none;\n cursor: pointer;\n .opacity(.5);\n }\n\n // Additional properties for button version\n // iOS requires the button element instead of an anchor tag.\n // If you want the anchor version, it requires `href=\"#\"`.\n // See https://developer.mozilla.org/en-US/docs/Web/Events/click#Safari_Mobile\n button& {\n padding: 0;\n cursor: pointer;\n background: transparent;\n border: 0;\n -webkit-appearance: none;\n }\n}\n","//\n// Modals\n// --------------------------------------------------\n\n// .modal-open - body class for killing the scroll\n// .modal - container to scroll within\n// .modal-dialog - positioning shell for the actual modal\n// .modal-content - actual modal w/ bg and corners and shit\n\n// Kill the scroll on the body\n.modal-open {\n overflow: hidden;\n}\n\n// Container that the modal scrolls within\n.modal {\n display: none;\n overflow: hidden;\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: @zindex-modal;\n -webkit-overflow-scrolling: touch;\n\n // Prevent Chrome on Windows from adding a focus outline. For details, see\n // https://github.com/twbs/bootstrap/pull/10951.\n outline: 0;\n\n // When fading in the modal, animate it to slide down\n &.fade .modal-dialog {\n .translate(0, -25%);\n .transition-transform(~\"0.3s ease-out\");\n }\n &.in .modal-dialog { .translate(0, 0) }\n}\n.modal-open .modal {\n overflow-x: hidden;\n overflow-y: auto;\n}\n\n// Shell div to position the modal with bottom padding\n.modal-dialog {\n position: relative;\n width: auto;\n margin: 10px;\n}\n\n// Actual modal\n.modal-content {\n position: relative;\n background-color: @modal-content-bg;\n border: 1px solid @modal-content-fallback-border-color; //old browsers fallback (ie8 etc)\n border: 1px solid @modal-content-border-color;\n border-radius: @border-radius-large;\n .box-shadow(0 3px 9px rgba(0,0,0,.5));\n background-clip: padding-box;\n // Remove focus outline from opened modal\n outline: 0;\n}\n\n// Modal background\n.modal-backdrop {\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: @zindex-modal-background;\n background-color: @modal-backdrop-bg;\n // Fade for backdrop\n &.fade { .opacity(0); }\n &.in { .opacity(@modal-backdrop-opacity); }\n}\n\n// Modal header\n// Top section of the modal w/ title and dismiss\n.modal-header {\n padding: @modal-title-padding;\n border-bottom: 1px solid @modal-header-border-color;\n min-height: (@modal-title-padding + @modal-title-line-height);\n}\n// Close icon\n.modal-header .close {\n margin-top: -2px;\n}\n\n// Title text within header\n.modal-title {\n margin: 0;\n line-height: @modal-title-line-height;\n}\n\n// Modal body\n// Where all modal content resides (sibling of .modal-header and .modal-footer)\n.modal-body {\n position: relative;\n padding: @modal-inner-padding;\n}\n\n// Footer (for actions)\n.modal-footer {\n padding: @modal-inner-padding;\n text-align: right; // right align buttons\n border-top: 1px solid @modal-footer-border-color;\n &:extend(.clearfix all); // clear it in case folks use .pull-* classes on buttons\n\n // Properly space out buttons\n .btn + .btn {\n margin-left: 5px;\n margin-bottom: 0; // account for input[type=\"submit\"] which gets the bottom margin like all other inputs\n }\n // but override that for button groups\n .btn-group .btn + .btn {\n margin-left: -1px;\n }\n // and override it for block buttons as well\n .btn-block + .btn-block {\n margin-left: 0;\n }\n}\n\n// Measure scrollbar width for padding body during modal show/hide\n.modal-scrollbar-measure {\n position: absolute;\n top: -9999px;\n width: 50px;\n height: 50px;\n overflow: scroll;\n}\n\n// Scale up the modal\n@media (min-width: @screen-sm-min) {\n // Automatically set modal's width for larger viewports\n .modal-dialog {\n width: @modal-md;\n margin: 30px auto;\n }\n .modal-content {\n .box-shadow(0 5px 15px rgba(0,0,0,.5));\n }\n\n // Modal sizes\n .modal-sm { width: @modal-sm; }\n}\n\n@media (min-width: @screen-md-min) {\n .modal-lg { width: @modal-lg; }\n}\n","//\n// Tooltips\n// --------------------------------------------------\n\n\n// Base class\n.tooltip {\n position: absolute;\n z-index: @zindex-tooltip;\n display: block;\n // Reset font and text properties given new insertion method\n font-family: @font-family-base;\n font-size: @font-size-small;\n font-weight: normal;\n line-height: 1.4;\n .opacity(0);\n\n &.in { .opacity(@tooltip-opacity); }\n &.top { margin-top: -3px; padding: @tooltip-arrow-width 0; }\n &.right { margin-left: 3px; padding: 0 @tooltip-arrow-width; }\n &.bottom { margin-top: 3px; padding: @tooltip-arrow-width 0; }\n &.left { margin-left: -3px; padding: 0 @tooltip-arrow-width; }\n}\n\n// Wrapper for the tooltip content\n.tooltip-inner {\n max-width: @tooltip-max-width;\n padding: 3px 8px;\n color: @tooltip-color;\n text-align: center;\n text-decoration: none;\n background-color: @tooltip-bg;\n border-radius: @border-radius-base;\n}\n\n// Arrows\n.tooltip-arrow {\n position: absolute;\n width: 0;\n height: 0;\n border-color: transparent;\n border-style: solid;\n}\n// Note: Deprecated .top-left, .top-right, .bottom-left, and .bottom-right as of v3.3.1\n.tooltip {\n &.top .tooltip-arrow {\n bottom: 0;\n left: 50%;\n margin-left: -@tooltip-arrow-width;\n border-width: @tooltip-arrow-width @tooltip-arrow-width 0;\n border-top-color: @tooltip-arrow-color;\n }\n &.top-left .tooltip-arrow {\n bottom: 0;\n right: @tooltip-arrow-width;\n margin-bottom: -@tooltip-arrow-width;\n border-width: @tooltip-arrow-width @tooltip-arrow-width 0;\n border-top-color: @tooltip-arrow-color;\n }\n &.top-right .tooltip-arrow {\n bottom: 0;\n left: @tooltip-arrow-width;\n margin-bottom: -@tooltip-arrow-width;\n border-width: @tooltip-arrow-width @tooltip-arrow-width 0;\n border-top-color: @tooltip-arrow-color;\n }\n &.right .tooltip-arrow {\n top: 50%;\n left: 0;\n margin-top: -@tooltip-arrow-width;\n border-width: @tooltip-arrow-width @tooltip-arrow-width @tooltip-arrow-width 0;\n border-right-color: @tooltip-arrow-color;\n }\n &.left .tooltip-arrow {\n top: 50%;\n right: 0;\n margin-top: -@tooltip-arrow-width;\n border-width: @tooltip-arrow-width 0 @tooltip-arrow-width @tooltip-arrow-width;\n border-left-color: @tooltip-arrow-color;\n }\n &.bottom .tooltip-arrow {\n top: 0;\n left: 50%;\n margin-left: -@tooltip-arrow-width;\n border-width: 0 @tooltip-arrow-width @tooltip-arrow-width;\n border-bottom-color: @tooltip-arrow-color;\n }\n &.bottom-left .tooltip-arrow {\n top: 0;\n right: @tooltip-arrow-width;\n margin-top: -@tooltip-arrow-width;\n border-width: 0 @tooltip-arrow-width @tooltip-arrow-width;\n border-bottom-color: @tooltip-arrow-color;\n }\n &.bottom-right .tooltip-arrow {\n top: 0;\n left: @tooltip-arrow-width;\n margin-top: -@tooltip-arrow-width;\n border-width: 0 @tooltip-arrow-width @tooltip-arrow-width;\n border-bottom-color: @tooltip-arrow-color;\n }\n}\n","//\n// Popovers\n// --------------------------------------------------\n\n\n.popover {\n position: absolute;\n top: 0;\n left: 0;\n z-index: @zindex-popover;\n display: none;\n max-width: @popover-max-width;\n padding: 1px;\n // Reset font and text properties given new insertion method\n font-family: @font-family-base;\n font-size: @font-size-base;\n font-weight: normal;\n line-height: @line-height-base;\n text-align: left;\n background-color: @popover-bg;\n background-clip: padding-box;\n border: 1px solid @popover-fallback-border-color;\n border: 1px solid @popover-border-color;\n border-radius: @border-radius-large;\n .box-shadow(0 5px 10px rgba(0,0,0,.2));\n\n // Overrides for proper insertion\n white-space: normal;\n\n // Offset the popover to account for the popover arrow\n &.top { margin-top: -@popover-arrow-width; }\n &.right { margin-left: @popover-arrow-width; }\n &.bottom { margin-top: @popover-arrow-width; }\n &.left { margin-left: -@popover-arrow-width; }\n}\n\n.popover-title {\n margin: 0; // reset heading margin\n padding: 8px 14px;\n font-size: @font-size-base;\n background-color: @popover-title-bg;\n border-bottom: 1px solid darken(@popover-title-bg, 5%);\n border-radius: (@border-radius-large - 1) (@border-radius-large - 1) 0 0;\n}\n\n.popover-content {\n padding: 9px 14px;\n}\n\n// Arrows\n//\n// .arrow is outer, .arrow:after is inner\n\n.popover > .arrow {\n &,\n &:after {\n position: absolute;\n display: block;\n width: 0;\n height: 0;\n border-color: transparent;\n border-style: solid;\n }\n}\n.popover > .arrow {\n border-width: @popover-arrow-outer-width;\n}\n.popover > .arrow:after {\n border-width: @popover-arrow-width;\n content: \"\";\n}\n\n.popover {\n &.top > .arrow {\n left: 50%;\n margin-left: -@popover-arrow-outer-width;\n border-bottom-width: 0;\n border-top-color: @popover-arrow-outer-fallback-color; // IE8 fallback\n border-top-color: @popover-arrow-outer-color;\n bottom: -@popover-arrow-outer-width;\n &:after {\n content: \" \";\n bottom: 1px;\n margin-left: -@popover-arrow-width;\n border-bottom-width: 0;\n border-top-color: @popover-arrow-color;\n }\n }\n &.right > .arrow {\n top: 50%;\n left: -@popover-arrow-outer-width;\n margin-top: -@popover-arrow-outer-width;\n border-left-width: 0;\n border-right-color: @popover-arrow-outer-fallback-color; // IE8 fallback\n border-right-color: @popover-arrow-outer-color;\n &:after {\n content: \" \";\n left: 1px;\n bottom: -@popover-arrow-width;\n border-left-width: 0;\n border-right-color: @popover-arrow-color;\n }\n }\n &.bottom > .arrow {\n left: 50%;\n margin-left: -@popover-arrow-outer-width;\n border-top-width: 0;\n border-bottom-color: @popover-arrow-outer-fallback-color; // IE8 fallback\n border-bottom-color: @popover-arrow-outer-color;\n top: -@popover-arrow-outer-width;\n &:after {\n content: \" \";\n top: 1px;\n margin-left: -@popover-arrow-width;\n border-top-width: 0;\n border-bottom-color: @popover-arrow-color;\n }\n }\n\n &.left > .arrow {\n top: 50%;\n right: -@popover-arrow-outer-width;\n margin-top: -@popover-arrow-outer-width;\n border-right-width: 0;\n border-left-color: @popover-arrow-outer-fallback-color; // IE8 fallback\n border-left-color: @popover-arrow-outer-color;\n &:after {\n content: \" \";\n right: 1px;\n border-right-width: 0;\n border-left-color: @popover-arrow-color;\n bottom: -@popover-arrow-width;\n }\n }\n}\n","//\n// Carousel\n// --------------------------------------------------\n\n\n// Wrapper for the slide container and indicators\n.carousel {\n position: relative;\n}\n\n.carousel-inner {\n position: relative;\n overflow: hidden;\n width: 100%;\n\n > .item {\n display: none;\n position: relative;\n .transition(.6s ease-in-out left);\n\n // Account for jankitude on images\n > img,\n > a > img {\n &:extend(.img-responsive);\n line-height: 1;\n }\n\n // WebKit CSS3 transforms for supported devices\n @media all and (transform-3d), (-webkit-transform-3d) {\n .transition-transform(~'0.6s ease-in-out');\n .backface-visibility(~'hidden');\n .perspective(1000);\n\n &.next,\n &.active.right {\n .translate3d(100%, 0, 0);\n left: 0;\n }\n &.prev,\n &.active.left {\n .translate3d(-100%, 0, 0);\n left: 0;\n }\n &.next.left,\n &.prev.right,\n &.active {\n .translate3d(0, 0, 0);\n left: 0;\n }\n }\n }\n\n > .active,\n > .next,\n > .prev {\n display: block;\n }\n\n > .active {\n left: 0;\n }\n\n > .next,\n > .prev {\n position: absolute;\n top: 0;\n width: 100%;\n }\n\n > .next {\n left: 100%;\n }\n > .prev {\n left: -100%;\n }\n > .next.left,\n > .prev.right {\n left: 0;\n }\n\n > .active.left {\n left: -100%;\n }\n > .active.right {\n left: 100%;\n }\n\n}\n\n// Left/right controls for nav\n// ---------------------------\n\n.carousel-control {\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n width: @carousel-control-width;\n .opacity(@carousel-control-opacity);\n font-size: @carousel-control-font-size;\n color: @carousel-control-color;\n text-align: center;\n text-shadow: @carousel-text-shadow;\n // We can't have this transition here because WebKit cancels the carousel\n // animation if you trip this while in the middle of another animation.\n\n // Set gradients for backgrounds\n &.left {\n #gradient > .horizontal(@start-color: rgba(0,0,0,.5); @end-color: rgba(0,0,0,.0001));\n }\n &.right {\n left: auto;\n right: 0;\n #gradient > .horizontal(@start-color: rgba(0,0,0,.0001); @end-color: rgba(0,0,0,.5));\n }\n\n // Hover/focus state\n &:hover,\n &:focus {\n outline: 0;\n color: @carousel-control-color;\n text-decoration: none;\n .opacity(.9);\n }\n\n // Toggles\n .icon-prev,\n .icon-next,\n .glyphicon-chevron-left,\n .glyphicon-chevron-right {\n position: absolute;\n top: 50%;\n z-index: 5;\n display: inline-block;\n }\n .icon-prev,\n .glyphicon-chevron-left {\n left: 50%;\n margin-left: -10px;\n }\n .icon-next,\n .glyphicon-chevron-right {\n right: 50%;\n margin-right: -10px;\n }\n .icon-prev,\n .icon-next {\n width: 20px;\n height: 20px;\n margin-top: -10px;\n line-height: 1;\n font-family: serif;\n }\n\n\n .icon-prev {\n &:before {\n content: '\\2039';// SINGLE LEFT-POINTING ANGLE QUOTATION MARK (U+2039)\n }\n }\n .icon-next {\n &:before {\n content: '\\203a';// SINGLE RIGHT-POINTING ANGLE QUOTATION MARK (U+203A)\n }\n }\n}\n\n// Optional indicator pips\n//\n// Add an unordered list with the following class and add a list item for each\n// slide your carousel holds.\n\n.carousel-indicators {\n position: absolute;\n bottom: 10px;\n left: 50%;\n z-index: 15;\n width: 60%;\n margin-left: -30%;\n padding-left: 0;\n list-style: none;\n text-align: center;\n\n li {\n display: inline-block;\n width: 10px;\n height: 10px;\n margin: 1px;\n text-indent: -999px;\n border: 1px solid @carousel-indicator-border-color;\n border-radius: 10px;\n cursor: pointer;\n\n // IE8-9 hack for event handling\n //\n // Internet Explorer 8-9 does not support clicks on elements without a set\n // `background-color`. We cannot use `filter` since that's not viewed as a\n // background color by the browser. Thus, a hack is needed.\n // See https://developer.mozilla.org/en-US/docs/Web/Events/click#Internet_Explorer\n //\n // For IE8, we set solid black as it doesn't support `rgba()`. For IE9, we\n // set alpha transparency for the best results possible.\n background-color: #000 \\9; // IE8\n background-color: rgba(0,0,0,0); // IE9\n }\n .active {\n margin: 0;\n width: 12px;\n height: 12px;\n background-color: @carousel-indicator-active-bg;\n }\n}\n\n// Optional captions\n// -----------------------------\n// Hidden by default for smaller viewports\n.carousel-caption {\n position: absolute;\n left: 15%;\n right: 15%;\n bottom: 20px;\n z-index: 10;\n padding-top: 20px;\n padding-bottom: 20px;\n color: @carousel-caption-color;\n text-align: center;\n text-shadow: @carousel-text-shadow;\n & .btn {\n text-shadow: none; // No shadow for button elements in carousel-caption\n }\n}\n\n\n// Scale up controls for tablets and up\n@media screen and (min-width: @screen-sm-min) {\n\n // Scale up the controls a smidge\n .carousel-control {\n .glyphicon-chevron-left,\n .glyphicon-chevron-right,\n .icon-prev,\n .icon-next {\n width: 30px;\n height: 30px;\n margin-top: -15px;\n font-size: 30px;\n }\n .glyphicon-chevron-left,\n .icon-prev {\n margin-left: -15px;\n }\n .glyphicon-chevron-right,\n .icon-next {\n margin-right: -15px;\n }\n }\n\n // Show and left align the captions\n .carousel-caption {\n left: 20%;\n right: 20%;\n padding-bottom: 30px;\n }\n\n // Move up the indicators\n .carousel-indicators {\n bottom: 20px;\n }\n}\n","// Clearfix\n//\n// For modern browsers\n// 1. The space content is one way to avoid an Opera bug when the\n// contenteditable attribute is included anywhere else in the document.\n// Otherwise it causes space to appear at the top and bottom of elements\n// that are clearfixed.\n// 2. The use of `table` rather than `block` is only necessary if using\n// `:before` to contain the top-margins of child elements.\n//\n// Source: http://nicolasgallagher.com/micro-clearfix-hack/\n\n.clearfix() {\n &:before,\n &:after {\n content: \" \"; // 1\n display: table; // 2\n }\n &:after {\n clear: both;\n }\n}\n","// Center-align a block level element\n\n.center-block() {\n display: block;\n margin-left: auto;\n margin-right: auto;\n}\n","// CSS image replacement\n//\n// Heads up! v3 launched with with only `.hide-text()`, but per our pattern for\n// mixins being reused as classes with the same name, this doesn't hold up. As\n// of v3.0.1 we have added `.text-hide()` and deprecated `.hide-text()`.\n//\n// Source: https://github.com/h5bp/html5-boilerplate/commit/aa0396eae757\n\n// Deprecated as of v3.0.1 (will be removed in v4)\n.hide-text() {\n font: ~\"0/0\" a;\n color: transparent;\n text-shadow: none;\n background-color: transparent;\n border: 0;\n}\n\n// New mixin to use as of v3.0.1\n.text-hide() {\n .hide-text();\n}\n","//\n// Responsive: Utility classes\n// --------------------------------------------------\n\n\n// IE10 in Windows (Phone) 8\n//\n// Support for responsive views via media queries is kind of borked in IE10, for\n// Surface/desktop in split view and for Windows Phone 8. This particular fix\n// must be accompanied by a snippet of JavaScript to sniff the user agent and\n// apply some conditional CSS to *only* the Surface/desktop Windows 8. Look at\n// our Getting Started page for more information on this bug.\n//\n// For more information, see the following:\n//\n// Issue: https://github.com/twbs/bootstrap/issues/10497\n// Docs: http://getbootstrap.com/getting-started/#support-ie10-width\n// Source: http://timkadlec.com/2013/01/windows-phone-8-and-device-width/\n// Source: http://timkadlec.com/2012/10/ie10-snap-mode-and-responsive-design/\n\n@-ms-viewport {\n width: device-width;\n}\n\n\n// Visibility utilities\n// Note: Deprecated .visible-xs, .visible-sm, .visible-md, and .visible-lg as of v3.2.0\n.visible-xs,\n.visible-sm,\n.visible-md,\n.visible-lg {\n .responsive-invisibility();\n}\n\n.visible-xs-block,\n.visible-xs-inline,\n.visible-xs-inline-block,\n.visible-sm-block,\n.visible-sm-inline,\n.visible-sm-inline-block,\n.visible-md-block,\n.visible-md-inline,\n.visible-md-inline-block,\n.visible-lg-block,\n.visible-lg-inline,\n.visible-lg-inline-block {\n display: none !important;\n}\n\n.visible-xs {\n @media (max-width: @screen-xs-max) {\n .responsive-visibility();\n }\n}\n.visible-xs-block {\n @media (max-width: @screen-xs-max) {\n display: block !important;\n }\n}\n.visible-xs-inline {\n @media (max-width: @screen-xs-max) {\n display: inline !important;\n }\n}\n.visible-xs-inline-block {\n @media (max-width: @screen-xs-max) {\n display: inline-block !important;\n }\n}\n\n.visible-sm {\n @media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) {\n .responsive-visibility();\n }\n}\n.visible-sm-block {\n @media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) {\n display: block !important;\n }\n}\n.visible-sm-inline {\n @media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) {\n display: inline !important;\n }\n}\n.visible-sm-inline-block {\n @media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) {\n display: inline-block !important;\n }\n}\n\n.visible-md {\n @media (min-width: @screen-md-min) and (max-width: @screen-md-max) {\n .responsive-visibility();\n }\n}\n.visible-md-block {\n @media (min-width: @screen-md-min) and (max-width: @screen-md-max) {\n display: block !important;\n }\n}\n.visible-md-inline {\n @media (min-width: @screen-md-min) and (max-width: @screen-md-max) {\n display: inline !important;\n }\n}\n.visible-md-inline-block {\n @media (min-width: @screen-md-min) and (max-width: @screen-md-max) {\n display: inline-block !important;\n }\n}\n\n.visible-lg {\n @media (min-width: @screen-lg-min) {\n .responsive-visibility();\n }\n}\n.visible-lg-block {\n @media (min-width: @screen-lg-min) {\n display: block !important;\n }\n}\n.visible-lg-inline {\n @media (min-width: @screen-lg-min) {\n display: inline !important;\n }\n}\n.visible-lg-inline-block {\n @media (min-width: @screen-lg-min) {\n display: inline-block !important;\n }\n}\n\n.hidden-xs {\n @media (max-width: @screen-xs-max) {\n .responsive-invisibility();\n }\n}\n.hidden-sm {\n @media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) {\n .responsive-invisibility();\n }\n}\n.hidden-md {\n @media (min-width: @screen-md-min) and (max-width: @screen-md-max) {\n .responsive-invisibility();\n }\n}\n.hidden-lg {\n @media (min-width: @screen-lg-min) {\n .responsive-invisibility();\n }\n}\n\n\n// Print utilities\n//\n// Media queries are placed on the inside to be mixin-friendly.\n\n// Note: Deprecated .visible-print as of v3.2.0\n.visible-print {\n .responsive-invisibility();\n\n @media print {\n .responsive-visibility();\n }\n}\n.visible-print-block {\n display: none !important;\n\n @media print {\n display: block !important;\n }\n}\n.visible-print-inline {\n display: none !important;\n\n @media print {\n display: inline !important;\n }\n}\n.visible-print-inline-block {\n display: none !important;\n\n @media print {\n display: inline-block !important;\n }\n}\n\n.hidden-print {\n @media print {\n .responsive-invisibility();\n }\n}\n","// Responsive utilities\n\n//\n// More easily include all the states for responsive-utilities.less.\n.responsive-visibility() {\n display: block !important;\n table& { display: table; }\n tr& { display: table-row !important; }\n th&,\n td& { display: table-cell !important; }\n}\n\n.responsive-invisibility() {\n display: none !important;\n}\n"]}
\ No newline at end of file
diff --git a/applications/auto-scale/gui/src/vendor/bootstrap-css/css/bootstrap.min.css b/applications/auto-scale/gui/src/vendor/bootstrap-css/css/bootstrap.min.css
deleted file mode 100644
index cd1c616..0000000
--- a/applications/auto-scale/gui/src/vendor/bootstrap-css/css/bootstrap.min.css
+++ /dev/null
@@ -1,5 +0,0 @@
-/*!
- * Bootstrap v3.3.4 (http://getbootstrap.com)
- * Copyright 2011-2015 Twitter, Inc.
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
- *//*! normalize.css v3.0.2 | MIT License | git.io/normalize */html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}h1{margin:.67em 0;font-size:2em}mark{color:#000;background:#ff0}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{height:0;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{margin:0;font:inherit;color:inherit}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0}input{line-height:normal}input[type=checkbox],input[type=radio]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;-webkit-appearance:textfield}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}fieldset{padding:.35em .625em .75em;margin:0 2px;border:1px solid silver}legend{padding:0;border:0}textarea{overflow:auto}optgroup{font-weight:700}table{border-spacing:0;border-collapse:collapse}td,th{padding:0}/*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */@media print{*,:after,:before{color:#000!important;text-shadow:none!important;background:0 0!important;-webkit-box-shadow:none!important;box-shadow:none!important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}a[href^="javascript:"]:after,a[href^="#"]:after{content:""}blockquote,pre{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}img,tr{page-break-inside:avoid}img{max-width:100%!important}h2,h3,p{orphans:3;widows:3}h2,h3{page-break-after:avoid}select{background:#fff!important}.navbar{display:none}.btn>.caret,.dropup>.btn>.caret{border-top-color:#000!important}.label{border:1px solid #000}.table{border-collapse:collapse!important}.table td,.table th{background-color:#fff!important}.table-bordered td,.table-bordered th{border:1px solid #ddd!important}}@font-face{font-family:'Glyphicons Halflings';src:url(../fonts/glyphicons-halflings-regular.eot);src:url(../fonts/glyphicons-halflings-regular.eot?#iefix) format('embedded-opentype'),url(../fonts/glyphicons-halflings-regular.woff2) format('woff2'),url(../fonts/glyphicons-halflings-regular.woff) format('woff'),url(../fonts/glyphicons-halflings-regular.ttf) format('truetype'),url(../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular) format('svg')}.glyphicon{position:relative;top:1px;display:inline-block;font-family:'Glyphicons Halflings';font-style:normal;font-weight:400;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.glyphicon-asterisk:before{content:"\2a"}.glyphicon-plus:before{content:"\2b"}.glyphicon-eur:before,.glyphicon-euro:before{content:"\20ac"}.glyphicon-minus:before{content:"\2212"}.glyphicon-cloud:before{content:"\2601"}.glyphicon-envelope:before{content:"\2709"}.glyphicon-pencil:before{content:"\270f"}.glyphicon-glass:before{content:"\e001"}.glyphicon-music:before{content:"\e002"}.glyphicon-search:before{content:"\e003"}.glyphicon-heart:before{content:"\e005"}.glyphicon-star:before{content:"\e006"}.glyphicon-star-empty:before{content:"\e007"}.glyphicon-user:before{content:"\e008"}.glyphicon-film:before{content:"\e009"}.glyphicon-th-large:before{content:"\e010"}.glyphicon-th:before{content:"\e011"}.glyphicon-th-list:before{content:"\e012"}.glyphicon-ok:before{content:"\e013"}.glyphicon-remove:before{content:"\e014"}.glyphicon-zoom-in:before{content:"\e015"}.glyphicon-zoom-out:before{content:"\e016"}.glyphicon-off:before{content:"\e017"}.glyphicon-signal:before{content:"\e018"}.glyphicon-cog:before{content:"\e019"}.glyphicon-trash:before{content:"\e020"}.glyphicon-home:before{content:"\e021"}.glyphicon-file:before{content:"\e022"}.glyphicon-time:before{content:"\e023"}.glyphicon-road:before{content:"\e024"}.glyphicon-download-alt:before{content:"\e025"}.glyphicon-download:before{content:"\e026"}.glyphicon-upload:before{content:"\e027"}.glyphicon-inbox:before{content:"\e028"}.glyphicon-play-circle:before{content:"\e029"}.glyphicon-repeat:before{content:"\e030"}.glyphicon-refresh:before{content:"\e031"}.glyphicon-list-alt:before{content:"\e032"}.glyphicon-lock:before{content:"\e033"}.glyphicon-flag:before{content:"\e034"}.glyphicon-headphones:before{content:"\e035"}.glyphicon-volume-off:before{content:"\e036"}.glyphicon-volume-down:before{content:"\e037"}.glyphicon-volume-up:before{content:"\e038"}.glyphicon-qrcode:before{content:"\e039"}.glyphicon-barcode:before{content:"\e040"}.glyphicon-tag:before{content:"\e041"}.glyphicon-tags:before{content:"\e042"}.glyphicon-book:before{content:"\e043"}.glyphicon-bookmark:before{content:"\e044"}.glyphicon-print:before{content:"\e045"}.glyphicon-camera:before{content:"\e046"}.glyphicon-font:before{content:"\e047"}.glyphicon-bold:before{content:"\e048"}.glyphicon-italic:before{content:"\e049"}.glyphicon-text-height:before{content:"\e050"}.glyphicon-text-width:before{content:"\e051"}.glyphicon-align-left:before{content:"\e052"}.glyphicon-align-center:before{content:"\e053"}.glyphicon-align-right:before{content:"\e054"}.glyphicon-align-justify:before{content:"\e055"}.glyphicon-list:before{content:"\e056"}.glyphicon-indent-left:before{content:"\e057"}.glyphicon-indent-right:before{content:"\e058"}.glyphicon-facetime-video:before{content:"\e059"}.glyphicon-picture:before{content:"\e060"}.glyphicon-map-marker:before{content:"\e062"}.glyphicon-adjust:before{content:"\e063"}.glyphicon-tint:before{content:"\e064"}.glyphicon-edit:before{content:"\e065"}.glyphicon-share:before{content:"\e066"}.glyphicon-check:before{content:"\e067"}.glyphicon-move:before{content:"\e068"}.glyphicon-step-backward:before{content:"\e069"}.glyphicon-fast-backward:before{content:"\e070"}.glyphicon-backward:before{content:"\e071"}.glyphicon-play:before{content:"\e072"}.glyphicon-pause:before{content:"\e073"}.glyphicon-stop:before{content:"\e074"}.glyphicon-forward:before{content:"\e075"}.glyphicon-fast-forward:before{content:"\e076"}.glyphicon-step-forward:before{content:"\e077"}.glyphicon-eject:before{content:"\e078"}.glyphicon-chevron-left:before{content:"\e079"}.glyphicon-chevron-right:before{content:"\e080"}.glyphicon-plus-sign:before{content:"\e081"}.glyphicon-minus-sign:before{content:"\e082"}.glyphicon-remove-sign:before{content:"\e083"}.glyphicon-ok-sign:before{content:"\e084"}.glyphicon-question-sign:before{content:"\e085"}.glyphicon-info-sign:before{content:"\e086"}.glyphicon-screenshot:before{content:"\e087"}.glyphicon-remove-circle:before{content:"\e088"}.glyphicon-ok-circle:before{content:"\e089"}.glyphicon-ban-circle:before{content:"\e090"}.glyphicon-arrow-left:before{content:"\e091"}.glyphicon-arrow-right:before{content:"\e092"}.glyphicon-arrow-up:before{content:"\e093"}.glyphicon-arrow-down:before{content:"\e094"}.glyphicon-share-alt:before{content:"\e095"}.glyphicon-resize-full:before{content:"\e096"}.glyphicon-resize-small:before{content:"\e097"}.glyphicon-exclamation-sign:before{content:"\e101"}.glyphicon-gift:before{content:"\e102"}.glyphicon-leaf:before{content:"\e103"}.glyphicon-fire:before{content:"\e104"}.glyphicon-eye-open:before{content:"\e105"}.glyphicon-eye-close:before{content:"\e106"}.glyphicon-warning-sign:before{content:"\e107"}.glyphicon-plane:before{content:"\e108"}.glyphicon-calendar:before{content:"\e109"}.glyphicon-random:before{content:"\e110"}.glyphicon-comment:before{content:"\e111"}.glyphicon-magnet:before{content:"\e112"}.glyphicon-chevron-up:before{content:"\e113"}.glyphicon-chevron-down:before{content:"\e114"}.glyphicon-retweet:before{content:"\e115"}.glyphicon-shopping-cart:before{content:"\e116"}.glyphicon-folder-close:before{content:"\e117"}.glyphicon-folder-open:before{content:"\e118"}.glyphicon-resize-vertical:before{content:"\e119"}.glyphicon-resize-horizontal:before{content:"\e120"}.glyphicon-hdd:before{content:"\e121"}.glyphicon-bullhorn:before{content:"\e122"}.glyphicon-bell:before{content:"\e123"}.glyphicon-certificate:before{content:"\e124"}.glyphicon-thumbs-up:before{content:"\e125"}.glyphicon-thumbs-down:before{content:"\e126"}.glyphicon-hand-right:before{content:"\e127"}.glyphicon-hand-left:before{content:"\e128"}.glyphicon-hand-up:before{content:"\e129"}.glyphicon-hand-down:before{content:"\e130"}.glyphicon-circle-arrow-right:before{content:"\e131"}.glyphicon-circle-arrow-left:before{content:"\e132"}.glyphicon-circle-arrow-up:before{content:"\e133"}.glyphicon-circle-arrow-down:before{content:"\e134"}.glyphicon-globe:before{content:"\e135"}.glyphicon-wrench:before{content:"\e136"}.glyphicon-tasks:before{content:"\e137"}.glyphicon-filter:before{content:"\e138"}.glyphicon-briefcase:before{content:"\e139"}.glyphicon-fullscreen:before{content:"\e140"}.glyphicon-dashboard:before{content:"\e141"}.glyphicon-paperclip:before{content:"\e142"}.glyphicon-heart-empty:before{content:"\e143"}.glyphicon-link:before{content:"\e144"}.glyphicon-phone:before{content:"\e145"}.glyphicon-pushpin:before{content:"\e146"}.glyphicon-usd:before{content:"\e148"}.glyphicon-gbp:before{content:"\e149"}.glyphicon-sort:before{content:"\e150"}.glyphicon-sort-by-alphabet:before{content:"\e151"}.glyphicon-sort-by-alphabet-alt:before{content:"\e152"}.glyphicon-sort-by-order:before{content:"\e153"}.glyphicon-sort-by-order-alt:before{content:"\e154"}.glyphicon-sort-by-attributes:before{content:"\e155"}.glyphicon-sort-by-attributes-alt:before{content:"\e156"}.glyphicon-unchecked:before{content:"\e157"}.glyphicon-expand:before{content:"\e158"}.glyphicon-collapse-down:before{content:"\e159"}.glyphicon-collapse-up:before{content:"\e160"}.glyphicon-log-in:before{content:"\e161"}.glyphicon-flash:before{content:"\e162"}.glyphicon-log-out:before{content:"\e163"}.glyphicon-new-window:before{content:"\e164"}.glyphicon-record:before{content:"\e165"}.glyphicon-save:before{content:"\e166"}.glyphicon-open:before{content:"\e167"}.glyphicon-saved:before{content:"\e168"}.glyphicon-import:before{content:"\e169"}.glyphicon-export:before{content:"\e170"}.glyphicon-send:before{content:"\e171"}.glyphicon-floppy-disk:before{content:"\e172"}.glyphicon-floppy-saved:before{content:"\e173"}.glyphicon-floppy-remove:before{content:"\e174"}.glyphicon-floppy-save:before{content:"\e175"}.glyphicon-floppy-open:before{content:"\e176"}.glyphicon-credit-card:before{content:"\e177"}.glyphicon-transfer:before{content:"\e178"}.glyphicon-cutlery:before{content:"\e179"}.glyphicon-header:before{content:"\e180"}.glyphicon-compressed:before{content:"\e181"}.glyphicon-earphone:before{content:"\e182"}.glyphicon-phone-alt:before{content:"\e183"}.glyphicon-tower:before{content:"\e184"}.glyphicon-stats:before{content:"\e185"}.glyphicon-sd-video:before{content:"\e186"}.glyphicon-hd-video:before{content:"\e187"}.glyphicon-subtitles:before{content:"\e188"}.glyphicon-sound-stereo:before{content:"\e189"}.glyphicon-sound-dolby:before{content:"\e190"}.glyphicon-sound-5-1:before{content:"\e191"}.glyphicon-sound-6-1:before{content:"\e192"}.glyphicon-sound-7-1:before{content:"\e193"}.glyphicon-copyright-mark:before{content:"\e194"}.glyphicon-registration-mark:before{content:"\e195"}.glyphicon-cloud-download:before{content:"\e197"}.glyphicon-cloud-upload:before{content:"\e198"}.glyphicon-tree-conifer:before{content:"\e199"}.glyphicon-tree-deciduous:before{content:"\e200"}.glyphicon-cd:before{content:"\e201"}.glyphicon-save-file:before{content:"\e202"}.glyphicon-open-file:before{content:"\e203"}.glyphicon-level-up:before{content:"\e204"}.glyphicon-copy:before{content:"\e205"}.glyphicon-paste:before{content:"\e206"}.glyphicon-alert:before{content:"\e209"}.glyphicon-equalizer:before{content:"\e210"}.glyphicon-king:before{content:"\e211"}.glyphicon-queen:before{content:"\e212"}.glyphicon-pawn:before{content:"\e213"}.glyphicon-bishop:before{content:"\e214"}.glyphicon-knight:before{content:"\e215"}.glyphicon-baby-formula:before{content:"\e216"}.glyphicon-tent:before{content:"\26fa"}.glyphicon-blackboard:before{content:"\e218"}.glyphicon-bed:before{content:"\e219"}.glyphicon-apple:before{content:"\f8ff"}.glyphicon-erase:before{content:"\e221"}.glyphicon-hourglass:before{content:"\231b"}.glyphicon-lamp:before{content:"\e223"}.glyphicon-duplicate:before{content:"\e224"}.glyphicon-piggy-bank:before{content:"\e225"}.glyphicon-scissors:before{content:"\e226"}.glyphicon-bitcoin:before{content:"\e227"}.glyphicon-btc:before{content:"\e227"}.glyphicon-xbt:before{content:"\e227"}.glyphicon-yen:before{content:"\00a5"}.glyphicon-jpy:before{content:"\00a5"}.glyphicon-ruble:before{content:"\20bd"}.glyphicon-rub:before{content:"\20bd"}.glyphicon-scale:before{content:"\e230"}.glyphicon-ice-lolly:before{content:"\e231"}.glyphicon-ice-lolly-tasted:before{content:"\e232"}.glyphicon-education:before{content:"\e233"}.glyphicon-option-horizontal:before{content:"\e234"}.glyphicon-option-vertical:before{content:"\e235"}.glyphicon-menu-hamburger:before{content:"\e236"}.glyphicon-modal-window:before{content:"\e237"}.glyphicon-oil:before{content:"\e238"}.glyphicon-grain:before{content:"\e239"}.glyphicon-sunglasses:before{content:"\e240"}.glyphicon-text-size:before{content:"\e241"}.glyphicon-text-color:before{content:"\e242"}.glyphicon-text-background:before{content:"\e243"}.glyphicon-object-align-top:before{content:"\e244"}.glyphicon-object-align-bottom:before{content:"\e245"}.glyphicon-object-align-horizontal:before{content:"\e246"}.glyphicon-object-align-left:before{content:"\e247"}.glyphicon-object-align-vertical:before{content:"\e248"}.glyphicon-object-align-right:before{content:"\e249"}.glyphicon-triangle-right:before{content:"\e250"}.glyphicon-triangle-left:before{content:"\e251"}.glyphicon-triangle-bottom:before{content:"\e252"}.glyphicon-triangle-top:before{content:"\e253"}.glyphicon-console:before{content:"\e254"}.glyphicon-superscript:before{content:"\e255"}.glyphicon-subscript:before{content:"\e256"}.glyphicon-menu-left:before{content:"\e257"}.glyphicon-menu-right:before{content:"\e258"}.glyphicon-menu-down:before{content:"\e259"}.glyphicon-menu-up:before{content:"\e260"}*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}:after,:before{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}html{font-size:10px;-webkit-tap-highlight-color:rgba(0,0,0,0)}body{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:1.42857143;color:#333;background-color:#fff}button,input,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit}a{color:#337ab7;text-decoration:none}a:focus,a:hover{color:#23527c;text-decoration:underline}a:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}figure{margin:0}img{vertical-align:middle}.carousel-inner>.item>a>img,.carousel-inner>.item>img,.img-responsive,.thumbnail a>img,.thumbnail>img{display:block;max-width:100%;height:auto}.img-rounded{border-radius:6px}.img-thumbnail{display:inline-block;max-width:100%;height:auto;padding:4px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.img-circle{border-radius:50%}hr{margin-top:20px;margin-bottom:20px;border:0;border-top:1px solid #eee}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}[role=button]{cursor:pointer}.h1,.h2,.h3,.h4,.h5,.h6,h1,h2,h3,h4,h5,h6{font-family:inherit;font-weight:500;line-height:1.1;color:inherit}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-weight:400;line-height:1;color:#777}.h1,.h2,.h3,h1,h2,h3{margin-top:20px;margin-bottom:10px}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small{font-size:65%}.h4,.h5,.h6,h4,h5,h6{margin-top:10px;margin-bottom:10px}.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-size:75%}.h1,h1{font-size:36px}.h2,h2{font-size:30px}.h3,h3{font-size:24px}.h4,h4{font-size:18px}.h5,h5{font-size:14px}.h6,h6{font-size:12px}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:16px;font-weight:300;line-height:1.4}@media (min-width:768px){.lead{font-size:21px}}.small,small{font-size:85%}.mark,mark{padding:.2em;background-color:#fcf8e3}.text-left{text-align:left}.text-right{text-align:right}.text-center{text-align:center}.text-justify{text-align:justify}.text-nowrap{white-space:nowrap}.text-lowercase{text-transform:lowercase}.text-uppercase{text-transform:uppercase}.text-capitalize{text-transform:capitalize}.text-muted{color:#777}.text-primary{color:#337ab7}a.text-primary:hover{color:#286090}.text-success{color:#3c763d}a.text-success:hover{color:#2b542c}.text-info{color:#31708f}a.text-info:hover{color:#245269}.text-warning{color:#8a6d3b}a.text-warning:hover{color:#66512c}.text-danger{color:#a94442}a.text-danger:hover{color:#843534}.bg-primary{color:#fff;background-color:#337ab7}a.bg-primary:hover{background-color:#286090}.bg-success{background-color:#dff0d8}a.bg-success:hover{background-color:#c1e2b3}.bg-info{background-color:#d9edf7}a.bg-info:hover{background-color:#afd9ee}.bg-warning{background-color:#fcf8e3}a.bg-warning:hover{background-color:#f7ecb5}.bg-danger{background-color:#f2dede}a.bg-danger:hover{background-color:#e4b9b9}.page-header{padding-bottom:9px;margin:40px 0 20px;border-bottom:1px solid #eee}ol,ul{margin-top:0;margin-bottom:10px}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}.list-unstyled{padding-left:0;list-style:none}.list-inline{padding-left:0;margin-left:-5px;list-style:none}.list-inline>li{display:inline-block;padding-right:5px;padding-left:5px}dl{margin-top:0;margin-bottom:20px}dd,dt{line-height:1.42857143}dt{font-weight:700}dd{margin-left:0}@media (min-width:768px){.dl-horizontal dt{float:left;width:160px;overflow:hidden;clear:left;text-align:right;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:180px}}abbr[data-original-title],abbr[title]{cursor:help;border-bottom:1px dotted #777}.initialism{font-size:90%;text-transform:uppercase}blockquote{padding:10px 20px;margin:0 0 20px;font-size:17.5px;border-left:5px solid #eee}blockquote ol:last-child,blockquote p:last-child,blockquote ul:last-child{margin-bottom:0}blockquote .small,blockquote footer,blockquote small{display:block;font-size:80%;line-height:1.42857143;color:#777}blockquote .small:before,blockquote footer:before,blockquote small:before{content:'\2014 \00A0'}.blockquote-reverse,blockquote.pull-right{padding-right:15px;padding-left:0;text-align:right;border-right:5px solid #eee;border-left:0}.blockquote-reverse .small:before,.blockquote-reverse footer:before,.blockquote-reverse small:before,blockquote.pull-right .small:before,blockquote.pull-right footer:before,blockquote.pull-right small:before{content:''}.blockquote-reverse .small:after,.blockquote-reverse footer:after,.blockquote-reverse small:after,blockquote.pull-right .small:after,blockquote.pull-right footer:after,blockquote.pull-right small:after{content:'\00A0 \2014'}address{margin-bottom:20px;font-style:normal;line-height:1.42857143}code,kbd,pre,samp{font-family:Menlo,Monaco,Consolas,"Courier New",monospace}code{padding:2px 4px;font-size:90%;color:#c7254e;background-color:#f9f2f4;border-radius:4px}kbd{padding:2px 4px;font-size:90%;color:#fff;background-color:#333;border-radius:3px;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.25);box-shadow:inset 0 -1px 0 rgba(0,0,0,.25)}kbd kbd{padding:0;font-size:100%;font-weight:700;-webkit-box-shadow:none;box-shadow:none}pre{display:block;padding:9.5px;margin:0 0 10px;font-size:13px;line-height:1.42857143;color:#333;word-break:break-all;word-wrap:break-word;background-color:#f5f5f5;border:1px solid #ccc;border-radius:4px}pre code{padding:0;font-size:inherit;color:inherit;white-space:pre-wrap;background-color:transparent;border-radius:0}.pre-scrollable{max-height:340px;overflow-y:scroll}.container{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}@media (min-width:768px){.container{width:750px}}@media (min-width:992px){.container{width:970px}}@media (min-width:1200px){.container{width:1170px}}.container-fluid{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}.row{margin-right:-15px;margin-left:-15px}.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9{position:relative;min-height:1px;padding-right:15px;padding-left:15px}.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9{float:left}.col-xs-12{width:100%}.col-xs-11{width:91.66666667%}.col-xs-10{width:83.33333333%}.col-xs-9{width:75%}.col-xs-8{width:66.66666667%}.col-xs-7{width:58.33333333%}.col-xs-6{width:50%}.col-xs-5{width:41.66666667%}.col-xs-4{width:33.33333333%}.col-xs-3{width:25%}.col-xs-2{width:16.66666667%}.col-xs-1{width:8.33333333%}.col-xs-pull-12{right:100%}.col-xs-pull-11{right:91.66666667%}.col-xs-pull-10{right:83.33333333%}.col-xs-pull-9{right:75%}.col-xs-pull-8{right:66.66666667%}.col-xs-pull-7{right:58.33333333%}.col-xs-pull-6{right:50%}.col-xs-pull-5{right:41.66666667%}.col-xs-pull-4{right:33.33333333%}.col-xs-pull-3{right:25%}.col-xs-pull-2{right:16.66666667%}.col-xs-pull-1{right:8.33333333%}.col-xs-pull-0{right:auto}.col-xs-push-12{left:100%}.col-xs-push-11{left:91.66666667%}.col-xs-push-10{left:83.33333333%}.col-xs-push-9{left:75%}.col-xs-push-8{left:66.66666667%}.col-xs-push-7{left:58.33333333%}.col-xs-push-6{left:50%}.col-xs-push-5{left:41.66666667%}.col-xs-push-4{left:33.33333333%}.col-xs-push-3{left:25%}.col-xs-push-2{left:16.66666667%}.col-xs-push-1{left:8.33333333%}.col-xs-push-0{left:auto}.col-xs-offset-12{margin-left:100%}.col-xs-offset-11{margin-left:91.66666667%}.col-xs-offset-10{margin-left:83.33333333%}.col-xs-offset-9{margin-left:75%}.col-xs-offset-8{margin-left:66.66666667%}.col-xs-offset-7{margin-left:58.33333333%}.col-xs-offset-6{margin-left:50%}.col-xs-offset-5{margin-left:41.66666667%}.col-xs-offset-4{margin-left:33.33333333%}.col-xs-offset-3{margin-left:25%}.col-xs-offset-2{margin-left:16.66666667%}.col-xs-offset-1{margin-left:8.33333333%}.col-xs-offset-0{margin-left:0}@media (min-width:768px){.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9{float:left}.col-sm-12{width:100%}.col-sm-11{width:91.66666667%}.col-sm-10{width:83.33333333%}.col-sm-9{width:75%}.col-sm-8{width:66.66666667%}.col-sm-7{width:58.33333333%}.col-sm-6{width:50%}.col-sm-5{width:41.66666667%}.col-sm-4{width:33.33333333%}.col-sm-3{width:25%}.col-sm-2{width:16.66666667%}.col-sm-1{width:8.33333333%}.col-sm-pull-12{right:100%}.col-sm-pull-11{right:91.66666667%}.col-sm-pull-10{right:83.33333333%}.col-sm-pull-9{right:75%}.col-sm-pull-8{right:66.66666667%}.col-sm-pull-7{right:58.33333333%}.col-sm-pull-6{right:50%}.col-sm-pull-5{right:41.66666667%}.col-sm-pull-4{right:33.33333333%}.col-sm-pull-3{right:25%}.col-sm-pull-2{right:16.66666667%}.col-sm-pull-1{right:8.33333333%}.col-sm-pull-0{right:auto}.col-sm-push-12{left:100%}.col-sm-push-11{left:91.66666667%}.col-sm-push-10{left:83.33333333%}.col-sm-push-9{left:75%}.col-sm-push-8{left:66.66666667%}.col-sm-push-7{left:58.33333333%}.col-sm-push-6{left:50%}.col-sm-push-5{left:41.66666667%}.col-sm-push-4{left:33.33333333%}.col-sm-push-3{left:25%}.col-sm-push-2{left:16.66666667%}.col-sm-push-1{left:8.33333333%}.col-sm-push-0{left:auto}.col-sm-offset-12{margin-left:100%}.col-sm-offset-11{margin-left:91.66666667%}.col-sm-offset-10{margin-left:83.33333333%}.col-sm-offset-9{margin-left:75%}.col-sm-offset-8{margin-left:66.66666667%}.col-sm-offset-7{margin-left:58.33333333%}.col-sm-offset-6{margin-left:50%}.col-sm-offset-5{margin-left:41.66666667%}.col-sm-offset-4{margin-left:33.33333333%}.col-sm-offset-3{margin-left:25%}.col-sm-offset-2{margin-left:16.66666667%}.col-sm-offset-1{margin-left:8.33333333%}.col-sm-offset-0{margin-left:0}}@media (min-width:992px){.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9{float:left}.col-md-12{width:100%}.col-md-11{width:91.66666667%}.col-md-10{width:83.33333333%}.col-md-9{width:75%}.col-md-8{width:66.66666667%}.col-md-7{width:58.33333333%}.col-md-6{width:50%}.col-md-5{width:41.66666667%}.col-md-4{width:33.33333333%}.col-md-3{width:25%}.col-md-2{width:16.66666667%}.col-md-1{width:8.33333333%}.col-md-pull-12{right:100%}.col-md-pull-11{right:91.66666667%}.col-md-pull-10{right:83.33333333%}.col-md-pull-9{right:75%}.col-md-pull-8{right:66.66666667%}.col-md-pull-7{right:58.33333333%}.col-md-pull-6{right:50%}.col-md-pull-5{right:41.66666667%}.col-md-pull-4{right:33.33333333%}.col-md-pull-3{right:25%}.col-md-pull-2{right:16.66666667%}.col-md-pull-1{right:8.33333333%}.col-md-pull-0{right:auto}.col-md-push-12{left:100%}.col-md-push-11{left:91.66666667%}.col-md-push-10{left:83.33333333%}.col-md-push-9{left:75%}.col-md-push-8{left:66.66666667%}.col-md-push-7{left:58.33333333%}.col-md-push-6{left:50%}.col-md-push-5{left:41.66666667%}.col-md-push-4{left:33.33333333%}.col-md-push-3{left:25%}.col-md-push-2{left:16.66666667%}.col-md-push-1{left:8.33333333%}.col-md-push-0{left:auto}.col-md-offset-12{margin-left:100%}.col-md-offset-11{margin-left:91.66666667%}.col-md-offset-10{margin-left:83.33333333%}.col-md-offset-9{margin-left:75%}.col-md-offset-8{margin-left:66.66666667%}.col-md-offset-7{margin-left:58.33333333%}.col-md-offset-6{margin-left:50%}.col-md-offset-5{margin-left:41.66666667%}.col-md-offset-4{margin-left:33.33333333%}.col-md-offset-3{margin-left:25%}.col-md-offset-2{margin-left:16.66666667%}.col-md-offset-1{margin-left:8.33333333%}.col-md-offset-0{margin-left:0}}@media (min-width:1200px){.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9{float:left}.col-lg-12{width:100%}.col-lg-11{width:91.66666667%}.col-lg-10{width:83.33333333%}.col-lg-9{width:75%}.col-lg-8{width:66.66666667%}.col-lg-7{width:58.33333333%}.col-lg-6{width:50%}.col-lg-5{width:41.66666667%}.col-lg-4{width:33.33333333%}.col-lg-3{width:25%}.col-lg-2{width:16.66666667%}.col-lg-1{width:8.33333333%}.col-lg-pull-12{right:100%}.col-lg-pull-11{right:91.66666667%}.col-lg-pull-10{right:83.33333333%}.col-lg-pull-9{right:75%}.col-lg-pull-8{right:66.66666667%}.col-lg-pull-7{right:58.33333333%}.col-lg-pull-6{right:50%}.col-lg-pull-5{right:41.66666667%}.col-lg-pull-4{right:33.33333333%}.col-lg-pull-3{right:25%}.col-lg-pull-2{right:16.66666667%}.col-lg-pull-1{right:8.33333333%}.col-lg-pull-0{right:auto}.col-lg-push-12{left:100%}.col-lg-push-11{left:91.66666667%}.col-lg-push-10{left:83.33333333%}.col-lg-push-9{left:75%}.col-lg-push-8{left:66.66666667%}.col-lg-push-7{left:58.33333333%}.col-lg-push-6{left:50%}.col-lg-push-5{left:41.66666667%}.col-lg-push-4{left:33.33333333%}.col-lg-push-3{left:25%}.col-lg-push-2{left:16.66666667%}.col-lg-push-1{left:8.33333333%}.col-lg-push-0{left:auto}.col-lg-offset-12{margin-left:100%}.col-lg-offset-11{margin-left:91.66666667%}.col-lg-offset-10{margin-left:83.33333333%}.col-lg-offset-9{margin-left:75%}.col-lg-offset-8{margin-left:66.66666667%}.col-lg-offset-7{margin-left:58.33333333%}.col-lg-offset-6{margin-left:50%}.col-lg-offset-5{margin-left:41.66666667%}.col-lg-offset-4{margin-left:33.33333333%}.col-lg-offset-3{margin-left:25%}.col-lg-offset-2{margin-left:16.66666667%}.col-lg-offset-1{margin-left:8.33333333%}.col-lg-offset-0{margin-left:0}}table{background-color:transparent}caption{padding-top:8px;padding-bottom:8px;color:#777;text-align:left}th{text-align:left}.table{width:100%;max-width:100%;margin-bottom:20px}.table>tbody>tr>td,.table>tbody>tr>th,.table>tfoot>tr>td,.table>tfoot>tr>th,.table>thead>tr>td,.table>thead>tr>th{padding:8px;line-height:1.42857143;vertical-align:top;border-top:1px solid #ddd}.table>thead>tr>th{vertical-align:bottom;border-bottom:2px solid #ddd}.table>caption+thead>tr:first-child>td,.table>caption+thead>tr:first-child>th,.table>colgroup+thead>tr:first-child>td,.table>colgroup+thead>tr:first-child>th,.table>thead:first-child>tr:first-child>td,.table>thead:first-child>tr:first-child>th{border-top:0}.table>tbody+tbody{border-top:2px solid #ddd}.table .table{background-color:#fff}.table-condensed>tbody>tr>td,.table-condensed>tbody>tr>th,.table-condensed>tfoot>tr>td,.table-condensed>tfoot>tr>th,.table-condensed>thead>tr>td,.table-condensed>thead>tr>th{padding:5px}.table-bordered{border:1px solid #ddd}.table-bordered>tbody>tr>td,.table-bordered>tbody>tr>th,.table-bordered>tfoot>tr>td,.table-bordered>tfoot>tr>th,.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border:1px solid #ddd}.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border-bottom-width:2px}.table-striped>tbody>tr:nth-of-type(odd){background-color:#f9f9f9}.table-hover>tbody>tr:hover{background-color:#f5f5f5}table col[class*=col-]{position:static;display:table-column;float:none}table td[class*=col-],table th[class*=col-]{position:static;display:table-cell;float:none}.table>tbody>tr.active>td,.table>tbody>tr.active>th,.table>tbody>tr>td.active,.table>tbody>tr>th.active,.table>tfoot>tr.active>td,.table>tfoot>tr.active>th,.table>tfoot>tr>td.active,.table>tfoot>tr>th.active,.table>thead>tr.active>td,.table>thead>tr.active>th,.table>thead>tr>td.active,.table>thead>tr>th.active{background-color:#f5f5f5}.table-hover>tbody>tr.active:hover>td,.table-hover>tbody>tr.active:hover>th,.table-hover>tbody>tr:hover>.active,.table-hover>tbody>tr>td.active:hover,.table-hover>tbody>tr>th.active:hover{background-color:#e8e8e8}.table>tbody>tr.success>td,.table>tbody>tr.success>th,.table>tbody>tr>td.success,.table>tbody>tr>th.success,.table>tfoot>tr.success>td,.table>tfoot>tr.success>th,.table>tfoot>tr>td.success,.table>tfoot>tr>th.success,.table>thead>tr.success>td,.table>thead>tr.success>th,.table>thead>tr>td.success,.table>thead>tr>th.success{background-color:#dff0d8}.table-hover>tbody>tr.success:hover>td,.table-hover>tbody>tr.success:hover>th,.table-hover>tbody>tr:hover>.success,.table-hover>tbody>tr>td.success:hover,.table-hover>tbody>tr>th.success:hover{background-color:#d0e9c6}.table>tbody>tr.info>td,.table>tbody>tr.info>th,.table>tbody>tr>td.info,.table>tbody>tr>th.info,.table>tfoot>tr.info>td,.table>tfoot>tr.info>th,.table>tfoot>tr>td.info,.table>tfoot>tr>th.info,.table>thead>tr.info>td,.table>thead>tr.info>th,.table>thead>tr>td.info,.table>thead>tr>th.info{background-color:#d9edf7}.table-hover>tbody>tr.info:hover>td,.table-hover>tbody>tr.info:hover>th,.table-hover>tbody>tr:hover>.info,.table-hover>tbody>tr>td.info:hover,.table-hover>tbody>tr>th.info:hover{background-color:#c4e3f3}.table>tbody>tr.warning>td,.table>tbody>tr.warning>th,.table>tbody>tr>td.warning,.table>tbody>tr>th.warning,.table>tfoot>tr.warning>td,.table>tfoot>tr.warning>th,.table>tfoot>tr>td.warning,.table>tfoot>tr>th.warning,.table>thead>tr.warning>td,.table>thead>tr.warning>th,.table>thead>tr>td.warning,.table>thead>tr>th.warning{background-color:#fcf8e3}.table-hover>tbody>tr.warning:hover>td,.table-hover>tbody>tr.warning:hover>th,.table-hover>tbody>tr:hover>.warning,.table-hover>tbody>tr>td.warning:hover,.table-hover>tbody>tr>th.warning:hover{background-color:#faf2cc}.table>tbody>tr.danger>td,.table>tbody>tr.danger>th,.table>tbody>tr>td.danger,.table>tbody>tr>th.danger,.table>tfoot>tr.danger>td,.table>tfoot>tr.danger>th,.table>tfoot>tr>td.danger,.table>tfoot>tr>th.danger,.table>thead>tr.danger>td,.table>thead>tr.danger>th,.table>thead>tr>td.danger,.table>thead>tr>th.danger{background-color:#f2dede}.table-hover>tbody>tr.danger:hover>td,.table-hover>tbody>tr.danger:hover>th,.table-hover>tbody>tr:hover>.danger,.table-hover>tbody>tr>td.danger:hover,.table-hover>tbody>tr>th.danger:hover{background-color:#ebcccc}.table-responsive{min-height:.01%;overflow-x:auto}@media screen and (max-width:767px){.table-responsive{width:100%;margin-bottom:15px;overflow-y:hidden;-ms-overflow-style:-ms-autohiding-scrollbar;border:1px solid #ddd}.table-responsive>.table{margin-bottom:0}.table-responsive>.table>tbody>tr>td,.table-responsive>.table>tbody>tr>th,.table-responsive>.table>tfoot>tr>td,.table-responsive>.table>tfoot>tr>th,.table-responsive>.table>thead>tr>td,.table-responsive>.table>thead>tr>th{white-space:nowrap}.table-responsive>.table-bordered{border:0}.table-responsive>.table-bordered>tbody>tr>td:first-child,.table-responsive>.table-bordered>tbody>tr>th:first-child,.table-responsive>.table-bordered>tfoot>tr>td:first-child,.table-responsive>.table-bordered>tfoot>tr>th:first-child,.table-responsive>.table-bordered>thead>tr>td:first-child,.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.table-responsive>.table-bordered>tbody>tr>td:last-child,.table-responsive>.table-bordered>tbody>tr>th:last-child,.table-responsive>.table-bordered>tfoot>tr>td:last-child,.table-responsive>.table-bordered>tfoot>tr>th:last-child,.table-responsive>.table-bordered>thead>tr>td:last-child,.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.table-responsive>.table-bordered>tbody>tr:last-child>td,.table-responsive>.table-bordered>tbody>tr:last-child>th,.table-responsive>.table-bordered>tfoot>tr:last-child>td,.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}}fieldset{min-width:0;padding:0;margin:0;border:0}legend{display:block;width:100%;padding:0;margin-bottom:20px;font-size:21px;line-height:inherit;color:#333;border:0;border-bottom:1px solid #e5e5e5}label{display:inline-block;max-width:100%;margin-bottom:5px;font-weight:700}input[type=search]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}input[type=checkbox],input[type=radio]{margin:4px 0 0;margin-top:1px \9;line-height:normal}input[type=file]{display:block}input[type=range]{display:block;width:100%}select[multiple],select[size]{height:auto}input[type=file]:focus,input[type=checkbox]:focus,input[type=radio]:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}output{display:block;padding-top:7px;font-size:14px;line-height:1.42857143;color:#555}.form-control{display:block;width:100%;height:34px;padding:6px 12px;font-size:14px;line-height:1.42857143;color:#555;background-color:#fff;background-image:none;border:1px solid #ccc;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075);-webkit-transition:border-color ease-in-out .15s,-webkit-box-shadow ease-in-out .15s;-o-transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s}.form-control:focus{border-color:#66afe9;outline:0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}.form-control::-moz-placeholder{color:#999;opacity:1}.form-control:-ms-input-placeholder{color:#999}.form-control::-webkit-input-placeholder{color:#999}.form-control[disabled],.form-control[readonly],fieldset[disabled] .form-control{background-color:#eee;opacity:1}.form-control[disabled],fieldset[disabled] .form-control{cursor:not-allowed}textarea.form-control{height:auto}input[type=search]{-webkit-appearance:none}@media screen and (-webkit-min-device-pixel-ratio:0){input[type=date],input[type=time],input[type=datetime-local],input[type=month]{line-height:34px}.input-group-sm input[type=date],.input-group-sm input[type=time],.input-group-sm input[type=datetime-local],.input-group-sm input[type=month],input[type=date].input-sm,input[type=time].input-sm,input[type=datetime-local].input-sm,input[type=month].input-sm{line-height:30px}.input-group-lg input[type=date],.input-group-lg input[type=time],.input-group-lg input[type=datetime-local],.input-group-lg input[type=month],input[type=date].input-lg,input[type=time].input-lg,input[type=datetime-local].input-lg,input[type=month].input-lg{line-height:46px}}.form-group{margin-bottom:15px}.checkbox,.radio{position:relative;display:block;margin-top:10px;margin-bottom:10px}.checkbox label,.radio label{min-height:20px;padding-left:20px;margin-bottom:0;font-weight:400;cursor:pointer}.checkbox input[type=checkbox],.checkbox-inline input[type=checkbox],.radio input[type=radio],.radio-inline input[type=radio]{position:absolute;margin-top:4px \9;margin-left:-20px}.checkbox+.checkbox,.radio+.radio{margin-top:-5px}.checkbox-inline,.radio-inline{position:relative;display:inline-block;padding-left:20px;margin-bottom:0;font-weight:400;vertical-align:middle;cursor:pointer}.checkbox-inline+.checkbox-inline,.radio-inline+.radio-inline{margin-top:0;margin-left:10px}fieldset[disabled] input[type=checkbox],fieldset[disabled] input[type=radio],input[type=checkbox].disabled,input[type=checkbox][disabled],input[type=radio].disabled,input[type=radio][disabled]{cursor:not-allowed}.checkbox-inline.disabled,.radio-inline.disabled,fieldset[disabled] .checkbox-inline,fieldset[disabled] .radio-inline{cursor:not-allowed}.checkbox.disabled label,.radio.disabled label,fieldset[disabled] .checkbox label,fieldset[disabled] .radio label{cursor:not-allowed}.form-control-static{min-height:34px;padding-top:7px;padding-bottom:7px;margin-bottom:0}.form-control-static.input-lg,.form-control-static.input-sm{padding-right:0;padding-left:0}.input-sm{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-sm{height:30px;line-height:30px}select[multiple].input-sm,textarea.input-sm{height:auto}.form-group-sm .form-control{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.form-group-sm .form-control{height:30px;line-height:30px}select[multiple].form-group-sm .form-control,textarea.form-group-sm .form-control{height:auto}.form-group-sm .form-control-static{height:30px;min-height:32px;padding:5px 10px;font-size:12px;line-height:1.5}.input-lg{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}select.input-lg{height:46px;line-height:46px}select[multiple].input-lg,textarea.input-lg{height:auto}.form-group-lg .form-control{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}select.form-group-lg .form-control{height:46px;line-height:46px}select[multiple].form-group-lg .form-control,textarea.form-group-lg .form-control{height:auto}.form-group-lg .form-control-static{height:46px;min-height:38px;padding:10px 16px;font-size:18px;line-height:1.3333333}.has-feedback{position:relative}.has-feedback .form-control{padding-right:42.5px}.form-control-feedback{position:absolute;top:0;right:0;z-index:2;display:block;width:34px;height:34px;line-height:34px;text-align:center;pointer-events:none}.input-lg+.form-control-feedback{width:46px;height:46px;line-height:46px}.input-sm+.form-control-feedback{width:30px;height:30px;line-height:30px}.has-success .checkbox,.has-success .checkbox-inline,.has-success .control-label,.has-success .help-block,.has-success .radio,.has-success .radio-inline,.has-success.checkbox label,.has-success.checkbox-inline label,.has-success.radio label,.has-success.radio-inline label{color:#3c763d}.has-success .form-control{border-color:#3c763d;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-success .form-control:focus{border-color:#2b542c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168}.has-success .input-group-addon{color:#3c763d;background-color:#dff0d8;border-color:#3c763d}.has-success .form-control-feedback{color:#3c763d}.has-warning .checkbox,.has-warning .checkbox-inline,.has-warning .control-label,.has-warning .help-block,.has-warning .radio,.has-warning .radio-inline,.has-warning.checkbox label,.has-warning.checkbox-inline label,.has-warning.radio label,.has-warning.radio-inline label{color:#8a6d3b}.has-warning .form-control{border-color:#8a6d3b;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-warning .form-control:focus{border-color:#66512c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b}.has-warning .input-group-addon{color:#8a6d3b;background-color:#fcf8e3;border-color:#8a6d3b}.has-warning .form-control-feedback{color:#8a6d3b}.has-error .checkbox,.has-error .checkbox-inline,.has-error .control-label,.has-error .help-block,.has-error .radio,.has-error .radio-inline,.has-error.checkbox label,.has-error.checkbox-inline label,.has-error.radio label,.has-error.radio-inline label{color:#a94442}.has-error .form-control{border-color:#a94442;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-error .form-control:focus{border-color:#843534;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483}.has-error .input-group-addon{color:#a94442;background-color:#f2dede;border-color:#a94442}.has-error .form-control-feedback{color:#a94442}.has-feedback label~.form-control-feedback{top:25px}.has-feedback label.sr-only~.form-control-feedback{top:0}.help-block{display:block;margin-top:5px;margin-bottom:10px;color:#737373}@media (min-width:768px){.form-inline .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.form-inline .form-control{display:inline-block;width:auto;vertical-align:middle}.form-inline .form-control-static{display:inline-block}.form-inline .input-group{display:inline-table;vertical-align:middle}.form-inline .input-group .form-control,.form-inline .input-group .input-group-addon,.form-inline .input-group .input-group-btn{width:auto}.form-inline .input-group>.form-control{width:100%}.form-inline .control-label{margin-bottom:0;vertical-align:middle}.form-inline .checkbox,.form-inline .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.form-inline .checkbox label,.form-inline .radio label{padding-left:0}.form-inline .checkbox input[type=checkbox],.form-inline .radio input[type=radio]{position:relative;margin-left:0}.form-inline .has-feedback .form-control-feedback{top:0}}.form-horizontal .checkbox,.form-horizontal .checkbox-inline,.form-horizontal .radio,.form-horizontal .radio-inline{padding-top:7px;margin-top:0;margin-bottom:0}.form-horizontal .checkbox,.form-horizontal .radio{min-height:27px}.form-horizontal .form-group{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.form-horizontal .control-label{padding-top:7px;margin-bottom:0;text-align:right}}.form-horizontal .has-feedback .form-control-feedback{right:15px}@media (min-width:768px){.form-horizontal .form-group-lg .control-label{padding-top:14.33px}}@media (min-width:768px){.form-horizontal .form-group-sm .control-label{padding-top:6px}}.btn{display:inline-block;padding:6px 12px;margin-bottom:0;font-size:14px;font-weight:400;line-height:1.42857143;text-align:center;white-space:nowrap;vertical-align:middle;-ms-touch-action:manipulation;touch-action:manipulation;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-image:none;border:1px solid transparent;border-radius:4px}.btn.active.focus,.btn.active:focus,.btn.focus,.btn:active.focus,.btn:active:focus,.btn:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.btn.focus,.btn:focus,.btn:hover{color:#333;text-decoration:none}.btn.active,.btn:active{background-image:none;outline:0;-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn.disabled,.btn[disabled],fieldset[disabled] .btn{pointer-events:none;cursor:not-allowed;filter:alpha(opacity=65);-webkit-box-shadow:none;box-shadow:none;opacity:.65}.btn-default{color:#333;background-color:#fff;border-color:#ccc}.btn-default.active,.btn-default.focus,.btn-default:active,.btn-default:focus,.btn-default:hover,.open>.dropdown-toggle.btn-default{color:#333;background-color:#e6e6e6;border-color:#adadad}.btn-default.active,.btn-default:active,.open>.dropdown-toggle.btn-default{background-image:none}.btn-default.disabled,.btn-default.disabled.active,.btn-default.disabled.focus,.btn-default.disabled:active,.btn-default.disabled:focus,.btn-default.disabled:hover,.btn-default[disabled],.btn-default[disabled].active,.btn-default[disabled].focus,.btn-default[disabled]:active,.btn-default[disabled]:focus,.btn-default[disabled]:hover,fieldset[disabled] .btn-default,fieldset[disabled] .btn-default.active,fieldset[disabled] .btn-default.focus,fieldset[disabled] .btn-default:active,fieldset[disabled] .btn-default:focus,fieldset[disabled] .btn-default:hover{background-color:#fff;border-color:#ccc}.btn-default .badge{color:#fff;background-color:#333}.btn-primary{color:#fff;background-color:#337ab7;border-color:#2e6da4}.btn-primary.active,.btn-primary.focus,.btn-primary:active,.btn-primary:focus,.btn-primary:hover,.open>.dropdown-toggle.btn-primary{color:#fff;background-color:#286090;border-color:#204d74}.btn-primary.active,.btn-primary:active,.open>.dropdown-toggle.btn-primary{background-image:none}.btn-primary.disabled,.btn-primary.disabled.active,.btn-primary.disabled.focus,.btn-primary.disabled:active,.btn-primary.disabled:focus,.btn-primary.disabled:hover,.btn-primary[disabled],.btn-primary[disabled].active,.btn-primary[disabled].focus,.btn-primary[disabled]:active,.btn-primary[disabled]:focus,.btn-primary[disabled]:hover,fieldset[disabled] .btn-primary,fieldset[disabled] .btn-primary.active,fieldset[disabled] .btn-primary.focus,fieldset[disabled] .btn-primary:active,fieldset[disabled] .btn-primary:focus,fieldset[disabled] .btn-primary:hover{background-color:#337ab7;border-color:#2e6da4}.btn-primary .badge{color:#337ab7;background-color:#fff}.btn-success{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.btn-success.active,.btn-success.focus,.btn-success:active,.btn-success:focus,.btn-success:hover,.open>.dropdown-toggle.btn-success{color:#fff;background-color:#449d44;border-color:#398439}.btn-success.active,.btn-success:active,.open>.dropdown-toggle.btn-success{background-image:none}.btn-success.disabled,.btn-success.disabled.active,.btn-success.disabled.focus,.btn-success.disabled:active,.btn-success.disabled:focus,.btn-success.disabled:hover,.btn-success[disabled],.btn-success[disabled].active,.btn-success[disabled].focus,.btn-success[disabled]:active,.btn-success[disabled]:focus,.btn-success[disabled]:hover,fieldset[disabled] .btn-success,fieldset[disabled] .btn-success.active,fieldset[disabled] .btn-success.focus,fieldset[disabled] .btn-success:active,fieldset[disabled] .btn-success:focus,fieldset[disabled] .btn-success:hover{background-color:#5cb85c;border-color:#4cae4c}.btn-success .badge{color:#5cb85c;background-color:#fff}.btn-info{color:#fff;background-color:#5bc0de;border-color:#46b8da}.btn-info.active,.btn-info.focus,.btn-info:active,.btn-info:focus,.btn-info:hover,.open>.dropdown-toggle.btn-info{color:#fff;background-color:#31b0d5;border-color:#269abc}.btn-info.active,.btn-info:active,.open>.dropdown-toggle.btn-info{background-image:none}.btn-info.disabled,.btn-info.disabled.active,.btn-info.disabled.focus,.btn-info.disabled:active,.btn-info.disabled:focus,.btn-info.disabled:hover,.btn-info[disabled],.btn-info[disabled].active,.btn-info[disabled].focus,.btn-info[disabled]:active,.btn-info[disabled]:focus,.btn-info[disabled]:hover,fieldset[disabled] .btn-info,fieldset[disabled] .btn-info.active,fieldset[disabled] .btn-info.focus,fieldset[disabled] .btn-info:active,fieldset[disabled] .btn-info:focus,fieldset[disabled] .btn-info:hover{background-color:#5bc0de;border-color:#46b8da}.btn-info .badge{color:#5bc0de;background-color:#fff}.btn-warning{color:#fff;background-color:#f0ad4e;border-color:#eea236}.btn-warning.active,.btn-warning.focus,.btn-warning:active,.btn-warning:focus,.btn-warning:hover,.open>.dropdown-toggle.btn-warning{color:#fff;background-color:#ec971f;border-color:#d58512}.btn-warning.active,.btn-warning:active,.open>.dropdown-toggle.btn-warning{background-image:none}.btn-warning.disabled,.btn-warning.disabled.active,.btn-warning.disabled.focus,.btn-warning.disabled:active,.btn-warning.disabled:focus,.btn-warning.disabled:hover,.btn-warning[disabled],.btn-warning[disabled].active,.btn-warning[disabled].focus,.btn-warning[disabled]:active,.btn-warning[disabled]:focus,.btn-warning[disabled]:hover,fieldset[disabled] .btn-warning,fieldset[disabled] .btn-warning.active,fieldset[disabled] .btn-warning.focus,fieldset[disabled] .btn-warning:active,fieldset[disabled] .btn-warning:focus,fieldset[disabled] .btn-warning:hover{background-color:#f0ad4e;border-color:#eea236}.btn-warning .badge{color:#f0ad4e;background-color:#fff}.btn-danger{color:#fff;background-color:#d9534f;border-color:#d43f3a}.btn-danger.active,.btn-danger.focus,.btn-danger:active,.btn-danger:focus,.btn-danger:hover,.open>.dropdown-toggle.btn-danger{color:#fff;background-color:#c9302c;border-color:#ac2925}.btn-danger.active,.btn-danger:active,.open>.dropdown-toggle.btn-danger{background-image:none}.btn-danger.disabled,.btn-danger.disabled.active,.btn-danger.disabled.focus,.btn-danger.disabled:active,.btn-danger.disabled:focus,.btn-danger.disabled:hover,.btn-danger[disabled],.btn-danger[disabled].active,.btn-danger[disabled].focus,.btn-danger[disabled]:active,.btn-danger[disabled]:focus,.btn-danger[disabled]:hover,fieldset[disabled] .btn-danger,fieldset[disabled] .btn-danger.active,fieldset[disabled] .btn-danger.focus,fieldset[disabled] .btn-danger:active,fieldset[disabled] .btn-danger:focus,fieldset[disabled] .btn-danger:hover{background-color:#d9534f;border-color:#d43f3a}.btn-danger .badge{color:#d9534f;background-color:#fff}.btn-link{font-weight:400;color:#337ab7;border-radius:0}.btn-link,.btn-link.active,.btn-link:active,.btn-link[disabled],fieldset[disabled] .btn-link{background-color:transparent;-webkit-box-shadow:none;box-shadow:none}.btn-link,.btn-link:active,.btn-link:focus,.btn-link:hover{border-color:transparent}.btn-link:focus,.btn-link:hover{color:#23527c;text-decoration:underline;background-color:transparent}.btn-link[disabled]:focus,.btn-link[disabled]:hover,fieldset[disabled] .btn-link:focus,fieldset[disabled] .btn-link:hover{color:#777;text-decoration:none}.btn-group-lg>.btn,.btn-lg{padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}.btn-group-sm>.btn,.btn-sm{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.btn-group-xs>.btn,.btn-xs{padding:1px 5px;font-size:12px;line-height:1.5;border-radius:3px}.btn-block{display:block;width:100%}.btn-block+.btn-block{margin-top:5px}input[type=button].btn-block,input[type=reset].btn-block,input[type=submit].btn-block{width:100%}.fade{opacity:0;-webkit-transition:opacity .15s linear;-o-transition:opacity .15s linear;transition:opacity .15s linear}.fade.in{opacity:1}.collapse{display:none}.collapse.in{display:block}tr.collapse.in{display:table-row}tbody.collapse.in{display:table-row-group}.collapsing{position:relative;height:0;overflow:hidden;-webkit-transition-timing-function:ease;-o-transition-timing-function:ease;transition-timing-function:ease;-webkit-transition-duration:.35s;-o-transition-duration:.35s;transition-duration:.35s;-webkit-transition-property:height,visibility;-o-transition-property:height,visibility;transition-property:height,visibility}.caret{display:inline-block;width:0;height:0;margin-left:2px;vertical-align:middle;border-top:4px dashed;border-right:4px solid transparent;border-left:4px solid transparent}.dropdown,.dropup{position:relative}.dropdown-toggle:focus{outline:0}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;font-size:14px;text-align:left;list-style:none;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.15);border-radius:4px;-webkit-box-shadow:0 6px 12px rgba(0,0,0,.175);box-shadow:0 6px 12px rgba(0,0,0,.175)}.dropdown-menu.pull-right{right:0;left:auto}.dropdown-menu .divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.dropdown-menu>li>a{display:block;padding:3px 20px;clear:both;font-weight:400;line-height:1.42857143;color:#333;white-space:nowrap}.dropdown-menu>li>a:focus,.dropdown-menu>li>a:hover{color:#262626;text-decoration:none;background-color:#f5f5f5}.dropdown-menu>.active>a,.dropdown-menu>.active>a:focus,.dropdown-menu>.active>a:hover{color:#fff;text-decoration:none;background-color:#337ab7;outline:0}.dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{color:#777}.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{text-decoration:none;cursor:not-allowed;background-color:transparent;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.open>.dropdown-menu{display:block}.open>a{outline:0}.dropdown-menu-right{right:0;left:auto}.dropdown-menu-left{right:auto;left:0}.dropdown-header{display:block;padding:3px 20px;font-size:12px;line-height:1.42857143;color:#777;white-space:nowrap}.dropdown-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:990}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{content:"";border-top:0;border-bottom:4px solid}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:2px}@media (min-width:768px){.navbar-right .dropdown-menu{right:0;left:auto}.navbar-right .dropdown-menu-left{right:auto;left:0}}.btn-group,.btn-group-vertical{position:relative;display:inline-block;vertical-align:middle}.btn-group-vertical>.btn,.btn-group>.btn{position:relative;float:left}.btn-group-vertical>.btn.active,.btn-group-vertical>.btn:active,.btn-group-vertical>.btn:focus,.btn-group-vertical>.btn:hover,.btn-group>.btn.active,.btn-group>.btn:active,.btn-group>.btn:focus,.btn-group>.btn:hover{z-index:2}.btn-group .btn+.btn,.btn-group .btn+.btn-group,.btn-group .btn-group+.btn,.btn-group .btn-group+.btn-group{margin-left:-1px}.btn-toolbar{margin-left:-5px}.btn-toolbar .btn-group,.btn-toolbar .input-group{float:left}.btn-toolbar>.btn,.btn-toolbar>.btn-group,.btn-toolbar>.input-group{margin-left:5px}.btn-group>.btn:not(:first-child):not(:last-child):not(.dropdown-toggle){border-radius:0}.btn-group>.btn:first-child{margin-left:0}.btn-group>.btn:first-child:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn:last-child:not(:first-child),.btn-group>.dropdown-toggle:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.btn-group>.btn-group{float:left}.btn-group>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-left-radius:0;border-bottom-left-radius:0}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn-group>.btn+.dropdown-toggle{padding-right:8px;padding-left:8px}.btn-group>.btn-lg+.dropdown-toggle{padding-right:12px;padding-left:12px}.btn-group.open .dropdown-toggle{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn-group.open .dropdown-toggle.btn-link{-webkit-box-shadow:none;box-shadow:none}.btn .caret{margin-left:0}.btn-lg .caret{border-width:5px 5px 0;border-bottom-width:0}.dropup .btn-lg .caret{border-width:0 5px 5px}.btn-group-vertical>.btn,.btn-group-vertical>.btn-group,.btn-group-vertical>.btn-group>.btn{display:block;float:none;width:100%;max-width:100%}.btn-group-vertical>.btn-group>.btn{float:none}.btn-group-vertical>.btn+.btn,.btn-group-vertical>.btn+.btn-group,.btn-group-vertical>.btn-group+.btn,.btn-group-vertical>.btn-group+.btn-group{margin-top:-1px;margin-left:0}.btn-group-vertical>.btn:not(:first-child):not(:last-child){border-radius:0}.btn-group-vertical>.btn:first-child:not(:last-child){border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn:last-child:not(:first-child){border-top-left-radius:0;border-top-right-radius:0;border-bottom-left-radius:4px}.btn-group-vertical>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group-vertical>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group-vertical>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-left-radius:0;border-top-right-radius:0}.btn-group-justified{display:table;width:100%;table-layout:fixed;border-collapse:separate}.btn-group-justified>.btn,.btn-group-justified>.btn-group{display:table-cell;float:none;width:1%}.btn-group-justified>.btn-group .btn{width:100%}.btn-group-justified>.btn-group .dropdown-menu{left:auto}[data-toggle=buttons]>.btn input[type=checkbox],[data-toggle=buttons]>.btn input[type=radio],[data-toggle=buttons]>.btn-group>.btn input[type=checkbox],[data-toggle=buttons]>.btn-group>.btn input[type=radio]{position:absolute;clip:rect(0,0,0,0);pointer-events:none}.input-group{position:relative;display:table;border-collapse:separate}.input-group[class*=col-]{float:none;padding-right:0;padding-left:0}.input-group .form-control{position:relative;z-index:2;float:left;width:100%;margin-bottom:0}.input-group-lg>.form-control,.input-group-lg>.input-group-addon,.input-group-lg>.input-group-btn>.btn{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}select.input-group-lg>.form-control,select.input-group-lg>.input-group-addon,select.input-group-lg>.input-group-btn>.btn{height:46px;line-height:46px}select[multiple].input-group-lg>.form-control,select[multiple].input-group-lg>.input-group-addon,select[multiple].input-group-lg>.input-group-btn>.btn,textarea.input-group-lg>.form-control,textarea.input-group-lg>.input-group-addon,textarea.input-group-lg>.input-group-btn>.btn{height:auto}.input-group-sm>.form-control,.input-group-sm>.input-group-addon,.input-group-sm>.input-group-btn>.btn{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-group-sm>.form-control,select.input-group-sm>.input-group-addon,select.input-group-sm>.input-group-btn>.btn{height:30px;line-height:30px}select[multiple].input-group-sm>.form-control,select[multiple].input-group-sm>.input-group-addon,select[multiple].input-group-sm>.input-group-btn>.btn,textarea.input-group-sm>.form-control,textarea.input-group-sm>.input-group-addon,textarea.input-group-sm>.input-group-btn>.btn{height:auto}.input-group .form-control,.input-group-addon,.input-group-btn{display:table-cell}.input-group .form-control:not(:first-child):not(:last-child),.input-group-addon:not(:first-child):not(:last-child),.input-group-btn:not(:first-child):not(:last-child){border-radius:0}.input-group-addon,.input-group-btn{width:1%;white-space:nowrap;vertical-align:middle}.input-group-addon{padding:6px 12px;font-size:14px;font-weight:400;line-height:1;color:#555;text-align:center;background-color:#eee;border:1px solid #ccc;border-radius:4px}.input-group-addon.input-sm{padding:5px 10px;font-size:12px;border-radius:3px}.input-group-addon.input-lg{padding:10px 16px;font-size:18px;border-radius:6px}.input-group-addon input[type=checkbox],.input-group-addon input[type=radio]{margin-top:0}.input-group .form-control:first-child,.input-group-addon:first-child,.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group>.btn,.input-group-btn:first-child>.dropdown-toggle,.input-group-btn:last-child>.btn-group:not(:last-child)>.btn,.input-group-btn:last-child>.btn:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.input-group-addon:first-child{border-right:0}.input-group .form-control:last-child,.input-group-addon:last-child,.input-group-btn:first-child>.btn-group:not(:first-child)>.btn,.input-group-btn:first-child>.btn:not(:first-child),.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group>.btn,.input-group-btn:last-child>.dropdown-toggle{border-top-left-radius:0;border-bottom-left-radius:0}.input-group-addon:last-child{border-left:0}.input-group-btn{position:relative;font-size:0;white-space:nowrap}.input-group-btn>.btn{position:relative}.input-group-btn>.btn+.btn{margin-left:-1px}.input-group-btn>.btn:active,.input-group-btn>.btn:focus,.input-group-btn>.btn:hover{z-index:2}.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group{margin-right:-1px}.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group{margin-left:-1px}.nav{padding-left:0;margin-bottom:0;list-style:none}.nav>li{position:relative;display:block}.nav>li>a{position:relative;display:block;padding:10px 15px}.nav>li>a:focus,.nav>li>a:hover{text-decoration:none;background-color:#eee}.nav>li.disabled>a{color:#777}.nav>li.disabled>a:focus,.nav>li.disabled>a:hover{color:#777;text-decoration:none;cursor:not-allowed;background-color:transparent}.nav .open>a,.nav .open>a:focus,.nav .open>a:hover{background-color:#eee;border-color:#337ab7}.nav .nav-divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.nav>li>a>img{max-width:none}.nav-tabs{border-bottom:1px solid #ddd}.nav-tabs>li{float:left;margin-bottom:-1px}.nav-tabs>li>a{margin-right:2px;line-height:1.42857143;border:1px solid transparent;border-radius:4px 4px 0 0}.nav-tabs>li>a:hover{border-color:#eee #eee #ddd}.nav-tabs>li.active>a,.nav-tabs>li.active>a:focus,.nav-tabs>li.active>a:hover{color:#555;cursor:default;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent}.nav-tabs.nav-justified{width:100%;border-bottom:0}.nav-tabs.nav-justified>li{float:none}.nav-tabs.nav-justified>li>a{margin-bottom:5px;text-align:center}.nav-tabs.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-tabs.nav-justified>li{display:table-cell;width:1%}.nav-tabs.nav-justified>li>a{margin-bottom:0}}.nav-tabs.nav-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-tabs.nav-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border-bottom-color:#fff}}.nav-pills>li{float:left}.nav-pills>li>a{border-radius:4px}.nav-pills>li+li{margin-left:2px}.nav-pills>li.active>a,.nav-pills>li.active>a:focus,.nav-pills>li.active>a:hover{color:#fff;background-color:#337ab7}.nav-stacked>li{float:none}.nav-stacked>li+li{margin-top:2px;margin-left:0}.nav-justified{width:100%}.nav-justified>li{float:none}.nav-justified>li>a{margin-bottom:5px;text-align:center}.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-justified>li{display:table-cell;width:1%}.nav-justified>li>a{margin-bottom:0}}.nav-tabs-justified{border-bottom:0}.nav-tabs-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-tabs-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{border-bottom-color:#fff}}.tab-content>.tab-pane{display:none}.tab-content>.active{display:block}.nav-tabs .dropdown-menu{margin-top:-1px;border-top-left-radius:0;border-top-right-radius:0}.navbar{position:relative;min-height:50px;margin-bottom:20px;border:1px solid transparent}@media (min-width:768px){.navbar{border-radius:4px}}@media (min-width:768px){.navbar-header{float:left}}.navbar-collapse{padding-right:15px;padding-left:15px;overflow-x:visible;-webkit-overflow-scrolling:touch;border-top:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.1)}.navbar-collapse.in{overflow-y:auto}@media (min-width:768px){.navbar-collapse{width:auto;border-top:0;-webkit-box-shadow:none;box-shadow:none}.navbar-collapse.collapse{display:block!important;height:auto!important;padding-bottom:0;overflow:visible!important}.navbar-collapse.in{overflow-y:visible}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse,.navbar-static-top .navbar-collapse{padding-right:0;padding-left:0}}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse{max-height:340px}@media (max-device-width:480px)and (orientation:landscape){.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse{max-height:200px}}.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:0;margin-left:0}}.navbar-static-top{z-index:1000;border-width:0 0 1px}@media (min-width:768px){.navbar-static-top{border-radius:0}}.navbar-fixed-bottom,.navbar-fixed-top{position:fixed;right:0;left:0;z-index:1030}@media (min-width:768px){.navbar-fixed-bottom,.navbar-fixed-top{border-radius:0}}.navbar-fixed-top{top:0;border-width:0 0 1px}.navbar-fixed-bottom{bottom:0;margin-bottom:0;border-width:1px 0 0}.navbar-brand{float:left;height:50px;padding:15px 15px;font-size:18px;line-height:20px}.navbar-brand:focus,.navbar-brand:hover{text-decoration:none}.navbar-brand>img{display:block}@media (min-width:768px){.navbar>.container .navbar-brand,.navbar>.container-fluid .navbar-brand{margin-left:-15px}}.navbar-toggle{position:relative;float:right;padding:9px 10px;margin-top:8px;margin-right:15px;margin-bottom:8px;background-color:transparent;background-image:none;border:1px solid transparent;border-radius:4px}.navbar-toggle:focus{outline:0}.navbar-toggle .icon-bar{display:block;width:22px;height:2px;border-radius:1px}.navbar-toggle .icon-bar+.icon-bar{margin-top:4px}@media (min-width:768px){.navbar-toggle{display:none}}.navbar-nav{margin:7.5px -15px}.navbar-nav>li>a{padding-top:10px;padding-bottom:10px;line-height:20px}@media (max-width:767px){.navbar-nav .open .dropdown-menu{position:static;float:none;width:auto;margin-top:0;background-color:transparent;border:0;-webkit-box-shadow:none;box-shadow:none}.navbar-nav .open .dropdown-menu .dropdown-header,.navbar-nav .open .dropdown-menu>li>a{padding:5px 15px 5px 25px}.navbar-nav .open .dropdown-menu>li>a{line-height:20px}.navbar-nav .open .dropdown-menu>li>a:focus,.navbar-nav .open .dropdown-menu>li>a:hover{background-image:none}}@media (min-width:768px){.navbar-nav{float:left;margin:0}.navbar-nav>li{float:left}.navbar-nav>li>a{padding-top:15px;padding-bottom:15px}}.navbar-form{padding:10px 15px;margin-top:8px;margin-right:-15px;margin-bottom:8px;margin-left:-15px;border-top:1px solid transparent;border-bottom:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1)}@media (min-width:768px){.navbar-form .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.navbar-form .form-control{display:inline-block;width:auto;vertical-align:middle}.navbar-form .form-control-static{display:inline-block}.navbar-form .input-group{display:inline-table;vertical-align:middle}.navbar-form .input-group .form-control,.navbar-form .input-group .input-group-addon,.navbar-form .input-group .input-group-btn{width:auto}.navbar-form .input-group>.form-control{width:100%}.navbar-form .control-label{margin-bottom:0;vertical-align:middle}.navbar-form .checkbox,.navbar-form .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.navbar-form .checkbox label,.navbar-form .radio label{padding-left:0}.navbar-form .checkbox input[type=checkbox],.navbar-form .radio input[type=radio]{position:relative;margin-left:0}.navbar-form .has-feedback .form-control-feedback{top:0}}@media (max-width:767px){.navbar-form .form-group{margin-bottom:5px}.navbar-form .form-group:last-child{margin-bottom:0}}@media (min-width:768px){.navbar-form{width:auto;padding-top:0;padding-bottom:0;margin-right:0;margin-left:0;border:0;-webkit-box-shadow:none;box-shadow:none}}.navbar-nav>li>.dropdown-menu{margin-top:0;border-top-left-radius:0;border-top-right-radius:0}.navbar-fixed-bottom .navbar-nav>li>.dropdown-menu{margin-bottom:0;border-top-left-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.navbar-btn{margin-top:8px;margin-bottom:8px}.navbar-btn.btn-sm{margin-top:10px;margin-bottom:10px}.navbar-btn.btn-xs{margin-top:14px;margin-bottom:14px}.navbar-text{margin-top:15px;margin-bottom:15px}@media (min-width:768px){.navbar-text{float:left;margin-right:15px;margin-left:15px}}@media (min-width:768px){.navbar-left{float:left!important}.navbar-right{float:right!important;margin-right:-15px}.navbar-right~.navbar-right{margin-right:0}}.navbar-default{background-color:#f8f8f8;border-color:#e7e7e7}.navbar-default .navbar-brand{color:#777}.navbar-default .navbar-brand:focus,.navbar-default .navbar-brand:hover{color:#5e5e5e;background-color:transparent}.navbar-default .navbar-text{color:#777}.navbar-default .navbar-nav>li>a{color:#777}.navbar-default .navbar-nav>li>a:focus,.navbar-default .navbar-nav>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.active>a:focus,.navbar-default .navbar-nav>.active>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav>.disabled>a,.navbar-default .navbar-nav>.disabled>a:focus,.navbar-default .navbar-nav>.disabled>a:hover{color:#ccc;background-color:transparent}.navbar-default .navbar-toggle{border-color:#ddd}.navbar-default .navbar-toggle:focus,.navbar-default .navbar-toggle:hover{background-color:#ddd}.navbar-default .navbar-toggle .icon-bar{background-color:#888}.navbar-default .navbar-collapse,.navbar-default .navbar-form{border-color:#e7e7e7}.navbar-default .navbar-nav>.open>a,.navbar-default .navbar-nav>.open>a:focus,.navbar-default .navbar-nav>.open>a:hover{color:#555;background-color:#e7e7e7}@media (max-width:767px){.navbar-default .navbar-nav .open .dropdown-menu>li>a{color:#777}.navbar-default .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav .open .dropdown-menu>.active>a,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#ccc;background-color:transparent}}.navbar-default .navbar-link{color:#777}.navbar-default .navbar-link:hover{color:#333}.navbar-default .btn-link{color:#777}.navbar-default .btn-link:focus,.navbar-default .btn-link:hover{color:#333}.navbar-default .btn-link[disabled]:focus,.navbar-default .btn-link[disabled]:hover,fieldset[disabled] .navbar-default .btn-link:focus,fieldset[disabled] .navbar-default .btn-link:hover{color:#ccc}.navbar-inverse{background-color:#222;border-color:#080808}.navbar-inverse .navbar-brand{color:#9d9d9d}.navbar-inverse .navbar-brand:focus,.navbar-inverse .navbar-brand:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-text{color:#9d9d9d}.navbar-inverse .navbar-nav>li>a{color:#9d9d9d}.navbar-inverse .navbar-nav>li>a:focus,.navbar-inverse .navbar-nav>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav>.active>a,.navbar-inverse .navbar-nav>.active>a:focus,.navbar-inverse .navbar-nav>.active>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav>.disabled>a,.navbar-inverse .navbar-nav>.disabled>a:focus,.navbar-inverse .navbar-nav>.disabled>a:hover{color:#444;background-color:transparent}.navbar-inverse .navbar-toggle{border-color:#333}.navbar-inverse .navbar-toggle:focus,.navbar-inverse .navbar-toggle:hover{background-color:#333}.navbar-inverse .navbar-toggle .icon-bar{background-color:#fff}.navbar-inverse .navbar-collapse,.navbar-inverse .navbar-form{border-color:#101010}.navbar-inverse .navbar-nav>.open>a,.navbar-inverse .navbar-nav>.open>a:focus,.navbar-inverse .navbar-nav>.open>a:hover{color:#fff;background-color:#080808}@media (max-width:767px){.navbar-inverse .navbar-nav .open .dropdown-menu>.dropdown-header{border-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu .divider{background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a{color:#9d9d9d}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#444;background-color:transparent}}.navbar-inverse .navbar-link{color:#9d9d9d}.navbar-inverse .navbar-link:hover{color:#fff}.navbar-inverse .btn-link{color:#9d9d9d}.navbar-inverse .btn-link:focus,.navbar-inverse .btn-link:hover{color:#fff}.navbar-inverse .btn-link[disabled]:focus,.navbar-inverse .btn-link[disabled]:hover,fieldset[disabled] .navbar-inverse .btn-link:focus,fieldset[disabled] .navbar-inverse .btn-link:hover{color:#444}.breadcrumb{padding:8px 15px;margin-bottom:20px;list-style:none;background-color:#f5f5f5;border-radius:4px}.breadcrumb>li{display:inline-block}.breadcrumb>li+li:before{padding:0 5px;color:#ccc;content:"/\00a0"}.breadcrumb>.active{color:#777}.pagination{display:inline-block;padding-left:0;margin:20px 0;border-radius:4px}.pagination>li{display:inline}.pagination>li>a,.pagination>li>span{position:relative;float:left;padding:6px 12px;margin-left:-1px;line-height:1.42857143;color:#337ab7;text-decoration:none;background-color:#fff;border:1px solid #ddd}.pagination>li:first-child>a,.pagination>li:first-child>span{margin-left:0;border-top-left-radius:4px;border-bottom-left-radius:4px}.pagination>li:last-child>a,.pagination>li:last-child>span{border-top-right-radius:4px;border-bottom-right-radius:4px}.pagination>li>a:focus,.pagination>li>a:hover,.pagination>li>span:focus,.pagination>li>span:hover{color:#23527c;background-color:#eee;border-color:#ddd}.pagination>.active>a,.pagination>.active>a:focus,.pagination>.active>a:hover,.pagination>.active>span,.pagination>.active>span:focus,.pagination>.active>span:hover{z-index:2;color:#fff;cursor:default;background-color:#337ab7;border-color:#337ab7}.pagination>.disabled>a,.pagination>.disabled>a:focus,.pagination>.disabled>a:hover,.pagination>.disabled>span,.pagination>.disabled>span:focus,.pagination>.disabled>span:hover{color:#777;cursor:not-allowed;background-color:#fff;border-color:#ddd}.pagination-lg>li>a,.pagination-lg>li>span{padding:10px 16px;font-size:18px}.pagination-lg>li:first-child>a,.pagination-lg>li:first-child>span{border-top-left-radius:6px;border-bottom-left-radius:6px}.pagination-lg>li:last-child>a,.pagination-lg>li:last-child>span{border-top-right-radius:6px;border-bottom-right-radius:6px}.pagination-sm>li>a,.pagination-sm>li>span{padding:5px 10px;font-size:12px}.pagination-sm>li:first-child>a,.pagination-sm>li:first-child>span{border-top-left-radius:3px;border-bottom-left-radius:3px}.pagination-sm>li:last-child>a,.pagination-sm>li:last-child>span{border-top-right-radius:3px;border-bottom-right-radius:3px}.pager{padding-left:0;margin:20px 0;text-align:center;list-style:none}.pager li{display:inline}.pager li>a,.pager li>span{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;border-radius:15px}.pager li>a:focus,.pager li>a:hover{text-decoration:none;background-color:#eee}.pager .next>a,.pager .next>span{float:right}.pager .previous>a,.pager .previous>span{float:left}.pager .disabled>a,.pager .disabled>a:focus,.pager .disabled>a:hover,.pager .disabled>span{color:#777;cursor:not-allowed;background-color:#fff}.label{display:inline;padding:.2em .6em .3em;font-size:75%;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25em}a.label:focus,a.label:hover{color:#fff;text-decoration:none;cursor:pointer}.label:empty{display:none}.btn .label{position:relative;top:-1px}.label-default{background-color:#777}.label-default[href]:focus,.label-default[href]:hover{background-color:#5e5e5e}.label-primary{background-color:#337ab7}.label-primary[href]:focus,.label-primary[href]:hover{background-color:#286090}.label-success{background-color:#5cb85c}.label-success[href]:focus,.label-success[href]:hover{background-color:#449d44}.label-info{background-color:#5bc0de}.label-info[href]:focus,.label-info[href]:hover{background-color:#31b0d5}.label-warning{background-color:#f0ad4e}.label-warning[href]:focus,.label-warning[href]:hover{background-color:#ec971f}.label-danger{background-color:#d9534f}.label-danger[href]:focus,.label-danger[href]:hover{background-color:#c9302c}.badge{display:inline-block;min-width:10px;padding:3px 7px;font-size:12px;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;background-color:#777;border-radius:10px}.badge:empty{display:none}.btn .badge{position:relative;top:-1px}.btn-group-xs>.btn .badge,.btn-xs .badge{top:0;padding:1px 5px}a.badge:focus,a.badge:hover{color:#fff;text-decoration:none;cursor:pointer}.list-group-item.active>.badge,.nav-pills>.active>a>.badge{color:#337ab7;background-color:#fff}.list-group-item>.badge{float:right}.list-group-item>.badge+.badge{margin-right:5px}.nav-pills>li>a>.badge{margin-left:3px}.jumbotron{padding:30px 15px;margin-bottom:30px;color:inherit;background-color:#eee}.jumbotron .h1,.jumbotron h1{color:inherit}.jumbotron p{margin-bottom:15px;font-size:21px;font-weight:200}.jumbotron>hr{border-top-color:#d5d5d5}.container .jumbotron,.container-fluid .jumbotron{border-radius:6px}.jumbotron .container{max-width:100%}@media screen and (min-width:768px){.jumbotron{padding:48px 0}.container .jumbotron,.container-fluid .jumbotron{padding-right:60px;padding-left:60px}.jumbotron .h1,.jumbotron h1{font-size:63px}}.thumbnail{display:block;padding:4px;margin-bottom:20px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:border .2s ease-in-out;-o-transition:border .2s ease-in-out;transition:border .2s ease-in-out}.thumbnail a>img,.thumbnail>img{margin-right:auto;margin-left:auto}a.thumbnail.active,a.thumbnail:focus,a.thumbnail:hover{border-color:#337ab7}.thumbnail .caption{padding:9px;color:#333}.alert{padding:15px;margin-bottom:20px;border:1px solid transparent;border-radius:4px}.alert h4{margin-top:0;color:inherit}.alert .alert-link{font-weight:700}.alert>p,.alert>ul{margin-bottom:0}.alert>p+p{margin-top:5px}.alert-dismissable,.alert-dismissible{padding-right:35px}.alert-dismissable .close,.alert-dismissible .close{position:relative;top:-2px;right:-21px;color:inherit}.alert-success{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.alert-success hr{border-top-color:#c9e2b3}.alert-success .alert-link{color:#2b542c}.alert-info{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.alert-info hr{border-top-color:#a6e1ec}.alert-info .alert-link{color:#245269}.alert-warning{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.alert-warning hr{border-top-color:#f7e1b5}.alert-warning .alert-link{color:#66512c}.alert-danger{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.alert-danger hr{border-top-color:#e4b9c0}.alert-danger .alert-link{color:#843534}@-webkit-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@-o-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}.progress{height:20px;margin-bottom:20px;overflow:hidden;background-color:#f5f5f5;border-radius:4px;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.1);box-shadow:inset 0 1px 2px rgba(0,0,0,.1)}.progress-bar{float:left;width:0;height:100%;font-size:12px;line-height:20px;color:#fff;text-align:center;background-color:#337ab7;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);-webkit-transition:width .6s ease;-o-transition:width .6s ease;transition:width .6s ease}.progress-bar-striped,.progress-striped .progress-bar{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);-webkit-background-size:40px 40px;background-size:40px 40px}.progress-bar.active,.progress.active .progress-bar{-webkit-animation:progress-bar-stripes 2s linear infinite;-o-animation:progress-bar-stripes 2s linear infinite;animation:progress-bar-stripes 2s linear infinite}.progress-bar-success{background-color:#5cb85c}.progress-striped .progress-bar-success{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-info{background-color:#5bc0de}.progress-striped .progress-bar-info{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-warning{background-color:#f0ad4e}.progress-striped .progress-bar-warning{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-danger{background-color:#d9534f}.progress-striped .progress-bar-danger{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.media{margin-top:15px}.media:first-child{margin-top:0}.media,.media-body{overflow:hidden;zoom:1}.media-body{width:10000px}.media-object{display:block}.media-right,.media>.pull-right{padding-left:10px}.media-left,.media>.pull-left{padding-right:10px}.media-body,.media-left,.media-right{display:table-cell;vertical-align:top}.media-middle{vertical-align:middle}.media-bottom{vertical-align:bottom}.media-heading{margin-top:0;margin-bottom:5px}.media-list{padding-left:0;list-style:none}.list-group{padding-left:0;margin-bottom:20px}.list-group-item{position:relative;display:block;padding:10px 15px;margin-bottom:-1px;background-color:#fff;border:1px solid #ddd}.list-group-item:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.list-group-item:last-child{margin-bottom:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}a.list-group-item{color:#555}a.list-group-item .list-group-item-heading{color:#333}a.list-group-item:focus,a.list-group-item:hover{color:#555;text-decoration:none;background-color:#f5f5f5}.list-group-item.disabled,.list-group-item.disabled:focus,.list-group-item.disabled:hover{color:#777;cursor:not-allowed;background-color:#eee}.list-group-item.disabled .list-group-item-heading,.list-group-item.disabled:focus .list-group-item-heading,.list-group-item.disabled:hover .list-group-item-heading{color:inherit}.list-group-item.disabled .list-group-item-text,.list-group-item.disabled:focus .list-group-item-text,.list-group-item.disabled:hover .list-group-item-text{color:#777}.list-group-item.active,.list-group-item.active:focus,.list-group-item.active:hover{z-index:2;color:#fff;background-color:#337ab7;border-color:#337ab7}.list-group-item.active .list-group-item-heading,.list-group-item.active .list-group-item-heading>.small,.list-group-item.active .list-group-item-heading>small,.list-group-item.active:focus .list-group-item-heading,.list-group-item.active:focus .list-group-item-heading>.small,.list-group-item.active:focus .list-group-item-heading>small,.list-group-item.active:hover .list-group-item-heading,.list-group-item.active:hover .list-group-item-heading>.small,.list-group-item.active:hover .list-group-item-heading>small{color:inherit}.list-group-item.active .list-group-item-text,.list-group-item.active:focus .list-group-item-text,.list-group-item.active:hover .list-group-item-text{color:#c7ddef}.list-group-item-success{color:#3c763d;background-color:#dff0d8}a.list-group-item-success{color:#3c763d}a.list-group-item-success .list-group-item-heading{color:inherit}a.list-group-item-success:focus,a.list-group-item-success:hover{color:#3c763d;background-color:#d0e9c6}a.list-group-item-success.active,a.list-group-item-success.active:focus,a.list-group-item-success.active:hover{color:#fff;background-color:#3c763d;border-color:#3c763d}.list-group-item-info{color:#31708f;background-color:#d9edf7}a.list-group-item-info{color:#31708f}a.list-group-item-info .list-group-item-heading{color:inherit}a.list-group-item-info:focus,a.list-group-item-info:hover{color:#31708f;background-color:#c4e3f3}a.list-group-item-info.active,a.list-group-item-info.active:focus,a.list-group-item-info.active:hover{color:#fff;background-color:#31708f;border-color:#31708f}.list-group-item-warning{color:#8a6d3b;background-color:#fcf8e3}a.list-group-item-warning{color:#8a6d3b}a.list-group-item-warning .list-group-item-heading{color:inherit}a.list-group-item-warning:focus,a.list-group-item-warning:hover{color:#8a6d3b;background-color:#faf2cc}a.list-group-item-warning.active,a.list-group-item-warning.active:focus,a.list-group-item-warning.active:hover{color:#fff;background-color:#8a6d3b;border-color:#8a6d3b}.list-group-item-danger{color:#a94442;background-color:#f2dede}a.list-group-item-danger{color:#a94442}a.list-group-item-danger .list-group-item-heading{color:inherit}a.list-group-item-danger:focus,a.list-group-item-danger:hover{color:#a94442;background-color:#ebcccc}a.list-group-item-danger.active,a.list-group-item-danger.active:focus,a.list-group-item-danger.active:hover{color:#fff;background-color:#a94442;border-color:#a94442}.list-group-item-heading{margin-top:0;margin-bottom:5px}.list-group-item-text{margin-bottom:0;line-height:1.3}.panel{margin-bottom:20px;background-color:#fff;border:1px solid transparent;border-radius:4px;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.05);box-shadow:0 1px 1px rgba(0,0,0,.05)}.panel-body{padding:15px}.panel-heading{padding:10px 15px;border-bottom:1px solid transparent;border-top-left-radius:3px;border-top-right-radius:3px}.panel-heading>.dropdown .dropdown-toggle{color:inherit}.panel-title{margin-top:0;margin-bottom:0;font-size:16px;color:inherit}.panel-title>.small,.panel-title>.small>a,.panel-title>a,.panel-title>small,.panel-title>small>a{color:inherit}.panel-footer{padding:10px 15px;background-color:#f5f5f5;border-top:1px solid #ddd;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.list-group,.panel>.panel-collapse>.list-group{margin-bottom:0}.panel>.list-group .list-group-item,.panel>.panel-collapse>.list-group .list-group-item{border-width:1px 0;border-radius:0}.panel>.list-group:first-child .list-group-item:first-child,.panel>.panel-collapse>.list-group:first-child .list-group-item:first-child{border-top:0;border-top-left-radius:3px;border-top-right-radius:3px}.panel>.list-group:last-child .list-group-item:last-child,.panel>.panel-collapse>.list-group:last-child .list-group-item:last-child{border-bottom:0;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel-heading+.list-group .list-group-item:first-child{border-top-width:0}.list-group+.panel-footer{border-top-width:0}.panel>.panel-collapse>.table,.panel>.table,.panel>.table-responsive>.table{margin-bottom:0}.panel>.panel-collapse>.table caption,.panel>.table caption,.panel>.table-responsive>.table caption{padding-right:15px;padding-left:15px}.panel>.table-responsive:first-child>.table:first-child,.panel>.table:first-child{border-top-left-radius:3px;border-top-right-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child,.panel>.table:first-child>thead:first-child>tr:first-child{border-top-left-radius:3px;border-top-right-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table:first-child>thead:first-child>tr:first-child th:first-child{border-top-left-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table:first-child>thead:first-child>tr:first-child th:last-child{border-top-right-radius:3px}.panel>.table-responsive:last-child>.table:last-child,.panel>.table:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:first-child{border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:last-child{border-bottom-right-radius:3px}.panel>.panel-body+.table,.panel>.panel-body+.table-responsive,.panel>.table+.panel-body,.panel>.table-responsive+.panel-body{border-top:1px solid #ddd}.panel>.table>tbody:first-child>tr:first-child td,.panel>.table>tbody:first-child>tr:first-child th{border-top:0}.panel>.table-bordered,.panel>.table-responsive>.table-bordered{border:0}.panel>.table-bordered>tbody>tr>td:first-child,.panel>.table-bordered>tbody>tr>th:first-child,.panel>.table-bordered>tfoot>tr>td:first-child,.panel>.table-bordered>tfoot>tr>th:first-child,.panel>.table-bordered>thead>tr>td:first-child,.panel>.table-bordered>thead>tr>th:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:first-child,.panel>.table-responsive>.table-bordered>thead>tr>td:first-child,.panel>.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.panel>.table-bordered>tbody>tr>td:last-child,.panel>.table-bordered>tbody>tr>th:last-child,.panel>.table-bordered>tfoot>tr>td:last-child,.panel>.table-bordered>tfoot>tr>th:last-child,.panel>.table-bordered>thead>tr>td:last-child,.panel>.table-bordered>thead>tr>th:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:last-child,.panel>.table-responsive>.table-bordered>thead>tr>td:last-child,.panel>.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.panel>.table-bordered>tbody>tr:first-child>td,.panel>.table-bordered>tbody>tr:first-child>th,.panel>.table-bordered>thead>tr:first-child>td,.panel>.table-bordered>thead>tr:first-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>th,.panel>.table-responsive>.table-bordered>thead>tr:first-child>td,.panel>.table-responsive>.table-bordered>thead>tr:first-child>th{border-bottom:0}.panel>.table-bordered>tbody>tr:last-child>td,.panel>.table-bordered>tbody>tr:last-child>th,.panel>.table-bordered>tfoot>tr:last-child>td,.panel>.table-bordered>tfoot>tr:last-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>th,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>td,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}.panel>.table-responsive{margin-bottom:0;border:0}.panel-group{margin-bottom:20px}.panel-group .panel{margin-bottom:0;border-radius:4px}.panel-group .panel+.panel{margin-top:5px}.panel-group .panel-heading{border-bottom:0}.panel-group .panel-heading+.panel-collapse>.list-group,.panel-group .panel-heading+.panel-collapse>.panel-body{border-top:1px solid #ddd}.panel-group .panel-footer{border-top:0}.panel-group .panel-footer+.panel-collapse .panel-body{border-bottom:1px solid #ddd}.panel-default{border-color:#ddd}.panel-default>.panel-heading{color:#333;background-color:#f5f5f5;border-color:#ddd}.panel-default>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ddd}.panel-default>.panel-heading .badge{color:#f5f5f5;background-color:#333}.panel-default>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ddd}.panel-primary{border-color:#337ab7}.panel-primary>.panel-heading{color:#fff;background-color:#337ab7;border-color:#337ab7}.panel-primary>.panel-heading+.panel-collapse>.panel-body{border-top-color:#337ab7}.panel-primary>.panel-heading .badge{color:#337ab7;background-color:#fff}.panel-primary>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#337ab7}.panel-success{border-color:#d6e9c6}.panel-success>.panel-heading{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.panel-success>.panel-heading+.panel-collapse>.panel-body{border-top-color:#d6e9c6}.panel-success>.panel-heading .badge{color:#dff0d8;background-color:#3c763d}.panel-success>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#d6e9c6}.panel-info{border-color:#bce8f1}.panel-info>.panel-heading{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.panel-info>.panel-heading+.panel-collapse>.panel-body{border-top-color:#bce8f1}.panel-info>.panel-heading .badge{color:#d9edf7;background-color:#31708f}.panel-info>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#bce8f1}.panel-warning{border-color:#faebcc}.panel-warning>.panel-heading{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.panel-warning>.panel-heading+.panel-collapse>.panel-body{border-top-color:#faebcc}.panel-warning>.panel-heading .badge{color:#fcf8e3;background-color:#8a6d3b}.panel-warning>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#faebcc}.panel-danger{border-color:#ebccd1}.panel-danger>.panel-heading{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.panel-danger>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ebccd1}.panel-danger>.panel-heading .badge{color:#f2dede;background-color:#a94442}.panel-danger>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ebccd1}.embed-responsive{position:relative;display:block;height:0;padding:0;overflow:hidden}.embed-responsive .embed-responsive-item,.embed-responsive embed,.embed-responsive iframe,.embed-responsive object,.embed-responsive video{position:absolute;top:0;bottom:0;left:0;width:100%;height:100%;border:0}.embed-responsive-16by9{padding-bottom:56.25%}.embed-responsive-4by3{padding-bottom:75%}.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #e3e3e3;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.05);box-shadow:inset 0 1px 1px rgba(0,0,0,.05)}.well blockquote{border-color:#ddd;border-color:rgba(0,0,0,.15)}.well-lg{padding:24px;border-radius:6px}.well-sm{padding:9px;border-radius:3px}.close{float:right;font-size:21px;font-weight:700;line-height:1;color:#000;text-shadow:0 1px 0 #fff;filter:alpha(opacity=20);opacity:.2}.close:focus,.close:hover{color:#000;text-decoration:none;cursor:pointer;filter:alpha(opacity=50);opacity:.5}button.close{-webkit-appearance:none;padding:0;cursor:pointer;background:0 0;border:0}.modal-open{overflow:hidden}.modal{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1050;display:none;overflow:hidden;-webkit-overflow-scrolling:touch;outline:0}.modal.fade .modal-dialog{-webkit-transition:-webkit-transform .3s ease-out;-o-transition:-o-transform .3s ease-out;transition:transform .3s ease-out;-webkit-transform:translate(0,-25%);-ms-transform:translate(0,-25%);-o-transform:translate(0,-25%);transform:translate(0,-25%)}.modal.in .modal-dialog{-webkit-transform:translate(0,0);-ms-transform:translate(0,0);-o-transform:translate(0,0);transform:translate(0,0)}.modal-open .modal{overflow-x:hidden;overflow-y:auto}.modal-dialog{position:relative;width:auto;margin:10px}.modal-content{position:relative;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #999;border:1px solid rgba(0,0,0,.2);border-radius:6px;outline:0;-webkit-box-shadow:0 3px 9px rgba(0,0,0,.5);box-shadow:0 3px 9px rgba(0,0,0,.5)}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000}.modal-backdrop.fade{filter:alpha(opacity=0);opacity:0}.modal-backdrop.in{filter:alpha(opacity=50);opacity:.5}.modal-header{min-height:16.43px;padding:15px;border-bottom:1px solid #e5e5e5}.modal-header .close{margin-top:-2px}.modal-title{margin:0;line-height:1.42857143}.modal-body{position:relative;padding:15px}.modal-footer{padding:15px;text-align:right;border-top:1px solid #e5e5e5}.modal-footer .btn+.btn{margin-bottom:0;margin-left:5px}.modal-footer .btn-group .btn+.btn{margin-left:-1px}.modal-footer .btn-block+.btn-block{margin-left:0}.modal-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}@media (min-width:768px){.modal-dialog{width:600px;margin:30px auto}.modal-content{-webkit-box-shadow:0 5px 15px rgba(0,0,0,.5);box-shadow:0 5px 15px rgba(0,0,0,.5)}.modal-sm{width:300px}}@media (min-width:992px){.modal-lg{width:900px}}.tooltip{position:absolute;z-index:1070;display:block;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:12px;font-weight:400;line-height:1.4;filter:alpha(opacity=0);opacity:0}.tooltip.in{filter:alpha(opacity=90);opacity:.9}.tooltip.top{padding:5px 0;margin-top:-3px}.tooltip.right{padding:0 5px;margin-left:3px}.tooltip.bottom{padding:5px 0;margin-top:3px}.tooltip.left{padding:0 5px;margin-left:-3px}.tooltip-inner{max-width:200px;padding:3px 8px;color:#fff;text-align:center;text-decoration:none;background-color:#000;border-radius:4px}.tooltip-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid}.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-left .tooltip-arrow{right:5px;bottom:0;margin-bottom:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-right .tooltip-arrow{bottom:0;left:5px;margin-bottom:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-width:5px 5px 5px 0;border-right-color:#000}.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-width:5px 0 5px 5px;border-left-color:#000}.tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-left .tooltip-arrow{top:0;right:5px;margin-top:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-right .tooltip-arrow{top:0;left:5px;margin-top:-5px;border-width:0 5px 5px;border-bottom-color:#000}.popover{position:absolute;top:0;left:0;z-index:1060;display:none;max-width:276px;padding:1px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;font-weight:400;line-height:1.42857143;text-align:left;white-space:normal;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,.2);box-shadow:0 5px 10px rgba(0,0,0,.2)}.popover.top{margin-top:-10px}.popover.right{margin-left:10px}.popover.bottom{margin-top:10px}.popover.left{margin-left:-10px}.popover-title{padding:8px 14px;margin:0;font-size:14px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;border-radius:5px 5px 0 0}.popover-content{padding:9px 14px}.popover>.arrow,.popover>.arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.popover>.arrow{border-width:11px}.popover>.arrow:after{content:"";border-width:10px}.popover.top>.arrow{bottom:-11px;left:50%;margin-left:-11px;border-top-color:#999;border-top-color:rgba(0,0,0,.25);border-bottom-width:0}.popover.top>.arrow:after{bottom:1px;margin-left:-10px;content:" ";border-top-color:#fff;border-bottom-width:0}.popover.right>.arrow{top:50%;left:-11px;margin-top:-11px;border-right-color:#999;border-right-color:rgba(0,0,0,.25);border-left-width:0}.popover.right>.arrow:after{bottom:-10px;left:1px;content:" ";border-right-color:#fff;border-left-width:0}.popover.bottom>.arrow{top:-11px;left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:#999;border-bottom-color:rgba(0,0,0,.25)}.popover.bottom>.arrow:after{top:1px;margin-left:-10px;content:" ";border-top-width:0;border-bottom-color:#fff}.popover.left>.arrow{top:50%;right:-11px;margin-top:-11px;border-right-width:0;border-left-color:#999;border-left-color:rgba(0,0,0,.25)}.popover.left>.arrow:after{right:1px;bottom:-10px;content:" ";border-right-width:0;border-left-color:#fff}.carousel{position:relative}.carousel-inner{position:relative;width:100%;overflow:hidden}.carousel-inner>.item{position:relative;display:none;-webkit-transition:.6s ease-in-out left;-o-transition:.6s ease-in-out left;transition:.6s ease-in-out left}.carousel-inner>.item>a>img,.carousel-inner>.item>img{line-height:1}@media all and (transform-3d),(-webkit-transform-3d){.carousel-inner>.item{-webkit-transition:-webkit-transform .6s ease-in-out;-o-transition:-o-transform .6s ease-in-out;transition:transform .6s ease-in-out;-webkit-backface-visibility:hidden;backface-visibility:hidden;-webkit-perspective:1000;perspective:1000}.carousel-inner>.item.active.right,.carousel-inner>.item.next{left:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}.carousel-inner>.item.active.left,.carousel-inner>.item.prev{left:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}.carousel-inner>.item.active,.carousel-inner>.item.next.left,.carousel-inner>.item.prev.right{left:0;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}.carousel-inner>.active,.carousel-inner>.next,.carousel-inner>.prev{display:block}.carousel-inner>.active{left:0}.carousel-inner>.next,.carousel-inner>.prev{position:absolute;top:0;width:100%}.carousel-inner>.next{left:100%}.carousel-inner>.prev{left:-100%}.carousel-inner>.next.left,.carousel-inner>.prev.right{left:0}.carousel-inner>.active.left{left:-100%}.carousel-inner>.active.right{left:100%}.carousel-control{position:absolute;top:0;bottom:0;left:0;width:15%;font-size:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6);filter:alpha(opacity=50);opacity:.5}.carousel-control.left{background-image:-webkit-linear-gradient(left,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);background-image:-o-linear-gradient(left,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);background-image:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.5)),to(rgba(0,0,0,.0001)));background-image:linear-gradient(to right,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1);background-repeat:repeat-x}.carousel-control.right{right:0;left:auto;background-image:-webkit-linear-gradient(left,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-image:-o-linear-gradient(left,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-image:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.0001)),to(rgba(0,0,0,.5)));background-image:linear-gradient(to right,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1);background-repeat:repeat-x}.carousel-control:focus,.carousel-control:hover{color:#fff;text-decoration:none;filter:alpha(opacity=90);outline:0;opacity:.9}.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{position:absolute;top:50%;z-index:5;display:inline-block}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{left:50%;margin-left:-10px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{right:50%;margin-right:-10px}.carousel-control .icon-next,.carousel-control .icon-prev{width:20px;height:20px;margin-top:-10px;font-family:serif;line-height:1}.carousel-control .icon-prev:before{content:'\2039'}.carousel-control .icon-next:before{content:'\203a'}.carousel-indicators{position:absolute;bottom:10px;left:50%;z-index:15;width:60%;padding-left:0;margin-left:-30%;text-align:center;list-style:none}.carousel-indicators li{display:inline-block;width:10px;height:10px;margin:1px;text-indent:-999px;cursor:pointer;background-color:#000 \9;background-color:rgba(0,0,0,0);border:1px solid #fff;border-radius:10px}.carousel-indicators .active{width:12px;height:12px;margin:0;background-color:#fff}.carousel-caption{position:absolute;right:15%;bottom:20px;left:15%;z-index:10;padding-top:20px;padding-bottom:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6)}.carousel-caption .btn{text-shadow:none}@media screen and (min-width:768px){.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{width:30px;height:30px;margin-top:-15px;font-size:30px}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{margin-left:-15px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{margin-right:-15px}.carousel-caption{right:20%;left:20%;padding-bottom:30px}.carousel-indicators{bottom:20px}}.btn-group-vertical>.btn-group:after,.btn-group-vertical>.btn-group:before,.btn-toolbar:after,.btn-toolbar:before,.clearfix:after,.clearfix:before,.container-fluid:after,.container-fluid:before,.container:after,.container:before,.dl-horizontal dd:after,.dl-horizontal dd:before,.form-horizontal .form-group:after,.form-horizontal .form-group:before,.modal-footer:after,.modal-footer:before,.nav:after,.nav:before,.navbar-collapse:after,.navbar-collapse:before,.navbar-header:after,.navbar-header:before,.navbar:after,.navbar:before,.pager:after,.pager:before,.panel-body:after,.panel-body:before,.row:after,.row:before{display:table;content:" "}.btn-group-vertical>.btn-group:after,.btn-toolbar:after,.clearfix:after,.container-fluid:after,.container:after,.dl-horizontal dd:after,.form-horizontal .form-group:after,.modal-footer:after,.nav:after,.navbar-collapse:after,.navbar-header:after,.navbar:after,.pager:after,.panel-body:after,.row:after{clear:both}.center-block{display:block;margin-right:auto;margin-left:auto}.pull-right{float:right!important}.pull-left{float:left!important}.hide{display:none!important}.show{display:block!important}.invisible{visibility:hidden}.text-hide{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.hidden{display:none!important}.affix{position:fixed}@-ms-viewport{width:device-width}.visible-lg,.visible-md,.visible-sm,.visible-xs{display:none!important}.visible-lg-block,.visible-lg-inline,.visible-lg-inline-block,.visible-md-block,.visible-md-inline,.visible-md-inline-block,.visible-sm-block,.visible-sm-inline,.visible-sm-inline-block,.visible-xs-block,.visible-xs-inline,.visible-xs-inline-block{display:none!important}@media (max-width:767px){.visible-xs{display:block!important}table.visible-xs{display:table}tr.visible-xs{display:table-row!important}td.visible-xs,th.visible-xs{display:table-cell!important}}@media (max-width:767px){.visible-xs-block{display:block!important}}@media (max-width:767px){.visible-xs-inline{display:inline!important}}@media (max-width:767px){.visible-xs-inline-block{display:inline-block!important}}@media (min-width:768px)and (max-width:991px){.visible-sm{display:block!important}table.visible-sm{display:table}tr.visible-sm{display:table-row!important}td.visible-sm,th.visible-sm{display:table-cell!important}}@media (min-width:768px)and (max-width:991px){.visible-sm-block{display:block!important}}@media (min-width:768px)and (max-width:991px){.visible-sm-inline{display:inline!important}}@media (min-width:768px)and (max-width:991px){.visible-sm-inline-block{display:inline-block!important}}@media (min-width:992px)and (max-width:1199px){.visible-md{display:block!important}table.visible-md{display:table}tr.visible-md{display:table-row!important}td.visible-md,th.visible-md{display:table-cell!important}}@media (min-width:992px)and (max-width:1199px){.visible-md-block{display:block!important}}@media (min-width:992px)and (max-width:1199px){.visible-md-inline{display:inline!important}}@media (min-width:992px)and (max-width:1199px){.visible-md-inline-block{display:inline-block!important}}@media (min-width:1200px){.visible-lg{display:block!important}table.visible-lg{display:table}tr.visible-lg{display:table-row!important}td.visible-lg,th.visible-lg{display:table-cell!important}}@media (min-width:1200px){.visible-lg-block{display:block!important}}@media (min-width:1200px){.visible-lg-inline{display:inline!important}}@media (min-width:1200px){.visible-lg-inline-block{display:inline-block!important}}@media (max-width:767px){.hidden-xs{display:none!important}}@media (min-width:768px)and (max-width:991px){.hidden-sm{display:none!important}}@media (min-width:992px)and (max-width:1199px){.hidden-md{display:none!important}}@media (min-width:1200px){.hidden-lg{display:none!important}}.visible-print{display:none!important}@media print{.visible-print{display:block!important}table.visible-print{display:table}tr.visible-print{display:table-row!important}td.visible-print,th.visible-print{display:table-cell!important}}.visible-print-block{display:none!important}@media print{.visible-print-block{display:block!important}}.visible-print-inline{display:none!important}@media print{.visible-print-inline{display:inline!important}}.visible-print-inline-block{display:none!important}@media print{.visible-print-inline-block{display:inline-block!important}}@media print{.hidden-print{display:none!important}}
\ No newline at end of file
diff --git a/applications/auto-scale/gui/src/vendor/bootstrap-css/js/bootstrap.min.js b/applications/auto-scale/gui/src/vendor/bootstrap-css/js/bootstrap.min.js
deleted file mode 100644
index c8f82e5..0000000
--- a/applications/auto-scale/gui/src/vendor/bootstrap-css/js/bootstrap.min.js
+++ /dev/null
@@ -1,7 +0,0 @@
-/*!
- * Bootstrap v3.3.4 (http://getbootstrap.com)
- * Copyright 2011-2015 Twitter, Inc.
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
- */
-if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(a){"use strict";var b=a.fn.jquery.split(" ")[0].split(".");if(b[0]<2&&b[1]<9||1==b[0]&&9==b[1]&&b[2]<1)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher")}(jQuery),+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]};return!1}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one("bsTransitionEnd",function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b(),a.support.transition&&(a.event.special.bsTransitionEnd={bindType:a.support.transition.end,delegateType:a.support.transition.end,handle:function(b){return a(b.target).is(this)?b.handleObj.handler.apply(this,arguments):void 0}})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var c=a(this),e=c.data("bs.alert");e||c.data("bs.alert",e=new d(this)),"string"==typeof b&&e[b].call(c)})}var c='[data-dismiss="alert"]',d=function(b){a(b).on("click",c,this.close)};d.VERSION="3.3.4",d.TRANSITION_DURATION=150,d.prototype.close=function(b){function c(){g.detach().trigger("closed.bs.alert").remove()}var e=a(this),f=e.attr("data-target");f||(f=e.attr("href"),f=f&&f.replace(/.*(?=#[^\s]*$)/,""));var g=a(f);b&&b.preventDefault(),g.length||(g=e.closest(".alert")),g.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(g.removeClass("in"),a.support.transition&&g.hasClass("fade")?g.one("bsTransitionEnd",c).emulateTransitionEnd(d.TRANSITION_DURATION):c())};var e=a.fn.alert;a.fn.alert=b,a.fn.alert.Constructor=d,a.fn.alert.noConflict=function(){return a.fn.alert=e,this},a(document).on("click.bs.alert.data-api",c,d.prototype.close)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof b&&b;e||d.data("bs.button",e=new c(this,f)),"toggle"==b?e.toggle():b&&e.setState(b)})}var c=function(b,d){this.$element=a(b),this.options=a.extend({},c.DEFAULTS,d),this.isLoading=!1};c.VERSION="3.3.4",c.DEFAULTS={loadingText:"loading..."},c.prototype.setState=function(b){var c="disabled",d=this.$element,e=d.is("input")?"val":"html",f=d.data();b+="Text",null==f.resetText&&d.data("resetText",d[e]()),setTimeout(a.proxy(function(){d[e](null==f[b]?this.options[b]:f[b]),"loadingText"==b?(this.isLoading=!0,d.addClass(c).attr(c,c)):this.isLoading&&(this.isLoading=!1,d.removeClass(c).removeAttr(c))},this),0)},c.prototype.toggle=function(){var a=!0,b=this.$element.closest('[data-toggle="buttons"]');if(b.length){var c=this.$element.find("input");"radio"==c.prop("type")&&(c.prop("checked")&&this.$element.hasClass("active")?a=!1:b.find(".active").removeClass("active")),a&&c.prop("checked",!this.$element.hasClass("active")).trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active"));a&&this.$element.toggleClass("active")};var d=a.fn.button;a.fn.button=b,a.fn.button.Constructor=c,a.fn.button.noConflict=function(){return a.fn.button=d,this},a(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(c){var d=a(c.target);d.hasClass("btn")||(d=d.closest(".btn")),b.call(d,"toggle"),c.preventDefault()}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(b){a(b.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(b.type))})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},c.DEFAULTS,d.data(),"object"==typeof b&&b),g="string"==typeof b?b:f.slide;e||d.data("bs.carousel",e=new c(this,f)),"number"==typeof b?e.to(b):g?e[g]():f.interval&&e.pause().cycle()})}var c=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",a.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",a.proxy(this.pause,this)).on("mouseleave.bs.carousel",a.proxy(this.cycle,this))};c.VERSION="3.3.4",c.TRANSITION_DURATION=600,c.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},c.prototype.keydown=function(a){if(!/input|textarea/i.test(a.target.tagName)){switch(a.which){case 37:this.prev();break;case 39:this.next();break;default:return}a.preventDefault()}},c.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},c.prototype.getItemIndex=function(a){return this.$items=a.parent().children(".item"),this.$items.index(a||this.$active)},c.prototype.getItemForDirection=function(a,b){var c=this.getItemIndex(b),d="prev"==a&&0===c||"next"==a&&c==this.$items.length-1;if(d&&!this.options.wrap)return b;var e="prev"==a?-1:1,f=(c+e)%this.$items.length;return this.$items.eq(f)},c.prototype.to=function(a){var b=this,c=this.getItemIndex(this.$active=this.$element.find(".item.active"));return a>this.$items.length-1||0>a?void 0:this.sliding?this.$element.one("slid.bs.carousel",function(){b.to(a)}):c==a?this.pause().cycle():this.slide(a>c?"next":"prev",this.$items.eq(a))},c.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},c.prototype.next=function(){return this.sliding?void 0:this.slide("next")},c.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},c.prototype.slide=function(b,d){var e=this.$element.find(".item.active"),f=d||this.getItemForDirection(b,e),g=this.interval,h="next"==b?"left":"right",i=this;if(f.hasClass("active"))return this.sliding=!1;var j=f[0],k=a.Event("slide.bs.carousel",{relatedTarget:j,direction:h});if(this.$element.trigger(k),!k.isDefaultPrevented()){if(this.sliding=!0,g&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var l=a(this.$indicators.children()[this.getItemIndex(f)]);l&&l.addClass("active")}var m=a.Event("slid.bs.carousel",{relatedTarget:j,direction:h});return a.support.transition&&this.$element.hasClass("slide")?(f.addClass(b),f[0].offsetWidth,e.addClass(h),f.addClass(h),e.one("bsTransitionEnd",function(){f.removeClass([b,h].join(" ")).addClass("active"),e.removeClass(["active",h].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger(m)},0)}).emulateTransitionEnd(c.TRANSITION_DURATION)):(e.removeClass("active"),f.addClass("active"),this.sliding=!1,this.$element.trigger(m)),g&&this.cycle(),this}};var d=a.fn.carousel;a.fn.carousel=b,a.fn.carousel.Constructor=c,a.fn.carousel.noConflict=function(){return a.fn.carousel=d,this};var e=function(c){var d,e=a(this),f=a(e.attr("data-target")||(d=e.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""));if(f.hasClass("carousel")){var g=a.extend({},f.data(),e.data()),h=e.attr("data-slide-to");h&&(g.interval=!1),b.call(f,g),h&&f.data("bs.carousel").to(h),c.preventDefault()}};a(document).on("click.bs.carousel.data-api","[data-slide]",e).on("click.bs.carousel.data-api","[data-slide-to]",e),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var c=a(this);b.call(c,c.data())})})}(jQuery),+function(a){"use strict";function b(b){var c,d=b.attr("data-target")||(c=b.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"");return a(d)}function c(b){return this.each(function(){var c=a(this),e=c.data("bs.collapse"),f=a.extend({},d.DEFAULTS,c.data(),"object"==typeof b&&b);!e&&f.toggle&&/show|hide/.test(b)&&(f.toggle=!1),e||c.data("bs.collapse",e=new d(this,f)),"string"==typeof b&&e[b]()})}var d=function(b,c){this.$element=a(b),this.options=a.extend({},d.DEFAULTS,c),this.$trigger=a('[data-toggle="collapse"][href="#'+b.id+'"],[data-toggle="collapse"][data-target="#'+b.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};d.VERSION="3.3.4",d.TRANSITION_DURATION=350,d.DEFAULTS={toggle:!0},d.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},d.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var b,e=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(e&&e.length&&(b=e.data("bs.collapse"),b&&b.transitioning))){var f=a.Event("show.bs.collapse");if(this.$element.trigger(f),!f.isDefaultPrevented()){e&&e.length&&(c.call(e,"hide"),b||e.data("bs.collapse",null));var g=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[g](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var h=function(){this.$element.removeClass("collapsing").addClass("collapse in")[g](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return h.call(this);var i=a.camelCase(["scroll",g].join("-"));this.$element.one("bsTransitionEnd",a.proxy(h,this)).emulateTransitionEnd(d.TRANSITION_DURATION)[g](this.$element[0][i])}}}},d.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var e=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};return a.support.transition?void this.$element[c](0).one("bsTransitionEnd",a.proxy(e,this)).emulateTransitionEnd(d.TRANSITION_DURATION):e.call(this)}}},d.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},d.prototype.getParent=function(){return a(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(a.proxy(function(c,d){var e=a(d);this.addAriaAndCollapsedClass(b(e),e)},this)).end()},d.prototype.addAriaAndCollapsedClass=function(a,b){var c=a.hasClass("in");a.attr("aria-expanded",c),b.toggleClass("collapsed",!c).attr("aria-expanded",c)};var e=a.fn.collapse;a.fn.collapse=c,a.fn.collapse.Constructor=d,a.fn.collapse.noConflict=function(){return a.fn.collapse=e,this},a(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(d){var e=a(this);e.attr("data-target")||d.preventDefault();var f=b(e),g=f.data("bs.collapse"),h=g?"toggle":e.data();c.call(f,h)})}(jQuery),+function(a){"use strict";function b(b){b&&3===b.which||(a(e).remove(),a(f).each(function(){var d=a(this),e=c(d),f={relatedTarget:this};e.hasClass("open")&&(e.trigger(b=a.Event("hide.bs.dropdown",f)),b.isDefaultPrevented()||(d.attr("aria-expanded","false"),e.removeClass("open").trigger("hidden.bs.dropdown",f)))}))}function c(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#[A-Za-z]/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}function d(b){return this.each(function(){var c=a(this),d=c.data("bs.dropdown");d||c.data("bs.dropdown",d=new g(this)),"string"==typeof b&&d[b].call(c)})}var e=".dropdown-backdrop",f='[data-toggle="dropdown"]',g=function(b){a(b).on("click.bs.dropdown",this.toggle)};g.VERSION="3.3.4",g.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=c(e),g=f.hasClass("open");if(b(),!g){"ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a('<div class="dropdown-backdrop"/>').insertAfter(a(this)).on("click",b);var h={relatedTarget:this};if(f.trigger(d=a.Event("show.bs.dropdown",h)),d.isDefaultPrevented())return;e.trigger("focus").attr("aria-expanded","true"),f.toggleClass("open").trigger("shown.bs.dropdown",h)}return!1}},g.prototype.keydown=function(b){if(/(38|40|27|32)/.test(b.which)&&!/input|textarea/i.test(b.target.tagName)){var d=a(this);if(b.preventDefault(),b.stopPropagation(),!d.is(".disabled, :disabled")){var e=c(d),g=e.hasClass("open");if(!g&&27!=b.which||g&&27==b.which)return 27==b.which&&e.find(f).trigger("focus"),d.trigger("click");var h=" li:not(.disabled):visible a",i=e.find('[role="menu"]'+h+', [role="listbox"]'+h);if(i.length){var j=i.index(b.target);38==b.which&&j>0&&j--,40==b.which&&j<i.length-1&&j++,~j||(j=0),i.eq(j).trigger("focus")}}}};var h=a.fn.dropdown;a.fn.dropdown=d,a.fn.dropdown.Constructor=g,a.fn.dropdown.noConflict=function(){return a.fn.dropdown=h,this},a(document).on("click.bs.dropdown.data-api",b).on("click.bs.dropdown.data-api",".dropdown form",function(a){a.stopPropagation()}).on("click.bs.dropdown.data-api",f,g.prototype.toggle).on("keydown.bs.dropdown.data-api",f,g.prototype.keydown).on("keydown.bs.dropdown.data-api",'[role="menu"]',g.prototype.keydown).on("keydown.bs.dropdown.data-api",'[role="listbox"]',g.prototype.keydown)}(jQuery),+function(a){"use strict";function b(b,d){return this.each(function(){var e=a(this),f=e.data("bs.modal"),g=a.extend({},c.DEFAULTS,e.data(),"object"==typeof b&&b);f||e.data("bs.modal",f=new c(this,g)),"string"==typeof b?f[b](d):g.show&&f.show(d)})}var c=function(b,c){this.options=c,this.$body=a(document.body),this.$element=a(b),this.$dialog=this.$element.find(".modal-dialog"),this.$backdrop=null,this.isShown=null,this.originalBodyPad=null,this.scrollbarWidth=0,this.ignoreBackdropClick=!1,this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,a.proxy(function(){this.$element.trigger("loaded.bs.modal")},this))};c.VERSION="3.3.4",c.TRANSITION_DURATION=300,c.BACKDROP_TRANSITION_DURATION=150,c.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},c.prototype.toggle=function(a){return this.isShown?this.hide():this.show(a)},c.prototype.show=function(b){var d=this,e=a.Event("show.bs.modal",{relatedTarget:b});this.$element.trigger(e),this.isShown||e.isDefaultPrevented()||(this.isShown=!0,this.checkScrollbar(),this.setScrollbar(),this.$body.addClass("modal-open"),this.escape(),this.resize(),this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',a.proxy(this.hide,this)),this.$dialog.on("mousedown.dismiss.bs.modal",function(){d.$element.one("mouseup.dismiss.bs.modal",function(b){a(b.target).is(d.$element)&&(d.ignoreBackdropClick=!0)})}),this.backdrop(function(){var e=a.support.transition&&d.$element.hasClass("fade");d.$element.parent().length||d.$element.appendTo(d.$body),d.$element.show().scrollTop(0),d.adjustDialog(),e&&d.$element[0].offsetWidth,d.$element.addClass("in").attr("aria-hidden",!1),d.enforceFocus();var f=a.Event("shown.bs.modal",{relatedTarget:b});e?d.$dialog.one("bsTransitionEnd",function(){d.$element.trigger("focus").trigger(f)}).emulateTransitionEnd(c.TRANSITION_DURATION):d.$element.trigger("focus").trigger(f)}))},c.prototype.hide=function(b){b&&b.preventDefault(),b=a.Event("hide.bs.modal"),this.$element.trigger(b),this.isShown&&!b.isDefaultPrevented()&&(this.isShown=!1,this.escape(),this.resize(),a(document).off("focusin.bs.modal"),this.$element.removeClass("in").attr("aria-hidden",!0).off("click.dismiss.bs.modal").off("mouseup.dismiss.bs.modal"),this.$dialog.off("mousedown.dismiss.bs.modal"),a.support.transition&&this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd",a.proxy(this.hideModal,this)).emulateTransitionEnd(c.TRANSITION_DURATION):this.hideModal())},c.prototype.enforceFocus=function(){a(document).off("focusin.bs.modal").on("focusin.bs.modal",a.proxy(function(a){this.$element[0]===a.target||this.$element.has(a.target).length||this.$element.trigger("focus")},this))},c.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keydown.dismiss.bs.modal",a.proxy(function(a){27==a.which&&this.hide()},this)):this.isShown||this.$element.off("keydown.dismiss.bs.modal")},c.prototype.resize=function(){this.isShown?a(window).on("resize.bs.modal",a.proxy(this.handleUpdate,this)):a(window).off("resize.bs.modal")},c.prototype.hideModal=function(){var a=this;this.$element.hide(),this.backdrop(function(){a.$body.removeClass("modal-open"),a.resetAdjustments(),a.resetScrollbar(),a.$element.trigger("hidden.bs.modal")})},c.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},c.prototype.backdrop=function(b){var d=this,e=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var f=a.support.transition&&e;if(this.$backdrop=a('<div class="modal-backdrop '+e+'" />').appendTo(this.$body),this.$element.on("click.dismiss.bs.modal",a.proxy(function(a){return this.ignoreBackdropClick?void(this.ignoreBackdropClick=!1):void(a.target===a.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus():this.hide()))},this)),f&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!b)return;f?this.$backdrop.one("bsTransitionEnd",b).emulateTransitionEnd(c.BACKDROP_TRANSITION_DURATION):b()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass("in");var g=function(){d.removeBackdrop(),b&&b()};a.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",g).emulateTransitionEnd(c.BACKDROP_TRANSITION_DURATION):g()}else b&&b()},c.prototype.handleUpdate=function(){this.adjustDialog()},c.prototype.adjustDialog=function(){var a=this.$element[0].scrollHeight>document.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&a?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!a?this.scrollbarWidth:""})},c.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},c.prototype.checkScrollbar=function(){var a=window.innerWidth;if(!a){var b=document.documentElement.getBoundingClientRect();a=b.right-Math.abs(b.left)}this.bodyIsOverflowing=document.body.clientWidth<a,this.scrollbarWidth=this.measureScrollbar()},c.prototype.setScrollbar=function(){var a=parseInt(this.$body.css("padding-right")||0,10);this.originalBodyPad=document.body.style.paddingRight||"",this.bodyIsOverflowing&&this.$body.css("padding-right",a+this.scrollbarWidth)},c.prototype.resetScrollbar=function(){this.$body.css("padding-right",this.originalBodyPad)},c.prototype.measureScrollbar=function(){var a=document.createElement("div");a.className="modal-scrollbar-measure",this.$body.append(a);var b=a.offsetWidth-a.clientWidth;return this.$body[0].removeChild(a),b};var d=a.fn.modal;a.fn.modal=b,a.fn.modal.Constructor=c,a.fn.modal.noConflict=function(){return a.fn.modal=d,this},a(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(c){var d=a(this),e=d.attr("href"),f=a(d.attr("data-target")||e&&e.replace(/.*(?=#[^\s]+$)/,"")),g=f.data("bs.modal")?"toggle":a.extend({remote:!/#/.test(e)&&e},f.data(),d.data());d.is("a")&&c.preventDefault(),f.one("show.bs.modal",function(a){a.isDefaultPrevented()||f.one("hidden.bs.modal",function(){d.is(":visible")&&d.trigger("focus")})}),b.call(f,g,this)})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.tooltip"),f="object"==typeof b&&b;(e||!/destroy|hide/.test(b))&&(e||d.data("bs.tooltip",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.type=null,this.options=null,this.enabled=null,this.timeout=null,this.hoverState=null,this.$element=null,this.init("tooltip",a,b)};c.VERSION="3.3.4",c.TRANSITION_DURATION=150,c.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},c.prototype.init=function(b,c,d){if(this.enabled=!0,this.type=b,this.$element=a(c),this.options=this.getOptions(d),this.$viewport=this.options.viewport&&a(this.options.viewport.selector||this.options.viewport),this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var e=this.options.trigger.split(" "),f=e.length;f--;){var g=e[f];if("click"==g)this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this));else if("manual"!=g){var h="hover"==g?"mouseenter":"focusin",i="hover"==g?"mouseleave":"focusout";this.$element.on(h+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(i+"."+this.type,this.options.selector,a.proxy(this.leave,this))}}this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.getOptions=function(b){return b=a.extend({},this.getDefaults(),this.$element.data(),b),b.delay&&"number"==typeof b.delay&&(b.delay={show:b.delay,hide:b.delay}),b},c.prototype.getDelegateOptions=function(){var b={},c=this.getDefaults();return this._options&&a.each(this._options,function(a,d){c[a]!=d&&(b[a]=d)}),b},c.prototype.enter=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c&&c.$tip&&c.$tip.is(":visible")?void(c.hoverState="in"):(c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),clearTimeout(c.timeout),c.hoverState="in",c.options.delay&&c.options.delay.show?void(c.timeout=setTimeout(function(){"in"==c.hoverState&&c.show()},c.options.delay.show)):c.show())},c.prototype.leave=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),clearTimeout(c.timeout),c.hoverState="out",c.options.delay&&c.options.delay.hide?void(c.timeout=setTimeout(function(){"out"==c.hoverState&&c.hide()},c.options.delay.hide)):c.hide()},c.prototype.show=function(){var b=a.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(b);var d=a.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(b.isDefaultPrevented()||!d)return;var e=this,f=this.tip(),g=this.getUID(this.type);this.setContent(),f.attr("id",g),this.$element.attr("aria-describedby",g),this.options.animation&&f.addClass("fade");var h="function"==typeof this.options.placement?this.options.placement.call(this,f[0],this.$element[0]):this.options.placement,i=/\s?auto?\s?/i,j=i.test(h);j&&(h=h.replace(i,"")||"top"),f.detach().css({top:0,left:0,display:"block"}).addClass(h).data("bs."+this.type,this),this.options.container?f.appendTo(this.options.container):f.insertAfter(this.$element);var k=this.getPosition(),l=f[0].offsetWidth,m=f[0].offsetHeight;if(j){var n=h,o=this.options.container?a(this.options.container):this.$element.parent(),p=this.getPosition(o);h="bottom"==h&&k.bottom+m>p.bottom?"top":"top"==h&&k.top-m<p.top?"bottom":"right"==h&&k.right+l>p.width?"left":"left"==h&&k.left-l<p.left?"right":h,f.removeClass(n).addClass(h)}var q=this.getCalculatedOffset(h,k,l,m);this.applyPlacement(q,h);var r=function(){var a=e.hoverState;e.$element.trigger("shown.bs."+e.type),e.hoverState=null,"out"==a&&e.leave(e)};a.support.transition&&this.$tip.hasClass("fade")?f.one("bsTransitionEnd",r).emulateTransitionEnd(c.TRANSITION_DURATION):r()}},c.prototype.applyPlacement=function(b,c){var d=this.tip(),e=d[0].offsetWidth,f=d[0].offsetHeight,g=parseInt(d.css("margin-top"),10),h=parseInt(d.css("margin-left"),10);isNaN(g)&&(g=0),isNaN(h)&&(h=0),b.top=b.top+g,b.left=b.left+h,a.offset.setOffset(d[0],a.extend({using:function(a){d.css({top:Math.round(a.top),left:Math.round(a.left)})}},b),0),d.addClass("in");var i=d[0].offsetWidth,j=d[0].offsetHeight;"top"==c&&j!=f&&(b.top=b.top+f-j);var k=this.getViewportAdjustedDelta(c,b,i,j);k.left?b.left+=k.left:b.top+=k.top;var l=/top|bottom/.test(c),m=l?2*k.left-e+i:2*k.top-f+j,n=l?"offsetWidth":"offsetHeight";d.offset(b),this.replaceArrow(m,d[0][n],l)},c.prototype.replaceArrow=function(a,b,c){this.arrow().css(c?"left":"top",50*(1-a/b)+"%").css(c?"top":"left","")},c.prototype.setContent=function(){var a=this.tip(),b=this.getTitle();a.find(".tooltip-inner")[this.options.html?"html":"text"](b),a.removeClass("fade in top bottom left right")},c.prototype.hide=function(b){function d(){"in"!=e.hoverState&&f.detach(),e.$element.removeAttr("aria-describedby").trigger("hidden.bs."+e.type),b&&b()}var e=this,f=a(this.$tip),g=a.Event("hide.bs."+this.type);return this.$element.trigger(g),g.isDefaultPrevented()?void 0:(f.removeClass("in"),a.support.transition&&f.hasClass("fade")?f.one("bsTransitionEnd",d).emulateTransitionEnd(c.TRANSITION_DURATION):d(),this.hoverState=null,this)},c.prototype.fixTitle=function(){var a=this.$element;(a.attr("title")||"string"!=typeof a.attr("data-original-title"))&&a.attr("data-original-title",a.attr("title")||"").attr("title","")},c.prototype.hasContent=function(){return this.getTitle()},c.prototype.getPosition=function(b){b=b||this.$element;var c=b[0],d="BODY"==c.tagName,e=c.getBoundingClientRect();null==e.width&&(e=a.extend({},e,{width:e.right-e.left,height:e.bottom-e.top}));var f=d?{top:0,left:0}:b.offset(),g={scroll:d?document.documentElement.scrollTop||document.body.scrollTop:b.scrollTop()},h=d?{width:a(window).width(),height:a(window).height()}:null;return a.extend({},e,g,h,f)},c.prototype.getCalculatedOffset=function(a,b,c,d){return"bottom"==a?{top:b.top+b.height,left:b.left+b.width/2-c/2}:"top"==a?{top:b.top-d,left:b.left+b.width/2-c/2}:"left"==a?{top:b.top+b.height/2-d/2,left:b.left-c}:{top:b.top+b.height/2-d/2,left:b.left+b.width}},c.prototype.getViewportAdjustedDelta=function(a,b,c,d){var e={top:0,left:0};if(!this.$viewport)return e;var f=this.options.viewport&&this.options.viewport.padding||0,g=this.getPosition(this.$viewport);if(/right|left/.test(a)){var h=b.top-f-g.scroll,i=b.top+f-g.scroll+d;h<g.top?e.top=g.top-h:i>g.top+g.height&&(e.top=g.top+g.height-i)}else{var j=b.left-f,k=b.left+f+c;j<g.left?e.left=g.left-j:k>g.width&&(e.left=g.left+g.width-k)}return e},c.prototype.getTitle=function(){var a,b=this.$element,c=this.options;return a=b.attr("data-original-title")||("function"==typeof c.title?c.title.call(b[0]):c.title)},c.prototype.getUID=function(a){do a+=~~(1e6*Math.random());while(document.getElementById(a));return a},c.prototype.tip=function(){return this.$tip=this.$tip||a(this.options.template)},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},c.prototype.enable=function(){this.enabled=!0},c.prototype.disable=function(){this.enabled=!1},c.prototype.toggleEnabled=function(){this.enabled=!this.enabled},c.prototype.toggle=function(b){var c=this;b&&(c=a(b.currentTarget).data("bs."+this.type),c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c))),c.tip().hasClass("in")?c.leave(c):c.enter(c)},c.prototype.destroy=function(){var a=this;clearTimeout(this.timeout),this.hide(function(){a.$element.off("."+a.type).removeData("bs."+a.type)})};var d=a.fn.tooltip;a.fn.tooltip=b,a.fn.tooltip.Constructor=c,a.fn.tooltip.noConflict=function(){return a.fn.tooltip=d,this}}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof b&&b;(e||!/destroy|hide/.test(b))&&(e||d.data("bs.popover",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.init("popover",a,b)};if(!a.fn.tooltip)throw new Error("Popover requires tooltip.js");c.VERSION="3.3.4",c.DEFAULTS=a.extend({},a.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),c.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),c.prototype.constructor=c,c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof c?"html":"append":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},c.prototype.hasContent=function(){return this.getTitle()||this.getContent()},c.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var d=a.fn.popover;a.fn.popover=b,a.fn.popover.Constructor=c,a.fn.popover.noConflict=function(){return a.fn.popover=d,this}}(jQuery),+function(a){"use strict";function b(c,d){this.$body=a(document.body),this.$scrollElement=a(a(c).is(document.body)?window:c),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",a.proxy(this.process,this)),this.refresh(),this.process()}function c(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})}b.VERSION="3.3.4",b.DEFAULTS={offset:10},b.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},b.prototype.refresh=function(){var b=this,c="offset",d=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),a.isWindow(this.$scrollElement[0])||(c="position",d=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var b=a(this),e=b.data("target")||b.attr("href"),f=/^#./.test(e)&&a(e);return f&&f.length&&f.is(":visible")&&[[f[c]().top+d,e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){b.offsets.push(this[0]),b.targets.push(this[1])})},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.getScrollHeight(),d=this.options.offset+c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(this.scrollHeight!=c&&this.refresh(),b>=d)return g!=(a=f[f.length-1])&&this.activate(a);if(g&&b<e[0])return this.activeTarget=null,this.clear();for(a=e.length;a--;)g!=f[a]&&b>=e[a]&&(void 0===e[a+1]||b<e[a+1])&&this.activate(f[a])},b.prototype.activate=function(b){this.activeTarget=b,this.clear();var c=this.selector+'[data-target="'+b+'"],'+this.selector+'[href="'+b+'"]',d=a(c).parents("li").addClass("active");d.parent(".dropdown-menu").length&&(d=d.closest("li.dropdown").addClass("active")),d.trigger("activate.bs.scrollspy")},b.prototype.clear=function(){a(this.selector).parentsUntil(this.options.target,".active").removeClass("active")};var d=a.fn.scrollspy;a.fn.scrollspy=c,a.fn.scrollspy.Constructor=b,a.fn.scrollspy.noConflict=function(){return a.fn.scrollspy=d,this},a(window).on("load.bs.scrollspy.data-api",function(){a('[data-spy="scroll"]').each(function(){var b=a(this);c.call(b,b.data())})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.tab");e||d.data("bs.tab",e=new c(this)),"string"==typeof b&&e[b]()})}var c=function(b){this.element=a(b)};c.VERSION="3.3.4",c.TRANSITION_DURATION=150,c.prototype.show=function(){var b=this.element,c=b.closest("ul:not(.dropdown-menu)"),d=b.data("target");if(d||(d=b.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,"")),!b.parent("li").hasClass("active")){
-var e=c.find(".active:last a"),f=a.Event("hide.bs.tab",{relatedTarget:b[0]}),g=a.Event("show.bs.tab",{relatedTarget:e[0]});if(e.trigger(f),b.trigger(g),!g.isDefaultPrevented()&&!f.isDefaultPrevented()){var h=a(d);this.activate(b.closest("li"),c),this.activate(h,h.parent(),function(){e.trigger({type:"hidden.bs.tab",relatedTarget:b[0]}),b.trigger({type:"shown.bs.tab",relatedTarget:e[0]})})}}},c.prototype.activate=function(b,d,e){function f(){g.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),b.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),h?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu").length&&b.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),e&&e()}var g=d.find("> .active"),h=e&&a.support.transition&&(g.length&&g.hasClass("fade")||!!d.find("> .fade").length);g.length&&h?g.one("bsTransitionEnd",f).emulateTransitionEnd(c.TRANSITION_DURATION):f(),g.removeClass("in")};var d=a.fn.tab;a.fn.tab=b,a.fn.tab.Constructor=c,a.fn.tab.noConflict=function(){return a.fn.tab=d,this};var e=function(c){c.preventDefault(),b.call(a(this),"show")};a(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',e).on("click.bs.tab.data-api",'[data-toggle="pill"]',e)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof b&&b;e||d.data("bs.affix",e=new c(this,f)),"string"==typeof b&&e[b]()})}var c=function(b,d){this.options=a.extend({},c.DEFAULTS,d),this.$target=a(this.options.target).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(b),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};c.VERSION="3.3.4",c.RESET="affix affix-top affix-bottom",c.DEFAULTS={offset:0,target:window},c.prototype.getState=function(a,b,c,d){var e=this.$target.scrollTop(),f=this.$element.offset(),g=this.$target.height();if(null!=c&&"top"==this.affixed)return c>e?"top":!1;if("bottom"==this.affixed)return null!=c?e+this.unpin<=f.top?!1:"bottom":a-d>=e+g?!1:"bottom";var h=null==this.affixed,i=h?e:f.top,j=h?g:b;return null!=c&&c>=e?"top":null!=d&&i+j>=a-d?"bottom":!1},c.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(c.RESET).addClass("affix");var a=this.$target.scrollTop(),b=this.$element.offset();return this.pinnedOffset=b.top-a},c.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},c.prototype.checkPosition=function(){if(this.$element.is(":visible")){var b=this.$element.height(),d=this.options.offset,e=d.top,f=d.bottom,g=a(document.body).height();"object"!=typeof d&&(f=e=d),"function"==typeof e&&(e=d.top(this.$element)),"function"==typeof f&&(f=d.bottom(this.$element));var h=this.getState(g,b,e,f);if(this.affixed!=h){null!=this.unpin&&this.$element.css("top","");var i="affix"+(h?"-"+h:""),j=a.Event(i+".bs.affix");if(this.$element.trigger(j),j.isDefaultPrevented())return;this.affixed=h,this.unpin="bottom"==h?this.getPinnedOffset():null,this.$element.removeClass(c.RESET).addClass(i).trigger(i.replace("affix","affixed")+".bs.affix")}"bottom"==h&&this.$element.offset({top:g-b-f})}};var d=a.fn.affix;a.fn.affix=b,a.fn.affix.Constructor=c,a.fn.affix.noConflict=function(){return a.fn.affix=d,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var c=a(this),d=c.data();d.offset=d.offset||{},null!=d.offsetBottom&&(d.offset.bottom=d.offsetBottom),null!=d.offsetTop&&(d.offset.top=d.offsetTop),b.call(c,d)})})}(jQuery);
\ No newline at end of file
diff --git a/applications/auto-scale/gui/src/vendor/ng-lodash/.bower.json b/applications/auto-scale/gui/src/vendor/ng-lodash/.bower.json
deleted file mode 100644
index a913870..0000000
--- a/applications/auto-scale/gui/src/vendor/ng-lodash/.bower.json
+++ /dev/null
@@ -1,43 +0,0 @@
-{
- "name": "ng-lodash",
- "version": "0.3.0",
- "description": "An Angular module wrapper for lodash",
- "author": [
- "Rockabox <tech@rockabox.com> (http://www.rockabox.com)"
- ],
- "license": "MIT",
- "keywords": [
- "nglodash",
- "angular",
- "lodash"
- ],
- "ignore": [
- "test",
- "*.",
- "karma.conf.js",
- "Gruntfile.js"
- ],
- "repository": {
- "type": "git",
- "url": "git://github.com/rockabox/ng-lodash.git"
- },
- "main": [
- "build/ng-lodash.js"
- ],
- "dependencies": {
- "angular": ">=1.2"
- },
- "devDependencies": {
- "angular-mocks": ">=1.2"
- },
- "homepage": "https://github.com/rockabox/ng-lodash",
- "_release": "0.3.0",
- "_resolution": {
- "type": "version",
- "tag": "0.3.0",
- "commit": "16eedfec93b22cea2bbf1732b96d08fc11bce5f6"
- },
- "_source": "git://github.com/rockabox/ng-lodash.git",
- "_target": "~0.3.0",
- "_originalSource": "ng-lodash"
-}
\ No newline at end of file
diff --git a/applications/auto-scale/gui/src/vendor/ng-lodash/.bowerrc b/applications/auto-scale/gui/src/vendor/ng-lodash/.bowerrc
deleted file mode 100644
index daf4083..0000000
--- a/applications/auto-scale/gui/src/vendor/ng-lodash/.bowerrc
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "directory": "lib"
-}
diff --git a/applications/auto-scale/gui/src/vendor/ng-lodash/.editorconfig b/applications/auto-scale/gui/src/vendor/ng-lodash/.editorconfig
deleted file mode 100644
index 03b2556..0000000
--- a/applications/auto-scale/gui/src/vendor/ng-lodash/.editorconfig
+++ /dev/null
@@ -1,12 +0,0 @@
-# editorconfig.org
-
-root = true
-
-[*]
-indent_style = space
-indent_size = 4
-end_of_line = lf
-charset = utf-8
-trim_trailing_whitespace = true
-insert_final_newline = true
-max_line_length = 120
diff --git a/applications/auto-scale/gui/src/vendor/ng-lodash/.gitignore b/applications/auto-scale/gui/src/vendor/ng-lodash/.gitignore
deleted file mode 100644
index 904971f..0000000
--- a/applications/auto-scale/gui/src/vendor/ng-lodash/.gitignore
+++ /dev/null
@@ -1,3 +0,0 @@
-.grunt
-node_modules
-lib
diff --git a/applications/auto-scale/gui/src/vendor/ng-lodash/.jscsrc b/applications/auto-scale/gui/src/vendor/ng-lodash/.jscsrc
deleted file mode 100644
index 84bb7cf..0000000
--- a/applications/auto-scale/gui/src/vendor/ng-lodash/.jscsrc
+++ /dev/null
@@ -1,153 +0,0 @@
-{
- "requireCurlyBraces": [
- "if",
- "else",
- "for",
- "while",
- "do",
- "try",
- "catch"
- ],
- "requireSpaceAfterKeywords": [
- "if",
- "else",
- "for",
- "while",
- "do",
- "switch",
- "return",
- "try",
- "catch"
- ],
- "requireSpaceBeforeBlockStatements": true,
- "requireSpacesInConditionalExpression": {
- "afterTest": true,
- "beforeConsequent": true,
- "afterConsequent": true,
- "beforeAlternate": true
- },
- "requireSpacesInFunctionExpression": {
- "beforeOpeningRoundBrace": true,
- "beforeOpeningCurlyBrace": true
- },
- "requireSpacesInAnonymousFunctionExpression": {
- "beforeOpeningRoundBrace": true,
- "beforeOpeningCurlyBrace": true
- },
- "requireSpacesInNamedFunctionExpression": {
- "beforeOpeningRoundBrace": true,
- "beforeOpeningCurlyBrace": true
- },
- "requireSpacesInFunctionDeclaration": {
- "beforeOpeningRoundBrace": true,
- "beforeOpeningCurlyBrace": true
- },
- "requireMultipleVarDecl": true,
- "requireBlocksOnNewline": 1,
- "disallowEmptyBlocks": true,
- "disallowSpacesInsideObjectBrackets": true,
- "disallowSpacesInsideArrayBrackets": true,
- "disallowSpacesInsideParentheses": true,
- "disallowSpaceAfterObjectKeys": true,
- "requireCommaBeforeLineBreak": true,
- "requireOperatorBeforeLineBreak": [
- "?",
- "=",
- "+",
- "-",
- "/",
- "*",
- "==",
- "===",
- "!=",
- "!==",
- ">",
- ">=",
- "<",
- "<="
- ],
- "requireSpaceBeforeBinaryOperators": [
- "?",
- "=",
- "+",
- "-",
- "/",
- "*",
- "==",
- "===",
- "!=",
- "!==",
- ">",
- ">=",
- "<",
- "<="
- ],
- "requireSpaceAfterBinaryOperators": [
- "?",
- "=",
- "+",
- "/",
- "*",
- ":",
- "==",
- "===",
- "!=",
- "!==",
- ">",
- ">=",
- "<",
- "<=",
- ","
- ],
- "disallowSpaceBeforeBinaryOperators": [","],
- "disallowSpaceAfterPrefixUnaryOperators": ["++", "--", "+", "-", "~", "!"],
- "disallowSpaceBeforePostfixUnaryOperators": ["++", "--"],
- "requireSpaceBeforeBinaryOperators": [
- "=",
- "+",
- "-",
- "/",
- "*",
- "==",
- "===",
- "!=",
- "!=="
- ],
- "requireSpaceAfterBinaryOperators": [
- "=",
- ",",
- "+",
- "-",
- "/",
- "*",
- "==",
- "===",
- "!=",
- "!=="
- ],
- "disallowImplicitTypeConversion": [
- "numeric",
- "boolean",
- "binary",
- "string"
- ],
- "requireCamelCaseOrUpperCaseIdentifiers": true,
- "disallowKeywords": ["with"],
- "disallowMultipleLineBreaks": true,
- "validateLineBreaks": "LF",
- "validateQuoteMarks": "'",
- "validateIndentation": 4,
- "disallowMixedSpacesAndTabs": true,
- "disallowTrailingWhitespace": true,
- "disallowTrailingComma": true,
- "disallowKeywordsOnNewLine": ["else"],
- "maximumLineLength": 120,
- "safeContextKeyword": ["$this"],
- "disallowYodaConditions": true,
- "validateJSDoc": {
- "checkParamNames": true,
- "checkRedundantParams": true,
- "requireParamTypes": true
- },
- "requireLineFeedAtFileEnd": true
-}
diff --git a/applications/auto-scale/gui/src/vendor/ng-lodash/.jshintrc b/applications/auto-scale/gui/src/vendor/ng-lodash/.jshintrc
deleted file mode 100644
index 75c081f..0000000
--- a/applications/auto-scale/gui/src/vendor/ng-lodash/.jshintrc
+++ /dev/null
@@ -1,19 +0,0 @@
-{
- // Predefined globals
- "browser" : true, // Standard browser globals
-
- // Development
- "debug" : false, // Allow debugger statements e.g. browser breakpoints.
- "devel" : true, // Allow development statements e.g. `console.log();`.
-
- // The Good Parts
- "evil" : false, // Tolerate use of `eval`.
- "regexdash" : true, // Tolerate unescaped last dash i.e. `[-...]`.
- "trailing" : true, // Prohibit trailing whitespaces.
- "sub" : true, // Tolerate all forms of subscript notation besides dot notation e.g. `dict['key']` instead of `dict.key`.
- "eqeqeq" : false, // Require triple equals i.e. `===`.
-
- // Styling preferences.
- "indent" : 4, // Indent level
- "camelcase" : true // Use CAMEL Casing for variables
-}
diff --git a/applications/auto-scale/gui/src/vendor/ng-lodash/.travis.yml b/applications/auto-scale/gui/src/vendor/ng-lodash/.travis.yml
deleted file mode 100644
index 6e5919d..0000000
--- a/applications/auto-scale/gui/src/vendor/ng-lodash/.travis.yml
+++ /dev/null
@@ -1,3 +0,0 @@
-language: node_js
-node_js:
- - "0.10"
diff --git a/applications/auto-scale/gui/src/vendor/ng-lodash/CONTRIBUTING.md b/applications/auto-scale/gui/src/vendor/ng-lodash/CONTRIBUTING.md
deleted file mode 100644
index 930d581..0000000
--- a/applications/auto-scale/gui/src/vendor/ng-lodash/CONTRIBUTING.md
+++ /dev/null
@@ -1,657 +0,0 @@
-# Contributing
-
-This document outlines general guidelines, best practices and coding style rules
-for developers contributing to the project.
-
-## Contents
-
-- [Pull requests](#pull-requests)
-- [Bugs](#bugs)
-- [Features](#features)
-- [Node dependencies](#node-dependencies)
-- [Frontend dependencies](#frontend-dependencies)
-- [Using grunt](#grunt)
-- [JS Guidelines](#js)
-
-## Pull requests
-
-If you fixed or added something useful to the project, you can send a
-pull request. It will be reviewed by maintainer and accepted, or commented for
-rework, or declined.
-
-## Bugs
-
-If you found an error, typo or any other flaw in the project, please report
-about it using GitHub Issues. The more details you provide, the easier it could
-be reproduced and the faster it could be fixed. Unfortunately, sometimes the
-bug can only be reproduced in your project or in your environment, so
-maintainers cannot reproduce it. In this case we believe you can fix the bug
-and send us the fix.
-
-## Features
-
-If you've got an idea about a new feature, it's most likely that you'll have to
-implement it on your own. If you cannot implement the feature, but it is very
-important, you can create an issue at GitHub, but expect it to be declined by
-the maintainer.
-
-## Node dependencies
-
-This project's build process uses Node npm modules defined via the
-`package.json` file.
-
-To add the latest version of new npm package to the project and automatically
-append it to `package.json` run:
-
-```
-npm install <pkg> --save-dev
-```
-
-If new packages have been added by other contributors then run:
-
-```
-npm update
-```
-
-To update all your local packages to the latest possible versions as constrained
-by `package.json` then run:
-
-```
-npm install
-```
-
-### JS
-
-#### General top level guidelines
-
-- Don't skip semicolons
-- 4 spaces for indentation
-- Single quotes for strings
-- Use `{}` instead of `new Object();`
-- Use `[]` instead of `new Array();`
-- Don't use single line `if` statements.
-- 80 chars maximum line length.
-- Use inline comments only where needed to document dense code, code should
-otherwise be clearly comprehensible without redundant commenting
-- Add a whitespace char when writing inline comments, i.e `// Good` vs `//Bad`.
-
-#### Variable naming
-
-- Always use `var` to declare variables.
-- Use only one `var` for multiple variables.
-- Define variables before use.
-- Define constants in CAPS.
-
-```js
-// Good
-var aVariable = 0,
- aSecondVariable = null,
- A_CONSTANT = 'constant';
-
-// Bad
-var a_variable = 0;
-var a_second_variable = null;
-```
-
-#### Whitespace
-
-Our JavaScript code is compressed so don't try and save on space when writing
-code, focus on readability by trying to (however do not add unnecessary spaces).
-
- - Use one (and only one) blank line to separate logical sets of code.
- - Add a whitespace character after keywords like `if` and after right
-parenthesis.
- - Add a whitespace character after commas.
- - Leave a line before a function or `if` statement.
-
-```js
-if (foo === 'foo') {
- var array = ['one', 'two', 'three'];
- bar(array);
-
- foo = 'bar';
-}
-
-function (arg1, arg2) {
- var foo = arg1;
- bar(foo);
-}
-```
-
-- Don't add superfluos newlines when writing short/simple indented blocks:
-
-```js
-// Bad
-
-if ( foo ) {
-
- bar();
-}
-
-function ( baz ) {
-
- bar();
-}
-```
-
-- Do add newlines in blocks when the opening part of the block has wrapped onto
-a newline due to the 80 char line length limit:
-
-```js
-// Good
-
-angular.module('foo')
- .controller('FooCtrl', function ($scope, $someReallyLongServiceName,
- $anotherService, $somethingElse) {
-
- $scope.bar = 'baz';
- $scope.qux = 'quux';
- });
-```
-
-#### JSHint
-
-This repo uses [JSHint](http://www.jshint.com/about/), defined in
-[.jshintrc](../../.jshintrc). Files are checked on save, and errors are visible
-in the console. Optionally this config file can also be used by your code
-editor.
-
-The following guidelines are checked by JSHint.
-
-- Four spaces for indentation, never tabs.
-- Lines no longer than 80 Characters (including comments).
-- Use single `'` quotes for strings.
-- Use `===` and `!==` over `==` and `!=`
-- Use `camelCase` for variables.
-- Don't leave trailing whitespace.
-
-#### JS Code Style (JSCS)
-
-This repo also uses [JSCS](https://github.com/mdevils/node-jscs), defined in
-[.jscsrc](../../.jscsrc). Files are checked on save, and errors are visible in
-the console. Optionally this config file can also be used by your code editor.
-
-The following rules have been defined.
-
-##### `requireCurlyBraces`
-
-Use curly braces after statements.
-
-```js
-// Good
-if (x) {
- x++;
-}
-
-// Bad
-if (x) x++;
-```
-
-##### `requireSpaceAfterKeywords`
-
-Use spaces after keywords:
-
-```js
-// Good
-if (x) {
- x++;
-}
-
-// Bad
-if(x) {
- x++;
-}
-```
-
-##### `requireSpaceBeforeBlockStatements`
-
-Use spaces after parenthesis, before curly brace:
-
-```js
-// Good
-if (x) {
- x++;
-}
-
-// Bad
-if (x){
- x++;
-}
-```
-
-##### `requireSpacesInConditionalExpression`
-
-Use spaces around conditional expressions:
-
-```js
-// Good
-var a = b ? c : d;
-
-// Bad
-var a=b?c:d;
-```
-
-##### `requireSpacesInFunctionExpression`
-
-
-##### `requireSpacesInAnonymousFunctionExpression`
-
-
-##### `requireSpacesInNamedFunctionExpression`
-
-
-##### `requireSpacesInFunctionDeclaration`
-
-Use spaces before and after parenthesis:
-
-```js
-// Good
-function a () {}
-
-// Bad
-function a() {}
-function a (){}
-```
-
-##### `requireMultipleVarDecl`
-
-Use one `var` statement for multiple variables:
-
-```js
-// Good
-var x = 1,
- y = 2;
-
-// Bad
-var x = 1;
-var y = 2;
-```
-
-##### `requireBlocksOnNewline`
-
-Use new lines for multiple statements
-
-```js
-// Good
-if (true) {
- doSomething();
- doSomethingElse();
-}
-
-// Bad
-if (true) { doSomething(); doSomethingElse(); }
-```
-
-##### `disallowEmptyBlocks`
-
-Don't use empty blocks
-
-```js
-// Good
-if ( a === b ) {
- c = d;
-}
-
-// Bad
-if ( a !== b ) {
-
-} else {
- c = d;
-}
-```
-
-##### `disallowSpacesInsideObjectBrackets`
-
-Don't use a space after an opening or before a closing curly bracket
-
-```js
-// Good
-var x = {a: 1};
-
-// Bad
-var x = { a: 1 };
-```
-
-##### `disallowSpacesInsideArrayBrackets`
-
-Don't use a space after an opening or before a closing square bracket
-
-```js
-// Good
-var x = [1];
-
-// Bad
-var x = [ 1 ];
-```
-
-##### `disallowSpacesInsideParentheses`
-
-Don't use a space after an opening or before a closing parenthesis
-
-```js
-// Good
-var x = (1 + 2) * 3;
-
-// Bad
-var x = ( 1 + 2 ) * 3;
-```
-
-##### `disallowSpaceAfterObjectKeys`
-
-Don't use a space after a key in an object
-
-```js
-// Good
-var x = {a: 1};
-
-// Bad
-var x = {a : 1};
-```
-
-##### `requireCommaBeforeLineBreak`
-
-Don't put commas on the following line
-
-```js
-// Good
-var x = {
- one: 1,
- two: 2
-};
-
-// Bad
-var x = {
- one: 1
- , two: 2
-};
-```
-
-##### `requireOperatorBeforeLineBreak`
-
-Break lines after (not before) an operator
-
-```js
-// Good
-x = y ?
- 1 : 2;
-
-// Bad
-x = y
- ? 1 : 2;
-```
-
-##### `disallowLeftStickedOperators`
-
-Put a space before an operator
-
-```js
-// Good
-x = y ? 1 : 2;
-
-// Bad
-x = y? 1 : 2;
-```
-
-##### `disallowRightStickedOperators`
-
-Put a space after an operator
-
-```js
-// Good
-x = y + 1;
-
-// Bad
-x = y +1;
-```
-
-##### `requireLeftStickedOperators`
-
-Don't put a space before a comma
-
-```js
-// Good
-x = [1, 2];
-
-// Bad
-x = [1 , 2];
-```
-
-##### `disallowSpaceAfterPrefixUnaryOperators`
-
-Don't put a space after a prefix unary operator
-
-```js
-// Good
-x = !y;
-y = ++z;
-// Bad
-x = ! y;
-y = ++ z;
-```
-
-##### `disallowSpaceBeforePostfixUnaryOperators`
-
-Don't put a space after a postfix unary operator
-
-```js
-// Good
-x = y++;
-
-// Bad
-x = y ++;
-```
-
-##### `requireSpaceBeforeBinaryOperators`
-
-Put a space before binary operators
-
-```js
-// Good
-x !== y;
-
-// Bad
-x!== y;
-```
-
-##### `requireSpaceAfterBinaryOperators`
-
-Put a space after binary operators
-
-```js
-// Good
-x + y;
-
-// Bad
-x +y;
-```
-
-##### `disallowImplicitTypeConversion`
-
-Don't use implicit type conversion
-
-```js
-// Good
-x = Boolean(y);
-x = Number(y);
-x = String(y);
-x = s.indexOf('.') !== -1;
-
-// Bad
-x = !!y;
-x = +y;
-x = '' + y;
-x = ~s.indexOf('.');
-```
-
-##### `requireCamelCaseOrUpperCaseIdentifiers`
-
-Use camelCase or
-UPPERCASE_WITH_UNDERSCORES for variable names
-
-```js
-// Good
-var camelCase = 0;
-var UPPER_CASE = 4;
-
-// Bad
-var lower_case = 1;
-var Mixed_case = 2;
-var mixed_Case = 3;
-```
-
-##### `disallowKeywords`
-
-Disallow certain keywords from anywhere in the code base.
-
-```js
-// Bad
-with (foo) {
-}
-```
-
-##### `disallowMultipleLineBreaks`
-
-Don't use multiple blank lines in a row
-
-```js
-// Bad
-var x = 1;
-x++;
-```
-
-##### `validateLineBreaks`
-
-Checks line break character consistency:
-
-```js
-// Good
-foo();<LF>
-
-// Bad
-foo();<CRLF>
-foo();<CR>
-```
-##### `validateQuoteMarks`
-
-Check quote mark usage is single quotes.
-
-```js
-// Good
-var foo = 'bar';
-
-// Bad
-var foo = "bar";
-```
-
-##### `validateIndentation`
-
-Check indentation is at 4 spaces, no tabs.
-
-```js
-// Good
-function foo (bar) {
- console.log(bar);
-}
-
-// Bad
-function foo (bar) {
- console.log(bar);
-}
-
-```
-
-##### `disallowMixedSpacesAndTabs`
-
-Check that spaces and tabs are not mixed.
-
-##### `disallowTrailingWhitespace`
-
-Check that no line ends in a whitespace char.
-
-```js
-// Good
-var foo = "blah blah";<LF>
-
-// Bad
-var foo = "blah blah"; <LF>
-```
-
-##### `disallowTrailingComma`
-
-Don't use a comma at the end of an array or object
-
-```js
-// Good
-var foo = [1, 2, 3];
-var bar = {a: "a", b: "b"}
-
-// Bad
-var foo = [1, 2, 3,];
-var bar = {a: "a", b: "b",}
-```
-
-##### `disallowKeywordsOnNewLine`
-
-Don't place `else` statements on their own line
-
-```js
-// Good
-if (x < 0) {
- x++;
-} else {
- x--;
-}
-
-// Bad
-if (x < 0) {
- x++;
-}
-else {
- x--;
-}
-```
-
-##### `maximumLineLength`
-
-Checks that no single line extends beyond 80 chars.
-
-##### `requireCapitalizedConstructors`
-
-Constructor variable names should be Capitalised.
-
-```js
-// Good
-var foo = new Bar();
-
-// Bad
-var foo = new bar();
-```
-
-##### `safeContextKeyword`
-
-When saving `this` context call the variable `$this`.
-
-```js
-// Good
-var $this = this;
-
-// Bad
-var that = this;
-var self = this;
-```
-
-##### `disallowYodaConditions`
-
-The variable should be on the left in boolean comparisons.
-
-```js
-// Good
-if (a === 1) {
- // ...
-}
-
-// Bad
-if (1 === a) {
- // ...
-}
-```
diff --git a/applications/auto-scale/gui/src/vendor/ng-lodash/License.txt b/applications/auto-scale/gui/src/vendor/ng-lodash/License.txt
deleted file mode 100644
index be8afc1..0000000
--- a/applications/auto-scale/gui/src/vendor/ng-lodash/License.txt
+++ /dev/null
@@ -1,21 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) 2014 Rockabox Ltd.
-
-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.
diff --git a/applications/auto-scale/gui/src/vendor/ng-lodash/README.md b/applications/auto-scale/gui/src/vendor/ng-lodash/README.md
deleted file mode 100644
index 0b2443c..0000000
--- a/applications/auto-scale/gui/src/vendor/ng-lodash/README.md
+++ /dev/null
@@ -1,61 +0,0 @@
-[](http://gruntjs.com/)
-[](https://travis-ci.org/rockabox/ng-lodash)
-[](https://david-dm.org/rockabox/ng-lodash#info=devDependencies)
-
-ng-lodash
-=========
-
-This is a wrapper for the utility library [Lo-Dash](http://lodash.com/) for
-Angular JS. One aim for this project is to ensure Lo-Dash doesn't have to be
-left on the window, and we use Lo-Dash with Angular, in the normal depenedency
- injection manner.
-
-## Installing
-Install via bower
-
-```bower install ng-lodash```
-
-Require it into your application (after Angular)
-
-```<script src="ng-lodash.min.js"></script>```
-
-Add the module as a dependency to your app
-
-```js
-var app = angular.module('yourAwesomeApp', ['ngLodash']);
-```
-
-And inject it into your controller like so!
-
-```js
-var YourCtrl = app.controller('yourController', function($scope, lodash) {
- lodash.assign({ 'a': 1 }, { 'b': 2 }, { 'c': 3 });
-});
-```
-
-## Developing
-
-To help us develop this module, we are using Grunt some tasks that may be
-helpful for you to know about are:
-
-### Testing
-
-This command will run JSHint and JSCS testing JS Files (note files within build)
-are not tested, it will also run your local build of the module with all of the
-Karma tests:
-
-```grunt test``` it can also be run by using ```npm test```
-
-### Build
-
-This command will build the module, run it through ngMin and then create a
-minified version of the module, ready for distribution:
-
-```grunt build```
-
-### Dist
-
-This command will build the module initially and then run the test suite.
-Testing with JSHint, JSCS and Karma:
-
-```grunt dist```
diff --git a/applications/auto-scale/gui/src/vendor/ng-lodash/bower.json b/applications/auto-scale/gui/src/vendor/ng-lodash/bower.json
deleted file mode 100644
index eb17cb3..0000000
--- a/applications/auto-scale/gui/src/vendor/ng-lodash/bower.json
+++ /dev/null
@@ -1,31 +0,0 @@
-{
- "name": "ng-lodash",
- "version": "0.3.0",
- "description": "An Angular module wrapper for lodash",
- "author": ["Rockabox <tech@rockabox.com> (http://www.rockabox.com)"],
- "license": "MIT",
- "keywords": [
- "nglodash",
- "angular",
- "lodash"
- ],
- "ignore": [
- "test",
- "*.",
- "karma.conf.js",
- "Gruntfile.js"
- ],
- "repository": {
- "type": "git",
- "url": "git://github.com/rockabox/ng-lodash.git"
- },
- "main": [
- "build/ng-lodash.js"
- ],
- "dependencies": {
- "angular": ">=1.2"
- },
- "devDependencies": {
- "angular-mocks": ">=1.2"
- }
-}
diff --git a/applications/auto-scale/gui/src/vendor/ng-lodash/build/ng-lodash.js b/applications/auto-scale/gui/src/vendor/ng-lodash/build/ng-lodash.js
deleted file mode 100644
index 6e4a6b5..0000000
--- a/applications/auto-scale/gui/src/vendor/ng-lodash/build/ng-lodash.js
+++ /dev/null
@@ -1,11267 +0,0 @@
-/**
- * @license
- * lodash 3.10.1 (Custom Build) <https://lodash.com/>
- * Build: `lodash modern exports="amd,commonjs,node" iife="angular.module('ngLodash', []).constant('lodash', null).config(function ($provide) { %output% $provide.constant('lodash', _);});" --output build/ng-lodash.js`
- * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
- * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
- * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
- * Available under MIT license <https://lodash.com/license>
- */
-angular.module('ngLodash', []).constant('lodash', null).config([
- '$provide',
- function ($provide) {
- /** Used as a safe reference for `undefined` in pre-ES5 environments. */
- var undefined;
- /** Used as the semantic version number. */
- var VERSION = '3.10.1';
- /** Used to compose bitmasks for wrapper metadata. */
- var BIND_FLAG = 1, BIND_KEY_FLAG = 2, CURRY_BOUND_FLAG = 4, CURRY_FLAG = 8, CURRY_RIGHT_FLAG = 16, PARTIAL_FLAG = 32, PARTIAL_RIGHT_FLAG = 64, ARY_FLAG = 128, REARG_FLAG = 256;
- /** Used as default options for `_.trunc`. */
- var DEFAULT_TRUNC_LENGTH = 30, DEFAULT_TRUNC_OMISSION = '...';
- /** Used to detect when a function becomes hot. */
- var HOT_COUNT = 150, HOT_SPAN = 16;
- /** Used as the size to enable large array optimizations. */
- var LARGE_ARRAY_SIZE = 200;
- /** Used to indicate the type of lazy iteratees. */
- var LAZY_FILTER_FLAG = 1, LAZY_MAP_FLAG = 2;
- /** Used as the `TypeError` message for "Functions" methods. */
- var FUNC_ERROR_TEXT = 'Expected a function';
- /** Used as the internal argument placeholder. */
- var PLACEHOLDER = '__lodash_placeholder__';
- /** `Object#toString` result references. */
- var argsTag = '[object Arguments]', arrayTag = '[object Array]', boolTag = '[object Boolean]', dateTag = '[object Date]', errorTag = '[object Error]', funcTag = '[object Function]', mapTag = '[object Map]', numberTag = '[object Number]', objectTag = '[object Object]', regexpTag = '[object RegExp]', setTag = '[object Set]', stringTag = '[object String]', weakMapTag = '[object WeakMap]';
- var arrayBufferTag = '[object ArrayBuffer]', float32Tag = '[object Float32Array]', float64Tag = '[object Float64Array]', int8Tag = '[object Int8Array]', int16Tag = '[object Int16Array]', int32Tag = '[object Int32Array]', uint8Tag = '[object Uint8Array]', uint8ClampedTag = '[object Uint8ClampedArray]', uint16Tag = '[object Uint16Array]', uint32Tag = '[object Uint32Array]';
- /** Used to match empty string literals in compiled template source. */
- var reEmptyStringLeading = /\b__p \+= '';/g, reEmptyStringMiddle = /\b(__p \+=) '' \+/g, reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g;
- /** Used to match HTML entities and HTML characters. */
- var reEscapedHtml = /&(?:amp|lt|gt|quot|#39|#96);/g, reUnescapedHtml = /[&<>"'`]/g, reHasEscapedHtml = RegExp(reEscapedHtml.source), reHasUnescapedHtml = RegExp(reUnescapedHtml.source);
- /** Used to match template delimiters. */
- var reEscape = /<%-([\s\S]+?)%>/g, reEvaluate = /<%([\s\S]+?)%>/g, reInterpolate = /<%=([\s\S]+?)%>/g;
- /** Used to match property names within property paths. */
- var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\n\\]|\\.)*?\1)\]/, reIsPlainProp = /^\w*$/, rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\n\\]|\\.)*?)\2)\]/g;
- /**
- * Used to match `RegExp` [syntax characters](http://ecma-international.org/ecma-262/6.0/#sec-patterns)
- * and those outlined by [`EscapeRegExpPattern`](http://ecma-international.org/ecma-262/6.0/#sec-escaperegexppattern).
- */
- var reRegExpChars = /^[:!,]|[\\^$.*+?()[\]{}|\/]|(^[0-9a-fA-Fnrtuvx])|([\n\r\u2028\u2029])/g, reHasRegExpChars = RegExp(reRegExpChars.source);
- /** Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks). */
- var reComboMark = /[\u0300-\u036f\ufe20-\ufe23]/g;
- /** Used to match backslashes in property paths. */
- var reEscapeChar = /\\(\\)?/g;
- /** Used to match [ES template delimiters](http://ecma-international.org/ecma-262/6.0/#sec-template-literal-lexical-components). */
- var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g;
- /** Used to match `RegExp` flags from their coerced string values. */
- var reFlags = /\w*$/;
- /** Used to detect hexadecimal string values. */
- var reHasHexPrefix = /^0[xX]/;
- /** Used to detect host constructors (Safari > 5). */
- var reIsHostCtor = /^\[object .+?Constructor\]$/;
- /** Used to detect unsigned integer values. */
- var reIsUint = /^\d+$/;
- /** Used to match latin-1 supplementary letters (excluding mathematical operators). */
- var reLatin1 = /[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g;
- /** Used to ensure capturing order of template delimiters. */
- var reNoMatch = /($^)/;
- /** Used to match unescaped characters in compiled string literals. */
- var reUnescapedString = /['\n\r\u2028\u2029\\]/g;
- /** Used to match words to create compound words. */
- var reWords = function () {
- var upper = '[A-Z\\xc0-\\xd6\\xd8-\\xde]', lower = '[a-z\\xdf-\\xf6\\xf8-\\xff]+';
- return RegExp(upper + '+(?=' + upper + lower + ')|' + upper + '?' + lower + '|' + upper + '+|[0-9]+', 'g');
- }();
- /** Used to assign default `context` object properties. */
- var contextProps = [
- 'Array',
- 'ArrayBuffer',
- 'Date',
- 'Error',
- 'Float32Array',
- 'Float64Array',
- 'Function',
- 'Int8Array',
- 'Int16Array',
- 'Int32Array',
- 'Math',
- 'Number',
- 'Object',
- 'RegExp',
- 'Set',
- 'String',
- '_',
- 'clearTimeout',
- 'isFinite',
- 'parseFloat',
- 'parseInt',
- 'setTimeout',
- 'TypeError',
- 'Uint8Array',
- 'Uint8ClampedArray',
- 'Uint16Array',
- 'Uint32Array',
- 'WeakMap'
- ];
- /** Used to make template sourceURLs easier to identify. */
- var templateCounter = -1;
- /** Used to identify `toStringTag` values of typed arrays. */
- var typedArrayTags = {};
- typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = typedArrayTags[uint32Tag] = true;
- typedArrayTags[argsTag] = typedArrayTags[arrayTag] = typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = typedArrayTags[dateTag] = typedArrayTags[errorTag] = typedArrayTags[funcTag] = typedArrayTags[mapTag] = typedArrayTags[numberTag] = typedArrayTags[objectTag] = typedArrayTags[regexpTag] = typedArrayTags[setTag] = typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false;
- /** Used to identify `toStringTag` values supported by `_.clone`. */
- var cloneableTags = {};
- cloneableTags[argsTag] = cloneableTags[arrayTag] = cloneableTags[arrayBufferTag] = cloneableTags[boolTag] = cloneableTags[dateTag] = cloneableTags[float32Tag] = cloneableTags[float64Tag] = cloneableTags[int8Tag] = cloneableTags[int16Tag] = cloneableTags[int32Tag] = cloneableTags[numberTag] = cloneableTags[objectTag] = cloneableTags[regexpTag] = cloneableTags[stringTag] = cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
- cloneableTags[errorTag] = cloneableTags[funcTag] = cloneableTags[mapTag] = cloneableTags[setTag] = cloneableTags[weakMapTag] = false;
- /** Used to map latin-1 supplementary letters to basic latin letters. */
- var deburredLetters = {
- '\xc0': 'A',
- '\xc1': 'A',
- '\xc2': 'A',
- '\xc3': 'A',
- '\xc4': 'A',
- '\xc5': 'A',
- '\xe0': 'a',
- '\xe1': 'a',
- '\xe2': 'a',
- '\xe3': 'a',
- '\xe4': 'a',
- '\xe5': 'a',
- '\xc7': 'C',
- '\xe7': 'c',
- '\xd0': 'D',
- '\xf0': 'd',
- '\xc8': 'E',
- '\xc9': 'E',
- '\xca': 'E',
- '\xcb': 'E',
- '\xe8': 'e',
- '\xe9': 'e',
- '\xea': 'e',
- '\xeb': 'e',
- '\xcc': 'I',
- '\xcd': 'I',
- '\xce': 'I',
- '\xcf': 'I',
- '\xec': 'i',
- '\xed': 'i',
- '\xee': 'i',
- '\xef': 'i',
- '\xd1': 'N',
- '\xf1': 'n',
- '\xd2': 'O',
- '\xd3': 'O',
- '\xd4': 'O',
- '\xd5': 'O',
- '\xd6': 'O',
- '\xd8': 'O',
- '\xf2': 'o',
- '\xf3': 'o',
- '\xf4': 'o',
- '\xf5': 'o',
- '\xf6': 'o',
- '\xf8': 'o',
- '\xd9': 'U',
- '\xda': 'U',
- '\xdb': 'U',
- '\xdc': 'U',
- '\xf9': 'u',
- '\xfa': 'u',
- '\xfb': 'u',
- '\xfc': 'u',
- '\xdd': 'Y',
- '\xfd': 'y',
- '\xff': 'y',
- '\xc6': 'Ae',
- '\xe6': 'ae',
- '\xde': 'Th',
- '\xfe': 'th',
- '\xdf': 'ss'
- };
- /** Used to map characters to HTML entities. */
- var htmlEscapes = {
- '&': '&',
- '<': '<',
- '>': '>',
- '"': '"',
- '\'': ''',
- '`': '`'
- };
- /** Used to map HTML entities to characters. */
- var htmlUnescapes = {
- '&': '&',
- '<': '<',
- '>': '>',
- '"': '"',
- ''': '\'',
- '`': '`'
- };
- /** Used to determine if values are of the language type `Object`. */
- var objectTypes = {
- 'function': true,
- 'object': true
- };
- /** Used to escape characters for inclusion in compiled regexes. */
- var regexpEscapes = {
- '0': 'x30',
- '1': 'x31',
- '2': 'x32',
- '3': 'x33',
- '4': 'x34',
- '5': 'x35',
- '6': 'x36',
- '7': 'x37',
- '8': 'x38',
- '9': 'x39',
- 'A': 'x41',
- 'B': 'x42',
- 'C': 'x43',
- 'D': 'x44',
- 'E': 'x45',
- 'F': 'x46',
- 'a': 'x61',
- 'b': 'x62',
- 'c': 'x63',
- 'd': 'x64',
- 'e': 'x65',
- 'f': 'x66',
- 'n': 'x6e',
- 'r': 'x72',
- 't': 'x74',
- 'u': 'x75',
- 'v': 'x76',
- 'x': 'x78'
- };
- /** Used to escape characters for inclusion in compiled string literals. */
- var stringEscapes = {
- '\\': '\\',
- '\'': '\'',
- '\n': 'n',
- '\r': 'r',
- '\u2028': 'u2028',
- '\u2029': 'u2029'
- };
- /** Detect free variable `exports`. */
- var freeExports = objectTypes[typeof exports] && exports && !exports.nodeType && exports;
- /** Detect free variable `module`. */
- var freeModule = objectTypes[typeof module] && module && !module.nodeType && module;
- /** Detect free variable `global` from Node.js. */
- var freeGlobal = freeExports && freeModule && typeof global == 'object' && global && global.Object && global;
- /** Detect free variable `self`. */
- var freeSelf = objectTypes[typeof self] && self && self.Object && self;
- /** Detect free variable `window`. */
- var freeWindow = objectTypes[typeof window] && window && window.Object && window;
- /** Detect the popular CommonJS extension `module.exports`. */
- var moduleExports = freeModule && freeModule.exports === freeExports && freeExports;
- /**
- * Used as a reference to the global object.
- *
- * The `this` value is used if it's the global object to avoid Greasemonkey's
- * restricted `window` object, otherwise the `window` object is used.
- */
- var root = freeGlobal || freeWindow !== (this && this.window) && freeWindow || freeSelf || this;
- /*--------------------------------------------------------------------------*/
- /**
- * The base implementation of `compareAscending` which compares values and
- * sorts them in ascending order without guaranteeing a stable sort.
- *
- * @private
- * @param {*} value The value to compare.
- * @param {*} other The other value to compare.
- * @returns {number} Returns the sort order indicator for `value`.
- */
- function baseCompareAscending(value, other) {
- if (value !== other) {
- var valIsNull = value === null, valIsUndef = value === undefined, valIsReflexive = value === value;
- var othIsNull = other === null, othIsUndef = other === undefined, othIsReflexive = other === other;
- if (value > other && !othIsNull || !valIsReflexive || valIsNull && !othIsUndef && othIsReflexive || valIsUndef && othIsReflexive) {
- return 1;
- }
- if (value < other && !valIsNull || !othIsReflexive || othIsNull && !valIsUndef && valIsReflexive || othIsUndef && valIsReflexive) {
- return -1;
- }
- }
- return 0;
- }
- /**
- * The base implementation of `_.findIndex` and `_.findLastIndex` without
- * support for callback shorthands and `this` binding.
- *
- * @private
- * @param {Array} array The array to search.
- * @param {Function} predicate The function invoked per iteration.
- * @param {boolean} [fromRight] Specify iterating from right to left.
- * @returns {number} Returns the index of the matched value, else `-1`.
- */
- function baseFindIndex(array, predicate, fromRight) {
- var length = array.length, index = fromRight ? length : -1;
- while (fromRight ? index-- : ++index < length) {
- if (predicate(array[index], index, array)) {
- return index;
- }
- }
- return -1;
- }
- /**
- * The base implementation of `_.indexOf` without support for binary searches.
- *
- * @private
- * @param {Array} array The array to search.
- * @param {*} value The value to search for.
- * @param {number} fromIndex The index to search from.
- * @returns {number} Returns the index of the matched value, else `-1`.
- */
- function baseIndexOf(array, value, fromIndex) {
- if (value !== value) {
- return indexOfNaN(array, fromIndex);
- }
- var index = fromIndex - 1, length = array.length;
- while (++index < length) {
- if (array[index] === value) {
- return index;
- }
- }
- return -1;
- }
- /**
- * The base implementation of `_.isFunction` without support for environments
- * with incorrect `typeof` results.
- *
- * @private
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
- */
- function baseIsFunction(value) {
- // Avoid a Chakra JIT bug in compatibility modes of IE 11.
- // See https://github.com/jashkenas/underscore/issues/1621 for more details.
- return typeof value == 'function' || false;
- }
- /**
- * Converts `value` to a string if it's not one. An empty string is returned
- * for `null` or `undefined` values.
- *
- * @private
- * @param {*} value The value to process.
- * @returns {string} Returns the string.
- */
- function baseToString(value) {
- return value == null ? '' : value + '';
- }
- /**
- * Used by `_.trim` and `_.trimLeft` to get the index of the first character
- * of `string` that is not found in `chars`.
- *
- * @private
- * @param {string} string The string to inspect.
- * @param {string} chars The characters to find.
- * @returns {number} Returns the index of the first character not found in `chars`.
- */
- function charsLeftIndex(string, chars) {
- var index = -1, length = string.length;
- while (++index < length && chars.indexOf(string.charAt(index)) > -1) {
- }
- return index;
- }
- /**
- * Used by `_.trim` and `_.trimRight` to get the index of the last character
- * of `string` that is not found in `chars`.
- *
- * @private
- * @param {string} string The string to inspect.
- * @param {string} chars The characters to find.
- * @returns {number} Returns the index of the last character not found in `chars`.
- */
- function charsRightIndex(string, chars) {
- var index = string.length;
- while (index-- && chars.indexOf(string.charAt(index)) > -1) {
- }
- return index;
- }
- /**
- * Used by `_.sortBy` to compare transformed elements of a collection and stable
- * sort them in ascending order.
- *
- * @private
- * @param {Object} object The object to compare.
- * @param {Object} other The other object to compare.
- * @returns {number} Returns the sort order indicator for `object`.
- */
- function compareAscending(object, other) {
- return baseCompareAscending(object.criteria, other.criteria) || object.index - other.index;
- }
- /**
- * Used by `_.sortByOrder` to compare multiple properties of a value to another
- * and stable sort them.
- *
- * If `orders` is unspecified, all valuess are sorted in ascending order. Otherwise,
- * a value is sorted in ascending order if its corresponding order is "asc", and
- * descending if "desc".
- *
- * @private
- * @param {Object} object The object to compare.
- * @param {Object} other The other object to compare.
- * @param {boolean[]} orders The order to sort by for each property.
- * @returns {number} Returns the sort order indicator for `object`.
- */
- function compareMultiple(object, other, orders) {
- var index = -1, objCriteria = object.criteria, othCriteria = other.criteria, length = objCriteria.length, ordersLength = orders.length;
- while (++index < length) {
- var result = baseCompareAscending(objCriteria[index], othCriteria[index]);
- if (result) {
- if (index >= ordersLength) {
- return result;
- }
- var order = orders[index];
- return result * (order === 'asc' || order === true ? 1 : -1);
- }
- }
- // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications
- // that causes it, under certain circumstances, to provide the same value for
- // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247
- // for more details.
- //
- // This also ensures a stable sort in V8 and other engines.
- // See https://code.google.com/p/v8/issues/detail?id=90 for more details.
- return object.index - other.index;
- }
- /**
- * Used by `_.deburr` to convert latin-1 supplementary letters to basic latin letters.
- *
- * @private
- * @param {string} letter The matched letter to deburr.
- * @returns {string} Returns the deburred letter.
- */
- function deburrLetter(letter) {
- return deburredLetters[letter];
- }
- /**
- * Used by `_.escape` to convert characters to HTML entities.
- *
- * @private
- * @param {string} chr The matched character to escape.
- * @returns {string} Returns the escaped character.
- */
- function escapeHtmlChar(chr) {
- return htmlEscapes[chr];
- }
- /**
- * Used by `_.escapeRegExp` to escape characters for inclusion in compiled regexes.
- *
- * @private
- * @param {string} chr The matched character to escape.
- * @param {string} leadingChar The capture group for a leading character.
- * @param {string} whitespaceChar The capture group for a whitespace character.
- * @returns {string} Returns the escaped character.
- */
- function escapeRegExpChar(chr, leadingChar, whitespaceChar) {
- if (leadingChar) {
- chr = regexpEscapes[chr];
- } else if (whitespaceChar) {
- chr = stringEscapes[chr];
- }
- return '\\' + chr;
- }
- /**
- * Used by `_.template` to escape characters for inclusion in compiled string literals.
- *
- * @private
- * @param {string} chr The matched character to escape.
- * @returns {string} Returns the escaped character.
- */
- function escapeStringChar(chr) {
- return '\\' + stringEscapes[chr];
- }
- /**
- * Gets the index at which the first occurrence of `NaN` is found in `array`.
- *
- * @private
- * @param {Array} array The array to search.
- * @param {number} fromIndex The index to search from.
- * @param {boolean} [fromRight] Specify iterating from right to left.
- * @returns {number} Returns the index of the matched `NaN`, else `-1`.
- */
- function indexOfNaN(array, fromIndex, fromRight) {
- var length = array.length, index = fromIndex + (fromRight ? 0 : -1);
- while (fromRight ? index-- : ++index < length) {
- var other = array[index];
- if (other !== other) {
- return index;
- }
- }
- return -1;
- }
- /**
- * Checks if `value` is object-like.
- *
- * @private
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
- */
- function isObjectLike(value) {
- return !!value && typeof value == 'object';
- }
- /**
- * Used by `trimmedLeftIndex` and `trimmedRightIndex` to determine if a
- * character code is whitespace.
- *
- * @private
- * @param {number} charCode The character code to inspect.
- * @returns {boolean} Returns `true` if `charCode` is whitespace, else `false`.
- */
- function isSpace(charCode) {
- return charCode <= 160 && (charCode >= 9 && charCode <= 13) || charCode == 32 || charCode == 160 || charCode == 5760 || charCode == 6158 || charCode >= 8192 && (charCode <= 8202 || charCode == 8232 || charCode == 8233 || charCode == 8239 || charCode == 8287 || charCode == 12288 || charCode == 65279);
- }
- /**
- * Replaces all `placeholder` elements in `array` with an internal placeholder
- * and returns an array of their indexes.
- *
- * @private
- * @param {Array} array The array to modify.
- * @param {*} placeholder The placeholder to replace.
- * @returns {Array} Returns the new array of placeholder indexes.
- */
- function replaceHolders(array, placeholder) {
- var index = -1, length = array.length, resIndex = -1, result = [];
- while (++index < length) {
- if (array[index] === placeholder) {
- array[index] = PLACEHOLDER;
- result[++resIndex] = index;
- }
- }
- return result;
- }
- /**
- * An implementation of `_.uniq` optimized for sorted arrays without support
- * for callback shorthands and `this` binding.
- *
- * @private
- * @param {Array} array The array to inspect.
- * @param {Function} [iteratee] The function invoked per iteration.
- * @returns {Array} Returns the new duplicate free array.
- */
- function sortedUniq(array, iteratee) {
- var seen, index = -1, length = array.length, resIndex = -1, result = [];
- while (++index < length) {
- var value = array[index], computed = iteratee ? iteratee(value, index, array) : value;
- if (!index || seen !== computed) {
- seen = computed;
- result[++resIndex] = value;
- }
- }
- return result;
- }
- /**
- * Used by `_.trim` and `_.trimLeft` to get the index of the first non-whitespace
- * character of `string`.
- *
- * @private
- * @param {string} string The string to inspect.
- * @returns {number} Returns the index of the first non-whitespace character.
- */
- function trimmedLeftIndex(string) {
- var index = -1, length = string.length;
- while (++index < length && isSpace(string.charCodeAt(index))) {
- }
- return index;
- }
- /**
- * Used by `_.trim` and `_.trimRight` to get the index of the last non-whitespace
- * character of `string`.
- *
- * @private
- * @param {string} string The string to inspect.
- * @returns {number} Returns the index of the last non-whitespace character.
- */
- function trimmedRightIndex(string) {
- var index = string.length;
- while (index-- && isSpace(string.charCodeAt(index))) {
- }
- return index;
- }
- /**
- * Used by `_.unescape` to convert HTML entities to characters.
- *
- * @private
- * @param {string} chr The matched character to unescape.
- * @returns {string} Returns the unescaped character.
- */
- function unescapeHtmlChar(chr) {
- return htmlUnescapes[chr];
- }
- /*--------------------------------------------------------------------------*/
- /**
- * Create a new pristine `lodash` function using the given `context` object.
- *
- * @static
- * @memberOf _
- * @category Utility
- * @param {Object} [context=root] The context object.
- * @returns {Function} Returns a new `lodash` function.
- * @example
- *
- * _.mixin({ 'foo': _.constant('foo') });
- *
- * var lodash = _.runInContext();
- * lodash.mixin({ 'bar': lodash.constant('bar') });
- *
- * _.isFunction(_.foo);
- * // => true
- * _.isFunction(_.bar);
- * // => false
- *
- * lodash.isFunction(lodash.foo);
- * // => false
- * lodash.isFunction(lodash.bar);
- * // => true
- *
- * // using `context` to mock `Date#getTime` use in `_.now`
- * var mock = _.runInContext({
- * 'Date': function() {
- * return { 'getTime': getTimeMock };
- * }
- * });
- *
- * // or creating a suped-up `defer` in Node.js
- * var defer = _.runInContext({ 'setTimeout': setImmediate }).defer;
- */
- function runInContext(context) {
- // Avoid issues with some ES3 environments that attempt to use values, named
- // after built-in constructors like `Object`, for the creation of literals.
- // ES5 clears this up by stating that literals must use built-in constructors.
- // See https://es5.github.io/#x11.1.5 for more details.
- context = context ? _.defaults(root.Object(), context, _.pick(root, contextProps)) : root;
- /** Native constructor references. */
- var Array = context.Array, Date = context.Date, Error = context.Error, Function = context.Function, Math = context.Math, Number = context.Number, Object = context.Object, RegExp = context.RegExp, String = context.String, TypeError = context.TypeError;
- /** Used for native method references. */
- var arrayProto = Array.prototype, objectProto = Object.prototype, stringProto = String.prototype;
- /** Used to resolve the decompiled source of functions. */
- var fnToString = Function.prototype.toString;
- /** Used to check objects for own properties. */
- var hasOwnProperty = objectProto.hasOwnProperty;
- /** Used to generate unique IDs. */
- var idCounter = 0;
- /**
- * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
- * of values.
- */
- var objToString = objectProto.toString;
- /** Used to restore the original `_` reference in `_.noConflict`. */
- var oldDash = root._;
- /** Used to detect if a method is native. */
- var reIsNative = RegExp('^' + fnToString.call(hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g, '\\$&').replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$');
- /** Native method references. */
- var ArrayBuffer = context.ArrayBuffer, clearTimeout = context.clearTimeout, parseFloat = context.parseFloat, pow = Math.pow, propertyIsEnumerable = objectProto.propertyIsEnumerable, Set = getNative(context, 'Set'), setTimeout = context.setTimeout, splice = arrayProto.splice, Uint8Array = context.Uint8Array, WeakMap = getNative(context, 'WeakMap');
- /* Native method references for those with the same name as other `lodash` methods. */
- var nativeCeil = Math.ceil, nativeCreate = getNative(Object, 'create'), nativeFloor = Math.floor, nativeIsArray = getNative(Array, 'isArray'), nativeIsFinite = context.isFinite, nativeKeys = getNative(Object, 'keys'), nativeMax = Math.max, nativeMin = Math.min, nativeNow = getNative(Date, 'now'), nativeParseInt = context.parseInt, nativeRandom = Math.random;
- /** Used as references for `-Infinity` and `Infinity`. */
- var NEGATIVE_INFINITY = Number.NEGATIVE_INFINITY, POSITIVE_INFINITY = Number.POSITIVE_INFINITY;
- /** Used as references for the maximum length and index of an array. */
- var MAX_ARRAY_LENGTH = 4294967295, MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1, HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1;
- /**
- * Used as the [maximum length](http://ecma-international.org/ecma-262/6.0/#sec-number.max_safe_integer)
- * of an array-like value.
- */
- var MAX_SAFE_INTEGER = 9007199254740991;
- /** Used to store function metadata. */
- var metaMap = WeakMap && new WeakMap();
- /** Used to lookup unminified function names. */
- var realNames = {};
- /*------------------------------------------------------------------------*/
- /**
- * Creates a `lodash` object which wraps `value` to enable implicit chaining.
- * Methods that operate on and return arrays, collections, and functions can
- * be chained together. Methods that retrieve a single value or may return a
- * primitive value will automatically end the chain returning the unwrapped
- * value. Explicit chaining may be enabled using `_.chain`. The execution of
- * chained methods is lazy, that is, execution is deferred until `_#value`
- * is implicitly or explicitly called.
- *
- * Lazy evaluation allows several methods to support shortcut fusion. Shortcut
- * fusion is an optimization strategy which merge iteratee calls; this can help
- * to avoid the creation of intermediate data structures and greatly reduce the
- * number of iteratee executions.
- *
- * Chaining is supported in custom builds as long as the `_#value` method is
- * directly or indirectly included in the build.
- *
- * In addition to lodash methods, wrappers have `Array` and `String` methods.
- *
- * The wrapper `Array` methods are:
- * `concat`, `join`, `pop`, `push`, `reverse`, `shift`, `slice`, `sort`,
- * `splice`, and `unshift`
- *
- * The wrapper `String` methods are:
- * `replace` and `split`
- *
- * The wrapper methods that support shortcut fusion are:
- * `compact`, `drop`, `dropRight`, `dropRightWhile`, `dropWhile`, `filter`,
- * `first`, `initial`, `last`, `map`, `pluck`, `reject`, `rest`, `reverse`,
- * `slice`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, `toArray`,
- * and `where`
- *
- * The chainable wrapper methods are:
- * `after`, `ary`, `assign`, `at`, `before`, `bind`, `bindAll`, `bindKey`,
- * `callback`, `chain`, `chunk`, `commit`, `compact`, `concat`, `constant`,
- * `countBy`, `create`, `curry`, `debounce`, `defaults`, `defaultsDeep`,
- * `defer`, `delay`, `difference`, `drop`, `dropRight`, `dropRightWhile`,
- * `dropWhile`, `fill`, `filter`, `flatten`, `flattenDeep`, `flow`, `flowRight`,
- * `forEach`, `forEachRight`, `forIn`, `forInRight`, `forOwn`, `forOwnRight`,
- * `functions`, `groupBy`, `indexBy`, `initial`, `intersection`, `invert`,
- * `invoke`, `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`,
- * `matchesProperty`, `memoize`, `merge`, `method`, `methodOf`, `mixin`,
- * `modArgs`, `negate`, `omit`, `once`, `pairs`, `partial`, `partialRight`,
- * `partition`, `pick`, `plant`, `pluck`, `property`, `propertyOf`, `pull`,
- * `pullAt`, `push`, `range`, `rearg`, `reject`, `remove`, `rest`, `restParam`,
- * `reverse`, `set`, `shuffle`, `slice`, `sort`, `sortBy`, `sortByAll`,
- * `sortByOrder`, `splice`, `spread`, `take`, `takeRight`, `takeRightWhile`,
- * `takeWhile`, `tap`, `throttle`, `thru`, `times`, `toArray`, `toPlainObject`,
- * `transform`, `union`, `uniq`, `unshift`, `unzip`, `unzipWith`, `values`,
- * `valuesIn`, `where`, `without`, `wrap`, `xor`, `zip`, `zipObject`, `zipWith`
- *
- * The wrapper methods that are **not** chainable by default are:
- * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clone`, `cloneDeep`,
- * `deburr`, `endsWith`, `escape`, `escapeRegExp`, `every`, `find`, `findIndex`,
- * `findKey`, `findLast`, `findLastIndex`, `findLastKey`, `findWhere`, `first`,
- * `floor`, `get`, `gt`, `gte`, `has`, `identity`, `includes`, `indexOf`,
- * `inRange`, `isArguments`, `isArray`, `isBoolean`, `isDate`, `isElement`,
- * `isEmpty`, `isEqual`, `isError`, `isFinite` `isFunction`, `isMatch`,
- * `isNative`, `isNaN`, `isNull`, `isNumber`, `isObject`, `isPlainObject`,
- * `isRegExp`, `isString`, `isUndefined`, `isTypedArray`, `join`, `kebabCase`,
- * `last`, `lastIndexOf`, `lt`, `lte`, `max`, `min`, `noConflict`, `noop`,
- * `now`, `pad`, `padLeft`, `padRight`, `parseInt`, `pop`, `random`, `reduce`,
- * `reduceRight`, `repeat`, `result`, `round`, `runInContext`, `shift`, `size`,
- * `snakeCase`, `some`, `sortedIndex`, `sortedLastIndex`, `startCase`,
- * `startsWith`, `sum`, `template`, `trim`, `trimLeft`, `trimRight`, `trunc`,
- * `unescape`, `uniqueId`, `value`, and `words`
- *
- * The wrapper method `sample` will return a wrapped value when `n` is provided,
- * otherwise an unwrapped value is returned.
- *
- * @name _
- * @constructor
- * @category Chain
- * @param {*} value The value to wrap in a `lodash` instance.
- * @returns {Object} Returns the new `lodash` wrapper instance.
- * @example
- *
- * var wrapped = _([1, 2, 3]);
- *
- * // returns an unwrapped value
- * wrapped.reduce(function(total, n) {
- * return total + n;
- * });
- * // => 6
- *
- * // returns a wrapped value
- * var squares = wrapped.map(function(n) {
- * return n * n;
- * });
- *
- * _.isArray(squares);
- * // => false
- *
- * _.isArray(squares.value());
- * // => true
- */
- function lodash(value) {
- if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) {
- if (value instanceof LodashWrapper) {
- return value;
- }
- if (hasOwnProperty.call(value, '__chain__') && hasOwnProperty.call(value, '__wrapped__')) {
- return wrapperClone(value);
- }
- }
- return new LodashWrapper(value);
- }
- /**
- * The function whose prototype all chaining wrappers inherit from.
- *
- * @private
- */
- function baseLodash() {
- }
- /**
- * The base constructor for creating `lodash` wrapper objects.
- *
- * @private
- * @param {*} value The value to wrap.
- * @param {boolean} [chainAll] Enable chaining for all wrapper methods.
- * @param {Array} [actions=[]] Actions to peform to resolve the unwrapped value.
- */
- function LodashWrapper(value, chainAll, actions) {
- this.__wrapped__ = value;
- this.__actions__ = actions || [];
- this.__chain__ = !!chainAll;
- }
- /**
- * An object environment feature flags.
- *
- * @static
- * @memberOf _
- * @type Object
- */
- var support = lodash.support = {};
- /**
- * By default, the template delimiters used by lodash are like those in
- * embedded Ruby (ERB). Change the following template settings to use
- * alternative delimiters.
- *
- * @static
- * @memberOf _
- * @type Object
- */
- lodash.templateSettings = {
- 'escape': reEscape,
- 'evaluate': reEvaluate,
- 'interpolate': reInterpolate,
- 'variable': '',
- 'imports': { '_': lodash }
- };
- /*------------------------------------------------------------------------*/
- /**
- * Creates a lazy wrapper object which wraps `value` to enable lazy evaluation.
- *
- * @private
- * @param {*} value The value to wrap.
- */
- function LazyWrapper(value) {
- this.__wrapped__ = value;
- this.__actions__ = [];
- this.__dir__ = 1;
- this.__filtered__ = false;
- this.__iteratees__ = [];
- this.__takeCount__ = POSITIVE_INFINITY;
- this.__views__ = [];
- }
- /**
- * Creates a clone of the lazy wrapper object.
- *
- * @private
- * @name clone
- * @memberOf LazyWrapper
- * @returns {Object} Returns the cloned `LazyWrapper` object.
- */
- function lazyClone() {
- var result = new LazyWrapper(this.__wrapped__);
- result.__actions__ = arrayCopy(this.__actions__);
- result.__dir__ = this.__dir__;
- result.__filtered__ = this.__filtered__;
- result.__iteratees__ = arrayCopy(this.__iteratees__);
- result.__takeCount__ = this.__takeCount__;
- result.__views__ = arrayCopy(this.__views__);
- return result;
- }
- /**
- * Reverses the direction of lazy iteration.
- *
- * @private
- * @name reverse
- * @memberOf LazyWrapper
- * @returns {Object} Returns the new reversed `LazyWrapper` object.
- */
- function lazyReverse() {
- if (this.__filtered__) {
- var result = new LazyWrapper(this);
- result.__dir__ = -1;
- result.__filtered__ = true;
- } else {
- result = this.clone();
- result.__dir__ *= -1;
- }
- return result;
- }
- /**
- * Extracts the unwrapped value from its lazy wrapper.
- *
- * @private
- * @name value
- * @memberOf LazyWrapper
- * @returns {*} Returns the unwrapped value.
- */
- function lazyValue() {
- var array = this.__wrapped__.value(), dir = this.__dir__, isArr = isArray(array), isRight = dir < 0, arrLength = isArr ? array.length : 0, view = getView(0, arrLength, this.__views__), start = view.start, end = view.end, length = end - start, index = isRight ? end : start - 1, iteratees = this.__iteratees__, iterLength = iteratees.length, resIndex = 0, takeCount = nativeMin(length, this.__takeCount__);
- if (!isArr || arrLength < LARGE_ARRAY_SIZE || arrLength == length && takeCount == length) {
- return baseWrapperValue(array, this.__actions__);
- }
- var result = [];
- outer:
- while (length-- && resIndex < takeCount) {
- index += dir;
- var iterIndex = -1, value = array[index];
- while (++iterIndex < iterLength) {
- var data = iteratees[iterIndex], iteratee = data.iteratee, type = data.type, computed = iteratee(value);
- if (type == LAZY_MAP_FLAG) {
- value = computed;
- } else if (!computed) {
- if (type == LAZY_FILTER_FLAG) {
- continue outer;
- } else {
- break outer;
- }
- }
- }
- result[resIndex++] = value;
- }
- return result;
- }
- /*------------------------------------------------------------------------*/
- /**
- * Creates a cache object to store key/value pairs.
- *
- * @private
- * @static
- * @name Cache
- * @memberOf _.memoize
- */
- function MapCache() {
- this.__data__ = {};
- }
- /**
- * Removes `key` and its value from the cache.
- *
- * @private
- * @name delete
- * @memberOf _.memoize.Cache
- * @param {string} key The key of the value to remove.
- * @returns {boolean} Returns `true` if the entry was removed successfully, else `false`.
- */
- function mapDelete(key) {
- return this.has(key) && delete this.__data__[key];
- }
- /**
- * Gets the cached value for `key`.
- *
- * @private
- * @name get
- * @memberOf _.memoize.Cache
- * @param {string} key The key of the value to get.
- * @returns {*} Returns the cached value.
- */
- function mapGet(key) {
- return key == '__proto__' ? undefined : this.__data__[key];
- }
- /**
- * Checks if a cached value for `key` exists.
- *
- * @private
- * @name has
- * @memberOf _.memoize.Cache
- * @param {string} key The key of the entry to check.
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
- */
- function mapHas(key) {
- return key != '__proto__' && hasOwnProperty.call(this.__data__, key);
- }
- /**
- * Sets `value` to `key` of the cache.
- *
- * @private
- * @name set
- * @memberOf _.memoize.Cache
- * @param {string} key The key of the value to cache.
- * @param {*} value The value to cache.
- * @returns {Object} Returns the cache object.
- */
- function mapSet(key, value) {
- if (key != '__proto__') {
- this.__data__[key] = value;
- }
- return this;
- }
- /*------------------------------------------------------------------------*/
- /**
- *
- * Creates a cache object to store unique values.
- *
- * @private
- * @param {Array} [values] The values to cache.
- */
- function SetCache(values) {
- var length = values ? values.length : 0;
- this.data = {
- 'hash': nativeCreate(null),
- 'set': new Set()
- };
- while (length--) {
- this.push(values[length]);
- }
- }
- /**
- * Checks if `value` is in `cache` mimicking the return signature of
- * `_.indexOf` by returning `0` if the value is found, else `-1`.
- *
- * @private
- * @param {Object} cache The cache to search.
- * @param {*} value The value to search for.
- * @returns {number} Returns `0` if `value` is found, else `-1`.
- */
- function cacheIndexOf(cache, value) {
- var data = cache.data, result = typeof value == 'string' || isObject(value) ? data.set.has(value) : data.hash[value];
- return result ? 0 : -1;
- }
- /**
- * Adds `value` to the cache.
- *
- * @private
- * @name push
- * @memberOf SetCache
- * @param {*} value The value to cache.
- */
- function cachePush(value) {
- var data = this.data;
- if (typeof value == 'string' || isObject(value)) {
- data.set.add(value);
- } else {
- data.hash[value] = true;
- }
- }
- /*------------------------------------------------------------------------*/
- /**
- * Creates a new array joining `array` with `other`.
- *
- * @private
- * @param {Array} array The array to join.
- * @param {Array} other The other array to join.
- * @returns {Array} Returns the new concatenated array.
- */
- function arrayConcat(array, other) {
- var index = -1, length = array.length, othIndex = -1, othLength = other.length, result = Array(length + othLength);
- while (++index < length) {
- result[index] = array[index];
- }
- while (++othIndex < othLength) {
- result[index++] = other[othIndex];
- }
- return result;
- }
- /**
- * Copies the values of `source` to `array`.
- *
- * @private
- * @param {Array} source The array to copy values from.
- * @param {Array} [array=[]] The array to copy values to.
- * @returns {Array} Returns `array`.
- */
- function arrayCopy(source, array) {
- var index = -1, length = source.length;
- array || (array = Array(length));
- while (++index < length) {
- array[index] = source[index];
- }
- return array;
- }
- /**
- * A specialized version of `_.forEach` for arrays without support for callback
- * shorthands and `this` binding.
- *
- * @private
- * @param {Array} array The array to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @returns {Array} Returns `array`.
- */
- function arrayEach(array, iteratee) {
- var index = -1, length = array.length;
- while (++index < length) {
- if (iteratee(array[index], index, array) === false) {
- break;
- }
- }
- return array;
- }
- /**
- * A specialized version of `_.forEachRight` for arrays without support for
- * callback shorthands and `this` binding.
- *
- * @private
- * @param {Array} array The array to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @returns {Array} Returns `array`.
- */
- function arrayEachRight(array, iteratee) {
- var length = array.length;
- while (length--) {
- if (iteratee(array[length], length, array) === false) {
- break;
- }
- }
- return array;
- }
- /**
- * A specialized version of `_.every` for arrays without support for callback
- * shorthands and `this` binding.
- *
- * @private
- * @param {Array} array The array to iterate over.
- * @param {Function} predicate The function invoked per iteration.
- * @returns {boolean} Returns `true` if all elements pass the predicate check,
- * else `false`.
- */
- function arrayEvery(array, predicate) {
- var index = -1, length = array.length;
- while (++index < length) {
- if (!predicate(array[index], index, array)) {
- return false;
- }
- }
- return true;
- }
- /**
- * A specialized version of `baseExtremum` for arrays which invokes `iteratee`
- * with one argument: (value).
- *
- * @private
- * @param {Array} array The array to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @param {Function} comparator The function used to compare values.
- * @param {*} exValue The initial extremum value.
- * @returns {*} Returns the extremum value.
- */
- function arrayExtremum(array, iteratee, comparator, exValue) {
- var index = -1, length = array.length, computed = exValue, result = computed;
- while (++index < length) {
- var value = array[index], current = +iteratee(value);
- if (comparator(current, computed)) {
- computed = current;
- result = value;
- }
- }
- return result;
- }
- /**
- * A specialized version of `_.filter` for arrays without support for callback
- * shorthands and `this` binding.
- *
- * @private
- * @param {Array} array The array to iterate over.
- * @param {Function} predicate The function invoked per iteration.
- * @returns {Array} Returns the new filtered array.
- */
- function arrayFilter(array, predicate) {
- var index = -1, length = array.length, resIndex = -1, result = [];
- while (++index < length) {
- var value = array[index];
- if (predicate(value, index, array)) {
- result[++resIndex] = value;
- }
- }
- return result;
- }
- /**
- * A specialized version of `_.map` for arrays without support for callback
- * shorthands and `this` binding.
- *
- * @private
- * @param {Array} array The array to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @returns {Array} Returns the new mapped array.
- */
- function arrayMap(array, iteratee) {
- var index = -1, length = array.length, result = Array(length);
- while (++index < length) {
- result[index] = iteratee(array[index], index, array);
- }
- return result;
- }
- /**
- * Appends the elements of `values` to `array`.
- *
- * @private
- * @param {Array} array The array to modify.
- * @param {Array} values The values to append.
- * @returns {Array} Returns `array`.
- */
- function arrayPush(array, values) {
- var index = -1, length = values.length, offset = array.length;
- while (++index < length) {
- array[offset + index] = values[index];
- }
- return array;
- }
- /**
- * A specialized version of `_.reduce` for arrays without support for callback
- * shorthands and `this` binding.
- *
- * @private
- * @param {Array} array The array to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @param {*} [accumulator] The initial value.
- * @param {boolean} [initFromArray] Specify using the first element of `array`
- * as the initial value.
- * @returns {*} Returns the accumulated value.
- */
- function arrayReduce(array, iteratee, accumulator, initFromArray) {
- var index = -1, length = array.length;
- if (initFromArray && length) {
- accumulator = array[++index];
- }
- while (++index < length) {
- accumulator = iteratee(accumulator, array[index], index, array);
- }
- return accumulator;
- }
- /**
- * A specialized version of `_.reduceRight` for arrays without support for
- * callback shorthands and `this` binding.
- *
- * @private
- * @param {Array} array The array to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @param {*} [accumulator] The initial value.
- * @param {boolean} [initFromArray] Specify using the last element of `array`
- * as the initial value.
- * @returns {*} Returns the accumulated value.
- */
- function arrayReduceRight(array, iteratee, accumulator, initFromArray) {
- var length = array.length;
- if (initFromArray && length) {
- accumulator = array[--length];
- }
- while (length--) {
- accumulator = iteratee(accumulator, array[length], length, array);
- }
- return accumulator;
- }
- /**
- * A specialized version of `_.some` for arrays without support for callback
- * shorthands and `this` binding.
- *
- * @private
- * @param {Array} array The array to iterate over.
- * @param {Function} predicate The function invoked per iteration.
- * @returns {boolean} Returns `true` if any element passes the predicate check,
- * else `false`.
- */
- function arraySome(array, predicate) {
- var index = -1, length = array.length;
- while (++index < length) {
- if (predicate(array[index], index, array)) {
- return true;
- }
- }
- return false;
- }
- /**
- * A specialized version of `_.sum` for arrays without support for callback
- * shorthands and `this` binding..
- *
- * @private
- * @param {Array} array The array to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @returns {number} Returns the sum.
- */
- function arraySum(array, iteratee) {
- var length = array.length, result = 0;
- while (length--) {
- result += +iteratee(array[length]) || 0;
- }
- return result;
- }
- /**
- * Used by `_.defaults` to customize its `_.assign` use.
- *
- * @private
- * @param {*} objectValue The destination object property value.
- * @param {*} sourceValue The source object property value.
- * @returns {*} Returns the value to assign to the destination object.
- */
- function assignDefaults(objectValue, sourceValue) {
- return objectValue === undefined ? sourceValue : objectValue;
- }
- /**
- * Used by `_.template` to customize its `_.assign` use.
- *
- * **Note:** This function is like `assignDefaults` except that it ignores
- * inherited property values when checking if a property is `undefined`.
- *
- * @private
- * @param {*} objectValue The destination object property value.
- * @param {*} sourceValue The source object property value.
- * @param {string} key The key associated with the object and source values.
- * @param {Object} object The destination object.
- * @returns {*} Returns the value to assign to the destination object.
- */
- function assignOwnDefaults(objectValue, sourceValue, key, object) {
- return objectValue === undefined || !hasOwnProperty.call(object, key) ? sourceValue : objectValue;
- }
- /**
- * A specialized version of `_.assign` for customizing assigned values without
- * support for argument juggling, multiple sources, and `this` binding `customizer`
- * functions.
- *
- * @private
- * @param {Object} object The destination object.
- * @param {Object} source The source object.
- * @param {Function} customizer The function to customize assigned values.
- * @returns {Object} Returns `object`.
- */
- function assignWith(object, source, customizer) {
- var index = -1, props = keys(source), length = props.length;
- while (++index < length) {
- var key = props[index], value = object[key], result = customizer(value, source[key], key, object, source);
- if ((result === result ? result !== value : value === value) || value === undefined && !(key in object)) {
- object[key] = result;
- }
- }
- return object;
- }
- /**
- * The base implementation of `_.assign` without support for argument juggling,
- * multiple sources, and `customizer` functions.
- *
- * @private
- * @param {Object} object The destination object.
- * @param {Object} source The source object.
- * @returns {Object} Returns `object`.
- */
- function baseAssign(object, source) {
- return source == null ? object : baseCopy(source, keys(source), object);
- }
- /**
- * The base implementation of `_.at` without support for string collections
- * and individual key arguments.
- *
- * @private
- * @param {Array|Object} collection The collection to iterate over.
- * @param {number[]|string[]} props The property names or indexes of elements to pick.
- * @returns {Array} Returns the new array of picked elements.
- */
- function baseAt(collection, props) {
- var index = -1, isNil = collection == null, isArr = !isNil && isArrayLike(collection), length = isArr ? collection.length : 0, propsLength = props.length, result = Array(propsLength);
- while (++index < propsLength) {
- var key = props[index];
- if (isArr) {
- result[index] = isIndex(key, length) ? collection[key] : undefined;
- } else {
- result[index] = isNil ? undefined : collection[key];
- }
- }
- return result;
- }
- /**
- * Copies properties of `source` to `object`.
- *
- * @private
- * @param {Object} source The object to copy properties from.
- * @param {Array} props The property names to copy.
- * @param {Object} [object={}] The object to copy properties to.
- * @returns {Object} Returns `object`.
- */
- function baseCopy(source, props, object) {
- object || (object = {});
- var index = -1, length = props.length;
- while (++index < length) {
- var key = props[index];
- object[key] = source[key];
- }
- return object;
- }
- /**
- * The base implementation of `_.callback` which supports specifying the
- * number of arguments to provide to `func`.
- *
- * @private
- * @param {*} [func=_.identity] The value to convert to a callback.
- * @param {*} [thisArg] The `this` binding of `func`.
- * @param {number} [argCount] The number of arguments to provide to `func`.
- * @returns {Function} Returns the callback.
- */
- function baseCallback(func, thisArg, argCount) {
- var type = typeof func;
- if (type == 'function') {
- return thisArg === undefined ? func : bindCallback(func, thisArg, argCount);
- }
- if (func == null) {
- return identity;
- }
- if (type == 'object') {
- return baseMatches(func);
- }
- return thisArg === undefined ? property(func) : baseMatchesProperty(func, thisArg);
- }
- /**
- * The base implementation of `_.clone` without support for argument juggling
- * and `this` binding `customizer` functions.
- *
- * @private
- * @param {*} value The value to clone.
- * @param {boolean} [isDeep] Specify a deep clone.
- * @param {Function} [customizer] The function to customize cloning values.
- * @param {string} [key] The key of `value`.
- * @param {Object} [object] The object `value` belongs to.
- * @param {Array} [stackA=[]] Tracks traversed source objects.
- * @param {Array} [stackB=[]] Associates clones with source counterparts.
- * @returns {*} Returns the cloned value.
- */
- function baseClone(value, isDeep, customizer, key, object, stackA, stackB) {
- var result;
- if (customizer) {
- result = object ? customizer(value, key, object) : customizer(value);
- }
- if (result !== undefined) {
- return result;
- }
- if (!isObject(value)) {
- return value;
- }
- var isArr = isArray(value);
- if (isArr) {
- result = initCloneArray(value);
- if (!isDeep) {
- return arrayCopy(value, result);
- }
- } else {
- var tag = objToString.call(value), isFunc = tag == funcTag;
- if (tag == objectTag || tag == argsTag || isFunc && !object) {
- result = initCloneObject(isFunc ? {} : value);
- if (!isDeep) {
- return baseAssign(result, value);
- }
- } else {
- return cloneableTags[tag] ? initCloneByTag(value, tag, isDeep) : object ? value : {};
- }
- }
- // Check for circular references and return its corresponding clone.
- stackA || (stackA = []);
- stackB || (stackB = []);
- var length = stackA.length;
- while (length--) {
- if (stackA[length] == value) {
- return stackB[length];
- }
- }
- // Add the source value to the stack of traversed objects and associate it with its clone.
- stackA.push(value);
- stackB.push(result);
- // Recursively populate clone (susceptible to call stack limits).
- (isArr ? arrayEach : baseForOwn)(value, function (subValue, key) {
- result[key] = baseClone(subValue, isDeep, customizer, key, value, stackA, stackB);
- });
- return result;
- }
- /**
- * The base implementation of `_.create` without support for assigning
- * properties to the created object.
- *
- * @private
- * @param {Object} prototype The object to inherit from.
- * @returns {Object} Returns the new object.
- */
- var baseCreate = function () {
- function object() {
- }
- return function (prototype) {
- if (isObject(prototype)) {
- object.prototype = prototype;
- var result = new object();
- object.prototype = undefined;
- }
- return result || {};
- };
- }();
- /**
- * The base implementation of `_.delay` and `_.defer` which accepts an index
- * of where to slice the arguments to provide to `func`.
- *
- * @private
- * @param {Function} func The function to delay.
- * @param {number} wait The number of milliseconds to delay invocation.
- * @param {Object} args The arguments provide to `func`.
- * @returns {number} Returns the timer id.
- */
- function baseDelay(func, wait, args) {
- if (typeof func != 'function') {
- throw new TypeError(FUNC_ERROR_TEXT);
- }
- return setTimeout(function () {
- func.apply(undefined, args);
- }, wait);
- }
- /**
- * The base implementation of `_.difference` which accepts a single array
- * of values to exclude.
- *
- * @private
- * @param {Array} array The array to inspect.
- * @param {Array} values The values to exclude.
- * @returns {Array} Returns the new array of filtered values.
- */
- function baseDifference(array, values) {
- var length = array ? array.length : 0, result = [];
- if (!length) {
- return result;
- }
- var index = -1, indexOf = getIndexOf(), isCommon = indexOf === baseIndexOf, cache = isCommon && values.length >= LARGE_ARRAY_SIZE ? createCache(values) : null, valuesLength = values.length;
- if (cache) {
- indexOf = cacheIndexOf;
- isCommon = false;
- values = cache;
- }
- outer:
- while (++index < length) {
- var value = array[index];
- if (isCommon && value === value) {
- var valuesIndex = valuesLength;
- while (valuesIndex--) {
- if (values[valuesIndex] === value) {
- continue outer;
- }
- }
- result.push(value);
- } else if (indexOf(values, value, 0) < 0) {
- result.push(value);
- }
- }
- return result;
- }
- /**
- * The base implementation of `_.forEach` without support for callback
- * shorthands and `this` binding.
- *
- * @private
- * @param {Array|Object|string} collection The collection to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @returns {Array|Object|string} Returns `collection`.
- */
- var baseEach = createBaseEach(baseForOwn);
- /**
- * The base implementation of `_.forEachRight` without support for callback
- * shorthands and `this` binding.
- *
- * @private
- * @param {Array|Object|string} collection The collection to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @returns {Array|Object|string} Returns `collection`.
- */
- var baseEachRight = createBaseEach(baseForOwnRight, true);
- /**
- * The base implementation of `_.every` without support for callback
- * shorthands and `this` binding.
- *
- * @private
- * @param {Array|Object|string} collection The collection to iterate over.
- * @param {Function} predicate The function invoked per iteration.
- * @returns {boolean} Returns `true` if all elements pass the predicate check,
- * else `false`
- */
- function baseEvery(collection, predicate) {
- var result = true;
- baseEach(collection, function (value, index, collection) {
- result = !!predicate(value, index, collection);
- return result;
- });
- return result;
- }
- /**
- * Gets the extremum value of `collection` invoking `iteratee` for each value
- * in `collection` to generate the criterion by which the value is ranked.
- * The `iteratee` is invoked with three arguments: (value, index|key, collection).
- *
- * @private
- * @param {Array|Object|string} collection The collection to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @param {Function} comparator The function used to compare values.
- * @param {*} exValue The initial extremum value.
- * @returns {*} Returns the extremum value.
- */
- function baseExtremum(collection, iteratee, comparator, exValue) {
- var computed = exValue, result = computed;
- baseEach(collection, function (value, index, collection) {
- var current = +iteratee(value, index, collection);
- if (comparator(current, computed) || current === exValue && current === result) {
- computed = current;
- result = value;
- }
- });
- return result;
- }
- /**
- * The base implementation of `_.fill` without an iteratee call guard.
- *
- * @private
- * @param {Array} array The array to fill.
- * @param {*} value The value to fill `array` with.
- * @param {number} [start=0] The start position.
- * @param {number} [end=array.length] The end position.
- * @returns {Array} Returns `array`.
- */
- function baseFill(array, value, start, end) {
- var length = array.length;
- start = start == null ? 0 : +start || 0;
- if (start < 0) {
- start = -start > length ? 0 : length + start;
- }
- end = end === undefined || end > length ? length : +end || 0;
- if (end < 0) {
- end += length;
- }
- length = start > end ? 0 : end >>> 0;
- start >>>= 0;
- while (start < length) {
- array[start++] = value;
- }
- return array;
- }
- /**
- * The base implementation of `_.filter` without support for callback
- * shorthands and `this` binding.
- *
- * @private
- * @param {Array|Object|string} collection The collection to iterate over.
- * @param {Function} predicate The function invoked per iteration.
- * @returns {Array} Returns the new filtered array.
- */
- function baseFilter(collection, predicate) {
- var result = [];
- baseEach(collection, function (value, index, collection) {
- if (predicate(value, index, collection)) {
- result.push(value);
- }
- });
- return result;
- }
- /**
- * The base implementation of `_.find`, `_.findLast`, `_.findKey`, and `_.findLastKey`,
- * without support for callback shorthands and `this` binding, which iterates
- * over `collection` using the provided `eachFunc`.
- *
- * @private
- * @param {Array|Object|string} collection The collection to search.
- * @param {Function} predicate The function invoked per iteration.
- * @param {Function} eachFunc The function to iterate over `collection`.
- * @param {boolean} [retKey] Specify returning the key of the found element
- * instead of the element itself.
- * @returns {*} Returns the found element or its key, else `undefined`.
- */
- function baseFind(collection, predicate, eachFunc, retKey) {
- var result;
- eachFunc(collection, function (value, key, collection) {
- if (predicate(value, key, collection)) {
- result = retKey ? key : value;
- return false;
- }
- });
- return result;
- }
- /**
- * The base implementation of `_.flatten` with added support for restricting
- * flattening and specifying the start index.
- *
- * @private
- * @param {Array} array The array to flatten.
- * @param {boolean} [isDeep] Specify a deep flatten.
- * @param {boolean} [isStrict] Restrict flattening to arrays-like objects.
- * @param {Array} [result=[]] The initial result value.
- * @returns {Array} Returns the new flattened array.
- */
- function baseFlatten(array, isDeep, isStrict, result) {
- result || (result = []);
- var index = -1, length = array.length;
- while (++index < length) {
- var value = array[index];
- if (isObjectLike(value) && isArrayLike(value) && (isStrict || isArray(value) || isArguments(value))) {
- if (isDeep) {
- // Recursively flatten arrays (susceptible to call stack limits).
- baseFlatten(value, isDeep, isStrict, result);
- } else {
- arrayPush(result, value);
- }
- } else if (!isStrict) {
- result[result.length] = value;
- }
- }
- return result;
- }
- /**
- * The base implementation of `baseForIn` and `baseForOwn` which iterates
- * over `object` properties returned by `keysFunc` invoking `iteratee` for
- * each property. Iteratee functions may exit iteration early by explicitly
- * returning `false`.
- *
- * @private
- * @param {Object} object The object to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @param {Function} keysFunc The function to get the keys of `object`.
- * @returns {Object} Returns `object`.
- */
- var baseFor = createBaseFor();
- /**
- * This function is like `baseFor` except that it iterates over properties
- * in the opposite order.
- *
- * @private
- * @param {Object} object The object to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @param {Function} keysFunc The function to get the keys of `object`.
- * @returns {Object} Returns `object`.
- */
- var baseForRight = createBaseFor(true);
- /**
- * The base implementation of `_.forIn` without support for callback
- * shorthands and `this` binding.
- *
- * @private
- * @param {Object} object The object to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @returns {Object} Returns `object`.
- */
- function baseForIn(object, iteratee) {
- return baseFor(object, iteratee, keysIn);
- }
- /**
- * The base implementation of `_.forOwn` without support for callback
- * shorthands and `this` binding.
- *
- * @private
- * @param {Object} object The object to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @returns {Object} Returns `object`.
- */
- function baseForOwn(object, iteratee) {
- return baseFor(object, iteratee, keys);
- }
- /**
- * The base implementation of `_.forOwnRight` without support for callback
- * shorthands and `this` binding.
- *
- * @private
- * @param {Object} object The object to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @returns {Object} Returns `object`.
- */
- function baseForOwnRight(object, iteratee) {
- return baseForRight(object, iteratee, keys);
- }
- /**
- * The base implementation of `_.functions` which creates an array of
- * `object` function property names filtered from those provided.
- *
- * @private
- * @param {Object} object The object to inspect.
- * @param {Array} props The property names to filter.
- * @returns {Array} Returns the new array of filtered property names.
- */
- function baseFunctions(object, props) {
- var index = -1, length = props.length, resIndex = -1, result = [];
- while (++index < length) {
- var key = props[index];
- if (isFunction(object[key])) {
- result[++resIndex] = key;
- }
- }
- return result;
- }
- /**
- * The base implementation of `get` without support for string paths
- * and default values.
- *
- * @private
- * @param {Object} object The object to query.
- * @param {Array} path The path of the property to get.
- * @param {string} [pathKey] The key representation of path.
- * @returns {*} Returns the resolved value.
- */
- function baseGet(object, path, pathKey) {
- if (object == null) {
- return;
- }
- if (pathKey !== undefined && pathKey in toObject(object)) {
- path = [pathKey];
- }
- var index = 0, length = path.length;
- while (object != null && index < length) {
- object = object[path[index++]];
- }
- return index && index == length ? object : undefined;
- }
- /**
- * The base implementation of `_.isEqual` without support for `this` binding
- * `customizer` functions.
- *
- * @private
- * @param {*} value The value to compare.
- * @param {*} other The other value to compare.
- * @param {Function} [customizer] The function to customize comparing values.
- * @param {boolean} [isLoose] Specify performing partial comparisons.
- * @param {Array} [stackA] Tracks traversed `value` objects.
- * @param {Array} [stackB] Tracks traversed `other` objects.
- * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
- */
- function baseIsEqual(value, other, customizer, isLoose, stackA, stackB) {
- if (value === other) {
- return true;
- }
- if (value == null || other == null || !isObject(value) && !isObjectLike(other)) {
- return value !== value && other !== other;
- }
- return baseIsEqualDeep(value, other, baseIsEqual, customizer, isLoose, stackA, stackB);
- }
- /**
- * A specialized version of `baseIsEqual` for arrays and objects which performs
- * deep comparisons and tracks traversed objects enabling objects with circular
- * references to be compared.
- *
- * @private
- * @param {Object} object The object to compare.
- * @param {Object} other The other object to compare.
- * @param {Function} equalFunc The function to determine equivalents of values.
- * @param {Function} [customizer] The function to customize comparing objects.
- * @param {boolean} [isLoose] Specify performing partial comparisons.
- * @param {Array} [stackA=[]] Tracks traversed `value` objects.
- * @param {Array} [stackB=[]] Tracks traversed `other` objects.
- * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
- */
- function baseIsEqualDeep(object, other, equalFunc, customizer, isLoose, stackA, stackB) {
- var objIsArr = isArray(object), othIsArr = isArray(other), objTag = arrayTag, othTag = arrayTag;
- if (!objIsArr) {
- objTag = objToString.call(object);
- if (objTag == argsTag) {
- objTag = objectTag;
- } else if (objTag != objectTag) {
- objIsArr = isTypedArray(object);
- }
- }
- if (!othIsArr) {
- othTag = objToString.call(other);
- if (othTag == argsTag) {
- othTag = objectTag;
- } else if (othTag != objectTag) {
- othIsArr = isTypedArray(other);
- }
- }
- var objIsObj = objTag == objectTag, othIsObj = othTag == objectTag, isSameTag = objTag == othTag;
- if (isSameTag && !(objIsArr || objIsObj)) {
- return equalByTag(object, other, objTag);
- }
- if (!isLoose) {
- var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'), othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');
- if (objIsWrapped || othIsWrapped) {
- return equalFunc(objIsWrapped ? object.value() : object, othIsWrapped ? other.value() : other, customizer, isLoose, stackA, stackB);
- }
- }
- if (!isSameTag) {
- return false;
- }
- // Assume cyclic values are equal.
- // For more information on detecting circular references see https://es5.github.io/#JO.
- stackA || (stackA = []);
- stackB || (stackB = []);
- var length = stackA.length;
- while (length--) {
- if (stackA[length] == object) {
- return stackB[length] == other;
- }
- }
- // Add `object` and `other` to the stack of traversed objects.
- stackA.push(object);
- stackB.push(other);
- var result = (objIsArr ? equalArrays : equalObjects)(object, other, equalFunc, customizer, isLoose, stackA, stackB);
- stackA.pop();
- stackB.pop();
- return result;
- }
- /**
- * The base implementation of `_.isMatch` without support for callback
- * shorthands and `this` binding.
- *
- * @private
- * @param {Object} object The object to inspect.
- * @param {Array} matchData The propery names, values, and compare flags to match.
- * @param {Function} [customizer] The function to customize comparing objects.
- * @returns {boolean} Returns `true` if `object` is a match, else `false`.
- */
- function baseIsMatch(object, matchData, customizer) {
- var index = matchData.length, length = index, noCustomizer = !customizer;
- if (object == null) {
- return !length;
- }
- object = toObject(object);
- while (index--) {
- var data = matchData[index];
- if (noCustomizer && data[2] ? data[1] !== object[data[0]] : !(data[0] in object)) {
- return false;
- }
- }
- while (++index < length) {
- data = matchData[index];
- var key = data[0], objValue = object[key], srcValue = data[1];
- if (noCustomizer && data[2]) {
- if (objValue === undefined && !(key in object)) {
- return false;
- }
- } else {
- var result = customizer ? customizer(objValue, srcValue, key) : undefined;
- if (!(result === undefined ? baseIsEqual(srcValue, objValue, customizer, true) : result)) {
- return false;
- }
- }
- }
- return true;
- }
- /**
- * The base implementation of `_.map` without support for callback shorthands
- * and `this` binding.
- *
- * @private
- * @param {Array|Object|string} collection The collection to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @returns {Array} Returns the new mapped array.
- */
- function baseMap(collection, iteratee) {
- var index = -1, result = isArrayLike(collection) ? Array(collection.length) : [];
- baseEach(collection, function (value, key, collection) {
- result[++index] = iteratee(value, key, collection);
- });
- return result;
- }
- /**
- * The base implementation of `_.matches` which does not clone `source`.
- *
- * @private
- * @param {Object} source The object of property values to match.
- * @returns {Function} Returns the new function.
- */
- function baseMatches(source) {
- var matchData = getMatchData(source);
- if (matchData.length == 1 && matchData[0][2]) {
- var key = matchData[0][0], value = matchData[0][1];
- return function (object) {
- if (object == null) {
- return false;
- }
- return object[key] === value && (value !== undefined || key in toObject(object));
- };
- }
- return function (object) {
- return baseIsMatch(object, matchData);
- };
- }
- /**
- * The base implementation of `_.matchesProperty` which does not clone `srcValue`.
- *
- * @private
- * @param {string} path The path of the property to get.
- * @param {*} srcValue The value to compare.
- * @returns {Function} Returns the new function.
- */
- function baseMatchesProperty(path, srcValue) {
- var isArr = isArray(path), isCommon = isKey(path) && isStrictComparable(srcValue), pathKey = path + '';
- path = toPath(path);
- return function (object) {
- if (object == null) {
- return false;
- }
- var key = pathKey;
- object = toObject(object);
- if ((isArr || !isCommon) && !(key in object)) {
- object = path.length == 1 ? object : baseGet(object, baseSlice(path, 0, -1));
- if (object == null) {
- return false;
- }
- key = last(path);
- object = toObject(object);
- }
- return object[key] === srcValue ? srcValue !== undefined || key in object : baseIsEqual(srcValue, object[key], undefined, true);
- };
- }
- /**
- * The base implementation of `_.merge` without support for argument juggling,
- * multiple sources, and `this` binding `customizer` functions.
- *
- * @private
- * @param {Object} object The destination object.
- * @param {Object} source The source object.
- * @param {Function} [customizer] The function to customize merged values.
- * @param {Array} [stackA=[]] Tracks traversed source objects.
- * @param {Array} [stackB=[]] Associates values with source counterparts.
- * @returns {Object} Returns `object`.
- */
- function baseMerge(object, source, customizer, stackA, stackB) {
- if (!isObject(object)) {
- return object;
- }
- var isSrcArr = isArrayLike(source) && (isArray(source) || isTypedArray(source)), props = isSrcArr ? undefined : keys(source);
- arrayEach(props || source, function (srcValue, key) {
- if (props) {
- key = srcValue;
- srcValue = source[key];
- }
- if (isObjectLike(srcValue)) {
- stackA || (stackA = []);
- stackB || (stackB = []);
- baseMergeDeep(object, source, key, baseMerge, customizer, stackA, stackB);
- } else {
- var value = object[key], result = customizer ? customizer(value, srcValue, key, object, source) : undefined, isCommon = result === undefined;
- if (isCommon) {
- result = srcValue;
- }
- if ((result !== undefined || isSrcArr && !(key in object)) && (isCommon || (result === result ? result !== value : value === value))) {
- object[key] = result;
- }
- }
- });
- return object;
- }
- /**
- * A specialized version of `baseMerge` for arrays and objects which performs
- * deep merges and tracks traversed objects enabling objects with circular
- * references to be merged.
- *
- * @private
- * @param {Object} object The destination object.
- * @param {Object} source The source object.
- * @param {string} key The key of the value to merge.
- * @param {Function} mergeFunc The function to merge values.
- * @param {Function} [customizer] The function to customize merged values.
- * @param {Array} [stackA=[]] Tracks traversed source objects.
- * @param {Array} [stackB=[]] Associates values with source counterparts.
- * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
- */
- function baseMergeDeep(object, source, key, mergeFunc, customizer, stackA, stackB) {
- var length = stackA.length, srcValue = source[key];
- while (length--) {
- if (stackA[length] == srcValue) {
- object[key] = stackB[length];
- return;
- }
- }
- var value = object[key], result = customizer ? customizer(value, srcValue, key, object, source) : undefined, isCommon = result === undefined;
- if (isCommon) {
- result = srcValue;
- if (isArrayLike(srcValue) && (isArray(srcValue) || isTypedArray(srcValue))) {
- result = isArray(value) ? value : isArrayLike(value) ? arrayCopy(value) : [];
- } else if (isPlainObject(srcValue) || isArguments(srcValue)) {
- result = isArguments(value) ? toPlainObject(value) : isPlainObject(value) ? value : {};
- } else {
- isCommon = false;
- }
- }
- // Add the source value to the stack of traversed objects and associate
- // it with its merged value.
- stackA.push(srcValue);
- stackB.push(result);
- if (isCommon) {
- // Recursively merge objects and arrays (susceptible to call stack limits).
- object[key] = mergeFunc(result, srcValue, customizer, stackA, stackB);
- } else if (result === result ? result !== value : value === value) {
- object[key] = result;
- }
- }
- /**
- * The base implementation of `_.property` without support for deep paths.
- *
- * @private
- * @param {string} key The key of the property to get.
- * @returns {Function} Returns the new function.
- */
- function baseProperty(key) {
- return function (object) {
- return object == null ? undefined : object[key];
- };
- }
- /**
- * A specialized version of `baseProperty` which supports deep paths.
- *
- * @private
- * @param {Array|string} path The path of the property to get.
- * @returns {Function} Returns the new function.
- */
- function basePropertyDeep(path) {
- var pathKey = path + '';
- path = toPath(path);
- return function (object) {
- return baseGet(object, path, pathKey);
- };
- }
- /**
- * The base implementation of `_.pullAt` without support for individual
- * index arguments and capturing the removed elements.
- *
- * @private
- * @param {Array} array The array to modify.
- * @param {number[]} indexes The indexes of elements to remove.
- * @returns {Array} Returns `array`.
- */
- function basePullAt(array, indexes) {
- var length = array ? indexes.length : 0;
- while (length--) {
- var index = indexes[length];
- if (index != previous && isIndex(index)) {
- var previous = index;
- splice.call(array, index, 1);
- }
- }
- return array;
- }
- /**
- * The base implementation of `_.random` without support for argument juggling
- * and returning floating-point numbers.
- *
- * @private
- * @param {number} min The minimum possible value.
- * @param {number} max The maximum possible value.
- * @returns {number} Returns the random number.
- */
- function baseRandom(min, max) {
- return min + nativeFloor(nativeRandom() * (max - min + 1));
- }
- /**
- * The base implementation of `_.reduce` and `_.reduceRight` without support
- * for callback shorthands and `this` binding, which iterates over `collection`
- * using the provided `eachFunc`.
- *
- * @private
- * @param {Array|Object|string} collection The collection to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @param {*} accumulator The initial value.
- * @param {boolean} initFromCollection Specify using the first or last element
- * of `collection` as the initial value.
- * @param {Function} eachFunc The function to iterate over `collection`.
- * @returns {*} Returns the accumulated value.
- */
- function baseReduce(collection, iteratee, accumulator, initFromCollection, eachFunc) {
- eachFunc(collection, function (value, index, collection) {
- accumulator = initFromCollection ? (initFromCollection = false, value) : iteratee(accumulator, value, index, collection);
- });
- return accumulator;
- }
- /**
- * The base implementation of `setData` without support for hot loop detection.
- *
- * @private
- * @param {Function} func The function to associate metadata with.
- * @param {*} data The metadata.
- * @returns {Function} Returns `func`.
- */
- var baseSetData = !metaMap ? identity : function (func, data) {
- metaMap.set(func, data);
- return func;
- };
- /**
- * The base implementation of `_.slice` without an iteratee call guard.
- *
- * @private
- * @param {Array} array The array to slice.
- * @param {number} [start=0] The start position.
- * @param {number} [end=array.length] The end position.
- * @returns {Array} Returns the slice of `array`.
- */
- function baseSlice(array, start, end) {
- var index = -1, length = array.length;
- start = start == null ? 0 : +start || 0;
- if (start < 0) {
- start = -start > length ? 0 : length + start;
- }
- end = end === undefined || end > length ? length : +end || 0;
- if (end < 0) {
- end += length;
- }
- length = start > end ? 0 : end - start >>> 0;
- start >>>= 0;
- var result = Array(length);
- while (++index < length) {
- result[index] = array[index + start];
- }
- return result;
- }
- /**
- * The base implementation of `_.some` without support for callback shorthands
- * and `this` binding.
- *
- * @private
- * @param {Array|Object|string} collection The collection to iterate over.
- * @param {Function} predicate The function invoked per iteration.
- * @returns {boolean} Returns `true` if any element passes the predicate check,
- * else `false`.
- */
- function baseSome(collection, predicate) {
- var result;
- baseEach(collection, function (value, index, collection) {
- result = predicate(value, index, collection);
- return !result;
- });
- return !!result;
- }
- /**
- * The base implementation of `_.sortBy` which uses `comparer` to define
- * the sort order of `array` and replaces criteria objects with their
- * corresponding values.
- *
- * @private
- * @param {Array} array The array to sort.
- * @param {Function} comparer The function to define sort order.
- * @returns {Array} Returns `array`.
- */
- function baseSortBy(array, comparer) {
- var length = array.length;
- array.sort(comparer);
- while (length--) {
- array[length] = array[length].value;
- }
- return array;
- }
- /**
- * The base implementation of `_.sortByOrder` without param guards.
- *
- * @private
- * @param {Array|Object|string} collection The collection to iterate over.
- * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by.
- * @param {boolean[]} orders The sort orders of `iteratees`.
- * @returns {Array} Returns the new sorted array.
- */
- function baseSortByOrder(collection, iteratees, orders) {
- var callback = getCallback(), index = -1;
- iteratees = arrayMap(iteratees, function (iteratee) {
- return callback(iteratee);
- });
- var result = baseMap(collection, function (value) {
- var criteria = arrayMap(iteratees, function (iteratee) {
- return iteratee(value);
- });
- return {
- 'criteria': criteria,
- 'index': ++index,
- 'value': value
- };
- });
- return baseSortBy(result, function (object, other) {
- return compareMultiple(object, other, orders);
- });
- }
- /**
- * The base implementation of `_.sum` without support for callback shorthands
- * and `this` binding.
- *
- * @private
- * @param {Array|Object|string} collection The collection to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @returns {number} Returns the sum.
- */
- function baseSum(collection, iteratee) {
- var result = 0;
- baseEach(collection, function (value, index, collection) {
- result += +iteratee(value, index, collection) || 0;
- });
- return result;
- }
- /**
- * The base implementation of `_.uniq` without support for callback shorthands
- * and `this` binding.
- *
- * @private
- * @param {Array} array The array to inspect.
- * @param {Function} [iteratee] The function invoked per iteration.
- * @returns {Array} Returns the new duplicate free array.
- */
- function baseUniq(array, iteratee) {
- var index = -1, indexOf = getIndexOf(), length = array.length, isCommon = indexOf === baseIndexOf, isLarge = isCommon && length >= LARGE_ARRAY_SIZE, seen = isLarge ? createCache() : null, result = [];
- if (seen) {
- indexOf = cacheIndexOf;
- isCommon = false;
- } else {
- isLarge = false;
- seen = iteratee ? [] : result;
- }
- outer:
- while (++index < length) {
- var value = array[index], computed = iteratee ? iteratee(value, index, array) : value;
- if (isCommon && value === value) {
- var seenIndex = seen.length;
- while (seenIndex--) {
- if (seen[seenIndex] === computed) {
- continue outer;
- }
- }
- if (iteratee) {
- seen.push(computed);
- }
- result.push(value);
- } else if (indexOf(seen, computed, 0) < 0) {
- if (iteratee || isLarge) {
- seen.push(computed);
- }
- result.push(value);
- }
- }
- return result;
- }
- /**
- * The base implementation of `_.values` and `_.valuesIn` which creates an
- * array of `object` property values corresponding to the property names
- * of `props`.
- *
- * @private
- * @param {Object} object The object to query.
- * @param {Array} props The property names to get values for.
- * @returns {Object} Returns the array of property values.
- */
- function baseValues(object, props) {
- var index = -1, length = props.length, result = Array(length);
- while (++index < length) {
- result[index] = object[props[index]];
- }
- return result;
- }
- /**
- * The base implementation of `_.dropRightWhile`, `_.dropWhile`, `_.takeRightWhile`,
- * and `_.takeWhile` without support for callback shorthands and `this` binding.
- *
- * @private
- * @param {Array} array The array to query.
- * @param {Function} predicate The function invoked per iteration.
- * @param {boolean} [isDrop] Specify dropping elements instead of taking them.
- * @param {boolean} [fromRight] Specify iterating from right to left.
- * @returns {Array} Returns the slice of `array`.
- */
- function baseWhile(array, predicate, isDrop, fromRight) {
- var length = array.length, index = fromRight ? length : -1;
- while ((fromRight ? index-- : ++index < length) && predicate(array[index], index, array)) {
- }
- return isDrop ? baseSlice(array, fromRight ? 0 : index, fromRight ? index + 1 : length) : baseSlice(array, fromRight ? index + 1 : 0, fromRight ? length : index);
- }
- /**
- * The base implementation of `wrapperValue` which returns the result of
- * performing a sequence of actions on the unwrapped `value`, where each
- * successive action is supplied the return value of the previous.
- *
- * @private
- * @param {*} value The unwrapped value.
- * @param {Array} actions Actions to peform to resolve the unwrapped value.
- * @returns {*} Returns the resolved value.
- */
- function baseWrapperValue(value, actions) {
- var result = value;
- if (result instanceof LazyWrapper) {
- result = result.value();
- }
- var index = -1, length = actions.length;
- while (++index < length) {
- var action = actions[index];
- result = action.func.apply(action.thisArg, arrayPush([result], action.args));
- }
- return result;
- }
- /**
- * Performs a binary search of `array` to determine the index at which `value`
- * should be inserted into `array` in order to maintain its sort order.
- *
- * @private
- * @param {Array} array The sorted array to inspect.
- * @param {*} value The value to evaluate.
- * @param {boolean} [retHighest] Specify returning the highest qualified index.
- * @returns {number} Returns the index at which `value` should be inserted
- * into `array`.
- */
- function binaryIndex(array, value, retHighest) {
- var low = 0, high = array ? array.length : low;
- if (typeof value == 'number' && value === value && high <= HALF_MAX_ARRAY_LENGTH) {
- while (low < high) {
- var mid = low + high >>> 1, computed = array[mid];
- if ((retHighest ? computed <= value : computed < value) && computed !== null) {
- low = mid + 1;
- } else {
- high = mid;
- }
- }
- return high;
- }
- return binaryIndexBy(array, value, identity, retHighest);
- }
- /**
- * This function is like `binaryIndex` except that it invokes `iteratee` for
- * `value` and each element of `array` to compute their sort ranking. The
- * iteratee is invoked with one argument; (value).
- *
- * @private
- * @param {Array} array The sorted array to inspect.
- * @param {*} value The value to evaluate.
- * @param {Function} iteratee The function invoked per iteration.
- * @param {boolean} [retHighest] Specify returning the highest qualified index.
- * @returns {number} Returns the index at which `value` should be inserted
- * into `array`.
- */
- function binaryIndexBy(array, value, iteratee, retHighest) {
- value = iteratee(value);
- var low = 0, high = array ? array.length : 0, valIsNaN = value !== value, valIsNull = value === null, valIsUndef = value === undefined;
- while (low < high) {
- var mid = nativeFloor((low + high) / 2), computed = iteratee(array[mid]), isDef = computed !== undefined, isReflexive = computed === computed;
- if (valIsNaN) {
- var setLow = isReflexive || retHighest;
- } else if (valIsNull) {
- setLow = isReflexive && isDef && (retHighest || computed != null);
- } else if (valIsUndef) {
- setLow = isReflexive && (retHighest || isDef);
- } else if (computed == null) {
- setLow = false;
- } else {
- setLow = retHighest ? computed <= value : computed < value;
- }
- if (setLow) {
- low = mid + 1;
- } else {
- high = mid;
- }
- }
- return nativeMin(high, MAX_ARRAY_INDEX);
- }
- /**
- * A specialized version of `baseCallback` which only supports `this` binding
- * and specifying the number of arguments to provide to `func`.
- *
- * @private
- * @param {Function} func The function to bind.
- * @param {*} thisArg The `this` binding of `func`.
- * @param {number} [argCount] The number of arguments to provide to `func`.
- * @returns {Function} Returns the callback.
- */
- function bindCallback(func, thisArg, argCount) {
- if (typeof func != 'function') {
- return identity;
- }
- if (thisArg === undefined) {
- return func;
- }
- switch (argCount) {
- case 1:
- return function (value) {
- return func.call(thisArg, value);
- };
- case 3:
- return function (value, index, collection) {
- return func.call(thisArg, value, index, collection);
- };
- case 4:
- return function (accumulator, value, index, collection) {
- return func.call(thisArg, accumulator, value, index, collection);
- };
- case 5:
- return function (value, other, key, object, source) {
- return func.call(thisArg, value, other, key, object, source);
- };
- }
- return function () {
- return func.apply(thisArg, arguments);
- };
- }
- /**
- * Creates a clone of the given array buffer.
- *
- * @private
- * @param {ArrayBuffer} buffer The array buffer to clone.
- * @returns {ArrayBuffer} Returns the cloned array buffer.
- */
- function bufferClone(buffer) {
- var result = new ArrayBuffer(buffer.byteLength), view = new Uint8Array(result);
- view.set(new Uint8Array(buffer));
- return result;
- }
- /**
- * Creates an array that is the composition of partially applied arguments,
- * placeholders, and provided arguments into a single array of arguments.
- *
- * @private
- * @param {Array|Object} args The provided arguments.
- * @param {Array} partials The arguments to prepend to those provided.
- * @param {Array} holders The `partials` placeholder indexes.
- * @returns {Array} Returns the new array of composed arguments.
- */
- function composeArgs(args, partials, holders) {
- var holdersLength = holders.length, argsIndex = -1, argsLength = nativeMax(args.length - holdersLength, 0), leftIndex = -1, leftLength = partials.length, result = Array(leftLength + argsLength);
- while (++leftIndex < leftLength) {
- result[leftIndex] = partials[leftIndex];
- }
- while (++argsIndex < holdersLength) {
- result[holders[argsIndex]] = args[argsIndex];
- }
- while (argsLength--) {
- result[leftIndex++] = args[argsIndex++];
- }
- return result;
- }
- /**
- * This function is like `composeArgs` except that the arguments composition
- * is tailored for `_.partialRight`.
- *
- * @private
- * @param {Array|Object} args The provided arguments.
- * @param {Array} partials The arguments to append to those provided.
- * @param {Array} holders The `partials` placeholder indexes.
- * @returns {Array} Returns the new array of composed arguments.
- */
- function composeArgsRight(args, partials, holders) {
- var holdersIndex = -1, holdersLength = holders.length, argsIndex = -1, argsLength = nativeMax(args.length - holdersLength, 0), rightIndex = -1, rightLength = partials.length, result = Array(argsLength + rightLength);
- while (++argsIndex < argsLength) {
- result[argsIndex] = args[argsIndex];
- }
- var offset = argsIndex;
- while (++rightIndex < rightLength) {
- result[offset + rightIndex] = partials[rightIndex];
- }
- while (++holdersIndex < holdersLength) {
- result[offset + holders[holdersIndex]] = args[argsIndex++];
- }
- return result;
- }
- /**
- * Creates a `_.countBy`, `_.groupBy`, `_.indexBy`, or `_.partition` function.
- *
- * @private
- * @param {Function} setter The function to set keys and values of the accumulator object.
- * @param {Function} [initializer] The function to initialize the accumulator object.
- * @returns {Function} Returns the new aggregator function.
- */
- function createAggregator(setter, initializer) {
- return function (collection, iteratee, thisArg) {
- var result = initializer ? initializer() : {};
- iteratee = getCallback(iteratee, thisArg, 3);
- if (isArray(collection)) {
- var index = -1, length = collection.length;
- while (++index < length) {
- var value = collection[index];
- setter(result, value, iteratee(value, index, collection), collection);
- }
- } else {
- baseEach(collection, function (value, key, collection) {
- setter(result, value, iteratee(value, key, collection), collection);
- });
- }
- return result;
- };
- }
- /**
- * Creates a `_.assign`, `_.defaults`, or `_.merge` function.
- *
- * @private
- * @param {Function} assigner The function to assign values.
- * @returns {Function} Returns the new assigner function.
- */
- function createAssigner(assigner) {
- return restParam(function (object, sources) {
- var index = -1, length = object == null ? 0 : sources.length, customizer = length > 2 ? sources[length - 2] : undefined, guard = length > 2 ? sources[2] : undefined, thisArg = length > 1 ? sources[length - 1] : undefined;
- if (typeof customizer == 'function') {
- customizer = bindCallback(customizer, thisArg, 5);
- length -= 2;
- } else {
- customizer = typeof thisArg == 'function' ? thisArg : undefined;
- length -= customizer ? 1 : 0;
- }
- if (guard && isIterateeCall(sources[0], sources[1], guard)) {
- customizer = length < 3 ? undefined : customizer;
- length = 1;
- }
- while (++index < length) {
- var source = sources[index];
- if (source) {
- assigner(object, source, customizer);
- }
- }
- return object;
- });
- }
- /**
- * Creates a `baseEach` or `baseEachRight` function.
- *
- * @private
- * @param {Function} eachFunc The function to iterate over a collection.
- * @param {boolean} [fromRight] Specify iterating from right to left.
- * @returns {Function} Returns the new base function.
- */
- function createBaseEach(eachFunc, fromRight) {
- return function (collection, iteratee) {
- var length = collection ? getLength(collection) : 0;
- if (!isLength(length)) {
- return eachFunc(collection, iteratee);
- }
- var index = fromRight ? length : -1, iterable = toObject(collection);
- while (fromRight ? index-- : ++index < length) {
- if (iteratee(iterable[index], index, iterable) === false) {
- break;
- }
- }
- return collection;
- };
- }
- /**
- * Creates a base function for `_.forIn` or `_.forInRight`.
- *
- * @private
- * @param {boolean} [fromRight] Specify iterating from right to left.
- * @returns {Function} Returns the new base function.
- */
- function createBaseFor(fromRight) {
- return function (object, iteratee, keysFunc) {
- var iterable = toObject(object), props = keysFunc(object), length = props.length, index = fromRight ? length : -1;
- while (fromRight ? index-- : ++index < length) {
- var key = props[index];
- if (iteratee(iterable[key], key, iterable) === false) {
- break;
- }
- }
- return object;
- };
- }
- /**
- * Creates a function that wraps `func` and invokes it with the `this`
- * binding of `thisArg`.
- *
- * @private
- * @param {Function} func The function to bind.
- * @param {*} [thisArg] The `this` binding of `func`.
- * @returns {Function} Returns the new bound function.
- */
- function createBindWrapper(func, thisArg) {
- var Ctor = createCtorWrapper(func);
- function wrapper() {
- var fn = this && this !== root && this instanceof wrapper ? Ctor : func;
- return fn.apply(thisArg, arguments);
- }
- return wrapper;
- }
- /**
- * Creates a `Set` cache object to optimize linear searches of large arrays.
- *
- * @private
- * @param {Array} [values] The values to cache.
- * @returns {null|Object} Returns the new cache object if `Set` is supported, else `null`.
- */
- function createCache(values) {
- return nativeCreate && Set ? new SetCache(values) : null;
- }
- /**
- * Creates a function that produces compound words out of the words in a
- * given string.
- *
- * @private
- * @param {Function} callback The function to combine each word.
- * @returns {Function} Returns the new compounder function.
- */
- function createCompounder(callback) {
- return function (string) {
- var index = -1, array = words(deburr(string)), length = array.length, result = '';
- while (++index < length) {
- result = callback(result, array[index], index);
- }
- return result;
- };
- }
- /**
- * Creates a function that produces an instance of `Ctor` regardless of
- * whether it was invoked as part of a `new` expression or by `call` or `apply`.
- *
- * @private
- * @param {Function} Ctor The constructor to wrap.
- * @returns {Function} Returns the new wrapped function.
- */
- function createCtorWrapper(Ctor) {
- return function () {
- // Use a `switch` statement to work with class constructors.
- // See http://ecma-international.org/ecma-262/6.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist
- // for more details.
- var args = arguments;
- switch (args.length) {
- case 0:
- return new Ctor();
- case 1:
- return new Ctor(args[0]);
- case 2:
- return new Ctor(args[0], args[1]);
- case 3:
- return new Ctor(args[0], args[1], args[2]);
- case 4:
- return new Ctor(args[0], args[1], args[2], args[3]);
- case 5:
- return new Ctor(args[0], args[1], args[2], args[3], args[4]);
- case 6:
- return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]);
- case 7:
- return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]);
- }
- var thisBinding = baseCreate(Ctor.prototype), result = Ctor.apply(thisBinding, args);
- // Mimic the constructor's `return` behavior.
- // See https://es5.github.io/#x13.2.2 for more details.
- return isObject(result) ? result : thisBinding;
- };
- }
- /**
- * Creates a `_.curry` or `_.curryRight` function.
- *
- * @private
- * @param {boolean} flag The curry bit flag.
- * @returns {Function} Returns the new curry function.
- */
- function createCurry(flag) {
- function curryFunc(func, arity, guard) {
- if (guard && isIterateeCall(func, arity, guard)) {
- arity = undefined;
- }
- var result = createWrapper(func, flag, undefined, undefined, undefined, undefined, undefined, arity);
- result.placeholder = curryFunc.placeholder;
- return result;
- }
- return curryFunc;
- }
- /**
- * Creates a `_.defaults` or `_.defaultsDeep` function.
- *
- * @private
- * @param {Function} assigner The function to assign values.
- * @param {Function} customizer The function to customize assigned values.
- * @returns {Function} Returns the new defaults function.
- */
- function createDefaults(assigner, customizer) {
- return restParam(function (args) {
- var object = args[0];
- if (object == null) {
- return object;
- }
- args.push(customizer);
- return assigner.apply(undefined, args);
- });
- }
- /**
- * Creates a `_.max` or `_.min` function.
- *
- * @private
- * @param {Function} comparator The function used to compare values.
- * @param {*} exValue The initial extremum value.
- * @returns {Function} Returns the new extremum function.
- */
- function createExtremum(comparator, exValue) {
- return function (collection, iteratee, thisArg) {
- if (thisArg && isIterateeCall(collection, iteratee, thisArg)) {
- iteratee = undefined;
- }
- iteratee = getCallback(iteratee, thisArg, 3);
- if (iteratee.length == 1) {
- collection = isArray(collection) ? collection : toIterable(collection);
- var result = arrayExtremum(collection, iteratee, comparator, exValue);
- if (!(collection.length && result === exValue)) {
- return result;
- }
- }
- return baseExtremum(collection, iteratee, comparator, exValue);
- };
- }
- /**
- * Creates a `_.find` or `_.findLast` function.
- *
- * @private
- * @param {Function} eachFunc The function to iterate over a collection.
- * @param {boolean} [fromRight] Specify iterating from right to left.
- * @returns {Function} Returns the new find function.
- */
- function createFind(eachFunc, fromRight) {
- return function (collection, predicate, thisArg) {
- predicate = getCallback(predicate, thisArg, 3);
- if (isArray(collection)) {
- var index = baseFindIndex(collection, predicate, fromRight);
- return index > -1 ? collection[index] : undefined;
- }
- return baseFind(collection, predicate, eachFunc);
- };
- }
- /**
- * Creates a `_.findIndex` or `_.findLastIndex` function.
- *
- * @private
- * @param {boolean} [fromRight] Specify iterating from right to left.
- * @returns {Function} Returns the new find function.
- */
- function createFindIndex(fromRight) {
- return function (array, predicate, thisArg) {
- if (!(array && array.length)) {
- return -1;
- }
- predicate = getCallback(predicate, thisArg, 3);
- return baseFindIndex(array, predicate, fromRight);
- };
- }
- /**
- * Creates a `_.findKey` or `_.findLastKey` function.
- *
- * @private
- * @param {Function} objectFunc The function to iterate over an object.
- * @returns {Function} Returns the new find function.
- */
- function createFindKey(objectFunc) {
- return function (object, predicate, thisArg) {
- predicate = getCallback(predicate, thisArg, 3);
- return baseFind(object, predicate, objectFunc, true);
- };
- }
- /**
- * Creates a `_.flow` or `_.flowRight` function.
- *
- * @private
- * @param {boolean} [fromRight] Specify iterating from right to left.
- * @returns {Function} Returns the new flow function.
- */
- function createFlow(fromRight) {
- return function () {
- var wrapper, length = arguments.length, index = fromRight ? length : -1, leftIndex = 0, funcs = Array(length);
- while (fromRight ? index-- : ++index < length) {
- var func = funcs[leftIndex++] = arguments[index];
- if (typeof func != 'function') {
- throw new TypeError(FUNC_ERROR_TEXT);
- }
- if (!wrapper && LodashWrapper.prototype.thru && getFuncName(func) == 'wrapper') {
- wrapper = new LodashWrapper([], true);
- }
- }
- index = wrapper ? -1 : length;
- while (++index < length) {
- func = funcs[index];
- var funcName = getFuncName(func), data = funcName == 'wrapper' ? getData(func) : undefined;
- if (data && isLaziable(data[0]) && data[1] == (ARY_FLAG | CURRY_FLAG | PARTIAL_FLAG | REARG_FLAG) && !data[4].length && data[9] == 1) {
- wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]);
- } else {
- wrapper = func.length == 1 && isLaziable(func) ? wrapper[funcName]() : wrapper.thru(func);
- }
- }
- return function () {
- var args = arguments, value = args[0];
- if (wrapper && args.length == 1 && isArray(value) && value.length >= LARGE_ARRAY_SIZE) {
- return wrapper.plant(value).value();
- }
- var index = 0, result = length ? funcs[index].apply(this, args) : value;
- while (++index < length) {
- result = funcs[index].call(this, result);
- }
- return result;
- };
- };
- }
- /**
- * Creates a function for `_.forEach` or `_.forEachRight`.
- *
- * @private
- * @param {Function} arrayFunc The function to iterate over an array.
- * @param {Function} eachFunc The function to iterate over a collection.
- * @returns {Function} Returns the new each function.
- */
- function createForEach(arrayFunc, eachFunc) {
- return function (collection, iteratee, thisArg) {
- return typeof iteratee == 'function' && thisArg === undefined && isArray(collection) ? arrayFunc(collection, iteratee) : eachFunc(collection, bindCallback(iteratee, thisArg, 3));
- };
- }
- /**
- * Creates a function for `_.forIn` or `_.forInRight`.
- *
- * @private
- * @param {Function} objectFunc The function to iterate over an object.
- * @returns {Function} Returns the new each function.
- */
- function createForIn(objectFunc) {
- return function (object, iteratee, thisArg) {
- if (typeof iteratee != 'function' || thisArg !== undefined) {
- iteratee = bindCallback(iteratee, thisArg, 3);
- }
- return objectFunc(object, iteratee, keysIn);
- };
- }
- /**
- * Creates a function for `_.forOwn` or `_.forOwnRight`.
- *
- * @private
- * @param {Function} objectFunc The function to iterate over an object.
- * @returns {Function} Returns the new each function.
- */
- function createForOwn(objectFunc) {
- return function (object, iteratee, thisArg) {
- if (typeof iteratee != 'function' || thisArg !== undefined) {
- iteratee = bindCallback(iteratee, thisArg, 3);
- }
- return objectFunc(object, iteratee);
- };
- }
- /**
- * Creates a function for `_.mapKeys` or `_.mapValues`.
- *
- * @private
- * @param {boolean} [isMapKeys] Specify mapping keys instead of values.
- * @returns {Function} Returns the new map function.
- */
- function createObjectMapper(isMapKeys) {
- return function (object, iteratee, thisArg) {
- var result = {};
- iteratee = getCallback(iteratee, thisArg, 3);
- baseForOwn(object, function (value, key, object) {
- var mapped = iteratee(value, key, object);
- key = isMapKeys ? mapped : key;
- value = isMapKeys ? value : mapped;
- result[key] = value;
- });
- return result;
- };
- }
- /**
- * Creates a function for `_.padLeft` or `_.padRight`.
- *
- * @private
- * @param {boolean} [fromRight] Specify padding from the right.
- * @returns {Function} Returns the new pad function.
- */
- function createPadDir(fromRight) {
- return function (string, length, chars) {
- string = baseToString(string);
- return (fromRight ? string : '') + createPadding(string, length, chars) + (fromRight ? '' : string);
- };
- }
- /**
- * Creates a `_.partial` or `_.partialRight` function.
- *
- * @private
- * @param {boolean} flag The partial bit flag.
- * @returns {Function} Returns the new partial function.
- */
- function createPartial(flag) {
- var partialFunc = restParam(function (func, partials) {
- var holders = replaceHolders(partials, partialFunc.placeholder);
- return createWrapper(func, flag, undefined, partials, holders);
- });
- return partialFunc;
- }
- /**
- * Creates a function for `_.reduce` or `_.reduceRight`.
- *
- * @private
- * @param {Function} arrayFunc The function to iterate over an array.
- * @param {Function} eachFunc The function to iterate over a collection.
- * @returns {Function} Returns the new each function.
- */
- function createReduce(arrayFunc, eachFunc) {
- return function (collection, iteratee, accumulator, thisArg) {
- var initFromArray = arguments.length < 3;
- return typeof iteratee == 'function' && thisArg === undefined && isArray(collection) ? arrayFunc(collection, iteratee, accumulator, initFromArray) : baseReduce(collection, getCallback(iteratee, thisArg, 4), accumulator, initFromArray, eachFunc);
- };
- }
- /**
- * Creates a function that wraps `func` and invokes it with optional `this`
- * binding of, partial application, and currying.
- *
- * @private
- * @param {Function|string} func The function or method name to reference.
- * @param {number} bitmask The bitmask of flags. See `createWrapper` for more details.
- * @param {*} [thisArg] The `this` binding of `func`.
- * @param {Array} [partials] The arguments to prepend to those provided to the new function.
- * @param {Array} [holders] The `partials` placeholder indexes.
- * @param {Array} [partialsRight] The arguments to append to those provided to the new function.
- * @param {Array} [holdersRight] The `partialsRight` placeholder indexes.
- * @param {Array} [argPos] The argument positions of the new function.
- * @param {number} [ary] The arity cap of `func`.
- * @param {number} [arity] The arity of `func`.
- * @returns {Function} Returns the new wrapped function.
- */
- function createHybridWrapper(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) {
- var isAry = bitmask & ARY_FLAG, isBind = bitmask & BIND_FLAG, isBindKey = bitmask & BIND_KEY_FLAG, isCurry = bitmask & CURRY_FLAG, isCurryBound = bitmask & CURRY_BOUND_FLAG, isCurryRight = bitmask & CURRY_RIGHT_FLAG, Ctor = isBindKey ? undefined : createCtorWrapper(func);
- function wrapper() {
- // Avoid `arguments` object use disqualifying optimizations by
- // converting it to an array before providing it to other functions.
- var length = arguments.length, index = length, args = Array(length);
- while (index--) {
- args[index] = arguments[index];
- }
- if (partials) {
- args = composeArgs(args, partials, holders);
- }
- if (partialsRight) {
- args = composeArgsRight(args, partialsRight, holdersRight);
- }
- if (isCurry || isCurryRight) {
- var placeholder = wrapper.placeholder, argsHolders = replaceHolders(args, placeholder);
- length -= argsHolders.length;
- if (length < arity) {
- var newArgPos = argPos ? arrayCopy(argPos) : undefined, newArity = nativeMax(arity - length, 0), newsHolders = isCurry ? argsHolders : undefined, newHoldersRight = isCurry ? undefined : argsHolders, newPartials = isCurry ? args : undefined, newPartialsRight = isCurry ? undefined : args;
- bitmask |= isCurry ? PARTIAL_FLAG : PARTIAL_RIGHT_FLAG;
- bitmask &= ~(isCurry ? PARTIAL_RIGHT_FLAG : PARTIAL_FLAG);
- if (!isCurryBound) {
- bitmask &= ~(BIND_FLAG | BIND_KEY_FLAG);
- }
- var newData = [
- func,
- bitmask,
- thisArg,
- newPartials,
- newsHolders,
- newPartialsRight,
- newHoldersRight,
- newArgPos,
- ary,
- newArity
- ], result = createHybridWrapper.apply(undefined, newData);
- if (isLaziable(func)) {
- setData(result, newData);
- }
- result.placeholder = placeholder;
- return result;
- }
- }
- var thisBinding = isBind ? thisArg : this, fn = isBindKey ? thisBinding[func] : func;
- if (argPos) {
- args = reorder(args, argPos);
- }
- if (isAry && ary < args.length) {
- args.length = ary;
- }
- if (this && this !== root && this instanceof wrapper) {
- fn = Ctor || createCtorWrapper(func);
- }
- return fn.apply(thisBinding, args);
- }
- return wrapper;
- }
- /**
- * Creates the padding required for `string` based on the given `length`.
- * The `chars` string is truncated if the number of characters exceeds `length`.
- *
- * @private
- * @param {string} string The string to create padding for.
- * @param {number} [length=0] The padding length.
- * @param {string} [chars=' '] The string used as padding.
- * @returns {string} Returns the pad for `string`.
- */
- function createPadding(string, length, chars) {
- var strLength = string.length;
- length = +length;
- if (strLength >= length || !nativeIsFinite(length)) {
- return '';
- }
- var padLength = length - strLength;
- chars = chars == null ? ' ' : chars + '';
- return repeat(chars, nativeCeil(padLength / chars.length)).slice(0, padLength);
- }
- /**
- * Creates a function that wraps `func` and invokes it with the optional `this`
- * binding of `thisArg` and the `partials` prepended to those provided to
- * the wrapper.
- *
- * @private
- * @param {Function} func The function to partially apply arguments to.
- * @param {number} bitmask The bitmask of flags. See `createWrapper` for more details.
- * @param {*} thisArg The `this` binding of `func`.
- * @param {Array} partials The arguments to prepend to those provided to the new function.
- * @returns {Function} Returns the new bound function.
- */
- function createPartialWrapper(func, bitmask, thisArg, partials) {
- var isBind = bitmask & BIND_FLAG, Ctor = createCtorWrapper(func);
- function wrapper() {
- // Avoid `arguments` object use disqualifying optimizations by
- // converting it to an array before providing it `func`.
- var argsIndex = -1, argsLength = arguments.length, leftIndex = -1, leftLength = partials.length, args = Array(leftLength + argsLength);
- while (++leftIndex < leftLength) {
- args[leftIndex] = partials[leftIndex];
- }
- while (argsLength--) {
- args[leftIndex++] = arguments[++argsIndex];
- }
- var fn = this && this !== root && this instanceof wrapper ? Ctor : func;
- return fn.apply(isBind ? thisArg : this, args);
- }
- return wrapper;
- }
- /**
- * Creates a `_.ceil`, `_.floor`, or `_.round` function.
- *
- * @private
- * @param {string} methodName The name of the `Math` method to use when rounding.
- * @returns {Function} Returns the new round function.
- */
- function createRound(methodName) {
- var func = Math[methodName];
- return function (number, precision) {
- precision = precision === undefined ? 0 : +precision || 0;
- if (precision) {
- precision = pow(10, precision);
- return func(number * precision) / precision;
- }
- return func(number);
- };
- }
- /**
- * Creates a `_.sortedIndex` or `_.sortedLastIndex` function.
- *
- * @private
- * @param {boolean} [retHighest] Specify returning the highest qualified index.
- * @returns {Function} Returns the new index function.
- */
- function createSortedIndex(retHighest) {
- return function (array, value, iteratee, thisArg) {
- var callback = getCallback(iteratee);
- return iteratee == null && callback === baseCallback ? binaryIndex(array, value, retHighest) : binaryIndexBy(array, value, callback(iteratee, thisArg, 1), retHighest);
- };
- }
- /**
- * Creates a function that either curries or invokes `func` with optional
- * `this` binding and partially applied arguments.
- *
- * @private
- * @param {Function|string} func The function or method name to reference.
- * @param {number} bitmask The bitmask of flags.
- * The bitmask may be composed of the following flags:
- * 1 - `_.bind`
- * 2 - `_.bindKey`
- * 4 - `_.curry` or `_.curryRight` of a bound function
- * 8 - `_.curry`
- * 16 - `_.curryRight`
- * 32 - `_.partial`
- * 64 - `_.partialRight`
- * 128 - `_.rearg`
- * 256 - `_.ary`
- * @param {*} [thisArg] The `this` binding of `func`.
- * @param {Array} [partials] The arguments to be partially applied.
- * @param {Array} [holders] The `partials` placeholder indexes.
- * @param {Array} [argPos] The argument positions of the new function.
- * @param {number} [ary] The arity cap of `func`.
- * @param {number} [arity] The arity of `func`.
- * @returns {Function} Returns the new wrapped function.
- */
- function createWrapper(func, bitmask, thisArg, partials, holders, argPos, ary, arity) {
- var isBindKey = bitmask & BIND_KEY_FLAG;
- if (!isBindKey && typeof func != 'function') {
- throw new TypeError(FUNC_ERROR_TEXT);
- }
- var length = partials ? partials.length : 0;
- if (!length) {
- bitmask &= ~(PARTIAL_FLAG | PARTIAL_RIGHT_FLAG);
- partials = holders = undefined;
- }
- length -= holders ? holders.length : 0;
- if (bitmask & PARTIAL_RIGHT_FLAG) {
- var partialsRight = partials, holdersRight = holders;
- partials = holders = undefined;
- }
- var data = isBindKey ? undefined : getData(func), newData = [
- func,
- bitmask,
- thisArg,
- partials,
- holders,
- partialsRight,
- holdersRight,
- argPos,
- ary,
- arity
- ];
- if (data) {
- mergeData(newData, data);
- bitmask = newData[1];
- arity = newData[9];
- }
- newData[9] = arity == null ? isBindKey ? 0 : func.length : nativeMax(arity - length, 0) || 0;
- if (bitmask == BIND_FLAG) {
- var result = createBindWrapper(newData[0], newData[2]);
- } else if ((bitmask == PARTIAL_FLAG || bitmask == (BIND_FLAG | PARTIAL_FLAG)) && !newData[4].length) {
- result = createPartialWrapper.apply(undefined, newData);
- } else {
- result = createHybridWrapper.apply(undefined, newData);
- }
- var setter = data ? baseSetData : setData;
- return setter(result, newData);
- }
- /**
- * A specialized version of `baseIsEqualDeep` for arrays with support for
- * partial deep comparisons.
- *
- * @private
- * @param {Array} array The array to compare.
- * @param {Array} other The other array to compare.
- * @param {Function} equalFunc The function to determine equivalents of values.
- * @param {Function} [customizer] The function to customize comparing arrays.
- * @param {boolean} [isLoose] Specify performing partial comparisons.
- * @param {Array} [stackA] Tracks traversed `value` objects.
- * @param {Array} [stackB] Tracks traversed `other` objects.
- * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.
- */
- function equalArrays(array, other, equalFunc, customizer, isLoose, stackA, stackB) {
- var index = -1, arrLength = array.length, othLength = other.length;
- if (arrLength != othLength && !(isLoose && othLength > arrLength)) {
- return false;
- }
- // Ignore non-index properties.
- while (++index < arrLength) {
- var arrValue = array[index], othValue = other[index], result = customizer ? customizer(isLoose ? othValue : arrValue, isLoose ? arrValue : othValue, index) : undefined;
- if (result !== undefined) {
- if (result) {
- continue;
- }
- return false;
- }
- // Recursively compare arrays (susceptible to call stack limits).
- if (isLoose) {
- if (!arraySome(other, function (othValue) {
- return arrValue === othValue || equalFunc(arrValue, othValue, customizer, isLoose, stackA, stackB);
- })) {
- return false;
- }
- } else if (!(arrValue === othValue || equalFunc(arrValue, othValue, customizer, isLoose, stackA, stackB))) {
- return false;
- }
- }
- return true;
- }
- /**
- * A specialized version of `baseIsEqualDeep` for comparing objects of
- * the same `toStringTag`.
- *
- * **Note:** This function only supports comparing values with tags of
- * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
- *
- * @private
- * @param {Object} object The object to compare.
- * @param {Object} other The other object to compare.
- * @param {string} tag The `toStringTag` of the objects to compare.
- * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
- */
- function equalByTag(object, other, tag) {
- switch (tag) {
- case boolTag:
- case dateTag:
- // Coerce dates and booleans to numbers, dates to milliseconds and booleans
- // to `1` or `0` treating invalid dates coerced to `NaN` as not equal.
- return +object == +other;
- case errorTag:
- return object.name == other.name && object.message == other.message;
- case numberTag:
- // Treat `NaN` vs. `NaN` as equal.
- return object != +object ? other != +other : object == +other;
- case regexpTag:
- case stringTag:
- // Coerce regexes to strings and treat strings primitives and string
- // objects as equal. See https://es5.github.io/#x15.10.6.4 for more details.
- return object == other + '';
- }
- return false;
- }
- /**
- * A specialized version of `baseIsEqualDeep` for objects with support for
- * partial deep comparisons.
- *
- * @private
- * @param {Object} object The object to compare.
- * @param {Object} other The other object to compare.
- * @param {Function} equalFunc The function to determine equivalents of values.
- * @param {Function} [customizer] The function to customize comparing values.
- * @param {boolean} [isLoose] Specify performing partial comparisons.
- * @param {Array} [stackA] Tracks traversed `value` objects.
- * @param {Array} [stackB] Tracks traversed `other` objects.
- * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
- */
- function equalObjects(object, other, equalFunc, customizer, isLoose, stackA, stackB) {
- var objProps = keys(object), objLength = objProps.length, othProps = keys(other), othLength = othProps.length;
- if (objLength != othLength && !isLoose) {
- return false;
- }
- var index = objLength;
- while (index--) {
- var key = objProps[index];
- if (!(isLoose ? key in other : hasOwnProperty.call(other, key))) {
- return false;
- }
- }
- var skipCtor = isLoose;
- while (++index < objLength) {
- key = objProps[index];
- var objValue = object[key], othValue = other[key], result = customizer ? customizer(isLoose ? othValue : objValue, isLoose ? objValue : othValue, key) : undefined;
- // Recursively compare objects (susceptible to call stack limits).
- if (!(result === undefined ? equalFunc(objValue, othValue, customizer, isLoose, stackA, stackB) : result)) {
- return false;
- }
- skipCtor || (skipCtor = key == 'constructor');
- }
- if (!skipCtor) {
- var objCtor = object.constructor, othCtor = other.constructor;
- // Non `Object` object instances with different constructors are not equal.
- if (objCtor != othCtor && ('constructor' in object && 'constructor' in other) && !(typeof objCtor == 'function' && objCtor instanceof objCtor && typeof othCtor == 'function' && othCtor instanceof othCtor)) {
- return false;
- }
- }
- return true;
- }
- /**
- * Gets the appropriate "callback" function. If the `_.callback` method is
- * customized this function returns the custom method, otherwise it returns
- * the `baseCallback` function. If arguments are provided the chosen function
- * is invoked with them and its result is returned.
- *
- * @private
- * @returns {Function} Returns the chosen function or its result.
- */
- function getCallback(func, thisArg, argCount) {
- var result = lodash.callback || callback;
- result = result === callback ? baseCallback : result;
- return argCount ? result(func, thisArg, argCount) : result;
- }
- /**
- * Gets metadata for `func`.
- *
- * @private
- * @param {Function} func The function to query.
- * @returns {*} Returns the metadata for `func`.
- */
- var getData = !metaMap ? noop : function (func) {
- return metaMap.get(func);
- };
- /**
- * Gets the name of `func`.
- *
- * @private
- * @param {Function} func The function to query.
- * @returns {string} Returns the function name.
- */
- function getFuncName(func) {
- var result = func.name + '', array = realNames[result], length = array ? array.length : 0;
- while (length--) {
- var data = array[length], otherFunc = data.func;
- if (otherFunc == null || otherFunc == func) {
- return data.name;
- }
- }
- return result;
- }
- /**
- * Gets the appropriate "indexOf" function. If the `_.indexOf` method is
- * customized this function returns the custom method, otherwise it returns
- * the `baseIndexOf` function. If arguments are provided the chosen function
- * is invoked with them and its result is returned.
- *
- * @private
- * @returns {Function|number} Returns the chosen function or its result.
- */
- function getIndexOf(collection, target, fromIndex) {
- var result = lodash.indexOf || indexOf;
- result = result === indexOf ? baseIndexOf : result;
- return collection ? result(collection, target, fromIndex) : result;
- }
- /**
- * Gets the "length" property value of `object`.
- *
- * **Note:** This function is used to avoid a [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792)
- * that affects Safari on at least iOS 8.1-8.3 ARM64.
- *
- * @private
- * @param {Object} object The object to query.
- * @returns {*} Returns the "length" value.
- */
- var getLength = baseProperty('length');
- /**
- * Gets the propery names, values, and compare flags of `object`.
- *
- * @private
- * @param {Object} object The object to query.
- * @returns {Array} Returns the match data of `object`.
- */
- function getMatchData(object) {
- var result = pairs(object), length = result.length;
- while (length--) {
- result[length][2] = isStrictComparable(result[length][1]);
- }
- return result;
- }
- /**
- * Gets the native function at `key` of `object`.
- *
- * @private
- * @param {Object} object The object to query.
- * @param {string} key The key of the method to get.
- * @returns {*} Returns the function if it's native, else `undefined`.
- */
- function getNative(object, key) {
- var value = object == null ? undefined : object[key];
- return isNative(value) ? value : undefined;
- }
- /**
- * Gets the view, applying any `transforms` to the `start` and `end` positions.
- *
- * @private
- * @param {number} start The start of the view.
- * @param {number} end The end of the view.
- * @param {Array} transforms The transformations to apply to the view.
- * @returns {Object} Returns an object containing the `start` and `end`
- * positions of the view.
- */
- function getView(start, end, transforms) {
- var index = -1, length = transforms.length;
- while (++index < length) {
- var data = transforms[index], size = data.size;
- switch (data.type) {
- case 'drop':
- start += size;
- break;
- case 'dropRight':
- end -= size;
- break;
- case 'take':
- end = nativeMin(end, start + size);
- break;
- case 'takeRight':
- start = nativeMax(start, end - size);
- break;
- }
- }
- return {
- 'start': start,
- 'end': end
- };
- }
- /**
- * Initializes an array clone.
- *
- * @private
- * @param {Array} array The array to clone.
- * @returns {Array} Returns the initialized clone.
- */
- function initCloneArray(array) {
- var length = array.length, result = new array.constructor(length);
- // Add array properties assigned by `RegExp#exec`.
- if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {
- result.index = array.index;
- result.input = array.input;
- }
- return result;
- }
- /**
- * Initializes an object clone.
- *
- * @private
- * @param {Object} object The object to clone.
- * @returns {Object} Returns the initialized clone.
- */
- function initCloneObject(object) {
- var Ctor = object.constructor;
- if (!(typeof Ctor == 'function' && Ctor instanceof Ctor)) {
- Ctor = Object;
- }
- return new Ctor();
- }
- /**
- * Initializes an object clone based on its `toStringTag`.
- *
- * **Note:** This function only supports cloning values with tags of
- * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
- *
- * @private
- * @param {Object} object The object to clone.
- * @param {string} tag The `toStringTag` of the object to clone.
- * @param {boolean} [isDeep] Specify a deep clone.
- * @returns {Object} Returns the initialized clone.
- */
- function initCloneByTag(object, tag, isDeep) {
- var Ctor = object.constructor;
- switch (tag) {
- case arrayBufferTag:
- return bufferClone(object);
- case boolTag:
- case dateTag:
- return new Ctor(+object);
- case float32Tag:
- case float64Tag:
- case int8Tag:
- case int16Tag:
- case int32Tag:
- case uint8Tag:
- case uint8ClampedTag:
- case uint16Tag:
- case uint32Tag:
- var buffer = object.buffer;
- return new Ctor(isDeep ? bufferClone(buffer) : buffer, object.byteOffset, object.length);
- case numberTag:
- case stringTag:
- return new Ctor(object);
- case regexpTag:
- var result = new Ctor(object.source, reFlags.exec(object));
- result.lastIndex = object.lastIndex;
- }
- return result;
- }
- /**
- * Invokes the method at `path` on `object`.
- *
- * @private
- * @param {Object} object The object to query.
- * @param {Array|string} path The path of the method to invoke.
- * @param {Array} args The arguments to invoke the method with.
- * @returns {*} Returns the result of the invoked method.
- */
- function invokePath(object, path, args) {
- if (object != null && !isKey(path, object)) {
- path = toPath(path);
- object = path.length == 1 ? object : baseGet(object, baseSlice(path, 0, -1));
- path = last(path);
- }
- var func = object == null ? object : object[path];
- return func == null ? undefined : func.apply(object, args);
- }
- /**
- * Checks if `value` is array-like.
- *
- * @private
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
- */
- function isArrayLike(value) {
- return value != null && isLength(getLength(value));
- }
- /**
- * Checks if `value` is a valid array-like index.
- *
- * @private
- * @param {*} value The value to check.
- * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
- * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
- */
- function isIndex(value, length) {
- value = typeof value == 'number' || reIsUint.test(value) ? +value : -1;
- length = length == null ? MAX_SAFE_INTEGER : length;
- return value > -1 && value % 1 == 0 && value < length;
- }
- /**
- * Checks if the provided arguments are from an iteratee call.
- *
- * @private
- * @param {*} value The potential iteratee value argument.
- * @param {*} index The potential iteratee index or key argument.
- * @param {*} object The potential iteratee object argument.
- * @returns {boolean} Returns `true` if the arguments are from an iteratee call, else `false`.
- */
- function isIterateeCall(value, index, object) {
- if (!isObject(object)) {
- return false;
- }
- var type = typeof index;
- if (type == 'number' ? isArrayLike(object) && isIndex(index, object.length) : type == 'string' && index in object) {
- var other = object[index];
- return value === value ? value === other : other !== other;
- }
- return false;
- }
- /**
- * Checks if `value` is a property name and not a property path.
- *
- * @private
- * @param {*} value The value to check.
- * @param {Object} [object] The object to query keys on.
- * @returns {boolean} Returns `true` if `value` is a property name, else `false`.
- */
- function isKey(value, object) {
- var type = typeof value;
- if (type == 'string' && reIsPlainProp.test(value) || type == 'number') {
- return true;
- }
- if (isArray(value)) {
- return false;
- }
- var result = !reIsDeepProp.test(value);
- return result || object != null && value in toObject(object);
- }
- /**
- * Checks if `func` has a lazy counterpart.
- *
- * @private
- * @param {Function} func The function to check.
- * @returns {boolean} Returns `true` if `func` has a lazy counterpart, else `false`.
- */
- function isLaziable(func) {
- var funcName = getFuncName(func), other = lodash[funcName];
- if (typeof other != 'function' || !(funcName in LazyWrapper.prototype)) {
- return false;
- }
- if (func === other) {
- return true;
- }
- var data = getData(other);
- return !!data && func === data[0];
- }
- /**
- * Checks if `value` is a valid array-like length.
- *
- * **Note:** This function is based on [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength).
- *
- * @private
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
- */
- function isLength(value) {
- return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
- }
- /**
- * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.
- *
- * @private
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` if suitable for strict
- * equality comparisons, else `false`.
- */
- function isStrictComparable(value) {
- return value === value && !isObject(value);
- }
- /**
- * Merges the function metadata of `source` into `data`.
- *
- * Merging metadata reduces the number of wrappers required to invoke a function.
- * This is possible because methods like `_.bind`, `_.curry`, and `_.partial`
- * may be applied regardless of execution order. Methods like `_.ary` and `_.rearg`
- * augment function arguments, making the order in which they are executed important,
- * preventing the merging of metadata. However, we make an exception for a safe
- * common case where curried functions have `_.ary` and or `_.rearg` applied.
- *
- * @private
- * @param {Array} data The destination metadata.
- * @param {Array} source The source metadata.
- * @returns {Array} Returns `data`.
- */
- function mergeData(data, source) {
- var bitmask = data[1], srcBitmask = source[1], newBitmask = bitmask | srcBitmask, isCommon = newBitmask < ARY_FLAG;
- var isCombo = srcBitmask == ARY_FLAG && bitmask == CURRY_FLAG || srcBitmask == ARY_FLAG && bitmask == REARG_FLAG && data[7].length <= source[8] || srcBitmask == (ARY_FLAG | REARG_FLAG) && bitmask == CURRY_FLAG;
- // Exit early if metadata can't be merged.
- if (!(isCommon || isCombo)) {
- return data;
- }
- // Use source `thisArg` if available.
- if (srcBitmask & BIND_FLAG) {
- data[2] = source[2];
- // Set when currying a bound function.
- newBitmask |= bitmask & BIND_FLAG ? 0 : CURRY_BOUND_FLAG;
- }
- // Compose partial arguments.
- var value = source[3];
- if (value) {
- var partials = data[3];
- data[3] = partials ? composeArgs(partials, value, source[4]) : arrayCopy(value);
- data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : arrayCopy(source[4]);
- }
- // Compose partial right arguments.
- value = source[5];
- if (value) {
- partials = data[5];
- data[5] = partials ? composeArgsRight(partials, value, source[6]) : arrayCopy(value);
- data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : arrayCopy(source[6]);
- }
- // Use source `argPos` if available.
- value = source[7];
- if (value) {
- data[7] = arrayCopy(value);
- }
- // Use source `ary` if it's smaller.
- if (srcBitmask & ARY_FLAG) {
- data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]);
- }
- // Use source `arity` if one is not provided.
- if (data[9] == null) {
- data[9] = source[9];
- }
- // Use source `func` and merge bitmasks.
- data[0] = source[0];
- data[1] = newBitmask;
- return data;
- }
- /**
- * Used by `_.defaultsDeep` to customize its `_.merge` use.
- *
- * @private
- * @param {*} objectValue The destination object property value.
- * @param {*} sourceValue The source object property value.
- * @returns {*} Returns the value to assign to the destination object.
- */
- function mergeDefaults(objectValue, sourceValue) {
- return objectValue === undefined ? sourceValue : merge(objectValue, sourceValue, mergeDefaults);
- }
- /**
- * A specialized version of `_.pick` which picks `object` properties specified
- * by `props`.
- *
- * @private
- * @param {Object} object The source object.
- * @param {string[]} props The property names to pick.
- * @returns {Object} Returns the new object.
- */
- function pickByArray(object, props) {
- object = toObject(object);
- var index = -1, length = props.length, result = {};
- while (++index < length) {
- var key = props[index];
- if (key in object) {
- result[key] = object[key];
- }
- }
- return result;
- }
- /**
- * A specialized version of `_.pick` which picks `object` properties `predicate`
- * returns truthy for.
- *
- * @private
- * @param {Object} object The source object.
- * @param {Function} predicate The function invoked per iteration.
- * @returns {Object} Returns the new object.
- */
- function pickByCallback(object, predicate) {
- var result = {};
- baseForIn(object, function (value, key, object) {
- if (predicate(value, key, object)) {
- result[key] = value;
- }
- });
- return result;
- }
- /**
- * Reorder `array` according to the specified indexes where the element at
- * the first index is assigned as the first element, the element at
- * the second index is assigned as the second element, and so on.
- *
- * @private
- * @param {Array} array The array to reorder.
- * @param {Array} indexes The arranged array indexes.
- * @returns {Array} Returns `array`.
- */
- function reorder(array, indexes) {
- var arrLength = array.length, length = nativeMin(indexes.length, arrLength), oldArray = arrayCopy(array);
- while (length--) {
- var index = indexes[length];
- array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined;
- }
- return array;
- }
- /**
- * Sets metadata for `func`.
- *
- * **Note:** If this function becomes hot, i.e. is invoked a lot in a short
- * period of time, it will trip its breaker and transition to an identity function
- * to avoid garbage collection pauses in V8. See [V8 issue 2070](https://code.google.com/p/v8/issues/detail?id=2070)
- * for more details.
- *
- * @private
- * @param {Function} func The function to associate metadata with.
- * @param {*} data The metadata.
- * @returns {Function} Returns `func`.
- */
- var setData = function () {
- var count = 0, lastCalled = 0;
- return function (key, value) {
- var stamp = now(), remaining = HOT_SPAN - (stamp - lastCalled);
- lastCalled = stamp;
- if (remaining > 0) {
- if (++count >= HOT_COUNT) {
- return key;
- }
- } else {
- count = 0;
- }
- return baseSetData(key, value);
- };
- }();
- /**
- * A fallback implementation of `Object.keys` which creates an array of the
- * own enumerable property names of `object`.
- *
- * @private
- * @param {Object} object The object to query.
- * @returns {Array} Returns the array of property names.
- */
- function shimKeys(object) {
- var props = keysIn(object), propsLength = props.length, length = propsLength && object.length;
- var allowIndexes = !!length && isLength(length) && (isArray(object) || isArguments(object));
- var index = -1, result = [];
- while (++index < propsLength) {
- var key = props[index];
- if (allowIndexes && isIndex(key, length) || hasOwnProperty.call(object, key)) {
- result.push(key);
- }
- }
- return result;
- }
- /**
- * Converts `value` to an array-like object if it's not one.
- *
- * @private
- * @param {*} value The value to process.
- * @returns {Array|Object} Returns the array-like object.
- */
- function toIterable(value) {
- if (value == null) {
- return [];
- }
- if (!isArrayLike(value)) {
- return values(value);
- }
- return isObject(value) ? value : Object(value);
- }
- /**
- * Converts `value` to an object if it's not one.
- *
- * @private
- * @param {*} value The value to process.
- * @returns {Object} Returns the object.
- */
- function toObject(value) {
- return isObject(value) ? value : Object(value);
- }
- /**
- * Converts `value` to property path array if it's not one.
- *
- * @private
- * @param {*} value The value to process.
- * @returns {Array} Returns the property path array.
- */
- function toPath(value) {
- if (isArray(value)) {
- return value;
- }
- var result = [];
- baseToString(value).replace(rePropName, function (match, number, quote, string) {
- result.push(quote ? string.replace(reEscapeChar, '$1') : number || match);
- });
- return result;
- }
- /**
- * Creates a clone of `wrapper`.
- *
- * @private
- * @param {Object} wrapper The wrapper to clone.
- * @returns {Object} Returns the cloned wrapper.
- */
- function wrapperClone(wrapper) {
- return wrapper instanceof LazyWrapper ? wrapper.clone() : new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__, arrayCopy(wrapper.__actions__));
- }
- /*------------------------------------------------------------------------*/
- /**
- * Creates an array of elements split into groups the length of `size`.
- * If `collection` can't be split evenly, the final chunk will be the remaining
- * elements.
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {Array} array The array to process.
- * @param {number} [size=1] The length of each chunk.
- * @param- {Object} [guard] Enables use as a callback for functions like `_.map`.
- * @returns {Array} Returns the new array containing chunks.
- * @example
- *
- * _.chunk(['a', 'b', 'c', 'd'], 2);
- * // => [['a', 'b'], ['c', 'd']]
- *
- * _.chunk(['a', 'b', 'c', 'd'], 3);
- * // => [['a', 'b', 'c'], ['d']]
- */
- function chunk(array, size, guard) {
- if (guard ? isIterateeCall(array, size, guard) : size == null) {
- size = 1;
- } else {
- size = nativeMax(nativeFloor(size) || 1, 1);
- }
- var index = 0, length = array ? array.length : 0, resIndex = -1, result = Array(nativeCeil(length / size));
- while (index < length) {
- result[++resIndex] = baseSlice(array, index, index += size);
- }
- return result;
- }
- /**
- * Creates an array with all falsey values removed. The values `false`, `null`,
- * `0`, `""`, `undefined`, and `NaN` are falsey.
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {Array} array The array to compact.
- * @returns {Array} Returns the new array of filtered values.
- * @example
- *
- * _.compact([0, 1, false, 2, '', 3]);
- * // => [1, 2, 3]
- */
- function compact(array) {
- var index = -1, length = array ? array.length : 0, resIndex = -1, result = [];
- while (++index < length) {
- var value = array[index];
- if (value) {
- result[++resIndex] = value;
- }
- }
- return result;
- }
- /**
- * Creates an array of unique `array` values not included in the other
- * provided arrays using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
- * for equality comparisons.
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {Array} array The array to inspect.
- * @param {...Array} [values] The arrays of values to exclude.
- * @returns {Array} Returns the new array of filtered values.
- * @example
- *
- * _.difference([1, 2, 3], [4, 2]);
- * // => [1, 3]
- */
- var difference = restParam(function (array, values) {
- return isObjectLike(array) && isArrayLike(array) ? baseDifference(array, baseFlatten(values, false, true)) : [];
- });
- /**
- * Creates a slice of `array` with `n` elements dropped from the beginning.
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {Array} array The array to query.
- * @param {number} [n=1] The number of elements to drop.
- * @param- {Object} [guard] Enables use as a callback for functions like `_.map`.
- * @returns {Array} Returns the slice of `array`.
- * @example
- *
- * _.drop([1, 2, 3]);
- * // => [2, 3]
- *
- * _.drop([1, 2, 3], 2);
- * // => [3]
- *
- * _.drop([1, 2, 3], 5);
- * // => []
- *
- * _.drop([1, 2, 3], 0);
- * // => [1, 2, 3]
- */
- function drop(array, n, guard) {
- var length = array ? array.length : 0;
- if (!length) {
- return [];
- }
- if (guard ? isIterateeCall(array, n, guard) : n == null) {
- n = 1;
- }
- return baseSlice(array, n < 0 ? 0 : n);
- }
- /**
- * Creates a slice of `array` with `n` elements dropped from the end.
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {Array} array The array to query.
- * @param {number} [n=1] The number of elements to drop.
- * @param- {Object} [guard] Enables use as a callback for functions like `_.map`.
- * @returns {Array} Returns the slice of `array`.
- * @example
- *
- * _.dropRight([1, 2, 3]);
- * // => [1, 2]
- *
- * _.dropRight([1, 2, 3], 2);
- * // => [1]
- *
- * _.dropRight([1, 2, 3], 5);
- * // => []
- *
- * _.dropRight([1, 2, 3], 0);
- * // => [1, 2, 3]
- */
- function dropRight(array, n, guard) {
- var length = array ? array.length : 0;
- if (!length) {
- return [];
- }
- if (guard ? isIterateeCall(array, n, guard) : n == null) {
- n = 1;
- }
- n = length - (+n || 0);
- return baseSlice(array, 0, n < 0 ? 0 : n);
- }
- /**
- * Creates a slice of `array` excluding elements dropped from the end.
- * Elements are dropped until `predicate` returns falsey. The predicate is
- * bound to `thisArg` and invoked with three arguments: (value, index, array).
- *
- * If a property name is provided for `predicate` the created `_.property`
- * style callback returns the property value of the given element.
- *
- * If a value is also provided for `thisArg` the created `_.matchesProperty`
- * style callback returns `true` for elements that have a matching property
- * value, else `false`.
- *
- * If an object is provided for `predicate` the created `_.matches` style
- * callback returns `true` for elements that match the properties of the given
- * object, else `false`.
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {Array} array The array to query.
- * @param {Function|Object|string} [predicate=_.identity] The function invoked
- * per iteration.
- * @param {*} [thisArg] The `this` binding of `predicate`.
- * @returns {Array} Returns the slice of `array`.
- * @example
- *
- * _.dropRightWhile([1, 2, 3], function(n) {
- * return n > 1;
- * });
- * // => [1]
- *
- * var users = [
- * { 'user': 'barney', 'active': true },
- * { 'user': 'fred', 'active': false },
- * { 'user': 'pebbles', 'active': false }
- * ];
- *
- * // using the `_.matches` callback shorthand
- * _.pluck(_.dropRightWhile(users, { 'user': 'pebbles', 'active': false }), 'user');
- * // => ['barney', 'fred']
- *
- * // using the `_.matchesProperty` callback shorthand
- * _.pluck(_.dropRightWhile(users, 'active', false), 'user');
- * // => ['barney']
- *
- * // using the `_.property` callback shorthand
- * _.pluck(_.dropRightWhile(users, 'active'), 'user');
- * // => ['barney', 'fred', 'pebbles']
- */
- function dropRightWhile(array, predicate, thisArg) {
- return array && array.length ? baseWhile(array, getCallback(predicate, thisArg, 3), true, true) : [];
- }
- /**
- * Creates a slice of `array` excluding elements dropped from the beginning.
- * Elements are dropped until `predicate` returns falsey. The predicate is
- * bound to `thisArg` and invoked with three arguments: (value, index, array).
- *
- * If a property name is provided for `predicate` the created `_.property`
- * style callback returns the property value of the given element.
- *
- * If a value is also provided for `thisArg` the created `_.matchesProperty`
- * style callback returns `true` for elements that have a matching property
- * value, else `false`.
- *
- * If an object is provided for `predicate` the created `_.matches` style
- * callback returns `true` for elements that have the properties of the given
- * object, else `false`.
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {Array} array The array to query.
- * @param {Function|Object|string} [predicate=_.identity] The function invoked
- * per iteration.
- * @param {*} [thisArg] The `this` binding of `predicate`.
- * @returns {Array} Returns the slice of `array`.
- * @example
- *
- * _.dropWhile([1, 2, 3], function(n) {
- * return n < 3;
- * });
- * // => [3]
- *
- * var users = [
- * { 'user': 'barney', 'active': false },
- * { 'user': 'fred', 'active': false },
- * { 'user': 'pebbles', 'active': true }
- * ];
- *
- * // using the `_.matches` callback shorthand
- * _.pluck(_.dropWhile(users, { 'user': 'barney', 'active': false }), 'user');
- * // => ['fred', 'pebbles']
- *
- * // using the `_.matchesProperty` callback shorthand
- * _.pluck(_.dropWhile(users, 'active', false), 'user');
- * // => ['pebbles']
- *
- * // using the `_.property` callback shorthand
- * _.pluck(_.dropWhile(users, 'active'), 'user');
- * // => ['barney', 'fred', 'pebbles']
- */
- function dropWhile(array, predicate, thisArg) {
- return array && array.length ? baseWhile(array, getCallback(predicate, thisArg, 3), true) : [];
- }
- /**
- * Fills elements of `array` with `value` from `start` up to, but not
- * including, `end`.
- *
- * **Note:** This method mutates `array`.
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {Array} array The array to fill.
- * @param {*} value The value to fill `array` with.
- * @param {number} [start=0] The start position.
- * @param {number} [end=array.length] The end position.
- * @returns {Array} Returns `array`.
- * @example
- *
- * var array = [1, 2, 3];
- *
- * _.fill(array, 'a');
- * console.log(array);
- * // => ['a', 'a', 'a']
- *
- * _.fill(Array(3), 2);
- * // => [2, 2, 2]
- *
- * _.fill([4, 6, 8], '*', 1, 2);
- * // => [4, '*', 8]
- */
- function fill(array, value, start, end) {
- var length = array ? array.length : 0;
- if (!length) {
- return [];
- }
- if (start && typeof start != 'number' && isIterateeCall(array, value, start)) {
- start = 0;
- end = length;
- }
- return baseFill(array, value, start, end);
- }
- /**
- * This method is like `_.find` except that it returns the index of the first
- * element `predicate` returns truthy for instead of the element itself.
- *
- * If a property name is provided for `predicate` the created `_.property`
- * style callback returns the property value of the given element.
- *
- * If a value is also provided for `thisArg` the created `_.matchesProperty`
- * style callback returns `true` for elements that have a matching property
- * value, else `false`.
- *
- * If an object is provided for `predicate` the created `_.matches` style
- * callback returns `true` for elements that have the properties of the given
- * object, else `false`.
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {Array} array The array to search.
- * @param {Function|Object|string} [predicate=_.identity] The function invoked
- * per iteration.
- * @param {*} [thisArg] The `this` binding of `predicate`.
- * @returns {number} Returns the index of the found element, else `-1`.
- * @example
- *
- * var users = [
- * { 'user': 'barney', 'active': false },
- * { 'user': 'fred', 'active': false },
- * { 'user': 'pebbles', 'active': true }
- * ];
- *
- * _.findIndex(users, function(chr) {
- * return chr.user == 'barney';
- * });
- * // => 0
- *
- * // using the `_.matches` callback shorthand
- * _.findIndex(users, { 'user': 'fred', 'active': false });
- * // => 1
- *
- * // using the `_.matchesProperty` callback shorthand
- * _.findIndex(users, 'active', false);
- * // => 0
- *
- * // using the `_.property` callback shorthand
- * _.findIndex(users, 'active');
- * // => 2
- */
- var findIndex = createFindIndex();
- /**
- * This method is like `_.findIndex` except that it iterates over elements
- * of `collection` from right to left.
- *
- * If a property name is provided for `predicate` the created `_.property`
- * style callback returns the property value of the given element.
- *
- * If a value is also provided for `thisArg` the created `_.matchesProperty`
- * style callback returns `true` for elements that have a matching property
- * value, else `false`.
- *
- * If an object is provided for `predicate` the created `_.matches` style
- * callback returns `true` for elements that have the properties of the given
- * object, else `false`.
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {Array} array The array to search.
- * @param {Function|Object|string} [predicate=_.identity] The function invoked
- * per iteration.
- * @param {*} [thisArg] The `this` binding of `predicate`.
- * @returns {number} Returns the index of the found element, else `-1`.
- * @example
- *
- * var users = [
- * { 'user': 'barney', 'active': true },
- * { 'user': 'fred', 'active': false },
- * { 'user': 'pebbles', 'active': false }
- * ];
- *
- * _.findLastIndex(users, function(chr) {
- * return chr.user == 'pebbles';
- * });
- * // => 2
- *
- * // using the `_.matches` callback shorthand
- * _.findLastIndex(users, { 'user': 'barney', 'active': true });
- * // => 0
- *
- * // using the `_.matchesProperty` callback shorthand
- * _.findLastIndex(users, 'active', false);
- * // => 2
- *
- * // using the `_.property` callback shorthand
- * _.findLastIndex(users, 'active');
- * // => 0
- */
- var findLastIndex = createFindIndex(true);
- /**
- * Gets the first element of `array`.
- *
- * @static
- * @memberOf _
- * @alias head
- * @category Array
- * @param {Array} array The array to query.
- * @returns {*} Returns the first element of `array`.
- * @example
- *
- * _.first([1, 2, 3]);
- * // => 1
- *
- * _.first([]);
- * // => undefined
- */
- function first(array) {
- return array ? array[0] : undefined;
- }
- /**
- * Flattens a nested array. If `isDeep` is `true` the array is recursively
- * flattened, otherwise it's only flattened a single level.
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {Array} array The array to flatten.
- * @param {boolean} [isDeep] Specify a deep flatten.
- * @param- {Object} [guard] Enables use as a callback for functions like `_.map`.
- * @returns {Array} Returns the new flattened array.
- * @example
- *
- * _.flatten([1, [2, 3, [4]]]);
- * // => [1, 2, 3, [4]]
- *
- * // using `isDeep`
- * _.flatten([1, [2, 3, [4]]], true);
- * // => [1, 2, 3, 4]
- */
- function flatten(array, isDeep, guard) {
- var length = array ? array.length : 0;
- if (guard && isIterateeCall(array, isDeep, guard)) {
- isDeep = false;
- }
- return length ? baseFlatten(array, isDeep) : [];
- }
- /**
- * Recursively flattens a nested array.
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {Array} array The array to recursively flatten.
- * @returns {Array} Returns the new flattened array.
- * @example
- *
- * _.flattenDeep([1, [2, 3, [4]]]);
- * // => [1, 2, 3, 4]
- */
- function flattenDeep(array) {
- var length = array ? array.length : 0;
- return length ? baseFlatten(array, true) : [];
- }
- /**
- * Gets the index at which the first occurrence of `value` is found in `array`
- * using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
- * for equality comparisons. If `fromIndex` is negative, it's used as the offset
- * from the end of `array`. If `array` is sorted providing `true` for `fromIndex`
- * performs a faster binary search.
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {Array} array The array to search.
- * @param {*} value The value to search for.
- * @param {boolean|number} [fromIndex=0] The index to search from or `true`
- * to perform a binary search on a sorted array.
- * @returns {number} Returns the index of the matched value, else `-1`.
- * @example
- *
- * _.indexOf([1, 2, 1, 2], 2);
- * // => 1
- *
- * // using `fromIndex`
- * _.indexOf([1, 2, 1, 2], 2, 2);
- * // => 3
- *
- * // performing a binary search
- * _.indexOf([1, 1, 2, 2], 2, true);
- * // => 2
- */
- function indexOf(array, value, fromIndex) {
- var length = array ? array.length : 0;
- if (!length) {
- return -1;
- }
- if (typeof fromIndex == 'number') {
- fromIndex = fromIndex < 0 ? nativeMax(length + fromIndex, 0) : fromIndex;
- } else if (fromIndex) {
- var index = binaryIndex(array, value);
- if (index < length && (value === value ? value === array[index] : array[index] !== array[index])) {
- return index;
- }
- return -1;
- }
- return baseIndexOf(array, value, fromIndex || 0);
- }
- /**
- * Gets all but the last element of `array`.
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {Array} array The array to query.
- * @returns {Array} Returns the slice of `array`.
- * @example
- *
- * _.initial([1, 2, 3]);
- * // => [1, 2]
- */
- function initial(array) {
- return dropRight(array, 1);
- }
- /**
- * Creates an array of unique values that are included in all of the provided
- * arrays using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
- * for equality comparisons.
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {...Array} [arrays] The arrays to inspect.
- * @returns {Array} Returns the new array of shared values.
- * @example
- * _.intersection([1, 2], [4, 2], [2, 1]);
- * // => [2]
- */
- var intersection = restParam(function (arrays) {
- var othLength = arrays.length, othIndex = othLength, caches = Array(length), indexOf = getIndexOf(), isCommon = indexOf === baseIndexOf, result = [];
- while (othIndex--) {
- var value = arrays[othIndex] = isArrayLike(value = arrays[othIndex]) ? value : [];
- caches[othIndex] = isCommon && value.length >= 120 ? createCache(othIndex && value) : null;
- }
- var array = arrays[0], index = -1, length = array ? array.length : 0, seen = caches[0];
- outer:
- while (++index < length) {
- value = array[index];
- if ((seen ? cacheIndexOf(seen, value) : indexOf(result, value, 0)) < 0) {
- var othIndex = othLength;
- while (--othIndex) {
- var cache = caches[othIndex];
- if ((cache ? cacheIndexOf(cache, value) : indexOf(arrays[othIndex], value, 0)) < 0) {
- continue outer;
- }
- }
- if (seen) {
- seen.push(value);
- }
- result.push(value);
- }
- }
- return result;
- });
- /**
- * Gets the last element of `array`.
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {Array} array The array to query.
- * @returns {*} Returns the last element of `array`.
- * @example
- *
- * _.last([1, 2, 3]);
- * // => 3
- */
- function last(array) {
- var length = array ? array.length : 0;
- return length ? array[length - 1] : undefined;
- }
- /**
- * This method is like `_.indexOf` except that it iterates over elements of
- * `array` from right to left.
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {Array} array The array to search.
- * @param {*} value The value to search for.
- * @param {boolean|number} [fromIndex=array.length-1] The index to search from
- * or `true` to perform a binary search on a sorted array.
- * @returns {number} Returns the index of the matched value, else `-1`.
- * @example
- *
- * _.lastIndexOf([1, 2, 1, 2], 2);
- * // => 3
- *
- * // using `fromIndex`
- * _.lastIndexOf([1, 2, 1, 2], 2, 2);
- * // => 1
- *
- * // performing a binary search
- * _.lastIndexOf([1, 1, 2, 2], 2, true);
- * // => 3
- */
- function lastIndexOf(array, value, fromIndex) {
- var length = array ? array.length : 0;
- if (!length) {
- return -1;
- }
- var index = length;
- if (typeof fromIndex == 'number') {
- index = (fromIndex < 0 ? nativeMax(length + fromIndex, 0) : nativeMin(fromIndex || 0, length - 1)) + 1;
- } else if (fromIndex) {
- index = binaryIndex(array, value, true) - 1;
- var other = array[index];
- if (value === value ? value === other : other !== other) {
- return index;
- }
- return -1;
- }
- if (value !== value) {
- return indexOfNaN(array, index, true);
- }
- while (index--) {
- if (array[index] === value) {
- return index;
- }
- }
- return -1;
- }
- /**
- * Removes all provided values from `array` using
- * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
- * for equality comparisons.
- *
- * **Note:** Unlike `_.without`, this method mutates `array`.
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {Array} array The array to modify.
- * @param {...*} [values] The values to remove.
- * @returns {Array} Returns `array`.
- * @example
- *
- * var array = [1, 2, 3, 1, 2, 3];
- *
- * _.pull(array, 2, 3);
- * console.log(array);
- * // => [1, 1]
- */
- function pull() {
- var args = arguments, array = args[0];
- if (!(array && array.length)) {
- return array;
- }
- var index = 0, indexOf = getIndexOf(), length = args.length;
- while (++index < length) {
- var fromIndex = 0, value = args[index];
- while ((fromIndex = indexOf(array, value, fromIndex)) > -1) {
- splice.call(array, fromIndex, 1);
- }
- }
- return array;
- }
- /**
- * Removes elements from `array` corresponding to the given indexes and returns
- * an array of the removed elements. Indexes may be specified as an array of
- * indexes or as individual arguments.
- *
- * **Note:** Unlike `_.at`, this method mutates `array`.
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {Array} array The array to modify.
- * @param {...(number|number[])} [indexes] The indexes of elements to remove,
- * specified as individual indexes or arrays of indexes.
- * @returns {Array} Returns the new array of removed elements.
- * @example
- *
- * var array = [5, 10, 15, 20];
- * var evens = _.pullAt(array, 1, 3);
- *
- * console.log(array);
- * // => [5, 15]
- *
- * console.log(evens);
- * // => [10, 20]
- */
- var pullAt = restParam(function (array, indexes) {
- indexes = baseFlatten(indexes);
- var result = baseAt(array, indexes);
- basePullAt(array, indexes.sort(baseCompareAscending));
- return result;
- });
- /**
- * Removes all elements from `array` that `predicate` returns truthy for
- * and returns an array of the removed elements. The predicate is bound to
- * `thisArg` and invoked with three arguments: (value, index, array).
- *
- * If a property name is provided for `predicate` the created `_.property`
- * style callback returns the property value of the given element.
- *
- * If a value is also provided for `thisArg` the created `_.matchesProperty`
- * style callback returns `true` for elements that have a matching property
- * value, else `false`.
- *
- * If an object is provided for `predicate` the created `_.matches` style
- * callback returns `true` for elements that have the properties of the given
- * object, else `false`.
- *
- * **Note:** Unlike `_.filter`, this method mutates `array`.
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {Array} array The array to modify.
- * @param {Function|Object|string} [predicate=_.identity] The function invoked
- * per iteration.
- * @param {*} [thisArg] The `this` binding of `predicate`.
- * @returns {Array} Returns the new array of removed elements.
- * @example
- *
- * var array = [1, 2, 3, 4];
- * var evens = _.remove(array, function(n) {
- * return n % 2 == 0;
- * });
- *
- * console.log(array);
- * // => [1, 3]
- *
- * console.log(evens);
- * // => [2, 4]
- */
- function remove(array, predicate, thisArg) {
- var result = [];
- if (!(array && array.length)) {
- return result;
- }
- var index = -1, indexes = [], length = array.length;
- predicate = getCallback(predicate, thisArg, 3);
- while (++index < length) {
- var value = array[index];
- if (predicate(value, index, array)) {
- result.push(value);
- indexes.push(index);
- }
- }
- basePullAt(array, indexes);
- return result;
- }
- /**
- * Gets all but the first element of `array`.
- *
- * @static
- * @memberOf _
- * @alias tail
- * @category Array
- * @param {Array} array The array to query.
- * @returns {Array} Returns the slice of `array`.
- * @example
- *
- * _.rest([1, 2, 3]);
- * // => [2, 3]
- */
- function rest(array) {
- return drop(array, 1);
- }
- /**
- * Creates a slice of `array` from `start` up to, but not including, `end`.
- *
- * **Note:** This method is used instead of `Array#slice` to support node
- * lists in IE < 9 and to ensure dense arrays are returned.
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {Array} array The array to slice.
- * @param {number} [start=0] The start position.
- * @param {number} [end=array.length] The end position.
- * @returns {Array} Returns the slice of `array`.
- */
- function slice(array, start, end) {
- var length = array ? array.length : 0;
- if (!length) {
- return [];
- }
- if (end && typeof end != 'number' && isIterateeCall(array, start, end)) {
- start = 0;
- end = length;
- }
- return baseSlice(array, start, end);
- }
- /**
- * Uses a binary search to determine the lowest index at which `value` should
- * be inserted into `array` in order to maintain its sort order. If an iteratee
- * function is provided it's invoked for `value` and each element of `array`
- * to compute their sort ranking. The iteratee is bound to `thisArg` and
- * invoked with one argument; (value).
- *
- * If a property name is provided for `iteratee` the created `_.property`
- * style callback returns the property value of the given element.
- *
- * If a value is also provided for `thisArg` the created `_.matchesProperty`
- * style callback returns `true` for elements that have a matching property
- * value, else `false`.
- *
- * If an object is provided for `iteratee` the created `_.matches` style
- * callback returns `true` for elements that have the properties of the given
- * object, else `false`.
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {Array} array The sorted array to inspect.
- * @param {*} value The value to evaluate.
- * @param {Function|Object|string} [iteratee=_.identity] The function invoked
- * per iteration.
- * @param {*} [thisArg] The `this` binding of `iteratee`.
- * @returns {number} Returns the index at which `value` should be inserted
- * into `array`.
- * @example
- *
- * _.sortedIndex([30, 50], 40);
- * // => 1
- *
- * _.sortedIndex([4, 4, 5, 5], 5);
- * // => 2
- *
- * var dict = { 'data': { 'thirty': 30, 'forty': 40, 'fifty': 50 } };
- *
- * // using an iteratee function
- * _.sortedIndex(['thirty', 'fifty'], 'forty', function(word) {
- * return this.data[word];
- * }, dict);
- * // => 1
- *
- * // using the `_.property` callback shorthand
- * _.sortedIndex([{ 'x': 30 }, { 'x': 50 }], { 'x': 40 }, 'x');
- * // => 1
- */
- var sortedIndex = createSortedIndex();
- /**
- * This method is like `_.sortedIndex` except that it returns the highest
- * index at which `value` should be inserted into `array` in order to
- * maintain its sort order.
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {Array} array The sorted array to inspect.
- * @param {*} value The value to evaluate.
- * @param {Function|Object|string} [iteratee=_.identity] The function invoked
- * per iteration.
- * @param {*} [thisArg] The `this` binding of `iteratee`.
- * @returns {number} Returns the index at which `value` should be inserted
- * into `array`.
- * @example
- *
- * _.sortedLastIndex([4, 4, 5, 5], 5);
- * // => 4
- */
- var sortedLastIndex = createSortedIndex(true);
- /**
- * Creates a slice of `array` with `n` elements taken from the beginning.
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {Array} array The array to query.
- * @param {number} [n=1] The number of elements to take.
- * @param- {Object} [guard] Enables use as a callback for functions like `_.map`.
- * @returns {Array} Returns the slice of `array`.
- * @example
- *
- * _.take([1, 2, 3]);
- * // => [1]
- *
- * _.take([1, 2, 3], 2);
- * // => [1, 2]
- *
- * _.take([1, 2, 3], 5);
- * // => [1, 2, 3]
- *
- * _.take([1, 2, 3], 0);
- * // => []
- */
- function take(array, n, guard) {
- var length = array ? array.length : 0;
- if (!length) {
- return [];
- }
- if (guard ? isIterateeCall(array, n, guard) : n == null) {
- n = 1;
- }
- return baseSlice(array, 0, n < 0 ? 0 : n);
- }
- /**
- * Creates a slice of `array` with `n` elements taken from the end.
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {Array} array The array to query.
- * @param {number} [n=1] The number of elements to take.
- * @param- {Object} [guard] Enables use as a callback for functions like `_.map`.
- * @returns {Array} Returns the slice of `array`.
- * @example
- *
- * _.takeRight([1, 2, 3]);
- * // => [3]
- *
- * _.takeRight([1, 2, 3], 2);
- * // => [2, 3]
- *
- * _.takeRight([1, 2, 3], 5);
- * // => [1, 2, 3]
- *
- * _.takeRight([1, 2, 3], 0);
- * // => []
- */
- function takeRight(array, n, guard) {
- var length = array ? array.length : 0;
- if (!length) {
- return [];
- }
- if (guard ? isIterateeCall(array, n, guard) : n == null) {
- n = 1;
- }
- n = length - (+n || 0);
- return baseSlice(array, n < 0 ? 0 : n);
- }
- /**
- * Creates a slice of `array` with elements taken from the end. Elements are
- * taken until `predicate` returns falsey. The predicate is bound to `thisArg`
- * and invoked with three arguments: (value, index, array).
- *
- * If a property name is provided for `predicate` the created `_.property`
- * style callback returns the property value of the given element.
- *
- * If a value is also provided for `thisArg` the created `_.matchesProperty`
- * style callback returns `true` for elements that have a matching property
- * value, else `false`.
- *
- * If an object is provided for `predicate` the created `_.matches` style
- * callback returns `true` for elements that have the properties of the given
- * object, else `false`.
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {Array} array The array to query.
- * @param {Function|Object|string} [predicate=_.identity] The function invoked
- * per iteration.
- * @param {*} [thisArg] The `this` binding of `predicate`.
- * @returns {Array} Returns the slice of `array`.
- * @example
- *
- * _.takeRightWhile([1, 2, 3], function(n) {
- * return n > 1;
- * });
- * // => [2, 3]
- *
- * var users = [
- * { 'user': 'barney', 'active': true },
- * { 'user': 'fred', 'active': false },
- * { 'user': 'pebbles', 'active': false }
- * ];
- *
- * // using the `_.matches` callback shorthand
- * _.pluck(_.takeRightWhile(users, { 'user': 'pebbles', 'active': false }), 'user');
- * // => ['pebbles']
- *
- * // using the `_.matchesProperty` callback shorthand
- * _.pluck(_.takeRightWhile(users, 'active', false), 'user');
- * // => ['fred', 'pebbles']
- *
- * // using the `_.property` callback shorthand
- * _.pluck(_.takeRightWhile(users, 'active'), 'user');
- * // => []
- */
- function takeRightWhile(array, predicate, thisArg) {
- return array && array.length ? baseWhile(array, getCallback(predicate, thisArg, 3), false, true) : [];
- }
- /**
- * Creates a slice of `array` with elements taken from the beginning. Elements
- * are taken until `predicate` returns falsey. The predicate is bound to
- * `thisArg` and invoked with three arguments: (value, index, array).
- *
- * If a property name is provided for `predicate` the created `_.property`
- * style callback returns the property value of the given element.
- *
- * If a value is also provided for `thisArg` the created `_.matchesProperty`
- * style callback returns `true` for elements that have a matching property
- * value, else `false`.
- *
- * If an object is provided for `predicate` the created `_.matches` style
- * callback returns `true` for elements that have the properties of the given
- * object, else `false`.
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {Array} array The array to query.
- * @param {Function|Object|string} [predicate=_.identity] The function invoked
- * per iteration.
- * @param {*} [thisArg] The `this` binding of `predicate`.
- * @returns {Array} Returns the slice of `array`.
- * @example
- *
- * _.takeWhile([1, 2, 3], function(n) {
- * return n < 3;
- * });
- * // => [1, 2]
- *
- * var users = [
- * { 'user': 'barney', 'active': false },
- * { 'user': 'fred', 'active': false},
- * { 'user': 'pebbles', 'active': true }
- * ];
- *
- * // using the `_.matches` callback shorthand
- * _.pluck(_.takeWhile(users, { 'user': 'barney', 'active': false }), 'user');
- * // => ['barney']
- *
- * // using the `_.matchesProperty` callback shorthand
- * _.pluck(_.takeWhile(users, 'active', false), 'user');
- * // => ['barney', 'fred']
- *
- * // using the `_.property` callback shorthand
- * _.pluck(_.takeWhile(users, 'active'), 'user');
- * // => []
- */
- function takeWhile(array, predicate, thisArg) {
- return array && array.length ? baseWhile(array, getCallback(predicate, thisArg, 3)) : [];
- }
- /**
- * Creates an array of unique values, in order, from all of the provided arrays
- * using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
- * for equality comparisons.
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {...Array} [arrays] The arrays to inspect.
- * @returns {Array} Returns the new array of combined values.
- * @example
- *
- * _.union([1, 2], [4, 2], [2, 1]);
- * // => [1, 2, 4]
- */
- var union = restParam(function (arrays) {
- return baseUniq(baseFlatten(arrays, false, true));
- });
- /**
- * Creates a duplicate-free version of an array, using
- * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
- * for equality comparisons, in which only the first occurence of each element
- * is kept. Providing `true` for `isSorted` performs a faster search algorithm
- * for sorted arrays. If an iteratee function is provided it's invoked for
- * each element in the array to generate the criterion by which uniqueness
- * is computed. The `iteratee` is bound to `thisArg` and invoked with three
- * arguments: (value, index, array).
- *
- * If a property name is provided for `iteratee` the created `_.property`
- * style callback returns the property value of the given element.
- *
- * If a value is also provided for `thisArg` the created `_.matchesProperty`
- * style callback returns `true` for elements that have a matching property
- * value, else `false`.
- *
- * If an object is provided for `iteratee` the created `_.matches` style
- * callback returns `true` for elements that have the properties of the given
- * object, else `false`.
- *
- * @static
- * @memberOf _
- * @alias unique
- * @category Array
- * @param {Array} array The array to inspect.
- * @param {boolean} [isSorted] Specify the array is sorted.
- * @param {Function|Object|string} [iteratee] The function invoked per iteration.
- * @param {*} [thisArg] The `this` binding of `iteratee`.
- * @returns {Array} Returns the new duplicate-value-free array.
- * @example
- *
- * _.uniq([2, 1, 2]);
- * // => [2, 1]
- *
- * // using `isSorted`
- * _.uniq([1, 1, 2], true);
- * // => [1, 2]
- *
- * // using an iteratee function
- * _.uniq([1, 2.5, 1.5, 2], function(n) {
- * return this.floor(n);
- * }, Math);
- * // => [1, 2.5]
- *
- * // using the `_.property` callback shorthand
- * _.uniq([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x');
- * // => [{ 'x': 1 }, { 'x': 2 }]
- */
- function uniq(array, isSorted, iteratee, thisArg) {
- var length = array ? array.length : 0;
- if (!length) {
- return [];
- }
- if (isSorted != null && typeof isSorted != 'boolean') {
- thisArg = iteratee;
- iteratee = isIterateeCall(array, isSorted, thisArg) ? undefined : isSorted;
- isSorted = false;
- }
- var callback = getCallback();
- if (!(iteratee == null && callback === baseCallback)) {
- iteratee = callback(iteratee, thisArg, 3);
- }
- return isSorted && getIndexOf() === baseIndexOf ? sortedUniq(array, iteratee) : baseUniq(array, iteratee);
- }
- /**
- * This method is like `_.zip` except that it accepts an array of grouped
- * elements and creates an array regrouping the elements to their pre-zip
- * configuration.
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {Array} array The array of grouped elements to process.
- * @returns {Array} Returns the new array of regrouped elements.
- * @example
- *
- * var zipped = _.zip(['fred', 'barney'], [30, 40], [true, false]);
- * // => [['fred', 30, true], ['barney', 40, false]]
- *
- * _.unzip(zipped);
- * // => [['fred', 'barney'], [30, 40], [true, false]]
- */
- function unzip(array) {
- if (!(array && array.length)) {
- return [];
- }
- var index = -1, length = 0;
- array = arrayFilter(array, function (group) {
- if (isArrayLike(group)) {
- length = nativeMax(group.length, length);
- return true;
- }
- });
- var result = Array(length);
- while (++index < length) {
- result[index] = arrayMap(array, baseProperty(index));
- }
- return result;
- }
- /**
- * This method is like `_.unzip` except that it accepts an iteratee to specify
- * how regrouped values should be combined. The `iteratee` is bound to `thisArg`
- * and invoked with four arguments: (accumulator, value, index, group).
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {Array} array The array of grouped elements to process.
- * @param {Function} [iteratee] The function to combine regrouped values.
- * @param {*} [thisArg] The `this` binding of `iteratee`.
- * @returns {Array} Returns the new array of regrouped elements.
- * @example
- *
- * var zipped = _.zip([1, 2], [10, 20], [100, 200]);
- * // => [[1, 10, 100], [2, 20, 200]]
- *
- * _.unzipWith(zipped, _.add);
- * // => [3, 30, 300]
- */
- function unzipWith(array, iteratee, thisArg) {
- var length = array ? array.length : 0;
- if (!length) {
- return [];
- }
- var result = unzip(array);
- if (iteratee == null) {
- return result;
- }
- iteratee = bindCallback(iteratee, thisArg, 4);
- return arrayMap(result, function (group) {
- return arrayReduce(group, iteratee, undefined, true);
- });
- }
- /**
- * Creates an array excluding all provided values using
- * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
- * for equality comparisons.
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {Array} array The array to filter.
- * @param {...*} [values] The values to exclude.
- * @returns {Array} Returns the new array of filtered values.
- * @example
- *
- * _.without([1, 2, 1, 3], 1, 2);
- * // => [3]
- */
- var without = restParam(function (array, values) {
- return isArrayLike(array) ? baseDifference(array, values) : [];
- });
- /**
- * Creates an array of unique values that is the [symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference)
- * of the provided arrays.
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {...Array} [arrays] The arrays to inspect.
- * @returns {Array} Returns the new array of values.
- * @example
- *
- * _.xor([1, 2], [4, 2]);
- * // => [1, 4]
- */
- function xor() {
- var index = -1, length = arguments.length;
- while (++index < length) {
- var array = arguments[index];
- if (isArrayLike(array)) {
- var result = result ? arrayPush(baseDifference(result, array), baseDifference(array, result)) : array;
- }
- }
- return result ? baseUniq(result) : [];
- }
- /**
- * Creates an array of grouped elements, the first of which contains the first
- * elements of the given arrays, the second of which contains the second elements
- * of the given arrays, and so on.
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {...Array} [arrays] The arrays to process.
- * @returns {Array} Returns the new array of grouped elements.
- * @example
- *
- * _.zip(['fred', 'barney'], [30, 40], [true, false]);
- * // => [['fred', 30, true], ['barney', 40, false]]
- */
- var zip = restParam(unzip);
- /**
- * The inverse of `_.pairs`; this method returns an object composed from arrays
- * of property names and values. Provide either a single two dimensional array,
- * e.g. `[[key1, value1], [key2, value2]]` or two arrays, one of property names
- * and one of corresponding values.
- *
- * @static
- * @memberOf _
- * @alias object
- * @category Array
- * @param {Array} props The property names.
- * @param {Array} [values=[]] The property values.
- * @returns {Object} Returns the new object.
- * @example
- *
- * _.zipObject([['fred', 30], ['barney', 40]]);
- * // => { 'fred': 30, 'barney': 40 }
- *
- * _.zipObject(['fred', 'barney'], [30, 40]);
- * // => { 'fred': 30, 'barney': 40 }
- */
- function zipObject(props, values) {
- var index = -1, length = props ? props.length : 0, result = {};
- if (length && !values && !isArray(props[0])) {
- values = [];
- }
- while (++index < length) {
- var key = props[index];
- if (values) {
- result[key] = values[index];
- } else if (key) {
- result[key[0]] = key[1];
- }
- }
- return result;
- }
- /**
- * This method is like `_.zip` except that it accepts an iteratee to specify
- * how grouped values should be combined. The `iteratee` is bound to `thisArg`
- * and invoked with four arguments: (accumulator, value, index, group).
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {...Array} [arrays] The arrays to process.
- * @param {Function} [iteratee] The function to combine grouped values.
- * @param {*} [thisArg] The `this` binding of `iteratee`.
- * @returns {Array} Returns the new array of grouped elements.
- * @example
- *
- * _.zipWith([1, 2], [10, 20], [100, 200], _.add);
- * // => [111, 222]
- */
- var zipWith = restParam(function (arrays) {
- var length = arrays.length, iteratee = length > 2 ? arrays[length - 2] : undefined, thisArg = length > 1 ? arrays[length - 1] : undefined;
- if (length > 2 && typeof iteratee == 'function') {
- length -= 2;
- } else {
- iteratee = length > 1 && typeof thisArg == 'function' ? (--length, thisArg) : undefined;
- thisArg = undefined;
- }
- arrays.length = length;
- return unzipWith(arrays, iteratee, thisArg);
- });
- /*------------------------------------------------------------------------*/
- /**
- * Creates a `lodash` object that wraps `value` with explicit method
- * chaining enabled.
- *
- * @static
- * @memberOf _
- * @category Chain
- * @param {*} value The value to wrap.
- * @returns {Object} Returns the new `lodash` wrapper instance.
- * @example
- *
- * var users = [
- * { 'user': 'barney', 'age': 36 },
- * { 'user': 'fred', 'age': 40 },
- * { 'user': 'pebbles', 'age': 1 }
- * ];
- *
- * var youngest = _.chain(users)
- * .sortBy('age')
- * .map(function(chr) {
- * return chr.user + ' is ' + chr.age;
- * })
- * .first()
- * .value();
- * // => 'pebbles is 1'
- */
- function chain(value) {
- var result = lodash(value);
- result.__chain__ = true;
- return result;
- }
- /**
- * This method invokes `interceptor` and returns `value`. The interceptor is
- * bound to `thisArg` and invoked with one argument; (value). The purpose of
- * this method is to "tap into" a method chain in order to perform operations
- * on intermediate results within the chain.
- *
- * @static
- * @memberOf _
- * @category Chain
- * @param {*} value The value to provide to `interceptor`.
- * @param {Function} interceptor The function to invoke.
- * @param {*} [thisArg] The `this` binding of `interceptor`.
- * @returns {*} Returns `value`.
- * @example
- *
- * _([1, 2, 3])
- * .tap(function(array) {
- * array.pop();
- * })
- * .reverse()
- * .value();
- * // => [2, 1]
- */
- function tap(value, interceptor, thisArg) {
- interceptor.call(thisArg, value);
- return value;
- }
- /**
- * This method is like `_.tap` except that it returns the result of `interceptor`.
- *
- * @static
- * @memberOf _
- * @category Chain
- * @param {*} value The value to provide to `interceptor`.
- * @param {Function} interceptor The function to invoke.
- * @param {*} [thisArg] The `this` binding of `interceptor`.
- * @returns {*} Returns the result of `interceptor`.
- * @example
- *
- * _(' abc ')
- * .chain()
- * .trim()
- * .thru(function(value) {
- * return [value];
- * })
- * .value();
- * // => ['abc']
- */
- function thru(value, interceptor, thisArg) {
- return interceptor.call(thisArg, value);
- }
- /**
- * Enables explicit method chaining on the wrapper object.
- *
- * @name chain
- * @memberOf _
- * @category Chain
- * @returns {Object} Returns the new `lodash` wrapper instance.
- * @example
- *
- * var users = [
- * { 'user': 'barney', 'age': 36 },
- * { 'user': 'fred', 'age': 40 }
- * ];
- *
- * // without explicit chaining
- * _(users).first();
- * // => { 'user': 'barney', 'age': 36 }
- *
- * // with explicit chaining
- * _(users).chain()
- * .first()
- * .pick('user')
- * .value();
- * // => { 'user': 'barney' }
- */
- function wrapperChain() {
- return chain(this);
- }
- /**
- * Executes the chained sequence and returns the wrapped result.
- *
- * @name commit
- * @memberOf _
- * @category Chain
- * @returns {Object} Returns the new `lodash` wrapper instance.
- * @example
- *
- * var array = [1, 2];
- * var wrapped = _(array).push(3);
- *
- * console.log(array);
- * // => [1, 2]
- *
- * wrapped = wrapped.commit();
- * console.log(array);
- * // => [1, 2, 3]
- *
- * wrapped.last();
- * // => 3
- *
- * console.log(array);
- * // => [1, 2, 3]
- */
- function wrapperCommit() {
- return new LodashWrapper(this.value(), this.__chain__);
- }
- /**
- * Creates a new array joining a wrapped array with any additional arrays
- * and/or values.
- *
- * @name concat
- * @memberOf _
- * @category Chain
- * @param {...*} [values] The values to concatenate.
- * @returns {Array} Returns the new concatenated array.
- * @example
- *
- * var array = [1];
- * var wrapped = _(array).concat(2, [3], [[4]]);
- *
- * console.log(wrapped.value());
- * // => [1, 2, 3, [4]]
- *
- * console.log(array);
- * // => [1]
- */
- var wrapperConcat = restParam(function (values) {
- values = baseFlatten(values);
- return this.thru(function (array) {
- return arrayConcat(isArray(array) ? array : [toObject(array)], values);
- });
- });
- /**
- * Creates a clone of the chained sequence planting `value` as the wrapped value.
- *
- * @name plant
- * @memberOf _
- * @category Chain
- * @returns {Object} Returns the new `lodash` wrapper instance.
- * @example
- *
- * var array = [1, 2];
- * var wrapped = _(array).map(function(value) {
- * return Math.pow(value, 2);
- * });
- *
- * var other = [3, 4];
- * var otherWrapped = wrapped.plant(other);
- *
- * otherWrapped.value();
- * // => [9, 16]
- *
- * wrapped.value();
- * // => [1, 4]
- */
- function wrapperPlant(value) {
- var result, parent = this;
- while (parent instanceof baseLodash) {
- var clone = wrapperClone(parent);
- if (result) {
- previous.__wrapped__ = clone;
- } else {
- result = clone;
- }
- var previous = clone;
- parent = parent.__wrapped__;
- }
- previous.__wrapped__ = value;
- return result;
- }
- /**
- * Reverses the wrapped array so the first element becomes the last, the
- * second element becomes the second to last, and so on.
- *
- * **Note:** This method mutates the wrapped array.
- *
- * @name reverse
- * @memberOf _
- * @category Chain
- * @returns {Object} Returns the new reversed `lodash` wrapper instance.
- * @example
- *
- * var array = [1, 2, 3];
- *
- * _(array).reverse().value()
- * // => [3, 2, 1]
- *
- * console.log(array);
- * // => [3, 2, 1]
- */
- function wrapperReverse() {
- var value = this.__wrapped__;
- var interceptor = function (value) {
- return value.reverse();
- };
- if (value instanceof LazyWrapper) {
- var wrapped = value;
- if (this.__actions__.length) {
- wrapped = new LazyWrapper(this);
- }
- wrapped = wrapped.reverse();
- wrapped.__actions__.push({
- 'func': thru,
- 'args': [interceptor],
- 'thisArg': undefined
- });
- return new LodashWrapper(wrapped, this.__chain__);
- }
- return this.thru(interceptor);
- }
- /**
- * Produces the result of coercing the unwrapped value to a string.
- *
- * @name toString
- * @memberOf _
- * @category Chain
- * @returns {string} Returns the coerced string value.
- * @example
- *
- * _([1, 2, 3]).toString();
- * // => '1,2,3'
- */
- function wrapperToString() {
- return this.value() + '';
- }
- /**
- * Executes the chained sequence to extract the unwrapped value.
- *
- * @name value
- * @memberOf _
- * @alias run, toJSON, valueOf
- * @category Chain
- * @returns {*} Returns the resolved unwrapped value.
- * @example
- *
- * _([1, 2, 3]).value();
- * // => [1, 2, 3]
- */
- function wrapperValue() {
- return baseWrapperValue(this.__wrapped__, this.__actions__);
- }
- /*------------------------------------------------------------------------*/
- /**
- * Creates an array of elements corresponding to the given keys, or indexes,
- * of `collection`. Keys may be specified as individual arguments or as arrays
- * of keys.
- *
- * @static
- * @memberOf _
- * @category Collection
- * @param {Array|Object|string} collection The collection to iterate over.
- * @param {...(number|number[]|string|string[])} [props] The property names
- * or indexes of elements to pick, specified individually or in arrays.
- * @returns {Array} Returns the new array of picked elements.
- * @example
- *
- * _.at(['a', 'b', 'c'], [0, 2]);
- * // => ['a', 'c']
- *
- * _.at(['barney', 'fred', 'pebbles'], 0, 2);
- * // => ['barney', 'pebbles']
- */
- var at = restParam(function (collection, props) {
- return baseAt(collection, baseFlatten(props));
- });
- /**
- * Creates an object composed of keys generated from the results of running
- * each element of `collection` through `iteratee`. The corresponding value
- * of each key is the number of times the key was returned by `iteratee`.
- * The `iteratee` is bound to `thisArg` and invoked with three arguments:
- * (value, index|key, collection).
- *
- * If a property name is provided for `iteratee` the created `_.property`
- * style callback returns the property value of the given element.
- *
- * If a value is also provided for `thisArg` the created `_.matchesProperty`
- * style callback returns `true` for elements that have a matching property
- * value, else `false`.
- *
- * If an object is provided for `iteratee` the created `_.matches` style
- * callback returns `true` for elements that have the properties of the given
- * object, else `false`.
- *
- * @static
- * @memberOf _
- * @category Collection
- * @param {Array|Object|string} collection The collection to iterate over.
- * @param {Function|Object|string} [iteratee=_.identity] The function invoked
- * per iteration.
- * @param {*} [thisArg] The `this` binding of `iteratee`.
- * @returns {Object} Returns the composed aggregate object.
- * @example
- *
- * _.countBy([4.3, 6.1, 6.4], function(n) {
- * return Math.floor(n);
- * });
- * // => { '4': 1, '6': 2 }
- *
- * _.countBy([4.3, 6.1, 6.4], function(n) {
- * return this.floor(n);
- * }, Math);
- * // => { '4': 1, '6': 2 }
- *
- * _.countBy(['one', 'two', 'three'], 'length');
- * // => { '3': 2, '5': 1 }
- */
- var countBy = createAggregator(function (result, value, key) {
- hasOwnProperty.call(result, key) ? ++result[key] : result[key] = 1;
- });
- /**
- * Checks if `predicate` returns truthy for **all** elements of `collection`.
- * The predicate is bound to `thisArg` and invoked with three arguments:
- * (value, index|key, collection).
- *
- * If a property name is provided for `predicate` the created `_.property`
- * style callback returns the property value of the given element.
- *
- * If a value is also provided for `thisArg` the created `_.matchesProperty`
- * style callback returns `true` for elements that have a matching property
- * value, else `false`.
- *
- * If an object is provided for `predicate` the created `_.matches` style
- * callback returns `true` for elements that have the properties of the given
- * object, else `false`.
- *
- * @static
- * @memberOf _
- * @alias all
- * @category Collection
- * @param {Array|Object|string} collection The collection to iterate over.
- * @param {Function|Object|string} [predicate=_.identity] The function invoked
- * per iteration.
- * @param {*} [thisArg] The `this` binding of `predicate`.
- * @returns {boolean} Returns `true` if all elements pass the predicate check,
- * else `false`.
- * @example
- *
- * _.every([true, 1, null, 'yes'], Boolean);
- * // => false
- *
- * var users = [
- * { 'user': 'barney', 'active': false },
- * { 'user': 'fred', 'active': false }
- * ];
- *
- * // using the `_.matches` callback shorthand
- * _.every(users, { 'user': 'barney', 'active': false });
- * // => false
- *
- * // using the `_.matchesProperty` callback shorthand
- * _.every(users, 'active', false);
- * // => true
- *
- * // using the `_.property` callback shorthand
- * _.every(users, 'active');
- * // => false
- */
- function every(collection, predicate, thisArg) {
- var func = isArray(collection) ? arrayEvery : baseEvery;
- if (thisArg && isIterateeCall(collection, predicate, thisArg)) {
- predicate = undefined;
- }
- if (typeof predicate != 'function' || thisArg !== undefined) {
- predicate = getCallback(predicate, thisArg, 3);
- }
- return func(collection, predicate);
- }
- /**
- * Iterates over elements of `collection`, returning an array of all elements
- * `predicate` returns truthy for. The predicate is bound to `thisArg` and
- * invoked with three arguments: (value, index|key, collection).
- *
- * If a property name is provided for `predicate` the created `_.property`
- * style callback returns the property value of the given element.
- *
- * If a value is also provided for `thisArg` the created `_.matchesProperty`
- * style callback returns `true` for elements that have a matching property
- * value, else `false`.
- *
- * If an object is provided for `predicate` the created `_.matches` style
- * callback returns `true` for elements that have the properties of the given
- * object, else `false`.
- *
- * @static
- * @memberOf _
- * @alias select
- * @category Collection
- * @param {Array|Object|string} collection The collection to iterate over.
- * @param {Function|Object|string} [predicate=_.identity] The function invoked
- * per iteration.
- * @param {*} [thisArg] The `this` binding of `predicate`.
- * @returns {Array} Returns the new filtered array.
- * @example
- *
- * _.filter([4, 5, 6], function(n) {
- * return n % 2 == 0;
- * });
- * // => [4, 6]
- *
- * var users = [
- * { 'user': 'barney', 'age': 36, 'active': true },
- * { 'user': 'fred', 'age': 40, 'active': false }
- * ];
- *
- * // using the `_.matches` callback shorthand
- * _.pluck(_.filter(users, { 'age': 36, 'active': true }), 'user');
- * // => ['barney']
- *
- * // using the `_.matchesProperty` callback shorthand
- * _.pluck(_.filter(users, 'active', false), 'user');
- * // => ['fred']
- *
- * // using the `_.property` callback shorthand
- * _.pluck(_.filter(users, 'active'), 'user');
- * // => ['barney']
- */
- function filter(collection, predicate, thisArg) {
- var func = isArray(collection) ? arrayFilter : baseFilter;
- predicate = getCallback(predicate, thisArg, 3);
- return func(collection, predicate);
- }
- /**
- * Iterates over elements of `collection`, returning the first element
- * `predicate` returns truthy for. The predicate is bound to `thisArg` and
- * invoked with three arguments: (value, index|key, collection).
- *
- * If a property name is provided for `predicate` the created `_.property`
- * style callback returns the property value of the given element.
- *
- * If a value is also provided for `thisArg` the created `_.matchesProperty`
- * style callback returns `true` for elements that have a matching property
- * value, else `false`.
- *
- * If an object is provided for `predicate` the created `_.matches` style
- * callback returns `true` for elements that have the properties of the given
- * object, else `false`.
- *
- * @static
- * @memberOf _
- * @alias detect
- * @category Collection
- * @param {Array|Object|string} collection The collection to search.
- * @param {Function|Object|string} [predicate=_.identity] The function invoked
- * per iteration.
- * @param {*} [thisArg] The `this` binding of `predicate`.
- * @returns {*} Returns the matched element, else `undefined`.
- * @example
- *
- * var users = [
- * { 'user': 'barney', 'age': 36, 'active': true },
- * { 'user': 'fred', 'age': 40, 'active': false },
- * { 'user': 'pebbles', 'age': 1, 'active': true }
- * ];
- *
- * _.result(_.find(users, function(chr) {
- * return chr.age < 40;
- * }), 'user');
- * // => 'barney'
- *
- * // using the `_.matches` callback shorthand
- * _.result(_.find(users, { 'age': 1, 'active': true }), 'user');
- * // => 'pebbles'
- *
- * // using the `_.matchesProperty` callback shorthand
- * _.result(_.find(users, 'active', false), 'user');
- * // => 'fred'
- *
- * // using the `_.property` callback shorthand
- * _.result(_.find(users, 'active'), 'user');
- * // => 'barney'
- */
- var find = createFind(baseEach);
- /**
- * This method is like `_.find` except that it iterates over elements of
- * `collection` from right to left.
- *
- * @static
- * @memberOf _
- * @category Collection
- * @param {Array|Object|string} collection The collection to search.
- * @param {Function|Object|string} [predicate=_.identity] The function invoked
- * per iteration.
- * @param {*} [thisArg] The `this` binding of `predicate`.
- * @returns {*} Returns the matched element, else `undefined`.
- * @example
- *
- * _.findLast([1, 2, 3, 4], function(n) {
- * return n % 2 == 1;
- * });
- * // => 3
- */
- var findLast = createFind(baseEachRight, true);
- /**
- * Performs a deep comparison between each element in `collection` and the
- * source object, returning the first element that has equivalent property
- * values.
- *
- * **Note:** This method supports comparing arrays, booleans, `Date` objects,
- * numbers, `Object` objects, regexes, and strings. Objects are compared by
- * their own, not inherited, enumerable properties. For comparing a single
- * own or inherited property value see `_.matchesProperty`.
- *
- * @static
- * @memberOf _
- * @category Collection
- * @param {Array|Object|string} collection The collection to search.
- * @param {Object} source The object of property values to match.
- * @returns {*} Returns the matched element, else `undefined`.
- * @example
- *
- * var users = [
- * { 'user': 'barney', 'age': 36, 'active': true },
- * { 'user': 'fred', 'age': 40, 'active': false }
- * ];
- *
- * _.result(_.findWhere(users, { 'age': 36, 'active': true }), 'user');
- * // => 'barney'
- *
- * _.result(_.findWhere(users, { 'age': 40, 'active': false }), 'user');
- * // => 'fred'
- */
- function findWhere(collection, source) {
- return find(collection, baseMatches(source));
- }
- /**
- * Iterates over elements of `collection` invoking `iteratee` for each element.
- * The `iteratee` is bound to `thisArg` and invoked with three arguments:
- * (value, index|key, collection). Iteratee functions may exit iteration early
- * by explicitly returning `false`.
- *
- * **Note:** As with other "Collections" methods, objects with a "length" property
- * are iterated like arrays. To avoid this behavior `_.forIn` or `_.forOwn`
- * may be used for object iteration.
- *
- * @static
- * @memberOf _
- * @alias each
- * @category Collection
- * @param {Array|Object|string} collection The collection to iterate over.
- * @param {Function} [iteratee=_.identity] The function invoked per iteration.
- * @param {*} [thisArg] The `this` binding of `iteratee`.
- * @returns {Array|Object|string} Returns `collection`.
- * @example
- *
- * _([1, 2]).forEach(function(n) {
- * console.log(n);
- * }).value();
- * // => logs each value from left to right and returns the array
- *
- * _.forEach({ 'a': 1, 'b': 2 }, function(n, key) {
- * console.log(n, key);
- * });
- * // => logs each value-key pair and returns the object (iteration order is not guaranteed)
- */
- var forEach = createForEach(arrayEach, baseEach);
- /**
- * This method is like `_.forEach` except that it iterates over elements of
- * `collection` from right to left.
- *
- * @static
- * @memberOf _
- * @alias eachRight
- * @category Collection
- * @param {Array|Object|string} collection The collection to iterate over.
- * @param {Function} [iteratee=_.identity] The function invoked per iteration.
- * @param {*} [thisArg] The `this` binding of `iteratee`.
- * @returns {Array|Object|string} Returns `collection`.
- * @example
- *
- * _([1, 2]).forEachRight(function(n) {
- * console.log(n);
- * }).value();
- * // => logs each value from right to left and returns the array
- */
- var forEachRight = createForEach(arrayEachRight, baseEachRight);
- /**
- * Creates an object composed of keys generated from the results of running
- * each element of `collection` through `iteratee`. The corresponding value
- * of each key is an array of the elements responsible for generating the key.
- * The `iteratee` is bound to `thisArg` and invoked with three arguments:
- * (value, index|key, collection).
- *
- * If a property name is provided for `iteratee` the created `_.property`
- * style callback returns the property value of the given element.
- *
- * If a value is also provided for `thisArg` the created `_.matchesProperty`
- * style callback returns `true` for elements that have a matching property
- * value, else `false`.
- *
- * If an object is provided for `iteratee` the created `_.matches` style
- * callback returns `true` for elements that have the properties of the given
- * object, else `false`.
- *
- * @static
- * @memberOf _
- * @category Collection
- * @param {Array|Object|string} collection The collection to iterate over.
- * @param {Function|Object|string} [iteratee=_.identity] The function invoked
- * per iteration.
- * @param {*} [thisArg] The `this` binding of `iteratee`.
- * @returns {Object} Returns the composed aggregate object.
- * @example
- *
- * _.groupBy([4.2, 6.1, 6.4], function(n) {
- * return Math.floor(n);
- * });
- * // => { '4': [4.2], '6': [6.1, 6.4] }
- *
- * _.groupBy([4.2, 6.1, 6.4], function(n) {
- * return this.floor(n);
- * }, Math);
- * // => { '4': [4.2], '6': [6.1, 6.4] }
- *
- * // using the `_.property` callback shorthand
- * _.groupBy(['one', 'two', 'three'], 'length');
- * // => { '3': ['one', 'two'], '5': ['three'] }
- */
- var groupBy = createAggregator(function (result, value, key) {
- if (hasOwnProperty.call(result, key)) {
- result[key].push(value);
- } else {
- result[key] = [value];
- }
- });
- /**
- * Checks if `target` is in `collection` using
- * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
- * for equality comparisons. If `fromIndex` is negative, it's used as the offset
- * from the end of `collection`.
- *
- * @static
- * @memberOf _
- * @alias contains, include
- * @category Collection
- * @param {Array|Object|string} collection The collection to search.
- * @param {*} target The value to search for.
- * @param {number} [fromIndex=0] The index to search from.
- * @param- {Object} [guard] Enables use as a callback for functions like `_.reduce`.
- * @returns {boolean} Returns `true` if a matching element is found, else `false`.
- * @example
- *
- * _.includes([1, 2, 3], 1);
- * // => true
- *
- * _.includes([1, 2, 3], 1, 2);
- * // => false
- *
- * _.includes({ 'user': 'fred', 'age': 40 }, 'fred');
- * // => true
- *
- * _.includes('pebbles', 'eb');
- * // => true
- */
- function includes(collection, target, fromIndex, guard) {
- var length = collection ? getLength(collection) : 0;
- if (!isLength(length)) {
- collection = values(collection);
- length = collection.length;
- }
- if (typeof fromIndex != 'number' || guard && isIterateeCall(target, fromIndex, guard)) {
- fromIndex = 0;
- } else {
- fromIndex = fromIndex < 0 ? nativeMax(length + fromIndex, 0) : fromIndex || 0;
- }
- return typeof collection == 'string' || !isArray(collection) && isString(collection) ? fromIndex <= length && collection.indexOf(target, fromIndex) > -1 : !!length && getIndexOf(collection, target, fromIndex) > -1;
- }
- /**
- * Creates an object composed of keys generated from the results of running
- * each element of `collection` through `iteratee`. The corresponding value
- * of each key is the last element responsible for generating the key. The
- * iteratee function is bound to `thisArg` and invoked with three arguments:
- * (value, index|key, collection).
- *
- * If a property name is provided for `iteratee` the created `_.property`
- * style callback returns the property value of the given element.
- *
- * If a value is also provided for `thisArg` the created `_.matchesProperty`
- * style callback returns `true` for elements that have a matching property
- * value, else `false`.
- *
- * If an object is provided for `iteratee` the created `_.matches` style
- * callback returns `true` for elements that have the properties of the given
- * object, else `false`.
- *
- * @static
- * @memberOf _
- * @category Collection
- * @param {Array|Object|string} collection The collection to iterate over.
- * @param {Function|Object|string} [iteratee=_.identity] The function invoked
- * per iteration.
- * @param {*} [thisArg] The `this` binding of `iteratee`.
- * @returns {Object} Returns the composed aggregate object.
- * @example
- *
- * var keyData = [
- * { 'dir': 'left', 'code': 97 },
- * { 'dir': 'right', 'code': 100 }
- * ];
- *
- * _.indexBy(keyData, 'dir');
- * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } }
- *
- * _.indexBy(keyData, function(object) {
- * return String.fromCharCode(object.code);
- * });
- * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } }
- *
- * _.indexBy(keyData, function(object) {
- * return this.fromCharCode(object.code);
- * }, String);
- * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } }
- */
- var indexBy = createAggregator(function (result, value, key) {
- result[key] = value;
- });
- /**
- * Invokes the method at `path` of each element in `collection`, returning
- * an array of the results of each invoked method. Any additional arguments
- * are provided to each invoked method. If `methodName` is a function it's
- * invoked for, and `this` bound to, each element in `collection`.
- *
- * @static
- * @memberOf _
- * @category Collection
- * @param {Array|Object|string} collection The collection to iterate over.
- * @param {Array|Function|string} path The path of the method to invoke or
- * the function invoked per iteration.
- * @param {...*} [args] The arguments to invoke the method with.
- * @returns {Array} Returns the array of results.
- * @example
- *
- * _.invoke([[5, 1, 7], [3, 2, 1]], 'sort');
- * // => [[1, 5, 7], [1, 2, 3]]
- *
- * _.invoke([123, 456], String.prototype.split, '');
- * // => [['1', '2', '3'], ['4', '5', '6']]
- */
- var invoke = restParam(function (collection, path, args) {
- var index = -1, isFunc = typeof path == 'function', isProp = isKey(path), result = isArrayLike(collection) ? Array(collection.length) : [];
- baseEach(collection, function (value) {
- var func = isFunc ? path : isProp && value != null ? value[path] : undefined;
- result[++index] = func ? func.apply(value, args) : invokePath(value, path, args);
- });
- return result;
- });
- /**
- * Creates an array of values by running each element in `collection` through
- * `iteratee`. The `iteratee` is bound to `thisArg` and invoked with three
- * arguments: (value, index|key, collection).
- *
- * If a property name is provided for `iteratee` the created `_.property`
- * style callback returns the property value of the given element.
- *
- * If a value is also provided for `thisArg` the created `_.matchesProperty`
- * style callback returns `true` for elements that have a matching property
- * value, else `false`.
- *
- * If an object is provided for `iteratee` the created `_.matches` style
- * callback returns `true` for elements that have the properties of the given
- * object, else `false`.
- *
- * Many lodash methods are guarded to work as iteratees for methods like
- * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`.
- *
- * The guarded methods are:
- * `ary`, `callback`, `chunk`, `clone`, `create`, `curry`, `curryRight`,
- * `drop`, `dropRight`, `every`, `fill`, `flatten`, `invert`, `max`, `min`,
- * `parseInt`, `slice`, `sortBy`, `take`, `takeRight`, `template`, `trim`,
- * `trimLeft`, `trimRight`, `trunc`, `random`, `range`, `sample`, `some`,
- * `sum`, `uniq`, and `words`
- *
- * @static
- * @memberOf _
- * @alias collect
- * @category Collection
- * @param {Array|Object|string} collection The collection to iterate over.
- * @param {Function|Object|string} [iteratee=_.identity] The function invoked
- * per iteration.
- * @param {*} [thisArg] The `this` binding of `iteratee`.
- * @returns {Array} Returns the new mapped array.
- * @example
- *
- * function timesThree(n) {
- * return n * 3;
- * }
- *
- * _.map([1, 2], timesThree);
- * // => [3, 6]
- *
- * _.map({ 'a': 1, 'b': 2 }, timesThree);
- * // => [3, 6] (iteration order is not guaranteed)
- *
- * var users = [
- * { 'user': 'barney' },
- * { 'user': 'fred' }
- * ];
- *
- * // using the `_.property` callback shorthand
- * _.map(users, 'user');
- * // => ['barney', 'fred']
- */
- function map(collection, iteratee, thisArg) {
- var func = isArray(collection) ? arrayMap : baseMap;
- iteratee = getCallback(iteratee, thisArg, 3);
- return func(collection, iteratee);
- }
- /**
- * Creates an array of elements split into two groups, the first of which
- * contains elements `predicate` returns truthy for, while the second of which
- * contains elements `predicate` returns falsey for. The predicate is bound
- * to `thisArg` and invoked with three arguments: (value, index|key, collection).
- *
- * If a property name is provided for `predicate` the created `_.property`
- * style callback returns the property value of the given element.
- *
- * If a value is also provided for `thisArg` the created `_.matchesProperty`
- * style callback returns `true` for elements that have a matching property
- * value, else `false`.
- *
- * If an object is provided for `predicate` the created `_.matches` style
- * callback returns `true` for elements that have the properties of the given
- * object, else `false`.
- *
- * @static
- * @memberOf _
- * @category Collection
- * @param {Array|Object|string} collection The collection to iterate over.
- * @param {Function|Object|string} [predicate=_.identity] The function invoked
- * per iteration.
- * @param {*} [thisArg] The `this` binding of `predicate`.
- * @returns {Array} Returns the array of grouped elements.
- * @example
- *
- * _.partition([1, 2, 3], function(n) {
- * return n % 2;
- * });
- * // => [[1, 3], [2]]
- *
- * _.partition([1.2, 2.3, 3.4], function(n) {
- * return this.floor(n) % 2;
- * }, Math);
- * // => [[1.2, 3.4], [2.3]]
- *
- * var users = [
- * { 'user': 'barney', 'age': 36, 'active': false },
- * { 'user': 'fred', 'age': 40, 'active': true },
- * { 'user': 'pebbles', 'age': 1, 'active': false }
- * ];
- *
- * var mapper = function(array) {
- * return _.pluck(array, 'user');
- * };
- *
- * // using the `_.matches` callback shorthand
- * _.map(_.partition(users, { 'age': 1, 'active': false }), mapper);
- * // => [['pebbles'], ['barney', 'fred']]
- *
- * // using the `_.matchesProperty` callback shorthand
- * _.map(_.partition(users, 'active', false), mapper);
- * // => [['barney', 'pebbles'], ['fred']]
- *
- * // using the `_.property` callback shorthand
- * _.map(_.partition(users, 'active'), mapper);
- * // => [['fred'], ['barney', 'pebbles']]
- */
- var partition = createAggregator(function (result, value, key) {
- result[key ? 0 : 1].push(value);
- }, function () {
- return [
- [],
- []
- ];
- });
- /**
- * Gets the property value of `path` from all elements in `collection`.
- *
- * @static
- * @memberOf _
- * @category Collection
- * @param {Array|Object|string} collection The collection to iterate over.
- * @param {Array|string} path The path of the property to pluck.
- * @returns {Array} Returns the property values.
- * @example
- *
- * var users = [
- * { 'user': 'barney', 'age': 36 },
- * { 'user': 'fred', 'age': 40 }
- * ];
- *
- * _.pluck(users, 'user');
- * // => ['barney', 'fred']
- *
- * var userIndex = _.indexBy(users, 'user');
- * _.pluck(userIndex, 'age');
- * // => [36, 40] (iteration order is not guaranteed)
- */
- function pluck(collection, path) {
- return map(collection, property(path));
- }
- /**
- * Reduces `collection` to a value which is the accumulated result of running
- * each element in `collection` through `iteratee`, where each successive
- * invocation is supplied the return value of the previous. If `accumulator`
- * is not provided the first element of `collection` is used as the initial
- * value. The `iteratee` is bound to `thisArg` and invoked with four arguments:
- * (accumulator, value, index|key, collection).
- *
- * Many lodash methods are guarded to work as iteratees for methods like
- * `_.reduce`, `_.reduceRight`, and `_.transform`.
- *
- * The guarded methods are:
- * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `sortByAll`,
- * and `sortByOrder`
- *
- * @static
- * @memberOf _
- * @alias foldl, inject
- * @category Collection
- * @param {Array|Object|string} collection The collection to iterate over.
- * @param {Function} [iteratee=_.identity] The function invoked per iteration.
- * @param {*} [accumulator] The initial value.
- * @param {*} [thisArg] The `this` binding of `iteratee`.
- * @returns {*} Returns the accumulated value.
- * @example
- *
- * _.reduce([1, 2], function(total, n) {
- * return total + n;
- * });
- * // => 3
- *
- * _.reduce({ 'a': 1, 'b': 2 }, function(result, n, key) {
- * result[key] = n * 3;
- * return result;
- * }, {});
- * // => { 'a': 3, 'b': 6 } (iteration order is not guaranteed)
- */
- var reduce = createReduce(arrayReduce, baseEach);
- /**
- * This method is like `_.reduce` except that it iterates over elements of
- * `collection` from right to left.
- *
- * @static
- * @memberOf _
- * @alias foldr
- * @category Collection
- * @param {Array|Object|string} collection The collection to iterate over.
- * @param {Function} [iteratee=_.identity] The function invoked per iteration.
- * @param {*} [accumulator] The initial value.
- * @param {*} [thisArg] The `this` binding of `iteratee`.
- * @returns {*} Returns the accumulated value.
- * @example
- *
- * var array = [[0, 1], [2, 3], [4, 5]];
- *
- * _.reduceRight(array, function(flattened, other) {
- * return flattened.concat(other);
- * }, []);
- * // => [4, 5, 2, 3, 0, 1]
- */
- var reduceRight = createReduce(arrayReduceRight, baseEachRight);
- /**
- * The opposite of `_.filter`; this method returns the elements of `collection`
- * that `predicate` does **not** return truthy for.
- *
- * @static
- * @memberOf _
- * @category Collection
- * @param {Array|Object|string} collection The collection to iterate over.
- * @param {Function|Object|string} [predicate=_.identity] The function invoked
- * per iteration.
- * @param {*} [thisArg] The `this` binding of `predicate`.
- * @returns {Array} Returns the new filtered array.
- * @example
- *
- * _.reject([1, 2, 3, 4], function(n) {
- * return n % 2 == 0;
- * });
- * // => [1, 3]
- *
- * var users = [
- * { 'user': 'barney', 'age': 36, 'active': false },
- * { 'user': 'fred', 'age': 40, 'active': true }
- * ];
- *
- * // using the `_.matches` callback shorthand
- * _.pluck(_.reject(users, { 'age': 40, 'active': true }), 'user');
- * // => ['barney']
- *
- * // using the `_.matchesProperty` callback shorthand
- * _.pluck(_.reject(users, 'active', false), 'user');
- * // => ['fred']
- *
- * // using the `_.property` callback shorthand
- * _.pluck(_.reject(users, 'active'), 'user');
- * // => ['barney']
- */
- function reject(collection, predicate, thisArg) {
- var func = isArray(collection) ? arrayFilter : baseFilter;
- predicate = getCallback(predicate, thisArg, 3);
- return func(collection, function (value, index, collection) {
- return !predicate(value, index, collection);
- });
- }
- /**
- * Gets a random element or `n` random elements from a collection.
- *
- * @static
- * @memberOf _
- * @category Collection
- * @param {Array|Object|string} collection The collection to sample.
- * @param {number} [n] The number of elements to sample.
- * @param- {Object} [guard] Enables use as a callback for functions like `_.map`.
- * @returns {*} Returns the random sample(s).
- * @example
- *
- * _.sample([1, 2, 3, 4]);
- * // => 2
- *
- * _.sample([1, 2, 3, 4], 2);
- * // => [3, 1]
- */
- function sample(collection, n, guard) {
- if (guard ? isIterateeCall(collection, n, guard) : n == null) {
- collection = toIterable(collection);
- var length = collection.length;
- return length > 0 ? collection[baseRandom(0, length - 1)] : undefined;
- }
- var index = -1, result = toArray(collection), length = result.length, lastIndex = length - 1;
- n = nativeMin(n < 0 ? 0 : +n || 0, length);
- while (++index < n) {
- var rand = baseRandom(index, lastIndex), value = result[rand];
- result[rand] = result[index];
- result[index] = value;
- }
- result.length = n;
- return result;
- }
- /**
- * Creates an array of shuffled values, using a version of the
- * [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher-Yates_shuffle).
- *
- * @static
- * @memberOf _
- * @category Collection
- * @param {Array|Object|string} collection The collection to shuffle.
- * @returns {Array} Returns the new shuffled array.
- * @example
- *
- * _.shuffle([1, 2, 3, 4]);
- * // => [4, 1, 3, 2]
- */
- function shuffle(collection) {
- return sample(collection, POSITIVE_INFINITY);
- }
- /**
- * Gets the size of `collection` by returning its length for array-like
- * values or the number of own enumerable properties for objects.
- *
- * @static
- * @memberOf _
- * @category Collection
- * @param {Array|Object|string} collection The collection to inspect.
- * @returns {number} Returns the size of `collection`.
- * @example
- *
- * _.size([1, 2, 3]);
- * // => 3
- *
- * _.size({ 'a': 1, 'b': 2 });
- * // => 2
- *
- * _.size('pebbles');
- * // => 7
- */
- function size(collection) {
- var length = collection ? getLength(collection) : 0;
- return isLength(length) ? length : keys(collection).length;
- }
- /**
- * Checks if `predicate` returns truthy for **any** element of `collection`.
- * The function returns as soon as it finds a passing value and does not iterate
- * over the entire collection. The predicate is bound to `thisArg` and invoked
- * with three arguments: (value, index|key, collection).
- *
- * If a property name is provided for `predicate` the created `_.property`
- * style callback returns the property value of the given element.
- *
- * If a value is also provided for `thisArg` the created `_.matchesProperty`
- * style callback returns `true` for elements that have a matching property
- * value, else `false`.
- *
- * If an object is provided for `predicate` the created `_.matches` style
- * callback returns `true` for elements that have the properties of the given
- * object, else `false`.
- *
- * @static
- * @memberOf _
- * @alias any
- * @category Collection
- * @param {Array|Object|string} collection The collection to iterate over.
- * @param {Function|Object|string} [predicate=_.identity] The function invoked
- * per iteration.
- * @param {*} [thisArg] The `this` binding of `predicate`.
- * @returns {boolean} Returns `true` if any element passes the predicate check,
- * else `false`.
- * @example
- *
- * _.some([null, 0, 'yes', false], Boolean);
- * // => true
- *
- * var users = [
- * { 'user': 'barney', 'active': true },
- * { 'user': 'fred', 'active': false }
- * ];
- *
- * // using the `_.matches` callback shorthand
- * _.some(users, { 'user': 'barney', 'active': false });
- * // => false
- *
- * // using the `_.matchesProperty` callback shorthand
- * _.some(users, 'active', false);
- * // => true
- *
- * // using the `_.property` callback shorthand
- * _.some(users, 'active');
- * // => true
- */
- function some(collection, predicate, thisArg) {
- var func = isArray(collection) ? arraySome : baseSome;
- if (thisArg && isIterateeCall(collection, predicate, thisArg)) {
- predicate = undefined;
- }
- if (typeof predicate != 'function' || thisArg !== undefined) {
- predicate = getCallback(predicate, thisArg, 3);
- }
- return func(collection, predicate);
- }
- /**
- * Creates an array of elements, sorted in ascending order by the results of
- * running each element in a collection through `iteratee`. This method performs
- * a stable sort, that is, it preserves the original sort order of equal elements.
- * The `iteratee` is bound to `thisArg` and invoked with three arguments:
- * (value, index|key, collection).
- *
- * If a property name is provided for `iteratee` the created `_.property`
- * style callback returns the property value of the given element.
- *
- * If a value is also provided for `thisArg` the created `_.matchesProperty`
- * style callback returns `true` for elements that have a matching property
- * value, else `false`.
- *
- * If an object is provided for `iteratee` the created `_.matches` style
- * callback returns `true` for elements that have the properties of the given
- * object, else `false`.
- *
- * @static
- * @memberOf _
- * @category Collection
- * @param {Array|Object|string} collection The collection to iterate over.
- * @param {Function|Object|string} [iteratee=_.identity] The function invoked
- * per iteration.
- * @param {*} [thisArg] The `this` binding of `iteratee`.
- * @returns {Array} Returns the new sorted array.
- * @example
- *
- * _.sortBy([1, 2, 3], function(n) {
- * return Math.sin(n);
- * });
- * // => [3, 1, 2]
- *
- * _.sortBy([1, 2, 3], function(n) {
- * return this.sin(n);
- * }, Math);
- * // => [3, 1, 2]
- *
- * var users = [
- * { 'user': 'fred' },
- * { 'user': 'pebbles' },
- * { 'user': 'barney' }
- * ];
- *
- * // using the `_.property` callback shorthand
- * _.pluck(_.sortBy(users, 'user'), 'user');
- * // => ['barney', 'fred', 'pebbles']
- */
- function sortBy(collection, iteratee, thisArg) {
- if (collection == null) {
- return [];
- }
- if (thisArg && isIterateeCall(collection, iteratee, thisArg)) {
- iteratee = undefined;
- }
- var index = -1;
- iteratee = getCallback(iteratee, thisArg, 3);
- var result = baseMap(collection, function (value, key, collection) {
- return {
- 'criteria': iteratee(value, key, collection),
- 'index': ++index,
- 'value': value
- };
- });
- return baseSortBy(result, compareAscending);
- }
- /**
- * This method is like `_.sortBy` except that it can sort by multiple iteratees
- * or property names.
- *
- * If a property name is provided for an iteratee the created `_.property`
- * style callback returns the property value of the given element.
- *
- * If an object is provided for an iteratee the created `_.matches` style
- * callback returns `true` for elements that have the properties of the given
- * object, else `false`.
- *
- * @static
- * @memberOf _
- * @category Collection
- * @param {Array|Object|string} collection The collection to iterate over.
- * @param {...(Function|Function[]|Object|Object[]|string|string[])} iteratees
- * The iteratees to sort by, specified as individual values or arrays of values.
- * @returns {Array} Returns the new sorted array.
- * @example
- *
- * var users = [
- * { 'user': 'fred', 'age': 48 },
- * { 'user': 'barney', 'age': 36 },
- * { 'user': 'fred', 'age': 42 },
- * { 'user': 'barney', 'age': 34 }
- * ];
- *
- * _.map(_.sortByAll(users, ['user', 'age']), _.values);
- * // => [['barney', 34], ['barney', 36], ['fred', 42], ['fred', 48]]
- *
- * _.map(_.sortByAll(users, 'user', function(chr) {
- * return Math.floor(chr.age / 10);
- * }), _.values);
- * // => [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 42]]
- */
- var sortByAll = restParam(function (collection, iteratees) {
- if (collection == null) {
- return [];
- }
- var guard = iteratees[2];
- if (guard && isIterateeCall(iteratees[0], iteratees[1], guard)) {
- iteratees.length = 1;
- }
- return baseSortByOrder(collection, baseFlatten(iteratees), []);
- });
- /**
- * This method is like `_.sortByAll` except that it allows specifying the
- * sort orders of the iteratees to sort by. If `orders` is unspecified, all
- * values are sorted in ascending order. Otherwise, a value is sorted in
- * ascending order if its corresponding order is "asc", and descending if "desc".
- *
- * If a property name is provided for an iteratee the created `_.property`
- * style callback returns the property value of the given element.
- *
- * If an object is provided for an iteratee the created `_.matches` style
- * callback returns `true` for elements that have the properties of the given
- * object, else `false`.
- *
- * @static
- * @memberOf _
- * @category Collection
- * @param {Array|Object|string} collection The collection to iterate over.
- * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by.
- * @param {boolean[]} [orders] The sort orders of `iteratees`.
- * @param- {Object} [guard] Enables use as a callback for functions like `_.reduce`.
- * @returns {Array} Returns the new sorted array.
- * @example
- *
- * var users = [
- * { 'user': 'fred', 'age': 48 },
- * { 'user': 'barney', 'age': 34 },
- * { 'user': 'fred', 'age': 42 },
- * { 'user': 'barney', 'age': 36 }
- * ];
- *
- * // sort by `user` in ascending order and by `age` in descending order
- * _.map(_.sortByOrder(users, ['user', 'age'], ['asc', 'desc']), _.values);
- * // => [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 42]]
- */
- function sortByOrder(collection, iteratees, orders, guard) {
- if (collection == null) {
- return [];
- }
- if (guard && isIterateeCall(iteratees, orders, guard)) {
- orders = undefined;
- }
- if (!isArray(iteratees)) {
- iteratees = iteratees == null ? [] : [iteratees];
- }
- if (!isArray(orders)) {
- orders = orders == null ? [] : [orders];
- }
- return baseSortByOrder(collection, iteratees, orders);
- }
- /**
- * Performs a deep comparison between each element in `collection` and the
- * source object, returning an array of all elements that have equivalent
- * property values.
- *
- * **Note:** This method supports comparing arrays, booleans, `Date` objects,
- * numbers, `Object` objects, regexes, and strings. Objects are compared by
- * their own, not inherited, enumerable properties. For comparing a single
- * own or inherited property value see `_.matchesProperty`.
- *
- * @static
- * @memberOf _
- * @category Collection
- * @param {Array|Object|string} collection The collection to search.
- * @param {Object} source The object of property values to match.
- * @returns {Array} Returns the new filtered array.
- * @example
- *
- * var users = [
- * { 'user': 'barney', 'age': 36, 'active': false, 'pets': ['hoppy'] },
- * { 'user': 'fred', 'age': 40, 'active': true, 'pets': ['baby puss', 'dino'] }
- * ];
- *
- * _.pluck(_.where(users, { 'age': 36, 'active': false }), 'user');
- * // => ['barney']
- *
- * _.pluck(_.where(users, { 'pets': ['dino'] }), 'user');
- * // => ['fred']
- */
- function where(collection, source) {
- return filter(collection, baseMatches(source));
- }
- /*------------------------------------------------------------------------*/
- /**
- * Gets the number of milliseconds that have elapsed since the Unix epoch
- * (1 January 1970 00:00:00 UTC).
- *
- * @static
- * @memberOf _
- * @category Date
- * @example
- *
- * _.defer(function(stamp) {
- * console.log(_.now() - stamp);
- * }, _.now());
- * // => logs the number of milliseconds it took for the deferred function to be invoked
- */
- var now = nativeNow || function () {
- return new Date().getTime();
- };
- /*------------------------------------------------------------------------*/
- /**
- * The opposite of `_.before`; this method creates a function that invokes
- * `func` once it's called `n` or more times.
- *
- * @static
- * @memberOf _
- * @category Function
- * @param {number} n The number of calls before `func` is invoked.
- * @param {Function} func The function to restrict.
- * @returns {Function} Returns the new restricted function.
- * @example
- *
- * var saves = ['profile', 'settings'];
- *
- * var done = _.after(saves.length, function() {
- * console.log('done saving!');
- * });
- *
- * _.forEach(saves, function(type) {
- * asyncSave({ 'type': type, 'complete': done });
- * });
- * // => logs 'done saving!' after the two async saves have completed
- */
- function after(n, func) {
- if (typeof func != 'function') {
- if (typeof n == 'function') {
- var temp = n;
- n = func;
- func = temp;
- } else {
- throw new TypeError(FUNC_ERROR_TEXT);
- }
- }
- n = nativeIsFinite(n = +n) ? n : 0;
- return function () {
- if (--n < 1) {
- return func.apply(this, arguments);
- }
- };
- }
- /**
- * Creates a function that accepts up to `n` arguments ignoring any
- * additional arguments.
- *
- * @static
- * @memberOf _
- * @category Function
- * @param {Function} func The function to cap arguments for.
- * @param {number} [n=func.length] The arity cap.
- * @param- {Object} [guard] Enables use as a callback for functions like `_.map`.
- * @returns {Function} Returns the new function.
- * @example
- *
- * _.map(['6', '8', '10'], _.ary(parseInt, 1));
- * // => [6, 8, 10]
- */
- function ary(func, n, guard) {
- if (guard && isIterateeCall(func, n, guard)) {
- n = undefined;
- }
- n = func && n == null ? func.length : nativeMax(+n || 0, 0);
- return createWrapper(func, ARY_FLAG, undefined, undefined, undefined, undefined, n);
- }
- /**
- * Creates a function that invokes `func`, with the `this` binding and arguments
- * of the created function, while it's called less than `n` times. Subsequent
- * calls to the created function return the result of the last `func` invocation.
- *
- * @static
- * @memberOf _
- * @category Function
- * @param {number} n The number of calls at which `func` is no longer invoked.
- * @param {Function} func The function to restrict.
- * @returns {Function} Returns the new restricted function.
- * @example
- *
- * jQuery('#add').on('click', _.before(5, addContactToList));
- * // => allows adding up to 4 contacts to the list
- */
- function before(n, func) {
- var result;
- if (typeof func != 'function') {
- if (typeof n == 'function') {
- var temp = n;
- n = func;
- func = temp;
- } else {
- throw new TypeError(FUNC_ERROR_TEXT);
- }
- }
- return function () {
- if (--n > 0) {
- result = func.apply(this, arguments);
- }
- if (n <= 1) {
- func = undefined;
- }
- return result;
- };
- }
- /**
- * Creates a function that invokes `func` with the `this` binding of `thisArg`
- * and prepends any additional `_.bind` arguments to those provided to the
- * bound function.
- *
- * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds,
- * may be used as a placeholder for partially applied arguments.
- *
- * **Note:** Unlike native `Function#bind` this method does not set the "length"
- * property of bound functions.
- *
- * @static
- * @memberOf _
- * @category Function
- * @param {Function} func The function to bind.
- * @param {*} thisArg The `this` binding of `func`.
- * @param {...*} [partials] The arguments to be partially applied.
- * @returns {Function} Returns the new bound function.
- * @example
- *
- * var greet = function(greeting, punctuation) {
- * return greeting + ' ' + this.user + punctuation;
- * };
- *
- * var object = { 'user': 'fred' };
- *
- * var bound = _.bind(greet, object, 'hi');
- * bound('!');
- * // => 'hi fred!'
- *
- * // using placeholders
- * var bound = _.bind(greet, object, _, '!');
- * bound('hi');
- * // => 'hi fred!'
- */
- var bind = restParam(function (func, thisArg, partials) {
- var bitmask = BIND_FLAG;
- if (partials.length) {
- var holders = replaceHolders(partials, bind.placeholder);
- bitmask |= PARTIAL_FLAG;
- }
- return createWrapper(func, bitmask, thisArg, partials, holders);
- });
- /**
- * Binds methods of an object to the object itself, overwriting the existing
- * method. Method names may be specified as individual arguments or as arrays
- * of method names. If no method names are provided all enumerable function
- * properties, own and inherited, of `object` are bound.
- *
- * **Note:** This method does not set the "length" property of bound functions.
- *
- * @static
- * @memberOf _
- * @category Function
- * @param {Object} object The object to bind and assign the bound methods to.
- * @param {...(string|string[])} [methodNames] The object method names to bind,
- * specified as individual method names or arrays of method names.
- * @returns {Object} Returns `object`.
- * @example
- *
- * var view = {
- * 'label': 'docs',
- * 'onClick': function() {
- * console.log('clicked ' + this.label);
- * }
- * };
- *
- * _.bindAll(view);
- * jQuery('#docs').on('click', view.onClick);
- * // => logs 'clicked docs' when the element is clicked
- */
- var bindAll = restParam(function (object, methodNames) {
- methodNames = methodNames.length ? baseFlatten(methodNames) : functions(object);
- var index = -1, length = methodNames.length;
- while (++index < length) {
- var key = methodNames[index];
- object[key] = createWrapper(object[key], BIND_FLAG, object);
- }
- return object;
- });
- /**
- * Creates a function that invokes the method at `object[key]` and prepends
- * any additional `_.bindKey` arguments to those provided to the bound function.
- *
- * This method differs from `_.bind` by allowing bound functions to reference
- * methods that may be redefined or don't yet exist.
- * See [Peter Michaux's article](http://peter.michaux.ca/articles/lazy-function-definition-pattern)
- * for more details.
- *
- * The `_.bindKey.placeholder` value, which defaults to `_` in monolithic
- * builds, may be used as a placeholder for partially applied arguments.
- *
- * @static
- * @memberOf _
- * @category Function
- * @param {Object} object The object the method belongs to.
- * @param {string} key The key of the method.
- * @param {...*} [partials] The arguments to be partially applied.
- * @returns {Function} Returns the new bound function.
- * @example
- *
- * var object = {
- * 'user': 'fred',
- * 'greet': function(greeting, punctuation) {
- * return greeting + ' ' + this.user + punctuation;
- * }
- * };
- *
- * var bound = _.bindKey(object, 'greet', 'hi');
- * bound('!');
- * // => 'hi fred!'
- *
- * object.greet = function(greeting, punctuation) {
- * return greeting + 'ya ' + this.user + punctuation;
- * };
- *
- * bound('!');
- * // => 'hiya fred!'
- *
- * // using placeholders
- * var bound = _.bindKey(object, 'greet', _, '!');
- * bound('hi');
- * // => 'hiya fred!'
- */
- var bindKey = restParam(function (object, key, partials) {
- var bitmask = BIND_FLAG | BIND_KEY_FLAG;
- if (partials.length) {
- var holders = replaceHolders(partials, bindKey.placeholder);
- bitmask |= PARTIAL_FLAG;
- }
- return createWrapper(key, bitmask, object, partials, holders);
- });
- /**
- * Creates a function that accepts one or more arguments of `func` that when
- * called either invokes `func` returning its result, if all `func` arguments
- * have been provided, or returns a function that accepts one or more of the
- * remaining `func` arguments, and so on. The arity of `func` may be specified
- * if `func.length` is not sufficient.
- *
- * The `_.curry.placeholder` value, which defaults to `_` in monolithic builds,
- * may be used as a placeholder for provided arguments.
- *
- * **Note:** This method does not set the "length" property of curried functions.
- *
- * @static
- * @memberOf _
- * @category Function
- * @param {Function} func The function to curry.
- * @param {number} [arity=func.length] The arity of `func`.
- * @param- {Object} [guard] Enables use as a callback for functions like `_.map`.
- * @returns {Function} Returns the new curried function.
- * @example
- *
- * var abc = function(a, b, c) {
- * return [a, b, c];
- * };
- *
- * var curried = _.curry(abc);
- *
- * curried(1)(2)(3);
- * // => [1, 2, 3]
- *
- * curried(1, 2)(3);
- * // => [1, 2, 3]
- *
- * curried(1, 2, 3);
- * // => [1, 2, 3]
- *
- * // using placeholders
- * curried(1)(_, 3)(2);
- * // => [1, 2, 3]
- */
- var curry = createCurry(CURRY_FLAG);
- /**
- * This method is like `_.curry` except that arguments are applied to `func`
- * in the manner of `_.partialRight` instead of `_.partial`.
- *
- * The `_.curryRight.placeholder` value, which defaults to `_` in monolithic
- * builds, may be used as a placeholder for provided arguments.
- *
- * **Note:** This method does not set the "length" property of curried functions.
- *
- * @static
- * @memberOf _
- * @category Function
- * @param {Function} func The function to curry.
- * @param {number} [arity=func.length] The arity of `func`.
- * @param- {Object} [guard] Enables use as a callback for functions like `_.map`.
- * @returns {Function} Returns the new curried function.
- * @example
- *
- * var abc = function(a, b, c) {
- * return [a, b, c];
- * };
- *
- * var curried = _.curryRight(abc);
- *
- * curried(3)(2)(1);
- * // => [1, 2, 3]
- *
- * curried(2, 3)(1);
- * // => [1, 2, 3]
- *
- * curried(1, 2, 3);
- * // => [1, 2, 3]
- *
- * // using placeholders
- * curried(3)(1, _)(2);
- * // => [1, 2, 3]
- */
- var curryRight = createCurry(CURRY_RIGHT_FLAG);
- /**
- * Creates a debounced function that delays invoking `func` until after `wait`
- * milliseconds have elapsed since the last time the debounced function was
- * invoked. The debounced function comes with a `cancel` method to cancel
- * delayed invocations. Provide an options object to indicate that `func`
- * should be invoked on the leading and/or trailing edge of the `wait` timeout.
- * Subsequent calls to the debounced function return the result of the last
- * `func` invocation.
- *
- * **Note:** If `leading` and `trailing` options are `true`, `func` is invoked
- * on the trailing edge of the timeout only if the the debounced function is
- * invoked more than once during the `wait` timeout.
- *
- * See [David Corbacho's article](http://drupalmotion.com/article/debounce-and-throttle-visual-explanation)
- * for details over the differences between `_.debounce` and `_.throttle`.
- *
- * @static
- * @memberOf _
- * @category Function
- * @param {Function} func The function to debounce.
- * @param {number} [wait=0] The number of milliseconds to delay.
- * @param {Object} [options] The options object.
- * @param {boolean} [options.leading=false] Specify invoking on the leading
- * edge of the timeout.
- * @param {number} [options.maxWait] The maximum time `func` is allowed to be
- * delayed before it's invoked.
- * @param {boolean} [options.trailing=true] Specify invoking on the trailing
- * edge of the timeout.
- * @returns {Function} Returns the new debounced function.
- * @example
- *
- * // avoid costly calculations while the window size is in flux
- * jQuery(window).on('resize', _.debounce(calculateLayout, 150));
- *
- * // invoke `sendMail` when the click event is fired, debouncing subsequent calls
- * jQuery('#postbox').on('click', _.debounce(sendMail, 300, {
- * 'leading': true,
- * 'trailing': false
- * }));
- *
- * // ensure `batchLog` is invoked once after 1 second of debounced calls
- * var source = new EventSource('/stream');
- * jQuery(source).on('message', _.debounce(batchLog, 250, {
- * 'maxWait': 1000
- * }));
- *
- * // cancel a debounced call
- * var todoChanges = _.debounce(batchLog, 1000);
- * Object.observe(models.todo, todoChanges);
- *
- * Object.observe(models, function(changes) {
- * if (_.find(changes, { 'user': 'todo', 'type': 'delete'})) {
- * todoChanges.cancel();
- * }
- * }, ['delete']);
- *
- * // ...at some point `models.todo` is changed
- * models.todo.completed = true;
- *
- * // ...before 1 second has passed `models.todo` is deleted
- * // which cancels the debounced `todoChanges` call
- * delete models.todo;
- */
- function debounce(func, wait, options) {
- var args, maxTimeoutId, result, stamp, thisArg, timeoutId, trailingCall, lastCalled = 0, maxWait = false, trailing = true;
- if (typeof func != 'function') {
- throw new TypeError(FUNC_ERROR_TEXT);
- }
- wait = wait < 0 ? 0 : +wait || 0;
- if (options === true) {
- var leading = true;
- trailing = false;
- } else if (isObject(options)) {
- leading = !!options.leading;
- maxWait = 'maxWait' in options && nativeMax(+options.maxWait || 0, wait);
- trailing = 'trailing' in options ? !!options.trailing : trailing;
- }
- function cancel() {
- if (timeoutId) {
- clearTimeout(timeoutId);
- }
- if (maxTimeoutId) {
- clearTimeout(maxTimeoutId);
- }
- lastCalled = 0;
- maxTimeoutId = timeoutId = trailingCall = undefined;
- }
- function complete(isCalled, id) {
- if (id) {
- clearTimeout(id);
- }
- maxTimeoutId = timeoutId = trailingCall = undefined;
- if (isCalled) {
- lastCalled = now();
- result = func.apply(thisArg, args);
- if (!timeoutId && !maxTimeoutId) {
- args = thisArg = undefined;
- }
- }
- }
- function delayed() {
- var remaining = wait - (now() - stamp);
- if (remaining <= 0 || remaining > wait) {
- complete(trailingCall, maxTimeoutId);
- } else {
- timeoutId = setTimeout(delayed, remaining);
- }
- }
- function maxDelayed() {
- complete(trailing, timeoutId);
- }
- function debounced() {
- args = arguments;
- stamp = now();
- thisArg = this;
- trailingCall = trailing && (timeoutId || !leading);
- if (maxWait === false) {
- var leadingCall = leading && !timeoutId;
- } else {
- if (!maxTimeoutId && !leading) {
- lastCalled = stamp;
- }
- var remaining = maxWait - (stamp - lastCalled), isCalled = remaining <= 0 || remaining > maxWait;
- if (isCalled) {
- if (maxTimeoutId) {
- maxTimeoutId = clearTimeout(maxTimeoutId);
- }
- lastCalled = stamp;
- result = func.apply(thisArg, args);
- } else if (!maxTimeoutId) {
- maxTimeoutId = setTimeout(maxDelayed, remaining);
- }
- }
- if (isCalled && timeoutId) {
- timeoutId = clearTimeout(timeoutId);
- } else if (!timeoutId && wait !== maxWait) {
- timeoutId = setTimeout(delayed, wait);
- }
- if (leadingCall) {
- isCalled = true;
- result = func.apply(thisArg, args);
- }
- if (isCalled && !timeoutId && !maxTimeoutId) {
- args = thisArg = undefined;
- }
- return result;
- }
- debounced.cancel = cancel;
- return debounced;
- }
- /**
- * Defers invoking the `func` until the current call stack has cleared. Any
- * additional arguments are provided to `func` when it's invoked.
- *
- * @static
- * @memberOf _
- * @category Function
- * @param {Function} func The function to defer.
- * @param {...*} [args] The arguments to invoke the function with.
- * @returns {number} Returns the timer id.
- * @example
- *
- * _.defer(function(text) {
- * console.log(text);
- * }, 'deferred');
- * // logs 'deferred' after one or more milliseconds
- */
- var defer = restParam(function (func, args) {
- return baseDelay(func, 1, args);
- });
- /**
- * Invokes `func` after `wait` milliseconds. Any additional arguments are
- * provided to `func` when it's invoked.
- *
- * @static
- * @memberOf _
- * @category Function
- * @param {Function} func The function to delay.
- * @param {number} wait The number of milliseconds to delay invocation.
- * @param {...*} [args] The arguments to invoke the function with.
- * @returns {number} Returns the timer id.
- * @example
- *
- * _.delay(function(text) {
- * console.log(text);
- * }, 1000, 'later');
- * // => logs 'later' after one second
- */
- var delay = restParam(function (func, wait, args) {
- return baseDelay(func, wait, args);
- });
- /**
- * Creates a function that returns the result of invoking the provided
- * functions with the `this` binding of the created function, where each
- * successive invocation is supplied the return value of the previous.
- *
- * @static
- * @memberOf _
- * @category Function
- * @param {...Function} [funcs] Functions to invoke.
- * @returns {Function} Returns the new function.
- * @example
- *
- * function square(n) {
- * return n * n;
- * }
- *
- * var addSquare = _.flow(_.add, square);
- * addSquare(1, 2);
- * // => 9
- */
- var flow = createFlow();
- /**
- * This method is like `_.flow` except that it creates a function that
- * invokes the provided functions from right to left.
- *
- * @static
- * @memberOf _
- * @alias backflow, compose
- * @category Function
- * @param {...Function} [funcs] Functions to invoke.
- * @returns {Function} Returns the new function.
- * @example
- *
- * function square(n) {
- * return n * n;
- * }
- *
- * var addSquare = _.flowRight(square, _.add);
- * addSquare(1, 2);
- * // => 9
- */
- var flowRight = createFlow(true);
- /**
- * Creates a function that memoizes the result of `func`. If `resolver` is
- * provided it determines the cache key for storing the result based on the
- * arguments provided to the memoized function. By default, the first argument
- * provided to the memoized function is coerced to a string and used as the
- * cache key. The `func` is invoked with the `this` binding of the memoized
- * function.
- *
- * **Note:** The cache is exposed as the `cache` property on the memoized
- * function. Its creation may be customized by replacing the `_.memoize.Cache`
- * constructor with one whose instances implement the [`Map`](http://ecma-international.org/ecma-262/6.0/#sec-properties-of-the-map-prototype-object)
- * method interface of `get`, `has`, and `set`.
- *
- * @static
- * @memberOf _
- * @category Function
- * @param {Function} func The function to have its output memoized.
- * @param {Function} [resolver] The function to resolve the cache key.
- * @returns {Function} Returns the new memoizing function.
- * @example
- *
- * var upperCase = _.memoize(function(string) {
- * return string.toUpperCase();
- * });
- *
- * upperCase('fred');
- * // => 'FRED'
- *
- * // modifying the result cache
- * upperCase.cache.set('fred', 'BARNEY');
- * upperCase('fred');
- * // => 'BARNEY'
- *
- * // replacing `_.memoize.Cache`
- * var object = { 'user': 'fred' };
- * var other = { 'user': 'barney' };
- * var identity = _.memoize(_.identity);
- *
- * identity(object);
- * // => { 'user': 'fred' }
- * identity(other);
- * // => { 'user': 'fred' }
- *
- * _.memoize.Cache = WeakMap;
- * var identity = _.memoize(_.identity);
- *
- * identity(object);
- * // => { 'user': 'fred' }
- * identity(other);
- * // => { 'user': 'barney' }
- */
- function memoize(func, resolver) {
- if (typeof func != 'function' || resolver && typeof resolver != 'function') {
- throw new TypeError(FUNC_ERROR_TEXT);
- }
- var memoized = function () {
- var args = arguments, key = resolver ? resolver.apply(this, args) : args[0], cache = memoized.cache;
- if (cache.has(key)) {
- return cache.get(key);
- }
- var result = func.apply(this, args);
- memoized.cache = cache.set(key, result);
- return result;
- };
- memoized.cache = new memoize.Cache();
- return memoized;
- }
- /**
- * Creates a function that runs each argument through a corresponding
- * transform function.
- *
- * @static
- * @memberOf _
- * @category Function
- * @param {Function} func The function to wrap.
- * @param {...(Function|Function[])} [transforms] The functions to transform
- * arguments, specified as individual functions or arrays of functions.
- * @returns {Function} Returns the new function.
- * @example
- *
- * function doubled(n) {
- * return n * 2;
- * }
- *
- * function square(n) {
- * return n * n;
- * }
- *
- * var modded = _.modArgs(function(x, y) {
- * return [x, y];
- * }, square, doubled);
- *
- * modded(1, 2);
- * // => [1, 4]
- *
- * modded(5, 10);
- * // => [25, 20]
- */
- var modArgs = restParam(function (func, transforms) {
- transforms = baseFlatten(transforms);
- if (typeof func != 'function' || !arrayEvery(transforms, baseIsFunction)) {
- throw new TypeError(FUNC_ERROR_TEXT);
- }
- var length = transforms.length;
- return restParam(function (args) {
- var index = nativeMin(args.length, length);
- while (index--) {
- args[index] = transforms[index](args[index]);
- }
- return func.apply(this, args);
- });
- });
- /**
- * Creates a function that negates the result of the predicate `func`. The
- * `func` predicate is invoked with the `this` binding and arguments of the
- * created function.
- *
- * @static
- * @memberOf _
- * @category Function
- * @param {Function} predicate The predicate to negate.
- * @returns {Function} Returns the new function.
- * @example
- *
- * function isEven(n) {
- * return n % 2 == 0;
- * }
- *
- * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven));
- * // => [1, 3, 5]
- */
- function negate(predicate) {
- if (typeof predicate != 'function') {
- throw new TypeError(FUNC_ERROR_TEXT);
- }
- return function () {
- return !predicate.apply(this, arguments);
- };
- }
- /**
- * Creates a function that is restricted to invoking `func` once. Repeat calls
- * to the function return the value of the first call. The `func` is invoked
- * with the `this` binding and arguments of the created function.
- *
- * @static
- * @memberOf _
- * @category Function
- * @param {Function} func The function to restrict.
- * @returns {Function} Returns the new restricted function.
- * @example
- *
- * var initialize = _.once(createApplication);
- * initialize();
- * initialize();
- * // `initialize` invokes `createApplication` once
- */
- function once(func) {
- return before(2, func);
- }
- /**
- * Creates a function that invokes `func` with `partial` arguments prepended
- * to those provided to the new function. This method is like `_.bind` except
- * it does **not** alter the `this` binding.
- *
- * The `_.partial.placeholder` value, which defaults to `_` in monolithic
- * builds, may be used as a placeholder for partially applied arguments.
- *
- * **Note:** This method does not set the "length" property of partially
- * applied functions.
- *
- * @static
- * @memberOf _
- * @category Function
- * @param {Function} func The function to partially apply arguments to.
- * @param {...*} [partials] The arguments to be partially applied.
- * @returns {Function} Returns the new partially applied function.
- * @example
- *
- * var greet = function(greeting, name) {
- * return greeting + ' ' + name;
- * };
- *
- * var sayHelloTo = _.partial(greet, 'hello');
- * sayHelloTo('fred');
- * // => 'hello fred'
- *
- * // using placeholders
- * var greetFred = _.partial(greet, _, 'fred');
- * greetFred('hi');
- * // => 'hi fred'
- */
- var partial = createPartial(PARTIAL_FLAG);
- /**
- * This method is like `_.partial` except that partially applied arguments
- * are appended to those provided to the new function.
- *
- * The `_.partialRight.placeholder` value, which defaults to `_` in monolithic
- * builds, may be used as a placeholder for partially applied arguments.
- *
- * **Note:** This method does not set the "length" property of partially
- * applied functions.
- *
- * @static
- * @memberOf _
- * @category Function
- * @param {Function} func The function to partially apply arguments to.
- * @param {...*} [partials] The arguments to be partially applied.
- * @returns {Function} Returns the new partially applied function.
- * @example
- *
- * var greet = function(greeting, name) {
- * return greeting + ' ' + name;
- * };
- *
- * var greetFred = _.partialRight(greet, 'fred');
- * greetFred('hi');
- * // => 'hi fred'
- *
- * // using placeholders
- * var sayHelloTo = _.partialRight(greet, 'hello', _);
- * sayHelloTo('fred');
- * // => 'hello fred'
- */
- var partialRight = createPartial(PARTIAL_RIGHT_FLAG);
- /**
- * Creates a function that invokes `func` with arguments arranged according
- * to the specified indexes where the argument value at the first index is
- * provided as the first argument, the argument value at the second index is
- * provided as the second argument, and so on.
- *
- * @static
- * @memberOf _
- * @category Function
- * @param {Function} func The function to rearrange arguments for.
- * @param {...(number|number[])} indexes The arranged argument indexes,
- * specified as individual indexes or arrays of indexes.
- * @returns {Function} Returns the new function.
- * @example
- *
- * var rearged = _.rearg(function(a, b, c) {
- * return [a, b, c];
- * }, 2, 0, 1);
- *
- * rearged('b', 'c', 'a')
- * // => ['a', 'b', 'c']
- *
- * var map = _.rearg(_.map, [1, 0]);
- * map(function(n) {
- * return n * 3;
- * }, [1, 2, 3]);
- * // => [3, 6, 9]
- */
- var rearg = restParam(function (func, indexes) {
- return createWrapper(func, REARG_FLAG, undefined, undefined, undefined, baseFlatten(indexes));
- });
- /**
- * Creates a function that invokes `func` with the `this` binding of the
- * created function and arguments from `start` and beyond provided as an array.
- *
- * **Note:** This method is based on the [rest parameter](https://developer.mozilla.org/Web/JavaScript/Reference/Functions/rest_parameters).
- *
- * @static
- * @memberOf _
- * @category Function
- * @param {Function} func The function to apply a rest parameter to.
- * @param {number} [start=func.length-1] The start position of the rest parameter.
- * @returns {Function} Returns the new function.
- * @example
- *
- * var say = _.restParam(function(what, names) {
- * return what + ' ' + _.initial(names).join(', ') +
- * (_.size(names) > 1 ? ', & ' : '') + _.last(names);
- * });
- *
- * say('hello', 'fred', 'barney', 'pebbles');
- * // => 'hello fred, barney, & pebbles'
- */
- function restParam(func, start) {
- if (typeof func != 'function') {
- throw new TypeError(FUNC_ERROR_TEXT);
- }
- start = nativeMax(start === undefined ? func.length - 1 : +start || 0, 0);
- return function () {
- var args = arguments, index = -1, length = nativeMax(args.length - start, 0), rest = Array(length);
- while (++index < length) {
- rest[index] = args[start + index];
- }
- switch (start) {
- case 0:
- return func.call(this, rest);
- case 1:
- return func.call(this, args[0], rest);
- case 2:
- return func.call(this, args[0], args[1], rest);
- }
- var otherArgs = Array(start + 1);
- index = -1;
- while (++index < start) {
- otherArgs[index] = args[index];
- }
- otherArgs[start] = rest;
- return func.apply(this, otherArgs);
- };
- }
- /**
- * Creates a function that invokes `func` with the `this` binding of the created
- * function and an array of arguments much like [`Function#apply`](https://es5.github.io/#x15.3.4.3).
- *
- * **Note:** This method is based on the [spread operator](https://developer.mozilla.org/Web/JavaScript/Reference/Operators/Spread_operator).
- *
- * @static
- * @memberOf _
- * @category Function
- * @param {Function} func The function to spread arguments over.
- * @returns {Function} Returns the new function.
- * @example
- *
- * var say = _.spread(function(who, what) {
- * return who + ' says ' + what;
- * });
- *
- * say(['fred', 'hello']);
- * // => 'fred says hello'
- *
- * // with a Promise
- * var numbers = Promise.all([
- * Promise.resolve(40),
- * Promise.resolve(36)
- * ]);
- *
- * numbers.then(_.spread(function(x, y) {
- * return x + y;
- * }));
- * // => a Promise of 76
- */
- function spread(func) {
- if (typeof func != 'function') {
- throw new TypeError(FUNC_ERROR_TEXT);
- }
- return function (array) {
- return func.apply(this, array);
- };
- }
- /**
- * Creates a throttled function that only invokes `func` at most once per
- * every `wait` milliseconds. The throttled function comes with a `cancel`
- * method to cancel delayed invocations. Provide an options object to indicate
- * that `func` should be invoked on the leading and/or trailing edge of the
- * `wait` timeout. Subsequent calls to the throttled function return the
- * result of the last `func` call.
- *
- * **Note:** If `leading` and `trailing` options are `true`, `func` is invoked
- * on the trailing edge of the timeout only if the the throttled function is
- * invoked more than once during the `wait` timeout.
- *
- * See [David Corbacho's article](http://drupalmotion.com/article/debounce-and-throttle-visual-explanation)
- * for details over the differences between `_.throttle` and `_.debounce`.
- *
- * @static
- * @memberOf _
- * @category Function
- * @param {Function} func The function to throttle.
- * @param {number} [wait=0] The number of milliseconds to throttle invocations to.
- * @param {Object} [options] The options object.
- * @param {boolean} [options.leading=true] Specify invoking on the leading
- * edge of the timeout.
- * @param {boolean} [options.trailing=true] Specify invoking on the trailing
- * edge of the timeout.
- * @returns {Function} Returns the new throttled function.
- * @example
- *
- * // avoid excessively updating the position while scrolling
- * jQuery(window).on('scroll', _.throttle(updatePosition, 100));
- *
- * // invoke `renewToken` when the click event is fired, but not more than once every 5 minutes
- * jQuery('.interactive').on('click', _.throttle(renewToken, 300000, {
- * 'trailing': false
- * }));
- *
- * // cancel a trailing throttled call
- * jQuery(window).on('popstate', throttled.cancel);
- */
- function throttle(func, wait, options) {
- var leading = true, trailing = true;
- if (typeof func != 'function') {
- throw new TypeError(FUNC_ERROR_TEXT);
- }
- if (options === false) {
- leading = false;
- } else if (isObject(options)) {
- leading = 'leading' in options ? !!options.leading : leading;
- trailing = 'trailing' in options ? !!options.trailing : trailing;
- }
- return debounce(func, wait, {
- 'leading': leading,
- 'maxWait': +wait,
- 'trailing': trailing
- });
- }
- /**
- * Creates a function that provides `value` to the wrapper function as its
- * first argument. Any additional arguments provided to the function are
- * appended to those provided to the wrapper function. The wrapper is invoked
- * with the `this` binding of the created function.
- *
- * @static
- * @memberOf _
- * @category Function
- * @param {*} value The value to wrap.
- * @param {Function} wrapper The wrapper function.
- * @returns {Function} Returns the new function.
- * @example
- *
- * var p = _.wrap(_.escape, function(func, text) {
- * return '<p>' + func(text) + '</p>';
- * });
- *
- * p('fred, barney, & pebbles');
- * // => '<p>fred, barney, & pebbles</p>'
- */
- function wrap(value, wrapper) {
- wrapper = wrapper == null ? identity : wrapper;
- return createWrapper(wrapper, PARTIAL_FLAG, undefined, [value], []);
- }
- /*------------------------------------------------------------------------*/
- /**
- * Creates a clone of `value`. If `isDeep` is `true` nested objects are cloned,
- * otherwise they are assigned by reference. If `customizer` is provided it's
- * invoked to produce the cloned values. If `customizer` returns `undefined`
- * cloning is handled by the method instead. The `customizer` is bound to
- * `thisArg` and invoked with up to three argument; (value [, index|key, object]).
- *
- * **Note:** This method is loosely based on the
- * [structured clone algorithm](http://www.w3.org/TR/html5/infrastructure.html#internal-structured-cloning-algorithm).
- * The enumerable properties of `arguments` objects and objects created by
- * constructors other than `Object` are cloned to plain `Object` objects. An
- * empty object is returned for uncloneable values such as functions, DOM nodes,
- * Maps, Sets, and WeakMaps.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to clone.
- * @param {boolean} [isDeep] Specify a deep clone.
- * @param {Function} [customizer] The function to customize cloning values.
- * @param {*} [thisArg] The `this` binding of `customizer`.
- * @returns {*} Returns the cloned value.
- * @example
- *
- * var users = [
- * { 'user': 'barney' },
- * { 'user': 'fred' }
- * ];
- *
- * var shallow = _.clone(users);
- * shallow[0] === users[0];
- * // => true
- *
- * var deep = _.clone(users, true);
- * deep[0] === users[0];
- * // => false
- *
- * // using a customizer callback
- * var el = _.clone(document.body, function(value) {
- * if (_.isElement(value)) {
- * return value.cloneNode(false);
- * }
- * });
- *
- * el === document.body
- * // => false
- * el.nodeName
- * // => BODY
- * el.childNodes.length;
- * // => 0
- */
- function clone(value, isDeep, customizer, thisArg) {
- if (isDeep && typeof isDeep != 'boolean' && isIterateeCall(value, isDeep, customizer)) {
- isDeep = false;
- } else if (typeof isDeep == 'function') {
- thisArg = customizer;
- customizer = isDeep;
- isDeep = false;
- }
- return typeof customizer == 'function' ? baseClone(value, isDeep, bindCallback(customizer, thisArg, 3)) : baseClone(value, isDeep);
- }
- /**
- * Creates a deep clone of `value`. If `customizer` is provided it's invoked
- * to produce the cloned values. If `customizer` returns `undefined` cloning
- * is handled by the method instead. The `customizer` is bound to `thisArg`
- * and invoked with up to three argument; (value [, index|key, object]).
- *
- * **Note:** This method is loosely based on the
- * [structured clone algorithm](http://www.w3.org/TR/html5/infrastructure.html#internal-structured-cloning-algorithm).
- * The enumerable properties of `arguments` objects and objects created by
- * constructors other than `Object` are cloned to plain `Object` objects. An
- * empty object is returned for uncloneable values such as functions, DOM nodes,
- * Maps, Sets, and WeakMaps.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to deep clone.
- * @param {Function} [customizer] The function to customize cloning values.
- * @param {*} [thisArg] The `this` binding of `customizer`.
- * @returns {*} Returns the deep cloned value.
- * @example
- *
- * var users = [
- * { 'user': 'barney' },
- * { 'user': 'fred' }
- * ];
- *
- * var deep = _.cloneDeep(users);
- * deep[0] === users[0];
- * // => false
- *
- * // using a customizer callback
- * var el = _.cloneDeep(document.body, function(value) {
- * if (_.isElement(value)) {
- * return value.cloneNode(true);
- * }
- * });
- *
- * el === document.body
- * // => false
- * el.nodeName
- * // => BODY
- * el.childNodes.length;
- * // => 20
- */
- function cloneDeep(value, customizer, thisArg) {
- return typeof customizer == 'function' ? baseClone(value, true, bindCallback(customizer, thisArg, 3)) : baseClone(value, true);
- }
- /**
- * Checks if `value` is greater than `other`.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to compare.
- * @param {*} other The other value to compare.
- * @returns {boolean} Returns `true` if `value` is greater than `other`, else `false`.
- * @example
- *
- * _.gt(3, 1);
- * // => true
- *
- * _.gt(3, 3);
- * // => false
- *
- * _.gt(1, 3);
- * // => false
- */
- function gt(value, other) {
- return value > other;
- }
- /**
- * Checks if `value` is greater than or equal to `other`.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to compare.
- * @param {*} other The other value to compare.
- * @returns {boolean} Returns `true` if `value` is greater than or equal to `other`, else `false`.
- * @example
- *
- * _.gte(3, 1);
- * // => true
- *
- * _.gte(3, 3);
- * // => true
- *
- * _.gte(1, 3);
- * // => false
- */
- function gte(value, other) {
- return value >= other;
- }
- /**
- * Checks if `value` is classified as an `arguments` object.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
- * @example
- *
- * _.isArguments(function() { return arguments; }());
- * // => true
- *
- * _.isArguments([1, 2, 3]);
- * // => false
- */
- function isArguments(value) {
- return isObjectLike(value) && isArrayLike(value) && hasOwnProperty.call(value, 'callee') && !propertyIsEnumerable.call(value, 'callee');
- }
- /**
- * Checks if `value` is classified as an `Array` object.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
- * @example
- *
- * _.isArray([1, 2, 3]);
- * // => true
- *
- * _.isArray(function() { return arguments; }());
- * // => false
- */
- var isArray = nativeIsArray || function (value) {
- return isObjectLike(value) && isLength(value.length) && objToString.call(value) == arrayTag;
- };
- /**
- * Checks if `value` is classified as a boolean primitive or object.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
- * @example
- *
- * _.isBoolean(false);
- * // => true
- *
- * _.isBoolean(null);
- * // => false
- */
- function isBoolean(value) {
- return value === true || value === false || isObjectLike(value) && objToString.call(value) == boolTag;
- }
- /**
- * Checks if `value` is classified as a `Date` object.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
- * @example
- *
- * _.isDate(new Date);
- * // => true
- *
- * _.isDate('Mon April 23 2012');
- * // => false
- */
- function isDate(value) {
- return isObjectLike(value) && objToString.call(value) == dateTag;
- }
- /**
- * Checks if `value` is a DOM element.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a DOM element, else `false`.
- * @example
- *
- * _.isElement(document.body);
- * // => true
- *
- * _.isElement('<body>');
- * // => false
- */
- function isElement(value) {
- return !!value && value.nodeType === 1 && isObjectLike(value) && !isPlainObject(value);
- }
- /**
- * Checks if `value` is empty. A value is considered empty unless it's an
- * `arguments` object, array, string, or jQuery-like collection with a length
- * greater than `0` or an object with own enumerable properties.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {Array|Object|string} value The value to inspect.
- * @returns {boolean} Returns `true` if `value` is empty, else `false`.
- * @example
- *
- * _.isEmpty(null);
- * // => true
- *
- * _.isEmpty(true);
- * // => true
- *
- * _.isEmpty(1);
- * // => true
- *
- * _.isEmpty([1, 2, 3]);
- * // => false
- *
- * _.isEmpty({ 'a': 1 });
- * // => false
- */
- function isEmpty(value) {
- if (value == null) {
- return true;
- }
- if (isArrayLike(value) && (isArray(value) || isString(value) || isArguments(value) || isObjectLike(value) && isFunction(value.splice))) {
- return !value.length;
- }
- return !keys(value).length;
- }
- /**
- * Performs a deep comparison between two values to determine if they are
- * equivalent. If `customizer` is provided it's invoked to compare values.
- * If `customizer` returns `undefined` comparisons are handled by the method
- * instead. The `customizer` is bound to `thisArg` and invoked with up to
- * three arguments: (value, other [, index|key]).
- *
- * **Note:** This method supports comparing arrays, booleans, `Date` objects,
- * numbers, `Object` objects, regexes, and strings. Objects are compared by
- * their own, not inherited, enumerable properties. Functions and DOM nodes
- * are **not** supported. Provide a customizer function to extend support
- * for comparing other values.
- *
- * @static
- * @memberOf _
- * @alias eq
- * @category Lang
- * @param {*} value The value to compare.
- * @param {*} other The other value to compare.
- * @param {Function} [customizer] The function to customize value comparisons.
- * @param {*} [thisArg] The `this` binding of `customizer`.
- * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
- * @example
- *
- * var object = { 'user': 'fred' };
- * var other = { 'user': 'fred' };
- *
- * object == other;
- * // => false
- *
- * _.isEqual(object, other);
- * // => true
- *
- * // using a customizer callback
- * var array = ['hello', 'goodbye'];
- * var other = ['hi', 'goodbye'];
- *
- * _.isEqual(array, other, function(value, other) {
- * if (_.every([value, other], RegExp.prototype.test, /^h(?:i|ello)$/)) {
- * return true;
- * }
- * });
- * // => true
- */
- function isEqual(value, other, customizer, thisArg) {
- customizer = typeof customizer == 'function' ? bindCallback(customizer, thisArg, 3) : undefined;
- var result = customizer ? customizer(value, other) : undefined;
- return result === undefined ? baseIsEqual(value, other, customizer) : !!result;
- }
- /**
- * Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`,
- * `SyntaxError`, `TypeError`, or `URIError` object.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is an error object, else `false`.
- * @example
- *
- * _.isError(new Error);
- * // => true
- *
- * _.isError(Error);
- * // => false
- */
- function isError(value) {
- return isObjectLike(value) && typeof value.message == 'string' && objToString.call(value) == errorTag;
- }
- /**
- * Checks if `value` is a finite primitive number.
- *
- * **Note:** This method is based on [`Number.isFinite`](http://ecma-international.org/ecma-262/6.0/#sec-number.isfinite).
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a finite number, else `false`.
- * @example
- *
- * _.isFinite(10);
- * // => true
- *
- * _.isFinite('10');
- * // => false
- *
- * _.isFinite(true);
- * // => false
- *
- * _.isFinite(Object(10));
- * // => false
- *
- * _.isFinite(Infinity);
- * // => false
- */
- function isFinite(value) {
- return typeof value == 'number' && nativeIsFinite(value);
- }
- /**
- * Checks if `value` is classified as a `Function` object.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
- * @example
- *
- * _.isFunction(_);
- * // => true
- *
- * _.isFunction(/abc/);
- * // => false
- */
- function isFunction(value) {
- // The use of `Object#toString` avoids issues with the `typeof` operator
- // in older versions of Chrome and Safari which return 'function' for regexes
- // and Safari 8 which returns 'object' for typed array constructors.
- return isObject(value) && objToString.call(value) == funcTag;
- }
- /**
- * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`.
- * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is an object, else `false`.
- * @example
- *
- * _.isObject({});
- * // => true
- *
- * _.isObject([1, 2, 3]);
- * // => true
- *
- * _.isObject(1);
- * // => false
- */
- function isObject(value) {
- // Avoid a V8 JIT bug in Chrome 19-20.
- // See https://code.google.com/p/v8/issues/detail?id=2291 for more details.
- var type = typeof value;
- return !!value && (type == 'object' || type == 'function');
- }
- /**
- * Performs a deep comparison between `object` and `source` to determine if
- * `object` contains equivalent property values. If `customizer` is provided
- * it's invoked to compare values. If `customizer` returns `undefined`
- * comparisons are handled by the method instead. The `customizer` is bound
- * to `thisArg` and invoked with three arguments: (value, other, index|key).
- *
- * **Note:** This method supports comparing properties of arrays, booleans,
- * `Date` objects, numbers, `Object` objects, regexes, and strings. Functions
- * and DOM nodes are **not** supported. Provide a customizer function to extend
- * support for comparing other values.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {Object} object The object to inspect.
- * @param {Object} source The object of property values to match.
- * @param {Function} [customizer] The function to customize value comparisons.
- * @param {*} [thisArg] The `this` binding of `customizer`.
- * @returns {boolean} Returns `true` if `object` is a match, else `false`.
- * @example
- *
- * var object = { 'user': 'fred', 'age': 40 };
- *
- * _.isMatch(object, { 'age': 40 });
- * // => true
- *
- * _.isMatch(object, { 'age': 36 });
- * // => false
- *
- * // using a customizer callback
- * var object = { 'greeting': 'hello' };
- * var source = { 'greeting': 'hi' };
- *
- * _.isMatch(object, source, function(value, other) {
- * return _.every([value, other], RegExp.prototype.test, /^h(?:i|ello)$/) || undefined;
- * });
- * // => true
- */
- function isMatch(object, source, customizer, thisArg) {
- customizer = typeof customizer == 'function' ? bindCallback(customizer, thisArg, 3) : undefined;
- return baseIsMatch(object, getMatchData(source), customizer);
- }
- /**
- * Checks if `value` is `NaN`.
- *
- * **Note:** This method is not the same as [`isNaN`](https://es5.github.io/#x15.1.2.4)
- * which returns `true` for `undefined` and other non-numeric values.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.
- * @example
- *
- * _.isNaN(NaN);
- * // => true
- *
- * _.isNaN(new Number(NaN));
- * // => true
- *
- * isNaN(undefined);
- * // => true
- *
- * _.isNaN(undefined);
- * // => false
- */
- function isNaN(value) {
- // An `NaN` primitive is the only value that is not equal to itself.
- // Perform the `toStringTag` check first to avoid errors with some host objects in IE.
- return isNumber(value) && value != +value;
- }
- /**
- * Checks if `value` is a native function.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a native function, else `false`.
- * @example
- *
- * _.isNative(Array.prototype.push);
- * // => true
- *
- * _.isNative(_);
- * // => false
- */
- function isNative(value) {
- if (value == null) {
- return false;
- }
- if (isFunction(value)) {
- return reIsNative.test(fnToString.call(value));
- }
- return isObjectLike(value) && reIsHostCtor.test(value);
- }
- /**
- * Checks if `value` is `null`.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is `null`, else `false`.
- * @example
- *
- * _.isNull(null);
- * // => true
- *
- * _.isNull(void 0);
- * // => false
- */
- function isNull(value) {
- return value === null;
- }
- /**
- * Checks if `value` is classified as a `Number` primitive or object.
- *
- * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are classified
- * as numbers, use the `_.isFinite` method.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
- * @example
- *
- * _.isNumber(8.4);
- * // => true
- *
- * _.isNumber(NaN);
- * // => true
- *
- * _.isNumber('8.4');
- * // => false
- */
- function isNumber(value) {
- return typeof value == 'number' || isObjectLike(value) && objToString.call(value) == numberTag;
- }
- /**
- * Checks if `value` is a plain object, that is, an object created by the
- * `Object` constructor or one with a `[[Prototype]]` of `null`.
- *
- * **Note:** This method assumes objects created by the `Object` constructor
- * have no inherited enumerable properties.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.
- * @example
- *
- * function Foo() {
- * this.a = 1;
- * }
- *
- * _.isPlainObject(new Foo);
- * // => false
- *
- * _.isPlainObject([1, 2, 3]);
- * // => false
- *
- * _.isPlainObject({ 'x': 0, 'y': 0 });
- * // => true
- *
- * _.isPlainObject(Object.create(null));
- * // => true
- */
- function isPlainObject(value) {
- var Ctor;
- // Exit early for non `Object` objects.
- if (!(isObjectLike(value) && objToString.call(value) == objectTag && !isArguments(value)) || !hasOwnProperty.call(value, 'constructor') && (Ctor = value.constructor, typeof Ctor == 'function' && !(Ctor instanceof Ctor))) {
- return false;
- }
- // IE < 9 iterates inherited properties before own properties. If the first
- // iterated property is an object's own property then there are no inherited
- // enumerable properties.
- var result;
- // In most environments an object's own properties are iterated before
- // its inherited properties. If the last iterated property is an object's
- // own property then there are no inherited enumerable properties.
- baseForIn(value, function (subValue, key) {
- result = key;
- });
- return result === undefined || hasOwnProperty.call(value, result);
- }
- /**
- * Checks if `value` is classified as a `RegExp` object.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
- * @example
- *
- * _.isRegExp(/abc/);
- * // => true
- *
- * _.isRegExp('/abc/');
- * // => false
- */
- function isRegExp(value) {
- return isObject(value) && objToString.call(value) == regexpTag;
- }
- /**
- * Checks if `value` is classified as a `String` primitive or object.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
- * @example
- *
- * _.isString('abc');
- * // => true
- *
- * _.isString(1);
- * // => false
- */
- function isString(value) {
- return typeof value == 'string' || isObjectLike(value) && objToString.call(value) == stringTag;
- }
- /**
- * Checks if `value` is classified as a typed array.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
- * @example
- *
- * _.isTypedArray(new Uint8Array);
- * // => true
- *
- * _.isTypedArray([]);
- * // => false
- */
- function isTypedArray(value) {
- return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[objToString.call(value)];
- }
- /**
- * Checks if `value` is `undefined`.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`.
- * @example
- *
- * _.isUndefined(void 0);
- * // => true
- *
- * _.isUndefined(null);
- * // => false
- */
- function isUndefined(value) {
- return value === undefined;
- }
- /**
- * Checks if `value` is less than `other`.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to compare.
- * @param {*} other The other value to compare.
- * @returns {boolean} Returns `true` if `value` is less than `other`, else `false`.
- * @example
- *
- * _.lt(1, 3);
- * // => true
- *
- * _.lt(3, 3);
- * // => false
- *
- * _.lt(3, 1);
- * // => false
- */
- function lt(value, other) {
- return value < other;
- }
- /**
- * Checks if `value` is less than or equal to `other`.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to compare.
- * @param {*} other The other value to compare.
- * @returns {boolean} Returns `true` if `value` is less than or equal to `other`, else `false`.
- * @example
- *
- * _.lte(1, 3);
- * // => true
- *
- * _.lte(3, 3);
- * // => true
- *
- * _.lte(3, 1);
- * // => false
- */
- function lte(value, other) {
- return value <= other;
- }
- /**
- * Converts `value` to an array.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to convert.
- * @returns {Array} Returns the converted array.
- * @example
- *
- * (function() {
- * return _.toArray(arguments).slice(1);
- * }(1, 2, 3));
- * // => [2, 3]
- */
- function toArray(value) {
- var length = value ? getLength(value) : 0;
- if (!isLength(length)) {
- return values(value);
- }
- if (!length) {
- return [];
- }
- return arrayCopy(value);
- }
- /**
- * Converts `value` to a plain object flattening inherited enumerable
- * properties of `value` to own properties of the plain object.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to convert.
- * @returns {Object} Returns the converted plain object.
- * @example
- *
- * function Foo() {
- * this.b = 2;
- * }
- *
- * Foo.prototype.c = 3;
- *
- * _.assign({ 'a': 1 }, new Foo);
- * // => { 'a': 1, 'b': 2 }
- *
- * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));
- * // => { 'a': 1, 'b': 2, 'c': 3 }
- */
- function toPlainObject(value) {
- return baseCopy(value, keysIn(value));
- }
- /*------------------------------------------------------------------------*/
- /**
- * Recursively merges own enumerable properties of the source object(s), that
- * don't resolve to `undefined` into the destination object. Subsequent sources
- * overwrite property assignments of previous sources. If `customizer` is
- * provided it's invoked to produce the merged values of the destination and
- * source properties. If `customizer` returns `undefined` merging is handled
- * by the method instead. The `customizer` is bound to `thisArg` and invoked
- * with five arguments: (objectValue, sourceValue, key, object, source).
- *
- * @static
- * @memberOf _
- * @category Object
- * @param {Object} object The destination object.
- * @param {...Object} [sources] The source objects.
- * @param {Function} [customizer] The function to customize assigned values.
- * @param {*} [thisArg] The `this` binding of `customizer`.
- * @returns {Object} Returns `object`.
- * @example
- *
- * var users = {
- * 'data': [{ 'user': 'barney' }, { 'user': 'fred' }]
- * };
- *
- * var ages = {
- * 'data': [{ 'age': 36 }, { 'age': 40 }]
- * };
- *
- * _.merge(users, ages);
- * // => { 'data': [{ 'user': 'barney', 'age': 36 }, { 'user': 'fred', 'age': 40 }] }
- *
- * // using a customizer callback
- * var object = {
- * 'fruits': ['apple'],
- * 'vegetables': ['beet']
- * };
- *
- * var other = {
- * 'fruits': ['banana'],
- * 'vegetables': ['carrot']
- * };
- *
- * _.merge(object, other, function(a, b) {
- * if (_.isArray(a)) {
- * return a.concat(b);
- * }
- * });
- * // => { 'fruits': ['apple', 'banana'], 'vegetables': ['beet', 'carrot'] }
- */
- var merge = createAssigner(baseMerge);
- /**
- * Assigns own enumerable properties of source object(s) to the destination
- * object. Subsequent sources overwrite property assignments of previous sources.
- * If `customizer` is provided it's invoked to produce the assigned values.
- * The `customizer` is bound to `thisArg` and invoked with five arguments:
- * (objectValue, sourceValue, key, object, source).
- *
- * **Note:** This method mutates `object` and is based on
- * [`Object.assign`](http://ecma-international.org/ecma-262/6.0/#sec-object.assign).
- *
- * @static
- * @memberOf _
- * @alias extend
- * @category Object
- * @param {Object} object The destination object.
- * @param {...Object} [sources] The source objects.
- * @param {Function} [customizer] The function to customize assigned values.
- * @param {*} [thisArg] The `this` binding of `customizer`.
- * @returns {Object} Returns `object`.
- * @example
- *
- * _.assign({ 'user': 'barney' }, { 'age': 40 }, { 'user': 'fred' });
- * // => { 'user': 'fred', 'age': 40 }
- *
- * // using a customizer callback
- * var defaults = _.partialRight(_.assign, function(value, other) {
- * return _.isUndefined(value) ? other : value;
- * });
- *
- * defaults({ 'user': 'barney' }, { 'age': 36 }, { 'user': 'fred' });
- * // => { 'user': 'barney', 'age': 36 }
- */
- var assign = createAssigner(function (object, source, customizer) {
- return customizer ? assignWith(object, source, customizer) : baseAssign(object, source);
- });
- /**
- * Creates an object that inherits from the given `prototype` object. If a
- * `properties` object is provided its own enumerable properties are assigned
- * to the created object.
- *
- * @static
- * @memberOf _
- * @category Object
- * @param {Object} prototype The object to inherit from.
- * @param {Object} [properties] The properties to assign to the object.
- * @param- {Object} [guard] Enables use as a callback for functions like `_.map`.
- * @returns {Object} Returns the new object.
- * @example
- *
- * function Shape() {
- * this.x = 0;
- * this.y = 0;
- * }
- *
- * function Circle() {
- * Shape.call(this);
- * }
- *
- * Circle.prototype = _.create(Shape.prototype, {
- * 'constructor': Circle
- * });
- *
- * var circle = new Circle;
- * circle instanceof Circle;
- * // => true
- *
- * circle instanceof Shape;
- * // => true
- */
- function create(prototype, properties, guard) {
- var result = baseCreate(prototype);
- if (guard && isIterateeCall(prototype, properties, guard)) {
- properties = undefined;
- }
- return properties ? baseAssign(result, properties) : result;
- }
- /**
- * Assigns own enumerable properties of source object(s) to the destination
- * object for all destination properties that resolve to `undefined`. Once a
- * property is set, additional values of the same property are ignored.
- *
- * **Note:** This method mutates `object`.
- *
- * @static
- * @memberOf _
- * @category Object
- * @param {Object} object The destination object.
- * @param {...Object} [sources] The source objects.
- * @returns {Object} Returns `object`.
- * @example
- *
- * _.defaults({ 'user': 'barney' }, { 'age': 36 }, { 'user': 'fred' });
- * // => { 'user': 'barney', 'age': 36 }
- */
- var defaults = createDefaults(assign, assignDefaults);
- /**
- * This method is like `_.defaults` except that it recursively assigns
- * default properties.
- *
- * **Note:** This method mutates `object`.
- *
- * @static
- * @memberOf _
- * @category Object
- * @param {Object} object The destination object.
- * @param {...Object} [sources] The source objects.
- * @returns {Object} Returns `object`.
- * @example
- *
- * _.defaultsDeep({ 'user': { 'name': 'barney' } }, { 'user': { 'name': 'fred', 'age': 36 } });
- * // => { 'user': { 'name': 'barney', 'age': 36 } }
- *
- */
- var defaultsDeep = createDefaults(merge, mergeDefaults);
- /**
- * This method is like `_.find` except that it returns the key of the first
- * element `predicate` returns truthy for instead of the element itself.
- *
- * If a property name is provided for `predicate` the created `_.property`
- * style callback returns the property value of the given element.
- *
- * If a value is also provided for `thisArg` the created `_.matchesProperty`
- * style callback returns `true` for elements that have a matching property
- * value, else `false`.
- *
- * If an object is provided for `predicate` the created `_.matches` style
- * callback returns `true` for elements that have the properties of the given
- * object, else `false`.
- *
- * @static
- * @memberOf _
- * @category Object
- * @param {Object} object The object to search.
- * @param {Function|Object|string} [predicate=_.identity] The function invoked
- * per iteration.
- * @param {*} [thisArg] The `this` binding of `predicate`.
- * @returns {string|undefined} Returns the key of the matched element, else `undefined`.
- * @example
- *
- * var users = {
- * 'barney': { 'age': 36, 'active': true },
- * 'fred': { 'age': 40, 'active': false },
- * 'pebbles': { 'age': 1, 'active': true }
- * };
- *
- * _.findKey(users, function(chr) {
- * return chr.age < 40;
- * });
- * // => 'barney' (iteration order is not guaranteed)
- *
- * // using the `_.matches` callback shorthand
- * _.findKey(users, { 'age': 1, 'active': true });
- * // => 'pebbles'
- *
- * // using the `_.matchesProperty` callback shorthand
- * _.findKey(users, 'active', false);
- * // => 'fred'
- *
- * // using the `_.property` callback shorthand
- * _.findKey(users, 'active');
- * // => 'barney'
- */
- var findKey = createFindKey(baseForOwn);
- /**
- * This method is like `_.findKey` except that it iterates over elements of
- * a collection in the opposite order.
- *
- * If a property name is provided for `predicate` the created `_.property`
- * style callback returns the property value of the given element.
- *
- * If a value is also provided for `thisArg` the created `_.matchesProperty`
- * style callback returns `true` for elements that have a matching property
- * value, else `false`.
- *
- * If an object is provided for `predicate` the created `_.matches` style
- * callback returns `true` for elements that have the properties of the given
- * object, else `false`.
- *
- * @static
- * @memberOf _
- * @category Object
- * @param {Object} object The object to search.
- * @param {Function|Object|string} [predicate=_.identity] The function invoked
- * per iteration.
- * @param {*} [thisArg] The `this` binding of `predicate`.
- * @returns {string|undefined} Returns the key of the matched element, else `undefined`.
- * @example
- *
- * var users = {
- * 'barney': { 'age': 36, 'active': true },
- * 'fred': { 'age': 40, 'active': false },
- * 'pebbles': { 'age': 1, 'active': true }
- * };
- *
- * _.findLastKey(users, function(chr) {
- * return chr.age < 40;
- * });
- * // => returns `pebbles` assuming `_.findKey` returns `barney`
- *
- * // using the `_.matches` callback shorthand
- * _.findLastKey(users, { 'age': 36, 'active': true });
- * // => 'barney'
- *
- * // using the `_.matchesProperty` callback shorthand
- * _.findLastKey(users, 'active', false);
- * // => 'fred'
- *
- * // using the `_.property` callback shorthand
- * _.findLastKey(users, 'active');
- * // => 'pebbles'
- */
- var findLastKey = createFindKey(baseForOwnRight);
- /**
- * Iterates over own and inherited enumerable properties of an object invoking
- * `iteratee` for each property. The `iteratee` is bound to `thisArg` and invoked
- * with three arguments: (value, key, object). Iteratee functions may exit
- * iteration early by explicitly returning `false`.
- *
- * @static
- * @memberOf _
- * @category Object
- * @param {Object} object The object to iterate over.
- * @param {Function} [iteratee=_.identity] The function invoked per iteration.
- * @param {*} [thisArg] The `this` binding of `iteratee`.
- * @returns {Object} Returns `object`.
- * @example
- *
- * function Foo() {
- * this.a = 1;
- * this.b = 2;
- * }
- *
- * Foo.prototype.c = 3;
- *
- * _.forIn(new Foo, function(value, key) {
- * console.log(key);
- * });
- * // => logs 'a', 'b', and 'c' (iteration order is not guaranteed)
- */
- var forIn = createForIn(baseFor);
- /**
- * This method is like `_.forIn` except that it iterates over properties of
- * `object` in the opposite order.
- *
- * @static
- * @memberOf _
- * @category Object
- * @param {Object} object The object to iterate over.
- * @param {Function} [iteratee=_.identity] The function invoked per iteration.
- * @param {*} [thisArg] The `this` binding of `iteratee`.
- * @returns {Object} Returns `object`.
- * @example
- *
- * function Foo() {
- * this.a = 1;
- * this.b = 2;
- * }
- *
- * Foo.prototype.c = 3;
- *
- * _.forInRight(new Foo, function(value, key) {
- * console.log(key);
- * });
- * // => logs 'c', 'b', and 'a' assuming `_.forIn ` logs 'a', 'b', and 'c'
- */
- var forInRight = createForIn(baseForRight);
- /**
- * Iterates over own enumerable properties of an object invoking `iteratee`
- * for each property. The `iteratee` is bound to `thisArg` and invoked with
- * three arguments: (value, key, object). Iteratee functions may exit iteration
- * early by explicitly returning `false`.
- *
- * @static
- * @memberOf _
- * @category Object
- * @param {Object} object The object to iterate over.
- * @param {Function} [iteratee=_.identity] The function invoked per iteration.
- * @param {*} [thisArg] The `this` binding of `iteratee`.
- * @returns {Object} Returns `object`.
- * @example
- *
- * function Foo() {
- * this.a = 1;
- * this.b = 2;
- * }
- *
- * Foo.prototype.c = 3;
- *
- * _.forOwn(new Foo, function(value, key) {
- * console.log(key);
- * });
- * // => logs 'a' and 'b' (iteration order is not guaranteed)
- */
- var forOwn = createForOwn(baseForOwn);
- /**
- * This method is like `_.forOwn` except that it iterates over properties of
- * `object` in the opposite order.
- *
- * @static
- * @memberOf _
- * @category Object
- * @param {Object} object The object to iterate over.
- * @param {Function} [iteratee=_.identity] The function invoked per iteration.
- * @param {*} [thisArg] The `this` binding of `iteratee`.
- * @returns {Object} Returns `object`.
- * @example
- *
- * function Foo() {
- * this.a = 1;
- * this.b = 2;
- * }
- *
- * Foo.prototype.c = 3;
- *
- * _.forOwnRight(new Foo, function(value, key) {
- * console.log(key);
- * });
- * // => logs 'b' and 'a' assuming `_.forOwn` logs 'a' and 'b'
- */
- var forOwnRight = createForOwn(baseForOwnRight);
- /**
- * Creates an array of function property names from all enumerable properties,
- * own and inherited, of `object`.
- *
- * @static
- * @memberOf _
- * @alias methods
- * @category Object
- * @param {Object} object The object to inspect.
- * @returns {Array} Returns the new array of property names.
- * @example
- *
- * _.functions(_);
- * // => ['after', 'ary', 'assign', ...]
- */
- function functions(object) {
- return baseFunctions(object, keysIn(object));
- }
- /**
- * Gets the property value at `path` of `object`. If the resolved value is
- * `undefined` the `defaultValue` is used in its place.
- *
- * @static
- * @memberOf _
- * @category Object
- * @param {Object} object The object to query.
- * @param {Array|string} path The path of the property to get.
- * @param {*} [defaultValue] The value returned if the resolved value is `undefined`.
- * @returns {*} Returns the resolved value.
- * @example
- *
- * var object = { 'a': [{ 'b': { 'c': 3 } }] };
- *
- * _.get(object, 'a[0].b.c');
- * // => 3
- *
- * _.get(object, ['a', '0', 'b', 'c']);
- * // => 3
- *
- * _.get(object, 'a.b.c', 'default');
- * // => 'default'
- */
- function get(object, path, defaultValue) {
- var result = object == null ? undefined : baseGet(object, toPath(path), path + '');
- return result === undefined ? defaultValue : result;
- }
- /**
- * Checks if `path` is a direct property.
- *
- * @static
- * @memberOf _
- * @category Object
- * @param {Object} object The object to query.
- * @param {Array|string} path The path to check.
- * @returns {boolean} Returns `true` if `path` is a direct property, else `false`.
- * @example
- *
- * var object = { 'a': { 'b': { 'c': 3 } } };
- *
- * _.has(object, 'a');
- * // => true
- *
- * _.has(object, 'a.b.c');
- * // => true
- *
- * _.has(object, ['a', 'b', 'c']);
- * // => true
- */
- function has(object, path) {
- if (object == null) {
- return false;
- }
- var result = hasOwnProperty.call(object, path);
- if (!result && !isKey(path)) {
- path = toPath(path);
- object = path.length == 1 ? object : baseGet(object, baseSlice(path, 0, -1));
- if (object == null) {
- return false;
- }
- path = last(path);
- result = hasOwnProperty.call(object, path);
- }
- return result || isLength(object.length) && isIndex(path, object.length) && (isArray(object) || isArguments(object));
- }
- /**
- * Creates an object composed of the inverted keys and values of `object`.
- * If `object` contains duplicate values, subsequent values overwrite property
- * assignments of previous values unless `multiValue` is `true`.
- *
- * @static
- * @memberOf _
- * @category Object
- * @param {Object} object The object to invert.
- * @param {boolean} [multiValue] Allow multiple values per key.
- * @param- {Object} [guard] Enables use as a callback for functions like `_.map`.
- * @returns {Object} Returns the new inverted object.
- * @example
- *
- * var object = { 'a': 1, 'b': 2, 'c': 1 };
- *
- * _.invert(object);
- * // => { '1': 'c', '2': 'b' }
- *
- * // with `multiValue`
- * _.invert(object, true);
- * // => { '1': ['a', 'c'], '2': ['b'] }
- */
- function invert(object, multiValue, guard) {
- if (guard && isIterateeCall(object, multiValue, guard)) {
- multiValue = undefined;
- }
- var index = -1, props = keys(object), length = props.length, result = {};
- while (++index < length) {
- var key = props[index], value = object[key];
- if (multiValue) {
- if (hasOwnProperty.call(result, value)) {
- result[value].push(key);
- } else {
- result[value] = [key];
- }
- } else {
- result[value] = key;
- }
- }
- return result;
- }
- /**
- * Creates an array of the own enumerable property names of `object`.
- *
- * **Note:** Non-object values are coerced to objects. See the
- * [ES spec](http://ecma-international.org/ecma-262/6.0/#sec-object.keys)
- * for more details.
- *
- * @static
- * @memberOf _
- * @category Object
- * @param {Object} object The object to query.
- * @returns {Array} Returns the array of property names.
- * @example
- *
- * function Foo() {
- * this.a = 1;
- * this.b = 2;
- * }
- *
- * Foo.prototype.c = 3;
- *
- * _.keys(new Foo);
- * // => ['a', 'b'] (iteration order is not guaranteed)
- *
- * _.keys('hi');
- * // => ['0', '1']
- */
- var keys = !nativeKeys ? shimKeys : function (object) {
- var Ctor = object == null ? undefined : object.constructor;
- if (typeof Ctor == 'function' && Ctor.prototype === object || typeof object != 'function' && isArrayLike(object)) {
- return shimKeys(object);
- }
- return isObject(object) ? nativeKeys(object) : [];
- };
- /**
- * Creates an array of the own and inherited enumerable property names of `object`.
- *
- * **Note:** Non-object values are coerced to objects.
- *
- * @static
- * @memberOf _
- * @category Object
- * @param {Object} object The object to query.
- * @returns {Array} Returns the array of property names.
- * @example
- *
- * function Foo() {
- * this.a = 1;
- * this.b = 2;
- * }
- *
- * Foo.prototype.c = 3;
- *
- * _.keysIn(new Foo);
- * // => ['a', 'b', 'c'] (iteration order is not guaranteed)
- */
- function keysIn(object) {
- if (object == null) {
- return [];
- }
- if (!isObject(object)) {
- object = Object(object);
- }
- var length = object.length;
- length = length && isLength(length) && (isArray(object) || isArguments(object)) && length || 0;
- var Ctor = object.constructor, index = -1, isProto = typeof Ctor == 'function' && Ctor.prototype === object, result = Array(length), skipIndexes = length > 0;
- while (++index < length) {
- result[index] = index + '';
- }
- for (var key in object) {
- if (!(skipIndexes && isIndex(key, length)) && !(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {
- result.push(key);
- }
- }
- return result;
- }
- /**
- * The opposite of `_.mapValues`; this method creates an object with the
- * same values as `object` and keys generated by running each own enumerable
- * property of `object` through `iteratee`.
- *
- * @static
- * @memberOf _
- * @category Object
- * @param {Object} object The object to iterate over.
- * @param {Function|Object|string} [iteratee=_.identity] The function invoked
- * per iteration.
- * @param {*} [thisArg] The `this` binding of `iteratee`.
- * @returns {Object} Returns the new mapped object.
- * @example
- *
- * _.mapKeys({ 'a': 1, 'b': 2 }, function(value, key) {
- * return key + value;
- * });
- * // => { 'a1': 1, 'b2': 2 }
- */
- var mapKeys = createObjectMapper(true);
- /**
- * Creates an object with the same keys as `object` and values generated by
- * running each own enumerable property of `object` through `iteratee`. The
- * iteratee function is bound to `thisArg` and invoked with three arguments:
- * (value, key, object).
- *
- * If a property name is provided for `iteratee` the created `_.property`
- * style callback returns the property value of the given element.
- *
- * If a value is also provided for `thisArg` the created `_.matchesProperty`
- * style callback returns `true` for elements that have a matching property
- * value, else `false`.
- *
- * If an object is provided for `iteratee` the created `_.matches` style
- * callback returns `true` for elements that have the properties of the given
- * object, else `false`.
- *
- * @static
- * @memberOf _
- * @category Object
- * @param {Object} object The object to iterate over.
- * @param {Function|Object|string} [iteratee=_.identity] The function invoked
- * per iteration.
- * @param {*} [thisArg] The `this` binding of `iteratee`.
- * @returns {Object} Returns the new mapped object.
- * @example
- *
- * _.mapValues({ 'a': 1, 'b': 2 }, function(n) {
- * return n * 3;
- * });
- * // => { 'a': 3, 'b': 6 }
- *
- * var users = {
- * 'fred': { 'user': 'fred', 'age': 40 },
- * 'pebbles': { 'user': 'pebbles', 'age': 1 }
- * };
- *
- * // using the `_.property` callback shorthand
- * _.mapValues(users, 'age');
- * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)
- */
- var mapValues = createObjectMapper();
- /**
- * The opposite of `_.pick`; this method creates an object composed of the
- * own and inherited enumerable properties of `object` that are not omitted.
- *
- * @static
- * @memberOf _
- * @category Object
- * @param {Object} object The source object.
- * @param {Function|...(string|string[])} [predicate] The function invoked per
- * iteration or property names to omit, specified as individual property
- * names or arrays of property names.
- * @param {*} [thisArg] The `this` binding of `predicate`.
- * @returns {Object} Returns the new object.
- * @example
- *
- * var object = { 'user': 'fred', 'age': 40 };
- *
- * _.omit(object, 'age');
- * // => { 'user': 'fred' }
- *
- * _.omit(object, _.isNumber);
- * // => { 'user': 'fred' }
- */
- var omit = restParam(function (object, props) {
- if (object == null) {
- return {};
- }
- if (typeof props[0] != 'function') {
- var props = arrayMap(baseFlatten(props), String);
- return pickByArray(object, baseDifference(keysIn(object), props));
- }
- var predicate = bindCallback(props[0], props[1], 3);
- return pickByCallback(object, function (value, key, object) {
- return !predicate(value, key, object);
- });
- });
- /**
- * Creates a two dimensional array of the key-value pairs for `object`,
- * e.g. `[[key1, value1], [key2, value2]]`.
- *
- * @static
- * @memberOf _
- * @category Object
- * @param {Object} object The object to query.
- * @returns {Array} Returns the new array of key-value pairs.
- * @example
- *
- * _.pairs({ 'barney': 36, 'fred': 40 });
- * // => [['barney', 36], ['fred', 40]] (iteration order is not guaranteed)
- */
- function pairs(object) {
- object = toObject(object);
- var index = -1, props = keys(object), length = props.length, result = Array(length);
- while (++index < length) {
- var key = props[index];
- result[index] = [
- key,
- object[key]
- ];
- }
- return result;
- }
- /**
- * Creates an object composed of the picked `object` properties. Property
- * names may be specified as individual arguments or as arrays of property
- * names. If `predicate` is provided it's invoked for each property of `object`
- * picking the properties `predicate` returns truthy for. The predicate is
- * bound to `thisArg` and invoked with three arguments: (value, key, object).
- *
- * @static
- * @memberOf _
- * @category Object
- * @param {Object} object The source object.
- * @param {Function|...(string|string[])} [predicate] The function invoked per
- * iteration or property names to pick, specified as individual property
- * names or arrays of property names.
- * @param {*} [thisArg] The `this` binding of `predicate`.
- * @returns {Object} Returns the new object.
- * @example
- *
- * var object = { 'user': 'fred', 'age': 40 };
- *
- * _.pick(object, 'user');
- * // => { 'user': 'fred' }
- *
- * _.pick(object, _.isString);
- * // => { 'user': 'fred' }
- */
- var pick = restParam(function (object, props) {
- if (object == null) {
- return {};
- }
- return typeof props[0] == 'function' ? pickByCallback(object, bindCallback(props[0], props[1], 3)) : pickByArray(object, baseFlatten(props));
- });
- /**
- * This method is like `_.get` except that if the resolved value is a function
- * it's invoked with the `this` binding of its parent object and its result
- * is returned.
- *
- * @static
- * @memberOf _
- * @category Object
- * @param {Object} object The object to query.
- * @param {Array|string} path The path of the property to resolve.
- * @param {*} [defaultValue] The value returned if the resolved value is `undefined`.
- * @returns {*} Returns the resolved value.
- * @example
- *
- * var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] };
- *
- * _.result(object, 'a[0].b.c1');
- * // => 3
- *
- * _.result(object, 'a[0].b.c2');
- * // => 4
- *
- * _.result(object, 'a.b.c', 'default');
- * // => 'default'
- *
- * _.result(object, 'a.b.c', _.constant('default'));
- * // => 'default'
- */
- function result(object, path, defaultValue) {
- var result = object == null ? undefined : object[path];
- if (result === undefined) {
- if (object != null && !isKey(path, object)) {
- path = toPath(path);
- object = path.length == 1 ? object : baseGet(object, baseSlice(path, 0, -1));
- result = object == null ? undefined : object[last(path)];
- }
- result = result === undefined ? defaultValue : result;
- }
- return isFunction(result) ? result.call(object) : result;
- }
- /**
- * Sets the property value of `path` on `object`. If a portion of `path`
- * does not exist it's created.
- *
- * @static
- * @memberOf _
- * @category Object
- * @param {Object} object The object to augment.
- * @param {Array|string} path The path of the property to set.
- * @param {*} value The value to set.
- * @returns {Object} Returns `object`.
- * @example
- *
- * var object = { 'a': [{ 'b': { 'c': 3 } }] };
- *
- * _.set(object, 'a[0].b.c', 4);
- * console.log(object.a[0].b.c);
- * // => 4
- *
- * _.set(object, 'x[0].y.z', 5);
- * console.log(object.x[0].y.z);
- * // => 5
- */
- function set(object, path, value) {
- if (object == null) {
- return object;
- }
- var pathKey = path + '';
- path = object[pathKey] != null || isKey(path, object) ? [pathKey] : toPath(path);
- var index = -1, length = path.length, lastIndex = length - 1, nested = object;
- while (nested != null && ++index < length) {
- var key = path[index];
- if (isObject(nested)) {
- if (index == lastIndex) {
- nested[key] = value;
- } else if (nested[key] == null) {
- nested[key] = isIndex(path[index + 1]) ? [] : {};
- }
- }
- nested = nested[key];
- }
- return object;
- }
- /**
- * An alternative to `_.reduce`; this method transforms `object` to a new
- * `accumulator` object which is the result of running each of its own enumerable
- * properties through `iteratee`, with each invocation potentially mutating
- * the `accumulator` object. The `iteratee` is bound to `thisArg` and invoked
- * with four arguments: (accumulator, value, key, object). Iteratee functions
- * may exit iteration early by explicitly returning `false`.
- *
- * @static
- * @memberOf _
- * @category Object
- * @param {Array|Object} object The object to iterate over.
- * @param {Function} [iteratee=_.identity] The function invoked per iteration.
- * @param {*} [accumulator] The custom accumulator value.
- * @param {*} [thisArg] The `this` binding of `iteratee`.
- * @returns {*} Returns the accumulated value.
- * @example
- *
- * _.transform([2, 3, 4], function(result, n) {
- * result.push(n *= n);
- * return n % 2 == 0;
- * });
- * // => [4, 9]
- *
- * _.transform({ 'a': 1, 'b': 2 }, function(result, n, key) {
- * result[key] = n * 3;
- * });
- * // => { 'a': 3, 'b': 6 }
- */
- function transform(object, iteratee, accumulator, thisArg) {
- var isArr = isArray(object) || isTypedArray(object);
- iteratee = getCallback(iteratee, thisArg, 4);
- if (accumulator == null) {
- if (isArr || isObject(object)) {
- var Ctor = object.constructor;
- if (isArr) {
- accumulator = isArray(object) ? new Ctor() : [];
- } else {
- accumulator = baseCreate(isFunction(Ctor) ? Ctor.prototype : undefined);
- }
- } else {
- accumulator = {};
- }
- }
- (isArr ? arrayEach : baseForOwn)(object, function (value, index, object) {
- return iteratee(accumulator, value, index, object);
- });
- return accumulator;
- }
- /**
- * Creates an array of the own enumerable property values of `object`.
- *
- * **Note:** Non-object values are coerced to objects.
- *
- * @static
- * @memberOf _
- * @category Object
- * @param {Object} object The object to query.
- * @returns {Array} Returns the array of property values.
- * @example
- *
- * function Foo() {
- * this.a = 1;
- * this.b = 2;
- * }
- *
- * Foo.prototype.c = 3;
- *
- * _.values(new Foo);
- * // => [1, 2] (iteration order is not guaranteed)
- *
- * _.values('hi');
- * // => ['h', 'i']
- */
- function values(object) {
- return baseValues(object, keys(object));
- }
- /**
- * Creates an array of the own and inherited enumerable property values
- * of `object`.
- *
- * **Note:** Non-object values are coerced to objects.
- *
- * @static
- * @memberOf _
- * @category Object
- * @param {Object} object The object to query.
- * @returns {Array} Returns the array of property values.
- * @example
- *
- * function Foo() {
- * this.a = 1;
- * this.b = 2;
- * }
- *
- * Foo.prototype.c = 3;
- *
- * _.valuesIn(new Foo);
- * // => [1, 2, 3] (iteration order is not guaranteed)
- */
- function valuesIn(object) {
- return baseValues(object, keysIn(object));
- }
- /*------------------------------------------------------------------------*/
- /**
- * Checks if `n` is between `start` and up to but not including, `end`. If
- * `end` is not specified it's set to `start` with `start` then set to `0`.
- *
- * @static
- * @memberOf _
- * @category Number
- * @param {number} n The number to check.
- * @param {number} [start=0] The start of the range.
- * @param {number} end The end of the range.
- * @returns {boolean} Returns `true` if `n` is in the range, else `false`.
- * @example
- *
- * _.inRange(3, 2, 4);
- * // => true
- *
- * _.inRange(4, 8);
- * // => true
- *
- * _.inRange(4, 2);
- * // => false
- *
- * _.inRange(2, 2);
- * // => false
- *
- * _.inRange(1.2, 2);
- * // => true
- *
- * _.inRange(5.2, 4);
- * // => false
- */
- function inRange(value, start, end) {
- start = +start || 0;
- if (end === undefined) {
- end = start;
- start = 0;
- } else {
- end = +end || 0;
- }
- return value >= nativeMin(start, end) && value < nativeMax(start, end);
- }
- /**
- * Produces a random number between `min` and `max` (inclusive). If only one
- * argument is provided a number between `0` and the given number is returned.
- * If `floating` is `true`, or either `min` or `max` are floats, a floating-point
- * number is returned instead of an integer.
- *
- * @static
- * @memberOf _
- * @category Number
- * @param {number} [min=0] The minimum possible value.
- * @param {number} [max=1] The maximum possible value.
- * @param {boolean} [floating] Specify returning a floating-point number.
- * @returns {number} Returns the random number.
- * @example
- *
- * _.random(0, 5);
- * // => an integer between 0 and 5
- *
- * _.random(5);
- * // => also an integer between 0 and 5
- *
- * _.random(5, true);
- * // => a floating-point number between 0 and 5
- *
- * _.random(1.2, 5.2);
- * // => a floating-point number between 1.2 and 5.2
- */
- function random(min, max, floating) {
- if (floating && isIterateeCall(min, max, floating)) {
- max = floating = undefined;
- }
- var noMin = min == null, noMax = max == null;
- if (floating == null) {
- if (noMax && typeof min == 'boolean') {
- floating = min;
- min = 1;
- } else if (typeof max == 'boolean') {
- floating = max;
- noMax = true;
- }
- }
- if (noMin && noMax) {
- max = 1;
- noMax = false;
- }
- min = +min || 0;
- if (noMax) {
- max = min;
- min = 0;
- } else {
- max = +max || 0;
- }
- if (floating || min % 1 || max % 1) {
- var rand = nativeRandom();
- return nativeMin(min + rand * (max - min + parseFloat('1e-' + ((rand + '').length - 1))), max);
- }
- return baseRandom(min, max);
- }
- /*------------------------------------------------------------------------*/
- /**
- * Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase).
- *
- * @static
- * @memberOf _
- * @category String
- * @param {string} [string=''] The string to convert.
- * @returns {string} Returns the camel cased string.
- * @example
- *
- * _.camelCase('Foo Bar');
- * // => 'fooBar'
- *
- * _.camelCase('--foo-bar');
- * // => 'fooBar'
- *
- * _.camelCase('__foo_bar__');
- * // => 'fooBar'
- */
- var camelCase = createCompounder(function (result, word, index) {
- word = word.toLowerCase();
- return result + (index ? word.charAt(0).toUpperCase() + word.slice(1) : word);
- });
- /**
- * Capitalizes the first character of `string`.
- *
- * @static
- * @memberOf _
- * @category String
- * @param {string} [string=''] The string to capitalize.
- * @returns {string} Returns the capitalized string.
- * @example
- *
- * _.capitalize('fred');
- * // => 'Fred'
- */
- function capitalize(string) {
- string = baseToString(string);
- return string && string.charAt(0).toUpperCase() + string.slice(1);
- }
- /**
- * Deburrs `string` by converting [latin-1 supplementary letters](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table)
- * to basic latin letters and removing [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks).
- *
- * @static
- * @memberOf _
- * @category String
- * @param {string} [string=''] The string to deburr.
- * @returns {string} Returns the deburred string.
- * @example
- *
- * _.deburr('déjà vu');
- * // => 'deja vu'
- */
- function deburr(string) {
- string = baseToString(string);
- return string && string.replace(reLatin1, deburrLetter).replace(reComboMark, '');
- }
- /**
- * Checks if `string` ends with the given target string.
- *
- * @static
- * @memberOf _
- * @category String
- * @param {string} [string=''] The string to search.
- * @param {string} [target] The string to search for.
- * @param {number} [position=string.length] The position to search from.
- * @returns {boolean} Returns `true` if `string` ends with `target`, else `false`.
- * @example
- *
- * _.endsWith('abc', 'c');
- * // => true
- *
- * _.endsWith('abc', 'b');
- * // => false
- *
- * _.endsWith('abc', 'b', 2);
- * // => true
- */
- function endsWith(string, target, position) {
- string = baseToString(string);
- target = target + '';
- var length = string.length;
- position = position === undefined ? length : nativeMin(position < 0 ? 0 : +position || 0, length);
- position -= target.length;
- return position >= 0 && string.indexOf(target, position) == position;
- }
- /**
- * Converts the characters "&", "<", ">", '"', "'", and "\`", in `string` to
- * their corresponding HTML entities.
- *
- * **Note:** No other characters are escaped. To escape additional characters
- * use a third-party library like [_he_](https://mths.be/he).
- *
- * Though the ">" character is escaped for symmetry, characters like
- * ">" and "/" don't need escaping in HTML and have no special meaning
- * unless they're part of a tag or unquoted attribute value.
- * See [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands)
- * (under "semi-related fun fact") for more details.
- *
- * Backticks are escaped because in Internet Explorer < 9, they can break out
- * of attribute values or HTML comments. See [#59](https://html5sec.org/#59),
- * [#102](https://html5sec.org/#102), [#108](https://html5sec.org/#108), and
- * [#133](https://html5sec.org/#133) of the [HTML5 Security Cheatsheet](https://html5sec.org/)
- * for more details.
- *
- * When working with HTML you should always [quote attribute values](http://wonko.com/post/html-escaping)
- * to reduce XSS vectors.
- *
- * @static
- * @memberOf _
- * @category String
- * @param {string} [string=''] The string to escape.
- * @returns {string} Returns the escaped string.
- * @example
- *
- * _.escape('fred, barney, & pebbles');
- * // => 'fred, barney, & pebbles'
- */
- function escape(string) {
- // Reset `lastIndex` because in IE < 9 `String#replace` does not.
- string = baseToString(string);
- return string && reHasUnescapedHtml.test(string) ? string.replace(reUnescapedHtml, escapeHtmlChar) : string;
- }
- /**
- * Escapes the `RegExp` special characters "\", "/", "^", "$", ".", "|", "?",
- * "*", "+", "(", ")", "[", "]", "{" and "}" in `string`.
- *
- * @static
- * @memberOf _
- * @category String
- * @param {string} [string=''] The string to escape.
- * @returns {string} Returns the escaped string.
- * @example
- *
- * _.escapeRegExp('[lodash](https://lodash.com/)');
- * // => '\[lodash\]\(https:\/\/lodash\.com\/\)'
- */
- function escapeRegExp(string) {
- string = baseToString(string);
- return string && reHasRegExpChars.test(string) ? string.replace(reRegExpChars, escapeRegExpChar) : string || '(?:)';
- }
- /**
- * Converts `string` to [kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles).
- *
- * @static
- * @memberOf _
- * @category String
- * @param {string} [string=''] The string to convert.
- * @returns {string} Returns the kebab cased string.
- * @example
- *
- * _.kebabCase('Foo Bar');
- * // => 'foo-bar'
- *
- * _.kebabCase('fooBar');
- * // => 'foo-bar'
- *
- * _.kebabCase('__foo_bar__');
- * // => 'foo-bar'
- */
- var kebabCase = createCompounder(function (result, word, index) {
- return result + (index ? '-' : '') + word.toLowerCase();
- });
- /**
- * Pads `string` on the left and right sides if it's shorter than `length`.
- * Padding characters are truncated if they can't be evenly divided by `length`.
- *
- * @static
- * @memberOf _
- * @category String
- * @param {string} [string=''] The string to pad.
- * @param {number} [length=0] The padding length.
- * @param {string} [chars=' '] The string used as padding.
- * @returns {string} Returns the padded string.
- * @example
- *
- * _.pad('abc', 8);
- * // => ' abc '
- *
- * _.pad('abc', 8, '_-');
- * // => '_-abc_-_'
- *
- * _.pad('abc', 3);
- * // => 'abc'
- */
- function pad(string, length, chars) {
- string = baseToString(string);
- length = +length;
- var strLength = string.length;
- if (strLength >= length || !nativeIsFinite(length)) {
- return string;
- }
- var mid = (length - strLength) / 2, leftLength = nativeFloor(mid), rightLength = nativeCeil(mid);
- chars = createPadding('', rightLength, chars);
- return chars.slice(0, leftLength) + string + chars;
- }
- /**
- * Pads `string` on the left side if it's shorter than `length`. Padding
- * characters are truncated if they exceed `length`.
- *
- * @static
- * @memberOf _
- * @category String
- * @param {string} [string=''] The string to pad.
- * @param {number} [length=0] The padding length.
- * @param {string} [chars=' '] The string used as padding.
- * @returns {string} Returns the padded string.
- * @example
- *
- * _.padLeft('abc', 6);
- * // => ' abc'
- *
- * _.padLeft('abc', 6, '_-');
- * // => '_-_abc'
- *
- * _.padLeft('abc', 3);
- * // => 'abc'
- */
- var padLeft = createPadDir();
- /**
- * Pads `string` on the right side if it's shorter than `length`. Padding
- * characters are truncated if they exceed `length`.
- *
- * @static
- * @memberOf _
- * @category String
- * @param {string} [string=''] The string to pad.
- * @param {number} [length=0] The padding length.
- * @param {string} [chars=' '] The string used as padding.
- * @returns {string} Returns the padded string.
- * @example
- *
- * _.padRight('abc', 6);
- * // => 'abc '
- *
- * _.padRight('abc', 6, '_-');
- * // => 'abc_-_'
- *
- * _.padRight('abc', 3);
- * // => 'abc'
- */
- var padRight = createPadDir(true);
- /**
- * Converts `string` to an integer of the specified radix. If `radix` is
- * `undefined` or `0`, a `radix` of `10` is used unless `value` is a hexadecimal,
- * in which case a `radix` of `16` is used.
- *
- * **Note:** This method aligns with the [ES5 implementation](https://es5.github.io/#E)
- * of `parseInt`.
- *
- * @static
- * @memberOf _
- * @category String
- * @param {string} string The string to convert.
- * @param {number} [radix] The radix to interpret `value` by.
- * @param- {Object} [guard] Enables use as a callback for functions like `_.map`.
- * @returns {number} Returns the converted integer.
- * @example
- *
- * _.parseInt('08');
- * // => 8
- *
- * _.map(['6', '08', '10'], _.parseInt);
- * // => [6, 8, 10]
- */
- function parseInt(string, radix, guard) {
- // Firefox < 21 and Opera < 15 follow ES3 for `parseInt`.
- // Chrome fails to trim leading <BOM> whitespace characters.
- // See https://code.google.com/p/v8/issues/detail?id=3109 for more details.
- if (guard ? isIterateeCall(string, radix, guard) : radix == null) {
- radix = 0;
- } else if (radix) {
- radix = +radix;
- }
- string = trim(string);
- return nativeParseInt(string, radix || (reHasHexPrefix.test(string) ? 16 : 10));
- }
- /**
- * Repeats the given string `n` times.
- *
- * @static
- * @memberOf _
- * @category String
- * @param {string} [string=''] The string to repeat.
- * @param {number} [n=0] The number of times to repeat the string.
- * @returns {string} Returns the repeated string.
- * @example
- *
- * _.repeat('*', 3);
- * // => '***'
- *
- * _.repeat('abc', 2);
- * // => 'abcabc'
- *
- * _.repeat('abc', 0);
- * // => ''
- */
- function repeat(string, n) {
- var result = '';
- string = baseToString(string);
- n = +n;
- if (n < 1 || !string || !nativeIsFinite(n)) {
- return result;
- }
- // Leverage the exponentiation by squaring algorithm for a faster repeat.
- // See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details.
- do {
- if (n % 2) {
- result += string;
- }
- n = nativeFloor(n / 2);
- string += string;
- } while (n);
- return result;
- }
- /**
- * Converts `string` to [snake case](https://en.wikipedia.org/wiki/Snake_case).
- *
- * @static
- * @memberOf _
- * @category String
- * @param {string} [string=''] The string to convert.
- * @returns {string} Returns the snake cased string.
- * @example
- *
- * _.snakeCase('Foo Bar');
- * // => 'foo_bar'
- *
- * _.snakeCase('fooBar');
- * // => 'foo_bar'
- *
- * _.snakeCase('--foo-bar');
- * // => 'foo_bar'
- */
- var snakeCase = createCompounder(function (result, word, index) {
- return result + (index ? '_' : '') + word.toLowerCase();
- });
- /**
- * Converts `string` to [start case](https://en.wikipedia.org/wiki/Letter_case#Stylistic_or_specialised_usage).
- *
- * @static
- * @memberOf _
- * @category String
- * @param {string} [string=''] The string to convert.
- * @returns {string} Returns the start cased string.
- * @example
- *
- * _.startCase('--foo-bar');
- * // => 'Foo Bar'
- *
- * _.startCase('fooBar');
- * // => 'Foo Bar'
- *
- * _.startCase('__foo_bar__');
- * // => 'Foo Bar'
- */
- var startCase = createCompounder(function (result, word, index) {
- return result + (index ? ' ' : '') + (word.charAt(0).toUpperCase() + word.slice(1));
- });
- /**
- * Checks if `string` starts with the given target string.
- *
- * @static
- * @memberOf _
- * @category String
- * @param {string} [string=''] The string to search.
- * @param {string} [target] The string to search for.
- * @param {number} [position=0] The position to search from.
- * @returns {boolean} Returns `true` if `string` starts with `target`, else `false`.
- * @example
- *
- * _.startsWith('abc', 'a');
- * // => true
- *
- * _.startsWith('abc', 'b');
- * // => false
- *
- * _.startsWith('abc', 'b', 1);
- * // => true
- */
- function startsWith(string, target, position) {
- string = baseToString(string);
- position = position == null ? 0 : nativeMin(position < 0 ? 0 : +position || 0, string.length);
- return string.lastIndexOf(target, position) == position;
- }
- /**
- * Creates a compiled template function that can interpolate data properties
- * in "interpolate" delimiters, HTML-escape interpolated data properties in
- * "escape" delimiters, and execute JavaScript in "evaluate" delimiters. Data
- * properties may be accessed as free variables in the template. If a setting
- * object is provided it takes precedence over `_.templateSettings` values.
- *
- * **Note:** In the development build `_.template` utilizes
- * [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl)
- * for easier debugging.
- *
- * For more information on precompiling templates see
- * [lodash's custom builds documentation](https://lodash.com/custom-builds).
- *
- * For more information on Chrome extension sandboxes see
- * [Chrome's extensions documentation](https://developer.chrome.com/extensions/sandboxingEval).
- *
- * @static
- * @memberOf _
- * @category String
- * @param {string} [string=''] The template string.
- * @param {Object} [options] The options object.
- * @param {RegExp} [options.escape] The HTML "escape" delimiter.
- * @param {RegExp} [options.evaluate] The "evaluate" delimiter.
- * @param {Object} [options.imports] An object to import into the template as free variables.
- * @param {RegExp} [options.interpolate] The "interpolate" delimiter.
- * @param {string} [options.sourceURL] The sourceURL of the template's compiled source.
- * @param {string} [options.variable] The data object variable name.
- * @param- {Object} [otherOptions] Enables the legacy `options` param signature.
- * @returns {Function} Returns the compiled template function.
- * @example
- *
- * // using the "interpolate" delimiter to create a compiled template
- * var compiled = _.template('hello <%= user %>!');
- * compiled({ 'user': 'fred' });
- * // => 'hello fred!'
- *
- * // using the HTML "escape" delimiter to escape data property values
- * var compiled = _.template('<b><%- value %></b>');
- * compiled({ 'value': '<script>' });
- * // => '<b><script></b>'
- *
- * // using the "evaluate" delimiter to execute JavaScript and generate HTML
- * var compiled = _.template('<% _.forEach(users, function(user) { %><li><%- user %></li><% }); %>');
- * compiled({ 'users': ['fred', 'barney'] });
- * // => '<li>fred</li><li>barney</li>'
- *
- * // using the internal `print` function in "evaluate" delimiters
- * var compiled = _.template('<% print("hello " + user); %>!');
- * compiled({ 'user': 'barney' });
- * // => 'hello barney!'
- *
- * // using the ES delimiter as an alternative to the default "interpolate" delimiter
- * var compiled = _.template('hello ${ user }!');
- * compiled({ 'user': 'pebbles' });
- * // => 'hello pebbles!'
- *
- * // using custom template delimiters
- * _.templateSettings.interpolate = /{{([\s\S]+?)}}/g;
- * var compiled = _.template('hello {{ user }}!');
- * compiled({ 'user': 'mustache' });
- * // => 'hello mustache!'
- *
- * // using backslashes to treat delimiters as plain text
- * var compiled = _.template('<%= "\\<%- value %\\>" %>');
- * compiled({ 'value': 'ignored' });
- * // => '<%- value %>'
- *
- * // using the `imports` option to import `jQuery` as `jq`
- * var text = '<% jq.each(users, function(user) { %><li><%- user %></li><% }); %>';
- * var compiled = _.template(text, { 'imports': { 'jq': jQuery } });
- * compiled({ 'users': ['fred', 'barney'] });
- * // => '<li>fred</li><li>barney</li>'
- *
- * // using the `sourceURL` option to specify a custom sourceURL for the template
- * var compiled = _.template('hello <%= user %>!', { 'sourceURL': '/basic/greeting.jst' });
- * compiled(data);
- * // => find the source of "greeting.jst" under the Sources tab or Resources panel of the web inspector
- *
- * // using the `variable` option to ensure a with-statement isn't used in the compiled template
- * var compiled = _.template('hi <%= data.user %>!', { 'variable': 'data' });
- * compiled.source;
- * // => function(data) {
- * // var __t, __p = '';
- * // __p += 'hi ' + ((__t = ( data.user )) == null ? '' : __t) + '!';
- * // return __p;
- * // }
- *
- * // using the `source` property to inline compiled templates for meaningful
- * // line numbers in error messages and a stack trace
- * fs.writeFileSync(path.join(cwd, 'jst.js'), '\
- * var JST = {\
- * "main": ' + _.template(mainText).source + '\
- * };\
- * ');
- */
- function template(string, options, otherOptions) {
- // Based on John Resig's `tmpl` implementation (http://ejohn.org/blog/javascript-micro-templating/)
- // and Laura Doktorova's doT.js (https://github.com/olado/doT).
- var settings = lodash.templateSettings;
- if (otherOptions && isIterateeCall(string, options, otherOptions)) {
- options = otherOptions = undefined;
- }
- string = baseToString(string);
- options = assignWith(baseAssign({}, otherOptions || options), settings, assignOwnDefaults);
- var imports = assignWith(baseAssign({}, options.imports), settings.imports, assignOwnDefaults), importsKeys = keys(imports), importsValues = baseValues(imports, importsKeys);
- var isEscaping, isEvaluating, index = 0, interpolate = options.interpolate || reNoMatch, source = '__p += \'';
- // Compile the regexp to match each delimiter.
- var reDelimiters = RegExp((options.escape || reNoMatch).source + '|' + interpolate.source + '|' + (interpolate === reInterpolate ? reEsTemplate : reNoMatch).source + '|' + (options.evaluate || reNoMatch).source + '|$', 'g');
- // Use a sourceURL for easier debugging.
- var sourceURL = '//# sourceURL=' + ('sourceURL' in options ? options.sourceURL : 'lodash.templateSources[' + ++templateCounter + ']') + '\n';
- string.replace(reDelimiters, function (match, escapeValue, interpolateValue, esTemplateValue, evaluateValue, offset) {
- interpolateValue || (interpolateValue = esTemplateValue);
- // Escape characters that can't be included in string literals.
- source += string.slice(index, offset).replace(reUnescapedString, escapeStringChar);
- // Replace delimiters with snippets.
- if (escapeValue) {
- isEscaping = true;
- source += '\' +\n__e(' + escapeValue + ') +\n\'';
- }
- if (evaluateValue) {
- isEvaluating = true;
- source += '\';\n' + evaluateValue + ';\n__p += \'';
- }
- if (interpolateValue) {
- source += '\' +\n((__t = (' + interpolateValue + ')) == null ? \'\' : __t) +\n\'';
- }
- index = offset + match.length;
- // The JS engine embedded in Adobe products requires returning the `match`
- // string in order to produce the correct `offset` value.
- return match;
- });
- source += '\';\n';
- // If `variable` is not specified wrap a with-statement around the generated
- // code to add the data object to the top of the scope chain.
- var variable = options.variable;
- if (!variable) {
- source = 'with (obj) {\n' + source + '\n}\n';
- }
- // Cleanup code by stripping empty strings.
- source = (isEvaluating ? source.replace(reEmptyStringLeading, '') : source).replace(reEmptyStringMiddle, '$1').replace(reEmptyStringTrailing, '$1;');
- // Frame code as the function body.
- source = 'function(' + (variable || 'obj') + ') {\n' + (variable ? '' : 'obj || (obj = {});\n') + 'var __t, __p = \'\'' + (isEscaping ? ', __e = _.escape' : '') + (isEvaluating ? ', __j = Array.prototype.join;\n' + 'function print() { __p += __j.call(arguments, \'\') }\n' : ';\n') + source + 'return __p\n}';
- var result = attempt(function () {
- return Function(importsKeys, sourceURL + 'return ' + source).apply(undefined, importsValues);
- });
- // Provide the compiled function's source by its `toString` method or
- // the `source` property as a convenience for inlining compiled templates.
- result.source = source;
- if (isError(result)) {
- throw result;
- }
- return result;
- }
- /**
- * Removes leading and trailing whitespace or specified characters from `string`.
- *
- * @static
- * @memberOf _
- * @category String
- * @param {string} [string=''] The string to trim.
- * @param {string} [chars=whitespace] The characters to trim.
- * @param- {Object} [guard] Enables use as a callback for functions like `_.map`.
- * @returns {string} Returns the trimmed string.
- * @example
- *
- * _.trim(' abc ');
- * // => 'abc'
- *
- * _.trim('-_-abc-_-', '_-');
- * // => 'abc'
- *
- * _.map([' foo ', ' bar '], _.trim);
- * // => ['foo', 'bar']
- */
- function trim(string, chars, guard) {
- var value = string;
- string = baseToString(string);
- if (!string) {
- return string;
- }
- if (guard ? isIterateeCall(value, chars, guard) : chars == null) {
- return string.slice(trimmedLeftIndex(string), trimmedRightIndex(string) + 1);
- }
- chars = chars + '';
- return string.slice(charsLeftIndex(string, chars), charsRightIndex(string, chars) + 1);
- }
- /**
- * Removes leading whitespace or specified characters from `string`.
- *
- * @static
- * @memberOf _
- * @category String
- * @param {string} [string=''] The string to trim.
- * @param {string} [chars=whitespace] The characters to trim.
- * @param- {Object} [guard] Enables use as a callback for functions like `_.map`.
- * @returns {string} Returns the trimmed string.
- * @example
- *
- * _.trimLeft(' abc ');
- * // => 'abc '
- *
- * _.trimLeft('-_-abc-_-', '_-');
- * // => 'abc-_-'
- */
- function trimLeft(string, chars, guard) {
- var value = string;
- string = baseToString(string);
- if (!string) {
- return string;
- }
- if (guard ? isIterateeCall(value, chars, guard) : chars == null) {
- return string.slice(trimmedLeftIndex(string));
- }
- return string.slice(charsLeftIndex(string, chars + ''));
- }
- /**
- * Removes trailing whitespace or specified characters from `string`.
- *
- * @static
- * @memberOf _
- * @category String
- * @param {string} [string=''] The string to trim.
- * @param {string} [chars=whitespace] The characters to trim.
- * @param- {Object} [guard] Enables use as a callback for functions like `_.map`.
- * @returns {string} Returns the trimmed string.
- * @example
- *
- * _.trimRight(' abc ');
- * // => ' abc'
- *
- * _.trimRight('-_-abc-_-', '_-');
- * // => '-_-abc'
- */
- function trimRight(string, chars, guard) {
- var value = string;
- string = baseToString(string);
- if (!string) {
- return string;
- }
- if (guard ? isIterateeCall(value, chars, guard) : chars == null) {
- return string.slice(0, trimmedRightIndex(string) + 1);
- }
- return string.slice(0, charsRightIndex(string, chars + '') + 1);
- }
- /**
- * Truncates `string` if it's longer than the given maximum string length.
- * The last characters of the truncated string are replaced with the omission
- * string which defaults to "...".
- *
- * @static
- * @memberOf _
- * @category String
- * @param {string} [string=''] The string to truncate.
- * @param {Object|number} [options] The options object or maximum string length.
- * @param {number} [options.length=30] The maximum string length.
- * @param {string} [options.omission='...'] The string to indicate text is omitted.
- * @param {RegExp|string} [options.separator] The separator pattern to truncate to.
- * @param- {Object} [guard] Enables use as a callback for functions like `_.map`.
- * @returns {string} Returns the truncated string.
- * @example
- *
- * _.trunc('hi-diddly-ho there, neighborino');
- * // => 'hi-diddly-ho there, neighbo...'
- *
- * _.trunc('hi-diddly-ho there, neighborino', 24);
- * // => 'hi-diddly-ho there, n...'
- *
- * _.trunc('hi-diddly-ho there, neighborino', {
- * 'length': 24,
- * 'separator': ' '
- * });
- * // => 'hi-diddly-ho there,...'
- *
- * _.trunc('hi-diddly-ho there, neighborino', {
- * 'length': 24,
- * 'separator': /,? +/
- * });
- * // => 'hi-diddly-ho there...'
- *
- * _.trunc('hi-diddly-ho there, neighborino', {
- * 'omission': ' [...]'
- * });
- * // => 'hi-diddly-ho there, neig [...]'
- */
- function trunc(string, options, guard) {
- if (guard && isIterateeCall(string, options, guard)) {
- options = undefined;
- }
- var length = DEFAULT_TRUNC_LENGTH, omission = DEFAULT_TRUNC_OMISSION;
- if (options != null) {
- if (isObject(options)) {
- var separator = 'separator' in options ? options.separator : separator;
- length = 'length' in options ? +options.length || 0 : length;
- omission = 'omission' in options ? baseToString(options.omission) : omission;
- } else {
- length = +options || 0;
- }
- }
- string = baseToString(string);
- if (length >= string.length) {
- return string;
- }
- var end = length - omission.length;
- if (end < 1) {
- return omission;
- }
- var result = string.slice(0, end);
- if (separator == null) {
- return result + omission;
- }
- if (isRegExp(separator)) {
- if (string.slice(end).search(separator)) {
- var match, newEnd, substring = string.slice(0, end);
- if (!separator.global) {
- separator = RegExp(separator.source, (reFlags.exec(separator) || '') + 'g');
- }
- separator.lastIndex = 0;
- while (match = separator.exec(substring)) {
- newEnd = match.index;
- }
- result = result.slice(0, newEnd == null ? end : newEnd);
- }
- } else if (string.indexOf(separator, end) != end) {
- var index = result.lastIndexOf(separator);
- if (index > -1) {
- result = result.slice(0, index);
- }
- }
- return result + omission;
- }
- /**
- * The inverse of `_.escape`; this method converts the HTML entities
- * `&`, `<`, `>`, `"`, `'`, and ``` in `string` to their
- * corresponding characters.
- *
- * **Note:** No other HTML entities are unescaped. To unescape additional HTML
- * entities use a third-party library like [_he_](https://mths.be/he).
- *
- * @static
- * @memberOf _
- * @category String
- * @param {string} [string=''] The string to unescape.
- * @returns {string} Returns the unescaped string.
- * @example
- *
- * _.unescape('fred, barney, & pebbles');
- * // => 'fred, barney, & pebbles'
- */
- function unescape(string) {
- string = baseToString(string);
- return string && reHasEscapedHtml.test(string) ? string.replace(reEscapedHtml, unescapeHtmlChar) : string;
- }
- /**
- * Splits `string` into an array of its words.
- *
- * @static
- * @memberOf _
- * @category String
- * @param {string} [string=''] The string to inspect.
- * @param {RegExp|string} [pattern] The pattern to match words.
- * @param- {Object} [guard] Enables use as a callback for functions like `_.map`.
- * @returns {Array} Returns the words of `string`.
- * @example
- *
- * _.words('fred, barney, & pebbles');
- * // => ['fred', 'barney', 'pebbles']
- *
- * _.words('fred, barney, & pebbles', /[^, ]+/g);
- * // => ['fred', 'barney', '&', 'pebbles']
- */
- function words(string, pattern, guard) {
- if (guard && isIterateeCall(string, pattern, guard)) {
- pattern = undefined;
- }
- string = baseToString(string);
- return string.match(pattern || reWords) || [];
- }
- /*------------------------------------------------------------------------*/
- /**
- * Attempts to invoke `func`, returning either the result or the caught error
- * object. Any additional arguments are provided to `func` when it's invoked.
- *
- * @static
- * @memberOf _
- * @category Utility
- * @param {Function} func The function to attempt.
- * @returns {*} Returns the `func` result or error object.
- * @example
- *
- * // avoid throwing errors for invalid selectors
- * var elements = _.attempt(function(selector) {
- * return document.querySelectorAll(selector);
- * }, '>_>');
- *
- * if (_.isError(elements)) {
- * elements = [];
- * }
- */
- var attempt = restParam(function (func, args) {
- try {
- return func.apply(undefined, args);
- } catch (e) {
- return isError(e) ? e : new Error(e);
- }
- });
- /**
- * Creates a function that invokes `func` with the `this` binding of `thisArg`
- * and arguments of the created function. If `func` is a property name the
- * created callback returns the property value for a given element. If `func`
- * is an object the created callback returns `true` for elements that contain
- * the equivalent object properties, otherwise it returns `false`.
- *
- * @static
- * @memberOf _
- * @alias iteratee
- * @category Utility
- * @param {*} [func=_.identity] The value to convert to a callback.
- * @param {*} [thisArg] The `this` binding of `func`.
- * @param- {Object} [guard] Enables use as a callback for functions like `_.map`.
- * @returns {Function} Returns the callback.
- * @example
- *
- * var users = [
- * { 'user': 'barney', 'age': 36 },
- * { 'user': 'fred', 'age': 40 }
- * ];
- *
- * // wrap to create custom callback shorthands
- * _.callback = _.wrap(_.callback, function(callback, func, thisArg) {
- * var match = /^(.+?)__([gl]t)(.+)$/.exec(func);
- * if (!match) {
- * return callback(func, thisArg);
- * }
- * return function(object) {
- * return match[2] == 'gt'
- * ? object[match[1]] > match[3]
- * : object[match[1]] < match[3];
- * };
- * });
- *
- * _.filter(users, 'age__gt36');
- * // => [{ 'user': 'fred', 'age': 40 }]
- */
- function callback(func, thisArg, guard) {
- if (guard && isIterateeCall(func, thisArg, guard)) {
- thisArg = undefined;
- }
- return isObjectLike(func) ? matches(func) : baseCallback(func, thisArg);
- }
- /**
- * Creates a function that returns `value`.
- *
- * @static
- * @memberOf _
- * @category Utility
- * @param {*} value The value to return from the new function.
- * @returns {Function} Returns the new function.
- * @example
- *
- * var object = { 'user': 'fred' };
- * var getter = _.constant(object);
- *
- * getter() === object;
- * // => true
- */
- function constant(value) {
- return function () {
- return value;
- };
- }
- /**
- * This method returns the first argument provided to it.
- *
- * @static
- * @memberOf _
- * @category Utility
- * @param {*} value Any value.
- * @returns {*} Returns `value`.
- * @example
- *
- * var object = { 'user': 'fred' };
- *
- * _.identity(object) === object;
- * // => true
- */
- function identity(value) {
- return value;
- }
- /**
- * Creates a function that performs a deep comparison between a given object
- * and `source`, returning `true` if the given object has equivalent property
- * values, else `false`.
- *
- * **Note:** This method supports comparing arrays, booleans, `Date` objects,
- * numbers, `Object` objects, regexes, and strings. Objects are compared by
- * their own, not inherited, enumerable properties. For comparing a single
- * own or inherited property value see `_.matchesProperty`.
- *
- * @static
- * @memberOf _
- * @category Utility
- * @param {Object} source The object of property values to match.
- * @returns {Function} Returns the new function.
- * @example
- *
- * var users = [
- * { 'user': 'barney', 'age': 36, 'active': true },
- * { 'user': 'fred', 'age': 40, 'active': false }
- * ];
- *
- * _.filter(users, _.matches({ 'age': 40, 'active': false }));
- * // => [{ 'user': 'fred', 'age': 40, 'active': false }]
- */
- function matches(source) {
- return baseMatches(baseClone(source, true));
- }
- /**
- * Creates a function that compares the property value of `path` on a given
- * object to `value`.
- *
- * **Note:** This method supports comparing arrays, booleans, `Date` objects,
- * numbers, `Object` objects, regexes, and strings. Objects are compared by
- * their own, not inherited, enumerable properties.
- *
- * @static
- * @memberOf _
- * @category Utility
- * @param {Array|string} path The path of the property to get.
- * @param {*} srcValue The value to match.
- * @returns {Function} Returns the new function.
- * @example
- *
- * var users = [
- * { 'user': 'barney' },
- * { 'user': 'fred' }
- * ];
- *
- * _.find(users, _.matchesProperty('user', 'fred'));
- * // => { 'user': 'fred' }
- */
- function matchesProperty(path, srcValue) {
- return baseMatchesProperty(path, baseClone(srcValue, true));
- }
- /**
- * Creates a function that invokes the method at `path` on a given object.
- * Any additional arguments are provided to the invoked method.
- *
- * @static
- * @memberOf _
- * @category Utility
- * @param {Array|string} path The path of the method to invoke.
- * @param {...*} [args] The arguments to invoke the method with.
- * @returns {Function} Returns the new function.
- * @example
- *
- * var objects = [
- * { 'a': { 'b': { 'c': _.constant(2) } } },
- * { 'a': { 'b': { 'c': _.constant(1) } } }
- * ];
- *
- * _.map(objects, _.method('a.b.c'));
- * // => [2, 1]
- *
- * _.invoke(_.sortBy(objects, _.method(['a', 'b', 'c'])), 'a.b.c');
- * // => [1, 2]
- */
- var method = restParam(function (path, args) {
- return function (object) {
- return invokePath(object, path, args);
- };
- });
- /**
- * The opposite of `_.method`; this method creates a function that invokes
- * the method at a given path on `object`. Any additional arguments are
- * provided to the invoked method.
- *
- * @static
- * @memberOf _
- * @category Utility
- * @param {Object} object The object to query.
- * @param {...*} [args] The arguments to invoke the method with.
- * @returns {Function} Returns the new function.
- * @example
- *
- * var array = _.times(3, _.constant),
- * object = { 'a': array, 'b': array, 'c': array };
- *
- * _.map(['a[2]', 'c[0]'], _.methodOf(object));
- * // => [2, 0]
- *
- * _.map([['a', '2'], ['c', '0']], _.methodOf(object));
- * // => [2, 0]
- */
- var methodOf = restParam(function (object, args) {
- return function (path) {
- return invokePath(object, path, args);
- };
- });
- /**
- * Adds all own enumerable function properties of a source object to the
- * destination object. If `object` is a function then methods are added to
- * its prototype as well.
- *
- * **Note:** Use `_.runInContext` to create a pristine `lodash` function to
- * avoid conflicts caused by modifying the original.
- *
- * @static
- * @memberOf _
- * @category Utility
- * @param {Function|Object} [object=lodash] The destination object.
- * @param {Object} source The object of functions to add.
- * @param {Object} [options] The options object.
- * @param {boolean} [options.chain=true] Specify whether the functions added
- * are chainable.
- * @returns {Function|Object} Returns `object`.
- * @example
- *
- * function vowels(string) {
- * return _.filter(string, function(v) {
- * return /[aeiou]/i.test(v);
- * });
- * }
- *
- * _.mixin({ 'vowels': vowels });
- * _.vowels('fred');
- * // => ['e']
- *
- * _('fred').vowels().value();
- * // => ['e']
- *
- * _.mixin({ 'vowels': vowels }, { 'chain': false });
- * _('fred').vowels();
- * // => ['e']
- */
- function mixin(object, source, options) {
- if (options == null) {
- var isObj = isObject(source), props = isObj ? keys(source) : undefined, methodNames = props && props.length ? baseFunctions(source, props) : undefined;
- if (!(methodNames ? methodNames.length : isObj)) {
- methodNames = false;
- options = source;
- source = object;
- object = this;
- }
- }
- if (!methodNames) {
- methodNames = baseFunctions(source, keys(source));
- }
- var chain = true, index = -1, isFunc = isFunction(object), length = methodNames.length;
- if (options === false) {
- chain = false;
- } else if (isObject(options) && 'chain' in options) {
- chain = options.chain;
- }
- while (++index < length) {
- var methodName = methodNames[index], func = source[methodName];
- object[methodName] = func;
- if (isFunc) {
- object.prototype[methodName] = function (func) {
- return function () {
- var chainAll = this.__chain__;
- if (chain || chainAll) {
- var result = object(this.__wrapped__), actions = result.__actions__ = arrayCopy(this.__actions__);
- actions.push({
- 'func': func,
- 'args': arguments,
- 'thisArg': object
- });
- result.__chain__ = chainAll;
- return result;
- }
- return func.apply(object, arrayPush([this.value()], arguments));
- };
- }(func);
- }
- }
- return object;
- }
- /**
- * Reverts the `_` variable to its previous value and returns a reference to
- * the `lodash` function.
- *
- * @static
- * @memberOf _
- * @category Utility
- * @returns {Function} Returns the `lodash` function.
- * @example
- *
- * var lodash = _.noConflict();
- */
- function noConflict() {
- root._ = oldDash;
- return this;
- }
- /**
- * A no-operation function that returns `undefined` regardless of the
- * arguments it receives.
- *
- * @static
- * @memberOf _
- * @category Utility
- * @example
- *
- * var object = { 'user': 'fred' };
- *
- * _.noop(object) === undefined;
- * // => true
- */
- function noop() {
- }
- /**
- * Creates a function that returns the property value at `path` on a
- * given object.
- *
- * @static
- * @memberOf _
- * @category Utility
- * @param {Array|string} path The path of the property to get.
- * @returns {Function} Returns the new function.
- * @example
- *
- * var objects = [
- * { 'a': { 'b': { 'c': 2 } } },
- * { 'a': { 'b': { 'c': 1 } } }
- * ];
- *
- * _.map(objects, _.property('a.b.c'));
- * // => [2, 1]
- *
- * _.pluck(_.sortBy(objects, _.property(['a', 'b', 'c'])), 'a.b.c');
- * // => [1, 2]
- */
- function property(path) {
- return isKey(path) ? baseProperty(path) : basePropertyDeep(path);
- }
- /**
- * The opposite of `_.property`; this method creates a function that returns
- * the property value at a given path on `object`.
- *
- * @static
- * @memberOf _
- * @category Utility
- * @param {Object} object The object to query.
- * @returns {Function} Returns the new function.
- * @example
- *
- * var array = [0, 1, 2],
- * object = { 'a': array, 'b': array, 'c': array };
- *
- * _.map(['a[2]', 'c[0]'], _.propertyOf(object));
- * // => [2, 0]
- *
- * _.map([['a', '2'], ['c', '0']], _.propertyOf(object));
- * // => [2, 0]
- */
- function propertyOf(object) {
- return function (path) {
- return baseGet(object, toPath(path), path + '');
- };
- }
- /**
- * Creates an array of numbers (positive and/or negative) progressing from
- * `start` up to, but not including, `end`. If `end` is not specified it's
- * set to `start` with `start` then set to `0`. If `end` is less than `start`
- * a zero-length range is created unless a negative `step` is specified.
- *
- * @static
- * @memberOf _
- * @category Utility
- * @param {number} [start=0] The start of the range.
- * @param {number} end The end of the range.
- * @param {number} [step=1] The value to increment or decrement by.
- * @returns {Array} Returns the new array of numbers.
- * @example
- *
- * _.range(4);
- * // => [0, 1, 2, 3]
- *
- * _.range(1, 5);
- * // => [1, 2, 3, 4]
- *
- * _.range(0, 20, 5);
- * // => [0, 5, 10, 15]
- *
- * _.range(0, -4, -1);
- * // => [0, -1, -2, -3]
- *
- * _.range(1, 4, 0);
- * // => [1, 1, 1]
- *
- * _.range(0);
- * // => []
- */
- function range(start, end, step) {
- if (step && isIterateeCall(start, end, step)) {
- end = step = undefined;
- }
- start = +start || 0;
- step = step == null ? 1 : +step || 0;
- if (end == null) {
- end = start;
- start = 0;
- } else {
- end = +end || 0;
- }
- // Use `Array(length)` so engines like Chakra and V8 avoid slower modes.
- // See https://youtu.be/XAqIpGU8ZZk#t=17m25s for more details.
- var index = -1, length = nativeMax(nativeCeil((end - start) / (step || 1)), 0), result = Array(length);
- while (++index < length) {
- result[index] = start;
- start += step;
- }
- return result;
- }
- /**
- * Invokes the iteratee function `n` times, returning an array of the results
- * of each invocation. The `iteratee` is bound to `thisArg` and invoked with
- * one argument; (index).
- *
- * @static
- * @memberOf _
- * @category Utility
- * @param {number} n The number of times to invoke `iteratee`.
- * @param {Function} [iteratee=_.identity] The function invoked per iteration.
- * @param {*} [thisArg] The `this` binding of `iteratee`.
- * @returns {Array} Returns the array of results.
- * @example
- *
- * var diceRolls = _.times(3, _.partial(_.random, 1, 6, false));
- * // => [3, 6, 4]
- *
- * _.times(3, function(n) {
- * mage.castSpell(n);
- * });
- * // => invokes `mage.castSpell(n)` three times with `n` of `0`, `1`, and `2`
- *
- * _.times(3, function(n) {
- * this.cast(n);
- * }, mage);
- * // => also invokes `mage.castSpell(n)` three times
- */
- function times(n, iteratee, thisArg) {
- n = nativeFloor(n);
- // Exit early to avoid a JSC JIT bug in Safari 8
- // where `Array(0)` is treated as `Array(1)`.
- if (n < 1 || !nativeIsFinite(n)) {
- return [];
- }
- var index = -1, result = Array(nativeMin(n, MAX_ARRAY_LENGTH));
- iteratee = bindCallback(iteratee, thisArg, 1);
- while (++index < n) {
- if (index < MAX_ARRAY_LENGTH) {
- result[index] = iteratee(index);
- } else {
- iteratee(index);
- }
- }
- return result;
- }
- /**
- * Generates a unique ID. If `prefix` is provided the ID is appended to it.
- *
- * @static
- * @memberOf _
- * @category Utility
- * @param {string} [prefix] The value to prefix the ID with.
- * @returns {string} Returns the unique ID.
- * @example
- *
- * _.uniqueId('contact_');
- * // => 'contact_104'
- *
- * _.uniqueId();
- * // => '105'
- */
- function uniqueId(prefix) {
- var id = ++idCounter;
- return baseToString(prefix) + id;
- }
- /*------------------------------------------------------------------------*/
- /**
- * Adds two numbers.
- *
- * @static
- * @memberOf _
- * @category Math
- * @param {number} augend The first number to add.
- * @param {number} addend The second number to add.
- * @returns {number} Returns the sum.
- * @example
- *
- * _.add(6, 4);
- * // => 10
- */
- function add(augend, addend) {
- return (+augend || 0) + (+addend || 0);
- }
- /**
- * Calculates `n` rounded up to `precision`.
- *
- * @static
- * @memberOf _
- * @category Math
- * @param {number} n The number to round up.
- * @param {number} [precision=0] The precision to round up to.
- * @returns {number} Returns the rounded up number.
- * @example
- *
- * _.ceil(4.006);
- * // => 5
- *
- * _.ceil(6.004, 2);
- * // => 6.01
- *
- * _.ceil(6040, -2);
- * // => 6100
- */
- var ceil = createRound('ceil');
- /**
- * Calculates `n` rounded down to `precision`.
- *
- * @static
- * @memberOf _
- * @category Math
- * @param {number} n The number to round down.
- * @param {number} [precision=0] The precision to round down to.
- * @returns {number} Returns the rounded down number.
- * @example
- *
- * _.floor(4.006);
- * // => 4
- *
- * _.floor(0.046, 2);
- * // => 0.04
- *
- * _.floor(4060, -2);
- * // => 4000
- */
- var floor = createRound('floor');
- /**
- * Gets the maximum value of `collection`. If `collection` is empty or falsey
- * `-Infinity` is returned. If an iteratee function is provided it's invoked
- * for each value in `collection` to generate the criterion by which the value
- * is ranked. The `iteratee` is bound to `thisArg` and invoked with three
- * arguments: (value, index, collection).
- *
- * If a property name is provided for `iteratee` the created `_.property`
- * style callback returns the property value of the given element.
- *
- * If a value is also provided for `thisArg` the created `_.matchesProperty`
- * style callback returns `true` for elements that have a matching property
- * value, else `false`.
- *
- * If an object is provided for `iteratee` the created `_.matches` style
- * callback returns `true` for elements that have the properties of the given
- * object, else `false`.
- *
- * @static
- * @memberOf _
- * @category Math
- * @param {Array|Object|string} collection The collection to iterate over.
- * @param {Function|Object|string} [iteratee] The function invoked per iteration.
- * @param {*} [thisArg] The `this` binding of `iteratee`.
- * @returns {*} Returns the maximum value.
- * @example
- *
- * _.max([4, 2, 8, 6]);
- * // => 8
- *
- * _.max([]);
- * // => -Infinity
- *
- * var users = [
- * { 'user': 'barney', 'age': 36 },
- * { 'user': 'fred', 'age': 40 }
- * ];
- *
- * _.max(users, function(chr) {
- * return chr.age;
- * });
- * // => { 'user': 'fred', 'age': 40 }
- *
- * // using the `_.property` callback shorthand
- * _.max(users, 'age');
- * // => { 'user': 'fred', 'age': 40 }
- */
- var max = createExtremum(gt, NEGATIVE_INFINITY);
- /**
- * Gets the minimum value of `collection`. If `collection` is empty or falsey
- * `Infinity` is returned. If an iteratee function is provided it's invoked
- * for each value in `collection` to generate the criterion by which the value
- * is ranked. The `iteratee` is bound to `thisArg` and invoked with three
- * arguments: (value, index, collection).
- *
- * If a property name is provided for `iteratee` the created `_.property`
- * style callback returns the property value of the given element.
- *
- * If a value is also provided for `thisArg` the created `_.matchesProperty`
- * style callback returns `true` for elements that have a matching property
- * value, else `false`.
- *
- * If an object is provided for `iteratee` the created `_.matches` style
- * callback returns `true` for elements that have the properties of the given
- * object, else `false`.
- *
- * @static
- * @memberOf _
- * @category Math
- * @param {Array|Object|string} collection The collection to iterate over.
- * @param {Function|Object|string} [iteratee] The function invoked per iteration.
- * @param {*} [thisArg] The `this` binding of `iteratee`.
- * @returns {*} Returns the minimum value.
- * @example
- *
- * _.min([4, 2, 8, 6]);
- * // => 2
- *
- * _.min([]);
- * // => Infinity
- *
- * var users = [
- * { 'user': 'barney', 'age': 36 },
- * { 'user': 'fred', 'age': 40 }
- * ];
- *
- * _.min(users, function(chr) {
- * return chr.age;
- * });
- * // => { 'user': 'barney', 'age': 36 }
- *
- * // using the `_.property` callback shorthand
- * _.min(users, 'age');
- * // => { 'user': 'barney', 'age': 36 }
- */
- var min = createExtremum(lt, POSITIVE_INFINITY);
- /**
- * Calculates `n` rounded to `precision`.
- *
- * @static
- * @memberOf _
- * @category Math
- * @param {number} n The number to round.
- * @param {number} [precision=0] The precision to round to.
- * @returns {number} Returns the rounded number.
- * @example
- *
- * _.round(4.006);
- * // => 4
- *
- * _.round(4.006, 2);
- * // => 4.01
- *
- * _.round(4060, -2);
- * // => 4100
- */
- var round = createRound('round');
- /**
- * Gets the sum of the values in `collection`.
- *
- * @static
- * @memberOf _
- * @category Math
- * @param {Array|Object|string} collection The collection to iterate over.
- * @param {Function|Object|string} [iteratee] The function invoked per iteration.
- * @param {*} [thisArg] The `this` binding of `iteratee`.
- * @returns {number} Returns the sum.
- * @example
- *
- * _.sum([4, 6]);
- * // => 10
- *
- * _.sum({ 'a': 4, 'b': 6 });
- * // => 10
- *
- * var objects = [
- * { 'n': 4 },
- * { 'n': 6 }
- * ];
- *
- * _.sum(objects, function(object) {
- * return object.n;
- * });
- * // => 10
- *
- * // using the `_.property` callback shorthand
- * _.sum(objects, 'n');
- * // => 10
- */
- function sum(collection, iteratee, thisArg) {
- if (thisArg && isIterateeCall(collection, iteratee, thisArg)) {
- iteratee = undefined;
- }
- iteratee = getCallback(iteratee, thisArg, 3);
- return iteratee.length == 1 ? arraySum(isArray(collection) ? collection : toIterable(collection), iteratee) : baseSum(collection, iteratee);
- }
- /*------------------------------------------------------------------------*/
- // Ensure wrappers are instances of `baseLodash`.
- lodash.prototype = baseLodash.prototype;
- LodashWrapper.prototype = baseCreate(baseLodash.prototype);
- LodashWrapper.prototype.constructor = LodashWrapper;
- LazyWrapper.prototype = baseCreate(baseLodash.prototype);
- LazyWrapper.prototype.constructor = LazyWrapper;
- // Add functions to the `Map` cache.
- MapCache.prototype['delete'] = mapDelete;
- MapCache.prototype.get = mapGet;
- MapCache.prototype.has = mapHas;
- MapCache.prototype.set = mapSet;
- // Add functions to the `Set` cache.
- SetCache.prototype.push = cachePush;
- // Assign cache to `_.memoize`.
- memoize.Cache = MapCache;
- // Add functions that return wrapped values when chaining.
- lodash.after = after;
- lodash.ary = ary;
- lodash.assign = assign;
- lodash.at = at;
- lodash.before = before;
- lodash.bind = bind;
- lodash.bindAll = bindAll;
- lodash.bindKey = bindKey;
- lodash.callback = callback;
- lodash.chain = chain;
- lodash.chunk = chunk;
- lodash.compact = compact;
- lodash.constant = constant;
- lodash.countBy = countBy;
- lodash.create = create;
- lodash.curry = curry;
- lodash.curryRight = curryRight;
- lodash.debounce = debounce;
- lodash.defaults = defaults;
- lodash.defaultsDeep = defaultsDeep;
- lodash.defer = defer;
- lodash.delay = delay;
- lodash.difference = difference;
- lodash.drop = drop;
- lodash.dropRight = dropRight;
- lodash.dropRightWhile = dropRightWhile;
- lodash.dropWhile = dropWhile;
- lodash.fill = fill;
- lodash.filter = filter;
- lodash.flatten = flatten;
- lodash.flattenDeep = flattenDeep;
- lodash.flow = flow;
- lodash.flowRight = flowRight;
- lodash.forEach = forEach;
- lodash.forEachRight = forEachRight;
- lodash.forIn = forIn;
- lodash.forInRight = forInRight;
- lodash.forOwn = forOwn;
- lodash.forOwnRight = forOwnRight;
- lodash.functions = functions;
- lodash.groupBy = groupBy;
- lodash.indexBy = indexBy;
- lodash.initial = initial;
- lodash.intersection = intersection;
- lodash.invert = invert;
- lodash.invoke = invoke;
- lodash.keys = keys;
- lodash.keysIn = keysIn;
- lodash.map = map;
- lodash.mapKeys = mapKeys;
- lodash.mapValues = mapValues;
- lodash.matches = matches;
- lodash.matchesProperty = matchesProperty;
- lodash.memoize = memoize;
- lodash.merge = merge;
- lodash.method = method;
- lodash.methodOf = methodOf;
- lodash.mixin = mixin;
- lodash.modArgs = modArgs;
- lodash.negate = negate;
- lodash.omit = omit;
- lodash.once = once;
- lodash.pairs = pairs;
- lodash.partial = partial;
- lodash.partialRight = partialRight;
- lodash.partition = partition;
- lodash.pick = pick;
- lodash.pluck = pluck;
- lodash.property = property;
- lodash.propertyOf = propertyOf;
- lodash.pull = pull;
- lodash.pullAt = pullAt;
- lodash.range = range;
- lodash.rearg = rearg;
- lodash.reject = reject;
- lodash.remove = remove;
- lodash.rest = rest;
- lodash.restParam = restParam;
- lodash.set = set;
- lodash.shuffle = shuffle;
- lodash.slice = slice;
- lodash.sortBy = sortBy;
- lodash.sortByAll = sortByAll;
- lodash.sortByOrder = sortByOrder;
- lodash.spread = spread;
- lodash.take = take;
- lodash.takeRight = takeRight;
- lodash.takeRightWhile = takeRightWhile;
- lodash.takeWhile = takeWhile;
- lodash.tap = tap;
- lodash.throttle = throttle;
- lodash.thru = thru;
- lodash.times = times;
- lodash.toArray = toArray;
- lodash.toPlainObject = toPlainObject;
- lodash.transform = transform;
- lodash.union = union;
- lodash.uniq = uniq;
- lodash.unzip = unzip;
- lodash.unzipWith = unzipWith;
- lodash.values = values;
- lodash.valuesIn = valuesIn;
- lodash.where = where;
- lodash.without = without;
- lodash.wrap = wrap;
- lodash.xor = xor;
- lodash.zip = zip;
- lodash.zipObject = zipObject;
- lodash.zipWith = zipWith;
- // Add aliases.
- lodash.backflow = flowRight;
- lodash.collect = map;
- lodash.compose = flowRight;
- lodash.each = forEach;
- lodash.eachRight = forEachRight;
- lodash.extend = assign;
- lodash.iteratee = callback;
- lodash.methods = functions;
- lodash.object = zipObject;
- lodash.select = filter;
- lodash.tail = rest;
- lodash.unique = uniq;
- // Add functions to `lodash.prototype`.
- mixin(lodash, lodash);
- /*------------------------------------------------------------------------*/
- // Add functions that return unwrapped values when chaining.
- lodash.add = add;
- lodash.attempt = attempt;
- lodash.camelCase = camelCase;
- lodash.capitalize = capitalize;
- lodash.ceil = ceil;
- lodash.clone = clone;
- lodash.cloneDeep = cloneDeep;
- lodash.deburr = deburr;
- lodash.endsWith = endsWith;
- lodash.escape = escape;
- lodash.escapeRegExp = escapeRegExp;
- lodash.every = every;
- lodash.find = find;
- lodash.findIndex = findIndex;
- lodash.findKey = findKey;
- lodash.findLast = findLast;
- lodash.findLastIndex = findLastIndex;
- lodash.findLastKey = findLastKey;
- lodash.findWhere = findWhere;
- lodash.first = first;
- lodash.floor = floor;
- lodash.get = get;
- lodash.gt = gt;
- lodash.gte = gte;
- lodash.has = has;
- lodash.identity = identity;
- lodash.includes = includes;
- lodash.indexOf = indexOf;
- lodash.inRange = inRange;
- lodash.isArguments = isArguments;
- lodash.isArray = isArray;
- lodash.isBoolean = isBoolean;
- lodash.isDate = isDate;
- lodash.isElement = isElement;
- lodash.isEmpty = isEmpty;
- lodash.isEqual = isEqual;
- lodash.isError = isError;
- lodash.isFinite = isFinite;
- lodash.isFunction = isFunction;
- lodash.isMatch = isMatch;
- lodash.isNaN = isNaN;
- lodash.isNative = isNative;
- lodash.isNull = isNull;
- lodash.isNumber = isNumber;
- lodash.isObject = isObject;
- lodash.isPlainObject = isPlainObject;
- lodash.isRegExp = isRegExp;
- lodash.isString = isString;
- lodash.isTypedArray = isTypedArray;
- lodash.isUndefined = isUndefined;
- lodash.kebabCase = kebabCase;
- lodash.last = last;
- lodash.lastIndexOf = lastIndexOf;
- lodash.lt = lt;
- lodash.lte = lte;
- lodash.max = max;
- lodash.min = min;
- lodash.noConflict = noConflict;
- lodash.noop = noop;
- lodash.now = now;
- lodash.pad = pad;
- lodash.padLeft = padLeft;
- lodash.padRight = padRight;
- lodash.parseInt = parseInt;
- lodash.random = random;
- lodash.reduce = reduce;
- lodash.reduceRight = reduceRight;
- lodash.repeat = repeat;
- lodash.result = result;
- lodash.round = round;
- lodash.runInContext = runInContext;
- lodash.size = size;
- lodash.snakeCase = snakeCase;
- lodash.some = some;
- lodash.sortedIndex = sortedIndex;
- lodash.sortedLastIndex = sortedLastIndex;
- lodash.startCase = startCase;
- lodash.startsWith = startsWith;
- lodash.sum = sum;
- lodash.template = template;
- lodash.trim = trim;
- lodash.trimLeft = trimLeft;
- lodash.trimRight = trimRight;
- lodash.trunc = trunc;
- lodash.unescape = unescape;
- lodash.uniqueId = uniqueId;
- lodash.words = words;
- // Add aliases.
- lodash.all = every;
- lodash.any = some;
- lodash.contains = includes;
- lodash.eq = isEqual;
- lodash.detect = find;
- lodash.foldl = reduce;
- lodash.foldr = reduceRight;
- lodash.head = first;
- lodash.include = includes;
- lodash.inject = reduce;
- mixin(lodash, function () {
- var source = {};
- baseForOwn(lodash, function (func, methodName) {
- if (!lodash.prototype[methodName]) {
- source[methodName] = func;
- }
- });
- return source;
- }(), false);
- /*------------------------------------------------------------------------*/
- // Add functions capable of returning wrapped and unwrapped values when chaining.
- lodash.sample = sample;
- lodash.prototype.sample = function (n) {
- if (!this.__chain__ && n == null) {
- return sample(this.value());
- }
- return this.thru(function (value) {
- return sample(value, n);
- });
- };
- /*------------------------------------------------------------------------*/
- /**
- * The semantic version number.
- *
- * @static
- * @memberOf _
- * @type string
- */
- lodash.VERSION = VERSION;
- // Assign default placeholders.
- arrayEach([
- 'bind',
- 'bindKey',
- 'curry',
- 'curryRight',
- 'partial',
- 'partialRight'
- ], function (methodName) {
- lodash[methodName].placeholder = lodash;
- });
- // Add `LazyWrapper` methods for `_.drop` and `_.take` variants.
- arrayEach([
- 'drop',
- 'take'
- ], function (methodName, index) {
- LazyWrapper.prototype[methodName] = function (n) {
- var filtered = this.__filtered__;
- if (filtered && !index) {
- return new LazyWrapper(this);
- }
- n = n == null ? 1 : nativeMax(nativeFloor(n) || 0, 0);
- var result = this.clone();
- if (filtered) {
- result.__takeCount__ = nativeMin(result.__takeCount__, n);
- } else {
- result.__views__.push({
- 'size': n,
- 'type': methodName + (result.__dir__ < 0 ? 'Right' : '')
- });
- }
- return result;
- };
- LazyWrapper.prototype[methodName + 'Right'] = function (n) {
- return this.reverse()[methodName](n).reverse();
- };
- });
- // Add `LazyWrapper` methods that accept an `iteratee` value.
- arrayEach([
- 'filter',
- 'map',
- 'takeWhile'
- ], function (methodName, index) {
- var type = index + 1, isFilter = type != LAZY_MAP_FLAG;
- LazyWrapper.prototype[methodName] = function (iteratee, thisArg) {
- var result = this.clone();
- result.__iteratees__.push({
- 'iteratee': getCallback(iteratee, thisArg, 1),
- 'type': type
- });
- result.__filtered__ = result.__filtered__ || isFilter;
- return result;
- };
- });
- // Add `LazyWrapper` methods for `_.first` and `_.last`.
- arrayEach([
- 'first',
- 'last'
- ], function (methodName, index) {
- var takeName = 'take' + (index ? 'Right' : '');
- LazyWrapper.prototype[methodName] = function () {
- return this[takeName](1).value()[0];
- };
- });
- // Add `LazyWrapper` methods for `_.initial` and `_.rest`.
- arrayEach([
- 'initial',
- 'rest'
- ], function (methodName, index) {
- var dropName = 'drop' + (index ? '' : 'Right');
- LazyWrapper.prototype[methodName] = function () {
- return this.__filtered__ ? new LazyWrapper(this) : this[dropName](1);
- };
- });
- // Add `LazyWrapper` methods for `_.pluck` and `_.where`.
- arrayEach([
- 'pluck',
- 'where'
- ], function (methodName, index) {
- var operationName = index ? 'filter' : 'map', createCallback = index ? baseMatches : property;
- LazyWrapper.prototype[methodName] = function (value) {
- return this[operationName](createCallback(value));
- };
- });
- LazyWrapper.prototype.compact = function () {
- return this.filter(identity);
- };
- LazyWrapper.prototype.reject = function (predicate, thisArg) {
- predicate = getCallback(predicate, thisArg, 1);
- return this.filter(function (value) {
- return !predicate(value);
- });
- };
- LazyWrapper.prototype.slice = function (start, end) {
- start = start == null ? 0 : +start || 0;
- var result = this;
- if (result.__filtered__ && (start > 0 || end < 0)) {
- return new LazyWrapper(result);
- }
- if (start < 0) {
- result = result.takeRight(-start);
- } else if (start) {
- result = result.drop(start);
- }
- if (end !== undefined) {
- end = +end || 0;
- result = end < 0 ? result.dropRight(-end) : result.take(end - start);
- }
- return result;
- };
- LazyWrapper.prototype.takeRightWhile = function (predicate, thisArg) {
- return this.reverse().takeWhile(predicate, thisArg).reverse();
- };
- LazyWrapper.prototype.toArray = function () {
- return this.take(POSITIVE_INFINITY);
- };
- // Add `LazyWrapper` methods to `lodash.prototype`.
- baseForOwn(LazyWrapper.prototype, function (func, methodName) {
- var checkIteratee = /^(?:filter|map|reject)|While$/.test(methodName), retUnwrapped = /^(?:first|last)$/.test(methodName), lodashFunc = lodash[retUnwrapped ? 'take' + (methodName == 'last' ? 'Right' : '') : methodName];
- if (!lodashFunc) {
- return;
- }
- lodash.prototype[methodName] = function () {
- var args = retUnwrapped ? [1] : arguments, chainAll = this.__chain__, value = this.__wrapped__, isHybrid = !!this.__actions__.length, isLazy = value instanceof LazyWrapper, iteratee = args[0], useLazy = isLazy || isArray(value);
- if (useLazy && checkIteratee && typeof iteratee == 'function' && iteratee.length != 1) {
- // Avoid lazy use if the iteratee has a "length" value other than `1`.
- isLazy = useLazy = false;
- }
- var interceptor = function (value) {
- return retUnwrapped && chainAll ? lodashFunc(value, 1)[0] : lodashFunc.apply(undefined, arrayPush([value], args));
- };
- var action = {
- 'func': thru,
- 'args': [interceptor],
- 'thisArg': undefined
- }, onlyLazy = isLazy && !isHybrid;
- if (retUnwrapped && !chainAll) {
- if (onlyLazy) {
- value = value.clone();
- value.__actions__.push(action);
- return func.call(value);
- }
- return lodashFunc.call(undefined, this.value())[0];
- }
- if (!retUnwrapped && useLazy) {
- value = onlyLazy ? value : new LazyWrapper(this);
- var result = func.apply(value, args);
- result.__actions__.push(action);
- return new LodashWrapper(result, chainAll);
- }
- return this.thru(interceptor);
- };
- });
- // Add `Array` and `String` methods to `lodash.prototype`.
- arrayEach([
- 'join',
- 'pop',
- 'push',
- 'replace',
- 'shift',
- 'sort',
- 'splice',
- 'split',
- 'unshift'
- ], function (methodName) {
- var func = (/^(?:replace|split)$/.test(methodName) ? stringProto : arrayProto)[methodName], chainName = /^(?:push|sort|unshift)$/.test(methodName) ? 'tap' : 'thru', retUnwrapped = /^(?:join|pop|replace|shift)$/.test(methodName);
- lodash.prototype[methodName] = function () {
- var args = arguments;
- if (retUnwrapped && !this.__chain__) {
- return func.apply(this.value(), args);
- }
- return this[chainName](function (value) {
- return func.apply(value, args);
- });
- };
- });
- // Map minified function names to their real names.
- baseForOwn(LazyWrapper.prototype, function (func, methodName) {
- var lodashFunc = lodash[methodName];
- if (lodashFunc) {
- var key = lodashFunc.name + '', names = realNames[key] || (realNames[key] = []);
- names.push({
- 'name': methodName,
- 'func': lodashFunc
- });
- }
- });
- realNames[createHybridWrapper(undefined, BIND_KEY_FLAG).name] = [{
- 'name': 'wrapper',
- 'func': undefined
- }];
- // Add functions to the lazy wrapper.
- LazyWrapper.prototype.clone = lazyClone;
- LazyWrapper.prototype.reverse = lazyReverse;
- LazyWrapper.prototype.value = lazyValue;
- // Add chaining functions to the `lodash` wrapper.
- lodash.prototype.chain = wrapperChain;
- lodash.prototype.commit = wrapperCommit;
- lodash.prototype.concat = wrapperConcat;
- lodash.prototype.plant = wrapperPlant;
- lodash.prototype.reverse = wrapperReverse;
- lodash.prototype.toString = wrapperToString;
- lodash.prototype.run = lodash.prototype.toJSON = lodash.prototype.valueOf = lodash.prototype.value = wrapperValue;
- // Add function aliases to the `lodash` wrapper.
- lodash.prototype.collect = lodash.prototype.map;
- lodash.prototype.head = lodash.prototype.first;
- lodash.prototype.select = lodash.prototype.filter;
- lodash.prototype.tail = lodash.prototype.rest;
- return lodash;
- }
- /*--------------------------------------------------------------------------*/
- // Export lodash.
- var _ = runInContext();
- // Some AMD build optimizers like r.js check for condition patterns like the following:
- if (typeof define == 'function' && typeof define.amd == 'object' && define.amd) {
- // Define as an anonymous module so, through path mapping, it can be
- // referenced as the "underscore" module.
- define(function () {
- return _;
- });
- } // Check for `exports` after `define` in case a build optimizer adds an `exports` object.
- else if (freeExports && freeModule) {
- // Export for Node.js or RingoJS.
- if (moduleExports) {
- (freeModule.exports = _)._ = _;
- } // Export for Rhino with CommonJS support.
- else {
- freeExports._ = _;
- }
- }
- $provide.constant('lodash', _);
- }
-]);
\ No newline at end of file
diff --git a/applications/auto-scale/gui/src/vendor/ng-lodash/build/ng-lodash.min.js b/applications/auto-scale/gui/src/vendor/ng-lodash/build/ng-lodash.min.js
deleted file mode 100644
index 4989a9e..0000000
--- a/applications/auto-scale/gui/src/vendor/ng-lodash/build/ng-lodash.min.js
+++ /dev/null
@@ -1,11 +0,0 @@
-/**
- * @license
- * lodash 3.10.1 (Custom Build) <https://lodash.com/>
- * Build: `lodash modern exports="amd,commonjs,node" iife="angular.module('ngLodash', []).constant('lodash', null).config(function ($provide) { %output% $provide.constant('lodash', _);});" --output build/ng-lodash.js`
- * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
- * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
- * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
- * Available under MIT license <https://lodash.com/license>
- */
-angular.module("ngLodash",[]).constant("lodash",null).config(["$provide",function(a){function b(a,b){if(a!==b){var c=null===a,d=a===x,e=a===a,f=null===b,g=b===x,h=b===b;if(a>b&&!f||!e||c&&!g&&h||d&&h)return 1;if(b>a&&!c||!h||f&&!d&&e||g&&e)return-1}return 0}function c(a,b,c){for(var d=a.length,e=c?d:-1;c?e--:++e<d;)if(b(a[e],e,a))return e;return-1}function d(a,b,c){if(b!==b)return o(a,c);for(var d=c-1,e=a.length;++d<e;)if(a[d]===b)return d;return-1}function e(a){return"function"==typeof a||!1}function f(a){return null==a?"":a+""}function g(a,b){for(var c=-1,d=a.length;++c<d&&b.indexOf(a.charAt(c))>-1;);return c}function h(a,b){for(var c=a.length;c--&&b.indexOf(a.charAt(c))>-1;);return c}function i(a,c){return b(a.criteria,c.criteria)||a.index-c.index}function j(a,c,d){for(var e=-1,f=a.criteria,g=c.criteria,h=f.length,i=d.length;++e<h;){var j=b(f[e],g[e]);if(j){if(e>=i)return j;var k=d[e];return j*("asc"===k||k===!0?1:-1)}}return a.index-c.index}function k(a){return Qa[a]}function l(a){return Ra[a]}function m(a,b,c){return b?a=Ua[a]:c&&(a=Va[a]),"\\"+a}function n(a){return"\\"+Va[a]}function o(a,b,c){for(var d=a.length,e=b+(c?0:-1);c?e--:++e<d;){var f=a[e];if(f!==f)return e}return-1}function p(a){return!!a&&"object"==typeof a}function q(a){return 160>=a&&a>=9&&13>=a||32==a||160==a||5760==a||6158==a||a>=8192&&(8202>=a||8232==a||8233==a||8239==a||8287==a||12288==a||65279==a)}function r(a,b){for(var c=-1,d=a.length,e=-1,f=[];++c<d;)a[c]===b&&(a[c]=Q,f[++e]=c);return f}function s(a,b){for(var c,d=-1,e=a.length,f=-1,g=[];++d<e;){var h=a[d],i=b?b(h,d,a):h;d&&c===i||(c=i,g[++f]=h)}return g}function t(a){for(var b=-1,c=a.length;++b<c&&q(a.charCodeAt(b)););return b}function u(a){for(var b=a.length;b--&&q(a.charCodeAt(b)););return b}function v(a){return Sa[a]}function w(a){function q(a){if(p(a)&&!Dh(a)&&!(a instanceof ba)){if(a instanceof _)return a;if(ag.call(a,"__chain__")&&ag.call(a,"__wrapped__"))return md(a)}return new _(a)}function X(){}function _(a,b,c){this.__wrapped__=a,this.__actions__=c||[],this.__chain__=!!b}function ba(a){this.__wrapped__=a,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Bg,this.__views__=[]}function Qa(){var a=new ba(this.__wrapped__);return a.__actions__=cb(this.__actions__),a.__dir__=this.__dir__,a.__filtered__=this.__filtered__,a.__iteratees__=cb(this.__iteratees__),a.__takeCount__=this.__takeCount__,a.__views__=cb(this.__views__),a}function Ra(){if(this.__filtered__){var a=new ba(this);a.__dir__=-1,a.__filtered__=!0}else a=this.clone(),a.__dir__*=-1;return a}function Sa(){var a=this.__wrapped__.value(),b=this.__dir__,c=Dh(a),d=0>b,e=c?a.length:0,f=Tc(0,e,this.__views__),g=f.start,h=f.end,i=h-g,j=d?h:g-1,k=this.__iteratees__,l=k.length,m=0,n=wg(i,this.__takeCount__);if(!c||M>e||e==i&&n==i)return cc(a,this.__actions__);var o=[];a:for(;i--&&n>m;){j+=b;for(var p=-1,q=a[j];++p<l;){var r=k[p],s=r.iteratee,t=r.type,u=s(q);if(t==O)q=u;else if(!u){if(t==N)continue a;break a}}o[m++]=q}return o}function Ta(){this.__data__={}}function Ua(a){return this.has(a)&&delete this.__data__[a]}function Va(a){return"__proto__"==a?x:this.__data__[a]}function Wa(a){return"__proto__"!=a&&ag.call(this.__data__,a)}function Xa(a,b){return"__proto__"!=a&&(this.__data__[a]=b),this}function Ya(a){var b=a?a.length:0;for(this.data={hash:qg(null),set:new kg};b--;)this.push(a[b])}function Za(a,b){var c=a.data,d="string"==typeof b||He(b)?c.set.has(b):c.hash[b];return d?0:-1}function $a(a){var b=this.data;"string"==typeof a||He(a)?b.set.add(a):b.hash[a]=!0}function _a(a,b){for(var c=-1,d=a.length,e=-1,f=b.length,g=Of(d+f);++c<d;)g[c]=a[c];for(;++e<f;)g[c++]=b[e];return g}function cb(a,b){var c=-1,d=a.length;for(b||(b=Of(d));++c<d;)b[c]=a[c];return b}function db(a,b){for(var c=-1,d=a.length;++c<d&&b(a[c],c,a)!==!1;);return a}function eb(a,b){for(var c=a.length;c--&&b(a[c],c,a)!==!1;);return a}function fb(a,b){for(var c=-1,d=a.length;++c<d;)if(!b(a[c],c,a))return!1;return!0}function gb(a,b,c,d){for(var e=-1,f=a.length,g=d,h=g;++e<f;){var i=a[e],j=+b(i);c(j,g)&&(g=j,h=i)}return h}function hb(a,b){for(var c=-1,d=a.length,e=-1,f=[];++c<d;){var g=a[c];b(g,c,a)&&(f[++e]=g)}return f}function ib(a,b){for(var c=-1,d=a.length,e=Of(d);++c<d;)e[c]=b(a[c],c,a);return e}function jb(a,b){for(var c=-1,d=b.length,e=a.length;++c<d;)a[e+c]=b[c];return a}function kb(a,b,c,d){var e=-1,f=a.length;for(d&&f&&(c=a[++e]);++e<f;)c=b(c,a[e],e,a);return c}function lb(a,b,c,d){var e=a.length;for(d&&e&&(c=a[--e]);e--;)c=b(c,a[e],e,a);return c}function mb(a,b){for(var c=-1,d=a.length;++c<d;)if(b(a[c],c,a))return!0;return!1}function nb(a,b){for(var c=a.length,d=0;c--;)d+=+b(a[c])||0;return d}function ob(a,b){return a===x?b:a}function pb(a,b,c,d){return a!==x&&ag.call(d,c)?a:b}function qb(a,b,c){for(var d=-1,e=Oh(b),f=e.length;++d<f;){var g=e[d],h=a[g],i=c(h,b[g],g,a,b);(i===i?i===h:h!==h)&&(h!==x||g in a)||(a[g]=i)}return a}function rb(a,b){return null==b?a:tb(b,Oh(b),a)}function sb(a,b){for(var c=-1,d=null==a,e=!d&&Yc(a),f=e?a.length:0,g=b.length,h=Of(g);++c<g;){var i=b[c];e?h[c]=Zc(i,f)?a[i]:x:h[c]=d?x:a[i]}return h}function tb(a,b,c){c||(c={});for(var d=-1,e=b.length;++d<e;){var f=b[d];c[f]=a[f]}return c}function ub(a,b,c){var d=typeof a;return"function"==d?b===x?a:fc(a,b,c):null==a?Bf:"object"==d?Nb(a):b===x?Hf(a):Ob(a,b)}function vb(a,b,c,d,e,f,g){var h;if(c&&(h=e?c(a,d,e):c(a)),h!==x)return h;if(!He(a))return a;var i=Dh(a);if(i){if(h=Uc(a),!b)return cb(a,h)}else{var j=cg.call(a),k=j==W;if(j!=Z&&j!=R&&(!k||e))return Pa[j]?Wc(a,j,b):e?a:{};if(h=Vc(k?{}:a),!b)return rb(h,a)}f||(f=[]),g||(g=[]);for(var l=f.length;l--;)if(f[l]==a)return g[l];return f.push(a),g.push(h),(i?db:Fb)(a,function(d,e){h[e]=vb(d,b,c,e,a,f,g)}),h}function wb(a,b,c){if("function"!=typeof a)throw new Xf(P);return lg(function(){a.apply(x,c)},b)}function xb(a,b){var c=a?a.length:0,e=[];if(!c)return e;var f=-1,g=Qc(),h=g===d,i=h&&b.length>=M?oc(b):null,j=b.length;i&&(g=Za,h=!1,b=i);a:for(;++f<c;){var k=a[f];if(h&&k===k){for(var l=j;l--;)if(b[l]===k)continue a;e.push(k)}else g(b,k,0)<0&&e.push(k)}return e}function yb(a,b){var c=!0;return Kg(a,function(a,d,e){return c=!!b(a,d,e)}),c}function zb(a,b,c,d){var e=d,f=e;return Kg(a,function(a,g,h){var i=+b(a,g,h);(c(i,e)||i===d&&i===f)&&(e=i,f=a)}),f}function Ab(a,b,c,d){var e=a.length;for(c=null==c?0:+c||0,0>c&&(c=-c>e?0:e+c),d=d===x||d>e?e:+d||0,0>d&&(d+=e),e=c>d?0:d>>>0,c>>>=0;e>c;)a[c++]=b;return a}function Bb(a,b){var c=[];return Kg(a,function(a,d,e){b(a,d,e)&&c.push(a)}),c}function Cb(a,b,c,d){var e;return c(a,function(a,c,f){return b(a,c,f)?(e=d?c:a,!1):void 0}),e}function Db(a,b,c,d){d||(d=[]);for(var e=-1,f=a.length;++e<f;){var g=a[e];p(g)&&Yc(g)&&(c||Dh(g)||ye(g))?b?Db(g,b,c,d):jb(d,g):c||(d[d.length]=g)}return d}function Eb(a,b){return Mg(a,b,_e)}function Fb(a,b){return Mg(a,b,Oh)}function Gb(a,b){return Ng(a,b,Oh)}function Hb(a,b){for(var c=-1,d=b.length,e=-1,f=[];++c<d;){var g=b[c];Ge(a[g])&&(f[++e]=g)}return f}function Ib(a,b,c){if(null!=a){c!==x&&c in kd(a)&&(b=[c]);for(var d=0,e=b.length;null!=a&&e>d;)a=a[b[d++]];return d&&d==e?a:x}}function Jb(a,b,c,d,e,f){return a===b?!0:null==a||null==b||!He(a)&&!p(b)?a!==a&&b!==b:Kb(a,b,Jb,c,d,e,f)}function Kb(a,b,c,d,e,f,g){var h=Dh(a),i=Dh(b),j=S,k=S;h||(j=cg.call(a),j==R?j=Z:j!=Z&&(h=Qe(a))),i||(k=cg.call(b),k==R?k=Z:k!=Z&&(i=Qe(b)));var l=j==Z,m=k==Z,n=j==k;if(n&&!h&&!l)return Mc(a,b,j);if(!e){var o=l&&ag.call(a,"__wrapped__"),p=m&&ag.call(b,"__wrapped__");if(o||p)return c(o?a.value():a,p?b.value():b,d,e,f,g)}if(!n)return!1;f||(f=[]),g||(g=[]);for(var q=f.length;q--;)if(f[q]==a)return g[q]==b;f.push(a),g.push(b);var r=(h?Lc:Nc)(a,b,c,d,e,f,g);return f.pop(),g.pop(),r}function Lb(a,b,c){var d=b.length,e=d,f=!c;if(null==a)return!e;for(a=kd(a);d--;){var g=b[d];if(f&&g[2]?g[1]!==a[g[0]]:!(g[0]in a))return!1}for(;++d<e;){g=b[d];var h=g[0],i=a[h],j=g[1];if(f&&g[2]){if(i===x&&!(h in a))return!1}else{var k=c?c(i,j,h):x;if(!(k===x?Jb(j,i,c,!0):k))return!1}}return!0}function Mb(a,b){var c=-1,d=Yc(a)?Of(a.length):[];return Kg(a,function(a,e,f){d[++c]=b(a,e,f)}),d}function Nb(a){var b=Rc(a);if(1==b.length&&b[0][2]){var c=b[0][0],d=b[0][1];return function(a){return null==a?!1:a[c]===d&&(d!==x||c in kd(a))}}return function(a){return Lb(a,b)}}function Ob(a,b){var c=Dh(a),d=_c(a)&&cd(b),e=a+"";return a=ld(a),function(f){if(null==f)return!1;var g=e;if(f=kd(f),(c||!d)&&!(g in f)){if(f=1==a.length?f:Ib(f,Wb(a,0,-1)),null==f)return!1;g=zd(a),f=kd(f)}return f[g]===b?b!==x||g in f:Jb(b,f[g],x,!0)}}function Pb(a,b,c,d,e){if(!He(a))return a;var f=Yc(b)&&(Dh(b)||Qe(b)),g=f?x:Oh(b);return db(g||b,function(h,i){if(g&&(i=h,h=b[i]),p(h))d||(d=[]),e||(e=[]),Qb(a,b,i,Pb,c,d,e);else{var j=a[i],k=c?c(j,h,i,a,b):x,l=k===x;l&&(k=h),k===x&&(!f||i in a)||!l&&(k===k?k===j:j!==j)||(a[i]=k)}}),a}function Qb(a,b,c,d,e,f,g){for(var h=f.length,i=b[c];h--;)if(f[h]==i)return void(a[c]=g[h]);var j=a[c],k=e?e(j,i,c,a,b):x,l=k===x;l&&(k=i,Yc(i)&&(Dh(i)||Qe(i))?k=Dh(j)?j:Yc(j)?cb(j):[]:Ne(i)||ye(i)?k=ye(j)?Ve(j):Ne(j)?j:{}:l=!1),f.push(i),g.push(k),l?a[c]=d(k,i,e,f,g):(k===k?k!==j:j===j)&&(a[c]=k)}function Rb(a){return function(b){return null==b?x:b[a]}}function Sb(a){var b=a+"";return a=ld(a),function(c){return Ib(c,a,b)}}function Tb(a,b){for(var c=a?b.length:0;c--;){var d=b[c];if(d!=e&&Zc(d)){var e=d;mg.call(a,d,1)}}return a}function Ub(a,b){return a+rg(zg()*(b-a+1))}function Vb(a,b,c,d,e){return e(a,function(a,e,f){c=d?(d=!1,a):b(c,a,e,f)}),c}function Wb(a,b,c){var d=-1,e=a.length;b=null==b?0:+b||0,0>b&&(b=-b>e?0:e+b),c=c===x||c>e?e:+c||0,0>c&&(c+=e),e=b>c?0:c-b>>>0,b>>>=0;for(var f=Of(e);++d<e;)f[d]=a[d+b];return f}function Xb(a,b){var c;return Kg(a,function(a,d,e){return c=b(a,d,e),!c}),!!c}function Yb(a,b){var c=a.length;for(a.sort(b);c--;)a[c]=a[c].value;return a}function Zb(a,b,c){var d=Oc(),e=-1;b=ib(b,function(a){return d(a)});var f=Mb(a,function(a){var c=ib(b,function(b){return b(a)});return{criteria:c,index:++e,value:a}});return Yb(f,function(a,b){return j(a,b,c)})}function $b(a,b){var c=0;return Kg(a,function(a,d,e){c+=+b(a,d,e)||0}),c}function _b(a,b){var c=-1,e=Qc(),f=a.length,g=e===d,h=g&&f>=M,i=h?oc():null,j=[];i?(e=Za,g=!1):(h=!1,i=b?[]:j);a:for(;++c<f;){var k=a[c],l=b?b(k,c,a):k;if(g&&k===k){for(var m=i.length;m--;)if(i[m]===l)continue a;b&&i.push(l),j.push(k)}else e(i,l,0)<0&&((b||h)&&i.push(l),j.push(k))}return j}function ac(a,b){for(var c=-1,d=b.length,e=Of(d);++c<d;)e[c]=a[b[c]];return e}function bc(a,b,c,d){for(var e=a.length,f=d?e:-1;(d?f--:++f<e)&&b(a[f],f,a););return c?Wb(a,d?0:f,d?f+1:e):Wb(a,d?f+1:0,d?e:f)}function cc(a,b){var c=a;c instanceof ba&&(c=c.value());for(var d=-1,e=b.length;++d<e;){var f=b[d];c=f.func.apply(f.thisArg,jb([c],f.args))}return c}function dc(a,b,c){var d=0,e=a?a.length:d;if("number"==typeof b&&b===b&&Eg>=e){for(;e>d;){var f=d+e>>>1,g=a[f];(c?b>=g:b>g)&&null!==g?d=f+1:e=f}return e}return ec(a,b,Bf,c)}function ec(a,b,c,d){b=c(b);for(var e=0,f=a?a.length:0,g=b!==b,h=null===b,i=b===x;f>e;){var j=rg((e+f)/2),k=c(a[j]),l=k!==x,m=k===k;if(g)var n=m||d;else n=h?m&&l&&(d||null!=k):i?m&&(d||l):null==k?!1:d?b>=k:b>k;n?e=j+1:f=j}return wg(f,Dg)}function fc(a,b,c){if("function"!=typeof a)return Bf;if(b===x)return a;switch(c){case 1:return function(c){return a.call(b,c)};case 3:return function(c,d,e){return a.call(b,c,d,e)};case 4:return function(c,d,e,f){return a.call(b,c,d,e,f)};case 5:return function(c,d,e,f,g){return a.call(b,c,d,e,f,g)}}return function(){return a.apply(b,arguments)}}function gc(a){var b=new fg(a.byteLength),c=new ng(b);return c.set(new ng(a)),b}function hc(a,b,c){for(var d=c.length,e=-1,f=vg(a.length-d,0),g=-1,h=b.length,i=Of(h+f);++g<h;)i[g]=b[g];for(;++e<d;)i[c[e]]=a[e];for(;f--;)i[g++]=a[e++];return i}function ic(a,b,c){for(var d=-1,e=c.length,f=-1,g=vg(a.length-e,0),h=-1,i=b.length,j=Of(g+i);++f<g;)j[f]=a[f];for(var k=f;++h<i;)j[k+h]=b[h];for(;++d<e;)j[k+c[d]]=a[f++];return j}function jc(a,b){return function(c,d,e){var f=b?b():{};if(d=Oc(d,e,3),Dh(c))for(var g=-1,h=c.length;++g<h;){var i=c[g];a(f,i,d(i,g,c),c)}else Kg(c,function(b,c,e){a(f,b,d(b,c,e),e)});return f}}function kc(a){return qe(function(b,c){var d=-1,e=null==b?0:c.length,f=e>2?c[e-2]:x,g=e>2?c[2]:x,h=e>1?c[e-1]:x;for("function"==typeof f?(f=fc(f,h,5),e-=2):(f="function"==typeof h?h:x,e-=f?1:0),g&&$c(c[0],c[1],g)&&(f=3>e?x:f,e=1);++d<e;){var i=c[d];i&&a(b,i,f)}return b})}function lc(a,b){return function(c,d){var e=c?Qg(c):0;if(!bd(e))return a(c,d);for(var f=b?e:-1,g=kd(c);(b?f--:++f<e)&&d(g[f],f,g)!==!1;);return c}}function mc(a){return function(b,c,d){for(var e=kd(b),f=d(b),g=f.length,h=a?g:-1;a?h--:++h<g;){var i=f[h];if(c(e[i],i,e)===!1)break}return b}}function nc(a,b){function c(){var e=this&&this!==ab&&this instanceof c?d:a;return e.apply(b,arguments)}var d=qc(a);return c}function oc(a){return qg&&kg?new Ya(a):null}function pc(a){return function(b){for(var c=-1,d=yf(kf(b)),e=d.length,f="";++c<e;)f=a(f,d[c],c);return f}}function qc(a){return function(){var b=arguments;switch(b.length){case 0:return new a;case 1:return new a(b[0]);case 2:return new a(b[0],b[1]);case 3:return new a(b[0],b[1],b[2]);case 4:return new a(b[0],b[1],b[2],b[3]);case 5:return new a(b[0],b[1],b[2],b[3],b[4]);case 6:return new a(b[0],b[1],b[2],b[3],b[4],b[5]);case 7:return new a(b[0],b[1],b[2],b[3],b[4],b[5],b[6])}var c=Jg(a.prototype),d=a.apply(c,b);return He(d)?d:c}}function rc(a){function b(c,d,e){e&&$c(c,d,e)&&(d=x);var f=Kc(c,a,x,x,x,x,x,d);return f.placeholder=b.placeholder,f}return b}function sc(a,b){return qe(function(c){var d=c[0];return null==d?d:(c.push(b),a.apply(x,c))})}function tc(a,b){return function(c,d,e){if(e&&$c(c,d,e)&&(d=x),d=Oc(d,e,3),1==d.length){c=Dh(c)?c:jd(c);var f=gb(c,d,a,b);if(!c.length||f!==b)return f}return zb(c,d,a,b)}}function uc(a,b){return function(d,e,f){if(e=Oc(e,f,3),Dh(d)){var g=c(d,e,b);return g>-1?d[g]:x}return Cb(d,e,a)}}function vc(a){return function(b,d,e){return b&&b.length?(d=Oc(d,e,3),c(b,d,a)):-1}}function wc(a){return function(b,c,d){return c=Oc(c,d,3),Cb(b,c,a,!0)}}function xc(a){return function(){for(var b,c=arguments.length,d=a?c:-1,e=0,f=Of(c);a?d--:++d<c;){var g=f[e++]=arguments[d];if("function"!=typeof g)throw new Xf(P);!b&&_.prototype.thru&&"wrapper"==Pc(g)&&(b=new _([],!0))}for(d=b?-1:c;++d<c;){g=f[d];var h=Pc(g),i="wrapper"==h?Pg(g):x;b=i&&ad(i[0])&&i[1]==(G|C|E|H)&&!i[4].length&&1==i[9]?b[Pc(i[0])].apply(b,i[3]):1==g.length&&ad(g)?b[h]():b.thru(g)}return function(){var a=arguments,d=a[0];if(b&&1==a.length&&Dh(d)&&d.length>=M)return b.plant(d).value();for(var e=0,g=c?f[e].apply(this,a):d;++e<c;)g=f[e].call(this,g);return g}}}function yc(a,b){return function(c,d,e){return"function"==typeof d&&e===x&&Dh(c)?a(c,d):b(c,fc(d,e,3))}}function zc(a){return function(b,c,d){return("function"!=typeof c||d!==x)&&(c=fc(c,d,3)),a(b,c,_e)}}function Ac(a){return function(b,c,d){return("function"!=typeof c||d!==x)&&(c=fc(c,d,3)),a(b,c)}}function Bc(a){return function(b,c,d){var e={};return c=Oc(c,d,3),Fb(b,function(b,d,f){var g=c(b,d,f);d=a?g:d,b=a?b:g,e[d]=b}),e}}function Cc(a){return function(b,c,d){return b=f(b),(a?b:"")+Gc(b,c,d)+(a?"":b)}}function Dc(a){var b=qe(function(c,d){var e=r(d,b.placeholder);return Kc(c,a,x,d,e)});return b}function Ec(a,b){return function(c,d,e,f){var g=arguments.length<3;return"function"==typeof d&&f===x&&Dh(c)?a(c,d,e,g):Vb(c,Oc(d,f,4),e,g,b)}}function Fc(a,b,c,d,e,f,g,h,i,j){function k(){for(var t=arguments.length,u=t,v=Of(t);u--;)v[u]=arguments[u];if(d&&(v=hc(v,d,e)),f&&(v=ic(v,f,g)),o||q){var w=k.placeholder,y=r(v,w);if(t-=y.length,j>t){var B=h?cb(h):x,C=vg(j-t,0),D=o?y:x,G=o?x:y,H=o?v:x,I=o?x:v;b|=o?E:F,b&=~(o?F:E),p||(b&=~(z|A));var J=[a,b,c,H,D,I,G,B,i,C],K=Fc.apply(x,J);return ad(a)&&Rg(K,J),K.placeholder=w,K}}var L=m?c:this,M=n?L[a]:a;return h&&(v=hd(v,h)),l&&i<v.length&&(v.length=i),this&&this!==ab&&this instanceof k&&(M=s||qc(a)),M.apply(L,v)}var l=b&G,m=b&z,n=b&A,o=b&C,p=b&B,q=b&D,s=n?x:qc(a);return k}function Gc(a,b,c){var d=a.length;if(b=+b,d>=b||!tg(b))return"";var e=b-d;return c=null==c?" ":c+"",qf(c,pg(e/c.length)).slice(0,e)}function Hc(a,b,c,d){function e(){for(var b=-1,h=arguments.length,i=-1,j=d.length,k=Of(j+h);++i<j;)k[i]=d[i];for(;h--;)k[i++]=arguments[++b];var l=this&&this!==ab&&this instanceof e?g:a;return l.apply(f?c:this,k)}var f=b&z,g=qc(a);return e}function Ic(a){var b=Sf[a];return function(a,c){return c=c===x?0:+c||0,c?(c=ig(10,c),b(a*c)/c):b(a)}}function Jc(a){return function(b,c,d,e){var f=Oc(d);return null==d&&f===ub?dc(b,c,a):ec(b,c,f(d,e,1),a)}}function Kc(a,b,c,d,e,f,g,h){var i=b&A;if(!i&&"function"!=typeof a)throw new Xf(P);var j=d?d.length:0;if(j||(b&=~(E|F),d=e=x),j-=e?e.length:0,b&F){var k=d,l=e;d=e=x}var m=i?x:Pg(a),n=[a,b,c,d,e,k,l,f,g,h];if(m&&(dd(n,m),b=n[1],h=n[9]),n[9]=null==h?i?0:a.length:vg(h-j,0)||0,b==z)var o=nc(n[0],n[2]);else o=b!=E&&b!=(z|E)||n[4].length?Fc.apply(x,n):Hc.apply(x,n);var p=m?Og:Rg;return p(o,n)}function Lc(a,b,c,d,e,f,g){var h=-1,i=a.length,j=b.length;if(i!=j&&!(e&&j>i))return!1;for(;++h<i;){var k=a[h],l=b[h],m=d?d(e?l:k,e?k:l,h):x;if(m!==x){if(m)continue;return!1}if(e){if(!mb(b,function(a){return k===a||c(k,a,d,e,f,g)}))return!1}else if(k!==l&&!c(k,l,d,e,f,g))return!1}return!0}function Mc(a,b,c){switch(c){case T:case U:return+a==+b;case V:return a.name==b.name&&a.message==b.message;case Y:return a!=+a?b!=+b:a==+b;case $:case aa:return a==b+""}return!1}function Nc(a,b,c,d,e,f,g){var h=Oh(a),i=h.length,j=Oh(b),k=j.length;if(i!=k&&!e)return!1;for(var l=i;l--;){var m=h[l];if(!(e?m in b:ag.call(b,m)))return!1}for(var n=e;++l<i;){m=h[l];var o=a[m],p=b[m],q=d?d(e?p:o,e?o:p,m):x;if(!(q===x?c(o,p,d,e,f,g):q))return!1;n||(n="constructor"==m)}if(!n){var r=a.constructor,s=b.constructor;if(r!=s&&"constructor"in a&&"constructor"in b&&!("function"==typeof r&&r instanceof r&&"function"==typeof s&&s instanceof s))return!1}return!0}function Oc(a,b,c){var d=q.callback||zf;return d=d===zf?ub:d,c?d(a,b,c):d}function Pc(a){for(var b=a.name+"",c=Hg[b],d=c?c.length:0;d--;){var e=c[d],f=e.func;if(null==f||f==a)return e.name}return b}function Qc(a,b,c){var e=q.indexOf||xd;return e=e===xd?d:e,a?e(a,b,c):e}function Rc(a){for(var b=af(a),c=b.length;c--;)b[c][2]=cd(b[c][1]);return b}function Sc(a,b){var c=null==a?x:a[b];return Ke(c)?c:x}function Tc(a,b,c){for(var d=-1,e=c.length;++d<e;){var f=c[d],g=f.size;switch(f.type){case"drop":a+=g;break;case"dropRight":b-=g;break;case"take":b=wg(b,a+g);break;case"takeRight":a=vg(a,b-g)}}return{start:a,end:b}}function Uc(a){var b=a.length,c=new a.constructor(b);return b&&"string"==typeof a[0]&&ag.call(a,"index")&&(c.index=a.index,c.input=a.input),c}function Vc(a){var b=a.constructor;return"function"==typeof b&&b instanceof b||(b=Uf),new b}function Wc(a,b,c){var d=a.constructor;switch(b){case ca:return gc(a);case T:case U:return new d(+a);case da:case ea:case fa:case ga:case ha:case ia:case ja:case ka:case la:var e=a.buffer;return new d(c?gc(e):e,a.byteOffset,a.length);case Y:case aa:return new d(a);case $:var f=new d(a.source,Ea.exec(a));f.lastIndex=a.lastIndex}return f}function Xc(a,b,c){null==a||_c(b,a)||(b=ld(b),a=1==b.length?a:Ib(a,Wb(b,0,-1)),b=zd(b));var d=null==a?a:a[b];return null==d?x:d.apply(a,c)}function Yc(a){return null!=a&&bd(Qg(a))}function Zc(a,b){return a="number"==typeof a||Ha.test(a)?+a:-1,b=null==b?Fg:b,a>-1&&a%1==0&&b>a}function $c(a,b,c){if(!He(c))return!1;var d=typeof b;if("number"==d?Yc(c)&&Zc(b,c.length):"string"==d&&b in c){var e=c[b];return a===a?a===e:e!==e}return!1}function _c(a,b){var c=typeof a;if("string"==c&&xa.test(a)||"number"==c)return!0;if(Dh(a))return!1;var d=!wa.test(a);return d||null!=b&&a in kd(b)}function ad(a){var b=Pc(a),c=q[b];if("function"!=typeof c||!(b in ba.prototype))return!1;if(a===c)return!0;var d=Pg(c);return!!d&&a===d[0]}function bd(a){return"number"==typeof a&&a>-1&&a%1==0&&Fg>=a}function cd(a){return a===a&&!He(a)}function dd(a,b){var c=a[1],d=b[1],e=c|d,f=G>e,g=d==G&&c==C||d==G&&c==H&&a[7].length<=b[8]||d==(G|H)&&c==C;if(!f&&!g)return a;d&z&&(a[2]=b[2],e|=c&z?0:B);var h=b[3];if(h){var i=a[3];a[3]=i?hc(i,h,b[4]):cb(h),a[4]=i?r(a[3],Q):cb(b[4])}return h=b[5],h&&(i=a[5],a[5]=i?ic(i,h,b[6]):cb(h),a[6]=i?r(a[5],Q):cb(b[6])),h=b[7],h&&(a[7]=cb(h)),d&G&&(a[8]=null==a[8]?b[8]:wg(a[8],b[8])),null==a[9]&&(a[9]=b[9]),a[0]=b[0],a[1]=e,a}function ed(a,b){return a===x?b:Eh(a,b,ed)}function fd(a,b){a=kd(a);for(var c=-1,d=b.length,e={};++c<d;){var f=b[c];f in a&&(e[f]=a[f])}return e}function gd(a,b){var c={};return Eb(a,function(a,d,e){b(a,d,e)&&(c[d]=a)}),c}function hd(a,b){for(var c=a.length,d=wg(b.length,c),e=cb(a);d--;){var f=b[d];a[d]=Zc(f,c)?e[f]:x}return a}function id(a){for(var b=_e(a),c=b.length,d=c&&a.length,e=!!d&&bd(d)&&(Dh(a)||ye(a)),f=-1,g=[];++f<c;){var h=b[f];(e&&Zc(h,d)||ag.call(a,h))&&g.push(h)}return g}function jd(a){return null==a?[]:Yc(a)?He(a)?a:Uf(a):ef(a)}function kd(a){return He(a)?a:Uf(a)}function ld(a){if(Dh(a))return a;var b=[];return f(a).replace(ya,function(a,c,d,e){b.push(d?e.replace(Ca,"$1"):c||a)}),b}function md(a){return a instanceof ba?a.clone():new _(a.__wrapped__,a.__chain__,cb(a.__actions__))}function nd(a,b,c){b=(c?$c(a,b,c):null==b)?1:vg(rg(b)||1,1);for(var d=0,e=a?a.length:0,f=-1,g=Of(pg(e/b));e>d;)g[++f]=Wb(a,d,d+=b);return g}function od(a){for(var b=-1,c=a?a.length:0,d=-1,e=[];++b<c;){var f=a[b];f&&(e[++d]=f)}return e}function pd(a,b,c){var d=a?a.length:0;return d?((c?$c(a,b,c):null==b)&&(b=1),Wb(a,0>b?0:b)):[]}function qd(a,b,c){var d=a?a.length:0;return d?((c?$c(a,b,c):null==b)&&(b=1),b=d-(+b||0),Wb(a,0,0>b?0:b)):[]}function rd(a,b,c){return a&&a.length?bc(a,Oc(b,c,3),!0,!0):[]}function sd(a,b,c){return a&&a.length?bc(a,Oc(b,c,3),!0):[]}function td(a,b,c,d){var e=a?a.length:0;return e?(c&&"number"!=typeof c&&$c(a,b,c)&&(c=0,d=e),Ab(a,b,c,d)):[]}function ud(a){return a?a[0]:x}function vd(a,b,c){var d=a?a.length:0;return c&&$c(a,b,c)&&(b=!1),d?Db(a,b):[]}function wd(a){var b=a?a.length:0;return b?Db(a,!0):[]}function xd(a,b,c){var e=a?a.length:0;if(!e)return-1;if("number"==typeof c)c=0>c?vg(e+c,0):c;else if(c){var f=dc(a,b);return e>f&&(b===b?b===a[f]:a[f]!==a[f])?f:-1}return d(a,b,c||0)}function yd(a){return qd(a,1)}function zd(a){var b=a?a.length:0;return b?a[b-1]:x}function Ad(a,b,c){var d=a?a.length:0;if(!d)return-1;var e=d;if("number"==typeof c)e=(0>c?vg(d+c,0):wg(c||0,d-1))+1;else if(c){e=dc(a,b,!0)-1;var f=a[e];return(b===b?b===f:f!==f)?e:-1}if(b!==b)return o(a,e,!0);for(;e--;)if(a[e]===b)return e;return-1}function Bd(){var a=arguments,b=a[0];if(!b||!b.length)return b;for(var c=0,d=Qc(),e=a.length;++c<e;)for(var f=0,g=a[c];(f=d(b,g,f))>-1;)mg.call(b,f,1);return b}function Cd(a,b,c){var d=[];if(!a||!a.length)return d;var e=-1,f=[],g=a.length;for(b=Oc(b,c,3);++e<g;){var h=a[e];b(h,e,a)&&(d.push(h),f.push(e))}return Tb(a,f),d}function Dd(a){return pd(a,1)}function Ed(a,b,c){var d=a?a.length:0;return d?(c&&"number"!=typeof c&&$c(a,b,c)&&(b=0,c=d),Wb(a,b,c)):[]}function Fd(a,b,c){var d=a?a.length:0;return d?((c?$c(a,b,c):null==b)&&(b=1),Wb(a,0,0>b?0:b)):[]}function Gd(a,b,c){var d=a?a.length:0;return d?((c?$c(a,b,c):null==b)&&(b=1),b=d-(+b||0),Wb(a,0>b?0:b)):[]}function Hd(a,b,c){return a&&a.length?bc(a,Oc(b,c,3),!1,!0):[]}function Id(a,b,c){return a&&a.length?bc(a,Oc(b,c,3)):[]}function Jd(a,b,c,e){var f=a?a.length:0;if(!f)return[];null!=b&&"boolean"!=typeof b&&(e=c,c=$c(a,b,e)?x:b,b=!1);var g=Oc();return(null!=c||g!==ub)&&(c=g(c,e,3)),b&&Qc()===d?s(a,c):_b(a,c)}function Kd(a){if(!a||!a.length)return[];var b=-1,c=0;a=hb(a,function(a){return Yc(a)?(c=vg(a.length,c),!0):void 0});for(var d=Of(c);++b<c;)d[b]=ib(a,Rb(b));return d}function Ld(a,b,c){var d=a?a.length:0;if(!d)return[];var e=Kd(a);return null==b?e:(b=fc(b,c,4),ib(e,function(a){return kb(a,b,x,!0)}))}function Md(){for(var a=-1,b=arguments.length;++a<b;){var c=arguments[a];if(Yc(c))var d=d?jb(xb(d,c),xb(c,d)):c}return d?_b(d):[]}function Nd(a,b){var c=-1,d=a?a.length:0,e={};for(!d||b||Dh(a[0])||(b=[]);++c<d;){var f=a[c];b?e[f]=b[c]:f&&(e[f[0]]=f[1])}return e}function Od(a){var b=q(a);return b.__chain__=!0,b}function Pd(a,b,c){return b.call(c,a),a}function Qd(a,b,c){return b.call(c,a)}function Rd(){return Od(this)}function Sd(){return new _(this.value(),this.__chain__)}function Td(a){for(var b,c=this;c instanceof X;){var d=md(c);b?e.__wrapped__=d:b=d;var e=d;c=c.__wrapped__}return e.__wrapped__=a,b}function Ud(){var a=this.__wrapped__,b=function(a){return a.reverse()};if(a instanceof ba){var c=a;return this.__actions__.length&&(c=new ba(this)),c=c.reverse(),c.__actions__.push({func:Qd,args:[b],thisArg:x}),new _(c,this.__chain__)}return this.thru(b)}function Vd(){return this.value()+""}function Wd(){return cc(this.__wrapped__,this.__actions__)}function Xd(a,b,c){var d=Dh(a)?fb:yb;return c&&$c(a,b,c)&&(b=x),("function"!=typeof b||c!==x)&&(b=Oc(b,c,3)),d(a,b)}function Yd(a,b,c){var d=Dh(a)?hb:Bb;return b=Oc(b,c,3),d(a,b)}function Zd(a,b){return eh(a,Nb(b))}function $d(a,b,c,d){var e=a?Qg(a):0;return bd(e)||(a=ef(a),e=a.length),c="number"!=typeof c||d&&$c(b,c,d)?0:0>c?vg(e+c,0):c||0,"string"==typeof a||!Dh(a)&&Pe(a)?e>=c&&a.indexOf(b,c)>-1:!!e&&Qc(a,b,c)>-1}function _d(a,b,c){var d=Dh(a)?ib:Mb;return b=Oc(b,c,3),d(a,b)}function ae(a,b){return _d(a,Hf(b))}function be(a,b,c){var d=Dh(a)?hb:Bb;return b=Oc(b,c,3),d(a,function(a,c,d){return!b(a,c,d)})}function ce(a,b,c){if(c?$c(a,b,c):null==b){a=jd(a);var d=a.length;return d>0?a[Ub(0,d-1)]:x}var e=-1,f=Ue(a),d=f.length,g=d-1;for(b=wg(0>b?0:+b||0,d);++e<b;){var h=Ub(e,g),i=f[h];f[h]=f[e],f[e]=i}return f.length=b,f}function de(a){return ce(a,Bg)}function ee(a){var b=a?Qg(a):0;return bd(b)?b:Oh(a).length}function fe(a,b,c){var d=Dh(a)?mb:Xb;return c&&$c(a,b,c)&&(b=x),("function"!=typeof b||c!==x)&&(b=Oc(b,c,3)),d(a,b)}function ge(a,b,c){if(null==a)return[];c&&$c(a,b,c)&&(b=x);var d=-1;b=Oc(b,c,3);var e=Mb(a,function(a,c,e){return{criteria:b(a,c,e),index:++d,value:a}});return Yb(e,i)}function he(a,b,c,d){return null==a?[]:(d&&$c(b,c,d)&&(c=x),Dh(b)||(b=null==b?[]:[b]),Dh(c)||(c=null==c?[]:[c]),Zb(a,b,c))}function ie(a,b){return Yd(a,Nb(b))}function je(a,b){if("function"!=typeof b){if("function"!=typeof a)throw new Xf(P);var c=a;a=b,b=c}return a=tg(a=+a)?a:0,function(){return--a<1?b.apply(this,arguments):void 0}}function ke(a,b,c){return c&&$c(a,b,c)&&(b=x),b=a&&null==b?a.length:vg(+b||0,0),Kc(a,G,x,x,x,x,b)}function le(a,b){var c;if("function"!=typeof b){if("function"!=typeof a)throw new Xf(P);var d=a;a=b,b=d}return function(){return--a>0&&(c=b.apply(this,arguments)),1>=a&&(b=x),c}}function me(a,b,c){function d(){n&&gg(n),j&&gg(j),p=0,j=n=o=x}function e(b,c){c&&gg(c),j=n=o=x,b&&(p=ph(),k=a.apply(m,i),n||j||(i=m=x))}function f(){var a=b-(ph()-l);0>=a||a>b?e(o,j):n=lg(f,a)}function g(){e(r,n)}function h(){if(i=arguments,l=ph(),m=this,o=r&&(n||!s),q===!1)var c=s&&!n;else{j||s||(p=l);var d=q-(l-p),e=0>=d||d>q;e?(j&&(j=gg(j)),p=l,k=a.apply(m,i)):j||(j=lg(g,d))}return e&&n?n=gg(n):n||b===q||(n=lg(f,b)),c&&(e=!0,k=a.apply(m,i)),!e||n||j||(i=m=x),k}var i,j,k,l,m,n,o,p=0,q=!1,r=!0;if("function"!=typeof a)throw new Xf(P);if(b=0>b?0:+b||0,c===!0){var s=!0;r=!1}else He(c)&&(s=!!c.leading,q="maxWait"in c&&vg(+c.maxWait||0,b),r="trailing"in c?!!c.trailing:r);return h.cancel=d,h}function ne(a,b){if("function"!=typeof a||b&&"function"!=typeof b)throw new Xf(P);var c=function(){var d=arguments,e=b?b.apply(this,d):d[0],f=c.cache;if(f.has(e))return f.get(e);var g=a.apply(this,d);return c.cache=f.set(e,g),g};return c.cache=new ne.Cache,c}function oe(a){if("function"!=typeof a)throw new Xf(P);return function(){return!a.apply(this,arguments)}}function pe(a){return le(2,a)}function qe(a,b){if("function"!=typeof a)throw new Xf(P);return b=vg(b===x?a.length-1:+b||0,0),function(){for(var c=arguments,d=-1,e=vg(c.length-b,0),f=Of(e);++d<e;)f[d]=c[b+d];switch(b){case 0:return a.call(this,f);case 1:return a.call(this,c[0],f);case 2:return a.call(this,c[0],c[1],f)}var g=Of(b+1);for(d=-1;++d<b;)g[d]=c[d];return g[b]=f,a.apply(this,g)}}function re(a){if("function"!=typeof a)throw new Xf(P);return function(b){return a.apply(this,b)}}function se(a,b,c){var d=!0,e=!0;if("function"!=typeof a)throw new Xf(P);return c===!1?d=!1:He(c)&&(d="leading"in c?!!c.leading:d,e="trailing"in c?!!c.trailing:e),me(a,b,{leading:d,maxWait:+b,trailing:e})}function te(a,b){return b=null==b?Bf:b,Kc(b,E,x,[a],[])}function ue(a,b,c,d){return b&&"boolean"!=typeof b&&$c(a,b,c)?b=!1:"function"==typeof b&&(d=c,c=b,b=!1),"function"==typeof c?vb(a,b,fc(c,d,3)):vb(a,b)}function ve(a,b,c){return"function"==typeof b?vb(a,!0,fc(b,c,3)):vb(a,!0)}function we(a,b){return a>b}function xe(a,b){return a>=b}function ye(a){return p(a)&&Yc(a)&&ag.call(a,"callee")&&!jg.call(a,"callee")}function ze(a){return a===!0||a===!1||p(a)&&cg.call(a)==T}function Ae(a){return p(a)&&cg.call(a)==U}function Be(a){return!!a&&1===a.nodeType&&p(a)&&!Ne(a)}function Ce(a){return null==a?!0:Yc(a)&&(Dh(a)||Pe(a)||ye(a)||p(a)&&Ge(a.splice))?!a.length:!Oh(a).length}function De(a,b,c,d){c="function"==typeof c?fc(c,d,3):x;var e=c?c(a,b):x;return e===x?Jb(a,b,c):!!e}function Ee(a){return p(a)&&"string"==typeof a.message&&cg.call(a)==V}function Fe(a){return"number"==typeof a&&tg(a)}function Ge(a){return He(a)&&cg.call(a)==W}function He(a){var b=typeof a;return!!a&&("object"==b||"function"==b)}function Ie(a,b,c,d){return c="function"==typeof c?fc(c,d,3):x,Lb(a,Rc(b),c)}function Je(a){return Me(a)&&a!=+a}function Ke(a){return null==a?!1:Ge(a)?eg.test(_f.call(a)):p(a)&&Ga.test(a)}function Le(a){return null===a}function Me(a){return"number"==typeof a||p(a)&&cg.call(a)==Y}function Ne(a){var b;if(!p(a)||cg.call(a)!=Z||ye(a)||!ag.call(a,"constructor")&&(b=a.constructor,"function"==typeof b&&!(b instanceof b)))return!1;var c;return Eb(a,function(a,b){c=b}),c===x||ag.call(a,c)}function Oe(a){return He(a)&&cg.call(a)==$}function Pe(a){return"string"==typeof a||p(a)&&cg.call(a)==aa}function Qe(a){return p(a)&&bd(a.length)&&!!Oa[cg.call(a)]}function Re(a){return a===x}function Se(a,b){return b>a}function Te(a,b){return b>=a}function Ue(a){var b=a?Qg(a):0;return bd(b)?b?cb(a):[]:ef(a)}function Ve(a){return tb(a,_e(a))}function We(a,b,c){var d=Jg(a);return c&&$c(a,b,c)&&(b=x),b?rb(d,b):d}function Xe(a){return Hb(a,_e(a))}function Ye(a,b,c){var d=null==a?x:Ib(a,ld(b),b+"");return d===x?c:d}function Ze(a,b){if(null==a)return!1;var c=ag.call(a,b);if(!c&&!_c(b)){if(b=ld(b),a=1==b.length?a:Ib(a,Wb(b,0,-1)),null==a)return!1;b=zd(b),c=ag.call(a,b)}return c||bd(a.length)&&Zc(b,a.length)&&(Dh(a)||ye(a))}function $e(a,b,c){c&&$c(a,b,c)&&(b=x);for(var d=-1,e=Oh(a),f=e.length,g={};++d<f;){var h=e[d],i=a[h];b?ag.call(g,i)?g[i].push(h):g[i]=[h]:g[i]=h}return g}function _e(a){if(null==a)return[];He(a)||(a=Uf(a));var b=a.length;b=b&&bd(b)&&(Dh(a)||ye(a))&&b||0;for(var c=a.constructor,d=-1,e="function"==typeof c&&c.prototype===a,f=Of(b),g=b>0;++d<b;)f[d]=d+"";for(var h in a)g&&Zc(h,b)||"constructor"==h&&(e||!ag.call(a,h))||f.push(h);return f}function af(a){a=kd(a);for(var b=-1,c=Oh(a),d=c.length,e=Of(d);++b<d;){var f=c[b];e[b]=[f,a[f]]}return e}function bf(a,b,c){var d=null==a?x:a[b];return d===x&&(null==a||_c(b,a)||(b=ld(b),a=1==b.length?a:Ib(a,Wb(b,0,-1)),d=null==a?x:a[zd(b)]),d=d===x?c:d),Ge(d)?d.call(a):d}function cf(a,b,c){if(null==a)return a;var d=b+"";b=null!=a[d]||_c(b,a)?[d]:ld(b);for(var e=-1,f=b.length,g=f-1,h=a;null!=h&&++e<f;){var i=b[e];He(h)&&(e==g?h[i]=c:null==h[i]&&(h[i]=Zc(b[e+1])?[]:{})),h=h[i]}return a}function df(a,b,c,d){var e=Dh(a)||Qe(a);if(b=Oc(b,d,4),null==c)if(e||He(a)){var f=a.constructor;c=e?Dh(a)?new f:[]:Jg(Ge(f)?f.prototype:x)}else c={};return(e?db:Fb)(a,function(a,d,e){return b(c,a,d,e)}),c}function ef(a){return ac(a,Oh(a))}function ff(a){return ac(a,_e(a))}function gf(a,b,c){return b=+b||0,c===x?(c=b,b=0):c=+c||0,a>=wg(b,c)&&a<vg(b,c)}function hf(a,b,c){c&&$c(a,b,c)&&(b=c=x);var d=null==a,e=null==b;if(null==c&&(e&&"boolean"==typeof a?(c=a,a=1):"boolean"==typeof b&&(c=b,e=!0)),d&&e&&(b=1,e=!1),a=+a||0,e?(b=a,a=0):b=+b||0,c||a%1||b%1){var f=zg();return wg(a+f*(b-a+hg("1e-"+((f+"").length-1))),b)}return Ub(a,b)}function jf(a){return a=f(a),
-a&&a.charAt(0).toUpperCase()+a.slice(1)}function kf(a){return a=f(a),a&&a.replace(Ia,k).replace(Ba,"")}function lf(a,b,c){a=f(a),b+="";var d=a.length;return c=c===x?d:wg(0>c?0:+c||0,d),c-=b.length,c>=0&&a.indexOf(b,c)==c}function mf(a){return a=f(a),a&&sa.test(a)?a.replace(qa,l):a}function nf(a){return a=f(a),a&&Aa.test(a)?a.replace(za,m):a||"(?:)"}function of(a,b,c){a=f(a),b=+b;var d=a.length;if(d>=b||!tg(b))return a;var e=(b-d)/2,g=rg(e),h=pg(e);return c=Gc("",h,c),c.slice(0,g)+a+c}function pf(a,b,c){return(c?$c(a,b,c):null==b)?b=0:b&&(b=+b),a=tf(a),yg(a,b||(Fa.test(a)?16:10))}function qf(a,b){var c="";if(a=f(a),b=+b,1>b||!a||!tg(b))return c;do b%2&&(c+=a),b=rg(b/2),a+=a;while(b);return c}function rf(a,b,c){return a=f(a),c=null==c?0:wg(0>c?0:+c||0,a.length),a.lastIndexOf(b,c)==c}function sf(a,b,c){var d=q.templateSettings;c&&$c(a,b,c)&&(b=c=x),a=f(a),b=qb(rb({},c||b),d,pb);var e=qb(rb({},b.imports),d.imports,pb),g=Oh(e),h=ac(e,g),i,j,k=0,l=b.interpolate||Ja,m="__p += '",o=Vf((b.escape||Ja).source+"|"+l.source+"|"+(l===va?Da:Ja).source+"|"+(b.evaluate||Ja).source+"|$","g"),p="//# sourceURL="+("sourceURL"in b?b.sourceURL:"lodash.templateSources["+ ++Na+"]")+"\n";a.replace(o,function(b,c,d,e,f,g){return d||(d=e),m+=a.slice(k,g).replace(Ka,n),c&&(i=!0,m+="' +\n__e("+c+") +\n'"),f&&(j=!0,m+="';\n"+f+";\n__p += '"),d&&(m+="' +\n((__t = ("+d+")) == null ? '' : __t) +\n'"),k=g+b.length,b}),m+="';\n";var r=b.variable;r||(m="with (obj) {\n"+m+"\n}\n"),m=(j?m.replace(ma,""):m).replace(na,"$1").replace(oa,"$1;"),m="function("+(r||"obj")+") {\n"+(r?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(i?", __e = _.escape":"")+(j?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+m+"return __p\n}";var s=Zh(function(){return Rf(g,p+"return "+m).apply(x,h)});if(s.source=m,Ee(s))throw s;return s}function tf(a,b,c){var d=a;return(a=f(a))?(c?$c(d,b,c):null==b)?a.slice(t(a),u(a)+1):(b+="",a.slice(g(a,b),h(a,b)+1)):a}function uf(a,b,c){var d=a;return a=f(a),a?(c?$c(d,b,c):null==b)?a.slice(t(a)):a.slice(g(a,b+"")):a}function vf(a,b,c){var d=a;return a=f(a),a?(c?$c(d,b,c):null==b)?a.slice(0,u(a)+1):a.slice(0,h(a,b+"")+1):a}function wf(a,b,c){c&&$c(a,b,c)&&(b=x);var d=I,e=J;if(null!=b)if(He(b)){var g="separator"in b?b.separator:g;d="length"in b?+b.length||0:d,e="omission"in b?f(b.omission):e}else d=+b||0;if(a=f(a),d>=a.length)return a;var h=d-e.length;if(1>h)return e;var i=a.slice(0,h);if(null==g)return i+e;if(Oe(g)){if(a.slice(h).search(g)){var j,k,l=a.slice(0,h);for(g.global||(g=Vf(g.source,(Ea.exec(g)||"")+"g")),g.lastIndex=0;j=g.exec(l);)k=j.index;i=i.slice(0,null==k?h:k)}}else if(a.indexOf(g,h)!=h){var m=i.lastIndexOf(g);m>-1&&(i=i.slice(0,m))}return i+e}function xf(a){return a=f(a),a&&ra.test(a)?a.replace(pa,v):a}function yf(a,b,c){return c&&$c(a,b,c)&&(b=x),a=f(a),a.match(b||La)||[]}function zf(a,b,c){return c&&$c(a,b,c)&&(b=x),p(a)?Cf(a):ub(a,b)}function Af(a){return function(){return a}}function Bf(a){return a}function Cf(a){return Nb(vb(a,!0))}function Df(a,b){return Ob(a,vb(b,!0))}function Ef(a,b,c){if(null==c){var d=He(b),e=d?Oh(b):x,f=e&&e.length?Hb(b,e):x;(f?f.length:d)||(f=!1,c=b,b=a,a=this)}f||(f=Hb(b,Oh(b)));var g=!0,h=-1,i=Ge(a),j=f.length;c===!1?g=!1:He(c)&&"chain"in c&&(g=c.chain);for(;++h<j;){var k=f[h],l=b[k];a[k]=l,i&&(a.prototype[k]=function(b){return function(){var c=this.__chain__;if(g||c){var d=a(this.__wrapped__),e=d.__actions__=cb(this.__actions__);return e.push({func:b,args:arguments,thisArg:a}),d.__chain__=c,d}return b.apply(a,jb([this.value()],arguments))}}(l))}return a}function Ff(){return ab._=dg,this}function Gf(){}function Hf(a){return _c(a)?Rb(a):Sb(a)}function If(a){return function(b){return Ib(a,ld(b),b+"")}}function Jf(a,b,c){c&&$c(a,b,c)&&(b=c=x),a=+a||0,c=null==c?1:+c||0,null==b?(b=a,a=0):b=+b||0;for(var d=-1,e=vg(pg((b-a)/(c||1)),0),f=Of(e);++d<e;)f[d]=a,a+=c;return f}function Kf(a,b,c){if(a=rg(a),1>a||!tg(a))return[];var d=-1,e=Of(wg(a,Cg));for(b=fc(b,c,1);++d<a;)Cg>d?e[d]=b(d):b(d);return e}function Lf(a){var b=++bg;return f(a)+b}function Mf(a,b){return(+a||0)+(+b||0)}function Nf(a,b,c){return c&&$c(a,b,c)&&(b=x),b=Oc(b,c,3),1==b.length?nb(Dh(a)?a:jd(a),b):$b(a,b)}a=a?bb.defaults(ab.Object(),a,bb.pick(ab,Ma)):ab;var Of=a.Array,Pf=a.Date,Qf=a.Error,Rf=a.Function,Sf=a.Math,Tf=a.Number,Uf=a.Object,Vf=a.RegExp,Wf=a.String,Xf=a.TypeError,Yf=Of.prototype,Zf=Uf.prototype,$f=Wf.prototype,_f=Rf.prototype.toString,ag=Zf.hasOwnProperty,bg=0,cg=Zf.toString,dg=ab._,eg=Vf("^"+_f.call(ag).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),fg=a.ArrayBuffer,gg=a.clearTimeout,hg=a.parseFloat,ig=Sf.pow,jg=Zf.propertyIsEnumerable,kg=Sc(a,"Set"),lg=a.setTimeout,mg=Yf.splice,ng=a.Uint8Array,og=Sc(a,"WeakMap"),pg=Sf.ceil,qg=Sc(Uf,"create"),rg=Sf.floor,sg=Sc(Of,"isArray"),tg=a.isFinite,ug=Sc(Uf,"keys"),vg=Sf.max,wg=Sf.min,xg=Sc(Pf,"now"),yg=a.parseInt,zg=Sf.random,Ag=Tf.NEGATIVE_INFINITY,Bg=Tf.POSITIVE_INFINITY,Cg=4294967295,Dg=Cg-1,Eg=Cg>>>1,Fg=9007199254740991,Gg=og&&new og,Hg={},Ig=q.support={};q.templateSettings={escape:ta,evaluate:ua,interpolate:va,variable:"",imports:{_:q}};var Jg=function(){function a(){}return function(b){if(He(b)){a.prototype=b;var c=new a;a.prototype=x}return c||{}}}(),Kg=lc(Fb),Lg=lc(Gb,!0),Mg=mc(),Ng=mc(!0),Og=Gg?function(a,b){return Gg.set(a,b),a}:Bf,Pg=Gg?function(a){return Gg.get(a)}:Gf,Qg=Rb("length"),Rg=function(){var a=0,b=0;return function(c,d){var e=ph(),f=L-(e-b);if(b=e,f>0){if(++a>=K)return c}else a=0;return Og(c,d)}}(),Sg=qe(function(a,b){return p(a)&&Yc(a)?xb(a,Db(b,!1,!0)):[]}),Tg=vc(),Ug=vc(!0),Vg=qe(function(a){for(var b=a.length,c=b,e=Of(l),f=Qc(),g=f===d,h=[];c--;){var i=a[c]=Yc(i=a[c])?i:[];e[c]=g&&i.length>=120?oc(c&&i):null}var j=a[0],k=-1,l=j?j.length:0,m=e[0];a:for(;++k<l;)if(i=j[k],(m?Za(m,i):f(h,i,0))<0){for(var c=b;--c;){var n=e[c];if((n?Za(n,i):f(a[c],i,0))<0)continue a}m&&m.push(i),h.push(i)}return h}),Wg=qe(function(a,c){c=Db(c);var d=sb(a,c);return Tb(a,c.sort(b)),d}),Xg=Jc(),Yg=Jc(!0),Zg=qe(function(a){return _b(Db(a,!1,!0))}),$g=qe(function(a,b){return Yc(a)?xb(a,b):[]}),_g=qe(Kd),ah=qe(function(a){var b=a.length,c=b>2?a[b-2]:x,d=b>1?a[b-1]:x;return b>2&&"function"==typeof c?b-=2:(c=b>1&&"function"==typeof d?(--b,d):x,d=x),a.length=b,Ld(a,c,d)}),bh=qe(function(a){return a=Db(a),this.thru(function(b){return _a(Dh(b)?b:[kd(b)],a)})}),ch=qe(function(a,b){return sb(a,Db(b))}),dh=jc(function(a,b,c){ag.call(a,c)?++a[c]:a[c]=1}),eh=uc(Kg),fh=uc(Lg,!0),gh=yc(db,Kg),hh=yc(eb,Lg),ih=jc(function(a,b,c){ag.call(a,c)?a[c].push(b):a[c]=[b]}),jh=jc(function(a,b,c){a[c]=b}),kh=qe(function(a,b,c){var d=-1,e="function"==typeof b,f=_c(b),g=Yc(a)?Of(a.length):[];return Kg(a,function(a){var h=e?b:f&&null!=a?a[b]:x;g[++d]=h?h.apply(a,c):Xc(a,b,c)}),g}),lh=jc(function(a,b,c){a[c?0:1].push(b)},function(){return[[],[]]}),mh=Ec(kb,Kg),nh=Ec(lb,Lg),oh=qe(function(a,b){if(null==a)return[];var c=b[2];return c&&$c(b[0],b[1],c)&&(b.length=1),Zb(a,Db(b),[])}),ph=xg||function(){return(new Pf).getTime()},qh=qe(function(a,b,c){var d=z;if(c.length){var e=r(c,qh.placeholder);d|=E}return Kc(a,d,b,c,e)}),rh=qe(function(a,b){b=b.length?Db(b):Xe(a);for(var c=-1,d=b.length;++c<d;){var e=b[c];a[e]=Kc(a[e],z,a)}return a}),sh=qe(function(a,b,c){var d=z|A;if(c.length){var e=r(c,sh.placeholder);d|=E}return Kc(b,d,a,c,e)}),th=rc(C),uh=rc(D),vh=qe(function(a,b){return wb(a,1,b)}),wh=qe(function(a,b,c){return wb(a,b,c)}),xh=xc(),yh=xc(!0),zh=qe(function(a,b){if(b=Db(b),"function"!=typeof a||!fb(b,e))throw new Xf(P);var c=b.length;return qe(function(d){for(var e=wg(d.length,c);e--;)d[e]=b[e](d[e]);return a.apply(this,d)})}),Ah=Dc(E),Bh=Dc(F),Ch=qe(function(a,b){return Kc(a,H,x,x,x,Db(b))}),Dh=sg||function(a){return p(a)&&bd(a.length)&&cg.call(a)==S},Eh=kc(Pb),Fh=kc(function(a,b,c){return c?qb(a,b,c):rb(a,b)}),Gh=sc(Fh,ob),Hh=sc(Eh,ed),Ih=wc(Fb),Jh=wc(Gb),Kh=zc(Mg),Lh=zc(Ng),Mh=Ac(Fb),Nh=Ac(Gb),Oh=ug?function(a){var b=null==a?x:a.constructor;return"function"==typeof b&&b.prototype===a||"function"!=typeof a&&Yc(a)?id(a):He(a)?ug(a):[]}:id,Ph=Bc(!0),Qh=Bc(),Rh=qe(function(a,b){if(null==a)return{};if("function"!=typeof b[0]){var b=ib(Db(b),Wf);return fd(a,xb(_e(a),b))}var c=fc(b[0],b[1],3);return gd(a,function(a,b,d){return!c(a,b,d)})}),Sh=qe(function(a,b){return null==a?{}:"function"==typeof b[0]?gd(a,fc(b[0],b[1],3)):fd(a,Db(b))}),Th=pc(function(a,b,c){return b=b.toLowerCase(),a+(c?b.charAt(0).toUpperCase()+b.slice(1):b)}),Uh=pc(function(a,b,c){return a+(c?"-":"")+b.toLowerCase()}),Vh=Cc(),Wh=Cc(!0),Xh=pc(function(a,b,c){return a+(c?"_":"")+b.toLowerCase()}),Yh=pc(function(a,b,c){return a+(c?" ":"")+(b.charAt(0).toUpperCase()+b.slice(1))}),Zh=qe(function(a,b){try{return a.apply(x,b)}catch(c){return Ee(c)?c:new Qf(c)}}),$h=qe(function(a,b){return function(c){return Xc(c,a,b)}}),_h=qe(function(a,b){return function(c){return Xc(a,c,b)}}),ai=Ic("ceil"),bi=Ic("floor"),ci=tc(we,Ag),di=tc(Se,Bg),ei=Ic("round");return q.prototype=X.prototype,_.prototype=Jg(X.prototype),_.prototype.constructor=_,ba.prototype=Jg(X.prototype),ba.prototype.constructor=ba,Ta.prototype["delete"]=Ua,Ta.prototype.get=Va,Ta.prototype.has=Wa,Ta.prototype.set=Xa,Ya.prototype.push=$a,ne.Cache=Ta,q.after=je,q.ary=ke,q.assign=Fh,q.at=ch,q.before=le,q.bind=qh,q.bindAll=rh,q.bindKey=sh,q.callback=zf,q.chain=Od,q.chunk=nd,q.compact=od,q.constant=Af,q.countBy=dh,q.create=We,q.curry=th,q.curryRight=uh,q.debounce=me,q.defaults=Gh,q.defaultsDeep=Hh,q.defer=vh,q.delay=wh,q.difference=Sg,q.drop=pd,q.dropRight=qd,q.dropRightWhile=rd,q.dropWhile=sd,q.fill=td,q.filter=Yd,q.flatten=vd,q.flattenDeep=wd,q.flow=xh,q.flowRight=yh,q.forEach=gh,q.forEachRight=hh,q.forIn=Kh,q.forInRight=Lh,q.forOwn=Mh,q.forOwnRight=Nh,q.functions=Xe,q.groupBy=ih,q.indexBy=jh,q.initial=yd,q.intersection=Vg,q.invert=$e,q.invoke=kh,q.keys=Oh,q.keysIn=_e,q.map=_d,q.mapKeys=Ph,q.mapValues=Qh,q.matches=Cf,q.matchesProperty=Df,q.memoize=ne,q.merge=Eh,q.method=$h,q.methodOf=_h,q.mixin=Ef,q.modArgs=zh,q.negate=oe,q.omit=Rh,q.once=pe,q.pairs=af,q.partial=Ah,q.partialRight=Bh,q.partition=lh,q.pick=Sh,q.pluck=ae,q.property=Hf,q.propertyOf=If,q.pull=Bd,q.pullAt=Wg,q.range=Jf,q.rearg=Ch,q.reject=be,q.remove=Cd,q.rest=Dd,q.restParam=qe,q.set=cf,q.shuffle=de,q.slice=Ed,q.sortBy=ge,q.sortByAll=oh,q.sortByOrder=he,q.spread=re,q.take=Fd,q.takeRight=Gd,q.takeRightWhile=Hd,q.takeWhile=Id,q.tap=Pd,q.throttle=se,q.thru=Qd,q.times=Kf,q.toArray=Ue,q.toPlainObject=Ve,q.transform=df,q.union=Zg,q.uniq=Jd,q.unzip=Kd,q.unzipWith=Ld,q.values=ef,q.valuesIn=ff,q.where=ie,q.without=$g,q.wrap=te,q.xor=Md,q.zip=_g,q.zipObject=Nd,q.zipWith=ah,q.backflow=yh,q.collect=_d,q.compose=yh,q.each=gh,q.eachRight=hh,q.extend=Fh,q.iteratee=zf,q.methods=Xe,q.object=Nd,q.select=Yd,q.tail=Dd,q.unique=Jd,Ef(q,q),q.add=Mf,q.attempt=Zh,q.camelCase=Th,q.capitalize=jf,q.ceil=ai,q.clone=ue,q.cloneDeep=ve,q.deburr=kf,q.endsWith=lf,q.escape=mf,q.escapeRegExp=nf,q.every=Xd,q.find=eh,q.findIndex=Tg,q.findKey=Ih,q.findLast=fh,q.findLastIndex=Ug,q.findLastKey=Jh,q.findWhere=Zd,q.first=ud,q.floor=bi,q.get=Ye,q.gt=we,q.gte=xe,q.has=Ze,q.identity=Bf,q.includes=$d,q.indexOf=xd,q.inRange=gf,q.isArguments=ye,q.isArray=Dh,q.isBoolean=ze,q.isDate=Ae,q.isElement=Be,q.isEmpty=Ce,q.isEqual=De,q.isError=Ee,q.isFinite=Fe,q.isFunction=Ge,q.isMatch=Ie,q.isNaN=Je,q.isNative=Ke,q.isNull=Le,q.isNumber=Me,q.isObject=He,q.isPlainObject=Ne,q.isRegExp=Oe,q.isString=Pe,q.isTypedArray=Qe,q.isUndefined=Re,q.kebabCase=Uh,q.last=zd,q.lastIndexOf=Ad,q.lt=Se,q.lte=Te,q.max=ci,q.min=di,q.noConflict=Ff,q.noop=Gf,q.now=ph,q.pad=of,q.padLeft=Vh,q.padRight=Wh,q.parseInt=pf,q.random=hf,q.reduce=mh,q.reduceRight=nh,q.repeat=qf,q.result=bf,q.round=ei,q.runInContext=w,q.size=ee,q.snakeCase=Xh,q.some=fe,q.sortedIndex=Xg,q.sortedLastIndex=Yg,q.startCase=Yh,q.startsWith=rf,q.sum=Nf,q.template=sf,q.trim=tf,q.trimLeft=uf,q.trimRight=vf,q.trunc=wf,q.unescape=xf,q.uniqueId=Lf,q.words=yf,q.all=Xd,q.any=fe,q.contains=$d,q.eq=De,q.detect=eh,q.foldl=mh,q.foldr=nh,q.head=ud,q.include=$d,q.inject=mh,Ef(q,function(){var a={};return Fb(q,function(b,c){q.prototype[c]||(a[c]=b)}),a}(),!1),q.sample=ce,q.prototype.sample=function(a){return this.__chain__||null!=a?this.thru(function(b){return ce(b,a)}):ce(this.value())},q.VERSION=y,db(["bind","bindKey","curry","curryRight","partial","partialRight"],function(a){q[a].placeholder=q}),db(["drop","take"],function(a,b){ba.prototype[a]=function(c){var d=this.__filtered__;if(d&&!b)return new ba(this);c=null==c?1:vg(rg(c)||0,0);var e=this.clone();return d?e.__takeCount__=wg(e.__takeCount__,c):e.__views__.push({size:c,type:a+(e.__dir__<0?"Right":"")}),e},ba.prototype[a+"Right"]=function(b){return this.reverse()[a](b).reverse()}}),db(["filter","map","takeWhile"],function(a,b){var c=b+1,d=c!=O;ba.prototype[a]=function(a,b){var e=this.clone();return e.__iteratees__.push({iteratee:Oc(a,b,1),type:c}),e.__filtered__=e.__filtered__||d,e}}),db(["first","last"],function(a,b){var c="take"+(b?"Right":"");ba.prototype[a]=function(){return this[c](1).value()[0]}}),db(["initial","rest"],function(a,b){var c="drop"+(b?"":"Right");ba.prototype[a]=function(){return this.__filtered__?new ba(this):this[c](1)}}),db(["pluck","where"],function(a,b){var c=b?"filter":"map",d=b?Nb:Hf;ba.prototype[a]=function(a){return this[c](d(a))}}),ba.prototype.compact=function(){return this.filter(Bf)},ba.prototype.reject=function(a,b){return a=Oc(a,b,1),this.filter(function(b){return!a(b)})},ba.prototype.slice=function(a,b){a=null==a?0:+a||0;var c=this;return c.__filtered__&&(a>0||0>b)?new ba(c):(0>a?c=c.takeRight(-a):a&&(c=c.drop(a)),b!==x&&(b=+b||0,c=0>b?c.dropRight(-b):c.take(b-a)),c)},ba.prototype.takeRightWhile=function(a,b){return this.reverse().takeWhile(a,b).reverse()},ba.prototype.toArray=function(){return this.take(Bg)},Fb(ba.prototype,function(a,b){var c=/^(?:filter|map|reject)|While$/.test(b),d=/^(?:first|last)$/.test(b),e=q[d?"take"+("last"==b?"Right":""):b];e&&(q.prototype[b]=function(){var b=d?[1]:arguments,f=this.__chain__,g=this.__wrapped__,h=!!this.__actions__.length,i=g instanceof ba,j=b[0],k=i||Dh(g);k&&c&&"function"==typeof j&&1!=j.length&&(i=k=!1);var l=function(a){return d&&f?e(a,1)[0]:e.apply(x,jb([a],b))},m={func:Qd,args:[l],thisArg:x},n=i&&!h;if(d&&!f)return n?(g=g.clone(),g.__actions__.push(m),a.call(g)):e.call(x,this.value())[0];if(!d&&k){g=n?g:new ba(this);var o=a.apply(g,b);return o.__actions__.push(m),new _(o,f)}return this.thru(l)})}),db(["join","pop","push","replace","shift","sort","splice","split","unshift"],function(a){var b=(/^(?:replace|split)$/.test(a)?$f:Yf)[a],c=/^(?:push|sort|unshift)$/.test(a)?"tap":"thru",d=/^(?:join|pop|replace|shift)$/.test(a);q.prototype[a]=function(){var a=arguments;return d&&!this.__chain__?b.apply(this.value(),a):this[c](function(c){return b.apply(c,a)})}}),Fb(ba.prototype,function(a,b){var c=q[b];if(c){var d=c.name+"",e=Hg[d]||(Hg[d]=[]);e.push({name:b,func:c})}}),Hg[Fc(x,A).name]=[{name:"wrapper",func:x}],ba.prototype.clone=Qa,ba.prototype.reverse=Ra,ba.prototype.value=Sa,q.prototype.chain=Rd,q.prototype.commit=Sd,q.prototype.concat=bh,q.prototype.plant=Td,q.prototype.reverse=Ud,q.prototype.toString=Vd,q.prototype.run=q.prototype.toJSON=q.prototype.valueOf=q.prototype.value=Wd,q.prototype.collect=q.prototype.map,q.prototype.head=q.prototype.first,q.prototype.select=q.prototype.filter,q.prototype.tail=q.prototype.rest,q}var x,y="3.10.1",z=1,A=2,B=4,C=8,D=16,E=32,F=64,G=128,H=256,I=30,J="...",K=150,L=16,M=200,N=1,O=2,P="Expected a function",Q="__lodash_placeholder__",R="[object Arguments]",S="[object Array]",T="[object Boolean]",U="[object Date]",V="[object Error]",W="[object Function]",X="[object Map]",Y="[object Number]",Z="[object Object]",$="[object RegExp]",_="[object Set]",aa="[object String]",ba="[object WeakMap]",ca="[object ArrayBuffer]",da="[object Float32Array]",ea="[object Float64Array]",fa="[object Int8Array]",ga="[object Int16Array]",ha="[object Int32Array]",ia="[object Uint8Array]",ja="[object Uint8ClampedArray]",ka="[object Uint16Array]",la="[object Uint32Array]",ma=/\b__p \+= '';/g,na=/\b(__p \+=) '' \+/g,oa=/(__e\(.*?\)|\b__t\)) \+\n'';/g,pa=/&(?:amp|lt|gt|quot|#39|#96);/g,qa=/[&<>"'`]/g,ra=RegExp(pa.source),sa=RegExp(qa.source),ta=/<%-([\s\S]+?)%>/g,ua=/<%([\s\S]+?)%>/g,va=/<%=([\s\S]+?)%>/g,wa=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\n\\]|\\.)*?\1)\]/,xa=/^\w*$/,ya=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\n\\]|\\.)*?)\2)\]/g,za=/^[:!,]|[\\^$.*+?()[\]{}|\/]|(^[0-9a-fA-Fnrtuvx])|([\n\r\u2028\u2029])/g,Aa=RegExp(za.source),Ba=/[\u0300-\u036f\ufe20-\ufe23]/g,Ca=/\\(\\)?/g,Da=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Ea=/\w*$/,Fa=/^0[xX]/,Ga=/^\[object .+?Constructor\]$/,Ha=/^\d+$/,Ia=/[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g,Ja=/($^)/,Ka=/['\n\r\u2028\u2029\\]/g,La=function(){var a="[A-Z\\xc0-\\xd6\\xd8-\\xde]",b="[a-z\\xdf-\\xf6\\xf8-\\xff]+";return RegExp(a+"+(?="+a+b+")|"+a+"?"+b+"|"+a+"+|[0-9]+","g")}(),Ma=["Array","ArrayBuffer","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Math","Number","Object","RegExp","Set","String","_","clearTimeout","isFinite","parseFloat","parseInt","setTimeout","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap"],Na=-1,Oa={};Oa[da]=Oa[ea]=Oa[fa]=Oa[ga]=Oa[ha]=Oa[ia]=Oa[ja]=Oa[ka]=Oa[la]=!0,Oa[R]=Oa[S]=Oa[ca]=Oa[T]=Oa[U]=Oa[V]=Oa[W]=Oa[X]=Oa[Y]=Oa[Z]=Oa[$]=Oa[_]=Oa[aa]=Oa[ba]=!1;var Pa={};Pa[R]=Pa[S]=Pa[ca]=Pa[T]=Pa[U]=Pa[da]=Pa[ea]=Pa[fa]=Pa[ga]=Pa[ha]=Pa[Y]=Pa[Z]=Pa[$]=Pa[aa]=Pa[ia]=Pa[ja]=Pa[ka]=Pa[la]=!0,Pa[V]=Pa[W]=Pa[X]=Pa[_]=Pa[ba]=!1;var Qa={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss"},Ra={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},Sa={"&":"&","<":"<",">":">",""":'"',"'":"'","`":"`"},Ta={"function":!0,object:!0},Ua={0:"x30",1:"x31",2:"x32",3:"x33",4:"x34",5:"x35",6:"x36",7:"x37",8:"x38",9:"x39",A:"x41",B:"x42",C:"x43",D:"x44",E:"x45",F:"x46",a:"x61",b:"x62",c:"x63",d:"x64",e:"x65",f:"x66",n:"x6e",r:"x72",t:"x74",u:"x75",v:"x76",x:"x78"},Va={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Wa=Ta[typeof exports]&&exports&&!exports.nodeType&&exports,Xa=Ta[typeof module]&&module&&!module.nodeType&&module,Ya=Wa&&Xa&&"object"==typeof global&&global&&global.Object&&global,Za=Ta[typeof self]&&self&&self.Object&&self,$a=Ta[typeof window]&&window&&window.Object&&window,_a=Xa&&Xa.exports===Wa&&Wa,ab=Ya||$a!==(this&&this.window)&&$a||Za||this,bb=w();"function"==typeof define&&"object"==typeof define.amd&&define.amd?define(function(){return bb}):Wa&&Xa&&(_a?(Xa.exports=bb)._=bb:Wa._=bb),a.constant("lodash",bb)}]);
\ No newline at end of file
diff --git a/applications/auto-scale/gui/src/vendor/ng-lodash/package.json b/applications/auto-scale/gui/src/vendor/ng-lodash/package.json
deleted file mode 100644
index 3de6f34..0000000
--- a/applications/auto-scale/gui/src/vendor/ng-lodash/package.json
+++ /dev/null
@@ -1,46 +0,0 @@
-{
- "name": "ng-lodash",
- "version": "0.3.0",
- "description": "An Angular module wrapper for lodash",
- "main": "build/ng-lodash.js",
- "scripts": {
- "test": "grunt dist"
- },
- "repository": {
- "type": "git",
- "url": "git://github.com/rockabox/ng-lodash.git"
- },
- "keywords": [
- "nglodash",
- "angular",
- "lodash"
- ],
- "author": [
- "Rockabox <tech@rockabox.com> (http://rockabox.com)"
- ],
- "license": "MIT",
- "bugs": {
- "url": "https://github.com/rockabox/ng-lodash/issues"
- },
- "homepage": "https://github.com/rockabox/ng-lodash",
- "devDependencies": {
- "grunt": "~0.4.5",
- "grunt-bower-task": "~0.4.0",
- "grunt-cli": "~0.1.13",
- "grunt-contrib-jshint": "~0.11.0",
- "grunt-contrib-uglify": "~0.7.0",
- "grunt-jscs": "~1.5.0",
- "grunt-karma": "~0.10.1",
- "grunt-lodash": "~0.5.0",
- "lodash-cli": "~3.10.1",
- "grunt-ngmin": "~0.0.3",
- "jasmine-core": "~2.2.0",
- "karma": "~0.12.16",
- "karma-jasmine": "~0.3.1",
- "karma-phantomjs-launcher": "~0.1.4",
- "load-grunt-tasks": "~3.1.0"
- },
- "engines": {
- "node": "~0.10.0"
- }
-}
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/.bower.json b/applications/auto-scale/gui/src/vendor/ui.bootstrap/.bower.json
deleted file mode 100644
index c26a5c2..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/.bower.json
+++ /dev/null
@@ -1,14 +0,0 @@
-{
- "name": "ui.bootstrap",
- "homepage": "https://github.com/angular-ui/bootstrap",
- "version": "0.14.3",
- "_release": "0.14.3",
- "_resolution": {
- "type": "version",
- "tag": "0.14.3",
- "commit": "e9d6ec2a29998986cf7534f2d5ca6c5371639872"
- },
- "_source": "git://github.com/angular-ui/bootstrap.git",
- "_target": "~0.14.3",
- "_originalSource": "ui.bootstrap"
-}
\ No newline at end of file
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/.gitattributes b/applications/auto-scale/gui/src/vendor/ui.bootstrap/.gitattributes
deleted file mode 100644
index 352204d..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/.gitattributes
+++ /dev/null
@@ -1,6 +0,0 @@
-*.html eol=lf
-*.css eol=lf
-*.js eol=lf
-*.md eol=lf
-*.json eol=lf
-*.yml eol=lf
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/.gitignore b/applications/auto-scale/gui/src/vendor/ui.bootstrap/.gitignore
deleted file mode 100644
index d106a75..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/.gitignore
+++ /dev/null
@@ -1,23 +0,0 @@
-lib-cov
-*.seed
-*.log
-*.csv
-*.dat
-*.out
-*.pid
-*.gz
-*.swp
-*.swo
-.DS_Store
-
-pids
-logs
-results
-dist
-# test coverage files
-coverage/
-
-node_modules
-npm-debug.log
-
-template/**/*.js
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/.jshintrc b/applications/auto-scale/gui/src/vendor/ui.bootstrap/.jshintrc
deleted file mode 100644
index b36c317..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/.jshintrc
+++ /dev/null
@@ -1,30 +0,0 @@
-{
- "curly": true,
- "immed": true,
- "newcap": true,
- "noarg": true,
- "sub": true,
- "boss": true,
- "eqnull": true,
- "quotmark": "single",
- "trailing": true,
- "undef": true,
- "browser": true,
- "jquery": true,
- "globals": {
- "angular": false,
-
- // For Jasmine
- "after" : false,
- "afterEach" : false,
- "before" : false,
- "beforeEach" : false,
- "describe" : false,
- "expect" : false,
- "jasmine" : false,
- "module" : false,
- "spyOn" : false,
- "inject" : false,
- "it" : false
- }
-}
\ No newline at end of file
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/.npmignore b/applications/auto-scale/gui/src/vendor/ui.bootstrap/.npmignore
deleted file mode 100644
index c447a4e..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/.npmignore
+++ /dev/null
@@ -1,39 +0,0 @@
-lib-cov
-*.seed
-*.log
-*.csv
-*.dat
-*.out
-*.pid
-*.gz
-*.swp
-*.swo
-.DS_Store
-
-pids
-logs
-results
-# test coverage files
-coverage/
-
-node_modules
-npm-debug.log
-
-template/**/*.js
-
-.git
-docs
-misc
-src
-template
-.editorconfig
-.gitattributes
-.gitignore
-.jshintrc
-.travis.yml
-CONTRIBUTING.md
-Gruntfile.js
-karma.conf.js
-ROADMAP.md
-
-dist/assets
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/.travis.yml b/applications/auto-scale/gui/src/vendor/ui.bootstrap/.travis.yml
deleted file mode 100644
index 8be8967..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/.travis.yml
+++ /dev/null
@@ -1,11 +0,0 @@
-language: node_js
-node_js:
- - "0.12"
-
-before_install:
- - export DISPLAY=:99.0
- - sh -e /etc/init.d/xvfb start
- - npm install --quiet -g grunt-cli karma
-
-script: grunt
-sudo: false
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/CHANGELOG.md b/applications/auto-scale/gui/src/vendor/ui.bootstrap/CHANGELOG.md
deleted file mode 100644
index 944768f..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/CHANGELOG.md
+++ /dev/null
@@ -1,1344 +0,0 @@
-<a name="0.14.3"></a>
-## [0.14.3](https://github.com/angular-ui/bootstrap/compare/0.14.2...v0.14.3) (2015-10-23)
-
-
-### Bug Fixes
-
-* **alert:** allow interpolations with dismiss-on-timeout ([de24f46](https://github.com/angular-ui/bootstrap/commit/de24f46)), closes [#4665](https://github.com/angular-ui/bootstrap/issues/4665) [#4666](https://github.com/angular-ui/bootstrap/issues/4666)
-* **buttons:** double toggle on spacebar ([e8808d3](https://github.com/angular-ui/bootstrap/commit/e8808d3)), closes [#4474](https://github.com/angular-ui/bootstrap/issues/4474) [#4630](https://github.com/angular-ui/bootstrap/issues/4630)
-* **collapse:** fix collapse animation timing ([6d1cd0f](https://github.com/angular-ui/bootstrap/commit/6d1cd0f)), closes [#4493](https://github.com/angular-ui/bootstrap/issues/4493)
-* **collapse:** trigger digest after ([3144633](https://github.com/angular-ui/bootstrap/commit/3144633)), closes [#4647](https://github.com/angular-ui/bootstrap/issues/4647) [#4628](https://github.com/angular-ui/bootstrap/issues/4628) [#4561](https://github.com/angular-ui/bootstrap/issues/4561) [#4651](https://github.com/angular-ui/bootstrap/issues/4651)
-* **datepicker:** datepicker-popup nest in dropdown ([134086a](https://github.com/angular-ui/bootstrap/commit/134086a)), closes [#4197](https://github.com/angular-ui/bootstrap/issues/4197) [#4693](https://github.com/angular-ui/bootstrap/issues/4693)
-* **datepicker:** fix support for literal format on popup ([7c3c631](https://github.com/angular-ui/bootstrap/commit/7c3c631)), closes [#4635](https://github.com/angular-ui/bootstrap/issues/4635) [#4616](https://github.com/angular-ui/bootstrap/issues/4616)
-* **tooltip:** delay timeouts ([02425b8](https://github.com/angular-ui/bootstrap/commit/02425b8)), closes [#4621](https://github.com/angular-ui/bootstrap/issues/4621) [#4618](https://github.com/angular-ui/bootstrap/issues/4618)
-* **tooltip:** null scope check in isOpen watch ([1f94104](https://github.com/angular-ui/bootstrap/commit/1f94104)), closes [#4697](https://github.com/angular-ui/bootstrap/issues/4697) [#4683](https://github.com/angular-ui/bootstrap/issues/4683)
-* **tooltip:** scrollbar flashing ([6c82b2b](https://github.com/angular-ui/bootstrap/commit/6c82b2b)), closes [#4550](https://github.com/angular-ui/bootstrap/issues/4550) [#4623](https://github.com/angular-ui/bootstrap/issues/4623) [#4458](https://github.com/angular-ui/bootstrap/issues/4458)
-* **typeahead:** dangling event listeners ([94fb282](https://github.com/angular-ui/bootstrap/commit/94fb282)), closes [#4632](https://github.com/angular-ui/bootstrap/issues/4632) [#4636](https://github.com/angular-ui/bootstrap/issues/4636)
-
-### Features
-
-* **datepicker:** add templateUrl support for pickers ([1f65d87](https://github.com/angular-ui/bootstrap/commit/1f65d87)), closes [#4432](https://github.com/angular-ui/bootstrap/issues/4432)
-* **datepicker:** preserve timezone with model ([0d64aad](https://github.com/angular-ui/bootstrap/commit/0d64aad)), closes [#4676](https://github.com/angular-ui/bootstrap/issues/4676)
-* **modal:** support $uibModalInstance ([97fd37e](https://github.com/angular-ui/bootstrap/commit/97fd37e)), closes [#4638](https://github.com/angular-ui/bootstrap/issues/4638) [#4661](https://github.com/angular-ui/bootstrap/issues/4661)
-
-
-
-<a name="0.14.2"></a>
-## [0.14.2](https://github.com/angular-ui/bootstrap/compare/0.14.1...v0.14.2) (2015-10-14)
-
-
-### Bug Fixes
-
-* **progressbar:** fix percentage calculation ([feb689c](https://github.com/angular-ui/bootstrap/commit/feb689c)), closes [#4471](https://github.com/angular-ui/bootstrap/issues/4471) [#4588](https://github.com/angular-ui/bootstrap/issues/4588) [#4452](https://github.com/angular-ui/bootstrap/issues/4452)
-* **tooltip:** clean up stackedMap on scope destroy ([ebb5e18](https://github.com/angular-ui/bootstrap/commit/ebb5e18)), closes [#4610](https://github.com/angular-ui/bootstrap/issues/4610) [#4604](https://github.com/angular-ui/bootstrap/issues/4604)
-* **tooltip:** popup close delay not respected ([6daf871](https://github.com/angular-ui/bootstrap/commit/6daf871)), closes [#4597](https://github.com/angular-ui/bootstrap/issues/4597) [#4567](https://github.com/angular-ui/bootstrap/issues/4567)
-
-
-
-<a name="0.14.1"></a>
-## [0.14.1](https://github.com/angular-ui/bootstrap/compare/0.14.0...v0.14.1) (2015-10-11)
-
-
-### Bug Fixes
-
-* **accordion:** make deprecated controller work with 1.3.x ([c5e6042](https://github.com/angular-ui/bootstrap/commit/c5e6042)), closes [#4574](https://github.com/angular-ui/bootstrap/issues/4574)
-* **alert:** make deprecated controller work with 1.3.x ([e8c8ee6](https://github.com/angular-ui/bootstrap/commit/e8c8ee6)), closes [#4576](https://github.com/angular-ui/bootstrap/issues/4576)
-* **buttons:** make deprecated controller work with 1.3.x ([1e3cbd8](https://github.com/angular-ui/bootstrap/commit/1e3cbd8)), closes [#4577](https://github.com/angular-ui/bootstrap/issues/4577)
-* **carousel:** make deprecated controller work with 1.3.x ([f6c7931](https://github.com/angular-ui/bootstrap/commit/f6c7931)), closes [#4578](https://github.com/angular-ui/bootstrap/issues/4578)
-* **datepicker:** make deprecated controller work with 1.3.x ([18371ab](https://github.com/angular-ui/bootstrap/commit/18371ab)), closes [#4586](https://github.com/angular-ui/bootstrap/issues/4586)
-* **dropdown:** make deprecated controller work with 1.3.x ([ae1a87c](https://github.com/angular-ui/bootstrap/commit/ae1a87c)), closes [#4585](https://github.com/angular-ui/bootstrap/issues/4585)
-* **pagination:** make deprecated controller work with 1.3.x ([d50e8d2](https://github.com/angular-ui/bootstrap/commit/d50e8d2)), closes [#4580](https://github.com/angular-ui/bootstrap/issues/4580)
-* **progressbar:** make deprecated controller work with 1.3.x ([1c5e479](https://github.com/angular-ui/bootstrap/commit/1c5e479)), closes [#4581](https://github.com/angular-ui/bootstrap/issues/4581)
-* **rating:** make deprecated controller work with 1.3.x ([ce1114a](https://github.com/angular-ui/bootstrap/commit/ce1114a)), closes [#4582](https://github.com/angular-ui/bootstrap/issues/4582)
-* **tabs:** make deprecated controller work with 1.3.x ([685bd6a](https://github.com/angular-ui/bootstrap/commit/685bd6a)), closes [#4583](https://github.com/angular-ui/bootstrap/issues/4583)
-* **timepicker:** make deprecated controller work with 1.3.x ([00f60ee](https://github.com/angular-ui/bootstrap/commit/00f60ee)), closes [#4584](https://github.com/angular-ui/bootstrap/issues/4584)
-
-### Features
-
-* **timepicker:** add accessibility improvements ([4ebecbc](https://github.com/angular-ui/bootstrap/commit/4ebecbc)), closes [#4569](https://github.com/angular-ui/bootstrap/issues/4569) [#4573](https://github.com/angular-ui/bootstrap/issues/4573)
-
-
-
-<a name="0.14.0"></a>
-# [0.14.0](https://github.com/angular-ui/bootstrap/compare/0.13.4...0.14.0) (2015-10-09)
-
-
-### Bug Fixes
-
-* **accordion:** coerce to boolean ([b864aa9](https://github.com/angular-ui/bootstrap/commit/b864aa9)), closes [#4385](https://github.com/angular-ui/bootstrap/issues/4385)
-* **accordion:** re-expose AccordionController ([5382226](https://github.com/angular-ui/bootstrap/commit/5382226)), closes [#4524](https://github.com/angular-ui/bootstrap/issues/4524)
-* **alert:** properly pass $event as local ([eb2366f](https://github.com/angular-ui/bootstrap/commit/eb2366f)), closes [#4386](https://github.com/angular-ui/bootstrap/issues/4386) [#4387](https://github.com/angular-ui/bootstrap/issues/4387)
-* **alert:** re-expose AlertController ([f561aa9](https://github.com/angular-ui/bootstrap/commit/f561aa9)), closes [#4525](https://github.com/angular-ui/bootstrap/issues/4525)
-* **buttons:** re-expose ButtonsController ([c0dbf79](https://github.com/angular-ui/bootstrap/commit/c0dbf79)), closes [#4526](https://github.com/angular-ui/bootstrap/issues/4526)
-* **carousel:** fix reading of `noTransition` ([2e26815](https://github.com/angular-ui/bootstrap/commit/2e26815)), closes [#4325](https://github.com/angular-ui/bootstrap/issues/4325)
-* **carousel:** improve accessibility ([da71159](https://github.com/angular-ui/bootstrap/commit/da71159)), closes [#4478](https://github.com/angular-ui/bootstrap/issues/4478) [#4479](https://github.com/angular-ui/bootstrap/issues/4479)
-* **carousel:** re-enable deprecated directives ([30e8aa7](https://github.com/angular-ui/bootstrap/commit/30e8aa7)), closes [#4527](https://github.com/angular-ui/bootstrap/issues/4527)
-* **carousel:** reset $currentTransition when no slides ([0b3d5bd](https://github.com/angular-ui/bootstrap/commit/0b3d5bd)), closes [#4532](https://github.com/angular-ui/bootstrap/issues/4532) [#4390](https://github.com/angular-ui/bootstrap/issues/4390)
-* **datepicker:** add check for `contains` ([868c0e2](https://github.com/angular-ui/bootstrap/commit/868c0e2)), closes [#4423](https://github.com/angular-ui/bootstrap/issues/4423) [#4411](https://github.com/angular-ui/bootstrap/issues/4411)
-* **datepicker:** add custom class to year picker ([0ad7cb9](https://github.com/angular-ui/bootstrap/commit/0ad7cb9)), closes [#4558](https://github.com/angular-ui/bootstrap/issues/4558) [#4546](https://github.com/angular-ui/bootstrap/issues/4546)
-* **datepicker:** change to `$popup` ([65814f1](https://github.com/angular-ui/bootstrap/commit/65814f1))
-* **datepicker:** datepicker-popup nest in dropdown ([6b4267b](https://github.com/angular-ui/bootstrap/commit/6b4267b)), closes [#4489](https://github.com/angular-ui/bootstrap/issues/4489) [#4197](https://github.com/angular-ui/bootstrap/issues/4197)
-* **datepicker:** remove focus management on date selection by keyboard ([36ecf60](https://github.com/angular-ui/bootstrap/commit/36ecf60)), closes [#4409](https://github.com/angular-ui/bootstrap/issues/4409)
-* **dropdown:** ensure class is present in dropdown-menu ([92ab48e](https://github.com/angular-ui/bootstrap/commit/92ab48e)), closes [#4523](https://github.com/angular-ui/bootstrap/issues/4523) [#4442](https://github.com/angular-ui/bootstrap/issues/4442)
-* **dropdown:** restore deprecated directives ([e7c5879](https://github.com/angular-ui/bootstrap/commit/e7c5879)), closes [#4514](https://github.com/angular-ui/bootstrap/issues/4514)
-* **modal:** fix for conflicts with ngTouch module on mobile devices ([508aceb](https://github.com/angular-ui/bootstrap/commit/508aceb)), closes [#2280](https://github.com/angular-ui/bootstrap/issues/2280) [#4357](https://github.com/angular-ui/bootstrap/issues/4357)
-* **progressbar:** re-expose ProgressController ([5604e59](https://github.com/angular-ui/bootstrap/commit/5604e59)), closes [#4528](https://github.com/angular-ui/bootstrap/issues/4528)
-* **rating:** re-expose RatingController ([aede646](https://github.com/angular-ui/bootstrap/commit/aede646)), closes [#4529](https://github.com/angular-ui/bootstrap/issues/4529)
-* **tabs:** re-expose TabsetController ([435924f](https://github.com/angular-ui/bootstrap/commit/435924f)), closes [#4530](https://github.com/angular-ui/bootstrap/issues/4530)
-* **timepicker:** re-expose TimepickerController ([3aa9841](https://github.com/angular-ui/bootstrap/commit/3aa9841)), closes [#4531](https://github.com/angular-ui/bootstrap/issues/4531)
-* **tooltip:** add display block to style ([b413a22](https://github.com/angular-ui/bootstrap/commit/b413a22)), closes [#4363](https://github.com/angular-ui/bootstrap/issues/4363) [#4379](https://github.com/angular-ui/bootstrap/issues/4379)
-* **tooltip:** check for ttScope in $$postDigest ([01b9624](https://github.com/angular-ui/bootstrap/commit/01b9624)), closes [#4555](https://github.com/angular-ui/bootstrap/issues/4555) [#4552](https://github.com/angular-ui/bootstrap/issues/4552)
-* **tooltip:** correct flash of reposition ([8fee75d](https://github.com/angular-ui/bootstrap/commit/8fee75d)), closes [#4363](https://github.com/angular-ui/bootstrap/issues/4363) [#4195](https://github.com/angular-ui/bootstrap/issues/4195)
-* **tooltip:** do nothing if `$scope` doesn't exist ([1e039e8](https://github.com/angular-ui/bootstrap/commit/1e039e8)), closes [#4346](https://github.com/angular-ui/bootstrap/issues/4346) [#3347](https://github.com/angular-ui/bootstrap/issues/3347)
-* **tooltip:** fix binding to multiple triggers ([d6cda93](https://github.com/angular-ui/bootstrap/commit/d6cda93)), closes [#4371](https://github.com/angular-ui/bootstrap/issues/4371) [#4384](https://github.com/angular-ui/bootstrap/issues/4384)
-* **tooltip:** isOpen to work with expressions ([5f68280](https://github.com/angular-ui/bootstrap/commit/5f68280)), closes [#4380](https://github.com/angular-ui/bootstrap/issues/4380) [#4362](https://github.com/angular-ui/bootstrap/issues/4362)
-* **tooltip:** properly gc popupTimeout ([ff52f52](https://github.com/angular-ui/bootstrap/commit/ff52f52)), closes [#2786](https://github.com/angular-ui/bootstrap/issues/2786)
-* **tooltip:** set `visibility: hidden` to avoid flicker ([f7cb8bc](https://github.com/angular-ui/bootstrap/commit/f7cb8bc)), closes [#4342](https://github.com/angular-ui/bootstrap/issues/4342)
-
-### Features
-
-* **accordion:** use uib- prefix ([0328a76](https://github.com/angular-ui/bootstrap/commit/0328a76)), closes [#4389](https://github.com/angular-ui/bootstrap/issues/4389)
-* **accordion:** use uib- prefix ([298ec8c](https://github.com/angular-ui/bootstrap/commit/298ec8c)), closes [#4503](https://github.com/angular-ui/bootstrap/issues/4503)
-* **alert:** use uib- prefix ([5e3a87a](https://github.com/angular-ui/bootstrap/commit/5e3a87a)), closes [#4406](https://github.com/angular-ui/bootstrap/issues/4406)
-* **buttons:** use uib- prefix ([5a1c2c9](https://github.com/angular-ui/bootstrap/commit/5a1c2c9)), closes [#4445](https://github.com/angular-ui/bootstrap/issues/4445)
-* **carousel:** use uib- prefix ([2e5bfac](https://github.com/angular-ui/bootstrap/commit/2e5bfac)), closes [#4501](https://github.com/angular-ui/bootstrap/issues/4501)
-* **collapse:** convert to use `$animateCss` ([533a9f0](https://github.com/angular-ui/bootstrap/commit/533a9f0)), closes [#4257](https://github.com/angular-ui/bootstrap/issues/4257)
-* **collapse:** use uib- prefix ([9bdb32e](https://github.com/angular-ui/bootstrap/commit/9bdb32e)), closes [#4370](https://github.com/angular-ui/bootstrap/issues/4370)
-* **dateparser:** reset parsers when $locale.id changes ([d9a521a](https://github.com/angular-ui/bootstrap/commit/d9a521a)), closes [#4286](https://github.com/angular-ui/bootstrap/issues/4286) [#4425](https://github.com/angular-ui/bootstrap/issues/4425)
-* **dateparser:** use uib- prefix ([0fa851f](https://github.com/angular-ui/bootstrap/commit/0fa851f)), closes [#4504](https://github.com/angular-ui/bootstrap/issues/4504)
-* **datepicker:** add uib- prefix ([44354f6](https://github.com/angular-ui/bootstrap/commit/44354f6)), closes [#4509](https://github.com/angular-ui/bootstrap/issues/4509)
-* **dropdown:** uib- prefix ([5bc0851](https://github.com/angular-ui/bootstrap/commit/5bc0851)), closes [#4510](https://github.com/angular-ui/bootstrap/issues/4510)
-* **modal:** Added ability to add CSS class to top window ([bd38e8f](https://github.com/angular-ui/bootstrap/commit/bd38e8f)), closes [#2524](https://github.com/angular-ui/bootstrap/issues/2524)
-* **modal:** add uib- prefix ([8c7b9e4](https://github.com/angular-ui/bootstrap/commit/8c7b9e4)), closes [#4511](https://github.com/angular-ui/bootstrap/issues/4511)
-* **pagination:** add uib- prefix ([9aea856](https://github.com/angular-ui/bootstrap/commit/9aea856)), closes [#4536](https://github.com/angular-ui/bootstrap/issues/4536)
-* **position:** add uib- prefix ([6158091](https://github.com/angular-ui/bootstrap/commit/6158091)), closes [#4507](https://github.com/angular-ui/bootstrap/issues/4507)
-* **progressbar:** add `aria-labelledby` support ([e6f3b87](https://github.com/angular-ui/bootstrap/commit/e6f3b87)), closes [#4350](https://github.com/angular-ui/bootstrap/issues/4350) [#4347](https://github.com/angular-ui/bootstrap/issues/4347)
-* **rating:** add `aria-valuetext` attribute ([72de2d8](https://github.com/angular-ui/bootstrap/commit/72de2d8)), closes [#4349](https://github.com/angular-ui/bootstrap/issues/4349) [#4347](https://github.com/angular-ui/bootstrap/issues/4347)
-* **rating:** user uib- prefix ([377b4b7](https://github.com/angular-ui/bootstrap/commit/377b4b7)), closes [#4502](https://github.com/angular-ui/bootstrap/issues/4502)
-* **tabs:** use uib- prefix ([d25a8c2](https://github.com/angular-ui/bootstrap/commit/d25a8c2)), closes [#4449](https://github.com/angular-ui/bootstrap/issues/4449)
-* **timepicker:** use uib- prefix ([504e653](https://github.com/angular-ui/bootstrap/commit/504e653)), closes [#4505](https://github.com/angular-ui/bootstrap/issues/4505)
-* **tooltip:** add uib- prefix ([f8bc038](https://github.com/angular-ui/bootstrap/commit/f8bc038)), closes [#4515](https://github.com/angular-ui/bootstrap/issues/4515)
-* **tooltip:** allow custom closing delay ([5f7051b](https://github.com/angular-ui/bootstrap/commit/5f7051b)), closes [#3576](https://github.com/angular-ui/bootstrap/issues/3576)
-* **tooltip:** hide tooltip when `esc` is hit ([c08509a](https://github.com/angular-ui/bootstrap/commit/c08509a)), closes [#4367](https://github.com/angular-ui/bootstrap/issues/4367) [#4248](https://github.com/angular-ui/bootstrap/issues/4248)
-* **typeahead:** add `appendElementToId` ([fdf53e6](https://github.com/angular-ui/bootstrap/commit/fdf53e6)), closes [#4231](https://github.com/angular-ui/bootstrap/issues/4231) [#4497](https://github.com/angular-ui/bootstrap/issues/4497)
-* **typeahead:** add customClass support for dropdown ([fa1cdfc](https://github.com/angular-ui/bootstrap/commit/fa1cdfc)), closes [#4332](https://github.com/angular-ui/bootstrap/issues/4332) [#4410](https://github.com/angular-ui/bootstrap/issues/4410)
-* **typeahead:** add uib- prefix ([9e5e1a2](https://github.com/angular-ui/bootstrap/commit/9e5e1a2)), closes [#4542](https://github.com/angular-ui/bootstrap/issues/4542)
-
-### Reverts
-
-* **dropdown:** undo adding of `open` class on body ([6f9f1fc](https://github.com/angular-ui/bootstrap/commit/6f9f1fc))
-
-
-### BREAKING CHANGES
-
-* Removes focus on datepicker on selection of a date via keyboard for accessibility reasons
-
-
-<a name="0.13.4"></a>
-## [0.13.4](https://github.com/angular-ui/bootstrap/compare/0.13.3...0.13.4) (2015-09-03)
-
-
-### Bug Fixes
-
-* **accordion:** add custom open class support ([575eb85](https://github.com/angular-ui/bootstrap/commit/575eb85)), closes [#4198](https://github.com/angular-ui/bootstrap/issues/4198)
-* **datepicker:** ensure the original target is not in popup ([9b2f7ac](https://github.com/angular-ui/bootstrap/commit/9b2f7ac)), closes [#4316](https://github.com/angular-ui/bootstrap/issues/4316) [#4314](https://github.com/angular-ui/bootstrap/issues/4314)
-* **dropdown:** fix display when using with append-to-body ([bf63cef](https://github.com/angular-ui/bootstrap/commit/bf63cef)), closes [#4305](https://github.com/angular-ui/bootstrap/issues/4305) [#4240](https://github.com/angular-ui/bootstrap/issues/4240)
-* **dropdown:** fix up arrow nav support ([defcbbb](https://github.com/angular-ui/bootstrap/commit/defcbbb)), closes [#4330](https://github.com/angular-ui/bootstrap/issues/4330) [#4327](https://github.com/angular-ui/bootstrap/issues/4327)
-* **modal:** Wait for animation before focus. ([937a1f3](https://github.com/angular-ui/bootstrap/commit/937a1f3)), closes [#4300](https://github.com/angular-ui/bootstrap/issues/4300) [#4274](https://github.com/angular-ui/bootstrap/issues/4274)
-* **modal:** correctly remove custom class ([ba2ce24](https://github.com/angular-ui/bootstrap/commit/ba2ce24)), closes [#4175](https://github.com/angular-ui/bootstrap/issues/4175) [#4171](https://github.com/angular-ui/bootstrap/issues/4171)
-* **modal:** fix allowing promises to be resolved ([b1e98b1](https://github.com/angular-ui/bootstrap/commit/b1e98b1)), closes [#4310](https://github.com/angular-ui/bootstrap/issues/4310) [#4309](https://github.com/angular-ui/bootstrap/issues/4309)
-* **progress:** rename to avoid conflict ([07a938d](https://github.com/angular-ui/bootstrap/commit/07a938d)), closes [#4255](https://github.com/angular-ui/bootstrap/issues/4255)
-* **tabs:** ensure tab selection only occurs once ([7d3ba1e](https://github.com/angular-ui/bootstrap/commit/7d3ba1e)), closes [#3060](https://github.com/angular-ui/bootstrap/issues/3060) [#4230](https://github.com/angular-ui/bootstrap/issues/4230) [#2883](https://github.com/angular-ui/bootstrap/issues/2883)
-* **timepicker:** leave view alone if either input is invalid ([818f7e5](https://github.com/angular-ui/bootstrap/commit/818f7e5)), closes [#4160](https://github.com/angular-ui/bootstrap/issues/4160) [#3825](https://github.com/angular-ui/bootstrap/issues/3825)
-* **tooltip:** correctly position tooltip ([457f10c](https://github.com/angular-ui/bootstrap/commit/457f10c)), closes [#4311](https://github.com/angular-ui/bootstrap/issues/4311) [#4195](https://github.com/angular-ui/bootstrap/issues/4195)
-* **tooltip:** fix jshint error ([17cc39f](https://github.com/angular-ui/bootstrap/commit/17cc39f))
-* **tooltip:** properly gc timeout on toggle of disabled ([f8eab55](https://github.com/angular-ui/bootstrap/commit/f8eab55)), closes [#4210](https://github.com/angular-ui/bootstrap/issues/4210) [#4204](https://github.com/angular-ui/bootstrap/issues/4204)
-* **tooltip:** switch to use raw DOM event bindings ([7556bed](https://github.com/angular-ui/bootstrap/commit/7556bed)), closes [#4322](https://github.com/angular-ui/bootstrap/issues/4322) [#4060](https://github.com/angular-ui/bootstrap/issues/4060)
-* **typeahead:** add support for ngModelOptions getterSetter ([ccaa627](https://github.com/angular-ui/bootstrap/commit/ccaa627)), closes [#3865](https://github.com/angular-ui/bootstrap/issues/3865) [#3823](https://github.com/angular-ui/bootstrap/issues/3823)
-* **typeahead:** release references on destruction ([695db9d](https://github.com/angular-ui/bootstrap/commit/695db9d)), closes [#4299](https://github.com/angular-ui/bootstrap/issues/4299) [#4298](https://github.com/angular-ui/bootstrap/issues/4298)
-* **typeahead:** use ng-bind-html ([bb9fa1a](https://github.com/angular-ui/bootstrap/commit/bb9fa1a)), closes [#3463](https://github.com/angular-ui/bootstrap/issues/3463) [#4073](https://github.com/angular-ui/bootstrap/issues/4073)
-
-### Features
-
-* **accordion:** allow custom panel class ([5ee23a4](https://github.com/angular-ui/bootstrap/commit/5ee23a4)), closes [#4242](https://github.com/angular-ui/bootstrap/issues/4242) [#3968](https://github.com/angular-ui/bootstrap/issues/3968)
-* **accordion:** support spacebar to toggle group ([aa5a991](https://github.com/angular-ui/bootstrap/commit/aa5a991)), closes [#4319](https://github.com/angular-ui/bootstrap/issues/4319) [#4249](https://github.com/angular-ui/bootstrap/issues/4249)
-* **buttons:** allow toggling via spacebar when focused ([bdfb289](https://github.com/angular-ui/bootstrap/commit/bdfb289)), closes [#4252](https://github.com/angular-ui/bootstrap/issues/4252) [#4259](https://github.com/angular-ui/bootstrap/issues/4259)
-* **buttons:** hide nested inputs ([a06afe6](https://github.com/angular-ui/bootstrap/commit/a06afe6)), closes [#4282](https://github.com/angular-ui/bootstrap/issues/4282)
-* **carousel:** add model binding support to slide ([dac087e](https://github.com/angular-ui/bootstrap/commit/dac087e)), closes [#4202](https://github.com/angular-ui/bootstrap/issues/4202) [#4201](https://github.com/angular-ui/bootstrap/issues/4201)
-* **dateparser:** add support for the `h` format ([550fe20](https://github.com/angular-ui/bootstrap/commit/550fe20)), closes [#4220](https://github.com/angular-ui/bootstrap/issues/4220)
-* **datepicker:** disable today button if invalid ([71e0b8a](https://github.com/angular-ui/bootstrap/commit/71e0b8a)), closes [#4199](https://github.com/angular-ui/bootstrap/issues/4199) [#3988](https://github.com/angular-ui/bootstrap/issues/3988)
-* **modal:** complete modal open resolution in order ([1bba8b4](https://github.com/angular-ui/bootstrap/commit/1bba8b4)), closes [#2443](https://github.com/angular-ui/bootstrap/issues/2443) [#4302](https://github.com/angular-ui/bootstrap/issues/4302) [#2404](https://github.com/angular-ui/bootstrap/issues/2404)
-* **modal:** support multiple open classes ([3d01c59](https://github.com/angular-ui/bootstrap/commit/3d01c59)), closes [#4226](https://github.com/angular-ui/bootstrap/issues/4226) [#4184](https://github.com/angular-ui/bootstrap/issues/4184)
-* **pagination:** add `ngDisabled` support for the pager ([ba734b4](https://github.com/angular-ui/bootstrap/commit/ba734b4)), closes [#4217](https://github.com/angular-ui/bootstrap/issues/4217) [#2856](https://github.com/angular-ui/bootstrap/issues/2856)
-* **pagination:** add `templateUrl` support ([64b5289](https://github.com/angular-ui/bootstrap/commit/64b5289)), closes [#4162](https://github.com/angular-ui/bootstrap/issues/4162)
-* **tabs:** add support for `x-tab-heading` ([1abfd05](https://github.com/angular-ui/bootstrap/commit/1abfd05)), closes [#4166](https://github.com/angular-ui/bootstrap/issues/4166) [#1893](https://github.com/angular-ui/bootstrap/issues/1893)
-* **timepicker:** add `templateUrl` and `controllerAs` support ([639d511](https://github.com/angular-ui/bootstrap/commit/639d511)), closes [#4275](https://github.com/angular-ui/bootstrap/issues/4275) [#4284](https://github.com/angular-ui/bootstrap/issues/4284)
-* **tooltip:** expose isOpen property ([99b87cc](https://github.com/angular-ui/bootstrap/commit/99b87cc)), closes [#4179](https://github.com/angular-ui/bootstrap/issues/4179) [#2148](https://github.com/angular-ui/bootstrap/issues/2148) [#590](https://github.com/angular-ui/bootstrap/issues/590)
-* **typeahead:** add `typeaheadFocusOnSelect` ([b5ecda3](https://github.com/angular-ui/bootstrap/commit/b5ecda3)), closes [#4212](https://github.com/angular-ui/bootstrap/issues/4212) [#4211](https://github.com/angular-ui/bootstrap/issues/4211) [#4206](https://github.com/angular-ui/bootstrap/issues/4206)
-* **typeahead:** add custom popup template support ([4b02648](https://github.com/angular-ui/bootstrap/commit/4b02648)), closes [#4320](https://github.com/angular-ui/bootstrap/issues/4320) [#3774](https://github.com/angular-ui/bootstrap/issues/3774)
-
-
-### Breaking Changes
-
-* **buttons**
- * hide nested `<input>` elements on `btn-radio` and `btn-checkbox` directives.
-
- Fixes #3264
- Closes #4282
-
- ([a06afe6](https://github.com/angular-ui/bootstrap/commit/a06afe6))
-
-* **dropdown**
- * when using `append-to-body`, both the `dropdown` and `open` classes are added to the `<body>` element.
- * this differs from the existing behavior in that it will no longer toggle based on the existing `dropdown` directive element, but on the `body` element instead.
-
- Fixes #4240
- Closes #4305
-
- ([bf63cef](https://github.com/angular-ui/bootstrap/commit/bf63cef))
-
-* **tooltip**
- * Switch to use `addEventListener` and `removeEventListener` to prevent jqLite/jQuery bug where the events are swallowed on disabled elements
- * this affects custom events, which must now be dispatched with `element[0].dispatchEvent(new Event('customEvent'))`, as opposed to `element.trigger('customEvent')`
-
- Fixes #4060
- Closes #4322
-
- ([7556bed](https://github.com/angular-ui/bootstrap/commit/7556beda486f26b40fb860448316e8a32457e9e9))
-
-* **typeahead**
- * for security reasons, only whitelisted HTML should be added.
- * the typeahead match template now uses `ng-bind-html` instead of `bind-html-unsafe`.
- * typeahead now uses the `$sce` service when `ngSanitize` is present and logs a warning if it is not.
-
- Fixes #2884
- Closes #3463
- Closes #4073
-
- ([bb9fa1a](https://github.com/angular-ui/bootstrap/commit/bb9fa1a))
-
-
-<a name"0.13.3"></a>
-### 0.13.3 (2015-08-09)
-
-
-#### Bug Fixes
-
-* **accordion:**
- * add `open` class when expanded ([ead15e37](https://github.com/angular-ui/bootstrap/commit/ead15e37), closes [#4152](https://github.com/angular-ui/bootstrap/issues/4152), [#3419](https://github.com/angular-ui/bootstrap/issues/3419))
- * revert to empty href ([b18dc8f9](https://github.com/angular-ui/bootstrap/commit/b18dc8f9), closes [#4104](https://github.com/angular-ui/bootstrap/issues/4104))
-* **buttons:**
- * change to use `attrs.disabled` ([c9b0d0b0](https://github.com/angular-ui/bootstrap/commit/c9b0d0b0), closes [#4088](https://github.com/angular-ui/bootstrap/issues/4088))
- * allow selection of undisabled button ([707fbf55](https://github.com/angular-ui/bootstrap/commit/707fbf55), closes [#4088](https://github.com/angular-ui/bootstrap/issues/4088))
-* **carousel:**
- * fix animation direction ([8359d73f](https://github.com/angular-ui/bootstrap/commit/8359d73f), closes [#4092](https://github.com/angular-ui/bootstrap/issues/4092), [#4087](https://github.com/angular-ui/bootstrap/issues/4087))
- * fix sorting of indicators ([8056368e](https://github.com/angular-ui/bootstrap/commit/8056368e), closes [#4071](https://github.com/angular-ui/bootstrap/issues/4071), [#3764](https://github.com/angular-ui/bootstrap/issues/3764))
-* **dateparser:** Support 12-hour format and AM/PM ([1ecd82ce](https://github.com/angular-ui/bootstrap/commit/1ecd82ce), closes [#4117](https://github.com/angular-ui/bootstrap/issues/4117))
-* **datepicker:**
- * commit safe apply on destruction ([74a8be4c](https://github.com/angular-ui/bootstrap/commit/74a8be4c), closes [#4079](https://github.com/angular-ui/bootstrap/issues/4079), [#4076](https://github.com/angular-ui/bootstrap/issues/4076))
- * change to `dateDisabled` ([5245ccad](https://github.com/angular-ui/bootstrap/commit/5245ccad), closes [#2773](https://github.com/angular-ui/bootstrap/issues/2773), [#4080](https://github.com/angular-ui/bootstrap/issues/4080))
-* **dropdown:** handle `keyboard-nav` correctly ([0b37f088](https://github.com/angular-ui/bootstrap/commit/0b37f088), closes [#4110](https://github.com/angular-ui/bootstrap/issues/4110), [#4091](https://github.com/angular-ui/bootstrap/issues/4091))
-* **modal:**
- * skipping ESC handling for form inputs ([a05b9c1a](https://github.com/angular-ui/bootstrap/commit/a05b9c1a), closes [#3551](https://github.com/angular-ui/bootstrap/issues/3551), [#2544](https://github.com/angular-ui/bootstrap/issues/2544))
- * add `$animateCss` support ([c7f19d58](https://github.com/angular-ui/bootstrap/commit/c7f19d58), closes [#4121](https://github.com/angular-ui/bootstrap/issues/4121), [#4119](https://github.com/angular-ui/bootstrap/issues/4119))
- * fix test ([e60c3ff6](https://github.com/angular-ui/bootstrap/commit/e60c3ff6))
- * dismiss modal on unschedule destruction ([3584061f](https://github.com/angular-ui/bootstrap/commit/3584061f), closes [#4097](https://github.com/angular-ui/bootstrap/issues/4097), [#3694](https://github.com/angular-ui/bootstrap/issues/3694))
-* **progressbar:** fix `min-width` for Bootstrap 3.2 ([8dc13be9](https://github.com/angular-ui/bootstrap/commit/8dc13be9), closes [#4081](https://github.com/angular-ui/bootstrap/issues/4081), [#2511](https://github.com/angular-ui/bootstrap/issues/2511))
-* **tooltip:**
- * add safety to `$apply` ([22b16f01](https://github.com/angular-ui/bootstrap/commit/22b16f01), closes [#3943](https://github.com/angular-ui/bootstrap/issues/3943), [#4150](https://github.com/angular-ui/bootstrap/issues/4150), [#516](https://github.com/angular-ui/bootstrap/issues/516))
- * tooltip w/ template position ([895a2281](https://github.com/angular-ui/bootstrap/commit/895a2281))
- * prevent opening when `tooltipPopupDelay` is present ([12c527af](https://github.com/angular-ui/bootstrap/commit/12c527af), closes [#4098](https://github.com/angular-ui/bootstrap/issues/4098), [#3611](https://github.com/angular-ui/bootstrap/issues/3611))
-* **typeahead:** return `null` if empty ([c7d3a660](https://github.com/angular-ui/bootstrap/commit/c7d3a660), closes [#4078](https://github.com/angular-ui/bootstrap/issues/4078), [#3176](https://github.com/angular-ui/bootstrap/issues/3176))
-
-
-#### Features
-
-* **accordion:**
- * add `controllerAs` support ([9865ee8e](https://github.com/angular-ui/bootstrap/commit/9865ee8e), closes [#4138](https://github.com/angular-ui/bootstrap/issues/4138))
- * add `templateUrl` support ([f777c320](https://github.com/angular-ui/bootstrap/commit/f777c320), closes [#4084](https://github.com/angular-ui/bootstrap/issues/4084))
-* **alert:** add `templateUrl` support ([88a885ca](https://github.com/angular-ui/bootstrap/commit/88a885ca), closes [#4139](https://github.com/angular-ui/bootstrap/issues/4139))
-* **buttons:** add `controllerAs` support ([02872dc1](https://github.com/angular-ui/bootstrap/commit/02872dc1), closes [#4140](https://github.com/angular-ui/bootstrap/issues/4140))
-* **carousel:**
- * add `templateUrl` support ([a29c8f20](https://github.com/angular-ui/bootstrap/commit/a29c8f20), closes [#4141](https://github.com/angular-ui/bootstrap/issues/4141))
- * expose carousel controller via `controllerAs` ([bfec07e4](https://github.com/angular-ui/bootstrap/commit/bfec07e4), closes [#4131](https://github.com/angular-ui/bootstrap/issues/4131))
-* **datepicker:**
- * allow custom templates ([e04b06d7](https://github.com/angular-ui/bootstrap/commit/e04b06d7), closes [#4157](https://github.com/angular-ui/bootstrap/issues/4157), [#1913](https://github.com/angular-ui/bootstrap/issues/1913))
- * add `onOpenFocus` support ([68afc4c6](https://github.com/angular-ui/bootstrap/commit/68afc4c6), closes [#2303](https://github.com/angular-ui/bootstrap/issues/2303), [#2546](https://github.com/angular-ui/bootstrap/issues/2546), [#4146](https://github.com/angular-ui/bootstrap/issues/4146))
- * add support for dynamic `min-mode` and `max-mode` ([f3d263e1](https://github.com/angular-ui/bootstrap/commit/f3d263e1), closes [#3843](https://github.com/angular-ui/bootstrap/issues/3843), [#2618](https://github.com/angular-ui/bootstrap/issues/2618))
- * allow suppression of log error ([bab1d375](https://github.com/angular-ui/bootstrap/commit/bab1d375), closes [#3836](https://github.com/angular-ui/bootstrap/issues/3836), [#4115](https://github.com/angular-ui/bootstrap/issues/4115))
-* **docs:**
- * add explanation of eye icon ([265d429b](https://github.com/angular-ui/bootstrap/commit/265d429b), closes [#4120](https://github.com/angular-ui/bootstrap/issues/4120))
- * add ngAnimate Plunker support ([a8a22cff](https://github.com/angular-ui/bootstrap/commit/a8a22cff), closes [#3648](https://github.com/angular-ui/bootstrap/issues/3648), [#4072](https://github.com/angular-ui/bootstrap/issues/4072))
-* **modal:**
- * add ability to change class on body ([5a28ff76](https://github.com/angular-ui/bootstrap/commit/5a28ff76), closes [#2633](https://github.com/angular-ui/bootstrap/issues/2633), [#4132](https://github.com/angular-ui/bootstrap/issues/4132))
- * allow users to resolve with strings ([89368856](https://github.com/angular-ui/bootstrap/commit/89368856), closes [#2676](https://github.com/angular-ui/bootstrap/issues/2676), [#4124](https://github.com/angular-ui/bootstrap/issues/4124))
-* **pagination:**
- * add classes to assist with styling ([b21c9abd](https://github.com/angular-ui/bootstrap/commit/b21c9abd), closes [#4130](https://github.com/angular-ui/bootstrap/issues/4130), [#4142](https://github.com/angular-ui/bootstrap/issues/4142))
- * add `templateUrl` support ([a0e1c91c](https://github.com/angular-ui/bootstrap/commit/a0e1c91c), closes [#4137](https://github.com/angular-ui/bootstrap/issues/4137))
-* **timepicker:**
- * add documentation for max/min ([87fc242d](https://github.com/angular-ui/bootstrap/commit/87fc242d))
- * Added min/max attributes for timepicker. ([6c0010be](https://github.com/angular-ui/bootstrap/commit/6c0010be), closes [#4019](https://github.com/angular-ui/bootstrap/issues/4019))
-* **tooltip:**
- * remove unnecessary `$digest` ([901a7c66](https://github.com/angular-ui/bootstrap/commit/901a7c66), closes [#4151](https://github.com/angular-ui/bootstrap/issues/4151))
- * add multiple trigger support ([ca9196fa](https://github.com/angular-ui/bootstrap/commit/ca9196fa), closes [#3987](https://github.com/angular-ui/bootstrap/issues/3987), [#4077](https://github.com/angular-ui/bootstrap/issues/4077))
-
-
-#### Breaking Changes
-
-* add `open` class to accordion group when expanded
-
-Closes #4152
-Closes #3419
-
- ([ead15e37](https://github.com/angular-ui/bootstrap/commit/ead15e37))
-* Allow the user to hit `esc` inside an element in a modal and not exit the modal if the event has been `defaultPrevented`
-
-Closes #3551
-Fixes #2544
-
- ([a05b9c1a](https://github.com/angular-ui/bootstrap/commit/a05b9c1a))
-* Change validation key to `dateDisabled` to align better with Angular's convention
-
-Closes #2773
-Closes #4080
-
- ([5245ccad](https://github.com/angular-ui/bootstrap/commit/5245ccad))
-
-
-<a name"0.13.2"></a>
-### 0.13.2 (2015-08-02)
-
-
-#### Bug Fixes
-
-* **accordion:** apply disabled style to accordion-header ([0643fd3e](https://github.com/angular-ui/bootstrap/commit/0643fd3e), closes [#3599](https://github.com/angular-ui/bootstrap/issues/3599), [#3233](https://github.com/angular-ui/bootstrap/issues/3233))
-* **buttons:** respect disabled attribute ([42e1af5c](https://github.com/angular-ui/bootstrap/commit/42e1af5c), closes [#4026](https://github.com/angular-ui/bootstrap/issues/4026), [#4013](https://github.com/angular-ui/bootstrap/issues/4013))
-* **carousel:**
- * fix animations with 1.4 ([f45b4a4c](https://github.com/angular-ui/bootstrap/commit/f45b4a4c), closes [#3946](https://github.com/angular-ui/bootstrap/issues/3946), [#4041](https://github.com/angular-ui/bootstrap/issues/4041), [#3811](https://github.com/angular-ui/bootstrap/issues/3811))
- * clear `currentSlide` when there are no slides ([0c78026b](https://github.com/angular-ui/bootstrap/commit/0c78026b), closes [#4021](https://github.com/angular-ui/bootstrap/issues/4021))
-* **dateparser:** add type and validity check ([4f1e03f1](https://github.com/angular-ui/bootstrap/commit/4f1e03f1), closes [#3701](https://github.com/angular-ui/bootstrap/issues/3701), [#3759](https://github.com/angular-ui/bootstrap/issues/3759), [#3933](https://github.com/angular-ui/bootstrap/issues/3933), [#3609](https://github.com/angular-ui/bootstrap/issues/3609), [#3713](https://github.com/angular-ui/bootstrap/issues/3713), [#3736](https://github.com/angular-ui/bootstrap/issues/3736), [#3875](https://github.com/angular-ui/bootstrap/issues/3875), [#3937](https://github.com/angular-ui/bootstrap/issues/3937), [#3976](https://github.com/angular-ui/bootstrap/issues/3976))
-* **datepicker:**
- * change to contains ([9f73d240](https://github.com/angular-ui/bootstrap/commit/9f73d240), closes [#4066](https://github.com/angular-ui/bootstrap/issues/4066), [#3076](https://github.com/angular-ui/bootstrap/issues/3076))
- * *BREAKING CHANGE* remove `new Date` fallback ([ab4580fd](https://github.com/angular-ui/bootstrap/commit/ab4580fd), closes [#2513](https://github.com/angular-ui/bootstrap/issues/2513), [#3294](https://github.com/angular-ui/bootstrap/issues/3294), [#3344](https://github.com/angular-ui/bootstrap/issues/3344), [#3682](https://github.com/angular-ui/bootstrap/issues/3682), [#4092](https://github.com/angular-ui/bootstrap/issues/4092), [#1289](https://github.com/angular-ui/bootstrap/issues/1289), [#2446](https://github.com/angular-ui/bootstrap/issues/2446), [#3037](https://github.com/angular-ui/bootstrap/issues/3037), [#3104](https://github.com/angular-ui/bootstrap/issues/3104), [#3196](https://github.com/angular-ui/bootstrap/issues/3196), [#3206](https://github.com/angular-ui/bootstrap/issues/3206), [#3342](https://github.com/angular-ui/bootstrap/issues/3342), [#3617](https://github.com/angular-ui/bootstrap/issues/3617), [#3644](https://github.com/angular-ui/bootstrap/issues/3644))
- * ensure `initDate` is on an object ([577b2a2a](https://github.com/angular-ui/bootstrap/commit/577b2a2a), closes [#3625](https://github.com/angular-ui/bootstrap/issues/3625))
- * change to higher max date ([32e73280](https://github.com/angular-ui/bootstrap/commit/32e73280), closes [#4042](https://github.com/angular-ui/bootstrap/issues/4042))
- * fix validation with `ngRequired` ([fe0d954a](https://github.com/angular-ui/bootstrap/commit/fe0d954a), closes [#4002](https://github.com/angular-ui/bootstrap/issues/4002), [#3862](https://github.com/angular-ui/bootstrap/issues/3862))
- * set to `null` if not present ([a65a5fa1](https://github.com/angular-ui/bootstrap/commit/a65a5fa1), closes [#4014](https://github.com/angular-ui/bootstrap/issues/4014))
-* **dropdown:** add safety check for setIsOpen ([60e43160](https://github.com/angular-ui/bootstrap/commit/60e43160), closes [#4030](https://github.com/angular-ui/bootstrap/issues/4030))
-* **modal:**
- * properly garbage collect DOM node ([1e8297be](https://github.com/angular-ui/bootstrap/commit/1e8297be), closes [#2875](https://github.com/angular-ui/bootstrap/issues/2875))
- * fix `bindToController` implementation ([811bf96e](https://github.com/angular-ui/bootstrap/commit/811bf96e), closes [#4054](https://github.com/angular-ui/bootstrap/issues/4054), [#4051](https://github.com/angular-ui/bootstrap/issues/4051))
- * animate backdrop concurrently with window ([c55ee4f5](https://github.com/angular-ui/bootstrap/commit/c55ee4f5), closes [#4039](https://github.com/angular-ui/bootstrap/issues/4039), [#4036](https://github.com/angular-ui/bootstrap/issues/4036))
-* **progressbar:**
- * use more visible color ([1afc5d1d](https://github.com/angular-ui/bootstrap/commit/1afc5d1d), closes [#4044](https://github.com/angular-ui/bootstrap/issues/4044))
- * allow max width of 100% ([2e9177e5](https://github.com/angular-ui/bootstrap/commit/2e9177e5), closes [#4027](https://github.com/angular-ui/bootstrap/issues/4027), [#4018](https://github.com/angular-ui/bootstrap/issues/4018))
-* **tooltip:**
- * update tooltip placement dynamically ([13df1c93](https://github.com/angular-ui/bootstrap/commit/13df1c93), closes [#3980](https://github.com/angular-ui/bootstrap/issues/3980), [#3978](https://github.com/angular-ui/bootstrap/issues/3978))
- * prevent 1px shift in Webkit/Blink ([632aa820](https://github.com/angular-ui/bootstrap/commit/632aa820), closes [#3964](https://github.com/angular-ui/bootstrap/issues/3964))
-* **typeahead:**
- * reset matches if enter is hit ([25704838](https://github.com/angular-ui/bootstrap/commit/25704838), closes [#4063](https://github.com/angular-ui/bootstrap/issues/4063), [#3545](https://github.com/angular-ui/bootstrap/issues/3545))
- * only reset matches if matches are present ([97e077e1](https://github.com/angular-ui/bootstrap/commit/97e077e1), closes [#3119](https://github.com/angular-ui/bootstrap/issues/3119))
-
-
-#### Features
-
-* **build:** add support for npm publishing ([27f7ca26](https://github.com/angular-ui/bootstrap/commit/27f7ca26), closes [#3108](https://github.com/angular-ui/bootstrap/issues/3108))
-* **modal:** trap focus in modal for tabbing ([a028d2aa](https://github.com/angular-ui/bootstrap/commit/a028d2aa), closes [#3689](https://github.com/angular-ui/bootstrap/issues/3689), [#4004](https://github.com/angular-ui/bootstrap/issues/4004), [#738](https://github.com/angular-ui/bootstrap/issues/738))
-* **popover:** add custom template support ([a9d3d253](https://github.com/angular-ui/bootstrap/commit/a9d3d253), closes [#4056](https://github.com/angular-ui/bootstrap/issues/4056), [#4057](https://github.com/angular-ui/bootstrap/issues/4057))
-* **rating:** add title support for stars ([713c8487](https://github.com/angular-ui/bootstrap/commit/713c8487), closes [#3621](https://github.com/angular-ui/bootstrap/issues/3621))
-* **typeahead:**
- * add `noResults` indicator binding ([647cdd93](https://github.com/angular-ui/bootstrap/commit/647cdd93), closes [#2016](https://github.com/angular-ui/bootstrap/issues/2016), [#2792](https://github.com/angular-ui/bootstrap/issues/2792), [#4068](https://github.com/angular-ui/bootstrap/issues/4068))
- * add `typeaheadSelectOnExact` support ([277b30ca](https://github.com/angular-ui/bootstrap/commit/277b30ca), closes [#3365](https://github.com/angular-ui/bootstrap/issues/3365), [#3310](https://github.com/angular-ui/bootstrap/issues/3310))
-
-
-<a name"0.13.1"></a>
-### 0.13.1 (2015-07-23)
-
-
-#### Bug Fixes
-
-* **accordion:** add CSP compliance for accordion & typeahead ([fb302c60](https://github.com/angular-ui/bootstrap/commit/fb302c60), closes [#3909](https://github.com/angular-ui/bootstrap/issues/3909), [#3904](https://github.com/angular-ui/bootstrap/issues/3904))
-* **alert:**
- * adjust check for close attribute ([13a0354f](https://github.com/angular-ui/bootstrap/commit/13a0354f), closes [#3864](https://github.com/angular-ui/bootstrap/issues/3864), [#3890](https://github.com/angular-ui/bootstrap/issues/3890), [#3848](https://github.com/angular-ui/bootstrap/issues/3848))
- * rename alert-dismissable to alert-dismissible ([d631af5a](https://github.com/angular-ui/bootstrap/commit/d631af5a))
-* **carousel:**
- * change to avoid references to debug info ([ca07ad7c](https://github.com/angular-ui/bootstrap/commit/ca07ad7c), closes [#3795](https://github.com/angular-ui/bootstrap/issues/3795), [#3794](https://github.com/angular-ui/bootstrap/issues/3794))
- * ensure there are slides present ([115d490a](https://github.com/angular-ui/bootstrap/commit/115d490a), closes [#3755](https://github.com/angular-ui/bootstrap/issues/3755))
- * disable transition until animation completes ([ef45ecf8](https://github.com/angular-ui/bootstrap/commit/ef45ecf8), closes [#3729](https://github.com/angular-ui/bootstrap/issues/3729), [#3757](https://github.com/angular-ui/bootstrap/issues/3757))
-* **collapse:** fix occasional flickering ([ede9ea46](https://github.com/angular-ui/bootstrap/commit/ede9ea46), closes [#3804](https://github.com/angular-ui/bootstrap/issues/3804), [#3801](https://github.com/angular-ui/bootstrap/issues/3801))
-* **datepicker:**
- * change to min width cells ([5567c432](https://github.com/angular-ui/bootstrap/commit/5567c432), closes [#4000](https://github.com/angular-ui/bootstrap/issues/4000), [#3941](https://github.com/angular-ui/bootstrap/issues/3941))
- * fix OS dependent time zone issue ([f1412014](https://github.com/angular-ui/bootstrap/commit/f1412014), closes [#3079](https://github.com/angular-ui/bootstrap/issues/3079))
- * Apply custom class to month ([eb3b32ec](https://github.com/angular-ui/bootstrap/commit/eb3b32ec), closes [#3863](https://github.com/angular-ui/bootstrap/issues/3863))
- * check if getter.assign is function ([ed10899d](https://github.com/angular-ui/bootstrap/commit/ed10899d), closes [#3155](https://github.com/angular-ui/bootstrap/issues/3155), [#3345](https://github.com/angular-ui/bootstrap/issues/3345), [#3719](https://github.com/angular-ui/bootstrap/issues/3719))
-* **dropdown:**
- * do not autoclose with outsideClick and append to body ([cc66a068](https://github.com/angular-ui/bootstrap/commit/cc66a068), closes [#3792](https://github.com/angular-ui/bootstrap/issues/3792), [#3645](https://github.com/angular-ui/bootstrap/issues/3645))
- * avoid matching 138 & 140 ([41ebd984](https://github.com/angular-ui/bootstrap/commit/41ebd984))
- * align when using dropdown-menu-body ([2332f14d](https://github.com/angular-ui/bootstrap/commit/2332f14d), closes [#3913](https://github.com/angular-ui/bootstrap/issues/3913), [#3820](https://github.com/angular-ui/bootstrap/issues/3820))
- * call toggle after animation ([054341b7](https://github.com/angular-ui/bootstrap/commit/054341b7), closes [#3513](https://github.com/angular-ui/bootstrap/issues/3513), [#3655](https://github.com/angular-ui/bootstrap/issues/3655), [#3511](https://github.com/angular-ui/bootstrap/issues/3511))
- * do not close on $locationChangeSuccess ([e5a1e88f](https://github.com/angular-ui/bootstrap/commit/e5a1e88f), closes [#3683](https://github.com/angular-ui/bootstrap/issues/3683), [#3704](https://github.com/angular-ui/bootstrap/issues/3704))
-* **modal:**
- * backdrop animation on AngularJS 1.4 ([158d2676](https://github.com/angular-ui/bootstrap/commit/158d2676), closes [#3896](https://github.com/angular-ui/bootstrap/issues/3896))
- * closing breaks on missing scope, 1.4 ([0286828b](https://github.com/angular-ui/bootstrap/commit/0286828b), closes [#3787](https://github.com/angular-ui/bootstrap/issues/3787), [#3806](https://github.com/angular-ui/bootstrap/issues/3806), [#3873](https://github.com/angular-ui/bootstrap/issues/3873), [#3888](https://github.com/angular-ui/bootstrap/issues/3888))
- * remove illegal character ([dd4f3cc8](https://github.com/angular-ui/bootstrap/commit/dd4f3cc8), closes [#3893](https://github.com/angular-ui/bootstrap/issues/3893), [#3892](https://github.com/angular-ui/bootstrap/issues/3892))
- * focus on body if element disappears ([988336cc](https://github.com/angular-ui/bootstrap/commit/988336cc), closes [#3653](https://github.com/angular-ui/bootstrap/issues/3653), [#3639](https://github.com/angular-ui/bootstrap/issues/3639))
-* **progressbar:** use max value on stacked progress bar ([36e0f0ea](https://github.com/angular-ui/bootstrap/commit/36e0f0ea), closes [#3830](https://github.com/angular-ui/bootstrap/issues/3830), [#3618](https://github.com/angular-ui/bootstrap/issues/3618))
-* **rating:** Set rating to 0 when same value is selected ([dbceec76](https://github.com/angular-ui/bootstrap/commit/dbceec76), closes [#3963](https://github.com/angular-ui/bootstrap/issues/3963), [#3246](https://github.com/angular-ui/bootstrap/issues/3246))
-* **tabs:** fix empty href ([2b27dcbf](https://github.com/angular-ui/bootstrap/commit/2b27dcbf), closes [#3799](https://github.com/angular-ui/bootstrap/issues/3799))
-* **typeahead:**
- * select match on tab for iOS webview ([5b37bb8b](https://github.com/angular-ui/bootstrap/commit/5b37bb8b), closes [#3762](https://github.com/angular-ui/bootstrap/issues/3762), [#3699](https://github.com/angular-ui/bootstrap/issues/3699))
- * don't close popup on right click ([7d1c4600](https://github.com/angular-ui/bootstrap/commit/7d1c4600), closes [#3975](https://github.com/angular-ui/bootstrap/issues/3975), [#3973](https://github.com/angular-ui/bootstrap/issues/3973))
- * close dropdown on tab with no selection ([493510d0](https://github.com/angular-ui/bootstrap/commit/493510d0), closes [#3340](https://github.com/angular-ui/bootstrap/issues/3340))
- * do not execute unnecessary $digest ([0d96221f](https://github.com/angular-ui/bootstrap/commit/0d96221f), closes [#2652](https://github.com/angular-ui/bootstrap/issues/2652), [#3791](https://github.com/angular-ui/bootstrap/issues/3791))
- * add href to show cursor as pointer ([195e520e](https://github.com/angular-ui/bootstrap/commit/195e520e), closes [#3649](https://github.com/angular-ui/bootstrap/issues/3649))
-
-
-#### Features
-
-* **alert:** pass $event to close() ([44e06425](https://github.com/angular-ui/bootstrap/commit/44e06425), closes [#3828](https://github.com/angular-ui/bootstrap/issues/3828), [#3827](https://github.com/angular-ui/bootstrap/issues/3827))
-* **carousel:** add `noWrap` option to prevent re-cycling of slides ([7fb3840f](https://github.com/angular-ui/bootstrap/commit/7fb3840f), closes [#3462](https://github.com/angular-ui/bootstrap/issues/3462), [#3397](https://github.com/angular-ui/bootstrap/issues/3397))
-* **collapse:** add accessibility support ([92551342](https://github.com/angular-ui/bootstrap/commit/92551342), closes [#3920](https://github.com/angular-ui/bootstrap/issues/3920))
-* **dropdown:**
- * add dropdown classes dynamically ([4af83ade](https://github.com/angular-ui/bootstrap/commit/4af83ade), closes [#3984](https://github.com/angular-ui/bootstrap/issues/3984), [#3986](https://github.com/angular-ui/bootstrap/issues/3986))
- * add accessibility attributes ([14689e05](https://github.com/angular-ui/bootstrap/commit/14689e05), closes [#3951](https://github.com/angular-ui/bootstrap/issues/3951))
- * add keynav support to dropdown ([62359370](https://github.com/angular-ui/bootstrap/commit/62359370), closes [#3685](https://github.com/angular-ui/bootstrap/issues/3685), [#3212](https://github.com/angular-ui/bootstrap/issues/3212), [#1228](https://github.com/angular-ui/bootstrap/issues/1228))
- * support optional templates for dropdown menus ([83c4266c](https://github.com/angular-ui/bootstrap/commit/83c4266c))
-* **modal:** add support for bindToController ([8adfc833](https://github.com/angular-ui/bootstrap/commit/8adfc833), closes [#3965](https://github.com/angular-ui/bootstrap/issues/3965), [#3404](https://github.com/angular-ui/bootstrap/issues/3404))
-* **pagination:** add support for `ng-disabled` ([f6edfa5d](https://github.com/angular-ui/bootstrap/commit/f6edfa5d), closes [#3956](https://github.com/angular-ui/bootstrap/issues/3956))
-* **timepicker:** add `showSpinner` flag ([1f760eb3](https://github.com/angular-ui/bootstrap/commit/1f760eb3))
-* **typeahead:**
- * add 'select on blur' option. ([68cac59a](https://github.com/angular-ui/bootstrap/commit/68cac59a), closes [#3445](https://github.com/angular-ui/bootstrap/issues/3445))
- * popup position ([86bfec19](https://github.com/angular-ui/bootstrap/commit/86bfec19), closes [#3874](https://github.com/angular-ui/bootstrap/issues/3874))
- * handles min-length of 0 ([a5a25141](https://github.com/angular-ui/bootstrap/commit/a5a25141), closes [#3600](https://github.com/angular-ui/bootstrap/issues/3600))
-
-
-<a name="0.13.0"></a>
-## 0.13.0 (2015-05-02)
-
-
-#### Bug Fixes
-
-* **accordion:**
- * Made accordion heading tab-able for IE9-10 ([6abad509](https://github.com/angular-ui/bootstrap/commit/6abad509cd4d44c3ca432f2f21c9ecea0a206b53))
- * noop for href in header to prevent page refresh with nested buttons canceling ev ([9ca4ec39](https://github.com/angular-ui/bootstrap/commit/9ca4ec399be0e0e8f6c3fe6fd924a7d94ce669b5))
-* **buttons:** add unit tests for buttons ([9468d723](https://github.com/angular-ui/bootstrap/commit/9468d7239dd6eed4a3a2945f6761f7a2fa97222b), closes [#3030](https://github.com/angular-ui/bootstrap/issues/3030))
-* **carousel:** respect the order of the slides ([b5f220fa](https://github.com/angular-ui/bootstrap/commit/b5f220fa8483f5743ba6ab3610f5064bf5c71be7), closes [#488](https://github.com/angular-ui/bootstrap/issues/488))
-* **changelog:** add comment on breaking change ([f02c1bbb](https://github.com/angular-ui/bootstrap/commit/f02c1bbbf7777bee9cbb4a038730fb475337a2c5), closes [#2675](https://github.com/angular-ui/bootstrap/issues/2675))
-* **dateparser:** add extra validation constraint to days ([c19b8879](https://github.com/angular-ui/bootstrap/commit/c19b8879e902e8753b4077e7983ec629242436fc))
-* **datepicker:**
- * week count issues ([39e5fd3e](https://github.com/angular-ui/bootstrap/commit/39e5fd3e4981f311d237d21c37a89cde9f42f0d6), closes [#2506](https://github.com/angular-ui/bootstrap/issues/2506), [#3120](https://github.com/angular-ui/bootstrap/issues/3120), [#2306](https://github.com/angular-ui/bootstrap/issues/2306))
- * make 'show-weeks' work on datepickerPopup ([d0cc7284](https://github.com/angular-ui/bootstrap/commit/d0cc72841b9641b768cc5eb184de2dbbaa804e2d), closes [#3143](https://github.com/angular-ui/bootstrap/issues/3143), [#3149](https://github.com/angular-ui/bootstrap/issues/3149))
- * datepicker-popup compatibility with ngModelOptions ([d024dd77](https://github.com/angular-ui/bootstrap/commit/d024dd77ed6a20983bea5b90b75481c93f17980f), closes [#3349](https://github.com/angular-ui/bootstrap/issues/3349))
- * disable title button when in max mode ([35b8512a](https://github.com/angular-ui/bootstrap/commit/35b8512ac7949eba7d432760f83748bb2bb893c1), closes [#3012](https://github.com/angular-ui/bootstrap/issues/3012))
- * add shortcutPropagation to datepickerPopup ([13bd516c](https://github.com/angular-ui/bootstrap/commit/13bd516cfcc1b2ee940112675830f7ce3d93ea4f))
- * fixed shortcut event kill by adding option ([89ab4580](https://github.com/angular-ui/bootstrap/commit/89ab4580cd3d0bbdf63e02fbebe2cb3a9f2616dd))
- * fix initDate implementation in datepicker ([98e2bdfc](https://github.com/angular-ui/bootstrap/commit/98e2bdfc8b4dd108acdf3fac75a795675889bbc7))
- * Fix init-date not applying on datepicker-popup ([c5b63ded](https://github.com/angular-ui/bootstrap/commit/c5b63ded0aebd7ae80f238bd0a33f1d9c0746dba))
- * Make datepicker respect dateFormat inside ng-if ([2c2dba6d](https://github.com/angular-ui/bootstrap/commit/2c2dba6d145c95500efe7f6be6248d56ae1aebee))
- * `ng-model` value can be a timestamp ([d253208b](https://github.com/angular-ui/bootstrap/commit/d253208bd7ebbd6209c6a25f70e010123198fcd7), closes [#2345](https://github.com/angular-ui/bootstrap/issues/2345))
- * Parse date from $viewValue instead of $modelValue ([0ecf7faa](https://github.com/angular-ui/bootstrap/commit/0ecf7faad3b340e171e5c8ca17a17597fa6e6596))
- * don't stop ESC propagation unless dropdown is open ([c2e5b284](https://github.com/angular-ui/bootstrap/commit/c2e5b284a31fc992b8230b89dc98ed757d155493), closes [#3096](https://github.com/angular-ui/bootstrap/issues/3096), [#3179](https://github.com/angular-ui/bootstrap/issues/3179))
- * date formatting when using angular 1.3 fixes #2659 ([23936f9f](https://github.com/angular-ui/bootstrap/commit/23936f9f6ec7170b56c7f13345ae022c74fa3034), closes [#3293](https://github.com/angular-ui/bootstrap/issues/3293), [#3279](https://github.com/angular-ui/bootstrap/issues/3279), [#2440](https://github.com/angular-ui/bootstrap/issues/2440), [#2932](https://github.com/angular-ui/bootstrap/issues/2932), [#3074](https://github.com/angular-ui/bootstrap/issues/3074), [#2943](https://github.com/angular-ui/bootstrap/issues/2943), [#2733](https://github.com/angular-ui/bootstrap/issues/2733), [#3047](https://github.com/angular-ui/bootstrap/issues/3047), [#2659](https://github.com/angular-ui/bootstrap/issues/2659), [#2681](https://github.com/angular-ui/bootstrap/issues/2681))
- * date formatting when using angular 1.3 fixes #2659 ([5f9afe5a](https://github.com/angular-ui/bootstrap/commit/5f9afe5a86af0e207eaacd6a9b1f202fd78d7009))
-* **demo:** Modify the demo app to play nice with Angular 1.3 ([aa0b6392](https://github.com/angular-ui/bootstrap/commit/aa0b6392db57d436d7c203cf05555d708c945322), closes [#3098](https://github.com/angular-ui/bootstrap/issues/3098))
-* **dropdown:** Fix $digest:inprog on dropdown dismissal ([4a06adba](https://github.com/angular-ui/bootstrap/commit/4a06adbac6c1c1fa6b0182ca9bd7335eda89c43f), closes [#3274](https://github.com/angular-ui/bootstrap/issues/3274))
-* **grunt:** fix typo in gruntfile ([f0cadb1f](https://github.com/angular-ui/bootstrap/commit/f0cadb1f1a6b8d994c2df3313a2121e92a36bddb), closes [#3589](https://github.com/angular-ui/bootstrap/issues/3589))
-* **modal:**
- * Use attribute observe and add a render promise. ([99af5f8a](https://github.com/angular-ui/bootstrap/commit/99af5f8a369b13b018ec1e592d82a1a140cbb6bb))
- * fix minor grammar error ([22a21448](https://github.com/angular-ui/bootstrap/commit/22a21448cbad1448bd4541bd0ce3fc8d3515943d), closes [#3519](https://github.com/angular-ui/bootstrap/issues/3519))
- * Fix focus when the dialog is close or cancelled ([e6b105ae](https://github.com/angular-ui/bootstrap/commit/e6b105ae39bcbcf468c3e32057c6acb5ab50d4ce), closes [#2888](https://github.com/angular-ui/bootstrap/issues/2888))
- * allow for custom user modal sizes ([85eeb954](https://github.com/angular-ui/bootstrap/commit/85eeb95428e0dd367cf3e251f2d01fc8dc899dd4), closes [#3429](https://github.com/angular-ui/bootstrap/issues/3429), [#3431](https://github.com/angular-ui/bootstrap/issues/3431))
- * Autofocus corrects the second time that the modal is open ([e5f5f75b](https://github.com/angular-ui/bootstrap/commit/e5f5f75b370b6d4806da87bec575b7084e30c520), closes [#2802](https://github.com/angular-ui/bootstrap/issues/2802))
- * fix messages on modal test failed ([ab919f9f](https://github.com/angular-ui/bootstrap/commit/ab919f9f89aeaaa336b5d3fe1aed1e0617b5a482))
-* **pagination:**
- * remove focus from prior clicked elements ([33269bb6](https://github.com/angular-ui/bootstrap/commit/33269bb6b444cdca18e08063814d39c5ef502589), closes [#3488](https://github.com/angular-ui/bootstrap/issues/3488), [#3486](https://github.com/angular-ui/bootstrap/issues/3486))
- * fixes issue when init called after watch triggered ([26b40903](https://github.com/angular-ui/bootstrap/commit/26b40903abf012b5d3d35154d6210119ac9a76d4), closes [#2257](https://github.com/angular-ui/bootstrap/issues/2257), [#2227](https://github.com/angular-ui/bootstrap/issues/2227))
-* **popover:**
- * prevent wrong positioning from title ([c8156c7e](https://github.com/angular-ui/bootstrap/commit/c8156c7e21d0f3a61fc19d59644ae24c423eb5c6), closes [#3518](https://github.com/angular-ui/bootstrap/issues/3518))
- * animations with ngAnimate ([c2ace472](https://github.com/angular-ui/bootstrap/commit/c2ace47225ecb337328a16d2c95744e0d37ce80f), closes [#3509](https://github.com/angular-ui/bootstrap/issues/3509), [#3375](https://github.com/angular-ui/bootstrap/issues/3375), [#3506](https://github.com/angular-ui/bootstrap/issues/3506))
- * make it work with ngAnimate ([461087b5](https://github.com/angular-ui/bootstrap/commit/461087b5ff360e1d06d6724375ab29169a89fcf2), closes [#3482](https://github.com/angular-ui/bootstrap/issues/3482), [#3375](https://github.com/angular-ui/bootstrap/issues/3375))
-* **progressbar:** limit max width to 100% ([489961e1](https://github.com/angular-ui/bootstrap/commit/489961e1a0036ddab4e719a772382209a595f163), closes [#3005](https://github.com/angular-ui/bootstrap/issues/3005))
-* **tab:** change to `disable` attribute ([4bfae223](https://github.com/angular-ui/bootstrap/commit/4bfae2238d08d7edea8e6dfe99051192a16d6587), closes [#2677](https://github.com/angular-ui/bootstrap/issues/2677))
-* **timepicker:**
- * move render logic to formatter ([b4bbc019](https://github.com/angular-ui/bootstrap/commit/b4bbc0198284d90085bd85840dffd030345d5211), closes [#3160](https://github.com/angular-ui/bootstrap/issues/3160), [#3427](https://github.com/angular-ui/bootstrap/issues/3427))
- * remove ng-mousewheel binding ([a726b7cd](https://github.com/angular-ui/bootstrap/commit/a726b7cd47d417ed656aef3af012e7b6c7b00bf4), closes [#3442](https://github.com/angular-ui/bootstrap/issues/3442))
- * fix widths of inputs when inside form-inline ([8e89440b](https://github.com/angular-ui/bootstrap/commit/8e89440ba86d26d74ed799843cde7f9f2bf26c0b))
- * Stringify pad return when value >= 10 ([405dab65](https://github.com/angular-ui/bootstrap/commit/405dab65f72f5bed488eb8f5dfa5a1a848c4a606))
-* **tooltip:**
- * template type should respect popup class ([6af627a8](https://github.com/angular-ui/bootstrap/commit/6af627a8edcbce0370ca2d90f9a575cd6770f6c1), closes [#3569](https://github.com/angular-ui/bootstrap/issues/3569))
- * tooltip-html should not open if empty ([34044a77](https://github.com/angular-ui/bootstrap/commit/34044a77070bc809220e2ed6b628393889c40b86), closes [#3563](https://github.com/angular-ui/bootstrap/issues/3563))
- * use correct prefix for -template ([9ca9d7f5](https://github.com/angular-ui/bootstrap/commit/9ca9d7f5263d8d5e0a9de18c2b75f64aca7c5255), closes [#3498](https://github.com/angular-ui/bootstrap/issues/3498), [#3473](https://github.com/angular-ui/bootstrap/issues/3473))
- * Fix for issue #3167 ([87a36076](https://github.com/angular-ui/bootstrap/commit/87a3607632cae03ead57b377bb91ca27610e7730))
-* **typeahead:**
- * Fix for memory-leak in typeahead ([b5a80c08](https://github.com/angular-ui/bootstrap/commit/b5a80c08f2364db2170766366cc7433661e737ae))
- * reset 'parse' validation key ([c0a9c707](https://github.com/angular-ui/bootstrap/commit/c0a9c707903fa3dfc662887cd348ee2b0bf13f85), closes [#3166](https://github.com/angular-ui/bootstrap/issues/3166))
- * resolve property length of undefined error ([950c22cd](https://github.com/angular-ui/bootstrap/commit/950c22cdab3d0b3479a0d0515ed64e57c9ff046b), closes [#2999](https://github.com/angular-ui/bootstrap/issues/2999), [#3178](https://github.com/angular-ui/bootstrap/issues/3178))
- * set validity if model is set manually ([b0044433](https://github.com/angular-ui/bootstrap/commit/b004443371d75bb61e9a17a00a58b485c1279aee), closes [#3318](https://github.com/angular-ui/bootstrap/issues/3318))
- * $compile match template after adding to DOM ([03446c56](https://github.com/angular-ui/bootstrap/commit/03446c56335d5ee0970f9730af215fea1dd53f48))
-
-
-#### Features
-
-* **dateparser:**
- * Add support for HH, H, mm, m, ss, s formats ([971a1b57](https://github.com/angular-ui/bootstrap/commit/971a1b57394c1e1088564e0809c1341620586aa0), closes [#2509](https://github.com/angular-ui/bootstrap/issues/2509), [#3159](https://github.com/angular-ui/bootstrap/issues/3159), [#3417](https://github.com/angular-ui/bootstrap/issues/3417))
- * add support for milliseconds ([82cb637d](https://github.com/angular-ui/bootstrap/commit/82cb637dd12288d9fa0d42783f672fc71b94ffda), closes [#3537](https://github.com/angular-ui/bootstrap/issues/3537))
-* **datepicker:**
- * support HTML5 month input type ([aef8953c](https://github.com/angular-ui/bootstrap/commit/aef8953c792066c008d8ce97918153f756a39112), closes [#3499](https://github.com/angular-ui/bootstrap/issues/3499))
- * support HTML5 date input type ([1a9e88fe](https://github.com/angular-ui/bootstrap/commit/1a9e88fe9e6a078943273012429788e742f8ebbd), closes [#3499](https://github.com/angular-ui/bootstrap/issues/3499))
- * Add custom class to specific days via outside logic ([0bcd30c4](https://github.com/angular-ui/bootstrap/commit/0bcd30c4a6d65763e1c4d1b6820a4537a11e95ee))
-* **dropdown:**
- * Dropdown append-to-body ([dfe9854b](https://github.com/angular-ui/bootstrap/commit/dfe9854be3d0ae82f361cefec19a6f692aa41591), closes [#3411](https://github.com/angular-ui/bootstrap/issues/3411), [#1030](https://github.com/angular-ui/bootstrap/issues/1030))
- * Make Auto-Close Dropdowns optional. ([a50f1120](https://github.com/angular-ui/bootstrap/commit/a50f11201eeb18569dca0ac3bb157e43cb9d9076), closes [#2218](https://github.com/angular-ui/bootstrap/issues/2218), [#3045](https://github.com/angular-ui/bootstrap/issues/3045))
-* **modal:**
- * Add a vetoable modal.closing event ([a5a82d9b](https://github.com/angular-ui/bootstrap/commit/a5a82d9be7dc0bd1cfd510bacf9aa411c6efe1bc))
- * pass reason when opened promise rejected ([0ad208d6](https://github.com/angular-ui/bootstrap/commit/0ad208d6a0164517b85d8e8181e4a0fc98f4f5ec), closes [#2978](https://github.com/angular-ui/bootstrap/issues/2978))
- * add option to disable animations ([5e661d47](https://github.com/angular-ui/bootstrap/commit/5e661d47d6698fdfebb52402eb1687e5697c0040), closes [#1007](https://github.com/angular-ui/bootstrap/issues/1007), [#2725](https://github.com/angular-ui/bootstrap/issues/2725))
-* **popover:**
- * respect popover-class option ([88a41dce](https://github.com/angular-ui/bootstrap/commit/88a41dce86c33bf1e0665d880ca68d3535aed553), closes [#3569](https://github.com/angular-ui/bootstrap/issues/3569))
- * use expression to fix usage with $sce ([422c8234](https://github.com/angular-ui/bootstrap/commit/422c823460663151e3482275d9c6749bb714a415), closes [#3558](https://github.com/angular-ui/bootstrap/issues/3558))
- * add popover-template directive ([7e3179ab](https://github.com/angular-ui/bootstrap/commit/7e3179ab9fdbba6c00ff1c30f97b432b58f9eafb))
-* **progressbar:** allow dynamic update to max ([7ccff028](https://github.com/angular-ui/bootstrap/commit/7ccff028ff5ed19af63d9cf1f5e078223924f3a0))
-* **rating:** add rounding logic to rating value ([b076483c](https://github.com/angular-ui/bootstrap/commit/b076483caa9b672068ae8d0cbdfeaed68f530861), closes [#3413](https://github.com/angular-ui/bootstrap/issues/3413), [#3415](https://github.com/angular-ui/bootstrap/issues/3415))
-* **tabs:** it should not select first not active tab as selected ([91b5fb62](https://github.com/angular-ui/bootstrap/commit/91b5fb62eedbb600d6a6abe32376846f327a903d))
-* **timepicker:**
- * always pad minutes ([6324486d](https://github.com/angular-ui/bootstrap/commit/6324486d70edc01fb28f61f0a68a6a490378d602), closes [#1598](https://github.com/angular-ui/bootstrap/issues/1598), [#3533](https://github.com/angular-ui/bootstrap/issues/3533))
- * have up/down arrow keys control time selection ([22961157](https://github.com/angular-ui/bootstrap/commit/22961157ad4636db12336abba54cc893554b99d6))
-* **tooltip:**
- * use expression to fix usage with $sce ([d867f830](https://github.com/angular-ui/bootstrap/commit/d867f8302d4632a34c81d151923b497f9af3fcfd), closes [#3558](https://github.com/angular-ui/bootstrap/issues/3558))
- * add tooltip-html directive ([e31fcf0f](https://github.com/angular-ui/bootstrap/commit/e31fcf0fcb06580064d1e6375dbedb69f1c95f25), closes [#3496](https://github.com/angular-ui/bootstrap/issues/3496))
- * add tooltip-template directive ([a1695114](https://github.com/angular-ui/bootstrap/commit/a1695114a245312878d315dfc9e369f98d573eae), closes [#220](https://github.com/angular-ui/bootstrap/issues/220))
- * update position dynamically ([853fa457](https://github.com/angular-ui/bootstrap/commit/853fa4578a1f127fee9283e725d6e19789882121), closes [#96](https://github.com/angular-ui/bootstrap/issues/96), [#1109](https://github.com/angular-ui/bootstrap/issues/1109), [#2816](https://github.com/angular-ui/bootstrap/issues/2816), [#3435](https://github.com/angular-ui/bootstrap/issues/3435))
- * Support for tooltip-class configuration ([d784354a](https://github.com/angular-ui/bootstrap/commit/d784354a53fa40597cb8c124405ea9a90b6f0b8e), closes [#3126](https://github.com/angular-ui/bootstrap/issues/3126))
-* **transition:** deprecate transition module ([8a552443](https://github.com/angular-ui/bootstrap/commit/8a552443741d1e5b4b29d9da9c7e9990fa37886c), closes [#3497](https://github.com/angular-ui/bootstrap/issues/3497))
-
-
-# 0.12.1 (2015-02-20)
-
-## Bug Fixes
-
-- **tooltip:**
- - incorrect position when text wraps ([5726e3ef](http://github.com/angular-ui/bootstrap/commit/5726e3ef))
-
-<a name="0.12.0"></a>
-# 0.12.0 (2014-11-16)
-
-
-## Bug Fixes
-
-* **accordion:** make header links keyboard accessible ([992b2329](http://github.com/angular-ui/bootstrap/commit/992b23297cd100ab4e236fba469e3a70566a4163), closes [#2869](http://github.com/angular-ui/bootstrap/issues/2869))
-* **build:** make custom builds on demo site work ([390f2bf6](http://github.com/angular-ui/bootstrap/commit/390f2bf6b0846ee640e86ad87bbae8c449e53026), closes [#2960](http://github.com/angular-ui/bootstrap/issues/2960), [#2847](http://github.com/angular-ui/bootstrap/issues/2847), [#2625](http://github.com/angular-ui/bootstrap/issues/2625), [#2489](http://github.com/angular-ui/bootstrap/issues/2489), [#2357](http://github.com/angular-ui/bootstrap/issues/2357), [#2176](http://github.com/angular-ui/bootstrap/issues/2176), [#2892](http://github.com/angular-ui/bootstrap/issues/2892))
-* **carousel:** replaced $timeout with $interval when it was wrong ([392c0ad1](http://github.com/angular-ui/bootstrap/commit/392c0ad13ca9b65be5e77ac0c68de24ead8ea2ce), closes [#1308](http://github.com/angular-ui/bootstrap/issues/1308), [#2454](http://github.com/angular-ui/bootstrap/issues/2454), [#2776](http://github.com/angular-ui/bootstrap/issues/2776))
-* **datepicker:** correct button alignment when using bootstrap v3.2.0 ([460fbec7](http://github.com/angular-ui/bootstrap/commit/460fbec776c6d08d0e7db40aedd29d10ac48d7e9), closes [#2728](http://github.com/angular-ui/bootstrap/issues/2728))
-* **demo:** initial load of fragment URLs ([eab6daf6](http://github.com/angular-ui/bootstrap/commit/eab6daf64b3c963d8e285e254c75af5f97c24ec1), closes [#2762](http://github.com/angular-ui/bootstrap/issues/2762))
-* **dropdown:**
- * compatibility with `$location` url rewriting ([ef095170](http://github.com/angular-ui/bootstrap/commit/ef09517061b0b4c0c9e9f85086635af33207ec54), closes [#2343](http://github.com/angular-ui/bootstrap/issues/2343))
- * remove `C` restrictions to avoid conflicts ([192768e1](http://github.com/angular-ui/bootstrap/commit/192768e109b5c4a50c7dcd320e09d05fedd4298a), closes [#2156](http://github.com/angular-ui/bootstrap/issues/2156), [#2170](http://github.com/angular-ui/bootstrap/issues/2170))
-* **tabs:**
- * make tab links keyboard accessible ([5df524b7](http://github.com/angular-ui/bootstrap/commit/5df524b77114bccdc9a49540e1eb52a564ee5dfd), closes [#2226](http://github.com/angular-ui/bootstrap/issues/2226), [#2290](http://github.com/angular-ui/bootstrap/issues/2290), [#2870](http://github.com/angular-ui/bootstrap/issues/2870), [#2304](http://github.com/angular-ui/bootstrap/issues/2304))
- * don't select tabs on destroy ([9939867a](http://github.com/angular-ui/bootstrap/commit/9939867aba0b7b763588b18829b557c052ea69ba), closes [#2155](http://github.com/angular-ui/bootstrap/issues/2155), [#2596](http://github.com/angular-ui/bootstrap/issues/2596))
-* **tests:** usage of undefined variables ([34273ff0](http://github.com/angular-ui/bootstrap/commit/34273ff0107ecfa28438a7389d94ca619b8704e5))
-* **tooltip:**
- * remove extra digest causing incompatibility ([32c4704b](http://github.com/angular-ui/bootstrap/commit/32c4704b748cecf2de4c651f2e5157c1ef6c88b1), closes [#2951](http://github.com/angular-ui/bootstrap/issues/2951), [#2959](http://github.com/angular-ui/bootstrap/issues/2959))
- * show correct tooltip on `ng-repeat` ([b4832c4b](http://github.com/angular-ui/bootstrap/commit/b4832c4b551af7e580ed65d9e5aaee1ef9e6c53e), closes [#2935](http://github.com/angular-ui/bootstrap/issues/2935))
- * memory leak on show/hide ([faf38d20](http://github.com/angular-ui/bootstrap/commit/faf38d20a49176f2016f7f7d4fa49a5c438a986e), closes [#2709](http://github.com/angular-ui/bootstrap/issues/2709), [#2919](http://github.com/angular-ui/bootstrap/issues/2919))
- * remove child scope requirement ([8204c808](http://github.com/angular-ui/bootstrap/commit/8204c8088139165ac9b2ad3977a2c20570e434cb), closes [#1269](http://github.com/angular-ui/bootstrap/issues/1269), [#2320](http://github.com/angular-ui/bootstrap/issues/2320), [#2203](http://github.com/angular-ui/bootstrap/issues/2203))
- * evaluate appendToBody on init ([e10d561f](http://github.com/angular-ui/bootstrap/commit/e10d561f92c2927be0ec429761fa229520fb9a51), closes [#2921](http://github.com/angular-ui/bootstrap/issues/2921))
- * don't use an empty transclusion fn ([689c4d01](http://github.com/angular-ui/bootstrap/commit/689c4d017d303b6d758164ee12837a172bb01139), closes [#2825](http://github.com/angular-ui/bootstrap/issues/2825))
-* **typeahead:** don't leak DOM nodes ([1f6c3c92](http://github.com/angular-ui/bootstrap/commit/1f6c3c92af0e343c7e34b85ea6d270ac79bf6755))
-
-
-## Features
-
-* **alert:** allow alerts to be closed from a controller ([ca6fad67](http://github.com/angular-ui/bootstrap/commit/ca6fad675bf2aa793896bf3e086330667a5d9051), closes [#2399](http://github.com/angular-ui/bootstrap/issues/2399), [#2854](http://github.com/angular-ui/bootstrap/issues/2854))
-* **typeahead:** add focus-first option ([35d0cc1d](http://github.com/angular-ui/bootstrap/commit/35d0cc1d57302883840f7ad54a03918ae2df001d), closes [#908](http://github.com/angular-ui/bootstrap/issues/908), [#2916](http://github.com/angular-ui/bootstrap/issues/2916))
-
-
-## Breaking Changes
-
-* `tooltip-trigger` and `popover-trigger` are no longer watched
-attributes.
-([a65bea95](http://github.com/angular-ui/bootstrap/commit/a65bea95338802b026fd213805b095b5a0b5b393))
-This affects both popovers and tooltips. The *triggers are now set up
-once* and can no longer be changed after initialization.
-
-* `dropdown` and `dropdown-toggle` are attribute-only directives. ([192768e1](http://github.com/angular-ui/bootstrap/commit/192768e109b5c4a50c7dcd320e09d05fedd4298a))
-
- Before:
- ```html
- <button class="dropdown-toggle" ...>
- ```
- After:
- ```html
- <button class="dropdown-toggle" dropdown-toggle ...>
- ```
-
-
-# 0.11.2 (2014-09-26)
-
-Revert breaking change in **dropdown** ([1a998c4](http://github.com/angular-ui/bootstrap/commit/1a998c4))
-
-# 0.11.1 (2014-09-26)
-
-## Features
-
-- **modal:**
- - add backdropClass option, similar to windowClass option ([353e6127](http://github.com/angular-ui/bootstrap/commit/353e6127))
- - support alternative controllerAs syntax ([8d7c2a26](http://github.com/angular-ui/bootstrap/commit/8d7c2a26))
- - allow templateUrl to be a function ([990015fb](http://github.com/angular-ui/bootstrap/commit/990015fb))
-
-## Bug Fixes
-
-- **alert:**
- - correct binding of alert type class ([aa188aec](http://github.com/angular-ui/bootstrap/commit/aa188aec))
-- **dateparser:**
- - do not parse if no format specified ([42cc3f26](http://github.com/angular-ui/bootstrap/commit/42cc3f26))
-- **datepicker:**
- - correct `datepicker-mode` binding for popup ([63ae06c9](http://github.com/angular-ui/bootstrap/commit/63ae06c9))
- - memory leak fix for datepicker ([08c150e1](http://github.com/angular-ui/bootstrap/commit/08c150e1))
-- **dropdown:**
- - close after selecting an item ([3ac3b487](http://github.com/angular-ui/bootstrap/commit/3ac3b487))
- - remove `C` restrictions to avoid conflicts ([7512b93f](http://github.com/angular-ui/bootstrap/commit/7512b93f))
-- **modal:**
- - allow modal.{dismiss,close} to be called again ([1590920c](http://github.com/angular-ui/bootstrap/commit/1590920c))
- - add a work-around for transclusion scope ([0b31e865](http://github.com/angular-ui/bootstrap/commit/0b31e865))
- - allow in-lined controller-as controllers ([79105368](http://github.com/angular-ui/bootstrap/commit/79105368))
- - respect autofocus on child elements ([e62ab94a](http://github.com/angular-ui/bootstrap/commit/e62ab94a))
- - controllerAs not checked ([7b7cdf84](http://github.com/angular-ui/bootstrap/commit/7b7cdf84))
-- **tabs:**
- - remove leading newline from a template ([a708fe6d](http://github.com/angular-ui/bootstrap/commit/a708fe6d))
-- **typeahead:**
- - timeout cancellation when deleting characters ([5dc57927](http://github.com/angular-ui/bootstrap/commit/5dc57927))
- - allow multiple line expression ([c7db0df4](http://github.com/angular-ui/bootstrap/commit/c7db0df4))
- - replace ng-if with ng-show in matches popup ([a0be450d](http://github.com/angular-ui/bootstrap/commit/a0be450d))
-
-# 0.11.0 (2014-05-01)
-
-## Features
-
-- **accordion:**
- - support `is-disabled` state ([9c43ae7c](http://github.com/angular-ui/bootstrap/commit/9c43ae7c))
-- **alert:**
- - add WAI-ARIA markup ([9a2638bf](http://github.com/angular-ui/bootstrap/commit/9a2638bf))
-- **button:**
- - allow uncheckable radio button ([82df4fb1](http://github.com/angular-ui/bootstrap/commit/82df4fb1))
-- **carousel:**
- - Support swipe for touchscreen devices ([85140f84](http://github.com/angular-ui/bootstrap/commit/85140f84))
-- **dateParser:**
- - add `dateParser` service ([bd2ae0ee](http://github.com/angular-ui/bootstrap/commit/bd2ae0ee))
-- **datepicker:**
- - add `datepicker-mode`, `init-date` & today hint ([7f4b40eb](http://github.com/angular-ui/bootstrap/commit/7f4b40eb))
- - make widget accessible ([2423f6d4](http://github.com/angular-ui/bootstrap/commit/2423f6d4))
- - full six-week calendar ([b0b14343](http://github.com/angular-ui/bootstrap/commit/b0b14343))
-- **dropdown:**
- - add WAI-ARIA attributes ([22ebd230](http://github.com/angular-ui/bootstrap/commit/22ebd230))
- - focus toggle element when opening or closing with Esc` ([f715d052](http://github.com/angular-ui/bootstrap/commit/f715d052))
-- **dropdownToggle:**
- - support programmatic trigger & toggle callback ([ae31079c](http://github.com/angular-ui/bootstrap/commit/ae31079c))
- - add support for `escape` key ([1417c548](http://github.com/angular-ui/bootstrap/commit/1417c548))
-- **modal:**
- - support custom template for modal window ([96def3d6](http://github.com/angular-ui/bootstrap/commit/96def3d6))
- - support modal window sizes ([976f6083](http://github.com/angular-ui/bootstrap/commit/976f6083))
- - improve accessibility - add role='dialog' ([60cee9dc](http://github.com/angular-ui/bootstrap/commit/60cee9dc))
-- **pagination:**
- - plug into `ngModel` controller ([d65901cf](http://github.com/angular-ui/bootstrap/commit/d65901cf))
-- **progressbar:**
- - make widget accessible ([9dfe3157](http://github.com/angular-ui/bootstrap/commit/9dfe3157))
-- **rating:**
- - plug into `ngModel` controller ([47e227f6](http://github.com/angular-ui/bootstrap/commit/47e227f6))
- - make widget accessible ([4f56e60e](http://github.com/angular-ui/bootstrap/commit/4f56e60e))
-- **tooltip:**
- - support more positioning options ([3704db9a](http://github.com/angular-ui/bootstrap/commit/3704db9a))
-- **typeahead:**
- - add WAI-ARIA markup ([5ca23e97](http://github.com/angular-ui/bootstrap/commit/5ca23e97))
- - add `aria-owns` & `aria-activedescendant` roles ([4c76a858](http://github.com/angular-ui/bootstrap/commit/4c76a858))
-
-## Bug Fixes
-
-- **alert:**
- - use interpolation for type attribute ([f0a129ad](http://github.com/angular-ui/bootstrap/commit/f0a129ad))
- - add `alert-dismissable` class ([794954af](http://github.com/angular-ui/bootstrap/commit/794954af))
-- **carousel:**
- - correct glyphicon ([3b6ab25b](http://github.com/angular-ui/bootstrap/commit/3b6ab25b))
-- **datepicker:**
- - remove unneeded date creation ([68cb2e5a](http://github.com/angular-ui/bootstrap/commit/68cb2e5a))
- - `Today` button should not set time ([e1993491](http://github.com/angular-ui/bootstrap/commit/e1993491))
- - mark input field as invalid if the date is invalid ([467dd159](http://github.com/angular-ui/bootstrap/commit/467dd159))
- - rename `dateFormat` to `datepickerPopup` in datepickerPopupConfig ([93da30d5](http://github.com/angular-ui/bootstrap/commit/93da30d5))
- - parse input using dateParser ([e0eb1bce](http://github.com/angular-ui/bootstrap/commit/e0eb1bce))
-- **dropdown:**
- - use $animate for adding and removing classes ([e8d5fefc](http://github.com/angular-ui/bootstrap/commit/e8d5fefc))
- - unbind toggle element event on scope destroy ([890e2d37](http://github.com/angular-ui/bootstrap/commit/890e2d37))
- - do not call `on-toggle` initially ([004dd1de](http://github.com/angular-ui/bootstrap/commit/004dd1de))
- - ensure `on-toggle` works when `is-open` is not used ([06ad3bd5](http://github.com/angular-ui/bootstrap/commit/06ad3bd5))
-- **modal:**
- - destroy modal scope after animation end ([dfc36fd9](http://github.com/angular-ui/bootstrap/commit/dfc36fd9))
- - backdrop z-index when stacking modals ([94a7f593](http://github.com/angular-ui/bootstrap/commit/94a7f593))
- - give a reason of rejection when escape key pressed ([cb31b875](http://github.com/angular-ui/bootstrap/commit/cb31b875))
- - prevent default event when closing via escape key ([da951222](http://github.com/angular-ui/bootstrap/commit/da951222))
- - toggle 'modal-open' class after animation ([4d641ca7](http://github.com/angular-ui/bootstrap/commit/4d641ca7))
-- **pagination:**
- - take maxSize defaults into account ([a294c87f](http://github.com/angular-ui/bootstrap/commit/a294c87f))
-- **position:**
- - remove deprecated body scrollTop and scrollLeft ([1ba07c1b](http://github.com/angular-ui/bootstrap/commit/1ba07c1b))
-- **progressbar:**
- - allow fractional values for bar width ([0daa7a74](http://github.com/angular-ui/bootstrap/commit/0daa7a74))
- - number filter in bar template and only for percent ([378a9337](http://github.com/angular-ui/bootstrap/commit/378a9337))
-- **tabs:**
- - fire deselect before select callback ([7474c47b](http://github.com/angular-ui/bootstrap/commit/7474c47b))
- - use interpolation for type attribute ([83ceb78a](http://github.com/angular-ui/bootstrap/commit/83ceb78a))
- - remove `tabbable` class required for left/right tabs ([19468331](http://github.com/angular-ui/bootstrap/commit/19468331))
-- **timepicker:**
- - evaluate correctly the `readonly-input` attribute ([f9b6c496](http://github.com/angular-ui/bootstrap/commit/f9b6c496))
-- **tooltip:**
- - animation causes tooltip to hide on show ([2b429f5d](http://github.com/angular-ui/bootstrap/commit/2b429f5d))
-- **typeahead:**
- - correctly handle append to body attribute ([10785736](http://github.com/angular-ui/bootstrap/commit/10785736))
- - correctly higlight numeric matches ([09678b12](http://github.com/angular-ui/bootstrap/commit/09678b12))
- - loading callback updates after blur ([6a830116](http://github.com/angular-ui/bootstrap/commit/6a830116))
- - incompatibility with ng-focus ([d0024931](http://github.com/angular-ui/bootstrap/commit/d0024931))
-
-## Breaking Changes
-
-- **alert:**
- Use interpolation for type attribute.
-
- Before:
-
- ```html
- <alert type="'info'" ...></alert >
- ```
- or
- ```html
- <alert type="alert.type" ...></alert >
- ```
-
- After:
-
- ```html
- <alert type="info" ...></alert >
- ```
- or
- ```html
- <alert type="{{alert.type}}" ...></alert >
- ```
-
-- **datepicker:**
-
-`show-weeks` is no longer a watched attribute
-`*-format` attributes have been renamed to `format-*`
-`min` attribute has been renamed to `min-date`
-`max` attribute has been renamed to `max-date`
-`Open on focus` has been removed. Read more on this ([comment](https://github.com/angular-ui/bootstrap/pull/1922#issuecomment-40491716)).
-`dateFormat` renamed to `datepickerPopup` in datepickerPopupConfig
-
-- **dropdown:**
-
- Elements with the `dropdown-toggle` directive must have a parent element with the `dropdown` directive.
-
-- **pagination:**
-
- Both `pagination` and `pager` are now integrated with `ngModelController`.
- * `page` is replaced from `ng-model`.
- * `on-select-page` is removed since `ng-change` can now be used.
-
- Before:
-
- ```html
- <pagination page="current" on-select-page="changed(page)" ...></pagination>
- ```
-
- After:
-
- ```html
- <pagination ng-model="current" ng-change="changed()" ...></pagination>
- ```
-
-- **rating:**
- `rating` is now integrated with `ngModelController`.
- * `value` is replaced from `ng-model`.
-
- Before:
-
- ```html
- <rating value="rate" ...></rating>
- ```
-
- After:
-
- ```html
- <rating ng-model="rate" ...></rating>
- ```
-
-- **tabs:**
-
- Use interpolation for type attribute.
-
- Before:
-
- ```html
- <tabset type="'pills'" ...></tabset >
- <!-- or -->
- <tabset type="navtype" ...></tabset>
- ```
-
- After:
-
- ```html
- <tabset type="pills" ...></tabset>
- <!-- or -->
- <tabset type="{{navtype}}" ...></tabset>
- ```
-
-# 0.10.0 (2014-01-13)
-
-_This release adds AngularJS 1.2 support_
-
-## Features
-
-- **modal:**
- - expose dismissAll on $modalStack ([bc8d21c1](http://github.com/angular-ui/bootstrap/commit/bc8d21c1))
-
-## Bug Fixes
-
-- **datepicker:**
- - evaluate `show-weeks` from `datepicker-options` ([92c1715f](http://github.com/angular-ui/bootstrap/commit/92c1715f))
-- **modal:**
- - leaking watchers due to scope re-use ([0754ad7b](http://github.com/angular-ui/bootstrap/commit/0754ad7b))
- - support close animation ([1933488c](http://github.com/angular-ui/bootstrap/commit/1933488c))
-- **timepicker:**
- - add correct type for meridian button ([bcf39efe](http://github.com/angular-ui/bootstrap/commit/bcf39efe))
-- **tooltip:**
- - performance and scope fixes ([c0df3201](http://github.com/angular-ui/bootstrap/commit/c0df3201))
-
-# 0.9.0 (2013-12-28)
-
-_This release adds Bootstrap3 support_
-
-## Features
-
-- **accordion:**
- - convert to bootstrap3 panel styling ([458a9bd3](http://github.com/angular-ui/bootstrap/commit/458a9bd3))
-- **carousel:**
- - some changes for Bootstrap3 ([1f632b65](http://github.com/angular-ui/bootstrap/commit/1f632b65))
-- **collapse:**
- - make collapse work with bootstrap3 ([517dff6e](http://github.com/angular-ui/bootstrap/commit/517dff6e))
-- **datepicker:**
- - update to Bootstrap 3 ([37684330](http://github.com/angular-ui/bootstrap/commit/37684330))
-- **modal:**
- - added bootstrap3 support ([444c488d](http://github.com/angular-ui/bootstrap/commit/444c488d))
-- **pagination:**
- - support bootstrap3 ([3db699d7](http://github.com/angular-ui/bootstrap/commit/3db699d7))
-- **progressbar:**
- - update to bootstrap3 ([5bcff623](http://github.com/angular-ui/bootstrap/commit/5bcff623))
-- **rating:**
- - update rating to bootstrap3 ([7e60284e](http://github.com/angular-ui/bootstrap/commit/7e60284e))
-- **tabs:**
- - add nav-justified ([3199dd88](http://github.com/angular-ui/bootstrap/commit/3199dd88))
-- **timepicker:**
- - restyled for bootstrap 3 ([6724a721](http://github.com/angular-ui/bootstrap/commit/6724a721))
-- **typeahead:**
- - update to Bootstrap 3 ([eadf934a](http://github.com/angular-ui/bootstrap/commit/eadf934a))
-
-## Bug Fixes
-
-- **alert:**
- - update template to Bootstrap 3 ([dfc3b0bd](http://github.com/angular-ui/bootstrap/commit/dfc3b0bd))
-- **collapse:**
- - Prevent consecutive transitions & tidy up code ([b0032d68](http://github.com/angular-ui/bootstrap/commit/b0032d68))
- - fixes after rebase ([dc02ad1d](http://github.com/angular-ui/bootstrap/commit/dc02ad1d))
-- **rating:**
- - user glyhicon classes ([d221d517](http://github.com/angular-ui/bootstrap/commit/d221d517))
-- **timepicker:**
- - fix look with bootstrap3 ([9613b61b](http://github.com/angular-ui/bootstrap/commit/9613b61b))
-- **tooltip:**
- - re-position tooltip after draw ([a99b3608](http://github.com/angular-ui/bootstrap/commit/a99b3608))
-
-# 0.8.0 (2013-12-28)
-
-## Features
-
-- **datepicker:**
- - option whether to display button bar in popup ([4d158e0d](http://github.com/angular-ui/bootstrap/commit/4d158e0d))
-- **modal:**
- - add modal-open class to body on modal open ([e76512fa](http://github.com/angular-ui/bootstrap/commit/e76512fa))
-- **progressbar:**
- - add `max` attribute & support transclusion ([365573ab](http://github.com/angular-ui/bootstrap/commit/365573ab))
-- **timepicker:**
- - default meridian labels based on locale ([8b1ab79a](http://github.com/angular-ui/bootstrap/commit/8b1ab79a))
-- **typeahead:**
- - add typeahead-append-to-body option ([dd8eac22](http://github.com/angular-ui/bootstrap/commit/dd8eac22))
-
-## Bug Fixes
-
-- **accordion:**
- - correct `is-open` handling for dynamic groups ([9ec21286](http://github.com/angular-ui/bootstrap/commit/9ec21286))
-- **carousel:**
- - cancel timer on scope destruction ([5b9d929c](http://github.com/angular-ui/bootstrap/commit/5b9d929c))
- - cancel goNext on scope destruction ([7515df45](http://github.com/angular-ui/bootstrap/commit/7515df45))
-- **collapse:**
- - dont animate height changes from 0 to 0 ([81e014a8](http://github.com/angular-ui/bootstrap/commit/81e014a8))
-- **datepicker:**
- - set default zero time after no date selected ([93cd0df8](http://github.com/angular-ui/bootstrap/commit/93cd0df8))
- - fire `ngChange` on today/clear button press ([6b1c68fb](http://github.com/angular-ui/bootstrap/commit/6b1c68fb))
- - remove datepicker's popup on scope destroy ([48955d69](http://github.com/angular-ui/bootstrap/commit/48955d69))
- - remove edge case position updates ([1fbcb5d6](http://github.com/angular-ui/bootstrap/commit/1fbcb5d6))
-- **modal:**
- - put backdrop in before window ([d64f4a97](http://github.com/angular-ui/bootstrap/commit/d64f4a97))
- - grab reference to body when it is needed in lieu of when the factory is created ([dd415a98](http://github.com/angular-ui/bootstrap/commit/dd415a98))
- - focus freshly opened modal ([709e679c](http://github.com/angular-ui/bootstrap/commit/709e679c))
- - properly animate backdrops on each modal opening ([672a557a](http://github.com/angular-ui/bootstrap/commit/672a557a))
-- **tabs:**
- - make nested tabs work ([c9acebbe](http://github.com/angular-ui/bootstrap/commit/c9acebbe))
-- **tooltip:**
- - update tooltip content when empty ([60515ae1](http://github.com/angular-ui/bootstrap/commit/60515ae1))
- - support IE8 ([5dd98238](http://github.com/angular-ui/bootstrap/commit/5dd98238))
- - unbind element events on scope destroy ([3fe7aa8c](http://github.com/angular-ui/bootstrap/commit/3fe7aa8c))
- - respect animate attribute ([54e614a8](http://github.com/angular-ui/bootstrap/commit/54e614a8))
-
-## Breaking Changes
-
-- **progressbar:**
- The onFull/onEmpty handlers & auto/stacked types have been removed.
-
- To migrate your code change your markup like below.
-
- Before:
-
-```html
- <progress percent="var" class="progress-warning"></progress>
-```
-
- After:
-
-```html
- <progressbar value="var" type="warning"></progressbar>
-```
-
- and for stacked instead of passing array/objects you can do:
-
-```html
- <progress><bar ng-repeat="obj in objs" value="obj.var" type="{{obj.type}}"></bar></progress>
-```
-
-# 0.7.0 (2013-11-22)
-
-## Features
-
-- **datepicker:**
- - add i18n support for bar buttons in popup ([c6ba8d7f](http://github.com/angular-ui/bootstrap/commit/c6ba8d7f))
- - dynamic date format for popup ([aa3eaa91](http://github.com/angular-ui/bootstrap/commit/aa3eaa91))
- - datepicker-append-to-body attribute ([0cdc4609](http://github.com/angular-ui/bootstrap/commit/0cdc4609))
-- **dropdownToggle:**
- - disable dropdown when it has the disabled class ([104bdd1b](http://github.com/angular-ui/bootstrap/commit/104bdd1b))
-- **tooltip:**
- - add ability to enable / disable tooltip ([5d9bd058](http://github.com/angular-ui/bootstrap/commit/5d9bd058))
-
-## Bug Fixes
-
-- **accordion:**
- - assign `is-open` to correct scope ([157f614a](http://github.com/angular-ui/bootstrap/commit/157f614a))
-- **collapse:**
- - remove element height watching ([a72c635c](http://github.com/angular-ui/bootstrap/commit/a72c635c))
- - add the "in" class for expanded panels ([9eca35a8](http://github.com/angular-ui/bootstrap/commit/9eca35a8))
-- **datepicker:**
- - some IE8 compatibility improvements ([4540476f](http://github.com/angular-ui/bootstrap/commit/4540476f))
- - set popup initial position in append-to-body case ([78a1e9d7](http://github.com/angular-ui/bootstrap/commit/78a1e9d7))
- - properly handle showWeeks config option ([570dba90](http://github.com/angular-ui/bootstrap/commit/570dba90))
-- **modal:**
- - correctly close modals with no backdrop ([e55c2de3](http://github.com/angular-ui/bootstrap/commit/e55c2de3))
-- **pagination:**
- - fix altering of current page caused by totals change ([81164dae](http://github.com/angular-ui/bootstrap/commit/81164dae))
- - handle extreme values for `total-items` ([8ecf93ed](http://github.com/angular-ui/bootstrap/commit/8ecf93ed))
-- **position:**
- - correct positioning for SVG elements ([968e5407](http://github.com/angular-ui/bootstrap/commit/968e5407))
-- **tabs:**
- - initial tab selection ([a08173ec](http://github.com/angular-ui/bootstrap/commit/a08173ec))
-- **timepicker:**
- - use html5 for input elements ([53709f0f](http://github.com/angular-ui/bootstrap/commit/53709f0f))
-- **tooltip:**
- - restore html-unsafe compatibility with AngularJS 1.2 ([08d8b21d](http://github.com/angular-ui/bootstrap/commit/08d8b21d))
- - hide tooltips when content becomes empty ([cf5c27ae](http://github.com/angular-ui/bootstrap/commit/cf5c27ae))
- - tackle DOM node and event handlers leak ([0d810acd](http://github.com/angular-ui/bootstrap/commit/0d810acd))
-- **typeahead:**
- - do not set editable error when input is empty ([006986db](http://github.com/angular-ui/bootstrap/commit/006986db))
- - remove popup flickering ([dde804b6](http://github.com/angular-ui/bootstrap/commit/dde804b6))
- - don't show matches if an element is not focused ([d1f94530](http://github.com/angular-ui/bootstrap/commit/d1f94530))
- - fix loading callback when deleting characters ([0149eff6](http://github.com/angular-ui/bootstrap/commit/0149eff6))
- - prevent accidental form submission on ENTER ([253c49ff](http://github.com/angular-ui/bootstrap/commit/253c49ff))
- - evaluate matches source against a correct scope ([fd21214d](http://github.com/angular-ui/bootstrap/commit/fd21214d))
- - support IE8 ([0e9f9980](http://github.com/angular-ui/bootstrap/commit/0e9f9980))
-
-# 0.6.0 (2013-09-08)
-
-## Features
-
-- **modal:**
- - rewrite $dialog as $modal ([d7a48523](http://github.com/angular-ui/bootstrap/commit/d7a48523))
- - add support for custom window settings ([015625d1](http://github.com/angular-ui/bootstrap/commit/015625d1))
- - expose $close and $dismiss options on modal's scope ([8d153acb](http://github.com/angular-ui/bootstrap/commit/8d153acb))
-- **pagination:**
- - `total-items` & optional `items-per-page` API ([e55d9063](http://github.com/angular-ui/bootstrap/commit/e55d9063))
-- **rating:**
- - add support for custom icons per instance ([20ab01ad](http://github.com/angular-ui/bootstrap/commit/20ab01ad))
-- **timepicker:**
- - plug into `ngModel` controller ([b08e993f](http://github.com/angular-ui/bootstrap/commit/b08e993f))
-
-## Bug Fixes
-
-- **carousel:**
- - correct reflow triggering on FFox and Safari ([d34f2de1](http://github.com/angular-ui/bootstrap/commit/d34f2de1))
-- **datepicker:**
- - correctly manage focus without jQuery present ([d474824b](http://github.com/angular-ui/bootstrap/commit/d474824b))
- - compatibility with angular 1.1.5 and no jquery ([bf30898d](http://github.com/angular-ui/bootstrap/commit/bf30898d))
- - use $setViewValue for inner changes ([dd99f35d](http://github.com/angular-ui/bootstrap/commit/dd99f35d))
-- **modal:**
- - insert backdrop before modal window ([d870f212](http://github.com/angular-ui/bootstrap/commit/d870f212))
- - ie8 fix after $modal rewrite ([ff9d969e](http://github.com/angular-ui/bootstrap/commit/ff9d969e))
- - opening a modal should not change default options ([82532d1b](http://github.com/angular-ui/bootstrap/commit/82532d1b))
- - backdrop should cover previously opened modals ([7fce2fe8](http://github.com/angular-ui/bootstrap/commit/7fce2fe8))
- - allow replacing object with default options ([8e7fbf06](http://github.com/angular-ui/bootstrap/commit/8e7fbf06))
-- **position:**
- - fallback for IE8's scrollTop/Left for offset ([9aecd4ed](http://github.com/angular-ui/bootstrap/commit/9aecd4ed))
-- **tabs:**
- - add DI array-style annotations ([aac4a0dd](http://github.com/angular-ui/bootstrap/commit/aac4a0dd))
- - evaluate `vertical` on parent scope ([9af6f96e](http://github.com/angular-ui/bootstrap/commit/9af6f96e))
-- **timepicker:**
- - add type attribute for meridian button ([1f89fd4b](http://github.com/angular-ui/bootstrap/commit/1f89fd4b))
-- **tooltip:**
- - remove placement='mouse' option ([17163c22](http://github.com/angular-ui/bootstrap/commit/17163c22))
-- **typeahead:**
- - fix label rendering for equal model and items names ([5de71216](http://github.com/angular-ui/bootstrap/commit/5de71216))
- - set validity flag for non-editable inputs ([366e0c8a](http://github.com/angular-ui/bootstrap/commit/366e0c8a))
- - plug in front of existing parsers ([80cef614](http://github.com/angular-ui/bootstrap/commit/80cef614))
- - highlight return match if no query ([45dd9be1](http://github.com/angular-ui/bootstrap/commit/45dd9be1))
- - keep pop-up on clicking input ([5f9e270d](http://github.com/angular-ui/bootstrap/commit/5f9e270d))
- - remove dependency on ng-bind-html-unsafe ([75893393](http://github.com/angular-ui/bootstrap/commit/75893393))
-
-## Breaking Changes
-
-- **modal:**
-
-* `$dialog` service was refactored into `$modal`
-* `modal` directive was removed - use the `$modal` service instead
-
-Check the documentation for the `$modal` service to migrate from `$dialog`
-
-- **pagination:**
- API has undergone some changes in order to be easier to use.
- * `current-page` is replaced from `page`.
- * Number of pages is not defined by `num-pages`, but from `total-items` &
- `items-per-page` instead. If `items-per-page` is missing, default is 10.
- * `num-pages` still exists but is just readonly.
-
- Before:
-
-```html
- <pagination num-pages="10" ...></pagination>
-```
-
- After:
-
-```html
- <pagination total-items="100" ...></pagination>
-```
-
-- **tooltip:**
-
-
-The placment='mouse' is gone with no equivalent
-
-# 0.5.0 (2013-08-04)
-
-## Features
-
-- **buttons:**
- - support dynamic true / false values in btn-checkbox ([3e30cd94](http://github.com/angular-ui/bootstrap/commit/3e30cd94))
-- **datepicker:**
- - `ngModelController` plug & new `datepickerPopup` ([dab18336](http://github.com/angular-ui/bootstrap/commit/dab18336))
-- **rating:**
- - added onHover and onLeave. ([5b1115e3](http://github.com/angular-ui/bootstrap/commit/5b1115e3))
-- **tabs:**
- - added onDeselect callback, used similarly as onSelect ([fe47c9bb](http://github.com/angular-ui/bootstrap/commit/fe47c9bb))
- - add the ability to set the direction of the tabs ([220e7b60](http://github.com/angular-ui/bootstrap/commit/220e7b60))
-- **typeahead:**
- - support custom templates for matched items ([e2238174](http://github.com/angular-ui/bootstrap/commit/e2238174))
- - expose index to custom templates ([5ffae83d](http://github.com/angular-ui/bootstrap/commit/5ffae83d))
-
-## Bug Fixes
-
-- **datepicker:**
- - handle correctly `min`/`max` when cleared ([566bdd16](http://github.com/angular-ui/bootstrap/commit/566bdd16))
- - add type attribute for buttons ([25caf5fb](http://github.com/angular-ui/bootstrap/commit/25caf5fb))
-- **pagination:**
- - handle `currentPage` number as string ([b1fa7bb8](http://github.com/angular-ui/bootstrap/commit/b1fa7bb8))
- - use interpolation for text attributes ([f45815cb](http://github.com/angular-ui/bootstrap/commit/f45815cb))
-- **popover:**
- - don't unbind event handlers created by other directives ([56f624a2](http://github.com/angular-ui/bootstrap/commit/56f624a2))
- - correctly position popovers appended to body ([93a82af0](http://github.com/angular-ui/bootstrap/commit/93a82af0))
-- **rating:**
- - evaluate `max` attribute on parent scope ([60619d51](http://github.com/angular-ui/bootstrap/commit/60619d51))
-- **tabs:**
- - make tab contents be correctly connected to parent (#524) ([be7ecff0](http://github.com/angular-ui/bootstrap/commit/be7ecff0))
- - Make tabset template correctly use tabset attributes (#584) ([8868f236](http://github.com/angular-ui/bootstrap/commit/8868f236))
- - fix tab content compiling wrong (Closes #599, #631, #574) ([224bc2f5](http://github.com/angular-ui/bootstrap/commit/224bc2f5))
- - make tabs added with active=true be selected ([360cd5ca](http://github.com/angular-ui/bootstrap/commit/360cd5ca))
- - if tab is active at start, always select it ([ba1f741d](http://github.com/angular-ui/bootstrap/commit/ba1f741d))
-- **timepicker:**
- - prevent date change ([ee741707](http://github.com/angular-ui/bootstrap/commit/ee741707))
- - added wheel event to enable mousewheel on Firefox ([8dc92afa](http://github.com/angular-ui/bootstrap/commit/8dc92afa))
-- **tooltip:**
- - fix positioning inside scrolling element ([63ae7e12](http://github.com/angular-ui/bootstrap/commit/63ae7e12))
- - triggers should be local to tooltip instances ([58e8ef4f](http://github.com/angular-ui/bootstrap/commit/58e8ef4f))
- - correctly handle initial events unbinding ([4fd5bf43](http://github.com/angular-ui/bootstrap/commit/4fd5bf43))
- - bind correct 'hide' event handler ([d50b0547](http://github.com/angular-ui/bootstrap/commit/d50b0547))
-- **typeahead:**
- - play nicelly with existing formatters ([d2df0b35](http://github.com/angular-ui/bootstrap/commit/d2df0b35))
- - properly render initial input value ([c4e169cb](http://github.com/angular-ui/bootstrap/commit/c4e169cb))
- - separate text field rendering and drop down rendering ([ea1e858a](http://github.com/angular-ui/bootstrap/commit/ea1e858a))
- - fixed waitTime functionality ([90a8aa79](http://github.com/angular-ui/bootstrap/commit/90a8aa79))
- - correctly close popup on match selection ([624fd5f5](http://github.com/angular-ui/bootstrap/commit/624fd5f5))
-
-## Breaking Changes
-
-- **pagination:**
- The 'first-text', 'previous-text', 'next-text' and 'last-text'
- attributes are now interpolated.
-
- To migrate your code, remove quotes for constant attributes and/or
- interpolate scope variables.
-
- Before:
-
-```html
- <pagination first-text="'<<'" ...></pagination>
-```
- and/or
-
-```html
- $scope.var1 = '<<';
- <pagination first-text="var1" ...></pagination>
-```
- After:
-
-```html
- <pagination first-text="<<" ...></pagination>
-```
- and/or
-
-```html
- $scope.var1 = '<<';
- <pagination first-text="{{var1}}" ...></pagination>
-```
-
-# 0.4.0 (2013-06-24)
-
-## Features
-
-- **buttons:**
- - support dynamic values in btn-radio ([e8c5b548](http://github.com/angular-ui/bootstrap/commit/e8c5b548))
-- **carousel:**
- - add option to prevent pause ([5f895c13](http://github.com/angular-ui/bootstrap/commit/5f895c13))
-- **datepicker:**
- - add datepicker directive ([30a00a07](http://github.com/angular-ui/bootstrap/commit/30a00a07))
-- **pagination:**
- - option for different mode when maxSize ([a023d082](http://github.com/angular-ui/bootstrap/commit/a023d082))
- - add pager directive ([d9526475](http://github.com/angular-ui/bootstrap/commit/d9526475))
-- **tabs:**
- - Change directive name, add features ([c5326595](http://github.com/angular-ui/bootstrap/commit/c5326595))
- - support disabled state ([2b78dd16](http://github.com/angular-ui/bootstrap/commit/2b78dd16))
- - add support for vertical option ([88d17a75](http://github.com/angular-ui/bootstrap/commit/88d17a75))
- - add support for other navigation types, like 'pills' ([53e0a39f](http://github.com/angular-ui/bootstrap/commit/53e0a39f))
-- **timepicker:**
- - add timepicker directive ([9bc5207b](http://github.com/angular-ui/bootstrap/commit/9bc5207b))
-- **tooltip:**
- - add mouse placement option ([ace7bc60](http://github.com/angular-ui/bootstrap/commit/ace7bc60))
- - add *-append-to-body attribute ([d0896263](http://github.com/angular-ui/bootstrap/commit/d0896263))
- - add custom trigger support ([dfa53155](http://github.com/angular-ui/bootstrap/commit/dfa53155))
-- **typeahead:**
- - support typeahead-on-select callback ([91ac17c9](http://github.com/angular-ui/bootstrap/commit/91ac17c9))
- - support wait-ms option ([7f35a3f2](http://github.com/angular-ui/bootstrap/commit/7f35a3f2))
-
-## Bug Fixes
-
-- **accordion:**
- - allow accordion heading directives as attributes. ([25f6e55c](http://github.com/angular-ui/bootstrap/commit/25f6e55c))
-- **carousel:**
- - do not allow user to change slide if transitioning ([1d19663f](http://github.com/angular-ui/bootstrap/commit/1d19663f))
- - make slide 'active' binding optional ([17d6c3b5](http://github.com/angular-ui/bootstrap/commit/17d6c3b5))
- - fix error with deleting multiple slides at once ([3fcb70f0](http://github.com/angular-ui/bootstrap/commit/3fcb70f0))
-- **dialog:**
- - remove dialogOpenClass to get in line with v2.3 ([f009b23f](http://github.com/angular-ui/bootstrap/commit/f009b23f))
-- **pagination:**
- - bind *-text attributes ([e1bff6b7](http://github.com/angular-ui/bootstrap/commit/e1bff6b7))
-- **progressbar:**
- - user `percent` attribute instead of `value`. ([58efec80](http://github.com/angular-ui/bootstrap/commit/58efec80))
-- **tooltip:**
- - fix positioning error when appendToBody is set to true ([76fee1f9](http://github.com/angular-ui/bootstrap/commit/76fee1f9))
- - close tooltips appended to body on location change ([041261b5](http://github.com/angular-ui/bootstrap/commit/041261b5))
- - tooltips will hide on scope.$destroy ([3e5a58e5](http://github.com/angular-ui/bootstrap/commit/3e5a58e5))
- - support of custom $interpolate.startSymbol ([88c94ee6](http://github.com/angular-ui/bootstrap/commit/88c94ee6))
- - make sure tooltip scope is evicted from cache ([9246905a](http://github.com/angular-ui/bootstrap/commit/9246905a))
-- **typeahead:**
- - return focus to the input after selecting a suggestion ([04a21e33](http://github.com/angular-ui/bootstrap/commit/04a21e33))
-
-## Breaking Changes
-
-- **pagination:**
- The 'first-text', 'previous-text', 'next-text' and 'last-text'
- attributes are now binded to parent scope.
-
- To migrate your code, surround the text of these attributes with quotes.
-
- Before:
-
- ```html
- <pagination first-text="<<"></pagination>
- ```
-
- After:
-
- ```html
- <pagination first-text="'<<'"></pagination>
- ```
-
-- **progressbar:**
- The 'value' is replaced by 'percent'.
-
- Before:
-
- ```html
- <progress value="..."></progress>
- ```
-
- After:
-
- ```html
- <progress percent="..."></progress>
- ```
-
-- **tabs:**
- The 'tabs' directive has been renamed to 'tabset', and
- the 'pane' directive has been renamed to 'tab'.
-
- To migrate your code, follow the example below.
-
- Before:
-
- ```html
- <tabs>
- <pane heading="one">
- First Content
- </pane>
- <pane ng-repeat="apple in basket" heading="{{apple.heading}}">
- {{apple.content}}
- </pane>
- </tabs>
- ```
-
- After:
-
- ```html
- <tabset>
- <tab heading="one">
- First Content
- </tab>
- <tab ng-repeat="apple in basket" heading="{{apple.heading}}">
- {{apple.content}}
- </tab>
- </tabset>
- ```
-
-
-# 0.3.0 (2013-04-30)
-
-## Features
-
-- **progressbar:**
- - add progressbar directive ([261f2072](https://github.com/angular-ui/bootstrap/commit/261f2072))
-- **rating:**
- - add rating directive ([6b5e6369](https://github.com/angular-ui/bootstrap/commit/6b5e6369))
-- **typeahead:**
- - support the editable property ([a40c3fbe](https://github.com/angular-ui/bootstrap/commit/a40c3fbe))
- - support typeahead-loading bindable expression ([b58c9c88](https://github.com/angular-ui/bootstrap/commit/b58c9c88))
-- **tooltip:**
- - added popup-delay option ([a79a2ba8](https://github.com/angular-ui/bootstrap/commit/a79a2ba8))
- - added appendToBody to $tooltip ([1ee467f8](https://github.com/angular-ui/bootstrap/commit/1ee467f8))
- - added tooltip-html-unsafe directive ([45ed2805](https://github.com/angular-ui/bootstrap/commit/45ed2805))
- - support for custom triggers ([b1ba821b](https://github.com/angular-ui/bootstrap/commit/b1ba821b))
-
-## Bug Fixes
-
-- **alert:**
- - don't show close button if no close callback specified ([c2645f4a](https://github.com/angular-ui/bootstrap/commit/c2645f4a))
-- **carousel:**
- - Hide navigation indicators if only one slide ([aedc0565](https://github.com/angular-ui/bootstrap/commit/aedc0565))
-- **collapse:**
- - remove reference to msTransition for IE10 ([55437b16](https://github.com/angular-ui/bootstrap/commit/55437b16))
-- **dialog:**
- - set _open to false on init ([dcc9ef31](https://github.com/angular-ui/bootstrap/commit/dcc9ef31))
- - close dialog on location change ([474ce52e](https://github.com/angular-ui/bootstrap/commit/474ce52e))
- - IE8 fix to not set data() against text nodes ([a6c540e5](https://github.com/angular-ui/bootstrap/commit/a6c540e5))
- - fix $apply in progres on $location change ([77e6acb9](https://github.com/angular-ui/bootstrap/commit/77e6acb9))
-- **tabs:**
- - remove superfluous href from tabs template ([38c1badd](https://github.com/angular-ui/bootstrap/commit/38c1badd))
-- **tooltip:**
- - fix positioning issues in tooltips and popovers ([6458f487](https://github.com/angular-ui/bootstrap/commit/6458f487))
-- **typeahead:**
- - close matches popup on click outside typeahead ([acca7dcd](https://github.com/angular-ui/bootstrap/commit/acca7dcd))
- - stop keydown event propagation when ESC pressed to discard matches ([22a00cd0](https://github.com/angular-ui/bootstrap/commit/22a00cd0))
- - correctly render initial model value ([929a46fa](https://github.com/angular-ui/bootstrap/commit/929a46fa))
- - correctly higlight matches if query contains regexp-special chars ([467afcd6](https://github.com/angular-ui/bootstrap/commit/467afcd6))
- - fix matches pop-up positioning issues ([74beecdb](https://github.com/angular-ui/bootstrap/commit/74beecdb))
-
-# 0.2.0 (2013-03-03)
-
-## Features
-
-- **dialog:**
- - Make $dialog 'resolve' property to work the same way of $routeProvider.when ([739f86f](https://github.com/angular-ui/bootstrap/commit/739f86f))
-- **modal:**
- - allow global override of modal options ([acaf72b](https://github.com/angular-ui/bootstrap/commit/acaf72b))
-- **buttons:**
- - add checkbox and radio buttons ([571ccf4](https://github.com/angular-ui/bootstrap/commit/571ccf4))
-- **carousel:**
- - add slide indicators ([3b677ee](https://github.com/angular-ui/bootstrap/commit/3b677ee))
-- **typeahead:**
- - add typeahead directive ([6a97da2](https://github.com/angular-ui/bootstrap/commit/6a97da2))
-- **accordion:**
- - enable HTML in accordion headings ([3afcaa4](https://github.com/angular-ui/bootstrap/commit/3afcaa4))
-- **pagination:**
- - add first/last link & constant congif options ([0ff0454](https://github.com/angular-ui/bootstrap/commit/0ff0454))
-
-## Bug fixes
-
-- **dialog:**
- - update resolve section to new syntax ([1f87486](https://github.com/angular-ui/bootstrap/commit/1f87486))
- - $compile entire modal ([7575b3c](https://github.com/angular-ui/bootstrap/commit/7575b3c))
-- **tooltip:**
- - don't show tooltips if there is no content to show ([030901e](https://github.com/angular-ui/bootstrap/commit/030901e))
- - fix placement issues ([a2bbf4d](https://github.com/angular-ui/bootstrap/commit/a2bbf4d))
-- **collapse:**
- - Avoids fixed height on collapse ([ff5d119](https://github.com/angular-ui/bootstrap/commit/ff5d119))
-- **accordion:**
- - fix minification issues ([f4da4d6](https://github.com/angular-ui/bootstrap/commit/f4da4d6))
-- **typeahead:**
- - update inputs value on mapping where label is not derived from the model ([a5f64de](https://github.com/angular-ui/bootstrap/commit/a5f64de))
-
-# 0.1.0 (2013-02-02)
-
-_Very first, initial release_.
-
-## Features
-
-Version `0.1.0` was released with the following directives:
-
-* accordion
-* alert
-* carousel
-* dialog
-* dropdownToggle
-* modal
-* pagination
-* popover
-* tabs
-* tooltip
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/CODE_OF_CONDUCT.md b/applications/auto-scale/gui/src/vendor/ui.bootstrap/CODE_OF_CONDUCT.md
deleted file mode 100644
index 65c05c5..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/CODE_OF_CONDUCT.md
+++ /dev/null
@@ -1,22 +0,0 @@
-# Contributor Code of Conduct
-
-As contributors and maintainers of this project, and in the interest of fostering an open and welcoming community, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities.
-
-We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, religion, or nationality.
-
-Examples of unacceptable behavior by participants include:
-
-* The use of sexualized language or imagery
-* Personal attacks
-* Trolling or insulting/derogatory comments
-* Public or private harassment
-* Publishing other's private information, such as physical or electronic addresses, without explicit permission
-* Other unethical or unprofessional conduct.
-
-Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct. By adopting this Code of Conduct, project maintainers commit themselves to fairly and consistently applying these principles to every aspect of managing this project. Project maintainers who do not follow or enforce the Code of Conduct may be permanently removed from the project team.
-
-This code of conduct applies both within project spaces and in public spaces when an individual is representing the project or its community.
-
-Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting one or more of the project maintainers.
-
-This Code of Conduct is adapted from the [Contributor Covenant](http://contributor-covenant.org), version 1.2.0, available at [http://contributor-covenant.org/version/1/2/0/](http://contributor-covenant.org/version/1/2/0/)
\ No newline at end of file
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/CONTRIBUTING.md b/applications/auto-scale/gui/src/vendor/ui.bootstrap/CONTRIBUTING.md
deleted file mode 100644
index 3bbe218..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/CONTRIBUTING.md
+++ /dev/null
@@ -1,47 +0,0 @@
-## Got a question or problem?
-
-Firstly, please go over our FAQ: https://github.com/angular-ui/bootstrap/wiki/FAQ
-
-Please, do not open issues for the general support questions as we want to keep GitHub issues for bug reports and feature requests. You've got much better chances of getting your question answered on [StackOverflow](http://stackoverflow.com/questions/tagged/angular-ui-bootstrap) where maintainers are looking at questions questions tagged with `angular-ui-bootstrap`.
-
-StackOverflow is a much better place to ask questions since:
-* there are hundreds of people willing to help on StackOverflow
-* questions and answers stay available for public viewing so your question / answer might help someone else
-* SO voting system assures that the best answers are prominently visible.
-
-To save your and our time we will be systematically closing all the issues that are requests for general support and redirecting people to StackOverflow.
-
-## You think you've found a bug?
-
-Oh, we are ashamed and want to fix it asap! But before fixing a bug we need to reproduce and confirm it. In order to reproduce bugs we will systematically ask you to provide a _minimal_ reproduce scenario using http://plnkr.co/. Having a live reproduce scenario gives us wealth of important information without going back & forth to you with additional questions like:
-* version of AngularJS used
-* version of this library that you are using
-* 3rd-party libraries used, if any
-* and most importantly - a use-case that fails
-
-A minimal reproduce scenario using http://plnkr.co/ allows us to quickly confirm a bug (or point out coding problem) as well as confirm that we are fixing the right problem.
-
-We will be insisting on a minimal reproduce scenario in order to save maintainers time and ultimately be able to fix more bugs. Interestingly, from our experience users often find coding problems themselves while preparing a minimal plunk. We understand that sometimes it might be hard to extract essentials bits of code from a larger code-base but we really need to isolate the problem before we can fix it.
-
-The best part is that you don't need to create plunks from scratch - you can use one from our [demo page](http://angular-ui.github.io/bootstrap/).
-
-Unfortunately we are not able to investigate / fix bugs without a minimal reproduce scenario using http://plnkr.co/, so if we don't hear back from you we are going to close an issue that don't have enough info to be reproduced.
-
-
-## You want to contribute some code?
-
-**NOTE: We are migrating all our components to use a prefix, in the meantime you will see both the new and the old directives separated by a comment. If you want to contribute with code, make all your changes on top of that comment.**
-
-We are always looking for the quality contributions and will be happy to accept your Pull Requests as long as those adhere to some basic rules:
-
-* Please make sure that your contribution fits well in the project's context:
- * we are aiming at rebuilding bootstrap directives in pure AngularJS, without any dependencies on any external JavaScript library;
- * the only dependency should be bootstrap CSS and its markup structure;
- * directives should be html-agnostic as much as possible which in practice means:
- * templates should be referred to using the `templateUrl` property
- * it should be easy to change a default template to a custom one
- * directives shouldn't manipulate DOM structure directly (when possible)
-* Please assure that you are submitting quality code, specifically make sure that:
- * your directive has accompanying tests and all the tests are passing; don't hesitate to contact us (angular-ui@googlegroups.com) if you need any help with unit testing
- * your PR doesn't break the build; check the Travis-CI build status after opening a PR and push corrective commits if anything goes wrong
- * your commits conform to the conventions established [here](https://github.com/ajoslin/conventional-changelog/blob/master/conventions/angular.md)
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/Gruntfile.js b/applications/auto-scale/gui/src/vendor/ui.bootstrap/Gruntfile.js
deleted file mode 100644
index 147adb4..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/Gruntfile.js
+++ /dev/null
@@ -1,492 +0,0 @@
-/* jshint node: true */
-var markdown = require('node-markdown').Markdown;
-var fs = require('fs');
-
-module.exports = function(grunt) {
-
- grunt.loadNpmTasks('grunt-contrib-watch');
- grunt.loadNpmTasks('grunt-contrib-concat');
- grunt.loadNpmTasks('grunt-contrib-copy');
- grunt.loadNpmTasks('grunt-contrib-jshint');
- grunt.loadNpmTasks('grunt-contrib-uglify');
- grunt.loadNpmTasks('grunt-html2js');
- grunt.loadNpmTasks('grunt-karma');
- grunt.loadNpmTasks('grunt-conventional-changelog');
- grunt.loadNpmTasks('grunt-ddescribe-iit');
-
- // Project configuration.
- grunt.util.linefeed = '\n';
-
- grunt.initConfig({
- ngversion: '1.4.7',
- bsversion: '3.1.1',
- modules: [],//to be filled in by build task
- pkg: grunt.file.readJSON('package.json'),
- dist: 'dist',
- filename: 'ui-bootstrap',
- filenamecustom: '<%= filename %>-custom',
- meta: {
- modules: 'angular.module("ui.bootstrap", [<%= srcModules %>]);',
- tplmodules: 'angular.module("ui.bootstrap.tpls", [<%= tplModules %>]);',
- all: 'angular.module("ui.bootstrap", ["ui.bootstrap.tpls", <%= srcModules %>]);',
- cssInclude: '',
- cssFileBanner: '/* Include this file in your html if you are using the CSP mode. */\n\n',
- cssFileDest: '<%= dist %>/<%= filename %>-<%= pkg.version %>-csp.css',
- banner: ['/*',
- ' * <%= pkg.name %>',
- ' * <%= pkg.homepage %>\n',
- ' * Version: <%= pkg.version %> - <%= grunt.template.today("yyyy-mm-dd") %>',
- ' * License: <%= pkg.license %>',
- ' */\n'].join('\n')
- },
- delta: {
- docs: {
- files: ['misc/demo/index.html'],
- tasks: ['after-test']
- },
- html: {
- files: ['template/**/*.html'],
- tasks: ['html2js', 'karma:watch:run']
- },
- js: {
- files: ['src/**/*.js'],
- //we don't need to jshint here, it slows down everything else
- tasks: ['karma:watch:run']
- }
- },
- concat: {
- dist: {
- options: {
- banner: '<%= meta.banner %><%= meta.modules %>\n',
- footer: '<%= meta.cssInclude %>'
- },
- src: [], //src filled in by build task
- dest: '<%= dist %>/<%= filename %>-<%= pkg.version %>.js'
- },
- dist_tpls: {
- options: {
- banner: '<%= meta.banner %><%= meta.all %>\n<%= meta.tplmodules %>\n',
- footer: '<%= meta.cssInclude %>'
- },
- src: [], //src filled in by build task
- dest: '<%= dist %>/<%= filename %>-tpls-<%= pkg.version %>.js'
- }
- },
- copy: {
- demohtml: {
- options: {
- //process html files with gruntfile config
- processContent: grunt.template.process
- },
- files: [{
- expand: true,
- src: ['**/*.html'],
- cwd: 'misc/demo/',
- dest: 'dist/'
- }]
- },
- demoassets: {
- files: [{
- expand: true,
- //Don't re-copy html files, we process those
- src: ['**/**/*', '!**/*.html'],
- cwd: 'misc/demo',
- dest: 'dist/'
- }]
- }
- },
- uglify: {
- options: {
- banner: '<%= meta.banner %>'
- },
- dist:{
- src:['<%= concat.dist.dest %>'],
- dest:'<%= dist %>/<%= filename %>-<%= pkg.version %>.min.js'
- },
- dist_tpls:{
- src:['<%= concat.dist_tpls.dest %>'],
- dest:'<%= dist %>/<%= filename %>-tpls-<%= pkg.version %>.min.js'
- }
- },
- html2js: {
- dist: {
- options: {
- module: null, // no bundle module for all the html2js templates
- base: '.'
- },
- files: [{
- expand: true,
- src: ['template/**/*.html'],
- ext: '.html.js'
- }]
- }
- },
- jshint: {
- files: ['Gruntfile.js','src/**/*.js'],
- options: {
- jshintrc: '.jshintrc'
- }
- },
- karma: {
- options: {
- configFile: 'karma.conf.js'
- },
- watch: {
- background: true
- },
- continuous: {
- singleRun: true
- },
- jenkins: {
- singleRun: true,
- autoWatch: false,
- colors: false,
- reporters: ['dots', 'junit'],
- browsers: ['Chrome', 'ChromeCanary', 'Firefox', 'Opera', '/Users/jenkins/bin/safari.sh']
- },
- travis: {
- singleRun: true,
- autoWatch: false,
- reporters: ['dots'],
- browsers: ['Firefox']
- },
- coverage: {
- preprocessors: {
- 'src/*/*.js': 'coverage'
- },
- reporters: ['progress', 'coverage']
- }
- },
- conventionalChangelog: {
- options: {
- changelogOpts: {
- preset: 'angular'
- },
- templateFile: 'misc/changelog.tpl.md'
- },
- release: {
- src: 'CHANGELOG.md'
- }
- },
- shell: {
- //We use %version% and evluate it at run-time, because <%= pkg.version %>
- //is only evaluated once
- 'release-prepare': [
- 'grunt before-test after-test',
- 'grunt version', //remove "-SNAPSHOT"
- 'grunt conventionalChangelog'
- ],
- 'release-complete': [
- 'git commit CHANGELOG.md package.json -m "chore(release): v%version%"',
- 'git tag %version%'
- ],
- 'release-start': [
- 'grunt version:minor:"SNAPSHOT"',
- 'git commit package.json -m "chore(release): Starting v%version%"'
- ]
- },
- 'ddescribe-iit': {
- files: [
- 'src/**/*.spec.js'
- ]
- }
- });
-
- //register before and after test tasks so we've don't have to change cli
- //options on the google's CI server
- grunt.registerTask('before-test', ['enforce', 'ddescribe-iit', 'jshint', 'html2js']);
- grunt.registerTask('after-test', ['build', 'copy']);
-
- //Rename our watch task to 'delta', then make actual 'watch'
- //task build things, then start test server
- grunt.renameTask('watch', 'delta');
- grunt.registerTask('watch', ['before-test', 'after-test', 'karma:watch', 'delta']);
-
- // Default task.
- grunt.registerTask('default', ['before-test', 'test', 'after-test']);
-
- grunt.registerTask('enforce', 'Install commit message enforce script if it doesn\'t exist', function() {
- if (!grunt.file.exists('.git/hooks/commit-msg')) {
- grunt.file.copy('misc/validate-commit-msg.js', '.git/hooks/commit-msg');
- require('fs').chmodSync('.git/hooks/commit-msg', '0755');
- }
- });
-
- //Common ui.bootstrap module containing all modules for src and templates
- //findModule: Adds a given module to config
- var foundModules = {};
- function findModule(name) {
- if (foundModules[name]) { return; }
- foundModules[name] = true;
-
- function breakup(text, separator) {
- return text.replace(/[A-Z]/g, function (match) {
- return separator + match;
- });
- }
- function ucwords(text) {
- return text.replace(/^([a-z])|\s+([a-z])/g, function ($1) {
- return $1.toUpperCase();
- });
- }
- function enquote(str) {
- return '"' + str + '"';
- }
-
- var module = {
- name: name,
- moduleName: enquote('ui.bootstrap.' + name),
- displayName: ucwords(breakup(name, ' ')),
- srcFiles: grunt.file.expand('src/'+name+'/*.js'),
- cssFiles: grunt.file.expand('src/'+name+'/*.css'),
- tplFiles: grunt.file.expand('template/'+name+'/*.html'),
- tpljsFiles: grunt.file.expand('template/'+name+'/*.html.js'),
- tplModules: grunt.file.expand('template/'+name+'/*.html').map(enquote),
- dependencies: dependenciesForModule(name),
- docs: {
- md: grunt.file.expand('src/'+name+'/docs/*.md')
- .map(grunt.file.read).map(markdown).join('\n'),
- js: grunt.file.expand('src/'+name+'/docs/*.js')
- .map(grunt.file.read).join('\n'),
- html: grunt.file.expand('src/'+name+'/docs/*.html')
- .map(grunt.file.read).join('\n')
- }
- };
-
- var styles = {
- css: [],
- js: []
- };
- module.cssFiles.forEach(processCSS.bind(null, styles, true));
- if (styles.css.length) {
- module.css = styles.css.join('\n');
- module.cssJs = styles.js.join('\n');
- }
-
- module.dependencies.forEach(findModule);
- grunt.config('modules', grunt.config('modules').concat(module));
- }
-
- function dependenciesForModule(name) {
- var deps = [];
- grunt.file.expand('src/' + name + '/*.js')
- .map(grunt.file.read)
- .forEach(function(contents) {
- //Strategy: find where module is declared,
- //and from there get everything inside the [] and split them by comma
- var moduleDeclIndex = contents.indexOf('angular.module(');
- var depArrayStart = contents.indexOf('[', moduleDeclIndex);
- var depArrayEnd = contents.indexOf(']', depArrayStart);
- var dependencies = contents.substring(depArrayStart + 1, depArrayEnd);
- dependencies.split(',').forEach(function(dep) {
- if (dep.indexOf('ui.bootstrap.') > -1) {
- var depName = dep.trim().replace('ui.bootstrap.','').replace(/['"]/g,'');
- if (deps.indexOf(depName) < 0) {
- deps.push(depName);
- //Get dependencies for this new dependency
- deps = deps.concat(dependenciesForModule(depName));
- }
- }
- });
- });
- return deps;
- }
-
- grunt.registerTask('dist', 'Override dist directory', function() {
- var dir = this.args[0];
- if (dir) { grunt.config('dist', dir); }
- });
-
- grunt.registerTask('build', 'Create bootstrap build files', function() {
- var _ = grunt.util._;
-
- //If arguments define what modules to build, build those. Else, everything
- if (this.args.length) {
- this.args.forEach(findModule);
- grunt.config('filename', grunt.config('filenamecustom'));
- } else {
- grunt.file.expand({
- filter: 'isDirectory', cwd: '.'
- }, 'src/*').forEach(function(dir) {
- findModule(dir.split('/')[1]);
- });
- }
-
- var modules = grunt.config('modules');
- grunt.config('srcModules', _.pluck(modules, 'moduleName'));
- grunt.config('tplModules', _.pluck(modules, 'tplModules').filter(function(tpls) { return tpls.length > 0;} ));
- grunt.config('demoModules', modules
- .filter(function(module) {
- return module.docs.md && module.docs.js && module.docs.html;
- })
- .sort(function(a, b) {
- if (a.name < b.name) { return -1; }
- if (a.name > b.name) { return 1; }
- return 0;
- })
- );
-
- var cssStrings = _.flatten(_.compact(_.pluck(modules, 'css')));
- var cssJsStrings = _.flatten(_.compact(_.pluck(modules, 'cssJs')));
- if (cssStrings.length) {
- grunt.config('meta.cssInclude', cssJsStrings.join('\n'));
-
- grunt.file.write(grunt.config('meta.cssFileDest'), grunt.config('meta.cssFileBanner') +
- cssStrings.join('\n'));
-
- grunt.log.writeln('File ' + grunt.config('meta.cssFileDest') + ' created');
- }
-
- var moduleFileMapping = _.clone(modules, true);
- moduleFileMapping.forEach(function (module) {
- delete module.docs;
- });
-
- grunt.config('moduleFileMapping', moduleFileMapping);
-
- var srcFiles = _.pluck(modules, 'srcFiles');
- var tpljsFiles = _.pluck(modules, 'tpljsFiles');
- //Set the concat task to concatenate the given src modules
- grunt.config('concat.dist.src', grunt.config('concat.dist.src')
- .concat(srcFiles));
- //Set the concat-with-templates task to concat the given src & tpl modules
- grunt.config('concat.dist_tpls.src', grunt.config('concat.dist_tpls.src')
- .concat(srcFiles).concat(tpljsFiles));
-
- grunt.task.run(['concat', 'uglify', 'makeModuleMappingFile', 'makeRawFilesJs', 'makeVersionsMappingFile']);
- });
-
- grunt.registerTask('test', 'Run tests on singleRun karma server', function () {
- //this task can be executed in 3 different environments: local, Travis-CI and Jenkins-CI
- //we need to take settings for each one into account
- if (process.env.TRAVIS) {
- grunt.task.run('karma:travis');
- } else {
- var isToRunJenkinsTask = !!this.args.length;
- if(grunt.option('coverage')) {
- var karmaOptions = grunt.config.get('karma.options'),
- coverageOpts = grunt.config.get('karma.coverage');
- grunt.util._.extend(karmaOptions, coverageOpts);
- grunt.config.set('karma.options', karmaOptions);
- }
- grunt.task.run(this.args.length ? 'karma:jenkins' : 'karma:continuous');
- }
- });
-
- grunt.registerTask('makeModuleMappingFile', function () {
- var _ = grunt.util._;
- var moduleMappingJs = 'dist/assets/module-mapping.json';
- var moduleMappings = grunt.config('moduleFileMapping');
- var moduleMappingsMap = _.object(_.pluck(moduleMappings, 'name'), moduleMappings);
- var jsContent = JSON.stringify(moduleMappingsMap);
- grunt.file.write(moduleMappingJs, jsContent);
- grunt.log.writeln('File ' + moduleMappingJs.cyan + ' created.');
- });
-
- grunt.registerTask('makeRawFilesJs', function () {
- var _ = grunt.util._;
- var jsFilename = 'dist/assets/raw-files.json';
- var genRawFilesJs = require('./misc/raw-files-generator');
-
- genRawFilesJs(grunt, jsFilename, _.flatten(grunt.config('concat.dist_tpls.src')),
- grunt.config('meta.banner'), grunt.config('meta.cssFileBanner'));
- });
-
- grunt.registerTask('makeVersionsMappingFile', function () {
- var done = this.async();
-
- var exec = require('child_process').exec;
-
- var versionsMappingFile = 'dist/versions-mapping.json';
-
- exec('git tag --sort -version:refname', function(error, stdout, stderr) {
- // Let's remove the oldest 14 versions.
- var versions = stdout.split('\n').slice(0, -14);
- var jsContent = versions.map(function(version) {
- return {
- version: version,
- url: '/bootstrap/versioned-docs/' + version
- };
- });
- jsContent[0] = {
- version: 'Current',
- url: '/bootstrap'
- };
- grunt.file.write(versionsMappingFile, JSON.stringify(jsContent));
- grunt.log.writeln('File ' + versionsMappingFile.cyan + ' created.');
- done();
- });
-
- });
-
- /**
- * Logic from AngularJS
- * https://github.com/angular/angular.js/blob/36831eccd1da37c089f2141a2c073a6db69f3e1d/lib/grunt/utils.js#L121-L145
- */
- function processCSS(state, minify, file) {
- /* jshint quotmark: false */
- var css = fs.readFileSync(file).toString(),
- js;
- state.css.push(css);
-
- if(minify){
- css = css
- .replace(/\r?\n/g, '')
- .replace(/\/\*.*?\*\//g, '')
- .replace(/:\s+/g, ':')
- .replace(/\s*\{\s*/g, '{')
- .replace(/\s*\}\s*/g, '}')
- .replace(/\s*\,\s*/g, ',')
- .replace(/\s*\;\s*/g, ';');
- }
- //escape for js
- css = css
- .replace(/\\/g, '\\\\')
- .replace(/'/g, "\\'")
- .replace(/\r?\n/g, '\\n');
- js = "!angular.$$csp() && angular.element(document).find('head').prepend('<style type=\"text/css\">" + css + "</style>');";
- state.js.push(js);
-
- return state;
- }
-
- function setVersion(type, suffix) {
- var file = 'package.json';
- var VERSION_REGEX = /([\'|\"]version[\'|\"][ ]*:[ ]*[\'|\"])([\d|.]*)(-\w+)*([\'|\"])/;
- var contents = grunt.file.read(file);
- var version;
- contents = contents.replace(VERSION_REGEX, function(match, left, center) {
- version = center;
- if (type) {
- version = require('semver').inc(version, type);
- }
- //semver.inc strips our suffix if it existed
- if (suffix) {
- version += '-' + suffix;
- }
- return left + version + '"';
- });
- grunt.log.ok('Version set to ' + version.cyan);
- grunt.file.write(file, contents);
- return version;
- }
-
- grunt.registerTask('version', 'Set version. If no arguments, it just takes off suffix', function() {
- setVersion(this.args[0], this.args[1]);
- });
-
- grunt.registerMultiTask('shell', 'run shell commands', function() {
- var self = this;
- var sh = require('shelljs');
- self.data.forEach(function(cmd) {
- cmd = cmd.replace('%version%', grunt.file.readJSON('package.json').version);
- grunt.log.ok(cmd);
- var result = sh.exec(cmd,{silent:true});
- if (result.code !== 0) {
- grunt.fatal(result.output);
- }
- });
- });
-
- return grunt;
-};
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/LICENSE b/applications/auto-scale/gui/src/vendor/ui.bootstrap/LICENSE
deleted file mode 100644
index 18db5a5..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/LICENSE
+++ /dev/null
@@ -1,22 +0,0 @@
-The MIT License
-
-Copyright (c) 2012-2015 the AngularUI Team, https://github.com/organizations/angular-ui/teams/291112
-
-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.
-
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/README.md b/applications/auto-scale/gui/src/vendor/ui.bootstrap/README.md
deleted file mode 100644
index 10d868d..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/README.md
+++ /dev/null
@@ -1,136 +0,0 @@
-### UI Bootstrap - [AngularJS](http://angularjs.org/) directives specific to [Bootstrap](http://getbootstrap.com)
-
-[](https://gitter.im/angular-ui/bootstrap?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
-[](http://travis-ci.org/angular-ui/bootstrap)
-[](https://david-dm.org/angular-ui/bootstrap#info=devDependencies)
-
-### Quick links
-- [Demo](#demo)
-- [Angular 2](#angular-2)
-- [Installation](#installation)
- - [NPM](#install-with-npm)
- - [Bower](#install-with-bower)
- - [NuGet](#install-with-nuget)
- - [Custom](#custom-build)
- - [Manual](#manual-download)
-- [Support](#support)
- - [FAQ](#faq)
- - [Code of Conduct](#code-of-conduct)
- - [PREFIX MIGRATION GUIDE](#prefix-migration-guide)
- - [Supported browsers](#supported-browsers)
- - [Need help?](#need-help)
- - [Found a bug?](#found-a-bug)
-- [Contributing to the project](#contributing-to-the-project)
-- [Development, meeting minutes, roadmap and more.](#development-meeting-minutes-roadmap-and-more)
-
-
-# Demo
-
-Do you want to see directives in action? Visit http://angular-ui.github.io/bootstrap/!
-
-# Angular 2
-
-Are you interested in Angular 2? We are on our way! Check out [ng-bootstrap](https://github.com/ui-bootstrap/core).
-
-# Installation
-
-Installation is easy as UI Bootstrap has minimal dependencies - only the AngularJS and Twitter Bootstrap's CSS are required.
-Note: Since version 0.13.0, UI Bootstrap depends on [ngAnimate](https://docs.angularjs.org/api/ngAnimate) for transitions and animations, such as the accordion, carousel, etc. Include `ngAnimate` in the module dependencies for your app in order to enable animation.
-
-Additionally, it is strongly recommended that for UI Bootstrap 0.13.3 and higher you use Angular 1.3.18 or higher due to animation fixes.
-
-#### Install with NPM
-
-```sh
-$ npm install angular-ui-bootstrap
-```
-
-This will install AngularJS and Bootstrap NPM packages.
-
-#### Install with Bower
-```sh
-$ bower install angular-bootstrap
-```
-
-Note: do not install 'angular-ui-bootstrap'. A separate repository - [bootstrap-bower](https://github.com/angular-ui/bootstrap-bower) - hosts the compiled javascript file and bower.json.
-
-#### Install with NuGet
-To install AngularJS UI Bootstrap, run the following command in the Package Manager Console
-
-```sh
-PM> Install-Package Angular.UI.Bootstrap
-```
-
-#### Custom build
-
-Head over to http://angular-ui.github.io/bootstrap/ and hit the *Custom build* button to create your own custom UI Bootstrap build, just the way you like it.
-
-#### Manual download
-
-After downloading dependencies (or better yet, referencing them from your favorite CDN) you need to download build version of this project. All the files and their purposes are described here:
-https://github.com/angular-ui/bootstrap/tree/gh-pages#build-files
-Don't worry, if you are not sure which file to take, opt for `ui-bootstrap-tpls-[version].min.js`.
-
-### Adding dependency to your project
-
-When you are done downloading all the dependencies and project files the only remaining part is to add dependencies on the `ui.bootstrap` AngularJS module:
-
-```js
-angular.module('myModule', ['ui.bootstrap']);
-```
-
-If you're a Browserify or Webpack user, you can do:
-
-```js
-var uibs = require('angular-ui-bootstrap');
-
-angular.module('myModule', [uibs]);
-```
-
-# Support
-
-## FAQ
-
-https://github.com/angular-ui/bootstrap/wiki/FAQ
-
-# Code of Conduct
-
-Take a moment to read or [Code of Conduct](CODE_OF_CONDUCT.md)
-
-## PREFIX MIGRATION GUIDE
-
-If you're updating your application to use prefixes, please check the [migration guide](https://github.com/angular-ui/bootstrap/wiki/Migration-guide-for-prefixes).
-
-## Supported browsers
-
-Directives from this repository are automatically tested with the following browsers:
-* Chrome (stable and canary channel)
-* Firefox
-* IE 9 and 10
-* Opera
-* Safari
-
-Modern mobile browsers should work without problems.
-
-## Need help?
-Need help using UI Bootstrap?
-
-* Live help in the IRC (`#angularjs` channel at the `freenode` network). Use this [webchat](https://webchat.freenode.net/) or your own IRC client.
-* Ask a question in [StackOverflow](http://stackoverflow.com/) under the [angular-ui-bootstrap](http://stackoverflow.com/questions/tagged/angular-ui-bootstrap) tag.
-
-**Please do not create new issues in this repository to ask questions about using UI Bootstrap**
-
-## Found a bug?
-Please take a look at [CONTRIBUTING.md](CONTRIBUTING.md#you-think-youve-found-a-bug) and submit your issue [here](https://github.com/angular-ui/bootstrap/issues/new).
-
-
-----
-
-
-# Contributing to the project
-
-We are always looking for the quality contributions! Please check the [CONTRIBUTING.md](CONTRIBUTING.md) for the contribution guidelines.
-
-# Development, meeting minutes, roadmap and more.
-
-Head over to the [Wiki](https://github.com/angular-ui/bootstrap/wiki) for notes on development for UI Bootstrap, meeting minutes from the UI Bootstrap team, roadmap plans, project philosophy and more.
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/karma.conf.js b/applications/auto-scale/gui/src/vendor/ui.bootstrap/karma.conf.js
deleted file mode 100644
index c3da490..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/karma.conf.js
+++ /dev/null
@@ -1,73 +0,0 @@
-// Karma configuration
-// Generated on Sat Mar 28 2015 11:17:34 GMT-0700 (PDT)
-
-module.exports = function(config) {
- config.set({
-
- // base path that will be used to resolve all patterns (eg. files, exclude)
- basePath: '',
-
-
- // frameworks to use
- // available frameworks: https://npmjs.org/browse/keyword/karma-adapter
- frameworks: ['jasmine'],
-
-
- // list of files / patterns to load in the browser
- files: [
- 'misc/test-lib/jquery-1.8.2.min.js',
- 'node_modules/angular/angular.js',
- 'node_modules/angular-mocks/angular-mocks.js',
- 'node_modules/angular-sanitize/angular-sanitize.js',
- 'misc/test-lib/helpers.js',
- 'src/**/*.js',
- 'template/**/*.js'
- ],
-
-
- // list of files to exclude
- exclude: [
- 'src/**/docs/*'
- ],
-
-
- // preprocess matching files before serving them to the browser
- // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
- preprocessors: {
- },
-
-
- // test results reporter to use
- // possible values: 'dots', 'progress'
- // available reporters: https://npmjs.org/browse/keyword/karma-reporter
- reporters: ['progress'],
-
- reportSlowerThan: 100,
-
- // web server port
- port: 9876,
-
-
- // enable / disable colors in the output (reporters and logs)
- colors: true,
-
-
- // level of logging
- // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
- logLevel: config.LOG_INFO,
-
-
- // enable / disable watching file and executing tests whenever any file changes
- autoWatch: true,
-
-
- // start these browsers
- // available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
- browsers: ['Chrome'],
-
-
- // Continuous Integration mode
- // if true, Karma captures browsers, runs the tests and exits
- singleRun: false
- });
-};
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/misc/changelog.tpl.md b/applications/auto-scale/gui/src/vendor/ui.bootstrap/misc/changelog.tpl.md
deleted file mode 100644
index 712c490..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/misc/changelog.tpl.md
+++ /dev/null
@@ -1,16 +0,0 @@
-# <%= version%> (<%= today%>)
-<% if (_(changelog.feat).size() > 0) { %>
-## Features
-<% _(changelog.feat).keys().sort().forEach(function(scope) { %>
-- **<%= scope%>:** <% changelog.feat[scope].forEach(function(change) { %>
- - <%= change.msg%> (<%= helpers.commitLink(change.sha1) %>) <% }); %><% }); %> <% } %>
-<% if (_(changelog.fix).size() > 0) { %>
-## Bug Fixes
-<% _(changelog.fix).keys().sort().forEach(function(scope) { %>
-- **<%= scope%>:** <% changelog.fix[scope].forEach(function(change) { %>
- - <%= change.msg%> (<%= helpers.commitLink(change.sha1) %>) <% }); %><% }); %> <% } %>
-<% if (_(changelog.breaking).size() > 0) { %>
-## Breaking Changes
-<% _(changelog.breaking).keys().sort().forEach(function(scope) { %>
-- **<%= scope%>:** <% changelog.breaking[scope].forEach(function(change) { %>
-<%= change.msg%><% }); %><% }); %> <% } %>
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/misc/demo/assets/app.js b/applications/auto-scale/gui/src/vendor/ui.bootstrap/misc/demo/assets/app.js
deleted file mode 100644
index 5c8580c..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/misc/demo/assets/app.js
+++ /dev/null
@@ -1,315 +0,0 @@
-/* global FastClick, smoothScroll */
-angular.module('ui.bootstrap.demo', ['ui.bootstrap', 'plunker', 'ngTouch', 'ngAnimate', 'ngSanitize'], function($httpProvider){
- FastClick.attach(document.body);
- delete $httpProvider.defaults.headers.common['X-Requested-With'];
-}).run(['$location', function($location){
- //Allows us to navigate to the correct element on initialization
- if ($location.path() !== '' && $location.path() !== '/') {
- smoothScroll(document.getElementById($location.path().substring(1)), 500, function(el) {
- location.replace('#' + el.id);
- });
- }
-}]).factory('buildFilesService', function ($http, $q) {
-
- var moduleMap;
- var rawFiles;
-
- return {
- getModuleMap: getModuleMap,
- getRawFiles: getRawFiles,
- get: function () {
- return $q.all({
- moduleMap: getModuleMap(),
- rawFiles: getRawFiles()
- });
- }
- };
-
- function getModuleMap() {
- return moduleMap ? $q.when(moduleMap) : $http.get('assets/module-mapping.json')
- .then(function (result) {
- moduleMap = result.data;
- return moduleMap;
- });
- }
-
- function getRawFiles() {
- return rawFiles ? $q.when(rawFiles) : $http.get('assets/raw-files.json')
- .then(function (result) {
- rawFiles = result.data;
- return rawFiles;
- });
- }
-
-})
-.controller('MainCtrl', MainCtrl)
-.controller('SelectModulesCtrl', SelectModulesCtrl)
-.controller('DownloadCtrl', DownloadCtrl);
-
-function MainCtrl($scope, $http, $document, $uibModal, orderByFilter) {
- // Grab old version docs
- $http.get('/versions-mapping.json')
- .then(function(result) {
- $scope.oldDocs = result.data;
- });
-
- $scope.showBuildModal = function() {
- var modalInstance = $uibModal.open({
- templateUrl: 'buildModal.html',
- controller: 'SelectModulesCtrl',
- resolve: {
- modules: function(buildFilesService) {
- return buildFilesService.getModuleMap()
- .then(function (moduleMap) {
- return Object.keys(moduleMap);
- });
- }
- }
- });
- };
-
- $scope.showDownloadModal = function() {
- var modalInstance = $uibModal.open({
- templateUrl: 'downloadModal.html',
- controller: 'DownloadCtrl'
- });
- };
-}
-
-function SelectModulesCtrl($scope, $uibModalInstance, modules, buildFilesService) {
- $scope.selectedModules = [];
- $scope.modules = modules;
-
- $scope.selectedChanged = function(module, selected) {
- if (selected) {
- $scope.selectedModules.push(module);
- } else {
- $scope.selectedModules.splice($scope.selectedModules.indexOf(module), 1);
- }
- };
-
- $scope.downloadBuild = function () {
- $uibModalInstance.close($scope.selectedModules);
- };
-
- $scope.cancel = function () {
- $uibModalInstance.dismiss();
- };
-
- $scope.isOldBrowser = function () {
- return isOldBrowser;
- };
-
- $scope.build = function (selectedModules, version) {
- /* global JSZip, saveAs */
- var moduleMap, rawFiles;
-
- buildFilesService.get().then(function (buildFiles) {
- moduleMap = buildFiles.moduleMap;
- rawFiles = buildFiles.rawFiles;
-
- generateBuild();
- });
-
- function generateBuild() {
- var srcModuleNames = selectedModules
- .map(function (module) {
- return moduleMap[module];
- })
- .reduce(function (toBuild, module) {
- addIfNotExists(toBuild, module.name);
-
- module.dependencies.forEach(function (depName) {
- addIfNotExists(toBuild, depName);
- });
- return toBuild;
- }, []);
-
- var srcModules = srcModuleNames
- .map(function (moduleName) {
- return moduleMap[moduleName];
- });
-
- var srcModuleFullNames = srcModules
- .map(function (module) {
- return module.moduleName;
- });
-
- var srcJsContent = srcModules
- .reduce(function (buildFiles, module) {
- return buildFiles.concat(module.srcFiles);
- }, [])
- .map(getFileContent)
- .join('\n')
- ;
-
- var jsFile = createNoTplFile(srcModuleFullNames, srcJsContent);
-
- var tplModuleNames = srcModules
- .reduce(function (tplModuleNames, module) {
- return tplModuleNames.concat(module.tplModules);
- }, []);
-
- var tplJsContent = srcModules
- .reduce(function (buildFiles, module) {
- return buildFiles.concat(module.tpljsFiles);
- }, [])
- .map(getFileContent)
- .join('\n')
- ;
-
- var jsTplFile = createWithTplFile(srcModuleFullNames, srcJsContent, tplModuleNames, tplJsContent);
-
- var cssContent = srcModules
- .map(function (module) {
- return module.css;
- })
- .filter(function (css) {
- return css;
- })
- .join('\n')
- ;
-
- var cssJsContent = srcModules
- .map(function (module) {
- return module.cssJs;
- })
- .filter(function (cssJs) {
- return cssJs;
- })
- .join('\n')
- ;
-
- var footer = cssJsContent;
-
- var zip = new JSZip();
- zip.file('ui-bootstrap-custom-' + version + '.js', rawFiles.banner + jsFile + footer);
- zip.file('ui-bootstrap-custom-' + version + '.min.js', rawFiles.banner + uglify(jsFile + footer));
- zip.file('ui-bootstrap-custom-tpls-' + version + '.js', rawFiles.banner + jsTplFile + footer);
- zip.file('ui-bootstrap-custom-tpls-' + version + '.min.js', rawFiles.banner + uglify(jsTplFile + footer));
- zip.file('ui-bootstrap-custom-tpls-' + version + '.min.js', rawFiles.banner + uglify(jsTplFile + footer));
-
- if (cssContent) {
- zip.file('ui-bootstrap-custom-' + version + '-csp.css', rawFiles.cssBanner + cssContent);
- }
-
- saveAs(zip.generate({type: 'blob'}), 'ui-bootstrap-custom-build.zip');
- }
-
- function createNoTplFile(srcModuleNames, srcJsContent) {
- return 'angular.module("ui.bootstrap", [' + srcModuleNames.join(',') + ']);\n' +
- srcJsContent;
- }
-
- function createWithTplFile(srcModuleNames, srcJsContent, tplModuleNames, tplJsContent) {
- var depModuleNames = srcModuleNames.slice();
- depModuleNames.unshift('"ui.bootstrap.tpls"');
-
- return 'angular.module("ui.bootstrap", [' + depModuleNames.join(',') + ']);\n' +
- 'angular.module("ui.bootstrap.tpls", [' + tplModuleNames.join(',') + ']);\n' +
- srcJsContent + '\n' + tplJsContent;
-
- }
-
- function addIfNotExists(array, element) {
- if (array.indexOf(element) == -1) {
- array.push(element);
- }
- }
-
- function getFileContent(fileName) {
- return rawFiles.files[fileName];
- }
-
- function uglify(js) {
- /* global UglifyJS */
-
- var ast = UglifyJS.parse(js);
- ast.figure_out_scope();
-
- var compressor = UglifyJS.Compressor();
- var compressedAst = ast.transform(compressor);
-
- compressedAst.figure_out_scope();
- compressedAst.compute_char_frequency();
- compressedAst.mangle_names();
-
- var stream = UglifyJS.OutputStream();
- compressedAst.print(stream);
-
- return stream.toString();
- }
- };
-}
-
-function DownloadCtrl($scope, $uibModalInstance) {
- $scope.options = {
- minified: true,
- tpls: true
- };
-
- $scope.download = function (version) {
- var options = $scope.options;
-
- var downloadUrl = ['ui-bootstrap-'];
- if (options.tpls) {
- downloadUrl.push('tpls-');
- }
- downloadUrl.push(version);
- if (options.minified) {
- downloadUrl.push('.min');
- }
- downloadUrl.push('.js');
-
- return downloadUrl.join('');
- };
-
- $scope.cancel = function () {
- $uibModalInstance.dismiss();
- };
-}
-
-/*
- * The following compatibility check is from:
- *
- * Bootstrap Customizer (http://getbootstrap.com/customize/)
- * Copyright 2011-2014 Twitter, Inc.
- *
- * Licensed under the Creative Commons Attribution 3.0 Unported License. For
- * details, see http://creativecommons.org/licenses/by/3.0/.
- */
-var isOldBrowser;
-(function () {
-
- var supportsFile = (window.File && window.FileReader && window.FileList && window.Blob);
- function failback() {
- isOldBrowser = true;
- }
- /**
- * Based on:
- * Blob Feature Check v1.1.0
- * https://github.com/ssorallen/blob-feature-check/
- * License: Public domain (http://unlicense.org)
- */
- var url = window.URL;
- var svg = new Blob(
- ['<svg xmlns=\'http://www.w3.org/2000/svg\'></svg>'],
- { type: 'image/svg+xml;charset=utf-8' }
- );
- var objectUrl = url.createObjectURL(svg);
-
- if (/^blob:/.exec(objectUrl) === null || !supportsFile) {
- // `URL.createObjectURL` created a URL that started with something other
- // than "blob:", which means it has been polyfilled and is not supported by
- // this browser.
- failback();
- } else {
- angular.element('<img/>')
- .on('load', function () {
- isOldBrowser = false;
- })
- .on('error', failback)
- .attr('src', objectUrl);
- }
-
- })();
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/misc/demo/assets/demo.css b/applications/auto-scale/gui/src/vendor/ui.bootstrap/misc/demo/assets/demo.css
deleted file mode 100644
index d1cadcd..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/misc/demo/assets/demo.css
+++ /dev/null
@@ -1,323 +0,0 @@
-body {
- opacity: 1;
- -webkit-transition: opacity 1s ease;
- -moz-transition: opacity 1s ease;
- transition: opacity 1s;
-}
-
-.ng-cloak {
- opacity: 0;
-}
-
-.ng-invalid {
- border: 1px solid red !important;
-}
-
-section {
- padding-top: 30px;
-}
-
-.page-header h1 > small > a {
- color: #999;
-}
-.page-header h1 > small > a:hover {
- text-decoration: none;
-}
-
-.footer {
- text-align: center;
- padding: 30px 0;
- margin-top: 70px;
- border-top: 1px solid #e5e5e5;
- background-color: #f5f5f5;
-}
-
-.bs-social {
- margin-top: 20px;
- margin-bottom: 20px;
- text-align: center;
-}
-
-@media (min-width: 768px) {
-
- .bs-social {
- text-align: left;
- }
-
-}
-
-.nav, .pagination, .carousel, .panel-title a {
- cursor: pointer;
-}
-
-.bs-social-buttons {
- display: inline-block;
- margin-bottom: 0;
- padding-left: 0;
- list-style: none;
-}
-.bs-social-buttons li {
- display: inline-block;
- padding: 5px 8px;
- line-height: 1;
-}
-
-@media (max-width: 767px) {
-
- .visible-xs.collapse.in {
- display: block!important;
- }
- .visible-xs.collapse {
- display: none!important;
- }
-
-}
-
-.navbar .collapse {
- border-top: 1px solid #e7e7e7;
- margin-left: -15px;
- margin-right: -15px;
- padding-right: 15px;
- padding-left: 15px;
-}
-
-.show-grid {
- margin-bottom: 15px;
-}
-
-/*
- * Container
- *
- * Tweak to width of container.
- */
-
-/*@media (min-width: 1200px) {
- .container{
- max-width: 970px;
- }
-}*/
-
-/*
- * Tabs
- *
- * Tweaks to the Tabs.
- */
-
-.code .nav-tabs {
-border-bottom: 1px solid #ccc;
-}
-
-.code pre, .code code {
- border-top: none;
- border-top-left-radius: 0;
- border-top-right-radius: 0;
-}
-
-.code .nav-tabs>li.active>a, .code .nav-tabs>li.active>a:hover, .code .nav-tabs>li.active>a:focus {
-background-color: #f8f8f8;
-border: 1px solid #ccc;
-border-bottom-color: transparent;
-}
-
-/*
- * Button Inverse
- *
- * Buttons in the masthead.
- */
-
-.btn-outline-inverse {
-color: #fff;
-background-color: transparent;
-border-color: #cdbfe3;
-margin: 10px;
-}
-
-@media (min-width: 768px) {
-
- .btn-outline-inverse {
- width: auto;
- margin: 20px 5px 20px 0;
- padding: 18px 24px;
- font-size: 21px;
- }
-
-}
-
-.btn-outline-inverse:hover, .btn-outline-inverse:focus, .btn-outline-inverse:active {
-color: #563d7c;
-text-shadow: none;
-background-color: #fff;
-border-color: #fff;
-}
-
-
-/* Page headers */
-.bs-header {
- padding: 30px 15px 40px; /* side padding builds on .container 15px, so 30px */
- font-size: 16px;
- text-align: center;
- text-shadow: 0 1px 0 rgba(0,0,0,.15);
- color: #cdbfe3;
- background-color: #563d7c;
- background-image: url(header.png);
-}
-.bs-header a {
- color: #fff;
- font-weight: normal;
-}
-.bs-header h1 {
- color: #fff;
-}
-.bs-header p {
- font-weight: 200;
- line-height: 1.4;
-}
-.bs-header .container {
- position: relative;
-}
-
-@media (min-width: 768px) {
- .bs-header {
- font-size: 30px;
- text-align: left;
- }
- .bs-header h1 {
- font-size: 100px;
- line-height: 1;
- }
-}
-
-@media (min-width: 992px) {
- .bs-header p {
- margin-right: 25%;
- }
-}
-
-.navbar-inner {
- -webkit-box-shadow: 0 3px 3px rgba(0,0,0,0.175);
- box-shadow: 0 3px 3px rgba(0,0,0,0.175);
-}
-
-/*
- * Side navigation
- *
- * Scrollspy and affixed enhanced navigation to highlight sections and secondary
- * sections of docs content.
- */
-
-/* By default it's not affixed in mobile views, so undo that */
-.bs-sidebar.affix {
- position: static;
-}
-
-/* First level of nav */
-.bs-sidenav {
- margin-top: 30px;
- margin-bottom: 30px;
- padding-top: 10px;
- padding-bottom: 10px;
- text-shadow: 0 1px 0 #fff;
- background-color: #f7f5fa;
- border-radius: 5px;
-}
-
-/* All levels of nav */
-.bs-sidebar .nav > li > a {
- display: block;
- color: #716b7a;
- padding: 5px 20px;
-}
-.bs-sidebar .nav > li > a:hover,
-.bs-sidebar .nav > li > a:focus {
- text-decoration: none;
- background-color: #e5e3e9;
- border-right: 1px solid #dbd8e0;
-}
-.bs-sidebar .nav > .active > a,
-.bs-sidebar .nav > .active:hover > a,
-.bs-sidebar .nav > .active:focus > a {
- font-weight: bold;
- color: #563d7c;
- background-color: transparent;
- border-right: 1px solid #563d7c;
-}
-
-/* Nav: second level (shown on .active) */
-.bs-sidebar .nav .nav {
- display: none; /* Hide by default, but at >768px, show it */
- margin-bottom: 8px;
-}
-.bs-sidebar .nav .nav > li > a {
- padding-top: 3px;
- padding-bottom: 3px;
- padding-left: 30px;
- font-size: 90%;
-}
-
-/* Show and affix the side nav when space allows it */
-@media (min-width: 992px) {
- .bs-sidebar .nav > .active > ul {
- display: block;
- }
- /* Widen the fixed sidebar */
- .bs-sidebar.affix,
- .bs-sidebar.affix-bottom {
- width: 213px;
- }
- .bs-sidebar.affix {
- position: fixed; /* Undo the static from mobile first approach */
- top: 80px;
- }
- .bs-sidebar.affix-bottom {
- position: absolute; /* Undo the static from mobile first approach */
- }
- .bs-sidebar.affix-bottom .bs-sidenav,
- .bs-sidebar.affix .bs-sidenav {
- margin-top: 0;
- margin-bottom: 0;
- }
-}
-@media (min-width: 1200px) {
- /* Widen the fixed sidebar again */
- .bs-sidebar.affix-bottom,
- .bs-sidebar.affix {
- width: 263px;
- }
-}
-
-
-/* Not enough room on mobile for markup tab, js tab, and plunk btn.
- And no one cares about plunk button on a phone anyway */
-@media only screen and (max-device-width: 480px) {
- #plunk-btn {
- display: none;
- }
-}
-
-.navbar-nav .dropdown .navbar-brand {
- max-width: 100%;
- margin-right: inherit;
- margin-left: inherit;
-}
-
-.header-placeholder {
- height: 50px;
-}
-
-@media screen and (min-width: 768px) {
-
- .dropdown.open > .navbar-brand + .dropdown-menu {
- left: 10px;
- }
-
- .header-placeholder {
- height: 50px;
- }
-
- .navbar-nav .dropdown .navbar-brand {
- max-width: 200px;
- margin-right: 5px;
- margin-left: 10px;
- }
-
-}
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/misc/demo/assets/favicon.ico b/applications/auto-scale/gui/src/vendor/ui.bootstrap/misc/demo/assets/favicon.ico
deleted file mode 100644
index 3d3f000..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/misc/demo/assets/favicon.ico
+++ /dev/null
Binary files differ
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/misc/demo/assets/github-16px.png b/applications/auto-scale/gui/src/vendor/ui.bootstrap/misc/demo/assets/github-16px.png
deleted file mode 100644
index c99ab23..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/misc/demo/assets/github-16px.png
+++ /dev/null
Binary files differ
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/misc/demo/assets/header.png b/applications/auto-scale/gui/src/vendor/ui.bootstrap/misc/demo/assets/header.png
deleted file mode 100644
index 785dd10..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/misc/demo/assets/header.png
+++ /dev/null
Binary files differ
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/misc/demo/assets/img/glyphicons-halflings-white.png b/applications/auto-scale/gui/src/vendor/ui.bootstrap/misc/demo/assets/img/glyphicons-halflings-white.png
deleted file mode 100644
index 3bf6484..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/misc/demo/assets/img/glyphicons-halflings-white.png
+++ /dev/null
Binary files differ
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/misc/demo/assets/img/glyphicons-halflings.png b/applications/auto-scale/gui/src/vendor/ui.bootstrap/misc/demo/assets/img/glyphicons-halflings.png
deleted file mode 100644
index a996999..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/misc/demo/assets/img/glyphicons-halflings.png
+++ /dev/null
Binary files differ
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/misc/demo/assets/plunker.js b/applications/auto-scale/gui/src/vendor/ui.bootstrap/misc/demo/assets/plunker.js
deleted file mode 100644
index 1e58610..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/misc/demo/assets/plunker.js
+++ /dev/null
@@ -1,59 +0,0 @@
-angular.module('plunker', [])
-
- .factory('plunkGenerator', function ($document) {
-
- return function (ngVersion, bsVersion, version, module, content) {
-
- var form = angular.element('<form style="display: none;" method="post" action="http://plnkr.co/edit/?p=preview" target="_blank"></form>');
- var addField = function (name, value) {
- var input = angular.element('<input type="hidden" name="' + name + '">');
- input.attr('value', value);
- form.append(input);
- };
-
- var indexContent = function (content, version) {
- return '<!doctype html>\n' +
- '<html ng-app="ui.bootstrap.demo">\n' +
- ' <head>\n' +
- ' <script src="//ajax.googleapis.com/ajax/libs/angularjs/'+ngVersion+'/angular.js"></script>\n' +
- ' <script src="//ajax.googleapis.com/ajax/libs/angularjs/'+ngVersion+'/angular-animate.js"></script>\n' +
- ' <script src="//angular-ui.github.io/bootstrap/ui-bootstrap-tpls-'+version+'.js"></script>\n' +
- ' <script src="example.js"></script>\n' +
- ' <link href="//netdna.bootstrapcdn.com/bootstrap/'+bsVersion+'/css/bootstrap.min.css" rel="stylesheet">\n' +
- ' </head>\n' +
- ' <body>\n\n' +
- content + '\n' +
- ' </body>\n' +
- '</html>\n';
- };
-
- var scriptContent = function(content) {
- return "angular.module('ui.bootstrap.demo', ['ngAnimate', 'ui.bootstrap']);" + "\n" + content;
- };
-
- addField('description', 'http://angular-ui.github.io/bootstrap/');
- addField('files[index.html]', indexContent(content.markup, version));
- addField('files[example.js]', scriptContent(content.javascript));
-
- $document.find('body').append(form);
- form[0].submit();
- form.remove();
- };
- })
-
- .controller('PlunkerCtrl', function ($scope, plunkGenerator) {
-
- $scope.content = {};
-
- $scope.edit = function (ngVersion, bsVersion, version, module) {
- plunkGenerator(ngVersion, bsVersion, version, module, $scope.content);
- };
- })
-
- .directive('plunkerContent', function () {
- return {
- link:function (scope, element, attrs) {
- scope.content[attrs.plunkerContent] = element.text().trim();
- }
- }
- });
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/misc/demo/assets/rainbow-generic.js b/applications/auto-scale/gui/src/vendor/ui.bootstrap/misc/demo/assets/rainbow-generic.js
deleted file mode 100644
index bfc5477..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/misc/demo/assets/rainbow-generic.js
+++ /dev/null
@@ -1,59 +0,0 @@
-/**
- * Generic language patterns
- *
- * @author Craig Campbell
- * @version 1.0.9
- */
-Rainbow.extend([
- {
- 'matches': {
- 1: {
- 'name': 'keyword.operator',
- 'pattern': /\=/g
- },
- 2: {
- 'name': 'string',
- 'matches': {
- 'name': 'constant.character.escape',
- 'pattern': /\\('|"){1}/g
- }
- }
- },
- 'pattern': /(\(|\s|\[|\=|:)(('|")([^\\\1]|\\.)*?(\3))/gm
- },
- {
- 'name': 'comment',
- 'pattern': /\/\*[\s\S]*?\*\/|(\/\/|\#)[\s\S]*?$/gm
- },
- {
- 'name': 'constant.numeric',
- 'pattern': /\b(\d+(\.\d+)?(e(\+|\-)?\d+)?(f|d)?|0x[\da-f]+)\b/gi
- },
- {
- 'matches': {
- 1: 'keyword'
- },
- 'pattern': /\b(and|array|as|bool(ean)?|c(atch|har|lass|onst)|d(ef|elete|o(uble)?)|e(cho|lse(if)?|xit|xtends|xcept)|f(inally|loat|or(each)?|unction)|global|if|import|int(eger)?|long|new|object|or|pr(int|ivate|otected)|public|return|self|st(ring|ruct|atic)|switch|th(en|is|row)|try|(un)?signed|var|void|while)(?=\(|\b)/gi
- },
- {
- 'name': 'constant.language',
- 'pattern': /true|false|null/g
- },
- {
- 'name': 'keyword.operator',
- 'pattern': /\+|\!|\-|&(gt|lt|amp);|\||\*|\=/g
- },
- {
- 'matches': {
- 1: 'function.call'
- },
- 'pattern': /(\w+?)(?=\()/g
- },
- {
- 'matches': {
- 1: 'storage.function',
- 2: 'entity.name.function'
- },
- 'pattern': /(function)\s(.*?)(?=\()/g
- }
-]);
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/misc/demo/assets/rainbow-html.js b/applications/auto-scale/gui/src/vendor/ui.bootstrap/misc/demo/assets/rainbow-html.js
deleted file mode 100644
index f221888..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/misc/demo/assets/rainbow-html.js
+++ /dev/null
@@ -1,83 +0,0 @@
-/**
- * HTML patterns
- *
- * @author Craig Campbell
- * @version 1.0.7
- */
-Rainbow.extend('html', [
- {
- 'name': 'source.php.embedded',
- 'matches': {
- 2: {
- 'language': 'php'
- }
- },
- 'pattern': /<\?=?(?!xml)(php)?([\s\S]*?)(\?>)/gm
- },
- {
- 'name': 'source.css.embedded',
- 'matches': {
- 0: {
- 'language': 'css'
- }
- },
- 'pattern': /<style(.*?)>([\s\S]*?)<\/style>/gm
- },
- {
- 'name': 'source.js.embedded',
- 'matches': {
- 0: {
- 'language': 'javascript'
- }
- },
- 'pattern': /<script(?! src)(.*?)>([\s\S]*?)<\/script>/gm
- },
- {
- 'name': 'comment.html',
- 'pattern': /<\!--[\S\s]*?-->/g
- },
- {
- 'matches': {
- 1: 'support.tag.open',
- 2: 'support.tag.cclose'
- },
- 'pattern': /(<)|(\/?\??>)/g
- },
- {
- 'name': 'support.tag',
- 'matches': {
- 1: 'support.tag',
- 2: 'support.tag.special',
- 3: 'support.tag-name'
- },
- 'pattern': /(<\??)(\/|\!?)(\w+)/g
- },
- {
- 'matches': {
- 1: 'support.attribute'
- },
- 'pattern': /([a-z-]+)(?=\=)/gi
- },
- {
- 'matches': {
- 1: 'support.operator',
- 2: 'string.quote',
- 3: 'string.value',
- 4: 'string.quote'
- },
- 'pattern': /(=)('|")(.*?)(\2)/g
- },
- {
- 'matches': {
- 1: 'support.operator',
- 2: 'support.value'
- },
- 'pattern': /(=)([a-zA-Z\-0-9]*)\b/g
- },
- {
- 'matches': {
- 1: 'support.attribute'
- },
- 'pattern': /\s(\w+)(?=\s|>)(?![\s\S]*<)/g
- }
-], true);
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/misc/demo/assets/rainbow-javascript.js b/applications/auto-scale/gui/src/vendor/ui.bootstrap/misc/demo/assets/rainbow-javascript.js
deleted file mode 100644
index 83b0d46..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/misc/demo/assets/rainbow-javascript.js
+++ /dev/null
@@ -1,110 +0,0 @@
-/**
- * Javascript patterns
- *
- * @author Craig Campbell
- * @version 1.0.7
- */
-Rainbow.extend('javascript', [
-
- /**
- * matches $. or $(
- */
- {
- 'name': 'selector',
- 'pattern': /(\s|^)\$(?=\.|\()/g
- },
- {
- 'name': 'support',
- 'pattern': /\b(window|document)\b/g
- },
- {
- 'matches': {
- 1: 'support.property'
- },
- 'pattern': /\.(length|node(Name|Value))\b/g
- },
- {
- 'matches': {
- 1: 'support.function'
- },
- 'pattern': /(setTimeout|setInterval)(?=\()/g
-
- },
- {
- 'matches': {
- 1: 'support.method'
- },
- 'pattern': /\.(getAttribute|push|getElementById|getElementsByClassName|log|setTimeout|setInterval)(?=\()/g
- },
- {
- 'matches': {
- 1: 'support.tag.script',
- 2: [
- {
- 'name': 'string',
- 'pattern': /('|")(.*?)(\1)/g
- },
- {
- 'name': 'entity.tag.script',
- 'pattern': /(\w+)/g
- }
- ],
- 3: 'support.tag.script'
- },
- 'pattern': /(<\/?)(script.*?)(>)/g
- },
-
- /**
- * matches any escaped characters inside of a js regex pattern
- *
- * @see https://github.com/ccampbell/rainbow/issues/22
- *
- * this was causing single line comments to fail so it now makes sure
- * the opening / is not directly followed by a *
- *
- * @todo check that there is valid regex in match group 1
- */
- {
- 'name': 'string.regexp',
- 'matches': {
- 1: 'string.regexp.open',
- 2: {
- 'name': 'constant.regexp.escape',
- 'pattern': /\\(.){1}/g
- },
- 3: 'string.regexp.cclose',
- 4: 'string.regexp.modifier'
- },
- 'pattern': /(\/)(?!\*)(.+)(\/)([igm]{0,3})/g
- },
-
- /**
- * matches runtime function declarations
- */
- {
- 'matches': {
- 1: 'storage',
- 3: 'entity.function'
- },
- 'pattern': /(var)?(\s|^)(.*)(?=\s?=\s?function\()/g
- },
-
- /**
- * matches constructor call
- */
- {
- 'matches': {
- 1: 'keyword',
- 2: 'entity.function'
- },
- 'pattern': /(new)\s+(.*)(?=\()/g
- },
-
- /**
- * matches any function call in the style functionName: function()
- */
- {
- 'name': 'entity.function',
- 'pattern': /(\w+)(?=:\s{0,}function)/g
- }
-]);
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/misc/demo/assets/rainbow.css b/applications/auto-scale/gui/src/vendor/ui.bootstrap/misc/demo/assets/rainbow.css
deleted file mode 100644
index 0a82f65..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/misc/demo/assets/rainbow.css
+++ /dev/null
@@ -1,88 +0,0 @@
-/**
- * GitHub theme
- *
- * @author Craig Campbell
- * @version 1.0.4
- */
-pre {
- border: 1px solid #ccc;
- word-wrap: break-word;
- padding: 6px 10px;
- line-height: 19px;
- margin-bottom: 20px;
-}
-
-code {
- border: 1px solid #eaeaea;
- margin: 0 2px;
- padding: 0 5px;
- font-size: 12px;
-}
-
-pre code {
- border: 0;
- padding: 0;
- margin: 0;
- -moz-border-radius: 0;
- -webkit-border-radius: 0;
- border-radius: 0;
-}
-
-pre, code {
- font-family: Consolas, 'Liberation Mono', Courier, monospace;
- color: #333;
- background: #f8f8f8;
- -moz-border-radius: 3px;
- -webkit-border-radius: 3px;
- border-radius: 3px;
-}
-
-pre, pre code {
- font-size: 13px;
-}
-
-pre .comment {
- color: #998;
-}
-
-pre .support {
- color: #0086B3;
-}
-
-pre .tag, pre .tag-name {
- color: navy;
-}
-
-pre .keyword, pre .css-property, pre .vendor-prefix, pre .sass, pre .class, pre .id, pre .css-value, pre .entity.function, pre .storage.function {
- font-weight: bold;
-}
-
-pre .css-property, pre .css-value, pre .vendor-prefix, pre .support.namespace {
- color: #333;
-}
-
-pre .constant.numeric, pre .keyword.unit, pre .hex-color {
- font-weight: normal;
- color: #099;
-}
-
-pre .entity.class {
- color: #458;
-}
-
-pre .entity.id, pre .entity.function {
- color: #900;
-}
-
-pre .attribute, pre .variable {
- color: teal;
-}
-
-pre .string, pre .support.value {
- font-weight: normal;
- color: #d14;
-}
-
-pre .regexp {
- color: #009926;
-}
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/misc/demo/assets/rainbow.js b/applications/auto-scale/gui/src/vendor/ui.bootstrap/misc/demo/assets/rainbow.js
deleted file mode 100644
index ed8894d..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/misc/demo/assets/rainbow.js
+++ /dev/null
@@ -1,773 +0,0 @@
-/**
- * Copyright 2012 Craig Campbell
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * Rainbow is a simple code syntax highlighter
- *
- * @preserve @version 1.1.8
- * @url rainbowco.de
- */
-window['Rainbow'] = (function() {
-
- /**
- * array of replacements to process at the end
- *
- * @type {Object}
- */
- var replacements = {},
-
- /**
- * an array of start and end positions of blocks to be replaced
- *
- * @type {Object}
- */
- replacement_positions = {},
-
- /**
- * an array of the language patterns specified for each language
- *
- * @type {Object}
- */
- language_patterns = {},
-
- /**
- * an array of languages and whether they should bypass the default patterns
- *
- * @type {Object}
- */
- bypass_defaults = {},
-
- /**
- * processing level
- *
- * replacements are stored at this level so if there is a sub block of code
- * (for example php inside of html) it runs at a different level
- *
- * @type {number}
- */
- CURRENT_LEVEL = 0,
-
- /**
- * constant used to refer to the default language
- *
- * @type {number}
- */
- DEFAULT_LANGUAGE = 0,
-
- /**
- * used as counters so we can selectively call setTimeout
- * after processing a certain number of matches/replacements
- *
- * @type {number}
- */
- match_counter = 0,
-
- /**
- * @type {number}
- */
- replacement_counter = 0,
-
- /**
- * @type {null|string}
- */
- global_class,
-
- /**
- * @type {null|Function}
- */
- onHighlight;
-
- /**
- * cross browser get attribute for an element
- *
- * @see http://stackoverflow.com/questions/3755227/cross-browser-javascript-getattribute-method
- *
- * @param {Node} el
- * @param {string} attr attribute you are trying to get
- * @returns {string|number}
- */
- function _attr(el, attr, attrs, i) {
- var result = (el.getAttribute && el.getAttribute(attr)) || 0;
-
- if (!result) {
- attrs = el.attributes;
-
- for (i = 0; i < attrs.length; ++i) {
- if (attrs[i].nodeName === attr) {
- return attrs[i].nodeValue;
- }
- }
- }
-
- return result;
- }
-
- /**
- * adds a class to a given code block
- *
- * @param {Element} el
- * @param {string} class_name class name to add
- * @returns void
- */
- function _addClass(el, class_name) {
- el.className += el.className ? ' ' + class_name : class_name;
- }
-
- /**
- * checks if a block has a given class
- *
- * @param {Element} el
- * @param {string} class_name class name to check for
- * @returns {boolean}
- */
- function _hasClass(el, class_name) {
- return (' ' + el.className + ' ').indexOf(' ' + class_name + ' ') > -1;
- }
-
- /**
- * gets the language for this block of code
- *
- * @param {Element} block
- * @returns {string|null}
- */
- function _getLanguageForBlock(block) {
-
- // if this doesn't have a language but the parent does then use that
- // this means if for example you have: <pre data-language="php">
- // with a bunch of <code> blocks inside then you do not have
- // to specify the language for each block
- var language = _attr(block, 'data-language') || _attr(block.parentNode, 'data-language');
-
- // this adds support for specifying language via a css class
- // you can use the Google Code Prettify style: <pre class="lang-php">
- // or the HTML5 style: <pre><code class="language-php">
- if (!language) {
- var pattern = /\blang(?:uage)?-(\w+)/,
- match = block.className.match(pattern) || block.parentNode.className.match(pattern);
-
- if (match) {
- language = match[1];
- }
- }
-
- return language;
- }
-
- /**
- * makes sure html entities are always used for tags
- *
- * @param {string} code
- * @returns {string}
- */
- function _htmlEntities(code) {
- return code.replace(/</g, '<').replace(/>/g, '>').replace(/&(?![\w\#]+;)/g, '&');
- }
-
- /**
- * determines if a new match intersects with an existing one
- *
- * @param {number} start1 start position of existing match
- * @param {number} end1 end position of existing match
- * @param {number} start2 start position of new match
- * @param {number} end2 end position of new match
- * @returns {boolean}
- */
- function _intersects(start1, end1, start2, end2) {
- if (start2 >= start1 && start2 < end1) {
- return true;
- }
-
- return end2 > start1 && end2 < end1;
- }
-
- /**
- * determines if two different matches have complete overlap with each other
- *
- * @param {number} start1 start position of existing match
- * @param {number} end1 end position of existing match
- * @param {number} start2 start position of new match
- * @param {number} end2 end position of new match
- * @returns {boolean}
- */
- function _hasCompleteOverlap(start1, end1, start2, end2) {
-
- // if the starting and end positions are exactly the same
- // then the first one should stay and this one should be ignored
- if (start2 == start1 && end2 == end1) {
- return false;
- }
-
- return start2 <= start1 && end2 >= end1;
- }
-
- /**
- * determines if the match passed in falls inside of an existing match
- * this prevents a regex pattern from matching inside of a bigger pattern
- *
- * @param {number} start - start position of new match
- * @param {number} end - end position of new match
- * @returns {boolean}
- */
- function _matchIsInsideOtherMatch(start, end) {
- for (var key in replacement_positions[CURRENT_LEVEL]) {
- key = parseInt(key, 10);
-
- // if this block completely overlaps with another block
- // then we should remove the other block and return false
- if (_hasCompleteOverlap(key, replacement_positions[CURRENT_LEVEL][key], start, end)) {
- delete replacement_positions[CURRENT_LEVEL][key];
- delete replacements[CURRENT_LEVEL][key];
- }
-
- if (_intersects(key, replacement_positions[CURRENT_LEVEL][key], start, end)) {
- return true;
- }
- }
-
- return false;
- }
-
- /**
- * takes a string of code and wraps it in a span tag based on the name
- *
- * @param {string} name name of the pattern (ie keyword.regex)
- * @param {string} code block of code to wrap
- * @returns {string}
- */
- function _wrapCodeInSpan(name, code) {
- return '<span class="' + name.replace(/\./g, ' ') + (global_class ? ' ' + global_class : '') + '">' + code + '</span>';
- }
-
- /**
- * finds out the position of group match for a regular expression
- *
- * @see http://stackoverflow.com/questions/1985594/how-to-find-index-of-groups-in-match
- *
- * @param {Object} match
- * @param {number} group_number
- * @returns {number}
- */
- function _indexOfGroup(match, group_number) {
- var index = 0,
- i;
-
- for (i = 1; i < group_number; ++i) {
- if (match[i]) {
- index += match[i].length;
- }
- }
-
- return index;
- }
-
- /**
- * matches a regex pattern against a block of code
- * finds all matches that should be processed and stores the positions
- * of where they should be replaced within the string
- *
- * this is where pretty much all the work is done but it should not
- * be called directly
- *
- * @param {RegExp} pattern
- * @param {string} code
- * @returns void
- */
- function _processPattern(regex, pattern, code, callback)
- {
- var match = regex.exec(code);
-
- if (!match) {
- return callback();
- }
-
- ++match_counter;
-
- // treat match 0 the same way as name
- if (!pattern['name'] && typeof pattern['matches'][0] == 'string') {
- pattern['name'] = pattern['matches'][0];
- delete pattern['matches'][0];
- }
-
- var replacement = match[0],
- start_pos = match.index,
- end_pos = match[0].length + start_pos,
-
- /**
- * callback to process the next match of this pattern
- */
- processNext = function() {
- var nextCall = function() {
- _processPattern(regex, pattern, code, callback);
- };
-
- // every 100 items we process let's call set timeout
- // to let the ui breathe a little
- return match_counter % 100 > 0 ? nextCall() : setTimeout(nextCall, 0);
- };
-
- // if this is not a child match and it falls inside of another
- // match that already happened we should skip it and continue processing
- if (_matchIsInsideOtherMatch(start_pos, end_pos)) {
- return processNext();
- }
-
- /**
- * callback for when a match was successfully processed
- *
- * @param {string} replacement
- * @returns void
- */
- var onMatchSuccess = function(replacement) {
- // if this match has a name then wrap it in a span tag
- if (pattern['name']) {
- replacement = _wrapCodeInSpan(pattern['name'], replacement);
- }
-
- // console.log('LEVEL', CURRENT_LEVEL, 'replace', match[0], 'with', replacement, 'at position', start_pos, 'to', end_pos);
-
- // store what needs to be replaced with what at this position
- if (!replacements[CURRENT_LEVEL]) {
- replacements[CURRENT_LEVEL] = {};
- replacement_positions[CURRENT_LEVEL] = {};
- }
-
- replacements[CURRENT_LEVEL][start_pos] = {
- 'replace': match[0],
- 'with': replacement
- };
-
- // store the range of this match so we can use it for comparisons
- // with other matches later
- replacement_positions[CURRENT_LEVEL][start_pos] = end_pos;
-
- // process the next match
- processNext();
- },
-
- // if this pattern has sub matches for different groups in the regex
- // then we should process them one at a time by rerunning them through
- // this function to generate the new replacement
- //
- // we run through them backwards because the match position of earlier
- // matches will not change depending on what gets replaced in later
- // matches
- group_keys = keys(pattern['matches']),
-
- /**
- * callback for processing a sub group
- *
- * @param {number} i
- * @param {Array} group_keys
- * @param {Function} callback
- */
- processGroup = function(i, group_keys, callback) {
- if (i >= group_keys.length) {
- return callback(replacement);
- }
-
- var processNextGroup = function() {
- processGroup(++i, group_keys, callback);
- },
- block = match[group_keys[i]];
-
- // if there is no match here then move on
- if (!block) {
- return processNextGroup();
- }
-
- var group = pattern['matches'][group_keys[i]],
- language = group['language'],
-
- /**
- * process group is what group we should use to actually process
- * this match group
- *
- * for example if the subgroup pattern looks like this
- * 2: {
- * 'name': 'keyword',
- * 'pattern': /true/g
- * }
- *
- * then we use that as is, but if it looks like this
- *
- * 2: {
- * 'name': 'keyword',
- * 'matches': {
- * 'name': 'special',
- * 'pattern': /whatever/g
- * }
- * }
- *
- * we treat the 'matches' part as the pattern and keep
- * the name around to wrap it with later
- */
- process_group = group['name'] && group['matches'] ? group['matches'] : group,
-
- /**
- * takes the code block matched at this group, replaces it
- * with the highlighted block, and optionally wraps it with
- * a span with a name
- *
- * @param {string} block
- * @param {string} replace_block
- * @param {string|null} match_name
- */
- _replaceAndContinue = function(block, replace_block, match_name) {
- replacement = _replaceAtPosition(_indexOfGroup(match, group_keys[i]), block, match_name ? _wrapCodeInSpan(match_name, replace_block) : replace_block, replacement);
- processNextGroup();
- };
-
- // if this is a sublanguage go and process the block using that language
- if (language) {
- return _highlightBlockForLanguage(block, language, function(code) {
- _replaceAndContinue(block, code);
- });
- }
-
- // if this is a string then this match is directly mapped to selector
- // so all we have to do is wrap it in a span and continue
- if (typeof group === 'string') {
- return _replaceAndContinue(block, block, group);
- }
-
- // the process group can be a single pattern or an array of patterns
- // _processCodeWithPatterns always expects an array so we convert it here
- _processCodeWithPatterns(block, process_group.length ? process_group : [process_group], function(code) {
- _replaceAndContinue(block, code, group['matches'] ? group['name'] : 0);
- });
- };
-
- processGroup(0, group_keys, onMatchSuccess);
- }
-
- /**
- * should a language bypass the default patterns?
- *
- * if you call Rainbow.extend() and pass true as the third argument
- * it will bypass the defaults
- */
- function _bypassDefaultPatterns(language)
- {
- return bypass_defaults[language];
- }
-
- /**
- * returns a list of regex patterns for this language
- *
- * @param {string} language
- * @returns {Array}
- */
- function _getPatternsForLanguage(language) {
- var patterns = language_patterns[language] || [],
- default_patterns = language_patterns[DEFAULT_LANGUAGE] || [];
-
- return _bypassDefaultPatterns(language) ? patterns : patterns.concat(default_patterns);
- }
-
- /**
- * substring replace call to replace part of a string at a certain position
- *
- * @param {number} position the position where the replacement should happen
- * @param {string} replace the text we want to replace
- * @param {string} replace_with the text we want to replace it with
- * @param {string} code the code we are doing the replacing in
- * @returns {string}
- */
- function _replaceAtPosition(position, replace, replace_with, code) {
- var sub_string = code.substr(position);
- return code.substr(0, position) + sub_string.replace(replace, replace_with);
- }
-
- /**
- * sorts an object by index descending
- *
- * @param {Object} object
- * @return {Array}
- */
- function keys(object) {
- var locations = [],
- replacement,
- pos;
-
- for(var location in object) {
- if (object.hasOwnProperty(location)) {
- locations.push(location);
- }
- }
-
- // numeric descending
- return locations.sort(function(a, b) {
- return b - a;
- });
- }
-
- /**
- * processes a block of code using specified patterns
- *
- * @param {string} code
- * @param {Array} patterns
- * @returns void
- */
- function _processCodeWithPatterns(code, patterns, callback)
- {
- // we have to increase the level here so that the
- // replacements will not conflict with each other when
- // processing sub blocks of code
- ++CURRENT_LEVEL;
-
- // patterns are processed one at a time through this function
- function _workOnPatterns(patterns, i)
- {
- // still have patterns to process, keep going
- if (i < patterns.length) {
- return _processPattern(patterns[i]['pattern'], patterns[i], code, function() {
- _workOnPatterns(patterns, ++i);
- });
- }
-
- // we are done processing the patterns
- // process the replacements and update the DOM
- _processReplacements(code, function(code) {
-
- // when we are done processing replacements
- // we are done at this level so we can go back down
- delete replacements[CURRENT_LEVEL];
- delete replacement_positions[CURRENT_LEVEL];
- --CURRENT_LEVEL;
- callback(code);
- });
- }
-
- _workOnPatterns(patterns, 0);
- }
-
- /**
- * process replacements in the string of code to actually update the markup
- *
- * @param {string} code the code to process replacements in
- * @param {Function} onComplete what to do when we are done processing
- * @returns void
- */
- function _processReplacements(code, onComplete) {
-
- /**
- * processes a single replacement
- *
- * @param {string} code
- * @param {Array} positions
- * @param {number} i
- * @param {Function} onComplete
- * @returns void
- */
- function _processReplacement(code, positions, i, onComplete) {
- if (i < positions.length) {
- ++replacement_counter;
- var pos = positions[i],
- replacement = replacements[CURRENT_LEVEL][pos];
- code = _replaceAtPosition(pos, replacement['replace'], replacement['with'], code);
-
- // process next function
- var next = function() {
- _processReplacement(code, positions, ++i, onComplete);
- };
-
- // use a timeout every 250 to not freeze up the UI
- return replacement_counter % 250 > 0 ? next() : setTimeout(next, 0);
- }
-
- onComplete(code);
- }
-
- var string_positions = keys(replacements[CURRENT_LEVEL]);
- _processReplacement(code, string_positions, 0, onComplete);
- }
-
- /**
- * takes a string of code and highlights it according to the language specified
- *
- * @param {string} code
- * @param {string} language
- * @param {Function} onComplete
- * @returns void
- */
- function _highlightBlockForLanguage(code, language, onComplete) {
- var patterns = _getPatternsForLanguage(language);
- _processCodeWithPatterns(_htmlEntities(code), patterns, onComplete);
- }
-
- /**
- * highlight an individual code block
- *
- * @param {Array} code_blocks
- * @param {number} i
- * @returns void
- */
- function _highlightCodeBlock(code_blocks, i, onComplete) {
- if (i < code_blocks.length) {
- var block = code_blocks[i],
- language = _getLanguageForBlock(block);
-
- if (!_hasClass(block, 'rainbow') && language) {
- language = language.toLowerCase();
-
- _addClass(block, 'rainbow');
-
- return _highlightBlockForLanguage(block.innerHTML, language, function(code) {
- block.innerHTML = code;
-
- // reset the replacement arrays
- replacements = {};
- replacement_positions = {};
-
- // if you have a listener attached tell it that this block is now highlighted
- if (onHighlight) {
- onHighlight(block, language);
- }
-
- // process the next block
- setTimeout(function() {
- _highlightCodeBlock(code_blocks, ++i, onComplete);
- }, 0);
- });
- }
- return _highlightCodeBlock(code_blocks, ++i, onComplete);
- }
-
- if (onComplete) {
- onComplete();
- }
- }
-
- /**
- * start highlighting all the code blocks
- *
- * @returns void
- */
- function _highlight(node, onComplete) {
-
- // the first argument can be an Event or a DOM Element
- // I was originally checking instanceof Event but that makes it break
- // when using mootools
- //
- // @see https://github.com/ccampbell/rainbow/issues/32
- //
- node = node && typeof node.getElementsByTagName == 'function' ? node : document;
-
- var pre_blocks = node.getElementsByTagName('pre'),
- code_blocks = node.getElementsByTagName('code'),
- i,
- final_blocks = [];
-
- // @see http://stackoverflow.com/questions/2735067/how-to-convert-a-dom-node-list-to-an-array-in-javascript
- // we are going to process all <code> blocks
- for (i = 0; i < code_blocks.length; ++i) {
- final_blocks.push(code_blocks[i]);
- }
-
- // loop through the pre blocks to see which ones we should add
- for (i = 0; i < pre_blocks.length; ++i) {
-
- // if the pre block has no code blocks then process it directly
- if (!pre_blocks[i].getElementsByTagName('code').length) {
- final_blocks.push(pre_blocks[i]);
- }
- }
-
- _highlightCodeBlock(final_blocks, 0, onComplete);
- }
-
- /**
- * public methods
- */
- return {
-
- /**
- * extends the language pattern matches
- *
- * @param {*} language name of language
- * @param {*} patterns array of patterns to add on
- * @param {boolean|null} bypass if true this will bypass the default language patterns
- */
- extend: function(language, patterns, bypass) {
-
- // if there is only one argument then we assume that we want to
- // extend the default language rules
- if (arguments.length == 1) {
- patterns = language;
- language = DEFAULT_LANGUAGE;
- }
-
- bypass_defaults[language] = bypass;
- language_patterns[language] = patterns.concat(language_patterns[language] || []);
- },
-
- /**
- * call back to let you do stuff in your app after a piece of code has been highlighted
- *
- * @param {Function} callback
- */
- onHighlight: function(callback) {
- onHighlight = callback;
- },
-
- /**
- * method to set a global class that will be applied to all spans
- *
- * @param {string} class_name
- */
- addClass: function(class_name) {
- global_class = class_name;
- },
-
- /**
- * starts the magic rainbow
- *
- * @returns void
- */
- color: function() {
-
- // if you want to straight up highlight a string you can pass the string of code,
- // the language, and a callback function
- if (typeof arguments[0] == 'string') {
- return _highlightBlockForLanguage(arguments[0], arguments[1], arguments[2]);
- }
-
- // if you pass a callback function then we rerun the color function
- // on all the code and call the callback function on complete
- if (typeof arguments[0] == 'function') {
- return _highlight(0, arguments[0]);
- }
-
- // otherwise we use whatever node you passed in with an optional
- // callback function as the second parameter
- _highlight(arguments[0], arguments[1]);
- }
- };
-}) ();
-
-/**
- * adds event listener to start highlighting
- */
-(function() {
- if (window.addEventListener) {
- return window.addEventListener('load', Rainbow.color, false);
- }
- window.attachEvent('onload', Rainbow.color);
-}) ();
-
-// When using Google closure compiler in advanced mode some methods
-// get renamed. This keeps a public reference to these methods so they can
-// still be referenced from outside this library.
-Rainbow["onHighlight"] = Rainbow.onHighlight;
-Rainbow["addClass"] = Rainbow.addClass;
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/misc/demo/assets/smoothscroll-angular-custom.js b/applications/auto-scale/gui/src/vendor/ui.bootstrap/misc/demo/assets/smoothscroll-angular-custom.js
deleted file mode 100644
index e33586f..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/misc/demo/assets/smoothscroll-angular-custom.js
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
- * https://github.com/alicelieutier/smoothScroll/
- * A teeny tiny, standard compliant, smooth scroll script with ease-in-out effect and no jQuery (or any other dependancy, FWIW).
- * MIT License
- */
-window.smoothScroll = (function(){
-// We do not want this script to be applied in browsers that do not support those
-// That means no smoothscroll on IE9 and below.
-if(document.querySelectorAll === void 0 || window.pageYOffset === void 0 || history.pushState === void 0) { return; }
-
-// Get the top position of an element in the document
-var getTop = function(element) {
- // return value of html.getBoundingClientRect().top ... IE : 0, other browsers : -pageYOffset
- if(element.nodeName === 'HTML') return -window.pageYOffset
- return element.getBoundingClientRect().top + window.pageYOffset;
-}
-// ease in out function thanks to:
-// http://blog.greweb.fr/2012/02/bezier-curve-based-easing-functions-from-concept-to-implementation/
-var easeInOutCubic = function (t) { return t<.5 ? 4*t*t*t : (t-1)*(2*t-2)*(2*t-2)+1 }
-
-// calculate the scroll position we should be in
-// given the start and end point of the scroll
-// the time elapsed from the beginning of the scroll
-// and the total duration of the scroll (default 500ms)
-var position = function(start, end, elapsed, duration) {
- if (elapsed > duration) return end;
- return start + (end - start) * easeInOutCubic(elapsed / duration); // <-- you can change the easing funtion there
- // return start + (end - start) * (elapsed / duration); // <-- this would give a linear scroll
-}
-
-// we use requestAnimationFrame to be called by the browser before every repaint
-// if the first argument is an element then scroll to the top of this element
-// if the first argument is numeric then scroll to this location
-// if the callback exist, it is called when the scrolling is finished
-var smoothScroll = function(el, duration, callback){
- duration = duration || 500;
- var start = window.pageYOffset;
-
- if (typeof el === 'number') {
- var end = parseInt(el);
- } else {
- var end = getTop(el);
- }
-
- var clock = Date.now();
- var requestAnimationFrame = window.requestAnimationFrame ||
- window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame ||
- function(fn){window.setTimeout(fn, 15);};
-
- var step = function(){
- var elapsed = Date.now() - clock;
- window.scroll(0, position(start, end, elapsed, duration));
- if (elapsed > duration) {
- if (typeof callback === 'function') {
- callback(el);
- }
- } else {
- requestAnimationFrame(step);
- }
- }
- step();
-}
-
-var linkHandler = function(ev) {
- ev.preventDefault();
-
- if (location.hash !== this.hash) {
- //NOTE(@ajoslin): Changed this line to stop $digest errors
- //window.history.pushState(null, null, this.hash)
- angular.element(document).injector().get('$location').hash(this.hash);
- }
- // using the history api to solve issue #1 - back doesn't work
- // most browser don't update :target when the history api is used:
- // THIS IS A BUG FROM THE BROWSERS.
- // change the scrolling duration in this call
- var targetEl = document.getElementById(this.hash.substring(1));
- if (targetEl) {
- smoothScroll(document.getElementById(this.hash.substring(1)), 500, function(el) {
- location.replace('#' + el.id)
- // this will cause the :target to be activated.
- });
- }
-}
-
-// We look for all the internal links in the documents and attach the smoothscroll function
-document.addEventListener("DOMContentLoaded", function () {
- var internal = document.querySelectorAll('a[href^="#"]'), a;
- for(var i=internal.length; a=internal[--i];){
- a.addEventListener("click", linkHandler, false);
- }
-});
-
-// return smoothscroll API
-return smoothScroll;
-
-})();
-
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/misc/demo/assets/uglifyjs.js b/applications/auto-scale/gui/src/vendor/ui.bootstrap/misc/demo/assets/uglifyjs.js
deleted file mode 100644
index 2b09c57..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/misc/demo/assets/uglifyjs.js
+++ /dev/null
@@ -1,4 +0,0 @@
-!function(n,e){"use strict";function t(n){for(var e=Object.create(null),t=0;t<n.length;++t)e[n[t]]=!0;return e}function r(n,e){return Array.prototype.slice.call(n,e||0)}function i(n){return n.split("")}function o(n,e){for(var t=e.length;--t>=0;)if(e[t]==n)return!0;return!1}function a(n,e){for(var t=0,r=e.length;r>t;++t)if(n(e[t]))return e[t]}function u(n,e){if(0>=e)return"";if(1==e)return n;var t=u(n,e>>1);return t+=t,1&e&&(t+=n),t}function s(n,e){Error.call(this,n),this.msg=n,this.defs=e}function c(n,e,t){n===!0&&(n={});var r=n||{};if(t)for(var i in r)r.hasOwnProperty(i)&&!e.hasOwnProperty(i)&&s.croak("`"+i+"` is not a supported option",e);for(var i in e)e.hasOwnProperty(i)&&(r[i]=n&&n.hasOwnProperty(i)?n[i]:e[i]);return r}function f(n,e){for(var t in e)e.hasOwnProperty(t)&&(n[t]=e[t]);return n}function l(){}function p(n,e){n.indexOf(e)<0&&n.push(e)}function d(n,e){return n.replace(/\{(.+?)\}/g,function(n,t){return e[t]})}function h(n,e){for(var t=n.length;--t>=0;)n[t]===e&&n.splice(t,1)}function _(n,e){function t(n,t){for(var r=[],i=0,o=0,a=0;i<n.length&&o<t.length;)r[a++]=e(n[i],t[o])<=0?n[i++]:t[o++];return i<n.length&&r.push.apply(r,n.slice(i)),o<t.length&&r.push.apply(r,t.slice(o)),r}function r(n){if(n.length<=1)return n;var e=Math.floor(n.length/2),i=n.slice(0,e),o=n.slice(e);return i=r(i),o=r(o),t(i,o)}return n.length<2?n.slice():r(n)}function m(n,e){return n.filter(function(n){return e.indexOf(n)<0})}function v(n,e){return n.filter(function(n){return e.indexOf(n)>=0})}function g(n){function e(n){if(1==n.length)return t+="return str === "+JSON.stringify(n[0])+";";t+="switch(str){";for(var e=0;e<n.length;++e)t+="case "+JSON.stringify(n[e])+":";t+="return true}return false;"}n instanceof Array||(n=n.split(" "));var t="",r=[];n:for(var i=0;i<n.length;++i){for(var o=0;o<r.length;++o)if(r[o][0].length==n[i].length){r[o].push(n[i]);continue n}r.push([n[i]])}if(r.length>3){r.sort(function(n,e){return e.length-n.length}),t+="switch(str.length){";for(var i=0;i<r.length;++i){var a=r[i];t+="case "+a[0].length+":",e(a)}t+="}"}else e(n);return new Function("str",t)}function b(n,e){for(var t=n.length;--t>=0;)if(!e(n[t]))return!1;return!0}function y(){this._values=Object.create(null),this._size=0}function A(n,e,t,r){arguments.length<4&&(r=W),e=e?e.split(/\s+/):[];var i=e;r&&r.PROPS&&(e=e.concat(r.PROPS));for(var o="return function AST_"+n+"(props){ if (props) { ",a=e.length;--a>=0;)o+="this."+e[a]+" = props."+e[a]+";";var u=r&&new r;(u&&u.initialize||t&&t.initialize)&&(o+="this.initialize();"),o+="}}";var s=new Function(o)();if(u&&(s.prototype=u,s.BASE=r),r&&r.SUBCLASSES.push(s),s.prototype.CTOR=s,s.PROPS=e||null,s.SELF_PROPS=i,s.SUBCLASSES=[],n&&(s.prototype.TYPE=s.TYPE=n),t)for(a in t)t.hasOwnProperty(a)&&(/^\$/.test(a)?s[a.substr(1)]=t[a]:s.prototype[a]=t[a]);return s.DEFMETHOD=function(n,e){this.prototype[n]=e},s}function w(n,e){n.body instanceof Y?n.body._walk(e):n.body.forEach(function(n){n._walk(e)})}function E(n){this.visit=n,this.stack=[]}function D(n){return n>=97&&122>=n||n>=65&&90>=n||n>=170&&qt.letter.test(String.fromCharCode(n))}function F(n){return n>=48&&57>=n}function S(n){return F(n)||D(n)}function C(n){return qt.non_spacing_mark.test(n)||qt.space_combining_mark.test(n)}function k(n){return qt.connector_punctuation.test(n)}function x(n){return!St(n)&&/^[a-z_$][a-z0-9_$]*$/i.test(n)}function B(n){return 36==n||95==n||D(n)}function T(n){var e=n.charCodeAt(0);return B(e)||F(e)||8204==e||8205==e||C(n)||k(n)}function $(n){return/^[a-z_$][a-z0-9_$]*$/i.test(n)}function O(n){return xt.test(n)?parseInt(n.substr(2),16):Bt.test(n)?parseInt(n.substr(1),8):Tt.test(n)?parseFloat(n):void 0}function M(n,e,t,r){this.message=n,this.line=e,this.col=t,this.pos=r,this.stack=(new Error).stack}function N(n,e,t,r,i){throw new M(n,t,r,i)}function R(n,e,t){return n.type==e&&(null==t||n.value==t)}function q(n,e,t){function r(){return D.text.charAt(D.pos)}function i(n,e){var t=D.text.charAt(D.pos++);if(n&&!t)throw Ht;return"\n"==t?(D.newline_before=D.newline_before||!e,++D.line,D.col=0):++D.col,t}function o(n){for(;n-->0;)i()}function a(n){return D.text.substr(D.pos,n.length)==n}function u(n,e){var t=D.text.indexOf(n,D.pos);if(e&&-1==t)throw Ht;return t}function s(){D.tokline=D.line,D.tokcol=D.col,D.tokpos=D.pos}function c(n,t,r){D.regex_allowed="operator"==n&&!Pt(t)||"keyword"==n&&Ct(t)||"punc"==n&&Mt(t),C="punc"==n&&"."==t;var i={type:n,value:t,line:D.tokline,col:D.tokcol,pos:D.tokpos,endpos:D.pos,nlb:D.newline_before,file:e};if(!r){i.comments_before=D.comments_before,D.comments_before=[];for(var o=0,a=i.comments_before.length;a>o;o++)i.nlb=i.nlb||i.comments_before[o].nlb}return D.newline_before=!1,new L(i)}function f(){for(;Ot(r());)i()}function l(n){for(var e,t="",o=0;(e=r())&&n(e,o++);)t+=i();return t}function p(n){N(n,e,D.tokline,D.tokcol,D.tokpos)}function d(n){var e=!1,t=!1,r=!1,i="."==n,o=l(function(o,a){var u=o.charCodeAt(0);switch(u){case 120:case 88:return r?!1:r=!0;case 101:case 69:return r?!0:e?!1:e=t=!0;case 45:return t||0==a&&!n;case 43:return t;case t=!1,46:return i||r||e?!1:i=!0}return S(u)});n&&(o=n+o);var a=O(o);return isNaN(a)?void p("Invalid syntax: "+o):c("num",a)}function h(n){var e=i(!0,n);switch(e.charCodeAt(0)){case 110:return"\n";case 114:return"\r";case 116:return" ";case 98:return"\b";case 118:return"";case 102:return"\f";case 48:return"\x00";case 120:return String.fromCharCode(_(2));case 117:return String.fromCharCode(_(4));case 10:return"";default:return e}}function _(n){for(var e=0;n>0;--n){var t=parseInt(i(!0),16);isNaN(t)&&p("Invalid hex-character pattern in string"),e=e<<4|t}return e}function m(n){var e,t=D.regex_allowed,r=u("\n");return-1==r?(e=D.text.substr(D.pos),D.pos=D.text.length):(e=D.text.substring(D.pos,r),D.pos=r),D.comments_before.push(c(n,e,!0)),D.regex_allowed=t,E()}function v(){for(var n,e,t=!1,o="",a=!1;null!=(n=r());)if(t)"u"!=n&&p("Expecting UnicodeEscapeSequence -- uXXXX"),n=h(),T(n)||p("Unicode char: "+n.charCodeAt(0)+" is not valid in identifier"),o+=n,t=!1;else if("\\"==n)a=t=!0,i();else{if(!T(n))break;o+=i()}return Dt(o)&&a&&(e=o.charCodeAt(0).toString(16).toUpperCase(),o="\\u"+"0000".substr(e.length)+e+o.slice(1)),o}function g(n){function e(n){if(!r())return n;var t=n+r();return $t(t)?(i(),e(t)):n}return c("operator",e(n||i()))}function b(){switch(i(),r()){case"/":return i(),m("comment1");case"*":return i(),x()}return D.regex_allowed?$(""):g("/")}function y(){return i(),F(r().charCodeAt(0))?d("."):c("punc",".")}function A(){var n=v();return C?c("name",n):Ft(n)?c("atom",n):Dt(n)?$t(n)?c("operator",n):c("keyword",n):c("name",n)}function w(n,e){return function(t){try{return e(t)}catch(r){if(r!==Ht)throw r;p(n)}}}function E(n){if(null!=n)return $(n);if(f(),s(),t){if(a("<!--"))return o(4),m("comment3");if(a("-->")&&D.newline_before)return o(3),m("comment4")}var e=r();if(!e)return c("eof");var u=e.charCodeAt(0);switch(u){case 34:case 39:return k();case 46:return y();case 47:return b()}return F(u)?d():Nt(e)?c("punc",i()):kt(e)?g():92==u||B(u)?A():void p("Unexpected character '"+e+"'")}var D={text:n.replace(/\r\n?|[\n\u2028\u2029]/g,"\n").replace(/\uFEFF/g,""),filename:e,pos:0,tokpos:0,line:1,tokline:0,col:0,tokcol:0,newline_before:!1,regex_allowed:!1,comments_before:[]},C=!1,k=w("Unterminated string constant",function(){for(var n=i(),e="";;){var t=i(!0);if("\\"==t){var r=0,o=null;t=l(function(n){if(n>="0"&&"7">=n){if(!o)return o=n,++r;if("3">=o&&2>=r)return++r;if(o>="4"&&1>=r)return++r}return!1}),t=r>0?String.fromCharCode(parseInt(t,8)):h(!0)}else if(t==n)break;e+=t}return c("string",e)}),x=w("Unterminated multiline comment",function(){var n=D.regex_allowed,e=u("*/",!0),t=D.text.substring(D.pos,e),r=t.split("\n"),i=r.length;D.pos=e+2,D.line+=i-1,i>1?D.col=r[i-1].length:D.col+=r[i-1].length,D.col+=2;var o=D.newline_before=D.newline_before||t.indexOf("\n")>=0;return D.comments_before.push(c("comment2",t,!0)),D.regex_allowed=n,D.newline_before=o,E()}),$=w("Unterminated regular expression",function(n){for(var e,t=!1,r=!1;e=i(!0);)if(t)n+="\\"+e,t=!1;else if("["==e)r=!0,n+=e;else if("]"==e&&r)r=!1,n+=e;else{if("/"==e&&!r)break;"\\"==e?t=!0:n+=e}var o=v();return c("regexp",new RegExp(n,o))});return E.context=function(n){return n&&(D=n),D},E}function H(n,e){function t(n,e){return R(I.token,n,e)}function r(){return I.peeked||(I.peeked=I.input())}function i(){return I.prev=I.token,I.peeked?(I.token=I.peeked,I.peeked=null):I.token=I.input(),I.in_directives=I.in_directives&&("string"==I.token.type||t("punc",";")),I.token}function o(){return I.prev}function u(n,e,t,r){var i=I.input.context();N(n,i.filename,null!=e?e:i.tokline,null!=t?t:i.tokcol,null!=r?r:i.tokpos)}function s(n,e){u(e,n.line,n.col)}function f(n){null==n&&(n=I.token),s(n,"Unexpected token: "+n.type+" ("+n.value+")")}function l(n,e){return t(n,e)?i():void s(I.token,"Unexpected token "+I.token.type+" «"+I.token.value+"», expected "+n+" «"+e+"»")}function p(n){return l("punc",n)}function d(){return!e.strict&&(I.token.nlb||t("eof")||t("punc","}"))}function h(){t("punc",";")?i():d()||f()}function _(){p("(");var n=De(!0);return p(")"),n}function m(n){return function(){var e=I.token,t=n(),r=o();return t.start=e,t.end=r,t}}function v(){(t("operator","/")||t("operator","/="))&&(I.peeked=null,I.token=I.input(I.token.value.substr(1)))}function g(){var n=M(ut);a(function(e){return e.name==n.name},I.labels)&&u("Label "+n.name+" defined twice"),p(":"),I.labels.push(n);var e=U();return I.labels.pop(),e instanceof te||n.references.forEach(function(e){e instanceof Ae&&(e=e.label.start,u("Continue label `"+n.name+"` refers to non-IterationStatement.",e.line,e.col,e.pos))}),new ee({body:e,label:n})}function b(n){return new K({body:(n=De(!0),h(),n)})}function y(n){var e,t=null;d()||(t=M(ct,!0)),null!=t?(e=a(function(n){return n.name==t.name},I.labels),e||u("Undefined label "+t.name),t.thedef=e):0==I.in_loop&&u(n.TYPE+" not inside a loop or switch"),h();var r=new n({label:t});return e&&e.references.push(r),r}function A(){p("(");var n=null;return!t("punc",";")&&(n=t("keyword","var")?(i(),L(!0)):De(!0,!0),t("operator","in"))?(n instanceof Te&&n.definitions.length>1&&u("Only one variable declaration allowed in for..in loop"),i(),E(n)):w(n)}function w(n){p(";");var e=t("punc",";")?null:De(!0);p(";");var r=t("punc",")")?null:De(!0);return p(")"),new ae({init:n,condition:e,step:r,body:j(U)})}function E(n){var e=n instanceof Te?n.definitions[0].name:null,t=De(!0);return p(")"),new ue({init:n,name:e,object:t,body:j(U)})}function D(){var n=_(),e=U(),r=null;return t("keyword","else")&&(i(),r=U()),new we({condition:n,body:e,alternative:r})}function F(){p("{");for(var n=[];!t("punc","}");)t("eof")&&f(),n.push(U());return i(),n}function S(){p("{");for(var n,e=[],r=null,a=null;!t("punc","}");)t("eof")&&f(),t("keyword","case")?(a&&(a.end=o()),r=[],a=new Se({start:(n=I.token,i(),n),expression:De(!0),body:r}),e.push(a),p(":")):t("keyword","default")?(a&&(a.end=o()),r=[],a=new Fe({start:(n=I.token,i(),p(":"),n),body:r}),e.push(a)):(r||f(),r.push(U()));return a&&(a.end=o()),i(),e}function C(){var n=F(),e=null,r=null;if(t("keyword","catch")){var a=I.token;i(),p("(");var s=M(at);p(")"),e=new ke({start:a,argname:s,body:F(),end:o()})}if(t("keyword","finally")){var a=I.token;i(),r=new xe({start:a,body:F(),end:o()})}return e||r||u("Missing catch/finally blocks"),new Ce({body:n,bcatch:e,bfinally:r})}function k(n,e){for(var r=[];r.push(new Oe({start:I.token,name:M(e?tt:et),value:t("operator","=")?(i(),De(!1,n)):null,end:o()})),t("punc",",");)i();return r}function x(){var n,e=I.token;switch(e.type){case"name":case"keyword":n=O(st);break;case"num":n=new dt({start:e,end:e,value:e.value});break;case"string":n=new pt({start:e,end:e,value:e.value});break;case"regexp":n=new ht({start:e,end:e,value:e.value});break;case"atom":switch(e.value){case"false":n=new wt({start:e,end:e});break;case"true":n=new Et({start:e,end:e});break;case"null":n=new mt({start:e,end:e})}}return i(),n}function B(n,e,r){for(var o=!0,a=[];!t("punc",n)&&(o?o=!1:p(","),!e||!t("punc",n));)a.push(t("punc",",")&&r?new bt({start:I.token,end:I.token}):De(!1));return i(),a}function T(){var n=I.token;switch(i(),n.type){case"num":case"string":case"name":case"operator":case"keyword":case"atom":return n.value;default:f()}}function $(){var n=I.token;switch(i(),n.type){case"name":case"operator":case"keyword":case"atom":return n.value;default:f()}}function O(n){var e=I.token.value;return new("this"==e?ft:n)({name:String(e),start:I.token,end:I.token})}function M(n,e){if(!t("name"))return e||u("Name expected"),null;var r=O(n);return i(),r}function H(n,e,t){return"++"!=e&&"--"!=e||P(t)||u("Invalid use of "+e+" operator"),new n({operator:e,expression:t})}function z(n){return _e(le(!0),0,n)}function P(n){return e.strict?n instanceof ft?!1:n instanceof qe||n instanceof Ze:!0}function j(n){++I.in_loop;var e=n();return--I.in_loop,e}e=c(e,{strict:!1,filename:null,toplevel:null,expression:!1,html5_comments:!0});var I={input:"string"==typeof n?q(n,e.filename,e.html5_comments):n,token:null,prev:null,peeked:null,in_function:0,in_directives:!0,in_loop:0,labels:[]};I.token=i();var U=m(function(){var n;switch(v(),I.token.type){case"string":var e=I.in_directives,a=b();return e&&a.body instanceof pt&&!t("punc",",")?new G({value:a.body.value}):a;case"num":case"regexp":case"operator":case"atom":return b();case"name":return R(r(),"punc",":")?g():b();case"punc":switch(I.token.value){case"{":return new Z({start:I.token,body:F(),end:o()});case"[":case"(":return b();case";":return i(),new Q;default:f()}case"keyword":switch(n=I.token.value,i(),n){case"break":return y(ye);case"continue":return y(Ae);case"debugger":return h(),new X;case"do":return new ie({body:j(U),condition:(l("keyword","while"),n=_(),h(),n)});case"while":return new oe({condition:_(),body:j(U)});case"for":return A();case"function":return V(he);case"if":return D();case"return":return 0==I.in_function&&u("'return' outside of function"),new ve({value:t("punc",";")?(i(),null):d()?null:(n=De(!0),h(),n)});case"switch":return new Ee({expression:_(),body:j(S)});case"throw":return I.token.nlb&&u("Illegal newline after 'throw'"),new ge({value:(n=De(!0),h(),n)});case"try":return C();case"var":return n=L(),h(),n;case"const":return n=W(),h(),n;case"with":return new se({expression:_(),body:U()});default:f()}}}),V=function(n){var e=n===he,r=t("name")?M(e?it:ot):null;return e&&!r&&f(),p("("),new n({name:r,argnames:function(n,e){for(;!t("punc",")");)n?n=!1:p(","),e.push(M(rt));return i(),e}(!0,[]),body:function(n,e){++I.in_function,I.in_directives=!0,I.in_loop=0,I.labels=[];var t=F();return--I.in_function,I.in_loop=n,I.labels=e,t}(I.in_loop,I.labels)})},L=function(n){return new Te({start:o(),definitions:k(n,!1),end:o()})},W=function(){return new $e({start:o(),definitions:k(!1,!0),end:o()})},Y=function(){var n=I.token;l("operator","new");var e,r=J(!1);return t("punc","(")?(i(),e=B(")")):e=[],ce(new Ne({start:n,expression:r,args:e,end:o()}),!0)},J=function(n){if(t("operator","new"))return Y();var e=I.token;if(t("punc")){switch(e.value){case"(":i();var r=De(!0);return r.start=e,r.end=I.token,p(")"),ce(r,n);case"[":return ce(ne(),n);case"{":return ce(re(),n)}f()}if(t("keyword","function")){i();var a=V(de);return a.start=e,a.end=o(),ce(a,n)}return Vt[I.token.type]?ce(x(),n):void f()},ne=m(function(){return p("["),new We({elements:B("]",!e.strict,!0)})}),re=m(function(){p("{");for(var n=!0,r=[];!t("punc","}")&&(n?n=!1:p(","),e.strict||!t("punc","}"));){var a=I.token,u=a.type,s=T();if("name"==u&&!t("punc",":")){if("get"==s){r.push(new Je({start:a,key:x(),value:V(pe),end:o()}));continue}if("set"==s){r.push(new Ke({start:a,key:x(),value:V(pe),end:o()}));continue}}p(":"),r.push(new Ge({start:a,key:s,value:De(!1),end:o()}))}return i(),new Ye({properties:r})}),ce=function(n,e){var r=n.start;if(t("punc","."))return i(),ce(new He({start:r,expression:n,property:$(),end:o()}),e);if(t("punc","[")){i();var a=De(!0);return p("]"),ce(new ze({start:r,expression:n,property:a,end:o()}),e)}return e&&t("punc","(")?(i(),ce(new Me({start:r,expression:n,args:B(")"),end:o()}),!0)):n},le=function(n){var e=I.token;if(t("operator")&&zt(e.value)){i(),v();var r=H(je,e.value,le(n));return r.start=e,r.end=o(),r}for(var a=J(n);t("operator")&&Pt(I.token.value)&&!I.token.nlb;)a=H(Ie,I.token.value,a),a.start=e,a.end=I.token,i();return a},_e=function(n,e,r){var o=t("operator")?I.token.value:null;"in"==o&&r&&(o=null);var a=null!=o?It[o]:null;if(null!=a&&a>e){i();var u=_e(le(!0),a,r);return _e(new Ue({start:n.start,left:n,operator:o,right:u,end:u.end}),e,r)}return n},me=function(n){var e=I.token,r=z(n);if(t("operator","?")){i();var a=De(!1);return p(":"),new Ve({start:e,condition:r,consequent:a,alternative:De(!1,n),end:o()})}return r},be=function(n){var e=I.token,r=me(n),a=I.token.value;if(t("operator")&&jt(a)){if(P(r))return i(),new Le({start:e,left:r,operator:a,right:be(n),end:o()});u("Invalid assignment")}return r},De=function(n,e){var o=I.token,a=be(e);return n&&t("punc",",")?(i(),new Re({start:o,car:a,cdr:De(!0,e),end:r()})):a};return e.expression?De(!0):function(){for(var n=I.token,r=[];!t("eof");)r.push(U());var i=o(),a=e.toplevel;return a?(a.body=a.body.concat(r),a.end=i):a=new fe({start:n,body:r,end:i}),a}()}function z(n,e){E.call(this),this.before=n,this.after=e}function P(n,e,t){this.name=t.name,this.orig=[t],this.scope=n,this.references=[],this.global=!1,this.mangled_name=null,this.undeclared=!1,this.constant=!1,this.index=e}function j(n){function e(n,e){return n.replace(/[\u0080-\uffff]/g,function(n){var t=n.charCodeAt(0).toString(16);if(t.length<=2&&!e){for(;t.length<2;)t="0"+t;return"\\x"+t}for(;t.length<4;)t="0"+t;return"\\u"+t})}function t(t){var r=0,i=0;return t=t.replace(/[\\\b\f\n\r\t\x22\x27\u2028\u2029\0]/g,function(n){switch(n){case"\\":return"\\\\";case"\b":return"\\b";case"\f":return"\\f";case"\n":return"\\n";case"\r":return"\\r";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";case'"':return++r,'"';case"'":return++i,"'";case"\x00":return"\\x00"}return n}),n.ascii_only&&(t=e(t)),r>i?"'"+t.replace(/\x27/g,"\\'")+"'":'"'+t.replace(/\x22/g,'\\"')+'"'}function r(e){var r=t(e);return n.inline_script&&(r=r.replace(/<\x2fscript([>\/\t\n\f\r ])/gi,"<\\/script$1")),r}function i(t){return t=t.toString(),n.ascii_only&&(t=e(t,!0)),t}function o(e){return u(" ",n.indent_start+A-e*n.indent_level)}function a(){return k.charAt(k.length-1)}function s(){n.max_line_len&&w>n.max_line_len&&f("\n")}function f(e){e=String(e);var t=e.charAt(0);if(C&&(t&&!(";}".indexOf(t)<0)||/[;]$/.test(k)||(n.semicolons||x(t)?(F+=";",w++,D++):(F+="\n",D++,E++,w=0),n.beautify||(S=!1)),C=!1,s()),!n.beautify&&n.preserve_line&&q[q.length-1])for(var r=q[q.length-1].start.line;r>E;)F+="\n",D++,E++,w=0,S=!1;if(S){var i=a();(T(i)&&(T(t)||"\\"==t)||/^[\+\-\/]$/.test(t)&&t==i)&&(F+=" ",w++,D++),S=!1}var o=e.split(/\r?\n/),u=o.length-1;E+=u,0==u?w+=o[u].length:w=o[u].length,D+=e.length,k=e,F+=e}function p(){C=!1,f(";")}function d(){return A+n.indent_level}function h(n){var e;return f("{"),M(),O(d(),function(){e=n()}),$(),f("}"),e}function _(n){f("(");var e=n();return f(")"),e}function m(n){f("[");var e=n();return f("]"),e}function v(){f(","),B()}function b(){f(":"),n.space_colon&&B()}function y(){return F}n=c(n,{indent_start:0,indent_level:4,quote_keys:!1,space_colon:!0,ascii_only:!1,unescape_regexps:!1,inline_script:!1,width:80,max_line_len:32e3,beautify:!1,source_map:null,bracketize:!1,semicolons:!0,comments:!1,preserve_line:!1,screw_ie8:!1,preamble:null},!0);var A=0,w=0,E=1,D=0,F="",S=!1,C=!1,k=null,x=g("( [ + * / - , ."),B=n.beautify?function(){f(" ")}:function(){S=!0},$=n.beautify?function(e){n.beautify&&f(o(e?.5:0))}:l,O=n.beautify?function(n,e){n===!0&&(n=d());var t=A;A=n;var r=e();return A=t,r}:function(n,e){return e()},M=n.beautify?function(){f("\n")}:l,N=n.beautify?function(){f(";")}:function(){C=!0},R=n.source_map?function(e,t){try{e&&n.source_map.add(e.file||"?",E,w,e.line,e.col,t||"name"!=e.type?t:e.value)}catch(r){W.warn("Couldn't figure out mapping for {file}:{line},{col} → {cline},{ccol} [{name}]",{file:e.file,line:e.line,col:e.col,cline:E,ccol:w,name:t||""})}}:l;n.preamble&&f(n.preamble.replace(/\r\n?|[\n\u2028\u2029]|\s*$/g,"\n"));var q=[];return{get:y,toString:y,indent:$,indentation:function(){return A},current_width:function(){return w-A},should_break:function(){return n.width&&this.current_width()>=n.width},newline:M,print:f,space:B,comma:v,colon:b,last:function(){return k},semicolon:N,force_semicolon:p,to_ascii:e,print_name:function(n){f(i(n))},print_string:function(n){f(r(n))},next_indent:d,with_indent:O,with_block:h,with_parens:_,with_square:m,add_mapping:R,option:function(e){return n[e]},line:function(){return E},col:function(){return w},pos:function(){return D},push_node:function(n){q.push(n)},pop_node:function(){return q.pop()},stack:function(){return q},parent:function(n){return q[q.length-2-(n||0)]}}}function I(n,e){return this instanceof I?(z.call(this,this.before,this.after),void(this.options=c(n,{sequences:!e,properties:!e,dead_code:!e,drop_debugger:!e,unsafe:!1,unsafe_comps:!1,conditionals:!e,comparisons:!e,evaluate:!e,booleans:!e,loops:!e,unused:!e,hoist_funs:!e,keep_fargs:!1,hoist_vars:!1,if_return:!e,join_vars:!e,cascade:!e,side_effects:!e,pure_getters:!1,pure_funcs:null,negate_iife:!e,screw_ie8:!1,drop_console:!1,angular:!1,warnings:!0,global_defs:{}},!0))):new I(n,e)}function U(n){function e(e,i,o,a,u,s){if(r){var c=r.originalPositionFor({line:a,column:u});if(null===c.source)return;e=c.source,a=c.line,u=c.column,s=c.name}t.addMapping({generated:{line:i+n.dest_line_diff,column:o},original:{line:a+n.orig_line_diff,column:u},source:e,name:s})}n=c(n,{file:null,root:null,orig:null,orig_line_diff:0,dest_line_diff:0});var t=new MOZ_SourceMap.SourceMapGenerator({file:n.file,sourceRoot:n.root}),r=n.orig&&new MOZ_SourceMap.SourceMapConsumer(n.orig);return{add:e,get:function(){return t},toString:function(){return t.toString()}}}e.UglifyJS=n,s.prototype=Object.create(Error.prototype),s.prototype.constructor=s,s.croak=function(n,e){throw new s(n,e)};var V=function(){function n(n,o,a){function u(){var u=o(n[s],s),l=u instanceof r;return l&&(u=u.v),u instanceof e?(u=u.v,u instanceof t?f.push.apply(f,a?u.v.slice().reverse():u.v):f.push(u)):u!==i&&(u instanceof t?c.push.apply(c,a?u.v.slice().reverse():u.v):c.push(u)),l}var s,c=[],f=[];if(n instanceof Array)if(a){for(s=n.length;--s>=0&&!u(););c.reverse(),f.reverse()}else for(s=0;s<n.length&&!u();++s);else for(s in n)if(n.hasOwnProperty(s)&&u())break;return f.concat(c)}function e(n){this.v=n}function t(n){this.v=n}function r(n){this.v=n}n.at_top=function(n){return new e(n)},n.splice=function(n){return new t(n)},n.last=function(n){return new r(n)};var i=n.skip={};return n}();y.prototype={set:function(n,e){return this.has(n)||++this._size,this._values["$"+n]=e,this},add:function(n,e){return this.has(n)?this.get(n).push(e):this.set(n,[e]),this},get:function(n){return this._values["$"+n]},del:function(n){return this.has(n)&&(--this._size,delete this._values["$"+n]),this},has:function(n){return"$"+n in this._values},each:function(n){for(var e in this._values)n(this._values[e],e.substr(1))},size:function(){return this._size},map:function(n){var e=[];for(var t in this._values)e.push(n(this._values[t],t.substr(1)));return e}};var L=A("Token","type value line col pos endpos nlb comments_before file",{},null),W=A("Node","start end",{clone:function(){return new this.CTOR(this)},$documentation:"Base class of all AST nodes",$propdoc:{start:"[AST_Token] The first token of this node",end:"[AST_Token] The last token of this node"},_walk:function(n){return n._visit(this)},walk:function(n){return this._walk(n)}},null);W.warn_function=null,W.warn=function(n,e){W.warn_function&&W.warn_function(d(n,e))};var Y=A("Statement",null,{$documentation:"Base class of all statements"}),X=A("Debugger",null,{$documentation:"Represents a debugger statement"},Y),G=A("Directive","value scope",{$documentation:'Represents a directive, like "use strict";',$propdoc:{value:"[string] The value of this directive as a plain string (it's not an AST_String!)",scope:"[AST_Scope/S] The scope that this directive affects"}},Y),K=A("SimpleStatement","body",{$documentation:"A statement consisting of an expression, i.e. a = 1 + 2",$propdoc:{body:"[AST_Node] an expression node (should not be instanceof AST_Statement)"},_walk:function(n){return n._visit(this,function(){this.body._walk(n)})}},Y),J=A("Block","body",{$documentation:"A body of statements (usually bracketed)",$propdoc:{body:"[AST_Statement*] an array of statements"},_walk:function(n){return n._visit(this,function(){w(this,n)})}},Y),Z=A("BlockStatement",null,{$documentation:"A block statement"},J),Q=A("EmptyStatement",null,{$documentation:"The empty statement (empty block or simply a semicolon)",_walk:function(n){return n._visit(this)}},Y),ne=A("StatementWithBody","body",{$documentation:"Base class for all statements that contain one nested body: `For`, `ForIn`, `Do`, `While`, `With`",$propdoc:{body:"[AST_Statement] the body; this should always be present, even if it's an AST_EmptyStatement"},_walk:function(n){return n._visit(this,function(){this.body._walk(n)})}},Y),ee=A("LabeledStatement","label",{$documentation:"Statement with a label",$propdoc:{label:"[AST_Label] a label definition"},_walk:function(n){return n._visit(this,function(){this.label._walk(n),this.body._walk(n)})}},ne),te=A("IterationStatement",null,{$documentation:"Internal class. All loops inherit from it."},ne),re=A("DWLoop","condition",{$documentation:"Base class for do/while statements",$propdoc:{condition:"[AST_Node] the loop condition. Should not be instanceof AST_Statement"},_walk:function(n){return n._visit(this,function(){this.condition._walk(n),this.body._walk(n)})}},te),ie=A("Do",null,{$documentation:"A `do` statement"},re),oe=A("While",null,{$documentation:"A `while` statement"},re),ae=A("For","init condition step",{$documentation:"A `for` statement",$propdoc:{init:"[AST_Node?] the `for` initialization code, or null if empty",condition:"[AST_Node?] the `for` termination clause, or null if empty",step:"[AST_Node?] the `for` update clause, or null if empty"},_walk:function(n){return n._visit(this,function(){this.init&&this.init._walk(n),this.condition&&this.condition._walk(n),this.step&&this.step._walk(n),this.body._walk(n)})}},te),ue=A("ForIn","init name object",{$documentation:"A `for ... in` statement",$propdoc:{init:"[AST_Node] the `for/in` initialization code",name:"[AST_SymbolRef?] the loop variable, only if `init` is AST_Var",object:"[AST_Node] the object that we're looping through"},_walk:function(n){return n._visit(this,function(){this.init._walk(n),this.object._walk(n),this.body._walk(n)})}},te),se=A("With","expression",{$documentation:"A `with` statement",$propdoc:{expression:"[AST_Node] the `with` expression"},_walk:function(n){return n._visit(this,function(){this.expression._walk(n),this.body._walk(n)})}},ne),ce=A("Scope","directives variables functions uses_with uses_eval parent_scope enclosed cname",{$documentation:"Base class for all statements introducing a lexical scope",$propdoc:{directives:"[string*/S] an array of directives declared in this scope",variables:"[Object/S] a map of name -> SymbolDef for all variables/functions defined in this scope",functions:"[Object/S] like `variables`, but only lists function declarations",uses_with:"[boolean/S] tells whether this scope uses the `with` statement",uses_eval:"[boolean/S] tells whether this scope contains a direct call to the global `eval`",parent_scope:"[AST_Scope?/S] link to the parent scope",enclosed:"[SymbolDef*/S] a list of all symbol definitions that are accessed from this scope or any subscopes",cname:"[integer/S] current index for mangling variables (used internally by the mangler)"}},J),fe=A("Toplevel","globals",{$documentation:"The toplevel scope",$propdoc:{globals:"[Object/S] a map of name -> SymbolDef for all undeclared names"},wrap_enclose:function(n){var e=this,t=[],r=[];n.forEach(function(n){var e=n.lastIndexOf(":");t.push(n.substr(0,e)),r.push(n.substr(e+1))});var i="(function("+r.join(",")+"){ '$ORIG'; })("+t.join(",")+")";return i=H(i),i=i.transform(new z(function(n){return n instanceof G&&"$ORIG"==n.value?V.splice(e.body):void 0}))},wrap_commonjs:function(n,e){var t=this,r=[];e&&(t.figure_out_scope(),t.walk(new E(function(n){n instanceof nt&&n.definition().global&&(a(function(e){return e.name==n.name},r)||r.push(n))})));var i="(function(exports, global){ global['"+n+"'] = exports; '$ORIG'; '$EXPORTS'; }({}, (function(){return this}())))";return i=H(i),i=i.transform(new z(function(n){if(n instanceof K&&(n=n.body,n instanceof pt))switch(n.getValue()){case"$ORIG":return V.splice(t.body);case"$EXPORTS":var e=[];return r.forEach(function(n){e.push(new K({body:new Le({left:new ze({expression:new st({name:"exports"}),property:new pt({value:n.name})}),operator:"=",right:new st(n)})}))}),V.splice(e)}}))}},ce),le=A("Lambda","name argnames uses_arguments",{$documentation:"Base class for functions",$propdoc:{name:"[AST_SymbolDeclaration?] the name of this function",argnames:"[AST_SymbolFunarg*] array of function arguments",uses_arguments:"[boolean/S] tells whether this function accesses the arguments array"},_walk:function(n){return n._visit(this,function(){this.name&&this.name._walk(n),this.argnames.forEach(function(e){e._walk(n)}),w(this,n)})}},ce),pe=A("Accessor",null,{$documentation:"A setter/getter function. The `name` property is always null."},le),de=A("Function",null,{$documentation:"A function expression"},le),he=A("Defun",null,{$documentation:"A function definition"},le),_e=A("Jump",null,{$documentation:"Base class for “jumps” (for now that's `return`, `throw`, `break` and `continue`)"},Y),me=A("Exit","value",{$documentation:"Base class for “exits” (`return` and `throw`)",$propdoc:{value:"[AST_Node?] the value returned or thrown by this statement; could be null for AST_Return"},_walk:function(n){return n._visit(this,this.value&&function(){this.value._walk(n)})}},_e),ve=A("Return",null,{$documentation:"A `return` statement"},me),ge=A("Throw",null,{$documentation:"A `throw` statement"},me),be=A("LoopControl","label",{$documentation:"Base class for loop control statements (`break` and `continue`)",$propdoc:{label:"[AST_LabelRef?] the label, or null if none"},_walk:function(n){return n._visit(this,this.label&&function(){this.label._walk(n)})}},_e),ye=A("Break",null,{$documentation:"A `break` statement"},be),Ae=A("Continue",null,{$documentation:"A `continue` statement"},be),we=A("If","condition alternative",{$documentation:"A `if` statement",$propdoc:{condition:"[AST_Node] the `if` condition",alternative:"[AST_Statement?] the `else` part, or null if not present"},_walk:function(n){return n._visit(this,function(){this.condition._walk(n),this.body._walk(n),this.alternative&&this.alternative._walk(n)})}},ne),Ee=A("Switch","expression",{$documentation:"A `switch` statement",$propdoc:{expression:"[AST_Node] the `switch` “discriminant”"},_walk:function(n){return n._visit(this,function(){this.expression._walk(n),w(this,n)})}},J),De=A("SwitchBranch",null,{$documentation:"Base class for `switch` branches"},J),Fe=A("Default",null,{$documentation:"A `default` switch branch"},De),Se=A("Case","expression",{$documentation:"A `case` switch branch",$propdoc:{expression:"[AST_Node] the `case` expression"},_walk:function(n){return n._visit(this,function(){this.expression._walk(n),w(this,n)})}},De),Ce=A("Try","bcatch bfinally",{$documentation:"A `try` statement",$propdoc:{bcatch:"[AST_Catch?] the catch block, or null if not present",bfinally:"[AST_Finally?] the finally block, or null if not present"},_walk:function(n){return n._visit(this,function(){w(this,n),this.bcatch&&this.bcatch._walk(n),this.bfinally&&this.bfinally._walk(n)})}},J),ke=A("Catch","argname",{$documentation:"A `catch` node; only makes sense as part of a `try` statement",$propdoc:{argname:"[AST_SymbolCatch] symbol for the exception"},_walk:function(n){return n._visit(this,function(){this.argname._walk(n),w(this,n)
-})}},J),xe=A("Finally",null,{$documentation:"A `finally` node; only makes sense as part of a `try` statement"},J),Be=A("Definitions","definitions",{$documentation:"Base class for `var` or `const` nodes (variable declarations/initializations)",$propdoc:{definitions:"[AST_VarDef*] array of variable definitions"},_walk:function(n){return n._visit(this,function(){this.definitions.forEach(function(e){e._walk(n)})})}},Y),Te=A("Var",null,{$documentation:"A `var` statement"},Be),$e=A("Const",null,{$documentation:"A `const` statement"},Be),Oe=A("VarDef","name value",{$documentation:"A variable declaration; only appears in a AST_Definitions node",$propdoc:{name:"[AST_SymbolVar|AST_SymbolConst] name of the variable",value:"[AST_Node?] initializer, or null of there's no initializer"},_walk:function(n){return n._visit(this,function(){this.name._walk(n),this.value&&this.value._walk(n)})}}),Me=A("Call","expression args",{$documentation:"A function call expression",$propdoc:{expression:"[AST_Node] expression to invoke as function",args:"[AST_Node*] array of arguments"},_walk:function(n){return n._visit(this,function(){this.expression._walk(n),this.args.forEach(function(e){e._walk(n)})})}}),Ne=A("New",null,{$documentation:"An object instantiation. Derives from a function call since it has exactly the same properties"},Me),Re=A("Seq","car cdr",{$documentation:"A sequence expression (two comma-separated expressions)",$propdoc:{car:"[AST_Node] first element in sequence",cdr:"[AST_Node] second element in sequence"},$cons:function(n,e){var t=new Re(n);return t.car=n,t.cdr=e,t},$from_array:function(n){if(0==n.length)return null;if(1==n.length)return n[0].clone();for(var e=null,t=n.length;--t>=0;)e=Re.cons(n[t],e);for(var r=e;r;){if(r.cdr&&!r.cdr.cdr){r.cdr=r.cdr.car;break}r=r.cdr}return e},to_array:function(){for(var n=this,e=[];n;){if(e.push(n.car),n.cdr&&!(n.cdr instanceof Re)){e.push(n.cdr);break}n=n.cdr}return e},add:function(n){for(var e=this;e;){if(!(e.cdr instanceof Re)){var t=Re.cons(e.cdr,n);return e.cdr=t}e=e.cdr}},_walk:function(n){return n._visit(this,function(){this.car._walk(n),this.cdr&&this.cdr._walk(n)})}}),qe=A("PropAccess","expression property",{$documentation:'Base class for property access expressions, i.e. `a.foo` or `a["foo"]`',$propdoc:{expression:"[AST_Node] the “container” expression",property:"[AST_Node|string] the property to access. For AST_Dot this is always a plain string, while for AST_Sub it's an arbitrary AST_Node"}}),He=A("Dot",null,{$documentation:"A dotted property access expression",_walk:function(n){return n._visit(this,function(){this.expression._walk(n)})}},qe),ze=A("Sub",null,{$documentation:'Index-style property access, i.e. `a["foo"]`',_walk:function(n){return n._visit(this,function(){this.expression._walk(n),this.property._walk(n)})}},qe),Pe=A("Unary","operator expression",{$documentation:"Base class for unary expressions",$propdoc:{operator:"[string] the operator",expression:"[AST_Node] expression that this unary operator applies to"},_walk:function(n){return n._visit(this,function(){this.expression._walk(n)})}}),je=A("UnaryPrefix",null,{$documentation:"Unary prefix expression, i.e. `typeof i` or `++i`"},Pe),Ie=A("UnaryPostfix",null,{$documentation:"Unary postfix expression, i.e. `i++`"},Pe),Ue=A("Binary","left operator right",{$documentation:"Binary expression, i.e. `a + b`",$propdoc:{left:"[AST_Node] left-hand side expression",operator:"[string] the operator",right:"[AST_Node] right-hand side expression"},_walk:function(n){return n._visit(this,function(){this.left._walk(n),this.right._walk(n)})}}),Ve=A("Conditional","condition consequent alternative",{$documentation:"Conditional expression using the ternary operator, i.e. `a ? b : c`",$propdoc:{condition:"[AST_Node]",consequent:"[AST_Node]",alternative:"[AST_Node]"},_walk:function(n){return n._visit(this,function(){this.condition._walk(n),this.consequent._walk(n),this.alternative._walk(n)})}}),Le=A("Assign",null,{$documentation:"An assignment expression — `a = b + 5`"},Ue),We=A("Array","elements",{$documentation:"An array literal",$propdoc:{elements:"[AST_Node*] array of elements"},_walk:function(n){return n._visit(this,function(){this.elements.forEach(function(e){e._walk(n)})})}}),Ye=A("Object","properties",{$documentation:"An object literal",$propdoc:{properties:"[AST_ObjectProperty*] array of properties"},_walk:function(n){return n._visit(this,function(){this.properties.forEach(function(e){e._walk(n)})})}}),Xe=A("ObjectProperty","key value",{$documentation:"Base class for literal object properties",$propdoc:{key:"[string] the property name converted to a string for ObjectKeyVal. For setters and getters this is an arbitrary AST_Node.",value:"[AST_Node] property value. For setters and getters this is an AST_Function."},_walk:function(n){return n._visit(this,function(){this.value._walk(n)})}}),Ge=A("ObjectKeyVal",null,{$documentation:"A key: value object property"},Xe),Ke=A("ObjectSetter",null,{$documentation:"An object setter property"},Xe),Je=A("ObjectGetter",null,{$documentation:"An object getter property"},Xe),Ze=A("Symbol","scope name thedef",{$propdoc:{name:"[string] name of this symbol",scope:"[AST_Scope/S] the current scope (not necessarily the definition scope)",thedef:"[SymbolDef/S] the definition of this symbol"},$documentation:"Base class for all symbols"}),Qe=A("SymbolAccessor",null,{$documentation:"The name of a property accessor (setter/getter function)"},Ze),nt=A("SymbolDeclaration","init",{$documentation:"A declaration symbol (symbol in var/const, function name or argument, symbol in catch)",$propdoc:{init:"[AST_Node*/S] array of initializers for this declaration."}},Ze),et=A("SymbolVar",null,{$documentation:"Symbol defining a variable"},nt),tt=A("SymbolConst",null,{$documentation:"A constant declaration"},nt),rt=A("SymbolFunarg",null,{$documentation:"Symbol naming a function argument"},et),it=A("SymbolDefun",null,{$documentation:"Symbol defining a function"},nt),ot=A("SymbolLambda",null,{$documentation:"Symbol naming a function expression"},nt),at=A("SymbolCatch",null,{$documentation:"Symbol naming the exception in catch"},nt),ut=A("Label","references",{$documentation:"Symbol naming a label (declaration)",$propdoc:{references:"[AST_LoopControl*] a list of nodes referring to this label"},initialize:function(){this.references=[],this.thedef=this}},Ze),st=A("SymbolRef",null,{$documentation:"Reference to some symbol (not definition/declaration)"},Ze),ct=A("LabelRef",null,{$documentation:"Reference to a label symbol"},Ze),ft=A("This",null,{$documentation:"The `this` symbol"},Ze),lt=A("Constant",null,{$documentation:"Base class for all constants",getValue:function(){return this.value}}),pt=A("String","value",{$documentation:"A string literal",$propdoc:{value:"[string] the contents of this string"}},lt),dt=A("Number","value",{$documentation:"A number literal",$propdoc:{value:"[number] the numeric value"}},lt),ht=A("RegExp","value",{$documentation:"A regexp literal",$propdoc:{value:"[RegExp] the actual regexp"}},lt),_t=A("Atom",null,{$documentation:"Base class for atoms"},lt),mt=A("Null",null,{$documentation:"The `null` atom",value:null},_t),vt=A("NaN",null,{$documentation:"The impossible value",value:0/0},_t),gt=A("Undefined",null,{$documentation:"The `undefined` value",value:void 0},_t),bt=A("Hole",null,{$documentation:"A hole in an array",value:void 0},_t),yt=A("Infinity",null,{$documentation:"The `Infinity` value",value:1/0},_t),At=A("Boolean",null,{$documentation:"Base class for booleans"},_t),wt=A("False",null,{$documentation:"The `false` atom",value:!1},At),Et=A("True",null,{$documentation:"The `true` atom",value:!0},At);E.prototype={_visit:function(n,e){this.stack.push(n);var t=this.visit(n,e?function(){e.call(n)}:l);return!t&&e&&e.call(n),this.stack.pop(),t},parent:function(n){return this.stack[this.stack.length-2-(n||0)]},push:function(n){this.stack.push(n)},pop:function(){return this.stack.pop()},self:function(){return this.stack[this.stack.length-1]},find_parent:function(n){for(var e=this.stack,t=e.length;--t>=0;){var r=e[t];if(r instanceof n)return r}},has_directive:function(n){return this.find_parent(ce).has_directive(n)},in_boolean_context:function(){for(var n=this.stack,e=n.length,t=n[--e];e>0;){var r=n[--e];if(r instanceof we&&r.condition===t||r instanceof Ve&&r.condition===t||r instanceof re&&r.condition===t||r instanceof ae&&r.condition===t||r instanceof je&&"!"==r.operator&&r.expression===t)return!0;if(!(r instanceof Ue)||"&&"!=r.operator&&"||"!=r.operator)return!1;t=r}},loopcontrol_target:function(n){var e=this.stack;if(n)for(var t=e.length;--t>=0;){var r=e[t];if(r instanceof ee&&r.label.name==n.name)return r.body}else for(var t=e.length;--t>=0;){var r=e[t];if(r instanceof Ee||r instanceof te)return r}}};var Dt="break case catch const continue debugger default delete do else finally for function if in instanceof new return switch throw try typeof var void while with",Ft="false null true",St="abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized this throws transient volatile yield "+Ft+" "+Dt,Ct="return new delete throw else case";Dt=g(Dt),St=g(St),Ct=g(Ct),Ft=g(Ft);var kt=g(i("+-*&%=<>!?|~^")),xt=/^0x[0-9a-f]+$/i,Bt=/^0[0-7]+$/,Tt=/^\d*\.?\d*(?:e[+-]?\d*(?:\d\.?|\.?\d)\d*)?$/i,$t=g(["in","instanceof","typeof","new","void","delete","++","--","+","-","!","~","&","|","^","*","/","%",">>","<<",">>>","<",">","<=",">=","==","===","!=","!==","?","=","+=","-=","/=","*=","%=",">>=","<<=",">>>=","|=","^=","&=","&&","||"]),Ot=g(i(" \n\r \f ")),Mt=g(i("[{(,.;:")),Nt=g(i("[]{}(),;:")),Rt=g(i("gmsiy")),qt={letter:new RegExp("[\\u0041-\\u005A\\u0061-\\u007A\\u00AA\\u00B5\\u00BA\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0370-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u048A-\\u0523\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0621-\\u064A\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06E5\\u06E6\\u06EE\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07CA-\\u07EA\\u07F4\\u07F5\\u07FA\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0971\\u0972\\u097B-\\u097F\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BD\\u09CE\\u09DC\\u09DD\\u09DF-\\u09E1\\u09F0\\u09F1\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A59-\\u0A5C\\u0A5E\\u0A72-\\u0A74\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABD\\u0AD0\\u0AE0\\u0AE1\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3D\\u0B5C\\u0B5D\\u0B5F-\\u0B61\\u0B71\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BD0\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C33\\u0C35-\\u0C39\\u0C3D\\u0C58\\u0C59\\u0C60\\u0C61\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBD\\u0CDE\\u0CE0\\u0CE1\\u0D05-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D28\\u0D2A-\\u0D39\\u0D3D\\u0D60\\u0D61\\u0D7A-\\u0D7F\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0E01-\\u0E30\\u0E32\\u0E33\\u0E40-\\u0E46\\u0E81\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB0\\u0EB2\\u0EB3\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EDC\\u0EDD\\u0F00\\u0F40-\\u0F47\\u0F49-\\u0F6C\\u0F88-\\u0F8B\\u1000-\\u102A\\u103F\\u1050-\\u1055\\u105A-\\u105D\\u1061\\u1065\\u1066\\u106E-\\u1070\\u1075-\\u1081\\u108E\\u10A0-\\u10C5\\u10D0-\\u10FA\\u10FC\\u1100-\\u1159\\u115F-\\u11A2\\u11A8-\\u11F9\\u1200-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u1380-\\u138F\\u13A0-\\u13F4\\u1401-\\u166C\\u166F-\\u1676\\u1681-\\u169A\\u16A0-\\u16EA\\u1700-\\u170C\\u170E-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17D7\\u17DC\\u1820-\\u1877\\u1880-\\u18A8\\u18AA\\u1900-\\u191C\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19A9\\u19C1-\\u19C7\\u1A00-\\u1A16\\u1B05-\\u1B33\\u1B45-\\u1B4B\\u1B83-\\u1BA0\\u1BAE\\u1BAF\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C7D\\u1D00-\\u1DBF\\u1E00-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u2071\\u207F\\u2090-\\u2094\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2183\\u2184\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2C6F\\u2C71-\\u2C7D\\u2C80-\\u2CE4\\u2D00-\\u2D25\\u2D30-\\u2D65\\u2D6F\\u2D80-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2E2F\\u3005\\u3006\\u3031-\\u3035\\u303B\\u303C\\u3041-\\u3096\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u31A0-\\u31B7\\u31F0-\\u31FF\\u3400\\u4DB5\\u4E00\\u9FC3\\uA000-\\uA48C\\uA500-\\uA60C\\uA610-\\uA61F\\uA62A\\uA62B\\uA640-\\uA65F\\uA662-\\uA66E\\uA67F-\\uA697\\uA717-\\uA71F\\uA722-\\uA788\\uA78B\\uA78C\\uA7FB-\\uA801\\uA803-\\uA805\\uA807-\\uA80A\\uA80C-\\uA822\\uA840-\\uA873\\uA882-\\uA8B3\\uA90A-\\uA925\\uA930-\\uA946\\uAA00-\\uAA28\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAC00\\uD7A3\\uF900-\\uFA2D\\uFA30-\\uFA6A\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D\\uFB1F-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF21-\\uFF3A\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC]"),non_spacing_mark:new RegExp("[\\u0300-\\u036F\\u0483-\\u0487\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u0610-\\u061A\\u064B-\\u065E\\u0670\\u06D6-\\u06DC\\u06DF-\\u06E4\\u06E7\\u06E8\\u06EA-\\u06ED\\u0711\\u0730-\\u074A\\u07A6-\\u07B0\\u07EB-\\u07F3\\u0816-\\u0819\\u081B-\\u0823\\u0825-\\u0827\\u0829-\\u082D\\u0900-\\u0902\\u093C\\u0941-\\u0948\\u094D\\u0951-\\u0955\\u0962\\u0963\\u0981\\u09BC\\u09C1-\\u09C4\\u09CD\\u09E2\\u09E3\\u0A01\\u0A02\\u0A3C\\u0A41\\u0A42\\u0A47\\u0A48\\u0A4B-\\u0A4D\\u0A51\\u0A70\\u0A71\\u0A75\\u0A81\\u0A82\\u0ABC\\u0AC1-\\u0AC5\\u0AC7\\u0AC8\\u0ACD\\u0AE2\\u0AE3\\u0B01\\u0B3C\\u0B3F\\u0B41-\\u0B44\\u0B4D\\u0B56\\u0B62\\u0B63\\u0B82\\u0BC0\\u0BCD\\u0C3E-\\u0C40\\u0C46-\\u0C48\\u0C4A-\\u0C4D\\u0C55\\u0C56\\u0C62\\u0C63\\u0CBC\\u0CBF\\u0CC6\\u0CCC\\u0CCD\\u0CE2\\u0CE3\\u0D41-\\u0D44\\u0D4D\\u0D62\\u0D63\\u0DCA\\u0DD2-\\u0DD4\\u0DD6\\u0E31\\u0E34-\\u0E3A\\u0E47-\\u0E4E\\u0EB1\\u0EB4-\\u0EB9\\u0EBB\\u0EBC\\u0EC8-\\u0ECD\\u0F18\\u0F19\\u0F35\\u0F37\\u0F39\\u0F71-\\u0F7E\\u0F80-\\u0F84\\u0F86\\u0F87\\u0F90-\\u0F97\\u0F99-\\u0FBC\\u0FC6\\u102D-\\u1030\\u1032-\\u1037\\u1039\\u103A\\u103D\\u103E\\u1058\\u1059\\u105E-\\u1060\\u1071-\\u1074\\u1082\\u1085\\u1086\\u108D\\u109D\\u135F\\u1712-\\u1714\\u1732-\\u1734\\u1752\\u1753\\u1772\\u1773\\u17B7-\\u17BD\\u17C6\\u17C9-\\u17D3\\u17DD\\u180B-\\u180D\\u18A9\\u1920-\\u1922\\u1927\\u1928\\u1932\\u1939-\\u193B\\u1A17\\u1A18\\u1A56\\u1A58-\\u1A5E\\u1A60\\u1A62\\u1A65-\\u1A6C\\u1A73-\\u1A7C\\u1A7F\\u1B00-\\u1B03\\u1B34\\u1B36-\\u1B3A\\u1B3C\\u1B42\\u1B6B-\\u1B73\\u1B80\\u1B81\\u1BA2-\\u1BA5\\u1BA8\\u1BA9\\u1C2C-\\u1C33\\u1C36\\u1C37\\u1CD0-\\u1CD2\\u1CD4-\\u1CE0\\u1CE2-\\u1CE8\\u1CED\\u1DC0-\\u1DE6\\u1DFD-\\u1DFF\\u20D0-\\u20DC\\u20E1\\u20E5-\\u20F0\\u2CEF-\\u2CF1\\u2DE0-\\u2DFF\\u302A-\\u302F\\u3099\\u309A\\uA66F\\uA67C\\uA67D\\uA6F0\\uA6F1\\uA802\\uA806\\uA80B\\uA825\\uA826\\uA8C4\\uA8E0-\\uA8F1\\uA926-\\uA92D\\uA947-\\uA951\\uA980-\\uA982\\uA9B3\\uA9B6-\\uA9B9\\uA9BC\\uAA29-\\uAA2E\\uAA31\\uAA32\\uAA35\\uAA36\\uAA43\\uAA4C\\uAAB0\\uAAB2-\\uAAB4\\uAAB7\\uAAB8\\uAABE\\uAABF\\uAAC1\\uABE5\\uABE8\\uABED\\uFB1E\\uFE00-\\uFE0F\\uFE20-\\uFE26]"),space_combining_mark:new RegExp("[\\u0903\\u093E-\\u0940\\u0949-\\u094C\\u094E\\u0982\\u0983\\u09BE-\\u09C0\\u09C7\\u09C8\\u09CB\\u09CC\\u09D7\\u0A03\\u0A3E-\\u0A40\\u0A83\\u0ABE-\\u0AC0\\u0AC9\\u0ACB\\u0ACC\\u0B02\\u0B03\\u0B3E\\u0B40\\u0B47\\u0B48\\u0B4B\\u0B4C\\u0B57\\u0BBE\\u0BBF\\u0BC1\\u0BC2\\u0BC6-\\u0BC8\\u0BCA-\\u0BCC\\u0BD7\\u0C01-\\u0C03\\u0C41-\\u0C44\\u0C82\\u0C83\\u0CBE\\u0CC0-\\u0CC4\\u0CC7\\u0CC8\\u0CCA\\u0CCB\\u0CD5\\u0CD6\\u0D02\\u0D03\\u0D3E-\\u0D40\\u0D46-\\u0D48\\u0D4A-\\u0D4C\\u0D57\\u0D82\\u0D83\\u0DCF-\\u0DD1\\u0DD8-\\u0DDF\\u0DF2\\u0DF3\\u0F3E\\u0F3F\\u0F7F\\u102B\\u102C\\u1031\\u1038\\u103B\\u103C\\u1056\\u1057\\u1062-\\u1064\\u1067-\\u106D\\u1083\\u1084\\u1087-\\u108C\\u108F\\u109A-\\u109C\\u17B6\\u17BE-\\u17C5\\u17C7\\u17C8\\u1923-\\u1926\\u1929-\\u192B\\u1930\\u1931\\u1933-\\u1938\\u19B0-\\u19C0\\u19C8\\u19C9\\u1A19-\\u1A1B\\u1A55\\u1A57\\u1A61\\u1A63\\u1A64\\u1A6D-\\u1A72\\u1B04\\u1B35\\u1B3B\\u1B3D-\\u1B41\\u1B43\\u1B44\\u1B82\\u1BA1\\u1BA6\\u1BA7\\u1BAA\\u1C24-\\u1C2B\\u1C34\\u1C35\\u1CE1\\u1CF2\\uA823\\uA824\\uA827\\uA880\\uA881\\uA8B4-\\uA8C3\\uA952\\uA953\\uA983\\uA9B4\\uA9B5\\uA9BA\\uA9BB\\uA9BD-\\uA9C0\\uAA2F\\uAA30\\uAA33\\uAA34\\uAA4D\\uAA7B\\uABE3\\uABE4\\uABE6\\uABE7\\uABE9\\uABEA\\uABEC]"),connector_punctuation:new RegExp("[\\u005F\\u203F\\u2040\\u2054\\uFE33\\uFE34\\uFE4D-\\uFE4F\\uFF3F]")};M.prototype.toString=function(){return this.message+" (line: "+this.line+", col: "+this.col+", pos: "+this.pos+")\n\n"+this.stack};var Ht={},zt=g(["typeof","void","delete","--","++","!","~","-","+"]),Pt=g(["--","++"]),jt=g(["=","+=","-=","/=","*=","%=",">>=","<<=",">>>=","|=","^=","&="]),It=function(n,e){for(var t=0;t<n.length;++t)for(var r=n[t],i=0;i<r.length;++i)e[r[i]]=t+1;return e}([["||"],["&&"],["|"],["^"],["&"],["==","===","!=","!=="],["<",">","<=",">=","in","instanceof"],[">>","<<",">>>"],["+","-"],["*","/","%"]],{}),Ut=t(["for","do","while","switch"]),Vt=t(["atom","num","string","regexp","name"]);z.prototype=new E,function(n){function e(e,t){e.DEFMETHOD("transform",function(e,r){var i,o;return e.push(this),e.before&&(i=e.before(this,t,r)),i===n&&(e.after?(e.stack[e.stack.length-1]=i=this.clone(),t(i,e),o=e.after(i,r),o!==n&&(i=o)):(i=this,t(i,e))),e.pop(),i})}function t(n,e){return V(n,function(n){return n.transform(e,!0)})}e(W,l),e(ee,function(n,e){n.label=n.label.transform(e),n.body=n.body.transform(e)}),e(K,function(n,e){n.body=n.body.transform(e)}),e(J,function(n,e){n.body=t(n.body,e)}),e(re,function(n,e){n.condition=n.condition.transform(e),n.body=n.body.transform(e)}),e(ae,function(n,e){n.init&&(n.init=n.init.transform(e)),n.condition&&(n.condition=n.condition.transform(e)),n.step&&(n.step=n.step.transform(e)),n.body=n.body.transform(e)}),e(ue,function(n,e){n.init=n.init.transform(e),n.object=n.object.transform(e),n.body=n.body.transform(e)}),e(se,function(n,e){n.expression=n.expression.transform(e),n.body=n.body.transform(e)}),e(me,function(n,e){n.value&&(n.value=n.value.transform(e))}),e(be,function(n,e){n.label&&(n.label=n.label.transform(e))}),e(we,function(n,e){n.condition=n.condition.transform(e),n.body=n.body.transform(e),n.alternative&&(n.alternative=n.alternative.transform(e))}),e(Ee,function(n,e){n.expression=n.expression.transform(e),n.body=t(n.body,e)}),e(Se,function(n,e){n.expression=n.expression.transform(e),n.body=t(n.body,e)}),e(Ce,function(n,e){n.body=t(n.body,e),n.bcatch&&(n.bcatch=n.bcatch.transform(e)),n.bfinally&&(n.bfinally=n.bfinally.transform(e))}),e(ke,function(n,e){n.argname=n.argname.transform(e),n.body=t(n.body,e)}),e(Be,function(n,e){n.definitions=t(n.definitions,e)}),e(Oe,function(n,e){n.name=n.name.transform(e),n.value&&(n.value=n.value.transform(e))}),e(le,function(n,e){n.name&&(n.name=n.name.transform(e)),n.argnames=t(n.argnames,e),n.body=t(n.body,e)}),e(Me,function(n,e){n.expression=n.expression.transform(e),n.args=t(n.args,e)}),e(Re,function(n,e){n.car=n.car.transform(e),n.cdr=n.cdr.transform(e)}),e(He,function(n,e){n.expression=n.expression.transform(e)}),e(ze,function(n,e){n.expression=n.expression.transform(e),n.property=n.property.transform(e)}),e(Pe,function(n,e){n.expression=n.expression.transform(e)}),e(Ue,function(n,e){n.left=n.left.transform(e),n.right=n.right.transform(e)}),e(Ve,function(n,e){n.condition=n.condition.transform(e),n.consequent=n.consequent.transform(e),n.alternative=n.alternative.transform(e)}),e(We,function(n,e){n.elements=t(n.elements,e)}),e(Ye,function(n,e){n.properties=t(n.properties,e)}),e(Xe,function(n,e){n.value=n.value.transform(e)})}(),P.prototype={unmangleable:function(n){return this.global&&!(n&&n.toplevel)||this.undeclared||!(n&&n.eval)&&(this.scope.uses_eval||this.scope.uses_with)},mangle:function(n){if(!this.mangled_name&&!this.unmangleable(n)){var e=this.scope;!n.screw_ie8&&this.orig[0]instanceof ot&&(e=e.parent_scope),this.mangled_name=e.next_mangled(n,this)}}},fe.DEFMETHOD("figure_out_scope",function(n){n=c(n,{screw_ie8:!1});var e=this,t=e.parent_scope=null,r=null,i=0,o=new E(function(e,a){if(n.screw_ie8&&e instanceof ke){var u=t;return t=new ce(e),t.init_scope_vars(i),t.parent_scope=u,a(),t=u,!0}if(e instanceof ce){e.init_scope_vars(i);var u=e.parent_scope=t,s=r;return r=t=e,++i,a(),--i,t=u,r=s,!0}if(e instanceof G)return e.scope=t,p(t.directives,e.value),!0;if(e instanceof se)for(var c=t;c;c=c.parent_scope)c.uses_with=!0;else if(e instanceof Ze&&(e.scope=t),e instanceof ot)r.def_function(e);else if(e instanceof it)(e.scope=r.parent_scope).def_function(e);else if(e instanceof et||e instanceof tt){var f=r.def_variable(e);f.constant=e instanceof tt,f.init=o.parent().value}else e instanceof at&&(n.screw_ie8?t:r).def_variable(e)});e.walk(o);var a=null,u=e.globals=new y,o=new E(function(n,t){if(n instanceof le){var r=a;return a=n,t(),a=r,!0}if(n instanceof st){var i=n.name,s=n.scope.find_variable(i);if(s)n.thedef=s;else{var c;if(u.has(i)?c=u.get(i):(c=new P(e,u.size(),n),c.undeclared=!0,c.global=!0,u.set(i,c)),n.thedef=c,"eval"==i&&o.parent()instanceof Me)for(var f=n.scope;f&&!f.uses_eval;f=f.parent_scope)f.uses_eval=!0;a&&"arguments"==i&&(a.uses_arguments=!0)}return n.reference(),!0}});e.walk(o)}),ce.DEFMETHOD("init_scope_vars",function(n){this.directives=[],this.variables=new y,this.functions=new y,this.uses_with=!1,this.uses_eval=!1,this.parent_scope=null,this.enclosed=[],this.cname=-1,this.nesting=n}),ce.DEFMETHOD("strict",function(){return this.has_directive("use strict")}),le.DEFMETHOD("init_scope_vars",function(){ce.prototype.init_scope_vars.apply(this,arguments),this.uses_arguments=!1}),st.DEFMETHOD("reference",function(){var n=this.definition();n.references.push(this);for(var e=this.scope;e&&(p(e.enclosed,n),e!==n.scope);)e=e.parent_scope;this.frame=this.scope.nesting-n.scope.nesting}),ce.DEFMETHOD("find_variable",function(n){return n instanceof Ze&&(n=n.name),this.variables.get(n)||this.parent_scope&&this.parent_scope.find_variable(n)}),ce.DEFMETHOD("has_directive",function(n){return this.parent_scope&&this.parent_scope.has_directive(n)||(this.directives.indexOf(n)>=0?this:null)}),ce.DEFMETHOD("def_function",function(n){this.functions.set(n.name,this.def_variable(n))}),ce.DEFMETHOD("def_variable",function(n){var e;return this.variables.has(n.name)?(e=this.variables.get(n.name),e.orig.push(n)):(e=new P(this,this.variables.size(),n),this.variables.set(n.name,e),e.global=!this.parent_scope),n.thedef=e}),ce.DEFMETHOD("next_mangled",function(n){var e=this.enclosed;n:for(;;){var t=Lt(++this.cname);if(x(t)&&!(n.except.indexOf(t)>=0)){for(var r=e.length;--r>=0;){var i=e[r],o=i.mangled_name||i.unmangleable(n)&&i.name;if(t==o)continue n}return t}}}),de.DEFMETHOD("next_mangled",function(n,e){for(var t=e.orig[0]instanceof rt&&this.name&&this.name.definition();;){var r=le.prototype.next_mangled.call(this,n,e);if(!t||t.mangled_name!=r)return r}}),ce.DEFMETHOD("references",function(n){return n instanceof Ze&&(n=n.definition()),this.enclosed.indexOf(n)<0?null:n}),Ze.DEFMETHOD("unmangleable",function(n){return this.definition().unmangleable(n)}),Qe.DEFMETHOD("unmangleable",function(){return!0}),ut.DEFMETHOD("unmangleable",function(){return!1}),Ze.DEFMETHOD("unreferenced",function(){return 0==this.definition().references.length&&!(this.scope.uses_eval||this.scope.uses_with)}),Ze.DEFMETHOD("undeclared",function(){return this.definition().undeclared}),ct.DEFMETHOD("undeclared",function(){return!1}),ut.DEFMETHOD("undeclared",function(){return!1}),Ze.DEFMETHOD("definition",function(){return this.thedef}),Ze.DEFMETHOD("global",function(){return this.definition().global}),fe.DEFMETHOD("_default_mangler_options",function(n){return c(n,{except:[],eval:!1,sort:!1,toplevel:!1,screw_ie8:!1})}),fe.DEFMETHOD("mangle_names",function(n){n=this._default_mangler_options(n);var e=-1,t=[],r=new E(function(i,o){if(i instanceof ee){var a=e;return o(),e=a,!0}if(i instanceof ce){var u=(r.parent(),[]);return i.variables.each(function(e){n.except.indexOf(e.name)<0&&u.push(e)}),n.sort&&u.sort(function(n,e){return e.references.length-n.references.length}),void t.push.apply(t,u)}if(i instanceof ut){var s;do s=Lt(++e);while(!x(s));return i.mangled_name=s,!0}return n.screw_ie8&&i instanceof at?void t.push(i.definition()):void 0});this.walk(r),t.forEach(function(e){e.mangle(n)})}),fe.DEFMETHOD("compute_char_frequency",function(n){n=this._default_mangler_options(n);var e=new E(function(e){e instanceof lt?Lt.consider(e.print_to_string()):e instanceof ve?Lt.consider("return"):e instanceof ge?Lt.consider("throw"):e instanceof Ae?Lt.consider("continue"):e instanceof ye?Lt.consider("break"):e instanceof X?Lt.consider("debugger"):e instanceof G?Lt.consider(e.value):e instanceof oe?Lt.consider("while"):e instanceof ie?Lt.consider("do while"):e instanceof we?(Lt.consider("if"),e.alternative&&Lt.consider("else")):e instanceof Te?Lt.consider("var"):e instanceof $e?Lt.consider("const"):e instanceof le?Lt.consider("function"):e instanceof ae?Lt.consider("for"):e instanceof ue?Lt.consider("for in"):e instanceof Ee?Lt.consider("switch"):e instanceof Se?Lt.consider("case"):e instanceof Fe?Lt.consider("default"):e instanceof se?Lt.consider("with"):e instanceof Ke?Lt.consider("set"+e.key):e instanceof Je?Lt.consider("get"+e.key):e instanceof Ge?Lt.consider(e.key):e instanceof Ne?Lt.consider("new"):e instanceof ft?Lt.consider("this"):e instanceof Ce?Lt.consider("try"):e instanceof ke?Lt.consider("catch"):e instanceof xe?Lt.consider("finally"):e instanceof Ze&&e.unmangleable(n)?Lt.consider(e.name):e instanceof Pe||e instanceof Ue?Lt.consider(e.operator):e instanceof He&&Lt.consider(e.property)});this.walk(e),Lt.sort()});var Lt=function(){function n(){r=Object.create(null),t=i.split("").map(function(n){return n.charCodeAt(0)}),t.forEach(function(n){r[n]=0})}function e(n){var e="",r=54;do e+=String.fromCharCode(t[n%r]),n=Math.floor(n/r),r=64;while(n>0);return e}var t,r,i="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_0123456789";return e.consider=function(n){for(var e=n.length;--e>=0;){var t=n.charCodeAt(e);t in r&&++r[t]}},e.sort=function(){t=_(t,function(n,e){return F(n)&&!F(e)?1:F(e)&&!F(n)?-1:r[e]-r[n]})},e.reset=n,n(),e.get=function(){return t},e.freq=function(){return r},e}();fe.DEFMETHOD("scope_warnings",function(n){n=c(n,{undeclared:!1,unreferenced:!0,assign_to_global:!0,func_arguments:!0,nested_defuns:!0,eval:!0});var e=new E(function(t){if(n.undeclared&&t instanceof st&&t.undeclared()&&W.warn("Undeclared symbol: {name} [{file}:{line},{col}]",{name:t.name,file:t.start.file,line:t.start.line,col:t.start.col}),n.assign_to_global){var r=null;t instanceof Le&&t.left instanceof st?r=t.left:t instanceof ue&&t.init instanceof st&&(r=t.init),r&&(r.undeclared()||r.global()&&r.scope!==r.definition().scope)&&W.warn("{msg}: {name} [{file}:{line},{col}]",{msg:r.undeclared()?"Accidental global?":"Assignment to global",name:r.name,file:r.start.file,line:r.start.line,col:r.start.col})}n.eval&&t instanceof st&&t.undeclared()&&"eval"==t.name&&W.warn("Eval is used [{file}:{line},{col}]",t.start),n.unreferenced&&(t instanceof nt||t instanceof ut)&&t.unreferenced()&&W.warn("{type} {name} is declared but not referenced [{file}:{line},{col}]",{type:t instanceof ut?"Label":"Symbol",name:t.name,file:t.start.file,line:t.start.line,col:t.start.col}),n.func_arguments&&t instanceof le&&t.uses_arguments&&W.warn("arguments used in function {name} [{file}:{line},{col}]",{name:t.name?t.name.name:"anonymous",file:t.start.file,line:t.start.line,col:t.start.col}),n.nested_defuns&&t instanceof he&&!(e.parent()instanceof ce)&&W.warn('Function {name} declared in nested statement "{type}" [{file}:{line},{col}]',{name:t.name.name,type:e.parent().TYPE,file:t.start.file,line:t.start.line,col:t.start.col})});this.walk(e)}),function(){function n(n,e){n.DEFMETHOD("_codegen",e)}function e(n,e){n.DEFMETHOD("needs_parens",e)}function t(n){var e=n.parent();return e instanceof Pe?!0:e instanceof Ue&&!(e instanceof Le)?!0:e instanceof Me&&e.expression===this?!0:e instanceof Ve&&e.condition===this?!0:e instanceof qe&&e.expression===this?!0:void 0}function r(n,e,t){var r=n.length-1;n.forEach(function(n,i){n instanceof Q||(t.indent(),n.print(t),i==r&&e||(t.newline(),e&&t.newline()))})}function i(n,e){n.length>0?e.with_block(function(){r(n,!1,e)}):e.print("{}")}function o(n,e){if(e.option("bracketize"))return void h(n.body,e);if(!n.body)return e.force_semicolon();if(n.body instanceof ie&&!e.option("screw_ie8"))return void h(n.body,e);for(var t=n.body;;)if(t instanceof we){if(!t.alternative)return void h(n.body,e);t=t.alternative}else{if(!(t instanceof ne))break;t=t.body}s(n.body,e)}function a(n,e,t){if(t)try{n.walk(new E(function(n){if(n instanceof Ue&&"in"==n.operator)throw e})),n.print(e)}catch(r){if(r!==e)throw r;n.print(e,!0)}else n.print(e)}function u(n){return[92,47,46,43,42,63,40,41,91,93,123,125,36,94,58,124,33,10,13,0,65279,8232,8233].indexOf(n)<0}function s(n,e){e.option("bracketize")?!n||n instanceof Q?e.print("{}"):n instanceof Z?n.print(e):e.with_block(function(){e.indent(),n.print(e),e.newline()}):!n||n instanceof Q?e.force_semicolon():n.print(e)}function c(n){for(var e=n.stack(),t=e.length,r=e[--t],i=e[--t];t>0;){if(i instanceof Y&&i.body===r)return!0;if(!(i instanceof Re&&i.car===r||i instanceof Me&&i.expression===r&&!(i instanceof Ne)||i instanceof He&&i.expression===r||i instanceof ze&&i.expression===r||i instanceof Ve&&i.condition===r||i instanceof Ue&&i.left===r||i instanceof Ie&&i.expression===r))return!1;r=i,i=e[--t]}}function f(n,e){return 0==n.args.length&&!e.option("beautify")}function p(n){for(var e=n[0],t=e.length,r=1;r<n.length;++r)n[r].length<t&&(e=n[r],t=e.length);return e}function d(n){var e,t=n.toString(10),r=[t.replace(/^0\./,".").replace("e+","e")];return Math.floor(n)===n?(n>=0?r.push("0x"+n.toString(16).toLowerCase(),"0"+n.toString(8)):r.push("-0x"+(-n).toString(16).toLowerCase(),"-0"+(-n).toString(8)),(e=/^(.*?)(0+)$/.exec(n))&&r.push(e[1]+"e"+e[2].length)):(e=/^0?\.(0+)(.*)$/.exec(n))&&r.push(e[2]+"e-"+(e[1].length+e[2].length),t.substr(t.indexOf("."))),p(r)}function h(n,e){return n instanceof Z?void n.print(e):void e.with_block(function(){e.indent(),n.print(e),e.newline()})}function _(n,e){n.DEFMETHOD("add_source_map",function(n){e(this,n)})}function m(n,e){e.add_mapping(n.start)}W.DEFMETHOD("print",function(n,e){function t(){r.add_comments(n),r.add_source_map(n),i(r,n)}var r=this,i=r._codegen;n.push_node(r),e||r.needs_parens(n)?n.with_parens(t):t(),n.pop_node()}),W.DEFMETHOD("print_to_string",function(n){var e=j(n);return this.print(e),e.get()}),W.DEFMETHOD("add_comments",function(n){var e=n.option("comments"),t=this;if(e){var r=t.start;if(r&&!r._comments_dumped){r._comments_dumped=!0;var i=r.comments_before||[];t instanceof me&&t.value&&t.value.walk(new E(function(n){return n.start&&n.start.comments_before&&(i=i.concat(n.start.comments_before),n.start.comments_before=[]),n instanceof de||n instanceof We||n instanceof Ye?!0:void 0
-})),e.test?i=i.filter(function(n){return e.test(n.value)}):"function"==typeof e&&(i=i.filter(function(n){return e(t,n)})),i.forEach(function(e){/comment[134]/.test(e.type)?(n.print("//"+e.value+"\n"),n.indent()):"comment2"==e.type&&(n.print("/*"+e.value+"*/"),r.nlb?(n.print("\n"),n.indent()):n.space())})}}}),e(W,function(){return!1}),e(de,function(n){return c(n)}),e(Ye,function(n){return c(n)}),e(Pe,function(n){var e=n.parent();return e instanceof qe&&e.expression===this}),e(Re,function(n){var e=n.parent();return e instanceof Me||e instanceof Pe||e instanceof Ue||e instanceof Oe||e instanceof qe||e instanceof We||e instanceof Xe||e instanceof Ve}),e(Ue,function(n){var e=n.parent();if(e instanceof Me&&e.expression===this)return!0;if(e instanceof Pe)return!0;if(e instanceof qe&&e.expression===this)return!0;if(e instanceof Ue){var t=e.operator,r=It[t],i=this.operator,o=It[i];if(r>o||r==o&&this===e.right)return!0}}),e(qe,function(n){var e=n.parent();if(e instanceof Ne&&e.expression===this)try{this.walk(new E(function(n){if(n instanceof Me)throw e}))}catch(t){if(t!==e)throw t;return!0}}),e(Me,function(n){var e,t=n.parent();return t instanceof Ne&&t.expression===this?!0:this.expression instanceof de&&t instanceof qe&&t.expression===this&&(e=n.parent(1))instanceof Le&&e.left===t}),e(Ne,function(n){var e=n.parent();return f(this,n)&&(e instanceof qe||e instanceof Me&&e.expression===this)?!0:void 0}),e(dt,function(n){var e=n.parent();return this.getValue()<0&&e instanceof qe&&e.expression===this?!0:void 0}),e(vt,function(n){var e=n.parent();return e instanceof qe&&e.expression===this?!0:void 0}),e(Le,t),e(Ve,t),n(G,function(n,e){e.print_string(n.value),e.semicolon()}),n(X,function(n,e){e.print("debugger"),e.semicolon()}),ne.DEFMETHOD("_do_print_body",function(n){s(this.body,n)}),n(Y,function(n,e){n.body.print(e),e.semicolon()}),n(fe,function(n,e){r(n.body,!0,e),e.print("")}),n(ee,function(n,e){n.label.print(e),e.colon(),n.body.print(e)}),n(K,function(n,e){n.body.print(e),e.semicolon()}),n(Z,function(n,e){i(n.body,e)}),n(Q,function(n,e){e.semicolon()}),n(ie,function(n,e){e.print("do"),e.space(),n._do_print_body(e),e.space(),e.print("while"),e.space(),e.with_parens(function(){n.condition.print(e)}),e.semicolon()}),n(oe,function(n,e){e.print("while"),e.space(),e.with_parens(function(){n.condition.print(e)}),e.space(),n._do_print_body(e)}),n(ae,function(n,e){e.print("for"),e.space(),e.with_parens(function(){!n.init||n.init instanceof Q?e.print(";"):(n.init instanceof Be?n.init.print(e):a(n.init,e,!0),e.print(";"),e.space()),n.condition?(n.condition.print(e),e.print(";"),e.space()):e.print(";"),n.step&&n.step.print(e)}),e.space(),n._do_print_body(e)}),n(ue,function(n,e){e.print("for"),e.space(),e.with_parens(function(){n.init.print(e),e.space(),e.print("in"),e.space(),n.object.print(e)}),e.space(),n._do_print_body(e)}),n(se,function(n,e){e.print("with"),e.space(),e.with_parens(function(){n.expression.print(e)}),e.space(),n._do_print_body(e)}),le.DEFMETHOD("_do_print",function(n,e){var t=this;e||n.print("function"),t.name&&(n.space(),t.name.print(n)),n.with_parens(function(){t.argnames.forEach(function(e,t){t&&n.comma(),e.print(n)})}),n.space(),i(t.body,n)}),n(le,function(n,e){n._do_print(e)}),me.DEFMETHOD("_do_print",function(n,e){n.print(e),this.value&&(n.space(),this.value.print(n)),n.semicolon()}),n(ve,function(n,e){n._do_print(e,"return")}),n(ge,function(n,e){n._do_print(e,"throw")}),be.DEFMETHOD("_do_print",function(n,e){n.print(e),this.label&&(n.space(),this.label.print(n)),n.semicolon()}),n(ye,function(n,e){n._do_print(e,"break")}),n(Ae,function(n,e){n._do_print(e,"continue")}),n(we,function(n,e){e.print("if"),e.space(),e.with_parens(function(){n.condition.print(e)}),e.space(),n.alternative?(o(n,e),e.space(),e.print("else"),e.space(),s(n.alternative,e)):n._do_print_body(e)}),n(Ee,function(n,e){e.print("switch"),e.space(),e.with_parens(function(){n.expression.print(e)}),e.space(),n.body.length>0?e.with_block(function(){n.body.forEach(function(n,t){t&&e.newline(),e.indent(!0),n.print(e)})}):e.print("{}")}),De.DEFMETHOD("_do_print_body",function(n){this.body.length>0&&(n.newline(),this.body.forEach(function(e){n.indent(),e.print(n),n.newline()}))}),n(Fe,function(n,e){e.print("default:"),n._do_print_body(e)}),n(Se,function(n,e){e.print("case"),e.space(),n.expression.print(e),e.print(":"),n._do_print_body(e)}),n(Ce,function(n,e){e.print("try"),e.space(),i(n.body,e),n.bcatch&&(e.space(),n.bcatch.print(e)),n.bfinally&&(e.space(),n.bfinally.print(e))}),n(ke,function(n,e){e.print("catch"),e.space(),e.with_parens(function(){n.argname.print(e)}),e.space(),i(n.body,e)}),n(xe,function(n,e){e.print("finally"),e.space(),i(n.body,e)}),Be.DEFMETHOD("_do_print",function(n,e){n.print(e),n.space(),this.definitions.forEach(function(e,t){t&&n.comma(),e.print(n)});var t=n.parent(),r=t instanceof ae||t instanceof ue,i=r&&t.init===this;i||n.semicolon()}),n(Te,function(n,e){n._do_print(e,"var")}),n($e,function(n,e){n._do_print(e,"const")}),n(Oe,function(n,e){if(n.name.print(e),n.value){e.space(),e.print("="),e.space();var t=e.parent(1),r=t instanceof ae||t instanceof ue;a(n.value,e,r)}}),n(Me,function(n,e){n.expression.print(e),n instanceof Ne&&f(n,e)||e.with_parens(function(){n.args.forEach(function(n,t){t&&e.comma(),n.print(e)})})}),n(Ne,function(n,e){e.print("new"),e.space(),Me.prototype._codegen(n,e)}),Re.DEFMETHOD("_do_print",function(n){this.car.print(n),this.cdr&&(n.comma(),n.should_break()&&(n.newline(),n.indent()),this.cdr.print(n))}),n(Re,function(n,e){n._do_print(e)}),n(He,function(n,e){var t=n.expression;t.print(e),t instanceof dt&&t.getValue()>=0&&(/[xa-f.]/i.test(e.last())||e.print(".")),e.print("."),e.add_mapping(n.end),e.print_name(n.property)}),n(ze,function(n,e){n.expression.print(e),e.print("["),n.property.print(e),e.print("]")}),n(je,function(n,e){var t=n.operator;e.print(t),(/^[a-z]/i.test(t)||/[+-]$/.test(t)&&n.expression instanceof je&&/^[+-]/.test(n.expression.operator))&&e.space(),n.expression.print(e)}),n(Ie,function(n,e){n.expression.print(e),e.print(n.operator)}),n(Ue,function(n,e){n.left.print(e),e.space(),e.print(n.operator),"<"==n.operator&&n.right instanceof je&&"!"==n.right.operator&&n.right.expression instanceof je&&"--"==n.right.expression.operator?e.print(" "):e.space(),n.right.print(e)}),n(Ve,function(n,e){n.condition.print(e),e.space(),e.print("?"),e.space(),n.consequent.print(e),e.space(),e.colon(),n.alternative.print(e)}),n(We,function(n,e){e.with_square(function(){var t=n.elements,r=t.length;r>0&&e.space(),t.forEach(function(n,t){t&&e.comma(),n.print(e),t===r-1&&n instanceof bt&&e.comma()}),r>0&&e.space()})}),n(Ye,function(n,e){n.properties.length>0?e.with_block(function(){n.properties.forEach(function(n,t){t&&(e.print(","),e.newline()),e.indent(),n.print(e)}),e.newline()}):e.print("{}")}),n(Ge,function(n,e){var t=n.key;e.option("quote_keys")?e.print_string(t+""):("number"==typeof t||!e.option("beautify")&&+t+""==t)&&parseFloat(t)>=0?e.print(d(t)):(St(t)?e.option("screw_ie8"):$(t))?e.print_name(t):e.print_string(t),e.colon(),n.value.print(e)}),n(Ke,function(n,e){e.print("set"),e.space(),n.key.print(e),n.value._do_print(e,!0)}),n(Je,function(n,e){e.print("get"),e.space(),n.key.print(e),n.value._do_print(e,!0)}),n(Ze,function(n,e){var t=n.definition();e.print_name(t?t.mangled_name||t.name:n.name)}),n(gt,function(n,e){e.print("void 0")}),n(bt,l),n(yt,function(n,e){e.print("1/0")}),n(vt,function(n,e){e.print("0/0")}),n(ft,function(n,e){e.print("this")}),n(lt,function(n,e){e.print(n.getValue())}),n(pt,function(n,e){e.print_string(n.getValue())}),n(dt,function(n,e){e.print(d(n.getValue()))}),n(ht,function(n,e){var t=n.getValue().toString();e.option("ascii_only")?t=e.to_ascii(t):e.option("unescape_regexps")&&(t=t.split("\\\\").map(function(n){return n.replace(/\\u[0-9a-fA-F]{4}|\\x[0-9a-fA-F]{2}/g,function(n){var e=parseInt(n.substr(2),16);return u(e)?String.fromCharCode(e):n})}).join("\\\\")),e.print(t);var r=e.parent();r instanceof Ue&&/^in/.test(r.operator)&&r.left===n&&e.print(" ")}),_(W,l),_(G,m),_(X,m),_(Ze,m),_(_e,m),_(ne,m),_(ee,l),_(le,m),_(Ee,m),_(De,m),_(Z,m),_(fe,l),_(Ne,m),_(Ce,m),_(ke,m),_(xe,m),_(Be,m),_(lt,m),_(Xe,function(n,e){e.add_mapping(n.start,n.key)})}(),I.prototype=new z,f(I.prototype,{option:function(n){return this.options[n]},warn:function(){this.options.warnings&&W.warn.apply(W,arguments)},before:function(n,e){if(n._squeezed)return n;var t=!1;return n instanceof ce&&(n=n.hoist_declarations(this),t=!0),e(n,this),n=n.optimize(this),t&&n instanceof ce&&(n.drop_unused(this),e(n,this)),n._squeezed=!0,n}}),function(){function n(n,e){n.DEFMETHOD("optimize",function(n){var t=this;if(t._optimized)return t;var r=e(t,n);return r._optimized=!0,r===t?r:r.transform(n)})}function e(n,e,t){return t||(t={}),e&&(t.start||(t.start=e.start),t.end||(t.end=e.end)),new n(t)}function t(n,t,r){if(t instanceof W)return t.transform(n);switch(typeof t){case"string":return e(pt,r,{value:t}).optimize(n);case"number":return e(isNaN(t)?vt:dt,r,{value:t}).optimize(n);case"boolean":return e(t?Et:wt,r).optimize(n);case"undefined":return e(gt,r).optimize(n);default:if(null===t)return e(mt,r).optimize(n);if(t instanceof RegExp)return e(ht,r).optimize(n);throw new Error(d("Can't handle constant of type: {type}",{type:typeof t}))}}function r(n){if(null===n)return[];if(n instanceof Z)return n.body;if(n instanceof Q)return[];if(n instanceof Y)return[n];throw new Error("Can't convert thing to statement array")}function i(n){return null===n?!0:n instanceof Q?!0:n instanceof Z?0==n.body.length:!1}function u(n){return n instanceof Ee?n:(n instanceof ae||n instanceof ue||n instanceof re)&&n.body instanceof Z?n.body:n}function s(n,t){function i(n){function r(n,t){return e(K,n,{body:e(Le,n,{operator:"=",left:e(He,t,{expression:e(st,t,t),property:"$inject"}),right:e(We,n,{elements:n.argnames.map(function(n){return e(pt,n,{value:n.name})})})})})}return n.reduce(function(n,e){n.push(e);var i=e.start,o=i.comments_before;if(o&&o.length>0){var a=o.pop();/@ngInject/.test(a.value)&&(e instanceof he?n.push(r(e,e.name)):e instanceof Be?e.definitions.forEach(function(e){e.value&&e.value instanceof le&&n.push(r(e.value,e.name))}):t.warn("Unknown statement marked with @ngInject [{file}:{line},{col}]",i))}return n},[])}function o(n){var e=[];return n.reduce(function(n,t){return t instanceof Z?(_=!0,n.push.apply(n,o(t.body))):t instanceof Q?_=!0:t instanceof G?e.indexOf(t.value)<0?(n.push(t),e.push(t.value)):_=!0:n.push(t),n},[])}function a(n,t){var i=t.self(),o=i instanceof le,a=[];n:for(var s=n.length;--s>=0;){var c=n[s];switch(!0){case o&&c instanceof ve&&!c.value&&0==a.length:_=!0;continue n;case c instanceof we:if(c.body instanceof ve){if((o&&0==a.length||a[0]instanceof ve&&!a[0].value)&&!c.body.value&&!c.alternative){_=!0;var f=e(K,c.condition,{body:c.condition});a.unshift(f);continue n}if(a[0]instanceof ve&&c.body.value&&a[0].value&&!c.alternative){_=!0,c=c.clone(),c.alternative=a[0],a[0]=c.transform(t);continue n}if((0==a.length||a[0]instanceof ve)&&c.body.value&&!c.alternative&&o){_=!0,c=c.clone(),c.alternative=a[0]||e(ve,c,{value:e(gt,c)}),a[0]=c.transform(t);continue n}if(!c.body.value&&o){_=!0,c=c.clone(),c.condition=c.condition.negate(t),c.body=e(Z,c,{body:r(c.alternative).concat(a)}),c.alternative=null,a=[c.transform(t)];continue n}if(1==a.length&&o&&a[0]instanceof K&&(!c.alternative||c.alternative instanceof K)){_=!0,a.push(e(ve,a[0],{value:e(gt,a[0])}).transform(t)),a=r(c.alternative).concat(a),a.unshift(c);continue n}}var l=m(c.body),p=l instanceof be?t.loopcontrol_target(l.label):null;if(l&&(l instanceof ve&&!l.value&&o||l instanceof Ae&&i===u(p)||l instanceof ye&&p instanceof Z&&i===p)){l.label&&h(l.label.thedef.references,l),_=!0;var d=r(c.body).slice(0,-1);c=c.clone(),c.condition=c.condition.negate(t),c.body=e(Z,c,{body:r(c.alternative).concat(a)}),c.alternative=e(Z,c,{body:d}),a=[c.transform(t)];continue n}var l=m(c.alternative),p=l instanceof be?t.loopcontrol_target(l.label):null;if(l&&(l instanceof ve&&!l.value&&o||l instanceof Ae&&i===u(p)||l instanceof ye&&p instanceof Z&&i===p)){l.label&&h(l.label.thedef.references,l),_=!0,c=c.clone(),c.body=e(Z,c.body,{body:r(c.body).concat(a)}),c.alternative=e(Z,c.alternative,{body:r(c.alternative).slice(0,-1)}),a=[c.transform(t)];continue n}a.unshift(c);break;default:a.unshift(c)}}return a}function s(n,e){var t=!1,r=n.length,i=e.self();return n=n.reduce(function(n,r){if(t)c(e,r,n);else{if(r instanceof be){var o=e.loopcontrol_target(r.label);r instanceof ye&&o instanceof Z&&u(o)===i||r instanceof Ae&&u(o)===i?r.label&&h(r.label.thedef.references,r):n.push(r)}else n.push(r);m(r)&&(t=!0)}return n},[]),_=n.length!=r,n}function f(n,t){function r(){i=Re.from_array(i),i&&o.push(e(K,i,{body:i})),i=[]}if(n.length<2)return n;var i=[],o=[];return n.forEach(function(n){n instanceof K?i.push(n.body):(r(),o.push(n))}),r(),o=l(o,t),_=o.length!=n.length,o}function l(n,t){function r(n){i.pop();var e=o.body;return e instanceof Re?e.add(n):e=Re.cons(e,n),e.transform(t)}var i=[],o=null;return n.forEach(function(n){if(o)if(n instanceof ae){var t={};try{o.body.walk(new E(function(n){if(n instanceof Ue&&"in"==n.operator)throw t})),!n.init||n.init instanceof Be?n.init||(n.init=o.body,i.pop()):n.init=r(n.init)}catch(a){if(a!==t)throw a}}else n instanceof we?n.condition=r(n.condition):n instanceof se?n.expression=r(n.expression):n instanceof me&&n.value?n.value=r(n.value):n instanceof me?n.value=r(e(gt,n)):n instanceof Ee&&(n.expression=r(n.expression));i.push(n),o=n instanceof K?n:null}),i}function p(n){var e=null;return n.reduce(function(n,t){return t instanceof Be&&e&&e.TYPE==t.TYPE?(e.definitions=e.definitions.concat(t.definitions),_=!0):t instanceof ae&&e instanceof Be&&(!t.init||t.init.TYPE==e.TYPE)?(_=!0,n.pop(),t.init?t.init.definitions=e.definitions.concat(t.init.definitions):t.init=e,n.push(t),e=t):(e=t,n.push(t)),n},[])}function d(n){n.forEach(function(n){n instanceof K&&(n.body=function t(n){return n.transform(new z(function(n){if(n instanceof Me&&n.expression instanceof de)return e(je,n,{operator:"!",expression:n});if(n instanceof Me)n.expression=t(n.expression);else if(n instanceof Re)n.car=t(n.car);else if(n instanceof Ve){var r=t(n.condition);if(r!==n.condition){n.condition=r;var i=n.consequent;n.consequent=n.alternative,n.alternative=i}}return n}))}(n.body))})}var _;do _=!1,t.option("angular")&&(n=i(n)),n=o(n),t.option("dead_code")&&(n=s(n,t)),t.option("if_return")&&(n=a(n,t)),t.option("sequences")&&(n=f(n,t)),t.option("join_vars")&&(n=p(n,t));while(_);return t.option("negate_iife")&&d(n,t),n}function c(n,e,t){n.warn("Dropping unreachable code [{file}:{line},{col}]",e.start),e.walk(new E(function(e){return e instanceof Be?(n.warn("Declarations in unreachable code! [{file}:{line},{col}]",e.start),e.remove_initializers(),t.push(e),!0):e instanceof he?(t.push(e),!0):e instanceof ce?!0:void 0}))}function f(n,e){return n.print_to_string().length>e.print_to_string().length?e:n}function m(n){return n&&n.aborts()}function v(n,t){function i(i){i=r(i),n.body instanceof Z?(n.body=n.body.clone(),n.body.body=i.concat(n.body.body.slice(1)),n.body=n.body.transform(t)):n.body=e(Z,n.body,{body:i}).transform(t),v(n,t)}var o=n.body instanceof Z?n.body.body[0]:n.body;o instanceof we&&(o.body instanceof ye&&t.loopcontrol_target(o.body.label)===n?(n.condition=n.condition?e(Ue,n.condition,{left:n.condition,operator:"&&",right:o.condition.negate(t)}):o.condition.negate(t),i(o.alternative)):o.alternative instanceof ye&&t.loopcontrol_target(o.alternative.label)===n&&(n.condition=n.condition?e(Ue,n.condition,{left:n.condition,operator:"&&",right:o.condition}):o.condition,i(o.body)))}function A(n,e){var t=e.option("pure_getters");e.options.pure_getters=!1;var r=n.has_side_effects(e);return e.options.pure_getters=t,r}function w(n,t){return t.option("booleans")&&t.in_boolean_context()?e(Et,n):n}n(W,function(n){return n}),W.DEFMETHOD("equivalent_to",function(n){return this.print_to_string()==n.print_to_string()}),function(n){var e=["!","delete"],t=["in","instanceof","==","!=","===","!==","<","<=",">=",">"];n(W,function(){return!1}),n(je,function(){return o(this.operator,e)}),n(Ue,function(){return o(this.operator,t)||("&&"==this.operator||"||"==this.operator)&&this.left.is_boolean()&&this.right.is_boolean()}),n(Ve,function(){return this.consequent.is_boolean()&&this.alternative.is_boolean()}),n(Le,function(){return"="==this.operator&&this.right.is_boolean()}),n(Re,function(){return this.cdr.is_boolean()}),n(Et,function(){return!0}),n(wt,function(){return!0})}(function(n,e){n.DEFMETHOD("is_boolean",e)}),function(n){n(W,function(){return!1}),n(pt,function(){return!0}),n(je,function(){return"typeof"==this.operator}),n(Ue,function(n){return"+"==this.operator&&(this.left.is_string(n)||this.right.is_string(n))}),n(Le,function(n){return("="==this.operator||"+="==this.operator)&&this.right.is_string(n)}),n(Re,function(n){return this.cdr.is_string(n)}),n(Ve,function(n){return this.consequent.is_string(n)&&this.alternative.is_string(n)}),n(Me,function(n){return n.option("unsafe")&&this.expression instanceof st&&"String"==this.expression.name&&this.expression.undeclared()})}(function(n,e){n.DEFMETHOD("is_string",e)}),function(n){function e(n,e){if(!e)throw new Error("Compressor must be passed");return n._eval(e)}W.DEFMETHOD("evaluate",function(e){if(!e.option("evaluate"))return[this];try{var r=this._eval(e);return[f(t(e,r,this),this),r]}catch(i){if(i!==n)throw i;return[this]}}),n(Y,function(){throw new Error(d("Cannot evaluate a statement [{file}:{line},{col}]",this.start))}),n(de,function(){throw n}),n(W,function(){throw n}),n(lt,function(){return this.getValue()}),n(je,function(t){var r=this.expression;switch(this.operator){case"!":return!e(r,t);case"typeof":if(r instanceof de)return"function";if(r=e(r,t),r instanceof RegExp)throw n;return typeof r;case"void":return void e(r,t);case"~":return~e(r,t);case"-":if(r=e(r,t),0===r)throw n;return-r;case"+":return+e(r,t)}throw n}),n(Ue,function(t){var r=this.left,i=this.right;switch(this.operator){case"&&":return e(r,t)&&e(i,t);case"||":return e(r,t)||e(i,t);case"|":return e(r,t)|e(i,t);case"&":return e(r,t)&e(i,t);case"^":return e(r,t)^e(i,t);case"+":return e(r,t)+e(i,t);case"*":return e(r,t)*e(i,t);case"/":return e(r,t)/e(i,t);case"%":return e(r,t)%e(i,t);case"-":return e(r,t)-e(i,t);case"<<":return e(r,t)<<e(i,t);case">>":return e(r,t)>>e(i,t);case">>>":return e(r,t)>>>e(i,t);case"==":return e(r,t)==e(i,t);case"===":return e(r,t)===e(i,t);case"!=":return e(r,t)!=e(i,t);case"!==":return e(r,t)!==e(i,t);case"<":return e(r,t)<e(i,t);case"<=":return e(r,t)<=e(i,t);case">":return e(r,t)>e(i,t);case">=":return e(r,t)>=e(i,t);case"in":return e(r,t)in e(i,t);case"instanceof":return e(r,t)instanceof e(i,t)}throw n}),n(Ve,function(n){return e(this.condition,n)?e(this.consequent,n):e(this.alternative,n)}),n(st,function(t){var r=this.definition();if(r&&r.constant&&r.init)return e(r.init,t);throw n}),n(He,function(t){if(t.option("unsafe")&&"length"==this.property){var r=e(this.expression,t);if("string"==typeof r)return r.length}throw n})}(function(n,e){n.DEFMETHOD("_eval",e)}),function(n){function t(n){return e(je,n,{operator:"!",expression:n})}n(W,function(){return t(this)}),n(Y,function(){throw new Error("Cannot negate a statement")}),n(de,function(){return t(this)}),n(je,function(){return"!"==this.operator?this.expression:t(this)}),n(Re,function(n){var e=this.clone();return e.cdr=e.cdr.negate(n),e}),n(Ve,function(n){var e=this.clone();return e.consequent=e.consequent.negate(n),e.alternative=e.alternative.negate(n),f(t(this),e)}),n(Ue,function(n){var e=this.clone(),r=this.operator;if(n.option("unsafe_comps"))switch(r){case"<=":return e.operator=">",e;case"<":return e.operator=">=",e;case">=":return e.operator="<",e;case">":return e.operator="<=",e}switch(r){case"==":return e.operator="!=",e;case"!=":return e.operator="==",e;case"===":return e.operator="!==",e;case"!==":return e.operator="===",e;case"&&":return e.operator="||",e.left=e.left.negate(n),e.right=e.right.negate(n),f(t(this),e);case"||":return e.operator="&&",e.left=e.left.negate(n),e.right=e.right.negate(n),f(t(this),e)}return t(this)})}(function(n,e){n.DEFMETHOD("negate",function(n){return e.call(this,n)})}),function(n){n(W,function(){return!0}),n(Q,function(){return!1}),n(lt,function(){return!1}),n(ft,function(){return!1}),n(Me,function(n){var e=n.option("pure_funcs");return e?e.indexOf(this.expression.print_to_string())<0:!0}),n(J,function(n){for(var e=this.body.length;--e>=0;)if(this.body[e].has_side_effects(n))return!0;return!1}),n(K,function(n){return this.body.has_side_effects(n)}),n(he,function(){return!0}),n(de,function(){return!1}),n(Ue,function(n){return this.left.has_side_effects(n)||this.right.has_side_effects(n)}),n(Le,function(){return!0}),n(Ve,function(n){return this.condition.has_side_effects(n)||this.consequent.has_side_effects(n)||this.alternative.has_side_effects(n)}),n(Pe,function(n){return"delete"==this.operator||"++"==this.operator||"--"==this.operator||this.expression.has_side_effects(n)}),n(st,function(){return!1}),n(Ye,function(n){for(var e=this.properties.length;--e>=0;)if(this.properties[e].has_side_effects(n))return!0;return!1}),n(Xe,function(n){return this.value.has_side_effects(n)}),n(We,function(n){for(var e=this.elements.length;--e>=0;)if(this.elements[e].has_side_effects(n))return!0;return!1}),n(He,function(n){return n.option("pure_getters")?this.expression.has_side_effects(n):!0}),n(ze,function(n){return n.option("pure_getters")?this.expression.has_side_effects(n)||this.property.has_side_effects(n):!0}),n(qe,function(n){return!n.option("pure_getters")}),n(Re,function(n){return this.car.has_side_effects(n)||this.cdr.has_side_effects(n)})}(function(n,e){n.DEFMETHOD("has_side_effects",e)}),function(n){function e(){var n=this.body.length;return n>0&&m(this.body[n-1])}n(Y,function(){return null}),n(_e,function(){return this}),n(Z,e),n(De,e),n(we,function(){return this.alternative&&m(this.body)&&m(this.alternative)})}(function(n,e){n.DEFMETHOD("aborts",e)}),n(G,function(n){return n.scope.has_directive(n.value)!==n.scope?e(Q,n):n}),n(X,function(n,t){return t.option("drop_debugger")?e(Q,n):n}),n(ee,function(n,t){return n.body instanceof ye&&t.loopcontrol_target(n.body.label)===n.body?e(Q,n):0==n.label.references.length?n.body:n}),n(J,function(n,e){return n.body=s(n.body,e),n}),n(Z,function(n,t){switch(n.body=s(n.body,t),n.body.length){case 1:return n.body[0];case 0:return e(Q,n)}return n}),ce.DEFMETHOD("drop_unused",function(n){var t=this;if(n.option("unused")&&!(t instanceof fe)&&!t.uses_eval){var r=[],i=new y,a=this,u=new E(function(e,o){if(e!==t){if(e instanceof he)return i.add(e.name.name,e),!0;if(e instanceof Be&&a===t)return e.definitions.forEach(function(e){e.value&&(i.add(e.name.name,e.value),e.value.has_side_effects(n)&&e.value.walk(u))}),!0;if(e instanceof st)return p(r,e.definition()),!0;if(e instanceof ce){var s=a;return a=e,o(),a=s,!0}}});t.walk(u);for(var s=0;s<r.length;++s)r[s].orig.forEach(function(n){var e=i.get(n.name);e&&e.forEach(function(n){var e=new E(function(n){n instanceof st&&p(r,n.definition())});n.walk(e)})});var c=new z(function(i,a,u){if(i instanceof le&&!(i instanceof pe)&&!n.option("keep_fargs"))for(var s=i.argnames,f=s.length;--f>=0;){var l=s[f];if(!l.unreferenced())break;s.pop(),n.warn("Dropping unused function argument {name} [{file}:{line},{col}]",{name:l.name,file:l.start.file,line:l.start.line,col:l.start.col})}if(i instanceof he&&i!==t)return o(i.name.definition(),r)?i:(n.warn("Dropping unused function {name} [{file}:{line},{col}]",{name:i.name.name,file:i.name.start.file,line:i.name.start.line,col:i.name.start.col}),e(Q,i));if(i instanceof Be&&!(c.parent()instanceof ue)){var p=i.definitions.filter(function(e){if(o(e.name.definition(),r))return!0;var t={name:e.name.name,file:e.name.start.file,line:e.name.start.line,col:e.name.start.col};return e.value&&e.value.has_side_effects(n)?(e._unused_side_effects=!0,n.warn("Side effects in initialization of unused variable {name} [{file}:{line},{col}]",t),!0):(n.warn("Dropping unused variable {name} [{file}:{line},{col}]",t),!1)});p=_(p,function(n,e){return!n.value&&e.value?-1:!e.value&&n.value?1:0});for(var d=[],f=0;f<p.length;){var h=p[f];h._unused_side_effects?(d.push(h.value),p.splice(f,1)):(d.length>0&&(d.push(h.value),h.value=Re.from_array(d),d=[]),++f)}return d=d.length>0?e(Z,i,{body:[e(K,i,{body:Re.from_array(d)})]}):null,0!=p.length||d?0==p.length?d:(i.definitions=p,d&&(d.body.unshift(i),i=d),i):e(Q,i)}if(i instanceof ae&&(a(i,this),i.init instanceof Z)){var m=i.init.body.slice(0,-1);return i.init=i.init.body.slice(-1)[0].body,m.push(i),u?V.splice(m):e(Z,i,{body:m})}return i instanceof ce&&i!==t?i:void 0});t.transform(c)}}),ce.DEFMETHOD("hoist_declarations",function(n){var t=n.option("hoist_funs"),r=n.option("hoist_vars"),i=this;if(t||r){var o=[],u=[],s=new y,c=0,f=0;i.walk(new E(function(n){return n instanceof ce&&n!==i?!0:n instanceof Te?(++f,!0):void 0})),r=r&&f>1;var l=new z(function(n){if(n!==i){if(n instanceof G)return o.push(n),e(Q,n);if(n instanceof he&&t)return u.push(n),e(Q,n);if(n instanceof Te&&r){n.definitions.forEach(function(n){s.set(n.name.name,n),++c});var a=n.to_assignments(),f=l.parent();return f instanceof ue&&f.init===n?null==a?n.definitions[0].name:a:f instanceof ae&&f.init===n?a:a?e(K,n,{body:a}):e(Q,n)}if(n instanceof ce)return n}});if(i=i.transform(l),c>0){var p=[];if(s.each(function(n,e){i instanceof le&&a(function(e){return e.name==n.name.name},i.argnames)?s.del(e):(n=n.clone(),n.value=null,p.push(n),s.set(e,n))}),p.length>0){for(var d=0;d<i.body.length;){if(i.body[d]instanceof K){var _,m,v=i.body[d].body;if(v instanceof Le&&"="==v.operator&&(_=v.left)instanceof Ze&&s.has(_.name)){var g=s.get(_.name);if(g.value)break;g.value=v.right,h(p,g),p.push(g),i.body.splice(d,1);continue}if(v instanceof Re&&(m=v.car)instanceof Le&&"="==m.operator&&(_=m.left)instanceof Ze&&s.has(_.name)){var g=s.get(_.name);if(g.value)break;g.value=m.right,h(p,g),p.push(g),i.body[d].body=v.cdr;continue}}if(i.body[d]instanceof Q)i.body.splice(d,1);else{if(!(i.body[d]instanceof Z))break;var b=[d,1].concat(i.body[d].body);i.body.splice.apply(i.body,b)}}p=e(Te,i,{definitions:p}),u.push(p)}}i.body=o.concat(u,i.body)}return i}),n(K,function(n,t){return t.option("side_effects")&&!n.body.has_side_effects(t)?(t.warn("Dropping side-effect-free statement [{file}:{line},{col}]",n.start),e(Q,n)):n}),n(re,function(n,t){var r=n.condition.evaluate(t);if(n.condition=r[0],!t.option("loops"))return n;if(r.length>1){if(r[1])return e(ae,n,{body:n.body});if(n instanceof oe&&t.option("dead_code")){var i=[];return c(t,n.body,i),e(Z,n,{body:i})}}return n}),n(oe,function(n,t){return t.option("loops")?(n=re.prototype.optimize.call(n,t),n instanceof oe&&(v(n,t),n=e(ae,n,n).transform(t)),n):n}),n(ae,function(n,t){var r=n.condition;if(r&&(r=r.evaluate(t),n.condition=r[0]),!t.option("loops"))return n;if(r&&r.length>1&&!r[1]&&t.option("dead_code")){var i=[];return n.init instanceof Y?i.push(n.init):n.init&&i.push(e(K,n.init,{body:n.init})),c(t,n.body,i),e(Z,n,{body:i})}return v(n,t),n}),n(we,function(n,t){if(!t.option("conditionals"))return n;var r=n.condition.evaluate(t);if(n.condition=r[0],r.length>1)if(r[1]){if(t.warn("Condition always true [{file}:{line},{col}]",n.condition.start),t.option("dead_code")){var o=[];return n.alternative&&c(t,n.alternative,o),o.push(n.body),e(Z,n,{body:o}).transform(t)}}else if(t.warn("Condition always false [{file}:{line},{col}]",n.condition.start),t.option("dead_code")){var o=[];return c(t,n.body,o),n.alternative&&o.push(n.alternative),e(Z,n,{body:o}).transform(t)}i(n.alternative)&&(n.alternative=null);var a=n.condition.negate(t),u=f(n.condition,a)===a;if(n.alternative&&u){u=!1,n.condition=a;var s=n.body;n.body=n.alternative||e(Q),n.alternative=s}if(i(n.body)&&i(n.alternative))return e(K,n.condition,{body:n.condition}).transform(t);if(n.body instanceof K&&n.alternative instanceof K)return e(K,n,{body:e(Ve,n,{condition:n.condition,consequent:n.body.body,alternative:n.alternative.body})}).transform(t);if(i(n.alternative)&&n.body instanceof K)return u?e(K,n,{body:e(Ue,n,{operator:"||",left:a,right:n.body.body})}).transform(t):e(K,n,{body:e(Ue,n,{operator:"&&",left:n.condition,right:n.body.body})}).transform(t);if(n.body instanceof Q&&n.alternative&&n.alternative instanceof K)return e(K,n,{body:e(Ue,n,{operator:"||",left:n.condition,right:n.alternative.body})}).transform(t);if(n.body instanceof me&&n.alternative instanceof me&&n.body.TYPE==n.alternative.TYPE)return e(n.body.CTOR,n,{value:e(Ve,n,{condition:n.condition,consequent:n.body.value||e(gt,n.body).optimize(t),alternative:n.alternative.value||e(gt,n.alternative).optimize(t)})}).transform(t);if(n.body instanceof we&&!n.body.alternative&&!n.alternative&&(n.condition=e(Ue,n.condition,{operator:"&&",left:n.condition,right:n.body.condition}).transform(t),n.body=n.body.body),m(n.body)&&n.alternative){var l=n.alternative;return n.alternative=null,e(Z,n,{body:[n,l]}).transform(t)}if(m(n.alternative)){var p=n.body;return n.body=n.alternative,n.condition=u?a:n.condition.negate(t),n.alternative=null,e(Z,n,{body:[n,p]}).transform(t)}return n}),n(Ee,function(n,t){if(0==n.body.length&&t.option("conditionals"))return e(K,n,{body:n.expression}).transform(t);for(;;){var r=n.body[n.body.length-1];if(r){var i=r.body[r.body.length-1];if(i instanceof ye&&u(t.loopcontrol_target(i.label))===n&&r.body.pop(),r instanceof Fe&&0==r.body.length){n.body.pop();continue}}break}var o=n.expression.evaluate(t);n:if(2==o.length)try{if(n.expression=o[0],!t.option("dead_code"))break n;var a=o[1],s=!1,c=!1,f=!1,l=!1,p=!1,d=new z(function(r,i,o){if(r instanceof le||r instanceof K)return r;if(r instanceof Ee&&r===n)return r=r.clone(),i(r,this),p?r:e(Z,r,{body:r.body.reduce(function(n,e){return n.concat(e.body)},[])}).transform(t);if(r instanceof we||r instanceof Ce){var u=s;return s=!c,i(r,this),s=u,r}if(r instanceof ne||r instanceof Ee){var u=c;return c=!0,i(r,this),c=u,r}if(r instanceof ye&&this.loopcontrol_target(r.label)===n)return s?(p=!0,r):c?r:(l=!0,o?V.skip:e(Q,r));if(r instanceof De&&this.parent()===n){if(l)return V.skip;if(r instanceof Se){var d=r.expression.evaluate(t);if(d.length<2)throw n;return d[1]===a||f?(f=!0,m(r)&&(l=!0),i(r,this),r):V.skip}return i(r,this),r}});d.stack=t.stack.slice(),n=n.transform(d)}catch(h){if(h!==n)throw h}return n}),n(Se,function(n,e){return n.body=s(n.body,e),n}),n(Ce,function(n,e){return n.body=s(n.body,e),n}),Be.DEFMETHOD("remove_initializers",function(){this.definitions.forEach(function(n){n.value=null})}),Be.DEFMETHOD("to_assignments",function(){var n=this.definitions.reduce(function(n,t){if(t.value){var r=e(st,t.name,t.name);n.push(e(Le,t,{operator:"=",left:r,right:t.value}))}return n},[]);return 0==n.length?null:Re.from_array(n)}),n(Be,function(n){return 0==n.definitions.length?e(Q,n):n}),n(de,function(n,e){return n=le.prototype.optimize.call(n,e),e.option("unused")&&n.name&&n.name.unreferenced()&&(n.name=null),n}),n(Me,function(n,r){if(r.option("unsafe")){var i=n.expression;if(i instanceof st&&i.undeclared())switch(i.name){case"Array":if(1!=n.args.length)return e(We,n,{elements:n.args}).transform(r);break;case"Object":if(0==n.args.length)return e(Ye,n,{properties:[]});break;case"String":if(0==n.args.length)return e(pt,n,{value:""});if(n.args.length<=1)return e(Ue,n,{left:n.args[0],operator:"+",right:e(pt,n,{value:""})}).transform(r);break;case"Number":if(0==n.args.length)return e(dt,n,{value:0});if(1==n.args.length)return e(je,n,{expression:n.args[0],operator:"+"}).transform(r);case"Boolean":if(0==n.args.length)return e(wt,n);if(1==n.args.length)return e(je,n,{expression:e(je,null,{expression:n.args[0],operator:"!"}),operator:"!"}).transform(r);break;case"Function":if(b(n.args,function(n){return n instanceof pt}))try{var o="(function("+n.args.slice(0,-1).map(function(n){return n.value}).join(",")+"){"+n.args[n.args.length-1].value+"})()",a=H(o);
-a.figure_out_scope({screw_ie8:r.option("screw_ie8")});var u=new I(r.options);a=a.transform(u),a.figure_out_scope({screw_ie8:r.option("screw_ie8")}),a.mangle_names();var s;try{a.walk(new E(function(n){if(n instanceof le)throw s=n,a}))}catch(c){if(c!==a)throw c}var l=s.argnames.map(function(t,r){return e(pt,n.args[r],{value:t.print_to_string()})}),o=j();return Z.prototype._codegen.call(s,s,o),o=o.toString().replace(/^\{|\}$/g,""),l.push(e(pt,n.args[n.args.length-1],{value:o})),n.args=l,n}catch(c){if(!(c instanceof M))throw console.log(c),c;r.warn("Error parsing code passed to new Function [{file}:{line},{col}]",n.args[n.args.length-1].start),r.warn(c.toString())}}else{if(i instanceof He&&"toString"==i.property&&0==n.args.length)return e(Ue,n,{left:e(pt,n,{value:""}),operator:"+",right:i.expression}).transform(r);if(i instanceof He&&i.expression instanceof We&&"join"==i.property){var p=0==n.args.length?",":n.args[0].evaluate(r)[1];if(null!=p){var d=i.expression.elements.reduce(function(n,e){if(e=e.evaluate(r),0==n.length||1==e.length)n.push(e);else{var i=n[n.length-1];if(2==i.length){var o=""+i[1]+p+e[1];n[n.length-1]=[t(r,o,i[0]),o]}else n.push(e)}return n},[]);if(0==d.length)return e(pt,n,{value:""});if(1==d.length)return d[0][0];if(""==p){var h;return h=d[0][0]instanceof pt||d[1][0]instanceof pt?d.shift()[0]:e(pt,n,{value:""}),d.reduce(function(n,t){return e(Ue,t[0],{operator:"+",left:n,right:t[0]})},h).transform(r)}var _=n.clone();return _.expression=_.expression.clone(),_.expression.expression=_.expression.expression.clone(),_.expression.expression.elements=d.map(function(n){return n[0]}),f(n,_)}}}}return r.option("side_effects")&&n.expression instanceof de&&0==n.args.length&&!J.prototype.has_side_effects.call(n.expression,r)?e(gt,n).transform(r):r.option("drop_console")&&n.expression instanceof qe&&n.expression.expression instanceof st&&"console"==n.expression.expression.name&&n.expression.expression.undeclared()?e(gt,n).transform(r):n.evaluate(r)[0]}),n(Ne,function(n,t){if(t.option("unsafe")){var r=n.expression;if(r instanceof st&&r.undeclared())switch(r.name){case"Object":case"RegExp":case"Function":case"Error":case"Array":return e(Me,n,n).transform(t)}}return n}),n(Re,function(n,t){if(!t.option("side_effects"))return n;if(!n.car.has_side_effects(t)){var r;if(!(n.cdr instanceof st&&"eval"==n.cdr.name&&n.cdr.undeclared()&&(r=t.parent())instanceof Me&&r.expression===n))return n.cdr}if(t.option("cascade")){if(n.car instanceof Le&&!n.car.left.has_side_effects(t)){if(n.car.left.equivalent_to(n.cdr))return n.car;if(n.cdr instanceof Me&&n.cdr.expression.equivalent_to(n.car.left))return n.cdr.expression=n.car,n.cdr}if(!n.car.has_side_effects(t)&&!n.cdr.has_side_effects(t)&&n.car.equivalent_to(n.cdr))return n.car}return n.cdr instanceof je&&"void"==n.cdr.operator&&!n.cdr.expression.has_side_effects(t)?(n.cdr.operator=n.car,n.cdr):n.cdr instanceof gt?e(je,n,{operator:"void",expression:n.car}):n}),Pe.DEFMETHOD("lift_sequences",function(n){if(n.option("sequences")&&this.expression instanceof Re){var e=this.expression,t=e.to_array();return this.expression=t.pop(),t.push(this),e=Re.from_array(t).transform(n)}return this}),n(Ie,function(n,e){return n.lift_sequences(e)}),n(je,function(n,t){n=n.lift_sequences(t);var r=n.expression;if(t.option("booleans")&&t.in_boolean_context()){switch(n.operator){case"!":if(r instanceof je&&"!"==r.operator)return r.expression;break;case"typeof":return t.warn("Boolean expression always true [{file}:{line},{col}]",n.start),e(Et,n)}r instanceof Ue&&"!"==n.operator&&(n=f(n,r.negate(t)))}return n.evaluate(t)[0]}),Ue.DEFMETHOD("lift_sequences",function(n){if(n.option("sequences")){if(this.left instanceof Re){var e=this.left,t=e.to_array();return this.left=t.pop(),t.push(this),e=Re.from_array(t).transform(n)}if(this.right instanceof Re&&this instanceof Le&&!A(this.left,n)){var e=this.right,t=e.to_array();return this.right=t.pop(),t.push(this),e=Re.from_array(t).transform(n)}}return this});var D=g("== === != !== * & | ^");n(Ue,function(n,t){var r=t.has_directive("use asm")?l:function(e,r){if(r||!n.left.has_side_effects(t)&&!n.right.has_side_effects(t)){e&&(n.operator=e);var i=n.left;n.left=n.right,n.right=i}};if(D(n.operator)&&(n.right instanceof lt&&!(n.left instanceof lt)&&(n.left instanceof Ue&&It[n.left.operator]>=It[n.operator]||r(null,!0)),/^[!=]==?$/.test(n.operator))){if(n.left instanceof st&&n.right instanceof Ve){if(n.right.consequent instanceof st&&n.right.consequent.definition()===n.left.definition()){if(/^==/.test(n.operator))return n.right.condition;if(/^!=/.test(n.operator))return n.right.condition.negate(t)}if(n.right.alternative instanceof st&&n.right.alternative.definition()===n.left.definition()){if(/^==/.test(n.operator))return n.right.condition.negate(t);if(/^!=/.test(n.operator))return n.right.condition}}if(n.right instanceof st&&n.left instanceof Ve){if(n.left.consequent instanceof st&&n.left.consequent.definition()===n.right.definition()){if(/^==/.test(n.operator))return n.left.condition;if(/^!=/.test(n.operator))return n.left.condition.negate(t)}if(n.left.alternative instanceof st&&n.left.alternative.definition()===n.right.definition()){if(/^==/.test(n.operator))return n.left.condition.negate(t);if(/^!=/.test(n.operator))return n.left.condition}}}if(n=n.lift_sequences(t),t.option("comparisons"))switch(n.operator){case"===":case"!==":(n.left.is_string(t)&&n.right.is_string(t)||n.left.is_boolean()&&n.right.is_boolean())&&(n.operator=n.operator.substr(0,2));case"==":case"!=":n.left instanceof pt&&"undefined"==n.left.value&&n.right instanceof je&&"typeof"==n.right.operator&&t.option("unsafe")&&(n.right.expression instanceof st&&n.right.expression.undeclared()||(n.right=n.right.expression,n.left=e(gt,n.left).optimize(t),2==n.operator.length&&(n.operator+="=")))}if(t.option("booleans")&&t.in_boolean_context())switch(n.operator){case"&&":var i=n.left.evaluate(t),o=n.right.evaluate(t);if(i.length>1&&!i[1]||o.length>1&&!o[1])return t.warn("Boolean && always false [{file}:{line},{col}]",n.start),e(wt,n);if(i.length>1&&i[1])return o[0];if(o.length>1&&o[1])return i[0];break;case"||":var i=n.left.evaluate(t),o=n.right.evaluate(t);if(i.length>1&&i[1]||o.length>1&&o[1])return t.warn("Boolean || always true [{file}:{line},{col}]",n.start),e(Et,n);if(i.length>1&&!i[1])return o[0];if(o.length>1&&!o[1])return i[0];break;case"+":var i=n.left.evaluate(t),o=n.right.evaluate(t);if(i.length>1&&i[0]instanceof pt&&i[1]||o.length>1&&o[0]instanceof pt&&o[1])return t.warn("+ in boolean context always true [{file}:{line},{col}]",n.start),e(Et,n)}if(t.option("comparisons")){if(!(t.parent()instanceof Ue)||t.parent()instanceof Le){var a=e(je,n,{operator:"!",expression:n.negate(t)});n=f(n,a)}switch(n.operator){case"<":r(">");break;case"<=":r(">=")}}return"+"==n.operator&&n.right instanceof pt&&""===n.right.getValue()&&n.left instanceof Ue&&"+"==n.left.operator&&n.left.is_string(t)?n.left:(t.option("evaluate")&&"+"==n.operator&&(n.left instanceof lt&&n.right instanceof Ue&&"+"==n.right.operator&&n.right.left instanceof lt&&n.right.is_string(t)&&(n=e(Ue,n,{operator:"+",left:e(pt,null,{value:""+n.left.getValue()+n.right.left.getValue(),start:n.left.start,end:n.right.left.end}),right:n.right.right})),n.right instanceof lt&&n.left instanceof Ue&&"+"==n.left.operator&&n.left.right instanceof lt&&n.left.is_string(t)&&(n=e(Ue,n,{operator:"+",left:n.left.left,right:e(pt,null,{value:""+n.left.right.getValue()+n.right.getValue(),start:n.left.right.start,end:n.right.end})})),n.left instanceof Ue&&"+"==n.left.operator&&n.left.is_string(t)&&n.left.right instanceof lt&&n.right instanceof Ue&&"+"==n.right.operator&&n.right.left instanceof lt&&n.right.is_string(t)&&(n=e(Ue,n,{operator:"+",left:e(Ue,n.left,{operator:"+",left:n.left.left,right:e(pt,null,{value:""+n.left.right.getValue()+n.right.left.getValue(),start:n.left.right.start,end:n.right.left.end})}),right:n.right.right}))),n.right instanceof Ue&&n.right.operator==n.operator&&("*"==n.operator||"&&"==n.operator||"||"==n.operator)?(n.left=e(Ue,n.left,{operator:n.operator,left:n.left,right:n.right.left}),n.right=n.right.right,n.transform(t)):n.evaluate(t)[0])}),n(st,function(n,r){if(n.undeclared()){var i=r.option("global_defs");if(i&&i.hasOwnProperty(n.name))return t(r,i[n.name],n);switch(n.name){case"undefined":return e(gt,n);case"NaN":return e(vt,n);case"Infinity":return e(yt,n)}}return n}),n(gt,function(n,t){if(t.option("unsafe")){var r=t.find_parent(ce),i=r.find_variable("undefined");if(i){var o=e(st,n,{name:"undefined",scope:r,thedef:i});return o.reference(),o}}return n});var F=["+","-","/","*","%",">>","<<",">>>","|","^","&"];n(Le,function(n,e){return n=n.lift_sequences(e),"="==n.operator&&n.left instanceof st&&n.right instanceof Ue&&n.right.left instanceof st&&n.right.left.name==n.left.name&&o(n.right.operator,F)&&(n.operator=n.right.operator+"=",n.right=n.right.right),n}),n(Ve,function(n,t){if(!t.option("conditionals"))return n;if(n.condition instanceof Re){var r=n.condition.car;return n.condition=n.condition.cdr,Re.cons(r,n)}var i=n.condition.evaluate(t);if(i.length>1)return i[1]?(t.warn("Condition always true [{file}:{line},{col}]",n.start),n.consequent):(t.warn("Condition always false [{file}:{line},{col}]",n.start),n.alternative);var o=i[0].negate(t);f(i[0],o)===o&&(n=e(Ve,n,{condition:o,consequent:n.alternative,alternative:n.consequent}));var a=n.consequent,u=n.alternative;if(a instanceof Le&&u instanceof Le&&a.operator==u.operator&&a.left.equivalent_to(u.left))return e(Le,n,{operator:a.operator,left:a.left,right:e(Ve,n,{condition:n.condition,consequent:a.right,alternative:u.right})});if(a instanceof Me&&u.TYPE===a.TYPE&&a.args.length==u.args.length&&a.expression.equivalent_to(u.expression)){if(0==a.args.length)return e(Re,n,{car:n.condition,cdr:a});if(1==a.args.length)return a.args[0]=e(Ve,n,{condition:n.condition,consequent:a.args[0],alternative:u.args[0]}),a}return a instanceof Ve&&a.alternative.equivalent_to(u)?e(Ve,n,{condition:e(Ue,n,{left:n.condition,operator:"&&",right:a.condition}),consequent:a.consequent,alternative:u}):n}),n(At,function(n,t){if(t.option("booleans")){var r=t.parent();return r instanceof Ue&&("=="==r.operator||"!="==r.operator)?(t.warn("Non-strict equality against boolean: {operator} {value} [{file}:{line},{col}]",{operator:r.operator,value:n.value,file:r.start.file,line:r.start.line,col:r.start.col}),e(dt,n,{value:+n.value})):e(je,n,{operator:"!",expression:e(dt,n,{value:1-n.value})})}return n}),n(ze,function(n,t){var r=n.property;if(r instanceof pt&&t.option("properties")){if(r=r.getValue(),St(r)?t.option("screw_ie8"):$(r))return e(He,n,{expression:n.expression,property:r}).optimize(t);var i=parseFloat(r);isNaN(i)||i.toString()!=r||(n.property=e(dt,n.property,{value:i}))}return n}),n(He,function(n,e){return n.evaluate(e)[0]}),n(We,w),n(Ye,w),n(ht,w)}(),function(){function n(n){var r="prefix"in n?n.prefix:"UnaryExpression"==n.type?!0:!1;return new(r?je:Ie)({start:e(n),end:t(n),operator:n.operator,expression:i(n.argument)})}function e(n){return new L({file:n.loc&&n.loc.source,line:n.loc&&n.loc.start.line,col:n.loc&&n.loc.start.column,pos:n.start,endpos:n.start})}function t(n){return new L({file:n.loc&&n.loc.source,line:n.loc&&n.loc.end.line,col:n.loc&&n.loc.end.column,pos:n.end,endpos:n.end})}function r(n,r,a){var u="function From_Moz_"+n+"(M){\n";return u+="return new mytype({\nstart: my_start_token(M),\nend: my_end_token(M)",a&&a.split(/\s*,\s*/).forEach(function(n){var e=/([a-z0-9$_]+)(=|@|>|%)([a-z0-9$_]+)/i.exec(n);if(!e)throw new Error("Can't understand property map: "+n);var t="M."+e[1],r=e[2],i=e[3];if(u+=",\n"+i+": ","@"==r)u+=t+".map(from_moz)";else if(">"==r)u+="from_moz("+t+")";else if("="==r)u+=t;else{if("%"!=r)throw new Error("Can't understand operator in propmap: "+n);u+="from_moz("+t+").body"}}),u+="\n})}",u=new Function("mytype","my_start_token","my_end_token","from_moz","return("+u+")")(r,e,t,i),o[n]=u}function i(n){a.push(n);var e=null!=n?o[n.type](n):null;return a.pop(),e}var o={TryStatement:function(n){return new Ce({start:e(n),end:t(n),body:i(n.block).body,bcatch:i(n.handlers?n.handlers[0]:n.handler),bfinally:n.finalizer?new xe(i(n.finalizer)):null})},CatchClause:function(n){return new ke({start:e(n),end:t(n),argname:i(n.param),body:i(n.body).body})},ObjectExpression:function(n){return new Ye({start:e(n),end:t(n),properties:n.properties.map(function(n){var r=n.key,o="Identifier"==r.type?r.name:r.value,a={start:e(r),end:t(n.value),key:o,value:i(n.value)};switch(n.kind){case"init":return new Ge(a);case"set":return a.value.name=i(r),new Ke(a);case"get":return a.value.name=i(r),new Je(a)}})})},SequenceExpression:function(n){return Re.from_array(n.expressions.map(i))},MemberExpression:function(n){return new(n.computed?ze:He)({start:e(n),end:t(n),property:n.computed?i(n.property):n.property.name,expression:i(n.object)})},SwitchCase:function(n){return new(n.test?Se:Fe)({start:e(n),end:t(n),expression:i(n.test),body:n.consequent.map(i)})},Literal:function(n){var r=n.value,i={start:e(n),end:t(n)};if(null===r)return new mt(i);switch(typeof r){case"string":return i.value=r,new pt(i);case"number":return i.value=r,new dt(i);case"boolean":return new(r?Et:wt)(i);default:return i.value=r,new ht(i)}},UnaryExpression:n,UpdateExpression:n,Identifier:function(n){var r=a[a.length-2];return new("this"==n.name?ft:"LabeledStatement"==r.type?ut:"VariableDeclarator"==r.type&&r.id===n?"const"==r.kind?tt:et:"FunctionExpression"==r.type?r.id===n?ot:rt:"FunctionDeclaration"==r.type?r.id===n?it:rt:"CatchClause"==r.type?at:"BreakStatement"==r.type||"ContinueStatement"==r.type?ct:st)({start:e(n),end:t(n),name:n.name})}};r("Node",W),r("Program",fe,"body@body"),r("Function",de,"id>name, params@argnames, body%body"),r("EmptyStatement",Q),r("BlockStatement",Z,"body@body"),r("ExpressionStatement",K,"expression>body"),r("IfStatement",we,"test>condition, consequent>body, alternate>alternative"),r("LabeledStatement",ee,"label>label, body>body"),r("BreakStatement",ye,"label>label"),r("ContinueStatement",Ae,"label>label"),r("WithStatement",se,"object>expression, body>body"),r("SwitchStatement",Ee,"discriminant>expression, cases@body"),r("ReturnStatement",ve,"argument>value"),r("ThrowStatement",ge,"argument>value"),r("WhileStatement",oe,"test>condition, body>body"),r("DoWhileStatement",ie,"test>condition, body>body"),r("ForStatement",ae,"init>init, test>condition, update>step, body>body"),r("ForInStatement",ue,"left>init, right>object, body>body"),r("DebuggerStatement",X),r("FunctionDeclaration",he,"id>name, params@argnames, body%body"),r("VariableDeclaration",Te,"declarations@definitions"),r("VariableDeclarator",Oe,"id>name, init>value"),r("ThisExpression",ft),r("ArrayExpression",We,"elements@elements"),r("FunctionExpression",de,"id>name, params@argnames, body%body"),r("BinaryExpression",Ue,"operator=operator, left>left, right>right"),r("AssignmentExpression",Le,"operator=operator, left>left, right>right"),r("LogicalExpression",Ue,"operator=operator, left>left, right>right"),r("ConditionalExpression",Ve,"test>condition, consequent>consequent, alternate>alternative"),r("NewExpression",Ne,"callee>expression, arguments@args"),r("CallExpression",Me,"callee>expression, arguments@args");var a=null;W.from_mozilla_ast=function(n){var e=a;a=[];var t=i(n);return a=e,t}}(),n.array_to_hash=t,n.slice=r,n.characters=i,n.member=o,n.find_if=a,n.repeat_string=u,n.DefaultsError=s,n.defaults=c,n.merge=f,n.noop=l,n.MAP=V,n.push_uniq=p,n.string_template=d,n.remove=h,n.mergeSort=_,n.set_difference=m,n.set_intersection=v,n.makePredicate=g,n.all=b,n.Dictionary=y,n.DEFNODE=A,n.AST_Token=L,n.AST_Node=W,n.AST_Statement=Y,n.AST_Debugger=X,n.AST_Directive=G,n.AST_SimpleStatement=K,n.walk_body=w,n.AST_Block=J,n.AST_BlockStatement=Z,n.AST_EmptyStatement=Q,n.AST_StatementWithBody=ne,n.AST_LabeledStatement=ee,n.AST_IterationStatement=te,n.AST_DWLoop=re,n.AST_Do=ie,n.AST_While=oe,n.AST_For=ae,n.AST_ForIn=ue,n.AST_With=se,n.AST_Scope=ce,n.AST_Toplevel=fe,n.AST_Lambda=le,n.AST_Accessor=pe,n.AST_Function=de,n.AST_Defun=he,n.AST_Jump=_e,n.AST_Exit=me,n.AST_Return=ve,n.AST_Throw=ge,n.AST_LoopControl=be,n.AST_Break=ye,n.AST_Continue=Ae,n.AST_If=we,n.AST_Switch=Ee,n.AST_SwitchBranch=De,n.AST_Default=Fe,n.AST_Case=Se,n.AST_Try=Ce,n.AST_Catch=ke,n.AST_Finally=xe,n.AST_Definitions=Be,n.AST_Var=Te,n.AST_Const=$e,n.AST_VarDef=Oe,n.AST_Call=Me,n.AST_New=Ne,n.AST_Seq=Re,n.AST_PropAccess=qe,n.AST_Dot=He,n.AST_Sub=ze,n.AST_Unary=Pe,n.AST_UnaryPrefix=je,n.AST_UnaryPostfix=Ie,n.AST_Binary=Ue,n.AST_Conditional=Ve,n.AST_Assign=Le,n.AST_Array=We,n.AST_Object=Ye,n.AST_ObjectProperty=Xe,n.AST_ObjectKeyVal=Ge,n.AST_ObjectSetter=Ke,n.AST_ObjectGetter=Je,n.AST_Symbol=Ze,n.AST_SymbolAccessor=Qe,n.AST_SymbolDeclaration=nt,n.AST_SymbolVar=et,n.AST_SymbolConst=tt,n.AST_SymbolFunarg=rt,n.AST_SymbolDefun=it,n.AST_SymbolLambda=ot,n.AST_SymbolCatch=at,n.AST_Label=ut,n.AST_SymbolRef=st,n.AST_LabelRef=ct,n.AST_This=ft,n.AST_Constant=lt,n.AST_String=pt,n.AST_Number=dt,n.AST_RegExp=ht,n.AST_Atom=_t,n.AST_Null=mt,n.AST_NaN=vt,n.AST_Undefined=gt,n.AST_Hole=bt,n.AST_Infinity=yt,n.AST_Boolean=At,n.AST_False=wt,n.AST_True=Et,n.TreeWalker=E,n.KEYWORDS=Dt,n.KEYWORDS_ATOM=Ft,n.RESERVED_WORDS=St,n.KEYWORDS_BEFORE_EXPRESSION=Ct,n.OPERATOR_CHARS=kt,n.RE_HEX_NUMBER=xt,n.RE_OCT_NUMBER=Bt,n.RE_DEC_NUMBER=Tt,n.OPERATORS=$t,n.WHITESPACE_CHARS=Ot,n.PUNC_BEFORE_EXPRESSION=Mt,n.PUNC_CHARS=Nt,n.REGEXP_MODIFIERS=Rt,n.UNICODE=qt,n.is_letter=D,n.is_digit=F,n.is_alphanumeric_char=S,n.is_unicode_combining_mark=C,n.is_unicode_connector_punctuation=k,n.is_identifier=x,n.is_identifier_start=B,n.is_identifier_char=T,n.is_identifier_string=$,n.parse_js_number=O,n.JS_Parse_Error=M,n.js_error=N,n.is_token=R,n.EX_EOF=Ht,n.tokenizer=q,n.UNARY_PREFIX=zt,n.UNARY_POSTFIX=Pt,n.ASSIGNMENT=jt,n.PRECEDENCE=It,n.STATEMENTS_WITH_LABELS=Ut,n.ATOMIC_START_TOKEN=Vt,n.parse=H,n.TreeTransformer=z,n.SymbolDef=P,n.base54=Lt,n.OutputStream=j,n.Compressor=I,n.SourceMap=U}({},function(){return this}());
\ No newline at end of file
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/misc/demo/index.html b/applications/auto-scale/gui/src/vendor/ui.bootstrap/misc/demo/index.html
deleted file mode 100644
index 8a91a11..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/misc/demo/index.html
+++ /dev/null
@@ -1,357 +0,0 @@
-<!DOCTYPE html>
-<html lang="en" ng-app="ui.bootstrap.demo" id="top">
-<head>
- <meta charset="utf-8">
- <meta http-equiv="X-UA-Compatible" content="IE=edge">
- <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
- <link rel="icon" href="assets/favicon.ico" />
- <title>Angular directives for Bootstrap</title>
- <meta name="description" content="AngularJS (Angular) native directives for Bootstrap. Small footprint (5kB gzipped!), no 3rd party JS dependencies (jQuery, bootstrap JS) required! Widgets: <% demoModules.forEach(function(module) { %><%= module.displayName %>, <% }); %>">
- <meta name="google-site-verification" content="7lc5HyceLDqpV_6oNHteYFfxDJH7-S3DwnJKtNUKcRg" />
- <script src="//cdnjs.cloudflare.com/ajax/libs/fastclick/0.6.7/fastclick.min.js"></script>
- <script src="//cdnjs.cloudflare.com/ajax/libs/FileSaver.js/1.0.0/FileSaver.min.js"></script>
- <script src="//cdnjs.cloudflare.com/ajax/libs/jszip/2.4.0/jszip.min.js"></script>
- <script src="//ajax.googleapis.com/ajax/libs/angularjs/<%= ngversion %>/angular.min.js"></script>
- <script src="//ajax.googleapis.com/ajax/libs/angularjs/<%= ngversion %>/angular-animate.min.js"></script>
- <script src="//ajax.googleapis.com/ajax/libs/angularjs/<%= ngversion %>/angular-touch.min.js"></script>
- <script src="//ajax.googleapis.com/ajax/libs/angularjs/<%= ngversion %>/angular-sanitize.js"></script>
- <script src="ui-bootstrap-tpls-<%= pkg.version%>.min.js"></script>
- <script src="assets/plunker.js"></script>
- <script src="assets/app.js"></script>
-
- <link href="//netdna.bootstrapcdn.com/bootstrap/<%= bsversion %>/css/bootstrap.min.css" rel="stylesheet"/>
- <link rel="stylesheet" href="assets/rainbow.css"/>
- <link rel="stylesheet" href="assets/demo.css"/>
- <link rel="author" href="https://github.com/angular-ui/bootstrap/graphs/contributors">
-</head>
-<body class="ng-cloak" ng-controller="MainCtrl">
-<header class="navbar navbar-default navbar-fixed-top navbar-inner">
- <div class="container">
- <div class="navbar-header">
- <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-3" ng-click="isCollapsed = !isCollapsed">
- <span class="sr-only">Toggle navigation</span>
- <span class="icon-bar"></span>
- <span class="icon-bar"></span>
- <span class="icon-bar"></span>
- </button>
- <a class="navbar-brand visible-xs" href="#">UI Bootstrap</a>
- </div>
- <nav class="hidden-xs">
- <ul class="nav navbar-nav">
- <a href="#top" role="button" class="navbar-brand">
- UI Bootstrap
- </a>
- <li class="dropdown" uib-dropdown>
- <a role="button" class="dropdown-toggle" uib-dropdown-toggle>
- Directives <b class="caret"></b>
- </a>
- <ul class="dropdown-menu">
- <% demoModules.forEach(function(module) { %><li><a href="#<%= module.name %>"><%= module.displayName %></a></li><% }); %>
- </ul>
- </li>
- <li><a href="#getting_started">Getting started</a></li>
- <li class="dropdown" uib-dropdown>
- <a role="button" class="dropdown-toggle" uib-dropdown-toggle>
- Previous docs <b class="caret"></b>
- </a>
- <ul class="dropdown-menu">
- <li ng-repeat="version in oldDocs">
- <a ng-href="{{version.url}}">{{version.version}}</a>
- </li>
- </ul>
- </li>
- </ul>
- </nav>
- <nav class="visible-xs" uib-collapse="!isCollapsed">
- <ul class="nav navbar-nav">
- <li><a href="#getting_started" ng-click="isCollapsed = !isCollapsed">Getting started</a></li>
- <li><a href="#directives_small" ng-click="isCollapsed = !isCollapsed">Directives</a></li>
- </ul>
- </nav>
- </div>
-</header>
-<div class="header-placeholder"></div>
-<div role="main">
- <header class="bs-header text-center" id="overview">
- <div class="container">
- <h1>
- UI Bootstrap
- </h1>
-
- <p>Bootstrap components written in pure <a href="http://angularjs.org">AngularJS</a> by the <a
- href="http://angular-ui.github.io">AngularUI Team</a></p>
-
- <p>
- <a class="btn btn-outline-inverse btn-lg" href="https://github.com/angular-ui/bootstrap"><i class="icon-github"></i>Code on Github</a>
- <button type="button" class="btn btn-outline-inverse btn-lg" ng-click="showDownloadModal()">
- <i class="glyphicon glyphicon-download-alt"></i> Download <small>(<%= pkg.version%>)</small>
- </button>
- <button type="button" class="btn btn-outline-inverse btn-lg" ng-click="showBuildModal()"><i class="glyphicon glyphicon-wrench"></i> Create a Build</button>
- </p>
- </div>
- <div class="bs-social container">
- <ul class="bs-social-buttons">
- <li>
- <iframe src="//ghbtns.com/github-btn.html?user=angular-ui&repo=bootstrap&type=watch&count=true"
- allowtransparency="true" frameborder="0" scrolling="0" width="110" height="20"></iframe>
- </li>
- <li>
- <iframe src="//ghbtns.com/github-btn.html?user=angular-ui&repo=bootstrap&type=fork&count=true"
- allowtransparency="true" frameborder="0" scrolling="0" width="110" height="20"></iframe>
- </li>
- <li>
- <a href="https://twitter.com/share" class="twitter-share-button"
- data-hashtags="angularjs">Tweet</a>
- <script>!function (d, s, id) {
- var js, fjs = d.getElementsByTagName(s)[0];
- if (!d.getElementById(id)) {
- js = d.createElement(s);
- js.id = id;
- js.src = "//platform.twitter.com/widgets.js";
- fjs.parentNode.insertBefore(js, fjs);
- }
- }(document, "script", "twitter-wjs");</script>
- </li>
- <li>
- <!-- Place this tag where you want the +1 button to render. -->
- <div class="g-plusone" data-size="medium"></div>
-
- <!-- Place this tag after the last +1 button tag. -->
- <script type="text/javascript">
- (function () {
- var po = document.createElement('script');
- po.type = 'text/javascript';
- po.async = true;
- po.src = 'https://apis.google.com/js/plusone.js';
- var s = document.getElementsByTagName('script')[0];
- s.parentNode.insertBefore(po, s);
- })();
- </script>
- </li>
- </ul>
- </div>
- </header>
- <div class="container">
- <div class="row">
- <div class="col-md-12">
- <section class="bs-sidebar visible-xs" id="directives_small">
- <ul class="nav bs-sidenav">
- <li><a href="#"><strong>Directives</strong></a></li>
- <% demoModules.forEach(function(module) { %>
- <li><a href="#<%= module.name %>"><%= module.displayName %></a></li>
- <% }); %>
- </ul>
- </section>
-
- <section id="getting_started">
- <div class="page-header">
- <h1>Getting started</h1>
- </div>
- <h3>Dependencies</h3>
- <p>
- This repository contains a set of <strong>native AngularJS directives</strong> based on
- Bootstrap's markup and CSS. As a result no dependency on jQuery or Bootstrap's
- JavaScript is required. The <strong>only required dependencies</strong> are:
- </p>
- <ul>
- <li><a href="http://angularjs.org" target="_blank">AngularJS</a> (requires AngularJS 1.3.x, tested with <%= ngversion %>).
- 0.12.0 is the last version of this library that supports AngularJS 1.2.x.</li>
- <li><a href="http://getbootstrap.com" target="_blank">Bootstrap CSS</a> (tested with version <%= bsversion %>).
- This version of the library (<%= pkg.version%>) works only with Bootstrap CSS in version 3.x.
- 0.8.0 is the last version of this library that supports Bootstrap CSS in version 2.3.x.
- </li>
- </ul>
- <h3>Files to download</h3>
- <p>
- Build files for all directives are distributed in several flavours: minified for production usage, un-minified
- for development, with or without templates. All the options are described and can be
- <a href="https://github.com/angular-ui/bootstrap/tree/gh-pages">downloaded from here</a>. It should be noted that the <code>-tpls</code> files contain the templates bundled in JavaScript, while the regular version does not contain the bundled templates. For more information, check out the FAQ <a href="https://github.com/angular-ui/bootstrap/wiki/FAQ#full-explanation">here</a> and the README <a href="https://github.com/angular-ui/bootstrap/tree/gh-pages#build-files">here</a>.
- </p>
- <p>Alternativelly, if you are only interested in a subset of directives, you can
- <a ng-click="showBuildModal()">create your own build</a>.
- </p>
- <p>Whichever method you choose the good news that the overall size of a download is very small:
- <76kB for all directives (~20kB with gzip compression!)</p>
- <h3>Installation</h3>
- <p>As soon as you've got all the files downloaded and included in your page you just need to declare
- a dependency on the <code>ui.bootstrap</code> <a href="http://docs.angularjs.org/guide/module">module</a>:<br>
- <pre><code>angular.module('myModule', ['ui.bootstrap']);</code></pre>
- </p>
- <p>You can fork one of the plunkers from this page to see a working example of what is described here.</p>
- <h3>CSS</h3>
- <p>Original Bootstrap's CSS depends on empty <code>href</code> attributes to style cursors for several components (pagination, tabs etc.).
- But in AngularJS adding empty <code>href</code> attributes to link tags will cause unwanted route changes. This is why we need to remove empty <code>href</code> attributes from directive templates and as a result styling is not applied correctly. The remedy is simple, just add the following styling to your application: <pre><code>.nav, .pagination, .carousel, .panel-title a { cursor: pointer; }</code></pre>
- </p>
- <h3>FAQ</h3>
- <p>Please check <a href="https://github.com/angular-ui/bootstrap/wiki/FAQ" target="_blank">our FAQ section</a> for common problems / solutions.</p>
- <h3>Reading the documentation</h3>
- <p>
- Each of the components provided in <code>ui-bootstrap</code> have documentation and interactive Plunker examples.
- </p>
- <p>
- For the directives, we list the different attributes with their default values, and whether they are readonly. In addition to this, some settings
- have an eye icon next to them like this <i class="glyphicon glyphicon-eye-open"></i>. The eye means that the setting has an Angular
- <a href="https://docs.angularjs.org/api/ng/type/$rootScope.Scope#$watch" title="Angular $watch" target="_blank">$watch</a> listener applied to it.
- </p>
- <p>
- For the services (you will recognize them with the <code>$</code> prefix), we list all the possible parameters you can pass to them and their default values if any.
- </p>
- <p>
- Also, some components have default values that you can override globally within a <code>.config</code> function for example.
- </p>
- </section>
- <% demoModules.forEach(function(module) { %>
- <section id="<%= module.name %>">
- <div class="page-header">
- <h1><%= module.displayName %><small>
- (<a target="_blank" href="https://github.com/angular-ui/bootstrap/tree/master/src/<%= module.name %>">ui.bootstrap.<%= module.name %></a>)
- </small></h1>
- </div>
- <div class="row">
- <div class="col-md-6 show-grid">
- <%= module.docs.html %>
- </div>
- <div class="col-md-6">
- <%= module.docs.md %>
- </div>
- </div>
- <hr>
- <div class="row code">
- <div class="col-md-12" ng-controller="PlunkerCtrl">
- <div class="pull-right">
- <button type="button" class="btn btn-info plunk-btn" ng-click="edit('<%= ngversion%>', '<%= bsversion %>', '<%= pkg.version%>', '<%= module.name %>')"><i class="glyphicon glyphicon-edit"></i> Edit in plunker</button>
- </div>
- <uib-tabset>
- <uib-tab heading="Markup">
- <div plunker-content="markup">
- <pre ng-non-bindable><code data-language="html"><%- module.docs.html %></code></pre>
- </div>
- </uib-tab>
- <uib-tab heading="JavaScript">
- <div plunker-content="javascript">
- <pre ng-non-bindable><code data-language="javascript"><%- module.docs.js %></code></pre>
- </div>
- </uib-tab>
- </uib-tabset>
- </div>
- </div>
- </section>
- <script><%= module.docs.js %></script>
- <% }); %>
- </div>
- </div>
- </div><!-- /.container -->
-</div><!-- /.main -->
-<footer class="footer">
- <div class="container">
- <p>Designed and built by <a href="https://github.com/angular-ui?tab=members" target="_blank">Angular-UI team</a> and <a href="https://github.com/angular-ui/bootstrap/graphs/contributors" target="_blank">contributors</a>.</p>
- <p>Code licensed under <a href="https://github.com/angular-ui/bootstrap/blob/master/LICENSE"><%= pkg.license %> License</a>.</p>
- <p><a href="https://github.com/angular-ui/bootstrap/issues?state=open">Issues</a></p>
- </div>
-</footer>
-<script src="assets/rainbow.js"></script>
-<script src="assets/rainbow-generic.js"></script>
-<script src="assets/rainbow-javascript.js"></script>
-<script src="assets/rainbow-html.js"></script>
-<script type="text/ng-template" id="downloadModal.html">
- <div class="modal-header"><h4 class="modal-title">Download Angular UI Bootstrap</h4></div>
- <div class="modal-body">
- <form class="form-horizontal">
- <div class="form-group">
- <label class="col-sm-3 control-label"><strong>Build</strong></label>
- <div class="col-sm-9">
- <span class="btn-group">
- <button type="button" class="btn btn-default" ng-model="options.minified" uib-btn-radio="true">Minified</button>
- <button type="button" class="btn btn-default" ng-model="options.minified" uib-btn-radio="false">Uncompressed</button>
- </span>
- <small class="help-block">Use <b>Minified</b> version in your deployed application. <b>Uncompressed</b> source code is useful only for debugging and development purpose.</small>
- </div>
- </div>
- <div class="form-group">
- <label class="col-sm-3 control-label"><strong>Include Templates</strong></label>
- <div class="col-sm-9">
- <span class="btn-group">
- <button type="button" class="btn btn-default" ng-model="options.tpls" uib-btn-radio="true">Yes</button>
- <button type="button" class="btn btn-default" ng-model="options.tpls" uib-btn-radio="false">No</button>
- </span>
- <small class="help-block">Whether you want to include the <i>default templates</i>, bundled with most of the directives. These templates are based on Bootstrap's markup and CSS.</small>
- </div>
- </div>
- <div class="form-group">
- <label class="col-sm-3 control-label"><strong>Bower</strong></label>
- <div class="col-sm-9">
- <small>If you are using Bower just run:</small>
- <pre style="margin-bottom:0;">bower install angular-bootstrap</pre>
- <small class="help-block"><a href="http://bower.io/" target="_blank">Bower</a> is a package manager for the web.</small>
- </div>
- </div>
- </form>
- </div>
- <div class="modal-footer">
- <a class="btn btn-default" ng-click="cancel()">Close</a>
- <a class="btn btn-primary" ng-href="{{download('<%= pkg.version%>')}}" download><i class="glyphicon glyphicon-download-alt"></i> Download <%= pkg.version %></a>
- </div>
-</script>
-<script type="text/ng-template" id="buildModal.html">
- <div class="modal-header">
- <h4>
- Create a Custom Build
- <br>
- <small>Select the modules you wish to download</small>
- </h4>
- </div>
- <div class="modal-body">
- <div ng-show="isOldBrowser()">
- Your current browser doesn't support creating custom builds.
- Please take a second to <a href="http://browsehappy.com/">upgrade to a
- more modern browser</a> (other than Safari).
- </div>
- <div ng-show="buildErrorText">
- <h4 style="text-align: center;">{{buildErrorText}}</h4>
- </div>
- <div ng-hide="buildErrorText || isOldBrowser()">
- <% modules.forEach(function(module,i) { %>
- <% if (i % 3 === 0) {%>
- <div class="btn-group" style="width: 100%;">
- <% } %>
- <button type="button" class="btn btn-default"
- style="width: 33%; border-radius: 0;"
- ng-class="{'btn-primary': module.<%= module.name %>}"
- ng-model="module.<%= module.name %>"
- uib-btn-checkbox
- ng-change="selectedChanged('<%= module.name %>', module.<%= module.name %>)">
- <%= module.displayName %>
- </button>
- <% if ((i+1) % 3 === 0) { //end button group%>
- </div>
- <% } %>
- <% }); %>
- </div>
- </div>
- <div class="modal-footer">
- <a class="btn btn-default" ng-click="cancel()">Close</a>
- <a class="btn btn-primary" ng-hide="isOldBrowser()"
- ng-disabled="isOldBrowser() !== false && !selectedModules.length"
- ng-click="selectedModules.length && build(selectedModules, '<%= pkg.version %>')">
- <i class="glyphicon glyphicon-download-alt"></i> Download {{selectedModules.length}} Modules
- </a>
- </div>
-</script>
-
-<script type="text/javascript">
-
- var _gaq = _gaq || [];
- _gaq.push(['_setAccount', 'UA-37467169-1']);
- _gaq.push(['_trackPageview']);
-
- (function() {
- var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
- ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
- var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
- })();
-
-</script>
-<script src="assets/smoothscroll-angular-custom.js"></script>
-<script src="assets/uglifyjs.js"></script>
-</body>
-</html>
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/misc/raw-files-generator.js b/applications/auto-scale/gui/src/vendor/ui.bootstrap/misc/raw-files-generator.js
deleted file mode 100644
index 4e563e6..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/misc/raw-files-generator.js
+++ /dev/null
@@ -1,46 +0,0 @@
-/*!
- * Forked from:
- * Bootstrap Grunt task for generating raw-files.min.js for the Customizer
- * http://getbootstrap.com
- * Copyright 2014 Twitter, Inc.
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
- */
-
-/* jshint node: true */
-
-'use strict';
-var fs = require('fs');
-
-function getFiles(filePaths) {
- var files = {};
- filePaths
- .forEach(function (path) {
- files[path] = fs.readFileSync(path, 'utf8');
- });
- return files;
-}
-
-module.exports = function generateRawFilesJs(grunt, jsFilename, files, banner, cssBanner) {
- if (!banner) {
- banner = '';
- }
-
- if (!cssBanner) {
- cssBanner = '';
- }
-
- var filesJsObject = {
- banner: banner,
- cssBanner: cssBanner,
- files: getFiles(files),
- };
-
- var filesJsContent = JSON.stringify(filesJsObject);
- try {
- fs.writeFileSync(jsFilename, filesJsContent);
- }
- catch (err) {
- grunt.fail.warn(err);
- }
- grunt.log.writeln('File ' + jsFilename.cyan + ' created.');
-};
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/misc/test-lib/helpers.js b/applications/auto-scale/gui/src/vendor/ui.bootstrap/misc/test-lib/helpers.js
deleted file mode 100644
index 452c7fd..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/misc/test-lib/helpers.js
+++ /dev/null
@@ -1,57 +0,0 @@
-// jasmine matcher for expecting an element to have a css class
-// https://github.com/angular/angular.js/blob/master/test/matchers.js
-beforeEach(function() {
- jasmine.addMatchers({
- toHaveClass: function(util, customEqualityTesters) {
- return {
- compare: function(actual, expected) {
- var result = {
- pass: actual.hasClass(expected)
- };
-
- if (result.pass) {
- result.message = 'Expected "' + actual + '" not to have the "' + expected + '" class.';
- } else {
- result.message = 'Expected "' + actual + '" to have the "' + expected + '" class.';
- }
-
- return result;
- }
- }
- },
- toBeHidden: function(util, customEqualityTesters) {
- return {
- compare: function(actual) {
- var result = {
- pass: actual.hasClass('ng-hide') || actual.css('display') === 'none'
- };
-
- if (result.pass) {
- result.message = 'Expected "' + actual + '" not to be hidden';
- } else {
- result.message = 'Expected "' + actual + '" to be hidden';
- }
-
- return result;
- }
- }
- },
- toHaveFocus: function(util, customEqualityTesters) {
- return {
- compare: function(actual) {
- var result = {
- pass: document.activeElement === actual[0]
- };
-
- if (result.pass) {
- result.message = 'Expected "' + actual + '" not to have focus';
- } else {
- result.message = 'Expected "' + actual + '" to have focus';
- }
-
- return result;
- }
- }
- }
- });
-});
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/misc/test-lib/jquery-1.8.2.min.js b/applications/auto-scale/gui/src/vendor/ui.bootstrap/misc/test-lib/jquery-1.8.2.min.js
deleted file mode 100644
index bc3fbc8..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/misc/test-lib/jquery-1.8.2.min.js
+++ /dev/null
@@ -1,2 +0,0 @@
-/*! jQuery v1.8.2 jquery.com | jquery.org/license */
-(function(a,b){function G(a){var b=F[a]={};return p.each(a.split(s),function(a,c){b[c]=!0}),b}function J(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(I,"-$1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:+d+""===d?+d:H.test(d)?p.parseJSON(d):d}catch(f){}p.data(a,c,d)}else d=b}return d}function K(a){var b;for(b in a){if(b==="data"&&p.isEmptyObject(a[b]))continue;if(b!=="toJSON")return!1}return!0}function ba(){return!1}function bb(){return!0}function bh(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function bi(a,b){do a=a[b];while(a&&a.nodeType!==1);return a}function bj(a,b,c){b=b||0;if(p.isFunction(b))return p.grep(a,function(a,d){var e=!!b.call(a,d,a);return e===c});if(b.nodeType)return p.grep(a,function(a,d){return a===b===c});if(typeof b=="string"){var d=p.grep(a,function(a){return a.nodeType===1});if(be.test(b))return p.filter(b,d,!c);b=p.filter(b,d)}return p.grep(a,function(a,d){return p.inArray(a,b)>=0===c})}function bk(a){var b=bl.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}function bC(a,b){return a.getElementsByTagName(b)[0]||a.appendChild(a.ownerDocument.createElement(b))}function bD(a,b){if(b.nodeType!==1||!p.hasData(a))return;var c,d,e,f=p._data(a),g=p._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;d<e;d++)p.event.add(b,c,h[c][d])}g.data&&(g.data=p.extend({},g.data))}function bE(a,b){var c;if(b.nodeType!==1)return;b.clearAttributes&&b.clearAttributes(),b.mergeAttributes&&b.mergeAttributes(a),c=b.nodeName.toLowerCase(),c==="object"?(b.parentNode&&(b.outerHTML=a.outerHTML),p.support.html5Clone&&a.innerHTML&&!p.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):c==="input"&&bv.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):c==="option"?b.selected=a.defaultSelected:c==="input"||c==="textarea"?b.defaultValue=a.defaultValue:c==="script"&&b.text!==a.text&&(b.text=a.text),b.removeAttribute(p.expando)}function bF(a){return typeof a.getElementsByTagName!="undefined"?a.getElementsByTagName("*"):typeof a.querySelectorAll!="undefined"?a.querySelectorAll("*"):[]}function bG(a){bv.test(a.type)&&(a.defaultChecked=a.checked)}function bY(a,b){if(b in a)return b;var c=b.charAt(0).toUpperCase()+b.slice(1),d=b,e=bW.length;while(e--){b=bW[e]+c;if(b in a)return b}return d}function bZ(a,b){return a=b||a,p.css(a,"display")==="none"||!p.contains(a.ownerDocument,a)}function b$(a,b){var c,d,e=[],f=0,g=a.length;for(;f<g;f++){c=a[f];if(!c.style)continue;e[f]=p._data(c,"olddisplay"),b?(!e[f]&&c.style.display==="none"&&(c.style.display=""),c.style.display===""&&bZ(c)&&(e[f]=p._data(c,"olddisplay",cc(c.nodeName)))):(d=bH(c,"display"),!e[f]&&d!=="none"&&p._data(c,"olddisplay",d))}for(f=0;f<g;f++){c=a[f];if(!c.style)continue;if(!b||c.style.display==="none"||c.style.display==="")c.style.display=b?e[f]||"":"none"}return a}function b_(a,b,c){var d=bP.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function ca(a,b,c,d){var e=c===(d?"border":"content")?4:b==="width"?1:0,f=0;for(;e<4;e+=2)c==="margin"&&(f+=p.css(a,c+bV[e],!0)),d?(c==="content"&&(f-=parseFloat(bH(a,"padding"+bV[e]))||0),c!=="margin"&&(f-=parseFloat(bH(a,"border"+bV[e]+"Width"))||0)):(f+=parseFloat(bH(a,"padding"+bV[e]))||0,c!=="padding"&&(f+=parseFloat(bH(a,"border"+bV[e]+"Width"))||0));return f}function cb(a,b,c){var d=b==="width"?a.offsetWidth:a.offsetHeight,e=!0,f=p.support.boxSizing&&p.css(a,"boxSizing")==="border-box";if(d<=0||d==null){d=bH(a,b);if(d<0||d==null)d=a.style[b];if(bQ.test(d))return d;e=f&&(p.support.boxSizingReliable||d===a.style[b]),d=parseFloat(d)||0}return d+ca(a,b,c||(f?"border":"content"),e)+"px"}function cc(a){if(bS[a])return bS[a];var b=p("<"+a+">").appendTo(e.body),c=b.css("display");b.remove();if(c==="none"||c===""){bI=e.body.appendChild(bI||p.extend(e.createElement("iframe"),{frameBorder:0,width:0,height:0}));if(!bJ||!bI.createElement)bJ=(bI.contentWindow||bI.contentDocument).document,bJ.write("<!doctype html><html><body>"),bJ.close();b=bJ.body.appendChild(bJ.createElement(a)),c=bH(b,"display"),e.body.removeChild(bI)}return bS[a]=c,c}function ci(a,b,c,d){var e;if(p.isArray(b))p.each(b,function(b,e){c||ce.test(a)?d(a,e):ci(a+"["+(typeof e=="object"?b:"")+"]",e,c,d)});else if(!c&&p.type(b)==="object")for(e in b)ci(a+"["+e+"]",b[e],c,d);else d(a,b)}function cz(a){return function(b,c){typeof b!="string"&&(c=b,b="*");var d,e,f,g=b.toLowerCase().split(s),h=0,i=g.length;if(p.isFunction(c))for(;h<i;h++)d=g[h],f=/^\+/.test(d),f&&(d=d.substr(1)||"*"),e=a[d]=a[d]||[],e[f?"unshift":"push"](c)}}function cA(a,c,d,e,f,g){f=f||c.dataTypes[0],g=g||{},g[f]=!0;var h,i=a[f],j=0,k=i?i.length:0,l=a===cv;for(;j<k&&(l||!h);j++)h=i[j](c,d,e),typeof h=="string"&&(!l||g[h]?h=b:(c.dataTypes.unshift(h),h=cA(a,c,d,e,h,g)));return(l||!h)&&!g["*"]&&(h=cA(a,c,d,e,"*",g)),h}function cB(a,c){var d,e,f=p.ajaxSettings.flatOptions||{};for(d in c)c[d]!==b&&((f[d]?a:e||(e={}))[d]=c[d]);e&&p.extend(!0,a,e)}function cC(a,c,d){var e,f,g,h,i=a.contents,j=a.dataTypes,k=a.responseFields;for(f in k)f in d&&(c[k[f]]=d[f]);while(j[0]==="*")j.shift(),e===b&&(e=a.mimeType||c.getResponseHeader("content-type"));if(e)for(f in i)if(i[f]&&i[f].test(e)){j.unshift(f);break}if(j[0]in d)g=j[0];else{for(f in d){if(!j[0]||a.converters[f+" "+j[0]]){g=f;break}h||(h=f)}g=g||h}if(g)return g!==j[0]&&j.unshift(g),d[g]}function cD(a,b){var c,d,e,f,g=a.dataTypes.slice(),h=g[0],i={},j=0;a.dataFilter&&(b=a.dataFilter(b,a.dataType));if(g[1])for(c in a.converters)i[c.toLowerCase()]=a.converters[c];for(;e=g[++j];)if(e!=="*"){if(h!=="*"&&h!==e){c=i[h+" "+e]||i["* "+e];if(!c)for(d in i){f=d.split(" ");if(f[1]===e){c=i[h+" "+f[0]]||i["* "+f[0]];if(c){c===!0?c=i[d]:i[d]!==!0&&(e=f[0],g.splice(j--,0,e));break}}}if(c!==!0)if(c&&a["throws"])b=c(b);else try{b=c(b)}catch(k){return{state:"parsererror",error:c?k:"No conversion from "+h+" to "+e}}}h=e}return{state:"success",data:b}}function cL(){try{return new a.XMLHttpRequest}catch(b){}}function cM(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function cU(){return setTimeout(function(){cN=b},0),cN=p.now()}function cV(a,b){p.each(b,function(b,c){var d=(cT[b]||[]).concat(cT["*"]),e=0,f=d.length;for(;e<f;e++)if(d[e].call(a,b,c))return})}function cW(a,b,c){var d,e=0,f=0,g=cS.length,h=p.Deferred().always(function(){delete i.elem}),i=function(){var b=cN||cU(),c=Math.max(0,j.startTime+j.duration-b),d=1-(c/j.duration||0),e=0,f=j.tweens.length;for(;e<f;e++)j.tweens[e].run(d);return h.notifyWith(a,[j,d,c]),d<1&&f?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:p.extend({},b),opts:p.extend(!0,{specialEasing:{}},c),originalProperties:b,originalOptions:c,startTime:cN||cU(),duration:c.duration,tweens:[],createTween:function(b,c,d){var e=p.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(e),e},stop:function(b){var c=0,d=b?j.tweens.length:0;for(;c<d;c++)j.tweens[c].run(1);return b?h.resolveWith(a,[j,b]):h.rejectWith(a,[j,b]),this}}),k=j.props;cX(k,j.opts.specialEasing);for(;e<g;e++){d=cS[e].call(j,a,k,j.opts);if(d)return d}return cV(j,k),p.isFunction(j.opts.start)&&j.opts.start.call(a,j),p.fx.timer(p.extend(i,{anim:j,queue:j.opts.queue,elem:a})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}function cX(a,b){var c,d,e,f,g;for(c in a){d=p.camelCase(c),e=b[d],f=a[c],p.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=p.cssHooks[d];if(g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}}function cY(a,b,c){var d,e,f,g,h,i,j,k,l=this,m=a.style,n={},o=[],q=a.nodeType&&bZ(a);c.queue||(j=p._queueHooks(a,"fx"),j.unqueued==null&&(j.unqueued=0,k=j.empty.fire,j.empty.fire=function(){j.unqueued||k()}),j.unqueued++,l.always(function(){l.always(function(){j.unqueued--,p.queue(a,"fx").length||j.empty.fire()})})),a.nodeType===1&&("height"in b||"width"in b)&&(c.overflow=[m.overflow,m.overflowX,m.overflowY],p.css(a,"display")==="inline"&&p.css(a,"float")==="none"&&(!p.support.inlineBlockNeedsLayout||cc(a.nodeName)==="inline"?m.display="inline-block":m.zoom=1)),c.overflow&&(m.overflow="hidden",p.support.shrinkWrapBlocks||l.done(function(){m.overflow=c.overflow[0],m.overflowX=c.overflow[1],m.overflowY=c.overflow[2]}));for(d in b){f=b[d];if(cP.exec(f)){delete b[d];if(f===(q?"hide":"show"))continue;o.push(d)}}g=o.length;if(g){h=p._data(a,"fxshow")||p._data(a,"fxshow",{}),q?p(a).show():l.done(function(){p(a).hide()}),l.done(function(){var b;p.removeData(a,"fxshow",!0);for(b in n)p.style(a,b,n[b])});for(d=0;d<g;d++)e=o[d],i=l.createTween(e,q?h[e]:0),n[e]=h[e]||p.style(a,e),e in h||(h[e]=i.start,q&&(i.end=i.start,i.start=e==="width"||e==="height"?1:0))}}function cZ(a,b,c,d,e){return new cZ.prototype.init(a,b,c,d,e)}function c$(a,b){var c,d={height:a},e=0;b=b?1:0;for(;e<4;e+=2-b)c=bV[e],d["margin"+c]=d["padding"+c]=a;return b&&(d.opacity=d.width=a),d}function da(a){return p.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}var c,d,e=a.document,f=a.location,g=a.navigator,h=a.jQuery,i=a.$,j=Array.prototype.push,k=Array.prototype.slice,l=Array.prototype.indexOf,m=Object.prototype.toString,n=Object.prototype.hasOwnProperty,o=String.prototype.trim,p=function(a,b){return new p.fn.init(a,b,c)},q=/[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source,r=/\S/,s=/\s+/,t=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,u=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,v=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,w=/^[\],:{}\s]*$/,x=/(?:^|:|,)(?:\s*\[)+/g,y=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,z=/"[^"\\\r\n]*"|true|false|null|-?(?:\d\d*\.|)\d+(?:[eE][\-+]?\d+|)/g,A=/^-ms-/,B=/-([\da-z])/gi,C=function(a,b){return(b+"").toUpperCase()},D=function(){e.addEventListener?(e.removeEventListener("DOMContentLoaded",D,!1),p.ready()):e.readyState==="complete"&&(e.detachEvent("onreadystatechange",D),p.ready())},E={};p.fn=p.prototype={constructor:p,init:function(a,c,d){var f,g,h,i;if(!a)return this;if(a.nodeType)return this.context=this[0]=a,this.length=1,this;if(typeof a=="string"){a.charAt(0)==="<"&&a.charAt(a.length-1)===">"&&a.length>=3?f=[null,a,null]:f=u.exec(a);if(f&&(f[1]||!c)){if(f[1])return c=c instanceof p?c[0]:c,i=c&&c.nodeType?c.ownerDocument||c:e,a=p.parseHTML(f[1],i,!0),v.test(f[1])&&p.isPlainObject(c)&&this.attr.call(a,c,!0),p.merge(this,a);g=e.getElementById(f[2]);if(g&&g.parentNode){if(g.id!==f[2])return d.find(a);this.length=1,this[0]=g}return this.context=e,this.selector=a,this}return!c||c.jquery?(c||d).find(a):this.constructor(c).find(a)}return p.isFunction(a)?d.ready(a):(a.selector!==b&&(this.selector=a.selector,this.context=a.context),p.makeArray(a,this))},selector:"",jquery:"1.8.2",length:0,size:function(){return this.length},toArray:function(){return k.call(this)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=p.merge(this.constructor(),a);return d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")"),d},each:function(a,b){return p.each(this,a,b)},ready:function(a){return p.ready.promise().done(a),this},eq:function(a){return a=+a,a===-1?this.slice(a):this.slice(a,a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(k.apply(this,arguments),"slice",k.call(arguments).join(","))},map:function(a){return this.pushStack(p.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:j,sort:[].sort,splice:[].splice},p.fn.init.prototype=p.fn,p.extend=p.fn.extend=function(){var a,c,d,e,f,g,h=arguments[0]||{},i=1,j=arguments.length,k=!1;typeof h=="boolean"&&(k=h,h=arguments[1]||{},i=2),typeof h!="object"&&!p.isFunction(h)&&(h={}),j===i&&(h=this,--i);for(;i<j;i++)if((a=arguments[i])!=null)for(c in a){d=h[c],e=a[c];if(h===e)continue;k&&e&&(p.isPlainObject(e)||(f=p.isArray(e)))?(f?(f=!1,g=d&&p.isArray(d)?d:[]):g=d&&p.isPlainObject(d)?d:{},h[c]=p.extend(k,g,e)):e!==b&&(h[c]=e)}return h},p.extend({noConflict:function(b){return a.$===p&&(a.$=i),b&&a.jQuery===p&&(a.jQuery=h),p},isReady:!1,readyWait:1,holdReady:function(a){a?p.readyWait++:p.ready(!0)},ready:function(a){if(a===!0?--p.readyWait:p.isReady)return;if(!e.body)return setTimeout(p.ready,1);p.isReady=!0;if(a!==!0&&--p.readyWait>0)return;d.resolveWith(e,[p]),p.fn.trigger&&p(e).trigger("ready").off("ready")},isFunction:function(a){return p.type(a)==="function"},isArray:Array.isArray||function(a){return p.type(a)==="array"},isWindow:function(a){return a!=null&&a==a.window},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},type:function(a){return a==null?String(a):E[m.call(a)]||"object"},isPlainObject:function(a){if(!a||p.type(a)!=="object"||a.nodeType||p.isWindow(a))return!1;try{if(a.constructor&&!n.call(a,"constructor")&&!n.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||n.call(a,d)},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},error:function(a){throw new Error(a)},parseHTML:function(a,b,c){var d;return!a||typeof a!="string"?null:(typeof b=="boolean"&&(c=b,b=0),b=b||e,(d=v.exec(a))?[b.createElement(d[1])]:(d=p.buildFragment([a],b,c?null:[]),p.merge([],(d.cacheable?p.clone(d.fragment):d.fragment).childNodes)))},parseJSON:function(b){if(!b||typeof b!="string")return null;b=p.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(w.test(b.replace(y,"@").replace(z,"]").replace(x,"")))return(new Function("return "+b))();p.error("Invalid JSON: "+b)},parseXML:function(c){var d,e;if(!c||typeof c!="string")return null;try{a.DOMParser?(e=new DOMParser,d=e.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(f){d=b}return(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&p.error("Invalid XML: "+c),d},noop:function(){},globalEval:function(b){b&&r.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(A,"ms-").replace(B,C)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,c,d){var e,f=0,g=a.length,h=g===b||p.isFunction(a);if(d){if(h){for(e in a)if(c.apply(a[e],d)===!1)break}else for(;f<g;)if(c.apply(a[f++],d)===!1)break}else if(h){for(e in a)if(c.call(a[e],e,a[e])===!1)break}else for(;f<g;)if(c.call(a[f],f,a[f++])===!1)break;return a},trim:o&&!o.call(" ")?function(a){return a==null?"":o.call(a)}:function(a){return a==null?"":(a+"").replace(t,"")},makeArray:function(a,b){var c,d=b||[];return a!=null&&(c=p.type(a),a.length==null||c==="string"||c==="function"||c==="regexp"||p.isWindow(a)?j.call(d,a):p.merge(d,a)),d},inArray:function(a,b,c){var d;if(b){if(l)return l.call(b,a,c);d=b.length,c=c?c<0?Math.max(0,d+c):c:0;for(;c<d;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,c){var d=c.length,e=a.length,f=0;if(typeof d=="number")for(;f<d;f++)a[e++]=c[f];else while(c[f]!==b)a[e++]=c[f++];return a.length=e,a},grep:function(a,b,c){var d,e=[],f=0,g=a.length;c=!!c;for(;f<g;f++)d=!!b(a[f],f),c!==d&&e.push(a[f]);return e},map:function(a,c,d){var e,f,g=[],h=0,i=a.length,j=a instanceof p||i!==b&&typeof i=="number"&&(i>0&&a[0]&&a[i-1]||i===0||p.isArray(a));if(j)for(;h<i;h++)e=c(a[h],h,d),e!=null&&(g[g.length]=e);else for(f in a)e=c(a[f],f,d),e!=null&&(g[g.length]=e);return g.concat.apply([],g)},guid:1,proxy:function(a,c){var d,e,f;return typeof c=="string"&&(d=a[c],c=a,a=d),p.isFunction(a)?(e=k.call(arguments,2),f=function(){return a.apply(c,e.concat(k.call(arguments)))},f.guid=a.guid=a.guid||p.guid++,f):b},access:function(a,c,d,e,f,g,h){var i,j=d==null,k=0,l=a.length;if(d&&typeof d=="object"){for(k in d)p.access(a,c,k,d[k],1,g,e);f=1}else if(e!==b){i=h===b&&p.isFunction(e),j&&(i?(i=c,c=function(a,b,c){return i.call(p(a),c)}):(c.call(a,e),c=null));if(c)for(;k<l;k++)c(a[k],d,i?e.call(a[k],k,c(a[k],d)):e,h);f=1}return f?a:j?c.call(a):l?c(a[0],d):g},now:function(){return(new Date).getTime()}}),p.ready.promise=function(b){if(!d){d=p.Deferred();if(e.readyState==="complete")setTimeout(p.ready,1);else if(e.addEventListener)e.addEventListener("DOMContentLoaded",D,!1),a.addEventListener("load",p.ready,!1);else{e.attachEvent("onreadystatechange",D),a.attachEvent("onload",p.ready);var c=!1;try{c=a.frameElement==null&&e.documentElement}catch(f){}c&&c.doScroll&&function g(){if(!p.isReady){try{c.doScroll("left")}catch(a){return setTimeout(g,50)}p.ready()}}()}}return d.promise(b)},p.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(a,b){E["[object "+b+"]"]=b.toLowerCase()}),c=p(e);var F={};p.Callbacks=function(a){a=typeof a=="string"?F[a]||G(a):p.extend({},a);var c,d,e,f,g,h,i=[],j=!a.once&&[],k=function(b){c=a.memory&&b,d=!0,h=f||0,f=0,g=i.length,e=!0;for(;i&&h<g;h++)if(i[h].apply(b[0],b[1])===!1&&a.stopOnFalse){c=!1;break}e=!1,i&&(j?j.length&&k(j.shift()):c?i=[]:l.disable())},l={add:function(){if(i){var b=i.length;(function d(b){p.each(b,function(b,c){var e=p.type(c);e==="function"&&(!a.unique||!l.has(c))?i.push(c):c&&c.length&&e!=="string"&&d(c)})})(arguments),e?g=i.length:c&&(f=b,k(c))}return this},remove:function(){return i&&p.each(arguments,function(a,b){var c;while((c=p.inArray(b,i,c))>-1)i.splice(c,1),e&&(c<=g&&g--,c<=h&&h--)}),this},has:function(a){return p.inArray(a,i)>-1},empty:function(){return i=[],this},disable:function(){return i=j=c=b,this},disabled:function(){return!i},lock:function(){return j=b,c||l.disable(),this},locked:function(){return!j},fireWith:function(a,b){return b=b||[],b=[a,b.slice?b.slice():b],i&&(!d||j)&&(e?j.push(b):k(b)),this},fire:function(){return l.fireWith(this,arguments),this},fired:function(){return!!d}};return l},p.extend({Deferred:function(a){var b=[["resolve","done",p.Callbacks("once memory"),"resolved"],["reject","fail",p.Callbacks("once memory"),"rejected"],["notify","progress",p.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return p.Deferred(function(c){p.each(b,function(b,d){var f=d[0],g=a[b];e[d[1]](p.isFunction(g)?function(){var a=g.apply(this,arguments);a&&p.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f+"With"](this===e?c:this,[a])}:c[f])}),a=null}).promise()},promise:function(a){return a!=null?p.extend(a,d):d}},e={};return d.pipe=d.then,p.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[a^1][2].disable,b[2][2].lock),e[f[0]]=g.fire,e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=k.call(arguments),d=c.length,e=d!==1||a&&p.isFunction(a.promise)?d:0,f=e===1?a:p.Deferred(),g=function(a,b,c){return function(d){b[a]=this,c[a]=arguments.length>1?k.call(arguments):d,c===h?f.notifyWith(b,c):--e||f.resolveWith(b,c)}},h,i,j;if(d>1){h=new Array(d),i=new Array(d),j=new Array(d);for(;b<d;b++)c[b]&&p.isFunction(c[b].promise)?c[b].promise().done(g(b,j,c)).fail(f.reject).progress(g(b,i,h)):--e}return e||f.resolveWith(j,c),f.promise()}}),p.support=function(){var b,c,d,f,g,h,i,j,k,l,m,n=e.createElement("div");n.setAttribute("className","t"),n.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",c=n.getElementsByTagName("*"),d=n.getElementsByTagName("a")[0],d.style.cssText="top:1px;float:left;opacity:.5";if(!c||!c.length)return{};f=e.createElement("select"),g=f.appendChild(e.createElement("option")),h=n.getElementsByTagName("input")[0],b={leadingWhitespace:n.firstChild.nodeType===3,tbody:!n.getElementsByTagName("tbody").length,htmlSerialize:!!n.getElementsByTagName("link").length,style:/top/.test(d.getAttribute("style")),hrefNormalized:d.getAttribute("href")==="/a",opacity:/^0.5/.test(d.style.opacity),cssFloat:!!d.style.cssFloat,checkOn:h.value==="on",optSelected:g.selected,getSetAttribute:n.className!=="t",enctype:!!e.createElement("form").enctype,html5Clone:e.createElement("nav").cloneNode(!0).outerHTML!=="<:nav></:nav>",boxModel:e.compatMode==="CSS1Compat",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,boxSizingReliable:!0,pixelPosition:!1},h.checked=!0,b.noCloneChecked=h.cloneNode(!0).checked,f.disabled=!0,b.optDisabled=!g.disabled;try{delete n.test}catch(o){b.deleteExpando=!1}!n.addEventListener&&n.attachEvent&&n.fireEvent&&(n.attachEvent("onclick",m=function(){b.noCloneEvent=!1}),n.cloneNode(!0).fireEvent("onclick"),n.detachEvent("onclick",m)),h=e.createElement("input"),h.value="t",h.setAttribute("type","radio"),b.radioValue=h.value==="t",h.setAttribute("checked","checked"),h.setAttribute("name","t"),n.appendChild(h),i=e.createDocumentFragment(),i.appendChild(n.lastChild),b.checkClone=i.cloneNode(!0).cloneNode(!0).lastChild.checked,b.appendChecked=h.checked,i.removeChild(h),i.appendChild(n);if(n.attachEvent)for(k in{submit:!0,change:!0,focusin:!0})j="on"+k,l=j in n,l||(n.setAttribute(j,"return;"),l=typeof n[j]=="function"),b[k+"Bubbles"]=l;return p(function(){var c,d,f,g,h="padding:0;margin:0;border:0;display:block;overflow:hidden;",i=e.getElementsByTagName("body")[0];if(!i)return;c=e.createElement("div"),c.style.cssText="visibility:hidden;border:0;width:0;height:0;position:static;top:0;margin-top:1px",i.insertBefore(c,i.firstChild),d=e.createElement("div"),c.appendChild(d),d.innerHTML="<table><tr><td></td><td>t</td></tr></table>",f=d.getElementsByTagName("td"),f[0].style.cssText="padding:0;margin:0;border:0;display:none",l=f[0].offsetHeight===0,f[0].style.display="",f[1].style.display="none",b.reliableHiddenOffsets=l&&f[0].offsetHeight===0,d.innerHTML="",d.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",b.boxSizing=d.offsetWidth===4,b.doesNotIncludeMarginInBodyOffset=i.offsetTop!==1,a.getComputedStyle&&(b.pixelPosition=(a.getComputedStyle(d,null)||{}).top!=="1%",b.boxSizingReliable=(a.getComputedStyle(d,null)||{width:"4px"}).width==="4px",g=e.createElement("div"),g.style.cssText=d.style.cssText=h,g.style.marginRight=g.style.width="0",d.style.width="1px",d.appendChild(g),b.reliableMarginRight=!parseFloat((a.getComputedStyle(g,null)||{}).marginRight)),typeof d.style.zoom!="undefined"&&(d.innerHTML="",d.style.cssText=h+"width:1px;padding:1px;display:inline;zoom:1",b.inlineBlockNeedsLayout=d.offsetWidth===3,d.style.display="block",d.style.overflow="visible",d.innerHTML="<div></div>",d.firstChild.style.width="5px",b.shrinkWrapBlocks=d.offsetWidth!==3,c.style.zoom=1),i.removeChild(c),c=d=f=g=null}),i.removeChild(n),c=d=f=g=h=i=n=null,b}();var H=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,I=/([A-Z])/g;p.extend({cache:{},deletedIds:[],uuid:0,expando:"jQuery"+(p.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){return a=a.nodeType?p.cache[a[p.expando]]:a[p.expando],!!a&&!K(a)},data:function(a,c,d,e){if(!p.acceptData(a))return;var f,g,h=p.expando,i=typeof c=="string",j=a.nodeType,k=j?p.cache:a,l=j?a[h]:a[h]&&h;if((!l||!k[l]||!e&&!k[l].data)&&i&&d===b)return;l||(j?a[h]=l=p.deletedIds.pop()||p.guid++:l=h),k[l]||(k[l]={},j||(k[l].toJSON=p.noop));if(typeof c=="object"||typeof c=="function")e?k[l]=p.extend(k[l],c):k[l].data=p.extend(k[l].data,c);return f=k[l],e||(f.data||(f.data={}),f=f.data),d!==b&&(f[p.camelCase(c)]=d),i?(g=f[c],g==null&&(g=f[p.camelCase(c)])):g=f,g},removeData:function(a,b,c){if(!p.acceptData(a))return;var d,e,f,g=a.nodeType,h=g?p.cache:a,i=g?a[p.expando]:p.expando;if(!h[i])return;if(b){d=c?h[i]:h[i].data;if(d){p.isArray(b)||(b in d?b=[b]:(b=p.camelCase(b),b in d?b=[b]:b=b.split(" ")));for(e=0,f=b.length;e<f;e++)delete d[b[e]];if(!(c?K:p.isEmptyObject)(d))return}}if(!c){delete h[i].data;if(!K(h[i]))return}g?p.cleanData([a],!0):p.support.deleteExpando||h!=h.window?delete h[i]:h[i]=null},_data:function(a,b,c){return p.data(a,b,c,!0)},acceptData:function(a){var b=a.nodeName&&p.noData[a.nodeName.toLowerCase()];return!b||b!==!0&&a.getAttribute("classid")===b}}),p.fn.extend({data:function(a,c){var d,e,f,g,h,i=this[0],j=0,k=null;if(a===b){if(this.length){k=p.data(i);if(i.nodeType===1&&!p._data(i,"parsedAttrs")){f=i.attributes;for(h=f.length;j<h;j++)g=f[j].name,g.indexOf("data-")||(g=p.camelCase(g.substring(5)),J(i,g,k[g]));p._data(i,"parsedAttrs",!0)}}return k}return typeof a=="object"?this.each(function(){p.data(this,a)}):(d=a.split(".",2),d[1]=d[1]?"."+d[1]:"",e=d[1]+"!",p.access(this,function(c){if(c===b)return k=this.triggerHandler("getData"+e,[d[0]]),k===b&&i&&(k=p.data(i,a),k=J(i,a,k)),k===b&&d[1]?this.data(d[0]):k;d[1]=c,this.each(function(){var b=p(this);b.triggerHandler("setData"+e,d),p.data(this,a,c),b.triggerHandler("changeData"+e,d)})},null,c,arguments.length>1,null,!1))},removeData:function(a){return this.each(function(){p.removeData(this,a)})}}),p.extend({queue:function(a,b,c){var d;if(a)return b=(b||"fx")+"queue",d=p._data(a,b),c&&(!d||p.isArray(c)?d=p._data(a,b,p.makeArray(c)):d.push(c)),d||[]},dequeue:function(a,b){b=b||"fx";var c=p.queue(a,b),d=c.length,e=c.shift(),f=p._queueHooks(a,b),g=function(){p.dequeue(a,b)};e==="inprogress"&&(e=c.shift(),d--),e&&(b==="fx"&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return p._data(a,c)||p._data(a,c,{empty:p.Callbacks("once memory").add(function(){p.removeData(a,b+"queue",!0),p.removeData(a,c,!0)})})}}),p.fn.extend({queue:function(a,c){var d=2;return typeof a!="string"&&(c=a,a="fx",d--),arguments.length<d?p.queue(this[0],a):c===b?this:this.each(function(){var b=p.queue(this,a,c);p._queueHooks(this,a),a==="fx"&&b[0]!=="inprogress"&&p.dequeue(this,a)})},dequeue:function(a){return this.each(function(){p.dequeue(this,a)})},delay:function(a,b){return a=p.fx?p.fx.speeds[a]||a:a,b=b||"fx",this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,c){var d,e=1,f=p.Deferred(),g=this,h=this.length,i=function(){--e||f.resolveWith(g,[g])};typeof a!="string"&&(c=a,a=b),a=a||"fx";while(h--)d=p._data(g[h],a+"queueHooks"),d&&d.empty&&(e++,d.empty.add(i));return i(),f.promise(c)}});var L,M,N,O=/[\t\r\n]/g,P=/\r/g,Q=/^(?:button|input)$/i,R=/^(?:button|input|object|select|textarea)$/i,S=/^a(?:rea|)$/i,T=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,U=p.support.getSetAttribute;p.fn.extend({attr:function(a,b){return p.access(this,p.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){p.removeAttr(this,a)})},prop:function(a,b){return p.access(this,p.prop,a,b,arguments.length>1)},removeProp:function(a){return a=p.propFix[a]||a,this.each(function(){try{this[a]=b,delete this[a]}catch(c){}})},addClass:function(a){var b,c,d,e,f,g,h;if(p.isFunction(a))return this.each(function(b){p(this).addClass(a.call(this,b,this.className))});if(a&&typeof a=="string"){b=a.split(s);for(c=0,d=this.length;c<d;c++){e=this[c];if(e.nodeType===1)if(!e.className&&b.length===1)e.className=a;else{f=" "+e.className+" ";for(g=0,h=b.length;g<h;g++)f.indexOf(" "+b[g]+" ")<0&&(f+=b[g]+" ");e.className=p.trim(f)}}}return this},removeClass:function(a){var c,d,e,f,g,h,i;if(p.isFunction(a))return this.each(function(b){p(this).removeClass(a.call(this,b,this.className))});if(a&&typeof a=="string"||a===b){c=(a||"").split(s);for(h=0,i=this.length;h<i;h++){e=this[h];if(e.nodeType===1&&e.className){d=(" "+e.className+" ").replace(O," ");for(f=0,g=c.length;f<g;f++)while(d.indexOf(" "+c[f]+" ")>=0)d=d.replace(" "+c[f]+" "," ");e.className=a?p.trim(d):""}}}return this},toggleClass:function(a,b){var c=typeof a,d=typeof b=="boolean";return p.isFunction(a)?this.each(function(c){p(this).toggleClass(a.call(this,c,this.className,b),b)}):this.each(function(){if(c==="string"){var e,f=0,g=p(this),h=b,i=a.split(s);while(e=i[f++])h=d?h:!g.hasClass(e),g[h?"addClass":"removeClass"](e)}else if(c==="undefined"||c==="boolean")this.className&&p._data(this,"__className__",this.className),this.className=this.className||a===!1?"":p._data(this,"__className__")||""})},hasClass:function(a){var b=" "+a+" ",c=0,d=this.length;for(;c<d;c++)if(this[c].nodeType===1&&(" "+this[c].className+" ").replace(O," ").indexOf(b)>=0)return!0;return!1},val:function(a){var c,d,e,f=this[0];if(!arguments.length){if(f)return c=p.valHooks[f.type]||p.valHooks[f.nodeName.toLowerCase()],c&&"get"in c&&(d=c.get(f,"value"))!==b?d:(d=f.value,typeof d=="string"?d.replace(P,""):d==null?"":d);return}return e=p.isFunction(a),this.each(function(d){var f,g=p(this);if(this.nodeType!==1)return;e?f=a.call(this,d,g.val()):f=a,f==null?f="":typeof f=="number"?f+="":p.isArray(f)&&(f=p.map(f,function(a){return a==null?"":a+""})),c=p.valHooks[this.type]||p.valHooks[this.nodeName.toLowerCase()];if(!c||!("set"in c)||c.set(this,f,"value")===b)this.value=f})}}),p.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c,d,e,f=a.selectedIndex,g=[],h=a.options,i=a.type==="select-one";if(f<0)return null;c=i?f:0,d=i?f+1:h.length;for(;c<d;c++){e=h[c];if(e.selected&&(p.support.optDisabled?!e.disabled:e.getAttribute("disabled")===null)&&(!e.parentNode.disabled||!p.nodeName(e.parentNode,"optgroup"))){b=p(e).val();if(i)return b;g.push(b)}}return i&&!g.length&&h.length?p(h[f]).val():g},set:function(a,b){var c=p.makeArray(b);return p(a).find("option").each(function(){this.selected=p.inArray(p(this).val(),c)>=0}),c.length||(a.selectedIndex=-1),c}}},attrFn:{},attr:function(a,c,d,e){var f,g,h,i=a.nodeType;if(!a||i===3||i===8||i===2)return;if(e&&p.isFunction(p.fn[c]))return p(a)[c](d);if(typeof a.getAttribute=="undefined")return p.prop(a,c,d);h=i!==1||!p.isXMLDoc(a),h&&(c=c.toLowerCase(),g=p.attrHooks[c]||(T.test(c)?M:L));if(d!==b){if(d===null){p.removeAttr(a,c);return}return g&&"set"in g&&h&&(f=g.set(a,d,c))!==b?f:(a.setAttribute(c,d+""),d)}return g&&"get"in g&&h&&(f=g.get(a,c))!==null?f:(f=a.getAttribute(c),f===null?b:f)},removeAttr:function(a,b){var c,d,e,f,g=0;if(b&&a.nodeType===1){d=b.split(s);for(;g<d.length;g++)e=d[g],e&&(c=p.propFix[e]||e,f=T.test(e),f||p.attr(a,e,""),a.removeAttribute(U?e:c),f&&c in a&&(a[c]=!1))}},attrHooks:{type:{set:function(a,b){if(Q.test(a.nodeName)&&a.parentNode)p.error("type property can't be changed");else if(!p.support.radioValue&&b==="radio"&&p.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}},value:{get:function(a,b){return L&&p.nodeName(a,"button")?L.get(a,b):b in a?a.value:null},set:function(a,b,c){if(L&&p.nodeName(a,"button"))return L.set(a,b,c);a.value=b}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(a,c,d){var e,f,g,h=a.nodeType;if(!a||h===3||h===8||h===2)return;return g=h!==1||!p.isXMLDoc(a),g&&(c=p.propFix[c]||c,f=p.propHooks[c]),d!==b?f&&"set"in f&&(e=f.set(a,d,c))!==b?e:a[c]=d:f&&"get"in f&&(e=f.get(a,c))!==null?e:a[c]},propHooks:{tabIndex:{get:function(a){var c=a.getAttributeNode("tabindex");return c&&c.specified?parseInt(c.value,10):R.test(a.nodeName)||S.test(a.nodeName)&&a.href?0:b}}}}),M={get:function(a,c){var d,e=p.prop(a,c);return e===!0||typeof e!="boolean"&&(d=a.getAttributeNode(c))&&d.nodeValue!==!1?c.toLowerCase():b},set:function(a,b,c){var d;return b===!1?p.removeAttr(a,c):(d=p.propFix[c]||c,d in a&&(a[d]=!0),a.setAttribute(c,c.toLowerCase())),c}},U||(N={name:!0,id:!0,coords:!0},L=p.valHooks.button={get:function(a,c){var d;return d=a.getAttributeNode(c),d&&(N[c]?d.value!=="":d.specified)?d.value:b},set:function(a,b,c){var d=a.getAttributeNode(c);return d||(d=e.createAttribute(c),a.setAttributeNode(d)),d.value=b+""}},p.each(["width","height"],function(a,b){p.attrHooks[b]=p.extend(p.attrHooks[b],{set:function(a,c){if(c==="")return a.setAttribute(b,"auto"),c}})}),p.attrHooks.contenteditable={get:L.get,set:function(a,b,c){b===""&&(b="false"),L.set(a,b,c)}}),p.support.hrefNormalized||p.each(["href","src","width","height"],function(a,c){p.attrHooks[c]=p.extend(p.attrHooks[c],{get:function(a){var d=a.getAttribute(c,2);return d===null?b:d}})}),p.support.style||(p.attrHooks.style={get:function(a){return a.style.cssText.toLowerCase()||b},set:function(a,b){return a.style.cssText=b+""}}),p.support.optSelected||(p.propHooks.selected=p.extend(p.propHooks.selected,{get:function(a){var b=a.parentNode;return b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex),null}})),p.support.enctype||(p.propFix.enctype="encoding"),p.support.checkOn||p.each(["radio","checkbox"],function(){p.valHooks[this]={get:function(a){return a.getAttribute("value")===null?"on":a.value}}}),p.each(["radio","checkbox"],function(){p.valHooks[this]=p.extend(p.valHooks[this],{set:function(a,b){if(p.isArray(b))return a.checked=p.inArray(p(a).val(),b)>=0}})});var V=/^(?:textarea|input|select)$/i,W=/^([^\.]*|)(?:\.(.+)|)$/,X=/(?:^|\s)hover(\.\S+|)\b/,Y=/^key/,Z=/^(?:mouse|contextmenu)|click/,$=/^(?:focusinfocus|focusoutblur)$/,_=function(a){return p.event.special.hover?a:a.replace(X,"mouseenter$1 mouseleave$1")};p.event={add:function(a,c,d,e,f){var g,h,i,j,k,l,m,n,o,q,r;if(a.nodeType===3||a.nodeType===8||!c||!d||!(g=p._data(a)))return;d.handler&&(o=d,d=o.handler,f=o.selector),d.guid||(d.guid=p.guid++),i=g.events,i||(g.events=i={}),h=g.handle,h||(g.handle=h=function(a){return typeof p!="undefined"&&(!a||p.event.triggered!==a.type)?p.event.dispatch.apply(h.elem,arguments):b},h.elem=a),c=p.trim(_(c)).split(" ");for(j=0;j<c.length;j++){k=W.exec(c[j])||[],l=k[1],m=(k[2]||"").split(".").sort(),r=p.event.special[l]||{},l=(f?r.delegateType:r.bindType)||l,r=p.event.special[l]||{},n=p.extend({type:l,origType:k[1],data:e,handler:d,guid:d.guid,selector:f,needsContext:f&&p.expr.match.needsContext.test(f),namespace:m.join(".")},o),q=i[l];if(!q){q=i[l]=[],q.delegateCount=0;if(!r.setup||r.setup.call(a,e,m,h)===!1)a.addEventListener?a.addEventListener(l,h,!1):a.attachEvent&&a.attachEvent("on"+l,h)}r.add&&(r.add.call(a,n),n.handler.guid||(n.handler.guid=d.guid)),f?q.splice(q.delegateCount++,0,n):q.push(n),p.event.global[l]=!0}a=null},global:{},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,q,r=p.hasData(a)&&p._data(a);if(!r||!(m=r.events))return;b=p.trim(_(b||"")).split(" ");for(f=0;f<b.length;f++){g=W.exec(b[f])||[],h=i=g[1],j=g[2];if(!h){for(h in m)p.event.remove(a,h+b[f],c,d,!0);continue}n=p.event.special[h]||{},h=(d?n.delegateType:n.bindType)||h,o=m[h]||[],k=o.length,j=j?new RegExp("(^|\\.)"+j.split(".").sort().join("\\.(?:.*\\.|)")+"(\\.|$)"):null;for(l=0;l<o.length;l++)q=o[l],(e||i===q.origType)&&(!c||c.guid===q.guid)&&(!j||j.test(q.namespace))&&(!d||d===q.selector||d==="**"&&q.selector)&&(o.splice(l--,1),q.selector&&o.delegateCount--,n.remove&&n.remove.call(a,q));o.length===0&&k!==o.length&&((!n.teardown||n.teardown.call(a,j,r.handle)===!1)&&p.removeEvent(a,h,r.handle),delete m[h])}p.isEmptyObject(m)&&(delete r.handle,p.removeData(a,"events",!0))},customEvent:{getData:!0,setData:!0,changeData:!0},trigger:function(c,d,f,g){if(!f||f.nodeType!==3&&f.nodeType!==8){var h,i,j,k,l,m,n,o,q,r,s=c.type||c,t=[];if($.test(s+p.event.triggered))return;s.indexOf("!")>=0&&(s=s.slice(0,-1),i=!0),s.indexOf(".")>=0&&(t=s.split("."),s=t.shift(),t.sort());if((!f||p.event.customEvent[s])&&!p.event.global[s])return;c=typeof c=="object"?c[p.expando]?c:new p.Event(s,c):new p.Event(s),c.type=s,c.isTrigger=!0,c.exclusive=i,c.namespace=t.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+t.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,m=s.indexOf(":")<0?"on"+s:"";if(!f){h=p.cache;for(j in h)h[j].events&&h[j].events[s]&&p.event.trigger(c,d,h[j].handle.elem,!0);return}c.result=b,c.target||(c.target=f),d=d!=null?p.makeArray(d):[],d.unshift(c),n=p.event.special[s]||{};if(n.trigger&&n.trigger.apply(f,d)===!1)return;q=[[f,n.bindType||s]];if(!g&&!n.noBubble&&!p.isWindow(f)){r=n.delegateType||s,k=$.test(r+s)?f:f.parentNode;for(l=f;k;k=k.parentNode)q.push([k,r]),l=k;l===(f.ownerDocument||e)&&q.push([l.defaultView||l.parentWindow||a,r])}for(j=0;j<q.length&&!c.isPropagationStopped();j++)k=q[j][0],c.type=q[j][1],o=(p._data(k,"events")||{})[c.type]&&p._data(k,"handle"),o&&o.apply(k,d),o=m&&k[m],o&&p.acceptData(k)&&o.apply&&o.apply(k,d)===!1&&c.preventDefault();return c.type=s,!g&&!c.isDefaultPrevented()&&(!n._default||n._default.apply(f.ownerDocument,d)===!1)&&(s!=="click"||!p.nodeName(f,"a"))&&p.acceptData(f)&&m&&f[s]&&(s!=="focus"&&s!=="blur"||c.target.offsetWidth!==0)&&!p.isWindow(f)&&(l=f[m],l&&(f[m]=null),p.event.triggered=s,f[s](),p.event.triggered=b,l&&(f[m]=l)),c.result}return},dispatch:function(c){c=p.event.fix(c||a.event);var d,e,f,g,h,i,j,l,m,n,o=(p._data(this,"events")||{})[c.type]||[],q=o.delegateCount,r=k.call(arguments),s=!c.exclusive&&!c.namespace,t=p.event.special[c.type]||{},u=[];r[0]=c,c.delegateTarget=this;if(t.preDispatch&&t.preDispatch.call(this,c)===!1)return;if(q&&(!c.button||c.type!=="click"))for(f=c.target;f!=this;f=f.parentNode||this)if(f.disabled!==!0||c.type!=="click"){h={},j=[];for(d=0;d<q;d++)l=o[d],m=l.selector,h[m]===b&&(h[m]=l.needsContext?p(m,this).index(f)>=0:p.find(m,this,null,[f]).length),h[m]&&j.push(l);j.length&&u.push({elem:f,matches:j})}o.length>q&&u.push({elem:this,matches:o.slice(q)});for(d=0;d<u.length&&!c.isPropagationStopped();d++){i=u[d],c.currentTarget=i.elem;for(e=0;e<i.matches.length&&!c.isImmediatePropagationStopped();e++){l=i.matches[e];if(s||!c.namespace&&!l.namespace||c.namespace_re&&c.namespace_re.test(l.namespace))c.data=l.data,c.handleObj=l,g=((p.event.special[l.origType]||{}).handle||l.handler).apply(i.elem,r),g!==b&&(c.result=g,g===!1&&(c.preventDefault(),c.stopPropagation()))}}return t.postDispatch&&t.postDispatch.call(this,c),c.result},props:"attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){return a.which==null&&(a.which=b.charCode!=null?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,c){var d,f,g,h=c.button,i=c.fromElement;return a.pageX==null&&c.clientX!=null&&(d=a.target.ownerDocument||e,f=d.documentElement,g=d.body,a.pageX=c.clientX+(f&&f.scrollLeft||g&&g.scrollLeft||0)-(f&&f.clientLeft||g&&g.clientLeft||0),a.pageY=c.clientY+(f&&f.scrollTop||g&&g.scrollTop||0)-(f&&f.clientTop||g&&g.clientTop||0)),!a.relatedTarget&&i&&(a.relatedTarget=i===a.target?c.toElement:i),!a.which&&h!==b&&(a.which=h&1?1:h&2?3:h&4?2:0),a}},fix:function(a){if(a[p.expando])return a;var b,c,d=a,f=p.event.fixHooks[a.type]||{},g=f.props?this.props.concat(f.props):this.props;a=p.Event(d);for(b=g.length;b;)c=g[--b],a[c]=d[c];return a.target||(a.target=d.srcElement||e),a.target.nodeType===3&&(a.target=a.target.parentNode),a.metaKey=!!a.metaKey,f.filter?f.filter(a,d):a},special:{load:{noBubble:!0},focus:{delegateType:"focusin"},blur:{delegateType:"focusout"},beforeunload:{setup:function(a,b,c){p.isWindow(this)&&(this.onbeforeunload=c)},teardown:function(a,b){this.onbeforeunload===b&&(this.onbeforeunload=null)}}},simulate:function(a,b,c,d){var e=p.extend(new p.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?p.event.trigger(e,null,b):p.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},p.event.handle=p.event.dispatch,p.removeEvent=e.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){var d="on"+b;a.detachEvent&&(typeof a[d]=="undefined"&&(a[d]=null),a.detachEvent(d,c))},p.Event=function(a,b){if(this instanceof p.Event)a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||a.returnValue===!1||a.getPreventDefault&&a.getPreventDefault()?bb:ba):this.type=a,b&&p.extend(this,b),this.timeStamp=a&&a.timeStamp||p.now(),this[p.expando]=!0;else return new p.Event(a,b)},p.Event.prototype={preventDefault:function(){this.isDefaultPrevented=bb;var a=this.originalEvent;if(!a)return;a.preventDefault?a.preventDefault():a.returnValue=!1},stopPropagation:function(){this.isPropagationStopped=bb;var a=this.originalEvent;if(!a)return;a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=bb,this.stopPropagation()},isDefaultPrevented:ba,isPropagationStopped:ba,isImmediatePropagationStopped:ba},p.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){p.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj,g=f.selector;if(!e||e!==d&&!p.contains(d,e))a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b;return c}}}),p.support.submitBubbles||(p.event.special.submit={setup:function(){if(p.nodeName(this,"form"))return!1;p.event.add(this,"click._submit keypress._submit",function(a){var c=a.target,d=p.nodeName(c,"input")||p.nodeName(c,"button")?c.form:b;d&&!p._data(d,"_submit_attached")&&(p.event.add(d,"submit._submit",function(a){a._submit_bubble=!0}),p._data(d,"_submit_attached",!0))})},postDispatch:function(a){a._submit_bubble&&(delete a._submit_bubble,this.parentNode&&!a.isTrigger&&p.event.simulate("submit",this.parentNode,a,!0))},teardown:function(){if(p.nodeName(this,"form"))return!1;p.event.remove(this,"._submit")}}),p.support.changeBubbles||(p.event.special.change={setup:function(){if(V.test(this.nodeName)){if(this.type==="checkbox"||this.type==="radio")p.event.add(this,"propertychange._change",function(a){a.originalEvent.propertyName==="checked"&&(this._just_changed=!0)}),p.event.add(this,"click._change",function(a){this._just_changed&&!a.isTrigger&&(this._just_changed=!1),p.event.simulate("change",this,a,!0)});return!1}p.event.add(this,"beforeactivate._change",function(a){var b=a.target;V.test(b.nodeName)&&!p._data(b,"_change_attached")&&(p.event.add(b,"change._change",function(a){this.parentNode&&!a.isSimulated&&!a.isTrigger&&p.event.simulate("change",this.parentNode,a,!0)}),p._data(b,"_change_attached",!0))})},handle:function(a){var b=a.target;if(this!==b||a.isSimulated||a.isTrigger||b.type!=="radio"&&b.type!=="checkbox")return a.handleObj.handler.apply(this,arguments)},teardown:function(){return p.event.remove(this,"._change"),!V.test(this.nodeName)}}),p.support.focusinBubbles||p.each({focus:"focusin",blur:"focusout"},function(a,b){var c=0,d=function(a){p.event.simulate(b,a.target,p.event.fix(a),!0)};p.event.special[b]={setup:function(){c++===0&&e.addEventListener(a,d,!0)},teardown:function(){--c===0&&e.removeEventListener(a,d,!0)}}}),p.fn.extend({on:function(a,c,d,e,f){var g,h;if(typeof a=="object"){typeof c!="string"&&(d=d||c,c=b);for(h in a)this.on(h,c,d,a[h],f);return this}d==null&&e==null?(e=c,d=c=b):e==null&&(typeof c=="string"?(e=d,d=b):(e=d,d=c,c=b));if(e===!1)e=ba;else if(!e)return this;return f===1&&(g=e,e=function(a){return p().off(a),g.apply(this,arguments)},e.guid=g.guid||(g.guid=p.guid++)),this.each(function(){p.event.add(this,a,e,d,c)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,c,d){var e,f;if(a&&a.preventDefault&&a.handleObj)return e=a.handleObj,p(a.delegateTarget).off(e.namespace?e.origType+"."+e.namespace:e.origType,e.selector,e.handler),this;if(typeof a=="object"){for(f in a)this.off(f,c,a[f]);return this}if(c===!1||typeof c=="function")d=c,c=b;return d===!1&&(d=ba),this.each(function(){p.event.remove(this,a,d,c)})},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},live:function(a,b,c){return p(this.context).on(a,this.selector,b,c),this},die:function(a,b){return p(this.context).off(a,this.selector||"**",b),this},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return arguments.length===1?this.off(a,"**"):this.off(b,a||"**",c)},trigger:function(a,b){return this.each(function(){p.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0])return p.event.trigger(a,b,this[0],!0)},toggle:function(a){var b=arguments,c=a.guid||p.guid++,d=0,e=function(c){var e=(p._data(this,"lastToggle"+a.guid)||0)%d;return p._data(this,"lastToggle"+a.guid,e+1),c.preventDefault(),b[e].apply(this,arguments)||!1};e.guid=c;while(d<b.length)b[d++].guid=c;return this.click(e)},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}}),p.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){p.fn[b]=function(a,c){return c==null&&(c=a,a=null),arguments.length>0?this.on(b,null,a,c):this.trigger(b)},Y.test(b)&&(p.event.fixHooks[b]=p.event.keyHooks),Z.test(b)&&(p.event.fixHooks[b]=p.event.mouseHooks)}),function(a,b){function bc(a,b,c,d){c=c||[],b=b||r;var e,f,i,j,k=b.nodeType;if(!a||typeof a!="string")return c;if(k!==1&&k!==9)return[];i=g(b);if(!i&&!d)if(e=P.exec(a))if(j=e[1]){if(k===9){f=b.getElementById(j);if(!f||!f.parentNode)return c;if(f.id===j)return c.push(f),c}else if(b.ownerDocument&&(f=b.ownerDocument.getElementById(j))&&h(b,f)&&f.id===j)return c.push(f),c}else{if(e[2])return w.apply(c,x.call(b.getElementsByTagName(a),0)),c;if((j=e[3])&&_&&b.getElementsByClassName)return w.apply(c,x.call(b.getElementsByClassName(j),0)),c}return bp(a.replace(L,"$1"),b,c,d,i)}function bd(a){return function(b){var c=b.nodeName.toLowerCase();return c==="input"&&b.type===a}}function be(a){return function(b){var c=b.nodeName.toLowerCase();return(c==="input"||c==="button")&&b.type===a}}function bf(a){return z(function(b){return b=+b,z(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function bg(a,b,c){if(a===b)return c;var d=a.nextSibling;while(d){if(d===b)return-1;d=d.nextSibling}return 1}function bh(a,b){var c,d,f,g,h,i,j,k=C[o][a];if(k)return b?0:k.slice(0);h=a,i=[],j=e.preFilter;while(h){if(!c||(d=M.exec(h)))d&&(h=h.slice(d[0].length)),i.push(f=[]);c=!1;if(d=N.exec(h))f.push(c=new q(d.shift())),h=h.slice(c.length),c.type=d[0].replace(L," ");for(g in e.filter)(d=W[g].exec(h))&&(!j[g]||(d=j[g](d,r,!0)))&&(f.push(c=new q(d.shift())),h=h.slice(c.length),c.type=g,c.matches=d);if(!c)break}return b?h.length:h?bc.error(a):C(a,i).slice(0)}function bi(a,b,d){var e=b.dir,f=d&&b.dir==="parentNode",g=u++;return b.first?function(b,c,d){while(b=b[e])if(f||b.nodeType===1)return a(b,c,d)}:function(b,d,h){if(!h){var i,j=t+" "+g+" ",k=j+c;while(b=b[e])if(f||b.nodeType===1){if((i=b[o])===k)return b.sizset;if(typeof i=="string"&&i.indexOf(j)===0){if(b.sizset)return b}else{b[o]=k;if(a(b,d,h))return b.sizset=!0,b;b.sizset=!1}}}else while(b=b[e])if(f||b.nodeType===1)if(a(b,d,h))return b}}function bj(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function bk(a,b,c,d,e){var f,g=[],h=0,i=a.length,j=b!=null;for(;h<i;h++)if(f=a[h])if(!c||c(f,d,e))g.push(f),j&&b.push(h);return g}function bl(a,b,c,d,e,f){return d&&!d[o]&&(d=bl(d)),e&&!e[o]&&(e=bl(e,f)),z(function(f,g,h,i){if(f&&e)return;var j,k,l,m=[],n=[],o=g.length,p=f||bo(b||"*",h.nodeType?[h]:h,[],f),q=a&&(f||!b)?bk(p,m,a,h,i):p,r=c?e||(f?a:o||d)?[]:g:q;c&&c(q,r,h,i);if(d){l=bk(r,n),d(l,[],h,i),j=l.length;while(j--)if(k=l[j])r[n[j]]=!(q[n[j]]=k)}if(f){j=a&&r.length;while(j--)if(k=r[j])f[m[j]]=!(g[m[j]]=k)}else r=bk(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):w.apply(g,r)})}function bm(a){var b,c,d,f=a.length,g=e.relative[a[0].type],h=g||e.relative[" "],i=g?1:0,j=bi(function(a){return a===b},h,!0),k=bi(function(a){return y.call(b,a)>-1},h,!0),m=[function(a,c,d){return!g&&(d||c!==l)||((b=c).nodeType?j(a,c,d):k(a,c,d))}];for(;i<f;i++)if(c=e.relative[a[i].type])m=[bi(bj(m),c)];else{c=e.filter[a[i].type].apply(null,a[i].matches);if(c[o]){d=++i;for(;d<f;d++)if(e.relative[a[d].type])break;return bl(i>1&&bj(m),i>1&&a.slice(0,i-1).join("").replace(L,"$1"),c,i<d&&bm(a.slice(i,d)),d<f&&bm(a=a.slice(d)),d<f&&a.join(""))}m.push(c)}return bj(m)}function bn(a,b){var d=b.length>0,f=a.length>0,g=function(h,i,j,k,m){var n,o,p,q=[],s=0,u="0",x=h&&[],y=m!=null,z=l,A=h||f&&e.find.TAG("*",m&&i.parentNode||i),B=t+=z==null?1:Math.E;y&&(l=i!==r&&i,c=g.el);for(;(n=A[u])!=null;u++){if(f&&n){for(o=0;p=a[o];o++)if(p(n,i,j)){k.push(n);break}y&&(t=B,c=++g.el)}d&&((n=!p&&n)&&s--,h&&x.push(n))}s+=u;if(d&&u!==s){for(o=0;p=b[o];o++)p(x,q,i,j);if(h){if(s>0)while(u--)!x[u]&&!q[u]&&(q[u]=v.call(k));q=bk(q)}w.apply(k,q),y&&!h&&q.length>0&&s+b.length>1&&bc.uniqueSort(k)}return y&&(t=B,l=z),x};return g.el=0,d?z(g):g}function bo(a,b,c,d){var e=0,f=b.length;for(;e<f;e++)bc(a,b[e],c,d);return c}function bp(a,b,c,d,f){var g,h,j,k,l,m=bh(a),n=m.length;if(!d&&m.length===1){h=m[0]=m[0].slice(0);if(h.length>2&&(j=h[0]).type==="ID"&&b.nodeType===9&&!f&&e.relative[h[1].type]){b=e.find.ID(j.matches[0].replace(V,""),b,f)[0];if(!b)return c;a=a.slice(h.shift().length)}for(g=W.POS.test(a)?-1:h.length-1;g>=0;g--){j=h[g];if(e.relative[k=j.type])break;if(l=e.find[k])if(d=l(j.matches[0].replace(V,""),R.test(h[0].type)&&b.parentNode||b,f)){h.splice(g,1),a=d.length&&h.join("");if(!a)return w.apply(c,x.call(d,0)),c;break}}}return i(a,m)(d,b,f,c,R.test(a)),c}function bq(){}var c,d,e,f,g,h,i,j,k,l,m=!0,n="undefined",o=("sizcache"+Math.random()).replace(".",""),q=String,r=a.document,s=r.documentElement,t=0,u=0,v=[].pop,w=[].push,x=[].slice,y=[].indexOf||function(a){var b=0,c=this.length;for(;b<c;b++)if(this[b]===a)return b;return-1},z=function(a,b){return a[o]=b==null||b,a},A=function(){var a={},b=[];return z(function(c,d){return b.push(c)>e.cacheLength&&delete a[b.shift()],a[c]=d},a)},B=A(),C=A(),D=A(),E="[\\x20\\t\\r\\n\\f]",F="(?:\\\\.|[-\\w]|[^\\x00-\\xa0])+",G=F.replace("w","w#"),H="([*^$|!~]?=)",I="\\["+E+"*("+F+")"+E+"*(?:"+H+E+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+G+")|)|)"+E+"*\\]",J=":("+F+")(?:\\((?:(['\"])((?:\\\\.|[^\\\\])*?)\\2|([^()[\\]]*|(?:(?:"+I+")|[^:]|\\\\.)*|.*))\\)|)",K=":(even|odd|eq|gt|lt|nth|first|last)(?:\\("+E+"*((?:-\\d)?\\d*)"+E+"*\\)|)(?=[^-]|$)",L=new RegExp("^"+E+"+|((?:^|[^\\\\])(?:\\\\.)*)"+E+"+$","g"),M=new RegExp("^"+E+"*,"+E+"*"),N=new RegExp("^"+E+"*([\\x20\\t\\r\\n\\f>+~])"+E+"*"),O=new RegExp(J),P=/^(?:#([\w\-]+)|(\w+)|\.([\w\-]+))$/,Q=/^:not/,R=/[\x20\t\r\n\f]*[+~]/,S=/:not\($/,T=/h\d/i,U=/input|select|textarea|button/i,V=/\\(?!\\)/g,W={ID:new RegExp("^#("+F+")"),CLASS:new RegExp("^\\.("+F+")"),NAME:new RegExp("^\\[name=['\"]?("+F+")['\"]?\\]"),TAG:new RegExp("^("+F.replace("w","w*")+")"),ATTR:new RegExp("^"+I),PSEUDO:new RegExp("^"+J),POS:new RegExp(K,"i"),CHILD:new RegExp("^:(only|nth|first|last)-child(?:\\("+E+"*(even|odd|(([+-]|)(\\d*)n|)"+E+"*(?:([+-]|)"+E+"*(\\d+)|))"+E+"*\\)|)","i"),needsContext:new RegExp("^"+E+"*[>+~]|"+K,"i")},X=function(a){var b=r.createElement("div");try{return a(b)}catch(c){return!1}finally{b=null}},Y=X(function(a){return a.appendChild(r.createComment("")),!a.getElementsByTagName("*").length}),Z=X(function(a){return a.innerHTML="<a href='#'></a>",a.firstChild&&typeof a.firstChild.getAttribute!==n&&a.firstChild.getAttribute("href")==="#"}),$=X(function(a){a.innerHTML="<select></select>";var b=typeof a.lastChild.getAttribute("multiple");return b!=="boolean"&&b!=="string"}),_=X(function(a){return a.innerHTML="<div class='hidden e'></div><div class='hidden'></div>",!a.getElementsByClassName||!a.getElementsByClassName("e").length?!1:(a.lastChild.className="e",a.getElementsByClassName("e").length===2)}),ba=X(function(a){a.id=o+0,a.innerHTML="<a name='"+o+"'></a><div name='"+o+"'></div>",s.insertBefore(a,s.firstChild);var b=r.getElementsByName&&r.getElementsByName(o).length===2+r.getElementsByName(o+0).length;return d=!r.getElementById(o),s.removeChild(a),b});try{x.call(s.childNodes,0)[0].nodeType}catch(bb){x=function(a){var b,c=[];for(;b=this[a];a++)c.push(b);return c}}bc.matches=function(a,b){return bc(a,null,null,b)},bc.matchesSelector=function(a,b){return bc(b,null,null,[a]).length>0},f=bc.getText=function(a){var b,c="",d=0,e=a.nodeType;if(e){if(e===1||e===9||e===11){if(typeof a.textContent=="string")return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=f(a)}else if(e===3||e===4)return a.nodeValue}else for(;b=a[d];d++)c+=f(b);return c},g=bc.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?b.nodeName!=="HTML":!1},h=bc.contains=s.contains?function(a,b){var c=a.nodeType===9?a.documentElement:a,d=b&&b.parentNode;return a===d||!!(d&&d.nodeType===1&&c.contains&&c.contains(d))}:s.compareDocumentPosition?function(a,b){return b&&!!(a.compareDocumentPosition(b)&16)}:function(a,b){while(b=b.parentNode)if(b===a)return!0;return!1},bc.attr=function(a,b){var c,d=g(a);return d||(b=b.toLowerCase()),(c=e.attrHandle[b])?c(a):d||$?a.getAttribute(b):(c=a.getAttributeNode(b),c?typeof a[b]=="boolean"?a[b]?b:null:c.specified?c.value:null:null)},e=bc.selectors={cacheLength:50,createPseudo:z,match:W,attrHandle:Z?{}:{href:function(a){return a.getAttribute("href",2)},type:function(a){return a.getAttribute("type")}},find:{ID:d?function(a,b,c){if(typeof b.getElementById!==n&&!c){var d=b.getElementById(a);return d&&d.parentNode?[d]:[]}}:function(a,c,d){if(typeof c.getElementById!==n&&!d){var e=c.getElementById(a);return e?e.id===a||typeof e.getAttributeNode!==n&&e.getAttributeNode("id").value===a?[e]:b:[]}},TAG:Y?function(a,b){if(typeof b.getElementsByTagName!==n)return b.getElementsByTagName(a)}:function(a,b){var c=b.getElementsByTagName(a);if(a==="*"){var d,e=[],f=0;for(;d=c[f];f++)d.nodeType===1&&e.push(d);return e}return c},NAME:ba&&function(a,b){if(typeof b.getElementsByName!==n)return b.getElementsByName(name)},CLASS:_&&function(a,b,c){if(typeof b.getElementsByClassName!==n&&!c)return b.getElementsByClassName(a)}},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(V,""),a[3]=(a[4]||a[5]||"").replace(V,""),a[2]==="~="&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),a[1]==="nth"?(a[2]||bc.error(a[0]),a[3]=+(a[3]?a[4]+(a[5]||1):2*(a[2]==="even"||a[2]==="odd")),a[4]=+(a[6]+a[7]||a[2]==="odd")):a[2]&&bc.error(a[0]),a},PSEUDO:function(a){var b,c;if(W.CHILD.test(a[0]))return null;if(a[3])a[2]=a[3];else if(b=a[4])O.test(b)&&(c=bh(b,!0))&&(c=b.indexOf(")",b.length-c)-b.length)&&(b=b.slice(0,c),a[0]=a[0].slice(0,c)),a[2]=b;return a.slice(0,3)}},filter:{ID:d?function(a){return a=a.replace(V,""),function(b){return b.getAttribute("id")===a}}:function(a){return a=a.replace(V,""),function(b){var c=typeof b.getAttributeNode!==n&&b.getAttributeNode("id");return c&&c.value===a}},TAG:function(a){return a==="*"?function(){return!0}:(a=a.replace(V,"").toLowerCase(),function(b){return b.nodeName&&b.nodeName.toLowerCase()===a})},CLASS:function(a){var b=B[o][a];return b||(b=B(a,new RegExp("(^|"+E+")"+a+"("+E+"|$)"))),function(a){return b.test(a.className||typeof a.getAttribute!==n&&a.getAttribute("class")||"")}},ATTR:function(a,b,c){return function(d,e){var f=bc.attr(d,a);return f==null?b==="!=":b?(f+="",b==="="?f===c:b==="!="?f!==c:b==="^="?c&&f.indexOf(c)===0:b==="*="?c&&f.indexOf(c)>-1:b==="$="?c&&f.substr(f.length-c.length)===c:b==="~="?(" "+f+" ").indexOf(c)>-1:b==="|="?f===c||f.substr(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d){return a==="nth"?function(a){var b,e,f=a.parentNode;if(c===1&&d===0)return!0;if(f){e=0;for(b=f.firstChild;b;b=b.nextSibling)if(b.nodeType===1){e++;if(a===b)break}}return e-=d,e===c||e%c===0&&e/c>=0}:function(b){var c=b;switch(a){case"only":case"first":while(c=c.previousSibling)if(c.nodeType===1)return!1;if(a==="first")return!0;c=b;case"last":while(c=c.nextSibling)if(c.nodeType===1)return!1;return!0}}},PSEUDO:function(a,b){var c,d=e.pseudos[a]||e.setFilters[a.toLowerCase()]||bc.error("unsupported pseudo: "+a);return d[o]?d(b):d.length>1?(c=[a,a,"",b],e.setFilters.hasOwnProperty(a.toLowerCase())?z(function(a,c){var e,f=d(a,b),g=f.length;while(g--)e=y.call(a,f[g]),a[e]=!(c[e]=f[g])}):function(a){return d(a,0,c)}):d}},pseudos:{not:z(function(a){var b=[],c=[],d=i(a.replace(L,"$1"));return d[o]?z(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)if(f=g[h])a[h]=!(b[h]=f)}):function(a,e,f){return b[0]=a,d(b,null,f,c),!c.pop()}}),has:z(function(a){return function(b){return bc(a,b).length>0}}),contains:z(function(a){return function(b){return(b.textContent||b.innerText||f(b)).indexOf(a)>-1}}),enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&!!a.checked||b==="option"&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},parent:function(a){return!e.pseudos.empty(a)},empty:function(a){var b;a=a.firstChild;while(a){if(a.nodeName>"@"||(b=a.nodeType)===3||b===4)return!1;a=a.nextSibling}return!0},header:function(a){return T.test(a.nodeName)},text:function(a){var b,c;return a.nodeName.toLowerCase()==="input"&&(b=a.type)==="text"&&((c=a.getAttribute("type"))==null||c.toLowerCase()===b)},radio:bd("radio"),checkbox:bd("checkbox"),file:bd("file"),password:bd("password"),image:bd("image"),submit:be("submit"),reset:be("reset"),button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&a.type==="button"||b==="button"},input:function(a){return U.test(a.nodeName)},focus:function(a){var b=a.ownerDocument;return a===b.activeElement&&(!b.hasFocus||b.hasFocus())&&(!!a.type||!!a.href)},active:function(a){return a===a.ownerDocument.activeElement},first:bf(function(a,b,c){return[0]}),last:bf(function(a,b,c){return[b-1]}),eq:bf(function(a,b,c){return[c<0?c+b:c]}),even:bf(function(a,b,c){for(var d=0;d<b;d+=2)a.push(d);return a}),odd:bf(function(a,b,c){for(var d=1;d<b;d+=2)a.push(d);return a}),lt:bf(function(a,b,c){for(var d=c<0?c+b:c;--d>=0;)a.push(d);return a}),gt:bf(function(a,b,c){for(var d=c<0?c+b:c;++d<b;)a.push(d);return a})}},j=s.compareDocumentPosition?function(a,b){return a===b?(k=!0,0):(!a.compareDocumentPosition||!b.compareDocumentPosition?a.compareDocumentPosition:a.compareDocumentPosition(b)&4)?-1:1}:function(a,b){if(a===b)return k=!0,0;if(a.sourceIndex&&b.sourceIndex)return a.sourceIndex-b.sourceIndex;var c,d,e=[],f=[],g=a.parentNode,h=b.parentNode,i=g;if(g===h)return bg(a,b);if(!g)return-1;if(!h)return 1;while(i)e.unshift(i),i=i.parentNode;i=h;while(i)f.unshift(i),i=i.parentNode;c=e.length,d=f.length;for(var j=0;j<c&&j<d;j++)if(e[j]!==f[j])return bg(e[j],f[j]);return j===c?bg(a,f[j],-1):bg(e[j],b,1)},[0,0].sort(j),m=!k,bc.uniqueSort=function(a){var b,c=1;k=m,a.sort(j);if(k)for(;b=a[c];c++)b===a[c-1]&&a.splice(c--,1);return a},bc.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},i=bc.compile=function(a,b){var c,d=[],e=[],f=D[o][a];if(!f){b||(b=bh(a)),c=b.length;while(c--)f=bm(b[c]),f[o]?d.push(f):e.push(f);f=D(a,bn(e,d))}return f},r.querySelectorAll&&function(){var a,b=bp,c=/'|\\/g,d=/\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,e=[":focus"],f=[":active",":focus"],h=s.matchesSelector||s.mozMatchesSelector||s.webkitMatchesSelector||s.oMatchesSelector||s.msMatchesSelector;X(function(a){a.innerHTML="<select><option selected=''></option></select>",a.querySelectorAll("[selected]").length||e.push("\\["+E+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)"),a.querySelectorAll(":checked").length||e.push(":checked")}),X(function(a){a.innerHTML="<p test=''></p>",a.querySelectorAll("[test^='']").length&&e.push("[*^$]="+E+"*(?:\"\"|'')"),a.innerHTML="<input type='hidden'/>",a.querySelectorAll(":enabled").length||e.push(":enabled",":disabled")}),e=new RegExp(e.join("|")),bp=function(a,d,f,g,h){if(!g&&!h&&(!e||!e.test(a))){var i,j,k=!0,l=o,m=d,n=d.nodeType===9&&a;if(d.nodeType===1&&d.nodeName.toLowerCase()!=="object"){i=bh(a),(k=d.getAttribute("id"))?l=k.replace(c,"\\$&"):d.setAttribute("id",l),l="[id='"+l+"'] ",j=i.length;while(j--)i[j]=l+i[j].join("");m=R.test(a)&&d.parentNode||d,n=i.join(",")}if(n)try{return w.apply(f,x.call(m.querySelectorAll(n),0)),f}catch(p){}finally{k||d.removeAttribute("id")}}return b(a,d,f,g,h)},h&&(X(function(b){a=h.call(b,"div");try{h.call(b,"[test!='']:sizzle"),f.push("!=",J)}catch(c){}}),f=new RegExp(f.join("|")),bc.matchesSelector=function(b,c){c=c.replace(d,"='$1']");if(!g(b)&&!f.test(c)&&(!e||!e.test(c)))try{var i=h.call(b,c);if(i||a||b.document&&b.document.nodeType!==11)return i}catch(j){}return bc(c,null,null,[b]).length>0})}(),e.pseudos.nth=e.pseudos.eq,e.filters=bq.prototype=e.pseudos,e.setFilters=new bq,bc.attr=p.attr,p.find=bc,p.expr=bc.selectors,p.expr[":"]=p.expr.pseudos,p.unique=bc.uniqueSort,p.text=bc.getText,p.isXMLDoc=bc.isXML,p.contains=bc.contains}(a);var bc=/Until$/,bd=/^(?:parents|prev(?:Until|All))/,be=/^.[^:#\[\.,]*$/,bf=p.expr.match.needsContext,bg={children:!0,contents:!0,next:!0,prev:!0};p.fn.extend({find:function(a){var b,c,d,e,f,g,h=this;if(typeof a!="string")return p(a).filter(function(){for(b=0,c=h.length;b<c;b++)if(p.contains(h[b],this))return!0});g=this.pushStack("","find",a);for(b=0,c=this.length;b<c;b++){d=g.length,p.find(a,this[b],g);if(b>0)for(e=d;e<g.length;e++)for(f=0;f<d;f++)if(g[f]===g[e]){g.splice(e--,1);break}}return g},has:function(a){var b,c=p(a,this),d=c.length;return this.filter(function(){for(b=0;b<d;b++)if(p.contains(this,c[b]))return!0})},not:function(a){return this.pushStack(bj(this,a,!1),"not",a)},filter:function(a){return this.pushStack(bj(this,a,!0),"filter",a)},is:function(a){return!!a&&(typeof a=="string"?bf.test(a)?p(a,this.context).index(this[0])>=0:p.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c,d=0,e=this.length,f=[],g=bf.test(a)||typeof a!="string"?p(a,b||this.context):0;for(;d<e;d++){c=this[d];while(c&&c.ownerDocument&&c!==b&&c.nodeType!==11){if(g?g.index(c)>-1:p.find.matchesSelector(c,a)){f.push(c);break}c=c.parentNode}}return f=f.length>1?p.unique(f):f,this.pushStack(f,"closest",a)},index:function(a){return a?typeof a=="string"?p.inArray(this[0],p(a)):p.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.prevAll().length:-1},add:function(a,b){var c=typeof a=="string"?p(a,b):p.makeArray(a&&a.nodeType?[a]:a),d=p.merge(this.get(),c);return this.pushStack(bh(c[0])||bh(d[0])?d:p.unique(d))},addBack:function(a){return this.add(a==null?this.prevObject:this.prevObject.filter(a))}}),p.fn.andSelf=p.fn.addBack,p.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return p.dir(a,"parentNode")},parentsUntil:function(a,b,c){return p.dir(a,"parentNode",c)},next:function(a){return bi(a,"nextSibling")},prev:function(a){return bi(a,"previousSibling")},nextAll:function(a){return p.dir(a,"nextSibling")},prevAll:function(a){return p.dir(a,"previousSibling")},nextUntil:function(a,b,c){return p.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return p.dir(a,"previousSibling",c)},siblings:function(a){return p.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return p.sibling(a.firstChild)},contents:function(a){return p.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:p.merge([],a.childNodes)}},function(a,b){p.fn[a]=function(c,d){var e=p.map(this,b,c);return bc.test(a)||(d=c),d&&typeof d=="string"&&(e=p.filter(d,e)),e=this.length>1&&!bg[a]?p.unique(e):e,this.length>1&&bd.test(a)&&(e=e.reverse()),this.pushStack(e,a,k.call(arguments).join(","))}}),p.extend({filter:function(a,b,c){return c&&(a=":not("+a+")"),b.length===1?p.find.matchesSelector(b[0],a)?[b[0]]:[]:p.find.matches(a,b)},dir:function(a,c,d){var e=[],f=a[c];while(f&&f.nodeType!==9&&(d===b||f.nodeType!==1||!p(f).is(d)))f.nodeType===1&&e.push(f),f=f[c];return e},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var bl="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",bm=/ jQuery\d+="(?:null|\d+)"/g,bn=/^\s+/,bo=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,bp=/<([\w:]+)/,bq=/<tbody/i,br=/<|&#?\w+;/,bs=/<(?:script|style|link)/i,bt=/<(?:script|object|embed|option|style)/i,bu=new RegExp("<(?:"+bl+")[\\s/>]","i"),bv=/^(?:checkbox|radio)$/,bw=/checked\s*(?:[^=]|=\s*.checked.)/i,bx=/\/(java|ecma)script/i,by=/^\s*<!(?:\[CDATA\[|\-\-)|[\]\-]{2}>\s*$/g,bz={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]},bA=bk(e),bB=bA.appendChild(e.createElement("div"));bz.optgroup=bz.option,bz.tbody=bz.tfoot=bz.colgroup=bz.caption=bz.thead,bz.th=bz.td,p.support.htmlSerialize||(bz._default=[1,"X<div>","</div>"]),p.fn.extend({text:function(a){return p.access(this,function(a){return a===b?p.text(this):this.empty().append((this[0]&&this[0].ownerDocument||e).createTextNode(a))},null,a,arguments.length)},wrapAll:function(a){if(p.isFunction(a))return this.each(function(b){p(this).wrapAll(a.call(this,b))});if(this[0]){var b=p(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){return p.isFunction(a)?this.each(function(b){p(this).wrapInner(a.call(this,b))}):this.each(function(){var b=p(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=p.isFunction(a);return this.each(function(c){p(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){p.nodeName(this,"body")||p(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){(this.nodeType===1||this.nodeType===11)&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){(this.nodeType===1||this.nodeType===11)&&this.insertBefore(a,this.firstChild)})},before:function(){if(!bh(this[0]))return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=p.clean(arguments);return this.pushStack(p.merge(a,this),"before",this.selector)}},after:function(){if(!bh(this[0]))return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=p.clean(arguments);return this.pushStack(p.merge(this,a),"after",this.selector)}},remove:function(a,b){var c,d=0;for(;(c=this[d])!=null;d++)if(!a||p.filter(a,[c]).length)!b&&c.nodeType===1&&(p.cleanData(c.getElementsByTagName("*")),p.cleanData([c])),c.parentNode&&c.parentNode.removeChild(c);return this},empty:function(){var a,b=0;for(;(a=this[b])!=null;b++){a.nodeType===1&&p.cleanData(a.getElementsByTagName("*"));while(a.firstChild)a.removeChild(a.firstChild)}return this},clone:function(a,b){return a=a==null?!1:a,b=b==null?a:b,this.map(function(){return p.clone(this,a,b)})},html:function(a){return p.access(this,function(a){var c=this[0]||{},d=0,e=this.length;if(a===b)return c.nodeType===1?c.innerHTML.replace(bm,""):b;if(typeof a=="string"&&!bs.test(a)&&(p.support.htmlSerialize||!bu.test(a))&&(p.support.leadingWhitespace||!bn.test(a))&&!bz[(bp.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(bo,"<$1></$2>");try{for(;d<e;d++)c=this[d]||{},c.nodeType===1&&(p.cleanData(c.getElementsByTagName("*")),c.innerHTML=a);c=0}catch(f){}}c&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(a){return bh(this[0])?this.length?this.pushStack(p(p.isFunction(a)?a():a),"replaceWith",a):this:p.isFunction(a)?this.each(function(b){var c=p(this),d=c.html();c.replaceWith(a.call(this,b,d))}):(typeof a!="string"&&(a=p(a).detach()),this.each(function(){var b=this.nextSibling,c=this.parentNode;p(this).remove(),b?p(b).before(a):p(c).append(a)}))},detach:function(a){return this.remove(a,!0)},domManip:function(a,c,d){a=[].concat.apply([],a);var e,f,g,h,i=0,j=a[0],k=[],l=this.length;if(!p.support.checkClone&&l>1&&typeof j=="string"&&bw.test(j))return this.each(function(){p(this).domManip(a,c,d)});if(p.isFunction(j))return this.each(function(e){var f=p(this);a[0]=j.call(this,e,c?f.html():b),f.domManip(a,c,d)});if(this[0]){e=p.buildFragment(a,this,k),g=e.fragment,f=g.firstChild,g.childNodes.length===1&&(g=f);if(f){c=c&&p.nodeName(f,"tr");for(h=e.cacheable||l-1;i<l;i++)d.call(c&&p.nodeName(this[i],"table")?bC(this[i],"tbody"):this[i],i===h?g:p.clone(g,!0,!0))}g=f=null,k.length&&p.each(k,function(a,b){b.src?p.ajax?p.ajax({url:b.src,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0}):p.error("no ajax"):p.globalEval((b.text||b.textContent||b.innerHTML||"").replace(by,"")),b.parentNode&&b.parentNode.removeChild(b)})}return this}}),p.buildFragment=function(a,c,d){var f,g,h,i=a[0];return c=c||e,c=!c.nodeType&&c[0]||c,c=c.ownerDocument||c,a.length===1&&typeof i=="string"&&i.length<512&&c===e&&i.charAt(0)==="<"&&!bt.test(i)&&(p.support.checkClone||!bw.test(i))&&(p.support.html5Clone||!bu.test(i))&&(g=!0,f=p.fragments[i],h=f!==b),f||(f=c.createDocumentFragment(),p.clean(a,c,f,d),g&&(p.fragments[i]=h&&f)),{fragment:f,cacheable:g}},p.fragments={},p.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){p.fn[a]=function(c){var d,e=0,f=[],g=p(c),h=g.length,i=this.length===1&&this[0].parentNode;if((i==null||i&&i.nodeType===11&&i.childNodes.length===1)&&h===1)return g[b](this[0]),this;for(;e<h;e++)d=(e>0?this.clone(!0):this).get(),p(g[e])[b](d),f=f.concat(d);return this.pushStack(f,a,g.selector)}}),p.extend({clone:function(a,b,c){var d,e,f,g;p.support.html5Clone||p.isXMLDoc(a)||!bu.test("<"+a.nodeName+">")?g=a.cloneNode(!0):(bB.innerHTML=a.outerHTML,bB.removeChild(g=bB.firstChild));if((!p.support.noCloneEvent||!p.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!p.isXMLDoc(a)){bE(a,g),d=bF(a),e=bF(g);for(f=0;d[f];++f)e[f]&&bE(d[f],e[f])}if(b){bD(a,g);if(c){d=bF(a),e=bF(g);for(f=0;d[f];++f)bD(d[f],e[f])}}return d=e=null,g},clean:function(a,b,c,d){var f,g,h,i,j,k,l,m,n,o,q,r,s=b===e&&bA,t=[];if(!b||typeof b.createDocumentFragment=="undefined")b=e;for(f=0;(h=a[f])!=null;f++){typeof h=="number"&&(h+="");if(!h)continue;if(typeof h=="string")if(!br.test(h))h=b.createTextNode(h);else{s=s||bk(b),l=b.createElement("div"),s.appendChild(l),h=h.replace(bo,"<$1></$2>"),i=(bp.exec(h)||["",""])[1].toLowerCase(),j=bz[i]||bz._default,k=j[0],l.innerHTML=j[1]+h+j[2];while(k--)l=l.lastChild;if(!p.support.tbody){m=bq.test(h),n=i==="table"&&!m?l.firstChild&&l.firstChild.childNodes:j[1]==="<table>"&&!m?l.childNodes:[];for(g=n.length-1;g>=0;--g)p.nodeName(n[g],"tbody")&&!n[g].childNodes.length&&n[g].parentNode.removeChild(n[g])}!p.support.leadingWhitespace&&bn.test(h)&&l.insertBefore(b.createTextNode(bn.exec(h)[0]),l.firstChild),h=l.childNodes,l.parentNode.removeChild(l)}h.nodeType?t.push(h):p.merge(t,h)}l&&(h=l=s=null);if(!p.support.appendChecked)for(f=0;(h=t[f])!=null;f++)p.nodeName(h,"input")?bG(h):typeof h.getElementsByTagName!="undefined"&&p.grep(h.getElementsByTagName("input"),bG);if(c){q=function(a){if(!a.type||bx.test(a.type))return d?d.push(a.parentNode?a.parentNode.removeChild(a):a):c.appendChild(a)};for(f=0;(h=t[f])!=null;f++)if(!p.nodeName(h,"script")||!q(h))c.appendChild(h),typeof h.getElementsByTagName!="undefined"&&(r=p.grep(p.merge([],h.getElementsByTagName("script")),q),t.splice.apply(t,[f+1,0].concat(r)),f+=r.length)}return t},cleanData:function(a,b){var c,d,e,f,g=0,h=p.expando,i=p.cache,j=p.support.deleteExpando,k=p.event.special;for(;(e=a[g])!=null;g++)if(b||p.acceptData(e)){d=e[h],c=d&&i[d];if(c){if(c.events)for(f in c.events)k[f]?p.event.remove(e,f):p.removeEvent(e,f,c.handle);i[d]&&(delete i[d],j?delete e[h]:e.removeAttribute?e.removeAttribute(h):e[h]=null,p.deletedIds.push(d))}}}}),function(){var a,b;p.uaMatch=function(a){a=a.toLowerCase();var b=/(chrome)[ \/]([\w.]+)/.exec(a)||/(webkit)[ \/]([\w.]+)/.exec(a)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(a)||/(msie) ([\w.]+)/.exec(a)||a.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(a)||[];return{browser:b[1]||"",version:b[2]||"0"}},a=p.uaMatch(g.userAgent),b={},a.browser&&(b[a.browser]=!0,b.version=a.version),b.chrome?b.webkit=!0:b.webkit&&(b.safari=!0),p.browser=b,p.sub=function(){function a(b,c){return new a.fn.init(b,c)}p.extend(!0,a,this),a.superclass=this,a.fn=a.prototype=this(),a.fn.constructor=a,a.sub=this.sub,a.fn.init=function c(c,d){return d&&d instanceof p&&!(d instanceof a)&&(d=a(d)),p.fn.init.call(this,c,d,b)},a.fn.init.prototype=a.fn;var b=a(e);return a}}();var bH,bI,bJ,bK=/alpha\([^)]*\)/i,bL=/opacity=([^)]*)/,bM=/^(top|right|bottom|left)$/,bN=/^(none|table(?!-c[ea]).+)/,bO=/^margin/,bP=new RegExp("^("+q+")(.*)$","i"),bQ=new RegExp("^("+q+")(?!px)[a-z%]+$","i"),bR=new RegExp("^([-+])=("+q+")","i"),bS={},bT={position:"absolute",visibility:"hidden",display:"block"},bU={letterSpacing:0,fontWeight:400},bV=["Top","Right","Bottom","Left"],bW=["Webkit","O","Moz","ms"],bX=p.fn.toggle;p.fn.extend({css:function(a,c){return p.access(this,function(a,c,d){return d!==b?p.style(a,c,d):p.css(a,c)},a,c,arguments.length>1)},show:function(){return b$(this,!0)},hide:function(){return b$(this)},toggle:function(a,b){var c=typeof a=="boolean";return p.isFunction(a)&&p.isFunction(b)?bX.apply(this,arguments):this.each(function(){(c?a:bZ(this))?p(this).show():p(this).hide()})}}),p.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=bH(a,"opacity");return c===""?"1":c}}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":p.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,d,e){if(!a||a.nodeType===3||a.nodeType===8||!a.style)return;var f,g,h,i=p.camelCase(c),j=a.style;c=p.cssProps[i]||(p.cssProps[i]=bY(j,i)),h=p.cssHooks[c]||p.cssHooks[i];if(d===b)return h&&"get"in h&&(f=h.get(a,!1,e))!==b?f:j[c];g=typeof d,g==="string"&&(f=bR.exec(d))&&(d=(f[1]+1)*f[2]+parseFloat(p.css(a,c)),g="number");if(d==null||g==="number"&&isNaN(d))return;g==="number"&&!p.cssNumber[i]&&(d+="px");if(!h||!("set"in h)||(d=h.set(a,d,e))!==b)try{j[c]=d}catch(k){}},css:function(a,c,d,e){var f,g,h,i=p.camelCase(c);return c=p.cssProps[i]||(p.cssProps[i]=bY(a.style,i)),h=p.cssHooks[c]||p.cssHooks[i],h&&"get"in h&&(f=h.get(a,!0,e)),f===b&&(f=bH(a,c)),f==="normal"&&c in bU&&(f=bU[c]),d||e!==b?(g=parseFloat(f),d||p.isNumeric(g)?g||0:f):f},swap:function(a,b,c){var d,e,f={};for(e in b)f[e]=a.style[e],a.style[e]=b[e];d=c.call(a);for(e in b)a.style[e]=f[e];return d}}),a.getComputedStyle?bH=function(b,c){var d,e,f,g,h=a.getComputedStyle(b,null),i=b.style;return h&&(d=h[c],d===""&&!p.contains(b.ownerDocument,b)&&(d=p.style(b,c)),bQ.test(d)&&bO.test(c)&&(e=i.width,f=i.minWidth,g=i.maxWidth,i.minWidth=i.maxWidth=i.width=d,d=h.width,i.width=e,i.minWidth=f,i.maxWidth=g)),d}:e.documentElement.currentStyle&&(bH=function(a,b){var c,d,e=a.currentStyle&&a.currentStyle[b],f=a.style;return e==null&&f&&f[b]&&(e=f[b]),bQ.test(e)&&!bM.test(b)&&(c=f.left,d=a.runtimeStyle&&a.runtimeStyle.left,d&&(a.runtimeStyle.left=a.currentStyle.left),f.left=b==="fontSize"?"1em":e,e=f.pixelLeft+"px",f.left=c,d&&(a.runtimeStyle.left=d)),e===""?"auto":e}),p.each(["height","width"],function(a,b){p.cssHooks[b]={get:function(a,c,d){if(c)return a.offsetWidth===0&&bN.test(bH(a,"display"))?p.swap(a,bT,function(){return cb(a,b,d)}):cb(a,b,d)},set:function(a,c,d){return b_(a,c,d?ca(a,b,d,p.support.boxSizing&&p.css(a,"boxSizing")==="border-box"):0)}}}),p.support.opacity||(p.cssHooks.opacity={get:function(a,b){return bL.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=p.isNumeric(b)?"alpha(opacity="+b*100+")":"",f=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&p.trim(f.replace(bK,""))===""&&c.removeAttribute){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bK.test(f)?f.replace(bK,e):f+" "+e}}),p(function(){p.support.reliableMarginRight||(p.cssHooks.marginRight={get:function(a,b){return p.swap(a,{display:"inline-block"},function(){if(b)return bH(a,"marginRight")})}}),!p.support.pixelPosition&&p.fn.position&&p.each(["top","left"],function(a,b){p.cssHooks[b]={get:function(a,c){if(c){var d=bH(a,b);return bQ.test(d)?p(a).position()[b]+"px":d}}}})}),p.expr&&p.expr.filters&&(p.expr.filters.hidden=function(a){return a.offsetWidth===0&&a.offsetHeight===0||!p.support.reliableHiddenOffsets&&(a.style&&a.style.display||bH(a,"display"))==="none"},p.expr.filters.visible=function(a){return!p.expr.filters.hidden(a)}),p.each({margin:"",padding:"",border:"Width"},function(a,b){p.cssHooks[a+b]={expand:function(c){var d,e=typeof c=="string"?c.split(" "):[c],f={};for(d=0;d<4;d++)f[a+bV[d]+b]=e[d]||e[d-2]||e[0];return f}},bO.test(a)||(p.cssHooks[a+b].set=b_)});var cd=/%20/g,ce=/\[\]$/,cf=/\r?\n/g,cg=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,ch=/^(?:select|textarea)/i;p.fn.extend({serialize:function(){return p.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?p.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||ch.test(this.nodeName)||cg.test(this.type))}).map(function(a,b){var c=p(this).val();return c==null?null:p.isArray(c)?p.map(c,function(a,c){return{name:b.name,value:a.replace(cf,"\r\n")}}):{name:b.name,value:c.replace(cf,"\r\n")}}).get()}}),p.param=function(a,c){var d,e=[],f=function(a,b){b=p.isFunction(b)?b():b==null?"":b,e[e.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=p.ajaxSettings&&p.ajaxSettings.traditional);if(p.isArray(a)||a.jquery&&!p.isPlainObject(a))p.each(a,function(){f(this.name,this.value)});else for(d in a)ci(d,a[d],c,f);return e.join("&").replace(cd,"+")};var cj,ck,cl=/#.*$/,cm=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,cn=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,co=/^(?:GET|HEAD)$/,cp=/^\/\//,cq=/\?/,cr=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,cs=/([?&])_=[^&]*/,ct=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,cu=p.fn.load,cv={},cw={},cx=["*/"]+["*"];try{ck=f.href}catch(cy){ck=e.createElement("a"),ck.href="",ck=ck.href}cj=ct.exec(ck.toLowerCase())||[],p.fn.load=function(a,c,d){if(typeof a!="string"&&cu)return cu.apply(this,arguments);if(!this.length)return this;var e,f,g,h=this,i=a.indexOf(" ");return i>=0&&(e=a.slice(i,a.length),a=a.slice(0,i)),p.isFunction(c)?(d=c,c=b):c&&typeof c=="object"&&(f="POST"),p.ajax({url:a,type:f,dataType:"html",data:c,complete:function(a,b){d&&h.each(d,g||[a.responseText,b,a])}}).done(function(a){g=arguments,h.html(e?p("<div>").append(a.replace(cr,"")).find(e):a)}),this},p.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){p.fn[b]=function(a){return this.on(b,a)}}),p.each(["get","post"],function(a,c){p[c]=function(a,d,e,f){return p.isFunction(d)&&(f=f||e,e=d,d=b),p.ajax({type:c,url:a,data:d,success:e,dataType:f})}}),p.extend({getScript:function(a,c){return p.get(a,b,c,"script")},getJSON:function(a,b,c){return p.get(a,b,c,"json")},ajaxSetup:function(a,b){return b?cB(a,p.ajaxSettings):(b=a,a=p.ajaxSettings),cB(a,b),a},ajaxSettings:{url:ck,isLocal:cn.test(cj[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded; charset=UTF-8",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":cx},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":p.parseJSON,"text xml":p.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:cz(cv),ajaxTransport:cz(cw),ajax:function(a,c){function y(a,c,f,i){var k,s,t,u,w,y=c;if(v===2)return;v=2,h&&clearTimeout(h),g=b,e=i||"",x.readyState=a>0?4:0,f&&(u=cC(l,x,f));if(a>=200&&a<300||a===304)l.ifModified&&(w=x.getResponseHeader("Last-Modified"),w&&(p.lastModified[d]=w),w=x.getResponseHeader("Etag"),w&&(p.etag[d]=w)),a===304?(y="notmodified",k=!0):(k=cD(l,u),y=k.state,s=k.data,t=k.error,k=!t);else{t=y;if(!y||a)y="error",a<0&&(a=0)}x.status=a,x.statusText=(c||y)+"",k?o.resolveWith(m,[s,y,x]):o.rejectWith(m,[x,y,t]),x.statusCode(r),r=b,j&&n.trigger("ajax"+(k?"Success":"Error"),[x,l,k?s:t]),q.fireWith(m,[x,y]),j&&(n.trigger("ajaxComplete",[x,l]),--p.active||p.event.trigger("ajaxStop"))}typeof a=="object"&&(c=a,a=b),c=c||{};var d,e,f,g,h,i,j,k,l=p.ajaxSetup({},c),m=l.context||l,n=m!==l&&(m.nodeType||m instanceof p)?p(m):p.event,o=p.Deferred(),q=p.Callbacks("once memory"),r=l.statusCode||{},t={},u={},v=0,w="canceled",x={readyState:0,setRequestHeader:function(a,b){if(!v){var c=a.toLowerCase();a=u[c]=u[c]||a,t[a]=b}return this},getAllResponseHeaders:function(){return v===2?e:null},getResponseHeader:function(a){var c;if(v===2){if(!f){f={};while(c=cm.exec(e))f[c[1].toLowerCase()]=c[2]}c=f[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){return v||(l.mimeType=a),this},abort:function(a){return a=a||w,g&&g.abort(a),y(0,a),this}};o.promise(x),x.success=x.done,x.error=x.fail,x.complete=q.add,x.statusCode=function(a){if(a){var b;if(v<2)for(b in a)r[b]=[r[b],a[b]];else b=a[x.status],x.always(b)}return this},l.url=((a||l.url)+"").replace(cl,"").replace(cp,cj[1]+"//"),l.dataTypes=p.trim(l.dataType||"*").toLowerCase().split(s),l.crossDomain==null&&(i=ct.exec(l.url.toLowerCase())||!1,l.crossDomain=i&&i.join(":")+(i[3]?"":i[1]==="http:"?80:443)!==cj.join(":")+(cj[3]?"":cj[1]==="http:"?80:443)),l.data&&l.processData&&typeof l.data!="string"&&(l.data=p.param(l.data,l.traditional)),cA(cv,l,c,x);if(v===2)return x;j=l.global,l.type=l.type.toUpperCase(),l.hasContent=!co.test(l.type),j&&p.active++===0&&p.event.trigger("ajaxStart");if(!l.hasContent){l.data&&(l.url+=(cq.test(l.url)?"&":"?")+l.data,delete l.data),d=l.url;if(l.cache===!1){var z=p.now(),A=l.url.replace(cs,"$1_="+z);l.url=A+(A===l.url?(cq.test(l.url)?"&":"?")+"_="+z:"")}}(l.data&&l.hasContent&&l.contentType!==!1||c.contentType)&&x.setRequestHeader("Content-Type",l.contentType),l.ifModified&&(d=d||l.url,p.lastModified[d]&&x.setRequestHeader("If-Modified-Since",p.lastModified[d]),p.etag[d]&&x.setRequestHeader("If-None-Match",p.etag[d])),x.setRequestHeader("Accept",l.dataTypes[0]&&l.accepts[l.dataTypes[0]]?l.accepts[l.dataTypes[0]]+(l.dataTypes[0]!=="*"?", "+cx+"; q=0.01":""):l.accepts["*"]);for(k in l.headers)x.setRequestHeader(k,l.headers[k]);if(!l.beforeSend||l.beforeSend.call(m,x,l)!==!1&&v!==2){w="abort";for(k in{success:1,error:1,complete:1})x[k](l[k]);g=cA(cw,l,c,x);if(!g)y(-1,"No Transport");else{x.readyState=1,j&&n.trigger("ajaxSend",[x,l]),l.async&&l.timeout>0&&(h=setTimeout(function(){x.abort("timeout")},l.timeout));try{v=1,g.send(t,y)}catch(B){if(v<2)y(-1,B);else throw B}}return x}return x.abort()},active:0,lastModified:{},etag:{}});var cE=[],cF=/\?/,cG=/(=)\?(?=&|$)|\?\?/,cH=p.now();p.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=cE.pop()||p.expando+"_"+cH++;return this[a]=!0,a}}),p.ajaxPrefilter("json jsonp",function(c,d,e){var f,g,h,i=c.data,j=c.url,k=c.jsonp!==!1,l=k&&cG.test(j),m=k&&!l&&typeof i=="string"&&!(c.contentType||"").indexOf("application/x-www-form-urlencoded")&&cG.test(i);if(c.dataTypes[0]==="jsonp"||l||m)return f=c.jsonpCallback=p.isFunction(c.jsonpCallback)?c.jsonpCallback():c.jsonpCallback,g=a[f],l?c.url=j.replace(cG,"$1"+f):m?c.data=i.replace(cG,"$1"+f):k&&(c.url+=(cF.test(j)?"&":"?")+c.jsonp+"="+f),c.converters["script json"]=function(){return h||p.error(f+" was not called"),h[0]},c.dataTypes[0]="json",a[f]=function(){h=arguments},e.always(function(){a[f]=g,c[f]&&(c.jsonpCallback=d.jsonpCallback,cE.push(f)),h&&p.isFunction(g)&&g(h[0]),h=g=b}),"script"}),p.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){return p.globalEval(a),a}}}),p.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),p.ajaxTransport("script",function(a){if(a.crossDomain){var c,d=e.head||e.getElementsByTagName("head")[0]||e.documentElement;return{send:function(f,g){c=e.createElement("script"),c.async="async",a.scriptCharset&&(c.charset=a.scriptCharset),c.src=a.url,c.onload=c.onreadystatechange=function(a,e){if(e||!c.readyState||/loaded|complete/.test(c.readyState))c.onload=c.onreadystatechange=null,d&&c.parentNode&&d.removeChild(c),c=b,e||g(200,"success")},d.insertBefore(c,d.firstChild)},abort:function(){c&&c.onload(0,1)}}}});var cI,cJ=a.ActiveXObject?function(){for(var a in cI)cI[a](0,1)}:!1,cK=0;p.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&cL()||cM()}:cL,function(a){p.extend(p.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(p.ajaxSettings.xhr()),p.support.ajax&&p.ajaxTransport(function(c){if(!c.crossDomain||p.support.cors){var d;return{send:function(e,f){var g,h,i=c.xhr();c.username?i.open(c.type,c.url,c.async,c.username,c.password):i.open(c.type,c.url,c.async);if(c.xhrFields)for(h in c.xhrFields)i[h]=c.xhrFields[h];c.mimeType&&i.overrideMimeType&&i.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(h in e)i.setRequestHeader(h,e[h])}catch(j){}i.send(c.hasContent&&c.data||null),d=function(a,e){var h,j,k,l,m;try{if(d&&(e||i.readyState===4)){d=b,g&&(i.onreadystatechange=p.noop,cJ&&delete cI[g]);if(e)i.readyState!==4&&i.abort();else{h=i.status,k=i.getAllResponseHeaders(),l={},m=i.responseXML,m&&m.documentElement&&(l.xml=m);try{l.text=i.responseText}catch(a){}try{j=i.statusText}catch(n){j=""}!h&&c.isLocal&&!c.crossDomain?h=l.text?200:404:h===1223&&(h=204)}}}catch(o){e||f(-1,o)}l&&f(h,j,l,k)},c.async?i.readyState===4?setTimeout(d,0):(g=++cK,cJ&&(cI||(cI={},p(a).unload(cJ)),cI[g]=d),i.onreadystatechange=d):d()},abort:function(){d&&d(0,1)}}}});var cN,cO,cP=/^(?:toggle|show|hide)$/,cQ=new RegExp("^(?:([-+])=|)("+q+")([a-z%]*)$","i"),cR=/queueHooks$/,cS=[cY],cT={"*":[function(a,b){var c,d,e=this.createTween(a,b),f=cQ.exec(b),g=e.cur(),h=+g||0,i=1,j=20;if(f){c=+f[2],d=f[3]||(p.cssNumber[a]?"":"px");if(d!=="px"&&h){h=p.css(e.elem,a,!0)||c||1;do i=i||".5",h=h/i,p.style(e.elem,a,h+d);while(i!==(i=e.cur()/g)&&i!==1&&--j)}e.unit=d,e.start=h,e.end=f[1]?h+(f[1]+1)*c:c}return e}]};p.Animation=p.extend(cW,{tweener:function(a,b){p.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");var c,d=0,e=a.length;for(;d<e;d++)c=a[d],cT[c]=cT[c]||[],cT[c].unshift(b)},prefilter:function(a,b){b?cS.unshift(a):cS.push(a)}}),p.Tween=cZ,cZ.prototype={constructor:cZ,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||"swing",this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(p.cssNumber[c]?"":"px")},cur:function(){var a=cZ.propHooks[this.prop];return a&&a.get?a.get(this):cZ.propHooks._default.get(this)},run:function(a){var b,c=cZ.propHooks[this.prop];return this.options.duration?this.pos=b=p.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):this.pos=b=a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):cZ.propHooks._default.set(this),this}},cZ.prototype.init.prototype=cZ.prototype,cZ.propHooks={_default:{get:function(a){var b;return a.elem[a.prop]==null||!!a.elem.style&&a.elem.style[a.prop]!=null?(b=p.css(a.elem,a.prop,!1,""),!b||b==="auto"?0:b):a.elem[a.prop]},set:function(a){p.fx.step[a.prop]?p.fx.step[a.prop](a):a.elem.style&&(a.elem.style[p.cssProps[a.prop]]!=null||p.cssHooks[a.prop])?p.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}},cZ.propHooks.scrollTop=cZ.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},p.each(["toggle","show","hide"],function(a,b){var c=p.fn[b];p.fn[b]=function(d,e,f){return d==null||typeof d=="boolean"||!a&&p.isFunction(d)&&p.isFunction(e)?c.apply(this,arguments):this.animate(c$(b,!0),d,e,f)}}),p.fn.extend({fadeTo:function(a,b,c,d){return this.filter(bZ).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=p.isEmptyObject(a),f=p.speed(b,c,d),g=function(){var b=cW(this,p.extend({},a),f);e&&b.stop(!0)};return e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,c,d){var e=function(a){var b=a.stop;delete a.stop,b(d)};return typeof a!="string"&&(d=c,c=a,a=b),c&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,c=a!=null&&a+"queueHooks",f=p.timers,g=p._data(this);if(c)g[c]&&g[c].stop&&e(g[c]);else for(c in g)g[c]&&g[c].stop&&cR.test(c)&&e(g[c]);for(c=f.length;c--;)f[c].elem===this&&(a==null||f[c].queue===a)&&(f[c].anim.stop(d),b=!1,f.splice(c,1));(b||!d)&&p.dequeue(this,a)})}}),p.each({slideDown:c$("show"),slideUp:c$("hide"),slideToggle:c$("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){p.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),p.speed=function(a,b,c){var d=a&&typeof a=="object"?p.extend({},a):{complete:c||!c&&b||p.isFunction(a)&&a,duration:a,easing:c&&b||b&&!p.isFunction(b)&&b};d.duration=p.fx.off?0:typeof d.duration=="number"?d.duration:d.duration in p.fx.speeds?p.fx.speeds[d.duration]:p.fx.speeds._default;if(d.queue==null||d.queue===!0)d.queue="fx";return d.old=d.complete,d.complete=function(){p.isFunction(d.old)&&d.old.call(this),d.queue&&p.dequeue(this,d.queue)},d},p.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2}},p.timers=[],p.fx=cZ.prototype.init,p.fx.tick=function(){var a,b=p.timers,c=0;for(;c<b.length;c++)a=b[c],!a()&&b[c]===a&&b.splice(c--,1);b.length||p.fx.stop()},p.fx.timer=function(a){a()&&p.timers.push(a)&&!cO&&(cO=setInterval(p.fx.tick,p.fx.interval))},p.fx.interval=13,p.fx.stop=function(){clearInterval(cO),cO=null},p.fx.speeds={slow:600,fast:200,_default:400},p.fx.step={},p.expr&&p.expr.filters&&(p.expr.filters.animated=function(a){return p.grep(p.timers,function(b){return a===b.elem}).length});var c_=/^(?:body|html)$/i;p.fn.offset=function(a){if(arguments.length)return a===b?this:this.each(function(b){p.offset.setOffset(this,a,b)});var c,d,e,f,g,h,i,j={top:0,left:0},k=this[0],l=k&&k.ownerDocument;if(!l)return;return(d=l.body)===k?p.offset.bodyOffset(k):(c=l.documentElement,p.contains(c,k)?(typeof k.getBoundingClientRect!="undefined"&&(j=k.getBoundingClientRect()),e=da(l),f=c.clientTop||d.clientTop||0,g=c.clientLeft||d.clientLeft||0,h=e.pageYOffset||c.scrollTop,i=e.pageXOffset||c.scrollLeft,{top:j.top+h-f,left:j.left+i-g}):j)},p.offset={bodyOffset:function(a){var b=a.offsetTop,c=a.offsetLeft;return p.support.doesNotIncludeMarginInBodyOffset&&(b+=parseFloat(p.css(a,"marginTop"))||0,c+=parseFloat(p.css(a,"marginLeft"))||0),{top:b,left:c}},setOffset:function(a,b,c){var d=p.css(a,"position");d==="static"&&(a.style.position="relative");var e=p(a),f=e.offset(),g=p.css(a,"top"),h=p.css(a,"left"),i=(d==="absolute"||d==="fixed")&&p.inArray("auto",[g,h])>-1,j={},k={},l,m;i?(k=e.position(),l=k.top,m=k.left):(l=parseFloat(g)||0,m=parseFloat(h)||0),p.isFunction(b)&&(b=b.call(a,c,f)),b.top!=null&&(j.top=b.top-f.top+l),b.left!=null&&(j.left=b.left-f.left+m),"using"in b?b.using.call(a,j):e.css(j)}},p.fn.extend({position:function(){if(!this[0])return;var a=this[0],b=this.offsetParent(),c=this.offset(),d=c_.test(b[0].nodeName)?{top:0,left:0}:b.offset();return c.top-=parseFloat(p.css(a,"marginTop"))||0,c.left-=parseFloat(p.css(a,"marginLeft"))||0,d.top+=parseFloat(p.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(p.css(b[0],"borderLeftWidth"))||0,{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||e.body;while(a&&!c_.test(a.nodeName)&&p.css(a,"position")==="static")a=a.offsetParent;return a||e.body})}}),p.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,c){var d=/Y/.test(c);p.fn[a]=function(e){return p.access(this,function(a,e,f){var g=da(a);if(f===b)return g?c in g?g[c]:g.document.documentElement[e]:a[e];g?g.scrollTo(d?p(g).scrollLeft():f,d?f:p(g).scrollTop()):a[e]=f},a,e,arguments.length,null)}}),p.each({Height:"height",Width:"width"},function(a,c){p.each({padding:"inner"+a,content:c,"":"outer"+a},function(d,e){p.fn[e]=function(e,f){var g=arguments.length&&(d||typeof e!="boolean"),h=d||(e===!0||f===!0?"margin":"border");return p.access(this,function(c,d,e){var f;return p.isWindow(c)?c.document.documentElement["client"+a]:c.nodeType===9?(f=c.documentElement,Math.max(c.body["scroll"+a],f["scroll"+a],c.body["offset"+a],f["offset"+a],f["client"+a])):e===b?p.css(c,d,e,h):p.style(c,d,e,h)},c,g?e:b,g,null)}})}),a.jQuery=a.$=p,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return p})})(window);
\ No newline at end of file
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/misc/validate-commit-msg.js b/applications/auto-scale/gui/src/vendor/ui.bootstrap/misc/validate-commit-msg.js
deleted file mode 100644
index 1a8df7f..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/misc/validate-commit-msg.js
+++ /dev/null
@@ -1,106 +0,0 @@
-#!/usr/bin/env node
-
-/**
- * Git COMMIT-MSG hook for validating commit message
- * See https://docs.google.com/document/d/1rk04jEuGfk9kYzfqCuOlPTSJw3hEDZJTBN5E5f1SALo/edit
- *
- * Installation:
- * >> cd <angular-repo>
- * >> ln -s validate-commit-msg.js .git/hooks/commit-msg
- */
-var fs = require('fs');
-var util = require('util');
-
-
-var MAX_LENGTH = 70;
-var PATTERN = /^(?:fixup!\s*)?(\w*)(\((\w+)\))?\: (.*)$/;
-var IGNORED = /^WIP\:/;
-var TYPES = {
- chore: true,
- demo: true,
- docs: true,
- feat: true,
- fix: true,
- refactor: true,
- revert: true,
- style: true,
- test: true
-};
-
-
-var error = function() {
- // gitx does not display it
- // http://gitx.lighthouseapp.com/projects/17830/tickets/294-feature-display-hook-error-message-when-hook-fails
- // https://groups.google.com/group/gitx/browse_thread/thread/a03bcab60844b812
- console.error('INVALID COMMIT MSG: ' + util.format.apply(null, arguments));
-};
-
-
-var validateMessage = function(message) {
- var isValid = true;
-
- if (IGNORED.test(message)) {
- console.log('Commit message validation ignored.');
- return true;
- }
-
- if (message.length > MAX_LENGTH) {
- error('is longer than %d characters !', MAX_LENGTH);
- isValid = false;
- }
-
- var match = PATTERN.exec(message);
-
- if (!match) {
- error('does not match "<type>(<scope>): <subject>" ! was: "' + message + '"\nNote: <scope> must be only letters.');
- return false;
- }
-
- var type = match[1];
- var scope = match[3];
- var subject = match[4];
-
- if (!TYPES.hasOwnProperty(type)) {
- error('"%s" is not allowed type !', type);
- return false;
- }
-
- // Some more ideas, do want anything like this ?
- // - allow only specific scopes (eg. fix(docs) should not be allowed ?
- // - auto correct the type to lower case ?
- // - auto correct first letter of the subject to lower case ?
- // - auto add empty line after subject ?
- // - auto remove empty () ?
- // - auto correct typos in type ?
- // - store incorrect messages, so that we can learn
-
- return isValid;
-};
-
-
-var firstLineFromBuffer = function(buffer) {
- return buffer.toString().split('\n').shift();
-};
-
-
-
-// publish for testing
-exports.validateMessage = validateMessage;
-
-// hacky start if not run by jasmine :-D
-if (process.argv.join('').indexOf('jasmine-node') === -1) {
- var commitMsgFile = process.argv[2];
- var incorrectLogFile = commitMsgFile.replace('COMMIT_EDITMSG', 'logs/incorrect-commit-msgs');
-
- fs.readFile(commitMsgFile, function(err, buffer) {
- var msg = firstLineFromBuffer(buffer);
-
- if (!validateMessage(msg)) {
- fs.appendFile(incorrectLogFile, msg + '\n', function() {
- process.exit(1);
- });
- } else {
- process.exit(0);
- }
- });
-}
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/package.json b/applications/auto-scale/gui/src/vendor/ui.bootstrap/package.json
deleted file mode 100644
index 0bc75a0..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/package.json
+++ /dev/null
@@ -1,39 +0,0 @@
-{
- "author": "https://github.com/angular-ui/bootstrap/graphs/contributors",
- "name": "angular-ui-bootstrap",
- "version": "0.14.3",
- "homepage": "http://angular-ui.github.io/bootstrap/",
- "dependencies": {},
- "scripts":{
- "test": "grunt"
- },
- "repository": {
- "type": "git",
- "url": "https://github.com/angular-ui/bootstrap.git"
- },
- "devDependencies": {
- "angular": "^1.4.4",
- "angular-mocks": "^1.4.4",
- "angular-sanitize": "^1.4.4",
- "grunt": "^0.4.5",
- "grunt-contrib-concat": "^0.5.1",
- "grunt-contrib-copy": "^0.8.0",
- "grunt-contrib-jshint": "^0.11.1",
- "grunt-contrib-uglify": "^0.9.1",
- "grunt-contrib-watch": "^0.6.1",
- "grunt-conventional-changelog": "^4.0.0",
- "grunt-ddescribe-iit": "0.0.6",
- "grunt-html2js": "^0.3.0",
- "grunt-karma": "^0.12.0",
- "jasmine-core": "^2.2.0",
- "karma": "^0.13.3",
- "karma-chrome-launcher": "^0.2.0",
- "karma-coverage": "^0.5.0",
- "karma-firefox-launcher": "^0.1.4",
- "karma-jasmine": "^0.3.5",
- "node-markdown": "0.1.1",
- "semver": "^5.0.1",
- "shelljs": "^0.5.1"
- },
- "license": "MIT"
-}
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/accordion/accordion.js b/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/accordion/accordion.js
deleted file mode 100644
index 93a71ee..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/accordion/accordion.js
+++ /dev/null
@@ -1,249 +0,0 @@
-angular.module('ui.bootstrap.accordion', ['ui.bootstrap.collapse'])
-
-.constant('uibAccordionConfig', {
- closeOthers: true
-})
-
-.controller('UibAccordionController', ['$scope', '$attrs', 'uibAccordionConfig', function($scope, $attrs, accordionConfig) {
- // This array keeps track of the accordion groups
- this.groups = [];
-
- // Ensure that all the groups in this accordion are closed, unless close-others explicitly says not to
- this.closeOthers = function(openGroup) {
- var closeOthers = angular.isDefined($attrs.closeOthers) ?
- $scope.$eval($attrs.closeOthers) : accordionConfig.closeOthers;
- if (closeOthers) {
- angular.forEach(this.groups, function(group) {
- if (group !== openGroup) {
- group.isOpen = false;
- }
- });
- }
- };
-
- // This is called from the accordion-group directive to add itself to the accordion
- this.addGroup = function(groupScope) {
- var that = this;
- this.groups.push(groupScope);
-
- groupScope.$on('$destroy', function(event) {
- that.removeGroup(groupScope);
- });
- };
-
- // This is called from the accordion-group directive when to remove itself
- this.removeGroup = function(group) {
- var index = this.groups.indexOf(group);
- if (index !== -1) {
- this.groups.splice(index, 1);
- }
- };
-
-}])
-
-// The accordion directive simply sets up the directive controller
-// and adds an accordion CSS class to itself element.
-.directive('uibAccordion', function() {
- return {
- controller: 'UibAccordionController',
- controllerAs: 'accordion',
- transclude: true,
- templateUrl: function(element, attrs) {
- return attrs.templateUrl || 'template/accordion/accordion.html';
- }
- };
-})
-
-// The accordion-group directive indicates a block of html that will expand and collapse in an accordion
-.directive('uibAccordionGroup', function() {
- return {
- require: '^uibAccordion', // We need this directive to be inside an accordion
- transclude: true, // It transcludes the contents of the directive into the template
- replace: true, // The element containing the directive will be replaced with the template
- templateUrl: function(element, attrs) {
- return attrs.templateUrl || 'template/accordion/accordion-group.html';
- },
- scope: {
- heading: '@', // Interpolate the heading attribute onto this scope
- isOpen: '=?',
- isDisabled: '=?'
- },
- controller: function() {
- this.setHeading = function(element) {
- this.heading = element;
- };
- },
- link: function(scope, element, attrs, accordionCtrl) {
- accordionCtrl.addGroup(scope);
-
- scope.openClass = attrs.openClass || 'panel-open';
- scope.panelClass = attrs.panelClass;
- scope.$watch('isOpen', function(value) {
- element.toggleClass(scope.openClass, !!value);
- if (value) {
- accordionCtrl.closeOthers(scope);
- }
- });
-
- scope.toggleOpen = function($event) {
- if (!scope.isDisabled) {
- if (!$event || $event.which === 32) {
- scope.isOpen = !scope.isOpen;
- }
- }
- };
- }
- };
-})
-
-// Use accordion-heading below an accordion-group to provide a heading containing HTML
-.directive('uibAccordionHeading', function() {
- return {
- transclude: true, // Grab the contents to be used as the heading
- template: '', // In effect remove this element!
- replace: true,
- require: '^uibAccordionGroup',
- link: function(scope, element, attrs, accordionGroupCtrl, transclude) {
- // Pass the heading to the accordion-group controller
- // so that it can be transcluded into the right place in the template
- // [The second parameter to transclude causes the elements to be cloned so that they work in ng-repeat]
- accordionGroupCtrl.setHeading(transclude(scope, angular.noop));
- }
- };
-})
-
-// Use in the accordion-group template to indicate where you want the heading to be transcluded
-// You must provide the property on the accordion-group controller that will hold the transcluded element
-.directive('uibAccordionTransclude', function() {
- return {
- require: ['?^uibAccordionGroup', '?^accordionGroup'],
- link: function(scope, element, attrs, controller) {
- controller = controller[0] ? controller[0] : controller[1]; // Delete after we remove deprecation
- scope.$watch(function() { return controller[attrs.uibAccordionTransclude]; }, function(heading) {
- if (heading) {
- element.find('span').html('');
- element.find('span').append(heading);
- }
- });
- }
- };
-});
-
-/* Deprecated accordion below */
-
-angular.module('ui.bootstrap.accordion')
-
- .value('$accordionSuppressWarning', false)
-
- .controller('AccordionController', ['$scope', '$attrs', '$controller', '$log', '$accordionSuppressWarning', function($scope, $attrs, $controller, $log, $accordionSuppressWarning) {
- if (!$accordionSuppressWarning) {
- $log.warn('AccordionController is now deprecated. Use UibAccordionController instead.');
- }
-
- angular.extend(this, $controller('UibAccordionController', {
- $scope: $scope,
- $attrs: $attrs
- }));
- }])
-
- .directive('accordion', ['$log', '$accordionSuppressWarning', function($log, $accordionSuppressWarning) {
- return {
- restrict: 'EA',
- controller: 'AccordionController',
- controllerAs: 'accordion',
- transclude: true,
- replace: false,
- templateUrl: function(element, attrs) {
- return attrs.templateUrl || 'template/accordion/accordion.html';
- },
- link: function() {
- if (!$accordionSuppressWarning) {
- $log.warn('accordion is now deprecated. Use uib-accordion instead.');
- }
- }
- };
- }])
-
- .directive('accordionGroup', ['$log', '$accordionSuppressWarning', function($log, $accordionSuppressWarning) {
- return {
- require: '^accordion', // We need this directive to be inside an accordion
- restrict: 'EA',
- transclude: true, // It transcludes the contents of the directive into the template
- replace: true, // The element containing the directive will be replaced with the template
- templateUrl: function(element, attrs) {
- return attrs.templateUrl || 'template/accordion/accordion-group.html';
- },
- scope: {
- heading: '@', // Interpolate the heading attribute onto this scope
- isOpen: '=?',
- isDisabled: '=?'
- },
- controller: function() {
- this.setHeading = function(element) {
- this.heading = element;
- };
- },
- link: function(scope, element, attrs, accordionCtrl) {
- if (!$accordionSuppressWarning) {
- $log.warn('accordion-group is now deprecated. Use uib-accordion-group instead.');
- }
-
- accordionCtrl.addGroup(scope);
-
- scope.openClass = attrs.openClass || 'panel-open';
- scope.panelClass = attrs.panelClass;
- scope.$watch('isOpen', function(value) {
- element.toggleClass(scope.openClass, !!value);
- if (value) {
- accordionCtrl.closeOthers(scope);
- }
- });
-
- scope.toggleOpen = function($event) {
- if (!scope.isDisabled) {
- if (!$event || $event.which === 32) {
- scope.isOpen = !scope.isOpen;
- }
- }
- };
- }
- };
- }])
-
- .directive('accordionHeading', ['$log', '$accordionSuppressWarning', function($log, $accordionSuppressWarning) {
- return {
- restrict: 'EA',
- transclude: true, // Grab the contents to be used as the heading
- template: '', // In effect remove this element!
- replace: true,
- require: '^accordionGroup',
- link: function(scope, element, attr, accordionGroupCtrl, transclude) {
- if (!$accordionSuppressWarning) {
- $log.warn('accordion-heading is now deprecated. Use uib-accordion-heading instead.');
- }
- // Pass the heading to the accordion-group controller
- // so that it can be transcluded into the right place in the template
- // [The second parameter to transclude causes the elements to be cloned so that they work in ng-repeat]
- accordionGroupCtrl.setHeading(transclude(scope, angular.noop));
- }
- };
- }])
-
- .directive('accordionTransclude', ['$log', '$accordionSuppressWarning', function($log, $accordionSuppressWarning) {
- return {
- require: '^accordionGroup',
- link: function(scope, element, attr, controller) {
- if (!$accordionSuppressWarning) {
- $log.warn('accordion-transclude is now deprecated. Use uib-accordion-transclude instead.');
- }
-
- scope.$watch(function() { return controller[attr.accordionTransclude]; }, function(heading) {
- if (heading) {
- element.find('span').html('');
- element.find('span').append(heading);
- }
- });
- }
- };
- }]);
-
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/accordion/docs/demo.html b/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/accordion/docs/demo.html
deleted file mode 100644
index d72479e..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/accordion/docs/demo.html
+++ /dev/null
@@ -1,53 +0,0 @@
-<div ng-controller="AccordionDemoCtrl">
- <script type="text/ng-template" id="group-template.html">
- <div class="panel {{panelClass || 'panel-default'}}">
- <div class="panel-heading">
- <h4 class="panel-title" style="color:#fa39c3">
- <a href tabindex="0" class="accordion-toggle" ng-click="toggleOpen()" uib-accordion-transclude="heading"><span
- ng-class="{'text-muted': isDisabled}">{{heading}}</span></a>
- </h4>
- </div>
- <div class="panel-collapse collapse" uib-collapse="!isOpen">
- <div class="panel-body" style="text-align: right" ng-transclude></div>
- </div>
- </div>
- </script>
-
- <p>
- <button type="button" class="btn btn-default btn-sm" ng-click="status.open = !status.open">Toggle last panel</button>
- <button type="button" class="btn btn-default btn-sm" ng-click="status.isFirstDisabled = ! status.isFirstDisabled">Enable / Disable first panel</button>
- </p>
-
- <div class="checkbox">
- <label>
- <input type="checkbox" ng-model="oneAtATime">
- Open only one at a time
- </label>
- </div>
- <uib-accordion close-others="oneAtATime">
- <uib-accordion-group heading="Static Header, initially expanded" is-open="status.isFirstOpen" is-disabled="status.isFirstDisabled">
- This content is straight in the template.
- </uib-accordion-group>
- <uib-accordion-group heading="{{group.title}}" ng-repeat="group in groups">
- {{group.content}}
- </uib-accordion-group>
- <uib-accordion-group heading="Dynamic Body Content">
- <p>The body of the uib-accordion group grows to fit the contents</p>
- <button type="button" class="btn btn-default btn-sm" ng-click="addItem()">Add Item</button>
- <div ng-repeat="item in items">{{item}}</div>
- </uib-accordion-group>
- <uib-accordion-group heading="Custom template" template-url="group-template.html">
- Hello
- </uib-accordion-group>
- <uib-accordion-group heading="Delete account" panel-class="panel-danger">
- <p>Please, to delete your account, click the button below</p>
- <button class="btn btn-danger">Delete</button>
- </uib-accordion-group>
- <uib-accordion-group is-open="status.open">
- <uib-accordion-heading>
- I can have markup, too! <i class="pull-right glyphicon" ng-class="{'glyphicon-chevron-down': status.open, 'glyphicon-chevron-right': !status.open}"></i>
- </uib-accordion-heading>
- This is just some content to illustrate fancy headings.
- </uib-accordion-group>
- </uib-accordion>
-</div>
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/accordion/docs/demo.js b/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/accordion/docs/demo.js
deleted file mode 100644
index 390bc03..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/accordion/docs/demo.js
+++ /dev/null
@@ -1,26 +0,0 @@
-angular.module('ui.bootstrap.demo').controller('AccordionDemoCtrl', function ($scope) {
- $scope.oneAtATime = true;
-
- $scope.groups = [
- {
- title: 'Dynamic Group Header - 1',
- content: 'Dynamic Group Body - 1'
- },
- {
- title: 'Dynamic Group Header - 2',
- content: 'Dynamic Group Body - 2'
- }
- ];
-
- $scope.items = ['Item 1', 'Item 2', 'Item 3'];
-
- $scope.addItem = function() {
- var newItemNo = $scope.items.length + 1;
- $scope.items.push('Item ' + newItemNo);
- };
-
- $scope.status = {
- isFirstOpen: true,
- isFirstDisabled: false
- };
-});
\ No newline at end of file
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/accordion/docs/readme.md b/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/accordion/docs/readme.md
deleted file mode 100644
index 1da9f22..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/accordion/docs/readme.md
+++ /dev/null
@@ -1,47 +0,0 @@
-The **accordion directive** builds on top of the collapse directive to provide a list of items, with collapsible bodies that are collapsed or expanded by clicking on the item's header.
-
-The body of each accordion group is transcluded into the body of the collapsible element.
-
-### uib-accordion settings
-
-* `close-others`
- _(Default: `true`)_ -
- Control whether expanding an item will cause the other items to close.
-
-* `template-url`
- _(Default: `template/accordion/accordion.html`)_ -
- Add the ability to override the template used on the component.
-
-### uib-accordion-group settings
-
-* `is-disabled`
- <i class="glyphicon glyphicon-eye-open"></i>
- _(Default: `false`)_ -
- Whether the accordion group is disabled or not.
-
-* `is-open`
- <i class="glyphicon glyphicon-eye-open"></i>
- _(Default: `false`)_ -
- Whether accordion group is open or closed.
-
-* `heading`
- _(Default: `none`)_ -
- The clickable text on the group's header. You need one to be able to click on the header for toggling.
-
-* `panel-class`
- _(Default: `panel-default`)_ -
- Add ability to use Bootstrap's contextual panel classes (panel-primary, panel-success, panel-info, etc...) or your own. This must be a string.
-
-* `template-url`
- _(Default: `template/accordion/accordion-group.html`)_ -
- Add the ability to override the template used on the component.
-
-### Default settings `uibAccordionConfig`
-
-* `closeOthers`
- _(Default: `true`)_ -
- Control whether expanding an item will cause the other items to close.
-
-### Accordion heading
-
-Instead of the `heading` attribute on the `uib-accordion-group`, you can use an `uib-accordion-heading` element inside a group that will be used as the group's header.
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/accordion/test/accordion.spec.js b/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/accordion/test/accordion.spec.js
deleted file mode 100644
index f7b669b..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/accordion/test/accordion.spec.js
+++ /dev/null
@@ -1,635 +0,0 @@
-describe('uib-accordion', function() {
- var $animate, $scope;
-
- beforeEach(module('ui.bootstrap.accordion'));
- beforeEach(module('ngAnimateMock'));
- beforeEach(module('template/accordion/accordion.html'));
- beforeEach(module('template/accordion/accordion-group.html'));
-
- beforeEach(inject(function(_$animate_, $rootScope) {
- $animate = _$animate_;
- $scope = $rootScope;
- }));
-
- describe('controller', function () {
- var ctrl, $element, $attrs;
- beforeEach(inject(function($controller) {
- $attrs = {};
- ctrl = $controller('UibAccordionController', { $scope: $scope, $attrs: $attrs });
- }));
-
- describe('addGroup', function() {
- it('adds a the specified panel to the collection', function() {
- var group1, group2;
- ctrl.addGroup(group1 = $scope.$new());
- ctrl.addGroup(group2 = $scope.$new());
- expect(ctrl.groups.length).toBe(2);
- expect(ctrl.groups[0]).toBe(group1);
- expect(ctrl.groups[1]).toBe(group2);
- });
- });
-
- describe('closeOthers', function() {
- var group1, group2, group3;
- beforeEach(function() {
- ctrl.addGroup(group1 = { isOpen: true, $on : angular.noop });
- ctrl.addGroup(group2 = { isOpen: true, $on : angular.noop });
- ctrl.addGroup(group3 = { isOpen: true, $on : angular.noop });
- });
- it('should close other panels if close-others attribute is not defined', function() {
- delete $attrs.closeOthers;
- ctrl.closeOthers(group2);
- expect(group1.isOpen).toBe(false);
- expect(group2.isOpen).toBe(true);
- expect(group3.isOpen).toBe(false);
- });
-
- it('should close other panels if close-others attribute is true', function() {
- $attrs.closeOthers = 'true';
- ctrl.closeOthers(group3);
- expect(group1.isOpen).toBe(false);
- expect(group2.isOpen).toBe(false);
- expect(group3.isOpen).toBe(true);
- });
-
- it('should not close other panels if close-others attribute is false', function() {
- $attrs.closeOthers = 'false';
- ctrl.closeOthers(group2);
- expect(group1.isOpen).toBe(true);
- expect(group2.isOpen).toBe(true);
- expect(group3.isOpen).toBe(true);
- });
-
- describe('setting accordionConfig', function() {
- var originalCloseOthers;
- beforeEach(inject(function(uibAccordionConfig) {
- originalCloseOthers = uibAccordionConfig.closeOthers;
- uibAccordionConfig.closeOthers = false;
- }));
- afterEach(inject(function(uibAccordionConfig) {
- // return it to the original value
- uibAccordionConfig.closeOthers = originalCloseOthers;
- }));
-
- it('should not close other panels if accordionConfig.closeOthers is false', function() {
- ctrl.closeOthers(group2);
- expect(group1.isOpen).toBe(true);
- expect(group2.isOpen).toBe(true);
- expect(group3.isOpen).toBe(true);
- });
- });
- });
-
- describe('removeGroup', function() {
- it('should remove the specified panel', function() {
- var group1, group2, group3;
- ctrl.addGroup(group1 = $scope.$new());
- ctrl.addGroup(group2 = $scope.$new());
- ctrl.addGroup(group3 = $scope.$new());
- ctrl.removeGroup(group2);
- expect(ctrl.groups.length).toBe(2);
- expect(ctrl.groups[0]).toBe(group1);
- expect(ctrl.groups[1]).toBe(group3);
- });
- it('should ignore remove of non-existing panel', function() {
- var group1, group2;
- ctrl.addGroup(group1 = $scope.$new());
- ctrl.addGroup(group2 = $scope.$new());
- expect(ctrl.groups.length).toBe(2);
- ctrl.removeGroup({});
- expect(ctrl.groups.length).toBe(2);
- });
- it('should remove a panel when the scope is destroyed', function() {
- var group1, group2, group3;
- ctrl.addGroup(group1 = $scope.$new());
- ctrl.addGroup(group2 = $scope.$new());
- ctrl.addGroup(group3 = $scope.$new());
- group2.$destroy();
- expect(ctrl.groups.length).toBe(2);
- expect(ctrl.groups[0]).toBe(group1);
- expect(ctrl.groups[1]).toBe(group3);
- });
- });
- });
-
- describe('uib-accordion', function() {
- var scope, $compile, $templateCache, element;
-
- beforeEach(inject(function($rootScope, _$compile_, _$templateCache_) {
- scope = $rootScope;
- $compile = _$compile_;
- $templateCache = _$templateCache_;
- }));
-
- it('should expose the controller on the view', function() {
- $templateCache.put('template/accordion/accordion.html', '<div>{{accordion.text}}</div>');
-
- element = $compile('<uib-accordion></uib-accordion>')(scope);
- scope.$digest();
-
- var ctrl = element.controller('uibAccordion');
- expect(ctrl).toBeDefined();
-
- ctrl.text = 'foo';
- scope.$digest();
-
- expect(element.html()).toBe('<div class="ng-binding">foo</div>');
- });
-
- it('should allow custom templates', function() {
- $templateCache.put('foo/bar.html', '<div>baz</div>');
-
- element = $compile('<accordion template-url="foo/bar.html"></accordion>')(scope);
- scope.$digest();
- expect(element.html()).toBe('<div>baz</div>');
- });
- });
-
- describe('uib-accordion-group', function() {
-
- var scope, $compile;
- var element, groups;
- var findGroupLink = function(index) {
- return groups.eq(index).find('a').eq(0);
- };
- var findGroupBody = function(index) {
- return groups.eq(index).find('.panel-collapse').eq(0);
- };
-
- beforeEach(inject(function(_$rootScope_, _$compile_) {
- scope = _$rootScope_;
- $compile = _$compile_;
- }));
-
- it('should allow custom templates', inject(function($templateCache) {
- $templateCache.put('foo/bar.html', '<div>baz</div>');
-
- var tpl =
- '<uib-accordion>' +
- '<uib-accordion-group heading="title 1" template-url="foo/bar.html"></uib-accordion-group>' +
- '</uib-accordion>';
-
- element = $compile(tpl)(scope);
- scope.$digest();
- expect(element.find('[template-url]').html()).toBe('baz');
- }));
-
- describe('with static panels', function() {
- beforeEach(function() {
- var tpl =
- '<uib-accordion>' +
- '<uib-accordion-group heading="title 1">Content 1</uib-accordion-group>' +
- '<uib-accordion-group heading="title 2">Content 2</uib-accordion-group>' +
- '</uib-accordion>';
- element = angular.element(tpl);
- $compile(element)(scope);
- scope.$digest();
- groups = element.find('.panel');
- });
- afterEach(function() {
- element.remove();
- });
-
- it('should create accordion panels with content', function() {
- expect(groups.length).toEqual(2);
- expect(findGroupLink(0).text()).toEqual('title 1');
- expect(findGroupBody(0).text().trim()).toEqual('Content 1');
- expect(findGroupLink(1).text()).toEqual('title 2');
- expect(findGroupBody(1).text().trim()).toEqual('Content 2');
- });
-
- it('should change selected element on click', function() {
- findGroupLink(0).click();
- scope.$digest();
- expect(findGroupBody(0).scope().isOpen).toBe(true);
-
- findGroupLink(1).click();
- scope.$digest();
- expect(findGroupBody(0).scope().isOpen).toBe(false);
- expect(findGroupBody(1).scope().isOpen).toBe(true);
- });
-
- it('should toggle element on click', function() {
- findGroupLink(0).click();
- scope.$digest();
- expect(findGroupBody(0).scope().isOpen).toBe(true);
- findGroupLink(0).click();
- scope.$digest();
- expect(findGroupBody(0).scope().isOpen).toBe(false);
- });
-
- it('should add, by default, "panel-open" when opened', function() {
- var group = groups.eq(0);
- findGroupLink(0).click();
- scope.$digest();
- expect(group).toHaveClass('panel-open');
-
- findGroupLink(0).click();
- scope.$digest();
- expect(group).not.toHaveClass('panel-open');
- });
-
- it('should toggle element on spacebar when focused', function() {
- var group = groups.eq(0);
- findGroupLink(0)[0].focus();
- var e = $.Event('keypress');
- e.which = 32;
- findGroupLink(0).trigger(e);
-
- expect(group).toHaveClass('panel-open');
-
- e = $.Event('keypress');
- e.which = 32;
- findGroupLink(0).trigger(e);
-
- expect(group).not.toHaveClass('panel-open');
- });
-
- it('should not toggle with any other keyCode', function() {
- var group = groups.eq(0);
- findGroupLink(0)[0].focus();
- var e = $.Event('keypress');
- e.which = 65;
- findGroupLink(0).trigger(e);
-
- expect(group).not.toHaveClass('panel-open');
- });
- });
-
- describe('with open-class attribute', function() {
- beforeEach(function() {
- var tpl =
- '<uib-accordion>' +
- '<uib-accordion-group heading="title 1" open-class="custom-open-class">Content 1</uib-accordion-group>' +
- '<uib-accordion-group heading="title 2" open-class="custom-open-class">Content 2</uib-accordion-group>' +
- '</uib-accordion>';
- element = angular.element(tpl);
- $compile(element)(scope);
- scope.$digest();
- groups = element.find('.panel');
- });
- afterEach(function() {
- element.remove();
- });
-
- it('should add custom-open-class when opened', function() {
- var group = groups.eq(0);
- findGroupLink(0).click();
- scope.$digest();
- expect(group).toHaveClass('custom-open-class');
-
- findGroupLink(0).click();
- scope.$digest();
- expect(group).not.toHaveClass('custom-open-class');
- });
- });
-
- describe('with dynamic panels', function() {
- var model;
- beforeEach(function() {
- var tpl =
- '<uib-accordion>' +
- '<uib-accordion-group ng-repeat="group in groups" heading="{{group.name}}">{{group.content}}</uib-accordion-group>' +
- '</uib-accordion>';
- element = angular.element(tpl);
- model = [
- {name: 'title 1', content: 'Content 1'},
- {name: 'title 2', content: 'Content 2'}
- ];
-
- $compile(element)(scope);
- scope.$digest();
- });
-
- it('should have no panels initially', function() {
- groups = element.find('.panel');
- expect(groups.length).toEqual(0);
- });
-
- it('should have a panel for each model item', function() {
- scope.groups = model;
- scope.$digest();
- groups = element.find('.panel');
- expect(groups.length).toEqual(2);
- expect(findGroupLink(0).text()).toEqual('title 1');
- expect(findGroupBody(0).text().trim()).toEqual('Content 1');
- expect(findGroupLink(1).text()).toEqual('title 2');
- expect(findGroupBody(1).text().trim()).toEqual('Content 2');
- });
-
- it('should react properly on removing items from the model', function() {
- scope.groups = model;
- scope.$digest();
- groups = element.find('.panel');
- expect(groups.length).toEqual(2);
-
- scope.groups.splice(0,1);
- scope.$digest();
- groups = element.find('.panel');
- expect(groups.length).toEqual(1);
- });
- });
-
- describe('is-open attribute', function() {
- beforeEach(function() {
- var tpl =
- '<uib-accordion>' +
- '<uib-accordion-group heading="title 1" is-open="open.first">Content 1</uib-accordion-group>' +
- '<uib-accordion-group heading="title 2" is-open="open.second">Content 2</uib-accordion-group>' +
- '</uib-accordion>';
- element = angular.element(tpl);
- scope.open = { first: false, second: true };
- $compile(element)(scope);
- scope.$digest();
- groups = element.find('.panel');
- });
-
- it('should open the panel with isOpen set to true', function() {
- expect(findGroupBody(0).scope().isOpen).toBe(false);
- expect(findGroupBody(1).scope().isOpen).toBe(true);
- });
-
- it('should toggle variable on element click', function() {
- findGroupLink(0).click();
- scope.$digest();
- expect(scope.open.first).toBe(true);
-
- findGroupLink(0).click();
- scope.$digest();
- expect(scope.open.second).toBe(false);
- });
- });
-
- describe('is-open attribute with dynamic content', function() {
- beforeEach(function() {
- var tpl =
- '<uib-accordion>' +
- '<uib-accordion-group heading="title 1" is-open="open1"><div ng-repeat="item in items">{{item}}</div></uib-accordion-group>' +
- '<uib-accordion-group heading="title 2" is-open="open2">Static content</uib-accordion-group>' +
- '</uib-accordion>';
- element = angular.element(tpl);
- scope.items = ['Item 1', 'Item 2', 'Item 3'];
- scope.open1 = true;
- scope.open2 = false;
- angular.element(document.body).append(element);
- $compile(element)(scope);
- scope.$digest();
- $animate.flush();
- groups = element.find('.panel');
- });
-
- afterEach(function() {
- element.remove();
- });
-
- it('should have visible panel body when the group with isOpen set to true', function() {
- expect(findGroupBody(0)).toHaveClass('in');
- expect(findGroupBody(1)).not.toHaveClass('in');
- });
- });
-
- describe('is-open attribute with dynamic groups', function() {
- beforeEach(function() {
- var tpl =
- '<uib-accordion>' +
- '<uib-accordion-group ng-repeat="group in groups" heading="{{group.name}}" is-open="group.open">{{group.content}}</uib-accordion-group>' +
- '</uib-accordion>';
- element = angular.element(tpl);
- scope.groups = [
- {name: 'title 1', content: 'Content 1', open: false},
- {name: 'title 2', content: 'Content 2', open: true}
- ];
- $compile(element)(scope);
- scope.$digest();
-
- groups = element.find('.panel');
- });
-
- it('should have visible group body when the group with isOpen set to true', function() {
- expect(findGroupBody(0).scope().isOpen).toBe(false);
- expect(findGroupBody(1).scope().isOpen).toBe(true);
- });
-
- it('should toggle element on click', function() {
- findGroupLink(0).click();
- scope.$digest();
- expect(findGroupBody(0).scope().isOpen).toBe(true);
- expect(scope.groups[0].open).toBe(true);
-
- findGroupLink(0).click();
- scope.$digest();
- expect(findGroupBody(0).scope().isOpen).toBe(false);
- expect(scope.groups[0].open).toBe(false);
- });
- });
-
- describe('`is-disabled` attribute', function() {
- var groupBody;
- beforeEach(function() {
- var tpl =
- '<uib-accordion>' +
- '<uib-accordion-group heading="title 1" is-disabled="disabled">Content 1</uib-accordion-group>' +
- '</uib-accordion>';
- element = angular.element(tpl);
- scope.disabled = true;
- $compile(element)(scope);
- scope.$digest();
- groups = element.find('.panel');
- groupBody = findGroupBody(0);
- });
-
- it('should open the panel with isOpen set to true', function() {
- expect(groupBody.scope().isOpen).toBeFalsy();
- });
-
- it('should not toggle if disabled', function() {
- findGroupLink(0).click();
- scope.$digest();
- expect(groupBody.scope().isOpen).toBeFalsy();
- });
-
- it('should toggle after enabling', function() {
- scope.disabled = false;
- scope.$digest();
- expect(groupBody.scope().isOpen).toBeFalsy();
-
- findGroupLink(0).click();
- scope.$digest();
- expect(groupBody.scope().isOpen).toBeTruthy();
- });
-
- it('should have text-muted styling', function() {
- expect(findGroupLink(0).find('span:first')).toHaveClass('text-muted');
- });
- });
-
- // This is re-used in both the uib-accordion-heading element and the uib-accordion-heading attribute tests
- function isDisabledStyleCheck() {
- var tpl =
- '<uib-accordion ng-init="a = [1,2,3]">' +
- '<uib-accordion-group heading="I get overridden" is-disabled="true">' +
- '<uib-accordion-heading>Heading Element <span ng-repeat="x in a">{{x}}</span> </uib-accordion-heading>' +
- 'Body' +
- '</uib-accordion-group>' +
- '</uib-accordion>';
- scope.disabled = true;
- element = $compile(tpl)(scope);
- scope.$digest();
- groups = element.find('.panel');
-
- expect(findGroupLink(0).find('span').hasClass('text-muted')).toBe(true);
- }
-
- describe('uib-accordion-heading element', function() {
- beforeEach(function() {
- var tpl =
- '<uib-accordion ng-init="a = [1,2,3]">' +
- '<uib-accordion-group heading="I get overridden">' +
- '<uib-accordion-heading>Heading Element <span ng-repeat="x in a">{{x}}</span> </uib-accordion-heading>' +
- 'Body' +
- '</uib-accordion-group>' +
- '</uib-accordion>';
- element = $compile(tpl)(scope);
- scope.$digest();
- groups = element.find('.panel');
- });
-
- it('transcludes the <uib-accordion-heading> content into the heading link', function() {
- expect(findGroupLink(0).text()).toBe('Heading Element 123 ');
- });
-
- it('attaches the same scope to the transcluded heading and body', function() {
- expect(findGroupLink(0).find('span.ng-scope').scope().$id).toBe(findGroupBody(0).find('span').scope().$id);
- });
-
- it('should wrap the transcluded content in a span', function() {
- expect(findGroupLink(0).find('span:first').length).toEqual(1);
- });
-
- it('should have disabled styling when is-disabled is true', isDisabledStyleCheck);
-
- });
-
- describe('uib-accordion-heading attribute', function() {
- beforeEach(function() {
- var tpl =
- '<uib-accordion ng-init="a = [1,2,3]">' +
- '<uib-accordion-group heading="I get overridden">' +
- '<div uib-accordion-heading>Heading Element <span ng-repeat="x in a">{{x}}</span> </div>' +
- 'Body' +
- '</uib-accordion-group>' +
- '</uib-accordion>';
- element = $compile(tpl)(scope);
- scope.$digest();
- groups = element.find('.panel');
- });
-
- it('transcludes the <uib-accordion-heading> content into the heading link', function() {
- expect(findGroupLink(0).text()).toBe('Heading Element 123 ');
- });
-
- it('attaches the same scope to the transcluded heading and body', function() {
- expect(findGroupLink(0).find('span.ng-scope').scope().$id).toBe(findGroupBody(0).find('span').scope().$id);
- });
-
- it('should have disabled styling when is-disabled is true', isDisabledStyleCheck);
-
- });
-
- describe('uib-accordion-heading, with repeating uib-accordion-groups', function() {
- it('should clone the uib-accordion-heading for each group', function() {
- element = $compile('<uib-accordion><uib-accordion-group ng-repeat="x in [1,2,3]"><uib-accordion-heading>{{x}}</uib-accordion-heading></uib-accordion-group></uib-accordion>')(scope);
- scope.$digest();
- groups = element.find('.panel');
- expect(groups.length).toBe(3);
- expect(findGroupLink(0).text()).toBe('1');
- expect(findGroupLink(1).text()).toBe('2');
- expect(findGroupLink(2).text()).toBe('3');
- });
- });
-
- describe('uib-accordion-heading attribute, with repeating uib-accordion-groups', function() {
- it('should clone the uib-accordion-heading for each group', function() {
- element = $compile('<uib-accordion><uib-accordion-group ng-repeat="x in [1,2,3]"><div uib-accordion-heading>{{x}}</div></uib-accordion-group></uib-accordion>')(scope);
- scope.$digest();
- groups = element.find('.panel');
- expect(groups.length).toBe(3);
- expect(findGroupLink(0).text()).toBe('1');
- expect(findGroupLink(1).text()).toBe('2');
- expect(findGroupLink(2).text()).toBe('3');
- });
- });
-
- describe('uib-accordion group panel class - #3968', function() {
- it('should use the default value when panel class is falsy', function() {
- element = $compile('<uib-accordion><uib-accordion-group heading="Heading">Content</uib-accordion-group></uib-accordion>')(scope);
- scope.$digest();
- groups = element.find('.panel');
- expect(groups.eq(0)).toHaveClass('panel-default');
-
- element = $compile('<uib-accordion><uib-accordion-group heading="Heading" panel-class="">Content</uib-accordion-group></uib-accordion>')(scope);
- scope.$digest();
- groups = element.find('.panel');
- expect(groups.eq(0)).toHaveClass('panel-default');
- });
-
- it('should use the specified value when not falsy', function() {
- element = $compile('<uib-accordion><uib-accordion-group heading="Heading" panel-class="custom-class">Content</uib-accordion-group></uib-accordion>')(scope);
- scope.$digest();
- groups = element.find('.panel');
- expect(groups.eq(0)).toHaveClass('custom-class');
- expect(groups.eq(0)).not.toHaveClass('panel-default');
- });
- });
- });
-});
-
-/* Deprecation tests below */
-
-describe('accordion deprecation', function() {
- beforeEach(module('ui.bootstrap.accordion'));
- beforeEach(module('ngAnimateMock'));
- beforeEach(module('template/accordion/accordion.html'));
- beforeEach(module('template/accordion/accordion-group.html'));
-
- it('should suppress warning', function() {
- module(function($provide) {
- $provide.value('$accordionSuppressWarning', true);
- });
-
- inject(function($compile, $log, $rootScope) {
- spyOn($log, 'warn');
-
- var element =
- '<accordion ng-init="a = [1,2,3]">' +
- '<accordion-group heading="I get overridden">' +
- '<div accordion-heading>Heading Element <span ng-repeat="x in a">{{x}}</span> </div>' +
- 'Body' +
- '</accordion-group>' +
- '</accordion>';
- element = $compile(element)($rootScope);
- $rootScope.$digest();
- expect($log.warn.calls.count()).toBe(0);
- });
- });
-
- it('should give warning by default', inject(function($compile, $log, $rootScope) {
- spyOn($log, 'warn');
-
- var element =
- '<accordion ng-init="a = [1,2,3]">' +
- '<accordion-group heading="I get overridden">' +
- '<div accordion-heading>Heading Element <span ng-repeat="x in a">{{x}}</span> </div>' +
- 'Body' +
- '</accordion-group>' +
- '</accordion>';
- element = $compile(element)($rootScope);
- $rootScope.$digest();
-
- expect($log.warn.calls.count()).toBe(4);
- expect($log.warn.calls.argsFor(0)).toEqual(['AccordionController is now deprecated. Use UibAccordionController instead.']);
- expect($log.warn.calls.argsFor(1)).toEqual(['accordion-heading is now deprecated. Use uib-accordion-heading instead.']);
- expect($log.warn.calls.argsFor(2)).toEqual(['accordion-group is now deprecated. Use uib-accordion-group instead.']);
- expect($log.warn.calls.argsFor(3)).toEqual(['accordion is now deprecated. Use uib-accordion instead.']);
- }));
-});
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/alert/alert.js b/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/alert/alert.js
deleted file mode 100644
index 4b007c6..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/alert/alert.js
+++ /dev/null
@@ -1,68 +0,0 @@
-angular.module('ui.bootstrap.alert', [])
-
-.controller('UibAlertController', ['$scope', '$attrs', '$interpolate', '$timeout', function($scope, $attrs, $interpolate, $timeout) {
- $scope.closeable = !!$attrs.close;
-
- var dismissOnTimeout = angular.isDefined($attrs.dismissOnTimeout) ?
- $interpolate($attrs.dismissOnTimeout)($scope.$parent) : null;
-
- if (dismissOnTimeout) {
- $timeout(function() {
- $scope.close();
- }, parseInt(dismissOnTimeout, 10));
- }
-}])
-
-.directive('uibAlert', function() {
- return {
- controller: 'UibAlertController',
- controllerAs: 'alert',
- templateUrl: function(element, attrs) {
- return attrs.templateUrl || 'template/alert/alert.html';
- },
- transclude: true,
- replace: true,
- scope: {
- type: '@',
- close: '&'
- }
- };
-});
-
-/* Deprecated alert below */
-
-angular.module('ui.bootstrap.alert')
-
- .value('$alertSuppressWarning', false)
-
- .controller('AlertController', ['$scope', '$attrs', '$controller', '$log', '$alertSuppressWarning', function($scope, $attrs, $controller, $log, $alertSuppressWarning) {
- if (!$alertSuppressWarning) {
- $log.warn('AlertController is now deprecated. Use UibAlertController instead.');
- }
-
- angular.extend(this, $controller('UibAlertController', {
- $scope: $scope,
- $attrs: $attrs
- }));
- }])
-
- .directive('alert', ['$log', '$alertSuppressWarning', function($log, $alertSuppressWarning) {
- return {
- controller: 'AlertController',
- controllerAs: 'alert',
- templateUrl: function(element, attrs) {
- return attrs.templateUrl || 'template/alert/alert.html';
- },
- transclude: true,
- replace: true,
- scope: {
- type: '@',
- close: '&'
- },
- link: function() {
- if (!$alertSuppressWarning) {
- $log.warn('alert is now deprecated. Use uib-alert instead.');
- }
- }
- };
- }]);
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/alert/docs/demo.html b/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/alert/docs/demo.html
deleted file mode 100644
index e2ce4b3..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/alert/docs/demo.html
+++ /dev/null
@@ -1,11 +0,0 @@
-<div ng-controller="AlertDemoCtrl">
- <script type="text/ng-template" id="alert.html">
- <div class="alert" style="background-color:#fa39c3;color:white" role="alert">
- <div ng-transclude></div>
- </div>
- </script>
-
- <uib-alert ng-repeat="alert in alerts" type="{{alert.type}}" close="closeAlert($index)">{{alert.msg}}</uib-alert>
- <uib-alert template-url="alert.html">A happy alert!</uib-alert>
- <button type="button" class='btn btn-default' ng-click="addAlert()">Add Alert</button>
-</div>
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/alert/docs/demo.js b/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/alert/docs/demo.js
deleted file mode 100644
index 267a3ae..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/alert/docs/demo.js
+++ /dev/null
@@ -1,14 +0,0 @@
-angular.module('ui.bootstrap.demo').controller('AlertDemoCtrl', function ($scope) {
- $scope.alerts = [
- { type: 'danger', msg: 'Oh snap! Change a few things up and try submitting again.' },
- { type: 'success', msg: 'Well done! You successfully read this important alert message.' }
- ];
-
- $scope.addAlert = function() {
- $scope.alerts.push({msg: 'Another alert!'});
- };
-
- $scope.closeAlert = function(index) {
- $scope.alerts.splice(index, 1);
- };
-});
\ No newline at end of file
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/alert/docs/readme.md b/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/alert/docs/readme.md
deleted file mode 100644
index 6d81bd4..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/alert/docs/readme.md
+++ /dev/null
@@ -1,12 +0,0 @@
-This directive can be used both to generate alerts from static and dynamic model data (using the `ng-repeat` directive).
-
-### uib-alert settings
-
- * `close` _(Default: `none`)_ -
- A callback function that gets fired when an `alert` is closed. If the attribute exists, a close button is displayed as well.
- * `dismiss-on-timeout` _(Default: `none`)(Optional)_ -
- Takes the number of milliseconds that specify the timeout duration, after which the alert will be closed. This attribute requires the presence of the `close` attribute.
- * `template-url` _(Default: `template/alert/alert.html`)_ -
- Add the ability to override the template used in the component.
- * `type` _(Default: `warning`)_ -
- Defines the type of the alert. Go to [bootstrap page](http://getbootstrap.com/components/#alerts) to see the type of alerts available.
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/alert/test/alert.spec.js b/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/alert/test/alert.spec.js
deleted file mode 100644
index 9946906..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/alert/test/alert.spec.js
+++ /dev/null
@@ -1,186 +0,0 @@
-describe('uib-alert', function() {
- var element, scope, $compile, $templateCache, $timeout;
-
- beforeEach(module('ui.bootstrap.alert'));
- beforeEach(module('template/alert/alert.html'));
-
- beforeEach(inject(function($rootScope, _$compile_, _$templateCache_, _$timeout_) {
- scope = $rootScope;
- $compile = _$compile_;
- $templateCache = _$templateCache_;
- $timeout = _$timeout_;
-
- element = angular.element(
- '<div>' +
- '<uib-alert ng-repeat="alert in alerts" type="{{alert.type}}"' +
- 'close="removeAlert($index)">{{alert.msg}}' +
- '</uib-alert>' +
- '</div>');
-
- scope.alerts = [
- { msg:'foo', type:'success'},
- { msg:'bar', type:'error'},
- { msg:'baz'}
- ];
- }));
-
- function createAlerts() {
- $compile(element)(scope);
- scope.$digest();
- return element.find('.alert');
- }
-
- function findCloseButton(index) {
- return element.find('.close').eq(index);
- }
-
- function findContent(index) {
- return element.find('div[ng-transclude] span').eq(index);
- }
-
- it('should expose the controller to the view', function() {
- $templateCache.put('template/alert/alert.html', '<div>{{alert.text}}</div>');
-
- element = $compile('<uib-alert></uib-alert>')(scope);
- scope.$digest();
-
- var ctrl = element.controller('uib-alert');
- expect(ctrl).toBeDefined();
-
- ctrl.text = 'foo';
- scope.$digest();
-
- expect(element.html()).toBe('foo');
- });
-
- it('should support custom templates', function() {
- $templateCache.put('foo/bar.html', '<div>baz</div>');
-
- element = $compile('<uib-alert template-url="foo/bar.html"></uib-alert>')(scope);
- scope.$digest();
-
- expect(element.html()).toBe('baz');
- });
-
- it('should generate alerts using ng-repeat', function() {
- var alerts = createAlerts();
- expect(alerts.length).toEqual(3);
- });
-
- it('should use correct classes for different alert types', function() {
- var alerts = createAlerts();
- expect(alerts.eq(0)).toHaveClass('alert-success');
- expect(alerts.eq(1)).toHaveClass('alert-error');
- expect(alerts.eq(2)).toHaveClass('alert-warning');
- });
-
- it('should respect alert type binding', function() {
- var alerts = createAlerts();
- expect(alerts.eq(0)).toHaveClass('alert-success');
-
- scope.alerts[0].type = 'error';
- scope.$digest();
-
- expect(alerts.eq(0)).toHaveClass('alert-error');
- });
-
- it('should show the alert content', function() {
- var alerts = createAlerts();
-
- for (var i = 0, n = alerts.length; i < n; i++) {
- expect(findContent(i).text()).toBe(scope.alerts[i].msg);
- }
- });
-
- it('should show close buttons and have the dismissible class', function() {
- var alerts = createAlerts();
-
- for (var i = 0, n = alerts.length; i < n; i++) {
- expect(findCloseButton(i).css('display')).not.toBe('none');
- expect(alerts.eq(i)).toHaveClass('alert-dismissible');
- }
- });
-
- it('should fire callback when closed', function() {
- var alerts = createAlerts();
-
- scope.$apply(function() {
- scope.removeAlert = jasmine.createSpy();
- });
-
- expect(findCloseButton(0).css('display')).not.toBe('none');
- findCloseButton(1).click();
-
- expect(scope.removeAlert).toHaveBeenCalledWith(1);
- });
-
- it('should not show close button and have the dismissible class if no close callback specified', function() {
- element = $compile('<uib-alert>No close</uib-alert>')(scope);
- scope.$digest();
- expect(findCloseButton(0)).toBeHidden();
- expect(element).not.toHaveClass('alert-dismissible');
- });
-
- it('should be possible to add additional classes for alert', function() {
- var element = $compile('<uib-alert class="alert-block" type="info">Default alert!</uib-alert>')(scope);
- scope.$digest();
- expect(element).toHaveClass('alert-block');
- expect(element).toHaveClass('alert-info');
- });
-
- it('should close automatically if dismiss-on-timeout is defined on the element', function() {
- scope.removeAlert = jasmine.createSpy();
- $compile('<uib-alert close="removeAlert()" dismiss-on-timeout="500">Default alert!</uib-alert>')(scope);
- scope.$digest();
-
- $timeout.flush();
- expect(scope.removeAlert).toHaveBeenCalled();
- });
-
- it('should not close immediately with a dynamic dismiss-on-timeout', function() {
- scope.removeAlert = jasmine.createSpy();
- scope.dismissTime = 500;
- $compile('<uib-alert close="removeAlert()" dismiss-on-timeout="{{dismissTime}}">Default alert!</uib-alert>')(scope);
- scope.$digest();
-
- $timeout.flush(100);
- expect(scope.removeAlert).not.toHaveBeenCalled();
-
- $timeout.flush(500);
- expect(scope.removeAlert).toHaveBeenCalled();
- });
-});
-
-/* Deprecation tests below */
-
-describe('alert deprecation', function() {
- beforeEach(module('ui.bootstrap.alert'));
- beforeEach(module('template/alert/alert.html'));
-
- it('should suppress warning', function() {
- module(function($provide) {
- $provide.value('$alertSuppressWarning', true);
- });
-
- inject(function($compile, $log, $rootScope) {
- spyOn($log, 'warn');
-
- var element = '<alert></alert>';
- element = $compile(element)($rootScope);
- $rootScope.$digest();
- expect($log.warn.calls.count()).toBe(0);
- });
- });
-
- it('should give warning by default', inject(function($compile, $log, $rootScope) {
- spyOn($log, 'warn');
-
- var element = '<alert></alert>';
- element = $compile(element)($rootScope);
- $rootScope.$digest();
-
- expect($log.warn.calls.count()).toBe(2);
- expect($log.warn.calls.argsFor(0)).toEqual(['AlertController is now deprecated. Use UibAlertController instead.']);
- expect($log.warn.calls.argsFor(1)).toEqual(['alert is now deprecated. Use uib-alert instead.']);
- }));
-});
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/buttons/buttons.js b/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/buttons/buttons.js
deleted file mode 100644
index 14ed715..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/buttons/buttons.js
+++ /dev/null
@@ -1,199 +0,0 @@
-angular.module('ui.bootstrap.buttons', [])
-
-.constant('uibButtonConfig', {
- activeClass: 'active',
- toggleEvent: 'click'
-})
-
-.controller('UibButtonsController', ['uibButtonConfig', function(buttonConfig) {
- this.activeClass = buttonConfig.activeClass || 'active';
- this.toggleEvent = buttonConfig.toggleEvent || 'click';
-}])
-
-.directive('uibBtnRadio', function() {
- return {
- require: ['uibBtnRadio', 'ngModel'],
- controller: 'UibButtonsController',
- controllerAs: 'buttons',
- link: function(scope, element, attrs, ctrls) {
- var buttonsCtrl = ctrls[0], ngModelCtrl = ctrls[1];
-
- element.find('input').css({display: 'none'});
-
- //model -> UI
- ngModelCtrl.$render = function() {
- element.toggleClass(buttonsCtrl.activeClass, angular.equals(ngModelCtrl.$modelValue, scope.$eval(attrs.uibBtnRadio)));
- };
-
- //ui->model
- element.on(buttonsCtrl.toggleEvent, function() {
- if (attrs.disabled) {
- return;
- }
-
- var isActive = element.hasClass(buttonsCtrl.activeClass);
-
- if (!isActive || angular.isDefined(attrs.uncheckable)) {
- scope.$apply(function() {
- ngModelCtrl.$setViewValue(isActive ? null : scope.$eval(attrs.uibBtnRadio));
- ngModelCtrl.$render();
- });
- }
- });
- }
- };
-})
-
-.directive('uibBtnCheckbox', function() {
- return {
- require: ['uibBtnCheckbox', 'ngModel'],
- controller: 'UibButtonsController',
- controllerAs: 'button',
- link: function(scope, element, attrs, ctrls) {
- var buttonsCtrl = ctrls[0], ngModelCtrl = ctrls[1];
-
- element.find('input').css({display: 'none'});
-
- function getTrueValue() {
- return getCheckboxValue(attrs.btnCheckboxTrue, true);
- }
-
- function getFalseValue() {
- return getCheckboxValue(attrs.btnCheckboxFalse, false);
- }
-
- function getCheckboxValue(attribute, defaultValue) {
- return angular.isDefined(attribute) ? scope.$eval(attribute) : defaultValue;
- }
-
- //model -> UI
- ngModelCtrl.$render = function() {
- element.toggleClass(buttonsCtrl.activeClass, angular.equals(ngModelCtrl.$modelValue, getTrueValue()));
- };
-
- //ui->model
- element.on(buttonsCtrl.toggleEvent, function() {
- if (attrs.disabled) {
- return;
- }
-
- scope.$apply(function() {
- ngModelCtrl.$setViewValue(element.hasClass(buttonsCtrl.activeClass) ? getFalseValue() : getTrueValue());
- ngModelCtrl.$render();
- });
- });
- }
- };
-});
-
-/* Deprecated buttons below */
-
-angular.module('ui.bootstrap.buttons')
-
- .value('$buttonsSuppressWarning', false)
-
- .controller('ButtonsController', ['$controller', '$log', '$buttonsSuppressWarning', function($controller, $log, $buttonsSuppressWarning) {
- if (!$buttonsSuppressWarning) {
- $log.warn('ButtonsController is now deprecated. Use UibButtonsController instead.');
- }
-
- angular.extend(this, $controller('UibButtonsController'));
- }])
-
- .directive('btnRadio', ['$log', '$buttonsSuppressWarning', function($log, $buttonsSuppressWarning) {
- return {
- require: ['btnRadio', 'ngModel'],
- controller: 'ButtonsController',
- controllerAs: 'buttons',
- link: function(scope, element, attrs, ctrls) {
- if (!$buttonsSuppressWarning) {
- $log.warn('btn-radio is now deprecated. Use uib-btn-radio instead.');
- }
-
- var buttonsCtrl = ctrls[0], ngModelCtrl = ctrls[1];
-
- element.find('input').css({display: 'none'});
-
- //model -> UI
- ngModelCtrl.$render = function() {
- element.toggleClass(buttonsCtrl.activeClass, angular.equals(ngModelCtrl.$modelValue, scope.$eval(attrs.btnRadio)));
- };
-
- //ui->model
- element.bind(buttonsCtrl.toggleEvent, function() {
- if (attrs.disabled) {
- return;
- }
-
- var isActive = element.hasClass(buttonsCtrl.activeClass);
-
- if (!isActive || angular.isDefined(attrs.uncheckable)) {
- scope.$apply(function() {
- ngModelCtrl.$setViewValue(isActive ? null : scope.$eval(attrs.btnRadio));
- ngModelCtrl.$render();
- });
- }
- });
- }
- };
- }])
-
- .directive('btnCheckbox', ['$document', '$log', '$buttonsSuppressWarning', function($document, $log, $buttonsSuppressWarning) {
- return {
- require: ['btnCheckbox', 'ngModel'],
- controller: 'ButtonsController',
- controllerAs: 'button',
- link: function(scope, element, attrs, ctrls) {
- if (!$buttonsSuppressWarning) {
- $log.warn('btn-checkbox is now deprecated. Use uib-btn-checkbox instead.');
- }
-
- var buttonsCtrl = ctrls[0], ngModelCtrl = ctrls[1];
-
- element.find('input').css({display: 'none'});
-
- function getTrueValue() {
- return getCheckboxValue(attrs.btnCheckboxTrue, true);
- }
-
- function getFalseValue() {
- return getCheckboxValue(attrs.btnCheckboxFalse, false);
- }
-
- function getCheckboxValue(attributeValue, defaultValue) {
- var val = scope.$eval(attributeValue);
- return angular.isDefined(val) ? val : defaultValue;
- }
-
- //model -> UI
- ngModelCtrl.$render = function() {
- element.toggleClass(buttonsCtrl.activeClass, angular.equals(ngModelCtrl.$modelValue, getTrueValue()));
- };
-
- //ui->model
- element.bind(buttonsCtrl.toggleEvent, function() {
- if (attrs.disabled) {
- return;
- }
-
- scope.$apply(function() {
- ngModelCtrl.$setViewValue(element.hasClass(buttonsCtrl.activeClass) ? getFalseValue() : getTrueValue());
- ngModelCtrl.$render();
- });
- });
-
- //accessibility
- element.on('keypress', function(e) {
- if (attrs.disabled || e.which !== 32 || $document[0].activeElement !== element[0]) {
- return;
- }
-
- scope.$apply(function() {
- ngModelCtrl.$setViewValue(element.hasClass(buttonsCtrl.activeClass) ? getFalseValue() : getTrueValue());
- ngModelCtrl.$render();
- });
- });
- }
- };
- }]);
-
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/buttons/docs/demo.html b/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/buttons/docs/demo.html
deleted file mode 100644
index 72b0b39..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/buttons/docs/demo.html
+++ /dev/null
@@ -1,27 +0,0 @@
-<div ng-controller="ButtonsCtrl">
- <h4>Single toggle</h4>
- <pre>{{singleModel}}</pre>
- <button type="button" class="btn btn-primary" ng-model="singleModel" uib-btn-checkbox btn-checkbox-true="1" btn-checkbox-false="0">
- Single Toggle
- </button>
- <h4>Checkbox</h4>
- <pre>Model: {{checkModel}}</pre>
- <pre>Results: {{checkResults}}</pre>
- <div class="btn-group">
- <label class="btn btn-primary" ng-model="checkModel.left" uib-btn-checkbox>Left</label>
- <label class="btn btn-primary" ng-model="checkModel.middle" uib-btn-checkbox>Middle</label>
- <label class="btn btn-primary" ng-model="checkModel.right" uib-btn-checkbox>Right</label>
- </div>
- <h4>Radio & Uncheckable Radio</h4>
- <pre>{{radioModel || 'null'}}</pre>
- <div class="btn-group">
- <label class="btn btn-primary" ng-model="radioModel" uib-btn-radio="'Left'">Left</label>
- <label class="btn btn-primary" ng-model="radioModel" uib-btn-radio="'Middle'">Middle</label>
- <label class="btn btn-primary" ng-model="radioModel" uib-btn-radio="'Right'">Right</label>
- </div>
- <div class="btn-group">
- <label class="btn btn-success" ng-model="radioModel" uib-btn-radio="'Left'" uncheckable>Left</label>
- <label class="btn btn-success" ng-model="radioModel" uib-btn-radio="'Middle'" uncheckable>Middle</label>
- <label class="btn btn-success" ng-model="radioModel" uib-btn-radio="'Right'" uncheckable>Right</label>
- </div>
-</div>
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/buttons/docs/demo.js b/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/buttons/docs/demo.js
deleted file mode 100644
index 3d5760f..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/buttons/docs/demo.js
+++ /dev/null
@@ -1,22 +0,0 @@
-angular.module('ui.bootstrap.demo').controller('ButtonsCtrl', function ($scope) {
- $scope.singleModel = 1;
-
- $scope.radioModel = 'Middle';
-
- $scope.checkModel = {
- left: false,
- middle: true,
- right: false
- };
-
- $scope.checkResults = [];
-
- $scope.$watchCollection('checkModel', function () {
- $scope.checkResults = [];
- angular.forEach($scope.checkModel, function (value, key) {
- if (value) {
- $scope.checkResults.push(key);
- }
- });
- });
-});
\ No newline at end of file
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/buttons/docs/readme.md b/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/buttons/docs/readme.md
deleted file mode 100644
index 9367d50..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/buttons/docs/readme.md
+++ /dev/null
@@ -1,36 +0,0 @@
-With the buttons directive, we can make a group of buttons behave like a set of checkboxes (`uib-btn-checkbox`) or behave like a set of radio buttons (`uib-btn-radio`).
-
-### uib-btn-checkbox settings
-
-* `ng-model` -
- Model where we set the checkbox status. By default `true` or `false`.
-
-* `btn-checkbox-true`
- _(Default: `true`)_ -
- Sets the value for the checked status.
-
-* `btn-checkbox-false`
- _(Default: `false`)_ -
- Sets the value for the unchecked status.
-
-### uib-btn-radio settings
-
-* `uib-btn-radio` -
- Value to assign to the `ng-model` if we check this radio button.
-
-* `ng-model` -
- Model where we set the radio status. All radio buttons in a group should use the same `ng-model`.
-
-* `uncheckable`
- _(Boolean attribute)_ -
- Whether a radio button can be unchecked or not.
-
-### Default settings `uibButtonConfig`
-
-* `activeClass`
- _(Default: `active`)_ -
- Class to apply to the checked buttons.
-
-* `toggleEvent`
- _(Default: `click`)_ -
- Event used to toggle the buttons.
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/buttons/test/buttons.spec.js b/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/buttons/test/buttons.spec.js
deleted file mode 100644
index 5cc81c5..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/buttons/test/buttons.spec.js
+++ /dev/null
@@ -1,371 +0,0 @@
-describe('buttons', function() {
-
- var $scope, $compile;
-
- beforeEach(module('ui.bootstrap.buttons'));
- beforeEach(inject(function(_$rootScope_, _$compile_) {
- $scope = _$rootScope_;
- $compile = _$compile_;
- }));
-
- describe('checkbox', function() {
- var compileButton = function(markup, scope) {
- var el = $compile(markup)(scope);
- scope.$digest();
- return el;
- };
-
- it('should expose the controller to the view', inject(function($templateCache) {
- var btn = compileButton('<button ng-model="model" uib-btn-checkbox>{{button.text}}</button>', $scope);
- var ctrl = btn.controller('uibBtnCheckbox');
- expect(ctrl).toBeDefined();
-
- ctrl.text = 'foo';
- $scope.$digest();
-
- expect(btn.html()).toBe('foo');
- }));
-
- //model -> UI
- it('should work correctly with default model values', function() {
- $scope.model = false;
- var btn = compileButton('<button ng-model="model" uib-btn-checkbox>click</button>', $scope);
- expect(btn).not.toHaveClass('active');
-
- $scope.model = true;
- $scope.$digest();
- expect(btn).toHaveClass('active');
- });
-
- it('should bind custom model values', function() {
- $scope.model = 1;
- var btn = compileButton('<button ng-model="model" uib-btn-checkbox btn-checkbox-true="1" btn-checkbox-false="0">click</button>', $scope);
- expect(btn).toHaveClass('active');
-
- $scope.model = 0;
- $scope.$digest();
- expect(btn).not.toHaveClass('active');
- });
-
- //UI-> model
- it('should toggle default model values on click', function() {
- $scope.model = false;
- var btn = compileButton('<button ng-model="model" uib-btn-checkbox>click</button>', $scope);
-
- btn.click();
- expect($scope.model).toEqual(true);
- expect(btn).toHaveClass('active');
-
- btn.click();
- expect($scope.model).toEqual(false);
- expect(btn).not.toHaveClass('active');
- });
-
- it('should toggle custom model values on click', function() {
- $scope.model = 0;
- var btn = compileButton('<button ng-model="model" uib-btn-checkbox btn-checkbox-true="1" btn-checkbox-false="0">click</button>', $scope);
-
- btn.click();
- expect($scope.model).toEqual(1);
- expect(btn).toHaveClass('active');
-
- btn.click();
- expect($scope.model).toEqual(0);
- expect(btn).not.toHaveClass('active');
- });
-
- it('should monitor true / false value changes - issue 666', function() {
-
- $scope.model = 1;
- $scope.trueVal = 1;
- var btn = compileButton('<button ng-model="model" uib-btn-checkbox btn-checkbox-true="trueVal">click</button>', $scope);
-
- expect(btn).toHaveClass('active');
- expect($scope.model).toEqual(1);
-
- $scope.model = 2;
- $scope.trueVal = 2;
- $scope.$digest();
-
- expect(btn).toHaveClass('active');
- expect($scope.model).toEqual(2);
- });
-
- it('should not toggle when disabled - issue 4013', function() {
- $scope.model = 1;
- $scope.falseVal = 0;
- var btn = compileButton('<button disabled ng-model="model" uib-btn-checkbox btn-checkbox-true="falseVal">click</button>', $scope);
-
- expect(btn).not.toHaveClass('active');
- expect($scope.model).toEqual(1);
-
- btn.click();
-
- expect(btn).not.toHaveClass('active');
-
- $scope.$digest();
-
- expect(btn).not.toHaveClass('active');
- });
-
- describe('setting buttonConfig', function() {
- var uibButtonConfig, originalActiveClass, originalToggleEvent;
-
- beforeEach(inject(function(_uibButtonConfig_) {
- uibButtonConfig = _uibButtonConfig_;
- originalActiveClass = uibButtonConfig.activeClass;
- originalToggleEvent = uibButtonConfig.toggleEvent;
- uibButtonConfig.activeClass = false;
- uibButtonConfig.toggleEvent = false;
- }));
-
- afterEach(function() {
- // return it to the original value
- uibButtonConfig.activeClass = originalActiveClass;
- uibButtonConfig.toggleEvent = originalToggleEvent;
- });
-
- it('should use default config when buttonConfig.activeClass and buttonConfig.toggleEvent is false', function() {
- $scope.model = false;
- var btn = compileButton('<button ng-model="model" uib-btn-checkbox>click</button>', $scope);
- expect(btn).not.toHaveClass('active');
-
- $scope.model = true;
- $scope.$digest();
- expect(btn).toHaveClass('active');
- });
-
- it('should be able to use a different active class', function() {
- uibButtonConfig.activeClass = 'foo';
- $scope.model = false;
- var btn = compileButton('<button ng-model="model" uib-btn-checkbox>click</button>', $scope);
- expect(btn).not.toHaveClass('foo');
-
- $scope.model = true;
- $scope.$digest();
- expect(btn).toHaveClass('foo');
- });
-
- it('should be able to use a different toggle event', function() {
- uibButtonConfig.toggleEvent = 'mouseenter';
- $scope.model = false;
- var btn = compileButton('<button ng-model="model" uib-btn-checkbox>click</button>', $scope);
- expect(btn).not.toHaveClass('active');
-
- btn.trigger('mouseenter');
-
- $scope.$digest();
- expect(btn).toHaveClass('active');
- });
- });
-
- });
-
- describe('radio', function() {
-
- var compileButtons = function(markup, scope) {
- var el = $compile('<div>'+markup+'</div>')(scope);
- scope.$digest();
- return el.find('button');
- };
-
- it('should expose the controller to the view', inject(function($templateCache) {
- var btn = compileButtons('<button ng-model="model" uib-btn-radio="1">{{buttons.text}}</button>', $scope);
- var ctrl = btn.controller('uibBtnRadio');
- expect(ctrl).toBeDefined();
-
- ctrl.text = 'foo';
- $scope.$digest();
-
- expect(btn.html()).toBe('foo');
- }));
-
- //model -> UI
- it('should set active class based on model', function() {
- var btns = compileButtons('<button ng-model="model" uib-btn-radio="1">click1</button><button ng-model="model" uib-btn-radio="2">click2</button>', $scope);
- expect(btns.eq(0)).not.toHaveClass('active');
- expect(btns.eq(1)).not.toHaveClass('active');
-
- $scope.model = 2;
- $scope.$digest();
- expect(btns.eq(0)).not.toHaveClass('active');
- expect(btns.eq(1)).toHaveClass('active');
- });
-
- //UI->model
- it('should set active class via click', function() {
- var btns = compileButtons('<button ng-model="model" uib-btn-radio="1">click1</button><button ng-model="model" uib-btn-radio="2">click2</button>', $scope);
- expect($scope.model).toBeUndefined();
-
- btns.eq(0).click();
- expect($scope.model).toEqual(1);
- expect(btns.eq(0)).toHaveClass('active');
- expect(btns.eq(1)).not.toHaveClass('active');
-
- btns.eq(1).click();
- expect($scope.model).toEqual(2);
- expect(btns.eq(1)).toHaveClass('active');
- expect(btns.eq(0)).not.toHaveClass('active');
- });
-
- it('should watch uib-btn-radio values and update state accordingly', function() {
- $scope.values = ['value1', 'value2'];
-
- var btns = compileButtons('<button ng-model="model" uib-btn-radio="values[0]">click1</button><button ng-model="model" uib-btn-radio="values[1]">click2</button>', $scope);
- expect(btns.eq(0)).not.toHaveClass('active');
- expect(btns.eq(1)).not.toHaveClass('active');
-
- $scope.model = 'value2';
- $scope.$digest();
- expect(btns.eq(0)).not.toHaveClass('active');
- expect(btns.eq(1)).toHaveClass('active');
-
- $scope.values[1] = 'value3';
- $scope.model = 'value3';
- $scope.$digest();
- expect(btns.eq(0)).not.toHaveClass('active');
- expect(btns.eq(1)).toHaveClass('active');
- });
-
- it('should do nothing when clicking an active radio', function() {
- $scope.model = 1;
- var btns = compileButtons('<button ng-model="model" uib-btn-radio="1">click1</button><button ng-model="model" uib-btn-radio="2">click2</button>', $scope);
- expect(btns.eq(0)).toHaveClass('active');
- expect(btns.eq(1)).not.toHaveClass('active');
-
- btns.eq(0).click();
- $scope.$digest();
- expect(btns.eq(0)).toHaveClass('active');
- expect(btns.eq(1)).not.toHaveClass('active');
- });
-
- it('should not toggle when disabled - issue 4013', function() {
- $scope.model = 1;
- var btns = compileButtons('<button ng-model="model" uib-btn-radio="1">click1</button><button disabled ng-model="model" uib-btn-radio="2">click2</button>', $scope);
-
- expect(btns.eq(0)).toHaveClass('active');
- expect(btns.eq(1)).not.toHaveClass('active');
-
- btns.eq(1).click();
-
- expect(btns.eq(0)).toHaveClass('active');
- expect(btns.eq(1)).not.toHaveClass('active');
-
- $scope.$digest();
-
- expect(btns.eq(0)).toHaveClass('active');
- expect(btns.eq(1)).not.toHaveClass('active');
- });
-
- it('should handle string values in uib-btn-radio value', function() {
- $scope.model = 'Two';
- var btns = compileButtons('<button ng-model="model" uib-btn-radio="\'One\'">click1</button><button ng-model="model" uib-btn-radio="\'Two\'">click2</button>', $scope);
-
- expect(btns.eq(0)).not.toHaveClass('active');
- expect(btns.eq(1)).toHaveClass('active');
-
- btns.eq(0).click();
- expect(btns.eq(0)).toHaveClass('active');
- expect(btns.eq(1)).not.toHaveClass('active');
- expect($scope.model).toEqual('One');
-
- $scope.$digest();
-
- expect(btns.eq(0)).toHaveClass('active');
- expect(btns.eq(1)).not.toHaveClass('active');
- expect($scope.model).toEqual('One');
- });
-
- describe('uncheckable', function() {
- //model -> UI
- it('should set active class based on model', function() {
- var btns = compileButtons('<button ng-model="model" uib-btn-radio="1" uncheckable>click1</button><button ng-model="model" uib-btn-radio="2" uncheckable>click2</button>', $scope);
- expect(btns.eq(0)).not.toHaveClass('active');
- expect(btns.eq(1)).not.toHaveClass('active');
-
- $scope.model = 2;
- $scope.$digest();
- expect(btns.eq(0)).not.toHaveClass('active');
- expect(btns.eq(1)).toHaveClass('active');
- });
-
- //UI->model
- it('should unset active class via click', function() {
- var btns = compileButtons('<button ng-model="model" uib-btn-radio="1" uncheckable>click1</button><button ng-model="model" uib-btn-radio="2" uncheckable>click2</button>', $scope);
- expect($scope.model).toBeUndefined();
-
- btns.eq(0).click();
- expect($scope.model).toEqual(1);
- expect(btns.eq(0)).toHaveClass('active');
- expect(btns.eq(1)).not.toHaveClass('active');
-
- btns.eq(0).click();
- expect($scope.model).toBeNull();
- expect(btns.eq(1)).not.toHaveClass('active');
- expect(btns.eq(0)).not.toHaveClass('active');
- });
-
- it('should watch uib-btn-radio values and update state', function() {
- $scope.values = ['value1', 'value2'];
-
- var btns = compileButtons('<button ng-model="model" uib-btn-radio="values[0]" uncheckable>click1</button><button ng-model="model" uib-btn-radio="values[1]" uncheckable>click2</button>', $scope);
- expect(btns.eq(0)).not.toHaveClass('active');
- expect(btns.eq(1)).not.toHaveClass('active');
-
- $scope.model = 'value2';
- $scope.$digest();
- expect(btns.eq(0)).not.toHaveClass('active');
- expect(btns.eq(1)).toHaveClass('active');
-
- $scope.model = undefined;
- $scope.$digest();
- expect(btns.eq(0)).not.toHaveClass('active');
- expect(btns.eq(1)).not.toHaveClass('active');
- });
- });
- });
-});
-
-/* Deprecation tests below */
-
-describe('buttons deprecation', function() {
- beforeEach(module('ui.bootstrap.buttons'));
-
- it('should suppress warning', function() {
- module(function($provide) {
- $provide.value('$buttonsSuppressWarning', true);
- });
-
- inject(function($compile, $log, $rootScope) {
- spyOn($log, 'warn');
-
- var element = $compile('<button ng-model="model" btn-checkbox>click</button>')($rootScope);
- $rootScope.$digest();
-
- expect($log.warn.calls.count()).toBe(0);
-
- element = $compile('<button ng-model="model" btn-radio="1">click1</button><button ng-model="model" btn-radio="2">click2</button>')($rootScope);
- $rootScope.$digest();
-
- expect($log.warn.calls.count()).toBe(0);
- });
- });
-
- it('should give warning by default', inject(function($compile, $log, $rootScope) {
- spyOn($log, 'warn');
-
- var element = $compile('<button ng-model="model" btn-checkbox>click</button>')($rootScope);
- $rootScope.$digest();
-
- element = $compile('<button ng-model="model" btn-radio="1">click1</button><button ng-model="model" btn-radio="2">click2</button>')($rootScope);
- $rootScope.$digest();
-
- expect($log.warn.calls.count()).toBe(6);
- expect($log.warn.calls.argsFor(0)).toEqual(['ButtonsController is now deprecated. Use UibButtonsController instead.']);
- expect($log.warn.calls.argsFor(1)).toEqual(['btn-checkbox is now deprecated. Use uib-btn-checkbox instead.']);
- expect($log.warn.calls.argsFor(2)).toEqual(['ButtonsController is now deprecated. Use UibButtonsController instead.']);
- expect($log.warn.calls.argsFor(3)).toEqual(['btn-radio is now deprecated. Use uib-btn-radio instead.']);
- expect($log.warn.calls.argsFor(4)).toEqual(['ButtonsController is now deprecated. Use UibButtonsController instead.']);
- expect($log.warn.calls.argsFor(5)).toEqual(['btn-radio is now deprecated. Use uib-btn-radio instead.']);
- }));
-});
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/carousel/carousel.css b/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/carousel/carousel.css
deleted file mode 100644
index 061b304..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/carousel/carousel.css
+++ /dev/null
@@ -1,4 +0,0 @@
-.ng-animate.item:not(.left):not(.right) {
- -webkit-transition: 0s ease-in-out left;
- transition: 0s ease-in-out left
-}
\ No newline at end of file
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/carousel/carousel.js b/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/carousel/carousel.js
deleted file mode 100644
index a3cb2aa..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/carousel/carousel.js
+++ /dev/null
@@ -1,496 +0,0 @@
-/**
- * @ngdoc overview
- * @name ui.bootstrap.carousel
- *
- * @description
- * AngularJS version of an image carousel.
- *
- */
-angular.module('ui.bootstrap.carousel', [])
-
-.controller('UibCarouselController', ['$scope', '$element', '$interval', '$animate', function($scope, $element, $interval, $animate) {
- var self = this,
- slides = self.slides = $scope.slides = [],
- NEW_ANIMATE = angular.version.minor >= 4,
- NO_TRANSITION = 'uib-noTransition',
- SLIDE_DIRECTION = 'uib-slideDirection',
- currentIndex = -1,
- currentInterval, isPlaying;
- self.currentSlide = null;
-
- var destroyed = false;
- /* direction: "prev" or "next" */
- self.select = $scope.select = function(nextSlide, direction) {
- var nextIndex = $scope.indexOfSlide(nextSlide);
- //Decide direction if it's not given
- if (direction === undefined) {
- direction = nextIndex > self.getCurrentIndex() ? 'next' : 'prev';
- }
- //Prevent this user-triggered transition from occurring if there is already one in progress
- if (nextSlide && nextSlide !== self.currentSlide && !$scope.$currentTransition) {
- goNext(nextSlide, nextIndex, direction);
- }
- };
-
- function goNext(slide, index, direction) {
- // Scope has been destroyed, stop here.
- if (destroyed) { return; }
-
- angular.extend(slide, {direction: direction, active: true});
- angular.extend(self.currentSlide || {}, {direction: direction, active: false});
- if ($animate.enabled() && !$scope.noTransition && !$scope.$currentTransition &&
- slide.$element && self.slides.length > 1) {
- slide.$element.data(SLIDE_DIRECTION, slide.direction);
- if (self.currentSlide && self.currentSlide.$element) {
- self.currentSlide.$element.data(SLIDE_DIRECTION, slide.direction);
- }
-
- $scope.$currentTransition = true;
- if (NEW_ANIMATE) {
- $animate.on('addClass', slide.$element, function(element, phase) {
- if (phase === 'close') {
- $scope.$currentTransition = null;
- $animate.off('addClass', element);
- }
- });
- } else {
- slide.$element.one('$animate:close', function closeFn() {
- $scope.$currentTransition = null;
- });
- }
- }
-
- self.currentSlide = slide;
- currentIndex = index;
-
- //every time you change slides, reset the timer
- restartTimer();
- }
-
- $scope.$on('$destroy', function() {
- destroyed = true;
- });
-
- function getSlideByIndex(index) {
- if (angular.isUndefined(slides[index].index)) {
- return slides[index];
- }
- var i, len = slides.length;
- for (i = 0; i < slides.length; ++i) {
- if (slides[i].index == index) {
- return slides[i];
- }
- }
- }
-
- self.getCurrentIndex = function() {
- if (self.currentSlide && angular.isDefined(self.currentSlide.index)) {
- return +self.currentSlide.index;
- }
- return currentIndex;
- };
-
- /* Allow outside people to call indexOf on slides array */
- $scope.indexOfSlide = function(slide) {
- return angular.isDefined(slide.index) ? +slide.index : slides.indexOf(slide);
- };
-
- $scope.next = function() {
- var newIndex = (self.getCurrentIndex() + 1) % slides.length;
-
- if (newIndex === 0 && $scope.noWrap()) {
- $scope.pause();
- return;
- }
-
- return self.select(getSlideByIndex(newIndex), 'next');
- };
-
- $scope.prev = function() {
- var newIndex = self.getCurrentIndex() - 1 < 0 ? slides.length - 1 : self.getCurrentIndex() - 1;
-
- if ($scope.noWrap() && newIndex === slides.length - 1) {
- $scope.pause();
- return;
- }
-
- return self.select(getSlideByIndex(newIndex), 'prev');
- };
-
- $scope.isActive = function(slide) {
- return self.currentSlide === slide;
- };
-
- $scope.$watch('interval', restartTimer);
- $scope.$watchCollection('slides', resetTransition);
- $scope.$on('$destroy', resetTimer);
-
- function restartTimer() {
- resetTimer();
- var interval = +$scope.interval;
- if (!isNaN(interval) && interval > 0) {
- currentInterval = $interval(timerFn, interval);
- }
- }
-
- function resetTimer() {
- if (currentInterval) {
- $interval.cancel(currentInterval);
- currentInterval = null;
- }
- }
-
- function timerFn() {
- var interval = +$scope.interval;
- if (isPlaying && !isNaN(interval) && interval > 0 && slides.length) {
- $scope.next();
- } else {
- $scope.pause();
- }
- }
-
- function resetTransition(slides) {
- if (!slides.length) {
- $scope.$currentTransition = null;
- }
- }
-
- $scope.play = function() {
- if (!isPlaying) {
- isPlaying = true;
- restartTimer();
- }
- };
- $scope.pause = function() {
- if (!$scope.noPause) {
- isPlaying = false;
- resetTimer();
- }
- };
-
- self.addSlide = function(slide, element) {
- slide.$element = element;
- slides.push(slide);
- //if this is the first slide or the slide is set to active, select it
- if (slides.length === 1 || slide.active) {
- self.select(slides[slides.length - 1]);
- if (slides.length === 1) {
- $scope.play();
- }
- } else {
- slide.active = false;
- }
- };
-
- self.removeSlide = function(slide) {
- if (angular.isDefined(slide.index)) {
- slides.sort(function(a, b) {
- return +a.index > +b.index;
- });
- }
- //get the index of the slide inside the carousel
- var index = slides.indexOf(slide);
- slides.splice(index, 1);
- if (slides.length > 0 && slide.active) {
- if (index >= slides.length) {
- self.select(slides[index - 1]);
- } else {
- self.select(slides[index]);
- }
- } else if (currentIndex > index) {
- currentIndex--;
- }
-
- //clean the currentSlide when no more slide
- if (slides.length === 0) {
- self.currentSlide = null;
- }
- };
-
- $scope.$watch('noTransition', function(noTransition) {
- $element.data(NO_TRANSITION, noTransition);
- });
-
-}])
-
-/**
- * @ngdoc directive
- * @name ui.bootstrap.carousel.directive:carousel
- * @restrict EA
- *
- * @description
- * Carousel is the outer container for a set of image 'slides' to showcase.
- *
- * @param {number=} interval The time, in milliseconds, that it will take the carousel to go to the next slide.
- * @param {boolean=} noTransition Whether to disable transitions on the carousel.
- * @param {boolean=} noPause Whether to disable pausing on the carousel (by default, the carousel interval pauses on hover).
- *
- * @example
-<example module="ui.bootstrap">
- <file name="index.html">
- <uib-carousel>
- <uib-slide>
- <img src="http://placekitten.com/150/150" style="margin:auto;">
- <div class="carousel-caption">
- <p>Beautiful!</p>
- </div>
- </uib-slide>
- <uib-slide>
- <img src="http://placekitten.com/100/150" style="margin:auto;">
- <div class="carousel-caption">
- <p>D'aww!</p>
- </div>
- </uib-slide>
- </uib-carousel>
- </file>
- <file name="demo.css">
- .carousel-indicators {
- top: auto;
- bottom: 15px;
- }
- </file>
-</example>
- */
-.directive('uibCarousel', [function() {
- return {
- transclude: true,
- replace: true,
- controller: 'UibCarouselController',
- controllerAs: 'carousel',
- require: 'carousel',
- templateUrl: function(element, attrs) {
- return attrs.templateUrl || 'template/carousel/carousel.html';
- },
- scope: {
- interval: '=',
- noTransition: '=',
- noPause: '=',
- noWrap: '&'
- }
- };
-}])
-
-/**
- * @ngdoc directive
- * @name ui.bootstrap.carousel.directive:slide
- * @restrict EA
- *
- * @description
- * Creates a slide inside a {@link ui.bootstrap.carousel.directive:carousel carousel}. Must be placed as a child of a carousel element.
- *
- * @param {boolean=} active Model binding, whether or not this slide is currently active.
- * @param {number=} index The index of the slide. The slides will be sorted by this parameter.
- *
- * @example
-<example module="ui.bootstrap">
- <file name="index.html">
-<div ng-controller="CarouselDemoCtrl">
- <uib-carousel>
- <uib-slide ng-repeat="slide in slides" active="slide.active" index="$index">
- <img ng-src="{{slide.image}}" style="margin:auto;">
- <div class="carousel-caption">
- <h4>Slide {{$index}}</h4>
- <p>{{slide.text}}</p>
- </div>
- </uib-slide>
- </uib-carousel>
- Interval, in milliseconds: <input type="number" ng-model="myInterval">
- <br />Enter a negative number to stop the interval.
-</div>
- </file>
- <file name="script.js">
-function CarouselDemoCtrl($scope) {
- $scope.myInterval = 5000;
-}
- </file>
- <file name="demo.css">
- .carousel-indicators {
- top: auto;
- bottom: 15px;
- }
- </file>
-</example>
-*/
-
-.directive('uibSlide', function() {
- return {
- require: '^uibCarousel',
- restrict: 'EA',
- transclude: true,
- replace: true,
- templateUrl: function(element, attrs) {
- return attrs.templateUrl || 'template/carousel/slide.html';
- },
- scope: {
- active: '=?',
- actual: '=?',
- index: '=?'
- },
- link: function (scope, element, attrs, carouselCtrl) {
- carouselCtrl.addSlide(scope, element);
- //when the scope is destroyed then remove the slide from the current slides array
- scope.$on('$destroy', function() {
- carouselCtrl.removeSlide(scope);
- });
-
- scope.$watch('active', function(active) {
- if (active) {
- carouselCtrl.select(scope);
- }
- });
- }
- };
-})
-
-.animation('.item', [
- '$injector', '$animate',
-function ($injector, $animate) {
- var NO_TRANSITION = 'uib-noTransition',
- SLIDE_DIRECTION = 'uib-slideDirection',
- $animateCss = null;
-
- if ($injector.has('$animateCss')) {
- $animateCss = $injector.get('$animateCss');
- }
-
- function removeClass(element, className, callback) {
- element.removeClass(className);
- if (callback) {
- callback();
- }
- }
-
- return {
- beforeAddClass: function(element, className, done) {
- // Due to transclusion, noTransition property is on parent's scope
- if (className == 'active' && element.parent() && element.parent().parent() &&
- !element.parent().parent().data(NO_TRANSITION)) {
- var stopped = false;
- var direction = element.data(SLIDE_DIRECTION);
- var directionClass = direction == 'next' ? 'left' : 'right';
- var removeClassFn = removeClass.bind(this, element,
- directionClass + ' ' + direction, done);
- element.addClass(direction);
-
- if ($animateCss) {
- $animateCss(element, {addClass: directionClass})
- .start()
- .done(removeClassFn);
- } else {
- $animate.addClass(element, directionClass).then(function () {
- if (!stopped) {
- removeClassFn();
- }
- done();
- });
- }
-
- return function () {
- stopped = true;
- };
- }
- done();
- },
- beforeRemoveClass: function (element, className, done) {
- // Due to transclusion, noTransition property is on parent's scope
- if (className === 'active' && element.parent() && element.parent().parent() &&
- !element.parent().parent().data(NO_TRANSITION)) {
- var stopped = false;
- var direction = element.data(SLIDE_DIRECTION);
- var directionClass = direction == 'next' ? 'left' : 'right';
- var removeClassFn = removeClass.bind(this, element, directionClass, done);
-
- if ($animateCss) {
- $animateCss(element, {addClass: directionClass})
- .start()
- .done(removeClassFn);
- } else {
- $animate.addClass(element, directionClass).then(function() {
- if (!stopped) {
- removeClassFn();
- }
- done();
- });
- }
- return function() {
- stopped = true;
- };
- }
- done();
- }
- };
-}]);
-
-/* deprecated carousel below */
-
-angular.module('ui.bootstrap.carousel')
-
-.value('$carouselSuppressWarning', false)
-
-.controller('CarouselController', ['$scope', '$element', '$controller', '$log', '$carouselSuppressWarning', function($scope, $element, $controller, $log, $carouselSuppressWarning) {
- if (!$carouselSuppressWarning) {
- $log.warn('CarouselController is now deprecated. Use UibCarouselController instead.');
- }
-
- angular.extend(this, $controller('UibCarouselController', {
- $scope: $scope,
- $element: $element
- }));
-}])
-
-.directive('carousel', ['$log', '$carouselSuppressWarning', function($log, $carouselSuppressWarning) {
- return {
- transclude: true,
- replace: true,
- controller: 'CarouselController',
- controllerAs: 'carousel',
- require: 'carousel',
- templateUrl: function(element, attrs) {
- return attrs.templateUrl || 'template/carousel/carousel.html';
- },
- scope: {
- interval: '=',
- noTransition: '=',
- noPause: '=',
- noWrap: '&'
- },
- link: function() {
- if (!$carouselSuppressWarning) {
- $log.warn('carousel is now deprecated. Use uib-carousel instead.');
- }
- }
- };
-}])
-
-.directive('slide', ['$log', '$carouselSuppressWarning', function($log, $carouselSuppressWarning) {
- return {
- require: '^carousel',
- transclude: true,
- replace: true,
- templateUrl: function(element, attrs) {
- return attrs.templateUrl || 'template/carousel/slide.html';
- },
- scope: {
- active: '=?',
- actual: '=?',
- index: '=?'
- },
- link: function (scope, element, attrs, carouselCtrl) {
- if (!$carouselSuppressWarning) {
- $log.warn('slide is now deprecated. Use uib-slide instead.');
- }
-
- carouselCtrl.addSlide(scope, element);
- //when the scope is destroyed then remove the slide from the current slides array
- scope.$on('$destroy', function() {
- carouselCtrl.removeSlide(scope);
- });
-
- scope.$watch('active', function(active) {
- if (active) {
- carouselCtrl.select(scope);
- }
- });
- }
- };
-}]);
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/carousel/docs/README.md b/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/carousel/docs/README.md
deleted file mode 100644
index 0fe1eba..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/carousel/docs/README.md
+++ /dev/null
@@ -1,11 +0,0 @@
-Carousel creates a carousel similar to bootstrap's image carousel.
-
-The carousel also offers support for touchscreen devices in the form of swiping. To enable swiping, load the `ngTouch` module as a dependency.
-
-Use a `<uib-carousel>` element with `<uib-slide>` elements inside it. It will automatically cycle through the slides at a given rate, and a current-index variable will be kept in sync with the currently visible slide.
-
-Use the `no-wrap` attribute on a `<uib-carousel>` element to control the looping of slides; setting `no-wrap` to an expression which evaluates to a truthy value will prevent looping.
-
-Use the `template-url` attribute on a `<uib-carousel>` or `<uib-slide>` element to specify the url of a custom template to override the default templates.
-
-Use the `actual` attribute on a `<uib-slide>` element to bind the slide model (or any object of interest) onto the slide directive's `$scope`, which makes it available for customization in the carousel template.
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/carousel/docs/demo.html b/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/carousel/docs/demo.html
deleted file mode 100644
index 0383722..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/carousel/docs/demo.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<div ng-controller="CarouselDemoCtrl">
- <div style="height: 305px">
- <uib-carousel interval="myInterval" no-wrap="noWrapSlides">
- <uib-slide ng-repeat="slide in slides" active="slide.active">
- <img ng-src="{{slide.image}}" style="margin:auto;">
- <div class="carousel-caption">
- <h4>Slide {{$index}}</h4>
- <p>{{slide.text}}</p>
- </div>
- </uib-slide>
- </uib-carousel>
- </div>
- <div class="row">
- <div class="col-md-6">
- <button type="button" class="btn btn-info" ng-click="addSlide()">Add Slide</button>
- <div class="checkbox">
- <label>
- <input type="checkbox" ng-model="noWrapSlides">
- Disable Slide Looping
- </label>
- </div>
- </div>
- <div class="col-md-6">
- Interval, in milliseconds: <input type="number" class="form-control" ng-model="myInterval">
- <br />Enter a negative number or 0 to stop the interval.
- </div>
- </div>
-</div>
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/carousel/docs/demo.js b/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/carousel/docs/demo.js
deleted file mode 100644
index 9b6607c..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/carousel/docs/demo.js
+++ /dev/null
@@ -1,16 +0,0 @@
-angular.module('ui.bootstrap.demo').controller('CarouselDemoCtrl', function ($scope) {
- $scope.myInterval = 5000;
- $scope.noWrapSlides = false;
- var slides = $scope.slides = [];
- $scope.addSlide = function() {
- var newWidth = 600 + slides.length + 1;
- slides.push({
- image: '//placekitten.com/' + newWidth + '/300',
- text: ['More','Extra','Lots of','Surplus'][slides.length % 4] + ' ' +
- ['Cats', 'Kittys', 'Felines', 'Cutes'][slides.length % 4]
- });
- };
- for (var i=0; i<4; i++) {
- $scope.addSlide();
- }
-});
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/carousel/test/carousel.spec.js b/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/carousel/test/carousel.spec.js
deleted file mode 100644
index adb9c76..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/carousel/test/carousel.spec.js
+++ /dev/null
@@ -1,594 +0,0 @@
-describe('carousel', function() {
- beforeEach(module('ui.bootstrap.carousel', function($compileProvider, $provide) {
- angular.forEach(['ngSwipeLeft', 'ngSwipeRight'], makeMock);
- function makeMock(name) {
- $provide.value(name + 'Directive', []); //remove existing directive if it exists
- $compileProvider.directive(name, function() {
- return function(scope, element, attr) {
- element.on(name, function() {
- scope.$apply(attr[name]);
- });
- };
- });
- }
- }));
- beforeEach(module('template/carousel/carousel.html', 'template/carousel/slide.html'));
-
- var $rootScope, $compile, $controller, $interval, $templateCache;
- beforeEach(inject(function(_$rootScope_, _$compile_, _$controller_, _$interval_, _$templateCache_) {
- $rootScope = _$rootScope_;
- $compile = _$compile_;
- $controller = _$controller_;
- $interval = _$interval_;
- $templateCache = _$templateCache_;
- }));
-
- describe('basics', function() {
- var elm, scope;
- beforeEach(function() {
- scope = $rootScope.$new();
- scope.slides = [
- {active:false,content:'one'},
- {active:false,content:'two'},
- {active:false,content:'three'}
- ];
- elm = $compile(
- '<uib-carousel interval="interval" no-transition="true" no-pause="nopause">' +
- '<uib-slide ng-repeat="slide in slides" active="slide.active">' +
- '{{slide.content}}' +
- '</uib-slide>' +
- '</uib-carousel>'
- )(scope);
- scope.interval = 5000;
- scope.nopause = undefined;
- scope.$apply();
- });
-
- function testSlideActive(slideIndex) {
- for (var i = 0; i < scope.slides.length; i++) {
- if (i == slideIndex) {
- expect(scope.slides[i].active).toBe(true);
- } else {
- expect(scope.slides[i].active).not.toBe(true);
- }
- }
- }
-
- it('should allow overriding of the carousel template', function() {
- $templateCache.put('foo/bar.html', '<div>foo</div>');
-
- elm = $compile('<uib-carousel template-url="foo/bar.html"></uib-carousel>')(scope);
- $rootScope.$digest();
-
- expect(elm.html()).toBe('foo');
- });
-
- it('should allow overriding of the slide template', function() {
- $templateCache.put('foo/bar.html', '<div class="slide">bar</div>');
-
- elm = $compile(
- '<uib-carousel interval="interval" no-transition="true" no-pause="nopause">' +
- '<uib-slide template-url="foo/bar.html"></uib-slide>' +
- '</uib-carousel>'
- )(scope);
- $rootScope.$digest();
-
- var slide = elm.find('.slide');
- expect(slide.html()).toBe('bar');
- });
-
- it('should set the selected slide to active = true', function() {
- expect(scope.slides[0].content).toBe('one');
- testSlideActive(0);
- scope.$apply('slides[1].active=true');
- testSlideActive(1);
- });
-
- it('should create clickable prev nav button', function() {
- var navPrev = elm.find('a.left');
- var navNext = elm.find('a.right');
-
- expect(navPrev.length).toBe(1);
- expect(navNext.length).toBe(1);
- });
-
- it('should display clickable slide indicators', function () {
- var indicators = elm.find('ol.carousel-indicators > li');
- expect(indicators.length).toBe(3);
- });
-
- it('should stop cycling slides forward when noWrap is truthy', function () {
- elm = $compile(
- '<uib-carousel interval="interval" no-wrap="noWrap">' +
- '<uib-slide ng-repeat="slide in slides" active="slide.active">' +
- '{{slide.content}}' +
- '</uib-slide>' +
- '</uib-carousel>'
- )(scope);
-
- scope.noWrap = true;
- scope.$apply();
-
- scope = elm.isolateScope();
- spyOn(scope, 'pause');
-
- for (var i = 0; i < scope.slides.length - 1; ++i) {
- scope.next();
- }
- testSlideActive(scope.slides.length - 1);
- scope.next();
- testSlideActive(scope.slides.length - 1);
- expect(scope.pause).toHaveBeenCalled();
- });
-
- it('should stop cycling slides backward when noWrap is truthy', function () {
- elm = $compile(
- '<uib-carousel interval="interval" no-wrap="noWrap">' +
- '<uib-slide ng-repeat="slide in slides" active="slide.active">' +
- '{{slide.content}}' +
- '</uib-slide>' +
- '</uib-carousel>'
- )(scope);
-
- scope.noWrap = true;
- scope.$apply();
-
- scope = elm.isolateScope();
- spyOn(scope, 'pause');
-
- testSlideActive(0);
- scope.prev();
- testSlideActive(0);
- expect(scope.pause).toHaveBeenCalled();
- });
-
- it('should hide navigation when only one slide', function () {
- scope.slides = [{active:false,content:'one'}];
- scope.$apply();
- elm = $compile(
- '<uib-carousel interval="interval" no-transition="true">' +
- '<uib-slide ng-repeat="slide in slides" active="slide.active">' +
- '{{slide.content}}' +
- '</uib-slide>' +
- '</uib-carousel>'
- )(scope);
- var indicators = elm.find('ol.carousel-indicators > li');
- expect(indicators.length).toBe(0);
-
- var navNext = elm.find('a.right');
- expect(navNext.length).toBe(0);
-
- var navPrev = elm.find('a.left');
- expect(navPrev.length).toBe(0);
- });
-
- it('should show navigation when there are 3 slides', function () {
- var indicators = elm.find('ol.carousel-indicators > li');
- expect(indicators.length).not.toBe(0);
-
- var navNext = elm.find('a.right');
- expect(navNext.length).not.toBe(0);
-
- var navPrev = elm.find('a.left');
- expect(navPrev.length).not.toBe(0);
- });
-
- it('should go to next when clicking next button', function() {
- var navNext = elm.find('a.right');
- testSlideActive(0);
- navNext.click();
- testSlideActive(1);
- navNext.click();
- testSlideActive(2);
- navNext.click();
- testSlideActive(0);
- });
-
- it('should go to prev when clicking prev button', function() {
- var navPrev = elm.find('a.left');
- testSlideActive(0);
- navPrev.click();
- testSlideActive(2);
- navPrev.click();
- testSlideActive(1);
- navPrev.click();
- testSlideActive(0);
- });
-
- describe('swiping', function() {
- it('should go next on swipeLeft', function() {
- testSlideActive(0);
- elm.triggerHandler('ngSwipeLeft');
- testSlideActive(1);
- });
-
- it('should go prev on swipeRight', function() {
- testSlideActive(0);
- elm.triggerHandler('ngSwipeRight');
- testSlideActive(2);
- });
- });
-
- it('should select a slide when clicking on slide indicators', function () {
- var indicators = elm.find('ol.carousel-indicators > li');
- indicators.eq(1).click();
- testSlideActive(1);
- });
-
- it('shouldnt go forward if interval is NaN or negative or has no slides', function() {
- testSlideActive(0);
- var previousInterval = scope.interval;
- scope.$apply('interval = -1');
- $interval.flush(previousInterval);
- testSlideActive(0);
- scope.$apply('interval = 1000');
- $interval.flush(1000);
- testSlideActive(1);
- scope.$apply('interval = false');
- $interval.flush(1000);
- testSlideActive(1);
- scope.$apply('interval = 1000');
- $interval.flush(1000);
- testSlideActive(2);
- scope.$apply('slides = []');
- $interval.flush(1000);
- testSlideActive(2);
- });
-
- it('should bind the content to slides', function() {
- var contents = elm.find('div.item');
-
- expect(contents.length).toBe(3);
- expect(contents.eq(0).text()).toBe('one');
- expect(contents.eq(1).text()).toBe('two');
- expect(contents.eq(2).text()).toBe('three');
-
- scope.$apply(function() {
- scope.slides[0].content = 'what';
- scope.slides[1].content = 'no';
- scope.slides[2].content = 'maybe';
- });
-
- expect(contents.eq(0).text()).toBe('what');
- expect(contents.eq(1).text()).toBe('no');
- expect(contents.eq(2).text()).toBe('maybe');
- });
-
- it('should be playing by default and cycle through slides', function() {
- testSlideActive(0);
- $interval.flush(scope.interval);
- testSlideActive(1);
- $interval.flush(scope.interval);
- testSlideActive(2);
- $interval.flush(scope.interval);
- testSlideActive(0);
- });
-
- it('should pause and play on mouseover', function() {
- testSlideActive(0);
- $interval.flush(scope.interval);
- testSlideActive(1);
- elm.trigger('mouseenter');
- testSlideActive(1);
- $interval.flush(scope.interval);
- testSlideActive(1);
- elm.trigger('mouseleave');
- $interval.flush(scope.interval);
- testSlideActive(2);
- });
-
- it('should not pause on mouseover if noPause', function() {
- scope.$apply('nopause = true');
- testSlideActive(0);
- elm.trigger('mouseenter');
- $interval.flush(scope.interval);
- testSlideActive(1);
- elm.trigger('mouseleave');
- $interval.flush(scope.interval);
- testSlideActive(2);
- });
-
- it('should remove slide from dom and change active slide', function() {
- scope.$apply('slides[2].active = true');
- testSlideActive(2);
- scope.$apply('slides.splice(0,1)');
- expect(elm.find('div.item').length).toBe(2);
- testSlideActive(1);
- $interval.flush(scope.interval);
- testSlideActive(0);
- scope.$apply('slides.splice(1,1)');
- expect(elm.find('div.item').length).toBe(1);
- testSlideActive(0);
- });
-
- it('should change dom when you reassign ng-repeat slides array', function() {
- scope.slides = [{content:'new1'},{content:'new2'},{content:'new3'}];
- scope.$apply();
- var contents = elm.find('div.item');
- expect(contents.length).toBe(3);
- expect(contents.eq(0).text()).toBe('new1');
- expect(contents.eq(1).text()).toBe('new2');
- expect(contents.eq(2).text()).toBe('new3');
- });
-
- it('should not change if next is clicked while transitioning', function() {
- var carouselScope = elm.children().scope();
- var next = elm.find('a.right');
-
- testSlideActive(0);
- carouselScope.$currentTransition = true;
- next.click();
-
- testSlideActive(0);
-
- carouselScope.$currentTransition = null;
- next.click();
- testSlideActive(1);
- });
-
- it('issue 1414 - should not continue running timers after scope is destroyed', function() {
- testSlideActive(0);
- $interval.flush(scope.interval);
- testSlideActive(1);
- $interval.flush(scope.interval);
- testSlideActive(2);
- $interval.flush(scope.interval);
- testSlideActive(0);
- spyOn($interval, 'cancel').and.callThrough();
- scope.$destroy();
- expect($interval.cancel).toHaveBeenCalled();
- });
-
- it('issue 4390 - should reset the currentTransition if there are no slides', function() {
- var carouselScope = elm.children().scope();
- var next = elm.find('a.right');
- scope.slides = [{content:'new1'},{content:'new2'},{content:'new3'}];
- scope.$apply();
-
- testSlideActive(0);
- carouselScope.$currentTransition = true;
-
- scope.slides = [];
- scope.$apply();
-
- expect(carouselScope.$currentTransition).toBe(null);
- });
-
- describe('slide order', function() {
- beforeEach(function() {
- scope.slides = [
- {active:false,content:'one', id:1},
- {active:false,content:'two', id:2},
- {active:false,content:'three', id:3}
- ];
- elm = $compile(
- '<uib-carousel interval="interval" no-transition="true" no-pause="nopause">' +
- '<uib-slide ng-repeat="slide in slides | orderBy: \'id\' " active="slide.active" index="$index">' +
- '{{slide.content}}' +
- '</uib-slide>' +
- '</uib-carousel>'
- )(scope);
- scope.$apply();
- scope.slides[0].id = 3;
- scope.slides[1].id = 1;
- scope.slides[2].id = 2;
- scope.$apply();
- });
-
- it('should change dom when an order of the slides was changed', function() {
- testSlideActive(0);
- var contents = elm.find('div.item');
- expect(contents.length).toBe(3);
- expect(contents.eq(0).text()).toBe('two');
- expect(contents.eq(1).text()).toBe('three');
- expect(contents.eq(2).text()).toBe('one');
- });
-
- it('should select next after order change', function() {
- testSlideActive(0);
- var next = elm.find('a.right');
- next.click();
- testSlideActive(1);
- });
-
- it('should select prev after order change', function() {
- testSlideActive(0);
- var prev = elm.find('a.left');
- prev.click();
- testSlideActive(2);
- });
-
- it('should add slide in the specified position', function() {
- testSlideActive(0);
- scope.slides[2].id = 4;
- scope.slides.push({active:false,content:'four', id:2});
- scope.$apply();
- var contents = elm.find('div.item');
- expect(contents.length).toBe(4);
- expect(contents.eq(0).text()).toBe('two');
- expect(contents.eq(1).text()).toBe('four');
- expect(contents.eq(2).text()).toBe('one');
- expect(contents.eq(3).text()).toBe('three');
- });
-
- it('should remove slide after order change', function() {
- testSlideActive(0);
- scope.slides.splice(1, 1);
- scope.$apply();
- var contents = elm.find('div.item');
- expect(contents.length).toBe(2);
- expect(contents.eq(0).text()).toBe('three');
- expect(contents.eq(1).text()).toBe('one');
- });
-
- });
-
- });
-
- describe('controller', function() {
- var scope, ctrl;
- //create an array of slides and add to the scope
- var slides = [{'content':1},{'content':2},{'content':3},{'content':4}];
-
- beforeEach(function() {
- scope = $rootScope.$new();
- ctrl = $controller('UibCarouselController', {$scope: scope, $element: angular.element('<div></div>')});
- for(var i = 0;i < slides.length;i++){
- ctrl.addSlide(slides[i]);
- }
- });
-
- describe('addSlide', function() {
- it('should set first slide to active = true and the rest to false', function() {
- angular.forEach(ctrl.slides, function(slide, i) {
- if (i !== 0) {
- expect(slide.active).not.toBe(true);
- } else {
- expect(slide.active).toBe(true);
- }
- });
- });
-
- it('should add new slide and change active to true if active is true on the added slide', function() {
- var newSlide = {active: true};
- expect(ctrl.slides.length).toBe(4);
- ctrl.addSlide(newSlide);
- expect(ctrl.slides.length).toBe(5);
- expect(ctrl.slides[4].active).toBe(true);
- expect(ctrl.slides[0].active).toBe(false);
- });
-
- it('should add a new slide and not change the active slide', function() {
- var newSlide = {active: false};
- expect(ctrl.slides.length).toBe(4);
- ctrl.addSlide(newSlide);
- expect(ctrl.slides.length).toBe(5);
- expect(ctrl.slides[4].active).toBe(false);
- expect(ctrl.slides[0].active).toBe(true);
- });
-
- it('should remove slide and change active slide if needed', function() {
- expect(ctrl.slides.length).toBe(4);
- ctrl.removeSlide(ctrl.slides[0]);
- expect(ctrl.slides.length).toBe(3);
- expect(ctrl.currentSlide).toBe(ctrl.slides[0]);
- ctrl.select(ctrl.slides[2]);
- ctrl.removeSlide(ctrl.slides[2]);
- expect(ctrl.slides.length).toBe(2);
- expect(ctrl.currentSlide).toBe(ctrl.slides[1]);
- ctrl.removeSlide(ctrl.slides[0]);
- expect(ctrl.slides.length).toBe(1);
- expect(ctrl.currentSlide).toBe(ctrl.slides[0]);
- });
-
- it('issue 1414 - should not continue running timers after scope is destroyed', function() {
- spyOn(scope, 'next').and.callThrough();
- scope.interval = 2000;
- scope.$digest();
-
- $interval.flush(scope.interval);
- expect(scope.next.calls.count()).toBe(1);
-
- scope.$destroy();
-
- $interval.flush(scope.interval);
- expect(scope.next.calls.count()).toBe(1);
- });
- });
-
- it('should be exposed in the template', inject(function($templateCache) {
- $templateCache.put('template/carousel/carousel.html', '<div>{{carousel.text}}</div>');
-
- var scope = $rootScope.$new();
- var elm = $compile('<uib-carousel interval="bar" no-transition="false" no-pause="true"></uib-carousel>')(scope);
- $rootScope.$digest();
-
- var ctrl = elm.controller('uibCarousel');
-
- expect(ctrl).toBeDefined();
-
- ctrl.text = 'foo';
- $rootScope.$digest();
-
- expect(elm.html()).toBe('foo');
- }));
- });
-
- it('should expose a custom model in the carousel slide', function() {
- var scope = $rootScope.$new();
- scope.slides = [
- {active:false,content:'one'},
- {active:false,content:'two'},
- {active:false,content:'three'}
- ];
- var elm = $compile(
- '<uib-carousel interval="interval" no-transition="true" no-pause="nopause">' +
- '<uib-slide ng-repeat="slide in slides" active="slide.active" actual="slide">' +
- '{{slide.content}}' +
- '</uib-slide>' +
- '</uib-carousel>'
- )(scope);
- $rootScope.$digest();
-
- var ctrl = elm.controller('uibCarousel');
-
- expect(angular.equals(ctrl.slides.map(function(slide) {
- return slide.actual;
- }), scope.slides)).toBe(true);
- });
-});
-
-describe('carousel deprecation', function() {
- beforeEach(module('ui.bootstrap.carousel'));
- beforeEach(module('template/carousel/carousel.html', 'template/carousel/slide.html'));
-
- it('should suppress warning', function() {
- module(function($provide) {
- $provide.value('$carouselSuppressWarning', true);
- });
-
- inject(function($compile, $log, $rootScope) {
- spyOn($log, 'warn');
-
- var element = '<carousel interval="interval" no-transition="true" no-pause="nopause">' +
- '<slide ng-repeat="slide in slides" active="slide.active">' +
- '{{slide.content}}' +
- '</slide>' +
- '</carousel>';
- element = $compile(element)($rootScope);
- $rootScope.$digest();
- expect($log.warn.calls.count()).toBe(0);
- });
- });
-
- it('should give warning by default', inject(function($compile, $log, $rootScope) {
- spyOn($log, 'warn');
-
- var element = '<carousel interval="interval" no-transition="true" no-pause="nopause">' +
- '<slide ng-repeat="slide in slides" active="slide.active">' +
- '{{slide.content}}' +
- '</slide>' +
- '</carousel>';
- element = $compile(element)($rootScope);
- $rootScope.$digest();
-
- expect($log.warn.calls.count()).toBe(2);
- expect($log.warn.calls.argsFor(0)).toEqual(['CarouselController is now deprecated. Use UibCarouselController instead.']);
- expect($log.warn.calls.argsFor(1)).toEqual(['carousel is now deprecated. Use uib-carousel instead.']);
- }));
-
- it('should give warning by default for slider', inject(function($compile, $log, $rootScope) {
- spyOn($log, 'warn');
-
- var element = '<carousel interval="interval" no-transition="true" no-pause="nopause">' +
- '<slide></slide>' +
- '</carousel>';
- element = $compile(element)($rootScope);
- $rootScope.$digest();
-
- expect($log.warn.calls.count()).toBe(3);
- expect($log.warn.calls.argsFor(0)).toEqual(['CarouselController is now deprecated. Use UibCarouselController instead.']);
- expect($log.warn.calls.argsFor(1)).toEqual(['slide is now deprecated. Use uib-slide instead.']);
- expect($log.warn.calls.argsFor(2)).toEqual(['carousel is now deprecated. Use uib-carousel instead.']);
- }));
-});
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/collapse/collapse.js b/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/collapse/collapse.js
deleted file mode 100644
index c01e647..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/collapse/collapse.js
+++ /dev/null
@@ -1,159 +0,0 @@
-angular.module('ui.bootstrap.collapse', [])
-
- .directive('uibCollapse', ['$animate', '$injector', function($animate, $injector) {
- var $animateCss = $injector.has('$animateCss') ? $injector.get('$animateCss') : null;
- return {
- link: function(scope, element, attrs) {
- function expand() {
- element.removeClass('collapse')
- .addClass('collapsing')
- .attr('aria-expanded', true)
- .attr('aria-hidden', false);
-
- if ($animateCss) {
- $animateCss(element, {
- addClass: 'in',
- easing: 'ease',
- to: { height: element[0].scrollHeight + 'px' }
- }).start().finally(expandDone);
- } else {
- $animate.addClass(element, 'in', {
- to: { height: element[0].scrollHeight + 'px' }
- }).then(expandDone);
- }
- }
-
- function expandDone() {
- element.removeClass('collapsing')
- .addClass('collapse')
- .css({height: 'auto'});
- }
-
- function collapse() {
- if (!element.hasClass('collapse') && !element.hasClass('in')) {
- return collapseDone();
- }
-
- element
- // IMPORTANT: The height must be set before adding "collapsing" class.
- // Otherwise, the browser attempts to animate from height 0 (in
- // collapsing class) to the given height here.
- .css({height: element[0].scrollHeight + 'px'})
- // initially all panel collapse have the collapse class, this removal
- // prevents the animation from jumping to collapsed state
- .removeClass('collapse')
- .addClass('collapsing')
- .attr('aria-expanded', false)
- .attr('aria-hidden', true);
-
- if ($animateCss) {
- $animateCss(element, {
- removeClass: 'in',
- to: {height: '0'}
- }).start().finally(collapseDone);
- } else {
- $animate.removeClass(element, 'in', {
- to: {height: '0'}
- }).then(collapseDone);
- }
- }
-
- function collapseDone() {
- element.css({height: '0'}); // Required so that collapse works when animation is disabled
- element.removeClass('collapsing')
- .addClass('collapse');
- }
-
- scope.$watch(attrs.uibCollapse, function(shouldCollapse) {
- if (shouldCollapse) {
- collapse();
- } else {
- expand();
- }
- });
- }
- };
- }]);
-
-/* Deprecated collapse below */
-
-angular.module('ui.bootstrap.collapse')
-
- .value('$collapseSuppressWarning', false)
-
- .directive('collapse', ['$animate', '$injector', '$log', '$collapseSuppressWarning', function($animate, $injector, $log, $collapseSuppressWarning) {
- var $animateCss = $injector.has('$animateCss') ? $injector.get('$animateCss') : null;
- return {
- link: function(scope, element, attrs) {
- if (!$collapseSuppressWarning) {
- $log.warn('collapse is now deprecated. Use uib-collapse instead.');
- }
-
- function expand() {
- element.removeClass('collapse')
- .addClass('collapsing')
- .attr('aria-expanded', true)
- .attr('aria-hidden', false);
-
- if ($animateCss) {
- $animateCss(element, {
- easing: 'ease',
- to: { height: element[0].scrollHeight + 'px' }
- }).start().done(expandDone);
- } else {
- $animate.animate(element, {}, {
- height: element[0].scrollHeight + 'px'
- }).then(expandDone);
- }
- }
-
- function expandDone() {
- element.removeClass('collapsing')
- .addClass('collapse in')
- .css({height: 'auto'});
- }
-
- function collapse() {
- if (!element.hasClass('collapse') && !element.hasClass('in')) {
- return collapseDone();
- }
-
- element
- // IMPORTANT: The height must be set before adding "collapsing" class.
- // Otherwise, the browser attempts to animate from height 0 (in
- // collapsing class) to the given height here.
- .css({height: element[0].scrollHeight + 'px'})
- // initially all panel collapse have the collapse class, this removal
- // prevents the animation from jumping to collapsed state
- .removeClass('collapse in')
- .addClass('collapsing')
- .attr('aria-expanded', false)
- .attr('aria-hidden', true);
-
- if ($animateCss) {
- $animateCss(element, {
- to: {height: '0'}
- }).start().done(collapseDone);
- } else {
- $animate.animate(element, {}, {
- height: '0'
- }).then(collapseDone);
- }
- }
-
- function collapseDone() {
- element.css({height: '0'}); // Required so that collapse works when animation is disabled
- element.removeClass('collapsing')
- .addClass('collapse');
- }
-
- scope.$watch(attrs.collapse, function(shouldCollapse) {
- if (shouldCollapse) {
- collapse();
- } else {
- expand();
- }
- });
- }
- };
- }]);
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/collapse/docs/demo.html b/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/collapse/docs/demo.html
deleted file mode 100644
index 462bda3..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/collapse/docs/demo.html
+++ /dev/null
@@ -1,7 +0,0 @@
-<div ng-controller="CollapseDemoCtrl">
- <button type="button" class="btn btn-default" ng-click="isCollapsed = !isCollapsed">Toggle collapse</button>
- <hr>
- <div uib-collapse="isCollapsed">
- <div class="well well-lg">Some content</div>
- </div>
-</div>
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/collapse/docs/demo.js b/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/collapse/docs/demo.js
deleted file mode 100644
index 897eeca..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/collapse/docs/demo.js
+++ /dev/null
@@ -1,3 +0,0 @@
-angular.module('ui.bootstrap.demo').controller('CollapseDemoCtrl', function ($scope) {
- $scope.isCollapsed = false;
-});
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/collapse/docs/readme.md b/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/collapse/docs/readme.md
deleted file mode 100644
index b2bd63c..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/collapse/docs/readme.md
+++ /dev/null
@@ -1,8 +0,0 @@
-**uib-collapse** provides a simple way to hide and show an element with a css transition
-
-### uib-collapse settings
-
-* `uib-collapse`
- <i class="glyphicon glyphicon-eye-open"></i>
- _(Default: `false`)_ -
- Whether the element should be collapsed or not.
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/collapse/test/collapse.spec.js b/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/collapse/test/collapse.spec.js
deleted file mode 100644
index 5083904..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/collapse/test/collapse.spec.js
+++ /dev/null
@@ -1,165 +0,0 @@
-describe('collapse directive', function() {
- var element, scope, $compile, $animate;
-
- beforeEach(module('ui.bootstrap.collapse'));
- beforeEach(module('ngAnimateMock'));
- beforeEach(inject(function(_$rootScope_, _$compile_, _$animate_) {
- scope = _$rootScope_;
- $compile = _$compile_;
- $animate = _$animate_;
- }));
-
- beforeEach(function() {
- element = $compile('<div uib-collapse="isCollapsed">Some Content</div>')(scope);
- angular.element(document.body).append(element);
- });
-
- afterEach(function() {
- element.remove();
- });
-
- it('should be hidden on initialization if isCollapsed = true', function() {
- scope.isCollapsed = true;
- scope.$digest();
- expect(element.height()).toBe(0);
- });
-
- it('should collapse if isCollapsed = true on subsequent use', function() {
- scope.isCollapsed = false;
- scope.$digest();
- $animate.flush();
- scope.isCollapsed = true;
- scope.$digest();
- $animate.flush();
- expect(element.height()).toBe(0);
- });
-
- it('should be shown on initialization if isCollapsed = false', function() {
- scope.isCollapsed = false;
- scope.$digest();
- $animate.flush();
- expect(element.height()).not.toBe(0);
- });
-
- it('should expand if isCollapsed = false on subsequent use', function() {
- scope.isCollapsed = false;
- scope.$digest();
- $animate.flush();
- scope.isCollapsed = true;
- scope.$digest();
- $animate.flush();
- scope.isCollapsed = false;
- scope.$digest();
- $animate.flush();
- expect(element.height()).not.toBe(0);
- });
-
- it('should expand if isCollapsed = true on subsequent uses', function() {
- scope.isCollapsed = false;
- scope.$digest();
- $animate.flush();
- scope.isCollapsed = true;
- scope.$digest();
- $animate.flush();
- scope.isCollapsed = false;
- scope.$digest();
- $animate.flush();
- scope.isCollapsed = true;
- scope.$digest();
- $animate.flush();
- expect(element.height()).toBe(0);
- });
-
- it('should change aria-expanded attribute', function() {
- scope.isCollapsed = false;
- scope.$digest();
- $animate.flush();
- expect(element.attr('aria-expanded')).toBe('true');
-
- scope.isCollapsed = true;
- scope.$digest();
- $animate.flush();
- expect(element.attr('aria-expanded')).toBe('false');
- });
-
- it('should change aria-hidden attribute', function() {
- scope.isCollapsed = false;
- scope.$digest();
- $animate.flush();
- expect(element.attr('aria-hidden')).toBe('false');
-
- scope.isCollapsed = true;
- scope.$digest();
- $animate.flush();
- expect(element.attr('aria-hidden')).toBe('true');
- });
-
- describe('dynamic content', function() {
- var element;
-
- beforeEach(function() {
- element = angular.element('<div uib-collapse="isCollapsed"><p>Initial content</p><div ng-show="exp">Additional content</div></div>');
- $compile(element)(scope);
- angular.element(document.body).append(element);
- });
-
- afterEach(function() {
- element.remove();
- });
-
- it('should grow accordingly when content size inside collapse increases', function() {
- scope.exp = false;
- scope.isCollapsed = false;
- scope.$digest();
- $animate.flush();
- var collapseHeight = element.height();
- scope.exp = true;
- scope.$digest();
- expect(element.height()).toBeGreaterThan(collapseHeight);
- });
-
- it('should shrink accordingly when content size inside collapse decreases', function() {
- scope.exp = true;
- scope.isCollapsed = false;
- scope.$digest();
- $animate.flush();
- var collapseHeight = element.height();
- scope.exp = false;
- scope.$digest();
- expect(element.height()).toBeLessThan(collapseHeight);
- });
- });
-});
-
-/* Deprecation tests below */
-
-describe('collapse deprecation', function() {
- beforeEach(module('ui.bootstrap.collapse'));
- beforeEach(module('ngAnimateMock'));
-
- it('should suppress warning', function() {
- module(function($provide) {
- $provide.value('$collapseSuppressWarning', true);
- });
-
- inject(function($compile, $log, $rootScope) {
- spyOn($log, 'warn');
-
- var element = $compile('<div collapse="isCollapsed">Some Content</div>')($rootScope);
- $rootScope.$digest();
-
- expect($log.warn.calls.count()).toBe(0);
- });
- });
-
- it('should give warning by default', inject(function($compile, $log, $rootScope) {
- spyOn($log, 'warn');
-
- var element = $compile('<div collapse="isCollapsed">Some Content</div>')($rootScope);
- $rootScope.$digest();
-
- expect($log.warn.calls.count()).toBe(1);
- expect($log.warn.calls.argsFor(0)).toEqual(['collapse is now deprecated. Use uib-collapse instead.']);
-
- }));
-});
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/dateparser/dateparser.js b/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/dateparser/dateparser.js
deleted file mode 100644
index 0b4249f..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/dateparser/dateparser.js
+++ /dev/null
@@ -1,233 +0,0 @@
-angular.module('ui.bootstrap.dateparser', [])
-
-.service('uibDateParser', ['$log', '$locale', 'orderByFilter', function($log, $locale, orderByFilter) {
- // Pulled from https://github.com/mbostock/d3/blob/master/src/format/requote.js
- var SPECIAL_CHARACTERS_REGEXP = /[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g;
-
- var localeId;
- var formatCodeToRegex;
-
- this.init = function() {
- localeId = $locale.id;
-
- this.parsers = {};
-
- formatCodeToRegex = {
- 'yyyy': {
- regex: '\\d{4}',
- apply: function(value) { this.year = +value; }
- },
- 'yy': {
- regex: '\\d{2}',
- apply: function(value) { this.year = +value + 2000; }
- },
- 'y': {
- regex: '\\d{1,4}',
- apply: function(value) { this.year = +value; }
- },
- 'MMMM': {
- regex: $locale.DATETIME_FORMATS.MONTH.join('|'),
- apply: function(value) { this.month = $locale.DATETIME_FORMATS.MONTH.indexOf(value); }
- },
- 'MMM': {
- regex: $locale.DATETIME_FORMATS.SHORTMONTH.join('|'),
- apply: function(value) { this.month = $locale.DATETIME_FORMATS.SHORTMONTH.indexOf(value); }
- },
- 'MM': {
- regex: '0[1-9]|1[0-2]',
- apply: function(value) { this.month = value - 1; }
- },
- 'M': {
- regex: '[1-9]|1[0-2]',
- apply: function(value) { this.month = value - 1; }
- },
- 'dd': {
- regex: '[0-2][0-9]{1}|3[0-1]{1}',
- apply: function(value) { this.date = +value; }
- },
- 'd': {
- regex: '[1-2]?[0-9]{1}|3[0-1]{1}',
- apply: function(value) { this.date = +value; }
- },
- 'EEEE': {
- regex: $locale.DATETIME_FORMATS.DAY.join('|')
- },
- 'EEE': {
- regex: $locale.DATETIME_FORMATS.SHORTDAY.join('|')
- },
- 'HH': {
- regex: '(?:0|1)[0-9]|2[0-3]',
- apply: function(value) { this.hours = +value; }
- },
- 'hh': {
- regex: '0[0-9]|1[0-2]',
- apply: function(value) { this.hours = +value; }
- },
- 'H': {
- regex: '1?[0-9]|2[0-3]',
- apply: function(value) { this.hours = +value; }
- },
- 'h': {
- regex: '[0-9]|1[0-2]',
- apply: function(value) { this.hours = +value; }
- },
- 'mm': {
- regex: '[0-5][0-9]',
- apply: function(value) { this.minutes = +value; }
- },
- 'm': {
- regex: '[0-9]|[1-5][0-9]',
- apply: function(value) { this.minutes = +value; }
- },
- 'sss': {
- regex: '[0-9][0-9][0-9]',
- apply: function(value) { this.milliseconds = +value; }
- },
- 'ss': {
- regex: '[0-5][0-9]',
- apply: function(value) { this.seconds = +value; }
- },
- 's': {
- regex: '[0-9]|[1-5][0-9]',
- apply: function(value) { this.seconds = +value; }
- },
- 'a': {
- regex: $locale.DATETIME_FORMATS.AMPMS.join('|'),
- apply: function(value) {
- if (this.hours === 12) {
- this.hours = 0;
- }
-
- if (value === 'PM') {
- this.hours += 12;
- }
- }
- }
- };
- };
-
- this.init();
-
- function createParser(format) {
- var map = [], regex = format.split('');
-
- angular.forEach(formatCodeToRegex, function(data, code) {
- var index = format.indexOf(code);
-
- if (index > -1) {
- format = format.split('');
-
- regex[index] = '(' + data.regex + ')';
- format[index] = '$'; // Custom symbol to define consumed part of format
- for (var i = index + 1, n = index + code.length; i < n; i++) {
- regex[i] = '';
- format[i] = '$';
- }
- format = format.join('');
-
- map.push({ index: index, apply: data.apply });
- }
- });
-
- return {
- regex: new RegExp('^' + regex.join('') + '$'),
- map: orderByFilter(map, 'index')
- };
- }
-
- this.parse = function(input, format, baseDate) {
- if (!angular.isString(input) || !format) {
- return input;
- }
-
- format = $locale.DATETIME_FORMATS[format] || format;
- format = format.replace(SPECIAL_CHARACTERS_REGEXP, '\\$&');
-
- if ($locale.id !== localeId) {
- this.init();
- }
-
- if (!this.parsers[format]) {
- this.parsers[format] = createParser(format);
- }
-
- var parser = this.parsers[format],
- regex = parser.regex,
- map = parser.map,
- results = input.match(regex);
-
- if (results && results.length) {
- var fields, dt;
- if (angular.isDate(baseDate) && !isNaN(baseDate.getTime())) {
- fields = {
- year: baseDate.getFullYear(),
- month: baseDate.getMonth(),
- date: baseDate.getDate(),
- hours: baseDate.getHours(),
- minutes: baseDate.getMinutes(),
- seconds: baseDate.getSeconds(),
- milliseconds: baseDate.getMilliseconds()
- };
- } else {
- if (baseDate) {
- $log.warn('dateparser:', 'baseDate is not a valid date');
- }
- fields = { year: 1900, month: 0, date: 1, hours: 0, minutes: 0, seconds: 0, milliseconds: 0 };
- }
-
- for (var i = 1, n = results.length; i < n; i++) {
- var mapper = map[i-1];
- if (mapper.apply) {
- mapper.apply.call(fields, results[i]);
- }
- }
-
- if (isValid(fields.year, fields.month, fields.date)) {
- if (angular.isDate(baseDate) && !isNaN(baseDate.getTime())) {
- dt = new Date(baseDate);
- dt.setFullYear(fields.year, fields.month, fields.date,
- fields.hours, fields.minutes, fields.seconds,
- fields.milliseconds || 0);
- } else {
- dt = new Date(fields.year, fields.month, fields.date,
- fields.hours, fields.minutes, fields.seconds,
- fields.milliseconds || 0);
- }
- }
-
- return dt;
- }
- };
-
- // Check if date is valid for specific month (and year for February).
- // Month: 0 = Jan, 1 = Feb, etc
- function isValid(year, month, date) {
- if (date < 1) {
- return false;
- }
-
- if (month === 1 && date > 28) {
- return date === 29 && ((year % 4 === 0 && year % 100 !== 0) || year % 400 === 0);
- }
-
- if (month === 3 || month === 5 || month === 8 || month === 10) {
- return date < 31;
- }
-
- return true;
- }
-}]);
-
-/* Deprecated dateparser below */
-
-angular.module('ui.bootstrap.dateparser')
-
-.value('$dateParserSuppressWarning', false)
-
-.service('dateParser', ['$log', '$dateParserSuppressWarning', 'uibDateParser', function($log, $dateParserSuppressWarning, uibDateParser) {
- if (!$dateParserSuppressWarning) {
- $log.warn('dateParser is now deprecated. Use uibDateParser instead.');
- }
-
- angular.extend(this, uibDateParser);
-}]);
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/dateparser/test/dateparser.spec.js b/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/dateparser/test/dateparser.spec.js
deleted file mode 100644
index fb8897c..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/dateparser/test/dateparser.spec.js
+++ /dev/null
@@ -1,257 +0,0 @@
-describe('date parser', function() {
- var dateParser;
-
- beforeEach(module('ui.bootstrap.dateparser'));
- beforeEach(inject(function (uibDateParser) {
- dateParser = uibDateParser;
- }));
-
- function expectParse(input, format, date) {
- expect(dateParser.parse(input, format)).toEqual(date);
- }
-
- describe('with custom formats', function() {
- it('should work correctly for `dd`, `MM`, `yyyy`', function() {
- expectParse('17.11.2013', 'dd.MM.yyyy', new Date(2013, 10, 17, 0));
- expectParse('31.12.2013', 'dd.MM.yyyy', new Date(2013, 11, 31, 0));
- expectParse('08-03-1991', 'dd-MM-yyyy', new Date(1991, 2, 8, 0));
- expectParse('03/05/1980', 'MM/dd/yyyy', new Date(1980, 2, 5, 0));
- expectParse('10.01/1983', 'dd.MM/yyyy', new Date(1983, 0, 10, 0));
- expectParse('11-09-1980', 'MM-dd-yyyy', new Date(1980, 10, 9, 0));
- expectParse('2011/02/05', 'yyyy/MM/dd', new Date(2011, 1, 5, 0));
- });
-
- it('should work correctly for `yy`', function() {
- expectParse('17.11.13', 'dd.MM.yy', new Date(2013, 10, 17, 0));
- expectParse('02-05-11', 'dd-MM-yy', new Date(2011, 4, 2, 0));
- expectParse('02/05/80', 'MM/dd/yy', new Date(2080, 1, 5, 0));
- expectParse('55/02/05', 'yy/MM/dd', new Date(2055, 1, 5, 0));
- expectParse('11-08-13', 'dd-MM-yy', new Date(2013, 7, 11, 0));
- });
-
- it('should work correctly for `M`', function() {
- expectParse('8/11/2013', 'M/dd/yyyy', new Date(2013, 7, 11, 0));
- expectParse('07.11.05', 'dd.M.yy', new Date(2005, 10, 7, 0));
- expectParse('02-5-11', 'dd-M-yy', new Date(2011, 4, 2, 0));
- expectParse('2/05/1980', 'M/dd/yyyy', new Date(1980, 1, 5, 0));
- expectParse('1955/2/05', 'yyyy/M/dd', new Date(1955, 1, 5, 0));
- expectParse('02-5-11', 'dd-M-yy', new Date(2011, 4, 2, 0));
- });
-
- it('should work correctly for `MMM`', function() {
- expectParse('30.Sep.10', 'dd.MMM.yy', new Date(2010, 8, 30, 0));
- expectParse('02-May-11', 'dd-MMM-yy', new Date(2011, 4, 2, 0));
- expectParse('Feb/05/1980', 'MMM/dd/yyyy', new Date(1980, 1, 5, 0));
- expectParse('1955/Feb/05', 'yyyy/MMM/dd', new Date(1955, 1, 5, 0));
- });
-
- it('should work correctly for `MMMM`', function() {
- expectParse('17.November.13', 'dd.MMMM.yy', new Date(2013, 10, 17, 0));
- expectParse('05-March-1980', 'dd-MMMM-yyyy', new Date(1980, 2, 5, 0));
- expectParse('February/05/1980', 'MMMM/dd/yyyy', new Date(1980, 1, 5, 0));
- expectParse('1949/December/20', 'yyyy/MMMM/dd', new Date(1949, 11, 20, 0));
- });
-
- it('should work correctly for `d`', function() {
- expectParse('17.November.13', 'd.MMMM.yy', new Date(2013, 10, 17, 0));
- expectParse('8-March-1991', 'd-MMMM-yyyy', new Date(1991, 2, 8, 0));
- expectParse('February/5/1980', 'MMMM/d/yyyy', new Date(1980, 1, 5, 0));
- expectParse('1955/February/5', 'yyyy/MMMM/d', new Date(1955, 1, 5, 0));
- expectParse('11-08-13', 'd-MM-yy', new Date(2013, 7, 11, 0));
- });
-
- it('should work correctly for `HH`', function() {
- expectParse('22.March.15.22', 'd.MMMM.yy.HH', new Date(2015, 2, 22, 22));
- expectParse('8-March-1991-11', 'd-MMMM-yyyy-HH', new Date(1991, 2, 8, 11));
- expectParse('February/5/1980/00', 'MMMM/d/yyyy/HH', new Date(1980, 1, 5, 0));
- expectParse('1955/February/5 03', 'yyyy/MMMM/d HH', new Date(1955, 1, 5, 3));
- expectParse('11-08-13 23', 'd-MM-yy HH', new Date(2013, 7, 11, 23));
- });
-
- it('should work correctly for `hh`', function() {
- expectParse('22.March.15.22', 'd.MMMM.yy.hh', undefined);
- expectParse('22.March.15.12', 'd.MMMM.yy.hh', new Date(2015, 2, 22, 12));
- expectParse('8-March-1991-11', 'd-MMMM-yyyy-hh', new Date(1991, 2, 8, 11));
- expectParse('February/5/1980/00', 'MMMM/d/yyyy/hh', new Date(1980, 1, 5, 0));
- expectParse('1955/February/5 03', 'yyyy/MMMM/d hh', new Date(1955, 1, 5, 3));
- expectParse('11-08-13 23', 'd-MM-yy hh', undefined);
- expectParse('11-08-13 09', 'd-MM-yy hh', new Date(2013, 7, 11, 9));
- });
-
- it('should work correctly for `H`', function() {
- expectParse('22.March.15.22', 'd.MMMM.yy.H', new Date(2015, 2, 22, 22));
- expectParse('8-March-1991-11', 'd-MMMM-yyyy-H', new Date(1991, 2, 8, 11));
- expectParse('February/5/1980/0', 'MMMM/d/yyyy/H', new Date(1980, 1, 5, 0));
- expectParse('1955/February/5 3', 'yyyy/MMMM/d H', new Date(1955, 1, 5, 3));
- expectParse('11-08-13 23', 'd-MM-yy H', new Date(2013, 7, 11, 23));
- });
-
- it('should work correctly for `h`', function() {
- expectParse('22.March.15.12', 'd.MMMM.yy.h', new Date(2015, 2, 22, 12));
- expectParse('8-March-1991-11', 'd-MMMM-yyyy-h', new Date(1991, 2, 8, 11));
- expectParse('February/5/1980/0', 'MMMM/d/yyyy/h', new Date(1980, 1, 5, 0));
- expectParse('1955/February/5 3', 'yyyy/MMMM/d h', new Date(1955, 1, 5, 3));
- expectParse('11-08-13 3', 'd-MM-yy h', new Date(2013, 7, 11, 3));
- });
-
- it('should work correctly for `mm`', function() {
- expectParse('22.March.15.22', 'd.MMMM.yy.mm', new Date(2015, 2, 22, 0, 22));
- expectParse('8-March-1991-59', 'd-MMMM-yyyy-mm', new Date(1991, 2, 8, 0, 59));
- expectParse('February/5/1980/00', 'MMMM/d/yyyy/mm', new Date(1980, 1, 5, 0, 0));
- expectParse('1955/February/5 03', 'yyyy/MMMM/d mm', new Date(1955, 1, 5, 0, 3));
- expectParse('11-08-13 46', 'd-MM-yy mm', new Date(2013, 7, 11, 0, 46));
- expectParse('22.March.15.22:33', 'd.MMMM.yy.HH:mm', new Date(2015, 2, 22, 22, 33));
- expectParse('22.March.15.2:01', 'd.MMMM.yy.H:mm', new Date(2015, 2, 22, 2, 1));
- });
-
- it('should work correctly for `m`', function() {
- expectParse('22.March.15.22', 'd.MMMM.yy.m', new Date(2015, 2, 22, 0, 22));
- expectParse('8-March-1991-59', 'd-MMMM-yyyy-m', new Date(1991, 2, 8, 0, 59));
- expectParse('February/5/1980/0', 'MMMM/d/yyyy/m', new Date(1980, 1, 5, 0, 0));
- expectParse('1955/February/5 3', 'yyyy/MMMM/d m', new Date(1955, 1, 5, 0, 3));
- expectParse('11-08-13 46', 'd-MM-yy m', new Date(2013, 7, 11, 0, 46));
- expectParse('22.March.15.22:3', 'd.MMMM.yy.HH:m', new Date(2015, 2, 22, 22, 3));
- expectParse('22.March.15.2:1', 'd.MMMM.yy.H:m', new Date(2015, 2, 22, 2, 1));
- });
-
- it('should work correctly for `sss`', function() {
- expectParse('22.March.15.123', 'd.MMMM.yy.sss', new Date(2015, 2, 22, 0, 0, 0, 123));
- expectParse('8-March-1991-059', 'd-MMMM-yyyy-sss', new Date(1991, 2, 8, 0, 0, 0, 59));
- expectParse('February/5/1980/000', 'MMMM/d/yyyy/sss', new Date(1980, 1, 5, 0, 0, 0));
- expectParse('1955/February/5 003', 'yyyy/MMMM/d sss', new Date(1955, 1, 5, 0, 0, 0, 3));
- expectParse('11-08-13 046', 'd-MM-yy sss', new Date(2013, 7, 11, 0, 0, 0, 46));
- expectParse('22.March.15.22:33:044', 'd.MMMM.yy.HH:mm:sss', new Date(2015, 2, 22, 22, 33, 0, 44));
- expectParse('22.March.15.0:0:001', 'd.MMMM.yy.H:m:sss', new Date(2015, 2, 22, 0, 0, 0, 1));
- });
-
- it('should work correctly for `ss`', function() {
- expectParse('22.March.15.22', 'd.MMMM.yy.ss', new Date(2015, 2, 22, 0, 0, 22));
- expectParse('8-March-1991-59', 'd-MMMM-yyyy-ss', new Date(1991, 2, 8, 0, 0, 59));
- expectParse('February/5/1980/00', 'MMMM/d/yyyy/ss', new Date(1980, 1, 5, 0, 0, 0));
- expectParse('1955/February/5 03', 'yyyy/MMMM/d ss', new Date(1955, 1, 5, 0, 0, 3));
- expectParse('11-08-13 46', 'd-MM-yy ss', new Date(2013, 7, 11, 0, 0, 46));
- expectParse('22.March.15.22:33:44', 'd.MMMM.yy.HH:mm:ss', new Date(2015, 2, 22, 22, 33, 44));
- expectParse('22.March.15.0:0:01', 'd.MMMM.yy.H:m:ss', new Date(2015, 2, 22, 0, 0, 1));
- });
-
- it('should work correctly for `s`', function() {
- expectParse('22.March.15.22', 'd.MMMM.yy.s', new Date(2015, 2, 22, 0, 0, 22));
- expectParse('8-March-1991-59', 'd-MMMM-yyyy-s', new Date(1991, 2, 8, 0, 0, 59));
- expectParse('February/5/1980/0', 'MMMM/d/yyyy/s', new Date(1980, 1, 5, 0, 0, 0));
- expectParse('1955/February/5 3', 'yyyy/MMMM/d s', new Date(1955, 1, 5, 0, 0, 3));
- expectParse('11-08-13 46', 'd-MM-yy s', new Date(2013, 7, 11, 0, 0, 46));
- expectParse('22.March.15.22:33:4', 'd.MMMM.yy.HH:mm:s', new Date(2015, 2, 22, 22, 33, 4));
- expectParse('22.March.15.22:3:4', 'd.MMMM.yy.HH:m:s', new Date(2015, 2, 22, 22, 3, 4));
- });
-
- it('should work correctly for `a`', function() {
- expectParse('22.March.15.10AM', 'd.MMMM.yy.hha', new Date(2015, 2, 22, 10));
- expectParse('22.March.15.10PM', 'd.MMMM.yy.hha', new Date(2015, 2, 22, 22));
- expectParse('8-March-1991-11AM', 'd-MMMM-yyyy-hha', new Date(1991, 2, 8, 11));
- expectParse('8-March-1991-11PM', 'd-MMMM-yyyy-hha', new Date(1991, 2, 8, 23));
- expectParse('February/5/1980/12AM', 'MMMM/d/yyyy/hha', new Date(1980, 1, 5, 0));
- expectParse('February/5/1980/12PM', 'MMMM/d/yyyy/hha', new Date(1980, 1, 5, 12));
- expectParse('1955/February/5 03AM', 'yyyy/MMMM/d hha', new Date(1955, 1, 5, 3));
- expectParse('1955/February/5 03PM', 'yyyy/MMMM/d hha', new Date(1955, 1, 5, 15));
- expectParse('11-08-13 09AM', 'd-MM-yy hha', new Date(2013, 7, 11, 9));
- expectParse('11-08-13 09PM', 'd-MM-yy hha', new Date(2013, 7, 11, 21));
- });
- });
-
- describe('with predefined formats', function() {
- it('should work correctly for `shortDate`', function() {
- expectParse('9/3/10', 'shortDate', new Date(2010, 8, 3, 0));
- });
-
- it('should work correctly for `mediumDate`', function() {
- expectParse('Sep 3, 2010', 'mediumDate', new Date(2010, 8, 3, 0));
- });
-
- it('should work correctly for `longDate`', function() {
- expectParse('September 3, 2010', 'longDate', new Date(2010, 8, 3, 0));
- });
-
- it('should work correctly for `fullDate`', function() {
- expectParse('Friday, September 3, 2010', 'fullDate', new Date(2010, 8, 3, 0));
- });
- });
-
- describe('with edge case', function() {
- it('should not work for invalid number of days in February', function() {
- expect(dateParser.parse('29.02.2013', 'dd.MM.yyyy')).toBeUndefined();
- });
-
- it('should not work for 0 number of days', function() {
- expect(dateParser.parse('00.02.2013', 'dd.MM.yyyy')).toBeUndefined();
- });
-
- it('should work for 29 days in February for leap years', function() {
- expectParse('29.02.2000', 'dd.MM.yyyy', new Date(2000, 1, 29, 0));
- });
-
- it('should not work for 31 days for some months', function() {
- expect(dateParser.parse('31-04-2013', 'dd-MM-yyyy')).toBeUndefined();
- expect(dateParser.parse('November 31, 2013', 'MMMM d, yyyy')).toBeUndefined();
- });
-
- it('should work when base date is a string', function() {
- expect(dateParser.parse('01-02-2034', 'dd-MM-yyyy', '05-06-2078')).toEqual(new Date(2034, 1, 1));
- });
-
- it('should work when base date is an invalid date', function() {
- expect(dateParser.parse('30-12-2015', 'dd-MM-yyyy', new Date('foo'))).toEqual(new Date(2015, 11, 30));
- });
- });
-
- it('should not parse non-string inputs', function() {
- expect(dateParser.parse(123456, 'dd.MM.yyyy')).toBe(123456);
- var date = new Date();
- expect(dateParser.parse(date, 'dd.MM.yyyy')).toBe(date);
- });
-
- it('should not parse if no format is specified', function() {
- expect(dateParser.parse('21.08.1951', '')).toBe('21.08.1951');
- });
-
- it('should reinitialize when locale changes', inject(function($locale) {
- spyOn(dateParser, 'init').and.callThrough();
- expect($locale.id).toBe('en-us');
-
- $locale.id = 'en-uk';
-
- dateParser.parse('22.March.15.22', 'd.MMMM.yy.s');
-
- expect(dateParser.init).toHaveBeenCalled();
- }));
-});
-
-/* Deprecation tests below */
-
-describe('date parser deprecation', function() {
- beforeEach(module('ui.bootstrap.dateparser'));
-
- it('should suppress warning', function() {
- module(function($provide) {
- $provide.value('$dateParserSuppressWarning', true);
- });
-
- inject(function($log, dateParser) {
- spyOn($log, 'warn');
-
- dateParser.parse('01.10.2015', 'dd.MM.yyyy');
-
- expect($log.warn.calls.count()).toBe(0);
- });
- });
-
- it('should give warning by default', inject(function($log) {
- spyOn($log, 'warn');
-
- inject(function(dateParser) {
- dateParser.parse('01.10.2015', 'dd.MM.yyyy');
-
- expect($log.warn.calls.count()).toBe(1);
- expect($log.warn.calls.argsFor(0)).toEqual(['dateParser is now deprecated. Use uibDateParser instead.']);
- });
- }));
-});
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/datepicker/datepicker.js b/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/datepicker/datepicker.js
deleted file mode 100644
index 7cf8759..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/datepicker/datepicker.js
+++ /dev/null
@@ -1,1186 +0,0 @@
-angular.module('ui.bootstrap.datepicker', ['ui.bootstrap.dateparser', 'ui.bootstrap.position'])
-
-.value('$datepickerSuppressError', false)
-
-.constant('uibDatepickerConfig', {
- formatDay: 'dd',
- formatMonth: 'MMMM',
- formatYear: 'yyyy',
- formatDayHeader: 'EEE',
- formatDayTitle: 'MMMM yyyy',
- formatMonthTitle: 'yyyy',
- datepickerMode: 'day',
- minMode: 'day',
- maxMode: 'year',
- showWeeks: true,
- startingDay: 0,
- yearRange: 20,
- minDate: null,
- maxDate: null,
- shortcutPropagation: false
-})
-
-.controller('UibDatepickerController', ['$scope', '$attrs', '$parse', '$interpolate', '$log', 'dateFilter', 'uibDatepickerConfig', '$datepickerSuppressError', function($scope, $attrs, $parse, $interpolate, $log, dateFilter, datepickerConfig, $datepickerSuppressError) {
- var self = this,
- ngModelCtrl = { $setViewValue: angular.noop }; // nullModelCtrl;
-
- // Modes chain
- this.modes = ['day', 'month', 'year'];
-
- // Configuration attributes
- angular.forEach(['formatDay', 'formatMonth', 'formatYear', 'formatDayHeader', 'formatDayTitle', 'formatMonthTitle',
- 'showWeeks', 'startingDay', 'yearRange', 'shortcutPropagation'], function(key, index) {
- self[key] = angular.isDefined($attrs[key]) ? (index < 6 ? $interpolate($attrs[key])($scope.$parent) : $scope.$parent.$eval($attrs[key])) : datepickerConfig[key];
- });
-
- // Watchable date attributes
- angular.forEach(['minDate', 'maxDate'], function(key) {
- if ($attrs[key]) {
- $scope.$parent.$watch($parse($attrs[key]), function(value) {
- self[key] = value ? new Date(value) : null;
- self.refreshView();
- });
- } else {
- self[key] = datepickerConfig[key] ? new Date(datepickerConfig[key]) : null;
- }
- });
-
- angular.forEach(['minMode', 'maxMode'], function(key) {
- if ($attrs[key]) {
- $scope.$parent.$watch($parse($attrs[key]), function(value) {
- self[key] = angular.isDefined(value) ? value : $attrs[key];
- $scope[key] = self[key];
- if ((key == 'minMode' && self.modes.indexOf($scope.datepickerMode) < self.modes.indexOf(self[key])) || (key == 'maxMode' && self.modes.indexOf($scope.datepickerMode) > self.modes.indexOf(self[key]))) {
- $scope.datepickerMode = self[key];
- }
- });
- } else {
- self[key] = datepickerConfig[key] || null;
- $scope[key] = self[key];
- }
- });
-
- $scope.datepickerMode = $scope.datepickerMode || datepickerConfig.datepickerMode;
- $scope.uniqueId = 'datepicker-' + $scope.$id + '-' + Math.floor(Math.random() * 10000);
-
- if (angular.isDefined($attrs.initDate)) {
- this.activeDate = $scope.$parent.$eval($attrs.initDate) || new Date();
- $scope.$parent.$watch($attrs.initDate, function(initDate) {
- if (initDate && (ngModelCtrl.$isEmpty(ngModelCtrl.$modelValue) || ngModelCtrl.$invalid)) {
- self.activeDate = initDate;
- self.refreshView();
- }
- });
- } else {
- this.activeDate = new Date();
- }
-
- $scope.isActive = function(dateObject) {
- if (self.compare(dateObject.date, self.activeDate) === 0) {
- $scope.activeDateId = dateObject.uid;
- return true;
- }
- return false;
- };
-
- this.init = function(ngModelCtrl_) {
- ngModelCtrl = ngModelCtrl_;
-
- ngModelCtrl.$render = function() {
- self.render();
- };
- };
-
- this.render = function() {
- if (ngModelCtrl.$viewValue) {
- var date = new Date(ngModelCtrl.$viewValue),
- isValid = !isNaN(date);
-
- if (isValid) {
- this.activeDate = date;
- } else if (!$datepickerSuppressError) {
- $log.error('Datepicker directive: "ng-model" value must be a Date object, a number of milliseconds since 01.01.1970 or a string representing an RFC2822 or ISO 8601 date.');
- }
- }
- this.refreshView();
- };
-
- this.refreshView = function() {
- if (this.element) {
- this._refreshView();
-
- var date = ngModelCtrl.$viewValue ? new Date(ngModelCtrl.$viewValue) : null;
- ngModelCtrl.$setValidity('dateDisabled', !date || (this.element && !this.isDisabled(date)));
- }
- };
-
- this.createDateObject = function(date, format) {
- var model = ngModelCtrl.$viewValue ? new Date(ngModelCtrl.$viewValue) : null;
- return {
- date: date,
- label: dateFilter(date, format),
- selected: model && this.compare(date, model) === 0,
- disabled: this.isDisabled(date),
- current: this.compare(date, new Date()) === 0,
- customClass: this.customClass(date)
- };
- };
-
- this.isDisabled = function(date) {
- return ((this.minDate && this.compare(date, this.minDate) < 0) || (this.maxDate && this.compare(date, this.maxDate) > 0) || ($attrs.dateDisabled && $scope.dateDisabled({date: date, mode: $scope.datepickerMode})));
- };
-
- this.customClass = function(date) {
- return $scope.customClass({date: date, mode: $scope.datepickerMode});
- };
-
- // Split array into smaller arrays
- this.split = function(arr, size) {
- var arrays = [];
- while (arr.length > 0) {
- arrays.push(arr.splice(0, size));
- }
- return arrays;
- };
-
- $scope.select = function(date) {
- if ($scope.datepickerMode === self.minMode) {
- var dt = ngModelCtrl.$viewValue ? new Date(ngModelCtrl.$viewValue) : new Date(0, 0, 0, 0, 0, 0, 0);
- dt.setFullYear(date.getFullYear(), date.getMonth(), date.getDate());
- ngModelCtrl.$setViewValue(dt);
- ngModelCtrl.$render();
- } else {
- self.activeDate = date;
- $scope.datepickerMode = self.modes[self.modes.indexOf($scope.datepickerMode) - 1];
- }
- };
-
- $scope.move = function(direction) {
- var year = self.activeDate.getFullYear() + direction * (self.step.years || 0),
- month = self.activeDate.getMonth() + direction * (self.step.months || 0);
- self.activeDate.setFullYear(year, month, 1);
- self.refreshView();
- };
-
- $scope.toggleMode = function(direction) {
- direction = direction || 1;
-
- if (($scope.datepickerMode === self.maxMode && direction === 1) || ($scope.datepickerMode === self.minMode && direction === -1)) {
- return;
- }
-
- $scope.datepickerMode = self.modes[self.modes.indexOf($scope.datepickerMode) + direction];
- };
-
- // Key event mapper
- $scope.keys = { 13: 'enter', 32: 'space', 33: 'pageup', 34: 'pagedown', 35: 'end', 36: 'home', 37: 'left', 38: 'up', 39: 'right', 40: 'down' };
-
- var focusElement = function() {
- self.element[0].focus();
- };
-
- // Listen for focus requests from popup directive
- $scope.$on('uib:datepicker.focus', focusElement);
-
- $scope.keydown = function(evt) {
- var key = $scope.keys[evt.which];
-
- if (!key || evt.shiftKey || evt.altKey) {
- return;
- }
-
- evt.preventDefault();
- if (!self.shortcutPropagation) {
- evt.stopPropagation();
- }
-
- if (key === 'enter' || key === 'space') {
- if (self.isDisabled(self.activeDate)) {
- return; // do nothing
- }
- $scope.select(self.activeDate);
- } else if (evt.ctrlKey && (key === 'up' || key === 'down')) {
- $scope.toggleMode(key === 'up' ? 1 : -1);
- } else {
- self.handleKeyDown(key, evt);
- self.refreshView();
- }
- };
-}])
-
-.controller('UibDaypickerController', ['$scope', '$element', 'dateFilter', function(scope, $element, dateFilter) {
- var DAYS_IN_MONTH = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
-
- this.step = { months: 1 };
- this.element = $element;
- function getDaysInMonth(year, month) {
- return ((month === 1) && (year % 4 === 0) && ((year % 100 !== 0) || (year % 400 === 0))) ? 29 : DAYS_IN_MONTH[month];
- }
-
- this.init = function(ctrl) {
- angular.extend(ctrl, this);
- scope.showWeeks = ctrl.showWeeks;
- ctrl.refreshView();
- };
-
- this.getDates = function(startDate, n) {
- var dates = new Array(n), current = new Date(startDate), i = 0, date;
- while (i < n) {
- date = new Date(current);
- dates[i++] = date;
- current.setDate(current.getDate() + 1);
- }
- return dates;
- };
-
- this._refreshView = function() {
- var year = this.activeDate.getFullYear(),
- month = this.activeDate.getMonth(),
- firstDayOfMonth = new Date(this.activeDate);
-
- firstDayOfMonth.setFullYear(year, month, 1);
-
- var difference = this.startingDay - firstDayOfMonth.getDay(),
- numDisplayedFromPreviousMonth = (difference > 0) ? 7 - difference : - difference,
- firstDate = new Date(firstDayOfMonth);
-
- if (numDisplayedFromPreviousMonth > 0) {
- firstDate.setDate(-numDisplayedFromPreviousMonth + 1);
- }
-
- // 42 is the number of days on a six-month calendar
- var days = this.getDates(firstDate, 42);
- for (var i = 0; i < 42; i ++) {
- days[i] = angular.extend(this.createDateObject(days[i], this.formatDay), {
- secondary: days[i].getMonth() !== month,
- uid: scope.uniqueId + '-' + i
- });
- }
-
- scope.labels = new Array(7);
- for (var j = 0; j < 7; j++) {
- scope.labels[j] = {
- abbr: dateFilter(days[j].date, this.formatDayHeader),
- full: dateFilter(days[j].date, 'EEEE')
- };
- }
-
- scope.title = dateFilter(this.activeDate, this.formatDayTitle);
- scope.rows = this.split(days, 7);
-
- if (scope.showWeeks) {
- scope.weekNumbers = [];
- var thursdayIndex = (4 + 7 - this.startingDay) % 7,
- numWeeks = scope.rows.length;
- for (var curWeek = 0; curWeek < numWeeks; curWeek++) {
- scope.weekNumbers.push(
- getISO8601WeekNumber(scope.rows[curWeek][thursdayIndex].date));
- }
- }
- };
-
- this.compare = function(date1, date2) {
- return (new Date(date1.getFullYear(), date1.getMonth(), date1.getDate()) - new Date(date2.getFullYear(), date2.getMonth(), date2.getDate()));
- };
-
- function getISO8601WeekNumber(date) {
- var checkDate = new Date(date);
- checkDate.setDate(checkDate.getDate() + 4 - (checkDate.getDay() || 7)); // Thursday
- var time = checkDate.getTime();
- checkDate.setMonth(0); // Compare with Jan 1
- checkDate.setDate(1);
- return Math.floor(Math.round((time - checkDate) / 86400000) / 7) + 1;
- }
-
- this.handleKeyDown = function(key, evt) {
- var date = this.activeDate.getDate();
-
- if (key === 'left') {
- date = date - 1; // up
- } else if (key === 'up') {
- date = date - 7; // down
- } else if (key === 'right') {
- date = date + 1; // down
- } else if (key === 'down') {
- date = date + 7;
- } else if (key === 'pageup' || key === 'pagedown') {
- var month = this.activeDate.getMonth() + (key === 'pageup' ? - 1 : 1);
- this.activeDate.setMonth(month, 1);
- date = Math.min(getDaysInMonth(this.activeDate.getFullYear(), this.activeDate.getMonth()), date);
- } else if (key === 'home') {
- date = 1;
- } else if (key === 'end') {
- date = getDaysInMonth(this.activeDate.getFullYear(), this.activeDate.getMonth());
- }
- this.activeDate.setDate(date);
- };
-}])
-
-.controller('UibMonthpickerController', ['$scope', '$element', 'dateFilter', function(scope, $element, dateFilter) {
- this.step = { years: 1 };
- this.element = $element;
-
- this.init = function(ctrl) {
- angular.extend(ctrl, this);
- ctrl.refreshView();
- };
-
- this._refreshView = function() {
- var months = new Array(12),
- year = this.activeDate.getFullYear(),
- date;
-
- for (var i = 0; i < 12; i++) {
- date = new Date(this.activeDate);
- date.setFullYear(year, i, 1);
- months[i] = angular.extend(this.createDateObject(date, this.formatMonth), {
- uid: scope.uniqueId + '-' + i
- });
- }
-
- scope.title = dateFilter(this.activeDate, this.formatMonthTitle);
- scope.rows = this.split(months, 3);
- };
-
- this.compare = function(date1, date2) {
- return new Date(date1.getFullYear(), date1.getMonth()) - new Date(date2.getFullYear(), date2.getMonth());
- };
-
- this.handleKeyDown = function(key, evt) {
- var date = this.activeDate.getMonth();
-
- if (key === 'left') {
- date = date - 1; // up
- } else if (key === 'up') {
- date = date - 3; // down
- } else if (key === 'right') {
- date = date + 1; // down
- } else if (key === 'down') {
- date = date + 3;
- } else if (key === 'pageup' || key === 'pagedown') {
- var year = this.activeDate.getFullYear() + (key === 'pageup' ? - 1 : 1);
- this.activeDate.setFullYear(year);
- } else if (key === 'home') {
- date = 0;
- } else if (key === 'end') {
- date = 11;
- }
- this.activeDate.setMonth(date);
- };
-}])
-
-.controller('UibYearpickerController', ['$scope', '$element', 'dateFilter', function(scope, $element, dateFilter) {
- var range;
- this.element = $element;
-
- function getStartingYear(year) {
- return parseInt((year - 1) / range, 10) * range + 1;
- }
-
- this.yearpickerInit = function() {
- range = this.yearRange;
- this.step = { years: range };
- };
-
- this._refreshView = function() {
- var years = new Array(range), date;
-
- for (var i = 0, start = getStartingYear(this.activeDate.getFullYear()); i < range; i++) {
- date = new Date(this.activeDate);
- date.setFullYear(start + i, 0, 1);
- years[i] = angular.extend(this.createDateObject(date, this.formatYear), {
- uid: scope.uniqueId + '-' + i
- });
- }
-
- scope.title = [years[0].label, years[range - 1].label].join(' - ');
- scope.rows = this.split(years, 5);
- };
-
- this.compare = function(date1, date2) {
- return date1.getFullYear() - date2.getFullYear();
- };
-
- this.handleKeyDown = function(key, evt) {
- var date = this.activeDate.getFullYear();
-
- if (key === 'left') {
- date = date - 1; // up
- } else if (key === 'up') {
- date = date - 5; // down
- } else if (key === 'right') {
- date = date + 1; // down
- } else if (key === 'down') {
- date = date + 5;
- } else if (key === 'pageup' || key === 'pagedown') {
- date += (key === 'pageup' ? - 1 : 1) * this.step.years;
- } else if (key === 'home') {
- date = getStartingYear(this.activeDate.getFullYear());
- } else if (key === 'end') {
- date = getStartingYear(this.activeDate.getFullYear()) + range - 1;
- }
- this.activeDate.setFullYear(date);
- };
-}])
-
-.directive('uibDatepicker', function() {
- return {
- replace: true,
- templateUrl: function(element, attrs) {
- return attrs.templateUrl || 'template/datepicker/datepicker.html';
- },
- scope: {
- datepickerMode: '=?',
- dateDisabled: '&',
- customClass: '&',
- shortcutPropagation: '&?'
- },
- require: ['uibDatepicker', '^ngModel'],
- controller: 'UibDatepickerController',
- controllerAs: 'datepicker',
- link: function(scope, element, attrs, ctrls) {
- var datepickerCtrl = ctrls[0], ngModelCtrl = ctrls[1];
-
- datepickerCtrl.init(ngModelCtrl);
- }
- };
-})
-
-.directive('uibDaypicker', function() {
- return {
- replace: true,
- templateUrl: function(element, attrs) {
- return attrs.templateUrl || 'template/datepicker/day.html';
- },
- require: ['^?uibDatepicker', 'uibDaypicker', '^?datepicker'],
- controller: 'UibDaypickerController',
- link: function(scope, element, attrs, ctrls) {
- var datepickerCtrl = ctrls[0] || ctrls[2],
- daypickerCtrl = ctrls[1];
-
- daypickerCtrl.init(datepickerCtrl);
- }
- };
-})
-
-.directive('uibMonthpicker', function() {
- return {
- replace: true,
- templateUrl: function(element, attrs) {
- return attrs.templateUrl || 'template/datepicker/month.html';
- },
- require: ['^?uibDatepicker', 'uibMonthpicker', '^?datepicker'],
- controller: 'UibMonthpickerController',
- link: function(scope, element, attrs, ctrls) {
- var datepickerCtrl = ctrls[0] || ctrls[2],
- monthpickerCtrl = ctrls[1];
-
- monthpickerCtrl.init(datepickerCtrl);
- }
- };
-})
-
-.directive('uibYearpicker', function() {
- return {
- replace: true,
- templateUrl: function(element, attrs) {
- return attrs.templateUrl || 'template/datepicker/year.html';
- },
- require: ['^?uibDatepicker', 'uibYearpicker', '^?datepicker'],
- controller: 'UibYearpickerController',
- link: function(scope, element, attrs, ctrls) {
- var ctrl = ctrls[0] || ctrls[2];
- angular.extend(ctrl, ctrls[1]);
- ctrl.yearpickerInit();
-
- ctrl.refreshView();
- }
- };
-})
-
-.constant('uibDatepickerPopupConfig', {
- datepickerPopup: 'yyyy-MM-dd',
- datepickerPopupTemplateUrl: 'template/datepicker/popup.html',
- datepickerTemplateUrl: 'template/datepicker/datepicker.html',
- html5Types: {
- date: 'yyyy-MM-dd',
- 'datetime-local': 'yyyy-MM-ddTHH:mm:ss.sss',
- 'month': 'yyyy-MM'
- },
- currentText: 'Today',
- clearText: 'Clear',
- closeText: 'Done',
- closeOnDateSelection: true,
- appendToBody: false,
- showButtonBar: true,
- onOpenFocus: true
-})
-
-.controller('UibDatepickerPopupController', ['$scope', '$element', '$attrs', '$compile', '$parse', '$document', '$rootScope', '$uibPosition', 'dateFilter', 'uibDateParser', 'uibDatepickerPopupConfig', '$timeout',
-function(scope, element, attrs, $compile, $parse, $document, $rootScope, $position, dateFilter, dateParser, datepickerPopupConfig, $timeout) {
- var self = this;
- var cache = {},
- isHtml5DateInput = false;
- var dateFormat, closeOnDateSelection, appendToBody, onOpenFocus,
- datepickerPopupTemplateUrl, datepickerTemplateUrl, popupEl, datepickerEl,
- ngModel, $popup;
-
- scope.watchData = {};
-
- this.init = function(_ngModel_) {
- ngModel = _ngModel_;
- closeOnDateSelection = angular.isDefined(attrs.closeOnDateSelection) ? scope.$parent.$eval(attrs.closeOnDateSelection) : datepickerPopupConfig.closeOnDateSelection;
- appendToBody = angular.isDefined(attrs.datepickerAppendToBody) ? scope.$parent.$eval(attrs.datepickerAppendToBody) : datepickerPopupConfig.appendToBody;
- onOpenFocus = angular.isDefined(attrs.onOpenFocus) ? scope.$parent.$eval(attrs.onOpenFocus) : datepickerPopupConfig.onOpenFocus;
- datepickerPopupTemplateUrl = angular.isDefined(attrs.datepickerPopupTemplateUrl) ? attrs.datepickerPopupTemplateUrl : datepickerPopupConfig.datepickerPopupTemplateUrl;
- datepickerTemplateUrl = angular.isDefined(attrs.datepickerTemplateUrl) ? attrs.datepickerTemplateUrl : datepickerPopupConfig.datepickerTemplateUrl;
-
- scope.showButtonBar = angular.isDefined(attrs.showButtonBar) ? scope.$parent.$eval(attrs.showButtonBar) : datepickerPopupConfig.showButtonBar;
-
- if (datepickerPopupConfig.html5Types[attrs.type]) {
- dateFormat = datepickerPopupConfig.html5Types[attrs.type];
- isHtml5DateInput = true;
- } else {
- dateFormat = attrs.datepickerPopup || attrs.uibDatepickerPopup || datepickerPopupConfig.datepickerPopup;
- attrs.$observe('uibDatepickerPopup', function(value, oldValue) {
- var newDateFormat = value || datepickerPopupConfig.datepickerPopup;
- // Invalidate the $modelValue to ensure that formatters re-run
- // FIXME: Refactor when PR is merged: https://github.com/angular/angular.js/pull/10764
- if (newDateFormat !== dateFormat) {
- dateFormat = newDateFormat;
- ngModel.$modelValue = null;
-
- if (!dateFormat) {
- throw new Error('uibDatepickerPopup must have a date format specified.');
- }
- }
- });
- }
-
- if (!dateFormat) {
- throw new Error('uibDatepickerPopup must have a date format specified.');
- }
-
- if (isHtml5DateInput && attrs.datepickerPopup) {
- throw new Error('HTML5 date input types do not support custom formats.');
- }
-
- // popup element used to display calendar
- popupEl = angular.element('<div uib-datepicker-popup-wrap><div uib-datepicker></div></div>');
- popupEl.attr({
- 'ng-model': 'date',
- 'ng-change': 'dateSelection(date)',
- 'template-url': datepickerPopupTemplateUrl
- });
-
- // datepicker element
- datepickerEl = angular.element(popupEl.children()[0]);
- datepickerEl.attr('template-url', datepickerTemplateUrl);
-
- if (isHtml5DateInput) {
- if (attrs.type === 'month') {
- datepickerEl.attr('datepicker-mode', '"month"');
- datepickerEl.attr('min-mode', 'month');
- }
- }
-
- if (attrs.datepickerOptions) {
- var options = scope.$parent.$eval(attrs.datepickerOptions);
- if (options && options.initDate) {
- scope.initDate = options.initDate;
- datepickerEl.attr('init-date', 'initDate');
- delete options.initDate;
- }
- angular.forEach(options, function(value, option) {
- datepickerEl.attr(cameltoDash(option), value);
- });
- }
-
- angular.forEach(['minMode', 'maxMode', 'minDate', 'maxDate', 'datepickerMode', 'initDate', 'shortcutPropagation'], function(key) {
- if (attrs[key]) {
- var getAttribute = $parse(attrs[key]);
- scope.$parent.$watch(getAttribute, function(value) {
- scope.watchData[key] = value;
- if (key === 'minDate' || key === 'maxDate') {
- cache[key] = new Date(value);
- }
- });
- datepickerEl.attr(cameltoDash(key), 'watchData.' + key);
-
- // Propagate changes from datepicker to outside
- if (key === 'datepickerMode') {
- var setAttribute = getAttribute.assign;
- scope.$watch('watchData.' + key, function(value, oldvalue) {
- if (angular.isFunction(setAttribute) && value !== oldvalue) {
- setAttribute(scope.$parent, value);
- }
- });
- }
- }
- });
- if (attrs.dateDisabled) {
- datepickerEl.attr('date-disabled', 'dateDisabled({ date: date, mode: mode })');
- }
-
- if (attrs.showWeeks) {
- datepickerEl.attr('show-weeks', attrs.showWeeks);
- }
-
- if (attrs.customClass) {
- datepickerEl.attr('custom-class', 'customClass({ date: date, mode: mode })');
- }
-
- if (!isHtml5DateInput) {
- // Internal API to maintain the correct ng-invalid-[key] class
- ngModel.$$parserName = 'date';
- ngModel.$validators.date = validator;
- ngModel.$parsers.unshift(parseDate);
- ngModel.$formatters.push(function(value) {
- scope.date = value;
- return ngModel.$isEmpty(value) ? value : dateFilter(value, dateFormat);
- });
- } else {
- ngModel.$formatters.push(function(value) {
- scope.date = value;
- return value;
- });
- }
-
- // Detect changes in the view from the text box
- ngModel.$viewChangeListeners.push(function() {
- scope.date = dateParser.parse(ngModel.$viewValue, dateFormat, scope.date);
- });
-
- element.bind('keydown', inputKeydownBind);
-
- $popup = $compile(popupEl)(scope);
- // Prevent jQuery cache memory leak (template is now redundant after linking)
- popupEl.remove();
-
- if (appendToBody) {
- $document.find('body').append($popup);
- } else {
- element.after($popup);
- }
-
- scope.$on('$destroy', function() {
- if (scope.isOpen === true) {
- if (!$rootScope.$$phase) {
- scope.$apply(function() {
- scope.isOpen = false;
- });
- }
- }
-
- $popup.remove();
- element.unbind('keydown', inputKeydownBind);
- $document.unbind('click', documentClickBind);
- });
- };
-
- scope.getText = function(key) {
- return scope[key + 'Text'] || datepickerPopupConfig[key + 'Text'];
- };
-
- scope.isDisabled = function(date) {
- if (date === 'today') {
- date = new Date();
- }
-
- return ((scope.watchData.minDate && scope.compare(date, cache.minDate) < 0) ||
- (scope.watchData.maxDate && scope.compare(date, cache.maxDate) > 0));
- };
-
- scope.compare = function(date1, date2) {
- return (new Date(date1.getFullYear(), date1.getMonth(), date1.getDate()) - new Date(date2.getFullYear(), date2.getMonth(), date2.getDate()));
- };
-
- // Inner change
- scope.dateSelection = function(dt) {
- if (angular.isDefined(dt)) {
- scope.date = dt;
- }
- var date = scope.date ? dateFilter(scope.date, dateFormat) : null; // Setting to NULL is necessary for form validators to function
- element.val(date);
- ngModel.$setViewValue(date);
-
- if (closeOnDateSelection) {
- scope.isOpen = false;
- element[0].focus();
- }
- };
-
- scope.keydown = function(evt) {
- if (evt.which === 27) {
- scope.isOpen = false;
- element[0].focus();
- }
- };
-
- scope.select = function(date) {
- if (date === 'today') {
- var today = new Date();
- if (angular.isDate(scope.date)) {
- date = new Date(scope.date);
- date.setFullYear(today.getFullYear(), today.getMonth(), today.getDate());
- } else {
- date = new Date(today.setHours(0, 0, 0, 0));
- }
- }
- scope.dateSelection(date);
- };
-
- scope.close = function() {
- scope.isOpen = false;
- element[0].focus();
- };
-
- scope.$watch('isOpen', function(value) {
- if (value) {
- scope.position = appendToBody ? $position.offset(element) : $position.position(element);
- scope.position.top = scope.position.top + element.prop('offsetHeight');
-
- $timeout(function() {
- if (onOpenFocus) {
- scope.$broadcast('uib:datepicker.focus');
- }
- $document.bind('click', documentClickBind);
- }, 0, false);
- } else {
- $document.unbind('click', documentClickBind);
- }
- });
-
- function cameltoDash(string) {
- return string.replace(/([A-Z])/g, function($1) { return '-' + $1.toLowerCase(); });
- }
-
- function parseDate(viewValue) {
- if (angular.isNumber(viewValue)) {
- // presumably timestamp to date object
- viewValue = new Date(viewValue);
- }
-
- if (!viewValue) {
- return null;
- } else if (angular.isDate(viewValue) && !isNaN(viewValue)) {
- return viewValue;
- } else if (angular.isString(viewValue)) {
- var date = dateParser.parse(viewValue, dateFormat, scope.date);
- if (isNaN(date)) {
- return undefined;
- } else {
- return date;
- }
- } else {
- return undefined;
- }
- }
-
- function validator(modelValue, viewValue) {
- var value = modelValue || viewValue;
-
- if (!attrs.ngRequired && !value) {
- return true;
- }
-
- if (angular.isNumber(value)) {
- value = new Date(value);
- }
- if (!value) {
- return true;
- } else if (angular.isDate(value) && !isNaN(value)) {
- return true;
- } else if (angular.isString(value)) {
- var date = dateParser.parse(value, dateFormat);
- return !isNaN(date);
- } else {
- return false;
- }
- }
-
- function documentClickBind(event) {
- var popup = $popup[0];
- var dpContainsTarget = element[0].contains(event.target);
- // The popup node may not be an element node
- // In some browsers (IE) only element nodes have the 'contains' function
- var popupContainsTarget = popup.contains !== undefined && popup.contains(event.target);
- if (scope.isOpen && !(dpContainsTarget || popupContainsTarget)) {
- scope.$apply(function() {
- scope.isOpen = false;
- });
- }
- }
-
- function inputKeydownBind(evt) {
- if (evt.which === 27 && scope.isOpen) {
- evt.preventDefault();
- evt.stopPropagation();
- scope.$apply(function() {
- scope.isOpen = false;
- });
- element[0].focus();
- } else if (evt.which === 40 && !scope.isOpen) {
- evt.preventDefault();
- evt.stopPropagation();
- scope.$apply(function() {
- scope.isOpen = true;
- });
- }
- }
-}])
-
-.directive('uibDatepickerPopup', function() {
- return {
- require: ['ngModel', 'uibDatepickerPopup'],
- controller: 'UibDatepickerPopupController',
- scope: {
- isOpen: '=?',
- currentText: '@',
- clearText: '@',
- closeText: '@',
- dateDisabled: '&',
- customClass: '&'
- },
- link: function(scope, element, attrs, ctrls) {
- var ngModel = ctrls[0],
- ctrl = ctrls[1];
-
- ctrl.init(ngModel);
- }
- };
-})
-
-.directive('uibDatepickerPopupWrap', function() {
- return {
- replace: true,
- transclude: true,
- templateUrl: function(element, attrs) {
- return attrs.templateUrl || 'template/datepicker/popup.html';
- }
- };
-});
-
-/* Deprecated datepicker below */
-
-angular.module('ui.bootstrap.datepicker')
-
-.value('$datepickerSuppressWarning', false)
-
-.controller('DatepickerController', ['$scope', '$attrs', '$parse', '$interpolate', '$log', 'dateFilter', 'uibDatepickerConfig', '$datepickerSuppressError', '$datepickerSuppressWarning', function($scope, $attrs, $parse, $interpolate, $log, dateFilter, datepickerConfig, $datepickerSuppressError, $datepickerSuppressWarning) {
- if (!$datepickerSuppressWarning) {
- $log.warn('DatepickerController is now deprecated. Use UibDatepickerController instead.');
- }
-
- var self = this,
- ngModelCtrl = { $setViewValue: angular.noop }; // nullModelCtrl;
-
- this.modes = ['day', 'month', 'year'];
-
- angular.forEach(['formatDay', 'formatMonth', 'formatYear', 'formatDayHeader', 'formatDayTitle', 'formatMonthTitle',
- 'showWeeks', 'startingDay', 'yearRange', 'shortcutPropagation'], function(key, index) {
- self[key] = angular.isDefined($attrs[key]) ? (index < 6 ? $interpolate($attrs[key])($scope.$parent) : $scope.$parent.$eval($attrs[key])) : datepickerConfig[key];
- });
-
- angular.forEach(['minDate', 'maxDate'], function(key) {
- if ($attrs[key]) {
- $scope.$parent.$watch($parse($attrs[key]), function(value) {
- self[key] = value ? new Date(value) : null;
- self.refreshView();
- });
- } else {
- self[key] = datepickerConfig[key] ? new Date(datepickerConfig[key]) : null;
- }
- });
-
- angular.forEach(['minMode', 'maxMode'], function(key) {
- if ($attrs[key]) {
- $scope.$parent.$watch($parse($attrs[key]), function(value) {
- self[key] = angular.isDefined(value) ? value : $attrs[key];
- $scope[key] = self[key];
- if ((key == 'minMode' && self.modes.indexOf($scope.datepickerMode) < self.modes.indexOf(self[key])) || (key == 'maxMode' && self.modes.indexOf($scope.datepickerMode) > self.modes.indexOf(self[key]))) {
- $scope.datepickerMode = self[key];
- }
- });
- } else {
- self[key] = datepickerConfig[key] || null;
- $scope[key] = self[key];
- }
- });
-
- $scope.datepickerMode = $scope.datepickerMode || datepickerConfig.datepickerMode;
- $scope.uniqueId = 'datepicker-' + $scope.$id + '-' + Math.floor(Math.random() * 10000);
-
- if (angular.isDefined($attrs.initDate)) {
- this.activeDate = $scope.$parent.$eval($attrs.initDate) || new Date();
- $scope.$parent.$watch($attrs.initDate, function(initDate) {
- if (initDate && (ngModelCtrl.$isEmpty(ngModelCtrl.$modelValue) || ngModelCtrl.$invalid)) {
- self.activeDate = initDate;
- self.refreshView();
- }
- });
- } else {
- this.activeDate = new Date();
- }
-
- $scope.isActive = function(dateObject) {
- if (self.compare(dateObject.date, self.activeDate) === 0) {
- $scope.activeDateId = dateObject.uid;
- return true;
- }
- return false;
- };
-
- this.init = function(ngModelCtrl_) {
- ngModelCtrl = ngModelCtrl_;
-
- ngModelCtrl.$render = function() {
- self.render();
- };
- };
-
- this.render = function() {
- if (ngModelCtrl.$viewValue) {
- var date = new Date(ngModelCtrl.$viewValue),
- isValid = !isNaN(date);
-
- if (isValid) {
- this.activeDate = date;
- } else if (!$datepickerSuppressError) {
- $log.error('Datepicker directive: "ng-model" value must be a Date object, a number of milliseconds since 01.01.1970 or a string representing an RFC2822 or ISO 8601 date.');
- }
- }
- this.refreshView();
- };
-
- this.refreshView = function() {
- if (this.element) {
- this._refreshView();
-
- var date = ngModelCtrl.$viewValue ? new Date(ngModelCtrl.$viewValue) : null;
- ngModelCtrl.$setValidity('dateDisabled', !date || (this.element && !this.isDisabled(date)));
- }
- };
-
- this.createDateObject = function(date, format) {
- var model = ngModelCtrl.$viewValue ? new Date(ngModelCtrl.$viewValue) : null;
- return {
- date: date,
- label: dateFilter(date, format),
- selected: model && this.compare(date, model) === 0,
- disabled: this.isDisabled(date),
- current: this.compare(date, new Date()) === 0,
- customClass: this.customClass(date)
- };
- };
-
- this.isDisabled = function(date) {
- return ((this.minDate && this.compare(date, this.minDate) < 0) || (this.maxDate && this.compare(date, this.maxDate) > 0) || ($attrs.dateDisabled && $scope.dateDisabled({date: date, mode: $scope.datepickerMode})));
- };
-
- this.customClass = function(date) {
- return $scope.customClass({date: date, mode: $scope.datepickerMode});
- };
-
- // Split array into smaller arrays
- this.split = function(arr, size) {
- var arrays = [];
- while (arr.length > 0) {
- arrays.push(arr.splice(0, size));
- }
- return arrays;
- };
-
- this.fixTimeZone = function(date) {
- var hours = date.getHours();
- date.setHours(hours === 23 ? hours + 2 : 0);
- };
-
- $scope.select = function(date) {
- if ($scope.datepickerMode === self.minMode) {
- var dt = ngModelCtrl.$viewValue ? new Date(ngModelCtrl.$viewValue) : new Date(0, 0, 0, 0, 0, 0, 0);
- dt.setFullYear(date.getFullYear(), date.getMonth(), date.getDate());
- ngModelCtrl.$setViewValue(dt);
- ngModelCtrl.$render();
- } else {
- self.activeDate = date;
- $scope.datepickerMode = self.modes[self.modes.indexOf($scope.datepickerMode) - 1];
- }
- };
-
- $scope.move = function(direction) {
- var year = self.activeDate.getFullYear() + direction * (self.step.years || 0),
- month = self.activeDate.getMonth() + direction * (self.step.months || 0);
- self.activeDate.setFullYear(year, month, 1);
- self.refreshView();
- };
-
- $scope.toggleMode = function(direction) {
- direction = direction || 1;
-
- if (($scope.datepickerMode === self.maxMode && direction === 1) || ($scope.datepickerMode === self.minMode && direction === -1)) {
- return;
- }
-
- $scope.datepickerMode = self.modes[self.modes.indexOf($scope.datepickerMode) + direction];
- };
-
- // Key event mapper
- $scope.keys = { 13: 'enter', 32: 'space', 33: 'pageup', 34: 'pagedown', 35: 'end', 36: 'home', 37: 'left', 38: 'up', 39: 'right', 40: 'down' };
-
- var focusElement = function() {
- self.element[0].focus();
- };
-
- $scope.$on('uib:datepicker.focus', focusElement);
-
- $scope.keydown = function(evt) {
- var key = $scope.keys[evt.which];
-
- if (!key || evt.shiftKey || evt.altKey) {
- return;
- }
-
- evt.preventDefault();
- if (!self.shortcutPropagation) {
- evt.stopPropagation();
- }
-
- if (key === 'enter' || key === 'space') {
- if (self.isDisabled(self.activeDate)) {
- return; // do nothing
- }
- $scope.select(self.activeDate);
- } else if (evt.ctrlKey && (key === 'up' || key === 'down')) {
- $scope.toggleMode(key === 'up' ? 1 : -1);
- } else {
- self.handleKeyDown(key, evt);
- self.refreshView();
- }
- };
-}])
-
-.directive('datepicker', ['$log', '$datepickerSuppressWarning', function($log, $datepickerSuppressWarning) {
- return {
- replace: true,
- templateUrl: function(element, attrs) {
- return attrs.templateUrl || 'template/datepicker/datepicker.html';
- },
- scope: {
- datepickerMode: '=?',
- dateDisabled: '&',
- customClass: '&',
- shortcutPropagation: '&?'
- },
- require: ['datepicker', '^ngModel'],
- controller: 'DatepickerController',
- controllerAs: 'datepicker',
- link: function(scope, element, attrs, ctrls) {
- if (!$datepickerSuppressWarning) {
- $log.warn('datepicker is now deprecated. Use uib-datepicker instead.');
- }
-
- var datepickerCtrl = ctrls[0], ngModelCtrl = ctrls[1];
-
- datepickerCtrl.init(ngModelCtrl);
- }
- };
-}])
-
-.directive('daypicker', ['$log', '$datepickerSuppressWarning', function($log, $datepickerSuppressWarning) {
- return {
- replace: true,
- templateUrl: 'template/datepicker/day.html',
- require: ['^datepicker', 'daypicker'],
- controller: 'UibDaypickerController',
- link: function(scope, element, attrs, ctrls) {
- if (!$datepickerSuppressWarning) {
- $log.warn('daypicker is now deprecated. Use uib-daypicker instead.');
- }
-
- var datepickerCtrl = ctrls[0],
- daypickerCtrl = ctrls[1];
-
- daypickerCtrl.init(datepickerCtrl);
- }
- };
-}])
-
-.directive('monthpicker', ['$log', '$datepickerSuppressWarning', function($log, $datepickerSuppressWarning) {
- return {
- replace: true,
- templateUrl: 'template/datepicker/month.html',
- require: ['^datepicker', 'monthpicker'],
- controller: 'UibMonthpickerController',
- link: function(scope, element, attrs, ctrls) {
- if (!$datepickerSuppressWarning) {
- $log.warn('monthpicker is now deprecated. Use uib-monthpicker instead.');
- }
-
- var datepickerCtrl = ctrls[0],
- monthpickerCtrl = ctrls[1];
-
- monthpickerCtrl.init(datepickerCtrl);
- }
- };
-}])
-
-.directive('yearpicker', ['$log', '$datepickerSuppressWarning', function($log, $datepickerSuppressWarning) {
- return {
- replace: true,
- templateUrl: 'template/datepicker/year.html',
- require: ['^datepicker', 'yearpicker'],
- controller: 'UibYearpickerController',
- link: function(scope, element, attrs, ctrls) {
- if (!$datepickerSuppressWarning) {
- $log.warn('yearpicker is now deprecated. Use uib-yearpicker instead.');
- }
-
- var ctrl = ctrls[0];
- angular.extend(ctrl, ctrls[1]);
- ctrl.yearpickerInit();
-
- ctrl.refreshView();
- }
- };
-}])
-
-.directive('datepickerPopup', ['$log', '$datepickerSuppressWarning', function($log, $datepickerSuppressWarning) {
- return {
- require: ['ngModel', 'datepickerPopup'],
- controller: 'UibDatepickerPopupController',
- scope: {
- isOpen: '=?',
- currentText: '@',
- clearText: '@',
- closeText: '@',
- dateDisabled: '&',
- customClass: '&'
- },
- link: function(scope, element, attrs, ctrls) {
- if (!$datepickerSuppressWarning) {
- $log.warn('datepicker-popup is now deprecated. Use uib-datepicker-popup instead.');
- }
-
- var ngModel = ctrls[0],
- ctrl = ctrls[1];
-
- ctrl.init(ngModel);
- }
- };
-}])
-
-.directive('datepickerPopupWrap', ['$log', '$datepickerSuppressWarning', function($log, $datepickerSuppressWarning) {
- return {
- replace: true,
- transclude: true,
- templateUrl: function(element, attrs) {
- return attrs.templateUrl || 'template/datepicker/popup.html';
- },
- link: function() {
- if (!$datepickerSuppressWarning) {
- $log.warn('datepicker-popup-wrap is now deprecated. Use uib-datepicker-popup-wrap instead.');
- }
- }
- };
-}]);
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/datepicker/docs/demo.html b/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/datepicker/docs/demo.html
deleted file mode 100644
index 8a057a3..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/datepicker/docs/demo.html
+++ /dev/null
@@ -1,52 +0,0 @@
-<style>
- .full button span {
- background-color: limegreen;
- border-radius: 32px;
- color: black;
- }
- .partially button span {
- background-color: orange;
- border-radius: 32px;
- color: black;
- }
-</style>
-<div ng-controller="DatepickerDemoCtrl">
- <pre>Selected date is: <em>{{dt | date:'fullDate' }}</em></pre>
-
- <h4>Inline</h4>
- <div style="display:inline-block; min-height:290px;">
- <uib-datepicker ng-model="dt" min-date="minDate" show-weeks="true" class="well well-sm" custom-class="getDayClass(date, mode)"></uib-datepicker>
- </div>
-
- <h4>Popup</h4>
- <div class="row">
- <div class="col-md-6">
- <p class="input-group">
- <input type="text" class="form-control" uib-datepicker-popup="{{format}}" ng-model="dt" is-open="status.opened" min-date="minDate" max-date="maxDate" datepicker-options="dateOptions" date-disabled="disabled(date, mode)" ng-required="true" close-text="Close" />
- <span class="input-group-btn">
- <button type="button" class="btn btn-default" ng-click="open($event)"><i class="glyphicon glyphicon-calendar"></i></button>
- </span>
- </p>
- </div>
-
- <div class="col-md-6">
- <p class="input-group">
- <input type="date" class="form-control" uib-datepicker-popup ng-model="dt" is-open="status.opened" min-date="minDate" max-date="maxDate" datepicker-options="dateOptions" date-disabled="disabled(date, mode)" ng-required="true" close-text="Close" />
- <span class="input-group-btn">
- <button type="button" class="btn btn-default" ng-click="open($event)"><i class="glyphicon glyphicon-calendar"></i></button>
- </span>
- </p>
- </div>
- </div>
- <div class="row">
- <div class="col-md-6">
- <label>Format:</label> <select class="form-control" ng-model="format" ng-options="f for f in formats"><option></option></select>
- </div>
- </div>
-
- <hr />
- <button type="button" class="btn btn-sm btn-info" ng-click="today()">Today</button>
- <button type="button" class="btn btn-sm btn-default" ng-click="setDate(2009, 7, 24)">2009-08-24</button>
- <button type="button" class="btn btn-sm btn-danger" ng-click="clear()">Clear</button>
- <button type="button" class="btn btn-sm btn-default" ng-click="toggleMin()" uib-tooltip="After today restriction">Min date</button>
-</div>
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/datepicker/docs/demo.js b/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/datepicker/docs/demo.js
deleted file mode 100644
index 419cb3d..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/datepicker/docs/demo.js
+++ /dev/null
@@ -1,73 +0,0 @@
-angular.module('ui.bootstrap.demo').controller('DatepickerDemoCtrl', function ($scope) {
- $scope.today = function() {
- $scope.dt = new Date();
- };
- $scope.today();
-
- $scope.clear = function () {
- $scope.dt = null;
- };
-
- // Disable weekend selection
- $scope.disabled = function(date, mode) {
- return ( mode === 'day' && ( date.getDay() === 0 || date.getDay() === 6 ) );
- };
-
- $scope.toggleMin = function() {
- $scope.minDate = $scope.minDate ? null : new Date();
- };
- $scope.toggleMin();
- $scope.maxDate = new Date(2020, 5, 22);
-
- $scope.open = function($event) {
- $scope.status.opened = true;
- };
-
- $scope.setDate = function(year, month, day) {
- $scope.dt = new Date(year, month, day);
- };
-
- $scope.dateOptions = {
- formatYear: 'yy',
- startingDay: 1
- };
-
- $scope.formats = ['dd-MMMM-yyyy', 'yyyy/MM/dd', 'dd.MM.yyyy', 'shortDate'];
- $scope.format = $scope.formats[0];
-
- $scope.status = {
- opened: false
- };
-
- var tomorrow = new Date();
- tomorrow.setDate(tomorrow.getDate() + 1);
- var afterTomorrow = new Date();
- afterTomorrow.setDate(tomorrow.getDate() + 2);
- $scope.events =
- [
- {
- date: tomorrow,
- status: 'full'
- },
- {
- date: afterTomorrow,
- status: 'partially'
- }
- ];
-
- $scope.getDayClass = function(date, mode) {
- if (mode === 'day') {
- var dayToCheck = new Date(date).setHours(0,0,0,0);
-
- for (var i=0;i<$scope.events.length;i++){
- var currentDay = new Date($scope.events[i].date).setHours(0,0,0,0);
-
- if (dayToCheck === currentDay) {
- return $scope.events[i].status;
- }
- }
- }
-
- return '';
- };
-});
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/datepicker/docs/readme.md b/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/datepicker/docs/readme.md
deleted file mode 100644
index 956032a..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/datepicker/docs/readme.md
+++ /dev/null
@@ -1,157 +0,0 @@
-A clean, flexible, and fully customizable date picker.
-
-User can navigate through months and years.
-The datepicker shows dates that come from other than the main month being displayed. These other dates are also selectable.
-
-Everything is formatted using the [date filter](http://docs.angularjs.org/api/ng.filter:date) and thus is also localized.
-
-### Datepicker Settings ###
-
-All settings can be provided as attributes in the `uib-datepicker` or globally configured through the `uibDatepickerConfig`.
-
- * `ng-model` <i class="glyphicon glyphicon-eye-open"></i>
- :
- The date object.
-
- * `datepicker-mode` <i class="glyphicon glyphicon-eye-open"></i>
- _(Defaults: 'day')_ :
- Current mode of the datepicker _(day|month|year)_. Can be used to initialize datepicker to specific mode.
-
- * `min-date` <i class="glyphicon glyphicon-eye-open"></i>
- _(Default: null)_ :
- Defines the minimum available date.
-
- * `max-date` <i class="glyphicon glyphicon-eye-open"></i>
- _(Default: null)_ :
- Defines the maximum available date.
-
- * `date-disabled (date, mode)`
- _(Default: null)_ :
- An optional expression to disable visible options based on passing date and current mode _(day|month|year)_.
-
- * `custom-class (date, mode)`
- _(Default: null)_ :
- An optional expression to add classes based on passing date and current mode _(day|month|year)_.
-
- * `show-weeks`
- _(Defaults: true)_ :
- Whether to display week numbers.
-
- * `starting-day`
- _(Defaults: 0)_ :
- Starting day of the week from 0-6 (0=Sunday, ..., 6=Saturday).
-
- * `init-date`
- :
- The initial date view when no model value is specified.
-
- * `min-mode`
- _(Defaults: 'day')_ :
- Set a lower limit for mode.
-
- * `max-mode`
- _(Defaults: 'year')_ :
- Set an upper limit for mode.
-
- * `format-day`
- _(Default: 'dd')_ :
- Format of day in month.
-
- * `format-month`
- _(Default: 'MMMM')_ :
- Format of month in year.
-
- * `format-year`
- _(Default: 'yyyy')_ :
- Format of year in year range.
-
- * `format-day-header`
- _(Default: 'EEE')_ :
- Format of day in week header.
-
- * `format-day-title`
- _(Default: 'MMMM yyyy')_ :
- Format of title when selecting day.
-
- * `format-month-title`
- _(Default: 'yyyy')_ :
- Format of title when selecting month.
-
- * `year-range`
- _(Default: 20)_ :
- Number of years displayed in year selection.
-
- * `shortcut-propagation`
- _(Default: false)_ :
- An option to disable or enable shortcut's event propagation.
-
- * `template-url`
- _(Default: 'template/datepicker/datepicker.html')_ :
- Allows overriding of default template of the datepicker
-
-
-### Popup Settings ###
-
-Options for datepicker can be passed as JSON using the `datepicker-options` attribute.
-Specific settings for the `uib-datepicker-popup`, that can globally configured through the `uibDatepickerPopupConfig`, are:
-
- * `uib-datepicker-popup`
- _(Default: 'yyyy-MM-dd')_ :
- The format for displayed dates.
-
- * `show-button-bar`
- _(Default: true)_ :
- Whether to display a button bar underneath the datepicker.
-
- * `current-text`
- _(Default: 'Today')_ :
- The text to display for the current day button.
-
- * `clear-text`
- _(Default: 'Clear')_ :
- The text to display for the clear button.
-
- * `close-text`
- _(Default: 'Done')_ :
- The text to display for the close button.
-
- * `close-on-date-selection`
- _(Default: true)_ :
- Whether to close calendar when a date is chosen.
-
- * `datepicker-popup-template-url`
- _(Default: 'template/datepicker/popup.html')_ :
- Allows overriding of default template of the popup
-
- * `datepicker-template-url`
- _(Default: 'template/datepicker/datepicker.html')_ :
- Allows overriding of default template of the datepicker used in popup
-
- * `datepicker-append-to-body`
- _(Default: false)_:
- Append the datepicker popup element to `body`, rather than inserting after `datepicker-popup`. For global configuration, use `uibDatepickerPopupConfig.appendToBody`.
-
- * `is-open` <i class="glyphicon glyphicon-eye-open"></i>
- _(Default: false)_:
- Whether to show the datepicker.
-
- * `on-open-focus`
- _(Default: true)_:
- Whether to focus the datepicker popup upon opening.
-
-### Keyboard Support ###
-
-Depending on datepicker's current mode, the date may refer either to day, month or year. Accordingly, the term view refers either to a month, year or year range.
-
- * `Left`: Move focus to the previous date. Will move to the last date of the previous view, if the current date is the first date of a view.
- * `Right`: Move focus to the next date. Will move to the first date of the following view, if the current date is the last date of a view.
- * `Up`: Move focus to the same column of the previous row. Will wrap to the appropriate row in the previous view.
- * `Down`: Move focus to the same column of the following row. Will wrap to the appropriate row in the following view.
- * `PgUp`: Move focus to the same date of the previous view. If that date does not exist, focus is placed on the last date of the month.
- * `PgDn`: Move focus to the same date of the following view. If that date does not exist, focus is placed on the last date of the month.
- * `Home`: Move to the first date of the view.
- * `End`: Move to the last date of the view.
- * `Enter`/`Space`: Select date.
- * `Ctrl`+`Up`: Move to an upper mode.
- * `Ctrl`+`Down`: Move to a lower mode.
- * `Esc`: Will close popup, and move focus to the input.
\ No newline at end of file
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/datepicker/test/datepicker.spec.js b/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/datepicker/test/datepicker.spec.js
deleted file mode 100644
index 6ab0ce8..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/datepicker/test/datepicker.spec.js
+++ /dev/null
@@ -1,2515 +0,0 @@
-describe('datepicker directive', function() {
- var $rootScope, $compile, $templateCache, element;
- beforeEach(module('ui.bootstrap.datepicker'));
- beforeEach(module('template/datepicker/datepicker.html'));
- beforeEach(module('template/datepicker/day.html'));
- beforeEach(module('template/datepicker/month.html'));
- beforeEach(module('template/datepicker/year.html'));
- beforeEach(module('template/datepicker/popup.html'));
- beforeEach(module(function($compileProvider) {
- $compileProvider.directive('dateModel', function() {
- return {
- restrict: 'A',
- require: 'ngModel',
- link: function(scope, element, attrs, modelController) {
- modelController.$formatters.push(function(object) {
- return new Date(object.date);
- });
-
- modelController.$parsers.push(function(date) {
- return {
- type: 'date',
- date: date.toUTCString()
- };
- });
- }
- };
- });
- }));
-
- function getTitleButton() {
- return element.find('th').eq(1).find('button').first();
- }
-
- function getTitle() {
- return getTitleButton().text();
- }
-
- function clickTitleButton() {
- getTitleButton().click();
- }
-
- function clickPreviousButton(times) {
- var el = element.find('th').eq(0).find('button').eq(0);
- for (var i = 0, n = times || 1; i < n; i++) {
- el.click();
- }
- }
-
- function clickNextButton() {
- element.find('th').eq(2).find('button').eq(0).click();
- }
-
- function getLabelsRow() {
- return element.find('thead').find('tr').eq(1);
- }
-
- function getLabels(dayMode) {
- var els = getLabelsRow().find('th'),
- labels = [];
- for (var i = dayMode ? 1 : 0, n = els.length; i < n; i++) {
- labels.push(els.eq(i).text());
- }
- return labels;
- }
-
- function getWeeks() {
- var rows = element.find('tbody').find('tr'),
- weeks = [];
- for (var i = 0, n = rows.length; i < n; i++) {
- weeks.push(rows.eq(i).find('td').eq(0).first().text());
- }
- return weeks;
- }
-
- function getOptions(dayMode) {
- var tr = element.find('tbody').find('tr');
- var rows = [];
-
- for (var j = 0, numRows = tr.length; j < numRows; j++) {
- var cols = tr.eq(j).find('td'), days = [];
- for (var i = dayMode ? 1 : 0, n = cols.length; i < n; i++) {
- days.push(cols.eq(i).find('button').text());
- }
- rows.push(days);
- }
- return rows;
- }
-
- function clickOption(index) {
- getAllOptionsEl().eq(index).click();
- }
-
- function getAllOptionsEl(dayMode) {
- return element.find('tbody').find('button');
- }
-
- function selectedElementIndex() {
- var buttons = getAllOptionsEl();
- for (var i = 0; i < buttons.length; i++) {
- if (angular.element(buttons[i]).hasClass('btn-info')) {
- return i;
- }
- }
- }
-
- function expectSelectedElement(index) {
- var buttons = getAllOptionsEl();
- angular.forEach( buttons, function(button, idx) {
- expect(angular.element(button).hasClass('btn-info')).toBe(idx === index);
- });
- }
-
- function triggerKeyDown(element, key, ctrl) {
- var keyCodes = {
- 'enter': 13,
- 'space': 32,
- 'pageup': 33,
- 'pagedown': 34,
- 'end': 35,
- 'home': 36,
- 'left': 37,
- 'up': 38,
- 'right': 39,
- 'down': 40,
- 'esc': 27
- };
- var e = $.Event('keydown');
- e.which = keyCodes[key];
- if (ctrl) {
- e.ctrlKey = true;
- }
- element.trigger(e);
- }
-
- describe('$datepickerSuppressError', function() {
- var $compile,
- $log,
- $scope;
-
- it('should not suppress log error message for ng-model date error by default', function() {
- inject(function(_$log_, _$rootScope_, _$compile_) {
- $log = _$log_;
- $scope = _$rootScope_.$new();
- $compile = _$compile_;
- });
-
- spyOn($log, 'error');
- element = $compile('<uib-datepicker ng-model="locals.date"></uib-datepicker>')($scope);
-
- $scope.locals = {
- date: 'lalala'
- };
- $scope.$digest();
- expect($log.error).toHaveBeenCalled();
- });
-
- it('should not suppress log error message for ng-model date error when false', function() {
- module(function($provide) {
- $provide.value('$datepickerSuppressError', false);
- });
-
- inject(function(_$log_, _$rootScope_, _$compile_) {
- $log = _$log_;
- $scope = _$rootScope_.$new();
- $compile = _$compile_;
- });
-
- spyOn($log, 'error');
- element = $compile('<uib-datepicker ng-model="locals.date"></uib-datepicker>')($scope);
-
- $scope.locals = {
- date: 'lalala'
- };
- $scope.$digest();
- expect($log.error).toHaveBeenCalled();
- });
-
- it('should suppress log error message for ng-model date error when true', function() {
- module(function($provide) {
- $provide.value('$datepickerSuppressError', true);
- });
-
- inject(function(_$log_, _$rootScope_, _$compile_) {
- $log = _$log_;
- $scope = _$rootScope_.$new();
- $compile = _$compile_;
- });
- spyOn($log, 'error');
-
- element = $compile('<uib-datepicker ng-model="locals.date"></uib-datepicker>')($scope);
-
- $scope.locals = {
- date: 'lalala'
- };
- $scope.$digest();
- expect($log.error).not.toHaveBeenCalled();
- });
- });
-
- describe('', function() {
- beforeEach(inject(function(_$compile_, _$rootScope_, _$templateCache_) {
- $compile = _$compile_;
- $rootScope = _$rootScope_;
- $rootScope.date = new Date('September 30, 2010 15:30:00');
- $templateCache = _$templateCache_;
- }));
-
-
- describe('', function() {
- beforeEach(function() {
- element = $compile('<uib-datepicker ng-model="date"></uib-datepicker>')($rootScope);
- $rootScope.$digest();
- });
-
- it('is has a `<table>` element', function() {
- expect(element.find('table').length).toBe(1);
- });
-
- it('shows the correct title', function() {
- expect(getTitle()).toBe('September 2010');
- });
-
- it('shows the label row & the correct day labels', function() {
- expect(getLabelsRow().css('display')).not.toBe('none');
- expect(getLabels(true)).toEqual(['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']);
- });
-
- it('renders the calendar days correctly', function() {
- expect(getOptions(true)).toEqual([
- ['29', '30', '31', '01', '02', '03', '04'],
- ['05', '06', '07', '08', '09', '10', '11'],
- ['12', '13', '14', '15', '16', '17', '18'],
- ['19', '20', '21', '22', '23', '24', '25'],
- ['26', '27', '28', '29', '30', '01', '02'],
- ['03', '04', '05', '06', '07', '08', '09']
- ]);
- });
-
- it('renders the week numbers based on ISO 8601', function() {
- expect(getWeeks()).toEqual(['35', '36', '37', '38', '39', '40']);
- });
-
- it('value is correct', function() {
- expect($rootScope.date).toEqual(new Date('September 30, 2010 15:30:00'));
- });
-
- it('has `selected` only the correct day', function() {
- expectSelectedElement(32);
- });
-
- it('has no `selected` day when model is cleared', function() {
- $rootScope.date = null;
- $rootScope.$digest();
-
- expect($rootScope.date).toBe(null);
- expectSelectedElement(null);
- });
-
- it('does not change current view when model is cleared', function() {
- $rootScope.date = null;
- $rootScope.$digest();
-
- expect($rootScope.date).toBe(null);
- expect(getTitle()).toBe('September 2010');
- });
-
- it('`disables` visible dates from other months', function() {
- var buttons = getAllOptionsEl();
- angular.forEach(buttons, function(button, index) {
- expect(angular.element(button).find('span').hasClass('text-muted')).toBe( index < 3 || index > 32 );
- });
- });
-
- it('updates the model when a day is clicked', function() {
- clickOption(17);
- expect($rootScope.date).toEqual(new Date('September 15, 2010 15:30:00'));
- });
-
- it('moves to the previous month & renders correctly when `previous` button is clicked', function() {
- clickPreviousButton();
-
- expect(getTitle()).toBe('August 2010');
- expect(getLabels(true)).toEqual(['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']);
- expect(getOptions(true)).toEqual([
- ['01', '02', '03', '04', '05', '06', '07'],
- ['08', '09', '10', '11', '12', '13', '14'],
- ['15', '16', '17', '18', '19', '20', '21'],
- ['22', '23', '24', '25', '26', '27', '28'],
- ['29', '30', '31', '01', '02', '03', '04'],
- ['05', '06', '07', '08', '09', '10', '11']
- ]);
-
- expectSelectedElement(null, null);
- });
-
- it('updates the model only when a day is clicked in the `previous` month', function() {
- clickPreviousButton();
- expect($rootScope.date).toEqual(new Date('September 30, 2010 15:30:00'));
-
- clickOption(17);
- expect($rootScope.date).toEqual(new Date('August 18, 2010 15:30:00'));
- });
-
- it('moves to the next month & renders correctly when `next` button is clicked', function() {
- clickNextButton();
-
- expect(getTitle()).toBe('October 2010');
- expect(getLabels(true)).toEqual(['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']);
- expect(getOptions(true)).toEqual([
- ['26', '27', '28', '29', '30', '01', '02'],
- ['03', '04', '05', '06', '07', '08', '09'],
- ['10', '11', '12', '13', '14', '15', '16'],
- ['17', '18', '19', '20', '21', '22', '23'],
- ['24', '25', '26', '27', '28', '29', '30'],
- ['31', '01', '02', '03', '04', '05', '06']
- ]);
-
- expectSelectedElement(4);
- });
-
- it('updates the model only when a day is clicked in the `next` month', function() {
- clickNextButton();
- expect($rootScope.date).toEqual(new Date('September 30, 2010 15:30:00'));
-
- clickOption(17);
- expect($rootScope.date).toEqual(new Date('October 13, 2010 15:30:00'));
- });
-
- it('updates the calendar when a day of another month is selected', function() {
- clickOption(33);
- expect($rootScope.date).toEqual(new Date('October 01, 2010 15:30:00'));
- expect(getTitle()).toBe('October 2010');
- expect(getLabels(true)).toEqual(['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']);
- expect(getOptions(true)).toEqual([
- ['26', '27', '28', '29', '30', '01', '02'],
- ['03', '04', '05', '06', '07', '08', '09'],
- ['10', '11', '12', '13', '14', '15', '16'],
- ['17', '18', '19', '20', '21', '22', '23'],
- ['24', '25', '26', '27', '28', '29', '30'],
- ['31', '01', '02', '03', '04', '05', '06']
- ]);
-
- expectSelectedElement(5);
- });
-
- // issue #1697
- it('should not "jump" months', function() {
- $rootScope.date = new Date('January 30, 2014');
- $rootScope.$digest();
- clickNextButton();
- expect(getTitle()).toBe('February 2014');
- clickPreviousButton();
- expect(getTitle()).toBe('January 2014');
- });
-
- it('should support custom templates', function() {
- $templateCache.put('foo/bar.html', '<div>baz</div>');
-
- element = $compile('<uib-datepicker ng-model="date" template-url="foo/bar.html"></uib-datepicker>')($rootScope);
- $rootScope.$digest();
-
- expect(element.html()).toBe('baz');
- });
-
- it('should support custom day, month and year templates', function() {
- $templateCache.put('foo/day.html', '<div>day</div>');
- $templateCache.put('foo/month.html', '<div>month</div>');
- $templateCache.put('foo/year.html', '<div>year</div>');
-
- $templateCache.put('foo/bar.html', '<div>' +
- '<uib-daypicker template-url="foo/day.html"></uib-daypicker>' +
- '<uib-monthpicker template-url="foo/month.html"></uib-monthpicker>' +
- '<uib-yearpicker template-url="foo/year.html"></uib-yearpicker>' +
- '</div>');
-
- element = $compile('<uib-datepicker ng-model="date" template-url="foo/bar.html"></uib-datepicker>')($rootScope);
- $rootScope.$digest();
-
- var expectedHtml = '<div template-url="foo/day.html">day</div><div template-url="foo/month.html">month</div><div template-url="foo/year.html">year</div>';
-
- expect(element.html()).toBe(expectedHtml);
- });
-
- it('should expose the controller in the template', function() {
- $templateCache.put('template/datepicker/datepicker.html', '<div>{{datepicker.text}}</div>');
-
- element = $compile('<uib-datepicker ng-model="date"></uib-datepicker>')($rootScope);
- $rootScope.$digest();
-
- var ctrl = element.controller('uib-datepicker');
- expect(ctrl).toBeDefined();
- expect(element.html()).toBe('');
-
- ctrl.text = 'baz';
- $rootScope.$digest();
-
- expect(element.html()).toBe('baz');
- });
-
- describe('when `model` changes', function() {
- function testCalendar() {
- expect(getTitle()).toBe('November 2005');
- expect(getOptions(true)).toEqual([
- ['30', '31', '01', '02', '03', '04', '05'],
- ['06', '07', '08', '09', '10', '11', '12'],
- ['13', '14', '15', '16', '17', '18', '19'],
- ['20', '21', '22', '23', '24', '25', '26'],
- ['27', '28', '29', '30', '01', '02', '03'],
- ['04', '05', '06', '07', '08', '09', '10']
- ]);
-
- expectSelectedElement(8);
- }
-
- describe('to a Date object', function() {
- it('updates', function() {
- $rootScope.date = new Date('November 7, 2005 23:30:00');
- $rootScope.$digest();
- testCalendar();
- expect(angular.isDate($rootScope.date)).toBe(true);
- });
-
- it('to a date that is invalid, it doesn\`t update', function() {
- $rootScope.date = new Date('pizza');
- $rootScope.$digest();
- expect(getTitle()).toBe('September 2010');
- expect(angular.isDate($rootScope.date)).toBe(true);
- expect(isNaN($rootScope.date)).toBe(true);
- });
- });
-
- describe('not to a Date object', function() {
- it('to a Number, it updates calendar', function() {
- $rootScope.date = parseInt((new Date('November 7, 2005 23:30:00')).getTime(), 10);
- $rootScope.$digest();
- testCalendar();
- expect(angular.isNumber($rootScope.date)).toBe(true);
- });
-
- it('to a string that can be parsed by Date, it updates calendar', function() {
- $rootScope.date = 'November 7, 2005 23:30:00';
- $rootScope.$digest();
- testCalendar();
- expect(angular.isString($rootScope.date)).toBe(true);
- });
-
- it('to a string that cannot be parsed by Date, it doesn\'t update', function() {
- $rootScope.date = 'pizza';
- $rootScope.$digest();
- expect(getTitle()).toBe('September 2010');
- expect($rootScope.date).toBe('pizza');
- });
- });
- });
-
- it('does not loop between after max mode', function() {
- expect(getTitle()).toBe('September 2010');
-
- clickTitleButton();
- expect(getTitle()).toBe('2010');
-
- clickTitleButton();
- expect(getTitle()).toBe('2001 - 2020');
-
- clickTitleButton();
- expect(getTitle()).toBe('2001 - 2020');
- });
-
- describe('month selection mode', function() {
- beforeEach(function() {
- clickTitleButton();
- });
-
- it('shows the year as title', function() {
- expect(getTitle()).toBe('2010');
- });
-
- it('shows months as options', function() {
- expect(getOptions()).toEqual([
- ['January', 'February', 'March'],
- ['April', 'May', 'June'],
- ['July', 'August', 'September'],
- ['October', 'November', 'December']
- ]);
- });
-
- it('does not change the model', function() {
- expect($rootScope.date).toEqual(new Date('September 30, 2010 15:30:00'));
- });
-
- it('has `selected` only the correct month', function() {
- expectSelectedElement(8);
- });
-
- it('moves to the previous year when `previous` button is clicked', function() {
- clickPreviousButton();
-
- expect(getTitle()).toBe('2009');
- expect(getOptions()).toEqual([
- ['January', 'February', 'March'],
- ['April', 'May', 'June'],
- ['July', 'August', 'September'],
- ['October', 'November', 'December']
- ]);
-
- expectSelectedElement(null);
- });
-
- it('moves to the next year when `next` button is clicked', function() {
- clickNextButton();
-
- expect(getTitle()).toBe('2011');
- expect(getOptions()).toEqual([
- ['January', 'February', 'March'],
- ['April', 'May', 'June'],
- ['July', 'August', 'September'],
- ['October', 'November', 'December']
- ]);
-
- expectSelectedElement(null);
- });
-
- it('renders correctly when a month is clicked', function() {
- clickPreviousButton(5);
- expect(getTitle()).toBe('2005');
-
- clickOption(10);
- expect($rootScope.date).toEqual(new Date('September 30, 2010 15:30:00'));
- expect(getTitle()).toBe('November 2005');
- expect(getOptions(true)).toEqual([
- ['30', '31', '01', '02', '03', '04', '05'],
- ['06', '07', '08', '09', '10', '11', '12'],
- ['13', '14', '15', '16', '17', '18', '19'],
- ['20', '21', '22', '23', '24', '25', '26'],
- ['27', '28', '29', '30', '01', '02', '03'],
- ['04', '05', '06', '07', '08', '09', '10']
- ]);
-
- clickOption(17);
- expect($rootScope.date).toEqual(new Date('November 16, 2005 15:30:00'));
- });
- });
-
- describe('year selection mode', function() {
- beforeEach(function() {
- clickTitleButton();
- clickTitleButton();
- });
-
- it('shows the year range as title', function() {
- expect(getTitle()).toBe('2001 - 2020');
- });
-
- it('shows years as options', function() {
- expect(getOptions()).toEqual([
- ['2001', '2002', '2003', '2004', '2005'],
- ['2006', '2007', '2008', '2009', '2010'],
- ['2011', '2012', '2013', '2014', '2015'],
- ['2016', '2017', '2018', '2019', '2020']
- ]);
- });
-
- it('does not change the model', function() {
- expect($rootScope.date).toEqual(new Date('September 30, 2010 15:30:00'));
- });
-
- it('has `selected` only the selected year', function() {
- expectSelectedElement(9);
- });
-
- it('moves to the previous year set when `previous` button is clicked', function() {
- clickPreviousButton();
-
- expect(getTitle()).toBe('1981 - 2000');
- expect(getOptions()).toEqual([
- ['1981', '1982', '1983', '1984', '1985'],
- ['1986', '1987', '1988', '1989', '1990'],
- ['1991', '1992', '1993', '1994', '1995'],
- ['1996', '1997', '1998', '1999', '2000']
- ]);
- expectSelectedElement(null);
- });
-
- it('moves to the next year set when `next` button is clicked', function() {
- clickNextButton();
-
- expect(getTitle()).toBe('2021 - 2040');
- expect(getOptions()).toEqual([
- ['2021', '2022', '2023', '2024', '2025'],
- ['2026', '2027', '2028', '2029', '2030'],
- ['2031', '2032', '2033', '2034', '2035'],
- ['2036', '2037', '2038', '2039', '2040']
- ]);
-
- expectSelectedElement(null);
- });
- });
-
- describe('keyboard navigation', function() {
- function getActiveLabel() {
- return element.find('.active').eq(0).text();
- }
-
- describe('day mode', function() {
- it('will be able to activate previous day', function() {
- triggerKeyDown(element, 'left');
- expect(getActiveLabel()).toBe('29');
- });
-
- it('will be able to select with enter', function() {
- triggerKeyDown(element, 'left');
- triggerKeyDown(element, 'enter');
- expect($rootScope.date).toEqual(new Date('September 29, 2010 15:30:00'));
- });
-
- it('will be able to select with space', function() {
- triggerKeyDown(element, 'left');
- triggerKeyDown(element, 'space');
- expect($rootScope.date).toEqual(new Date('September 29, 2010 15:30:00'));
- });
-
- it('will be able to activate next day', function() {
- triggerKeyDown(element, 'right');
- expect(getActiveLabel()).toBe('01');
- expect(getTitle()).toBe('October 2010');
- });
-
- it('will be able to activate same day in previous week', function() {
- triggerKeyDown(element, 'up');
- expect(getActiveLabel()).toBe('23');
- });
-
- it('will be able to activate same day in next week', function() {
- triggerKeyDown(element, 'down');
- expect(getActiveLabel()).toBe('07');
- expect(getTitle()).toBe('October 2010');
- });
-
- it('will be able to activate same date in previous month', function() {
- triggerKeyDown(element, 'pageup');
- expect(getActiveLabel()).toBe('30');
- expect(getTitle()).toBe('August 2010');
- });
-
- it('will be able to activate same date in next month', function() {
- triggerKeyDown(element, 'pagedown');
- expect(getActiveLabel()).toBe('30');
- expect(getTitle()).toBe('October 2010');
- });
-
- it('will be able to activate first day of the month', function() {
- triggerKeyDown(element, 'home');
- expect(getActiveLabel()).toBe('01');
- expect(getTitle()).toBe('September 2010');
- });
-
- it('will be able to activate last day of the month', function() {
- $rootScope.date = new Date('September 1, 2010 15:30:00');
- $rootScope.$digest();
-
- triggerKeyDown(element, 'end');
- expect(getActiveLabel()).toBe('30');
- expect(getTitle()).toBe('September 2010');
- });
-
- it('will be able to move to month mode', function() {
- triggerKeyDown(element, 'up', true);
- expect(getActiveLabel()).toBe('September');
- expect(getTitle()).toBe('2010');
- });
-
- it('will not respond when trying to move to lower mode', function() {
- triggerKeyDown(element, 'down', true);
- expect(getActiveLabel()).toBe('30');
- expect(getTitle()).toBe('September 2010');
- });
- });
-
- describe('month mode', function() {
- beforeEach(function() {
- triggerKeyDown(element, 'up', true);
- });
-
- it('will be able to activate previous month', function() {
- triggerKeyDown(element, 'left');
- expect(getActiveLabel()).toBe('August');
- });
-
- it('will be able to activate next month', function() {
- triggerKeyDown(element, 'right');
- expect(getActiveLabel()).toBe('October');
- });
-
- it('will be able to activate same month in previous row', function() {
- triggerKeyDown(element, 'up');
- expect(getActiveLabel()).toBe('June');
- });
-
- it('will be able to activate same month in next row', function() {
- triggerKeyDown(element, 'down');
- expect(getActiveLabel()).toBe('December');
- });
-
- it('will be able to activate same date in previous year', function() {
- triggerKeyDown(element, 'pageup');
- expect(getActiveLabel()).toBe('September');
- expect(getTitle()).toBe('2009');
- });
-
- it('will be able to activate same date in next year', function() {
- triggerKeyDown(element, 'pagedown');
- expect(getActiveLabel()).toBe('September');
- expect(getTitle()).toBe('2011');
- });
-
- it('will be able to activate first month of the year', function() {
- triggerKeyDown(element, 'home');
- expect(getActiveLabel()).toBe('January');
- expect(getTitle()).toBe('2010');
- });
-
- it('will be able to activate last month of the year', function() {
- triggerKeyDown(element, 'end');
- expect(getActiveLabel()).toBe('December');
- expect(getTitle()).toBe('2010');
- });
-
- it('will be able to move to year mode', function() {
- triggerKeyDown(element, 'up', true);
- expect(getActiveLabel()).toBe('2010');
- expect(getTitle()).toBe('2001 - 2020');
- });
-
- it('will be able to move to day mode', function() {
- triggerKeyDown(element, 'down', true);
- expect(getActiveLabel()).toBe('30');
- expect(getTitle()).toBe('September 2010');
- });
-
- it('will move to day mode when selecting', function() {
- triggerKeyDown(element, 'left', true);
- triggerKeyDown(element, 'enter', true);
- expect(getActiveLabel()).toBe('30');
- expect(getTitle()).toBe('August 2010');
- expect($rootScope.date).toEqual(new Date('September 30, 2010 15:30:00'));
- });
- });
-
- describe('year mode', function() {
- beforeEach(function() {
- triggerKeyDown(element, 'up', true);
- triggerKeyDown(element, 'up', true);
- });
-
- it('will be able to activate previous year', function() {
- triggerKeyDown(element, 'left');
- expect(getActiveLabel()).toBe('2009');
- });
-
- it('will be able to activate next year', function() {
- triggerKeyDown(element, 'right');
- expect(getActiveLabel()).toBe('2011');
- });
-
- it('will be able to activate same year in previous row', function() {
- triggerKeyDown(element, 'up');
- expect(getActiveLabel()).toBe('2005');
- });
-
- it('will be able to activate same year in next row', function() {
- triggerKeyDown(element, 'down');
- expect(getActiveLabel()).toBe('2015');
- });
-
- it('will be able to activate same date in previous view', function() {
- triggerKeyDown(element, 'pageup');
- expect(getActiveLabel()).toBe('1990');
- });
-
- it('will be able to activate same date in next view', function() {
- triggerKeyDown(element, 'pagedown');
- expect(getActiveLabel()).toBe('2030');
- });
-
- it('will be able to activate first year of the year', function() {
- triggerKeyDown(element, 'home');
- expect(getActiveLabel()).toBe('2001');
- });
-
- it('will be able to activate last year of the year', function() {
- triggerKeyDown(element, 'end');
- expect(getActiveLabel()).toBe('2020');
- });
-
- it('will not respond when trying to move to upper mode', function() {
- triggerKeyDown(element, 'up', true);
- expect(getTitle()).toBe('2001 - 2020');
- });
-
- it('will be able to move to month mode', function() {
- triggerKeyDown(element, 'down', true);
- expect(getActiveLabel()).toBe('September');
- expect(getTitle()).toBe('2010');
- });
-
- it('will move to month mode when selecting', function() {
- triggerKeyDown(element, 'left', true);
- triggerKeyDown(element, 'enter', true);
- expect(getActiveLabel()).toBe('September');
- expect(getTitle()).toBe('2009');
- expect($rootScope.date).toEqual(new Date('September 30, 2010 15:30:00'));
- });
- });
-
- describe('`aria-activedescendant`', function() {
- function checkActivedescendant() {
- var activeId = element.find('table').attr('aria-activedescendant');
- expect(element.find('#' + activeId + ' > button')).toHaveClass('active');
- }
-
- it('updates correctly', function() {
- triggerKeyDown(element, 'left');
- checkActivedescendant();
-
- triggerKeyDown(element, 'down');
- checkActivedescendant();
-
- triggerKeyDown(element, 'up', true);
- checkActivedescendant();
-
- triggerKeyDown(element, 'up', true);
- checkActivedescendant();
- });
- });
- });
- });
-
- describe('attribute `starting-day`', function () {
- beforeEach(function() {
- $rootScope.startingDay = 1;
- element = $compile('<uib-datepicker ng-model="date" starting-day="startingDay"></uib-datepicker>')($rootScope);
- $rootScope.$digest();
- });
-
- it('shows the day labels rotated', function() {
- expect(getLabels(true)).toEqual(['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']);
- });
-
- it('renders the calendar days correctly', function() {
- expect(getOptions(true)).toEqual([
- ['30', '31', '01', '02', '03', '04', '05'],
- ['06', '07', '08', '09', '10', '11', '12'],
- ['13', '14', '15', '16', '17', '18', '19'],
- ['20', '21', '22', '23', '24', '25', '26'],
- ['27', '28', '29', '30', '01', '02', '03'],
- ['04', '05', '06', '07', '08', '09', '10']
- ]);
- });
-
- it('renders the week numbers correctly', function() {
- expect(getWeeks()).toEqual(['35', '36', '37', '38', '39', '40']);
- });
- });
-
- describe('attribute `show-weeks`', function() {
- beforeEach(function() {
- $rootScope.showWeeks = false;
- element = $compile('<uib-datepicker ng-model="date" show-weeks="showWeeks"></uib-datepicker>')($rootScope);
- $rootScope.$digest();
- });
-
- it('hides week numbers based on variable', function() {
- expect(getLabelsRow().find('th').length).toEqual(7);
- var tr = element.find('tbody').find('tr');
- for (var i = 0; i < 5; i++) {
- expect(tr.eq(i).find('td').length).toEqual(7);
- }
- });
- });
-
- describe('`min-date` attribute', function () {
- beforeEach(function() {
- $rootScope.mindate = new Date('September 12, 2010');
- element = $compile('<uib-datepicker ng-model="date" min-date="mindate"></uib-datepicker>')($rootScope);
- $rootScope.$digest();
- });
-
- it('disables appropriate days in current month', function() {
- var buttons = getAllOptionsEl();
- angular.forEach(buttons, function(button, index) {
- expect(angular.element(button).prop('disabled')).toBe(index < 14);
- });
- });
-
- it('disables appropriate days when min date changes', function() {
- $rootScope.mindate = new Date('September 5, 2010');
- $rootScope.$digest();
-
- var buttons = getAllOptionsEl();
- angular.forEach(buttons, function(button, index) {
- expect(angular.element(button).prop('disabled')).toBe(index < 7);
- });
- });
-
- it('invalidates when model is a disabled date', function() {
- $rootScope.mindate = new Date('September 5, 2010');
- $rootScope.date = new Date('September 2, 2010');
- $rootScope.$digest();
- expect(element.hasClass('ng-invalid')).toBeTruthy();
- expect(element.hasClass('ng-invalid-date-disabled')).toBeTruthy();
- });
-
- it('disables all days in previous month', function() {
- clickPreviousButton();
- var buttons = getAllOptionsEl();
- angular.forEach(buttons, function(button, index) {
- expect(angular.element(button).prop('disabled')).toBe(true);
- });
- });
-
- it('disables no days in next month', function() {
- clickNextButton();
- var buttons = getAllOptionsEl();
- angular.forEach(buttons, function(button, index) {
- expect(angular.element(button).prop('disabled')).toBe(false);
- });
- });
-
- it('disables appropriate months in current year', function() {
- clickTitleButton();
- var buttons = getAllOptionsEl();
- angular.forEach(buttons, function(button, index) {
- expect(angular.element(button).prop('disabled')).toBe(index < 8);
- });
- });
-
- it('disables all months in previous year', function() {
- clickTitleButton();
- clickPreviousButton();
- var buttons = getAllOptionsEl();
- angular.forEach(buttons, function(button, index) {
- expect(angular.element(button).prop('disabled')).toBe(true);
- });
- });
-
- it('disables no months in next year', function() {
- clickTitleButton();
- clickNextButton();
- var buttons = getAllOptionsEl();
- angular.forEach(buttons, function(button, index) {
- expect(angular.element(button).prop('disabled')).toBe(false);
- });
- });
-
- it('enables everything before if it is cleared', function() {
- $rootScope.mindate = null;
- $rootScope.date = new Date('December 20, 1949');
- $rootScope.$digest();
-
- clickTitleButton();
- var buttons = getAllOptionsEl();
- angular.forEach(buttons, function(button, index) {
- expect(angular.element(button).prop('disabled')).toBe(false);
- });
- });
-
- });
-
- describe('`max-date` attribute', function() {
- beforeEach(function() {
- $rootScope.maxdate = new Date('September 25, 2010');
- element = $compile('<uib-datepicker ng-model="date" max-date="maxdate"></uib-datepicker>')($rootScope);
- $rootScope.$digest();
- });
-
- it('disables appropriate days in current month', function() {
- var buttons = getAllOptionsEl();
- angular.forEach(buttons, function(button, index) {
- expect(angular.element(button).prop('disabled')).toBe(index > 27);
- });
- });
-
- it('disables appropriate days when max date changes', function() {
- $rootScope.maxdate = new Date('September 18, 2010');
- $rootScope.$digest();
-
- var buttons = getAllOptionsEl();
- angular.forEach(buttons, function(button, index) {
- expect(angular.element(button).prop('disabled')).toBe(index > 20);
- });
- });
-
- it('invalidates when model is a disabled date', function() {
- $rootScope.maxdate = new Date('September 18, 2010');
- $rootScope.$digest();
- expect(element.hasClass('ng-invalid')).toBeTruthy();
- expect(element.hasClass('ng-invalid-date-disabled')).toBeTruthy();
- });
-
- it('disables no days in previous month', function() {
- clickPreviousButton();
- var buttons = getAllOptionsEl();
- angular.forEach(buttons, function(button, index) {
- expect(angular.element(button).prop('disabled')).toBe(false);
- });
- });
-
- it('disables all days in next month', function() {
- clickNextButton();
- var buttons = getAllOptionsEl();
- angular.forEach(buttons, function(button, index) {
- expect(angular.element(button).prop('disabled')).toBe(true);
- });
- });
-
- it('disables appropriate months in current year', function() {
- clickTitleButton();
- var buttons = getAllOptionsEl();
- angular.forEach(buttons, function(button, index) {
- expect(angular.element(button).prop('disabled')).toBe(index > 8);
- });
- });
-
- it('disables no months in previous year', function() {
- clickTitleButton();
- clickPreviousButton();
- var buttons = getAllOptionsEl();
- angular.forEach(buttons, function(button, index) {
- expect(angular.element(button).prop('disabled')).toBe(false);
- });
- });
-
- it('disables all months in next year', function() {
- clickTitleButton();
- clickNextButton();
- var buttons = getAllOptionsEl();
- angular.forEach(buttons, function(button, index) {
- expect(angular.element(button).prop('disabled')).toBe(true);
- });
- });
-
- it('enables everything after if it is cleared', function() {
- $rootScope.maxdate = null;
- $rootScope.$digest();
- var buttons = getAllOptionsEl();
- angular.forEach(buttons, function(button, index) {
- expect(angular.element(button).prop('disabled')).toBe(false);
- });
- });
- });
-
- describe('date-disabled expression', function () {
- beforeEach(function() {
- $rootScope.dateDisabledHandler = jasmine.createSpy('dateDisabledHandler');
- element = $compile('<uib-datepicker ng-model="date" date-disabled="dateDisabledHandler(date, mode)"></uib-datepicker>')($rootScope);
- $rootScope.$digest();
- });
-
- it('executes the dateDisabled expression for each visible day plus one for validation', function() {
- expect($rootScope.dateDisabledHandler.calls.count()).toEqual(42 + 1);
- });
-
- it('executes the dateDisabled expression for each visible month plus one for validation', function() {
- $rootScope.dateDisabledHandler.calls.reset();
- clickTitleButton();
- expect($rootScope.dateDisabledHandler.calls.count()).toEqual(12 + 1);
- });
-
- it('executes the dateDisabled expression for each visible year plus one for validation', function() {
- clickTitleButton();
- $rootScope.dateDisabledHandler.calls.reset();
- clickTitleButton();
- expect($rootScope.dateDisabledHandler.calls.count()).toEqual(20 + 1);
- });
- });
-
- describe('custom-class expression', function() {
- beforeEach(function() {
- $rootScope.customClassHandler = jasmine.createSpy('customClassHandler');
- element = $compile('<uib-datepicker ng-model="date" custom-class="customClassHandler(date, mode)"></uib-datepicker>')($rootScope);
- $rootScope.$digest();
- });
-
- it('executes the customClass expression for each visible day plus one for validation', function() {
- expect($rootScope.customClassHandler.calls.count()).toEqual(42);
- });
-
- it('executes the customClass expression for each visible month plus one for validation', function() {
- $rootScope.customClassHandler.calls.reset();
- clickTitleButton();
- expect($rootScope.customClassHandler.calls.count()).toEqual(12);
- });
-
- it('executes the customClass expression for each visible year plus one for validation', function() {
- clickTitleButton();
- $rootScope.customClassHandler.calls.reset();
- clickTitleButton();
- expect($rootScope.customClassHandler.calls.count()).toEqual(20);
- });
- });
-
- describe('formatting', function() {
- beforeEach(function() {
- $rootScope.dayTitle = 'MMMM, yy';
- element = $compile('<uib-datepicker ng-model="date"' +
- 'format-day="d"' +
- 'format-day-header="EEEE"' +
- 'format-day-title="{{dayTitle}}"' +
- 'format-month="MMM"' +
- 'format-month-title="yy"' +
- 'format-year="yy"' +
- 'year-range="10"></uib-datepicker>')($rootScope);
- $rootScope.$digest();
- });
-
- it('changes the title format in `day` mode', function() {
- expect(getTitle()).toBe('September, 10');
- });
-
- it('changes the title & months format in `month` mode', function() {
- clickTitleButton();
-
- expect(getTitle()).toBe('10');
- expect(getOptions()).toEqual([
- ['Jan', 'Feb', 'Mar'],
- ['Apr', 'May', 'Jun'],
- ['Jul', 'Aug', 'Sep'],
- ['Oct', 'Nov', 'Dec']
- ]);
- });
-
- it('changes the title, year format & range in `year` mode', function() {
- clickTitleButton();
- clickTitleButton();
-
- expect(getTitle()).toBe('01 - 10');
- expect(getOptions()).toEqual([
- ['01', '02', '03', '04', '05'],
- ['06', '07', '08', '09', '10']
- ]);
- });
-
- it('shows day labels', function() {
- expect(getLabels(true)).toEqual(['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday']);
- });
-
- it('changes the day format', function() {
- expect(getOptions(true)).toEqual([
- ['29', '30', '31', '1', '2', '3', '4'],
- ['5', '6', '7', '8', '9', '10', '11'],
- ['12', '13', '14', '15', '16', '17', '18'],
- ['19', '20', '21', '22', '23', '24', '25'],
- ['26', '27', '28', '29', '30', '1', '2'],
- ['3', '4', '5', '6', '7', '8', '9']
- ]);
- });
- });
-
- describe('setting datepickerConfig', function() {
- var originalConfig = {};
- beforeEach(inject(function(uibDatepickerConfig) {
- angular.extend(originalConfig, uibDatepickerConfig);
- uibDatepickerConfig.formatDay = 'd';
- uibDatepickerConfig.formatMonth = 'MMM';
- uibDatepickerConfig.formatYear = 'yy';
- uibDatepickerConfig.formatDayHeader = 'EEEE';
- uibDatepickerConfig.formatDayTitle = 'MMM, yy';
- uibDatepickerConfig.formatMonthTitle = 'yy';
- uibDatepickerConfig.showWeeks = false;
- uibDatepickerConfig.yearRange = 10;
- uibDatepickerConfig.startingDay = 6;
-
- element = $compile('<uib-datepicker ng-model="date"></uib-datepicker>')($rootScope);
- $rootScope.$digest();
- }));
- afterEach(inject(function(uibDatepickerConfig) {
- // return it to the original state
- angular.extend(uibDatepickerConfig, originalConfig);
- }));
-
- it('changes the title format in `day` mode', function() {
- expect(getTitle()).toBe('Sep, 10');
- });
-
- it('changes the title & months format in `month` mode', function() {
- clickTitleButton();
-
- expect(getTitle()).toBe('10');
- expect(getOptions()).toEqual([
- ['Jan', 'Feb', 'Mar'],
- ['Apr', 'May', 'Jun'],
- ['Jul', 'Aug', 'Sep'],
- ['Oct', 'Nov', 'Dec']
- ]);
- });
-
- it('changes the title, year format & range in `year` mode', function() {
- clickTitleButton();
- clickTitleButton();
-
- expect(getTitle()).toBe('01 - 10');
- expect(getOptions()).toEqual([
- ['01', '02', '03', '04', '05'],
- ['06', '07', '08', '09', '10']
- ]);
- });
-
- it('changes the `starting-day` & day headers & format', function() {
- expect(getLabels()).toEqual(['Saturday', 'Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday']);
- expect(getOptions(false)).toEqual([
- ['28', '29', '30', '31', '1', '2', '3'],
- ['4', '5', '6', '7', '8', '9', '10'],
- ['11', '12', '13', '14', '15', '16', '17'],
- ['18', '19', '20', '21', '22', '23', '24'],
- ['25', '26', '27', '28', '29', '30', '1'],
- ['2', '3', '4', '5', '6', '7', '8']
- ]);
- });
-
- it('changes initial visibility for weeks', function() {
- expect(getLabelsRow().find('th').length).toEqual(7);
- var tr = element.find('tbody').find('tr');
- for (var i = 0; i < 5; i++) {
- expect(tr.eq(i).find('td').length).toEqual(7);
- }
- });
-
- });
-
- describe('setting datepickerPopupConfig', function() {
- var originalConfig = {};
- beforeEach(inject(function(uibDatepickerPopupConfig) {
- angular.extend(originalConfig, uibDatepickerPopupConfig);
- uibDatepickerPopupConfig.datepickerPopup = 'MM-dd-yyyy';
-
- element = $compile('<input ng-model="date" uib-datepicker-popup>')($rootScope);
- $rootScope.$digest();
- }));
- afterEach(inject(function(uibDatepickerPopupConfig) {
- // return it to the original state
- angular.extend(uibDatepickerPopupConfig, originalConfig);
- }));
-
- it('changes date format', function() {
- expect(element.val()).toEqual('09-30-2010');
- });
-
- });
-
- describe('setting datepickerPopupConfig inside ng-if', function() {
- var originalConfig = {};
- beforeEach(inject(function (uibDatepickerPopupConfig) {
- angular.extend(originalConfig, uibDatepickerPopupConfig);
- uibDatepickerPopupConfig.datepickerPopup = 'MM-dd-yyyy';
-
- element = $compile('<div><div ng-if="true"><input ng-model="date" uib-datepicker-popup></div></div>')($rootScope);
- $rootScope.$digest();
- }));
- afterEach(inject(function (uibDatepickerPopupConfig) {
- // return it to the original state
- angular.extend(uibDatepickerPopupConfig, originalConfig);
- }));
-
- it('changes date format', function () {
- expect(element.find('input').val()).toEqual('09-30-2010');
- });
- });
-
- describe('as popup', function () {
- var inputEl, dropdownEl, $document, $sniffer, $timeout;
-
- function assignElements(wrapElement) {
- inputEl = wrapElement.find('input');
- dropdownEl = wrapElement.find('ul');
- element = dropdownEl.find('table');
- }
-
- function changeInputValueTo(el, value) {
- el.val(value);
- el.trigger($sniffer.hasEvent('input') ? 'input' : 'change');
- $rootScope.$digest();
- }
-
- describe('initially', function () {
- beforeEach(inject(function(_$document_, _$sniffer_) {
- $document = _$document_;
- $sniffer = _$sniffer_;
- $rootScope.isopen = true;
- $rootScope.date = new Date('September 30, 2010 15:30:00');
- var wrapElement = $compile('<div><input ng-model="date" uib-datepicker-popup><div>')($rootScope);
- $rootScope.$digest();
- assignElements(wrapElement);
- }));
-
- it('does not to display datepicker initially', function() {
- expect(dropdownEl.length).toBe(0);
- });
-
- it('to display the correct value in input', function() {
- expect(inputEl.val()).toBe('2010-09-30');
- });
- });
-
- describe('initially opened', function() {
- var wrapElement;
-
- beforeEach(inject(function(_$document_, _$sniffer_, _$timeout_) {
- $document = _$document_;
- $sniffer = _$sniffer_;
- $timeout = _$timeout_;
- $rootScope.isopen = true;
- $rootScope.date = new Date('September 30, 2010 15:30:00');
- wrapElement = $compile('<div><input ng-model="date" uib-datepicker-popup is-open="isopen"><div>')($rootScope);
- $rootScope.$digest();
- assignElements(wrapElement);
- }));
-
- it('datepicker is displayed', function() {
- expect(dropdownEl.length).toBe(1);
- });
-
- it('renders the calendar correctly', function() {
- expect(getLabelsRow().css('display')).not.toBe('none');
- expect(getLabels(true)).toEqual(['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']);
- expect(getOptions(true)).toEqual([
- ['29', '30', '31', '01', '02', '03', '04'],
- ['05', '06', '07', '08', '09', '10', '11'],
- ['12', '13', '14', '15', '16', '17', '18'],
- ['19', '20', '21', '22', '23', '24', '25'],
- ['26', '27', '28', '29', '30', '01', '02'],
- ['03', '04', '05', '06', '07', '08', '09']
- ]);
- });
-
- it('updates the input when a day is clicked', function() {
- clickOption(17);
- expect(inputEl.val()).toBe('2010-09-15');
- expect($rootScope.date).toEqual(new Date('September 15, 2010 15:30:00'));
- });
-
- it('should mark the input field dirty when a day is clicked', function() {
- expect(inputEl).toHaveClass('ng-pristine');
- clickOption(17);
- expect(inputEl).toHaveClass('ng-dirty');
- });
-
- it('updates the input correctly when model changes', function() {
- $rootScope.date = new Date('January 10, 1983 10:00:00');
- $rootScope.$digest();
- expect(inputEl.val()).toBe('1983-01-10');
- });
-
- it('closes the dropdown when a day is clicked', function() {
- expect(dropdownEl.length).toBe(1);
-
- clickOption(17);
- assignElements(wrapElement);
- expect(dropdownEl.length).toBe(0);
- });
-
- it('updates the model & calendar when input value changes', function() {
- changeInputValueTo(inputEl, '2010-09-15');
-
- expect($rootScope.date.getFullYear()).toEqual(2010);
- expect($rootScope.date.getMonth()).toEqual(8);
- expect($rootScope.date.getDate()).toEqual(15);
-
- expect(getOptions(true)).toEqual([
- ['29', '30', '31', '01', '02', '03', '04'],
- ['05', '06', '07', '08', '09', '10', '11'],
- ['12', '13', '14', '15', '16', '17', '18'],
- ['19', '20', '21', '22', '23', '24', '25'],
- ['26', '27', '28', '29', '30', '01', '02'],
- ['03', '04', '05', '06', '07', '08', '09']
- ]);
- expectSelectedElement(17);
- });
-
- it('closes when click outside of calendar', function() {
- expect(dropdownEl.length).toBe(1);
-
- $timeout.flush(0);
- $document.find('body').click();
- assignElements(wrapElement);
- expect(dropdownEl.length).toBe(0);
- });
-
- it('sets `ng-invalid` for invalid input', function() {
- changeInputValueTo(inputEl, 'pizza');
-
- expect(inputEl).toHaveClass('ng-invalid');
- expect(inputEl).toHaveClass('ng-invalid-date');
- expect($rootScope.date).toBeUndefined();
- expect(inputEl.val()).toBe('pizza');
- });
-
- it('unsets `ng-invalid` for valid input', function() {
- changeInputValueTo(inputEl, 'pizza');
- expect(inputEl).toHaveClass('ng-invalid-date');
-
- $rootScope.date = new Date('August 11, 2013');
- $rootScope.$digest();
- expect(inputEl).not.toHaveClass('ng-invalid');
- expect(inputEl).not.toHaveClass('ng-invalid-date');
- });
-
- describe('focus', function () {
- beforeEach(function() {
- var body = $document.find('body');
- body.append(inputEl);
- body.append(dropdownEl);
- });
-
- afterEach(function() {
- inputEl.remove();
- dropdownEl.remove();
- });
-
- it('returns to the input when ESC key is pressed in the popup and closes', function() {
- expect(dropdownEl.length).toBe(1);
-
- dropdownEl.find('button').eq(0).focus();
- expect(document.activeElement.tagName).toBe('BUTTON');
-
- triggerKeyDown(dropdownEl, 'esc');
- assignElements(wrapElement);
- expect(dropdownEl.length).toBe(0);
- expect(document.activeElement.tagName).toBe('INPUT');
- });
-
- it('returns to the input when ESC key is pressed in the input and closes', function() {
- expect(dropdownEl.length).toBe(1);
-
- dropdownEl.find('button').eq(0).focus();
- expect(document.activeElement.tagName).toBe('BUTTON');
-
- triggerKeyDown(inputEl, 'esc');
- $rootScope.$digest();
- assignElements(wrapElement);
- expect(dropdownEl.length).toBe(0);
- expect(document.activeElement.tagName).toBe('INPUT');
- });
-
- it('stops the ESC key from propagating if the dropdown is open, but not when closed', function() {
- var documentKey = -1;
- var getKey = function(evt) { documentKey = evt.which; };
- $document.bind('keydown', getKey);
-
- triggerKeyDown(inputEl, 'esc');
- expect(documentKey).toBe(-1);
-
- triggerKeyDown(inputEl, 'esc');
- expect(documentKey).toBe(27);
-
- $document.unbind('keydown', getKey);
- });
- });
-
- describe('works with ngModelOptions', function () {
- var $timeout;
-
- beforeEach(inject(function(_$document_, _$sniffer_, _$timeout_) {
- $document = _$document_;
- $timeout = _$timeout_;
- $rootScope.isopen = true;
- $rootScope.date = new Date('September 30, 2010 15:30:00');
- var wrapElement = $compile('<div><input ng-model="date" ' +
- 'ng-model-options="{ debounce: 10000 }" ' +
- 'uib-datepicker-popup is-open="isopen"><div>')($rootScope);
- $rootScope.$digest();
- assignElements(wrapElement);
- }));
-
- it('should change model and update calendar after debounce timeout', function() {
- changeInputValueTo(inputEl, '1980-03-05');
-
- expect($rootScope.date.getFullYear()).toEqual(2010);
- expect($rootScope.date.getMonth()).toEqual(9 - 1);
- expect($rootScope.date.getDate()).toEqual(30);
-
- expect(getOptions(true)).toEqual([
- ['29', '30', '31', '01', '02', '03', '04'],
- ['05', '06', '07', '08', '09', '10', '11'],
- ['12', '13', '14', '15', '16', '17', '18'],
- ['19', '20', '21', '22', '23', '24', '25'],
- ['26', '27', '28', '29', '30', '01', '02'],
- ['03', '04', '05', '06', '07', '08', '09']
- ]);
-
- // No changes yet
- $timeout.flush(2000);
- expect($rootScope.date.getFullYear()).toEqual(2010);
- expect($rootScope.date.getMonth()).toEqual(9 - 1);
- expect($rootScope.date.getDate()).toEqual(30);
-
- expect(getOptions(true)).toEqual([
- ['29', '30', '31', '01', '02', '03', '04'],
- ['05', '06', '07', '08', '09', '10', '11'],
- ['12', '13', '14', '15', '16', '17', '18'],
- ['19', '20', '21', '22', '23', '24', '25'],
- ['26', '27', '28', '29', '30', '01', '02'],
- ['03', '04', '05', '06', '07', '08', '09']
- ]);
-
- $timeout.flush(10000);
- expect($rootScope.date.getFullYear()).toEqual(1980);
- expect($rootScope.date.getMonth()).toEqual(2);
- expect($rootScope.date.getDate()).toEqual(5);
-
- expect(getOptions(true)).toEqual([
- ['24', '25', '26', '27', '28', '29', '01'],
- ['02', '03', '04', '05', '06', '07', '08'],
- ['09', '10', '11', '12', '13', '14', '15'],
- ['16', '17', '18', '19', '20', '21', '22'],
- ['23', '24', '25', '26', '27', '28', '29'],
- ['30', '31', '01', '02', '03', '04', '05']
- ]);
- expectSelectedElement( 10 );
- });
- });
-
- describe('works with HTML5 date input types', function() {
- var date2 = new Date('October 1, 2010 12:34:56.789');
- beforeEach(inject(function(_$document_) {
- $document = _$document_;
- $rootScope.isopen = true;
- $rootScope.date = new Date('September 30, 2010 15:30:00');
- }));
-
- it('works as date', function() {
- setupInputWithType('date');
- expect(dropdownEl.length).toBe(1);
- expect(inputEl.val()).toBe('2010-09-30');
-
- changeInputValueTo(inputEl, '1980-03-05');
-
- expect($rootScope.date.getFullYear()).toEqual(1980);
- expect($rootScope.date.getMonth()).toEqual(2);
- expect($rootScope.date.getDate()).toEqual(5);
-
- expect(getOptions(true)).toEqual([
- ['24', '25', '26', '27', '28', '29', '01'],
- ['02', '03', '04', '05', '06', '07', '08'],
- ['09', '10', '11', '12', '13', '14', '15'],
- ['16', '17', '18', '19', '20', '21', '22'],
- ['23', '24', '25', '26', '27', '28', '29'],
- ['30', '31', '01', '02', '03', '04', '05']
- ]);
- expect(selectedElementIndex()).toEqual(10);
- });
-
- it('works as datetime-local', function() {
- setupInputWithType('datetime-local');
- expect(inputEl.val()).toBe('2010-09-30T15:30:00.000');
-
- changeInputValueTo(inputEl, '1980-03-05T12:34:56.000');
-
- expect($rootScope.date.getFullYear()).toEqual(1980);
- expect($rootScope.date.getMonth()).toEqual(2);
- expect($rootScope.date.getDate()).toEqual(5);
-
- expect(getOptions(true)).toEqual([
- ['24', '25', '26', '27', '28', '29', '01'],
- ['02', '03', '04', '05', '06', '07', '08'],
- ['09', '10', '11', '12', '13', '14', '15'],
- ['16', '17', '18', '19', '20', '21', '22'],
- ['23', '24', '25', '26', '27', '28', '29'],
- ['30', '31', '01', '02', '03', '04', '05']
- ]);
- expect(selectedElementIndex()).toEqual(10);
- });
-
- it('works as month', function() {
- setupInputWithType('month');
- expect(inputEl.val()).toBe('2010-09');
-
- changeInputValueTo(inputEl, '1980-03');
-
- expect($rootScope.date.getFullYear()).toEqual(1980);
- expect($rootScope.date.getMonth()).toEqual(2);
- expect($rootScope.date.getDate()).toEqual(30);
-
- expect(getOptions()).toEqual([
- ['January', 'February', 'March'],
- ['April', 'May', 'June'],
- ['July', 'August', 'September'],
- ['October', 'November', 'December']
- ]);
- expect(selectedElementIndex()).toEqual(2);
- });
-
- function setupInputWithType(type) {
- var wrapElement = $compile('<div><input type="' +
- type + '" ng-model="date" uib-datepicker-popup is-open="isopen"><div>')($rootScope);
- $rootScope.$digest();
- assignElements(wrapElement);
- }
- });
-
- });
-
- describe('attribute `datepickerOptions`', function() {
- describe('show-weeks', function() {
- beforeEach(function() {
- $rootScope.opts = {
- 'show-weeks': false
- };
- var wrapElement = $compile('<div><input ng-model="date" uib-datepicker-popup datepicker-options="opts" is-open="true"></div>')($rootScope);
- $rootScope.$digest();
- assignElements(wrapElement);
- });
-
- it('hides week numbers based on variable', function() {
- expect(getLabelsRow().find('th').length).toEqual(7);
- var tr = element.find('tbody').find('tr');
- for (var i = 0; i < 5; i++) {
- expect(tr.eq(i).find('td').length).toEqual(7);
- }
- });
- });
-
- describe('init-date', function(){
- beforeEach(function() {
- $rootScope.date = null;
- $rootScope.opts = {
- 'initDate': new Date('November 9, 1980')
- };
- var wrapElement = $compile('<div><input ng-model="date" uib-datepicker-popup datepicker-options="opts" is-open="true"></div>')($rootScope);
- $rootScope.$digest();
- assignElements(wrapElement);
- });
-
- it('does not alter the model', function() {
- expect($rootScope.date).toBe(null);
- });
-
- it('shows the correct title', function() {
- expect(getTitle()).toBe('November 1980');
- });
- });
- });
-
- describe('attribute `init-date`', function() {
- beforeEach(function() {
- $rootScope.date = null;
- $rootScope.initDate = new Date('November 9, 1980');
- });
-
- describe('when initially set', function() {
- beforeEach(function() {
- var wrapElement = $compile('<div><input ng-model="date" uib-datepicker-popup init-date="initDate" is-open="true"></div>')($rootScope);
- $rootScope.$digest();
- assignElements(wrapElement);
- });
-
- it('does not alter the model', function() {
- expect($rootScope.date).toBe(null);
- });
-
- it('shows the correct title', function() {
- expect(getTitle()).toBe('November 1980');
- });
- });
-
- describe('when modified before date selected.', function() {
- beforeEach(function() {
- var wrapElement = $compile('<div><input ng-model="date" uib-datepicker-popup init-date="initDate" is-open="true"></div>')($rootScope);
- $rootScope.$digest();
- assignElements(wrapElement);
-
- $rootScope.initDate = new Date('December 20, 1981');
- $rootScope.$digest();
- });
-
- it('does not alter the model', function() {
- expect($rootScope.date).toBe(null);
- });
-
- it('shows the correct title', function() {
- expect(getTitle()).toBe('December 1981');
- });
- });
-
- describe('when modified after date selected.', function() {
- beforeEach(function() {
- var wrapElement = $compile('<div><input ng-model="date" uib-datepicker-popup init-date="initDate" is-open="true"></div>')($rootScope);
- $rootScope.$digest();
- assignElements(wrapElement);
- $rootScope.date = new Date('April 1, 1982');
- $rootScope.initDate = new Date('December 20, 1981');
- $rootScope.$digest();
- });
-
- it('does not alter the model', function() {
- expect($rootScope.date).toEqual(new Date('April 1, 1982'));
- });
-
- it('shows the correct title', function() {
- expect(getTitle()).toBe('April 1982');
- });
- });
- });
-
- describe('toggles programatically by `open` attribute', function() {
- var wrapElement;
-
- beforeEach(inject(function() {
- $rootScope.open = true;
- wrapElement = $compile('<div><input ng-model="date" uib-datepicker-popup is-open="open"><div>')($rootScope);
- $rootScope.$digest();
- assignElements(wrapElement);
- }));
-
- it('to display initially', function() {
- expect(dropdownEl.length).toBe(1);
- });
-
- it('to close / open from scope variable', function() {
- expect(dropdownEl.length).toBe(1);
- $rootScope.open = false;
- $rootScope.$digest();
- assignElements(wrapElement);
- expect(dropdownEl.length).toBe(0);
-
- $rootScope.open = true;
- $rootScope.$digest();
- assignElements(wrapElement);
- expect(dropdownEl.length).toBe(1);
- });
- });
-
- describe('custom format', function() {
- beforeEach(inject(function() {
- var wrapElement = $compile('<div><input ng-model="date" uib-datepicker-popup="dd-MMMM-yyyy" is-open="true"><div>')($rootScope);
- $rootScope.$digest();
- assignElements(wrapElement);
- }));
-
- it('to display the correct value in input', function() {
- expect(inputEl.val()).toBe('30-September-2010');
- });
-
- it('updates the input when a day is clicked', function() {
- clickOption(17);
- expect(inputEl.val()).toBe('15-September-2010');
- expect($rootScope.date).toEqual(new Date('September 15, 2010 15:30:00'));
- });
-
- it('updates the input correctly when model changes', function() {
- $rootScope.date = new Date('January 10, 1983 10:00:00');
- $rootScope.$digest();
- expect(inputEl.val()).toBe('10-January-1983');
- });
- });
-
- describe('dynamic custom format', function() {
- beforeEach(inject(function() {
- $rootScope.format = 'dd-MMMM-yyyy';
- var wrapElement = $compile('<div><input ng-model="date" uib-datepicker-popup="{{format}}" is-open="true"><div>')($rootScope);
- $rootScope.$digest();
- assignElements(wrapElement);
- }));
-
- it('to display the correct value in input', function() {
- expect(inputEl.val()).toBe('30-September-2010');
- });
-
- it('updates the input when a day is clicked', function() {
- clickOption(17);
- expect(inputEl.val()).toBe('15-September-2010');
- expect($rootScope.date).toEqual(new Date('September 15, 2010 15:30:00'));
- });
-
- it('updates the input correctly when model changes', function() {
- $rootScope.date = new Date('August 11, 2013 09:09:00');
- $rootScope.$digest();
- expect(inputEl.val()).toBe('11-August-2013');
- });
-
- it('updates the input correctly when format changes', function() {
- $rootScope.format = 'dd/MM/yyyy';
- $rootScope.$digest();
- expect(inputEl.val()).toBe('30/09/2010');
- });
- });
-
- describe('european format', function() {
- it('dd.MM.yyyy', function() {
- var wrapElement = $compile('<div><input ng-model="date" uib-datepicker-popup="dd.MM.yyyy"><div>')($rootScope);
- $rootScope.$digest();
- assignElements(wrapElement);
-
- changeInputValueTo(inputEl, '11.08.2013');
- expect($rootScope.date.getFullYear()).toEqual(2013);
- expect($rootScope.date.getMonth()).toEqual(7);
- expect($rootScope.date.getDate()).toEqual(11);
- });
- });
-
- describe('`close-on-date-selection` attribute', function() {
- var wrapElement;
- beforeEach(inject(function() {
- $rootScope.close = false;
- wrapElement = $compile('<div><input ng-model="date" uib-datepicker-popup close-on-date-selection="close" is-open="true"><div>')($rootScope);
- $rootScope.$digest();
- assignElements(wrapElement);
- }));
-
- it('does not close the dropdown when a day is clicked', function() {
- clickOption(17);
- assignElements(wrapElement);
- expect(dropdownEl.length).toBe(1);
- });
- });
-
- describe('button bar', function() {
- var buttons, buttonBarElement;
-
- function assignButtonBar() {
- buttonBarElement = dropdownEl.find('li').eq(-1);
- buttons = buttonBarElement.find('button');
- }
-
- describe('', function() {
- var wrapElement;
-
- beforeEach(inject(function() {
- $rootScope.isopen = true;
- wrapElement = $compile('<div><input ng-model="date" uib-datepicker-popup is-open="isopen"><div>')($rootScope);
- $rootScope.$digest();
- assignElements(wrapElement);
- assignButtonBar();
- }));
-
- it('should exist', function() {
- expect(dropdownEl.length).toBe(1);
- expect(dropdownEl.find('li').length).toBe(2);
- });
-
- it('should have three buttons', function() {
- expect(buttons.length).toBe(3);
-
- expect(buttons.eq(0).text()).toBe('Today');
- expect(buttons.eq(1).text()).toBe('Clear');
- expect(buttons.eq(2).text()).toBe('Done');
- });
-
- it('should have a button to set today date without altering time part', function() {
- var today = new Date();
- buttons.eq(0).click();
- expect($rootScope.date.getFullYear()).toBe(today.getFullYear());
- expect($rootScope.date.getMonth()).toBe(today.getMonth());
- expect($rootScope.date.getDate()).toBe(today.getDate());
-
- expect($rootScope.date.getHours()).toBe(15);
- expect($rootScope.date.getMinutes()).toBe(30);
- expect($rootScope.date.getSeconds()).toBe(0);
- });
-
- it('should have a button to set today date if blank', function() {
- $rootScope.date = null;
- $rootScope.$digest();
-
- var today = new Date();
- buttons.eq(0).click();
- expect($rootScope.date.getFullYear()).toBe(today.getFullYear());
- expect($rootScope.date.getMonth()).toBe(today.getMonth());
- expect($rootScope.date.getDate()).toBe(today.getDate());
-
- expect($rootScope.date.getHours()).toBe(0);
- expect($rootScope.date.getMinutes()).toBe(0);
- expect($rootScope.date.getSeconds()).toBe(0);
- });
-
- it('should have a button to clear value', function() {
- buttons.eq(1).click();
- expect($rootScope.date).toBe(null);
- });
-
- it('should have a button to close calendar', function() {
- buttons.eq(2).click();
- assignElements(wrapElement);
- expect(dropdownEl.length).toBe(0);
- });
- });
-
- describe('customization', function() {
- it('should change text from attributes', function() {
- $rootScope.clearText = 'Null it!';
- $rootScope.close = 'Close';
- var wrapElement = $compile('<div><input ng-model="date" uib-datepicker-popup current-text="Now" clear-text="{{clearText}}" close-text="{{close}}ME" is-open="true"><div>')($rootScope);
- $rootScope.$digest();
- assignElements(wrapElement);
- assignButtonBar();
-
- expect(buttons.eq(0).text()).toBe('Now');
- expect(buttons.eq(1).text()).toBe('Null it!');
- expect(buttons.eq(2).text()).toBe('CloseME');
- });
-
- it('should disable today button if before min date', function() {
- $rootScope.minDate = new Date().setDate(new Date().getDate() + 1);
- var wrapElement = $compile('<div><input ng-model="date" uib-datepicker-popup min-date="minDate" is-open="true"><div>')($rootScope);
- $rootScope.$digest();
- assignElements(wrapElement);
- assignButtonBar();
-
- expect(buttons.eq(0).prop('disabled')).toBe(true);
- });
-
- it('should disable today button if after max date', function() {
- $rootScope.maxDate = new Date().setDate(new Date().getDate() - 2);
- var wrapElement = $compile('<div><input ng-model="date" uib-datepicker-popup max-date="maxDate" is-open="true"><div>')($rootScope);
- $rootScope.$digest();
- assignElements(wrapElement);
- assignButtonBar();
-
- expect(buttons.eq(0).prop('disabled')).toBe(true);
- });
-
- it('should remove bar', function() {
- $rootScope.showBar = false;
- var wrapElement = $compile('<div><input ng-model="date" uib-datepicker-popup show-button-bar="showBar" is-open="true"><div>')($rootScope);
- $rootScope.$digest();
- assignElements(wrapElement);
- expect(dropdownEl.find('li').length).toBe(1);
- });
-
- it('should hide weeks column on popup', function() {
- var wrapElement = $compile('<div><input ng-model="date" uib-datepicker-popup show-weeks="false" is-open="true"><div>')($rootScope);
- $rootScope.$digest();
- assignElements(wrapElement);
-
- expect(getLabelsRow().find('th').length).toEqual(7);
- var tr = element.find('tbody').find('tr');
- for (var i = 0; i < 5; i++) {
- expect(tr.eq(i).find('td').length).toEqual(7);
- }
- });
-
- it('should show weeks column on popup', function() {
- var wrapElement = $compile('<div><input ng-model="date" uib-datepicker-popup show-weeks="true" is-open="true"><div>')($rootScope);
- $rootScope.$digest();
- assignElements(wrapElement);
-
- expect(getLabelsRow().find('th').eq(0)).not.toBeHidden();
- var tr = element.find('tbody').find('tr');
- for (var i = 0; i < 5; i++) {
- expect(tr.eq(i).find('td').eq(0)).not.toBeHidden();
- }
- });
- });
-
- describe('`ng-change`', function() {
- beforeEach(inject(function() {
- $rootScope.changeHandler = jasmine.createSpy('changeHandler');
- var wrapElement = $compile('<div><input ng-model="date" uib-datepicker-popup ng-change="changeHandler()" is-open="true"><div>')($rootScope);
- $rootScope.$digest();
- assignElements(wrapElement);
- assignButtonBar();
- }));
-
- it('should be called when `today` is clicked', function() {
- buttons.eq(0).click();
- expect($rootScope.changeHandler).toHaveBeenCalled();
- });
-
- it('should be called when `clear` is clicked', function() {
- buttons.eq(1).click();
- expect($rootScope.changeHandler).toHaveBeenCalled();
- });
-
- it('should not be called when `close` is clicked', function() {
- buttons.eq(2).click();
- expect($rootScope.changeHandler).not.toHaveBeenCalled();
- });
- });
- });
-
- describe('use with `ng-required` directive', function() {
- describe('`ng-required is true`', function() {
- beforeEach(inject(function() {
- $rootScope.date = '';
- var wrapElement = $compile('<div><input ng-model="date" uib-datepicker-popup ng-required="true"><div>')($rootScope);
- $rootScope.$digest();
- assignElements(wrapElement);
- }));
-
- it('should be invalid initially and when no date', function() {
- expect(inputEl.hasClass('ng-invalid')).toBeTruthy();
- });
-
- it('should be valid if model has been specified', function() {
- $rootScope.date = new Date();
- $rootScope.$digest();
- expect(inputEl.hasClass('ng-valid')).toBeTruthy();
- });
-
- it('should be valid if model value is a valid timestamp', function() {
- $rootScope.date = Date.now();
- $rootScope.$digest();
- expect(inputEl.hasClass('ng-valid')).toBeTruthy();
- });
- });
- describe('`ng-required is false`', function() {
- beforeEach(inject(function() {
- $rootScope.date = '';
- var wrapElement = $compile('<div><input ng-model="date" uib-datepicker-popup ng-required="false"><div>')($rootScope);
- $rootScope.$digest();
- assignElements(wrapElement);
- }));
-
- it('should be valid initially and when no date', function() {
- expect(inputEl.hasClass('ng-valid')).toBeTruthy();
- });
- });
- });
-
- describe('use with `ng-change` directive', function() {
- beforeEach(inject(function() {
- $rootScope.changeHandler = jasmine.createSpy('changeHandler');
- $rootScope.date = new Date('09/16/2010');
- var wrapElement = $compile('<div><input ng-model="date" uib-datepicker-popup ng-required="true" ng-change="changeHandler()" is-open="true"><div>')($rootScope);
- $rootScope.$digest();
- assignElements(wrapElement);
- }));
-
- it('should not be called initially', function() {
- expect($rootScope.changeHandler).not.toHaveBeenCalled();
- });
-
- it('should be called when a day is clicked', function() {
- clickOption(17);
- expect($rootScope.changeHandler).toHaveBeenCalled();
- });
-
- it('should not be called when model changes programatically', function() {
- $rootScope.date = new Date();
- $rootScope.$digest();
- expect($rootScope.changeHandler).not.toHaveBeenCalled();
- });
- });
-
- describe('with datepicker-popup-template-url', function() {
- beforeEach(function() {
- $rootScope.date = new Date();
- });
-
- afterEach(function () {
- $document.find('body').find('.dropdown-menu').remove();
- });
-
- it('should allow custom templates for the popup', function() {
- $templateCache.put('foo/bar.html', '<div>baz</div>');
-
- var elm = angular.element('<div><input ng-model="date" uib-datepicker-popup datepicker-popup-template-url="foo/bar.html" is-open="true"></div>');
-
- $compile(elm)($rootScope);
- $rootScope.$digest();
-
- expect(elm.children().eq(1).html()).toBe('baz');
- });
- });
-
- describe('with datepicker-template-url', function() {
- beforeEach(function() {
- $rootScope.date = new Date();
- });
-
- afterEach(function() {
- $document.find('body').find('.dropdown-menu').remove();
- });
-
- it('should allow custom templates for the datepicker', function() {
- $templateCache.put('foo/bar.html', '<div>baz</div>');
-
- var elm = angular.element('<div><input ng-model="date" uib-datepicker-popup datepicker-template-url="foo/bar.html" is-open="true"></div>');
-
- $compile(elm)($rootScope);
- $rootScope.$digest();
-
- var datepicker = elm.find('[uib-datepicker]');
-
- expect(datepicker.html()).toBe('baz');
- });
- });
-
- describe('with an append-to-body attribute', function() {
- beforeEach(function() {
- $rootScope.date = new Date();
- });
-
- afterEach(function() {
- $document.find('body').children().remove();
- });
-
- it('should append to the body', function() {
- var $body = $document.find('body'),
- bodyLength = $body.children().length,
- elm = angular.element(
- '<div><input uib-datepicker-popup ng-model="date" datepicker-append-to-body="true" is-open="true" /></div>'
- );
- $compile(elm)($rootScope);
- $rootScope.$digest();
-
- expect($body.children().length).toEqual(bodyLength + 1);
- expect(elm.children().length).toEqual(1);
- });
- it('should be removed on scope destroy', function() {
- var $body = $document.find('body'),
- bodyLength = $body.children().length,
- isolatedScope = $rootScope.$new(),
- elm = angular.element(
- '<input uib-datepicker-popup ng-model="date" datepicker-append-to-body="true" is-open="true" />'
- );
- $compile(elm)(isolatedScope);
- isolatedScope.$digest();
- expect($body.children().length).toEqual(bodyLength + 1);
- isolatedScope.$destroy();
- expect($body.children().length).toEqual(bodyLength);
- });
- });
-
- describe('with setting datepickerConfig.showWeeks to false', function() {
- var originalConfig = {};
- beforeEach(inject(function(uibDatepickerConfig) {
- angular.extend(originalConfig, uibDatepickerConfig);
- uibDatepickerConfig.showWeeks = false;
-
- var wrapElement = $compile('<div><input ng-model="date" uib-datepicker-popup is-open="true"><div>')($rootScope);
- $rootScope.$digest();
- assignElements(wrapElement);
- }));
- afterEach(inject(function(uibDatepickerConfig) {
- // return it to the original state
- angular.extend(uibDatepickerConfig, originalConfig);
- }));
-
- it('changes initial visibility for weeks', function() {
- expect(getLabelsRow().find('th').length).toEqual(7);
- var tr = element.find('tbody').find('tr');
- for (var i = 0; i < 5; i++) {
- expect(tr.eq(i).find('td').length).toEqual(7);
- }
- });
- });
-
- describe('`datepicker-mode`', function() {
- beforeEach(inject(function() {
- $rootScope.date = new Date('August 11, 2013');
- $rootScope.mode = 'month';
- var wrapElement = $compile('<div><input ng-model="date" uib-datepicker-popup datepicker-mode="mode" is-open="true"></div>')($rootScope);
- $rootScope.$digest();
- assignElements(wrapElement);
- }));
-
- it('shows the correct title', function() {
- expect(getTitle()).toBe('2013');
- });
-
- it('updates binding', function() {
- clickTitleButton();
- expect($rootScope.mode).toBe('year');
- });
- });
-
- describe('attribute `initDate`', function() {
- var weekHeader, weekElement;
- beforeEach(function() {
- $rootScope.date = null;
- $rootScope.initDate = new Date('November 9, 1980');
- var wrapElement = $compile('<div><input ng-model="date" uib-datepicker-popup init-date="initDate" is-open="true"></div>')($rootScope);
- $rootScope.$digest();
- assignElements(wrapElement);
- });
-
- it('should not alter the model', function() {
- expect($rootScope.date).toBe(null);
- });
-
- it('shows the correct title', function() {
- expect(getTitle()).toBe('November 1980');
- });
- });
-
- describe('attribute `onOpenFocus`', function() {
- beforeEach(function() {
- $rootScope.date = null;
- $rootScope.isopen = false;
- var wrapElement = $compile('<div><input ng-model="date" uib-datepicker-popup on-open-focus="false" is-open="isopen"></div>')($rootScope);
- $rootScope.$digest();
- assignElements(wrapElement);
- });
-
- it('should remain focused on the input', function() {
- var focused = true;
- expect(dropdownEl.length).toBe(0);
-
- inputEl[0].focus();
- inputEl.on('blur', function() {
- focused = false;
- });
- $rootScope.isopen = true;
- $rootScope.$digest();
-
- expect(inputEl.parent().find('.dropdown-menu').length).toBe(1);
- expect(focused).toBe(true);
- });
- });
- });
-
- describe('with empty initial state', function() {
- beforeEach(inject(function() {
- $rootScope.date = null;
- element = $compile('<uib-datepicker ng-model="date"></uib-datepicker>')($rootScope);
- $rootScope.$digest();
- }));
-
- it('is has a `<table>` element', function() {
- expect(element.find('table').length).toBe(1);
- });
-
- it('is shows rows with days', function() {
- expect(element.find('tbody').find('tr').length).toBeGreaterThan(3);
- });
-
- it('sets default 00:00:00 time for selected date', function() {
- $rootScope.date = new Date('August 1, 2013');
- $rootScope.$digest();
- $rootScope.date = null;
- $rootScope.$digest();
-
- clickOption(14);
- expect($rootScope.date).toEqual(new Date('August 11, 2013 00:00:00'));
- });
- });
-
- describe('`init-date`', function() {
- beforeEach(inject(function() {
- $rootScope.date = null;
- $rootScope.initDate = new Date('November 9, 1980');
- element = $compile('<uib-datepicker ng-model="date" init-date="initDate"></uib-datepicker>')($rootScope);
- $rootScope.$digest();
- }));
-
- it('does not alter the model', function() {
- expect($rootScope.date).toBe(null);
- });
-
- it('shows the correct title', function() {
- expect(getTitle()).toBe('November 1980');
- });
- });
-
- describe('`datepicker-mode`', function() {
- beforeEach(inject(function() {
- $rootScope.date = new Date('August 11, 2013');
- $rootScope.mode = 'month';
- element = $compile('<uib-datepicker ng-model="date" datepicker-mode="mode"></uib-datepicker>')($rootScope);
- $rootScope.$digest();
- }));
-
- it('shows the correct title', function() {
- expect(getTitle()).toBe('2013');
- });
-
- it('updates binding', function() {
- clickTitleButton();
- expect($rootScope.mode).toBe('year');
- });
- });
-
- describe('`min-mode`', function() {
- beforeEach(inject(function() {
- $rootScope.date = new Date('August 11, 2013');
- $rootScope.mode = 'month';
- $rootScope.minMode = 'month';
- element = $compile('<uib-datepicker ng-model="date" min-mode="minMode" datepicker-mode="mode"></uib-datepicker>')($rootScope);
- $rootScope.$digest();
- }));
-
- it('does not move below it', function() {
- expect(getTitle()).toBe('2013');
- clickOption( 5 );
- expect(getTitle()).toBe('2013');
- clickTitleButton();
- expect(getTitle()).toBe('2001 - 2020');
- $rootScope.minMode = 'year';
- $rootScope.$digest();
- clickOption( 5 );
- expect(getTitle()).toBe('2001 - 2020');
- });
-
- it('updates current mode if necessary', function() {
- expect(getTitle()).toBe('2013');
- $rootScope.minMode = 'year';
- $rootScope.$digest();
- expect(getTitle()).toBe('2001 - 2020');
- });
- });
-
- describe('`max-mode`', function() {
- beforeEach(inject(function() {
- $rootScope.date = new Date('August 11, 2013');
- $rootScope.maxMode = 'month';
- element = $compile('<uib-datepicker ng-model="date" max-mode="maxMode"></uib-datepicker>')($rootScope);
- $rootScope.$digest();
- }));
-
- it('does not move above it', function() {
- expect(getTitle()).toBe('August 2013');
- clickTitleButton();
- expect(getTitle()).toBe('2013');
- clickTitleButton();
- expect(getTitle()).toBe('2013');
- clickOption( 10 );
- expect(getTitle()).toBe('November 2013');
- $rootScope.maxMode = 'day';
- $rootScope.$digest();
- clickTitleButton();
- expect(getTitle()).toBe('November 2013');
- });
-
- it('disables the title button at it', function() {
- expect(getTitleButton().prop('disabled')).toBe(false);
- clickTitleButton();
- expect(getTitleButton().prop('disabled')).toBe(true);
- clickTitleButton();
- expect(getTitleButton().prop('disabled')).toBe(true);
- clickOption( 10 );
- expect(getTitleButton().prop('disabled')).toBe(false);
- $rootScope.maxMode = 'day';
- $rootScope.$digest();
- expect(getTitleButton().prop('disabled')).toBe(true);
- });
-
- it('updates current mode if necessary', function() {
- expect(getTitle()).toBe('August 2013');
- clickTitleButton();
- expect(getTitle()).toBe('2013');
- $rootScope.maxMode = 'day';
- $rootScope.$digest();
- expect(getTitle()).toBe('August 2013');
- });
- });
-
- describe('with an ngModelController having formatters and parsers', function() {
- beforeEach(inject(function() {
- // Custom date object.
- $rootScope.date = { type: 'date', date: 'April 1, 2015 00:00:00' };
-
- // Use dateModel directive to add formatters and parsers to the
- // ngModelController that translate the custom date object.
- element = $compile('<uib-datepicker ng-model="date" date-model></uib-datepicker>')($rootScope);
- $rootScope.$digest();
- }));
-
- it('updates the view', function() {
- $rootScope.date = { type: 'date', date: 'April 15, 2015 00:00:00' };
- $rootScope.$digest();
-
- expectSelectedElement(17);
- });
-
- it('updates the model', function() {
- clickOption(17);
-
- expect($rootScope.date.type).toEqual('date');
- expect(new Date($rootScope.date.date)).toEqual(new Date('April 15, 2015 00:00:00'));
- });
- });
-
- describe('thursdays determine week count', function() {
- beforeEach(inject(function() {
- $rootScope.date = new Date('June 07, 2014');
- }));
-
- it('with the default starting day (sunday)', function() {
- element = $compile('<uib-datepicker ng-model="date"></uib-datepicker>')($rootScope);
- $rootScope.$digest();
-
- expect(getWeeks()).toEqual(['23', '24', '25', '26', '27', '28']);
- });
-
- describe('when starting date', function() {
- it('is monday', function() {
- element = $compile('<uib-datepicker ng-model="date" starting-day="1"></uib-datepicker>')($rootScope);
- $rootScope.$digest();
-
- expect(getWeeks()).toEqual(['22', '23', '24', '25', '26', '27']);
- });
-
- it('is thursday', function() {
- element = $compile('<uib-datepicker ng-model="date" starting-day="4"></uib-datepicker>')($rootScope);
- $rootScope.$digest();
-
- expect(getWeeks()).toEqual(['22', '23', '24', '25', '26', '27']);
- });
-
- it('is saturday', function() {
- element = $compile('<uib-datepicker ng-model="date" starting-day="6"></uib-datepicker>')($rootScope);
- $rootScope.$digest();
-
- expect(getWeeks()).toEqual(['23', '24', '25', '26', '27', '28']);
- });
- });
-
- describe('first week in january', function() {
- it('in current year', function() {
- $rootScope.date = new Date('January 07, 2014');
- element = $compile('<uib-datepicker ng-model="date"></uib-datepicker>')($rootScope);
- $rootScope.$digest();
-
- expect(getWeeks()).toEqual(['1', '2', '3', '4', '5', '6']);
- });
-
- it('in last year', function() {
- $rootScope.date = new Date('January 07, 2010');
- element = $compile('<uib-datepicker ng-model="date"></uib-datepicker>')($rootScope);
- $rootScope.$digest();
-
- expect(getWeeks()).toEqual(['53', '1', '2', '3', '4', '5']);
- });
- });
-
- describe('last week(s) in december', function() {
- beforeEach(inject(function() {
- $rootScope.date = new Date('December 07, 2014');
- }));
-
- it('in next year', function() {
- element = $compile('<uib-datepicker ng-model="date"></uib-datepicker>')($rootScope);
- $rootScope.$digest();
-
- expect(getWeeks()).toEqual(['49', '50', '51', '52', '1', '2']);
- });
- });
- });
- });
-});
-
-/* deprecation tests below */
-
-describe('datepicker deprecation', function() {
- beforeEach(module('ui.bootstrap.datepicker'));
- beforeEach(module('template/datepicker/datepicker.html'));
- beforeEach(module('template/datepicker/day.html'));
- beforeEach(module('template/datepicker/month.html'));
- beforeEach(module('template/datepicker/year.html'));
- beforeEach(module('template/datepicker/popup.html'));
-
- it('should suppress warning', function() {
- module(function($provide) {
- $provide.value('$datepickerSuppressWarning', true);
- });
-
- inject(function($compile, $log, $rootScope) {
- spyOn($log, 'warn');
-
- var element = $compile('<datepicker ng-model="date"></datepicker>')($rootScope);
- $rootScope.$digest();
- expect($log.warn.calls.count()).toBe(0);
- });
- });
-
- it('should give warning by default', inject(function($log) {
- spyOn($log, 'warn');
-
- inject(function($compile, $templateCache, $rootScope) {
- var datepickerTemplate =
- '<div ng-switch="datepickerMode" role="application" ng-keydown="keydown($event)">' +
- '<daypicker ng-switch-when="day" tabindex="0"></daypicker>' +
- '<monthpicker ng-switch-when="month" tabindex="0"></monthpicker>' +
- '<yearpicker ng-switch-when="year" tabindex="0"></yearpicker> ' +
- '</div>';
- $templateCache.put('template/datepicker/datepicker.html', datepickerTemplate);
-
- var element = $compile('<datepicker ng-model="date"></datepicker>')($rootScope);
- $rootScope.$digest();
-
- expect($log.warn.calls.count()).toBe(3);
- expect($log.warn.calls.argsFor(0)).toEqual(['DatepickerController is now deprecated. Use UibDatepickerController instead.']);
- expect($log.warn.calls.argsFor(1)).toEqual(['datepicker is now deprecated. Use uib-datepicker instead.']);
- expect($log.warn.calls.argsFor(2)).toEqual(['daypicker is now deprecated. Use uib-daypicker instead.']);
-
- $log.warn.calls.reset();
-
- element = $compile('<datepicker datepicker-mode="\'month\'" ng-model="date"></datepicker>')($rootScope);
- $rootScope.$digest();
-
- expect($log.warn.calls.count()).toBe(3);
- expect($log.warn.calls.argsFor(0)).toEqual(['DatepickerController is now deprecated. Use UibDatepickerController instead.']);
- expect($log.warn.calls.argsFor(1)).toEqual(['datepicker is now deprecated. Use uib-datepicker instead.']);
- expect($log.warn.calls.argsFor(2)).toEqual(['monthpicker is now deprecated. Use uib-monthpicker instead.']);
-
- $log.warn.calls.reset();
-
- element = $compile('<datepicker datepicker-mode="\'year\'" ng-model="date"></datepicker>')($rootScope);
- $rootScope.$digest();
-
- expect($log.warn.calls.count()).toBe(3);
- expect($log.warn.calls.argsFor(0)).toEqual(['DatepickerController is now deprecated. Use UibDatepickerController instead.']);
- expect($log.warn.calls.argsFor(1)).toEqual(['datepicker is now deprecated. Use uib-datepicker instead.']);
- expect($log.warn.calls.argsFor(2)).toEqual(['yearpicker is now deprecated. Use uib-yearpicker instead.']);
-
- $log.warn.calls.reset();
-
- element = $compile('<input type="date" datepicker-popup ng-model="dt" />')($rootScope);
- $rootScope.$digest();
-
- expect($log.warn.calls.count()).toBe(1);
- expect($log.warn.calls.argsFor(0)).toEqual(['datepicker-popup is now deprecated. Use uib-datepicker-popup instead.']);
- });
- }));
-});
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/dropdown/docs/demo.html b/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/dropdown/docs/demo.html
deleted file mode 100644
index 7d6f146..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/dropdown/docs/demo.html
+++ /dev/null
@@ -1,98 +0,0 @@
-
-<div ng-controller="DropdownCtrl">
- <!-- Simple dropdown -->
- <span uib-dropdown on-toggle="toggled(open)">
- <a href id="simple-dropdown" uib-dropdown-toggle>
- Click me for a dropdown, yo!
- </a>
- <ul class="uib-dropdown-menu" aria-labelledby="simple-dropdown">
- <li ng-repeat="choice in items">
- <a href>{{choice}}</a>
- </li>
- </ul>
- </span>
-
- <!-- Single button -->
- <div class="btn-group" uib-dropdown is-open="status.isopen">
- <button id="single-button" type="button" class="btn btn-primary" uib-dropdown-toggle ng-disabled="disabled">
- Button dropdown <span class="caret"></span>
- </button>
- <ul class="uib-dropdown-menu" role="menu" aria-labelledby="single-button">
- <li role="menuitem"><a href="#">Action</a></li>
- <li role="menuitem"><a href="#">Another action</a></li>
- <li role="menuitem"><a href="#">Something else here</a></li>
- <li class="divider"></li>
- <li role="menuitem"><a href="#">Separated link</a></li>
- </ul>
- </div>
-
- <!-- Split button -->
- <div class="btn-group" uib-dropdown>
- <button id="split-button" type="button" class="btn btn-danger">Action</button>
- <button type="button" class="btn btn-danger" uib-dropdown-toggle>
- <span class="caret"></span>
- <span class="sr-only">Split button!</span>
- </button>
- <ul class="uib-dropdown-menu" role="menu" aria-labelledby="split-button">
- <li role="menuitem"><a href="#">Action</a></li>
- <li role="menuitem"><a href="#">Another action</a></li>
- <li role="menuitem"><a href="#">Something else here</a></li>
- <li class="divider"></li>
- <li role="menuitem"><a href="#">Separated link</a></li>
- </ul>
- </div>
-
- <!-- Single button using append-to-body -->
- <div class="btn-group" uib-dropdown dropdown-append-to-body>
- <button id="btn-append-to-body" type="button" class="btn btn-primary" uib-dropdown-toggle>
- Dropdown on Body <span class="caret"></span>
- </button>
- <ul class="uib-dropdown-menu" role="menu" aria-labelledby="btn-append-to-body">
- <li role="menuitem"><a href="#">Action</a></li>
- <li role="menuitem"><a href="#">Another action</a></li>
- <li role="menuitem"><a href="#">Something else here</a></li>
- <li class="divider"></li>
- <li role="menuitem"><a href="#">Separated link</a></li>
- </ul>
- </div>
-
- <!-- Single button using template-url -->
- <div class="btn-group" uib-dropdown>
- <button id="button-template-url" type="button" class="btn btn-primary" uib-dropdown-toggle ng-disabled="disabled">
- Dropdown using template <span class="caret"></span>
- </button>
- <ul class="uib-dropdown-menu" template-url="dropdown.html" aria-labelledby="button-template-url">
- </ul>
- </div>
-
- <hr />
- <p>
- <button type="button" class="btn btn-default btn-sm" ng-click="toggleDropdown($event)">Toggle button dropdown</button>
- <button type="button" class="btn btn-warning btn-sm" ng-click="disabled = !disabled">Enable/Disable</button>
- </p>
-
- <hr>
- <!-- Single button with keyboard nav -->
- <div class="btn-group" uib-dropdown uib-keyboard-nav>
- <button id="simple-btn-keyboard-nav" type="button" class="btn btn-primary" uib-dropdown-toggle>
- Dropdown with keyboard navigation <span class="caret"></span>
- </button>
- <ul class="uib-dropdown-menu" role="menu" aria-labelledby="simple-btn-keyboard-nav">
- <li role="menuitem"><a href="#">Action</a></li>
- <li role="menuitem"><a href="#">Another action</a></li>
- <li role="menuitem"><a href="#">Something else here</a></li>
- <li class="divider"></li>
- <li role="menuitem"><a href="#">Separated link</a></li>
- </ul>
- </div>
-
- <script type="text/ng-template" id="dropdown.html">
- <ul class="uib-dropdown-menu" role="menu" aria-labelledby="button-template-url">
- <li role="menuitem"><a href="#">Action in Template</a></li>
- <li role="menuitem"><a href="#">Another action in Template</a></li>
- <li role="menuitem"><a href="#">Something else here</a></li>
- <li class="divider"></li>
- <li role="menuitem"><a href="#">Separated link in Template</a></li>
- </ul>
- </script>
-</div>
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/dropdown/docs/demo.js b/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/dropdown/docs/demo.js
deleted file mode 100644
index 321d493..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/dropdown/docs/demo.js
+++ /dev/null
@@ -1,21 +0,0 @@
-angular.module('ui.bootstrap.demo').controller('DropdownCtrl', function ($scope, $log) {
- $scope.items = [
- 'The first choice!',
- 'And another choice for you.',
- 'but wait! A third!'
- ];
-
- $scope.status = {
- isopen: false
- };
-
- $scope.toggled = function(open) {
- $log.log('Dropdown is now: ', open);
- };
-
- $scope.toggleDropdown = function($event) {
- $event.preventDefault();
- $event.stopPropagation();
- $scope.status.isopen = !$scope.status.isopen;
- };
-});
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/dropdown/docs/readme.md b/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/dropdown/docs/readme.md
deleted file mode 100644
index b8571a1..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/dropdown/docs/readme.md
+++ /dev/null
@@ -1,19 +0,0 @@
-
-Dropdown is a simple directive which will toggle a dropdown menu on click or programmatically.
-You can either use `is-open` to toggle or add inside a `<a uib-dropdown-toggle>` element to toggle it when is clicked.
-There is also the `on-toggle(open)` optional expression fired when dropdown changes state.
-
-Add `dropdown-append-to-body` to the `uib-dropdown` element to append to the inner `dropdown-menu` to the body.
-This is useful when the dropdown button is inside a div with `overflow: hidden`, and the menu would otherwise be hidden.
-
-Add `uib-keyboard-nav` to the `uib-dropdown` element to enable navigation of dropdown list elements with the arrow keys.
-
-By default the dropdown will automatically close if any of its elements is clicked, you can change this behavior by setting the `auto-close` option as follows:
-
- * `always` - (Default) automatically closes the dropdown when any of its elements is clicked.
- * `outsideClick` - closes the dropdown automatically only when the user clicks any element outside the dropdown.
- * `disabled` - disables the auto close. You can then control the open/close status of the dropdown manually, by using `is-open`. Please notice that the dropdown will still close if the toggle is clicked, the `esc` key is pressed or another dropdown is open. The dropdown will no longer close on `$locationChangeSuccess` events.
-
-Optionally, you may specify a template for the dropdown menu using the `template-url` attribute. This is especially useful when you have multiple similar dropdowns in a repeater and you want to keep your HTML output lean and your number of scopes to a minimum. The template has full access to the scope in which the dropdown lies.
-
-Example: `<ul class="uib-dropdown-menu" template-url="custom-dropdown.html"></ul>`.
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/dropdown/dropdown.js b/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/dropdown/dropdown.js
deleted file mode 100644
index 1e666f2..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/dropdown/dropdown.js
+++ /dev/null
@@ -1,658 +0,0 @@
-angular.module('ui.bootstrap.dropdown', ['ui.bootstrap.position'])
-
-.constant('uibDropdownConfig', {
- openClass: 'open'
-})
-
-.service('uibDropdownService', ['$document', '$rootScope', function($document, $rootScope) {
- var openScope = null;
-
- this.open = function(dropdownScope) {
- if (!openScope) {
- $document.bind('click', closeDropdown);
- $document.bind('keydown', keybindFilter);
- }
-
- if (openScope && openScope !== dropdownScope) {
- openScope.isOpen = false;
- }
-
- openScope = dropdownScope;
- };
-
- this.close = function(dropdownScope) {
- if (openScope === dropdownScope) {
- openScope = null;
- $document.unbind('click', closeDropdown);
- $document.unbind('keydown', keybindFilter);
- }
- };
-
- var closeDropdown = function(evt) {
- // This method may still be called during the same mouse event that
- // unbound this event handler. So check openScope before proceeding.
- if (!openScope) { return; }
-
- if (evt && openScope.getAutoClose() === 'disabled') { return ; }
-
- var toggleElement = openScope.getToggleElement();
- if (evt && toggleElement && toggleElement[0].contains(evt.target)) {
- return;
- }
-
- var dropdownElement = openScope.getDropdownElement();
- if (evt && openScope.getAutoClose() === 'outsideClick' &&
- dropdownElement && dropdownElement[0].contains(evt.target)) {
- return;
- }
-
- openScope.isOpen = false;
-
- if (!$rootScope.$$phase) {
- openScope.$apply();
- }
- };
-
- var keybindFilter = function(evt) {
- if (evt.which === 27) {
- openScope.focusToggleElement();
- closeDropdown();
- } else if (openScope.isKeynavEnabled() && /(38|40)/.test(evt.which) && openScope.isOpen) {
- evt.preventDefault();
- evt.stopPropagation();
- openScope.focusDropdownEntry(evt.which);
- }
- };
-}])
-
-.controller('UibDropdownController', ['$scope', '$element', '$attrs', '$parse', 'uibDropdownConfig', 'uibDropdownService', '$animate', '$uibPosition', '$document', '$compile', '$templateRequest', function($scope, $element, $attrs, $parse, dropdownConfig, uibDropdownService, $animate, $position, $document, $compile, $templateRequest) {
- var self = this,
- scope = $scope.$new(), // create a child scope so we are not polluting original one
- templateScope,
- openClass = dropdownConfig.openClass,
- getIsOpen,
- setIsOpen = angular.noop,
- toggleInvoker = $attrs.onToggle ? $parse($attrs.onToggle) : angular.noop,
- appendToBody = false,
- keynavEnabled =false,
- selectedOption = null;
-
-
- $element.addClass('dropdown');
-
- this.init = function() {
- if ($attrs.isOpen) {
- getIsOpen = $parse($attrs.isOpen);
- setIsOpen = getIsOpen.assign;
-
- $scope.$watch(getIsOpen, function(value) {
- scope.isOpen = !!value;
- });
- }
-
- appendToBody = angular.isDefined($attrs.dropdownAppendToBody);
- keynavEnabled = angular.isDefined($attrs.uibKeyboardNav);
-
- if (appendToBody && self.dropdownMenu) {
- $document.find('body').append(self.dropdownMenu);
- $element.on('$destroy', function handleDestroyEvent() {
- self.dropdownMenu.remove();
- });
- }
- };
-
- this.toggle = function(open) {
- return scope.isOpen = arguments.length ? !!open : !scope.isOpen;
- };
-
- // Allow other directives to watch status
- this.isOpen = function() {
- return scope.isOpen;
- };
-
- scope.getToggleElement = function() {
- return self.toggleElement;
- };
-
- scope.getAutoClose = function() {
- return $attrs.autoClose || 'always'; //or 'outsideClick' or 'disabled'
- };
-
- scope.getElement = function() {
- return $element;
- };
-
- scope.isKeynavEnabled = function() {
- return keynavEnabled;
- };
-
- scope.focusDropdownEntry = function(keyCode) {
- var elems = self.dropdownMenu ? //If append to body is used.
- (angular.element(self.dropdownMenu).find('a')) :
- (angular.element($element).find('ul').eq(0).find('a'));
-
- switch (keyCode) {
- case (40): {
- if (!angular.isNumber(self.selectedOption)) {
- self.selectedOption = 0;
- } else {
- self.selectedOption = (self.selectedOption === elems.length - 1 ?
- self.selectedOption :
- self.selectedOption + 1);
- }
- break;
- }
- case (38): {
- if (!angular.isNumber(self.selectedOption)) {
- self.selectedOption = elems.length - 1;
- } else {
- self.selectedOption = self.selectedOption === 0 ?
- 0 : self.selectedOption - 1;
- }
- break;
- }
- }
- elems[self.selectedOption].focus();
- };
-
- scope.getDropdownElement = function() {
- return self.dropdownMenu;
- };
-
- scope.focusToggleElement = function() {
- if (self.toggleElement) {
- self.toggleElement[0].focus();
- }
- };
-
- scope.$watch('isOpen', function(isOpen, wasOpen) {
- if (appendToBody && self.dropdownMenu) {
- var pos = $position.positionElements($element, self.dropdownMenu, 'bottom-left', true);
- var css = {
- top: pos.top + 'px',
- display: isOpen ? 'block' : 'none'
- };
-
- var rightalign = self.dropdownMenu.hasClass('dropdown-menu-right');
- if (!rightalign) {
- css.left = pos.left + 'px';
- css.right = 'auto';
- } else {
- css.left = 'auto';
- css.right = (window.innerWidth - (pos.left + $element.prop('offsetWidth'))) + 'px';
- }
-
- self.dropdownMenu.css(css);
- }
-
- $animate[isOpen ? 'addClass' : 'removeClass']($element, openClass).then(function() {
- if (angular.isDefined(isOpen) && isOpen !== wasOpen) {
- toggleInvoker($scope, { open: !!isOpen });
- }
- });
-
- if (isOpen) {
- if (self.dropdownMenuTemplateUrl) {
- $templateRequest(self.dropdownMenuTemplateUrl).then(function(tplContent) {
- templateScope = scope.$new();
- $compile(tplContent.trim())(templateScope, function(dropdownElement) {
- var newEl = dropdownElement;
- self.dropdownMenu.replaceWith(newEl);
- self.dropdownMenu = newEl;
- });
- });
- }
-
- scope.focusToggleElement();
- uibDropdownService.open(scope);
- } else {
- if (self.dropdownMenuTemplateUrl) {
- if (templateScope) {
- templateScope.$destroy();
- }
- var newEl = angular.element('<ul class="dropdown-menu"></ul>');
- self.dropdownMenu.replaceWith(newEl);
- self.dropdownMenu = newEl;
- }
-
- uibDropdownService.close(scope);
- self.selectedOption = null;
- }
-
- if (angular.isFunction(setIsOpen)) {
- setIsOpen($scope, isOpen);
- }
- });
-
- $scope.$on('$locationChangeSuccess', function() {
- if (scope.getAutoClose() !== 'disabled') {
- scope.isOpen = false;
- }
- });
-
- var offDestroy = $scope.$on('$destroy', function() {
- scope.$destroy();
- });
- scope.$on('$destroy', offDestroy);
-}])
-
-.directive('uibDropdown', function() {
- return {
- controller: 'UibDropdownController',
- link: function(scope, element, attrs, dropdownCtrl) {
- dropdownCtrl.init();
- }
- };
-})
-
-.directive('uibDropdownMenu', function() {
- return {
- restrict: 'AC',
- require: '?^uibDropdown',
- link: function(scope, element, attrs, dropdownCtrl) {
- if (!dropdownCtrl || angular.isDefined(attrs.dropdownNested)) {
- return;
- }
-
- element.addClass('dropdown-menu');
-
- var tplUrl = attrs.templateUrl;
- if (tplUrl) {
- dropdownCtrl.dropdownMenuTemplateUrl = tplUrl;
- }
-
- if (!dropdownCtrl.dropdownMenu) {
- dropdownCtrl.dropdownMenu = element;
- }
- }
- };
-})
-
-.directive('uibKeyboardNav', function() {
- return {
- restrict: 'A',
- require: '?^uibDropdown',
- link: function(scope, element, attrs, dropdownCtrl) {
- element.bind('keydown', function(e) {
- if ([38, 40].indexOf(e.which) !== -1) {
- e.preventDefault();
- e.stopPropagation();
-
- var elems = dropdownCtrl.dropdownMenu.find('a');
-
- switch (e.which) {
- case (40): { // Down
- if (!angular.isNumber(dropdownCtrl.selectedOption)) {
- dropdownCtrl.selectedOption = 0;
- } else {
- dropdownCtrl.selectedOption = dropdownCtrl.selectedOption === elems.length -1 ?
- dropdownCtrl.selectedOption : dropdownCtrl.selectedOption + 1;
- }
- break;
- }
- case (38): { // Up
- if (!angular.isNumber(dropdownCtrl.selectedOption)) {
- dropdownCtrl.selectedOption = elems.length - 1;
- } else {
- dropdownCtrl.selectedOption = dropdownCtrl.selectedOption === 0 ?
- 0 : dropdownCtrl.selectedOption - 1;
- }
- break;
- }
- }
- elems[dropdownCtrl.selectedOption].focus();
- }
- });
- }
- };
-})
-
-.directive('uibDropdownToggle', function() {
- return {
- require: '?^uibDropdown',
- link: function(scope, element, attrs, dropdownCtrl) {
- if (!dropdownCtrl) {
- return;
- }
-
- element.addClass('dropdown-toggle');
-
- dropdownCtrl.toggleElement = element;
-
- var toggleDropdown = function(event) {
- event.preventDefault();
-
- if (!element.hasClass('disabled') && !attrs.disabled) {
- scope.$apply(function() {
- dropdownCtrl.toggle();
- });
- }
- };
-
- element.bind('click', toggleDropdown);
-
- // WAI-ARIA
- element.attr({ 'aria-haspopup': true, 'aria-expanded': false });
- scope.$watch(dropdownCtrl.isOpen, function(isOpen) {
- element.attr('aria-expanded', !!isOpen);
- });
-
- scope.$on('$destroy', function() {
- element.unbind('click', toggleDropdown);
- });
- }
- };
-});
-
-/* Deprecated dropdown below */
-
-angular.module('ui.bootstrap.dropdown')
-
-.value('$dropdownSuppressWarning', false)
-
-.service('dropdownService', ['$log', '$dropdownSuppressWarning', 'uibDropdownService', function($log, $dropdownSuppressWarning, uibDropdownService) {
- if (!$dropdownSuppressWarning) {
- $log.warn('dropdownService is now deprecated. Use uibDropdownService instead.');
- }
-
- angular.extend(this, uibDropdownService);
-}])
-
-.controller('DropdownController', ['$scope', '$element', '$attrs', '$parse', 'uibDropdownConfig', 'uibDropdownService', '$animate', '$uibPosition', '$document', '$compile', '$templateRequest', '$log', '$dropdownSuppressWarning', function($scope, $element, $attrs, $parse, dropdownConfig, uibDropdownService, $animate, $position, $document, $compile, $templateRequest, $log, $dropdownSuppressWarning) {
- if (!$dropdownSuppressWarning) {
- $log.warn('DropdownController is now deprecated. Use UibDropdownController instead.');
- }
-
- var self = this,
- scope = $scope.$new(), // create a child scope so we are not polluting original one
- templateScope,
- openClass = dropdownConfig.openClass,
- getIsOpen,
- setIsOpen = angular.noop,
- toggleInvoker = $attrs.onToggle ? $parse($attrs.onToggle) : angular.noop,
- appendToBody = false,
- keynavEnabled =false,
- selectedOption = null;
-
-
- $element.addClass('dropdown');
-
- this.init = function() {
- if ($attrs.isOpen) {
- getIsOpen = $parse($attrs.isOpen);
- setIsOpen = getIsOpen.assign;
-
- $scope.$watch(getIsOpen, function(value) {
- scope.isOpen = !!value;
- });
- }
-
- appendToBody = angular.isDefined($attrs.dropdownAppendToBody);
- keynavEnabled = angular.isDefined($attrs.uibKeyboardNav);
-
- if (appendToBody && self.dropdownMenu) {
- $document.find('body').append(self.dropdownMenu);
- $element.on('$destroy', function handleDestroyEvent() {
- self.dropdownMenu.remove();
- });
- }
- };
-
- this.toggle = function(open) {
- return scope.isOpen = arguments.length ? !!open : !scope.isOpen;
- };
-
- // Allow other directives to watch status
- this.isOpen = function() {
- return scope.isOpen;
- };
-
- scope.getToggleElement = function() {
- return self.toggleElement;
- };
-
- scope.getAutoClose = function() {
- return $attrs.autoClose || 'always'; //or 'outsideClick' or 'disabled'
- };
-
- scope.getElement = function() {
- return $element;
- };
-
- scope.isKeynavEnabled = function() {
- return keynavEnabled;
- };
-
- scope.focusDropdownEntry = function(keyCode) {
- var elems = self.dropdownMenu ? //If append to body is used.
- (angular.element(self.dropdownMenu).find('a')) :
- (angular.element($element).find('ul').eq(0).find('a'));
-
- switch (keyCode) {
- case (40): {
- if (!angular.isNumber(self.selectedOption)) {
- self.selectedOption = 0;
- } else {
- self.selectedOption = (self.selectedOption === elems.length -1 ?
- self.selectedOption :
- self.selectedOption + 1);
- }
- break;
- }
- case (38): {
- if (!angular.isNumber(self.selectedOption)) {
- self.selectedOption = elems.length - 1;
- } else {
- self.selectedOption = self.selectedOption === 0 ?
- 0 : self.selectedOption - 1;
- }
- break;
- }
- }
- elems[self.selectedOption].focus();
- };
-
- scope.getDropdownElement = function() {
- return self.dropdownMenu;
- };
-
- scope.focusToggleElement = function() {
- if (self.toggleElement) {
- self.toggleElement[0].focus();
- }
- };
-
- scope.$watch('isOpen', function(isOpen, wasOpen) {
- if (appendToBody && self.dropdownMenu) {
- var pos = $position.positionElements($element, self.dropdownMenu, 'bottom-left', true);
- var css = {
- top: pos.top + 'px',
- display: isOpen ? 'block' : 'none'
- };
-
- var rightalign = self.dropdownMenu.hasClass('dropdown-menu-right');
- if (!rightalign) {
- css.left = pos.left + 'px';
- css.right = 'auto';
- } else {
- css.left = 'auto';
- css.right = (window.innerWidth - (pos.left + $element.prop('offsetWidth'))) + 'px';
- }
-
- self.dropdownMenu.css(css);
- }
-
- $animate[isOpen ? 'addClass' : 'removeClass']($element, openClass).then(function() {
- if (angular.isDefined(isOpen) && isOpen !== wasOpen) {
- toggleInvoker($scope, { open: !!isOpen });
- }
- });
-
- if (isOpen) {
- if (self.dropdownMenuTemplateUrl) {
- $templateRequest(self.dropdownMenuTemplateUrl).then(function(tplContent) {
- templateScope = scope.$new();
- $compile(tplContent.trim())(templateScope, function(dropdownElement) {
- var newEl = dropdownElement;
- self.dropdownMenu.replaceWith(newEl);
- self.dropdownMenu = newEl;
- });
- });
- }
-
- scope.focusToggleElement();
- uibDropdownService.open(scope);
- } else {
- if (self.dropdownMenuTemplateUrl) {
- if (templateScope) {
- templateScope.$destroy();
- }
- var newEl = angular.element('<ul class="dropdown-menu"></ul>');
- self.dropdownMenu.replaceWith(newEl);
- self.dropdownMenu = newEl;
- }
-
- uibDropdownService.close(scope);
- self.selectedOption = null;
- }
-
- if (angular.isFunction(setIsOpen)) {
- setIsOpen($scope, isOpen);
- }
- });
-
- $scope.$on('$locationChangeSuccess', function() {
- if (scope.getAutoClose() !== 'disabled') {
- scope.isOpen = false;
- }
- });
-
- var offDestroy = $scope.$on('$destroy', function() {
- scope.$destroy();
- });
- scope.$on('$destroy', offDestroy);
-}])
-
-.directive('dropdown', ['$log', '$dropdownSuppressWarning', function($log, $dropdownSuppressWarning) {
- return {
- controller: 'DropdownController',
- link: function(scope, element, attrs, dropdownCtrl) {
- if (!$dropdownSuppressWarning) {
- $log.warn('dropdown is now deprecated. Use uib-dropdown instead.');
- }
-
- dropdownCtrl.init();
- }
- };
-}])
-
-.directive('dropdownMenu', ['$log', '$dropdownSuppressWarning', function($log, $dropdownSuppressWarning) {
- return {
- restrict: 'AC',
- require: '?^dropdown',
- link: function(scope, element, attrs, dropdownCtrl) {
- if (!dropdownCtrl || angular.isDefined(attrs.dropdownNested)) {
- return;
- }
-
- if (!$dropdownSuppressWarning) {
- $log.warn('dropdown-menu is now deprecated. Use uib-dropdown-menu instead.');
- }
-
- element.addClass('dropdown-menu');
-
- var tplUrl = attrs.templateUrl;
- if (tplUrl) {
- dropdownCtrl.dropdownMenuTemplateUrl = tplUrl;
- }
-
- if (!dropdownCtrl.dropdownMenu) {
- dropdownCtrl.dropdownMenu = element;
- }
- }
- };
-}])
-
-.directive('keyboardNav', ['$log', '$dropdownSuppressWarning', function($log, $dropdownSuppressWarning) {
- return {
- restrict: 'A',
- require: '?^dropdown',
- link: function(scope, element, attrs, dropdownCtrl) {
- if (!$dropdownSuppressWarning) {
- $log.warn('keyboard-nav is now deprecated. Use uib-keyboard-nav instead.');
- }
-
- element.bind('keydown', function(e) {
- if ([38, 40].indexOf(e.which) !== -1) {
- e.preventDefault();
- e.stopPropagation();
-
- var elems = dropdownCtrl.dropdownMenu.find('a');
-
- switch (e.which) {
- case (40): { // Down
- if (!angular.isNumber(dropdownCtrl.selectedOption)) {
- dropdownCtrl.selectedOption = 0;
- } else {
- dropdownCtrl.selectedOption = dropdownCtrl.selectedOption === elems.length -1 ?
- dropdownCtrl.selectedOption : dropdownCtrl.selectedOption + 1;
- }
- break;
- }
- case (38): { // Up
- if (!angular.isNumber(dropdownCtrl.selectedOption)) {
- dropdownCtrl.selectedOption = elems.length - 1;
- } else {
- dropdownCtrl.selectedOption = dropdownCtrl.selectedOption === 0 ?
- 0 : dropdownCtrl.selectedOption - 1;
- }
- break;
- }
- }
- elems[dropdownCtrl.selectedOption].focus();
- }
- });
- }
- };
-}])
-
-.directive('dropdownToggle', ['$log', '$dropdownSuppressWarning', function($log, $dropdownSuppressWarning) {
- return {
- require: '?^dropdown',
- link: function(scope, element, attrs, dropdownCtrl) {
- if (!$dropdownSuppressWarning) {
- $log.warn('dropdown-toggle is now deprecated. Use uib-dropdown-toggle instead.');
- }
-
- if (!dropdownCtrl) {
- return;
- }
-
- element.addClass('dropdown-toggle');
-
- dropdownCtrl.toggleElement = element;
-
- var toggleDropdown = function(event) {
- event.preventDefault();
-
- if (!element.hasClass('disabled') && !attrs.disabled) {
- scope.$apply(function() {
- dropdownCtrl.toggle();
- });
- }
- };
-
- element.bind('click', toggleDropdown);
-
- // WAI-ARIA
- element.attr({ 'aria-haspopup': true, 'aria-expanded': false });
- scope.$watch(dropdownCtrl.isOpen, function(isOpen) {
- element.attr('aria-expanded', !!isOpen);
- });
-
- scope.$on('$destroy', function() {
- element.unbind('click', toggleDropdown);
- });
- }
- };
-}]);
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/dropdown/test/dropdown.spec.js b/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/dropdown/test/dropdown.spec.js
deleted file mode 100644
index 6d6a87d..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/dropdown/test/dropdown.spec.js
+++ /dev/null
@@ -1,727 +0,0 @@
-describe('dropdownToggle', function() {
- var $animate, $compile, $rootScope, $document, $templateCache, dropdownConfig, element, $browser, $log;
-
- beforeEach(module('ngAnimateMock'));
- beforeEach(module('ui.bootstrap.dropdown'));
-
- beforeEach(inject(function(_$animate_, _$compile_, _$rootScope_, _$document_, _$templateCache_, uibDropdownConfig, _$browser_, _$log_) {
- $animate = _$animate_;
- $compile = _$compile_;
- $rootScope = _$rootScope_;
- $document = _$document_;
- $templateCache = _$templateCache_;
- dropdownConfig = uibDropdownConfig;
- $browser = _$browser_;
- $log = _$log_;
- }));
-
- afterEach(function() {
- element.remove();
- });
-
- var clickDropdownToggle = function(elm) {
- elm = elm || element;
- elm.find('a[uib-dropdown-toggle]').click();
- };
-
- var triggerKeyDown = function (element, keyCode) {
- var e = $.Event('keydown');
- e.which = keyCode;
- element.trigger(e);
- };
-
- var isFocused = function(elm) {
- return elm[0] === document.activeElement;
- };
-
- describe('basic', function() {
- function dropdown() {
- return $compile('<li uib-dropdown><a href uib-dropdown-toggle></a><ul><li><a href>Hello</a></li></ul></li>')($rootScope);
- }
-
- beforeEach(function() {
- element = dropdown();
- });
-
- it('should toggle on `a` click', function() {
- expect(element.hasClass(dropdownConfig.openClass)).toBe(false);
- clickDropdownToggle();
- expect(element.hasClass(dropdownConfig.openClass)).toBe(true);
- clickDropdownToggle();
- expect(element.hasClass(dropdownConfig.openClass)).toBe(false);
- });
-
- it('should toggle when an option is clicked', function() {
- $document.find('body').append(element);
- expect(element.hasClass(dropdownConfig.openClass)).toBe(false);
- clickDropdownToggle();
- expect(element.hasClass(dropdownConfig.openClass)).toBe(true);
-
- var optionEl = element.find('ul > li').eq(0).find('a').eq(0);
- optionEl.click();
- expect(element.hasClass(dropdownConfig.openClass)).toBe(false);
- });
-
- it('should close on document click', function() {
- clickDropdownToggle();
- expect(element.hasClass(dropdownConfig.openClass)).toBe(true);
- $document.click();
- expect(element.hasClass(dropdownConfig.openClass)).toBe(false);
- });
-
- it('should close on escape key & focus toggle element', function() {
- $document.find('body').append(element);
- clickDropdownToggle();
- triggerKeyDown($document, 27);
- expect(element.hasClass(dropdownConfig.openClass)).toBe(false);
- expect(isFocused(element.find('a'))).toBe(true);
- });
-
- it('should not close on backspace key', function() {
- clickDropdownToggle();
- triggerKeyDown($document, 8);
- expect(element.hasClass(dropdownConfig.openClass)).toBe(true);
- });
-
- it('should close on $location change', function() {
- clickDropdownToggle();
- expect(element.hasClass(dropdownConfig.openClass)).toBe(true);
- $rootScope.$broadcast('$locationChangeSuccess');
- $rootScope.$apply();
- expect(element.hasClass(dropdownConfig.openClass)).toBe(false);
- });
-
- it('should only allow one dropdown to be open at once', function() {
- var elm1 = dropdown();
- var elm2 = dropdown();
- expect(elm1.hasClass(dropdownConfig.openClass)).toBe(false);
- expect(elm2.hasClass(dropdownConfig.openClass)).toBe(false);
-
- clickDropdownToggle( elm1 );
- expect(elm1.hasClass(dropdownConfig.openClass)).toBe(true);
- expect(elm2.hasClass(dropdownConfig.openClass)).toBe(false);
-
- clickDropdownToggle( elm2 );
- expect(elm1.hasClass(dropdownConfig.openClass)).toBe(false);
- expect(elm2.hasClass(dropdownConfig.openClass)).toBe(true);
- });
-
- it('should not toggle if the element has `disabled` class', function() {
- var elm = $compile('<li uib-dropdown><a class="disabled" uib-dropdown-toggle></a><ul><li>Hello</li></ul></li>')($rootScope);
- clickDropdownToggle( elm );
- expect(elm.hasClass(dropdownConfig.openClass)).toBe(false);
- });
-
- it('should not toggle if the element is disabled', function() {
- var elm = $compile('<li uib-dropdown><button disabled="disabled" uib-dropdown-toggle></button><ul><li>Hello</li></ul></li>')($rootScope);
- elm.find('button').click();
- expect(elm.hasClass(dropdownConfig.openClass)).toBe(false);
- });
-
- it('should not toggle if the element has `ng-disabled` as true', function() {
- $rootScope.isdisabled = true;
- var elm = $compile('<li uib-dropdown><div ng-disabled="isdisabled" uib-dropdown-toggle></div><ul><li>Hello</li></ul></li>')($rootScope);
- $rootScope.$digest();
- elm.find('div').click();
- expect(elm.hasClass(dropdownConfig.openClass)).toBe(false);
-
- $rootScope.isdisabled = false;
- $rootScope.$digest();
- elm.find('div').click();
- expect(elm.hasClass(dropdownConfig.openClass)).toBe(true);
- });
-
- it('should unbind events on scope destroy', function() {
- var $scope = $rootScope.$new();
- var elm = $compile('<li uib-dropdown><button ng-disabled="isdisabled" uib-dropdown-toggle></button><ul><li>Hello</li></ul></li>')($scope);
- $scope.$digest();
-
- var buttonEl = elm.find('button');
- buttonEl.click();
- expect(elm.hasClass(dropdownConfig.openClass)).toBe(true);
- buttonEl.click();
- expect(elm.hasClass(dropdownConfig.openClass)).toBe(false);
-
- $scope.$destroy();
- buttonEl.click();
- expect(elm.hasClass(dropdownConfig.openClass)).toBe(false);
- });
-
- // issue 270
- it('executes other document click events normally', function() {
- var checkboxEl = $compile('<input type="checkbox" ng-click="clicked = true" />')($rootScope);
- $rootScope.$digest();
-
- expect(element.hasClass(dropdownConfig.openClass)).toBe(false);
- expect($rootScope.clicked).toBeFalsy();
-
- clickDropdownToggle();
- expect(element.hasClass(dropdownConfig.openClass)).toBe(true);
- expect($rootScope.clicked).toBeFalsy();
-
- checkboxEl.click();
- expect($rootScope.clicked).toBeTruthy();
- });
-
- // WAI-ARIA
- it('should aria markup to the `dropdown-toggle`', function() {
- var toggleEl = element.find('a');
- expect(toggleEl.attr('aria-haspopup')).toBe('true');
- expect(toggleEl.attr('aria-expanded')).toBe('false');
-
- clickDropdownToggle();
- expect(toggleEl.attr('aria-expanded')).toBe('true');
- clickDropdownToggle();
- expect(toggleEl.attr('aria-expanded')).toBe('false');
- });
-
- // pr/issue 3274
- it('should not raise $digest:inprog if dismissed during a digest cycle', function() {
- clickDropdownToggle();
- expect(element.hasClass(dropdownConfig.openClass)).toBe(true);
-
- $rootScope.$apply(function() {
- $document.click();
- });
-
- expect(element.hasClass(dropdownConfig.openClass)).toBe(false);
- });
- });
-
- describe('using dropdownMenuTemplate', function() {
- function dropdown() {
- $templateCache.put('custom.html', '<ul class="uib-dropdown-menu"><li>Item 1</li></ul>');
-
- return $compile('<li uib-dropdown><a href uib-dropdown-toggle></a><ul class="uib-dropdown-menu" template-url="custom.html"></ul></li>')($rootScope);
- }
-
- beforeEach(function() {
- element = dropdown();
- });
-
- it('should apply custom template for dropdown menu', function() {
- element.find('a').click();
- expect(element.find('ul.uib-dropdown-menu').eq(0).find('li').eq(0).text()).toEqual('Item 1');
- });
-
- it('should clear ul when dropdown menu is closed', function() {
- element.find('a').click();
- expect(element.find('ul.uib-dropdown-menu').eq(0).find('li').eq(0).text()).toEqual('Item 1');
- element.find('a').click();
- expect(element.find('ul.uib-dropdown-menu').eq(0).find('li').length).toEqual(0);
- });
- });
-
- describe('using dropdown-append-to-body', function() {
- function dropdown() {
- return $compile('<li uib-dropdown dropdown-append-to-body><a href uib-dropdown-toggle></a><ul class="uib-dropdown-menu" id="dropdown-menu"><li><a href>Hello On Body</a></li></ul></li>')($rootScope);
- }
-
- beforeEach(function() {
- element = dropdown();
- });
-
- it('adds the menu to the body', function() {
- expect($document.find('#dropdown-menu').parent()[0]).toBe($document.find('body')[0]);
- });
-
- it('removes the menu when the dropdown is removed', function() {
- element.remove();
- $rootScope.$digest();
- expect($document.find('#dropdown-menu').length).toEqual(0);
- });
- });
-
- describe('integration with $location URL rewriting', function() {
- function dropdown() {
- // Simulate URL rewriting behavior
- $document.on('click', 'a[href="#something"]', function() {
- $rootScope.$broadcast('$locationChangeSuccess');
- $rootScope.$apply();
- });
-
- return $compile('<li uib-dropdown><a href uib-dropdown-toggle></a>' +
- '<ul><li><a href="#something">Hello</a></li></ul></li>')($rootScope);
- }
-
- beforeEach(function() {
- element = dropdown();
- });
-
- it('should close without errors on $location change', function() {
- $document.find('body').append(element);
- clickDropdownToggle();
- expect(element.hasClass(dropdownConfig.openClass)).toBe(true);
- var optionEl = element.find('ul > li').eq(0).find('a').eq(0);
- optionEl.click();
- expect(element.hasClass(dropdownConfig.openClass)).toBe(false);
- });
- });
-
- describe('without trigger', function() {
- beforeEach(function() {
- $rootScope.isopen = true;
- element = $compile('<li uib-dropdown is-open="isopen"><ul><li>Hello</li></ul></li>')($rootScope);
- $rootScope.$digest();
- });
-
- it('should be open initially', function() {
- expect(element.hasClass(dropdownConfig.openClass)).toBe(true);
- });
-
- it('should toggle when `is-open` changes', function() {
- $rootScope.isopen = false;
- $rootScope.$digest();
- expect(element.hasClass(dropdownConfig.openClass)).toBe(false);
- });
- });
-
- describe('`is-open`', function() {
- beforeEach(function() {
- $rootScope.isopen = true;
- element = $compile('<li uib-dropdown is-open="isopen"><a href uib-dropdown-toggle></a><ul><li>Hello</li></ul></li>')($rootScope);
- $rootScope.$digest();
- });
-
- it('should be open initially', function() {
- expect(element.hasClass(dropdownConfig.openClass)).toBe(true);
- });
-
- it('should change `is-open` binding when toggles', function() {
- clickDropdownToggle();
- expect($rootScope.isopen).toBe(false);
- });
-
- it('should toggle when `is-open` changes', function() {
- $rootScope.isopen = false;
- $rootScope.$digest();
- expect(element.hasClass(dropdownConfig.openClass)).toBe(false);
- });
-
- it('focus toggle element when opening', function() {
- $document.find('body').append(element);
- clickDropdownToggle();
- $rootScope.isopen = false;
- $rootScope.$digest();
- expect(isFocused(element.find('a'))).toBe(false);
- $rootScope.isopen = true;
- $rootScope.$digest();
- expect(isFocused(element.find('a'))).toBe(true);
- });
- });
-
- describe('`on-toggle`', function() {
- beforeEach(function() {
- $rootScope.toggleHandler = jasmine.createSpy('toggleHandler');
- $rootScope.isopen = false;
- element = $compile('<li uib-dropdown on-toggle="toggleHandler(open)" is-open="isopen"><a uib-dropdown-toggle></a><ul><li>Hello</li></ul></li>')($rootScope);
- $rootScope.$digest();
- });
-
- it('should not have been called initially', function() {
- expect($rootScope.toggleHandler).not.toHaveBeenCalled();
- });
-
- it('should call it correctly when toggles', function() {
- $rootScope.isopen = true;
- $rootScope.$digest();
-
- $animate.flush();
- $rootScope.$digest();
- expect($rootScope.toggleHandler).toHaveBeenCalledWith(true);
-
- clickDropdownToggle();
- $animate.flush();
- $rootScope.$digest();
- expect($rootScope.toggleHandler).toHaveBeenCalledWith(false);
- });
- });
-
- describe('`on-toggle` with initially open', function() {
- beforeEach(function() {
- $rootScope.toggleHandler = jasmine.createSpy('toggleHandler');
- $rootScope.isopen = true;
- element = $compile('<li uib-dropdown on-toggle="toggleHandler(open)" is-open="isopen"><a uib-dropdown-toggle></a><ul><li>Hello</li></ul></li>')($rootScope);
- $rootScope.$digest();
- });
-
- it('should not have been called initially', function() {
- expect($rootScope.toggleHandler).not.toHaveBeenCalled();
- });
-
- it('should call it correctly when toggles', function() {
- $rootScope.isopen = false;
- $rootScope.$digest();
-
- $animate.flush();
- $rootScope.$digest();
- expect($rootScope.toggleHandler).toHaveBeenCalledWith(false);
-
- $rootScope.isopen = true;
- $rootScope.$digest();
-
- $animate.flush();
- $rootScope.$digest();
- expect($rootScope.toggleHandler).toHaveBeenCalledWith(true);
- });
- });
-
- describe('`on-toggle` without is-open', function() {
- beforeEach(function() {
- $rootScope.toggleHandler = jasmine.createSpy('toggleHandler');
- element = $compile('<li uib-dropdown on-toggle="toggleHandler(open)"><a uib-dropdown-toggle></a><ul><li>Hello</li></ul></li>')($rootScope);
- $rootScope.$digest();
- });
-
- it('should not have been called initially', function() {
- expect($rootScope.toggleHandler).not.toHaveBeenCalled();
- });
-
- it('should call it when clicked', function() {
- clickDropdownToggle();
-
- $animate.flush();
- $rootScope.$digest();
- expect($rootScope.toggleHandler).toHaveBeenCalledWith(true);
-
- clickDropdownToggle();
-
- $animate.flush();
- $rootScope.$digest();
- expect($rootScope.toggleHandler).toHaveBeenCalledWith(false);
- });
- });
-
- describe('`auto-close` option', function() {
- function dropdown(autoClose) {
- return $compile('<li uib-dropdown ' +
- (autoClose === void 0 ? '' : 'auto-close="'+autoClose+'"') +
- '><a href uib-dropdown-toggle></a><ul><li><a href>Hello</a></li></ul></li>')($rootScope);
- }
-
- it('should close on document click if no auto-close is specified', function() {
- element = dropdown();
- clickDropdownToggle();
- expect(element.hasClass(dropdownConfig.openClass)).toBe(true);
- $document.click();
- expect(element.hasClass(dropdownConfig.openClass)).toBe(false);
- });
-
- it('should close on document click if empty auto-close is specified', function() {
- element = dropdown('');
- clickDropdownToggle();
- expect(element.hasClass(dropdownConfig.openClass)).toBe(true);
- $document.click();
- expect(element.hasClass(dropdownConfig.openClass)).toBe(false);
- });
-
- it('auto-close="disabled"', function() {
- element = dropdown('disabled');
- clickDropdownToggle();
- expect(element.hasClass(dropdownConfig.openClass)).toBe(true);
- $document.click();
- expect(element.hasClass(dropdownConfig.openClass)).toBe(true);
- });
-
- describe('outsideClick', function() {
- it('should close only on a click outside of the dropdown menu', function() {
- element = dropdown('outsideClick');
- clickDropdownToggle();
- expect(element.hasClass(dropdownConfig.openClass)).toBe(true);
- element.find('ul li a').click();
- expect(element.hasClass(dropdownConfig.openClass)).toBe(true);
- $document.click();
- expect(element.hasClass(dropdownConfig.openClass)).toBe(false);
- });
-
- it('should work with dropdown-append-to-body', function() {
- element = $compile('<li uib-dropdown dropdown-append-to-body auto-close="outsideClick"><a href uib-dropdown-toggle></a><ul class="uib-dropdown-menu" id="dropdown-menu"><li><a href>Hello On Body</a></li></ul></li>')($rootScope);
- clickDropdownToggle();
- expect(element.hasClass(dropdownConfig.openClass)).toBe(true);
- $document.find('#dropdown-menu').find('li').eq(0).trigger('click');
- expect(element.hasClass(dropdownConfig.openClass)).toBe(true);
- $document.click();
- expect(element.hasClass(dropdownConfig.openClass)).toBe(false);
- });
- });
-
- it('control with is-open', function() {
- $rootScope.isopen = true;
- element = $compile('<li uib-dropdown is-open="isopen" auto-close="disabled"><a href uib-dropdown-toggle></a><ul><li>Hello</li></ul></li>')($rootScope);
- $rootScope.$digest();
-
- expect(element.hasClass(dropdownConfig.openClass)).toBe(true);
- //should remain open
- $document.click();
- expect(element.hasClass(dropdownConfig.openClass)).toBe(true);
- //now should close
- $rootScope.isopen = false;
- $rootScope.$digest();
- expect(element.hasClass(dropdownConfig.openClass)).toBe(false);
- });
-
- it('should close anyway if toggle is clicked', function() {
- element = dropdown('disabled');
- clickDropdownToggle();
- expect(element.hasClass(dropdownConfig.openClass)).toBe(true);
- clickDropdownToggle();
- expect(element.hasClass(dropdownConfig.openClass)).toBe(false);
- });
-
- it('should close anyway if esc is pressed', function() {
- element = dropdown('disabled');
- $document.find('body').append(element);
- clickDropdownToggle();
- triggerKeyDown($document, 27);
- expect(element.hasClass(dropdownConfig.openClass)).toBe(false);
- expect(isFocused(element.find('a'))).toBe(true);
- });
-
- it('should close anyway if another dropdown is opened', function() {
- var elm1 = dropdown('disabled');
- var elm2 = dropdown();
- expect(elm1.hasClass(dropdownConfig.openClass)).toBe(false);
- expect(elm2.hasClass(dropdownConfig.openClass)).toBe(false);
- clickDropdownToggle(elm1);
- expect(elm1.hasClass(dropdownConfig.openClass)).toBe(true);
- expect(elm2.hasClass(dropdownConfig.openClass)).toBe(false);
- clickDropdownToggle(elm2);
- expect(elm1.hasClass(dropdownConfig.openClass)).toBe(false);
- expect(elm2.hasClass(dropdownConfig.openClass)).toBe(true);
- });
-
- it('should not close on $locationChangeSuccess if auto-close="disabled"', function() {
- var elm1 = dropdown('disabled');
- expect(elm1.hasClass(dropdownConfig.openClass)).toBe(false);
- clickDropdownToggle(elm1);
- expect(elm1.hasClass(dropdownConfig.openClass)).toBe(true);
- $rootScope.$broadcast('$locationChangeSuccess');
- $rootScope.$digest();
- expect(elm1.hasClass(dropdownConfig.openClass)).toBe(true);
- });
- });
-
- describe('`keyboard-nav` option', function() {
- function dropdown() {
- return $compile('<li uib-dropdown uib-keyboard-nav><a href uib-dropdown-toggle></a><ul><li><a href>Hello</a></li><li><a href>Hello Again</a></li></ul></li>')($rootScope);
- }
- beforeEach(function() {
- element = dropdown();
- });
-
- it('should focus first list element when down arrow pressed', function() {
- $document.find('body').append(element);
- clickDropdownToggle();
- triggerKeyDown($document, 40);
-
- expect(element.hasClass(dropdownConfig.openClass)).toBe(true);
- var optionEl = element.find('ul').eq(0).find('a').eq(0);
- expect(isFocused(optionEl)).toBe(true);
- });
-
- it('should not focus first list element when down arrow pressed if closed', function() {
- $document.find('body').append(element);
- triggerKeyDown($document, 40);
-
- expect(element.hasClass(dropdownConfig.openClass)).toBe(false);
- var focusEl = element.find('ul').eq(0).find('a').eq(0);
- expect(isFocused(focusEl)).toBe(false);
- });
-
- it('should focus second list element when down arrow pressed twice', function() {
- $document.find('body').append(element);
- clickDropdownToggle();
- triggerKeyDown($document, 40);
- triggerKeyDown($document, 40);
-
- expect(element.hasClass(dropdownConfig.openClass)).toBe(true);
- var focusEl = element.find('ul').eq(0).find('a').eq(1);
- expect(isFocused(focusEl)).toBe(true);
- });
- });
-
- describe('`keyboard-nav` option', function() {
- function dropdown() {
- return $compile('<li uib-dropdown uib-keyboard-nav><a href uib-dropdown-toggle></a><ul><li><a href>Hello</a></li><li><a href>Hello Again</a></li></ul></li>')($rootScope);
- }
- beforeEach(function() {
- element = dropdown();
- });
-
- it('should focus first list element when down arrow pressed', function() {
- $document.find('body').append(element);
- clickDropdownToggle();
- triggerKeyDown($document, 40);
-
- expect(element.hasClass(dropdownConfig.openClass)).toBe(true);
- var focusEl = element.find('ul').eq(0).find('a').eq(0);
- expect(isFocused(focusEl)).toBe(true);
- });
-
- it('should not focus first list element when up arrow pressed after dropdown toggled', function() {
- $document.find('body').append(element);
- clickDropdownToggle();
- expect(element.hasClass(dropdownConfig.openClass)).toBe(true);
-
- triggerKeyDown($document, 38);
- var focusEl = element.find('ul').eq(0).find('a').eq(0);
- expect(isFocused(focusEl)).toBe(false);
- });
-
- it('should focus last list element when up arrow pressed after dropdown toggled', function() {
- $document.find('body').append(element);
- clickDropdownToggle();
- triggerKeyDown($document, 38);
-
- expect(element.hasClass(dropdownConfig.openClass)).toBe(true);
- var focusEl = element.find('ul').eq(0).find('a').eq(1);
- expect(isFocused(focusEl)).toBe(true);
- });
-
- it('should not focus any list element when down arrow pressed if closed', function() {
- $document.find('body').append(element);
- triggerKeyDown($document, 40);
-
- expect(element.hasClass(dropdownConfig.openClass)).toBe(false);
- var focusEl = element.find('ul').eq(0).find('a');
- expect(isFocused(focusEl[0])).toBe(false);
- expect(isFocused(focusEl[1])).toBe(false);
- });
-
- it('should not change focus when other keys are pressed', function() {
- $document.find('body').append(element);
- clickDropdownToggle();
- triggerKeyDown($document, 37);
-
- expect(element.hasClass(dropdownConfig.openClass)).toBe(true);
- var focusEl = element.find('ul').eq(0).find('a');
- expect(isFocused(focusEl[0])).toBe(false);
- expect(isFocused(focusEl[1])).toBe(false);
- });
-
- it('should focus second list element when down arrow pressed twice', function() {
- $document.find('body').append(element);
- clickDropdownToggle();
- triggerKeyDown($document, 40);
- triggerKeyDown($document, 40);
-
- expect(element.hasClass(dropdownConfig.openClass)).toBe(true);
- var focusEl = element.find('ul').eq(0).find('a').eq(1);
- expect(isFocused(focusEl)).toBe(true);
- });
-
- it('should focus first list element when down arrow pressed 2x and up pressed 1x', function() {
- $document.find('body').append(element);
- clickDropdownToggle();
- triggerKeyDown($document, 40);
- triggerKeyDown($document, 40);
-
- triggerKeyDown($document, 38);
-
- expect(element.hasClass(dropdownConfig.openClass)).toBe(true);
- var focusEl = element.find('ul').eq(0).find('a').eq(0);
- expect(isFocused(focusEl)).toBe(true);
- });
-
- it('should stay focused on final list element if down pressed at list end', function() {
- $document.find('body').append(element);
- clickDropdownToggle();
- triggerKeyDown($document, 40);
- triggerKeyDown($document, 40);
-
- expect(element.hasClass(dropdownConfig.openClass)).toBe(true);
- var focusEl = element.find('ul').eq(0).find('a').eq(1);
- expect(isFocused(focusEl)).toBe(true);
-
- triggerKeyDown($document, 40);
- expect(isFocused(focusEl)).toBe(true);
- });
-
- it('should close if esc is pressed while focused', function() {
- element = dropdown('disabled');
- $document.find('body').append(element);
- clickDropdownToggle();
-
- triggerKeyDown($document, 40);
-
- expect(element.hasClass(dropdownConfig.openClass)).toBe(true);
- var focusEl = element.find('ul').eq(0).find('a').eq(0);
- expect(isFocused(focusEl)).toBe(true);
-
- triggerKeyDown($document, 27);
- expect(element.hasClass(dropdownConfig.openClass)).toBe(false);
- });
- });
-
- describe('`keyboard-nav` option with `dropdown-append-to-body` option', function() {
- function dropdown() {
- return $compile('<li uib-dropdown dropdown-append-to-body uib-keyboard-nav><a href uib-dropdown-toggle></a><ul class="uib-dropdown-menu" id="dropdown-menu"><li><a href>Hello On Body</a></li><li><a href>Hello Again</a></li></ul></li>')($rootScope);
- }
-
- beforeEach(function() {
- element = dropdown();
- });
-
- it('should focus first list element when down arrow pressed', function() {
- clickDropdownToggle();
-
- triggerKeyDown(element, 40);
-
- expect(element.hasClass(dropdownConfig.openClass)).toBe(true);
- var focusEl = $document.find('ul').eq(0).find('a');
- expect(isFocused(focusEl)).toBe(true);
- });
-
- it('should focus second list element when down arrow pressed twice', function() {
- clickDropdownToggle();
- triggerKeyDown(element, 40);
- triggerKeyDown(element, 40);
-
- expect(element.hasClass(dropdownConfig.openClass)).toBe(true);
- var elem1 = $document.find('ul');
- var elem2 = elem1.find('a');
- var focusEl = $document.find('ul').eq(0).find('a').eq(1);
- expect(isFocused(focusEl)).toBe(true);
- });
- });
-});
-
-/* Deprecation tests below */
-
-describe('dropdown deprecation', function() {
- beforeEach(module('ngAnimateMock'));
- beforeEach(module('ui.bootstrap.dropdown'));
-
- it('should suppress warning', function() {
- module(function($provide) {
- $provide.value('$dropdownSuppressWarning', true);
- });
-
- inject(function($compile, $log, $rootScope) {
- spyOn($log, 'warn');
- var element = $compile('<li dropdown><a href dropdown-toggle></a><ul><li><a href>Hello</a></li></ul></li>')($rootScope);
- $rootScope.$digest();
- expect($log.warn.calls.count()).toBe(0);
- });
- });
-
- it('should give warning by default', inject(function($compile, $log, $rootScope) {
- spyOn($log, 'warn');
- var element = $compile('<li dropdown><a href></a><ul><li><a href dropdown-toggle>Hello</a></li></ul></li>')($rootScope);
- $rootScope.$digest();
- expect($log.warn.calls.count()).toBe(3);
- expect($log.warn.calls.argsFor(0)).toEqual(['DropdownController is now deprecated. Use UibDropdownController instead.']);
- expect($log.warn.calls.argsFor(1)).toEqual(['dropdown-toggle is now deprecated. Use uib-dropdown-toggle instead.']);
- expect($log.warn.calls.argsFor(2)).toEqual(['dropdown is now deprecated. Use uib-dropdown instead.']);
- }));
-
- it('should give warning by default for keyboardNav', inject(function($compile, $log, $rootScope) {
- spyOn($log, 'warn');
- var element = $compile('<li dropdown keyboard-nav><a href ></a><ul><li><a href>Hello</a></li></ul></li>')($rootScope);
- $rootScope.$digest();
- expect($log.warn.calls.count()).toBe(3);
- expect($log.warn.calls.argsFor(0)).toEqual(['DropdownController is now deprecated. Use UibDropdownController instead.']);
- expect($log.warn.calls.argsFor(1)).toEqual(['keyboard-nav is now deprecated. Use uib-keyboard-nav instead.']);
- expect($log.warn.calls.argsFor(2)).toEqual(['dropdown is now deprecated. Use uib-dropdown instead.']);
- }));
-});
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/modal/docs/demo.html b/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/modal/docs/demo.html
deleted file mode 100644
index ac96e07..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/modal/docs/demo.html
+++ /dev/null
@@ -1,25 +0,0 @@
-<div ng-controller="ModalDemoCtrl">
- <script type="text/ng-template" id="myModalContent.html">
- <div class="modal-header">
- <h3 class="modal-title">I'm a modal!</h3>
- </div>
- <div class="modal-body">
- <ul>
- <li ng-repeat="item in items">
- <a href="#" ng-click="$event.preventDefault(); selected.item = item">{{ item }}</a>
- </li>
- </ul>
- Selected: <b>{{ selected.item }}</b>
- </div>
- <div class="modal-footer">
- <button class="btn btn-primary" type="button" ng-click="ok()">OK</button>
- <button class="btn btn-warning" type="button" ng-click="cancel()">Cancel</button>
- </div>
- </script>
-
- <button type="button" class="btn btn-default" ng-click="open()">Open me!</button>
- <button type="button" class="btn btn-default" ng-click="open('lg')">Large modal</button>
- <button type="button" class="btn btn-default" ng-click="open('sm')">Small modal</button>
- <button type="button" class="btn btn-default" ng-click="toggleAnimation()">Toggle Animation ({{ animationsEnabled }})</button>
- <div ng-show="selected">Selection from a modal: {{ selected }}</div>
-</div>
\ No newline at end of file
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/modal/docs/demo.js b/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/modal/docs/demo.js
deleted file mode 100644
index 60e3a5e..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/modal/docs/demo.js
+++ /dev/null
@@ -1,51 +0,0 @@
-angular.module('ui.bootstrap.demo').controller('ModalDemoCtrl', function ($scope, $uibModal, $log) {
-
- $scope.items = ['item1', 'item2', 'item3'];
-
- $scope.animationsEnabled = true;
-
- $scope.open = function (size) {
-
- var modalInstance = $uibModal.open({
- animation: $scope.animationsEnabled,
- templateUrl: 'myModalContent.html',
- controller: 'ModalInstanceCtrl',
- size: size,
- resolve: {
- items: function () {
- return $scope.items;
- }
- }
- });
-
- modalInstance.result.then(function (selectedItem) {
- $scope.selected = selectedItem;
- }, function () {
- $log.info('Modal dismissed at: ' + new Date());
- });
- };
-
- $scope.toggleAnimation = function () {
- $scope.animationsEnabled = !$scope.animationsEnabled;
- };
-
-});
-
-// Please note that $modalInstance represents a modal window (instance) dependency.
-// It is not the same as the $uibModal service used above.
-
-angular.module('ui.bootstrap.demo').controller('ModalInstanceCtrl', function ($scope, $uibModalInstance, items) {
-
- $scope.items = items;
- $scope.selected = {
- item: $scope.items[0]
- };
-
- $scope.ok = function () {
- $uibModalInstance.close($scope.selected.item);
- };
-
- $scope.cancel = function () {
- $uibModalInstance.dismiss('cancel');
- };
-});
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/modal/docs/readme.md b/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/modal/docs/readme.md
deleted file mode 100644
index e3c5064..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/modal/docs/readme.md
+++ /dev/null
@@ -1,45 +0,0 @@
-`$uibModal` is a service to quickly create AngularJS-powered modal windows.
-Creating custom modals is straightforward: create a partial view, its controller and reference them when using the service.
-
-The `$uibModal` service has only one method: `open(options)` where available options are like follows:
-
-* `templateUrl` - a path to a template representing modal's content
-* `template` - inline template representing the modal's content
-* `scope` - a scope instance to be used for the modal's content (actually the `$uibModal` service is going to create a child scope of a provided scope). Defaults to `$rootScope`
-* `controller` - a controller for a modal instance - it can initialize scope used by modal. Accepts the "controller-as" syntax in the form 'SomeCtrl as myctrl'; can be injected with `$uibModalInstance`
-* `controllerAs` - an alternative to the controller-as syntax, matching the API of directive definitions. Requires the `controller` option to be provided as well
-* `bindToController` - when used with `controllerAs` & set to `true`, it will bind the $scope properties onto the controller directly
-* `resolve` - members that will be resolved and passed to the controller as locals; it is equivalent of the `resolve` property for AngularJS routes
-* `animation` - set to false to disable animations on new modal/backdrop. Does not toggle animations for modals/backdrops that are already displayed.
-* `backdrop` - controls presence of a backdrop. Allowed values: true (default), false (no backdrop), `'static'` - backdrop is present but modal window is not closed when clicking outside of the modal window.
-* `keyboard` - indicates whether the dialog should be closable by hitting the ESC key, defaults to true
-* `backdropClass` - additional CSS class(es) to be added to a modal backdrop template
-* `windowClass` - additional CSS class(es) to be added to a modal window template
-* `windowTopClass` - CSS class(es) to be added to the top modal window
-* `windowTemplateUrl` - a path to a template overriding modal's window template
-* `size` - optional suffix of modal window class. The value used is appended to the `modal-` class, i.e. a value of `sm` gives `modal-sm`
-* `openedClass` - class added to the `body` element when the modal is opened. Defaults to `modal-open`
-
-Global defaults may be set for `$uibModal` via `$uibModalProvider.options`.
-
-The `open` method returns a modal instance, an object with the following properties:
-
-* `close(result)` - a method that can be used to close a modal, passing a result
-* `dismiss(reason)` - a method that can be used to dismiss a modal, passing a reason
-* `result` - a promise that is resolved when a modal is closed and rejected when a modal is dismissed
-* `opened` - a promise that is resolved when a modal gets opened after downloading content's template and resolving all variables
-* `rendered` - a promise that is resolved when a modal is rendered.
-
-In addition the scope associated with modal's content is augmented with 2 methods:
-
-* `$close(result)`
-* `$dismiss(reason)`
-
-Those methods make it easy to close a modal window without a need to create a dedicated controller.
-
-If the $scope is destroyed via unexpected mechanism, such as it being passed in the modal options and a $route/$state transition occurs, the modal will be dismissed with the value `$uibUnscheduledDestruction`.
-
-Finally, a `modal.closing` event is broadcast to the modal scope before the modal closes. If the listener calls
-preventDefault on the event, then the modal will remain open. The $close and $dismiss methods return true if the
-event was allowed. The event itself includes a parameter for the result/reason and a boolean parameter that indicates
-whether the modal is being closed (true) or dismissed.
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/modal/modal.js b/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/modal/modal.js
deleted file mode 100644
index 93d07cf..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/modal/modal.js
+++ /dev/null
@@ -1,933 +0,0 @@
-angular.module('ui.bootstrap.modal', ['ui.bootstrap.stackedMap'])
-/**
- * A helper, internal data structure that stores all references attached to key
- */
- .factory('$$multiMap', function() {
- return {
- createNew: function() {
- var map = {};
-
- return {
- entries: function() {
- return Object.keys(map).map(function(key) {
- return {
- key: key,
- value: map[key]
- };
- });
- },
- get: function(key) {
- return map[key];
- },
- hasKey: function(key) {
- return !!map[key];
- },
- keys: function() {
- return Object.keys(map);
- },
- put: function(key, value) {
- if (!map[key]) {
- map[key] = [];
- }
-
- map[key].push(value);
- },
- remove: function(key, value) {
- var values = map[key];
-
- if (!values) {
- return;
- }
-
- var idx = values.indexOf(value);
-
- if (idx !== -1) {
- values.splice(idx, 1);
- }
-
- if (!values.length) {
- delete map[key];
- }
- }
- };
- }
- };
- })
-
-/**
- * A helper directive for the $modal service. It creates a backdrop element.
- */
- .directive('uibModalBackdrop', [
- '$animate', '$injector', '$uibModalStack',
- function($animate , $injector, $modalStack) {
- var $animateCss = null;
-
- if ($injector.has('$animateCss')) {
- $animateCss = $injector.get('$animateCss');
- }
-
- return {
- replace: true,
- templateUrl: 'template/modal/backdrop.html',
- compile: function(tElement, tAttrs) {
- tElement.addClass(tAttrs.backdropClass);
- return linkFn;
- }
- };
-
- function linkFn(scope, element, attrs) {
- // Temporary fix for prefixing
- element.addClass('modal-backdrop');
-
- if (attrs.modalInClass) {
- if ($animateCss) {
- $animateCss(element, {
- addClass: attrs.modalInClass
- }).start();
- } else {
- $animate.addClass(element, attrs.modalInClass);
- }
-
- scope.$on($modalStack.NOW_CLOSING_EVENT, function(e, setIsAsync) {
- var done = setIsAsync();
- if ($animateCss) {
- $animateCss(element, {
- removeClass: attrs.modalInClass
- }).start().then(done);
- } else {
- $animate.removeClass(element, attrs.modalInClass).then(done);
- }
- });
- }
- }
- }])
-
- .directive('uibModalWindow', [
- '$uibModalStack', '$q', '$animate', '$injector',
- function($modalStack , $q , $animate, $injector) {
- var $animateCss = null;
-
- if ($injector.has('$animateCss')) {
- $animateCss = $injector.get('$animateCss');
- }
-
- return {
- scope: {
- index: '@'
- },
- replace: true,
- transclude: true,
- templateUrl: function(tElement, tAttrs) {
- return tAttrs.templateUrl || 'template/modal/window.html';
- },
- link: function(scope, element, attrs) {
- element.addClass(attrs.windowClass || '');
- element.addClass(attrs.windowTopClass || '');
- scope.size = attrs.size;
-
- scope.close = function(evt) {
- var modal = $modalStack.getTop();
- if (modal && modal.value.backdrop && modal.value.backdrop !== 'static' && (evt.target === evt.currentTarget)) {
- evt.preventDefault();
- evt.stopPropagation();
- $modalStack.dismiss(modal.key, 'backdrop click');
- }
- };
-
- // moved from template to fix issue #2280
- element.on('click', scope.close);
-
- // This property is only added to the scope for the purpose of detecting when this directive is rendered.
- // We can detect that by using this property in the template associated with this directive and then use
- // {@link Attribute#$observe} on it. For more details please see {@link TableColumnResize}.
- scope.$isRendered = true;
-
- // Deferred object that will be resolved when this modal is render.
- var modalRenderDeferObj = $q.defer();
- // Observe function will be called on next digest cycle after compilation, ensuring that the DOM is ready.
- // In order to use this way of finding whether DOM is ready, we need to observe a scope property used in modal's template.
- attrs.$observe('modalRender', function(value) {
- if (value == 'true') {
- modalRenderDeferObj.resolve();
- }
- });
-
- modalRenderDeferObj.promise.then(function() {
- var animationPromise = null;
-
- if (attrs.modalInClass) {
- if ($animateCss) {
- animationPromise = $animateCss(element, {
- addClass: attrs.modalInClass
- }).start();
- } else {
- animationPromise = $animate.addClass(element, attrs.modalInClass);
- }
-
- scope.$on($modalStack.NOW_CLOSING_EVENT, function(e, setIsAsync) {
- var done = setIsAsync();
- if ($animateCss) {
- $animateCss(element, {
- removeClass: attrs.modalInClass
- }).start().then(done);
- } else {
- $animate.removeClass(element, attrs.modalInClass).then(done);
- }
- });
- }
-
-
- $q.when(animationPromise).then(function() {
- var inputWithAutofocus = element[0].querySelector('[autofocus]');
- /**
- * Auto-focusing of a freshly-opened modal element causes any child elements
- * with the autofocus attribute to lose focus. This is an issue on touch
- * based devices which will show and then hide the onscreen keyboard.
- * Attempts to refocus the autofocus element via JavaScript will not reopen
- * the onscreen keyboard. Fixed by updated the focusing logic to only autofocus
- * the modal element if the modal does not contain an autofocus element.
- */
- if (inputWithAutofocus) {
- inputWithAutofocus.focus();
- } else {
- element[0].focus();
- }
- });
-
- // Notify {@link $modalStack} that modal is rendered.
- var modal = $modalStack.getTop();
- if (modal) {
- $modalStack.modalRendered(modal.key);
- }
- });
- }
- };
- }])
-
- .directive('uibModalAnimationClass', function() {
- return {
- compile: function(tElement, tAttrs) {
- if (tAttrs.modalAnimation) {
- tElement.addClass(tAttrs.uibModalAnimationClass);
- }
- }
- };
- })
-
- .directive('uibModalTransclude', function() {
- return {
- link: function($scope, $element, $attrs, controller, $transclude) {
- $transclude($scope.$parent, function(clone) {
- $element.empty();
- $element.append(clone);
- });
- }
- };
- })
-
- .factory('$uibModalStack', [
- '$animate', '$timeout', '$document', '$compile', '$rootScope',
- '$q',
- '$injector',
- '$$multiMap',
- '$$stackedMap',
- function($animate , $timeout , $document , $compile , $rootScope ,
- $q,
- $injector,
- $$multiMap,
- $$stackedMap) {
- var $animateCss = null;
-
- if ($injector.has('$animateCss')) {
- $animateCss = $injector.get('$animateCss');
- }
-
- var OPENED_MODAL_CLASS = 'modal-open';
-
- var backdropDomEl, backdropScope;
- var openedWindows = $$stackedMap.createNew();
- var openedClasses = $$multiMap.createNew();
- var $modalStack = {
- NOW_CLOSING_EVENT: 'modal.stack.now-closing'
- };
-
- //Modal focus behavior
- var focusableElementList;
- var focusIndex = 0;
- var tababbleSelector = 'a[href], area[href], input:not([disabled]), ' +
- 'button:not([disabled]),select:not([disabled]), textarea:not([disabled]), ' +
- 'iframe, object, embed, *[tabindex], *[contenteditable=true]';
-
- function backdropIndex() {
- var topBackdropIndex = -1;
- var opened = openedWindows.keys();
- for (var i = 0; i < opened.length; i++) {
- if (openedWindows.get(opened[i]).value.backdrop) {
- topBackdropIndex = i;
- }
- }
- return topBackdropIndex;
- }
-
- $rootScope.$watch(backdropIndex, function(newBackdropIndex) {
- if (backdropScope) {
- backdropScope.index = newBackdropIndex;
- }
- });
-
- function removeModalWindow(modalInstance, elementToReceiveFocus) {
- var body = $document.find('body').eq(0);
- var modalWindow = openedWindows.get(modalInstance).value;
-
- //clean up the stack
- openedWindows.remove(modalInstance);
-
- removeAfterAnimate(modalWindow.modalDomEl, modalWindow.modalScope, function() {
- var modalBodyClass = modalWindow.openedClass || OPENED_MODAL_CLASS;
- openedClasses.remove(modalBodyClass, modalInstance);
- body.toggleClass(modalBodyClass, openedClasses.hasKey(modalBodyClass));
- toggleTopWindowClass(true);
- });
- checkRemoveBackdrop();
-
- //move focus to specified element if available, or else to body
- if (elementToReceiveFocus && elementToReceiveFocus.focus) {
- elementToReceiveFocus.focus();
- } else {
- body.focus();
- }
- }
-
- // Add or remove "windowTopClass" from the top window in the stack
- function toggleTopWindowClass(toggleSwitch) {
- var modalWindow;
-
- if (openedWindows.length() > 0) {
- modalWindow = openedWindows.top().value;
- modalWindow.modalDomEl.toggleClass(modalWindow.windowTopClass || '', toggleSwitch);
- }
- }
-
- function checkRemoveBackdrop() {
- //remove backdrop if no longer needed
- if (backdropDomEl && backdropIndex() == -1) {
- var backdropScopeRef = backdropScope;
- removeAfterAnimate(backdropDomEl, backdropScope, function() {
- backdropScopeRef = null;
- });
- backdropDomEl = undefined;
- backdropScope = undefined;
- }
- }
-
- function removeAfterAnimate(domEl, scope, done) {
- var asyncDeferred;
- var asyncPromise = null;
- var setIsAsync = function() {
- if (!asyncDeferred) {
- asyncDeferred = $q.defer();
- asyncPromise = asyncDeferred.promise;
- }
-
- return function asyncDone() {
- asyncDeferred.resolve();
- };
- };
- scope.$broadcast($modalStack.NOW_CLOSING_EVENT, setIsAsync);
-
- // Note that it's intentional that asyncPromise might be null.
- // That's when setIsAsync has not been called during the
- // NOW_CLOSING_EVENT broadcast.
- return $q.when(asyncPromise).then(afterAnimating);
-
- function afterAnimating() {
- if (afterAnimating.done) {
- return;
- }
- afterAnimating.done = true;
-
- if ($animateCss) {
- $animateCss(domEl, {
- event: 'leave'
- }).start().then(function() {
- domEl.remove();
- });
- } else {
- $animate.leave(domEl);
- }
- scope.$destroy();
- if (done) {
- done();
- }
- }
- }
-
- $document.bind('keydown', function(evt) {
- if (evt.isDefaultPrevented()) {
- return evt;
- }
-
- var modal = openedWindows.top();
- if (modal && modal.value.keyboard) {
- switch (evt.which) {
- case 27: {
- evt.preventDefault();
- $rootScope.$apply(function() {
- $modalStack.dismiss(modal.key, 'escape key press');
- });
- break;
- }
- case 9: {
- $modalStack.loadFocusElementList(modal);
- var focusChanged = false;
- if (evt.shiftKey) {
- if ($modalStack.isFocusInFirstItem(evt)) {
- focusChanged = $modalStack.focusLastFocusableElement();
- }
- } else {
- if ($modalStack.isFocusInLastItem(evt)) {
- focusChanged = $modalStack.focusFirstFocusableElement();
- }
- }
-
- if (focusChanged) {
- evt.preventDefault();
- evt.stopPropagation();
- }
- break;
- }
- }
- }
- });
-
- $modalStack.open = function(modalInstance, modal) {
- var modalOpener = $document[0].activeElement,
- modalBodyClass = modal.openedClass || OPENED_MODAL_CLASS;
-
- toggleTopWindowClass(false);
-
- openedWindows.add(modalInstance, {
- deferred: modal.deferred,
- renderDeferred: modal.renderDeferred,
- modalScope: modal.scope,
- backdrop: modal.backdrop,
- keyboard: modal.keyboard,
- openedClass: modal.openedClass,
- windowTopClass: modal.windowTopClass
- });
-
- openedClasses.put(modalBodyClass, modalInstance);
-
- var body = $document.find('body').eq(0),
- currBackdropIndex = backdropIndex();
-
- if (currBackdropIndex >= 0 && !backdropDomEl) {
- backdropScope = $rootScope.$new(true);
- backdropScope.index = currBackdropIndex;
- var angularBackgroundDomEl = angular.element('<div uib-modal-backdrop="modal-backdrop"></div>');
- angularBackgroundDomEl.attr('backdrop-class', modal.backdropClass);
- if (modal.animation) {
- angularBackgroundDomEl.attr('modal-animation', 'true');
- }
- backdropDomEl = $compile(angularBackgroundDomEl)(backdropScope);
- body.append(backdropDomEl);
- }
-
- var angularDomEl = angular.element('<div uib-modal-window="modal-window"></div>');
- angularDomEl.attr({
- 'template-url': modal.windowTemplateUrl,
- 'window-class': modal.windowClass,
- 'window-top-class': modal.windowTopClass,
- 'size': modal.size,
- 'index': openedWindows.length() - 1,
- 'animate': 'animate'
- }).html(modal.content);
- if (modal.animation) {
- angularDomEl.attr('modal-animation', 'true');
- }
-
- var modalDomEl = $compile(angularDomEl)(modal.scope);
- openedWindows.top().value.modalDomEl = modalDomEl;
- openedWindows.top().value.modalOpener = modalOpener;
- body.append(modalDomEl);
- body.addClass(modalBodyClass);
-
- $modalStack.clearFocusListCache();
- };
-
- function broadcastClosing(modalWindow, resultOrReason, closing) {
- return !modalWindow.value.modalScope.$broadcast('modal.closing', resultOrReason, closing).defaultPrevented;
- }
-
- $modalStack.close = function(modalInstance, result) {
- var modalWindow = openedWindows.get(modalInstance);
- if (modalWindow && broadcastClosing(modalWindow, result, true)) {
- modalWindow.value.modalScope.$$uibDestructionScheduled = true;
- modalWindow.value.deferred.resolve(result);
- removeModalWindow(modalInstance, modalWindow.value.modalOpener);
- return true;
- }
- return !modalWindow;
- };
-
- $modalStack.dismiss = function(modalInstance, reason) {
- var modalWindow = openedWindows.get(modalInstance);
- if (modalWindow && broadcastClosing(modalWindow, reason, false)) {
- modalWindow.value.modalScope.$$uibDestructionScheduled = true;
- modalWindow.value.deferred.reject(reason);
- removeModalWindow(modalInstance, modalWindow.value.modalOpener);
- return true;
- }
- return !modalWindow;
- };
-
- $modalStack.dismissAll = function(reason) {
- var topModal = this.getTop();
- while (topModal && this.dismiss(topModal.key, reason)) {
- topModal = this.getTop();
- }
- };
-
- $modalStack.getTop = function() {
- return openedWindows.top();
- };
-
- $modalStack.modalRendered = function(modalInstance) {
- var modalWindow = openedWindows.get(modalInstance);
- if (modalWindow) {
- modalWindow.value.renderDeferred.resolve();
- }
- };
-
- $modalStack.focusFirstFocusableElement = function() {
- if (focusableElementList.length > 0) {
- focusableElementList[0].focus();
- return true;
- }
- return false;
- };
- $modalStack.focusLastFocusableElement = function() {
- if (focusableElementList.length > 0) {
- focusableElementList[focusableElementList.length - 1].focus();
- return true;
- }
- return false;
- };
-
- $modalStack.isFocusInFirstItem = function(evt) {
- if (focusableElementList.length > 0) {
- return (evt.target || evt.srcElement) == focusableElementList[0];
- }
- return false;
- };
-
- $modalStack.isFocusInLastItem = function(evt) {
- if (focusableElementList.length > 0) {
- return (evt.target || evt.srcElement) == focusableElementList[focusableElementList.length - 1];
- }
- return false;
- };
-
- $modalStack.clearFocusListCache = function() {
- focusableElementList = [];
- focusIndex = 0;
- };
-
- $modalStack.loadFocusElementList = function(modalWindow) {
- if (focusableElementList === undefined || !focusableElementList.length) {
- if (modalWindow) {
- var modalDomE1 = modalWindow.value.modalDomEl;
- if (modalDomE1 && modalDomE1.length) {
- focusableElementList = modalDomE1[0].querySelectorAll(tababbleSelector);
- }
- }
- }
- };
-
- return $modalStack;
- }])
-
- .provider('$uibModal', function() {
- var $modalProvider = {
- options: {
- animation: true,
- backdrop: true, //can also be false or 'static'
- keyboard: true
- },
- $get: ['$injector', '$rootScope', '$q', '$templateRequest', '$controller', '$uibModalStack', '$modalSuppressWarning', '$log',
- function ($injector, $rootScope, $q, $templateRequest, $controller, $modalStack, $modalSuppressWarning, $log) {
- var $modal = {};
-
- function getTemplatePromise(options) {
- return options.template ? $q.when(options.template) :
- $templateRequest(angular.isFunction(options.templateUrl) ? (options.templateUrl)() : options.templateUrl);
- }
-
- function getResolvePromises(resolves) {
- var promisesArr = [];
- angular.forEach(resolves, function(value) {
- if (angular.isFunction(value) || angular.isArray(value)) {
- promisesArr.push($q.when($injector.invoke(value)));
- } else if (angular.isString(value)) {
- promisesArr.push($q.when($injector.get(value)));
- } else {
- promisesArr.push($q.when(value));
- }
- });
- return promisesArr;
- }
-
- var promiseChain = null;
- $modal.getPromiseChain = function() {
- return promiseChain;
- };
-
- $modal.open = function(modalOptions) {
- var modalResultDeferred = $q.defer();
- var modalOpenedDeferred = $q.defer();
- var modalRenderDeferred = $q.defer();
-
- //prepare an instance of a modal to be injected into controllers and returned to a caller
- var modalInstance = {
- result: modalResultDeferred.promise,
- opened: modalOpenedDeferred.promise,
- rendered: modalRenderDeferred.promise,
- close: function (result) {
- return $modalStack.close(modalInstance, result);
- },
- dismiss: function (reason) {
- return $modalStack.dismiss(modalInstance, reason);
- }
- };
-
- //merge and clean up options
- modalOptions = angular.extend({}, $modalProvider.options, modalOptions);
- modalOptions.resolve = modalOptions.resolve || {};
-
- //verify options
- if (!modalOptions.template && !modalOptions.templateUrl) {
- throw new Error('One of template or templateUrl options is required.');
- }
-
- var templateAndResolvePromise =
- $q.all([getTemplatePromise(modalOptions)].concat(getResolvePromises(modalOptions.resolve)));
-
- function resolveWithTemplate() {
- return templateAndResolvePromise;
- }
-
- // Wait for the resolution of the existing promise chain.
- // Then switch to our own combined promise dependency (regardless of how the previous modal fared).
- // Then add to $modalStack and resolve opened.
- // Finally clean up the chain variable if no subsequent modal has overwritten it.
- var samePromise;
- samePromise = promiseChain = $q.all([promiseChain])
- .then(resolveWithTemplate, resolveWithTemplate)
- .then(function resolveSuccess(tplAndVars) {
-
- var modalScope = (modalOptions.scope || $rootScope).$new();
- modalScope.$close = modalInstance.close;
- modalScope.$dismiss = modalInstance.dismiss;
-
- modalScope.$on('$destroy', function() {
- if (!modalScope.$$uibDestructionScheduled) {
- modalScope.$dismiss('$uibUnscheduledDestruction');
- }
- });
-
- var ctrlInstance, ctrlLocals = {};
- var resolveIter = 1;
-
- //controllers
- if (modalOptions.controller) {
- ctrlLocals.$scope = modalScope;
- ctrlLocals.$uibModalInstance = modalInstance;
- Object.defineProperty(ctrlLocals, '$modalInstance', {
- get: function() {
- if (!$modalSuppressWarning) {
- $log.warn('$modalInstance is now deprecated. Use $uibModalInstance instead.');
- }
-
- return modalInstance;
- }
- });
- angular.forEach(modalOptions.resolve, function(value, key) {
- ctrlLocals[key] = tplAndVars[resolveIter++];
- });
-
- ctrlInstance = $controller(modalOptions.controller, ctrlLocals);
- if (modalOptions.controllerAs) {
- if (modalOptions.bindToController) {
- angular.extend(ctrlInstance, modalScope);
- }
-
- modalScope[modalOptions.controllerAs] = ctrlInstance;
- }
- }
-
- $modalStack.open(modalInstance, {
- scope: modalScope,
- deferred: modalResultDeferred,
- renderDeferred: modalRenderDeferred,
- content: tplAndVars[0],
- animation: modalOptions.animation,
- backdrop: modalOptions.backdrop,
- keyboard: modalOptions.keyboard,
- backdropClass: modalOptions.backdropClass,
- windowTopClass: modalOptions.windowTopClass,
- windowClass: modalOptions.windowClass,
- windowTemplateUrl: modalOptions.windowTemplateUrl,
- size: modalOptions.size,
- openedClass: modalOptions.openedClass
- });
- modalOpenedDeferred.resolve(true);
-
- }, function resolveError(reason) {
- modalOpenedDeferred.reject(reason);
- modalResultDeferred.reject(reason);
- })
- .finally(function() {
- if (promiseChain === samePromise) {
- promiseChain = null;
- }
- });
-
- return modalInstance;
- };
-
- return $modal;
- }
- ]
- };
-
- return $modalProvider;
- });
-
-/* deprecated modal below */
-
-angular.module('ui.bootstrap.modal')
-
- .value('$modalSuppressWarning', false)
-
- /**
- * A helper directive for the $modal service. It creates a backdrop element.
- */
- .directive('modalBackdrop', [
- '$animate', '$injector', '$modalStack', '$log', '$modalSuppressWarning',
- function($animate , $injector, $modalStack, $log, $modalSuppressWarning) {
- var $animateCss = null;
-
- if ($injector.has('$animateCss')) {
- $animateCss = $injector.get('$animateCss');
- }
-
- return {
- replace: true,
- templateUrl: 'template/modal/backdrop.html',
- compile: function(tElement, tAttrs) {
- tElement.addClass(tAttrs.backdropClass);
- return linkFn;
- }
- };
-
- function linkFn(scope, element, attrs) {
- if (!$modalSuppressWarning) {
- $log.warn('modal-backdrop is now deprecated. Use uib-modal-backdrop instead.');
- }
- element.addClass('modal-backdrop');
-
- if (attrs.modalInClass) {
- if ($animateCss) {
- $animateCss(element, {
- addClass: attrs.modalInClass
- }).start();
- } else {
- $animate.addClass(element, attrs.modalInClass);
- }
-
- scope.$on($modalStack.NOW_CLOSING_EVENT, function(e, setIsAsync) {
- var done = setIsAsync();
- if ($animateCss) {
- $animateCss(element, {
- removeClass: attrs.modalInClass
- }).start().then(done);
- } else {
- $animate.removeClass(element, attrs.modalInClass).then(done);
- }
- });
- }
- }
- }])
-
- .directive('modalWindow', [
- '$modalStack', '$q', '$animate', '$injector', '$log', '$modalSuppressWarning',
- function($modalStack , $q , $animate, $injector, $log, $modalSuppressWarning) {
- var $animateCss = null;
-
- if ($injector.has('$animateCss')) {
- $animateCss = $injector.get('$animateCss');
- }
-
- return {
- scope: {
- index: '@'
- },
- replace: true,
- transclude: true,
- templateUrl: function(tElement, tAttrs) {
- return tAttrs.templateUrl || 'template/modal/window.html';
- },
- link: function(scope, element, attrs) {
- if (!$modalSuppressWarning) {
- $log.warn('modal-window is now deprecated. Use uib-modal-window instead.');
- }
- element.addClass(attrs.windowClass || '');
- element.addClass(attrs.windowTopClass || '');
- scope.size = attrs.size;
-
- scope.close = function(evt) {
- var modal = $modalStack.getTop();
- if (modal && modal.value.backdrop && modal.value.backdrop !== 'static' && (evt.target === evt.currentTarget)) {
- evt.preventDefault();
- evt.stopPropagation();
- $modalStack.dismiss(modal.key, 'backdrop click');
- }
- };
-
- // moved from template to fix issue #2280
- element.on('click', scope.close);
-
- // This property is only added to the scope for the purpose of detecting when this directive is rendered.
- // We can detect that by using this property in the template associated with this directive and then use
- // {@link Attribute#$observe} on it. For more details please see {@link TableColumnResize}.
- scope.$isRendered = true;
-
- // Deferred object that will be resolved when this modal is render.
- var modalRenderDeferObj = $q.defer();
- // Observe function will be called on next digest cycle after compilation, ensuring that the DOM is ready.
- // In order to use this way of finding whether DOM is ready, we need to observe a scope property used in modal's template.
- attrs.$observe('modalRender', function(value) {
- if (value == 'true') {
- modalRenderDeferObj.resolve();
- }
- });
-
- modalRenderDeferObj.promise.then(function() {
- var animationPromise = null;
-
- if (attrs.modalInClass) {
- if ($animateCss) {
- animationPromise = $animateCss(element, {
- addClass: attrs.modalInClass
- }).start();
- } else {
- animationPromise = $animate.addClass(element, attrs.modalInClass);
- }
-
- scope.$on($modalStack.NOW_CLOSING_EVENT, function(e, setIsAsync) {
- var done = setIsAsync();
- if ($animateCss) {
- $animateCss(element, {
- removeClass: attrs.modalInClass
- }).start().then(done);
- } else {
- $animate.removeClass(element, attrs.modalInClass).then(done);
- }
- });
- }
-
-
- $q.when(animationPromise).then(function() {
- var inputWithAutofocus = element[0].querySelector('[autofocus]');
- /**
- * Auto-focusing of a freshly-opened modal element causes any child elements
- * with the autofocus attribute to lose focus. This is an issue on touch
- * based devices which will show and then hide the onscreen keyboard.
- * Attempts to refocus the autofocus element via JavaScript will not reopen
- * the onscreen keyboard. Fixed by updated the focusing logic to only autofocus
- * the modal element if the modal does not contain an autofocus element.
- */
- if (inputWithAutofocus) {
- inputWithAutofocus.focus();
- } else {
- element[0].focus();
- }
- });
-
- // Notify {@link $modalStack} that modal is rendered.
- var modal = $modalStack.getTop();
- if (modal) {
- $modalStack.modalRendered(modal.key);
- }
- });
- }
- };
- }])
-
- .directive('modalAnimationClass', [
- '$log', '$modalSuppressWarning',
- function ($log, $modalSuppressWarning) {
- return {
- compile: function(tElement, tAttrs) {
- if (!$modalSuppressWarning) {
- $log.warn('modal-animation-class is now deprecated. Use uib-modal-animation-class instead.');
- }
- if (tAttrs.modalAnimation) {
- tElement.addClass(tAttrs.modalAnimationClass);
- }
- }
- };
- }])
-
- .directive('modalTransclude', [
- '$log', '$modalSuppressWarning',
- function ($log, $modalSuppressWarning) {
- return {
- link: function($scope, $element, $attrs, controller, $transclude) {
- if (!$modalSuppressWarning) {
- $log.warn('modal-transclude is now deprecated. Use uib-modal-transclude instead.');
- }
- $transclude($scope.$parent, function(clone) {
- $element.empty();
- $element.append(clone);
- });
- }
- };
- }])
-
- .service('$modalStack', [
- '$animate', '$timeout', '$document', '$compile', '$rootScope',
- '$q',
- '$injector',
- '$$multiMap',
- '$$stackedMap',
- '$uibModalStack',
- '$log',
- '$modalSuppressWarning',
- function($animate , $timeout , $document , $compile , $rootScope ,
- $q,
- $injector,
- $$multiMap,
- $$stackedMap,
- $uibModalStack,
- $log,
- $modalSuppressWarning) {
- if (!$modalSuppressWarning) {
- $log.warn('$modalStack is now deprecated. Use $uibModalStack instead.');
- }
-
- angular.extend(this, $uibModalStack);
- }])
-
- .provider('$modal', ['$uibModalProvider', function($uibModalProvider) {
- angular.extend(this, $uibModalProvider);
-
- this.$get = ['$injector', '$log', '$modalSuppressWarning',
- function ($injector, $log, $modalSuppressWarning) {
- if (!$modalSuppressWarning) {
- $log.warn('$modal is now deprecated. Use $uibModal instead.');
- }
-
- return $injector.invoke($uibModalProvider.$get);
- }];
- }]);
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/modal/test/modal.spec.js b/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/modal/test/modal.spec.js
deleted file mode 100644
index a427584..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/modal/test/modal.spec.js
+++ /dev/null
@@ -1,1255 +0,0 @@
-describe('$uibModal', function () {
- var $animate, $controllerProvider, $rootScope, $document, $compile, $templateCache, $timeout, $q;
- var $uibModal, $uibModalStack, $uibModalProvider;
-
- beforeEach(module('ngAnimateMock'));
- beforeEach(module('ui.bootstrap.modal'));
- beforeEach(module('template/modal/backdrop.html'));
- beforeEach(module('template/modal/window.html'));
- beforeEach(module(function(_$controllerProvider_, _$uibModalProvider_){
- $controllerProvider = _$controllerProvider_;
- $uibModalProvider = _$uibModalProvider_;
- }));
-
- beforeEach(inject(function(_$animate_, _$rootScope_, _$document_, _$compile_, _$templateCache_, _$timeout_, _$q_, _$uibModal_, _$uibModalStack_) {
- $animate = _$animate_;
- $rootScope = _$rootScope_;
- $document = _$document_;
- $compile = _$compile_;
- $templateCache = _$templateCache_;
- $timeout = _$timeout_;
- $q = _$q_;
- $uibModal = _$uibModal_;
- $uibModalStack = _$uibModalStack_;
- }));
-
- beforeEach(function() {
- jasmine.addMatchers({
- toBeResolvedWith: function(util, customEqualityTesters) {
- return {
- compare: function(promise, expected) {
- promise.then(function(result) {
- expect(result).toEqual(expected);
-
- if (result === expected) {
- result.message = 'Expected "' + angular.mock.dump(result) + '" not to be resolved with "' + expected + '".';
- } else {
- result.message = 'Expected "' + angular.mock.dump(result) + '" to be resolved with "' + expected + '".';
- }
- });
-
- $rootScope.$digest();
-
- return {pass: true};
- }
- };
- },
- toBeRejectedWith: function(util, customEqualityTesters) {
- return {
- compare: function(promise, expected) {
- var result = {};
-
- promise.then(function() {
-
- }, function(result) {
- expect(result).toEqual(expected);
-
- if (result === expected) {
- result.message = 'Expected "' + angular.mock.dump(result) + '" not to be rejected with "' + expected + '".';
- } else {
- result.message = 'Expected "' + angular.mock.dump(result) + '" to be rejected with "' + expected + '".';
- }
- });
-
- $rootScope.$digest();
-
- return {pass: true};
- }
- };
- },
- toHaveModalOpenWithContent: function(util, customEqualityTesters) {
- return {
- compare: function(actual, content, selector) {
- var contentToCompare, modalDomEls = actual.find('body > div.modal > div.modal-dialog > div.modal-content');
-
- contentToCompare = selector ? modalDomEls.find(selector) : modalDomEls;
-
- var result = {
- pass: modalDomEls.css('display') === 'block' && contentToCompare.html() === content
- };
-
- if (result.pass) {
- result.message = '"Expected "' + angular.mock.dump(modalDomEls) + '" not to be open with "' + content + '".';
- } else {
- result.message = '"Expected "' + angular.mock.dump(modalDomEls) + '" to be open with "' + content + '".';
- }
-
- return result;
- }
- };
- },
- toHaveModalsOpen: function(util, customEqualityTesters) {
- return {
- compare: function(actual, expected) {
- var modalDomEls = actual.find('body > div.modal');
-
- var result = {
- pass: util.equals(modalDomEls.length, expected, customEqualityTesters)
- };
-
- if (result.pass) {
- result.message = 'Expected "' + angular.mock.dump(modalDomEls) + '" not to have "' + expected + '" modals opened.';
- } else {
- result.message = 'Expected "' + angular.mock.dump(modalDomEls) + '" to have "' + expected + '" modals opened.';
- }
-
- return result;
- }
- };
- },
- toHaveBackdrop: function(util, customEqualityTesters) {
- return {
- compare: function(actual, expected) {
- var backdropDomEls = actual.find('body > div.modal-backdrop');
-
- var result = {
- pass: util.equals(backdropDomEls.length, 1, customEqualityTesters)
- };
-
- if (result.pass) {
- result.message = 'Expected "' + angular.mock.dump(backdropDomEls) + '" not to be a backdrop element".';
- } else {
- result.message = 'Expected "' + angular.mock.dump(backdropDomEls) + '" to be a backdrop element".';
- }
-
- return result;
- }
- };
- }
- });
- });
-
- afterEach(function () {
- var body = $document.find('body');
- body.find('div.modal').remove();
- body.find('div.modal-backdrop').remove();
- body.removeClass('modal-open');
- });
-
- function triggerKeyDown(element, keyCode, shiftKey) {
- var e = $.Event('keydown');
- e.srcElement = element[0];
- e.which = keyCode;
- e.shiftKey = shiftKey;
- element.trigger(e);
- }
-
- function open(modalOptions) {
- var modal = $uibModal.open(modalOptions);
- $rootScope.$digest();
- $timeout.flush(0);
- return modal;
- }
-
- function close(modal, result, noFlush) {
- var closed = modal.close(result);
- $rootScope.$digest();
- if (!noFlush) {
- $animate.flush();
- $rootScope.$digest();
- $animate.flush();
- $rootScope.$digest();
- }
- return closed;
- }
-
- function dismiss(modal, reason, noFlush) {
- var closed = modal.dismiss(reason);
- $rootScope.$digest();
- if (!noFlush) {
- $animate.flush();
- $rootScope.$digest();
- $animate.flush();
- $rootScope.$digest();
- }
- return closed;
- }
-
- describe('basic scenarios with default options', function() {
- it('should open and dismiss a modal with a minimal set of options', function() {
- var modal = open({template: '<div>Content</div>'});
-
- expect($document).toHaveModalsOpen(1);
- expect($document).toHaveModalOpenWithContent('Content', 'div');
- expect($document).toHaveBackdrop();
-
- dismiss(modal, 'closing in test');
-
- expect($document).toHaveModalsOpen(0);
-
- expect($document).not.toHaveBackdrop();
- });
-
- it('should not throw an exception on a second dismiss', function() {
- var modal = open({template: '<div>Content</div>'});
-
- expect($document).toHaveModalsOpen(1);
- expect($document).toHaveModalOpenWithContent('Content', 'div');
- expect($document).toHaveBackdrop();
-
- dismiss(modal, 'closing in test');
-
- expect($document).toHaveModalsOpen(0);
-
- dismiss(modal, 'closing in test', true);
- });
-
- it('should not throw an exception on a second close', function() {
- var modal = open({template: '<div>Content</div>'});
-
- expect($document).toHaveModalsOpen(1);
- expect($document).toHaveModalOpenWithContent('Content', 'div');
- expect($document).toHaveBackdrop();
-
- close(modal, 'closing in test');
-
- expect($document).toHaveModalsOpen(0);
-
- close(modal, 'closing in test', true);
- });
-
- it('should open a modal from templateUrl', function() {
- $templateCache.put('content.html', '<div>URL Content</div>');
- var modal = open({templateUrl: 'content.html'});
-
- expect($document).toHaveModalsOpen(1);
- expect($document).toHaveModalOpenWithContent('URL Content', 'div');
- expect($document).toHaveBackdrop();
-
- dismiss(modal, 'closing in test');
-
- expect($document).toHaveModalsOpen(0);
-
- expect($document).not.toHaveBackdrop();
- });
-
- it('should support closing on ESC', function() {
- var modal = open({template: '<div>Content</div>'});
- expect($document).toHaveModalsOpen(1);
-
- triggerKeyDown($document, 27);
- $animate.flush();
- $rootScope.$digest();
- $animate.flush();
- $rootScope.$digest();
-
- expect($document).toHaveModalsOpen(0);
- });
-
- it('should not close on ESC if event.preventDefault() was issued', function() {
- var modal = open({template: '<div><button>x</button></div>' });
- expect($document).toHaveModalsOpen(1);
-
- var button = angular.element('button').on('keydown', preventKeyDown);
-
- triggerKeyDown(button, 27);
- $rootScope.$digest();
-
- expect($document).toHaveModalsOpen(1);
-
- button.off('keydown', preventKeyDown);
-
- triggerKeyDown(button, 27);
- $animate.flush();
- $rootScope.$digest();
- $animate.flush();
- $rootScope.$digest();
-
- expect($document).toHaveModalsOpen(0);
-
- function preventKeyDown(evt) {
- evt.preventDefault();
- }
- });
-
- it('should support closing on backdrop click', function() {
- var modal = open({template: '<div>Content</div>'});
- expect($document).toHaveModalsOpen(1);
-
- $document.find('body > div.modal').click();
- $animate.flush();
- $rootScope.$digest();
- $animate.flush();
- $rootScope.$digest();
-
- expect($document).toHaveModalsOpen(0);
- });
-
- it('should return to the element which had focus before the dialog was invoked', function() {
- var link = '<a href>Link</a>';
- var element = angular.element(link);
- angular.element(document.body).append(element);
- element.focus();
- expect(document.activeElement.tagName).toBe('A');
-
- var modal = open({template: '<div>Content<button>inside modal</button></div>'});
- $animate.flush();
- $rootScope.$digest();
- expect(document.activeElement.tagName).toBe('DIV');
- expect($document).toHaveModalsOpen(1);
-
- triggerKeyDown($document, 27);
- $animate.flush();
- $rootScope.$digest();
- $animate.flush();
- $rootScope.$digest();
-
- expect(document.activeElement.tagName).toBe('A');
- expect($document).toHaveModalsOpen(0);
-
- element.remove();
- });
-
- it('should return to document.body if element which had focus before the dialog was invoked is gone, or is missing focus function', function() {
- var link = '<a href>Link</a>';
- var element = angular.element(link);
- angular.element(document.body).append(element);
- element.focus();
- expect(document.activeElement.tagName).toBe('A');
-
- var modal = open({template: '<div>Content</div>'});
- $animate.flush();
- $rootScope.$digest();
- expect(document.activeElement.tagName).toBe('DIV');
- expect($document).toHaveModalsOpen(1);
-
- // Fake undefined focus function, happening in IE in certain
- // iframe conditions. See issue 3639
- element[0].focus = undefined;
- triggerKeyDown($document, 27);
- $animate.flush();
- $rootScope.$digest();
- $animate.flush();
- $rootScope.$digest();
-
- expect(document.activeElement.tagName).toBe('BODY');
- expect($document).toHaveModalsOpen(0);
- element.remove();
- });
-
- it('should resolve returned promise on close', function() {
- var modal = open({template: '<div>Content</div>'});
- close(modal, 'closed ok');
-
- expect(modal.result).toBeResolvedWith('closed ok');
- });
-
- it('should reject returned promise on dismiss', function() {
-
- var modal = open({template: '<div>Content</div>'});
- dismiss(modal, 'esc');
-
- expect(modal.result).toBeRejectedWith('esc');
- });
-
- it('should reject returned promise on unexpected closure', function() {
- var scope = $rootScope.$new();
- var modal = open({template: '<div>Content</div>', scope: scope});
- scope.$destroy();
-
- expect(modal.result).toBeRejectedWith('$uibUnscheduledDestruction');
-
- $animate.flush();
- $rootScope.$digest();
- $animate.flush();
- $rootScope.$digest();
- expect($document).toHaveModalsOpen(0);
- });
-
- it('should expose a promise linked to the templateUrl / resolve promises', function() {
- var modal = open({template: '<div>Content</div>', resolve: {
- ok: function() {return $q.when('ok');}
- }}
- );
- expect(modal.opened).toBeResolvedWith(true);
- });
-
- it('should expose a promise linked to the templateUrl / resolve promises and reject it if needed', function() {
- var modal = open({template: '<div>Content</div>', resolve: {
- ok: function() {return $q.reject('ko');}
- }}
- );
- expect(modal.opened).toBeRejectedWith('ko');
- });
-
- it('should focus on the element that has autofocus attribute when the modal is open/reopen and the animations have finished', function() {
- function openAndCloseModalWithAutofocusElement() {
- var modal = open({template: '<div><input type="text" id="auto-focus-element" autofocus></div>'});
- $animate.flush();
- $rootScope.$digest();
- expect(angular.element('#auto-focus-element')).toHaveFocus();
-
- close(modal, 'closed ok');
-
- expect(modal.result).toBeResolvedWith('closed ok');
- }
-
- openAndCloseModalWithAutofocusElement();
- openAndCloseModalWithAutofocusElement();
- });
-
- it('should wait until the in animation is finished before attempting to focus the modal or autofocus element', function() {
- function openAndCloseModalWithAutofocusElement() {
- var modal = open({template: '<div><input type="text" id="auto-focus-element" autofocus></div>'});
- expect(angular.element('#auto-focus-element')).not.toHaveFocus();
-
- $animate.flush();
- $rootScope.$digest();
-
- expect(angular.element('#auto-focus-element')).toHaveFocus();
-
- close(modal, 'closed ok');
-
- expect(modal.result).toBeResolvedWith('closed ok');
- }
-
- function openAndCloseModalWithOutAutofocusElement() {
- var link = '<a href>Link</a>';
- var element = angular.element(link);
- angular.element(document.body).append(element);
- element.focus();
- expect(document.activeElement.tagName).toBe('A');
-
- var modal = open({template: '<div><input type="text"></div>'});
- expect(document.activeElement.tagName).toBe('A');
-
- $animate.flush();
- $rootScope.$digest();
-
- expect(document.activeElement.tagName).toBe('DIV');
-
- close(modal, 'closed ok');
-
- expect(modal.result).toBeResolvedWith('closed ok');
- }
-
- openAndCloseModalWithAutofocusElement();
- openAndCloseModalWithOutAutofocusElement();
- });
-
- it('should change focus to first element when tab key was pressed', function() {
- var initialPage = angular.element('<a href="#" id="cannot-get-focus-from-modal">Outland link</a>');
- angular.element(document.body).append(initialPage);
- initialPage.focus();
-
- open({
- template:'<a href="#" id="tab-focus-link"><input type="text" id="tab-focus-input1"/><input type="text" id="tab-focus-input2"/>' +
- '<button id="tab-focus-button">Open me!</button>'
- });
- expect($document).toHaveModalsOpen(1);
-
- var lastElement = angular.element(document.getElementById('tab-focus-button'));
- lastElement.focus();
- triggerKeyDown(lastElement, 9);
- expect(document.activeElement.getAttribute('id')).toBe('tab-focus-link');
-
- initialPage.remove();
- });
-
- it('should change focus to last element when shift+tab key is pressed', function() {
- var initialPage = angular.element('<a href="#" id="cannot-get-focus-from-modal">Outland link</a>');
- angular.element(document.body).append(initialPage);
- initialPage.focus();
-
- open({
- template:'<a href="#" id="tab-focus-link"><input type="text" id="tab-focus-input1"/><input type="text" id="tab-focus-input2"/>' +
- '<button id="tab-focus-button">Open me!</button>'
- });
- expect($document).toHaveModalsOpen(1);
-
- var lastElement = angular.element(document.getElementById('tab-focus-link'));
- lastElement.focus();
- triggerKeyDown(lastElement, 9, true);
- expect(document.activeElement.getAttribute('id')).toBe('tab-focus-button');
-
- initialPage.remove();
- });
- });
-
- describe('default options can be changed in a provider', function() {
- it('should allow overriding default options in a provider', function() {
- $uibModalProvider.options.backdrop = false;
- var modal = open({template: '<div>Content</div>'});
-
- expect($document).toHaveModalOpenWithContent('Content', 'div');
- expect($document).not.toHaveBackdrop();
- });
-
- it('should accept new objects with default options in a provider', function() {
- $uibModalProvider.options = {
- backdrop: false
- };
- var modal = open({template: '<div>Content</div>'});
-
- expect($document).toHaveModalOpenWithContent('Content', 'div');
- expect($document).not.toHaveBackdrop();
- });
- });
-
- describe('option by option', function () {
- describe('template and templateUrl', function () {
- it('should throw an error if none of template and templateUrl are provided', function() {
- expect(function(){
- var modal = open({});
- }).toThrow(new Error('One of template or templateUrl options is required.'));
- });
-
- it('should not fail if a templateUrl contains leading / trailing white spaces', function() {
-
- $templateCache.put('whitespace.html', ' <div>Whitespaces</div> ');
- open({templateUrl: 'whitespace.html'});
- expect($document).toHaveModalOpenWithContent('Whitespaces', 'div');
- });
-
- it('should accept template as a function', function() {
- open({template: function() {
- return '<div>From a function</div>';
- }});
-
- expect($document).toHaveModalOpenWithContent('From a function', 'div');
- });
-
- it('should not fail if a templateUrl as a function', function() {
-
- $templateCache.put('whitespace.html', ' <div>Whitespaces</div> ');
- open({templateUrl: function() {
- return 'whitespace.html';
- }});
- expect($document).toHaveModalOpenWithContent('Whitespaces', 'div');
- });
- });
-
- describe('controller', function() {
- it('should accept controllers and inject modal instances', function() {
- var TestCtrl = function($scope, $uibModalInstance) {
- $scope.fromCtrl = 'Content from ctrl';
- $scope.isModalInstance = angular.isObject($uibModalInstance) && angular.isFunction($uibModalInstance.close);
- };
-
- open({template: '<div>{{fromCtrl}} {{isModalInstance}}</div>', controller: TestCtrl});
- expect($document).toHaveModalOpenWithContent('Content from ctrl true', 'div');
- });
-
- it('should accept controllerAs alias', function() {
- $controllerProvider.register('TestCtrl', function($uibModalInstance) {
- this.fromCtrl = 'Content from ctrl';
- this.isModalInstance = angular.isObject($uibModalInstance) && angular.isFunction($uibModalInstance.close);
- });
-
- open({template: '<div>{{test.fromCtrl}} {{test.isModalInstance}}</div>', controller: 'TestCtrl as test'});
- expect($document).toHaveModalOpenWithContent('Content from ctrl true', 'div');
- });
-
- it('should respect the controllerAs property as an alternative for the controller-as syntax', function() {
- $controllerProvider.register('TestCtrl', function($uibModalInstance) {
- this.fromCtrl = 'Content from ctrl';
- this.isModalInstance = angular.isObject($uibModalInstance) && angular.isFunction($uibModalInstance.close);
- });
-
- open({template: '<div>{{test.fromCtrl}} {{test.isModalInstance}}</div>', controller: 'TestCtrl', controllerAs: 'test'});
- expect($document).toHaveModalOpenWithContent('Content from ctrl true', 'div');
- });
-
- it('should allow defining in-place controller-as controllers', function() {
- open({template: '<div>{{test.fromCtrl}} {{test.isModalInstance}}</div>', controller: function($uibModalInstance) {
- this.fromCtrl = 'Content from ctrl';
- this.isModalInstance = angular.isObject($uibModalInstance) && angular.isFunction($uibModalInstance.close);
- }, controllerAs: 'test'});
- expect($document).toHaveModalOpenWithContent('Content from ctrl true', 'div');
- });
-
- it('should allow usage of bindToController', function() {
- open({template: '<div>{{test.fromCtrl}} {{test.isModalInstance}}</div>', controller: function($uibModalInstance) {
- this.fromCtrl = 'Content from ctrl';
- this.isModalInstance = angular.isObject($uibModalInstance) && angular.isFunction($uibModalInstance.close);
- }, controllerAs: 'test', bindToController: true});
- expect($document).toHaveModalOpenWithContent('Content from ctrl true', 'div');
- });
- });
-
- describe('resolve', function() {
- var ExposeCtrl = function($scope, value) {
- $scope.value = value;
- };
-
- function modalDefinition(template, resolve) {
- return {
- template: template,
- controller: ExposeCtrl,
- resolve: resolve
- };
- }
-
- it('should resolve simple values', function() {
- open(modalDefinition('<div>{{value}}</div>', {
- value: function() {
- return 'Content from resolve';
- }
- }));
-
- expect($document).toHaveModalOpenWithContent('Content from resolve', 'div');
- });
-
- it('should resolve string references to injectables', function() {
- open({
- controller: function($scope, $foo) {
- $scope.value = 'Content from resolve';
- expect($foo).toBe($uibModal);
- },
- resolve: {
- $foo: '$uibModal'
- },
- template: '<div>{{value}}</div>'
- });
-
- expect($document).toHaveModalOpenWithContent('Content from resolve', 'div');
- });
-
- it('should resolve promises as promises', function() {
- open({
- controller: function($scope, $foo) {
- $scope.value = 'Content from resolve';
- expect($foo).toBe('bar');
- },
- resolve: {
- $foo: $q.when('bar')
- },
- template: '<div>{{value}}</div>'
- });
- });
-
- it('should delay showing modal if one of the resolves is a promise', function() {
- open(modalDefinition('<div>{{value}}</div>', {
- value: function() {
- return $timeout(function() { return 'Promise'; }, 100);
- }
- }));
- expect($document).toHaveModalsOpen(0);
-
- $timeout.flush();
- expect($document).toHaveModalOpenWithContent('Promise', 'div');
- });
-
- it('should not open dialog (and reject returned promise) if one of resolve fails', function() {
- var deferred = $q.defer();
-
- var modal = open(modalDefinition('<div>{{value}}</div>', {
- value: function() {
- return deferred.promise;
- }
- }));
- expect($document).toHaveModalsOpen(0);
-
- deferred.reject('error in test');
- $rootScope.$digest();
-
- expect($document).toHaveModalsOpen(0);
- expect(modal.result).toBeRejectedWith('error in test');
- });
-
- it('should support injection with minification-safe syntax in resolve functions', function() {
- open(modalDefinition('<div>{{value.id}}</div>', {
- value: ['$locale', function (e) {
- return e;
- }]
- }));
-
- expect($document).toHaveModalOpenWithContent('en-us', 'div');
- });
-
- //TODO: resolves with dependency injection - do we want to support them?
- });
-
- describe('scope', function() {
- it('should use custom scope if provided', function() {
- var $scope = $rootScope.$new();
- $scope.fromScope = 'Content from custom scope';
- open({
- template: '<div>{{fromScope}}</div>',
- scope: $scope
- });
- expect($document).toHaveModalOpenWithContent('Content from custom scope', 'div');
- });
-
- it('should create and use child of $rootScope if custom scope not provided', function() {
- var scopeTailBefore = $rootScope.$$childTail;
-
- $rootScope.fromScope = 'Content from root scope';
- open({
- template: '<div>{{fromScope}}</div>'
- });
- expect($document).toHaveModalOpenWithContent('Content from root scope', 'div');
- });
- });
-
- describe('keyboard', function () {
- it('should not close modals if keyboard option is set to false', function() {
- open({
- template: '<div>No keyboard</div>',
- keyboard: false
- });
-
- expect($document).toHaveModalsOpen(1);
-
- triggerKeyDown($document, 27);
- $rootScope.$digest();
-
- expect($document).toHaveModalsOpen(1);
- });
- });
-
- describe('backdrop', function() {
-
- it('should not have any backdrop element if backdrop set to false', function() {
- var modal = open({
- template: '<div>No backdrop</div>',
- backdrop: false
- });
- expect($document).toHaveModalOpenWithContent('No backdrop', 'div');
- expect($document).not.toHaveBackdrop();
-
- dismiss(modal);
- expect($document).toHaveModalsOpen(0);
- });
-
- it('should not close modal on backdrop click if backdrop is specified as "static"', function() {
- open({
- template: '<div>Static backdrop</div>',
- backdrop: 'static'
- });
-
- $document.find('body > div.modal-backdrop').click();
- $rootScope.$digest();
-
- expect($document).toHaveModalOpenWithContent('Static backdrop', 'div');
- expect($document).toHaveBackdrop();
- });
-
- it('should contain backdrop in classes on each modal opening', function() {
- var modal = open({ template: '<div>With backdrop</div>' });
- $animate.flush();
- var backdropEl = $document.find('body > div.modal-backdrop');
- expect(backdropEl).toHaveClass('in');
-
- dismiss(modal);
-
- modal = open({ template: '<div>With backdrop</div>' });
- $animate.flush();
- backdropEl = $document.find('body > div.modal-backdrop');
- expect(backdropEl).toHaveClass('in');
-
- });
-
- describe('custom backdrop classes', function () {
- it('should support additional backdrop class as string', function() {
- open({
- template: '<div>With custom backdrop class</div>',
- backdropClass: 'additional'
- });
-
- expect($document.find('div.modal-backdrop')).toHaveClass('additional');
- });
- });
- });
-
- describe('custom window classes', function() {
- it('should support additional window class as string', function() {
- open({
- template: '<div>With custom window class</div>',
- windowClass: 'additional'
- });
-
- expect($document.find('div.modal')).toHaveClass('additional');
- });
- });
-
- describe('top window class', function () {
- it('should support top class option', function () {
- open({
- template: '<div>With custom window top class</div>',
- windowTopClass: 'top-class'
- });
-
- expect($document.find('div.modal')).toHaveClass('top-class');
- });
- });
-
- describe('size', function() {
- it('should support creating small modal dialogs', function() {
- open({
- template: '<div>Small modal dialog</div>',
- size: 'sm'
- });
-
- expect($document.find('div.modal-dialog')).toHaveClass('modal-sm');
- });
-
- it('should support creating large modal dialogs', function() {
- open({
- template: '<div>Large modal dialog</div>',
- size: 'lg'
- });
-
- expect($document.find('div.modal-dialog')).toHaveClass('modal-lg');
- });
-
- it('should support custom size modal dialogs', function() {
- open({
- template: '<div>Large modal dialog</div>',
- size: 'custom'
- });
-
- expect($document.find('div.modal-dialog')).toHaveClass('modal-custom');
- });
- });
-
- describe('animation', function() {
- it('should have animation fade classes by default', function() {
- open({
- template: '<div>Small modal dialog</div>'
- });
-
- expect($document.find('.modal')).toHaveClass('fade');
- expect($document.find('.modal-backdrop')).toHaveClass('fade');
- });
-
- it('should not have fade classes if animation false', function() {
- open({
- template: '<div>Small modal dialog</div>',
- animation: false
- });
-
- expect($document.find('.modal')).not.toHaveClass('fade');
- expect($document.find('.modal-backdrop')).not.toHaveClass('fade');
- });
- });
-
- describe('openedClass', function() {
- var body;
-
- beforeEach(function() {
- body = $document.find('body');
- });
-
- it('should add the modal-open class to the body element by default', function() {
- open({
- template: '<div>dummy modal</div>'
- });
-
- expect(body).toHaveClass('modal-open');
- });
-
- it('should add the custom class to the body element', function() {
- open({
- template: '<div>dummy modal</div>',
- openedClass: 'foo'
- });
-
- expect(body).toHaveClass('foo');
- expect(body).not.toHaveClass('modal-open');
- });
-
- it('should remove the custom class on closing of modal', function() {
- var modal = open({
- template: '<div>dummy modal</div>',
- openedClass: 'foo'
- });
-
- expect(body).toHaveClass('foo');
-
- close(modal);
-
- expect(body).not.toHaveClass('foo');
- });
-
- it('should add multiple custom classes to the body element and remove appropriately', function() {
- var modal1 = open({
- template: '<div>dummy modal</div>',
- openedClass: 'foo'
- });
-
- expect(body).toHaveClass('foo');
- expect(body).not.toHaveClass('modal-open');
-
- var modal2 = open({
- template: '<div>dummy modal</div>',
- openedClass: 'bar'
- });
-
- expect(body).toHaveClass('foo');
- expect(body).toHaveClass('bar');
- expect(body).not.toHaveClass('modal-open');
-
- var modal3 = open({
- template: '<div>dummy modal</div>',
- openedClass: 'foo'
- });
-
- expect(body).toHaveClass('foo');
- expect(body).toHaveClass('bar');
- expect(body).not.toHaveClass('modal-open');
-
- close(modal1);
-
- expect(body).toHaveClass('foo');
- expect(body).toHaveClass('bar');
- expect(body).not.toHaveClass('modal-open');
-
- close(modal2);
-
- expect(body).toHaveClass('foo');
- expect(body).not.toHaveClass('bar');
- expect(body).not.toHaveClass('modal-open');
-
- close(modal3);
-
- expect(body).not.toHaveClass('foo');
- expect(body).not.toHaveClass('bar');
- expect(body).not.toHaveClass('modal-open');
- });
- });
- });
-
- describe('multiple modals', function() {
- it('it should allow opening of multiple modals', function() {
- var modal1 = open({template: '<div>Modal1</div>'});
- var modal2 = open({template: '<div>Modal2</div>'});
- expect($document).toHaveModalsOpen(2);
-
- dismiss(modal2);
- expect($document).toHaveModalsOpen(1);
- expect($document).toHaveModalOpenWithContent('Modal1', 'div');
-
- dismiss(modal1);
- expect($document).toHaveModalsOpen(0);
- });
-
- it('should not close any modals on ESC if the topmost one does not allow it', function() {
- var modal1 = open({template: '<div>Modal1</div>'});
- var modal2 = open({template: '<div>Modal2</div>', keyboard: false});
-
- triggerKeyDown($document, 27);
- $rootScope.$digest();
-
- expect($document).toHaveModalsOpen(2);
- });
-
- it('should not close any modals on click if a topmost modal does not have backdrop', function() {
- var modal1 = open({template: '<div>Modal1</div>'});
- var modal2 = open({template: '<div>Modal2</div>', backdrop: false});
-
- $document.find('body > div.modal-backdrop').click();
- $rootScope.$digest();
-
- expect($document).toHaveModalsOpen(2);
- });
-
- it('multiple modals should not interfere with default options', function() {
- var modal1 = open({template: '<div>Modal1</div>', backdrop: false});
- var modal2 = open({template: '<div>Modal2</div>'});
- $rootScope.$digest();
-
- expect($document).toHaveBackdrop();
- });
-
- it('should add "modal-open" class when a modal gets opened', function() {
- var body = $document.find('body');
- expect(body).not.toHaveClass('modal-open');
-
- var modal1 = open({template: '<div>Content1</div>'});
- expect(body).toHaveClass('modal-open');
-
- var modal2 = open({template: '<div>Content1</div>'});
- expect(body).toHaveClass('modal-open');
-
- dismiss(modal1);
- expect(body).toHaveClass('modal-open');
-
- dismiss(modal2);
- expect(body).not.toHaveClass('modal-open');
- });
-
- it('should return to the element which had focus before the dialog is invoked', function() {
- var link = '<a href>Link</a>';
- var element = angular.element(link);
- angular.element(document.body).append(element);
- element.focus();
- expect(document.activeElement.tagName).toBe('A');
-
- var modal1 = open({template: '<div>Modal1<button id="focus">inside modal1</button></div>'});
- $animate.flush();
- $rootScope.$digest();
- document.getElementById('focus').focus();
- expect(document.activeElement.tagName).toBe('BUTTON');
- expect($document).toHaveModalsOpen(1);
-
- var modal2 = open({template: '<div>Modal2</div>'});
- $animate.flush();
- $rootScope.$digest();
- expect(document.activeElement.tagName).toBe('DIV');
- expect($document).toHaveModalsOpen(2);
-
- dismiss(modal2);
- expect(document.activeElement.tagName).toBe('BUTTON');
- expect($document).toHaveModalsOpen(1);
-
- dismiss(modal1);
- expect(document.activeElement.tagName).toBe('A');
- expect($document).toHaveModalsOpen(0);
-
- element.remove();
- });
-
- it('should open modals and resolve the opened promises in order', function() {
- // Opens a modal for each element in array order.
- // Order is an array of non-repeating integers from 0..length-1 representing when to resolve that modal's promise.
- // For example [1,2,0] would resolve the 3rd modal's promise first and the 2nd modal's promise last.
- // Tests that the modals are added to $uibModalStack and that each resolves its "opened" promise sequentially.
- // If an element is {reject:n} then n is still the order, but the corresponding promise is rejected.
- // A rejection earlier in the open sequence should not affect modals opened later.
- function test(order) {
- var ds = []; // {index, deferred, reject}
- var expected = ''; // 0..length-1
- var actual = '';
- angular.forEach(order, function(x, i) {
- var reject = x.reject !== undefined;
- if (reject) {
- x = x.reject;
- } else {
- expected += i;
- }
- ds[x] = {index:i, deferred:$q.defer(), reject:reject};
-
- var scope = $rootScope.$new();
- scope.index = i;
- open({
- template: '<div>' + i + '</div>',
- scope: scope,
- resolve: {
- x: function() { return ds[x].deferred.promise; }
- }
- }).opened.then(function() {
- expect($uibModalStack.getTop().value.modalScope.index).toEqual(i);
- actual += i;
- });
- });
-
- angular.forEach(ds, function(d, i) {
- if (d.reject) {
- d.deferred.reject('rejected:' + d.index );
- } else {
- d.deferred.resolve('resolved:' + d.index );
- }
- $rootScope.$digest();
- });
-
- expect(actual).toEqual(expected);
- expect($uibModal.getPromiseChain()).toEqual(null);
- }
-
- // Calls emit n! times on arrays of length n containing all non-repeating permutations of the integers 0..n-1.
- function permute(n, emit) {
- if (n < 1 || typeof emit !== 'function') {
- return;
- }
- var a = [];
- function _permute(depth) {
- index: for (var i = 0; i < n; i++) {
- for (var j = 0; j < depth; j++) {
- if (a[j] === i) {
- continue index; // already used
- }
- }
-
- a[depth] = i;
- if (depth + 1 === n) {
- emit(angular.copy(a));
- } else {
- _permute(depth + 1);
- }
- }
- }
- _permute(0);
- }
-
- permute(2, function(a) { test(a); });
- permute(2, function(a) { test(a.map(function(x, i) { return {reject:x}; })); });
- permute(2, function(a) { test(a.map(function(x, i) { return i === 0 ? {reject:x} : x; })); });
- permute(3, function(a) { test(a); });
- permute(3, function(a) { test(a.map(function(x, i) { return {reject:x}; })); });
- permute(3, function(a) { test(a.map(function(x, i) { return i === 0 ? {reject:x} : x; })); });
- permute(3, function(a) { test(a.map(function(x, i) { return i === 1 ? {reject:x} : x; })); });
- });
-
- it('should have top class only on top window', function () {
- var modal1 = open({template: '<div>Content1</div>', windowClass: 'modal1', windowTopClass: 'modal-top'});
- expect($document.find('div.modal1')).toHaveClass('modal-top');
- expect($document).toHaveModalsOpen(1);
-
- var modal2 = open({template: '<div>Content1</div>', windowClass: 'modal2', windowTopClass: 'modal-top'});
- expect($document.find('div.modal1')).not.toHaveClass('modal-top');
- expect($document.find('div.modal2')).toHaveClass('modal-top');
- expect($document).toHaveModalsOpen(2);
-
- var modal3 = open({template: '<div>Content1</div>', windowClass: 'modal3', windowTopClass: 'modal-top'});
- expect($document.find('div.modal1')).not.toHaveClass('modal-top');
- expect($document.find('div.modal2')).not.toHaveClass('modal-top');
- expect($document.find('div.modal3')).toHaveClass('modal-top');
- expect($document).toHaveModalsOpen(3);
-
- dismiss(modal2);
- expect($document.find('div.modal1')).not.toHaveClass('modal-top');
- expect($document.find('div.modal3')).toHaveClass('modal-top');
- expect($document).toHaveModalsOpen(2);
-
- close(modal3);
- expect($document.find('div.modal1')).toHaveClass('modal-top');
- expect($document).toHaveModalsOpen(1);
- });
- });
-
- describe('modal.closing event', function() {
- it('should close the modal contingent on the modal.closing event and return whether the modal closed', function() {
- var preventDefault;
- var modal;
- var template = '<div>content</div>';
-
- function TestCtrl($scope) {
- $scope.$on('modal.closing', function(event, resultOrReason, closing) {
- if (preventDefault) {
- event.preventDefault();
- }
- });
- }
-
- modal = open({template: template, controller: TestCtrl});
-
- preventDefault = true;
- expect(close(modal, 'result', true)).toBeFalsy();
- expect($document).toHaveModalsOpen(1);
-
- preventDefault = false;
- expect(close(modal, 'result')).toBeTruthy();
- expect($document).toHaveModalsOpen(0);
-
- modal = open({template: template, controller: TestCtrl});
-
- preventDefault = true;
- expect(dismiss(modal, 'result', true)).toBeFalsy();
- expect($document).toHaveModalsOpen(1);
-
- preventDefault = false;
- expect(dismiss(modal, 'result')).toBeTruthy();
- expect($document).toHaveModalsOpen(0);
- });
-
- it('should trigger modal.closing and pass result/reason and closing parameters to the event', function() {
- var called;
-
- called = false;
- close(open({
- template: '<div>content</div>',
- controller: function($scope) {
- $scope.$on('modal.closing', function(event, resultOrReason, closing) {
- called = true;
- expect(resultOrReason).toBe('result');
- expect(closing).toBeTruthy();
- });
- }
- }), 'result');
- expect(called).toBeTruthy();
-
- called = false;
- dismiss(open({
- template: '<div>content</div>',
- controller: function($scope) {
- $scope.$on('modal.closing', function(event, resultOrReason, closing) {
- called = true;
- expect(resultOrReason).toBe('reason');
- expect(closing).toBeFalsy();
- });
- }
- }), 'reason');
- expect(called).toBeTruthy();
- });
- });
-});
-
-/* deprecation tests below */
-
-describe('$modal deprecation', function() {
- beforeEach(module('ngAnimateMock'));
- beforeEach(module('ui.bootstrap.modal'));
- beforeEach(module('template/modal/backdrop.html'));
- beforeEach(module('template/modal/window.html'));
-
- it('should suppress warning', function() {
- module(function($provide) {
- $provide.value('$modalSuppressWarning', true);
- });
-
- inject(function($modal, $timeout, $log, $rootScope) {
- spyOn($log, 'warn');
-
- $modal.open({template: '<div>Foo</div>', controller: function($modalInstance) {}});
- $rootScope.$digest();
- $timeout.flush(0);
- expect($log.warn.calls.count()).toBe(0);
- });
- });
-
- it('should give warning by default', inject(function($log) {
- spyOn($log, 'warn');
-
- inject(function($compile, $templateCache, $rootScope, $modal, $timeout) {
- var backdropTemplate =
- '<div class="modal-backdrop"' +
- 'modal-animation-class="fade"' +
- 'modal-in-class="in"' +
- 'ng-style="{\'z-index\': 1040 + (index && 1 || 0) + index*10}"' +
- '></div>';
- $templateCache.put('template/modal/backdrop.html', backdropTemplate);
-
- var windowTemplate =
- '<div modal-render="{{$isRendered}}" tabindex="-1" role="dialog" class="modal"' +
- 'modal-animation-class="fade"' +
- 'modal-in-class="in"' +
- 'ng-style="{\'z-index\': 1050 + index*10, display: \'block\'}">' +
- '<div class="modal-dialog" ng-class="size ? \'modal-\' + size : \'\'"><div class="modal-content" modal-transclude></div></div>' +
- '</div>';
- $templateCache.put('template/modal/window.html', windowTemplate);
-
- $modal.open({template: '<div>Foo</div>', controller: function($modalInstance) {}});
- $rootScope.$digest();
- $timeout.flush(0);
-
- expect($log.warn.calls.count()).toBe(6);
- expect($log.warn.calls.argsFor(0)).toEqual(['$modal is now deprecated. Use $uibModal instead.']);
- expect($log.warn.calls.argsFor(1)).toEqual(['$modalInstance is now deprecated. Use $uibModalInstance instead.']);
- expect($log.warn.calls.argsFor(2)).toEqual(['$modalStack is now deprecated. Use $uibModalStack instead.']);
- expect($log.warn.calls.argsFor(3)).toEqual(['modal-animation-class is now deprecated. Use uib-modal-animation-class instead.']);
- expect($log.warn.calls.argsFor(4)).toEqual(['modal-animation-class is now deprecated. Use uib-modal-animation-class instead.']);
- expect($log.warn.calls.argsFor(5)).toEqual(['modal-transclude is now deprecated. Use uib-modal-transclude instead.']);
-
- $log.warn.calls.reset();
- $compile('<div modal-backdrop></div>')($rootScope);
- $rootScope.$digest();
- expect($log.warn.calls.argsFor(1)).toEqual(['modal-backdrop is now deprecated. Use uib-modal-backdrop instead.']);
-
- $log.warn.calls.reset();
- $compile('<div modal-window></div>')($rootScope);
- $rootScope.$digest();
- expect($log.warn.calls.argsFor(2)).toEqual(['modal-window is now deprecated. Use uib-modal-window instead.']);
- });
- }));
-});
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/modal/test/modalWindow.spec.js b/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/modal/test/modalWindow.spec.js
deleted file mode 100644
index 60c00ae..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/modal/test/modalWindow.spec.js
+++ /dev/null
@@ -1,46 +0,0 @@
-describe('modal window', function() {
- var $rootScope, $compile;
-
- beforeEach(module('ui.bootstrap.modal'));
- beforeEach(module('template/modal/window.html'));
- beforeEach(inject(function (_$rootScope_, _$compile_) {
- $rootScope = _$rootScope_;
- $compile = _$compile_;
- }));
-
- it('should not use transclusion scope for modals content - issue 2110', function() {
- $rootScope.animate = false;
- $compile('<div uib-modal-window animate="animate"><span ng-init="foo=true"></span></div>')($rootScope);
- $rootScope.$digest();
-
- expect($rootScope.foo).toBeTruthy();
- });
-
- it('should support custom CSS classes as string', function() {
- $rootScope.animate = false;
- var windowEl = $compile('<div uib-modal-window animate="animate" window-class="test foo">content</div>')($rootScope);
- $rootScope.$digest();
-
- expect(windowEl).toHaveClass('test');
- expect(windowEl).toHaveClass('foo');
- });
-
- it('should support window top class', function () {
- $rootScope.animate = false;
- var windowEl = $compile('<div uib-modal-window animate="animate" window-top-class="test foo">content</div>')($rootScope);
- $rootScope.$digest();
-
- expect(windowEl).toHaveClass('test');
- expect(windowEl).toHaveClass('foo');
- });
-
- it('should support custom template url', inject(function($templateCache) {
- $templateCache.put('window.html', '<div class="mywindow" ng-transclude></div>');
-
- var windowEl = $compile('<div uib-modal-window template-url="window.html" window-class="test">content</div>')($rootScope);
- $rootScope.$digest();
-
- expect(windowEl).toHaveClass('mywindow');
- expect(windowEl).toHaveClass('test');
- }));
-});
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/modal/test/multiMap.spec.js b/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/modal/test/multiMap.spec.js
deleted file mode 100644
index c89624e..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/modal/test/multiMap.spec.js
+++ /dev/null
@@ -1,58 +0,0 @@
-describe('multi map', function() {
- var multiMap;
-
- beforeEach(module('ui.bootstrap.modal'));
- beforeEach(inject(function($$multiMap) {
- multiMap = $$multiMap.createNew();
- }));
-
- it('should add and remove objects by key', function() {
- multiMap.put('foo', 'bar');
-
- expect(multiMap.get('foo')).toEqual(['bar']);
-
- multiMap.put('foo', 'baz');
-
- expect(multiMap.get('foo')).toEqual(['bar', 'baz']);
-
- multiMap.remove('foo', 'bar');
-
- expect(multiMap.get('foo')).toEqual(['baz']);
-
- multiMap.remove('foo', 'baz');
-
- expect(multiMap.hasKey('foo')).toBe(false);
- });
-
- it('should support getting the keys', function() {
- multiMap.put('foo', 'bar');
- multiMap.put('baz', 'boo');
-
- expect(multiMap.keys()).toEqual(['foo', 'baz']);
- });
-
- it('should return all entries', function() {
- multiMap.put('foo', 'bar');
- multiMap.put('foo', 'bar2');
- multiMap.put('baz', 'boo');
-
- expect(multiMap.entries()).toEqual([
- {
- key: 'foo',
- value: ['bar', 'bar2']
- },
- {
- key: 'baz',
- value: ['boo']
- }
- ]);
- });
-
- it('should preserve semantic of an empty key', function() {
- expect(multiMap.get('key')).toBeUndefined();
- });
-
- it('should respect removal of non-existing elements', function() {
- expect(multiMap.remove('foo', 'bar')).toBeUndefined();
- });
-});
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/pagination/docs/demo.html b/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/pagination/docs/demo.html
deleted file mode 100644
index 16ec3ac..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/pagination/docs/demo.html
+++ /dev/null
@@ -1,19 +0,0 @@
-<div ng-controller="PaginationDemoCtrl">
- <h4>Default</h4>
- <uib-pagination total-items="totalItems" ng-model="currentPage" ng-change="pageChanged()"></uib-pagination>
- <uib-pagination boundary-links="true" total-items="totalItems" ng-model="currentPage" class="pagination-sm" previous-text="‹" next-text="›" first-text="«" last-text="»"></uib-pagination>
- <uib-pagination direction-links="false" boundary-links="true" total-items="totalItems" ng-model="currentPage"></uib-pagination>
- <uib-pagination direction-links="false" total-items="totalItems" ng-model="currentPage" num-pages="smallnumPages"></uib-pagination>
- <pre>The selected page no: {{currentPage}}</pre>
- <button type="button" class="btn btn-info" ng-click="setPage(3)">Set current page to: 3</button>
-
- <hr />
- <h4>Pager</h4>
- <uib-pager total-items="totalItems" ng-model="currentPage"></uib-pager>
-
- <hr />
- <h4>Limit the maximum visible buttons</h4>
- <uib-pagination total-items="bigTotalItems" ng-model="bigCurrentPage" max-size="maxSize" class="pagination-sm" boundary-links="true"></uib-pagination>
- <uib-pagination total-items="bigTotalItems" ng-model="bigCurrentPage" max-size="maxSize" class="pagination-sm" boundary-links="true" rotate="false" num-pages="numPages"></uib-pagination>
- <pre>Page: {{bigCurrentPage}} / {{numPages}}</pre>
-</div>
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/pagination/docs/demo.js b/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/pagination/docs/demo.js
deleted file mode 100644
index 9791aab..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/pagination/docs/demo.js
+++ /dev/null
@@ -1,16 +0,0 @@
-angular.module('ui.bootstrap.demo').controller('PaginationDemoCtrl', function ($scope, $log) {
- $scope.totalItems = 64;
- $scope.currentPage = 4;
-
- $scope.setPage = function (pageNo) {
- $scope.currentPage = pageNo;
- };
-
- $scope.pageChanged = function() {
- $log.log('Page changed to: ' + $scope.currentPage);
- };
-
- $scope.maxSize = 5;
- $scope.bigTotalItems = 175;
- $scope.bigCurrentPage = 1;
-});
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/pagination/docs/readme.md b/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/pagination/docs/readme.md
deleted file mode 100644
index 07c89d5..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/pagination/docs/readme.md
+++ /dev/null
@@ -1,91 +0,0 @@
-
-A lightweight pagination directive that is focused on ... providing pagination & will take care of visualising a pagination bar and enable / disable buttons correctly!
-
-### Pagination Settings ###
-
-Settings can be provided as attributes in the `<uib-pagination>` or globally configured through the `uibPaginationConfig`.
-
- * `ng-change`
- :
- `ng-change` can be used together with `ng-model` to call a function whenever the page changes.
-
- * `ng-model` <i class="glyphicon glyphicon-eye-open"></i>
- :
- Current page number. First page is 1.
-
- * `ng-disabled` <i class="glyphicon glyphicon-eye-open"></i>
- :
- Used to disable the pagination component
-
- * `total-items` <i class="glyphicon glyphicon-eye-open"></i>
- :
- Total number of items in all pages.
-
- * `items-per-page` <i class="glyphicon glyphicon-eye-open"></i>
- _(Defaults: 10)_ :
- Maximum number of items per page. A value less than one indicates all items on one page.
-
- * `max-size` <i class="glyphicon glyphicon-eye-open"></i>
- _(Defaults: null)_ :
- Limit number for pagination size.
-
- * `num-pages` <small class="badge">readonly</small>
- _(Defaults: angular.noop)_ :
- An optional expression assigned the total number of pages to display.
-
- * `rotate`
- _(Defaults: true)_ :
- Whether to keep current page in the middle of the visible ones.
-
- * `direction-links`
- _(Default: true)_ :
- Whether to display Previous / Next buttons.
-
- * `previous-text`
- _(Default: 'Previous')_ :
- Text for Previous button.
-
- * `next-text`
- _(Default: 'Next')_ :
- Text for Next button.
-
- * `boundary-links`
- _(Default: false)_ :
- Whether to display First / Last buttons.
-
- * `first-text`
- _(Default: 'First')_ :
- Text for First button.
-
- * `last-text`
- _(Default: 'Last')_ :
- Text for Last button.
-
- * `template-url`
- _(Default: 'template/pagination/pagination.html')_ :
- Override the template for the component with a custom provided template
-
-### Pager Settings ###
-
-Settings can be provided as attributes in the `<uib-pager>` or globally configured through the `uibPagerConfig`.
-For `ng-model`, `total-items`, `items-per-page` and `num-pages` see pagination settings. Other settings are:
-
- * `align`
- _(Default: true)_ :
- Whether to align each link to the sides.
-
- * `previous-text`
- _(Default: '« Previous')_ :
- Text for Previous button.
-
- * `next-text`
- _(Default: 'Next »')_ :
- Text for Next button.
-
- * `template-url`
- _(Default: 'template/pagination/pager.html') :
- Override the template for the component with a custom provided template
-
- * `ng-disabled` <i class="glyphicon glyphicon-eye-open"></i>
- :
- Used to disable the pager component
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/pagination/pagination.js b/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/pagination/pagination.js
deleted file mode 100644
index 1e75dcf..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/pagination/pagination.js
+++ /dev/null
@@ -1,457 +0,0 @@
-angular.module('ui.bootstrap.pagination', [])
-.controller('UibPaginationController', ['$scope', '$attrs', '$parse', function($scope, $attrs, $parse) {
- var self = this,
- ngModelCtrl = { $setViewValue: angular.noop }, // nullModelCtrl
- setNumPages = $attrs.numPages ? $parse($attrs.numPages).assign : angular.noop;
-
- this.init = function(ngModelCtrl_, config) {
- ngModelCtrl = ngModelCtrl_;
- this.config = config;
-
- ngModelCtrl.$render = function() {
- self.render();
- };
-
- if ($attrs.itemsPerPage) {
- $scope.$parent.$watch($parse($attrs.itemsPerPage), function(value) {
- self.itemsPerPage = parseInt(value, 10);
- $scope.totalPages = self.calculateTotalPages();
- });
- } else {
- this.itemsPerPage = config.itemsPerPage;
- }
-
- $scope.$watch('totalItems', function() {
- $scope.totalPages = self.calculateTotalPages();
- });
-
- $scope.$watch('totalPages', function(value) {
- setNumPages($scope.$parent, value); // Readonly variable
-
- if ( $scope.page > value ) {
- $scope.selectPage(value);
- } else {
- ngModelCtrl.$render();
- }
- });
- };
-
- this.calculateTotalPages = function() {
- var totalPages = this.itemsPerPage < 1 ? 1 : Math.ceil($scope.totalItems / this.itemsPerPage);
- return Math.max(totalPages || 0, 1);
- };
-
- this.render = function() {
- $scope.page = parseInt(ngModelCtrl.$viewValue, 10) || 1;
- };
-
- $scope.selectPage = function(page, evt) {
- if (evt) {
- evt.preventDefault();
- }
-
- var clickAllowed = !$scope.ngDisabled || !evt;
- if (clickAllowed && $scope.page !== page && page > 0 && page <= $scope.totalPages) {
- if (evt && evt.target) {
- evt.target.blur();
- }
- ngModelCtrl.$setViewValue(page);
- ngModelCtrl.$render();
- }
- };
-
- $scope.getText = function(key) {
- return $scope[key + 'Text'] || self.config[key + 'Text'];
- };
-
- $scope.noPrevious = function() {
- return $scope.page === 1;
- };
-
- $scope.noNext = function() {
- return $scope.page === $scope.totalPages;
- };
-}])
-
-.constant('uibPaginationConfig', {
- itemsPerPage: 10,
- boundaryLinks: false,
- directionLinks: true,
- firstText: 'First',
- previousText: 'Previous',
- nextText: 'Next',
- lastText: 'Last',
- rotate: true
-})
-
-.directive('uibPagination', ['$parse', 'uibPaginationConfig', function($parse, paginationConfig) {
- return {
- restrict: 'EA',
- scope: {
- totalItems: '=',
- firstText: '@',
- previousText: '@',
- nextText: '@',
- lastText: '@',
- ngDisabled:'='
- },
- require: ['uibPagination', '?ngModel'],
- controller: 'UibPaginationController',
- controllerAs: 'pagination',
- templateUrl: function(element, attrs) {
- return attrs.templateUrl || 'template/pagination/pagination.html';
- },
- replace: true,
- link: function(scope, element, attrs, ctrls) {
- var paginationCtrl = ctrls[0], ngModelCtrl = ctrls[1];
-
- if (!ngModelCtrl) {
- return; // do nothing if no ng-model
- }
-
- // Setup configuration parameters
- var maxSize = angular.isDefined(attrs.maxSize) ? scope.$parent.$eval(attrs.maxSize) : paginationConfig.maxSize,
- rotate = angular.isDefined(attrs.rotate) ? scope.$parent.$eval(attrs.rotate) : paginationConfig.rotate;
- scope.boundaryLinks = angular.isDefined(attrs.boundaryLinks) ? scope.$parent.$eval(attrs.boundaryLinks) : paginationConfig.boundaryLinks;
- scope.directionLinks = angular.isDefined(attrs.directionLinks) ? scope.$parent.$eval(attrs.directionLinks) : paginationConfig.directionLinks;
-
- paginationCtrl.init(ngModelCtrl, paginationConfig);
-
- if (attrs.maxSize) {
- scope.$parent.$watch($parse(attrs.maxSize), function(value) {
- maxSize = parseInt(value, 10);
- paginationCtrl.render();
- });
- }
-
- // Create page object used in template
- function makePage(number, text, isActive) {
- return {
- number: number,
- text: text,
- active: isActive
- };
- }
-
- function getPages(currentPage, totalPages) {
- var pages = [];
-
- // Default page limits
- var startPage = 1, endPage = totalPages;
- var isMaxSized = angular.isDefined(maxSize) && maxSize < totalPages;
-
- // recompute if maxSize
- if (isMaxSized) {
- if (rotate) {
- // Current page is displayed in the middle of the visible ones
- startPage = Math.max(currentPage - Math.floor(maxSize/2), 1);
- endPage = startPage + maxSize - 1;
-
- // Adjust if limit is exceeded
- if (endPage > totalPages) {
- endPage = totalPages;
- startPage = endPage - maxSize + 1;
- }
- } else {
- // Visible pages are paginated with maxSize
- startPage = ((Math.ceil(currentPage / maxSize) - 1) * maxSize) + 1;
-
- // Adjust last page if limit is exceeded
- endPage = Math.min(startPage + maxSize - 1, totalPages);
- }
- }
-
- // Add page number links
- for (var number = startPage; number <= endPage; number++) {
- var page = makePage(number, number, number === currentPage);
- pages.push(page);
- }
-
- // Add links to move between page sets
- if (isMaxSized && ! rotate) {
- if (startPage > 1) {
- var previousPageSet = makePage(startPage - 1, '...', false);
- pages.unshift(previousPageSet);
- }
-
- if (endPage < totalPages) {
- var nextPageSet = makePage(endPage + 1, '...', false);
- pages.push(nextPageSet);
- }
- }
-
- return pages;
- }
-
- var originalRender = paginationCtrl.render;
- paginationCtrl.render = function() {
- originalRender();
- if (scope.page > 0 && scope.page <= scope.totalPages) {
- scope.pages = getPages(scope.page, scope.totalPages);
- }
- };
- }
- };
-}])
-
-.constant('uibPagerConfig', {
- itemsPerPage: 10,
- previousText: '« Previous',
- nextText: 'Next »',
- align: true
-})
-
-.directive('uibPager', ['uibPagerConfig', function(pagerConfig) {
- return {
- restrict: 'EA',
- scope: {
- totalItems: '=',
- previousText: '@',
- nextText: '@',
- ngDisabled: '='
- },
- require: ['uibPager', '?ngModel'],
- controller: 'UibPaginationController',
- controllerAs: 'pagination',
- templateUrl: function(element, attrs) {
- return attrs.templateUrl || 'template/pagination/pager.html';
- },
- replace: true,
- link: function(scope, element, attrs, ctrls) {
- var paginationCtrl = ctrls[0], ngModelCtrl = ctrls[1];
-
- if (!ngModelCtrl) {
- return; // do nothing if no ng-model
- }
-
- scope.align = angular.isDefined(attrs.align) ? scope.$parent.$eval(attrs.align) : pagerConfig.align;
- paginationCtrl.init(ngModelCtrl, pagerConfig);
- }
- };
-}]);
-
-/* Deprecated Pagination Below */
-
-angular.module('ui.bootstrap.pagination')
-.value('$paginationSuppressWarning', false)
-.controller('PaginationController', ['$scope', '$attrs', '$parse', '$log', '$paginationSuppressWarning', function($scope, $attrs, $parse, $log, $paginationSuppressWarning) {
- if (!$paginationSuppressWarning) {
- $log.warn('PaginationController is now deprecated. Use UibPaginationController instead.');
- }
-
- var self = this,
- ngModelCtrl = { $setViewValue: angular.noop }, // nullModelCtrl
- setNumPages = $attrs.numPages ? $parse($attrs.numPages).assign : angular.noop;
-
- this.init = function(ngModelCtrl_, config) {
- ngModelCtrl = ngModelCtrl_;
- this.config = config;
-
- ngModelCtrl.$render = function() {
- self.render();
- };
-
- if ($attrs.itemsPerPage) {
- $scope.$parent.$watch($parse($attrs.itemsPerPage), function(value) {
- self.itemsPerPage = parseInt(value, 10);
- $scope.totalPages = self.calculateTotalPages();
- });
- } else {
- this.itemsPerPage = config.itemsPerPage;
- }
-
- $scope.$watch('totalItems', function() {
- $scope.totalPages = self.calculateTotalPages();
- });
-
- $scope.$watch('totalPages', function(value) {
- setNumPages($scope.$parent, value); // Readonly variable
-
- if ( $scope.page > value ) {
- $scope.selectPage(value);
- } else {
- ngModelCtrl.$render();
- }
- });
- };
-
- this.calculateTotalPages = function() {
- var totalPages = this.itemsPerPage < 1 ? 1 : Math.ceil($scope.totalItems / this.itemsPerPage);
- return Math.max(totalPages || 0, 1);
- };
-
- this.render = function() {
- $scope.page = parseInt(ngModelCtrl.$viewValue, 10) || 1;
- };
-
- $scope.selectPage = function(page, evt) {
- if (evt) {
- evt.preventDefault();
- }
-
- var clickAllowed = !$scope.ngDisabled || !evt;
- if (clickAllowed && $scope.page !== page && page > 0 && page <= $scope.totalPages) {
- if (evt && evt.target) {
- evt.target.blur();
- }
- ngModelCtrl.$setViewValue(page);
- ngModelCtrl.$render();
- }
- };
-
- $scope.getText = function(key) {
- return $scope[key + 'Text'] || self.config[key + 'Text'];
- };
-
- $scope.noPrevious = function() {
- return $scope.page === 1;
- };
-
- $scope.noNext = function() {
- return $scope.page === $scope.totalPages;
- };
-}])
-.directive('pagination', ['$parse', 'uibPaginationConfig', '$log', '$paginationSuppressWarning', function($parse, paginationConfig, $log, $paginationSuppressWarning) {
- return {
- restrict: 'EA',
- scope: {
- totalItems: '=',
- firstText: '@',
- previousText: '@',
- nextText: '@',
- lastText: '@',
- ngDisabled:'='
- },
- require: ['pagination', '?ngModel'],
- controller: 'PaginationController',
- controllerAs: 'pagination',
- templateUrl: function(element, attrs) {
- return attrs.templateUrl || 'template/pagination/pagination.html';
- },
- replace: true,
- link: function(scope, element, attrs, ctrls) {
- if (!$paginationSuppressWarning) {
- $log.warn('pagination is now deprecated. Use uib-pagination instead.');
- }
- var paginationCtrl = ctrls[0], ngModelCtrl = ctrls[1];
-
- if (!ngModelCtrl) {
- return; // do nothing if no ng-model
- }
-
- // Setup configuration parameters
- var maxSize = angular.isDefined(attrs.maxSize) ? scope.$parent.$eval(attrs.maxSize) : paginationConfig.maxSize,
- rotate = angular.isDefined(attrs.rotate) ? scope.$parent.$eval(attrs.rotate) : paginationConfig.rotate;
- scope.boundaryLinks = angular.isDefined(attrs.boundaryLinks) ? scope.$parent.$eval(attrs.boundaryLinks) : paginationConfig.boundaryLinks;
- scope.directionLinks = angular.isDefined(attrs.directionLinks) ? scope.$parent.$eval(attrs.directionLinks) : paginationConfig.directionLinks;
-
- paginationCtrl.init(ngModelCtrl, paginationConfig);
-
- if (attrs.maxSize) {
- scope.$parent.$watch($parse(attrs.maxSize), function(value) {
- maxSize = parseInt(value, 10);
- paginationCtrl.render();
- });
- }
-
- // Create page object used in template
- function makePage(number, text, isActive) {
- return {
- number: number,
- text: text,
- active: isActive
- };
- }
-
- function getPages(currentPage, totalPages) {
- var pages = [];
-
- // Default page limits
- var startPage = 1, endPage = totalPages;
- var isMaxSized = angular.isDefined(maxSize) && maxSize < totalPages;
-
- // recompute if maxSize
- if (isMaxSized) {
- if (rotate) {
- // Current page is displayed in the middle of the visible ones
- startPage = Math.max(currentPage - Math.floor(maxSize/2), 1);
- endPage = startPage + maxSize - 1;
-
- // Adjust if limit is exceeded
- if (endPage > totalPages) {
- endPage = totalPages;
- startPage = endPage - maxSize + 1;
- }
- } else {
- // Visible pages are paginated with maxSize
- startPage = ((Math.ceil(currentPage / maxSize) - 1) * maxSize) + 1;
-
- // Adjust last page if limit is exceeded
- endPage = Math.min(startPage + maxSize - 1, totalPages);
- }
- }
-
- // Add page number links
- for (var number = startPage; number <= endPage; number++) {
- var page = makePage(number, number, number === currentPage);
- pages.push(page);
- }
-
- // Add links to move between page sets
- if (isMaxSized && ! rotate) {
- if (startPage > 1) {
- var previousPageSet = makePage(startPage - 1, '...', false);
- pages.unshift(previousPageSet);
- }
-
- if (endPage < totalPages) {
- var nextPageSet = makePage(endPage + 1, '...', false);
- pages.push(nextPageSet);
- }
- }
-
- return pages;
- }
-
- var originalRender = paginationCtrl.render;
- paginationCtrl.render = function() {
- originalRender();
- if (scope.page > 0 && scope.page <= scope.totalPages) {
- scope.pages = getPages(scope.page, scope.totalPages);
- }
- };
- }
- };
-}])
-
-.directive('pager', ['uibPagerConfig', '$log', '$paginationSuppressWarning', function(pagerConfig, $log, $paginationSuppressWarning) {
- return {
- restrict: 'EA',
- scope: {
- totalItems: '=',
- previousText: '@',
- nextText: '@',
- ngDisabled: '='
- },
- require: ['pager', '?ngModel'],
- controller: 'PaginationController',
- controllerAs: 'pagination',
- templateUrl: function(element, attrs) {
- return attrs.templateUrl || 'template/pagination/pager.html';
- },
- replace: true,
- link: function(scope, element, attrs, ctrls) {
- if (!$paginationSuppressWarning) {
- $log.warn('pager is now deprecated. Use uib-pager instead.');
- }
- var paginationCtrl = ctrls[0], ngModelCtrl = ctrls[1];
-
- if (!ngModelCtrl) {
- return; // do nothing if no ng-model
- }
-
- scope.align = angular.isDefined(attrs.align) ? scope.$parent.$eval(attrs.align) : pagerConfig.align;
- paginationCtrl.init(ngModelCtrl, pagerConfig);
- }
- };
-}]);
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/pagination/test/pager.spec.js b/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/pagination/test/pager.spec.js
deleted file mode 100644
index 3756d70..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/pagination/test/pager.spec.js
+++ /dev/null
@@ -1,311 +0,0 @@
-describe('pager directive', function() {
- var $compile, $rootScope, $document, $templateCache, body, element;
- beforeEach(module('ui.bootstrap.pagination'));
- beforeEach(module('template/pagination/pager.html'));
- beforeEach(inject(function(_$compile_, _$rootScope_, _$document_, _$templateCache_) {
- $compile = _$compile_;
- $rootScope = _$rootScope_;
- $rootScope.total = 47; // 5 pages
- $rootScope.currentPage = 3;
- $document = _$document_;
- $templateCache = _$templateCache_;
- body = $document.find('body');
- element = $compile('<uib-pager total-items="total" ng-model="currentPage"></uib-pager>')($rootScope);
- $rootScope.$digest();
- }));
-
- function getPaginationBarSize() {
- return element.find('li').length;
- }
-
- function getPaginationEl(index) {
- return element.find('li').eq(index);
- }
-
- function clickPaginationEl(index) {
- getPaginationEl(index).find('a').click();
- }
-
- function getPaginationLinkEl(elem, index) {
- return elem.find('li').eq(index).find('a');
- }
-
- function updateCurrentPage(value) {
- $rootScope.currentPage = value;
- $rootScope.$digest();
- }
-
- it('has a "pager" css class', function() {
- expect(element.hasClass('pager')).toBe(true);
- });
-
- it('contains 2 li elements', function() {
- expect(getPaginationBarSize()).toBe(2);
- expect(getPaginationEl(0).text()).toBe('« Previous');
- expect(getPaginationEl(-1).text()).toBe('Next »');
- });
-
- it('aligns previous & next page', function() {
- expect(getPaginationEl(0)).toHaveClass('previous');
- expect(getPaginationEl(0)).not.toHaveClass('next');
-
- expect(getPaginationEl(-1)).not.toHaveClass('previous');
- expect(getPaginationEl(-1)).toHaveClass('next');
- });
-
- it('exposes the controller on the template', function() {
- $templateCache.put('template/pagination/pager.html', '<div>{{pagination.text}}</div>');
-
- element = $compile('<uib-pager></uib-pager>')($rootScope);
- $rootScope.$digest();
-
- var ctrl = element.controller('uibPager');
- expect(ctrl).toBeDefined();
-
- ctrl.text = 'foo';
- $rootScope.$digest();
-
- expect(element.html()).toBe('foo');
- });
-
- it('disables the "previous" link if current page is 1', function() {
- updateCurrentPage(1);
- expect(getPaginationEl(0)).toHaveClass('disabled');
- });
-
- it('disables the "next" link if current page is num-pages', function() {
- updateCurrentPage(5);
- expect(getPaginationEl(-1)).toHaveClass('disabled');
- });
-
- it('changes currentPage if the "previous" link is clicked', function() {
- clickPaginationEl(0);
- expect($rootScope.currentPage).toBe(2);
- });
-
- it('changes currentPage if the "next" link is clicked', function() {
- clickPaginationEl(-1);
- expect($rootScope.currentPage).toBe(4);
- });
-
- it('does not change the current page on "previous" click if already at first page', function() {
- updateCurrentPage(1);
- clickPaginationEl(0);
- expect($rootScope.currentPage).toBe(1);
- });
-
- it('does not change the current page on "next" click if already at last page', function() {
- updateCurrentPage(5);
- clickPaginationEl(-1);
- expect($rootScope.currentPage).toBe(5);
- });
-
- it('executes the `ng-change` expression when an element is clicked', function() {
- $rootScope.selectPageHandler = jasmine.createSpy('selectPageHandler');
- element = $compile('<uib-pager total-items="total" ng-model="currentPage" ng-change="selectPageHandler()"></uib-pager>')($rootScope);
- $rootScope.$digest();
-
- clickPaginationEl(-1);
- expect($rootScope.selectPageHandler).toHaveBeenCalled();
- });
-
- it('does not changes the number of pages when `total-items` changes', function() {
- $rootScope.total = 73; // 8 pages
- $rootScope.$digest();
-
- expect(getPaginationBarSize()).toBe(2);
- expect(getPaginationEl(0).text()).toBe('« Previous');
- expect(getPaginationEl(-1).text()).toBe('Next »');
- });
-
- it('should blur the "next" link after it has been clicked', function() {
- body.append(element);
- var linkEl = getPaginationLinkEl(element, -1);
-
- linkEl.focus();
- expect(linkEl).toHaveFocus();
-
- linkEl.click();
- expect(linkEl).not.toHaveFocus();
-
- element.remove();
- });
-
- it('should blur the "prev" link after it has been clicked', function() {
- body.append(element);
- var linkEl = getPaginationLinkEl(element, -1);
-
- linkEl.focus();
- expect(linkEl).toHaveFocus();
-
- linkEl.click();
- expect(linkEl).not.toHaveFocus();
-
- element.remove();
- });
-
- it('allows custom templates', function() {
- $templateCache.put('foo/bar.html', '<div>baz</div>');
-
- element = $compile('<pager template-url="foo/bar.html"></pager>')($rootScope);
- $rootScope.$digest();
-
- expect(element.html()).toBe('baz');
- });
-
- describe('`items-per-page`', function() {
- beforeEach(function() {
- $rootScope.perpage = 5;
- element = $compile('<uib-pager total-items="total" items-per-page="perpage" ng-model="currentPage"></uib-pager>')($rootScope);
- $rootScope.$digest();
- });
-
- it('does not change the number of pages', function() {
- expect(getPaginationBarSize()).toBe(2);
- expect(getPaginationEl(0).text()).toBe('« Previous');
- expect(getPaginationEl(-1).text()).toBe('Next »');
- });
-
- it('selects the last page when it is too big', function() {
- $rootScope.perpage = 30;
- $rootScope.$digest();
-
- expect($rootScope.currentPage).toBe(2);
- expect(getPaginationBarSize()).toBe(2);
- expect(getPaginationEl(0)).not.toHaveClass('disabled');
- expect(getPaginationEl(-1)).toHaveClass('disabled');
- });
- });
-
- describe('when `page` is not a number', function() {
- it('handles string', function() {
- updateCurrentPage('1');
- expect(getPaginationEl(0)).toHaveClass('disabled');
-
- updateCurrentPage('05');
- expect(getPaginationEl(-1)).toHaveClass('disabled');
- });
- });
-
- describe('`num-pages`', function() {
- beforeEach(function() {
- $rootScope.numpg = null;
- element = $compile('<uib-pager total-items="total" ng-model="currentPage" num-pages="numpg"></uib-pager>')($rootScope);
- $rootScope.$digest();
- });
-
- it('equals to total number of pages', function() {
- expect($rootScope.numpg).toBe(5);
- });
- });
-
- describe('setting `pagerConfig`', function() {
- var originalConfig = {};
- beforeEach(inject(function(uibPagerConfig) {
- angular.extend(originalConfig, uibPagerConfig);
- uibPagerConfig.previousText = 'PR';
- uibPagerConfig.nextText = 'NE';
- uibPagerConfig.align = false;
- element = $compile('<uib-pager total-items="total" ng-model="currentPage"></uib-pager>')($rootScope);
- $rootScope.$digest();
- }));
- afterEach(inject(function(uibPagerConfig) {
- // return it to the original state
- angular.extend(uibPagerConfig, originalConfig);
- }));
-
- it('should change paging text', function() {
- expect(getPaginationEl(0).text()).toBe('PR');
- expect(getPaginationEl(-1).text()).toBe('NE');
- });
-
- it('should not align previous & next page link', function() {
- expect(getPaginationEl(0)).not.toHaveClass('previous');
- expect(getPaginationEl(-1)).not.toHaveClass('next');
- });
- });
-
- describe('override configuration from attributes', function() {
- beforeEach(function() {
- element = $compile('<uib-pager align="false" previous-text="<" next-text=">" total-items="total" ng-model="currentPage"></uib-pager>')($rootScope);
- $rootScope.$digest();
- });
-
- it('contains 2 li elements', function() {
- expect(getPaginationBarSize()).toBe(2);
- });
-
- it('should change paging text from attributes', function() {
- expect(getPaginationEl(0).text()).toBe('<');
- expect(getPaginationEl(-1).text()).toBe('>');
- });
-
- it('should not align previous & next page link', function() {
- expect(getPaginationEl(0)).not.toHaveClass('previous');
- expect(getPaginationEl(-1)).not.toHaveClass('next');
- });
-
- it('changes "previous" & "next" text from interpolated attributes', function() {
- $rootScope.previousText = '<<';
- $rootScope.nextText = '>>';
- element = $compile('<uib-pager align="false" previous-text="{{previousText}}" next-text="{{nextText}}" total-items="total" ng-model="currentPage"></uib-pager>')($rootScope);
- $rootScope.$digest();
-
- expect(getPaginationEl(0).text()).toBe('<<');
- expect(getPaginationEl(-1).text()).toBe('>>');
- });
- });
-
- it('disables the component when ng-disabled is true', function() {
- $rootScope.disable = true;
-
- element = $compile('<uib-pager total-items="total" ng-disabled="disable" ng-model="currentPage"></uib-pager>')($rootScope);
- $rootScope.$digest();
- updateCurrentPage(2);
-
- expect(getPaginationEl(0)).toHaveClass('disabled');
- expect(getPaginationEl(-1)).toHaveClass('disabled');
-
- $rootScope.disable = false;
- $rootScope.$digest();
-
- expect(getPaginationEl(0)).not.toHaveClass('disabled');
- expect(getPaginationEl(-1)).not.toHaveClass('disabled');
-
- $rootScope.disable = true;
- $rootScope.$digest();
-
- expect(getPaginationEl(0)).toHaveClass('disabled');
- expect(getPaginationEl(-1)).toHaveClass('disabled');
- });
-});
-
-describe('pager deprecation', function() {
- beforeEach(module('ui.bootstrap.pagination'));
- beforeEach(module('template/pagination/pager.html'));
-
- it('should suppress warning', function() {
- module(function($provide) {
- $provide.value('$paginationSuppressWarning', true);
- });
-
- inject(function($compile, $log, $rootScope) {
- spyOn($log, 'warn');
-
- var element = $compile('<pager total-items="total" ng-model="currentPage"></pager>')($rootScope);
- $rootScope.$digest();
- expect($log.warn.calls.count()).toBe(0);
- });
- });
-
- it('should give warning by default', inject(function($compile, $log, $rootScope) {
- spyOn($log, 'warn');
-
- var element = $compile('<pager total-items="total" ng-model="currentPage"></pager>')($rootScope);
- $rootScope.$digest();
-
- expect($log.warn.calls.count()).toBe(2);
- expect($log.warn.calls.argsFor(0)).toEqual(['PaginationController is now deprecated. Use UibPaginationController instead.']);
- expect($log.warn.calls.argsFor(1)).toEqual(['pager is now deprecated. Use uib-pager instead.']);
- }));
-});
\ No newline at end of file
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/pagination/test/pagination.spec.js b/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/pagination/test/pagination.spec.js
deleted file mode 100644
index a3ef250..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/pagination/test/pagination.spec.js
+++ /dev/null
@@ -1,766 +0,0 @@
-describe('pagination directive', function() {
- var $compile, $rootScope, $document, $templateCache, body, element;
- beforeEach(module('ui.bootstrap.pagination'));
- beforeEach(module('template/pagination/pagination.html'));
- beforeEach(inject(function(_$compile_, _$rootScope_, _$document_, _$templateCache_) {
- $compile = _$compile_;
- $rootScope = _$rootScope_;
- $rootScope.total = 47; // 5 pages
- $rootScope.currentPage = 3;
- $rootScope.disabled = false;
- $document = _$document_;
- $templateCache = _$templateCache_;
- body = $document.find('body');
- element = $compile('<uib-pagination total-items="total" ng-model="currentPage"></uib-pagination>')($rootScope);
- $rootScope.$digest();
- }));
-
- function getPaginationBarSize() {
- return element.find('li').length;
- }
-
- function getPaginationEl(index) {
- return element.find('li').eq(index);
- }
-
- function clickPaginationEl(index) {
- getPaginationEl(index).find('a').click();
- }
-
- function getPaginationLinkEl(elem, index) {
- return elem.find('li').eq(index).find('a');
- }
-
- function updateCurrentPage(value) {
- $rootScope.currentPage = value;
- $rootScope.$digest();
- }
-
- function setDisabled(value) {
- $rootScope.disabled = value;
- $rootScope.$digest();
- }
-
- it('has a "pagination" css class', function() {
- expect(element.hasClass('pagination')).toBe(true);
- });
-
- it('exposes the controller to the template', function() {
- $templateCache.put('template/pagination/pagination.html', '<div>{{pagination.randomText}}</div>');
- var scope = $rootScope.$new();
-
- element = $compile('<uib-pagination></uib-pagination>')(scope);
- $rootScope.$digest();
-
- var ctrl = element.controller('uibPagination');
-
- expect(ctrl).toBeDefined();
-
- ctrl.randomText = 'foo';
- $rootScope.$digest();
-
- expect(element.html()).toBe('foo');
- });
-
- it('allows custom templates', function() {
- $templateCache.put('foo/bar.html', '<div>baz</div>');
- var scope = $rootScope.$new();
-
- element = $compile('<uib-pagination template-url="foo/bar.html"></uib-pagination>')(scope);
- $rootScope.$digest();
-
- expect(element.html()).toBe('baz');
- });
-
- it('contains num-pages + 2 li elements', function() {
- expect(getPaginationBarSize()).toBe(7);
- expect(getPaginationEl(0).text()).toBe('Previous');
- expect(getPaginationEl(-1).text()).toBe('Next');
- });
-
- it('has the number of the page as text in each page item', function() {
- for (var i = 1; i <= 5; i++) {
- expect(getPaginationEl(i).text()).toEqual(''+i);
- }
- });
-
- it('sets the current page to be active', function() {
- expect(getPaginationEl($rootScope.currentPage).hasClass('active')).toBe(true);
- });
-
- it('disables the "previous" link if current page is 1', function() {
- updateCurrentPage(1);
- expect(getPaginationEl(0).hasClass('disabled')).toBe(true);
- });
-
- it('disables the "next" link if current page is last', function() {
- updateCurrentPage(5);
- expect(getPaginationEl(-1).hasClass('disabled')).toBe(true);
- });
-
- it('changes currentPage if a page link is clicked', function() {
- clickPaginationEl(2);
- expect($rootScope.currentPage).toBe(2);
- });
-
- it('changes currentPage if the "previous" link is clicked', function() {
- clickPaginationEl(0);
- expect($rootScope.currentPage).toBe(2);
- });
-
- it('changes currentPage if the "next" link is clicked', function() {
- clickPaginationEl(-1);
- expect($rootScope.currentPage).toBe(4);
- });
-
- it('does not change the current page on "previous" click if already at first page', function() {
- updateCurrentPage(1);
- clickPaginationEl(0);
- expect($rootScope.currentPage).toBe(1);
- });
-
- it('does not change the current page on "next" click if already at last page', function() {
- updateCurrentPage(5);
- clickPaginationEl(-1);
- expect($rootScope.currentPage).toBe(5);
- });
-
- it('changes the number of pages when `total-items` changes', function() {
- $rootScope.total = 78; // 8 pages
- $rootScope.$digest();
-
- expect(getPaginationBarSize()).toBe(10);
- expect(getPaginationEl(0).text()).toBe('Previous');
- expect(getPaginationEl(-1).text()).toBe('Next');
- });
-
- it('does not "break" when `total-items` is undefined', function() {
- $rootScope.total = undefined;
- $rootScope.$digest();
-
- expect(getPaginationBarSize()).toBe(3); // Previous, 1, Next
- expect(getPaginationEl(0)).toHaveClass('disabled');
- expect(getPaginationEl(1)).toHaveClass('active');
- expect(getPaginationEl(2)).toHaveClass('disabled');
- });
-
- it('does not "break" when `total-items` is negative', function() {
- $rootScope.total = -1;
- $rootScope.$digest();
-
- expect(getPaginationBarSize()).toBe(3); // Previous, 1, Next
- expect(getPaginationEl(0)).toHaveClass('disabled');
- expect(getPaginationEl(1)).toHaveClass('active');
- expect(getPaginationEl(2)).toHaveClass('disabled');
- });
-
- it('does not change the current page when `total-items` changes but is valid', function() {
- $rootScope.currentPage = 1;
- $rootScope.total = 18; // 2 pages
- $rootScope.$digest();
-
- expect($rootScope.currentPage).toBe(1);
- });
-
- it('should blur a page link after it has been clicked', function() {
- body.append(element);
- var linkEl = getPaginationLinkEl(element, 2);
-
- linkEl.focus();
- expect(linkEl).toHaveFocus();
-
- linkEl.click();
- expect(linkEl).not.toHaveFocus();
-
- element.remove();
- });
-
- it('should blur the "next" link after it has been clicked', function() {
- body.append(element);
- var linkEl = getPaginationLinkEl(element, -1);
-
- linkEl.focus();
- expect(linkEl).toHaveFocus();
-
- linkEl.click();
- expect(linkEl).not.toHaveFocus();
-
- element.remove();
- });
-
- it('should blur the "prev" link after it has been clicked', function() {
- body.append(element);
- var linkEl = getPaginationLinkEl(element, 0);
-
- linkEl.focus();
- expect(linkEl).toHaveFocus();
-
- linkEl.click();
- expect(linkEl).not.toHaveFocus();
-
- element.remove();
- });
-
- describe('`items-per-page`', function() {
- beforeEach(function() {
- $rootScope.perpage = 5;
- element = $compile('<uib-pagination total-items="total" items-per-page="perpage" ng-model="currentPage"></uib-pagination>')($rootScope);
- $rootScope.$digest();
- });
-
- it('changes the number of pages', function() {
- expect(getPaginationBarSize()).toBe(12);
- expect(getPaginationEl(0).text()).toBe('Previous');
- expect(getPaginationEl(-1).text()).toBe('Next');
- });
-
- it('changes the number of pages when changes', function() {
- $rootScope.perpage = 20;
- $rootScope.$digest();
-
- expect(getPaginationBarSize()).toBe(5);
- expect(getPaginationEl(0).text()).toBe('Previous');
- expect(getPaginationEl(-1).text()).toBe('Next');
- });
-
- it('selects the last page when current page is too big', function() {
- $rootScope.perpage = 30;
- $rootScope.$digest();
-
- expect($rootScope.currentPage).toBe(2);
- expect(getPaginationBarSize()).toBe(4);
- expect(getPaginationEl(0).text()).toBe('Previous');
- expect(getPaginationEl(-1).text()).toBe('Next');
- });
-
- it('displays a single page when it is negative', function() {
- $rootScope.perpage = -1;
- $rootScope.$digest();
-
- expect(getPaginationBarSize()).toBe(3);
- expect(getPaginationEl(0).text()).toBe('Previous');
- expect(getPaginationEl(1).text()).toBe('1');
- expect(getPaginationEl(-1).text()).toBe('Next');
- });
- });
-
- describe('executes `ng-change` expression', function() {
- beforeEach(function() {
- $rootScope.selectPageHandler = jasmine.createSpy('selectPageHandler');
- element = $compile('<uib-pagination total-items="total" ng-model="currentPage" ng-change="selectPageHandler()"></uib-pagination>')($rootScope);
- $rootScope.$digest();
- });
-
- it('when an element is clicked', function() {
- clickPaginationEl(2);
- expect($rootScope.selectPageHandler).toHaveBeenCalled();
- });
- });
-
- describe('when `page` is not a number', function() {
- it('handles numerical string', function() {
- updateCurrentPage('2');
- expect(getPaginationEl(2)).toHaveClass('active');
-
- updateCurrentPage('04');
- expect(getPaginationEl(4)).toHaveClass('active');
- });
-
- it('defaults to 1 if non-numeric', function() {
- updateCurrentPage('pizza');
- expect(getPaginationEl(1)).toHaveClass('active');
- });
- });
-
- describe('with `max-size` option', function() {
- beforeEach(function() {
- $rootScope.total = 98; // 10 pages
- $rootScope.currentPage = 3;
- $rootScope.maxSize = 5;
- element = $compile('<uib-pagination total-items="total" ng-model="currentPage" max-size="maxSize"></uib-pagination>')($rootScope);
- $rootScope.$digest();
- });
-
- it('contains maxsize + 2 li elements', function() {
- expect(getPaginationBarSize()).toBe($rootScope.maxSize + 2);
- expect(getPaginationEl(0).text()).toBe('Previous');
- expect(getPaginationEl(-1).text()).toBe('Next');
- });
-
- it('shows the page number even if it can\'t be shown in the middle', function() {
- updateCurrentPage(1);
- expect(getPaginationEl(1)).toHaveClass('active');
-
- updateCurrentPage(10);
- expect(getPaginationEl(-2)).toHaveClass('active');
- });
-
- it('shows the page number in middle after the next link is clicked', function() {
- updateCurrentPage(6);
- clickPaginationEl(-1);
-
- expect($rootScope.currentPage).toBe(7);
- expect(getPaginationEl(3)).toHaveClass('active');
- expect(getPaginationEl(3).text()).toBe(''+$rootScope.currentPage);
- });
-
- it('shows the page number in middle after the prev link is clicked', function() {
- updateCurrentPage(7);
- clickPaginationEl(0);
-
- expect($rootScope.currentPage).toBe(6);
- expect(getPaginationEl(3)).toHaveClass('active');
- expect(getPaginationEl(3).text()).toBe(''+$rootScope.currentPage);
- });
-
- it('changes pagination bar size when max-size value changed', function() {
- $rootScope.maxSize = 7;
- $rootScope.$digest();
- expect(getPaginationBarSize()).toBe(9);
- });
-
- it('sets the pagination bar size to num-pages, if max-size is greater than num-pages ', function() {
- $rootScope.maxSize = 15;
- $rootScope.$digest();
- expect(getPaginationBarSize()).toBe(12);
- });
-
- it('should not change value of max-size expression, if max-size is greater than num-pages ', function() {
- $rootScope.maxSize = 15;
- $rootScope.$digest();
- expect($rootScope.maxSize).toBe(15);
- });
-
- it('should not display page numbers, if max-size is zero', function() {
- $rootScope.maxSize = 0;
- $rootScope.$digest();
- expect(getPaginationBarSize()).toBe(2);
- expect(getPaginationEl(0).text()).toBe('Previous');
- expect(getPaginationEl(-1).text()).toBe('Next');
- });
-
- it('should blur page link when visible range changes', function () {
- body.append(element);
- var linkEl = getPaginationLinkEl(element, 4);
-
- linkEl.focus();
- expect(linkEl).toHaveFocus();
-
- linkEl.click();
- expect(linkEl).not.toHaveFocus();
-
- element.remove();
- });
- });
-
- describe('with `max-size` option & no `rotate`', function() {
- beforeEach(function() {
- $rootScope.total = 115; // 12 pages
- $rootScope.currentPage = 7;
- $rootScope.maxSize = 5;
- $rootScope.rotate = false;
- element = $compile('<uib-pagination total-items="total" ng-model="currentPage" max-size="maxSize" rotate="rotate"></uib-pagination>')($rootScope);
- $rootScope.$digest();
- });
-
- it('contains maxsize + 4 elements', function() {
- expect(getPaginationBarSize()).toBe($rootScope.maxSize + 4);
- expect(getPaginationEl(0).text()).toBe('Previous');
- expect(getPaginationEl(1).text()).toBe('...');
- expect(getPaginationEl(2).text()).toBe('6');
- expect(getPaginationEl(-3).text()).toBe('10');
- expect(getPaginationEl(-2).text()).toBe('...');
- expect(getPaginationEl(-1).text()).toBe('Next');
- });
-
- it('shows only the next ellipsis element on first page set', function() {
- updateCurrentPage(3);
- expect(getPaginationEl(1).text()).toBe('1');
- expect(getPaginationEl(-3).text()).toBe('5');
- expect(getPaginationEl(-2).text()).toBe('...');
- });
-
- it('shows only the previous ellipsis element on last page set', function() {
- updateCurrentPage(12);
- expect(getPaginationBarSize()).toBe(5);
- expect(getPaginationEl(1).text()).toBe('...');
- expect(getPaginationEl(2).text()).toBe('11');
- expect(getPaginationEl(-2).text()).toBe('12');
- });
-
- it('moves to the previous set when first ellipsis is clicked', function() {
- expect(getPaginationEl(1).text()).toBe('...');
-
- clickPaginationEl(1);
-
- expect($rootScope.currentPage).toBe(5);
- expect(getPaginationEl(-3)).toHaveClass('active');
- });
-
- it('moves to the next set when last ellipsis is clicked', function() {
- expect(getPaginationEl(-2).text()).toBe('...');
-
- clickPaginationEl(-2);
-
- expect($rootScope.currentPage).toBe(11);
- expect(getPaginationEl(2)).toHaveClass('active');
- });
-
- it('should not display page numbers, if max-size is zero', function() {
- $rootScope.maxSize = 0;
- $rootScope.$digest();
-
- expect(getPaginationBarSize()).toBe(2);
- expect(getPaginationEl(0).text()).toBe('Previous');
- expect(getPaginationEl(1).text()).toBe('Next');
- });
- });
-
- describe('pagination directive with `boundary-links`', function() {
- beforeEach(function() {
- element = $compile('<uib-pagination boundary-links="true" total-items="total" ng-model="currentPage"></uib-pagination>')($rootScope);
- $rootScope.$digest();
- });
-
- it('contains num-pages + 4 li elements', function() {
- expect(getPaginationBarSize()).toBe(9);
- expect(getPaginationEl(0).text()).toBe('First');
- expect(getPaginationEl(1).text()).toBe('Previous');
- expect(getPaginationEl(-2).text()).toBe('Next');
- expect(getPaginationEl(-1).text()).toBe('Last');
- });
-
- it('has first and last li elements visible', function() {
- expect(getPaginationEl(0).css('display')).not.toBe('none');
- expect(getPaginationEl(-1).css('display')).not.toBe('none');
- });
-
-
- it('disables the "first" & "previous" link if current page is 1', function() {
- updateCurrentPage(1);
-
- expect(getPaginationEl(0)).toHaveClass('disabled');
- expect(getPaginationEl(1)).toHaveClass('disabled');
- });
-
- it('disables the "last" & "next" link if current page is num-pages', function() {
- updateCurrentPage(5);
-
- expect(getPaginationEl(-2)).toHaveClass('disabled');
- expect(getPaginationEl(-1)).toHaveClass('disabled');
- });
-
- it('changes currentPage if the "first" link is clicked', function() {
- clickPaginationEl(0);
- expect($rootScope.currentPage).toBe(1);
- });
-
- it('changes currentPage if the "last" link is clicked', function() {
- clickPaginationEl(-1);
- expect($rootScope.currentPage).toBe(5);
- });
-
- it('does not change the current page on "first" click if already at first page', function() {
- updateCurrentPage(1);
- clickPaginationEl(0);
- expect($rootScope.currentPage).toBe(1);
- });
-
- it('does not change the current page on "last" click if already at last page', function() {
- updateCurrentPage(5);
- clickPaginationEl(-1);
- expect($rootScope.currentPage).toBe(5);
- });
-
- it('changes "first" & "last" text from attributes', function() {
- element = $compile('<uib-pagination boundary-links="true" first-text="<<<" last-text=">>>" total-items="total" ng-model="currentPage"></uib-pagination>')($rootScope);
- $rootScope.$digest();
-
- expect(getPaginationEl(0).text()).toBe('<<<');
- expect(getPaginationEl(-1).text()).toBe('>>>');
- });
-
- it('changes "previous" & "next" text from attributes', function() {
- element = $compile('<uib-pagination boundary-links="true" previous-text="<<" next-text=">>" total-items="total" ng-model="currentPage"></uib-pagination>')($rootScope);
- $rootScope.$digest();
-
- expect(getPaginationEl(1).text()).toBe('<<');
- expect(getPaginationEl(-2).text()).toBe('>>');
- });
-
- it('changes "first" & "last" text from interpolated attributes', function() {
- $rootScope.myfirstText = '<<<';
- $rootScope.mylastText = '>>>';
- element = $compile('<uib-pagination boundary-links="true" first-text="{{myfirstText}}" last-text="{{mylastText}}" total-items="total" ng-model="currentPage"></uib-pagination>')($rootScope);
- $rootScope.$digest();
-
- expect(getPaginationEl(0).text()).toBe('<<<');
- expect(getPaginationEl(-1).text()).toBe('>>>');
- });
-
- it('changes "previous" & "next" text from interpolated attributes', function() {
- $rootScope.previousText = '<<';
- $rootScope.nextText = '>>';
- element = $compile('<uib-pagination boundary-links="true" previous-text="{{previousText}}" next-text="{{nextText}}" total-items="total" ng-model="currentPage"></uib-pagination>')($rootScope);
- $rootScope.$digest();
-
- expect(getPaginationEl(1).text()).toBe('<<');
- expect(getPaginationEl(-2).text()).toBe('>>');
- });
-
- it('should blur the "first" link after it has been clicked', function() {
- body.append(element);
- var linkEl = getPaginationLinkEl(element, 0);
-
- linkEl.focus();
- expect(linkEl).toHaveFocus();
-
- linkEl.click();
- expect(linkEl).not.toHaveFocus();
-
- element.remove();
- });
-
- it('should blur the "last" link after it has been clicked', function() {
- body.append(element);
- var linkEl = getPaginationLinkEl(element, -1);
-
- linkEl.focus();
- expect(linkEl).toHaveFocus();
-
- linkEl.click();
- expect(linkEl).not.toHaveFocus();
-
- element.remove();
- });
- });
-
- describe('pagination directive with just number links', function() {
- beforeEach(function() {
- element = $compile('<uib-pagination direction-links="false" total-items="total" ng-model="currentPage"></uib-pagination>')($rootScope);
- $rootScope.$digest();
- });
-
- it('contains num-pages li elements', function() {
- expect(getPaginationBarSize()).toBe(5);
- expect(getPaginationEl(0).text()).toBe('1');
- expect(getPaginationEl(-1).text()).toBe('5');
- });
-
- it('has the number of the page as text in each page item', function() {
- for(var i = 0; i < 5; i++) {
- expect(getPaginationEl(i).text()).toEqual(''+(i+1));
- }
- });
-
- it('sets the current page to be active', function() {
- expect(getPaginationEl(2)).toHaveClass('active');
- });
-
- it('does not disable the "1" link if current page is 1', function() {
- updateCurrentPage(1);
-
- expect(getPaginationEl(0)).not.toHaveClass('disabled');
- expect(getPaginationEl(0)).toHaveClass('active');
- });
-
- it('does not disable the "last" link if current page is last page', function() {
- updateCurrentPage(5);
-
- expect(getPaginationEl(-1)).not.toHaveClass('disabled');
- expect(getPaginationEl(-1)).toHaveClass('active');
- });
-
- it('changes currentPage if a page link is clicked', function() {
- clickPaginationEl(1);
- expect($rootScope.currentPage).toBe(2);
- });
-
- it('changes the number of items when total items changes', function() {
- $rootScope.total = 73; // 8 pages
- $rootScope.$digest();
-
- expect(getPaginationBarSize()).toBe(8);
- expect(getPaginationEl(0).text()).toBe('1');
- expect(getPaginationEl(-1).text()).toBe('8');
- });
- });
-
- describe('with just boundary & number links', function() {
- beforeEach(function() {
- $rootScope.directions = false;
- element = $compile('<uib-pagination boundary-links="true" direction-links="directions" total-items="total" ng-model="currentPage"></uib-pagination>')($rootScope);
- $rootScope.$digest();
- });
-
- it('contains number of pages + 2 li elements', function() {
- expect(getPaginationBarSize()).toBe(7);
- expect(getPaginationEl(0).text()).toBe('First');
- expect(getPaginationEl(1).text()).toBe('1');
- expect(getPaginationEl(-2).text()).toBe('5');
- expect(getPaginationEl(-1).text()).toBe('Last');
- });
-
- it('disables the "first" & activates "1" link if current page is 1', function() {
- updateCurrentPage(1);
-
- expect(getPaginationEl(0)).toHaveClass('disabled');
- expect(getPaginationEl(1)).not.toHaveClass('disabled');
- expect(getPaginationEl(1)).toHaveClass('active');
- });
-
- it('disables the "last" & "next" link if current page is num-pages', function() {
- updateCurrentPage(5);
-
- expect(getPaginationEl(-2)).toHaveClass('active');
- expect(getPaginationEl(-2)).not.toHaveClass('disabled');
- expect(getPaginationEl(-1)).toHaveClass('disabled');
- });
- });
-
- describe('`num-pages`', function () {
- beforeEach(function() {
- $rootScope.numpg = null;
- element = $compile('<uib-pagination total-items="total" ng-model="currentPage" num-pages="numpg"></uib-pagination>')($rootScope);
- $rootScope.$digest();
- });
-
- it('equals to total number of pages', function() {
- expect($rootScope.numpg).toBe(5);
- });
-
- it('changes when total number of pages change', function() {
- $rootScope.total = 73; // 8 pages
- $rootScope.$digest();
- expect($rootScope.numpg).toBe(8);
- });
-
- it('shows minimun one page if total items are not defined and does not break binding', function() {
- $rootScope.total = undefined;
- $rootScope.$digest();
- expect($rootScope.numpg).toBe(1);
-
- $rootScope.total = 73; // 8 pages
- $rootScope.$digest();
- expect($rootScope.numpg).toBe(8);
- });
- });
-
- describe('setting `paginationConfig`', function() {
- var originalConfig, paginationConfig;
- beforeEach(inject(function(_uibPaginationConfig_) {
- originalConfig = angular.copy(_uibPaginationConfig_);
- paginationConfig = _uibPaginationConfig_;
- }));
- afterEach(inject(function(_uibPaginationConfig_) {
- // return it to the original stat
- angular.copy(originalConfig, _uibPaginationConfig_);
- }));
-
- it('should change paging text', function() {
- paginationConfig.boundaryLinks = true;
- paginationConfig.directionLinks = true;
- paginationConfig.firstText = 'FI';
- paginationConfig.previousText = 'PR';
- paginationConfig.nextText = 'NE';
- paginationConfig.lastText = 'LA';
- element = $compile('<uib-pagination total-items="total" ng-model="currentPage"></uib-pagination>')($rootScope);
- $rootScope.$digest();
-
- expect(getPaginationEl(0).text()).toBe('FI');
- expect(getPaginationEl(1).text()).toBe('PR');
- expect(getPaginationEl(-2).text()).toBe('NE');
- expect(getPaginationEl(-1).text()).toBe('LA');
- });
-
- it('contains number of pages + 2 li elements', function() {
- paginationConfig.itemsPerPage = 5;
- element = $compile('<uib-pagination total-items="total" ng-model="currentPage"></uib-pagination>')($rootScope);
- $rootScope.$digest();
-
- expect(getPaginationBarSize()).toBe(12);
- });
-
- it('should take maxSize defaults into account', function() {
- paginationConfig.maxSize = 2;
- element = $compile('<uib-pagination total-items="total" ng-model="currentPage"></uib-pagination>')($rootScope);
- $rootScope.$digest();
-
- expect(getPaginationBarSize()).toBe(4);
- });
- });
-
- describe('override configuration from attributes', function() {
- beforeEach(function() {
- element = $compile('<uib-pagination boundary-links="true" first-text="<<" previous-text="<" next-text=">" last-text=">>" total-items="total" ng-model="currentPage"></uib-pagination>')($rootScope);
- $rootScope.$digest();
- });
-
- it('contains number of pages + 4 li elements', function() {
- expect(getPaginationBarSize()).toBe(9);
- });
-
- it('should change paging text from attribute', function() {
- expect(getPaginationEl(0).text()).toBe('<<');
- expect(getPaginationEl(1).text()).toBe('<');
- expect(getPaginationEl(-2).text()).toBe('>');
- expect(getPaginationEl(-1).text()).toBe('>>');
- });
- });
-
- describe('disabled with ngDisable', function() {
- beforeEach(function() {
- element = $compile('<uib-pagination total-items="total" ng-model="currentPage" ng-disabled="disabled"></uib-pagination>')($rootScope);
- $rootScope.currentPage = 3;
- $rootScope.$digest();
- });
-
- it('should not respond to clicking', function() {
- setDisabled(true);
- clickPaginationEl(2);
- expect($rootScope.currentPage).toBe(3);
- setDisabled(false);
- clickPaginationEl(2);
- expect($rootScope.currentPage).toBe(2);
- });
-
- it('should change the class of all buttons except selected one', function() {
- setDisabled(false);
- expect(getPaginationEl(3).hasClass('active')).toBe(true);
- expect(getPaginationEl(4).hasClass('active')).toBe(false);
- setDisabled(true);
- expect(getPaginationEl(3).hasClass('disabled')).toBe(false);
- expect(getPaginationEl(4).hasClass('disabled')).toBe(true);
- });
- });
-});
-
-describe('pagination deprecation', function() {
- beforeEach(module('ui.bootstrap.pagination'));
- beforeEach(module('template/pagination/pagination.html'));
-
- it('should suppress warning', function() {
- module(function($provide) {
- $provide.value('$paginationSuppressWarning', true);
- });
-
- inject(function($compile, $log, $rootScope) {
- spyOn($log, 'warn');
-
- var element = $compile('<pagination></pagination>')($rootScope);
- $rootScope.$digest();
- expect($log.warn.calls.count()).toBe(0);
- });
- });
-
- it('should give warning by default', inject(function($compile, $log, $rootScope) {
- spyOn($log, 'warn');
-
- var element = $compile('<pagination></pagination>')($rootScope);
- $rootScope.$digest();
-
- expect($log.warn.calls.count()).toBe(2);
- expect($log.warn.calls.argsFor(0)).toEqual(['PaginationController is now deprecated. Use UibPaginationController instead.']);
- expect($log.warn.calls.argsFor(1)).toEqual(['pagination is now deprecated. Use uib-pagination instead.']);
- }));
-});
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/popover/docs/demo.html b/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/popover/docs/demo.html
deleted file mode 100644
index bb90429..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/popover/docs/demo.html
+++ /dev/null
@@ -1,44 +0,0 @@
-<div ng-controller="PopoverDemoCtrl">
- <h4>Dynamic</h4>
- <div class="form-group">
- <label>Popup Text:</label>
- <input type="text" ng-model="dynamicPopover.content" class="form-control">
- </div>
- <div class="form-group">
- <label>Popup Title:</label>
- <input type="text" ng-model="dynamicPopover.title" class="form-control">
- </div>
- <div class="form-group">
- <label>Popup Template:</label>
- <input type="text" ng-model="dynamicPopover.templateUrl" class="form-control">
- </div>
- <button uib-popover="{{dynamicPopover.content}}" popover-title="{{dynamicPopover.title}}" type="button" class="btn btn-default">Dynamic Popover</button>
-
- <button uib-popover-template="dynamicPopover.templateUrl" popover-title="{{dynamicPopover.title}}" type="button" class="btn btn-default">Popover With Template</button>
-
- <script type="text/ng-template" id="myPopoverTemplate.html">
- <div>{{dynamicPopover.content}}</div>
- <div class="form-group">
- <label>Popup Title:</label>
- <input type="text" ng-model="dynamicPopover.title" class="form-control">
- </div>
- </script>
- <hr />
- <h4>Positional</h4>
- <button popover-placement="top" uib-popover="On the Top!" type="button" class="btn btn-default">Top</button>
- <button popover-placement="left" uib-popover="On the Left!" type="button" class="btn btn-default">Left</button>
- <button popover-placement="right" uib-popover="On the Right!" type="button" class="btn btn-default">Right</button>
- <button popover-placement="bottom" uib-popover="On the Bottom!" type="button" class="btn btn-default">Bottom</button>
-
- <hr />
- <h4>Triggers</h4>
- <p>
- <button uib-popover="I appeared on mouse enter!" popover-trigger="mouseenter" type="button" class="btn btn-default">Mouseenter</button>
- </p>
- <input type="text" value="Click me!" uib-popover="I appeared on focus! Click away and I'll vanish..." popover-trigger="focus" class="form-control">
-
- <hr />
- <h4>Other</h4>
- <button popover-animation="true" uib-popover="I fade in and out!" type="button" class="btn btn-default">fading</button>
- <button uib-popover="I have a title!" popover-title="The title." type="button" class="btn btn-default">title</button>
-</div>
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/popover/docs/demo.js b/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/popover/docs/demo.js
deleted file mode 100644
index 0d94f28..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/popover/docs/demo.js
+++ /dev/null
@@ -1,7 +0,0 @@
-angular.module('ui.bootstrap.demo').controller('PopoverDemoCtrl', function ($scope) {
- $scope.dynamicPopover = {
- content: 'Hello, World!',
- templateUrl: 'myPopoverTemplate.html',
- title: 'Title'
- };
-});
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/popover/docs/readme.md b/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/popover/docs/readme.md
deleted file mode 100644
index 5f91772..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/popover/docs/readme.md
+++ /dev/null
@@ -1,49 +0,0 @@
-A lightweight, extensible directive for fancy popover creation. The popover
-directive supports multiple placements, optional transition animation, and more.
-
-Like the Bootstrap jQuery plugin, the popover **requires** the tooltip
-module.
-
-There are two versions of the popover: `uib-popover` and `uib-popover-template`:
-
-- `uib-popover` takes text only and will escape any HTML provided for the popover
- body.
-- `uib-popover-html` takes an expression that evaluates to an html string. *The user is responsible for ensuring the
- content is safe to put into the DOM!*
-- `uib-popover-template` a URL representing the location of a template to
- use for the popover body. Note that the contents of this template need to be
- wrapped in a tag, e.g., `<div></div>`.
-
-The popover directives provides several optional attributes to control how it
-will display:
-
-- `popover-title`: A string to display as a fancy title.
-- `popover-placement`: Where to place it? Defaults to "top", but also accepts
- "bottom", "left", "right".
-- `popover-animation`: Should it fade in and out? Defaults to "true".
-- `popover-popup-delay`: For how long should the user have to have the mouse
- over the element before the popover shows (in milliseconds)? Defaults to 0.
-- `popover-popup-close-delay`: For how long should the popover remain open
- after the close trigger event? Defaults to 0.
-- `popover-trigger`: What should trigger the show of the popover? See the
- `tooltip` directive for supported values.
-- `popover-append-to-body`: Should the tooltip be appended to `$body` instead of
- the parent element?
-- `popover-is-open` <i class="glyphicon glyphicon-eye-open"></i>
- _(Default: false)_:
- Whether to show the popover.
-
-The popover directives require the `$position` service.
-
-The popover directive also supports various default configurations through the
-$tooltipProvider. See the [tooltip](#tooltip) section for more information.
-
-**Known issues**
-
-For Safari 7+ support, if you want to use **focus** `popover-trigger`, you need to use an anchor tag with a tab index. For example:
-
-```
-<a tabindex="0" uib-popover="Test" popover-trigger="focus" class="btn btn-default">
- Click Me
-</a>
-```
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/popover/popover.js b/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/popover/popover.js
deleted file mode 100644
index bc46086..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/popover/popover.js
+++ /dev/null
@@ -1,125 +0,0 @@
-/**
- * The following features are still outstanding: popup delay, animation as a
- * function, placement as a function, inside, support for more triggers than
- * just mouse enter/leave, and selector delegatation.
- */
-angular.module('ui.bootstrap.popover', ['ui.bootstrap.tooltip'])
-
-.directive('uibPopoverTemplatePopup', function() {
- return {
- replace: true,
- scope: { title: '@', contentExp: '&', placement: '@', popupClass: '@', animation: '&', isOpen: '&',
- originScope: '&' },
- templateUrl: 'template/popover/popover-template.html',
- link: function(scope, element) {
- element.addClass('popover');
- }
- };
-})
-
-.directive('uibPopoverTemplate', ['$uibTooltip', function($uibTooltip) {
- return $uibTooltip('uibPopoverTemplate', 'popover', 'click', {
- useContentExp: true
- });
-}])
-
-.directive('uibPopoverHtmlPopup', function() {
- return {
- replace: true,
- scope: { contentExp: '&', title: '@', placement: '@', popupClass: '@', animation: '&', isOpen: '&' },
- templateUrl: 'template/popover/popover-html.html',
- link: function(scope, element) {
- element.addClass('popover');
- }
- };
-})
-
-.directive('uibPopoverHtml', ['$uibTooltip', function($uibTooltip) {
- return $uibTooltip('uibPopoverHtml', 'popover', 'click', {
- useContentExp: true
- });
-}])
-
-.directive('uibPopoverPopup', function() {
- return {
- replace: true,
- scope: { title: '@', content: '@', placement: '@', popupClass: '@', animation: '&', isOpen: '&' },
- templateUrl: 'template/popover/popover.html',
- link: function(scope, element) {
- element.addClass('popover');
- }
- };
-})
-
-.directive('uibPopover', ['$uibTooltip', function($uibTooltip) {
- return $uibTooltip('uibPopover', 'popover', 'click');
-}]);
-
-/* Deprecated popover below */
-
-angular.module('ui.bootstrap.popover')
-
-.value('$popoverSuppressWarning', false)
-
-.directive('popoverTemplatePopup', ['$log', '$popoverSuppressWarning', function($log, $popoverSuppressWarning) {
- return {
- replace: true,
- scope: { title: '@', contentExp: '&', placement: '@', popupClass: '@', animation: '&', isOpen: '&',
- originScope: '&' },
- templateUrl: 'template/popover/popover-template.html',
- link: function(scope, element) {
- if (!$popoverSuppressWarning) {
- $log.warn('popover-template-popup is now deprecated. Use uib-popover-template-popup instead.');
- }
-
- element.addClass('popover');
- }
- };
-}])
-
-.directive('popoverTemplate', ['$tooltip', function($tooltip) {
- return $tooltip('popoverTemplate', 'popover', 'click', {
- useContentExp: true
- });
-}])
-
-.directive('popoverHtmlPopup', ['$log', '$popoverSuppressWarning', function($log, $popoverSuppressWarning) {
- return {
- replace: true,
- scope: { contentExp: '&', title: '@', placement: '@', popupClass: '@', animation: '&', isOpen: '&' },
- templateUrl: 'template/popover/popover-html.html',
- link: function(scope, element) {
- if (!$popoverSuppressWarning) {
- $log.warn('popover-html-popup is now deprecated. Use uib-popover-html-popup instead.');
- }
-
- element.addClass('popover');
- }
- };
-}])
-
-.directive('popoverHtml', ['$tooltip', function($tooltip) {
- return $tooltip('popoverHtml', 'popover', 'click', {
- useContentExp: true
- });
-}])
-
-.directive('popoverPopup', ['$log', '$popoverSuppressWarning', function($log, $popoverSuppressWarning) {
- return {
- replace: true,
- scope: { title: '@', content: '@', placement: '@', popupClass: '@', animation: '&', isOpen: '&' },
- templateUrl: 'template/popover/popover.html',
- link: function(scope, element) {
- if (!$popoverSuppressWarning) {
- $log.warn('popover-popup is now deprecated. Use uib-popover-popup instead.');
- }
-
- element.addClass('popover');
- }
- };
-}])
-
-.directive('popover', ['$tooltip', function($tooltip) {
-
- return $tooltip('popover', 'popover', 'click');
-}]);
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/popover/test/popover-html.spec.js b/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/popover/test/popover-html.spec.js
deleted file mode 100644
index 9c59daa..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/popover/test/popover-html.spec.js
+++ /dev/null
@@ -1,250 +0,0 @@
-describe('popover', function() {
- var elm,
- elmBody,
- scope,
- elmScope,
- tooltipScope;
-
- // load the popover code
- beforeEach(module('ui.bootstrap.popover'));
-
- // load the template
- beforeEach(module('template/popover/popover-html.html'));
-
- beforeEach(inject(function($rootScope, $compile, $sce) {
- elmBody = angular.element(
- '<div><span uib-popover-html="template">Selector Text</span></div>'
- );
-
- scope = $rootScope;
- scope.template = $sce.trustAsHtml('<span>My template</span>');
- $compile(elmBody)(scope);
- scope.$digest();
- elm = elmBody.find('span');
- elmScope = elm.scope();
- tooltipScope = elmScope.$$childTail;
- }));
-
- it('should not be open initially', inject(function() {
- expect(tooltipScope.isOpen).toBe(false);
-
- // We can only test *that* the popover-popup element wasn't created as the
- // implementation is templated and replaced.
- expect(elmBody.children().length).toBe(1);
- }));
-
- it('should open on click', inject(function() {
- elm.trigger('click');
- tooltipScope.$digest();
- expect(tooltipScope.isOpen).toBe(true);
-
- // We can only test *that* the popover-popup element was created as the
- // implementation is templated and replaced.
- expect(elmBody.children().length).toBe(2);
- }));
-
- it('should close on second click', inject(function() {
- elm.trigger('click');
- tooltipScope.$digest();
- expect(tooltipScope.isOpen).toBe(true);
- elm.trigger('click');
- tooltipScope.$digest();
- expect(tooltipScope.isOpen).toBe(false);
- }));
-
- it('should not open on click if template is empty', inject(function() {
- scope.template = null;
- scope.$digest();
-
- elm.trigger('click');
- tooltipScope.$digest();
- expect(tooltipScope.isOpen).toBe(false);
-
- expect(elmBody.children().length).toBe(1);
- }));
-
- it('should show updated text', inject(function($sce) {
- scope.template = $sce.trustAsHtml('<span>My template</span>');
- scope.$digest();
-
- elm.trigger('click');
- tooltipScope.$digest();
- expect(tooltipScope.isOpen).toBe(true);
-
- expect(elmBody.children().eq(1).text().trim()).toBe('My template');
-
- scope.template = $sce.trustAsHtml('<span>Another template</span>');
- scope.$digest();
-
- expect(elmBody.children().eq(1).text().trim()).toBe('Another template');
- }));
-
- it('should hide popover when template becomes empty', inject(function($timeout) {
- elm.trigger('click');
- tooltipScope.$digest();
- expect(tooltipScope.isOpen).toBe(true);
-
- scope.template = '';
- scope.$digest();
-
- expect(tooltipScope.isOpen).toBe(false);
-
- $timeout.flush();
- expect(elmBody.children().length).toBe(1);
- }));
-
-
- it('should not unbind event handlers created by other directives - issue 456', inject(function($compile) {
- scope.click = function() {
- scope.clicked = !scope.clicked;
- };
-
- elmBody = angular.element(
- '<div><input uib-popover-html="template" ng-click="click()" popover-trigger="mouseenter"/></div>'
- );
- $compile(elmBody)(scope);
- scope.$digest();
-
- elm = elmBody.find('input');
-
- elm.trigger('mouseenter');
- tooltipScope.$digest();
- elm.trigger('mouseleave');
- tooltipScope.$digest();
- expect(scope.clicked).toBeFalsy();
-
- elm.click();
- expect(scope.clicked).toBeTruthy();
- }));
-
- it('should popup with animate class by default', inject(function() {
- elm.trigger('click');
- tooltipScope.$digest();
- expect(tooltipScope.isOpen).toBe(true);
-
- expect(elmBody.children().eq(1)).toHaveClass('fade');
- }));
-
- it('should popup without animate class when animation disabled', inject(function($compile) {
- elmBody = angular.element(
- '<div><span uib-popover-html="template" popover-animation="false">Selector Text</span></div>'
- );
-
- $compile(elmBody)(scope);
- scope.$digest();
- elm = elmBody.find('span');
- elmScope = elm.scope();
- tooltipScope = elmScope.$$childTail;
-
- elm.trigger('click');
- tooltipScope.$digest();
- expect(tooltipScope.isOpen).toBe(true);
- expect(elmBody.children().eq(1)).not.toHaveClass('fade');
- }));
-
- describe('supports options', function() {
- describe('placement', function() {
- it('can specify an alternative, valid placement', inject(function($compile) {
- elmBody = angular.element(
- '<div><span uib-popover-html="template" popover-placement="left">Trigger here</span></div>'
- );
- $compile(elmBody)(scope);
- scope.$digest();
- elm = elmBody.find('span');
- elmScope = elm.scope();
- tooltipScope = elmScope.$$childTail;
-
- elm.trigger('click');
- tooltipScope.$digest();
- expect(tooltipScope.isOpen).toBe(true);
-
- expect(elmBody.children().length).toBe(2);
- var ttipElement = elmBody.find('div.popover');
- expect(ttipElement).toHaveClass('left');
- }));
-
- });
-
- describe('class', function() {
- it('can specify a custom class', inject(function($compile) {
- elmBody = angular.element(
- '<div><span uib-popover-html="template" popover-class="custom">Trigger here</span></div>'
- );
- $compile(elmBody)(scope);
- scope.$digest();
- elm = elmBody.find('span');
- elmScope = elm.scope();
- tooltipScope = elmScope.$$childTail;
-
- elm.trigger('click');
- tooltipScope.$digest();
- expect(tooltipScope.isOpen).toBe(true);
-
- expect(elmBody.children().length).toBe(2);
- var ttipElement = elmBody.find('div.popover');
- expect(ttipElement).toHaveClass('custom');
- }));
- });
- });
-});
-
-/* Deprecation tests below */
-
-describe('popover deprecation', function() {
- beforeEach(module('ui.bootstrap.popover'));
- beforeEach(module('template/popover/popover-html.html'));
-
- var elm, elmBody, elmScope, tooltipScope;
-
- function trigger(element, evt) {
- evt = new Event(evt);
-
- element[0].dispatchEvent(evt);
- element.scope().$$childTail.$digest();
- }
-
- it('should suppress warning', function() {
- module(function($provide) {
- $provide.value('$popoverSuppressWarning', true);
- $provide.value('$tooltipSuppressWarning', true);
- });
-
- inject(function($compile, $log, $rootScope, $sce) {
- spyOn($log, 'warn');
-
- $rootScope.html = 'I say: <strong class="hello">Hello!</strong>';
- $rootScope.safeHtml = $sce.trustAsHtml($rootScope.html);
- elmBody = angular.element('<div><span popover-html="safeHtml">Selector Text</span></div>');
- $compile(elmBody)($rootScope);
- $rootScope.$digest();
- elm = elmBody.find('span');
- elmScope = elm.scope();
- tooltipScope = elmScope.$$childTail;
-
- trigger(elm, 'mouseenter');
- tooltipScope.$digest();
-
- expect($log.warn.calls.count()).toBe(0);
- });
- });
-
- it('should give warning by default', inject(function($compile, $log, $rootScope, $sce) {
- spyOn($log, 'warn');
-
- $rootScope.html = 'I say: <strong class="hello">Hello!</strong>';
- $rootScope.safeHtml = $sce.trustAsHtml($rootScope.html);
- elmBody = angular.element('<div><span popover-html="safeHtml">Selector Text</span></div>');
- $compile(elmBody)($rootScope);
- $rootScope.$digest();
- elm = elmBody.find('span');
- elmScope = elm.scope();
- tooltipScope = elmScope.$$childTail;
-
- elm.trigger('click');
- tooltipScope.$digest();
-
- expect($log.warn.calls.count()).toBe(2);
- expect($log.warn.calls.argsFor(0)).toEqual(['$tooltip is now deprecated. Use $uibTooltip instead.']);
- expect($log.warn.calls.argsFor(1)).toEqual(['popover-html-popup is now deprecated. Use uib-popover-html-popup instead.']);
- }));
-});
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/popover/test/popover-template.spec.js b/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/popover/test/popover-template.spec.js
deleted file mode 100644
index 347f869..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/popover/test/popover-template.spec.js
+++ /dev/null
@@ -1,180 +0,0 @@
-describe('popover template', function() {
- var elm,
- elmBody,
- scope,
- elmScope,
- tooltipScope;
-
- // load the popover code
- beforeEach(module('ui.bootstrap.popover'));
-
- // load the template
- beforeEach(module('template/popover/popover.html'));
- beforeEach(module('template/popover/popover-template.html'));
-
- beforeEach(inject(function($templateCache) {
- $templateCache.put('myUrl', [200, '<span>{{ myTemplateText }}</span>', {}]);
- }));
-
- beforeEach(inject(function($rootScope, $compile) {
- elmBody = angular.element(
- '<div><span uib-popover-template="templateUrl">Selector Text</span></div>'
- );
-
- scope = $rootScope;
- $compile(elmBody)(scope);
- scope.templateUrl = 'myUrl';
-
- scope.$digest();
- elm = elmBody.find('span');
- elmScope = elm.scope();
- tooltipScope = elmScope.$$childTail;
- }));
-
- it('should open on click', inject(function() {
- elm.trigger('click');
- tooltipScope.$digest();
- expect(tooltipScope.isOpen).toBe(true);
-
- expect(elmBody.children().length ).toBe(2);
- }));
-
- it('should not open on click if templateUrl is empty', inject(function() {
- scope.templateUrl = null;
- scope.$digest();
-
- elm.trigger('click');
- tooltipScope.$digest();
- expect(tooltipScope.isOpen).toBe(false);
-
- expect(elmBody.children().length).toBe(1);
- }));
-
- it('should show updated text', inject(function() {
- scope.myTemplateText = 'some text';
-
- elm.trigger('click');
- tooltipScope.$digest();
- expect(tooltipScope.isOpen).toBe(true);
-
- scope.$digest();
- expect(elmBody.children().eq(1).text().trim()).toBe('some text');
-
- scope.myTemplateText = 'new text';
- scope.$digest();
-
- expect(elmBody.children().eq(1).text().trim()).toBe('new text');
- }));
-
- it('should hide popover when template becomes empty', inject(function($timeout) {
- elm.trigger('click');
- tooltipScope.$digest();
- expect(tooltipScope.isOpen).toBe(true);
-
- scope.templateUrl = '';
- scope.$digest();
-
- expect(tooltipScope.isOpen).toBe(false);
-
- $timeout.flush();
- expect(elmBody.children().length).toBe(1);
- }));
-
- describe('supports options', function() {
- describe('placement', function() {
- it('can specify an alternative, valid placement', inject(function($compile) {
- elmBody = angular.element(
- '<div><span uib-popover-template="templateUrl" popover-placement="left">Trigger</span></div>'
- );
- $compile(elmBody)(scope);
- scope.$digest();
- elm = elmBody.find('span');
- elmScope = elm.scope();
- tooltipScope = elmScope.$$childTail;
-
- elm.trigger('click');
- tooltipScope.$digest();
- expect(tooltipScope.isOpen).toBe(true);
-
- expect(elmBody.children().length).toBe(2);
- var ttipElement = elmBody.find('div.popover');
- expect(ttipElement).toHaveClass('left');
- }));
-
- });
-
- describe('class', function() {
- it('can specify a custom class', inject(function($compile) {
- elmBody = angular.element(
- '<div><span uib-popover-template="templateUrl" popover-class="custom">Trigger</span></div>'
- );
- $compile(elmBody)(scope);
- scope.$digest();
- elm = elmBody.find('span');
- elmScope = elm.scope();
- tooltipScope = elmScope.$$childTail;
-
- elm.trigger('click');
- tooltipScope.$digest();
- expect(tooltipScope.isOpen).toBe(true);
-
- expect(elmBody.children().length).toBe(2);
- var ttipElement = elmBody.find('div.popover');
- expect(ttipElement).toHaveClass('custom');
- }));
- });
- });
-});
-
-/* Deprecation tests below */
-
-describe('popover template deprecation', function() {
- beforeEach(module('ui.bootstrap.popover'));
- beforeEach(module('template/popover/popover.html'));
- beforeEach(module('template/popover/popover-template.html'));
-
- var elm, elmBody, elmScope, tooltipScope;
-
- it('should suppress warning', function() {
- module(function($provide) {
- $provide.value('$popoverSuppressWarning', true);
- $provide.value('$tooltipSuppressWarning', true);
- });
-
- inject(function($compile, $log, $rootScope, $templateCache) {
- spyOn($log, 'warn');
- $templateCache.put('myUrl', [200, '<span>{{ myTemplateText }}</span>', {}]);
- $rootScope.templateUrl = 'myUrl';
-
- elmBody = angular.element('<div><span popover-template="templateUrl">Selector Text</span></div>');
- $compile(elmBody)($rootScope);
- $rootScope.$digest();
- elm = elmBody.find('span');
- elmScope = elm.scope();
- tooltipScope = elmScope.$$childTail;
-
- elm.trigger('click');
- tooltipScope.$digest();
- expect($log.warn.calls.count()).toBe(0);
- });
- });
-
- it('should give warning by default', inject(function($compile, $log, $rootScope, $templateCache) {
- spyOn($log, 'warn');
- $templateCache.put('myUrl', [200, '<span>{{ myTemplateText }}</span>', {}]);
- $rootScope.templateUrl = 'myUrl';
-
- elmBody = angular.element('<div><span popover-template="templateUrl">Selector Text</span></div>');
- $compile(elmBody)($rootScope);
- elm = elmBody.find('span');
- elmScope = elm.scope();
- tooltipScope = elmScope.$$childTail;
-
- elm.trigger('click');
- tooltipScope.$digest();
-
- expect($log.warn.calls.count()).toBe(2);
- expect($log.warn.calls.argsFor(0)).toEqual(['$tooltip is now deprecated. Use $uibTooltip instead.']);
- expect($log.warn.calls.argsFor(1)).toEqual(['popover-template-popup is now deprecated. Use uib-popover-template-popup instead.']);
- }));
-});
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/popover/test/popover.spec.js b/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/popover/test/popover.spec.js
deleted file mode 100644
index 4ba0677..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/popover/test/popover.spec.js
+++ /dev/null
@@ -1,226 +0,0 @@
-describe('popover', function() {
- var elm,
- elmBody,
- scope,
- elmScope,
- tooltipScope;
-
- // load the popover code
- beforeEach(module('ui.bootstrap.popover'));
-
- // load the template
- beforeEach(module('template/popover/popover.html'));
-
- beforeEach(inject(function($rootScope, $compile) {
- elmBody = angular.element(
- '<div><span uib-popover="popover text">Selector Text</span></div>'
- );
-
- scope = $rootScope;
- $compile(elmBody)(scope);
- scope.$digest();
- elm = elmBody.find('span');
- elmScope = elm.scope();
- tooltipScope = elmScope.$$childTail;
- }));
-
- it('should not be open initially', inject(function() {
- expect(tooltipScope.isOpen).toBe(false);
-
- // We can only test *that* the popover-popup element wasn't created as the
- // implementation is templated and replaced.
- expect(elmBody.children().length).toBe(1);
- }));
-
- it('should open on click', inject(function() {
- elm.trigger('click');
- tooltipScope.$digest();
- expect(tooltipScope.isOpen).toBe(true);
-
- // We can only test *that* the popover-popup element was created as the
- // implementation is templated and replaced.
- expect(elmBody.children().length).toBe(2);
- }));
-
- it('should close on second click', inject(function() {
- elm.trigger('click');
- tooltipScope.$digest();
- expect(tooltipScope.isOpen).toBe(true);
- elm.trigger('click');
- tooltipScope.$digest();
- expect(tooltipScope.isOpen).toBe(false);
- }));
-
- it('should not unbind event handlers created by other directives - issue 456', inject(function($compile) {
- scope.click = function() {
- scope.clicked = !scope.clicked;
- };
-
- elmBody = angular.element(
- '<div><input uib-popover="Hello!" ng-click="click()" popover-trigger="mouseenter"/></div>'
- );
- $compile(elmBody)(scope);
- scope.$digest();
-
- elm = elmBody.find('input');
-
- elm.trigger('mouseenter');
- elm.trigger('mouseleave');
- expect(scope.clicked).toBeFalsy();
-
- elm.click();
- expect(scope.clicked).toBeTruthy();
- }));
-
- it('should popup with animate class by default', inject(function() {
- elm.trigger('click');
- tooltipScope.$digest();
- expect(tooltipScope.isOpen).toBe(true);
-
- expect(elmBody.children().eq(1)).toHaveClass('fade');
- }));
-
- it('should popup without animate class when animation disabled', inject(function($compile) {
- elmBody = angular.element(
- '<div><span uib-popover="popover text" popover-animation="false">Selector Text</span></div>'
- );
-
- $compile(elmBody)(scope);
- scope.$digest();
- elm = elmBody.find('span');
- elmScope = elm.scope();
- tooltipScope = elmScope.$$childTail;
-
- elm.trigger('click');
- tooltipScope.$digest();
- expect(tooltipScope.isOpen).toBe(true);
- expect(elmBody.children().eq(1)).not.toHaveClass('fade');
- }));
-
- describe('supports options', function() {
- describe('placement', function() {
- it('can specify an alternative, valid placement', inject(function($compile) {
- elmBody = angular.element(
- '<div><span uib-popover="popover text" popover-placement="left">Trigger here</span></div>'
- );
- $compile(elmBody)(scope);
- scope.$digest();
- elm = elmBody.find('span');
- elmScope = elm.scope();
- tooltipScope = elmScope.$$childTail;
-
- elm.trigger('click');
- tooltipScope.$digest();
- expect(tooltipScope.isOpen).toBe(true);
-
- expect(elmBody.children().length).toBe(2);
- var ttipElement = elmBody.find('div.popover');
- expect(ttipElement).toHaveClass('left');
- }));
- });
-
- describe('class', function() {
- it('can specify a custom class', inject(function($compile) {
- elmBody = angular.element(
- '<div><span uib-popover="popover text" popover-class="custom">Trigger here</span></div>'
- );
- $compile(elmBody)(scope);
- scope.$digest();
- elm = elmBody.find('span');
- elmScope = elm.scope();
- tooltipScope = elmScope.$$childTail;
-
- elm.trigger('click');
- tooltipScope.$digest();
- expect(tooltipScope.isOpen).toBe(true);
-
- expect(elmBody.children().length).toBe(2);
- var ttipElement = elmBody.find('div.popover');
- expect(ttipElement).toHaveClass('custom');
- }));
- });
-
- describe('is-open', function() {
- beforeEach(inject(function ($compile) {
- scope.isOpen = false;
- elmBody = angular.element(
- '<div><span uib-popover="popover text" popover-placement="left" popover-is-open="isOpen">Trigger here</span></div>'
- );
- $compile(elmBody)(scope);
- scope.$digest();
- elm = elmBody.find('span');
- elmScope = elm.scope();
- tooltipScope = elmScope.$$childTail;
- }));
-
- it('should show and hide with the controller value', function() {
- expect(tooltipScope.isOpen).toBe(false);
- elmScope.isOpen = true;
- elmScope.$digest();
- expect(tooltipScope.isOpen).toBe(true);
- elmScope.isOpen = false;
- elmScope.$digest();
- expect(tooltipScope.isOpen).toBe(false);
- });
-
- it('should update the controller value', function() {
- elm.trigger('click');
- tooltipScope.$digest();
- expect(elmScope.isOpen).toBe(true);
- elm.trigger('click');
- tooltipScope.$digest();
- expect(elmScope.isOpen).toBe(false);
- });
- });
- });
-});
-
-/* Deprecation tests below */
-
-describe('popover deprecation', function() {
- beforeEach(module('ui.bootstrap.popover'));
- beforeEach(module('template/popover/popover.html'));
-
- var elm, elmBody, elmScope, tooltipScope;
-
- it('should suppress warning', function() {
- module(function($provide) {
- $provide.value('$popoverSuppressWarning', true);
- $provide.value('$tooltipSuppressWarning', true);
- });
-
- inject(function($compile, $log, $rootScope) {
- spyOn($log, 'warn');
-
- elmBody = angular.element('<div><span popover="popover text">Selector Text</span></div>');
- $compile(elmBody)($rootScope);
- $rootScope.$digest();
- elm = elmBody.find('span');
- elmScope = elm.scope();
- tooltipScope = elmScope.$$childTail;
-
- elm.trigger('click');
- tooltipScope.$digest();
-
- expect($log.warn.calls.count()).toBe(0);
- });
- });
-
- it('should give warning by default', inject(function($compile, $log, $rootScope) {
- spyOn($log, 'warn');
-
- elmBody = angular.element('<div><span popover="popover text">Selector Text</span></div>');
- $compile(elmBody)($rootScope);
- $rootScope.$digest();
- elm = elmBody.find('span');
- elmScope = elm.scope();
- tooltipScope = elmScope.$$childTail;
-
- elm.trigger('click');
- tooltipScope.$digest();
-
- expect($log.warn.calls.count()).toBe(2);
- expect($log.warn.calls.argsFor(0)).toEqual(['$tooltip is now deprecated. Use $uibTooltip instead.']);
- expect($log.warn.calls.argsFor(1)).toEqual(['popover-popup is now deprecated. Use uib-popover-popup instead.']);
- }));
-});
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/position/position.js b/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/position/position.js
deleted file mode 100644
index 0502053..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/position/position.js
+++ /dev/null
@@ -1,164 +0,0 @@
-angular.module('ui.bootstrap.position', [])
-
-/**
- * A set of utility methods that can be use to retrieve position of DOM elements.
- * It is meant to be used where we need to absolute-position DOM elements in
- * relation to other, existing elements (this is the case for tooltips, popovers,
- * typeahead suggestions etc.).
- */
- .factory('$uibPosition', ['$document', '$window', function($document, $window) {
- function getStyle(el, cssprop) {
- if (el.currentStyle) { //IE
- return el.currentStyle[cssprop];
- } else if ($window.getComputedStyle) {
- return $window.getComputedStyle(el)[cssprop];
- }
- // finally try and get inline style
- return el.style[cssprop];
- }
-
- /**
- * Checks if a given element is statically positioned
- * @param element - raw DOM element
- */
- function isStaticPositioned(element) {
- return (getStyle(element, 'position') || 'static' ) === 'static';
- }
-
- /**
- * returns the closest, non-statically positioned parentOffset of a given element
- * @param element
- */
- var parentOffsetEl = function(element) {
- var docDomEl = $document[0];
- var offsetParent = element.offsetParent || docDomEl;
- while (offsetParent && offsetParent !== docDomEl && isStaticPositioned(offsetParent) ) {
- offsetParent = offsetParent.offsetParent;
- }
- return offsetParent || docDomEl;
- };
-
- return {
- /**
- * Provides read-only equivalent of jQuery's position function:
- * http://api.jquery.com/position/
- */
- position: function(element) {
- var elBCR = this.offset(element);
- var offsetParentBCR = { top: 0, left: 0 };
- var offsetParentEl = parentOffsetEl(element[0]);
- if (offsetParentEl != $document[0]) {
- offsetParentBCR = this.offset(angular.element(offsetParentEl));
- offsetParentBCR.top += offsetParentEl.clientTop - offsetParentEl.scrollTop;
- offsetParentBCR.left += offsetParentEl.clientLeft - offsetParentEl.scrollLeft;
- }
-
- var boundingClientRect = element[0].getBoundingClientRect();
- return {
- width: boundingClientRect.width || element.prop('offsetWidth'),
- height: boundingClientRect.height || element.prop('offsetHeight'),
- top: elBCR.top - offsetParentBCR.top,
- left: elBCR.left - offsetParentBCR.left
- };
- },
-
- /**
- * Provides read-only equivalent of jQuery's offset function:
- * http://api.jquery.com/offset/
- */
- offset: function(element) {
- var boundingClientRect = element[0].getBoundingClientRect();
- return {
- width: boundingClientRect.width || element.prop('offsetWidth'),
- height: boundingClientRect.height || element.prop('offsetHeight'),
- top: boundingClientRect.top + ($window.pageYOffset || $document[0].documentElement.scrollTop),
- left: boundingClientRect.left + ($window.pageXOffset || $document[0].documentElement.scrollLeft)
- };
- },
-
- /**
- * Provides coordinates for the targetEl in relation to hostEl
- */
- positionElements: function(hostEl, targetEl, positionStr, appendToBody) {
- var positionStrParts = positionStr.split('-');
- var pos0 = positionStrParts[0], pos1 = positionStrParts[1] || 'center';
-
- var hostElPos,
- targetElWidth,
- targetElHeight,
- targetElPos;
-
- hostElPos = appendToBody ? this.offset(hostEl) : this.position(hostEl);
-
- targetElWidth = targetEl.prop('offsetWidth');
- targetElHeight = targetEl.prop('offsetHeight');
-
- var shiftWidth = {
- center: function() {
- return hostElPos.left + hostElPos.width / 2 - targetElWidth / 2;
- },
- left: function() {
- return hostElPos.left;
- },
- right: function() {
- return hostElPos.left + hostElPos.width;
- }
- };
-
- var shiftHeight = {
- center: function() {
- return hostElPos.top + hostElPos.height / 2 - targetElHeight / 2;
- },
- top: function() {
- return hostElPos.top;
- },
- bottom: function() {
- return hostElPos.top + hostElPos.height;
- }
- };
-
- switch (pos0) {
- case 'right':
- targetElPos = {
- top: shiftHeight[pos1](),
- left: shiftWidth[pos0]()
- };
- break;
- case 'left':
- targetElPos = {
- top: shiftHeight[pos1](),
- left: hostElPos.left - targetElWidth
- };
- break;
- case 'bottom':
- targetElPos = {
- top: shiftHeight[pos0](),
- left: shiftWidth[pos1]()
- };
- break;
- default:
- targetElPos = {
- top: hostElPos.top - targetElHeight,
- left: shiftWidth[pos1]()
- };
- break;
- }
-
- return targetElPos;
- }
- };
- }]);
-
-/* Deprecated position below */
-
-angular.module('ui.bootstrap.position')
-
-.value('$positionSuppressWarning', false)
-
-.service('$position', ['$log', '$positionSuppressWarning', '$uibPosition', function($log, $positionSuppressWarning, $uibPosition) {
- if (!$positionSuppressWarning) {
- $log.warn('$position is now deprecated. Use $uibPosition instead.');
- }
-
- angular.extend(this, $uibPosition);
-}]);
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/position/test/position.spec.js b/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/position/test/position.spec.js
deleted file mode 100644
index 9b0f5a0..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/position/test/position.spec.js
+++ /dev/null
@@ -1,164 +0,0 @@
-describe('position elements', function () {
- var TargetElMock = function(width, height) {
- this.width = width;
- this.height = height;
-
- this.prop = function(propName) {
- return propName === 'offsetWidth' ? width : height;
- };
- };
-
- var $position;
-
- beforeEach(module('ui.bootstrap.position'));
- beforeEach(inject(function($uibPosition) {
- $position = $uibPosition;
- }));
- beforeEach(function () {
- jasmine.addMatchers({
- toBePositionedAt: function(util, customEqualityTesters) {
- return {
- compare: function(actual, top, left) {
- var result = {
- pass: util.equals(actual.top, top, customEqualityTesters) &&
- util.equals(actual.left, left, customEqualityTesters)
- };
-
- if (result.pass) {
- result.message = 'Expected "(' + actual.top + ', ' + actual.left + ')" not to be positioned at (' + top + ', ' + left + ')';
- } else {
- result.message = 'Expected "(' + actual.top + ', ' + actual.left + ')" to be positioned at (' + top + ', ' + left + ')';
- }
-
- return result;
- }
- };
- }
- });
- });
-
- describe('append-to-body: false', function() {
- beforeEach(function() {
- //mock position info normally queried from the DOM
- $position.position = function() {
- return {
- width: 20,
- height: 20,
- top: 100,
- left: 100
- };
- };
- });
-
- it('should position element on top-center by default', function() {
- expect($position.positionElements({}, new TargetElMock(10, 10), 'other')).toBePositionedAt(90, 105);
- expect($position.positionElements({}, new TargetElMock(10, 10), 'top')).toBePositionedAt(90, 105);
- expect($position.positionElements({}, new TargetElMock(10, 10), 'top-center')).toBePositionedAt(90, 105);
- });
-
- it('should position on top-left', function() {
- expect($position.positionElements({}, new TargetElMock(10, 10), 'top-left')).toBePositionedAt(90, 100);
- });
-
- it('should position on top-right', function() {
- expect($position.positionElements({}, new TargetElMock(10, 10), 'top-right')).toBePositionedAt(90, 120);
- });
-
- it('should position elements on bottom-center when "bottom" specified', function() {
- expect($position.positionElements({}, new TargetElMock(10, 10), 'bottom')).toBePositionedAt(120, 105);
- expect($position.positionElements({}, new TargetElMock(10, 10), 'bottom-center')).toBePositionedAt(120, 105);
- });
-
- it('should position elements on bottom-left', function() {
- expect($position.positionElements({}, new TargetElMock(10, 10), 'bottom-left')).toBePositionedAt(120, 100);
- });
-
- it('should position elements on bottom-right', function() {
- expect($position.positionElements({}, new TargetElMock(10, 10), 'bottom-right')).toBePositionedAt(120, 120);
- });
-
- it('should position elements on left-center when "left" specified', function() {
- expect($position.positionElements({}, new TargetElMock(10, 10), 'left')).toBePositionedAt(105, 90);
- expect($position.positionElements({}, new TargetElMock(10, 10), 'left-center')).toBePositionedAt(105, 90);
- });
-
- it('should position elements on left-top when "left-top" specified', function() {
- expect($position.positionElements({}, new TargetElMock(10, 10), 'left-top')).toBePositionedAt(100, 90);
- });
-
- it('should position elements on left-bottom when "left-bottom" specified', function() {
- expect($position.positionElements({}, new TargetElMock(10, 10), 'left-bottom')).toBePositionedAt(120, 90);
- });
-
- it('should position elements on right-center when "right" specified', function() {
- expect($position.positionElements({}, new TargetElMock(10, 10), 'right')).toBePositionedAt(105, 120);
- expect($position.positionElements({}, new TargetElMock(10, 10), 'right-center')).toBePositionedAt(105, 120);
- });
-
- it('should position elements on right-top when "right-top" specified', function() {
- expect($position.positionElements({}, new TargetElMock(10, 10), 'right-top')).toBePositionedAt(100, 120);
- });
-
- it('should position elements on right-top when "right-top" specified', function() {
- expect($position.positionElements({}, new TargetElMock(10, 10), 'right-bottom')).toBePositionedAt(120, 120);
- });
- });
-});
-
-/* Deprecation tests below */
-
-describe('position deprecation', function() {
- var TargetElMock = function(width, height) {
- this.width = width;
- this.height = height;
-
- this.prop = function(propName) {
- return propName === 'offsetWidth' ? width : height;
- };
- };
- beforeEach(module('ui.bootstrap.position'));
-
- it('should suppress warning', function() {
- module(function($provide) {
- $provide.value('$positionSuppressWarning', true);
- });
-
- inject(function($log, $position) {
- spyOn($log, 'warn');
- //mock position info normally queried from the DOM
- $position.position = function() {
- return {
- width: 20,
- height: 20,
- top: 100,
- left: 100
- };
- };
-
- $position.positionElements({}, new TargetElMock(10, 10), 'other');
-
- expect($log.warn.calls.count()).toBe(0);
- });
- });
-
- it('should give warning by default', inject(function($log) {
- spyOn($log, 'warn');
-
- inject(function($position) {
- //mock position info normally queried from the DOM
- $position.position = function() {
- return {
- width: 20,
- height: 20,
- top: 100,
- left: 100
- };
- };
-
- $position.positionElements({}, new TargetElMock(10, 10), 'other');
-
- expect($log.warn.calls.count()).toBe(1);
- expect($log.warn.calls.argsFor(0)).toEqual(['$position is now deprecated. Use $uibPosition instead.']);
- });
- }));
-});
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/position/test/test.html b/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/position/test/test.html
deleted file mode 100644
index 3ce65b8..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/position/test/test.html
+++ /dev/null
@@ -1,144 +0,0 @@
-<!DOCTYPE html>
-<html lang="en" ng-app="position">
-<head>
- <meta charset="utf-8">
- <script src="../../../node_modules/angular/angular.js"></script>
- <script src="../position.js"></script>
- <style type="text/css">
- .container {
- border: 1px solid red;
- }
-
- .container-relative {
- border: 1px solid red;
- position: relative;
- }
-
- .content {
- border: 5px solid #808080;
- background-color: dodgerblue;
- width: 200px;
- }
-
- .positioned {
- border: 5px solid #808080;
- background-color: green;
- position: absolute;
- }
- </style>
- <script type="text/javascript">
- angular.module('position', ['ui.bootstrap.position']).directive('position', function ($compile, $position) {
- return {
- link: function (scope, element, attrs) {
-
- var positionedEl = angular.element('<div class="positioned">Positioned</div>');
- var elPosition = $position.position(element);
- elPosition.left += elPosition.width;
-
- positionedEl.css({left: elPosition.left + 'px', top: elPosition.top + 'px'});
-
- if (attrs['position'] === 'body') {
- angular.element(document.getElementsByTagName('body')[0]).after($compile(positionedEl)(scope));
- } else {
- element.after($compile(positionedEl)(scope));
- }
- }
- };
- });
- </script>
-</head>
-<body class="container">
-<h3>Within body</h3>
-
-<div class="content" position>Content</div>
-
-<h3>Within statically positioned DIV</h3>
-
-<div class="container">
- <div class="content" position>Content</div>
-</div>
-
-<h3>Within relative-positioned DIV - position specified in CSS</h3>
-
-<div class="container-relative">
- <div class="content" position>Content</div>
-</div>
-
-<h3>Within relative-positioned DIV</h3>
-
-<div style="position: relative; left: 200px" class="container">
- <div class="content" position>Content</div>
-</div>
-
-<h3>Within absolute-positioned DIV</h3>
-
-<div style="position: absolute; left: 400px; top: 400px" class="container">
- <div class="content" position>Content - absolute</div>
-</div>
-
-<h3>Within overflowing absolute-positioned DIV</h3>
-<div class="container" style="height: 50px; overflow: scroll;overflow-x: hidden; position: absolute;">
- Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur non velit nulla. Suspendisse sit amet tempus diam. Sed at ultricies neque. Suspendisse id felis a sem placerat ornare. Donec auctor, purus at molestie tempor, arcu enim molestie lacus, ac imperdiet massa urna eu massa. Praesent velit tellus, scelerisque a fermentum ut, ornare in diam. Phasellus egestas molestie feugiat. Vivamus sit amet viverra metus.
- <div class="content" position>Content absolute overflow</div>
-</div>
-
-<br>
-<br>
-<br>
-
-<h3>Next to a float element</h3>
-
-<div class="container">
- <div class="content" style="float: right" position>Content</div>
-</div>
-
-<h3>Within a table</h3>
-<table class="container">
- <tr>
- <td>Some other content</td>
- <td>
- <div class="content" position>Content</div>
- </td>
- </tr>
-</table>
-
-<h3>Within a table that is inside a relative-positioned DIV</h3>
-
-<div style="position: relative; left: 200px" class="container">
- <table class="container">
- <tr>
- <td>Some other content</td>
- <td>
- <div class="content" position>Content</div>
- </td>
- </tr>
- </table>
-</div>
-
-<h3>Inside svg</h3>
-
-<svg height="300px" width="300px">
- <rect x="0" y="0" height="300" width="300" fill="aliceblue"></rect>
- <rect x="50" y="50" height="200" width="200" position="body" fill="white" stroke="red">
- </rect>
-</svg>
-
-
-<h3>Inside looong text</h3>
-<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur non velit nulla. Suspendisse sit amet tempus diam. Sed at ultricies neque. Suspendisse id felis a sem placerat ornare. Donec auctor, purus at molestie tempor, arcu enim molestie lacus, ac imperdiet massa urna eu massa. Praesent velit tellus, scelerisque a fermentum ut, ornare in diam. Phasellus egestas molestie feugiat. Vivamus sit amet viverra metus.</p>
-<p>Etiam ultricies odio commodo erat ullamcorper sodales. Nullam ac dui ac libero dictum mollis. Quisque convallis adipiscing facilisis. In nec nisi velit, id auctor lectus. Cras interdum urna non felis lacinia vulputate. Integer dignissim, mi aliquam gravida auctor, massa odio cursus lorem, eu ultrices eros nisl tempus diam. Maecenas tristique pellentesque nisi sed adipiscing. Aenean hendrerit sapien quis arcu lobortis vitae pulvinar ante volutpat. Morbi consectetur erat eu lacus facilisis eu ullamcorper orci euismod. Quisque diam dui, interdum in suscipit et, fringilla non justo. Pellentesque non nibh odio. Proin sit amet massa sem.</p>
-<p>Nam in urna erat, at congue nisi. Donec eu tellus lorem, sed facilisis tellus. Aliquam suscipit faucibus ipsum, at hendrerit metus interdum at. Integer et eros ac lacus vulputate sagittis quis quis erat. Suspendisse consectetur vehicula purus vitae imperdiet. Suspendisse in augue magna, quis imperdiet enim. Nullam non diam ac erat auctor bibendum. Praesent ante mauris, egestas sit amet molestie sed, tristique at lorem. Nam at mi ac nisl venenatis semper nec eget mi. Pellentesque a lectus ac leo feugiat suscipit. Quisque tristique dui nec urna placerat a viverra mi iaculis. Ut et tellus et turpis sagittis iaculis nec eu magna. Sed quis nunc non arcu tincidunt ultricies viverra id mauris.</p>
-<p>Curabitur luctus rutrum ultricies. Aenean ut rutrum orci. Sed molestie lorem in leo cursus id feugiat nisi scelerisque. Maecenas pulvinar neque nec lacus feugiat dictum. Donec viverra felis nec nisi mollis feugiat. Phasellus vehicula, ligula at mattis porttitor, sapien urna hendrerit quam, at fringilla nisl quam vel elit. In eu lacus ligula. Praesent eget gravida nisl. Suspendisse velit diam, pellentesque a tempus quis, vestibulum vel leo.</p>
-<p>Maecenas feugiat ultrices laoreet. Sed congue posuere diam ac faucibus. Pellentesque eget leo ligula. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Sed nec quam eu tellus sagittis cursus a sit amet eros. Mauris sit amet orci at orci vulputate commodo ut ut nunc. Etiam sagittis erat ut nisi ultricies feugiat. Morbi sed eros nisi. Cras vitae augue in risus aliquet commodo non id est.</p>
-<div class="content" position>HERE</div>
-<p>Maecenas laoreet nisi pretium elit bibendum eget tempor nunc aliquet. Vivamus interdum nisi sit amet tortor fermentum congue. Suspendisse at posuere erat. Aliquam hendrerit ultricies nunc non adipiscing. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Duis molestie viverra nulla a aliquet. Nullam non eros vel sem vehicula suscipit. Ut sit amet arcu ac tortor dignissim viverra in a ligula.</p>
-
-
-<div style="position: fixed; bottom: 0" class="container">
- <h3>Within fixed div</h3>
- <div class="content" position>Content</div>
-</div>
-
-
-</body>
-</html>
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/progressbar/docs/demo.html b/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/progressbar/docs/demo.html
deleted file mode 100644
index 3073be7..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/progressbar/docs/demo.html
+++ /dev/null
@@ -1,24 +0,0 @@
-<div ng-controller="ProgressDemoCtrl">
-
- <h3>Static</h3>
- <div class="row">
- <div class="col-sm-4"><uib-progressbar value="55"></uib-progressbar></div>
- <div class="col-sm-4"><uib-progressbar class="progress-striped" value="22" type="warning">22%</uib-progressbar></div>
- <div class="col-sm-4"><uib-progressbar class="progress-striped active" max="200" value="166" type="danger"><i>166 / 200</i></uib-progressbar></div>
- </div>
-
- <hr />
- <h3>Dynamic <button type="button" class="btn btn-sm btn-primary" ng-click="random()">Randomize</button></h3>
- <uib-progressbar max="max" value="dynamic"><span style="color:white; white-space:nowrap;">{{dynamic}} / {{max}}</span></uib-progressbar>
-
- <small><em>No animation</em></small>
- <uib-progressbar animate="false" value="dynamic" type="success"><b>{{dynamic}}%</b></uib-progressbar>
-
- <small><em>Object (changes type based on value)</em></small>
- <uib-progressbar class="progress-striped active" value="dynamic" type="{{type}}">{{type}} <i ng-show="showWarning">!!! Watch out !!!</i></uib-progressbar>
-
- <hr />
- <h3>Stacked <button type="button" class="btn btn-sm btn-primary" ng-click="randomStacked()">Randomize</button></h3>
- <uib-progress><uib-bar ng-repeat="bar in stacked track by $index" value="bar.value" type="{{bar.type}}"><span ng-hide="bar.value < 5">{{bar.value}}%</span></uib-bar></uib-progress>
-
-</div>
\ No newline at end of file
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/progressbar/docs/demo.js b/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/progressbar/docs/demo.js
deleted file mode 100644
index c06561c..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/progressbar/docs/demo.js
+++ /dev/null
@@ -1,38 +0,0 @@
-angular.module('ui.bootstrap.demo').controller('ProgressDemoCtrl', function ($scope) {
- $scope.max = 200;
-
- $scope.random = function() {
- var value = Math.floor((Math.random() * 100) + 1);
- var type;
-
- if (value < 25) {
- type = 'success';
- } else if (value < 50) {
- type = 'info';
- } else if (value < 75) {
- type = 'warning';
- } else {
- type = 'danger';
- }
-
- $scope.showWarning = (type === 'danger' || type === 'warning');
-
- $scope.dynamic = value;
- $scope.type = type;
- };
- $scope.random();
-
- $scope.randomStacked = function() {
- $scope.stacked = [];
- var types = ['success', 'info', 'warning', 'danger'];
-
- for (var i = 0, n = Math.floor((Math.random() * 4) + 1); i < n; i++) {
- var index = Math.floor((Math.random() * 4));
- $scope.stacked.push({
- value: Math.floor((Math.random() * 30) + 1),
- type: types[index]
- });
- }
- };
- $scope.randomStacked();
-});
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/progressbar/docs/readme.md b/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/progressbar/docs/readme.md
deleted file mode 100644
index 45a4fe5..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/progressbar/docs/readme.md
+++ /dev/null
@@ -1,32 +0,0 @@
-A progress bar directive that is focused on providing feedback on the progress of a workflow or action.
-
-It supports multiple (stacked) bars into the same `<uib-progress>` element or a single `<progressbar>` element with optional `max` attribute and transition animations.
-
-### Settings ###
-
-#### `<uib-progressbar>` ####
-
- * `value` <i class="glyphicon glyphicon-eye-open"></i>
- :
- The current value of progress completed.
-
- * `type`
- _(Default: null)_ :
- Style type. Possible values are 'success', 'warning' etc.
-
- * `max`
- _(Default: 100)_ :
- A number that specifies the total value of bars that is required.
-
- * `animate`
- _(Default: true)_ :
- Whether bars use transitions to achieve the width change.
-
- * `title`
- _(Default: progressbar)_ :
- Title to use as label (for accessibility)
-
-### Stacked ###
-
-Place multiple `<uib-bar>`s into the same `<uib-progress>` element to stack them.
-`<uib-progress>` supports `max`, `animate`, and `title` & `<uib-bar>` supports `value`, `title`, and `type` attributes.
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/progressbar/progressbar.js b/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/progressbar/progressbar.js
deleted file mode 100644
index 366aadb..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/progressbar/progressbar.js
+++ /dev/null
@@ -1,224 +0,0 @@
-angular.module('ui.bootstrap.progressbar', [])
-
-.constant('uibProgressConfig', {
- animate: true,
- max: 100
-})
-
-.controller('UibProgressController', ['$scope', '$attrs', 'uibProgressConfig', function($scope, $attrs, progressConfig) {
- var self = this,
- animate = angular.isDefined($attrs.animate) ? $scope.$parent.$eval($attrs.animate) : progressConfig.animate;
-
- this.bars = [];
- $scope.max = angular.isDefined($scope.max) ? $scope.max : progressConfig.max;
-
- this.addBar = function(bar, element, attrs) {
- if (!animate) {
- element.css({'transition': 'none'});
- }
-
- this.bars.push(bar);
-
- bar.max = $scope.max;
- bar.title = attrs && angular.isDefined(attrs.title) ? attrs.title : 'progressbar';
-
- bar.$watch('value', function(value) {
- bar.recalculatePercentage();
- });
-
- bar.recalculatePercentage = function() {
- var totalPercentage = self.bars.reduce(function(total, bar) {
- bar.percent = +(100 * bar.value / bar.max).toFixed(2);
- return total + bar.percent;
- }, 0);
-
- if (totalPercentage > 100) {
- bar.percent -= totalPercentage - 100;
- }
- };
-
- bar.$on('$destroy', function() {
- element = null;
- self.removeBar(bar);
- });
- };
-
- this.removeBar = function(bar) {
- this.bars.splice(this.bars.indexOf(bar), 1);
- this.bars.forEach(function (bar) {
- bar.recalculatePercentage();
- });
- };
-
- $scope.$watch('max', function(max) {
- self.bars.forEach(function(bar) {
- bar.max = $scope.max;
- bar.recalculatePercentage();
- });
- });
-}])
-
-.directive('uibProgress', function() {
- return {
- replace: true,
- transclude: true,
- controller: 'UibProgressController',
- require: 'uibProgress',
- scope: {
- max: '=?'
- },
- templateUrl: 'template/progressbar/progress.html'
- };
-})
-
-.directive('uibBar', function() {
- return {
- replace: true,
- transclude: true,
- require: '^uibProgress',
- scope: {
- value: '=',
- type: '@'
- },
- templateUrl: 'template/progressbar/bar.html',
- link: function(scope, element, attrs, progressCtrl) {
- progressCtrl.addBar(scope, element, attrs);
- }
- };
-})
-
-.directive('uibProgressbar', function() {
- return {
- replace: true,
- transclude: true,
- controller: 'UibProgressController',
- scope: {
- value: '=',
- max: '=?',
- type: '@'
- },
- templateUrl: 'template/progressbar/progressbar.html',
- link: function(scope, element, attrs, progressCtrl) {
- progressCtrl.addBar(scope, angular.element(element.children()[0]), {title: attrs.title});
- }
- };
-});
-
-/* Deprecated progressbar below */
-
-angular.module('ui.bootstrap.progressbar')
-
-.value('$progressSuppressWarning', false)
-
-.controller('ProgressController', ['$scope', '$attrs', 'uibProgressConfig', '$log', '$progressSuppressWarning', function($scope, $attrs, progressConfig, $log, $progressSuppressWarning) {
- if (!$progressSuppressWarning) {
- $log.warn('ProgressController is now deprecated. Use UibProgressController instead.');
- }
-
- var self = this,
- animate = angular.isDefined($attrs.animate) ? $scope.$parent.$eval($attrs.animate) : progressConfig.animate;
-
- this.bars = [];
- $scope.max = angular.isDefined($scope.max) ? $scope.max : progressConfig.max;
-
- this.addBar = function(bar, element, attrs) {
- if (!animate) {
- element.css({'transition': 'none'});
- }
-
- this.bars.push(bar);
-
- bar.max = $scope.max;
- bar.title = attrs && angular.isDefined(attrs.title) ? attrs.title : 'progressbar';
-
- bar.$watch('value', function(value) {
- bar.recalculatePercentage();
- });
-
- bar.recalculatePercentage = function() {
- bar.percent = +(100 * bar.value / bar.max).toFixed(2);
-
- var totalPercentage = self.bars.reduce(function(total, bar) {
- return total + bar.percent;
- }, 0);
-
- if (totalPercentage > 100) {
- bar.percent -= totalPercentage - 100;
- }
- };
-
- bar.$on('$destroy', function() {
- element = null;
- self.removeBar(bar);
- });
- };
-
- this.removeBar = function(bar) {
- this.bars.splice(this.bars.indexOf(bar), 1);
- };
-
- $scope.$watch('max', function(max) {
- self.bars.forEach(function(bar) {
- bar.max = $scope.max;
- bar.recalculatePercentage();
- });
- });
-}])
-
-.directive('progress', ['$log', '$progressSuppressWarning', function($log, $progressSuppressWarning) {
- return {
- replace: true,
- transclude: true,
- controller: 'ProgressController',
- require: 'progress',
- scope: {
- max: '=?',
- title: '@?'
- },
- templateUrl: 'template/progressbar/progress.html',
- link: function() {
- if (!$progressSuppressWarning) {
- $log.warn('progress is now deprecated. Use uib-progress instead.');
- }
- }
- };
-}])
-
-.directive('bar', ['$log', '$progressSuppressWarning', function($log, $progressSuppressWarning) {
- return {
- replace: true,
- transclude: true,
- require: '^progress',
- scope: {
- value: '=',
- type: '@'
- },
- templateUrl: 'template/progressbar/bar.html',
- link: function(scope, element, attrs, progressCtrl) {
- if (!$progressSuppressWarning) {
- $log.warn('bar is now deprecated. Use uib-bar instead.');
- }
- progressCtrl.addBar(scope, element);
- }
- };
-}])
-
-.directive('progressbar', ['$log', '$progressSuppressWarning', function($log, $progressSuppressWarning) {
- return {
- replace: true,
- transclude: true,
- controller: 'ProgressController',
- scope: {
- value: '=',
- max: '=?',
- type: '@'
- },
- templateUrl: 'template/progressbar/progressbar.html',
- link: function(scope, element, attrs, progressCtrl) {
- if (!$progressSuppressWarning) {
- $log.warn('progressbar is now deprecated. Use uib-progressbar instead.');
- }
- progressCtrl.addBar(scope, angular.element(element.children()[0]), {title: attrs.title});
- }
- };
-}]);
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/progressbar/test/progressbar.spec.js b/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/progressbar/test/progressbar.spec.js
deleted file mode 100644
index 8c487b2..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/progressbar/test/progressbar.spec.js
+++ /dev/null
@@ -1,421 +0,0 @@
-describe('progressbar directive', function() {
- var $rootScope, $compile, element;
- beforeEach(module('ui.bootstrap.progressbar'));
- beforeEach(module('template/progressbar/progressbar.html', 'template/progressbar/progress.html', 'template/progressbar/bar.html'));
- beforeEach(inject(function(_$compile_, _$rootScope_) {
- $compile = _$compile_;
- $rootScope = _$rootScope_;
- $rootScope.value = 22;
- element = $compile('<uib-progressbar animate="false" value="value" title="foo">{{value}} %</uib-progressbar>')($rootScope);
- $rootScope.$digest();
- }));
-
- var BAR_CLASS = 'progress-bar';
-
- function getBar(i) {
- return element.children().eq(i);
- }
-
- it('has a "progress" css class', function() {
- expect(element).toHaveClass('progress');
- });
-
- it('contains one child element with "bar" css class', function() {
- expect(element.children().length).toBe(1);
- expect(getBar(0)).toHaveClass(BAR_CLASS);
- });
-
- it('has a "bar" element with expected width', function() {
- expect(getBar(0).css('width')).toBe('22%');
- });
-
- it('has the appropriate aria markup', function() {
- var bar = getBar(0);
- expect(bar.attr('role')).toBe('progressbar');
- expect(bar.attr('aria-valuemin')).toBe('0');
- expect(bar.attr('aria-valuemax')).toBe('100');
- expect(bar.attr('aria-valuenow')).toBe('22');
- expect(bar.attr('aria-valuetext')).toBe('22%');
- expect(bar.attr('aria-labelledby')).toBe('foo');
- });
-
- it('has the default aria-labelledby value of `progressbar`', function() {
- element = $compile('<uib-progressbar animate="false" value="value">{{value}} %</uib-progressbar>')($rootScope);
- $rootScope.$digest();
- var bar = getBar(0);
- expect(bar.attr('aria-labelledby')).toBe('progressbar');
- });
-
- it('transcludes "bar" text', function() {
- expect(getBar(0).text()).toBe('22 %');
- });
-
- it('it should be possible to add additional classes', function() {
- element = $compile('<progress class="progress-striped active" max="200"><bar class="pizza"></bar></progress>')($rootScope);
- $rootScope.$digest();
-
- expect(element).toHaveClass('progress-striped');
- expect(element).toHaveClass('active');
-
- expect(getBar(0)).toHaveClass('pizza');
- });
-
- it('adjusts the "bar" width and aria when value changes', function() {
- $rootScope.value = 60;
- $rootScope.$digest();
-
- var bar = getBar(0);
- expect(bar.css('width')).toBe('60%');
-
- expect(bar.attr('aria-valuemin')).toBe('0');
- expect(bar.attr('aria-valuemax')).toBe('100');
- expect(bar.attr('aria-valuenow')).toBe('60');
- expect(bar.attr('aria-valuetext')).toBe('60%');
- });
-
- it('allows fractional "bar" width values, rounded to two places', function() {
- $rootScope.value = 5.625;
- $rootScope.$digest();
- expect(getBar(0).css('width')).toBe('5.63%');
-
- $rootScope.value = 1.3;
- $rootScope.$digest();
- expect(getBar(0).css('width')).toBe('1.3%');
- });
-
- it('does not include decimals in aria values', function() {
- $rootScope.value = 50.34;
- $rootScope.$digest();
-
- var bar = getBar(0);
- expect(bar.css('width')).toBe('50.34%');
- expect(bar.attr('aria-valuetext')).toBe('50%');
- });
-
- describe('"max" attribute', function() {
- beforeEach(inject(function() {
- $rootScope.max = 200;
- element = $compile('<uib-progressbar max="max" animate="false" value="value">{{value}}/{{max}}</uib-progressbar>')($rootScope);
- $rootScope.$digest();
- }));
-
- it('has the appropriate aria markup', function() {
- expect(getBar(0).attr('aria-valuemax')).toBe('200');
- });
-
- it('adjusts the "bar" width', function() {
- expect(element.children().eq(0).css('width')).toBe('11%');
- });
-
- it('adjusts the "bar" width when value changes', function() {
- $rootScope.value = 60;
- $rootScope.$digest();
- expect(getBar(0).css('width')).toBe('30%');
-
- $rootScope.value += 12;
- $rootScope.$digest();
- expect(getBar(0).css('width')).toBe('36%');
-
- $rootScope.value = 0;
- $rootScope.$digest();
- expect(getBar(0).css('width')).toBe('0%');
- });
-
- it('transcludes "bar" text', function() {
- expect(getBar(0).text()).toBe('22/200');
- });
-
- it('adjusts the valuemax when it changes', function() {
- expect(getBar(0).attr('aria-valuemax')).toBe('200');
- $rootScope.max = 300;
- $rootScope.$digest();
- expect(getBar(0).attr('aria-valuemax')).toBe('300');
- });
- });
-
- describe('"type" attribute', function() {
- beforeEach(inject(function() {
- $rootScope.type = 'success';
- element = $compile('<uib-progressbar value="value" type="{{type}}"></uib-progressbar>')($rootScope);
- $rootScope.$digest();
- }));
-
- it('should use correct classes', function() {
- expect(getBar(0)).toHaveClass(BAR_CLASS);
- expect(getBar(0)).toHaveClass(BAR_CLASS + '-success');
- });
-
- it('should change classes if type changed', function() {
- $rootScope.type = 'warning';
- $rootScope.value += 1;
- $rootScope.$digest();
-
- var barEl = getBar(0);
- expect(barEl).toHaveClass(BAR_CLASS);
- expect(barEl).not.toHaveClass(BAR_CLASS + '-success');
- expect(barEl).toHaveClass(BAR_CLASS + '-warning');
- });
- });
-
- describe('stacked', function() {
- beforeEach(inject(function() {
- $rootScope.objects = [
- { value: 10, title: 'foo', type: 'success' },
- { value: 50, title: 'bar', type: 'warning' },
- { value: 20, title: 'baz' }
- ];
- element = $compile('<uib-progress animate="false"><uib-bar ng-repeat="o in objects" value="o.value" type="{{o.type}}" title="{{o.title}}">{{o.value}}</uib-bar></uib-progress>')($rootScope);
- $rootScope.$digest();
- }));
-
- it('contains the right number of bars', function() {
- expect(element.children().length).toBe(3);
- for (var i = 0; i < 3; i++) {
- expect(getBar(i)).toHaveClass(BAR_CLASS);
- }
- });
-
- it('renders each bar with the appropriate width', function() {
- expect(getBar(0).css('width')).toBe('10%');
- expect(getBar(1).css('width')).toBe('50%');
- expect(getBar(2).css('width')).toBe('20%');
- });
-
- it('uses correct classes', function() {
- expect(getBar(0)).toHaveClass(BAR_CLASS + '-success');
- expect(getBar(0)).not.toHaveClass(BAR_CLASS + '-warning');
-
- expect(getBar(1)).not.toHaveClass(BAR_CLASS + '-success');
- expect(getBar(1)).toHaveClass(BAR_CLASS + '-warning');
-
- expect(getBar(2)).not.toHaveClass(BAR_CLASS + '-success');
- expect(getBar(2)).not.toHaveClass(BAR_CLASS + '-warning');
- });
-
- it('should change classes if type changed', function() {
- $rootScope.objects = [
- { value: 20, type: 'warning' },
- { value: 50 },
- { value: 30, type: 'info' }
- ];
- $rootScope.$digest();
-
- expect(getBar(0)).not.toHaveClass(BAR_CLASS + '-success');
- expect(getBar(0)).toHaveClass(BAR_CLASS + '-warning');
-
- expect(getBar(1)).not.toHaveClass(BAR_CLASS + '-success');
- expect(getBar(1)).not.toHaveClass(BAR_CLASS + '-warning');
-
- expect(getBar(2)).toHaveClass(BAR_CLASS + '-info');
- expect(getBar(2)).not.toHaveClass(BAR_CLASS + '-success');
- expect(getBar(2)).not.toHaveClass(BAR_CLASS + '-warning');
- });
-
- it('should change classes if type changed', function() {
- $rootScope.objects = [
- { value: 70, type: 'info' }
- ];
- $rootScope.$digest();
-
- expect(element.children().length).toBe(1);
-
- expect(getBar(0)).toHaveClass(BAR_CLASS + '-info');
- expect(getBar(0)).not.toHaveClass(BAR_CLASS + '-success');
- expect(getBar(0)).not.toHaveClass(BAR_CLASS + '-warning');
- });
-
- it('should have the correct aria markup', function() {
- expect(getBar(0).attr('aria-valuenow')).toBe('10');
- expect(getBar(0).attr('aria-valuemin')).toBe('0');
- expect(getBar(0).attr('aria-valuemax')).toBe('100');
- expect(getBar(0).attr('aria-valuetext')).toBe('10%');
- expect(getBar(0).attr('aria-labelledby')).toBe('foo');
-
- expect(getBar(1).attr('aria-valuenow')).toBe('50');
- expect(getBar(1).attr('aria-valuemin')).toBe('0');
- expect(getBar(1).attr('aria-valuemax')).toBe('100');
- expect(getBar(1).attr('aria-valuetext')).toBe('50%');
- expect(getBar(1).attr('aria-labelledby')).toBe('bar');
-
- expect(getBar(2).attr('aria-valuenow')).toBe('20');
- expect(getBar(2).attr('aria-valuemin')).toBe('0');
- expect(getBar(2).attr('aria-valuemax')).toBe('100');
- expect(getBar(2).attr('aria-valuetext')).toBe('20%');
- expect(getBar(2).attr('aria-labelledby')).toBe('baz');
- });
-
- it('should default to `progressbar`', function() {
- $rootScope.objects = [
- { value: 10, title: 'foo', type: 'success' },
- { value: 50, title: 'bar', type: 'warning' },
- { value: 20, title: 'baz' }
- ];
- element = $compile('<uib-progress animate="false"><uib-bar ng-repeat="o in objects" value="o.value" type="{{o.type}}">{{o.value}}</uib-bar></uib-progress>')($rootScope);
- $rootScope.$digest();
-
- expect(getBar(0).attr('aria-labelledby')).toBe('progressbar');
- expect(getBar(1).attr('aria-labelledby')).toBe('progressbar');
- expect(getBar(2).attr('aria-labelledby')).toBe('progressbar');
- });
-
- describe('"max" attribute', function() {
- beforeEach(inject(function() {
- $rootScope.max = 200;
- element = $compile('<uib-progress max="max" animate="false"><uib-bar ng-repeat="o in objects" value="o.value">{{o.value}}/{{max}}</uib-bar></uib-progress>')($rootScope);
- $rootScope.$digest();
- }));
-
- it('has the appropriate aria markup', function() {
- expect(getBar(0).attr('aria-valuemax')).toBe('200');
- });
-
- it('adjusts the "bar" width when it changes', function() {
- expect(getBar(0).css('width')).toBe('5%');
- $rootScope.max = 250;
- $rootScope.$digest();
- expect(getBar(0).css('width')).toBe('4%');
- });
-
- it('adjusts the "bar" width when value changes', function() {
- $rootScope.objects[0].value = 60;
- $rootScope.$digest();
- expect(getBar(0).css('width')).toBe('30%');
-
- $rootScope.objects[0].value += 12;
- $rootScope.$digest();
- expect(getBar(0).css('width')).toBe('36%');
-
- $rootScope.objects[0].value = 0;
- $rootScope.$digest();
- expect(getBar(0).css('width')).toBe('0%');
- });
-
- it('transcludes "bar" text', function() {
- expect(getBar(0).text()).toBe('10/200');
- });
-
- it('adjusts the valuemax when it changes', function() {
- expect(getBar(0).attr('aria-valuemax')).toBe('200');
- $rootScope.max = 300;
- $rootScope.$digest();
- expect(getBar(0).attr('aria-valuemax')).toBe('300');
- });
-
- it('should not have a total width over 100%', function() {
- $rootScope.objects = [
- { value: 60, type: 'warning' },
- { value: 103 },
- { value: 270, type: 'info' }
- ];
- $rootScope.max = 433;
- $rootScope.$digest();
- var totalWidth = 0;
- for (var i = 0; i < 3; i++) {
- totalWidth += parseFloat(getBar(i).css('width'));
- }
- expect(totalWidth.toFixed(2)).toBe('100.00');
- });
-
- it('should not have a total width over 37.65% when removing bar', function() {
- $rootScope.objects = [
- { value: 60, type: 'warning' },
- { value: 103 },
- { value: 270, type: 'info' }
- ];
- $rootScope.max = 433;
- $rootScope.$digest();
- var totalWidth = 0;
- for (var i = 0; i < 3; i++) {
- totalWidth += parseFloat(getBar(i).css('width'));
- }
- expect(totalWidth.toFixed(2)).toBe('100.00');
-
- $rootScope.objects.splice(2, 1);
- $rootScope.$digest();
- totalWidth = 0;
- for (i = 0; i < 2; i++) {
- totalWidth += parseFloat(getBar(i).css('width'));
- }
- expect(totalWidth.toFixed(2)).toBe('37.65');
- });
- });
- });
-});
-
-/* Deprecation tests below */
-
-describe('progressbar deprecation', function() {
- beforeEach(module('ui.bootstrap.progressbar'));
- beforeEach(module('template/progressbar/progress.html', 'template/progressbar/bar.html', 'template/progressbar/progressbar.html'));
-
- describe('progress & bar directives', function() {
- it('should suppress warning', function() {
- module(function($provide) {
- $provide.value('$progressSuppressWarning', true);
- });
-
- inject(function($compile, $log, $rootScope) {
- spyOn($log, 'warn');
-
- $rootScope.objects = [
- { value: 10, type: 'success' },
- { value: 50, type: 'warning' },
- { value: 20 }
- ];
- var element = $compile('<progress animate="false"><bar ng-repeat="o in objects" value="o.value" type="{{o.type}}">{{o.value}}</bar></progress>')($rootScope);
- $rootScope.$digest();
-
- expect($log.warn.calls.count()).toBe(0);
- });
- });
-
- it('should give warning by default', inject(function($compile, $log, $rootScope) {
- spyOn($log, 'warn');
-
- $rootScope.objects = [
- { value: 10, type: 'success' },
- { value: 50, type: 'warning' },
- { value: 20 }
- ];
- var element = $compile('<progress animate="false"><bar ng-repeat="o in objects" value="o.value" type="{{o.type}}">{{o.value}}</bar></progress>')($rootScope);
- $rootScope.$digest();
-
- expect($log.warn.calls.count()).toBe(5);
- expect($log.warn.calls.argsFor(0)).toEqual(['ProgressController is now deprecated. Use UibProgressController instead.']);
- expect($log.warn.calls.argsFor(1)).toEqual(['progress is now deprecated. Use uib-progress instead.']);
- expect($log.warn.calls.argsFor(2)).toEqual(['bar is now deprecated. Use uib-bar instead.']);
- expect($log.warn.calls.argsFor(3)).toEqual(['bar is now deprecated. Use uib-bar instead.']);
- expect($log.warn.calls.argsFor(4)).toEqual(['bar is now deprecated. Use uib-bar instead.']);
- }));
- });
-
- describe('progressbar directive', function() {
- it('should suppress warning', function() {
- module(function($provide) {
- $provide.value('$progressSuppressWarning', true);
- });
-
- inject(function($compile, $log, $rootScope) {
- spyOn($log, 'warn');
-
- $rootScope.value = 22;
- var element = $compile('<progressbar animate="false" value="value" title="foo">{{value}} %</progressbar>')($rootScope);
- $rootScope.$digest();
-
- expect($log.warn.calls.count()).toBe(0);
- });
- });
-
- it('should give warning by default', inject(function($compile, $log, $rootScope) {
- spyOn($log, 'warn');
-
- $rootScope.value = 22;
- var element = $compile('<progressbar animate="false" value="value" title="foo">{{value}} %</progressbar>')($rootScope);
- $rootScope.$digest();
-
- expect($log.warn.calls.count()).toBe(2);
- expect($log.warn.calls.argsFor(0)).toEqual(['ProgressController is now deprecated. Use UibProgressController instead.']);
- expect($log.warn.calls.argsFor(1)).toEqual(['progressbar is now deprecated. Use uib-progressbar instead.']);
- }));
- });
-});
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/rating/docs/demo.html b/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/rating/docs/demo.html
deleted file mode 100644
index 1ad69f7..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/rating/docs/demo.html
+++ /dev/null
@@ -1,15 +0,0 @@
-<div ng-controller="RatingDemoCtrl">
- <h4>Default</h4>
- <uib-rating ng-model="rate" max="max" readonly="isReadonly" on-hover="hoveringOver(value)" on-leave="overStar = null" titles="['one','two','three']" aria-labelledby="default-rating"></uib-rating>
- <span class="label" ng-class="{'label-warning': percent<30, 'label-info': percent>=30 && percent<70, 'label-success': percent>=70}" ng-show="overStar && !isReadonly">{{percent}}%</span>
-
- <pre style="margin:15px 0;">Rate: <b>{{rate}}</b> - Readonly is: <i>{{isReadonly}}</i> - Hovering over: <b>{{overStar || "none"}}</b></pre>
-
- <button type="button" class="btn btn-sm btn-danger" ng-click="rate = 0" ng-disabled="isReadonly">Clear</button>
- <button type="button" class="btn btn-sm btn-default" ng-click="isReadonly = ! isReadonly">Toggle Readonly</button>
- <hr />
-
- <h4>Custom icons</h4>
- <div ng-init="x = 5"><uib-rating ng-model="x" max="15" state-on="'glyphicon-ok-sign'" state-off="'glyphicon-ok-circle'" aria-labelledby="custom-icons-1"></uib-rating> <b>(<i>Rate:</i> {{x}})</b></div>
- <div ng-init="y = 2"><uib-rating ng-model="y" rating-states="ratingStates" aria-labelledby="custom-icons-2"></uib-rating> <b>(<i>Rate:</i> {{y}})</b></div>
-</div>
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/rating/docs/demo.js b/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/rating/docs/demo.js
deleted file mode 100644
index af6b4e9..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/rating/docs/demo.js
+++ /dev/null
@@ -1,18 +0,0 @@
-angular.module('ui.bootstrap.demo').controller('RatingDemoCtrl', function ($scope) {
- $scope.rate = 7;
- $scope.max = 10;
- $scope.isReadonly = false;
-
- $scope.hoveringOver = function(value) {
- $scope.overStar = value;
- $scope.percent = 100 * (value / $scope.max);
- };
-
- $scope.ratingStates = [
- {stateOn: 'glyphicon-ok-sign', stateOff: 'glyphicon-ok-circle'},
- {stateOn: 'glyphicon-star', stateOff: 'glyphicon-star-empty'},
- {stateOn: 'glyphicon-heart', stateOff: 'glyphicon-ban-circle'},
- {stateOn: 'glyphicon-heart'},
- {stateOff: 'glyphicon-off'}
- ];
-});
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/rating/docs/readme.md b/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/rating/docs/readme.md
deleted file mode 100644
index 45cbeb9..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/rating/docs/readme.md
+++ /dev/null
@@ -1,41 +0,0 @@
-Rating directive that will take care of visualising a star rating bar.
-
-### Settings ###
-
-#### `<uib-rating>` ####
-
- * `ng-model` <i class="glyphicon glyphicon-eye-open"></i>
- :
- The current rate.
-
- * `max`
- _(Defaults: 5)_ :
- Changes the number of icons.
-
- * `readonly` <i class="icon-eye-open"></i>
- _(Defaults: false)_ :
- Prevent user's interaction.
-
- * `titles`
- _(Defaults: ["one", "two", "three", "four", "five"])_ :
- An array of Strings defining titles for all icons
-
- * `on-hover(value)`
- :
- An optional expression called when user's mouse is over a particular icon.
-
- * `on-leave()`
- :
- An optional expression called when user's mouse leaves the control altogether.
-
- * `state-on`
- _(Defaults: null)_ :
- A variable used in template to specify the state (class, src, etc) for selected icons.
-
- * `state-off`
- _(Defaults: null)_ :
- A variable used in template to specify the state for unselected icons.
-
- * `rating-states`
- _(Defaults: null)_ :
- An array of objects defining properties for all icons. In default template, `stateOn` & `stateOff` property is used to specify the icon's class.
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/rating/rating.js b/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/rating/rating.js
deleted file mode 100644
index b32a1a3..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/rating/rating.js
+++ /dev/null
@@ -1,137 +0,0 @@
-angular.module('ui.bootstrap.rating', [])
-
-.constant('uibRatingConfig', {
- max: 5,
- stateOn: null,
- stateOff: null,
- titles : ['one', 'two', 'three', 'four', 'five']
-})
-
-.controller('UibRatingController', ['$scope', '$attrs', 'uibRatingConfig', function($scope, $attrs, ratingConfig) {
- var ngModelCtrl = { $setViewValue: angular.noop };
-
- this.init = function(ngModelCtrl_) {
- ngModelCtrl = ngModelCtrl_;
- ngModelCtrl.$render = this.render;
-
- ngModelCtrl.$formatters.push(function(value) {
- if (angular.isNumber(value) && value << 0 !== value) {
- value = Math.round(value);
- }
- return value;
- });
-
- this.stateOn = angular.isDefined($attrs.stateOn) ? $scope.$parent.$eval($attrs.stateOn) : ratingConfig.stateOn;
- this.stateOff = angular.isDefined($attrs.stateOff) ? $scope.$parent.$eval($attrs.stateOff) : ratingConfig.stateOff;
- var tmpTitles = angular.isDefined($attrs.titles) ? $scope.$parent.$eval($attrs.titles) : ratingConfig.titles ;
- this.titles = angular.isArray(tmpTitles) && tmpTitles.length > 0 ?
- tmpTitles : ratingConfig.titles;
-
- var ratingStates = angular.isDefined($attrs.ratingStates) ?
- $scope.$parent.$eval($attrs.ratingStates) :
- new Array(angular.isDefined($attrs.max) ? $scope.$parent.$eval($attrs.max) : ratingConfig.max);
- $scope.range = this.buildTemplateObjects(ratingStates);
- };
-
- this.buildTemplateObjects = function(states) {
- for (var i = 0, n = states.length; i < n; i++) {
- states[i] = angular.extend({ index: i }, { stateOn: this.stateOn, stateOff: this.stateOff, title: this.getTitle(i) }, states[i]);
- }
- return states;
- };
-
- this.getTitle = function(index) {
- if (index >= this.titles.length) {
- return index + 1;
- } else {
- return this.titles[index];
- }
- };
-
- $scope.rate = function(value) {
- if (!$scope.readonly && value >= 0 && value <= $scope.range.length) {
- ngModelCtrl.$setViewValue(ngModelCtrl.$viewValue === value ? 0 : value);
- ngModelCtrl.$render();
- }
- };
-
- $scope.enter = function(value) {
- if (!$scope.readonly) {
- $scope.value = value;
- }
- $scope.onHover({value: value});
- };
-
- $scope.reset = function() {
- $scope.value = ngModelCtrl.$viewValue;
- $scope.onLeave();
- };
-
- $scope.onKeydown = function(evt) {
- if (/(37|38|39|40)/.test(evt.which)) {
- evt.preventDefault();
- evt.stopPropagation();
- $scope.rate($scope.value + (evt.which === 38 || evt.which === 39 ? 1 : -1));
- }
- };
-
- this.render = function() {
- $scope.value = ngModelCtrl.$viewValue;
- };
-}])
-
-.directive('uibRating', function() {
- return {
- require: ['uibRating', 'ngModel'],
- scope: {
- readonly: '=?',
- onHover: '&',
- onLeave: '&'
- },
- controller: 'UibRatingController',
- templateUrl: 'template/rating/rating.html',
- replace: true,
- link: function(scope, element, attrs, ctrls) {
- var ratingCtrl = ctrls[0], ngModelCtrl = ctrls[1];
- ratingCtrl.init(ngModelCtrl);
- }
- };
-});
-
-/* Deprecated rating below */
-
-angular.module('ui.bootstrap.rating')
-
-.value('$ratingSuppressWarning', false)
-
-.controller('RatingController', ['$scope', '$attrs', '$controller', '$log', '$ratingSuppressWarning', function($scope, $attrs, $controller, $log, $ratingSuppressWarning) {
- if (!$ratingSuppressWarning) {
- $log.warn('RatingController is now deprecated. Use UibRatingController instead.');
- }
-
- angular.extend(this, $controller('UibRatingController', {
- $scope: $scope,
- $attrs: $attrs
- }));
-}])
-
-.directive('rating', ['$log', '$ratingSuppressWarning', function($log, $ratingSuppressWarning) {
- return {
- require: ['rating', 'ngModel'],
- scope: {
- readonly: '=?',
- onHover: '&',
- onLeave: '&'
- },
- controller: 'RatingController',
- templateUrl: 'template/rating/rating.html',
- replace: true,
- link: function(scope, element, attrs, ctrls) {
- if (!$ratingSuppressWarning) {
- $log.warn('rating is now deprecated. Use uib-rating instead.');
- }
- var ratingCtrl = ctrls[0], ngModelCtrl = ctrls[1];
- ratingCtrl.init(ngModelCtrl);
- }
- };
-}]);
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/rating/test/rating.spec.js b/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/rating/test/rating.spec.js
deleted file mode 100644
index e51bc69..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/rating/test/rating.spec.js
+++ /dev/null
@@ -1,361 +0,0 @@
-describe('rating directive', function() {
- var $rootScope, $compile, element;
- beforeEach(module('ui.bootstrap.rating'));
- beforeEach(module('template/rating/rating.html'));
- beforeEach(inject(function(_$compile_, _$rootScope_) {
- $compile = _$compile_;
- $rootScope = _$rootScope_;
- $rootScope.rate = 3;
- element = $compile('<uib-rating ng-model="rate"></uib-rating>')($rootScope);
- $rootScope.$digest();
- }));
-
- function getStars() {
- return element.find('i');
- }
-
- function getStar(number) {
- return getStars().eq(number - 1);
- }
-
- function getState(classOn, classOff) {
- var stars = getStars();
- var state = [];
- for (var i = 0, n = stars.length; i < n; i++) {
- state.push((stars.eq(i).hasClass(classOn || 'glyphicon-star') && ! stars.eq(i).hasClass(classOff || 'glyphicon-star-empty')));
- }
- return state;
- }
-
- function getTitles() {
- var stars = getStars();
- return stars.toArray().map(function(star) {
- return angular.element(star).attr('title');
- });
- }
-
- function triggerKeyDown(keyCode) {
- var e = $.Event('keydown');
- e.which = keyCode;
- element.trigger(e);
- }
-
- it('contains the default number of icons', function() {
- expect(getStars().length).toBe(5);
- expect(element.attr('aria-valuemax')).toBe('5');
- });
-
- it('initializes the default star icons as selected', function() {
- expect(getState()).toEqual([true, true, true, false, false]);
- expect(element.attr('aria-valuenow')).toBe('3');
- });
-
- it('handles correctly the click event', function() {
- getStar(2).click();
- $rootScope.$digest();
- expect(getState()).toEqual([true, true, false, false, false]);
- expect($rootScope.rate).toBe(2);
- expect(element.attr('aria-valuenow')).toBe('2');
-
- getStar(5).click();
- $rootScope.$digest();
- expect(getState()).toEqual([true, true, true, true, true]);
- expect($rootScope.rate).toBe(5);
- expect(element.attr('aria-valuenow')).toBe('5');
-
- getStar(5).click();
- $rootScope.$digest();
- expect(getState()).toEqual([false, false, false, false, false]);
- expect($rootScope.rate).toBe(0);
- expect(element.attr('aria-valuenow')).toBe('0');
- });
-
- it('handles correctly the hover event', function() {
- getStar(2).trigger('mouseover');
- $rootScope.$digest();
- expect(getState()).toEqual([true, true, false, false, false]);
- expect($rootScope.rate).toBe(3);
-
- getStar(5).trigger('mouseover');
- $rootScope.$digest();
- expect(getState()).toEqual([true, true, true, true, true]);
- expect($rootScope.rate).toBe(3);
-
- element.trigger('mouseout');
- expect(getState()).toEqual([true, true, true, false, false]);
- expect($rootScope.rate).toBe(3);
- });
-
- it('rounds off the number of stars shown with decimal values', function() {
- $rootScope.rate = 2.1;
- $rootScope.$digest();
-
- expect(getState()).toEqual([true, true, false, false, false]);
- expect(element.attr('aria-valuenow')).toBe('2');
-
- $rootScope.rate = 2.5;
- $rootScope.$digest();
-
- expect(getState()).toEqual([true, true, true, false, false]);
- expect(element.attr('aria-valuenow')).toBe('3');
- });
-
- it('changes the number of selected icons when value changes', function() {
- $rootScope.rate = 2;
- $rootScope.$digest();
-
- expect(getState()).toEqual([true, true, false, false, false]);
- expect(element.attr('aria-valuenow')).toBe('2');
- });
-
- it('shows different number of icons when `max` attribute is set', function() {
- element = $compile('<uib-rating ng-model="rate" max="7"></uib-rating>')($rootScope);
- $rootScope.$digest();
-
- expect(getStars().length).toBe(7);
- expect(element.attr('aria-valuemax')).toBe('7');
- });
-
- it('shows different number of icons when `max` attribute is from scope variable', function() {
- $rootScope.max = 15;
- element = $compile('<uib-rating ng-model="rate" max="max"></uib-rating>')($rootScope);
- $rootScope.$digest();
- expect(getStars().length).toBe(15);
- expect(element.attr('aria-valuemax')).toBe('15');
- });
-
- it('handles readonly attribute', function() {
- $rootScope.isReadonly = true;
- element = $compile('<uib-rating ng-model="rate" readonly="isReadonly"></uib-rating>')($rootScope);
- $rootScope.$digest();
-
- expect(getState()).toEqual([true, true, true, false, false]);
-
- var star5 = getStar(5);
- star5.trigger('mouseover');
- $rootScope.$digest();
- expect(getState()).toEqual([true, true, true, false, false]);
-
- $rootScope.isReadonly = false;
- $rootScope.$digest();
-
- star5.trigger('mouseover');
- $rootScope.$digest();
- expect(getState()).toEqual([true, true, true, true, true]);
- });
-
- it('should fire onHover', function() {
- $rootScope.hoveringOver = jasmine.createSpy('hoveringOver');
- element = $compile('<uib-rating ng-model="rate" on-hover="hoveringOver(value)"></uib-rating>')($rootScope);
- $rootScope.$digest();
-
- getStar(3).trigger('mouseover');
- $rootScope.$digest();
- expect($rootScope.hoveringOver).toHaveBeenCalledWith(3);
- });
-
- it('should fire onLeave', function() {
- $rootScope.leaving = jasmine.createSpy('leaving');
- element = $compile('<uib-rating ng-model="rate" on-leave="leaving()"></uib-rating>')($rootScope);
- $rootScope.$digest();
-
- element.trigger('mouseleave');
- $rootScope.$digest();
- expect($rootScope.leaving).toHaveBeenCalled();
- });
-
- describe('keyboard navigation', function() {
- it('supports arrow keys', function() {
- triggerKeyDown(38);
- expect($rootScope.rate).toBe(4);
-
- triggerKeyDown(37);
- expect($rootScope.rate).toBe(3);
- triggerKeyDown(40);
- expect($rootScope.rate).toBe(2);
-
- triggerKeyDown(39);
- expect($rootScope.rate).toBe(3);
- });
-
- it('supports only arrow keys', function() {
- $rootScope.rate = undefined;
- $rootScope.$digest();
-
- triggerKeyDown(36);
- expect($rootScope.rate).toBe(undefined);
-
- triggerKeyDown(41);
- expect($rootScope.rate).toBe(undefined);
- });
-
- it('can get zero value but not negative', function() {
- $rootScope.rate = 1;
- $rootScope.$digest();
-
- triggerKeyDown(37);
- expect($rootScope.rate).toBe(0);
-
- triggerKeyDown(37);
- expect($rootScope.rate).toBe(0);
- });
-
- it('cannot get value above max', function() {
- $rootScope.rate = 4;
- $rootScope.$digest();
-
- triggerKeyDown(38);
- expect($rootScope.rate).toBe(5);
-
- triggerKeyDown(38);
- expect($rootScope.rate).toBe(5);
- });
- });
-
- describe('custom states', function() {
- beforeEach(inject(function() {
- $rootScope.classOn = 'icon-ok-sign';
- $rootScope.classOff = 'icon-ok-circle';
- element = $compile('<uib-rating ng-model="rate" state-on="classOn" state-off="classOff"></uib-rating>')($rootScope);
- $rootScope.$digest();
- }));
-
- it('changes the default icons', function() {
- expect(getState($rootScope.classOn, $rootScope.classOff)).toEqual([true, true, true, false, false]);
- });
- });
-
- describe('`rating-states`', function() {
- beforeEach(inject(function() {
- $rootScope.states = [
- {stateOn: 'sign', stateOff: 'circle'},
- {stateOn: 'heart', stateOff: 'ban'},
- {stateOn: 'heart'},
- {stateOff: 'off'}
- ];
- element = $compile('<uib-rating ng-model="rate" rating-states="states"></uib-rating>')($rootScope);
- $rootScope.$digest();
- }));
-
- it('should define number of icon elements', function() {
- expect(getStars().length).toBe(4);
- expect(element.attr('aria-valuemax')).toBe('4');
- });
-
- it('handles each icon', function() {
- var stars = getStars();
-
- for (var i = 0; i < stars.length; i++) {
- var star = stars.eq(i);
- var state = $rootScope.states[i];
- var isOn = i < $rootScope.rate;
-
- expect(star.hasClass(state.stateOn)).toBe(isOn);
- expect(star.hasClass(state.stateOff)).toBe(!isOn);
- }
- });
- });
-
- describe('setting uibRatingConfig', function() {
- var originalConfig = {};
- beforeEach(inject(function(uibRatingConfig) {
- $rootScope.rate = 5;
- angular.extend(originalConfig, uibRatingConfig);
- uibRatingConfig.max = 10;
- uibRatingConfig.stateOn = 'on';
- uibRatingConfig.stateOff = 'off';
- element = $compile('<uib-rating ng-model="rate"></uib-rating>')($rootScope);
- $rootScope.$digest();
- }));
- afterEach(inject(function(uibRatingConfig) {
- // return it to the original state
- angular.extend(uibRatingConfig, originalConfig);
- }));
-
- it('should change number of icon elements', function() {
- expect(getStars().length).toBe(10);
- });
-
- it('should change icon states', function() {
- expect(getState('on', 'off')).toEqual([true, true, true, true, true, false, false, false, false, false]);
- });
- });
-
- describe('Default title', function() {
- it('should return the default title for each star', function() {
- expect(getTitles()).toEqual(['one', 'two', 'three', 'four', 'five']);
- });
- });
-
- describe('shows different title when `max` attribute is greater than the titles array ', function() {
- var originalConfig = {};
- beforeEach(inject(function(uibRatingConfig) {
- $rootScope.rate = 5;
- angular.extend(originalConfig, uibRatingConfig);
- uibRatingConfig.max = 10;
- element = $compile('<uib-rating ng-model="rate"></uib-rating>')($rootScope);
- $rootScope.$digest();
- }));
- afterEach(inject(function(uibRatingConfig) {
- // return it to the original state
- angular.extend(uibRatingConfig, originalConfig);
- }));
-
- it('should return the default title for each star', function() {
- expect(getTitles()).toEqual(['one', 'two', 'three', 'four', 'five', '6', '7', '8', '9', '10']);
- });
- });
-
- describe('shows custom titles ', function() {
- it('should return the custom title for each star', function() {
- $rootScope.titles = [44,45,46];
- element = $compile('<uib-rating ng-model="rate" titles="titles"></uib-rating>')($rootScope);
- $rootScope.$digest();
- expect(getTitles()).toEqual(['44', '45', '46', '4', '5']);
- });
- it('should return the default title if the custom title is empty', function() {
- $rootScope.titles = [];
- element = $compile('<uib-rating ng-model="rate" titles="titles"></uib-rating>')($rootScope);
- $rootScope.$digest();
- expect(getTitles()).toEqual(['one', 'two', 'three', 'four', 'five']);
- });
- it('should return the default title if the custom title is not an array', function() {
- element = $compile('<uib-rating ng-model="rate" titles="test"></uib-rating>')($rootScope);
- $rootScope.$digest();
- expect(getTitles()).toEqual(['one', 'two', 'three', 'four', 'five']);
- });
- });
-});
-
-/* Deprecation tests below */
-
-describe('rating deprecation', function() {
- beforeEach(module('ui.bootstrap.rating'));
- beforeEach(module('template/rating/rating.html'));
-
- it('should suppress warning', function() {
- module(function($provide) {
- $provide.value('$ratingSuppressWarning', true);
- });
-
- inject(function($compile, $log, $rootScope) {
- spyOn($log, 'warn');
-
- var element = $compile('<rating ng-model="rate"></rating>')($rootScope);
- $rootScope.$digest();
-
- expect($log.warn.calls.count()).toBe(0);
- });
- });
-
- it('should give warning by default', inject(function($compile, $log, $rootScope) {
- spyOn($log, 'warn');
-
- var element = $compile('<rating ng-model="rate"></rating>')($rootScope);
- $rootScope.$digest();
-
- expect($log.warn.calls.count()).toBe(2);
- expect($log.warn.calls.argsFor(0)).toEqual(['RatingController is now deprecated. Use UibRatingController instead.']);
- expect($log.warn.calls.argsFor(1)).toEqual(['rating is now deprecated. Use uib-rating instead.']);
- }));
-});
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/stackedMap/stackedMap.js b/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/stackedMap/stackedMap.js
deleted file mode 100644
index bd97fb6..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/stackedMap/stackedMap.js
+++ /dev/null
@@ -1,54 +0,0 @@
-angular.module('ui.bootstrap.stackedMap', [])
-/**
- * A helper, internal data structure that acts as a map but also allows getting / removing
- * elements in the LIFO order
- */
- .factory('$$stackedMap', function() {
- return {
- createNew: function() {
- var stack = [];
-
- return {
- add: function(key, value) {
- stack.push({
- key: key,
- value: value
- });
- },
- get: function(key) {
- for (var i = 0; i < stack.length; i++) {
- if (key == stack[i].key) {
- return stack[i];
- }
- }
- },
- keys: function() {
- var keys = [];
- for (var i = 0; i < stack.length; i++) {
- keys.push(stack[i].key);
- }
- return keys;
- },
- top: function() {
- return stack[stack.length - 1];
- },
- remove: function(key) {
- var idx = -1;
- for (var i = 0; i < stack.length; i++) {
- if (key == stack[i].key) {
- idx = i;
- break;
- }
- }
- return stack.splice(idx, 1)[0];
- },
- removeTop: function() {
- return stack.splice(stack.length - 1, 1)[0];
- },
- length: function() {
- return stack.length;
- }
- };
- }
- };
- });
\ No newline at end of file
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/stackedMap/test/stackedMap.spec.js b/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/stackedMap/test/stackedMap.spec.js
deleted file mode 100644
index 62ad5d6..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/stackedMap/test/stackedMap.spec.js
+++ /dev/null
@@ -1,52 +0,0 @@
-describe('stacked map', function() {
- var stackedMap;
-
- beforeEach(module('ui.bootstrap.modal'));
- beforeEach(inject(function ($$stackedMap) {
- stackedMap = $$stackedMap.createNew();
- }));
-
- it('should add and remove objects by key', function() {
- stackedMap.add('foo', 'foo_value');
- expect(stackedMap.length()).toEqual(1);
- expect(stackedMap.get('foo').key).toEqual('foo');
- expect(stackedMap.get('foo').value).toEqual('foo_value');
-
- stackedMap.remove('foo');
- expect(stackedMap.length()).toEqual(0);
- expect(stackedMap.get('foo')).toBeUndefined();
- });
-
- it('should support listing keys', function() {
- stackedMap.add('foo', 'foo_value');
- stackedMap.add('bar', 'bar_value');
-
- expect(stackedMap.keys()).toEqual(['foo', 'bar']);
- });
-
- it('should get topmost element', function() {
- stackedMap.add('foo', 'foo_value');
- stackedMap.add('bar', 'bar_value');
- expect(stackedMap.length()).toEqual(2);
-
- expect(stackedMap.top().key).toEqual('bar');
- expect(stackedMap.length()).toEqual(2);
- });
-
- it('should remove topmost element', function() {
- stackedMap.add('foo', 'foo_value');
- stackedMap.add('bar', 'bar_value');
-
- expect(stackedMap.removeTop().key).toEqual('bar');
- expect(stackedMap.removeTop().key).toEqual('foo');
- });
-
- it('should preserve semantic of an empty stackedMap', function() {
- expect(stackedMap.length()).toEqual(0);
- expect(stackedMap.top()).toBeUndefined();
- });
-
- it('should ignore removal of non-existing elements', function() {
- expect(stackedMap.remove('non-existing')).toBeUndefined();
- });
-});
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/tabs/docs/demo.html b/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/tabs/docs/demo.html
deleted file mode 100644
index 8a848d3..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/tabs/docs/demo.html
+++ /dev/null
@@ -1,39 +0,0 @@
-<div ng-controller="TabsDemoCtrl">
- <p>Select a tab by setting active binding to true:</p>
- <p>
- <button type="button" class="btn btn-default btn-sm" ng-click="tabs[0].active = true">Select second tab</button>
- <button type="button" class="btn btn-default btn-sm" ng-click="tabs[1].active = true">Select third tab</button>
- </p>
- <p>
- <button type="button" class="btn btn-default btn-sm" ng-click="tabs[1].disabled = ! tabs[1].disabled">Enable / Disable third tab</button>
- </p>
- <hr />
-
- <uib-tabset>
- <uib-tab heading="Static title">Static content</uib-tab>
- <uib-tab ng-repeat="tab in tabs" heading="{{tab.title}}" active="tab.active" disable="tab.disabled">
- {{tab.content}}
- </uib-tab>
- <uib-tab select="alertMe()">
- <uib-tab-heading>
- <i class="glyphicon glyphicon-bell"></i> Alert!
- </uib-tab-heading>
- I've got an HTML heading, and a select callback. Pretty cool!
- </uib-tab>
- </uib-tabset>
-
- <hr />
-
- <uib-tabset vertical="true" type="pills">
- <uib-tab heading="Vertical 1">Vertical content 1</uib-tab>
- <uib-tab heading="Vertical 2">Vertical content 2</uib-tab>
- </uib-tabset>
-
- <hr />
-
- <uib-tabset justified="true">
- <uib-tab heading="Justified">Justified content</uib-tab>
- <uib-tab heading="SJ">Short Labeled Justified content</uib-tab>
- <uib-tab heading="Long Justified">Long Labeled Justified content</uib-tab>
- </uib-tabset>
-</div>
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/tabs/docs/demo.js b/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/tabs/docs/demo.js
deleted file mode 100644
index f3d64fd..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/tabs/docs/demo.js
+++ /dev/null
@@ -1,12 +0,0 @@
-angular.module('ui.bootstrap.demo').controller('TabsDemoCtrl', function ($scope, $window) {
- $scope.tabs = [
- { title:'Dynamic Title 1', content:'Dynamic content 1' },
- { title:'Dynamic Title 2', content:'Dynamic content 2', disabled: true }
- ];
-
- $scope.alertMe = function() {
- setTimeout(function() {
- $window.alert('You\'ve selected the alert tab!');
- });
- };
-});
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/tabs/docs/readme.md b/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/tabs/docs/readme.md
deleted file mode 100644
index d00461c..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/tabs/docs/readme.md
+++ /dev/null
@@ -1,40 +0,0 @@
-AngularJS version of the tabs directive.
-
-### Settings ###
-
-#### `<uib-tabset>` ####
-
- * `vertical`
- _(Defaults: false)_ :
- Whether tabs appear vertically stacked.
-
- * `justified`
- _(Defaults: false)_ :
- Whether tabs fill the container and have a consistent width.
-
- * `type`
- _(Defaults: 'tabs')_ :
- Navigation type. Possible values are 'tabs' and 'pills'.
-
-#### `<uib-tab>` ####
-
- * `heading` or `<uib-tab-heading>`
- :
- Heading text or HTML markup.
-
- * `active` <i class="glyphicon glyphicon-eye-open"></i>
- _(Defaults: false)_ :
- Whether tab is currently selected.
-
- * `disable` <i class="glyphicon glyphicon-eye-open"></i>
- _(Defaults: false)_ :
- Whether tab is clickable and can be activated.
- Note that this was previously the `disabled` attribute, which is now deprecated.
-
- * `select()`
- _(Defaults: null)_ :
- An optional expression called when tab is activated.
-
- * `deselect()`
- _(Defaults: null)_ :
- An optional expression called when tab is deactivated.
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/tabs/tabs.js b/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/tabs/tabs.js
deleted file mode 100644
index cb68c8d..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/tabs/tabs.js
+++ /dev/null
@@ -1,439 +0,0 @@
-
-/**
- * @ngdoc overview
- * @name ui.bootstrap.tabs
- *
- * @description
- * AngularJS version of the tabs directive.
- */
-
-angular.module('ui.bootstrap.tabs', [])
-
-.controller('UibTabsetController', ['$scope', function ($scope) {
- var ctrl = this,
- tabs = ctrl.tabs = $scope.tabs = [];
-
- ctrl.select = function(selectedTab) {
- angular.forEach(tabs, function(tab) {
- if (tab.active && tab !== selectedTab) {
- tab.active = false;
- tab.onDeselect();
- selectedTab.selectCalled = false;
- }
- });
- selectedTab.active = true;
- // only call select if it has not already been called
- if (!selectedTab.selectCalled) {
- selectedTab.onSelect();
- selectedTab.selectCalled = true;
- }
- };
-
- ctrl.addTab = function addTab(tab) {
- tabs.push(tab);
- // we can't run the select function on the first tab
- // since that would select it twice
- if (tabs.length === 1 && tab.active !== false) {
- tab.active = true;
- } else if (tab.active) {
- ctrl.select(tab);
- } else {
- tab.active = false;
- }
- };
-
- ctrl.removeTab = function removeTab(tab) {
- var index = tabs.indexOf(tab);
- //Select a new tab if the tab to be removed is selected and not destroyed
- if (tab.active && tabs.length > 1 && !destroyed) {
- //If this is the last tab, select the previous tab. else, the next tab.
- var newActiveIndex = index == tabs.length - 1 ? index - 1 : index + 1;
- ctrl.select(tabs[newActiveIndex]);
- }
- tabs.splice(index, 1);
- };
-
- var destroyed;
- $scope.$on('$destroy', function() {
- destroyed = true;
- });
-}])
-
-/**
- * @ngdoc directive
- * @name ui.bootstrap.tabs.directive:tabset
- * @restrict EA
- *
- * @description
- * Tabset is the outer container for the tabs directive
- *
- * @param {boolean=} vertical Whether or not to use vertical styling for the tabs.
- * @param {boolean=} justified Whether or not to use justified styling for the tabs.
- *
- * @example
-<example module="ui.bootstrap">
- <file name="index.html">
- <uib-tabset>
- <uib-tab heading="Tab 1"><b>First</b> Content!</uib-tab>
- <uib-tab heading="Tab 2"><i>Second</i> Content!</uib-tab>
- </uib-tabset>
- <hr />
- <uib-tabset vertical="true">
- <uib-tab heading="Vertical Tab 1"><b>First</b> Vertical Content!</uib-tab>
- <uib-tab heading="Vertical Tab 2"><i>Second</i> Vertical Content!</uib-tab>
- </uib-tabset>
- <uib-tabset justified="true">
- <uib-tab heading="Justified Tab 1"><b>First</b> Justified Content!</uib-tab>
- <uib-tab heading="Justified Tab 2"><i>Second</i> Justified Content!</uib-tab>
- </uib-tabset>
- </file>
-</example>
- */
-.directive('uibTabset', function() {
- return {
- restrict: 'EA',
- transclude: true,
- replace: true,
- scope: {
- type: '@'
- },
- controller: 'UibTabsetController',
- templateUrl: 'template/tabs/tabset.html',
- link: function(scope, element, attrs) {
- scope.vertical = angular.isDefined(attrs.vertical) ? scope.$parent.$eval(attrs.vertical) : false;
- scope.justified = angular.isDefined(attrs.justified) ? scope.$parent.$eval(attrs.justified) : false;
- }
- };
-})
-
-/**
- * @ngdoc directive
- * @name ui.bootstrap.tabs.directive:tab
- * @restrict EA
- *
- * @param {string=} heading The visible heading, or title, of the tab. Set HTML headings with {@link ui.bootstrap.tabs.directive:tabHeading tabHeading}.
- * @param {string=} select An expression to evaluate when the tab is selected.
- * @param {boolean=} active A binding, telling whether or not this tab is selected.
- * @param {boolean=} disabled A binding, telling whether or not this tab is disabled.
- *
- * @description
- * Creates a tab with a heading and content. Must be placed within a {@link ui.bootstrap.tabs.directive:tabset tabset}.
- *
- * @example
-<example module="ui.bootstrap">
- <file name="index.html">
- <div ng-controller="TabsDemoCtrl">
- <button class="btn btn-small" ng-click="items[0].active = true">
- Select item 1, using active binding
- </button>
- <button class="btn btn-small" ng-click="items[1].disabled = !items[1].disabled">
- Enable/disable item 2, using disabled binding
- </button>
- <br />
- <uib-tabset>
- <uib-tab heading="Tab 1">First Tab</uib-tab>
- <uib-tab select="alertMe()">
- <uib-tab-heading><i class="icon-bell"></i> Alert me!</tab-heading>
- Second Tab, with alert callback and html heading!
- </uib-tab>
- <uib-tab ng-repeat="item in items"
- heading="{{item.title}}"
- disabled="item.disabled"
- active="item.active">
- {{item.content}}
- </uib-tab>
- </uib-tabset>
- </div>
- </file>
- <file name="script.js">
- function TabsDemoCtrl($scope) {
- $scope.items = [
- { title:"Dynamic Title 1", content:"Dynamic Item 0" },
- { title:"Dynamic Title 2", content:"Dynamic Item 1", disabled: true }
- ];
-
- $scope.alertMe = function() {
- setTimeout(function() {
- alert("You've selected the alert tab!");
- });
- };
- };
- </file>
-</example>
- */
-
-/**
- * @ngdoc directive
- * @name ui.bootstrap.tabs.directive:tabHeading
- * @restrict EA
- *
- * @description
- * Creates an HTML heading for a {@link ui.bootstrap.tabs.directive:tab tab}. Must be placed as a child of a tab element.
- *
- * @example
-<example module="ui.bootstrap">
- <file name="index.html">
- <uib-tabset>
- <uib-tab>
- <uib-tab-heading><b>HTML</b> in my titles?!</tab-heading>
- And some content, too!
- </uib-tab>
- <uib-tab>
- <uib-tab-heading><i class="icon-heart"></i> Icon heading?!?</tab-heading>
- That's right.
- </uib-tab>
- </uib-tabset>
- </file>
-</example>
- */
-.directive('uibTab', ['$parse', function($parse) {
- return {
- require: '^uibTabset',
- restrict: 'EA',
- replace: true,
- templateUrl: 'template/tabs/tab.html',
- transclude: true,
- scope: {
- active: '=?',
- heading: '@',
- onSelect: '&select', //This callback is called in contentHeadingTransclude
- //once it inserts the tab's content into the dom
- onDeselect: '&deselect'
- },
- controller: function() {
- //Empty controller so other directives can require being 'under' a tab
- },
- link: function(scope, elm, attrs, tabsetCtrl, transclude) {
- scope.$watch('active', function(active) {
- if (active) {
- tabsetCtrl.select(scope);
- }
- });
-
- scope.disabled = false;
- if (attrs.disable) {
- scope.$parent.$watch($parse(attrs.disable), function(value) {
- scope.disabled = !! value;
- });
- }
-
- scope.select = function() {
- if (!scope.disabled) {
- scope.active = true;
- }
- };
-
- tabsetCtrl.addTab(scope);
- scope.$on('$destroy', function() {
- tabsetCtrl.removeTab(scope);
- });
-
- //We need to transclude later, once the content container is ready.
- //when this link happens, we're inside a tab heading.
- scope.$transcludeFn = transclude;
- }
- };
-}])
-
-.directive('uibTabHeadingTransclude', function() {
- return {
- restrict: 'A',
- require: ['?^uibTab', '?^tab'], // TODO: change to '^uibTab' after deprecation removal
- link: function(scope, elm) {
- scope.$watch('headingElement', function updateHeadingElement(heading) {
- if (heading) {
- elm.html('');
- elm.append(heading);
- }
- });
- }
- };
-})
-
-.directive('uibTabContentTransclude', function() {
- return {
- restrict: 'A',
- require: ['?^uibTabset', '?^tabset'], // TODO: change to '^uibTabset' after deprecation removal
- link: function(scope, elm, attrs) {
- var tab = scope.$eval(attrs.uibTabContentTransclude);
-
- //Now our tab is ready to be transcluded: both the tab heading area
- //and the tab content area are loaded. Transclude 'em both.
- tab.$transcludeFn(tab.$parent, function(contents) {
- angular.forEach(contents, function(node) {
- if (isTabHeading(node)) {
- //Let tabHeadingTransclude know.
- tab.headingElement = node;
- } else {
- elm.append(node);
- }
- });
- });
- }
- };
-
- function isTabHeading(node) {
- return node.tagName && (
- node.hasAttribute('tab-heading') || // TODO: remove after deprecation removal
- node.hasAttribute('data-tab-heading') || // TODO: remove after deprecation removal
- node.hasAttribute('x-tab-heading') || // TODO: remove after deprecation removal
- node.hasAttribute('uib-tab-heading') ||
- node.hasAttribute('data-uib-tab-heading') ||
- node.hasAttribute('x-uib-tab-heading') ||
- node.tagName.toLowerCase() === 'tab-heading' || // TODO: remove after deprecation removal
- node.tagName.toLowerCase() === 'data-tab-heading' || // TODO: remove after deprecation removal
- node.tagName.toLowerCase() === 'x-tab-heading' || // TODO: remove after deprecation removal
- node.tagName.toLowerCase() === 'uib-tab-heading' ||
- node.tagName.toLowerCase() === 'data-uib-tab-heading' ||
- node.tagName.toLowerCase() === 'x-uib-tab-heading'
- );
- }
-});
-
-/* deprecated tabs below */
-
-angular.module('ui.bootstrap.tabs')
-
- .value('$tabsSuppressWarning', false)
-
- .controller('TabsetController', ['$scope', '$controller', '$log', '$tabsSuppressWarning', function($scope, $controller, $log, $tabsSuppressWarning) {
- if (!$tabsSuppressWarning) {
- $log.warn('TabsetController is now deprecated. Use UibTabsetController instead.');
- }
-
- angular.extend(this, $controller('UibTabsetController', {
- $scope: $scope
- }));
- }])
-
- .directive('tabset', ['$log', '$tabsSuppressWarning', function($log, $tabsSuppressWarning) {
- return {
- restrict: 'EA',
- transclude: true,
- replace: true,
- scope: {
- type: '@'
- },
- controller: 'TabsetController',
- templateUrl: 'template/tabs/tabset.html',
- link: function(scope, element, attrs) {
-
- if (!$tabsSuppressWarning) {
- $log.warn('tabset is now deprecated. Use uib-tabset instead.');
- }
- scope.vertical = angular.isDefined(attrs.vertical) ? scope.$parent.$eval(attrs.vertical) : false;
- scope.justified = angular.isDefined(attrs.justified) ? scope.$parent.$eval(attrs.justified) : false;
- }
- };
- }])
-
- .directive('tab', ['$parse', '$log', '$tabsSuppressWarning', function($parse, $log, $tabsSuppressWarning) {
- return {
- require: '^tabset',
- restrict: 'EA',
- replace: true,
- templateUrl: 'template/tabs/tab.html',
- transclude: true,
- scope: {
- active: '=?',
- heading: '@',
- onSelect: '&select', //This callback is called in contentHeadingTransclude
- //once it inserts the tab's content into the dom
- onDeselect: '&deselect'
- },
- controller: function() {
- //Empty controller so other directives can require being 'under' a tab
- },
- link: function(scope, elm, attrs, tabsetCtrl, transclude) {
- if (!$tabsSuppressWarning) {
- $log.warn('tab is now deprecated. Use uib-tab instead.');
- }
-
- scope.$watch('active', function(active) {
- if (active) {
- tabsetCtrl.select(scope);
- }
- });
-
- scope.disabled = false;
- if (attrs.disable) {
- scope.$parent.$watch($parse(attrs.disable), function(value) {
- scope.disabled = !!value;
- });
- }
-
- scope.select = function() {
- if (!scope.disabled) {
- scope.active = true;
- }
- };
-
- tabsetCtrl.addTab(scope);
- scope.$on('$destroy', function() {
- tabsetCtrl.removeTab(scope);
- });
-
- //We need to transclude later, once the content container is ready.
- //when this link happens, we're inside a tab heading.
- scope.$transcludeFn = transclude;
- }
- };
- }])
-
- .directive('tabHeadingTransclude', ['$log', '$tabsSuppressWarning', function($log, $tabsSuppressWarning) {
- return {
- restrict: 'A',
- require: '^tab',
- link: function(scope, elm) {
- if (!$tabsSuppressWarning) {
- $log.warn('tab-heading-transclude is now deprecated. Use uib-tab-heading-transclude instead.');
- }
-
- scope.$watch('headingElement', function updateHeadingElement(heading) {
- if (heading) {
- elm.html('');
- elm.append(heading);
- }
- });
- }
- };
- }])
-
- .directive('tabContentTransclude', ['$log', '$tabsSuppressWarning', function($log, $tabsSuppressWarning) {
- return {
- restrict: 'A',
- require: '^tabset',
- link: function(scope, elm, attrs) {
- if (!$tabsSuppressWarning) {
- $log.warn('tab-content-transclude is now deprecated. Use uib-tab-content-transclude instead.');
- }
-
- var tab = scope.$eval(attrs.tabContentTransclude);
-
- //Now our tab is ready to be transcluded: both the tab heading area
- //and the tab content area are loaded. Transclude 'em both.
- tab.$transcludeFn(tab.$parent, function(contents) {
- angular.forEach(contents, function(node) {
- if (isTabHeading(node)) {
- //Let tabHeadingTransclude know.
- tab.headingElement = node;
- }
- else {
- elm.append(node);
- }
- });
- });
- }
- };
-
- function isTabHeading(node) {
- return node.tagName && (
- node.hasAttribute('tab-heading') ||
- node.hasAttribute('data-tab-heading') ||
- node.hasAttribute('x-tab-heading') ||
- node.tagName.toLowerCase() === 'tab-heading' ||
- node.tagName.toLowerCase() === 'data-tab-heading' ||
- node.tagName.toLowerCase() === 'x-tab-heading'
- );
- }
- }]);
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/tabs/test/tabs.spec.js b/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/tabs/test/tabs.spec.js
deleted file mode 100644
index 1de3c25..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/tabs/test/tabs.spec.js
+++ /dev/null
@@ -1,923 +0,0 @@
-describe('tabs', function() {
- var elm, scope;
-
- beforeEach(module('ui.bootstrap.tabs'));
- beforeEach(module('template/tabs/tabset.html'));
- beforeEach(module('template/tabs/tab.html'));
-
- function titles() {
- return elm.find('ul.nav-tabs li');
- }
- function contents() {
- return elm.find('div.tab-content div.tab-pane');
- }
-
- function expectTitles(titlesArray) {
- var t = titles();
- expect(t.length).toEqual(titlesArray.length);
- for (var i=0; i<t.length; i++) {
- expect(t.eq(i).text().trim()).toEqual(titlesArray[i]);
- }
- }
-
- function expectContents(contentsArray) {
- var c = contents();
- expect(c.length).toEqual(contentsArray.length);
- for (var i=0; i<c.length; i++) {
- expect(c.eq(i).text().trim()).toEqual(contentsArray[i]);
- }
- }
-
- describe('basics', function() {
- beforeEach(inject(function($compile, $rootScope) {
- scope = $rootScope.$new();
- scope.first = '1';
- scope.second = '2';
- scope.actives = {};
- scope.selectFirst = jasmine.createSpy();
- scope.selectSecond = jasmine.createSpy();
- scope.deselectFirst = jasmine.createSpy();
- scope.deselectSecond = jasmine.createSpy();
- elm = $compile([
- '<uib-tabset class="hello" data-pizza="pepperoni">',
- ' <uib-tab heading="First Tab {{first}}" active="actives.one" select="selectFirst()" deselect="deselectFirst()">',
- ' first content is {{first}}',
- ' </uib-tab>',
- ' <uib-tab active="actives.two" select="selectSecond()" deselect="deselectSecond()">',
- ' <uib-tab-heading><b>Second</b> Tab {{second}}</uib-tab-heading>',
- ' second content is {{second}}',
- ' </uib-tab>',
- '</uib-tabset>'
- ].join('\n'))(scope);
- scope.$apply();
- return elm;
- }));
-
- it('should pass class and other attributes on to tab template', function() {
- expect(elm).toHaveClass('hello');
- expect(elm.attr('data-pizza')).toBe('pepperoni');
- });
-
- it('should create clickable titles', function() {
- var t = titles();
- expect(t.length).toBe(2);
- expect(t.find('a').eq(0).text()).toBe('First Tab 1');
- //It should put the uib-tab-heading element into the 'a' title
- expect(t.find('a').eq(1).children().is('uib-tab-heading')).toBe(true);
- expect(t.find('a').eq(1).children().html()).toBe('<b>Second</b> Tab 2');
- });
-
- it('should bind tabs content and set first tab active', function() {
- expectContents(['first content is 1', 'second content is 2']);
- expect(titles().eq(0)).toHaveClass('active');
- expect(titles().eq(1)).not.toHaveClass('active');
- expect(scope.actives.one).toBe(true);
- expect(scope.actives.two).toBeFalsy();
- });
-
- it('should change active on click', function() {
- titles().eq(1).find('a').click();
- expect(contents().eq(1)).toHaveClass('active');
- expect(titles().eq(0)).not.toHaveClass('active');
- expect(titles().eq(1)).toHaveClass('active');
- expect(scope.actives.one).toBe(false);
- expect(scope.actives.two).toBe(true);
- });
-
- it('should call select callback on select', function() {
- titles().eq(1).find('a').click();
- expect(scope.selectSecond).toHaveBeenCalled();
- titles().eq(0).find('a').click();
- expect(scope.selectFirst).toHaveBeenCalled();
- });
-
- it('should call deselect callback on deselect', function() {
- titles().eq(1).find('a').click();
- titles().eq(0).find('a').click();
- expect(scope.deselectSecond).toHaveBeenCalled();
- titles().eq(1).find('a').click();
- expect(scope.deselectFirst).toHaveBeenCalled();
- });
- });
-
- describe('basics with initial active tab', function() {
- beforeEach(inject(function($compile, $rootScope) {
- scope = $rootScope.$new();
-
- function makeTab(active) {
- return {
- active: !!active,
- select: jasmine.createSpy()
- };
- }
- scope.tabs = [
- makeTab(), makeTab(), makeTab(true), makeTab()
- ];
- elm = $compile([
- '<uib-tabset>',
- ' <uib-tab active="tabs[0].active" select="tabs[0].select()">',
- ' </uib-tab>',
- ' <uib-tab active="tabs[1].active" select="tabs[1].select()">',
- ' </uib-tab>',
- ' <uib-tab active="tabs[2].active" select="tabs[2].select()">',
- ' </uib-tab>',
- ' <uib-tab active="tabs[3].active" select="tabs[3].select()">',
- ' </uib-tab>',
- '</uib-tabset>'
- ].join('\n'))(scope);
- scope.$apply();
- }));
-
- function expectTabActive(activeTab) {
- var _titles = titles();
- angular.forEach(scope.tabs, function(tab, i) {
- if (activeTab === tab) {
- expect(tab.active).toBe(true);
- //It should only call select ONCE for each select
- expect(tab.select).toHaveBeenCalled();
- expect(_titles.eq(i)).toHaveClass('active');
- expect(contents().eq(i)).toHaveClass('active');
- } else {
- expect(tab.active).toBe(false);
- expect(_titles.eq(i)).not.toHaveClass('active');
- }
- });
- }
-
- it('should make tab titles and set active tab active', function() {
- expect(titles().length).toBe(scope.tabs.length);
- expectTabActive(scope.tabs[2]);
- });
- });
-
- describe('tab callback order', function() {
- var execOrder;
- beforeEach(inject(function($compile, $rootScope) {
- scope = $rootScope.$new();
- execOrder = [];
- scope.actives = {};
-
- scope.execute = function(id) {
- execOrder.push(id);
- };
-
- elm = $compile([
- '<div>',
- ' <uib-tabset class="hello" data-pizza="pepperoni">',
- ' <uib-tab heading="First Tab" active="actives.one" select="execute(\'select1\')" deselect="execute(\'deselect1\')"></uib-tab>',
- ' <uib-tab select="execute(\'select2\')" deselect="execute(\'deselect2\')"></uib-tab>',
- ' </uib-tabset>',
- '</div>'
- ].join('\n'))(scope);
- scope.$apply();
- return elm;
- }));
-
- it('should call select for the first tab', function() {
- expect(execOrder).toEqual([ 'select1' ]);
- });
-
- it('should call deselect, then select', function() {
- execOrder = [];
-
- // Select second tab
- titles().eq(1).find('a').click();
- expect(execOrder).toEqual([ 'deselect1', 'select2' ]);
-
- execOrder = [];
-
- // Select again first tab
- titles().eq(0).find('a').click();
- expect(execOrder).toEqual([ 'deselect2', 'select1' ]);
- });
- });
-
- describe('ng-repeat', function() {
- var $compile, $rootScope;
- beforeEach(inject(function(_$compile_, _$rootScope_) {
- $compile = _$compile_;
- $rootScope = _$rootScope_;
- scope = $rootScope.$new();
-
- scope.tabs = [
- makeTab(), makeTab(), makeTab(true), makeTab()
- ];
- elm = $compile([
- '<uib-tabset>',
- ' <uib-tab ng-repeat="t in tabs" active="t.active" select="t.select()">',
- ' <uib-tab-heading><b>heading</b> {{index}}</uib-tab-heading>',
- ' content {{$index}}',
- ' </uib-tab>',
- '</uib-tabset>'
- ].join('\n'))(scope);
- scope.$apply();
- }));
-
- function makeTab(active) {
- return {
- active: !!active,
- select: jasmine.createSpy()
- };
- }
-
- function titles() {
- return elm.find('ul.nav-tabs li');
- }
- function contents() {
- return elm.find('div.tab-content div.tab-pane');
- }
-
- function expectTabActive(activeTab) {
- var _titles = titles();
- angular.forEach(scope.tabs, function(tab, i) {
- if (activeTab === tab) {
- expect(tab.active).toBe(true);
- //It should only call select ONCE for each select
- expect(tab.select).toHaveBeenCalled();
- expect(_titles.eq(i)).toHaveClass('active');
- expect(contents().eq(i).text().trim()).toBe('content ' + i);
- expect(contents().eq(i)).toHaveClass('active');
- } else {
- expect(tab.active).toBe(false);
- expect(_titles.eq(i)).not.toHaveClass('active');
- }
- });
- }
-
- it('should make tab titles and set active tab active', function() {
- expect(titles().length).toBe(scope.tabs.length);
- expectTabActive(scope.tabs[2]);
- });
-
- it('should switch active when clicking', function() {
- titles().eq(3).find('a').click();
- expectTabActive(scope.tabs[3]);
- });
-
- it('should switch active when setting active=true', function() {
- scope.$apply('tabs[2].active = true');
- expectTabActive(scope.tabs[2]);
- });
-
- it('should deselect all when no tabs are active', function() {
- angular.forEach(scope.tabs, function(t) { t.active = false; });
- scope.$apply();
- expectTabActive(null);
- expect(contents().filter('.active').length).toBe(0);
-
- scope.tabs[2].active = true;
- scope.$apply();
- expectTabActive(scope.tabs[2]);
- });
-
- it('should not select twice', function() {
- elm.remove();
- elm = null;
- scope = $rootScope.$new();
-
- scope.tabs = [
- makeTab(), makeTab(), makeTab(true), makeTab()
- ];
- scope.foo = {active: true};
- scope.select = jasmine.createSpy();
- elm = $compile([
- '<uib-tabset>',
- ' <uib-tab ng-repeat="t in tabs" active="t.active" select="select()">',
- ' <uib-tab-heading><b>heading</b> {{index}}</uib-tab-heading>',
- ' content {{$index}}',
- ' </uib-tab>',
- ' <uib-tab active="foo.active" select="select()">',
- ' <uib-tab-heading><b>heading</b> foo</uib-tab-heading>',
- ' content foo',
- ' </uib-tab>',
- '</uib-tabset>'
- ].join('\n'))(scope);
- scope.$apply();
-
- expect(scope.select.calls.count()).toBe(1);
- });
- });
-
- describe('advanced uib-tab-heading element', function() {
- beforeEach(inject(function($compile, $rootScope, $sce) {
- scope = $rootScope.$new();
- scope.myHtml = $sce.trustAsHtml('<b>hello</b>, there!');
- scope.value = true;
- elm = $compile([
- '<uib-tabset>',
- ' <uib-tab>',
- ' <uib-tab-heading ng-bind-html="myHtml" ng-show="value"></uib-tab-heading>',
- ' </uib-tab>',
- ' <uib-tab><data-uib-tab-heading>1</data-uib-tab-heading></uib-tab>',
- ' <uib-tab><div data-uib-tab-heading>2</div></uib-tab>',
- ' <uib-tab><div uib-tab-heading>3</div></uib-tab>',
- '</uib-tabset>'
- ].join('\n'))(scope);
- scope.$apply();
- }));
-
- function heading() {
- return elm.find('ul li a').children();
- }
-
- it('should create a heading bound to myHtml', function() {
- expect(heading().eq(0).html()).toBe('<b>hello</b>, there!');
- });
-
- it('should hide and show the heading depending on value', function() {
- expect(heading().eq(0)).not.toBeHidden();
- scope.$apply('value = false');
- expect(heading().eq(0)).toBeHidden();
- scope.$apply('value = true');
- expect(heading().eq(0)).not.toBeHidden();
- });
-
- it('should have a uib-tab-heading no matter what syntax was used', function() {
- expect(heading().eq(1).text()).toBe('1');
- expect(heading().eq(2).text()).toBe('2');
- expect(heading().eq(3).text()).toBe('3');
- });
-
- });
-
- //Tests that http://git.io/lG6I9Q is fixed
- describe('tab ordering', function() {
- beforeEach(inject(function($compile, $rootScope) {
- scope = $rootScope.$new();
- scope.tabs = [
- { title:'Title 1', available:true },
- { title:'Title 2', available:true },
- { title:'Title 3', available:true }
- ];
- elm = $compile([
- '<uib-tabset>',
- ' <!-- a comment -->',
- ' <div>div that makes troubles</div>',
- ' <uib-tab heading="first">First Static</uib-tab>',
- ' <div>another div that may do evil</div>',
- ' <uib-tab ng-repeat="tab in tabs | filter:tabIsAvailable" active="tab.active" heading="{{tab.title}}">some content</uib-tab>',
- ' <!-- another comment -->',
- ' <uib-tab heading="mid">Mid Static</uib-tab>',
- ' a text node',
- ' <!-- another comment -->',
- ' <span>yet another span that may do evil</span>',
- ' <uib-tab ng-repeat="tab in tabs | filter:tabIsAvailable" active="tab.active" heading="Second {{tab.title}}">some content</uib-tab>',
- ' a text node',
- ' <span>yet another span that may do evil</span>',
- ' <!-- another comment -->',
- ' <uib-tab heading="last">Last Static</uib-tab>',
- ' a text node',
- ' <span>yet another span that may do evil</span>',
- ' <!-- another comment -->',
- '</uib-tabset>'
- ].join('\n'))(scope);
-
- scope.tabIsAvailable = function(tab) {
- return tab.available;
- };
- }));
-
- it('should preserve correct ordering', function() {
- function titles() {
- return elm.find('ul.nav-tabs li a');
- }
- scope.$apply();
- expect(titles().length).toBe(9);
- scope.$apply('tabs[1].available=false');
- scope.$digest();
- expect(titles().length).toBe(7);
- scope.$apply('tabs[0].available=false');
- scope.$digest();
- expect(titles().length).toBe(5);
- scope.$apply('tabs[2].available=false');
- scope.$digest();
- expect(titles().length).toBe(3);
- scope.$apply('tabs[0].available=true');
- scope.$digest();
- expect(titles().length).toBe(5);
- scope.$apply('tabs[1].available=true');
- scope.$apply('tabs[2].available=true');
- scope.$digest();
- expect(titles().length).toBe(9);
- expect(titles().eq(0).text().trim()).toBe('first');
- expect(titles().eq(1).text().trim()).toBe('Title 1');
- expect(titles().eq(2).text().trim()).toBe('Title 2');
- expect(titles().eq(3).text().trim()).toBe('Title 3');
- expect(titles().eq(4).text().trim()).toBe('mid');
- expect(titles().eq(5).text().trim()).toBe('Second Title 1');
- expect(titles().eq(6).text().trim()).toBe('Second Title 2');
- expect(titles().eq(7).text().trim()).toBe('Second Title 3');
- expect(titles().eq(8).text().trim()).toBe('last');
- });
- });
-
- describe('uib-tabset controller', function() {
- function mockTab(isActive) {
- var _isActive;
- if (isActive || isActive === false) {
- _isActive = isActive;
- }
-
- return {
- active: _isActive,
- onSelect : angular.noop,
- onDeselect : angular.noop
- };
- }
-
- var ctrl;
- beforeEach(inject(function($controller, $rootScope) {
- scope = $rootScope;
- //instantiate the controller stand-alone, without the directive
- ctrl = $controller('UibTabsetController', {$scope: scope});
- }));
-
- describe('select', function() {
- it('should mark given tab selected', function() {
- var tab = mockTab();
-
- ctrl.select(tab);
- expect(tab.active).toBe(true);
- });
-
-
- it('should deselect other tabs', function() {
- var tab1 = mockTab(), tab2 = mockTab(), tab3 = mockTab();
-
- ctrl.addTab(tab1);
- ctrl.addTab(tab2);
- ctrl.addTab(tab3);
-
- ctrl.select(tab1);
- expect(tab1.active).toBe(true);
- expect(tab2.active).toBe(false);
- expect(tab3.active).toBe(false);
-
- ctrl.select(tab2);
- expect(tab1.active).toBe(false);
- expect(tab2.active).toBe(true);
- expect(tab3.active).toBe(false);
-
- ctrl.select(tab3);
- expect(tab1.active).toBe(false);
- expect(tab2.active).toBe(false);
- expect(tab3.active).toBe(true);
- });
- });
-
-
- describe('addTab', function() {
- it('should append tab', function() {
- var tab1 = mockTab(), tab2 = mockTab();
-
- expect(ctrl.tabs).toEqual([]);
-
- ctrl.addTab(tab1);
- expect(ctrl.tabs).toEqual([tab1]);
-
- ctrl.addTab(tab2);
- expect(ctrl.tabs).toEqual([tab1, tab2]);
- });
-
- it('should select the first one', function() {
- var tab1 = mockTab(), tab2 = mockTab();
-
- ctrl.addTab(tab1);
- expect(tab1.active).toBe(true);
-
- ctrl.addTab(tab2);
- expect(tab1.active).toBe(true);
- });
-
- it('should not select first active === false tab as selected', function() {
- var tab = mockTab(false);
-
- ctrl.addTab(tab);
- expect(tab.active).toBe(false);
- });
-
- it('should select a tab added that\'s already active', function() {
- var tab1 = mockTab(), tab2 = mockTab(true);
- ctrl.addTab(tab1);
- expect(tab1.active).toBe(true);
-
- ctrl.addTab(tab2);
- expect(tab1.active).toBe(false);
- expect(tab2.active).toBe(true);
- });
- });
- });
-
- describe('remove', function() {
- it('should remove title tabs when elements are destroyed and change selection', inject(function($controller, $compile, $rootScope) {
- scope = $rootScope.$new();
- elm = $compile('<uib-tabset><uib-tab heading="1">Hello</uib-tab><uib-tab ng-repeat="i in list" heading="tab {{i}}">content {{i}}</uib-tab></uib-tabset>')(scope);
- scope.$apply();
-
- expectTitles(['1']);
- expectContents(['Hello']);
-
- scope.$apply('list = [1,2,3]');
- expectTitles(['1', 'tab 1', 'tab 2', 'tab 3']);
- expectContents(['Hello', 'content 1', 'content 2', 'content 3']);
-
- // Select last tab
- titles().find('a').eq(3).click();
- expect(contents().eq(3)).toHaveClass('active');
- expect(titles().eq(3)).toHaveClass('active');
-
- // Remove last tab
- scope.$apply('list = [1,2]');
- expectTitles(['1', 'tab 1', 'tab 2']);
- expectContents(['Hello', 'content 1', 'content 2']);
-
- // "tab 2" is now selected
- expect(titles().eq(2)).toHaveClass('active');
- expect(contents().eq(2)).toHaveClass('active');
-
- // Select 2nd tab ("tab 1")
- titles().find('a').eq(1).click();
- expect(titles().eq(1)).toHaveClass('active');
- expect(contents().eq(1)).toHaveClass('active');
-
- // Remove 2nd tab
- scope.$apply('list = [2]');
- expectTitles(['1', 'tab 2']);
- expectContents(['Hello', 'content 2']);
-
- // New 2nd tab is now selected
- expect(titles().eq(1)).toHaveClass('active');
- expect(contents().eq(1)).toHaveClass('active');
- }));
-
- it('should not select tabs when being destroyed', inject(function($controller, $compile, $rootScope) {
- var selectList = [],
- deselectList = [],
- getTab = function(active) {
- return {
- active: active,
- select : function() {
- selectList.push('select');
- },
- deselect : function() {
- deselectList.push('deselect');
- }
- };
- };
-
- scope = $rootScope.$new();
- scope.tabs = [
- getTab(true),
- getTab(false)
- ];
- elm = $compile([
- '<uib-tabset>',
- ' <uib-tab ng-repeat="t in tabs" active="t.active" select="t.select()" deselect="t.deselect()">',
- ' <uib-tab-heading><b>heading</b> {{index}}</uib-tab-heading>',
- ' content {{$index}}',
- ' </uib-tab>',
- '</uib-tabset>'
- ].join('\n'))(scope);
- scope.$apply();
-
- // The first tab is selected the during the initial $digest.
- expect(selectList.length).toEqual(1);
-
- // Destroy the tabs - we should not trigger selection/deselection any more.
- scope.$destroy();
- expect(selectList.length).toEqual(1);
- expect(deselectList.length).toEqual(0);
- }));
- });
-
- describe('disable', function() {
- beforeEach(inject(function($compile, $rootScope) {
- scope = $rootScope.$new();
-
- function makeTab(disable) {
- return {
- active: false,
- select: jasmine.createSpy(),
- disable: disable
- };
- }
- scope.tabs = [
- makeTab(false), makeTab(true), makeTab(false), makeTab(true)
- ];
- elm = $compile([
- '<uib-tabset>',
- ' <uib-tab ng-repeat="t in tabs" active="t.active" select="t.select()" disable="t.disable">',
- ' <uib-tab-heading><b>heading</b> {{index}}</uib-tab-heading>',
- ' content {{$index}}',
- ' </uib-tab>',
- '</uib-tabset>'
- ].join('\n'))(scope);
- scope.$apply();
- }));
-
- function expectTabActive(activeTab) {
- var _titles = titles();
- angular.forEach(scope.tabs, function(tab, i) {
- if (activeTab === tab) {
- expect(tab.active).toBe(true);
- expect(tab.select.calls.count()).toBe( (tab.disable) ? 0 : 1 );
- expect(_titles.eq(i)).toHaveClass('active');
- expect(contents().eq(i).text().trim()).toBe('content ' + i);
- expect(contents().eq(i)).toHaveClass('active');
- } else {
- expect(tab.active).toBe(false);
- expect(_titles.eq(i)).not.toHaveClass('active');
- }
- });
- }
-
- it('should not switch active when clicking on title', function() {
- titles().eq(2).find('a').click();
- expectTabActive(scope.tabs[2]);
-
- titles().eq(3).find('a').click();
- expectTabActive(scope.tabs[2]);
- });
-
- it('should toggle between states', function() {
- expect(titles().eq(3)).toHaveClass('disabled');
- scope.$apply('tabs[3].disable = false');
- expect(titles().eq(3)).not.toHaveClass('disabled');
-
- expect(titles().eq(2)).not.toHaveClass('disabled');
- scope.$apply('tabs[2].disable = true');
- expect(titles().eq(2)).toHaveClass('disabled');
- });
- });
-
- describe('vertical', function() {
- beforeEach(inject(function($compile, $rootScope) {
- scope = $rootScope.$new();
- scope.vertical = true;
- elm = $compile('<uib-tabset vertical="vertical"></uib-tabset>')(scope);
- scope.$apply();
- }));
-
- it('to stack tabs', function() {
- expect(elm.find('ul.nav-tabs')).toHaveClass('nav-stacked');
- });
- });
-
- describe('justified', function() {
- beforeEach(inject(function($compile, $rootScope) {
- scope = $rootScope.$new();
- scope.justified = true;
- elm = $compile('<uib-tabset justified="justified"></uib-tabset>')(scope);
- scope.$apply();
- }));
-
- it('to justify tabs', function() {
- expect(elm.find('ul.nav-tabs')).toHaveClass('nav-justified');
- });
- });
-
- describe('type', function() {
- beforeEach(inject(function($compile, $rootScope) {
- scope = $rootScope.$new();
- scope.navType = 'pills';
-
- elm = $compile('<uib-tabset type="{{navType}}"></uib-tabset>')(scope);
- scope.$apply();
- }));
-
- it('to show pills', function() {
- expect(elm.find('ul')).toHaveClass('nav-pills');
- expect(elm.find('ul')).not.toHaveClass('nav-tabs');
- });
- });
-
- //https://github.com/angular-ui/bootstrap/issues/524
- describe('child compilation', function() {
- var elm;
- beforeEach(inject(function($compile, $rootScope) {
- elm = $compile('<uib-tabset><uib-tab><div></div></uib-tab></uib-tabset></div>')($rootScope.$new());
- $rootScope.$apply();
- }));
-
- it('should hookup the tab\'s children to the tab with $compile', function() {
- var tabChild = $('.tab-pane', elm).children().first();
- expect(tabChild.inheritedData('$uibTabsetController')).toBeTruthy();
- });
- });
-
- //https://github.com/angular-ui/bootstrap/issues/631
- describe('ng-options in content', function() {
- var elm;
- it('should render correct amount of options', inject(function($compile, $rootScope) {
- var scope = $rootScope.$new();
- elm = $compile('<uib-tabset><uib-tab><select ng-model="foo" ng-options="i for i in [1,2,3]"></uib-tab></uib-tabset>')(scope);
- scope.$apply();
-
- var select = elm.find('select');
- scope.$apply();
- expect(select.children().length).toBe(4);
- }));
- });
-
- //https://github.com/angular-ui/bootstrap/issues/599
- describe('ng-repeat in content', function() {
- var elm;
- it('should render ng-repeat', inject(function($compile, $rootScope) {
- var scope = $rootScope.$new();
- scope.tabs = [
- {title:'a', array:[1,2,3]},
- {title:'b', array:[2,3,4]},
- {title:'c', array:[3,4,5]}
- ];
- elm = $compile('<div><uib-tabset>' +
- '<uib-tab ng-repeat="tab in tabs" heading="{{tab.title}}">' +
- '<uib-tab-heading>{{$index}}</uib-tab-heading>' +
- '<span ng-repeat="a in tab.array">{{a}},</span>' +
- '</uib-tab>' +
- '</uib-tabset></div>')(scope);
- scope.$apply();
-
- var contents = elm.find('.tab-pane');
- expect(contents.eq(0).text().trim()).toEqual('1,2,3,');
- expect(contents.eq(1).text().trim()).toEqual('2,3,4,');
- expect(contents.eq(2).text().trim()).toEqual('3,4,5,');
- }));
- });
-
- //https://github.com/angular-ui/bootstrap/issues/783
- describe('nested tabs', function() {
- var elm;
- it('should render without errors', inject(function($compile, $rootScope) {
- var scope = $rootScope.$new();
- elm = $compile([
- '<div>',
- ' <uib-tabset class="tabbable">',
- ' <uib-tab heading="Tab 1">',
- ' <uib-tabset class="tabbable">',
- ' <uib-tab heading="Tab 1A">',
- ' </uib-tab>',
- ' </uib-tabset>',
- ' </uib-tab>',
- ' <uib-tab heading="Tab 2">',
- ' <uib-tabset class="tabbable">',
- ' <uib-tab heading="Tab 2A">',
- ' </uib-tab>',
- ' </uib-tabset>',
- ' </uib-tab>',
- ' </uib-tabset>',
- '</div>'
- ].join('\n'))(scope);
- scope.$apply();
-
- // 1 outside tabset, 2 nested tabsets
- expect(elm.find('.tabbable').length).toEqual(3);
- }));
-
- it('should render with the correct scopes', inject(function($compile, $rootScope) {
- var scope = $rootScope.$new();
- scope.tab1Text = 'abc';
- scope.tab1aText = '123';
- scope.tab1aHead = '123';
- scope.tab2aaText = '456';
- elm = $compile([
- '<div>',
- ' <uib-tabset class="tabbable">',
- ' <uib-tab heading="Tab 1">',
- ' <uib-tabset class="tabbable">',
- ' <uib-tab heading="{{ tab1aHead }}">',
- ' {{ tab1aText }}',
- ' </uib-tab>',
- ' </uib-tabset>',
- ' <span class="tab-1">{{ tab1Text }}</span>',
- ' </uib-tab>',
- ' <uib-tab heading="Tab 2">',
- ' <uib-tabset class="tabbable">',
- ' <uib-tab heading="Tab 2A">',
- ' <uib-tabset class="tabbable">',
- ' <uib-tab heading="Tab 2AA">',
- ' <span class="tab-2aa">{{ tab2aaText }}</span>',
- ' </uib-tab>',
- ' </uib-tabset>',
- ' </uib-tab>',
- ' </uib-tabset>',
- ' </uib-tab>',
- ' </uib-tabset>',
- '</div>'
- ].join('\n'))(scope);
- scope.$apply();
-
- var outsideTabset = elm.find('.tabbable').eq(0);
- var nestedTabset = outsideTabset.find('.tabbable');
-
- expect(elm.find('.tabbable').length).toEqual(4);
- expect(outsideTabset.find('.tab-pane').eq(0).find('.tab-1').text().trim()).toEqual(scope.tab1Text);
- expect(nestedTabset.find('.tab-pane').eq(0).text().trim()).toEqual(scope.tab1aText);
- expect(nestedTabset.find('ul.nav-tabs li').eq(0).text().trim()).toEqual(scope.tab1aHead);
- expect(nestedTabset.eq(2).find('.tab-pane').eq(0).find('.tab-2aa').text().trim()).toEqual(scope.tab2aaText);
- }));
-
- it('ng-repeat works with nested tabs', inject(function($compile, $rootScope) {
- var scope = $rootScope.$new();
- scope.tabs = [
- {
- tabs: [
- {
- content: 'tab1a'
- },
- {
- content: 'tab2a'
- }
- ],
- content: 'tab1'
- }
- ];
- elm = $compile([
- '<div>',
- ' <uib-tabset>',
- ' <uib-tab ng-repeat="tab in tabs">',
- ' <uib-tabset>',
- ' <uib-tab ng-repeat="innerTab in tab.tabs">',
- ' <span class="inner-tab-content">{{ innerTab.content }}</span>',
- ' </uib-tab>',
- ' </uib-tabset>',
- ' <span class="outer-tab-content">{{ tab.content }}</span>',
- ' </uib-tab>',
- ' </uib-tabset>',
- '</div>'
- ].join('\n'))(scope);
- scope.$apply();
-
- expect(elm.find('.inner-tab-content').eq(0).text().trim()).toEqual(scope.tabs[0].tabs[0].content);
- expect(elm.find('.inner-tab-content').eq(1).text().trim()).toEqual(scope.tabs[0].tabs[1].content);
- expect(elm.find('.outer-tab-content').eq(0).text().trim()).toEqual(scope.tabs[0].content);
- }));
- });
-});
-
-/* deprecation tests below */
-
-describe('tab deprecation', function() {
- beforeEach(module('ui.bootstrap.tabs'));
- beforeEach(module('template/tabs/tabset.html'));
- beforeEach(module('template/tabs/tab.html'));
-
- it('should suppress warning', function() {
- module(function($provide) {
- $provide.value('$tabsSuppressWarning', true);
- });
-
- inject(function($compile, $log, $rootScope) {
- spyOn($log, 'warn');
-
- var element =
- '<tabset>' +
- '<tab>' +
- '<tab-heading>Tab Heading One</tab-heading>' +
- '<div>Tab One Contents</div>' +
- '</tab>' +
- '<tab heading="Tab Heading Two">' +
- '<div>Tab Two Contents</div>' +
- '</tab>' +
- '</tabset>';
- $compile(element)($rootScope);
- $rootScope.$digest();
- expect($log.warn.calls.count()).toBe(0);
- });
- });
-
- it('should give warning by default', inject(function($templateCache, $compile, $log, $rootScope) {
- spyOn($log, 'warn');
-
- var tabSetTemplate =
- '<div>' +
- '<ul class="nav nav-{{type || \'tabs\'}}" ng-class="{\'nav-stacked\': vertical, \'nav-justified\': justified}" ng-transclude></ul>' +
- '<div class="tab-content">' +
- '<div class="tab-pane" ng-repeat="tab in tabs" ng-class="{active: tab.active}" tab-content-transclude="tab"></div>' +
- '</div>' +
- '</div>';
- $templateCache.put('template/tabs/tabset.html', tabSetTemplate);
-
- var tabTemplate =
- '<li ng-class="{active: active, disabled: disabled}">' +
- '<a href ng-click="select()" tab-heading-transclude>{{heading}}</a>' +
- '</li>';
- $templateCache.put('template/tabs/tab.html', tabTemplate);
-
- var element =
- '<tabset>' +
- '<tab>' +
- '<tab-heading>Tab Heading One</tab-heading>' +
- '<div>Tab One Contents</div>' +
- '</tab>' +
- '</tabset>';
- $compile(element)($rootScope);
- $rootScope.$digest();
-
- expect($log.warn.calls.count()).toBe(5);
- expect($log.warn.calls.argsFor(0)).toEqual(['TabsetController is now deprecated. Use UibTabsetController instead.']);
- expect($log.warn.calls.argsFor(1)).toEqual(['tab-heading-transclude is now deprecated. Use uib-tab-heading-transclude instead.']);
- expect($log.warn.calls.argsFor(2)).toEqual(['tab is now deprecated. Use uib-tab instead.']);
- expect($log.warn.calls.argsFor(3)).toEqual(['tabset is now deprecated. Use uib-tabset instead.']);
- expect($log.warn.calls.argsFor(4)).toEqual(['tab-content-transclude is now deprecated. Use uib-tab-content-transclude instead.']);
- }));
-});
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/timepicker/docs/demo.html b/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/timepicker/docs/demo.html
deleted file mode 100644
index 8bf9e9f..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/timepicker/docs/demo.html
+++ /dev/null
@@ -1,24 +0,0 @@
-<div ng-controller="TimepickerDemoCtrl">
-
- <uib-timepicker ng-model="mytime" ng-change="changed()" hour-step="hstep" minute-step="mstep" show-meridian="ismeridian"></uib-timepicker>
-
- <pre class="alert alert-info">Time is: {{mytime | date:'shortTime' }}</pre>
-
- <div class="row">
- <div class="col-xs-6">
- Hours step is:
- <select class="form-control" ng-model="hstep" ng-options="opt for opt in options.hstep"></select>
- </div>
- <div class="col-xs-6">
- Minutes step is:
- <select class="form-control" ng-model="mstep" ng-options="opt for opt in options.mstep"></select>
- </div>
- </div>
-
- <hr>
-
- <button type="button" class="btn btn-info" ng-click="toggleMode()">12H / 24H</button>
- <button type="button" class="btn btn-default" ng-click="update()">Set to 14:00</button>
- <button type="button" class="btn btn-danger" ng-click="clear()">Clear</button>
-
-</div>
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/timepicker/docs/demo.js b/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/timepicker/docs/demo.js
deleted file mode 100644
index 8c9ade2..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/timepicker/docs/demo.js
+++ /dev/null
@@ -1,31 +0,0 @@
-angular.module('ui.bootstrap.demo').controller('TimepickerDemoCtrl', function ($scope, $log) {
- $scope.mytime = new Date();
-
- $scope.hstep = 1;
- $scope.mstep = 15;
-
- $scope.options = {
- hstep: [1, 2, 3],
- mstep: [1, 5, 10, 15, 25, 30]
- };
-
- $scope.ismeridian = true;
- $scope.toggleMode = function() {
- $scope.ismeridian = ! $scope.ismeridian;
- };
-
- $scope.update = function() {
- var d = new Date();
- d.setHours( 14 );
- d.setMinutes( 0 );
- $scope.mytime = d;
- };
-
- $scope.changed = function () {
- $log.log('Time changed to: ' + $scope.mytime);
- };
-
- $scope.clear = function() {
- $scope.mytime = null;
- };
-});
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/timepicker/docs/readme.md b/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/timepicker/docs/readme.md
deleted file mode 100644
index 4e2a231..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/timepicker/docs/readme.md
+++ /dev/null
@@ -1,56 +0,0 @@
-A lightweight & configurable timepicker directive.
-
-### Settings ###
-
-All settings can be provided as attributes in the `<uib-timepicker>` or globally configured through the `uibTimepickerConfig`.
-
- * `ng-model` <i class="glyphicon glyphicon-eye-open"></i>
- :
- The Date object that provides the time state.
-
- * `template-url` (Defaults: `template/timepicker/timepicker.html`) :
- Add the ability to override the template used on the component.
-
- * `hour-step` <i class="glyphicon glyphicon-eye-open"></i>
- _(Defaults: 1)_ :
- Number of hours to increase or decrease when using a button.
-
- * `minute-step` <i class="glyphicon glyphicon-eye-open"></i>
- _(Defaults: 1)_ :
- Number of minutes to increase or decrease when using a button.
-
- * `show-meridian` <i class="glyphicon glyphicon-eye-open"></i>
- _(Defaults: true)_ :
- Whether to display 12H or 24H mode.
-
- * `meridians`
- _(Defaults: null)_ :
- Meridian labels based on locale. To override you must supply an array like ['AM', 'PM'].
-
- * `readonly-input`
- _(Defaults: false)_ :
- Whether user can type inside the hours & minutes input.
-
- * `mousewheel`
- _(Defaults: true)_ :
- Whether user can scroll inside the hours & minutes input to increase or decrease it's values.
-
- * `arrowkeys`
- _(Defaults: true)_ :
- Whether user can use up/down arrowkeys inside the hours & minutes input to increase or decrease it's values.
-
- * `show-spinners`
- _(Defaults: true)_ :
- Shows spinner arrows above and below the inputs
-
- * `min`
- _(Defaults: undefined)_ :
- Minimum time a user can select
-
- * `max`
- _(Defaults: undefined)_ :
- Maximum time a user can select
-
- * `tabindex`
- _(Defaults: 0)_ :
- Sets tabindex for each control in timepicker
\ No newline at end of file
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/timepicker/test/timepicker.spec.js b/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/timepicker/test/timepicker.spec.js
deleted file mode 100644
index 8e13cea..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/timepicker/test/timepicker.spec.js
+++ /dev/null
@@ -1,1774 +0,0 @@
-describe('timepicker directive', function() {
- var $rootScope, $compile, $templateCache, element;
-
- beforeEach(module('ui.bootstrap.timepicker'));
- beforeEach(module('template/timepicker/timepicker.html'));
- beforeEach(inject(function(_$compile_, _$rootScope_, _$templateCache_) {
- $compile = _$compile_;
- $rootScope = _$rootScope_;
- $rootScope.time = newTime(14, 40);
- $templateCache = _$templateCache_;
-
- element = $compile('<uib-timepicker ng-model="time"></uib-timepicker>')($rootScope);
- $rootScope.$digest();
- }));
-
- function newTime(hours, minutes) {
- var time = new Date();
- time.setHours(hours, minutes, 0, 0);
- return time;
- }
-
- function getTimeState(withoutMeridian) {
- var inputs = element.find('input');
-
- var state = [];
- for (var i = 0; i < 2; i ++) {
- state.push(inputs.eq(i).val());
- }
- if (withoutMeridian !== true) {
- state.push(getMeridianButton().text());
- }
- return state;
- }
-
- function getModelState() {
- return [ $rootScope.time.getHours(), $rootScope.time.getMinutes() ];
- }
-
- function getArrow(isUp, tdIndex) {
- return element.find('tr').eq(isUp ? 0 : 2).find('td').eq(tdIndex).find('a').eq(0);
- }
-
- function getHoursButton(isUp) {
- return getArrow(isUp, 0);
- }
-
- function getMinutesButton(isUp) {
- return getArrow(isUp, 2);
- }
-
- function getMeridianButton() {
- return element.find('button').eq(0);
- }
-
- function doClick(button, n) {
- for (var i = 0, max = n || 1; i < max; i++) {
- button.click();
- $rootScope.$digest();
- }
- }
-
- function wheelThatMouse(delta) {
- var e = $.Event('mousewheel');
- e.wheelDelta = delta;
- return e;
- }
-
- function wheelThatOtherMouse(delta) {
- var e = $.Event('wheel');
- e.deltaY = delta;
- return e;
- }
-
- function keydown(key) {
- var e = $.Event('keydown');
- switch(key) {
- case 'left':
- e.which = 37;
- break;
- case 'up':
- e.which = 38;
- break;
- case 'right':
- e.which = 39;
- break;
- case 'down':
- e.which = 40;
- break;
- }
- return e;
- }
-
- it('contains three row & three input elements', function() {
- expect(element.find('tr').length).toBe(3);
- expect(element.find('input').length).toBe(2);
- expect(element.find('button').length).toBe(1);
- });
-
- it('has initially the correct time & meridian', function() {
- expect(getTimeState()).toEqual(['02', '40', 'PM']);
- expect(getModelState()).toEqual([14, 40]);
- });
-
- it('should be pristine', function() {
- expect(element.controller('ngModel').$pristine).toBe(true);
- });
-
- it('has `selected` current time when model is initially cleared', function() {
- $rootScope.time = null;
- element = $compile('<uib-timepicker ng-model="time"></uib-timepicker>')($rootScope);
- $rootScope.$digest();
-
- expect($rootScope.time).toBe(null);
- expect(getTimeState()).not.toEqual(['', '', '']);
- });
-
- it('changes inputs when model changes value', function() {
- $rootScope.time = newTime(11, 50);
- $rootScope.$digest();
- expect(getTimeState()).toEqual(['11', '50', 'AM']);
- expect(getModelState()).toEqual([11, 50]);
-
- $rootScope.time = newTime(16, 40);
- $rootScope.$digest();
- expect(getTimeState()).toEqual(['04', '40', 'PM']);
- expect(getModelState()).toEqual([16, 40]);
- });
-
- it('increases / decreases hours when arrows are clicked', function() {
- var up = getHoursButton(true);
- var down = getHoursButton(false);
-
- doClick(up);
- expect(getTimeState()).toEqual(['03', '40', 'PM']);
- expect(getModelState()).toEqual([15, 40]);
-
- doClick(down);
- expect(getTimeState()).toEqual(['02', '40', 'PM']);
- expect(getModelState()).toEqual([14, 40]);
-
- doClick(down);
- expect(getTimeState()).toEqual(['01', '40', 'PM']);
- expect(getModelState()).toEqual([13, 40]);
- });
-
- it('increase / decreases minutes by default step when arrows are clicked', function() {
- var up = getMinutesButton(true);
- var down = getMinutesButton(false);
-
- doClick(up);
- expect(getTimeState()).toEqual(['02', '41', 'PM']);
- expect(getModelState()).toEqual([14, 41]);
-
- doClick(down);
- expect(getTimeState()).toEqual(['02', '40', 'PM']);
- expect(getModelState()).toEqual([14, 40]);
-
- doClick(down);
- expect(getTimeState()).toEqual(['02', '39', 'PM']);
- expect(getModelState()).toEqual([14, 39]);
- });
-
- it('meridian button has correct type', function() {
- var button = getMeridianButton();
- expect(button.attr('type')).toBe('button');
- });
-
- it('toggles meridian when button is clicked', function() {
- var button = getMeridianButton();
-
- doClick(button);
- expect(getTimeState()).toEqual(['02', '40', 'AM']);
- expect(getModelState()).toEqual([2, 40]);
-
- doClick(button);
- expect(getTimeState()).toEqual(['02', '40', 'PM']);
- expect(getModelState()).toEqual([14, 40]);
-
- doClick(button);
- expect(getTimeState()).toEqual(['02', '40', 'AM']);
- expect(getModelState()).toEqual([2, 40]);
- });
-
- it('has minutes "connected" to hours', function() {
- var up = getMinutesButton(true);
- var down = getMinutesButton(false);
-
- doClick(up, 10);
- expect(getTimeState()).toEqual(['02', '50', 'PM']);
- expect(getModelState()).toEqual([14, 50]);
-
- doClick(up, 10);
- expect(getTimeState()).toEqual(['03', '00', 'PM']);
- expect(getModelState()).toEqual([15, 0]);
-
- doClick(up, 10);
- $rootScope.$digest();
- expect(getTimeState()).toEqual(['03', '10', 'PM']);
- expect(getModelState()).toEqual([15, 10]);
-
- doClick(down, 10);
- $rootScope.$digest();
- expect(getTimeState()).toEqual(['03', '00', 'PM']);
- expect(getModelState()).toEqual([15, 0]);
-
- doClick(down, 10);
- $rootScope.$digest();
- expect(getTimeState()).toEqual(['02', '50', 'PM']);
- expect(getModelState()).toEqual([14, 50]);
- });
-
- it('has hours "connected" to meridian', function() {
- var up = getHoursButton(true);
- var down = getHoursButton(false);
-
- // AM -> PM
- $rootScope.time = newTime(11, 0);
- $rootScope.$digest();
- expect(getTimeState()).toEqual(['11', '00', 'AM']);
- expect(getModelState()).toEqual([11, 0]);
-
- doClick(up);
- expect(getTimeState()).toEqual(['12', '00', 'PM']);
- expect(getModelState()).toEqual([12, 0]);
-
- doClick(up);
- expect(getTimeState()).toEqual(['01', '00', 'PM']);
- expect(getModelState()).toEqual([13, 0]);
-
- doClick(down);
- expect(getTimeState()).toEqual(['12', '00', 'PM']);
- expect(getModelState()).toEqual([12, 0]);
-
- doClick(down);
- expect(getTimeState()).toEqual(['11', '00', 'AM']);
- expect(getModelState()).toEqual([11, 0]);
-
- // PM -> AM
- $rootScope.time = newTime(23, 0);
- $rootScope.$digest();
- expect(getTimeState()).toEqual(['11', '00', 'PM']);
- expect(getModelState()).toEqual([23, 0]);
-
- doClick(up);
- expect(getTimeState()).toEqual(['12', '00', 'AM']);
- expect(getModelState()).toEqual([0, 0]);
-
- doClick(up);
- expect(getTimeState()).toEqual(['01', '00', 'AM']);
- expect(getModelState()).toEqual([01, 0]);
-
- doClick(down);
- expect(getTimeState()).toEqual(['12', '00', 'AM']);
- expect(getModelState()).toEqual([0, 0]);
-
- doClick(down);
- expect(getTimeState()).toEqual(['11', '00', 'PM']);
- expect(getModelState()).toEqual([23, 0]);
- });
-
- it('changes only the time part when hours change', function() {
- $rootScope.time = newTime(23, 50);
- $rootScope.$digest();
-
- var date = $rootScope.time.getDate();
- var up = getHoursButton(true);
- doClick(up);
-
- expect(getTimeState()).toEqual(['12', '50', 'AM']);
- expect(getModelState()).toEqual([0, 50]);
- expect(date).toEqual($rootScope.time.getDate());
- });
-
- it('changes only the time part when minutes change', function() {
- element = $compile('<uib-timepicker ng-model="time" minute-step="15"></uib-timepicker>')($rootScope);
- $rootScope.time = newTime(0, 0);
- $rootScope.$digest();
-
- var date = $rootScope.time.getDate();
- var up = getMinutesButton(true);
- doClick(up, 2);
- expect(getTimeState()).toEqual(['12', '30', 'AM']);
- expect(getModelState()).toEqual([0, 30]);
- expect(date).toEqual($rootScope.time.getDate());
-
- var down = getMinutesButton(false);
- doClick(down, 2);
- expect(getTimeState()).toEqual(['12', '00', 'AM']);
- expect(getModelState()).toEqual([0, 0]);
- expect(date).toEqual($rootScope.time.getDate());
-
- doClick(down, 2);
- expect(getTimeState()).toEqual(['11', '30', 'PM']);
- expect(getModelState()).toEqual([23, 30]);
- expect(date).toEqual($rootScope.time.getDate());
- });
-
- it('responds properly on "mousewheel" events', function() {
- var inputs = element.find('input');
- var hoursEl = inputs.eq(0), minutesEl = inputs.eq(1);
- var upMouseWheelEvent = wheelThatMouse(1);
- var downMouseWheelEvent = wheelThatMouse(-1);
-
- expect(getTimeState()).toEqual(['02', '40', 'PM']);
- expect(getModelState()).toEqual([14, 40]);
-
- // UP
- hoursEl.trigger( upMouseWheelEvent );
- $rootScope.$digest();
- expect(getTimeState()).toEqual(['03', '40', 'PM']);
- expect(getModelState()).toEqual([15, 40]);
-
- hoursEl.trigger( upMouseWheelEvent );
- $rootScope.$digest();
- expect(getTimeState()).toEqual(['04', '40', 'PM']);
- expect(getModelState()).toEqual([16, 40]);
-
- minutesEl.trigger( upMouseWheelEvent );
- $rootScope.$digest();
- expect(getTimeState()).toEqual(['04', '41', 'PM']);
- expect(getModelState()).toEqual([16, 41]);
-
- minutesEl.trigger( upMouseWheelEvent );
- $rootScope.$digest();
- expect(getTimeState()).toEqual(['04', '42', 'PM']);
- expect(getModelState()).toEqual([16, 42]);
-
- // DOWN
- minutesEl.trigger( downMouseWheelEvent );
- $rootScope.$digest();
- expect(getTimeState()).toEqual(['04', '41', 'PM']);
- expect(getModelState()).toEqual([16, 41]);
-
- minutesEl.trigger( downMouseWheelEvent );
- $rootScope.$digest();
- expect(getTimeState()).toEqual(['04', '40', 'PM']);
- expect(getModelState()).toEqual([16, 40]);
-
- hoursEl.trigger( downMouseWheelEvent );
- $rootScope.$digest();
- expect(getTimeState()).toEqual(['03', '40', 'PM']);
- expect(getModelState()).toEqual([15, 40]);
-
- hoursEl.trigger( downMouseWheelEvent );
- $rootScope.$digest();
- expect(getTimeState()).toEqual(['02', '40', 'PM']);
- expect(getModelState()).toEqual([14, 40]);
- });
-
- it('responds properly on "wheel" events', function() {
- var inputs = element.find('input');
- var hoursEl = inputs.eq(0), minutesEl = inputs.eq(1);
- var upMouseWheelEvent = wheelThatOtherMouse(-1);
- var downMouseWheelEvent = wheelThatOtherMouse(1);
-
- expect(getTimeState()).toEqual(['02', '40', 'PM']);
- expect(getModelState()).toEqual([14, 40]);
-
- // UP
- hoursEl.trigger( upMouseWheelEvent );
- $rootScope.$digest();
- expect(getTimeState()).toEqual(['03', '40', 'PM']);
- expect(getModelState()).toEqual([15, 40]);
-
- hoursEl.trigger( upMouseWheelEvent );
- $rootScope.$digest();
- expect(getTimeState()).toEqual(['04', '40', 'PM']);
- expect(getModelState()).toEqual([16, 40]);
-
- minutesEl.trigger( upMouseWheelEvent );
- $rootScope.$digest();
- expect(getTimeState()).toEqual(['04', '41', 'PM']);
- expect(getModelState()).toEqual([16, 41]);
-
- minutesEl.trigger( upMouseWheelEvent );
- $rootScope.$digest();
- expect(getTimeState()).toEqual(['04', '42', 'PM']);
- expect(getModelState()).toEqual([16, 42]);
-
- // DOWN
- minutesEl.trigger( downMouseWheelEvent );
- $rootScope.$digest();
- expect(getTimeState()).toEqual(['04', '41', 'PM']);
- expect(getModelState()).toEqual([16, 41]);
-
- minutesEl.trigger( downMouseWheelEvent );
- $rootScope.$digest();
- expect(getTimeState()).toEqual(['04', '40', 'PM']);
- expect(getModelState()).toEqual([16, 40]);
-
- hoursEl.trigger( downMouseWheelEvent );
- $rootScope.$digest();
- expect(getTimeState()).toEqual(['03', '40', 'PM']);
- expect(getModelState()).toEqual([15, 40]);
-
- hoursEl.trigger( downMouseWheelEvent );
- $rootScope.$digest();
- expect(getTimeState()).toEqual(['02', '40', 'PM']);
- expect(getModelState()).toEqual([14, 40]);
- });
-
- it('responds properly on "keydown" events', function() {
- var inputs = element.find('input');
- var hoursEl = inputs.eq(0), minutesEl = inputs.eq(1);
- var upKeydownEvent = keydown('up');
- var downKeydownEvent = keydown('down');
- var leftKeydownEvent = keydown('left');
-
- expect(getTimeState()).toEqual(['02', '40', 'PM']);
- expect(getModelState()).toEqual([14, 40]);
-
- // UP
- hoursEl.trigger( upKeydownEvent );
- $rootScope.$digest();
- expect(getTimeState()).toEqual(['03', '40', 'PM']);
- expect(getModelState()).toEqual([15, 40]);
-
- hoursEl.trigger( upKeydownEvent );
- $rootScope.$digest();
- expect(getTimeState()).toEqual(['04', '40', 'PM']);
- expect(getModelState()).toEqual([16, 40]);
-
- minutesEl.trigger( upKeydownEvent );
- $rootScope.$digest();
- expect(getTimeState()).toEqual(['04', '41', 'PM']);
- expect(getModelState()).toEqual([16, 41]);
-
- minutesEl.trigger( upKeydownEvent );
- $rootScope.$digest();
- expect(getTimeState()).toEqual(['04', '42', 'PM']);
- expect(getModelState()).toEqual([16, 42]);
-
- // DOWN
- minutesEl.trigger( downKeydownEvent );
- $rootScope.$digest();
- expect(getTimeState()).toEqual(['04', '41', 'PM']);
- expect(getModelState()).toEqual([16, 41]);
-
- minutesEl.trigger( downKeydownEvent );
- $rootScope.$digest();
- expect(getTimeState()).toEqual(['04', '40', 'PM']);
- expect(getModelState()).toEqual([16, 40]);
-
- hoursEl.trigger( downKeydownEvent );
- $rootScope.$digest();
- expect(getTimeState()).toEqual(['03', '40', 'PM']);
- expect(getModelState()).toEqual([15, 40]);
-
- hoursEl.trigger( downKeydownEvent );
- $rootScope.$digest();
- expect(getTimeState()).toEqual(['02', '40', 'PM']);
- expect(getModelState()).toEqual([14, 40]);
-
- // Other keydown
- hoursEl.trigger( leftKeydownEvent );
- $rootScope.$digest();
- expect(getTimeState()).toEqual(['02', '40', 'PM']);
- expect(getModelState()).toEqual([14, 40]);
-
- minutesEl.trigger( leftKeydownEvent );
- $rootScope.$digest();
- expect(getTimeState()).toEqual(['02', '40', 'PM']);
- expect(getModelState()).toEqual([14, 40]);
- });
-
- describe('attributes', function() {
- beforeEach(function() {
- $rootScope.hstep = 2;
- $rootScope.mstep = 30;
- $rootScope.time = newTime(14, 0);
- element = $compile('<uib-timepicker ng-model="time" hour-step="hstep" minute-step="mstep"></uib-timepicker>')($rootScope);
- $rootScope.$digest();
- });
-
- it('increases / decreases hours by configurable step', function() {
- var up = getHoursButton(true);
- var down = getHoursButton(false);
-
- expect(getTimeState()).toEqual(['02', '00', 'PM']);
- expect(getModelState()).toEqual([14, 0]);
-
- doClick(up);
- expect(getTimeState()).toEqual(['04', '00', 'PM']);
- expect(getModelState()).toEqual([16, 0]);
-
- doClick(down);
- expect(getTimeState()).toEqual(['02', '00', 'PM']);
- expect(getModelState()).toEqual([14, 0]);
-
- doClick(down);
- expect(getTimeState()).toEqual(['12', '00', 'PM']);
- expect(getModelState()).toEqual([12, 0]);
-
- // Change step
- $rootScope.hstep = 3;
- $rootScope.$digest();
-
- doClick(up);
- expect(getTimeState()).toEqual(['03', '00', 'PM']);
- expect(getModelState()).toEqual([15, 0]);
-
- doClick(down);
- expect(getTimeState()).toEqual(['12', '00', 'PM']);
- expect(getModelState()).toEqual([12, 0]);
- });
-
- it('increases / decreases minutes by configurable step', function() {
- var up = getMinutesButton(true);
- var down = getMinutesButton(false);
-
- doClick(up);
- expect(getTimeState()).toEqual(['02', '30', 'PM']);
- expect(getModelState()).toEqual([14, 30]);
-
- doClick(up);
- expect(getTimeState()).toEqual(['03', '00', 'PM']);
- expect(getModelState()).toEqual([15, 0]);
-
- doClick(down);
- expect(getTimeState()).toEqual(['02', '30', 'PM']);
- expect(getModelState()).toEqual([14, 30]);
-
- doClick(down);
- expect(getTimeState()).toEqual(['02', '00', 'PM']);
- expect(getModelState()).toEqual([14, 0]);
-
- // Change step
- $rootScope.mstep = 15;
- $rootScope.$digest();
-
- doClick(up);
- expect(getTimeState()).toEqual(['02', '15', 'PM']);
- expect(getModelState()).toEqual([14, 15]);
-
- doClick(down);
- expect(getTimeState()).toEqual(['02', '00', 'PM']);
- expect(getModelState()).toEqual([14, 0]);
-
- doClick(down);
- expect(getTimeState()).toEqual(['01', '45', 'PM']);
- expect(getModelState()).toEqual([13, 45]);
- });
-
- it('responds properly on "mousewheel" events with configurable steps', function() {
- var inputs = element.find('input');
- var hoursEl = inputs.eq(0), minutesEl = inputs.eq(1);
- var upMouseWheelEvent = wheelThatMouse(1);
- var downMouseWheelEvent = wheelThatMouse(-1);
-
- expect(getTimeState()).toEqual(['02', '00', 'PM']);
- expect(getModelState()).toEqual([14, 0]);
-
- // UP
- hoursEl.trigger( upMouseWheelEvent );
- $rootScope.$digest();
- expect(getTimeState()).toEqual(['04', '00', 'PM']);
- expect(getModelState()).toEqual([16, 0]);
-
- minutesEl.trigger( upMouseWheelEvent );
- $rootScope.$digest();
- expect(getTimeState()).toEqual(['04', '30', 'PM']);
- expect(getModelState()).toEqual([16, 30]);
-
- // DOWN
- minutesEl.trigger( downMouseWheelEvent );
- $rootScope.$digest();
- expect(getTimeState()).toEqual(['04', '00', 'PM']);
- expect(getModelState()).toEqual([16, 0]);
-
- hoursEl.trigger( downMouseWheelEvent );
- $rootScope.$digest();
- expect(getTimeState()).toEqual(['02', '00', 'PM']);
- expect(getModelState()).toEqual([14, 0]);
- });
-
- it('responds properly on "wheel" events with configurable steps', function() {
- var inputs = element.find('input');
- var hoursEl = inputs.eq(0), minutesEl = inputs.eq(1);
- var upMouseWheelEvent = wheelThatOtherMouse(-1);
- var downMouseWheelEvent = wheelThatOtherMouse(1);
-
- expect(getTimeState()).toEqual(['02', '00', 'PM']);
- expect(getModelState()).toEqual([14, 0]);
-
- // UP
- hoursEl.trigger( upMouseWheelEvent );
- $rootScope.$digest();
- expect(getTimeState()).toEqual(['04', '00', 'PM']);
- expect(getModelState()).toEqual([16, 0]);
-
- minutesEl.trigger( upMouseWheelEvent );
- $rootScope.$digest();
- expect(getTimeState()).toEqual(['04', '30', 'PM']);
- expect(getModelState()).toEqual([16, 30]);
-
- // DOWN
- minutesEl.trigger( downMouseWheelEvent );
- $rootScope.$digest();
- expect(getTimeState()).toEqual(['04', '00', 'PM']);
- expect(getModelState()).toEqual([16, 0]);
-
- hoursEl.trigger( downMouseWheelEvent );
- $rootScope.$digest();
- expect(getTimeState()).toEqual(['02', '00', 'PM']);
- expect(getModelState()).toEqual([14, 0]);
- });
-
- it('can handle strings as steps', function() {
- var upHours = getHoursButton(true);
- var upMinutes = getMinutesButton(true);
-
- expect(getTimeState()).toEqual(['02', '00', 'PM']);
- expect(getModelState()).toEqual([14, 0]);
-
- $rootScope.hstep = '4';
- $rootScope.mstep = '20';
- $rootScope.$digest();
-
- doClick(upHours);
- expect(getTimeState()).toEqual(['06', '00', 'PM']);
- expect(getModelState()).toEqual([18, 0]);
-
- doClick(upMinutes);
- expect(getTimeState()).toEqual(['06', '20', 'PM']);
- expect(getModelState()).toEqual([18, 20]);
- });
-
- });
-
- describe('12 / 24 hour mode', function() {
- beforeEach(function() {
- $rootScope.meridian = false;
- $rootScope.time = newTime(14, 10);
- element = $compile('<uib-timepicker ng-model="time" show-meridian="meridian"></uib-timepicker>')($rootScope);
- $rootScope.$digest();
- });
-
- function getMeridianTd() {
- return element.find('tr').eq(1).find('td').eq(3);
- }
-
- it('initially displays correct time when `show-meridian` is false', function() {
- expect(getTimeState(true)).toEqual(['14', '10']);
- expect(getModelState()).toEqual([14, 10]);
- expect(getMeridianTd()).toBeHidden();
- });
-
- it('toggles correctly between different modes', function() {
- expect(getTimeState(true)).toEqual(['14', '10']);
-
- $rootScope.meridian = true;
- $rootScope.$digest();
- expect(getTimeState()).toEqual(['02', '10', 'PM']);
- expect(getModelState()).toEqual([14, 10]);
- expect(getMeridianTd()).not.toBeHidden();
-
- $rootScope.meridian = false;
- $rootScope.$digest();
- expect(getTimeState(true)).toEqual(['14', '10']);
- expect(getModelState()).toEqual([14, 10]);
- expect(getMeridianTd()).toBeHidden();
- });
-
- it('handles correctly initially empty model on parent element', function() {
- $rootScope.time = null;
- element = $compile('<span ng-model="time"><uib-timepicker show-meridian="meridian"></uib-timepicker></span>')($rootScope);
- $rootScope.$digest();
-
- expect($rootScope.time).toBe(null);
- });
- });
-
- describe('`meridians` attribute', function() {
- beforeEach(inject(function() {
- $rootScope.meridiansArray = ['am', 'pm'];
- element = $compile('<uib-timepicker ng-model="time" meridians="meridiansArray"></uib-timepicker>')($rootScope);
- $rootScope.$digest();
- }));
-
- it('displays correctly', function() {
- expect(getTimeState()[2]).toBe('pm');
- });
-
- it('toggles correctly', function() {
- $rootScope.time = newTime(2, 40);
- $rootScope.$digest();
- expect(getTimeState()[2]).toBe('am');
- });
- });
-
- describe('`readonly-input` attribute', function() {
- beforeEach(inject(function() {
- $rootScope.meridiansArray = ['am', 'pm'];
- element = $compile('<uib-timepicker ng-model="time" readonly-input="true"></uib-timepicker>')($rootScope);
- $rootScope.$digest();
- }));
-
- it('should make inputs readonly', function() {
- var inputs = element.find('input');
- expect(inputs.eq(0).attr('readonly')).toBe('readonly');
- expect(inputs.eq(1).attr('readonly')).toBe('readonly');
- });
- });
-
- describe('setting timepickerConfig steps', function() {
- var originalConfig = {};
- beforeEach(inject(function(_$compile_, _$rootScope_, uibTimepickerConfig) {
- angular.extend(originalConfig, uibTimepickerConfig);
- uibTimepickerConfig.hourStep = 2;
- uibTimepickerConfig.minuteStep = 10;
- uibTimepickerConfig.showMeridian = false;
- element = $compile('<uib-timepicker ng-model="time"></uib-timepicker>')($rootScope);
- $rootScope.$digest();
- }));
- afterEach(inject(function(uibTimepickerConfig) {
- // return it to the original state
- angular.extend(uibTimepickerConfig, originalConfig);
- }));
-
- it('does not affect the initial value', function() {
- expect(getTimeState(true)).toEqual(['14', '40']);
- expect(getModelState()).toEqual([14, 40]);
- });
-
- it('increases / decreases hours with configured step', function() {
- var up = getHoursButton(true);
- var down = getHoursButton(false);
-
- doClick(up, 2);
- expect(getTimeState(true)).toEqual(['18', '40']);
- expect(getModelState()).toEqual([18, 40]);
-
- doClick(down, 3);
- expect(getTimeState(true)).toEqual(['12', '40']);
- expect(getModelState()).toEqual([12, 40]);
- });
-
- it('increases / decreases minutes with configured step', function() {
- var up = getMinutesButton(true);
- var down = getMinutesButton(false);
-
- doClick(up);
- expect(getTimeState(true)).toEqual(['14', '50']);
- expect(getModelState()).toEqual([14, 50]);
-
- doClick(down, 3);
- expect(getTimeState(true)).toEqual(['14', '20']);
- expect(getModelState()).toEqual([14, 20]);
- });
- });
-
- describe('setting timepickerConfig meridian labels', function() {
- var originalConfig = {};
- beforeEach(inject(function(_$compile_, _$rootScope_, uibTimepickerConfig) {
- angular.extend(originalConfig, uibTimepickerConfig);
- uibTimepickerConfig.meridians = ['π.μ.', 'μ.μ.'];
- uibTimepickerConfig.showMeridian = true;
- element = $compile('<uib-timepicker ng-model="time"></uib-timepicker>')($rootScope);
- $rootScope.$digest();
- }));
- afterEach(inject(function(uibTimepickerConfig) {
- // return it to the original state
- angular.extend(uibTimepickerConfig, originalConfig);
- }));
-
- it('displays correctly', function() {
- expect(getTimeState()).toEqual(['02', '40', 'μ.μ.']);
- expect(getModelState()).toEqual([14, 40]);
- });
-
- it('toggles correctly', function() {
- $rootScope.time = newTime(2, 40);
- $rootScope.$digest();
-
- expect(getTimeState()).toEqual(['02', '40', 'π.μ.']);
- expect(getModelState()).toEqual([2, 40]);
- });
- });
-
- describe('$formatter', function() {
- var ngModel,
- date;
-
- beforeEach(function() {
- ngModel = element.controller('ngModel');
- date = new Date('Mon Mar 23 2015 14:40:11 GMT-0700 (PDT)');
- });
-
- it('should have one formatter', function() {
- expect(ngModel.$formatters.length).toBe(1);
- });
-
- it('should convert a date to a new reference representing the same date', function() {
- expect(ngModel.$formatters[0](date)).toEqual(date);
- });
-
- it('should convert a valid date string to a date object', function() {
- expect(ngModel.$formatters[0]('Mon Mar 23 2015 14:40:11 GMT-0700 (PDT)')).toEqual(date);
- });
-
- it('should set falsy values as null', function() {
- expect(ngModel.$formatters[0](undefined)).toBe(null);
- expect(ngModel.$formatters[0](null)).toBe(null);
- expect(ngModel.$formatters[0]('')).toBe(null);
- expect(ngModel.$formatters[0](0)).toBe(null);
- expect(ngModel.$formatters[0](NaN)).toBe(null);
- });
- });
-
- describe('user input validation', function() {
- var changeInputValueTo;
-
- beforeEach(inject(function($sniffer) {
- changeInputValueTo = function(inputEl, value) {
- inputEl.val(value);
- inputEl.trigger($sniffer.hasEvent('input') ? 'input' : 'change');
- $rootScope.$digest();
- };
- }));
-
- function getHoursInputEl() {
- return element.find('input').eq(0);
- }
-
- function getMinutesInputEl() {
- return element.find('input').eq(1);
- }
-
- it('has initially the correct time & meridian', function() {
- expect(getTimeState()).toEqual(['02', '40', 'PM']);
- expect(getModelState()).toEqual([14, 40]);
- });
-
- it('updates hours & pads on input change & pads on blur', function() {
- var el = getHoursInputEl();
-
- changeInputValueTo(el, 5);
- expect(getTimeState()).toEqual(['5', '40', 'PM']);
- expect(getModelState()).toEqual([17, 40]);
-
- el.blur();
- expect(getTimeState()).toEqual(['05', '40', 'PM']);
- expect(getModelState()).toEqual([17, 40]);
- });
-
- it('updates minutes & pads on input change & pads on blur', function() {
- var el = getMinutesInputEl();
-
- changeInputValueTo(el, 9);
- expect(getTimeState()).toEqual(['02', '9', 'PM']);
- expect(getModelState()).toEqual([14, 9]);
-
- el.blur();
- expect(getTimeState()).toEqual(['02', '09', 'PM']);
- expect(getModelState()).toEqual([14, 9]);
- });
-
- it('clears model when input hours is invalid & alerts the UI', function() {
- var el = getHoursInputEl();
-
- changeInputValueTo(el, 'pizza');
- expect($rootScope.time).toBe(null);
- expect(el.parent().hasClass('has-error')).toBe(true);
- expect(element.hasClass('ng-invalid-time')).toBe(true);
-
- changeInputValueTo(el, 8);
- el.blur();
- $rootScope.$digest();
- expect(getTimeState()).toEqual(['08', '40', 'PM']);
- expect(getModelState()).toEqual([20, 40]);
- expect(el.parent().hasClass('has-error')).toBe(false);
- expect(element.hasClass('ng-invalid-time')).toBe(false);
- });
-
- it('clears model when input minutes is invalid & alerts the UI', function() {
- var el = getMinutesInputEl();
-
- changeInputValueTo(el, 'pizza');
- expect($rootScope.time).toBe(null);
- expect(el.parent().hasClass('has-error')).toBe(true);
- expect(element.hasClass('ng-invalid-time')).toBe(true);
-
- changeInputValueTo(el, 22);
- expect(getTimeState()).toEqual(['02', '22', 'PM']);
- expect(getModelState()).toEqual([14, 22]);
- expect(el.parent().hasClass('has-error')).toBe(false);
- expect(element.hasClass('ng-invalid-time')).toBe(false);
- });
-
- it('leaves view alone when hours are invalid and minutes are updated', function() {
- var hoursEl = getHoursInputEl(),
- minutesEl = getMinutesInputEl();
-
- changeInputValueTo(hoursEl, '25');
- hoursEl.blur();
- $rootScope.$digest();
- expect(getTimeState()).toEqual(['25', '40', 'PM']);
-
- changeInputValueTo(minutesEl, '2');
- minutesEl.blur();
- $rootScope.$digest();
- expect(getTimeState()).toEqual(['25', '2', 'PM']);
- });
-
- it('leaves view alone when minutes are invalid and hours are updated', function() {
- var hoursEl = getHoursInputEl(),
- minutesEl = getMinutesInputEl();
-
- changeInputValueTo(minutesEl, '61');
- minutesEl.blur();
- $rootScope.$digest();
- expect($rootScope.time).toBe(null);
- expect(getTimeState()).toEqual(['02', '61', 'PM']);
-
- changeInputValueTo(hoursEl, '2');
- hoursEl.blur();
- $rootScope.$digest();
- expect($rootScope.time).toBe(null);
- expect(getTimeState()).toEqual(['2', '61', 'PM']);
- });
-
- it('handles 12/24H mode change', function() {
- $rootScope.meridian = true;
- element = $compile('<uib-timepicker ng-model="time" show-meridian="meridian"></uib-timepicker>')($rootScope);
- $rootScope.$digest();
-
- var el = getHoursInputEl();
-
- changeInputValueTo(el, '16');
- expect($rootScope.time).toBe(null);
- expect(el.parent().hasClass('has-error')).toBe(true);
- expect(element.hasClass('ng-invalid-time')).toBe(true);
-
- $rootScope.meridian = false;
- $rootScope.$digest();
- expect(getTimeState(true)).toEqual(['16', '40']);
- expect(getModelState()).toEqual([16, 40]);
- expect(element.hasClass('ng-invalid-time')).toBe(false);
- });
-
- it('should have a default tabindex of 0', function() {
- element = $compile('<uib-timepicker ng-model="time"></uib-timepicker>')($rootScope);
- $rootScope.$digest();
-
- expect(element.isolateScope().tabindex).toBe(0);
- });
-
- it('should have the correct tabindex', function() {
- element = $compile('<uib-timepicker ng-model="time" tabindex="5"></uib-timepicker>')($rootScope);
- $rootScope.$digest();
-
- expect(element.attr('tabindex')).toBe(undefined);
- expect(element.isolateScope().tabindex).toBe('5');
- });
- });
-
- describe('when model is not a Date', function() {
- beforeEach(inject(function() {
- element = $compile('<uib-timepicker ng-model="time"></uib-timepicker>')($rootScope);
- }));
-
- it('should not be invalid when the model is null', function() {
- $rootScope.time = null;
- $rootScope.$digest();
- expect(element.hasClass('ng-invalid-time')).toBe(false);
- });
-
- it('should not be invalid when the model is undefined', function() {
- $rootScope.time = undefined;
- $rootScope.$digest();
- expect(element.hasClass('ng-invalid-time')).toBe(false);
- });
-
- it('should not be invalid when the model is a valid string date representation', function() {
- $rootScope.time = 'September 30, 2010 15:30:00';
- $rootScope.$digest();
- expect(element.hasClass('ng-invalid-time')).toBe(false);
- expect(getTimeState()).toEqual(['03', '30', 'PM']);
- });
-
- it('should be invalid when the model is not a valid string date representation', function() {
- $rootScope.time = 'pizza';
- $rootScope.$digest();
- expect(element.hasClass('ng-invalid-time')).toBe(true);
- });
-
- it('should return valid when the model becomes valid', function() {
- $rootScope.time = 'pizza';
- $rootScope.$digest();
- expect(element.hasClass('ng-invalid-time')).toBe(true);
-
- $rootScope.time = new Date();
- $rootScope.$digest();
- expect(element.hasClass('ng-invalid-time')).toBe(false);
- });
-
- it('should return valid when the model is cleared', function() {
- $rootScope.time = 'pizza';
- $rootScope.$digest();
- expect(element.hasClass('ng-invalid-time')).toBe(true);
-
- $rootScope.time = null;
- $rootScope.$digest();
- expect(element.hasClass('ng-invalid-time')).toBe(false);
- });
- });
-
- describe('use with `ng-required` directive', function() {
- beforeEach(inject(function() {
- $rootScope.time = null;
- element = $compile('<uib-timepicker ng-model="time" ng-required="true"></uib-timepicker>')($rootScope);
- $rootScope.$digest();
- }));
-
- it('should be invalid initially', function() {
- expect(element.hasClass('ng-invalid')).toBe(true);
- });
-
- it('should be valid if model has been specified', function() {
- $rootScope.time = new Date();
- $rootScope.$digest();
- expect(element.hasClass('ng-invalid')).toBe(false);
- });
- });
-
- describe('use with `ng-change` directive', function() {
- beforeEach(inject(function() {
- $rootScope.changeHandler = jasmine.createSpy('changeHandler');
- $rootScope.time = new Date();
- element = $compile('<uib-timepicker ng-model="time" ng-change="changeHandler()"></uib-timepicker>')($rootScope);
- $rootScope.$digest();
- }));
-
- it('should not be called initially', function() {
- expect($rootScope.changeHandler).not.toHaveBeenCalled();
- });
-
- it('should be called when hours / minutes buttons clicked', function() {
- var btn1 = getHoursButton(true);
- var btn2 = getMinutesButton(false);
-
- doClick(btn1, 2);
- doClick(btn2, 3);
- $rootScope.$digest();
- expect($rootScope.changeHandler.calls.count()).toBe(5);
- });
-
- it('should not be called when model changes programatically', function() {
- $rootScope.time = new Date();
- $rootScope.$digest();
- expect($rootScope.changeHandler).not.toHaveBeenCalled();
- });
- });
-
- describe('when used with min', function() {
- var changeInputValueTo;
- beforeEach(inject(function($sniffer) {
- element = $compile('<uib-timepicker ng-model="time" min="min"></uib-timepicker>')($rootScope);
- $rootScope.$digest();
- changeInputValueTo = function(inputEl, value) {
- inputEl.val(value);
- inputEl.trigger($sniffer.hasEvent('input') ? 'input' : 'change');
- $rootScope.$digest();
- };
- }));
-
- it('should not decrease hours when it would result in a time earlier than min', function() {
- var down = getHoursButton(false);
- var inputs = element.find('input');
- var hoursEl = inputs.eq(0);
- var downMouseWheelEvent = wheelThatMouse(-1);
- var downKeydownEvent = keydown('down');
-
- $rootScope.min = newTime(13, 41);
- $rootScope.$digest();
-
- expect(down.hasClass('disabled')).toBe(true);
-
- doClick(down);
- expect(getTimeState()).toEqual(['02', '40', 'PM']);
- expect(getModelState()).toEqual([14, 40]);
-
- hoursEl.trigger( downMouseWheelEvent );
- $rootScope.$digest();
- expect(getTimeState()).toEqual(['02', '40', 'PM']);
- expect(getModelState()).toEqual([14, 40]);
-
- hoursEl.trigger( downKeydownEvent );
- $rootScope.$digest();
- expect(getTimeState()).toEqual(['02', '40', 'PM']);
- expect(getModelState()).toEqual([14, 40]);
- });
-
- it('should decrease hours when it would not result in a time earlier than min', function() {
- var down = getHoursButton(false);
- var inputs = element.find('input');
- var hoursEl = inputs.eq(0);
- var downMouseWheelEvent = wheelThatMouse(-1);
- var downKeydownEvent = keydown('down');
-
- $rootScope.min = newTime(0, 0);
- $rootScope.$digest();
-
- expect(down.hasClass('disabled')).toBe(false);
-
- doClick(down);
- expect(getTimeState()).toEqual(['01', '40', 'PM']);
- expect(getModelState()).toEqual([13, 40]);
-
- hoursEl.trigger(downMouseWheelEvent);
- $rootScope.$digest();
- expect(getTimeState()).toEqual(['12', '40', 'PM']);
- expect(getModelState()).toEqual([12, 40]);
-
- hoursEl.trigger(downKeydownEvent);
- $rootScope.$digest();
- expect(getTimeState()).toEqual(['11', '40', 'AM']);
- expect(getModelState()).toEqual([11, 40]);
- });
-
- it('should not decrease minutes when it would result in a time ealier than min', function() {
- var down = getMinutesButton(false);
- var inputs = element.find('input');
- var minutesEl = inputs.eq(1);
- var downMouseWheelEvent = wheelThatMouse(-1);
- var downKeydownEvent = keydown('down');
-
- $rootScope.min = newTime(14, 40);
- $rootScope.$digest();
-
- expect(down.hasClass('disabled')).toBe(true);
-
- doClick(down);
- expect(getTimeState()).toEqual(['02', '40', 'PM']);
- expect(getModelState()).toEqual([14, 40]);
-
- minutesEl.trigger(downMouseWheelEvent);
- $rootScope.$digest();
- expect(getTimeState()).toEqual(['02', '40', 'PM']);
- expect(getModelState()).toEqual([14, 40]);
-
- minutesEl.trigger(downKeydownEvent);
- $rootScope.$digest();
- expect(getTimeState()).toEqual(['02', '40', 'PM']);
- expect(getModelState()).toEqual([14, 40]);
- });
-
- it('should decrease minutes when it would not result in a time ealier than min', function() {
- var down = getMinutesButton(false);
- var inputs = element.find('input');
- var minutesEl = inputs.eq(1);
- var downMouseWheelEvent = wheelThatMouse(-1);
- var downKeydownEvent = keydown('down');
-
- $rootScope.min = newTime(0, 0);
- $rootScope.$digest();
-
- expect(down.hasClass('disabled')).toBe(false);
-
- doClick(down);
- expect(getTimeState()).toEqual(['02', '39', 'PM']);
- expect(getModelState()).toEqual([14, 39]);
-
- minutesEl.trigger(downMouseWheelEvent);
- $rootScope.$digest();
- expect(getTimeState()).toEqual(['02', '38', 'PM']);
- expect(getModelState()).toEqual([14, 38]);
-
- minutesEl.trigger(downKeydownEvent);
- $rootScope.$digest();
- expect(getTimeState()).toEqual(['02', '37', 'PM']);
- expect(getModelState()).toEqual([14, 37]);
- });
-
- it('should not increase hours when time would rollover to a time earlier than min', function() {
- var up = getHoursButton(true);
- var inputs = element.find('input');
- var hoursEl = inputs.eq(0);
- var upMouseWheelEvent = wheelThatMouse(1);
- var upKeydownEvent = keydown('up');
-
- $rootScope.time = newTime(23, 59);
- $rootScope.min = newTime(13, 40);
- $rootScope.$digest();
-
- expect(up.hasClass('disabled')).toBe(true);
-
- doClick(up);
- expect(getTimeState()).toEqual(['11', '59', 'PM']);
- expect(getModelState()).toEqual([23, 59]);
-
- hoursEl.trigger(upMouseWheelEvent);
- $rootScope.$digest();
- expect(getTimeState()).toEqual(['11', '59', 'PM']);
- expect(getModelState()).toEqual([23, 59]);
-
- hoursEl.trigger(upKeydownEvent);
- $rootScope.$digest();
- expect(getTimeState()).toEqual(['11', '59', 'PM']);
- expect(getModelState()).toEqual([23, 59]);
- });
-
- it('should increase hours when time would rollover to a time not earlier than min', function() {
- var up = getHoursButton(true);
- var inputs = element.find('input');
- var hoursEl = inputs.eq(0);
- var upMouseWheelEvent = wheelThatMouse(1);
- var upKeydownEvent = keydown('up');
-
- $rootScope.min = newTime(0, 0);
-
- $rootScope.time = newTime(23, 59);
- $rootScope.$digest();
-
- expect(up.hasClass('disabled')).toBe(false);
-
- doClick(up);
- expect(getTimeState()).toEqual(['12', '59', 'AM']);
- expect(getModelState()).toEqual([0, 59]);
-
- $rootScope.time = newTime(23, 59);
- $rootScope.$digest();
-
- hoursEl.trigger(upMouseWheelEvent);
- $rootScope.$digest();
- expect(getTimeState()).toEqual(['12', '59', 'AM']);
- expect(getModelState()).toEqual([0, 59]);
-
- $rootScope.time = newTime(23, 59);
- $rootScope.$digest();
-
- hoursEl.trigger(upKeydownEvent);
- $rootScope.$digest();
- expect(getTimeState()).toEqual(['12', '59', 'AM']);
- expect(getModelState()).toEqual([0, 59]);
- });
-
-
- it('should not increase minutes when time would rollover to a time earlier than min', function() {
- var up = getMinutesButton(true);
- var inputs = element.find('input');
- var minutesEl = inputs.eq(1);
- var upMouseWheelEvent = wheelThatMouse(1);
- var upKeydownEvent = keydown('up');
-
- $rootScope.time = newTime(23, 59);
- $rootScope.min = newTime(13, 40);
- $rootScope.$digest();
-
- expect(up.hasClass('disabled')).toBe(true);
-
- doClick(up);
- expect(getTimeState()).toEqual(['11', '59', 'PM']);
- expect(getModelState()).toEqual([23, 59]);
-
- minutesEl.trigger(upMouseWheelEvent);
- $rootScope.$digest();
- expect(getTimeState()).toEqual(['11', '59', 'PM']);
- expect(getModelState()).toEqual([23, 59]);
-
- minutesEl.trigger(upKeydownEvent);
- $rootScope.$digest();
- expect(getTimeState()).toEqual(['11', '59', 'PM']);
- expect(getModelState()).toEqual([23, 59]);
- });
-
- it('should increase minutes when time would rollover to a time not earlier than min', function() {
- var up = getMinutesButton(true);
- var inputs = element.find('input');
- var minutesEl = inputs.eq(1);
- var upMouseWheelEvent = wheelThatMouse(1);
- var upKeydownEvent = keydown('up');
-
- $rootScope.min = newTime(0, 0);
-
- $rootScope.time = newTime(23, 59);
- $rootScope.$digest();
-
- expect(up.hasClass('disabled')).toBe(false);
-
- doClick(up);
- expect(getTimeState()).toEqual(['12', '00', 'AM']);
- expect(getModelState()).toEqual([0, 0]);
-
- $rootScope.time = newTime(23, 59);
- $rootScope.$digest();
-
- minutesEl.trigger(upMouseWheelEvent);
- $rootScope.$digest();
- expect(getTimeState()).toEqual(['12', '00', 'AM']);
- expect(getModelState()).toEqual([0, 0]);
-
- $rootScope.time = newTime(23, 59);
- $rootScope.$digest();
-
- minutesEl.trigger(upKeydownEvent);
- $rootScope.$digest();
- expect(getTimeState()).toEqual(['12', '00', 'AM']);
- expect(getModelState()).toEqual([0, 0]);
- });
-
- it('should not change meridian when it would result a in time earlier than min', function() {
- var button = getMeridianButton();
-
- $rootScope.min = newTime(2, 41);
- $rootScope.$digest();
-
- expect(button.hasClass('disabled')).toBe(true);
-
- doClick(button);
- expect(getTimeState()).toEqual(['02', '40', 'PM']);
- expect(getModelState()).toEqual([14, 40]);
- });
-
- it('should change meridian when it would not result in a time earlier than min', function() {
- var button = getMeridianButton();
-
- $rootScope.min = newTime(2, 39);
- $rootScope.$digest();
-
- expect(button.hasClass('disabled')).toBe(false);
-
- doClick(button);
- expect(getTimeState()).toEqual(['02', '40', 'AM']);
- expect(getModelState()).toEqual([2, 40]);
- });
-
- it('should return invalid when the hours are changes such that the time is earlier than min', function() {
- var inputs = element.find('input');
- var hoursEl = inputs.eq(0);
-
- $rootScope.min = newTime(14, 0);
- $rootScope.$digest();
-
- changeInputValueTo(hoursEl, 1);
- expect($rootScope.time).toBe(null);
- expect(hoursEl.parent().hasClass('has-error')).toBe(true);
- expect(element.hasClass('ng-invalid-time')).toBe(true);
- });
-
- it('should return valid when the hours are changes such that the time is not earlier than min', function() {
- var inputs = element.find('input');
- var hoursEl = inputs.eq(0);
-
- $rootScope.min = newTime(14, 41);
- $rootScope.$digest();
-
- changeInputValueTo(hoursEl, 3);
- expect(getTimeState()).toEqual(['3', '40', 'PM']);
- expect(getModelState()).toEqual([15, 40]);
- expect(hoursEl.parent().hasClass('has-error')).toBe(false);
- expect(element.hasClass('ng-invalid-time')).toBe(false);
- });
-
- it('should return invalid when the minutes are changes such that the time is earlier than min', function() {
- var inputs = element.find('input');
- var minutesEl = inputs.eq(1);
-
- $rootScope.min = newTime(14, 30);
- $rootScope.$digest();
-
- changeInputValueTo(minutesEl, 1);
- expect($rootScope.time).toBe(null);
- expect(minutesEl.parent().hasClass('has-error')).toBe(true);
- expect(element.hasClass('ng-invalid-time')).toBe(true);
- });
-
- it('should return valid when the minutes are changes such that the time is not earlier than min', function() {
- var inputs = element.find('input');
- var minutesEl = inputs.eq(1);
-
- $rootScope.min = newTime(14, 41);
- $rootScope.$digest();
-
- changeInputValueTo(minutesEl, 42);
- expect(getTimeState()).toEqual(['02', '42', 'PM']);
- expect(getModelState()).toEqual([14, 42]);
- expect(minutesEl.parent().hasClass('has-error')).toBe(false);
- expect(element.hasClass('ng-invalid-time')).toBe(false);
- });
- });
-
- describe('when used with max', function() {
- var changeInputValueTo;
- beforeEach(inject(function($sniffer) {
- element = $compile('<timepicker ng-model="time" max="max"></timepicker>')($rootScope);
- $rootScope.$digest();
- changeInputValueTo = function (inputEl, value) {
- inputEl.val(value);
- inputEl.trigger($sniffer.hasEvent('input') ? 'input' : 'change');
- $rootScope.$digest();
- };
- }));
-
- it('should not increase hours when it would result in a time later than max', function() {
- var up = getHoursButton(true);
- var inputs = element.find('input');
- var hoursEl = inputs.eq(0);
- var upMouseWheelEvent = wheelThatMouse(1);
- var upKeydownEvent = keydown('up');
-
- $rootScope.max = newTime(15, 39);
- $rootScope.$digest();
-
- expect(up.hasClass('disabled')).toBe(true);
-
- doClick(up);
- expect(getTimeState()).toEqual(['02', '40', 'PM']);
- expect(getModelState()).toEqual([14, 40]);
-
- hoursEl.trigger(upMouseWheelEvent);
- $rootScope.$digest();
- expect(getTimeState()).toEqual(['02', '40', 'PM']);
- expect(getModelState()).toEqual([14, 40]);
-
- hoursEl.trigger(upKeydownEvent);
- $rootScope.$digest();
- expect(getTimeState()).toEqual(['02', '40', 'PM']);
- expect(getModelState()).toEqual([14, 40]);
- });
-
- it('should increase hours when it would not result in a time later than max', function() {
- var up = getHoursButton(true);
- var inputs = element.find('input');
- var hoursEl = inputs.eq(0);
- var upMouseWheelEvent = wheelThatMouse(1);
- var upKeydownEvent = keydown('up');
-
- $rootScope.max = newTime(23, 59);
- $rootScope.$digest();
-
- expect(up.hasClass('disabled')).toBe(false);
-
- doClick(up);
- expect(getTimeState()).toEqual(['03', '40', 'PM']);
- expect(getModelState()).toEqual([15, 40]);
-
- hoursEl.trigger(upMouseWheelEvent);
- $rootScope.$digest();
- expect(getTimeState()).toEqual(['04', '40', 'PM']);
- expect(getModelState()).toEqual([16, 40]);
-
- hoursEl.trigger(upKeydownEvent);
- $rootScope.$digest();
- expect(getTimeState()).toEqual(['05', '40', 'PM']);
- expect(getModelState()).toEqual([17, 40]);
- });
-
- it('should not increase minutes when it would result in a time later than max', function() {
- var up = getMinutesButton(true);
- var inputs = element.find('input');
- var minutesEl = inputs.eq(1);
- var upMouseWheelEvent = wheelThatMouse(1);
- var upKeydownEvent = keydown('up');
-
- $rootScope.max = newTime(14, 40);
- $rootScope.$digest();
-
- expect(up.hasClass('disabled')).toBe(true);
-
- doClick(up);
- expect(getTimeState()).toEqual(['02', '40', 'PM']);
- expect(getModelState()).toEqual([14, 40]);
-
- minutesEl.trigger(upMouseWheelEvent);
- $rootScope.$digest();
- expect(getTimeState()).toEqual(['02', '40', 'PM']);
- expect(getModelState()).toEqual([14, 40]);
-
- minutesEl.trigger(upKeydownEvent);
- $rootScope.$digest();
- expect(getTimeState()).toEqual(['02', '40', 'PM']);
- expect(getModelState()).toEqual([14, 40]);
- });
-
- it('should increase minutes when it would not result in a time later than max', function() {
- var up = getMinutesButton(true);
- var inputs = element.find('input');
- var minutesEl = inputs.eq(1);
- var upMouseWheelEvent = wheelThatMouse(1);
- var upKeydownEvent = keydown('up');
-
- $rootScope.max = newTime(23, 59);
- $rootScope.$digest();
-
- expect(up.hasClass('disabled')).toBe(false);
-
- doClick(up);
- expect(getTimeState()).toEqual(['02', '41', 'PM']);
- expect(getModelState()).toEqual([14, 41]);
-
- minutesEl.trigger(upMouseWheelEvent);
- $rootScope.$digest();
- expect(getTimeState()).toEqual(['02', '42', 'PM']);
- expect(getModelState()).toEqual([14, 42]);
-
- minutesEl.trigger(upKeydownEvent);
- $rootScope.$digest();
- expect(getTimeState()).toEqual(['02', '43', 'PM']);
- expect(getModelState()).toEqual([14, 43]);
- });
-
- it('should not decrease hours when time would rollover to a time later than max', function() {
- var down = getHoursButton(false);
- var inputs = element.find('input');
- var hoursEl = inputs.eq(0);
- var downMouseWheelEvent = wheelThatMouse(-1);
- var downKeydownEvent = keydown('down');
-
- $rootScope.time = newTime(0, 0);
- $rootScope.max = newTime(13, 40);
- $rootScope.$digest();
-
- expect(down.hasClass('disabled')).toBe(true);
-
- doClick(down);
- expect(getTimeState()).toEqual(['12', '00', 'AM']);
- expect(getModelState()).toEqual([0, 0]);
-
- hoursEl.trigger(downMouseWheelEvent);
- $rootScope.$digest();
- expect(getTimeState()).toEqual(['12', '00', 'AM']);
- expect(getModelState()).toEqual([0, 0]);
-
- hoursEl.trigger(downKeydownEvent);
- $rootScope.$digest();
- expect(getTimeState()).toEqual(['12', '00', 'AM']);
- expect(getModelState()).toEqual([0, 0]);
- });
-
- it('should decrease hours when time would rollover to a time not later than max', function() {
- var down = getHoursButton(false);
- var inputs = element.find('input');
- var hoursEl = inputs.eq(0);
- var downMouseWheelEvent = wheelThatMouse(-1);
- var downKeydownEvent = keydown('down');
-
- $rootScope.max = newTime(23, 59);
-
- $rootScope.time = newTime(0, 0);
- $rootScope.$digest();
-
- expect(down.hasClass('disabled')).toBe(false);
-
- doClick(down);
- expect(getTimeState()).toEqual(['11', '00', 'PM']);
- expect(getModelState()).toEqual([23, 0]);
-
- $rootScope.time = newTime(0, 0);
- $rootScope.$digest();
-
- hoursEl.trigger(downMouseWheelEvent);
- $rootScope.$digest();
- expect(getTimeState()).toEqual(['11', '00', 'PM']);
- expect(getModelState()).toEqual([23, 0]);
-
- $rootScope.time = newTime(0, 0);
- $rootScope.$digest();
-
- hoursEl.trigger(downKeydownEvent);
- $rootScope.$digest();
- expect(getTimeState()).toEqual(['11', '00', 'PM']);
- expect(getModelState()).toEqual([23, 0]);
- });
-
- it('should not decrease minutes when time would rollover to a time later than max', function() {
- var down = getMinutesButton(false);
- var inputs = element.find('input');
- var minutesEl = inputs.eq(1);
- var downMouseWheelEvent = wheelThatMouse(-1);
- var downKeydownEvent = keydown('down');
-
- $rootScope.time = newTime(0, 0);
- $rootScope.max = newTime(13, 40);
- $rootScope.$digest();
-
- expect(down.hasClass('disabled')).toBe(true);
-
- doClick(down);
- expect(getTimeState()).toEqual(['12', '00', 'AM']);
- expect(getModelState()).toEqual([0, 0]);
-
- minutesEl.trigger(downMouseWheelEvent);
- $rootScope.$digest();
- expect(getTimeState()).toEqual(['12', '00', 'AM']);
- expect(getModelState()).toEqual([0, 0]);
-
- minutesEl.trigger(downKeydownEvent);
- $rootScope.$digest();
- expect(getTimeState()).toEqual(['12', '00', 'AM']);
- expect(getModelState()).toEqual([0, 0]);
- });
-
- it('should decrease minutes when time would rollover to a time not later than max', function() {
- var down = getMinutesButton(false);
- var inputs = element.find('input');
- var minutesEl = inputs.eq(1);
- var downMouseWheelEvent = wheelThatMouse(-1);
- var downKeydownEvent = keydown('down');
-
- $rootScope.max = newTime(23, 59);
-
- $rootScope.time = newTime(0, 0);
- $rootScope.$digest();
-
- expect(down.hasClass('disabled')).toBe(false);
-
- doClick(down);
- expect(getTimeState()).toEqual(['11', '59', 'PM']);
- expect(getModelState()).toEqual([23, 59]);
-
- $rootScope.time = newTime(0, 0);
- $rootScope.$digest();
-
- minutesEl.trigger(downMouseWheelEvent);
- $rootScope.$digest();
- expect(getTimeState()).toEqual(['11', '59', 'PM']);
- expect(getModelState()).toEqual([23, 59]);
-
- $rootScope.time = newTime(0, 0);
- $rootScope.$digest();
-
- minutesEl.trigger( downKeydownEvent );
- $rootScope.$digest();
- expect(getTimeState()).toEqual(['11', '59', 'PM']);
- expect(getModelState()).toEqual([23, 59]);
- });
-
- it('should not change meridian when it would result a in time later than max', function() {
- var button = getMeridianButton();
-
- $rootScope.time = newTime(2, 40);
- $rootScope.max = newTime(14, 39);
- $rootScope.$digest();
-
- expect(button.hasClass('disabled')).toBe(true);
-
- doClick(button);
- expect(getTimeState()).toEqual(['02', '40', 'AM']);
- expect(getModelState()).toEqual([2, 40]);
- });
-
- it('should change meridian when it would not result in a time later than max', function() {
- var button = getMeridianButton();
-
- $rootScope.time = newTime(2, 40);
- $rootScope.max = newTime(14, 41);
- $rootScope.$digest();
-
- expect(button.hasClass('disabled')).toBe(false);
-
- doClick(button);
- expect(getTimeState()).toEqual(['02', '40', 'PM']);
- expect(getModelState()).toEqual([14, 40]);
- });
-
- it('should return invalid when the hours are changes such that the time is later than max', function() {
- var inputs = element.find('input');
- var hoursEl = inputs.eq(0);
-
- $rootScope.max = newTime(14, 0);
- $rootScope.$digest();
-
- changeInputValueTo(hoursEl, 3);
- expect($rootScope.time).toBe(null);
- expect(hoursEl.parent().hasClass('has-error')).toBe(true);
- expect(element.hasClass('ng-invalid-time')).toBe(true);
- });
-
- it('should return valid when the hours are changes such that the time is not later than max', function() {
- var inputs = element.find('input');
- var hoursEl = inputs.eq(0);
-
- $rootScope.max = newTime(15, 41);
- $rootScope.$digest();
-
- changeInputValueTo(hoursEl, 3);
- expect(getTimeState()).toEqual(['3', '40', 'PM']);
- expect(getModelState()).toEqual([15, 40]);
- expect(hoursEl.parent().hasClass('has-error')).toBe(false);
- expect(element.hasClass('ng-invalid-time')).toBe(false);
- });
-
- it('should return invalid when the minutes are changes such that the time is later than max', function() {
- var inputs = element.find('input');
- var minutesEl = inputs.eq(1);
-
- $rootScope.max = newTime(14, 50);
- $rootScope.$digest();
-
- changeInputValueTo(minutesEl, 51);
- expect($rootScope.time).toBe(null);
- expect(minutesEl.parent().hasClass('has-error')).toBe(true);
- expect(element.hasClass('ng-invalid-time')).toBe(true);
- });
-
- it('should return valid when the minutes are changes such that the time is not later than max', function() {
- var inputs = element.find('input');
- var minutesEl = inputs.eq(1);
-
- $rootScope.max = newTime(14, 42);
- $rootScope.$digest();
-
- changeInputValueTo(minutesEl, 41);
- expect(getTimeState()).toEqual(['02', '41', 'PM']);
- expect(getModelState()).toEqual([14, 41]);
- expect(minutesEl.parent().hasClass('has-error')).toBe(false);
- expect(element.hasClass('ng-invalid-time')).toBe(false);
- });
- });
-
- describe('custom template and controllerAs', function() {
- it('should allow custom templates', function() {
- $templateCache.put('foo/bar.html', '<div>baz</div>');
-
- element = $compile('<uib-timepicker ng-model="time" template-url="foo/bar.html"></uib-timepicker>')($rootScope);
- $rootScope.$digest();
- expect(element[0].tagName.toLowerCase()).toBe('div');
- expect(element.html()).toBe('baz');
- });
-
- it('should expose the controller on the view', function() {
- $templateCache.put('template/timepicker/timepicker.html', '<div><div>{{timepicker.text}}</div></div>');
-
- element = $compile('<uib-timepicker ng-model="time"></uib-timepicker>')($rootScope);
- $rootScope.$digest();
-
- var ctrl = element.controller('uibTimepicker');
- expect(ctrl).toBeDefined();
-
- ctrl.text = 'foo';
- $rootScope.$digest();
-
- expect(element.html()).toBe('<div class="ng-binding">foo</div>');
- });
- });
-});
-
-/* Deprecation tests below */
-
-describe('timepicker deprecation', function() {
- beforeEach(module('ui.bootstrap.timepicker'));
- beforeEach(module('ngAnimateMock'));
- beforeEach(module('template/timepicker/timepicker.html'));
-
- it('should suppress warning', function() {
- module(function($provide) {
- $provide.value('$timepickerSuppressWarning', true);
- });
-
- inject(function($compile, $log, $rootScope) {
- spyOn($log, 'warn');
-
- $rootScope.time = new Date().setHours(14, 40, 0, 0);
- var element = '<timepicker ng-model="time"></timepicker>';
- element = $compile(element)($rootScope);
- $rootScope.$digest();
- expect($log.warn.calls.count()).toBe(0);
- });
- });
-
- it('should give warning by default', inject(function($compile, $log, $rootScope) {
- spyOn($log, 'warn');
-
- $rootScope.time = new Date().setHours(14, 40, 0, 0);
- var element = '<timepicker ng-model="time"></timepicker>';
- element = $compile(element)($rootScope);
- $rootScope.$digest();
-
- expect($log.warn.calls.count()).toBe(2);
- expect($log.warn.calls.argsFor(0)).toEqual(['TimepickerController is now deprecated. Use UibTimepickerController instead.']);
- expect($log.warn.calls.argsFor(1)).toEqual(['timepicker is now deprecated. Use uib-timepicker instead.']);
- }));
-});
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/timepicker/timepicker.js b/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/timepicker/timepicker.js
deleted file mode 100644
index 0c5173e..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/timepicker/timepicker.js
+++ /dev/null
@@ -1,426 +0,0 @@
-angular.module('ui.bootstrap.timepicker', [])
-
-.constant('uibTimepickerConfig', {
- hourStep: 1,
- minuteStep: 1,
- showMeridian: true,
- meridians: null,
- readonlyInput: false,
- mousewheel: true,
- arrowkeys: true,
- showSpinners: true
-})
-
-.controller('UibTimepickerController', ['$scope', '$element', '$attrs', '$parse', '$log', '$locale', 'uibTimepickerConfig', function($scope, $element, $attrs, $parse, $log, $locale, timepickerConfig) {
- var selected = new Date(),
- ngModelCtrl = { $setViewValue: angular.noop }, // nullModelCtrl
- meridians = angular.isDefined($attrs.meridians) ? $scope.$parent.$eval($attrs.meridians) : timepickerConfig.meridians || $locale.DATETIME_FORMATS.AMPMS;
-
- $scope.tabindex = angular.isDefined($attrs.tabindex) ? $attrs.tabindex : 0;
- $element.removeAttr('tabindex');
-
- this.init = function(ngModelCtrl_, inputs) {
- ngModelCtrl = ngModelCtrl_;
- ngModelCtrl.$render = this.render;
-
- ngModelCtrl.$formatters.unshift(function(modelValue) {
- return modelValue ? new Date(modelValue) : null;
- });
-
- var hoursInputEl = inputs.eq(0),
- minutesInputEl = inputs.eq(1);
-
- var mousewheel = angular.isDefined($attrs.mousewheel) ? $scope.$parent.$eval($attrs.mousewheel) : timepickerConfig.mousewheel;
- if (mousewheel) {
- this.setupMousewheelEvents(hoursInputEl, minutesInputEl);
- }
-
- var arrowkeys = angular.isDefined($attrs.arrowkeys) ? $scope.$parent.$eval($attrs.arrowkeys) : timepickerConfig.arrowkeys;
- if (arrowkeys) {
- this.setupArrowkeyEvents(hoursInputEl, minutesInputEl);
- }
-
- $scope.readonlyInput = angular.isDefined($attrs.readonlyInput) ? $scope.$parent.$eval($attrs.readonlyInput) : timepickerConfig.readonlyInput;
- this.setupInputEvents(hoursInputEl, minutesInputEl);
- };
-
- var hourStep = timepickerConfig.hourStep;
- if ($attrs.hourStep) {
- $scope.$parent.$watch($parse($attrs.hourStep), function(value) {
- hourStep = parseInt(value, 10);
- });
- }
-
- var minuteStep = timepickerConfig.minuteStep;
- if ($attrs.minuteStep) {
- $scope.$parent.$watch($parse($attrs.minuteStep), function(value) {
- minuteStep = parseInt(value, 10);
- });
- }
-
- var min;
- $scope.$parent.$watch($parse($attrs.min), function(value) {
- var dt = new Date(value);
- min = isNaN(dt) ? undefined : dt;
- });
-
- var max;
- $scope.$parent.$watch($parse($attrs.max), function(value) {
- var dt = new Date(value);
- max = isNaN(dt) ? undefined : dt;
- });
-
- $scope.noIncrementHours = function() {
- var incrementedSelected = addMinutes(selected, hourStep * 60);
- return incrementedSelected > max ||
- (incrementedSelected < selected && incrementedSelected < min);
- };
-
- $scope.noDecrementHours = function() {
- var decrementedSelected = addMinutes(selected, -hourStep * 60);
- return decrementedSelected < min ||
- (decrementedSelected > selected && decrementedSelected > max);
- };
-
- $scope.noIncrementMinutes = function() {
- var incrementedSelected = addMinutes(selected, minuteStep);
- return incrementedSelected > max ||
- (incrementedSelected < selected && incrementedSelected < min);
- };
-
- $scope.noDecrementMinutes = function() {
- var decrementedSelected = addMinutes(selected, -minuteStep);
- return decrementedSelected < min ||
- (decrementedSelected > selected && decrementedSelected > max);
- };
-
- $scope.noToggleMeridian = function() {
- if (selected.getHours() < 13) {
- return addMinutes(selected, 12 * 60) > max;
- } else {
- return addMinutes(selected, -12 * 60) < min;
- }
- };
-
- // 12H / 24H mode
- $scope.showMeridian = timepickerConfig.showMeridian;
- if ($attrs.showMeridian) {
- $scope.$parent.$watch($parse($attrs.showMeridian), function(value) {
- $scope.showMeridian = !!value;
-
- if (ngModelCtrl.$error.time) {
- // Evaluate from template
- var hours = getHoursFromTemplate(), minutes = getMinutesFromTemplate();
- if (angular.isDefined(hours) && angular.isDefined(minutes)) {
- selected.setHours(hours);
- refresh();
- }
- } else {
- updateTemplate();
- }
- });
- }
-
- // Get $scope.hours in 24H mode if valid
- function getHoursFromTemplate() {
- var hours = parseInt($scope.hours, 10);
- var valid = $scope.showMeridian ? (hours > 0 && hours < 13) : (hours >= 0 && hours < 24);
- if (!valid) {
- return undefined;
- }
-
- if ($scope.showMeridian) {
- if (hours === 12) {
- hours = 0;
- }
- if ($scope.meridian === meridians[1]) {
- hours = hours + 12;
- }
- }
- return hours;
- }
-
- function getMinutesFromTemplate() {
- var minutes = parseInt($scope.minutes, 10);
- return (minutes >= 0 && minutes < 60) ? minutes : undefined;
- }
-
- function pad(value) {
- return (angular.isDefined(value) && value.toString().length < 2) ? '0' + value : value.toString();
- }
-
- // Respond on mousewheel spin
- this.setupMousewheelEvents = function(hoursInputEl, minutesInputEl) {
- var isScrollingUp = function(e) {
- if (e.originalEvent) {
- e = e.originalEvent;
- }
- //pick correct delta variable depending on event
- var delta = (e.wheelDelta) ? e.wheelDelta : -e.deltaY;
- return (e.detail || delta > 0);
- };
-
- hoursInputEl.bind('mousewheel wheel', function(e) {
- $scope.$apply(isScrollingUp(e) ? $scope.incrementHours() : $scope.decrementHours());
- e.preventDefault();
- });
-
- minutesInputEl.bind('mousewheel wheel', function(e) {
- $scope.$apply(isScrollingUp(e) ? $scope.incrementMinutes() : $scope.decrementMinutes());
- e.preventDefault();
- });
-
- };
-
- // Respond on up/down arrowkeys
- this.setupArrowkeyEvents = function(hoursInputEl, minutesInputEl) {
- hoursInputEl.bind('keydown', function(e) {
- if (e.which === 38) { // up
- e.preventDefault();
- $scope.incrementHours();
- $scope.$apply();
- } else if (e.which === 40) { // down
- e.preventDefault();
- $scope.decrementHours();
- $scope.$apply();
- }
- });
-
- minutesInputEl.bind('keydown', function(e) {
- if (e.which === 38) { // up
- e.preventDefault();
- $scope.incrementMinutes();
- $scope.$apply();
- } else if (e.which === 40) { // down
- e.preventDefault();
- $scope.decrementMinutes();
- $scope.$apply();
- }
- });
- };
-
- this.setupInputEvents = function(hoursInputEl, minutesInputEl) {
- if ($scope.readonlyInput) {
- $scope.updateHours = angular.noop;
- $scope.updateMinutes = angular.noop;
- return;
- }
-
- var invalidate = function(invalidHours, invalidMinutes) {
- ngModelCtrl.$setViewValue(null);
- ngModelCtrl.$setValidity('time', false);
- if (angular.isDefined(invalidHours)) {
- $scope.invalidHours = invalidHours;
- }
- if (angular.isDefined(invalidMinutes)) {
- $scope.invalidMinutes = invalidMinutes;
- }
- };
-
- $scope.updateHours = function() {
- var hours = getHoursFromTemplate(),
- minutes = getMinutesFromTemplate();
-
- if (angular.isDefined(hours) && angular.isDefined(minutes)) {
- selected.setHours(hours);
- if (selected < min || selected > max) {
- invalidate(true);
- } else {
- refresh('h');
- }
- } else {
- invalidate(true);
- }
- };
-
- hoursInputEl.bind('blur', function(e) {
- if (!$scope.invalidHours && $scope.hours < 10) {
- $scope.$apply(function() {
- $scope.hours = pad($scope.hours);
- });
- }
- });
-
- $scope.updateMinutes = function() {
- var minutes = getMinutesFromTemplate(),
- hours = getHoursFromTemplate();
-
- if (angular.isDefined(minutes) && angular.isDefined(hours)) {
- selected.setMinutes(minutes);
- if (selected < min || selected > max) {
- invalidate(undefined, true);
- } else {
- refresh('m');
- }
- } else {
- invalidate(undefined, true);
- }
- };
-
- minutesInputEl.bind('blur', function(e) {
- if (!$scope.invalidMinutes && $scope.minutes < 10) {
- $scope.$apply(function() {
- $scope.minutes = pad($scope.minutes);
- });
- }
- });
-
- };
-
- this.render = function() {
- var date = ngModelCtrl.$viewValue;
-
- if (isNaN(date)) {
- ngModelCtrl.$setValidity('time', false);
- $log.error('Timepicker directive: "ng-model" value must be a Date object, a number of milliseconds since 01.01.1970 or a string representing an RFC2822 or ISO 8601 date.');
- } else {
- if (date) {
- selected = date;
- }
-
- if (selected < min || selected > max) {
- ngModelCtrl.$setValidity('time', false);
- $scope.invalidHours = true;
- $scope.invalidMinutes = true;
- } else {
- makeValid();
- }
- updateTemplate();
- }
- };
-
- // Call internally when we know that model is valid.
- function refresh(keyboardChange) {
- makeValid();
- ngModelCtrl.$setViewValue(new Date(selected));
- updateTemplate(keyboardChange);
- }
-
- function makeValid() {
- ngModelCtrl.$setValidity('time', true);
- $scope.invalidHours = false;
- $scope.invalidMinutes = false;
- }
-
- function updateTemplate(keyboardChange) {
- var hours = selected.getHours(), minutes = selected.getMinutes();
-
- if ($scope.showMeridian) {
- hours = (hours === 0 || hours === 12) ? 12 : hours % 12; // Convert 24 to 12 hour system
- }
-
- $scope.hours = keyboardChange === 'h' ? hours : pad(hours);
- if (keyboardChange !== 'm') {
- $scope.minutes = pad(minutes);
- }
- $scope.meridian = selected.getHours() < 12 ? meridians[0] : meridians[1];
- }
-
- function addMinutes(date, minutes) {
- var dt = new Date(date.getTime() + minutes * 60000);
- var newDate = new Date(date);
- newDate.setHours(dt.getHours(), dt.getMinutes());
- return newDate;
- }
-
- function addMinutesToSelected(minutes) {
- selected = addMinutes(selected, minutes);
- refresh();
- }
-
- $scope.showSpinners = angular.isDefined($attrs.showSpinners) ?
- $scope.$parent.$eval($attrs.showSpinners) : timepickerConfig.showSpinners;
-
- $scope.incrementHours = function() {
- if (!$scope.noIncrementHours()) {
- addMinutesToSelected(hourStep * 60);
- }
- };
-
- $scope.decrementHours = function() {
- if (!$scope.noDecrementHours()) {
- addMinutesToSelected(-hourStep * 60);
- }
- };
-
- $scope.incrementMinutes = function() {
- if (!$scope.noIncrementMinutes()) {
- addMinutesToSelected(minuteStep);
- }
- };
-
- $scope.decrementMinutes = function() {
- if (!$scope.noDecrementMinutes()) {
- addMinutesToSelected(-minuteStep);
- }
- };
-
- $scope.toggleMeridian = function() {
- if (!$scope.noToggleMeridian()) {
- addMinutesToSelected(12 * 60 * (selected.getHours() < 12 ? 1 : -1));
- }
- };
-}])
-
-.directive('uibTimepicker', function() {
- return {
- restrict: 'EA',
- require: ['uibTimepicker', '?^ngModel'],
- controller: 'UibTimepickerController',
- controllerAs: 'timepicker',
- replace: true,
- scope: {},
- templateUrl: function(element, attrs) {
- return attrs.templateUrl || 'template/timepicker/timepicker.html';
- },
- link: function(scope, element, attrs, ctrls) {
- var timepickerCtrl = ctrls[0], ngModelCtrl = ctrls[1];
-
- if (ngModelCtrl) {
- timepickerCtrl.init(ngModelCtrl, element.find('input'));
- }
- }
- };
-});
-
-/* Deprecated timepicker below */
-
-angular.module('ui.bootstrap.timepicker')
-
-.value('$timepickerSuppressWarning', false)
-
-.controller('TimepickerController', ['$scope', '$element', '$attrs', '$controller', '$log', '$timepickerSuppressWarning', function($scope, $element, $attrs, $controller, $log, $timepickerSuppressWarning) {
- if (!$timepickerSuppressWarning) {
- $log.warn('TimepickerController is now deprecated. Use UibTimepickerController instead.');
- }
-
- angular.extend(this, $controller('UibTimepickerController', {
- $scope: $scope,
- $element: $element,
- $attrs: $attrs
- }));
-}])
-
-.directive('timepicker', ['$log', '$timepickerSuppressWarning', function($log, $timepickerSuppressWarning) {
- return {
- restrict: 'EA',
- require: ['timepicker', '?^ngModel'],
- controller: 'TimepickerController',
- controllerAs: 'timepicker',
- replace: true,
- scope: {},
- templateUrl: function(element, attrs) {
- return attrs.templateUrl || 'template/timepicker/timepicker.html';
- },
- link: function(scope, element, attrs, ctrls) {
- if (!$timepickerSuppressWarning) {
- $log.warn('timepicker is now deprecated. Use uib-timepicker instead.');
- }
- var timepickerCtrl = ctrls[0], ngModelCtrl = ctrls[1];
-
- if (ngModelCtrl) {
- timepickerCtrl.init(ngModelCtrl, element.find('input'));
- }
- }
- };
-}]);
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/tooltip/docs/demo.html b/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/tooltip/docs/demo.html
deleted file mode 100644
index 795f365..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/tooltip/docs/demo.html
+++ /dev/null
@@ -1,69 +0,0 @@
-<div ng-controller="TooltipDemoCtrl">
- <div class="form-group">
- <label>Dynamic Tooltip Text</label>
- <input type="text" ng-model="dynamicTooltipText" class="form-control">
- </div>
- <div class="form-group">
- <label>Dynamic Tooltip Popup Text</label>
- <input type="text" ng-model="dynamicTooltip" class="form-control">
- </div>
- <p>
- Pellentesque <a href="#" uib-tooltip="{{dynamicTooltip}}">{{dynamicTooltipText}}</a>,
- sit amet venenatis urna cursus eget nunc scelerisque viverra mauris, in
- aliquam. Tincidunt lobortis feugiat vivamus at
- <a href="#" tooltip-placement="left" uib-tooltip="On the Left!">left</a> eget
- arcu dictum varius duis at consectetur lorem. Vitae elementum curabitur
- <a href="#" tooltip-placement="right" uib-tooltip="On the Right!">right</a>
- nunc sed velit dignissim sodales ut eu sem integer vitae. Turpis egestas
- <a href="#" tooltip-placement="bottom" uib-tooltip="On the Bottom!">bottom</a>
- pharetra convallis posuere morbi leo urna,
- <a href="#" tooltip-animation="false" uib-tooltip="I don't fade. :-(">fading</a>
- at elementum eu, facilisis sed odio morbi quis commodo odio. In cursus
- <a href="#" tooltip-popup-delay='1000' uib-tooltip='appears with delay'>show delay</a>
- turpis massa tincidunt dui ut. In cursus
- <a href="#" tooltip-popup-close-delay='1000' uib-tooltip='hides with delay'>hide delay</a>
- <a href="#" uib-tooltip-template="'myTooltipTemplate.html'">Custom template</a>
- nunc sed velit dignissim sodales ut eu sem integer vitae. Turpis egestas
- </p>
-
- <p>
- I can even contain HTML. <a href="#" uib-tooltip-html="htmlTooltip">Check me out!</a>
- </p>
-
- <p>
- <style>
- /* Specify styling for tooltip contents */
- .tooltip.customClass .tooltip-inner {
- color: #880000;
- background-color: #ffff66;
- box-shadow: 0 6px 12px rgba(0,0,0,.175);
- }
- /* Hide arrow */
- .tooltip.customClass .tooltip-arrow {
- display: none;
- }
- </style>
- I can have a custom class. <a href="#" uib-tooltip="I can have a custom class applied to me!" tooltip-class="customClass">Check me out!</a>
- </p>
-
- <form role="form">
- <div class="form-group">
- <label>Or use custom triggers, like focus: </label>
- <input type="text" value="Click me!" uib-tooltip="See? Now click away..." tooltip-trigger="focus" tooltip-placement="right" class="form-control" />
- </div>
-
- <div class="form-group" ng-class="{'has-error' : !inputModel}">
- <label>Disable tooltips conditionally:</label>
- <input type="text" ng-model="inputModel" class="form-control"
- placeholder="Hover over this for a tooltip until this is filled"
- uib-tooltip="Enter something in this input field to disable this tooltip"
- tooltip-placement="top"
- tooltip-trigger="mouseenter"
- tooltip-enable="!inputModel" />
- </div>
- </form>
-
- <script type="text/ng-template" id="myTooltipTemplate.html">
- <span>Special Tooltip with <strong>markup</strong> and {{ dynamicTooltipText }}</span>
- </script>
-</div>
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/tooltip/docs/demo.js b/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/tooltip/docs/demo.js
deleted file mode 100644
index 18c2794..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/tooltip/docs/demo.js
+++ /dev/null
@@ -1,5 +0,0 @@
-angular.module('ui.bootstrap.demo').controller('TooltipDemoCtrl', function ($scope, $sce) {
- $scope.dynamicTooltip = 'Hello, World!';
- $scope.dynamicTooltipText = 'dynamic';
- $scope.htmlTooltip = $sce.trustAsHtml('I\'ve been made <b>bold</b>!');
-});
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/tooltip/docs/readme.md b/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/tooltip/docs/readme.md
deleted file mode 100644
index 16d4cdb..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/tooltip/docs/readme.md
+++ /dev/null
@@ -1,80 +0,0 @@
-A lightweight, extensible directive for fancy tooltip creation. The tooltip
-directive supports multiple placements, optional transition animation, and more.
-
-There are three versions of the tooltip: `uib-tooltip`, `uib-tooltip-template`, and
-`uib-tooltip-html-unsafe`:
-
-- `uib-tooltip` takes text only and will escape any HTML provided.
-- `uib-tooltip-template` takes text that specifies the location of a template to
- use for the tooltip. Note that this needs to be wrapped in a tag.
-- `uib-tooltip-html` takes
- whatever HTML is provided and displays it in a tooltip; *The user is responsible for ensuring the
- content is safe to put into the DOM!*
-- `uib-tooltip-html-unsafe` -- deprecated in favour of `tooltip-html`
-
-The tooltip directives provide several optional attributes to control how they
-will display:
-
-- `tooltip-placement`: Where to place it? Defaults to "top", but also accepts
- "bottom", "left", "right".
-- `tooltip-animation`: Should it fade in and out? Defaults to "true".
-- `tooltip-popup-delay`: For how long should the user have to have the mouse
- over the element before the tooltip shows (in milliseconds)? Defaults to 0.
-- `tooltip-close-popup-delay`: For how long should the tooltip remain open
- after the close trigger event? Defaults to 0.
-- `tooltip-trigger`: What should trigger a show of the tooltip? Supports a space separated list of event names.
- Note: this attribute is no longer observable. See `tooltip-enable`.
-- `tooltip-enable`: Is it enabled? It will enable or disable the configured
- `tooltip-trigger`.
-- `tooltip-append-to-body`: Should the tooltip be appended to `$body` instead of
- the parent element?
-- `tooltip-class`: Custom class to be applied to the tooltip.
-- `tooltip-is-open` <i class="glyphicon glyphicon-eye-open"></i>
- _(Default: false)_:
- Whether to show the tooltip.
-
-The tooltip directives require the `$position` service.
-
-**Triggers**
-
-The following show triggers are supported out of the box, along with their
-provided hide triggers:
-
-- `mouseenter`: `mouseleave`
-- `click`: `click`
-- `focus`: `blur`
-- `none`: ``
-
-For any non-supported value, the trigger will be used to both show and hide the
-tooltip. Using the 'none' trigger will disable the internal trigger(s), one can
-then use the `tooltip-is-open` attribute exclusively to show and hide the tooltip.
-
-**$uibTooltipProvider**
-
-Through the `$uibTooltipProvider`, you can change the way tooltips and popovers
-behave by default; the attributes above always take precedence. The following
-methods are available:
-
-- `setTriggers(obj)`: Extends the default trigger mappings mentioned above
- with mappings of your own. E.g. `{ 'openTrigger': 'closeTrigger' }`.
-- `options(obj)`: Provide a set of defaults for certain tooltip and popover
- attributes. Currently supports 'placement', 'animation', 'popupDelay', and
- `appendToBody`. Here are the defaults:
-
- <pre>
- placement: 'top',
- animation: true,
- popupDelay: 0,
- popupCloseDelay: 500,
- appendToBody: false
- </pre>
-
-**Known issues**
-
-For Safari 7+ support, if you want to use the **focus** `tooltip-trigger`, you need to use an anchor tag with a tab index. For example:
-
-```
-<a tabindex="0" uib-tooltip="Test" tooltip-trigger="focus" class="btn btn-default">
- Click Me
-</a>
-```
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/tooltip/test/tooltip-template.spec.js b/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/tooltip/test/tooltip-template.spec.js
deleted file mode 100644
index ad1c973..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/tooltip/test/tooltip-template.spec.js
+++ /dev/null
@@ -1,146 +0,0 @@
-describe('tooltip template', function() {
- var elm,
- elmBody,
- scope,
- elmScope,
- tooltipScope;
-
- // load the popover code
- beforeEach(module('ui.bootstrap.tooltip'));
-
- // load the template
- beforeEach(module('template/tooltip/tooltip-template-popup.html'));
-
- beforeEach(inject(function($templateCache) {
- $templateCache.put('myUrl', [200, '<span>{{ myTemplateText }}</span>', {}]);
- }));
-
- beforeEach(inject(function($rootScope, $compile) {
- elmBody = angular.element(
- '<div><span uib-tooltip-template="templateUrl">Selector Text</span></div>'
- );
-
- scope = $rootScope;
- $compile(elmBody)(scope);
- scope.templateUrl = 'myUrl';
-
- scope.$digest();
- elm = elmBody.find('span');
- elmScope = elm.scope();
- tooltipScope = elmScope.$$childTail;
- }));
-
- function trigger(element, evt) {
- evt = new Event(evt);
-
- element[0].dispatchEvent(evt);
- element.scope().$$childTail.$digest();
- }
-
- it('should open on mouseenter', inject(function() {
- trigger(elm, 'mouseenter');
- expect(tooltipScope.isOpen).toBe(true);
-
- expect(elmBody.children().length).toBe(2);
- }));
-
- it('should not open on mouseenter if templateUrl is empty', inject(function() {
- scope.templateUrl = null;
- scope.$digest();
-
- trigger(elm, 'mouseenter');
- expect(tooltipScope.isOpen).toBe(false);
-
- expect(elmBody.children().length).toBe(1);
- }));
-
- it('should show updated text', inject(function() {
- scope.myTemplateText = 'some text';
-
- trigger(elm, 'mouseenter');
- expect(tooltipScope.isOpen).toBe(true);
- scope.$digest();
-
- expect(elmBody.children().eq(1).text().trim()).toBe('some text');
-
- scope.myTemplateText = 'new text';
- scope.$digest();
-
- expect(elmBody.children().eq(1).text().trim()).toBe('new text');
- }));
-
- it('should hide tooltip when template becomes empty', inject(function($timeout) {
- trigger(elm, 'mouseenter');
- expect(tooltipScope.isOpen).toBe(true);
-
- scope.templateUrl = '';
- scope.$digest();
-
- expect(tooltipScope.isOpen).toBe(false);
-
- $timeout.flush();
- expect(elmBody.children().length).toBe(1);
- }));
-});
-
-/* Deprecation tests below */
-
-describe('tooltip template deprecation', function() {
- beforeEach(module('ui.bootstrap.tooltip'));
- beforeEach(module('template/tooltip/tooltip-template-popup.html'));
-
- var elm, elmBody, elmScope, tooltipScope;
-
- function trigger(element, evt) {
- evt = new Event(evt);
-
- element[0].dispatchEvent(evt);
- element.scope().$$childTail.$digest();
- }
-
- it('should suppress warning', function() {
- module(function($provide) {
- $provide.value('$tooltipSuppressWarning', true);
- });
-
- inject(function($compile, $log, $rootScope, $templateCache) {
- spyOn($log, 'warn');
- $templateCache.put('myUrl', [200, '<span>{{ myTemplateText }}</span>', {}]);
- $rootScope.templateUrl = 'myUrl';
-
- elmBody = angular.element('<div><span tooltip-template="templateUrl">Selector Text</span></div>');
- $compile(elmBody)($rootScope);
- $rootScope.$digest();
- elm = elmBody.find('span');
- elmScope = elm.scope();
- tooltipScope = elmScope.$$childTail;
-
- trigger(elm, 'mouseenter');
-
- expect($log.warn.calls.count()).toBe(0);
- });
- });
-
- it('should give warning by default', inject(function($compile, $log, $rootScope, $templateCache) {
- spyOn($log, 'warn');
- $templateCache.put('myUrl', [200, '<span>{{ myTemplateText }}</span>', {}]);
- $rootScope.templateUrl = 'myUrl';
-
- var element = '<div><span tooltip-template="templateUrl">Selector Text</span></div>';
- element = $compile(element)($rootScope);
- $rootScope.$digest();
-
- elmBody = angular.element('<div><span tooltip-template="templateUrl">Selector Text</span></div>');
- $compile(elmBody)($rootScope);
- $rootScope.$digest();
- elm = elmBody.find('span');
- elmScope = elm.scope();
- tooltipScope = elmScope.$$childTail;
-
- trigger(elm, 'mouseenter');
-
- expect($log.warn.calls.count()).toBe(2);
- expect($log.warn.calls.argsFor(0)).toEqual(['$tooltip is now deprecated. Use $uibTooltip instead.']);
- expect($log.warn.calls.argsFor(1)).toEqual(['tooltip-template-popup is now deprecated. Use uib-tooltip-template-popup instead.']);
- }));
-});
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/tooltip/test/tooltip.spec.js b/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/tooltip/test/tooltip.spec.js
deleted file mode 100644
index bbc8efb..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/tooltip/test/tooltip.spec.js
+++ /dev/null
@@ -1,1070 +0,0 @@
-describe('tooltip', function() {
- var elm,
- elmBody,
- scope,
- elmScope,
- tooltipScope,
- $document;
-
- // load the tooltip code
- beforeEach(module('ui.bootstrap.tooltip'));
-
- // load the template
- beforeEach(module('template/tooltip/tooltip-popup.html'));
-
- beforeEach(inject(function($rootScope, $compile, _$document_) {
- elmBody = angular.element(
- '<div><span uib-tooltip="tooltip text" tooltip-animation="false">Selector Text</span></div>'
- );
-
- $document = _$document_;
- scope = $rootScope;
- $compile(elmBody)(scope);
- scope.$digest();
- elm = elmBody.find('span');
- elmScope = elm.scope();
- tooltipScope = elmScope.$$childTail;
- }));
-
- function trigger(element, evt) {
- evt = new Event(evt);
-
- element[0].dispatchEvent(evt);
- element.scope().$$childTail.$digest();
- }
-
- it('should not be open initially', inject(function() {
- expect(tooltipScope.isOpen).toBe(false);
-
- // We can only test *that* the tooltip-popup element wasn't created as the
- // implementation is templated and replaced.
- expect(elmBody.children().length).toBe(1);
- }));
-
- it('should open on mouseenter', inject(function() {
- trigger(elm, 'mouseenter');
- expect(tooltipScope.isOpen).toBe(true);
-
- // We can only test *that* the tooltip-popup element was created as the
- // implementation is templated and replaced.
- expect(elmBody.children().length).toBe(2);
- }));
-
- it('should close on mouseleave', inject(function() {
- trigger(elm, 'mouseenter');
- trigger(elm, 'mouseleave');
- expect(tooltipScope.isOpen).toBe(false);
- }));
-
- it('should not animate on animation set to false', inject(function() {
- expect(tooltipScope.animation).toBe(false);
- }));
-
- it('should have default placement of "top"', inject(function() {
- trigger(elm, 'mouseenter');
- expect(tooltipScope.placement).toBe('top');
- }));
-
- it('should allow specification of placement', inject(function($compile) {
- elm = $compile(angular.element(
- '<span uib-tooltip="tooltip text" tooltip-placement="bottom">Selector Text</span>'
- ))(scope);
- scope.$apply();
- elmScope = elm.scope();
- tooltipScope = elmScope.$$childTail;
-
- trigger(elm, 'mouseenter');
- expect(tooltipScope.placement).toBe('bottom');
- }));
-
- it('should update placement dynamically', inject(function($compile, $timeout) {
- scope.place = 'bottom';
- elm = $compile(angular.element(
- '<span uib-tooltip="tooltip text" tooltip-placement="{{place}}">Selector Text</span>'
- ))(scope);
- scope.$apply();
- elmScope = elm.scope();
- tooltipScope = elmScope.$$childTail;
-
- trigger(elm, 'mouseenter');
- expect(tooltipScope.placement).toBe('bottom');
-
- scope.place = 'right';
- scope.$digest();
- $timeout.flush();
- expect(tooltipScope.placement).toBe('right');
- }));
-
- it('should work inside an ngRepeat', inject(function($compile) {
- elm = $compile(angular.element(
- '<ul>'+
- '<li ng-repeat="item in items">'+
- '<span uib-tooltip="{{item.tooltip}}">{{item.name}}</span>'+
- '</li>'+
- '</ul>'
- ))(scope);
-
- scope.items = [
- { name: 'One', tooltip: 'First Tooltip' }
- ];
-
- scope.$digest();
-
- var tt = angular.element(elm.find('li > span')[0]);
- trigger(tt, 'mouseenter');
-
- expect(tt.text()).toBe(scope.items[0].name);
-
- tooltipScope = tt.scope().$$childTail;
- expect(tooltipScope.content).toBe(scope.items[0].tooltip);
-
- trigger(tt, 'mouseleave');
- expect(tooltipScope.isOpen).toBeFalsy();
- }));
-
- it('should show correct text when in an ngRepeat', inject(function($compile, $timeout) {
- elm = $compile(angular.element(
- '<ul>'+
- '<li ng-repeat="item in items">'+
- '<span uib-tooltip="{{item.tooltip}}">{{item.name}}</span>'+
- '</li>'+
- '</ul>'
- ))(scope);
-
- scope.items = [
- { name: 'One', tooltip: 'First Tooltip' },
- { name: 'Second', tooltip: 'Second Tooltip' }
- ];
-
- scope.$digest();
-
- var tt_1 = angular.element(elm.find('li > span')[0]);
- var tt_2 = angular.element(elm.find('li > span')[1]);
-
- trigger(tt_1, 'mouseenter');
- trigger(tt_1, 'mouseleave');
-
- $timeout.flush();
-
- trigger(tt_2, 'mouseenter');
-
- expect(tt_1.text()).toBe(scope.items[0].name);
- expect(tt_2.text()).toBe(scope.items[1].name);
-
- tooltipScope = tt_2.scope().$$childTail;
- expect(tooltipScope.content).toBe(scope.items[1].tooltip);
- expect(elm.find('.tooltip-inner').text()).toBe(scope.items[1].tooltip);
-
- trigger(tt_2, 'mouseleave');
- }));
-
- it('should only have an isolate scope on the popup', inject(function($compile) {
- var ttScope;
-
- scope.tooltipMsg = 'Tooltip Text';
- scope.alt = 'Alt Message';
-
- elmBody = $compile(angular.element(
- '<div><span alt={{alt}} uib-tooltip="{{tooltipMsg}}" tooltip-animation="false">Selector Text</span></div>'
- ))(scope);
-
- $compile(elmBody)(scope);
- scope.$digest();
- elm = elmBody.find('span');
- elmScope = elm.scope();
-
- trigger(elm, 'mouseenter');
- expect(elm.attr('alt')).toBe(scope.alt);
-
- ttScope = angular.element(elmBody.children()[1]).isolateScope();
- expect(ttScope.placement).toBe('top');
- expect(ttScope.content).toBe(scope.tooltipMsg);
-
- trigger(elm, 'mouseleave');
-
- //Isolate scope contents should be the same after hiding and showing again (issue 1191)
- trigger(elm, 'mouseenter');
-
- ttScope = angular.element(elmBody.children()[1]).isolateScope();
- expect(ttScope.placement).toBe('top');
- expect(ttScope.content).toBe(scope.tooltipMsg);
- }));
-
- it('should not show tooltips if there is nothing to show - issue #129', inject(function($compile) {
- elmBody = $compile(angular.element(
- '<div><span uib-tooltip="">Selector Text</span></div>'
- ))(scope);
- scope.$digest();
- elmBody.find('span').trigger('mouseenter');
-
- expect(elmBody.children().length).toBe(1);
- }));
-
- it('should close the tooltip when its trigger element is destroyed', inject(function() {
- trigger(elm, 'mouseenter');
- expect(tooltipScope.isOpen).toBe(true);
-
- elm.remove();
- elmScope.$destroy();
- expect(elmBody.children().length).toBe(0);
- }));
-
- it('issue 1191 - scope on the popup should always be child of correct element scope', function() {
- var ttScope;
- trigger(elm, 'mouseenter');
-
- ttScope = angular.element(elmBody.children()[1]).scope();
- expect(ttScope.$parent).toBe(tooltipScope);
-
- trigger(elm, 'mouseleave');
-
- // After leaving and coming back, the scope's parent should be the same
- trigger(elm, 'mouseenter');
-
- ttScope = angular.element(elmBody.children()[1]).scope();
- expect(ttScope.$parent).toBe(tooltipScope);
-
- trigger(elm, 'mouseleave');
- });
-
- describe('with specified enable expression', function() {
- beforeEach(inject(function($compile) {
- scope.enable = false;
- elmBody = $compile(angular.element(
- '<div><span uib-tooltip="tooltip text" tooltip-enable="enable">Selector Text</span></div>'
- ))(scope);
- scope.$digest();
- elm = elmBody.find('span');
- elmScope = elm.scope();
- tooltipScope = elmScope.$$childTail;
- }));
-
- it('should not open ', inject(function() {
- trigger(elm, 'mouseenter');
- expect(tooltipScope.isOpen).toBeFalsy();
- expect(elmBody.children().length).toBe(1);
- }));
-
- it('should open', inject(function() {
- scope.enable = true;
- scope.$digest();
- trigger(elm, 'mouseenter');
- expect(tooltipScope.isOpen).toBeTruthy();
- expect(elmBody.children().length).toBe(2);
- }));
- });
-
- describe('with specified popup delay', function() {
- var $timeout;
- beforeEach(inject(function($compile, _$timeout_) {
- $timeout = _$timeout_;
- scope.delay = '1000';
- elm = $compile(angular.element(
- '<span uib-tooltip="tooltip text" tooltip-popup-delay="{{delay}}" ng-disabled="disabled">Selector Text</span>'
- ))(scope);
- elmScope = elm.scope();
- tooltipScope = elmScope.$$childTail;
- scope.$digest();
- }));
-
- it('should open after timeout', function() {
- trigger(elm, 'mouseenter');
- expect(tooltipScope.isOpen).toBe(false);
-
- $timeout.flush();
- expect(tooltipScope.isOpen).toBe(true);
- });
-
- it('should not open if mouseleave before timeout', function() {
- trigger(elm, 'mouseenter');
- expect(tooltipScope.isOpen).toBe(false);
-
- trigger(elm, 'mouseleave');
- $timeout.flush();
- expect(tooltipScope.isOpen).toBe(false);
- });
-
- it('should use default popup delay if specified delay is not a number', function() {
- scope.delay = 'text1000';
- scope.$digest();
- trigger(elm, 'mouseenter');
- expect(tooltipScope.isOpen).toBe(true);
- });
-
- it('should not open if disabled is present', function() {
- trigger(elm, 'mouseenter');
- expect(tooltipScope.isOpen).toBe(false);
-
- $timeout.flush(500);
- expect(tooltipScope.isOpen).toBe(false);
- elmScope.disabled = true;
- elmScope.$digest();
-
- expect(tooltipScope.isOpen).toBe(false);
- });
-
- it('should open when not disabled after being disabled - issue #4204', function() {
- trigger(elm, 'mouseenter');
- expect(tooltipScope.isOpen).toBe(false);
-
- $timeout.flush(500);
- elmScope.disabled = true;
- elmScope.$digest();
-
- $timeout.flush(500);
- expect(tooltipScope.isOpen).toBe(false);
-
- elmScope.disabled = false;
- elmScope.$digest();
-
- trigger(elm, 'mouseenter');
- $timeout.flush();
-
- expect(tooltipScope.isOpen).toBe(true);
- });
-
- it('should close the tooltips in order', inject(function($compile) {
- var elm2 = $compile('<div><span uib-tooltip="tooltip #2" tooltip-is-open="isOpen2">Selector Text</span></div>')(scope);
- scope.$digest();
- elm2 = elm2.find('span');
- var tooltipScope2 = elm2.scope().$$childTail;
- tooltipScope2.isOpen = false;
- scope.$digest();
-
- trigger(elm, 'mouseenter');
- tooltipScope2.$digest();
- $timeout.flush();
- expect(tooltipScope.isOpen).toBe(true);
- expect(tooltipScope2.isOpen).toBe(false);
-
- trigger(elm2, 'mouseenter');
- tooltipScope2.$digest();
- $timeout.flush();
- expect(tooltipScope.isOpen).toBe(true);
- expect(tooltipScope2.isOpen).toBe(true);
-
- var evt = $.Event('keypress');
- evt.which = 27;
-
- $document.trigger(evt);
- tooltipScope.$digest();
- tooltipScope2.$digest();
-
- expect(tooltipScope.isOpen).toBe(true);
- expect(tooltipScope2.isOpen).toBe(false);
-
- var evt2 = $.Event('keypress');
- evt2.which = 27;
-
- $document.trigger(evt2);
- tooltipScope.$digest();
- tooltipScope2.$digest();
-
- expect(tooltipScope.isOpen).toBe(false);
- expect(tooltipScope2.isOpen).toBe(false);
- }));
- });
-
- describe('with specified popup close delay', function() {
- var $timeout;
- beforeEach(inject(function($compile, _$timeout_) {
- $timeout = _$timeout_;
- scope.delay = '1000';
- elm = $compile(angular.element(
- '<span uib-tooltip="tooltip text" tooltip-popup-close-delay="{{delay}}" ng-disabled="disabled">Selector Text</span>'
- ))(scope);
- elmScope = elm.scope();
- tooltipScope = elmScope.$$childTail;
- scope.$digest();
- }));
-
- it('should close after timeout', function() {
- trigger(elm, 'mouseenter');
- expect(tooltipScope.isOpen).toBe(true);
- trigger(elm, 'mouseleave');
- $timeout.flush();
- expect(tooltipScope.isOpen).toBe(false);
- });
-
- it('should use default popup close delay if specified delay is not a number and close immediately', function() {
- scope.delay = 'text1000';
- scope.$digest();
- trigger(elm, 'mouseenter');
- expect(tooltipScope.popupCloseDelay).toBe(0);
- expect(tooltipScope.isOpen).toBe(true);
- trigger(elm, 'mouseleave');
- $timeout.flush();
- expect(tooltipScope.isOpen).toBe(false);
- });
-
- it('should open when not disabled after being disabled and close after delay - issue #4204', function() {
- trigger(elm, 'mouseenter');
- expect(tooltipScope.isOpen).toBe(true);
-
- elmScope.disabled = true;
- elmScope.$digest();
-
- $timeout.flush(500);
- expect(tooltipScope.isOpen).toBe(false);
-
- elmScope.disabled = false;
- elmScope.$digest();
-
- trigger(elm, 'mouseenter');
-
- expect(tooltipScope.isOpen).toBe(true);
- trigger(elm, 'mouseleave');
- $timeout.flush();
- expect(tooltipScope.isOpen).toBe(false);
- });
- });
-
- describe('with specified popup and popup close delay', function() {
- var $timeout;
- beforeEach(inject(function($compile, _$timeout_) {
- $timeout = _$timeout_;
- scope.delay = '1000';
- elm = $compile(angular.element(
- '<span uib-tooltip="tooltip text" tooltip-popup-close-delay="{{delay}}" tooltip-popup-close-delay="{{delay}}" ng-disabled="disabled">Selector Text</span>'
- ))(scope);
- elmScope = elm.scope();
- tooltipScope = elmScope.$$childTail;
- scope.$digest();
- }));
-
- it('should not open if mouseleave before timeout', function() {
- trigger(elm, 'mouseenter');
- $timeout.flush(500);
- trigger(elm, 'mouseleave');
- $timeout.flush();
-
- expect(tooltipScope.isOpen).toBe(false);
- });
- });
-
- describe('with an is-open attribute', function() {
- beforeEach(inject(function ($compile) {
- scope.isOpen = false;
- elm = $compile(angular.element(
- '<span uib-tooltip="tooltip text" tooltip-is-open="isOpen" >Selector Text</span>'
- ))(scope);
- elmScope = elm.scope();
- tooltipScope = elmScope.$$childTail;
- scope.$digest();
- }));
-
- it('should show and hide with the controller value', function() {
- expect(tooltipScope.isOpen).toBe(false);
- elmScope.isOpen = true;
- elmScope.$digest();
- expect(tooltipScope.isOpen).toBe(true);
- elmScope.isOpen = false;
- elmScope.$digest();
- expect(tooltipScope.isOpen).toBe(false);
- });
-
- it('should update the controller value', function() {
- trigger(elm, 'mouseenter');
- expect(elmScope.isOpen).toBe(true);
- trigger(elm, 'mouseleave');
- expect(elmScope.isOpen).toBe(false);
- });
- });
-
- describe('with an is-open attribute expression', function() {
- beforeEach(inject(function($compile) {
- scope.isOpen = false;
- elm = $compile(angular.element(
- '<span uib-tooltip="tooltip text" tooltip-is-open="isOpen === true" >Selector Text</span>'
- ))(scope);
- elmScope = elm.scope();
- tooltipScope = elmScope.$$childTail;
- scope.$digest();
- }));
-
- it('should show and hide with the expression', function() {
- expect(tooltipScope.isOpen).toBe(false);
- elmScope.isOpen = true;
- elmScope.$digest();
- expect(tooltipScope.isOpen).toBe(true);
- elmScope.isOpen = false;
- elmScope.$digest();
- expect(tooltipScope.isOpen).toBe(false);
- });
- });
-
- describe('with a trigger attribute', function() {
- var scope, elmBody, elm, elmScope;
-
- beforeEach(inject(function($rootScope) {
- scope = $rootScope;
- }));
-
- it('should use it to show but set the hide trigger based on the map for mapped triggers', inject(function($compile) {
- elmBody = angular.element(
- '<div><input uib-tooltip="Hello!" tooltip-trigger="focus" /></div>'
- );
- $compile(elmBody)(scope);
- scope.$apply();
- elm = elmBody.find('input');
- elmScope = elm.scope();
- tooltipScope = elmScope.$$childTail;
-
- expect(tooltipScope.isOpen).toBeFalsy();
- trigger(elm, 'focus');
- expect(tooltipScope.isOpen).toBeTruthy();
- trigger(elm, 'blur');
- expect(tooltipScope.isOpen).toBeFalsy();
- }));
-
- it('should use it as both the show and hide triggers for unmapped triggers', inject(function($compile) {
- elmBody = angular.element(
- '<div><input uib-tooltip="Hello!" tooltip-trigger="fakeTriggerAttr" /></div>'
- );
- $compile(elmBody)(scope);
- scope.$apply();
- elm = elmBody.find('input');
- elmScope = elm.scope();
- tooltipScope = elmScope.$$childTail;
-
- expect(tooltipScope.isOpen).toBeFalsy();
- trigger(elm, 'fakeTriggerAttr');
- expect(tooltipScope.isOpen).toBeTruthy();
- trigger(elm, 'fakeTriggerAttr');
- expect(tooltipScope.isOpen).toBeFalsy();
- }));
-
- it('should only set up triggers once', inject(function($compile) {
- scope.test = true;
- elmBody = angular.element(
- '<div>' +
- '<input uib-tooltip="Hello!" tooltip-trigger="{{ (test && \'mouseenter\' || \'click\') }}" />' +
- '<input uib-tooltip="Hello!" tooltip-trigger="{{ (test && \'mouseenter\' || \'click\') }}" />' +
- '</div>'
- );
-
- $compile(elmBody)(scope);
- scope.$apply();
- var elm1 = elmBody.find('input').eq(0);
- var elm2 = elmBody.find('input').eq(1);
- var elmScope1 = elm1.scope();
- var elmScope2 = elm2.scope();
- var tooltipScope2 = elmScope2.$$childTail;
-
- scope.$apply('test = false');
-
- // click trigger isn't set
- elm2.click();
- expect(tooltipScope2.isOpen).toBeFalsy();
-
- // mouseenter trigger is still set
- trigger(elm2, 'mouseenter');
- expect(tooltipScope2.isOpen).toBeTruthy();
- }));
-
- it('should accept multiple triggers based on the map for mapped triggers', inject(function($compile) {
- elmBody = angular.element(
- '<div><input uib-tooltip="Hello!" tooltip-trigger="focus fakeTriggerAttr" /></div>'
- );
- $compile(elmBody)(scope);
- scope.$apply();
- elm = elmBody.find('input');
- elmScope = elm.scope();
- tooltipScope = elmScope.$$childTail;
-
- expect(tooltipScope.isOpen).toBeFalsy();
- trigger(elm, 'focus');
- expect(tooltipScope.isOpen).toBeTruthy();
- trigger(elm, 'blur');
- expect(tooltipScope.isOpen).toBeFalsy();
- trigger(elm, 'fakeTriggerAttr');
- expect(tooltipScope.isOpen).toBeTruthy();
- trigger(elm, 'fakeTriggerAttr');
- expect(tooltipScope.isOpen).toBeFalsy();
- }));
-
- it('should not show when trigger is set to "none"', inject(function($compile) {
- elmBody = angular.element(
- '<div><input uib-tooltip="Hello!" tooltip-trigger="none" /></div>'
- );
- $compile(elmBody)(scope);
- scope.$apply();
- elm = elmBody.find('input');
- elmScope = elm.scope();
- tooltipScope = elmScope.$$childTail;
- expect(tooltipScope.isOpen).toBeFalsy();
- elm.trigger('mouseenter');
- expect(tooltipScope.isOpen).toBeFalsy();
- }));
- });
-
- describe('with an append-to-body attribute', function() {
- var scope, elmBody, elm, elmScope, $body;
-
- beforeEach(inject(function($rootScope) {
- scope = $rootScope;
- }));
-
- afterEach(function() {
- $body.find('.tooltip').remove();
- });
-
- it('should append to the body', inject(function($compile, $document) {
- $body = $document.find('body');
- elmBody = angular.element(
- '<div><span uib-tooltip="tooltip text" tooltip-append-to-body="true">Selector Text</span></div>'
- );
-
- $compile(elmBody)(scope);
- scope.$digest();
- elm = elmBody.find('span');
- elmScope = elm.scope();
- tooltipScope = elmScope.$$childTail;
-
- var bodyLength = $body.children().length;
- trigger(elm, 'mouseenter');
-
- expect(tooltipScope.isOpen).toBe(true);
- expect(elmBody.children().length).toBe(1);
- expect($body.children().length).toEqual(bodyLength + 1);
- }));
- });
-
- describe('cleanup', function() {
- var elmBody, elm, elmScope, tooltipScope;
-
- function inCache() {
- var match = false;
-
- angular.forEach(angular.element.cache, function(item) {
- if (item.data && item.data.$scope === tooltipScope) {
- match = true;
- }
- });
-
- return match;
- }
-
- beforeEach(inject(function($compile, $rootScope) {
- elmBody = angular.element('<div><input uib-tooltip="Hello!" tooltip-trigger="fooTrigger" /></div>');
-
- $compile(elmBody)($rootScope);
- $rootScope.$apply();
-
- elm = elmBody.find('input');
- elmScope = elm.scope();
- trigger(elm, 'fooTrigger');
- tooltipScope = elmScope.$$childTail.$$childTail;
- }));
-
- it('should not contain a cached reference when not visible', inject(function($timeout) {
- expect(inCache()).toBeTruthy();
- elmScope.$destroy();
- expect(inCache()).toBeFalsy();
- }));
- });
-
- describe('observers', function() {
- var elmBody, elm, elmScope, scope, tooltipScope;
-
- beforeEach(inject(function($compile, $rootScope) {
- scope = $rootScope;
- scope.content = 'tooltip content';
- scope.placement = 'top';
- elmBody = angular.element('<div><input uib-tooltip="{{content}}" tooltip-placement={{placement}} /></div>');
- $compile(elmBody)(scope);
- scope.$apply();
-
- elm = elmBody.find('input');
- elmScope = elm.scope();
- tooltipScope = elmScope.$$childTail;
- }));
-
- it('should be removed when tooltip hides', inject(function($timeout) {
- expect(tooltipScope.content).toBe(undefined);
- expect(tooltipScope.placement).toBe(undefined);
-
- trigger(elm, 'mouseenter');
- expect(tooltipScope.content).toBe('tooltip content');
- expect(tooltipScope.placement).toBe('top');
- scope.content = 'tooltip content updated';
-
- scope.placement = 'bottom';
- scope.$apply();
- expect(tooltipScope.content).toBe('tooltip content updated');
- expect(tooltipScope.placement).toBe('bottom');
-
- trigger(elm, 'mouseleave');
- $timeout.flush();
- scope.content = 'tooltip content updated after close';
- scope.placement = 'left';
- scope.$apply();
- expect(tooltipScope.content).toBe('tooltip content updated');
- expect(tooltipScope.placement).toBe('bottom');
- }));
- });
-});
-
-describe('tooltipWithDifferentSymbols', function() {
- var elmBody;
-
- // load the tooltip code
- beforeEach(module('ui.bootstrap.tooltip'));
-
- // load the template
- beforeEach(module('template/tooltip/tooltip-popup.html'));
-
- // configure interpolate provider to use [[ ]] instead of {{ }}
- beforeEach(module(function($interpolateProvider) {
- $interpolateProvider.startSymbol('[[');
- $interpolateProvider.startSymbol(']]');
- }));
-
- function trigger(element, evt) {
- evt = new Event(evt);
-
- element[0].dispatchEvent(evt);
- element.scope().$$childTail.$digest();
- }
-
- it('should show the correct tooltip text', inject(function($compile, $rootScope) {
- elmBody = angular.element(
- '<div><input type="text" uib-tooltip="My tooltip" tooltip-trigger="focus" tooltip-placement="right" /></div>'
- );
- $compile(elmBody)($rootScope);
- $rootScope.$apply();
- var elmInput = elmBody.find('input');
- trigger(elmInput, 'focus');
-
- expect(elmInput.next().find('div').next().html()).toBe('My tooltip');
- }));
-});
-
-describe('tooltip positioning', function() {
- var elm, elmBody, elmScope, tooltipScope, scope;
- var $position;
-
- // load the tooltip code
- beforeEach(module('ui.bootstrap.tooltip', function($tooltipProvider) {
- $tooltipProvider.options({ animation: false });
- }));
-
- // load the template
- beforeEach(module('template/tooltip/tooltip-popup.html'));
-
- beforeEach(inject(function($rootScope, $compile, $uibPosition) {
- $position = $uibPosition;
- spyOn($position, 'positionElements').and.callThrough();
-
- scope = $rootScope;
- scope.text = 'Some Text';
-
- elmBody = $compile(angular.element(
- '<div><span uib-tooltip="{{ text }}">Selector Text</span></div>'
- ))(scope);
- scope.$digest();
- elm = elmBody.find('span');
- elmScope = elm.scope();
- tooltipScope = elmScope.$$childTail;
- }));
-
- function trigger(element, evt) {
- evt = new Event(evt);
-
- element[0].dispatchEvent(evt);
- element.scope().$$childTail.$digest();
- }
-
- it('should re-position when value changes', inject(function($timeout) {
- trigger(elm, 'mouseenter');
-
- scope.$digest();
- $timeout.flush();
- var startingPositionCalls = $position.positionElements.calls.count();
-
- scope.text = 'New Text';
- scope.$digest();
- $timeout.flush();
- expect(elm.attr('uib-tooltip')).toBe('New Text');
- expect($position.positionElements.calls.count()).toEqual(startingPositionCalls + 1);
- // Check that positionElements was called with elm
- expect($position.positionElements.calls.argsFor(startingPositionCalls)[0][0])
- .toBe(elm[0]);
-
- scope.$digest();
- $timeout.verifyNoPendingTasks();
- expect($position.positionElements.calls.count()).toEqual(startingPositionCalls + 1);
- expect($position.positionElements.calls.argsFor(startingPositionCalls)[0][0])
- .toBe(elm[0]);
- scope.$digest();
- }));
-
-});
-
-describe('tooltipHtml', function() {
- var elm, elmBody, elmScope, tooltipScope, scope;
-
- // load the tooltip code
- beforeEach(module('ui.bootstrap.tooltip', function($tooltipProvider) {
- $tooltipProvider.options({ animation: false });
- }));
-
- // load the template
- beforeEach(module('template/tooltip/tooltip-html-popup.html'));
-
- beforeEach(inject(function($rootScope, $compile, $sce) {
- scope = $rootScope;
- scope.html = 'I say: <strong class="hello">Hello!</strong>';
- scope.safeHtml = $sce.trustAsHtml(scope.html);
-
- elmBody = $compile(angular.element(
- '<div><span uib-tooltip-html="safeHtml">Selector Text</span></div>'
- ))(scope);
- scope.$digest();
- elm = elmBody.find('span');
- elmScope = elm.scope();
- tooltipScope = elmScope.$$childTail;
- }));
-
- function trigger(element, evt) {
- evt = new Event(evt);
-
- element[0].dispatchEvent(evt);
- element.scope().$$childTail.$digest();
- }
-
- it('should render html properly', inject(function() {
- trigger(elm, 'mouseenter');
- expect(elmBody.find('.tooltip-inner').html()).toBe(scope.html);
- }));
-
- it('should not open if html is empty', function() {
- scope.safeHtml = null;
- scope.$digest();
- trigger(elm, 'mouseenter');
- expect(tooltipScope.isOpen).toBe(false);
- });
-
- it('should show on mouseenter and hide on mouseleave', inject(function($sce) {
- expect(tooltipScope.isOpen).toBe(false);
-
- trigger(elm, 'mouseenter');
- expect(tooltipScope.isOpen).toBe(true);
- expect(elmBody.children().length).toBe(2);
-
- expect($sce.getTrustedHtml(tooltipScope.contentExp())).toEqual(scope.html);
-
- trigger(elm, 'mouseleave');
- expect(tooltipScope.isOpen).toBe(false);
- expect(elmBody.children().length).toBe(1);
- }));
-});
-
-describe('$tooltipProvider', function() {
- var elm,
- elmBody,
- scope,
- elmScope,
- tooltipScope;
-
- function trigger(element, evt) {
- evt = new Event(evt);
-
- element[0].dispatchEvent(evt);
- element.scope().$$childTail.$digest();
- }
-
- describe('popupDelay', function() {
- beforeEach(module('ui.bootstrap.tooltip', function($tooltipProvider) {
- $tooltipProvider.options({popupDelay: 1000});
- }));
-
- // load the template
- beforeEach(module('template/tooltip/tooltip-popup.html'));
-
- beforeEach(inject(function($rootScope, $compile) {
- elmBody = angular.element(
- '<div><span uib-tooltip="tooltip text">Selector Text</span></div>'
- );
-
- scope = $rootScope;
- $compile(elmBody)(scope);
- scope.$digest();
- elm = elmBody.find('span');
- elmScope = elm.scope();
- tooltipScope = elmScope.$$childTail;
- }));
-
- it('should open after timeout', inject(function($timeout) {
- trigger(elm, 'mouseenter');
- expect(tooltipScope.isOpen).toBe(false);
-
- $timeout.flush();
- expect(tooltipScope.isOpen).toBe(true);
- }));
- });
-
- describe('appendToBody', function() {
- var $body;
-
- beforeEach(module('template/tooltip/tooltip-popup.html'));
- beforeEach(module('ui.bootstrap.tooltip', function($tooltipProvider) {
- $tooltipProvider.options({ appendToBody: true });
- }));
-
- afterEach(function() {
- $body.find('.tooltip').remove();
- });
-
- it('should append to the body', inject(function($rootScope, $compile, $document) {
- $body = $document.find('body');
- elmBody = angular.element(
- '<div><span uib-tooltip="tooltip text">Selector Text</span></div>'
- );
-
- scope = $rootScope;
- $compile(elmBody)(scope);
- scope.$digest();
- elm = elmBody.find('span');
- elmScope = elm.scope();
- tooltipScope = elmScope.$$childTail;
-
- var bodyLength = $body.children().length;
- trigger(elm, 'mouseenter');
-
- expect(tooltipScope.isOpen).toBe(true);
- expect(elmBody.children().length).toBe(1);
- expect($body.children().length).toEqual(bodyLength + 1);
- }));
-
- it('should close on location change', inject(function($rootScope, $compile) {
- elmBody = angular.element(
- '<div><span uib-tooltip="tooltip text">Selector Text</span></div>'
- );
-
- scope = $rootScope;
- $compile(elmBody)(scope);
- scope.$digest();
- elm = elmBody.find('span');
- elmScope = elm.scope();
- tooltipScope = elmScope.$$childTail;
-
- trigger(elm, 'mouseenter');
- expect(tooltipScope.isOpen).toBe(true);
-
- scope.$broadcast('$locationChangeSuccess');
- scope.$digest();
- expect(tooltipScope.isOpen).toBe(false);
- }));
- });
-
- describe('triggers', function() {
- describe('triggers with a mapped value', function() {
- beforeEach(module('ui.bootstrap.tooltip', function($uibTooltipProvider) {
- $uibTooltipProvider.options({trigger: 'focus'});
- }));
-
- // load the template
- beforeEach(module('template/tooltip/tooltip-popup.html'));
-
- it('should use the show trigger and the mapped value for the hide trigger', inject(function($rootScope, $compile) {
- elmBody = angular.element(
- '<div><input uib-tooltip="tooltip text" /></div>'
- );
-
- scope = $rootScope;
- $compile(elmBody)(scope);
- scope.$digest();
- elm = elmBody.find('input');
- elmScope = elm.scope();
- tooltipScope = elmScope.$$childTail;
-
- expect(tooltipScope.isOpen).toBeFalsy();
- trigger(elm, 'focus');
- expect(tooltipScope.isOpen).toBeTruthy();
- trigger(elm, 'blur');
- expect(tooltipScope.isOpen).toBeFalsy();
- }));
-
- it('should override the show and hide triggers if there is an attribute', inject(function($rootScope, $compile) {
- elmBody = angular.element(
- '<div><input uib-tooltip="tooltip text" tooltip-trigger="mouseenter"/></div>'
- );
-
- scope = $rootScope;
- $compile(elmBody)(scope);
- scope.$digest();
- elm = elmBody.find('input');
- elmScope = elm.scope();
- tooltipScope = elmScope.$$childTail;
-
- expect(tooltipScope.isOpen).toBeFalsy();
- trigger(elm, 'mouseenter');
- expect(tooltipScope.isOpen).toBeTruthy();
- trigger(elm, 'mouseleave');
- expect(tooltipScope.isOpen).toBeFalsy();
- }));
- });
-
- describe('triggers with a custom mapped value', function() {
- beforeEach(module('ui.bootstrap.tooltip', function($uibTooltipProvider) {
- $uibTooltipProvider.setTriggers({ customOpenTrigger: 'foo bar' });
- $uibTooltipProvider.options({trigger: 'customOpenTrigger'});
- }));
-
- // load the template
- beforeEach(module('template/tooltip/tooltip-popup.html'));
-
- it('should use the show trigger and the mapped value for the hide trigger', inject(function($rootScope, $compile) {
- elmBody = angular.element(
- '<div><input uib-tooltip="tooltip text" /></div>'
- );
-
- scope = $rootScope;
- $compile(elmBody)(scope);
- scope.$digest();
- elm = elmBody.find('input');
- elmScope = elm.scope();
- tooltipScope = elmScope.$$childTail;
-
- expect(tooltipScope.isOpen).toBeFalsy();
- trigger(elm, 'customOpenTrigger');
- expect(tooltipScope.isOpen).toBeTruthy();
- trigger(elm, 'foo');
- expect(tooltipScope.isOpen).toBeFalsy();
- trigger(elm, 'customOpenTrigger');
- expect(tooltipScope.isOpen).toBeTruthy();
- trigger(elm, 'bar');
- expect(tooltipScope.isOpen).toBeFalsy();
- }));
- });
-
- describe('triggers without a mapped value', function() {
- beforeEach(module('ui.bootstrap.tooltip', function($uibTooltipProvider) {
- $uibTooltipProvider.options({trigger: 'fakeTrigger'});
- }));
-
- // load the template
- beforeEach(module('template/tooltip/tooltip-popup.html'));
-
- it('should use the show trigger to hide', inject(function($rootScope, $compile) {
- elmBody = angular.element(
- '<div><span uib-tooltip="tooltip text">Selector Text</span></div>'
- );
-
- scope = $rootScope;
- $compile(elmBody)(scope);
- scope.$digest();
- elm = elmBody.find('span');
- elmScope = elm.scope();
- tooltipScope = elmScope.$$childTail;
-
- expect(tooltipScope.isOpen).toBeFalsy();
- trigger(elm, 'fakeTrigger');
- expect(tooltipScope.isOpen).toBeTruthy();
- trigger(elm, 'fakeTrigger');
- expect(tooltipScope.isOpen).toBeFalsy();
- }));
- });
- });
-});
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/tooltip/test/tooltip2.spec.js b/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/tooltip/test/tooltip2.spec.js
deleted file mode 100644
index 2ed8e2b..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/tooltip/test/tooltip2.spec.js
+++ /dev/null
@@ -1,282 +0,0 @@
-describe('tooltip directive', function() {
- var $rootScope, $compile, $document, $timeout;
-
- beforeEach(module('ui.bootstrap.tooltip'));
- beforeEach(module('template/tooltip/tooltip-popup.html'));
- beforeEach(module('template/tooltip/tooltip-template-popup.html'));
- beforeEach(module('template/tooltip/tooltip-html-popup.html'));
- beforeEach(inject(function(_$rootScope_, _$compile_, _$document_, _$timeout_) {
- $rootScope = _$rootScope_;
- $compile = _$compile_;
- $document = _$document_;
- $timeout = _$timeout_;
- }));
-
- beforeEach(function() {
- jasmine.addMatchers({
- toHaveOpenTooltips: function(util, customEqualityTesters) {
- return {
- compare: function(actual, noOfOpened) {
- var ttipElements = actual.find('div.tooltip');
- noOfOpened = noOfOpened || 1;
-
- var result = {
- pass: util.equals(ttipElements.length, noOfOpened, customEqualityTesters)
- };
-
- if (result.message) {
- result.message = 'Expected "' + angular.mock.dump(ttipElements) + '" not to have "' + ttipElements.length + '" opened tooltips.';
- } else {
- result.message = 'Expected "' + angular.mock.dump(ttipElements) + '" to have "' + ttipElements.length + '" opened tooltips.';
- }
-
- return result;
- }
- };
- }
- });
- });
-
- function compileTooltip(ttipMarkup) {
- var fragment = $compile('<div>' + ttipMarkup + '</div>')($rootScope);
- $rootScope.$digest();
- return fragment;
- }
-
- function closeTooltip(hostEl, triggerEvt, shouldNotFlush) {
- trigger(hostEl, triggerEvt || 'mouseleave');
- hostEl.scope().$$childTail.$digest();
- if (!shouldNotFlush) {
- $timeout.flush();
- }
- }
-
- function trigger(element, evt) {
- evt = new Event(evt);
-
- element[0].dispatchEvent(evt);
- element.scope().$$childTail.$digest();
- }
-
- describe('basic scenarios with default options', function() {
- it('shows default tooltip on mouse enter and closes on mouse leave', function() {
- var fragment = compileTooltip('<span uib-tooltip="tooltip text">Trigger here</span>');
-
- trigger(fragment.find('span'), 'mouseenter');
- expect(fragment).toHaveOpenTooltips();
-
- closeTooltip(fragment.find('span'));
- expect(fragment).not.toHaveOpenTooltips();
- });
-
- it('should not show a tooltip when its content is empty', function() {
- var fragment = compileTooltip('<span uib-tooltip=""></span>');
- trigger(fragment.find('span'), 'mouseenter');
- expect(fragment).not.toHaveOpenTooltips();
- });
-
- it('should not show a tooltip when its content becomes empty', function() {
- $rootScope.content = 'some text';
- var fragment = compileTooltip('<span uib-tooltip="{{ content }}"></span>');
-
- trigger(fragment.find('span'), 'mouseenter');
- expect(fragment).toHaveOpenTooltips();
-
- $rootScope.content = '';
- $rootScope.$digest();
- $timeout.flush();
- expect(fragment).not.toHaveOpenTooltips();
- });
-
- it('should update tooltip when its content becomes empty', function() {
- $rootScope.content = 'some text';
- var fragment = compileTooltip('<span uib-tooltip="{{ content }}"></span>');
-
- $rootScope.content = '';
- $rootScope.$digest();
-
- trigger(fragment.find('span'), 'mouseenter');
- expect(fragment).not.toHaveOpenTooltips();
- });
- });
-
- describe('option by option', function() {
- var tooltipTypes = {
- 'tooltip': 'uib-tooltip="tooltip text"',
- 'tooltip-html': 'uib-tooltip-html="tooltipSafeHtml"',
- 'tooltip-template': 'uib-tooltip-template="\'tooltipTextUrl\'"'
- };
-
- beforeEach(inject(function($sce, $templateCache) {
- $rootScope.tooltipText = 'tooltip text';
- $rootScope.tooltipSafeHtml = $sce.trustAsHtml('tooltip text');
- $templateCache.put('tooltipTextUrl', [200, '<span>tooltip text</span>', {}]);
- }));
-
- angular.forEach(tooltipTypes, function(html, key) {
- describe(key, function() {
- describe('placement', function() {
- it('can specify an alternative, valid placement', function() {
- var fragment = compileTooltip('<span ' + html + ' tooltip-placement="left">Trigger here</span>');
- trigger(fragment.find('span'), 'mouseenter');
-
- var ttipElement = fragment.find('div.tooltip');
- expect(fragment).toHaveOpenTooltips();
- expect(ttipElement).toHaveClass('left');
-
- closeTooltip(fragment.find('span'));
- expect(fragment).not.toHaveOpenTooltips();
- });
- });
-
- describe('class', function() {
- it('can specify a custom class', function() {
- var fragment = compileTooltip('<span ' + html + ' tooltip-class="custom">Trigger here</span>');
- trigger(fragment.find('span'), 'mouseenter');
-
- var ttipElement = fragment.find('div.tooltip');
- expect(fragment).toHaveOpenTooltips();
- expect(ttipElement).toHaveClass('custom');
-
- closeTooltip(fragment.find('span'));
- expect(fragment).not.toHaveOpenTooltips();
- });
- });
- });
- });
- });
-
- it('should show even after close trigger is called multiple times - issue #1847', function() {
- var fragment = compileTooltip('<span uib-tooltip="tooltip text">Trigger here</span>');
-
- trigger(fragment.find('span'), 'mouseenter');
- expect(fragment).toHaveOpenTooltips();
-
- closeTooltip(fragment.find('span'), null, true);
- // Close trigger is called again before timer completes
- // The close trigger can be called any number of times (even after close has already been called)
- // since users can trigger the hide triggers manually.
- closeTooltip(fragment.find('span'), null, true);
- expect(fragment).toHaveOpenTooltips();
-
- trigger(fragment.find('span'), 'mouseenter');
- expect(fragment).toHaveOpenTooltips();
-
- $timeout.flush();
- expect(fragment).toHaveOpenTooltips();
- });
-
- it('should hide even after show trigger is called multiple times', function() {
- var fragment = compileTooltip('<span uib-tooltip="tooltip text" tooltip-popup-delay="1000">Trigger here</span>');
-
- trigger(fragment.find('span'), 'mouseenter');
- trigger(fragment.find('span'), 'mouseenter');
-
- closeTooltip(fragment.find('span'));
- expect(fragment).not.toHaveOpenTooltips();
- });
-
- it('should not show tooltips element is disabled (button) - issue #3167', function() {
- var fragment = compileTooltip('<button uib-tooltip="cancel!" ng-disabled="disabled" ng-click="disabled = true">Cancel</button>');
-
- trigger(fragment.find('button'), 'mouseenter');
- expect(fragment).toHaveOpenTooltips();
-
- trigger(fragment.find('button'), 'click');
- $timeout.flush();
- // One needs to flush deferred functions before checking there is no tooltip.
- expect(fragment).not.toHaveOpenTooltips();
- });
-});
-
-/* Deprecation tests below */
-
-describe('tooltip deprecation', function() {
- beforeEach(module('ui.bootstrap.tooltip'));
- beforeEach(module('template/tooltip/tooltip-popup.html'));
- beforeEach(module('template/tooltip/tooltip-template-popup.html'));
- beforeEach(module('template/tooltip/tooltip-html-popup.html'));
-
- describe('tooltip', function() {
- it('should suppress warning', function() {
- module(function($provide) {
- $provide.value('$tooltipSuppressWarning', true);
- });
-
- inject(function($compile, $log, $rootScope) {
- spyOn($log, 'warn');
-
- var element = '<div><span tooltip="tooltip text">Trigger here</span></div>';
- element = $compile(element)($rootScope);
- $rootScope.$digest();
- expect($log.warn.calls.count()).toBe(0);
- });
- });
-
- it('should give warning by default', inject(function($compile, $log, $rootScope) {
- spyOn($log, 'warn');
-
- var element = '<div><span tooltip="tooltip text">Trigger here</span></div>';
- element = $compile(element)($rootScope);
- $rootScope.$digest();
-
- expect($log.warn.calls.count()).toBe(1);
- expect($log.warn.calls.argsFor(0)).toEqual(['$tooltip is now deprecated. Use $uibTooltip instead.']);
- }));
- });
-
- describe('tooltip html', function() {
- var elm, elmBody, elmScope, tooltipScope;
-
- function trigger(element, evt) {
- evt = new Event(evt);
-
- element[0].dispatchEvent(evt);
- element.scope().$$childTail.$digest();
- }
-
- it('should suppress warning', function() {
- module(function($provide) {
- $provide.value('$tooltipSuppressWarning', true);
- });
-
- inject(function($compile, $log, $rootScope, $sce) {
- spyOn($log, 'warn');
-
- $rootScope.html = 'I say: <strong class="hello">Hello!</strong>';
- $rootScope.safeHtml = $sce.trustAsHtml($rootScope.html);
- elmBody = angular.element('<div><span tooltip-html="safeHtml">Selector Text</span></div>');
- $compile(elmBody)($rootScope);
- $rootScope.$digest();
- elm = elmBody.find('span');
- elmScope = elm.scope();
- tooltipScope = elmScope.$$childTail;
-
- trigger(elm, 'mouseenter');
- tooltipScope.$digest();
-
- expect($log.warn.calls.count()).toBe(0);
- });
- });
-
- it('should give warning by default', inject(function($compile, $log, $rootScope, $sce) {
- spyOn($log, 'warn');
-
- $rootScope.html = 'I say: <strong class="hello">Hello!</strong>';
- $rootScope.safeHtml = $sce.trustAsHtml($rootScope.html);
- elmBody = angular.element('<div><span tooltip-html="safeHtml">Selector Text</span></div>');
- $compile(elmBody)($rootScope);
- $rootScope.$digest();
- elm = elmBody.find('span');
- elmScope = elm.scope();
- tooltipScope = elmScope.$$childTail;
-
- trigger(elm, 'mouseenter');
- tooltipScope.$digest();
-
- expect($log.warn.calls.count()).toBe(2);
- expect($log.warn.calls.argsFor(0)).toEqual(['$tooltip is now deprecated. Use $uibTooltip instead.']);
- expect($log.warn.calls.argsFor(1)).toEqual(['tooltip-html-popup is now deprecated. Use uib-tooltip-html-popup instead.']);
- }));
- });
-});
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/tooltip/tooltip.js b/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/tooltip/tooltip.js
deleted file mode 100644
index cbc7e97..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/tooltip/tooltip.js
+++ /dev/null
@@ -1,833 +0,0 @@
-/**
- * The following features are still outstanding: animation as a
- * function, placement as a function, inside, support for more triggers than
- * just mouse enter/leave, html tooltips, and selector delegation.
- */
-angular.module('ui.bootstrap.tooltip', ['ui.bootstrap.position', 'ui.bootstrap.stackedMap'])
-
-/**
- * The $tooltip service creates tooltip- and popover-like directives as well as
- * houses global options for them.
- */
-.provider('$uibTooltip', function() {
- // The default options tooltip and popover.
- var defaultOptions = {
- placement: 'top',
- animation: true,
- popupDelay: 0,
- popupCloseDelay: 0,
- useContentExp: false
- };
-
- // Default hide triggers for each show trigger
- var triggerMap = {
- 'mouseenter': 'mouseleave',
- 'click': 'click',
- 'focus': 'blur',
- 'none': ''
- };
-
- // The options specified to the provider globally.
- var globalOptions = {};
-
- /**
- * `options({})` allows global configuration of all tooltips in the
- * application.
- *
- * var app = angular.module( 'App', ['ui.bootstrap.tooltip'], function( $tooltipProvider ) {
- * // place tooltips left instead of top by default
- * $tooltipProvider.options( { placement: 'left' } );
- * });
- */
- this.options = function(value) {
- angular.extend(globalOptions, value);
- };
-
- /**
- * This allows you to extend the set of trigger mappings available. E.g.:
- *
- * $tooltipProvider.setTriggers( 'openTrigger': 'closeTrigger' );
- */
- this.setTriggers = function setTriggers(triggers) {
- angular.extend(triggerMap, triggers);
- };
-
- /**
- * This is a helper function for translating camel-case to snake-case.
- */
- function snake_case(name) {
- var regexp = /[A-Z]/g;
- var separator = '-';
- return name.replace(regexp, function(letter, pos) {
- return (pos ? separator : '') + letter.toLowerCase();
- });
- }
-
- /**
- * Returns the actual instance of the $tooltip service.
- * TODO support multiple triggers
- */
- this.$get = ['$window', '$compile', '$timeout', '$document', '$uibPosition', '$interpolate', '$rootScope', '$parse', '$$stackedMap', function($window, $compile, $timeout, $document, $position, $interpolate, $rootScope, $parse, $$stackedMap) {
- var openedTooltips = $$stackedMap.createNew();
- $document.on('keypress', function(e) {
- if (e.which === 27) {
- var last = openedTooltips.top();
- if (last) {
- last.value.close();
- openedTooltips.removeTop();
- last = null;
- }
- }
- });
-
- return function $tooltip(ttType, prefix, defaultTriggerShow, options) {
- options = angular.extend({}, defaultOptions, globalOptions, options);
-
- /**
- * Returns an object of show and hide triggers.
- *
- * If a trigger is supplied,
- * it is used to show the tooltip; otherwise, it will use the `trigger`
- * option passed to the `$tooltipProvider.options` method; else it will
- * default to the trigger supplied to this directive factory.
- *
- * The hide trigger is based on the show trigger. If the `trigger` option
- * was passed to the `$tooltipProvider.options` method, it will use the
- * mapped trigger from `triggerMap` or the passed trigger if the map is
- * undefined; otherwise, it uses the `triggerMap` value of the show
- * trigger; else it will just use the show trigger.
- */
- function getTriggers(trigger) {
- var show = (trigger || options.trigger || defaultTriggerShow).split(' ');
- var hide = show.map(function(trigger) {
- return triggerMap[trigger] || trigger;
- });
- return {
- show: show,
- hide: hide
- };
- }
-
- var directiveName = snake_case(ttType);
-
- var startSym = $interpolate.startSymbol();
- var endSym = $interpolate.endSymbol();
- var template =
- '<div '+ directiveName + '-popup '+
- 'title="' + startSym + 'title' + endSym + '" '+
- (options.useContentExp ?
- 'content-exp="contentExp()" ' :
- 'content="' + startSym + 'content' + endSym + '" ') +
- 'placement="' + startSym + 'placement' + endSym + '" '+
- 'popup-class="' + startSym + 'popupClass' + endSym + '" '+
- 'animation="animation" ' +
- 'is-open="isOpen"' +
- 'origin-scope="origScope" ' +
- 'style="visibility: hidden; display: block; top: -9999px; left: -9999px;"' +
- '>' +
- '</div>';
-
- return {
- compile: function(tElem, tAttrs) {
- var tooltipLinker = $compile(template);
-
- return function link(scope, element, attrs, tooltipCtrl) {
- var tooltip;
- var tooltipLinkedScope;
- var transitionTimeout;
- var showTimeout;
- var hideTimeout;
- var positionTimeout;
- var appendToBody = angular.isDefined(options.appendToBody) ? options.appendToBody : false;
- var triggers = getTriggers(undefined);
- var hasEnableExp = angular.isDefined(attrs[prefix + 'Enable']);
- var ttScope = scope.$new(true);
- var repositionScheduled = false;
- var isOpenParse = angular.isDefined(attrs[prefix + 'IsOpen']) ? $parse(attrs[prefix + 'IsOpen']) : false;
- var contentParse = options.useContentExp ? $parse(attrs[ttType]) : false;
- var observers = [];
-
- var positionTooltip = function() {
- // check if tooltip exists and is not empty
- if (!tooltip || !tooltip.html()) { return; }
-
- if (!positionTimeout) {
- positionTimeout = $timeout(function() {
- // Reset the positioning.
- tooltip.css({ top: 0, left: 0 });
-
- // Now set the calculated positioning.
- var ttCss = $position.positionElements(element, tooltip, ttScope.placement, appendToBody);
- ttCss.top += 'px';
- ttCss.left += 'px';
- ttCss.visibility = 'visible';
- tooltip.css(ttCss);
-
- positionTimeout = null;
- }, 0, false);
- }
- };
-
- // Set up the correct scope to allow transclusion later
- ttScope.origScope = scope;
-
- // By default, the tooltip is not open.
- // TODO add ability to start tooltip opened
- ttScope.isOpen = false;
- openedTooltips.add(ttScope, {
- close: hide
- });
-
- function toggleTooltipBind() {
- if (!ttScope.isOpen) {
- showTooltipBind();
- } else {
- hideTooltipBind();
- }
- }
-
- // Show the tooltip with delay if specified, otherwise show it immediately
- function showTooltipBind() {
- if (hasEnableExp && !scope.$eval(attrs[prefix + 'Enable'])) {
- return;
- }
-
- cancelHide();
- prepareTooltip();
-
- if (ttScope.popupDelay) {
- // Do nothing if the tooltip was already scheduled to pop-up.
- // This happens if show is triggered multiple times before any hide is triggered.
- if (!showTimeout) {
- showTimeout = $timeout(show, ttScope.popupDelay, false);
- }
- } else {
- show();
- }
- }
-
- function hideTooltipBind() {
- cancelShow();
-
- if (ttScope.popupCloseDelay) {
- if (!hideTimeout) {
- hideTimeout = $timeout(hide, ttScope.popupCloseDelay, false);
- }
- } else {
- hide();
- }
- }
-
- // Show the tooltip popup element.
- function show() {
- cancelShow();
- cancelHide();
-
- // Don't show empty tooltips.
- if (!ttScope.content) {
- return angular.noop;
- }
-
- createTooltip();
-
- // And show the tooltip.
- ttScope.$evalAsync(function() {
- ttScope.isOpen = true;
- assignIsOpen(true);
- positionTooltip();
- });
- }
-
- function cancelShow() {
- if (showTimeout) {
- $timeout.cancel(showTimeout);
- showTimeout = null;
- }
-
- if (positionTimeout) {
- $timeout.cancel(positionTimeout);
- positionTimeout = null;
- }
- }
-
- // Hide the tooltip popup element.
- function hide() {
- cancelShow();
- cancelHide();
-
- if (!ttScope) {
- return;
- }
-
- // First things first: we don't show it anymore.
- ttScope.$evalAsync(function() {
- ttScope.isOpen = false;
- assignIsOpen(false);
- // And now we remove it from the DOM. However, if we have animation, we
- // need to wait for it to expire beforehand.
- // FIXME: this is a placeholder for a port of the transitions library.
- // The fade transition in TWBS is 150ms.
- if (ttScope.animation) {
- if (!transitionTimeout) {
- transitionTimeout = $timeout(removeTooltip, 150, false);
- }
- } else {
- removeTooltip();
- }
- });
- }
-
- function cancelHide() {
- if (hideTimeout) {
- $timeout.cancel(hideTimeout);
- hideTimeout = null;
- }
- if (transitionTimeout) {
- $timeout.cancel(transitionTimeout);
- transitionTimeout = null;
- }
- }
-
- function createTooltip() {
- // There can only be one tooltip element per directive shown at once.
- if (tooltip) {
- return;
- }
-
- tooltipLinkedScope = ttScope.$new();
- tooltip = tooltipLinker(tooltipLinkedScope, function(tooltip) {
- if (appendToBody) {
- $document.find('body').append(tooltip);
- } else {
- element.after(tooltip);
- }
- });
-
- prepObservers();
- }
-
- function removeTooltip() {
- unregisterObservers();
-
- transitionTimeout = null;
- if (tooltip) {
- tooltip.remove();
- tooltip = null;
- }
- if (tooltipLinkedScope) {
- tooltipLinkedScope.$destroy();
- tooltipLinkedScope = null;
- }
- }
-
- /**
- * Set the inital scope values. Once
- * the tooltip is created, the observers
- * will be added to keep things in synch.
- */
- function prepareTooltip() {
- ttScope.title = attrs[prefix + 'Title'];
- if (contentParse) {
- ttScope.content = contentParse(scope);
- } else {
- ttScope.content = attrs[ttType];
- }
-
- ttScope.popupClass = attrs[prefix + 'Class'];
- ttScope.placement = angular.isDefined(attrs[prefix + 'Placement']) ? attrs[prefix + 'Placement'] : options.placement;
-
- var delay = parseInt(attrs[prefix + 'PopupDelay'], 10);
- var closeDelay = parseInt(attrs[prefix + 'PopupCloseDelay'], 10);
- ttScope.popupDelay = !isNaN(delay) ? delay : options.popupDelay;
- ttScope.popupCloseDelay = !isNaN(closeDelay) ? closeDelay : options.popupCloseDelay;
- }
-
- function assignIsOpen(isOpen) {
- if (isOpenParse && angular.isFunction(isOpenParse.assign)) {
- isOpenParse.assign(scope, isOpen);
- }
- }
-
- ttScope.contentExp = function() {
- return ttScope.content;
- };
-
- /**
- * Observe the relevant attributes.
- */
- attrs.$observe('disabled', function(val) {
- if (val) {
- cancelShow();
- }
-
- if (val && ttScope.isOpen) {
- hide();
- }
- });
-
- if (isOpenParse) {
- scope.$watch(isOpenParse, function(val) {
- /*jshint -W018 */
- if (ttScope && !val === ttScope.isOpen) {
- toggleTooltipBind();
- }
- /*jshint +W018 */
- });
- }
-
- function prepObservers() {
- observers.length = 0;
-
- if (contentParse) {
- observers.push(
- scope.$watch(contentParse, function(val) {
- ttScope.content = val;
- if (!val && ttScope.isOpen) {
- hide();
- }
- })
- );
-
- observers.push(
- tooltipLinkedScope.$watch(function() {
- if (!repositionScheduled) {
- repositionScheduled = true;
- tooltipLinkedScope.$$postDigest(function() {
- repositionScheduled = false;
- if (ttScope && ttScope.isOpen) {
- positionTooltip();
- }
- });
- }
- })
- );
- } else {
- observers.push(
- attrs.$observe(ttType, function(val) {
- ttScope.content = val;
- if (!val && ttScope.isOpen) {
- hide();
- } else {
- positionTooltip();
- }
- })
- );
- }
-
- observers.push(
- attrs.$observe(prefix + 'Title', function(val) {
- ttScope.title = val;
- if (ttScope.isOpen) {
- positionTooltip();
- }
- })
- );
-
- observers.push(
- attrs.$observe(prefix + 'Placement', function(val) {
- ttScope.placement = val ? val : options.placement;
- if (ttScope.isOpen) {
- positionTooltip();
- }
- })
- );
- }
-
- function unregisterObservers() {
- if (observers.length) {
- angular.forEach(observers, function(observer) {
- observer();
- });
- observers.length = 0;
- }
- }
-
- var unregisterTriggers = function() {
- triggers.show.forEach(function(trigger) {
- element.unbind(trigger, showTooltipBind);
- });
- triggers.hide.forEach(function(trigger) {
- trigger.split(' ').forEach(function(hideTrigger) {
- element[0].removeEventListener(hideTrigger, hideTooltipBind);
- });
- });
- };
-
- function prepTriggers() {
- var val = attrs[prefix + 'Trigger'];
- unregisterTriggers();
-
- triggers = getTriggers(val);
-
- if (triggers.show !== 'none') {
- triggers.show.forEach(function(trigger, idx) {
- // Using raw addEventListener due to jqLite/jQuery bug - #4060
- if (trigger === triggers.hide[idx]) {
- element[0].addEventListener(trigger, toggleTooltipBind);
- } else if (trigger) {
- element[0].addEventListener(trigger, showTooltipBind);
- triggers.hide[idx].split(' ').forEach(function(trigger) {
- element[0].addEventListener(trigger, hideTooltipBind);
- });
- }
-
- element.on('keypress', function(e) {
- if (e.which === 27) {
- hideTooltipBind();
- }
- });
- });
- }
- }
-
- prepTriggers();
-
- var animation = scope.$eval(attrs[prefix + 'Animation']);
- ttScope.animation = angular.isDefined(animation) ? !!animation : options.animation;
-
- var appendToBodyVal = scope.$eval(attrs[prefix + 'AppendToBody']);
- appendToBody = angular.isDefined(appendToBodyVal) ? appendToBodyVal : appendToBody;
-
- // if a tooltip is attached to <body> we need to remove it on
- // location change as its parent scope will probably not be destroyed
- // by the change.
- if (appendToBody) {
- scope.$on('$locationChangeSuccess', function closeTooltipOnLocationChangeSuccess() {
- if (ttScope.isOpen) {
- hide();
- }
- });
- }
-
- // Make sure tooltip is destroyed and removed.
- scope.$on('$destroy', function onDestroyTooltip() {
- cancelShow();
- cancelHide();
- unregisterTriggers();
- removeTooltip();
- openedTooltips.remove(ttScope);
- ttScope = null;
- });
- };
- }
- };
- };
- }];
-})
-
-// This is mostly ngInclude code but with a custom scope
-.directive('uibTooltipTemplateTransclude', [
- '$animate', '$sce', '$compile', '$templateRequest',
-function ($animate , $sce , $compile , $templateRequest) {
- return {
- link: function(scope, elem, attrs) {
- var origScope = scope.$eval(attrs.tooltipTemplateTranscludeScope);
-
- var changeCounter = 0,
- currentScope,
- previousElement,
- currentElement;
-
- var cleanupLastIncludeContent = function() {
- if (previousElement) {
- previousElement.remove();
- previousElement = null;
- }
-
- if (currentScope) {
- currentScope.$destroy();
- currentScope = null;
- }
-
- if (currentElement) {
- $animate.leave(currentElement).then(function() {
- previousElement = null;
- });
- previousElement = currentElement;
- currentElement = null;
- }
- };
-
- scope.$watch($sce.parseAsResourceUrl(attrs.uibTooltipTemplateTransclude), function(src) {
- var thisChangeId = ++changeCounter;
-
- if (src) {
- //set the 2nd param to true to ignore the template request error so that the inner
- //contents and scope can be cleaned up.
- $templateRequest(src, true).then(function(response) {
- if (thisChangeId !== changeCounter) { return; }
- var newScope = origScope.$new();
- var template = response;
-
- var clone = $compile(template)(newScope, function(clone) {
- cleanupLastIncludeContent();
- $animate.enter(clone, elem);
- });
-
- currentScope = newScope;
- currentElement = clone;
-
- currentScope.$emit('$includeContentLoaded', src);
- }, function() {
- if (thisChangeId === changeCounter) {
- cleanupLastIncludeContent();
- scope.$emit('$includeContentError', src);
- }
- });
- scope.$emit('$includeContentRequested', src);
- } else {
- cleanupLastIncludeContent();
- }
- });
-
- scope.$on('$destroy', cleanupLastIncludeContent);
- }
- };
-}])
-
-/**
- * Note that it's intentional that these classes are *not* applied through $animate.
- * They must not be animated as they're expected to be present on the tooltip on
- * initialization.
- */
-.directive('uibTooltipClasses', function() {
- return {
- restrict: 'A',
- link: function(scope, element, attrs) {
- if (scope.placement) {
- element.addClass(scope.placement);
- }
-
- if (scope.popupClass) {
- element.addClass(scope.popupClass);
- }
-
- if (scope.animation()) {
- element.addClass(attrs.tooltipAnimationClass);
- }
- }
- };
-})
-
-.directive('uibTooltipPopup', function() {
- return {
- replace: true,
- scope: { content: '@', placement: '@', popupClass: '@', animation: '&', isOpen: '&' },
- templateUrl: 'template/tooltip/tooltip-popup.html',
- link: function(scope, element) {
- element.addClass('tooltip');
- }
- };
-})
-
-.directive('uibTooltip', [ '$uibTooltip', function($uibTooltip) {
- return $uibTooltip('uibTooltip', 'tooltip', 'mouseenter');
-}])
-
-.directive('uibTooltipTemplatePopup', function() {
- return {
- replace: true,
- scope: { contentExp: '&', placement: '@', popupClass: '@', animation: '&', isOpen: '&',
- originScope: '&' },
- templateUrl: 'template/tooltip/tooltip-template-popup.html',
- link: function(scope, element) {
- element.addClass('tooltip');
- }
- };
-})
-
-.directive('uibTooltipTemplate', ['$uibTooltip', function($uibTooltip) {
- return $uibTooltip('uibTooltipTemplate', 'tooltip', 'mouseenter', {
- useContentExp: true
- });
-}])
-
-.directive('uibTooltipHtmlPopup', function() {
- return {
- replace: true,
- scope: { contentExp: '&', placement: '@', popupClass: '@', animation: '&', isOpen: '&' },
- templateUrl: 'template/tooltip/tooltip-html-popup.html',
- link: function(scope, element) {
- element.addClass('tooltip');
- }
- };
-})
-
-.directive('uibTooltipHtml', ['$uibTooltip', function($uibTooltip) {
- return $uibTooltip('uibTooltipHtml', 'tooltip', 'mouseenter', {
- useContentExp: true
- });
-}]);
-
-/* Deprecated tooltip below */
-
-angular.module('ui.bootstrap.tooltip')
-
-.value('$tooltipSuppressWarning', false)
-
-.provider('$tooltip', ['$uibTooltipProvider', function($uibTooltipProvider) {
- angular.extend(this, $uibTooltipProvider);
-
- this.$get = ['$log', '$tooltipSuppressWarning', '$injector', function($log, $tooltipSuppressWarning, $injector) {
- if (!$tooltipSuppressWarning) {
- $log.warn('$tooltip is now deprecated. Use $uibTooltip instead.');
- }
-
- return $injector.invoke($uibTooltipProvider.$get);
- }];
-}])
-
-// This is mostly ngInclude code but with a custom scope
-.directive('tooltipTemplateTransclude', [
- '$animate', '$sce', '$compile', '$templateRequest', '$log', '$tooltipSuppressWarning',
-function ($animate , $sce , $compile , $templateRequest, $log, $tooltipSuppressWarning) {
- return {
- link: function(scope, elem, attrs) {
- if (!$tooltipSuppressWarning) {
- $log.warn('tooltip-template-transclude is now deprecated. Use uib-tooltip-template-transclude instead.');
- }
-
- var origScope = scope.$eval(attrs.tooltipTemplateTranscludeScope);
-
- var changeCounter = 0,
- currentScope,
- previousElement,
- currentElement;
-
- var cleanupLastIncludeContent = function() {
- if (previousElement) {
- previousElement.remove();
- previousElement = null;
- }
- if (currentScope) {
- currentScope.$destroy();
- currentScope = null;
- }
- if (currentElement) {
- $animate.leave(currentElement).then(function() {
- previousElement = null;
- });
- previousElement = currentElement;
- currentElement = null;
- }
- };
-
- scope.$watch($sce.parseAsResourceUrl(attrs.tooltipTemplateTransclude), function(src) {
- var thisChangeId = ++changeCounter;
-
- if (src) {
- //set the 2nd param to true to ignore the template request error so that the inner
- //contents and scope can be cleaned up.
- $templateRequest(src, true).then(function(response) {
- if (thisChangeId !== changeCounter) { return; }
- var newScope = origScope.$new();
- var template = response;
-
- var clone = $compile(template)(newScope, function(clone) {
- cleanupLastIncludeContent();
- $animate.enter(clone, elem);
- });
-
- currentScope = newScope;
- currentElement = clone;
-
- currentScope.$emit('$includeContentLoaded', src);
- }, function() {
- if (thisChangeId === changeCounter) {
- cleanupLastIncludeContent();
- scope.$emit('$includeContentError', src);
- }
- });
- scope.$emit('$includeContentRequested', src);
- } else {
- cleanupLastIncludeContent();
- }
- });
-
- scope.$on('$destroy', cleanupLastIncludeContent);
- }
- };
-}])
-
-.directive('tooltipClasses', ['$log', '$tooltipSuppressWarning', function($log, $tooltipSuppressWarning) {
- return {
- restrict: 'A',
- link: function(scope, element, attrs) {
- if (!$tooltipSuppressWarning) {
- $log.warn('tooltip-classes is now deprecated. Use uib-tooltip-classes instead.');
- }
-
- if (scope.placement) {
- element.addClass(scope.placement);
- }
- if (scope.popupClass) {
- element.addClass(scope.popupClass);
- }
- if (scope.animation()) {
- element.addClass(attrs.tooltipAnimationClass);
- }
- }
- };
-}])
-
-.directive('tooltipPopup', ['$log', '$tooltipSuppressWarning', function($log, $tooltipSuppressWarning) {
- return {
- replace: true,
- scope: { content: '@', placement: '@', popupClass: '@', animation: '&', isOpen: '&' },
- templateUrl: 'template/tooltip/tooltip-popup.html',
- link: function(scope, element) {
- if (!$tooltipSuppressWarning) {
- $log.warn('tooltip-popup is now deprecated. Use uib-tooltip-popup instead.');
- }
-
- element.addClass('tooltip');
- }
- };
-}])
-
-.directive('tooltip', ['$tooltip', function($tooltip) {
- return $tooltip('tooltip', 'tooltip', 'mouseenter');
-}])
-
-.directive('tooltipTemplatePopup', ['$log', '$tooltipSuppressWarning', function($log, $tooltipSuppressWarning) {
- return {
- replace: true,
- scope: { contentExp: '&', placement: '@', popupClass: '@', animation: '&', isOpen: '&',
- originScope: '&' },
- templateUrl: 'template/tooltip/tooltip-template-popup.html',
- link: function(scope, element) {
- if (!$tooltipSuppressWarning) {
- $log.warn('tooltip-template-popup is now deprecated. Use uib-tooltip-template-popup instead.');
- }
-
- element.addClass('tooltip');
- }
- };
-}])
-
-.directive('tooltipTemplate', ['$tooltip', function($tooltip) {
- return $tooltip('tooltipTemplate', 'tooltip', 'mouseenter', {
- useContentExp: true
- });
-}])
-
-.directive('tooltipHtmlPopup', ['$log', '$tooltipSuppressWarning', function($log, $tooltipSuppressWarning) {
- return {
- replace: true,
- scope: { contentExp: '&', placement: '@', popupClass: '@', animation: '&', isOpen: '&' },
- templateUrl: 'template/tooltip/tooltip-html-popup.html',
- link: function(scope, element) {
- if (!$tooltipSuppressWarning) {
- $log.warn('tooltip-html-popup is now deprecated. Use uib-tooltip-html-popup instead.');
- }
-
- element.addClass('tooltip');
- }
- };
-}])
-
-.directive('tooltipHtml', ['$tooltip', function($tooltip) {
- return $tooltip('tooltipHtml', 'tooltip', 'mouseenter', {
- useContentExp: true
- });
-}]);
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/typeahead/docs/demo.html b/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/typeahead/docs/demo.html
deleted file mode 100644
index ff4dea9..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/typeahead/docs/demo.html
+++ /dev/null
@@ -1,74 +0,0 @@
-<style>
- .typeahead-demo .custom-popup-wrapper {
- position: absolute;
- top: 100%;
- left: 0;
- z-index: 1000;
- display: none;
- background-color: #f9f9f9;
- }
-
- .typeahead-demo .custom-popup-wrapper > .message {
- padding: 10px 20px;
- border-bottom: 1px solid #ddd;
- color: #868686;
- }
-
- .typeahead-demo .custom-popup-wrapper > .dropdown-menu {
- position: static;
- float: none;
- display: block;
- min-width: 160px;
- background-color: transparent;
- border: none;
- border-radius: 0;
- box-shadow: none;
- }
-</style>
-
-<script type="text/ng-template" id="customTemplate.html">
- <a>
- <img ng-src="http://upload.wikimedia.org/wikipedia/commons/thumb/{{match.model.flag}}" width="16">
- <span ng-bind-html="match.label | uibTypeaheadHighlight:query"></span>
- </a>
-</script>
-
-<script type="text/ng-template" id="customPopupTemplate.html">
- <div class="custom-popup-wrapper"
- ng-style="{top: position().top+'px', left: position().left+'px'}"
- style="display: block;"
- ng-show="isOpen() && !moveInProgress"
- aria-hidden="{{!isOpen()}}">
- <p class="message">select location from drop down.</p>
-
- <ul class="dropdown-menu" role="listbox">
- <li ng-repeat="match in matches track by $index" ng-class="{active: isActive($index) }"
- ng-mouseenter="selectActive($index)" ng-click="selectMatch($index)" role="option" id="{{::match.id}}">
- <div uib-typeahead-match index="$index" match="match" query="query" template-url="templateUrl"></div>
- </li>
- </ul>
- </div>
-</script>
-
-<div class='container-fluid typeahead-demo' ng-controller="TypeaheadCtrl">
-
- <h4>Static arrays</h4>
- <pre>Model: {{selected | json}}</pre>
- <input type="text" ng-model="selected" uib-typeahead="state for state in states | filter:$viewValue | limitTo:8" class="form-control">
-
- <h4>Asynchronous results</h4>
- <pre>Model: {{asyncSelected | json}}</pre>
- <input type="text" ng-model="asyncSelected" placeholder="Locations loaded via $http" uib-typeahead="address for address in getLocation($viewValue)" typeahead-loading="loadingLocations" typeahead-no-results="noResults" class="form-control">
- <i ng-show="loadingLocations" class="glyphicon glyphicon-refresh"></i>
- <div ng-show="noResults">
- <i class="glyphicon glyphicon-remove"></i> No Results Found
- </div>
-
- <h4>Custom templates for results</h4>
- <pre>Model: {{customSelected | json}}</pre>
- <input type="text" ng-model="customSelected" placeholder="Custom template" uib-typeahead="state as state.name for state in statesWithFlags | filter:{name:$viewValue}" typeahead-template-url="customTemplate.html" class="form-control">
-
- <h4>Custom popup templates for typeahead's dropdown</h4>
- <pre>Model: {{customPopupSelected | json}}</pre>
- <input type="text" ng-model="customPopupSelected" placeholder="Custom popup template" uib-typeahead="state as state.name for state in statesWithFlags | filter:{name:$viewValue}" typeahead-popup-template-url="customPopupTemplate.html" class="form-control">
-</div>
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/typeahead/docs/demo.js b/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/typeahead/docs/demo.js
deleted file mode 100644
index 0148ec4..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/typeahead/docs/demo.js
+++ /dev/null
@@ -1,20 +0,0 @@
-angular.module('ui.bootstrap.demo').controller('TypeaheadCtrl', function($scope, $http) {
-
- $scope.selected = undefined;
- $scope.states = ['Alabama', 'Alaska', 'Arizona', 'Arkansas', 'California', 'Colorado', 'Connecticut', 'Delaware', 'Florida', 'Georgia', 'Hawaii', 'Idaho', 'Illinois', 'Indiana', 'Iowa', 'Kansas', 'Kentucky', 'Louisiana', 'Maine', 'Maryland', 'Massachusetts', 'Michigan', 'Minnesota', 'Mississippi', 'Missouri', 'Montana', 'Nebraska', 'Nevada', 'New Hampshire', 'New Jersey', 'New Mexico', 'New York', 'North Dakota', 'North Carolina', 'Ohio', 'Oklahoma', 'Oregon', 'Pennsylvania', 'Rhode Island', 'South Carolina', 'South Dakota', 'Tennessee', 'Texas', 'Utah', 'Vermont', 'Virginia', 'Washington', 'West Virginia', 'Wisconsin', 'Wyoming'];
- // Any function returning a promise object can be used to load values asynchronously
- $scope.getLocation = function(val) {
- return $http.get('//maps.googleapis.com/maps/api/geocode/json', {
- params: {
- address: val,
- sensor: false
- }
- }).then(function(response){
- return response.data.results.map(function(item){
- return item.formatted_address;
- });
- });
- };
-
- $scope.statesWithFlags = [{'name':'Alabama','flag':'5/5c/Flag_of_Alabama.svg/45px-Flag_of_Alabama.svg.png'},{'name':'Alaska','flag':'e/e6/Flag_of_Alaska.svg/43px-Flag_of_Alaska.svg.png'},{'name':'Arizona','flag':'9/9d/Flag_of_Arizona.svg/45px-Flag_of_Arizona.svg.png'},{'name':'Arkansas','flag':'9/9d/Flag_of_Arkansas.svg/45px-Flag_of_Arkansas.svg.png'},{'name':'California','flag':'0/01/Flag_of_California.svg/45px-Flag_of_California.svg.png'},{'name':'Colorado','flag':'4/46/Flag_of_Colorado.svg/45px-Flag_of_Colorado.svg.png'},{'name':'Connecticut','flag':'9/96/Flag_of_Connecticut.svg/39px-Flag_of_Connecticut.svg.png'},{'name':'Delaware','flag':'c/c6/Flag_of_Delaware.svg/45px-Flag_of_Delaware.svg.png'},{'name':'Florida','flag':'f/f7/Flag_of_Florida.svg/45px-Flag_of_Florida.svg.png'},{'name':'Georgia','flag':'5/54/Flag_of_Georgia_%28U.S._state%29.svg/46px-Flag_of_Georgia_%28U.S._state%29.svg.png'},{'name':'Hawaii','flag':'e/ef/Flag_of_Hawaii.svg/46px-Flag_of_Hawaii.svg.png'},{'name':'Idaho','flag':'a/a4/Flag_of_Idaho.svg/38px-Flag_of_Idaho.svg.png'},{'name':'Illinois','flag':'0/01/Flag_of_Illinois.svg/46px-Flag_of_Illinois.svg.png'},{'name':'Indiana','flag':'a/ac/Flag_of_Indiana.svg/45px-Flag_of_Indiana.svg.png'},{'name':'Iowa','flag':'a/aa/Flag_of_Iowa.svg/44px-Flag_of_Iowa.svg.png'},{'name':'Kansas','flag':'d/da/Flag_of_Kansas.svg/46px-Flag_of_Kansas.svg.png'},{'name':'Kentucky','flag':'8/8d/Flag_of_Kentucky.svg/46px-Flag_of_Kentucky.svg.png'},{'name':'Louisiana','flag':'e/e0/Flag_of_Louisiana.svg/46px-Flag_of_Louisiana.svg.png'},{'name':'Maine','flag':'3/35/Flag_of_Maine.svg/45px-Flag_of_Maine.svg.png'},{'name':'Maryland','flag':'a/a0/Flag_of_Maryland.svg/45px-Flag_of_Maryland.svg.png'},{'name':'Massachusetts','flag':'f/f2/Flag_of_Massachusetts.svg/46px-Flag_of_Massachusetts.svg.png'},{'name':'Michigan','flag':'b/b5/Flag_of_Michigan.svg/45px-Flag_of_Michigan.svg.png'},{'name':'Minnesota','flag':'b/b9/Flag_of_Minnesota.svg/46px-Flag_of_Minnesota.svg.png'},{'name':'Mississippi','flag':'4/42/Flag_of_Mississippi.svg/45px-Flag_of_Mississippi.svg.png'},{'name':'Missouri','flag':'5/5a/Flag_of_Missouri.svg/46px-Flag_of_Missouri.svg.png'},{'name':'Montana','flag':'c/cb/Flag_of_Montana.svg/45px-Flag_of_Montana.svg.png'},{'name':'Nebraska','flag':'4/4d/Flag_of_Nebraska.svg/46px-Flag_of_Nebraska.svg.png'},{'name':'Nevada','flag':'f/f1/Flag_of_Nevada.svg/45px-Flag_of_Nevada.svg.png'},{'name':'New Hampshire','flag':'2/28/Flag_of_New_Hampshire.svg/45px-Flag_of_New_Hampshire.svg.png'},{'name':'New Jersey','flag':'9/92/Flag_of_New_Jersey.svg/45px-Flag_of_New_Jersey.svg.png'},{'name':'New Mexico','flag':'c/c3/Flag_of_New_Mexico.svg/45px-Flag_of_New_Mexico.svg.png'},{'name':'New York','flag':'1/1a/Flag_of_New_York.svg/46px-Flag_of_New_York.svg.png'},{'name':'North Carolina','flag':'b/bb/Flag_of_North_Carolina.svg/45px-Flag_of_North_Carolina.svg.png'},{'name':'North Dakota','flag':'e/ee/Flag_of_North_Dakota.svg/38px-Flag_of_North_Dakota.svg.png'},{'name':'Ohio','flag':'4/4c/Flag_of_Ohio.svg/46px-Flag_of_Ohio.svg.png'},{'name':'Oklahoma','flag':'6/6e/Flag_of_Oklahoma.svg/45px-Flag_of_Oklahoma.svg.png'},{'name':'Oregon','flag':'b/b9/Flag_of_Oregon.svg/46px-Flag_of_Oregon.svg.png'},{'name':'Pennsylvania','flag':'f/f7/Flag_of_Pennsylvania.svg/45px-Flag_of_Pennsylvania.svg.png'},{'name':'Rhode Island','flag':'f/f3/Flag_of_Rhode_Island.svg/32px-Flag_of_Rhode_Island.svg.png'},{'name':'South Carolina','flag':'6/69/Flag_of_South_Carolina.svg/45px-Flag_of_South_Carolina.svg.png'},{'name':'South Dakota','flag':'1/1a/Flag_of_South_Dakota.svg/46px-Flag_of_South_Dakota.svg.png'},{'name':'Tennessee','flag':'9/9e/Flag_of_Tennessee.svg/46px-Flag_of_Tennessee.svg.png'},{'name':'Texas','flag':'f/f7/Flag_of_Texas.svg/45px-Flag_of_Texas.svg.png'},{'name':'Utah','flag':'f/f6/Flag_of_Utah.svg/45px-Flag_of_Utah.svg.png'},{'name':'Vermont','flag':'4/49/Flag_of_Vermont.svg/46px-Flag_of_Vermont.svg.png'},{'name':'Virginia','flag':'4/47/Flag_of_Virginia.svg/44px-Flag_of_Virginia.svg.png'},{'name':'Washington','flag':'5/54/Flag_of_Washington.svg/46px-Flag_of_Washington.svg.png'},{'name':'West Virginia','flag':'2/22/Flag_of_West_Virginia.svg/46px-Flag_of_West_Virginia.svg.png'},{'name':'Wisconsin','flag':'2/22/Flag_of_Wisconsin.svg/45px-Flag_of_Wisconsin.svg.png'},{'name':'Wyoming','flag':'b/bc/Flag_of_Wyoming.svg/43px-Flag_of_Wyoming.svg.png'}];
-});
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/typeahead/docs/readme.md b/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/typeahead/docs/readme.md
deleted file mode 100644
index e5539fd..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/typeahead/docs/readme.md
+++ /dev/null
@@ -1,80 +0,0 @@
-Typeahead is a AngularJS version of [Bootstrap v2's typeahead plugin](http://getbootstrap.com/2.3.2/javascript.html#typeahead).
-This directive can be used to quickly create elegant typeaheads with any form text input.
-
-It is very well integrated into AngularJS as it uses a subset of the
-[select directive](http://docs.angularjs.org/api/ng.directive:select) syntax, which is very flexible. Supported expressions are:
-
-* _label_ for _value_ in _sourceArray_
-* _select_ as _label_ for _value_ in _sourceArray_
-
-The `sourceArray` expression can use a special `$viewValue` variable that corresponds to the value entered inside the input.
-
-This directive works with promises, meaning you can retrieve matches using the `$http` service with minimal effort.
-
-The typeahead directives provide several attributes:
-
-* `ng-model` <i class="glyphicon glyphicon-eye-open"></i>
- :
- Assignable angular expression to data-bind to
-
-* `typeahead` <i class="glyphicon glyphicon-eye-open"></i>
- :
- Comprehension Angular expression (see [select directive](http://docs.angularjs.org/api/ng.directive:select))
-
-* `typeahead-append-to-body` <i class="glyphicon glyphicon-eye-open"></i>
- _(Defaults: false)_ : Should the typeahead popup be appended to $body instead of the parent element?
-
-* `typeahead-append-to-element-id`
- _(Defaults: false)_ : Should the typeahead popup be appended to an element id instead of the parent element?
-
-* `typeahead-editable`
- _(Defaults: true)_ :
- Should it restrict model values to the ones selected from the popup only ?
-
-* `typeahead-focus-first`
- _(Defaults: true)_ :
- Should the first match automatically be focused as you type?
-
-* `typeahead-input-formatter` <i class="glyphicon glyphicon-eye-open"></i>
- _(Defaults: undefined)_ :
- Format the ng-model result after selection
-
-* `typeahead-loading` <i class="glyphicon glyphicon-eye-open"></i>
- _(Defaults: angular.noop)_ :
- Binding to a variable that indicates if matches are being retrieved asynchronously
-
-* `typeahead-min-length` <i class="glyphicon glyphicon-eye-open"></i>
- _(Defaults: 1)_ :
- Minimal no of characters that needs to be entered before typeahead kicks-in. Must be greater than or equal to 1.
-
-* `typeahead-no-results` <i class="glyphicon glyphicon-eye-open"></i>
- _(Defaults: angular.noop)_ :
- Binding to a variable that indicates if no matching results were found
-
-* `typeahead-on-select($item, $model, $label)`
- _(Defaults: null)_ :
- A callback executed when a match is selected
-
-* `typeahead-select-on-exact`
- _(Defaults: false)_ :
- Should it automatically select an item when there is one option that exactly matches the user input?
-
-* `typeahead-template-url` <i class="glyphicon glyphicon-eye-open"></i>
- :
- Set custom item template
-
-* `typeahead-popup-template-url`
- _(Defaults: `template/typeahead/typeahead-popup.html`)_ :
- Set custom popup template
-
-* `typeahead-wait-ms` <i class="glyphicon glyphicon-eye-open"></i>
- _(Defaults: 0)_ :
- Minimal wait time after last character typed before typeahead kicks-in
-
-* `typeahead-select-on-blur`
- _(Defaults: false)_ :
- On blur, select the currently highlighted match
-
-* `typeahead-focus-on-select`
- _(Defaults: true) :
- On selection, focus the input element the typeahead directive is associated with
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/typeahead/test/typeahead-highlight-ngsanitize.spec.js b/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/typeahead/test/typeahead-highlight-ngsanitize.spec.js
deleted file mode 100644
index de24319..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/typeahead/test/typeahead-highlight-ngsanitize.spec.js
+++ /dev/null
@@ -1,16 +0,0 @@
-describe('Security concerns', function() {
- var highlightFilter, $sanitize, logSpy;
-
- beforeEach(module('ui.bootstrap.typeahead', 'ngSanitize'));
-
- beforeEach(inject(function (uibTypeaheadHighlightFilter, _$sanitize_, $log) {
- highlightFilter = uibTypeaheadHighlightFilter;
- $sanitize = _$sanitize_;
- logSpy = spyOn($log, 'warn');
- }));
-
- it('should not call the $log service when ngSanitize is present', function() {
- highlightFilter('before <script src="">match</script> after', 'match');
- expect(logSpy).not.toHaveBeenCalled();
- });
-});
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/typeahead/test/typeahead-highlight.spec.js b/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/typeahead/test/typeahead-highlight.spec.js
deleted file mode 100644
index c696587..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/typeahead/test/typeahead-highlight.spec.js
+++ /dev/null
@@ -1,80 +0,0 @@
-describe('typeaheadHighlight', function () {
-
- var highlightFilter, $log, $sce, logSpy;
-
- beforeEach(module('ui.bootstrap.typeahead'));
-
- beforeEach(inject(function(_$log_, _$sce_) {
- $log = _$log_;
- $sce = _$sce_;
- logSpy = spyOn($log, 'warn');
- }));
-
- beforeEach(inject(function(uibTypeaheadHighlightFilter) {
- highlightFilter = uibTypeaheadHighlightFilter;
- }));
-
- it('should higlight a match', function() {
- expect($sce.getTrustedHtml(highlightFilter('before match after', 'match'))).toEqual('before <strong>match</strong> after');
- });
-
- it('should higlight a match with mixed case', function() {
- expect($sce.getTrustedHtml(highlightFilter('before MaTch after', 'match'))).toEqual('before <strong>MaTch</strong> after');
- });
-
- it('should higlight all matches', function() {
- expect($sce.getTrustedHtml(highlightFilter('before MaTch after match', 'match'))).toEqual('before <strong>MaTch</strong> after <strong>match</strong>');
- });
-
- it('should do nothing if no match', function() {
- expect($sce.getTrustedHtml(highlightFilter('before match after', 'nomatch'))).toEqual('before match after');
- });
-
- it('should do nothing if no or empty query', function() {
- expect($sce.getTrustedHtml(highlightFilter('before match after', ''))).toEqual('before match after');
- expect($sce.getTrustedHtml(highlightFilter('before match after', null))).toEqual('before match after');
- expect($sce.getTrustedHtml(highlightFilter('before match after', undefined))).toEqual('before match after');
- });
-
- it('issue 316 - should work correctly for regexp reserved words', function() {
- expect($sce.getTrustedHtml(highlightFilter('before (match after', '(match'))).toEqual('before <strong>(match</strong> after');
- });
-
- it('issue 1777 - should work correctly with numeric values', function() {
- expect($sce.getTrustedHtml(highlightFilter(123, '2'))).toEqual('1<strong>2</strong>3');
- });
-
- it('should show a warning when this component is being used unsafely', function() {
- highlightFilter('<i>before</i> match after', 'match');
- expect(logSpy).toHaveBeenCalled();
- });
-});
-
-/* Deprecation tests below */
-
-describe('typeahead highlightFilter deprecated', function(){
- var highlightFilter, $log, $sce, logSpy;
-
- beforeEach(module('ui.bootstrap.typeahead'));
-
- it('should supress the warning by default', function(){
- module(function($provide) {
- $provide.value('$typeaheadSuppressWarning', true);
- });
-
- inject(function($compile, $log, $rootScope, typeaheadHighlightFilter, $sce){
- spyOn($log, 'warn');
- var highlightFilter = typeaheadHighlightFilter;
- $sce.getTrustedHtml(highlightFilter('before match after', 'match'));
- expect($log.warn.calls.count()).toBe(0);
- });
- });
-
- it('should decrecate typeaheadHighlightFilter', inject(function($compile, $log, $rootScope, typeaheadHighlightFilter, $sce){
- spyOn($log, 'warn');
- var highlightFilter = typeaheadHighlightFilter;
- $sce.getTrustedHtml(highlightFilter('before match after', 'match'));
- expect($log.warn.calls.count()).toBe(1);
- expect($log.warn.calls.argsFor(0)).toEqual(['typeaheadHighlight is now deprecated. Use uibTypeaheadHighlight instead.']);
- }));
-});
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/typeahead/test/typeahead-parser.spec.js b/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/typeahead/test/typeahead-parser.spec.js
deleted file mode 100644
index f19aec5..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/typeahead/test/typeahead-parser.spec.js
+++ /dev/null
@@ -1,79 +0,0 @@
-describe('syntax parser', function() {
- var typeaheadParser, scope, filterFilter;
-
- beforeEach(module('ui.bootstrap.typeahead'));
- beforeEach(inject(function(_$rootScope_, _filterFilter_, _typeaheadParser_) {
- typeaheadParser = _typeaheadParser_;
- scope = _$rootScope_;
- filterFilter = _filterFilter_;
- }));
-
- it('should parse the simplest array-based syntax', function() {
- scope.states = ['Alabama', 'California', 'Delaware'];
- var result = typeaheadParser.parse('state for state in states | filter:$viewValue');
-
- var itemName = result.itemName;
- var locals = {$viewValue:'al'};
- expect(result.source(scope, locals)).toEqual(['Alabama', 'California']);
-
- locals[itemName] = 'Alabama';
- expect(result.viewMapper(scope, locals)).toEqual('Alabama');
- expect(result.modelMapper(scope, locals)).toEqual('Alabama');
- });
-
- it('should parse the simplest function-based syntax', function() {
- scope.getStates = function($viewValue) {
- return filterFilter(['Alabama', 'California', 'Delaware'], $viewValue);
- };
- var result = typeaheadParser.parse('state for state in getStates($viewValue)');
-
- var itemName = result.itemName;
- var locals = {$viewValue:'al'};
- expect(result.source(scope, locals)).toEqual(['Alabama', 'California']);
-
- locals[itemName] = 'Alabama';
- expect(result.viewMapper(scope, locals)).toEqual('Alabama');
- expect(result.modelMapper(scope, locals)).toEqual('Alabama');
- });
-
- it('should allow to specify custom model mapping that is used as a label as well', function () {
- scope.states = [
- {code:'AL', name:'Alabama'},
- {code:'CA', name:'California'},
- {code:'DE', name:'Delaware'}
- ];
- var result = typeaheadParser.parse('state.name for state in states | filter:$viewValue | orderBy:"name":true');
-
- var itemName = result.itemName;
- expect(itemName).toEqual('state');
- expect(result.source(scope, {$viewValue:'al'})).toEqual([
- {code:'CA', name:'California'},
- {code:'AL', name:'Alabama'}
- ]);
-
- var locals = {$viewValue:'al'};
- locals[itemName] = {code:'AL', name:'Alabama'};
- expect(result.viewMapper(scope, locals)).toEqual('Alabama');
- expect(result.modelMapper(scope, locals)).toEqual('Alabama');
- });
-
- it('should allow to specify custom view and model mappers', function() {
- scope.states = [
- {code:'AL', name:'Alabama'},
- {code:'CA', name:'California'},
- {code:'DE', name:'Delaware'}
- ];
- var result = typeaheadParser.parse('state.code as state.name + " ("+state.code+")" for state in states | filter:$viewValue | orderBy:"name":true');
-
- var itemName = result.itemName;
- expect(result.source(scope, {$viewValue:'al'})).toEqual([
- {code:'CA', name:'California'},
- {code:'AL', name:'Alabama'}
- ]);
-
- var locals = {$viewValue:'al'};
- locals[itemName] = {code:'AL', name:'Alabama'};
- expect(result.viewMapper(scope, locals)).toEqual('Alabama (AL)');
- expect(result.modelMapper(scope, locals)).toEqual('AL');
- });
-});
\ No newline at end of file
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/typeahead/test/typeahead-popup.spec.js b/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/typeahead/test/typeahead-popup.spec.js
deleted file mode 100644
index 6393660..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/typeahead/test/typeahead-popup.spec.js
+++ /dev/null
@@ -1,101 +0,0 @@
-describe('typeaheadPopup - result rendering', function() {
- var scope, $rootScope, $compile;
-
- beforeEach(module('ui.bootstrap.typeahead'));
- beforeEach(module('template/typeahead/typeahead-popup.html'));
- beforeEach(module('template/typeahead/typeahead-match.html'));
- beforeEach(inject(function(_$rootScope_, _$compile_) {
- $rootScope = _$rootScope_;
- scope = $rootScope.$new();
- $compile = _$compile_;
- }));
-
- it('should render initial results', function() {
- scope.matches = ['foo', 'bar', 'baz'];
- scope.active = 1;
-
- var el = $compile('<div><uib-typeahead-popup matches="matches" active="active" select="select(activeIdx)"></uib-typeahead-popup></div>')(scope);
- $rootScope.$digest();
-
- var liElems = el.find('li');
- expect(liElems.length).toEqual(3);
- expect(liElems.eq(0)).not.toHaveClass('active');
- expect(liElems.eq(1)).toHaveClass('active');
- expect(liElems.eq(2)).not.toHaveClass('active');
- });
-
- it('should change active item on mouseenter', function() {
- scope.matches = ['foo', 'bar', 'baz'];
- scope.active = 1;
-
- var el = $compile('<div><uib-typeahead-popup matches="matches" active="active" select="select(activeIdx)"></uib-typeahead-popup></div>')(scope);
- $rootScope.$digest();
-
- var liElems = el.find('li');
- expect(liElems.eq(1)).toHaveClass('active');
- expect(liElems.eq(2)).not.toHaveClass('active');
-
- liElems.eq(2).trigger('mouseenter');
-
- expect(liElems.eq(1)).not.toHaveClass('active');
- expect(liElems.eq(2)).toHaveClass('active');
- });
-
- it('should select an item on mouse click', function() {
- scope.matches = ['foo', 'bar', 'baz'];
- scope.active = 1;
- $rootScope.select = angular.noop;
- spyOn($rootScope, 'select');
-
- var el = $compile('<div><uib-typeahead-popup matches="matches" active="active" select="select(activeIdx)"></uib-typeahead-popup></div>')(scope);
- $rootScope.$digest();
-
- var liElems = el.find('li');
- liElems.eq(2).find('a').trigger('click');
- expect($rootScope.select).toHaveBeenCalledWith(2);
- });
-});
-
-/* Deprecation tests below */
-
-describe('typeaheadPopup deprecation', function() {
- beforeEach(module('ui.bootstrap.typeahead'));
- beforeEach(module('ngSanitize'));
- beforeEach(module('template/typeahead/typeahead-popup.html'));
- beforeEach(module('template/typeahead/typeahead-match.html'));
-
- it('should suppress warning', function() {
- module(function($provide) {
- $provide.value('$typeaheadSuppressWarning', true);
- });
-
- inject(function($compile, $log, $rootScope) {
- var scope = $rootScope.$new();
- scope.matches = ['foo', 'bar', 'baz'];
- scope.active = 1;
- $rootScope.select = angular.noop;
- spyOn($log, 'warn');
-
- var element = '<div><typeahead-popup matches="matches" active="active" select="select(activeIdx)"></typeahead-popup></div>';
- element = $compile(element)(scope);
- $rootScope.$digest();
- expect($log.warn.calls.count()).toBe(0);
- });
- });
-
- it('should give warning by default', inject(function($compile, $log, $rootScope) {
- var scope = $rootScope.$new();
- scope.matches = ['foo', 'bar', 'baz'];
- scope.active = 1;
- $rootScope.select = angular.noop;
- spyOn($log, 'warn');
-
- var element = '<div><typeahead-popup matches="matches" active="active" select="select(activeIdx)"></typeahead-popup></div>';
- element = $compile(element)(scope);
-
- $rootScope.$digest();
-
- expect($log.warn.calls.count()).toBe(1);
- expect($log.warn.calls.argsFor(0)).toEqual(['typeahead-popup is now deprecated. Use uib-typeahead-popup instead.']);
- }));
-});
\ No newline at end of file
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/typeahead/test/typeahead.spec.js b/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/typeahead/test/typeahead.spec.js
deleted file mode 100644
index 040a228..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/typeahead/test/typeahead.spec.js
+++ /dev/null
@@ -1,1097 +0,0 @@
-describe('typeahead tests', function() {
- var $scope, $compile, $document, $templateCache, $timeout, $window;
- var changeInputValueTo;
-
- beforeEach(module('ui.bootstrap.typeahead'));
- beforeEach(module('ngSanitize'));
- beforeEach(module('template/typeahead/typeahead-popup.html'));
- beforeEach(module('template/typeahead/typeahead-match.html'));
- beforeEach(module(function($compileProvider) {
- $compileProvider.directive('formatter', function() {
- return {
- require: 'ngModel',
- link: function (scope, elm, attrs, ngModelCtrl) {
- ngModelCtrl.$formatters.unshift(function(viewVal) {
- return 'formatted' + viewVal;
- });
- }
- };
- });
- $compileProvider.directive('childDirective', function() {
- return {
- restrict: 'A',
- require: '^parentDirective',
- link: function(scope, element, attrs, ctrl) {}
- };
- });
- }));
- beforeEach(inject(function(_$rootScope_, _$compile_, _$document_, _$templateCache_, _$timeout_, _$window_, $sniffer) {
- $scope = _$rootScope_;
- $scope.source = ['foo', 'bar', 'baz'];
- $scope.states = [
- {code: 'AL', name: 'Alaska'},
- {code: 'CL', name: 'California'}
- ];
- $compile = _$compile_;
- $document = _$document_;
- $templateCache = _$templateCache_;
- $timeout = _$timeout_;
- $window = _$window_;
- changeInputValueTo = function(element, value) {
- var inputEl = findInput(element);
- inputEl.val(value);
- inputEl.trigger($sniffer.hasEvent('input') ? 'input' : 'change');
- $scope.$digest();
- };
- }));
-
- //utility functions
- var prepareInputEl = function(inputTpl) {
- var el = $compile(angular.element(inputTpl))($scope);
- $scope.$digest();
- return el;
- };
-
- var findInput = function(element) {
- return element.find('input');
- };
-
- var findDropDown = function(element) {
- return element.find('ul.dropdown-menu');
- };
-
- var findMatches = function(element) {
- return findDropDown(element).find('li');
- };
-
- var triggerKeyDown = function(element, keyCode) {
- var inputEl = findInput(element);
- var e = $.Event('keydown');
- e.which = keyCode;
- inputEl.trigger(e);
- };
-
- //custom matchers
- beforeEach(function () {
- jasmine.addMatchers({
- toBeClosed: function(util, customEqualityTesters) {
- return {
- compare: function(actual, expected) {
- var typeaheadEl = findDropDown(actual);
-
- var result = {
- pass: util.equals(typeaheadEl.hasClass('ng-hide'), true, customEqualityTesters)
- };
-
- if (result.pass) {
- result.message = 'Expected "' + angular.mock.dump(typeaheadEl) + '" not to be closed.';
- } else {
- result.message = 'Expected "' + angular.mock.dump(typeaheadEl) + '" to be closed.';
- }
-
- return result;
- }
- };
- },
- toBeOpenWithActive: function(util, customEqualityTesters) {
- return {
- compare: function(actual, noOfMatches, activeIdx) {
- var typeaheadEl = findDropDown(actual);
- var liEls = findMatches(actual);
-
- var result = {
- pass: util.equals(typeaheadEl.length, 1, customEqualityTesters) &&
- util.equals(typeaheadEl.hasClass('ng-hide'), false, customEqualityTesters) &&
- util.equals(liEls.length, noOfMatches, customEqualityTesters) &&
- activeIdx === -1 ? !$(liEls).hasClass('active') : $(liEls[activeIdx]).hasClass('active')
- };
-
- if (result.pass) {
- result.message = 'Expected "' + actual + '" not to be opened.';
- } else {
- result.message = 'Expected "' + actual + '" to be opened.';
- }
-
- return result;
- }
- };
- }
- });
- });
-
- afterEach(function() {
- findDropDown($document.find('body')).remove();
- });
-
- //coarse grained, "integration" tests
- describe('initial state and model changes', function() {
- it('should be closed by default', function() {
- var element = prepareInputEl('<div><input ng-model="result" uib-typeahead="item for item in source"></div>');
- expect(element).toBeClosed();
- });
-
- it('should correctly render initial state if the "as" keyword is used', function() {
- $scope.result = $scope.states[0];
-
- var element = prepareInputEl('<div><input ng-model="result" uib-typeahead="state as state.name for state in states"></div>');
- var inputEl = findInput(element);
-
- expect(inputEl.val()).toEqual('Alaska');
- });
-
- it('should default to bound model for initial rendering if there is not enough info to render label', function() {
- $scope.result = $scope.states[0].code;
-
- var element = prepareInputEl('<div><input ng-model="result" uib-typeahead="state.code as state.name + state.code for state in states"></div>');
- var inputEl = findInput(element);
-
- expect(inputEl.val()).toEqual('AL');
- });
-
- it('should not get open on model change', function() {
- var element = prepareInputEl('<div><input ng-model="result" uib-typeahead="item for item in source"></div>');
- $scope.$apply(function () {
- $scope.result = 'foo';
- });
- expect(element).toBeClosed();
- });
- });
-
- describe('basic functionality', function() {
- it('should open and close typeahead based on matches', function() {
- var element = prepareInputEl('<div><input ng-model="result" uib-typeahead="item for item in source | filter:$viewValue"></div>');
- var inputEl = findInput(element);
- var ownsId = inputEl.attr('aria-owns');
-
- expect(inputEl.attr('aria-expanded')).toBe('false');
- expect(inputEl.attr('aria-activedescendant')).toBeUndefined();
-
- changeInputValueTo(element, 'ba');
- expect(element).toBeOpenWithActive(2, 0);
- expect(findDropDown(element).attr('id')).toBe(ownsId);
- expect(inputEl.attr('aria-expanded')).toBe('true');
- var activeOptionId = ownsId + '-option-0';
- expect(inputEl.attr('aria-activedescendant')).toBe(activeOptionId);
- expect(findDropDown(element).find('li.active').attr('id')).toBe(activeOptionId);
-
- changeInputValueTo(element, '');
- expect(element).toBeClosed();
- expect(inputEl.attr('aria-expanded')).toBe('false');
- expect(inputEl.attr('aria-activedescendant')).toBeUndefined();
- });
-
- it('should allow expressions over multiple lines', function() {
- var element = prepareInputEl('<div><input ng-model="result" uib-typeahead="item for item in source \n' +
- '| filter:$viewValue"></div>');
- changeInputValueTo(element, 'ba');
- expect(element).toBeOpenWithActive(2, 0);
-
- changeInputValueTo(element, '');
- expect(element).toBeClosed();
- });
-
- it('should not open typeahead if input value smaller than a defined threshold', function() {
- var element = prepareInputEl('<div><input ng-model="result" uib-typeahead="item for item in source | filter:$viewValue" typeahead-min-length="2"></div>');
- changeInputValueTo(element, 'b');
- expect(element).toBeClosed();
- });
-
- it('should support custom model selecting function', function() {
- $scope.updaterFn = function(selectedItem) {
- return 'prefix' + selectedItem;
- };
- var element = prepareInputEl('<div><input ng-model="result" uib-typeahead="updaterFn(item) as item for item in source | filter:$viewValue"></div>');
- changeInputValueTo(element, 'f');
- triggerKeyDown(element, 13);
- expect($scope.result).toEqual('prefixfoo');
- });
-
- it('should support custom label rendering function', function() {
- $scope.formatterFn = function(sourceItem) {
- return 'prefix' + sourceItem;
- };
-
- var element = prepareInputEl('<div><input ng-model="result" uib-typeahead="item as formatterFn(item) for item in source | filter:$viewValue"></div>');
- changeInputValueTo(element, 'fo');
- var matchHighlight = findMatches(element).find('a').html();
- expect(matchHighlight).toEqual('prefix<strong>fo</strong>o');
- });
-
- it('should by default bind view value to model even if not part of matches', function() {
- var element = prepareInputEl('<div><input ng-model="result" uib-typeahead="item for item in source | filter:$viewValue"></div>');
- changeInputValueTo(element, 'not in matches');
- expect($scope.result).toEqual('not in matches');
- });
-
- it('should support the editable property to limit model bindings to matches only', function() {
- var element = prepareInputEl('<div><input ng-model="result" uib-typeahead="item for item in source | filter:$viewValue" typeahead-editable="false"></div>');
- changeInputValueTo(element, 'not in matches');
- expect($scope.result).toEqual(undefined);
- });
-
- it('should set validation errors for non-editable inputs', function() {
- var element = prepareInputEl(
- '<div><form name="form">' +
- '<input name="input" ng-model="result" uib-typeahead="item for item in source | filter:$viewValue" typeahead-editable="false">' +
- '</form></div>');
-
- changeInputValueTo(element, 'not in matches');
- expect($scope.result).toEqual(undefined);
- expect($scope.form.input.$error.editable).toBeTruthy();
-
- changeInputValueTo(element, 'foo');
- triggerKeyDown(element, 13);
- expect($scope.result).toEqual('foo');
- expect($scope.form.input.$error.editable).toBeFalsy();
- });
-
- it('should not set editable validation error for empty input', function() {
- var element = prepareInputEl(
- '<div><form name="form">' +
- '<input name="input" ng-model="result" uib-typeahead="item for item in source | filter:$viewValue" typeahead-editable="false">' +
- '</form></div>');
-
- changeInputValueTo(element, 'not in matches');
- expect($scope.result).toEqual(undefined);
- expect($scope.form.input.$error.editable).toBeTruthy();
- changeInputValueTo(element, '');
- expect($scope.result).toEqual(null);
- expect($scope.form.input.$error.editable).toBeFalsy();
- });
-
- it('should bind loading indicator expression', inject(function($timeout) {
- $scope.isLoading = false;
- $scope.loadMatches = function(viewValue) {
- return $timeout(function() {
- return [];
- }, 1000);
- };
-
- var element = prepareInputEl('<div><input ng-model="result" uib-typeahead="item for item in loadMatches()" typeahead-loading="isLoading"></div>');
- changeInputValueTo(element, 'foo');
-
- expect($scope.isLoading).toBeTruthy();
- $timeout.flush();
- expect($scope.isLoading).toBeFalsy();
- }));
-
- it('should support timeout before trying to match $viewValue', inject(function($timeout) {
- var element = prepareInputEl('<div><input ng-model="result" uib-typeahead="item for item in source | filter:$viewValue" typeahead-wait-ms="200"></div>');
- changeInputValueTo(element, 'foo');
- expect(element).toBeClosed();
-
- $timeout.flush();
- expect(element).toBeOpenWithActive(1, 0);
- }));
-
- it('should cancel old timeouts when something is typed within waitTime', inject(function($timeout) {
- var values = [];
- $scope.loadMatches = function(viewValue) {
- values.push(viewValue);
- return $scope.source;
- };
- var element = prepareInputEl('<div><input ng-model="result" uib-typeahead="item for item in loadMatches($viewValue) | filter:$viewValue" typeahead-wait-ms="200"></div>');
- changeInputValueTo(element, 'first');
- changeInputValueTo(element, 'second');
-
- $timeout.flush();
-
- expect(values).not.toContain('first');
- }));
-
- it('should allow timeouts when something is typed after waitTime has passed', inject(function($timeout) {
- var values = [];
-
- $scope.loadMatches = function(viewValue) {
- values.push(viewValue);
- return $scope.source;
- };
- var element = prepareInputEl('<div><input ng-model="result" uib-typeahead="item for item in loadMatches($viewValue) | filter:$viewValue" typeahead-wait-ms="200"></div>');
-
- changeInputValueTo(element, 'first');
- $timeout.flush();
-
- expect(values).toContain('first');
-
- changeInputValueTo(element, 'second');
- $timeout.flush();
-
- expect(values).toContain('second');
- }));
-
- it('should support custom popup templates', function() {
- $templateCache.put('custom.html', '<div class="custom">foo</div>');
-
- var element = prepareInputEl('<div><input ng-model="result" typeahead-popup-template-url="custom.html" uib-typeahead="state as state.name for state in states | filter:$viewValue"></div>');
-
- changeInputValueTo(element, 'Al');
-
- expect(element.find('.custom').text()).toBe('foo');
- });
-
- it('should support custom templates for matched items', function() {
- $templateCache.put('custom.html', '<p>{{ index }} {{ match.label }}</p>');
-
- var element = prepareInputEl('<div><input ng-model="result" typeahead-template-url="custom.html" uib-typeahead="state as state.name for state in states | filter:$viewValue"></div>');
-
- changeInputValueTo(element, 'Al');
-
- expect(findMatches(element).eq(0).find('p').text()).toEqual('0 Alaska');
- });
-
- it('should support directives which require controllers in custom templates for matched items', function() {
- $templateCache.put('custom.html', '<p child-directive>{{ index }} {{ match.label }}</p>');
-
- var element = prepareInputEl('<div><input ng-model="result" typeahead-template-url="custom.html" uib-typeahead="state as state.name for state in states | filter:$viewValue"></div>');
-
- element.data('$parentDirectiveController', {});
-
- changeInputValueTo(element, 'Al');
-
- expect(findMatches(element).eq(0).find('p').text()).toEqual('0 Alaska');
- });
-
- it('should throw error on invalid expression', function() {
- var prepareInvalidDir = function() {
- prepareInputEl('<div><input ng-model="result" uib-typeahead="an invalid expression"></div>');
- };
- expect(prepareInvalidDir).toThrow();
- });
- });
-
- describe('selecting a match', function() {
- it('should select a match on enter', function() {
- var element = prepareInputEl('<div><input ng-model="result" uib-typeahead="item for item in source | filter:$viewValue"></div>');
- var inputEl = findInput(element);
-
- changeInputValueTo(element, 'b');
- triggerKeyDown(element, 13);
-
- expect($scope.result).toEqual('bar');
- expect(inputEl.val()).toEqual('bar');
- expect(element).toBeClosed();
- });
-
- it('should select a match on tab', function() {
- var element = prepareInputEl('<div><input ng-model="result" uib-typeahead="item for item in source | filter:$viewValue"></div>');
- var inputEl = findInput(element);
-
- changeInputValueTo(element, 'b');
- triggerKeyDown(element, 9);
-
- expect($scope.result).toEqual('bar');
- expect(inputEl.val()).toEqual('bar');
- expect(element).toBeClosed();
- });
-
- it('should not select any match on blur without \'select-on-blur=true\' option', function() {
- var element = prepareInputEl('<div><input ng-model="result" uib-typeahead="item for item in source | filter:$viewValue"></div>');
- var inputEl = findInput(element);
-
- changeInputValueTo(element, 'b');
- inputEl.blur(); // input loses focus
-
- // no change
- expect($scope.result).toEqual('b');
- expect(inputEl.val()).toEqual('b');
- });
-
- it('should select a match on blur with \'select-on-blur=true\' option', function() {
- var element = prepareInputEl('<div><input ng-model="result" uib-typeahead="item for item in source | filter:$viewValue" typeahead-select-on-blur="true"></div>');
- var inputEl = findInput(element);
-
- changeInputValueTo(element, 'b');
- inputEl.blur(); // input loses focus
-
- // first element should be selected
- expect($scope.result).toEqual('bar');
- expect(inputEl.val()).toEqual('bar');
- });
-
- it('should select match on click', function() {
- var element = prepareInputEl('<div><input ng-model="result" uib-typeahead="item for item in source | filter:$viewValue"></div>');
- var inputEl = findInput(element);
-
- changeInputValueTo(element, 'b');
- var match = $(findMatches(element)[1]).find('a')[0];
-
- $(match).click();
- $scope.$digest();
-
- expect($scope.result).toEqual('baz');
- expect(inputEl.val()).toEqual('baz');
- expect(element).toBeClosed();
- });
-
- it('should invoke select callback on select', function() {
- $scope.onSelect = function($item, $model, $label) {
- $scope.$item = $item;
- $scope.$model = $model;
- $scope.$label = $label;
- };
- var element = prepareInputEl('<div><input ng-model="result" typeahead-on-select="onSelect($item, $model, $label)" uib-typeahead="state.code as state.name for state in states | filter:$viewValue"></div>');
-
- changeInputValueTo(element, 'Alas');
- triggerKeyDown(element, 13);
-
- expect($scope.result).toEqual('AL');
- expect($scope.$item).toEqual($scope.states[0]);
- expect($scope.$model).toEqual('AL');
- expect($scope.$label).toEqual('Alaska');
- });
-
- it('should correctly update inputs value on mapping where label is not derived from the model', function() {
- var element = prepareInputEl('<div><input ng-model="result" uib-typeahead="state.code as state.name for state in states | filter:$viewValue"></div>');
- var inputEl = findInput(element);
-
- changeInputValueTo(element, 'Alas');
- triggerKeyDown(element, 13);
-
- expect($scope.result).toEqual('AL');
- expect(inputEl.val()).toEqual('AL');
- });
-
- it('should bind no results indicator as true when no matches returned', inject(function($timeout) {
- $scope.isNoResults = false;
- $scope.loadMatches = function(viewValue) {
- return $timeout(function() {
- return [];
- }, 1000);
- };
-
- var element = prepareInputEl('<div><input ng-model="result" uib-typeahead="item for item in loadMatches()" typeahead-no-results="isNoResults"></div>');
- changeInputValueTo(element, 'foo');
-
- expect($scope.isNoResults).toBeFalsy();
- $timeout.flush();
- expect($scope.isNoResults).toBeTruthy();
- }));
-
- it('should bind no results indicator as false when matches are returned', inject(function($timeout) {
- $scope.isNoResults = false;
- $scope.loadMatches = function(viewValue) {
- return $timeout(function() {
- return [viewValue];
- }, 1000);
- };
-
- var element = prepareInputEl('<div><input ng-model="result" uib-typeahead="item for item in loadMatches()" typeahead-no-results="isNoResults"></div>');
- changeInputValueTo(element, 'foo');
-
- expect($scope.isNoResults).toBeFalsy();
- $timeout.flush();
- expect($scope.isNoResults).toBeFalsy();
- }));
-
- it('should not focus the input if `typeahead-focus-on-select` is false', function() {
- var element = prepareInputEl('<div><input ng-model="result" uib-typeahead="item for item in source | filter:$viewValue" typeahead-focus-on-select="false"></div>');
- $document.find('body').append(element);
- var inputEl = findInput(element);
-
- changeInputValueTo(element, 'b');
- var match = $(findMatches(element)[1]).find('a')[0];
-
- $(match).click();
- $scope.$digest();
- $timeout.flush();
-
- expect(document.activeElement).not.toBe(inputEl[0]);
- expect($scope.result).toEqual('baz');
- });
- });
-
- describe('select on exact match', function() {
- it('should select on an exact match when set', function() {
- $scope.onSelect = jasmine.createSpy('onSelect');
- var element = prepareInputEl('<div><input ng-model="result" typeahead-editable="false" typeahead-on-select="onSelect()" uib-typeahead="item for item in source | filter:$viewValue" typeahead-select-on-exact="true"></div>');
- var inputEl = findInput(element);
-
- changeInputValueTo(element, 'bar');
-
- expect($scope.result).toEqual('bar');
- expect(inputEl.val()).toEqual('bar');
- expect(element).toBeClosed();
- expect($scope.onSelect).toHaveBeenCalled();
- });
-
- it('should not select on an exact match by default', function() {
- $scope.onSelect = jasmine.createSpy('onSelect');
- var element = prepareInputEl('<div><input ng-model="result" typeahead-editable="false" typeahead-on-select="onSelect()" uib-typeahead="item for item in source | filter:$viewValue"></div>');
- var inputEl = findInput(element);
-
- changeInputValueTo(element, 'bar');
-
- expect($scope.result).toBeUndefined();
- expect(inputEl.val()).toEqual('bar');
- expect($scope.onSelect.calls.any()).toBe(false);
- });
-
- it('should not be case sensitive when select on an exact match', function() {
- $scope.onSelect = jasmine.createSpy('onSelect');
- var element = prepareInputEl('<div><input ng-model="result" typeahead-editable="false" typeahead-on-select="onSelect()" uib-typeahead="item for item in source | filter:$viewValue" typeahead-select-on-exact="true"></div>');
- var inputEl = findInput(element);
-
- changeInputValueTo(element, 'BaR');
-
- expect($scope.result).toEqual('bar');
- expect(inputEl.val()).toEqual('bar');
- expect(element).toBeClosed();
- expect($scope.onSelect).toHaveBeenCalled();
- });
-
- it('should not auto select when not a match with one potential result left', function() {
- $scope.onSelect = jasmine.createSpy('onSelect');
- var element = prepareInputEl('<div><input ng-model="result" typeahead-editable="false" typeahead-on-select="onSelect()" uib-typeahead="item for item in source | filter:$viewValue" typeahead-select-on-exact="true"></div>');
- var inputEl = findInput(element);
-
- changeInputValueTo(element, 'fo');
-
- expect($scope.result).toBeUndefined();
- expect(inputEl.val()).toEqual('fo');
- expect($scope.onSelect.calls.any()).toBe(false);
- });
- });
-
- describe('pop-up interaction', function() {
- var element;
-
- beforeEach(function() {
- element = prepareInputEl('<div><input ng-model="result" uib-typeahead="item for item in source | filter:$viewValue"></div>');
- });
-
- it('should activate prev/next matches on up/down keys', function() {
- changeInputValueTo(element, 'b');
- expect(element).toBeOpenWithActive(2, 0);
-
- // Down arrow key
- triggerKeyDown(element, 40);
- expect(element).toBeOpenWithActive(2, 1);
-
- // Down arrow key goes back to first element
- triggerKeyDown(element, 40);
- expect(element).toBeOpenWithActive(2, 0);
-
- // Up arrow key goes back to last element
- triggerKeyDown(element, 38);
- expect(element).toBeOpenWithActive(2, 1);
-
- // Up arrow key goes back to first element
- triggerKeyDown(element, 38);
- expect(element).toBeOpenWithActive(2, 0);
- });
-
- it('should close popup on escape key', function() {
- changeInputValueTo(element, 'b');
- expect(element).toBeOpenWithActive(2, 0);
-
- // Escape key
- triggerKeyDown(element, 27);
- expect(element).toBeClosed();
- });
-
- it('should highlight match on mouseenter', function() {
- changeInputValueTo(element, 'b');
- expect(element).toBeOpenWithActive(2, 0);
-
- findMatches(element).eq(1).trigger('mouseenter');
- expect(element).toBeOpenWithActive(2, 1);
- });
- });
-
- describe('promises', function() {
- var element, deferred;
-
- beforeEach(inject(function($q) {
- deferred = $q.defer();
- $scope.source = function() {
- return deferred.promise;
- };
- element = prepareInputEl('<div><input ng-model="result" uib-typeahead="item for item in source()"></div>');
- }));
-
- it('should display matches from promise', function() {
- changeInputValueTo(element, 'c');
- expect(element).toBeClosed();
-
- deferred.resolve(['good', 'stuff']);
- $scope.$digest();
- expect(element).toBeOpenWithActive(2, 0);
- });
-
- it('should not display anything when promise is rejected', function() {
- changeInputValueTo(element, 'c');
- expect(element).toBeClosed();
-
- deferred.reject('fail');
- $scope.$digest();
- expect(element).toBeClosed();
- });
-
- it('PR #3178, resolves #2999 - should not return property "length" of undefined for undefined matches', function() {
- changeInputValueTo(element, 'c');
- expect(element).toBeClosed();
-
- deferred.resolve();
- $scope.$digest();
- expect(element).toBeClosed();
- });
- });
-
- describe('non-regressions tests', function() {
-
- it('issue 231 - closes matches popup on click outside typeahead', function() {
- var element = prepareInputEl('<div><input ng-model="result" uib-typeahead="item for item in source | filter:$viewValue"></div>');
-
- changeInputValueTo(element, 'b');
-
- $document.find('body').click();
- $scope.$digest();
-
- expect(element).toBeClosed();
- });
-
- it('issue 591 - initial formatting for un-selected match and complex label expression', function() {
- var inputEl = findInput(prepareInputEl('<div><input ng-model="result" uib-typeahead="state as state.name + \' \' + state.code for state in states | filter:$viewValue"></div>'));
- expect(inputEl.val()).toEqual('');
- });
-
- it('issue 786 - name of internal model should not conflict with scope model name', function() {
- $scope.state = $scope.states[0];
- var element = prepareInputEl('<div><input ng-model="state" uib-typeahead="state as state.name for state in states | filter:$viewValue"></div>');
- var inputEl = findInput(element);
-
- expect(inputEl.val()).toEqual('Alaska');
- });
-
- it('issue 863 - it should work correctly with input type="email"', function() {
- $scope.emails = ['foo@host.com', 'bar@host.com'];
- var element = prepareInputEl('<div><input type="email" ng-model="email" uib-typeahead="email for email in emails | filter:$viewValue"></div>');
- var inputEl = findInput(element);
-
- changeInputValueTo(element, 'bar');
- expect(element).toBeOpenWithActive(1, 0);
-
- triggerKeyDown(element, 13);
-
- expect($scope.email).toEqual('bar@host.com');
- expect(inputEl.val()).toEqual('bar@host.com');
- });
-
- it('issue 964 - should not show popup with matches if an element is not focused', function() {
- $scope.items = function(viewValue) {
- return $timeout(function() {
- return [viewValue];
- });
- };
- var element = prepareInputEl('<div><input ng-model="result" uib-typeahead="item for item in items($viewValue)"></div>');
- var inputEl = findInput(element);
-
- changeInputValueTo(element, 'match');
- $scope.$digest();
-
- inputEl.blur();
- $timeout.flush();
-
- expect(element).toBeClosed();
- });
-
- it('should properly update loading callback if an element is not focused', function() {
- $scope.items = function(viewValue) {
- return $timeout(function(){
- return [viewValue];
- });
- };
- var element = prepareInputEl('<div><input ng-model="result" typeahead-loading="isLoading" uib-typeahead="item for item in items($viewValue)"></div>');
- var inputEl = findInput(element);
-
- changeInputValueTo(element, 'match');
- $scope.$digest();
-
- inputEl.blur();
- $timeout.flush();
-
- expect($scope.isLoading).toBeFalsy();
- });
-
- it('issue 1140 - should properly update loading callback when deleting characters', function() {
- $scope.items = function(viewValue) {
- return $timeout(function() {
- return [viewValue];
- });
- };
- var element = prepareInputEl('<div><input ng-model="result" typeahead-min-length="2" typeahead-loading="isLoading" uib-typeahead="item for item in items($viewValue)"></div>');
-
- changeInputValueTo(element, 'match');
- $scope.$digest();
-
- expect($scope.isLoading).toBeTruthy();
-
- changeInputValueTo(element, 'm');
- $timeout.flush();
- $scope.$digest();
-
- expect($scope.isLoading).toBeFalsy();
- });
-
- it('should cancel old timeout when deleting characters', inject(function($timeout) {
- var values = [];
- $scope.loadMatches = function(viewValue) {
- values.push(viewValue);
- return $scope.source;
- };
- var element = prepareInputEl('<div><input ng-model="result" uib-typeahead="item for item in loadMatches($viewValue) | filter:$viewValue" typeahead-min-length="2" typeahead-wait-ms="200"></div>');
- changeInputValueTo(element, 'match');
- changeInputValueTo(element, 'm');
-
- $timeout.flush();
-
- expect(values).not.toContain('match');
- }));
-
- describe('', function() {
- // Dummy describe to be able to create an after hook for this tests
- var element;
-
- it('does not close matches popup on click in input', function() {
- element = prepareInputEl('<div><input ng-model="result" uib-typeahead="item for item in source | filter:$viewValue"></div>');
- var inputEl = findInput(element);
-
- // Note that this bug can only be found when element is in the document
- $document.find('body').append(element);
-
- changeInputValueTo(element, 'b');
-
- inputEl.click();
- $scope.$digest();
-
- expect(element).toBeOpenWithActive(2, 0);
- });
-
- it('issue #1773 - should not trigger an error when used with ng-focus', function() {
- element = prepareInputEl('<div><input ng-model="result" uib-typeahead="item for item in source | filter:$viewValue" ng-focus="foo()"></div>');
- var inputEl = findInput(element);
-
- // Note that this bug can only be found when element is in the document
- $document.find('body').append(element);
-
- changeInputValueTo(element, 'b');
- var match = $(findMatches(element)[1]).find('a')[0];
-
- $(match).click();
- $scope.$digest();
- });
-
- afterEach(function() {
- element.remove();
- });
- });
-
- it('issue #1238 - allow names like "query" to be used inside "in" expressions ', function() {
- $scope.query = function() {
- return ['foo', 'bar'];
- };
-
- var element = prepareInputEl('<div><input ng-model="result" uib-typeahead="item for item in query($viewValue)"></div>');
- changeInputValueTo(element, 'bar');
-
- expect(element).toBeOpenWithActive(2, 0);
- });
-
- it('issue #3318 - should set model validity to true when set manually', function() {
- var element = prepareInputEl(
- '<div><form name="form">' +
- '<input name="input" ng-model="result" uib-typeahead="item for item in source | filter:$viewValue" typeahead-editable="false">' +
- '</form></div>');
-
- changeInputValueTo(element, 'not in matches');
- $scope.$apply(function() {
- $scope.result = 'manually set';
- });
-
- expect($scope.result).toEqual('manually set');
- expect($scope.form.input.$valid).toBeTruthy();
- });
-
- it('issue #3166 - should set \'parse\' key as valid when selecting a perfect match and not editable', function() {
- var element = prepareInputEl('<div ng-form="test"><input name="typeahead" ng-model="result" uib-typeahead="state as state.name for state in states | filter:$viewValue" typeahead-editable="false"></div>');
- var inputEl = findInput(element);
-
- changeInputValueTo(element, 'Alaska');
- triggerKeyDown(element, 13);
-
- expect($scope.test.typeahead.$error.parse).toBeUndefined();
- });
-
- it('issue #3823 - should support ng-model-options getterSetter', function() {
- function resultSetter(state) {
- return state;
- }
- $scope.result = resultSetter;
- var element = prepareInputEl('<div><input name="typeahead" ng-model="result" ng-model-options="{getterSetter: true}" uib-typeahead="state as state.name for state in states | filter:$viewValue" typeahead-editable="false"></div>');
-
- changeInputValueTo(element, 'Alaska');
- triggerKeyDown(element, 13);
-
- expect($scope.result).toBe(resultSetter);
- });
- });
-
- describe('input formatting', function() {
- it('should co-operate with existing formatters', function() {
- $scope.result = $scope.states[0];
-
- var element = prepareInputEl('<div><input ng-model="result.name" formatter uib-typeahead="state.name for state in states | filter:$viewValue"></div>'),
- inputEl = findInput(element);
-
- expect(inputEl.val()).toEqual('formatted' + $scope.result.name);
- });
-
- it('should support a custom input formatting function', function() {
- $scope.result = $scope.states[0];
- $scope.formatInput = function($model) {
- return $model.code;
- };
-
- var element = prepareInputEl('<div><input ng-model="result" typeahead-input-formatter="formatInput($model)" uib-typeahead="state as state.name for state in states | filter:$viewValue"></div>'),
- inputEl = findInput(element);
-
- expect(inputEl.val()).toEqual('AL');
- expect($scope.result).toEqual($scope.states[0]);
- });
- });
-
- describe('append to element id', function() {
- it('append typeahead results to element', function() {
- $document.find('body').append('<div id="myElement"></div>');
- var element = prepareInputEl('<div><input name="input" ng-model="result" uib-typeahead="item for item in states | filter:$viewValue" typeahead-append-to-element-id="myElement"></div>');
- changeInputValueTo(element, 'al');
- expect($document.find('#myElement')).toBeOpenWithActive(2, 0);
- $document.find('#myElement').remove();
- });
- });
-
- describe('append to body', function() {
- afterEach(function() {
- angular.element($window).off('resize');
- $document.find('body').off('scroll');
- });
-
- it('append typeahead results to body', function() {
- var element = prepareInputEl('<div><input ng-model="result" uib-typeahead="item for item in source | filter:$viewValue" typeahead-append-to-body="true"></div>');
- changeInputValueTo(element, 'ba');
- expect($document.find('body')).toBeOpenWithActive(2, 0);
- });
-
- it('should not append to body when value of the attribute is false', function() {
- var element = prepareInputEl('<div><input ng-model="result" uib-typeahead="item for item in source | filter:$viewValue" typeahead-append-to-body="false"></div>');
- changeInputValueTo(element, 'ba');
- expect(findDropDown($document.find('body')).length).toEqual(0);
- });
-
- it('should have right position after scroll', function() {
- var element = prepareInputEl('<div><input ng-model="result" uib-typeahead="item for item in source | filter:$viewValue" typeahead-append-to-body="true"></div>');
- var dropdown = findDropDown($document.find('body'));
- var body = angular.element(document.body);
-
- // Set body height to allow scrolling
- body.css({height:'10000px'});
-
- // Scroll top
- window.scroll(0, 1000);
-
- // Set input value to show dropdown
- changeInputValueTo(element, 'ba');
-
- // Init position of dropdown must be 1000px
- expect(dropdown.css('top') ).toEqual('1000px');
-
- // After scroll, must have new position
- window.scroll(0, 500);
- body.triggerHandler('scroll');
- $timeout.flush();
- expect(dropdown.css('top')).toEqual('500px');
- });
- });
-
- describe('focus first', function() {
- it('should focus the first element by default', function() {
- var element = prepareInputEl('<div><input ng-model="result" uib-typeahead="item for item in source | filter:$viewValue"></div>');
- changeInputValueTo(element, 'b');
- expect(element).toBeOpenWithActive(2, 0);
-
- // Down arrow key
- triggerKeyDown(element, 40);
- expect(element).toBeOpenWithActive(2, 1);
-
- // Down arrow key goes back to first element
- triggerKeyDown(element, 40);
- expect(element).toBeOpenWithActive(2, 0);
-
- // Up arrow key goes back to last element
- triggerKeyDown(element, 38);
- expect(element).toBeOpenWithActive(2, 1);
-
- // Up arrow key goes back to first element
- triggerKeyDown(element, 38);
- expect(element).toBeOpenWithActive(2, 0);
- });
-
- it('should not focus the first element until keys are pressed', function() {
- var element = prepareInputEl('<div><input ng-model="result" uib-typeahead="item for item in source | filter:$viewValue" typeahead-focus-first="false"></div>');
- changeInputValueTo(element, 'b');
- expect(element).toBeOpenWithActive(2, -1);
-
- // Down arrow key goes to first element
- triggerKeyDown(element, 40);
- expect(element).toBeOpenWithActive(2, 0);
-
- // Down arrow key goes to second element
- triggerKeyDown(element, 40);
- expect(element).toBeOpenWithActive(2, 1);
-
- // Down arrow key goes back to first element
- triggerKeyDown(element, 40);
- expect(element).toBeOpenWithActive(2, 0);
-
- // Up arrow key goes back to last element
- triggerKeyDown(element, 38);
- expect(element).toBeOpenWithActive(2, 1);
-
- // Up arrow key goes back to first element
- triggerKeyDown(element, 38);
- expect(element).toBeOpenWithActive(2, 0);
-
- // New input goes back to no focus
- changeInputValueTo(element, 'a');
- changeInputValueTo(element, 'b');
- expect(element).toBeOpenWithActive(2, -1);
-
- // Up arrow key goes to last element
- triggerKeyDown(element, 38);
- expect(element).toBeOpenWithActive(2, 1);
- });
- });
-
- it('should not capture enter or tab when an item is not focused', function() {
- $scope.select_count = 0;
- $scope.onSelect = function($item, $model, $label) {
- $scope.select_count = $scope.select_count + 1;
- };
- var element = prepareInputEl('<div><input ng-model="result" ng-keydown="keyDownEvent = $event" uib-typeahead="item for item in source | filter:$viewValue" typeahead-on-select="onSelect($item, $model, $label)" typeahead-focus-first="false"></div>');
- changeInputValueTo(element, 'b');
-
- // enter key should not be captured when nothing is focused
- triggerKeyDown(element, 13);
- expect($scope.keyDownEvent.isDefaultPrevented()).toBeFalsy();
- expect($scope.select_count).toEqual(0);
-
- // tab key should close the dropdown when nothing is focused
- triggerKeyDown(element, 9);
- expect($scope.keyDownEvent.isDefaultPrevented()).toBeFalsy();
- expect($scope.select_count).toEqual(0);
- expect(element).toBeClosed();
- });
-
- it('should capture enter or tab when an item is focused', function() {
- $scope.select_count = 0;
- $scope.onSelect = function($item, $model, $label) {
- $scope.select_count = $scope.select_count + 1;
- };
- var element = prepareInputEl('<div><input ng-model="result" ng-keydown="keyDownEvent = $event" uib-typeahead="item for item in source | filter:$viewValue" typeahead-on-select="onSelect($item, $model, $label)" typeahead-focus-first="false"></div>');
- changeInputValueTo(element, 'b');
-
- // down key should be captured and focus first element
- triggerKeyDown(element, 40);
- expect($scope.keyDownEvent.isDefaultPrevented()).toBeTruthy();
- expect(element).toBeOpenWithActive(2, 0);
-
- // enter key should be captured now that something is focused
- triggerKeyDown(element, 13);
- expect($scope.keyDownEvent.isDefaultPrevented()).toBeTruthy();
- expect($scope.select_count).toEqual(1);
- });
-
- describe('minLength set to 0', function() {
- it('should open typeahead if input is changed to empty string if defined threshold is 0', function() {
- var element = prepareInputEl('<div><input ng-model="result" uib-typeahead="item for item in source | filter:$viewValue" typeahead-min-length="0"></div>');
- changeInputValueTo(element, '');
- expect(element).toBeOpenWithActive(3, 0);
- });
- });
-
- describe('event listeners', function() {
- afterEach(function() {
- angular.element($window).off('resize');
- $document.find('body').off('scroll');
- });
-
- it('should register event listeners when attached to body', function() {
- spyOn(window, 'addEventListener');
- spyOn(document.body, 'addEventListener');
-
- var element = prepareInputEl('<div><input ng-model="result" uib-typeahead="item for item in source | filter:$viewValue" typeahead-append-to-body="true"></div>');
-
- expect(window.addEventListener).toHaveBeenCalledWith('resize', jasmine.any(Function), false);
- expect(document.body.addEventListener).toHaveBeenCalledWith('scroll', jasmine.any(Function), false);
- });
-
- it('should remove event listeners when attached to body', function() {
- spyOn(window, 'removeEventListener');
- spyOn(document.body, 'removeEventListener');
-
- var element = prepareInputEl('<div><input ng-model="result" uib-typeahead="item for item in source | filter:$viewValue" typeahead-append-to-body="true"></div>');
- $scope.$destroy();
-
- expect(window.removeEventListener).toHaveBeenCalledWith('resize', jasmine.any(Function), false);
- expect(document.body.removeEventListener).toHaveBeenCalledWith('scroll', jasmine.any(Function), false);
- });
- });
-});
-
-/* Deprecation tests below */
-
-describe('typeahead deprecation', function() {
- beforeEach(module('ui.bootstrap.typeahead'));
- beforeEach(module('ngSanitize'));
- beforeEach(module('template/typeahead/typeahead-popup.html'));
- beforeEach(module('template/typeahead/typeahead-match.html'));
-
- it('should suppress warning', function() {
- module(function($provide) {
- $provide.value('$typeaheadSuppressWarning', true);
- });
-
- inject(function($compile, $log, $rootScope) {
- spyOn($log, 'warn');
-
- var element = '<div><input ng-model="result" typeahead="item for item in source | filter:$viewValue" typeahead-min-length="0"></div>';
- element = $compile(element)($rootScope);
- $rootScope.$digest();
- expect($log.warn.calls.count()).toBe(0);
- });
- });
-
- it('should give warning by default', inject(function($compile, $log, $rootScope) {
- spyOn($log, 'warn');
-
- var element = '<div><input ng-model="result" typeahead="item for item in source | filter:$viewValue" typeahead-min-length="0"></div>';
- element = $compile(element)($rootScope);
- $rootScope.$digest();
-
- expect($log.warn.calls.count()).toBe(3);
- expect($log.warn.calls.argsFor(0)).toEqual(['typeaheadParser is now deprecated. Use uibTypeaheadParser instead.']);
- expect($log.warn.calls.argsFor(1)).toEqual(['typeahead is now deprecated. Use uib-typeahead instead.']);
- expect($log.warn.calls.argsFor(2)).toEqual(['typeahead-popup is now deprecated. Use uib-typeahead-popup instead.']);
- }));
-
- it('should deprecate typeaheadMatch', inject(function($compile, $log, $rootScope, $templateCache, $sniffer){
- spyOn($log, 'warn');
-
- var element = '<div typeahead-match index=\"$index\" match=\"match\" query=\"query\" template-url=\"templateUrl\"></div>';
- element = $compile(element)($rootScope);
- $rootScope.$digest();
-
- expect($log.warn.calls.count()).toBe(1);
- expect($log.warn.calls.argsFor(0)).toEqual(['typeahead-match is now deprecated. Use uib-typeahead-match instead.']);
- }));
-});
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/typeahead/typeahead.js b/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/typeahead/typeahead.js
deleted file mode 100644
index aa88842..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/src/typeahead/typeahead.js
+++ /dev/null
@@ -1,1060 +0,0 @@
-angular.module('ui.bootstrap.typeahead', ['ui.bootstrap.position'])
-
-/**
- * A helper service that can parse typeahead's syntax (string provided by users)
- * Extracted to a separate service for ease of unit testing
- */
- .factory('uibTypeaheadParser', ['$parse', function($parse) {
- // 00000111000000000000022200000000000000003333333333333330000000000044000
- var TYPEAHEAD_REGEXP = /^\s*([\s\S]+?)(?:\s+as\s+([\s\S]+?))?\s+for\s+(?:([\$\w][\$\w\d]*))\s+in\s+([\s\S]+?)$/;
- return {
- parse: function(input) {
- var match = input.match(TYPEAHEAD_REGEXP);
- if (!match) {
- throw new Error(
- 'Expected typeahead specification in form of "_modelValue_ (as _label_)? for _item_ in _collection_"' +
- ' but got "' + input + '".');
- }
-
- return {
- itemName: match[3],
- source: $parse(match[4]),
- viewMapper: $parse(match[2] || match[1]),
- modelMapper: $parse(match[1])
- };
- }
- };
- }])
-
- .controller('UibTypeaheadController', ['$scope', '$element', '$attrs', '$compile', '$parse', '$q', '$timeout', '$document', '$window', '$rootScope', '$uibPosition', 'uibTypeaheadParser',
- function(originalScope, element, attrs, $compile, $parse, $q, $timeout, $document, $window, $rootScope, $position, typeaheadParser) {
- var HOT_KEYS = [9, 13, 27, 38, 40];
- var eventDebounceTime = 200;
- var modelCtrl, ngModelOptions;
- //SUPPORTED ATTRIBUTES (OPTIONS)
-
- //minimal no of characters that needs to be entered before typeahead kicks-in
- var minLength = originalScope.$eval(attrs.typeaheadMinLength);
- if (!minLength && minLength !== 0) {
- minLength = 1;
- }
-
- //minimal wait time after last character typed before typeahead kicks-in
- var waitTime = originalScope.$eval(attrs.typeaheadWaitMs) || 0;
-
- //should it restrict model values to the ones selected from the popup only?
- var isEditable = originalScope.$eval(attrs.typeaheadEditable) !== false;
-
- //binding to a variable that indicates if matches are being retrieved asynchronously
- var isLoadingSetter = $parse(attrs.typeaheadLoading).assign || angular.noop;
-
- //a callback executed when a match is selected
- var onSelectCallback = $parse(attrs.typeaheadOnSelect);
-
- //should it select highlighted popup value when losing focus?
- var isSelectOnBlur = angular.isDefined(attrs.typeaheadSelectOnBlur) ? originalScope.$eval(attrs.typeaheadSelectOnBlur) : false;
-
- //binding to a variable that indicates if there were no results after the query is completed
- var isNoResultsSetter = $parse(attrs.typeaheadNoResults).assign || angular.noop;
-
- var inputFormatter = attrs.typeaheadInputFormatter ? $parse(attrs.typeaheadInputFormatter) : undefined;
-
- var appendToBody = attrs.typeaheadAppendToBody ? originalScope.$eval(attrs.typeaheadAppendToBody) : false;
-
- var appendToElementId = attrs.typeaheadAppendToElementId || false;
-
- var focusFirst = originalScope.$eval(attrs.typeaheadFocusFirst) !== false;
-
- //If input matches an item of the list exactly, select it automatically
- var selectOnExact = attrs.typeaheadSelectOnExact ? originalScope.$eval(attrs.typeaheadSelectOnExact) : false;
-
- //INTERNAL VARIABLES
-
- //model setter executed upon match selection
- var parsedModel = $parse(attrs.ngModel);
- var invokeModelSetter = $parse(attrs.ngModel + '($$$p)');
- var $setModelValue = function(scope, newValue) {
- if (angular.isFunction(parsedModel(originalScope)) &&
- ngModelOptions && ngModelOptions.$options && ngModelOptions.$options.getterSetter) {
- return invokeModelSetter(scope, {$$$p: newValue});
- } else {
- return parsedModel.assign(scope, newValue);
- }
- };
-
- //expressions used by typeahead
- var parserResult = typeaheadParser.parse(attrs.uibTypeahead);
-
- var hasFocus;
-
- //Used to avoid bug in iOS webview where iOS keyboard does not fire
- //mousedown & mouseup events
- //Issue #3699
- var selected;
-
- //create a child scope for the typeahead directive so we are not polluting original scope
- //with typeahead-specific data (matches, query etc.)
- var scope = originalScope.$new();
- var offDestroy = originalScope.$on('$destroy', function() {
- scope.$destroy();
- });
- scope.$on('$destroy', offDestroy);
-
- // WAI-ARIA
- var popupId = 'typeahead-' + scope.$id + '-' + Math.floor(Math.random() * 10000);
- element.attr({
- 'aria-autocomplete': 'list',
- 'aria-expanded': false,
- 'aria-owns': popupId
- });
-
- //pop-up element used to display matches
- var popUpEl = angular.element('<div uib-typeahead-popup></div>');
- popUpEl.attr({
- id: popupId,
- matches: 'matches',
- active: 'activeIdx',
- select: 'select(activeIdx)',
- 'move-in-progress': 'moveInProgress',
- query: 'query',
- position: 'position'
- });
- //custom item template
- if (angular.isDefined(attrs.typeaheadTemplateUrl)) {
- popUpEl.attr('template-url', attrs.typeaheadTemplateUrl);
- }
-
- if (angular.isDefined(attrs.typeaheadPopupTemplateUrl)) {
- popUpEl.attr('popup-template-url', attrs.typeaheadPopupTemplateUrl);
- }
-
- var resetMatches = function() {
- scope.matches = [];
- scope.activeIdx = -1;
- element.attr('aria-expanded', false);
- };
-
- var getMatchId = function(index) {
- return popupId + '-option-' + index;
- };
-
- // Indicate that the specified match is the active (pre-selected) item in the list owned by this typeahead.
- // This attribute is added or removed automatically when the `activeIdx` changes.
- scope.$watch('activeIdx', function(index) {
- if (index < 0) {
- element.removeAttr('aria-activedescendant');
- } else {
- element.attr('aria-activedescendant', getMatchId(index));
- }
- });
-
- var inputIsExactMatch = function(inputValue, index) {
- if (scope.matches.length > index && inputValue) {
- return inputValue.toUpperCase() === scope.matches[index].label.toUpperCase();
- }
-
- return false;
- };
-
- var getMatchesAsync = function(inputValue) {
- var locals = {$viewValue: inputValue};
- isLoadingSetter(originalScope, true);
- isNoResultsSetter(originalScope, false);
- $q.when(parserResult.source(originalScope, locals)).then(function(matches) {
- //it might happen that several async queries were in progress if a user were typing fast
- //but we are interested only in responses that correspond to the current view value
- var onCurrentRequest = (inputValue === modelCtrl.$viewValue);
- if (onCurrentRequest && hasFocus) {
- if (matches && matches.length > 0) {
- scope.activeIdx = focusFirst ? 0 : -1;
- isNoResultsSetter(originalScope, false);
- scope.matches.length = 0;
-
- //transform labels
- for (var i = 0; i < matches.length; i++) {
- locals[parserResult.itemName] = matches[i];
- scope.matches.push({
- id: getMatchId(i),
- label: parserResult.viewMapper(scope, locals),
- model: matches[i]
- });
- }
-
- scope.query = inputValue;
- //position pop-up with matches - we need to re-calculate its position each time we are opening a window
- //with matches as a pop-up might be absolute-positioned and position of an input might have changed on a page
- //due to other elements being rendered
- recalculatePosition();
-
- element.attr('aria-expanded', true);
-
- //Select the single remaining option if user input matches
- if (selectOnExact && scope.matches.length === 1 && inputIsExactMatch(inputValue, 0)) {
- scope.select(0);
- }
- } else {
- resetMatches();
- isNoResultsSetter(originalScope, true);
- }
- }
- if (onCurrentRequest) {
- isLoadingSetter(originalScope, false);
- }
- }, function() {
- resetMatches();
- isLoadingSetter(originalScope, false);
- isNoResultsSetter(originalScope, true);
- });
- };
-
- // bind events only if appendToBody params exist - performance feature
- if (appendToBody) {
- angular.element($window).bind('resize', fireRecalculating);
- $document.find('body').bind('scroll', fireRecalculating);
- }
-
- // Declare the timeout promise var outside the function scope so that stacked calls can be cancelled later
- var timeoutEventPromise;
-
- // Default progress type
- scope.moveInProgress = false;
-
- function fireRecalculating() {
- if (!scope.moveInProgress) {
- scope.moveInProgress = true;
- scope.$digest();
- }
-
- // Cancel previous timeout
- if (timeoutEventPromise) {
- $timeout.cancel(timeoutEventPromise);
- }
-
- // Debounced executing recalculate after events fired
- timeoutEventPromise = $timeout(function() {
- // if popup is visible
- if (scope.matches.length) {
- recalculatePosition();
- }
-
- scope.moveInProgress = false;
- }, eventDebounceTime);
- }
-
- // recalculate actual position and set new values to scope
- // after digest loop is popup in right position
- function recalculatePosition() {
- scope.position = appendToBody ? $position.offset(element) : $position.position(element);
- scope.position.top += element.prop('offsetHeight');
- }
-
- //we need to propagate user's query so we can higlight matches
- scope.query = undefined;
-
- //Declare the timeout promise var outside the function scope so that stacked calls can be cancelled later
- var timeoutPromise;
-
- var scheduleSearchWithTimeout = function(inputValue) {
- timeoutPromise = $timeout(function() {
- getMatchesAsync(inputValue);
- }, waitTime);
- };
-
- var cancelPreviousTimeout = function() {
- if (timeoutPromise) {
- $timeout.cancel(timeoutPromise);
- }
- };
-
- resetMatches();
-
- scope.select = function(activeIdx) {
- //called from within the $digest() cycle
- var locals = {};
- var model, item;
-
- selected = true;
- locals[parserResult.itemName] = item = scope.matches[activeIdx].model;
- model = parserResult.modelMapper(originalScope, locals);
- $setModelValue(originalScope, model);
- modelCtrl.$setValidity('editable', true);
- modelCtrl.$setValidity('parse', true);
-
- onSelectCallback(originalScope, {
- $item: item,
- $model: model,
- $label: parserResult.viewMapper(originalScope, locals)
- });
-
- resetMatches();
-
- //return focus to the input element if a match was selected via a mouse click event
- // use timeout to avoid $rootScope:inprog error
- if (scope.$eval(attrs.typeaheadFocusOnSelect) !== false) {
- $timeout(function() { element[0].focus(); }, 0, false);
- }
- };
-
- //bind keyboard events: arrows up(38) / down(40), enter(13) and tab(9), esc(27)
- element.bind('keydown', function(evt) {
- //typeahead is open and an "interesting" key was pressed
- if (scope.matches.length === 0 || HOT_KEYS.indexOf(evt.which) === -1) {
- return;
- }
-
- // if there's nothing selected (i.e. focusFirst) and enter or tab is hit, clear the results
- if (scope.activeIdx === -1 && (evt.which === 9 || evt.which === 13)) {
- resetMatches();
- scope.$digest();
- return;
- }
-
- evt.preventDefault();
-
- if (evt.which === 40) {
- scope.activeIdx = (scope.activeIdx + 1) % scope.matches.length;
- scope.$digest();
- } else if (evt.which === 38) {
- scope.activeIdx = (scope.activeIdx > 0 ? scope.activeIdx : scope.matches.length) - 1;
- scope.$digest();
- } else if (evt.which === 13 || evt.which === 9) {
- scope.$apply(function () {
- scope.select(scope.activeIdx);
- });
- } else if (evt.which === 27) {
- evt.stopPropagation();
-
- resetMatches();
- scope.$digest();
- }
- });
-
- element.bind('blur', function() {
- if (isSelectOnBlur && scope.matches.length && scope.activeIdx !== -1 && !selected) {
- selected = true;
- scope.$apply(function() {
- scope.select(scope.activeIdx);
- });
- }
- hasFocus = false;
- selected = false;
- });
-
- // Keep reference to click handler to unbind it.
- var dismissClickHandler = function(evt) {
- // Issue #3973
- // Firefox treats right click as a click on document
- if (element[0] !== evt.target && evt.which !== 3 && scope.matches.length !== 0) {
- resetMatches();
- if (!$rootScope.$$phase) {
- scope.$digest();
- }
- }
- };
-
- $document.bind('click', dismissClickHandler);
-
- originalScope.$on('$destroy', function() {
- $document.unbind('click', dismissClickHandler);
- if (appendToBody || appendToElementId) {
- $popup.remove();
- }
-
- if (appendToBody) {
- angular.element($window).unbind('resize', fireRecalculating);
- $document.find('body').unbind('scroll', fireRecalculating);
- }
- // Prevent jQuery cache memory leak
- popUpEl.remove();
- });
-
- var $popup = $compile(popUpEl)(scope);
-
- if (appendToBody) {
- $document.find('body').append($popup);
- } else if (appendToElementId !== false) {
- angular.element($document[0].getElementById(appendToElementId)).append($popup);
- } else {
- element.after($popup);
- }
-
- this.init = function(_modelCtrl, _ngModelOptions) {
- modelCtrl = _modelCtrl;
- ngModelOptions = _ngModelOptions;
-
- //plug into $parsers pipeline to open a typeahead on view changes initiated from DOM
- //$parsers kick-in on all the changes coming from the view as well as manually triggered by $setViewValue
- modelCtrl.$parsers.unshift(function(inputValue) {
- hasFocus = true;
-
- if (minLength === 0 || inputValue && inputValue.length >= minLength) {
- if (waitTime > 0) {
- cancelPreviousTimeout();
- scheduleSearchWithTimeout(inputValue);
- } else {
- getMatchesAsync(inputValue);
- }
- } else {
- isLoadingSetter(originalScope, false);
- cancelPreviousTimeout();
- resetMatches();
- }
-
- if (isEditable) {
- return inputValue;
- } else {
- if (!inputValue) {
- // Reset in case user had typed something previously.
- modelCtrl.$setValidity('editable', true);
- return null;
- } else {
- modelCtrl.$setValidity('editable', false);
- return undefined;
- }
- }
- });
-
- modelCtrl.$formatters.push(function(modelValue) {
- var candidateViewValue, emptyViewValue;
- var locals = {};
-
- // The validity may be set to false via $parsers (see above) if
- // the model is restricted to selected values. If the model
- // is set manually it is considered to be valid.
- if (!isEditable) {
- modelCtrl.$setValidity('editable', true);
- }
-
- if (inputFormatter) {
- locals.$model = modelValue;
- return inputFormatter(originalScope, locals);
- } else {
- //it might happen that we don't have enough info to properly render input value
- //we need to check for this situation and simply return model value if we can't apply custom formatting
- locals[parserResult.itemName] = modelValue;
- candidateViewValue = parserResult.viewMapper(originalScope, locals);
- locals[parserResult.itemName] = undefined;
- emptyViewValue = parserResult.viewMapper(originalScope, locals);
-
- return candidateViewValue !== emptyViewValue ? candidateViewValue : modelValue;
- }
- });
- };
- }])
-
- .directive('uibTypeahead', function() {
- return {
- controller: 'UibTypeaheadController',
- require: ['ngModel', '^?ngModelOptions', 'uibTypeahead'],
- link: function(originalScope, element, attrs, ctrls) {
- ctrls[2].init(ctrls[0], ctrls[1]);
- }
- };
- })
-
- .directive('uibTypeaheadPopup', function() {
- return {
- scope: {
- matches: '=',
- query: '=',
- active: '=',
- position: '&',
- moveInProgress: '=',
- select: '&'
- },
- replace: true,
- templateUrl: function(element, attrs) {
- return attrs.popupTemplateUrl || 'template/typeahead/typeahead-popup.html';
- },
- link: function(scope, element, attrs) {
- scope.templateUrl = attrs.templateUrl;
-
- scope.isOpen = function() {
- return scope.matches.length > 0;
- };
-
- scope.isActive = function(matchIdx) {
- return scope.active == matchIdx;
- };
-
- scope.selectActive = function(matchIdx) {
- scope.active = matchIdx;
- };
-
- scope.selectMatch = function(activeIdx) {
- scope.select({activeIdx:activeIdx});
- };
- }
- };
- })
-
- .directive('uibTypeaheadMatch', ['$templateRequest', '$compile', '$parse', function($templateRequest, $compile, $parse) {
- return {
- scope: {
- index: '=',
- match: '=',
- query: '='
- },
- link:function(scope, element, attrs) {
- var tplUrl = $parse(attrs.templateUrl)(scope.$parent) || 'template/typeahead/typeahead-match.html';
- $templateRequest(tplUrl).then(function(tplContent) {
- $compile(tplContent.trim())(scope, function(clonedElement) {
- element.replaceWith(clonedElement);
- });
- });
- }
- };
- }])
-
- .filter('uibTypeaheadHighlight', ['$sce', '$injector', '$log', function($sce, $injector, $log) {
- var isSanitizePresent;
- isSanitizePresent = $injector.has('$sanitize');
-
- function escapeRegexp(queryToEscape) {
- // Regex: capture the whole query string and replace it with the string that will be used to match
- // the results, for example if the capture is "a" the result will be \a
- return queryToEscape.replace(/([.?*+^$[\]\\(){}|-])/g, '\\$1');
- }
-
- function containsHtml(matchItem) {
- return /<.*>/g.test(matchItem);
- }
-
- return function(matchItem, query) {
- if (!isSanitizePresent && containsHtml(matchItem)) {
- $log.warn('Unsafe use of typeahead please use ngSanitize'); // Warn the user about the danger
- }
- matchItem = query? ('' + matchItem).replace(new RegExp(escapeRegexp(query), 'gi'), '<strong>$&</strong>') : matchItem; // Replaces the capture string with a the same string inside of a "strong" tag
- if (!isSanitizePresent) {
- matchItem = $sce.trustAsHtml(matchItem); // If $sanitize is not present we pack the string in a $sce object for the ng-bind-html directive
- }
- return matchItem;
- };
- }]);
-
-/* Deprecated typeahead below */
-
-angular.module('ui.bootstrap.typeahead')
- .value('$typeaheadSuppressWarning', false)
- .service('typeaheadParser', ['$parse', 'uibTypeaheadParser', '$log', '$typeaheadSuppressWarning', function($parse, uibTypeaheadParser, $log, $typeaheadSuppressWarning) {
- if (!$typeaheadSuppressWarning) {
- $log.warn('typeaheadParser is now deprecated. Use uibTypeaheadParser instead.');
- }
-
- return uibTypeaheadParser;
- }])
-
- .directive('typeahead', ['$compile', '$parse', '$q', '$timeout', '$document', '$window', '$rootScope', '$uibPosition', 'typeaheadParser', '$log', '$typeaheadSuppressWarning',
- function($compile, $parse, $q, $timeout, $document, $window, $rootScope, $position, typeaheadParser, $log, $typeaheadSuppressWarning) {
- var HOT_KEYS = [9, 13, 27, 38, 40];
- var eventDebounceTime = 200;
- return {
- require: ['ngModel', '^?ngModelOptions'],
- link: function(originalScope, element, attrs, ctrls) {
- if (!$typeaheadSuppressWarning) {
- $log.warn('typeahead is now deprecated. Use uib-typeahead instead.');
- }
- var modelCtrl = ctrls[0];
- var ngModelOptions = ctrls[1];
- //SUPPORTED ATTRIBUTES (OPTIONS)
-
- //minimal no of characters that needs to be entered before typeahead kicks-in
- var minLength = originalScope.$eval(attrs.typeaheadMinLength);
- if (!minLength && minLength !== 0) {
- minLength = 1;
- }
-
- //minimal wait time after last character typed before typeahead kicks-in
- var waitTime = originalScope.$eval(attrs.typeaheadWaitMs) || 0;
-
- //should it restrict model values to the ones selected from the popup only?
- var isEditable = originalScope.$eval(attrs.typeaheadEditable) !== false;
-
- //binding to a variable that indicates if matches are being retrieved asynchronously
- var isLoadingSetter = $parse(attrs.typeaheadLoading).assign || angular.noop;
-
- //a callback executed when a match is selected
- var onSelectCallback = $parse(attrs.typeaheadOnSelect);
-
- //should it select highlighted popup value when losing focus?
- var isSelectOnBlur = angular.isDefined(attrs.typeaheadSelectOnBlur) ? originalScope.$eval(attrs.typeaheadSelectOnBlur) : false;
-
- //binding to a variable that indicates if there were no results after the query is completed
- var isNoResultsSetter = $parse(attrs.typeaheadNoResults).assign || angular.noop;
-
- var inputFormatter = attrs.typeaheadInputFormatter ? $parse(attrs.typeaheadInputFormatter) : undefined;
-
- var appendToBody = attrs.typeaheadAppendToBody ? originalScope.$eval(attrs.typeaheadAppendToBody) : false;
-
- var appendToElementId = attrs.typeaheadAppendToElementId || false;
-
- var focusFirst = originalScope.$eval(attrs.typeaheadFocusFirst) !== false;
-
- //If input matches an item of the list exactly, select it automatically
- var selectOnExact = attrs.typeaheadSelectOnExact ? originalScope.$eval(attrs.typeaheadSelectOnExact) : false;
-
- //INTERNAL VARIABLES
-
- //model setter executed upon match selection
- var parsedModel = $parse(attrs.ngModel);
- var invokeModelSetter = $parse(attrs.ngModel + '($$$p)');
- var $setModelValue = function(scope, newValue) {
- if (angular.isFunction(parsedModel(originalScope)) &&
- ngModelOptions && ngModelOptions.$options && ngModelOptions.$options.getterSetter) {
- return invokeModelSetter(scope, {$$$p: newValue});
- } else {
- return parsedModel.assign(scope, newValue);
- }
- };
-
- //expressions used by typeahead
- var parserResult = typeaheadParser.parse(attrs.typeahead);
-
- var hasFocus;
-
- //Used to avoid bug in iOS webview where iOS keyboard does not fire
- //mousedown & mouseup events
- //Issue #3699
- var selected;
-
- //create a child scope for the typeahead directive so we are not polluting original scope
- //with typeahead-specific data (matches, query etc.)
- var scope = originalScope.$new();
- var offDestroy = originalScope.$on('$destroy', function() {
- scope.$destroy();
- });
- scope.$on('$destroy', offDestroy);
-
- // WAI-ARIA
- var popupId = 'typeahead-' + scope.$id + '-' + Math.floor(Math.random() * 10000);
- element.attr({
- 'aria-autocomplete': 'list',
- 'aria-expanded': false,
- 'aria-owns': popupId
- });
-
- //pop-up element used to display matches
- var popUpEl = angular.element('<div typeahead-popup></div>');
- popUpEl.attr({
- id: popupId,
- matches: 'matches',
- active: 'activeIdx',
- select: 'select(activeIdx)',
- 'move-in-progress': 'moveInProgress',
- query: 'query',
- position: 'position'
- });
- //custom item template
- if (angular.isDefined(attrs.typeaheadTemplateUrl)) {
- popUpEl.attr('template-url', attrs.typeaheadTemplateUrl);
- }
-
- if (angular.isDefined(attrs.typeaheadPopupTemplateUrl)) {
- popUpEl.attr('popup-template-url', attrs.typeaheadPopupTemplateUrl);
- }
-
- var resetMatches = function() {
- scope.matches = [];
- scope.activeIdx = -1;
- element.attr('aria-expanded', false);
- };
-
- var getMatchId = function(index) {
- return popupId + '-option-' + index;
- };
-
- // Indicate that the specified match is the active (pre-selected) item in the list owned by this typeahead.
- // This attribute is added or removed automatically when the `activeIdx` changes.
- scope.$watch('activeIdx', function(index) {
- if (index < 0) {
- element.removeAttr('aria-activedescendant');
- } else {
- element.attr('aria-activedescendant', getMatchId(index));
- }
- });
-
- var inputIsExactMatch = function(inputValue, index) {
- if (scope.matches.length > index && inputValue) {
- return inputValue.toUpperCase() === scope.matches[index].label.toUpperCase();
- }
-
- return false;
- };
-
- var getMatchesAsync = function(inputValue) {
- var locals = {$viewValue: inputValue};
- isLoadingSetter(originalScope, true);
- isNoResultsSetter(originalScope, false);
- $q.when(parserResult.source(originalScope, locals)).then(function(matches) {
- //it might happen that several async queries were in progress if a user were typing fast
- //but we are interested only in responses that correspond to the current view value
- var onCurrentRequest = (inputValue === modelCtrl.$viewValue);
- if (onCurrentRequest && hasFocus) {
- if (matches && matches.length > 0) {
- scope.activeIdx = focusFirst ? 0 : -1;
- isNoResultsSetter(originalScope, false);
- scope.matches.length = 0;
-
- //transform labels
- for (var i = 0; i < matches.length; i++) {
- locals[parserResult.itemName] = matches[i];
- scope.matches.push({
- id: getMatchId(i),
- label: parserResult.viewMapper(scope, locals),
- model: matches[i]
- });
- }
-
- scope.query = inputValue;
- //position pop-up with matches - we need to re-calculate its position each time we are opening a window
- //with matches as a pop-up might be absolute-positioned and position of an input might have changed on a page
- //due to other elements being rendered
- recalculatePosition();
-
- element.attr('aria-expanded', true);
-
- //Select the single remaining option if user input matches
- if (selectOnExact && scope.matches.length === 1 && inputIsExactMatch(inputValue, 0)) {
- scope.select(0);
- }
- } else {
- resetMatches();
- isNoResultsSetter(originalScope, true);
- }
- }
- if (onCurrentRequest) {
- isLoadingSetter(originalScope, false);
- }
- }, function() {
- resetMatches();
- isLoadingSetter(originalScope, false);
- isNoResultsSetter(originalScope, true);
- });
- };
-
- // bind events only if appendToBody params exist - performance feature
- if (appendToBody) {
- angular.element($window).bind('resize', fireRecalculating);
- $document.find('body').bind('scroll', fireRecalculating);
- }
-
- // Declare the timeout promise var outside the function scope so that stacked calls can be cancelled later
- var timeoutEventPromise;
-
- // Default progress type
- scope.moveInProgress = false;
-
- function fireRecalculating() {
- if (!scope.moveInProgress) {
- scope.moveInProgress = true;
- scope.$digest();
- }
-
- // Cancel previous timeout
- if (timeoutEventPromise) {
- $timeout.cancel(timeoutEventPromise);
- }
-
- // Debounced executing recalculate after events fired
- timeoutEventPromise = $timeout(function() {
- // if popup is visible
- if (scope.matches.length) {
- recalculatePosition();
- }
-
- scope.moveInProgress = false;
- }, eventDebounceTime);
- }
-
- // recalculate actual position and set new values to scope
- // after digest loop is popup in right position
- function recalculatePosition() {
- scope.position = appendToBody ? $position.offset(element) : $position.position(element);
- scope.position.top += element.prop('offsetHeight');
- }
-
- resetMatches();
-
- //we need to propagate user's query so we can higlight matches
- scope.query = undefined;
-
- //Declare the timeout promise var outside the function scope so that stacked calls can be cancelled later
- var timeoutPromise;
-
- var scheduleSearchWithTimeout = function(inputValue) {
- timeoutPromise = $timeout(function() {
- getMatchesAsync(inputValue);
- }, waitTime);
- };
-
- var cancelPreviousTimeout = function() {
- if (timeoutPromise) {
- $timeout.cancel(timeoutPromise);
- }
- };
-
- //plug into $parsers pipeline to open a typeahead on view changes initiated from DOM
- //$parsers kick-in on all the changes coming from the view as well as manually triggered by $setViewValue
- modelCtrl.$parsers.unshift(function(inputValue) {
- hasFocus = true;
-
- if (minLength === 0 || inputValue && inputValue.length >= minLength) {
- if (waitTime > 0) {
- cancelPreviousTimeout();
- scheduleSearchWithTimeout(inputValue);
- } else {
- getMatchesAsync(inputValue);
- }
- } else {
- isLoadingSetter(originalScope, false);
- cancelPreviousTimeout();
- resetMatches();
- }
-
- if (isEditable) {
- return inputValue;
- } else {
- if (!inputValue) {
- // Reset in case user had typed something previously.
- modelCtrl.$setValidity('editable', true);
- return null;
- } else {
- modelCtrl.$setValidity('editable', false);
- return undefined;
- }
- }
- });
-
- modelCtrl.$formatters.push(function(modelValue) {
- var candidateViewValue, emptyViewValue;
- var locals = {};
-
- // The validity may be set to false via $parsers (see above) if
- // the model is restricted to selected values. If the model
- // is set manually it is considered to be valid.
- if (!isEditable) {
- modelCtrl.$setValidity('editable', true);
- }
-
- if (inputFormatter) {
- locals.$model = modelValue;
- return inputFormatter(originalScope, locals);
- } else {
- //it might happen that we don't have enough info to properly render input value
- //we need to check for this situation and simply return model value if we can't apply custom formatting
- locals[parserResult.itemName] = modelValue;
- candidateViewValue = parserResult.viewMapper(originalScope, locals);
- locals[parserResult.itemName] = undefined;
- emptyViewValue = parserResult.viewMapper(originalScope, locals);
-
- return candidateViewValue !== emptyViewValue ? candidateViewValue : modelValue;
- }
- });
-
- scope.select = function(activeIdx) {
- //called from within the $digest() cycle
- var locals = {};
- var model, item;
-
- selected = true;
- locals[parserResult.itemName] = item = scope.matches[activeIdx].model;
- model = parserResult.modelMapper(originalScope, locals);
- $setModelValue(originalScope, model);
- modelCtrl.$setValidity('editable', true);
- modelCtrl.$setValidity('parse', true);
-
- onSelectCallback(originalScope, {
- $item: item,
- $model: model,
- $label: parserResult.viewMapper(originalScope, locals)
- });
-
- resetMatches();
-
- //return focus to the input element if a match was selected via a mouse click event
- // use timeout to avoid $rootScope:inprog error
- if (scope.$eval(attrs.typeaheadFocusOnSelect) !== false) {
- $timeout(function() { element[0].focus(); }, 0, false);
- }
- };
-
- //bind keyboard events: arrows up(38) / down(40), enter(13) and tab(9), esc(27)
- element.bind('keydown', function(evt) {
- //typeahead is open and an "interesting" key was pressed
- if (scope.matches.length === 0 || HOT_KEYS.indexOf(evt.which) === -1) {
- return;
- }
-
- // if there's nothing selected (i.e. focusFirst) and enter or tab is hit, clear the results
- if (scope.activeIdx === -1 && (evt.which === 9 || evt.which === 13)) {
- resetMatches();
- scope.$digest();
- return;
- }
-
- evt.preventDefault();
-
- if (evt.which === 40) {
- scope.activeIdx = (scope.activeIdx + 1) % scope.matches.length;
- scope.$digest();
- } else if (evt.which === 38) {
- scope.activeIdx = (scope.activeIdx > 0 ? scope.activeIdx : scope.matches.length) - 1;
- scope.$digest();
- } else if (evt.which === 13 || evt.which === 9) {
- scope.$apply(function () {
- scope.select(scope.activeIdx);
- });
- } else if (evt.which === 27) {
- evt.stopPropagation();
-
- resetMatches();
- scope.$digest();
- }
- });
-
- element.bind('blur', function() {
- if (isSelectOnBlur && scope.matches.length && scope.activeIdx !== -1 && !selected) {
- selected = true;
- scope.$apply(function() {
- scope.select(scope.activeIdx);
- });
- }
- hasFocus = false;
- selected = false;
- });
-
- // Keep reference to click handler to unbind it.
- var dismissClickHandler = function(evt) {
- // Issue #3973
- // Firefox treats right click as a click on document
- if (element[0] !== evt.target && evt.which !== 3 && scope.matches.length !== 0) {
- resetMatches();
- if (!$rootScope.$$phase) {
- scope.$digest();
- }
- }
- };
-
- $document.bind('click', dismissClickHandler);
-
- originalScope.$on('$destroy', function() {
- $document.unbind('click', dismissClickHandler);
- if (appendToBody || appendToElementId) {
- $popup.remove();
- }
-
- if (appendToBody) {
- angular.element($window).unbind('resize', fireRecalculating);
- $document.find('body').unbind('scroll', fireRecalculating);
- }
- // Prevent jQuery cache memory leak
- popUpEl.remove();
- });
-
- var $popup = $compile(popUpEl)(scope);
-
- if (appendToBody) {
- $document.find('body').append($popup);
- } else if (appendToElementId !== false) {
- angular.element($document[0].getElementById(appendToElementId)).append($popup);
- } else {
- element.after($popup);
- }
- }
- };
- }])
-
- .directive('typeaheadPopup', ['$typeaheadSuppressWarning', '$log', function($typeaheadSuppressWarning, $log) {
- return {
- scope: {
- matches: '=',
- query: '=',
- active: '=',
- position: '&',
- moveInProgress: '=',
- select: '&'
- },
- replace: true,
- templateUrl: function(element, attrs) {
- return attrs.popupTemplateUrl || 'template/typeahead/typeahead-popup.html';
- },
- link: function(scope, element, attrs) {
-
- if (!$typeaheadSuppressWarning) {
- $log.warn('typeahead-popup is now deprecated. Use uib-typeahead-popup instead.');
- }
- scope.templateUrl = attrs.templateUrl;
-
- scope.isOpen = function() {
- return scope.matches.length > 0;
- };
-
- scope.isActive = function(matchIdx) {
- return scope.active == matchIdx;
- };
-
- scope.selectActive = function(matchIdx) {
- scope.active = matchIdx;
- };
-
- scope.selectMatch = function(activeIdx) {
- scope.select({activeIdx:activeIdx});
- };
- }
- };
- }])
-
- .directive('typeaheadMatch', ['$templateRequest', '$compile', '$parse', '$typeaheadSuppressWarning', '$log', function($templateRequest, $compile, $parse, $typeaheadSuppressWarning, $log) {
- return {
- restrict: 'EA',
- scope: {
- index: '=',
- match: '=',
- query: '='
- },
- link:function(scope, element, attrs) {
- if (!$typeaheadSuppressWarning) {
- $log.warn('typeahead-match is now deprecated. Use uib-typeahead-match instead.');
- }
-
- var tplUrl = $parse(attrs.templateUrl)(scope.$parent) || 'template/typeahead/typeahead-match.html';
- $templateRequest(tplUrl).then(function(tplContent) {
- $compile(tplContent.trim())(scope, function(clonedElement) {
- element.replaceWith(clonedElement);
- });
- });
- }
- };
- }])
-
- .filter('typeaheadHighlight', ['$sce', '$injector', '$log', '$typeaheadSuppressWarning', function($sce, $injector, $log, $typeaheadSuppressWarning) {
- var isSanitizePresent;
- isSanitizePresent = $injector.has('$sanitize');
-
- function escapeRegexp(queryToEscape) {
- // Regex: capture the whole query string and replace it with the string that will be used to match
- // the results, for example if the capture is "a" the result will be \a
- return queryToEscape.replace(/([.?*+^$[\]\\(){}|-])/g, '\\$1');
- }
-
- function containsHtml(matchItem) {
- return /<.*>/g.test(matchItem);
- }
-
- return function(matchItem, query) {
- if (!$typeaheadSuppressWarning) {
- $log.warn('typeaheadHighlight is now deprecated. Use uibTypeaheadHighlight instead.');
- }
-
- if (!isSanitizePresent && containsHtml(matchItem)) {
- $log.warn('Unsafe use of typeahead please use ngSanitize'); // Warn the user about the danger
- }
-
- matchItem = query? ('' + matchItem).replace(new RegExp(escapeRegexp(query), 'gi'), '<strong>$&</strong>') : matchItem; // Replaces the capture string with a the same string inside of a "strong" tag
- if (!isSanitizePresent) {
- matchItem = $sce.trustAsHtml(matchItem); // If $sanitize is not present we pack the string in a $sce object for the ng-bind-html directive
- }
-
- return matchItem;
- };
- }]);
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/template/accordion/accordion-group.html b/applications/auto-scale/gui/src/vendor/ui.bootstrap/template/accordion/accordion-group.html
deleted file mode 100644
index 1dc4c8e..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/template/accordion/accordion-group.html
+++ /dev/null
@@ -1,10 +0,0 @@
-<div class="panel {{panelClass || 'panel-default'}}">
- <div class="panel-heading" ng-keypress="toggleOpen($event)">
- <h4 class="panel-title">
- <a href tabindex="0" class="accordion-toggle" ng-click="toggleOpen()" uib-accordion-transclude="heading"><span ng-class="{'text-muted': isDisabled}">{{heading}}</span></a>
- </h4>
- </div>
- <div class="panel-collapse collapse" uib-collapse="!isOpen">
- <div class="panel-body" ng-transclude></div>
- </div>
-</div>
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/template/accordion/accordion.html b/applications/auto-scale/gui/src/vendor/ui.bootstrap/template/accordion/accordion.html
deleted file mode 100644
index ba428f3..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/template/accordion/accordion.html
+++ /dev/null
@@ -1 +0,0 @@
-<div class="panel-group" ng-transclude></div>
\ No newline at end of file
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/template/alert/alert.html b/applications/auto-scale/gui/src/vendor/ui.bootstrap/template/alert/alert.html
deleted file mode 100644
index 0885587..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/template/alert/alert.html
+++ /dev/null
@@ -1,7 +0,0 @@
-<div class="alert" ng-class="['alert-' + (type || 'warning'), closeable ? 'alert-dismissible' : null]" role="alert">
- <button ng-show="closeable" type="button" class="close" ng-click="close({$event: $event})">
- <span aria-hidden="true">×</span>
- <span class="sr-only">Close</span>
- </button>
- <div ng-transclude></div>
-</div>
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/template/carousel/carousel.html b/applications/auto-scale/gui/src/vendor/ui.bootstrap/template/carousel/carousel.html
deleted file mode 100644
index 372c547..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/template/carousel/carousel.html
+++ /dev/null
@@ -1,16 +0,0 @@
-<div ng-mouseenter="pause()" ng-mouseleave="play()" class="carousel" ng-swipe-right="prev()" ng-swipe-left="next()">
- <div class="carousel-inner" ng-transclude></div>
- <a role="button" href class="left carousel-control" ng-click="prev()" ng-show="slides.length > 1">
- <span aria-hidden="true" class="glyphicon glyphicon-chevron-left"></span>
- <span class="sr-only">previous</span>
- </a>
- <a role="button" href class="right carousel-control" ng-click="next()" ng-show="slides.length > 1">
- <span aria-hidden="true" class="glyphicon glyphicon-chevron-right"></span>
- <span class="sr-only">next</span>
- </a>
- <ol class="carousel-indicators" ng-show="slides.length > 1">
- <li ng-repeat="slide in slides | orderBy:indexOfSlide track by $index" ng-class="{ active: isActive(slide) }" ng-click="select(slide)">
- <span class="sr-only">slide {{ $index + 1 }} of {{ slides.length }}<span ng-if="isActive(slide)">, currently active</span></span>
- </li>
- </ol>
-</div>
\ No newline at end of file
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/template/carousel/slide.html b/applications/auto-scale/gui/src/vendor/ui.bootstrap/template/carousel/slide.html
deleted file mode 100644
index 5220139..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/template/carousel/slide.html
+++ /dev/null
@@ -1,3 +0,0 @@
-<div ng-class="{
- 'active': active
- }" class="item text-center" ng-transclude></div>
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/template/datepicker/datepicker.html b/applications/auto-scale/gui/src/vendor/ui.bootstrap/template/datepicker/datepicker.html
deleted file mode 100644
index d515832..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/template/datepicker/datepicker.html
+++ /dev/null
@@ -1,5 +0,0 @@
-<div ng-switch="datepickerMode" role="application" ng-keydown="keydown($event)">
- <uib-daypicker ng-switch-when="day" tabindex="0"></uib-daypicker>
- <uib-monthpicker ng-switch-when="month" tabindex="0"></uib-monthpicker>
- <uib-yearpicker ng-switch-when="year" tabindex="0"></uib-yearpicker>
-</div>
\ No newline at end of file
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/template/datepicker/day.html b/applications/auto-scale/gui/src/vendor/ui.bootstrap/template/datepicker/day.html
deleted file mode 100644
index 91cf57a..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/template/datepicker/day.html
+++ /dev/null
@@ -1,21 +0,0 @@
-<table role="grid" aria-labelledby="{{::uniqueId}}-title" aria-activedescendant="{{activeDateId}}">
- <thead>
- <tr>
- <th><button type="button" class="btn btn-default btn-sm pull-left" ng-click="move(-1)" tabindex="-1"><i class="glyphicon glyphicon-chevron-left"></i></button></th>
- <th colspan="{{::5 + showWeeks}}"><button id="{{::uniqueId}}-title" role="heading" aria-live="assertive" aria-atomic="true" type="button" class="btn btn-default btn-sm" ng-click="toggleMode()" ng-disabled="datepickerMode === maxMode" tabindex="-1" style="width:100%;"><strong>{{title}}</strong></button></th>
- <th><button type="button" class="btn btn-default btn-sm pull-right" ng-click="move(1)" tabindex="-1"><i class="glyphicon glyphicon-chevron-right"></i></button></th>
- </tr>
- <tr>
- <th ng-if="showWeeks" class="text-center"></th>
- <th ng-repeat="label in ::labels track by $index" class="text-center"><small aria-label="{{::label.full}}">{{::label.abbr}}</small></th>
- </tr>
- </thead>
- <tbody>
- <tr ng-repeat="row in rows track by $index">
- <td ng-if="showWeeks" class="text-center h6"><em>{{ weekNumbers[$index] }}</em></td>
- <td ng-repeat="dt in row track by dt.date" class="text-center" role="gridcell" id="{{::dt.uid}}" ng-class="::dt.customClass">
- <button type="button" style="min-width:100%;" class="btn btn-default btn-sm" ng-class="{'btn-info': dt.selected, active: isActive(dt)}" ng-click="select(dt.date)" ng-disabled="dt.disabled" tabindex="-1"><span ng-class="::{'text-muted': dt.secondary, 'text-info': dt.current}">{{::dt.label}}</span></button>
- </td>
- </tr>
- </tbody>
-</table>
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/template/datepicker/month.html b/applications/auto-scale/gui/src/vendor/ui.bootstrap/template/datepicker/month.html
deleted file mode 100644
index cebd053..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/template/datepicker/month.html
+++ /dev/null
@@ -1,16 +0,0 @@
-<table role="grid" aria-labelledby="{{::uniqueId}}-title" aria-activedescendant="{{activeDateId}}">
- <thead>
- <tr>
- <th><button type="button" class="btn btn-default btn-sm pull-left" ng-click="move(-1)" tabindex="-1"><i class="glyphicon glyphicon-chevron-left"></i></button></th>
- <th><button id="{{::uniqueId}}-title" role="heading" aria-live="assertive" aria-atomic="true" type="button" class="btn btn-default btn-sm" ng-click="toggleMode()" ng-disabled="datepickerMode === maxMode" tabindex="-1" style="width:100%;"><strong>{{title}}</strong></button></th>
- <th><button type="button" class="btn btn-default btn-sm pull-right" ng-click="move(1)" tabindex="-1"><i class="glyphicon glyphicon-chevron-right"></i></button></th>
- </tr>
- </thead>
- <tbody>
- <tr ng-repeat="row in rows track by $index">
- <td ng-repeat="dt in row track by dt.date" class="text-center" role="gridcell" id="{{::dt.uid}}" ng-class="::dt.customClass">
- <button type="button" style="min-width:100%;" class="btn btn-default" ng-class="{'btn-info': dt.selected, active: isActive(dt)}" ng-click="select(dt.date)" ng-disabled="dt.disabled" tabindex="-1"><span ng-class="::{'text-info': dt.current}">{{::dt.label}}</span></button>
- </td>
- </tr>
- </tbody>
-</table>
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/template/datepicker/popup.html b/applications/auto-scale/gui/src/vendor/ui.bootstrap/template/datepicker/popup.html
deleted file mode 100644
index e3dda67..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/template/datepicker/popup.html
+++ /dev/null
@@ -1,10 +0,0 @@
-<ul class="dropdown-menu" dropdown-nested ng-if="isOpen" style="display: block" ng-style="{top: position.top+'px', left: position.left+'px'}" ng-keydown="keydown($event)" ng-click="$event.stopPropagation()">
- <li ng-transclude></li>
- <li ng-if="showButtonBar" style="padding:10px 9px 2px">
- <span class="btn-group pull-left">
- <button type="button" class="btn btn-sm btn-info" ng-click="select('today')" ng-disabled="isDisabled('today')">{{ getText('current') }}</button>
- <button type="button" class="btn btn-sm btn-danger" ng-click="select(null)">{{ getText('clear') }}</button>
- </span>
- <button type="button" class="btn btn-sm btn-success pull-right" ng-click="close()">{{ getText('close') }}</button>
- </li>
-</ul>
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/template/datepicker/year.html b/applications/auto-scale/gui/src/vendor/ui.bootstrap/template/datepicker/year.html
deleted file mode 100644
index 8606f0d..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/template/datepicker/year.html
+++ /dev/null
@@ -1,16 +0,0 @@
-<table role="grid" aria-labelledby="{{::uniqueId}}-title" aria-activedescendant="{{activeDateId}}">
- <thead>
- <tr>
- <th><button type="button" class="btn btn-default btn-sm pull-left" ng-click="move(-1)" tabindex="-1"><i class="glyphicon glyphicon-chevron-left"></i></button></th>
- <th colspan="3"><button id="{{::uniqueId}}-title" role="heading" aria-live="assertive" aria-atomic="true" type="button" class="btn btn-default btn-sm" ng-click="toggleMode()" ng-disabled="datepickerMode === maxMode" tabindex="-1" style="width:100%;"><strong>{{title}}</strong></button></th>
- <th><button type="button" class="btn btn-default btn-sm pull-right" ng-click="move(1)" tabindex="-1"><i class="glyphicon glyphicon-chevron-right"></i></button></th>
- </tr>
- </thead>
- <tbody>
- <tr ng-repeat="row in rows track by $index">
- <td ng-repeat="dt in row track by dt.date" class="text-center" role="gridcell" id="{{::dt.uid}}" ng-class="::dt.customClass">
- <button type="button" style="min-width:100%;" class="btn btn-default" ng-class="{'btn-info': dt.selected, active: isActive(dt)}" ng-click="select(dt.date)" ng-disabled="dt.disabled" tabindex="-1"><span ng-class="::{'text-info': dt.current}">{{::dt.label}}</span></button>
- </td>
- </tr>
- </tbody>
-</table>
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/template/modal/backdrop.html b/applications/auto-scale/gui/src/vendor/ui.bootstrap/template/modal/backdrop.html
deleted file mode 100644
index 214273e..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/template/modal/backdrop.html
+++ /dev/null
@@ -1,4 +0,0 @@
-<div uib-modal-animation-class="fade"
- modal-in-class="in"
- ng-style="{'z-index': 1040 + (index && 1 || 0) + index*10}"
-></div>
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/template/modal/window.html b/applications/auto-scale/gui/src/vendor/ui.bootstrap/template/modal/window.html
deleted file mode 100644
index ae17e40..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/template/modal/window.html
+++ /dev/null
@@ -1,6 +0,0 @@
-<div modal-render="{{$isRendered}}" tabindex="-1" role="dialog" class="modal"
- uib-modal-animation-class="fade"
- modal-in-class="in"
- ng-style="{'z-index': 1050 + index*10, display: 'block'}">
- <div class="modal-dialog" ng-class="size ? 'modal-' + size : ''"><div class="modal-content" uib-modal-transclude></div></div>
-</div>
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/template/pagination/pager.html b/applications/auto-scale/gui/src/vendor/ui.bootstrap/template/pagination/pager.html
deleted file mode 100644
index 46f227f..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/template/pagination/pager.html
+++ /dev/null
@@ -1,4 +0,0 @@
-<ul class="pager">
- <li ng-class="{disabled: noPrevious()||ngDisabled, previous: align}"><a href ng-click="selectPage(page - 1, $event)">{{::getText('previous')}}</a></li>
- <li ng-class="{disabled: noNext()||ngDisabled, next: align}"><a href ng-click="selectPage(page + 1, $event)">{{::getText('next')}}</a></li>
-</ul>
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/template/pagination/pagination.html b/applications/auto-scale/gui/src/vendor/ui.bootstrap/template/pagination/pagination.html
deleted file mode 100644
index f55a7b6..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/template/pagination/pagination.html
+++ /dev/null
@@ -1,7 +0,0 @@
-<ul class="pagination">
- <li ng-if="::boundaryLinks" ng-class="{disabled: noPrevious()||ngDisabled}" class="pagination-first"><a href ng-click="selectPage(1, $event)">{{::getText('first')}}</a></li>
- <li ng-if="::directionLinks" ng-class="{disabled: noPrevious()||ngDisabled}" class="pagination-prev"><a href ng-click="selectPage(page - 1, $event)">{{::getText('previous')}}</a></li>
- <li ng-repeat="page in pages track by $index" ng-class="{active: page.active,disabled: ngDisabled&&!page.active}" class="pagination-page"><a href ng-click="selectPage(page.number, $event)">{{page.text}}</a></li>
- <li ng-if="::directionLinks" ng-class="{disabled: noNext()||ngDisabled}" class="pagination-next"><a href ng-click="selectPage(page + 1, $event)">{{::getText('next')}}</a></li>
- <li ng-if="::boundaryLinks" ng-class="{disabled: noNext()||ngDisabled}" class="pagination-last"><a href ng-click="selectPage(totalPages, $event)">{{::getText('last')}}</a></li>
-</ul>
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/template/popover/popover-html.html b/applications/auto-scale/gui/src/vendor/ui.bootstrap/template/popover/popover-html.html
deleted file mode 100644
index 3751ca8..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/template/popover/popover-html.html
+++ /dev/null
@@ -1,10 +0,0 @@
-<div tooltip-animation-class="fade"
- uib-tooltip-classes
- ng-class="{ in: isOpen() }">
- <div class="arrow"></div>
-
- <div class="popover-inner">
- <h3 class="popover-title" ng-bind="title" ng-if="title"></h3>
- <div class="popover-content" ng-bind-html="contentExp()"></div>
- </div>
-</div>
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/template/popover/popover-template.html b/applications/auto-scale/gui/src/vendor/ui.bootstrap/template/popover/popover-template.html
deleted file mode 100644
index 914d1d4..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/template/popover/popover-template.html
+++ /dev/null
@@ -1,12 +0,0 @@
-<div tooltip-animation-class="fade"
- uib-tooltip-classes
- ng-class="{ in: isOpen() }">
- <div class="arrow"></div>
-
- <div class="popover-inner">
- <h3 class="popover-title" ng-bind="title" ng-if="title"></h3>
- <div class="popover-content"
- uib-tooltip-template-transclude="contentExp()"
- tooltip-template-transclude-scope="originScope()"></div>
- </div>
-</div>
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/template/popover/popover.html b/applications/auto-scale/gui/src/vendor/ui.bootstrap/template/popover/popover.html
deleted file mode 100644
index 91a7883..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/template/popover/popover.html
+++ /dev/null
@@ -1,10 +0,0 @@
-<div tooltip-animation-class="fade"
- uib-tooltip-classes
- ng-class="{ in: isOpen() }">
- <div class="arrow"></div>
-
- <div class="popover-inner">
- <h3 class="popover-title" ng-bind="title" ng-if="title"></h3>
- <div class="popover-content" ng-bind="content"></div>
- </div>
-</div>
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/template/progressbar/bar.html b/applications/auto-scale/gui/src/vendor/ui.bootstrap/template/progressbar/bar.html
deleted file mode 100644
index b5b61e0..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/template/progressbar/bar.html
+++ /dev/null
@@ -1 +0,0 @@
-<div class="progress-bar" ng-class="type && 'progress-bar-' + type" role="progressbar" aria-valuenow="{{value}}" aria-valuemin="0" aria-valuemax="{{max}}" ng-style="{width: (percent < 100 ? percent : 100) + '%'}" aria-valuetext="{{percent | number:0}}%" aria-labelledby="{{::title}}" style="min-width: 0;" ng-transclude></div>
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/template/progressbar/progress.html b/applications/auto-scale/gui/src/vendor/ui.bootstrap/template/progressbar/progress.html
deleted file mode 100644
index 38ee9f7..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/template/progressbar/progress.html
+++ /dev/null
@@ -1 +0,0 @@
-<div class="progress" ng-transclude aria-labelledby="{{::title}}"></div>
\ No newline at end of file
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/template/progressbar/progressbar.html b/applications/auto-scale/gui/src/vendor/ui.bootstrap/template/progressbar/progressbar.html
deleted file mode 100644
index dbfa5aa..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/template/progressbar/progressbar.html
+++ /dev/null
@@ -1,3 +0,0 @@
-<div class="progress">
- <div class="progress-bar" ng-class="type && 'progress-bar-' + type" role="progressbar" aria-valuenow="{{value}}" aria-valuemin="0" aria-valuemax="{{max}}" ng-style="{width: (percent < 100 ? percent : 100) + '%'}" aria-valuetext="{{percent | number:0}}%" aria-labelledby="{{::title}}" style="min-width: 0;" ng-transclude></div>
-</div>
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/template/rating/rating.html b/applications/auto-scale/gui/src/vendor/ui.bootstrap/template/rating/rating.html
deleted file mode 100644
index 5543b03..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/template/rating/rating.html
+++ /dev/null
@@ -1,4 +0,0 @@
-<span ng-mouseleave="reset()" ng-keydown="onKeydown($event)" tabindex="0" role="slider" aria-valuemin="0" aria-valuemax="{{range.length}}" aria-valuenow="{{value}}">
- <span ng-repeat-start="r in range track by $index" class="sr-only">({{ $index < value ? '*' : ' ' }})</span>
- <i ng-repeat-end ng-mouseenter="enter($index + 1)" ng-click="rate($index + 1)" class="glyphicon" ng-class="$index < value && (r.stateOn || 'glyphicon-star') || (r.stateOff || 'glyphicon-star-empty')" ng-attr-title="{{r.title}}" aria-valuetext="{{r.title}}"></i>
-</span>
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/template/tabs/tab.html b/applications/auto-scale/gui/src/vendor/ui.bootstrap/template/tabs/tab.html
deleted file mode 100644
index 0d8a42e..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/template/tabs/tab.html
+++ /dev/null
@@ -1,3 +0,0 @@
-<li ng-class="{active: active, disabled: disabled}">
- <a href ng-click="select()" uib-tab-heading-transclude>{{heading}}</a>
-</li>
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/template/tabs/tabset.html b/applications/auto-scale/gui/src/vendor/ui.bootstrap/template/tabs/tabset.html
deleted file mode 100644
index 294c86a..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/template/tabs/tabset.html
+++ /dev/null
@@ -1,10 +0,0 @@
-<div>
- <ul class="nav nav-{{type || 'tabs'}}" ng-class="{'nav-stacked': vertical, 'nav-justified': justified}" ng-transclude></ul>
- <div class="tab-content">
- <div class="tab-pane"
- ng-repeat="tab in tabs"
- ng-class="{active: tab.active}"
- uib-tab-content-transclude="tab">
- </div>
- </div>
-</div>
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/template/timepicker/timepicker.html b/applications/auto-scale/gui/src/vendor/ui.bootstrap/template/timepicker/timepicker.html
deleted file mode 100644
index 1873841..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/template/timepicker/timepicker.html
+++ /dev/null
@@ -1,26 +0,0 @@
-<table>
- <tbody>
- <tr class="text-center" ng-show="::showSpinners">
- <td><a ng-click="incrementHours()" ng-class="{disabled: noIncrementHours()}" class="btn btn-link" ng-disabled="noIncrementHours()" tabindex="{{::tabindex}}"><span class="glyphicon glyphicon-chevron-up"></span></a></td>
- <td> </td>
- <td><a ng-click="incrementMinutes()" ng-class="{disabled: noIncrementMinutes()}" class="btn btn-link" ng-disabled="noIncrementMinutes()" tabindex="{{::tabindex}}"><span class="glyphicon glyphicon-chevron-up"></span></a></td>
- <td ng-show="showMeridian"></td>
- </tr>
- <tr>
- <td class="form-group" ng-class="{'has-error': invalidHours}">
- <input style="width:50px;" type="text" ng-model="hours" ng-change="updateHours()" class="form-control text-center" ng-readonly="::readonlyInput" maxlength="2" tabindex="{{::tabindex}}">
- </td>
- <td>:</td>
- <td class="form-group" ng-class="{'has-error': invalidMinutes}">
- <input style="width:50px;" type="text" ng-model="minutes" ng-change="updateMinutes()" class="form-control text-center" ng-readonly="::readonlyInput" maxlength="2" tabindex="{{::tabindex}}">
- </td>
- <td ng-show="showMeridian"><button type="button" ng-class="{disabled: noToggleMeridian()}" class="btn btn-default text-center" ng-click="toggleMeridian()" ng-disabled="noToggleMeridian()" tabindex="{{::tabindex}}">{{meridian}}</button></td>
- </tr>
- <tr class="text-center" ng-show="::showSpinners">
- <td><a ng-click="decrementHours()" ng-class="{disabled: noDecrementHours()}" class="btn btn-link" ng-disabled="noDecrementHours()" tabindex="{{::tabindex}}"><span class="glyphicon glyphicon-chevron-down"></span></a></td>
- <td> </td>
- <td><a ng-click="decrementMinutes()" ng-class="{disabled: noDecrementMinutes()}" class="btn btn-link" ng-disabled="noDecrementMinutes()" tabindex="{{::tabindex}}"><span class="glyphicon glyphicon-chevron-down"></span></a></td>
- <td ng-show="showMeridian"></td>
- </tr>
- </tbody>
-</table>
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/template/tooltip/tooltip-html-popup.html b/applications/auto-scale/gui/src/vendor/ui.bootstrap/template/tooltip/tooltip-html-popup.html
deleted file mode 100644
index dae22b7..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/template/tooltip/tooltip-html-popup.html
+++ /dev/null
@@ -1,7 +0,0 @@
-<div
- tooltip-animation-class="fade"
- uib-tooltip-classes
- ng-class="{ in: isOpen() }">
- <div class="tooltip-arrow"></div>
- <div class="tooltip-inner" ng-bind-html="contentExp()"></div>
-</div>
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/template/tooltip/tooltip-popup.html b/applications/auto-scale/gui/src/vendor/ui.bootstrap/template/tooltip/tooltip-popup.html
deleted file mode 100644
index 711fc56..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/template/tooltip/tooltip-popup.html
+++ /dev/null
@@ -1,7 +0,0 @@
-<div
- tooltip-animation-class="fade"
- uib-tooltip-classes
- ng-class="{ in: isOpen() }">
- <div class="tooltip-arrow"></div>
- <div class="tooltip-inner" ng-bind="content"></div>
-</div>
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/template/tooltip/tooltip-template-popup.html b/applications/auto-scale/gui/src/vendor/ui.bootstrap/template/tooltip/tooltip-template-popup.html
deleted file mode 100644
index e83bff3..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/template/tooltip/tooltip-template-popup.html
+++ /dev/null
@@ -1,9 +0,0 @@
-<div
- tooltip-animation-class="fade"
- uib-tooltip-classes
- ng-class="{ in: isOpen() }">
- <div class="tooltip-arrow"></div>
- <div class="tooltip-inner"
- uib-tooltip-template-transclude="contentExp()"
- tooltip-template-transclude-scope="originScope()"></div>
-</div>
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/template/typeahead/typeahead-match.html b/applications/auto-scale/gui/src/vendor/ui.bootstrap/template/typeahead/typeahead-match.html
deleted file mode 100644
index c64462b..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/template/typeahead/typeahead-match.html
+++ /dev/null
@@ -1 +0,0 @@
-<a href tabindex="-1" ng-bind-html="match.label | uibTypeaheadHighlight:query"></a>
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/template/typeahead/typeahead-popup.html b/applications/auto-scale/gui/src/vendor/ui.bootstrap/template/typeahead/typeahead-popup.html
deleted file mode 100644
index 20a362b..0000000
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/template/typeahead/typeahead-popup.html
+++ /dev/null
@@ -1,5 +0,0 @@
-<ul class="dropdown-menu" ng-show="isOpen() && !moveInProgress" ng-style="{top: position().top+'px', left: position().left+'px'}" style="display: block;" role="listbox" aria-hidden="{{!isOpen()}}">
- <li ng-repeat="match in matches track by $index" ng-class="{active: isActive($index) }" ng-mouseenter="selectActive($index)" ng-click="selectMatch($index)" role="option" id="{{::match.id}}">
- <div uib-typeahead-match index="$index" match="match" query="query" template-url="templateUrl"></div>
- </li>
-</ul>
diff --git a/applications/subscriberPortal/env/default.js b/applications/subscriberPortal/env/default.js
deleted file mode 100644
index c256c05..0000000
--- a/applications/subscriberPortal/env/default.js
+++ /dev/null
@@ -1,11 +0,0 @@
-// This is a default configuration for your development environment.
-// You can duplicate this configuration for any of your Backend Environments.
-// Different configurations are loaded setting a NODE_ENV variable that contain the config file name.
-// `NODE_ENV=local npm start`
-//
-// If xoscsrftoken or xossessionid are not specified the browser value are used
-// (works only for local environment as both application are served on the same domain)
-
-module.exports = {
- host: 'http://xos.dev:9999/'
-};
diff --git a/views/ngXosLib/bower.json b/views/ngXosLib/bower.json
index 228a082..08a02e3 100644
--- a/views/ngXosLib/bower.json
+++ b/views/ngXosLib/bower.json
@@ -17,7 +17,6 @@
"angular": "1.4.7",
"angular-ui-router": "0.2.15",
"angular-resource": "1.4.7",
- "ng-lodash": "0.3.0",
"angular-cookies": "1.4.7",
"angular-animate": "1.4.7",
"lodash": "~4.11.1",
diff --git a/views/ngXosLib/generator-xos/app/templates/bower.json b/views/ngXosLib/generator-xos/app/templates/bower.json
index bbddc5b..9dafc2b 100644
--- a/views/ngXosLib/generator-xos/app/templates/bower.json
+++ b/views/ngXosLib/generator-xos/app/templates/bower.json
@@ -26,6 +26,7 @@
"angular-resource": "1.4.7",
"lodash": "~4.11.1",
"bootstrap-css": "3.3.6",
- "angular-chart.js": "~0.10.2"
+ "angular-chart.js": "~0.10.2",
+ "d3": "~3.5.17"
}
}
diff --git a/views/ngXosLib/generator-xos/app/templates/gulp/build.js b/views/ngXosLib/generator-xos/app/templates/gulp/build.js
index b2b1ade..b66cdbc 100644
--- a/views/ngXosLib/generator-xos/app/templates/gulp/build.js
+++ b/views/ngXosLib/generator-xos/app/templates/gulp/build.js
@@ -150,6 +150,7 @@
gulp.task('build', function() {
runSequence(
'clean',
+ 'sass',
'templates',
'babel',
'scripts',
diff --git a/views/ngXosLib/generator-xos/package.json b/views/ngXosLib/generator-xos/package.json
old mode 100755
new mode 100644
index 58b5a33..0098496
--- a/views/ngXosLib/generator-xos/package.json
+++ b/views/ngXosLib/generator-xos/package.json
@@ -4,7 +4,7 @@
"description": "View generator for XOS",
"main": "index.js",
"scripts": {
- "test": "echo \"Error: no test specified\" && exit 1"
+ "test": "mocha test"
},
"author": "Matteo Scandolo",
"license": "ISC",
@@ -13,5 +13,13 @@
},
"files": [
"app"
- ]
+ ],
+ "devDependencies": {
+ "mocha": "^2.4.5",
+ "mockery": "^1.7.0",
+ "rimraf": "^2.5.2",
+ "wiredep": "^4.0.0",
+ "yeoman-assert": "^2.2.1",
+ "yeoman-test": "^1.4.0"
+ }
}
diff --git a/views/ngXosLib/generator-xos/test/build.spec.js b/views/ngXosLib/generator-xos/test/build.spec.js
new file mode 100644
index 0000000..dd49b03
--- /dev/null
+++ b/views/ngXosLib/generator-xos/test/build.spec.js
@@ -0,0 +1,182 @@
+'use strict';
+var path = require('path');
+var helpers = require('yeoman-test');
+var assert = require('yeoman-assert');
+var exec = require('child_process').exec;
+var fs = require('fs');
+const rimraf = require('rimraf');
+
+const getMillisec = min => min * 60 * 1000;
+const deleteFile = file => {
+ if(fs.existsSync(file)){
+ // console.log(`deleting: ${file}`);
+ fs.unlinkSync(file);
+ }
+}
+
+// source files
+const viewName = 'testDashboard';
+const fileName = viewName.replace(/^./, viewName[0].toUpperCase());
+const sourcePath = path.join(__dirname, `../../../ngXosViews/${viewName}/`);
+
+// dest files
+const basePath = '../../../../xos/core/xoslib';
+const destHtml = path.join(__dirname, basePath + '/dashboards/xosTestDashboard.html');
+const destJs = path.join(__dirname, basePath + '/static/js/xosTestDashboard.js');
+const destVendor = path.join(__dirname, basePath + '/static/js/vendor/xosTestDashboardVendor.js');
+const destCss = path.join(__dirname, basePath + '/static/css/xosTestDashboard.css');
+
+describe('The XOS Build script', function(){
+ const buildCmd = 'gulp build';
+
+ this.timeout(getMillisec(5));
+
+ before(done => {
+ console.log('Running generator');
+ this.generator = helpers
+ .run(require.resolve('../app'))
+ .inDir(sourcePath)
+ .withOptions({ 'skip-install': false })
+ .withPrompts({
+ name: viewName,
+ host: 'test-host',
+ token: 'test-token',
+ session: 'test-session'
+ })
+ .on('end', () => {
+ process.stdout.write('Installing Node Modules');
+ let npmInstall = setInterval(() => {
+ process.stdout.write('.');
+ }, 1000);
+ exec('npm install', {
+ cwd: sourcePath
+ }, (err) => {
+ clearInterval(npmInstall);
+ process.stdout.write('\nInstalling Bower Components');
+ let bowerInstall = setInterval(() => {
+ process.stdout.write('.');
+ }, 1000);
+ exec('bower install', {
+ cwd: sourcePath
+ }, (err) => {
+ clearInterval(bowerInstall);
+ done(err);
+ });
+ });
+ });
+ });
+
+ describe('when no styles or vendors are added', () => {
+
+ before((done) => {
+ process.stdout.write('\nBuilding App');
+ let appBuild = setInterval(() => {
+ process.stdout.write('.');
+ }, 1000);
+ exec(buildCmd, {
+ cwd: sourcePath
+ }, (err) => {
+ console.log(err);
+ clearInterval(appBuild);
+ done(err);
+ });
+ });
+
+ it('should have build the app', () => {
+ assert.file([destHtml, destJs]);
+ });
+
+ it('should include only minified files in the index', () => {
+ assert.fileContent(destHtml, `<script src="/static/js/xos${fileName}.js"></script>`);
+ assert.noFileContent(destHtml, `<!-- bower:css -->`);
+ assert.noFileContent(destHtml, `<!-- bower:js -->`);
+ });
+ });
+
+ describe('when a third party library is added', () => {
+ before((done) => {
+ process.stdout.write('\nInstalling 3rd party library');
+ let bowerInstall = setInterval(() => {
+ process.stdout.write('.');
+ }, 1000);
+ exec('bower install d3 --save', {
+ cwd: sourcePath
+ }, (err, out) => {
+ clearInterval(bowerInstall);
+ process.stdout.write('\nBuilding App');
+ let appBuild = setInterval(() => {
+ process.stdout.write('.');
+ }, 1000);
+ exec(buildCmd, {
+ cwd: sourcePath
+ }, (err) => {
+ console.log(err);
+ clearInterval(appBuild);
+ done(err);
+ });
+ });
+ });
+
+ it('should have build the app with a vendor file', () => {
+ assert.file([destHtml, destJs, destVendor]);
+ });
+
+ it('should include only minified files and minified deps in the index', () => {
+ assert.fileContent(destHtml, `<script src="/static/js/xos${fileName}.js"></script>`);
+ assert.fileContent(destHtml, `<script src="/static/js/vendor/xos${fileName}Vendor.js"></script>`);
+ assert.noFileContent(destHtml, `<!-- bower:css -->`);
+ assert.noFileContent(destHtml, `<!-- bower:js -->`);
+ });
+ });
+
+ describe('when some styles are added', () => {
+ before((done) => {
+ let styleContent = `
+ @import '../../../../style/sass/lib/_variables.scss';
+
+ #xosTestDashboard {
+ background: $brand-primary;
+ }
+ `;
+
+ fs.writeFile(`${sourcePath}src/sass/main.scss`, styleContent, function(err) {
+ process.stdout.write('\nBuilding the Application');
+ let appBuild = setInterval(() => {
+ process.stdout.write('.');
+ }, 1000);
+ exec('bower uninstall d3 --save', {
+ cwd: sourcePath
+ }, (err, out) => {
+ exec(buildCmd, {
+ cwd: sourcePath
+ }, (err, out) => {
+ clearInterval(appBuild);
+ done();
+ })
+ })
+ });
+ });
+
+ it('should have build the app with a css file', () => {
+ assert.file([destHtml, destJs, destCss]);
+ });
+
+ it('should include only minified files and minified deps in the index', () => {
+ assert.fileContent(destHtml, `<script src="/static/js/xos${fileName}.js"></script>`);
+ assert.fileContent(destHtml, `<link rel="stylesheet" href="/static/css/xos${fileName}.css">`);
+ assert.noFileContent(destHtml, `<!-- bower:css -->`);
+ assert.noFileContent(destHtml, `<!-- bower:js -->`);
+
+ assert.fileContent(destCss, `background:#337ab7`);
+ });
+ });
+
+ after(done => {
+ // deleting the folder used for test
+ deleteFile(destHtml);
+ deleteFile(destJs);
+ deleteFile(destVendor);
+ deleteFile(destCss);
+ rimraf(sourcePath, {}, done);
+ });
+});
\ No newline at end of file
diff --git a/views/ngXosLib/generator-xos/test/generator.spec.js b/views/ngXosLib/generator-xos/test/generator.spec.js
new file mode 100644
index 0000000..4ae1602
--- /dev/null
+++ b/views/ngXosLib/generator-xos/test/generator.spec.js
@@ -0,0 +1,122 @@
+'use strict';
+
+const path = require('path');
+const helpers = require('yeoman-test');
+const assert = require('yeoman-assert');
+const rimraf = require('rimraf');
+const mockery = require('mockery');
+const wiredep = require('wiredep');
+
+const firstCharTouppercase = string => string.replace(/^./, string[0].toUpperCase())
+
+// get bower deps installed in ngXosLib
+let bowerDeps = wiredep({
+ cwd: path.join(__dirname, '../../'), // pretending to be in the ngXosLib root
+ exclude: ['Chart.js']
+});
+bowerDeps = bowerDeps.js.map(d => {
+ let path = d.match(/bower_components\/([1-9a-zA-Z\-`.]+)\//);
+ if(path){
+ return path[1];
+ }
+});
+
+// test values
+const viewName = 'testDashboard';
+const fileName = firstCharTouppercase(viewName);
+const testPath = path.join(__dirname, `../../../ngXosViews/${viewName}/`);
+
+const getDefaultFiles = () => {
+ return [
+ '.bowerrc',
+ '.eslintrc',
+ '.gitignore',
+ 'bower.json',
+ 'gulpfile.js',
+ 'karma.conf.js',
+ 'package.json',
+ 'src/index.html',
+ ].map(i => `${testPath}${i}`);
+};
+
+const yeomanUserMock = {
+ git: {
+ name: () => 'Test User',
+ email: () => 'test@mail.org'
+ }
+}
+
+mockery.enable({
+ warnOnReplace: false,
+ warnOnUnregistered: false,
+ useCleanCache: true,
+});
+mockery.resetCache();
+mockery.registerMock('../node_modules/yeoman-generator/lib/actions/user', yeomanUserMock);
+
+describe('Yeoman XOS generator', function () {
+
+ beforeEach(() => {
+ });
+
+ before(done => {
+ this.generator = helpers
+ .run(require.resolve('../app'))
+ .inDir(testPath)
+ .withOptions({ 'skip-install': true })
+ .withPrompts({
+ name: viewName,
+ host: 'test-host',
+ token: 'test-token',
+ session: 'test-session'
+ })
+ .on('end', done);
+ });
+
+
+ it('should generate base files in the correct directory', () => {
+ assert.file(getDefaultFiles());
+ });
+
+ it('should create the env file with correct params', () => {
+ assert.fileContent(`${testPath}env/default.js`, 'host: \'test-host\'');
+ assert.fileContent(`${testPath}env/default.js`, 'xoscsrftoken: \'test-token\'');
+ assert.fileContent(`${testPath}env/default.js`, 'xossessionid: \'test-session\'');
+ });
+
+ it('should write username in package & bower json', () => {
+ assert.fileContent(`${testPath}package.json`, '"author": "Test User"');
+ assert.fileContent(`${testPath}bower.json`, '"Test User <test@mail.org>"')
+ });
+
+ it('should add all xosLib dependencies in the dev section of bower.json', () => {
+ bowerDeps.forEach(d => {
+ assert.fileContent(`${testPath}bower.json`, d);
+ });
+ });
+
+ it('should set the right module name in all the files', () => {
+ assert.fileContent(`${testPath}src/index.html`, `ng-app="xos.${viewName}"`)
+ assert.fileContent(`${testPath}src/index.html`, `id="xos${fileName}"`)
+ assert.fileContent(`${testPath}src/js/main.js`, `angular.module('xos.${viewName}', [`)
+ assert.fileContent(`${testPath}src/sass/main.scss`, `#xos${fileName}`)
+ });
+
+ it('should set correct paths in build file', () => {
+ assert.fileContent(`${testPath}gulp/build.js`, `angular.module('xos.${viewName}')`)
+ assert.fileContent(`${testPath}gulp/build.js`, `options.dashboards + 'xos${fileName}.html'`)
+ assert.fileContent(`${testPath}gulp/build.js`, `options.static + 'css/xos${fileName}.css'`)
+ assert.fileContent(`${testPath}gulp/build.js`, `.pipe(concat('xos${fileName}.css'))`)
+ assert.fileContent(`${testPath}gulp/build.js`, `.pipe(concat('xos${fileName}.js'))`)
+ assert.fileContent(`${testPath}gulp/build.js`, `module: 'xos.${viewName}'`)
+ assert.fileContent(`${testPath}gulp/build.js`, `options.static + 'js/vendor/xos${fileName}Vendor.js'`)
+ assert.fileContent(`${testPath}gulp/build.js`, `options.static + 'js/xos${fileName}.js'`)
+ assert.fileContent(`${testPath}gulp/build.js`, `options.static + 'css/xos${fileName}.css'`)
+ assert.fileContent(`${testPath}gulp/build.js`, `.pipe(concat('xos${fileName}Vendor.js'))`)
+ });
+
+ after(done => {
+ // deleting the folder used for test
+ rimraf(testPath, {}, done)
+ });
+});
\ No newline at end of file
diff --git a/views/ngXosLib/xosHelpers/spec/log.test.js b/views/ngXosLib/xosHelpers/spec/log.test.js
index aa5c737..f286a8e 100644
--- a/views/ngXosLib/xosHelpers/spec/log.test.js
+++ b/views/ngXosLib/xosHelpers/spec/log.test.js
@@ -5,6 +5,7 @@
*/
// TODO write tests for log
+// NODE Actually the code is working, the tests are not.
(function () {
'use strict';
@@ -13,8 +14,6 @@
let log;
- // beforeEach(module('xos.helpers'));
-
var mockLog;
beforeEach(function() {
@@ -23,32 +22,33 @@
beforeEach(function() {
angular.mock.module('xos.helpers', function($injector, $provide) {
+ // console.log('$injector',$injector.get('logDecorator'));
$provide.value('$log', mockLog);
- $provide.decorator('$log', $injector.get('logDecorator'));
+ // $provide.decorator('$log', $injector.get('logDecorator'));
});
});
- // beforeEach(inject(($log) => {
- // log = $log;
- // log.reset();
- // }));
+ beforeEach(inject(($log) => {
+ log = $log;
+ // log.reset();
+ }));
describe('The log decorator', () => {
it('should not print anything', inject(($log) => {
// spyOn(log, 'info');
$log.info('test');
- // expect(mockLog.info).not.toHaveBeenCalled();
+ expect(mockLog.info).not.toHaveBeenCalled();
}));
- xdescribe('if logging is enabled', () => {
- beforeEach(() => {
- window.location.href += '?debug=true'
- });
+ });
+ describe('if logging is enabled', () => {
+ beforeEach(() => {
+ window.location.href += '?debug=true'
+ });
- it('should should log', () => {
- log.info('test');
- console.log(log.info.logs);
- });
+ it('should should log', () => {
+ log.info('test');
+ console.log(log.info.logs);
});
});
});
diff --git a/views/ngXosLib/xosHelpers/spec/ui/table.test.js b/views/ngXosLib/xosHelpers/spec/ui/table.test.js
index 4c19372..69dadb3 100644
--- a/views/ngXosLib/xosHelpers/spec/ui/table.test.js
+++ b/views/ngXosLib/xosHelpers/spec/ui/table.test.js
@@ -292,6 +292,52 @@
expect(formatterFn).toHaveBeenCalledWith({categories: ['Film', 'Music']});
});
});
+
+ describe('and is icon', () => {
+
+ beforeEach(() => {
+ scope.config = {
+ columns: [
+ {
+ label: 'Label 1',
+ prop: 'label-1',
+ type: 'icon',
+ formatter: item => {
+ switch (item['label-1']){
+ case 1:
+ return 'ok';
+ case 2:
+ return 'remove';
+ case 3:
+ return 'plus'
+ }
+ }
+ }
+ ]
+ };
+ scope.data = [
+ {
+ 'label-1': 1
+ },
+ {
+ 'label-1': 2
+ },
+ {
+ 'label-1': 3
+ }
+ ];
+ compileElement();
+ });
+
+ it('should render a custom icon', () => {
+ let td1 = $(element).find('tbody tr:first-child td')[0];
+ let td2 = $(element).find('tbody tr:nth-child(2) td')[0];
+ let td3 = $(element).find('tbody tr:last-child td')[0];
+ expect($(td1).find('i')).toHaveClass('glyphicon-ok');
+ expect($(td2).find('i')).toHaveClass('glyphicon-remove');
+ expect($(td3).find('i')).toHaveClass('glyphicon-plus');
+ });
+ });
});
describe('when a link property is provided', () => {
@@ -426,6 +472,23 @@
expect(arrows.length).toEqual(4);
});
+ describe('and a default ordering is passed', () => {
+
+ beforeEach(() => {
+ scope.config.order = {
+ field: 'label-1',
+ reverse: true
+ };
+ compileElement();
+ });
+
+ it('should orderBy the default order', () => {
+ var tr = $(element).find('tr');
+ expect($(tr[1]).text()).toContain('Sample 2.2');
+ expect($(tr[2]).text()).toContain('Sample 1.1');
+ });
+ });
+
describe('and an order is set', () => {
beforeEach(() => {
isolatedScope.orderBy = 'label-1';
@@ -434,6 +497,7 @@
});
it('should orderBy', function() {
+ // console.log($(element).find('table'));
var tr = $(element).find('tr');
expect($(tr[1]).text()).toContain('Sample 2.2');
expect($(tr[2]).text()).toContain('Sample 1.1');
diff --git a/views/ngXosLib/xosHelpers/src/services/log.decorator.js b/views/ngXosLib/xosHelpers/src/services/log.decorator.js
index 382f78e..b8c5297 100644
--- a/views/ngXosLib/xosHelpers/src/services/log.decorator.js
+++ b/views/ngXosLib/xosHelpers/src/services/log.decorator.js
@@ -13,13 +13,18 @@
return window.location.href.indexOf('debug=true') >= 0;
}
// Save the original $log.debug()
- let debugFn = $delegate.info;
+ let logFn = $delegate.log;
+ let infoFn = $delegate.info;
+ let warnFn = $delegate.warn;
+ let errorFn = $delegate.error;
+ let debugFn = $delegate.debug;
// create the replacement function
const replacement = (fn) => {
return function(){
+ // console.log(`Is Log Enabled: ${isLogEnabled()}`)
if(!isLogEnabled()){
- console.log('logging is disabled');
+ // console.log('logging is disabled');
return;
}
let args = [].slice.call(arguments);
@@ -28,12 +33,23 @@
// Prepend timestamp
args[0] = `[${now.getHours()}:${now.getMinutes()}:${now.getSeconds()}] ${args[0]}`;
+ // HACK awfull fix for angular mock implementation whithin jasmine test failing issue
+ if (typeof $delegate.reset === 'function' && !($delegate.debug.logs instanceof Array)) {
+ // if we are within the mock and did not reset yet, we call it to avoid issue
+ // console.log('mock log impl fix to avoid logs array not existing...');
+ $delegate.reset();
+ }
+
// Call the original with the output prepended with formatted timestamp
fn.apply(null, args)
};
};
- $delegate.info = replacement(debugFn);
+ $delegate.info = replacement(infoFn);
+ $delegate.log = replacement(logFn);
+ $delegate.warn = replacement(warnFn);
+ $delegate.error = replacement(errorFn);
+ $delegate.debug = replacement(debugFn);
return $delegate;
}]);
diff --git a/views/ngXosLib/xosHelpers/src/services/rest/Truckroll.js b/views/ngXosLib/xosHelpers/src/services/rest/Truckroll.js
index 0895a99..7af9016 100644
--- a/views/ngXosLib/xosHelpers/src/services/rest/Truckroll.js
+++ b/views/ngXosLib/xosHelpers/src/services/rest/Truckroll.js
@@ -4,12 +4,12 @@
angular.module('xos.helpers')
/**
* @ngdoc service
- * @name xos.helpers.Truckroll-Collection
- * @description Angular resource to fetch /api/tenant/truckroll/:truckroll_id/
+ * @name xos.helpers.Truckroll
+ * @description Angular resource to fetch /api/tenant/truckroll/:id/
**/
- .service('Truckroll-Collection', function($resource){
- return $resource('/api/tenant/truckroll/:truckroll_id/', { truckroll_id: '@id' }, {
+ .service('Truckroll', function($resource){
+ return $resource('/api/tenant/truckroll/:id/', { id: '@id' }, {
update: { method: 'PUT' }
});
})
-})();
\ No newline at end of file
+})();
diff --git a/views/ngXosLib/xosHelpers/src/ui_components/dumbComponents/table/table.component.js b/views/ngXosLib/xosHelpers/src/ui_components/dumbComponents/table/table.component.js
index a846bf5..a42f3a4 100644
--- a/views/ngXosLib/xosHelpers/src/ui_components/dumbComponents/table/table.component.js
+++ b/views/ngXosLib/xosHelpers/src/ui_components/dumbComponents/table/table.component.js
@@ -22,10 +22,10 @@
* columns: [
* {
* label: 'Human readable name',
- * prop: 'Property to read in the model object', // optional if type is custom
- * type: 'object' | 'array' | 'boolean' | 'date' | 'custom',
- * formatter: fn(), // receive the whole item if tipe is custom and return a string
- * link: fn() // receive the whole item and return an url
+ * prop: 'Property to read in the model object',
+ * type: 'boolean'| 'array'| 'object'| 'custom'| 'date' | 'icon' // see examples for more details
+ formatter: fn(), // receive the whole item if tipe is custom and return a string
+ link: fn() // receive the whole item and return an url
* }
* ],
* classes: 'table table-striped table-bordered',
@@ -40,7 +40,7 @@
}
],
filter: 'field', // can be by `field` or `fulltext`
- order: true // whether to show ordering arrows
+ order: true | {field: 'property name', reverse: true | false} // whether to show ordering arrows, or a configuration for a default ordering
* }
* ```
* @param {Array} data The data that should be rendered
@@ -226,6 +226,16 @@
label: 'Details',
prop: 'details',
type: 'object'
+ },
+ {
+ label: 'Created',
+ prop: 'created',
+ type: 'date'
+ },
+ {
+ label: 'Icon',
+ type: 'icon',
+ formatter: item => item.icon //note that this refer to [Bootstrap Glyphicon](http://getbootstrap.com/components/#glyphicons)
}
]
};
@@ -238,7 +248,9 @@
details: {
c_tag: '243',
s_tag: '444'
- }
+ },
+ created: new Date('December 17, 1995 03:24:00'),
+ icon: 'music'
},
{
name: 'Gili',
@@ -247,7 +259,9 @@
details: {
c_tag: '675',
s_tag: '893'
- }
+ },
+ created: new Date(),
+ icon: 'camera'
}
]
});
@@ -389,6 +403,10 @@
<span ng-if="col.type === 'custom'">
{{col.formatter(item)}}
</span>
+ <span ng-if="col.type === 'icon'">
+ <i class="glyphicon glyphicon-{{col.formatter(item)}}">
+ </i>
+ </span>
</td>
<td ng-if="vm.config.actions">
<a href=""
@@ -428,8 +446,14 @@
throw new Error('[xosTable] Please provide a columns list in the configuration');
}
- // if columns with type 'custom' are provide
- // check that a custom formatted is provided too
+ // handle default ordering
+ if(this.config.order && angular.isObject(this.config.order)){
+ this.reverse = this.config.order.reverse || false;
+ this.orderBy = this.config.order.field || 'id';
+ }
+
+ // if columns with type 'custom' are provided
+ // check that a custom formatte3 is provided too
let customCols = _.filter(this.config.columns, {type: 'custom'});
if(angular.isArray(customCols) && customCols.length > 0){
_.forEach(customCols, (col) => {
@@ -439,6 +463,17 @@
})
}
+ // if columns with type 'icon' are provided
+ // check that a custom formatte3 is provided too
+ let iconCols = _.filter(this.config.columns, {type: 'icon'});
+ if(angular.isArray(iconCols) && iconCols.length > 0){
+ _.forEach(iconCols, (col) => {
+ if(!col.formatter || !angular.isFunction(col.formatter)){
+ throw new Error('[xosTable] You have provided an icon field type, a formatter function should provided too.');
+ }
+ })
+ }
+
// if a link property is passed,
// it should be a function
let linkedColumns = _.filter(this.config.columns, col => angular.isDefined(col.link));
diff --git a/views/ngXosViews/serviceGrid/env/default.js b/views/ngXosViews/serviceGrid/env/default.js
index 3d60258..07017a6 100644
--- a/views/ngXosViews/serviceGrid/env/default.js
+++ b/views/ngXosViews/serviceGrid/env/default.js
@@ -8,6 +8,6 @@
module.exports = {
host: 'http://xos.dev:9999/',
- xoscsrftoken: 'comXS9APlpktu9OcQqcNgpqQQ5tx68L1',
- xossessionid: '9cw4yv28j4wqcbewdxh3rucamev8tg9q'
+ xoscsrftoken: '528Q93KwEJn88ET6TZipc1gsc7qjhaTz',
+ xossessionid: '8ij3xax15jxwr3abkwohkczwrfivfbzk'
};
diff --git a/views/ngXosViews/serviceGrid/src/js/main.js b/views/ngXosViews/serviceGrid/src/js/main.js
index 5c41bd4..88a0f95 100644
--- a/views/ngXosViews/serviceGrid/src/js/main.js
+++ b/views/ngXosViews/serviceGrid/src/js/main.js
@@ -34,7 +34,18 @@
{
label: 'Status',
prop: 'status',
- type: 'boolean',
+ type: 'icon',
+ formatter: item => {
+ let status = parseInt(item.backend_status.match(/^[0-9]/)[0]);
+ switch(status){
+ case 0:
+ return 'time';
+ case 1:
+ return 'ok';
+ case 2:
+ return 'remove';
+ }
+ }
},
{
label: 'Name',
@@ -52,7 +63,9 @@
}
],
filter: 'field',
- order: true
+ order: {
+ field: 'name'
+ }
};
// retrieving user list
@@ -60,6 +73,10 @@
.then((services) => {
this.services = _.map(services, s => {
// parse backend_status string in a boolean for display
+ // NOTE they are not boolean:
+ // - start with 0 = provisioning
+ // - start with 1 = good
+ // - start with 2 = error
s.status = parseInt(s.backend_status.match(/^[0-9]/)[0]) === 0 ? false : true;
return s;
})
diff --git a/views/ngXosViews/serviceGrid/src/vendor/Chart.js/.bower.json b/views/ngXosViews/serviceGrid/src/vendor/Chart.js/.bower.json
new file mode 100644
index 0000000..809dbba
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/Chart.js/.bower.json
@@ -0,0 +1,30 @@
+{
+ "name": "Chart.js",
+ "description": "Simple HTML5 Charts using the canvas element",
+ "homepage": "https://github.com/nnnick/Chart.js",
+ "author": "nnnick",
+ "main": [
+ "Chart.js"
+ ],
+ "ignore": [
+ "**/*",
+ ".travis.yml",
+ "CONTRIBUTING.md",
+ "Chart.js",
+ "LICENSE.md",
+ "README.md",
+ "gulpfile.js",
+ "package.json"
+ ],
+ "dependencies": {},
+ "version": "1.1.1",
+ "_release": "1.1.1",
+ "_resolution": {
+ "type": "version",
+ "tag": "v1.1.1",
+ "commit": "a62537a80029cd5a2e230769a652904e2de2d5d4"
+ },
+ "_source": "https://github.com/nnnick/Chart.js.git",
+ "_target": "~1.1.1",
+ "_originalSource": "Chart.js"
+}
\ No newline at end of file
diff --git a/applications/auto-scale/gui/src/vendor/Chart.js/Chart.js b/views/ngXosViews/serviceGrid/src/vendor/Chart.js/Chart.js
similarity index 87%
rename from applications/auto-scale/gui/src/vendor/Chart.js/Chart.js
rename to views/ngXosViews/serviceGrid/src/vendor/Chart.js/Chart.js
index c264262..954fbe8 100644
--- a/applications/auto-scale/gui/src/vendor/Chart.js/Chart.js
+++ b/views/ngXosViews/serviceGrid/src/vendor/Chart.js/Chart.js
@@ -1,7 +1,7 @@
/*!
* Chart.js
* http://chartjs.org/
- * Version: 1.0.2
+ * Version: 1.1.1
*
* Copyright 2015 Nick Downie
* Released under the MIT license
@@ -35,17 +35,11 @@
{
return document.defaultView.getComputedStyle(element).getPropertyValue(dimension);
}
- }
+ };
- var width = this.width = computeDimension(context.canvas,'Width');
- var height = this.height = computeDimension(context.canvas,'Height');
+ var width = this.width = computeDimension(context.canvas,'Width') || context.canvas.width;
+ var height = this.height = computeDimension(context.canvas,'Height') || context.canvas.height;
- // Firefox requires this to work correctly
- context.canvas.width = width;
- context.canvas.height = height;
-
- var width = this.width = context.canvas.width;
- var height = this.height = context.canvas.height;
this.aspectRatio = this.width / this.height;
//High pixel density displays - multiply the size of the canvas height/width by the device pixel ratio, then scale.
helpers.retinaScale(this);
@@ -150,6 +144,9 @@
// String - Tooltip title font colour
tooltipTitleFontColor: "#fff",
+ // String - Tooltip title template
+ tooltipTitleTemplate: "<%= label%>",
+
// Number - pixel width of padding around tooltip text
tooltipYPadding: 6,
@@ -169,11 +166,17 @@
tooltipTemplate: "<%if (label){%><%=label%>: <%}%><%= value %>",
// String - Template string for single tooltips
- multiTooltipTemplate: "<%= value %>",
+ multiTooltipTemplate: "<%= datasetLabel %>: <%= value %>",
// String - Colour behind the legend colour block
multiTooltipKeyBackground: '#fff',
+ // Array - A list of colors to use as the defaults
+ segmentColorDefault: ["#A6CEE3", "#1F78B4", "#B2DF8A", "#33A02C", "#FB9A99", "#E31A1C", "#FDBF6F", "#FF7F00", "#CAB2D6", "#6A3D9A", "#B4B482", "#B15928" ],
+
+ // Array - A list of highlight colors to use as the defaults
+ segmentHighlightColorDefaults: [ "#CEF6FF", "#47A0DC", "#DAFFB2", "#5BC854", "#FFC2C1", "#FF4244", "#FFE797", "#FFA728", "#F2DAFE", "#9265C2", "#DCDCAA", "#D98150" ],
+
// Function - Will fire on animation progression.
onAnimationProgress: function(){},
@@ -210,14 +213,18 @@
clone = helpers.clone = function(obj){
var objClone = {};
each(obj,function(value,key){
- if (obj.hasOwnProperty(key)) objClone[key] = value;
+ if (obj.hasOwnProperty(key)){
+ objClone[key] = value;
+ }
});
return objClone;
},
extend = helpers.extend = function(base){
each(Array.prototype.slice.call(arguments,1), function(extensionObject) {
each(extensionObject,function(value,key){
- if (extensionObject.hasOwnProperty(key)) base[key] = value;
+ if (extensionObject.hasOwnProperty(key)){
+ base[key] = value;
+ }
});
});
return base;
@@ -300,9 +307,9 @@
})(),
warn = helpers.warn = function(str){
//Method for warning of errors
- if (window.console && typeof window.console.warn == "function") console.warn(str);
+ if (window.console && typeof window.console.warn === "function") console.warn(str);
},
- amd = helpers.amd = (typeof define == 'function' && define.amd),
+ amd = helpers.amd = (typeof define === 'function' && define.amd),
//-- Math methods
isNumber = helpers.isNumber = function(n){
return !isNaN(parseFloat(n)) && isFinite(n);
@@ -328,7 +335,20 @@
},
getDecimalPlaces = helpers.getDecimalPlaces = function(num){
if (num%1!==0 && isNumber(num)){
- return num.toString().split(".")[1].length;
+ var s = num.toString();
+ if(s.indexOf("e-") < 0){
+ // no exponent, e.g. 0.01
+ return s.split(".")[1].length;
+ }
+ else if(s.indexOf(".") < 0) {
+ // no decimal point, e.g. 1e-9
+ return parseInt(s.split("e-")[1]);
+ }
+ else {
+ // exponent and decimal point, e.g. 1.23e-9
+ var parts = s.split(".")[1].split("e-");
+ return parts[0].length + parseInt(parts[1]);
+ }
}
else {
return 0;
@@ -387,10 +407,15 @@
maxSteps = Math.floor(drawingSize/(textSize * 1.5)),
skipFitting = (minSteps >= maxSteps);
- var maxValue = max(valuesArray),
- minValue = min(valuesArray);
+ // Filter out null values since these would min() to zero
+ var values = [];
+ each(valuesArray, function( v ){
+ v == null || values.push( v );
+ });
+ var minValue = min(values),
+ maxValue = max(values);
- // We need some degree of seperation here to calculate the scales if all the values are the same
+ // We need some degree of separation here to calculate the scales if all the values are the same
// Adding/minusing 0.5 will give us a range of 1.
if (maxValue === minValue){
maxValue += 0.5;
@@ -505,7 +530,7 @@
/* jshint ignore:end */
generateLabels = helpers.generateLabels = function(templateString,numberOfSteps,graphMin,stepValue){
var labelsArray = new Array(numberOfSteps);
- if (labelTemplateString){
+ if (templateString){
each(labelsArray,function(val,index){
labelsArray[index] = template(templateString,{value: (graphMin + (stepValue*(index+1)))});
});
@@ -526,7 +551,9 @@
return -1 * t * (t - 2);
},
easeInOutQuad: function (t) {
- if ((t /= 1 / 2) < 1) return 1 / 2 * t * t;
+ if ((t /= 1 / 2) < 1){
+ return 1 / 2 * t * t;
+ }
return -1 / 2 * ((--t) * (t - 2) - 1);
},
easeInCubic: function (t) {
@@ -536,7 +563,9 @@
return 1 * ((t = t / 1 - 1) * t * t + 1);
},
easeInOutCubic: function (t) {
- if ((t /= 1 / 2) < 1) return 1 / 2 * t * t * t;
+ if ((t /= 1 / 2) < 1){
+ return 1 / 2 * t * t * t;
+ }
return 1 / 2 * ((t -= 2) * t * t + 2);
},
easeInQuart: function (t) {
@@ -546,7 +575,9 @@
return -1 * ((t = t / 1 - 1) * t * t * t - 1);
},
easeInOutQuart: function (t) {
- if ((t /= 1 / 2) < 1) return 1 / 2 * t * t * t * t;
+ if ((t /= 1 / 2) < 1){
+ return 1 / 2 * t * t * t * t;
+ }
return -1 / 2 * ((t -= 2) * t * t * t - 2);
},
easeInQuint: function (t) {
@@ -556,7 +587,9 @@
return 1 * ((t = t / 1 - 1) * t * t * t * t + 1);
},
easeInOutQuint: function (t) {
- if ((t /= 1 / 2) < 1) return 1 / 2 * t * t * t * t * t;
+ if ((t /= 1 / 2) < 1){
+ return 1 / 2 * t * t * t * t * t;
+ }
return 1 / 2 * ((t -= 2) * t * t * t * t + 2);
},
easeInSine: function (t) {
@@ -575,60 +608,95 @@
return (t === 1) ? 1 : 1 * (-Math.pow(2, -10 * t / 1) + 1);
},
easeInOutExpo: function (t) {
- if (t === 0) return 0;
- if (t === 1) return 1;
- if ((t /= 1 / 2) < 1) return 1 / 2 * Math.pow(2, 10 * (t - 1));
+ if (t === 0){
+ return 0;
+ }
+ if (t === 1){
+ return 1;
+ }
+ if ((t /= 1 / 2) < 1){
+ return 1 / 2 * Math.pow(2, 10 * (t - 1));
+ }
return 1 / 2 * (-Math.pow(2, -10 * --t) + 2);
},
easeInCirc: function (t) {
- if (t >= 1) return t;
+ if (t >= 1){
+ return t;
+ }
return -1 * (Math.sqrt(1 - (t /= 1) * t) - 1);
},
easeOutCirc: function (t) {
return 1 * Math.sqrt(1 - (t = t / 1 - 1) * t);
},
easeInOutCirc: function (t) {
- if ((t /= 1 / 2) < 1) return -1 / 2 * (Math.sqrt(1 - t * t) - 1);
+ if ((t /= 1 / 2) < 1){
+ return -1 / 2 * (Math.sqrt(1 - t * t) - 1);
+ }
return 1 / 2 * (Math.sqrt(1 - (t -= 2) * t) + 1);
},
easeInElastic: function (t) {
var s = 1.70158;
var p = 0;
var a = 1;
- if (t === 0) return 0;
- if ((t /= 1) == 1) return 1;
- if (!p) p = 1 * 0.3;
+ if (t === 0){
+ return 0;
+ }
+ if ((t /= 1) == 1){
+ return 1;
+ }
+ if (!p){
+ p = 1 * 0.3;
+ }
if (a < Math.abs(1)) {
a = 1;
s = p / 4;
- } else s = p / (2 * Math.PI) * Math.asin(1 / a);
+ } else{
+ s = p / (2 * Math.PI) * Math.asin(1 / a);
+ }
return -(a * Math.pow(2, 10 * (t -= 1)) * Math.sin((t * 1 - s) * (2 * Math.PI) / p));
},
easeOutElastic: function (t) {
var s = 1.70158;
var p = 0;
var a = 1;
- if (t === 0) return 0;
- if ((t /= 1) == 1) return 1;
- if (!p) p = 1 * 0.3;
+ if (t === 0){
+ return 0;
+ }
+ if ((t /= 1) == 1){
+ return 1;
+ }
+ if (!p){
+ p = 1 * 0.3;
+ }
if (a < Math.abs(1)) {
a = 1;
s = p / 4;
- } else s = p / (2 * Math.PI) * Math.asin(1 / a);
+ } else{
+ s = p / (2 * Math.PI) * Math.asin(1 / a);
+ }
return a * Math.pow(2, -10 * t) * Math.sin((t * 1 - s) * (2 * Math.PI) / p) + 1;
},
easeInOutElastic: function (t) {
var s = 1.70158;
var p = 0;
var a = 1;
- if (t === 0) return 0;
- if ((t /= 1 / 2) == 2) return 1;
- if (!p) p = 1 * (0.3 * 1.5);
+ if (t === 0){
+ return 0;
+ }
+ if ((t /= 1 / 2) == 2){
+ return 1;
+ }
+ if (!p){
+ p = 1 * (0.3 * 1.5);
+ }
if (a < Math.abs(1)) {
a = 1;
s = p / 4;
- } else s = p / (2 * Math.PI) * Math.asin(1 / a);
- if (t < 1) return -0.5 * (a * Math.pow(2, 10 * (t -= 1)) * Math.sin((t * 1 - s) * (2 * Math.PI) / p));
+ } else {
+ s = p / (2 * Math.PI) * Math.asin(1 / a);
+ }
+ if (t < 1){
+ return -0.5 * (a * Math.pow(2, 10 * (t -= 1)) * Math.sin((t * 1 - s) * (2 * Math.PI) / p));}
return a * Math.pow(2, -10 * (t -= 1)) * Math.sin((t * 1 - s) * (2 * Math.PI) / p) * 0.5 + 1;
},
easeInBack: function (t) {
@@ -641,7 +709,9 @@
},
easeInOutBack: function (t) {
var s = 1.70158;
- if ((t /= 1 / 2) < 1) return 1 / 2 * (t * t * (((s *= (1.525)) + 1) * t - s));
+ if ((t /= 1 / 2) < 1){
+ return 1 / 2 * (t * t * (((s *= (1.525)) + 1) * t - s));
+ }
return 1 / 2 * ((t -= 2) * t * (((s *= (1.525)) + 1) * t + s) + 2);
},
easeInBounce: function (t) {
@@ -659,7 +729,9 @@
}
},
easeInOutBounce: function (t) {
- if (t < 1 / 2) return easingEffects.easeInBounce(t * 2) * 0.5;
+ if (t < 1 / 2){
+ return easingEffects.easeInBounce(t * 2) * 0.5;
+ }
return easingEffects.easeOutBounce(t * 2 - 1) * 0.5 + 1 * 0.5;
}
},
@@ -762,14 +834,21 @@
});
},
getMaximumWidth = helpers.getMaximumWidth = function(domNode){
- var container = domNode.parentNode;
+ var container = domNode.parentNode,
+ padding = parseInt(getStyle(container, 'padding-left')) + parseInt(getStyle(container, 'padding-right'));
// TODO = check cross browser stuff with this.
- return container.clientWidth;
+ return container ? container.clientWidth - padding : 0;
},
getMaximumHeight = helpers.getMaximumHeight = function(domNode){
- var container = domNode.parentNode;
+ var container = domNode.parentNode,
+ padding = parseInt(getStyle(container, 'padding-bottom')) + parseInt(getStyle(container, 'padding-top'));
// TODO = check cross browser stuff with this.
- return container.clientHeight;
+ return container ? container.clientHeight - padding : 0;
+ },
+ getStyle = helpers.getStyle = function (el, property) {
+ return el.currentStyle ?
+ el.currentStyle[property] :
+ document.defaultView.getComputedStyle(el, null).getPropertyValue(property);
},
getMaximumSize = helpers.getMaximumSize = helpers.getMaximumWidth, // legacy support
retinaScale = helpers.retinaScale = function(chart){
@@ -844,7 +923,7 @@
},
stop : function(){
// Stops any current animation loop occuring
- cancelAnimFrame(this.animationFrame);
+ Chart.animationService.cancelAnimation(this);
return this;
},
resize : function(callback){
@@ -868,15 +947,26 @@
if (reflow){
this.reflow();
}
+
if (this.options.animation && !reflow){
- helpers.animationLoop(
- this.draw,
- this.options.animationSteps,
- this.options.animationEasing,
- this.options.onAnimationProgress,
- this.options.onAnimationComplete,
- this
- );
+ var animation = new Chart.Animation();
+ animation.numSteps = this.options.animationSteps;
+ animation.easing = this.options.animationEasing;
+
+ // render function
+ animation.render = function(chartInstance, animationObject) {
+ var easingFunction = helpers.easingEffects[animationObject.easing];
+ var stepDecimal = animationObject.currentStep / animationObject.numSteps;
+ var easeDecimal = easingFunction(stepDecimal);
+
+ chartInstance.draw(easeDecimal, stepDecimal, animationObject.currentStep);
+ };
+
+ // user events
+ animation.onAnimationProgress = this.options.onAnimationProgress;
+ animation.onAnimationComplete = this.options.onAnimationComplete;
+
+ Chart.animationService.addAnimation(this, animation);
}
else{
this.draw();
@@ -885,9 +975,10 @@
return this;
},
generateLegend : function(){
- return template(this.options.legendTemplate,this);
+ return helpers.template(this.options.legendTemplate, this);
},
destroy : function(){
+ this.stop();
this.clear();
unbindEvents(this, this.events);
var canvas = this.chart.canvas;
@@ -1015,7 +1106,7 @@
labels: tooltipLabels,
legendColors: tooltipColors,
legendColorBackground : this.options.multiTooltipKeyBackground,
- title: ChartElements[0].label,
+ title: template(this.options.tooltipTitleTemplate,ChartElements[0]),
chart: this.chart,
ctx: this.chart.ctx,
custom: this.options.customTooltips
@@ -1199,9 +1290,18 @@
y: chartY
});
+ // Normalize all angles to 0 - 2*PI (0 - 360°)
+ var pointRelativeAngle = pointRelativePosition.angle % (Math.PI * 2),
+ startAngle = (Math.PI * 2 + this.startAngle) % (Math.PI * 2),
+ endAngle = (Math.PI * 2 + this.endAngle) % (Math.PI * 2) || 360;
+
+ // Calculate wether the pointRelativeAngle is between the start and the end angle
+ var betweenAngles = (endAngle < startAngle) ?
+ pointRelativeAngle <= endAngle || pointRelativeAngle >= startAngle:
+ pointRelativeAngle >= startAngle && pointRelativeAngle <= endAngle;
+
//Check if within the range of the open/close angle
- var betweenAngles = (pointRelativePosition.angle >= this.startAngle && pointRelativePosition.angle <= this.endAngle),
- withinRadius = (pointRelativePosition.distance >= this.innerRadius && pointRelativePosition.distance <= this.outerRadius);
+ var withinRadius = (pointRelativePosition.distance >= this.innerRadius && pointRelativePosition.distance <= this.outerRadius);
return (betweenAngles && withinRadius);
//Ensure within the outside of the arc centre, but inside arc outer
@@ -1222,9 +1322,9 @@
ctx.beginPath();
- ctx.arc(this.x, this.y, this.outerRadius, this.startAngle, this.endAngle);
+ ctx.arc(this.x, this.y, this.outerRadius < 0 ? 0 : this.outerRadius, this.startAngle, this.endAngle);
- ctx.arc(this.x, this.y, this.innerRadius, this.endAngle, this.startAngle, true);
+ ctx.arc(this.x, this.y, this.innerRadius < 0 ? 0 : this.innerRadius, this.endAngle, this.startAngle, true);
ctx.closePath();
ctx.strokeStyle = this.strokeColor;
@@ -1283,6 +1383,16 @@
}
});
+ Chart.Animation = Chart.Element.extend({
+ currentStep: null, // the current animation step
+ numSteps: 60, // default number of steps
+ easing: "", // the easing to use for this animation
+ render: null, // render function used by the animation service
+
+ onAnimationProgress: null, // user specified callback to fire on each step of the animation
+ onAnimationComplete: null, // user specified callback to fire when the animation finishes
+ });
+
Chart.Tooltip = Chart.Element.extend({
draw : function(){
@@ -1372,7 +1482,8 @@
this.titleFont = fontString(this.titleFontSize,this.titleFontStyle,this.titleFontFamily);
- this.height = (this.labels.length * this.fontSize) + ((this.labels.length-1) * (this.fontSize/2)) + (this.yPadding*2) + this.titleFontSize *1.5;
+ this.titleHeight = this.title ? this.titleFontSize * 1.5 : 0;
+ this.height = (this.labels.length * this.fontSize) + ((this.labels.length-1) * (this.fontSize/2)) + (this.yPadding*2) + this.titleHeight;
this.ctx.font = this.titleFont;
@@ -1408,9 +1519,9 @@
//If the index is zero, we're getting the title
if (index === 0){
- return baseLineHeight + this.titleFontSize/2;
+ return baseLineHeight + this.titleHeight / 3;
} else{
- return baseLineHeight + ((this.fontSize*1.5*afterTitleIndex) + this.fontSize/2) + this.titleFontSize * 1.5;
+ return baseLineHeight + ((this.fontSize * 1.5 * afterTitleIndex) + this.fontSize / 2) + this.titleHeight;
}
},
@@ -1466,7 +1577,7 @@
for (var i=0; i<=this.steps; i++){
this.yLabels.push(template(this.templateString,{value:(this.min + (i * this.stepValue)).toFixed(stepDecimalPlaces)}));
}
- this.yLabelWidth = (this.display && this.showLabels) ? longestText(this.ctx,this.font,this.yLabels) : 0;
+ this.yLabelWidth = (this.display && this.showLabels) ? longestText(this.ctx,this.font,this.yLabels) + 10 : 0;
},
addXLabel : function(label){
this.xLabels.push(label);
@@ -1490,6 +1601,9 @@
this.startPoint += this.padding;
this.endPoint -= this.padding;
+ // Cache the starting endpoint, excluding the space for x labels
+ var cachedEndPoint = this.endPoint;
+
// Cache the starting height, so can determine if we need to recalculate the scale yAxis
var cachedHeight = this.endPoint - this.startPoint,
cachedYLabelWidth;
@@ -1521,6 +1635,7 @@
// Only go through the xLabel loop again if the yLabel width has changed
if (cachedYLabelWidth < this.yLabelWidth){
+ this.endPoint = cachedEndPoint;
this.calculateXLabelRotation();
}
}
@@ -1539,7 +1654,7 @@
this.xScalePaddingRight = lastWidth/2 + 3;
- this.xScalePaddingLeft = (firstWidth/2 > this.yLabelWidth + 10) ? firstWidth/2 : this.yLabelWidth + 10;
+ this.xScalePaddingLeft = (firstWidth/2 > this.yLabelWidth) ? firstWidth/2 : this.yLabelWidth;
this.xLabelRotation = 0;
if (this.display){
@@ -1558,7 +1673,7 @@
lastRotated = cosRotation * lastWidth;
// We're right aligning the text now.
- if (firstRotated + this.fontSize / 2 > this.yLabelWidth + 8){
+ if (firstRotated + this.fontSize / 2 > this.yLabelWidth){
this.xScalePaddingLeft = firstRotated + this.fontSize / 2;
}
this.xScalePaddingRight = this.fontSize/2;
@@ -1940,14 +2055,40 @@
ctx.lineWidth = this.angleLineWidth;
ctx.strokeStyle = this.angleLineColor;
for (var i = this.valuesCount - 1; i >= 0; i--) {
- if (this.angleLineWidth > 0){
- var outerPosition = this.getPointPosition(i, this.calculateCenterOffset(this.max));
+ var centerOffset = null, outerPosition = null;
+
+ if (this.angleLineWidth > 0 && (i % this.angleLineInterval === 0)){
+ centerOffset = this.calculateCenterOffset(this.max);
+ outerPosition = this.getPointPosition(i, centerOffset);
ctx.beginPath();
ctx.moveTo(this.xCenter, this.yCenter);
ctx.lineTo(outerPosition.x, outerPosition.y);
ctx.stroke();
ctx.closePath();
}
+
+ if (this.backgroundColors && this.backgroundColors.length == this.valuesCount) {
+ if (centerOffset == null)
+ centerOffset = this.calculateCenterOffset(this.max);
+
+ if (outerPosition == null)
+ outerPosition = this.getPointPosition(i, centerOffset);
+
+ var previousOuterPosition = this.getPointPosition(i === 0 ? this.valuesCount - 1 : i - 1, centerOffset);
+ var nextOuterPosition = this.getPointPosition(i === this.valuesCount - 1 ? 0 : i + 1, centerOffset);
+
+ var previousOuterHalfway = { x: (previousOuterPosition.x + outerPosition.x) / 2, y: (previousOuterPosition.y + outerPosition.y) / 2 };
+ var nextOuterHalfway = { x: (outerPosition.x + nextOuterPosition.x) / 2, y: (outerPosition.y + nextOuterPosition.y) / 2 };
+
+ ctx.beginPath();
+ ctx.moveTo(this.xCenter, this.yCenter);
+ ctx.lineTo(previousOuterHalfway.x, previousOuterHalfway.y);
+ ctx.lineTo(outerPosition.x, outerPosition.y);
+ ctx.lineTo(nextOuterHalfway.x, nextOuterHalfway.y);
+ ctx.fillStyle = this.backgroundColors[i];
+ ctx.fill();
+ ctx.closePath();
+ }
// Extra 3px out for some label spacing
var pointLabelPosition = this.getPointPosition(i, this.calculateCenterOffset(this.max) + 5);
ctx.font = fontString(this.pointLabelFontSize,this.pointLabelFontStyle,this.pointLabelFontFamily);
@@ -1984,6 +2125,93 @@
}
});
+ Chart.animationService = {
+ frameDuration: 17,
+ animations: [],
+ dropFrames: 0,
+ addAnimation: function(chartInstance, animationObject) {
+ for (var index = 0; index < this.animations.length; ++ index){
+ if (this.animations[index].chartInstance === chartInstance){
+ // replacing an in progress animation
+ this.animations[index].animationObject = animationObject;
+ return;
+ }
+ }
+
+ this.animations.push({
+ chartInstance: chartInstance,
+ animationObject: animationObject
+ });
+
+ // If there are no animations queued, manually kickstart a digest, for lack of a better word
+ if (this.animations.length == 1) {
+ helpers.requestAnimFrame.call(window, this.digestWrapper);
+ }
+ },
+ // Cancel the animation for a given chart instance
+ cancelAnimation: function(chartInstance) {
+ var index = helpers.findNextWhere(this.animations, function(animationWrapper) {
+ return animationWrapper.chartInstance === chartInstance;
+ });
+
+ if (index)
+ {
+ this.animations.splice(index, 1);
+ }
+ },
+ // calls startDigest with the proper context
+ digestWrapper: function() {
+ Chart.animationService.startDigest.call(Chart.animationService);
+ },
+ startDigest: function() {
+
+ var startTime = Date.now();
+ var framesToDrop = 0;
+
+ if(this.dropFrames > 1){
+ framesToDrop = Math.floor(this.dropFrames);
+ this.dropFrames -= framesToDrop;
+ }
+
+ for (var i = 0; i < this.animations.length; i++) {
+
+ if (this.animations[i].animationObject.currentStep === null){
+ this.animations[i].animationObject.currentStep = 0;
+ }
+
+ this.animations[i].animationObject.currentStep += 1 + framesToDrop;
+ if(this.animations[i].animationObject.currentStep > this.animations[i].animationObject.numSteps){
+ this.animations[i].animationObject.currentStep = this.animations[i].animationObject.numSteps;
+ }
+
+ this.animations[i].animationObject.render(this.animations[i].chartInstance, this.animations[i].animationObject);
+
+ // Check if executed the last frame.
+ if (this.animations[i].animationObject.currentStep == this.animations[i].animationObject.numSteps){
+ // Call onAnimationComplete
+ this.animations[i].animationObject.onAnimationComplete.call(this.animations[i].chartInstance);
+ // Remove the animation.
+ this.animations.splice(i, 1);
+ // Keep the index in place to offset the splice
+ i--;
+ }
+ }
+
+ var endTime = Date.now();
+ var delay = endTime - startTime - this.frameDuration;
+ var frameDelay = delay / this.frameDuration;
+
+ if(frameDelay > 1){
+ this.dropFrames += frameDelay;
+ }
+
+ // Do we have more stuff to animate?
+ if (this.animations.length > 0){
+ helpers.requestAnimFrame.call(window, this.digestWrapper);
+ }
+ }
+ };
+
// Attach global event to resize each chart instance when the browser resizes
helpers.addEvent(window, "resize", (function(){
// Basic debounce of resize function so it doesn't hurt performance when resizing browser.
@@ -2004,7 +2232,7 @@
if (amd) {
- define(function(){
+ define('Chart', [], function(){
return Chart;
});
} else if (typeof module === 'object' && module.exports) {
@@ -2060,7 +2288,7 @@
barDatasetSpacing : 1,
//String - A legend template
- legendTemplate : "<ul class=\"<%=name.toLowerCase()%>-legend\"><% for (var i=0; i<datasets.length; i++){%><li><span style=\"background-color:<%=datasets[i].fillColor%>\"></span><%if(datasets[i].label){%><%=datasets[i].label%><%}%></li><%}%></ul>"
+ legendTemplate : "<ul class=\"<%=name.toLowerCase()%>-legend\"><% for (var i=0; i<datasets.length; i++){%><li><span class=\"<%=name.toLowerCase()%>-legend-icon\" style=\"background-color:<%=datasets[i].fillColor%>\"></span><span class=\"<%=name.toLowerCase()%>-legend-text\"><%if(datasets[i].label){%><%=datasets[i].label%><%}%></span></li><%}%></ul>"
};
@@ -2105,8 +2333,10 @@
bar.restore(['fillColor', 'strokeColor']);
});
helpers.each(activeBars, function(activeBar){
- activeBar.fillColor = activeBar.highlightFill;
- activeBar.strokeColor = activeBar.highlightStroke;
+ if (activeBar) {
+ activeBar.fillColor = activeBar.highlightFill;
+ activeBar.strokeColor = activeBar.highlightStroke;
+ }
});
this.showTooltip(activeBars);
});
@@ -2137,10 +2367,10 @@
value : dataPoint,
label : data.labels[index],
datasetLabel: dataset.label,
- strokeColor : dataset.strokeColor,
- fillColor : dataset.fillColor,
- highlightFill : dataset.highlightFill || dataset.fillColor,
- highlightStroke : dataset.highlightStroke || dataset.strokeColor
+ strokeColor : (typeof dataset.strokeColor == 'object') ? dataset.strokeColor[index] : dataset.strokeColor,
+ fillColor : (typeof dataset.fillColor == 'object') ? dataset.fillColor[index] : dataset.fillColor,
+ highlightFill : (dataset.highlightFill) ? (typeof dataset.highlightFill == 'object') ? dataset.highlightFill[index] : dataset.highlightFill : (typeof dataset.fillColor == 'object') ? dataset.fillColor[index] : dataset.fillColor,
+ highlightStroke : (dataset.highlightStroke) ? (typeof dataset.highlightStroke == 'object') ? dataset.highlightStroke[index] : dataset.highlightStroke : (typeof dataset.strokeColor == 'object') ? dataset.strokeColor[index] : dataset.strokeColor
}));
},this);
@@ -2262,6 +2492,7 @@
this.datasets[datasetIndex].bars.push(new this.BarClass({
value : value,
label : label,
+ datasetLabel: this.datasets[datasetIndex].label,
x: this.scale.calculateBarX(this.datasets.length, datasetIndex, this.scale.valuesCount+1),
y: this.scale.endPoint,
width : this.scale.calculateBarWidth(this.datasets.length),
@@ -2357,15 +2588,14 @@
animateScale : false,
//String - A legend template
- legendTemplate : "<ul class=\"<%=name.toLowerCase()%>-legend\"><% for (var i=0; i<segments.length; i++){%><li><span style=\"background-color:<%=segments[i].fillColor%>\"></span><%if(segments[i].label){%><%=segments[i].label%><%}%></li><%}%></ul>"
+ legendTemplate : "<ul class=\"<%=name.toLowerCase()%>-legend\"><% for (var i=0; i<segments.length; i++){%><li><span class=\"<%=name.toLowerCase()%>-legend-icon\" style=\"background-color:<%=segments[i].fillColor%>\"></span><span class=\"<%=name.toLowerCase()%>-legend-text\"><%if(segments[i].label){%><%=segments[i].label%><%}%></span></li><%}%></ul>"
};
-
Chart.Type.extend({
//Passing in a name registers this chart in the Chart namespace
name: "Doughnut",
- //Providing a defaults will also register the deafults in the chart namespace
+ //Providing a defaults will also register the defaults in the chart namespace
defaults : defaultConfig,
//Initialize is fired when the chart is initialized - Data is passed in as a parameter
//Config is automatically merged by the core of Chart.js, and is available at this.options
@@ -2398,6 +2628,9 @@
this.calculateTotal(data);
helpers.each(data,function(datapoint, index){
+ if (!datapoint.color) {
+ datapoint.color = 'hsl(' + (360 * index / data.length) + ', 100%, 50%)';
+ }
this.addData(datapoint, index, true);
},this);
@@ -2414,7 +2647,11 @@
return segmentsArray;
},
addData : function(segment, atIndex, silent){
- var index = atIndex || this.segments.length;
+ var index = atIndex !== undefined ? atIndex : this.segments.length;
+ if ( typeof(segment.color) === "undefined" ) {
+ segment.color = Chart.defaults.global.segmentColorDefault[index % Chart.defaults.global.segmentColorDefault.length];
+ segment.highlight = Chart.defaults.global.segmentHighlightColorDefaults[index % Chart.defaults.global.segmentHighlightColorDefaults.length];
+ }
this.segments.splice(index, 0, new this.SegmentArc({
value : segment.value,
outerRadius : (this.options.animateScale) ? 0 : this.outerRadius,
@@ -2433,8 +2670,12 @@
this.update();
}
},
- calculateCircumference : function(value){
- return (Math.PI*2)*(Math.abs(value) / this.total);
+ calculateCircumference : function(value) {
+ if ( this.total > 0 ) {
+ return (Math.PI*2)*(value / this.total);
+ } else {
+ return 0;
+ }
},
calculateTotal : function(data){
this.total = 0;
@@ -2507,6 +2748,7 @@
});
}).call(this);
+
(function(){
"use strict";
@@ -2559,7 +2801,10 @@
datasetFill : true,
//String - A legend template
- legendTemplate : "<ul class=\"<%=name.toLowerCase()%>-legend\"><% for (var i=0; i<datasets.length; i++){%><li><span style=\"background-color:<%=datasets[i].strokeColor%>\"></span><%if(datasets[i].label){%><%=datasets[i].label%><%}%></li><%}%></ul>"
+ legendTemplate : "<ul class=\"<%=name.toLowerCase()%>-legend\"><% for (var i=0; i<datasets.length; i++){%><li><span class=\"<%=name.toLowerCase()%>-legend-icon\" style=\"background-color:<%=datasets[i].strokeColor%>\"></span><span class=\"<%=name.toLowerCase()%>-legend-text\"><%if(datasets[i].label){%><%=datasets[i].label%><%}%></span></li><%}%></ul>",
+
+ //Boolean - Whether to horizontally center the label and point dot inside the grid
+ offsetGridLines : false
};
@@ -2570,6 +2815,7 @@
initialize: function(data){
//Declare the extension of the default point, to cater for the options passed in to the constructor
this.PointClass = Chart.Point.extend({
+ offsetGridLines : this.options.offsetGridLines,
strokeWidth : this.options.pointDotStrokeWidth,
radius : this.options.pointDotRadius,
display: this.options.pointDot,
@@ -2685,6 +2931,7 @@
width : this.chart.width,
ctx : this.chart.ctx,
textColor : this.options.scaleFontColor,
+ offsetGridLines : this.options.offsetGridLines,
fontSize : this.options.scaleFontSize,
fontStyle : this.options.scaleFontStyle,
fontFamily : this.options.scaleFontFamily,
@@ -2735,6 +2982,7 @@
this.datasets[datasetIndex].points.push(new this.PointClass({
value : value,
label : label,
+ datasetLabel: this.datasets[datasetIndex].label,
x: this.scale.calculateX(this.scale.valuesCount+1),
y: this.scale.endPoint,
strokeColor : this.datasets[datasetIndex].pointStrokeColor,
@@ -2778,6 +3026,7 @@
return helpers.findPreviousWhere(collection, hasValue, index) || point;
};
+ if (!this.scale) return;
this.scale.draw(easingDecimal);
@@ -2797,7 +3046,7 @@
},this);
- // Control points need to be calculated in a seperate loop, because we need to know the current x/y of the point
+ // Control points need to be calculated in a separate loop, because we need to know the current x/y of the point
// This would cause issues when there is no animation, because the y of the next point would be 0, so beziers would be skewed
if (this.options.bezierCurve){
helpers.each(pointsWithValues, function(point, index){
@@ -2858,7 +3107,9 @@
}
}, this);
- ctx.stroke();
+ if (this.options.datasetStroke) {
+ ctx.stroke();
+ }
if (this.options.datasetFill && pointsWithValues.length > 0){
//Round off the line by going to the base of the chart, back to the start, then fill.
@@ -2912,7 +3163,7 @@
//Boolean - Stroke a line around each segment in the chart
segmentShowStroke : true,
- //String - The colour of the stroke on each segement.
+ //String - The colour of the stroke on each segment.
segmentStrokeColor : "#fff",
//Number - The width of the stroke value in pixels
@@ -2931,14 +3182,14 @@
animateScale : false,
//String - A legend template
- legendTemplate : "<ul class=\"<%=name.toLowerCase()%>-legend\"><% for (var i=0; i<segments.length; i++){%><li><span style=\"background-color:<%=segments[i].fillColor%>\"></span><%if(segments[i].label){%><%=segments[i].label%><%}%></li><%}%></ul>"
+ legendTemplate : "<ul class=\"<%=name.toLowerCase()%>-legend\"><% for (var i=0; i<segments.length; i++){%><li><span class=\"<%=name.toLowerCase()%>-legend-icon\" style=\"background-color:<%=segments[i].fillColor%>\"></span><span class=\"<%=name.toLowerCase()%>-legend-text\"><%if(segments[i].label){%><%=segments[i].label%><%}%></span></li><%}%></ul>"
};
Chart.Type.extend({
//Passing in a name registers this chart in the Chart namespace
name: "PolarArea",
- //Providing a defaults will also register the deafults in the chart namespace
+ //Providing a defaults will also register the defaults in the chart namespace
defaults : defaultConfig,
//Initialize is fired when the chart is initialized - Data is passed in as a parameter
//Config is automatically merged by the core of Chart.js, and is available at this.options
@@ -3132,6 +3383,7 @@
});
}).call(this);
+
(function(){
"use strict";
@@ -3162,6 +3414,9 @@
//Number - Pixel width of the angle line
angleLineWidth : 1,
+ //Number - Interval at which to draw angle lines ("every Nth point")
+ angleLineInterval: 1,
+
//String - Point label font declaration
pointLabelFontFamily : "'Arial'",
@@ -3196,7 +3451,7 @@
datasetFill : true,
//String - A legend template
- legendTemplate : "<ul class=\"<%=name.toLowerCase()%>-legend\"><% for (var i=0; i<datasets.length; i++){%><li><span style=\"background-color:<%=datasets[i].strokeColor%>\"></span><%if(datasets[i].label){%><%=datasets[i].label%><%}%></li><%}%></ul>"
+ legendTemplate : "<ul class=\"<%=name.toLowerCase()%>-legend\"><% for (var i=0; i<datasets.length; i++){%><li><span class=\"<%=name.toLowerCase()%>-legend-icon\" style=\"background-color:<%=datasets[i].strokeColor%>\"></span><span class=\"<%=name.toLowerCase()%>-legend-text\"><%if(datasets[i].label){%><%=datasets[i].label%><%}%></span></li><%}%></ul>"
},
@@ -3308,12 +3563,14 @@
showLabels: this.options.scaleShowLabels,
showLabelBackdrop: this.options.scaleShowLabelBackdrop,
backdropColor: this.options.scaleBackdropColor,
+ backgroundColors: this.options.scaleBackgroundColors,
backdropPaddingY : this.options.scaleBackdropPaddingY,
backdropPaddingX: this.options.scaleBackdropPaddingX,
lineWidth: (this.options.scaleShowLine) ? this.options.scaleLineWidth : 0,
lineColor: this.options.scaleLineColor,
angleLineColor : this.options.angleLineColor,
angleLineWidth : (this.options.angleShowLineOut) ? this.options.angleLineWidth : 0,
+ angleLineInterval: (this.options.angleLineInterval) ? this.options.angleLineInterval : 1,
// Point labels at the edge of each line
pointLabelFontColor : this.options.pointLabelFontColor,
pointLabelFontSize : this.options.pointLabelFontSize,
@@ -3379,6 +3636,7 @@
this.datasets[datasetIndex].points.push(new this.PointClass({
value : value,
label : label,
+ datasetLabel: this.datasets[datasetIndex].label,
x: pointPosition.x,
y: pointPosition.y,
strokeColor : this.datasets[datasetIndex].pointStrokeColor,
@@ -3453,8 +3711,9 @@
ctx.stroke();
ctx.fillStyle = dataset.fillColor;
- ctx.fill();
-
+ if(this.options.datasetFill){
+ ctx.fill();
+ }
//Now draw the points over the line
//A little inefficient double looping, but better than the line
//lagging behind the point positions
@@ -3474,4 +3733,4 @@
-}).call(this);
\ No newline at end of file
+}).call(this);
diff --git a/views/ngXosViews/serviceGrid/src/vendor/Chart.js/bower.json b/views/ngXosViews/serviceGrid/src/vendor/Chart.js/bower.json
new file mode 100644
index 0000000..51e5f2d
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/Chart.js/bower.json
@@ -0,0 +1,21 @@
+{
+ "name": "Chart.js",
+ "description": "Simple HTML5 Charts using the canvas element",
+ "homepage": "https://github.com/nnnick/Chart.js",
+ "author": "nnnick",
+ "main": [
+ "Chart.js"
+ ],
+ "ignore": [
+ "**/*",
+ ".travis.yml",
+ "CONTRIBUTING.md",
+ "Chart.js",
+ "LICENSE.md",
+ "README.md",
+ "gulpfile.js",
+ "package.json"
+ ],
+ "dependencies": {},
+ "version": "1.1.1"
+}
\ No newline at end of file
diff --git a/views/ngXosViews/serviceGrid/src/vendor/angular-animate/.bower.json b/views/ngXosViews/serviceGrid/src/vendor/angular-animate/.bower.json
new file mode 100644
index 0000000..fb88429
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/angular-animate/.bower.json
@@ -0,0 +1,19 @@
+{
+ "name": "angular-animate",
+ "version": "1.4.7",
+ "main": "./angular-animate.js",
+ "ignore": [],
+ "dependencies": {
+ "angular": "1.4.7"
+ },
+ "homepage": "https://github.com/angular/bower-angular-animate",
+ "_release": "1.4.7",
+ "_resolution": {
+ "type": "version",
+ "tag": "v1.4.7",
+ "commit": "3e63136fc3d882828594f3ceb929784eb43aa944"
+ },
+ "_source": "https://github.com/angular/bower-angular-animate.git",
+ "_target": "1.4.7",
+ "_originalSource": "angular-animate"
+}
\ No newline at end of file
diff --git a/applications/auto-scale/gui/src/vendor/angular-animate/README.md b/views/ngXosViews/serviceGrid/src/vendor/angular-animate/README.md
similarity index 100%
rename from applications/auto-scale/gui/src/vendor/angular-animate/README.md
rename to views/ngXosViews/serviceGrid/src/vendor/angular-animate/README.md
diff --git a/applications/auto-scale/gui/src/vendor/angular-animate/angular-animate.js b/views/ngXosViews/serviceGrid/src/vendor/angular-animate/angular-animate.js
similarity index 99%
rename from applications/auto-scale/gui/src/vendor/angular-animate/angular-animate.js
rename to views/ngXosViews/serviceGrid/src/vendor/angular-animate/angular-animate.js
index 3061004..1948298 100644
--- a/applications/auto-scale/gui/src/vendor/angular-animate/angular-animate.js
+++ b/views/ngXosViews/serviceGrid/src/vendor/angular-animate/angular-animate.js
@@ -1,5 +1,5 @@
/**
- * @license AngularJS v1.4.8
+ * @license AngularJS v1.4.7
* (c) 2010-2015 Google, Inc. http://angularjs.org
* License: MIT
*/
@@ -622,8 +622,6 @@
*
* * `event` - The DOM event (e.g. enter, leave, move). When used, a generated CSS class of `ng-EVENT` and `ng-EVENT-active` will be applied
* to the element during the animation. Multiple events can be provided when spaces are used as a separator. (Note that this will not perform any DOM operation.)
- * * `structural` - Indicates that the `ng-` prefix will be added to the event class. Setting to `false` or omitting will turn `ng-EVENT` and
- * `ng-EVENT-active` in `EVENT` and `EVENT-active`. Unused if `event` is omitted.
* * `easing` - The CSS easing value that will be applied to the transition or keyframe animation (or both).
* * `transitionStyle` - The raw CSS transition style that will be used (e.g. `1s linear all`).
* * `keyframeStyle` - The raw CSS keyframe animation style that will be used (e.g. `1s my_animation linear`).
@@ -2135,9 +2133,8 @@
return mergeAnimationOptions(element, options, {});
}
- function findCallbacks(parent, element, event) {
+ function findCallbacks(element, event) {
var targetNode = getDomNode(element);
- var targetParentNode = getDomNode(parent);
var matches = [];
var entries = callbackRegistry[event];
@@ -2145,8 +2142,6 @@
forEach(entries, function(entry) {
if (entry.node.contains(targetNode)) {
matches.push(entry.callback);
- } else if (event === 'leave' && entry.node.contains(targetParentNode)) {
- matches.push(entry.callback);
}
});
}
@@ -2472,7 +2467,7 @@
function notifyProgress(runner, event, phase, data) {
runInNextPostDigestOrNow(function() {
- var callbacks = findCallbacks(parent, element, event);
+ var callbacks = findCallbacks(element, event);
if (callbacks.length) {
// do not optimize this call here to RAF because
// we don't know how heavy the callback code here will
@@ -3463,7 +3458,7 @@
* jQuery(element).fadeOut(1000, doneFn);
* }
* }
- * }]);
+ * }]
* ```
*
* The nice thing about JS-based animations is that we can inject other services and make use of advanced animation libraries such as
@@ -3494,7 +3489,7 @@
* // do some cool animation and call the doneFn
* }
* }
- * }]);
+ * }]
* ```
*
* ## CSS + JS Animations Together
@@ -3516,7 +3511,7 @@
* jQuery(element).slideIn(1000, doneFn);
* }
* }
- * }]);
+ * }]
* ```
*
* ```css
@@ -3536,15 +3531,16 @@
* ```js
* myModule.animation('.slide', ['$animateCss', function($animateCss) {
* return {
- * enter: function(element) {
+ * enter: function(element, doneFn) {
* // this will trigger `.slide.ng-enter` and `.slide.ng-enter-active`.
- * return $animateCss(element, {
+ * var runner = $animateCss(element, {
* event: 'enter',
* structural: true
- * });
+ * }).start();
+* runner.done(doneFn);
* }
* }
- * }]);
+ * }]
* ```
*
* The nice thing here is that we can save bandwidth by sticking to our CSS-based animation code and we don't need to rely on a 3rd-party animation framework.
@@ -3556,17 +3552,19 @@
* ```js
* myModule.animation('.slide', ['$animateCss', function($animateCss) {
* return {
- * enter: function(element) {
- * return $animateCss(element, {
+ * enter: function(element, doneFn) {
+ * var runner = $animateCss(element, {
* event: 'enter',
* structural: true,
* addClass: 'maroon-setting',
* from: { height:0 },
* to: { height: 200 }
- * });
+ * }).start();
+ *
+ * runner.done(doneFn);
* }
* }
- * }]);
+ * }]
* ```
*
* Now we can fill in the rest via our transition CSS code:
diff --git a/views/ngXosViews/serviceGrid/src/vendor/angular-animate/angular-animate.min.js b/views/ngXosViews/serviceGrid/src/vendor/angular-animate/angular-animate.min.js
new file mode 100644
index 0000000..c24d9e0
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/angular-animate/angular-animate.min.js
@@ -0,0 +1,56 @@
+/*
+ AngularJS v1.4.7
+ (c) 2010-2015 Google, Inc. http://angularjs.org
+ License: MIT
+*/
+(function(G,t,Ra){'use strict';function va(a,b,c){if(!a)throw ngMinErr("areq",b||"?",c||"required");return a}function wa(a,b){if(!a&&!b)return"";if(!a)return b;if(!b)return a;W(a)&&(a=a.join(" "));W(b)&&(b=b.join(" "));return a+" "+b}function Ha(a){var b={};a&&(a.to||a.from)&&(b.to=a.to,b.from=a.from);return b}function S(a,b,c){var d="";a=W(a)?a:a&&M(a)&&a.length?a.split(/\s+/):[];q(a,function(a,u){a&&0<a.length&&(d+=0<u?" ":"",d+=c?b+a:a+b)});return d}function Ia(a){if(a instanceof J)switch(a.length){case 0:return[];
+case 1:if(1===a[0].nodeType)return a;break;default:return J(la(a))}if(1===a.nodeType)return J(a)}function la(a){if(!a[0])return a;for(var b=0;b<a.length;b++){var c=a[b];if(1==c.nodeType)return c}}function Ja(a,b,c){q(b,function(b){a.addClass(b,c)})}function Ka(a,b,c){q(b,function(b){a.removeClass(b,c)})}function P(a){return function(b,c){c.addClass&&(Ja(a,b,c.addClass),c.addClass=null);c.removeClass&&(Ka(a,b,c.removeClass),c.removeClass=null)}}function ha(a){a=a||{};if(!a.$$prepared){var b=a.domOperation||
+L;a.domOperation=function(){a.$$domOperationFired=!0;b();b=L};a.$$prepared=!0}return a}function da(a,b){xa(a,b);ya(a,b)}function xa(a,b){b.from&&(a.css(b.from),b.from=null)}function ya(a,b){b.to&&(a.css(b.to),b.to=null)}function Q(a,b,c){var d=(b.addClass||"")+" "+(c.addClass||""),g=(b.removeClass||"")+" "+(c.removeClass||"");a=La(a.attr("class"),d,g);c.preparationClasses&&(b.preparationClasses=X(c.preparationClasses,b.preparationClasses),delete c.preparationClasses);d=b.domOperation!==L?b.domOperation:
+null;za(b,c);d&&(b.domOperation=d);b.addClass=a.addClass?a.addClass:null;b.removeClass=a.removeClass?a.removeClass:null;return b}function La(a,b,c){function d(a){M(a)&&(a=a.split(" "));var b={};q(a,function(a){a.length&&(b[a]=!0)});return b}var g={};a=d(a);b=d(b);q(b,function(a,b){g[b]=1});c=d(c);q(c,function(a,b){g[b]=1===g[b]?null:-1});var u={addClass:"",removeClass:""};q(g,function(b,c){var g,d;1===b?(g="addClass",d=!a[c]):-1===b&&(g="removeClass",d=a[c]);d&&(u[g].length&&(u[g]+=" "),u[g]+=c)});
+return u}function H(a){return a instanceof t.element?a[0]:a}function Ma(a,b,c){var d="";b&&(d=S(b,"ng-",!0));c.addClass&&(d=X(d,S(c.addClass,"-add")));c.removeClass&&(d=X(d,S(c.removeClass,"-remove")));d.length&&(c.preparationClasses=d,a.addClass(d))}function ia(a,b){var c=b?"-"+b+"s":"";ea(a,[fa,c]);return[fa,c]}function ma(a,b){var c=b?"paused":"",d=T+"PlayState";ea(a,[d,c]);return[d,c]}function ea(a,b){a.style[b[0]]=b[1]}function X(a,b){return a?b?a+" "+b:a:b}function Aa(a,b,c){var d=Object.create(null),
+g=a.getComputedStyle(b)||{};q(c,function(a,b){var c=g[a];if(c){var f=c.charAt(0);if("-"===f||"+"===f||0<=f)c=Na(c);0===c&&(c=null);d[b]=c}});return d}function Na(a){var b=0;a=a.split(/\s*,\s*/);q(a,function(a){"s"==a.charAt(a.length-1)&&(a=a.substring(0,a.length-1));a=parseFloat(a)||0;b=b?Math.max(a,b):a});return b}function na(a){return 0===a||null!=a}function Ba(a,b){var c=N,d=a+"s";b?c+="Duration":d+=" linear all";return[c,d]}function Ca(){var a=Object.create(null);return{flush:function(){a=Object.create(null)},
+count:function(b){return(b=a[b])?b.total:0},get:function(b){return(b=a[b])&&b.value},put:function(b,c){a[b]?a[b].total++:a[b]={total:1,value:c}}}}function Da(a,b,c){q(c,function(c){a[c]=U(a[c])?a[c]:b.style.getPropertyValue(c)})}var L=t.noop,za=t.extend,J=t.element,q=t.forEach,W=t.isArray,M=t.isString,oa=t.isObject,pa=t.isUndefined,U=t.isDefined,Ea=t.isFunction,qa=t.isElement,N,ra,T,sa;pa(G.ontransitionend)&&U(G.onwebkittransitionend)?(N="WebkitTransition",ra="webkitTransitionEnd transitionend"):
+(N="transition",ra="transitionend");pa(G.onanimationend)&&U(G.onwebkitanimationend)?(T="WebkitAnimation",sa="webkitAnimationEnd animationend"):(T="animation",sa="animationend");var ja=T+"Delay",ta=T+"Duration",fa=N+"Delay";G=N+"Duration";var Oa={transitionDuration:G,transitionDelay:fa,transitionProperty:N+"Property",animationDuration:ta,animationDelay:ja,animationIterationCount:T+"IterationCount"},Pa={transitionDuration:G,transitionDelay:fa,animationDuration:ta,animationDelay:ja};t.module("ngAnimate",
+[]).directive("ngAnimateChildren",[function(){return function(a,b,c){a=c.ngAnimateChildren;t.isString(a)&&0===a.length?b.data("$$ngAnimateChildren",!0):c.$observe("ngAnimateChildren",function(a){b.data("$$ngAnimateChildren","on"===a||"true"===a)})}}]).factory("$$rAFScheduler",["$$rAF",function(a){function b(a){d=d.concat(a);c()}function c(){if(d.length){for(var b=d.shift(),z=0;z<b.length;z++)b[z]();g||a(function(){g||c()})}}var d,g;d=b.queue=[];b.waitUntilQuiet=function(b){g&&g();g=a(function(){g=
+null;b();c()})};return b}]).factory("$$AnimateRunner",["$q","$sniffer","$$animateAsyncRun",function(a,b,c){function d(a){this.setHost(a);this._doneCallbacks=[];this._runInAnimationFrame=c();this._state=0}d.chain=function(a,b){function c(){if(d===a.length)b(!0);else a[d](function(a){!1===a?b(!1):(d++,c())})}var d=0;c()};d.all=function(a,b){function c(z){f=f&&z;++d===a.length&&b(f)}var d=0,f=!0;q(a,function(a){a.done(c)})};d.prototype={setHost:function(a){this.host=a||{}},done:function(a){2===this._state?
+a():this._doneCallbacks.push(a)},progress:L,getPromise:function(){if(!this.promise){var b=this;this.promise=a(function(a,c){b.done(function(b){!1===b?c():a()})})}return this.promise},then:function(a,b){return this.getPromise().then(a,b)},"catch":function(a){return this.getPromise()["catch"](a)},"finally":function(a){return this.getPromise()["finally"](a)},pause:function(){this.host.pause&&this.host.pause()},resume:function(){this.host.resume&&this.host.resume()},end:function(){this.host.end&&this.host.end();
+this._resolve(!0)},cancel:function(){this.host.cancel&&this.host.cancel();this._resolve(!1)},complete:function(a){var b=this;0===b._state&&(b._state=1,b._runInAnimationFrame(function(){b._resolve(a)}))},_resolve:function(a){2!==this._state&&(q(this._doneCallbacks,function(b){b(a)}),this._doneCallbacks.length=0,this._state=2)}};return d}]).factory("$$animateAsyncRun",["$$rAF",function(a){function b(b){c.push(b);1<c.length||a(function(){for(var a=0;a<c.length;a++)c[a]();c=[]})}var c=[];return function(){var a=
+!1;b(function(){a=!0});return function(c){a?c():b(c)}}}]).provider("$$animateQueue",["$animateProvider",function(a){function b(a,b,c,q){return d[a].some(function(a){return a(b,c,q)})}function c(a,b){a=a||{};var c=0<(a.addClass||"").length,d=0<(a.removeClass||"").length;return b?c&&d:c||d}var d=this.rules={skip:[],cancel:[],join:[]};d.join.push(function(a,b,d){return!b.structural&&c(b.options)});d.skip.push(function(a,b,d){return!b.structural&&!c(b.options)});d.skip.push(function(a,b,c){return"leave"==
+c.event&&b.structural});d.skip.push(function(a,b,c){return c.structural&&2===c.state&&!b.structural});d.cancel.push(function(a,b,c){return c.structural&&b.structural});d.cancel.push(function(a,b,c){return 2===c.state&&b.structural});d.cancel.push(function(a,b,c){a=b.options;c=c.options;return a.addClass&&a.addClass===c.removeClass||a.removeClass&&a.removeClass===c.addClass});this.$get=["$$rAF","$rootScope","$rootElement","$document","$$HashMap","$$animation","$$AnimateRunner","$templateRequest","$$jqLite",
+"$$forceReflow",function(d,u,z,x,f,k,$,t,h,I){function A(){var a=!1;return function(b){a?b():u.$$postDigest(function(){a=!0;b()})}}function Y(a,b){var c=H(a),e=[],d=v[b];d&&q(d,function(a){a.node.contains(c)&&e.push(a.callback)});return e}function E(a,e,l){function n(b,c,e,v){z(function(){var b=Y(a,c);b.length&&d(function(){q(b,function(b){b(a,e,v)})})});b.progress(c,e,v)}function v(b){var c=a,e=l;e.preparationClasses&&(c.removeClass(e.preparationClasses),e.preparationClasses=null);e.activeClasses&&
+(c.removeClass(e.activeClasses),e.activeClasses=null);Ga(a,l);da(a,l);l.domOperation();f.complete(!b)}var s,C;if(a=Ia(a))s=H(a),C=a.parent();l=ha(l);var f=new $,z=A();W(l.addClass)&&(l.addClass=l.addClass.join(" "));l.addClass&&!M(l.addClass)&&(l.addClass=null);W(l.removeClass)&&(l.removeClass=l.removeClass.join(" "));l.removeClass&&!M(l.removeClass)&&(l.removeClass=null);l.from&&!oa(l.from)&&(l.from=null);l.to&&!oa(l.to)&&(l.to=null);if(!s)return v(),f;var h=[s.className,l.addClass,l.removeClass].join(" ");
+if(!Qa(h))return v(),f;var E=0<=["enter","move","leave"].indexOf(e),x=!F||D.get(s),h=!x&&m.get(s)||{},I=!!h.state;x||I&&1==h.state||(x=!ka(a,C,e));if(x)return v(),f;E&&w(a);C={structural:E,element:a,event:e,close:v,options:l,runner:f};if(I){if(b("skip",a,C,h)){if(2===h.state)return v(),f;Q(a,h.options,l);return h.runner}if(b("cancel",a,C,h))if(2===h.state)h.runner.end();else if(h.structural)h.close();else return Q(a,h.options,C.options),h.runner;else if(b("join",a,C,h))if(2===h.state)Q(a,l,{});else return Ma(a,
+E?e:null,l),e=C.event=h.event,l=Q(a,h.options,C.options),h.runner}else Q(a,l,{});(I=C.structural)||(I="animate"===C.event&&0<Object.keys(C.options.to||{}).length||c(C.options));if(!I)return v(),y(a),f;var t=(h.counter||0)+1;C.counter=t;r(a,1,C);u.$$postDigest(function(){var b=m.get(s),d=!b,b=b||{},h=0<(a.parent()||[]).length&&("animate"===b.event||b.structural||c(b.options));if(d||b.counter!==t||!h){d&&(Ga(a,l),da(a,l));if(d||E&&b.event!==e)l.domOperation(),f.end();h||y(a)}else e=!b.structural&&c(b.options,
+!0)?"setClass":b.event,r(a,2),b=k(a,e,b.options),b.done(function(b){v(!b);(b=m.get(s))&&b.counter===t&&y(H(a));n(f,e,"close",{})}),f.setHost(b),n(f,e,"start",{})});return f}function w(a){a=H(a).querySelectorAll("[data-ng-animate]");q(a,function(a){var b=parseInt(a.getAttribute("data-ng-animate")),c=m.get(a);switch(b){case 2:c.runner.end();case 1:c&&m.remove(a)}})}function y(a){a=H(a);a.removeAttribute("data-ng-animate");m.remove(a)}function e(a,b){return H(a)===H(b)}function ka(a,b,c){c=J(x[0].body);
+var d=e(a,c)||"HTML"===a[0].nodeName,v=e(a,z),n=!1,y;for((a=a.data("$ngAnimatePin"))&&(b=a);b&&b.length;){v||(v=e(b,z));a=b[0];if(1!==a.nodeType)break;var r=m.get(a)||{};n||(n=r.structural||D.get(a));if(pa(y)||!0===y)a=b.data("$$ngAnimateChildren"),U(a)&&(y=a);if(n&&!1===y)break;v||(v=e(b,z),v||(a=b.data("$ngAnimatePin"))&&(b=a));d||(d=e(b,c));b=b.parent()}return(!n||y)&&v&&d}function r(a,b,c){c=c||{};c.state=b;a=H(a);a.setAttribute("data-ng-animate",b);c=(b=m.get(a))?za(b,c):c;m.put(a,c)}var m=new f,
+D=new f,F=null,s=u.$watch(function(){return 0===t.totalPendingRequests},function(a){a&&(s(),u.$$postDigest(function(){u.$$postDigest(function(){null===F&&(F=!0)})}))}),v={},n=a.classNameFilter(),Qa=n?function(a){return n.test(a)}:function(){return!0},Ga=P(h);return{on:function(a,b,c){b=la(b);v[a]=v[a]||[];v[a].push({node:b,callback:c})},off:function(a,b,c){function e(a,b,c){var d=la(b);return a.filter(function(a){return!(a.node===d&&(!c||a.callback===c))})}var d=v[a];d&&(v[a]=1===arguments.length?
+null:e(d,b,c))},pin:function(a,b){va(qa(a),"element","not an element");va(qa(b),"parentElement","not an element");a.data("$ngAnimatePin",b)},push:function(a,b,c,e){c=c||{};c.domOperation=e;return E(a,b,c)},enabled:function(a,b){var c=arguments.length;if(0===c)b=!!F;else if(qa(a)){var e=H(a),d=D.get(e);1===c?b=!d:(b=!!b)?d&&D.remove(e):D.put(e,!0)}else b=F=!!a;return b}}}]}]).provider("$$animation",["$animateProvider",function(a){function b(a){return a.data("$$animationRunner")}var c=this.drivers=
+[];this.$get=["$$jqLite","$rootScope","$injector","$$AnimateRunner","$$HashMap","$$rAFScheduler",function(a,g,u,z,x,f){function k(a){function b(a){if(a.processed)return a;a.processed=!0;var e=a.domNode,d=e.parentNode;f.put(e,a);for(var r;d;){if(r=f.get(d)){r.processed||(r=b(r));break}d=d.parentNode}(r||c).children.push(a);return a}var c={children:[]},d,f=new x;for(d=0;d<a.length;d++){var g=a[d];f.put(g.domNode,a[d]={domNode:g.domNode,fn:g.fn,children:[]})}for(d=0;d<a.length;d++)b(a[d]);return function(a){var b=
+[],c=[],d;for(d=0;d<a.children.length;d++)c.push(a.children[d]);a=c.length;var m=0,f=[];for(d=0;d<c.length;d++){var g=c[d];0>=a&&(a=m,m=0,b.push(f),f=[]);f.push(g.fn);g.children.forEach(function(a){m++;c.push(a)});a--}f.length&&b.push(f);return b}(c)}var $=[],t=P(a);return function(h,x,A){function Y(a){a=a.hasAttribute("ng-animate-ref")?[a]:a.querySelectorAll("[ng-animate-ref]");var b=[];q(a,function(a){var c=a.getAttribute("ng-animate-ref");c&&c.length&&b.push(a)});return b}function E(a){var b=[],
+c={};q(a,function(a,e){var d=H(a.element),v=0<=["enter","move"].indexOf(a.event),d=a.structural?Y(d):[];if(d.length){var m=v?"to":"from";q(d,function(a){var b=a.getAttribute("ng-animate-ref");c[b]=c[b]||{};c[b][m]={animationID:e,element:J(a)}})}else b.push(a)});var e={},d={};q(c,function(c,m){var f=c.from,y=c.to;if(f&&y){var g=a[f.animationID],r=a[y.animationID],s=f.animationID.toString();if(!d[s]){var h=d[s]={structural:!0,beforeStart:function(){g.beforeStart();r.beforeStart()},close:function(){g.close();
+r.close()},classes:w(g.classes,r.classes),from:g,to:r,anchors:[]};h.classes.length?b.push(h):(b.push(g),b.push(r))}d[s].anchors.push({out:f.element,"in":y.element})}else f=f?f.animationID:y.animationID,y=f.toString(),e[y]||(e[y]=!0,b.push(a[f]))});return b}function w(a,b){a=a.split(" ");b=b.split(" ");for(var c=[],e=0;e<a.length;e++){var d=a[e];if("ng-"!==d.substring(0,3))for(var m=0;m<b.length;m++)if(d===b[m]){c.push(d);break}}return c.join(" ")}function y(a){for(var b=c.length-1;0<=b;b--){var e=
+c[b];if(u.has(e)&&(e=u.get(e)(a)))return e}}function e(a,c){a.from&&a.to?(b(a.from.element).setHost(c),b(a.to.element).setHost(c)):b(a.element).setHost(c)}function ka(){var a=b(h);!a||"leave"===x&&A.$$domOperationFired||a.end()}function r(b){h.off("$destroy",ka);h.removeData("$$animationRunner");t(h,A);da(h,A);A.domOperation();s&&a.removeClass(h,s);h.removeClass("ng-animate");D.complete(!b)}A=ha(A);var m=0<=["enter","move","leave"].indexOf(x),D=new z({end:function(){r()},cancel:function(){r(!0)}});
+if(!c.length)return r(),D;h.data("$$animationRunner",D);var F=wa(h.attr("class"),wa(A.addClass,A.removeClass)),s=A.tempClasses;s&&(F+=" "+s,A.tempClasses=null);$.push({element:h,classes:F,event:x,structural:m,options:A,beforeStart:function(){h.addClass("ng-animate");s&&a.addClass(h,s)},close:r});h.on("$destroy",ka);if(1<$.length)return D;g.$$postDigest(function(){var a=[];q($,function(c){b(c.element)?a.push(c):c.close()});$.length=0;var c=E(a),d=[];q(c,function(a){d.push({domNode:H(a.from?a.from.element:
+a.element),fn:function(){a.beforeStart();var c,d=a.close;if(b(a.anchors?a.from.element||a.to.element:a.element)){var m=y(a);m&&(c=m.start)}c?(c=c(),c.done(function(a){d(!a)}),e(a,c)):d()}})});f(k(d))});return D}}]}]).provider("$animateCss",["$animateProvider",function(a){var b=Ca(),c=Ca();this.$get=["$window","$$jqLite","$$AnimateRunner","$timeout","$$forceReflow","$sniffer","$$rAFScheduler","$animate",function(a,g,u,z,x,f,k,t){function Fa(a,b){var c=a.parentNode;return(c.$$ngAnimateParentKey||(c.$$ngAnimateParentKey=
+++E))+"-"+a.getAttribute("class")+"-"+b}function h(f,e,h,r){var m;0<b.count(h)&&(m=c.get(h),m||(e=S(e,"-stagger"),g.addClass(f,e),m=Aa(a,f,r),m.animationDuration=Math.max(m.animationDuration,0),m.transitionDuration=Math.max(m.transitionDuration,0),g.removeClass(f,e),c.put(h,m)));return m||{}}function I(a){w.push(a);k.waitUntilQuiet(function(){b.flush();c.flush();for(var a=x(),d=0;d<w.length;d++)w[d](a);w.length=0})}function A(c,e,f){e=b.get(f);e||(e=Aa(a,c,Oa),"infinite"===e.animationIterationCount&&
+(e.animationIterationCount=1));b.put(f,e);c=e;f=c.animationDelay;e=c.transitionDelay;c.maxDelay=f&&e?Math.max(f,e):f||e;c.maxDuration=Math.max(c.animationDuration*c.animationIterationCount,c.transitionDuration);return c}var Y=P(g),E=0,w=[];return function(a,c){function d(){m()}function r(){m(!0)}function m(b){if(!(E||ua&&l)){E=!0;l=!1;c.$$skipPreparationClasses||g.removeClass(a,Z);g.removeClass(a,X);ma(n,!1);ia(n,!1);q(w,function(a){n.style[a[0]]=""});Y(a,c);da(a,c);Object.keys(v).length&&q(v,function(a,
+b){a?n.style.setProperty(b,a):n.style.removeProperty(b)});if(c.onDone)c.onDone();G&&G.complete(!b)}}function D(a){p.blockTransition&&ia(n,a);p.blockKeyframeAnimation&&ma(n,!!a)}function F(){G=new u({end:d,cancel:r});I(L);m();return{$$willAnimate:!1,start:function(){return G},end:d}}function s(){function b(){if(!E){D(!1);q(w,function(a){n.style[a[0]]=a[1]});Y(a,c);g.addClass(a,X);if(p.recalculateTimingStyles){ga=n.className+" "+Z;aa=Fa(n,ga);B=A(n,ga,aa);V=B.maxDelay;C=Math.max(V,0);K=B.maxDuration;
+if(0===K){m();return}p.hasTransitions=0<B.transitionDuration;p.hasAnimations=0<B.animationDuration}p.applyAnimationDelay&&(V="boolean"!==typeof c.delay&&na(c.delay)?parseFloat(c.delay):V,C=Math.max(V,0),B.animationDelay=V,ca=[ja,V+"s"],w.push(ca),n.style[ca[0]]=ca[1]);M=1E3*C;P=1E3*K;if(c.easing){var s,k=c.easing;p.hasTransitions&&(s=N+"TimingFunction",w.push([s,k]),n.style[s]=k);p.hasAnimations&&(s=T+"TimingFunction",w.push([s,k]),n.style[s]=k)}B.transitionDuration&&h.push(ra);B.animationDuration&&
+h.push(sa);r=Date.now();var l=M+1.5*P;s=r+l;var k=a.data("$$animateCss")||[],x=!0;if(k.length){var F=k[0];(x=s>F.expectedEndTime)?z.cancel(F.timer):k.push(m)}x&&(l=z(d,l,!1),k[0]={timer:l,expectedEndTime:s},k.push(m),a.data("$$animateCss",k));a.on(h.join(" "),f);c.to&&(c.cleanupStyles&&Da(v,n,Object.keys(c.to)),ya(a,c))}}function d(){var b=a.data("$$animateCss");if(b){for(var c=1;c<b.length;c++)b[c]();a.removeData("$$animateCss")}}function f(a){a.stopPropagation();var b=a.originalEvent||a;a=b.$manualTimeStamp||
+b.timeStamp||Date.now();b=parseFloat(b.elapsedTime.toFixed(3));Math.max(a-r,0)>=M&&b>=K&&(ua=!0,m())}if(!E)if(n.parentNode){var r,h=[],s=function(a){if(ua)l&&a&&(l=!1,m());else if(l=!a,B.animationDuration)if(a=ma(n,l),l)w.push(a);else{var b=w,c=b.indexOf(a);0<=a&&b.splice(c,1)}},k=0<U&&(B.transitionDuration&&0===R.transitionDuration||B.animationDuration&&0===R.animationDuration)&&Math.max(R.animationDelay,R.transitionDelay);k?z(b,Math.floor(k*U*1E3),!1):b();J.resume=function(){s(!0)};J.pause=function(){s(!1)}}else m()}
+var v={},n=H(a);if(!n||!n.parentNode||!t.enabled())return F();c=ha(c);var w=[],x=a.attr("class"),k=Ha(c),E,l,ua,G,J,C,M,K,P;if(0===c.duration||!f.animations&&!f.transitions)return F();var ba=c.event&&W(c.event)?c.event.join(" "):c.event,Q="",O="";ba&&c.structural?Q=S(ba,"ng-",!0):ba&&(Q=ba);c.addClass&&(O+=S(c.addClass,"-add"));c.removeClass&&(O.length&&(O+=" "),O+=S(c.removeClass,"-remove"));c.applyClassesEarly&&O.length&&Y(a,c);var Z=[Q,O].join(" ").trim(),ga=x+" "+Z,X=S(Z,"-active"),x=k.to&&0<
+Object.keys(k.to).length;if(!(0<(c.keyframeStyle||"").length||x||Z))return F();var aa,R;0<c.stagger?(k=parseFloat(c.stagger),R={transitionDelay:k,animationDelay:k,transitionDuration:0,animationDuration:0}):(aa=Fa(n,ga),R=h(n,Z,aa,Pa));c.$$skipPreparationClasses||g.addClass(a,Z);c.transitionStyle&&(k=[N,c.transitionStyle],ea(n,k),w.push(k));0<=c.duration&&(k=0<n.style[N].length,k=Ba(c.duration,k),ea(n,k),w.push(k));c.keyframeStyle&&(k=[T,c.keyframeStyle],ea(n,k),w.push(k));var U=R?0<=c.staggerIndex?
+c.staggerIndex:b.count(aa):0;(ba=0===U)&&!c.skipBlocking&&ia(n,9999);var B=A(n,ga,aa),V=B.maxDelay;C=Math.max(V,0);K=B.maxDuration;var p={};p.hasTransitions=0<B.transitionDuration;p.hasAnimations=0<B.animationDuration;p.hasTransitionAll=p.hasTransitions&&"all"==B.transitionProperty;p.applyTransitionDuration=x&&(p.hasTransitions&&!p.hasTransitionAll||p.hasAnimations&&!p.hasTransitions);p.applyAnimationDuration=c.duration&&p.hasAnimations;p.applyTransitionDelay=na(c.delay)&&(p.applyTransitionDuration||
+p.hasTransitions);p.applyAnimationDelay=na(c.delay)&&p.hasAnimations;p.recalculateTimingStyles=0<O.length;if(p.applyTransitionDuration||p.applyAnimationDuration)K=c.duration?parseFloat(c.duration):K,p.applyTransitionDuration&&(p.hasTransitions=!0,B.transitionDuration=K,k=0<n.style[N+"Property"].length,w.push(Ba(K,k))),p.applyAnimationDuration&&(p.hasAnimations=!0,B.animationDuration=K,w.push([ta,K+"s"]));if(0===K&&!p.recalculateTimingStyles)return F();if(null!=c.delay){var ca=parseFloat(c.delay);
+p.applyTransitionDelay&&w.push([fa,ca+"s"]);p.applyAnimationDelay&&w.push([ja,ca+"s"])}null==c.duration&&0<B.transitionDuration&&(p.recalculateTimingStyles=p.recalculateTimingStyles||ba);M=1E3*C;P=1E3*K;c.skipBlocking||(p.blockTransition=0<B.transitionDuration,p.blockKeyframeAnimation=0<B.animationDuration&&0<R.animationDelay&&0===R.animationDuration);c.from&&(c.cleanupStyles&&Da(v,n,Object.keys(c.from)),xa(a,c));p.blockTransition||p.blockKeyframeAnimation?D(K):c.skipBlocking||ia(n,!1);return{$$willAnimate:!0,
+end:d,start:function(){if(!E)return J={end:d,cancel:r,resume:null,pause:null},G=new u(J),I(s),G}}}}]}]).provider("$$animateCssDriver",["$$animationProvider",function(a){a.drivers.push("$$animateCssDriver");this.$get=["$animateCss","$rootScope","$$AnimateRunner","$rootElement","$sniffer","$$jqLite","$document",function(a,c,d,g,u,z,x){function f(a){return a.replace(/\bng-\S+\b/g,"")}function k(a,b){M(a)&&(a=a.split(" "));M(b)&&(b=b.split(" "));return a.filter(function(a){return-1===b.indexOf(a)}).join(" ")}
+function t(c,h,g){function x(a){var b={},c=H(a).getBoundingClientRect();q(["width","height","top","left"],function(a){var d=c[a];switch(a){case "top":d+=I.scrollTop;break;case "left":d+=I.scrollLeft}b[a]=Math.floor(d)+"px"});return b}function e(){var c=f(g.attr("class")||""),d=k(c,m),c=k(m,c),d=a(r,{to:x(g),addClass:"ng-anchor-in "+d,removeClass:"ng-anchor-out "+c,delay:!0});return d.$$willAnimate?d:null}function z(){r.remove();h.removeClass("ng-animate-shim");g.removeClass("ng-animate-shim")}var r=
+J(H(h).cloneNode(!0)),m=f(r.attr("class")||"");h.addClass("ng-animate-shim");g.addClass("ng-animate-shim");r.addClass("ng-anchor");A.append(r);var D;c=function(){var c=a(r,{addClass:"ng-anchor-out",delay:!0,from:x(h)});return c.$$willAnimate?c:null}();if(!c&&(D=e(),!D))return z();var F=c||D;return{start:function(){function a(){c&&c.end()}var b,c=F.start();c.done(function(){c=null;if(!D&&(D=e()))return c=D.start(),c.done(function(){c=null;z();b.complete()}),c;z();b.complete()});return b=new d({end:a,
+cancel:a})}}}function G(a,b,c,f){var e=h(a,L),g=h(b,L),k=[];q(f,function(a){(a=t(c,a.out,a["in"]))&&k.push(a)});if(e||g||0!==k.length)return{start:function(){function a(){q(b,function(a){a.end()})}var b=[];e&&b.push(e.start());g&&b.push(g.start());q(k,function(a){b.push(a.start())});var c=new d({end:a,cancel:a});d.all(b,function(a){c.complete(a)});return c}}}function h(c){var d=c.element,f=c.options||{};c.structural&&(f.event=c.event,f.structural=!0,f.applyClassesEarly=!0,"leave"===c.event&&(f.onDone=
+f.domOperation));f.preparationClasses&&(f.event=X(f.event,f.preparationClasses));c=a(d,f);return c.$$willAnimate?c:null}if(!u.animations&&!u.transitions)return L;var I=x[0].body;c=H(g);var A=J(c.parentNode&&11===c.parentNode.nodeType||I.contains(c)?c:I);P(z);return function(a){return a.from&&a.to?G(a.from,a.to,a.classes,a.anchors):h(a)}}]}]).provider("$$animateJs",["$animateProvider",function(a){this.$get=["$injector","$$AnimateRunner","$$jqLite",function(b,c,d){function g(c){c=W(c)?c:c.split(" ");
+for(var d=[],f={},g=0;g<c.length;g++){var q=c[g],u=a.$$registeredAnimations[q];u&&!f[q]&&(d.push(b.get(u)),f[q]=!0)}return d}var u=P(d);return function(a,b,d,k){function t(){k.domOperation();u(a,k)}function G(a,b,d,f,e){switch(d){case "animate":b=[b,f.from,f.to,e];break;case "setClass":b=[b,A,H,e];break;case "addClass":b=[b,A,e];break;case "removeClass":b=[b,H,e];break;default:b=[b,e]}b.push(f);if(a=a.apply(a,b))if(Ea(a.start)&&(a=a.start()),a instanceof c)a.done(e);else if(Ea(a))return a;return L}
+function h(a,b,d,e,f){var g=[];q(e,function(e){var h=e[f];h&&g.push(function(){var e,f,g=!1,k=function(a){g||(g=!0,(f||L)(a),e.complete(!a))};e=new c({end:function(){k()},cancel:function(){k(!0)}});f=G(h,a,b,d,function(a){k(!1===a)});return e})});return g}function I(a,b,d,e,f){var g=h(a,b,d,e,f);if(0===g.length){var k,u;"beforeSetClass"===f?(k=h(a,"removeClass",d,e,"beforeRemoveClass"),u=h(a,"addClass",d,e,"beforeAddClass")):"setClass"===f&&(k=h(a,"removeClass",d,e,"removeClass"),u=h(a,"addClass",
+d,e,"addClass"));k&&(g=g.concat(k));u&&(g=g.concat(u))}if(0!==g.length)return function(a){var b=[];g.length&&q(g,function(a){b.push(a())});b.length?c.all(b,a):a();return function(a){q(b,function(b){a?b.cancel():b.end()})}}}3===arguments.length&&oa(d)&&(k=d,d=null);k=ha(k);d||(d=a.attr("class")||"",k.addClass&&(d+=" "+k.addClass),k.removeClass&&(d+=" "+k.removeClass));var A=k.addClass,H=k.removeClass,E=g(d),w,y;if(E.length){var e,J;"leave"==b?(J="leave",e="afterLeave"):(J="before"+b.charAt(0).toUpperCase()+
+b.substr(1),e=b);"enter"!==b&&"move"!==b&&(w=I(a,b,k,E,J));y=I(a,b,k,E,e)}if(w||y)return{start:function(){function b(c){f=!0;t();da(a,k);g.complete(c)}var d,e=[];w&&e.push(function(a){d=w(a)});e.length?e.push(function(a){t();a(!0)}):t();y&&e.push(function(a){d=y(a)});var f=!1,g=new c({end:function(){f||((d||L)(void 0),b(void 0))},cancel:function(){f||((d||L)(!0),b(!0))}});c.chain(e,b);return g}}}}]}]).provider("$$animateJsDriver",["$$animationProvider",function(a){a.drivers.push("$$animateJsDriver");
+this.$get=["$$animateJs","$$AnimateRunner",function(a,c){function d(c){return a(c.element,c.event,c.classes,c.options)}return function(a){if(a.from&&a.to){var b=d(a.from),t=d(a.to);if(b||t)return{start:function(){function a(){return function(){q(d,function(a){a.end()})}}var d=[];b&&d.push(b.start());t&&d.push(t.start());c.all(d,function(a){g.complete(a)});var g=new c({end:a(),cancel:a()});return g}}}else return d(a)}}]}])})(window,window.angular);
+//# sourceMappingURL=angular-animate.min.js.map
diff --git a/views/ngXosViews/serviceGrid/src/vendor/angular-animate/angular-animate.min.js.map b/views/ngXosViews/serviceGrid/src/vendor/angular-animate/angular-animate.min.js.map
new file mode 100644
index 0000000..20d38d2
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/angular-animate/angular-animate.min.js.map
@@ -0,0 +1,8 @@
+{
+"version":3,
+"file":"angular-animate.min.js",
+"lineCount":55,
+"mappings":"A;;;;;aAKC,SAAQ,CAACA,CAAD,CAASC,CAAT,CAAkBC,EAAlB,CAA6B,CAyEtCC,QAASA,GAAS,CAACC,CAAD,CAAMC,CAAN,CAAYC,CAAZ,CAAoB,CACpC,GAAKF,CAAAA,CAAL,CACE,KAAMG,SAAA,CAAS,MAAT,CAA2CF,CAA3C,EAAmD,GAAnD,CAA0DC,CAA1D,EAAoE,UAApE,CAAN,CAEF,MAAOF,EAJ6B,CAOtCI,QAASA,GAAY,CAACC,CAAD,CAAGC,CAAH,CAAM,CACzB,GAAKD,CAAAA,CAAL,EAAWC,CAAAA,CAAX,CAAc,MAAO,EACrB,IAAKD,CAAAA,CAAL,CAAQ,MAAOC,EACf,IAAKA,CAAAA,CAAL,CAAQ,MAAOD,EACXE,EAAA,CAAQF,CAAR,CAAJ,GAAgBA,CAAhB,CAAoBA,CAAAG,KAAA,CAAO,GAAP,CAApB,CACID,EAAA,CAAQD,CAAR,CAAJ,GAAgBA,CAAhB,CAAoBA,CAAAE,KAAA,CAAO,GAAP,CAApB,CACA,OAAOH,EAAP,CAAW,GAAX,CAAiBC,CANQ,CAS3BG,QAASA,GAAa,CAACC,CAAD,CAAU,CAC9B,IAAIC,EAAS,EACTD,EAAJ,GAAgBA,CAAAE,GAAhB,EAA8BF,CAAAG,KAA9B,IACEF,CAAAC,GACA,CADYF,CAAAE,GACZ,CAAAD,CAAAE,KAAA,CAAcH,CAAAG,KAFhB,CAIA,OAAOF,EANuB,CAShCG,QAASA,EAAW,CAACC,CAAD,CAAUC,CAAV,CAAeC,CAAf,CAAy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BwW,CAApB,CAkBAlW,QAAa,CAACF,CAAD,CAAS,CACpBC,CAAAsB,SAAA,CAAgBvB,CAAhB,CADoB,CAlBtB,CAEA,KAAIC,EAAS,IAAIqD,CAAJ,CAAoB,CAC/BlC,IAAKoX,CAAA,EAD0B,CAE/BlX,OAAQkX,CAAA,EAFuB,CAApB,CAKb,OAAOvY,EAlBS,CADb,CALyC,CAAlD,IAyCE,OAAOsY,EAAA,CAAiBxS,CAAjB,CA1CoC,CADqC,CAA1E,CAFwE,CAAtDsS,CAs7DhC,CAj0HsC,CAArC,CAAD,CAk1HGvkB,MAl1HH,CAk1HWA,MAAAC,QAl1HX;",
+"sources":["angular-animate.js"],
+"names":["window","angular","undefined","assertArg","arg","name","reason","ngMinErr","mergeClasses","a","b","isArray","join","packageStyles","options","styles","to","from","pendClasses","classes","fix","isPrefix","className","isString","length","split","forEach","klass","i","stripCommentsFromElement","element","jqLite","ELEMENT_NODE","nodeType","extractElementNode","elm","$$addClass","$$jqLite","addClass","$$removeClass","removeClass","applyAnimationClassesFactory","prepareAnimationOptions","$$prepared","domOperation","noop","options.domOperation","$$domOperationFired","applyAnimationStyles","applyAnimationFromStyles","applyAnimationToStyles","css","mergeAnimationOptions","target","newOptions","toAdd","toRemove","resolveElementClasses","attr","preparationClasses","concatWithSpace","realDomOperation","extend","existing","splitClassesToLookup","obj","flags","value","key","ADD_CLASS","REMOVE_CLASS","val","prop","allow","getDomNode","applyGeneratedPreparationClasses","event","EVENT_CLASS_PREFIX","ADD_CLASS_SUFFIX","REMOVE_CLASS_SUFFIX","blockTransitions","node","duration","applyInlineStyle","TRANSITION_DELAY_PROP","blockKeyframeAnimations","applyBlock","ANIMATION_PROP","ANIMATION_PLAYSTATE_KEY","styleTuple","style","computeCssStyles","$window","properties","Object","create","detectedStyles","getComputedStyle","formalStyleName","actualStyleName","c","charAt","parseMaxTime","str","maxValue","values","substring","parseFloat","Math","max","truthyTimingValue","getCssTransitionDurationStyle","applyOnlyDuration","TRANSITION_PROP","DURATION_KEY","createLocalCacheLookup","cache","flush","count","entry","total","get","put","registerRestorableStyles","backup","isDefined","getPropertyValue","isObject","isUndefined","isFunction","isElement","TRANSITIONEND_EVENT","ANIMATIONEND_EVENT","ontransitionend","onwebkittransitionend","onanimationend","onwebkitanimationend","ANIMATION_DELAY_PROP","DELAY_KEY","ANIMATION_DURATION_PROP","TRANSITION_DURATION_PROP","DETECT_CSS_PROPERTIES","transitionDuration","transitionDelay","transitionProperty","PROPERTY_KEY","animationDuration","animationDelay","animationIterationCount","ANIMATION_ITERATION_COUNT_KEY","DETECT_STAGGER_CSS_PROPERTIES","module","directive","$$AnimateChildrenDirective","scope","attrs","ngAnimateChildren","data","NG_ANIMATE_CHILDREN_DATA","$observe","factory","$$rAFSchedulerFactory","$$rAF","scheduler","tasks","queue","concat","nextTick","items","shift","cancelFn","waitUntilQuiet","scheduler.waitUntilQuiet","fn","$$AnimateRunnerFactory","$q","$sniffer","$$animateAsyncRun","AnimateRunner","host","setHost","_doneCallbacks","_runInAnimationFrame","_state","chain","AnimateRunner.chain","callback","next","index","response","all","AnimateRunner.all","runners","onProgress","status","runner","done","prototype","DONE_COMPLETE_STATE","push","progress","getPromise","promise","self","resolve","reject","then","resolveHandler","rejectHandler","catch","handler","finally","pause","resume","end","_resolve","cancel","complete","INITIAL_STATE","DONE_PENDING_STATE","$$AnimateAsyncRunFactory","waitForTick","waitQueue","passed","provider","$$AnimateQueueProvider","$animateProvider","isAllowed","ruleType","currentAnimation","previousAnimation","rules","some","hasAnimationClasses","and","skip","newAnimation","structural","RUNNING_STATE","state","nO","cO","$get","$rootScope","$rootElement","$document","$$HashMap","$$animation","$$AnimateRunner","$templateRequest","$$forceReflow","postDigestTaskFactory","postDigestCalled","$$postDigest","findCallbacks","targetNode","matches","entries","callbackRegistry","contains","queueAnimation","notifyProgress","phase","runInNextPostDigestOrNow","callbacks","close","activeClasses","applyAnimationClasses","parent","isAnimatableClassName","isStructural","indexOf","skipAnimations","animationsEnabled","disabledElementsLookup","existingAnimation","activeAnimationsLookup","hasExistingAnimation","PRE_DIGEST_STATE","areAnimationsAllowed","closeChildAnimations","skipAnimationFlag","cancelAnimationFlag","joinAnimationFlag","isValidAnimation","keys","clearElementAnimationState","counter","markElementAnimationState","animationDetails","animationCancelled","realRunner","children","querySelectorAll","child","parseInt","getAttribute","NG_ANIMATE_ATTR_NAME","remove","removeAttribute","isMatchingElement","nodeOrElmA","nodeOrElmB","parentElement","bodyElement","body","bodyElementDetected","nodeName","rootElementDetected","parentAnimationDetected","animateChildren","parentHost","NG_ANIMATE_PIN_DATA","parentNode","details","setAttribute","newValue","oldValue","deregisterWatch","$watch","totalPendingRequests","isEmpty","classNameFilter","test","on","container","off","filterFromRegistry","list","matchContainer","matchCallback","containerNode","filter","arguments","pin","enabled","bool","argCount","hasElement","recordExists","$$AnimationProvider","getRunner","RUNNER_STORAGE_KEY","drivers","$injector","$$rAFScheduler","sortAnimations","animations","processNode","processed","elementNode","domNode","lookup","parentEntry","tree","animation","flatten","result","remainingLevelEntries","nextLevelEntries","row","childEntry","animationQueue","getAnchorNodes","hasAttribute","NG_ANIMATE_REF_ATTR","SELECTOR","anchors","groupAnimations","preparedAnimations","refLookup","enterOrMove","anchorNodes","direction","anchor","animationID","usedIndicesLookup","anchorGroups","operations","fromAnimation","toAnimation","lookupKey","toString","group","beforeStart","cssClassesIntersection","indexKey","aa","j","invokeFirstDriver","driverName","has","driver","updateAnimationRunners","newRunner","handleDestroyedElement","rejected","removeData","tempClasses","NG_ANIMATE_CLASSNAME","groupedAnimations","toBeSortedAnimations","animationEntry","triggerAnimationStart","startAnimationFn","closeFn","targetElement","operation","start","animationRunner","$AnimateCssProvider","gcsLookup","gcsStaggerLookup","$timeout","$animate","gcsHashFn","extraClasses","parentCounter","computeCachedCssStaggerStyles","cacheKey","stagger","staggerClassName","rafWaitQueue","pageWidth","computeTimings","timings","aD","tD","maxDelay","maxDuration","init","endFn","animationClosed","animationCompleted","animationPaused","$$skipPreparationClasses","temporaryStyles","restoreStyles","setProperty","removeProperty","onDone","applyBlocking","blockTransition","blockKeyframeAnimation","closeAndReturnNoopAnimator","$$willAnimate","recalculateTimingStyles","fullClassName","relativeDelay","hasTransitions","hasAnimations","applyAnimationDelay","delay","delayStyle","maxDelayTime","ONE_SECOND","maxDurationTime","easing","easeProp","easeVal","TIMING_KEY","events","startTime","Date","now","timerTime","CLOSING_TIME_BUFFER","endTime","animationsData","ANIMATE_TIMER_KEY","setupFallbackTimer","currentTimerData","expectedEndTime","timer","onAnimationExpired","onAnimationProgress","cleanupStyles","stopPropagation","ev","originalEvent","timeStamp","$manualTimeStamp","elapsedTime","toFixed","ELAPSED_TIME_MAX_DECIMAL_PLACES","playPause","playAnimation","arr","splice","maxStagger","itemIndex","floor","runnerHost","runnerHost.resume","runnerHost.pause","transitions","method","structuralClassName","addRemoveClassName","applyClassesEarly","trim","ACTIVE_CLASS_SUFFIX","hasToStyles","keyframeStyle","staggerVal","transitionStyle","durationStyle","staggerIndex","isFirst","skipBlocking","SAFE_FAST_FORWARD_DURATION_VALUE","hasTransitionAll","applyTransitionDuration","applyAnimationDuration","applyTransitionDelay","$$AnimateCssDriverProvider","$$animationProvider","$animateCss","filterCssClasses","replace","getUniqueValues","prepareAnchoredAnimation","outAnchor","inAnchor","calculateAnchorStyles","coords","getBoundingClientRect","bodyNode","scrollTop","scrollLeft","prepareInAnimation","endingClasses","startingClasses","animator","clone","NG_ANIMATE_SHIM_CLASS_NAME","cloneNode","NG_ANIMATE_ANCHOR_CLASS_NAME","rootBodyElement","append","animatorIn","animatorOut","prepareOutAnimation","NG_OUT_ANCHOR_CLASS_NAME","startingAnimator","prepareFromToAnchorAnimation","prepareRegularAnimation","anchorAnimations","outElement","inElement","animationRunners","rootNode","initDriverFn","$$AnimateJsProvider","lookupAnimations","flagMap","animationFactory","$$registeredAnimations","applyOptions","executeAnimationFn","args","classesToAdd","classesToRemove","apply","groupEventedAnimations","fnName","ani","endProgressCb","resolved","onAnimationComplete","packageAnimations","startAnimation","animateFn","before","after","afterFn","beforeFn","toUpperCase","substr","onComplete","success","closeActiveAnimations","cancelled","$$AnimateJsDriverProvider","$$animateJs","prepareAnimation","endFnFactory"]
+}
diff --git a/applications/auto-scale/gui/src/vendor/angular-animate/bower.json b/views/ngXosViews/serviceGrid/src/vendor/angular-animate/bower.json
similarity index 70%
rename from applications/auto-scale/gui/src/vendor/angular-animate/bower.json
rename to views/ngXosViews/serviceGrid/src/vendor/angular-animate/bower.json
index 7137037..e0d8e54 100644
--- a/applications/auto-scale/gui/src/vendor/angular-animate/bower.json
+++ b/views/ngXosViews/serviceGrid/src/vendor/angular-animate/bower.json
@@ -1,9 +1,9 @@
{
"name": "angular-animate",
- "version": "1.4.8",
+ "version": "1.4.7",
"main": "./angular-animate.js",
"ignore": [],
"dependencies": {
- "angular": "1.4.8"
+ "angular": "1.4.7"
}
}
diff --git a/applications/auto-scale/gui/src/vendor/angular-animate/index.js b/views/ngXosViews/serviceGrid/src/vendor/angular-animate/index.js
similarity index 100%
rename from applications/auto-scale/gui/src/vendor/angular-animate/index.js
rename to views/ngXosViews/serviceGrid/src/vendor/angular-animate/index.js
diff --git a/applications/auto-scale/gui/src/vendor/angular-animate/package.json b/views/ngXosViews/serviceGrid/src/vendor/angular-animate/package.json
similarity index 95%
rename from applications/auto-scale/gui/src/vendor/angular-animate/package.json
rename to views/ngXosViews/serviceGrid/src/vendor/angular-animate/package.json
index d732075..4374968 100644
--- a/applications/auto-scale/gui/src/vendor/angular-animate/package.json
+++ b/views/ngXosViews/serviceGrid/src/vendor/angular-animate/package.json
@@ -1,6 +1,6 @@
{
"name": "angular-animate",
- "version": "1.4.8",
+ "version": "1.4.7",
"description": "AngularJS module for animations",
"main": "index.js",
"scripts": {
diff --git a/applications/auto-scale/gui/src/vendor/angular-chart.js/.bower.json b/views/ngXosViews/serviceGrid/src/vendor/angular-chart.js/.bower.json
similarity index 75%
rename from applications/auto-scale/gui/src/vendor/angular-chart.js/.bower.json
rename to views/ngXosViews/serviceGrid/src/vendor/angular-chart.js/.bower.json
index b8a080f..7223baf 100644
--- a/applications/auto-scale/gui/src/vendor/angular-chart.js/.bower.json
+++ b/views/ngXosViews/serviceGrid/src/vendor/angular-chart.js/.bower.json
@@ -1,6 +1,6 @@
{
"name": "angular-chart.js",
- "version": "0.8.8",
+ "version": "0.10.2",
"main": [
"./dist/angular-chart.js",
"./dist/angular-chart.css"
@@ -40,29 +40,24 @@
],
"dependencies": {
"angular": "1.x",
- "Chart.js": "~1.0.1"
+ "Chart.js": "~1.1.1"
},
"devDependencies": {
"Chart.StackedBar.js": "~1.0.1",
"angular-bootstrap": "~0.11.0",
- "angular-mocks": "1.x",
+ "angular-mocks": "~1.x",
"font-awesome": "~4.1.0",
"rainbow": "~1.1.9",
"requirejs": "~2.1.20"
},
- "resolutions": {
- "Chart.js": "~1.0.1",
- "angular": "1.x",
- "angular-mocks": "1.3.10"
- },
"homepage": "https://github.com/jtblin/angular-chart.js",
- "_release": "0.8.8",
+ "_release": "0.10.2",
"_resolution": {
"type": "version",
- "tag": "0.8.8",
- "commit": "25739e972b519676fed7e0bd4c9d1ec6b8bb92f0"
+ "tag": "0.10.2",
+ "commit": "3ddc3a29c1217e9bfd2662d574c45e6e873e870d"
},
- "_source": "git://github.com/jtblin/angular-chart.js.git",
- "_target": "~0.8.7",
+ "_source": "https://github.com/jtblin/angular-chart.js.git",
+ "_target": "~0.10.2",
"_originalSource": "angular-chart.js"
}
\ No newline at end of file
diff --git a/views/ngXosViews/serviceGrid/src/vendor/angular-chart.js/CONTRIBUTING.md b/views/ngXosViews/serviceGrid/src/vendor/angular-chart.js/CONTRIBUTING.md
new file mode 100644
index 0000000..3f2f6b2
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/angular-chart.js/CONTRIBUTING.md
@@ -0,0 +1,9 @@
+### Contributing
+
+1. Create an issue
+1. Fork the repo
+1. Install dependencies: `npm install` and `bower install`
+1. Make your changes
+1. Install [GraphicsMagick](http://www.graphicsmagick.org/)
+1. Run linter and tests: `gulp check`
+1. Submit pull request
diff --git a/views/ngXosViews/serviceGrid/src/vendor/angular-chart.js/Dockerfile b/views/ngXosViews/serviceGrid/src/vendor/angular-chart.js/Dockerfile
new file mode 100644
index 0000000..a33c9b2
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/angular-chart.js/Dockerfile
@@ -0,0 +1,7 @@
+FROM jtblin/debian-node-graphicsmagick:stretch-node-v4.4.3-gm-v1.3.23
+WORKDIR /src
+ADD . ./
+RUN chown -R node:node /src
+USER node
+RUN npm install && npm install bower && ./node_modules/bower/bin/bower install
+CMD ["npm", "test"]
diff --git a/views/ngXosViews/serviceGrid/src/vendor/angular-chart.js/ISSUE_TEMPLATE.md b/views/ngXosViews/serviceGrid/src/vendor/angular-chart.js/ISSUE_TEMPLATE.md
new file mode 100644
index 0000000..be515e4
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/angular-chart.js/ISSUE_TEMPLATE.md
@@ -0,0 +1,32 @@
+<!--
+Thanks for wanting to report an issue you've found in angular-chart.js.
+
+Plese note that issues or feature requests for Chart.js (e.g. new chart type, new axis, etc.)
+need to be opened on Chart.js issues tracker: https://github.com/nnnick/Chart.js/issues.
+
+For general questions about usage, please use [http://stackoverflow.com/](http://stackoverflow.com/)
+as you will be more likely to get an appropriate answer.
+
+Please check if the issue exists before creating a new one.
+While opening an issue please provide a jsbin template or equivalent
+to reproduce the issue.
+
+-->
+
+### Overview
+
+Describe the issue. What is the issue and what did you expect?
+
+Please make sure to review and check all of these items:
+
+- [ ] Use latest version of the library
+- [ ] Make sure you've included all the dependencies e.g Chart.js, angular, css file
+- [ ] Include a repro case, see below.
+
+
+### Step to reproduce
+
+**Ensure you add a link to a plunker, jsbin, or equivalent.**
+Here is a [jsbin template](http://jsbin.com/dufibi/3/edit?html,js,output) for convenience.
+
+
diff --git a/applications/auto-scale/gui/src/vendor/angular-chart.js/LICENSE b/views/ngXosViews/serviceGrid/src/vendor/angular-chart.js/LICENSE
similarity index 100%
rename from applications/auto-scale/gui/src/vendor/angular-chart.js/LICENSE
rename to views/ngXosViews/serviceGrid/src/vendor/angular-chart.js/LICENSE
diff --git a/views/ngXosViews/serviceGrid/src/vendor/angular-chart.js/PULL_REQUEST_TEMPLATE.md b/views/ngXosViews/serviceGrid/src/vendor/angular-chart.js/PULL_REQUEST_TEMPLATE.md
new file mode 100644
index 0000000..a650830
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/angular-chart.js/PULL_REQUEST_TEMPLATE.md
@@ -0,0 +1,15 @@
+<!-- Thanks for taking the time to submit a pull request for this project. Please ensure the following
+ before opening a pull request as best as you can. -->
+
+### Description of change
+
+<!-- Please provide a description of the change here. Indicate which issue it's referring to. -->
+
+### Pull Request check-list
+
+- [ ] Run `gulp test` to ensure there are no linting, or style issues and all tests pass.
+- [ ] Squash your commits into a few commits only.
+- [ ] Make sure the commit message is short, concise and descriptive of the issues you're fixing.
+- [ ] Avoid mixing up multiple issues and/or features, open one pull request for each issue.
+- [ ] Have you updated the documentation and / or examples?
+- [ ] Have you included a new test?
diff --git a/applications/auto-scale/gui/src/vendor/angular-chart.js/README.md b/views/ngXosViews/serviceGrid/src/vendor/angular-chart.js/README.md
similarity index 86%
rename from applications/auto-scale/gui/src/vendor/angular-chart.js/README.md
rename to views/ngXosViews/serviceGrid/src/vendor/angular-chart.js/README.md
index d2044e8..0c81b1c 100644
--- a/applications/auto-scale/gui/src/vendor/angular-chart.js/README.md
+++ b/views/ngXosViews/serviceGrid/src/vendor/angular-chart.js/README.md
@@ -2,14 +2,28 @@
[](http://badge.fury.io/bo/angular-chart.js)
[](http://badge.fury.io/js/angular-chart.js)
-[](https://travis-ci.org/jtblin/angular-chart.js)
-[](https://codeclimate.com/github/jtblin/angular-chart.js)
+[](https://travis-ci.org/jtblin/angular-chart.js)
+[](https://www.codacy.com/app/jtblin/angular-chart-js)
[](https://codeclimate.com/github/jtblin/angular-chart.js)
+[](https://www.npmjs.com/package/angular-chart.js)
Beautiful, reactive, responsive charts for Angular.JS using [Chart.js](http://www.chartjs.org/).
[Demo](http://jtblin.github.io/angular-chart.js/)
+# v0.x - Chart.js v1.1.x - stable
+
+This is the stable version of angular-chart.js that uses the v1.1.x version of Chart.js.
+
+# v1.0.0-alpha - Chart.js v2.0.x
+
+If you are interested by the 2.0 version of Chart.js, please checkout the
+[chartjs-2.0 branch](https://github.com/jtblin/angular-chart.js/tree/chartjs-2.0). Report issues
+and feedback for this version by opening issues labelled with `v1.x`.
+
+See https://github.com/jtblin/angular-chart.js/issues/123 for more details and subscribe to it to get
+the latest progress on Chart.js 2.0 integration.
+
# Installation
### bower
@@ -134,6 +148,7 @@
* `create`: when chart is created
* `update`: when chart is updated
+* `destroy`: when chart is destroyed
```
$scope.$on('create', function (event, chart) {
@@ -155,17 +170,6 @@
Hex colours are converted to Chart.js colours automatically,
including different shades for highlight, fill, stroke, etc.
-# Issues
-
-**Issues or feature requests for Chart.js (e.g. new chart type, new axis, etc.) need to be opened on
-[Chart.js issues tracker](https://github.com/nnnick/Chart.js/issues)**
-
-**For general questions about usage, please use [http://stackoverflow.com/](http://stackoverflow.com/)**
-
-Please check if issue exists first, otherwise open issue in [github](https://github.com/jtblin/angular-chart.js/issues).
-**Ensure you add a link to a plunker, jsbin, or equivalent.**
-Here is a [jsbin template](http://jsbin.com/dufibi/3/edit?html,js,output) for convenience.
-
## Browser compatibility
For IE8 and older browsers, you will need
@@ -184,16 +188,22 @@
</head>
```
+# Issues
+
+**Issues or feature requests for Chart.js (e.g. new chart type, new axis, etc.) need to be opened on
+[Chart.js issues tracker](https://github.com/nnnick/Chart.js/issues)**
+
+**For general questions about usage, please use [http://stackoverflow.com/](http://stackoverflow.com/)**
+
+Please check if issue exists first, otherwise open issue in [github](https://github.com/jtblin/angular-chart.js/issues).
+**Ensure you add a link to a plunker, jsbin, or equivalent.**
+Here is a [jsbin template](http://jsbin.com/dufibi/3/edit?html,js,output) for convenience.
+
# Contributing
Pull requests welcome!
-1. Fork the repo
-1. Install dependencies: `npm install` and `bower install`
-1. Make your changes
-1. Install [GraphicsMagick](http://www.graphicsmagick.org/)
-1. Run tests: `npm test`
-1. Submit pull request
+See [CONTRIBUTING.md](CONTRIBUTING.md).
## Contributors
diff --git a/applications/auto-scale/gui/src/vendor/angular-chart.js/angular-chart.js b/views/ngXosViews/serviceGrid/src/vendor/angular-chart.js/angular-chart.js
similarity index 86%
rename from applications/auto-scale/gui/src/vendor/angular-chart.js/angular-chart.js
rename to views/ngXosViews/serviceGrid/src/vendor/angular-chart.js/angular-chart.js
index d6df1cd..4624343 100644
--- a/applications/auto-scale/gui/src/vendor/angular-chart.js/angular-chart.js
+++ b/views/ngXosViews/serviceGrid/src/vendor/angular-chart.js/angular-chart.js
@@ -37,13 +37,13 @@
return angular.module('chart.js', [])
.provider('ChartJs', ChartJsProvider)
.factory('ChartJsFactory', ['ChartJs', '$timeout', ChartJsFactory])
- .directive('chartBase', function (ChartJsFactory) { return new ChartJsFactory(); })
- .directive('chartLine', function (ChartJsFactory) { return new ChartJsFactory('Line'); })
- .directive('chartBar', function (ChartJsFactory) { return new ChartJsFactory('Bar'); })
- .directive('chartRadar', function (ChartJsFactory) { return new ChartJsFactory('Radar'); })
- .directive('chartDoughnut', function (ChartJsFactory) { return new ChartJsFactory('Doughnut'); })
- .directive('chartPie', function (ChartJsFactory) { return new ChartJsFactory('Pie'); })
- .directive('chartPolarArea', function (ChartJsFactory) { return new ChartJsFactory('PolarArea'); });
+ .directive('chartBase', ['ChartJsFactory', function (ChartJsFactory) { return new ChartJsFactory(); }])
+ .directive('chartLine', ['ChartJsFactory', function (ChartJsFactory) { return new ChartJsFactory('Line'); }])
+ .directive('chartBar', ['ChartJsFactory', function (ChartJsFactory) { return new ChartJsFactory('Bar'); }])
+ .directive('chartRadar', ['ChartJsFactory', function (ChartJsFactory) { return new ChartJsFactory('Radar'); }])
+ .directive('chartDoughnut', ['ChartJsFactory', function (ChartJsFactory) { return new ChartJsFactory('Doughnut'); }])
+ .directive('chartPie', ['ChartJsFactory', function (ChartJsFactory) { return new ChartJsFactory('Pie'); }])
+ .directive('chartPolarArea', ['ChartJsFactory', function (ChartJsFactory) { return new ChartJsFactory('PolarArea'); }]);
/**
* Wrapper for chart.js
@@ -137,14 +137,15 @@
// Order of setting "watch" matter
scope.$watch('data', function (newVal, oldVal) {
- if (! newVal || ! newVal.length || (Array.isArray(newVal[0]) && ! newVal[0].length)) return;
+ if (! newVal || ! newVal.length || (Array.isArray(newVal[0]) && ! newVal[0].length)) {
+ destroyChart(chart, scope);
+ return;
+ }
var chartType = type || scope.chartType;
if (! chartType) return;
- if (chart) {
- if (canUpdateChart(newVal, oldVal)) return updateChart(chart, newVal, scope, elem);
- chart.destroy();
- }
+ if (chart && canUpdateChart(newVal, oldVal))
+ return updateChart(chart, newVal, scope, elem);
createChart(chartType);
}, true);
@@ -157,12 +158,11 @@
scope.$watch('chartType', function (newVal, oldVal) {
if (isEmpty(newVal)) return;
if (angular.equals(newVal, oldVal)) return;
- if (chart) chart.destroy();
createChart(newVal);
});
scope.$on('$destroy', function () {
- if (chart) chart.destroy();
+ destroyChart(chart, scope);
});
function resetChart (newVal, oldVal) {
@@ -173,8 +173,6 @@
// chart.update() doesn't work for series and labels
// so we have to re-create the chart entirely
- if (chart) chart.destroy();
-
createChart(chartType);
}
@@ -186,12 +184,16 @@
}
if (! scope.data || ! scope.data.length) return;
scope.getColour = typeof scope.getColour === 'function' ? scope.getColour : getRandomColour;
- scope.colours = getColours(type, scope);
+ var colours = getColours(type, scope);
var cvs = elem[0], ctx = cvs.getContext('2d');
var data = Array.isArray(scope.data[0]) ?
- getDataSets(scope.labels, scope.data, scope.series || [], scope.colours) :
- getData(scope.labels, scope.data, scope.colours);
+ getDataSets(scope.labels, scope.data, scope.series || [], colours) :
+ getData(scope.labels, scope.data, colours);
var options = angular.extend({}, ChartJs.getOptions(type), scope.options);
+
+ // Destroy old chart if it exists to avoid ghost charts issue
+ // https://github.com/jtblin/angular-chart.js/issues/187
+ destroyChart(chart, scope);
chart = new ChartJs.Chart(ctx)[type](data, options);
scope.$emit('create', chart);
@@ -245,13 +247,18 @@
}
function getColours (type, scope) {
+ var notEnoughColours = false;
var colours = angular.copy(scope.colours ||
ChartJs.getOptions(type).colours ||
Chart.defaults.global.colours
);
while (colours.length < scope.data.length) {
colours.push(scope.getColour());
+ notEnoughColours = true;
}
+ // mutate colours in this case as we don't want
+ // the colours to change on each refresh
+ if (notEnoughColours) scope.colours = colours;
return colours.map(convertColour);
}
@@ -358,5 +365,11 @@
var options = angular.extend({}, Chart.defaults.global, ChartJs.getOptions(type), scope.options);
return options.responsive;
}
+
+ function destroyChart(chart, scope) {
+ if(! chart) return;
+ chart.destroy();
+ scope.$emit('destroy', chart);
+ }
}
}));
diff --git a/applications/auto-scale/gui/src/vendor/angular-chart.js/angular-chart.less b/views/ngXosViews/serviceGrid/src/vendor/angular-chart.js/angular-chart.less
similarity index 73%
rename from applications/auto-scale/gui/src/vendor/angular-chart.js/angular-chart.less
rename to views/ngXosViews/serviceGrid/src/vendor/angular-chart.js/angular-chart.less
index ba6b18d..4e30cd1 100644
--- a/applications/auto-scale/gui/src/vendor/angular-chart.js/angular-chart.less
+++ b/views/ngXosViews/serviceGrid/src/vendor/angular-chart.js/angular-chart.less
@@ -16,15 +16,15 @@
padding: 2px 8px 2px 28px;
font-size: smaller;
cursor: default;
-
- span {
- display: block;
- position: absolute;
- left: 0;
- top: 0;
- width: 20px;
- height: 20px;
- border-radius: 5px;
- }
}
}
+
+.chart-legend-icon, .bar-legend-icon, .line-legend-icon, .pie-legend-icon, .radar-legend-icon, .polararea-legend-icon, .doughnut-legend-icon {
+ display: block;
+ position: absolute;
+ left: 0;
+ top: 0;
+ width: 20px;
+ height: 20px;
+ border-radius: 5px;
+}
diff --git a/applications/auto-scale/gui/src/vendor/angular-chart.js/bower.json b/views/ngXosViews/serviceGrid/src/vendor/angular-chart.js/bower.json
similarity index 84%
rename from applications/auto-scale/gui/src/vendor/angular-chart.js/bower.json
rename to views/ngXosViews/serviceGrid/src/vendor/angular-chart.js/bower.json
index 6ada4e5..a733e52 100644
--- a/applications/auto-scale/gui/src/vendor/angular-chart.js/bower.json
+++ b/views/ngXosViews/serviceGrid/src/vendor/angular-chart.js/bower.json
@@ -1,6 +1,6 @@
{
"name": "angular-chart.js",
- "version": "0.8.8",
+ "version": "0.10.2",
"main": [
"./dist/angular-chart.js",
"./dist/angular-chart.css"
@@ -40,19 +40,14 @@
],
"dependencies": {
"angular": "1.x",
- "Chart.js": "~1.0.1"
+ "Chart.js": "~1.1.1"
},
"devDependencies": {
"Chart.StackedBar.js": "~1.0.1",
"angular-bootstrap": "~0.11.0",
- "angular-mocks": "1.x",
+ "angular-mocks": "~1.x",
"font-awesome": "~4.1.0",
"rainbow": "~1.1.9",
"requirejs": "~2.1.20"
- },
- "resolutions": {
- "Chart.js": "~1.0.1",
- "angular": "1.x",
- "angular-mocks": "1.3.10"
}
}
diff --git a/views/ngXosViews/serviceGrid/src/vendor/angular-chart.js/dist/angular-chart.css b/views/ngXosViews/serviceGrid/src/vendor/angular-chart.js/dist/angular-chart.css
new file mode 100644
index 0000000..9fc8593
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/angular-chart.js/dist/angular-chart.css
@@ -0,0 +1,49 @@
+.chart-legend,
+.bar-legend,
+.line-legend,
+.pie-legend,
+.radar-legend,
+.polararea-legend,
+.doughnut-legend {
+ list-style-type: none;
+ margin-top: 5px;
+ text-align: center;
+ /* NOTE: Browsers automatically add 40px of padding-left to all lists, so we should offset that, otherwise the legend is off-center */
+ -webkit-padding-start: 0;
+ /* Webkit */
+ -moz-padding-start: 0;
+ /* Mozilla */
+ padding-left: 0;
+ /* IE (handles all cases, really, but we should also include the vendor-specific properties just to be safe) */
+}
+.chart-legend li,
+.bar-legend li,
+.line-legend li,
+.pie-legend li,
+.radar-legend li,
+.polararea-legend li,
+.doughnut-legend li {
+ display: inline-block;
+ white-space: nowrap;
+ position: relative;
+ margin-bottom: 4px;
+ border-radius: 5px;
+ padding: 2px 8px 2px 28px;
+ font-size: smaller;
+ cursor: default;
+}
+.chart-legend-icon,
+.bar-legend-icon,
+.line-legend-icon,
+.pie-legend-icon,
+.radar-legend-icon,
+.polararea-legend-icon,
+.doughnut-legend-icon {
+ display: block;
+ position: absolute;
+ left: 0;
+ top: 0;
+ width: 20px;
+ height: 20px;
+ border-radius: 5px;
+}
diff --git a/applications/auto-scale/gui/src/vendor/angular-chart.js/angular-chart.js b/views/ngXosViews/serviceGrid/src/vendor/angular-chart.js/dist/angular-chart.js
similarity index 86%
copy from applications/auto-scale/gui/src/vendor/angular-chart.js/angular-chart.js
copy to views/ngXosViews/serviceGrid/src/vendor/angular-chart.js/dist/angular-chart.js
index d6df1cd..4624343 100644
--- a/applications/auto-scale/gui/src/vendor/angular-chart.js/angular-chart.js
+++ b/views/ngXosViews/serviceGrid/src/vendor/angular-chart.js/dist/angular-chart.js
@@ -37,13 +37,13 @@
return angular.module('chart.js', [])
.provider('ChartJs', ChartJsProvider)
.factory('ChartJsFactory', ['ChartJs', '$timeout', ChartJsFactory])
- .directive('chartBase', function (ChartJsFactory) { return new ChartJsFactory(); })
- .directive('chartLine', function (ChartJsFactory) { return new ChartJsFactory('Line'); })
- .directive('chartBar', function (ChartJsFactory) { return new ChartJsFactory('Bar'); })
- .directive('chartRadar', function (ChartJsFactory) { return new ChartJsFactory('Radar'); })
- .directive('chartDoughnut', function (ChartJsFactory) { return new ChartJsFactory('Doughnut'); })
- .directive('chartPie', function (ChartJsFactory) { return new ChartJsFactory('Pie'); })
- .directive('chartPolarArea', function (ChartJsFactory) { return new ChartJsFactory('PolarArea'); });
+ .directive('chartBase', ['ChartJsFactory', function (ChartJsFactory) { return new ChartJsFactory(); }])
+ .directive('chartLine', ['ChartJsFactory', function (ChartJsFactory) { return new ChartJsFactory('Line'); }])
+ .directive('chartBar', ['ChartJsFactory', function (ChartJsFactory) { return new ChartJsFactory('Bar'); }])
+ .directive('chartRadar', ['ChartJsFactory', function (ChartJsFactory) { return new ChartJsFactory('Radar'); }])
+ .directive('chartDoughnut', ['ChartJsFactory', function (ChartJsFactory) { return new ChartJsFactory('Doughnut'); }])
+ .directive('chartPie', ['ChartJsFactory', function (ChartJsFactory) { return new ChartJsFactory('Pie'); }])
+ .directive('chartPolarArea', ['ChartJsFactory', function (ChartJsFactory) { return new ChartJsFactory('PolarArea'); }]);
/**
* Wrapper for chart.js
@@ -137,14 +137,15 @@
// Order of setting "watch" matter
scope.$watch('data', function (newVal, oldVal) {
- if (! newVal || ! newVal.length || (Array.isArray(newVal[0]) && ! newVal[0].length)) return;
+ if (! newVal || ! newVal.length || (Array.isArray(newVal[0]) && ! newVal[0].length)) {
+ destroyChart(chart, scope);
+ return;
+ }
var chartType = type || scope.chartType;
if (! chartType) return;
- if (chart) {
- if (canUpdateChart(newVal, oldVal)) return updateChart(chart, newVal, scope, elem);
- chart.destroy();
- }
+ if (chart && canUpdateChart(newVal, oldVal))
+ return updateChart(chart, newVal, scope, elem);
createChart(chartType);
}, true);
@@ -157,12 +158,11 @@
scope.$watch('chartType', function (newVal, oldVal) {
if (isEmpty(newVal)) return;
if (angular.equals(newVal, oldVal)) return;
- if (chart) chart.destroy();
createChart(newVal);
});
scope.$on('$destroy', function () {
- if (chart) chart.destroy();
+ destroyChart(chart, scope);
});
function resetChart (newVal, oldVal) {
@@ -173,8 +173,6 @@
// chart.update() doesn't work for series and labels
// so we have to re-create the chart entirely
- if (chart) chart.destroy();
-
createChart(chartType);
}
@@ -186,12 +184,16 @@
}
if (! scope.data || ! scope.data.length) return;
scope.getColour = typeof scope.getColour === 'function' ? scope.getColour : getRandomColour;
- scope.colours = getColours(type, scope);
+ var colours = getColours(type, scope);
var cvs = elem[0], ctx = cvs.getContext('2d');
var data = Array.isArray(scope.data[0]) ?
- getDataSets(scope.labels, scope.data, scope.series || [], scope.colours) :
- getData(scope.labels, scope.data, scope.colours);
+ getDataSets(scope.labels, scope.data, scope.series || [], colours) :
+ getData(scope.labels, scope.data, colours);
var options = angular.extend({}, ChartJs.getOptions(type), scope.options);
+
+ // Destroy old chart if it exists to avoid ghost charts issue
+ // https://github.com/jtblin/angular-chart.js/issues/187
+ destroyChart(chart, scope);
chart = new ChartJs.Chart(ctx)[type](data, options);
scope.$emit('create', chart);
@@ -245,13 +247,18 @@
}
function getColours (type, scope) {
+ var notEnoughColours = false;
var colours = angular.copy(scope.colours ||
ChartJs.getOptions(type).colours ||
Chart.defaults.global.colours
);
while (colours.length < scope.data.length) {
colours.push(scope.getColour());
+ notEnoughColours = true;
}
+ // mutate colours in this case as we don't want
+ // the colours to change on each refresh
+ if (notEnoughColours) scope.colours = colours;
return colours.map(convertColour);
}
@@ -358,5 +365,11 @@
var options = angular.extend({}, Chart.defaults.global, ChartJs.getOptions(type), scope.options);
return options.responsive;
}
+
+ function destroyChart(chart, scope) {
+ if(! chart) return;
+ chart.destroy();
+ scope.$emit('destroy', chart);
+ }
}
}));
diff --git a/views/ngXosViews/serviceGrid/src/vendor/angular-chart.js/dist/angular-chart.js.tar.gz b/views/ngXosViews/serviceGrid/src/vendor/angular-chart.js/dist/angular-chart.js.tar.gz
new file mode 100644
index 0000000..8171824
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/angular-chart.js/dist/angular-chart.js.tar.gz
Binary files differ
diff --git a/views/ngXosViews/serviceGrid/src/vendor/angular-chart.js/dist/angular-chart.min.css b/views/ngXosViews/serviceGrid/src/vendor/angular-chart.js/dist/angular-chart.min.css
new file mode 100644
index 0000000..40c1412
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/angular-chart.js/dist/angular-chart.min.css
@@ -0,0 +1,2 @@
+.bar-legend,.chart-legend,.doughnut-legend,.line-legend,.pie-legend,.polararea-legend,.radar-legend{list-style-type:none;margin-top:5px;text-align:center;-webkit-padding-start:0;-moz-padding-start:0;padding-left:0}.bar-legend li,.chart-legend li,.doughnut-legend li,.line-legend li,.pie-legend li,.polararea-legend li,.radar-legend li{display:inline-block;white-space:nowrap;position:relative;margin-bottom:4px;border-radius:5px;padding:2px 8px 2px 28px;font-size:smaller;cursor:default}.bar-legend-icon,.chart-legend-icon,.doughnut-legend-icon,.line-legend-icon,.pie-legend-icon,.polararea-legend-icon,.radar-legend-icon{display:block;position:absolute;left:0;top:0;width:20px;height:20px;border-radius:5px}
+/*# sourceMappingURL=angular-chart.min.css.map */
diff --git a/views/ngXosViews/serviceGrid/src/vendor/angular-chart.js/dist/angular-chart.min.css.map b/views/ngXosViews/serviceGrid/src/vendor/angular-chart.js/dist/angular-chart.min.css.map
new file mode 100644
index 0000000..65db89b
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/angular-chart.js/dist/angular-chart.min.css.map
@@ -0,0 +1 @@
+{"version":3,"sources":["angular-chart.css"],"names":[],"mappings":"AAAc,W,CAAd,a,CAKkB,gB,CAJN,Y,CACC,W,CAEC,iB,CADF,a,CAIV,oB,CACA,c,CACA,iB,CAEA,uB,CAEA,oB,CAEA,c,CAGe,c,CAAjB,gB,CAKqB,mB,CAJN,e,CACC,c,CAEC,oB,CADF,gB,CAIb,oB,CACA,kB,CACA,iB,CACA,iB,CACA,iB,CACA,wB,CACA,iB,CACA,c,CAEiB,gB,CAAnB,kB,CAKuB,qB,CAJN,iB,CACC,gB,CAEC,sB,CADF,kB,CAIf,a,CACA,iB,CACA,M,CACA,K,CACA,U,CACA,W,CACA,iB","file":"angular-chart.min.css","sourcesContent":[".chart-legend,\n.bar-legend,\n.line-legend,\n.pie-legend,\n.radar-legend,\n.polararea-legend,\n.doughnut-legend {\n list-style-type: none;\n margin-top: 5px;\n text-align: center;\n /* NOTE: Browsers automatically add 40px of padding-left to all lists, so we should offset that, otherwise the legend is off-center */\n -webkit-padding-start: 0;\n /* Webkit */\n -moz-padding-start: 0;\n /* Mozilla */\n padding-left: 0;\n /* IE (handles all cases, really, but we should also include the vendor-specific properties just to be safe) */\n}\n.chart-legend li,\n.bar-legend li,\n.line-legend li,\n.pie-legend li,\n.radar-legend li,\n.polararea-legend li,\n.doughnut-legend li {\n display: inline-block;\n white-space: nowrap;\n position: relative;\n margin-bottom: 4px;\n border-radius: 5px;\n padding: 2px 8px 2px 28px;\n font-size: smaller;\n cursor: default;\n}\n.chart-legend-icon,\n.bar-legend-icon,\n.line-legend-icon,\n.pie-legend-icon,\n.radar-legend-icon,\n.polararea-legend-icon,\n.doughnut-legend-icon {\n display: block;\n position: absolute;\n left: 0;\n top: 0;\n width: 20px;\n height: 20px;\n border-radius: 5px;\n}\n"],"sourceRoot":"/source/"}
\ No newline at end of file
diff --git a/views/ngXosViews/serviceGrid/src/vendor/angular-chart.js/dist/angular-chart.min.js b/views/ngXosViews/serviceGrid/src/vendor/angular-chart.js/dist/angular-chart.min.js
new file mode 100644
index 0000000..eca3a1e
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/angular-chart.js/dist/angular-chart.min.js
@@ -0,0 +1,2 @@
+!function(t){"use strict";"object"==typeof exports?module.exports=t("undefined"!=typeof angular?angular:require("angular"),"undefined"!=typeof Chart?Chart:require("chart.js")):"function"==typeof define&&define.amd?define(["angular","chart"],t):t(angular,Chart)}(function(t,e){"use strict";function n(){var n={},r={Chart:e,getOptions:function(e){var r=e&&n[e]||{};return t.extend({},n,r)}};this.setOptions=function(e,r){return r?void(n[e]=t.extend(n[e]||{},r)):(r=e,void(n=t.extend(n,r)))},this.$get=function(){return r}}function r(n,r){function o(t,e){return t&&e&&t.length&&e.length?Array.isArray(t[0])?t.length===e.length&&t.every(function(t,n){return t.length===e[n].length}):e.reduce(i,0)>0?t.length===e.length:!1:!1}function i(t,e){return t+e}function c(e,n,r,a){var o=null;return function(i){var c=n.getPointsAtEvent||n.getBarsAtEvent||n.getSegmentsAtEvent;if(c){var l=c.call(n,i);a!==!1&&t.equals(o,l)!==!1||(o=l,e[r](l,i),e.$apply())}}}function l(r,a){for(var o=!1,i=t.copy(a.colours||n.getOptions(r).colours||e.defaults.global.colours);i.length<a.data.length;)i.push(a.getColour()),o=!0;return o&&(a.colours=i),i.map(u)}function u(t){return"object"==typeof t&&null!==t?t:"string"==typeof t&&"#"===t[0]?f(g(t.substr(1))):s()}function s(){var t=[h(0,255),h(0,255),h(0,255)];return f(t)}function f(t){return{fillColor:d(t,.2),strokeColor:d(t,1),pointColor:d(t,1),pointStrokeColor:"#fff",pointHighlightFill:"#fff",pointHighlightStroke:d(t,.8)}}function h(t,e){return Math.floor(Math.random()*(e-t+1))+t}function d(t,e){return a?"rgb("+t.join(",")+")":"rgba("+t.concat(e).join(",")+")"}function g(t){var e=parseInt(t,16),n=e>>16&255,r=e>>8&255,a=255&e;return[n,r,a]}function p(e,n,r,a){return{labels:e,datasets:n.map(function(e,n){return t.extend({},a[n],{label:r[n],data:e})})}}function v(e,n,r){return e.map(function(e,a){return t.extend({},r[a],{label:e,value:n[a],color:r[a].strokeColor,highlight:r[a].pointHighlightStroke})})}function y(t,e){var n=t.parent(),r=n.find("chart-legend"),a="<chart-legend>"+e.generateLegend()+"</chart-legend>";r.length?r.replaceWith(a):n.append(a)}function C(t,e,n,r){Array.isArray(n.data[0])?t.datasets.forEach(function(t,n){(t.points||t.bars).forEach(function(t,r){t.value=e[n][r]})}):t.segments.forEach(function(t,n){t.value=e[n]}),t.update(),n.$emit("update",t),n.legend&&"false"!==n.legend&&y(r,t)}function b(t){return!t||Array.isArray(t)&&!t.length||"object"==typeof t&&!Object.keys(t).length}function m(r,a){var o=t.extend({},e.defaults.global,n.getOptions(r),a.options);return o.responsive}function w(t,e){t&&(t.destroy(),e.$emit("destroy",t))}return function(e){return{restrict:"CA",scope:{data:"=?",labels:"=?",options:"=?",series:"=?",colours:"=?",getColour:"=?",chartType:"=",legend:"@",click:"=?",hover:"=?",chartData:"=?",chartLabels:"=?",chartOptions:"=?",chartSeries:"=?",chartColours:"=?",chartLegend:"@",chartClick:"=?",chartHover:"=?"},link:function(i,u){function f(t,e){i.$watch(t,function(t){"undefined"!=typeof t&&(i[e]=t)})}function h(n,r){if(!b(n)&&!t.equals(n,r)){var a=e||i.chartType;a&&d(a)}}function d(e){if(m(e,i)&&0===u[0].clientHeight&&0===k.clientHeight)return r(function(){d(e)},50,!1);if(i.data&&i.data.length){i.getColour="function"==typeof i.getColour?i.getColour:s;var a=l(e,i),o=u[0],f=o.getContext("2d"),h=Array.isArray(i.data[0])?p(i.labels,i.data,i.series||[],a):v(i.labels,i.data,a),g=t.extend({},n.getOptions(e),i.options);w(A,i),A=new n.Chart(f)[e](h,g),i.$emit("create",A),o.onclick=i.click?c(i,A,"click",!1):t.noop,o.onmousemove=i.hover?c(i,A,"hover",!0):t.noop,i.legend&&"false"!==i.legend&&y(u,A)}}function g(t){if("undefined"!=typeof console&&"test"!==n.getOptions().env){var e="function"==typeof console.warn?console.warn:console.log;i[t]&&e.call(console,'"%s" is deprecated and will be removed in a future version. Please use "chart-%s" instead.',t,t)}}var A,k=document.createElement("div");k.className="chart-container",u.replaceWith(k),k.appendChild(u[0]),a&&window.G_vmlCanvasManager.initElement(u[0]),["data","labels","options","series","colours","legend","click","hover"].forEach(g),f("chartData","data"),f("chartLabels","labels"),f("chartOptions","options"),f("chartSeries","series"),f("chartColours","colours"),f("chartLegend","legend"),f("chartClick","click"),f("chartHover","hover"),i.$watch("data",function(t,n){if(!t||!t.length||Array.isArray(t[0])&&!t[0].length)return void w(A,i);var r=e||i.chartType;if(r)return A&&o(t,n)?C(A,t,i,u):void d(r)},!0),i.$watch("series",h,!0),i.$watch("labels",h,!0),i.$watch("options",h,!0),i.$watch("colours",h,!0),i.$watch("chartType",function(e,n){b(e)||t.equals(e,n)||d(e)}),i.$on("$destroy",function(){w(A,i)})}}}}e.defaults.global.responsive=!0,e.defaults.global.multiTooltipTemplate="<%if (datasetLabel){%><%=datasetLabel%>: <%}%><%= value %>",e.defaults.global.colours=["#97BBCD","#DCDCDC","#F7464A","#46BFBD","#FDB45C","#949FB1","#4D5360"];var a="object"==typeof window.G_vmlCanvasManager&&null!==window.G_vmlCanvasManager&&"function"==typeof window.G_vmlCanvasManager.initElement;return a&&(e.defaults.global.animation=!1),t.module("chart.js",[]).provider("ChartJs",n).factory("ChartJsFactory",["ChartJs","$timeout",r]).directive("chartBase",["ChartJsFactory",function(t){return new t}]).directive("chartLine",["ChartJsFactory",function(t){return new t("Line")}]).directive("chartBar",["ChartJsFactory",function(t){return new t("Bar")}]).directive("chartRadar",["ChartJsFactory",function(t){return new t("Radar")}]).directive("chartDoughnut",["ChartJsFactory",function(t){return new t("Doughnut")}]).directive("chartPie",["ChartJsFactory",function(t){return new t("Pie")}]).directive("chartPolarArea",["ChartJsFactory",function(t){return new t("PolarArea")}])});
+//# sourceMappingURL=angular-chart.min.js.map
diff --git a/views/ngXosViews/serviceGrid/src/vendor/angular-chart.js/dist/angular-chart.min.js.map b/views/ngXosViews/serviceGrid/src/vendor/angular-chart.js/dist/angular-chart.min.js.map
new file mode 100644
index 0000000..6d5826f
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/angular-chart.js/dist/angular-chart.min.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["angular-chart.min.js"],"names":["factory","exports","module","angular","require","Chart","define","amd","ChartJsProvider","options","ChartJs","getOptions","type","typeOptions","extend","this","setOptions","customOptions","$get","ChartJsFactory","$timeout","canUpdateChart","newVal","oldVal","length","Array","isArray","every","element","index","reduce","sum","carry","val","getEventHandler","scope","chart","action","triggerOnlyOnChange","lastState","evt","atEvent","getPointsAtEvent","getBarsAtEvent","getSegmentsAtEvent","activePoints","call","equals","$apply","getColours","notEnoughColours","colours","copy","defaults","global","data","push","getColour","map","convertColour","colour","hexToRgb","substr","getRandomColour","getRandomInt","fillColor","rgba","strokeColor","pointColor","pointStrokeColor","pointHighlightFill","pointHighlightStroke","min","max","Math","floor","random","alpha","usingExcanvas","join","concat","hex","bigint","parseInt","r","g","b","getDataSets","labels","series","datasets","item","i","label","getData","value","color","highlight","setLegend","elem","$parent","parent","$oldLegend","find","legend","generateLegend","replaceWith","append","updateChart","values","forEach","dataset","points","bars","dataItem","j","segments","segment","update","$emit","isEmpty","Object","keys","isResponsive","responsive","destroyChart","destroy","restrict","chartType","click","hover","chartData","chartLabels","chartOptions","chartSeries","chartColours","chartLegend","chartClick","chartHover","link","aliasVar","fromName","toName","$watch","resetChart","createChart","clientHeight","container","cvs","ctx","getContext","onclick","noop","onmousemove","deprecated","attr","console","env","warn","log","document","createElement","className","appendChild","window","G_vmlCanvasManager","initElement","$on","multiTooltipTemplate","animation","provider","directive"],"mappings":"CAAC,SAAUA,GACT,YACuB,iBAAZC,SAETC,OAAOD,QAAUD,EACI,mBAAZG,SAA0BA,QAAUC,QAAQ,WAClC,mBAAVC,OAAwBA,MAAQD,QAAQ,aACrB,kBAAXE,SAAyBA,OAAOC,IAEjDD,QAAQ,UAAW,SAAUN,GAG7BA,EAAQG,QAASE,QAEnB,SAAUF,EAASE,GACnB,YAyCA,SAASG,KACP,GAAIC,MACAC,GACFL,MAAOA,EACPM,WAAY,SAAUC,GACpB,GAAIC,GAAcD,GAAQH,EAAQG,MAClC,OAAOT,GAAQW,UAAWL,EAASI,IAOvCE,MAAKC,WAAa,SAAUJ,EAAMK,GAEhC,MAAMA,QAMNR,EAAQG,GAAQT,EAAQW,OAAOL,EAAQG,OAAaK,KALlDA,EAAgBL,OAChBH,EAAUN,EAAQW,OAAOL,EAASQ,MAOtCF,KAAKG,KAAO,WACV,MAAOR,IAIX,QAASS,GAAgBT,EAASU,GAsIhC,QAASC,GAAgBC,EAAQC,GAC/B,MAAID,IAAUC,GAAUD,EAAOE,QAAUD,EAAOC,OACvCC,MAAMC,QAAQJ,EAAO,IAC5BA,EAAOE,SAAWD,EAAOC,QAAUF,EAAOK,MAAM,SAAUC,EAASC,GACjE,MAAOD,GAAQJ,SAAWD,EAAOM,GAAOL,SACxCD,EAAOO,OAAOC,EAAK,GAAK,EAAIT,EAAOE,SAAWD,EAAOC,QAAS,GAE3D,EAGT,QAASO,GAAKC,EAA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SAAUxJ,GAAkB,MAAO,IAAIA,GAAe,YACjGwJ,UAAU,iBAAkB,iBAAkB,SAAUxJ,GAAkB,MAAO,IAAIA,GAAe,eACpGwJ,UAAU,YAAa,iBAAkB,SAAUxJ,GAAkB,MAAO,IAAIA,GAAe,UAC/FwJ,UAAU,kBAAmB,iBAAkB,SAAUxJ,GAAkB,MAAO,IAAIA,GAAe","file":"angular-chart.min.js","sourcesContent":["(function (factory) {\n 'use strict';\n if (typeof exports === 'object') {\n // Node/CommonJS\n module.exports = factory(\n typeof angular !== 'undefined' ? angular : require('angular'),\n typeof Chart !== 'undefined' ? Chart : require('chart.js'));\n } else if (typeof define === 'function' && define.amd) {\n // AMD. Register as an anonymous module.\n define(['angular', 'chart'], factory);\n } else {\n // Browser globals\n factory(angular, Chart);\n }\n}(function (angular, Chart) {\n 'use strict';\n\n Chart.defaults.global.responsive = true;\n Chart.defaults.global.multiTooltipTemplate = '<%if (datasetLabel){%><%=datasetLabel%>: <%}%><%= value %>';\n\n Chart.defaults.global.colours = [\n '#97BBCD', // blue\n '#DCDCDC', // light grey\n '#F7464A', // red\n '#46BFBD', // green\n '#FDB45C', // yellow\n '#949FB1', // grey\n '#4D5360' // dark grey\n ];\n\n var usingExcanvas = typeof window.G_vmlCanvasManager === 'object' &&\n window.G_vmlCanvasManager !== null &&\n typeof window.G_vmlCanvasManager.initElement === 'function';\n\n if (usingExcanvas) Chart.defaults.global.animation = false;\n\n return angular.module('chart.js', [])\n .provider('ChartJs', ChartJsProvider)\n .factory('ChartJsFactory', ['ChartJs', '$timeout', ChartJsFactory])\n .directive('chartBase', ['ChartJsFactory', function (ChartJsFactory) { return new ChartJsFactory(); }])\n .directive('chartLine', ['ChartJsFactory', function (ChartJsFactory) { return new ChartJsFactory('Line'); }])\n .directive('chartBar', ['ChartJsFactory', function (ChartJsFactory) { return new ChartJsFactory('Bar'); }])\n .directive('chartRadar', ['ChartJsFactory', function (ChartJsFactory) { return new ChartJsFactory('Radar'); }])\n .directive('chartDoughnut', ['ChartJsFactory', function (ChartJsFactory) { return new ChartJsFactory('Doughnut'); }])\n .directive('chartPie', ['ChartJsFactory', function (ChartJsFactory) { return new ChartJsFactory('Pie'); }])\n .directive('chartPolarArea', ['ChartJsFactory', function (ChartJsFactory) { return new ChartJsFactory('PolarArea'); }]);\n\n /**\n * Wrapper for chart.js\n * Allows configuring chart js using the provider\n *\n * angular.module('myModule', ['chart.js']).config(function(ChartJsProvider) {\n * ChartJsProvider.setOptions({ responsive: true });\n * ChartJsProvider.setOptions('Line', { responsive: false });\n * })))\n */\n function ChartJsProvider () {\n var options = {};\n var ChartJs = {\n Chart: Chart,\n getOptions: function (type) {\n var typeOptions = type && options[type] || {};\n return angular.extend({}, options, typeOptions);\n }\n };\n\n /**\n * Allow to set global options during configuration\n */\n this.setOptions = function (type, customOptions) {\n // If no type was specified set option for the global object\n if (! customOptions) {\n customOptions = type;\n options = angular.extend(options, customOptions);\n return;\n }\n // Set options for the specific chart\n options[type] = angular.extend(options[type] || {}, customOptions);\n };\n\n this.$get = function () {\n return ChartJs;\n };\n }\n\n function ChartJsFactory (ChartJs, $timeout) {\n return function chart (type) {\n return {\n restrict: 'CA',\n scope: {\n data: '=?',\n labels: '=?',\n options: '=?',\n series: '=?',\n colours: '=?',\n getColour: '=?',\n chartType: '=',\n legend: '@',\n click: '=?',\n hover: '=?',\n\n chartData: '=?',\n chartLabels: '=?',\n chartOptions: '=?',\n chartSeries: '=?',\n chartColours: '=?',\n chartLegend: '@',\n chartClick: '=?',\n chartHover: '=?'\n },\n link: function (scope, elem/*, attrs */) {\n var chart, container = document.createElement('div');\n container.className = 'chart-container';\n elem.replaceWith(container);\n container.appendChild(elem[0]);\n\n if (usingExcanvas) window.G_vmlCanvasManager.initElement(elem[0]);\n\n ['data', 'labels', 'options', 'series', 'colours', 'legend', 'click', 'hover'].forEach(deprecated);\n function aliasVar (fromName, toName) {\n scope.$watch(fromName, function (newVal) {\n if (typeof newVal === 'undefined') return;\n scope[toName] = newVal;\n });\n }\n /* provide backward compatibility to \"old\" directive names, by\n * having an alias point from the new names to the old names. */\n aliasVar('chartData', 'data');\n aliasVar('chartLabels', 'labels');\n aliasVar('chartOptions', 'options');\n aliasVar('chartSeries', 'series');\n aliasVar('chartColours', 'colours');\n aliasVar('chartLegend', 'legend');\n aliasVar('chartClick', 'click');\n aliasVar('chartHover', 'hover');\n\n // Order of setting \"watch\" matter\n\n scope.$watch('data', function (newVal, oldVal) {\n if (! newVal || ! newVal.length || (Array.isArray(newVal[0]) && ! newVal[0].length)) {\n destroyChart(chart, scope);\n return;\n }\n var chartType = type || scope.chartType;\n if (! chartType) return;\n\n if (chart && canUpdateChart(newVal, oldVal))\n return updateChart(chart, newVal, scope, elem);\n\n createChart(chartType);\n }, true);\n\n scope.$watch('series', resetChart, true);\n scope.$watch('labels', resetChart, true);\n scope.$watch('options', resetChart, true);\n scope.$watch('colours', resetChart, true);\n\n scope.$watch('chartType', function (newVal, oldVal) {\n if (isEmpty(newVal)) return;\n if (angular.equals(newVal, oldVal)) return;\n createChart(newVal);\n });\n\n scope.$on('$destroy', function () {\n destroyChart(chart, scope);\n });\n\n function resetChart (newVal, oldVal) {\n if (isEmpty(newVal)) return;\n if (angular.equals(newVal, oldVal)) return;\n var chartType = type || scope.chartType;\n if (! chartType) return;\n\n // chart.update() doesn't work for series and labels\n // so we have to re-create the chart entirely\n createChart(chartType);\n }\n\n function createChart (type) {\n if (isResponsive(type, scope) && elem[0].clientHeight === 0 && container.clientHeight === 0) {\n return $timeout(function () {\n createChart(type);\n }, 50, false);\n }\n if (! scope.data || ! scope.data.length) return;\n scope.getColour = typeof scope.getColour === 'function' ? scope.getColour : getRandomColour;\n var colours = getColours(type, scope);\n var cvs = elem[0], ctx = cvs.getContext('2d');\n var data = Array.isArray(scope.data[0]) ?\n getDataSets(scope.labels, scope.data, scope.series || [], colours) :\n getData(scope.labels, scope.data, colours);\n var options = angular.extend({}, ChartJs.getOptions(type), scope.options);\n\n // Destroy old chart if it exists to avoid ghost charts issue\n // https://github.com/jtblin/angular-chart.js/issues/187\n destroyChart(chart, scope);\n chart = new ChartJs.Chart(ctx)[type](data, options);\n scope.$emit('create', chart);\n\n // Bind events\n cvs.onclick = scope.click ? getEventHandler(scope, chart, 'click', false) : angular.noop;\n cvs.onmousemove = scope.hover ? getEventHandler(scope, chart, 'hover', true) : angular.noop;\n\n if (scope.legend && scope.legend !== 'false') setLegend(elem, chart);\n }\n\n function deprecated (attr) {\n if (typeof console !== 'undefined' && ChartJs.getOptions().env !== 'test') {\n var warn = typeof console.warn === 'function' ? console.warn : console.log;\n if (!! scope[attr]) {\n warn.call(console, '\"%s\" is deprecated and will be removed in a future version. ' +\n 'Please use \"chart-%s\" instead.', attr, attr);\n }\n }\n }\n }\n };\n };\n\n function canUpdateChart (newVal, oldVal) {\n if (newVal && oldVal && newVal.length && oldVal.length) {\n return Array.isArray(newVal[0]) ?\n newVal.length === oldVal.length && newVal.every(function (element, index) {\n return element.length === oldVal[index].length; }) :\n oldVal.reduce(sum, 0) > 0 ? newVal.length === oldVal.length : false;\n }\n return false;\n }\n\n function sum (carry, val) {\n return carry + val;\n }\n\n function getEventHandler (scope, chart, action, triggerOnlyOnChange) {\n var lastState = null;\n return function (evt) {\n var atEvent = chart.getPointsAtEvent || chart.getBarsAtEvent || chart.getSegmentsAtEvent;\n if (atEvent) {\n var activePoints = atEvent.call(chart, evt);\n if (triggerOnlyOnChange === false || angular.equals(lastState, activePoints) === false) {\n lastState = activePoints;\n scope[action](activePoints, evt);\n scope.$apply();\n }\n }\n };\n }\n\n function getColours (type, scope) {\n var notEnoughColours = false;\n var colours = angular.copy(scope.colours ||\n ChartJs.getOptions(type).colours ||\n Chart.defaults.global.colours\n );\n while (colours.length < scope.data.length) {\n colours.push(scope.getColour());\n notEnoughColours = true;\n }\n // mutate colours in this case as we don't want\n // the colours to change on each refresh\n if (notEnoughColours) scope.colours = colours;\n return colours.map(convertColour);\n }\n\n function convertColour (colour) {\n if (typeof colour === 'object' && colour !== null) return colour;\n if (typeof colour === 'string' && colour[0] === '#') return getColour(hexToRgb(colour.substr(1)));\n return getRandomColour();\n }\n\n function getRandomColour () {\n var colour = [getRandomInt(0, 255), getRandomInt(0, 255), getRandomInt(0, 255)];\n return getColour(colour);\n }\n\n function getColour (colour) {\n return {\n fillColor: rgba(colour, 0.2),\n strokeColor: rgba(colour, 1),\n pointColor: rgba(colour, 1),\n pointStrokeColor: '#fff',\n pointHighlightFill: '#fff',\n pointHighlightStroke: rgba(colour, 0.8)\n };\n }\n\n function getRandomInt (min, max) {\n return Math.floor(Math.random() * (max - min + 1)) + min;\n }\n\n function rgba (colour, alpha) {\n if (usingExcanvas) {\n // rgba not supported by IE8\n return 'rgb(' + colour.join(',') + ')';\n } else {\n return 'rgba(' + colour.concat(alpha).join(',') + ')';\n }\n }\n\n // Credit: http://stackoverflow.com/a/11508164/1190235\n function hexToRgb (hex) {\n var bigint = parseInt(hex, 16),\n r = (bigint >> 16) & 255,\n g = (bigint >> 8) & 255,\n b = bigint & 255;\n\n return [r, g, b];\n }\n\n function getDataSets (labels, data, series, colours) {\n return {\n labels: labels,\n datasets: data.map(function (item, i) {\n return angular.extend({}, colours[i], {\n label: series[i],\n data: item\n });\n })\n };\n }\n\n function getData (labels, data, colours) {\n return labels.map(function (label, i) {\n return angular.extend({}, colours[i], {\n label: label,\n value: data[i],\n color: colours[i].strokeColor,\n highlight: colours[i].pointHighlightStroke\n });\n });\n }\n\n function setLegend (elem, chart) {\n var $parent = elem.parent(),\n $oldLegend = $parent.find('chart-legend'),\n legend = '<chart-legend>' + chart.generateLegend() + '</chart-legend>';\n if ($oldLegend.length) $oldLegend.replaceWith(legend);\n else $parent.append(legend);\n }\n\n function updateChart (chart, values, scope, elem) {\n if (Array.isArray(scope.data[0])) {\n chart.datasets.forEach(function (dataset, i) {\n (dataset.points || dataset.bars).forEach(function (dataItem, j) {\n dataItem.value = values[i][j];\n });\n });\n } else {\n chart.segments.forEach(function (segment, i) {\n segment.value = values[i];\n });\n }\n chart.update();\n scope.$emit('update', chart);\n if (scope.legend && scope.legend !== 'false') setLegend(elem, chart);\n }\n\n function isEmpty (value) {\n return ! value ||\n (Array.isArray(value) && ! value.length) ||\n (typeof value === 'object' && ! Object.keys(value).length);\n }\n\n function isResponsive (type, scope) {\n var options = angular.extend({}, Chart.defaults.global, ChartJs.getOptions(type), scope.options);\n return options.responsive;\n }\n\n function destroyChart(chart, scope) {\n if(! chart) return;\n chart.destroy();\n scope.$emit('destroy', chart);\n }\n }\n}));\n"],"sourceRoot":"/source/"}
\ No newline at end of file
diff --git a/applications/auto-scale/gui/src/vendor/angular-chart.js/gulpfile.js b/views/ngXosViews/serviceGrid/src/vendor/angular-chart.js/gulpfile.js
similarity index 96%
rename from applications/auto-scale/gui/src/vendor/angular-chart.js/gulpfile.js
rename to views/ngXosViews/serviceGrid/src/vendor/angular-chart.js/gulpfile.js
index d32d007..492de9a 100644
--- a/applications/auto-scale/gui/src/vendor/angular-chart.js/gulpfile.js
+++ b/views/ngXosViews/serviceGrid/src/vendor/angular-chart.js/gulpfile.js
@@ -19,7 +19,6 @@
var shell = require('gulp-shell');
var rename = require('gulp-rename');
var sequence = require('gulp-sequence');
- var ngAnnotate = require('gulp-ng-annotate');
var rimraf = require('gulp-rimraf');
var istanbul = require('gulp-istanbul');
var istanbulReport = require('gulp-istanbul-report');
@@ -70,7 +69,7 @@
hooks: 'mocha-phantomjs-istanbul',
coverageFile: 'coverage/coverage.json'
},
- reporter: 'spec'
+ reporter: process.env.REPORTER || 'spec'
}));
});
@@ -90,14 +89,12 @@
gulp.task('bower', function () {
return gulp.src('./angular-chart.js')
- .pipe(ngAnnotate({ single_quotes: true }))
.pipe(gulp.dest('./dist'));
});
gulp.task('js', ['lint', 'style', 'bower'], function () {
return gulp.src('./angular-chart.js')
.pipe(rename('angular-chart.min.js'))
- .pipe(ngAnnotate({ single_quotes: true }))
.pipe(sourcemaps.init())
.pipe(uglify())
.pipe(sourcemaps.write('./'))
diff --git a/applications/auto-scale/gui/src/vendor/angular-chart.js/package.json b/views/ngXosViews/serviceGrid/src/vendor/angular-chart.js/package.json
similarity index 75%
rename from applications/auto-scale/gui/src/vendor/angular-chart.js/package.json
rename to views/ngXosViews/serviceGrid/src/vendor/angular-chart.js/package.json
index 650c9c7..70c344b 100644
--- a/applications/auto-scale/gui/src/vendor/angular-chart.js/package.json
+++ b/views/ngXosViews/serviceGrid/src/vendor/angular-chart.js/package.json
@@ -1,12 +1,14 @@
{
"name": "angular-chart.js",
- "version": "0.8.8",
+ "version": "0.10.2",
"description": "An angular.js wrapper for Chart.js",
"main": "dist/angular-chart.js",
"directories": {
"example": "examples"
},
"scripts": {
+ "codeclimate": "./node_modules/codeclimate-test-reporter/bin/codeclimate.js < coverage/lcov.info",
+ "docker": "docker build -t angular-chart.js . && docker run --rm -it -v `pwd`/coverage:/src/coverage angular-chart.js",
"test": "gulp check"
},
"author": "Jerome Touffe-Blin <jtblin@gmail.com>",
@@ -18,7 +20,7 @@
"devDependencies": {
"chai": "^3.4.1",
"chai-string": "^1.1.1",
- "codeclimate-test-reporter": "^0.1.0",
+ "codeclimate-test-reporter": "^0.3.1",
"cp": "^0.2.0",
"gm": "^1.17.0",
"gulp": "^3.9.0",
@@ -31,8 +33,7 @@
"gulp-jscs": "^3.0.2",
"gulp-jshint": "^1.9.2",
"gulp-less": "^3.0.3",
- "gulp-mocha-phantomjs": "^0.10.1",
- "gulp-ng-annotate": "^1.1.0",
+ "gulp-mocha-phantomjs": "^0.11.0",
"gulp-rename": "^1.2.0",
"gulp-rimraf": "^0.2.0",
"gulp-sequence": "^0.4.1",
@@ -50,11 +51,11 @@
"sinon-chai": "^2.7.0",
"testatic": "^0.1.0",
"tmp-sync": "^1.1.0",
- "webpack": "^1.12.0",
- "webshot": "^0.16.0"
+ "webpack": "^1.13.0",
+ "webshot": "^0.18.0"
},
"dependencies": {
- "angular": "^1.4.5",
- "chart.js": "^1.0.2"
+ "angular": "1.x",
+ "chart.js": "^1.1.1"
}
}
diff --git a/views/ngXosViews/serviceGrid/src/vendor/angular-cookies/.bower.json b/views/ngXosViews/serviceGrid/src/vendor/angular-cookies/.bower.json
new file mode 100644
index 0000000..152e2f9
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/angular-cookies/.bower.json
@@ -0,0 +1,19 @@
+{
+ "name": "angular-cookies",
+ "version": "1.4.7",
+ "main": "./angular-cookies.js",
+ "ignore": [],
+ "dependencies": {
+ "angular": "1.4.7"
+ },
+ "homepage": "https://github.com/angular/bower-angular-cookies",
+ "_release": "1.4.7",
+ "_resolution": {
+ "type": "version",
+ "tag": "v1.4.7",
+ "commit": "083c164d49ab007e7725b77b9f46095679db010f"
+ },
+ "_source": "https://github.com/angular/bower-angular-cookies.git",
+ "_target": "1.4.7",
+ "_originalSource": "angular-cookies"
+}
\ No newline at end of file
diff --git a/views/ngXosViews/serviceGrid/src/vendor/angular-cookies/README.md b/views/ngXosViews/serviceGrid/src/vendor/angular-cookies/README.md
new file mode 100644
index 0000000..7b190d3
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/angular-cookies/README.md
@@ -0,0 +1,68 @@
+# packaged angular-cookies
+
+This repo is for distribution on `npm` and `bower`. The source for this module is in the
+[main AngularJS repo](https://github.com/angular/angular.js/tree/master/src/ngCookies).
+Please file issues and pull requests against that repo.
+
+## Install
+
+You can install this package either with `npm` or with `bower`.
+
+### npm
+
+```shell
+npm install angular-cookies
+```
+
+Then add `ngCookies` as a dependency for your app:
+
+```javascript
+angular.module('myApp', [require('angular-cookies')]);
+```
+
+### bower
+
+```shell
+bower install angular-cookies
+```
+
+Add a `<script>` to your `index.html`:
+
+```html
+<script src="/bower_components/angular-cookies/angular-cookies.js"></script>
+```
+
+Then add `ngCookies` as a dependency for your app:
+
+```javascript
+angular.module('myApp', ['ngCookies']);
+```
+
+## Documentation
+
+Documentation is available on the
+[AngularJS docs site](http://docs.angularjs.org/api/ngCookies).
+
+## License
+
+The MIT License
+
+Copyright (c) 2010-2015 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.
diff --git a/views/ngXosViews/serviceGrid/src/vendor/angular-cookies/angular-cookies.js b/views/ngXosViews/serviceGrid/src/vendor/angular-cookies/angular-cookies.js
new file mode 100644
index 0000000..3eabd43
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/angular-cookies/angular-cookies.js
@@ -0,0 +1,321 @@
+/**
+ * @license AngularJS v1.4.7
+ * (c) 2010-2015 Google, Inc. http://angularjs.org
+ * License: MIT
+ */
+(function(window, angular, undefined) {'use strict';
+
+/**
+ * @ngdoc module
+ * @name ngCookies
+ * @description
+ *
+ * # ngCookies
+ *
+ * The `ngCookies` module provides a convenient wrapper for reading and writing browser cookies.
+ *
+ *
+ * <div doc-module-components="ngCookies"></div>
+ *
+ * See {@link ngCookies.$cookies `$cookies`} for usage.
+ */
+
+
+angular.module('ngCookies', ['ng']).
+ /**
+ * @ngdoc provider
+ * @name $cookiesProvider
+ * @description
+ * Use `$cookiesProvider` to change the default behavior of the {@link ngCookies.$cookies $cookies} service.
+ * */
+ provider('$cookies', [function $CookiesProvider() {
+ /**
+ * @ngdoc property
+ * @name $cookiesProvider#defaults
+ * @description
+ *
+ * Object containing default options to pass when setting cookies.
+ *
+ * The object may have following properties:
+ *
+ * - **path** - `{string}` - The cookie will be available only for this path and its
+ * sub-paths. By default, this would be the URL that appears in your base tag.
+ * - **domain** - `{string}` - The cookie will be available only for this domain and
+ * its sub-domains. For obvious security reasons the user agent will not accept the
+ * cookie if the current domain is not a sub domain or equals to the requested domain.
+ * - **expires** - `{string|Date}` - String of the form "Wdy, DD Mon YYYY HH:MM:SS GMT"
+ * or a Date object indicating the exact date/time this cookie will expire.
+ * - **secure** - `{boolean}` - The cookie will be available only in secured connection.
+ *
+ * Note: by default the address that appears in your `<base>` tag will be used as path.
+ * This is important so that cookies will be visible for all routes in case html5mode is enabled
+ *
+ **/
+ var defaults = this.defaults = {};
+
+ function calcOptions(options) {
+ return options ? angular.extend({}, defaults, options) : defaults;
+ }
+
+ /**
+ * @ngdoc service
+ * @name $cookies
+ *
+ * @description
+ * Provides read/write access to browser's cookies.
+ *
+ * <div class="alert alert-info">
+ * Up until Angular 1.3, `$cookies` exposed properties that represented the
+ * current browser cookie values. In version 1.4, this behavior has changed, and
+ * `$cookies` now provides a standard api of getters, setters etc.
+ * </div>
+ *
+ * Requires the {@link ngCookies `ngCookies`} module to be installed.
+ *
+ * @example
+ *
+ * ```js
+ * angular.module('cookiesExample', ['ngCookies'])
+ * .controller('ExampleController', ['$cookies', function($cookies) {
+ * // Retrieving a cookie
+ * var favoriteCookie = $cookies.get('myFavorite');
+ * // Setting a cookie
+ * $cookies.put('myFavorite', 'oatmeal');
+ * }]);
+ * ```
+ */
+ this.$get = ['$$cookieReader', '$$cookieWriter', function($$cookieReader, $$cookieWriter) {
+ return {
+ /**
+ * @ngdoc method
+ * @name $cookies#get
+ *
+ * @description
+ * Returns the value of given cookie key
+ *
+ * @param {string} key Id to use for lookup.
+ * @returns {string} Raw cookie value.
+ */
+ get: function(key) {
+ return $$cookieReader()[key];
+ },
+
+ /**
+ * @ngdoc method
+ * @name $cookies#getObject
+ *
+ * @description
+ * Returns the deserialized value of given cookie key
+ *
+ * @param {string} key Id to use for lookup.
+ * @returns {Object} Deserialized cookie value.
+ */
+ getObject: function(key) {
+ var value = this.get(key);
+ return value ? angular.fromJson(value) : value;
+ },
+
+ /**
+ * @ngdoc method
+ * @name $cookies#getAll
+ *
+ * @description
+ * Returns a key value object with all the cookies
+ *
+ * @returns {Object} All cookies
+ */
+ getAll: function() {
+ return $$cookieReader();
+ },
+
+ /**
+ * @ngdoc method
+ * @name $cookies#put
+ *
+ * @description
+ * Sets a value for given cookie key
+ *
+ * @param {string} key Id for the `value`.
+ * @param {string} value Raw value to be stored.
+ * @param {Object=} options Options object.
+ * See {@link ngCookies.$cookiesProvider#defaults $cookiesProvider.defaults}
+ */
+ put: function(key, value, options) {
+ $$cookieWriter(key, value, calcOptions(options));
+ },
+
+ /**
+ * @ngdoc method
+ * @name $cookies#putObject
+ *
+ * @description
+ * Serializes and sets a value for given cookie key
+ *
+ * @param {string} key Id for the `value`.
+ * @param {Object} value Value to be stored.
+ * @param {Object=} options Options object.
+ * See {@link ngCookies.$cookiesProvider#defaults $cookiesProvider.defaults}
+ */
+ putObject: function(key, value, options) {
+ this.put(key, angular.toJson(value), options);
+ },
+
+ /**
+ * @ngdoc method
+ * @name $cookies#remove
+ *
+ * @description
+ * Remove given cookie
+ *
+ * @param {string} key Id of the key-value pair to delete.
+ * @param {Object=} options Options object.
+ * See {@link ngCookies.$cookiesProvider#defaults $cookiesProvider.defaults}
+ */
+ remove: function(key, options) {
+ $$cookieWriter(key, undefined, calcOptions(options));
+ }
+ };
+ }];
+ }]);
+
+angular.module('ngCookies').
+/**
+ * @ngdoc service
+ * @name $cookieStore
+ * @deprecated
+ * @requires $cookies
+ *
+ * @description
+ * Provides a key-value (string-object) storage, that is backed by session cookies.
+ * Objects put or retrieved from this storage are automatically serialized or
+ * deserialized by angular's toJson/fromJson.
+ *
+ * Requires the {@link ngCookies `ngCookies`} module to be installed.
+ *
+ * <div class="alert alert-danger">
+ * **Note:** The $cookieStore service is **deprecated**.
+ * Please use the {@link ngCookies.$cookies `$cookies`} service instead.
+ * </div>
+ *
+ * @example
+ *
+ * ```js
+ * angular.module('cookieStoreExample', ['ngCookies'])
+ * .controller('ExampleController', ['$cookieStore', function($cookieStore) {
+ * // Put cookie
+ * $cookieStore.put('myFavorite','oatmeal');
+ * // Get cookie
+ * var favoriteCookie = $cookieStore.get('myFavorite');
+ * // Removing a cookie
+ * $cookieStore.remove('myFavorite');
+ * }]);
+ * ```
+ */
+ factory('$cookieStore', ['$cookies', function($cookies) {
+
+ return {
+ /**
+ * @ngdoc method
+ * @name $cookieStore#get
+ *
+ * @description
+ * Returns the value of given cookie key
+ *
+ * @param {string} key Id to use for lookup.
+ * @returns {Object} Deserialized cookie value, undefined if the cookie does not exist.
+ */
+ get: function(key) {
+ return $cookies.getObject(key);
+ },
+
+ /**
+ * @ngdoc method
+ * @name $cookieStore#put
+ *
+ * @description
+ * Sets a value for given cookie key
+ *
+ * @param {string} key Id for the `value`.
+ * @param {Object} value Value to be stored.
+ */
+ put: function(key, value) {
+ $cookies.putObject(key, value);
+ },
+
+ /**
+ * @ngdoc method
+ * @name $cookieStore#remove
+ *
+ * @description
+ * Remove given cookie
+ *
+ * @param {string} key Id of the key-value pair to delete.
+ */
+ remove: function(key) {
+ $cookies.remove(key);
+ }
+ };
+
+ }]);
+
+/**
+ * @name $$cookieWriter
+ * @requires $document
+ *
+ * @description
+ * This is a private service for writing cookies
+ *
+ * @param {string} name Cookie name
+ * @param {string=} value Cookie value (if undefined, cookie will be deleted)
+ * @param {Object=} options Object with options that need to be stored for the cookie.
+ */
+function $$CookieWriter($document, $log, $browser) {
+ var cookiePath = $browser.baseHref();
+ var rawDocument = $document[0];
+
+ function buildCookieString(name, value, options) {
+ var path, expires;
+ options = options || {};
+ expires = options.expires;
+ path = angular.isDefined(options.path) ? options.path : cookiePath;
+ if (angular.isUndefined(value)) {
+ expires = 'Thu, 01 Jan 1970 00:00:00 GMT';
+ value = '';
+ }
+ if (angular.isString(expires)) {
+ expires = new Date(expires);
+ }
+
+ var str = encodeURIComponent(name) + '=' + encodeURIComponent(value);
+ str += path ? ';path=' + path : '';
+ str += options.domain ? ';domain=' + options.domain : '';
+ str += expires ? ';expires=' + expires.toUTCString() : '';
+ str += options.secure ? ';secure' : '';
+
+ // per http://www.ietf.org/rfc/rfc2109.txt browser must allow at minimum:
+ // - 300 cookies
+ // - 20 cookies per unique domain
+ // - 4096 bytes per cookie
+ var cookieLength = str.length + 1;
+ if (cookieLength > 4096) {
+ $log.warn("Cookie '" + name +
+ "' possibly not set or overflowed because it was too large (" +
+ cookieLength + " > 4096 bytes)!");
+ }
+
+ return str;
+ }
+
+ return function(name, value, options) {
+ rawDocument.cookie = buildCookieString(name, value, options);
+ };
+}
+
+$$CookieWriter.$inject = ['$document', '$log', '$browser'];
+
+angular.module('ngCookies').provider('$$cookieWriter', function $$CookieWriterProvider() {
+ this.$get = $$CookieWriter;
+});
+
+
+})(window, window.angular);
diff --git a/views/ngXosViews/serviceGrid/src/vendor/angular-cookies/angular-cookies.min.js b/views/ngXosViews/serviceGrid/src/vendor/angular-cookies/angular-cookies.min.js
new file mode 100644
index 0000000..d68e3ef
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/angular-cookies/angular-cookies.min.js
@@ -0,0 +1,9 @@
+/*
+ AngularJS v1.4.7
+ (c) 2010-2015 Google, Inc. http://angularjs.org
+ License: MIT
+*/
+(function(p,c,n){'use strict';function l(b,a,g){var d=g.baseHref(),k=b[0];return function(b,e,f){var g,h;f=f||{};h=f.expires;g=c.isDefined(f.path)?f.path:d;c.isUndefined(e)&&(h="Thu, 01 Jan 1970 00:00:00 GMT",e="");c.isString(h)&&(h=new Date(h));e=encodeURIComponent(b)+"="+encodeURIComponent(e);e=e+(g?";path="+g:"")+(f.domain?";domain="+f.domain:"");e+=h?";expires="+h.toUTCString():"";e+=f.secure?";secure":"";f=e.length+1;4096<f&&a.warn("Cookie '"+b+"' possibly not set or overflowed because it was too large ("+
+f+" > 4096 bytes)!");k.cookie=e}}c.module("ngCookies",["ng"]).provider("$cookies",[function(){var b=this.defaults={};this.$get=["$$cookieReader","$$cookieWriter",function(a,g){return{get:function(d){return a()[d]},getObject:function(d){return(d=this.get(d))?c.fromJson(d):d},getAll:function(){return a()},put:function(d,a,m){g(d,a,m?c.extend({},b,m):b)},putObject:function(d,b,a){this.put(d,c.toJson(b),a)},remove:function(a,k){g(a,n,k?c.extend({},b,k):b)}}}]}]);c.module("ngCookies").factory("$cookieStore",
+["$cookies",function(b){return{get:function(a){return b.getObject(a)},put:function(a,c){b.putObject(a,c)},remove:function(a){b.remove(a)}}}]);l.$inject=["$document","$log","$browser"];c.module("ngCookies").provider("$$cookieWriter",function(){this.$get=l})})(window,window.angular);
+//# sourceMappingURL=angular-cookies.min.js.map
diff --git a/views/ngXosViews/serviceGrid/src/vendor/angular-cookies/angular-cookies.min.js.map b/views/ngXosViews/serviceGrid/src/vendor/angular-cookies/angular-cookies.min.js.map
new file mode 100644
index 0000000..d269e1f
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/angular-cookies/angular-cookies.min.js.map
@@ -0,0 +1,8 @@
+{
+"version":3,
+"file":"angular-cookies.min.js",
+"lineCount":8,
+"mappings":"A;;;;;aAKC,SAAQ,CAACA,CAAD,CAASC,CAAT,CAAkBC,CAAlB,CAA6B,CA0QtCC,QAASA,EAAc,CAACC,CAAD,CAAYC,CAAZ,CAAkBC,CAAlB,CAA4B,CACjD,IAAIC,EAAaD,CAAAE,SAAA,EAAjB,CACIC,EAAcL,CAAA,CAAU,CAAV,CAmClB,OAAO,SAAQ,CAACM,CAAD,CAAOC,CAAP,CAAcC,CAAd,CAAuB,CAjCW,IAC3CC,CAD2C,CACrCC,CACVF,EAAA,CAgCoDA,CAhCpD,EAAqB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BN,CAAnB,CAAwBzB,CAAxB,CADwB,CAzBrB,CAsCLiC,OAAQA,QAAQ,CAACR,CAAD,CAAM,CACpBU,CAAAF,OAAA,CAAgBR,CAAhB,CADoB,CAtCjB,CAF8C,CAAhC,CAjCzB,CAqIAjC,EAAA4C,QAAA,CAAyB,CAAC,WAAD,CAAc,MAAd,CAAsB,UAAtB,CAEzB9C,EAAA2B,OAAA,CAAe,WAAf,CAAAC,SAAA,CAAqC,gBAArC,CAAuDmB,QAA+B,EAAG,CACvF,IAAAhB,KAAA,CAAY7B,CAD2E,CAAzF,CAtTsC,CAArC,CAAD,CA2TGH,MA3TH,CA2TWA,MAAAC,QA3TX;",
+"sources":["angular-cookies.js"],
+"names":["window","angular","undefined","$$CookieWriter","$document","$log","$browser","cookiePath","baseHref","rawDocument","name","value","options","path","expires","isDefined","isUndefined","isString","Date","str","encodeURIComponent","domain","toUTCString","secure","cookieLength","length","warn","cookie","module","provider","$CookiesProvider","defaults","$get","$$cookieReader","$$cookieWriter","get","key","getObject","fromJson","getAll","put","extend","putObject","toJson","remove","factory","$cookies","$inject","$$CookieWriterProvider"]
+}
diff --git a/views/ngXosViews/serviceGrid/src/vendor/angular-cookies/bower.json b/views/ngXosViews/serviceGrid/src/vendor/angular-cookies/bower.json
new file mode 100644
index 0000000..a5f4f63
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/angular-cookies/bower.json
@@ -0,0 +1,9 @@
+{
+ "name": "angular-cookies",
+ "version": "1.4.7",
+ "main": "./angular-cookies.js",
+ "ignore": [],
+ "dependencies": {
+ "angular": "1.4.7"
+ }
+}
diff --git a/views/ngXosViews/serviceGrid/src/vendor/angular-cookies/index.js b/views/ngXosViews/serviceGrid/src/vendor/angular-cookies/index.js
new file mode 100644
index 0000000..6576675
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/angular-cookies/index.js
@@ -0,0 +1,2 @@
+require('./angular-cookies');
+module.exports = 'ngCookies';
diff --git a/applications/auto-scale/gui/src/vendor/angular/package.json b/views/ngXosViews/serviceGrid/src/vendor/angular-cookies/package.json
similarity index 80%
copy from applications/auto-scale/gui/src/vendor/angular/package.json
copy to views/ngXosViews/serviceGrid/src/vendor/angular-cookies/package.json
index 09f440e..7eddecd 100644
--- a/applications/auto-scale/gui/src/vendor/angular/package.json
+++ b/views/ngXosViews/serviceGrid/src/vendor/angular-cookies/package.json
@@ -1,7 +1,7 @@
{
- "name": "angular",
- "version": "1.4.8",
- "description": "HTML enhanced for web apps",
+ "name": "angular-cookies",
+ "version": "1.4.7",
+ "description": "AngularJS module for cookies",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
@@ -14,6 +14,7 @@
"angular",
"framework",
"browser",
+ "cookies",
"client-side"
],
"author": "Angular Core Team <angular-core+npm@google.com>",
diff --git a/views/ngXosViews/serviceGrid/src/vendor/angular-mocks/.bower.json b/views/ngXosViews/serviceGrid/src/vendor/angular-mocks/.bower.json
new file mode 100644
index 0000000..e3882e0
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/angular-mocks/.bower.json
@@ -0,0 +1,19 @@
+{
+ "name": "angular-mocks",
+ "version": "1.4.7",
+ "main": "./angular-mocks.js",
+ "ignore": [],
+ "dependencies": {
+ "angular": "1.4.7"
+ },
+ "homepage": "https://github.com/angular/bower-angular-mocks",
+ "_release": "1.4.7",
+ "_resolution": {
+ "type": "version",
+ "tag": "v1.4.7",
+ "commit": "74c65a6a54f39516be40b0afdd99efb461595fd9"
+ },
+ "_source": "https://github.com/angular/bower-angular-mocks.git",
+ "_target": "1.4.7",
+ "_originalSource": "angular-mocks"
+}
\ No newline at end of file
diff --git a/applications/auto-scale/gui/src/vendor/angular-mocks/README.md b/views/ngXosViews/serviceGrid/src/vendor/angular-mocks/README.md
similarity index 100%
rename from applications/auto-scale/gui/src/vendor/angular-mocks/README.md
rename to views/ngXosViews/serviceGrid/src/vendor/angular-mocks/README.md
diff --git a/applications/auto-scale/gui/src/vendor/angular-mocks/angular-mocks.js b/views/ngXosViews/serviceGrid/src/vendor/angular-mocks/angular-mocks.js
similarity index 99%
rename from applications/auto-scale/gui/src/vendor/angular-mocks/angular-mocks.js
rename to views/ngXosViews/serviceGrid/src/vendor/angular-mocks/angular-mocks.js
index 917d842..febfd0d 100644
--- a/applications/auto-scale/gui/src/vendor/angular-mocks/angular-mocks.js
+++ b/views/ngXosViews/serviceGrid/src/vendor/angular-mocks/angular-mocks.js
@@ -1,5 +1,5 @@
/**
- * @license AngularJS v1.4.8
+ * @license AngularJS v1.4.7
* (c) 2010-2015 Google, Inc. http://angularjs.org
* License: MIT
*/
@@ -2278,9 +2278,8 @@
* @param {...(string|Function|Object)} fns any number of modules which are represented as string
* aliases or as anonymous module initialization functions. The modules are used to
* configure the injector. The 'ng' and 'ngMock' modules are automatically loaded. If an
- * object literal is passed each key-value pair will be registered on the module via
- * {@link auto.$provide $provide}.value, the key being the string name (or token) to associate
- * with the value on the injector.
+ * object literal is passed they will be registered as values in the module, the key being
+ * the module name and the value being what is returned.
*/
window.module = angular.mock.module = function() {
var moduleFns = Array.prototype.slice.call(arguments, 0);
diff --git a/applications/auto-scale/gui/src/vendor/angular-mocks/bower.json b/views/ngXosViews/serviceGrid/src/vendor/angular-mocks/bower.json
similarity index 69%
rename from applications/auto-scale/gui/src/vendor/angular-mocks/bower.json
rename to views/ngXosViews/serviceGrid/src/vendor/angular-mocks/bower.json
index 423cf38..1158b54 100644
--- a/applications/auto-scale/gui/src/vendor/angular-mocks/bower.json
+++ b/views/ngXosViews/serviceGrid/src/vendor/angular-mocks/bower.json
@@ -1,9 +1,9 @@
{
"name": "angular-mocks",
- "version": "1.4.8",
+ "version": "1.4.7",
"main": "./angular-mocks.js",
"ignore": [],
"dependencies": {
- "angular": "1.4.8"
+ "angular": "1.4.7"
}
}
diff --git a/applications/auto-scale/gui/src/vendor/angular-mocks/ngAnimateMock.js b/views/ngXosViews/serviceGrid/src/vendor/angular-mocks/ngAnimateMock.js
similarity index 100%
rename from applications/auto-scale/gui/src/vendor/angular-mocks/ngAnimateMock.js
rename to views/ngXosViews/serviceGrid/src/vendor/angular-mocks/ngAnimateMock.js
diff --git a/applications/auto-scale/gui/src/vendor/angular-mocks/ngMock.js b/views/ngXosViews/serviceGrid/src/vendor/angular-mocks/ngMock.js
similarity index 100%
rename from applications/auto-scale/gui/src/vendor/angular-mocks/ngMock.js
rename to views/ngXosViews/serviceGrid/src/vendor/angular-mocks/ngMock.js
diff --git a/applications/auto-scale/gui/src/vendor/angular-mocks/ngMockE2E.js b/views/ngXosViews/serviceGrid/src/vendor/angular-mocks/ngMockE2E.js
similarity index 100%
rename from applications/auto-scale/gui/src/vendor/angular-mocks/ngMockE2E.js
rename to views/ngXosViews/serviceGrid/src/vendor/angular-mocks/ngMockE2E.js
diff --git a/applications/auto-scale/gui/src/vendor/angular-mocks/package.json b/views/ngXosViews/serviceGrid/src/vendor/angular-mocks/package.json
similarity index 96%
rename from applications/auto-scale/gui/src/vendor/angular-mocks/package.json
rename to views/ngXosViews/serviceGrid/src/vendor/angular-mocks/package.json
index 49f7779..4369e17 100644
--- a/applications/auto-scale/gui/src/vendor/angular-mocks/package.json
+++ b/views/ngXosViews/serviceGrid/src/vendor/angular-mocks/package.json
@@ -1,6 +1,6 @@
{
"name": "angular-mocks",
- "version": "1.4.8",
+ "version": "1.4.7",
"description": "AngularJS mocks for testing",
"main": "angular-mocks.js",
"scripts": {
diff --git a/views/ngXosViews/serviceGrid/src/vendor/angular-resource/.bower.json b/views/ngXosViews/serviceGrid/src/vendor/angular-resource/.bower.json
new file mode 100644
index 0000000..7057f3b
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/angular-resource/.bower.json
@@ -0,0 +1,19 @@
+{
+ "name": "angular-resource",
+ "version": "1.4.7",
+ "main": "./angular-resource.js",
+ "ignore": [],
+ "dependencies": {
+ "angular": "1.4.7"
+ },
+ "homepage": "https://github.com/angular/bower-angular-resource",
+ "_release": "1.4.7",
+ "_resolution": {
+ "type": "version",
+ "tag": "v1.4.7",
+ "commit": "c97a21f0e610d48045863da9518d8c13b2c1ed9d"
+ },
+ "_source": "https://github.com/angular/bower-angular-resource.git",
+ "_target": "1.4.7",
+ "_originalSource": "angular-resource"
+}
\ No newline at end of file
diff --git a/views/ngXosViews/serviceGrid/src/vendor/angular-resource/README.md b/views/ngXosViews/serviceGrid/src/vendor/angular-resource/README.md
new file mode 100644
index 0000000..f3bd119
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/angular-resource/README.md
@@ -0,0 +1,68 @@
+# packaged angular-resource
+
+This repo is for distribution on `npm` and `bower`. The source for this module is in the
+[main AngularJS repo](https://github.com/angular/angular.js/tree/master/src/ngResource).
+Please file issues and pull requests against that repo.
+
+## Install
+
+You can install this package either with `npm` or with `bower`.
+
+### npm
+
+```shell
+npm install angular-resource
+```
+
+Then add `ngResource` as a dependency for your app:
+
+```javascript
+angular.module('myApp', [require('angular-resource')]);
+```
+
+### bower
+
+```shell
+bower install angular-resource
+```
+
+Add a `<script>` to your `index.html`:
+
+```html
+<script src="/bower_components/angular-resource/angular-resource.js"></script>
+```
+
+Then add `ngResource` as a dependency for your app:
+
+```javascript
+angular.module('myApp', ['ngResource']);
+```
+
+## Documentation
+
+Documentation is available on the
+[AngularJS docs site](http://docs.angularjs.org/api/ngResource).
+
+## License
+
+The MIT License
+
+Copyright (c) 2010-2015 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.
diff --git a/views/ngXosViews/serviceGrid/src/vendor/angular-resource/angular-resource.js b/views/ngXosViews/serviceGrid/src/vendor/angular-resource/angular-resource.js
new file mode 100644
index 0000000..39b370e
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/angular-resource/angular-resource.js
@@ -0,0 +1,675 @@
+/**
+ * @license AngularJS v1.4.7
+ * (c) 2010-2015 Google, Inc. http://angularjs.org
+ * License: MIT
+ */
+(function(window, angular, undefined) {'use strict';
+
+var $resourceMinErr = angular.$$minErr('$resource');
+
+// Helper functions and regex to lookup a dotted path on an object
+// stopping at undefined/null. The path must be composed of ASCII
+// identifiers (just like $parse)
+var MEMBER_NAME_REGEX = /^(\.[a-zA-Z_$@][0-9a-zA-Z_$@]*)+$/;
+
+function isValidDottedPath(path) {
+ return (path != null && path !== '' && path !== 'hasOwnProperty' &&
+ MEMBER_NAME_REGEX.test('.' + path));
+}
+
+function lookupDottedPath(obj, path) {
+ if (!isValidDottedPath(path)) {
+ throw $resourceMinErr('badmember', 'Dotted member path "@{0}" is invalid.', path);
+ }
+ var keys = path.split('.');
+ for (var i = 0, ii = keys.length; i < ii && angular.isDefined(obj); i++) {
+ var key = keys[i];
+ obj = (obj !== null) ? obj[key] : undefined;
+ }
+ return obj;
+}
+
+/**
+ * Create a shallow copy of an object and clear other fields from the destination
+ */
+function shallowClearAndCopy(src, dst) {
+ dst = dst || {};
+
+ angular.forEach(dst, function(value, key) {
+ delete dst[key];
+ });
+
+ for (var key in src) {
+ if (src.hasOwnProperty(key) && !(key.charAt(0) === '$' && key.charAt(1) === '$')) {
+ dst[key] = src[key];
+ }
+ }
+
+ return dst;
+}
+
+/**
+ * @ngdoc module
+ * @name ngResource
+ * @description
+ *
+ * # ngResource
+ *
+ * The `ngResource` module provides interaction support with RESTful services
+ * via the $resource service.
+ *
+ *
+ * <div doc-module-components="ngResource"></div>
+ *
+ * See {@link ngResource.$resource `$resource`} for usage.
+ */
+
+/**
+ * @ngdoc service
+ * @name $resource
+ * @requires $http
+ *
+ * @description
+ * A factory which creates a resource object that lets you interact with
+ * [RESTful](http://en.wikipedia.org/wiki/Representational_State_Transfer) server-side data sources.
+ *
+ * The returned resource object has action methods which provide high-level behaviors without
+ * the need to interact with the low level {@link ng.$http $http} service.
+ *
+ * Requires the {@link ngResource `ngResource`} module to be installed.
+ *
+ * By default, trailing slashes will be stripped from the calculated URLs,
+ * which can pose problems with server backends that do not expect that
+ * behavior. This can be disabled by configuring the `$resourceProvider` like
+ * this:
+ *
+ * ```js
+ app.config(['$resourceProvider', function($resourceProvider) {
+ // Don't strip trailing slashes from calculated URLs
+ $resourceProvider.defaults.stripTrailingSlashes = false;
+ }]);
+ * ```
+ *
+ * @param {string} url A parameterized URL template with parameters prefixed by `:` as in
+ * `/user/:username`. If you are using a URL with a port number (e.g.
+ * `http://example.com:8080/api`), it will be respected.
+ *
+ * If you are using a url with a suffix, just add the suffix, like this:
+ * `$resource('http://example.com/resource.json')` or `$resource('http://example.com/:id.json')`
+ * or even `$resource('http://example.com/resource/:resource_id.:format')`
+ * If the parameter before the suffix is empty, :resource_id in this case, then the `/.` will be
+ * collapsed down to a single `.`. If you need this sequence to appear and not collapse then you
+ * can escape it with `/\.`.
+ *
+ * @param {Object=} paramDefaults Default values for `url` parameters. These can be overridden in
+ * `actions` methods. If any of the parameter value is a function, it will be executed every time
+ * when a param value needs to be obtained for a request (unless the param was overridden).
+ *
+ * Each key value in the parameter object is first bound to url template if present and then any
+ * excess keys are appended to the url search query after the `?`.
+ *
+ * Given a template `/path/:verb` and parameter `{verb:'greet', salutation:'Hello'}` results in
+ * URL `/path/greet?salutation=Hello`.
+ *
+ * If the parameter value is prefixed with `@` then the value for that parameter will be extracted
+ * from the corresponding property on the `data` object (provided when calling an action method). For
+ * example, if the `defaultParam` object is `{someParam: '@someProp'}` then the value of `someParam`
+ * will be `data.someProp`.
+ *
+ * @param {Object.<Object>=} actions Hash with declaration of custom actions that should extend
+ * the default set of resource actions. The declaration should be created in the format of {@link
+ * ng.$http#usage $http.config}:
+ *
+ * {action1: {method:?, params:?, isArray:?, headers:?, ...},
+ * action2: {method:?, params:?, isArray:?, headers:?, ...},
+ * ...}
+ *
+ * Where:
+ *
+ * - **`action`** – {string} – The name of action. This name becomes the name of the method on
+ * your resource object.
+ * - **`method`** – {string} – Case insensitive HTTP method (e.g. `GET`, `POST`, `PUT`,
+ * `DELETE`, `JSONP`, etc).
+ * - **`params`** – {Object=} – Optional set of pre-bound parameters for this action. If any of
+ * the parameter value is a function, it will be executed every time when a param value needs to
+ * be obtained for a request (unless the param was overridden).
+ * - **`url`** – {string} – action specific `url` override. The url templating is supported just
+ * like for the resource-level urls.
+ * - **`isArray`** – {boolean=} – If true then the returned object for this action is an array,
+ * see `returns` section.
+ * - **`transformRequest`** –
+ * `{function(data, headersGetter)|Array.<function(data, headersGetter)>}` –
+ * transform function or an array of such functions. The transform function takes the http
+ * request body and headers and returns its transformed (typically serialized) version.
+ * By default, transformRequest will contain one function that checks if the request data is
+ * an object and serializes to using `angular.toJson`. To prevent this behavior, set
+ * `transformRequest` to an empty array: `transformRequest: []`
+ * - **`transformResponse`** –
+ * `{function(data, headersGetter)|Array.<function(data, headersGetter)>}` –
+ * transform function or an array of such functions. The transform function takes the http
+ * response body and headers and returns its transformed (typically deserialized) version.
+ * By default, transformResponse will contain one function that checks if the response looks like
+ * a JSON string and deserializes it using `angular.fromJson`. To prevent this behavior, set
+ * `transformResponse` to an empty array: `transformResponse: []`
+ * - **`cache`** – `{boolean|Cache}` – If true, a default $http cache will be used to cache the
+ * GET request, otherwise if a cache instance built with
+ * {@link ng.$cacheFactory $cacheFactory}, this cache will be used for
+ * caching.
+ * - **`timeout`** – `{number|Promise}` – timeout in milliseconds, or {@link ng.$q promise} that
+ * should abort the request when resolved.
+ * - **`withCredentials`** - `{boolean}` - whether to set the `withCredentials` flag on the
+ * XHR object. See
+ * [requests with credentials](https://developer.mozilla.org/en/http_access_control#section_5)
+ * for more information.
+ * - **`responseType`** - `{string}` - see
+ * [requestType](https://developer.mozilla.org/en-US/docs/DOM/XMLHttpRequest#responseType).
+ * - **`interceptor`** - `{Object=}` - The interceptor object has two optional methods -
+ * `response` and `responseError`. Both `response` and `responseError` interceptors get called
+ * with `http response` object. See {@link ng.$http $http interceptors}.
+ *
+ * @param {Object} options Hash with custom settings that should extend the
+ * default `$resourceProvider` behavior. The only supported option is
+ *
+ * Where:
+ *
+ * - **`stripTrailingSlashes`** – {boolean} – If true then the trailing
+ * slashes from any calculated URL will be stripped. (Defaults to true.)
+ *
+ * @returns {Object} A resource "class" object with methods for the default set of resource actions
+ * optionally extended with custom `actions`. The default set contains these actions:
+ * ```js
+ * { 'get': {method:'GET'},
+ * 'save': {method:'POST'},
+ * 'query': {method:'GET', isArray:true},
+ * 'remove': {method:'DELETE'},
+ * 'delete': {method:'DELETE'} };
+ * ```
+ *
+ * Calling these methods invoke an {@link ng.$http} with the specified http method,
+ * destination and parameters. When the data is returned from the server then the object is an
+ * instance of the resource class. The actions `save`, `remove` and `delete` are available on it
+ * as methods with the `$` prefix. This allows you to easily perform CRUD operations (create,
+ * read, update, delete) on server-side data like this:
+ * ```js
+ * var User = $resource('/user/:userId', {userId:'@id'});
+ * var user = User.get({userId:123}, function() {
+ * user.abc = true;
+ * user.$save();
+ * });
+ * ```
+ *
+ * It is important to realize that invoking a $resource object method immediately returns an
+ * empty reference (object or array depending on `isArray`). Once the data is returned from the
+ * server the existing reference is populated with the actual data. This is a useful trick since
+ * usually the resource is assigned to a model which is then rendered by the view. Having an empty
+ * object results in no rendering, once the data arrives from the server then the object is
+ * populated with the data and the view automatically re-renders itself showing the new data. This
+ * means that in most cases one never has to write a callback function for the action methods.
+ *
+ * The action methods on the class object or instance object can be invoked with the following
+ * parameters:
+ *
+ * - HTTP GET "class" actions: `Resource.action([parameters], [success], [error])`
+ * - non-GET "class" actions: `Resource.action([parameters], postData, [success], [error])`
+ * - non-GET instance actions: `instance.$action([parameters], [success], [error])`
+ *
+ *
+ * Success callback is called with (value, responseHeaders) arguments, where the value is
+ * the populated resource instance or collection object. The error callback is called
+ * with (httpResponse) argument.
+ *
+ * Class actions return empty instance (with additional properties below).
+ * Instance actions return promise of the action.
+ *
+ * The Resource instances and collection have these additional properties:
+ *
+ * - `$promise`: the {@link ng.$q promise} of the original server interaction that created this
+ * instance or collection.
+ *
+ * On success, the promise is resolved with the same resource instance or collection object,
+ * updated with data from server. This makes it easy to use in
+ * {@link ngRoute.$routeProvider resolve section of $routeProvider.when()} to defer view
+ * rendering until the resource(s) are loaded.
+ *
+ * On failure, the promise is resolved with the {@link ng.$http http response} object, without
+ * the `resource` property.
+ *
+ * If an interceptor object was provided, the promise will instead be resolved with the value
+ * returned by the interceptor.
+ *
+ * - `$resolved`: `true` after first server interaction is completed (either with success or
+ * rejection), `false` before that. Knowing if the Resource has been resolved is useful in
+ * data-binding.
+ *
+ * @example
+ *
+ * # Credit card resource
+ *
+ * ```js
+ // Define CreditCard class
+ var CreditCard = $resource('/user/:userId/card/:cardId',
+ {userId:123, cardId:'@id'}, {
+ charge: {method:'POST', params:{charge:true}}
+ });
+
+ // We can retrieve a collection from the server
+ var cards = CreditCard.query(function() {
+ // GET: /user/123/card
+ // server returns: [ {id:456, number:'1234', name:'Smith'} ];
+
+ var card = cards[0];
+ // each item is an instance of CreditCard
+ expect(card instanceof CreditCard).toEqual(true);
+ card.name = "J. Smith";
+ // non GET methods are mapped onto the instances
+ card.$save();
+ // POST: /user/123/card/456 {id:456, number:'1234', name:'J. Smith'}
+ // server returns: {id:456, number:'1234', name: 'J. Smith'};
+
+ // our custom method is mapped as well.
+ card.$charge({amount:9.99});
+ // POST: /user/123/card/456?amount=9.99&charge=true {id:456, number:'1234', name:'J. Smith'}
+ });
+
+ // we can create an instance as well
+ var newCard = new CreditCard({number:'0123'});
+ newCard.name = "Mike Smith";
+ newCard.$save();
+ // POST: /user/123/card {number:'0123', name:'Mike Smith'}
+ // server returns: {id:789, number:'0123', name: 'Mike Smith'};
+ expect(newCard.id).toEqual(789);
+ * ```
+ *
+ * The object returned from this function execution is a resource "class" which has "static" method
+ * for each action in the definition.
+ *
+ * Calling these methods invoke `$http` on the `url` template with the given `method`, `params` and
+ * `headers`.
+ * When the data is returned from the server then the object is an instance of the resource type and
+ * all of the non-GET methods are available with `$` prefix. This allows you to easily support CRUD
+ * operations (create, read, update, delete) on server-side data.
+
+ ```js
+ var User = $resource('/user/:userId', {userId:'@id'});
+ User.get({userId:123}, function(user) {
+ user.abc = true;
+ user.$save();
+ });
+ ```
+ *
+ * It's worth noting that the success callback for `get`, `query` and other methods gets passed
+ * in the response that came from the server as well as $http header getter function, so one
+ * could rewrite the above example and get access to http headers as:
+ *
+ ```js
+ var User = $resource('/user/:userId', {userId:'@id'});
+ User.get({userId:123}, function(u, getResponseHeaders){
+ u.abc = true;
+ u.$save(function(u, putResponseHeaders) {
+ //u => saved user object
+ //putResponseHeaders => $http header getter
+ });
+ });
+ ```
+ *
+ * You can also access the raw `$http` promise via the `$promise` property on the object returned
+ *
+ ```
+ var User = $resource('/user/:userId', {userId:'@id'});
+ User.get({userId:123})
+ .$promise.then(function(user) {
+ $scope.user = user;
+ });
+ ```
+
+ * # Creating a custom 'PUT' request
+ * In this example we create a custom method on our resource to make a PUT request
+ * ```js
+ * var app = angular.module('app', ['ngResource', 'ngRoute']);
+ *
+ * // Some APIs expect a PUT request in the format URL/object/ID
+ * // Here we are creating an 'update' method
+ * app.factory('Notes', ['$resource', function($resource) {
+ * return $resource('/notes/:id', null,
+ * {
+ * 'update': { method:'PUT' }
+ * });
+ * }]);
+ *
+ * // In our controller we get the ID from the URL using ngRoute and $routeParams
+ * // We pass in $routeParams and our Notes factory along with $scope
+ * app.controller('NotesCtrl', ['$scope', '$routeParams', 'Notes',
+ function($scope, $routeParams, Notes) {
+ * // First get a note object from the factory
+ * var note = Notes.get({ id:$routeParams.id });
+ * $id = note.id;
+ *
+ * // Now call update passing in the ID first then the object you are updating
+ * Notes.update({ id:$id }, note);
+ *
+ * // This will PUT /notes/ID with the note object in the request payload
+ * }]);
+ * ```
+ */
+angular.module('ngResource', ['ng']).
+ provider('$resource', function() {
+ var PROTOCOL_AND_DOMAIN_REGEX = /^https?:\/\/[^\/]*/;
+ var provider = this;
+
+ this.defaults = {
+ // Strip slashes by default
+ stripTrailingSlashes: true,
+
+ // Default actions configuration
+ actions: {
+ 'get': {method: 'GET'},
+ 'save': {method: 'POST'},
+ 'query': {method: 'GET', isArray: true},
+ 'remove': {method: 'DELETE'},
+ 'delete': {method: 'DELETE'}
+ }
+ };
+
+ this.$get = ['$http', '$q', function($http, $q) {
+
+ var noop = angular.noop,
+ forEach = angular.forEach,
+ extend = angular.extend,
+ copy = angular.copy,
+ isFunction = angular.isFunction;
+
+ /**
+ * We need our custom method because encodeURIComponent is too aggressive and doesn't follow
+ * http://www.ietf.org/rfc/rfc3986.txt with regards to the character set
+ * (pchar) allowed in path segments:
+ * segment = *pchar
+ * pchar = unreserved / pct-encoded / sub-delims / ":" / "@"
+ * pct-encoded = "%" HEXDIG HEXDIG
+ * unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~"
+ * sub-delims = "!" / "$" / "&" / "'" / "(" / ")"
+ * / "*" / "+" / "," / ";" / "="
+ */
+ function encodeUriSegment(val) {
+ return encodeUriQuery(val, true).
+ replace(/%26/gi, '&').
+ replace(/%3D/gi, '=').
+ replace(/%2B/gi, '+');
+ }
+
+
+ /**
+ * This method is intended for encoding *key* or *value* parts of query component. We need a
+ * custom method because encodeURIComponent is too aggressive and encodes stuff that doesn't
+ * have to be encoded per http://tools.ietf.org/html/rfc3986:
+ * query = *( pchar / "/" / "?" )
+ * pchar = unreserved / pct-encoded / sub-delims / ":" / "@"
+ * unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~"
+ * pct-encoded = "%" HEXDIG HEXDIG
+ * sub-delims = "!" / "$" / "&" / "'" / "(" / ")"
+ * / "*" / "+" / "," / ";" / "="
+ */
+ function encodeUriQuery(val, pctEncodeSpaces) {
+ return encodeURIComponent(val).
+ replace(/%40/gi, '@').
+ replace(/%3A/gi, ':').
+ replace(/%24/g, '$').
+ replace(/%2C/gi, ',').
+ replace(/%20/g, (pctEncodeSpaces ? '%20' : '+'));
+ }
+
+ function Route(template, defaults) {
+ this.template = template;
+ this.defaults = extend({}, provider.defaults, defaults);
+ this.urlParams = {};
+ }
+
+ Route.prototype = {
+ setUrlParams: function(config, params, actionUrl) {
+ var self = this,
+ url = actionUrl || self.template,
+ val,
+ encodedVal,
+ protocolAndDomain = '';
+
+ var urlParams = self.urlParams = {};
+ forEach(url.split(/\W/), function(param) {
+ if (param === 'hasOwnProperty') {
+ throw $resourceMinErr('badname', "hasOwnProperty is not a valid parameter name.");
+ }
+ if (!(new RegExp("^\\d+$").test(param)) && param &&
+ (new RegExp("(^|[^\\\\]):" + param + "(\\W|$)").test(url))) {
+ urlParams[param] = true;
+ }
+ });
+ url = url.replace(/\\:/g, ':');
+ url = url.replace(PROTOCOL_AND_DOMAIN_REGEX, function(match) {
+ protocolAndDomain = match;
+ return '';
+ });
+
+ params = params || {};
+ forEach(self.urlParams, function(_, urlParam) {
+ val = params.hasOwnProperty(urlParam) ? params[urlParam] : self.defaults[urlParam];
+ if (angular.isDefined(val) && val !== null) {
+ encodedVal = encodeUriSegment(val);
+ url = url.replace(new RegExp(":" + urlParam + "(\\W|$)", "g"), function(match, p1) {
+ return encodedVal + p1;
+ });
+ } else {
+ url = url.replace(new RegExp("(\/?):" + urlParam + "(\\W|$)", "g"), function(match,
+ leadingSlashes, tail) {
+ if (tail.charAt(0) == '/') {
+ return tail;
+ } else {
+ return leadingSlashes + tail;
+ }
+ });
+ }
+ });
+
+ // strip trailing slashes and set the url (unless this behavior is specifically disabled)
+ if (self.defaults.stripTrailingSlashes) {
+ url = url.replace(/\/+$/, '') || '/';
+ }
+
+ // then replace collapse `/.` if found in the last URL path segment before the query
+ // E.g. `http://url.com/id./format?q=x` becomes `http://url.com/id.format?q=x`
+ url = url.replace(/\/\.(?=\w+($|\?))/, '.');
+ // replace escaped `/\.` with `/.`
+ config.url = protocolAndDomain + url.replace(/\/\\\./, '/.');
+
+
+ // set params - delegate param encoding to $http
+ forEach(params, function(value, key) {
+ if (!self.urlParams[key]) {
+ config.params = config.params || {};
+ config.params[key] = value;
+ }
+ });
+ }
+ };
+
+
+ function resourceFactory(url, paramDefaults, actions, options) {
+ var route = new Route(url, options);
+
+ actions = extend({}, provider.defaults.actions, actions);
+
+ function extractParams(data, actionParams) {
+ var ids = {};
+ actionParams = extend({}, paramDefaults, actionParams);
+ forEach(actionParams, function(value, key) {
+ if (isFunction(value)) { value = value(); }
+ ids[key] = value && value.charAt && value.charAt(0) == '@' ?
+ lookupDottedPath(data, value.substr(1)) : value;
+ });
+ return ids;
+ }
+
+ function defaultResponseInterceptor(response) {
+ return response.resource;
+ }
+
+ function Resource(value) {
+ shallowClearAndCopy(value || {}, this);
+ }
+
+ Resource.prototype.toJSON = function() {
+ var data = extend({}, this);
+ delete data.$promise;
+ delete data.$resolved;
+ return data;
+ };
+
+ forEach(actions, function(action, name) {
+ var hasBody = /^(POST|PUT|PATCH)$/i.test(action.method);
+
+ Resource[name] = function(a1, a2, a3, a4) {
+ var params = {}, data, success, error;
+
+ /* jshint -W086 */ /* (purposefully fall through case statements) */
+ switch (arguments.length) {
+ case 4:
+ error = a4;
+ success = a3;
+ //fallthrough
+ case 3:
+ case 2:
+ if (isFunction(a2)) {
+ if (isFunction(a1)) {
+ success = a1;
+ error = a2;
+ break;
+ }
+
+ success = a2;
+ error = a3;
+ //fallthrough
+ } else {
+ params = a1;
+ data = a2;
+ success = a3;
+ break;
+ }
+ case 1:
+ if (isFunction(a1)) success = a1;
+ else if (hasBody) data = a1;
+ else params = a1;
+ break;
+ case 0: break;
+ default:
+ throw $resourceMinErr('badargs',
+ "Expected up to 4 arguments [params, data, success, error], got {0} arguments",
+ arguments.length);
+ }
+ /* jshint +W086 */ /* (purposefully fall through case statements) */
+
+ var isInstanceCall = this instanceof Resource;
+ var value = isInstanceCall ? data : (action.isArray ? [] : new Resource(data));
+ var httpConfig = {};
+ var responseInterceptor = action.interceptor && action.interceptor.response ||
+ defaultResponseInterceptor;
+ var responseErrorInterceptor = action.interceptor && action.interceptor.responseError ||
+ undefined;
+
+ forEach(action, function(value, key) {
+ if (key != 'params' && key != 'isArray' && key != 'interceptor') {
+ httpConfig[key] = copy(value);
+ }
+ });
+
+ if (hasBody) httpConfig.data = data;
+ route.setUrlParams(httpConfig,
+ extend({}, extractParams(data, action.params || {}), params),
+ action.url);
+
+ var promise = $http(httpConfig).then(function(response) {
+ var data = response.data,
+ promise = value.$promise;
+
+ if (data) {
+ // Need to convert action.isArray to boolean in case it is undefined
+ // jshint -W018
+ if (angular.isArray(data) !== (!!action.isArray)) {
+ throw $resourceMinErr('badcfg',
+ 'Error in resource configuration for action `{0}`. Expected response to ' +
+ 'contain an {1} but got an {2} (Request: {3} {4})', name, action.isArray ? 'array' : 'object',
+ angular.isArray(data) ? 'array' : 'object', httpConfig.method, httpConfig.url);
+ }
+ // jshint +W018
+ if (action.isArray) {
+ value.length = 0;
+ forEach(data, function(item) {
+ if (typeof item === "object") {
+ value.push(new Resource(item));
+ } else {
+ // Valid JSON values may be string literals, and these should not be converted
+ // into objects. These items will not have access to the Resource prototype
+ // methods, but unfortunately there
+ value.push(item);
+ }
+ });
+ } else {
+ shallowClearAndCopy(data, value);
+ value.$promise = promise;
+ }
+ }
+
+ value.$resolved = true;
+
+ response.resource = value;
+
+ return response;
+ }, function(response) {
+ value.$resolved = true;
+
+ (error || noop)(response);
+
+ return $q.reject(response);
+ });
+
+ promise = promise.then(
+ function(response) {
+ var value = responseInterceptor(response);
+ (success || noop)(value, response.headers);
+ return value;
+ },
+ responseErrorInterceptor);
+
+ if (!isInstanceCall) {
+ // we are creating instance / collection
+ // - set the initial promise
+ // - return the instance / collection
+ value.$promise = promise;
+ value.$resolved = false;
+
+ return value;
+ }
+
+ // instance call
+ return promise;
+ };
+
+
+ Resource.prototype['$' + name] = function(params, success, error) {
+ if (isFunction(params)) {
+ error = success; success = params; params = {};
+ }
+ var result = Resource[name].call(this, params, this, success, error);
+ return result.$promise || result;
+ };
+ });
+
+ Resource.bind = function(additionalParamDefaults) {
+ return resourceFactory(url, extend({}, paramDefaults, additionalParamDefaults), actions);
+ };
+
+ return Resource;
+ }
+
+ return resourceFactory;
+ }];
+ });
+
+
+})(window, window.angular);
diff --git a/views/ngXosViews/serviceGrid/src/vendor/angular-resource/angular-resource.min.js b/views/ngXosViews/serviceGrid/src/vendor/angular-resource/angular-resource.min.js
new file mode 100644
index 0000000..0d22c37
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/angular-resource/angular-resource.min.js
@@ -0,0 +1,13 @@
+/*
+ AngularJS v1.4.7
+ (c) 2010-2015 Google, Inc. http://angularjs.org
+ License: MIT
+*/
+(function(I,f,C){'use strict';function D(t,e){e=e||{};f.forEach(e,function(f,k){delete e[k]});for(var k in t)!t.hasOwnProperty(k)||"$"===k.charAt(0)&&"$"===k.charAt(1)||(e[k]=t[k]);return e}var y=f.$$minErr("$resource"),B=/^(\.[a-zA-Z_$@][0-9a-zA-Z_$@]*)+$/;f.module("ngResource",["ng"]).provider("$resource",function(){var t=/^https?:\/\/[^\/]*/,e=this;this.defaults={stripTrailingSlashes:!0,actions:{get:{method:"GET"},save:{method:"POST"},query:{method:"GET",isArray:!0},remove:{method:"DELETE"},"delete":{method:"DELETE"}}};
+this.$get=["$http","$q",function(k,F){function w(f,g){this.template=f;this.defaults=r({},e.defaults,g);this.urlParams={}}function z(l,g,s,h){function c(b,q){var c={};q=r({},g,q);u(q,function(a,q){x(a)&&(a=a());var m;if(a&&a.charAt&&"@"==a.charAt(0)){m=b;var d=a.substr(1);if(null==d||""===d||"hasOwnProperty"===d||!B.test("."+d))throw y("badmember",d);for(var d=d.split("."),n=0,g=d.length;n<g&&f.isDefined(m);n++){var e=d[n];m=null!==m?m[e]:C}}else m=a;c[q]=m});return c}function G(b){return b.resource}
+function d(b){D(b||{},this)}var t=new w(l,h);s=r({},e.defaults.actions,s);d.prototype.toJSON=function(){var b=r({},this);delete b.$promise;delete b.$resolved;return b};u(s,function(b,q){var g=/^(POST|PUT|PATCH)$/i.test(b.method);d[q]=function(a,A,m,e){var n={},h,l,s;switch(arguments.length){case 4:s=e,l=m;case 3:case 2:if(x(A)){if(x(a)){l=a;s=A;break}l=A;s=m}else{n=a;h=A;l=m;break}case 1:x(a)?l=a:g?h=a:n=a;break;case 0:break;default:throw y("badargs",arguments.length);}var w=this instanceof d,p=w?
+h:b.isArray?[]:new d(h),v={},z=b.interceptor&&b.interceptor.response||G,B=b.interceptor&&b.interceptor.responseError||C;u(b,function(b,a){"params"!=a&&"isArray"!=a&&"interceptor"!=a&&(v[a]=H(b))});g&&(v.data=h);t.setUrlParams(v,r({},c(h,b.params||{}),n),b.url);n=k(v).then(function(a){var c=a.data,m=p.$promise;if(c){if(f.isArray(c)!==!!b.isArray)throw y("badcfg",q,b.isArray?"array":"object",f.isArray(c)?"array":"object",v.method,v.url);b.isArray?(p.length=0,u(c,function(a){"object"===typeof a?p.push(new d(a)):
+p.push(a)})):(D(c,p),p.$promise=m)}p.$resolved=!0;a.resource=p;return a},function(a){p.$resolved=!0;(s||E)(a);return F.reject(a)});n=n.then(function(a){var b=z(a);(l||E)(b,a.headers);return b},B);return w?n:(p.$promise=n,p.$resolved=!1,p)};d.prototype["$"+q]=function(a,b,c){x(a)&&(c=b,b=a,a={});a=d[q].call(this,a,this,b,c);return a.$promise||a}});d.bind=function(b){return z(l,r({},g,b),s)};return d}var E=f.noop,u=f.forEach,r=f.extend,H=f.copy,x=f.isFunction;w.prototype={setUrlParams:function(l,g,
+e){var h=this,c=e||h.template,k,d,r="",b=h.urlParams={};u(c.split(/\W/),function(d){if("hasOwnProperty"===d)throw y("badname");!/^\d+$/.test(d)&&d&&(new RegExp("(^|[^\\\\]):"+d+"(\\W|$)")).test(c)&&(b[d]=!0)});c=c.replace(/\\:/g,":");c=c.replace(t,function(b){r=b;return""});g=g||{};u(h.urlParams,function(b,e){k=g.hasOwnProperty(e)?g[e]:h.defaults[e];f.isDefined(k)&&null!==k?(d=encodeURIComponent(k).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"%20").replace(/%26/gi,
+"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+"),c=c.replace(new RegExp(":"+e+"(\\W|$)","g"),function(a,b){return d+b})):c=c.replace(new RegExp("(/?):"+e+"(\\W|$)","g"),function(a,b,c){return"/"==c.charAt(0)?c:b+c})});h.defaults.stripTrailingSlashes&&(c=c.replace(/\/+$/,"")||"/");c=c.replace(/\/\.(?=\w+($|\?))/,".");l.url=r+c.replace(/\/\\\./,"/.");u(g,function(b,c){h.urlParams[c]||(l.params=l.params||{},l.params[c]=b)})}};return z}]})})(window,window.angular);
+//# sourceMappingURL=angular-resource.min.js.map
diff --git a/views/ngXosViews/serviceGrid/src/vendor/angular-resource/angular-resource.min.js.map b/views/ngXosViews/serviceGrid/src/vendor/angular-resource/angular-resource.min.js.map
new file mode 100644
index 0000000..2d23594
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/angular-resource/angular-resource.min.js.map
@@ -0,0 +1,8 @@
+{
+"version":3,
+"file":"angular-resource.min.js",
+"lineCount":12,
+"mappings":"A;;;;;aAKC,SAAQ,CAACA,CAAD,CAASC,CAAT,CAAkBC,CAAlB,CAA6B,CA6BtCC,QAASA,EAAmB,CAACC,CAAD,CAAMC,CAAN,CAAW,CACrCA,CAAA,CAAMA,CA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AX,CAAiBI,CAAjB,CAA4B,SAA5B,CAAuC,GAAvC,CAAZ,CAAyD,QAAQ,CAACF,CAAD,CAAQI,CAAR,CAAY,CACjF,MAAOT,EAAP,CAAoBS,CAD6D,CAA7E,CAFR,EAMEvE,CANF,CAMQA,CAAAkE,QAAA,CAAY,IAAID,MAAJ,CAAW,OAAX,CAAsBI,CAAtB,CAAiC,SAAjC,CAA4C,GAA5C,CAAZ,CAA8D,QAAQ,CAACF,CAAD,CACxEK,CADwE,CACxDC,CADwD,CAClD,CACxB,MAAsB,GAAtB,EAAIA,CAAA7F,OAAA,CAAY,CAAZ,CAAJ,CACS6F,CADT,CAGSD,CAHT,CAG0BC,CAJF,CADpB,CARoC,CAA9C,CAoBIb,EAAAzE,SAAAC,qBAAJ,GACEY,CADF,CACQA,CAAAkE,QAAA,CAAY,MAAZ,CAAoB,EAApB,CADR,EACmC,GADnC,CAMAlE,EAAA,CAAMA,CAAAkE,QAAA,CAAY,mBAAZ,CAAiC,GAAjC,CAENR,EAAA1D,IAAA,CAAa+D,CAAb,CAAiC/D,CAAAkE,QAAA,CAAY,QAAZ,CAAsB,IAAtB,CAIjC1F,EAAA,CAAQ0D,CAAR,CAAgB,QAAQ,CAACzD,CAAD,CAAQC,CAAR,CAAa,CAC9BkF,CAAA9D,UAAA,CAAepB,CAAf,CAAL,GACEgF,CAAAxB,OACA,CADgBwB,CAAAxB,OAChB,EADiC,EACjC,CAAAwB,CAAAxB,OAAA,CAAcxD,CAAd,CAAA,CAAqBD,CAFvB,CADmC,CAArC,CAxDgD,CADlC,CAoPlB,OAAOsB,EAzSuC,CAApC,CAlBmB,CADnC,CA5VsC,CAArC,CAAD,CA6pBG7B,MA7pBH,CA6pBWA,MAAAC,QA7pBX;",
+"sources":["angular-resource.js"],
+"names":["window","angular","undefined","shallowClearAndCopy","src","dst","forEach","value","key","hasOwnProperty","charAt","$resourceMinErr","$$minErr","MEMBER_NAME_REGEX","module","provider","PROTOCOL_AND_DOMAIN_REGEX","defaults","stripTrailingSlashes","actions","method","isArray","$get","$http","$q","Route","template","extend","urlParams","resourceFactory","url","paramDefaults","options","extractParams","data","actionParams","ids","isFunction","path","test","keys","split","i","ii","length","isDefined","obj","defaultResponseInterceptor","response","resource","Resource","route","prototype","toJSON","Resource.prototype.toJSON","$promise","$resolved","action","name","hasBody","a1","a2","a3","a4","params","success","error","arguments","isInstanceCall","httpConfig","responseInterceptor","interceptor","responseErrorInterceptor","responseError","copy","setUrlParams","promise","then","item","push","noop","reject","headers","result","call","bind","Resource.bind","additionalParamDefaults","config","actionUrl","self","val","encodedVal","protocolAndDomain","param","RegExp","replace","match","_","urlParam","encodeURIComponent","p1","leadingSlashes","tail"]
+}
diff --git a/views/ngXosViews/serviceGrid/src/vendor/angular-resource/bower.json b/views/ngXosViews/serviceGrid/src/vendor/angular-resource/bower.json
new file mode 100644
index 0000000..f466b55
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/angular-resource/bower.json
@@ -0,0 +1,9 @@
+{
+ "name": "angular-resource",
+ "version": "1.4.7",
+ "main": "./angular-resource.js",
+ "ignore": [],
+ "dependencies": {
+ "angular": "1.4.7"
+ }
+}
diff --git a/views/ngXosViews/serviceGrid/src/vendor/angular-resource/index.js b/views/ngXosViews/serviceGrid/src/vendor/angular-resource/index.js
new file mode 100644
index 0000000..fc40152
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/angular-resource/index.js
@@ -0,0 +1,2 @@
+require('./angular-resource');
+module.exports = 'ngResource';
diff --git a/applications/auto-scale/gui/src/vendor/angular-animate/package.json b/views/ngXosViews/serviceGrid/src/vendor/angular-resource/package.json
similarity index 75%
copy from applications/auto-scale/gui/src/vendor/angular-animate/package.json
copy to views/ngXosViews/serviceGrid/src/vendor/angular-resource/package.json
index d732075..3fa675b 100644
--- a/applications/auto-scale/gui/src/vendor/angular-animate/package.json
+++ b/views/ngXosViews/serviceGrid/src/vendor/angular-resource/package.json
@@ -1,7 +1,7 @@
{
- "name": "angular-animate",
- "version": "1.4.8",
- "description": "AngularJS module for animations",
+ "name": "angular-resource",
+ "version": "1.4.7",
+ "description": "AngularJS module for interacting with RESTful server-side data sources",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
@@ -14,7 +14,7 @@
"angular",
"framework",
"browser",
- "animation",
+ "rest",
"client-side"
],
"author": "Angular Core Team <angular-core+npm@google.com>",
diff --git a/applications/auto-scale/gui/src/vendor/angular-ui-router/.bower.json b/views/ngXosViews/serviceGrid/src/vendor/angular-ui-router/.bower.json
similarity index 69%
rename from applications/auto-scale/gui/src/vendor/angular-ui-router/.bower.json
rename to views/ngXosViews/serviceGrid/src/vendor/angular-ui-router/.bower.json
index 3ede443..95c7ab9 100644
--- a/applications/auto-scale/gui/src/vendor/angular-ui-router/.bower.json
+++ b/views/ngXosViews/serviceGrid/src/vendor/angular-ui-router/.bower.json
@@ -20,14 +20,14 @@
"Gruntfile.js",
"files.js"
],
- "homepage": "https://github.com/angular-ui/ui-router",
+ "homepage": "https://github.com/angular-ui/angular-ui-router-bower",
"_release": "0.2.15",
"_resolution": {
"type": "version",
"tag": "0.2.15",
- "commit": "805e69bae319e922e4d3265b7ef565058aaff850"
+ "commit": "90ce66133afc3572a8d7556d6d3fcee0efd8bb13"
},
- "_source": "git://github.com/angular-ui/ui-router.git",
- "_target": "~0.2.15",
+ "_source": "https://github.com/angular-ui/angular-ui-router-bower.git",
+ "_target": "0.2.15",
"_originalSource": "angular-ui-router"
}
\ No newline at end of file
diff --git a/applications/auto-scale/gui/src/vendor/angular-ui-router/CHANGELOG.md b/views/ngXosViews/serviceGrid/src/vendor/angular-ui-router/CHANGELOG.md
similarity index 100%
rename from applications/auto-scale/gui/src/vendor/angular-ui-router/CHANGELOG.md
rename to views/ngXosViews/serviceGrid/src/vendor/angular-ui-router/CHANGELOG.md
diff --git a/applications/auto-scale/gui/src/vendor/angular-ui-router/CONTRIBUTING.md b/views/ngXosViews/serviceGrid/src/vendor/angular-ui-router/CONTRIBUTING.md
similarity index 100%
rename from applications/auto-scale/gui/src/vendor/angular-ui-router/CONTRIBUTING.md
rename to views/ngXosViews/serviceGrid/src/vendor/angular-ui-router/CONTRIBUTING.md
diff --git a/applications/auto-scale/gui/src/vendor/angular-ui-router/LICENSE b/views/ngXosViews/serviceGrid/src/vendor/angular-ui-router/LICENSE
similarity index 100%
rename from applications/auto-scale/gui/src/vendor/angular-ui-router/LICENSE
rename to views/ngXosViews/serviceGrid/src/vendor/angular-ui-router/LICENSE
diff --git a/applications/auto-scale/gui/src/vendor/angular-ui-router/README.md b/views/ngXosViews/serviceGrid/src/vendor/angular-ui-router/README.md
similarity index 100%
rename from applications/auto-scale/gui/src/vendor/angular-ui-router/README.md
rename to views/ngXosViews/serviceGrid/src/vendor/angular-ui-router/README.md
diff --git a/applications/auto-scale/gui/src/vendor/angular-ui-router/api/angular-ui-router.d.ts b/views/ngXosViews/serviceGrid/src/vendor/angular-ui-router/api/angular-ui-router.d.ts
similarity index 100%
rename from applications/auto-scale/gui/src/vendor/angular-ui-router/api/angular-ui-router.d.ts
rename to views/ngXosViews/serviceGrid/src/vendor/angular-ui-router/api/angular-ui-router.d.ts
diff --git a/applications/auto-scale/gui/src/vendor/angular-ui-router/bower.json b/views/ngXosViews/serviceGrid/src/vendor/angular-ui-router/bower.json
similarity index 100%
rename from applications/auto-scale/gui/src/vendor/angular-ui-router/bower.json
rename to views/ngXosViews/serviceGrid/src/vendor/angular-ui-router/bower.json
diff --git a/applications/auto-scale/gui/src/vendor/angular-ui-router/release/angular-ui-router.js b/views/ngXosViews/serviceGrid/src/vendor/angular-ui-router/release/angular-ui-router.js
similarity index 100%
rename from applications/auto-scale/gui/src/vendor/angular-ui-router/release/angular-ui-router.js
rename to views/ngXosViews/serviceGrid/src/vendor/angular-ui-router/release/angular-ui-router.js
diff --git a/applications/auto-scale/gui/src/vendor/angular-ui-router/release/angular-ui-router.min.js b/views/ngXosViews/serviceGrid/src/vendor/angular-ui-router/release/angular-ui-router.min.js
similarity index 100%
rename from applications/auto-scale/gui/src/vendor/angular-ui-router/release/angular-ui-router.min.js
rename to views/ngXosViews/serviceGrid/src/vendor/angular-ui-router/release/angular-ui-router.min.js
diff --git a/applications/auto-scale/gui/src/vendor/angular-ui-router/src/common.js b/views/ngXosViews/serviceGrid/src/vendor/angular-ui-router/src/common.js
similarity index 100%
rename from applications/auto-scale/gui/src/vendor/angular-ui-router/src/common.js
rename to views/ngXosViews/serviceGrid/src/vendor/angular-ui-router/src/common.js
diff --git a/applications/auto-scale/gui/src/vendor/angular-ui-router/src/resolve.js b/views/ngXosViews/serviceGrid/src/vendor/angular-ui-router/src/resolve.js
similarity index 100%
rename from applications/auto-scale/gui/src/vendor/angular-ui-router/src/resolve.js
rename to views/ngXosViews/serviceGrid/src/vendor/angular-ui-router/src/resolve.js
diff --git a/applications/auto-scale/gui/src/vendor/angular-ui-router/src/state.js b/views/ngXosViews/serviceGrid/src/vendor/angular-ui-router/src/state.js
similarity index 100%
rename from applications/auto-scale/gui/src/vendor/angular-ui-router/src/state.js
rename to views/ngXosViews/serviceGrid/src/vendor/angular-ui-router/src/state.js
diff --git a/applications/auto-scale/gui/src/vendor/angular-ui-router/src/stateDirectives.js b/views/ngXosViews/serviceGrid/src/vendor/angular-ui-router/src/stateDirectives.js
similarity index 100%
rename from applications/auto-scale/gui/src/vendor/angular-ui-router/src/stateDirectives.js
rename to views/ngXosViews/serviceGrid/src/vendor/angular-ui-router/src/stateDirectives.js
diff --git a/applications/auto-scale/gui/src/vendor/angular-ui-router/src/stateFilters.js b/views/ngXosViews/serviceGrid/src/vendor/angular-ui-router/src/stateFilters.js
similarity index 100%
rename from applications/auto-scale/gui/src/vendor/angular-ui-router/src/stateFilters.js
rename to views/ngXosViews/serviceGrid/src/vendor/angular-ui-router/src/stateFilters.js
diff --git a/applications/auto-scale/gui/src/vendor/angular-ui-router/src/templateFactory.js b/views/ngXosViews/serviceGrid/src/vendor/angular-ui-router/src/templateFactory.js
similarity index 100%
rename from applications/auto-scale/gui/src/vendor/angular-ui-router/src/templateFactory.js
rename to views/ngXosViews/serviceGrid/src/vendor/angular-ui-router/src/templateFactory.js
diff --git a/applications/auto-scale/gui/src/vendor/angular-ui-router/src/urlMatcherFactory.js b/views/ngXosViews/serviceGrid/src/vendor/angular-ui-router/src/urlMatcherFactory.js
similarity index 100%
rename from applications/auto-scale/gui/src/vendor/angular-ui-router/src/urlMatcherFactory.js
rename to views/ngXosViews/serviceGrid/src/vendor/angular-ui-router/src/urlMatcherFactory.js
diff --git a/applications/auto-scale/gui/src/vendor/angular-ui-router/src/urlRouter.js b/views/ngXosViews/serviceGrid/src/vendor/angular-ui-router/src/urlRouter.js
similarity index 100%
rename from applications/auto-scale/gui/src/vendor/angular-ui-router/src/urlRouter.js
rename to views/ngXosViews/serviceGrid/src/vendor/angular-ui-router/src/urlRouter.js
diff --git a/applications/auto-scale/gui/src/vendor/angular-ui-router/src/view.js b/views/ngXosViews/serviceGrid/src/vendor/angular-ui-router/src/view.js
similarity index 100%
rename from applications/auto-scale/gui/src/vendor/angular-ui-router/src/view.js
rename to views/ngXosViews/serviceGrid/src/vendor/angular-ui-router/src/view.js
diff --git a/applications/auto-scale/gui/src/vendor/angular-ui-router/src/viewDirective.js b/views/ngXosViews/serviceGrid/src/vendor/angular-ui-router/src/viewDirective.js
similarity index 100%
rename from applications/auto-scale/gui/src/vendor/angular-ui-router/src/viewDirective.js
rename to views/ngXosViews/serviceGrid/src/vendor/angular-ui-router/src/viewDirective.js
diff --git a/applications/auto-scale/gui/src/vendor/angular-ui-router/src/viewScroll.js b/views/ngXosViews/serviceGrid/src/vendor/angular-ui-router/src/viewScroll.js
similarity index 100%
rename from applications/auto-scale/gui/src/vendor/angular-ui-router/src/viewScroll.js
rename to views/ngXosViews/serviceGrid/src/vendor/angular-ui-router/src/viewScroll.js
diff --git a/views/ngXosViews/serviceGrid/src/vendor/angular/.bower.json b/views/ngXosViews/serviceGrid/src/vendor/angular/.bower.json
new file mode 100644
index 0000000..e15139e
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/angular/.bower.json
@@ -0,0 +1,17 @@
+{
+ "name": "angular",
+ "version": "1.4.7",
+ "main": "./angular.js",
+ "ignore": [],
+ "dependencies": {},
+ "homepage": "https://github.com/angular/bower-angular",
+ "_release": "1.4.7",
+ "_resolution": {
+ "type": "version",
+ "tag": "v1.4.7",
+ "commit": "6bdc6b4855b416bf029105324080ca7d6aca0e9f"
+ },
+ "_source": "https://github.com/angular/bower-angular.git",
+ "_target": "1.4.7",
+ "_originalSource": "angular"
+}
\ No newline at end of file
diff --git a/applications/auto-scale/gui/src/vendor/angular/README.md b/views/ngXosViews/serviceGrid/src/vendor/angular/README.md
similarity index 100%
rename from applications/auto-scale/gui/src/vendor/angular/README.md
rename to views/ngXosViews/serviceGrid/src/vendor/angular/README.md
diff --git a/applications/auto-scale/gui/src/vendor/angular/angular-csp.css b/views/ngXosViews/serviceGrid/src/vendor/angular/angular-csp.css
similarity index 100%
rename from applications/auto-scale/gui/src/vendor/angular/angular-csp.css
rename to views/ngXosViews/serviceGrid/src/vendor/angular/angular-csp.css
diff --git a/applications/auto-scale/gui/src/vendor/angular/angular.js b/views/ngXosViews/serviceGrid/src/vendor/angular/angular.js
similarity index 97%
rename from applications/auto-scale/gui/src/vendor/angular/angular.js
rename to views/ngXosViews/serviceGrid/src/vendor/angular/angular.js
index a3aee7d..34a93c1 100644
--- a/applications/auto-scale/gui/src/vendor/angular/angular.js
+++ b/views/ngXosViews/serviceGrid/src/vendor/angular/angular.js
@@ -1,5 +1,5 @@
/**
- * @license AngularJS v1.4.8
+ * @license AngularJS v1.4.7
* (c) 2010-2015 Google, Inc. http://angularjs.org
* License: MIT
*/
@@ -57,7 +57,7 @@
return match;
});
- message += '\nhttp://errors.angularjs.org/1.4.8/' +
+ message += '\nhttp://errors.angularjs.org/1.4.7/' +
(module ? module + '/' : '') + code;
for (i = SKIP_INDEXES, paramPrefix = '?'; i < templateArgs.length; i++, paramPrefix = '&') {
@@ -267,24 +267,20 @@
* String ...)
*/
function isArrayLike(obj) {
-
- // `null`, `undefined` and `window` are not array-like
- if (obj == null || isWindow(obj)) return false;
-
- // arrays, strings and jQuery/jqLite objects are array like
- // * jqLite is either the jQuery or jqLite constructor function
- // * we have to check the existance of jqLite first as this method is called
- // via the forEach method when constructing the jqLite object in the first place
- if (isArray(obj) || isString(obj) || (jqLite && obj instanceof jqLite)) return true;
+ if (obj == null || isWindow(obj)) {
+ return false;
+ }
// Support: iOS 8.2 (not reproducible in simulator)
// "length" in obj used to prevent JIT error (gh-11508)
var length = "length" in Object(obj) && obj.length;
- // NodeList objects (with `item` method) and
- // other objects with suitable length characteristics are array-like
- return isNumber(length) &&
- (length >= 0 && (length - 1) in obj || typeof obj.item == 'function');
+ if (obj.nodeType === NODE_TYPE_ELEMENT && length) {
+ return true;
+ }
+
+ return isString(obj) || isArray(obj) || length === 0 ||
+ typeof length === 'number' && length > 0 && (length - 1) in obj;
}
/**
@@ -429,10 +425,6 @@
dst[key] = new Date(src.valueOf());
} else if (isRegExp(src)) {
dst[key] = new RegExp(src);
- } else if (src.nodeName) {
- dst[key] = src.cloneNode(true);
- } else if (isElement(src)) {
- dst[key] = src.clone();
} else {
if (!isObject(dst[key])) dst[key] = isArray(src) ? [] : {};
baseExtend(dst[key], [src], true);
@@ -548,7 +540,7 @@
function valueFn(value) {return function() {return value;};}
function hasCustomToString(obj) {
- return isFunction(obj.toString) && obj.toString !== toString;
+ return isFunction(obj.toString) && obj.toString !== Object.prototype.toString;
}
@@ -747,9 +739,9 @@
}
-var TYPED_ARRAY_REGEXP = /^\[object (?:Uint8|Uint8Clamped|Uint16|Uint32|Int8|Int16|Int32|Float32|Float64)Array\]$/;
+var TYPED_ARRAY_REGEXP = /^\[object (Uint8(Clamped)?)|(Uint16)|(Uint32)|(Int8)|(Int16)|(Int32)|(Float(32)|(64))Array\]$/;
function isTypedArray(value) {
- return value && isNumber(value.length) && TYPED_ARRAY_REGEXP.test(toString.call(value));
+ return TYPED_ARRAY_REGEXP.test(toString.call(value));
}
@@ -871,111 +863,100 @@
</file>
</example>
*/
-function copy(source, destination) {
- var stackSource = [];
- var stackDest = [];
-
- if (destination) {
- if (isTypedArray(destination)) {
- throw ngMinErr('cpta', "Can't copy! TypedArray destination cannot be mutated.");
- }
- if (source === destination) {
- throw ngMinErr('cpi', "Can't copy! Source and destination are identical.");
- }
-
- // Empty the destination object
- if (isArray(destination)) {
- destination.length = 0;
- } else {
- forEach(destination, function(value, key) {
- if (key !== '$$hashKey') {
- delete destination[key];
- }
- });
- }
-
- stackSource.push(source);
- stackDest.push(destination);
- return copyRecurse(source, destination);
+function copy(source, destination, stackSource, stackDest) {
+ if (isWindow(source) || isScope(source)) {
+ throw ngMinErr('cpws',
+ "Can't copy! Making copies of Window or Scope instances is not supported.");
+ }
+ if (isTypedArray(destination)) {
+ throw ngMinErr('cpta',
+ "Can't copy! TypedArray destination cannot be mutated.");
}
- return copyElement(source);
+ if (!destination) {
+ destination = source;
+ if (isObject(source)) {
+ var index;
+ if (stackSource && (index = stackSource.indexOf(source)) !== -1) {
+ return stackDest[index];
+ }
- function copyRecurse(source, destination) {
- var h = destination.$$hashKey;
+ // TypedArray, Date and RegExp have specific copy functionality and must be
+ // pushed onto the stack before returning.
+ // Array and other objects create the base object and recurse to copy child
+ // objects. The array/object will be pushed onto the stack when recursed.
+ if (isArray(source)) {
+ return copy(source, [], stackSource, stackDest);
+ } else if (isTypedArray(source)) {
+ destination = new source.constructor(source);
+ } else if (isDate(source)) {
+ destination = new Date(source.getTime());
+ } else if (isRegExp(source)) {
+ destination = new RegExp(source.source, source.toString().match(/[^\/]*$/)[0]);
+ destination.lastIndex = source.lastIndex;
+ } else if (isFunction(source.cloneNode)) {
+ destination = source.cloneNode(true);
+ } else {
+ var emptyObject = Object.create(getPrototypeOf(source));
+ return copy(source, emptyObject, stackSource, stackDest);
+ }
+
+ if (stackDest) {
+ stackSource.push(source);
+ stackDest.push(destination);
+ }
+ }
+ } else {
+ if (source === destination) throw ngMinErr('cpi',
+ "Can't copy! Source and destination are identical.");
+
+ stackSource = stackSource || [];
+ stackDest = stackDest || [];
+
+ if (isObject(source)) {
+ stackSource.push(source);
+ stackDest.push(destination);
+ }
+
var result, key;
if (isArray(source)) {
- for (var i = 0, ii = source.length; i < ii; i++) {
- destination.push(copyElement(source[i]));
- }
- } else if (isBlankObject(source)) {
- // createMap() fast path --- Safe to avoid hasOwnProperty check because prototype chain is empty
- for (key in source) {
- destination[key] = copyElement(source[key]);
- }
- } else if (source && typeof source.hasOwnProperty === 'function') {
- // Slow path, which must rely on hasOwnProperty
- for (key in source) {
- if (source.hasOwnProperty(key)) {
- destination[key] = copyElement(source[key]);
- }
+ destination.length = 0;
+ for (var i = 0; i < source.length; i++) {
+ destination.push(copy(source[i], null, stackSource, stackDest));
}
} else {
- // Slowest path --- hasOwnProperty can't be called as a method
- for (key in source) {
- if (hasOwnProperty.call(source, key)) {
- destination[key] = copyElement(source[key]);
+ var h = destination.$$hashKey;
+ if (isArray(destination)) {
+ destination.length = 0;
+ } else {
+ forEach(destination, function(value, key) {
+ delete destination[key];
+ });
+ }
+ if (isBlankObject(source)) {
+ // createMap() fast path --- Safe to avoid hasOwnProperty check because prototype chain is empty
+ for (key in source) {
+ destination[key] = copy(source[key], null, stackSource, stackDest);
+ }
+ } else if (source && typeof source.hasOwnProperty === 'function') {
+ // Slow path, which must rely on hasOwnProperty
+ for (key in source) {
+ if (source.hasOwnProperty(key)) {
+ destination[key] = copy(source[key], null, stackSource, stackDest);
+ }
+ }
+ } else {
+ // Slowest path --- hasOwnProperty can't be called as a method
+ for (key in source) {
+ if (hasOwnProperty.call(source, key)) {
+ destination[key] = copy(source[key], null, stackSource, stackDest);
+ }
}
}
+ setHashKey(destination,h);
}
- setHashKey(destination, h);
- return destination;
}
-
- function copyElement(source) {
- // Simple values
- if (!isObject(source)) {
- return source;
- }
-
- // Already copied values
- var index = stackSource.indexOf(source);
- if (index !== -1) {
- return stackDest[index];
- }
-
- if (isWindow(source) || isScope(source)) {
- throw ngMinErr('cpws',
- "Can't copy! Making copies of Window or Scope instances is not supported.");
- }
-
- var needsRecurse = false;
- var destination;
-
- if (isArray(source)) {
- destination = [];
- needsRecurse = true;
- } else if (isTypedArray(source)) {
- destination = new source.constructor(source);
- } else if (isDate(source)) {
- destination = new Date(source.getTime());
- } else if (isRegExp(source)) {
- destination = new RegExp(source.source, source.toString().match(/[^\/]*$/)[0]);
- destination.lastIndex = source.lastIndex;
- } else if (isFunction(source.cloneNode)) {
- destination = source.cloneNode(true);
- } else {
- destination = Object.create(getPrototypeOf(source));
- needsRecurse = true;
- }
-
- stackSource.push(source);
- stackDest.push(destination);
-
- return needsRecurse
- ? copyRecurse(source, destination)
- : destination;
- }
+ return destination;
}
/**
@@ -2099,7 +2080,7 @@
* @param {string} name constant name
* @param {*} object Constant value.
* @description
- * Because the constants are fixed, they get applied before other provide methods.
+ * Because the constant are fixed, they get applied before other provide methods.
* See {@link auto.$provide#constant $provide.constant()}.
*/
constant: invokeLater('$provide', 'constant', 'unshift'),
@@ -2398,11 +2379,11 @@
* - `codeName` – `{string}` – Code name of the release, such as "jiggling-armfat".
*/
var version = {
- full: '1.4.8', // all of these placeholder strings will be replaced by grunt's
+ full: '1.4.7', // all of these placeholder strings will be replaced by grunt's
major: 1, // package task
minor: 4,
- dot: 8,
- codeName: 'ice-manipulation'
+ dot: 7,
+ codeName: 'dark-luminescence'
};
@@ -2784,14 +2765,6 @@
return [];
}
-
-// IE9-11 has no method "contains" in SVG element and in Node.prototype. Bug #10259.
-var jqLiteContains = Node.prototype.contains || function(arg) {
- // jshint bitwise: false
- return !!(this.compareDocumentPosition(arg) & 16);
- // jshint bitwise: true
-};
-
/////////////////////////////////////////////
function JQLite(element) {
if (element instanceof JQLite) {
@@ -2850,23 +2823,17 @@
delete events[type];
}
} else {
-
- var removeHandler = function(type) {
- var listenerFns = events[type];
- if (isDefined(fn)) {
- arrayRemove(listenerFns || [], fn);
- }
- if (!(isDefined(fn) && listenerFns && listenerFns.length > 0)) {
- removeEventListenerFn(element, type, handle);
- delete events[type];
- }
- };
-
forEach(type.split(' '), function(type) {
- removeHandler(type);
- if (MOUSE_EVENT_MAP[type]) {
- removeHandler(MOUSE_EVENT_MAP[type]);
+ if (isDefined(fn)) {
+ var listenerFns = events[type];
+ arrayRemove(listenerFns || [], fn);
+ if (listenerFns && listenerFns.length > 0) {
+ return;
+ }
}
+
+ removeEventListenerFn(element, type, handle);
+ delete events[type];
});
}
}
@@ -3321,9 +3288,6 @@
return event.immediatePropagationStopped === true;
};
- // Some events have special handlers that wrap the real handler
- var handlerWrapper = eventFns.specialHandlerWrapper || defaultHandlerWrapper;
-
// Copy event handlers in case event handlers array is modified during execution.
if ((eventFnsLength > 1)) {
eventFns = shallowCopy(eventFns);
@@ -3331,7 +3295,7 @@
for (var i = 0; i < eventFnsLength; i++) {
if (!event.isImmediatePropagationStopped()) {
- handlerWrapper(element, event, eventFns[i]);
+ eventFns[i].call(element, event);
}
}
};
@@ -3342,22 +3306,6 @@
return eventHandler;
}
-function defaultHandlerWrapper(element, event, handler) {
- handler.call(element, event);
-}
-
-function specialMouseHandlerWrapper(target, event, handler) {
- // Refer to jQuery's implementation of mouseenter & mouseleave
- // Read about mouseenter and mouseleave:
- // http://www.quirksmode.org/js/events_mouse.html#link8
- var related = event.relatedTarget;
- // For mousenter/leave call the handler if related is outside the target.
- // NB: No relatedTarget if the mouse left/entered the browser window
- if (!related || (related !== target && !jqLiteContains.call(target, related))) {
- handler.call(target, event);
- }
-}
-
//////////////////////////////////////////
// Functions iterating traversal.
// These functions chain results into a single
@@ -3386,28 +3334,35 @@
var types = type.indexOf(' ') >= 0 ? type.split(' ') : [type];
var i = types.length;
- var addHandler = function(type, specialHandlerWrapper, noEventListener) {
+ while (i--) {
+ type = types[i];
var eventFns = events[type];
if (!eventFns) {
- eventFns = events[type] = [];
- eventFns.specialHandlerWrapper = specialHandlerWrapper;
- if (type !== '$destroy' && !noEventListener) {
- addEventListenerFn(element, type, handle);
+ events[type] = [];
+
+ if (type === 'mouseenter' || type === 'mouseleave') {
+ // Refer to jQuery's implementation of mouseenter & mouseleave
+ // Read about mouseenter and mouseleave:
+ // http://www.quirksmode.org/js/events_mouse.html#link8
+
+ jqLiteOn(element, MOUSE_EVENT_MAP[type], function(event) {
+ var target = this, related = event.relatedTarget;
+ // For mousenter/leave call the handler if related is outside the target.
+ // NB: No relatedTarget if the mouse left/entered the browser window
+ if (!related || (related !== target && !target.contains(related))) {
+ handle(event, type);
+ }
+ });
+
+ } else {
+ if (type !== '$destroy') {
+ addEventListenerFn(element, type, handle);
+ }
}
+ eventFns = events[type];
}
-
eventFns.push(fn);
- };
-
- while (i--) {
- type = types[i];
- if (MOUSE_EVENT_MAP[type]) {
- addHandler(MOUSE_EVENT_MAP[type], specialMouseHandlerWrapper);
- addHandler(type, undefined, true);
- } else {
- addHandler(type);
- }
}
},
@@ -4588,7 +4543,7 @@
* When called, it scrolls to the element related to the specified `hash` or (if omitted) to the
* current value of {@link ng.$location#hash $location.hash()}, according to the rules specified
* in the
- * [HTML5 spec](http://www.w3.org/html/wg/drafts/html/master/browsers.html#the-indicated-part-of-the-document).
+ * [HTML5 spec](http://dev.w3.org/html5/spec/Overview.html#the-indicated-part-of-the-document).
*
* It also watches the {@link ng.$location#hash $location.hash()} and automatically scrolls to
* match any anchor whenever it changes. This can be disabled by calling
@@ -5103,7 +5058,7 @@
* when an animation is detected (and animations are enabled), $animate will do the heavy lifting
* to ensure that animation runs with the triggered DOM operation.
*
- * By default $animate doesn't trigger any animations. This is because the `ngAnimate` module isn't
+ * By default $animate doesn't trigger an animations. This is because the `ngAnimate` module isn't
* included and only when it is active then the animation hooks that `$animate` triggers will be
* functional. Once active then all structural `ng-` directives will trigger animations as they perform
* their DOM-related operations (enter, leave and move). Other directives such as `ngClass`,
@@ -5955,9 +5910,9 @@
var size = 0,
stats = extend({}, options, {id: cacheId}),
- data = createMap(),
+ data = {},
capacity = (options && options.capacity) || Number.MAX_VALUE,
- lruHash = createMap(),
+ lruHash = {},
freshEnd = null,
staleEnd = null;
@@ -6085,8 +6040,6 @@
delete lruHash[key];
}
- if (!(key in data)) return;
-
delete data[key];
size--;
},
@@ -6101,9 +6054,9 @@
* Clears the cache object of any entries.
*/
removeAll: function() {
- data = createMap();
+ data = {};
size = 0;
- lruHash = createMap();
+ lruHash = {};
freshEnd = staleEnd = null;
},
@@ -7504,7 +7457,6 @@
return template.replace(/\{\{/g, startSymbol).replace(/}}/g, endSymbol);
},
NG_ATTR_BINDING = /^ngAttr[A-Z]/;
- var MULTI_ELEMENT_DIR_RE = /^(.+)Start$/;
compile.$$addBindingInfo = debugInfoEnabled ? function $$addBindingInfo($element, binding) {
var bindings = $element.data('$binding') || [];
@@ -7557,14 +7509,6 @@
return function publicLinkFn(scope, cloneConnectFn, options) {
assertArg(scope, 'scope');
- if (previousCompileContext && previousCompileContext.needsNewScope) {
- // A parent directive did a replace and a directive on this element asked
- // for transclusion, which caused us to lose a layer of element on which
- // we could hold the new transclusion scope, so we will create it manually
- // here.
- scope = scope.$parent.$new();
- }
-
options = options || {};
var parentBoundTranscludeFn = options.parentBoundTranscludeFn,
transcludeControllers = options.transcludeControllers,
@@ -7710,6 +7654,11 @@
if (nodeLinkFn.scope) {
childScope = scope.$new();
compile.$$addScopeInfo(jqLite(node), childScope);
+ var destroyBindings = nodeLinkFn.$$destroyBindings;
+ if (destroyBindings) {
+ nodeLinkFn.$$destroyBindings = null;
+ childScope.$on('$destroyed', destroyBindings);
+ }
} else {
childScope = scope;
}
@@ -7728,7 +7677,8 @@
childBoundTranscludeFn = null;
}
- nodeLinkFn(childLinkFn, childScope, node, $rootElement, childBoundTranscludeFn);
+ nodeLinkFn(childLinkFn, childScope, node, $rootElement, childBoundTranscludeFn,
+ nodeLinkFn);
} else if (childLinkFn) {
childLinkFn(scope, node.childNodes, undefined, parentBoundTranscludeFn);
@@ -7797,11 +7747,13 @@
});
}
- var multiElementMatch = ngAttrName.match(MULTI_ELEMENT_DIR_RE);
- if (multiElementMatch && directiveIsMultiElement(multiElementMatch[1])) {
- attrStartName = name;
- attrEndName = name.substr(0, name.length - 5) + 'end';
- name = name.substr(0, name.length - 6);
+ var directiveNName = ngAttrName.replace(/(Start|End)$/, '');
+ if (directiveIsMultiElement(directiveNName)) {
+ if (ngAttrName === directiveNName + 'Start') {
+ attrStartName = name;
+ attrEndName = name.substr(0, name.length - 5) + 'end';
+ name = name.substr(0, name.length - 6);
+ }
}
nName = directiveNormalize(name.toLowerCase());
@@ -8040,8 +7992,7 @@
} else {
$template = jqLite(jqLiteClone(compileNode)).contents();
$compileNode.empty(); // clear contents
- childTranscludeFn = compile($template, transcludeFn, undefined,
- undefined, { needsNewScope: directive.$$isolateScope || directive.$$newScope});
+ childTranscludeFn = compile($template, transcludeFn);
}
}
@@ -8083,11 +8034,8 @@
var templateDirectives = collectDirectives(compileNode, [], newTemplateAttrs);
var unprocessedDirectives = directives.splice(i + 1, directives.length - (i + 1));
- if (newIsolateScopeDirective || newScopeDirective) {
- // The original directive caused the current element to be replaced but this element
- // also needs to have a new scope, so we need to tell the template directives
- // that they would need to get their scope from further up, if they require transclusion
- markDirectiveScope(templateDirectives, newIsolateScopeDirective, newScopeDirective);
+ if (newIsolateScopeDirective) {
+ markDirectivesAsIsolate(templateDirectives);
}
directives = directives.concat(templateDirectives).concat(unprocessedDirectives);
mergeTemplateAttributes(templateAttrs, newTemplateAttrs);
@@ -8240,9 +8188,10 @@
return elementControllers;
}
- function nodeLinkFn(childLinkFn, scope, linkNode, $rootElement, boundTranscludeFn) {
- var linkFn, isolateScope, controllerScope, elementControllers, transcludeFn, $element,
- attrs, removeScopeBindingWatches, removeControllerBindingWatches;
+ function nodeLinkFn(childLinkFn, scope, linkNode, $rootElement, boundTranscludeFn,
+ thisLinkFn) {
+ var i, ii, linkFn, controller, isolateScope, elementControllers, transcludeFn, $element,
+ attrs;
if (compileNode === linkNode) {
attrs = templateAttrs;
@@ -8252,11 +8201,8 @@
attrs = new Attributes($element, templateAttrs);
}
- controllerScope = scope;
if (newIsolateScopeDirective) {
isolateScope = scope.$new(true);
- } else if (newScopeDirective) {
- controllerScope = scope.$parent;
}
if (boundTranscludeFn) {
@@ -8277,34 +8223,42 @@
compile.$$addScopeClass($element, true);
isolateScope.$$isolateBindings =
newIsolateScopeDirective.$$isolateBindings;
- removeScopeBindingWatches = initializeDirectiveBindings(scope, attrs, isolateScope,
- isolateScope.$$isolateBindings,
- newIsolateScopeDirective);
- if (removeScopeBindingWatches) {
- isolateScope.$on('$destroy', removeScopeBindingWatches);
- }
+ initializeDirectiveBindings(scope, attrs, isolateScope,
+ isolateScope.$$isolateBindings,
+ newIsolateScopeDirective, isolateScope);
}
+ if (elementControllers) {
+ // Initialize bindToController bindings for new/isolate scopes
+ var scopeDirective = newIsolateScopeDirective || newScopeDirective;
+ var bindings;
+ var controllerForBindings;
+ if (scopeDirective && elementControllers[scopeDirective.name]) {
+ bindings = scopeDirective.$$bindings.bindToController;
+ controller = elementControllers[scopeDirective.name];
- // Initialize bindToController bindings
- for (var name in elementControllers) {
- var controllerDirective = controllerDirectives[name];
- var controller = elementControllers[name];
- var bindings = controllerDirective.$$bindings.bindToController;
-
- if (controller.identifier && bindings) {
- removeControllerBindingWatches =
- initializeDirectiveBindings(controllerScope, attrs, controller.instance, bindings, controllerDirective);
+ if (controller && controller.identifier && bindings) {
+ controllerForBindings = controller;
+ thisLinkFn.$$destroyBindings =
+ initializeDirectiveBindings(scope, attrs, controller.instance,
+ bindings, scopeDirective);
+ }
}
+ for (i in elementControllers) {
+ controller = elementControllers[i];
+ var controllerResult = controller();
- var controllerResult = controller();
- if (controllerResult !== controller.instance) {
- // If the controller constructor has a return value, overwrite the instance
- // from setupControllers
- controller.instance = controllerResult;
- $element.data('$' + controllerDirective.name + 'Controller', controllerResult);
- removeControllerBindingWatches && removeControllerBindingWatches();
- removeControllerBindingWatches =
- initializeDirectiveBindings(controllerScope, attrs, controller.instance, bindings, controllerDirective);
+ if (controllerResult !== controller.instance) {
+ // If the controller constructor has a return value, overwrite the instance
+ // from setupControllers and update the element data
+ controller.instance = controllerResult;
+ $element.data('$' + i + 'Controller', controllerResult);
+ if (controller === controllerForBindings) {
+ // Remove and re-install bindToController bindings
+ thisLinkFn.$$destroyBindings();
+ thisLinkFn.$$destroyBindings =
+ initializeDirectiveBindings(scope, attrs, controllerResult, bindings, scopeDirective);
+ }
+ }
}
}
@@ -8364,15 +8318,10 @@
}
}
- // Depending upon the context in which a directive finds itself it might need to have a new isolated
- // or child scope created. For instance:
- // * if the directive has been pulled into a template because another directive with a higher priority
- // asked for element transclusion
- // * if the directive itself asks for transclusion but it is at the root of a template and the original
- // element was replaced. See https://github.com/angular/angular.js/issues/12936
- function markDirectiveScope(directives, isolateScope, newScope) {
+ function markDirectivesAsIsolate(directives) {
+ // mark all directives as needing isolate scope.
for (var j = 0, jj = directives.length; j < jj; j++) {
- directives[j] = inherit(directives[j], {$$isolateScope: isolateScope, $$newScope: newScope});
+ directives[j] = inherit(directives[j], {$$isolateScope: true});
}
}
@@ -8519,9 +8468,7 @@
var templateDirectives = collectDirectives(compileNode, [], tempTemplateAttrs);
if (isObject(origAsyncDirective.scope)) {
- // the original directive that caused the template to be loaded async required
- // an isolate scope
- markDirectiveScope(templateDirectives, true);
+ markDirectivesAsIsolate(templateDirectives);
}
directives = templateDirectives.concat(directives);
mergeTemplateAttributes(tAttrs, tempTemplateAttrs);
@@ -8570,7 +8517,7 @@
childBoundTranscludeFn = boundTranscludeFn;
}
afterTemplateNodeLinkFn(afterTemplateChildLinkFn, scope, linkNode, $rootElement,
- childBoundTranscludeFn);
+ childBoundTranscludeFn, afterTemplateNodeLinkFn);
}
linkQueue = null;
});
@@ -8587,7 +8534,8 @@
if (afterTemplateNodeLinkFn.transcludeOnThisElement) {
childBoundTranscludeFn = createBoundTranscludeFn(scope, afterTemplateNodeLinkFn.transclude, boundTranscludeFn);
}
- afterTemplateNodeLinkFn(afterTemplateChildLinkFn, scope, node, rootElement, childBoundTranscludeFn);
+ afterTemplateNodeLinkFn(afterTemplateChildLinkFn, scope, node, rootElement, childBoundTranscludeFn,
+ afterTemplateNodeLinkFn);
}
};
}
@@ -8799,7 +8747,7 @@
// Copy over user data (that includes Angular's $scope etc.). Don't copy private
// data here because there's no public interface in jQuery to do that and copying over
// event listeners (which is the main use of private data) wouldn't work anyway.
- jqLite.data(newNode, jqLite.data(firstElementToRemove));
+ jqLite(newNode).data(jqLite(firstElementToRemove).data());
// Remove data of the replaced element. We cannot just call .remove()
// on the element it since that would deallocate scope that is needed
@@ -8847,8 +8795,9 @@
// Set up $watches for isolate scope and controller bindings. This process
// only occurs for isolate scopes and new scopes with controllerAs.
- function initializeDirectiveBindings(scope, attrs, destination, bindings, directive) {
- var removeWatchCollection = [];
+ function initializeDirectiveBindings(scope, attrs, destination, bindings,
+ directive, newScope) {
+ var onNewScopeDestroyed;
forEach(bindings, function(definition, scopeName) {
var attrName = definition.attrName,
optional = definition.optional,
@@ -8910,13 +8859,14 @@
return lastValue = parentValue;
};
parentValueWatch.$stateful = true;
- var removeWatch;
+ var unwatch;
if (definition.collection) {
- removeWatch = scope.$watchCollection(attrs[attrName], parentValueWatch);
+ unwatch = scope.$watchCollection(attrs[attrName], parentValueWatch);
} else {
- removeWatch = scope.$watch($parse(attrs[attrName], parentValueWatch), null, parentGet.literal);
+ unwatch = scope.$watch($parse(attrs[attrName], parentValueWatch), null, parentGet.literal);
}
- removeWatchCollection.push(removeWatch);
+ onNewScopeDestroyed = (onNewScopeDestroyed || []);
+ onNewScopeDestroyed.push(unwatch);
break;
case '&':
@@ -8932,12 +8882,16 @@
break;
}
});
-
- return removeWatchCollection.length && function removeWatches() {
- for (var i = 0, ii = removeWatchCollection.length; i < ii; ++i) {
- removeWatchCollection[i]();
+ var destroyBindings = onNewScopeDestroyed ? function destroyBindings() {
+ for (var i = 0, ii = onNewScopeDestroyed.length; i < ii; ++i) {
+ onNewScopeDestroyed[i]();
}
- };
+ } : noop;
+ if (newScope && destroyBindings !== noop) {
+ newScope.$on('$destroy', destroyBindings);
+ return noop;
+ }
+ return destroyBindings;
}
}];
}
@@ -9662,9 +9616,9 @@
* Configure `$http` service to return promises without the shorthand methods `success` and `error`.
* This should be used to make sure that applications work without these methods.
*
- * Defaults to true. If no value is specified, returns the current configured value.
+ * Defaults to false. If no value is specified, returns the current configured value.
*
- * @param {boolean=} value If true, `$http` will return a promise with the deprecated legacy `success` and `error` methods.
+ * @param {boolean=} value If true, `$http` will return a normal promise without the `success` and `error` methods.
*
* @returns {boolean|Object} If a value is specified, returns the $httpProvider for chaining.
* otherwise, returns the current configured value.
@@ -10316,8 +10270,11 @@
function transformResponse(response) {
// make a copy since the response must be cacheable
var resp = extend({}, response);
- resp.data = transformData(response.data, response.headers, response.status,
- config.transformResponse);
+ if (!response.data) {
+ resp.data = response.data;
+ } else {
+ resp.data = transformData(response.data, response.headers, response.status, config.transformResponse);
+ }
return (isSuccess(response.status))
? resp
: $q.reject(resp);
@@ -11951,9 +11908,9 @@
* @description
* This method is getter / setter.
*
- * Returns the hash fragment when called without any parameters.
+ * Return hash fragment when called without any parameter.
*
- * Changes the hash fragment when called with a parameter and returns `$location`.
+ * Change hash fragment when called with parameter and return `$location`.
*
*
* ```js
@@ -11974,8 +11931,8 @@
* @name $location#replace
*
* @description
- * If called, all changes to $location during the current `$digest` will replace the current history
- * record, instead of adding a new one.
+ * If called, all changes to $location during current `$digest` will be replacing current history
+ * record, instead of adding new one.
*/
replace: function() {
this.$$replace = true;
@@ -12295,7 +12252,7 @@
var oldUrl = $location.absUrl();
var oldState = $location.$$state;
var defaultPrevented;
- newUrl = trimEmptyHash(newUrl);
+
$location.$$parse(newUrl);
$location.$$state = newState;
@@ -14436,14 +14393,13 @@
function addInterceptor(parsedExpression, interceptorFn) {
if (!interceptorFn) return parsedExpression;
var watchDelegate = parsedExpression.$$watchDelegate;
- var useInputs = false;
var regularWatch =
watchDelegate !== oneTimeLiteralWatchDelegate &&
watchDelegate !== oneTimeWatchDelegate;
var fn = regularWatch ? function regularInterceptedExpression(scope, locals, assign, inputs) {
- var value = useInputs && inputs ? inputs[0] : parsedExpression(scope, locals, assign, inputs);
+ var value = parsedExpression(scope, locals, assign, inputs);
return interceptorFn(value, scope, locals);
} : function oneTimeInterceptedExpression(scope, locals, assign, inputs) {
var value = parsedExpression(scope, locals, assign, inputs);
@@ -14461,7 +14417,6 @@
// If there is an interceptor, but no watchDelegate then treat the interceptor like
// we treat filters - it is assumed to be a pure function unless flagged with $stateful
fn.$$watchDelegate = inputsWatchDelegate;
- useInputs = !parsedExpression.inputs;
fn.inputs = parsedExpression.inputs ? parsedExpression.inputs : [parsedExpression];
}
@@ -14523,8 +14478,6 @@
*
* Note: progress/notify callbacks are not currently supported via the ES6-style interface.
*
- * Note: unlike ES6 behaviour, an exception thrown in the constructor function will NOT implicitly reject the promise.
- *
* However, the more traditional CommonJS-style usage is still available, and documented below.
*
* [The CommonJS Promise proposal](http://wiki.commonjs.org/wiki/Promises) describes a promise as an
@@ -15109,15 +15062,15 @@
* exposed as $$____ properties
*
* Loop operations are optimized by using while(count--) { ... }
- * - This means that in order to keep the same order of execution as addition we have to add
+ * - this means that in order to keep the same order of execution as addition we have to add
* items to the array at the beginning (unshift) instead of at the end (push)
*
* Child scopes are created and removed often
- * - Using an array would be slow since inserts in the middle are expensive; so we use linked lists
+ * - Using an array would be slow since inserts in middle are expensive so we use linked list
*
- * There are fewer watches than observers. This is why you don't want the observer to be implemented
- * in the same way as watch. Watch requires return of the initialization function which is expensive
- * to construct.
+ * There are few watches then a lot of observers. This is why you don't want the observer to be
+ * implemented in the same way as watch. Watch requires return of initialization function which
+ * are expensive to construct.
*/
@@ -15159,7 +15112,7 @@
* Every application has a single root {@link ng.$rootScope.Scope scope}.
* All other scopes are descendant scopes of the root scope. Scopes provide separation
* between the model and the view, via a mechanism for watching the model for changes.
- * They also provide event emission/broadcast and subscription facility. See the
+ * They also provide an event emission/broadcast and subscription facility. See the
* {@link guide/scope developer guide on scopes}.
*/
function $RootScopeProvider() {
@@ -15196,29 +15149,6 @@
$event.currentScope.$$destroyed = true;
}
- function cleanUpScope($scope) {
-
- if (msie === 9) {
- // There is a memory leak in IE9 if all child scopes are not disconnected
- // completely when a scope is destroyed. So this code will recurse up through
- // all this scopes children
- //
- // See issue https://github.com/angular/angular.js/issues/10706
- $scope.$$childHead && cleanUpScope($scope.$$childHead);
- $scope.$$nextSibling && cleanUpScope($scope.$$nextSibling);
- }
-
- // The code below works around IE9 and V8's memory leaks
- //
- // See:
- // - https://code.google.com/p/v8/issues/detail?id=2073#c26
- // - https://github.com/angular/angular.js/issues/6794#issuecomment-38648909
- // - https://github.com/angular/angular.js/issues/1313#issuecomment-10378451
-
- $scope.$parent = $scope.$$nextSibling = $scope.$$prevSibling = $scope.$$childHead =
- $scope.$$childTail = $scope.$root = $scope.$$watchers = null;
- }
-
/**
* @ngdoc type
* @name $rootScope.Scope
@@ -16015,9 +15945,16 @@
this.$on = this.$watch = this.$watchGroup = function() { return noop; };
this.$$listeners = {};
- // Disconnect the next sibling to prevent `cleanUpScope` destroying those too
- this.$$nextSibling = null;
- cleanUpScope(this);
+ // All of the code below is bogus code that works around V8's memory leak via optimized code
+ // and inline caches.
+ //
+ // see:
+ // - https://code.google.com/p/v8/issues/detail?id=2073#c26
+ // - https://github.com/angular/angular.js/issues/6794#issuecomment-38648909
+ // - https://github.com/angular/angular.js/issues/1313#issuecomment-10378451
+
+ this.$parent = this.$$nextSibling = this.$$prevSibling = this.$$childHead =
+ this.$$childTail = this.$root = this.$$watchers = null;
},
/**
@@ -17013,7 +16950,7 @@
* By default, Angular only loads templates from the same domain and protocol as the application
* document. This is done by calling {@link ng.$sce#getTrustedResourceUrl
* $sce.getTrustedResourceUrl} on the template URL. To load templates from other domains and/or
- * protocols, you may either {@link ng.$sceDelegateProvider#resourceUrlWhitelist whitelist
+ * protocols, you may either either {@link ng.$sceDelegateProvider#resourceUrlWhitelist whitelist
* them} or {@link ng.$sce#trustAsResourceUrl wrap it} into a trusted value.
*
* *Please note*:
@@ -19264,7 +19201,7 @@
if (!isArray(input) && !isString(input)) return input;
begin = (!begin || isNaN(begin)) ? 0 : toInt(begin);
- begin = (begin < 0) ? Math.max(0, input.length + begin) : begin;
+ begin = (begin < 0 && begin >= -input.length) ? input.length + begin : begin;
if (limit >= 0) {
return input.slice(begin, begin + limit);
@@ -20624,8 +20561,7 @@
// Regex code is obtained from SO: https://stackoverflow.com/questions/3143070/javascript-regex-iso-datetime#answer-3143231
var ISO_DATE_REGEXP = /\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z)/;
-// See valid URLs in RFC3987 (http://tools.ietf.org/html/rfc3987)
-var URL_REGEXP = /^[A-Za-z][A-Za-z\d.+-]*:\/*(?:\w+(?::\w+)?@)?[^\s/]+(?::\d+)?(?:\/[\w#!:.?+=&%@\-/]*)?$/;
+var URL_REGEXP = /^(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?$/;
var EMAIL_REGEXP = /^[a-z0-9!#$%&'*+\/=?^_`{|}~.-]+@[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$/i;
var NUMBER_REGEXP = /^\s*(\-|\+)?(\d+|(\d*(\.\d*)))([eE][+-]?\d+)?\s*$/;
var DATE_REGEXP = /^(\d{4})-(\d{2})-(\d{2})$/;
@@ -24191,13 +24127,7 @@
* @param {string} ngInclude|src angular expression evaluating to URL. If the source is a string constant,
* make sure you wrap it in **single** quotes, e.g. `src="'myPartialTemplate.html'"`.
* @param {string=} onload Expression to evaluate when a new partial is loaded.
- * <div class="alert alert-warning">
- * **Note:** When using onload on SVG elements in IE11, the browser will try to call
- * a function with the name on the window element, which will usually throw a
- * "function is undefined" error. To fix this, you can instead use `data-onload` or a
- * different form that {@link guide/directive#normalization matches} `onload`.
- * </div>
- *
+ *
* @param {string=} autoscroll Whether `ngInclude` should call {@link ng.$anchorScroll
* $anchorScroll} to scroll the viewport after the content is loaded.
*
@@ -25790,13 +25720,12 @@
</label><br />
</form>
<pre>user.name = <span ng-bind="user.name"></span></pre>
- <pre>user.data = <span ng-bind="user.data"></span></pre>
</div>
</file>
<file name="app.js">
angular.module('optionsExample', [])
.controller('ExampleController', ['$scope', function($scope) {
- $scope.user = { name: 'John', data: '' };
+ $scope.user = { name: 'say', data: '' };
$scope.cancel = function(e) {
if (e.keyCode == 27) {
@@ -25811,20 +25740,20 @@
var other = element(by.model('user.data'));
it('should allow custom events', function() {
- input.sendKeys(' Doe');
+ input.sendKeys(' hello');
input.click();
- expect(model.getText()).toEqual('John');
+ expect(model.getText()).toEqual('say');
other.click();
- expect(model.getText()).toEqual('John Doe');
+ expect(model.getText()).toEqual('say hello');
});
it('should $rollbackViewValue when model changes', function() {
- input.sendKeys(' Doe');
- expect(input.getAttribute('value')).toEqual('John Doe');
+ input.sendKeys(' hello');
+ expect(input.getAttribute('value')).toEqual('say hello');
input.sendKeys(protractor.Key.ESCAPE);
- expect(input.getAttribute('value')).toEqual('John');
+ expect(input.getAttribute('value')).toEqual('say');
other.click();
- expect(model.getText()).toEqual('John');
+ expect(model.getText()).toEqual('say');
});
</file>
</example>
@@ -25850,7 +25779,7 @@
<file name="app.js">
angular.module('optionsExample', [])
.controller('ExampleController', ['$scope', function($scope) {
- $scope.user = { name: 'Igor' };
+ $scope.user = { name: 'say' };
}]);
</file>
</example>
@@ -26083,27 +26012,19 @@
*
* ## Complex Models (objects or collections)
*
- * By default, `ngModel` watches the model by reference, not value. This is important to know when
- * binding the select to a model that is an object or a collection.
+ * **Note:** By default, `ngModel` watches the model by reference, not value. This is important when
+ * binding any input directive to a model that is an object or a collection.
*
- * One issue occurs if you want to preselect an option. For example, if you set
- * the model to an object that is equal to an object in your collection, `ngOptions` won't be able to set the selection,
- * because the objects are not identical. So by default, you should always reference the item in your collection
- * for preselections, e.g.: `$scope.selected = $scope.collection[3]`.
- *
- * Another solution is to use a `track by` clause, because then `ngOptions` will track the identity
- * of the item not by reference, but by the result of the `track by` expression. For example, if your
- * collection items have an id property, you would `track by item.id`.
- *
- * A different issue with objects or collections is that ngModel won't detect if an object property or
- * a collection item changes. For that reason, `ngOptions` additionally watches the model using
- * `$watchCollection`, when the expression contains a `track by` clause or the the select has the `multiple` attribute.
- * This allows ngOptions to trigger a re-rendering of the options even if the actual object/collection
- * has not changed identity, but only a property on the object or an item in the collection changes.
+ * Since this is a common situation for `ngOptions` the directive additionally watches the model using
+ * `$watchCollection` when the select has the `multiple` attribute or when there is a `track by` clause in
+ * the options expression. This allows ngOptions to trigger a re-rendering of the options even if the actual
+ * object/collection has not changed identity but only a property on the object or an item in the collection
+ * changes.
*
* Note that `$watchCollection` does a shallow comparison of the properties of the object (or the items in the collection
- * if the model is an array). This means that changing a property deeper than the first level inside the
- * object/collection will not trigger a re-rendering.
+ * if the model is an array). This means that changing a property deeper inside the object/collection that the
+ * first level will not trigger a re-rendering.
+ *
*
* ## `select` **`as`**
*
@@ -26116,13 +26037,17 @@
* ### `select` **`as`** and **`track by`**
*
* <div class="alert alert-warning">
- * Be careful when using `select` **`as`** and **`track by`** in the same expression.
+ * Do not use `select` **`as`** and **`track by`** in the same expression. They are not designed to work together.
* </div>
*
- * Given this array of items on the $scope:
+ * Consider the following example:
+ *
+ * ```html
+ * <select ng-options="item.subItem as item.label for item in values track by item.id" ng-model="selected"></select>
+ * ```
*
* ```js
- * $scope.items = [{
+ * $scope.values = [{
* id: 1,
* label: 'aLabel',
* subItem: { name: 'aSubItem' }
@@ -26131,33 +26056,20 @@
* label: 'bLabel',
* subItem: { name: 'bSubItem' }
* }];
+ *
+ * $scope.selected = { name: 'aSubItem' };
* ```
*
- * This will work:
+ * With the purpose of preserving the selection, the **`track by`** expression is always applied to the element
+ * of the data source (to `item` in this example). To calculate whether an element is selected, we do the
+ * following:
*
- * ```html
- * <select ng-options="item as item.label for item in items track by item.id" ng-model="selected"></select>
- * ```
- * ```js
- * $scope.selected = $scope.items[0];
- * ```
- *
- * but this will not work:
- *
- * ```html
- * <select ng-options="item.subItem as item.label for item in items track by item.id" ng-model="selected"></select>
- * ```
- * ```js
- * $scope.selected = $scope.items[0].subItem;
- * ```
- *
- * In both examples, the **`track by`** expression is applied successfully to each `item` in the
- * `items` array. Because the selected option has been set programmatically in the controller, the
- * **`track by`** expression is also applied to the `ngModel` value. In the first example, the
- * `ngModel` value is `items[0]` and the **`track by`** expression evaluates to `items[0].id` with
- * no issue. In the second example, the `ngModel` value is `items[0].subItem` and the **`track by`**
- * expression evaluates to `items[0].subItem.id` (which is undefined). As a result, the model value
- * is not matched against any `<option>` and the `<select>` appears as having no selected value.
+ * 1. Apply **`track by`** to the elements in the array. In the example: `[1, 2]`
+ * 2. Apply **`track by`** to the already selected value in `ngModel`.
+ * In the example: this is not possible as **`track by`** refers to `item.id`, but the selected
+ * value from `ngModel` is `{name: 'aSubItem'}`, so the **`track by`** expression is applied to
+ * a wrong object, the selected element can't be found, `<select>` is always reset to the "not
+ * selected" option.
*
*
* @param {string} ngModel Assignable angular expression to data-bind to.
@@ -26459,8 +26371,11 @@
var optionTemplate = document.createElement('option'),
optGroupTemplate = document.createElement('optgroup');
-
- function ngOptionsPostLink(scope, selectElement, attr, ctrls) {
+ return {
+ restrict: 'A',
+ terminal: true,
+ require: ['select', '?ngModel'],
+ link: function(scope, selectElement, attr, ctrls) {
// if ngModel is not defined, we don't need to do anything
var ngModelCtrl = ctrls[1];
@@ -26515,6 +26430,7 @@
unknownOption.remove();
};
+
// Update the controller methods for multiple selectable options
if (!multiple) {
@@ -26689,15 +26605,13 @@
var emptyOption_ = emptyOption && emptyOption[0];
var unknownOption_ = unknownOption && unknownOption[0];
- // We cannot rely on the extracted empty option being the same as the compiled empty option,
- // because the compiled empty option might have been replaced by a comment because
- // it had an "element" transclusion directive on it (such as ngIf)
if (emptyOption_ || unknownOption_) {
while (current &&
(current === emptyOption_ ||
current === unknownOption_ ||
- current.nodeType === NODE_TYPE_COMMENT ||
- current.value === '')) {
+ emptyOption_ && emptyOption_.nodeType === NODE_TYPE_COMMENT)) {
+ // Empty options might have directives that transclude
+ // and insert comments (e.g. ngIf)
current = current.nextSibling;
}
}
@@ -26794,20 +26708,7 @@
}
}
- }
- return {
- restrict: 'A',
- terminal: true,
- require: ['select', '?ngModel'],
- link: {
- pre: function ngOptionsPreLink(scope, selectElement, attr, ctrls) {
- // Deactivate the SelectController.register method to prevent
- // option directives from accidentally registering themselves
- // (and unwanted $destroy handlers etc.)
- ctrls[0].registerOption = noop;
- },
- post: ngOptionsPostLink
}
};
}];
@@ -27094,7 +26995,7 @@
* Version 1.4 removed the alphabetic sorting. We now rely on the order returned by the browser
* when running `for key in myObj`. It seems that browsers generally follow the strategy of providing
* keys in the order in which they were defined, although there are exceptions when keys are deleted
- * and reinstated. See the [MDN page on `delete` for more info](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/delete#Cross-browser_notes).
+ * and reinstated. See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/delete#Cross-browser_issues
*
* If this is not desired, the recommended workaround is to convert your object into an array
* that is sorted into the order that you prefer before providing it to `ngRepeat`. You could
@@ -27104,21 +27005,15 @@
*
* # Tracking and Duplicates
*
- * `ngRepeat` uses {@link $rootScope.Scope#$watchCollection $watchCollection} to detect changes in
- * the collection. When a change happens, ngRepeat then makes the corresponding changes to the DOM:
+ * When the contents of the collection change, `ngRepeat` makes the corresponding changes to the DOM:
*
* * When an item is added, a new instance of the template is added to the DOM.
* * When an item is removed, its template instance is removed from the DOM.
* * When items are reordered, their respective templates are reordered in the DOM.
*
- * To minimize creation of DOM elements, `ngRepeat` uses a function
- * to "keep track" of all items in the collection and their corresponding DOM elements.
- * For example, if an item is added to the collection, ngRepeat will know that all other items
- * already have DOM elements, and will not re-render them.
- *
- * The default tracking function (which tracks items by their identity) does not allow
- * duplicate items in arrays. This is because when there are duplicates, it is not possible
- * to maintain a one-to-one mapping between collection items and DOM elements.
+ * By default, `ngRepeat` does not allow duplicate items in arrays. This is because when
+ * there are duplicates, it is not possible to maintain a one-to-one mapping between collection
+ * items and DOM elements.
*
* If you do need to repeat duplicate items, you can substitute the default tracking behavior
* with your own using the `track by` expression.
@@ -27131,7 +27026,7 @@
* </div>
* ```
*
- * You may also use arbitrary expressions in `track by`, including references to custom functions
+ * You may use arbitrary expressions in `track by`, including references to custom functions
* on the scope:
* ```html
* <div ng-repeat="n in [42, 42, 43, 43] track by myTrackingFunction(n)">
@@ -27139,14 +27034,10 @@
* </div>
* ```
*
- * <div class="alert alert-success">
- * If you are working with objects that have an identifier property, you should track
+ * If you are working with objects that have an identifier property, you can track
* by the identifier instead of the whole object. Should you reload your data later, `ngRepeat`
* will not have to rebuild the DOM elements for items it has already rendered, even if the
- * JavaScript objects in the collection have been substituted for new ones. For large collections,
- * this signifincantly improves rendering performance. If you don't have a unique identifier,
- * `track by $index` can also provide a performance boost.
- * </div>
+ * JavaScript objects in the collection have been substituted for new ones:
* ```html
* <div ng-repeat="model in collection track by model.id">
* {{model.name}}
@@ -28304,15 +28195,6 @@
var noopNgModelController = { $setViewValue: noop, $render: noop };
-function chromeHack(optionElement) {
- // Workaround for https://code.google.com/p/chromium/issues/detail?id=381459
- // Adding an <option selected="selected"> element to a <select required="required"> should
- // automatically select the new element
- if (optionElement[0].hasAttribute('selected')) {
- optionElement[0].selected = true;
- }
-}
-
/**
* @ngdoc type
* @name select.SelectController
@@ -28388,8 +28270,6 @@
}
var count = optionsMap.get(value) || 0;
optionsMap.put(value, count + 1);
- self.ngModelCtrl.$render();
- chromeHack(element);
};
// Tell the select control that an option, with the given value, has been removed
@@ -28411,39 +28291,6 @@
self.hasOption = function(value) {
return !!optionsMap.get(value);
};
-
-
- self.registerOption = function(optionScope, optionElement, optionAttrs, interpolateValueFn, interpolateTextFn) {
-
- if (interpolateValueFn) {
- // The value attribute is interpolated
- var oldVal;
- optionAttrs.$observe('value', function valueAttributeObserveAction(newVal) {
- if (isDefined(oldVal)) {
- self.removeOption(oldVal);
- }
- oldVal = newVal;
- self.addOption(newVal, optionElement);
- });
- } else if (interpolateTextFn) {
- // The text content is interpolated
- optionScope.$watch(interpolateTextFn, function interpolateWatchAction(newVal, oldVal) {
- optionAttrs.$set('value', newVal);
- if (oldVal !== newVal) {
- self.removeOption(oldVal);
- }
- self.addOption(newVal, optionElement);
- });
- } else {
- // The value attribute is static
- self.addOption(optionAttrs.value, optionElement);
- }
-
- optionElement.on('$destroy', function() {
- self.removeOption(optionAttrs.value);
- self.ngModelCtrl.$render();
- });
- };
}];
/**
@@ -28489,8 +28336,6 @@
*
* @param {string} ngModel Assignable angular expression to data-bind to.
* @param {string=} name Property name of the form under which the control is published.
- * @param {string=} multiple Allows multiple options to be selected. The selected values will be
- * bound to the model as an array.
* @param {string=} required Sets `required` validation error key if the value is not entered.
* @param {string=} ngRequired Adds required attribute and required validation constraint to
* the element when the ngRequired expression evaluates to true. Use ngRequired instead of required
@@ -28656,13 +28501,7 @@
restrict: 'E',
require: ['select', '?ngModel'],
controller: SelectController,
- priority: 1,
- link: {
- pre: selectPreLink
- }
- };
-
- function selectPreLink(scope, element, attr, ctrls) {
+ link: function(scope, element, attr, ctrls) {
// if ngModel is not defined, we don't need to do anything
var ngModelCtrl = ctrls[1];
@@ -28732,6 +28571,7 @@
}
}
+ };
};
@@ -28739,6 +28579,16 @@
// of dynamically created (and destroyed) option elements to their containing select
// directive via its controller.
var optionDirective = ['$interpolate', function($interpolate) {
+
+ function chromeHack(optionElement) {
+ // Workaround for https://code.google.com/p/chromium/issues/detail?id=381459
+ // Adding an <option selected="selected"> element to a <select required="required"> should
+ // automatically select the new element
+ if (optionElement[0].hasAttribute('selected')) {
+ optionElement[0].selected = true;
+ }
+ }
+
return {
restrict: 'E',
priority: 100,
@@ -28746,12 +28596,12 @@
if (isDefined(attr.value)) {
// If the value attribute is defined, check if it contains an interpolation
- var interpolateValueFn = $interpolate(attr.value, true);
+ var valueInterpolated = $interpolate(attr.value, true);
} else {
// If the value attribute is not defined then we fall back to the
// text content of the option element, which may be interpolated
- var interpolateTextFn = $interpolate(element.text(), true);
- if (!interpolateTextFn) {
+ var interpolateFn = $interpolate(element.text(), true);
+ if (!interpolateFn) {
attr.$set('value', element.text());
}
}
@@ -28765,8 +28615,44 @@
selectCtrl = parent.data(selectCtrlName) ||
parent.parent().data(selectCtrlName); // in case we are in optgroup
- if (selectCtrl) {
- selectCtrl.registerOption(scope, element, attr, interpolateValueFn, interpolateTextFn);
+ function addOption(optionValue) {
+ selectCtrl.addOption(optionValue, element);
+ selectCtrl.ngModelCtrl.$render();
+ chromeHack(element);
+ }
+
+ // Only update trigger option updates if this is an option within a `select`
+ // that also has `ngModel` attached
+ if (selectCtrl && selectCtrl.ngModelCtrl) {
+
+ if (valueInterpolated) {
+ // The value attribute is interpolated
+ var oldVal;
+ attr.$observe('value', function valueAttributeObserveAction(newVal) {
+ if (isDefined(oldVal)) {
+ selectCtrl.removeOption(oldVal);
+ }
+ oldVal = newVal;
+ addOption(newVal);
+ });
+ } else if (interpolateFn) {
+ // The text content is interpolated
+ scope.$watch(interpolateFn, function interpolateWatchAction(newVal, oldVal) {
+ attr.$set('value', newVal);
+ if (oldVal !== newVal) {
+ selectCtrl.removeOption(oldVal);
+ }
+ addOption(newVal);
+ });
+ } else {
+ // The value attribute is static
+ addOption(attr.value);
+ }
+
+ element.on('$destroy', function() {
+ selectCtrl.removeOption(attr.value);
+ selectCtrl.ngModelCtrl.$render();
+ });
}
};
}
diff --git a/views/ngXosViews/serviceGrid/src/vendor/angular/angular.min.js b/views/ngXosViews/serviceGrid/src/vendor/angular/angular.min.js
new file mode 100644
index 0000000..272101e
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/angular/angular.min.js
@@ -0,0 +1,294 @@
+/*
+ AngularJS v1.4.7
+ (c) 2010-2015 Google, Inc. http://angularjs.org
+ License: MIT
+*/
+(function(Q,X,w){'use strict';function I(b){return function(){var a=arguments[0],c;c="["+(b?b+":":"")+a+"] http://errors.angularjs.org/1.4.7/"+(b?b+"/":"")+a;for(a=1;a<arguments.length;a++){c=c+(1==a?"?":"&")+"p"+(a-1)+"=";var d=encodeURIComponent,e;e=arguments[a];e="function"==typeof e?e.toString().replace(/ \{[\s\S]*$/,""):"undefined"==typeof e?"undefined":"string"!=typeof e?JSON.stringify(e):e;c+=d(e)}return Error(c)}}function Da(b){if(null==b||Za(b))return!1;var a="length"in Object(b)&&b.length;
+return b.nodeType===pa&&a?!0:G(b)||J(b)||0===a||"number"===typeof a&&0<a&&a-1 in b}function m(b,a,c){var d,e;if(b)if(x(b))for(d in b)"prototype"==d||"length"==d||"name"==d||b.hasOwnProperty&&!b.hasOwnProperty(d)||a.call(c,b[d],d,b);else if(J(b)||Da(b)){var f="object"!==typeof b;d=0;for(e=b.length;d<e;d++)(f||d in b)&&a.call(c,b[d],d,b)}else if(b.forEach&&b.forEach!==m)b.forEach(a,c,b);else if(mc(b))for(d in b)a.call(c,b[d],d,b);else if("function"===typeof b.hasOwnProperty)for(d in b)b.hasOwnProperty(d)&&
+a.call(c,b[d],d,b);else for(d in b)ta.call(b,d)&&a.call(c,b[d],d,b);return b}function nc(b,a,c){for(var d=Object.keys(b).sort(),e=0;e<d.length;e++)a.call(c,b[d[e]],d[e]);return d}function oc(b){return function(a,c){b(c,a)}}function Ud(){return++nb}function pc(b,a){a?b.$$hashKey=a:delete b.$$hashKey}function Mb(b,a,c){for(var d=b.$$hashKey,e=0,f=a.length;e<f;++e){var h=a[e];if(C(h)||x(h))for(var g=Object.keys(h),l=0,k=g.length;l<k;l++){var n=g[l],p=h[n];c&&C(p)?ea(p)?b[n]=new Date(p.valueOf()):Oa(p)?
+b[n]=new RegExp(p):(C(b[n])||(b[n]=J(p)?[]:{}),Mb(b[n],[p],!0)):b[n]=p}}pc(b,d);return b}function P(b){return Mb(b,ua.call(arguments,1),!1)}function Vd(b){return Mb(b,ua.call(arguments,1),!0)}function Y(b){return parseInt(b,10)}function Nb(b,a){return P(Object.create(b),a)}function y(){}function $a(b){return b}function qa(b){return function(){return b}}function qc(b){return x(b.toString)&&b.toString!==Object.prototype.toString}function v(b){return"undefined"===typeof b}function A(b){return"undefined"!==
+typeof b}function C(b){return null!==b&&"object"===typeof b}function mc(b){return null!==b&&"object"===typeof b&&!rc(b)}function G(b){return"string"===typeof b}function V(b){return"number"===typeof b}function ea(b){return"[object Date]"===va.call(b)}function x(b){return"function"===typeof b}function Oa(b){return"[object RegExp]"===va.call(b)}function Za(b){return b&&b.window===b}function ab(b){return b&&b.$evalAsync&&b.$watch}function bb(b){return"boolean"===typeof b}function sc(b){return!(!b||!(b.nodeName||
+b.prop&&b.attr&&b.find))}function Wd(b){var a={};b=b.split(",");var c;for(c=0;c<b.length;c++)a[b[c]]=!0;return a}function wa(b){return F(b.nodeName||b[0]&&b[0].nodeName)}function cb(b,a){var c=b.indexOf(a);0<=c&&b.splice(c,1);return c}function ha(b,a,c,d){if(Za(b)||ab(b))throw Ea("cpws");if(tc.test(va.call(a)))throw Ea("cpta");if(a){if(b===a)throw Ea("cpi");c=c||[];d=d||[];C(b)&&(c.push(b),d.push(a));var e;if(J(b))for(e=a.length=0;e<b.length;e++)a.push(ha(b[e],null,c,d));else{var f=a.$$hashKey;J(a)?
+a.length=0:m(a,function(b,c){delete a[c]});if(mc(b))for(e in b)a[e]=ha(b[e],null,c,d);else if(b&&"function"===typeof b.hasOwnProperty)for(e in b)b.hasOwnProperty(e)&&(a[e]=ha(b[e],null,c,d));else for(e in b)ta.call(b,e)&&(a[e]=ha(b[e],null,c,d));pc(a,f)}}else if(a=b,C(b)){if(c&&-1!==(f=c.indexOf(b)))return d[f];if(J(b))return ha(b,[],c,d);if(tc.test(va.call(b)))a=new b.constructor(b);else if(ea(b))a=new Date(b.getTime());else if(Oa(b))a=new RegExp(b.source,b.toString().match(/[^\/]*$/)[0]),a.lastIndex=
+b.lastIndex;else if(x(b.cloneNode))a=b.cloneNode(!0);else return e=Object.create(rc(b)),ha(b,e,c,d);d&&(c.push(b),d.push(a))}return a}function ja(b,a){if(J(b)){a=a||[];for(var c=0,d=b.length;c<d;c++)a[c]=b[c]}else if(C(b))for(c in a=a||{},b)if("$"!==c.charAt(0)||"$"!==c.charAt(1))a[c]=b[c];return a||b}function ka(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(J(b)){if(!J(a))return!1;if((c=b.length)==a.length){for(d=0;d<
+c;d++)if(!ka(b[d],a[d]))return!1;return!0}}else{if(ea(b))return ea(a)?ka(b.getTime(),a.getTime()):!1;if(Oa(b))return Oa(a)?b.toString()==a.toString():!1;if(ab(b)||ab(a)||Za(b)||Za(a)||J(a)||ea(a)||Oa(a))return!1;c=fa();for(d in b)if("$"!==d.charAt(0)&&!x(b[d])){if(!ka(b[d],a[d]))return!1;c[d]=!0}for(d in a)if(!(d in c)&&"$"!==d.charAt(0)&&A(a[d])&&!x(a[d]))return!1;return!0}return!1}function db(b,a,c){return b.concat(ua.call(a,c))}function uc(b,a){var c=2<arguments.length?ua.call(arguments,2):[];
+return!x(a)||a instanceof RegExp?a:c.length?function(){return arguments.length?a.apply(b,db(c,arguments,0)):a.apply(b,c)}:function(){return arguments.length?a.apply(b,arguments):a.call(b)}}function Xd(b,a){var c=a;"string"===typeof b&&"$"===b.charAt(0)&&"$"===b.charAt(1)?c=w:Za(a)?c="$WINDOW":a&&X===a?c="$DOCUMENT":ab(a)&&(c="$SCOPE");return c}function eb(b,a){if("undefined"===typeof b)return w;V(a)||(a=a?2:null);return JSON.stringify(b,Xd,a)}function vc(b){return G(b)?JSON.parse(b):b}function wc(b,
+a){var c=Date.parse("Jan 01, 1970 00:00:00 "+b)/6E4;return isNaN(c)?a:c}function Ob(b,a,c){c=c?-1:1;var d=wc(a,b.getTimezoneOffset());a=b;b=c*(d-b.getTimezoneOffset());a=new Date(a.getTime());a.setMinutes(a.getMinutes()+b);return a}function xa(b){b=B(b).clone();try{b.empty()}catch(a){}var c=B("<div>").append(b).html();try{return b[0].nodeType===Pa?F(c):c.match(/^(<[^>]+>)/)[1].replace(/^<([\w\-]+)/,function(a,b){return"<"+F(b)})}catch(d){return F(c)}}function xc(b){try{return decodeURIComponent(b)}catch(a){}}
+function yc(b){var a={};m((b||"").split("&"),function(b){var d,e,f;b&&(e=b=b.replace(/\+/g,"%20"),d=b.indexOf("="),-1!==d&&(e=b.substring(0,d),f=b.substring(d+1)),e=xc(e),A(e)&&(f=A(f)?xc(f):!0,ta.call(a,e)?J(a[e])?a[e].push(f):a[e]=[a[e],f]:a[e]=f))});return a}function Pb(b){var a=[];m(b,function(b,d){J(b)?m(b,function(b){a.push(la(d,!0)+(!0===b?"":"="+la(b,!0)))}):a.push(la(d,!0)+(!0===b?"":"="+la(b,!0)))});return a.length?a.join("&"):""}function ob(b){return la(b,!0).replace(/%26/gi,"&").replace(/%3D/gi,
+"=").replace(/%2B/gi,"+")}function la(b,a){return encodeURIComponent(b).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%3B/gi,";").replace(/%20/g,a?"%20":"+")}function Yd(b,a){var c,d,e=Qa.length;for(d=0;d<e;++d)if(c=Qa[d]+a,G(c=b.getAttribute(c)))return c;return null}function Zd(b,a){var c,d,e={};m(Qa,function(a){a+="app";!c&&b.hasAttribute&&b.hasAttribute(a)&&(c=b,d=b.getAttribute(a))});m(Qa,function(a){a+="app";var e;!c&&(e=b.querySelector("["+a.replace(":",
+"\\:")+"]"))&&(c=e,d=e.getAttribute(a))});c&&(e.strictDi=null!==Yd(c,"strict-di"),a(c,d?[d]:[],e))}function zc(b,a,c){C(c)||(c={});c=P({strictDi:!1},c);var d=function(){b=B(b);if(b.injector()){var d=b[0]===X?"document":xa(b);throw Ea("btstrpd",d.replace(/</,"<").replace(/>/,">"));}a=a||[];a.unshift(["$provide",function(a){a.value("$rootElement",b)}]);c.debugInfoEnabled&&a.push(["$compileProvider",function(a){a.debugInfoEnabled(!0)}]);a.unshift("ng");d=fb(a,c.strictDi);d.invoke(["$rootScope",
+"$rootElement","$compile","$injector",function(a,b,c,d){a.$apply(function(){b.data("$injector",d);c(b)(a)})}]);return d},e=/^NG_ENABLE_DEBUG_INFO!/,f=/^NG_DEFER_BOOTSTRAP!/;Q&&e.test(Q.name)&&(c.debugInfoEnabled=!0,Q.name=Q.name.replace(e,""));if(Q&&!f.test(Q.name))return d();Q.name=Q.name.replace(f,"");da.resumeBootstrap=function(b){m(b,function(b){a.push(b)});return d()};x(da.resumeDeferredBootstrap)&&da.resumeDeferredBootstrap()}function $d(){Q.name="NG_ENABLE_DEBUG_INFO!"+Q.name;Q.location.reload()}
+function ae(b){b=da.element(b).injector();if(!b)throw Ea("test");return b.get("$$testability")}function Ac(b,a){a=a||"_";return b.replace(be,function(b,d){return(d?a:"")+b.toLowerCase()})}function ce(){var b;if(!Bc){var a=pb();(ra=v(a)?Q.jQuery:a?Q[a]:w)&&ra.fn.on?(B=ra,P(ra.fn,{scope:Ra.scope,isolateScope:Ra.isolateScope,controller:Ra.controller,injector:Ra.injector,inheritedData:Ra.inheritedData}),b=ra.cleanData,ra.cleanData=function(a){var d;if(Qb)Qb=!1;else for(var e=0,f;null!=(f=a[e]);e++)(d=
+ra._data(f,"events"))&&d.$destroy&&ra(f).triggerHandler("$destroy");b(a)}):B=R;da.element=B;Bc=!0}}function qb(b,a,c){if(!b)throw Ea("areq",a||"?",c||"required");return b}function Sa(b,a,c){c&&J(b)&&(b=b[b.length-1]);qb(x(b),a,"not a function, got "+(b&&"object"===typeof b?b.constructor.name||"Object":typeof b));return b}function Ta(b,a){if("hasOwnProperty"===b)throw Ea("badname",a);}function Cc(b,a,c){if(!a)return b;a=a.split(".");for(var d,e=b,f=a.length,h=0;h<f;h++)d=a[h],b&&(b=(e=b)[d]);return!c&&
+x(b)?uc(e,b):b}function rb(b){for(var a=b[0],c=b[b.length-1],d,e=1;a!==c&&(a=a.nextSibling);e++)if(d||b[e]!==a)d||(d=B(ua.call(b,0,e))),d.push(a);return d||b}function fa(){return Object.create(null)}function de(b){function a(a,b,c){return a[b]||(a[b]=c())}var c=I("$injector"),d=I("ng");b=a(b,"angular",Object);b.$$minErr=b.$$minErr||I;return a(b,"module",function(){var b={};return function(f,h,g){if("hasOwnProperty"===f)throw d("badname","module");h&&b.hasOwnProperty(f)&&(b[f]=null);return a(b,f,function(){function a(b,
+c,e,f){f||(f=d);return function(){f[e||"push"]([b,c,arguments]);return E}}function b(a,c){return function(b,e){e&&x(e)&&(e.$$moduleName=f);d.push([a,c,arguments]);return E}}if(!h)throw c("nomod",f);var d=[],e=[],r=[],t=a("$injector","invoke","push",e),E={_invokeQueue:d,_configBlocks:e,_runBlocks:r,requires:h,name:f,provider:b("$provide","provider"),factory:b("$provide","factory"),service:b("$provide","service"),value:a("$provide","value"),constant:a("$provide","constant","unshift"),decorator:b("$provide",
+"decorator"),animation:b("$animateProvider","register"),filter:b("$filterProvider","register"),controller:b("$controllerProvider","register"),directive:b("$compileProvider","directive"),config:t,run:function(a){r.push(a);return this}};g&&t(g);return E})}})}function ee(b){P(b,{bootstrap:zc,copy:ha,extend:P,merge:Vd,equals:ka,element:B,forEach:m,injector:fb,noop:y,bind:uc,toJson:eb,fromJson:vc,identity:$a,isUndefined:v,isDefined:A,isString:G,isFunction:x,isObject:C,isNumber:V,isElement:sc,isArray:J,
+version:fe,isDate:ea,lowercase:F,uppercase:sb,callbacks:{counter:0},getTestability:ae,$$minErr:I,$$csp:Fa,reloadWithDebugInfo:$d});Rb=de(Q);Rb("ng",["ngLocale"],["$provide",function(a){a.provider({$$sanitizeUri:ge});a.provider("$compile",Dc).directive({a:he,input:Ec,textarea:Ec,form:ie,script:je,select:ke,style:le,option:me,ngBind:ne,ngBindHtml:oe,ngBindTemplate:pe,ngClass:qe,ngClassEven:re,ngClassOdd:se,ngCloak:te,ngController:ue,ngForm:ve,ngHide:we,ngIf:xe,ngInclude:ye,ngInit:ze,ngNonBindable:Ae,
+ngPluralize:Be,ngRepeat:Ce,ngShow:De,ngStyle:Ee,ngSwitch:Fe,ngSwitchWhen:Ge,ngSwitchDefault:He,ngOptions:Ie,ngTransclude:Je,ngModel:Ke,ngList:Le,ngChange:Me,pattern:Fc,ngPattern:Fc,required:Gc,ngRequired:Gc,minlength:Hc,ngMinlength:Hc,maxlength:Ic,ngMaxlength:Ic,ngValue:Ne,ngModelOptions:Oe}).directive({ngInclude:Pe}).directive(tb).directive(Jc);a.provider({$anchorScroll:Qe,$animate:Re,$animateCss:Se,$$animateQueue:Te,$$AnimateRunner:Ue,$browser:Ve,$cacheFactory:We,$controller:Xe,$document:Ye,$exceptionHandler:Ze,
+$filter:Kc,$$forceReflow:$e,$interpolate:af,$interval:bf,$http:cf,$httpParamSerializer:df,$httpParamSerializerJQLike:ef,$httpBackend:ff,$xhrFactory:gf,$location:hf,$log:jf,$parse:kf,$rootScope:lf,$q:mf,$$q:nf,$sce:of,$sceDelegate:pf,$sniffer:qf,$templateCache:rf,$templateRequest:sf,$$testability:tf,$timeout:uf,$window:vf,$$rAF:wf,$$jqLite:xf,$$HashMap:yf,$$cookieReader:zf})}])}function gb(b){return b.replace(Af,function(a,b,d,e){return e?d.toUpperCase():d}).replace(Bf,"Moz$1")}function Lc(b){b=b.nodeType;
+return b===pa||!b||9===b}function Mc(b,a){var c,d,e=a.createDocumentFragment(),f=[];if(Sb.test(b)){c=c||e.appendChild(a.createElement("div"));d=(Cf.exec(b)||["",""])[1].toLowerCase();d=ma[d]||ma._default;c.innerHTML=d[1]+b.replace(Df,"<$1></$2>")+d[2];for(d=d[0];d--;)c=c.lastChild;f=db(f,c.childNodes);c=e.firstChild;c.textContent=""}else f.push(a.createTextNode(b));e.textContent="";e.innerHTML="";m(f,function(a){e.appendChild(a)});return e}function R(b){if(b instanceof R)return b;var a;G(b)&&(b=T(b),
+a=!0);if(!(this instanceof R)){if(a&&"<"!=b.charAt(0))throw Tb("nosel");return new R(b)}if(a){a=X;var c;b=(c=Ef.exec(b))?[a.createElement(c[1])]:(c=Mc(b,a))?c.childNodes:[]}Nc(this,b)}function Ub(b){return b.cloneNode(!0)}function ub(b,a){a||vb(b);if(b.querySelectorAll)for(var c=b.querySelectorAll("*"),d=0,e=c.length;d<e;d++)vb(c[d])}function Oc(b,a,c,d){if(A(d))throw Tb("offargs");var e=(d=wb(b))&&d.events,f=d&&d.handle;if(f)if(a)m(a.split(" "),function(a){if(A(c)){var d=e[a];cb(d||[],c);if(d&&0<
+d.length)return}b.removeEventListener(a,f,!1);delete e[a]});else for(a in e)"$destroy"!==a&&b.removeEventListener(a,f,!1),delete e[a]}function vb(b,a){var c=b.ng339,d=c&&hb[c];d&&(a?delete d.data[a]:(d.handle&&(d.events.$destroy&&d.handle({},"$destroy"),Oc(b)),delete hb[c],b.ng339=w))}function wb(b,a){var c=b.ng339,c=c&&hb[c];a&&!c&&(b.ng339=c=++Ff,c=hb[c]={events:{},data:{},handle:w});return c}function Vb(b,a,c){if(Lc(b)){var d=A(c),e=!d&&a&&!C(a),f=!a;b=(b=wb(b,!e))&&b.data;if(d)b[a]=c;else{if(f)return b;
+if(e)return b&&b[a];P(b,a)}}}function xb(b,a){return b.getAttribute?-1<(" "+(b.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").indexOf(" "+a+" "):!1}function yb(b,a){a&&b.setAttribute&&m(a.split(" "),function(a){b.setAttribute("class",T((" "+(b.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").replace(" "+T(a)+" "," ")))})}function zb(b,a){if(a&&b.setAttribute){var c=(" "+(b.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ");m(a.split(" "),function(a){a=T(a);-1===c.indexOf(" "+a+" ")&&
+(c+=a+" ")});b.setAttribute("class",T(c))}}function Nc(b,a){if(a)if(a.nodeType)b[b.length++]=a;else{var c=a.length;if("number"===typeof c&&a.window!==a){if(c)for(var d=0;d<c;d++)b[b.length++]=a[d]}else b[b.length++]=a}}function Pc(b,a){return Ab(b,"$"+(a||"ngController")+"Controller")}function Ab(b,a,c){9==b.nodeType&&(b=b.documentElement);for(a=J(a)?a:[a];b;){for(var d=0,e=a.length;d<e;d++)if(A(c=B.data(b,a[d])))return c;b=b.parentNode||11===b.nodeType&&b.host}}function Qc(b){for(ub(b,!0);b.firstChild;)b.removeChild(b.firstChild)}
+function Wb(b,a){a||ub(b);var c=b.parentNode;c&&c.removeChild(b)}function Gf(b,a){a=a||Q;if("complete"===a.document.readyState)a.setTimeout(b);else B(a).on("load",b)}function Rc(b,a){var c=Bb[a.toLowerCase()];return c&&Sc[wa(b)]&&c}function Hf(b,a){var c=function(c,e){c.isDefaultPrevented=function(){return c.defaultPrevented};var f=a[e||c.type],h=f?f.length:0;if(h){if(v(c.immediatePropagationStopped)){var g=c.stopImmediatePropagation;c.stopImmediatePropagation=function(){c.immediatePropagationStopped=
+!0;c.stopPropagation&&c.stopPropagation();g&&g.call(c)}}c.isImmediatePropagationStopped=function(){return!0===c.immediatePropagationStopped};1<h&&(f=ja(f));for(var l=0;l<h;l++)c.isImmediatePropagationStopped()||f[l].call(b,c)}};c.elem=b;return c}function xf(){this.$get=function(){return P(R,{hasClass:function(b,a){b.attr&&(b=b[0]);return xb(b,a)},addClass:function(b,a){b.attr&&(b=b[0]);return zb(b,a)},removeClass:function(b,a){b.attr&&(b=b[0]);return yb(b,a)}})}}function Ga(b,a){var c=b&&b.$$hashKey;
+if(c)return"function"===typeof c&&(c=b.$$hashKey()),c;c=typeof b;return c="function"==c||"object"==c&&null!==b?b.$$hashKey=c+":"+(a||Ud)():c+":"+b}function Ua(b,a){if(a){var c=0;this.nextUid=function(){return++c}}m(b,this.put,this)}function If(b){return(b=b.toString().replace(Tc,"").match(Uc))?"function("+(b[1]||"").replace(/[\s\r\n]+/," ")+")":"fn"}function fb(b,a){function c(a){return function(b,c){if(C(b))m(b,oc(a));else return a(b,c)}}function d(a,b){Ta(a,"service");if(x(b)||J(b))b=r.instantiate(b);
+if(!b.$get)throw Ha("pget",a);return p[a+"Provider"]=b}function e(a,b){return function(){var c=E.invoke(b,this);if(v(c))throw Ha("undef",a);return c}}function f(a,b,c){return d(a,{$get:!1!==c?e(a,b):b})}function h(a){qb(v(a)||J(a),"modulesToLoad","not an array");var b=[],c;m(a,function(a){function d(a){var b,c;b=0;for(c=a.length;b<c;b++){var e=a[b],f=r.get(e[0]);f[e[1]].apply(f,e[2])}}if(!n.get(a)){n.put(a,!0);try{G(a)?(c=Rb(a),b=b.concat(h(c.requires)).concat(c._runBlocks),d(c._invokeQueue),d(c._configBlocks)):
+x(a)?b.push(r.invoke(a)):J(a)?b.push(r.invoke(a)):Sa(a,"module")}catch(e){throw J(a)&&(a=a[a.length-1]),e.message&&e.stack&&-1==e.stack.indexOf(e.message)&&(e=e.message+"\n"+e.stack),Ha("modulerr",a,e.stack||e.message||e);}}});return b}function g(b,c){function d(a,e){if(b.hasOwnProperty(a)){if(b[a]===l)throw Ha("cdep",a+" <- "+k.join(" <- "));return b[a]}try{return k.unshift(a),b[a]=l,b[a]=c(a,e)}catch(f){throw b[a]===l&&delete b[a],f;}finally{k.shift()}}function e(b,c,f,g){"string"===typeof f&&(g=
+f,f=null);var h=[],k=fb.$$annotate(b,a,g),l,r,p;r=0;for(l=k.length;r<l;r++){p=k[r];if("string"!==typeof p)throw Ha("itkn",p);h.push(f&&f.hasOwnProperty(p)?f[p]:d(p,g))}J(b)&&(b=b[l]);return b.apply(c,h)}return{invoke:e,instantiate:function(a,b,c){var d=Object.create((J(a)?a[a.length-1]:a).prototype||null);a=e(a,d,b,c);return C(a)||x(a)?a:d},get:d,annotate:fb.$$annotate,has:function(a){return p.hasOwnProperty(a+"Provider")||b.hasOwnProperty(a)}}}a=!0===a;var l={},k=[],n=new Ua([],!0),p={$provide:{provider:c(d),
+factory:c(f),service:c(function(a,b){return f(a,["$injector",function(a){return a.instantiate(b)}])}),value:c(function(a,b){return f(a,qa(b),!1)}),constant:c(function(a,b){Ta(a,"constant");p[a]=b;t[a]=b}),decorator:function(a,b){var c=r.get(a+"Provider"),d=c.$get;c.$get=function(){var a=E.invoke(d,c);return E.invoke(b,null,{$delegate:a})}}}},r=p.$injector=g(p,function(a,b){da.isString(b)&&k.push(b);throw Ha("unpr",k.join(" <- "));}),t={},E=t.$injector=g(t,function(a,b){var c=r.get(a+"Provider",b);
+return E.invoke(c.$get,c,w,a)});m(h(b),function(a){a&&E.invoke(a)});return E}function Qe(){var b=!0;this.disableAutoScrolling=function(){b=!1};this.$get=["$window","$location","$rootScope",function(a,c,d){function e(a){var b=null;Array.prototype.some.call(a,function(a){if("a"===wa(a))return b=a,!0});return b}function f(b){if(b){b.scrollIntoView();var c;c=h.yOffset;x(c)?c=c():sc(c)?(c=c[0],c="fixed"!==a.getComputedStyle(c).position?0:c.getBoundingClientRect().bottom):V(c)||(c=0);c&&(b=b.getBoundingClientRect().top,
+a.scrollBy(0,b-c))}else a.scrollTo(0,0)}function h(a){a=G(a)?a:c.hash();var b;a?(b=g.getElementById(a))?f(b):(b=e(g.getElementsByName(a)))?f(b):"top"===a&&f(null):f(null)}var g=a.document;b&&d.$watch(function(){return c.hash()},function(a,b){a===b&&""===a||Gf(function(){d.$evalAsync(h)})});return h}]}function ib(b,a){if(!b&&!a)return"";if(!b)return a;if(!a)return b;J(b)&&(b=b.join(" "));J(a)&&(a=a.join(" "));return b+" "+a}function Jf(b){G(b)&&(b=b.split(" "));var a=fa();m(b,function(b){b.length&&
+(a[b]=!0)});return a}function Ia(b){return C(b)?b:{}}function Kf(b,a,c,d){function e(a){try{a.apply(null,ua.call(arguments,1))}finally{if(E--,0===E)for(;K.length;)try{K.pop()()}catch(b){c.error(b)}}}function f(){ia=null;h();g()}function h(){a:{try{u=n.state;break a}catch(a){}u=void 0}u=v(u)?null:u;ka(u,L)&&(u=L);L=u}function g(){if(z!==l.url()||q!==u)z=l.url(),q=u,m(O,function(a){a(l.url(),u)})}var l=this,k=b.location,n=b.history,p=b.setTimeout,r=b.clearTimeout,t={};l.isMock=!1;var E=0,K=[];l.$$completeOutstandingRequest=
+e;l.$$incOutstandingRequestCount=function(){E++};l.notifyWhenNoOutstandingRequests=function(a){0===E?a():K.push(a)};var u,q,z=k.href,N=a.find("base"),ia=null;h();q=u;l.url=function(a,c,e){v(e)&&(e=null);k!==b.location&&(k=b.location);n!==b.history&&(n=b.history);if(a){var f=q===e;if(z===a&&(!d.history||f))return l;var g=z&&Ja(z)===Ja(a);z=a;q=e;if(!d.history||g&&f){if(!g||ia)ia=a;c?k.replace(a):g?(c=k,e=a.indexOf("#"),e=-1===e?"":a.substr(e),c.hash=e):k.href=a;k.href!==a&&(ia=a)}else n[c?"replaceState":
+"pushState"](e,"",a),h(),q=u;return l}return ia||k.href.replace(/%27/g,"'")};l.state=function(){return u};var O=[],H=!1,L=null;l.onUrlChange=function(a){if(!H){if(d.history)B(b).on("popstate",f);B(b).on("hashchange",f);H=!0}O.push(a);return a};l.$$applicationDestroyed=function(){B(b).off("hashchange popstate",f)};l.$$checkUrlChange=g;l.baseHref=function(){var a=N.attr("href");return a?a.replace(/^(https?\:)?\/\/[^\/]*/,""):""};l.defer=function(a,b){var c;E++;c=p(function(){delete t[c];e(a)},b||0);
+t[c]=!0;return c};l.defer.cancel=function(a){return t[a]?(delete t[a],r(a),e(y),!0):!1}}function Ve(){this.$get=["$window","$log","$sniffer","$document",function(b,a,c,d){return new Kf(b,d,a,c)}]}function We(){this.$get=function(){function b(b,d){function e(a){a!=p&&(r?r==a&&(r=a.n):r=a,f(a.n,a.p),f(a,p),p=a,p.n=null)}function f(a,b){a!=b&&(a&&(a.p=b),b&&(b.n=a))}if(b in a)throw I("$cacheFactory")("iid",b);var h=0,g=P({},d,{id:b}),l={},k=d&&d.capacity||Number.MAX_VALUE,n={},p=null,r=null;return a[b]=
+{put:function(a,b){if(!v(b)){if(k<Number.MAX_VALUE){var c=n[a]||(n[a]={key:a});e(c)}a in l||h++;l[a]=b;h>k&&this.remove(r.key);return b}},get:function(a){if(k<Number.MAX_VALUE){var b=n[a];if(!b)return;e(b)}return l[a]},remove:function(a){if(k<Number.MAX_VALUE){var b=n[a];if(!b)return;b==p&&(p=b.p);b==r&&(r=b.n);f(b.n,b.p);delete n[a]}delete l[a];h--},removeAll:function(){l={};h=0;n={};p=r=null},destroy:function(){n=g=l=null;delete a[b]},info:function(){return P({},g,{size:h})}}}var a={};b.info=function(){var b=
+{};m(a,function(a,e){b[e]=a.info()});return b};b.get=function(b){return a[b]};return b}}function rf(){this.$get=["$cacheFactory",function(b){return b("templates")}]}function Dc(b,a){function c(a,b,c){var d=/^\s*([@&]|=(\*?))(\??)\s*(\w*)\s*$/,e={};m(a,function(a,f){var g=a.match(d);if(!g)throw ga("iscp",b,f,a,c?"controller bindings definition":"isolate scope definition");e[f]={mode:g[1][0],collection:"*"===g[2],optional:"?"===g[3],attrName:g[4]||f}});return e}function d(a){var b=a.charAt(0);if(!b||
+b!==F(b))throw ga("baddir",a);if(a!==a.trim())throw ga("baddir",a);}var e={},f=/^\s*directive\:\s*([\w\-]+)\s+(.*)$/,h=/(([\w\-]+)(?:\:([^;]+))?;?)/,g=Wd("ngSrc,ngSrcset,src,srcset"),l=/^(?:(\^\^?)?(\?)?(\^\^?)?)?/,k=/^(on[a-z]+|formaction)$/;this.directive=function r(a,f){Ta(a,"directive");G(a)?(d(a),qb(f,"directiveFactory"),e.hasOwnProperty(a)||(e[a]=[],b.factory(a+"Directive",["$injector","$exceptionHandler",function(b,d){var f=[];m(e[a],function(e,g){try{var h=b.invoke(e);x(h)?h={compile:qa(h)}:
+!h.compile&&h.link&&(h.compile=qa(h.link));h.priority=h.priority||0;h.index=g;h.name=h.name||a;h.require=h.require||h.controller&&h.name;h.restrict=h.restrict||"EA";var k=h,l=h,r=h.name,n={isolateScope:null,bindToController:null};C(l.scope)&&(!0===l.bindToController?(n.bindToController=c(l.scope,r,!0),n.isolateScope={}):n.isolateScope=c(l.scope,r,!1));C(l.bindToController)&&(n.bindToController=c(l.bindToController,r,!0));if(C(n.bindToController)){var S=l.controller,E=l.controllerAs;if(!S)throw ga("noctrl",
+r);var ca;a:if(E&&G(E))ca=E;else{if(G(S)){var m=Vc.exec(S);if(m){ca=m[3];break a}}ca=void 0}if(!ca)throw ga("noident",r);}var s=k.$$bindings=n;C(s.isolateScope)&&(h.$$isolateBindings=s.isolateScope);h.$$moduleName=e.$$moduleName;f.push(h)}catch(w){d(w)}});return f}])),e[a].push(f)):m(a,oc(r));return this};this.aHrefSanitizationWhitelist=function(b){return A(b)?(a.aHrefSanitizationWhitelist(b),this):a.aHrefSanitizationWhitelist()};this.imgSrcSanitizationWhitelist=function(b){return A(b)?(a.imgSrcSanitizationWhitelist(b),
+this):a.imgSrcSanitizationWhitelist()};var n=!0;this.debugInfoEnabled=function(a){return A(a)?(n=a,this):n};this.$get=["$injector","$interpolate","$exceptionHandler","$templateRequest","$parse","$controller","$rootScope","$document","$sce","$animate","$$sanitizeUri",function(a,b,c,d,u,q,z,N,ia,O,H){function L(a,b){try{a.addClass(b)}catch(c){}}function W(a,b,c,d,e){a instanceof B||(a=B(a));m(a,function(b,c){b.nodeType==Pa&&b.nodeValue.match(/\S+/)&&(a[c]=B(b).wrap("<span></span>").parent()[0])});var f=
+S(a,b,a,c,d,e);W.$$addScopeClass(a);var g=null;return function(b,c,d){qb(b,"scope");d=d||{};var e=d.parentBoundTranscludeFn,h=d.transcludeControllers;d=d.futureParentElement;e&&e.$$boundTransclude&&(e=e.$$boundTransclude);g||(g=(d=d&&d[0])?"foreignobject"!==wa(d)&&d.toString().match(/SVG/)?"svg":"html":"html");d="html"!==g?B(Xb(g,B("<div>").append(a).html())):c?Ra.clone.call(a):a;if(h)for(var k in h)d.data("$"+k+"Controller",h[k].instance);W.$$addScopeInfo(d,b);c&&c(d,b);f&&f(b,d,d,e);return d}}function S(a,
+b,c,d,e,f){function g(a,c,d,e){var f,k,l,r,n,t,O;if(q)for(O=Array(c.length),r=0;r<h.length;r+=3)f=h[r],O[f]=c[f];else O=c;r=0;for(n=h.length;r<n;)if(k=O[h[r++]],c=h[r++],f=h[r++],c){if(c.scope){if(l=a.$new(),W.$$addScopeInfo(B(k),l),t=c.$$destroyBindings)c.$$destroyBindings=null,l.$on("$destroyed",t)}else l=a;t=c.transcludeOnThisElement?ba(a,c.transclude,e):!c.templateOnThisElement&&e?e:!e&&b?ba(a,b):null;c(f,l,k,d,t,c)}else f&&f(a,k.childNodes,w,e)}for(var h=[],k,l,r,n,q,t=0;t<a.length;t++){k=new Z;
+l=ca(a[t],[],k,0===t?d:w,e);(f=l.length?D(l,a[t],k,b,c,null,[],[],f):null)&&f.scope&&W.$$addScopeClass(k.$$element);k=f&&f.terminal||!(r=a[t].childNodes)||!r.length?null:S(r,f?(f.transcludeOnThisElement||!f.templateOnThisElement)&&f.transclude:b);if(f||k)h.push(t,f,k),n=!0,q=q||f;f=null}return n?g:null}function ba(a,b,c){return function(d,e,f,g,h){d||(d=a.$new(!1,h),d.$$transcluded=!0);return b(d,e,{parentBoundTranscludeFn:c,transcludeControllers:f,futureParentElement:g})}}function ca(a,b,c,d,e){var g=
+c.$attr,k;switch(a.nodeType){case pa:na(b,ya(wa(a)),"E",d,e);for(var l,r,n,q=a.attributes,t=0,O=q&&q.length;t<O;t++){var K=!1,H=!1;l=q[t];k=l.name;r=T(l.value);l=ya(k);if(n=ja.test(l))k=k.replace(Wc,"").substr(8).replace(/_(.)/g,function(a,b){return b.toUpperCase()});var S=l.replace(/(Start|End)$/,"");I(S)&&l===S+"Start"&&(K=k,H=k.substr(0,k.length-5)+"end",k=k.substr(0,k.length-6));l=ya(k.toLowerCase());g[l]=k;if(n||!c.hasOwnProperty(l))c[l]=r,Rc(a,l)&&(c[l]=!0);V(a,b,r,l,n);na(b,l,"A",d,e,K,H)}a=
+a.className;C(a)&&(a=a.animVal);if(G(a)&&""!==a)for(;k=h.exec(a);)l=ya(k[2]),na(b,l,"C",d,e)&&(c[l]=T(k[3])),a=a.substr(k.index+k[0].length);break;case Pa:if(11===Wa)for(;a.parentNode&&a.nextSibling&&a.nextSibling.nodeType===Pa;)a.nodeValue+=a.nextSibling.nodeValue,a.parentNode.removeChild(a.nextSibling);Ka(b,a.nodeValue);break;case 8:try{if(k=f.exec(a.nodeValue))l=ya(k[1]),na(b,l,"M",d,e)&&(c[l]=T(k[2]))}catch(E){}}b.sort(M);return b}function za(a,b,c){var d=[],e=0;if(b&&a.hasAttribute&&a.hasAttribute(b)){do{if(!a)throw ga("uterdir",
+b,c);a.nodeType==pa&&(a.hasAttribute(b)&&e++,a.hasAttribute(c)&&e--);d.push(a);a=a.nextSibling}while(0<e)}else d.push(a);return B(d)}function s(a,b,c){return function(d,e,f,g,h){e=za(e[0],b,c);return a(d,e,f,g,h)}}function D(a,b,d,e,f,g,h,k,r){function n(a,b,c,d){if(a){c&&(a=s(a,c,d));a.require=D.require;a.directiveName=y;if(u===D||D.$$isolateScope)a=$(a,{isolateScope:!0});h.push(a)}if(b){c&&(b=s(b,c,d));b.require=D.require;b.directiveName=y;if(u===D||D.$$isolateScope)b=$(b,{isolateScope:!0});k.push(b)}}
+function t(a,b,c,d){var e;if(G(b)){var f=b.match(l);b=b.substring(f[0].length);var g=f[1]||f[3],f="?"===f[2];"^^"===g?c=c.parent():e=(e=d&&d[b])&&e.instance;e||(d="$"+b+"Controller",e=g?c.inheritedData(d):c.data(d));if(!e&&!f)throw ga("ctreq",b,a);}else if(J(b))for(e=[],g=0,f=b.length;g<f;g++)e[g]=t(a,b[g],c,d);return e||null}function O(a,b,c,d,e,f){var g=fa(),h;for(h in d){var k=d[h],l={$scope:k===u||k.$$isolateScope?e:f,$element:a,$attrs:b,$transclude:c},r=k.controller;"@"==r&&(r=b[k.name]);l=q(r,
+l,!0,k.controllerAs);g[k.name]=l;ia||a.data("$"+k.name+"Controller",l.instance)}return g}function K(a,c,e,f,g,l){function r(a,b,c){var d;ab(a)||(c=b,b=a,a=w);ia&&(d=ca);c||(c=ia?N.parent():N);return g(a,b,d,c,za)}var n,q,H,E,ca,z,N;b===e?(f=d,N=d.$$element):(N=B(e),f=new Z(N,d));u&&(E=c.$new(!0));g&&(z=r,z.$$boundTransclude=g);ba&&(ca=O(N,f,z,ba,E,c));u&&(W.$$addScopeInfo(N,E,!0,!(L&&(L===u||L===u.$$originalDirective))),W.$$addScopeClass(N,!0),E.$$isolateBindings=u.$$isolateBindings,Y(c,f,E,E.$$isolateBindings,
+u,E));if(ca){var Va=u||S,m;Va&&ca[Va.name]&&(q=Va.$$bindings.bindToController,(H=ca[Va.name])&&H.identifier&&q&&(m=H,l.$$destroyBindings=Y(c,f,H.instance,q,Va)));for(n in ca){H=ca[n];var D=H();D!==H.instance&&(H.instance=D,N.data("$"+n+"Controller",D),H===m&&(l.$$destroyBindings(),l.$$destroyBindings=Y(c,f,D,q,Va)))}}n=0;for(l=h.length;n<l;n++)q=h[n],aa(q,q.isolateScope?E:c,N,f,q.require&&t(q.directiveName,q.require,N,ca),z);var za=c;u&&(u.template||null===u.templateUrl)&&(za=E);a&&a(za,e.childNodes,
+w,g);for(n=k.length-1;0<=n;n--)q=k[n],aa(q,q.isolateScope?E:c,N,f,q.require&&t(q.directiveName,q.require,N,ca),z)}r=r||{};for(var H=-Number.MAX_VALUE,S=r.newScopeDirective,ba=r.controllerDirectives,u=r.newIsolateScopeDirective,L=r.templateDirective,z=r.nonTlbTranscludeDirective,N=!1,m=!1,ia=r.hasElementTranscludeDirective,v=d.$$element=B(b),D,y,M,Ka=e,na,I=0,F=a.length;I<F;I++){D=a[I];var P=D.$$start,R=D.$$end;P&&(v=za(b,P,R));M=w;if(H>D.priority)break;if(M=D.scope)D.templateUrl||(C(M)?(Q("new/isolated scope",
+u||S,D,v),u=D):Q("new/isolated scope",u,D,v)),S=S||D;y=D.name;!D.templateUrl&&D.controller&&(M=D.controller,ba=ba||fa(),Q("'"+y+"' controller",ba[y],D,v),ba[y]=D);if(M=D.transclude)N=!0,D.$$tlb||(Q("transclusion",z,D,v),z=D),"element"==M?(ia=!0,H=D.priority,M=v,v=d.$$element=B(X.createComment(" "+y+": "+d[y]+" ")),b=v[0],U(f,ua.call(M,0),b),Ka=W(M,e,H,g&&g.name,{nonTlbTranscludeDirective:z})):(M=B(Ub(b)).contents(),v.empty(),Ka=W(M,e));if(D.template)if(m=!0,Q("template",L,D,v),L=D,M=x(D.template)?
+D.template(v,d):D.template,M=ha(M),D.replace){g=D;M=Sb.test(M)?Xc(Xb(D.templateNamespace,T(M))):[];b=M[0];if(1!=M.length||b.nodeType!==pa)throw ga("tplrt",y,"");U(f,v,b);F={$attr:{}};M=ca(b,[],F);var Lf=a.splice(I+1,a.length-(I+1));u&&A(M);a=a.concat(M).concat(Lf);Yc(d,F);F=a.length}else v.html(M);if(D.templateUrl)m=!0,Q("template",L,D,v),L=D,D.replace&&(g=D),K=Mf(a.splice(I,a.length-I),v,d,f,N&&Ka,h,k,{controllerDirectives:ba,newScopeDirective:S!==D&&S,newIsolateScopeDirective:u,templateDirective:L,
+nonTlbTranscludeDirective:z}),F=a.length;else if(D.compile)try{na=D.compile(v,d,Ka),x(na)?n(null,na,P,R):na&&n(na.pre,na.post,P,R)}catch(V){c(V,xa(v))}D.terminal&&(K.terminal=!0,H=Math.max(H,D.priority))}K.scope=S&&!0===S.scope;K.transcludeOnThisElement=N;K.templateOnThisElement=m;K.transclude=Ka;r.hasElementTranscludeDirective=ia;return K}function A(a){for(var b=0,c=a.length;b<c;b++)a[b]=Nb(a[b],{$$isolateScope:!0})}function na(b,d,f,g,h,k,l){if(d===h)return null;h=null;if(e.hasOwnProperty(d)){var n;
+d=a.get(d+"Directive");for(var q=0,t=d.length;q<t;q++)try{n=d[q],(v(g)||g>n.priority)&&-1!=n.restrict.indexOf(f)&&(k&&(n=Nb(n,{$$start:k,$$end:l})),b.push(n),h=n)}catch(H){c(H)}}return h}function I(b){if(e.hasOwnProperty(b))for(var c=a.get(b+"Directive"),d=0,f=c.length;d<f;d++)if(b=c[d],b.multiElement)return!0;return!1}function Yc(a,b){var c=b.$attr,d=a.$attr,e=a.$$element;m(a,function(d,e){"$"!=e.charAt(0)&&(b[e]&&b[e]!==d&&(d+=("style"===e?";":" ")+b[e]),a.$set(e,d,!0,c[e]))});m(b,function(b,f){"class"==
+f?(L(e,b),a["class"]=(a["class"]?a["class"]+" ":"")+b):"style"==f?(e.attr("style",e.attr("style")+";"+b),a.style=(a.style?a.style+";":"")+b):"$"==f.charAt(0)||a.hasOwnProperty(f)||(a[f]=b,d[f]=c[f])})}function Mf(a,b,c,e,f,g,h,k){var l=[],r,n,q=b[0],t=a.shift(),H=Nb(t,{templateUrl:null,transclude:null,replace:null,$$originalDirective:t}),O=x(t.templateUrl)?t.templateUrl(b,c):t.templateUrl,E=t.templateNamespace;b.empty();d(O).then(function(d){var K,u;d=ha(d);if(t.replace){d=Sb.test(d)?Xc(Xb(E,T(d))):
+[];K=d[0];if(1!=d.length||K.nodeType!==pa)throw ga("tplrt",t.name,O);d={$attr:{}};U(e,b,K);var z=ca(K,[],d);C(t.scope)&&A(z);a=z.concat(a);Yc(c,d)}else K=q,b.html(d);a.unshift(H);r=D(a,K,c,f,b,t,g,h,k);m(e,function(a,c){a==K&&(e[c]=b[0])});for(n=S(b[0].childNodes,f);l.length;){d=l.shift();u=l.shift();var N=l.shift(),W=l.shift(),z=b[0];if(!d.$$destroyed){if(u!==q){var za=u.className;k.hasElementTranscludeDirective&&t.replace||(z=Ub(K));U(N,B(u),z);L(B(z),za)}u=r.transcludeOnThisElement?ba(d,r.transclude,
+W):W;r(n,d,z,e,u,r)}}l=null});return function(a,b,c,d,e){a=e;b.$$destroyed||(l?l.push(b,c,d,a):(r.transcludeOnThisElement&&(a=ba(b,r.transclude,e)),r(n,b,c,d,a,r)))}}function M(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 Q(a,b,c,d){function e(a){return a?" (module: "+a+")":""}if(b)throw ga("multidir",b.name,e(b.$$moduleName),c.name,e(c.$$moduleName),a,xa(d));}function Ka(a,c){var d=b(c,!0);d&&a.push({priority:0,compile:function(a){a=
+a.parent();var b=!!a.length;b&&W.$$addBindingClass(a);return function(a,c){var e=c.parent();b||W.$$addBindingClass(e);W.$$addBindingInfo(e,d.expressions);a.$watch(d,function(a){c[0].nodeValue=a})}}})}function Xb(a,b){a=F(a||"html");switch(a){case "svg":case "math":var c=X.createElement("div");c.innerHTML="<"+a+">"+b+"</"+a+">";return c.childNodes[0].childNodes;default:return b}}function R(a,b){if("srcdoc"==b)return ia.HTML;var c=wa(a);if("xlinkHref"==b||"form"==c&&"action"==b||"img"!=c&&("src"==b||
+"ngSrc"==b))return ia.RESOURCE_URL}function V(a,c,d,e,f){var h=R(a,e);f=g[e]||f;var l=b(d,!0,h,f);if(l){if("multiple"===e&&"select"===wa(a))throw ga("selmulti",xa(a));c.push({priority:100,compile:function(){return{pre:function(a,c,g){c=g.$$observers||(g.$$observers=fa());if(k.test(e))throw ga("nodomevents");var r=g[e];r!==d&&(l=r&&b(r,!0,h,f),d=r);l&&(g[e]=l(a),(c[e]||(c[e]=[])).$$inter=!0,(g.$$observers&&g.$$observers[e].$$scope||a).$watch(l,function(a,b){"class"===e&&a!=b?g.$updateClass(a,b):g.$set(e,
+a)}))}}}})}}function U(a,b,c){var d=b[0],e=b.length,f=d.parentNode,g,h;if(a)for(g=0,h=a.length;g<h;g++)if(a[g]==d){a[g++]=c;h=g+e-1;for(var k=a.length;g<k;g++,h++)h<k?a[g]=a[h]:delete a[g];a.length-=e-1;a.context===d&&(a.context=c);break}f&&f.replaceChild(c,d);a=X.createDocumentFragment();a.appendChild(d);B.hasData(d)&&(B(c).data(B(d).data()),ra?(Qb=!0,ra.cleanData([d])):delete B.cache[d[B.expando]]);d=1;for(e=b.length;d<e;d++)f=b[d],B(f).remove(),a.appendChild(f),delete b[d];b[0]=c;b.length=1}function $(a,
+b){return P(function(){return a.apply(null,arguments)},a,b)}function aa(a,b,d,e,f,g){try{a(b,d,e,f,g)}catch(h){c(h,xa(d))}}function Y(a,c,d,e,f,g){var h;m(e,function(e,g){var k=e.attrName,l=e.optional,r,n,q,K;switch(e.mode){case "@":l||ta.call(c,k)||(d[g]=c[k]=void 0);c.$observe(k,function(a){G(a)&&(d[g]=a)});c.$$observers[k].$$scope=a;G(c[k])&&(d[g]=b(c[k])(a));break;case "=":if(!ta.call(c,k)){if(l)break;c[k]=void 0}if(l&&!c[k])break;n=u(c[k]);K=n.literal?ka:function(a,b){return a===b||a!==a&&b!==
+b};q=n.assign||function(){r=d[g]=n(a);throw ga("nonassign",c[k],f.name);};r=d[g]=n(a);l=function(b){K(b,d[g])||(K(b,r)?q(a,b=d[g]):d[g]=b);return r=b};l.$stateful=!0;l=e.collection?a.$watchCollection(c[k],l):a.$watch(u(c[k],l),null,n.literal);h=h||[];h.push(l);break;case "&":n=c.hasOwnProperty(k)?u(c[k]):y;if(n===y&&l)break;d[g]=function(b){return n(a,b)}}});e=h?function(){for(var a=0,b=h.length;a<b;++a)h[a]()}:y;return g&&e!==y?(g.$on("$destroy",e),y):e}var Z=function(a,b){if(b){var c=Object.keys(b),
+d,e,f;d=0;for(e=c.length;d<e;d++)f=c[d],this[f]=b[f]}else this.$attr={};this.$$element=a};Z.prototype={$normalize:ya,$addClass:function(a){a&&0<a.length&&O.addClass(this.$$element,a)},$removeClass:function(a){a&&0<a.length&&O.removeClass(this.$$element,a)},$updateClass:function(a,b){var c=Zc(a,b);c&&c.length&&O.addClass(this.$$element,c);(c=Zc(b,a))&&c.length&&O.removeClass(this.$$element,c)},$set:function(a,b,d,e){var f=Rc(this.$$element[0],a),g=$c[a],h=a;f?(this.$$element.prop(a,b),e=f):g&&(this[g]=
+b,h=g);this[a]=b;e?this.$attr[a]=e:(e=this.$attr[a])||(this.$attr[a]=e=Ac(a,"-"));f=wa(this.$$element);if("a"===f&&"href"===a||"img"===f&&"src"===a)this[a]=b=H(b,"src"===a);else if("img"===f&&"srcset"===a){for(var f="",g=T(b),k=/(\s+\d+x\s*,|\s+\d+w\s*,|\s+,|,\s+)/,k=/\s/.test(g)?k:/(,)/,g=g.split(k),k=Math.floor(g.length/2),l=0;l<k;l++)var r=2*l,f=f+H(T(g[r]),!0),f=f+(" "+T(g[r+1]));g=T(g[2*l]).split(/\s/);f+=H(T(g[0]),!0);2===g.length&&(f+=" "+T(g[1]));this[a]=b=f}!1!==d&&(null===b||v(b)?this.$$element.removeAttr(e):
+this.$$element.attr(e,b));(a=this.$$observers)&&m(a[h],function(a){try{a(b)}catch(d){c(d)}})},$observe:function(a,b){var c=this,d=c.$$observers||(c.$$observers=fa()),e=d[a]||(d[a]=[]);e.push(b);z.$evalAsync(function(){e.$$inter||!c.hasOwnProperty(a)||v(c[a])||b(c[a])});return function(){cb(e,b)}}};var da=b.startSymbol(),ea=b.endSymbol(),ha="{{"==da||"}}"==ea?$a:function(a){return a.replace(/\{\{/g,da).replace(/}}/g,ea)},ja=/^ngAttr[A-Z]/;W.$$addBindingInfo=n?function(a,b){var c=a.data("$binding")||
+[];J(b)?c=c.concat(b):c.push(b);a.data("$binding",c)}:y;W.$$addBindingClass=n?function(a){L(a,"ng-binding")}:y;W.$$addScopeInfo=n?function(a,b,c,d){a.data(c?d?"$isolateScopeNoTemplate":"$isolateScope":"$scope",b)}:y;W.$$addScopeClass=n?function(a,b){L(a,b?"ng-isolate-scope":"ng-scope")}:y;return W}]}function ya(b){return gb(b.replace(Wc,""))}function Zc(b,a){var c="",d=b.split(/\s+/),e=a.split(/\s+/),f=0;a:for(;f<d.length;f++){for(var h=d[f],g=0;g<e.length;g++)if(h==e[g])continue a;c+=(0<c.length?
+" ":"")+h}return c}function Xc(b){b=B(b);var a=b.length;if(1>=a)return b;for(;a--;)8===b[a].nodeType&&Nf.call(b,a,1);return b}function Xe(){var b={},a=!1;this.register=function(a,d){Ta(a,"controller");C(a)?P(b,a):b[a]=d};this.allowGlobals=function(){a=!0};this.$get=["$injector","$window",function(c,d){function e(a,b,c,d){if(!a||!C(a.$scope))throw I("$controller")("noscp",d,b);a.$scope[b]=c}return function(f,h,g,l){var k,n,p;g=!0===g;l&&G(l)&&(p=l);if(G(f)){l=f.match(Vc);if(!l)throw Of("ctrlfmt",f);
+n=l[1];p=p||l[3];f=b.hasOwnProperty(n)?b[n]:Cc(h.$scope,n,!0)||(a?Cc(d,n,!0):w);Sa(f,n,!0)}if(g)return g=(J(f)?f[f.length-1]:f).prototype,k=Object.create(g||null),p&&e(h,p,k,n||f.name),P(function(){var a=c.invoke(f,k,h,n);a!==k&&(C(a)||x(a))&&(k=a,p&&e(h,p,k,n||f.name));return k},{instance:k,identifier:p});k=c.instantiate(f,h,n);p&&e(h,p,k,n||f.name);return k}}]}function Ye(){this.$get=["$window",function(b){return B(b.document)}]}function Ze(){this.$get=["$log",function(b){return function(a,c){b.error.apply(b,
+arguments)}}]}function Yb(b){return C(b)?ea(b)?b.toISOString():eb(b):b}function df(){this.$get=function(){return function(b){if(!b)return"";var a=[];nc(b,function(b,d){null===b||v(b)||(J(b)?m(b,function(b,c){a.push(la(d)+"="+la(Yb(b)))}):a.push(la(d)+"="+la(Yb(b))))});return a.join("&")}}}function ef(){this.$get=function(){return function(b){function a(b,e,f){null===b||v(b)||(J(b)?m(b,function(b,c){a(b,e+"["+(C(b)?c:"")+"]")}):C(b)&&!ea(b)?nc(b,function(b,c){a(b,e+(f?"":"[")+c+(f?"":"]"))}):c.push(la(e)+
+"="+la(Yb(b))))}if(!b)return"";var c=[];a(b,"",!0);return c.join("&")}}}function Zb(b,a){if(G(b)){var c=b.replace(Pf,"").trim();if(c){var d=a("Content-Type");(d=d&&0===d.indexOf(ad))||(d=(d=c.match(Qf))&&Rf[d[0]].test(c));d&&(b=vc(c))}}return b}function bd(b){var a=fa(),c;G(b)?m(b.split("\n"),function(b){c=b.indexOf(":");var e=F(T(b.substr(0,c)));b=T(b.substr(c+1));e&&(a[e]=a[e]?a[e]+", "+b:b)}):C(b)&&m(b,function(b,c){var f=F(c),h=T(b);f&&(a[f]=a[f]?a[f]+", "+h:h)});return a}function cd(b){var a;
+return function(c){a||(a=bd(b));return c?(c=a[F(c)],void 0===c&&(c=null),c):a}}function dd(b,a,c,d){if(x(d))return d(b,a,c);m(d,function(d){b=d(b,a,c)});return b}function cf(){var b=this.defaults={transformResponse:[Zb],transformRequest:[function(a){return C(a)&&"[object File]"!==va.call(a)&&"[object Blob]"!==va.call(a)&&"[object FormData]"!==va.call(a)?eb(a):a}],headers:{common:{Accept:"application/json, text/plain, */*"},post:ja($b),put:ja($b),patch:ja($b)},xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",
+paramSerializer:"$httpParamSerializer"},a=!1;this.useApplyAsync=function(b){return A(b)?(a=!!b,this):a};var c=!0;this.useLegacyPromiseExtensions=function(a){return A(a)?(c=!!a,this):c};var d=this.interceptors=[];this.$get=["$httpBackend","$$cookieReader","$cacheFactory","$rootScope","$q","$injector",function(e,f,h,g,l,k){function n(a){function d(a){var b=P({},a);b.data=a.data?dd(a.data,a.headers,a.status,f.transformResponse):a.data;a=a.status;return 200<=a&&300>a?b:l.reject(b)}function e(a,b){var c,
+d={};m(a,function(a,e){x(a)?(c=a(b),null!=c&&(d[e]=c)):d[e]=a});return d}if(!da.isObject(a))throw I("$http")("badreq",a);var f=P({method:"get",transformRequest:b.transformRequest,transformResponse:b.transformResponse,paramSerializer:b.paramSerializer},a);f.headers=function(a){var c=b.headers,d=P({},a.headers),f,g,h,c=P({},c.common,c[F(a.method)]);a:for(f in c){g=F(f);for(h in d)if(F(h)===g)continue a;d[f]=c[f]}return e(d,ja(a))}(a);f.method=sb(f.method);f.paramSerializer=G(f.paramSerializer)?k.get(f.paramSerializer):
+f.paramSerializer;var g=[function(a){var c=a.headers,e=dd(a.data,cd(c),w,a.transformRequest);v(e)&&m(c,function(a,b){"content-type"===F(b)&&delete c[b]});v(a.withCredentials)&&!v(b.withCredentials)&&(a.withCredentials=b.withCredentials);return p(a,e).then(d,d)},w],h=l.when(f);for(m(E,function(a){(a.request||a.requestError)&&g.unshift(a.request,a.requestError);(a.response||a.responseError)&&g.push(a.response,a.responseError)});g.length;){a=g.shift();var r=g.shift(),h=h.then(a,r)}c?(h.success=function(a){Sa(a,
+"fn");h.then(function(b){a(b.data,b.status,b.headers,f)});return h},h.error=function(a){Sa(a,"fn");h.then(null,function(b){a(b.data,b.status,b.headers,f)});return h}):(h.success=ed("success"),h.error=ed("error"));return h}function p(c,d){function h(b,c,d,e){function f(){k(c,b,d,e)}L&&(200<=b&&300>b?L.put(ba,[b,c,bd(d),e]):L.remove(ba));a?g.$applyAsync(f):(f(),g.$$phase||g.$apply())}function k(a,b,d,e){b=-1<=b?b:0;(200<=b&&300>b?O.resolve:O.reject)({data:a,status:b,headers:cd(d),config:c,statusText:e})}
+function p(a){k(a.data,a.status,ja(a.headers()),a.statusText)}function E(){var a=n.pendingRequests.indexOf(c);-1!==a&&n.pendingRequests.splice(a,1)}var O=l.defer(),H=O.promise,L,m,S=c.headers,ba=r(c.url,c.paramSerializer(c.params));n.pendingRequests.push(c);H.then(E,E);!c.cache&&!b.cache||!1===c.cache||"GET"!==c.method&&"JSONP"!==c.method||(L=C(c.cache)?c.cache:C(b.cache)?b.cache:t);L&&(m=L.get(ba),A(m)?m&&x(m.then)?m.then(p,p):J(m)?k(m[1],m[0],ja(m[2]),m[3]):k(m,200,{},"OK"):L.put(ba,H));v(m)&&((m=
+fd(c.url)?f()[c.xsrfCookieName||b.xsrfCookieName]:w)&&(S[c.xsrfHeaderName||b.xsrfHeaderName]=m),e(c.method,ba,d,h,S,c.timeout,c.withCredentials,c.responseType));return H}function r(a,b){0<b.length&&(a+=(-1==a.indexOf("?")?"?":"&")+b);return a}var t=h("$http");b.paramSerializer=G(b.paramSerializer)?k.get(b.paramSerializer):b.paramSerializer;var E=[];m(d,function(a){E.unshift(G(a)?k.get(a):k.invoke(a))});n.pendingRequests=[];(function(a){m(arguments,function(a){n[a]=function(b,c){return n(P({},c||{},
+{method:a,url:b}))}})})("get","delete","head","jsonp");(function(a){m(arguments,function(a){n[a]=function(b,c,d){return n(P({},d||{},{method:a,url:b,data:c}))}})})("post","put","patch");n.defaults=b;return n}]}function gf(){this.$get=function(){return function(){return new Q.XMLHttpRequest}}}function ff(){this.$get=["$browser","$window","$document","$xhrFactory",function(b,a,c,d){return Sf(b,d,b.defer,a.angular.callbacks,c[0])}]}function Sf(b,a,c,d,e){function f(a,b,c){var f=e.createElement("script"),
+n=null;f.type="text/javascript";f.src=a;f.async=!0;n=function(a){f.removeEventListener("load",n,!1);f.removeEventListener("error",n,!1);e.body.removeChild(f);f=null;var h=-1,t="unknown";a&&("load"!==a.type||d[b].called||(a={type:"error"}),t=a.type,h="error"===a.type?404:200);c&&c(h,t)};f.addEventListener("load",n,!1);f.addEventListener("error",n,!1);e.body.appendChild(f);return n}return function(e,g,l,k,n,p,r,t){function E(){q&&q();z&&z.abort()}function K(a,d,e,f,g){A(s)&&c.cancel(s);q=z=null;a(d,
+e,f,g);b.$$completeOutstandingRequest(y)}b.$$incOutstandingRequestCount();g=g||b.url();if("jsonp"==F(e)){var u="_"+(d.counter++).toString(36);d[u]=function(a){d[u].data=a;d[u].called=!0};var q=f(g.replace("JSON_CALLBACK","angular.callbacks."+u),u,function(a,b){K(k,a,d[u].data,"",b);d[u]=y})}else{var z=a(e,g);z.open(e,g,!0);m(n,function(a,b){A(a)&&z.setRequestHeader(b,a)});z.onload=function(){var a=z.statusText||"",b="response"in z?z.response:z.responseText,c=1223===z.status?204:z.status;0===c&&(c=
+b?200:"file"==Aa(g).protocol?404:0);K(k,c,b,z.getAllResponseHeaders(),a)};e=function(){K(k,-1,null,null,"")};z.onerror=e;z.onabort=e;r&&(z.withCredentials=!0);if(t)try{z.responseType=t}catch(N){if("json"!==t)throw N;}z.send(v(l)?null:l)}if(0<p)var s=c(E,p);else p&&x(p.then)&&p.then(E)}}function af(){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 f(a){return"\\\\\\"+
+a}function h(c){return c.replace(n,b).replace(p,a)}function g(f,g,n,p){function u(a){try{var b=a;a=n?e.getTrusted(n,b):e.valueOf(b);var c;if(p&&!A(a))c=a;else if(null==a)c="";else{switch(typeof a){case "string":break;case "number":a=""+a;break;default:a=eb(a)}c=a}return c}catch(g){d(La.interr(f,g))}}p=!!p;for(var q,m,N=0,s=[],O=[],H=f.length,L=[],W=[];N<H;)if(-1!=(q=f.indexOf(b,N))&&-1!=(m=f.indexOf(a,q+l)))N!==q&&L.push(h(f.substring(N,q))),N=f.substring(q+l,m),s.push(N),O.push(c(N,u)),N=m+k,W.push(L.length),
+L.push("");else{N!==H&&L.push(h(f.substring(N)));break}n&&1<L.length&&La.throwNoconcat(f);if(!g||s.length){var S=function(a){for(var b=0,c=s.length;b<c;b++){if(p&&v(a[b]))return;L[W[b]]=a[b]}return L.join("")};return P(function(a){var b=0,c=s.length,e=Array(c);try{for(;b<c;b++)e[b]=O[b](a);return S(e)}catch(g){d(La.interr(f,g))}},{exp:f,expressions:s,$$watchDelegate:function(a,b){var c;return a.$watchGroup(O,function(d,e){var f=S(d);x(b)&&b.call(this,f,d!==e?c:f,a);c=f})}})}}var l=b.length,k=a.length,
+n=new RegExp(b.replace(/./g,f),"g"),p=new RegExp(a.replace(/./g,f),"g");g.startSymbol=function(){return b};g.endSymbol=function(){return a};return g}]}function bf(){this.$get=["$rootScope","$window","$q","$$q",function(b,a,c,d){function e(e,g,l,k){var n=4<arguments.length,p=n?ua.call(arguments,4):[],r=a.setInterval,t=a.clearInterval,E=0,K=A(k)&&!k,u=(K?d:c).defer(),q=u.promise;l=A(l)?l:0;q.then(null,null,n?function(){e.apply(null,p)}:e);q.$$intervalId=r(function(){u.notify(E++);0<l&&E>=l&&(u.resolve(E),
+t(q.$$intervalId),delete f[q.$$intervalId]);K||b.$apply()},g);f[q.$$intervalId]=u;return q}var f={};e.cancel=function(b){return b&&b.$$intervalId in f?(f[b.$$intervalId].reject("canceled"),a.clearInterval(b.$$intervalId),delete f[b.$$intervalId],!0):!1};return e}]}function ac(b){b=b.split("/");for(var a=b.length;a--;)b[a]=ob(b[a]);return b.join("/")}function gd(b,a){var c=Aa(b);a.$$protocol=c.protocol;a.$$host=c.hostname;a.$$port=Y(c.port)||Tf[c.protocol]||null}function hd(b,a){var c="/"!==b.charAt(0);
+c&&(b="/"+b);var d=Aa(b);a.$$path=decodeURIComponent(c&&"/"===d.pathname.charAt(0)?d.pathname.substring(1):d.pathname);a.$$search=yc(d.search);a.$$hash=decodeURIComponent(d.hash);a.$$path&&"/"!=a.$$path.charAt(0)&&(a.$$path="/"+a.$$path)}function sa(b,a){if(0===a.indexOf(b))return a.substr(b.length)}function Ja(b){var a=b.indexOf("#");return-1==a?b:b.substr(0,a)}function Cb(b){return b.replace(/(#.+)|#$/,"$1")}function bc(b,a,c){this.$$html5=!0;c=c||"";gd(b,this);this.$$parse=function(b){var c=sa(a,
+b);if(!G(c))throw Db("ipthprfx",b,a);hd(c,this);this.$$path||(this.$$path="/");this.$$compose()};this.$$compose=function(){var b=Pb(this.$$search),c=this.$$hash?"#"+ob(this.$$hash):"";this.$$url=ac(this.$$path)+(b?"?"+b:"")+c;this.$$absUrl=a+this.$$url.substr(1)};this.$$parseLinkUrl=function(d,e){if(e&&"#"===e[0])return this.hash(e.slice(1)),!0;var f,h;A(f=sa(b,d))?(h=f,h=A(f=sa(c,f))?a+(sa("/",f)||f):b+h):A(f=sa(a,d))?h=a+f:a==d+"/"&&(h=a);h&&this.$$parse(h);return!!h}}function cc(b,a,c){gd(b,this);
+this.$$parse=function(d){var e=sa(b,d)||sa(a,d),f;v(e)||"#"!==e.charAt(0)?this.$$html5?f=e:(f="",v(e)&&(b=d,this.replace())):(f=sa(c,e),v(f)&&(f=e));hd(f,this);d=this.$$path;var e=b,h=/^\/[A-Z]:(\/.*)/;0===f.indexOf(e)&&(f=f.replace(e,""));h.exec(f)||(d=(f=h.exec(d))?f[1]:d);this.$$path=d;this.$$compose()};this.$$compose=function(){var a=Pb(this.$$search),e=this.$$hash?"#"+ob(this.$$hash):"";this.$$url=ac(this.$$path)+(a?"?"+a:"")+e;this.$$absUrl=b+(this.$$url?c+this.$$url:"")};this.$$parseLinkUrl=
+function(a,c){return Ja(b)==Ja(a)?(this.$$parse(a),!0):!1}}function id(b,a,c){this.$$html5=!0;cc.apply(this,arguments);this.$$parseLinkUrl=function(d,e){if(e&&"#"===e[0])return this.hash(e.slice(1)),!0;var f,h;b==Ja(d)?f=d:(h=sa(a,d))?f=b+c+h:a===d+"/"&&(f=a);f&&this.$$parse(f);return!!f};this.$$compose=function(){var a=Pb(this.$$search),e=this.$$hash?"#"+ob(this.$$hash):"";this.$$url=ac(this.$$path)+(a?"?"+a:"")+e;this.$$absUrl=b+c+this.$$url}}function Eb(b){return function(){return this[b]}}function jd(b,
+a){return function(c){if(v(c))return this[b];this[b]=a(c);this.$$compose();return this}}function hf(){var b="",a={enabled:!1,requireBase:!0,rewriteLinks:!0};this.hashPrefix=function(a){return A(a)?(b=a,this):b};this.html5Mode=function(b){return bb(b)?(a.enabled=b,this):C(b)?(bb(b.enabled)&&(a.enabled=b.enabled),bb(b.requireBase)&&(a.requireBase=b.requireBase),bb(b.rewriteLinks)&&(a.rewriteLinks=b.rewriteLinks),this):a};this.$get=["$rootScope","$browser","$sniffer","$rootElement","$window",function(c,
+d,e,f,h){function g(a,b,c){var e=k.url(),f=k.$$state;try{d.url(a,b,c),k.$$state=d.state()}catch(g){throw k.url(e),k.$$state=f,g;}}function l(a,b){c.$broadcast("$locationChangeSuccess",k.absUrl(),a,k.$$state,b)}var k,n;n=d.baseHref();var p=d.url(),r;if(a.enabled){if(!n&&a.requireBase)throw Db("nobase");r=p.substring(0,p.indexOf("/",p.indexOf("//")+2))+(n||"/");n=e.history?bc:id}else r=Ja(p),n=cc;var t=r.substr(0,Ja(r).lastIndexOf("/")+1);k=new n(r,t,"#"+b);k.$$parseLinkUrl(p,p);k.$$state=d.state();
+var E=/^\s*(javascript|mailto):/i;f.on("click",function(b){if(a.rewriteLinks&&!b.ctrlKey&&!b.metaKey&&!b.shiftKey&&2!=b.which&&2!=b.button){for(var e=B(b.target);"a"!==wa(e[0]);)if(e[0]===f[0]||!(e=e.parent())[0])return;var g=e.prop("href"),l=e.attr("href")||e.attr("xlink:href");C(g)&&"[object SVGAnimatedString]"===g.toString()&&(g=Aa(g.animVal).href);E.test(g)||!g||e.attr("target")||b.isDefaultPrevented()||!k.$$parseLinkUrl(g,l)||(b.preventDefault(),k.absUrl()!=d.url()&&(c.$apply(),h.angular["ff-684208-preventDefault"]=
+!0))}});Cb(k.absUrl())!=Cb(p)&&d.url(k.absUrl(),!0);var K=!0;d.onUrlChange(function(a,b){v(sa(t,a))?h.location.href=a:(c.$evalAsync(function(){var d=k.absUrl(),e=k.$$state,f;k.$$parse(a);k.$$state=b;f=c.$broadcast("$locationChangeStart",a,d,b,e).defaultPrevented;k.absUrl()===a&&(f?(k.$$parse(d),k.$$state=e,g(d,!1,e)):(K=!1,l(d,e)))}),c.$$phase||c.$digest())});c.$watch(function(){var a=Cb(d.url()),b=Cb(k.absUrl()),f=d.state(),h=k.$$replace,r=a!==b||k.$$html5&&e.history&&f!==k.$$state;if(K||r)K=!1,
+c.$evalAsync(function(){var b=k.absUrl(),d=c.$broadcast("$locationChangeStart",b,a,k.$$state,f).defaultPrevented;k.absUrl()===b&&(d?(k.$$parse(a),k.$$state=f):(r&&g(b,h,f===k.$$state?null:k.$$state),l(a,f)))});k.$$replace=!1});return k}]}function jf(){var b=!0,a=this;this.debugEnabled=function(a){return A(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||y;a=!1;try{a=!!e.apply}catch(l){}return a?function(){var a=[];m(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 Xa(b,a){if("__defineGetter__"===b||"__defineSetter__"===b||"__lookupGetter__"===b||"__lookupSetter__"===
+b||"__proto__"===b)throw Z("isecfld",a);return b}function kd(b,a){b+="";if(!G(b))throw Z("iseccst",a);return b}function Ba(b,a){if(b){if(b.constructor===b)throw Z("isecfn",a);if(b.window===b)throw Z("isecwindow",a);if(b.children&&(b.nodeName||b.prop&&b.attr&&b.find))throw Z("isecdom",a);if(b===Object)throw Z("isecobj",a);}return b}function ld(b,a){if(b){if(b.constructor===b)throw Z("isecfn",a);if(b===Uf||b===Vf||b===Wf)throw Z("isecff",a);}}function md(b,a){if(b&&(b===(0).constructor||b===(!1).constructor||
+b==="".constructor||b==={}.constructor||b===[].constructor||b===Function.constructor))throw Z("isecaf",a);}function Xf(b,a){return"undefined"!==typeof b?b:a}function nd(b,a){return"undefined"===typeof b?a:"undefined"===typeof a?b:b+a}function U(b,a){var c,d;switch(b.type){case s.Program:c=!0;m(b.body,function(b){U(b.expression,a);c=c&&b.expression.constant});b.constant=c;break;case s.Literal:b.constant=!0;b.toWatch=[];break;case s.UnaryExpression:U(b.argument,a);b.constant=b.argument.constant;b.toWatch=
+b.argument.toWatch;break;case s.BinaryExpression:U(b.left,a);U(b.right,a);b.constant=b.left.constant&&b.right.constant;b.toWatch=b.left.toWatch.concat(b.right.toWatch);break;case s.LogicalExpression:U(b.left,a);U(b.right,a);b.constant=b.left.constant&&b.right.constant;b.toWatch=b.constant?[]:[b];break;case s.ConditionalExpression:U(b.test,a);U(b.alternate,a);U(b.consequent,a);b.constant=b.test.constant&&b.alternate.constant&&b.consequent.constant;b.toWatch=b.constant?[]:[b];break;case s.Identifier:b.constant=
+!1;b.toWatch=[b];break;case s.MemberExpression:U(b.object,a);b.computed&&U(b.property,a);b.constant=b.object.constant&&(!b.computed||b.property.constant);b.toWatch=[b];break;case s.CallExpression:c=b.filter?!a(b.callee.name).$stateful:!1;d=[];m(b.arguments,function(b){U(b,a);c=c&&b.constant;b.constant||d.push.apply(d,b.toWatch)});b.constant=c;b.toWatch=b.filter&&!a(b.callee.name).$stateful?d:[b];break;case s.AssignmentExpression:U(b.left,a);U(b.right,a);b.constant=b.left.constant&&b.right.constant;
+b.toWatch=[b];break;case s.ArrayExpression:c=!0;d=[];m(b.elements,function(b){U(b,a);c=c&&b.constant;b.constant||d.push.apply(d,b.toWatch)});b.constant=c;b.toWatch=d;break;case s.ObjectExpression:c=!0;d=[];m(b.properties,function(b){U(b.value,a);c=c&&b.value.constant;b.value.constant||d.push.apply(d,b.value.toWatch)});b.constant=c;b.toWatch=d;break;case s.ThisExpression:b.constant=!1,b.toWatch=[]}}function od(b){if(1==b.length){b=b[0].expression;var a=b.toWatch;return 1!==a.length?a:a[0]!==b?a:w}}
+function pd(b){return b.type===s.Identifier||b.type===s.MemberExpression}function qd(b){if(1===b.body.length&&pd(b.body[0].expression))return{type:s.AssignmentExpression,left:b.body[0].expression,right:{type:s.NGValueParameter},operator:"="}}function rd(b){return 0===b.body.length||1===b.body.length&&(b.body[0].expression.type===s.Literal||b.body[0].expression.type===s.ArrayExpression||b.body[0].expression.type===s.ObjectExpression)}function sd(b,a){this.astBuilder=b;this.$filter=a}function td(b,
+a){this.astBuilder=b;this.$filter=a}function Fb(b){return"constructor"==b}function dc(b){return x(b.valueOf)?b.valueOf():Yf.call(b)}function kf(){var b=fa(),a=fa();this.$get=["$filter",function(c){function d(a,b){return null==a||null==b?a===b:"object"===typeof a&&(a=dc(a),"object"===typeof a)?!1:a===b||a!==a&&b!==b}function e(a,b,c,e,f){var g=e.inputs,h;if(1===g.length){var k=d,g=g[0];return a.$watch(function(a){var b=g(a);d(b,k)||(h=e(a,w,w,[b]),k=b&&dc(b));return h},b,c,f)}for(var l=[],n=[],p=0,
+m=g.length;p<m;p++)l[p]=d,n[p]=null;return a.$watch(function(a){for(var b=!1,c=0,f=g.length;c<f;c++){var k=g[c](a);if(b||(b=!d(k,l[c])))n[c]=k,l[c]=k&&dc(k)}b&&(h=e(a,w,w,n));return h},b,c,f)}function f(a,b,c,d){var e,f;return e=a.$watch(function(a){return d(a)},function(a,c,d){f=a;x(b)&&b.apply(this,arguments);A(a)&&d.$$postDigest(function(){A(f)&&e()})},c)}function h(a,b,c,d){function e(a){var b=!0;m(a,function(a){A(a)||(b=!1)});return b}var f,g;return f=a.$watch(function(a){return d(a)},function(a,
+c,d){g=a;x(b)&&b.call(this,a,c,d);e(a)&&d.$$postDigest(function(){e(g)&&f()})},c)}function g(a,b,c,d){var e;return e=a.$watch(function(a){return d(a)},function(a,c,d){x(b)&&b.apply(this,arguments);e()},c)}function l(a,b){if(!b)return a;var c=a.$$watchDelegate,c=c!==h&&c!==f?function(c,d,e,f){e=a(c,d,e,f);return b(e,c,d)}:function(c,d,e,f){e=a(c,d,e,f);c=b(e,c,d);return A(e)?c:e};a.$$watchDelegate&&a.$$watchDelegate!==e?c.$$watchDelegate=a.$$watchDelegate:b.$stateful||(c.$$watchDelegate=e,c.inputs=
+a.inputs?a.inputs:[a]);return c}var k=Fa().noUnsafeEval,n={csp:k,expensiveChecks:!1},p={csp:k,expensiveChecks:!0};return function(d,k,E){var m,u,q;switch(typeof d){case "string":q=d=d.trim();var s=E?a:b;m=s[q];m||(":"===d.charAt(0)&&":"===d.charAt(1)&&(u=!0,d=d.substring(2)),E=E?p:n,m=new ec(E),m=(new fc(m,c,E)).parse(d),m.constant?m.$$watchDelegate=g:u?m.$$watchDelegate=m.literal?h:f:m.inputs&&(m.$$watchDelegate=e),s[q]=m);return l(m,k);case "function":return l(d,k);default:return y}}}]}function mf(){this.$get=
+["$rootScope","$exceptionHandler",function(b,a){return ud(function(a){b.$evalAsync(a)},a)}]}function nf(){this.$get=["$browser","$exceptionHandler",function(b,a){return ud(function(a){b.defer(a)},a)}]}function ud(b,a){function c(a,b,c){function d(b){return function(c){e||(e=!0,b.call(a,c))}}var e=!1;return[d(b),d(c)]}function d(){this.$$state={status:0}}function e(a,b){return function(c){b.call(a,c)}}function f(c){!c.processScheduled&&c.pending&&(c.processScheduled=!0,b(function(){var b,d,e;e=c.pending;
+c.processScheduled=!1;c.pending=w;for(var f=0,g=e.length;f<g;++f){d=e[f][0];b=e[f][c.status];try{x(b)?d.resolve(b(c.value)):1===c.status?d.resolve(c.value):d.reject(c.value)}catch(h){d.reject(h),a(h)}}}))}function h(){this.promise=new d;this.resolve=e(this,this.resolve);this.reject=e(this,this.reject);this.notify=e(this,this.notify)}var g=I("$q",TypeError);P(d.prototype,{then:function(a,b,c){if(v(a)&&v(b)&&v(c))return this;var d=new h;this.$$state.pending=this.$$state.pending||[];this.$$state.pending.push([d,
+a,b,c]);0<this.$$state.status&&f(this.$$state);return d.promise},"catch":function(a){return this.then(null,a)},"finally":function(a,b){return this.then(function(b){return k(b,!0,a)},function(b){return k(b,!1,a)},b)}});P(h.prototype,{resolve:function(a){this.promise.$$state.status||(a===this.promise?this.$$reject(g("qcycle",a)):this.$$resolve(a))},$$resolve:function(b){var d,e;e=c(this,this.$$resolve,this.$$reject);try{if(C(b)||x(b))d=b&&b.then;x(d)?(this.promise.$$state.status=-1,d.call(b,e[0],e[1],
+this.notify)):(this.promise.$$state.value=b,this.promise.$$state.status=1,f(this.promise.$$state))}catch(g){e[1](g),a(g)}},reject:function(a){this.promise.$$state.status||this.$$reject(a)},$$reject:function(a){this.promise.$$state.value=a;this.promise.$$state.status=2;f(this.promise.$$state)},notify:function(c){var d=this.promise.$$state.pending;0>=this.promise.$$state.status&&d&&d.length&&b(function(){for(var b,e,f=0,g=d.length;f<g;f++){e=d[f][0];b=d[f][3];try{e.notify(x(b)?b(c):c)}catch(h){a(h)}}})}});
+var l=function(a,b){var c=new h;b?c.resolve(a):c.reject(a);return c.promise},k=function(a,b,c){var d=null;try{x(c)&&(d=c())}catch(e){return l(e,!1)}return d&&x(d.then)?d.then(function(){return l(a,b)},function(a){return l(a,!1)}):l(a,b)},n=function(a,b,c,d){var e=new h;e.resolve(a);return e.promise.then(b,c,d)},p=function t(a){if(!x(a))throw g("norslvr",a);if(!(this instanceof t))return new t(a);var b=new h;a(function(a){b.resolve(a)},function(a){b.reject(a)});return b.promise};p.defer=function(){return new h};
+p.reject=function(a){var b=new h;b.reject(a);return b.promise};p.when=n;p.resolve=n;p.all=function(a){var b=new h,c=0,d=J(a)?[]:{};m(a,function(a,e){c++;n(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};return p}function wf(){this.$get=["$window","$timeout",function(b,a){var c=b.requestAnimationFrame||b.webkitRequestAnimationFrame,d=b.cancelAnimationFrame||b.webkitCancelAnimationFrame||b.webkitCancelRequestAnimationFrame,
+e=!!c,f=e?function(a){var b=c(a);return function(){d(b)}}:function(b){var c=a(b,16.66,!1);return function(){a.cancel(c)}};f.supported=e;return f}]}function lf(){function b(a){function b(){this.$$watchers=this.$$nextSibling=this.$$childHead=this.$$childTail=null;this.$$listeners={};this.$$listenerCount={};this.$$watchersCount=0;this.$id=++nb;this.$$ChildScope=null}b.prototype=a;return b}var a=10,c=I("$rootScope"),d=null,e=null;this.digestTtl=function(b){arguments.length&&(a=b);return a};this.$get=
+["$injector","$exceptionHandler","$parse","$browser",function(f,h,g,l){function k(a){a.currentScope.$$destroyed=!0}function n(){this.$id=++nb;this.$$phase=this.$parent=this.$$watchers=this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=null;this.$root=this;this.$$destroyed=!1;this.$$listeners={};this.$$listenerCount={};this.$$watchersCount=0;this.$$isolateBindings=null}function p(a){if(q.$$phase)throw c("inprog",q.$$phase);q.$$phase=a}function r(a,b){do a.$$watchersCount+=b;while(a=
+a.$parent)}function t(a,b,c){do a.$$listenerCount[c]-=b,0===a.$$listenerCount[c]&&delete a.$$listenerCount[c];while(a=a.$parent)}function E(){}function s(){for(;w.length;)try{w.shift()()}catch(a){h(a)}e=null}function u(){null===e&&(e=l.defer(function(){q.$apply(s)}))}n.prototype={constructor:n,$new:function(a,c){var d;c=c||this;a?(d=new n,d.$root=this.$root):(this.$$ChildScope||(this.$$ChildScope=b(this)),d=new this.$$ChildScope);d.$parent=c;d.$$prevSibling=c.$$childTail;c.$$childHead?(c.$$childTail.$$nextSibling=
+d,c.$$childTail=d):c.$$childHead=c.$$childTail=d;(a||c!=this)&&d.$on("$destroy",k);return d},$watch:function(a,b,c,e){var f=g(a);if(f.$$watchDelegate)return f.$$watchDelegate(this,b,c,f,a);var h=this,k=h.$$watchers,l={fn:b,last:E,get:f,exp:e||a,eq:!!c};d=null;x(b)||(l.fn=y);k||(k=h.$$watchers=[]);k.unshift(l);r(this,1);return function(){0<=cb(k,l)&&r(h,-1);d=null}},$watchGroup:function(a,b){function c(){h=!1;k?(k=!1,b(e,e,g)):b(e,d,g)}var d=Array(a.length),e=Array(a.length),f=[],g=this,h=!1,k=!0;
+if(!a.length){var l=!0;g.$evalAsync(function(){l&&b(e,e,g)});return function(){l=!1}}if(1===a.length)return this.$watch(a[0],function(a,c,f){e[0]=a;d[0]=c;b(e,a===c?e:d,f)});m(a,function(a,b){var k=g.$watch(a,function(a,f){e[b]=a;d[b]=f;h||(h=!0,g.$evalAsync(c))});f.push(k)});return function(){for(;f.length;)f.shift()()}},$watchCollection:function(a,b){function c(a){e=a;var b,d,g,h;if(!v(e)){if(C(e))if(Da(e))for(f!==p&&(f=p,t=f.length=0,l++),a=e.length,t!==a&&(l++,f.length=t=a),b=0;b<a;b++)h=f[b],
+g=e[b],d=h!==h&&g!==g,d||h===g||(l++,f[b]=g);else{f!==r&&(f=r={},t=0,l++);a=0;for(b in e)ta.call(e,b)&&(a++,g=e[b],h=f[b],b in f?(d=h!==h&&g!==g,d||h===g||(l++,f[b]=g)):(t++,f[b]=g,l++));if(t>a)for(b in l++,f)ta.call(e,b)||(t--,delete f[b])}else f!==e&&(f=e,l++);return l}}c.$stateful=!0;var d=this,e,f,h,k=1<b.length,l=0,n=g(a,c),p=[],r={},q=!0,t=0;return this.$watch(n,function(){q?(q=!1,b(e,e,d)):b(e,h,d);if(k)if(C(e))if(Da(e)){h=Array(e.length);for(var a=0;a<e.length;a++)h[a]=e[a]}else for(a in h=
+{},e)ta.call(e,a)&&(h[a]=e[a]);else h=e})},$digest:function(){var b,f,g,k,n,r,t=a,m,u=[],D,v;p("$digest");l.$$checkUrlChange();this===q&&null!==e&&(l.defer.cancel(e),s());d=null;do{r=!1;for(m=this;z.length;){try{v=z.shift(),v.scope.$eval(v.expression,v.locals)}catch(w){h(w)}d=null}a:do{if(k=m.$$watchers)for(n=k.length;n--;)try{if(b=k[n])if((f=b.get(m))!==(g=b.last)&&!(b.eq?ka(f,g):"number"===typeof f&&"number"===typeof g&&isNaN(f)&&isNaN(g)))r=!0,d=b,b.last=b.eq?ha(f,null):f,b.fn(f,g===E?f:g,m),5>
+t&&(D=4-t,u[D]||(u[D]=[]),u[D].push({msg:x(b.exp)?"fn: "+(b.exp.name||b.exp.toString()):b.exp,newVal:f,oldVal:g}));else if(b===d){r=!1;break a}}catch(y){h(y)}if(!(k=m.$$watchersCount&&m.$$childHead||m!==this&&m.$$nextSibling))for(;m!==this&&!(k=m.$$nextSibling);)m=m.$parent}while(m=k);if((r||z.length)&&!t--)throw q.$$phase=null,c("infdig",a,u);}while(r||z.length);for(q.$$phase=null;N.length;)try{N.shift()()}catch(A){h(A)}},$destroy:function(){if(!this.$$destroyed){var a=this.$parent;this.$broadcast("$destroy");
+this.$$destroyed=!0;this===q&&l.$$applicationDestroyed();r(this,-this.$$watchersCount);for(var b in this.$$listenerCount)t(this,this.$$listenerCount[b],b);a&&a.$$childHead==this&&(a.$$childHead=this.$$nextSibling);a&&a.$$childTail==this&&(a.$$childTail=this.$$prevSibling);this.$$prevSibling&&(this.$$prevSibling.$$nextSibling=this.$$nextSibling);this.$$nextSibling&&(this.$$nextSibling.$$prevSibling=this.$$prevSibling);this.$destroy=this.$digest=this.$apply=this.$evalAsync=this.$applyAsync=y;this.$on=
+this.$watch=this.$watchGroup=function(){return y};this.$$listeners={};this.$parent=this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=this.$root=this.$$watchers=null}},$eval:function(a,b){return g(a)(this,b)},$evalAsync:function(a,b){q.$$phase||z.length||l.defer(function(){z.length&&q.$digest()});z.push({scope:this,expression:a,locals:b})},$$postDigest:function(a){N.push(a)},$apply:function(a){try{p("$apply");try{return this.$eval(a)}finally{q.$$phase=null}}catch(b){h(b)}finally{try{q.$digest()}catch(c){throw h(c),
+c;}}},$applyAsync:function(a){function b(){c.$eval(a)}var c=this;a&&w.push(b);u()},$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(){var d=c.indexOf(b);-1!==d&&(c[d]=null,t(e,1,a))}},$emit:function(a,b){var c=[],d,e=this,f=!1,g={name:a,targetScope:e,stopPropagation:function(){f=!0},preventDefault:function(){g.defaultPrevented=!0},defaultPrevented:!1},
+k=db([g],arguments,1),l,n;do{d=e.$$listeners[a]||c;g.currentScope=e;l=0;for(n=d.length;l<n;l++)if(d[l])try{d[l].apply(null,k)}catch(p){h(p)}else d.splice(l,1),l--,n--;if(f)return g.currentScope=null,g;e=e.$parent}while(e);g.currentScope=null;return g},$broadcast:function(a,b){var c=this,d=this,e={name:a,targetScope:this,preventDefault:function(){e.defaultPrevented=!0},defaultPrevented:!1};if(!this.$$listenerCount[a])return e;for(var f=db([e],arguments,1),g,k;c=d;){e.currentScope=c;d=c.$$listeners[a]||
+[];g=0;for(k=d.length;g<k;g++)if(d[g])try{d[g].apply(null,f)}catch(l){h(l)}else d.splice(g,1),g--,k--;if(!(d=c.$$listenerCount[a]&&c.$$childHead||c!==this&&c.$$nextSibling))for(;c!==this&&!(d=c.$$nextSibling);)c=c.$parent}e.currentScope=null;return e}};var q=new n,z=q.$$asyncQueue=[],N=q.$$postDigestQueue=[],w=q.$$applyAsyncQueue=[];return q}]}function ge(){var b=/^\s*(https?|ftp|mailto|tel|file):/,a=/^\s*((https?|ftp|file|blob):|data:image\/)/;this.aHrefSanitizationWhitelist=function(a){return A(a)?
+(b=a,this):b};this.imgSrcSanitizationWhitelist=function(b){return A(b)?(a=b,this):a};this.$get=function(){return function(c,d){var e=d?a:b,f;f=Aa(c).href;return""===f||f.match(e)?c:"unsafe:"+f}}}function Zf(b){if("self"===b)return b;if(G(b)){if(-1<b.indexOf("***"))throw Ca("iwcard",b);b=vd(b).replace("\\*\\*",".*").replace("\\*","[^:/.?&;]*");return new RegExp("^"+b+"$")}if(Oa(b))return new RegExp("^"+b.source+"$");throw Ca("imatcher");}function wd(b){var a=[];A(b)&&m(b,function(b){a.push(Zf(b))});
+return a}function pf(){this.SCE_CONTEXTS=oa;var b=["self"],a=[];this.resourceUrlWhitelist=function(a){arguments.length&&(b=wd(a));return b};this.resourceUrlBlacklist=function(b){arguments.length&&(a=wd(b));return a};this.$get=["$injector",function(c){function d(a,b){return"self"===a?fd(b):!!a.exec(b.href)}function e(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 f=function(a){throw Ca("unsafe");};c.has("$sanitize")&&(f=c.get("$sanitize"));var h=e(),g={};g[oa.HTML]=e(h);g[oa.CSS]=e(h);g[oa.URL]=e(h);g[oa.JS]=e(h);g[oa.RESOURCE_URL]=e(g[oa.URL]);return{trustAs:function(a,b){var c=g.hasOwnProperty(a)?g[a]:null;if(!c)throw Ca("icontext",a,b);if(null===b||v(b)||""===b)return b;if("string"!==typeof b)throw Ca("itype",a);return new c(b)},getTrusted:function(c,e){if(null===e||v(e)||""===e)return e;var h=g.hasOwnProperty(c)?g[c]:null;if(h&&e instanceof
+h)return e.$$unwrapTrustedValue();if(c===oa.RESOURCE_URL){var h=Aa(e.toString()),p,r,t=!1;p=0;for(r=b.length;p<r;p++)if(d(b[p],h)){t=!0;break}if(t)for(p=0,r=a.length;p<r;p++)if(d(a[p],h)){t=!1;break}if(t)return e;throw Ca("insecurl",e.toString());}if(c===oa.HTML)return f(e);throw Ca("unsafe");},valueOf:function(a){return a instanceof h?a.$$unwrapTrustedValue():a}}}]}function of(){var b=!0;this.enabled=function(a){arguments.length&&(b=!!a);return b};this.$get=["$parse","$sceDelegate",function(a,c){if(b&&
+8>Wa)throw Ca("iequirks");var d=ja(oa);d.isEnabled=function(){return b};d.trustAs=c.trustAs;d.getTrusted=c.getTrusted;d.valueOf=c.valueOf;b||(d.trustAs=d.getTrusted=function(a,b){return b},d.valueOf=$a);d.parseAs=function(b,c){var e=a(c);return e.literal&&e.constant?e:a(c,function(a){return d.getTrusted(b,a)})};var e=d.parseAs,f=d.getTrusted,h=d.trustAs;m(oa,function(a,b){var c=F(b);d[gb("parse_as_"+c)]=function(b){return e(a,b)};d[gb("get_trusted_"+c)]=function(b){return f(a,b)};d[gb("trust_as_"+
+c)]=function(b){return h(a,b)}});return d}]}function qf(){this.$get=["$window","$document",function(b,a){var c={},d=Y((/android (\d+)/.exec(F((b.navigator||{}).userAgent))||[])[1]),e=/Boxee/i.test((b.navigator||{}).userAgent),f=a[0]||{},h,g=/^(Moz|webkit|ms)(?=[A-Z])/,l=f.body&&f.body.style,k=!1,n=!1;if(l){for(var p in l)if(k=g.exec(p)){h=k[0];h=h.substr(0,1).toUpperCase()+h.substr(1);break}h||(h="WebkitOpacity"in l&&"webkit");k=!!("transition"in l||h+"Transition"in l);n=!!("animation"in l||h+"Animation"in
+l);!d||k&&n||(k=G(l.webkitTransition),n=G(l.webkitAnimation))}return{history:!(!b.history||!b.history.pushState||4>d||e),hasEvent:function(a){if("input"===a&&11>=Wa)return!1;if(v(c[a])){var b=f.createElement("div");c[a]="on"+a in b}return c[a]},csp:Fa(),vendorPrefix:h,transitions:k,animations:n,android:d}}]}function sf(){this.$get=["$templateCache","$http","$q","$sce",function(b,a,c,d){function e(f,h){e.totalPendingRequests++;G(f)&&b.get(f)||(f=d.getTrustedResourceUrl(f));var g=a.defaults&&a.defaults.transformResponse;
+J(g)?g=g.filter(function(a){return a!==Zb}):g===Zb&&(g=null);return a.get(f,{cache:b,transformResponse:g})["finally"](function(){e.totalPendingRequests--}).then(function(a){b.put(f,a.data);return a.data},function(a){if(!h)throw ga("tpload",f,a.status,a.statusText);return c.reject(a)})}e.totalPendingRequests=0;return e}]}function tf(){this.$get=["$rootScope","$browser","$location",function(b,a,c){return{findBindings:function(a,b,c){a=a.getElementsByClassName("ng-binding");var h=[];m(a,function(a){var d=
+da.element(a).data("$binding");d&&m(d,function(d){c?(new RegExp("(^|\\s)"+vd(b)+"(\\s|\\||$)")).test(d)&&h.push(a):-1!=d.indexOf(b)&&h.push(a)})});return h},findModels:function(a,b,c){for(var h=["ng-","data-ng-","ng\\:"],g=0;g<h.length;++g){var l=a.querySelectorAll("["+h[g]+"model"+(c?"=":"*=")+'"'+b+'"]');if(l.length)return l}},getLocation:function(){return c.url()},setLocation:function(a){a!==c.url()&&(c.url(a),b.$digest())},whenStable:function(b){a.notifyWhenNoOutstandingRequests(b)}}}]}function uf(){this.$get=
+["$rootScope","$browser","$q","$$q","$exceptionHandler",function(b,a,c,d,e){function f(f,l,k){x(f)||(k=l,l=f,f=y);var n=ua.call(arguments,3),p=A(k)&&!k,r=(p?d:c).defer(),t=r.promise,m;m=a.defer(function(){try{r.resolve(f.apply(null,n))}catch(a){r.reject(a),e(a)}finally{delete h[t.$$timeoutId]}p||b.$apply()},l);t.$$timeoutId=m;h[m]=r;return t}var h={};f.cancel=function(b){return b&&b.$$timeoutId in h?(h[b.$$timeoutId].reject("canceled"),delete h[b.$$timeoutId],a.defer.cancel(b.$$timeoutId)):!1};return f}]}
+function Aa(b){Wa&&($.setAttribute("href",b),b=$.href);$.setAttribute("href",b);return{href:$.href,protocol:$.protocol?$.protocol.replace(/:$/,""):"",host:$.host,search:$.search?$.search.replace(/^\?/,""):"",hash:$.hash?$.hash.replace(/^#/,""):"",hostname:$.hostname,port:$.port,pathname:"/"===$.pathname.charAt(0)?$.pathname:"/"+$.pathname}}function fd(b){b=G(b)?Aa(b):b;return b.protocol===xd.protocol&&b.host===xd.host}function vf(){this.$get=qa(Q)}function yd(b){function a(a){try{return decodeURIComponent(a)}catch(b){return a}}
+var c=b[0]||{},d={},e="";return function(){var b,h,g,l,k;b=c.cookie||"";if(b!==e)for(e=b,b=e.split("; "),d={},g=0;g<b.length;g++)h=b[g],l=h.indexOf("="),0<l&&(k=a(h.substring(0,l)),v(d[k])&&(d[k]=a(h.substring(l+1))));return d}}function zf(){this.$get=yd}function Kc(b){function a(c,d){if(C(c)){var e={};m(c,function(b,c){e[c]=a(c,b)});return e}return b.factory(c+"Filter",d)}this.register=a;this.$get=["$injector",function(a){return function(b){return a.get(b+"Filter")}}];a("currency",zd);a("date",Ad);
+a("filter",$f);a("json",ag);a("limitTo",bg);a("lowercase",cg);a("number",Bd);a("orderBy",Cd);a("uppercase",dg)}function $f(){return function(b,a,c){if(!Da(b)){if(null==b)return b;throw I("filter")("notarray",b);}var d;switch(gc(a)){case "function":break;case "boolean":case "null":case "number":case "string":d=!0;case "object":a=eg(a,c,d);break;default:return b}return Array.prototype.filter.call(b,a)}}function eg(b,a,c){var d=C(b)&&"$"in b;!0===a?a=ka:x(a)||(a=function(a,b){if(v(a))return!1;if(null===
+a||null===b)return a===b;if(C(b)||C(a)&&!qc(a))return!1;a=F(""+a);b=F(""+b);return-1!==a.indexOf(b)});return function(e){return d&&!C(e)?Ma(e,b.$,a,!1):Ma(e,b,a,c)}}function Ma(b,a,c,d,e){var f=gc(b),h=gc(a);if("string"===h&&"!"===a.charAt(0))return!Ma(b,a.substring(1),c,d);if(J(b))return b.some(function(b){return Ma(b,a,c,d)});switch(f){case "object":var g;if(d){for(g in b)if("$"!==g.charAt(0)&&Ma(b[g],a,c,!0))return!0;return e?!1:Ma(b,a,c,!1)}if("object"===h){for(g in a)if(e=a[g],!x(e)&&!v(e)&&
+(f="$"===g,!Ma(f?b:b[g],e,c,f,f)))return!1;return!0}return c(b,a);case "function":return!1;default:return c(b,a)}}function gc(b){return null===b?"null":typeof b}function zd(b){var a=b.NUMBER_FORMATS;return function(b,d,e){v(d)&&(d=a.CURRENCY_SYM);v(e)&&(e=a.PATTERNS[1].maxFrac);return null==b?b:Dd(b,a.PATTERNS[1],a.GROUP_SEP,a.DECIMAL_SEP,e).replace(/\u00A4/g,d)}}function Bd(b){var a=b.NUMBER_FORMATS;return function(b,d){return null==b?b:Dd(b,a.PATTERNS[0],a.GROUP_SEP,a.DECIMAL_SEP,d)}}function Dd(b,
+a,c,d,e){if(C(b))return"";var f=0>b;b=Math.abs(b);var h=Infinity===b;if(!h&&!isFinite(b))return"";var g=b+"",l="",k=!1,n=[];h&&(l="\u221e");if(!h&&-1!==g.indexOf("e")){var p=g.match(/([\d\.]+)e(-?)(\d+)/);p&&"-"==p[2]&&p[3]>e+1?b=0:(l=g,k=!0)}if(h||k)0<e&&1>b&&(l=b.toFixed(e),b=parseFloat(l),l=l.replace(hc,d));else{h=(g.split(hc)[1]||"").length;v(e)&&(e=Math.min(Math.max(a.minFrac,h),a.maxFrac));b=+(Math.round(+(b.toString()+"e"+e)).toString()+"e"+-e);var h=(""+b).split(hc),g=h[0],h=h[1]||"",p=0,
+r=a.lgSize,t=a.gSize;if(g.length>=r+t)for(p=g.length-r,k=0;k<p;k++)0===(p-k)%t&&0!==k&&(l+=c),l+=g.charAt(k);for(k=p;k<g.length;k++)0===(g.length-k)%r&&0!==k&&(l+=c),l+=g.charAt(k);for(;h.length<e;)h+="0";e&&"0"!==e&&(l+=d+h.substr(0,e))}0===b&&(f=!1);n.push(f?a.negPre:a.posPre,l,f?a.negSuf:a.posSuf);return n.join("")}function Gb(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 aa(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 Gb(e,a,d)}}function Hb(b,a){return function(c,d){var e=c["get"+b](),f=sb(a?"SHORT"+b:b);return d[f][e]}}function Ed(b){var a=(new Date(b,0,1)).getDay();return new Date(b,0,(4>=a?5:12)-a)}function Fd(b){return function(a){var c=Ed(a.getFullYear());a=+new Date(a.getFullYear(),a.getMonth(),a.getDate()+(4-a.getDay()))-+c;a=1+Math.round(a/6048E5);return Gb(a,b)}}function ic(b,a){return 0>=b.getFullYear()?a.ERAS[0]:a.ERAS[1]}function Ad(b){function a(a){var b;if(b=
+a.match(c)){a=new Date(0);var f=0,h=0,g=b[8]?a.setUTCFullYear:a.setFullYear,l=b[8]?a.setUTCHours:a.setHours;b[9]&&(f=Y(b[9]+b[10]),h=Y(b[9]+b[11]));g.call(a,Y(b[1]),Y(b[2])-1,Y(b[3]));f=Y(b[4]||0)-f;h=Y(b[5]||0)-h;g=Y(b[6]||0);b=Math.round(1E3*parseFloat("0."+(b[7]||0)));l.call(a,f,h,g,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,f){var h="",g=[],l,k;e=e||"mediumDate";e=b.DATETIME_FORMATS[e]||e;G(c)&&(c=
+fg.test(c)?Y(c):a(c));V(c)&&(c=new Date(c));if(!ea(c)||!isFinite(c.getTime()))return c;for(;e;)(k=gg.exec(e))?(g=db(g,k,1),e=g.pop()):(g.push(e),e=null);var n=c.getTimezoneOffset();f&&(n=wc(f,c.getTimezoneOffset()),c=Ob(c,f,!0));m(g,function(a){l=hg[a];h+=l?l(c,b.DATETIME_FORMATS,n):a.replace(/(^'|'$)/g,"").replace(/''/g,"'")});return h}}function ag(){return function(b,a){v(a)&&(a=2);return eb(b,a)}}function bg(){return function(b,a,c){a=Infinity===Math.abs(Number(a))?Number(a):Y(a);if(isNaN(a))return b;
+V(b)&&(b=b.toString());if(!J(b)&&!G(b))return b;c=!c||isNaN(c)?0:Y(c);c=0>c&&c>=-b.length?b.length+c:c;return 0<=a?b.slice(c,c+a):0===c?b.slice(a,b.length):b.slice(Math.max(0,c+a),c)}}function Cd(b){function a(a,c){c=c?-1:1;return a.map(function(a){var d=1,g=$a;if(x(a))g=a;else if(G(a)){if("+"==a.charAt(0)||"-"==a.charAt(0))d="-"==a.charAt(0)?-1:1,a=a.substring(1);if(""!==a&&(g=b(a),g.constant))var l=g(),g=function(a){return a[l]}}return{get:g,descending:d*c}})}function c(a){switch(typeof a){case "number":case "boolean":case "string":return!0;
+default:return!1}}return function(b,e,f){if(!Da(b))return b;J(e)||(e=[e]);0===e.length&&(e=["+"]);var h=a(e,f);h.push({get:function(){return{}},descending:f?-1:1});b=Array.prototype.map.call(b,function(a,b){return{value:a,predicateValues:h.map(function(d){var e=d.get(a);d=typeof e;if(null===e)d="string",e="null";else if("string"===d)e=e.toLowerCase();else if("object"===d)a:{if("function"===typeof e.valueOf&&(e=e.valueOf(),c(e)))break a;if(qc(e)&&(e=e.toString(),c(e)))break a;e=b}return{value:e,type:d}})}});
+b.sort(function(a,b){for(var c=0,d=0,e=h.length;d<e;++d){var c=a.predicateValues[d],f=b.predicateValues[d],t=0;c.type===f.type?c.value!==f.value&&(t=c.value<f.value?-1:1):t=c.type<f.type?-1:1;if(c=t*h[d].descending)break}return c});return b=b.map(function(a){return a.value})}}function Na(b){x(b)&&(b={link:b});b.restrict=b.restrict||"AC";return qa(b)}function Gd(b,a,c,d,e){var f=this,h=[];f.$error={};f.$$success={};f.$pending=w;f.$name=e(a.name||a.ngForm||"")(c);f.$dirty=!1;f.$pristine=!0;f.$valid=
+!0;f.$invalid=!1;f.$submitted=!1;f.$$parentForm=Ib;f.$rollbackViewValue=function(){m(h,function(a){a.$rollbackViewValue()})};f.$commitViewValue=function(){m(h,function(a){a.$commitViewValue()})};f.$addControl=function(a){Ta(a.$name,"input");h.push(a);a.$name&&(f[a.$name]=a);a.$$parentForm=f};f.$$renameControl=function(a,b){var c=a.$name;f[c]===a&&delete f[c];f[b]=a;a.$name=b};f.$removeControl=function(a){a.$name&&f[a.$name]===a&&delete f[a.$name];m(f.$pending,function(b,c){f.$setValidity(c,null,a)});
+m(f.$error,function(b,c){f.$setValidity(c,null,a)});m(f.$$success,function(b,c){f.$setValidity(c,null,a)});cb(h,a);a.$$parentForm=Ib};Hd({ctrl:this,$element:b,set:function(a,b,c){var d=a[b];d?-1===d.indexOf(c)&&d.push(c):a[b]=[c]},unset:function(a,b,c){var d=a[b];d&&(cb(d,c),0===d.length&&delete a[b])},$animate:d});f.$setDirty=function(){d.removeClass(b,Ya);d.addClass(b,Jb);f.$dirty=!0;f.$pristine=!1;f.$$parentForm.$setDirty()};f.$setPristine=function(){d.setClass(b,Ya,Jb+" ng-submitted");f.$dirty=
+!1;f.$pristine=!0;f.$submitted=!1;m(h,function(a){a.$setPristine()})};f.$setUntouched=function(){m(h,function(a){a.$setUntouched()})};f.$setSubmitted=function(){d.addClass(b,"ng-submitted");f.$submitted=!0;f.$$parentForm.$setSubmitted()}}function jc(b){b.$formatters.push(function(a){return b.$isEmpty(a)?a:a.toString()})}function jb(b,a,c,d,e,f){var h=F(a[0].type);if(!e.android){var g=!1;a.on("compositionstart",function(a){g=!0});a.on("compositionend",function(){g=!1;l()})}var l=function(b){k&&(f.defer.cancel(k),
+k=null);if(!g){var e=a.val();b=b&&b.type;"password"===h||c.ngTrim&&"false"===c.ngTrim||(e=T(e));(d.$viewValue!==e||""===e&&d.$$hasNativeValidators)&&d.$setViewValue(e,b)}};if(e.hasEvent("input"))a.on("input",l);else{var k,n=function(a,b,c){k||(k=f.defer(function(){k=null;b&&b.value===c||l(a)}))};a.on("keydown",function(a){var b=a.keyCode;91===b||15<b&&19>b||37<=b&&40>=b||n(a,this,this.value)});if(e.hasEvent("paste"))a.on("paste cut",n)}a.on("change",l);d.$render=function(){var b=d.$isEmpty(d.$viewValue)?
+"":d.$viewValue;a.val()!==b&&a.val(b)}}function Kb(b,a){return function(c,d){var e,f;if(ea(c))return c;if(G(c)){'"'==c.charAt(0)&&'"'==c.charAt(c.length-1)&&(c=c.substring(1,c.length-1));if(ig.test(c))return new Date(c);b.lastIndex=0;if(e=b.exec(c))return e.shift(),f=d?{yyyy:d.getFullYear(),MM:d.getMonth()+1,dd:d.getDate(),HH:d.getHours(),mm:d.getMinutes(),ss:d.getSeconds(),sss:d.getMilliseconds()/1E3}:{yyyy:1970,MM:1,dd:1,HH:0,mm:0,ss:0,sss:0},m(e,function(b,c){c<a.length&&(f[a[c]]=+b)}),new Date(f.yyyy,
+f.MM-1,f.dd,f.HH,f.mm,f.ss||0,1E3*f.sss||0)}return NaN}}function kb(b,a,c,d){return function(e,f,h,g,l,k,n){function p(a){return a&&!(a.getTime&&a.getTime()!==a.getTime())}function r(a){return A(a)&&!ea(a)?c(a)||w:a}Id(e,f,h,g);jb(e,f,h,g,l,k);var t=g&&g.$options&&g.$options.timezone,m;g.$$parserName=b;g.$parsers.push(function(b){return g.$isEmpty(b)?null:a.test(b)?(b=c(b,m),t&&(b=Ob(b,t)),b):w});g.$formatters.push(function(a){if(a&&!ea(a))throw lb("datefmt",a);if(p(a))return(m=a)&&t&&(m=Ob(m,t,!0)),
+n("date")(a,d,t);m=null;return""});if(A(h.min)||h.ngMin){var s;g.$validators.min=function(a){return!p(a)||v(s)||c(a)>=s};h.$observe("min",function(a){s=r(a);g.$validate()})}if(A(h.max)||h.ngMax){var u;g.$validators.max=function(a){return!p(a)||v(u)||c(a)<=u};h.$observe("max",function(a){u=r(a);g.$validate()})}}}function Id(b,a,c,d){(d.$$hasNativeValidators=C(a[0].validity))&&d.$parsers.push(function(b){var c=a.prop("validity")||{};return c.badInput&&!c.typeMismatch?w:b})}function Jd(b,a,c,d,e){if(A(d)){b=
+b(d);if(!b.constant)throw lb("constexpr",c,d);return b(a)}return e}function kc(b,a){b="ngClass"+b;return["$animate",function(c){function d(a,b){var c=[],d=0;a:for(;d<a.length;d++){for(var e=a[d],n=0;n<b.length;n++)if(e==b[n])continue a;c.push(e)}return c}function e(a){var b=[];return J(a)?(m(a,function(a){b=b.concat(e(a))}),b):G(a)?a.split(" "):C(a)?(m(a,function(a,c){a&&(b=b.concat(c.split(" ")))}),b):a}return{restrict:"AC",link:function(f,h,g){function l(a,b){var c=h.data("$classCounts")||fa(),
+d=[];m(a,function(a){if(0<b||c[a])c[a]=(c[a]||0)+b,c[a]===+(0<b)&&d.push(a)});h.data("$classCounts",c);return d.join(" ")}function k(b){if(!0===a||f.$index%2===a){var k=e(b||[]);if(!n){var m=l(k,1);g.$addClass(m)}else if(!ka(b,n)){var s=e(n),m=d(k,s),k=d(s,k),m=l(m,1),k=l(k,-1);m&&m.length&&c.addClass(h,m);k&&k.length&&c.removeClass(h,k)}}n=ja(b)}var n;f.$watch(g[b],k,!0);g.$observe("class",function(a){k(f.$eval(g[b]))});"ngClass"!==b&&f.$watch("$index",function(c,d){var h=c&1;if(h!==(d&1)){var k=
+e(f.$eval(g[b]));h===a?(h=l(k,1),g.$addClass(h)):(h=l(k,-1),g.$removeClass(h))}})}}}]}function Hd(b){function a(a,b){b&&!f[a]?(l.addClass(e,a),f[a]=!0):!b&&f[a]&&(l.removeClass(e,a),f[a]=!1)}function c(b,c){b=b?"-"+Ac(b,"-"):"";a(mb+b,!0===c);a(Kd+b,!1===c)}var d=b.ctrl,e=b.$element,f={},h=b.set,g=b.unset,l=b.$animate;f[Kd]=!(f[mb]=e.hasClass(mb));d.$setValidity=function(b,e,f){v(e)?(d.$pending||(d.$pending={}),h(d.$pending,b,f)):(d.$pending&&g(d.$pending,b,f),Ld(d.$pending)&&(d.$pending=w));bb(e)?
+e?(g(d.$error,b,f),h(d.$$success,b,f)):(h(d.$error,b,f),g(d.$$success,b,f)):(g(d.$error,b,f),g(d.$$success,b,f));d.$pending?(a(Md,!0),d.$valid=d.$invalid=w,c("",null)):(a(Md,!1),d.$valid=Ld(d.$error),d.$invalid=!d.$valid,c("",d.$valid));e=d.$pending&&d.$pending[b]?w:d.$error[b]?!1:d.$$success[b]?!0:null;c(b,e);d.$$parentForm.$setValidity(b,e,d)}}function Ld(b){if(b)for(var a in b)if(b.hasOwnProperty(a))return!1;return!0}var jg=/^\/(.+)\/([a-z]*)$/,F=function(b){return G(b)?b.toLowerCase():b},ta=Object.prototype.hasOwnProperty,
+sb=function(b){return G(b)?b.toUpperCase():b},Wa,B,ra,ua=[].slice,Nf=[].splice,kg=[].push,va=Object.prototype.toString,rc=Object.getPrototypeOf,Ea=I("ng"),da=Q.angular||(Q.angular={}),Rb,nb=0;Wa=X.documentMode;y.$inject=[];$a.$inject=[];var J=Array.isArray,tc=/^\[object (Uint8(Clamped)?)|(Uint16)|(Uint32)|(Int8)|(Int16)|(Int32)|(Float(32)|(64))Array\]$/,T=function(b){return G(b)?b.trim():b},vd=function(b){return b.replace(/([-()\[\]{}+?*.$\^|,:#<!\\])/g,"\\$1").replace(/\x08/g,"\\x08")},Fa=function(){if(!A(Fa.rules)){var b=
+X.querySelector("[ng-csp]")||X.querySelector("[data-ng-csp]");if(b){var a=b.getAttribute("ng-csp")||b.getAttribute("data-ng-csp");Fa.rules={noUnsafeEval:!a||-1!==a.indexOf("no-unsafe-eval"),noInlineStyle:!a||-1!==a.indexOf("no-inline-style")}}else{b=Fa;try{new Function(""),a=!1}catch(c){a=!0}b.rules={noUnsafeEval:a,noInlineStyle:!1}}}return Fa.rules},pb=function(){if(A(pb.name_))return pb.name_;var b,a,c=Qa.length,d,e;for(a=0;a<c;++a)if(d=Qa[a],b=X.querySelector("["+d.replace(":","\\:")+"jq]")){e=
+b.getAttribute(d+"jq");break}return pb.name_=e},Qa=["ng-","data-ng-","ng:","x-ng-"],be=/[A-Z]/g,Bc=!1,Qb,pa=1,Pa=3,fe={full:"1.4.7",major:1,minor:4,dot:7,codeName:"dark-luminescence"};R.expando="ng339";var hb=R.cache={},Ff=1;R._data=function(b){return this.cache[b[this.expando]]||{}};var Af=/([\:\-\_]+(.))/g,Bf=/^moz([A-Z])/,lg={mouseleave:"mouseout",mouseenter:"mouseover"},Tb=I("jqLite"),Ef=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,Sb=/<|&#?\w+;/,Cf=/<([\w:-]+)/,Df=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,
+ma={option:[1,'<select multiple="multiple">',"</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};ma.optgroup=ma.option;ma.tbody=ma.tfoot=ma.colgroup=ma.caption=ma.thead;ma.th=ma.td;var Ra=R.prototype={ready:function(b){function a(){c||(c=!0,b())}var c=!1;"complete"===X.readyState?setTimeout(a):(this.on("DOMContentLoaded",a),R(Q).on("load",a))},
+toString:function(){var b=[];m(this,function(a){b.push(""+a)});return"["+b.join(", ")+"]"},eq:function(b){return 0<=b?B(this[b]):B(this[this.length+b])},length:0,push:kg,sort:[].sort,splice:[].splice},Bb={};m("multiple selected checked disabled readOnly required open".split(" "),function(b){Bb[F(b)]=b});var Sc={};m("input select option textarea button form details".split(" "),function(b){Sc[b]=!0});var $c={ngMinlength:"minlength",ngMaxlength:"maxlength",ngMin:"min",ngMax:"max",ngPattern:"pattern"};
+m({data:Vb,removeData:vb,hasData:function(b){for(var a in hb[b.ng339])return!0;return!1}},function(b,a){R[a]=b});m({data:Vb,inheritedData:Ab,scope:function(b){return B.data(b,"$scope")||Ab(b.parentNode||b,["$isolateScope","$scope"])},isolateScope:function(b){return B.data(b,"$isolateScope")||B.data(b,"$isolateScopeNoTemplate")},controller:Pc,injector:function(b){return Ab(b,"$injector")},removeAttr:function(b,a){b.removeAttribute(a)},hasClass:xb,css:function(b,a,c){a=gb(a);if(A(c))b.style[a]=c;else return b.style[a]},
+attr:function(b,a,c){var d=b.nodeType;if(d!==Pa&&2!==d&&8!==d)if(d=F(a),Bb[d])if(A(c))c?(b[a]=!0,b.setAttribute(a,d)):(b[a]=!1,b.removeAttribute(d));else return b[a]||(b.attributes.getNamedItem(a)||y).specified?d:w;else if(A(c))b.setAttribute(a,c);else if(b.getAttribute)return b=b.getAttribute(a,2),null===b?w:b},prop:function(b,a,c){if(A(c))b[a]=c;else return b[a]},text:function(){function b(a,b){if(v(b)){var d=a.nodeType;return d===pa||d===Pa?a.textContent:""}a.textContent=b}b.$dv="";return b}(),
+val:function(b,a){if(v(a)){if(b.multiple&&"select"===wa(b)){var c=[];m(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(v(a))return b.innerHTML;ub(b,!0);b.innerHTML=a},empty:Qc},function(b,a){R.prototype[a]=function(a,d){var e,f,h=this.length;if(b!==Qc&&v(2==b.length&&b!==xb&&b!==Pc?a:d)){if(C(a)){for(e=0;e<h;e++)if(b===Vb)b(this[e],a);else for(f in a)b(this[e],f,a[f]);return this}e=b.$dv;h=v(e)?Math.min(h,1):h;
+for(f=0;f<h;f++){var g=b(this[f],a,d);e=e?e+g:g}return e}for(e=0;e<h;e++)b(this[e],a,d);return this}});m({removeData:vb,on:function a(c,d,e,f){if(A(f))throw Tb("onargs");if(Lc(c)){var h=wb(c,!0);f=h.events;var g=h.handle;g||(g=h.handle=Hf(c,f));for(var h=0<=d.indexOf(" ")?d.split(" "):[d],l=h.length;l--;){d=h[l];var k=f[d];k||(f[d]=[],"mouseenter"===d||"mouseleave"===d?a(c,lg[d],function(a){var c=a.relatedTarget;c&&(c===this||this.contains(c))||g(a,d)}):"$destroy"!==d&&c.addEventListener(d,g,!1),
+k=f[d]);k.push(e)}}},off:Oc,one:function(a,c,d){a=B(a);a.on(c,function f(){a.off(c,d);a.off(c,f)});a.on(c,d)},replaceWith:function(a,c){var d,e=a.parentNode;ub(a);m(new R(c),function(c){d?e.insertBefore(c,d.nextSibling):e.replaceChild(c,a);d=c})},children:function(a){var c=[];m(a.childNodes,function(a){a.nodeType===pa&&c.push(a)});return c},contents:function(a){return a.contentDocument||a.childNodes||[]},append:function(a,c){var d=a.nodeType;if(d===pa||11===d){c=new R(c);for(var d=0,e=c.length;d<
+e;d++)a.appendChild(c[d])}},prepend:function(a,c){if(a.nodeType===pa){var d=a.firstChild;m(new R(c),function(c){a.insertBefore(c,d)})}},wrap:function(a,c){c=B(c).eq(0).clone()[0];var d=a.parentNode;d&&d.replaceChild(c,a);c.appendChild(a)},remove:Wb,detach:function(a){Wb(a,!0)},after:function(a,c){var d=a,e=a.parentNode;c=new R(c);for(var f=0,h=c.length;f<h;f++){var g=c[f];e.insertBefore(g,d.nextSibling);d=g}},addClass:zb,removeClass:yb,toggleClass:function(a,c,d){c&&m(c.split(" "),function(c){var f=
+d;v(f)&&(f=!xb(a,c));(f?zb:yb)(a,c)})},parent:function(a){return(a=a.parentNode)&&11!==a.nodeType?a:null},next:function(a){return a.nextElementSibling},find:function(a,c){return a.getElementsByTagName?a.getElementsByTagName(c):[]},clone:Ub,triggerHandler:function(a,c,d){var e,f,h=c.type||c,g=wb(a);if(g=(g=g&&g.events)&&g[h])e={preventDefault:function(){this.defaultPrevented=!0},isDefaultPrevented:function(){return!0===this.defaultPrevented},stopImmediatePropagation:function(){this.immediatePropagationStopped=
+!0},isImmediatePropagationStopped:function(){return!0===this.immediatePropagationStopped},stopPropagation:y,type:h,target:a},c.type&&(e=P(e,c)),c=ja(g),f=d?[e].concat(d):[e],m(c,function(c){e.isImmediatePropagationStopped()||c.apply(a,f)})}},function(a,c){R.prototype[c]=function(c,e,f){for(var h,g=0,l=this.length;g<l;g++)v(h)?(h=a(this[g],c,e,f),A(h)&&(h=B(h))):Nc(h,a(this[g],c,e,f));return A(h)?h:this};R.prototype.bind=R.prototype.on;R.prototype.unbind=R.prototype.off});Ua.prototype={put:function(a,
+c){this[Ga(a,this.nextUid)]=c},get:function(a){return this[Ga(a,this.nextUid)]},remove:function(a){var c=this[a=Ga(a,this.nextUid)];delete this[a];return c}};var yf=[function(){this.$get=[function(){return Ua}]}],Uc=/^[^\(]*\(\s*([^\)]*)\)/m,mg=/,/,ng=/^\s*(_?)(\S+?)\1\s*$/,Tc=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg,Ha=I("$injector");fb.$$annotate=function(a,c,d){var e;if("function"===typeof a){if(!(e=a.$inject)){e=[];if(a.length){if(c)throw G(d)&&d||(d=a.name||If(a)),Ha("strictdi",d);c=a.toString().replace(Tc,
+"");c=c.match(Uc);m(c[1].split(mg),function(a){a.replace(ng,function(a,c,d){e.push(d)})})}a.$inject=e}}else J(a)?(c=a.length-1,Sa(a[c],"fn"),e=a.slice(0,c)):Sa(a,"fn",!0);return e};var Nd=I("$animate"),Ue=function(){this.$get=["$q","$$rAF",function(a,c){function d(){}d.all=y;d.chain=y;d.prototype={end:y,cancel:y,resume:y,pause:y,complete:y,then:function(d,f){return a(function(a){c(function(){a()})}).then(d,f)}};return d}]},Te=function(){var a=new Ua,c=[];this.$get=["$$AnimateRunner","$rootScope",
+function(d,e){function f(a,c,d){var e=!1;c&&(c=G(c)?c.split(" "):J(c)?c:[],m(c,function(c){c&&(e=!0,a[c]=d)}));return e}function h(){m(c,function(c){var d=a.get(c);if(d){var e=Jf(c.attr("class")),f="",h="";m(d,function(a,c){a!==!!e[c]&&(a?f+=(f.length?" ":"")+c:h+=(h.length?" ":"")+c)});m(c,function(a){f&&zb(a,f);h&&yb(a,h)});a.remove(c)}});c.length=0}return{enabled:y,on:y,off:y,pin:y,push:function(g,l,k,n){n&&n();k=k||{};k.from&&g.css(k.from);k.to&&g.css(k.to);if(k.addClass||k.removeClass)if(l=k.addClass,
+n=k.removeClass,k=a.get(g)||{},l=f(k,l,!0),n=f(k,n,!1),l||n)a.put(g,k),c.push(g),1===c.length&&e.$$postDigest(h);return new d}}}]},Re=["$provide",function(a){var c=this;this.$$registeredAnimations=Object.create(null);this.register=function(d,e){if(d&&"."!==d.charAt(0))throw Nd("notcsel",d);var f=d+"-animation";c.$$registeredAnimations[d.substr(1)]=f;a.factory(f,e)};this.classNameFilter=function(a){if(1===arguments.length&&(this.$$classNameFilter=a instanceof RegExp?a:null)&&/(\s+|\/)ng-animate(\s+|\/)/.test(this.$$classNameFilter.toString()))throw Nd("nongcls",
+"ng-animate");return this.$$classNameFilter};this.$get=["$$animateQueue",function(a){function c(a,d,e){if(e){var l;a:{for(l=0;l<e.length;l++){var k=e[l];if(1===k.nodeType){l=k;break a}}l=void 0}!l||l.parentNode||l.previousElementSibling||(e=null)}e?e.after(a):d.prepend(a)}return{on:a.on,off:a.off,pin:a.pin,enabled:a.enabled,cancel:function(a){a.end&&a.end()},enter:function(f,h,g,l){h=h&&B(h);g=g&&B(g);h=h||g.parent();c(f,h,g);return a.push(f,"enter",Ia(l))},move:function(f,h,g,l){h=h&&B(h);g=g&&B(g);
+h=h||g.parent();c(f,h,g);return a.push(f,"move",Ia(l))},leave:function(c,e){return a.push(c,"leave",Ia(e),function(){c.remove()})},addClass:function(c,e,g){g=Ia(g);g.addClass=ib(g.addclass,e);return a.push(c,"addClass",g)},removeClass:function(c,e,g){g=Ia(g);g.removeClass=ib(g.removeClass,e);return a.push(c,"removeClass",g)},setClass:function(c,e,g,l){l=Ia(l);l.addClass=ib(l.addClass,e);l.removeClass=ib(l.removeClass,g);return a.push(c,"setClass",l)},animate:function(c,e,g,l,k){k=Ia(k);k.from=k.from?
+P(k.from,e):e;k.to=k.to?P(k.to,g):g;k.tempClasses=ib(k.tempClasses,l||"ng-inline-animate");return a.push(c,"animate",k)}}}]}],Se=function(){this.$get=["$$rAF","$q",function(a,c){var d=function(){};d.prototype={done:function(a){this.defer&&this.defer[!0===a?"reject":"resolve"]()},end:function(){this.done()},cancel:function(){this.done(!0)},getPromise:function(){this.defer||(this.defer=c.defer());return this.defer.promise},then:function(a,c){return this.getPromise().then(a,c)},"catch":function(a){return this.getPromise()["catch"](a)},
+"finally":function(a){return this.getPromise()["finally"](a)}};return function(c,f){function h(){a(function(){f.addClass&&(c.addClass(f.addClass),f.addClass=null);f.removeClass&&(c.removeClass(f.removeClass),f.removeClass=null);f.to&&(c.css(f.to),f.to=null);g||l.done();g=!0});return l}f.cleanupStyles&&(f.from=f.to=null);f.from&&(c.css(f.from),f.from=null);var g,l=new d;return{start:h,end:h}}}]},ga=I("$compile");Dc.$inject=["$provide","$$sanitizeUriProvider"];var Wc=/^((?:x|data)[\:\-_])/i,Of=I("$controller"),
+Vc=/^(\S+)(\s+as\s+(\w+))?$/,$e=function(){this.$get=["$document",function(a){return function(c){c?!c.nodeType&&c instanceof B&&(c=c[0]):c=a[0].body;return c.offsetWidth+1}}]},ad="application/json",$b={"Content-Type":ad+";charset=utf-8"},Qf=/^\[|^\{(?!\{)/,Rf={"[":/]$/,"{":/}$/},Pf=/^\)\]\}',?\n/,og=I("$http"),ed=function(a){return function(){throw og("legacy",a);}},La=da.$interpolateMinErr=I("$interpolate");La.throwNoconcat=function(a){throw La("noconcat",a);};La.interr=function(a,c){return La("interr",
+a,c.toString())};var pg=/^([^\?#]*)(\?([^#]*))?(#(.*))?$/,Tf={http:80,https:443,ftp:21},Db=I("$location"),qg={$$html5:!1,$$replace:!1,absUrl:Eb("$$absUrl"),url:function(a){if(v(a))return this.$$url;var c=pg.exec(a);(c[1]||""===a)&&this.path(decodeURIComponent(c[1]));(c[2]||c[1]||""===a)&&this.search(c[3]||"");this.hash(c[5]||"");return this},protocol:Eb("$$protocol"),host:Eb("$$host"),port:Eb("$$port"),path:jd("$$path",function(a){a=null!==a?a.toString():"";return"/"==a.charAt(0)?a:"/"+a}),search:function(a,
+c){switch(arguments.length){case 0:return this.$$search;case 1:if(G(a)||V(a))a=a.toString(),this.$$search=yc(a);else if(C(a))a=ha(a,{}),m(a,function(c,e){null==c&&delete a[e]}),this.$$search=a;else throw Db("isrcharg");break;default:v(c)||null===c?delete this.$$search[a]:this.$$search[a]=c}this.$$compose();return this},hash:jd("$$hash",function(a){return null!==a?a.toString():""}),replace:function(){this.$$replace=!0;return this}};m([id,cc,bc],function(a){a.prototype=Object.create(qg);a.prototype.state=
+function(c){if(!arguments.length)return this.$$state;if(a!==bc||!this.$$html5)throw Db("nostate");this.$$state=v(c)?null:c;return this}});var Z=I("$parse"),Uf=Function.prototype.call,Vf=Function.prototype.apply,Wf=Function.prototype.bind,Lb=fa();m("+ - * / % === !== == != < > <= >= && || ! = |".split(" "),function(a){Lb[a]=!0});var rg={n:"\n",f:"\f",r:"\r",t:"\t",v:"\v","'":"'",'"':'"'},ec=function(a){this.options=a};ec.prototype={constructor:ec,lex:function(a){this.text=a;this.index=0;for(this.tokens=
+[];this.index<this.text.length;)if(a=this.text.charAt(this.index),'"'===a||"'"===a)this.readString(a);else if(this.isNumber(a)||"."===a&&this.isNumber(this.peek()))this.readNumber();else if(this.isIdent(a))this.readIdent();else if(this.is(a,"(){}[].,;:?"))this.tokens.push({index:this.index,text:a}),this.index++;else if(this.isWhitespace(a))this.index++;else{var c=a+this.peek(),d=c+this.peek(2),e=Lb[c],f=Lb[d];Lb[a]||e||f?(a=f?d:e?c:a,this.tokens.push({index:this.index,text:a,operator:!0}),this.index+=
+a.length):this.throwError("Unexpected next character ",this.index,this.index+1)}return this.tokens},is:function(a,c){return-1!==c.indexOf(a)},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&&"string"===typeof 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=A(c)?"s "+c+"-"+this.index+" ["+this.text.substring(c,d)+"]":" "+d;throw Z("lexerr",a,c,this.text);},readNumber:function(){for(var a="",c=this.index;this.index<this.text.length;){var d=F(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++}this.tokens.push({index:c,text:a,constant:!0,value:Number(a)})},readIdent:function(){for(var a=this.index;this.index<this.text.length;){var c=this.text.charAt(this.index);if(!this.isIdent(c)&&!this.isNumber(c))break;this.index++}this.tokens.push({index:a,text:this.text.slice(a,this.index),identifier:!0})},readString:function(a){var c=this.index;this.index++;for(var d="",e=a,f=!1;this.index<this.text.length;){var h=
+this.text.charAt(this.index),e=e+h;if(f)"u"===h?(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+=rg[h]||h,f=!1;else if("\\"===h)f=!0;else{if(h===a){this.index++;this.tokens.push({index:c,text:e,constant:!0,value:d});return}d+=h}this.index++}this.throwError("Unterminated quote",c)}};var s=function(a,c){this.lexer=a;this.options=c};s.Program="Program";s.ExpressionStatement=
+"ExpressionStatement";s.AssignmentExpression="AssignmentExpression";s.ConditionalExpression="ConditionalExpression";s.LogicalExpression="LogicalExpression";s.BinaryExpression="BinaryExpression";s.UnaryExpression="UnaryExpression";s.CallExpression="CallExpression";s.MemberExpression="MemberExpression";s.Identifier="Identifier";s.Literal="Literal";s.ArrayExpression="ArrayExpression";s.Property="Property";s.ObjectExpression="ObjectExpression";s.ThisExpression="ThisExpression";s.NGValueParameter="NGValueParameter";
+s.prototype={ast:function(a){this.text=a;this.tokens=this.lexer.lex(a);a=this.program();0!==this.tokens.length&&this.throwError("is an unexpected token",this.tokens[0]);return a},program:function(){for(var a=[];;)if(0<this.tokens.length&&!this.peek("}",")",";","]")&&a.push(this.expressionStatement()),!this.expect(";"))return{type:s.Program,body:a}},expressionStatement:function(){return{type:s.ExpressionStatement,expression:this.filterChain()}},filterChain:function(){for(var a=this.expression();this.expect("|");)a=
+this.filter(a);return a},expression:function(){return this.assignment()},assignment:function(){var a=this.ternary();this.expect("=")&&(a={type:s.AssignmentExpression,left:a,right:this.assignment(),operator:"="});return a},ternary:function(){var a=this.logicalOR(),c,d;return this.expect("?")&&(c=this.expression(),this.consume(":"))?(d=this.expression(),{type:s.ConditionalExpression,test:a,alternate:c,consequent:d}):a},logicalOR:function(){for(var a=this.logicalAND();this.expect("||");)a={type:s.LogicalExpression,
+operator:"||",left:a,right:this.logicalAND()};return a},logicalAND:function(){for(var a=this.equality();this.expect("&&");)a={type:s.LogicalExpression,operator:"&&",left:a,right:this.equality()};return a},equality:function(){for(var a=this.relational(),c;c=this.expect("==","!=","===","!==");)a={type:s.BinaryExpression,operator:c.text,left:a,right:this.relational()};return a},relational:function(){for(var a=this.additive(),c;c=this.expect("<",">","<=",">=");)a={type:s.BinaryExpression,operator:c.text,
+left:a,right:this.additive()};return a},additive:function(){for(var a=this.multiplicative(),c;c=this.expect("+","-");)a={type:s.BinaryExpression,operator:c.text,left:a,right:this.multiplicative()};return a},multiplicative:function(){for(var a=this.unary(),c;c=this.expect("*","/","%");)a={type:s.BinaryExpression,operator:c.text,left:a,right:this.unary()};return a},unary:function(){var a;return(a=this.expect("+","-","!"))?{type:s.UnaryExpression,operator:a.text,prefix:!0,argument:this.unary()}:this.primary()},
+primary:function(){var a;this.expect("(")?(a=this.filterChain(),this.consume(")")):this.expect("[")?a=this.arrayDeclaration():this.expect("{")?a=this.object():this.constants.hasOwnProperty(this.peek().text)?a=ha(this.constants[this.consume().text]):this.peek().identifier?a=this.identifier():this.peek().constant?a=this.constant():this.throwError("not a primary expression",this.peek());for(var c;c=this.expect("(","[",".");)"("===c.text?(a={type:s.CallExpression,callee:a,arguments:this.parseArguments()},
+this.consume(")")):"["===c.text?(a={type:s.MemberExpression,object:a,property:this.expression(),computed:!0},this.consume("]")):"."===c.text?a={type:s.MemberExpression,object:a,property:this.identifier(),computed:!1}:this.throwError("IMPOSSIBLE");return a},filter:function(a){a=[a];for(var c={type:s.CallExpression,callee:this.identifier(),arguments:a,filter:!0};this.expect(":");)a.push(this.expression());return c},parseArguments:function(){var a=[];if(")"!==this.peekToken().text){do a.push(this.expression());
+while(this.expect(","))}return a},identifier:function(){var a=this.consume();a.identifier||this.throwError("is not a valid identifier",a);return{type:s.Identifier,name:a.text}},constant:function(){return{type:s.Literal,value:this.consume().value}},arrayDeclaration:function(){var a=[];if("]"!==this.peekToken().text){do{if(this.peek("]"))break;a.push(this.expression())}while(this.expect(","))}this.consume("]");return{type:s.ArrayExpression,elements:a}},object:function(){var a=[],c;if("}"!==this.peekToken().text){do{if(this.peek("}"))break;
+c={type:s.Property,kind:"init"};this.peek().constant?c.key=this.constant():this.peek().identifier?c.key=this.identifier():this.throwError("invalid key",this.peek());this.consume(":");c.value=this.expression();a.push(c)}while(this.expect(","))}this.consume("}");return{type:s.ObjectExpression,properties:a}},throwError:function(a,c){throw Z("syntax",c.text,a,c.index+1,this.text,this.text.substring(c.index));},consume:function(a){if(0===this.tokens.length)throw Z("ueoe",this.text);var c=this.expect(a);
+c||this.throwError("is unexpected, expecting ["+a+"]",this.peek());return c},peekToken:function(){if(0===this.tokens.length)throw Z("ueoe",this.text);return this.tokens[0]},peek:function(a,c,d,e){return this.peekAhead(0,a,c,d,e)},peekAhead:function(a,c,d,e,f){if(this.tokens.length>a){a=this.tokens[a];var h=a.text;if(h===c||h===d||h===e||h===f||!(c||d||e||f))return a}return!1},expect:function(a,c,d,e){return(a=this.peek(a,c,d,e))?(this.tokens.shift(),a):!1},constants:{"true":{type:s.Literal,value:!0},
+"false":{type:s.Literal,value:!1},"null":{type:s.Literal,value:null},undefined:{type:s.Literal,value:w},"this":{type:s.ThisExpression}}};sd.prototype={compile:function(a,c){var d=this,e=this.astBuilder.ast(a);this.state={nextId:0,filters:{},expensiveChecks:c,fn:{vars:[],body:[],own:{}},assign:{vars:[],body:[],own:{}},inputs:[]};U(e,d.$filter);var f="",h;this.stage="assign";if(h=qd(e))this.state.computing="assign",f=this.nextId(),this.recurse(h,f),this.return_(f),f="fn.assign="+this.generateFunction("assign",
+"s,v,l");h=od(e.body);d.stage="inputs";m(h,function(a,c){var e="fn"+c;d.state[e]={vars:[],body:[],own:{}};d.state.computing=e;var f=d.nextId();d.recurse(a,f);d.return_(f);d.state.inputs.push(e);a.watchId=c});this.state.computing="fn";this.stage="main";this.recurse(e);f='"'+this.USE+" "+this.STRICT+'";\n'+this.filterPrefix()+"var fn="+this.generateFunction("fn","s,l,a,i")+f+this.watchFns()+"return fn;";f=(new Function("$filter","ensureSafeMemberName","ensureSafeObject","ensureSafeFunction","getStringValue",
+"ensureSafeAssignContext","ifDefined","plus","text",f))(this.$filter,Xa,Ba,ld,kd,md,Xf,nd,a);this.state=this.stage=w;f.literal=rd(e);f.constant=e.constant;return f},USE:"use",STRICT:"strict",watchFns:function(){var a=[],c=this.state.inputs,d=this;m(c,function(c){a.push("var "+c+"="+d.generateFunction(c,"s"))});c.length&&a.push("fn.inputs=["+c.join(",")+"];");return a.join("")},generateFunction:function(a,c){return"function("+c+"){"+this.varsPrefix(a)+this.body(a)+"};"},filterPrefix:function(){var a=
+[],c=this;m(this.state.filters,function(d,e){a.push(d+"=$filter("+c.escape(e)+")")});return a.length?"var "+a.join(",")+";":""},varsPrefix:function(a){return this.state[a].vars.length?"var "+this.state[a].vars.join(",")+";":""},body:function(a){return this.state[a].body.join("")},recurse:function(a,c,d,e,f,h){var g,l,k=this,n,p;e=e||y;if(!h&&A(a.watchId))c=c||this.nextId(),this.if_("i",this.lazyAssign(c,this.computedMember("i",a.watchId)),this.lazyRecurse(a,c,d,e,f,!0));else switch(a.type){case s.Program:m(a.body,
+function(c,d){k.recurse(c.expression,w,w,function(a){l=a});d!==a.body.length-1?k.current().body.push(l,";"):k.return_(l)});break;case s.Literal:p=this.escape(a.value);this.assign(c,p);e(p);break;case s.UnaryExpression:this.recurse(a.argument,w,w,function(a){l=a});p=a.operator+"("+this.ifDefined(l,0)+")";this.assign(c,p);e(p);break;case s.BinaryExpression:this.recurse(a.left,w,w,function(a){g=a});this.recurse(a.right,w,w,function(a){l=a});p="+"===a.operator?this.plus(g,l):"-"===a.operator?this.ifDefined(g,
+0)+a.operator+this.ifDefined(l,0):"("+g+")"+a.operator+"("+l+")";this.assign(c,p);e(p);break;case s.LogicalExpression:c=c||this.nextId();k.recurse(a.left,c);k.if_("&&"===a.operator?c:k.not(c),k.lazyRecurse(a.right,c));e(c);break;case s.ConditionalExpression:c=c||this.nextId();k.recurse(a.test,c);k.if_(c,k.lazyRecurse(a.alternate,c),k.lazyRecurse(a.consequent,c));e(c);break;case s.Identifier:c=c||this.nextId();d&&(d.context="inputs"===k.stage?"s":this.assign(this.nextId(),this.getHasOwnProperty("l",
+a.name)+"?l:s"),d.computed=!1,d.name=a.name);Xa(a.name);k.if_("inputs"===k.stage||k.not(k.getHasOwnProperty("l",a.name)),function(){k.if_("inputs"===k.stage||"s",function(){f&&1!==f&&k.if_(k.not(k.nonComputedMember("s",a.name)),k.lazyAssign(k.nonComputedMember("s",a.name),"{}"));k.assign(c,k.nonComputedMember("s",a.name))})},c&&k.lazyAssign(c,k.nonComputedMember("l",a.name)));(k.state.expensiveChecks||Fb(a.name))&&k.addEnsureSafeObject(c);e(c);break;case s.MemberExpression:g=d&&(d.context=this.nextId())||
+this.nextId();c=c||this.nextId();k.recurse(a.object,g,w,function(){k.if_(k.notNull(g),function(){if(a.computed)l=k.nextId(),k.recurse(a.property,l),k.getStringValue(l),k.addEnsureSafeMemberName(l),f&&1!==f&&k.if_(k.not(k.computedMember(g,l)),k.lazyAssign(k.computedMember(g,l),"{}")),p=k.ensureSafeObject(k.computedMember(g,l)),k.assign(c,p),d&&(d.computed=!0,d.name=l);else{Xa(a.property.name);f&&1!==f&&k.if_(k.not(k.nonComputedMember(g,a.property.name)),k.lazyAssign(k.nonComputedMember(g,a.property.name),
+"{}"));p=k.nonComputedMember(g,a.property.name);if(k.state.expensiveChecks||Fb(a.property.name))p=k.ensureSafeObject(p);k.assign(c,p);d&&(d.computed=!1,d.name=a.property.name)}},function(){k.assign(c,"undefined")});e(c)},!!f);break;case s.CallExpression:c=c||this.nextId();a.filter?(l=k.filter(a.callee.name),n=[],m(a.arguments,function(a){var c=k.nextId();k.recurse(a,c);n.push(c)}),p=l+"("+n.join(",")+")",k.assign(c,p),e(c)):(l=k.nextId(),g={},n=[],k.recurse(a.callee,l,g,function(){k.if_(k.notNull(l),
+function(){k.addEnsureSafeFunction(l);m(a.arguments,function(a){k.recurse(a,k.nextId(),w,function(a){n.push(k.ensureSafeObject(a))})});g.name?(k.state.expensiveChecks||k.addEnsureSafeObject(g.context),p=k.member(g.context,g.name,g.computed)+"("+n.join(",")+")"):p=l+"("+n.join(",")+")";p=k.ensureSafeObject(p);k.assign(c,p)},function(){k.assign(c,"undefined")});e(c)}));break;case s.AssignmentExpression:l=this.nextId();g={};if(!pd(a.left))throw Z("lval");this.recurse(a.left,w,g,function(){k.if_(k.notNull(g.context),
+function(){k.recurse(a.right,l);k.addEnsureSafeObject(k.member(g.context,g.name,g.computed));k.addEnsureSafeAssignContext(g.context);p=k.member(g.context,g.name,g.computed)+a.operator+l;k.assign(c,p);e(c||p)})},1);break;case s.ArrayExpression:n=[];m(a.elements,function(a){k.recurse(a,k.nextId(),w,function(a){n.push(a)})});p="["+n.join(",")+"]";this.assign(c,p);e(p);break;case s.ObjectExpression:n=[];m(a.properties,function(a){k.recurse(a.value,k.nextId(),w,function(c){n.push(k.escape(a.key.type===
+s.Identifier?a.key.name:""+a.key.value)+":"+c)})});p="{"+n.join(",")+"}";this.assign(c,p);e(p);break;case s.ThisExpression:this.assign(c,"s");e("s");break;case s.NGValueParameter:this.assign(c,"v"),e("v")}},getHasOwnProperty:function(a,c){var d=a+"."+c,e=this.current().own;e.hasOwnProperty(d)||(e[d]=this.nextId(!1,a+"&&("+this.escape(c)+" in "+a+")"));return e[d]},assign:function(a,c){if(a)return this.current().body.push(a,"=",c,";"),a},filter:function(a){this.state.filters.hasOwnProperty(a)||(this.state.filters[a]=
+this.nextId(!0));return this.state.filters[a]},ifDefined:function(a,c){return"ifDefined("+a+","+this.escape(c)+")"},plus:function(a,c){return"plus("+a+","+c+")"},return_:function(a){this.current().body.push("return ",a,";")},if_:function(a,c,d){if(!0===a)c();else{var e=this.current().body;e.push("if(",a,"){");c();e.push("}");d&&(e.push("else{"),d(),e.push("}"))}},not:function(a){return"!("+a+")"},notNull:function(a){return a+"!=null"},nonComputedMember:function(a,c){return a+"."+c},computedMember:function(a,
+c){return a+"["+c+"]"},member:function(a,c,d){return d?this.computedMember(a,c):this.nonComputedMember(a,c)},addEnsureSafeObject:function(a){this.current().body.push(this.ensureSafeObject(a),";")},addEnsureSafeMemberName:function(a){this.current().body.push(this.ensureSafeMemberName(a),";")},addEnsureSafeFunction:function(a){this.current().body.push(this.ensureSafeFunction(a),";")},addEnsureSafeAssignContext:function(a){this.current().body.push(this.ensureSafeAssignContext(a),";")},ensureSafeObject:function(a){return"ensureSafeObject("+
+a+",text)"},ensureSafeMemberName:function(a){return"ensureSafeMemberName("+a+",text)"},ensureSafeFunction:function(a){return"ensureSafeFunction("+a+",text)"},getStringValue:function(a){this.assign(a,"getStringValue("+a+",text)")},ensureSafeAssignContext:function(a){return"ensureSafeAssignContext("+a+",text)"},lazyRecurse:function(a,c,d,e,f,h){var g=this;return function(){g.recurse(a,c,d,e,f,h)}},lazyAssign:function(a,c){var d=this;return function(){d.assign(a,c)}},stringEscapeRegex:/[^ a-zA-Z0-9]/g,
+stringEscapeFn:function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)},escape:function(a){if(G(a))return"'"+a.replace(this.stringEscapeRegex,this.stringEscapeFn)+"'";if(V(a))return a.toString();if(!0===a)return"true";if(!1===a)return"false";if(null===a)return"null";if("undefined"===typeof a)return"undefined";throw Z("esc");},nextId:function(a,c){var d="v"+this.state.nextId++;a||this.current().vars.push(d+(c?"="+c:""));return d},current:function(){return this.state[this.state.computing]}};
+td.prototype={compile:function(a,c){var d=this,e=this.astBuilder.ast(a);this.expression=a;this.expensiveChecks=c;U(e,d.$filter);var f,h;if(f=qd(e))h=this.recurse(f);f=od(e.body);var g;f&&(g=[],m(f,function(a,c){var e=d.recurse(a);a.input=e;g.push(e);a.watchId=c}));var l=[];m(e.body,function(a){l.push(d.recurse(a.expression))});f=0===e.body.length?function(){}:1===e.body.length?l[0]:function(a,c){var d;m(l,function(e){d=e(a,c)});return d};h&&(f.assign=function(a,c,d){return h(a,d,c)});g&&(f.inputs=
+g);f.literal=rd(e);f.constant=e.constant;return f},recurse:function(a,c,d){var e,f,h=this,g;if(a.input)return this.inputs(a.input,a.watchId);switch(a.type){case s.Literal:return this.value(a.value,c);case s.UnaryExpression:return f=this.recurse(a.argument),this["unary"+a.operator](f,c);case s.BinaryExpression:return e=this.recurse(a.left),f=this.recurse(a.right),this["binary"+a.operator](e,f,c);case s.LogicalExpression:return e=this.recurse(a.left),f=this.recurse(a.right),this["binary"+a.operator](e,
+f,c);case s.ConditionalExpression:return this["ternary?:"](this.recurse(a.test),this.recurse(a.alternate),this.recurse(a.consequent),c);case s.Identifier:return Xa(a.name,h.expression),h.identifier(a.name,h.expensiveChecks||Fb(a.name),c,d,h.expression);case s.MemberExpression:return e=this.recurse(a.object,!1,!!d),a.computed||(Xa(a.property.name,h.expression),f=a.property.name),a.computed&&(f=this.recurse(a.property)),a.computed?this.computedMember(e,f,c,d,h.expression):this.nonComputedMember(e,f,
+h.expensiveChecks,c,d,h.expression);case s.CallExpression:return g=[],m(a.arguments,function(a){g.push(h.recurse(a))}),a.filter&&(f=this.$filter(a.callee.name)),a.filter||(f=this.recurse(a.callee,!0)),a.filter?function(a,d,e,h){for(var r=[],m=0;m<g.length;++m)r.push(g[m](a,d,e,h));a=f.apply(w,r,h);return c?{context:w,name:w,value:a}:a}:function(a,d,e,p){var r=f(a,d,e,p),m;if(null!=r.value){Ba(r.context,h.expression);ld(r.value,h.expression);m=[];for(var s=0;s<g.length;++s)m.push(Ba(g[s](a,d,e,p),
+h.expression));m=Ba(r.value.apply(r.context,m),h.expression)}return c?{value:m}:m};case s.AssignmentExpression:return e=this.recurse(a.left,!0,1),f=this.recurse(a.right),function(a,d,g,p){var r=e(a,d,g,p);a=f(a,d,g,p);Ba(r.value,h.expression);md(r.context);r.context[r.name]=a;return c?{value:a}:a};case s.ArrayExpression:return g=[],m(a.elements,function(a){g.push(h.recurse(a))}),function(a,d,e,f){for(var h=[],m=0;m<g.length;++m)h.push(g[m](a,d,e,f));return c?{value:h}:h};case s.ObjectExpression:return g=
+[],m(a.properties,function(a){g.push({key:a.key.type===s.Identifier?a.key.name:""+a.key.value,value:h.recurse(a.value)})}),function(a,d,e,f){for(var h={},m=0;m<g.length;++m)h[g[m].key]=g[m].value(a,d,e,f);return c?{value:h}:h};case s.ThisExpression:return function(a){return c?{value:a}:a};case s.NGValueParameter:return function(a,d,e,f){return c?{value:e}:e}}},"unary+":function(a,c){return function(d,e,f,h){d=a(d,e,f,h);d=A(d)?+d:0;return c?{value:d}:d}},"unary-":function(a,c){return function(d,e,
+f,h){d=a(d,e,f,h);d=A(d)?-d:0;return c?{value:d}:d}},"unary!":function(a,c){return function(d,e,f,h){d=!a(d,e,f,h);return c?{value:d}:d}},"binary+":function(a,c,d){return function(e,f,h,g){var l=a(e,f,h,g);e=c(e,f,h,g);l=nd(l,e);return d?{value:l}:l}},"binary-":function(a,c,d){return function(e,f,h,g){var l=a(e,f,h,g);e=c(e,f,h,g);l=(A(l)?l:0)-(A(e)?e:0);return d?{value:l}:l}},"binary*":function(a,c,d){return function(e,f,h,g){e=a(e,f,h,g)*c(e,f,h,g);return d?{value:e}:e}},"binary/":function(a,c,
+d){return function(e,f,h,g){e=a(e,f,h,g)/c(e,f,h,g);return d?{value:e}:e}},"binary%":function(a,c,d){return function(e,f,h,g){e=a(e,f,h,g)%c(e,f,h,g);return d?{value:e}:e}},"binary===":function(a,c,d){return function(e,f,h,g){e=a(e,f,h,g)===c(e,f,h,g);return d?{value:e}:e}},"binary!==":function(a,c,d){return function(e,f,h,g){e=a(e,f,h,g)!==c(e,f,h,g);return d?{value:e}:e}},"binary==":function(a,c,d){return function(e,f,h,g){e=a(e,f,h,g)==c(e,f,h,g);return d?{value:e}:e}},"binary!=":function(a,c,
+d){return function(e,f,h,g){e=a(e,f,h,g)!=c(e,f,h,g);return d?{value:e}:e}},"binary<":function(a,c,d){return function(e,f,h,g){e=a(e,f,h,g)<c(e,f,h,g);return d?{value:e}:e}},"binary>":function(a,c,d){return function(e,f,h,g){e=a(e,f,h,g)>c(e,f,h,g);return d?{value:e}:e}},"binary<=":function(a,c,d){return function(e,f,h,g){e=a(e,f,h,g)<=c(e,f,h,g);return d?{value:e}:e}},"binary>=":function(a,c,d){return function(e,f,h,g){e=a(e,f,h,g)>=c(e,f,h,g);return d?{value:e}:e}},"binary&&":function(a,c,d){return function(e,
+f,h,g){e=a(e,f,h,g)&&c(e,f,h,g);return d?{value:e}:e}},"binary||":function(a,c,d){return function(e,f,h,g){e=a(e,f,h,g)||c(e,f,h,g);return d?{value:e}:e}},"ternary?:":function(a,c,d,e){return function(f,h,g,l){f=a(f,h,g,l)?c(f,h,g,l):d(f,h,g,l);return e?{value:f}:f}},value:function(a,c){return function(){return c?{context:w,name:w,value:a}:a}},identifier:function(a,c,d,e,f){return function(h,g,l,k){h=g&&a in g?g:h;e&&1!==e&&h&&!h[a]&&(h[a]={});g=h?h[a]:w;c&&Ba(g,f);return d?{context:h,name:a,value:g}:
+g}},computedMember:function(a,c,d,e,f){return function(h,g,l,k){var n=a(h,g,l,k),p,m;null!=n&&(p=c(h,g,l,k),p=kd(p),Xa(p,f),e&&1!==e&&n&&!n[p]&&(n[p]={}),m=n[p],Ba(m,f));return d?{context:n,name:p,value:m}:m}},nonComputedMember:function(a,c,d,e,f,h){return function(g,l,k,n){g=a(g,l,k,n);f&&1!==f&&g&&!g[c]&&(g[c]={});l=null!=g?g[c]:w;(d||Fb(c))&&Ba(l,h);return e?{context:g,name:c,value:l}:l}},inputs:function(a,c){return function(d,e,f,h){return h?h[c]:a(d,e,f)}}};var fc=function(a,c,d){this.lexer=
+a;this.$filter=c;this.options=d;this.ast=new s(this.lexer);this.astCompiler=d.csp?new td(this.ast,c):new sd(this.ast,c)};fc.prototype={constructor:fc,parse:function(a){return this.astCompiler.compile(a,this.options.expensiveChecks)}};fa();fa();var Yf=Object.prototype.valueOf,Ca=I("$sce"),oa={HTML:"html",CSS:"css",URL:"url",RESOURCE_URL:"resourceUrl",JS:"js"},ga=I("$compile"),$=X.createElement("a"),xd=Aa(Q.location.href);yd.$inject=["$document"];Kc.$inject=["$provide"];zd.$inject=["$locale"];Bd.$inject=
+["$locale"];var hc=".",hg={yyyy:aa("FullYear",4),yy:aa("FullYear",2,0,!0),y:aa("FullYear",1),MMMM:Hb("Month"),MMM:Hb("Month",!0),MM:aa("Month",2,1),M:aa("Month",1,1),dd:aa("Date",2),d:aa("Date",1),HH:aa("Hours",2),H:aa("Hours",1),hh:aa("Hours",2,-12),h:aa("Hours",1,-12),mm:aa("Minutes",2),m:aa("Minutes",1),ss:aa("Seconds",2),s:aa("Seconds",1),sss:aa("Milliseconds",3),EEEE:Hb("Day"),EEE:Hb("Day",!0),a:function(a,c){return 12>a.getHours()?c.AMPMS[0]:c.AMPMS[1]},Z:function(a,c,d){a=-1*d;return a=(0<=
+a?"+":"")+(Gb(Math[0<a?"floor":"ceil"](a/60),2)+Gb(Math.abs(a%60),2))},ww:Fd(2),w:Fd(1),G:ic,GG:ic,GGG:ic,GGGG:function(a,c){return 0>=a.getFullYear()?c.ERANAMES[0]:c.ERANAMES[1]}},gg=/((?:[^yMdHhmsaZEwG']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|d+|H+|h+|m+|s+|a|Z|G+|w+))(.*)/,fg=/^\-?\d+$/;Ad.$inject=["$locale"];var cg=qa(F),dg=qa(sb);Cd.$inject=["$parse"];var he=qa({restrict:"E",compile:function(a,c){if(!c.href&&!c.xlinkHref)return function(a,c){if("a"===c[0].nodeName.toLowerCase()){var f="[object SVGAnimatedString]"===
+va.call(c.prop("href"))?"xlink:href":"href";c.on("click",function(a){c.attr(f)||a.preventDefault()})}}}}),tb={};m(Bb,function(a,c){function d(a,d,f){a.$watch(f[e],function(a){f.$set(c,!!a)})}if("multiple"!=a){var e=ya("ng-"+c),f=d;"checked"===a&&(f=function(a,c,f){f.ngModel!==f[e]&&d(a,c,f)});tb[e]=function(){return{restrict:"A",priority:100,link:f}}}});m($c,function(a,c){tb[c]=function(){return{priority:100,link:function(a,e,f){if("ngPattern"===c&&"/"==f.ngPattern.charAt(0)&&(e=f.ngPattern.match(jg))){f.$set("ngPattern",
+new RegExp(e[1],e[2]));return}a.$watch(f[c],function(a){f.$set(c,a)})}}}});m(["src","srcset","href"],function(a){var c=ya("ng-"+a);tb[c]=function(){return{priority:99,link:function(d,e,f){var h=a,g=a;"href"===a&&"[object SVGAnimatedString]"===va.call(e.prop("href"))&&(g="xlinkHref",f.$attr[g]="xlink:href",h=null);f.$observe(c,function(c){c?(f.$set(g,c),Wa&&h&&e.prop(h,f[g])):"href"===a&&f.$set(g,null)})}}}});var Ib={$addControl:y,$$renameControl:function(a,c){a.$name=c},$removeControl:y,$setValidity:y,
+$setDirty:y,$setPristine:y,$setSubmitted:y};Gd.$inject=["$element","$attrs","$scope","$animate","$interpolate"];var Od=function(a){return["$timeout","$parse",function(c,d){function e(a){return""===a?d('this[""]').assign:d(a).assign||y}return{name:"form",restrict:a?"EAC":"E",require:["form","^^?form"],controller:Gd,compile:function(d,h){d.addClass(Ya).addClass(mb);var g=h.name?"name":a&&h.ngForm?"ngForm":!1;return{pre:function(a,d,f,h){var m=h[0];if(!("action"in f)){var t=function(c){a.$apply(function(){m.$commitViewValue();
+m.$setSubmitted()});c.preventDefault()};d[0].addEventListener("submit",t,!1);d.on("$destroy",function(){c(function(){d[0].removeEventListener("submit",t,!1)},0,!1)})}(h[1]||m.$$parentForm).$addControl(m);var s=g?e(m.$name):y;g&&(s(a,m),f.$observe(g,function(c){m.$name!==c&&(s(a,w),m.$$parentForm.$$renameControl(m,c),s=e(m.$name),s(a,m))}));d.on("$destroy",function(){m.$$parentForm.$removeControl(m);s(a,w);P(m,Ib)})}}}}}]},ie=Od(),ve=Od(!0),ig=/\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z)/,
+sg=/^(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?$/,tg=/^[a-z0-9!#$%&'*+\/=?^_`{|}~.-]+@[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$/i,ug=/^\s*(\-|\+)?(\d+|(\d*(\.\d*)))([eE][+-]?\d+)?\s*$/,Pd=/^(\d{4})-(\d{2})-(\d{2})$/,Qd=/^(\d{4})-(\d\d)-(\d\d)T(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,lc=/^(\d{4})-W(\d\d)$/,Rd=/^(\d{4})-(\d\d)$/,Sd=/^(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,Td={text:function(a,c,d,e,f,h){jb(a,c,d,e,f,h);jc(e)},date:kb("date",
+Pd,Kb(Pd,["yyyy","MM","dd"]),"yyyy-MM-dd"),"datetime-local":kb("datetimelocal",Qd,Kb(Qd,"yyyy MM dd HH mm ss sss".split(" ")),"yyyy-MM-ddTHH:mm:ss.sss"),time:kb("time",Sd,Kb(Sd,["HH","mm","ss","sss"]),"HH:mm:ss.sss"),week:kb("week",lc,function(a,c){if(ea(a))return a;if(G(a)){lc.lastIndex=0;var d=lc.exec(a);if(d){var e=+d[1],f=+d[2],h=d=0,g=0,l=0,k=Ed(e),f=7*(f-1);c&&(d=c.getHours(),h=c.getMinutes(),g=c.getSeconds(),l=c.getMilliseconds());return new Date(e,0,k.getDate()+f,d,h,g,l)}}return NaN},"yyyy-Www"),
+month:kb("month",Rd,Kb(Rd,["yyyy","MM"]),"yyyy-MM"),number:function(a,c,d,e,f,h){Id(a,c,d,e);jb(a,c,d,e,f,h);e.$$parserName="number";e.$parsers.push(function(a){return e.$isEmpty(a)?null:ug.test(a)?parseFloat(a):w});e.$formatters.push(function(a){if(!e.$isEmpty(a)){if(!V(a))throw lb("numfmt",a);a=a.toString()}return a});if(A(d.min)||d.ngMin){var g;e.$validators.min=function(a){return e.$isEmpty(a)||v(g)||a>=g};d.$observe("min",function(a){A(a)&&!V(a)&&(a=parseFloat(a,10));g=V(a)&&!isNaN(a)?a:w;e.$validate()})}if(A(d.max)||
+d.ngMax){var l;e.$validators.max=function(a){return e.$isEmpty(a)||v(l)||a<=l};d.$observe("max",function(a){A(a)&&!V(a)&&(a=parseFloat(a,10));l=V(a)&&!isNaN(a)?a:w;e.$validate()})}},url:function(a,c,d,e,f,h){jb(a,c,d,e,f,h);jc(e);e.$$parserName="url";e.$validators.url=function(a,c){var d=a||c;return e.$isEmpty(d)||sg.test(d)}},email:function(a,c,d,e,f,h){jb(a,c,d,e,f,h);jc(e);e.$$parserName="email";e.$validators.email=function(a,c){var d=a||c;return e.$isEmpty(d)||tg.test(d)}},radio:function(a,c,
+d,e){v(d.name)&&c.attr("name",++nb);c.on("click",function(a){c[0].checked&&e.$setViewValue(d.value,a&&a.type)});e.$render=function(){c[0].checked=d.value==e.$viewValue};d.$observe("value",e.$render)},checkbox:function(a,c,d,e,f,h,g,l){var k=Jd(l,a,"ngTrueValue",d.ngTrueValue,!0),n=Jd(l,a,"ngFalseValue",d.ngFalseValue,!1);c.on("click",function(a){e.$setViewValue(c[0].checked,a&&a.type)});e.$render=function(){c[0].checked=e.$viewValue};e.$isEmpty=function(a){return!1===a};e.$formatters.push(function(a){return ka(a,
+k)});e.$parsers.push(function(a){return a?k:n})},hidden:y,button:y,submit:y,reset:y,file:y},Ec=["$browser","$sniffer","$filter","$parse",function(a,c,d,e){return{restrict:"E",require:["?ngModel"],link:{pre:function(f,h,g,l){l[0]&&(Td[F(g.type)]||Td.text)(f,h,g,l[0],c,a,d,e)}}}}],vg=/^(true|false|\d+)$/,Ne=function(){return{restrict:"A",priority:100,compile:function(a,c){return vg.test(c.ngValue)?function(a,c,f){f.$set("value",a.$eval(f.ngValue))}:function(a,c,f){a.$watch(f.ngValue,function(a){f.$set("value",
+a)})}}}},ne=["$compile",function(a){return{restrict:"AC",compile:function(c){a.$$addBindingClass(c);return function(c,e,f){a.$$addBindingInfo(e,f.ngBind);e=e[0];c.$watch(f.ngBind,function(a){e.textContent=v(a)?"":a})}}}}],pe=["$interpolate","$compile",function(a,c){return{compile:function(d){c.$$addBindingClass(d);return function(d,f,h){d=a(f.attr(h.$attr.ngBindTemplate));c.$$addBindingInfo(f,d.expressions);f=f[0];h.$observe("ngBindTemplate",function(a){f.textContent=v(a)?"":a})}}}}],oe=["$sce","$parse",
+"$compile",function(a,c,d){return{restrict:"A",compile:function(e,f){var h=c(f.ngBindHtml),g=c(f.ngBindHtml,function(a){return(a||"").toString()});d.$$addBindingClass(e);return function(c,e,f){d.$$addBindingInfo(e,f.ngBindHtml);c.$watch(g,function(){e.html(a.getTrustedHtml(h(c))||"")})}}}}],Me=qa({restrict:"A",require:"ngModel",link:function(a,c,d,e){e.$viewChangeListeners.push(function(){a.$eval(d.ngChange)})}}),qe=kc("",!0),se=kc("Odd",0),re=kc("Even",1),te=Na({compile:function(a,c){c.$set("ngCloak",
+w);a.removeClass("ng-cloak")}}),ue=[function(){return{restrict:"A",scope:!0,controller:"@",priority:500}}],Jc={},wg={blur:!0,focus:!0};m("click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave keydown keyup keypress submit focus blur copy cut paste".split(" "),function(a){var c=ya("ng-"+a);Jc[c]=["$parse","$rootScope",function(d,e){return{restrict:"A",compile:function(f,h){var g=d(h[c],null,!0);return function(c,d){d.on(a,function(d){var f=function(){g(c,{$event:d})};
+wg[a]&&e.$$phase?c.$evalAsync(f):c.$apply(f)})}}}}]});var xe=["$animate",function(a){return{multiElement:!0,transclude:"element",priority:600,terminal:!0,restrict:"A",$$tlb:!0,link:function(c,d,e,f,h){var g,l,k;c.$watch(e.ngIf,function(c){c?l||h(function(c,f){l=f;c[c.length++]=X.createComment(" end ngIf: "+e.ngIf+" ");g={clone:c};a.enter(c,d.parent(),d)}):(k&&(k.remove(),k=null),l&&(l.$destroy(),l=null),g&&(k=rb(g.clone),a.leave(k).then(function(){k=null}),g=null))})}}}],ye=["$templateRequest","$anchorScroll",
+"$animate",function(a,c,d){return{restrict:"ECA",priority:400,terminal:!0,transclude:"element",controller:da.noop,compile:function(e,f){var h=f.ngInclude||f.src,g=f.onload||"",l=f.autoscroll;return function(e,f,m,r,t){var s=0,v,u,q,z=function(){u&&(u.remove(),u=null);v&&(v.$destroy(),v=null);q&&(d.leave(q).then(function(){u=null}),u=q,q=null)};e.$watch(h,function(h){var m=function(){!A(l)||l&&!e.$eval(l)||c()},p=++s;h?(a(h,!0).then(function(a){if(p===s){var c=e.$new();r.template=a;a=t(c,function(a){z();
+d.enter(a,null,f).then(m)});v=c;q=a;v.$emit("$includeContentLoaded",h);e.$eval(g)}},function(){p===s&&(z(),e.$emit("$includeContentError",h))}),e.$emit("$includeContentRequested",h)):(z(),r.template=null)})}}}}],Pe=["$compile",function(a){return{restrict:"ECA",priority:-400,require:"ngInclude",link:function(c,d,e,f){/SVG/.test(d[0].toString())?(d.empty(),a(Mc(f.template,X).childNodes)(c,function(a){d.append(a)},{futureParentElement:d})):(d.html(f.template),a(d.contents())(c))}}}],ze=Na({priority:450,
+compile:function(){return{pre:function(a,c,d){a.$eval(d.ngInit)}}}}),Le=function(){return{restrict:"A",priority:100,require:"ngModel",link:function(a,c,d,e){var f=c.attr(d.$attr.ngList)||", ",h="false"!==d.ngTrim,g=h?T(f):f;e.$parsers.push(function(a){if(!v(a)){var c=[];a&&m(a.split(g),function(a){a&&c.push(h?T(a):a)});return c}});e.$formatters.push(function(a){return J(a)?a.join(f):w});e.$isEmpty=function(a){return!a||!a.length}}}},mb="ng-valid",Kd="ng-invalid",Ya="ng-pristine",Jb="ng-dirty",Md=
+"ng-pending",lb=I("ngModel"),xg=["$scope","$exceptionHandler","$attrs","$element","$parse","$animate","$timeout","$rootScope","$q","$interpolate",function(a,c,d,e,f,h,g,l,k,n){this.$modelValue=this.$viewValue=Number.NaN;this.$$rawModelValue=w;this.$validators={};this.$asyncValidators={};this.$parsers=[];this.$formatters=[];this.$viewChangeListeners=[];this.$untouched=!0;this.$touched=!1;this.$pristine=!0;this.$dirty=!1;this.$valid=!0;this.$invalid=!1;this.$error={};this.$$success={};this.$pending=
+w;this.$name=n(d.name||"",!1)(a);this.$$parentForm=Ib;var p=f(d.ngModel),r=p.assign,t=p,s=r,K=null,u,q=this;this.$$setOptions=function(a){if((q.$options=a)&&a.getterSetter){var c=f(d.ngModel+"()"),g=f(d.ngModel+"($$$p)");t=function(a){var d=p(a);x(d)&&(d=c(a));return d};s=function(a,c){x(p(a))?g(a,{$$$p:q.$modelValue}):r(a,q.$modelValue)}}else if(!p.assign)throw lb("nonassign",d.ngModel,xa(e));};this.$render=y;this.$isEmpty=function(a){return v(a)||""===a||null===a||a!==a};var z=0;Hd({ctrl:this,$element:e,
+set:function(a,c){a[c]=!0},unset:function(a,c){delete a[c]},$animate:h});this.$setPristine=function(){q.$dirty=!1;q.$pristine=!0;h.removeClass(e,Jb);h.addClass(e,Ya)};this.$setDirty=function(){q.$dirty=!0;q.$pristine=!1;h.removeClass(e,Ya);h.addClass(e,Jb);q.$$parentForm.$setDirty()};this.$setUntouched=function(){q.$touched=!1;q.$untouched=!0;h.setClass(e,"ng-untouched","ng-touched")};this.$setTouched=function(){q.$touched=!0;q.$untouched=!1;h.setClass(e,"ng-touched","ng-untouched")};this.$rollbackViewValue=
+function(){g.cancel(K);q.$viewValue=q.$$lastCommittedViewValue;q.$render()};this.$validate=function(){if(!V(q.$modelValue)||!isNaN(q.$modelValue)){var a=q.$$rawModelValue,c=q.$valid,d=q.$modelValue,e=q.$options&&q.$options.allowInvalid;q.$$runValidators(a,q.$$lastCommittedViewValue,function(f){e||c===f||(q.$modelValue=f?a:w,q.$modelValue!==d&&q.$$writeModelToScope())})}};this.$$runValidators=function(a,c,d){function e(){var d=!0;m(q.$validators,function(e,f){var h=e(a,c);d=d&&h;g(f,h)});return d?
+!0:(m(q.$asyncValidators,function(a,c){g(c,null)}),!1)}function f(){var d=[],e=!0;m(q.$asyncValidators,function(f,h){var k=f(a,c);if(!k||!x(k.then))throw lb("$asyncValidators",k);g(h,w);d.push(k.then(function(){g(h,!0)},function(a){e=!1;g(h,!1)}))});d.length?k.all(d).then(function(){h(e)},y):h(!0)}function g(a,c){l===z&&q.$setValidity(a,c)}function h(a){l===z&&d(a)}z++;var l=z;(function(){var a=q.$$parserName||"parse";if(v(u))g(a,null);else return u||(m(q.$validators,function(a,c){g(c,null)}),m(q.$asyncValidators,
+function(a,c){g(c,null)})),g(a,u),u;return!0})()?e()?f():h(!1):h(!1)};this.$commitViewValue=function(){var a=q.$viewValue;g.cancel(K);if(q.$$lastCommittedViewValue!==a||""===a&&q.$$hasNativeValidators)q.$$lastCommittedViewValue=a,q.$pristine&&this.$setDirty(),this.$$parseAndValidate()};this.$$parseAndValidate=function(){var c=q.$$lastCommittedViewValue;if(u=v(c)?w:!0)for(var d=0;d<q.$parsers.length;d++)if(c=q.$parsers[d](c),v(c)){u=!1;break}V(q.$modelValue)&&isNaN(q.$modelValue)&&(q.$modelValue=t(a));
+var e=q.$modelValue,f=q.$options&&q.$options.allowInvalid;q.$$rawModelValue=c;f&&(q.$modelValue=c,q.$modelValue!==e&&q.$$writeModelToScope());q.$$runValidators(c,q.$$lastCommittedViewValue,function(a){f||(q.$modelValue=a?c:w,q.$modelValue!==e&&q.$$writeModelToScope())})};this.$$writeModelToScope=function(){s(a,q.$modelValue);m(q.$viewChangeListeners,function(a){try{a()}catch(d){c(d)}})};this.$setViewValue=function(a,c){q.$viewValue=a;q.$options&&!q.$options.updateOnDefault||q.$$debounceViewValueCommit(c)};
+this.$$debounceViewValueCommit=function(c){var d=0,e=q.$options;e&&A(e.debounce)&&(e=e.debounce,V(e)?d=e:V(e[c])?d=e[c]:V(e["default"])&&(d=e["default"]));g.cancel(K);d?K=g(function(){q.$commitViewValue()},d):l.$$phase?q.$commitViewValue():a.$apply(function(){q.$commitViewValue()})};a.$watch(function(){var c=t(a);if(c!==q.$modelValue&&(q.$modelValue===q.$modelValue||c===c)){q.$modelValue=q.$$rawModelValue=c;u=w;for(var d=q.$formatters,e=d.length,f=c;e--;)f=d[e](f);q.$viewValue!==f&&(q.$viewValue=
+q.$$lastCommittedViewValue=f,q.$render(),q.$$runValidators(c,f,y))}return c})}],Ke=["$rootScope",function(a){return{restrict:"A",require:["ngModel","^?form","^?ngModelOptions"],controller:xg,priority:1,compile:function(c){c.addClass(Ya).addClass("ng-untouched").addClass(mb);return{pre:function(a,c,f,h){var g=h[0];c=h[1]||g.$$parentForm;g.$$setOptions(h[2]&&h[2].$options);c.$addControl(g);f.$observe("name",function(a){g.$name!==a&&g.$$parentForm.$$renameControl(g,a)});a.$on("$destroy",function(){g.$$parentForm.$removeControl(g)})},
+post:function(c,e,f,h){var g=h[0];if(g.$options&&g.$options.updateOn)e.on(g.$options.updateOn,function(a){g.$$debounceViewValueCommit(a&&a.type)});e.on("blur",function(e){g.$touched||(a.$$phase?c.$evalAsync(g.$setTouched):c.$apply(g.$setTouched))})}}}}}],yg=/(\s+|^)default(\s+|$)/,Oe=function(){return{restrict:"A",controller:["$scope","$attrs",function(a,c){var d=this;this.$options=ha(a.$eval(c.ngModelOptions));A(this.$options.updateOn)?(this.$options.updateOnDefault=!1,this.$options.updateOn=T(this.$options.updateOn.replace(yg,
+function(){d.$options.updateOnDefault=!0;return" "}))):this.$options.updateOnDefault=!0}]}},Ae=Na({terminal:!0,priority:1E3}),zg=I("ngOptions"),Ag=/^\s*([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+group\s+by\s+([\s\S]+?))?(?:\s+disable\s+when\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]+?))?$/,Ie=["$compile","$parse",function(a,c){function d(a,d,e){function f(a,c,d,e,g){this.selectValue=a;this.viewValue=c;this.label=
+d;this.group=e;this.disabled=g}function n(a){var c;if(!s&&Da(a))c=a;else{c=[];for(var d in a)a.hasOwnProperty(d)&&"$"!==d.charAt(0)&&c.push(d)}return c}var m=a.match(Ag);if(!m)throw zg("iexp",a,xa(d));var r=m[5]||m[7],s=m[6];a=/ as /.test(m[0])&&m[1];var v=m[9];d=c(m[2]?m[1]:r);var w=a&&c(a)||d,u=v&&c(v),q=v?function(a,c){return u(e,c)}:function(a){return Ga(a)},z=function(a,c){return q(a,x(a,c))},y=c(m[2]||m[1]),A=c(m[3]||""),O=c(m[4]||""),H=c(m[8]),B={},x=s?function(a,c){B[s]=c;B[r]=a;return B}:
+function(a){B[r]=a;return B};return{trackBy:v,getTrackByValue:z,getWatchables:c(H,function(a){var c=[];a=a||[];for(var d=n(a),f=d.length,g=0;g<f;g++){var h=a===d?g:d[g],k=x(a[h],h),h=q(a[h],k);c.push(h);if(m[2]||m[1])h=y(e,k),c.push(h);m[4]&&(k=O(e,k),c.push(k))}return c}),getOptions:function(){for(var a=[],c={},d=H(e)||[],g=n(d),h=g.length,m=0;m<h;m++){var p=d===g?m:g[m],r=x(d[p],p),s=w(e,r),p=q(s,r),t=y(e,r),u=A(e,r),r=O(e,r),s=new f(p,s,t,u,r);a.push(s);c[p]=s}return{items:a,selectValueMap:c,getOptionFromViewValue:function(a){return c[z(a)]},
+getViewValueFromOption:function(a){return v?da.copy(a.viewValue):a.viewValue}}}}}var e=X.createElement("option"),f=X.createElement("optgroup");return{restrict:"A",terminal:!0,require:["select","?ngModel"],link:function(c,g,l,k){function n(a,c){a.element=c;c.disabled=a.disabled;a.label!==c.label&&(c.label=a.label,c.textContent=a.label);a.value!==c.value&&(c.value=a.selectValue)}function p(a,c,d,e){c&&F(c.nodeName)===d?d=c:(d=e.cloneNode(!1),c?a.insertBefore(d,c):a.appendChild(d));return d}function r(a){for(var c;a;)c=
+a.nextSibling,Wb(a),a=c}function s(a){var c=q&&q[0],d=H&&H[0];if(c||d)for(;a&&(a===c||a===d||c&&8===c.nodeType);)a=a.nextSibling;return a}function v(){var a=x&&u.readValue();x=C.getOptions();var c={},d=g[0].firstChild;O&&g.prepend(q);d=s(d);x.items.forEach(function(a){var h,k;a.group?(h=c[a.group],h||(h=p(g[0],d,"optgroup",f),d=h.nextSibling,h.label=a.group,h=c[a.group]={groupElement:h,currentOptionElement:h.firstChild}),k=p(h.groupElement,h.currentOptionElement,"option",e),n(a,k),h.currentOptionElement=
+k.nextSibling):(k=p(g[0],d,"option",e),n(a,k),d=k.nextSibling)});Object.keys(c).forEach(function(a){r(c[a].currentOptionElement)});r(d);w.$render();if(!w.$isEmpty(a)){var h=u.readValue();(C.trackBy?ka(a,h):a===h)||(w.$setViewValue(h),w.$render())}}var w=k[1];if(w){var u=k[0];k=l.multiple;for(var q,z=0,y=g.children(),A=y.length;z<A;z++)if(""===y[z].value){q=y.eq(z);break}var O=!!q,H=B(e.cloneNode(!1));H.val("?");var x,C=d(l.ngOptions,g,c);k?(w.$isEmpty=function(a){return!a||0===a.length},u.writeValue=
+function(a){x.items.forEach(function(a){a.element.selected=!1});a&&a.forEach(function(a){(a=x.getOptionFromViewValue(a))&&!a.disabled&&(a.element.selected=!0)})},u.readValue=function(){var a=g.val()||[],c=[];m(a,function(a){(a=x.selectValueMap[a])&&!a.disabled&&c.push(x.getViewValueFromOption(a))});return c},C.trackBy&&c.$watchCollection(function(){if(J(w.$viewValue))return w.$viewValue.map(function(a){return C.getTrackByValue(a)})},function(){w.$render()})):(u.writeValue=function(a){var c=x.getOptionFromViewValue(a);
+c&&!c.disabled?g[0].value!==c.selectValue&&(H.remove(),O||q.remove(),g[0].value=c.selectValue,c.element.selected=!0,c.element.setAttribute("selected","selected")):null===a||O?(H.remove(),O||g.prepend(q),g.val(""),q.prop("selected",!0),q.attr("selected",!0)):(O||q.remove(),g.prepend(H),g.val("?"),H.prop("selected",!0),H.attr("selected",!0))},u.readValue=function(){var a=x.selectValueMap[g.val()];return a&&!a.disabled?(O||q.remove(),H.remove(),x.getViewValueFromOption(a)):null},C.trackBy&&c.$watch(function(){return C.getTrackByValue(w.$viewValue)},
+function(){w.$render()}));O?(q.remove(),a(q)(c),q.removeClass("ng-scope")):q=B(e.cloneNode(!1));v();c.$watchCollection(C.getWatchables,v)}}}}],Be=["$locale","$interpolate","$log",function(a,c,d){var e=/{}/g,f=/^when(Minus)?(.+)$/;return{link:function(h,g,l){function k(a){g.text(a||"")}var n=l.count,p=l.$attr.when&&g.attr(l.$attr.when),r=l.offset||0,s=h.$eval(p)||{},w={},A=c.startSymbol(),u=c.endSymbol(),q=A+n+"-"+r+u,z=da.noop,x;m(l,function(a,c){var d=f.exec(c);d&&(d=(d[1]?"-":"")+F(d[2]),s[d]=g.attr(l.$attr[c]))});
+m(s,function(a,d){w[d]=c(a.replace(e,q))});h.$watch(n,function(c){var e=parseFloat(c),f=isNaN(e);f||e in s||(e=a.pluralCat(e-r));e===x||f&&V(x)&&isNaN(x)||(z(),f=w[e],v(f)?(null!=c&&d.debug("ngPluralize: no rule defined for '"+e+"' in "+p),z=y,k()):z=h.$watch(f,k),x=e)})}}}],Ce=["$parse","$animate",function(a,c){var d=I("ngRepeat"),e=function(a,c,d,e,k,m,p){a[d]=e;k&&(a[k]=m);a.$index=c;a.$first=0===c;a.$last=c===p-1;a.$middle=!(a.$first||a.$last);a.$odd=!(a.$even=0===(c&1))};return{restrict:"A",
+multiElement:!0,transclude:"element",priority:1E3,terminal:!0,$$tlb:!0,compile:function(f,h){var g=h.ngRepeat,l=X.createComment(" end ngRepeat: "+g+" "),k=g.match(/^\s*([\s\S]+?)\s+in\s+([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+track\s+by\s+([\s\S]+?))?\s*$/);if(!k)throw d("iexp",g);var n=k[1],p=k[2],r=k[3],s=k[4],k=n.match(/^(?:(\s*[\$\w]+)|\(\s*([\$\w]+)\s*,\s*([\$\w]+)\s*\))$/);if(!k)throw d("iidexp",n);var v=k[3]||k[1],y=k[2];if(r&&(!/^[$a-zA-Z_][$a-zA-Z0-9_]*$/.test(r)||/^(null|undefined|this|\$index|\$first|\$middle|\$last|\$even|\$odd|\$parent|\$root|\$id)$/.test(r)))throw d("badident",
+r);var u,q,z,A,x={$id:Ga};s?u=a(s):(z=function(a,c){return Ga(c)},A=function(a){return a});return function(a,f,h,k,n){u&&(q=function(c,d,e){y&&(x[y]=c);x[v]=d;x.$index=e;return u(a,x)});var s=fa();a.$watchCollection(p,function(h){var k,p,t=f[0],u,x=fa(),C,G,J,M,I,F,L;r&&(a[r]=h);if(Da(h))I=h,p=q||z;else for(L in p=q||A,I=[],h)ta.call(h,L)&&"$"!==L.charAt(0)&&I.push(L);C=I.length;L=Array(C);for(k=0;k<C;k++)if(G=h===I?k:I[k],J=h[G],M=p(G,J,k),s[M])F=s[M],delete s[M],x[M]=F,L[k]=F;else{if(x[M])throw m(L,
+function(a){a&&a.scope&&(s[a.id]=a)}),d("dupes",g,M,J);L[k]={id:M,scope:w,clone:w};x[M]=!0}for(u in s){F=s[u];M=rb(F.clone);c.leave(M);if(M[0].parentNode)for(k=0,p=M.length;k<p;k++)M[k].$$NG_REMOVED=!0;F.scope.$destroy()}for(k=0;k<C;k++)if(G=h===I?k:I[k],J=h[G],F=L[k],F.scope){u=t;do u=u.nextSibling;while(u&&u.$$NG_REMOVED);F.clone[0]!=u&&c.move(rb(F.clone),null,B(t));t=F.clone[F.clone.length-1];e(F.scope,k,v,J,y,G,C)}else n(function(a,d){F.scope=d;var f=l.cloneNode(!1);a[a.length++]=f;c.enter(a,
+null,B(t));t=f;F.clone=a;x[F.id]=F;e(F.scope,k,v,J,y,G,C)});s=x})}}}}],De=["$animate",function(a){return{restrict:"A",multiElement:!0,link:function(c,d,e){c.$watch(e.ngShow,function(c){a[c?"removeClass":"addClass"](d,"ng-hide",{tempClasses:"ng-hide-animate"})})}}}],we=["$animate",function(a){return{restrict:"A",multiElement:!0,link:function(c,d,e){c.$watch(e.ngHide,function(c){a[c?"addClass":"removeClass"](d,"ng-hide",{tempClasses:"ng-hide-animate"})})}}}],Ee=Na(function(a,c,d){a.$watch(d.ngStyle,
+function(a,d){d&&a!==d&&m(d,function(a,d){c.css(d,"")});a&&c.css(a)},!0)}),Fe=["$animate",function(a){return{require:"ngSwitch",controller:["$scope",function(){this.cases={}}],link:function(c,d,e,f){var h=[],g=[],l=[],k=[],n=function(a,c){return function(){a.splice(c,1)}};c.$watch(e.ngSwitch||e.on,function(c){var d,e;d=0;for(e=l.length;d<e;++d)a.cancel(l[d]);d=l.length=0;for(e=k.length;d<e;++d){var s=rb(g[d].clone);k[d].$destroy();(l[d]=a.leave(s)).then(n(l,d))}g.length=0;k.length=0;(h=f.cases["!"+
+c]||f.cases["?"])&&m(h,function(c){c.transclude(function(d,e){k.push(e);var f=c.element;d[d.length++]=X.createComment(" end ngSwitchWhen: ");g.push({clone:d});a.enter(d,f.parent(),f)})})})}}}],Ge=Na({transclude:"element",priority:1200,require:"^ngSwitch",multiElement:!0,link:function(a,c,d,e,f){e.cases["!"+d.ngSwitchWhen]=e.cases["!"+d.ngSwitchWhen]||[];e.cases["!"+d.ngSwitchWhen].push({transclude:f,element:c})}}),He=Na({transclude:"element",priority:1200,require:"^ngSwitch",multiElement:!0,link:function(a,
+c,d,e,f){e.cases["?"]=e.cases["?"]||[];e.cases["?"].push({transclude:f,element:c})}}),Je=Na({restrict:"EAC",link:function(a,c,d,e,f){if(!f)throw I("ngTransclude")("orphan",xa(c));f(function(a){c.empty();c.append(a)})}}),je=["$templateCache",function(a){return{restrict:"E",terminal:!0,compile:function(c,d){"text/ng-template"==d.type&&a.put(d.id,c[0].text)}}}],Bg={$setViewValue:y,$render:y},Cg=["$element","$scope","$attrs",function(a,c,d){var e=this,f=new Ua;e.ngModelCtrl=Bg;e.unknownOption=B(X.createElement("option"));
+e.renderUnknownOption=function(c){c="? "+Ga(c)+" ?";e.unknownOption.val(c);a.prepend(e.unknownOption);a.val(c)};c.$on("$destroy",function(){e.renderUnknownOption=y});e.removeUnknownOption=function(){e.unknownOption.parent()&&e.unknownOption.remove()};e.readValue=function(){e.removeUnknownOption();return a.val()};e.writeValue=function(c){e.hasOption(c)?(e.removeUnknownOption(),a.val(c),""===c&&e.emptyOption.prop("selected",!0)):null==c&&e.emptyOption?(e.removeUnknownOption(),a.val("")):e.renderUnknownOption(c)};
+e.addOption=function(a,c){Ta(a,'"option value"');""===a&&(e.emptyOption=c);var d=f.get(a)||0;f.put(a,d+1)};e.removeOption=function(a){var c=f.get(a);c&&(1===c?(f.remove(a),""===a&&(e.emptyOption=w)):f.put(a,c-1))};e.hasOption=function(a){return!!f.get(a)}}],ke=function(){return{restrict:"E",require:["select","?ngModel"],controller:Cg,link:function(a,c,d,e){var f=e[1];if(f){var h=e[0];h.ngModelCtrl=f;f.$render=function(){h.writeValue(f.$viewValue)};c.on("change",function(){a.$apply(function(){f.$setViewValue(h.readValue())})});
+if(d.multiple){h.readValue=function(){var a=[];m(c.find("option"),function(c){c.selected&&a.push(c.value)});return a};h.writeValue=function(a){var d=new Ua(a);m(c.find("option"),function(a){a.selected=A(d.get(a.value))})};var g,l=NaN;a.$watch(function(){l!==f.$viewValue||ka(g,f.$viewValue)||(g=ja(f.$viewValue),f.$render());l=f.$viewValue});f.$isEmpty=function(a){return!a||0===a.length}}}}}},me=["$interpolate",function(a){return{restrict:"E",priority:100,compile:function(c,d){if(A(d.value))var e=a(d.value,
+!0);else{var f=a(c.text(),!0);f||d.$set("value",c.text())}return function(a,c,d){function k(a){p.addOption(a,c);p.ngModelCtrl.$render();c[0].hasAttribute("selected")&&(c[0].selected=!0)}var m=c.parent(),p=m.data("$selectController")||m.parent().data("$selectController");if(p&&p.ngModelCtrl){if(e){var r;d.$observe("value",function(a){A(r)&&p.removeOption(r);r=a;k(a)})}else f?a.$watch(f,function(a,c){d.$set("value",a);c!==a&&p.removeOption(c);k(a)}):k(d.value);c.on("$destroy",function(){p.removeOption(d.value);
+p.ngModelCtrl.$render()})}}}}}],le=qa({restrict:"E",terminal:!1}),Gc=function(){return{restrict:"A",require:"?ngModel",link:function(a,c,d,e){e&&(d.required=!0,e.$validators.required=function(a,c){return!d.required||!e.$isEmpty(c)},d.$observe("required",function(){e.$validate()}))}}},Fc=function(){return{restrict:"A",require:"?ngModel",link:function(a,c,d,e){if(e){var f,h=d.ngPattern||d.pattern;d.$observe("pattern",function(a){G(a)&&0<a.length&&(a=new RegExp("^"+a+"$"));if(a&&!a.test)throw I("ngPattern")("noregexp",
+h,a,xa(c));f=a||w;e.$validate()});e.$validators.pattern=function(a,c){return e.$isEmpty(c)||v(f)||f.test(c)}}}}},Ic=function(){return{restrict:"A",require:"?ngModel",link:function(a,c,d,e){if(e){var f=-1;d.$observe("maxlength",function(a){a=Y(a);f=isNaN(a)?-1:a;e.$validate()});e.$validators.maxlength=function(a,c){return 0>f||e.$isEmpty(c)||c.length<=f}}}}},Hc=function(){return{restrict:"A",require:"?ngModel",link:function(a,c,d,e){if(e){var f=0;d.$observe("minlength",function(a){f=Y(a)||0;e.$validate()});
+e.$validators.minlength=function(a,c){return e.$isEmpty(c)||c.length>=f}}}}};Q.angular.bootstrap?console.log("WARNING: Tried to load angular more than once."):(ce(),ee(da),da.module("ngLocale",[],["$provide",function(a){function c(a){a+="";var c=a.indexOf(".");return-1==c?0:a.length-c-1}a.value("$locale",{DATETIME_FORMATS:{AMPMS:["AM","PM"],DAY:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),ERANAMES:["Before Christ","Anno Domini"],ERAS:["BC","AD"],FIRSTDAYOFWEEK:6,MONTH:"January February March April May June July August September October November December".split(" "),
+SHORTDAY:"Sun Mon Tue Wed Thu Fri Sat".split(" "),SHORTMONTH:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),WEEKENDRANGE:[5,6],fullDate:"EEEE, MMMM d, y",longDate:"MMMM d, y",medium:"MMM d, y h:mm:ss a",mediumDate:"MMM d, y",mediumTime:"h:mm:ss a","short":"M/d/yy h:mm a",shortDate:"M/d/yy",shortTime:"h:mm a"},NUMBER_FORMATS:{CURRENCY_SYM:"$",DECIMAL_SEP:".",GROUP_SEP:",",PATTERNS:[{gSize:3,lgSize:3,maxFrac:3,minFrac:0,minInt:1,negPre:"-",negSuf:"",posPre:"",posSuf:""},{gSize:3,lgSize:3,
+maxFrac:2,minFrac:2,minInt:1,negPre:"-\u00a4",negSuf:"",posPre:"\u00a4",posSuf:""}]},id:"en-us",pluralCat:function(a,e){var f=a|0,h=e;w===h&&(h=Math.min(c(a),3));Math.pow(10,h);return 1==f&&0==h?"one":"other"}})}]),B(X).ready(function(){Zd(X,zc)}))})(window,document);!window.angular.$$csp().noInlineStyle&&window.angular.element(document.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:not(.ng-hide-animate){display:none !important;}ng\\:form{display:block;}.ng-animate-shim{visibility:hidden;}.ng-anchor{position:absolute;}</style>');
+//# sourceMappingURL=angular.min.js.map
diff --git a/views/ngXosViews/serviceGrid/src/vendor/angular/angular.min.js.gzip b/views/ngXosViews/serviceGrid/src/vendor/angular/angular.min.js.gzip
new file mode 100644
index 0000000..ede8ca3
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/angular/angular.min.js.gzip
Binary files differ
diff --git a/views/ngXosViews/serviceGrid/src/vendor/angular/angular.min.js.map b/views/ngXosViews/serviceGrid/src/vendor/angular/angular.min.js.map
new file mode 100644
index 0000000..a57c997
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/angular/angular.min.js.map
@@ -0,0 +1,8 @@
+{
+"version":3,
+"file":"angular.min.js",
+"lineCount":293,
+"mappings":"A;;;;;aAKC,SAAQ,CAACA,CAAD,CAASC,CAAT,CAAmBC,CAAnB,CAA8B,CAgCvCC,QAAAA,EAAAA,CAAAA,CAAAA,CAAAA,CAAAA,MAAAA,SAAAA,EAAAA,CAAAA,IAAAA,EAAAA,SAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,EAAAA,CAAAA,GAAAA,EAAAA,CAAAA,CAAAA,CAAAA,CAAAA,GAAAA,CAAAA,EAAAA,EAAAA,CAAAA,CAAAA,sCAAAA,EAAAA,CAAAA,CAAAA,CAAAA,CAAAA,GAAAA,CAAAA,EAAAA,EAAAA,CAAAA,KAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,SAAAA,OAAAA,CAAAA,CAAAA,EAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,EAAAA,CAAAA,EAAAA,CAAAA,CAAAA,GAAAA,CAAAA,GAAAA,EAAAA,GAAAA,EAAAA,CAAAA,CAAAA,CAAAA,EAAAA,GAAAA,KAAAA,EAAAA,kBAAAA,CAAAA,CAAAA,EAAAA,CAAAA,SAAAA,CAAAA,CAAAA,CAAAA,EAAAA,CAAAA,UAAAA,EAAAA,MAAAA,EAAAA,CAAAA,CAAAA,SAAAA,EAAAA,QAAAA,CAAAA,aAAAA,CAAAA,EAAAA,CAAAA,CAAAA,WAAAA,EAAAA,MAAAA,EAAAA,CAAAA,WAAAA,CAAAA,QAAAA,EAAAA,MAAAA,EAAAA,CAAAA,IAAAA,UAAAA,CAAAA,CAAAA,CAAAA,CAAAA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,OAAU,EATZ,CAZU,CAJI,CA1EM,CAuGxB,GAAM,OAvGkB,CAwGxB,UAAao0E,QAAQ,CAACvpD,CAAD,CAAI4uD,CAAJ,CAAmB,CAAG,IAAI55E,EAAIgrB,CAAJhrB,CAAQ,CAAZ,CAnHvCggC,EAmHyE45C,CAjHzEn7E,EAAJ,GAAkBuhC,CAAlB,GACEA,CADF,CACMjI,IAAA2wB,IAAA,CAASixB,CAAA,CAgH2D3uD,CAhH3D,CAAT,CAAyB,CAAzB,CADN,CAIW+M,KAAA8hD,IAAA,CAAS,EAAT,CAAa75C,CAAb,CA6GmF,OAAS,EAAT,EAAIhgC,CAAJ,EAAsB,CAAtB,EA3GnFggC,CA2GmF,CA3HtD85C,KA2HsD,CA3HFC,OA2HpD,CAxGhB,CAA1B,CApB+D,CAAhC,CAA/B,CAgIE,CAAAryE,CAAA,CAAOlJ,CAAP,CAAAw3D,MAAA,CAAuB,QAAQ,EAAG,CAChC3sD,EAAA,CAAY7K,CAAZ,CAAsB8K,EAAtB,CADgC,CAAlC,CA5IF,CAhl4BuC,CAAtC,CAAD,CAgu4BG/K,MAhu4BH,CAgu4BWC,QAhu4BX,CAku4BCo2D,EAAAr2D,MAAA2M,QAAA8uE,MAAA,EAAAplB,cAAD,EAAyCr2D,MAAA2M,QAAAvH,QAAA,CAAuBnF,QAAAy7E,KAAvB,CAAAtiB,QAAA,CAA8C,gRAA9C;",
+"sources":["angular.js"],
+"names":["window","document","undefined","minErr","isArrayLike","obj","isWindow","length","Object","nodeType","NODE_TYPE_ELEMENT","isString","isArray","forEach","iterator","context","key","isFunction","hasOwnProperty","call","isPrimitive","isBlankObject","forEachSorted","keys","sort","i","reverseParams","iteratorFn","value","nextUid","uid","setHashKey","h","$$hashKey","baseExtend","dst","objs","deep","ii","isObject","j","jj","src","isDate","Date","valueOf","isRegExp","RegExp","extend","slice","arguments","merge","toInt","str","parseInt","inherit","parent","extra","create","noop","identity","$","valueFn","hasCustomToString","toString","prototype","isUndefined","isDefined","getPrototypeOf","isNumber","isScope","$evalAsync","$watch","isBoolean","isElement","node","nodeName","prop","attr","find","makeMap","items","split","nodeName_","element","lowercase","arrayRemove","array","index","indexOf","splice","copy","source","destination","stackSource","stackDest","ngMinErr","TYPED_ARRAY_REGEXP","test","push","constructor","getTime","match","lastIndex","cloneNode","emptyObject","shallowCopy","charAt","equals","o1","o2","t1","t2","keySet","createMap","concat","array1","array2","bind","self","fn","curryArgs","startIndex","apply","toJsonReplacer","val","toJson","pretty","JSON","stringify","fromJson","json","parse","timezoneToOffset","timezone","fallback","requestedTimezoneOffset","isNaN","convertTimezoneToLocal","date","reverse","timezoneOffset","getTimezoneOffset","setMinutes","getMinutes","minutes","startingTag","jqLite","clone","empty","e","elemHtml","append","html","NODE_TYPE_TEXT","replace","tryDecodeURIComponent","decodeURIComponent","parseKeyValue","keyValue","splitPoint","substring","toKeyValue","parts","arrayValue","encodeUriQuery","join","encodeUriSegment","pctEncodeSpaces","encodeURIComponent","getNgAttribute","ngAttr","ngAttrPrefixes","getAttribute","angularInit","bootstrap","appElement","module","config","prefix","name","hasAttribute","candidate","querySelector","strictDi","modules","defaultConfig","doBootstrap","injector","tag","unshift","$provide","debugInfoEnabled","$compileProvider","createInjector","invoke","bootstrapApply","scope","compile","$apply","data","NG_ENABLE_DEBUG_INFO","NG_DEFER_BOOTSTRAP","angular","resumeBootstrap","angular.resumeBootstrap","extraModules","resumeDeferredBootstrap","reloadWithDebugInfo","location","reload","getTestability","rootElement","get","snake_case","separator","SNAKE_CASE_REGEXP","letter","pos","toLowerCase","bindJQuery","originalCleanData","bindJQueryFired","jqName","jq","jQuery","on","JQLitePrototype","isolateScope","controller","inheritedData","cleanData","jQuery.cleanData","elems","events","skipDestroyOnNextJQueryCleanData","elem","_data","$destroy","triggerHandler","JQLite","assertArg","arg","reason","assertArgFn","acceptArrayAnnotation","assertNotHasOwnProperty","getter","path","bindFnToScope","lastInstance","len","getBlockNodes","nodes","endNode","blockNodes","nextSibling","setupModuleLoader","ensure","factory","$injectorMinErr","$$minErr","requires","configFn","invokeLater","provider","method","insertMethod","queue","invokeQueue","moduleInstance","invokeLaterAndSetModuleName","recipeName","factoryFunction","$$moduleName","configBlocks","runBlocks","_invokeQueue","_configBlocks","_runBlocks","service","constant","decorator","animation","filter","directive","run","block","publishExternalAPI","version","uppercase","counter","csp","angularModule","ngModule","$$sanitizeUri","$$SanitizeUriProvider","$CompileProvider","a","htmlAnchorDirective","input","inputDirective","textarea","form","formDirective","script","scriptDirective","select","selectDirective","style","styleDirective","option","optionDirective","ngBind","ngBindDirective","ngBindHtml","ngBindHtmlDirective","ngBindTemplate","ngBindTemplateDirective","ngClass","ngClassDirective","ngClassEven","ngClassEvenDirective","ngClassOdd","ngClassOddDirective","ngCloak","ngCloakDirective","ngController","ngControllerDirective","ngForm","ngFormDirective","ngHide","ngHideDirective","ngIf","ngIfDirective","ngInclude","ngIncludeDirective","ngInit","ngInitDirective","ngNonBindable","ngNonBindableDirective","ngPluralize","ngPluralizeDirective","ngRepeat","ngRepeatDirective","ngShow","ngShowDirective","ngStyle","ngStyleDirective","ngSwitch","ngSwitchDirective","ngSwitchWhen","ngSwitchWhenDirective","ngSwitchDefault","ngSwitchDefaultDirective","ngOptions","ngOptionsDirective","ngTransclude","ngTranscludeDirective","ngModel","ngModelDirective","ngList","ngListDirective","ngChange","ngChangeDirective","pattern","patternDirective","ngPattern","required","requiredDirective","ngRequired","minlength","minlengthDirective","ngMinlength","maxlength","maxlengthDirective","ngMaxlength","ngValue","ngValueDirective","ngModelOptions","ngModelOptionsDirective","ngIncludeFillContentDirective","ngAttributeAliasDirectives","ngEventDirectives","$anchorScroll","$AnchorScrollProvider","$animate","$AnimateProvider","$animateCss","$CoreAnimateCssProvider","$$animateQueue","$$CoreAnimateQueueProvider","$$AnimateRunner","$$CoreAnimateRunnerProvider","$browser","$BrowserProvider","$cacheFactory","$CacheFactoryProvider","$controller","$ControllerProvider","$document","$DocumentProvider","$exceptionHandler","$ExceptionHandlerProvider","$filter","$FilterProvider","$$forceReflow","$$ForceReflowProvider","$interpolate","$InterpolateProvider","$interval","$IntervalProvider","$http","$HttpProvider","$httpParamSerializer","$HttpParamSerializerProvider","$httpParamSerializerJQLike","$HttpParamSerializerJQLikeProvider","$httpBackend","$HttpBackendProvider","$xhrFactory","$xhrFactoryProvider","$location","$LocationProvider","$log","$LogProvider","$parse","$ParseProvider","$rootScope","$RootScopeProvider","$q","$QProvider","$$q","$$QProvider","$sce","$SceProvider","$sceDelegate","$SceDelegateProvider","$sniffer","$SnifferProvider","$templateCache","$TemplateCacheProvider","$templateRequest","$TemplateRequestProvider","$$testability","$$TestabilityProvider","$timeout","$TimeoutProvider","$window","$WindowProvider","$$rAF","$$RAFProvider","$$jqLite","$$jqLiteProvider","$$HashMap","$$HashMapProvider","$$cookieReader","$$CookieReaderProvider","camelCase","SPECIAL_CHARS_REGEXP","_","offset","toUpperCase","MOZ_HACK_REGEXP","jqLiteAcceptsData","NODE_TYPE_DOCUMENT","jqLiteBuildFragment","tmp","fragment","createDocumentFragment","HTML_REGEXP","appendChild","createElement","TAG_NAME_REGEXP","exec","wrap","wrapMap","_default","innerHTML","XHTML_TAG_REGEXP","lastChild","childNodes","firstChild","textContent","createTextNode","argIsString","trim","jqLiteMinErr","parsed","SINGLE_TAG_REGEXP","jqLiteAddNodes","jqLiteClone","jqLiteDealoc","onlyDescendants","jqLiteRemoveData","querySelectorAll","descendants","l","jqLiteOff","type","unsupported","expandoStore","jqLiteExpandoStore","handle","listenerFns","removeEventListener","expandoId","ng339","jqCache","createIfNecessary","jqId","jqLiteData","isSimpleSetter","isSimpleGetter","massGetter","jqLiteHasClass","selector","jqLiteRemoveClass","cssClasses","setAttribute","cssClass","jqLiteAddClass","existingClasses","root","elements","jqLiteController","jqLiteInheritedData","documentElement","names","parentNode","NODE_TYPE_DOCUMENT_FRAGMENT","host","jqLiteEmpty","removeChild","jqLiteRemove","keepData","jqLiteDocumentLoaded","action","win","readyState","setTimeout","getBooleanAttrName","booleanAttr","BOOLEAN_ATTR","BOOLEAN_ELEMENTS","createEventHandler","eventHandler","event","isDefaultPrevented","event.isDefaultPrevented","defaultPrevented","eventFns","eventFnsLength","immediatePropagationStopped","originalStopImmediatePropagation","stopImmediatePropagation","event.stopImmediatePropagation","stopPropagation","isImmediatePropagationStopped","event.isImmediatePropagationStopped","$get","this.$get","hasClass","classes","addClass","removeClass","hashKey","nextUidFn","objType","HashMap","isolatedUid","this.nextUid","put","anonFn","args","fnText","STRIP_COMMENTS","FN_ARGS","modulesToLoad","supportObject","delegate","provider_","providerInjector","instantiate","providerCache","providerSuffix","enforceReturnValue","enforcedReturnValue","result","instanceInjector","factoryFn","enforce","loadModules","moduleFn","runInvokeQueue","invokeArgs","loadedModules","message","stack","createInternalInjector","cache","getService","serviceName","caller","INSTANTIATING","err","shift","locals","$inject","$$annotate","Type","instance","returnedValue","annotate","has","$injector","instanceCache","decorFn","origProvider","orig$get","origProvider.$get","origInstance","$delegate","autoScrollingEnabled","disableAutoScrolling","this.disableAutoScrolling","getFirstAnchor","list","Array","some","scrollTo","scrollIntoView","scroll","yOffset","getComputedStyle","position","getBoundingClientRect","bottom","elemTop","top","scrollBy","hash","elm","getElementById","getElementsByName","autoScrollWatch","autoScrollWatchAction","newVal","oldVal","mergeClasses","b","splitClasses","klass","prepareAnimateOptions","options","Browser","completeOutstandingRequest","outstandingRequestCount","outstandingRequestCallbacks","pop","error","cacheStateAndFireUrlChange","pendingLocation","cacheState","fireUrlChange","history","state","cachedState","lastCachedState","lastBrowserUrl","url","lastHistoryState","urlChangeListeners","listener","clearTimeout","pendingDeferIds","isMock","$$completeOutstandingRequest","$$incOutstandingRequestCount","self.$$incOutstandingRequestCount","notifyWhenNoOutstandingRequests","self.notifyWhenNoOutstandingRequests","callback","href","baseElement","self.url","sameState","sameBase","stripHash","substr","self.state","urlChangeInit","onUrlChange","self.onUrlChange","$$applicationDestroyed","self.$$applicationDestroyed","off","$$checkUrlChange","baseHref","self.baseHref","defer","self.defer","delay","timeoutId","cancel","self.defer.cancel","deferId","cacheFactory","cacheId","refresh","entry","freshEnd","staleEnd","n","link","p","nextEntry","prevEntry","caches","size","stats","id","capacity","Number","MAX_VALUE","lruHash","lruEntry","remove","removeAll","destroy","info","cacheFactory.info","cacheFactory.get","$$sanitizeUriProvider","parseIsolateBindings","directiveName","isController","LOCAL_REGEXP","bindings","definition","scopeName","$compileMinErr","mode","collection","optional","attrName","assertValidDirectiveName","hasDirectives","COMMENT_DIRECTIVE_REGEXP","CLASS_DIRECTIVE_REGEXP","ALL_OR_NOTHING_ATTRS","REQUIRE_PREFIX_REGEXP","EVENT_HANDLER_ATTR_REGEXP","this.directive","registerDirective","directiveFactory","Suffix","directives","priority","require","restrict","bindToController","controllerAs","CNTRL_REG","$$bindings","$$isolateBindings","aHrefSanitizationWhitelist","this.aHrefSanitizationWhitelist","regexp","imgSrcSanitizationWhitelist","this.imgSrcSanitizationWhitelist","this.debugInfoEnabled","enabled","safeAddClass","$element","className","$compileNodes","transcludeFn","maxPriority","ignoreDirective","previousCompileContext","nodeValue","compositeLinkFn","compileNodes","$$addScopeClass","namespace","publicLinkFn","cloneConnectFn","parentBoundTranscludeFn","transcludeControllers","futureParentElement","$$boundTransclude","$linkNode","wrapTemplate","controllerName","$$addScopeInfo","nodeList","$rootElement","childLinkFn","childScope","childBoundTranscludeFn","stableNodeList","nodeLinkFnFound","linkFns","idx","nodeLinkFn","destroyBindings","$new","$$destroyBindings","$on","transcludeOnThisElement","createBoundTranscludeFn","transclude","templateOnThisElement","attrs","linkFnFound","Attributes","collectDirectives","applyDirectivesToNode","$$element","terminal","previousBoundTranscludeFn","boundTranscludeFn","transcludedScope","cloneFn","controllers","containingScope","$$transcluded","attrsMap","$attr","addDirective","directiveNormalize","isNgAttr","nAttrs","attributes","attrStartName","attrEndName","ngAttrName","NG_ATTR_BINDING","PREFIX_REGEXP","directiveNName","directiveIsMultiElement","nName","addAttrInterpolateDirective","animVal","msie","addTextInterpolateDirective","NODE_TYPE_COMMENT","byPriority","groupScan","attrStart","attrEnd","depth","groupElementsLinkFnWrapper","linkFn","compileNode","templateAttrs","jqCollection","originalReplaceDirective","preLinkFns","postLinkFns","addLinkFns","pre","post","newIsolateScopeDirective","$$isolateScope","cloneAndAnnotateFn","getControllers","elementControllers","inheritType","dataName","setupControllers","controllerDirectives","controllerKey","$scope","$attrs","$transclude","controllerInstance","hasElementTranscludeDirective","linkNode","thisLinkFn","controllersBoundTransclude","cloneAttachFn","scopeToChild","templateDirective","$$originalDirective","initializeDirectiveBindings","scopeDirective","newScopeDirective","controllerForBindings","identifier","controllerResult","invokeLinkFn","template","templateUrl","terminalPriority","nonTlbTranscludeDirective","hasTranscludeDirective","hasTemplate","$compileNode","$template","childTranscludeFn","$$start","$$end","directiveValue","assertNoDuplicate","$$tlb","createComment","replaceWith","replaceDirective","contents","denormalizeTemplate","removeComments","templateNamespace","newTemplateAttrs","templateDirectives","unprocessedDirectives","markDirectivesAsIsolate","mergeTemplateAttributes","compileTemplateUrl","Math","max","tDirectives","startAttrName","endAttrName","multiElement","srcAttr","dstAttr","$set","tAttrs","linkQueue","afterTemplateNodeLinkFn","afterTemplateChildLinkFn","beforeTemplateCompileNode","origAsyncDirective","derivedSyncDirective","then","content","tempTemplateAttrs","beforeTemplateLinkNode","linkRootElement","$$destroyed","oldClasses","delayedNodeLinkFn","ignoreChildLinkFn","diff","what","previousDirective","wrapModuleNameIfDefined","moduleName","text","interpolateFn","textInterpolateCompileFn","templateNode","templateNodeParent","hasCompileParent","$$addBindingClass","textInterpolateLinkFn","$$addBindingInfo","expressions","interpolateFnWatchAction","wrapper","getTrustedContext","attrNormalizedName","HTML","RESOURCE_URL","allOrNothing","trustedContext","attrInterpolatePreLinkFn","$$observers","newValue","$$inter","$$scope","oldValue","$updateClass","elementsToRemove","newNode","firstElementToRemove","removeCount","j2","replaceChild","hasData","expando","k","kk","annotation","newScope","onNewScopeDestroyed","lastValue","parentGet","parentSet","compare","$observe","literal","assign","parentValueWatch","parentValue","$stateful","unwatch","$watchCollection","attributesToCopy","$normalize","$addClass","classVal","$removeClass","newClasses","toAdd","tokenDifference","toRemove","writeAttr","booleanKey","aliasedKey","ALIASED_ATTR","observer","trimmedSrcset","srcPattern","rawUris","nbrUrisWith2parts","floor","innerIdx","lastTuple","removeAttr","listeners","startSymbol","endSymbol","binding","isolated","noTemplate","str1","str2","values","tokens1","tokens2","token","jqNodes","globals","register","this.register","allowGlobals","this.allowGlobals","addIdentifier","expression","later","ident","$controllerMinErr","controllerPrototype","exception","cause","serializeValue","v","toISOString","ngParamSerializer","params","jQueryLikeParamSerializer","serialize","toSerialize","topLevel","defaultHttpResponseTransform","headers","tempData","JSON_PROTECTION_PREFIX","contentType","jsonStart","JSON_START","JSON_ENDS","parseHeaders","line","headerVal","headerKey","headersGetter","headersObj","transformData","status","fns","defaults","transformResponse","transformRequest","d","common","CONTENT_TYPE_APPLICATION_JSON","patch","xsrfCookieName","xsrfHeaderName","paramSerializer","useApplyAsync","this.useApplyAsync","useLegacyPromise","useLegacyPromiseExtensions","this.useLegacyPromiseExtensions","interceptorFactories","interceptors","requestConfig","response","resp","reject","executeHeaderFns","headerContent","processedHeaders","headerFn","header","mergeHeaders","defHeaders","reqHeaders","defHeaderName","lowercaseDefHeaderName","reqHeaderName","chain","serverRequest","reqData","withCredentials","sendReq","promise","when","reversedInterceptors","interceptor","request","requestError","responseError","thenFn","rejectFn","success","promise.success","promise.error","$httpMinErrLegacyFn","done","headersString","statusText","resolveHttpPromise","resolvePromise","$applyAsync","$$phase","deferred","resolve","resolvePromiseWithResult","removePendingReq","pendingRequests","cachedResp","buildUrl","defaultCache","xsrfValue","urlIsSameOrigin","timeout","responseType","serializedParams","interceptorFactory","createShortMethods","createShortMethodsWithData","createXhr","XMLHttpRequest","createHttpBackend","callbacks","$browserDefer","rawDocument","jsonpReq","callbackId","async","body","called","addEventListener","timeoutRequest","jsonpDone","xhr","abort","completeRequest","open","setRequestHeader","onload","xhr.onload","responseText","urlResolve","protocol","getAllResponseHeaders","onerror","onabort","send","this.startSymbol","this.endSymbol","escape","ch","unescapeText","escapedStartRegexp","escapedEndRegexp","mustHaveExpression","parseStringifyInterceptor","getTrusted","$interpolateMinErr","interr","endIndex","parseFns","textLength","expressionPositions","startSymbolLength","exp","endSymbolLength","throwNoconcat","compute","interpolationFn","$$watchDelegate","$watchGroup","interpolateFnWatcher","oldValues","currValue","$interpolate.startSymbol","$interpolate.endSymbol","interval","count","invokeApply","hasParams","setInterval","clearInterval","iteration","skipApply","$$intervalId","tick","notify","intervals","interval.cancel","encodePath","segments","parseAbsoluteUrl","absoluteUrl","locationObj","parsedUrl","$$protocol","$$host","hostname","$$port","port","DEFAULT_PORTS","parseAppUrl","relativeUrl","prefixed","$$path","pathname","$$search","search","$$hash","beginsWith","begin","whole","trimEmptyHash","LocationHtml5Url","appBase","appBaseNoFile","basePrefix","$$html5","$$parse","this.$$parse","pathUrl","$locationMinErr","$$compose","this.$$compose","$$url","$$absUrl","$$parseLinkUrl","this.$$parseLinkUrl","relHref","appUrl","prevAppUrl","rewrittenUrl","LocationHashbangUrl","hashPrefix","withoutBaseUrl","withoutHashUrl","windowsFilePathExp","base","firstPathSegmentMatch","LocationHashbangInHtml5Url","locationGetter","property","locationGetterSetter","preprocess","html5Mode","requireBase","rewriteLinks","this.hashPrefix","this.html5Mode","setBrowserUrlWithFallback","oldUrl","oldState","$$state","afterLocationChange","$broadcast","absUrl","LocationMode","initialUrl","lastIndexOf","IGNORE_URI_REGEXP","ctrlKey","metaKey","shiftKey","which","button","target","absHref","preventDefault","initializing","newUrl","newState","$digest","$locationWatch","currentReplace","$$replace","urlOrStateChanged","debug","debugEnabled","this.debugEnabled","flag","formatError","Error","sourceURL","consoleLog","console","logFn","log","hasApply","arg1","arg2","warn","ensureSafeMemberName","fullExpression","$parseMinErr","getStringValue","ensureSafeObject","children","ensureSafeFunction","CALL","APPLY","BIND","ensureSafeAssignContext","Function","ifDefined","plusFn","r","findConstantAndWatchExpressions","ast","allConstants","argsToWatch","AST","Program","expr","Literal","toWatch","UnaryExpression","argument","BinaryExpression","left","right","LogicalExpression","ConditionalExpression","alternate","consequent","Identifier","MemberExpression","object","computed","CallExpression","callee","AssignmentExpression","ArrayExpression","ObjectExpression","properties","ThisExpression","getInputs","lastExpression","isAssignable","assignableAST","NGValueParameter","operator","isLiteral","ASTCompiler","astBuilder","ASTInterpreter","isPossiblyDangerousMemberName","getValueOf","objectValueOf","cacheDefault","cacheExpensive","expressionInputDirtyCheck","oldValueOfValue","inputsWatchDelegate","objectEquality","parsedExpression","prettyPrintExpression","inputExpressions","inputs","lastResult","oldInputValueOf","expressionInputWatch","newInputValue","oldInputValueOfValues","oldInputValues","expressionInputsWatch","changed","oneTimeWatchDelegate","oneTimeWatch","oneTimeListener","old","$$postDigest","oneTimeLiteralWatchDelegate","isAllDefined","allDefined","constantWatchDelegate","constantWatch","constantListener","addInterceptor","interceptorFn","watchDelegate","regularInterceptedExpression","oneTimeInterceptedExpression","noUnsafeEval","$parseOptions","expensiveChecks","$parseOptionsExpensive","oneTime","cacheKey","parseOptions","lexer","Lexer","parser","Parser","qFactory","nextTick","exceptionHandler","callOnce","resolveFn","Promise","simpleBind","scheduleProcessQueue","processScheduled","pending","Deferred","$qMinErr","TypeError","onFulfilled","onRejected","progressBack","catch","finally","handleCallback","$$reject","$$resolve","progress","makePromise","resolved","isResolved","callbackOutput","errback","$Q","Q","resolver","all","promises","results","requestAnimationFrame","webkitRequestAnimationFrame","cancelAnimationFrame","webkitCancelAnimationFrame","webkitCancelRequestAnimationFrame","rafSupported","raf","timer","supported","createChildScopeClass","ChildScope","$$watchers","$$nextSibling","$$childHead","$$childTail","$$listeners","$$listenerCount","$$watchersCount","$id","$$ChildScope","TTL","$rootScopeMinErr","lastDirtyWatch","applyAsyncId","digestTtl","this.digestTtl","destroyChildScope","$event","currentScope","Scope","$parent","$$prevSibling","$root","beginPhase","phase","incrementWatchersCount","current","decrementListenerCount","initWatchVal","flushApplyAsync","applyAsyncQueue","scheduleApplyAsync","isolate","child","watchExp","watcher","last","eq","deregisterWatch","watchExpressions","watchGroupAction","changeReactionScheduled","firstRun","newValues","deregisterFns","shouldCall","deregisterWatchGroup","unwatchFn","watchGroupSubAction","$watchCollectionInterceptor","_value","bothNaN","newItem","oldItem","internalArray","oldLength","changeDetected","newLength","internalObject","veryOldValue","trackVeryOldValue","changeDetector","initRun","$watchCollectionAction","watch","watchers","dirty","ttl","watchLog","logIdx","asyncTask","asyncQueue","$eval","msg","next","postDigestQueue","eventName","this.$watchGroup","$applyAsyncExpression","namedListeners","indexOfListener","$emit","targetScope","listenerArgs","$$asyncQueue","$$postDigestQueue","$$applyAsyncQueue","sanitizeUri","uri","isImage","regex","normalizedVal","adjustMatcher","matcher","$sceMinErr","escapeForRegexp","adjustMatchers","matchers","adjustedMatchers","SCE_CONTEXTS","resourceUrlWhitelist","resourceUrlBlacklist","this.resourceUrlWhitelist","this.resourceUrlBlacklist","matchUrl","generateHolderType","Base","holderType","trustedValue","$$unwrapTrustedValue","this.$$unwrapTrustedValue","holderType.prototype.valueOf","holderType.prototype.toString","htmlSanitizer","trustedValueHolderBase","byType","CSS","URL","JS","trustAs","Constructor","maybeTrusted","allowed","this.enabled","sce","isEnabled","sce.isEnabled","sce.getTrusted","parseAs","sce.parseAs","enumValue","lName","eventSupport","android","userAgent","navigator","boxee","vendorPrefix","vendorRegex","bodyStyle","transitions","animations","webkitTransition","webkitAnimation","pushState","hasEvent","divElm","handleRequestFn","tpl","ignoreRequestError","totalPendingRequests","getTrustedResourceUrl","transformer","httpOptions","handleError","testability","testability.findBindings","opt_exactMatch","getElementsByClassName","matches","dataBinding","bindingName","testability.findModels","prefixes","attributeEquals","testability.getLocation","testability.setLocation","testability.whenStable","deferreds","$$timeoutId","timeout.cancel","urlParsingNode","requestUrl","originUrl","$$CookieReader","safeDecodeURIComponent","lastCookies","lastCookieString","cookieArray","cookie","currentCookieString","filters","suffix","currencyFilter","dateFilter","filterFilter","jsonFilter","limitToFilter","lowercaseFilter","numberFilter","orderByFilter","uppercaseFilter","comparator","matchAgainstAnyProp","getTypeForFilter","expressionType","predicateFn","createPredicateFn","shouldMatchPrimitives","actual","expected","item","deepCompare","dontMatchWholeObject","actualType","expectedType","expectedVal","matchAnyProperty","actualVal","$locale","formats","NUMBER_FORMATS","amount","currencySymbol","fractionSize","CURRENCY_SYM","PATTERNS","maxFrac","formatNumber","GROUP_SEP","DECIMAL_SEP","number","groupSep","decimalSep","isNegative","abs","isInfinity","Infinity","isFinite","numStr","formatedText","hasExponent","toFixed","parseFloat","fractionLen","min","minFrac","round","fraction","lgroup","lgSize","group","gSize","negPre","posPre","negSuf","posSuf","padNumber","num","digits","neg","dateGetter","dateStrGetter","shortForm","getFirstThursdayOfYear","year","dayOfWeekOnFirst","getDay","weekGetter","firstThurs","getFullYear","thisThurs","getMonth","getDate","eraGetter","ERAS","jsonStringToDate","string","R_ISO8601_STR","tzHour","tzMin","dateSetter","setUTCFullYear","setFullYear","timeSetter","setUTCHours","setHours","m","s","ms","format","DATETIME_FORMATS","NUMBER_STRING","DATE_FORMATS_SPLIT","dateTimezoneOffset","DATE_FORMATS","spacing","limit","processPredicates","sortPredicate","reverseOrder","map","predicate","descending","predicates","compareValues","getComparisonObject","predicateValues","doComparison","v1","v2","ngDirective","FormController","controls","$error","$$success","$pending","$name","$dirty","$pristine","$valid","$invalid","$submitted","$$parentForm","nullFormCtrl","$rollbackViewValue","form.$rollbackViewValue","control","$commitViewValue","form.$commitViewValue","$addControl","form.$addControl","$$renameControl","form.$$renameControl","newName","oldName","$removeControl","form.$removeControl","$setValidity","addSetValidityMethod","ctrl","set","unset","$setDirty","form.$setDirty","PRISTINE_CLASS","DIRTY_CLASS","$setPristine","form.$setPristine","setClass","SUBMITTED_CLASS","$setUntouched","form.$setUntouched","$setSubmitted","form.$setSubmitted","stringBasedInputType","$formatters","$isEmpty","baseInputType","composing","ev","ngTrim","$viewValue","$$hasNativeValidators","$setViewValue","deferListener","origValue","keyCode","$render","ctrl.$render","createDateParser","mapping","iso","ISO_DATE_REGEXP","yyyy","MM","dd","HH","getHours","mm","ss","getSeconds","sss","getMilliseconds","part","NaN","createDateInputType","parseDate","dynamicDateInputType","isValidDate","parseObservedDateValue","badInputChecker","$options","previousDate","$$parserName","$parsers","parsedDate","ngModelMinErr","ngMin","minVal","$validators","ctrl.$validators.min","$validate","ngMax","maxVal","ctrl.$validators.max","validity","VALIDITY_STATE_PROPERTY","badInput","typeMismatch","parseConstantExpr","parseFn","classDirective","arrayDifference","arrayClasses","digestClassCounts","classCounts","classesToUpdate","ngClassWatchAction","$index","old$index","mod","cachedToggleClass","switchValue","classCache","toggleValidationCss","validationErrorKey","isValid","VALID_CLASS","INVALID_CLASS","setValidity","isObjectEmpty","PENDING_CLASS","combinedState","REGEX_STRING_REGEXP","documentMode","rules","ngCspElement","ngCspAttribute","noInlineStyle","name_","el","full","major","minor","dot","codeName","JQLite._data","MOUSE_EVENT_MAP","mouseleave","mouseenter","optgroup","tbody","tfoot","colgroup","caption","thead","th","td","ready","trigger","fired","removeData","jqLiteHasData","removeAttribute","css","NODE_TYPE_ATTRIBUTE","lowercasedName","specified","getNamedItem","ret","getText","$dv","multiple","selected","nodeCount","jqLiteOn","types","related","relatedTarget","contains","one","onFn","replaceNode","insertBefore","contentDocument","prepend","wrapNode","detach","after","newElement","toggleClass","condition","classCondition","nextElementSibling","getElementsByTagName","extraParameters","dummyEvent","handlerArgs","eventFnsCopy","arg3","unbind","FN_ARG_SPLIT","FN_ARG","argDecl","underscore","$animateMinErr","AnimateRunner","end","resume","pause","complete","pass","fail","postDigestElements","updateData","handleCSSClassChanges","existing","pin","domOperation","from","to","classesAdded","add","classesRemoved","$$registeredAnimations","classNameFilter","this.classNameFilter","$$classNameFilter","reservedRegex","NG_ANIMATE_CLASSNAME","domInsert","parentElement","afterElement","afterNode","ELEMENT_NODE","previousElementSibling","runner","enter","move","leave","addclass","animate","tempClasses","RAFPromise","getPromise","f1","f2","closed","cleanupStyles","start","domNode","offsetWidth","APPLICATION_JSON","$httpMinErr","$interpolateMinErr.throwNoconcat","$interpolateMinErr.interr","PATH_MATCH","locationPrototype","paramValue","Location","Location.prototype.state","OPERATORS","ESCAPE","lex","tokens","readString","peek","readNumber","isIdent","readIdent","is","isWhitespace","ch2","ch3","op2","op3","op1","throwError","chars","isExpOperator","colStr","peekCh","quote","rawString","hex","String","fromCharCode","rep","ExpressionStatement","Property","program","expressionStatement","expect","filterChain","assignment","ternary","logicalOR","consume","logicalAND","equality","relational","additive","multiplicative","unary","primary","arrayDeclaration","constants","parseArguments","baseExpression","peekToken","kind","e1","e2","e3","e4","peekAhead","t","nextId","vars","own","assignable","stage","computing","recurse","return_","generateFunction","fnKey","intoId","watchId","fnString","USE","STRICT","filterPrefix","watchFns","varsPrefix","section","nameId","recursionFn","skipWatchIdCheck","if_","lazyAssign","computedMember","lazyRecurse","plus","not","getHasOwnProperty","nonComputedMember","addEnsureSafeObject","notNull","addEnsureSafeMemberName","addEnsureSafeFunction","member","addEnsureSafeAssignContext","filterName","defaultValue","stringEscapeRegex","stringEscapeFn","c","charCodeAt","skip","init","fn.assign","rhs","lhs","unary+","unary-","unary!","binary+","binary-","binary*","binary/","binary%","binary===","binary!==","binary==","binary!=","binary<","binary>","binary<=","binary>=","binary&&","binary||","ternary?:","astCompiler","yy","y","MMMM","MMM","M","H","hh","EEEE","EEE","ampmGetter","AMPMS","Z","timeZoneGetter","zone","paddedZone","ww","w","G","GG","GGG","GGGG","longEraGetter","ERANAMES","xlinkHref","propName","defaultLinkFn","normalized","ngBooleanAttrWatchAction","htmlAttr","ngAttrAliasWatchAction","nullFormRenameControl","formDirectiveFactory","isNgForm","getSetter","ngFormCompile","formElement","nameAttr","ngFormPreLink","ctrls","handleFormSubmission","setter","URL_REGEXP","EMAIL_REGEXP","NUMBER_REGEXP","DATE_REGEXP","DATETIMELOCAL_REGEXP","WEEK_REGEXP","MONTH_REGEXP","TIME_REGEXP","inputType","textInputType","weekParser","isoWeek","existingDate","week","hours","seconds","milliseconds","addDays","numberInputType","urlInputType","ctrl.$validators.url","modelValue","viewValue","emailInputType","email","ctrl.$validators.email","radioInputType","checked","checkboxInputType","trueValue","ngTrueValue","falseValue","ngFalseValue","ctrl.$isEmpty","CONSTANT_VALUE_REGEXP","tplAttr","ngValueConstantLink","ngValueLink","valueWatchAction","$compile","ngBindCompile","templateElement","ngBindLink","ngBindWatchAction","ngBindTemplateCompile","ngBindTemplateLink","ngBindHtmlCompile","tElement","ngBindHtmlGetter","ngBindHtmlWatch","ngBindHtmlLink","ngBindHtmlWatchAction","getTrustedHtml","$viewChangeListeners","forceAsyncEvents","ngEventHandler","previousElements","ngIfWatchAction","srcExp","onloadExp","autoScrollExp","autoscroll","changeCounter","previousElement","currentElement","cleanupLastIncludeContent","ngIncludeWatchAction","afterAnimation","thisChangeId","namespaceAdaptedClone","trimValues","NgModelController","$modelValue","$$rawModelValue","$asyncValidators","$untouched","$touched","parsedNgModel","parsedNgModelAssign","ngModelGet","ngModelSet","pendingDebounce","parserValid","$$setOptions","this.$$setOptions","getterSetter","invokeModelGetter","invokeModelSetter","$$$p","this.$isEmpty","currentValidationRunId","this.$setPristine","this.$setDirty","this.$setUntouched","UNTOUCHED_CLASS","TOUCHED_CLASS","$setTouched","this.$setTouched","this.$rollbackViewValue","$$lastCommittedViewValue","this.$validate","prevValid","prevModelValue","allowInvalid","$$runValidators","allValid","$$writeModelToScope","this.$$runValidators","doneCallback","processSyncValidators","syncValidatorsValid","validator","processAsyncValidators","validatorPromises","validationDone","localValidationRunId","processParseErrors","errorKey","this.$commitViewValue","$$parseAndValidate","this.$$parseAndValidate","this.$$writeModelToScope","this.$setViewValue","updateOnDefault","$$debounceViewValueCommit","this.$$debounceViewValueCommit","debounceDelay","debounce","ngModelWatch","formatters","ngModelCompile","ngModelPreLink","modelCtrl","formCtrl","ngModelPostLink","updateOn","DEFAULT_REGEXP","that","ngOptionsMinErr","NG_OPTIONS_REGEXP","parseOptionsExpression","optionsExp","selectElement","Option","selectValue","label","disabled","getOptionValuesKeys","optionValues","optionValuesKeys","keyName","itemKey","valueName","selectAs","trackBy","viewValueFn","trackByFn","getTrackByValueFn","getHashOfValue","getTrackByValue","getLocals","displayFn","groupByFn","disableWhenFn","valuesFn","getWatchables","watchedArray","optionValuesLength","disableWhen","getOptions","optionItems","selectValueMap","optionItem","getOptionFromViewValue","getViewValueFromOption","optionTemplate","optGroupTemplate","updateOptionElement","addOrReuseElement","removeExcessElements","skipEmptyAndUnknownOptions","emptyOption_","emptyOption","unknownOption_","unknownOption","updateOptions","previousValue","selectCtrl","readValue","groupMap","providedEmptyOption","updateOption","optionElement","groupElement","currentOptionElement","ngModelCtrl","nextValue","ngModelCtrl.$isEmpty","writeValue","selectCtrl.writeValue","selectCtrl.readValue","selectedValues","selections","selectedOption","BRACE","IS_WHEN","updateElementText","newText","numberExp","whenExp","whens","whensExpFns","braceReplacement","watchRemover","lastCount","attributeName","tmpMatch","whenKey","ngPluralizeWatchAction","countIsNaN","pluralCat","whenExpFn","ngRepeatMinErr","updateScope","valueIdentifier","keyIdentifier","arrayLength","$first","$last","$middle","$odd","$even","ngRepeatCompile","ngRepeatEndComment","aliasAs","trackByExp","trackByExpGetter","trackByIdExpFn","trackByIdArrayFn","trackByIdObjFn","hashFnLocals","ngRepeatLink","lastBlockMap","ngRepeatAction","previousNode","nextNode","nextBlockMap","collectionLength","trackById","collectionKeys","nextBlockOrder","trackByIdFn","blockKey","ngRepeatTransclude","ngShowWatchAction","NG_HIDE_CLASS","NG_HIDE_IN_PROGRESS_CLASS","ngHideWatchAction","ngStyleWatchAction","newStyles","oldStyles","ngSwitchController","cases","selectedTranscludes","selectedElements","previousLeaveAnimations","selectedScopes","spliceFactory","ngSwitchWatchAction","selectedTransclude","caseElement","selectedScope","anchor","noopNgModelController","SelectController","optionsMap","renderUnknownOption","self.renderUnknownOption","unknownVal","removeUnknownOption","self.removeUnknownOption","self.readValue","self.writeValue","hasOption","addOption","self.addOption","removeOption","self.removeOption","self.hasOption","ngModelCtrl.$render","lastView","lastViewRef","selectMultipleWatch","valueInterpolated","optionValue","selectCtrlName","valueAttributeObserveAction","interpolateWatchAction","ctrl.$validators.required","patternExp","ctrl.$validators.pattern","intVal","ctrl.$validators.maxlength","ctrl.$validators.minlength","getDecimals","opt_precision","pow","ONE","OTHER","$$csp","head"]
+}
diff --git a/applications/auto-scale/gui/src/vendor/angular/bower.json b/views/ngXosViews/serviceGrid/src/vendor/angular/bower.json
similarity index 80%
rename from applications/auto-scale/gui/src/vendor/angular/bower.json
rename to views/ngXosViews/serviceGrid/src/vendor/angular/bower.json
index 766d984..12b4e8c 100644
--- a/applications/auto-scale/gui/src/vendor/angular/bower.json
+++ b/views/ngXosViews/serviceGrid/src/vendor/angular/bower.json
@@ -1,6 +1,6 @@
{
"name": "angular",
- "version": "1.4.8",
+ "version": "1.4.7",
"main": "./angular.js",
"ignore": [],
"dependencies": {
diff --git a/applications/auto-scale/gui/src/vendor/angular/index.js b/views/ngXosViews/serviceGrid/src/vendor/angular/index.js
similarity index 100%
rename from applications/auto-scale/gui/src/vendor/angular/index.js
rename to views/ngXosViews/serviceGrid/src/vendor/angular/index.js
diff --git a/applications/auto-scale/gui/src/vendor/angular/package.json b/views/ngXosViews/serviceGrid/src/vendor/angular/package.json
similarity index 95%
rename from applications/auto-scale/gui/src/vendor/angular/package.json
rename to views/ngXosViews/serviceGrid/src/vendor/angular/package.json
index 09f440e..c39a534 100644
--- a/applications/auto-scale/gui/src/vendor/angular/package.json
+++ b/views/ngXosViews/serviceGrid/src/vendor/angular/package.json
@@ -1,6 +1,6 @@
{
"name": "angular",
- "version": "1.4.8",
+ "version": "1.4.7",
"description": "HTML enhanced for web apps",
"main": "index.js",
"scripts": {
diff --git a/applications/auto-scale/gui/src/vendor/bootstrap-css/.bower.json b/views/ngXosViews/serviceGrid/src/vendor/bootstrap-css/.bower.json
similarity index 73%
rename from applications/auto-scale/gui/src/vendor/bootstrap-css/.bower.json
rename to views/ngXosViews/serviceGrid/src/vendor/bootstrap-css/.bower.json
index 2f8653c..c7c0207 100644
--- a/applications/auto-scale/gui/src/vendor/bootstrap-css/.bower.json
+++ b/views/ngXosViews/serviceGrid/src/vendor/bootstrap-css/.bower.json
@@ -1,6 +1,6 @@
{
"name": "bootstrap-css",
- "version": "3.3.4",
+ "version": "3.3.6",
"keywords": [
"css",
"js",
@@ -27,13 +27,13 @@
"url": "git://github.com/jozefizso/bower-bootstrap-css.git"
},
"license": "MIT",
- "_release": "3.3.4",
+ "_release": "3.3.6",
"_resolution": {
"type": "version",
- "tag": "3.3.4",
- "commit": "01808188487a0806a8d68d2b5eaa346dca6f2ad7"
+ "tag": "v3.3.6",
+ "commit": "ef51118f6360259082a2e5f21ea6c5e5f552a09f"
},
- "_source": "git://github.com/jozefizso/bower-bootstrap-css.git",
- "_target": "3.3.4",
+ "_source": "https://github.com/jozefizso/bower-bootstrap-css.git",
+ "_target": "3.3.6",
"_originalSource": "bootstrap-css"
}
\ No newline at end of file
diff --git a/applications/auto-scale/gui/src/vendor/bootstrap-css/LICENSE b/views/ngXosViews/serviceGrid/src/vendor/bootstrap-css/LICENSE
similarity index 100%
rename from applications/auto-scale/gui/src/vendor/bootstrap-css/LICENSE
rename to views/ngXosViews/serviceGrid/src/vendor/bootstrap-css/LICENSE
diff --git a/applications/auto-scale/gui/src/vendor/bootstrap-css/README.md b/views/ngXosViews/serviceGrid/src/vendor/bootstrap-css/README.md
similarity index 83%
rename from applications/auto-scale/gui/src/vendor/bootstrap-css/README.md
rename to views/ngXosViews/serviceGrid/src/vendor/bootstrap-css/README.md
index 9da1527..029a86c 100644
--- a/applications/auto-scale/gui/src/vendor/bootstrap-css/README.md
+++ b/views/ngXosViews/serviceGrid/src/vendor/bootstrap-css/README.md
@@ -1,7 +1,7 @@
# Bootstrap
-This is a Bower component for [Bootstrap 3](http://getbootstrap.com/) CSS library (v3.3.4).
+This is a Bower component for [Bootstrap 3](http://getbootstrap.com/) CSS library (v3.3.6).
## Installation:
@@ -10,6 +10,8 @@
## Bootstrap 3.0 versions
```
+bower install bootstrap-css#3.3.6
+bower install bootstrap-css#3.3.5
bower install bootstrap-css#3.3.4
bower install bootstrap-css#3.3.2
bower install bootstrap-css#3.2.0
diff --git a/applications/auto-scale/gui/src/vendor/bootstrap-css/bower.json b/views/ngXosViews/serviceGrid/src/vendor/bootstrap-css/bower.json
similarity index 96%
rename from applications/auto-scale/gui/src/vendor/bootstrap-css/bower.json
rename to views/ngXosViews/serviceGrid/src/vendor/bootstrap-css/bower.json
index c931530..87e1905 100644
--- a/applications/auto-scale/gui/src/vendor/bootstrap-css/bower.json
+++ b/views/ngXosViews/serviceGrid/src/vendor/bootstrap-css/bower.json
@@ -1,6 +1,6 @@
{
"name": "bootstrap-css",
- "version": "3.3.4",
+ "version": "3.3.6",
"keywords": [
"css",
"js",
diff --git a/applications/auto-scale/gui/src/vendor/bootstrap-css/css/bootstrap-theme.css b/views/ngXosViews/serviceGrid/src/vendor/bootstrap-css/css/bootstrap-theme.css
similarity index 85%
rename from applications/auto-scale/gui/src/vendor/bootstrap-css/css/bootstrap-theme.css
rename to views/ngXosViews/serviceGrid/src/vendor/bootstrap-css/css/bootstrap-theme.css
index b0fdfcb..ebe57fb 100644
--- a/applications/auto-scale/gui/src/vendor/bootstrap-css/css/bootstrap-theme.css
+++ b/views/ngXosViews/serviceGrid/src/vendor/bootstrap-css/css/bootstrap-theme.css
@@ -1,9 +1,8 @@
/*!
- * Bootstrap v3.3.4 (http://getbootstrap.com)
+ * Bootstrap v3.3.6 (http://getbootstrap.com)
* Copyright 2011-2015 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
-
.btn-default,
.btn-primary,
.btn-success,
@@ -29,6 +28,27 @@
-webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
}
+.btn-default.disabled,
+.btn-primary.disabled,
+.btn-success.disabled,
+.btn-info.disabled,
+.btn-warning.disabled,
+.btn-danger.disabled,
+.btn-default[disabled],
+.btn-primary[disabled],
+.btn-success[disabled],
+.btn-info[disabled],
+.btn-warning[disabled],
+.btn-danger[disabled],
+fieldset[disabled] .btn-default,
+fieldset[disabled] .btn-primary,
+fieldset[disabled] .btn-success,
+fieldset[disabled] .btn-info,
+fieldset[disabled] .btn-warning,
+fieldset[disabled] .btn-danger {
+ -webkit-box-shadow: none;
+ box-shadow: none;
+}
.btn-default .badge,
.btn-primary .badge,
.btn-success .badge,
@@ -64,8 +84,23 @@
border-color: #dbdbdb;
}
.btn-default.disabled,
-.btn-default:disabled,
-.btn-default[disabled] {
+.btn-default[disabled],
+fieldset[disabled] .btn-default,
+.btn-default.disabled:hover,
+.btn-default[disabled]:hover,
+fieldset[disabled] .btn-default:hover,
+.btn-default.disabled:focus,
+.btn-default[disabled]:focus,
+fieldset[disabled] .btn-default:focus,
+.btn-default.disabled.focus,
+.btn-default[disabled].focus,
+fieldset[disabled] .btn-default.focus,
+.btn-default.disabled:active,
+.btn-default[disabled]:active,
+fieldset[disabled] .btn-default:active,
+.btn-default.disabled.active,
+.btn-default[disabled].active,
+fieldset[disabled] .btn-default.active {
background-color: #e0e0e0;
background-image: none;
}
@@ -90,8 +125,23 @@
border-color: #245580;
}
.btn-primary.disabled,
-.btn-primary:disabled,
-.btn-primary[disabled] {
+.btn-primary[disabled],
+fieldset[disabled] .btn-primary,
+.btn-primary.disabled:hover,
+.btn-primary[disabled]:hover,
+fieldset[disabled] .btn-primary:hover,
+.btn-primary.disabled:focus,
+.btn-primary[disabled]:focus,
+fieldset[disabled] .btn-primary:focus,
+.btn-primary.disabled.focus,
+.btn-primary[disabled].focus,
+fieldset[disabled] .btn-primary.focus,
+.btn-primary.disabled:active,
+.btn-primary[disabled]:active,
+fieldset[disabled] .btn-primary:active,
+.btn-primary.disabled.active,
+.btn-primary[disabled].active,
+fieldset[disabled] .btn-primary.active {
background-color: #265a88;
background-image: none;
}
@@ -116,8 +166,23 @@
border-color: #3e8f3e;
}
.btn-success.disabled,
-.btn-success:disabled,
-.btn-success[disabled] {
+.btn-success[disabled],
+fieldset[disabled] .btn-success,
+.btn-success.disabled:hover,
+.btn-success[disabled]:hover,
+fieldset[disabled] .btn-success:hover,
+.btn-success.disabled:focus,
+.btn-success[disabled]:focus,
+fieldset[disabled] .btn-success:focus,
+.btn-success.disabled.focus,
+.btn-success[disabled].focus,
+fieldset[disabled] .btn-success.focus,
+.btn-success.disabled:active,
+.btn-success[disabled]:active,
+fieldset[disabled] .btn-success:active,
+.btn-success.disabled.active,
+.btn-success[disabled].active,
+fieldset[disabled] .btn-success.active {
background-color: #419641;
background-image: none;
}
@@ -142,8 +207,23 @@
border-color: #28a4c9;
}
.btn-info.disabled,
-.btn-info:disabled,
-.btn-info[disabled] {
+.btn-info[disabled],
+fieldset[disabled] .btn-info,
+.btn-info.disabled:hover,
+.btn-info[disabled]:hover,
+fieldset[disabled] .btn-info:hover,
+.btn-info.disabled:focus,
+.btn-info[disabled]:focus,
+fieldset[disabled] .btn-info:focus,
+.btn-info.disabled.focus,
+.btn-info[disabled].focus,
+fieldset[disabled] .btn-info.focus,
+.btn-info.disabled:active,
+.btn-info[disabled]:active,
+fieldset[disabled] .btn-info:active,
+.btn-info.disabled.active,
+.btn-info[disabled].active,
+fieldset[disabled] .btn-info.active {
background-color: #2aabd2;
background-image: none;
}
@@ -168,8 +248,23 @@
border-color: #e38d13;
}
.btn-warning.disabled,
-.btn-warning:disabled,
-.btn-warning[disabled] {
+.btn-warning[disabled],
+fieldset[disabled] .btn-warning,
+.btn-warning.disabled:hover,
+.btn-warning[disabled]:hover,
+fieldset[disabled] .btn-warning:hover,
+.btn-warning.disabled:focus,
+.btn-warning[disabled]:focus,
+fieldset[disabled] .btn-warning:focus,
+.btn-warning.disabled.focus,
+.btn-warning[disabled].focus,
+fieldset[disabled] .btn-warning.focus,
+.btn-warning.disabled:active,
+.btn-warning[disabled]:active,
+fieldset[disabled] .btn-warning:active,
+.btn-warning.disabled.active,
+.btn-warning[disabled].active,
+fieldset[disabled] .btn-warning.active {
background-color: #eb9316;
background-image: none;
}
@@ -194,8 +289,23 @@
border-color: #b92c28;
}
.btn-danger.disabled,
-.btn-danger:disabled,
-.btn-danger[disabled] {
+.btn-danger[disabled],
+fieldset[disabled] .btn-danger,
+.btn-danger.disabled:hover,
+.btn-danger[disabled]:hover,
+fieldset[disabled] .btn-danger:hover,
+.btn-danger.disabled:focus,
+.btn-danger[disabled]:focus,
+fieldset[disabled] .btn-danger:focus,
+.btn-danger.disabled.focus,
+.btn-danger[disabled].focus,
+fieldset[disabled] .btn-danger.focus,
+.btn-danger.disabled:active,
+.btn-danger[disabled]:active,
+fieldset[disabled] .btn-danger:active,
+.btn-danger.disabled.active,
+.btn-danger[disabled].active,
+fieldset[disabled] .btn-danger.active {
background-color: #c12e2a;
background-image: none;
}
@@ -260,6 +370,7 @@
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff3c3c3c', endColorstr='#ff222222', GradientType=0);
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
background-repeat: repeat-x;
+ border-radius: 4px;
}
.navbar-inverse .navbar-nav > .open > a,
.navbar-inverse .navbar-nav > .active > a {
diff --git a/views/ngXosViews/serviceGrid/src/vendor/bootstrap-css/css/bootstrap-theme.css.map b/views/ngXosViews/serviceGrid/src/vendor/bootstrap-css/css/bootstrap-theme.css.map
new file mode 100644
index 0000000..21e1910
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/bootstrap-css/css/bootstrap-theme.css.map
@@ -0,0 +1 @@
+{"version":3,"sources":["bootstrap-theme.css","less/theme.less","less/mixins/vendor-prefixes.less","less/mixins/gradients.less","less/mixins/reset-filter.less"],"names":[],"mappings":"AAAA;;;;GAIG;ACeH;;;;;;EAME,yCAAA;EC2CA,4FAAA;EACQ,oFAAA;CFvDT;ACgBC;;;;;;;;;;;;ECsCA,yDAAA;EACQ,iDAAA;CFxCT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ACA,yMAAA;EACA,sMAAA;CHqaH;AC5OD;EACE,mBAAA;EC9KA,mDAAA;EACQ,2CAAA;CF6ZT;AC7OD;;;EAGE,8BAAA;EEnOE,yEAAA;EACA,oEAAA;EACA,8FAAA;EAAA,uEAAA;EACA,4BAAA;EACA,uHAAA;EFiOF,sBAAA;CDmPD;ACxPD;;;EAQI,kBAAA;CDqPH;AC3OD;ECnME,kDAAA;EACQ,0CAAA;CFibT;ACrOD;EE5PI,yEAAA;EACA,oEAAA;EACA,8FAAA;EAAA,uEAAA;EACA,4BAAA;EACA,uHAAA;CHoeH;AC3OD;EE7PI,yEAAA;EACA,oEAAA;EACA,8FAAA;EAAA,uEAAA;EACA,4BAAA;EACA,uHAAA;CH2eH;ACjPD;EE9PI,yEAAA;EACA,oEAAA;EACA,8FAAA;EAAA,uEAAA;EACA,4BAAA;EACA,uHAAA;CHkfH;ACvPD;EE/PI,yEAAA;EACA,oEAAA;EACA,8FAAA;EAAA,uEAAA;EACA,4BAAA;EACA,uHAAA;CHyfH;AC7PD;EEhQI,yEAAA;EACA,oEAAA;EACA,8FAAA;EAAA,uEAAA;EACA,4BAAA;EACA,uHAAA;CHggBH;ACnQD;EEjQI,yEAAA;EACA,oEAAA;EACA,8FAAA;EAAA,uEAAA;EACA,4BAAA;EACA,uHAAA;CHugBH;ACnQD;EExQI,yEAAA;EACA,oEAAA;EACA,8FAAA;EAAA,uEAAA;EACA,4BAAA;EACA,uHAAA;EFsQF,sBAAA;EC3NA,0FAAA;EACQ,kFAAA;CFqeT","file":"bootstrap-theme.css","sourcesContent":["/*!\n * Bootstrap v3.3.6 (http://getbootstrap.com)\n * Copyright 2011-2015 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n */\n.btn-default,\n.btn-primary,\n.btn-success,\n.btn-info,\n.btn-warning,\n.btn-danger {\n text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.2);\n -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 1px rgba(0, 0, 0, 0.075);\n box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 1px rgba(0, 0, 0, 0.075);\n}\n.btn-default:active,\n.btn-primary:active,\n.btn-success:active,\n.btn-info:active,\n.btn-warning:active,\n.btn-danger:active,\n.btn-default.active,\n.btn-primary.active,\n.btn-success.active,\n.btn-info.active,\n.btn-warning.active,\n.btn-danger.active {\n -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);\n box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);\n}\n.btn-default.disabled,\n.btn-primary.disabled,\n.btn-success.disabled,\n.btn-info.disabled,\n.btn-warning.disabled,\n.btn-danger.disabled,\n.btn-default[disabled],\n.btn-primary[disabled],\n.btn-success[disabled],\n.btn-info[disabled],\n.btn-warning[disabled],\n.btn-danger[disabled],\nfieldset[disabled] .btn-default,\nfieldset[disabled] .btn-primary,\nfieldset[disabled] .btn-success,\nfieldset[disabled] .btn-info,\nfieldset[disabled] .btn-warning,\nfieldset[disabled] .btn-danger {\n -webkit-box-shadow: none;\n box-shadow: none;\n}\n.btn-default .badge,\n.btn-primary .badge,\n.btn-success .badge,\n.btn-info .badge,\n.btn-warning .badge,\n.btn-danger .badge {\n text-shadow: none;\n}\n.btn:active,\n.btn.active {\n background-image: none;\n}\n.btn-default {\n background-image: -webkit-linear-gradient(top, #fff 0%, #e0e0e0 100%);\n background-image: -o-linear-gradient(top, #fff 0%, #e0e0e0 100%);\n background-image: linear-gradient(to bottom, #fff 0%, #e0e0e0 100%);\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe0e0e0', GradientType=0);\n filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);\n background-repeat: repeat-x;\n border-color: #dbdbdb;\n text-shadow: 0 1px 0 #fff;\n border-color: #ccc;\n}\n.btn-default:hover,\n.btn-default:focus {\n background-color: #e0e0e0;\n background-position: 0 -15px;\n}\n.btn-default:active,\n.btn-default.active {\n background-color: #e0e0e0;\n border-color: #dbdbdb;\n}\n.btn-default.disabled,\n.btn-default[disabled],\nfieldset[disabled] .btn-default,\n.btn-default.disabled:hover,\n.btn-default[disabled]:hover,\nfieldset[disabled] .btn-default:hover,\n.btn-default.disabled:focus,\n.btn-default[disabled]:focus,\nfieldset[disabled] .btn-default:focus,\n.btn-default.disabled.focus,\n.btn-default[disabled].focus,\nfieldset[disabled] .btn-default.focus,\n.btn-default.disabled:active,\n.btn-default[disabled]:active,\nfieldset[disabled] .btn-default:active,\n.btn-default.disabled.active,\n.btn-default[disabled].active,\nfieldset[disabled] .btn-default.active {\n background-color: #e0e0e0;\n background-image: none;\n}\n.btn-primary {\n background-image: -webkit-linear-gradient(top, #337ab7 0%, #265a88 100%);\n background-image: -o-linear-gradient(top, #337ab7 0%, #265a88 100%);\n background-image: linear-gradient(to bottom, #337ab7 0%, #265a88 100%);\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff265a88', GradientType=0);\n filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);\n background-repeat: repeat-x;\n border-color: #245580;\n}\n.btn-primary:hover,\n.btn-primary:focus {\n background-color: #265a88;\n background-position: 0 -15px;\n}\n.btn-primary:active,\n.btn-primary.active {\n background-color: #265a88;\n border-color: #245580;\n}\n.btn-primary.disabled,\n.btn-primary[disabled],\nfieldset[disabled] .btn-primary,\n.btn-primary.disabled:hover,\n.btn-primary[disabled]:hover,\nfieldset[disabled] .btn-primary:hover,\n.btn-primary.disabled:focus,\n.btn-primary[disabled]:focus,\nfieldset[disabled] .btn-primary:focus,\n.btn-primary.disabled.focus,\n.btn-primary[disabled].focus,\nfieldset[disabled] .btn-primary.focus,\n.btn-primary.disabled:active,\n.btn-primary[disabled]:active,\nfieldset[disabled] .btn-primary:active,\n.btn-primary.disabled.active,\n.btn-primary[disabled].active,\nfieldset[disabled] .btn-primary.active {\n background-color: #265a88;\n background-image: none;\n}\n.btn-success {\n background-image: -webkit-linear-gradient(top, #5cb85c 0%, #419641 100%);\n background-image: -o-linear-gradient(top, #5cb85c 0%, #419641 100%);\n background-image: linear-gradient(to bottom, #5cb85c 0%, #419641 100%);\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff419641', GradientType=0);\n filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);\n background-repeat: repeat-x;\n border-color: #3e8f3e;\n}\n.btn-success:hover,\n.btn-success:focus {\n background-color: #419641;\n background-position: 0 -15px;\n}\n.btn-success:active,\n.btn-success.active {\n background-color: #419641;\n border-color: #3e8f3e;\n}\n.btn-success.disabled,\n.btn-success[disabled],\nfieldset[disabled] .btn-success,\n.btn-success.disabled:hover,\n.btn-success[disabled]:hover,\nfieldset[disabled] .btn-success:hover,\n.btn-success.disabled:focus,\n.btn-success[disabled]:focus,\nfieldset[disabled] .btn-success:focus,\n.btn-success.disabled.focus,\n.btn-success[disabled].focus,\nfieldset[disabled] .btn-success.focus,\n.btn-success.disabled:active,\n.btn-success[disabled]:active,\nfieldset[disabled] .btn-success:active,\n.btn-success.disabled.active,\n.btn-success[disabled].active,\nfieldset[disabled] .btn-success.active {\n background-color: #419641;\n background-image: none;\n}\n.btn-info {\n background-image: -webkit-linear-gradient(top, #5bc0de 0%, #2aabd2 100%);\n background-image: -o-linear-gradient(top, #5bc0de 0%, #2aabd2 100%);\n background-image: linear-gradient(to bottom, #5bc0de 0%, #2aabd2 100%);\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2aabd2', GradientType=0);\n filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);\n background-repeat: repeat-x;\n border-color: #28a4c9;\n}\n.btn-info:hover,\n.btn-info:focus {\n background-color: #2aabd2;\n background-position: 0 -15px;\n}\n.btn-info:active,\n.btn-info.active {\n background-color: #2aabd2;\n border-color: #28a4c9;\n}\n.btn-info.disabled,\n.btn-info[disabled],\nfieldset[disabled] .btn-info,\n.btn-info.disabled:hover,\n.btn-info[disabled]:hover,\nfieldset[disabled] .btn-info:hover,\n.btn-info.disabled:focus,\n.btn-info[disabled]:focus,\nfieldset[disabled] .btn-info:focus,\n.btn-info.disabled.focus,\n.btn-info[disabled].focus,\nfieldset[disabled] .btn-info.focus,\n.btn-info.disabled:active,\n.btn-info[disabled]:active,\nfieldset[disabled] .btn-info:active,\n.btn-info.disabled.active,\n.btn-info[disabled].active,\nfieldset[disabled] .btn-info.active {\n background-color: #2aabd2;\n background-image: none;\n}\n.btn-warning {\n background-image: -webkit-linear-gradient(top, #f0ad4e 0%, #eb9316 100%);\n background-image: -o-linear-gradient(top, #f0ad4e 0%, #eb9316 100%);\n background-image: linear-gradient(to bottom, #f0ad4e 0%, #eb9316 100%);\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffeb9316', GradientType=0);\n filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);\n background-repeat: repeat-x;\n border-color: #e38d13;\n}\n.btn-warning:hover,\n.btn-warning:focus {\n background-color: #eb9316;\n background-position: 0 -15px;\n}\n.btn-warning:active,\n.btn-warning.active {\n background-color: #eb9316;\n border-color: #e38d13;\n}\n.btn-warning.disabled,\n.btn-warning[disabled],\nfieldset[disabled] .btn-warning,\n.btn-warning.disabled:hover,\n.btn-warning[disabled]:hover,\nfieldset[disabled] .btn-warning:hover,\n.btn-warning.disabled:focus,\n.btn-warning[disabled]:focus,\nfieldset[disabled] .btn-warning:focus,\n.btn-warning.disabled.focus,\n.btn-warning[disabled].focus,\nfieldset[disabled] .btn-warning.focus,\n.btn-warning.disabled:active,\n.btn-warning[disabled]:active,\nfieldset[disabled] .btn-warning:active,\n.btn-warning.disabled.active,\n.btn-warning[disabled].active,\nfieldset[disabled] .btn-warning.active {\n background-color: #eb9316;\n background-image: none;\n}\n.btn-danger {\n background-image: -webkit-linear-gradient(top, #d9534f 0%, #c12e2a 100%);\n background-image: -o-linear-gradient(top, #d9534f 0%, #c12e2a 100%);\n background-image: linear-gradient(to bottom, #d9534f 0%, #c12e2a 100%);\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc12e2a', GradientType=0);\n filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);\n background-repeat: repeat-x;\n border-color: #b92c28;\n}\n.btn-danger:hover,\n.btn-danger:focus {\n background-color: #c12e2a;\n background-position: 0 -15px;\n}\n.btn-danger:active,\n.btn-danger.active {\n background-color: #c12e2a;\n border-color: #b92c28;\n}\n.btn-danger.disabled,\n.btn-danger[disabled],\nfieldset[disabled] .btn-danger,\n.btn-danger.disabled:hover,\n.btn-danger[disabled]:hover,\nfieldset[disabled] .btn-danger:hover,\n.btn-danger.disabled:focus,\n.btn-danger[disabled]:focus,\nfieldset[disabled] .btn-danger:focus,\n.btn-danger.disabled.focus,\n.btn-danger[disabled].focus,\nfieldset[disabled] .btn-danger.focus,\n.btn-danger.disabled:active,\n.btn-danger[disabled]:active,\nfieldset[disabled] .btn-danger:active,\n.btn-danger.disabled.active,\n.btn-danger[disabled].active,\nfieldset[disabled] .btn-danger.active {\n background-color: #c12e2a;\n background-image: none;\n}\n.thumbnail,\n.img-thumbnail {\n -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.075);\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.075);\n}\n.dropdown-menu > li > a:hover,\n.dropdown-menu > li > a:focus {\n background-image: -webkit-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);\n background-image: -o-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);\n background-image: linear-gradient(to bottom, #f5f5f5 0%, #e8e8e8 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);\n background-color: #e8e8e8;\n}\n.dropdown-menu > .active > a,\n.dropdown-menu > .active > a:hover,\n.dropdown-menu > .active > a:focus {\n background-image: -webkit-linear-gradient(top, #337ab7 0%, #2e6da4 100%);\n background-image: -o-linear-gradient(top, #337ab7 0%, #2e6da4 100%);\n background-image: linear-gradient(to bottom, #337ab7 0%, #2e6da4 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);\n background-color: #2e6da4;\n}\n.navbar-default {\n background-image: -webkit-linear-gradient(top, #ffffff 0%, #f8f8f8 100%);\n background-image: -o-linear-gradient(top, #ffffff 0%, #f8f8f8 100%);\n background-image: linear-gradient(to bottom, #ffffff 0%, #f8f8f8 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff8f8f8', GradientType=0);\n filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);\n border-radius: 4px;\n -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 5px rgba(0, 0, 0, 0.075);\n box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 5px rgba(0, 0, 0, 0.075);\n}\n.navbar-default .navbar-nav > .open > a,\n.navbar-default .navbar-nav > .active > a {\n background-image: -webkit-linear-gradient(top, #dbdbdb 0%, #e2e2e2 100%);\n background-image: -o-linear-gradient(top, #dbdbdb 0%, #e2e2e2 100%);\n background-image: linear-gradient(to bottom, #dbdbdb 0%, #e2e2e2 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdbdbdb', endColorstr='#ffe2e2e2', GradientType=0);\n -webkit-box-shadow: inset 0 3px 9px rgba(0, 0, 0, 0.075);\n box-shadow: inset 0 3px 9px rgba(0, 0, 0, 0.075);\n}\n.navbar-brand,\n.navbar-nav > li > a {\n text-shadow: 0 1px 0 rgba(255, 255, 255, 0.25);\n}\n.navbar-inverse {\n background-image: -webkit-linear-gradient(top, #3c3c3c 0%, #222 100%);\n background-image: -o-linear-gradient(top, #3c3c3c 0%, #222 100%);\n background-image: linear-gradient(to bottom, #3c3c3c 0%, #222 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff3c3c3c', endColorstr='#ff222222', GradientType=0);\n filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);\n border-radius: 4px;\n}\n.navbar-inverse .navbar-nav > .open > a,\n.navbar-inverse .navbar-nav > .active > a {\n background-image: -webkit-linear-gradient(top, #080808 0%, #0f0f0f 100%);\n background-image: -o-linear-gradient(top, #080808 0%, #0f0f0f 100%);\n background-image: linear-gradient(to bottom, #080808 0%, #0f0f0f 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff080808', endColorstr='#ff0f0f0f', GradientType=0);\n -webkit-box-shadow: inset 0 3px 9px rgba(0, 0, 0, 0.25);\n box-shadow: inset 0 3px 9px rgba(0, 0, 0, 0.25);\n}\n.navbar-inverse .navbar-brand,\n.navbar-inverse .navbar-nav > li > a {\n text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);\n}\n.navbar-static-top,\n.navbar-fixed-top,\n.navbar-fixed-bottom {\n border-radius: 0;\n}\n@media (max-width: 767px) {\n .navbar .navbar-nav .open .dropdown-menu > .active > a,\n .navbar .navbar-nav .open .dropdown-menu > .active > a:hover,\n .navbar .navbar-nav .open .dropdown-menu > .active > a:focus {\n color: #fff;\n background-image: -webkit-linear-gradient(top, #337ab7 0%, #2e6da4 100%);\n background-image: -o-linear-gradient(top, #337ab7 0%, #2e6da4 100%);\n background-image: linear-gradient(to bottom, #337ab7 0%, #2e6da4 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);\n }\n}\n.alert {\n text-shadow: 0 1px 0 rgba(255, 255, 255, 0.2);\n -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 1px 2px rgba(0, 0, 0, 0.05);\n box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 1px 2px rgba(0, 0, 0, 0.05);\n}\n.alert-success {\n background-image: -webkit-linear-gradient(top, #dff0d8 0%, #c8e5bc 100%);\n background-image: -o-linear-gradient(top, #dff0d8 0%, #c8e5bc 100%);\n background-image: linear-gradient(to bottom, #dff0d8 0%, #c8e5bc 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffc8e5bc', GradientType=0);\n border-color: #b2dba1;\n}\n.alert-info {\n background-image: -webkit-linear-gradient(top, #d9edf7 0%, #b9def0 100%);\n background-image: -o-linear-gradient(top, #d9edf7 0%, #b9def0 100%);\n background-image: linear-gradient(to bottom, #d9edf7 0%, #b9def0 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffb9def0', GradientType=0);\n border-color: #9acfea;\n}\n.alert-warning {\n background-image: -webkit-linear-gradient(top, #fcf8e3 0%, #f8efc0 100%);\n background-image: -o-linear-gradient(top, #fcf8e3 0%, #f8efc0 100%);\n background-image: linear-gradient(to bottom, #fcf8e3 0%, #f8efc0 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fff8efc0', GradientType=0);\n border-color: #f5e79e;\n}\n.alert-danger {\n background-image: -webkit-linear-gradient(top, #f2dede 0%, #e7c3c3 100%);\n background-image: -o-linear-gradient(top, #f2dede 0%, #e7c3c3 100%);\n background-image: linear-gradient(to bottom, #f2dede 0%, #e7c3c3 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffe7c3c3', GradientType=0);\n border-color: #dca7a7;\n}\n.progress {\n background-image: -webkit-linear-gradient(top, #ebebeb 0%, #f5f5f5 100%);\n background-image: -o-linear-gradient(top, #ebebeb 0%, #f5f5f5 100%);\n background-image: linear-gradient(to bottom, #ebebeb 0%, #f5f5f5 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffebebeb', endColorstr='#fff5f5f5', GradientType=0);\n}\n.progress-bar {\n background-image: -webkit-linear-gradient(top, #337ab7 0%, #286090 100%);\n background-image: -o-linear-gradient(top, #337ab7 0%, #286090 100%);\n background-image: linear-gradient(to bottom, #337ab7 0%, #286090 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff286090', GradientType=0);\n}\n.progress-bar-success {\n background-image: -webkit-linear-gradient(top, #5cb85c 0%, #449d44 100%);\n background-image: -o-linear-gradient(top, #5cb85c 0%, #449d44 100%);\n background-image: linear-gradient(to bottom, #5cb85c 0%, #449d44 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff449d44', GradientType=0);\n}\n.progress-bar-info {\n background-image: -webkit-linear-gradient(top, #5bc0de 0%, #31b0d5 100%);\n background-image: -o-linear-gradient(top, #5bc0de 0%, #31b0d5 100%);\n background-image: linear-gradient(to bottom, #5bc0de 0%, #31b0d5 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff31b0d5', GradientType=0);\n}\n.progress-bar-warning {\n background-image: -webkit-linear-gradient(top, #f0ad4e 0%, #ec971f 100%);\n background-image: -o-linear-gradient(top, #f0ad4e 0%, #ec971f 100%);\n background-image: linear-gradient(to bottom, #f0ad4e 0%, #ec971f 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffec971f', GradientType=0);\n}\n.progress-bar-danger {\n background-image: -webkit-linear-gradient(top, #d9534f 0%, #c9302c 100%);\n background-image: -o-linear-gradient(top, #d9534f 0%, #c9302c 100%);\n background-image: linear-gradient(to bottom, #d9534f 0%, #c9302c 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc9302c', GradientType=0);\n}\n.progress-bar-striped {\n background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n}\n.list-group {\n border-radius: 4px;\n -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.075);\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.075);\n}\n.list-group-item.active,\n.list-group-item.active:hover,\n.list-group-item.active:focus {\n text-shadow: 0 -1px 0 #286090;\n background-image: -webkit-linear-gradient(top, #337ab7 0%, #2b669a 100%);\n background-image: -o-linear-gradient(top, #337ab7 0%, #2b669a 100%);\n background-image: linear-gradient(to bottom, #337ab7 0%, #2b669a 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2b669a', GradientType=0);\n border-color: #2b669a;\n}\n.list-group-item.active .badge,\n.list-group-item.active:hover .badge,\n.list-group-item.active:focus .badge {\n text-shadow: none;\n}\n.panel {\n -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);\n}\n.panel-default > .panel-heading {\n background-image: -webkit-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);\n background-image: -o-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);\n background-image: linear-gradient(to bottom, #f5f5f5 0%, #e8e8e8 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);\n}\n.panel-primary > .panel-heading {\n background-image: -webkit-linear-gradient(top, #337ab7 0%, #2e6da4 100%);\n background-image: -o-linear-gradient(top, #337ab7 0%, #2e6da4 100%);\n background-image: linear-gradient(to bottom, #337ab7 0%, #2e6da4 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);\n}\n.panel-success > .panel-heading {\n background-image: -webkit-linear-gradient(top, #dff0d8 0%, #d0e9c6 100%);\n background-image: -o-linear-gradient(top, #dff0d8 0%, #d0e9c6 100%);\n background-image: linear-gradient(to bottom, #dff0d8 0%, #d0e9c6 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffd0e9c6', GradientType=0);\n}\n.panel-info > .panel-heading {\n background-image: -webkit-linear-gradient(top, #d9edf7 0%, #c4e3f3 100%);\n background-image: -o-linear-gradient(top, #d9edf7 0%, #c4e3f3 100%);\n background-image: linear-gradient(to bottom, #d9edf7 0%, #c4e3f3 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffc4e3f3', GradientType=0);\n}\n.panel-warning > .panel-heading {\n background-image: -webkit-linear-gradient(top, #fcf8e3 0%, #faf2cc 100%);\n background-image: -o-linear-gradient(top, #fcf8e3 0%, #faf2cc 100%);\n background-image: linear-gradient(to bottom, #fcf8e3 0%, #faf2cc 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fffaf2cc', GradientType=0);\n}\n.panel-danger > .panel-heading {\n background-image: -webkit-linear-gradient(top, #f2dede 0%, #ebcccc 100%);\n background-image: -o-linear-gradient(top, #f2dede 0%, #ebcccc 100%);\n background-image: linear-gradient(to bottom, #f2dede 0%, #ebcccc 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffebcccc', GradientType=0);\n}\n.well {\n background-image: -webkit-linear-gradient(top, #e8e8e8 0%, #f5f5f5 100%);\n background-image: -o-linear-gradient(top, #e8e8e8 0%, #f5f5f5 100%);\n background-image: linear-gradient(to bottom, #e8e8e8 0%, #f5f5f5 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe8e8e8', endColorstr='#fff5f5f5', GradientType=0);\n border-color: #dcdcdc;\n -webkit-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 0 rgba(255, 255, 255, 0.1);\n box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 0 rgba(255, 255, 255, 0.1);\n}\n/*# sourceMappingURL=bootstrap-theme.css.map */","/*!\n * Bootstrap v3.3.6 (http://getbootstrap.com)\n * Copyright 2011-2015 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n */\n\n//\n// Load core variables and mixins\n// --------------------------------------------------\n\n@import \"variables.less\";\n@import \"mixins.less\";\n\n\n//\n// Buttons\n// --------------------------------------------------\n\n// Common styles\n.btn-default,\n.btn-primary,\n.btn-success,\n.btn-info,\n.btn-warning,\n.btn-danger {\n text-shadow: 0 -1px 0 rgba(0,0,0,.2);\n @shadow: inset 0 1px 0 rgba(255,255,255,.15), 0 1px 1px rgba(0,0,0,.075);\n .box-shadow(@shadow);\n\n // Reset the shadow\n &:active,\n &.active {\n .box-shadow(inset 0 3px 5px rgba(0,0,0,.125));\n }\n\n &.disabled,\n &[disabled],\n fieldset[disabled] & {\n .box-shadow(none);\n }\n\n .badge {\n text-shadow: none;\n }\n}\n\n// Mixin for generating new styles\n.btn-styles(@btn-color: #555) {\n #gradient > .vertical(@start-color: @btn-color; @end-color: darken(@btn-color, 12%));\n .reset-filter(); // Disable gradients for IE9 because filter bleeds through rounded corners; see https://github.com/twbs/bootstrap/issues/10620\n background-repeat: repeat-x;\n border-color: darken(@btn-color, 14%);\n\n &:hover,\n &:focus {\n background-color: darken(@btn-color, 12%);\n background-position: 0 -15px;\n }\n\n &:active,\n &.active {\n background-color: darken(@btn-color, 12%);\n border-color: darken(@btn-color, 14%);\n }\n\n &.disabled,\n &[disabled],\n fieldset[disabled] & {\n &,\n &:hover,\n &:focus,\n &.focus,\n &:active,\n &.active {\n background-color: darken(@btn-color, 12%);\n background-image: none;\n }\n }\n}\n\n// Common styles\n.btn {\n // Remove the gradient for the pressed/active state\n &:active,\n &.active {\n background-image: none;\n }\n}\n\n// Apply the mixin to the buttons\n.btn-default { .btn-styles(@btn-default-bg); text-shadow: 0 1px 0 #fff; border-color: #ccc; }\n.btn-primary { .btn-styles(@btn-primary-bg); }\n.btn-success { .btn-styles(@btn-success-bg); }\n.btn-info { .btn-styles(@btn-info-bg); }\n.btn-warning { .btn-styles(@btn-warning-bg); }\n.btn-danger { .btn-styles(@btn-danger-bg); }\n\n\n//\n// Images\n// --------------------------------------------------\n\n.thumbnail,\n.img-thumbnail {\n .box-shadow(0 1px 2px rgba(0,0,0,.075));\n}\n\n\n//\n// Dropdowns\n// --------------------------------------------------\n\n.dropdown-menu > li > a:hover,\n.dropdown-menu > li > a:focus {\n #gradient > .vertical(@start-color: @dropdown-link-hover-bg; @end-color: darken(@dropdown-link-hover-bg, 5%));\n background-color: darken(@dropdown-link-hover-bg, 5%);\n}\n.dropdown-menu > .active > a,\n.dropdown-menu > .active > a:hover,\n.dropdown-menu > .active > a:focus {\n #gradient > .vertical(@start-color: @dropdown-link-active-bg; @end-color: darken(@dropdown-link-active-bg, 5%));\n background-color: darken(@dropdown-link-active-bg, 5%);\n}\n\n\n//\n// Navbar\n// --------------------------------------------------\n\n// Default navbar\n.navbar-default {\n #gradient > .vertical(@start-color: lighten(@navbar-default-bg, 10%); @end-color: @navbar-default-bg);\n .reset-filter(); // Remove gradient in IE<10 to fix bug where dropdowns don't get triggered\n border-radius: @navbar-border-radius;\n @shadow: inset 0 1px 0 rgba(255,255,255,.15), 0 1px 5px rgba(0,0,0,.075);\n .box-shadow(@shadow);\n\n .navbar-nav > .open > a,\n .navbar-nav > .active > a {\n #gradient > .vertical(@start-color: darken(@navbar-default-link-active-bg, 5%); @end-color: darken(@navbar-default-link-active-bg, 2%));\n .box-shadow(inset 0 3px 9px rgba(0,0,0,.075));\n }\n}\n.navbar-brand,\n.navbar-nav > li > a {\n text-shadow: 0 1px 0 rgba(255,255,255,.25);\n}\n\n// Inverted navbar\n.navbar-inverse {\n #gradient > .vertical(@start-color: lighten(@navbar-inverse-bg, 10%); @end-color: @navbar-inverse-bg);\n .reset-filter(); // Remove gradient in IE<10 to fix bug where dropdowns don't get triggered; see https://github.com/twbs/bootstrap/issues/10257\n border-radius: @navbar-border-radius;\n .navbar-nav > .open > a,\n .navbar-nav > .active > a {\n #gradient > .vertical(@start-color: @navbar-inverse-link-active-bg; @end-color: lighten(@navbar-inverse-link-active-bg, 2.5%));\n .box-shadow(inset 0 3px 9px rgba(0,0,0,.25));\n }\n\n .navbar-brand,\n .navbar-nav > li > a {\n text-shadow: 0 -1px 0 rgba(0,0,0,.25);\n }\n}\n\n// Undo rounded corners in static and fixed navbars\n.navbar-static-top,\n.navbar-fixed-top,\n.navbar-fixed-bottom {\n border-radius: 0;\n}\n\n// Fix active state of dropdown items in collapsed mode\n@media (max-width: @grid-float-breakpoint-max) {\n .navbar .navbar-nav .open .dropdown-menu > .active > a {\n &,\n &:hover,\n &:focus {\n color: #fff;\n #gradient > .vertical(@start-color: @dropdown-link-active-bg; @end-color: darken(@dropdown-link-active-bg, 5%));\n }\n }\n}\n\n\n//\n// Alerts\n// --------------------------------------------------\n\n// Common styles\n.alert {\n text-shadow: 0 1px 0 rgba(255,255,255,.2);\n @shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 1px 2px rgba(0,0,0,.05);\n .box-shadow(@shadow);\n}\n\n// Mixin for generating new styles\n.alert-styles(@color) {\n #gradient > .vertical(@start-color: @color; @end-color: darken(@color, 7.5%));\n border-color: darken(@color, 15%);\n}\n\n// Apply the mixin to the alerts\n.alert-success { .alert-styles(@alert-success-bg); }\n.alert-info { .alert-styles(@alert-info-bg); }\n.alert-warning { .alert-styles(@alert-warning-bg); }\n.alert-danger { .alert-styles(@alert-danger-bg); }\n\n\n//\n// Progress bars\n// --------------------------------------------------\n\n// Give the progress background some depth\n.progress {\n #gradient > .vertical(@start-color: darken(@progress-bg, 4%); @end-color: @progress-bg)\n}\n\n// Mixin for generating new styles\n.progress-bar-styles(@color) {\n #gradient > .vertical(@start-color: @color; @end-color: darken(@color, 10%));\n}\n\n// Apply the mixin to the progress bars\n.progress-bar { .progress-bar-styles(@progress-bar-bg); }\n.progress-bar-success { .progress-bar-styles(@progress-bar-success-bg); }\n.progress-bar-info { .progress-bar-styles(@progress-bar-info-bg); }\n.progress-bar-warning { .progress-bar-styles(@progress-bar-warning-bg); }\n.progress-bar-danger { .progress-bar-styles(@progress-bar-danger-bg); }\n\n// Reset the striped class because our mixins don't do multiple gradients and\n// the above custom styles override the new `.progress-bar-striped` in v3.2.0.\n.progress-bar-striped {\n #gradient > .striped();\n}\n\n\n//\n// List groups\n// --------------------------------------------------\n\n.list-group {\n border-radius: @border-radius-base;\n .box-shadow(0 1px 2px rgba(0,0,0,.075));\n}\n.list-group-item.active,\n.list-group-item.active:hover,\n.list-group-item.active:focus {\n text-shadow: 0 -1px 0 darken(@list-group-active-bg, 10%);\n #gradient > .vertical(@start-color: @list-group-active-bg; @end-color: darken(@list-group-active-bg, 7.5%));\n border-color: darken(@list-group-active-border, 7.5%);\n\n .badge {\n text-shadow: none;\n }\n}\n\n\n//\n// Panels\n// --------------------------------------------------\n\n// Common styles\n.panel {\n .box-shadow(0 1px 2px rgba(0,0,0,.05));\n}\n\n// Mixin for generating new styles\n.panel-heading-styles(@color) {\n #gradient > .vertical(@start-color: @color; @end-color: darken(@color, 5%));\n}\n\n// Apply the mixin to the panel headings only\n.panel-default > .panel-heading { .panel-heading-styles(@panel-default-heading-bg); }\n.panel-primary > .panel-heading { .panel-heading-styles(@panel-primary-heading-bg); }\n.panel-success > .panel-heading { .panel-heading-styles(@panel-success-heading-bg); }\n.panel-info > .panel-heading { .panel-heading-styles(@panel-info-heading-bg); }\n.panel-warning > .panel-heading { .panel-heading-styles(@panel-warning-heading-bg); }\n.panel-danger > .panel-heading { .panel-heading-styles(@panel-danger-heading-bg); }\n\n\n//\n// Wells\n// --------------------------------------------------\n\n.well {\n #gradient > .vertical(@start-color: darken(@well-bg, 5%); @end-color: @well-bg);\n border-color: darken(@well-bg, 10%);\n @shadow: inset 0 1px 3px rgba(0,0,0,.05), 0 1px 0 rgba(255,255,255,.1);\n .box-shadow(@shadow);\n}\n","// Vendor Prefixes\n//\n// All vendor mixins are deprecated as of v3.2.0 due to the introduction of\n// Autoprefixer in our Gruntfile. They have been removed in v4.\n\n// - Animations\n// - Backface visibility\n// - Box shadow\n// - Box sizing\n// - Content columns\n// - Hyphens\n// - Placeholder text\n// - Transformations\n// - Transitions\n// - User Select\n\n\n// Animations\n.animation(@animation) {\n -webkit-animation: @animation;\n -o-animation: @animation;\n animation: @animation;\n}\n.animation-name(@name) {\n -webkit-animation-name: @name;\n animation-name: @name;\n}\n.animation-duration(@duration) {\n -webkit-animation-duration: @duration;\n animation-duration: @duration;\n}\n.animation-timing-function(@timing-function) {\n -webkit-animation-timing-function: @timing-function;\n animation-timing-function: @timing-function;\n}\n.animation-delay(@delay) {\n -webkit-animation-delay: @delay;\n animation-delay: @delay;\n}\n.animation-iteration-count(@iteration-count) {\n -webkit-animation-iteration-count: @iteration-count;\n animation-iteration-count: @iteration-count;\n}\n.animation-direction(@direction) {\n -webkit-animation-direction: @direction;\n animation-direction: @direction;\n}\n.animation-fill-mode(@fill-mode) {\n -webkit-animation-fill-mode: @fill-mode;\n animation-fill-mode: @fill-mode;\n}\n\n// Backface visibility\n// Prevent browsers from flickering when using CSS 3D transforms.\n// Default value is `visible`, but can be changed to `hidden`\n\n.backface-visibility(@visibility) {\n -webkit-backface-visibility: @visibility;\n -moz-backface-visibility: @visibility;\n backface-visibility: @visibility;\n}\n\n// Drop shadows\n//\n// Note: Deprecated `.box-shadow()` as of v3.1.0 since all of Bootstrap's\n// supported browsers that have box shadow capabilities now support it.\n\n.box-shadow(@shadow) {\n -webkit-box-shadow: @shadow; // iOS <4.3 & Android <4.1\n box-shadow: @shadow;\n}\n\n// Box sizing\n.box-sizing(@boxmodel) {\n -webkit-box-sizing: @boxmodel;\n -moz-box-sizing: @boxmodel;\n box-sizing: @boxmodel;\n}\n\n// CSS3 Content Columns\n.content-columns(@column-count; @column-gap: @grid-gutter-width) {\n -webkit-column-count: @column-count;\n -moz-column-count: @column-count;\n column-count: @column-count;\n -webkit-column-gap: @column-gap;\n -moz-column-gap: @column-gap;\n column-gap: @column-gap;\n}\n\n// Optional hyphenation\n.hyphens(@mode: auto) {\n word-wrap: break-word;\n -webkit-hyphens: @mode;\n -moz-hyphens: @mode;\n -ms-hyphens: @mode; // IE10+\n -o-hyphens: @mode;\n hyphens: @mode;\n}\n\n// Placeholder text\n.placeholder(@color: @input-color-placeholder) {\n // Firefox\n &::-moz-placeholder {\n color: @color;\n opacity: 1; // Override Firefox's unusual default opacity; see https://github.com/twbs/bootstrap/pull/11526\n }\n &:-ms-input-placeholder { color: @color; } // Internet Explorer 10+\n &::-webkit-input-placeholder { color: @color; } // Safari and Chrome\n}\n\n// Transformations\n.scale(@ratio) {\n -webkit-transform: scale(@ratio);\n -ms-transform: scale(@ratio); // IE9 only\n -o-transform: scale(@ratio);\n transform: scale(@ratio);\n}\n.scale(@ratioX; @ratioY) {\n -webkit-transform: scale(@ratioX, @ratioY);\n -ms-transform: scale(@ratioX, @ratioY); // IE9 only\n -o-transform: scale(@ratioX, @ratioY);\n transform: scale(@ratioX, @ratioY);\n}\n.scaleX(@ratio) {\n -webkit-transform: scaleX(@ratio);\n -ms-transform: scaleX(@ratio); // IE9 only\n -o-transform: scaleX(@ratio);\n transform: scaleX(@ratio);\n}\n.scaleY(@ratio) {\n -webkit-transform: scaleY(@ratio);\n -ms-transform: scaleY(@ratio); // IE9 only\n -o-transform: scaleY(@ratio);\n transform: scaleY(@ratio);\n}\n.skew(@x; @y) {\n -webkit-transform: skewX(@x) skewY(@y);\n -ms-transform: skewX(@x) skewY(@y); // See https://github.com/twbs/bootstrap/issues/4885; IE9+\n -o-transform: skewX(@x) skewY(@y);\n transform: skewX(@x) skewY(@y);\n}\n.translate(@x; @y) {\n -webkit-transform: translate(@x, @y);\n -ms-transform: translate(@x, @y); // IE9 only\n -o-transform: translate(@x, @y);\n transform: translate(@x, @y);\n}\n.translate3d(@x; @y; @z) {\n -webkit-transform: translate3d(@x, @y, @z);\n transform: translate3d(@x, @y, @z);\n}\n.rotate(@degrees) {\n -webkit-transform: rotate(@degrees);\n -ms-transform: rotate(@degrees); // IE9 only\n -o-transform: rotate(@degrees);\n transform: rotate(@degrees);\n}\n.rotateX(@degrees) {\n -webkit-transform: rotateX(@degrees);\n -ms-transform: rotateX(@degrees); // IE9 only\n -o-transform: rotateX(@degrees);\n transform: rotateX(@degrees);\n}\n.rotateY(@degrees) {\n -webkit-transform: rotateY(@degrees);\n -ms-transform: rotateY(@degrees); // IE9 only\n -o-transform: rotateY(@degrees);\n transform: rotateY(@degrees);\n}\n.perspective(@perspective) {\n -webkit-perspective: @perspective;\n -moz-perspective: @perspective;\n perspective: @perspective;\n}\n.perspective-origin(@perspective) {\n -webkit-perspective-origin: @perspective;\n -moz-perspective-origin: @perspective;\n perspective-origin: @perspective;\n}\n.transform-origin(@origin) {\n -webkit-transform-origin: @origin;\n -moz-transform-origin: @origin;\n -ms-transform-origin: @origin; // IE9 only\n transform-origin: @origin;\n}\n\n\n// Transitions\n\n.transition(@transition) {\n -webkit-transition: @transition;\n -o-transition: @transition;\n transition: @transition;\n}\n.transition-property(@transition-property) {\n -webkit-transition-property: @transition-property;\n transition-property: @transition-property;\n}\n.transition-delay(@transition-delay) {\n -webkit-transition-delay: @transition-delay;\n transition-delay: @transition-delay;\n}\n.transition-duration(@transition-duration) {\n -webkit-transition-duration: @transition-duration;\n transition-duration: @transition-duration;\n}\n.transition-timing-function(@timing-function) {\n -webkit-transition-timing-function: @timing-function;\n transition-timing-function: @timing-function;\n}\n.transition-transform(@transition) {\n -webkit-transition: -webkit-transform @transition;\n -moz-transition: -moz-transform @transition;\n -o-transition: -o-transform @transition;\n transition: transform @transition;\n}\n\n\n// User select\n// For selecting text on the page\n\n.user-select(@select) {\n -webkit-user-select: @select;\n -moz-user-select: @select;\n -ms-user-select: @select; // IE10+\n user-select: @select;\n}\n","// Gradients\n\n#gradient {\n\n // Horizontal gradient, from left to right\n //\n // Creates two color stops, start and end, by specifying a color and position for each color stop.\n // Color stops are not available in IE9 and below.\n .horizontal(@start-color: #555; @end-color: #333; @start-percent: 0%; @end-percent: 100%) {\n background-image: -webkit-linear-gradient(left, @start-color @start-percent, @end-color @end-percent); // Safari 5.1-6, Chrome 10+\n background-image: -o-linear-gradient(left, @start-color @start-percent, @end-color @end-percent); // Opera 12\n background-image: linear-gradient(to right, @start-color @start-percent, @end-color @end-percent); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+\n background-repeat: repeat-x;\n filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=1)\",argb(@start-color),argb(@end-color))); // IE9 and down\n }\n\n // Vertical gradient, from top to bottom\n //\n // Creates two color stops, start and end, by specifying a color and position for each color stop.\n // Color stops are not available in IE9 and below.\n .vertical(@start-color: #555; @end-color: #333; @start-percent: 0%; @end-percent: 100%) {\n background-image: -webkit-linear-gradient(top, @start-color @start-percent, @end-color @end-percent); // Safari 5.1-6, Chrome 10+\n background-image: -o-linear-gradient(top, @start-color @start-percent, @end-color @end-percent); // Opera 12\n background-image: linear-gradient(to bottom, @start-color @start-percent, @end-color @end-percent); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+\n background-repeat: repeat-x;\n filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)\",argb(@start-color),argb(@end-color))); // IE9 and down\n }\n\n .directional(@start-color: #555; @end-color: #333; @deg: 45deg) {\n background-repeat: repeat-x;\n background-image: -webkit-linear-gradient(@deg, @start-color, @end-color); // Safari 5.1-6, Chrome 10+\n background-image: -o-linear-gradient(@deg, @start-color, @end-color); // Opera 12\n background-image: linear-gradient(@deg, @start-color, @end-color); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+\n }\n .horizontal-three-colors(@start-color: #00b3ee; @mid-color: #7a43b6; @color-stop: 50%; @end-color: #c3325f) {\n background-image: -webkit-linear-gradient(left, @start-color, @mid-color @color-stop, @end-color);\n background-image: -o-linear-gradient(left, @start-color, @mid-color @color-stop, @end-color);\n background-image: linear-gradient(to right, @start-color, @mid-color @color-stop, @end-color);\n background-repeat: no-repeat;\n filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=1)\",argb(@start-color),argb(@end-color))); // IE9 and down, gets no color-stop at all for proper fallback\n }\n .vertical-three-colors(@start-color: #00b3ee; @mid-color: #7a43b6; @color-stop: 50%; @end-color: #c3325f) {\n background-image: -webkit-linear-gradient(@start-color, @mid-color @color-stop, @end-color);\n background-image: -o-linear-gradient(@start-color, @mid-color @color-stop, @end-color);\n background-image: linear-gradient(@start-color, @mid-color @color-stop, @end-color);\n background-repeat: no-repeat;\n filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)\",argb(@start-color),argb(@end-color))); // IE9 and down, gets no color-stop at all for proper fallback\n }\n .radial(@inner-color: #555; @outer-color: #333) {\n background-image: -webkit-radial-gradient(circle, @inner-color, @outer-color);\n background-image: radial-gradient(circle, @inner-color, @outer-color);\n background-repeat: no-repeat;\n }\n .striped(@color: rgba(255,255,255,.15); @angle: 45deg) {\n background-image: -webkit-linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent);\n background-image: -o-linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent);\n background-image: linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent);\n }\n}\n","// Reset filters for IE\n//\n// When you need to remove a gradient background, do not forget to use this to reset\n// the IE filter for IE9 and below.\n\n.reset-filter() {\n filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(enabled = false)\"));\n}\n"]}
\ No newline at end of file
diff --git a/views/ngXosViews/serviceGrid/src/vendor/bootstrap-css/css/bootstrap-theme.min.css b/views/ngXosViews/serviceGrid/src/vendor/bootstrap-css/css/bootstrap-theme.min.css
new file mode 100644
index 0000000..dc95d8e
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/bootstrap-css/css/bootstrap-theme.min.css
@@ -0,0 +1,6 @@
+/*!
+ * Bootstrap v3.3.6 (http://getbootstrap.com)
+ * Copyright 2011-2015 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ */.btn-danger,.btn-default,.btn-info,.btn-primary,.btn-success,.btn-warning{text-shadow:0 -1px 0 rgba(0,0,0,.2);-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 1px rgba(0,0,0,.075)}.btn-danger.active,.btn-danger:active,.btn-default.active,.btn-default:active,.btn-info.active,.btn-info:active,.btn-primary.active,.btn-primary:active,.btn-success.active,.btn-success:active,.btn-warning.active,.btn-warning:active{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn-danger.disabled,.btn-danger[disabled],.btn-default.disabled,.btn-default[disabled],.btn-info.disabled,.btn-info[disabled],.btn-primary.disabled,.btn-primary[disabled],.btn-success.disabled,.btn-success[disabled],.btn-warning.disabled,.btn-warning[disabled],fieldset[disabled] .btn-danger,fieldset[disabled] .btn-default,fieldset[disabled] .btn-info,fieldset[disabled] .btn-primary,fieldset[disabled] .btn-success,fieldset[disabled] .btn-warning{-webkit-box-shadow:none;box-shadow:none}.btn-danger .badge,.btn-default .badge,.btn-info .badge,.btn-primary .badge,.btn-success .badge,.btn-warning .badge{text-shadow:none}.btn.active,.btn:active{background-image:none}.btn-default{text-shadow:0 1px 0 #fff;background-image:-webkit-linear-gradient(top,#fff 0,#e0e0e0 100%);background-image:-o-linear-gradient(top,#fff 0,#e0e0e0 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#fff),to(#e0e0e0));background-image:linear-gradient(to bottom,#fff 0,#e0e0e0 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe0e0e0', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#dbdbdb;border-color:#ccc}.btn-default:focus,.btn-default:hover{background-color:#e0e0e0;background-position:0 -15px}.btn-default.active,.btn-default:active{background-color:#e0e0e0;border-color:#dbdbdb}.btn-default.disabled,.btn-default.disabled.active,.btn-default.disabled.focus,.btn-default.disabled:active,.btn-default.disabled:focus,.btn-default.disabled:hover,.btn-default[disabled],.btn-default[disabled].active,.btn-default[disabled].focus,.btn-default[disabled]:active,.btn-default[disabled]:focus,.btn-default[disabled]:hover,fieldset[disabled] .btn-default,fieldset[disabled] .btn-default.active,fieldset[disabled] .btn-default.focus,fieldset[disabled] .btn-default:active,fieldset[disabled] .btn-default:focus,fieldset[disabled] .btn-default:hover{background-color:#e0e0e0;background-image:none}.btn-primary{background-image:-webkit-linear-gradient(top,#337ab7 0,#265a88 100%);background-image:-o-linear-gradient(top,#337ab7 0,#265a88 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#265a88));background-image:linear-gradient(to bottom,#337ab7 0,#265a88 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff265a88', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#245580}.btn-primary:focus,.btn-primary:hover{background-color:#265a88;background-position:0 -15px}.btn-primary.active,.btn-primary:active{background-color:#265a88;border-color:#245580}.btn-primary.disabled,.btn-primary.disabled.active,.btn-primary.disabled.focus,.btn-primary.disabled:active,.btn-primary.disabled:focus,.btn-primary.disabled:hover,.btn-primary[disabled],.btn-primary[disabled].active,.btn-primary[disabled].focus,.btn-primary[disabled]:active,.btn-primary[disabled]:focus,.btn-primary[disabled]:hover,fieldset[disabled] .btn-primary,fieldset[disabled] .btn-primary.active,fieldset[disabled] .btn-primary.focus,fieldset[disabled] .btn-primary:active,fieldset[disabled] .btn-primary:focus,fieldset[disabled] .btn-primary:hover{background-color:#265a88;background-image:none}.btn-success{background-image:-webkit-linear-gradient(top,#5cb85c 0,#419641 100%);background-image:-o-linear-gradient(top,#5cb85c 0,#419641 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#5cb85c),to(#419641));background-image:linear-gradient(to bottom,#5cb85c 0,#419641 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff419641', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#3e8f3e}.btn-success:focus,.btn-success:hover{background-color:#419641;background-position:0 -15px}.btn-success.active,.btn-success:active{background-color:#419641;border-color:#3e8f3e}.btn-success.disabled,.btn-success.disabled.active,.btn-success.disabled.focus,.btn-success.disabled:active,.btn-success.disabled:focus,.btn-success.disabled:hover,.btn-success[disabled],.btn-success[disabled].active,.btn-success[disabled].focus,.btn-success[disabled]:active,.btn-success[disabled]:focus,.btn-success[disabled]:hover,fieldset[disabled] .btn-success,fieldset[disabled] .btn-success.active,fieldset[disabled] .btn-success.focus,fieldset[disabled] .btn-success:active,fieldset[disabled] .btn-success:focus,fieldset[disabled] .btn-success:hover{background-color:#419641;background-image:none}.btn-info{background-image:-webkit-linear-gradient(top,#5bc0de 0,#2aabd2 100%);background-image:-o-linear-gradient(top,#5bc0de 0,#2aabd2 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#5bc0de),to(#2aabd2));background-image:linear-gradient(to bottom,#5bc0de 0,#2aabd2 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2aabd2', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#28a4c9}.btn-info:focus,.btn-info:hover{background-color:#2aabd2;background-position:0 -15px}.btn-info.active,.btn-info:active{background-color:#2aabd2;border-color:#28a4c9}.btn-info.disabled,.btn-info.disabled.active,.btn-info.disabled.focus,.btn-info.disabled:active,.btn-info.disabled:focus,.btn-info.disabled:hover,.btn-info[disabled],.btn-info[disabled].active,.btn-info[disabled].focus,.btn-info[disabled]:active,.btn-info[disabled]:focus,.btn-info[disabled]:hover,fieldset[disabled] .btn-info,fieldset[disabled] .btn-info.active,fieldset[disabled] .btn-info.focus,fieldset[disabled] .btn-info:active,fieldset[disabled] .btn-info:focus,fieldset[disabled] .btn-info:hover{background-color:#2aabd2;background-image:none}.btn-warning{background-image:-webkit-linear-gradient(top,#f0ad4e 0,#eb9316 100%);background-image:-o-linear-gradient(top,#f0ad4e 0,#eb9316 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f0ad4e),to(#eb9316));background-image:linear-gradient(to bottom,#f0ad4e 0,#eb9316 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffeb9316', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#e38d13}.btn-warning:focus,.btn-warning:hover{background-color:#eb9316;background-position:0 -15px}.btn-warning.active,.btn-warning:active{background-color:#eb9316;border-color:#e38d13}.btn-warning.disabled,.btn-warning.disabled.active,.btn-warning.disabled.focus,.btn-warning.disabled:active,.btn-warning.disabled:focus,.btn-warning.disabled:hover,.btn-warning[disabled],.btn-warning[disabled].active,.btn-warning[disabled].focus,.btn-warning[disabled]:active,.btn-warning[disabled]:focus,.btn-warning[disabled]:hover,fieldset[disabled] .btn-warning,fieldset[disabled] .btn-warning.active,fieldset[disabled] .btn-warning.focus,fieldset[disabled] .btn-warning:active,fieldset[disabled] .btn-warning:focus,fieldset[disabled] .btn-warning:hover{background-color:#eb9316;background-image:none}.btn-danger{background-image:-webkit-linear-gradient(top,#d9534f 0,#c12e2a 100%);background-image:-o-linear-gradient(top,#d9534f 0,#c12e2a 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#d9534f),to(#c12e2a));background-image:linear-gradient(to bottom,#d9534f 0,#c12e2a 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc12e2a', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#b92c28}.btn-danger:focus,.btn-danger:hover{background-color:#c12e2a;background-position:0 -15px}.btn-danger.active,.btn-danger:active{background-color:#c12e2a;border-color:#b92c28}.btn-danger.disabled,.btn-danger.disabled.active,.btn-danger.disabled.focus,.btn-danger.disabled:active,.btn-danger.disabled:focus,.btn-danger.disabled:hover,.btn-danger[disabled],.btn-danger[disabled].active,.btn-danger[disabled].focus,.btn-danger[disabled]:active,.btn-danger[disabled]:focus,.btn-danger[disabled]:hover,fieldset[disabled] .btn-danger,fieldset[disabled] .btn-danger.active,fieldset[disabled] .btn-danger.focus,fieldset[disabled] .btn-danger:active,fieldset[disabled] .btn-danger:focus,fieldset[disabled] .btn-danger:hover{background-color:#c12e2a;background-image:none}.img-thumbnail,.thumbnail{-webkit-box-shadow:0 1px 2px rgba(0,0,0,.075);box-shadow:0 1px 2px rgba(0,0,0,.075)}.dropdown-menu>li>a:focus,.dropdown-menu>li>a:hover{background-color:#e8e8e8;background-image:-webkit-linear-gradient(top,#f5f5f5 0,#e8e8e8 100%);background-image:-o-linear-gradient(top,#f5f5f5 0,#e8e8e8 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f5f5f5),to(#e8e8e8));background-image:linear-gradient(to bottom,#f5f5f5 0,#e8e8e8 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);background-repeat:repeat-x}.dropdown-menu>.active>a,.dropdown-menu>.active>a:focus,.dropdown-menu>.active>a:hover{background-color:#2e6da4;background-image:-webkit-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-o-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#2e6da4));background-image:linear-gradient(to bottom,#337ab7 0,#2e6da4 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);background-repeat:repeat-x}.navbar-default{background-image:-webkit-linear-gradient(top,#fff 0,#f8f8f8 100%);background-image:-o-linear-gradient(top,#fff 0,#f8f8f8 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#fff),to(#f8f8f8));background-image:linear-gradient(to bottom,#fff 0,#f8f8f8 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff8f8f8', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-radius:4px;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 5px rgba(0,0,0,.075);box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 5px rgba(0,0,0,.075)}.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.open>a{background-image:-webkit-linear-gradient(top,#dbdbdb 0,#e2e2e2 100%);background-image:-o-linear-gradient(top,#dbdbdb 0,#e2e2e2 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#dbdbdb),to(#e2e2e2));background-image:linear-gradient(to bottom,#dbdbdb 0,#e2e2e2 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdbdbdb', endColorstr='#ffe2e2e2', GradientType=0);background-repeat:repeat-x;-webkit-box-shadow:inset 0 3px 9px rgba(0,0,0,.075);box-shadow:inset 0 3px 9px rgba(0,0,0,.075)}.navbar-brand,.navbar-nav>li>a{text-shadow:0 1px 0 rgba(255,255,255,.25)}.navbar-inverse{background-image:-webkit-linear-gradient(top,#3c3c3c 0,#222 100%);background-image:-o-linear-gradient(top,#3c3c3c 0,#222 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#3c3c3c),to(#222));background-image:linear-gradient(to bottom,#3c3c3c 0,#222 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff3c3c3c', endColorstr='#ff222222', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-radius:4px}.navbar-inverse .navbar-nav>.active>a,.navbar-inverse .navbar-nav>.open>a{background-image:-webkit-linear-gradient(top,#080808 0,#0f0f0f 100%);background-image:-o-linear-gradient(top,#080808 0,#0f0f0f 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#080808),to(#0f0f0f));background-image:linear-gradient(to bottom,#080808 0,#0f0f0f 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff080808', endColorstr='#ff0f0f0f', GradientType=0);background-repeat:repeat-x;-webkit-box-shadow:inset 0 3px 9px rgba(0,0,0,.25);box-shadow:inset 0 3px 9px rgba(0,0,0,.25)}.navbar-inverse .navbar-brand,.navbar-inverse .navbar-nav>li>a{text-shadow:0 -1px 0 rgba(0,0,0,.25)}.navbar-fixed-bottom,.navbar-fixed-top,.navbar-static-top{border-radius:0}@media (max-width:767px){.navbar .navbar-nav .open .dropdown-menu>.active>a,.navbar .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar .navbar-nav .open .dropdown-menu>.active>a:hover{color:#fff;background-image:-webkit-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-o-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#2e6da4));background-image:linear-gradient(to bottom,#337ab7 0,#2e6da4 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);background-repeat:repeat-x}}.alert{text-shadow:0 1px 0 rgba(255,255,255,.2);-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 2px rgba(0,0,0,.05);box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 2px rgba(0,0,0,.05)}.alert-success{background-image:-webkit-linear-gradient(top,#dff0d8 0,#c8e5bc 100%);background-image:-o-linear-gradient(top,#dff0d8 0,#c8e5bc 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#dff0d8),to(#c8e5bc));background-image:linear-gradient(to bottom,#dff0d8 0,#c8e5bc 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffc8e5bc', GradientType=0);background-repeat:repeat-x;border-color:#b2dba1}.alert-info{background-image:-webkit-linear-gradient(top,#d9edf7 0,#b9def0 100%);background-image:-o-linear-gradient(top,#d9edf7 0,#b9def0 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#d9edf7),to(#b9def0));background-image:linear-gradient(to bottom,#d9edf7 0,#b9def0 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffb9def0', GradientType=0);background-repeat:repeat-x;border-color:#9acfea}.alert-warning{background-image:-webkit-linear-gradient(top,#fcf8e3 0,#f8efc0 100%);background-image:-o-linear-gradient(top,#fcf8e3 0,#f8efc0 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#fcf8e3),to(#f8efc0));background-image:linear-gradient(to bottom,#fcf8e3 0,#f8efc0 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fff8efc0', GradientType=0);background-repeat:repeat-x;border-color:#f5e79e}.alert-danger{background-image:-webkit-linear-gradient(top,#f2dede 0,#e7c3c3 100%);background-image:-o-linear-gradient(top,#f2dede 0,#e7c3c3 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f2dede),to(#e7c3c3));background-image:linear-gradient(to bottom,#f2dede 0,#e7c3c3 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffe7c3c3', GradientType=0);background-repeat:repeat-x;border-color:#dca7a7}.progress{background-image:-webkit-linear-gradient(top,#ebebeb 0,#f5f5f5 100%);background-image:-o-linear-gradient(top,#ebebeb 0,#f5f5f5 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#ebebeb),to(#f5f5f5));background-image:linear-gradient(to bottom,#ebebeb 0,#f5f5f5 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffebebeb', endColorstr='#fff5f5f5', GradientType=0);background-repeat:repeat-x}.progress-bar{background-image:-webkit-linear-gradient(top,#337ab7 0,#286090 100%);background-image:-o-linear-gradient(top,#337ab7 0,#286090 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#286090));background-image:linear-gradient(to bottom,#337ab7 0,#286090 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff286090', GradientType=0);background-repeat:repeat-x}.progress-bar-success{background-image:-webkit-linear-gradient(top,#5cb85c 0,#449d44 100%);background-image:-o-linear-gradient(top,#5cb85c 0,#449d44 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#5cb85c),to(#449d44));background-image:linear-gradient(to bottom,#5cb85c 0,#449d44 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff449d44', GradientType=0);background-repeat:repeat-x}.progress-bar-info{background-image:-webkit-linear-gradient(top,#5bc0de 0,#31b0d5 100%);background-image:-o-linear-gradient(top,#5bc0de 0,#31b0d5 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#5bc0de),to(#31b0d5));background-image:linear-gradient(to bottom,#5bc0de 0,#31b0d5 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff31b0d5', GradientType=0);background-repeat:repeat-x}.progress-bar-warning{background-image:-webkit-linear-gradient(top,#f0ad4e 0,#ec971f 100%);background-image:-o-linear-gradient(top,#f0ad4e 0,#ec971f 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f0ad4e),to(#ec971f));background-image:linear-gradient(to bottom,#f0ad4e 0,#ec971f 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffec971f', GradientType=0);background-repeat:repeat-x}.progress-bar-danger{background-image:-webkit-linear-gradient(top,#d9534f 0,#c9302c 100%);background-image:-o-linear-gradient(top,#d9534f 0,#c9302c 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#d9534f),to(#c9302c));background-image:linear-gradient(to bottom,#d9534f 0,#c9302c 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc9302c', GradientType=0);background-repeat:repeat-x}.progress-bar-striped{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.list-group{border-radius:4px;-webkit-box-shadow:0 1px 2px rgba(0,0,0,.075);box-shadow:0 1px 2px rgba(0,0,0,.075)}.list-group-item.active,.list-group-item.active:focus,.list-group-item.active:hover{text-shadow:0 -1px 0 #286090;background-image:-webkit-linear-gradient(top,#337ab7 0,#2b669a 100%);background-image:-o-linear-gradient(top,#337ab7 0,#2b669a 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#2b669a));background-image:linear-gradient(to bottom,#337ab7 0,#2b669a 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2b669a', GradientType=0);background-repeat:repeat-x;border-color:#2b669a}.list-group-item.active .badge,.list-group-item.active:focus .badge,.list-group-item.active:hover .badge{text-shadow:none}.panel{-webkit-box-shadow:0 1px 2px rgba(0,0,0,.05);box-shadow:0 1px 2px rgba(0,0,0,.05)}.panel-default>.panel-heading{background-image:-webkit-linear-gradient(top,#f5f5f5 0,#e8e8e8 100%);background-image:-o-linear-gradient(top,#f5f5f5 0,#e8e8e8 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f5f5f5),to(#e8e8e8));background-image:linear-gradient(to bottom,#f5f5f5 0,#e8e8e8 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);background-repeat:repeat-x}.panel-primary>.panel-heading{background-image:-webkit-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-o-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#2e6da4));background-image:linear-gradient(to bottom,#337ab7 0,#2e6da4 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);background-repeat:repeat-x}.panel-success>.panel-heading{background-image:-webkit-linear-gradient(top,#dff0d8 0,#d0e9c6 100%);background-image:-o-linear-gradient(top,#dff0d8 0,#d0e9c6 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#dff0d8),to(#d0e9c6));background-image:linear-gradient(to bottom,#dff0d8 0,#d0e9c6 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffd0e9c6', GradientType=0);background-repeat:repeat-x}.panel-info>.panel-heading{background-image:-webkit-linear-gradient(top,#d9edf7 0,#c4e3f3 100%);background-image:-o-linear-gradient(top,#d9edf7 0,#c4e3f3 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#d9edf7),to(#c4e3f3));background-image:linear-gradient(to bottom,#d9edf7 0,#c4e3f3 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffc4e3f3', GradientType=0);background-repeat:repeat-x}.panel-warning>.panel-heading{background-image:-webkit-linear-gradient(top,#fcf8e3 0,#faf2cc 100%);background-image:-o-linear-gradient(top,#fcf8e3 0,#faf2cc 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#fcf8e3),to(#faf2cc));background-image:linear-gradient(to bottom,#fcf8e3 0,#faf2cc 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fffaf2cc', GradientType=0);background-repeat:repeat-x}.panel-danger>.panel-heading{background-image:-webkit-linear-gradient(top,#f2dede 0,#ebcccc 100%);background-image:-o-linear-gradient(top,#f2dede 0,#ebcccc 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f2dede),to(#ebcccc));background-image:linear-gradient(to bottom,#f2dede 0,#ebcccc 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffebcccc', GradientType=0);background-repeat:repeat-x}.well{background-image:-webkit-linear-gradient(top,#e8e8e8 0,#f5f5f5 100%);background-image:-o-linear-gradient(top,#e8e8e8 0,#f5f5f5 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#e8e8e8),to(#f5f5f5));background-image:linear-gradient(to bottom,#e8e8e8 0,#f5f5f5 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe8e8e8', endColorstr='#fff5f5f5', GradientType=0);background-repeat:repeat-x;border-color:#dcdcdc;-webkit-box-shadow:inset 0 1px 3px rgba(0,0,0,.05),0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 3px rgba(0,0,0,.05),0 1px 0 rgba(255,255,255,.1)}
+/*# sourceMappingURL=bootstrap-theme.min.css.map */
\ No newline at end of file
diff --git a/views/ngXosViews/serviceGrid/src/vendor/bootstrap-css/css/bootstrap-theme.min.css.map b/views/ngXosViews/serviceGrid/src/vendor/bootstrap-css/css/bootstrap-theme.min.css.map
new file mode 100644
index 0000000..2c6b65a
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/bootstrap-css/css/bootstrap-theme.min.css.map
@@ -0,0 +1 @@
+{"version":3,"sources":["less/theme.less","less/mixins/vendor-prefixes.less","less/mixins/gradients.less","less/mixins/reset-filter.less"],"names":[],"mappings":";;;;AAmBA,YAAA,aAAA,UAAA,aAAA,aAAA,aAME,YAAA,EAAA,KAAA,EAAA,eC2CA,mBAAA,MAAA,EAAA,IAAA,EAAA,sBAAA,EAAA,IAAA,IAAA,iBACQ,WAAA,MAAA,EAAA,IAAA,EAAA,sBAAA,EAAA,IAAA,IAAA,iBDvCR,mBAAA,mBAAA,oBAAA,oBAAA,iBAAA,iBAAA,oBAAA,oBAAA,oBAAA,oBAAA,oBAAA,oBCsCA,mBAAA,MAAA,EAAA,IAAA,IAAA,iBACQ,WAAA,MAAA,EAAA,IAAA,IAAA,iBDlCR,qBAAA,sBAAA,sBAAA,uBAAA,mBAAA,oBAAA,sBAAA,uBAAA,sBAAA,uBAAA,sBAAA,uBAAA,+BAAA,gCAAA,6BAAA,gCAAA,gCAAA,gCCiCA,mBAAA,KACQ,WAAA,KDlDV,mBAAA,oBAAA,iBAAA,oBAAA,oBAAA,oBAuBI,YAAA,KAyCF,YAAA,YAEE,iBAAA,KAKJ,aErEI,YAAA,EAAA,IAAA,EAAA,KACA,iBAAA,iDACA,iBAAA,4CAAA,iBAAA,qEAEA,iBAAA,+CCnBF,OAAA,+GH4CA,OAAA,0DACA,kBAAA,SAuC2C,aA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ACA,OAAA,+GACA,kBAAA,SF0PJ,8BE9PI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SF2PJ,2BE/PI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SF4PJ,8BEhQI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SF6PJ,6BEjQI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SFoQJ,MExQI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SFsQF,aAAA,QC3NA,mBAAA,MAAA,EAAA,IAAA,IAAA,gBAAA,EAAA,IAAA,EAAA,qBACQ,WAAA,MAAA,EAAA,IAAA,IAAA,gBAAA,EAAA,IAAA,EAAA"}
\ No newline at end of file
diff --git a/applications/auto-scale/gui/src/vendor/bootstrap-css/css/bootstrap.css b/views/ngXosViews/serviceGrid/src/vendor/bootstrap-css/css/bootstrap.css
similarity index 93%
rename from applications/auto-scale/gui/src/vendor/bootstrap-css/css/bootstrap.css
rename to views/ngXosViews/serviceGrid/src/vendor/bootstrap-css/css/bootstrap.css
index fb15e3d..42c79d6 100644
--- a/applications/auto-scale/gui/src/vendor/bootstrap-css/css/bootstrap.css
+++ b/views/ngXosViews/serviceGrid/src/vendor/bootstrap-css/css/bootstrap.css
@@ -1,10 +1,9 @@
/*!
- * Bootstrap v3.3.4 (http://getbootstrap.com)
+ * Bootstrap v3.3.6 (http://getbootstrap.com)
* Copyright 2011-2015 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
-
-/*! normalize.css v3.0.2 | MIT License | git.io/normalize */
+/*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */
html {
font-family: sans-serif;
-webkit-text-size-adjust: 100%;
@@ -239,9 +238,6 @@
h3 {
page-break-after: avoid;
}
- select {
- background: #fff !important;
- }
.navbar {
display: none;
}
@@ -283,10 +279,10 @@
-moz-osx-font-smoothing: grayscale;
}
.glyphicon-asterisk:before {
- content: "\2a";
+ content: "\002a";
}
.glyphicon-plus:before {
- content: "\2b";
+ content: "\002b";
}
.glyphicon-euro:before,
.glyphicon-eur:before {
@@ -1344,62 +1340,72 @@
.text-primary {
color: #337ab7;
}
-a.text-primary:hover {
+a.text-primary:hover,
+a.text-primary:focus {
color: #286090;
}
.text-success {
color: #3c763d;
}
-a.text-success:hover {
+a.text-success:hover,
+a.text-success:focus {
color: #2b542c;
}
.text-info {
color: #31708f;
}
-a.text-info:hover {
+a.text-info:hover,
+a.text-info:focus {
color: #245269;
}
.text-warning {
color: #8a6d3b;
}
-a.text-warning:hover {
+a.text-warning:hover,
+a.text-warning:focus {
color: #66512c;
}
.text-danger {
color: #a94442;
}
-a.text-danger:hover {
+a.text-danger:hover,
+a.text-danger:focus {
color: #843534;
}
.bg-primary {
color: #fff;
background-color: #337ab7;
}
-a.bg-primary:hover {
+a.bg-primary:hover,
+a.bg-primary:focus {
background-color: #286090;
}
.bg-success {
background-color: #dff0d8;
}
-a.bg-success:hover {
+a.bg-success:hover,
+a.bg-success:focus {
background-color: #c1e2b3;
}
.bg-info {
background-color: #d9edf7;
}
-a.bg-info:hover {
+a.bg-info:hover,
+a.bg-info:focus {
background-color: #afd9ee;
}
.bg-warning {
background-color: #fcf8e3;
}
-a.bg-warning:hover {
+a.bg-warning:hover,
+a.bg-warning:focus {
background-color: #f7ecb5;
}
.bg-danger {
background-color: #f2dede;
}
-a.bg-danger:hover {
+a.bg-danger:hover,
+a.bg-danger:focus {
background-color: #e4b9b9;
}
.page-header {
@@ -2576,6 +2582,10 @@
.form-control::-webkit-input-placeholder {
color: #999;
}
+.form-control::-ms-expand {
+ background-color: transparent;
+ border: 0;
+}
.form-control[disabled],
.form-control[readonly],
fieldset[disabled] .form-control {
@@ -2593,10 +2603,10 @@
-webkit-appearance: none;
}
@media screen and (-webkit-min-device-pixel-ratio: 0) {
- input[type="date"],
- input[type="time"],
- input[type="datetime-local"],
- input[type="month"] {
+ input[type="date"].form-control,
+ input[type="time"].form-control,
+ input[type="datetime-local"].form-control,
+ input[type="month"].form-control {
line-height: 34px;
}
input[type="date"].input-sm,
@@ -2718,18 +2728,18 @@
line-height: 1.5;
border-radius: 3px;
}
-select.form-group-sm .form-control {
+.form-group-sm select.form-control {
height: 30px;
line-height: 30px;
}
-textarea.form-group-sm .form-control,
-select[multiple].form-group-sm .form-control {
+.form-group-sm textarea.form-control,
+.form-group-sm select[multiple].form-control {
height: auto;
}
.form-group-sm .form-control-static {
height: 30px;
min-height: 32px;
- padding: 5px 10px;
+ padding: 6px 10px;
font-size: 12px;
line-height: 1.5;
}
@@ -2755,18 +2765,18 @@
line-height: 1.3333333;
border-radius: 6px;
}
-select.form-group-lg .form-control {
+.form-group-lg select.form-control {
height: 46px;
line-height: 46px;
}
-textarea.form-group-lg .form-control,
-select[multiple].form-group-lg .form-control {
+.form-group-lg textarea.form-control,
+.form-group-lg select[multiple].form-control {
height: auto;
}
.form-group-lg .form-control-static {
height: 46px;
min-height: 38px;
- padding: 10px 16px;
+ padding: 11px 16px;
font-size: 18px;
line-height: 1.3333333;
}
@@ -2788,12 +2798,16 @@
text-align: center;
pointer-events: none;
}
-.input-lg + .form-control-feedback {
+.input-lg + .form-control-feedback,
+.input-group-lg + .form-control-feedback,
+.form-group-lg .form-control + .form-control-feedback {
width: 46px;
height: 46px;
line-height: 46px;
}
-.input-sm + .form-control-feedback {
+.input-sm + .form-control-feedback,
+.input-group-sm + .form-control-feedback,
+.form-group-sm .form-control + .form-control-feedback {
width: 30px;
height: 30px;
line-height: 30px;
@@ -2978,12 +2992,14 @@
}
@media (min-width: 768px) {
.form-horizontal .form-group-lg .control-label {
- padding-top: 14.333333px;
+ padding-top: 11px;
+ font-size: 18px;
}
}
@media (min-width: 768px) {
.form-horizontal .form-group-sm .control-label {
padding-top: 6px;
+ font-size: 12px;
}
}
.btn {
@@ -3033,24 +3049,28 @@
.btn.disabled,
.btn[disabled],
fieldset[disabled] .btn {
- pointer-events: none;
cursor: not-allowed;
filter: alpha(opacity=65);
-webkit-box-shadow: none;
box-shadow: none;
opacity: .65;
}
+a.btn.disabled,
+fieldset[disabled] a.btn {
+ pointer-events: none;
+}
.btn-default {
color: #333;
background-color: #fff;
border-color: #ccc;
}
-.btn-default:hover,
.btn-default:focus,
-.btn-default.focus,
-.btn-default:active,
-.btn-default.active,
-.open > .dropdown-toggle.btn-default {
+.btn-default.focus {
+ color: #333;
+ background-color: #e6e6e6;
+ border-color: #8c8c8c;
+}
+.btn-default:hover {
color: #333;
background-color: #e6e6e6;
border-color: #adadad;
@@ -3058,11 +3078,28 @@
.btn-default:active,
.btn-default.active,
.open > .dropdown-toggle.btn-default {
+ color: #333;
+ background-color: #e6e6e6;
+ border-color: #adadad;
+}
+.btn-default:active:hover,
+.btn-default.active:hover,
+.open > .dropdown-toggle.btn-default:hover,
+.btn-default:active:focus,
+.btn-default.active:focus,
+.open > .dropdown-toggle.btn-default:focus,
+.btn-default:active.focus,
+.btn-default.active.focus,
+.open > .dropdown-toggle.btn-default.focus {
+ color: #333;
+ background-color: #d4d4d4;
+ border-color: #8c8c8c;
+}
+.btn-default:active,
+.btn-default.active,
+.open > .dropdown-toggle.btn-default {
background-image: none;
}
-.btn-default.disabled,
-.btn-default[disabled],
-fieldset[disabled] .btn-default,
.btn-default.disabled:hover,
.btn-default[disabled]:hover,
fieldset[disabled] .btn-default:hover,
@@ -3071,13 +3108,7 @@
fieldset[disabled] .btn-default:focus,
.btn-default.disabled.focus,
.btn-default[disabled].focus,
-fieldset[disabled] .btn-default.focus,
-.btn-default.disabled:active,
-.btn-default[disabled]:active,
-fieldset[disabled] .btn-default:active,
-.btn-default.disabled.active,
-.btn-default[disabled].active,
-fieldset[disabled] .btn-default.active {
+fieldset[disabled] .btn-default.focus {
background-color: #fff;
border-color: #ccc;
}
@@ -3090,12 +3121,13 @@
background-color: #337ab7;
border-color: #2e6da4;
}
-.btn-primary:hover,
.btn-primary:focus,
-.btn-primary.focus,
-.btn-primary:active,
-.btn-primary.active,
-.open > .dropdown-toggle.btn-primary {
+.btn-primary.focus {
+ color: #fff;
+ background-color: #286090;
+ border-color: #122b40;
+}
+.btn-primary:hover {
color: #fff;
background-color: #286090;
border-color: #204d74;
@@ -3103,11 +3135,28 @@
.btn-primary:active,
.btn-primary.active,
.open > .dropdown-toggle.btn-primary {
+ color: #fff;
+ background-color: #286090;
+ border-color: #204d74;
+}
+.btn-primary:active:hover,
+.btn-primary.active:hover,
+.open > .dropdown-toggle.btn-primary:hover,
+.btn-primary:active:focus,
+.btn-primary.active:focus,
+.open > .dropdown-toggle.btn-primary:focus,
+.btn-primary:active.focus,
+.btn-primary.active.focus,
+.open > .dropdown-toggle.btn-primary.focus {
+ color: #fff;
+ background-color: #204d74;
+ border-color: #122b40;
+}
+.btn-primary:active,
+.btn-primary.active,
+.open > .dropdown-toggle.btn-primary {
background-image: none;
}
-.btn-primary.disabled,
-.btn-primary[disabled],
-fieldset[disabled] .btn-primary,
.btn-primary.disabled:hover,
.btn-primary[disabled]:hover,
fieldset[disabled] .btn-primary:hover,
@@ -3116,13 +3165,7 @@
fieldset[disabled] .btn-primary:focus,
.btn-primary.disabled.focus,
.btn-primary[disabled].focus,
-fieldset[disabled] .btn-primary.focus,
-.btn-primary.disabled:active,
-.btn-primary[disabled]:active,
-fieldset[disabled] .btn-primary:active,
-.btn-primary.disabled.active,
-.btn-primary[disabled].active,
-fieldset[disabled] .btn-primary.active {
+fieldset[disabled] .btn-primary.focus {
background-color: #337ab7;
border-color: #2e6da4;
}
@@ -3135,12 +3178,13 @@
background-color: #5cb85c;
border-color: #4cae4c;
}
-.btn-success:hover,
.btn-success:focus,
-.btn-success.focus,
-.btn-success:active,
-.btn-success.active,
-.open > .dropdown-toggle.btn-success {
+.btn-success.focus {
+ color: #fff;
+ background-color: #449d44;
+ border-color: #255625;
+}
+.btn-success:hover {
color: #fff;
background-color: #449d44;
border-color: #398439;
@@ -3148,11 +3192,28 @@
.btn-success:active,
.btn-success.active,
.open > .dropdown-toggle.btn-success {
+ color: #fff;
+ background-color: #449d44;
+ border-color: #398439;
+}
+.btn-success:active:hover,
+.btn-success.active:hover,
+.open > .dropdown-toggle.btn-success:hover,
+.btn-success:active:focus,
+.btn-success.active:focus,
+.open > .dropdown-toggle.btn-success:focus,
+.btn-success:active.focus,
+.btn-success.active.focus,
+.open > .dropdown-toggle.btn-success.focus {
+ color: #fff;
+ background-color: #398439;
+ border-color: #255625;
+}
+.btn-success:active,
+.btn-success.active,
+.open > .dropdown-toggle.btn-success {
background-image: none;
}
-.btn-success.disabled,
-.btn-success[disabled],
-fieldset[disabled] .btn-success,
.btn-success.disabled:hover,
.btn-success[disabled]:hover,
fieldset[disabled] .btn-success:hover,
@@ -3161,13 +3222,7 @@
fieldset[disabled] .btn-success:focus,
.btn-success.disabled.focus,
.btn-success[disabled].focus,
-fieldset[disabled] .btn-success.focus,
-.btn-success.disabled:active,
-.btn-success[disabled]:active,
-fieldset[disabled] .btn-success:active,
-.btn-success.disabled.active,
-.btn-success[disabled].active,
-fieldset[disabled] .btn-success.active {
+fieldset[disabled] .btn-success.focus {
background-color: #5cb85c;
border-color: #4cae4c;
}
@@ -3180,12 +3235,13 @@
background-color: #5bc0de;
border-color: #46b8da;
}
-.btn-info:hover,
.btn-info:focus,
-.btn-info.focus,
-.btn-info:active,
-.btn-info.active,
-.open > .dropdown-toggle.btn-info {
+.btn-info.focus {
+ color: #fff;
+ background-color: #31b0d5;
+ border-color: #1b6d85;
+}
+.btn-info:hover {
color: #fff;
background-color: #31b0d5;
border-color: #269abc;
@@ -3193,11 +3249,28 @@
.btn-info:active,
.btn-info.active,
.open > .dropdown-toggle.btn-info {
+ color: #fff;
+ background-color: #31b0d5;
+ border-color: #269abc;
+}
+.btn-info:active:hover,
+.btn-info.active:hover,
+.open > .dropdown-toggle.btn-info:hover,
+.btn-info:active:focus,
+.btn-info.active:focus,
+.open > .dropdown-toggle.btn-info:focus,
+.btn-info:active.focus,
+.btn-info.active.focus,
+.open > .dropdown-toggle.btn-info.focus {
+ color: #fff;
+ background-color: #269abc;
+ border-color: #1b6d85;
+}
+.btn-info:active,
+.btn-info.active,
+.open > .dropdown-toggle.btn-info {
background-image: none;
}
-.btn-info.disabled,
-.btn-info[disabled],
-fieldset[disabled] .btn-info,
.btn-info.disabled:hover,
.btn-info[disabled]:hover,
fieldset[disabled] .btn-info:hover,
@@ -3206,13 +3279,7 @@
fieldset[disabled] .btn-info:focus,
.btn-info.disabled.focus,
.btn-info[disabled].focus,
-fieldset[disabled] .btn-info.focus,
-.btn-info.disabled:active,
-.btn-info[disabled]:active,
-fieldset[disabled] .btn-info:active,
-.btn-info.disabled.active,
-.btn-info[disabled].active,
-fieldset[disabled] .btn-info.active {
+fieldset[disabled] .btn-info.focus {
background-color: #5bc0de;
border-color: #46b8da;
}
@@ -3225,12 +3292,13 @@
background-color: #f0ad4e;
border-color: #eea236;
}
-.btn-warning:hover,
.btn-warning:focus,
-.btn-warning.focus,
-.btn-warning:active,
-.btn-warning.active,
-.open > .dropdown-toggle.btn-warning {
+.btn-warning.focus {
+ color: #fff;
+ background-color: #ec971f;
+ border-color: #985f0d;
+}
+.btn-warning:hover {
color: #fff;
background-color: #ec971f;
border-color: #d58512;
@@ -3238,11 +3306,28 @@
.btn-warning:active,
.btn-warning.active,
.open > .dropdown-toggle.btn-warning {
+ color: #fff;
+ background-color: #ec971f;
+ border-color: #d58512;
+}
+.btn-warning:active:hover,
+.btn-warning.active:hover,
+.open > .dropdown-toggle.btn-warning:hover,
+.btn-warning:active:focus,
+.btn-warning.active:focus,
+.open > .dropdown-toggle.btn-warning:focus,
+.btn-warning:active.focus,
+.btn-warning.active.focus,
+.open > .dropdown-toggle.btn-warning.focus {
+ color: #fff;
+ background-color: #d58512;
+ border-color: #985f0d;
+}
+.btn-warning:active,
+.btn-warning.active,
+.open > .dropdown-toggle.btn-warning {
background-image: none;
}
-.btn-warning.disabled,
-.btn-warning[disabled],
-fieldset[disabled] .btn-warning,
.btn-warning.disabled:hover,
.btn-warning[disabled]:hover,
fieldset[disabled] .btn-warning:hover,
@@ -3251,13 +3336,7 @@
fieldset[disabled] .btn-warning:focus,
.btn-warning.disabled.focus,
.btn-warning[disabled].focus,
-fieldset[disabled] .btn-warning.focus,
-.btn-warning.disabled:active,
-.btn-warning[disabled]:active,
-fieldset[disabled] .btn-warning:active,
-.btn-warning.disabled.active,
-.btn-warning[disabled].active,
-fieldset[disabled] .btn-warning.active {
+fieldset[disabled] .btn-warning.focus {
background-color: #f0ad4e;
border-color: #eea236;
}
@@ -3270,12 +3349,13 @@
background-color: #d9534f;
border-color: #d43f3a;
}
-.btn-danger:hover,
.btn-danger:focus,
-.btn-danger.focus,
-.btn-danger:active,
-.btn-danger.active,
-.open > .dropdown-toggle.btn-danger {
+.btn-danger.focus {
+ color: #fff;
+ background-color: #c9302c;
+ border-color: #761c19;
+}
+.btn-danger:hover {
color: #fff;
background-color: #c9302c;
border-color: #ac2925;
@@ -3283,11 +3363,28 @@
.btn-danger:active,
.btn-danger.active,
.open > .dropdown-toggle.btn-danger {
+ color: #fff;
+ background-color: #c9302c;
+ border-color: #ac2925;
+}
+.btn-danger:active:hover,
+.btn-danger.active:hover,
+.open > .dropdown-toggle.btn-danger:hover,
+.btn-danger:active:focus,
+.btn-danger.active:focus,
+.open > .dropdown-toggle.btn-danger:focus,
+.btn-danger:active.focus,
+.btn-danger.active.focus,
+.open > .dropdown-toggle.btn-danger.focus {
+ color: #fff;
+ background-color: #ac2925;
+ border-color: #761c19;
+}
+.btn-danger:active,
+.btn-danger.active,
+.open > .dropdown-toggle.btn-danger {
background-image: none;
}
-.btn-danger.disabled,
-.btn-danger[disabled],
-fieldset[disabled] .btn-danger,
.btn-danger.disabled:hover,
.btn-danger[disabled]:hover,
fieldset[disabled] .btn-danger:hover,
@@ -3296,13 +3393,7 @@
fieldset[disabled] .btn-danger:focus,
.btn-danger.disabled.focus,
.btn-danger[disabled].focus,
-fieldset[disabled] .btn-danger.focus,
-.btn-danger.disabled:active,
-.btn-danger[disabled]:active,
-fieldset[disabled] .btn-danger:active,
-.btn-danger.disabled.active,
-.btn-danger[disabled].active,
-fieldset[disabled] .btn-danger.active {
+fieldset[disabled] .btn-danger.focus {
background-color: #d9534f;
border-color: #d43f3a;
}
@@ -3418,6 +3509,7 @@
margin-left: 2px;
vertical-align: middle;
border-top: 4px dashed;
+ border-top: 4px solid \9;
border-right: 4px solid transparent;
border-left: 4px solid transparent;
}
@@ -3534,7 +3626,8 @@
.navbar-fixed-bottom .dropdown .caret {
content: "";
border-top: 0;
- border-bottom: 4px solid;
+ border-bottom: 4px dashed;
+ border-bottom: 4px solid \9;
}
.dropup .dropdown-menu,
.navbar-fixed-bottom .dropdown .dropdown-menu {
@@ -3582,6 +3675,7 @@
.btn-toolbar {
margin-left: -5px;
}
+.btn-toolbar .btn,
.btn-toolbar .btn-group,
.btn-toolbar .input-group {
float: left;
@@ -3673,6 +3767,7 @@
border-radius: 0;
}
.btn-group-vertical > .btn:first-child:not(:last-child) {
+ border-top-left-radius: 4px;
border-top-right-radius: 4px;
border-bottom-right-radius: 0;
border-bottom-left-radius: 0;
@@ -3680,6 +3775,7 @@
.btn-group-vertical > .btn:last-child:not(:first-child) {
border-top-left-radius: 0;
border-top-right-radius: 0;
+ border-bottom-right-radius: 4px;
border-bottom-left-radius: 4px;
}
.btn-group-vertical > .btn-group:not(:first-child):not(:last-child) > .btn {
@@ -3737,6 +3833,9 @@
width: 100%;
margin-bottom: 0;
}
+.input-group .form-control:focus {
+ z-index: 3;
+}
.input-group-lg > .form-control,
.input-group-lg > .input-group-addon,
.input-group-lg > .input-group-btn > .btn {
@@ -3872,6 +3971,7 @@
}
.input-group-btn:last-child > .btn,
.input-group-btn:last-child > .btn-group {
+ z-index: 2;
margin-left: -1px;
}
.nav {
@@ -4647,6 +4747,7 @@
.pagination > li > span:hover,
.pagination > li > a:focus,
.pagination > li > span:focus {
+ z-index: 2;
color: #23527c;
background-color: #eee;
border-color: #ddd;
@@ -4657,7 +4758,7 @@
.pagination > .active > span:hover,
.pagination > .active > a:focus,
.pagination > .active > span:focus {
- z-index: 2;
+ z-index: 3;
color: #fff;
cursor: default;
background-color: #337ab7;
@@ -4678,6 +4779,7 @@
.pagination-lg > li > span {
padding: 10px 16px;
font-size: 18px;
+ line-height: 1.3333333;
}
.pagination-lg > li:first-child > a,
.pagination-lg > li:first-child > span {
@@ -4693,6 +4795,7 @@
.pagination-sm > li > span {
padding: 5px 10px;
font-size: 12px;
+ line-height: 1.5;
}
.pagination-sm > li:first-child > a,
.pagination-sm > li:first-child > span {
@@ -4819,7 +4922,7 @@
color: #fff;
text-align: center;
white-space: nowrap;
- vertical-align: baseline;
+ vertical-align: middle;
background-color: #777;
border-radius: 10px;
}
@@ -4856,7 +4959,8 @@
margin-left: 3px;
}
.jumbotron {
- padding: 30px 15px;
+ padding-top: 30px;
+ padding-bottom: 30px;
margin-bottom: 30px;
color: inherit;
background-color: #eee;
@@ -4875,6 +4979,8 @@
}
.container .jumbotron,
.container-fluid .jumbotron {
+ padding-right: 15px;
+ padding-left: 15px;
border-radius: 6px;
}
.jumbotron .container {
@@ -4882,7 +4988,8 @@
}
@media screen and (min-width: 768px) {
.jumbotron {
- padding: 48px 0;
+ padding-top: 48px;
+ padding-bottom: 48px;
}
.container .jumbotron,
.container-fluid .jumbotron {
@@ -5106,6 +5213,9 @@
.media-object {
display: block;
}
+.media-object.img-thumbnail {
+ max-width: none;
+}
.media-right,
.media > .pull-right {
padding-left: 10px;
@@ -5155,18 +5265,26 @@
border-bottom-right-radius: 4px;
border-bottom-left-radius: 4px;
}
-a.list-group-item {
+a.list-group-item,
+button.list-group-item {
color: #555;
}
-a.list-group-item .list-group-item-heading {
+a.list-group-item .list-group-item-heading,
+button.list-group-item .list-group-item-heading {
color: #333;
}
a.list-group-item:hover,
-a.list-group-item:focus {
+button.list-group-item:hover,
+a.list-group-item:focus,
+button.list-group-item:focus {
color: #555;
text-decoration: none;
background-color: #f5f5f5;
}
+button.list-group-item {
+ width: 100%;
+ text-align: left;
+}
.list-group-item.disabled,
.list-group-item.disabled:hover,
.list-group-item.disabled:focus {
@@ -5212,20 +5330,27 @@
color: #3c763d;
background-color: #dff0d8;
}
-a.list-group-item-success {
+a.list-group-item-success,
+button.list-group-item-success {
color: #3c763d;
}
-a.list-group-item-success .list-group-item-heading {
+a.list-group-item-success .list-group-item-heading,
+button.list-group-item-success .list-group-item-heading {
color: inherit;
}
a.list-group-item-success:hover,
-a.list-group-item-success:focus {
+button.list-group-item-success:hover,
+a.list-group-item-success:focus,
+button.list-group-item-success:focus {
color: #3c763d;
background-color: #d0e9c6;
}
a.list-group-item-success.active,
+button.list-group-item-success.active,
a.list-group-item-success.active:hover,
-a.list-group-item-success.active:focus {
+button.list-group-item-success.active:hover,
+a.list-group-item-success.active:focus,
+button.list-group-item-success.active:focus {
color: #fff;
background-color: #3c763d;
border-color: #3c763d;
@@ -5234,20 +5359,27 @@
color: #31708f;
background-color: #d9edf7;
}
-a.list-group-item-info {
+a.list-group-item-info,
+button.list-group-item-info {
color: #31708f;
}
-a.list-group-item-info .list-group-item-heading {
+a.list-group-item-info .list-group-item-heading,
+button.list-group-item-info .list-group-item-heading {
color: inherit;
}
a.list-group-item-info:hover,
-a.list-group-item-info:focus {
+button.list-group-item-info:hover,
+a.list-group-item-info:focus,
+button.list-group-item-info:focus {
color: #31708f;
background-color: #c4e3f3;
}
a.list-group-item-info.active,
+button.list-group-item-info.active,
a.list-group-item-info.active:hover,
-a.list-group-item-info.active:focus {
+button.list-group-item-info.active:hover,
+a.list-group-item-info.active:focus,
+button.list-group-item-info.active:focus {
color: #fff;
background-color: #31708f;
border-color: #31708f;
@@ -5256,20 +5388,27 @@
color: #8a6d3b;
background-color: #fcf8e3;
}
-a.list-group-item-warning {
+a.list-group-item-warning,
+button.list-group-item-warning {
color: #8a6d3b;
}
-a.list-group-item-warning .list-group-item-heading {
+a.list-group-item-warning .list-group-item-heading,
+button.list-group-item-warning .list-group-item-heading {
color: inherit;
}
a.list-group-item-warning:hover,
-a.list-group-item-warning:focus {
+button.list-group-item-warning:hover,
+a.list-group-item-warning:focus,
+button.list-group-item-warning:focus {
color: #8a6d3b;
background-color: #faf2cc;
}
a.list-group-item-warning.active,
+button.list-group-item-warning.active,
a.list-group-item-warning.active:hover,
-a.list-group-item-warning.active:focus {
+button.list-group-item-warning.active:hover,
+a.list-group-item-warning.active:focus,
+button.list-group-item-warning.active:focus {
color: #fff;
background-color: #8a6d3b;
border-color: #8a6d3b;
@@ -5278,20 +5417,27 @@
color: #a94442;
background-color: #f2dede;
}
-a.list-group-item-danger {
+a.list-group-item-danger,
+button.list-group-item-danger {
color: #a94442;
}
-a.list-group-item-danger .list-group-item-heading {
+a.list-group-item-danger .list-group-item-heading,
+button.list-group-item-danger .list-group-item-heading {
color: inherit;
}
a.list-group-item-danger:hover,
-a.list-group-item-danger:focus {
+button.list-group-item-danger:hover,
+a.list-group-item-danger:focus,
+button.list-group-item-danger:focus {
color: #a94442;
background-color: #ebcccc;
}
a.list-group-item-danger.active,
+button.list-group-item-danger.active,
a.list-group-item-danger.active:hover,
-a.list-group-item-danger.active:focus {
+button.list-group-item-danger.active:hover,
+a.list-group-item-danger.active:focus,
+button.list-group-item-danger.active:focus {
color: #fff;
background-color: #a94442;
border-color: #a94442;
@@ -5365,6 +5511,10 @@
border-bottom-right-radius: 3px;
border-bottom-left-radius: 3px;
}
+.panel > .panel-heading + .panel-collapse > .list-group .list-group-item:first-child {
+ border-top-left-radius: 0;
+ border-top-right-radius: 0;
+}
.panel-heading + .list-group .list-group-item:first-child {
border-top-width: 0;
}
@@ -5785,7 +5935,6 @@
opacity: .5;
}
.modal-header {
- min-height: 16.42857143px;
padding: 15px;
border-bottom: 1px solid #e5e5e5;
}
@@ -5846,10 +5995,23 @@
display: block;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 12px;
+ font-style: normal;
font-weight: normal;
- line-height: 1.4;
+ line-height: 1.42857143;
+ text-align: left;
+ text-align: start;
+ text-decoration: none;
+ text-shadow: none;
+ text-transform: none;
+ letter-spacing: normal;
+ word-break: normal;
+ word-spacing: normal;
+ word-wrap: normal;
+ white-space: normal;
filter: alpha(opacity=0);
opacity: 0;
+
+ line-break: auto;
}
.tooltip.in {
filter: alpha(opacity=90);
@@ -5876,7 +6038,6 @@
padding: 3px 8px;
color: #fff;
text-align: center;
- text-decoration: none;
background-color: #000;
border-radius: 4px;
}
@@ -5953,9 +6114,18 @@
padding: 1px;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 14px;
+ font-style: normal;
font-weight: normal;
line-height: 1.42857143;
text-align: left;
+ text-align: start;
+ text-decoration: none;
+ text-shadow: none;
+ text-transform: none;
+ letter-spacing: normal;
+ word-break: normal;
+ word-spacing: normal;
+ word-wrap: normal;
white-space: normal;
background-color: #fff;
-webkit-background-clip: padding-box;
@@ -5965,6 +6135,8 @@
border-radius: 6px;
-webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, .2);
box-shadow: 0 5px 10px rgba(0, 0, 0, .2);
+
+ line-break: auto;
}
.popover.top {
margin-top: -10px;
@@ -6092,8 +6264,8 @@
-webkit-backface-visibility: hidden;
backface-visibility: hidden;
- -webkit-perspective: 1000;
- perspective: 1000;
+ -webkit-perspective: 1000px;
+ perspective: 1000px;
}
.carousel-inner > .item.next,
.carousel-inner > .item.active.right {
@@ -6155,6 +6327,7 @@
color: #fff;
text-align: center;
text-shadow: 0 1px 2px rgba(0, 0, 0, .6);
+ background-color: rgba(0, 0, 0, 0);
filter: alpha(opacity=50);
opacity: .5;
}
@@ -6192,6 +6365,7 @@
top: 50%;
z-index: 5;
display: inline-block;
+ margin-top: -10px;
}
.carousel-control .icon-prev,
.carousel-control .glyphicon-chevron-left {
@@ -6207,7 +6381,6 @@
.carousel-control .icon-next {
width: 20px;
height: 20px;
- margin-top: -10px;
font-family: serif;
line-height: 1;
}
@@ -6268,16 +6441,16 @@
.carousel-control .icon-next {
width: 30px;
height: 30px;
- margin-top: -15px;
+ margin-top: -10px;
font-size: 30px;
}
.carousel-control .glyphicon-chevron-left,
.carousel-control .icon-prev {
- margin-left: -15px;
+ margin-left: -10px;
}
.carousel-control .glyphicon-chevron-right,
.carousel-control .icon-next {
- margin-right: -15px;
+ margin-right: -10px;
}
.carousel-caption {
right: 20%;
@@ -6316,6 +6489,8 @@
.pager:after,
.panel-body:before,
.panel-body:after,
+.modal-header:before,
+.modal-header:after,
.modal-footer:before,
.modal-footer:after {
display: table;
@@ -6335,6 +6510,7 @@
.navbar-collapse:after,
.pager:after,
.panel-body:after,
+.modal-header:after,
.modal-footer:after {
clear: both;
}
@@ -6399,7 +6575,7 @@
display: block !important;
}
table.visible-xs {
- display: table;
+ display: table !important;
}
tr.visible-xs {
display: table-row !important;
@@ -6429,7 +6605,7 @@
display: block !important;
}
table.visible-sm {
- display: table;
+ display: table !important;
}
tr.visible-sm {
display: table-row !important;
@@ -6459,7 +6635,7 @@
display: block !important;
}
table.visible-md {
- display: table;
+ display: table !important;
}
tr.visible-md {
display: table-row !important;
@@ -6489,7 +6665,7 @@
display: block !important;
}
table.visible-lg {
- display: table;
+ display: table !important;
}
tr.visible-lg {
display: table-row !important;
@@ -6542,7 +6718,7 @@
display: block !important;
}
table.visible-print {
- display: table;
+ display: table !important;
}
tr.visible-print {
display: table-row !important;
diff --git a/views/ngXosViews/serviceGrid/src/vendor/bootstrap-css/css/bootstrap.css.map b/views/ngXosViews/serviceGrid/src/vendor/bootstrap-css/css/bootstrap.css.map
new file mode 100644
index 0000000..09f8cda
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/bootstrap-css/css/bootstrap.css.map
@@ -0,0 +1 @@
+{"version":3,"sources":["bootstrap.css","less/normalize.less","less/print.less","less/glyphicons.less","less/scaffolding.less","less/mixins/vendor-prefixes.less","less/mixins/tab-focus.less","less/mixins/image.less","less/type.less","less/mixins/text-emphasis.less","less/mixins/background-variant.less","less/mixins/text-overflow.less","less/code.less","less/grid.less","less/mixins/grid.less","less/mixins/grid-framework.less","less/tables.less","less/mixins/table-row.less","less/forms.less","less/mixins/forms.less","less/buttons.less","less/mixins/buttons.less","less/mixins/opacity.less","less/component-animations.less","less/dropdowns.less","less/mixins/nav-divider.less","less/mixins/reset-filter.less","less/button-groups.less","less/mixins/border-radius.less","less/input-groups.less","less/navs.less","less/navbar.less","less/mixins/nav-vertical-align.less","less/utilities.less","less/breadcrumbs.less","less/pagination.less","less/mixins/pagination.less","less/pager.less","less/labels.less","less/mixins/labels.less","less/badges.less","less/jumbotron.less","less/thumbnails.less","less/alerts.less","less/mixins/alerts.less","less/progress-bars.less","less/mixins/gradients.less","less/mixins/progress-bar.less","less/media.less","less/list-group.less","less/mixins/list-group.less","less/panels.less","less/mixins/panels.less","less/responsive-embed.less","less/wells.less","less/close.less","less/modals.less","less/tooltip.less","less/mixins/reset-text.less","less/popovers.less","less/carousel.less","less/mixins/clearfix.less","less/mixins/center-block.less","less/mixins/hide-text.less","less/responsive-utilities.less","less/mixins/responsive-visibility.less"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,4EAA4E;ACG5E;EACE,wBAAA;EACA,2BAAA;EACA,+BAAA;CDDD;ACQD;EACE,UAAA;CDND;ACmBD;;;;;;;;;;;;;EAaE,eAAA;CDjBD;ACyBD;;;;EAIE,sBAAA;EACA,yBAAA;CDvBD;AC+BD;EACE,cAAA;EACA,UAAA;CD7BD;ACqCD;;EAEE,cAAA;CDnCD;AC6CD;EACE,8BAAA;CD3CD;ACmDD;;EAEE,WAAA;CDjDD;AC2DD;EACE,0BAAA;CDzDD;ACgED;;EAEE,kBAAA;CD9DD;ACqED;EACE,mBAAA;CDnED;AC2ED;EACE,eAAA;EACA,iBAAA;CDzED;ACgFD;EACE,iBAAA;EACA,YAA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9jED;IACE,mBAAA;GfgkED;EejkED;IACE,mBAAA;GfmkED;EepkED;IACE,UAAA;GfskED;EevkED;IACE,mBAAA;GfykED;Ee1kED;IACE,mBAAA;Gf4kED;Ee7kED;IACE,UAAA;Gf+kED;EehlED;IACE,mBAAA;GfklED;EenlED;IACE,mBAAA;GfqlED;EetlED;IACE,UAAA;GfwlED;EezlED;IACE,mBAAA;Gf2lED;Ee5lED;IACE,kBAAA;Gf8lED;Ee1lED;IACE,WAAA;Gf4lED;Ee9kED;IACE,kBAAA;GfglED;EejlED;IACE,0BAAA;GfmlED;EeplED;IACE,0BAAA;GfslED;EevlED;IACE,iBAAA;GfylED;Ee1lED;IACE,0BAAA;Gf4lED;Ee7lED;IACE,0BAAA;Gf+lED;EehmED;IACE,iBAAA;GfkmED;EenmED;IACE,0BAAA;GfqmED;EetmED;IACE,0BAAA;GfwmED;EezmED;IACE,iBAAA;Gf2mED;Ee5mED;IACE,0BAAA;Gf8mED;Ee/mED;IACE,yBAAA;GfinED;EelnED;IACE,gBAAA;GfonED;CACF;AgBxrED;EACE,8BAAA;ChB0rED;AgBxrED;EACE,iBAAA;EACA,oBAAA;EACA,eAAA;EACA,iBAAA;ChB0rED;AgBxrED;EACE,iBAAA;ChB0rED;AgBprED;EACE,YAAA;EACA,gBAAA;EACA,oBAAA;ChBsrED;AgBzrED;;;;;;EAWQ,aAAA;EACA,wBAAA;EACA,oBAAA;EACA,2BAAA;ChBsrEP;AgBpsED;EAoBI,uBAAA;EACA,8BAAA;ChBmrEH;AgBxsED;;;;;;EA8BQ,cAAA;ChBkrEP;AgBhtED;EAoCI,2BAAA;ChB+qEH;AgBntED;EAyCI,uBAAA;ChB6qEH;AgBtqED;;;;;;EAOQ,aAAA;ChBuqEP;AgB5pED;EACE,uBAAA;ChB8pED;AgB/pED;;;;;;EAQQ,uBAAA;ChB+pEP;AgBvqED;;EAeM,yBAAA;ChB4pEL;AgBlpED;EAEI,0BAAA;ChBmpEH;AgB1oED;EAEI,0BA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;GjE28MT;CACF;AgEj3MD;EA8FA;IAhGI,0BAAA;GhEu3MD;CACF;AgEj3MD;EAyFA;IA3FI,2BAAA;GhEu3MD;CACF;AgEj3MD;EAoFA;IAtFI,iCAAA;GhEu3MD;CACF;AgEh3MD;EA8EA;IC7LE,0BAAA;GjEm+MC;EiEl+MD;IAAU,0BAAA;GjEq+MT;EiEp+MD;IAAU,8BAAA;GjEu+MT;EiEt+MD;;IACU,+BAAA;GjEy+MT;CACF;AgE13MD;EAyEA;IA3EI,0BAAA;GhEg4MD;CACF;AgE13MD;EAoEA;IAtEI,2BAAA;GhEg4MD;CACF;AgE13MD;EA+DA;IAjEI,iCAAA;GhEg4MD;CACF;AgEz3MD;EAyDA;ICrLE,yBAAA;GjEy/MC;CACF;AgEz3MD;EAoDA;ICrLE,yBAAA;GjE8/MC;CACF;AgEz3MD;EA+CA;ICrLE,yBAAA;GjEmgNC;CACF;AgEz3MD;EA0CA;ICrLE,yBAAA;GjEwgNC;CACF;AgEt3MD;ECnJE,yBAAA;CjE4gND;AgEn3MD;EA4BA;IC7LE,0BAAA;GjEwhNC;EiEvhND;IAAU,0BAAA;GjE0hNT;EiEzhND;IAAU,8BAAA;GjE4hNT;EiE3hND;;IACU,+BAAA;GjE8hNT;CACF;AgEj4MD;EACE,yBAAA;ChEm4MD;AgE93MD;EAqBA;IAvBI,0BAAA;GhEo4MD;CACF;AgEl4MD;EACE,yBAAA;ChEo4MD;AgE/3MD;EAcA;IAhBI,2BAAA;GhEq4MD;CACF;AgEn4MD;EACE,yBAAA;ChEq4MD;AgEh4MD;EAOA;IATI,iCAAA;GhEs4MD;CACF;AgE/3MD;EACA;ICrLE,yBAAA;GjEujNC;CACF","file":"bootstrap.css","sourcesContent":["/*!\n * Bootstrap v3.3.6 (http://getbootstrap.com)\n * Copyright 2011-2015 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n */\n/*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */\nhtml {\n font-family: sans-serif;\n -ms-text-size-adjust: 100%;\n -webkit-text-size-adjust: 100%;\n}\nbody {\n margin: 0;\n}\narticle,\naside,\ndetails,\nfigcaption,\nfigure,\nfooter,\nheader,\nhgroup,\nmain,\nmenu,\nnav,\nsection,\nsummary {\n display: block;\n}\naudio,\ncanvas,\nprogress,\nvideo {\n display: inline-block;\n vertical-align: baseline;\n}\naudio:not([controls]) {\n display: none;\n height: 0;\n}\n[hidden],\ntemplate {\n display: none;\n}\na {\n background-color: transparent;\n}\na:active,\na:hover {\n outline: 0;\n}\nabbr[title] {\n border-bottom: 1px dotted;\n}\nb,\nstrong {\n font-weight: bold;\n}\ndfn {\n font-style: italic;\n}\nh1 {\n font-size: 2em;\n margin: 0.67em 0;\n}\nmark {\n background: #ff0;\n color: #000;\n}\nsmall {\n font-size: 80%;\n}\nsub,\nsup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n}\nsup {\n top: -0.5em;\n}\nsub {\n bottom: -0.25em;\n}\nimg {\n border: 0;\n}\nsvg:not(:root) {\n overflow: hidden;\n}\nfigure {\n margin: 1em 40px;\n}\nhr {\n box-sizing: content-box;\n height: 0;\n}\npre {\n overflow: auto;\n}\ncode,\nkbd,\npre,\nsamp {\n font-family: monospace, monospace;\n font-size: 1em;\n}\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n color: inherit;\n font: inherit;\n margin: 0;\n}\nbutton {\n overflow: visible;\n}\nbutton,\nselect {\n text-transform: none;\n}\nbutton,\nhtml input[type=\"button\"],\ninput[type=\"reset\"],\ninput[type=\"submit\"] {\n -webkit-appearance: button;\n cursor: pointer;\n}\nbutton[disabled],\nhtml input[disabled] {\n cursor: default;\n}\nbutton::-moz-focus-inner,\ninput::-moz-focus-inner {\n border: 0;\n padding: 0;\n}\ninput {\n line-height: normal;\n}\ninput[type=\"checkbox\"],\ninput[type=\"radio\"] {\n box-sizing: border-box;\n padding: 0;\n}\ninput[type=\"number\"]::-webkit-inner-spin-button,\ninput[type=\"number\"]::-webkit-outer-spin-button {\n height: auto;\n}\ninput[type=\"search\"] {\n -webkit-appearance: textfield;\n box-sizing: content-box;\n}\ninput[type=\"search\"]::-webkit-search-cancel-button,\ninput[type=\"search\"]::-webkit-search-decoration {\n -webkit-appearance: none;\n}\nfieldset {\n border: 1px solid #c0c0c0;\n margin: 0 2px;\n padding: 0.35em 0.625em 0.75em;\n}\nlegend {\n border: 0;\n padding: 0;\n}\ntextarea {\n overflow: auto;\n}\noptgroup {\n font-weight: bold;\n}\ntable {\n border-collapse: collapse;\n border-spacing: 0;\n}\ntd,\nth {\n padding: 0;\n}\n/*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */\n@media print {\n *,\n *:before,\n *:after {\n background: transparent !important;\n color: #000 !important;\n box-shadow: none !important;\n text-shadow: none !important;\n }\n a,\n a:visited {\n text-decoration: underline;\n }\n a[href]:after {\n content: \" (\" attr(href) \")\";\n }\n abbr[title]:after {\n content: \" (\" attr(title) \")\";\n }\n a[href^=\"#\"]:after,\n a[href^=\"javascript:\"]:after {\n content: \"\";\n }\n pre,\n blockquote {\n border: 1px solid #999;\n page-break-inside: avoid;\n }\n thead {\n display: table-header-group;\n }\n tr,\n img {\n page-break-inside: avoid;\n }\n img {\n max-width: 100% !important;\n }\n p,\n h2,\n h3 {\n orphans: 3;\n widows: 3;\n }\n h2,\n h3 {\n page-break-after: avoid;\n }\n .navbar {\n display: none;\n }\n .btn > .caret,\n .dropup > .btn > .caret {\n border-top-color: #000 !important;\n }\n .label {\n border: 1px solid #000;\n }\n .table {\n border-collapse: collapse !important;\n }\n .table td,\n .table th {\n background-color: #fff !important;\n }\n .table-bordered th,\n .table-bordered td {\n border: 1px solid #ddd !important;\n }\n}\n@font-face {\n font-family: 'Glyphicons Halflings';\n src: url('../fonts/glyphicons-halflings-regular.eot');\n src: url('../fonts/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'), url('../fonts/glyphicons-halflings-regular.woff2') format('woff2'), url('../fonts/glyphicons-halflings-regular.woff') format('woff'), url('../fonts/glyphicons-halflings-regular.ttf') format('truetype'), url('../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular') format('svg');\n}\n.glyphicon {\n position: relative;\n top: 1px;\n display: inline-block;\n font-family: 'Glyphicons Halflings';\n font-style: normal;\n font-weight: normal;\n line-height: 1;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n.glyphicon-asterisk:before {\n content: \"\\002a\";\n}\n.glyphicon-plus:before {\n content: \"\\002b\";\n}\n.glyphicon-euro:before,\n.glyphicon-eur:before {\n content: \"\\20ac\";\n}\n.glyphicon-minus:before {\n content: \"\\2212\";\n}\n.glyphicon-cloud:before {\n content: \"\\2601\";\n}\n.glyphicon-envelope:before {\n content: \"\\2709\";\n}\n.glyphicon-pencil:before {\n content: \"\\270f\";\n}\n.glyphicon-glass:before {\n content: \"\\e001\";\n}\n.glyphicon-music:before {\n content: \"\\e002\";\n}\n.glyphicon-search:before {\n content: \"\\e003\";\n}\n.glyphicon-heart:before {\n content: \"\\e005\";\n}\n.glyphicon-star:before {\n content: \"\\e006\";\n}\n.glyphicon-star-empty:before {\n content: \"\\e007\";\n}\n.glyphicon-user:before {\n content: \"\\e008\";\n}\n.glyphicon-film:before {\n content: \"\\e009\";\n}\n.glyphicon-th-large:before {\n content: \"\\e010\";\n}\n.glyphicon-th:before {\n content: \"\\e011\";\n}\n.glyphicon-th-list:before {\n content: \"\\e012\";\n}\n.glyphicon-ok:before {\n content: \"\\e013\";\n}\n.glyphicon-remove:before {\n content: \"\\e014\";\n}\n.glyphicon-zoom-in:before {\n content: \"\\e015\";\n}\n.glyphicon-zoom-out:before {\n content: \"\\e016\";\n}\n.glyphicon-off:before {\n content: \"\\e017\";\n}\n.glyphicon-signal:before {\n content: \"\\e018\";\n}\n.glyphicon-cog:before {\n content: \"\\e019\";\n}\n.glyphicon-trash:before {\n content: \"\\e020\";\n}\n.glyphicon-home:before {\n content: \"\\e021\";\n}\n.glyphicon-file:before {\n content: \"\\e022\";\n}\n.glyphicon-time:before {\n content: \"\\e023\";\n}\n.glyphicon-road:before {\n content: \"\\e024\";\n}\n.glyphicon-download-alt:before {\n content: \"\\e025\";\n}\n.glyphicon-download:before {\n content: \"\\e026\";\n}\n.glyphicon-upload:before {\n content: \"\\e027\";\n}\n.glyphicon-inbox:before {\n content: \"\\e028\";\n}\n.glyphicon-play-circle:before {\n content: \"\\e029\";\n}\n.glyphicon-repeat:before {\n content: \"\\e030\";\n}\n.glyphicon-refresh:before {\n content: \"\\e031\";\n}\n.glyphicon-list-alt:before {\n content: \"\\e032\";\n}\n.glyphicon-lock:before {\n content: \"\\e033\";\n}\n.glyphicon-flag:before {\n content: \"\\e034\";\n}\n.glyphicon-headphones:before {\n content: \"\\e035\";\n}\n.glyphicon-volume-off:before {\n content: \"\\e036\";\n}\n.glyphicon-volume-down:before {\n content: \"\\e037\";\n}\n.glyphicon-volume-up:before {\n content: \"\\e038\";\n}\n.glyphicon-qrcode:before {\n content: \"\\e039\";\n}\n.glyphicon-barcode:before {\n content: \"\\e040\";\n}\n.glyphicon-tag:before {\n content: \"\\e041\";\n}\n.glyphicon-tags:before {\n content: \"\\e042\";\n}\n.glyphicon-book:before {\n content: \"\\e043\";\n}\n.glyphicon-bookmark:before {\n content: \"\\e044\";\n}\n.glyphicon-print:before {\n content: \"\\e045\";\n}\n.glyphicon-camera:before {\n content: \"\\e046\";\n}\n.glyphicon-font:before {\n content: \"\\e047\";\n}\n.glyphicon-bold:before {\n content: \"\\e048\";\n}\n.glyphicon-italic:before {\n content: \"\\e049\";\n}\n.glyphicon-text-height:before {\n content: \"\\e050\";\n}\n.glyphicon-text-width:before {\n content: \"\\e051\";\n}\n.glyphicon-align-left:before {\n content: \"\\e052\";\n}\n.glyphicon-align-center:before {\n content: \"\\e053\";\n}\n.glyphicon-align-right:before {\n content: \"\\e054\";\n}\n.glyphicon-align-justify:before {\n content: \"\\e055\";\n}\n.glyphicon-list:before {\n content: \"\\e056\";\n}\n.glyphicon-indent-left:before {\n content: \"\\e057\";\n}\n.glyphicon-indent-right:before {\n content: \"\\e058\";\n}\n.glyphicon-facetime-video:before {\n content: \"\\e059\";\n}\n.glyphicon-picture:before {\n content: \"\\e060\";\n}\n.glyphicon-map-marker:before {\n content: \"\\e062\";\n}\n.glyphicon-adjust:before {\n content: \"\\e063\";\n}\n.glyphicon-tint:before {\n content: \"\\e064\";\n}\n.glyphicon-edit:before {\n content: \"\\e065\";\n}\n.glyphicon-share:before {\n content: \"\\e066\";\n}\n.glyphicon-check:before {\n content: \"\\e067\";\n}\n.glyphicon-move:before {\n content: \"\\e068\";\n}\n.glyphicon-step-backward:before {\n content: \"\\e069\";\n}\n.glyphicon-fast-backward:before {\n content: \"\\e070\";\n}\n.glyphicon-backward:before {\n content: \"\\e071\";\n}\n.glyphicon-play:before {\n content: \"\\e072\";\n}\n.glyphicon-pause:before {\n content: \"\\e073\";\n}\n.glyphicon-stop:before {\n content: \"\\e074\";\n}\n.glyphicon-forward:before {\n content: \"\\e075\";\n}\n.glyphicon-fast-forward:before {\n content: \"\\e076\";\n}\n.glyphicon-step-forward:before {\n content: \"\\e077\";\n}\n.glyphicon-eject:before {\n content: \"\\e078\";\n}\n.glyphicon-chevron-left:before {\n content: \"\\e079\";\n}\n.glyphicon-chevron-right:before {\n content: \"\\e080\";\n}\n.glyphicon-plus-sign:before {\n content: \"\\e081\";\n}\n.glyphicon-minus-sign:before {\n content: \"\\e082\";\n}\n.glyphicon-remove-sign:before {\n content: \"\\e083\";\n}\n.glyphicon-ok-sign:before {\n content: \"\\e084\";\n}\n.glyphicon-question-sign:before {\n content: \"\\e085\";\n}\n.glyphicon-info-sign:before {\n content: \"\\e086\";\n}\n.glyphicon-screenshot:before {\n content: \"\\e087\";\n}\n.glyphicon-remove-circle:before {\n content: \"\\e088\";\n}\n.glyphicon-ok-circle:before {\n content: \"\\e089\";\n}\n.glyphicon-ban-circle:before {\n content: \"\\e090\";\n}\n.glyphicon-arrow-left:before {\n content: \"\\e091\";\n}\n.glyphicon-arrow-right:before {\n content: \"\\e092\";\n}\n.glyphicon-arrow-up:before {\n content: \"\\e093\";\n}\n.glyphicon-arrow-down:before {\n content: \"\\e094\";\n}\n.glyphicon-share-alt:before {\n content: \"\\e095\";\n}\n.glyphicon-resize-full:before {\n content: \"\\e096\";\n}\n.glyphicon-resize-small:before {\n content: \"\\e097\";\n}\n.glyphicon-exclamation-sign:before {\n content: \"\\e101\";\n}\n.glyphicon-gift:before {\n content: \"\\e102\";\n}\n.glyphicon-leaf:before {\n content: \"\\e103\";\n}\n.glyphicon-fire:before {\n content: \"\\e104\";\n}\n.glyphicon-eye-open:before {\n content: \"\\e105\";\n}\n.glyphicon-eye-close:before {\n content: \"\\e106\";\n}\n.glyphicon-warning-sign:before {\n content: \"\\e107\";\n}\n.glyphicon-plane:before {\n content: \"\\e108\";\n}\n.glyphicon-calendar:before {\n content: \"\\e109\";\n}\n.glyphicon-random:before {\n content: \"\\e110\";\n}\n.glyphicon-comment:before {\n content: \"\\e111\";\n}\n.glyphicon-magnet:before {\n content: \"\\e112\";\n}\n.glyphicon-chevron-up:before {\n content: \"\\e113\";\n}\n.glyphicon-chevron-down:before {\n content: \"\\e114\";\n}\n.glyphicon-retweet:before {\n content: \"\\e115\";\n}\n.glyphicon-shopping-cart:before {\n content: \"\\e116\";\n}\n.glyphicon-folder-close:before {\n content: \"\\e117\";\n}\n.glyphicon-folder-open:before {\n content: \"\\e118\";\n}\n.glyphicon-resize-vertical:before {\n content: \"\\e119\";\n}\n.glyphicon-resize-horizontal:before {\n content: \"\\e120\";\n}\n.glyphicon-hdd:before {\n content: \"\\e121\";\n}\n.glyphicon-bullhorn:before {\n content: \"\\e122\";\n}\n.glyphicon-bell:before {\n content: \"\\e123\";\n}\n.glyphicon-certificate:before {\n content: \"\\e124\";\n}\n.glyphicon-thumbs-up:before {\n content: \"\\e125\";\n}\n.glyphicon-thumbs-down:before {\n content: \"\\e126\";\n}\n.glyphicon-hand-right:before {\n content: \"\\e127\";\n}\n.glyphicon-hand-left:before {\n content: \"\\e128\";\n}\n.glyphicon-hand-up:before {\n content: \"\\e129\";\n}\n.glyphicon-hand-down:before {\n content: \"\\e130\";\n}\n.glyphicon-circle-arrow-right:before {\n content: \"\\e131\";\n}\n.glyphicon-circle-arrow-left:before {\n content: \"\\e132\";\n}\n.glyphicon-circle-arrow-up:before {\n content: \"\\e133\";\n}\n.glyphicon-circle-arrow-down:before {\n content: \"\\e134\";\n}\n.glyphicon-globe:before {\n content: \"\\e135\";\n}\n.glyphicon-wrench:before {\n content: \"\\e136\";\n}\n.glyphicon-tasks:before {\n content: \"\\e137\";\n}\n.glyphicon-filter:before {\n content: \"\\e138\";\n}\n.glyphicon-briefcase:before {\n content: \"\\e139\";\n}\n.glyphicon-fullscreen:before {\n content: \"\\e140\";\n}\n.glyphicon-dashboard:before {\n content: \"\\e141\";\n}\n.glyphicon-paperclip:before {\n content: \"\\e142\";\n}\n.glyphicon-heart-empty:before {\n content: \"\\e143\";\n}\n.glyphicon-link:before {\n content: \"\\e144\";\n}\n.glyphicon-phone:before {\n content: \"\\e145\";\n}\n.glyphicon-pushpin:before {\n content: \"\\e146\";\n}\n.glyphicon-usd:before {\n content: \"\\e148\";\n}\n.glyphicon-gbp:before {\n content: \"\\e149\";\n}\n.glyphicon-sort:before {\n content: \"\\e150\";\n}\n.glyphicon-sort-by-alphabet:before {\n content: \"\\e151\";\n}\n.glyphicon-sort-by-alphabet-alt:before {\n content: \"\\e152\";\n}\n.glyphicon-sort-by-order:before {\n content: \"\\e153\";\n}\n.glyphicon-sort-by-order-alt:before {\n content: \"\\e154\";\n}\n.glyphicon-sort-by-attributes:before {\n content: \"\\e155\";\n}\n.glyphicon-sort-by-attributes-alt:before {\n content: \"\\e156\";\n}\n.glyphicon-unchecked:before {\n content: \"\\e157\";\n}\n.glyphicon-expand:before {\n content: \"\\e158\";\n}\n.glyphicon-collapse-down:before {\n content: \"\\e159\";\n}\n.glyphicon-collapse-up:before {\n content: \"\\e160\";\n}\n.glyphicon-log-in:before {\n content: \"\\e161\";\n}\n.glyphicon-flash:before {\n content: \"\\e162\";\n}\n.glyphicon-log-out:before {\n content: \"\\e163\";\n}\n.glyphicon-new-window:before {\n content: \"\\e164\";\n}\n.glyphicon-record:before {\n content: \"\\e165\";\n}\n.glyphicon-save:before {\n content: \"\\e166\";\n}\n.glyphicon-open:before {\n content: \"\\e167\";\n}\n.glyphicon-saved:before {\n content: \"\\e168\";\n}\n.glyphicon-import:before {\n content: \"\\e169\";\n}\n.glyphicon-export:before {\n content: \"\\e170\";\n}\n.glyphicon-send:before {\n content: \"\\e171\";\n}\n.glyphicon-floppy-disk:before {\n content: \"\\e172\";\n}\n.glyphicon-floppy-saved:before {\n content: \"\\e173\";\n}\n.glyphicon-floppy-remove:before {\n content: \"\\e174\";\n}\n.glyphicon-floppy-save:before {\n content: \"\\e175\";\n}\n.glyphicon-floppy-open:before {\n content: \"\\e176\";\n}\n.glyphicon-credit-card:before {\n content: \"\\e177\";\n}\n.glyphicon-transfer:before {\n content: \"\\e178\";\n}\n.glyphicon-cutlery:before {\n content: \"\\e179\";\n}\n.glyphicon-header:before {\n content: \"\\e180\";\n}\n.glyphicon-compressed:before {\n content: \"\\e181\";\n}\n.glyphicon-earphone:before {\n content: \"\\e182\";\n}\n.glyphicon-phone-alt:before {\n content: \"\\e183\";\n}\n.glyphicon-tower:before {\n content: \"\\e184\";\n}\n.glyphicon-stats:before {\n content: \"\\e185\";\n}\n.glyphicon-sd-video:before {\n content: \"\\e186\";\n}\n.glyphicon-hd-video:before {\n content: \"\\e187\";\n}\n.glyphicon-subtitles:before {\n content: \"\\e188\";\n}\n.glyphicon-sound-stereo:before {\n content: \"\\e189\";\n}\n.glyphicon-sound-dolby:before {\n content: \"\\e190\";\n}\n.glyphicon-sound-5-1:before {\n content: \"\\e191\";\n}\n.glyphicon-sound-6-1:before {\n content: \"\\e192\";\n}\n.glyphicon-sound-7-1:before {\n content: \"\\e193\";\n}\n.glyphicon-copyright-mark:before {\n content: \"\\e194\";\n}\n.glyphicon-registration-mark:before {\n content: \"\\e195\";\n}\n.glyphicon-cloud-download:before {\n content: \"\\e197\";\n}\n.glyphicon-cloud-upload:before {\n content: \"\\e198\";\n}\n.glyphicon-tree-conifer:before {\n content: \"\\e199\";\n}\n.glyphicon-tree-deciduous:before {\n content: \"\\e200\";\n}\n.glyphicon-cd:before {\n content: \"\\e201\";\n}\n.glyphicon-save-file:before {\n content: \"\\e202\";\n}\n.glyphicon-open-file:before {\n content: \"\\e203\";\n}\n.glyphicon-level-up:before {\n content: \"\\e204\";\n}\n.glyphicon-copy:before {\n content: \"\\e205\";\n}\n.glyphicon-paste:before {\n content: \"\\e206\";\n}\n.glyphicon-alert:before {\n content: \"\\e209\";\n}\n.glyphicon-equalizer:before {\n content: \"\\e210\";\n}\n.glyphicon-king:before {\n content: \"\\e211\";\n}\n.glyphicon-queen:before {\n content: \"\\e212\";\n}\n.glyphicon-pawn:before {\n content: \"\\e213\";\n}\n.glyphicon-bishop:before {\n content: \"\\e214\";\n}\n.glyphicon-knight:before {\n content: \"\\e215\";\n}\n.glyphicon-baby-formula:before {\n content: \"\\e216\";\n}\n.glyphicon-tent:before {\n content: \"\\26fa\";\n}\n.glyphicon-blackboard:before {\n content: \"\\e218\";\n}\n.glyphicon-bed:before {\n content: \"\\e219\";\n}\n.glyphicon-apple:before {\n content: \"\\f8ff\";\n}\n.glyphicon-erase:before {\n content: \"\\e221\";\n}\n.glyphicon-hourglass:before {\n content: \"\\231b\";\n}\n.glyphicon-lamp:before {\n content: \"\\e223\";\n}\n.glyphicon-duplicate:before {\n content: \"\\e224\";\n}\n.glyphicon-piggy-bank:before {\n content: \"\\e225\";\n}\n.glyphicon-scissors:before {\n content: \"\\e226\";\n}\n.glyphicon-bitcoin:before {\n content: \"\\e227\";\n}\n.glyphicon-btc:before {\n content: \"\\e227\";\n}\n.glyphicon-xbt:before {\n content: \"\\e227\";\n}\n.glyphicon-yen:before {\n content: \"\\00a5\";\n}\n.glyphicon-jpy:before {\n content: \"\\00a5\";\n}\n.glyphicon-ruble:before {\n content: \"\\20bd\";\n}\n.glyphicon-rub:before {\n content: \"\\20bd\";\n}\n.glyphicon-scale:before {\n content: \"\\e230\";\n}\n.glyphicon-ice-lolly:before {\n content: \"\\e231\";\n}\n.glyphicon-ice-lolly-tasted:before {\n content: \"\\e232\";\n}\n.glyphicon-education:before {\n content: \"\\e233\";\n}\n.glyphicon-option-horizontal:before {\n content: \"\\e234\";\n}\n.glyphicon-option-vertical:before {\n content: \"\\e235\";\n}\n.glyphicon-menu-hamburger:before {\n content: \"\\e236\";\n}\n.glyphicon-modal-window:before {\n content: \"\\e237\";\n}\n.glyphicon-oil:before {\n content: \"\\e238\";\n}\n.glyphicon-grain:before {\n content: \"\\e239\";\n}\n.glyphicon-sunglasses:before {\n content: \"\\e240\";\n}\n.glyphicon-text-size:before {\n content: \"\\e241\";\n}\n.glyphicon-text-color:before {\n content: \"\\e242\";\n}\n.glyphicon-text-background:before {\n content: \"\\e243\";\n}\n.glyphicon-object-align-top:before {\n content: \"\\e244\";\n}\n.glyphicon-object-align-bottom:before {\n content: \"\\e245\";\n}\n.glyphicon-object-align-horizontal:before {\n content: \"\\e246\";\n}\n.glyphicon-object-align-left:before {\n content: \"\\e247\";\n}\n.glyphicon-object-align-vertical:before {\n content: \"\\e248\";\n}\n.glyphicon-object-align-right:before {\n content: \"\\e249\";\n}\n.glyphicon-triangle-right:before {\n content: \"\\e250\";\n}\n.glyphicon-triangle-left:before {\n content: \"\\e251\";\n}\n.glyphicon-triangle-bottom:before {\n content: \"\\e252\";\n}\n.glyphicon-triangle-top:before {\n content: \"\\e253\";\n}\n.glyphicon-console:before {\n content: \"\\e254\";\n}\n.glyphicon-superscript:before {\n content: \"\\e255\";\n}\n.glyphicon-subscript:before {\n content: \"\\e256\";\n}\n.glyphicon-menu-left:before {\n content: \"\\e257\";\n}\n.glyphicon-menu-right:before {\n content: \"\\e258\";\n}\n.glyphicon-menu-down:before {\n content: \"\\e259\";\n}\n.glyphicon-menu-up:before {\n content: \"\\e260\";\n}\n* {\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n}\n*:before,\n*:after {\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n}\nhtml {\n font-size: 10px;\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n}\nbody {\n font-family: \"Helvetica Neue\", Helvetica, Arial, sans-serif;\n font-size: 14px;\n line-height: 1.42857143;\n color: #333333;\n background-color: #fff;\n}\ninput,\nbutton,\nselect,\ntextarea {\n font-family: inherit;\n font-size: inherit;\n line-height: inherit;\n}\na {\n color: #337ab7;\n text-decoration: none;\n}\na:hover,\na:focus {\n color: #23527c;\n text-decoration: underline;\n}\na:focus {\n outline: thin dotted;\n outline: 5px auto -webkit-focus-ring-color;\n outline-offset: -2px;\n}\nfigure {\n margin: 0;\n}\nimg {\n vertical-align: middle;\n}\n.img-responsive,\n.thumbnail > img,\n.thumbnail a > img,\n.carousel-inner > .item > img,\n.carousel-inner > .item > a > img {\n display: block;\n max-width: 100%;\n height: auto;\n}\n.img-rounded {\n border-radius: 6px;\n}\n.img-thumbnail {\n padding: 4px;\n line-height: 1.42857143;\n background-color: #fff;\n border: 1px solid #ddd;\n border-radius: 4px;\n -webkit-transition: all 0.2s ease-in-out;\n -o-transition: all 0.2s ease-in-out;\n transition: all 0.2s ease-in-out;\n display: inline-block;\n max-width: 100%;\n height: auto;\n}\n.img-circle {\n border-radius: 50%;\n}\nhr {\n margin-top: 20px;\n margin-bottom: 20px;\n border: 0;\n border-top: 1px solid #eeeeee;\n}\n.sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n margin: -1px;\n padding: 0;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n border: 0;\n}\n.sr-only-focusable:active,\n.sr-only-focusable:focus {\n position: static;\n width: auto;\n height: auto;\n margin: 0;\n overflow: visible;\n clip: auto;\n}\n[role=\"button\"] {\n cursor: pointer;\n}\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\n.h1,\n.h2,\n.h3,\n.h4,\n.h5,\n.h6 {\n font-family: inherit;\n font-weight: 500;\n line-height: 1.1;\n color: inherit;\n}\nh1 small,\nh2 small,\nh3 small,\nh4 small,\nh5 small,\nh6 small,\n.h1 small,\n.h2 small,\n.h3 small,\n.h4 small,\n.h5 small,\n.h6 small,\nh1 .small,\nh2 .small,\nh3 .small,\nh4 .small,\nh5 .small,\nh6 .small,\n.h1 .small,\n.h2 .small,\n.h3 .small,\n.h4 .small,\n.h5 .small,\n.h6 .small {\n font-weight: normal;\n line-height: 1;\n color: #777777;\n}\nh1,\n.h1,\nh2,\n.h2,\nh3,\n.h3 {\n margin-top: 20px;\n margin-bottom: 10px;\n}\nh1 small,\n.h1 small,\nh2 small,\n.h2 small,\nh3 small,\n.h3 small,\nh1 .small,\n.h1 .small,\nh2 .small,\n.h2 .small,\nh3 .small,\n.h3 .small {\n font-size: 65%;\n}\nh4,\n.h4,\nh5,\n.h5,\nh6,\n.h6 {\n margin-top: 10px;\n margin-bottom: 10px;\n}\nh4 small,\n.h4 small,\nh5 small,\n.h5 small,\nh6 small,\n.h6 small,\nh4 .small,\n.h4 .small,\nh5 .small,\n.h5 .small,\nh6 .small,\n.h6 .small {\n font-size: 75%;\n}\nh1,\n.h1 {\n font-size: 36px;\n}\nh2,\n.h2 {\n font-size: 30px;\n}\nh3,\n.h3 {\n font-size: 24px;\n}\nh4,\n.h4 {\n font-size: 18px;\n}\nh5,\n.h5 {\n font-size: 14px;\n}\nh6,\n.h6 {\n font-size: 12px;\n}\np {\n margin: 0 0 10px;\n}\n.lead {\n margin-bottom: 20px;\n font-size: 16px;\n font-weight: 300;\n line-height: 1.4;\n}\n@media (min-width: 768px) {\n .lead {\n font-size: 21px;\n }\n}\nsmall,\n.small {\n font-size: 85%;\n}\nmark,\n.mark {\n background-color: #fcf8e3;\n padding: .2em;\n}\n.text-left {\n text-align: left;\n}\n.text-right {\n text-align: right;\n}\n.text-center {\n text-align: center;\n}\n.text-justify {\n text-align: justify;\n}\n.text-nowrap {\n white-space: nowrap;\n}\n.text-lowercase {\n text-transform: lowercase;\n}\n.text-uppercase {\n text-transform: uppercase;\n}\n.text-capitalize {\n text-transform: capitalize;\n}\n.text-muted {\n color: #777777;\n}\n.text-primary {\n color: #337ab7;\n}\na.text-primary:hover,\na.text-primary:focus {\n color: #286090;\n}\n.text-success {\n color: #3c763d;\n}\na.text-success:hover,\na.text-success:focus {\n color: #2b542c;\n}\n.text-info {\n color: #31708f;\n}\na.text-info:hover,\na.text-info:focus {\n color: #245269;\n}\n.text-warning {\n color: #8a6d3b;\n}\na.text-warning:hover,\na.text-warning:focus {\n color: #66512c;\n}\n.text-danger {\n color: #a94442;\n}\na.text-danger:hover,\na.text-danger:focus {\n color: #843534;\n}\n.bg-primary {\n color: #fff;\n background-color: #337ab7;\n}\na.bg-primary:hover,\na.bg-primary:focus {\n background-color: #286090;\n}\n.bg-success {\n background-color: #dff0d8;\n}\na.bg-success:hover,\na.bg-success:focus {\n background-color: #c1e2b3;\n}\n.bg-info {\n background-color: #d9edf7;\n}\na.bg-info:hover,\na.bg-info:focus {\n background-color: #afd9ee;\n}\n.bg-warning {\n background-color: #fcf8e3;\n}\na.bg-warning:hover,\na.bg-warning:focus {\n background-color: #f7ecb5;\n}\n.bg-danger {\n background-color: #f2dede;\n}\na.bg-danger:hover,\na.bg-danger:focus {\n background-color: #e4b9b9;\n}\n.page-header {\n padding-bottom: 9px;\n margin: 40px 0 20px;\n border-bottom: 1px solid #eeeeee;\n}\nul,\nol {\n margin-top: 0;\n margin-bottom: 10px;\n}\nul ul,\nol ul,\nul ol,\nol ol {\n margin-bottom: 0;\n}\n.list-unstyled {\n padding-left: 0;\n list-style: none;\n}\n.list-inline {\n padding-left: 0;\n list-style: none;\n margin-left: -5px;\n}\n.list-inline > li {\n display: inline-block;\n padding-left: 5px;\n padding-right: 5px;\n}\ndl {\n margin-top: 0;\n margin-bottom: 20px;\n}\ndt,\ndd {\n line-height: 1.42857143;\n}\ndt {\n font-weight: bold;\n}\ndd {\n margin-left: 0;\n}\n@media (min-width: 768px) {\n .dl-horizontal dt {\n float: left;\n width: 160px;\n clear: left;\n text-align: right;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n .dl-horizontal dd {\n margin-left: 180px;\n }\n}\nabbr[title],\nabbr[data-original-title] {\n cursor: help;\n border-bottom: 1px dotted #777777;\n}\n.initialism {\n font-size: 90%;\n text-transform: uppercase;\n}\nblockquote {\n padding: 10px 20px;\n margin: 0 0 20px;\n font-size: 17.5px;\n border-left: 5px solid #eeeeee;\n}\nblockquote p:last-child,\nblockquote ul:last-child,\nblockquote ol:last-child {\n margin-bottom: 0;\n}\nblockquote footer,\nblockquote small,\nblockquote .small {\n display: block;\n font-size: 80%;\n line-height: 1.42857143;\n color: #777777;\n}\nblockquote footer:before,\nblockquote small:before,\nblockquote .small:before {\n content: '\\2014 \\00A0';\n}\n.blockquote-reverse,\nblockquote.pull-right {\n padding-right: 15px;\n padding-left: 0;\n border-right: 5px solid #eeeeee;\n border-left: 0;\n text-align: right;\n}\n.blockquote-reverse footer:before,\nblockquote.pull-right footer:before,\n.blockquote-reverse small:before,\nblockquote.pull-right small:before,\n.blockquote-reverse .small:before,\nblockquote.pull-right .small:before {\n content: '';\n}\n.blockquote-reverse footer:after,\nblockquote.pull-right footer:after,\n.blockquote-reverse small:after,\nblockquote.pull-right small:after,\n.blockquote-reverse .small:after,\nblockquote.pull-right .small:after {\n content: '\\00A0 \\2014';\n}\naddress {\n margin-bottom: 20px;\n font-style: normal;\n line-height: 1.42857143;\n}\ncode,\nkbd,\npre,\nsamp {\n font-family: Menlo, Monaco, Consolas, \"Courier New\", monospace;\n}\ncode {\n padding: 2px 4px;\n font-size: 90%;\n color: #c7254e;\n background-color: #f9f2f4;\n border-radius: 4px;\n}\nkbd {\n padding: 2px 4px;\n font-size: 90%;\n color: #fff;\n background-color: #333;\n border-radius: 3px;\n box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.25);\n}\nkbd kbd {\n padding: 0;\n font-size: 100%;\n font-weight: bold;\n box-shadow: none;\n}\npre {\n display: block;\n padding: 9.5px;\n margin: 0 0 10px;\n font-size: 13px;\n line-height: 1.42857143;\n word-break: break-all;\n word-wrap: break-word;\n color: #333333;\n background-color: #f5f5f5;\n border: 1px solid #ccc;\n border-radius: 4px;\n}\npre code {\n padding: 0;\n font-size: inherit;\n color: inherit;\n white-space: pre-wrap;\n background-color: transparent;\n border-radius: 0;\n}\n.pre-scrollable {\n max-height: 340px;\n overflow-y: scroll;\n}\n.container {\n margin-right: auto;\n margin-left: auto;\n padding-left: 15px;\n padding-right: 15px;\n}\n@media (min-width: 768px) {\n .container {\n width: 750px;\n }\n}\n@media (min-width: 992px) {\n .container {\n width: 970px;\n }\n}\n@media (min-width: 1200px) {\n .container {\n width: 1170px;\n }\n}\n.container-fluid {\n margin-right: auto;\n margin-left: auto;\n padding-left: 15px;\n padding-right: 15px;\n}\n.row {\n margin-left: -15px;\n margin-right: -15px;\n}\n.col-xs-1, .col-sm-1, .col-md-1, .col-lg-1, .col-xs-2, .col-sm-2, .col-md-2, .col-lg-2, .col-xs-3, .col-sm-3, .col-md-3, .col-lg-3, .col-xs-4, .col-sm-4, .col-md-4, .col-lg-4, .col-xs-5, .col-sm-5, .col-md-5, .col-lg-5, .col-xs-6, .col-sm-6, .col-md-6, .col-lg-6, .col-xs-7, .col-sm-7, .col-md-7, .col-lg-7, .col-xs-8, .col-sm-8, .col-md-8, .col-lg-8, .col-xs-9, .col-sm-9, .col-md-9, .col-lg-9, .col-xs-10, .col-sm-10, .col-md-10, .col-lg-10, .col-xs-11, .col-sm-11, .col-md-11, .col-lg-11, .col-xs-12, .col-sm-12, .col-md-12, .col-lg-12 {\n position: relative;\n min-height: 1px;\n padding-left: 15px;\n padding-right: 15px;\n}\n.col-xs-1, .col-xs-2, .col-xs-3, .col-xs-4, .col-xs-5, .col-xs-6, .col-xs-7, .col-xs-8, .col-xs-9, .col-xs-10, .col-xs-11, .col-xs-12 {\n float: left;\n}\n.col-xs-12 {\n width: 100%;\n}\n.col-xs-11 {\n width: 91.66666667%;\n}\n.col-xs-10 {\n width: 83.33333333%;\n}\n.col-xs-9 {\n width: 75%;\n}\n.col-xs-8 {\n width: 66.66666667%;\n}\n.col-xs-7 {\n width: 58.33333333%;\n}\n.col-xs-6 {\n width: 50%;\n}\n.col-xs-5 {\n width: 41.66666667%;\n}\n.col-xs-4 {\n width: 33.33333333%;\n}\n.col-xs-3 {\n width: 25%;\n}\n.col-xs-2 {\n width: 16.66666667%;\n}\n.col-xs-1 {\n width: 8.33333333%;\n}\n.col-xs-pull-12 {\n right: 100%;\n}\n.col-xs-pull-11 {\n right: 91.66666667%;\n}\n.col-xs-pull-10 {\n right: 83.33333333%;\n}\n.col-xs-pull-9 {\n right: 75%;\n}\n.col-xs-pull-8 {\n right: 66.66666667%;\n}\n.col-xs-pull-7 {\n right: 58.33333333%;\n}\n.col-xs-pull-6 {\n right: 50%;\n}\n.col-xs-pull-5 {\n right: 41.66666667%;\n}\n.col-xs-pull-4 {\n right: 33.33333333%;\n}\n.col-xs-pull-3 {\n right: 25%;\n}\n.col-xs-pull-2 {\n right: 16.66666667%;\n}\n.col-xs-pull-1 {\n right: 8.33333333%;\n}\n.col-xs-pull-0 {\n right: auto;\n}\n.col-xs-push-12 {\n left: 100%;\n}\n.col-xs-push-11 {\n left: 91.66666667%;\n}\n.col-xs-push-10 {\n left: 83.33333333%;\n}\n.col-xs-push-9 {\n left: 75%;\n}\n.col-xs-push-8 {\n left: 66.66666667%;\n}\n.col-xs-push-7 {\n left: 58.33333333%;\n}\n.col-xs-push-6 {\n left: 50%;\n}\n.col-xs-push-5 {\n left: 41.66666667%;\n}\n.col-xs-push-4 {\n left: 33.33333333%;\n}\n.col-xs-push-3 {\n left: 25%;\n}\n.col-xs-push-2 {\n left: 16.66666667%;\n}\n.col-xs-push-1 {\n left: 8.33333333%;\n}\n.col-xs-push-0 {\n left: auto;\n}\n.col-xs-offset-12 {\n margin-left: 100%;\n}\n.col-xs-offset-11 {\n margin-left: 91.66666667%;\n}\n.col-xs-offset-10 {\n margin-left: 83.33333333%;\n}\n.col-xs-offset-9 {\n margin-left: 75%;\n}\n.col-xs-offset-8 {\n margin-left: 66.66666667%;\n}\n.col-xs-offset-7 {\n margin-left: 58.33333333%;\n}\n.col-xs-offset-6 {\n margin-left: 50%;\n}\n.col-xs-offset-5 {\n margin-left: 41.66666667%;\n}\n.col-xs-offset-4 {\n margin-left: 33.33333333%;\n}\n.col-xs-offset-3 {\n margin-left: 25%;\n}\n.col-xs-offset-2 {\n margin-left: 16.66666667%;\n}\n.col-xs-offset-1 {\n margin-left: 8.33333333%;\n}\n.col-xs-offset-0 {\n margin-left: 0%;\n}\n@media (min-width: 768px) {\n .col-sm-1, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9, .col-sm-10, .col-sm-11, .col-sm-12 {\n float: left;\n }\n .col-sm-12 {\n width: 100%;\n }\n .col-sm-11 {\n width: 91.66666667%;\n }\n .col-sm-10 {\n width: 83.33333333%;\n }\n .col-sm-9 {\n width: 75%;\n }\n .col-sm-8 {\n width: 66.66666667%;\n }\n .col-sm-7 {\n width: 58.33333333%;\n }\n .col-sm-6 {\n width: 50%;\n }\n .col-sm-5 {\n width: 41.66666667%;\n }\n .col-sm-4 {\n width: 33.33333333%;\n }\n .col-sm-3 {\n width: 25%;\n }\n .col-sm-2 {\n width: 16.66666667%;\n }\n .col-sm-1 {\n width: 8.33333333%;\n }\n .col-sm-pull-12 {\n right: 100%;\n }\n .col-sm-pull-11 {\n right: 91.66666667%;\n }\n .col-sm-pull-10 {\n right: 83.33333333%;\n }\n .col-sm-pull-9 {\n right: 75%;\n }\n .col-sm-pull-8 {\n right: 66.66666667%;\n }\n .col-sm-pull-7 {\n right: 58.33333333%;\n }\n .col-sm-pull-6 {\n right: 50%;\n }\n .col-sm-pull-5 {\n right: 41.66666667%;\n }\n .col-sm-pull-4 {\n right: 33.33333333%;\n }\n .col-sm-pull-3 {\n right: 25%;\n }\n .col-sm-pull-2 {\n right: 16.66666667%;\n }\n .col-sm-pull-1 {\n right: 8.33333333%;\n }\n .col-sm-pull-0 {\n right: auto;\n }\n .col-sm-push-12 {\n left: 100%;\n }\n .col-sm-push-11 {\n left: 91.66666667%;\n }\n .col-sm-push-10 {\n left: 83.33333333%;\n }\n .col-sm-push-9 {\n left: 75%;\n }\n .col-sm-push-8 {\n left: 66.66666667%;\n }\n .col-sm-push-7 {\n left: 58.33333333%;\n }\n .col-sm-push-6 {\n left: 50%;\n }\n .col-sm-push-5 {\n left: 41.66666667%;\n }\n .col-sm-push-4 {\n left: 33.33333333%;\n }\n .col-sm-push-3 {\n left: 25%;\n }\n .col-sm-push-2 {\n left: 16.66666667%;\n }\n .col-sm-push-1 {\n left: 8.33333333%;\n }\n .col-sm-push-0 {\n left: auto;\n }\n .col-sm-offset-12 {\n margin-left: 100%;\n }\n .col-sm-offset-11 {\n margin-left: 91.66666667%;\n }\n .col-sm-offset-10 {\n margin-left: 83.33333333%;\n }\n .col-sm-offset-9 {\n margin-left: 75%;\n }\n .col-sm-offset-8 {\n margin-left: 66.66666667%;\n }\n .col-sm-offset-7 {\n margin-left: 58.33333333%;\n }\n .col-sm-offset-6 {\n margin-left: 50%;\n }\n .col-sm-offset-5 {\n margin-left: 41.66666667%;\n }\n .col-sm-offset-4 {\n margin-left: 33.33333333%;\n }\n .col-sm-offset-3 {\n margin-left: 25%;\n }\n .col-sm-offset-2 {\n margin-left: 16.66666667%;\n }\n .col-sm-offset-1 {\n margin-left: 8.33333333%;\n }\n .col-sm-offset-0 {\n margin-left: 0%;\n }\n}\n@media (min-width: 992px) {\n .col-md-1, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8, .col-md-9, .col-md-10, .col-md-11, .col-md-12 {\n float: left;\n }\n .col-md-12 {\n width: 100%;\n }\n .col-md-11 {\n width: 91.66666667%;\n }\n .col-md-10 {\n width: 83.33333333%;\n }\n .col-md-9 {\n width: 75%;\n }\n .col-md-8 {\n width: 66.66666667%;\n }\n .col-md-7 {\n width: 58.33333333%;\n }\n .col-md-6 {\n width: 50%;\n }\n .col-md-5 {\n width: 41.66666667%;\n }\n .col-md-4 {\n width: 33.33333333%;\n }\n .col-md-3 {\n width: 25%;\n }\n .col-md-2 {\n width: 16.66666667%;\n }\n .col-md-1 {\n width: 8.33333333%;\n }\n .col-md-pull-12 {\n right: 100%;\n }\n .col-md-pull-11 {\n right: 91.66666667%;\n }\n .col-md-pull-10 {\n right: 83.33333333%;\n }\n .col-md-pull-9 {\n right: 75%;\n }\n .col-md-pull-8 {\n right: 66.66666667%;\n }\n .col-md-pull-7 {\n right: 58.33333333%;\n }\n .col-md-pull-6 {\n right: 50%;\n }\n .col-md-pull-5 {\n right: 41.66666667%;\n }\n .col-md-pull-4 {\n right: 33.33333333%;\n }\n .col-md-pull-3 {\n right: 25%;\n }\n .col-md-pull-2 {\n right: 16.66666667%;\n }\n .col-md-pull-1 {\n right: 8.33333333%;\n }\n .col-md-pull-0 {\n right: auto;\n }\n .col-md-push-12 {\n left: 100%;\n }\n .col-md-push-11 {\n left: 91.66666667%;\n }\n .col-md-push-10 {\n left: 83.33333333%;\n }\n .col-md-push-9 {\n left: 75%;\n }\n .col-md-push-8 {\n left: 66.66666667%;\n }\n .col-md-push-7 {\n left: 58.33333333%;\n }\n .col-md-push-6 {\n left: 50%;\n }\n .col-md-push-5 {\n left: 41.66666667%;\n }\n .col-md-push-4 {\n left: 33.33333333%;\n }\n .col-md-push-3 {\n left: 25%;\n }\n .col-md-push-2 {\n left: 16.66666667%;\n }\n .col-md-push-1 {\n left: 8.33333333%;\n }\n .col-md-push-0 {\n left: auto;\n }\n .col-md-offset-12 {\n margin-left: 100%;\n }\n .col-md-offset-11 {\n margin-left: 91.66666667%;\n }\n .col-md-offset-10 {\n margin-left: 83.33333333%;\n }\n .col-md-offset-9 {\n margin-left: 75%;\n }\n .col-md-offset-8 {\n margin-left: 66.66666667%;\n }\n .col-md-offset-7 {\n margin-left: 58.33333333%;\n }\n .col-md-offset-6 {\n margin-left: 50%;\n }\n .col-md-offset-5 {\n margin-left: 41.66666667%;\n }\n .col-md-offset-4 {\n margin-left: 33.33333333%;\n }\n .col-md-offset-3 {\n margin-left: 25%;\n }\n .col-md-offset-2 {\n margin-left: 16.66666667%;\n }\n .col-md-offset-1 {\n margin-left: 8.33333333%;\n }\n .col-md-offset-0 {\n margin-left: 0%;\n }\n}\n@media (min-width: 1200px) {\n .col-lg-1, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6, .col-lg-7, .col-lg-8, .col-lg-9, .col-lg-10, .col-lg-11, .col-lg-12 {\n float: left;\n }\n .col-lg-12 {\n width: 100%;\n }\n .col-lg-11 {\n width: 91.66666667%;\n }\n .col-lg-10 {\n width: 83.33333333%;\n }\n .col-lg-9 {\n width: 75%;\n }\n .col-lg-8 {\n width: 66.66666667%;\n }\n .col-lg-7 {\n width: 58.33333333%;\n }\n .col-lg-6 {\n width: 50%;\n }\n .col-lg-5 {\n width: 41.66666667%;\n }\n .col-lg-4 {\n width: 33.33333333%;\n }\n .col-lg-3 {\n width: 25%;\n }\n .col-lg-2 {\n width: 16.66666667%;\n }\n .col-lg-1 {\n width: 8.33333333%;\n }\n .col-lg-pull-12 {\n right: 100%;\n }\n .col-lg-pull-11 {\n right: 91.66666667%;\n }\n .col-lg-pull-10 {\n right: 83.33333333%;\n }\n .col-lg-pull-9 {\n right: 75%;\n }\n .col-lg-pull-8 {\n right: 66.66666667%;\n }\n .col-lg-pull-7 {\n right: 58.33333333%;\n }\n .col-lg-pull-6 {\n right: 50%;\n }\n .col-lg-pull-5 {\n right: 41.66666667%;\n }\n .col-lg-pull-4 {\n right: 33.33333333%;\n }\n .col-lg-pull-3 {\n right: 25%;\n }\n .col-lg-pull-2 {\n right: 16.66666667%;\n }\n .col-lg-pull-1 {\n right: 8.33333333%;\n }\n .col-lg-pull-0 {\n right: auto;\n }\n .col-lg-push-12 {\n left: 100%;\n }\n .col-lg-push-11 {\n left: 91.66666667%;\n }\n .col-lg-push-10 {\n left: 83.33333333%;\n }\n .col-lg-push-9 {\n left: 75%;\n }\n .col-lg-push-8 {\n left: 66.66666667%;\n }\n .col-lg-push-7 {\n left: 58.33333333%;\n }\n .col-lg-push-6 {\n left: 50%;\n }\n .col-lg-push-5 {\n left: 41.66666667%;\n }\n .col-lg-push-4 {\n left: 33.33333333%;\n }\n .col-lg-push-3 {\n left: 25%;\n }\n .col-lg-push-2 {\n left: 16.66666667%;\n }\n .col-lg-push-1 {\n left: 8.33333333%;\n }\n .col-lg-push-0 {\n left: auto;\n }\n .col-lg-offset-12 {\n margin-left: 100%;\n }\n .col-lg-offset-11 {\n margin-left: 91.66666667%;\n }\n .col-lg-offset-10 {\n margin-left: 83.33333333%;\n }\n .col-lg-offset-9 {\n margin-left: 75%;\n }\n .col-lg-offset-8 {\n margin-left: 66.66666667%;\n }\n .col-lg-offset-7 {\n margin-left: 58.33333333%;\n }\n .col-lg-offset-6 {\n margin-left: 50%;\n }\n .col-lg-offset-5 {\n margin-left: 41.66666667%;\n }\n .col-lg-offset-4 {\n margin-left: 33.33333333%;\n }\n .col-lg-offset-3 {\n margin-left: 25%;\n }\n .col-lg-offset-2 {\n margin-left: 16.66666667%;\n }\n .col-lg-offset-1 {\n margin-left: 8.33333333%;\n }\n .col-lg-offset-0 {\n margin-left: 0%;\n }\n}\ntable {\n background-color: transparent;\n}\ncaption {\n padding-top: 8px;\n padding-bottom: 8px;\n color: #777777;\n text-align: left;\n}\nth {\n text-align: left;\n}\n.table {\n width: 100%;\n max-width: 100%;\n margin-bottom: 20px;\n}\n.table > thead > tr > th,\n.table > tbody > tr > th,\n.table > tfoot > tr > th,\n.table > thead > tr > td,\n.table > tbody > tr > td,\n.table > tfoot > tr > td {\n padding: 8px;\n line-height: 1.42857143;\n vertical-align: top;\n border-top: 1px solid #ddd;\n}\n.table > thead > tr > th {\n vertical-align: bottom;\n border-bottom: 2px solid #ddd;\n}\n.table > caption + thead > tr:first-child > th,\n.table > colgroup + thead > tr:first-child > th,\n.table > thead:first-child > tr:first-child > th,\n.table > caption + thead > tr:first-child > td,\n.table > colgroup + thead > tr:first-child > td,\n.table > thead:first-child > tr:first-child > td {\n border-top: 0;\n}\n.table > tbody + tbody {\n border-top: 2px solid #ddd;\n}\n.table .table {\n background-color: #fff;\n}\n.table-condensed > thead > tr > th,\n.table-condensed > tbody > tr > th,\n.table-condensed > tfoot > tr > th,\n.table-condensed > thead > tr > td,\n.table-condensed > tbody > tr > td,\n.table-condensed > tfoot > tr > td {\n padding: 5px;\n}\n.table-bordered {\n border: 1px solid #ddd;\n}\n.table-bordered > thead > tr > th,\n.table-bordered > tbody > tr > th,\n.table-bordered > tfoot > tr > th,\n.table-bordered > thead > tr > td,\n.table-bordered > tbody > tr > td,\n.table-bordered > tfoot > tr > td {\n border: 1px solid #ddd;\n}\n.table-bordered > thead > tr > th,\n.table-bordered > thead > tr > td {\n border-bottom-width: 2px;\n}\n.table-striped > tbody > tr:nth-of-type(odd) {\n background-color: #f9f9f9;\n}\n.table-hover > tbody > tr:hover {\n background-color: #f5f5f5;\n}\ntable col[class*=\"col-\"] {\n position: static;\n float: none;\n display: table-column;\n}\ntable td[class*=\"col-\"],\ntable th[class*=\"col-\"] {\n position: static;\n float: none;\n display: table-cell;\n}\n.table > thead > tr > td.active,\n.table > tbody > tr > td.active,\n.table > tfoot > tr > td.active,\n.table > thead > tr > th.active,\n.table > tbody > tr > th.active,\n.table > tfoot > tr > th.active,\n.table > thead > tr.active > td,\n.table > tbody > tr.active > td,\n.table > tfoot > tr.active > td,\n.table > thead > tr.active > th,\n.table > tbody > tr.active > th,\n.table > tfoot > tr.active > th {\n background-color: #f5f5f5;\n}\n.table-hover > tbody > tr > td.active:hover,\n.table-hover > tbody > tr > th.active:hover,\n.table-hover > tbody > tr.active:hover > td,\n.table-hover > tbody > tr:hover > .active,\n.table-hover > tbody > tr.active:hover > th {\n background-color: #e8e8e8;\n}\n.table > thead > tr > td.success,\n.table > tbody > tr > td.success,\n.table > tfoot > tr > td.success,\n.table > thead > tr > th.success,\n.table > tbody > tr > th.success,\n.table > tfoot > tr > th.success,\n.table > thead > tr.success > td,\n.table > tbody > tr.success > td,\n.table > tfoot > tr.success > td,\n.table > thead > tr.success > th,\n.table > tbody > tr.success > th,\n.table > tfoot > tr.success > th {\n background-color: #dff0d8;\n}\n.table-hover > tbody > tr > td.success:hover,\n.table-hover > tbody > tr > th.success:hover,\n.table-hover > tbody > tr.success:hover > td,\n.table-hover > tbody > tr:hover > .success,\n.table-hover > tbody > tr.success:hover > th {\n background-color: #d0e9c6;\n}\n.table > thead > tr > td.info,\n.table > tbody > tr > td.info,\n.table > tfoot > tr > td.info,\n.table > thead > tr > th.info,\n.table > tbody > tr > th.info,\n.table > tfoot > tr > th.info,\n.table > thead > tr.info > td,\n.table > tbody > tr.info > td,\n.table > tfoot > tr.info > td,\n.table > thead > tr.info > th,\n.table > tbody > tr.info > th,\n.table > tfoot > tr.info > th {\n background-color: #d9edf7;\n}\n.table-hover > tbody > tr > td.info:hover,\n.table-hover > tbody > tr > th.info:hover,\n.table-hover > tbody > tr.info:hover > td,\n.table-hover > tbody > tr:hover > .info,\n.table-hover > tbody > tr.info:hover > th {\n background-color: #c4e3f3;\n}\n.table > thead > tr > td.warning,\n.table > tbody > tr > td.warning,\n.table > tfoot > tr > td.warning,\n.table > thead > tr > th.warning,\n.table > tbody > tr > th.warning,\n.table > tfoot > tr > th.warning,\n.table > thead > tr.warning > td,\n.table > tbody > tr.warning > td,\n.table > tfoot > tr.warning > td,\n.table > thead > tr.warning > th,\n.table > tbody > tr.warning > th,\n.table > tfoot > tr.warning > th {\n background-color: #fcf8e3;\n}\n.table-hover > tbody > tr > td.warning:hover,\n.table-hover > tbody > tr > th.warning:hover,\n.table-hover > tbody > tr.warning:hover > td,\n.table-hover > tbody > tr:hover > .warning,\n.table-hover > tbody > tr.warning:hover > th {\n background-color: #faf2cc;\n}\n.table > thead > tr > td.danger,\n.table > tbody > tr > td.danger,\n.table > tfoot > tr > td.danger,\n.table > thead > tr > th.danger,\n.table > tbody > tr > th.danger,\n.table > tfoot > tr > th.danger,\n.table > thead > tr.danger > td,\n.table > tbody > tr.danger > td,\n.table > tfoot > tr.danger > td,\n.table > thead > tr.danger > th,\n.table > tbody > tr.danger > th,\n.table > tfoot > tr.danger > th {\n background-color: #f2dede;\n}\n.table-hover > tbody > tr > td.danger:hover,\n.table-hover > tbody > tr > th.danger:hover,\n.table-hover > tbody > tr.danger:hover > td,\n.table-hover > tbody > tr:hover > .danger,\n.table-hover > tbody > tr.danger:hover > th {\n background-color: #ebcccc;\n}\n.table-responsive {\n overflow-x: auto;\n min-height: 0.01%;\n}\n@media screen and (max-width: 767px) {\n .table-responsive {\n width: 100%;\n margin-bottom: 15px;\n overflow-y: hidden;\n -ms-overflow-style: -ms-autohiding-scrollbar;\n border: 1px solid #ddd;\n }\n .table-responsive > .table {\n margin-bottom: 0;\n }\n .table-responsive > .table > thead > tr > th,\n .table-responsive > .table > tbody > tr > th,\n .table-responsive > .table > tfoot > tr > th,\n .table-responsive > .table > thead > tr > td,\n .table-responsive > .table > tbody > tr > td,\n .table-responsive > .table > tfoot > tr > td {\n white-space: nowrap;\n }\n .table-responsive > .table-bordered {\n border: 0;\n }\n .table-responsive > .table-bordered > thead > tr > th:first-child,\n .table-responsive > .table-bordered > tbody > tr > th:first-child,\n .table-responsive > .table-bordered > tfoot > tr > th:first-child,\n .table-responsive > .table-bordered > thead > tr > td:first-child,\n .table-responsive > .table-bordered > tbody > tr > td:first-child,\n .table-responsive > .table-bordered > tfoot > tr > td:first-child {\n border-left: 0;\n }\n .table-responsive > .table-bordered > thead > tr > th:last-child,\n .table-responsive > .table-bordered > tbody > tr > th:last-child,\n .table-responsive > .table-bordered > tfoot > tr > th:last-child,\n .table-responsive > .table-bordered > thead > tr > td:last-child,\n .table-responsive > .table-bordered > tbody > tr > td:last-child,\n .table-responsive > .table-bordered > tfoot > tr > td:last-child {\n border-right: 0;\n }\n .table-responsive > .table-bordered > tbody > tr:last-child > th,\n .table-responsive > .table-bordered > tfoot > tr:last-child > th,\n .table-responsive > .table-bordered > tbody > tr:last-child > td,\n .table-responsive > .table-bordered > tfoot > tr:last-child > td {\n border-bottom: 0;\n }\n}\nfieldset {\n padding: 0;\n margin: 0;\n border: 0;\n min-width: 0;\n}\nlegend {\n display: block;\n width: 100%;\n padding: 0;\n margin-bottom: 20px;\n font-size: 21px;\n line-height: inherit;\n color: #333333;\n border: 0;\n border-bottom: 1px solid #e5e5e5;\n}\nlabel {\n display: inline-block;\n max-width: 100%;\n margin-bottom: 5px;\n font-weight: bold;\n}\ninput[type=\"search\"] {\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n}\ninput[type=\"radio\"],\ninput[type=\"checkbox\"] {\n margin: 4px 0 0;\n margin-top: 1px \\9;\n line-height: normal;\n}\ninput[type=\"file\"] {\n display: block;\n}\ninput[type=\"range\"] {\n display: block;\n width: 100%;\n}\nselect[multiple],\nselect[size] {\n height: auto;\n}\ninput[type=\"file\"]:focus,\ninput[type=\"radio\"]:focus,\ninput[type=\"checkbox\"]:focus {\n outline: thin dotted;\n outline: 5px auto -webkit-focus-ring-color;\n outline-offset: -2px;\n}\noutput {\n display: block;\n padding-top: 7px;\n font-size: 14px;\n line-height: 1.42857143;\n color: #555555;\n}\n.form-control {\n display: block;\n width: 100%;\n height: 34px;\n padding: 6px 12px;\n font-size: 14px;\n line-height: 1.42857143;\n color: #555555;\n background-color: #fff;\n background-image: none;\n border: 1px solid #ccc;\n border-radius: 4px;\n -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n -webkit-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;\n -o-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;\n transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;\n}\n.form-control:focus {\n border-color: #66afe9;\n outline: 0;\n -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6);\n box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6);\n}\n.form-control::-moz-placeholder {\n color: #999;\n opacity: 1;\n}\n.form-control:-ms-input-placeholder {\n color: #999;\n}\n.form-control::-webkit-input-placeholder {\n color: #999;\n}\n.form-control::-ms-expand {\n border: 0;\n background-color: transparent;\n}\n.form-control[disabled],\n.form-control[readonly],\nfieldset[disabled] .form-control {\n background-color: #eeeeee;\n opacity: 1;\n}\n.form-control[disabled],\nfieldset[disabled] .form-control {\n cursor: not-allowed;\n}\ntextarea.form-control {\n height: auto;\n}\ninput[type=\"search\"] {\n -webkit-appearance: none;\n}\n@media screen and (-webkit-min-device-pixel-ratio: 0) {\n input[type=\"date\"].form-control,\n input[type=\"time\"].form-control,\n input[type=\"datetime-local\"].form-control,\n input[type=\"month\"].form-control {\n line-height: 34px;\n }\n input[type=\"date\"].input-sm,\n input[type=\"time\"].input-sm,\n input[type=\"datetime-local\"].input-sm,\n input[type=\"month\"].input-sm,\n .input-group-sm input[type=\"date\"],\n .input-group-sm input[type=\"time\"],\n .input-group-sm input[type=\"datetime-local\"],\n .input-group-sm input[type=\"month\"] {\n line-height: 30px;\n }\n input[type=\"date\"].input-lg,\n input[type=\"time\"].input-lg,\n input[type=\"datetime-local\"].input-lg,\n input[type=\"month\"].input-lg,\n .input-group-lg input[type=\"date\"],\n .input-group-lg input[type=\"time\"],\n .input-group-lg input[type=\"datetime-local\"],\n .input-group-lg input[type=\"month\"] {\n line-height: 46px;\n }\n}\n.form-group {\n margin-bottom: 15px;\n}\n.radio,\n.checkbox {\n position: relative;\n display: block;\n margin-top: 10px;\n margin-bottom: 10px;\n}\n.radio label,\n.checkbox label {\n min-height: 20px;\n padding-left: 20px;\n margin-bottom: 0;\n font-weight: normal;\n cursor: pointer;\n}\n.radio input[type=\"radio\"],\n.radio-inline input[type=\"radio\"],\n.checkbox input[type=\"checkbox\"],\n.checkbox-inline input[type=\"checkbox\"] {\n position: absolute;\n margin-left: -20px;\n margin-top: 4px \\9;\n}\n.radio + .radio,\n.checkbox + .checkbox {\n margin-top: -5px;\n}\n.radio-inline,\n.checkbox-inline {\n position: relative;\n display: inline-block;\n padding-left: 20px;\n margin-bottom: 0;\n vertical-align: middle;\n font-weight: normal;\n cursor: pointer;\n}\n.radio-inline + .radio-inline,\n.checkbox-inline + .checkbox-inline {\n margin-top: 0;\n margin-left: 10px;\n}\ninput[type=\"radio\"][disabled],\ninput[type=\"checkbox\"][disabled],\ninput[type=\"radio\"].disabled,\ninput[type=\"checkbox\"].disabled,\nfieldset[disabled] input[type=\"radio\"],\nfieldset[disabled] input[type=\"checkbox\"] {\n cursor: not-allowed;\n}\n.radio-inline.disabled,\n.checkbox-inline.disabled,\nfieldset[disabled] .radio-inline,\nfieldset[disabled] .checkbox-inline {\n cursor: not-allowed;\n}\n.radio.disabled label,\n.checkbox.disabled label,\nfieldset[disabled] .radio label,\nfieldset[disabled] .checkbox label {\n cursor: not-allowed;\n}\n.form-control-static {\n padding-top: 7px;\n padding-bottom: 7px;\n margin-bottom: 0;\n min-height: 34px;\n}\n.form-control-static.input-lg,\n.form-control-static.input-sm {\n padding-left: 0;\n padding-right: 0;\n}\n.input-sm {\n height: 30px;\n padding: 5px 10px;\n font-size: 12px;\n line-height: 1.5;\n border-radius: 3px;\n}\nselect.input-sm {\n height: 30px;\n line-height: 30px;\n}\ntextarea.input-sm,\nselect[multiple].input-sm {\n height: auto;\n}\n.form-group-sm .form-control {\n height: 30px;\n padding: 5px 10px;\n font-size: 12px;\n line-height: 1.5;\n border-radius: 3px;\n}\n.form-group-sm select.form-control {\n height: 30px;\n line-height: 30px;\n}\n.form-group-sm textarea.form-control,\n.form-group-sm select[multiple].form-control {\n height: auto;\n}\n.form-group-sm .form-control-static {\n height: 30px;\n min-height: 32px;\n padding: 6px 10px;\n font-size: 12px;\n line-height: 1.5;\n}\n.input-lg {\n height: 46px;\n padding: 10px 16px;\n font-size: 18px;\n line-height: 1.3333333;\n border-radius: 6px;\n}\nselect.input-lg {\n height: 46px;\n line-height: 46px;\n}\ntextarea.input-lg,\nselect[multiple].input-lg {\n height: auto;\n}\n.form-group-lg .form-control {\n height: 46px;\n padding: 10px 16px;\n font-size: 18px;\n line-height: 1.3333333;\n border-radius: 6px;\n}\n.form-group-lg select.form-control {\n height: 46px;\n line-height: 46px;\n}\n.form-group-lg textarea.form-control,\n.form-group-lg select[multiple].form-control {\n height: auto;\n}\n.form-group-lg .form-control-static {\n height: 46px;\n min-height: 38px;\n padding: 11px 16px;\n font-size: 18px;\n line-height: 1.3333333;\n}\n.has-feedback {\n position: relative;\n}\n.has-feedback .form-control {\n padding-right: 42.5px;\n}\n.form-control-feedback {\n position: absolute;\n top: 0;\n right: 0;\n z-index: 2;\n display: block;\n width: 34px;\n height: 34px;\n line-height: 34px;\n text-align: center;\n pointer-events: none;\n}\n.input-lg + .form-control-feedback,\n.input-group-lg + .form-control-feedback,\n.form-group-lg .form-control + .form-control-feedback {\n width: 46px;\n height: 46px;\n line-height: 46px;\n}\n.input-sm + .form-control-feedback,\n.input-group-sm + .form-control-feedback,\n.form-group-sm .form-control + .form-control-feedback {\n width: 30px;\n height: 30px;\n line-height: 30px;\n}\n.has-success .help-block,\n.has-success .control-label,\n.has-success .radio,\n.has-success .checkbox,\n.has-success .radio-inline,\n.has-success .checkbox-inline,\n.has-success.radio label,\n.has-success.checkbox label,\n.has-success.radio-inline label,\n.has-success.checkbox-inline label {\n color: #3c763d;\n}\n.has-success .form-control {\n border-color: #3c763d;\n -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n}\n.has-success .form-control:focus {\n border-color: #2b542c;\n -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #67b168;\n box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #67b168;\n}\n.has-success .input-group-addon {\n color: #3c763d;\n border-color: #3c763d;\n background-color: #dff0d8;\n}\n.has-success .form-control-feedback {\n color: #3c763d;\n}\n.has-warning .help-block,\n.has-warning .control-label,\n.has-warning .radio,\n.has-warning .checkbox,\n.has-warning .radio-inline,\n.has-warning .checkbox-inline,\n.has-warning.radio label,\n.has-warning.checkbox label,\n.has-warning.radio-inline label,\n.has-warning.checkbox-inline label {\n color: #8a6d3b;\n}\n.has-warning .form-control {\n border-color: #8a6d3b;\n -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n}\n.has-warning .form-control:focus {\n border-color: #66512c;\n -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #c0a16b;\n box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #c0a16b;\n}\n.has-warning .input-group-addon {\n color: #8a6d3b;\n border-color: #8a6d3b;\n background-color: #fcf8e3;\n}\n.has-warning .form-control-feedback {\n color: #8a6d3b;\n}\n.has-error .help-block,\n.has-error .control-label,\n.has-error .radio,\n.has-error .checkbox,\n.has-error .radio-inline,\n.has-error .checkbox-inline,\n.has-error.radio label,\n.has-error.checkbox label,\n.has-error.radio-inline label,\n.has-error.checkbox-inline label {\n color: #a94442;\n}\n.has-error .form-control {\n border-color: #a94442;\n -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n}\n.has-error .form-control:focus {\n border-color: #843534;\n -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #ce8483;\n box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #ce8483;\n}\n.has-error .input-group-addon {\n color: #a94442;\n border-color: #a94442;\n background-color: #f2dede;\n}\n.has-error .form-control-feedback {\n color: #a94442;\n}\n.has-feedback label ~ .form-control-feedback {\n top: 25px;\n}\n.has-feedback label.sr-only ~ .form-control-feedback {\n top: 0;\n}\n.help-block {\n display: block;\n margin-top: 5px;\n margin-bottom: 10px;\n color: #737373;\n}\n@media (min-width: 768px) {\n .form-inline .form-group {\n display: inline-block;\n margin-bottom: 0;\n vertical-align: middle;\n }\n .form-inline .form-control {\n display: inline-block;\n width: auto;\n vertical-align: middle;\n }\n .form-inline .form-control-static {\n display: inline-block;\n }\n .form-inline .input-group {\n display: inline-table;\n vertical-align: middle;\n }\n .form-inline .input-group .input-group-addon,\n .form-inline .input-group .input-group-btn,\n .form-inline .input-group .form-control {\n width: auto;\n }\n .form-inline .input-group > .form-control {\n width: 100%;\n }\n .form-inline .control-label {\n margin-bottom: 0;\n vertical-align: middle;\n }\n .form-inline .radio,\n .form-inline .checkbox {\n display: inline-block;\n margin-top: 0;\n margin-bottom: 0;\n vertical-align: middle;\n }\n .form-inline .radio label,\n .form-inline .checkbox label {\n padding-left: 0;\n }\n .form-inline .radio input[type=\"radio\"],\n .form-inline .checkbox input[type=\"checkbox\"] {\n position: relative;\n margin-left: 0;\n }\n .form-inline .has-feedback .form-control-feedback {\n top: 0;\n }\n}\n.form-horizontal .radio,\n.form-horizontal .checkbox,\n.form-horizontal .radio-inline,\n.form-horizontal .checkbox-inline {\n margin-top: 0;\n margin-bottom: 0;\n padding-top: 7px;\n}\n.form-horizontal .radio,\n.form-horizontal .checkbox {\n min-height: 27px;\n}\n.form-horizontal .form-group {\n margin-left: -15px;\n margin-right: -15px;\n}\n@media (min-width: 768px) {\n .form-horizontal .control-label {\n text-align: right;\n margin-bottom: 0;\n padding-top: 7px;\n }\n}\n.form-horizontal .has-feedback .form-control-feedback {\n right: 15px;\n}\n@media (min-width: 768px) {\n .form-horizontal .form-group-lg .control-label {\n padding-top: 11px;\n font-size: 18px;\n }\n}\n@media (min-width: 768px) {\n .form-horizontal .form-group-sm .control-label {\n padding-top: 6px;\n font-size: 12px;\n }\n}\n.btn {\n display: inline-block;\n margin-bottom: 0;\n font-weight: normal;\n text-align: center;\n vertical-align: middle;\n touch-action: manipulation;\n cursor: pointer;\n background-image: none;\n border: 1px solid transparent;\n white-space: nowrap;\n padding: 6px 12px;\n font-size: 14px;\n line-height: 1.42857143;\n border-radius: 4px;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n.btn:focus,\n.btn:active:focus,\n.btn.active:focus,\n.btn.focus,\n.btn:active.focus,\n.btn.active.focus {\n outline: thin dotted;\n outline: 5px auto -webkit-focus-ring-color;\n outline-offset: -2px;\n}\n.btn:hover,\n.btn:focus,\n.btn.focus {\n color: #333;\n text-decoration: none;\n}\n.btn:active,\n.btn.active {\n outline: 0;\n background-image: none;\n -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);\n box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);\n}\n.btn.disabled,\n.btn[disabled],\nfieldset[disabled] .btn {\n cursor: not-allowed;\n opacity: 0.65;\n filter: alpha(opacity=65);\n -webkit-box-shadow: none;\n box-shadow: none;\n}\na.btn.disabled,\nfieldset[disabled] a.btn {\n pointer-events: none;\n}\n.btn-default {\n color: #333;\n background-color: #fff;\n border-color: #ccc;\n}\n.btn-default:focus,\n.btn-default.focus {\n color: #333;\n background-color: #e6e6e6;\n border-color: #8c8c8c;\n}\n.btn-default:hover {\n color: #333;\n background-color: #e6e6e6;\n border-color: #adadad;\n}\n.btn-default:active,\n.btn-default.active,\n.open > .dropdown-toggle.btn-default {\n color: #333;\n background-color: #e6e6e6;\n border-color: #adadad;\n}\n.btn-default:active:hover,\n.btn-default.active:hover,\n.open > .dropdown-toggle.btn-default:hover,\n.btn-default:active:focus,\n.btn-default.active:focus,\n.open > .dropdown-toggle.btn-default:focus,\n.btn-default:active.focus,\n.btn-default.active.focus,\n.open > .dropdown-toggle.btn-default.focus {\n color: #333;\n background-color: #d4d4d4;\n border-color: #8c8c8c;\n}\n.btn-default:active,\n.btn-default.active,\n.open > .dropdown-toggle.btn-default {\n background-image: none;\n}\n.btn-default.disabled:hover,\n.btn-default[disabled]:hover,\nfieldset[disabled] .btn-default:hover,\n.btn-default.disabled:focus,\n.btn-default[disabled]:focus,\nfieldset[disabled] .btn-default:focus,\n.btn-default.disabled.focus,\n.btn-default[disabled].focus,\nfieldset[disabled] .btn-default.focus {\n background-color: #fff;\n border-color: #ccc;\n}\n.btn-default .badge {\n color: #fff;\n background-color: #333;\n}\n.btn-primary {\n color: #fff;\n background-color: #337ab7;\n border-color: #2e6da4;\n}\n.btn-primary:focus,\n.btn-primary.focus {\n color: #fff;\n background-color: #286090;\n border-color: #122b40;\n}\n.btn-primary:hover {\n color: #fff;\n background-color: #286090;\n border-color: #204d74;\n}\n.btn-primary:active,\n.btn-primary.active,\n.open > .dropdown-toggle.btn-primary {\n color: #fff;\n background-color: #286090;\n border-color: #204d74;\n}\n.btn-primary:active:hover,\n.btn-primary.active:hover,\n.open > .dropdown-toggle.btn-primary:hover,\n.btn-primary:active:focus,\n.btn-primary.active:focus,\n.open > .dropdown-toggle.btn-primary:focus,\n.btn-primary:active.focus,\n.btn-primary.active.focus,\n.open > .dropdown-toggle.btn-primary.focus {\n color: #fff;\n background-color: #204d74;\n border-color: #122b40;\n}\n.btn-primary:active,\n.btn-primary.active,\n.open > .dropdown-toggle.btn-primary {\n background-image: none;\n}\n.btn-primary.disabled:hover,\n.btn-primary[disabled]:hover,\nfieldset[disabled] .btn-primary:hover,\n.btn-primary.disabled:focus,\n.btn-primary[disabled]:focus,\nfieldset[disabled] .btn-primary:focus,\n.btn-primary.disabled.focus,\n.btn-primary[disabled].focus,\nfieldset[disabled] .btn-primary.focus {\n background-color: #337ab7;\n border-color: #2e6da4;\n}\n.btn-primary .badge {\n color: #337ab7;\n background-color: #fff;\n}\n.btn-success {\n color: #fff;\n background-color: #5cb85c;\n border-color: #4cae4c;\n}\n.btn-success:focus,\n.btn-success.focus {\n color: #fff;\n background-color: #449d44;\n border-color: #255625;\n}\n.btn-success:hover {\n color: #fff;\n background-color: #449d44;\n border-color: #398439;\n}\n.btn-success:active,\n.btn-success.active,\n.open > .dropdown-toggle.btn-success {\n color: #fff;\n background-color: #449d44;\n border-color: #398439;\n}\n.btn-success:active:hover,\n.btn-success.active:hover,\n.open > .dropdown-toggle.btn-success:hover,\n.btn-success:active:focus,\n.btn-success.active:focus,\n.open > .dropdown-toggle.btn-success:focus,\n.btn-success:active.focus,\n.btn-success.active.focus,\n.open > .dropdown-toggle.btn-success.focus {\n color: #fff;\n background-color: #398439;\n border-color: #255625;\n}\n.btn-success:active,\n.btn-success.active,\n.open > .dropdown-toggle.btn-success {\n background-image: none;\n}\n.btn-success.disabled:hover,\n.btn-success[disabled]:hover,\nfieldset[disabled] .btn-success:hover,\n.btn-success.disabled:focus,\n.btn-success[disabled]:focus,\nfieldset[disabled] .btn-success:focus,\n.btn-success.disabled.focus,\n.btn-success[disabled].focus,\nfieldset[disabled] .btn-success.focus {\n background-color: #5cb85c;\n border-color: #4cae4c;\n}\n.btn-success .badge {\n color: #5cb85c;\n background-color: #fff;\n}\n.btn-info {\n color: #fff;\n background-color: #5bc0de;\n border-color: #46b8da;\n}\n.btn-info:focus,\n.btn-info.focus {\n color: #fff;\n background-color: #31b0d5;\n border-color: #1b6d85;\n}\n.btn-info:hover {\n color: #fff;\n background-color: #31b0d5;\n border-color: #269abc;\n}\n.btn-info:active,\n.btn-info.active,\n.open > .dropdown-toggle.btn-info {\n color: #fff;\n background-color: #31b0d5;\n border-color: #269abc;\n}\n.btn-info:active:hover,\n.btn-info.active:hover,\n.open > .dropdown-toggle.btn-info:hover,\n.btn-info:active:focus,\n.btn-info.active:focus,\n.open > .dropdown-toggle.btn-info:focus,\n.btn-info:active.focus,\n.btn-info.active.focus,\n.open > .dropdown-toggle.btn-info.focus {\n color: #fff;\n background-color: #269abc;\n border-color: #1b6d85;\n}\n.btn-info:active,\n.btn-info.active,\n.open > .dropdown-toggle.btn-info {\n background-image: none;\n}\n.btn-info.disabled:hover,\n.btn-info[disabled]:hover,\nfieldset[disabled] .btn-info:hover,\n.btn-info.disabled:focus,\n.btn-info[disabled]:focus,\nfieldset[disabled] .btn-info:focus,\n.btn-info.disabled.focus,\n.btn-info[disabled].focus,\nfieldset[disabled] .btn-info.focus {\n background-color: #5bc0de;\n border-color: #46b8da;\n}\n.btn-info .badge {\n color: #5bc0de;\n background-color: #fff;\n}\n.btn-warning {\n color: #fff;\n background-color: #f0ad4e;\n border-color: #eea236;\n}\n.btn-warning:focus,\n.btn-warning.focus {\n color: #fff;\n background-color: #ec971f;\n border-color: #985f0d;\n}\n.btn-warning:hover {\n color: #fff;\n background-color: #ec971f;\n border-color: #d58512;\n}\n.btn-warning:active,\n.btn-warning.active,\n.open > .dropdown-toggle.btn-warning {\n color: #fff;\n background-color: #ec971f;\n border-color: #d58512;\n}\n.btn-warning:active:hover,\n.btn-warning.active:hover,\n.open > .dropdown-toggle.btn-warning:hover,\n.btn-warning:active:focus,\n.btn-warning.active:focus,\n.open > .dropdown-toggle.btn-warning:focus,\n.btn-warning:active.focus,\n.btn-warning.active.focus,\n.open > .dropdown-toggle.btn-warning.focus {\n color: #fff;\n background-color: #d58512;\n border-color: #985f0d;\n}\n.btn-warning:active,\n.btn-warning.active,\n.open > .dropdown-toggle.btn-warning {\n background-image: none;\n}\n.btn-warning.disabled:hover,\n.btn-warning[disabled]:hover,\nfieldset[disabled] .btn-warning:hover,\n.btn-warning.disabled:focus,\n.btn-warning[disabled]:focus,\nfieldset[disabled] .btn-warning:focus,\n.btn-warning.disabled.focus,\n.btn-warning[disabled].focus,\nfieldset[disabled] .btn-warning.focus {\n background-color: #f0ad4e;\n border-color: #eea236;\n}\n.btn-warning .badge {\n color: #f0ad4e;\n background-color: #fff;\n}\n.btn-danger {\n color: #fff;\n background-color: #d9534f;\n border-color: #d43f3a;\n}\n.btn-danger:focus,\n.btn-danger.focus {\n color: #fff;\n background-color: #c9302c;\n border-color: #761c19;\n}\n.btn-danger:hover {\n color: #fff;\n background-color: #c9302c;\n border-color: #ac2925;\n}\n.btn-danger:active,\n.btn-danger.active,\n.open > .dropdown-toggle.btn-danger {\n color: #fff;\n background-color: #c9302c;\n border-color: #ac2925;\n}\n.btn-danger:active:hover,\n.btn-danger.active:hover,\n.open > .dropdown-toggle.btn-danger:hover,\n.btn-danger:active:focus,\n.btn-danger.active:focus,\n.open > .dropdown-toggle.btn-danger:focus,\n.btn-danger:active.focus,\n.btn-danger.active.focus,\n.open > .dropdown-toggle.btn-danger.focus {\n color: #fff;\n background-color: #ac2925;\n border-color: #761c19;\n}\n.btn-danger:active,\n.btn-danger.active,\n.open > .dropdown-toggle.btn-danger {\n background-image: none;\n}\n.btn-danger.disabled:hover,\n.btn-danger[disabled]:hover,\nfieldset[disabled] .btn-danger:hover,\n.btn-danger.disabled:focus,\n.btn-danger[disabled]:focus,\nfieldset[disabled] .btn-danger:focus,\n.btn-danger.disabled.focus,\n.btn-danger[disabled].focus,\nfieldset[disabled] .btn-danger.focus {\n background-color: #d9534f;\n border-color: #d43f3a;\n}\n.btn-danger .badge {\n color: #d9534f;\n background-color: #fff;\n}\n.btn-link {\n color: #337ab7;\n font-weight: normal;\n border-radius: 0;\n}\n.btn-link,\n.btn-link:active,\n.btn-link.active,\n.btn-link[disabled],\nfieldset[disabled] .btn-link {\n background-color: transparent;\n -webkit-box-shadow: none;\n box-shadow: none;\n}\n.btn-link,\n.btn-link:hover,\n.btn-link:focus,\n.btn-link:active {\n border-color: transparent;\n}\n.btn-link:hover,\n.btn-link:focus {\n color: #23527c;\n text-decoration: underline;\n background-color: transparent;\n}\n.btn-link[disabled]:hover,\nfieldset[disabled] .btn-link:hover,\n.btn-link[disabled]:focus,\nfieldset[disabled] .btn-link:focus {\n color: #777777;\n text-decoration: none;\n}\n.btn-lg,\n.btn-group-lg > .btn {\n padding: 10px 16px;\n font-size: 18px;\n line-height: 1.3333333;\n border-radius: 6px;\n}\n.btn-sm,\n.btn-group-sm > .btn {\n padding: 5px 10px;\n font-size: 12px;\n line-height: 1.5;\n border-radius: 3px;\n}\n.btn-xs,\n.btn-group-xs > .btn {\n padding: 1px 5px;\n font-size: 12px;\n line-height: 1.5;\n border-radius: 3px;\n}\n.btn-block {\n display: block;\n width: 100%;\n}\n.btn-block + .btn-block {\n margin-top: 5px;\n}\ninput[type=\"submit\"].btn-block,\ninput[type=\"reset\"].btn-block,\ninput[type=\"button\"].btn-block {\n width: 100%;\n}\n.fade {\n opacity: 0;\n -webkit-transition: opacity 0.15s linear;\n -o-transition: opacity 0.15s linear;\n transition: opacity 0.15s linear;\n}\n.fade.in {\n opacity: 1;\n}\n.collapse {\n display: none;\n}\n.collapse.in {\n display: block;\n}\ntr.collapse.in {\n display: table-row;\n}\ntbody.collapse.in {\n display: table-row-group;\n}\n.collapsing {\n position: relative;\n height: 0;\n overflow: hidden;\n -webkit-transition-property: height, visibility;\n transition-property: height, visibility;\n -webkit-transition-duration: 0.35s;\n transition-duration: 0.35s;\n -webkit-transition-timing-function: ease;\n transition-timing-function: ease;\n}\n.caret {\n display: inline-block;\n width: 0;\n height: 0;\n margin-left: 2px;\n vertical-align: middle;\n border-top: 4px dashed;\n border-top: 4px solid \\9;\n border-right: 4px solid transparent;\n border-left: 4px solid transparent;\n}\n.dropup,\n.dropdown {\n position: relative;\n}\n.dropdown-toggle:focus {\n outline: 0;\n}\n.dropdown-menu {\n position: absolute;\n top: 100%;\n left: 0;\n z-index: 1000;\n display: none;\n float: left;\n min-width: 160px;\n padding: 5px 0;\n margin: 2px 0 0;\n list-style: none;\n font-size: 14px;\n text-align: left;\n background-color: #fff;\n border: 1px solid #ccc;\n border: 1px solid rgba(0, 0, 0, 0.15);\n border-radius: 4px;\n -webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);\n box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);\n background-clip: padding-box;\n}\n.dropdown-menu.pull-right {\n right: 0;\n left: auto;\n}\n.dropdown-menu .divider {\n height: 1px;\n margin: 9px 0;\n overflow: hidden;\n background-color: #e5e5e5;\n}\n.dropdown-menu > li > a {\n display: block;\n padding: 3px 20px;\n clear: both;\n font-weight: normal;\n line-height: 1.42857143;\n color: #333333;\n white-space: nowrap;\n}\n.dropdown-menu > li > a:hover,\n.dropdown-menu > li > a:focus {\n text-decoration: none;\n color: #262626;\n background-color: #f5f5f5;\n}\n.dropdown-menu > .active > a,\n.dropdown-menu > .active > a:hover,\n.dropdown-menu > .active > a:focus {\n color: #fff;\n text-decoration: none;\n outline: 0;\n background-color: #337ab7;\n}\n.dropdown-menu > .disabled > a,\n.dropdown-menu > .disabled > a:hover,\n.dropdown-menu > .disabled > a:focus {\n color: #777777;\n}\n.dropdown-menu > .disabled > a:hover,\n.dropdown-menu > .disabled > a:focus {\n text-decoration: none;\n background-color: transparent;\n background-image: none;\n filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);\n cursor: not-allowed;\n}\n.open > .dropdown-menu {\n display: block;\n}\n.open > a {\n outline: 0;\n}\n.dropdown-menu-right {\n left: auto;\n right: 0;\n}\n.dropdown-menu-left {\n left: 0;\n right: auto;\n}\n.dropdown-header {\n display: block;\n padding: 3px 20px;\n font-size: 12px;\n line-height: 1.42857143;\n color: #777777;\n white-space: nowrap;\n}\n.dropdown-backdrop {\n position: fixed;\n left: 0;\n right: 0;\n bottom: 0;\n top: 0;\n z-index: 990;\n}\n.pull-right > .dropdown-menu {\n right: 0;\n left: auto;\n}\n.dropup .caret,\n.navbar-fixed-bottom .dropdown .caret {\n border-top: 0;\n border-bottom: 4px dashed;\n border-bottom: 4px solid \\9;\n content: \"\";\n}\n.dropup .dropdown-menu,\n.navbar-fixed-bottom .dropdown .dropdown-menu {\n top: auto;\n bottom: 100%;\n margin-bottom: 2px;\n}\n@media (min-width: 768px) {\n .navbar-right .dropdown-menu {\n left: auto;\n right: 0;\n }\n .navbar-right .dropdown-menu-left {\n left: 0;\n right: auto;\n }\n}\n.btn-group,\n.btn-group-vertical {\n position: relative;\n display: inline-block;\n vertical-align: middle;\n}\n.btn-group > .btn,\n.btn-group-vertical > .btn {\n position: relative;\n float: left;\n}\n.btn-group > .btn:hover,\n.btn-group-vertical > .btn:hover,\n.btn-group > .btn:focus,\n.btn-group-vertical > .btn:focus,\n.btn-group > .btn:active,\n.btn-group-vertical > .btn:active,\n.btn-group > .btn.active,\n.btn-group-vertical > .btn.active {\n z-index: 2;\n}\n.btn-group .btn + .btn,\n.btn-group .btn + .btn-group,\n.btn-group .btn-group + .btn,\n.btn-group .btn-group + .btn-group {\n margin-left: -1px;\n}\n.btn-toolbar {\n margin-left: -5px;\n}\n.btn-toolbar .btn,\n.btn-toolbar .btn-group,\n.btn-toolbar .input-group {\n float: left;\n}\n.btn-toolbar > .btn,\n.btn-toolbar > .btn-group,\n.btn-toolbar > .input-group {\n margin-left: 5px;\n}\n.btn-group > .btn:not(:first-child):not(:last-child):not(.dropdown-toggle) {\n border-radius: 0;\n}\n.btn-group > .btn:first-child {\n margin-left: 0;\n}\n.btn-group > .btn:first-child:not(:last-child):not(.dropdown-toggle) {\n border-bottom-right-radius: 0;\n border-top-right-radius: 0;\n}\n.btn-group > .btn:last-child:not(:first-child),\n.btn-group > .dropdown-toggle:not(:first-child) {\n border-bottom-left-radius: 0;\n border-top-left-radius: 0;\n}\n.btn-group > .btn-group {\n float: left;\n}\n.btn-group > .btn-group:not(:first-child):not(:last-child) > .btn {\n border-radius: 0;\n}\n.btn-group > .btn-group:first-child:not(:last-child) > .btn:last-child,\n.btn-group > .btn-group:first-child:not(:last-child) > .dropdown-toggle {\n border-bottom-right-radius: 0;\n border-top-right-radius: 0;\n}\n.btn-group > .btn-group:last-child:not(:first-child) > .btn:first-child {\n border-bottom-left-radius: 0;\n border-top-left-radius: 0;\n}\n.btn-group .dropdown-toggle:active,\n.btn-group.open .dropdown-toggle {\n outline: 0;\n}\n.btn-group > .btn + .dropdown-toggle {\n padding-left: 8px;\n padding-right: 8px;\n}\n.btn-group > .btn-lg + .dropdown-toggle {\n padding-left: 12px;\n padding-right: 12px;\n}\n.btn-group.open .dropdown-toggle {\n -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);\n box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);\n}\n.btn-group.open .dropdown-toggle.btn-link {\n -webkit-box-shadow: none;\n box-shadow: none;\n}\n.btn .caret {\n margin-left: 0;\n}\n.btn-lg .caret {\n border-width: 5px 5px 0;\n border-bottom-width: 0;\n}\n.dropup .btn-lg .caret {\n border-width: 0 5px 5px;\n}\n.btn-group-vertical > .btn,\n.btn-group-vertical > .btn-group,\n.btn-group-vertical > .btn-group > .btn {\n display: block;\n float: none;\n width: 100%;\n max-width: 100%;\n}\n.btn-group-vertical > .btn-group > .btn {\n float: none;\n}\n.btn-group-vertical > .btn + .btn,\n.btn-group-vertical > .btn + .btn-group,\n.btn-group-vertical > .btn-group + .btn,\n.btn-group-vertical > .btn-group + .btn-group {\n margin-top: -1px;\n margin-left: 0;\n}\n.btn-group-vertical > .btn:not(:first-child):not(:last-child) {\n border-radius: 0;\n}\n.btn-group-vertical > .btn:first-child:not(:last-child) {\n border-top-right-radius: 4px;\n border-top-left-radius: 4px;\n border-bottom-right-radius: 0;\n border-bottom-left-radius: 0;\n}\n.btn-group-vertical > .btn:last-child:not(:first-child) {\n border-top-right-radius: 0;\n border-top-left-radius: 0;\n border-bottom-right-radius: 4px;\n border-bottom-left-radius: 4px;\n}\n.btn-group-vertical > .btn-group:not(:first-child):not(:last-child) > .btn {\n border-radius: 0;\n}\n.btn-group-vertical > .btn-group:first-child:not(:last-child) > .btn:last-child,\n.btn-group-vertical > .btn-group:first-child:not(:last-child) > .dropdown-toggle {\n border-bottom-right-radius: 0;\n border-bottom-left-radius: 0;\n}\n.btn-group-vertical > .btn-group:last-child:not(:first-child) > .btn:first-child {\n border-top-right-radius: 0;\n border-top-left-radius: 0;\n}\n.btn-group-justified {\n display: table;\n width: 100%;\n table-layout: fixed;\n border-collapse: separate;\n}\n.btn-group-justified > .btn,\n.btn-group-justified > .btn-group {\n float: none;\n display: table-cell;\n width: 1%;\n}\n.btn-group-justified > .btn-group .btn {\n width: 100%;\n}\n.btn-group-justified > .btn-group .dropdown-menu {\n left: auto;\n}\n[data-toggle=\"buttons\"] > .btn input[type=\"radio\"],\n[data-toggle=\"buttons\"] > .btn-group > .btn input[type=\"radio\"],\n[data-toggle=\"buttons\"] > .btn input[type=\"checkbox\"],\n[data-toggle=\"buttons\"] > .btn-group > .btn input[type=\"checkbox\"] {\n position: absolute;\n clip: rect(0, 0, 0, 0);\n pointer-events: none;\n}\n.input-group {\n position: relative;\n display: table;\n border-collapse: separate;\n}\n.input-group[class*=\"col-\"] {\n float: none;\n padding-left: 0;\n padding-right: 0;\n}\n.input-group .form-control {\n position: relative;\n z-index: 2;\n float: left;\n width: 100%;\n margin-bottom: 0;\n}\n.input-group .form-control:focus {\n z-index: 3;\n}\n.input-group-lg > .form-control,\n.input-group-lg > .input-group-addon,\n.input-group-lg > .input-group-btn > .btn {\n height: 46px;\n padding: 10px 16px;\n font-size: 18px;\n line-height: 1.3333333;\n border-radius: 6px;\n}\nselect.input-group-lg > .form-control,\nselect.input-group-lg > .input-group-addon,\nselect.input-group-lg > .input-group-btn > .btn {\n height: 46px;\n line-height: 46px;\n}\ntextarea.input-group-lg > .form-control,\ntextarea.input-group-lg > .input-group-addon,\ntextarea.input-group-lg > .input-group-btn > .btn,\nselect[multiple].input-group-lg > .form-control,\nselect[multiple].input-group-lg > .input-group-addon,\nselect[multiple].input-group-lg > .input-group-btn > .btn {\n height: auto;\n}\n.input-group-sm > .form-control,\n.input-group-sm > .input-group-addon,\n.input-group-sm > .input-group-btn > .btn {\n height: 30px;\n padding: 5px 10px;\n font-size: 12px;\n line-height: 1.5;\n border-radius: 3px;\n}\nselect.input-group-sm > .form-control,\nselect.input-group-sm > .input-group-addon,\nselect.input-group-sm > .input-group-btn > .btn {\n height: 30px;\n line-height: 30px;\n}\ntextarea.input-group-sm > .form-control,\ntextarea.input-group-sm > .input-group-addon,\ntextarea.input-group-sm > .input-group-btn > .btn,\nselect[multiple].input-group-sm > .form-control,\nselect[multiple].input-group-sm > .input-group-addon,\nselect[multiple].input-group-sm > .input-group-btn > .btn {\n height: auto;\n}\n.input-group-addon,\n.input-group-btn,\n.input-group .form-control {\n display: table-cell;\n}\n.input-group-addon:not(:first-child):not(:last-child),\n.input-group-btn:not(:first-child):not(:last-child),\n.input-group .form-control:not(:first-child):not(:last-child) {\n border-radius: 0;\n}\n.input-group-addon,\n.input-group-btn {\n width: 1%;\n white-space: nowrap;\n vertical-align: middle;\n}\n.input-group-addon {\n padding: 6px 12px;\n font-size: 14px;\n font-weight: normal;\n line-height: 1;\n color: #555555;\n text-align: center;\n background-color: #eeeeee;\n border: 1px solid #ccc;\n border-radius: 4px;\n}\n.input-group-addon.input-sm {\n padding: 5px 10px;\n font-size: 12px;\n border-radius: 3px;\n}\n.input-group-addon.input-lg {\n padding: 10px 16px;\n font-size: 18px;\n border-radius: 6px;\n}\n.input-group-addon input[type=\"radio\"],\n.input-group-addon input[type=\"checkbox\"] {\n margin-top: 0;\n}\n.input-group .form-control:first-child,\n.input-group-addon:first-child,\n.input-group-btn:first-child > .btn,\n.input-group-btn:first-child > .btn-group > .btn,\n.input-group-btn:first-child > .dropdown-toggle,\n.input-group-btn:last-child > .btn:not(:last-child):not(.dropdown-toggle),\n.input-group-btn:last-child > .btn-group:not(:last-child) > .btn {\n border-bottom-right-radius: 0;\n border-top-right-radius: 0;\n}\n.input-group-addon:first-child {\n border-right: 0;\n}\n.input-group .form-control:last-child,\n.input-group-addon:last-child,\n.input-group-btn:last-child > .btn,\n.input-group-btn:last-child > .btn-group > .btn,\n.input-group-btn:last-child > .dropdown-toggle,\n.input-group-btn:first-child > .btn:not(:first-child),\n.input-group-btn:first-child > .btn-group:not(:first-child) > .btn {\n border-bottom-left-radius: 0;\n border-top-left-radius: 0;\n}\n.input-group-addon:last-child {\n border-left: 0;\n}\n.input-group-btn {\n position: relative;\n font-size: 0;\n white-space: nowrap;\n}\n.input-group-btn > .btn {\n position: relative;\n}\n.input-group-btn > .btn + .btn {\n margin-left: -1px;\n}\n.input-group-btn > .btn:hover,\n.input-group-btn > .btn:focus,\n.input-group-btn > .btn:active {\n z-index: 2;\n}\n.input-group-btn:first-child > .btn,\n.input-group-btn:first-child > .btn-group {\n margin-right: -1px;\n}\n.input-group-btn:last-child > .btn,\n.input-group-btn:last-child > .btn-group {\n z-index: 2;\n margin-left: -1px;\n}\n.nav {\n margin-bottom: 0;\n padding-left: 0;\n list-style: none;\n}\n.nav > li {\n position: relative;\n display: block;\n}\n.nav > li > a {\n position: relative;\n display: block;\n padding: 10px 15px;\n}\n.nav > li > a:hover,\n.nav > li > a:focus {\n text-decoration: none;\n background-color: #eeeeee;\n}\n.nav > li.disabled > a {\n color: #777777;\n}\n.nav > li.disabled > a:hover,\n.nav > li.disabled > a:focus {\n color: #777777;\n text-decoration: none;\n background-color: transparent;\n cursor: not-allowed;\n}\n.nav .open > a,\n.nav .open > a:hover,\n.nav .open > a:focus {\n background-color: #eeeeee;\n border-color: #337ab7;\n}\n.nav .nav-divider {\n height: 1px;\n margin: 9px 0;\n overflow: hidden;\n background-color: #e5e5e5;\n}\n.nav > li > a > img {\n max-width: none;\n}\n.nav-tabs {\n border-bottom: 1px solid #ddd;\n}\n.nav-tabs > li {\n float: left;\n margin-bottom: -1px;\n}\n.nav-tabs > li > a {\n margin-right: 2px;\n line-height: 1.42857143;\n border: 1px solid transparent;\n border-radius: 4px 4px 0 0;\n}\n.nav-tabs > li > a:hover {\n border-color: #eeeeee #eeeeee #ddd;\n}\n.nav-tabs > li.active > a,\n.nav-tabs > li.active > a:hover,\n.nav-tabs > li.active > a:focus {\n color: #555555;\n background-color: #fff;\n border: 1px solid #ddd;\n border-bottom-color: transparent;\n cursor: default;\n}\n.nav-tabs.nav-justified {\n width: 100%;\n border-bottom: 0;\n}\n.nav-tabs.nav-justified > li {\n float: none;\n}\n.nav-tabs.nav-justified > li > a {\n text-align: center;\n margin-bottom: 5px;\n}\n.nav-tabs.nav-justified > .dropdown .dropdown-menu {\n top: auto;\n left: auto;\n}\n@media (min-width: 768px) {\n .nav-tabs.nav-justified > li {\n display: table-cell;\n width: 1%;\n }\n .nav-tabs.nav-justified > li > a {\n margin-bottom: 0;\n }\n}\n.nav-tabs.nav-justified > li > a {\n margin-right: 0;\n border-radius: 4px;\n}\n.nav-tabs.nav-justified > .active > a,\n.nav-tabs.nav-justified > .active > a:hover,\n.nav-tabs.nav-justified > .active > a:focus {\n border: 1px solid #ddd;\n}\n@media (min-width: 768px) {\n .nav-tabs.nav-justified > li > a {\n border-bottom: 1px solid #ddd;\n border-radius: 4px 4px 0 0;\n }\n .nav-tabs.nav-justified > .active > a,\n .nav-tabs.nav-justified > .active > a:hover,\n .nav-tabs.nav-justified > .active > a:focus {\n border-bottom-color: #fff;\n }\n}\n.nav-pills > li {\n float: left;\n}\n.nav-pills > li > a {\n border-radius: 4px;\n}\n.nav-pills > li + li {\n margin-left: 2px;\n}\n.nav-pills > li.active > a,\n.nav-pills > li.active > a:hover,\n.nav-pills > li.active > a:focus {\n color: #fff;\n background-color: #337ab7;\n}\n.nav-stacked > li {\n float: none;\n}\n.nav-stacked > li + li {\n margin-top: 2px;\n margin-left: 0;\n}\n.nav-justified {\n width: 100%;\n}\n.nav-justified > li {\n float: none;\n}\n.nav-justified > li > a {\n text-align: center;\n margin-bottom: 5px;\n}\n.nav-justified > .dropdown .dropdown-menu {\n top: auto;\n left: auto;\n}\n@media (min-width: 768px) {\n .nav-justified > li {\n display: table-cell;\n width: 1%;\n }\n .nav-justified > li > a {\n margin-bottom: 0;\n }\n}\n.nav-tabs-justified {\n border-bottom: 0;\n}\n.nav-tabs-justified > li > a {\n margin-right: 0;\n border-radius: 4px;\n}\n.nav-tabs-justified > .active > a,\n.nav-tabs-justified > .active > a:hover,\n.nav-tabs-justified > .active > a:focus {\n border: 1px solid #ddd;\n}\n@media (min-width: 768px) {\n .nav-tabs-justified > li > a {\n border-bottom: 1px solid #ddd;\n border-radius: 4px 4px 0 0;\n }\n .nav-tabs-justified > .active > a,\n .nav-tabs-justified > .active > a:hover,\n .nav-tabs-justified > .active > a:focus {\n border-bottom-color: #fff;\n }\n}\n.tab-content > .tab-pane {\n display: none;\n}\n.tab-content > .active {\n display: block;\n}\n.nav-tabs .dropdown-menu {\n margin-top: -1px;\n border-top-right-radius: 0;\n border-top-left-radius: 0;\n}\n.navbar {\n position: relative;\n min-height: 50px;\n margin-bottom: 20px;\n border: 1px solid transparent;\n}\n@media (min-width: 768px) {\n .navbar {\n border-radius: 4px;\n }\n}\n@media (min-width: 768px) {\n .navbar-header {\n float: left;\n }\n}\n.navbar-collapse {\n overflow-x: visible;\n padding-right: 15px;\n padding-left: 15px;\n border-top: 1px solid transparent;\n box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);\n -webkit-overflow-scrolling: touch;\n}\n.navbar-collapse.in {\n overflow-y: auto;\n}\n@media (min-width: 768px) {\n .navbar-collapse {\n width: auto;\n border-top: 0;\n box-shadow: none;\n }\n .navbar-collapse.collapse {\n display: block !important;\n height: auto !important;\n padding-bottom: 0;\n overflow: visible !important;\n }\n .navbar-collapse.in {\n overflow-y: visible;\n }\n .navbar-fixed-top .navbar-collapse,\n .navbar-static-top .navbar-collapse,\n .navbar-fixed-bottom .navbar-collapse {\n padding-left: 0;\n padding-right: 0;\n }\n}\n.navbar-fixed-top .navbar-collapse,\n.navbar-fixed-bottom .navbar-collapse {\n max-height: 340px;\n}\n@media (max-device-width: 480px) and (orientation: landscape) {\n .navbar-fixed-top .navbar-collapse,\n .navbar-fixed-bottom .navbar-collapse {\n max-height: 200px;\n }\n}\n.container > .navbar-header,\n.container-fluid > .navbar-header,\n.container > .navbar-collapse,\n.container-fluid > .navbar-collapse {\n margin-right: -15px;\n margin-left: -15px;\n}\n@media (min-width: 768px) {\n .container > .navbar-header,\n .container-fluid > .navbar-header,\n .container > .navbar-collapse,\n .container-fluid > .navbar-collapse {\n margin-right: 0;\n margin-left: 0;\n }\n}\n.navbar-static-top {\n z-index: 1000;\n border-width: 0 0 1px;\n}\n@media (min-width: 768px) {\n .navbar-static-top {\n border-radius: 0;\n }\n}\n.navbar-fixed-top,\n.navbar-fixed-bottom {\n position: fixed;\n right: 0;\n left: 0;\n z-index: 1030;\n}\n@media (min-width: 768px) {\n .navbar-fixed-top,\n .navbar-fixed-bottom {\n border-radius: 0;\n }\n}\n.navbar-fixed-top {\n top: 0;\n border-width: 0 0 1px;\n}\n.navbar-fixed-bottom {\n bottom: 0;\n margin-bottom: 0;\n border-width: 1px 0 0;\n}\n.navbar-brand {\n float: left;\n padding: 15px 15px;\n font-size: 18px;\n line-height: 20px;\n height: 50px;\n}\n.navbar-brand:hover,\n.navbar-brand:focus {\n text-decoration: none;\n}\n.navbar-brand > img {\n display: block;\n}\n@media (min-width: 768px) {\n .navbar > .container .navbar-brand,\n .navbar > .container-fluid .navbar-brand {\n margin-left: -15px;\n }\n}\n.navbar-toggle {\n position: relative;\n float: right;\n margin-right: 15px;\n padding: 9px 10px;\n margin-top: 8px;\n margin-bottom: 8px;\n background-color: transparent;\n background-image: none;\n border: 1px solid transparent;\n border-radius: 4px;\n}\n.navbar-toggle:focus {\n outline: 0;\n}\n.navbar-toggle .icon-bar {\n display: block;\n width: 22px;\n height: 2px;\n border-radius: 1px;\n}\n.navbar-toggle .icon-bar + .icon-bar {\n margin-top: 4px;\n}\n@media (min-width: 768px) {\n .navbar-toggle {\n display: none;\n }\n}\n.navbar-nav {\n margin: 7.5px -15px;\n}\n.navbar-nav > li > a {\n padding-top: 10px;\n padding-bottom: 10px;\n line-height: 20px;\n}\n@media (max-width: 767px) {\n .navbar-nav .open .dropdown-menu {\n position: static;\n float: none;\n width: auto;\n margin-top: 0;\n background-color: transparent;\n border: 0;\n box-shadow: none;\n }\n .navbar-nav .open .dropdown-menu > li > a,\n .navbar-nav .open .dropdown-menu .dropdown-header {\n padding: 5px 15px 5px 25px;\n }\n .navbar-nav .open .dropdown-menu > li > a {\n line-height: 20px;\n }\n .navbar-nav .open .dropdown-menu > li > a:hover,\n .navbar-nav .open .dropdown-menu > li > a:focus {\n background-image: none;\n }\n}\n@media (min-width: 768px) {\n .navbar-nav {\n float: left;\n margin: 0;\n }\n .navbar-nav > li {\n float: left;\n }\n .navbar-nav > li > a {\n padding-top: 15px;\n padding-bottom: 15px;\n }\n}\n.navbar-form {\n margin-left: -15px;\n margin-right: -15px;\n padding: 10px 15px;\n border-top: 1px solid transparent;\n border-bottom: 1px solid transparent;\n -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1);\n box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1);\n margin-top: 8px;\n margin-bottom: 8px;\n}\n@media (min-width: 768px) {\n .navbar-form .form-group {\n display: inline-block;\n margin-bottom: 0;\n vertical-align: middle;\n }\n .navbar-form .form-control {\n display: inline-block;\n width: auto;\n vertical-align: middle;\n }\n .navbar-form .form-control-static {\n display: inline-block;\n }\n .navbar-form .input-group {\n display: inline-table;\n vertical-align: middle;\n }\n .navbar-form .input-group .input-group-addon,\n .navbar-form .input-group .input-group-btn,\n .navbar-form .input-group .form-control {\n width: auto;\n }\n .navbar-form .input-group > .form-control {\n width: 100%;\n }\n .navbar-form .control-label {\n margin-bottom: 0;\n vertical-align: middle;\n }\n .navbar-form .radio,\n .navbar-form .checkbox {\n display: inline-block;\n margin-top: 0;\n margin-bottom: 0;\n vertical-align: middle;\n }\n .navbar-form .radio label,\n .navbar-form .checkbox label {\n padding-left: 0;\n }\n .navbar-form .radio input[type=\"radio\"],\n .navbar-form .checkbox input[type=\"checkbox\"] {\n position: relative;\n margin-left: 0;\n }\n .navbar-form .has-feedback .form-control-feedback {\n top: 0;\n }\n}\n@media (max-width: 767px) {\n .navbar-form .form-group {\n margin-bottom: 5px;\n }\n .navbar-form .form-group:last-child {\n margin-bottom: 0;\n }\n}\n@media (min-width: 768px) {\n .navbar-form {\n width: auto;\n border: 0;\n margin-left: 0;\n margin-right: 0;\n padding-top: 0;\n padding-bottom: 0;\n -webkit-box-shadow: none;\n box-shadow: none;\n }\n}\n.navbar-nav > li > .dropdown-menu {\n margin-top: 0;\n border-top-right-radius: 0;\n border-top-left-radius: 0;\n}\n.navbar-fixed-bottom .navbar-nav > li > .dropdown-menu {\n margin-bottom: 0;\n border-top-right-radius: 4px;\n border-top-left-radius: 4px;\n border-bottom-right-radius: 0;\n border-bottom-left-radius: 0;\n}\n.navbar-btn {\n margin-top: 8px;\n margin-bottom: 8px;\n}\n.navbar-btn.btn-sm {\n margin-top: 10px;\n margin-bottom: 10px;\n}\n.navbar-btn.btn-xs {\n margin-top: 14px;\n margin-bottom: 14px;\n}\n.navbar-text {\n margin-top: 15px;\n margin-bottom: 15px;\n}\n@media (min-width: 768px) {\n .navbar-text {\n float: left;\n margin-left: 15px;\n margin-right: 15px;\n }\n}\n@media (min-width: 768px) {\n .navbar-left {\n float: left !important;\n }\n .navbar-right {\n float: right !important;\n margin-right: -15px;\n }\n .navbar-right ~ .navbar-right {\n margin-right: 0;\n }\n}\n.navbar-default {\n background-color: #f8f8f8;\n border-color: #e7e7e7;\n}\n.navbar-default .navbar-brand {\n color: #777;\n}\n.navbar-default .navbar-brand:hover,\n.navbar-default .navbar-brand:focus {\n color: #5e5e5e;\n background-color: transparent;\n}\n.navbar-default .navbar-text {\n color: #777;\n}\n.navbar-default .navbar-nav > li > a {\n color: #777;\n}\n.navbar-default .navbar-nav > li > a:hover,\n.navbar-default .navbar-nav > li > a:focus {\n color: #333;\n background-color: transparent;\n}\n.navbar-default .navbar-nav > .active > a,\n.navbar-default .navbar-nav > .active > a:hover,\n.navbar-default .navbar-nav > .active > a:focus {\n color: #555;\n background-color: #e7e7e7;\n}\n.navbar-default .navbar-nav > .disabled > a,\n.navbar-default .navbar-nav > .disabled > a:hover,\n.navbar-default .navbar-nav > .disabled > a:focus {\n color: #ccc;\n background-color: transparent;\n}\n.navbar-default .navbar-toggle {\n border-color: #ddd;\n}\n.navbar-default .navbar-toggle:hover,\n.navbar-default .navbar-toggle:focus {\n background-color: #ddd;\n}\n.navbar-default .navbar-toggle .icon-bar {\n background-color: #888;\n}\n.navbar-default .navbar-collapse,\n.navbar-default .navbar-form {\n border-color: #e7e7e7;\n}\n.navbar-default .navbar-nav > .open > a,\n.navbar-default .navbar-nav > .open > a:hover,\n.navbar-default .navbar-nav > .open > a:focus {\n background-color: #e7e7e7;\n color: #555;\n}\n@media (max-width: 767px) {\n .navbar-default .navbar-nav .open .dropdown-menu > li > a {\n color: #777;\n }\n .navbar-default .navbar-nav .open .dropdown-menu > li > a:hover,\n .navbar-default .navbar-nav .open .dropdown-menu > li > a:focus {\n color: #333;\n background-color: transparent;\n }\n .navbar-default .navbar-nav .open .dropdown-menu > .active > a,\n .navbar-default .navbar-nav .open .dropdown-menu > .active > a:hover,\n .navbar-default .navbar-nav .open .dropdown-menu > .active > a:focus {\n color: #555;\n background-color: #e7e7e7;\n }\n .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a,\n .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a:hover,\n .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a:focus {\n color: #ccc;\n background-color: transparent;\n }\n}\n.navbar-default .navbar-link {\n color: #777;\n}\n.navbar-default .navbar-link:hover {\n color: #333;\n}\n.navbar-default .btn-link {\n color: #777;\n}\n.navbar-default .btn-link:hover,\n.navbar-default .btn-link:focus {\n color: #333;\n}\n.navbar-default .btn-link[disabled]:hover,\nfieldset[disabled] .navbar-default .btn-link:hover,\n.navbar-default .btn-link[disabled]:focus,\nfieldset[disabled] .navbar-default .btn-link:focus {\n color: #ccc;\n}\n.navbar-inverse {\n background-color: #222;\n border-color: #080808;\n}\n.navbar-inverse .navbar-brand {\n color: #9d9d9d;\n}\n.navbar-inverse .navbar-brand:hover,\n.navbar-inverse .navbar-brand:focus {\n color: #fff;\n background-color: transparent;\n}\n.navbar-inverse .navbar-text {\n color: #9d9d9d;\n}\n.navbar-inverse .navbar-nav > li > a {\n color: #9d9d9d;\n}\n.navbar-inverse .navbar-nav > li > a:hover,\n.navbar-inverse .navbar-nav > li > a:focus {\n color: #fff;\n background-color: transparent;\n}\n.navbar-inverse .navbar-nav > .active > a,\n.navbar-inverse .navbar-nav > .active > a:hover,\n.navbar-inverse .navbar-nav > .active > a:focus {\n color: #fff;\n background-color: #080808;\n}\n.navbar-inverse .navbar-nav > .disabled > a,\n.navbar-inverse .navbar-nav > .disabled > a:hover,\n.navbar-inverse .navbar-nav > .disabled > a:focus {\n color: #444;\n background-color: transparent;\n}\n.navbar-inverse .navbar-toggle {\n border-color: #333;\n}\n.navbar-inverse .navbar-toggle:hover,\n.navbar-inverse .navbar-toggle:focus {\n background-color: #333;\n}\n.navbar-inverse .navbar-toggle .icon-bar {\n background-color: #fff;\n}\n.navbar-inverse .navbar-collapse,\n.navbar-inverse .navbar-form {\n border-color: #101010;\n}\n.navbar-inverse .navbar-nav > .open > a,\n.navbar-inverse .navbar-nav > .open > a:hover,\n.navbar-inverse .navbar-nav > .open > a:focus {\n background-color: #080808;\n color: #fff;\n}\n@media (max-width: 767px) {\n .navbar-inverse .navbar-nav .open .dropdown-menu > .dropdown-header {\n border-color: #080808;\n }\n .navbar-inverse .navbar-nav .open .dropdown-menu .divider {\n background-color: #080808;\n }\n .navbar-inverse .navbar-nav .open .dropdown-menu > li > a {\n color: #9d9d9d;\n }\n .navbar-inverse .navbar-nav .open .dropdown-menu > li > a:hover,\n .navbar-inverse .navbar-nav .open .dropdown-menu > li > a:focus {\n color: #fff;\n background-color: transparent;\n }\n .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a,\n .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a:hover,\n .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a:focus {\n color: #fff;\n background-color: #080808;\n }\n .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a,\n .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a:hover,\n .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a:focus {\n color: #444;\n background-color: transparent;\n }\n}\n.navbar-inverse .navbar-link {\n color: #9d9d9d;\n}\n.navbar-inverse .navbar-link:hover {\n color: #fff;\n}\n.navbar-inverse .btn-link {\n color: #9d9d9d;\n}\n.navbar-inverse .btn-link:hover,\n.navbar-inverse .btn-link:focus {\n color: #fff;\n}\n.navbar-inverse .btn-link[disabled]:hover,\nfieldset[disabled] .navbar-inverse .btn-link:hover,\n.navbar-inverse .btn-link[disabled]:focus,\nfieldset[disabled] .navbar-inverse .btn-link:focus {\n color: #444;\n}\n.breadcrumb {\n padding: 8px 15px;\n margin-bottom: 20px;\n list-style: none;\n background-color: #f5f5f5;\n border-radius: 4px;\n}\n.breadcrumb > li {\n display: inline-block;\n}\n.breadcrumb > li + li:before {\n content: \"/\\00a0\";\n padding: 0 5px;\n color: #ccc;\n}\n.breadcrumb > .active {\n color: #777777;\n}\n.pagination {\n display: inline-block;\n padding-left: 0;\n margin: 20px 0;\n border-radius: 4px;\n}\n.pagination > li {\n display: inline;\n}\n.pagination > li > a,\n.pagination > li > span {\n position: relative;\n float: left;\n padding: 6px 12px;\n line-height: 1.42857143;\n text-decoration: none;\n color: #337ab7;\n background-color: #fff;\n border: 1px solid #ddd;\n margin-left: -1px;\n}\n.pagination > li:first-child > a,\n.pagination > li:first-child > span {\n margin-left: 0;\n border-bottom-left-radius: 4px;\n border-top-left-radius: 4px;\n}\n.pagination > li:last-child > a,\n.pagination > li:last-child > span {\n border-bottom-right-radius: 4px;\n border-top-right-radius: 4px;\n}\n.pagination > li > a:hover,\n.pagination > li > span:hover,\n.pagination > li > a:focus,\n.pagination > li > span:focus {\n z-index: 2;\n color: #23527c;\n background-color: #eeeeee;\n border-color: #ddd;\n}\n.pagination > .active > a,\n.pagination > .active > span,\n.pagination > .active > a:hover,\n.pagination > .active > span:hover,\n.pagination > .active > a:focus,\n.pagination > .active > span:focus {\n z-index: 3;\n color: #fff;\n background-color: #337ab7;\n border-color: #337ab7;\n cursor: default;\n}\n.pagination > .disabled > span,\n.pagination > .disabled > span:hover,\n.pagination > .disabled > span:focus,\n.pagination > .disabled > a,\n.pagination > .disabled > a:hover,\n.pagination > .disabled > a:focus {\n color: #777777;\n background-color: #fff;\n border-color: #ddd;\n cursor: not-allowed;\n}\n.pagination-lg > li > a,\n.pagination-lg > li > span {\n padding: 10px 16px;\n font-size: 18px;\n line-height: 1.3333333;\n}\n.pagination-lg > li:first-child > a,\n.pagination-lg > li:first-child > span {\n border-bottom-left-radius: 6px;\n border-top-left-radius: 6px;\n}\n.pagination-lg > li:last-child > a,\n.pagination-lg > li:last-child > span {\n border-bottom-right-radius: 6px;\n border-top-right-radius: 6px;\n}\n.pagination-sm > li > a,\n.pagination-sm > li > span {\n padding: 5px 10px;\n font-size: 12px;\n line-height: 1.5;\n}\n.pagination-sm > li:first-child > a,\n.pagination-sm > li:first-child > span {\n border-bottom-left-radius: 3px;\n border-top-left-radius: 3px;\n}\n.pagination-sm > li:last-child > a,\n.pagination-sm > li:last-child > span {\n border-bottom-right-radius: 3px;\n border-top-right-radius: 3px;\n}\n.pager {\n padding-left: 0;\n margin: 20px 0;\n list-style: none;\n text-align: center;\n}\n.pager li {\n display: inline;\n}\n.pager li > a,\n.pager li > span {\n display: inline-block;\n padding: 5px 14px;\n background-color: #fff;\n border: 1px solid #ddd;\n border-radius: 15px;\n}\n.pager li > a:hover,\n.pager li > a:focus {\n text-decoration: none;\n background-color: #eeeeee;\n}\n.pager .next > a,\n.pager .next > span {\n float: right;\n}\n.pager .previous > a,\n.pager .previous > span {\n float: left;\n}\n.pager .disabled > a,\n.pager .disabled > a:hover,\n.pager .disabled > a:focus,\n.pager .disabled > span {\n color: #777777;\n background-color: #fff;\n cursor: not-allowed;\n}\n.label {\n display: inline;\n padding: .2em .6em .3em;\n font-size: 75%;\n font-weight: bold;\n line-height: 1;\n color: #fff;\n text-align: center;\n white-space: nowrap;\n vertical-align: baseline;\n border-radius: .25em;\n}\na.label:hover,\na.label:focus {\n color: #fff;\n text-decoration: none;\n cursor: pointer;\n}\n.label:empty {\n display: none;\n}\n.btn .label {\n position: relative;\n top: -1px;\n}\n.label-default {\n background-color: #777777;\n}\n.label-default[href]:hover,\n.label-default[href]:focus {\n background-color: #5e5e5e;\n}\n.label-primary {\n background-color: #337ab7;\n}\n.label-primary[href]:hover,\n.label-primary[href]:focus {\n background-color: #286090;\n}\n.label-success {\n background-color: #5cb85c;\n}\n.label-success[href]:hover,\n.label-success[href]:focus {\n background-color: #449d44;\n}\n.label-info {\n background-color: #5bc0de;\n}\n.label-info[href]:hover,\n.label-info[href]:focus {\n background-color: #31b0d5;\n}\n.label-warning {\n background-color: #f0ad4e;\n}\n.label-warning[href]:hover,\n.label-warning[href]:focus {\n background-color: #ec971f;\n}\n.label-danger {\n background-color: #d9534f;\n}\n.label-danger[href]:hover,\n.label-danger[href]:focus {\n background-color: #c9302c;\n}\n.badge {\n display: inline-block;\n min-width: 10px;\n padding: 3px 7px;\n font-size: 12px;\n font-weight: bold;\n color: #fff;\n line-height: 1;\n vertical-align: middle;\n white-space: nowrap;\n text-align: center;\n background-color: #777777;\n border-radius: 10px;\n}\n.badge:empty {\n display: none;\n}\n.btn .badge {\n position: relative;\n top: -1px;\n}\n.btn-xs .badge,\n.btn-group-xs > .btn .badge {\n top: 0;\n padding: 1px 5px;\n}\na.badge:hover,\na.badge:focus {\n color: #fff;\n text-decoration: none;\n cursor: pointer;\n}\n.list-group-item.active > .badge,\n.nav-pills > .active > a > .badge {\n color: #337ab7;\n background-color: #fff;\n}\n.list-group-item > .badge {\n float: right;\n}\n.list-group-item > .badge + .badge {\n margin-right: 5px;\n}\n.nav-pills > li > a > .badge {\n margin-left: 3px;\n}\n.jumbotron {\n padding-top: 30px;\n padding-bottom: 30px;\n margin-bottom: 30px;\n color: inherit;\n background-color: #eeeeee;\n}\n.jumbotron h1,\n.jumbotron .h1 {\n color: inherit;\n}\n.jumbotron p {\n margin-bottom: 15px;\n font-size: 21px;\n font-weight: 200;\n}\n.jumbotron > hr {\n border-top-color: #d5d5d5;\n}\n.container .jumbotron,\n.container-fluid .jumbotron {\n border-radius: 6px;\n padding-left: 15px;\n padding-right: 15px;\n}\n.jumbotron .container {\n max-width: 100%;\n}\n@media screen and (min-width: 768px) {\n .jumbotron {\n padding-top: 48px;\n padding-bottom: 48px;\n }\n .container .jumbotron,\n .container-fluid .jumbotron {\n padding-left: 60px;\n padding-right: 60px;\n }\n .jumbotron h1,\n .jumbotron .h1 {\n font-size: 63px;\n }\n}\n.thumbnail {\n display: block;\n padding: 4px;\n margin-bottom: 20px;\n line-height: 1.42857143;\n background-color: #fff;\n border: 1px solid #ddd;\n border-radius: 4px;\n -webkit-transition: border 0.2s ease-in-out;\n -o-transition: border 0.2s ease-in-out;\n transition: border 0.2s ease-in-out;\n}\n.thumbnail > img,\n.thumbnail a > img {\n margin-left: auto;\n margin-right: auto;\n}\na.thumbnail:hover,\na.thumbnail:focus,\na.thumbnail.active {\n border-color: #337ab7;\n}\n.thumbnail .caption {\n padding: 9px;\n color: #333333;\n}\n.alert {\n padding: 15px;\n margin-bottom: 20px;\n border: 1px solid transparent;\n border-radius: 4px;\n}\n.alert h4 {\n margin-top: 0;\n color: inherit;\n}\n.alert .alert-link {\n font-weight: bold;\n}\n.alert > p,\n.alert > ul {\n margin-bottom: 0;\n}\n.alert > p + p {\n margin-top: 5px;\n}\n.alert-dismissable,\n.alert-dismissible {\n padding-right: 35px;\n}\n.alert-dismissable .close,\n.alert-dismissible .close {\n position: relative;\n top: -2px;\n right: -21px;\n color: inherit;\n}\n.alert-success {\n background-color: #dff0d8;\n border-color: #d6e9c6;\n color: #3c763d;\n}\n.alert-success hr {\n border-top-color: #c9e2b3;\n}\n.alert-success .alert-link {\n color: #2b542c;\n}\n.alert-info {\n background-color: #d9edf7;\n border-color: #bce8f1;\n color: #31708f;\n}\n.alert-info hr {\n border-top-color: #a6e1ec;\n}\n.alert-info .alert-link {\n color: #245269;\n}\n.alert-warning {\n background-color: #fcf8e3;\n border-color: #faebcc;\n color: #8a6d3b;\n}\n.alert-warning hr {\n border-top-color: #f7e1b5;\n}\n.alert-warning .alert-link {\n color: #66512c;\n}\n.alert-danger {\n background-color: #f2dede;\n border-color: #ebccd1;\n color: #a94442;\n}\n.alert-danger hr {\n border-top-color: #e4b9c0;\n}\n.alert-danger .alert-link {\n color: #843534;\n}\n@-webkit-keyframes progress-bar-stripes {\n from {\n background-position: 40px 0;\n }\n to {\n background-position: 0 0;\n }\n}\n@keyframes progress-bar-stripes {\n from {\n background-position: 40px 0;\n }\n to {\n background-position: 0 0;\n }\n}\n.progress {\n overflow: hidden;\n height: 20px;\n margin-bottom: 20px;\n background-color: #f5f5f5;\n border-radius: 4px;\n -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);\n box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);\n}\n.progress-bar {\n float: left;\n width: 0%;\n height: 100%;\n font-size: 12px;\n line-height: 20px;\n color: #fff;\n text-align: center;\n background-color: #337ab7;\n -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15);\n box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15);\n -webkit-transition: width 0.6s ease;\n -o-transition: width 0.6s ease;\n transition: width 0.6s ease;\n}\n.progress-striped .progress-bar,\n.progress-bar-striped {\n background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-size: 40px 40px;\n}\n.progress.active .progress-bar,\n.progress-bar.active {\n -webkit-animation: progress-bar-stripes 2s linear infinite;\n -o-animation: progress-bar-stripes 2s linear infinite;\n animation: progress-bar-stripes 2s linear infinite;\n}\n.progress-bar-success {\n background-color: #5cb85c;\n}\n.progress-striped .progress-bar-success {\n background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n}\n.progress-bar-info {\n background-color: #5bc0de;\n}\n.progress-striped .progress-bar-info {\n background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n}\n.progress-bar-warning {\n background-color: #f0ad4e;\n}\n.progress-striped .progress-bar-warning {\n background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n}\n.progress-bar-danger {\n background-color: #d9534f;\n}\n.progress-striped .progress-bar-danger {\n background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n}\n.media {\n margin-top: 15px;\n}\n.media:first-child {\n margin-top: 0;\n}\n.media,\n.media-body {\n zoom: 1;\n overflow: hidden;\n}\n.media-body {\n width: 10000px;\n}\n.media-object {\n display: block;\n}\n.media-object.img-thumbnail {\n max-width: none;\n}\n.media-right,\n.media > .pull-right {\n padding-left: 10px;\n}\n.media-left,\n.media > .pull-left {\n padding-right: 10px;\n}\n.media-left,\n.media-right,\n.media-body {\n display: table-cell;\n vertical-align: top;\n}\n.media-middle {\n vertical-align: middle;\n}\n.media-bottom {\n vertical-align: bottom;\n}\n.media-heading {\n margin-top: 0;\n margin-bottom: 5px;\n}\n.media-list {\n padding-left: 0;\n list-style: none;\n}\n.list-group {\n margin-bottom: 20px;\n padding-left: 0;\n}\n.list-group-item {\n position: relative;\n display: block;\n padding: 10px 15px;\n margin-bottom: -1px;\n background-color: #fff;\n border: 1px solid #ddd;\n}\n.list-group-item:first-child {\n border-top-right-radius: 4px;\n border-top-left-radius: 4px;\n}\n.list-group-item:last-child {\n margin-bottom: 0;\n border-bottom-right-radius: 4px;\n border-bottom-left-radius: 4px;\n}\na.list-group-item,\nbutton.list-group-item {\n color: #555;\n}\na.list-group-item .list-group-item-heading,\nbutton.list-group-item .list-group-item-heading {\n color: #333;\n}\na.list-group-item:hover,\nbutton.list-group-item:hover,\na.list-group-item:focus,\nbutton.list-group-item:focus {\n text-decoration: none;\n color: #555;\n background-color: #f5f5f5;\n}\nbutton.list-group-item {\n width: 100%;\n text-align: left;\n}\n.list-group-item.disabled,\n.list-group-item.disabled:hover,\n.list-group-item.disabled:focus {\n background-color: #eeeeee;\n color: #777777;\n cursor: not-allowed;\n}\n.list-group-item.disabled .list-group-item-heading,\n.list-group-item.disabled:hover .list-group-item-heading,\n.list-group-item.disabled:focus .list-group-item-heading {\n color: inherit;\n}\n.list-group-item.disabled .list-group-item-text,\n.list-group-item.disabled:hover .list-group-item-text,\n.list-group-item.disabled:focus .list-group-item-text {\n color: #777777;\n}\n.list-group-item.active,\n.list-group-item.active:hover,\n.list-group-item.active:focus {\n z-index: 2;\n color: #fff;\n background-color: #337ab7;\n border-color: #337ab7;\n}\n.list-group-item.active .list-group-item-heading,\n.list-group-item.active:hover .list-group-item-heading,\n.list-group-item.active:focus .list-group-item-heading,\n.list-group-item.active .list-group-item-heading > small,\n.list-group-item.active:hover .list-group-item-heading > small,\n.list-group-item.active:focus .list-group-item-heading > small,\n.list-group-item.active .list-group-item-heading > .small,\n.list-group-item.active:hover .list-group-item-heading > .small,\n.list-group-item.active:focus .list-group-item-heading > .small {\n color: inherit;\n}\n.list-group-item.active .list-group-item-text,\n.list-group-item.active:hover .list-group-item-text,\n.list-group-item.active:focus .list-group-item-text {\n color: #c7ddef;\n}\n.list-group-item-success {\n color: #3c763d;\n background-color: #dff0d8;\n}\na.list-group-item-success,\nbutton.list-group-item-success {\n color: #3c763d;\n}\na.list-group-item-success .list-group-item-heading,\nbutton.list-group-item-success .list-group-item-heading {\n color: inherit;\n}\na.list-group-item-success:hover,\nbutton.list-group-item-success:hover,\na.list-group-item-success:focus,\nbutton.list-group-item-success:focus {\n color: #3c763d;\n background-color: #d0e9c6;\n}\na.list-group-item-success.active,\nbutton.list-group-item-success.active,\na.list-group-item-success.active:hover,\nbutton.list-group-item-success.active:hover,\na.list-group-item-success.active:focus,\nbutton.list-group-item-success.active:focus {\n color: #fff;\n background-color: #3c763d;\n border-color: #3c763d;\n}\n.list-group-item-info {\n color: #31708f;\n background-color: #d9edf7;\n}\na.list-group-item-info,\nbutton.list-group-item-info {\n color: #31708f;\n}\na.list-group-item-info .list-group-item-heading,\nbutton.list-group-item-info .list-group-item-heading {\n color: inherit;\n}\na.list-group-item-info:hover,\nbutton.list-group-item-info:hover,\na.list-group-item-info:focus,\nbutton.list-group-item-info:focus {\n color: #31708f;\n background-color: #c4e3f3;\n}\na.list-group-item-info.active,\nbutton.list-group-item-info.active,\na.list-group-item-info.active:hover,\nbutton.list-group-item-info.active:hover,\na.list-group-item-info.active:focus,\nbutton.list-group-item-info.active:focus {\n color: #fff;\n background-color: #31708f;\n border-color: #31708f;\n}\n.list-group-item-warning {\n color: #8a6d3b;\n background-color: #fcf8e3;\n}\na.list-group-item-warning,\nbutton.list-group-item-warning {\n color: #8a6d3b;\n}\na.list-group-item-warning .list-group-item-heading,\nbutton.list-group-item-warning .list-group-item-heading {\n color: inherit;\n}\na.list-group-item-warning:hover,\nbutton.list-group-item-warning:hover,\na.list-group-item-warning:focus,\nbutton.list-group-item-warning:focus {\n color: #8a6d3b;\n background-color: #faf2cc;\n}\na.list-group-item-warning.active,\nbutton.list-group-item-warning.active,\na.list-group-item-warning.active:hover,\nbutton.list-group-item-warning.active:hover,\na.list-group-item-warning.active:focus,\nbutton.list-group-item-warning.active:focus {\n color: #fff;\n background-color: #8a6d3b;\n border-color: #8a6d3b;\n}\n.list-group-item-danger {\n color: #a94442;\n background-color: #f2dede;\n}\na.list-group-item-danger,\nbutton.list-group-item-danger {\n color: #a94442;\n}\na.list-group-item-danger .list-group-item-heading,\nbutton.list-group-item-danger .list-group-item-heading {\n color: inherit;\n}\na.list-group-item-danger:hover,\nbutton.list-group-item-danger:hover,\na.list-group-item-danger:focus,\nbutton.list-group-item-danger:focus {\n color: #a94442;\n background-color: #ebcccc;\n}\na.list-group-item-danger.active,\nbutton.list-group-item-danger.active,\na.list-group-item-danger.active:hover,\nbutton.list-group-item-danger.active:hover,\na.list-group-item-danger.active:focus,\nbutton.list-group-item-danger.active:focus {\n color: #fff;\n background-color: #a94442;\n border-color: #a94442;\n}\n.list-group-item-heading {\n margin-top: 0;\n margin-bottom: 5px;\n}\n.list-group-item-text {\n margin-bottom: 0;\n line-height: 1.3;\n}\n.panel {\n margin-bottom: 20px;\n background-color: #fff;\n border: 1px solid transparent;\n border-radius: 4px;\n -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);\n box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);\n}\n.panel-body {\n padding: 15px;\n}\n.panel-heading {\n padding: 10px 15px;\n border-bottom: 1px solid transparent;\n border-top-right-radius: 3px;\n border-top-left-radius: 3px;\n}\n.panel-heading > .dropdown .dropdown-toggle {\n color: inherit;\n}\n.panel-title {\n margin-top: 0;\n margin-bottom: 0;\n font-size: 16px;\n color: inherit;\n}\n.panel-title > a,\n.panel-title > small,\n.panel-title > .small,\n.panel-title > small > a,\n.panel-title > .small > a {\n color: inherit;\n}\n.panel-footer {\n padding: 10px 15px;\n background-color: #f5f5f5;\n border-top: 1px solid #ddd;\n border-bottom-right-radius: 3px;\n border-bottom-left-radius: 3px;\n}\n.panel > .list-group,\n.panel > .panel-collapse > .list-group {\n margin-bottom: 0;\n}\n.panel > .list-group .list-group-item,\n.panel > .panel-collapse > .list-group .list-group-item {\n border-width: 1px 0;\n border-radius: 0;\n}\n.panel > .list-group:first-child .list-group-item:first-child,\n.panel > .panel-collapse > .list-group:first-child .list-group-item:first-child {\n border-top: 0;\n border-top-right-radius: 3px;\n border-top-left-radius: 3px;\n}\n.panel > .list-group:last-child .list-group-item:last-child,\n.panel > .panel-collapse > .list-group:last-child .list-group-item:last-child {\n border-bottom: 0;\n border-bottom-right-radius: 3px;\n border-bottom-left-radius: 3px;\n}\n.panel > .panel-heading + .panel-collapse > .list-group .list-group-item:first-child {\n border-top-right-radius: 0;\n border-top-left-radius: 0;\n}\n.panel-heading + .list-group .list-group-item:first-child {\n border-top-width: 0;\n}\n.list-group + .panel-footer {\n border-top-width: 0;\n}\n.panel > .table,\n.panel > .table-responsive > .table,\n.panel > .panel-collapse > .table {\n margin-bottom: 0;\n}\n.panel > .table caption,\n.panel > .table-responsive > .table caption,\n.panel > .panel-collapse > .table caption {\n padding-left: 15px;\n padding-right: 15px;\n}\n.panel > .table:first-child,\n.panel > .table-responsive:first-child > .table:first-child {\n border-top-right-radius: 3px;\n border-top-left-radius: 3px;\n}\n.panel > .table:first-child > thead:first-child > tr:first-child,\n.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child,\n.panel > .table:first-child > tbody:first-child > tr:first-child,\n.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child {\n border-top-left-radius: 3px;\n border-top-right-radius: 3px;\n}\n.panel > .table:first-child > thead:first-child > tr:first-child td:first-child,\n.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child td:first-child,\n.panel > .table:first-child > tbody:first-child > tr:first-child td:first-child,\n.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child td:first-child,\n.panel > .table:first-child > thead:first-child > tr:first-child th:first-child,\n.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child th:first-child,\n.panel > .table:first-child > tbody:first-child > tr:first-child th:first-child,\n.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child th:first-child {\n border-top-left-radius: 3px;\n}\n.panel > .table:first-child > thead:first-child > tr:first-child td:last-child,\n.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child td:last-child,\n.panel > .table:first-child > tbody:first-child > tr:first-child td:last-child,\n.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child td:last-child,\n.panel > .table:first-child > thead:first-child > tr:first-child th:last-child,\n.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child th:last-child,\n.panel > .table:first-child > tbody:first-child > tr:first-child th:last-child,\n.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child th:last-child {\n border-top-right-radius: 3px;\n}\n.panel > .table:last-child,\n.panel > .table-responsive:last-child > .table:last-child {\n border-bottom-right-radius: 3px;\n border-bottom-left-radius: 3px;\n}\n.panel > .table:last-child > tbody:last-child > tr:last-child,\n.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child,\n.panel > .table:last-child > tfoot:last-child > tr:last-child,\n.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child {\n border-bottom-left-radius: 3px;\n border-bottom-right-radius: 3px;\n}\n.panel > .table:last-child > tbody:last-child > tr:last-child td:first-child,\n.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child td:first-child,\n.panel > .table:last-child > tfoot:last-child > tr:last-child td:first-child,\n.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child td:first-child,\n.panel > .table:last-child > tbody:last-child > tr:last-child th:first-child,\n.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child th:first-child,\n.panel > .table:last-child > tfoot:last-child > tr:last-child th:first-child,\n.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child th:first-child {\n border-bottom-left-radius: 3px;\n}\n.panel > .table:last-child > tbody:last-child > tr:last-child td:last-child,\n.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child td:last-child,\n.panel > .table:last-child > tfoot:last-child > tr:last-child td:last-child,\n.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child td:last-child,\n.panel > .table:last-child > tbody:last-child > tr:last-child th:last-child,\n.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child th:last-child,\n.panel > .table:last-child > tfoot:last-child > tr:last-child th:last-child,\n.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child th:last-child {\n border-bottom-right-radius: 3px;\n}\n.panel > .panel-body + .table,\n.panel > .panel-body + .table-responsive,\n.panel > .table + .panel-body,\n.panel > .table-responsive + .panel-body {\n border-top: 1px solid #ddd;\n}\n.panel > .table > tbody:first-child > tr:first-child th,\n.panel > .table > tbody:first-child > tr:first-child td {\n border-top: 0;\n}\n.panel > .table-bordered,\n.panel > .table-responsive > .table-bordered {\n border: 0;\n}\n.panel > .table-bordered > thead > tr > th:first-child,\n.panel > .table-responsive > .table-bordered > thead > tr > th:first-child,\n.panel > .table-bordered > tbody > tr > th:first-child,\n.panel > .table-responsive > .table-bordered > tbody > tr > th:first-child,\n.panel > .table-bordered > tfoot > tr > th:first-child,\n.panel > .table-responsive > .table-bordered > tfoot > tr > th:first-child,\n.panel > .table-bordered > thead > tr > td:first-child,\n.panel > .table-responsive > .table-bordered > thead > tr > td:first-child,\n.panel > .table-bordered > tbody > tr > td:first-child,\n.panel > .table-responsive > .table-bordered > tbody > tr > td:first-child,\n.panel > .table-bordered > tfoot > tr > td:first-child,\n.panel > .table-responsive > .table-bordered > tfoot > tr > td:first-child {\n border-left: 0;\n}\n.panel > .table-bordered > thead > tr > th:last-child,\n.panel > .table-responsive > .table-bordered > thead > tr > th:last-child,\n.panel > .table-bordered > tbody > tr > th:last-child,\n.panel > .table-responsive > .table-bordered > tbody > tr > th:last-child,\n.panel > .table-bordered > tfoot > tr > th:last-child,\n.panel > .table-responsive > .table-bordered > tfoot > tr > th:last-child,\n.panel > .table-bordered > thead > tr > td:last-child,\n.panel > .table-responsive > .table-bordered > thead > tr > td:last-child,\n.panel > .table-bordered > tbody > tr > td:last-child,\n.panel > .table-responsive > .table-bordered > tbody > tr > td:last-child,\n.panel > .table-bordered > tfoot > tr > td:last-child,\n.panel > .table-responsive > .table-bordered > tfoot > tr > td:last-child {\n border-right: 0;\n}\n.panel > .table-bordered > thead > tr:first-child > td,\n.panel > .table-responsive > .table-bordered > thead > tr:first-child > td,\n.panel > .table-bordered > tbody > tr:first-child > td,\n.panel > .table-responsive > .table-bordered > tbody > tr:first-child > td,\n.panel > .table-bordered > thead > tr:first-child > th,\n.panel > .table-responsive > .table-bordered > thead > tr:first-child > th,\n.panel > .table-bordered > tbody > tr:first-child > th,\n.panel > .table-responsive > .table-bordered > tbody > tr:first-child > th {\n border-bottom: 0;\n}\n.panel > .table-bordered > tbody > tr:last-child > td,\n.panel > .table-responsive > .table-bordered > tbody > tr:last-child > td,\n.panel > .table-bordered > tfoot > tr:last-child > td,\n.panel > .table-responsive > .table-bordered > tfoot > tr:last-child > td,\n.panel > .table-bordered > tbody > tr:last-child > th,\n.panel > .table-responsive > .table-bordered > tbody > tr:last-child > th,\n.panel > .table-bordered > tfoot > tr:last-child > th,\n.panel > .table-responsive > .table-bordered > tfoot > tr:last-child > th {\n border-bottom: 0;\n}\n.panel > .table-responsive {\n border: 0;\n margin-bottom: 0;\n}\n.panel-group {\n margin-bottom: 20px;\n}\n.panel-group .panel {\n margin-bottom: 0;\n border-radius: 4px;\n}\n.panel-group .panel + .panel {\n margin-top: 5px;\n}\n.panel-group .panel-heading {\n border-bottom: 0;\n}\n.panel-group .panel-heading + .panel-collapse > .panel-body,\n.panel-group .panel-heading + .panel-collapse > .list-group {\n border-top: 1px solid #ddd;\n}\n.panel-group .panel-footer {\n border-top: 0;\n}\n.panel-group .panel-footer + .panel-collapse .panel-body {\n border-bottom: 1px solid #ddd;\n}\n.panel-default {\n border-color: #ddd;\n}\n.panel-default > .panel-heading {\n color: #333333;\n background-color: #f5f5f5;\n border-color: #ddd;\n}\n.panel-default > .panel-heading + .panel-collapse > .panel-body {\n border-top-color: #ddd;\n}\n.panel-default > .panel-heading .badge {\n color: #f5f5f5;\n background-color: #333333;\n}\n.panel-default > .panel-footer + .panel-collapse > .panel-body {\n border-bottom-color: #ddd;\n}\n.panel-primary {\n border-color: #337ab7;\n}\n.panel-primary > .panel-heading {\n color: #fff;\n background-color: #337ab7;\n border-color: #337ab7;\n}\n.panel-primary > .panel-heading + .panel-collapse > .panel-body {\n border-top-color: #337ab7;\n}\n.panel-primary > .panel-heading .badge {\n color: #337ab7;\n background-color: #fff;\n}\n.panel-primary > .panel-footer + .panel-collapse > .panel-body {\n border-bottom-color: #337ab7;\n}\n.panel-success {\n border-color: #d6e9c6;\n}\n.panel-success > .panel-heading {\n color: #3c763d;\n background-color: #dff0d8;\n border-color: #d6e9c6;\n}\n.panel-success > .panel-heading + .panel-collapse > .panel-body {\n border-top-color: #d6e9c6;\n}\n.panel-success > .panel-heading .badge {\n color: #dff0d8;\n background-color: #3c763d;\n}\n.panel-success > .panel-footer + .panel-collapse > .panel-body {\n border-bottom-color: #d6e9c6;\n}\n.panel-info {\n border-color: #bce8f1;\n}\n.panel-info > .panel-heading {\n color: #31708f;\n background-color: #d9edf7;\n border-color: #bce8f1;\n}\n.panel-info > .panel-heading + .panel-collapse > .panel-body {\n border-top-color: #bce8f1;\n}\n.panel-info > .panel-heading .badge {\n color: #d9edf7;\n background-color: #31708f;\n}\n.panel-info > .panel-footer + .panel-collapse > .panel-body {\n border-bottom-color: #bce8f1;\n}\n.panel-warning {\n border-color: #faebcc;\n}\n.panel-warning > .panel-heading {\n color: #8a6d3b;\n background-color: #fcf8e3;\n border-color: #faebcc;\n}\n.panel-warning > .panel-heading + .panel-collapse > .panel-body {\n border-top-color: #faebcc;\n}\n.panel-warning > .panel-heading .badge {\n color: #fcf8e3;\n background-color: #8a6d3b;\n}\n.panel-warning > .panel-footer + .panel-collapse > .panel-body {\n border-bottom-color: #faebcc;\n}\n.panel-danger {\n border-color: #ebccd1;\n}\n.panel-danger > .panel-heading {\n color: #a94442;\n background-color: #f2dede;\n border-color: #ebccd1;\n}\n.panel-danger > .panel-heading + .panel-collapse > .panel-body {\n border-top-color: #ebccd1;\n}\n.panel-danger > .panel-heading .badge {\n color: #f2dede;\n background-color: #a94442;\n}\n.panel-danger > .panel-footer + .panel-collapse > .panel-body {\n border-bottom-color: #ebccd1;\n}\n.embed-responsive {\n position: relative;\n display: block;\n height: 0;\n padding: 0;\n overflow: hidden;\n}\n.embed-responsive .embed-responsive-item,\n.embed-responsive iframe,\n.embed-responsive embed,\n.embed-responsive object,\n.embed-responsive video {\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n height: 100%;\n width: 100%;\n border: 0;\n}\n.embed-responsive-16by9 {\n padding-bottom: 56.25%;\n}\n.embed-responsive-4by3 {\n padding-bottom: 75%;\n}\n.well {\n min-height: 20px;\n padding: 19px;\n margin-bottom: 20px;\n background-color: #f5f5f5;\n border: 1px solid #e3e3e3;\n border-radius: 4px;\n -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);\n box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);\n}\n.well blockquote {\n border-color: #ddd;\n border-color: rgba(0, 0, 0, 0.15);\n}\n.well-lg {\n padding: 24px;\n border-radius: 6px;\n}\n.well-sm {\n padding: 9px;\n border-radius: 3px;\n}\n.close {\n float: right;\n font-size: 21px;\n font-weight: bold;\n line-height: 1;\n color: #000;\n text-shadow: 0 1px 0 #fff;\n opacity: 0.2;\n filter: alpha(opacity=20);\n}\n.close:hover,\n.close:focus {\n color: #000;\n text-decoration: none;\n cursor: pointer;\n opacity: 0.5;\n filter: alpha(opacity=50);\n}\nbutton.close {\n padding: 0;\n cursor: pointer;\n background: transparent;\n border: 0;\n -webkit-appearance: none;\n}\n.modal-open {\n overflow: hidden;\n}\n.modal {\n display: none;\n overflow: hidden;\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: 1050;\n -webkit-overflow-scrolling: touch;\n outline: 0;\n}\n.modal.fade .modal-dialog {\n -webkit-transform: translate(0, -25%);\n -ms-transform: translate(0, -25%);\n -o-transform: translate(0, -25%);\n transform: translate(0, -25%);\n -webkit-transition: -webkit-transform 0.3s ease-out;\n -moz-transition: -moz-transform 0.3s ease-out;\n -o-transition: -o-transform 0.3s ease-out;\n transition: transform 0.3s ease-out;\n}\n.modal.in .modal-dialog {\n -webkit-transform: translate(0, 0);\n -ms-transform: translate(0, 0);\n -o-transform: translate(0, 0);\n transform: translate(0, 0);\n}\n.modal-open .modal {\n overflow-x: hidden;\n overflow-y: auto;\n}\n.modal-dialog {\n position: relative;\n width: auto;\n margin: 10px;\n}\n.modal-content {\n position: relative;\n background-color: #fff;\n border: 1px solid #999;\n border: 1px solid rgba(0, 0, 0, 0.2);\n border-radius: 6px;\n -webkit-box-shadow: 0 3px 9px rgba(0, 0, 0, 0.5);\n box-shadow: 0 3px 9px rgba(0, 0, 0, 0.5);\n background-clip: padding-box;\n outline: 0;\n}\n.modal-backdrop {\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: 1040;\n background-color: #000;\n}\n.modal-backdrop.fade {\n opacity: 0;\n filter: alpha(opacity=0);\n}\n.modal-backdrop.in {\n opacity: 0.5;\n filter: alpha(opacity=50);\n}\n.modal-header {\n padding: 15px;\n border-bottom: 1px solid #e5e5e5;\n}\n.modal-header .close {\n margin-top: -2px;\n}\n.modal-title {\n margin: 0;\n line-height: 1.42857143;\n}\n.modal-body {\n position: relative;\n padding: 15px;\n}\n.modal-footer {\n padding: 15px;\n text-align: right;\n border-top: 1px solid #e5e5e5;\n}\n.modal-footer .btn + .btn {\n margin-left: 5px;\n margin-bottom: 0;\n}\n.modal-footer .btn-group .btn + .btn {\n margin-left: -1px;\n}\n.modal-footer .btn-block + .btn-block {\n margin-left: 0;\n}\n.modal-scrollbar-measure {\n position: absolute;\n top: -9999px;\n width: 50px;\n height: 50px;\n overflow: scroll;\n}\n@media (min-width: 768px) {\n .modal-dialog {\n width: 600px;\n margin: 30px auto;\n }\n .modal-content {\n -webkit-box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);\n box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);\n }\n .modal-sm {\n width: 300px;\n }\n}\n@media (min-width: 992px) {\n .modal-lg {\n width: 900px;\n }\n}\n.tooltip {\n position: absolute;\n z-index: 1070;\n display: block;\n font-family: \"Helvetica Neue\", Helvetica, Arial, sans-serif;\n font-style: normal;\n font-weight: normal;\n letter-spacing: normal;\n line-break: auto;\n line-height: 1.42857143;\n text-align: left;\n text-align: start;\n text-decoration: none;\n text-shadow: none;\n text-transform: none;\n white-space: normal;\n word-break: normal;\n word-spacing: normal;\n word-wrap: normal;\n font-size: 12px;\n opacity: 0;\n filter: alpha(opacity=0);\n}\n.tooltip.in {\n opacity: 0.9;\n filter: alpha(opacity=90);\n}\n.tooltip.top {\n margin-top: -3px;\n padding: 5px 0;\n}\n.tooltip.right {\n margin-left: 3px;\n padding: 0 5px;\n}\n.tooltip.bottom {\n margin-top: 3px;\n padding: 5px 0;\n}\n.tooltip.left {\n margin-left: -3px;\n padding: 0 5px;\n}\n.tooltip-inner {\n max-width: 200px;\n padding: 3px 8px;\n color: #fff;\n text-align: center;\n background-color: #000;\n border-radius: 4px;\n}\n.tooltip-arrow {\n position: absolute;\n width: 0;\n height: 0;\n border-color: transparent;\n border-style: solid;\n}\n.tooltip.top .tooltip-arrow {\n bottom: 0;\n left: 50%;\n margin-left: -5px;\n border-width: 5px 5px 0;\n border-top-color: #000;\n}\n.tooltip.top-left .tooltip-arrow {\n bottom: 0;\n right: 5px;\n margin-bottom: -5px;\n border-width: 5px 5px 0;\n border-top-color: #000;\n}\n.tooltip.top-right .tooltip-arrow {\n bottom: 0;\n left: 5px;\n margin-bottom: -5px;\n border-width: 5px 5px 0;\n border-top-color: #000;\n}\n.tooltip.right .tooltip-arrow {\n top: 50%;\n left: 0;\n margin-top: -5px;\n border-width: 5px 5px 5px 0;\n border-right-color: #000;\n}\n.tooltip.left .tooltip-arrow {\n top: 50%;\n right: 0;\n margin-top: -5px;\n border-width: 5px 0 5px 5px;\n border-left-color: #000;\n}\n.tooltip.bottom .tooltip-arrow {\n top: 0;\n left: 50%;\n margin-left: -5px;\n border-width: 0 5px 5px;\n border-bottom-color: #000;\n}\n.tooltip.bottom-left .tooltip-arrow {\n top: 0;\n right: 5px;\n margin-top: -5px;\n border-width: 0 5px 5px;\n border-bottom-color: #000;\n}\n.tooltip.bottom-right .tooltip-arrow {\n top: 0;\n left: 5px;\n margin-top: -5px;\n border-width: 0 5px 5px;\n border-bottom-color: #000;\n}\n.popover {\n position: absolute;\n top: 0;\n left: 0;\n z-index: 1060;\n display: none;\n max-width: 276px;\n padding: 1px;\n font-family: \"Helvetica Neue\", Helvetica, Arial, sans-serif;\n font-style: normal;\n font-weight: normal;\n letter-spacing: normal;\n line-break: auto;\n line-height: 1.42857143;\n text-align: left;\n text-align: start;\n text-decoration: none;\n text-shadow: none;\n text-transform: none;\n white-space: normal;\n word-break: normal;\n word-spacing: normal;\n word-wrap: normal;\n font-size: 14px;\n background-color: #fff;\n background-clip: padding-box;\n border: 1px solid #ccc;\n border: 1px solid rgba(0, 0, 0, 0.2);\n border-radius: 6px;\n -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);\n box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);\n}\n.popover.top {\n margin-top: -10px;\n}\n.popover.right {\n margin-left: 10px;\n}\n.popover.bottom {\n margin-top: 10px;\n}\n.popover.left {\n margin-left: -10px;\n}\n.popover-title {\n margin: 0;\n padding: 8px 14px;\n font-size: 14px;\n background-color: #f7f7f7;\n border-bottom: 1px solid #ebebeb;\n border-radius: 5px 5px 0 0;\n}\n.popover-content {\n padding: 9px 14px;\n}\n.popover > .arrow,\n.popover > .arrow:after {\n position: absolute;\n display: block;\n width: 0;\n height: 0;\n border-color: transparent;\n border-style: solid;\n}\n.popover > .arrow {\n border-width: 11px;\n}\n.popover > .arrow:after {\n border-width: 10px;\n content: \"\";\n}\n.popover.top > .arrow {\n left: 50%;\n margin-left: -11px;\n border-bottom-width: 0;\n border-top-color: #999999;\n border-top-color: rgba(0, 0, 0, 0.25);\n bottom: -11px;\n}\n.popover.top > .arrow:after {\n content: \" \";\n bottom: 1px;\n margin-left: -10px;\n border-bottom-width: 0;\n border-top-color: #fff;\n}\n.popover.right > .arrow {\n top: 50%;\n left: -11px;\n margin-top: -11px;\n border-left-width: 0;\n border-right-color: #999999;\n border-right-color: rgba(0, 0, 0, 0.25);\n}\n.popover.right > .arrow:after {\n content: \" \";\n left: 1px;\n bottom: -10px;\n border-left-width: 0;\n border-right-color: #fff;\n}\n.popover.bottom > .arrow {\n left: 50%;\n margin-left: -11px;\n border-top-width: 0;\n border-bottom-color: #999999;\n border-bottom-color: rgba(0, 0, 0, 0.25);\n top: -11px;\n}\n.popover.bottom > .arrow:after {\n content: \" \";\n top: 1px;\n margin-left: -10px;\n border-top-width: 0;\n border-bottom-color: #fff;\n}\n.popover.left > .arrow {\n top: 50%;\n right: -11px;\n margin-top: -11px;\n border-right-width: 0;\n border-left-color: #999999;\n border-left-color: rgba(0, 0, 0, 0.25);\n}\n.popover.left > .arrow:after {\n content: \" \";\n right: 1px;\n border-right-width: 0;\n border-left-color: #fff;\n bottom: -10px;\n}\n.carousel {\n position: relative;\n}\n.carousel-inner {\n position: relative;\n overflow: hidden;\n width: 100%;\n}\n.carousel-inner > .item {\n display: none;\n position: relative;\n -webkit-transition: 0.6s ease-in-out left;\n -o-transition: 0.6s ease-in-out left;\n transition: 0.6s ease-in-out left;\n}\n.carousel-inner > .item > img,\n.carousel-inner > .item > a > img {\n line-height: 1;\n}\n@media all and (transform-3d), (-webkit-transform-3d) {\n .carousel-inner > .item {\n -webkit-transition: -webkit-transform 0.6s ease-in-out;\n -moz-transition: -moz-transform 0.6s ease-in-out;\n -o-transition: -o-transform 0.6s ease-in-out;\n transition: transform 0.6s ease-in-out;\n -webkit-backface-visibility: hidden;\n -moz-backface-visibility: hidden;\n backface-visibility: hidden;\n -webkit-perspective: 1000px;\n -moz-perspective: 1000px;\n perspective: 1000px;\n }\n .carousel-inner > .item.next,\n .carousel-inner > .item.active.right {\n -webkit-transform: translate3d(100%, 0, 0);\n transform: translate3d(100%, 0, 0);\n left: 0;\n }\n .carousel-inner > .item.prev,\n .carousel-inner > .item.active.left {\n -webkit-transform: translate3d(-100%, 0, 0);\n transform: translate3d(-100%, 0, 0);\n left: 0;\n }\n .carousel-inner > .item.next.left,\n .carousel-inner > .item.prev.right,\n .carousel-inner > .item.active {\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n left: 0;\n }\n}\n.carousel-inner > .active,\n.carousel-inner > .next,\n.carousel-inner > .prev {\n display: block;\n}\n.carousel-inner > .active {\n left: 0;\n}\n.carousel-inner > .next,\n.carousel-inner > .prev {\n position: absolute;\n top: 0;\n width: 100%;\n}\n.carousel-inner > .next {\n left: 100%;\n}\n.carousel-inner > .prev {\n left: -100%;\n}\n.carousel-inner > .next.left,\n.carousel-inner > .prev.right {\n left: 0;\n}\n.carousel-inner > .active.left {\n left: -100%;\n}\n.carousel-inner > .active.right {\n left: 100%;\n}\n.carousel-control {\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n width: 15%;\n opacity: 0.5;\n filter: alpha(opacity=50);\n font-size: 20px;\n color: #fff;\n text-align: center;\n text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);\n background-color: rgba(0, 0, 0, 0);\n}\n.carousel-control.left {\n background-image: -webkit-linear-gradient(left, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.0001) 100%);\n background-image: -o-linear-gradient(left, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.0001) 100%);\n background-image: linear-gradient(to right, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.0001) 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1);\n}\n.carousel-control.right {\n left: auto;\n right: 0;\n background-image: -webkit-linear-gradient(left, rgba(0, 0, 0, 0.0001) 0%, rgba(0, 0, 0, 0.5) 100%);\n background-image: -o-linear-gradient(left, rgba(0, 0, 0, 0.0001) 0%, rgba(0, 0, 0, 0.5) 100%);\n background-image: linear-gradient(to right, rgba(0, 0, 0, 0.0001) 0%, rgba(0, 0, 0, 0.5) 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1);\n}\n.carousel-control:hover,\n.carousel-control:focus {\n outline: 0;\n color: #fff;\n text-decoration: none;\n opacity: 0.9;\n filter: alpha(opacity=90);\n}\n.carousel-control .icon-prev,\n.carousel-control .icon-next,\n.carousel-control .glyphicon-chevron-left,\n.carousel-control .glyphicon-chevron-right {\n position: absolute;\n top: 50%;\n margin-top: -10px;\n z-index: 5;\n display: inline-block;\n}\n.carousel-control .icon-prev,\n.carousel-control .glyphicon-chevron-left {\n left: 50%;\n margin-left: -10px;\n}\n.carousel-control .icon-next,\n.carousel-control .glyphicon-chevron-right {\n right: 50%;\n margin-right: -10px;\n}\n.carousel-control .icon-prev,\n.carousel-control .icon-next {\n width: 20px;\n height: 20px;\n line-height: 1;\n font-family: serif;\n}\n.carousel-control .icon-prev:before {\n content: '\\2039';\n}\n.carousel-control .icon-next:before {\n content: '\\203a';\n}\n.carousel-indicators {\n position: absolute;\n bottom: 10px;\n left: 50%;\n z-index: 15;\n width: 60%;\n margin-left: -30%;\n padding-left: 0;\n list-style: none;\n text-align: center;\n}\n.carousel-indicators li {\n display: inline-block;\n width: 10px;\n height: 10px;\n margin: 1px;\n text-indent: -999px;\n border: 1px solid #fff;\n border-radius: 10px;\n cursor: pointer;\n background-color: #000 \\9;\n background-color: rgba(0, 0, 0, 0);\n}\n.carousel-indicators .active {\n margin: 0;\n width: 12px;\n height: 12px;\n background-color: #fff;\n}\n.carousel-caption {\n position: absolute;\n left: 15%;\n right: 15%;\n bottom: 20px;\n z-index: 10;\n padding-top: 20px;\n padding-bottom: 20px;\n color: #fff;\n text-align: center;\n text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);\n}\n.carousel-caption .btn {\n text-shadow: none;\n}\n@media screen and (min-width: 768px) {\n .carousel-control .glyphicon-chevron-left,\n .carousel-control .glyphicon-chevron-right,\n .carousel-control .icon-prev,\n .carousel-control .icon-next {\n width: 30px;\n height: 30px;\n margin-top: -10px;\n font-size: 30px;\n }\n .carousel-control .glyphicon-chevron-left,\n .carousel-control .icon-prev {\n margin-left: -10px;\n }\n .carousel-control .glyphicon-chevron-right,\n .carousel-control .icon-next {\n margin-right: -10px;\n }\n .carousel-caption {\n left: 20%;\n right: 20%;\n padding-bottom: 30px;\n }\n .carousel-indicators {\n bottom: 20px;\n }\n}\n.clearfix:before,\n.clearfix:after,\n.dl-horizontal dd:before,\n.dl-horizontal dd:after,\n.container:before,\n.container:after,\n.container-fluid:before,\n.container-fluid:after,\n.row:before,\n.row:after,\n.form-horizontal .form-group:before,\n.form-horizontal .form-group:after,\n.btn-toolbar:before,\n.btn-toolbar:after,\n.btn-group-vertical > .btn-group:before,\n.btn-group-vertical > .btn-group:after,\n.nav:before,\n.nav:after,\n.navbar:before,\n.navbar:after,\n.navbar-header:before,\n.navbar-header:after,\n.navbar-collapse:before,\n.navbar-collapse:after,\n.pager:before,\n.pager:after,\n.panel-body:before,\n.panel-body:after,\n.modal-header:before,\n.modal-header:after,\n.modal-footer:before,\n.modal-footer:after {\n content: \" \";\n display: table;\n}\n.clearfix:after,\n.dl-horizontal dd:after,\n.container:after,\n.container-fluid:after,\n.row:after,\n.form-horizontal .form-group:after,\n.btn-toolbar:after,\n.btn-group-vertical > .btn-group:after,\n.nav:after,\n.navbar:after,\n.navbar-header:after,\n.navbar-collapse:after,\n.pager:after,\n.panel-body:after,\n.modal-header:after,\n.modal-footer:after {\n clear: both;\n}\n.center-block {\n display: block;\n margin-left: auto;\n margin-right: auto;\n}\n.pull-right {\n float: right !important;\n}\n.pull-left {\n float: left !important;\n}\n.hide {\n display: none !important;\n}\n.show {\n display: block !important;\n}\n.invisible {\n visibility: hidden;\n}\n.text-hide {\n font: 0/0 a;\n color: transparent;\n text-shadow: none;\n background-color: transparent;\n border: 0;\n}\n.hidden {\n display: none !important;\n}\n.affix {\n position: fixed;\n}\n@-ms-viewport {\n width: device-width;\n}\n.visible-xs,\n.visible-sm,\n.visible-md,\n.visible-lg {\n display: none !important;\n}\n.visible-xs-block,\n.visible-xs-inline,\n.visible-xs-inline-block,\n.visible-sm-block,\n.visible-sm-inline,\n.visible-sm-inline-block,\n.visible-md-block,\n.visible-md-inline,\n.visible-md-inline-block,\n.visible-lg-block,\n.visible-lg-inline,\n.visible-lg-inline-block {\n display: none !important;\n}\n@media (max-width: 767px) {\n .visible-xs {\n display: block !important;\n }\n table.visible-xs {\n display: table !important;\n }\n tr.visible-xs {\n display: table-row !important;\n }\n th.visible-xs,\n td.visible-xs {\n display: table-cell !important;\n }\n}\n@media (max-width: 767px) {\n .visible-xs-block {\n display: block !important;\n }\n}\n@media (max-width: 767px) {\n .visible-xs-inline {\n display: inline !important;\n }\n}\n@media (max-width: 767px) {\n .visible-xs-inline-block {\n display: inline-block !important;\n }\n}\n@media (min-width: 768px) and (max-width: 991px) {\n .visible-sm {\n display: block !important;\n }\n table.visible-sm {\n display: table !important;\n }\n tr.visible-sm {\n display: table-row !important;\n }\n th.visible-sm,\n td.visible-sm {\n display: table-cell !important;\n }\n}\n@media (min-width: 768px) and (max-width: 991px) {\n .visible-sm-block {\n display: block !important;\n }\n}\n@media (min-width: 768px) and (max-width: 991px) {\n .visible-sm-inline {\n display: inline !important;\n }\n}\n@media (min-width: 768px) and (max-width: 991px) {\n .visible-sm-inline-block {\n display: inline-block !important;\n }\n}\n@media (min-width: 992px) and (max-width: 1199px) {\n .visible-md {\n display: block !important;\n }\n table.visible-md {\n display: table !important;\n }\n tr.visible-md {\n display: table-row !important;\n }\n th.visible-md,\n td.visible-md {\n display: table-cell !important;\n }\n}\n@media (min-width: 992px) and (max-width: 1199px) {\n .visible-md-block {\n display: block !important;\n }\n}\n@media (min-width: 992px) and (max-width: 1199px) {\n .visible-md-inline {\n display: inline !important;\n }\n}\n@media (min-width: 992px) and (max-width: 1199px) {\n .visible-md-inline-block {\n display: inline-block !important;\n }\n}\n@media (min-width: 1200px) {\n .visible-lg {\n display: block !important;\n }\n table.visible-lg {\n display: table !important;\n }\n tr.visible-lg {\n display: table-row !important;\n }\n th.visible-lg,\n td.visible-lg {\n display: table-cell !important;\n }\n}\n@media (min-width: 1200px) {\n .visible-lg-block {\n display: block !important;\n }\n}\n@media (min-width: 1200px) {\n .visible-lg-inline {\n display: inline !important;\n }\n}\n@media (min-width: 1200px) {\n .visible-lg-inline-block {\n display: inline-block !important;\n }\n}\n@media (max-width: 767px) {\n .hidden-xs {\n display: none !important;\n }\n}\n@media (min-width: 768px) and (max-width: 991px) {\n .hidden-sm {\n display: none !important;\n }\n}\n@media (min-width: 992px) and (max-width: 1199px) {\n .hidden-md {\n display: none !important;\n }\n}\n@media (min-width: 1200px) {\n .hidden-lg {\n display: none !important;\n }\n}\n.visible-print {\n display: none !important;\n}\n@media print {\n .visible-print {\n display: block !important;\n }\n table.visible-print {\n display: table !important;\n }\n tr.visible-print {\n display: table-row !important;\n }\n th.visible-print,\n td.visible-print {\n display: table-cell !important;\n }\n}\n.visible-print-block {\n display: none !important;\n}\n@media print {\n .visible-print-block {\n display: block !important;\n }\n}\n.visible-print-inline {\n display: none !important;\n}\n@media print {\n .visible-print-inline {\n display: inline !important;\n }\n}\n.visible-print-inline-block {\n display: none !important;\n}\n@media print {\n .visible-print-inline-block {\n display: inline-block !important;\n }\n}\n@media print {\n .hidden-print {\n display: none !important;\n }\n}\n/*# sourceMappingURL=bootstrap.css.map */","/*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */\n\n//\n// 1. Set default font family to sans-serif.\n// 2. Prevent iOS and IE text size adjust after device orientation change,\n// without disabling user zoom.\n//\n\nhtml {\n font-family: sans-serif; // 1\n -ms-text-size-adjust: 100%; // 2\n -webkit-text-size-adjust: 100%; // 2\n}\n\n//\n// Remove default margin.\n//\n\nbody {\n margin: 0;\n}\n\n// HTML5 display definitions\n// ==========================================================================\n\n//\n// Correct `block` display not defined for any HTML5 element in IE 8/9.\n// Correct `block` display not defined for `details` or `summary` in IE 10/11\n// and Firefox.\n// Correct `block` display not defined for `main` in IE 11.\n//\n\narticle,\naside,\ndetails,\nfigcaption,\nfigure,\nfooter,\nheader,\nhgroup,\nmain,\nmenu,\nnav,\nsection,\nsummary {\n display: block;\n}\n\n//\n// 1. Correct `inline-block` display not defined in IE 8/9.\n// 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera.\n//\n\naudio,\ncanvas,\nprogress,\nvideo {\n display: inline-block; // 1\n vertical-align: baseline; // 2\n}\n\n//\n// Prevent modern browsers from displaying `audio` without controls.\n// Remove excess height in iOS 5 devices.\n//\n\naudio:not([controls]) {\n display: none;\n height: 0;\n}\n\n//\n// Address `[hidden]` styling not present in IE 8/9/10.\n// Hide the `template` element in IE 8/9/10/11, Safari, and Firefox < 22.\n//\n\n[hidden],\ntemplate {\n display: none;\n}\n\n// Links\n// ==========================================================================\n\n//\n// Remove the gray background color from active links in IE 10.\n//\n\na {\n background-color: transparent;\n}\n\n//\n// Improve readability of focused elements when they are also in an\n// active/hover state.\n//\n\na:active,\na:hover {\n outline: 0;\n}\n\n// Text-level semantics\n// ==========================================================================\n\n//\n// Address styling not present in IE 8/9/10/11, Safari, and Chrome.\n//\n\nabbr[title] {\n border-bottom: 1px dotted;\n}\n\n//\n// Address style set to `bolder` in Firefox 4+, Safari, and Chrome.\n//\n\nb,\nstrong {\n font-weight: bold;\n}\n\n//\n// Address styling not present in Safari and Chrome.\n//\n\ndfn {\n font-style: italic;\n}\n\n//\n// Address variable `h1` font-size and margin within `section` and `article`\n// contexts in Firefox 4+, Safari, and Chrome.\n//\n\nh1 {\n font-size: 2em;\n margin: 0.67em 0;\n}\n\n//\n// Address styling not present in IE 8/9.\n//\n\nmark {\n background: #ff0;\n color: #000;\n}\n\n//\n// Address inconsistent and variable font size in all browsers.\n//\n\nsmall {\n font-size: 80%;\n}\n\n//\n// Prevent `sub` and `sup` affecting `line-height` in all browsers.\n//\n\nsub,\nsup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n}\n\nsup {\n top: -0.5em;\n}\n\nsub {\n bottom: -0.25em;\n}\n\n// Embedded content\n// ==========================================================================\n\n//\n// Remove border when inside `a` element in IE 8/9/10.\n//\n\nimg {\n border: 0;\n}\n\n//\n// Correct overflow not hidden in IE 9/10/11.\n//\n\nsvg:not(:root) {\n overflow: hidden;\n}\n\n// Grouping content\n// ==========================================================================\n\n//\n// Address margin not present in IE 8/9 and Safari.\n//\n\nfigure {\n margin: 1em 40px;\n}\n\n//\n// Address differences between Firefox and other browsers.\n//\n\nhr {\n box-sizing: content-box;\n height: 0;\n}\n\n//\n// Contain overflow in all browsers.\n//\n\npre {\n overflow: auto;\n}\n\n//\n// Address odd `em`-unit font size rendering in all browsers.\n//\n\ncode,\nkbd,\npre,\nsamp {\n font-family: monospace, monospace;\n font-size: 1em;\n}\n\n// Forms\n// ==========================================================================\n\n//\n// Known limitation: by default, Chrome and Safari on OS X allow very limited\n// styling of `select`, unless a `border` property is set.\n//\n\n//\n// 1. Correct color not being inherited.\n// Known issue: affects color of disabled elements.\n// 2. Correct font properties not being inherited.\n// 3. Address margins set differently in Firefox 4+, Safari, and Chrome.\n//\n\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n color: inherit; // 1\n font: inherit; // 2\n margin: 0; // 3\n}\n\n//\n// Address `overflow` set to `hidden` in IE 8/9/10/11.\n//\n\nbutton {\n overflow: visible;\n}\n\n//\n// Address inconsistent `text-transform` inheritance for `button` and `select`.\n// All other form control elements do not inherit `text-transform` values.\n// Correct `button` style inheritance in Firefox, IE 8/9/10/11, and Opera.\n// Correct `select` style inheritance in Firefox.\n//\n\nbutton,\nselect {\n text-transform: none;\n}\n\n//\n// 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`\n// and `video` controls.\n// 2. Correct inability to style clickable `input` types in iOS.\n// 3. Improve usability and consistency of cursor style between image-type\n// `input` and others.\n//\n\nbutton,\nhtml input[type=\"button\"], // 1\ninput[type=\"reset\"],\ninput[type=\"submit\"] {\n -webkit-appearance: button; // 2\n cursor: pointer; // 3\n}\n\n//\n// Re-set default cursor for disabled elements.\n//\n\nbutton[disabled],\nhtml input[disabled] {\n cursor: default;\n}\n\n//\n// Remove inner padding and border in Firefox 4+.\n//\n\nbutton::-moz-focus-inner,\ninput::-moz-focus-inner {\n border: 0;\n padding: 0;\n}\n\n//\n// Address Firefox 4+ setting `line-height` on `input` using `!important` in\n// the UA stylesheet.\n//\n\ninput {\n line-height: normal;\n}\n\n//\n// It's recommended that you don't attempt to style these elements.\n// Firefox's implementation doesn't respect box-sizing, padding, or width.\n//\n// 1. Address box sizing set to `content-box` in IE 8/9/10.\n// 2. Remove excess padding in IE 8/9/10.\n//\n\ninput[type=\"checkbox\"],\ninput[type=\"radio\"] {\n box-sizing: border-box; // 1\n padding: 0; // 2\n}\n\n//\n// Fix the cursor style for Chrome's increment/decrement buttons. For certain\n// `font-size` values of the `input`, it causes the cursor style of the\n// decrement button to change from `default` to `text`.\n//\n\ninput[type=\"number\"]::-webkit-inner-spin-button,\ninput[type=\"number\"]::-webkit-outer-spin-button {\n height: auto;\n}\n\n//\n// 1. Address `appearance` set to `searchfield` in Safari and Chrome.\n// 2. Address `box-sizing` set to `border-box` in Safari and Chrome.\n//\n\ninput[type=\"search\"] {\n -webkit-appearance: textfield; // 1\n box-sizing: content-box; //2\n}\n\n//\n// Remove inner padding and search cancel button in Safari and Chrome on OS X.\n// Safari (but not Chrome) clips the cancel button when the search input has\n// padding (and `textfield` appearance).\n//\n\ninput[type=\"search\"]::-webkit-search-cancel-button,\ninput[type=\"search\"]::-webkit-search-decoration {\n -webkit-appearance: none;\n}\n\n//\n// Define consistent border, margin, and padding.\n//\n\nfieldset {\n border: 1px solid #c0c0c0;\n margin: 0 2px;\n padding: 0.35em 0.625em 0.75em;\n}\n\n//\n// 1. Correct `color` not being inherited in IE 8/9/10/11.\n// 2. Remove padding so people aren't caught out if they zero out fieldsets.\n//\n\nlegend {\n border: 0; // 1\n padding: 0; // 2\n}\n\n//\n// Remove default vertical scrollbar in IE 8/9/10/11.\n//\n\ntextarea {\n overflow: auto;\n}\n\n//\n// Don't inherit the `font-weight` (applied by a rule above).\n// NOTE: the default cannot safely be changed in Chrome and Safari on OS X.\n//\n\noptgroup {\n font-weight: bold;\n}\n\n// Tables\n// ==========================================================================\n\n//\n// Remove most spacing between table cells.\n//\n\ntable {\n border-collapse: collapse;\n border-spacing: 0;\n}\n\ntd,\nth {\n padding: 0;\n}\n","/*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */\n\n// ==========================================================================\n// Print styles.\n// Inlined to avoid the additional HTTP request: h5bp.com/r\n// ==========================================================================\n\n@media print {\n *,\n *:before,\n *:after {\n background: transparent !important;\n color: #000 !important; // Black prints faster: h5bp.com/s\n box-shadow: none !important;\n text-shadow: none !important;\n }\n\n a,\n a:visited {\n text-decoration: underline;\n }\n\n a[href]:after {\n content: \" (\" attr(href) \")\";\n }\n\n abbr[title]:after {\n content: \" (\" attr(title) \")\";\n }\n\n // Don't show links that are fragment identifiers,\n // or use the `javascript:` pseudo protocol\n a[href^=\"#\"]:after,\n a[href^=\"javascript:\"]:after {\n content: \"\";\n }\n\n pre,\n blockquote {\n border: 1px solid #999;\n page-break-inside: avoid;\n }\n\n thead {\n display: table-header-group; // h5bp.com/t\n }\n\n tr,\n img {\n page-break-inside: avoid;\n }\n\n img {\n max-width: 100% !important;\n }\n\n p,\n h2,\n h3 {\n orphans: 3;\n widows: 3;\n }\n\n h2,\n h3 {\n page-break-after: avoid;\n }\n\n // Bootstrap specific changes start\n\n // Bootstrap components\n .navbar {\n display: none;\n }\n .btn,\n .dropup > .btn {\n > .caret {\n border-top-color: #000 !important;\n }\n }\n .label {\n border: 1px solid #000;\n }\n\n .table {\n border-collapse: collapse !important;\n\n td,\n th {\n background-color: #fff !important;\n }\n }\n .table-bordered {\n th,\n td {\n border: 1px solid #ddd !important;\n }\n }\n\n // Bootstrap specific changes end\n}\n","//\n// Glyphicons for Bootstrap\n//\n// Since icons are fonts, they can be placed anywhere text is placed and are\n// thus automatically sized to match the surrounding child. To use, create an\n// inline element with the appropriate classes, like so:\n//\n// <a href=\"#\"><span class=\"glyphicon glyphicon-star\"></span> Star</a>\n\n// Import the fonts\n@font-face {\n font-family: 'Glyphicons Halflings';\n src: url('@{icon-font-path}@{icon-font-name}.eot');\n src: url('@{icon-font-path}@{icon-font-name}.eot?#iefix') format('embedded-opentype'),\n url('@{icon-font-path}@{icon-font-name}.woff2') format('woff2'),\n url('@{icon-font-path}@{icon-font-name}.woff') format('woff'),\n url('@{icon-font-path}@{icon-font-name}.ttf') format('truetype'),\n url('@{icon-font-path}@{icon-font-name}.svg#@{icon-font-svg-id}') format('svg');\n}\n\n// Catchall baseclass\n.glyphicon {\n position: relative;\n top: 1px;\n display: inline-block;\n font-family: 'Glyphicons Halflings';\n font-style: normal;\n font-weight: normal;\n line-height: 1;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\n// Individual icons\n.glyphicon-asterisk { &:before { content: \"\\002a\"; } }\n.glyphicon-plus { &:before { content: \"\\002b\"; } }\n.glyphicon-euro,\n.glyphicon-eur { &:before { content: \"\\20ac\"; } }\n.glyphicon-minus { &:before { content: \"\\2212\"; } }\n.glyphicon-cloud { &:before { content: \"\\2601\"; } }\n.glyphicon-envelope { &:before { content: \"\\2709\"; } }\n.glyphicon-pencil { &:before { content: \"\\270f\"; } }\n.glyphicon-glass { &:before { content: \"\\e001\"; } }\n.glyphicon-music { &:before { content: \"\\e002\"; } }\n.glyphicon-search { &:before { content: \"\\e003\"; } }\n.glyphicon-heart { &:before { content: \"\\e005\"; } }\n.glyphicon-star { &:before { content: \"\\e006\"; } }\n.glyphicon-star-empty { &:before { content: \"\\e007\"; } }\n.glyphicon-user { &:before { content: \"\\e008\"; } }\n.glyphicon-film { &:before { content: \"\\e009\"; } }\n.glyphicon-th-large { &:before { content: \"\\e010\"; } }\n.glyphicon-th { &:before { content: \"\\e011\"; } }\n.glyphicon-th-list { &:before { content: \"\\e012\"; } }\n.glyphicon-ok { &:before { content: \"\\e013\"; } }\n.glyphicon-remove { &:before { content: \"\\e014\"; } }\n.glyphicon-zoom-in { &:before { content: \"\\e015\"; } }\n.glyphicon-zoom-out { &:before { content: \"\\e016\"; } }\n.glyphicon-off { &:before { content: \"\\e017\"; } }\n.glyphicon-signal { &:before { content: \"\\e018\"; } }\n.glyphicon-cog { &:before { content: \"\\e019\"; } }\n.glyphicon-trash { &:before { content: \"\\e020\"; } }\n.glyphicon-home { &:before { content: \"\\e021\"; } }\n.glyphicon-file { &:before { content: \"\\e022\"; } }\n.glyphicon-time { &:before { content: \"\\e023\"; } }\n.glyphicon-road { &:before { content: \"\\e024\"; } }\n.glyphicon-download-alt { &:before { content: \"\\e025\"; } }\n.glyphicon-download { &:before { content: \"\\e026\"; } }\n.glyphicon-upload { &:before { content: \"\\e027\"; } }\n.glyphicon-inbox { &:before { content: \"\\e028\"; } }\n.glyphicon-play-circle { &:before { content: \"\\e029\"; } }\n.glyphicon-repeat { &:before { content: \"\\e030\"; } }\n.glyphicon-refresh { &:before { content: \"\\e031\"; } }\n.glyphicon-list-alt { &:before { content: \"\\e032\"; } }\n.glyphicon-lock { &:before { content: \"\\e033\"; } }\n.glyphicon-flag { &:before { content: \"\\e034\"; } }\n.glyphicon-headphones { &:before { content: \"\\e035\"; } }\n.glyphicon-volume-off { &:before { content: \"\\e036\"; } }\n.glyphicon-volume-down { &:before { content: \"\\e037\"; } }\n.glyphicon-volume-up { &:before { content: \"\\e038\"; } }\n.glyphicon-qrcode { &:before { content: \"\\e039\"; } }\n.glyphicon-barcode { &:before { content: \"\\e040\"; } }\n.glyphicon-tag { &:before { content: \"\\e041\"; } }\n.glyphicon-tags { &:before { content: \"\\e042\"; } }\n.glyphicon-book { &:before { content: \"\\e043\"; } }\n.glyphicon-bookmark { &:before { content: \"\\e044\"; } }\n.glyphicon-print { &:before { content: \"\\e045\"; } }\n.glyphicon-camera { &:before { content: \"\\e046\"; } }\n.glyphicon-font { &:before { content: \"\\e047\"; } }\n.glyphicon-bold { &:before { content: \"\\e048\"; } }\n.glyphicon-italic { &:before { content: \"\\e049\"; } }\n.glyphicon-text-height { &:before { content: \"\\e050\"; } }\n.glyphicon-text-width { &:before { content: \"\\e051\"; } }\n.glyphicon-align-left { &:before { content: \"\\e052\"; } }\n.glyphicon-align-center { &:before { content: \"\\e053\"; } }\n.glyphicon-align-right { &:before { content: \"\\e054\"; } }\n.glyphicon-align-justify { &:before { content: \"\\e055\"; } }\n.glyphicon-list { &:before { content: \"\\e056\"; } }\n.glyphicon-indent-left { &:before { content: \"\\e057\"; } }\n.glyphicon-indent-right { &:before { content: \"\\e058\"; } }\n.glyphicon-facetime-video { &:before { content: \"\\e059\"; } }\n.glyphicon-picture { &:before { content: \"\\e060\"; } }\n.glyphicon-map-marker { &:before { content: \"\\e062\"; } }\n.glyphicon-adjust { &:before { content: \"\\e063\"; } }\n.glyphicon-tint { &:before { content: \"\\e064\"; } }\n.glyphicon-edit { &:before { content: \"\\e065\"; } }\n.glyphicon-share { &:before { content: \"\\e066\"; } }\n.glyphicon-check { &:before { content: \"\\e067\"; } }\n.glyphicon-move { &:before { content: \"\\e068\"; } }\n.glyphicon-step-backward { &:before { content: \"\\e069\"; } }\n.glyphicon-fast-backward { &:before { content: \"\\e070\"; } }\n.glyphicon-backward { &:before { content: \"\\e071\"; } }\n.glyphicon-play { &:before { content: \"\\e072\"; } }\n.glyphicon-pause { &:before { content: \"\\e073\"; } }\n.glyphicon-stop { &:before { content: \"\\e074\"; } }\n.glyphicon-forward { &:before { content: \"\\e075\"; } }\n.glyphicon-fast-forward { &:before { content: \"\\e076\"; } }\n.glyphicon-step-forward { &:before { content: \"\\e077\"; } }\n.glyphicon-eject { &:before { content: \"\\e078\"; } }\n.glyphicon-chevron-left { &:before { content: \"\\e079\"; } }\n.glyphicon-chevron-right { &:before { content: \"\\e080\"; } }\n.glyphicon-plus-sign { &:before { content: \"\\e081\"; } }\n.glyphicon-minus-sign { &:before { content: \"\\e082\"; } }\n.glyphicon-remove-sign { &:before { content: \"\\e083\"; } }\n.glyphicon-ok-sign { &:before { content: \"\\e084\"; } }\n.glyphicon-question-sign { &:before { content: \"\\e085\"; } }\n.glyphicon-info-sign { &:before { content: \"\\e086\"; } }\n.glyphicon-screenshot { &:before { content: \"\\e087\"; } }\n.glyphicon-remove-circle { &:before { content: \"\\e088\"; } }\n.glyphicon-ok-circle { &:before { content: \"\\e089\"; } }\n.glyphicon-ban-circle { &:before { content: \"\\e090\"; } }\n.glyphicon-arrow-left { &:before { content: \"\\e091\"; } }\n.glyphicon-arrow-right { &:before { content: \"\\e092\"; } }\n.glyphicon-arrow-up { &:before { content: \"\\e093\"; } }\n.glyphicon-arrow-down { &:before { content: \"\\e094\"; } }\n.glyphicon-share-alt { &:before { content: \"\\e095\"; } }\n.glyphicon-resize-full { &:before { content: \"\\e096\"; } }\n.glyphicon-resize-small { &:before { content: \"\\e097\"; } }\n.glyphicon-exclamation-sign { &:before { content: \"\\e101\"; } }\n.glyphicon-gift { &:before { content: \"\\e102\"; } }\n.glyphicon-leaf { &:before { content: \"\\e103\"; } }\n.glyphicon-fire { &:before { content: \"\\e104\"; } }\n.glyphicon-eye-open { &:before { content: \"\\e105\"; } }\n.glyphicon-eye-close { &:before { content: \"\\e106\"; } }\n.glyphicon-warning-sign { &:before { content: \"\\e107\"; } }\n.glyphicon-plane { &:before { content: \"\\e108\"; } }\n.glyphicon-calendar { &:before { content: \"\\e109\"; } }\n.glyphicon-random { &:before { content: \"\\e110\"; } }\n.glyphicon-comment { &:before { content: \"\\e111\"; } }\n.glyphicon-magnet { &:before { content: \"\\e112\"; } }\n.glyphicon-chevron-up { &:before { content: \"\\e113\"; } }\n.glyphicon-chevron-down { &:before { content: \"\\e114\"; } }\n.glyphicon-retweet { &:before { content: \"\\e115\"; } }\n.glyphicon-shopping-cart { &:before { content: \"\\e116\"; } }\n.glyphicon-folder-close { &:before { content: \"\\e117\"; } }\n.glyphicon-folder-open { &:before { content: \"\\e118\"; } }\n.glyphicon-resize-vertical { &:before { content: \"\\e119\"; } }\n.glyphicon-resize-horizontal { &:before { content: \"\\e120\"; } }\n.glyphicon-hdd { &:before { content: \"\\e121\"; } }\n.glyphicon-bullhorn { &:before { content: \"\\e122\"; } }\n.glyphicon-bell { &:before { content: \"\\e123\"; } }\n.glyphicon-certificate { &:before { content: \"\\e124\"; } }\n.glyphicon-thumbs-up { &:before { content: \"\\e125\"; } }\n.glyphicon-thumbs-down { &:before { content: \"\\e126\"; } }\n.glyphicon-hand-right { &:before { content: \"\\e127\"; } }\n.glyphicon-hand-left { &:before { content: \"\\e128\"; } }\n.glyphicon-hand-up { &:before { content: \"\\e129\"; } }\n.glyphicon-hand-down { &:before { content: \"\\e130\"; } }\n.glyphicon-circle-arrow-right { &:before { content: \"\\e131\"; } }\n.glyphicon-circle-arrow-left { &:before { content: \"\\e132\"; } }\n.glyphicon-circle-arrow-up { &:before { content: \"\\e133\"; } }\n.glyphicon-circle-arrow-down { &:before { content: \"\\e134\"; } }\n.glyphicon-globe { &:before { content: \"\\e135\"; } }\n.glyphicon-wrench { &:before { content: \"\\e136\"; } }\n.glyphicon-tasks { &:before { content: \"\\e137\"; } }\n.glyphicon-filter { &:before { content: \"\\e138\"; } }\n.glyphicon-briefcase { &:before { content: \"\\e139\"; } }\n.glyphicon-fullscreen { &:before { content: \"\\e140\"; } }\n.glyphicon-dashboard { &:before { content: \"\\e141\"; } }\n.glyphicon-paperclip { &:before { content: \"\\e142\"; } }\n.glyphicon-heart-empty { &:before { content: \"\\e143\"; } }\n.glyphicon-link { &:before { content: \"\\e144\"; } }\n.glyphicon-phone { &:before { content: \"\\e145\"; } }\n.glyphicon-pushpin { &:before { content: \"\\e146\"; } }\n.glyphicon-usd { &:before { content: \"\\e148\"; } }\n.glyphicon-gbp { &:before { content: \"\\e149\"; } }\n.glyphicon-sort { &:before { content: \"\\e150\"; } }\n.glyphicon-sort-by-alphabet { &:before { content: \"\\e151\"; } }\n.glyphicon-sort-by-alphabet-alt { &:before { content: \"\\e152\"; } }\n.glyphicon-sort-by-order { &:before { content: \"\\e153\"; } }\n.glyphicon-sort-by-order-alt { &:before { content: \"\\e154\"; } }\n.glyphicon-sort-by-attributes { &:before { content: \"\\e155\"; } }\n.glyphicon-sort-by-attributes-alt { &:before { content: \"\\e156\"; } }\n.glyphicon-unchecked { &:before { content: \"\\e157\"; } }\n.glyphicon-expand { &:before { content: \"\\e158\"; } }\n.glyphicon-collapse-down { &:before { content: \"\\e159\"; } }\n.glyphicon-collapse-up { &:before { content: \"\\e160\"; } }\n.glyphicon-log-in { &:before { content: \"\\e161\"; } }\n.glyphicon-flash { &:before { content: \"\\e162\"; } }\n.glyphicon-log-out { &:before { content: \"\\e163\"; } }\n.glyphicon-new-window { &:before { content: \"\\e164\"; } }\n.glyphicon-record { &:before { content: \"\\e165\"; } }\n.glyphicon-save { &:before { content: \"\\e166\"; } }\n.glyphicon-open { &:before { content: \"\\e167\"; } }\n.glyphicon-saved { &:before { content: \"\\e168\"; } }\n.glyphicon-import { &:before { content: \"\\e169\"; } }\n.glyphicon-export { &:before { content: \"\\e170\"; } }\n.glyphicon-send { &:before { content: \"\\e171\"; } }\n.glyphicon-floppy-disk { &:before { content: \"\\e172\"; } }\n.glyphicon-floppy-saved { &:before { content: \"\\e173\"; } }\n.glyphicon-floppy-remove { &:before { content: \"\\e174\"; } }\n.glyphicon-floppy-save { &:before { content: \"\\e175\"; } }\n.glyphicon-floppy-open { &:before { content: \"\\e176\"; } }\n.glyphicon-credit-card { &:before { content: \"\\e177\"; } }\n.glyphicon-transfer { &:before { content: \"\\e178\"; } }\n.glyphicon-cutlery { &:before { content: \"\\e179\"; } }\n.glyphicon-header { &:before { content: \"\\e180\"; } }\n.glyphicon-compressed { &:before { content: \"\\e181\"; } }\n.glyphicon-earphone { &:before { content: \"\\e182\"; } }\n.glyphicon-phone-alt { &:before { content: \"\\e183\"; } }\n.glyphicon-tower { &:before { content: \"\\e184\"; } }\n.glyphicon-stats { &:before { content: \"\\e185\"; } }\n.glyphicon-sd-video { &:before { content: \"\\e186\"; } }\n.glyphicon-hd-video { &:before { content: \"\\e187\"; } }\n.glyphicon-subtitles { &:before { content: \"\\e188\"; } }\n.glyphicon-sound-stereo { &:before { content: \"\\e189\"; } }\n.glyphicon-sound-dolby { &:before { content: \"\\e190\"; } }\n.glyphicon-sound-5-1 { &:before { content: \"\\e191\"; } }\n.glyphicon-sound-6-1 { &:before { content: \"\\e192\"; } }\n.glyphicon-sound-7-1 { &:before { content: \"\\e193\"; } }\n.glyphicon-copyright-mark { &:before { content: \"\\e194\"; } }\n.glyphicon-registration-mark { &:before { content: \"\\e195\"; } }\n.glyphicon-cloud-download { &:before { content: \"\\e197\"; } }\n.glyphicon-cloud-upload { &:before { content: \"\\e198\"; } }\n.glyphicon-tree-conifer { &:before { content: \"\\e199\"; } }\n.glyphicon-tree-deciduous { &:before { content: \"\\e200\"; } }\n.glyphicon-cd { &:before { content: \"\\e201\"; } }\n.glyphicon-save-file { &:before { content: \"\\e202\"; } }\n.glyphicon-open-file { &:before { content: \"\\e203\"; } }\n.glyphicon-level-up { &:before { content: \"\\e204\"; } }\n.glyphicon-copy { &:before { content: \"\\e205\"; } }\n.glyphicon-paste { &:before { content: \"\\e206\"; } }\n// The following 2 Glyphicons are omitted for the time being because\n// they currently use Unicode codepoints that are outside the\n// Basic Multilingual Plane (BMP). Older buggy versions of WebKit can't handle\n// non-BMP codepoints in CSS string escapes, and thus can't display these two icons.\n// Notably, the bug affects some older versions of the Android Browser.\n// More info: https://github.com/twbs/bootstrap/issues/10106\n// .glyphicon-door { &:before { content: \"\\1f6aa\"; } }\n// .glyphicon-key { &:before { content: \"\\1f511\"; } }\n.glyphicon-alert { &:before { content: \"\\e209\"; } }\n.glyphicon-equalizer { &:before { content: \"\\e210\"; } }\n.glyphicon-king { &:before { content: \"\\e211\"; } }\n.glyphicon-queen { &:before { content: \"\\e212\"; } }\n.glyphicon-pawn { &:before { content: \"\\e213\"; } }\n.glyphicon-bishop { &:before { content: \"\\e214\"; } }\n.glyphicon-knight { &:before { content: \"\\e215\"; } }\n.glyphicon-baby-formula { &:before { content: \"\\e216\"; } }\n.glyphicon-tent { &:before { content: \"\\26fa\"; } }\n.glyphicon-blackboard { &:before { content: \"\\e218\"; } }\n.glyphicon-bed { &:before { content: \"\\e219\"; } }\n.glyphicon-apple { &:before { content: \"\\f8ff\"; } }\n.glyphicon-erase { &:before { content: \"\\e221\"; } }\n.glyphicon-hourglass { &:before { content: \"\\231b\"; } }\n.glyphicon-lamp { &:before { content: \"\\e223\"; } }\n.glyphicon-duplicate { &:before { content: \"\\e224\"; } }\n.glyphicon-piggy-bank { &:before { content: \"\\e225\"; } }\n.glyphicon-scissors { &:before { content: \"\\e226\"; } }\n.glyphicon-bitcoin { &:before { content: \"\\e227\"; } }\n.glyphicon-btc { &:before { content: \"\\e227\"; } }\n.glyphicon-xbt { &:before { content: \"\\e227\"; } }\n.glyphicon-yen { &:before { content: \"\\00a5\"; } }\n.glyphicon-jpy { &:before { content: \"\\00a5\"; } }\n.glyphicon-ruble { &:before { content: \"\\20bd\"; } }\n.glyphicon-rub { &:before { content: \"\\20bd\"; } }\n.glyphicon-scale { &:before { content: \"\\e230\"; } }\n.glyphicon-ice-lolly { &:before { content: \"\\e231\"; } }\n.glyphicon-ice-lolly-tasted { &:before { content: \"\\e232\"; } }\n.glyphicon-education { &:before { content: \"\\e233\"; } }\n.glyphicon-option-horizontal { &:before { content: \"\\e234\"; } }\n.glyphicon-option-vertical { &:before { content: \"\\e235\"; } }\n.glyphicon-menu-hamburger { &:before { content: \"\\e236\"; } }\n.glyphicon-modal-window { &:before { content: \"\\e237\"; } }\n.glyphicon-oil { &:before { content: \"\\e238\"; } }\n.glyphicon-grain { &:before { content: \"\\e239\"; } }\n.glyphicon-sunglasses { &:before { content: \"\\e240\"; } }\n.glyphicon-text-size { &:before { content: \"\\e241\"; } }\n.glyphicon-text-color { &:before { content: \"\\e242\"; } }\n.glyphicon-text-background { &:before { content: \"\\e243\"; } }\n.glyphicon-object-align-top { &:before { content: \"\\e244\"; } }\n.glyphicon-object-align-bottom { &:before { content: \"\\e245\"; } }\n.glyphicon-object-align-horizontal{ &:before { content: \"\\e246\"; } }\n.glyphicon-object-align-left { &:before { content: \"\\e247\"; } }\n.glyphicon-object-align-vertical { &:before { content: \"\\e248\"; } }\n.glyphicon-object-align-right { &:before { content: \"\\e249\"; } }\n.glyphicon-triangle-right { &:before { content: \"\\e250\"; } }\n.glyphicon-triangle-left { &:before { content: \"\\e251\"; } }\n.glyphicon-triangle-bottom { &:before { content: \"\\e252\"; } }\n.glyphicon-triangle-top { &:before { content: \"\\e253\"; } }\n.glyphicon-console { &:before { content: \"\\e254\"; } }\n.glyphicon-superscript { &:before { content: \"\\e255\"; } }\n.glyphicon-subscript { &:before { content: \"\\e256\"; } }\n.glyphicon-menu-left { &:before { content: \"\\e257\"; } }\n.glyphicon-menu-right { &:before { content: \"\\e258\"; } }\n.glyphicon-menu-down { &:before { content: \"\\e259\"; } }\n.glyphicon-menu-up { &:before { content: \"\\e260\"; } }\n","//\n// Scaffolding\n// --------------------------------------------------\n\n\n// Reset the box-sizing\n//\n// Heads up! This reset may cause conflicts with some third-party widgets.\n// For recommendations on resolving such conflicts, see\n// http://getbootstrap.com/getting-started/#third-box-sizing\n* {\n .box-sizing(border-box);\n}\n*:before,\n*:after {\n .box-sizing(border-box);\n}\n\n\n// Body reset\n\nhtml {\n font-size: 10px;\n -webkit-tap-highlight-color: rgba(0,0,0,0);\n}\n\nbody {\n font-family: @font-family-base;\n font-size: @font-size-base;\n line-height: @line-height-base;\n color: @text-color;\n background-color: @body-bg;\n}\n\n// Reset fonts for relevant elements\ninput,\nbutton,\nselect,\ntextarea {\n font-family: inherit;\n font-size: inherit;\n line-height: inherit;\n}\n\n\n// Links\n\na {\n color: @link-color;\n text-decoration: none;\n\n &:hover,\n &:focus {\n color: @link-hover-color;\n text-decoration: @link-hover-decoration;\n }\n\n &:focus {\n .tab-focus();\n }\n}\n\n\n// Figures\n//\n// We reset this here because previously Normalize had no `figure` margins. This\n// ensures we don't break anyone's use of the element.\n\nfigure {\n margin: 0;\n}\n\n\n// Images\n\nimg {\n vertical-align: middle;\n}\n\n// Responsive images (ensure images don't scale beyond their parents)\n.img-responsive {\n .img-responsive();\n}\n\n// Rounded corners\n.img-rounded {\n border-radius: @border-radius-large;\n}\n\n// Image thumbnails\n//\n// Heads up! This is mixin-ed into thumbnails.less for `.thumbnail`.\n.img-thumbnail {\n padding: @thumbnail-padding;\n line-height: @line-height-base;\n background-color: @thumbnail-bg;\n border: 1px solid @thumbnail-border;\n border-radius: @thumbnail-border-radius;\n .transition(all .2s ease-in-out);\n\n // Keep them at most 100% wide\n .img-responsive(inline-block);\n}\n\n// Perfect circle\n.img-circle {\n border-radius: 50%; // set radius in percents\n}\n\n\n// Horizontal rules\n\nhr {\n margin-top: @line-height-computed;\n margin-bottom: @line-height-computed;\n border: 0;\n border-top: 1px solid @hr-border;\n}\n\n\n// Only display content to screen readers\n//\n// See: http://a11yproject.com/posts/how-to-hide-content/\n\n.sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n margin: -1px;\n padding: 0;\n overflow: hidden;\n clip: rect(0,0,0,0);\n border: 0;\n}\n\n// Use in conjunction with .sr-only to only display content when it's focused.\n// Useful for \"Skip to main content\" links; see http://www.w3.org/TR/2013/NOTE-WCAG20-TECHS-20130905/G1\n// Credit: HTML5 Boilerplate\n\n.sr-only-focusable {\n &:active,\n &:focus {\n position: static;\n width: auto;\n height: auto;\n margin: 0;\n overflow: visible;\n clip: auto;\n }\n}\n\n\n// iOS \"clickable elements\" fix for role=\"button\"\n//\n// Fixes \"clickability\" issue (and more generally, the firing of events such as focus as well)\n// for traditionally non-focusable elements with role=\"button\"\n// see https://developer.mozilla.org/en-US/docs/Web/Events/click#Safari_Mobile\n\n[role=\"button\"] {\n cursor: pointer;\n}\n","// Vendor Prefixes\n//\n// All vendor mixins are deprecated as of v3.2.0 due to the introduction of\n// Autoprefixer in our Gruntfile. They have been removed in v4.\n\n// - Animations\n// - Backface visibility\n// - Box shadow\n// - Box sizing\n// - Content columns\n// - Hyphens\n// - Placeholder text\n// - Transformations\n// - Transitions\n// - User Select\n\n\n// Animations\n.animation(@animation) {\n -webkit-animation: @animation;\n -o-animation: @animation;\n animation: @animation;\n}\n.animation-name(@name) {\n -webkit-animation-name: @name;\n animation-name: @name;\n}\n.animation-duration(@duration) {\n -webkit-animation-duration: @duration;\n animation-duration: @duration;\n}\n.animation-timing-function(@timing-function) {\n -webkit-animation-timing-function: @timing-function;\n animation-timing-function: @timing-function;\n}\n.animation-delay(@delay) {\n -webkit-animation-delay: @delay;\n animation-delay: @delay;\n}\n.animation-iteration-count(@iteration-count) {\n -webkit-animation-iteration-count: @iteration-count;\n animation-iteration-count: @iteration-count;\n}\n.animation-direction(@direction) {\n -webkit-animation-direction: @direction;\n animation-direction: @direction;\n}\n.animation-fill-mode(@fill-mode) {\n -webkit-animation-fill-mode: @fill-mode;\n animation-fill-mode: @fill-mode;\n}\n\n// Backface visibility\n// Prevent browsers from flickering when using CSS 3D transforms.\n// Default value is `visible`, but can be changed to `hidden`\n\n.backface-visibility(@visibility) {\n -webkit-backface-visibility: @visibility;\n -moz-backface-visibility: @visibility;\n backface-visibility: @visibility;\n}\n\n// Drop shadows\n//\n// Note: Deprecated `.box-shadow()` as of v3.1.0 since all of Bootstrap's\n// supported browsers that have box shadow capabilities now support it.\n\n.box-shadow(@shadow) {\n -webkit-box-shadow: @shadow; // iOS <4.3 & Android <4.1\n box-shadow: @shadow;\n}\n\n// Box sizing\n.box-sizing(@boxmodel) {\n -webkit-box-sizing: @boxmodel;\n -moz-box-sizing: @boxmodel;\n box-sizing: @boxmodel;\n}\n\n// CSS3 Content Columns\n.content-columns(@column-count; @column-gap: @grid-gutter-width) {\n -webkit-column-count: @column-count;\n -moz-column-count: @column-count;\n column-count: @column-count;\n -webkit-column-gap: @column-gap;\n -moz-column-gap: @column-gap;\n column-gap: @column-gap;\n}\n\n// Optional hyphenation\n.hyphens(@mode: auto) {\n word-wrap: break-word;\n -webkit-hyphens: @mode;\n -moz-hyphens: @mode;\n -ms-hyphens: @mode; // IE10+\n -o-hyphens: @mode;\n hyphens: @mode;\n}\n\n// Placeholder text\n.placeholder(@color: @input-color-placeholder) {\n // Firefox\n &::-moz-placeholder {\n color: @color;\n opacity: 1; // Override Firefox's unusual default opacity; see https://github.com/twbs/bootstrap/pull/11526\n }\n &:-ms-input-placeholder { color: @color; } // Internet Explorer 10+\n &::-webkit-input-placeholder { color: @color; } // Safari and Chrome\n}\n\n// Transformations\n.scale(@ratio) {\n -webkit-transform: scale(@ratio);\n -ms-transform: scale(@ratio); // IE9 only\n -o-transform: scale(@ratio);\n transform: scale(@ratio);\n}\n.scale(@ratioX; @ratioY) {\n -webkit-transform: scale(@ratioX, @ratioY);\n -ms-transform: scale(@ratioX, @ratioY); // IE9 only\n -o-transform: scale(@ratioX, @ratioY);\n transform: scale(@ratioX, @ratioY);\n}\n.scaleX(@ratio) {\n -webkit-transform: scaleX(@ratio);\n -ms-transform: scaleX(@ratio); // IE9 only\n -o-transform: scaleX(@ratio);\n transform: scaleX(@ratio);\n}\n.scaleY(@ratio) {\n -webkit-transform: scaleY(@ratio);\n -ms-transform: scaleY(@ratio); // IE9 only\n -o-transform: scaleY(@ratio);\n transform: scaleY(@ratio);\n}\n.skew(@x; @y) {\n -webkit-transform: skewX(@x) skewY(@y);\n -ms-transform: skewX(@x) skewY(@y); // See https://github.com/twbs/bootstrap/issues/4885; IE9+\n -o-transform: skewX(@x) skewY(@y);\n transform: skewX(@x) skewY(@y);\n}\n.translate(@x; @y) {\n -webkit-transform: translate(@x, @y);\n -ms-transform: translate(@x, @y); // IE9 only\n -o-transform: translate(@x, @y);\n transform: translate(@x, @y);\n}\n.translate3d(@x; @y; @z) {\n -webkit-transform: translate3d(@x, @y, @z);\n transform: translate3d(@x, @y, @z);\n}\n.rotate(@degrees) {\n -webkit-transform: rotate(@degrees);\n -ms-transform: rotate(@degrees); // IE9 only\n -o-transform: rotate(@degrees);\n transform: rotate(@degrees);\n}\n.rotateX(@degrees) {\n -webkit-transform: rotateX(@degrees);\n -ms-transform: rotateX(@degrees); // IE9 only\n -o-transform: rotateX(@degrees);\n transform: rotateX(@degrees);\n}\n.rotateY(@degrees) {\n -webkit-transform: rotateY(@degrees);\n -ms-transform: rotateY(@degrees); // IE9 only\n -o-transform: rotateY(@degrees);\n transform: rotateY(@degrees);\n}\n.perspective(@perspective) {\n -webkit-perspective: @perspective;\n -moz-perspective: @perspective;\n perspective: @perspective;\n}\n.perspective-origin(@perspective) {\n -webkit-perspective-origin: @perspective;\n -moz-perspective-origin: @perspective;\n perspective-origin: @perspective;\n}\n.transform-origin(@origin) {\n -webkit-transform-origin: @origin;\n -moz-transform-origin: @origin;\n -ms-transform-origin: @origin; // IE9 only\n transform-origin: @origin;\n}\n\n\n// Transitions\n\n.transition(@transition) {\n -webkit-transition: @transition;\n -o-transition: @transition;\n transition: @transition;\n}\n.transition-property(@transition-property) {\n -webkit-transition-property: @transition-property;\n transition-property: @transition-property;\n}\n.transition-delay(@transition-delay) {\n -webkit-transition-delay: @transition-delay;\n transition-delay: @transition-delay;\n}\n.transition-duration(@transition-duration) {\n -webkit-transition-duration: @transition-duration;\n transition-duration: @transition-duration;\n}\n.transition-timing-function(@timing-function) {\n -webkit-transition-timing-function: @timing-function;\n transition-timing-function: @timing-function;\n}\n.transition-transform(@transition) {\n -webkit-transition: -webkit-transform @transition;\n -moz-transition: -moz-transform @transition;\n -o-transition: -o-transform @transition;\n transition: transform @transition;\n}\n\n\n// User select\n// For selecting text on the page\n\n.user-select(@select) {\n -webkit-user-select: @select;\n -moz-user-select: @select;\n -ms-user-select: @select; // IE10+\n user-select: @select;\n}\n","// WebKit-style focus\n\n.tab-focus() {\n // Default\n outline: thin dotted;\n // WebKit\n outline: 5px auto -webkit-focus-ring-color;\n outline-offset: -2px;\n}\n","// Image Mixins\n// - Responsive image\n// - Retina image\n\n\n// Responsive image\n//\n// Keep images from scaling beyond the width of their parents.\n.img-responsive(@display: block) {\n display: @display;\n max-width: 100%; // Part 1: Set a maximum relative to the parent\n height: auto; // Part 2: Scale the height according to the width, otherwise you get stretching\n}\n\n\n// Retina image\n//\n// Short retina mixin for setting background-image and -size. Note that the\n// spelling of `min--moz-device-pixel-ratio` is intentional.\n.img-retina(@file-1x; @file-2x; @width-1x; @height-1x) {\n background-image: url(\"@{file-1x}\");\n\n @media\n only screen and (-webkit-min-device-pixel-ratio: 2),\n only screen and ( min--moz-device-pixel-ratio: 2),\n only screen and ( -o-min-device-pixel-ratio: 2/1),\n only screen and ( min-device-pixel-ratio: 2),\n only screen and ( min-resolution: 192dpi),\n only screen and ( min-resolution: 2dppx) {\n background-image: url(\"@{file-2x}\");\n background-size: @width-1x @height-1x;\n }\n}\n","//\n// Typography\n// --------------------------------------------------\n\n\n// Headings\n// -------------------------\n\nh1, h2, h3, h4, h5, h6,\n.h1, .h2, .h3, .h4, .h5, .h6 {\n font-family: @headings-font-family;\n font-weight: @headings-font-weight;\n line-height: @headings-line-height;\n color: @headings-color;\n\n small,\n .small {\n font-weight: normal;\n line-height: 1;\n color: @headings-small-color;\n }\n}\n\nh1, .h1,\nh2, .h2,\nh3, .h3 {\n margin-top: @line-height-computed;\n margin-bottom: (@line-height-computed / 2);\n\n small,\n .small {\n font-size: 65%;\n }\n}\nh4, .h4,\nh5, .h5,\nh6, .h6 {\n margin-top: (@line-height-computed / 2);\n margin-bottom: (@line-height-computed / 2);\n\n small,\n .small {\n font-size: 75%;\n }\n}\n\nh1, .h1 { font-size: @font-size-h1; }\nh2, .h2 { font-size: @font-size-h2; }\nh3, .h3 { font-size: @font-size-h3; }\nh4, .h4 { font-size: @font-size-h4; }\nh5, .h5 { font-size: @font-size-h5; }\nh6, .h6 { font-size: @font-size-h6; }\n\n\n// Body text\n// -------------------------\n\np {\n margin: 0 0 (@line-height-computed / 2);\n}\n\n.lead {\n margin-bottom: @line-height-computed;\n font-size: floor((@font-size-base * 1.15));\n font-weight: 300;\n line-height: 1.4;\n\n @media (min-width: @screen-sm-min) {\n font-size: (@font-size-base * 1.5);\n }\n}\n\n\n// Emphasis & misc\n// -------------------------\n\n// Ex: (12px small font / 14px base font) * 100% = about 85%\nsmall,\n.small {\n font-size: floor((100% * @font-size-small / @font-size-base));\n}\n\nmark,\n.mark {\n background-color: @state-warning-bg;\n padding: .2em;\n}\n\n// Alignment\n.text-left { text-align: left; }\n.text-right { text-align: right; }\n.text-center { text-align: center; }\n.text-justify { text-align: justify; }\n.text-nowrap { white-space: nowrap; }\n\n// Transformation\n.text-lowercase { text-transform: lowercase; }\n.text-uppercase { text-transform: uppercase; }\n.text-capitalize { text-transform: capitalize; }\n\n// Contextual colors\n.text-muted {\n color: @text-muted;\n}\n.text-primary {\n .text-emphasis-variant(@brand-primary);\n}\n.text-success {\n .text-emphasis-variant(@state-success-text);\n}\n.text-info {\n .text-emphasis-variant(@state-info-text);\n}\n.text-warning {\n .text-emphasis-variant(@state-warning-text);\n}\n.text-danger {\n .text-emphasis-variant(@state-danger-text);\n}\n\n// Contextual backgrounds\n// For now we'll leave these alongside the text classes until v4 when we can\n// safely shift things around (per SemVer rules).\n.bg-primary {\n // Given the contrast here, this is the only class to have its color inverted\n // automatically.\n color: #fff;\n .bg-variant(@brand-primary);\n}\n.bg-success {\n .bg-variant(@state-success-bg);\n}\n.bg-info {\n .bg-variant(@state-info-bg);\n}\n.bg-warning {\n .bg-variant(@state-warning-bg);\n}\n.bg-danger {\n .bg-variant(@state-danger-bg);\n}\n\n\n// Page header\n// -------------------------\n\n.page-header {\n padding-bottom: ((@line-height-computed / 2) - 1);\n margin: (@line-height-computed * 2) 0 @line-height-computed;\n border-bottom: 1px solid @page-header-border-color;\n}\n\n\n// Lists\n// -------------------------\n\n// Unordered and Ordered lists\nul,\nol {\n margin-top: 0;\n margin-bottom: (@line-height-computed / 2);\n ul,\n ol {\n margin-bottom: 0;\n }\n}\n\n// List options\n\n// Unstyled keeps list items block level, just removes default browser padding and list-style\n.list-unstyled {\n padding-left: 0;\n list-style: none;\n}\n\n// Inline turns list items into inline-block\n.list-inline {\n .list-unstyled();\n margin-left: -5px;\n\n > li {\n display: inline-block;\n padding-left: 5px;\n padding-right: 5px;\n }\n}\n\n// Description Lists\ndl {\n margin-top: 0; // Remove browser default\n margin-bottom: @line-height-computed;\n}\ndt,\ndd {\n line-height: @line-height-base;\n}\ndt {\n font-weight: bold;\n}\ndd {\n margin-left: 0; // Undo browser default\n}\n\n// Horizontal description lists\n//\n// Defaults to being stacked without any of the below styles applied, until the\n// grid breakpoint is reached (default of ~768px).\n\n.dl-horizontal {\n dd {\n &:extend(.clearfix all); // Clear the floated `dt` if an empty `dd` is present\n }\n\n @media (min-width: @dl-horizontal-breakpoint) {\n dt {\n float: left;\n width: (@dl-horizontal-offset - 20);\n clear: left;\n text-align: right;\n .text-overflow();\n }\n dd {\n margin-left: @dl-horizontal-offset;\n }\n }\n}\n\n\n// Misc\n// -------------------------\n\n// Abbreviations and acronyms\nabbr[title],\n// Add data-* attribute to help out our tooltip plugin, per https://github.com/twbs/bootstrap/issues/5257\nabbr[data-original-title] {\n cursor: help;\n border-bottom: 1px dotted @abbr-border-color;\n}\n.initialism {\n font-size: 90%;\n .text-uppercase();\n}\n\n// Blockquotes\nblockquote {\n padding: (@line-height-computed / 2) @line-height-computed;\n margin: 0 0 @line-height-computed;\n font-size: @blockquote-font-size;\n border-left: 5px solid @blockquote-border-color;\n\n p,\n ul,\n ol {\n &:last-child {\n margin-bottom: 0;\n }\n }\n\n // Note: Deprecated small and .small as of v3.1.0\n // Context: https://github.com/twbs/bootstrap/issues/11660\n footer,\n small,\n .small {\n display: block;\n font-size: 80%; // back to default font-size\n line-height: @line-height-base;\n color: @blockquote-small-color;\n\n &:before {\n content: '\\2014 \\00A0'; // em dash, nbsp\n }\n }\n}\n\n// Opposite alignment of blockquote\n//\n// Heads up: `blockquote.pull-right` has been deprecated as of v3.1.0.\n.blockquote-reverse,\nblockquote.pull-right {\n padding-right: 15px;\n padding-left: 0;\n border-right: 5px solid @blockquote-border-color;\n border-left: 0;\n text-align: right;\n\n // Account for citation\n footer,\n small,\n .small {\n &:before { content: ''; }\n &:after {\n content: '\\00A0 \\2014'; // nbsp, em dash\n }\n }\n}\n\n// Addresses\naddress {\n margin-bottom: @line-height-computed;\n font-style: normal;\n line-height: @line-height-base;\n}\n","// Typography\n\n.text-emphasis-variant(@color) {\n color: @color;\n a&:hover,\n a&:focus {\n color: darken(@color, 10%);\n }\n}\n","// Contextual backgrounds\n\n.bg-variant(@color) {\n background-color: @color;\n a&:hover,\n a&:focus {\n background-color: darken(@color, 10%);\n }\n}\n","// Text overflow\n// Requires inline-block or block for proper styling\n\n.text-overflow() {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n","//\n// Code (inline and block)\n// --------------------------------------------------\n\n\n// Inline and block code styles\ncode,\nkbd,\npre,\nsamp {\n font-family: @font-family-monospace;\n}\n\n// Inline code\ncode {\n padding: 2px 4px;\n font-size: 90%;\n color: @code-color;\n background-color: @code-bg;\n border-radius: @border-radius-base;\n}\n\n// User input typically entered via keyboard\nkbd {\n padding: 2px 4px;\n font-size: 90%;\n color: @kbd-color;\n background-color: @kbd-bg;\n border-radius: @border-radius-small;\n box-shadow: inset 0 -1px 0 rgba(0,0,0,.25);\n\n kbd {\n padding: 0;\n font-size: 100%;\n font-weight: bold;\n box-shadow: none;\n }\n}\n\n// Blocks of code\npre {\n display: block;\n padding: ((@line-height-computed - 1) / 2);\n margin: 0 0 (@line-height-computed / 2);\n font-size: (@font-size-base - 1); // 14px to 13px\n line-height: @line-height-base;\n word-break: break-all;\n word-wrap: break-word;\n color: @pre-color;\n background-color: @pre-bg;\n border: 1px solid @pre-border-color;\n border-radius: @border-radius-base;\n\n // Account for some code outputs that place code tags in pre tags\n code {\n padding: 0;\n font-size: inherit;\n color: inherit;\n white-space: pre-wrap;\n background-color: transparent;\n border-radius: 0;\n }\n}\n\n// Enable scrollable blocks of code\n.pre-scrollable {\n max-height: @pre-scrollable-max-height;\n overflow-y: scroll;\n}\n","//\n// Grid system\n// --------------------------------------------------\n\n\n// Container widths\n//\n// Set the container width, and override it for fixed navbars in media queries.\n\n.container {\n .container-fixed();\n\n @media (min-width: @screen-sm-min) {\n width: @container-sm;\n }\n @media (min-width: @screen-md-min) {\n width: @container-md;\n }\n @media (min-width: @screen-lg-min) {\n width: @container-lg;\n }\n}\n\n\n// Fluid container\n//\n// Utilizes the mixin meant for fixed width containers, but without any defined\n// width for fluid, full width layouts.\n\n.container-fluid {\n .container-fixed();\n}\n\n\n// Row\n//\n// Rows contain and clear the floats of your columns.\n\n.row {\n .make-row();\n}\n\n\n// Columns\n//\n// Common styles for small and large grid columns\n\n.make-grid-columns();\n\n\n// Extra small grid\n//\n// Columns, offsets, pushes, and pulls for extra small devices like\n// smartphones.\n\n.make-grid(xs);\n\n\n// Small grid\n//\n// Columns, offsets, pushes, and pulls for the small device range, from phones\n// to tablets.\n\n@media (min-width: @screen-sm-min) {\n .make-grid(sm);\n}\n\n\n// Medium grid\n//\n// Columns, offsets, pushes, and pulls for the desktop device range.\n\n@media (min-width: @screen-md-min) {\n .make-grid(md);\n}\n\n\n// Large grid\n//\n// Columns, offsets, pushes, and pulls for the large desktop device range.\n\n@media (min-width: @screen-lg-min) {\n .make-grid(lg);\n}\n","// Grid system\n//\n// Generate semantic grid columns with these mixins.\n\n// Centered container element\n.container-fixed(@gutter: @grid-gutter-width) {\n margin-right: auto;\n margin-left: auto;\n padding-left: floor((@gutter / 2));\n padding-right: ceil((@gutter / 2));\n &:extend(.clearfix all);\n}\n\n// Creates a wrapper for a series of columns\n.make-row(@gutter: @grid-gutter-width) {\n margin-left: ceil((@gutter / -2));\n margin-right: floor((@gutter / -2));\n &:extend(.clearfix all);\n}\n\n// Generate the extra small columns\n.make-xs-column(@columns; @gutter: @grid-gutter-width) {\n position: relative;\n float: left;\n width: percentage((@columns / @grid-columns));\n min-height: 1px;\n padding-left: (@gutter / 2);\n padding-right: (@gutter / 2);\n}\n.make-xs-column-offset(@columns) {\n margin-left: percentage((@columns / @grid-columns));\n}\n.make-xs-column-push(@columns) {\n left: percentage((@columns / @grid-columns));\n}\n.make-xs-column-pull(@columns) {\n right: percentage((@columns / @grid-columns));\n}\n\n// Generate the small columns\n.make-sm-column(@columns; @gutter: @grid-gutter-width) {\n position: relative;\n min-height: 1px;\n padding-left: (@gutter / 2);\n padding-right: (@gutter / 2);\n\n @media (min-width: @screen-sm-min) {\n float: left;\n width: percentage((@columns / @grid-columns));\n }\n}\n.make-sm-column-offset(@columns) {\n @media (min-width: @screen-sm-min) {\n margin-left: percentage((@columns / @grid-columns));\n }\n}\n.make-sm-column-push(@columns) {\n @media (min-width: @screen-sm-min) {\n left: percentage((@columns / @grid-columns));\n }\n}\n.make-sm-column-pull(@columns) {\n @media (min-width: @screen-sm-min) {\n right: percentage((@columns / @grid-columns));\n }\n}\n\n// Generate the medium columns\n.make-md-column(@columns; @gutter: @grid-gutter-width) {\n position: relative;\n min-height: 1px;\n padding-left: (@gutter / 2);\n padding-right: (@gutter / 2);\n\n @media (min-width: @screen-md-min) {\n float: left;\n width: percentage((@columns / @grid-columns));\n }\n}\n.make-md-column-offset(@columns) {\n @media (min-width: @screen-md-min) {\n margin-left: percentage((@columns / @grid-columns));\n }\n}\n.make-md-column-push(@columns) {\n @media (min-width: @screen-md-min) {\n left: percentage((@columns / @grid-columns));\n }\n}\n.make-md-column-pull(@columns) {\n @media (min-width: @screen-md-min) {\n right: percentage((@columns / @grid-columns));\n }\n}\n\n// Generate the large columns\n.make-lg-column(@columns; @gutter: @grid-gutter-width) {\n position: relative;\n min-height: 1px;\n padding-left: (@gutter / 2);\n padding-right: (@gutter / 2);\n\n @media (min-width: @screen-lg-min) {\n float: left;\n width: percentage((@columns / @grid-columns));\n }\n}\n.make-lg-column-offset(@columns) {\n @media (min-width: @screen-lg-min) {\n margin-left: percentage((@columns / @grid-columns));\n }\n}\n.make-lg-column-push(@columns) {\n @media (min-width: @screen-lg-min) {\n left: percentage((@columns / @grid-columns));\n }\n}\n.make-lg-column-pull(@columns) {\n @media (min-width: @screen-lg-min) {\n right: percentage((@columns / @grid-columns));\n }\n}\n","// Framework grid generation\n//\n// Used only by Bootstrap to generate the correct number of grid classes given\n// any value of `@grid-columns`.\n\n.make-grid-columns() {\n // Common styles for all sizes of grid columns, widths 1-12\n .col(@index) { // initial\n @item: ~\".col-xs-@{index}, .col-sm-@{index}, .col-md-@{index}, .col-lg-@{index}\";\n .col((@index + 1), @item);\n }\n .col(@index, @list) when (@index =< @grid-columns) { // general; \"=<\" isn't a typo\n @item: ~\".col-xs-@{index}, .col-sm-@{index}, .col-md-@{index}, .col-lg-@{index}\";\n .col((@index + 1), ~\"@{list}, @{item}\");\n }\n .col(@index, @list) when (@index > @grid-columns) { // terminal\n @{list} {\n position: relative;\n // Prevent columns from collapsing when empty\n min-height: 1px;\n // Inner gutter via padding\n padding-left: ceil((@grid-gutter-width / 2));\n padding-right: floor((@grid-gutter-width / 2));\n }\n }\n .col(1); // kickstart it\n}\n\n.float-grid-columns(@class) {\n .col(@index) { // initial\n @item: ~\".col-@{class}-@{index}\";\n .col((@index + 1), @item);\n }\n .col(@index, @list) when (@index =< @grid-columns) { // general\n @item: ~\".col-@{class}-@{index}\";\n .col((@index + 1), ~\"@{list}, @{item}\");\n }\n .col(@index, @list) when (@index > @grid-columns) { // terminal\n @{list} {\n float: left;\n }\n }\n .col(1); // kickstart it\n}\n\n.calc-grid-column(@index, @class, @type) when (@type = width) and (@index > 0) {\n .col-@{class}-@{index} {\n width: percentage((@index / @grid-columns));\n }\n}\n.calc-grid-column(@index, @class, @type) when (@type = push) and (@index > 0) {\n .col-@{class}-push-@{index} {\n left: percentage((@index / @grid-columns));\n }\n}\n.calc-grid-column(@index, @class, @type) when (@type = push) and (@index = 0) {\n .col-@{class}-push-0 {\n left: auto;\n }\n}\n.calc-grid-column(@index, @class, @type) when (@type = pull) and (@index > 0) {\n .col-@{class}-pull-@{index} {\n right: percentage((@index / @grid-columns));\n }\n}\n.calc-grid-column(@index, @class, @type) when (@type = pull) and (@index = 0) {\n .col-@{class}-pull-0 {\n right: auto;\n }\n}\n.calc-grid-column(@index, @class, @type) when (@type = offset) {\n .col-@{class}-offset-@{index} {\n margin-left: percentage((@index / @grid-columns));\n }\n}\n\n// Basic looping in LESS\n.loop-grid-columns(@index, @class, @type) when (@index >= 0) {\n .calc-grid-column(@index, @class, @type);\n // next iteration\n .loop-grid-columns((@index - 1), @class, @type);\n}\n\n// Create grid for specific class\n.make-grid(@class) {\n .float-grid-columns(@class);\n .loop-grid-columns(@grid-columns, @class, width);\n .loop-grid-columns(@grid-columns, @class, pull);\n .loop-grid-columns(@grid-columns, @class, push);\n .loop-grid-columns(@grid-columns, @class, offset);\n}\n","//\n// Tables\n// --------------------------------------------------\n\n\ntable {\n background-color: @table-bg;\n}\ncaption {\n padding-top: @table-cell-padding;\n padding-bottom: @table-cell-padding;\n color: @text-muted;\n text-align: left;\n}\nth {\n text-align: left;\n}\n\n\n// Baseline styles\n\n.table {\n width: 100%;\n max-width: 100%;\n margin-bottom: @line-height-computed;\n // Cells\n > thead,\n > tbody,\n > tfoot {\n > tr {\n > th,\n > td {\n padding: @table-cell-padding;\n line-height: @line-height-base;\n vertical-align: top;\n border-top: 1px solid @table-border-color;\n }\n }\n }\n // Bottom align for column headings\n > thead > tr > th {\n vertical-align: bottom;\n border-bottom: 2px solid @table-border-color;\n }\n // Remove top border from thead by default\n > caption + thead,\n > colgroup + thead,\n > thead:first-child {\n > tr:first-child {\n > th,\n > td {\n border-top: 0;\n }\n }\n }\n // Account for multiple tbody instances\n > tbody + tbody {\n border-top: 2px solid @table-border-color;\n }\n\n // Nesting\n .table {\n background-color: @body-bg;\n }\n}\n\n\n// Condensed table w/ half padding\n\n.table-condensed {\n > thead,\n > tbody,\n > tfoot {\n > tr {\n > th,\n > td {\n padding: @table-condensed-cell-padding;\n }\n }\n }\n}\n\n\n// Bordered version\n//\n// Add borders all around the table and between all the columns.\n\n.table-bordered {\n border: 1px solid @table-border-color;\n > thead,\n > tbody,\n > tfoot {\n > tr {\n > th,\n > td {\n border: 1px solid @table-border-color;\n }\n }\n }\n > thead > tr {\n > th,\n > td {\n border-bottom-width: 2px;\n }\n }\n}\n\n\n// Zebra-striping\n//\n// Default zebra-stripe styles (alternating gray and transparent backgrounds)\n\n.table-striped {\n > tbody > tr:nth-of-type(odd) {\n background-color: @table-bg-accent;\n }\n}\n\n\n// Hover effect\n//\n// Placed here since it has to come after the potential zebra striping\n\n.table-hover {\n > tbody > tr:hover {\n background-color: @table-bg-hover;\n }\n}\n\n\n// Table cell sizing\n//\n// Reset default table behavior\n\ntable col[class*=\"col-\"] {\n position: static; // Prevent border hiding in Firefox and IE9-11 (see https://github.com/twbs/bootstrap/issues/11623)\n float: none;\n display: table-column;\n}\ntable {\n td,\n th {\n &[class*=\"col-\"] {\n position: static; // Prevent border hiding in Firefox and IE9-11 (see https://github.com/twbs/bootstrap/issues/11623)\n float: none;\n display: table-cell;\n }\n }\n}\n\n\n// Table backgrounds\n//\n// Exact selectors below required to override `.table-striped` and prevent\n// inheritance to nested tables.\n\n// Generate the contextual variants\n.table-row-variant(active; @table-bg-active);\n.table-row-variant(success; @state-success-bg);\n.table-row-variant(info; @state-info-bg);\n.table-row-variant(warning; @state-warning-bg);\n.table-row-variant(danger; @state-danger-bg);\n\n\n// Responsive tables\n//\n// Wrap your tables in `.table-responsive` and we'll make them mobile friendly\n// by enabling horizontal scrolling. Only applies <768px. Everything above that\n// will display normally.\n\n.table-responsive {\n overflow-x: auto;\n min-height: 0.01%; // Workaround for IE9 bug (see https://github.com/twbs/bootstrap/issues/14837)\n\n @media screen and (max-width: @screen-xs-max) {\n width: 100%;\n margin-bottom: (@line-height-computed * 0.75);\n overflow-y: hidden;\n -ms-overflow-style: -ms-autohiding-scrollbar;\n border: 1px solid @table-border-color;\n\n // Tighten up spacing\n > .table {\n margin-bottom: 0;\n\n // Ensure the content doesn't wrap\n > thead,\n > tbody,\n > tfoot {\n > tr {\n > th,\n > td {\n white-space: nowrap;\n }\n }\n }\n }\n\n // Special overrides for the bordered tables\n > .table-bordered {\n border: 0;\n\n // Nuke the appropriate borders so that the parent can handle them\n > thead,\n > tbody,\n > tfoot {\n > tr {\n > th:first-child,\n > td:first-child {\n border-left: 0;\n }\n > th:last-child,\n > td:last-child {\n border-right: 0;\n }\n }\n }\n\n // Only nuke the last row's bottom-border in `tbody` and `tfoot` since\n // chances are there will be only one `tr` in a `thead` and that would\n // remove the border altogether.\n > tbody,\n > tfoot {\n > tr:last-child {\n > th,\n > td {\n border-bottom: 0;\n }\n }\n }\n\n }\n }\n}\n","// Tables\n\n.table-row-variant(@state; @background) {\n // Exact selectors below required to override `.table-striped` and prevent\n // inheritance to nested tables.\n .table > thead > tr,\n .table > tbody > tr,\n .table > tfoot > tr {\n > td.@{state},\n > th.@{state},\n &.@{state} > td,\n &.@{state} > th {\n background-color: @background;\n }\n }\n\n // Hover states for `.table-hover`\n // Note: this is not available for cells or rows within `thead` or `tfoot`.\n .table-hover > tbody > tr {\n > td.@{state}:hover,\n > th.@{state}:hover,\n &.@{state}:hover > td,\n &:hover > .@{state},\n &.@{state}:hover > th {\n background-color: darken(@background, 5%);\n }\n }\n}\n","//\n// Forms\n// --------------------------------------------------\n\n\n// Normalize non-controls\n//\n// Restyle and baseline non-control form elements.\n\nfieldset {\n padding: 0;\n margin: 0;\n border: 0;\n // Chrome and Firefox set a `min-width: min-content;` on fieldsets,\n // so we reset that to ensure it behaves more like a standard block element.\n // See https://github.com/twbs/bootstrap/issues/12359.\n min-width: 0;\n}\n\nlegend {\n display: block;\n width: 100%;\n padding: 0;\n margin-bottom: @line-height-computed;\n font-size: (@font-size-base * 1.5);\n line-height: inherit;\n color: @legend-color;\n border: 0;\n border-bottom: 1px solid @legend-border-color;\n}\n\nlabel {\n display: inline-block;\n max-width: 100%; // Force IE8 to wrap long content (see https://github.com/twbs/bootstrap/issues/13141)\n margin-bottom: 5px;\n font-weight: bold;\n}\n\n\n// Normalize form controls\n//\n// While most of our form styles require extra classes, some basic normalization\n// is required to ensure optimum display with or without those classes to better\n// address browser inconsistencies.\n\n// Override content-box in Normalize (* isn't specific enough)\ninput[type=\"search\"] {\n .box-sizing(border-box);\n}\n\n// Position radios and checkboxes better\ninput[type=\"radio\"],\ninput[type=\"checkbox\"] {\n margin: 4px 0 0;\n margin-top: 1px \\9; // IE8-9\n line-height: normal;\n}\n\ninput[type=\"file\"] {\n display: block;\n}\n\n// Make range inputs behave like textual form controls\ninput[type=\"range\"] {\n display: block;\n width: 100%;\n}\n\n// Make multiple select elements height not fixed\nselect[multiple],\nselect[size] {\n height: auto;\n}\n\n// Focus for file, radio, and checkbox\ninput[type=\"file\"]:focus,\ninput[type=\"radio\"]:focus,\ninput[type=\"checkbox\"]:focus {\n .tab-focus();\n}\n\n// Adjust output element\noutput {\n display: block;\n padding-top: (@padding-base-vertical + 1);\n font-size: @font-size-base;\n line-height: @line-height-base;\n color: @input-color;\n}\n\n\n// Common form controls\n//\n// Shared size and type resets for form controls. Apply `.form-control` to any\n// of the following form controls:\n//\n// select\n// textarea\n// input[type=\"text\"]\n// input[type=\"password\"]\n// input[type=\"datetime\"]\n// input[type=\"datetime-local\"]\n// input[type=\"date\"]\n// input[type=\"month\"]\n// input[type=\"time\"]\n// input[type=\"week\"]\n// input[type=\"number\"]\n// input[type=\"email\"]\n// input[type=\"url\"]\n// input[type=\"search\"]\n// input[type=\"tel\"]\n// input[type=\"color\"]\n\n.form-control {\n display: block;\n width: 100%;\n height: @input-height-base; // Make inputs at least the height of their button counterpart (base line-height + padding + border)\n padding: @padding-base-vertical @padding-base-horizontal;\n font-size: @font-size-base;\n line-height: @line-height-base;\n color: @input-color;\n background-color: @input-bg;\n background-image: none; // Reset unusual Firefox-on-Android default style; see https://github.com/necolas/normalize.css/issues/214\n border: 1px solid @input-border;\n border-radius: @input-border-radius; // Note: This has no effect on <select>s in some browsers, due to the limited stylability of <select>s in CSS.\n .box-shadow(inset 0 1px 1px rgba(0,0,0,.075));\n .transition(~\"border-color ease-in-out .15s, box-shadow ease-in-out .15s\");\n\n // Customize the `:focus` state to imitate native WebKit styles.\n .form-control-focus();\n\n // Placeholder\n .placeholder();\n\n // Unstyle the caret on `<select>`s in IE10+.\n &::-ms-expand {\n border: 0;\n background-color: transparent;\n }\n\n // Disabled and read-only inputs\n //\n // HTML5 says that controls under a fieldset > legend:first-child won't be\n // disabled if the fieldset is disabled. Due to implementation difficulty, we\n // don't honor that edge case; we style them as disabled anyway.\n &[disabled],\n &[readonly],\n fieldset[disabled] & {\n background-color: @input-bg-disabled;\n opacity: 1; // iOS fix for unreadable disabled content; see https://github.com/twbs/bootstrap/issues/11655\n }\n\n &[disabled],\n fieldset[disabled] & {\n cursor: @cursor-disabled;\n }\n\n // Reset height for `textarea`s\n textarea& {\n height: auto;\n }\n}\n\n\n// Search inputs in iOS\n//\n// This overrides the extra rounded corners on search inputs in iOS so that our\n// `.form-control` class can properly style them. Note that this cannot simply\n// be added to `.form-control` as it's not specific enough. For details, see\n// https://github.com/twbs/bootstrap/issues/11586.\n\ninput[type=\"search\"] {\n -webkit-appearance: none;\n}\n\n\n// Special styles for iOS temporal inputs\n//\n// In Mobile Safari, setting `display: block` on temporal inputs causes the\n// text within the input to become vertically misaligned. As a workaround, we\n// set a pixel line-height that matches the given height of the input, but only\n// for Safari. See https://bugs.webkit.org/show_bug.cgi?id=139848\n//\n// Note that as of 8.3, iOS doesn't support `datetime` or `week`.\n\n@media screen and (-webkit-min-device-pixel-ratio: 0) {\n input[type=\"date\"],\n input[type=\"time\"],\n input[type=\"datetime-local\"],\n input[type=\"month\"] {\n &.form-control {\n line-height: @input-height-base;\n }\n\n &.input-sm,\n .input-group-sm & {\n line-height: @input-height-small;\n }\n\n &.input-lg,\n .input-group-lg & {\n line-height: @input-height-large;\n }\n }\n}\n\n\n// Form groups\n//\n// Designed to help with the organization and spacing of vertical forms. For\n// horizontal forms, use the predefined grid classes.\n\n.form-group {\n margin-bottom: @form-group-margin-bottom;\n}\n\n\n// Checkboxes and radios\n//\n// Indent the labels to position radios/checkboxes as hanging controls.\n\n.radio,\n.checkbox {\n position: relative;\n display: block;\n margin-top: 10px;\n margin-bottom: 10px;\n\n label {\n min-height: @line-height-computed; // Ensure the input doesn't jump when there is no text\n padding-left: 20px;\n margin-bottom: 0;\n font-weight: normal;\n cursor: pointer;\n }\n}\n.radio input[type=\"radio\"],\n.radio-inline input[type=\"radio\"],\n.checkbox input[type=\"checkbox\"],\n.checkbox-inline input[type=\"checkbox\"] {\n position: absolute;\n margin-left: -20px;\n margin-top: 4px \\9;\n}\n\n.radio + .radio,\n.checkbox + .checkbox {\n margin-top: -5px; // Move up sibling radios or checkboxes for tighter spacing\n}\n\n// Radios and checkboxes on same line\n.radio-inline,\n.checkbox-inline {\n position: relative;\n display: inline-block;\n padding-left: 20px;\n margin-bottom: 0;\n vertical-align: middle;\n font-weight: normal;\n cursor: pointer;\n}\n.radio-inline + .radio-inline,\n.checkbox-inline + .checkbox-inline {\n margin-top: 0;\n margin-left: 10px; // space out consecutive inline controls\n}\n\n// Apply same disabled cursor tweak as for inputs\n// Some special care is needed because <label>s don't inherit their parent's `cursor`.\n//\n// Note: Neither radios nor checkboxes can be readonly.\ninput[type=\"radio\"],\ninput[type=\"checkbox\"] {\n &[disabled],\n &.disabled,\n fieldset[disabled] & {\n cursor: @cursor-disabled;\n }\n}\n// These classes are used directly on <label>s\n.radio-inline,\n.checkbox-inline {\n &.disabled,\n fieldset[disabled] & {\n cursor: @cursor-disabled;\n }\n}\n// These classes are used on elements with <label> descendants\n.radio,\n.checkbox {\n &.disabled,\n fieldset[disabled] & {\n label {\n cursor: @cursor-disabled;\n }\n }\n}\n\n\n// Static form control text\n//\n// Apply class to a `p` element to make any string of text align with labels in\n// a horizontal form layout.\n\n.form-control-static {\n // Size it appropriately next to real form controls\n padding-top: (@padding-base-vertical + 1);\n padding-bottom: (@padding-base-vertical + 1);\n // Remove default margin from `p`\n margin-bottom: 0;\n min-height: (@line-height-computed + @font-size-base);\n\n &.input-lg,\n &.input-sm {\n padding-left: 0;\n padding-right: 0;\n }\n}\n\n\n// Form control sizing\n//\n// Build on `.form-control` with modifier classes to decrease or increase the\n// height and font-size of form controls.\n//\n// The `.form-group-* form-control` variations are sadly duplicated to avoid the\n// issue documented in https://github.com/twbs/bootstrap/issues/15074.\n\n.input-sm {\n .input-size(@input-height-small; @padding-small-vertical; @padding-small-horizontal; @font-size-small; @line-height-small; @input-border-radius-small);\n}\n.form-group-sm {\n .form-control {\n height: @input-height-small;\n padding: @padding-small-vertical @padding-small-horizontal;\n font-size: @font-size-small;\n line-height: @line-height-small;\n border-radius: @input-border-radius-small;\n }\n select.form-control {\n height: @input-height-small;\n line-height: @input-height-small;\n }\n textarea.form-control,\n select[multiple].form-control {\n height: auto;\n }\n .form-control-static {\n height: @input-height-small;\n min-height: (@line-height-computed + @font-size-small);\n padding: (@padding-small-vertical + 1) @padding-small-horizontal;\n font-size: @font-size-small;\n line-height: @line-height-small;\n }\n}\n\n.input-lg {\n .input-size(@input-height-large; @padding-large-vertical; @padding-large-horizontal; @font-size-large; @line-height-large; @input-border-radius-large);\n}\n.form-group-lg {\n .form-control {\n height: @input-height-large;\n padding: @padding-large-vertical @padding-large-horizontal;\n font-size: @font-size-large;\n line-height: @line-height-large;\n border-radius: @input-border-radius-large;\n }\n select.form-control {\n height: @input-height-large;\n line-height: @input-height-large;\n }\n textarea.form-control,\n select[multiple].form-control {\n height: auto;\n }\n .form-control-static {\n height: @input-height-large;\n min-height: (@line-height-computed + @font-size-large);\n padding: (@padding-large-vertical + 1) @padding-large-horizontal;\n font-size: @font-size-large;\n line-height: @line-height-large;\n }\n}\n\n\n// Form control feedback states\n//\n// Apply contextual and semantic states to individual form controls.\n\n.has-feedback {\n // Enable absolute positioning\n position: relative;\n\n // Ensure icons don't overlap text\n .form-control {\n padding-right: (@input-height-base * 1.25);\n }\n}\n// Feedback icon (requires .glyphicon classes)\n.form-control-feedback {\n position: absolute;\n top: 0;\n right: 0;\n z-index: 2; // Ensure icon is above input groups\n display: block;\n width: @input-height-base;\n height: @input-height-base;\n line-height: @input-height-base;\n text-align: center;\n pointer-events: none;\n}\n.input-lg + .form-control-feedback,\n.input-group-lg + .form-control-feedback,\n.form-group-lg .form-control + .form-control-feedback {\n width: @input-height-large;\n height: @input-height-large;\n line-height: @input-height-large;\n}\n.input-sm + .form-control-feedback,\n.input-group-sm + .form-control-feedback,\n.form-group-sm .form-control + .form-control-feedback {\n width: @input-height-small;\n height: @input-height-small;\n line-height: @input-height-small;\n}\n\n// Feedback states\n.has-success {\n .form-control-validation(@state-success-text; @state-success-text; @state-success-bg);\n}\n.has-warning {\n .form-control-validation(@state-warning-text; @state-warning-text; @state-warning-bg);\n}\n.has-error {\n .form-control-validation(@state-danger-text; @state-danger-text; @state-danger-bg);\n}\n\n// Reposition feedback icon if input has visible label above\n.has-feedback label {\n\n & ~ .form-control-feedback {\n top: (@line-height-computed + 5); // Height of the `label` and its margin\n }\n &.sr-only ~ .form-control-feedback {\n top: 0;\n }\n}\n\n\n// Help text\n//\n// Apply to any element you wish to create light text for placement immediately\n// below a form control. Use for general help, formatting, or instructional text.\n\n.help-block {\n display: block; // account for any element using help-block\n margin-top: 5px;\n margin-bottom: 10px;\n color: lighten(@text-color, 25%); // lighten the text some for contrast\n}\n\n\n// Inline forms\n//\n// Make forms appear inline(-block) by adding the `.form-inline` class. Inline\n// forms begin stacked on extra small (mobile) devices and then go inline when\n// viewports reach <768px.\n//\n// Requires wrapping inputs and labels with `.form-group` for proper display of\n// default HTML form controls and our custom form controls (e.g., input groups).\n//\n// Heads up! This is mixin-ed into `.navbar-form` in navbars.less.\n\n.form-inline {\n\n // Kick in the inline\n @media (min-width: @screen-sm-min) {\n // Inline-block all the things for \"inline\"\n .form-group {\n display: inline-block;\n margin-bottom: 0;\n vertical-align: middle;\n }\n\n // In navbar-form, allow folks to *not* use `.form-group`\n .form-control {\n display: inline-block;\n width: auto; // Prevent labels from stacking above inputs in `.form-group`\n vertical-align: middle;\n }\n\n // Make static controls behave like regular ones\n .form-control-static {\n display: inline-block;\n }\n\n .input-group {\n display: inline-table;\n vertical-align: middle;\n\n .input-group-addon,\n .input-group-btn,\n .form-control {\n width: auto;\n }\n }\n\n // Input groups need that 100% width though\n .input-group > .form-control {\n width: 100%;\n }\n\n .control-label {\n margin-bottom: 0;\n vertical-align: middle;\n }\n\n // Remove default margin on radios/checkboxes that were used for stacking, and\n // then undo the floating of radios and checkboxes to match.\n .radio,\n .checkbox {\n display: inline-block;\n margin-top: 0;\n margin-bottom: 0;\n vertical-align: middle;\n\n label {\n padding-left: 0;\n }\n }\n .radio input[type=\"radio\"],\n .checkbox input[type=\"checkbox\"] {\n position: relative;\n margin-left: 0;\n }\n\n // Re-override the feedback icon.\n .has-feedback .form-control-feedback {\n top: 0;\n }\n }\n}\n\n\n// Horizontal forms\n//\n// Horizontal forms are built on grid classes and allow you to create forms with\n// labels on the left and inputs on the right.\n\n.form-horizontal {\n\n // Consistent vertical alignment of radios and checkboxes\n //\n // Labels also get some reset styles, but that is scoped to a media query below.\n .radio,\n .checkbox,\n .radio-inline,\n .checkbox-inline {\n margin-top: 0;\n margin-bottom: 0;\n padding-top: (@padding-base-vertical + 1); // Default padding plus a border\n }\n // Account for padding we're adding to ensure the alignment and of help text\n // and other content below items\n .radio,\n .checkbox {\n min-height: (@line-height-computed + (@padding-base-vertical + 1));\n }\n\n // Make form groups behave like rows\n .form-group {\n .make-row();\n }\n\n // Reset spacing and right align labels, but scope to media queries so that\n // labels on narrow viewports stack the same as a default form example.\n @media (min-width: @screen-sm-min) {\n .control-label {\n text-align: right;\n margin-bottom: 0;\n padding-top: (@padding-base-vertical + 1); // Default padding plus a border\n }\n }\n\n // Validation states\n //\n // Reposition the icon because it's now within a grid column and columns have\n // `position: relative;` on them. Also accounts for the grid gutter padding.\n .has-feedback .form-control-feedback {\n right: floor((@grid-gutter-width / 2));\n }\n\n // Form group sizes\n //\n // Quick utility class for applying `.input-lg` and `.input-sm` styles to the\n // inputs and labels within a `.form-group`.\n .form-group-lg {\n @media (min-width: @screen-sm-min) {\n .control-label {\n padding-top: (@padding-large-vertical + 1);\n font-size: @font-size-large;\n }\n }\n }\n .form-group-sm {\n @media (min-width: @screen-sm-min) {\n .control-label {\n padding-top: (@padding-small-vertical + 1);\n font-size: @font-size-small;\n }\n }\n }\n}\n","// Form validation states\n//\n// Used in forms.less to generate the form validation CSS for warnings, errors,\n// and successes.\n\n.form-control-validation(@text-color: #555; @border-color: #ccc; @background-color: #f5f5f5) {\n // Color the label and help text\n .help-block,\n .control-label,\n .radio,\n .checkbox,\n .radio-inline,\n .checkbox-inline,\n &.radio label,\n &.checkbox label,\n &.radio-inline label,\n &.checkbox-inline label {\n color: @text-color;\n }\n // Set the border and box shadow on specific inputs to match\n .form-control {\n border-color: @border-color;\n .box-shadow(inset 0 1px 1px rgba(0,0,0,.075)); // Redeclare so transitions work\n &:focus {\n border-color: darken(@border-color, 10%);\n @shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 6px lighten(@border-color, 20%);\n .box-shadow(@shadow);\n }\n }\n // Set validation states also for addons\n .input-group-addon {\n color: @text-color;\n border-color: @border-color;\n background-color: @background-color;\n }\n // Optional feedback icon\n .form-control-feedback {\n color: @text-color;\n }\n}\n\n\n// Form control focus state\n//\n// Generate a customized focus state and for any input with the specified color,\n// which defaults to the `@input-border-focus` variable.\n//\n// We highly encourage you to not customize the default value, but instead use\n// this to tweak colors on an as-needed basis. This aesthetic change is based on\n// WebKit's default styles, but applicable to a wider range of browsers. Its\n// usability and accessibility should be taken into account with any change.\n//\n// Example usage: change the default blue border and shadow to white for better\n// contrast against a dark gray background.\n.form-control-focus(@color: @input-border-focus) {\n @color-rgba: rgba(red(@color), green(@color), blue(@color), .6);\n &:focus {\n border-color: @color;\n outline: 0;\n .box-shadow(~\"inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px @{color-rgba}\");\n }\n}\n\n// Form control sizing\n//\n// Relative text size, padding, and border-radii changes for form controls. For\n// horizontal sizing, wrap controls in the predefined grid classes. `<select>`\n// element gets special love because it's special, and that's a fact!\n.input-size(@input-height; @padding-vertical; @padding-horizontal; @font-size; @line-height; @border-radius) {\n height: @input-height;\n padding: @padding-vertical @padding-horizontal;\n font-size: @font-size;\n line-height: @line-height;\n border-radius: @border-radius;\n\n select& {\n height: @input-height;\n line-height: @input-height;\n }\n\n textarea&,\n select[multiple]& {\n height: auto;\n }\n}\n","//\n// Buttons\n// --------------------------------------------------\n\n\n// Base styles\n// --------------------------------------------------\n\n.btn {\n display: inline-block;\n margin-bottom: 0; // For input.btn\n font-weight: @btn-font-weight;\n text-align: center;\n vertical-align: middle;\n touch-action: manipulation;\n cursor: pointer;\n background-image: none; // Reset unusual Firefox-on-Android default style; see https://github.com/necolas/normalize.css/issues/214\n border: 1px solid transparent;\n white-space: nowrap;\n .button-size(@padding-base-vertical; @padding-base-horizontal; @font-size-base; @line-height-base; @btn-border-radius-base);\n .user-select(none);\n\n &,\n &:active,\n &.active {\n &:focus,\n &.focus {\n .tab-focus();\n }\n }\n\n &:hover,\n &:focus,\n &.focus {\n color: @btn-default-color;\n text-decoration: none;\n }\n\n &:active,\n &.active {\n outline: 0;\n background-image: none;\n .box-shadow(inset 0 3px 5px rgba(0,0,0,.125));\n }\n\n &.disabled,\n &[disabled],\n fieldset[disabled] & {\n cursor: @cursor-disabled;\n .opacity(.65);\n .box-shadow(none);\n }\n\n a& {\n &.disabled,\n fieldset[disabled] & {\n pointer-events: none; // Future-proof disabling of clicks on `<a>` elements\n }\n }\n}\n\n\n// Alternate buttons\n// --------------------------------------------------\n\n.btn-default {\n .button-variant(@btn-default-color; @btn-default-bg; @btn-default-border);\n}\n.btn-primary {\n .button-variant(@btn-primary-color; @btn-primary-bg; @btn-primary-border);\n}\n// Success appears as green\n.btn-success {\n .button-variant(@btn-success-color; @btn-success-bg; @btn-success-border);\n}\n// Info appears as blue-green\n.btn-info {\n .button-variant(@btn-info-color; @btn-info-bg; @btn-info-border);\n}\n// Warning appears as orange\n.btn-warning {\n .button-variant(@btn-warning-color; @btn-warning-bg; @btn-warning-border);\n}\n// Danger and error appear as red\n.btn-danger {\n .button-variant(@btn-danger-color; @btn-danger-bg; @btn-danger-border);\n}\n\n\n// Link buttons\n// -------------------------\n\n// Make a button look and behave like a link\n.btn-link {\n color: @link-color;\n font-weight: normal;\n border-radius: 0;\n\n &,\n &:active,\n &.active,\n &[disabled],\n fieldset[disabled] & {\n background-color: transparent;\n .box-shadow(none);\n }\n &,\n &:hover,\n &:focus,\n &:active {\n border-color: transparent;\n }\n &:hover,\n &:focus {\n color: @link-hover-color;\n text-decoration: @link-hover-decoration;\n background-color: transparent;\n }\n &[disabled],\n fieldset[disabled] & {\n &:hover,\n &:focus {\n color: @btn-link-disabled-color;\n text-decoration: none;\n }\n }\n}\n\n\n// Button Sizes\n// --------------------------------------------------\n\n.btn-lg {\n // line-height: ensure even-numbered height of button next to large input\n .button-size(@padding-large-vertical; @padding-large-horizontal; @font-size-large; @line-height-large; @btn-border-radius-large);\n}\n.btn-sm {\n // line-height: ensure proper height of button next to small input\n .button-size(@padding-small-vertical; @padding-small-horizontal; @font-size-small; @line-height-small; @btn-border-radius-small);\n}\n.btn-xs {\n .button-size(@padding-xs-vertical; @padding-xs-horizontal; @font-size-small; @line-height-small; @btn-border-radius-small);\n}\n\n\n// Block button\n// --------------------------------------------------\n\n.btn-block {\n display: block;\n width: 100%;\n}\n\n// Vertically space out multiple block buttons\n.btn-block + .btn-block {\n margin-top: 5px;\n}\n\n// Specificity overrides\ninput[type=\"submit\"],\ninput[type=\"reset\"],\ninput[type=\"button\"] {\n &.btn-block {\n width: 100%;\n }\n}\n","// Button variants\n//\n// Easily pump out default styles, as well as :hover, :focus, :active,\n// and disabled options for all buttons\n\n.button-variant(@color; @background; @border) {\n color: @color;\n background-color: @background;\n border-color: @border;\n\n &:focus,\n &.focus {\n color: @color;\n background-color: darken(@background, 10%);\n border-color: darken(@border, 25%);\n }\n &:hover {\n color: @color;\n background-color: darken(@background, 10%);\n border-color: darken(@border, 12%);\n }\n &:active,\n &.active,\n .open > .dropdown-toggle& {\n color: @color;\n background-color: darken(@background, 10%);\n border-color: darken(@border, 12%);\n\n &:hover,\n &:focus,\n &.focus {\n color: @color;\n background-color: darken(@background, 17%);\n border-color: darken(@border, 25%);\n }\n }\n &:active,\n &.active,\n .open > .dropdown-toggle& {\n background-image: none;\n }\n &.disabled,\n &[disabled],\n fieldset[disabled] & {\n &:hover,\n &:focus,\n &.focus {\n background-color: @background;\n border-color: @border;\n }\n }\n\n .badge {\n color: @background;\n background-color: @color;\n }\n}\n\n// Button sizes\n.button-size(@padding-vertical; @padding-horizontal; @font-size; @line-height; @border-radius) {\n padding: @padding-vertical @padding-horizontal;\n font-size: @font-size;\n line-height: @line-height;\n border-radius: @border-radius;\n}\n","// Opacity\n\n.opacity(@opacity) {\n opacity: @opacity;\n // IE8 filter\n @opacity-ie: (@opacity * 100);\n filter: ~\"alpha(opacity=@{opacity-ie})\";\n}\n","//\n// Component animations\n// --------------------------------------------------\n\n// Heads up!\n//\n// We don't use the `.opacity()` mixin here since it causes a bug with text\n// fields in IE7-8. Source: https://github.com/twbs/bootstrap/pull/3552.\n\n.fade {\n opacity: 0;\n .transition(opacity .15s linear);\n &.in {\n opacity: 1;\n }\n}\n\n.collapse {\n display: none;\n\n &.in { display: block; }\n tr&.in { display: table-row; }\n tbody&.in { display: table-row-group; }\n}\n\n.collapsing {\n position: relative;\n height: 0;\n overflow: hidden;\n .transition-property(~\"height, visibility\");\n .transition-duration(.35s);\n .transition-timing-function(ease);\n}\n","//\n// Dropdown menus\n// --------------------------------------------------\n\n\n// Dropdown arrow/caret\n.caret {\n display: inline-block;\n width: 0;\n height: 0;\n margin-left: 2px;\n vertical-align: middle;\n border-top: @caret-width-base dashed;\n border-top: @caret-width-base solid ~\"\\9\"; // IE8\n border-right: @caret-width-base solid transparent;\n border-left: @caret-width-base solid transparent;\n}\n\n// The dropdown wrapper (div)\n.dropup,\n.dropdown {\n position: relative;\n}\n\n// Prevent the focus on the dropdown toggle when closing dropdowns\n.dropdown-toggle:focus {\n outline: 0;\n}\n\n// The dropdown menu (ul)\n.dropdown-menu {\n position: absolute;\n top: 100%;\n left: 0;\n z-index: @zindex-dropdown;\n display: none; // none by default, but block on \"open\" of the menu\n float: left;\n min-width: 160px;\n padding: 5px 0;\n margin: 2px 0 0; // override default ul\n list-style: none;\n font-size: @font-size-base;\n text-align: left; // Ensures proper alignment if parent has it changed (e.g., modal footer)\n background-color: @dropdown-bg;\n border: 1px solid @dropdown-fallback-border; // IE8 fallback\n border: 1px solid @dropdown-border;\n border-radius: @border-radius-base;\n .box-shadow(0 6px 12px rgba(0,0,0,.175));\n background-clip: padding-box;\n\n // Aligns the dropdown menu to right\n //\n // Deprecated as of 3.1.0 in favor of `.dropdown-menu-[dir]`\n &.pull-right {\n right: 0;\n left: auto;\n }\n\n // Dividers (basically an hr) within the dropdown\n .divider {\n .nav-divider(@dropdown-divider-bg);\n }\n\n // Links within the dropdown menu\n > li > a {\n display: block;\n padding: 3px 20px;\n clear: both;\n font-weight: normal;\n line-height: @line-height-base;\n color: @dropdown-link-color;\n white-space: nowrap; // prevent links from randomly breaking onto new lines\n }\n}\n\n// Hover/Focus state\n.dropdown-menu > li > a {\n &:hover,\n &:focus {\n text-decoration: none;\n color: @dropdown-link-hover-color;\n background-color: @dropdown-link-hover-bg;\n }\n}\n\n// Active state\n.dropdown-menu > .active > a {\n &,\n &:hover,\n &:focus {\n color: @dropdown-link-active-color;\n text-decoration: none;\n outline: 0;\n background-color: @dropdown-link-active-bg;\n }\n}\n\n// Disabled state\n//\n// Gray out text and ensure the hover/focus state remains gray\n\n.dropdown-menu > .disabled > a {\n &,\n &:hover,\n &:focus {\n color: @dropdown-link-disabled-color;\n }\n\n // Nuke hover/focus effects\n &:hover,\n &:focus {\n text-decoration: none;\n background-color: transparent;\n background-image: none; // Remove CSS gradient\n .reset-filter();\n cursor: @cursor-disabled;\n }\n}\n\n// Open state for the dropdown\n.open {\n // Show the menu\n > .dropdown-menu {\n display: block;\n }\n\n // Remove the outline when :focus is triggered\n > a {\n outline: 0;\n }\n}\n\n// Menu positioning\n//\n// Add extra class to `.dropdown-menu` to flip the alignment of the dropdown\n// menu with the parent.\n.dropdown-menu-right {\n left: auto; // Reset the default from `.dropdown-menu`\n right: 0;\n}\n// With v3, we enabled auto-flipping if you have a dropdown within a right\n// aligned nav component. To enable the undoing of that, we provide an override\n// to restore the default dropdown menu alignment.\n//\n// This is only for left-aligning a dropdown menu within a `.navbar-right` or\n// `.pull-right` nav component.\n.dropdown-menu-left {\n left: 0;\n right: auto;\n}\n\n// Dropdown section headers\n.dropdown-header {\n display: block;\n padding: 3px 20px;\n font-size: @font-size-small;\n line-height: @line-height-base;\n color: @dropdown-header-color;\n white-space: nowrap; // as with > li > a\n}\n\n// Backdrop to catch body clicks on mobile, etc.\n.dropdown-backdrop {\n position: fixed;\n left: 0;\n right: 0;\n bottom: 0;\n top: 0;\n z-index: (@zindex-dropdown - 10);\n}\n\n// Right aligned dropdowns\n.pull-right > .dropdown-menu {\n right: 0;\n left: auto;\n}\n\n// Allow for dropdowns to go bottom up (aka, dropup-menu)\n//\n// Just add .dropup after the standard .dropdown class and you're set, bro.\n// TODO: abstract this so that the navbar fixed styles are not placed here?\n\n.dropup,\n.navbar-fixed-bottom .dropdown {\n // Reverse the caret\n .caret {\n border-top: 0;\n border-bottom: @caret-width-base dashed;\n border-bottom: @caret-width-base solid ~\"\\9\"; // IE8\n content: \"\";\n }\n // Different positioning for bottom up menu\n .dropdown-menu {\n top: auto;\n bottom: 100%;\n margin-bottom: 2px;\n }\n}\n\n\n// Component alignment\n//\n// Reiterate per navbar.less and the modified component alignment there.\n\n@media (min-width: @grid-float-breakpoint) {\n .navbar-right {\n .dropdown-menu {\n .dropdown-menu-right();\n }\n // Necessary for overrides of the default right aligned menu.\n // Will remove come v4 in all likelihood.\n .dropdown-menu-left {\n .dropdown-menu-left();\n }\n }\n}\n","// Horizontal dividers\n//\n// Dividers (basically an hr) within dropdowns and nav lists\n\n.nav-divider(@color: #e5e5e5) {\n height: 1px;\n margin: ((@line-height-computed / 2) - 1) 0;\n overflow: hidden;\n background-color: @color;\n}\n","// Reset filters for IE\n//\n// When you need to remove a gradient background, do not forget to use this to reset\n// the IE filter for IE9 and below.\n\n.reset-filter() {\n filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(enabled = false)\"));\n}\n","//\n// Button groups\n// --------------------------------------------------\n\n// Make the div behave like a button\n.btn-group,\n.btn-group-vertical {\n position: relative;\n display: inline-block;\n vertical-align: middle; // match .btn alignment given font-size hack above\n > .btn {\n position: relative;\n float: left;\n // Bring the \"active\" button to the front\n &:hover,\n &:focus,\n &:active,\n &.active {\n z-index: 2;\n }\n }\n}\n\n// Prevent double borders when buttons are next to each other\n.btn-group {\n .btn + .btn,\n .btn + .btn-group,\n .btn-group + .btn,\n .btn-group + .btn-group {\n margin-left: -1px;\n }\n}\n\n// Optional: Group multiple button groups together for a toolbar\n.btn-toolbar {\n margin-left: -5px; // Offset the first child's margin\n &:extend(.clearfix all);\n\n .btn,\n .btn-group,\n .input-group {\n float: left;\n }\n > .btn,\n > .btn-group,\n > .input-group {\n margin-left: 5px;\n }\n}\n\n.btn-group > .btn:not(:first-child):not(:last-child):not(.dropdown-toggle) {\n border-radius: 0;\n}\n\n// Set corners individual because sometimes a single button can be in a .btn-group and we need :first-child and :last-child to both match\n.btn-group > .btn:first-child {\n margin-left: 0;\n &:not(:last-child):not(.dropdown-toggle) {\n .border-right-radius(0);\n }\n}\n// Need .dropdown-toggle since :last-child doesn't apply given a .dropdown-menu immediately after it\n.btn-group > .btn:last-child:not(:first-child),\n.btn-group > .dropdown-toggle:not(:first-child) {\n .border-left-radius(0);\n}\n\n// Custom edits for including btn-groups within btn-groups (useful for including dropdown buttons within a btn-group)\n.btn-group > .btn-group {\n float: left;\n}\n.btn-group > .btn-group:not(:first-child):not(:last-child) > .btn {\n border-radius: 0;\n}\n.btn-group > .btn-group:first-child:not(:last-child) {\n > .btn:last-child,\n > .dropdown-toggle {\n .border-right-radius(0);\n }\n}\n.btn-group > .btn-group:last-child:not(:first-child) > .btn:first-child {\n .border-left-radius(0);\n}\n\n// On active and open, don't show outline\n.btn-group .dropdown-toggle:active,\n.btn-group.open .dropdown-toggle {\n outline: 0;\n}\n\n\n// Sizing\n//\n// Remix the default button sizing classes into new ones for easier manipulation.\n\n.btn-group-xs > .btn { &:extend(.btn-xs); }\n.btn-group-sm > .btn { &:extend(.btn-sm); }\n.btn-group-lg > .btn { &:extend(.btn-lg); }\n\n\n// Split button dropdowns\n// ----------------------\n\n// Give the line between buttons some depth\n.btn-group > .btn + .dropdown-toggle {\n padding-left: 8px;\n padding-right: 8px;\n}\n.btn-group > .btn-lg + .dropdown-toggle {\n padding-left: 12px;\n padding-right: 12px;\n}\n\n// The clickable button for toggling the menu\n// Remove the gradient and set the same inset shadow as the :active state\n.btn-group.open .dropdown-toggle {\n .box-shadow(inset 0 3px 5px rgba(0,0,0,.125));\n\n // Show no shadow for `.btn-link` since it has no other button styles.\n &.btn-link {\n .box-shadow(none);\n }\n}\n\n\n// Reposition the caret\n.btn .caret {\n margin-left: 0;\n}\n// Carets in other button sizes\n.btn-lg .caret {\n border-width: @caret-width-large @caret-width-large 0;\n border-bottom-width: 0;\n}\n// Upside down carets for .dropup\n.dropup .btn-lg .caret {\n border-width: 0 @caret-width-large @caret-width-large;\n}\n\n\n// Vertical button groups\n// ----------------------\n\n.btn-group-vertical {\n > .btn,\n > .btn-group,\n > .btn-group > .btn {\n display: block;\n float: none;\n width: 100%;\n max-width: 100%;\n }\n\n // Clear floats so dropdown menus can be properly placed\n > .btn-group {\n &:extend(.clearfix all);\n > .btn {\n float: none;\n }\n }\n\n > .btn + .btn,\n > .btn + .btn-group,\n > .btn-group + .btn,\n > .btn-group + .btn-group {\n margin-top: -1px;\n margin-left: 0;\n }\n}\n\n.btn-group-vertical > .btn {\n &:not(:first-child):not(:last-child) {\n border-radius: 0;\n }\n &:first-child:not(:last-child) {\n .border-top-radius(@btn-border-radius-base);\n .border-bottom-radius(0);\n }\n &:last-child:not(:first-child) {\n .border-top-radius(0);\n .border-bottom-radius(@btn-border-radius-base);\n }\n}\n.btn-group-vertical > .btn-group:not(:first-child):not(:last-child) > .btn {\n border-radius: 0;\n}\n.btn-group-vertical > .btn-group:first-child:not(:last-child) {\n > .btn:last-child,\n > .dropdown-toggle {\n .border-bottom-radius(0);\n }\n}\n.btn-group-vertical > .btn-group:last-child:not(:first-child) > .btn:first-child {\n .border-top-radius(0);\n}\n\n\n// Justified button groups\n// ----------------------\n\n.btn-group-justified {\n display: table;\n width: 100%;\n table-layout: fixed;\n border-collapse: separate;\n > .btn,\n > .btn-group {\n float: none;\n display: table-cell;\n width: 1%;\n }\n > .btn-group .btn {\n width: 100%;\n }\n\n > .btn-group .dropdown-menu {\n left: auto;\n }\n}\n\n\n// Checkbox and radio options\n//\n// In order to support the browser's form validation feedback, powered by the\n// `required` attribute, we have to \"hide\" the inputs via `clip`. We cannot use\n// `display: none;` or `visibility: hidden;` as that also hides the popover.\n// Simply visually hiding the inputs via `opacity` would leave them clickable in\n// certain cases which is prevented by using `clip` and `pointer-events`.\n// This way, we ensure a DOM element is visible to position the popover from.\n//\n// See https://github.com/twbs/bootstrap/pull/12794 and\n// https://github.com/twbs/bootstrap/pull/14559 for more information.\n\n[data-toggle=\"buttons\"] {\n > .btn,\n > .btn-group > .btn {\n input[type=\"radio\"],\n input[type=\"checkbox\"] {\n position: absolute;\n clip: rect(0,0,0,0);\n pointer-events: none;\n }\n }\n}\n","// Single side border-radius\n\n.border-top-radius(@radius) {\n border-top-right-radius: @radius;\n border-top-left-radius: @radius;\n}\n.border-right-radius(@radius) {\n border-bottom-right-radius: @radius;\n border-top-right-radius: @radius;\n}\n.border-bottom-radius(@radius) {\n border-bottom-right-radius: @radius;\n border-bottom-left-radius: @radius;\n}\n.border-left-radius(@radius) {\n border-bottom-left-radius: @radius;\n border-top-left-radius: @radius;\n}\n","//\n// Input groups\n// --------------------------------------------------\n\n// Base styles\n// -------------------------\n.input-group {\n position: relative; // For dropdowns\n display: table;\n border-collapse: separate; // prevent input groups from inheriting border styles from table cells when placed within a table\n\n // Undo padding and float of grid classes\n &[class*=\"col-\"] {\n float: none;\n padding-left: 0;\n padding-right: 0;\n }\n\n .form-control {\n // Ensure that the input is always above the *appended* addon button for\n // proper border colors.\n position: relative;\n z-index: 2;\n\n // IE9 fubars the placeholder attribute in text inputs and the arrows on\n // select elements in input groups. To fix it, we float the input. Details:\n // https://github.com/twbs/bootstrap/issues/11561#issuecomment-28936855\n float: left;\n\n width: 100%;\n margin-bottom: 0;\n \n &:focus {\n z-index: 3;\n }\n }\n}\n\n// Sizing options\n//\n// Remix the default form control sizing classes into new ones for easier\n// manipulation.\n\n.input-group-lg > .form-control,\n.input-group-lg > .input-group-addon,\n.input-group-lg > .input-group-btn > .btn {\n .input-lg();\n}\n.input-group-sm > .form-control,\n.input-group-sm > .input-group-addon,\n.input-group-sm > .input-group-btn > .btn {\n .input-sm();\n}\n\n\n// Display as table-cell\n// -------------------------\n.input-group-addon,\n.input-group-btn,\n.input-group .form-control {\n display: table-cell;\n\n &:not(:first-child):not(:last-child) {\n border-radius: 0;\n }\n}\n// Addon and addon wrapper for buttons\n.input-group-addon,\n.input-group-btn {\n width: 1%;\n white-space: nowrap;\n vertical-align: middle; // Match the inputs\n}\n\n// Text input groups\n// -------------------------\n.input-group-addon {\n padding: @padding-base-vertical @padding-base-horizontal;\n font-size: @font-size-base;\n font-weight: normal;\n line-height: 1;\n color: @input-color;\n text-align: center;\n background-color: @input-group-addon-bg;\n border: 1px solid @input-group-addon-border-color;\n border-radius: @input-border-radius;\n\n // Sizing\n &.input-sm {\n padding: @padding-small-vertical @padding-small-horizontal;\n font-size: @font-size-small;\n border-radius: @input-border-radius-small;\n }\n &.input-lg {\n padding: @padding-large-vertical @padding-large-horizontal;\n font-size: @font-size-large;\n border-radius: @input-border-radius-large;\n }\n\n // Nuke default margins from checkboxes and radios to vertically center within.\n input[type=\"radio\"],\n input[type=\"checkbox\"] {\n margin-top: 0;\n }\n}\n\n// Reset rounded corners\n.input-group .form-control:first-child,\n.input-group-addon:first-child,\n.input-group-btn:first-child > .btn,\n.input-group-btn:first-child > .btn-group > .btn,\n.input-group-btn:first-child > .dropdown-toggle,\n.input-group-btn:last-child > .btn:not(:last-child):not(.dropdown-toggle),\n.input-group-btn:last-child > .btn-group:not(:last-child) > .btn {\n .border-right-radius(0);\n}\n.input-group-addon:first-child {\n border-right: 0;\n}\n.input-group .form-control:last-child,\n.input-group-addon:last-child,\n.input-group-btn:last-child > .btn,\n.input-group-btn:last-child > .btn-group > .btn,\n.input-group-btn:last-child > .dropdown-toggle,\n.input-group-btn:first-child > .btn:not(:first-child),\n.input-group-btn:first-child > .btn-group:not(:first-child) > .btn {\n .border-left-radius(0);\n}\n.input-group-addon:last-child {\n border-left: 0;\n}\n\n// Button input groups\n// -------------------------\n.input-group-btn {\n position: relative;\n // Jankily prevent input button groups from wrapping with `white-space` and\n // `font-size` in combination with `inline-block` on buttons.\n font-size: 0;\n white-space: nowrap;\n\n // Negative margin for spacing, position for bringing hovered/focused/actived\n // element above the siblings.\n > .btn {\n position: relative;\n + .btn {\n margin-left: -1px;\n }\n // Bring the \"active\" button to the front\n &:hover,\n &:focus,\n &:active {\n z-index: 2;\n }\n }\n\n // Negative margin to only have a 1px border between the two\n &:first-child {\n > .btn,\n > .btn-group {\n margin-right: -1px;\n }\n }\n &:last-child {\n > .btn,\n > .btn-group {\n z-index: 2;\n margin-left: -1px;\n }\n }\n}\n","//\n// Navs\n// --------------------------------------------------\n\n\n// Base class\n// --------------------------------------------------\n\n.nav {\n margin-bottom: 0;\n padding-left: 0; // Override default ul/ol\n list-style: none;\n &:extend(.clearfix all);\n\n > li {\n position: relative;\n display: block;\n\n > a {\n position: relative;\n display: block;\n padding: @nav-link-padding;\n &:hover,\n &:focus {\n text-decoration: none;\n background-color: @nav-link-hover-bg;\n }\n }\n\n // Disabled state sets text to gray and nukes hover/tab effects\n &.disabled > a {\n color: @nav-disabled-link-color;\n\n &:hover,\n &:focus {\n color: @nav-disabled-link-hover-color;\n text-decoration: none;\n background-color: transparent;\n cursor: @cursor-disabled;\n }\n }\n }\n\n // Open dropdowns\n .open > a {\n &,\n &:hover,\n &:focus {\n background-color: @nav-link-hover-bg;\n border-color: @link-color;\n }\n }\n\n // Nav dividers (deprecated with v3.0.1)\n //\n // This should have been removed in v3 with the dropping of `.nav-list`, but\n // we missed it. We don't currently support this anywhere, but in the interest\n // of maintaining backward compatibility in case you use it, it's deprecated.\n .nav-divider {\n .nav-divider();\n }\n\n // Prevent IE8 from misplacing imgs\n //\n // See https://github.com/h5bp/html5-boilerplate/issues/984#issuecomment-3985989\n > li > a > img {\n max-width: none;\n }\n}\n\n\n// Tabs\n// -------------------------\n\n// Give the tabs something to sit on\n.nav-tabs {\n border-bottom: 1px solid @nav-tabs-border-color;\n > li {\n float: left;\n // Make the list-items overlay the bottom border\n margin-bottom: -1px;\n\n // Actual tabs (as links)\n > a {\n margin-right: 2px;\n line-height: @line-height-base;\n border: 1px solid transparent;\n border-radius: @border-radius-base @border-radius-base 0 0;\n &:hover {\n border-color: @nav-tabs-link-hover-border-color @nav-tabs-link-hover-border-color @nav-tabs-border-color;\n }\n }\n\n // Active state, and its :hover to override normal :hover\n &.active > a {\n &,\n &:hover,\n &:focus {\n color: @nav-tabs-active-link-hover-color;\n background-color: @nav-tabs-active-link-hover-bg;\n border: 1px solid @nav-tabs-active-link-hover-border-color;\n border-bottom-color: transparent;\n cursor: default;\n }\n }\n }\n // pulling this in mainly for less shorthand\n &.nav-justified {\n .nav-justified();\n .nav-tabs-justified();\n }\n}\n\n\n// Pills\n// -------------------------\n.nav-pills {\n > li {\n float: left;\n\n // Links rendered as pills\n > a {\n border-radius: @nav-pills-border-radius;\n }\n + li {\n margin-left: 2px;\n }\n\n // Active state\n &.active > a {\n &,\n &:hover,\n &:focus {\n color: @nav-pills-active-link-hover-color;\n background-color: @nav-pills-active-link-hover-bg;\n }\n }\n }\n}\n\n\n// Stacked pills\n.nav-stacked {\n > li {\n float: none;\n + li {\n margin-top: 2px;\n margin-left: 0; // no need for this gap between nav items\n }\n }\n}\n\n\n// Nav variations\n// --------------------------------------------------\n\n// Justified nav links\n// -------------------------\n\n.nav-justified {\n width: 100%;\n\n > li {\n float: none;\n > a {\n text-align: center;\n margin-bottom: 5px;\n }\n }\n\n > .dropdown .dropdown-menu {\n top: auto;\n left: auto;\n }\n\n @media (min-width: @screen-sm-min) {\n > li {\n display: table-cell;\n width: 1%;\n > a {\n margin-bottom: 0;\n }\n }\n }\n}\n\n// Move borders to anchors instead of bottom of list\n//\n// Mixin for adding on top the shared `.nav-justified` styles for our tabs\n.nav-tabs-justified {\n border-bottom: 0;\n\n > li > a {\n // Override margin from .nav-tabs\n margin-right: 0;\n border-radius: @border-radius-base;\n }\n\n > .active > a,\n > .active > a:hover,\n > .active > a:focus {\n border: 1px solid @nav-tabs-justified-link-border-color;\n }\n\n @media (min-width: @screen-sm-min) {\n > li > a {\n border-bottom: 1px solid @nav-tabs-justified-link-border-color;\n border-radius: @border-radius-base @border-radius-base 0 0;\n }\n > .active > a,\n > .active > a:hover,\n > .active > a:focus {\n border-bottom-color: @nav-tabs-justified-active-link-border-color;\n }\n }\n}\n\n\n// Tabbable tabs\n// -------------------------\n\n// Hide tabbable panes to start, show them when `.active`\n.tab-content {\n > .tab-pane {\n display: none;\n }\n > .active {\n display: block;\n }\n}\n\n\n// Dropdowns\n// -------------------------\n\n// Specific dropdowns\n.nav-tabs .dropdown-menu {\n // make dropdown border overlap tab border\n margin-top: -1px;\n // Remove the top rounded corners here since there is a hard edge above the menu\n .border-top-radius(0);\n}\n","//\n// Navbars\n// --------------------------------------------------\n\n\n// Wrapper and base class\n//\n// Provide a static navbar from which we expand to create full-width, fixed, and\n// other navbar variations.\n\n.navbar {\n position: relative;\n min-height: @navbar-height; // Ensure a navbar always shows (e.g., without a .navbar-brand in collapsed mode)\n margin-bottom: @navbar-margin-bottom;\n border: 1px solid transparent;\n\n // Prevent floats from breaking the navbar\n &:extend(.clearfix all);\n\n @media (min-width: @grid-float-breakpoint) {\n border-radius: @navbar-border-radius;\n }\n}\n\n\n// Navbar heading\n//\n// Groups `.navbar-brand` and `.navbar-toggle` into a single component for easy\n// styling of responsive aspects.\n\n.navbar-header {\n &:extend(.clearfix all);\n\n @media (min-width: @grid-float-breakpoint) {\n float: left;\n }\n}\n\n\n// Navbar collapse (body)\n//\n// Group your navbar content into this for easy collapsing and expanding across\n// various device sizes. By default, this content is collapsed when <768px, but\n// will expand past that for a horizontal display.\n//\n// To start (on mobile devices) the navbar links, forms, and buttons are stacked\n// vertically and include a `max-height` to overflow in case you have too much\n// content for the user's viewport.\n\n.navbar-collapse {\n overflow-x: visible;\n padding-right: @navbar-padding-horizontal;\n padding-left: @navbar-padding-horizontal;\n border-top: 1px solid transparent;\n box-shadow: inset 0 1px 0 rgba(255,255,255,.1);\n &:extend(.clearfix all);\n -webkit-overflow-scrolling: touch;\n\n &.in {\n overflow-y: auto;\n }\n\n @media (min-width: @grid-float-breakpoint) {\n width: auto;\n border-top: 0;\n box-shadow: none;\n\n &.collapse {\n display: block !important;\n height: auto !important;\n padding-bottom: 0; // Override default setting\n overflow: visible !important;\n }\n\n &.in {\n overflow-y: visible;\n }\n\n // Undo the collapse side padding for navbars with containers to ensure\n // alignment of right-aligned contents.\n .navbar-fixed-top &,\n .navbar-static-top &,\n .navbar-fixed-bottom & {\n padding-left: 0;\n padding-right: 0;\n }\n }\n}\n\n.navbar-fixed-top,\n.navbar-fixed-bottom {\n .navbar-collapse {\n max-height: @navbar-collapse-max-height;\n\n @media (max-device-width: @screen-xs-min) and (orientation: landscape) {\n max-height: 200px;\n }\n }\n}\n\n\n// Both navbar header and collapse\n//\n// When a container is present, change the behavior of the header and collapse.\n\n.container,\n.container-fluid {\n > .navbar-header,\n > .navbar-collapse {\n margin-right: -@navbar-padding-horizontal;\n margin-left: -@navbar-padding-horizontal;\n\n @media (min-width: @grid-float-breakpoint) {\n margin-right: 0;\n margin-left: 0;\n }\n }\n}\n\n\n//\n// Navbar alignment options\n//\n// Display the navbar across the entirety of the page or fixed it to the top or\n// bottom of the page.\n\n// Static top (unfixed, but 100% wide) navbar\n.navbar-static-top {\n z-index: @zindex-navbar;\n border-width: 0 0 1px;\n\n @media (min-width: @grid-float-breakpoint) {\n border-radius: 0;\n }\n}\n\n// Fix the top/bottom navbars when screen real estate supports it\n.navbar-fixed-top,\n.navbar-fixed-bottom {\n position: fixed;\n right: 0;\n left: 0;\n z-index: @zindex-navbar-fixed;\n\n // Undo the rounded corners\n @media (min-width: @grid-float-breakpoint) {\n border-radius: 0;\n }\n}\n.navbar-fixed-top {\n top: 0;\n border-width: 0 0 1px;\n}\n.navbar-fixed-bottom {\n bottom: 0;\n margin-bottom: 0; // override .navbar defaults\n border-width: 1px 0 0;\n}\n\n\n// Brand/project name\n\n.navbar-brand {\n float: left;\n padding: @navbar-padding-vertical @navbar-padding-horizontal;\n font-size: @font-size-large;\n line-height: @line-height-computed;\n height: @navbar-height;\n\n &:hover,\n &:focus {\n text-decoration: none;\n }\n\n > img {\n display: block;\n }\n\n @media (min-width: @grid-float-breakpoint) {\n .navbar > .container &,\n .navbar > .container-fluid & {\n margin-left: -@navbar-padding-horizontal;\n }\n }\n}\n\n\n// Navbar toggle\n//\n// Custom button for toggling the `.navbar-collapse`, powered by the collapse\n// JavaScript plugin.\n\n.navbar-toggle {\n position: relative;\n float: right;\n margin-right: @navbar-padding-horizontal;\n padding: 9px 10px;\n .navbar-vertical-align(34px);\n background-color: transparent;\n background-image: none; // Reset unusual Firefox-on-Android default style; see https://github.com/necolas/normalize.css/issues/214\n border: 1px solid transparent;\n border-radius: @border-radius-base;\n\n // We remove the `outline` here, but later compensate by attaching `:hover`\n // styles to `:focus`.\n &:focus {\n outline: 0;\n }\n\n // Bars\n .icon-bar {\n display: block;\n width: 22px;\n height: 2px;\n border-radius: 1px;\n }\n .icon-bar + .icon-bar {\n margin-top: 4px;\n }\n\n @media (min-width: @grid-float-breakpoint) {\n display: none;\n }\n}\n\n\n// Navbar nav links\n//\n// Builds on top of the `.nav` components with its own modifier class to make\n// the nav the full height of the horizontal nav (above 768px).\n\n.navbar-nav {\n margin: (@navbar-padding-vertical / 2) -@navbar-padding-horizontal;\n\n > li > a {\n padding-top: 10px;\n padding-bottom: 10px;\n line-height: @line-height-computed;\n }\n\n @media (max-width: @grid-float-breakpoint-max) {\n // Dropdowns get custom display when collapsed\n .open .dropdown-menu {\n position: static;\n float: none;\n width: auto;\n margin-top: 0;\n background-color: transparent;\n border: 0;\n box-shadow: none;\n > li > a,\n .dropdown-header {\n padding: 5px 15px 5px 25px;\n }\n > li > a {\n line-height: @line-height-computed;\n &:hover,\n &:focus {\n background-image: none;\n }\n }\n }\n }\n\n // Uncollapse the nav\n @media (min-width: @grid-float-breakpoint) {\n float: left;\n margin: 0;\n\n > li {\n float: left;\n > a {\n padding-top: @navbar-padding-vertical;\n padding-bottom: @navbar-padding-vertical;\n }\n }\n }\n}\n\n\n// Navbar form\n//\n// Extension of the `.form-inline` with some extra flavor for optimum display in\n// our navbars.\n\n.navbar-form {\n margin-left: -@navbar-padding-horizontal;\n margin-right: -@navbar-padding-horizontal;\n padding: 10px @navbar-padding-horizontal;\n border-top: 1px solid transparent;\n border-bottom: 1px solid transparent;\n @shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.1);\n .box-shadow(@shadow);\n\n // Mixin behavior for optimum display\n .form-inline();\n\n .form-group {\n @media (max-width: @grid-float-breakpoint-max) {\n margin-bottom: 5px;\n\n &:last-child {\n margin-bottom: 0;\n }\n }\n }\n\n // Vertically center in expanded, horizontal navbar\n .navbar-vertical-align(@input-height-base);\n\n // Undo 100% width for pull classes\n @media (min-width: @grid-float-breakpoint) {\n width: auto;\n border: 0;\n margin-left: 0;\n margin-right: 0;\n padding-top: 0;\n padding-bottom: 0;\n .box-shadow(none);\n }\n}\n\n\n// Dropdown menus\n\n// Menu position and menu carets\n.navbar-nav > li > .dropdown-menu {\n margin-top: 0;\n .border-top-radius(0);\n}\n// Menu position and menu caret support for dropups via extra dropup class\n.navbar-fixed-bottom .navbar-nav > li > .dropdown-menu {\n margin-bottom: 0;\n .border-top-radius(@navbar-border-radius);\n .border-bottom-radius(0);\n}\n\n\n// Buttons in navbars\n//\n// Vertically center a button within a navbar (when *not* in a form).\n\n.navbar-btn {\n .navbar-vertical-align(@input-height-base);\n\n &.btn-sm {\n .navbar-vertical-align(@input-height-small);\n }\n &.btn-xs {\n .navbar-vertical-align(22);\n }\n}\n\n\n// Text in navbars\n//\n// Add a class to make any element properly align itself vertically within the navbars.\n\n.navbar-text {\n .navbar-vertical-align(@line-height-computed);\n\n @media (min-width: @grid-float-breakpoint) {\n float: left;\n margin-left: @navbar-padding-horizontal;\n margin-right: @navbar-padding-horizontal;\n }\n}\n\n\n// Component alignment\n//\n// Repurpose the pull utilities as their own navbar utilities to avoid specificity\n// issues with parents and chaining. Only do this when the navbar is uncollapsed\n// though so that navbar contents properly stack and align in mobile.\n//\n// Declared after the navbar components to ensure more specificity on the margins.\n\n@media (min-width: @grid-float-breakpoint) {\n .navbar-left { .pull-left(); }\n .navbar-right {\n .pull-right();\n margin-right: -@navbar-padding-horizontal;\n\n ~ .navbar-right {\n margin-right: 0;\n }\n }\n}\n\n\n// Alternate navbars\n// --------------------------------------------------\n\n// Default navbar\n.navbar-default {\n background-color: @navbar-default-bg;\n border-color: @navbar-default-border;\n\n .navbar-brand {\n color: @navbar-default-brand-color;\n &:hover,\n &:focus {\n color: @navbar-default-brand-hover-color;\n background-color: @navbar-default-brand-hover-bg;\n }\n }\n\n .navbar-text {\n color: @navbar-default-color;\n }\n\n .navbar-nav {\n > li > a {\n color: @navbar-default-link-color;\n\n &:hover,\n &:focus {\n color: @navbar-default-link-hover-color;\n background-color: @navbar-default-link-hover-bg;\n }\n }\n > .active > a {\n &,\n &:hover,\n &:focus {\n color: @navbar-default-link-active-color;\n background-color: @navbar-default-link-active-bg;\n }\n }\n > .disabled > a {\n &,\n &:hover,\n &:focus {\n color: @navbar-default-link-disabled-color;\n background-color: @navbar-default-link-disabled-bg;\n }\n }\n }\n\n .navbar-toggle {\n border-color: @navbar-default-toggle-border-color;\n &:hover,\n &:focus {\n background-color: @navbar-default-toggle-hover-bg;\n }\n .icon-bar {\n background-color: @navbar-default-toggle-icon-bar-bg;\n }\n }\n\n .navbar-collapse,\n .navbar-form {\n border-color: @navbar-default-border;\n }\n\n // Dropdown menu items\n .navbar-nav {\n // Remove background color from open dropdown\n > .open > a {\n &,\n &:hover,\n &:focus {\n background-color: @navbar-default-link-active-bg;\n color: @navbar-default-link-active-color;\n }\n }\n\n @media (max-width: @grid-float-breakpoint-max) {\n // Dropdowns get custom display when collapsed\n .open .dropdown-menu {\n > li > a {\n color: @navbar-default-link-color;\n &:hover,\n &:focus {\n color: @navbar-default-link-hover-color;\n background-color: @navbar-default-link-hover-bg;\n }\n }\n > .active > a {\n &,\n &:hover,\n &:focus {\n color: @navbar-default-link-active-color;\n background-color: @navbar-default-link-active-bg;\n }\n }\n > .disabled > a {\n &,\n &:hover,\n &:focus {\n color: @navbar-default-link-disabled-color;\n background-color: @navbar-default-link-disabled-bg;\n }\n }\n }\n }\n }\n\n\n // Links in navbars\n //\n // Add a class to ensure links outside the navbar nav are colored correctly.\n\n .navbar-link {\n color: @navbar-default-link-color;\n &:hover {\n color: @navbar-default-link-hover-color;\n }\n }\n\n .btn-link {\n color: @navbar-default-link-color;\n &:hover,\n &:focus {\n color: @navbar-default-link-hover-color;\n }\n &[disabled],\n fieldset[disabled] & {\n &:hover,\n &:focus {\n color: @navbar-default-link-disabled-color;\n }\n }\n }\n}\n\n// Inverse navbar\n\n.navbar-inverse {\n background-color: @navbar-inverse-bg;\n border-color: @navbar-inverse-border;\n\n .navbar-brand {\n color: @navbar-inverse-brand-color;\n &:hover,\n &:focus {\n color: @navbar-inverse-brand-hover-color;\n background-color: @navbar-inverse-brand-hover-bg;\n }\n }\n\n .navbar-text {\n color: @navbar-inverse-color;\n }\n\n .navbar-nav {\n > li > a {\n color: @navbar-inverse-link-color;\n\n &:hover,\n &:focus {\n color: @navbar-inverse-link-hover-color;\n background-color: @navbar-inverse-link-hover-bg;\n }\n }\n > .active > a {\n &,\n &:hover,\n &:focus {\n color: @navbar-inverse-link-active-color;\n background-color: @navbar-inverse-link-active-bg;\n }\n }\n > .disabled > a {\n &,\n &:hover,\n &:focus {\n color: @navbar-inverse-link-disabled-color;\n background-color: @navbar-inverse-link-disabled-bg;\n }\n }\n }\n\n // Darken the responsive nav toggle\n .navbar-toggle {\n border-color: @navbar-inverse-toggle-border-color;\n &:hover,\n &:focus {\n background-color: @navbar-inverse-toggle-hover-bg;\n }\n .icon-bar {\n background-color: @navbar-inverse-toggle-icon-bar-bg;\n }\n }\n\n .navbar-collapse,\n .navbar-form {\n border-color: darken(@navbar-inverse-bg, 7%);\n }\n\n // Dropdowns\n .navbar-nav {\n > .open > a {\n &,\n &:hover,\n &:focus {\n background-color: @navbar-inverse-link-active-bg;\n color: @navbar-inverse-link-active-color;\n }\n }\n\n @media (max-width: @grid-float-breakpoint-max) {\n // Dropdowns get custom display\n .open .dropdown-menu {\n > .dropdown-header {\n border-color: @navbar-inverse-border;\n }\n .divider {\n background-color: @navbar-inverse-border;\n }\n > li > a {\n color: @navbar-inverse-link-color;\n &:hover,\n &:focus {\n color: @navbar-inverse-link-hover-color;\n background-color: @navbar-inverse-link-hover-bg;\n }\n }\n > .active > a {\n &,\n &:hover,\n &:focus {\n color: @navbar-inverse-link-active-color;\n background-color: @navbar-inverse-link-active-bg;\n }\n }\n > .disabled > a {\n &,\n &:hover,\n &:focus {\n color: @navbar-inverse-link-disabled-color;\n background-color: @navbar-inverse-link-disabled-bg;\n }\n }\n }\n }\n }\n\n .navbar-link {\n color: @navbar-inverse-link-color;\n &:hover {\n color: @navbar-inverse-link-hover-color;\n }\n }\n\n .btn-link {\n color: @navbar-inverse-link-color;\n &:hover,\n &:focus {\n color: @navbar-inverse-link-hover-color;\n }\n &[disabled],\n fieldset[disabled] & {\n &:hover,\n &:focus {\n color: @navbar-inverse-link-disabled-color;\n }\n }\n }\n}\n","// Navbar vertical align\n//\n// Vertically center elements in the navbar.\n// Example: an element has a height of 30px, so write out `.navbar-vertical-align(30px);` to calculate the appropriate top margin.\n\n.navbar-vertical-align(@element-height) {\n margin-top: ((@navbar-height - @element-height) / 2);\n margin-bottom: ((@navbar-height - @element-height) / 2);\n}\n","//\n// Utility classes\n// --------------------------------------------------\n\n\n// Floats\n// -------------------------\n\n.clearfix {\n .clearfix();\n}\n.center-block {\n .center-block();\n}\n.pull-right {\n float: right !important;\n}\n.pull-left {\n float: left !important;\n}\n\n\n// Toggling content\n// -------------------------\n\n// Note: Deprecated .hide in favor of .hidden or .sr-only (as appropriate) in v3.0.1\n.hide {\n display: none !important;\n}\n.show {\n display: block !important;\n}\n.invisible {\n visibility: hidden;\n}\n.text-hide {\n .text-hide();\n}\n\n\n// Hide from screenreaders and browsers\n//\n// Credit: HTML5 Boilerplate\n\n.hidden {\n display: none !important;\n}\n\n\n// For Affix plugin\n// -------------------------\n\n.affix {\n position: fixed;\n}\n","//\n// Breadcrumbs\n// --------------------------------------------------\n\n\n.breadcrumb {\n padding: @breadcrumb-padding-vertical @breadcrumb-padding-horizontal;\n margin-bottom: @line-height-computed;\n list-style: none;\n background-color: @breadcrumb-bg;\n border-radius: @border-radius-base;\n\n > li {\n display: inline-block;\n\n + li:before {\n content: \"@{breadcrumb-separator}\\00a0\"; // Unicode space added since inline-block means non-collapsing white-space\n padding: 0 5px;\n color: @breadcrumb-color;\n }\n }\n\n > .active {\n color: @breadcrumb-active-color;\n }\n}\n","//\n// Pagination (multiple pages)\n// --------------------------------------------------\n.pagination {\n display: inline-block;\n padding-left: 0;\n margin: @line-height-computed 0;\n border-radius: @border-radius-base;\n\n > li {\n display: inline; // Remove list-style and block-level defaults\n > a,\n > span {\n position: relative;\n float: left; // Collapse white-space\n padding: @padding-base-vertical @padding-base-horizontal;\n line-height: @line-height-base;\n text-decoration: none;\n color: @pagination-color;\n background-color: @pagination-bg;\n border: 1px solid @pagination-border;\n margin-left: -1px;\n }\n &:first-child {\n > a,\n > span {\n margin-left: 0;\n .border-left-radius(@border-radius-base);\n }\n }\n &:last-child {\n > a,\n > span {\n .border-right-radius(@border-radius-base);\n }\n }\n }\n\n > li > a,\n > li > span {\n &:hover,\n &:focus {\n z-index: 2;\n color: @pagination-hover-color;\n background-color: @pagination-hover-bg;\n border-color: @pagination-hover-border;\n }\n }\n\n > .active > a,\n > .active > span {\n &,\n &:hover,\n &:focus {\n z-index: 3;\n color: @pagination-active-color;\n background-color: @pagination-active-bg;\n border-color: @pagination-active-border;\n cursor: default;\n }\n }\n\n > .disabled {\n > span,\n > span:hover,\n > span:focus,\n > a,\n > a:hover,\n > a:focus {\n color: @pagination-disabled-color;\n background-color: @pagination-disabled-bg;\n border-color: @pagination-disabled-border;\n cursor: @cursor-disabled;\n }\n }\n}\n\n// Sizing\n// --------------------------------------------------\n\n// Large\n.pagination-lg {\n .pagination-size(@padding-large-vertical; @padding-large-horizontal; @font-size-large; @line-height-large; @border-radius-large);\n}\n\n// Small\n.pagination-sm {\n .pagination-size(@padding-small-vertical; @padding-small-horizontal; @font-size-small; @line-height-small; @border-radius-small);\n}\n","// Pagination\n\n.pagination-size(@padding-vertical; @padding-horizontal; @font-size; @line-height; @border-radius) {\n > li {\n > a,\n > span {\n padding: @padding-vertical @padding-horizontal;\n font-size: @font-size;\n line-height: @line-height;\n }\n &:first-child {\n > a,\n > span {\n .border-left-radius(@border-radius);\n }\n }\n &:last-child {\n > a,\n > span {\n .border-right-radius(@border-radius);\n }\n }\n }\n}\n","//\n// Pager pagination\n// --------------------------------------------------\n\n\n.pager {\n padding-left: 0;\n margin: @line-height-computed 0;\n list-style: none;\n text-align: center;\n &:extend(.clearfix all);\n li {\n display: inline;\n > a,\n > span {\n display: inline-block;\n padding: 5px 14px;\n background-color: @pager-bg;\n border: 1px solid @pager-border;\n border-radius: @pager-border-radius;\n }\n\n > a:hover,\n > a:focus {\n text-decoration: none;\n background-color: @pager-hover-bg;\n }\n }\n\n .next {\n > a,\n > span {\n float: right;\n }\n }\n\n .previous {\n > a,\n > span {\n float: left;\n }\n }\n\n .disabled {\n > a,\n > a:hover,\n > a:focus,\n > span {\n color: @pager-disabled-color;\n background-color: @pager-bg;\n cursor: @cursor-disabled;\n }\n }\n}\n","//\n// Labels\n// --------------------------------------------------\n\n.label {\n display: inline;\n padding: .2em .6em .3em;\n font-size: 75%;\n font-weight: bold;\n line-height: 1;\n color: @label-color;\n text-align: center;\n white-space: nowrap;\n vertical-align: baseline;\n border-radius: .25em;\n\n // Add hover effects, but only for links\n a& {\n &:hover,\n &:focus {\n color: @label-link-hover-color;\n text-decoration: none;\n cursor: pointer;\n }\n }\n\n // Empty labels collapse automatically (not available in IE8)\n &:empty {\n display: none;\n }\n\n // Quick fix for labels in buttons\n .btn & {\n position: relative;\n top: -1px;\n }\n}\n\n// Colors\n// Contextual variations (linked labels get darker on :hover)\n\n.label-default {\n .label-variant(@label-default-bg);\n}\n\n.label-primary {\n .label-variant(@label-primary-bg);\n}\n\n.label-success {\n .label-variant(@label-success-bg);\n}\n\n.label-info {\n .label-variant(@label-info-bg);\n}\n\n.label-warning {\n .label-variant(@label-warning-bg);\n}\n\n.label-danger {\n .label-variant(@label-danger-bg);\n}\n","// Labels\n\n.label-variant(@color) {\n background-color: @color;\n\n &[href] {\n &:hover,\n &:focus {\n background-color: darken(@color, 10%);\n }\n }\n}\n","//\n// Badges\n// --------------------------------------------------\n\n\n// Base class\n.badge {\n display: inline-block;\n min-width: 10px;\n padding: 3px 7px;\n font-size: @font-size-small;\n font-weight: @badge-font-weight;\n color: @badge-color;\n line-height: @badge-line-height;\n vertical-align: middle;\n white-space: nowrap;\n text-align: center;\n background-color: @badge-bg;\n border-radius: @badge-border-radius;\n\n // Empty badges collapse automatically (not available in IE8)\n &:empty {\n display: none;\n }\n\n // Quick fix for badges in buttons\n .btn & {\n position: relative;\n top: -1px;\n }\n\n .btn-xs &,\n .btn-group-xs > .btn & {\n top: 0;\n padding: 1px 5px;\n }\n\n // Hover state, but only for links\n a& {\n &:hover,\n &:focus {\n color: @badge-link-hover-color;\n text-decoration: none;\n cursor: pointer;\n }\n }\n\n // Account for badges in navs\n .list-group-item.active > &,\n .nav-pills > .active > a > & {\n color: @badge-active-color;\n background-color: @badge-active-bg;\n }\n\n .list-group-item > & {\n float: right;\n }\n\n .list-group-item > & + & {\n margin-right: 5px;\n }\n\n .nav-pills > li > a > & {\n margin-left: 3px;\n }\n}\n","//\n// Jumbotron\n// --------------------------------------------------\n\n\n.jumbotron {\n padding-top: @jumbotron-padding;\n padding-bottom: @jumbotron-padding;\n margin-bottom: @jumbotron-padding;\n color: @jumbotron-color;\n background-color: @jumbotron-bg;\n\n h1,\n .h1 {\n color: @jumbotron-heading-color;\n }\n\n p {\n margin-bottom: (@jumbotron-padding / 2);\n font-size: @jumbotron-font-size;\n font-weight: 200;\n }\n\n > hr {\n border-top-color: darken(@jumbotron-bg, 10%);\n }\n\n .container &,\n .container-fluid & {\n border-radius: @border-radius-large; // Only round corners at higher resolutions if contained in a container\n padding-left: (@grid-gutter-width / 2);\n padding-right: (@grid-gutter-width / 2);\n }\n\n .container {\n max-width: 100%;\n }\n\n @media screen and (min-width: @screen-sm-min) {\n padding-top: (@jumbotron-padding * 1.6);\n padding-bottom: (@jumbotron-padding * 1.6);\n\n .container &,\n .container-fluid & {\n padding-left: (@jumbotron-padding * 2);\n padding-right: (@jumbotron-padding * 2);\n }\n\n h1,\n .h1 {\n font-size: @jumbotron-heading-font-size;\n }\n }\n}\n","//\n// Thumbnails\n// --------------------------------------------------\n\n\n// Mixin and adjust the regular image class\n.thumbnail {\n display: block;\n padding: @thumbnail-padding;\n margin-bottom: @line-height-computed;\n line-height: @line-height-base;\n background-color: @thumbnail-bg;\n border: 1px solid @thumbnail-border;\n border-radius: @thumbnail-border-radius;\n .transition(border .2s ease-in-out);\n\n > img,\n a > img {\n &:extend(.img-responsive);\n margin-left: auto;\n margin-right: auto;\n }\n\n // Add a hover state for linked versions only\n a&:hover,\n a&:focus,\n a&.active {\n border-color: @link-color;\n }\n\n // Image captions\n .caption {\n padding: @thumbnail-caption-padding;\n color: @thumbnail-caption-color;\n }\n}\n","//\n// Alerts\n// --------------------------------------------------\n\n\n// Base styles\n// -------------------------\n\n.alert {\n padding: @alert-padding;\n margin-bottom: @line-height-computed;\n border: 1px solid transparent;\n border-radius: @alert-border-radius;\n\n // Headings for larger alerts\n h4 {\n margin-top: 0;\n // Specified for the h4 to prevent conflicts of changing @headings-color\n color: inherit;\n }\n\n // Provide class for links that match alerts\n .alert-link {\n font-weight: @alert-link-font-weight;\n }\n\n // Improve alignment and spacing of inner content\n > p,\n > ul {\n margin-bottom: 0;\n }\n\n > p + p {\n margin-top: 5px;\n }\n}\n\n// Dismissible alerts\n//\n// Expand the right padding and account for the close button's positioning.\n\n.alert-dismissable, // The misspelled .alert-dismissable was deprecated in 3.2.0.\n.alert-dismissible {\n padding-right: (@alert-padding + 20);\n\n // Adjust close link position\n .close {\n position: relative;\n top: -2px;\n right: -21px;\n color: inherit;\n }\n}\n\n// Alternate styles\n//\n// Generate contextual modifier classes for colorizing the alert.\n\n.alert-success {\n .alert-variant(@alert-success-bg; @alert-success-border; @alert-success-text);\n}\n\n.alert-info {\n .alert-variant(@alert-info-bg; @alert-info-border; @alert-info-text);\n}\n\n.alert-warning {\n .alert-variant(@alert-warning-bg; @alert-warning-border; @alert-warning-text);\n}\n\n.alert-danger {\n .alert-variant(@alert-danger-bg; @alert-danger-border; @alert-danger-text);\n}\n","// Alerts\n\n.alert-variant(@background; @border; @text-color) {\n background-color: @background;\n border-color: @border;\n color: @text-color;\n\n hr {\n border-top-color: darken(@border, 5%);\n }\n .alert-link {\n color: darken(@text-color, 10%);\n }\n}\n","//\n// Progress bars\n// --------------------------------------------------\n\n\n// Bar animations\n// -------------------------\n\n// WebKit\n@-webkit-keyframes progress-bar-stripes {\n from { background-position: 40px 0; }\n to { background-position: 0 0; }\n}\n\n// Spec and IE10+\n@keyframes progress-bar-stripes {\n from { background-position: 40px 0; }\n to { background-position: 0 0; }\n}\n\n\n// Bar itself\n// -------------------------\n\n// Outer container\n.progress {\n overflow: hidden;\n height: @line-height-computed;\n margin-bottom: @line-height-computed;\n background-color: @progress-bg;\n border-radius: @progress-border-radius;\n .box-shadow(inset 0 1px 2px rgba(0,0,0,.1));\n}\n\n// Bar of progress\n.progress-bar {\n float: left;\n width: 0%;\n height: 100%;\n font-size: @font-size-small;\n line-height: @line-height-computed;\n color: @progress-bar-color;\n text-align: center;\n background-color: @progress-bar-bg;\n .box-shadow(inset 0 -1px 0 rgba(0,0,0,.15));\n .transition(width .6s ease);\n}\n\n// Striped bars\n//\n// `.progress-striped .progress-bar` is deprecated as of v3.2.0 in favor of the\n// `.progress-bar-striped` class, which you just add to an existing\n// `.progress-bar`.\n.progress-striped .progress-bar,\n.progress-bar-striped {\n #gradient > .striped();\n background-size: 40px 40px;\n}\n\n// Call animation for the active one\n//\n// `.progress.active .progress-bar` is deprecated as of v3.2.0 in favor of the\n// `.progress-bar.active` approach.\n.progress.active .progress-bar,\n.progress-bar.active {\n .animation(progress-bar-stripes 2s linear infinite);\n}\n\n\n// Variations\n// -------------------------\n\n.progress-bar-success {\n .progress-bar-variant(@progress-bar-success-bg);\n}\n\n.progress-bar-info {\n .progress-bar-variant(@progress-bar-info-bg);\n}\n\n.progress-bar-warning {\n .progress-bar-variant(@progress-bar-warning-bg);\n}\n\n.progress-bar-danger {\n .progress-bar-variant(@progress-bar-danger-bg);\n}\n","// Gradients\n\n#gradient {\n\n // Horizontal gradient, from left to right\n //\n // Creates two color stops, start and end, by specifying a color and position for each color stop.\n // Color stops are not available in IE9 and below.\n .horizontal(@start-color: #555; @end-color: #333; @start-percent: 0%; @end-percent: 100%) {\n background-image: -webkit-linear-gradient(left, @start-color @start-percent, @end-color @end-percent); // Safari 5.1-6, Chrome 10+\n background-image: -o-linear-gradient(left, @start-color @start-percent, @end-color @end-percent); // Opera 12\n background-image: linear-gradient(to right, @start-color @start-percent, @end-color @end-percent); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+\n background-repeat: repeat-x;\n filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=1)\",argb(@start-color),argb(@end-color))); // IE9 and down\n }\n\n // Vertical gradient, from top to bottom\n //\n // Creates two color stops, start and end, by specifying a color and position for each color stop.\n // Color stops are not available in IE9 and below.\n .vertical(@start-color: #555; @end-color: #333; @start-percent: 0%; @end-percent: 100%) {\n background-image: -webkit-linear-gradient(top, @start-color @start-percent, @end-color @end-percent); // Safari 5.1-6, Chrome 10+\n background-image: -o-linear-gradient(top, @start-color @start-percent, @end-color @end-percent); // Opera 12\n background-image: linear-gradient(to bottom, @start-color @start-percent, @end-color @end-percent); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+\n background-repeat: repeat-x;\n filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)\",argb(@start-color),argb(@end-color))); // IE9 and down\n }\n\n .directional(@start-color: #555; @end-color: #333; @deg: 45deg) {\n background-repeat: repeat-x;\n background-image: -webkit-linear-gradient(@deg, @start-color, @end-color); // Safari 5.1-6, Chrome 10+\n background-image: -o-linear-gradient(@deg, @start-color, @end-color); // Opera 12\n background-image: linear-gradient(@deg, @start-color, @end-color); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+\n }\n .horizontal-three-colors(@start-color: #00b3ee; @mid-color: #7a43b6; @color-stop: 50%; @end-color: #c3325f) {\n background-image: -webkit-linear-gradient(left, @start-color, @mid-color @color-stop, @end-color);\n background-image: -o-linear-gradient(left, @start-color, @mid-color @color-stop, @end-color);\n background-image: linear-gradient(to right, @start-color, @mid-color @color-stop, @end-color);\n background-repeat: no-repeat;\n filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=1)\",argb(@start-color),argb(@end-color))); // IE9 and down, gets no color-stop at all for proper fallback\n }\n .vertical-three-colors(@start-color: #00b3ee; @mid-color: #7a43b6; @color-stop: 50%; @end-color: #c3325f) {\n background-image: -webkit-linear-gradient(@start-color, @mid-color @color-stop, @end-color);\n background-image: -o-linear-gradient(@start-color, @mid-color @color-stop, @end-color);\n background-image: linear-gradient(@start-color, @mid-color @color-stop, @end-color);\n background-repeat: no-repeat;\n filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)\",argb(@start-color),argb(@end-color))); // IE9 and down, gets no color-stop at all for proper fallback\n }\n .radial(@inner-color: #555; @outer-color: #333) {\n background-image: -webkit-radial-gradient(circle, @inner-color, @outer-color);\n background-image: radial-gradient(circle, @inner-color, @outer-color);\n background-repeat: no-repeat;\n }\n .striped(@color: rgba(255,255,255,.15); @angle: 45deg) {\n background-image: -webkit-linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent);\n background-image: -o-linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent);\n background-image: linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent);\n }\n}\n","// Progress bars\n\n.progress-bar-variant(@color) {\n background-color: @color;\n\n // Deprecated parent class requirement as of v3.2.0\n .progress-striped & {\n #gradient > .striped();\n }\n}\n",".media {\n // Proper spacing between instances of .media\n margin-top: 15px;\n\n &:first-child {\n margin-top: 0;\n }\n}\n\n.media,\n.media-body {\n zoom: 1;\n overflow: hidden;\n}\n\n.media-body {\n width: 10000px;\n}\n\n.media-object {\n display: block;\n\n // Fix collapse in webkit from max-width: 100% and display: table-cell.\n &.img-thumbnail {\n max-width: none;\n }\n}\n\n.media-right,\n.media > .pull-right {\n padding-left: 10px;\n}\n\n.media-left,\n.media > .pull-left {\n padding-right: 10px;\n}\n\n.media-left,\n.media-right,\n.media-body {\n display: table-cell;\n vertical-align: top;\n}\n\n.media-middle {\n vertical-align: middle;\n}\n\n.media-bottom {\n vertical-align: bottom;\n}\n\n// Reset margins on headings for tighter default spacing\n.media-heading {\n margin-top: 0;\n margin-bottom: 5px;\n}\n\n// Media list variation\n//\n// Undo default ul/ol styles\n.media-list {\n padding-left: 0;\n list-style: none;\n}\n","//\n// List groups\n// --------------------------------------------------\n\n\n// Base class\n//\n// Easily usable on <ul>, <ol>, or <div>.\n\n.list-group {\n // No need to set list-style: none; since .list-group-item is block level\n margin-bottom: 20px;\n padding-left: 0; // reset padding because ul and ol\n}\n\n\n// Individual list items\n//\n// Use on `li`s or `div`s within the `.list-group` parent.\n\n.list-group-item {\n position: relative;\n display: block;\n padding: 10px 15px;\n // Place the border on the list items and negative margin up for better styling\n margin-bottom: -1px;\n background-color: @list-group-bg;\n border: 1px solid @list-group-border;\n\n // Round the first and last items\n &:first-child {\n .border-top-radius(@list-group-border-radius);\n }\n &:last-child {\n margin-bottom: 0;\n .border-bottom-radius(@list-group-border-radius);\n }\n}\n\n\n// Interactive list items\n//\n// Use anchor or button elements instead of `li`s or `div`s to create interactive items.\n// Includes an extra `.active` modifier class for showing selected items.\n\na.list-group-item,\nbutton.list-group-item {\n color: @list-group-link-color;\n\n .list-group-item-heading {\n color: @list-group-link-heading-color;\n }\n\n // Hover state\n &:hover,\n &:focus {\n text-decoration: none;\n color: @list-group-link-hover-color;\n background-color: @list-group-hover-bg;\n }\n}\n\nbutton.list-group-item {\n width: 100%;\n text-align: left;\n}\n\n.list-group-item {\n // Disabled state\n &.disabled,\n &.disabled:hover,\n &.disabled:focus {\n background-color: @list-group-disabled-bg;\n color: @list-group-disabled-color;\n cursor: @cursor-disabled;\n\n // Force color to inherit for custom content\n .list-group-item-heading {\n color: inherit;\n }\n .list-group-item-text {\n color: @list-group-disabled-text-color;\n }\n }\n\n // Active class on item itself, not parent\n &.active,\n &.active:hover,\n &.active:focus {\n z-index: 2; // Place active items above their siblings for proper border styling\n color: @list-group-active-color;\n background-color: @list-group-active-bg;\n border-color: @list-group-active-border;\n\n // Force color to inherit for custom content\n .list-group-item-heading,\n .list-group-item-heading > small,\n .list-group-item-heading > .small {\n color: inherit;\n }\n .list-group-item-text {\n color: @list-group-active-text-color;\n }\n }\n}\n\n\n// Contextual variants\n//\n// Add modifier classes to change text and background color on individual items.\n// Organizationally, this must come after the `:hover` states.\n\n.list-group-item-variant(success; @state-success-bg; @state-success-text);\n.list-group-item-variant(info; @state-info-bg; @state-info-text);\n.list-group-item-variant(warning; @state-warning-bg; @state-warning-text);\n.list-group-item-variant(danger; @state-danger-bg; @state-danger-text);\n\n\n// Custom content options\n//\n// Extra classes for creating well-formatted content within `.list-group-item`s.\n\n.list-group-item-heading {\n margin-top: 0;\n margin-bottom: 5px;\n}\n.list-group-item-text {\n margin-bottom: 0;\n line-height: 1.3;\n}\n","// List Groups\n\n.list-group-item-variant(@state; @background; @color) {\n .list-group-item-@{state} {\n color: @color;\n background-color: @background;\n\n a&,\n button& {\n color: @color;\n\n .list-group-item-heading {\n color: inherit;\n }\n\n &:hover,\n &:focus {\n color: @color;\n background-color: darken(@background, 5%);\n }\n &.active,\n &.active:hover,\n &.active:focus {\n color: #fff;\n background-color: @color;\n border-color: @color;\n }\n }\n }\n}\n","//\n// Panels\n// --------------------------------------------------\n\n\n// Base class\n.panel {\n margin-bottom: @line-height-computed;\n background-color: @panel-bg;\n border: 1px solid transparent;\n border-radius: @panel-border-radius;\n .box-shadow(0 1px 1px rgba(0,0,0,.05));\n}\n\n// Panel contents\n.panel-body {\n padding: @panel-body-padding;\n &:extend(.clearfix all);\n}\n\n// Optional heading\n.panel-heading {\n padding: @panel-heading-padding;\n border-bottom: 1px solid transparent;\n .border-top-radius((@panel-border-radius - 1));\n\n > .dropdown .dropdown-toggle {\n color: inherit;\n }\n}\n\n// Within heading, strip any `h*` tag of its default margins for spacing.\n.panel-title {\n margin-top: 0;\n margin-bottom: 0;\n font-size: ceil((@font-size-base * 1.125));\n color: inherit;\n\n > a,\n > small,\n > .small,\n > small > a,\n > .small > a {\n color: inherit;\n }\n}\n\n// Optional footer (stays gray in every modifier class)\n.panel-footer {\n padding: @panel-footer-padding;\n background-color: @panel-footer-bg;\n border-top: 1px solid @panel-inner-border;\n .border-bottom-radius((@panel-border-radius - 1));\n}\n\n\n// List groups in panels\n//\n// By default, space out list group content from panel headings to account for\n// any kind of custom content between the two.\n\n.panel {\n > .list-group,\n > .panel-collapse > .list-group {\n margin-bottom: 0;\n\n .list-group-item {\n border-width: 1px 0;\n border-radius: 0;\n }\n\n // Add border top radius for first one\n &:first-child {\n .list-group-item:first-child {\n border-top: 0;\n .border-top-radius((@panel-border-radius - 1));\n }\n }\n\n // Add border bottom radius for last one\n &:last-child {\n .list-group-item:last-child {\n border-bottom: 0;\n .border-bottom-radius((@panel-border-radius - 1));\n }\n }\n }\n > .panel-heading + .panel-collapse > .list-group {\n .list-group-item:first-child {\n .border-top-radius(0);\n }\n }\n}\n// Collapse space between when there's no additional content.\n.panel-heading + .list-group {\n .list-group-item:first-child {\n border-top-width: 0;\n }\n}\n.list-group + .panel-footer {\n border-top-width: 0;\n}\n\n// Tables in panels\n//\n// Place a non-bordered `.table` within a panel (not within a `.panel-body`) and\n// watch it go full width.\n\n.panel {\n > .table,\n > .table-responsive > .table,\n > .panel-collapse > .table {\n margin-bottom: 0;\n\n caption {\n padding-left: @panel-body-padding;\n padding-right: @panel-body-padding;\n }\n }\n // Add border top radius for first one\n > .table:first-child,\n > .table-responsive:first-child > .table:first-child {\n .border-top-radius((@panel-border-radius - 1));\n\n > thead:first-child,\n > tbody:first-child {\n > tr:first-child {\n border-top-left-radius: (@panel-border-radius - 1);\n border-top-right-radius: (@panel-border-radius - 1);\n\n td:first-child,\n th:first-child {\n border-top-left-radius: (@panel-border-radius - 1);\n }\n td:last-child,\n th:last-child {\n border-top-right-radius: (@panel-border-radius - 1);\n }\n }\n }\n }\n // Add border bottom radius for last one\n > .table:last-child,\n > .table-responsive:last-child > .table:last-child {\n .border-bottom-radius((@panel-border-radius - 1));\n\n > tbody:last-child,\n > tfoot:last-child {\n > tr:last-child {\n border-bottom-left-radius: (@panel-border-radius - 1);\n border-bottom-right-radius: (@panel-border-radius - 1);\n\n td:first-child,\n th:first-child {\n border-bottom-left-radius: (@panel-border-radius - 1);\n }\n td:last-child,\n th:last-child {\n border-bottom-right-radius: (@panel-border-radius - 1);\n }\n }\n }\n }\n > .panel-body + .table,\n > .panel-body + .table-responsive,\n > .table + .panel-body,\n > .table-responsive + .panel-body {\n border-top: 1px solid @table-border-color;\n }\n > .table > tbody:first-child > tr:first-child th,\n > .table > tbody:first-child > tr:first-child td {\n border-top: 0;\n }\n > .table-bordered,\n > .table-responsive > .table-bordered {\n border: 0;\n > thead,\n > tbody,\n > tfoot {\n > tr {\n > th:first-child,\n > td:first-child {\n border-left: 0;\n }\n > th:last-child,\n > td:last-child {\n border-right: 0;\n }\n }\n }\n > thead,\n > tbody {\n > tr:first-child {\n > td,\n > th {\n border-bottom: 0;\n }\n }\n }\n > tbody,\n > tfoot {\n > tr:last-child {\n > td,\n > th {\n border-bottom: 0;\n }\n }\n }\n }\n > .table-responsive {\n border: 0;\n margin-bottom: 0;\n }\n}\n\n\n// Collapsable panels (aka, accordion)\n//\n// Wrap a series of panels in `.panel-group` to turn them into an accordion with\n// the help of our collapse JavaScript plugin.\n\n.panel-group {\n margin-bottom: @line-height-computed;\n\n // Tighten up margin so it's only between panels\n .panel {\n margin-bottom: 0;\n border-radius: @panel-border-radius;\n\n + .panel {\n margin-top: 5px;\n }\n }\n\n .panel-heading {\n border-bottom: 0;\n\n + .panel-collapse > .panel-body,\n + .panel-collapse > .list-group {\n border-top: 1px solid @panel-inner-border;\n }\n }\n\n .panel-footer {\n border-top: 0;\n + .panel-collapse .panel-body {\n border-bottom: 1px solid @panel-inner-border;\n }\n }\n}\n\n\n// Contextual variations\n.panel-default {\n .panel-variant(@panel-default-border; @panel-default-text; @panel-default-heading-bg; @panel-default-border);\n}\n.panel-primary {\n .panel-variant(@panel-primary-border; @panel-primary-text; @panel-primary-heading-bg; @panel-primary-border);\n}\n.panel-success {\n .panel-variant(@panel-success-border; @panel-success-text; @panel-success-heading-bg; @panel-success-border);\n}\n.panel-info {\n .panel-variant(@panel-info-border; @panel-info-text; @panel-info-heading-bg; @panel-info-border);\n}\n.panel-warning {\n .panel-variant(@panel-warning-border; @panel-warning-text; @panel-warning-heading-bg; @panel-warning-border);\n}\n.panel-danger {\n .panel-variant(@panel-danger-border; @panel-danger-text; @panel-danger-heading-bg; @panel-danger-border);\n}\n","// Panels\n\n.panel-variant(@border; @heading-text-color; @heading-bg-color; @heading-border) {\n border-color: @border;\n\n & > .panel-heading {\n color: @heading-text-color;\n background-color: @heading-bg-color;\n border-color: @heading-border;\n\n + .panel-collapse > .panel-body {\n border-top-color: @border;\n }\n .badge {\n color: @heading-bg-color;\n background-color: @heading-text-color;\n }\n }\n & > .panel-footer {\n + .panel-collapse > .panel-body {\n border-bottom-color: @border;\n }\n }\n}\n","// Embeds responsive\n//\n// Credit: Nicolas Gallagher and SUIT CSS.\n\n.embed-responsive {\n position: relative;\n display: block;\n height: 0;\n padding: 0;\n overflow: hidden;\n\n .embed-responsive-item,\n iframe,\n embed,\n object,\n video {\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n height: 100%;\n width: 100%;\n border: 0;\n }\n}\n\n// Modifier class for 16:9 aspect ratio\n.embed-responsive-16by9 {\n padding-bottom: 56.25%;\n}\n\n// Modifier class for 4:3 aspect ratio\n.embed-responsive-4by3 {\n padding-bottom: 75%;\n}\n","//\n// Wells\n// --------------------------------------------------\n\n\n// Base class\n.well {\n min-height: 20px;\n padding: 19px;\n margin-bottom: 20px;\n background-color: @well-bg;\n border: 1px solid @well-border;\n border-radius: @border-radius-base;\n .box-shadow(inset 0 1px 1px rgba(0,0,0,.05));\n blockquote {\n border-color: #ddd;\n border-color: rgba(0,0,0,.15);\n }\n}\n\n// Sizes\n.well-lg {\n padding: 24px;\n border-radius: @border-radius-large;\n}\n.well-sm {\n padding: 9px;\n border-radius: @border-radius-small;\n}\n","//\n// Close icons\n// --------------------------------------------------\n\n\n.close {\n float: right;\n font-size: (@font-size-base * 1.5);\n font-weight: @close-font-weight;\n line-height: 1;\n color: @close-color;\n text-shadow: @close-text-shadow;\n .opacity(.2);\n\n &:hover,\n &:focus {\n color: @close-color;\n text-decoration: none;\n cursor: pointer;\n .opacity(.5);\n }\n\n // Additional properties for button version\n // iOS requires the button element instead of an anchor tag.\n // If you want the anchor version, it requires `href=\"#\"`.\n // See https://developer.mozilla.org/en-US/docs/Web/Events/click#Safari_Mobile\n button& {\n padding: 0;\n cursor: pointer;\n background: transparent;\n border: 0;\n -webkit-appearance: none;\n }\n}\n","//\n// Modals\n// --------------------------------------------------\n\n// .modal-open - body class for killing the scroll\n// .modal - container to scroll within\n// .modal-dialog - positioning shell for the actual modal\n// .modal-content - actual modal w/ bg and corners and shit\n\n// Kill the scroll on the body\n.modal-open {\n overflow: hidden;\n}\n\n// Container that the modal scrolls within\n.modal {\n display: none;\n overflow: hidden;\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: @zindex-modal;\n -webkit-overflow-scrolling: touch;\n\n // Prevent Chrome on Windows from adding a focus outline. For details, see\n // https://github.com/twbs/bootstrap/pull/10951.\n outline: 0;\n\n // When fading in the modal, animate it to slide down\n &.fade .modal-dialog {\n .translate(0, -25%);\n .transition-transform(~\"0.3s ease-out\");\n }\n &.in .modal-dialog { .translate(0, 0) }\n}\n.modal-open .modal {\n overflow-x: hidden;\n overflow-y: auto;\n}\n\n// Shell div to position the modal with bottom padding\n.modal-dialog {\n position: relative;\n width: auto;\n margin: 10px;\n}\n\n// Actual modal\n.modal-content {\n position: relative;\n background-color: @modal-content-bg;\n border: 1px solid @modal-content-fallback-border-color; //old browsers fallback (ie8 etc)\n border: 1px solid @modal-content-border-color;\n border-radius: @border-radius-large;\n .box-shadow(0 3px 9px rgba(0,0,0,.5));\n background-clip: padding-box;\n // Remove focus outline from opened modal\n outline: 0;\n}\n\n// Modal background\n.modal-backdrop {\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: @zindex-modal-background;\n background-color: @modal-backdrop-bg;\n // Fade for backdrop\n &.fade { .opacity(0); }\n &.in { .opacity(@modal-backdrop-opacity); }\n}\n\n// Modal header\n// Top section of the modal w/ title and dismiss\n.modal-header {\n padding: @modal-title-padding;\n border-bottom: 1px solid @modal-header-border-color;\n &:extend(.clearfix all);\n}\n// Close icon\n.modal-header .close {\n margin-top: -2px;\n}\n\n// Title text within header\n.modal-title {\n margin: 0;\n line-height: @modal-title-line-height;\n}\n\n// Modal body\n// Where all modal content resides (sibling of .modal-header and .modal-footer)\n.modal-body {\n position: relative;\n padding: @modal-inner-padding;\n}\n\n// Footer (for actions)\n.modal-footer {\n padding: @modal-inner-padding;\n text-align: right; // right align buttons\n border-top: 1px solid @modal-footer-border-color;\n &:extend(.clearfix all); // clear it in case folks use .pull-* classes on buttons\n\n // Properly space out buttons\n .btn + .btn {\n margin-left: 5px;\n margin-bottom: 0; // account for input[type=\"submit\"] which gets the bottom margin like all other inputs\n }\n // but override that for button groups\n .btn-group .btn + .btn {\n margin-left: -1px;\n }\n // and override it for block buttons as well\n .btn-block + .btn-block {\n margin-left: 0;\n }\n}\n\n// Measure scrollbar width for padding body during modal show/hide\n.modal-scrollbar-measure {\n position: absolute;\n top: -9999px;\n width: 50px;\n height: 50px;\n overflow: scroll;\n}\n\n// Scale up the modal\n@media (min-width: @screen-sm-min) {\n // Automatically set modal's width for larger viewports\n .modal-dialog {\n width: @modal-md;\n margin: 30px auto;\n }\n .modal-content {\n .box-shadow(0 5px 15px rgba(0,0,0,.5));\n }\n\n // Modal sizes\n .modal-sm { width: @modal-sm; }\n}\n\n@media (min-width: @screen-md-min) {\n .modal-lg { width: @modal-lg; }\n}\n","//\n// Tooltips\n// --------------------------------------------------\n\n\n// Base class\n.tooltip {\n position: absolute;\n z-index: @zindex-tooltip;\n display: block;\n // Our parent element can be arbitrary since tooltips are by default inserted as a sibling of their target element.\n // So reset our font and text properties to avoid inheriting weird values.\n .reset-text();\n font-size: @font-size-small;\n\n .opacity(0);\n\n &.in { .opacity(@tooltip-opacity); }\n &.top { margin-top: -3px; padding: @tooltip-arrow-width 0; }\n &.right { margin-left: 3px; padding: 0 @tooltip-arrow-width; }\n &.bottom { margin-top: 3px; padding: @tooltip-arrow-width 0; }\n &.left { margin-left: -3px; padding: 0 @tooltip-arrow-width; }\n}\n\n// Wrapper for the tooltip content\n.tooltip-inner {\n max-width: @tooltip-max-width;\n padding: 3px 8px;\n color: @tooltip-color;\n text-align: center;\n background-color: @tooltip-bg;\n border-radius: @border-radius-base;\n}\n\n// Arrows\n.tooltip-arrow {\n position: absolute;\n width: 0;\n height: 0;\n border-color: transparent;\n border-style: solid;\n}\n// Note: Deprecated .top-left, .top-right, .bottom-left, and .bottom-right as of v3.3.1\n.tooltip {\n &.top .tooltip-arrow {\n bottom: 0;\n left: 50%;\n margin-left: -@tooltip-arrow-width;\n border-width: @tooltip-arrow-width @tooltip-arrow-width 0;\n border-top-color: @tooltip-arrow-color;\n }\n &.top-left .tooltip-arrow {\n bottom: 0;\n right: @tooltip-arrow-width;\n margin-bottom: -@tooltip-arrow-width;\n border-width: @tooltip-arrow-width @tooltip-arrow-width 0;\n border-top-color: @tooltip-arrow-color;\n }\n &.top-right .tooltip-arrow {\n bottom: 0;\n left: @tooltip-arrow-width;\n margin-bottom: -@tooltip-arrow-width;\n border-width: @tooltip-arrow-width @tooltip-arrow-width 0;\n border-top-color: @tooltip-arrow-color;\n }\n &.right .tooltip-arrow {\n top: 50%;\n left: 0;\n margin-top: -@tooltip-arrow-width;\n border-width: @tooltip-arrow-width @tooltip-arrow-width @tooltip-arrow-width 0;\n border-right-color: @tooltip-arrow-color;\n }\n &.left .tooltip-arrow {\n top: 50%;\n right: 0;\n margin-top: -@tooltip-arrow-width;\n border-width: @tooltip-arrow-width 0 @tooltip-arrow-width @tooltip-arrow-width;\n border-left-color: @tooltip-arrow-color;\n }\n &.bottom .tooltip-arrow {\n top: 0;\n left: 50%;\n margin-left: -@tooltip-arrow-width;\n border-width: 0 @tooltip-arrow-width @tooltip-arrow-width;\n border-bottom-color: @tooltip-arrow-color;\n }\n &.bottom-left .tooltip-arrow {\n top: 0;\n right: @tooltip-arrow-width;\n margin-top: -@tooltip-arrow-width;\n border-width: 0 @tooltip-arrow-width @tooltip-arrow-width;\n border-bottom-color: @tooltip-arrow-color;\n }\n &.bottom-right .tooltip-arrow {\n top: 0;\n left: @tooltip-arrow-width;\n margin-top: -@tooltip-arrow-width;\n border-width: 0 @tooltip-arrow-width @tooltip-arrow-width;\n border-bottom-color: @tooltip-arrow-color;\n }\n}\n",".reset-text() {\n font-family: @font-family-base;\n // We deliberately do NOT reset font-size.\n font-style: normal;\n font-weight: normal;\n letter-spacing: normal;\n line-break: auto;\n line-height: @line-height-base;\n text-align: left; // Fallback for where `start` is not supported\n text-align: start;\n text-decoration: none;\n text-shadow: none;\n text-transform: none;\n white-space: normal;\n word-break: normal;\n word-spacing: normal;\n word-wrap: normal;\n}\n","//\n// Popovers\n// --------------------------------------------------\n\n\n.popover {\n position: absolute;\n top: 0;\n left: 0;\n z-index: @zindex-popover;\n display: none;\n max-width: @popover-max-width;\n padding: 1px;\n // Our parent element can be arbitrary since popovers are by default inserted as a sibling of their target element.\n // So reset our font and text properties to avoid inheriting weird values.\n .reset-text();\n font-size: @font-size-base;\n\n background-color: @popover-bg;\n background-clip: padding-box;\n border: 1px solid @popover-fallback-border-color;\n border: 1px solid @popover-border-color;\n border-radius: @border-radius-large;\n .box-shadow(0 5px 10px rgba(0,0,0,.2));\n\n // Offset the popover to account for the popover arrow\n &.top { margin-top: -@popover-arrow-width; }\n &.right { margin-left: @popover-arrow-width; }\n &.bottom { margin-top: @popover-arrow-width; }\n &.left { margin-left: -@popover-arrow-width; }\n}\n\n.popover-title {\n margin: 0; // reset heading margin\n padding: 8px 14px;\n font-size: @font-size-base;\n background-color: @popover-title-bg;\n border-bottom: 1px solid darken(@popover-title-bg, 5%);\n border-radius: (@border-radius-large - 1) (@border-radius-large - 1) 0 0;\n}\n\n.popover-content {\n padding: 9px 14px;\n}\n\n// Arrows\n//\n// .arrow is outer, .arrow:after is inner\n\n.popover > .arrow {\n &,\n &:after {\n position: absolute;\n display: block;\n width: 0;\n height: 0;\n border-color: transparent;\n border-style: solid;\n }\n}\n.popover > .arrow {\n border-width: @popover-arrow-outer-width;\n}\n.popover > .arrow:after {\n border-width: @popover-arrow-width;\n content: \"\";\n}\n\n.popover {\n &.top > .arrow {\n left: 50%;\n margin-left: -@popover-arrow-outer-width;\n border-bottom-width: 0;\n border-top-color: @popover-arrow-outer-fallback-color; // IE8 fallback\n border-top-color: @popover-arrow-outer-color;\n bottom: -@popover-arrow-outer-width;\n &:after {\n content: \" \";\n bottom: 1px;\n margin-left: -@popover-arrow-width;\n border-bottom-width: 0;\n border-top-color: @popover-arrow-color;\n }\n }\n &.right > .arrow {\n top: 50%;\n left: -@popover-arrow-outer-width;\n margin-top: -@popover-arrow-outer-width;\n border-left-width: 0;\n border-right-color: @popover-arrow-outer-fallback-color; // IE8 fallback\n border-right-color: @popover-arrow-outer-color;\n &:after {\n content: \" \";\n left: 1px;\n bottom: -@popover-arrow-width;\n border-left-width: 0;\n border-right-color: @popover-arrow-color;\n }\n }\n &.bottom > .arrow {\n left: 50%;\n margin-left: -@popover-arrow-outer-width;\n border-top-width: 0;\n border-bottom-color: @popover-arrow-outer-fallback-color; // IE8 fallback\n border-bottom-color: @popover-arrow-outer-color;\n top: -@popover-arrow-outer-width;\n &:after {\n content: \" \";\n top: 1px;\n margin-left: -@popover-arrow-width;\n border-top-width: 0;\n border-bottom-color: @popover-arrow-color;\n }\n }\n\n &.left > .arrow {\n top: 50%;\n right: -@popover-arrow-outer-width;\n margin-top: -@popover-arrow-outer-width;\n border-right-width: 0;\n border-left-color: @popover-arrow-outer-fallback-color; // IE8 fallback\n border-left-color: @popover-arrow-outer-color;\n &:after {\n content: \" \";\n right: 1px;\n border-right-width: 0;\n border-left-color: @popover-arrow-color;\n bottom: -@popover-arrow-width;\n }\n }\n}\n","//\n// Carousel\n// --------------------------------------------------\n\n\n// Wrapper for the slide container and indicators\n.carousel {\n position: relative;\n}\n\n.carousel-inner {\n position: relative;\n overflow: hidden;\n width: 100%;\n\n > .item {\n display: none;\n position: relative;\n .transition(.6s ease-in-out left);\n\n // Account for jankitude on images\n > img,\n > a > img {\n &:extend(.img-responsive);\n line-height: 1;\n }\n\n // WebKit CSS3 transforms for supported devices\n @media all and (transform-3d), (-webkit-transform-3d) {\n .transition-transform(~'0.6s ease-in-out');\n .backface-visibility(~'hidden');\n .perspective(1000px);\n\n &.next,\n &.active.right {\n .translate3d(100%, 0, 0);\n left: 0;\n }\n &.prev,\n &.active.left {\n .translate3d(-100%, 0, 0);\n left: 0;\n }\n &.next.left,\n &.prev.right,\n &.active {\n .translate3d(0, 0, 0);\n left: 0;\n }\n }\n }\n\n > .active,\n > .next,\n > .prev {\n display: block;\n }\n\n > .active {\n left: 0;\n }\n\n > .next,\n > .prev {\n position: absolute;\n top: 0;\n width: 100%;\n }\n\n > .next {\n left: 100%;\n }\n > .prev {\n left: -100%;\n }\n > .next.left,\n > .prev.right {\n left: 0;\n }\n\n > .active.left {\n left: -100%;\n }\n > .active.right {\n left: 100%;\n }\n\n}\n\n// Left/right controls for nav\n// ---------------------------\n\n.carousel-control {\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n width: @carousel-control-width;\n .opacity(@carousel-control-opacity);\n font-size: @carousel-control-font-size;\n color: @carousel-control-color;\n text-align: center;\n text-shadow: @carousel-text-shadow;\n background-color: rgba(0, 0, 0, 0); // Fix IE9 click-thru bug\n // We can't have this transition here because WebKit cancels the carousel\n // animation if you trip this while in the middle of another animation.\n\n // Set gradients for backgrounds\n &.left {\n #gradient > .horizontal(@start-color: rgba(0,0,0,.5); @end-color: rgba(0,0,0,.0001));\n }\n &.right {\n left: auto;\n right: 0;\n #gradient > .horizontal(@start-color: rgba(0,0,0,.0001); @end-color: rgba(0,0,0,.5));\n }\n\n // Hover/focus state\n &:hover,\n &:focus {\n outline: 0;\n color: @carousel-control-color;\n text-decoration: none;\n .opacity(.9);\n }\n\n // Toggles\n .icon-prev,\n .icon-next,\n .glyphicon-chevron-left,\n .glyphicon-chevron-right {\n position: absolute;\n top: 50%;\n margin-top: -10px;\n z-index: 5;\n display: inline-block;\n }\n .icon-prev,\n .glyphicon-chevron-left {\n left: 50%;\n margin-left: -10px;\n }\n .icon-next,\n .glyphicon-chevron-right {\n right: 50%;\n margin-right: -10px;\n }\n .icon-prev,\n .icon-next {\n width: 20px;\n height: 20px;\n line-height: 1;\n font-family: serif;\n }\n\n\n .icon-prev {\n &:before {\n content: '\\2039';// SINGLE LEFT-POINTING ANGLE QUOTATION MARK (U+2039)\n }\n }\n .icon-next {\n &:before {\n content: '\\203a';// SINGLE RIGHT-POINTING ANGLE QUOTATION MARK (U+203A)\n }\n }\n}\n\n// Optional indicator pips\n//\n// Add an unordered list with the following class and add a list item for each\n// slide your carousel holds.\n\n.carousel-indicators {\n position: absolute;\n bottom: 10px;\n left: 50%;\n z-index: 15;\n width: 60%;\n margin-left: -30%;\n padding-left: 0;\n list-style: none;\n text-align: center;\n\n li {\n display: inline-block;\n width: 10px;\n height: 10px;\n margin: 1px;\n text-indent: -999px;\n border: 1px solid @carousel-indicator-border-color;\n border-radius: 10px;\n cursor: pointer;\n\n // IE8-9 hack for event handling\n //\n // Internet Explorer 8-9 does not support clicks on elements without a set\n // `background-color`. We cannot use `filter` since that's not viewed as a\n // background color by the browser. Thus, a hack is needed.\n // See https://developer.mozilla.org/en-US/docs/Web/Events/click#Internet_Explorer\n //\n // For IE8, we set solid black as it doesn't support `rgba()`. For IE9, we\n // set alpha transparency for the best results possible.\n background-color: #000 \\9; // IE8\n background-color: rgba(0,0,0,0); // IE9\n }\n .active {\n margin: 0;\n width: 12px;\n height: 12px;\n background-color: @carousel-indicator-active-bg;\n }\n}\n\n// Optional captions\n// -----------------------------\n// Hidden by default for smaller viewports\n.carousel-caption {\n position: absolute;\n left: 15%;\n right: 15%;\n bottom: 20px;\n z-index: 10;\n padding-top: 20px;\n padding-bottom: 20px;\n color: @carousel-caption-color;\n text-align: center;\n text-shadow: @carousel-text-shadow;\n & .btn {\n text-shadow: none; // No shadow for button elements in carousel-caption\n }\n}\n\n\n// Scale up controls for tablets and up\n@media screen and (min-width: @screen-sm-min) {\n\n // Scale up the controls a smidge\n .carousel-control {\n .glyphicon-chevron-left,\n .glyphicon-chevron-right,\n .icon-prev,\n .icon-next {\n width: (@carousel-control-font-size * 1.5);\n height: (@carousel-control-font-size * 1.5);\n margin-top: (@carousel-control-font-size / -2);\n font-size: (@carousel-control-font-size * 1.5);\n }\n .glyphicon-chevron-left,\n .icon-prev {\n margin-left: (@carousel-control-font-size / -2);\n }\n .glyphicon-chevron-right,\n .icon-next {\n margin-right: (@carousel-control-font-size / -2);\n }\n }\n\n // Show and left align the captions\n .carousel-caption {\n left: 20%;\n right: 20%;\n padding-bottom: 30px;\n }\n\n // Move up the indicators\n .carousel-indicators {\n bottom: 20px;\n }\n}\n","// Clearfix\n//\n// For modern browsers\n// 1. The space content is one way to avoid an Opera bug when the\n// contenteditable attribute is included anywhere else in the document.\n// Otherwise it causes space to appear at the top and bottom of elements\n// that are clearfixed.\n// 2. The use of `table` rather than `block` is only necessary if using\n// `:before` to contain the top-margins of child elements.\n//\n// Source: http://nicolasgallagher.com/micro-clearfix-hack/\n\n.clearfix() {\n &:before,\n &:after {\n content: \" \"; // 1\n display: table; // 2\n }\n &:after {\n clear: both;\n }\n}\n","// Center-align a block level element\n\n.center-block() {\n display: block;\n margin-left: auto;\n margin-right: auto;\n}\n","// CSS image replacement\n//\n// Heads up! v3 launched with only `.hide-text()`, but per our pattern for\n// mixins being reused as classes with the same name, this doesn't hold up. As\n// of v3.0.1 we have added `.text-hide()` and deprecated `.hide-text()`.\n//\n// Source: https://github.com/h5bp/html5-boilerplate/commit/aa0396eae757\n\n// Deprecated as of v3.0.1 (has been removed in v4)\n.hide-text() {\n font: ~\"0/0\" a;\n color: transparent;\n text-shadow: none;\n background-color: transparent;\n border: 0;\n}\n\n// New mixin to use as of v3.0.1\n.text-hide() {\n .hide-text();\n}\n","//\n// Responsive: Utility classes\n// --------------------------------------------------\n\n\n// IE10 in Windows (Phone) 8\n//\n// Support for responsive views via media queries is kind of borked in IE10, for\n// Surface/desktop in split view and for Windows Phone 8. This particular fix\n// must be accompanied by a snippet of JavaScript to sniff the user agent and\n// apply some conditional CSS to *only* the Surface/desktop Windows 8. Look at\n// our Getting Started page for more information on this bug.\n//\n// For more information, see the following:\n//\n// Issue: https://github.com/twbs/bootstrap/issues/10497\n// Docs: http://getbootstrap.com/getting-started/#support-ie10-width\n// Source: http://timkadlec.com/2013/01/windows-phone-8-and-device-width/\n// Source: http://timkadlec.com/2012/10/ie10-snap-mode-and-responsive-design/\n\n@-ms-viewport {\n width: device-width;\n}\n\n\n// Visibility utilities\n// Note: Deprecated .visible-xs, .visible-sm, .visible-md, and .visible-lg as of v3.2.0\n.visible-xs,\n.visible-sm,\n.visible-md,\n.visible-lg {\n .responsive-invisibility();\n}\n\n.visible-xs-block,\n.visible-xs-inline,\n.visible-xs-inline-block,\n.visible-sm-block,\n.visible-sm-inline,\n.visible-sm-inline-block,\n.visible-md-block,\n.visible-md-inline,\n.visible-md-inline-block,\n.visible-lg-block,\n.visible-lg-inline,\n.visible-lg-inline-block {\n display: none !important;\n}\n\n.visible-xs {\n @media (max-width: @screen-xs-max) {\n .responsive-visibility();\n }\n}\n.visible-xs-block {\n @media (max-width: @screen-xs-max) {\n display: block !important;\n }\n}\n.visible-xs-inline {\n @media (max-width: @screen-xs-max) {\n display: inline !important;\n }\n}\n.visible-xs-inline-block {\n @media (max-width: @screen-xs-max) {\n display: inline-block !important;\n }\n}\n\n.visible-sm {\n @media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) {\n .responsive-visibility();\n }\n}\n.visible-sm-block {\n @media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) {\n display: block !important;\n }\n}\n.visible-sm-inline {\n @media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) {\n display: inline !important;\n }\n}\n.visible-sm-inline-block {\n @media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) {\n display: inline-block !important;\n }\n}\n\n.visible-md {\n @media (min-width: @screen-md-min) and (max-width: @screen-md-max) {\n .responsive-visibility();\n }\n}\n.visible-md-block {\n @media (min-width: @screen-md-min) and (max-width: @screen-md-max) {\n display: block !important;\n }\n}\n.visible-md-inline {\n @media (min-width: @screen-md-min) and (max-width: @screen-md-max) {\n display: inline !important;\n }\n}\n.visible-md-inline-block {\n @media (min-width: @screen-md-min) and (max-width: @screen-md-max) {\n display: inline-block !important;\n }\n}\n\n.visible-lg {\n @media (min-width: @screen-lg-min) {\n .responsive-visibility();\n }\n}\n.visible-lg-block {\n @media (min-width: @screen-lg-min) {\n display: block !important;\n }\n}\n.visible-lg-inline {\n @media (min-width: @screen-lg-min) {\n display: inline !important;\n }\n}\n.visible-lg-inline-block {\n @media (min-width: @screen-lg-min) {\n display: inline-block !important;\n }\n}\n\n.hidden-xs {\n @media (max-width: @screen-xs-max) {\n .responsive-invisibility();\n }\n}\n.hidden-sm {\n @media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) {\n .responsive-invisibility();\n }\n}\n.hidden-md {\n @media (min-width: @screen-md-min) and (max-width: @screen-md-max) {\n .responsive-invisibility();\n }\n}\n.hidden-lg {\n @media (min-width: @screen-lg-min) {\n .responsive-invisibility();\n }\n}\n\n\n// Print utilities\n//\n// Media queries are placed on the inside to be mixin-friendly.\n\n// Note: Deprecated .visible-print as of v3.2.0\n.visible-print {\n .responsive-invisibility();\n\n @media print {\n .responsive-visibility();\n }\n}\n.visible-print-block {\n display: none !important;\n\n @media print {\n display: block !important;\n }\n}\n.visible-print-inline {\n display: none !important;\n\n @media print {\n display: inline !important;\n }\n}\n.visible-print-inline-block {\n display: none !important;\n\n @media print {\n display: inline-block !important;\n }\n}\n\n.hidden-print {\n @media print {\n .responsive-invisibility();\n }\n}\n","// Responsive utilities\n\n//\n// More easily include all the states for responsive-utilities.less.\n.responsive-visibility() {\n display: block !important;\n table& { display: table !important; }\n tr& { display: table-row !important; }\n th&,\n td& { display: table-cell !important; }\n}\n\n.responsive-invisibility() {\n display: none !important;\n}\n"]}
\ No newline at end of file
diff --git a/views/ngXosViews/serviceGrid/src/vendor/bootstrap-css/css/bootstrap.min.css b/views/ngXosViews/serviceGrid/src/vendor/bootstrap-css/css/bootstrap.min.css
new file mode 100644
index 0000000..4cf729e
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/bootstrap-css/css/bootstrap.min.css
@@ -0,0 +1,6 @@
+/*!
+ * Bootstrap v3.3.6 (http://getbootstrap.com)
+ * Copyright 2011-2015 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ *//*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}h1{margin:.67em 0;font-size:2em}mark{color:#000;background:#ff0}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{height:0;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{margin:0;font:inherit;color:inherit}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0}input{line-height:normal}input[type=checkbox],input[type=radio]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;-webkit-appearance:textfield}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}fieldset{padding:.35em .625em .75em;margin:0 2px;border:1px solid silver}legend{padding:0;border:0}textarea{overflow:auto}optgroup{font-weight:700}table{border-spacing:0;border-collapse:collapse}td,th{padding:0}/*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */@media print{*,:after,:before{color:#000!important;text-shadow:none!important;background:0 0!important;-webkit-box-shadow:none!important;box-shadow:none!important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}a[href^="javascript:"]:after,a[href^="#"]:after{content:""}blockquote,pre{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}img,tr{page-break-inside:avoid}img{max-width:100%!important}h2,h3,p{orphans:3;widows:3}h2,h3{page-break-after:avoid}.navbar{display:none}.btn>.caret,.dropup>.btn>.caret{border-top-color:#000!important}.label{border:1px solid #000}.table{border-collapse:collapse!important}.table td,.table th{background-color:#fff!important}.table-bordered td,.table-bordered th{border:1px solid #ddd!important}}@font-face{font-family:'Glyphicons Halflings';src:url(../fonts/glyphicons-halflings-regular.eot);src:url(../fonts/glyphicons-halflings-regular.eot?#iefix) format('embedded-opentype'),url(../fonts/glyphicons-halflings-regular.woff2) format('woff2'),url(../fonts/glyphicons-halflings-regular.woff) format('woff'),url(../fonts/glyphicons-halflings-regular.ttf) format('truetype'),url(../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular) format('svg')}.glyphicon{position:relative;top:1px;display:inline-block;font-family:'Glyphicons Halflings';font-style:normal;font-weight:400;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.glyphicon-asterisk:before{content:"\002a"}.glyphicon-plus:before{content:"\002b"}.glyphicon-eur:before,.glyphicon-euro:before{content:"\20ac"}.glyphicon-minus:before{content:"\2212"}.glyphicon-cloud:before{content:"\2601"}.glyphicon-envelope:before{content:"\2709"}.glyphicon-pencil:before{content:"\270f"}.glyphicon-glass:before{content:"\e001"}.glyphicon-music:before{content:"\e002"}.glyphicon-search:before{content:"\e003"}.glyphicon-heart:before{content:"\e005"}.glyphicon-star:before{content:"\e006"}.glyphicon-star-empty:before{content:"\e007"}.glyphicon-user:before{content:"\e008"}.glyphicon-film:before{content:"\e009"}.glyphicon-th-large:before{content:"\e010"}.glyphicon-th:before{content:"\e011"}.glyphicon-th-list:before{content:"\e012"}.glyphicon-ok:before{content:"\e013"}.glyphicon-remove:before{content:"\e014"}.glyphicon-zoom-in:before{content:"\e015"}.glyphicon-zoom-out:before{content:"\e016"}.glyphicon-off:before{content:"\e017"}.glyphicon-signal:before{content:"\e018"}.glyphicon-cog:before{content:"\e019"}.glyphicon-trash:before{content:"\e020"}.glyphicon-home:before{content:"\e021"}.glyphicon-file:before{content:"\e022"}.glyphicon-time:before{content:"\e023"}.glyphicon-road:before{content:"\e024"}.glyphicon-download-alt:before{content:"\e025"}.glyphicon-download:before{content:"\e026"}.glyphicon-upload:before{content:"\e027"}.glyphicon-inbox:before{content:"\e028"}.glyphicon-play-circle:before{content:"\e029"}.glyphicon-repeat:before{content:"\e030"}.glyphicon-refresh:before{content:"\e031"}.glyphicon-list-alt:before{content:"\e032"}.glyphicon-lock:before{content:"\e033"}.glyphicon-flag:before{content:"\e034"}.glyphicon-headphones:before{content:"\e035"}.glyphicon-volume-off:before{content:"\e036"}.glyphicon-volume-down:before{content:"\e037"}.glyphicon-volume-up:before{content:"\e038"}.glyphicon-qrcode:before{content:"\e039"}.glyphicon-barcode:before{content:"\e040"}.glyphicon-tag:before{content:"\e041"}.glyphicon-tags:before{content:"\e042"}.glyphicon-book:before{content:"\e043"}.glyphicon-bookmark:before{content:"\e044"}.glyphicon-print:before{content:"\e045"}.glyphicon-camera:before{content:"\e046"}.glyphicon-font:before{content:"\e047"}.glyphicon-bold:before{content:"\e048"}.glyphicon-italic:before{content:"\e049"}.glyphicon-text-height:before{content:"\e050"}.glyphicon-text-width:before{content:"\e051"}.glyphicon-align-left:before{content:"\e052"}.glyphicon-align-center:before{content:"\e053"}.glyphicon-align-right:before{content:"\e054"}.glyphicon-align-justify:before{content:"\e055"}.glyphicon-list:before{content:"\e056"}.glyphicon-indent-left:before{content:"\e057"}.glyphicon-indent-right:before{content:"\e058"}.glyphicon-facetime-video:before{content:"\e059"}.glyphicon-picture:before{content:"\e060"}.glyphicon-map-marker:before{content:"\e062"}.glyphicon-adjust:before{content:"\e063"}.glyphicon-tint:before{content:"\e064"}.glyphicon-edit:before{content:"\e065"}.glyphicon-share:before{content:"\e066"}.glyphicon-check:before{content:"\e067"}.glyphicon-move:before{content:"\e068"}.glyphicon-step-backward:before{content:"\e069"}.glyphicon-fast-backward:before{content:"\e070"}.glyphicon-backward:before{content:"\e071"}.glyphicon-play:before{content:"\e072"}.glyphicon-pause:before{content:"\e073"}.glyphicon-stop:before{content:"\e074"}.glyphicon-forward:before{content:"\e075"}.glyphicon-fast-forward:before{content:"\e076"}.glyphicon-step-forward:before{content:"\e077"}.glyphicon-eject:before{content:"\e078"}.glyphicon-chevron-left:before{content:"\e079"}.glyphicon-chevron-right:before{content:"\e080"}.glyphicon-plus-sign:before{content:"\e081"}.glyphicon-minus-sign:before{content:"\e082"}.glyphicon-remove-sign:before{content:"\e083"}.glyphicon-ok-sign:before{content:"\e084"}.glyphicon-question-sign:before{content:"\e085"}.glyphicon-info-sign:before{content:"\e086"}.glyphicon-screenshot:before{content:"\e087"}.glyphicon-remove-circle:before{content:"\e088"}.glyphicon-ok-circle:before{content:"\e089"}.glyphicon-ban-circle:before{content:"\e090"}.glyphicon-arrow-left:before{content:"\e091"}.glyphicon-arrow-right:before{content:"\e092"}.glyphicon-arrow-up:before{content:"\e093"}.glyphicon-arrow-down:before{content:"\e094"}.glyphicon-share-alt:before{content:"\e095"}.glyphicon-resize-full:before{content:"\e096"}.glyphicon-resize-small:before{content:"\e097"}.glyphicon-exclamation-sign:before{content:"\e101"}.glyphicon-gift:before{content:"\e102"}.glyphicon-leaf:before{content:"\e103"}.glyphicon-fire:before{content:"\e104"}.glyphicon-eye-open:before{content:"\e105"}.glyphicon-eye-close:before{content:"\e106"}.glyphicon-warning-sign:before{content:"\e107"}.glyphicon-plane:before{content:"\e108"}.glyphicon-calendar:before{content:"\e109"}.glyphicon-random:before{content:"\e110"}.glyphicon-comment:before{content:"\e111"}.glyphicon-magnet:before{content:"\e112"}.glyphicon-chevron-up:before{content:"\e113"}.glyphicon-chevron-down:before{content:"\e114"}.glyphicon-retweet:before{content:"\e115"}.glyphicon-shopping-cart:before{content:"\e116"}.glyphicon-folder-close:before{content:"\e117"}.glyphicon-folder-open:before{content:"\e118"}.glyphicon-resize-vertical:before{content:"\e119"}.glyphicon-resize-horizontal:before{content:"\e120"}.glyphicon-hdd:before{content:"\e121"}.glyphicon-bullhorn:before{content:"\e122"}.glyphicon-bell:before{content:"\e123"}.glyphicon-certificate:before{content:"\e124"}.glyphicon-thumbs-up:before{content:"\e125"}.glyphicon-thumbs-down:before{content:"\e126"}.glyphicon-hand-right:before{content:"\e127"}.glyphicon-hand-left:before{content:"\e128"}.glyphicon-hand-up:before{content:"\e129"}.glyphicon-hand-down:before{content:"\e130"}.glyphicon-circle-arrow-right:before{content:"\e131"}.glyphicon-circle-arrow-left:before{content:"\e132"}.glyphicon-circle-arrow-up:before{content:"\e133"}.glyphicon-circle-arrow-down:before{content:"\e134"}.glyphicon-globe:before{content:"\e135"}.glyphicon-wrench:before{content:"\e136"}.glyphicon-tasks:before{content:"\e137"}.glyphicon-filter:before{content:"\e138"}.glyphicon-briefcase:before{content:"\e139"}.glyphicon-fullscreen:before{content:"\e140"}.glyphicon-dashboard:before{content:"\e141"}.glyphicon-paperclip:before{content:"\e142"}.glyphicon-heart-empty:before{content:"\e143"}.glyphicon-link:before{content:"\e144"}.glyphicon-phone:before{content:"\e145"}.glyphicon-pushpin:before{content:"\e146"}.glyphicon-usd:before{content:"\e148"}.glyphicon-gbp:before{content:"\e149"}.glyphicon-sort:before{content:"\e150"}.glyphicon-sort-by-alphabet:before{content:"\e151"}.glyphicon-sort-by-alphabet-alt:before{content:"\e152"}.glyphicon-sort-by-order:before{content:"\e153"}.glyphicon-sort-by-order-alt:before{content:"\e154"}.glyphicon-sort-by-attributes:before{content:"\e155"}.glyphicon-sort-by-attributes-alt:before{content:"\e156"}.glyphicon-unchecked:before{content:"\e157"}.glyphicon-expand:before{content:"\e158"}.glyphicon-collapse-down:before{content:"\e159"}.glyphicon-collapse-up:before{content:"\e160"}.glyphicon-log-in:before{content:"\e161"}.glyphicon-flash:before{content:"\e162"}.glyphicon-log-out:before{content:"\e163"}.glyphicon-new-window:before{content:"\e164"}.glyphicon-record:before{content:"\e165"}.glyphicon-save:before{content:"\e166"}.glyphicon-open:before{content:"\e167"}.glyphicon-saved:before{content:"\e168"}.glyphicon-import:before{content:"\e169"}.glyphicon-export:before{content:"\e170"}.glyphicon-send:before{content:"\e171"}.glyphicon-floppy-disk:before{content:"\e172"}.glyphicon-floppy-saved:before{content:"\e173"}.glyphicon-floppy-remove:before{content:"\e174"}.glyphicon-floppy-save:before{content:"\e175"}.glyphicon-floppy-open:before{content:"\e176"}.glyphicon-credit-card:before{content:"\e177"}.glyphicon-transfer:before{content:"\e178"}.glyphicon-cutlery:before{content:"\e179"}.glyphicon-header:before{content:"\e180"}.glyphicon-compressed:before{content:"\e181"}.glyphicon-earphone:before{content:"\e182"}.glyphicon-phone-alt:before{content:"\e183"}.glyphicon-tower:before{content:"\e184"}.glyphicon-stats:before{content:"\e185"}.glyphicon-sd-video:before{content:"\e186"}.glyphicon-hd-video:before{content:"\e187"}.glyphicon-subtitles:before{content:"\e188"}.glyphicon-sound-stereo:before{content:"\e189"}.glyphicon-sound-dolby:before{content:"\e190"}.glyphicon-sound-5-1:before{content:"\e191"}.glyphicon-sound-6-1:before{content:"\e192"}.glyphicon-sound-7-1:before{content:"\e193"}.glyphicon-copyright-mark:before{content:"\e194"}.glyphicon-registration-mark:before{content:"\e195"}.glyphicon-cloud-download:before{content:"\e197"}.glyphicon-cloud-upload:before{content:"\e198"}.glyphicon-tree-conifer:before{content:"\e199"}.glyphicon-tree-deciduous:before{content:"\e200"}.glyphicon-cd:before{content:"\e201"}.glyphicon-save-file:before{content:"\e202"}.glyphicon-open-file:before{content:"\e203"}.glyphicon-level-up:before{content:"\e204"}.glyphicon-copy:before{content:"\e205"}.glyphicon-paste:before{content:"\e206"}.glyphicon-alert:before{content:"\e209"}.glyphicon-equalizer:before{content:"\e210"}.glyphicon-king:before{content:"\e211"}.glyphicon-queen:before{content:"\e212"}.glyphicon-pawn:before{content:"\e213"}.glyphicon-bishop:before{content:"\e214"}.glyphicon-knight:before{content:"\e215"}.glyphicon-baby-formula:before{content:"\e216"}.glyphicon-tent:before{content:"\26fa"}.glyphicon-blackboard:before{content:"\e218"}.glyphicon-bed:before{content:"\e219"}.glyphicon-apple:before{content:"\f8ff"}.glyphicon-erase:before{content:"\e221"}.glyphicon-hourglass:before{content:"\231b"}.glyphicon-lamp:before{content:"\e223"}.glyphicon-duplicate:before{content:"\e224"}.glyphicon-piggy-bank:before{content:"\e225"}.glyphicon-scissors:before{content:"\e226"}.glyphicon-bitcoin:before{content:"\e227"}.glyphicon-btc:before{content:"\e227"}.glyphicon-xbt:before{content:"\e227"}.glyphicon-yen:before{content:"\00a5"}.glyphicon-jpy:before{content:"\00a5"}.glyphicon-ruble:before{content:"\20bd"}.glyphicon-rub:before{content:"\20bd"}.glyphicon-scale:before{content:"\e230"}.glyphicon-ice-lolly:before{content:"\e231"}.glyphicon-ice-lolly-tasted:before{content:"\e232"}.glyphicon-education:before{content:"\e233"}.glyphicon-option-horizontal:before{content:"\e234"}.glyphicon-option-vertical:before{content:"\e235"}.glyphicon-menu-hamburger:before{content:"\e236"}.glyphicon-modal-window:before{content:"\e237"}.glyphicon-oil:before{content:"\e238"}.glyphicon-grain:before{content:"\e239"}.glyphicon-sunglasses:before{content:"\e240"}.glyphicon-text-size:before{content:"\e241"}.glyphicon-text-color:before{content:"\e242"}.glyphicon-text-background:before{content:"\e243"}.glyphicon-object-align-top:before{content:"\e244"}.glyphicon-object-align-bottom:before{content:"\e245"}.glyphicon-object-align-horizontal:before{content:"\e246"}.glyphicon-object-align-left:before{content:"\e247"}.glyphicon-object-align-vertical:before{content:"\e248"}.glyphicon-object-align-right:before{content:"\e249"}.glyphicon-triangle-right:before{content:"\e250"}.glyphicon-triangle-left:before{content:"\e251"}.glyphicon-triangle-bottom:before{content:"\e252"}.glyphicon-triangle-top:before{content:"\e253"}.glyphicon-console:before{content:"\e254"}.glyphicon-superscript:before{content:"\e255"}.glyphicon-subscript:before{content:"\e256"}.glyphicon-menu-left:before{content:"\e257"}.glyphicon-menu-right:before{content:"\e258"}.glyphicon-menu-down:before{content:"\e259"}.glyphicon-menu-up:before{content:"\e260"}*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}:after,:before{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}html{font-size:10px;-webkit-tap-highlight-color:rgba(0,0,0,0)}body{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:1.42857143;color:#333;background-color:#fff}button,input,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit}a{color:#337ab7;text-decoration:none}a:focus,a:hover{color:#23527c;text-decoration:underline}a:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}figure{margin:0}img{vertical-align:middle}.carousel-inner>.item>a>img,.carousel-inner>.item>img,.img-responsive,.thumbnail a>img,.thumbnail>img{display:block;max-width:100%;height:auto}.img-rounded{border-radius:6px}.img-thumbnail{display:inline-block;max-width:100%;height:auto;padding:4px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.img-circle{border-radius:50%}hr{margin-top:20px;margin-bottom:20px;border:0;border-top:1px solid #eee}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}[role=button]{cursor:pointer}.h1,.h2,.h3,.h4,.h5,.h6,h1,h2,h3,h4,h5,h6{font-family:inherit;font-weight:500;line-height:1.1;color:inherit}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-weight:400;line-height:1;color:#777}.h1,.h2,.h3,h1,h2,h3{margin-top:20px;margin-bottom:10px}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small{font-size:65%}.h4,.h5,.h6,h4,h5,h6{margin-top:10px;margin-bottom:10px}.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-size:75%}.h1,h1{font-size:36px}.h2,h2{font-size:30px}.h3,h3{font-size:24px}.h4,h4{font-size:18px}.h5,h5{font-size:14px}.h6,h6{font-size:12px}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:16px;font-weight:300;line-height:1.4}@media (min-width:768px){.lead{font-size:21px}}.small,small{font-size:85%}.mark,mark{padding:.2em;background-color:#fcf8e3}.text-left{text-align:left}.text-right{text-align:right}.text-center{text-align:center}.text-justify{text-align:justify}.text-nowrap{white-space:nowrap}.text-lowercase{text-transform:lowercase}.text-uppercase{text-transform:uppercase}.text-capitalize{text-transform:capitalize}.text-muted{color:#777}.text-primary{color:#337ab7}a.text-primary:focus,a.text-primary:hover{color:#286090}.text-success{color:#3c763d}a.text-success:focus,a.text-success:hover{color:#2b542c}.text-info{color:#31708f}a.text-info:focus,a.text-info:hover{color:#245269}.text-warning{color:#8a6d3b}a.text-warning:focus,a.text-warning:hover{color:#66512c}.text-danger{color:#a94442}a.text-danger:focus,a.text-danger:hover{color:#843534}.bg-primary{color:#fff;background-color:#337ab7}a.bg-primary:focus,a.bg-primary:hover{background-color:#286090}.bg-success{background-color:#dff0d8}a.bg-success:focus,a.bg-success:hover{background-color:#c1e2b3}.bg-info{background-color:#d9edf7}a.bg-info:focus,a.bg-info:hover{background-color:#afd9ee}.bg-warning{background-color:#fcf8e3}a.bg-warning:focus,a.bg-warning:hover{background-color:#f7ecb5}.bg-danger{background-color:#f2dede}a.bg-danger:focus,a.bg-danger:hover{background-color:#e4b9b9}.page-header{padding-bottom:9px;margin:40px 0 20px;border-bottom:1px solid #eee}ol,ul{margin-top:0;margin-bottom:10px}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}.list-unstyled{padding-left:0;list-style:none}.list-inline{padding-left:0;margin-left:-5px;list-style:none}.list-inline>li{display:inline-block;padding-right:5px;padding-left:5px}dl{margin-top:0;margin-bottom:20px}dd,dt{line-height:1.42857143}dt{font-weight:700}dd{margin-left:0}@media (min-width:768px){.dl-horizontal dt{float:left;width:160px;overflow:hidden;clear:left;text-align:right;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:180px}}abbr[data-original-title],abbr[title]{cursor:help;border-bottom:1px dotted #777}.initialism{font-size:90%;text-transform:uppercase}blockquote{padding:10px 20px;margin:0 0 20px;font-size:17.5px;border-left:5px solid #eee}blockquote ol:last-child,blockquote p:last-child,blockquote ul:last-child{margin-bottom:0}blockquote .small,blockquote footer,blockquote small{display:block;font-size:80%;line-height:1.42857143;color:#777}blockquote .small:before,blockquote footer:before,blockquote small:before{content:'\2014 \00A0'}.blockquote-reverse,blockquote.pull-right{padding-right:15px;padding-left:0;text-align:right;border-right:5px solid #eee;border-left:0}.blockquote-reverse .small:before,.blockquote-reverse footer:before,.blockquote-reverse small:before,blockquote.pull-right .small:before,blockquote.pull-right footer:before,blockquote.pull-right small:before{content:''}.blockquote-reverse .small:after,.blockquote-reverse footer:after,.blockquote-reverse small:after,blockquote.pull-right .small:after,blockquote.pull-right footer:after,blockquote.pull-right small:after{content:'\00A0 \2014'}address{margin-bottom:20px;font-style:normal;line-height:1.42857143}code,kbd,pre,samp{font-family:Menlo,Monaco,Consolas,"Courier New",monospace}code{padding:2px 4px;font-size:90%;color:#c7254e;background-color:#f9f2f4;border-radius:4px}kbd{padding:2px 4px;font-size:90%;color:#fff;background-color:#333;border-radius:3px;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.25);box-shadow:inset 0 -1px 0 rgba(0,0,0,.25)}kbd kbd{padding:0;font-size:100%;font-weight:700;-webkit-box-shadow:none;box-shadow:none}pre{display:block;padding:9.5px;margin:0 0 10px;font-size:13px;line-height:1.42857143;color:#333;word-break:break-all;word-wrap:break-word;background-color:#f5f5f5;border:1px solid #ccc;border-radius:4px}pre code{padding:0;font-size:inherit;color:inherit;white-space:pre-wrap;background-color:transparent;border-radius:0}.pre-scrollable{max-height:340px;overflow-y:scroll}.container{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}@media (min-width:768px){.container{width:750px}}@media (min-width:992px){.container{width:970px}}@media (min-width:1200px){.container{width:1170px}}.container-fluid{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}.row{margin-right:-15px;margin-left:-15px}.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9{position:relative;min-height:1px;padding-right:15px;padding-left:15px}.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9{float:left}.col-xs-12{width:100%}.col-xs-11{width:91.66666667%}.col-xs-10{width:83.33333333%}.col-xs-9{width:75%}.col-xs-8{width:66.66666667%}.col-xs-7{width:58.33333333%}.col-xs-6{width:50%}.col-xs-5{width:41.66666667%}.col-xs-4{width:33.33333333%}.col-xs-3{width:25%}.col-xs-2{width:16.66666667%}.col-xs-1{width:8.33333333%}.col-xs-pull-12{right:100%}.col-xs-pull-11{right:91.66666667%}.col-xs-pull-10{right:83.33333333%}.col-xs-pull-9{right:75%}.col-xs-pull-8{right:66.66666667%}.col-xs-pull-7{right:58.33333333%}.col-xs-pull-6{right:50%}.col-xs-pull-5{right:41.66666667%}.col-xs-pull-4{right:33.33333333%}.col-xs-pull-3{right:25%}.col-xs-pull-2{right:16.66666667%}.col-xs-pull-1{right:8.33333333%}.col-xs-pull-0{right:auto}.col-xs-push-12{left:100%}.col-xs-push-11{left:91.66666667%}.col-xs-push-10{left:83.33333333%}.col-xs-push-9{left:75%}.col-xs-push-8{left:66.66666667%}.col-xs-push-7{left:58.33333333%}.col-xs-push-6{left:50%}.col-xs-push-5{left:41.66666667%}.col-xs-push-4{left:33.33333333%}.col-xs-push-3{left:25%}.col-xs-push-2{left:16.66666667%}.col-xs-push-1{left:8.33333333%}.col-xs-push-0{left:auto}.col-xs-offset-12{margin-left:100%}.col-xs-offset-11{margin-left:91.66666667%}.col-xs-offset-10{margin-left:83.33333333%}.col-xs-offset-9{margin-left:75%}.col-xs-offset-8{margin-left:66.66666667%}.col-xs-offset-7{margin-left:58.33333333%}.col-xs-offset-6{margin-left:50%}.col-xs-offset-5{margin-left:41.66666667%}.col-xs-offset-4{margin-left:33.33333333%}.col-xs-offset-3{margin-left:25%}.col-xs-offset-2{margin-left:16.66666667%}.col-xs-offset-1{margin-left:8.33333333%}.col-xs-offset-0{margin-left:0}@media (min-width:768px){.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9{float:left}.col-sm-12{width:100%}.col-sm-11{width:91.66666667%}.col-sm-10{width:83.33333333%}.col-sm-9{width:75%}.col-sm-8{width:66.66666667%}.col-sm-7{width:58.33333333%}.col-sm-6{width:50%}.col-sm-5{width:41.66666667%}.col-sm-4{width:33.33333333%}.col-sm-3{width:25%}.col-sm-2{width:16.66666667%}.col-sm-1{width:8.33333333%}.col-sm-pull-12{right:100%}.col-sm-pull-11{right:91.66666667%}.col-sm-pull-10{right:83.33333333%}.col-sm-pull-9{right:75%}.col-sm-pull-8{right:66.66666667%}.col-sm-pull-7{right:58.33333333%}.col-sm-pull-6{right:50%}.col-sm-pull-5{right:41.66666667%}.col-sm-pull-4{right:33.33333333%}.col-sm-pull-3{right:25%}.col-sm-pull-2{right:16.66666667%}.col-sm-pull-1{right:8.33333333%}.col-sm-pull-0{right:auto}.col-sm-push-12{left:100%}.col-sm-push-11{left:91.66666667%}.col-sm-push-10{left:83.33333333%}.col-sm-push-9{left:75%}.col-sm-push-8{left:66.66666667%}.col-sm-push-7{left:58.33333333%}.col-sm-push-6{left:50%}.col-sm-push-5{left:41.66666667%}.col-sm-push-4{left:33.33333333%}.col-sm-push-3{left:25%}.col-sm-push-2{left:16.66666667%}.col-sm-push-1{left:8.33333333%}.col-sm-push-0{left:auto}.col-sm-offset-12{margin-left:100%}.col-sm-offset-11{margin-left:91.66666667%}.col-sm-offset-10{margin-left:83.33333333%}.col-sm-offset-9{margin-left:75%}.col-sm-offset-8{margin-left:66.66666667%}.col-sm-offset-7{margin-left:58.33333333%}.col-sm-offset-6{margin-left:50%}.col-sm-offset-5{margin-left:41.66666667%}.col-sm-offset-4{margin-left:33.33333333%}.col-sm-offset-3{margin-left:25%}.col-sm-offset-2{margin-left:16.66666667%}.col-sm-offset-1{margin-left:8.33333333%}.col-sm-offset-0{margin-left:0}}@media (min-width:992px){.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9{float:left}.col-md-12{width:100%}.col-md-11{width:91.66666667%}.col-md-10{width:83.33333333%}.col-md-9{width:75%}.col-md-8{width:66.66666667%}.col-md-7{width:58.33333333%}.col-md-6{width:50%}.col-md-5{width:41.66666667%}.col-md-4{width:33.33333333%}.col-md-3{width:25%}.col-md-2{width:16.66666667%}.col-md-1{width:8.33333333%}.col-md-pull-12{right:100%}.col-md-pull-11{right:91.66666667%}.col-md-pull-10{right:83.33333333%}.col-md-pull-9{right:75%}.col-md-pull-8{right:66.66666667%}.col-md-pull-7{right:58.33333333%}.col-md-pull-6{right:50%}.col-md-pull-5{right:41.66666667%}.col-md-pull-4{right:33.33333333%}.col-md-pull-3{right:25%}.col-md-pull-2{right:16.66666667%}.col-md-pull-1{right:8.33333333%}.col-md-pull-0{right:auto}.col-md-push-12{left:100%}.col-md-push-11{left:91.66666667%}.col-md-push-10{left:83.33333333%}.col-md-push-9{left:75%}.col-md-push-8{left:66.66666667%}.col-md-push-7{left:58.33333333%}.col-md-push-6{left:50%}.col-md-push-5{left:41.66666667%}.col-md-push-4{left:33.33333333%}.col-md-push-3{left:25%}.col-md-push-2{left:16.66666667%}.col-md-push-1{left:8.33333333%}.col-md-push-0{left:auto}.col-md-offset-12{margin-left:100%}.col-md-offset-11{margin-left:91.66666667%}.col-md-offset-10{margin-left:83.33333333%}.col-md-offset-9{margin-left:75%}.col-md-offset-8{margin-left:66.66666667%}.col-md-offset-7{margin-left:58.33333333%}.col-md-offset-6{margin-left:50%}.col-md-offset-5{margin-left:41.66666667%}.col-md-offset-4{margin-left:33.33333333%}.col-md-offset-3{margin-left:25%}.col-md-offset-2{margin-left:16.66666667%}.col-md-offset-1{margin-left:8.33333333%}.col-md-offset-0{margin-left:0}}@media (min-width:1200px){.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9{float:left}.col-lg-12{width:100%}.col-lg-11{width:91.66666667%}.col-lg-10{width:83.33333333%}.col-lg-9{width:75%}.col-lg-8{width:66.66666667%}.col-lg-7{width:58.33333333%}.col-lg-6{width:50%}.col-lg-5{width:41.66666667%}.col-lg-4{width:33.33333333%}.col-lg-3{width:25%}.col-lg-2{width:16.66666667%}.col-lg-1{width:8.33333333%}.col-lg-pull-12{right:100%}.col-lg-pull-11{right:91.66666667%}.col-lg-pull-10{right:83.33333333%}.col-lg-pull-9{right:75%}.col-lg-pull-8{right:66.66666667%}.col-lg-pull-7{right:58.33333333%}.col-lg-pull-6{right:50%}.col-lg-pull-5{right:41.66666667%}.col-lg-pull-4{right:33.33333333%}.col-lg-pull-3{right:25%}.col-lg-pull-2{right:16.66666667%}.col-lg-pull-1{right:8.33333333%}.col-lg-pull-0{right:auto}.col-lg-push-12{left:100%}.col-lg-push-11{left:91.66666667%}.col-lg-push-10{left:83.33333333%}.col-lg-push-9{left:75%}.col-lg-push-8{left:66.66666667%}.col-lg-push-7{left:58.33333333%}.col-lg-push-6{left:50%}.col-lg-push-5{left:41.66666667%}.col-lg-push-4{left:33.33333333%}.col-lg-push-3{left:25%}.col-lg-push-2{left:16.66666667%}.col-lg-push-1{left:8.33333333%}.col-lg-push-0{left:auto}.col-lg-offset-12{margin-left:100%}.col-lg-offset-11{margin-left:91.66666667%}.col-lg-offset-10{margin-left:83.33333333%}.col-lg-offset-9{margin-left:75%}.col-lg-offset-8{margin-left:66.66666667%}.col-lg-offset-7{margin-left:58.33333333%}.col-lg-offset-6{margin-left:50%}.col-lg-offset-5{margin-left:41.66666667%}.col-lg-offset-4{margin-left:33.33333333%}.col-lg-offset-3{margin-left:25%}.col-lg-offset-2{margin-left:16.66666667%}.col-lg-offset-1{margin-left:8.33333333%}.col-lg-offset-0{margin-left:0}}table{background-color:transparent}caption{padding-top:8px;padding-bottom:8px;color:#777;text-align:left}th{text-align:left}.table{width:100%;max-width:100%;margin-bottom:20px}.table>tbody>tr>td,.table>tbody>tr>th,.table>tfoot>tr>td,.table>tfoot>tr>th,.table>thead>tr>td,.table>thead>tr>th{padding:8px;line-height:1.42857143;vertical-align:top;border-top:1px solid #ddd}.table>thead>tr>th{vertical-align:bottom;border-bottom:2px solid #ddd}.table>caption+thead>tr:first-child>td,.table>caption+thead>tr:first-child>th,.table>colgroup+thead>tr:first-child>td,.table>colgroup+thead>tr:first-child>th,.table>thead:first-child>tr:first-child>td,.table>thead:first-child>tr:first-child>th{border-top:0}.table>tbody+tbody{border-top:2px solid #ddd}.table .table{background-color:#fff}.table-condensed>tbody>tr>td,.table-condensed>tbody>tr>th,.table-condensed>tfoot>tr>td,.table-condensed>tfoot>tr>th,.table-condensed>thead>tr>td,.table-condensed>thead>tr>th{padding:5px}.table-bordered{border:1px solid #ddd}.table-bordered>tbody>tr>td,.table-bordered>tbody>tr>th,.table-bordered>tfoot>tr>td,.table-bordered>tfoot>tr>th,.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border:1px solid #ddd}.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border-bottom-width:2px}.table-striped>tbody>tr:nth-of-type(odd){background-color:#f9f9f9}.table-hover>tbody>tr:hover{background-color:#f5f5f5}table col[class*=col-]{position:static;display:table-column;float:none}table td[class*=col-],table th[class*=col-]{position:static;display:table-cell;float:none}.table>tbody>tr.active>td,.table>tbody>tr.active>th,.table>tbody>tr>td.active,.table>tbody>tr>th.active,.table>tfoot>tr.active>td,.table>tfoot>tr.active>th,.table>tfoot>tr>td.active,.table>tfoot>tr>th.active,.table>thead>tr.active>td,.table>thead>tr.active>th,.table>thead>tr>td.active,.table>thead>tr>th.active{background-color:#f5f5f5}.table-hover>tbody>tr.active:hover>td,.table-hover>tbody>tr.active:hover>th,.table-hover>tbody>tr:hover>.active,.table-hover>tbody>tr>td.active:hover,.table-hover>tbody>tr>th.active:hover{background-color:#e8e8e8}.table>tbody>tr.success>td,.table>tbody>tr.success>th,.table>tbody>tr>td.success,.table>tbody>tr>th.success,.table>tfoot>tr.success>td,.table>tfoot>tr.success>th,.table>tfoot>tr>td.success,.table>tfoot>tr>th.success,.table>thead>tr.success>td,.table>thead>tr.success>th,.table>thead>tr>td.success,.table>thead>tr>th.success{background-color:#dff0d8}.table-hover>tbody>tr.success:hover>td,.table-hover>tbody>tr.success:hover>th,.table-hover>tbody>tr:hover>.success,.table-hover>tbody>tr>td.success:hover,.table-hover>tbody>tr>th.success:hover{background-color:#d0e9c6}.table>tbody>tr.info>td,.table>tbody>tr.info>th,.table>tbody>tr>td.info,.table>tbody>tr>th.info,.table>tfoot>tr.info>td,.table>tfoot>tr.info>th,.table>tfoot>tr>td.info,.table>tfoot>tr>th.info,.table>thead>tr.info>td,.table>thead>tr.info>th,.table>thead>tr>td.info,.table>thead>tr>th.info{background-color:#d9edf7}.table-hover>tbody>tr.info:hover>td,.table-hover>tbody>tr.info:hover>th,.table-hover>tbody>tr:hover>.info,.table-hover>tbody>tr>td.info:hover,.table-hover>tbody>tr>th.info:hover{background-color:#c4e3f3}.table>tbody>tr.warning>td,.table>tbody>tr.warning>th,.table>tbody>tr>td.warning,.table>tbody>tr>th.warning,.table>tfoot>tr.warning>td,.table>tfoot>tr.warning>th,.table>tfoot>tr>td.warning,.table>tfoot>tr>th.warning,.table>thead>tr.warning>td,.table>thead>tr.warning>th,.table>thead>tr>td.warning,.table>thead>tr>th.warning{background-color:#fcf8e3}.table-hover>tbody>tr.warning:hover>td,.table-hover>tbody>tr.warning:hover>th,.table-hover>tbody>tr:hover>.warning,.table-hover>tbody>tr>td.warning:hover,.table-hover>tbody>tr>th.warning:hover{background-color:#faf2cc}.table>tbody>tr.danger>td,.table>tbody>tr.danger>th,.table>tbody>tr>td.danger,.table>tbody>tr>th.danger,.table>tfoot>tr.danger>td,.table>tfoot>tr.danger>th,.table>tfoot>tr>td.danger,.table>tfoot>tr>th.danger,.table>thead>tr.danger>td,.table>thead>tr.danger>th,.table>thead>tr>td.danger,.table>thead>tr>th.danger{background-color:#f2dede}.table-hover>tbody>tr.danger:hover>td,.table-hover>tbody>tr.danger:hover>th,.table-hover>tbody>tr:hover>.danger,.table-hover>tbody>tr>td.danger:hover,.table-hover>tbody>tr>th.danger:hover{background-color:#ebcccc}.table-responsive{min-height:.01%;overflow-x:auto}@media screen and (max-width:767px){.table-responsive{width:100%;margin-bottom:15px;overflow-y:hidden;-ms-overflow-style:-ms-autohiding-scrollbar;border:1px solid #ddd}.table-responsive>.table{margin-bottom:0}.table-responsive>.table>tbody>tr>td,.table-responsive>.table>tbody>tr>th,.table-responsive>.table>tfoot>tr>td,.table-responsive>.table>tfoot>tr>th,.table-responsive>.table>thead>tr>td,.table-responsive>.table>thead>tr>th{white-space:nowrap}.table-responsive>.table-bordered{border:0}.table-responsive>.table-bordered>tbody>tr>td:first-child,.table-responsive>.table-bordered>tbody>tr>th:first-child,.table-responsive>.table-bordered>tfoot>tr>td:first-child,.table-responsive>.table-bordered>tfoot>tr>th:first-child,.table-responsive>.table-bordered>thead>tr>td:first-child,.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.table-responsive>.table-bordered>tbody>tr>td:last-child,.table-responsive>.table-bordered>tbody>tr>th:last-child,.table-responsive>.table-bordered>tfoot>tr>td:last-child,.table-responsive>.table-bordered>tfoot>tr>th:last-child,.table-responsive>.table-bordered>thead>tr>td:last-child,.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.table-responsive>.table-bordered>tbody>tr:last-child>td,.table-responsive>.table-bordered>tbody>tr:last-child>th,.table-responsive>.table-bordered>tfoot>tr:last-child>td,.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}}fieldset{min-width:0;padding:0;margin:0;border:0}legend{display:block;width:100%;padding:0;margin-bottom:20px;font-size:21px;line-height:inherit;color:#333;border:0;border-bottom:1px solid #e5e5e5}label{display:inline-block;max-width:100%;margin-bottom:5px;font-weight:700}input[type=search]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}input[type=checkbox],input[type=radio]{margin:4px 0 0;margin-top:1px\9;line-height:normal}input[type=file]{display:block}input[type=range]{display:block;width:100%}select[multiple],select[size]{height:auto}input[type=file]:focus,input[type=checkbox]:focus,input[type=radio]:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}output{display:block;padding-top:7px;font-size:14px;line-height:1.42857143;color:#555}.form-control{display:block;width:100%;height:34px;padding:6px 12px;font-size:14px;line-height:1.42857143;color:#555;background-color:#fff;background-image:none;border:1px solid #ccc;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075);-webkit-transition:border-color ease-in-out .15s,-webkit-box-shadow ease-in-out .15s;-o-transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s}.form-control:focus{border-color:#66afe9;outline:0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}.form-control::-moz-placeholder{color:#999;opacity:1}.form-control:-ms-input-placeholder{color:#999}.form-control::-webkit-input-placeholder{color:#999}.form-control::-ms-expand{background-color:transparent;border:0}.form-control[disabled],.form-control[readonly],fieldset[disabled] .form-control{background-color:#eee;opacity:1}.form-control[disabled],fieldset[disabled] .form-control{cursor:not-allowed}textarea.form-control{height:auto}input[type=search]{-webkit-appearance:none}@media screen and (-webkit-min-device-pixel-ratio:0){input[type=date].form-control,input[type=time].form-control,input[type=datetime-local].form-control,input[type=month].form-control{line-height:34px}.input-group-sm input[type=date],.input-group-sm input[type=time],.input-group-sm input[type=datetime-local],.input-group-sm input[type=month],input[type=date].input-sm,input[type=time].input-sm,input[type=datetime-local].input-sm,input[type=month].input-sm{line-height:30px}.input-group-lg input[type=date],.input-group-lg input[type=time],.input-group-lg input[type=datetime-local],.input-group-lg input[type=month],input[type=date].input-lg,input[type=time].input-lg,input[type=datetime-local].input-lg,input[type=month].input-lg{line-height:46px}}.form-group{margin-bottom:15px}.checkbox,.radio{position:relative;display:block;margin-top:10px;margin-bottom:10px}.checkbox label,.radio label{min-height:20px;padding-left:20px;margin-bottom:0;font-weight:400;cursor:pointer}.checkbox input[type=checkbox],.checkbox-inline input[type=checkbox],.radio input[type=radio],.radio-inline input[type=radio]{position:absolute;margin-top:4px\9;margin-left:-20px}.checkbox+.checkbox,.radio+.radio{margin-top:-5px}.checkbox-inline,.radio-inline{position:relative;display:inline-block;padding-left:20px;margin-bottom:0;font-weight:400;vertical-align:middle;cursor:pointer}.checkbox-inline+.checkbox-inline,.radio-inline+.radio-inline{margin-top:0;margin-left:10px}fieldset[disabled] input[type=checkbox],fieldset[disabled] input[type=radio],input[type=checkbox].disabled,input[type=checkbox][disabled],input[type=radio].disabled,input[type=radio][disabled]{cursor:not-allowed}.checkbox-inline.disabled,.radio-inline.disabled,fieldset[disabled] .checkbox-inline,fieldset[disabled] .radio-inline{cursor:not-allowed}.checkbox.disabled label,.radio.disabled label,fieldset[disabled] .checkbox label,fieldset[disabled] .radio label{cursor:not-allowed}.form-control-static{min-height:34px;padding-top:7px;padding-bottom:7px;margin-bottom:0}.form-control-static.input-lg,.form-control-static.input-sm{padding-right:0;padding-left:0}.input-sm{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-sm{height:30px;line-height:30px}select[multiple].input-sm,textarea.input-sm{height:auto}.form-group-sm .form-control{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.form-group-sm select.form-control{height:30px;line-height:30px}.form-group-sm select[multiple].form-control,.form-group-sm textarea.form-control{height:auto}.form-group-sm .form-control-static{height:30px;min-height:32px;padding:6px 10px;font-size:12px;line-height:1.5}.input-lg{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}select.input-lg{height:46px;line-height:46px}select[multiple].input-lg,textarea.input-lg{height:auto}.form-group-lg .form-control{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}.form-group-lg select.form-control{height:46px;line-height:46px}.form-group-lg select[multiple].form-control,.form-group-lg textarea.form-control{height:auto}.form-group-lg .form-control-static{height:46px;min-height:38px;padding:11px 16px;font-size:18px;line-height:1.3333333}.has-feedback{position:relative}.has-feedback .form-control{padding-right:42.5px}.form-control-feedback{position:absolute;top:0;right:0;z-index:2;display:block;width:34px;height:34px;line-height:34px;text-align:center;pointer-events:none}.form-group-lg .form-control+.form-control-feedback,.input-group-lg+.form-control-feedback,.input-lg+.form-control-feedback{width:46px;height:46px;line-height:46px}.form-group-sm .form-control+.form-control-feedback,.input-group-sm+.form-control-feedback,.input-sm+.form-control-feedback{width:30px;height:30px;line-height:30px}.has-success .checkbox,.has-success .checkbox-inline,.has-success .control-label,.has-success .help-block,.has-success .radio,.has-success .radio-inline,.has-success.checkbox label,.has-success.checkbox-inline label,.has-success.radio label,.has-success.radio-inline label{color:#3c763d}.has-success .form-control{border-color:#3c763d;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-success .form-control:focus{border-color:#2b542c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168}.has-success .input-group-addon{color:#3c763d;background-color:#dff0d8;border-color:#3c763d}.has-success .form-control-feedback{color:#3c763d}.has-warning .checkbox,.has-warning .checkbox-inline,.has-warning .control-label,.has-warning .help-block,.has-warning .radio,.has-warning .radio-inline,.has-warning.checkbox label,.has-warning.checkbox-inline label,.has-warning.radio label,.has-warning.radio-inline label{color:#8a6d3b}.has-warning .form-control{border-color:#8a6d3b;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-warning .form-control:focus{border-color:#66512c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b}.has-warning .input-group-addon{color:#8a6d3b;background-color:#fcf8e3;border-color:#8a6d3b}.has-warning .form-control-feedback{color:#8a6d3b}.has-error .checkbox,.has-error .checkbox-inline,.has-error .control-label,.has-error .help-block,.has-error .radio,.has-error .radio-inline,.has-error.checkbox label,.has-error.checkbox-inline label,.has-error.radio label,.has-error.radio-inline label{color:#a94442}.has-error .form-control{border-color:#a94442;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-error .form-control:focus{border-color:#843534;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483}.has-error .input-group-addon{color:#a94442;background-color:#f2dede;border-color:#a94442}.has-error .form-control-feedback{color:#a94442}.has-feedback label~.form-control-feedback{top:25px}.has-feedback label.sr-only~.form-control-feedback{top:0}.help-block{display:block;margin-top:5px;margin-bottom:10px;color:#737373}@media (min-width:768px){.form-inline .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.form-inline .form-control{display:inline-block;width:auto;vertical-align:middle}.form-inline .form-control-static{display:inline-block}.form-inline .input-group{display:inline-table;vertical-align:middle}.form-inline .input-group .form-control,.form-inline .input-group .input-group-addon,.form-inline .input-group .input-group-btn{width:auto}.form-inline .input-group>.form-control{width:100%}.form-inline .control-label{margin-bottom:0;vertical-align:middle}.form-inline .checkbox,.form-inline .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.form-inline .checkbox label,.form-inline .radio label{padding-left:0}.form-inline .checkbox input[type=checkbox],.form-inline .radio input[type=radio]{position:relative;margin-left:0}.form-inline .has-feedback .form-control-feedback{top:0}}.form-horizontal .checkbox,.form-horizontal .checkbox-inline,.form-horizontal .radio,.form-horizontal .radio-inline{padding-top:7px;margin-top:0;margin-bottom:0}.form-horizontal .checkbox,.form-horizontal .radio{min-height:27px}.form-horizontal .form-group{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.form-horizontal .control-label{padding-top:7px;margin-bottom:0;text-align:right}}.form-horizontal .has-feedback .form-control-feedback{right:15px}@media (min-width:768px){.form-horizontal .form-group-lg .control-label{padding-top:11px;font-size:18px}}@media (min-width:768px){.form-horizontal .form-group-sm .control-label{padding-top:6px;font-size:12px}}.btn{display:inline-block;padding:6px 12px;margin-bottom:0;font-size:14px;font-weight:400;line-height:1.42857143;text-align:center;white-space:nowrap;vertical-align:middle;-ms-touch-action:manipulation;touch-action:manipulation;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-image:none;border:1px solid transparent;border-radius:4px}.btn.active.focus,.btn.active:focus,.btn.focus,.btn:active.focus,.btn:active:focus,.btn:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.btn.focus,.btn:focus,.btn:hover{color:#333;text-decoration:none}.btn.active,.btn:active{background-image:none;outline:0;-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn.disabled,.btn[disabled],fieldset[disabled] .btn{cursor:not-allowed;filter:alpha(opacity=65);-webkit-box-shadow:none;box-shadow:none;opacity:.65}a.btn.disabled,fieldset[disabled] a.btn{pointer-events:none}.btn-default{color:#333;background-color:#fff;border-color:#ccc}.btn-default.focus,.btn-default:focus{color:#333;background-color:#e6e6e6;border-color:#8c8c8c}.btn-default:hover{color:#333;background-color:#e6e6e6;border-color:#adadad}.btn-default.active,.btn-default:active,.open>.dropdown-toggle.btn-default{color:#333;background-color:#e6e6e6;border-color:#adadad}.btn-default.active.focus,.btn-default.active:focus,.btn-default.active:hover,.btn-default:active.focus,.btn-default:active:focus,.btn-default:active:hover,.open>.dropdown-toggle.btn-default.focus,.open>.dropdown-toggle.btn-default:focus,.open>.dropdown-toggle.btn-default:hover{color:#333;background-color:#d4d4d4;border-color:#8c8c8c}.btn-default.active,.btn-default:active,.open>.dropdown-toggle.btn-default{background-image:none}.btn-default.disabled.focus,.btn-default.disabled:focus,.btn-default.disabled:hover,.btn-default[disabled].focus,.btn-default[disabled]:focus,.btn-default[disabled]:hover,fieldset[disabled] .btn-default.focus,fieldset[disabled] .btn-default:focus,fieldset[disabled] .btn-default:hover{background-color:#fff;border-color:#ccc}.btn-default .badge{color:#fff;background-color:#333}.btn-primary{color:#fff;background-color:#337ab7;border-color:#2e6da4}.btn-primary.focus,.btn-primary:focus{color:#fff;background-color:#286090;border-color:#122b40}.btn-primary:hover{color:#fff;background-color:#286090;border-color:#204d74}.btn-primary.active,.btn-primary:active,.open>.dropdown-toggle.btn-primary{color:#fff;background-color:#286090;border-color:#204d74}.btn-primary.active.focus,.btn-primary.active:focus,.btn-primary.active:hover,.btn-primary:active.focus,.btn-primary:active:focus,.btn-primary:active:hover,.open>.dropdown-toggle.btn-primary.focus,.open>.dropdown-toggle.btn-primary:focus,.open>.dropdown-toggle.btn-primary:hover{color:#fff;background-color:#204d74;border-color:#122b40}.btn-primary.active,.btn-primary:active,.open>.dropdown-toggle.btn-primary{background-image:none}.btn-primary.disabled.focus,.btn-primary.disabled:focus,.btn-primary.disabled:hover,.btn-primary[disabled].focus,.btn-primary[disabled]:focus,.btn-primary[disabled]:hover,fieldset[disabled] .btn-primary.focus,fieldset[disabled] .btn-primary:focus,fieldset[disabled] .btn-primary:hover{background-color:#337ab7;border-color:#2e6da4}.btn-primary .badge{color:#337ab7;background-color:#fff}.btn-success{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.btn-success.focus,.btn-success:focus{color:#fff;background-color:#449d44;border-color:#255625}.btn-success:hover{color:#fff;background-color:#449d44;border-color:#398439}.btn-success.active,.btn-success:active,.open>.dropdown-toggle.btn-success{color:#fff;background-color:#449d44;border-color:#398439}.btn-success.active.focus,.btn-success.active:focus,.btn-success.active:hover,.btn-success:active.focus,.btn-success:active:focus,.btn-success:active:hover,.open>.dropdown-toggle.btn-success.focus,.open>.dropdown-toggle.btn-success:focus,.open>.dropdown-toggle.btn-success:hover{color:#fff;background-color:#398439;border-color:#255625}.btn-success.active,.btn-success:active,.open>.dropdown-toggle.btn-success{background-image:none}.btn-success.disabled.focus,.btn-success.disabled:focus,.btn-success.disabled:hover,.btn-success[disabled].focus,.btn-success[disabled]:focus,.btn-success[disabled]:hover,fieldset[disabled] .btn-success.focus,fieldset[disabled] .btn-success:focus,fieldset[disabled] .btn-success:hover{background-color:#5cb85c;border-color:#4cae4c}.btn-success .badge{color:#5cb85c;background-color:#fff}.btn-info{color:#fff;background-color:#5bc0de;border-color:#46b8da}.btn-info.focus,.btn-info:focus{color:#fff;background-color:#31b0d5;border-color:#1b6d85}.btn-info:hover{color:#fff;background-color:#31b0d5;border-color:#269abc}.btn-info.active,.btn-info:active,.open>.dropdown-toggle.btn-info{color:#fff;background-color:#31b0d5;border-color:#269abc}.btn-info.active.focus,.btn-info.active:focus,.btn-info.active:hover,.btn-info:active.focus,.btn-info:active:focus,.btn-info:active:hover,.open>.dropdown-toggle.btn-info.focus,.open>.dropdown-toggle.btn-info:focus,.open>.dropdown-toggle.btn-info:hover{color:#fff;background-color:#269abc;border-color:#1b6d85}.btn-info.active,.btn-info:active,.open>.dropdown-toggle.btn-info{background-image:none}.btn-info.disabled.focus,.btn-info.disabled:focus,.btn-info.disabled:hover,.btn-info[disabled].focus,.btn-info[disabled]:focus,.btn-info[disabled]:hover,fieldset[disabled] .btn-info.focus,fieldset[disabled] .btn-info:focus,fieldset[disabled] .btn-info:hover{background-color:#5bc0de;border-color:#46b8da}.btn-info .badge{color:#5bc0de;background-color:#fff}.btn-warning{color:#fff;background-color:#f0ad4e;border-color:#eea236}.btn-warning.focus,.btn-warning:focus{color:#fff;background-color:#ec971f;border-color:#985f0d}.btn-warning:hover{color:#fff;background-color:#ec971f;border-color:#d58512}.btn-warning.active,.btn-warning:active,.open>.dropdown-toggle.btn-warning{color:#fff;background-color:#ec971f;border-color:#d58512}.btn-warning.active.focus,.btn-warning.active:focus,.btn-warning.active:hover,.btn-warning:active.focus,.btn-warning:active:focus,.btn-warning:active:hover,.open>.dropdown-toggle.btn-warning.focus,.open>.dropdown-toggle.btn-warning:focus,.open>.dropdown-toggle.btn-warning:hover{color:#fff;background-color:#d58512;border-color:#985f0d}.btn-warning.active,.btn-warning:active,.open>.dropdown-toggle.btn-warning{background-image:none}.btn-warning.disabled.focus,.btn-warning.disabled:focus,.btn-warning.disabled:hover,.btn-warning[disabled].focus,.btn-warning[disabled]:focus,.btn-warning[disabled]:hover,fieldset[disabled] .btn-warning.focus,fieldset[disabled] .btn-warning:focus,fieldset[disabled] .btn-warning:hover{background-color:#f0ad4e;border-color:#eea236}.btn-warning .badge{color:#f0ad4e;background-color:#fff}.btn-danger{color:#fff;background-color:#d9534f;border-color:#d43f3a}.btn-danger.focus,.btn-danger:focus{color:#fff;background-color:#c9302c;border-color:#761c19}.btn-danger:hover{color:#fff;background-color:#c9302c;border-color:#ac2925}.btn-danger.active,.btn-danger:active,.open>.dropdown-toggle.btn-danger{color:#fff;background-color:#c9302c;border-color:#ac2925}.btn-danger.active.focus,.btn-danger.active:focus,.btn-danger.active:hover,.btn-danger:active.focus,.btn-danger:active:focus,.btn-danger:active:hover,.open>.dropdown-toggle.btn-danger.focus,.open>.dropdown-toggle.btn-danger:focus,.open>.dropdown-toggle.btn-danger:hover{color:#fff;background-color:#ac2925;border-color:#761c19}.btn-danger.active,.btn-danger:active,.open>.dropdown-toggle.btn-danger{background-image:none}.btn-danger.disabled.focus,.btn-danger.disabled:focus,.btn-danger.disabled:hover,.btn-danger[disabled].focus,.btn-danger[disabled]:focus,.btn-danger[disabled]:hover,fieldset[disabled] .btn-danger.focus,fieldset[disabled] .btn-danger:focus,fieldset[disabled] .btn-danger:hover{background-color:#d9534f;border-color:#d43f3a}.btn-danger .badge{color:#d9534f;background-color:#fff}.btn-link{font-weight:400;color:#337ab7;border-radius:0}.btn-link,.btn-link.active,.btn-link:active,.btn-link[disabled],fieldset[disabled] .btn-link{background-color:transparent;-webkit-box-shadow:none;box-shadow:none}.btn-link,.btn-link:active,.btn-link:focus,.btn-link:hover{border-color:transparent}.btn-link:focus,.btn-link:hover{color:#23527c;text-decoration:underline;background-color:transparent}.btn-link[disabled]:focus,.btn-link[disabled]:hover,fieldset[disabled] .btn-link:focus,fieldset[disabled] .btn-link:hover{color:#777;text-decoration:none}.btn-group-lg>.btn,.btn-lg{padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}.btn-group-sm>.btn,.btn-sm{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.btn-group-xs>.btn,.btn-xs{padding:1px 5px;font-size:12px;line-height:1.5;border-radius:3px}.btn-block{display:block;width:100%}.btn-block+.btn-block{margin-top:5px}input[type=button].btn-block,input[type=reset].btn-block,input[type=submit].btn-block{width:100%}.fade{opacity:0;-webkit-transition:opacity .15s linear;-o-transition:opacity .15s linear;transition:opacity .15s linear}.fade.in{opacity:1}.collapse{display:none}.collapse.in{display:block}tr.collapse.in{display:table-row}tbody.collapse.in{display:table-row-group}.collapsing{position:relative;height:0;overflow:hidden;-webkit-transition-timing-function:ease;-o-transition-timing-function:ease;transition-timing-function:ease;-webkit-transition-duration:.35s;-o-transition-duration:.35s;transition-duration:.35s;-webkit-transition-property:height,visibility;-o-transition-property:height,visibility;transition-property:height,visibility}.caret{display:inline-block;width:0;height:0;margin-left:2px;vertical-align:middle;border-top:4px dashed;border-top:4px solid\9;border-right:4px solid transparent;border-left:4px solid transparent}.dropdown,.dropup{position:relative}.dropdown-toggle:focus{outline:0}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;font-size:14px;text-align:left;list-style:none;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.15);border-radius:4px;-webkit-box-shadow:0 6px 12px rgba(0,0,0,.175);box-shadow:0 6px 12px rgba(0,0,0,.175)}.dropdown-menu.pull-right{right:0;left:auto}.dropdown-menu .divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.dropdown-menu>li>a{display:block;padding:3px 20px;clear:both;font-weight:400;line-height:1.42857143;color:#333;white-space:nowrap}.dropdown-menu>li>a:focus,.dropdown-menu>li>a:hover{color:#262626;text-decoration:none;background-color:#f5f5f5}.dropdown-menu>.active>a,.dropdown-menu>.active>a:focus,.dropdown-menu>.active>a:hover{color:#fff;text-decoration:none;background-color:#337ab7;outline:0}.dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{color:#777}.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{text-decoration:none;cursor:not-allowed;background-color:transparent;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.open>.dropdown-menu{display:block}.open>a{outline:0}.dropdown-menu-right{right:0;left:auto}.dropdown-menu-left{right:auto;left:0}.dropdown-header{display:block;padding:3px 20px;font-size:12px;line-height:1.42857143;color:#777;white-space:nowrap}.dropdown-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:990}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{content:"";border-top:0;border-bottom:4px dashed;border-bottom:4px solid\9}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:2px}@media (min-width:768px){.navbar-right .dropdown-menu{right:0;left:auto}.navbar-right .dropdown-menu-left{right:auto;left:0}}.btn-group,.btn-group-vertical{position:relative;display:inline-block;vertical-align:middle}.btn-group-vertical>.btn,.btn-group>.btn{position:relative;float:left}.btn-group-vertical>.btn.active,.btn-group-vertical>.btn:active,.btn-group-vertical>.btn:focus,.btn-group-vertical>.btn:hover,.btn-group>.btn.active,.btn-group>.btn:active,.btn-group>.btn:focus,.btn-group>.btn:hover{z-index:2}.btn-group .btn+.btn,.btn-group .btn+.btn-group,.btn-group .btn-group+.btn,.btn-group .btn-group+.btn-group{margin-left:-1px}.btn-toolbar{margin-left:-5px}.btn-toolbar .btn,.btn-toolbar .btn-group,.btn-toolbar .input-group{float:left}.btn-toolbar>.btn,.btn-toolbar>.btn-group,.btn-toolbar>.input-group{margin-left:5px}.btn-group>.btn:not(:first-child):not(:last-child):not(.dropdown-toggle){border-radius:0}.btn-group>.btn:first-child{margin-left:0}.btn-group>.btn:first-child:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn:last-child:not(:first-child),.btn-group>.dropdown-toggle:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.btn-group>.btn-group{float:left}.btn-group>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-left-radius:0;border-bottom-left-radius:0}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn-group>.btn+.dropdown-toggle{padding-right:8px;padding-left:8px}.btn-group>.btn-lg+.dropdown-toggle{padding-right:12px;padding-left:12px}.btn-group.open .dropdown-toggle{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn-group.open .dropdown-toggle.btn-link{-webkit-box-shadow:none;box-shadow:none}.btn .caret{margin-left:0}.btn-lg .caret{border-width:5px 5px 0;border-bottom-width:0}.dropup .btn-lg .caret{border-width:0 5px 5px}.btn-group-vertical>.btn,.btn-group-vertical>.btn-group,.btn-group-vertical>.btn-group>.btn{display:block;float:none;width:100%;max-width:100%}.btn-group-vertical>.btn-group>.btn{float:none}.btn-group-vertical>.btn+.btn,.btn-group-vertical>.btn+.btn-group,.btn-group-vertical>.btn-group+.btn,.btn-group-vertical>.btn-group+.btn-group{margin-top:-1px;margin-left:0}.btn-group-vertical>.btn:not(:first-child):not(:last-child){border-radius:0}.btn-group-vertical>.btn:first-child:not(:last-child){border-top-left-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn:last-child:not(:first-child){border-top-left-radius:0;border-top-right-radius:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}.btn-group-vertical>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group-vertical>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group-vertical>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-left-radius:0;border-top-right-radius:0}.btn-group-justified{display:table;width:100%;table-layout:fixed;border-collapse:separate}.btn-group-justified>.btn,.btn-group-justified>.btn-group{display:table-cell;float:none;width:1%}.btn-group-justified>.btn-group .btn{width:100%}.btn-group-justified>.btn-group .dropdown-menu{left:auto}[data-toggle=buttons]>.btn input[type=checkbox],[data-toggle=buttons]>.btn input[type=radio],[data-toggle=buttons]>.btn-group>.btn input[type=checkbox],[data-toggle=buttons]>.btn-group>.btn input[type=radio]{position:absolute;clip:rect(0,0,0,0);pointer-events:none}.input-group{position:relative;display:table;border-collapse:separate}.input-group[class*=col-]{float:none;padding-right:0;padding-left:0}.input-group .form-control{position:relative;z-index:2;float:left;width:100%;margin-bottom:0}.input-group .form-control:focus{z-index:3}.input-group-lg>.form-control,.input-group-lg>.input-group-addon,.input-group-lg>.input-group-btn>.btn{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}select.input-group-lg>.form-control,select.input-group-lg>.input-group-addon,select.input-group-lg>.input-group-btn>.btn{height:46px;line-height:46px}select[multiple].input-group-lg>.form-control,select[multiple].input-group-lg>.input-group-addon,select[multiple].input-group-lg>.input-group-btn>.btn,textarea.input-group-lg>.form-control,textarea.input-group-lg>.input-group-addon,textarea.input-group-lg>.input-group-btn>.btn{height:auto}.input-group-sm>.form-control,.input-group-sm>.input-group-addon,.input-group-sm>.input-group-btn>.btn{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-group-sm>.form-control,select.input-group-sm>.input-group-addon,select.input-group-sm>.input-group-btn>.btn{height:30px;line-height:30px}select[multiple].input-group-sm>.form-control,select[multiple].input-group-sm>.input-group-addon,select[multiple].input-group-sm>.input-group-btn>.btn,textarea.input-group-sm>.form-control,textarea.input-group-sm>.input-group-addon,textarea.input-group-sm>.input-group-btn>.btn{height:auto}.input-group .form-control,.input-group-addon,.input-group-btn{display:table-cell}.input-group .form-control:not(:first-child):not(:last-child),.input-group-addon:not(:first-child):not(:last-child),.input-group-btn:not(:first-child):not(:last-child){border-radius:0}.input-group-addon,.input-group-btn{width:1%;white-space:nowrap;vertical-align:middle}.input-group-addon{padding:6px 12px;font-size:14px;font-weight:400;line-height:1;color:#555;text-align:center;background-color:#eee;border:1px solid #ccc;border-radius:4px}.input-group-addon.input-sm{padding:5px 10px;font-size:12px;border-radius:3px}.input-group-addon.input-lg{padding:10px 16px;font-size:18px;border-radius:6px}.input-group-addon input[type=checkbox],.input-group-addon input[type=radio]{margin-top:0}.input-group .form-control:first-child,.input-group-addon:first-child,.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group>.btn,.input-group-btn:first-child>.dropdown-toggle,.input-group-btn:last-child>.btn-group:not(:last-child)>.btn,.input-group-btn:last-child>.btn:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.input-group-addon:first-child{border-right:0}.input-group .form-control:last-child,.input-group-addon:last-child,.input-group-btn:first-child>.btn-group:not(:first-child)>.btn,.input-group-btn:first-child>.btn:not(:first-child),.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group>.btn,.input-group-btn:last-child>.dropdown-toggle{border-top-left-radius:0;border-bottom-left-radius:0}.input-group-addon:last-child{border-left:0}.input-group-btn{position:relative;font-size:0;white-space:nowrap}.input-group-btn>.btn{position:relative}.input-group-btn>.btn+.btn{margin-left:-1px}.input-group-btn>.btn:active,.input-group-btn>.btn:focus,.input-group-btn>.btn:hover{z-index:2}.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group{margin-right:-1px}.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group{z-index:2;margin-left:-1px}.nav{padding-left:0;margin-bottom:0;list-style:none}.nav>li{position:relative;display:block}.nav>li>a{position:relative;display:block;padding:10px 15px}.nav>li>a:focus,.nav>li>a:hover{text-decoration:none;background-color:#eee}.nav>li.disabled>a{color:#777}.nav>li.disabled>a:focus,.nav>li.disabled>a:hover{color:#777;text-decoration:none;cursor:not-allowed;background-color:transparent}.nav .open>a,.nav .open>a:focus,.nav .open>a:hover{background-color:#eee;border-color:#337ab7}.nav .nav-divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.nav>li>a>img{max-width:none}.nav-tabs{border-bottom:1px solid #ddd}.nav-tabs>li{float:left;margin-bottom:-1px}.nav-tabs>li>a{margin-right:2px;line-height:1.42857143;border:1px solid transparent;border-radius:4px 4px 0 0}.nav-tabs>li>a:hover{border-color:#eee #eee #ddd}.nav-tabs>li.active>a,.nav-tabs>li.active>a:focus,.nav-tabs>li.active>a:hover{color:#555;cursor:default;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent}.nav-tabs.nav-justified{width:100%;border-bottom:0}.nav-tabs.nav-justified>li{float:none}.nav-tabs.nav-justified>li>a{margin-bottom:5px;text-align:center}.nav-tabs.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-tabs.nav-justified>li{display:table-cell;width:1%}.nav-tabs.nav-justified>li>a{margin-bottom:0}}.nav-tabs.nav-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-tabs.nav-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border-bottom-color:#fff}}.nav-pills>li{float:left}.nav-pills>li>a{border-radius:4px}.nav-pills>li+li{margin-left:2px}.nav-pills>li.active>a,.nav-pills>li.active>a:focus,.nav-pills>li.active>a:hover{color:#fff;background-color:#337ab7}.nav-stacked>li{float:none}.nav-stacked>li+li{margin-top:2px;margin-left:0}.nav-justified{width:100%}.nav-justified>li{float:none}.nav-justified>li>a{margin-bottom:5px;text-align:center}.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-justified>li{display:table-cell;width:1%}.nav-justified>li>a{margin-bottom:0}}.nav-tabs-justified{border-bottom:0}.nav-tabs-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-tabs-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{border-bottom-color:#fff}}.tab-content>.tab-pane{display:none}.tab-content>.active{display:block}.nav-tabs .dropdown-menu{margin-top:-1px;border-top-left-radius:0;border-top-right-radius:0}.navbar{position:relative;min-height:50px;margin-bottom:20px;border:1px solid transparent}@media (min-width:768px){.navbar{border-radius:4px}}@media (min-width:768px){.navbar-header{float:left}}.navbar-collapse{padding-right:15px;padding-left:15px;overflow-x:visible;-webkit-overflow-scrolling:touch;border-top:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.1)}.navbar-collapse.in{overflow-y:auto}@media (min-width:768px){.navbar-collapse{width:auto;border-top:0;-webkit-box-shadow:none;box-shadow:none}.navbar-collapse.collapse{display:block!important;height:auto!important;padding-bottom:0;overflow:visible!important}.navbar-collapse.in{overflow-y:visible}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse,.navbar-static-top .navbar-collapse{padding-right:0;padding-left:0}}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse{max-height:340px}@media (max-device-width:480px) and (orientation:landscape){.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse{max-height:200px}}.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:0;margin-left:0}}.navbar-static-top{z-index:1000;border-width:0 0 1px}@media (min-width:768px){.navbar-static-top{border-radius:0}}.navbar-fixed-bottom,.navbar-fixed-top{position:fixed;right:0;left:0;z-index:1030}@media (min-width:768px){.navbar-fixed-bottom,.navbar-fixed-top{border-radius:0}}.navbar-fixed-top{top:0;border-width:0 0 1px}.navbar-fixed-bottom{bottom:0;margin-bottom:0;border-width:1px 0 0}.navbar-brand{float:left;height:50px;padding:15px 15px;font-size:18px;line-height:20px}.navbar-brand:focus,.navbar-brand:hover{text-decoration:none}.navbar-brand>img{display:block}@media (min-width:768px){.navbar>.container .navbar-brand,.navbar>.container-fluid .navbar-brand{margin-left:-15px}}.navbar-toggle{position:relative;float:right;padding:9px 10px;margin-top:8px;margin-right:15px;margin-bottom:8px;background-color:transparent;background-image:none;border:1px solid transparent;border-radius:4px}.navbar-toggle:focus{outline:0}.navbar-toggle .icon-bar{display:block;width:22px;height:2px;border-radius:1px}.navbar-toggle .icon-bar+.icon-bar{margin-top:4px}@media (min-width:768px){.navbar-toggle{display:none}}.navbar-nav{margin:7.5px -15px}.navbar-nav>li>a{padding-top:10px;padding-bottom:10px;line-height:20px}@media (max-width:767px){.navbar-nav .open .dropdown-menu{position:static;float:none;width:auto;margin-top:0;background-color:transparent;border:0;-webkit-box-shadow:none;box-shadow:none}.navbar-nav .open .dropdown-menu .dropdown-header,.navbar-nav .open .dropdown-menu>li>a{padding:5px 15px 5px 25px}.navbar-nav .open .dropdown-menu>li>a{line-height:20px}.navbar-nav .open .dropdown-menu>li>a:focus,.navbar-nav .open .dropdown-menu>li>a:hover{background-image:none}}@media (min-width:768px){.navbar-nav{float:left;margin:0}.navbar-nav>li{float:left}.navbar-nav>li>a{padding-top:15px;padding-bottom:15px}}.navbar-form{padding:10px 15px;margin-top:8px;margin-right:-15px;margin-bottom:8px;margin-left:-15px;border-top:1px solid transparent;border-bottom:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1)}@media (min-width:768px){.navbar-form .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.navbar-form .form-control{display:inline-block;width:auto;vertical-align:middle}.navbar-form .form-control-static{display:inline-block}.navbar-form .input-group{display:inline-table;vertical-align:middle}.navbar-form .input-group .form-control,.navbar-form .input-group .input-group-addon,.navbar-form .input-group .input-group-btn{width:auto}.navbar-form .input-group>.form-control{width:100%}.navbar-form .control-label{margin-bottom:0;vertical-align:middle}.navbar-form .checkbox,.navbar-form .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.navbar-form .checkbox label,.navbar-form .radio label{padding-left:0}.navbar-form .checkbox input[type=checkbox],.navbar-form .radio input[type=radio]{position:relative;margin-left:0}.navbar-form .has-feedback .form-control-feedback{top:0}}@media (max-width:767px){.navbar-form .form-group{margin-bottom:5px}.navbar-form .form-group:last-child{margin-bottom:0}}@media (min-width:768px){.navbar-form{width:auto;padding-top:0;padding-bottom:0;margin-right:0;margin-left:0;border:0;-webkit-box-shadow:none;box-shadow:none}}.navbar-nav>li>.dropdown-menu{margin-top:0;border-top-left-radius:0;border-top-right-radius:0}.navbar-fixed-bottom .navbar-nav>li>.dropdown-menu{margin-bottom:0;border-top-left-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.navbar-btn{margin-top:8px;margin-bottom:8px}.navbar-btn.btn-sm{margin-top:10px;margin-bottom:10px}.navbar-btn.btn-xs{margin-top:14px;margin-bottom:14px}.navbar-text{margin-top:15px;margin-bottom:15px}@media (min-width:768px){.navbar-text{float:left;margin-right:15px;margin-left:15px}}@media (min-width:768px){.navbar-left{float:left!important}.navbar-right{float:right!important;margin-right:-15px}.navbar-right~.navbar-right{margin-right:0}}.navbar-default{background-color:#f8f8f8;border-color:#e7e7e7}.navbar-default .navbar-brand{color:#777}.navbar-default .navbar-brand:focus,.navbar-default .navbar-brand:hover{color:#5e5e5e;background-color:transparent}.navbar-default .navbar-text{color:#777}.navbar-default .navbar-nav>li>a{color:#777}.navbar-default .navbar-nav>li>a:focus,.navbar-default .navbar-nav>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.active>a:focus,.navbar-default .navbar-nav>.active>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav>.disabled>a,.navbar-default .navbar-nav>.disabled>a:focus,.navbar-default .navbar-nav>.disabled>a:hover{color:#ccc;background-color:transparent}.navbar-default .navbar-toggle{border-color:#ddd}.navbar-default .navbar-toggle:focus,.navbar-default .navbar-toggle:hover{background-color:#ddd}.navbar-default .navbar-toggle .icon-bar{background-color:#888}.navbar-default .navbar-collapse,.navbar-default .navbar-form{border-color:#e7e7e7}.navbar-default .navbar-nav>.open>a,.navbar-default .navbar-nav>.open>a:focus,.navbar-default .navbar-nav>.open>a:hover{color:#555;background-color:#e7e7e7}@media (max-width:767px){.navbar-default .navbar-nav .open .dropdown-menu>li>a{color:#777}.navbar-default .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav .open .dropdown-menu>.active>a,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#ccc;background-color:transparent}}.navbar-default .navbar-link{color:#777}.navbar-default .navbar-link:hover{color:#333}.navbar-default .btn-link{color:#777}.navbar-default .btn-link:focus,.navbar-default .btn-link:hover{color:#333}.navbar-default .btn-link[disabled]:focus,.navbar-default .btn-link[disabled]:hover,fieldset[disabled] .navbar-default .btn-link:focus,fieldset[disabled] .navbar-default .btn-link:hover{color:#ccc}.navbar-inverse{background-color:#222;border-color:#080808}.navbar-inverse .navbar-brand{color:#9d9d9d}.navbar-inverse .navbar-brand:focus,.navbar-inverse .navbar-brand:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-text{color:#9d9d9d}.navbar-inverse .navbar-nav>li>a{color:#9d9d9d}.navbar-inverse .navbar-nav>li>a:focus,.navbar-inverse .navbar-nav>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav>.active>a,.navbar-inverse .navbar-nav>.active>a:focus,.navbar-inverse .navbar-nav>.active>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav>.disabled>a,.navbar-inverse .navbar-nav>.disabled>a:focus,.navbar-inverse .navbar-nav>.disabled>a:hover{color:#444;background-color:transparent}.navbar-inverse .navbar-toggle{border-color:#333}.navbar-inverse .navbar-toggle:focus,.navbar-inverse .navbar-toggle:hover{background-color:#333}.navbar-inverse .navbar-toggle .icon-bar{background-color:#fff}.navbar-inverse .navbar-collapse,.navbar-inverse .navbar-form{border-color:#101010}.navbar-inverse .navbar-nav>.open>a,.navbar-inverse .navbar-nav>.open>a:focus,.navbar-inverse .navbar-nav>.open>a:hover{color:#fff;background-color:#080808}@media (max-width:767px){.navbar-inverse .navbar-nav .open .dropdown-menu>.dropdown-header{border-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu .divider{background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a{color:#9d9d9d}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#444;background-color:transparent}}.navbar-inverse .navbar-link{color:#9d9d9d}.navbar-inverse .navbar-link:hover{color:#fff}.navbar-inverse .btn-link{color:#9d9d9d}.navbar-inverse .btn-link:focus,.navbar-inverse .btn-link:hover{color:#fff}.navbar-inverse .btn-link[disabled]:focus,.navbar-inverse .btn-link[disabled]:hover,fieldset[disabled] .navbar-inverse .btn-link:focus,fieldset[disabled] .navbar-inverse .btn-link:hover{color:#444}.breadcrumb{padding:8px 15px;margin-bottom:20px;list-style:none;background-color:#f5f5f5;border-radius:4px}.breadcrumb>li{display:inline-block}.breadcrumb>li+li:before{padding:0 5px;color:#ccc;content:"/\00a0"}.breadcrumb>.active{color:#777}.pagination{display:inline-block;padding-left:0;margin:20px 0;border-radius:4px}.pagination>li{display:inline}.pagination>li>a,.pagination>li>span{position:relative;float:left;padding:6px 12px;margin-left:-1px;line-height:1.42857143;color:#337ab7;text-decoration:none;background-color:#fff;border:1px solid #ddd}.pagination>li:first-child>a,.pagination>li:first-child>span{margin-left:0;border-top-left-radius:4px;border-bottom-left-radius:4px}.pagination>li:last-child>a,.pagination>li:last-child>span{border-top-right-radius:4px;border-bottom-right-radius:4px}.pagination>li>a:focus,.pagination>li>a:hover,.pagination>li>span:focus,.pagination>li>span:hover{z-index:2;color:#23527c;background-color:#eee;border-color:#ddd}.pagination>.active>a,.pagination>.active>a:focus,.pagination>.active>a:hover,.pagination>.active>span,.pagination>.active>span:focus,.pagination>.active>span:hover{z-index:3;color:#fff;cursor:default;background-color:#337ab7;border-color:#337ab7}.pagination>.disabled>a,.pagination>.disabled>a:focus,.pagination>.disabled>a:hover,.pagination>.disabled>span,.pagination>.disabled>span:focus,.pagination>.disabled>span:hover{color:#777;cursor:not-allowed;background-color:#fff;border-color:#ddd}.pagination-lg>li>a,.pagination-lg>li>span{padding:10px 16px;font-size:18px;line-height:1.3333333}.pagination-lg>li:first-child>a,.pagination-lg>li:first-child>span{border-top-left-radius:6px;border-bottom-left-radius:6px}.pagination-lg>li:last-child>a,.pagination-lg>li:last-child>span{border-top-right-radius:6px;border-bottom-right-radius:6px}.pagination-sm>li>a,.pagination-sm>li>span{padding:5px 10px;font-size:12px;line-height:1.5}.pagination-sm>li:first-child>a,.pagination-sm>li:first-child>span{border-top-left-radius:3px;border-bottom-left-radius:3px}.pagination-sm>li:last-child>a,.pagination-sm>li:last-child>span{border-top-right-radius:3px;border-bottom-right-radius:3px}.pager{padding-left:0;margin:20px 0;text-align:center;list-style:none}.pager li{display:inline}.pager li>a,.pager li>span{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;border-radius:15px}.pager li>a:focus,.pager li>a:hover{text-decoration:none;background-color:#eee}.pager .next>a,.pager .next>span{float:right}.pager .previous>a,.pager .previous>span{float:left}.pager .disabled>a,.pager .disabled>a:focus,.pager .disabled>a:hover,.pager .disabled>span{color:#777;cursor:not-allowed;background-color:#fff}.label{display:inline;padding:.2em .6em .3em;font-size:75%;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25em}a.label:focus,a.label:hover{color:#fff;text-decoration:none;cursor:pointer}.label:empty{display:none}.btn .label{position:relative;top:-1px}.label-default{background-color:#777}.label-default[href]:focus,.label-default[href]:hover{background-color:#5e5e5e}.label-primary{background-color:#337ab7}.label-primary[href]:focus,.label-primary[href]:hover{background-color:#286090}.label-success{background-color:#5cb85c}.label-success[href]:focus,.label-success[href]:hover{background-color:#449d44}.label-info{background-color:#5bc0de}.label-info[href]:focus,.label-info[href]:hover{background-color:#31b0d5}.label-warning{background-color:#f0ad4e}.label-warning[href]:focus,.label-warning[href]:hover{background-color:#ec971f}.label-danger{background-color:#d9534f}.label-danger[href]:focus,.label-danger[href]:hover{background-color:#c9302c}.badge{display:inline-block;min-width:10px;padding:3px 7px;font-size:12px;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:middle;background-color:#777;border-radius:10px}.badge:empty{display:none}.btn .badge{position:relative;top:-1px}.btn-group-xs>.btn .badge,.btn-xs .badge{top:0;padding:1px 5px}a.badge:focus,a.badge:hover{color:#fff;text-decoration:none;cursor:pointer}.list-group-item.active>.badge,.nav-pills>.active>a>.badge{color:#337ab7;background-color:#fff}.list-group-item>.badge{float:right}.list-group-item>.badge+.badge{margin-right:5px}.nav-pills>li>a>.badge{margin-left:3px}.jumbotron{padding-top:30px;padding-bottom:30px;margin-bottom:30px;color:inherit;background-color:#eee}.jumbotron .h1,.jumbotron h1{color:inherit}.jumbotron p{margin-bottom:15px;font-size:21px;font-weight:200}.jumbotron>hr{border-top-color:#d5d5d5}.container .jumbotron,.container-fluid .jumbotron{padding-right:15px;padding-left:15px;border-radius:6px}.jumbotron .container{max-width:100%}@media screen and (min-width:768px){.jumbotron{padding-top:48px;padding-bottom:48px}.container .jumbotron,.container-fluid .jumbotron{padding-right:60px;padding-left:60px}.jumbotron .h1,.jumbotron h1{font-size:63px}}.thumbnail{display:block;padding:4px;margin-bottom:20px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:border .2s ease-in-out;-o-transition:border .2s ease-in-out;transition:border .2s ease-in-out}.thumbnail a>img,.thumbnail>img{margin-right:auto;margin-left:auto}a.thumbnail.active,a.thumbnail:focus,a.thumbnail:hover{border-color:#337ab7}.thumbnail .caption{padding:9px;color:#333}.alert{padding:15px;margin-bottom:20px;border:1px solid transparent;border-radius:4px}.alert h4{margin-top:0;color:inherit}.alert .alert-link{font-weight:700}.alert>p,.alert>ul{margin-bottom:0}.alert>p+p{margin-top:5px}.alert-dismissable,.alert-dismissible{padding-right:35px}.alert-dismissable .close,.alert-dismissible .close{position:relative;top:-2px;right:-21px;color:inherit}.alert-success{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.alert-success hr{border-top-color:#c9e2b3}.alert-success .alert-link{color:#2b542c}.alert-info{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.alert-info hr{border-top-color:#a6e1ec}.alert-info .alert-link{color:#245269}.alert-warning{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.alert-warning hr{border-top-color:#f7e1b5}.alert-warning .alert-link{color:#66512c}.alert-danger{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.alert-danger hr{border-top-color:#e4b9c0}.alert-danger .alert-link{color:#843534}@-webkit-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@-o-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}.progress{height:20px;margin-bottom:20px;overflow:hidden;background-color:#f5f5f5;border-radius:4px;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.1);box-shadow:inset 0 1px 2px rgba(0,0,0,.1)}.progress-bar{float:left;width:0;height:100%;font-size:12px;line-height:20px;color:#fff;text-align:center;background-color:#337ab7;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);-webkit-transition:width .6s ease;-o-transition:width .6s ease;transition:width .6s ease}.progress-bar-striped,.progress-striped .progress-bar{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);-webkit-background-size:40px 40px;background-size:40px 40px}.progress-bar.active,.progress.active .progress-bar{-webkit-animation:progress-bar-stripes 2s linear infinite;-o-animation:progress-bar-stripes 2s linear infinite;animation:progress-bar-stripes 2s linear infinite}.progress-bar-success{background-color:#5cb85c}.progress-striped .progress-bar-success{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-info{background-color:#5bc0de}.progress-striped .progress-bar-info{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-warning{background-color:#f0ad4e}.progress-striped .progress-bar-warning{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-danger{background-color:#d9534f}.progress-striped .progress-bar-danger{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.media{margin-top:15px}.media:first-child{margin-top:0}.media,.media-body{overflow:hidden;zoom:1}.media-body{width:10000px}.media-object{display:block}.media-object.img-thumbnail{max-width:none}.media-right,.media>.pull-right{padding-left:10px}.media-left,.media>.pull-left{padding-right:10px}.media-body,.media-left,.media-right{display:table-cell;vertical-align:top}.media-middle{vertical-align:middle}.media-bottom{vertical-align:bottom}.media-heading{margin-top:0;margin-bottom:5px}.media-list{padding-left:0;list-style:none}.list-group{padding-left:0;margin-bottom:20px}.list-group-item{position:relative;display:block;padding:10px 15px;margin-bottom:-1px;background-color:#fff;border:1px solid #ddd}.list-group-item:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.list-group-item:last-child{margin-bottom:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}a.list-group-item,button.list-group-item{color:#555}a.list-group-item .list-group-item-heading,button.list-group-item .list-group-item-heading{color:#333}a.list-group-item:focus,a.list-group-item:hover,button.list-group-item:focus,button.list-group-item:hover{color:#555;text-decoration:none;background-color:#f5f5f5}button.list-group-item{width:100%;text-align:left}.list-group-item.disabled,.list-group-item.disabled:focus,.list-group-item.disabled:hover{color:#777;cursor:not-allowed;background-color:#eee}.list-group-item.disabled .list-group-item-heading,.list-group-item.disabled:focus .list-group-item-heading,.list-group-item.disabled:hover .list-group-item-heading{color:inherit}.list-group-item.disabled .list-group-item-text,.list-group-item.disabled:focus .list-group-item-text,.list-group-item.disabled:hover .list-group-item-text{color:#777}.list-group-item.active,.list-group-item.active:focus,.list-group-item.active:hover{z-index:2;color:#fff;background-color:#337ab7;border-color:#337ab7}.list-group-item.active .list-group-item-heading,.list-group-item.active .list-group-item-heading>.small,.list-group-item.active .list-group-item-heading>small,.list-group-item.active:focus .list-group-item-heading,.list-group-item.active:focus .list-group-item-heading>.small,.list-group-item.active:focus .list-group-item-heading>small,.list-group-item.active:hover .list-group-item-heading,.list-group-item.active:hover .list-group-item-heading>.small,.list-group-item.active:hover .list-group-item-heading>small{color:inherit}.list-group-item.active .list-group-item-text,.list-group-item.active:focus .list-group-item-text,.list-group-item.active:hover .list-group-item-text{color:#c7ddef}.list-group-item-success{color:#3c763d;background-color:#dff0d8}a.list-group-item-success,button.list-group-item-success{color:#3c763d}a.list-group-item-success .list-group-item-heading,button.list-group-item-success .list-group-item-heading{color:inherit}a.list-group-item-success:focus,a.list-group-item-success:hover,button.list-group-item-success:focus,button.list-group-item-success:hover{color:#3c763d;background-color:#d0e9c6}a.list-group-item-success.active,a.list-group-item-success.active:focus,a.list-group-item-success.active:hover,button.list-group-item-success.active,button.list-group-item-success.active:focus,button.list-group-item-success.active:hover{color:#fff;background-color:#3c763d;border-color:#3c763d}.list-group-item-info{color:#31708f;background-color:#d9edf7}a.list-group-item-info,button.list-group-item-info{color:#31708f}a.list-group-item-info .list-group-item-heading,button.list-group-item-info .list-group-item-heading{color:inherit}a.list-group-item-info:focus,a.list-group-item-info:hover,button.list-group-item-info:focus,button.list-group-item-info:hover{color:#31708f;background-color:#c4e3f3}a.list-group-item-info.active,a.list-group-item-info.active:focus,a.list-group-item-info.active:hover,button.list-group-item-info.active,button.list-group-item-info.active:focus,button.list-group-item-info.active:hover{color:#fff;background-color:#31708f;border-color:#31708f}.list-group-item-warning{color:#8a6d3b;background-color:#fcf8e3}a.list-group-item-warning,button.list-group-item-warning{color:#8a6d3b}a.list-group-item-warning .list-group-item-heading,button.list-group-item-warning .list-group-item-heading{color:inherit}a.list-group-item-warning:focus,a.list-group-item-warning:hover,button.list-group-item-warning:focus,button.list-group-item-warning:hover{color:#8a6d3b;background-color:#faf2cc}a.list-group-item-warning.active,a.list-group-item-warning.active:focus,a.list-group-item-warning.active:hover,button.list-group-item-warning.active,button.list-group-item-warning.active:focus,button.list-group-item-warning.active:hover{color:#fff;background-color:#8a6d3b;border-color:#8a6d3b}.list-group-item-danger{color:#a94442;background-color:#f2dede}a.list-group-item-danger,button.list-group-item-danger{color:#a94442}a.list-group-item-danger .list-group-item-heading,button.list-group-item-danger .list-group-item-heading{color:inherit}a.list-group-item-danger:focus,a.list-group-item-danger:hover,button.list-group-item-danger:focus,button.list-group-item-danger:hover{color:#a94442;background-color:#ebcccc}a.list-group-item-danger.active,a.list-group-item-danger.active:focus,a.list-group-item-danger.active:hover,button.list-group-item-danger.active,button.list-group-item-danger.active:focus,button.list-group-item-danger.active:hover{color:#fff;background-color:#a94442;border-color:#a94442}.list-group-item-heading{margin-top:0;margin-bottom:5px}.list-group-item-text{margin-bottom:0;line-height:1.3}.panel{margin-bottom:20px;background-color:#fff;border:1px solid transparent;border-radius:4px;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.05);box-shadow:0 1px 1px rgba(0,0,0,.05)}.panel-body{padding:15px}.panel-heading{padding:10px 15px;border-bottom:1px solid transparent;border-top-left-radius:3px;border-top-right-radius:3px}.panel-heading>.dropdown .dropdown-toggle{color:inherit}.panel-title{margin-top:0;margin-bottom:0;font-size:16px;color:inherit}.panel-title>.small,.panel-title>.small>a,.panel-title>a,.panel-title>small,.panel-title>small>a{color:inherit}.panel-footer{padding:10px 15px;background-color:#f5f5f5;border-top:1px solid #ddd;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.list-group,.panel>.panel-collapse>.list-group{margin-bottom:0}.panel>.list-group .list-group-item,.panel>.panel-collapse>.list-group .list-group-item{border-width:1px 0;border-radius:0}.panel>.list-group:first-child .list-group-item:first-child,.panel>.panel-collapse>.list-group:first-child .list-group-item:first-child{border-top:0;border-top-left-radius:3px;border-top-right-radius:3px}.panel>.list-group:last-child .list-group-item:last-child,.panel>.panel-collapse>.list-group:last-child .list-group-item:last-child{border-bottom:0;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.panel-heading+.panel-collapse>.list-group .list-group-item:first-child{border-top-left-radius:0;border-top-right-radius:0}.panel-heading+.list-group .list-group-item:first-child{border-top-width:0}.list-group+.panel-footer{border-top-width:0}.panel>.panel-collapse>.table,.panel>.table,.panel>.table-responsive>.table{margin-bottom:0}.panel>.panel-collapse>.table caption,.panel>.table caption,.panel>.table-responsive>.table caption{padding-right:15px;padding-left:15px}.panel>.table-responsive:first-child>.table:first-child,.panel>.table:first-child{border-top-left-radius:3px;border-top-right-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child,.panel>.table:first-child>thead:first-child>tr:first-child{border-top-left-radius:3px;border-top-right-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table:first-child>thead:first-child>tr:first-child th:first-child{border-top-left-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table:first-child>thead:first-child>tr:first-child th:last-child{border-top-right-radius:3px}.panel>.table-responsive:last-child>.table:last-child,.panel>.table:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:first-child{border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:last-child{border-bottom-right-radius:3px}.panel>.panel-body+.table,.panel>.panel-body+.table-responsive,.panel>.table+.panel-body,.panel>.table-responsive+.panel-body{border-top:1px solid #ddd}.panel>.table>tbody:first-child>tr:first-child td,.panel>.table>tbody:first-child>tr:first-child th{border-top:0}.panel>.table-bordered,.panel>.table-responsive>.table-bordered{border:0}.panel>.table-bordered>tbody>tr>td:first-child,.panel>.table-bordered>tbody>tr>th:first-child,.panel>.table-bordered>tfoot>tr>td:first-child,.panel>.table-bordered>tfoot>tr>th:first-child,.panel>.table-bordered>thead>tr>td:first-child,.panel>.table-bordered>thead>tr>th:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:first-child,.panel>.table-responsive>.table-bordered>thead>tr>td:first-child,.panel>.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.panel>.table-bordered>tbody>tr>td:last-child,.panel>.table-bordered>tbody>tr>th:last-child,.panel>.table-bordered>tfoot>tr>td:last-child,.panel>.table-bordered>tfoot>tr>th:last-child,.panel>.table-bordered>thead>tr>td:last-child,.panel>.table-bordered>thead>tr>th:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:last-child,.panel>.table-responsive>.table-bordered>thead>tr>td:last-child,.panel>.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.panel>.table-bordered>tbody>tr:first-child>td,.panel>.table-bordered>tbody>tr:first-child>th,.panel>.table-bordered>thead>tr:first-child>td,.panel>.table-bordered>thead>tr:first-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>th,.panel>.table-responsive>.table-bordered>thead>tr:first-child>td,.panel>.table-responsive>.table-bordered>thead>tr:first-child>th{border-bottom:0}.panel>.table-bordered>tbody>tr:last-child>td,.panel>.table-bordered>tbody>tr:last-child>th,.panel>.table-bordered>tfoot>tr:last-child>td,.panel>.table-bordered>tfoot>tr:last-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>th,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>td,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}.panel>.table-responsive{margin-bottom:0;border:0}.panel-group{margin-bottom:20px}.panel-group .panel{margin-bottom:0;border-radius:4px}.panel-group .panel+.panel{margin-top:5px}.panel-group .panel-heading{border-bottom:0}.panel-group .panel-heading+.panel-collapse>.list-group,.panel-group .panel-heading+.panel-collapse>.panel-body{border-top:1px solid #ddd}.panel-group .panel-footer{border-top:0}.panel-group .panel-footer+.panel-collapse .panel-body{border-bottom:1px solid #ddd}.panel-default{border-color:#ddd}.panel-default>.panel-heading{color:#333;background-color:#f5f5f5;border-color:#ddd}.panel-default>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ddd}.panel-default>.panel-heading .badge{color:#f5f5f5;background-color:#333}.panel-default>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ddd}.panel-primary{border-color:#337ab7}.panel-primary>.panel-heading{color:#fff;background-color:#337ab7;border-color:#337ab7}.panel-primary>.panel-heading+.panel-collapse>.panel-body{border-top-color:#337ab7}.panel-primary>.panel-heading .badge{color:#337ab7;background-color:#fff}.panel-primary>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#337ab7}.panel-success{border-color:#d6e9c6}.panel-success>.panel-heading{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.panel-success>.panel-heading+.panel-collapse>.panel-body{border-top-color:#d6e9c6}.panel-success>.panel-heading .badge{color:#dff0d8;background-color:#3c763d}.panel-success>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#d6e9c6}.panel-info{border-color:#bce8f1}.panel-info>.panel-heading{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.panel-info>.panel-heading+.panel-collapse>.panel-body{border-top-color:#bce8f1}.panel-info>.panel-heading .badge{color:#d9edf7;background-color:#31708f}.panel-info>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#bce8f1}.panel-warning{border-color:#faebcc}.panel-warning>.panel-heading{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.panel-warning>.panel-heading+.panel-collapse>.panel-body{border-top-color:#faebcc}.panel-warning>.panel-heading .badge{color:#fcf8e3;background-color:#8a6d3b}.panel-warning>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#faebcc}.panel-danger{border-color:#ebccd1}.panel-danger>.panel-heading{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.panel-danger>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ebccd1}.panel-danger>.panel-heading .badge{color:#f2dede;background-color:#a94442}.panel-danger>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ebccd1}.embed-responsive{position:relative;display:block;height:0;padding:0;overflow:hidden}.embed-responsive .embed-responsive-item,.embed-responsive embed,.embed-responsive iframe,.embed-responsive object,.embed-responsive video{position:absolute;top:0;bottom:0;left:0;width:100%;height:100%;border:0}.embed-responsive-16by9{padding-bottom:56.25%}.embed-responsive-4by3{padding-bottom:75%}.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #e3e3e3;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.05);box-shadow:inset 0 1px 1px rgba(0,0,0,.05)}.well blockquote{border-color:#ddd;border-color:rgba(0,0,0,.15)}.well-lg{padding:24px;border-radius:6px}.well-sm{padding:9px;border-radius:3px}.close{float:right;font-size:21px;font-weight:700;line-height:1;color:#000;text-shadow:0 1px 0 #fff;filter:alpha(opacity=20);opacity:.2}.close:focus,.close:hover{color:#000;text-decoration:none;cursor:pointer;filter:alpha(opacity=50);opacity:.5}button.close{-webkit-appearance:none;padding:0;cursor:pointer;background:0 0;border:0}.modal-open{overflow:hidden}.modal{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1050;display:none;overflow:hidden;-webkit-overflow-scrolling:touch;outline:0}.modal.fade .modal-dialog{-webkit-transition:-webkit-transform .3s ease-out;-o-transition:-o-transform .3s ease-out;transition:transform .3s ease-out;-webkit-transform:translate(0,-25%);-ms-transform:translate(0,-25%);-o-transform:translate(0,-25%);transform:translate(0,-25%)}.modal.in .modal-dialog{-webkit-transform:translate(0,0);-ms-transform:translate(0,0);-o-transform:translate(0,0);transform:translate(0,0)}.modal-open .modal{overflow-x:hidden;overflow-y:auto}.modal-dialog{position:relative;width:auto;margin:10px}.modal-content{position:relative;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #999;border:1px solid rgba(0,0,0,.2);border-radius:6px;outline:0;-webkit-box-shadow:0 3px 9px rgba(0,0,0,.5);box-shadow:0 3px 9px rgba(0,0,0,.5)}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000}.modal-backdrop.fade{filter:alpha(opacity=0);opacity:0}.modal-backdrop.in{filter:alpha(opacity=50);opacity:.5}.modal-header{padding:15px;border-bottom:1px solid #e5e5e5}.modal-header .close{margin-top:-2px}.modal-title{margin:0;line-height:1.42857143}.modal-body{position:relative;padding:15px}.modal-footer{padding:15px;text-align:right;border-top:1px solid #e5e5e5}.modal-footer .btn+.btn{margin-bottom:0;margin-left:5px}.modal-footer .btn-group .btn+.btn{margin-left:-1px}.modal-footer .btn-block+.btn-block{margin-left:0}.modal-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}@media (min-width:768px){.modal-dialog{width:600px;margin:30px auto}.modal-content{-webkit-box-shadow:0 5px 15px rgba(0,0,0,.5);box-shadow:0 5px 15px rgba(0,0,0,.5)}.modal-sm{width:300px}}@media (min-width:992px){.modal-lg{width:900px}}.tooltip{position:absolute;z-index:1070;display:block;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:12px;font-style:normal;font-weight:400;line-height:1.42857143;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;word-wrap:normal;white-space:normal;filter:alpha(opacity=0);opacity:0;line-break:auto}.tooltip.in{filter:alpha(opacity=90);opacity:.9}.tooltip.top{padding:5px 0;margin-top:-3px}.tooltip.right{padding:0 5px;margin-left:3px}.tooltip.bottom{padding:5px 0;margin-top:3px}.tooltip.left{padding:0 5px;margin-left:-3px}.tooltip-inner{max-width:200px;padding:3px 8px;color:#fff;text-align:center;background-color:#000;border-radius:4px}.tooltip-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid}.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-left .tooltip-arrow{right:5px;bottom:0;margin-bottom:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-right .tooltip-arrow{bottom:0;left:5px;margin-bottom:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-width:5px 5px 5px 0;border-right-color:#000}.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-width:5px 0 5px 5px;border-left-color:#000}.tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-left .tooltip-arrow{top:0;right:5px;margin-top:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-right .tooltip-arrow{top:0;left:5px;margin-top:-5px;border-width:0 5px 5px;border-bottom-color:#000}.popover{position:absolute;top:0;left:0;z-index:1060;display:none;max-width:276px;padding:1px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;font-style:normal;font-weight:400;line-height:1.42857143;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;word-wrap:normal;white-space:normal;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,.2);box-shadow:0 5px 10px rgba(0,0,0,.2);line-break:auto}.popover.top{margin-top:-10px}.popover.right{margin-left:10px}.popover.bottom{margin-top:10px}.popover.left{margin-left:-10px}.popover-title{padding:8px 14px;margin:0;font-size:14px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;border-radius:5px 5px 0 0}.popover-content{padding:9px 14px}.popover>.arrow,.popover>.arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.popover>.arrow{border-width:11px}.popover>.arrow:after{content:"";border-width:10px}.popover.top>.arrow{bottom:-11px;left:50%;margin-left:-11px;border-top-color:#999;border-top-color:rgba(0,0,0,.25);border-bottom-width:0}.popover.top>.arrow:after{bottom:1px;margin-left:-10px;content:" ";border-top-color:#fff;border-bottom-width:0}.popover.right>.arrow{top:50%;left:-11px;margin-top:-11px;border-right-color:#999;border-right-color:rgba(0,0,0,.25);border-left-width:0}.popover.right>.arrow:after{bottom:-10px;left:1px;content:" ";border-right-color:#fff;border-left-width:0}.popover.bottom>.arrow{top:-11px;left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:#999;border-bottom-color:rgba(0,0,0,.25)}.popover.bottom>.arrow:after{top:1px;margin-left:-10px;content:" ";border-top-width:0;border-bottom-color:#fff}.popover.left>.arrow{top:50%;right:-11px;margin-top:-11px;border-right-width:0;border-left-color:#999;border-left-color:rgba(0,0,0,.25)}.popover.left>.arrow:after{right:1px;bottom:-10px;content:" ";border-right-width:0;border-left-color:#fff}.carousel{position:relative}.carousel-inner{position:relative;width:100%;overflow:hidden}.carousel-inner>.item{position:relative;display:none;-webkit-transition:.6s ease-in-out left;-o-transition:.6s ease-in-out left;transition:.6s ease-in-out left}.carousel-inner>.item>a>img,.carousel-inner>.item>img{line-height:1}@media all and (transform-3d),(-webkit-transform-3d){.carousel-inner>.item{-webkit-transition:-webkit-transform .6s ease-in-out;-o-transition:-o-transform .6s ease-in-out;transition:transform .6s ease-in-out;-webkit-backface-visibility:hidden;backface-visibility:hidden;-webkit-perspective:1000px;perspective:1000px}.carousel-inner>.item.active.right,.carousel-inner>.item.next{left:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}.carousel-inner>.item.active.left,.carousel-inner>.item.prev{left:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}.carousel-inner>.item.active,.carousel-inner>.item.next.left,.carousel-inner>.item.prev.right{left:0;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}.carousel-inner>.active,.carousel-inner>.next,.carousel-inner>.prev{display:block}.carousel-inner>.active{left:0}.carousel-inner>.next,.carousel-inner>.prev{position:absolute;top:0;width:100%}.carousel-inner>.next{left:100%}.carousel-inner>.prev{left:-100%}.carousel-inner>.next.left,.carousel-inner>.prev.right{left:0}.carousel-inner>.active.left{left:-100%}.carousel-inner>.active.right{left:100%}.carousel-control{position:absolute;top:0;bottom:0;left:0;width:15%;font-size:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6);background-color:rgba(0,0,0,0);filter:alpha(opacity=50);opacity:.5}.carousel-control.left{background-image:-webkit-linear-gradient(left,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);background-image:-o-linear-gradient(left,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);background-image:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.5)),to(rgba(0,0,0,.0001)));background-image:linear-gradient(to right,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1);background-repeat:repeat-x}.carousel-control.right{right:0;left:auto;background-image:-webkit-linear-gradient(left,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-image:-o-linear-gradient(left,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-image:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.0001)),to(rgba(0,0,0,.5)));background-image:linear-gradient(to right,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1);background-repeat:repeat-x}.carousel-control:focus,.carousel-control:hover{color:#fff;text-decoration:none;filter:alpha(opacity=90);outline:0;opacity:.9}.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{position:absolute;top:50%;z-index:5;display:inline-block;margin-top:-10px}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{left:50%;margin-left:-10px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{right:50%;margin-right:-10px}.carousel-control .icon-next,.carousel-control .icon-prev{width:20px;height:20px;font-family:serif;line-height:1}.carousel-control .icon-prev:before{content:'\2039'}.carousel-control .icon-next:before{content:'\203a'}.carousel-indicators{position:absolute;bottom:10px;left:50%;z-index:15;width:60%;padding-left:0;margin-left:-30%;text-align:center;list-style:none}.carousel-indicators li{display:inline-block;width:10px;height:10px;margin:1px;text-indent:-999px;cursor:pointer;background-color:#000\9;background-color:rgba(0,0,0,0);border:1px solid #fff;border-radius:10px}.carousel-indicators .active{width:12px;height:12px;margin:0;background-color:#fff}.carousel-caption{position:absolute;right:15%;bottom:20px;left:15%;z-index:10;padding-top:20px;padding-bottom:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6)}.carousel-caption .btn{text-shadow:none}@media screen and (min-width:768px){.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{width:30px;height:30px;margin-top:-10px;font-size:30px}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{margin-left:-10px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{margin-right:-10px}.carousel-caption{right:20%;left:20%;padding-bottom:30px}.carousel-indicators{bottom:20px}}.btn-group-vertical>.btn-group:after,.btn-group-vertical>.btn-group:before,.btn-toolbar:after,.btn-toolbar:before,.clearfix:after,.clearfix:before,.container-fluid:after,.container-fluid:before,.container:after,.container:before,.dl-horizontal dd:after,.dl-horizontal dd:before,.form-horizontal .form-group:after,.form-horizontal .form-group:before,.modal-footer:after,.modal-footer:before,.modal-header:after,.modal-header:before,.nav:after,.nav:before,.navbar-collapse:after,.navbar-collapse:before,.navbar-header:after,.navbar-header:before,.navbar:after,.navbar:before,.pager:after,.pager:before,.panel-body:after,.panel-body:before,.row:after,.row:before{display:table;content:" "}.btn-group-vertical>.btn-group:after,.btn-toolbar:after,.clearfix:after,.container-fluid:after,.container:after,.dl-horizontal dd:after,.form-horizontal .form-group:after,.modal-footer:after,.modal-header:after,.nav:after,.navbar-collapse:after,.navbar-header:after,.navbar:after,.pager:after,.panel-body:after,.row:after{clear:both}.center-block{display:block;margin-right:auto;margin-left:auto}.pull-right{float:right!important}.pull-left{float:left!important}.hide{display:none!important}.show{display:block!important}.invisible{visibility:hidden}.text-hide{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.hidden{display:none!important}.affix{position:fixed}@-ms-viewport{width:device-width}.visible-lg,.visible-md,.visible-sm,.visible-xs{display:none!important}.visible-lg-block,.visible-lg-inline,.visible-lg-inline-block,.visible-md-block,.visible-md-inline,.visible-md-inline-block,.visible-sm-block,.visible-sm-inline,.visible-sm-inline-block,.visible-xs-block,.visible-xs-inline,.visible-xs-inline-block{display:none!important}@media (max-width:767px){.visible-xs{display:block!important}table.visible-xs{display:table!important}tr.visible-xs{display:table-row!important}td.visible-xs,th.visible-xs{display:table-cell!important}}@media (max-width:767px){.visible-xs-block{display:block!important}}@media (max-width:767px){.visible-xs-inline{display:inline!important}}@media (max-width:767px){.visible-xs-inline-block{display:inline-block!important}}@media (min-width:768px) and (max-width:991px){.visible-sm{display:block!important}table.visible-sm{display:table!important}tr.visible-sm{display:table-row!important}td.visible-sm,th.visible-sm{display:table-cell!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-block{display:block!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-inline{display:inline!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-inline-block{display:inline-block!important}}@media (min-width:992px) and (max-width:1199px){.visible-md{display:block!important}table.visible-md{display:table!important}tr.visible-md{display:table-row!important}td.visible-md,th.visible-md{display:table-cell!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-block{display:block!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-inline{display:inline!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-inline-block{display:inline-block!important}}@media (min-width:1200px){.visible-lg{display:block!important}table.visible-lg{display:table!important}tr.visible-lg{display:table-row!important}td.visible-lg,th.visible-lg{display:table-cell!important}}@media (min-width:1200px){.visible-lg-block{display:block!important}}@media (min-width:1200px){.visible-lg-inline{display:inline!important}}@media (min-width:1200px){.visible-lg-inline-block{display:inline-block!important}}@media (max-width:767px){.hidden-xs{display:none!important}}@media (min-width:768px) and (max-width:991px){.hidden-sm{display:none!important}}@media (min-width:992px) and (max-width:1199px){.hidden-md{display:none!important}}@media (min-width:1200px){.hidden-lg{display:none!important}}.visible-print{display:none!important}@media print{.visible-print{display:block!important}table.visible-print{display:table!important}tr.visible-print{display:table-row!important}td.visible-print,th.visible-print{display:table-cell!important}}.visible-print-block{display:none!important}@media print{.visible-print-block{display:block!important}}.visible-print-inline{display:none!important}@media print{.visible-print-inline{display:inline!important}}.visible-print-inline-block{display:none!important}@media print{.visible-print-inline-block{display:inline-block!important}}@media print{.hidden-print{display:none!important}}
+/*# sourceMappingURL=bootstrap.min.css.map */
\ No newline at end of file
diff --git a/views/ngXosViews/serviceGrid/src/vendor/bootstrap-css/css/bootstrap.min.css.map b/views/ngXosViews/serviceGrid/src/vendor/bootstrap-css/css/bootstrap.min.css.map
new file mode 100644
index 0000000..5f49bb3
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/bootstrap-css/css/bootstrap.min.css.map
@@ -0,0 +1 @@
+{"version":3,"sources":["less/normalize.less","less/print.less","bootstrap.css","dist/css/bootstrap.css","less/glyphicons.less","less/scaffolding.less","less/mixins/vendor-prefixes.less","less/mixins/tab-focus.less","less/mixins/image.less","less/type.less","less/mixins/text-emphasis.less","less/mixins/background-variant.less","less/mixins/text-overflow.less","less/code.less","less/grid.less","less/mixins/grid.less","less/mixins/grid-framework.less","less/tables.less","less/mixins/table-row.less","less/forms.less","less/mixins/forms.less","less/buttons.less","less/mixins/buttons.less","less/mixins/opacity.less","less/component-animations.less","less/dropdowns.less","less/mixins/nav-divider.less","less/mixins/reset-filter.less","less/button-groups.less","less/mixins/border-radius.less","less/input-groups.less","less/navs.less","less/navbar.less","less/mixins/nav-vertical-align.less","less/utilities.less","less/breadcrumbs.less","less/pagination.less","less/mixins/pagination.less","less/pager.less","less/labels.less","less/mixins/labels.less","less/badges.less","less/jumbotron.less","less/thumbnails.less","less/alerts.less","less/mixins/alerts.less","less/progress-bars.less","less/mixins/gradients.less","less/mixins/progress-bar.less","less/media.less","less/list-group.less","less/mixins/list-group.less","less/panels.less","less/mixins/panels.less","less/responsive-embed.less","less/wells.less","less/close.less","less/modals.less","less/tooltip.less","less/mixins/reset-text.less","less/popovers.less","less/carousel.less","less/mixins/clearfix.less","less/mixins/center-block.less","less/mixins/hide-text.less","less/responsive-utilities.less","less/mixins/responsive-visibility.less"],"names":[],"mappings":";;;;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S"}
\ No newline at end of file
diff --git a/applications/auto-scale/gui/src/vendor/bootstrap-css/fonts/glyphicons-halflings-regular.eot b/views/ngXosViews/serviceGrid/src/vendor/bootstrap-css/fonts/glyphicons-halflings-regular.eot
similarity index 100%
rename from applications/auto-scale/gui/src/vendor/bootstrap-css/fonts/glyphicons-halflings-regular.eot
rename to views/ngXosViews/serviceGrid/src/vendor/bootstrap-css/fonts/glyphicons-halflings-regular.eot
Binary files differ
diff --git a/applications/auto-scale/gui/src/vendor/bootstrap-css/fonts/glyphicons-halflings-regular.svg b/views/ngXosViews/serviceGrid/src/vendor/bootstrap-css/fonts/glyphicons-halflings-regular.svg
similarity index 100%
rename from applications/auto-scale/gui/src/vendor/bootstrap-css/fonts/glyphicons-halflings-regular.svg
rename to views/ngXosViews/serviceGrid/src/vendor/bootstrap-css/fonts/glyphicons-halflings-regular.svg
diff --git a/applications/auto-scale/gui/src/vendor/bootstrap-css/fonts/glyphicons-halflings-regular.ttf b/views/ngXosViews/serviceGrid/src/vendor/bootstrap-css/fonts/glyphicons-halflings-regular.ttf
similarity index 100%
rename from applications/auto-scale/gui/src/vendor/bootstrap-css/fonts/glyphicons-halflings-regular.ttf
rename to views/ngXosViews/serviceGrid/src/vendor/bootstrap-css/fonts/glyphicons-halflings-regular.ttf
Binary files differ
diff --git a/applications/auto-scale/gui/src/vendor/bootstrap-css/fonts/glyphicons-halflings-regular.woff b/views/ngXosViews/serviceGrid/src/vendor/bootstrap-css/fonts/glyphicons-halflings-regular.woff
similarity index 100%
rename from applications/auto-scale/gui/src/vendor/bootstrap-css/fonts/glyphicons-halflings-regular.woff
rename to views/ngXosViews/serviceGrid/src/vendor/bootstrap-css/fonts/glyphicons-halflings-regular.woff
Binary files differ
diff --git a/applications/auto-scale/gui/src/vendor/bootstrap-css/fonts/glyphicons-halflings-regular.woff2 b/views/ngXosViews/serviceGrid/src/vendor/bootstrap-css/fonts/glyphicons-halflings-regular.woff2
similarity index 100%
rename from applications/auto-scale/gui/src/vendor/bootstrap-css/fonts/glyphicons-halflings-regular.woff2
rename to views/ngXosViews/serviceGrid/src/vendor/bootstrap-css/fonts/glyphicons-halflings-regular.woff2
Binary files differ
diff --git a/applications/auto-scale/gui/src/vendor/bootstrap-css/js/bootstrap.js b/views/ngXosViews/serviceGrid/src/vendor/bootstrap-css/js/bootstrap.js
similarity index 93%
rename from applications/auto-scale/gui/src/vendor/bootstrap-css/js/bootstrap.js
rename to views/ngXosViews/serviceGrid/src/vendor/bootstrap-css/js/bootstrap.js
index 1c88b71..01fbbcb 100644
--- a/applications/auto-scale/gui/src/vendor/bootstrap-css/js/bootstrap.js
+++ b/views/ngXosViews/serviceGrid/src/vendor/bootstrap-css/js/bootstrap.js
@@ -1,7 +1,7 @@
/*!
- * Bootstrap v3.3.4 (http://getbootstrap.com)
+ * Bootstrap v3.3.6 (http://getbootstrap.com)
* Copyright 2011-2015 Twitter, Inc.
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ * Licensed under the MIT license
*/
if (typeof jQuery === 'undefined') {
@@ -11,13 +11,13 @@
+function ($) {
'use strict';
var version = $.fn.jquery.split(' ')[0].split('.')
- if ((version[0] < 2 && version[1] < 9) || (version[0] == 1 && version[1] == 9 && version[2] < 1)) {
- throw new Error('Bootstrap\'s JavaScript requires jQuery version 1.9.1 or higher')
+ if ((version[0] < 2 && version[1] < 9) || (version[0] == 1 && version[1] == 9 && version[2] < 1) || (version[0] > 2)) {
+ throw new Error('Bootstrap\'s JavaScript requires jQuery version 1.9.1 or higher, but lower than version 3')
}
}(jQuery);
/* ========================================================================
- * Bootstrap: transition.js v3.3.4
+ * Bootstrap: transition.js v3.3.6
* http://getbootstrap.com/javascript/#transitions
* ========================================================================
* Copyright 2011-2015 Twitter, Inc.
@@ -77,7 +77,7 @@
}(jQuery);
/* ========================================================================
- * Bootstrap: alert.js v3.3.4
+ * Bootstrap: alert.js v3.3.6
* http://getbootstrap.com/javascript/#alerts
* ========================================================================
* Copyright 2011-2015 Twitter, Inc.
@@ -96,7 +96,7 @@
$(el).on('click', dismiss, this.close)
}
- Alert.VERSION = '3.3.4'
+ Alert.VERSION = '3.3.6'
Alert.TRANSITION_DURATION = 150
@@ -172,7 +172,7 @@
}(jQuery);
/* ========================================================================
- * Bootstrap: button.js v3.3.4
+ * Bootstrap: button.js v3.3.6
* http://getbootstrap.com/javascript/#buttons
* ========================================================================
* Copyright 2011-2015 Twitter, Inc.
@@ -192,7 +192,7 @@
this.isLoading = false
}
- Button.VERSION = '3.3.4'
+ Button.VERSION = '3.3.6'
Button.DEFAULTS = {
loadingText: 'loading...'
@@ -204,7 +204,7 @@
var val = $el.is('input') ? 'val' : 'html'
var data = $el.data()
- state = state + 'Text'
+ state += 'Text'
if (data.resetText == null) $el.data('resetText', $el[val]())
@@ -229,15 +229,19 @@
if ($parent.length) {
var $input = this.$element.find('input')
if ($input.prop('type') == 'radio') {
- if ($input.prop('checked') && this.$element.hasClass('active')) changed = false
- else $parent.find('.active').removeClass('active')
+ if ($input.prop('checked')) changed = false
+ $parent.find('.active').removeClass('active')
+ this.$element.addClass('active')
+ } else if ($input.prop('type') == 'checkbox') {
+ if (($input.prop('checked')) !== this.$element.hasClass('active')) changed = false
+ this.$element.toggleClass('active')
}
- if (changed) $input.prop('checked', !this.$element.hasClass('active')).trigger('change')
+ $input.prop('checked', this.$element.hasClass('active'))
+ if (changed) $input.trigger('change')
} else {
this.$element.attr('aria-pressed', !this.$element.hasClass('active'))
+ this.$element.toggleClass('active')
}
-
- if (changed) this.$element.toggleClass('active')
}
@@ -280,7 +284,7 @@
var $btn = $(e.target)
if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn')
Plugin.call($btn, 'toggle')
- e.preventDefault()
+ if (!($(e.target).is('input[type="radio"]') || $(e.target).is('input[type="checkbox"]'))) e.preventDefault()
})
.on('focus.bs.button.data-api blur.bs.button.data-api', '[data-toggle^="button"]', function (e) {
$(e.target).closest('.btn').toggleClass('focus', /^focus(in)?$/.test(e.type))
@@ -289,7 +293,7 @@
}(jQuery);
/* ========================================================================
- * Bootstrap: carousel.js v3.3.4
+ * Bootstrap: carousel.js v3.3.6
* http://getbootstrap.com/javascript/#carousel
* ========================================================================
* Copyright 2011-2015 Twitter, Inc.
@@ -320,7 +324,7 @@
.on('mouseleave.bs.carousel', $.proxy(this.cycle, this))
}
- Carousel.VERSION = '3.3.4'
+ Carousel.VERSION = '3.3.6'
Carousel.TRANSITION_DURATION = 600
@@ -527,7 +531,7 @@
}(jQuery);
/* ========================================================================
- * Bootstrap: collapse.js v3.3.4
+ * Bootstrap: collapse.js v3.3.6
* http://getbootstrap.com/javascript/#collapse
* ========================================================================
* Copyright 2011-2015 Twitter, Inc.
@@ -557,7 +561,7 @@
if (this.options.toggle) this.toggle()
}
- Collapse.VERSION = '3.3.4'
+ Collapse.VERSION = '3.3.6'
Collapse.TRANSITION_DURATION = 350
@@ -739,7 +743,7 @@
}(jQuery);
/* ========================================================================
- * Bootstrap: dropdown.js v3.3.4
+ * Bootstrap: dropdown.js v3.3.6
* http://getbootstrap.com/javascript/#dropdowns
* ========================================================================
* Copyright 2011-2015 Twitter, Inc.
@@ -759,7 +763,41 @@
$(element).on('click.bs.dropdown', this.toggle)
}
- Dropdown.VERSION = '3.3.4'
+ Dropdown.VERSION = '3.3.6'
+
+ function getParent($this) {
+ var selector = $this.attr('data-target')
+
+ if (!selector) {
+ selector = $this.attr('href')
+ selector = selector && /#[A-Za-z]/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
+ }
+
+ var $parent = selector && $(selector)
+
+ return $parent && $parent.length ? $parent : $this.parent()
+ }
+
+ function clearMenus(e) {
+ if (e && e.which === 3) return
+ $(backdrop).remove()
+ $(toggle).each(function () {
+ var $this = $(this)
+ var $parent = getParent($this)
+ var relatedTarget = { relatedTarget: this }
+
+ if (!$parent.hasClass('open')) return
+
+ if (e && e.type == 'click' && /input|textarea/i.test(e.target.tagName) && $.contains($parent[0], e.target)) return
+
+ $parent.trigger(e = $.Event('hide.bs.dropdown', relatedTarget))
+
+ if (e.isDefaultPrevented()) return
+
+ $this.attr('aria-expanded', 'false')
+ $parent.removeClass('open').trigger($.Event('hidden.bs.dropdown', relatedTarget))
+ })
+ }
Dropdown.prototype.toggle = function (e) {
var $this = $(this)
@@ -774,7 +812,10 @@
if (!isActive) {
if ('ontouchstart' in document.documentElement && !$parent.closest('.navbar-nav').length) {
// if mobile we use a backdrop because click events don't delegate
- $('<div class="dropdown-backdrop"/>').insertAfter($(this)).on('click', clearMenus)
+ $(document.createElement('div'))
+ .addClass('dropdown-backdrop')
+ .insertAfter($(this))
+ .on('click', clearMenus)
}
var relatedTarget = { relatedTarget: this }
@@ -788,7 +829,7 @@
$parent
.toggleClass('open')
- .trigger('shown.bs.dropdown', relatedTarget)
+ .trigger($.Event('shown.bs.dropdown', relatedTarget))
}
return false
@@ -807,57 +848,25 @@
var $parent = getParent($this)
var isActive = $parent.hasClass('open')
- if ((!isActive && e.which != 27) || (isActive && e.which == 27)) {
+ if (!isActive && e.which != 27 || isActive && e.which == 27) {
if (e.which == 27) $parent.find(toggle).trigger('focus')
return $this.trigger('click')
}
var desc = ' li:not(.disabled):visible a'
- var $items = $parent.find('[role="menu"]' + desc + ', [role="listbox"]' + desc)
+ var $items = $parent.find('.dropdown-menu' + desc)
if (!$items.length) return
var index = $items.index(e.target)
- if (e.which == 38 && index > 0) index-- // up
- if (e.which == 40 && index < $items.length - 1) index++ // down
- if (!~index) index = 0
+ if (e.which == 38 && index > 0) index-- // up
+ if (e.which == 40 && index < $items.length - 1) index++ // down
+ if (!~index) index = 0
$items.eq(index).trigger('focus')
}
- function clearMenus(e) {
- if (e && e.which === 3) return
- $(backdrop).remove()
- $(toggle).each(function () {
- var $this = $(this)
- var $parent = getParent($this)
- var relatedTarget = { relatedTarget: this }
-
- if (!$parent.hasClass('open')) return
-
- $parent.trigger(e = $.Event('hide.bs.dropdown', relatedTarget))
-
- if (e.isDefaultPrevented()) return
-
- $this.attr('aria-expanded', 'false')
- $parent.removeClass('open').trigger('hidden.bs.dropdown', relatedTarget)
- })
- }
-
- function getParent($this) {
- var selector = $this.attr('data-target')
-
- if (!selector) {
- selector = $this.attr('href')
- selector = selector && /#[A-Za-z]/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
- }
-
- var $parent = selector && $(selector)
-
- return $parent && $parent.length ? $parent : $this.parent()
- }
-
// DROPDOWN PLUGIN DEFINITION
// ==========================
@@ -895,13 +904,12 @@
.on('click.bs.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() })
.on('click.bs.dropdown.data-api', toggle, Dropdown.prototype.toggle)
.on('keydown.bs.dropdown.data-api', toggle, Dropdown.prototype.keydown)
- .on('keydown.bs.dropdown.data-api', '[role="menu"]', Dropdown.prototype.keydown)
- .on('keydown.bs.dropdown.data-api', '[role="listbox"]', Dropdown.prototype.keydown)
+ .on('keydown.bs.dropdown.data-api', '.dropdown-menu', Dropdown.prototype.keydown)
}(jQuery);
/* ========================================================================
- * Bootstrap: modal.js v3.3.4
+ * Bootstrap: modal.js v3.3.6
* http://getbootstrap.com/javascript/#modals
* ========================================================================
* Copyright 2011-2015 Twitter, Inc.
@@ -935,7 +943,7 @@
}
}
- Modal.VERSION = '3.3.4'
+ Modal.VERSION = '3.3.6'
Modal.TRANSITION_DURATION = 300
Modal.BACKDROP_TRANSITION_DURATION = 150
@@ -992,9 +1000,7 @@
that.$element[0].offsetWidth // force reflow
}
- that.$element
- .addClass('in')
- .attr('aria-hidden', false)
+ that.$element.addClass('in')
that.enforceFocus()
@@ -1028,7 +1034,6 @@
this.$element
.removeClass('in')
- .attr('aria-hidden', true)
.off('click.dismiss.bs.modal')
.off('mouseup.dismiss.bs.modal')
@@ -1092,7 +1097,8 @@
if (this.isShown && this.options.backdrop) {
var doAnimate = $.support.transition && animate
- this.$backdrop = $('<div class="modal-backdrop ' + animate + '" />')
+ this.$backdrop = $(document.createElement('div'))
+ .addClass('modal-backdrop ' + animate)
.appendTo(this.$body)
this.$element.on('click.dismiss.bs.modal', $.proxy(function (e) {
@@ -1241,7 +1247,7 @@
}(jQuery);
/* ========================================================================
- * Bootstrap: tooltip.js v3.3.4
+ * Bootstrap: tooltip.js v3.3.6
* http://getbootstrap.com/javascript/#tooltip
* Inspired by the original jQuery.tipsy by Jason Frame
* ========================================================================
@@ -1263,11 +1269,12 @@
this.timeout = null
this.hoverState = null
this.$element = null
+ this.inState = null
this.init('tooltip', element, options)
}
- Tooltip.VERSION = '3.3.4'
+ Tooltip.VERSION = '3.3.6'
Tooltip.TRANSITION_DURATION = 150
@@ -1292,7 +1299,8 @@
this.type = type
this.$element = $(element)
this.options = this.getOptions(options)
- this.$viewport = this.options.viewport && $(this.options.viewport.selector || this.options.viewport)
+ this.$viewport = this.options.viewport && $($.isFunction(this.options.viewport) ? this.options.viewport.call(this, this.$element) : (this.options.viewport.selector || this.options.viewport))
+ this.inState = { click: false, hover: false, focus: false }
if (this.$element[0] instanceof document.constructor && !this.options.selector) {
throw new Error('`selector` option must be specified when initializing ' + this.type + ' on the window.document object!')
@@ -1351,16 +1359,20 @@
var self = obj instanceof this.constructor ?
obj : $(obj.currentTarget).data('bs.' + this.type)
- if (self && self.$tip && self.$tip.is(':visible')) {
- self.hoverState = 'in'
- return
- }
-
if (!self) {
self = new this.constructor(obj.currentTarget, this.getDelegateOptions())
$(obj.currentTarget).data('bs.' + this.type, self)
}
+ if (obj instanceof $.Event) {
+ self.inState[obj.type == 'focusin' ? 'focus' : 'hover'] = true
+ }
+
+ if (self.tip().hasClass('in') || self.hoverState == 'in') {
+ self.hoverState = 'in'
+ return
+ }
+
clearTimeout(self.timeout)
self.hoverState = 'in'
@@ -1372,6 +1384,14 @@
}, self.options.delay.show)
}
+ Tooltip.prototype.isInStateTrue = function () {
+ for (var key in this.inState) {
+ if (this.inState[key]) return true
+ }
+
+ return false
+ }
+
Tooltip.prototype.leave = function (obj) {
var self = obj instanceof this.constructor ?
obj : $(obj.currentTarget).data('bs.' + this.type)
@@ -1381,6 +1401,12 @@
$(obj.currentTarget).data('bs.' + this.type, self)
}
+ if (obj instanceof $.Event) {
+ self.inState[obj.type == 'focusout' ? 'focus' : 'hover'] = false
+ }
+
+ if (self.isInStateTrue()) return
+
clearTimeout(self.timeout)
self.hoverState = 'out'
@@ -1427,6 +1453,7 @@
.data('bs.' + this.type, this)
this.options.container ? $tip.appendTo(this.options.container) : $tip.insertAfter(this.$element)
+ this.$element.trigger('inserted.bs.' + this.type)
var pos = this.getPosition()
var actualWidth = $tip[0].offsetWidth
@@ -1434,13 +1461,12 @@
if (autoPlace) {
var orgPlacement = placement
- var $container = this.options.container ? $(this.options.container) : this.$element.parent()
- var containerDim = this.getPosition($container)
+ var viewportDim = this.getPosition(this.$viewport)
- placement = placement == 'bottom' && pos.bottom + actualHeight > containerDim.bottom ? 'top' :
- placement == 'top' && pos.top - actualHeight < containerDim.top ? 'bottom' :
- placement == 'right' && pos.right + actualWidth > containerDim.width ? 'left' :
- placement == 'left' && pos.left - actualWidth < containerDim.left ? 'right' :
+ placement = placement == 'bottom' && pos.bottom + actualHeight > viewportDim.bottom ? 'top' :
+ placement == 'top' && pos.top - actualHeight < viewportDim.top ? 'bottom' :
+ placement == 'right' && pos.right + actualWidth > viewportDim.width ? 'left' :
+ placement == 'left' && pos.left - actualWidth < viewportDim.left ? 'right' :
placement
$tip
@@ -1481,8 +1507,8 @@
if (isNaN(marginTop)) marginTop = 0
if (isNaN(marginLeft)) marginLeft = 0
- offset.top = offset.top + marginTop
- offset.left = offset.left + marginLeft
+ offset.top += marginTop
+ offset.left += marginLeft
// $.fn.offset doesn't round pixel values
// so we use setOffset directly with our own function B-0
@@ -1564,7 +1590,7 @@
Tooltip.prototype.fixTitle = function () {
var $e = this.$element
- if ($e.attr('title') || typeof ($e.attr('data-original-title')) != 'string') {
+ if ($e.attr('title') || typeof $e.attr('data-original-title') != 'string') {
$e.attr('data-original-title', $e.attr('title') || '').attr('title', '')
}
}
@@ -1619,7 +1645,7 @@
var rightEdgeOffset = pos.left + viewportPadding + actualWidth
if (leftEdgeOffset < viewportDimensions.left) { // left overflow
delta.left = viewportDimensions.left - leftEdgeOffset
- } else if (rightEdgeOffset > viewportDimensions.width) { // right overflow
+ } else if (rightEdgeOffset > viewportDimensions.right) { // right overflow
delta.left = viewportDimensions.left + viewportDimensions.width - rightEdgeOffset
}
}
@@ -1645,7 +1671,13 @@
}
Tooltip.prototype.tip = function () {
- return (this.$tip = this.$tip || $(this.options.template))
+ if (!this.$tip) {
+ this.$tip = $(this.options.template)
+ if (this.$tip.length != 1) {
+ throw new Error(this.type + ' `template` option must consist of exactly 1 top-level element!')
+ }
+ }
+ return this.$tip
}
Tooltip.prototype.arrow = function () {
@@ -1674,7 +1706,13 @@
}
}
- self.tip().hasClass('in') ? self.leave(self) : self.enter(self)
+ if (e) {
+ self.inState.click = !self.inState.click
+ if (self.isInStateTrue()) self.enter(self)
+ else self.leave(self)
+ } else {
+ self.tip().hasClass('in') ? self.leave(self) : self.enter(self)
+ }
}
Tooltip.prototype.destroy = function () {
@@ -1682,6 +1720,12 @@
clearTimeout(this.timeout)
this.hide(function () {
that.$element.off('.' + that.type).removeData('bs.' + that.type)
+ if (that.$tip) {
+ that.$tip.detach()
+ }
+ that.$tip = null
+ that.$arrow = null
+ that.$viewport = null
})
}
@@ -1718,7 +1762,7 @@
}(jQuery);
/* ========================================================================
- * Bootstrap: popover.js v3.3.4
+ * Bootstrap: popover.js v3.3.6
* http://getbootstrap.com/javascript/#popovers
* ========================================================================
* Copyright 2011-2015 Twitter, Inc.
@@ -1738,7 +1782,7 @@
if (!$.fn.tooltip) throw new Error('Popover requires tooltip.js')
- Popover.VERSION = '3.3.4'
+ Popover.VERSION = '3.3.6'
Popover.DEFAULTS = $.extend({}, $.fn.tooltip.Constructor.DEFAULTS, {
placement: 'right',
@@ -1827,7 +1871,7 @@
}(jQuery);
/* ========================================================================
- * Bootstrap: scrollspy.js v3.3.4
+ * Bootstrap: scrollspy.js v3.3.6
* http://getbootstrap.com/javascript/#scrollspy
* ========================================================================
* Copyright 2011-2015 Twitter, Inc.
@@ -1856,7 +1900,7 @@
this.process()
}
- ScrollSpy.VERSION = '3.3.4'
+ ScrollSpy.VERSION = '3.3.6'
ScrollSpy.DEFAULTS = {
offset: 10
@@ -2000,7 +2044,7 @@
}(jQuery);
/* ========================================================================
- * Bootstrap: tab.js v3.3.4
+ * Bootstrap: tab.js v3.3.6
* http://getbootstrap.com/javascript/#tabs
* ========================================================================
* Copyright 2011-2015 Twitter, Inc.
@@ -2015,10 +2059,12 @@
// ====================
var Tab = function (element) {
+ // jscs:disable requireDollarBeforejQueryAssignment
this.element = $(element)
+ // jscs:enable requireDollarBeforejQueryAssignment
}
- Tab.VERSION = '3.3.4'
+ Tab.VERSION = '3.3.6'
Tab.TRANSITION_DURATION = 150
@@ -2066,7 +2112,7 @@
var $active = container.find('> .active')
var transition = callback
&& $.support.transition
- && (($active.length && $active.hasClass('fade')) || !!container.find('> .fade').length)
+ && ($active.length && $active.hasClass('fade') || !!container.find('> .fade').length)
function next() {
$active
@@ -2154,7 +2200,7 @@
}(jQuery);
/* ========================================================================
- * Bootstrap: affix.js v3.3.4
+ * Bootstrap: affix.js v3.3.6
* http://getbootstrap.com/javascript/#affix
* ========================================================================
* Copyright 2011-2015 Twitter, Inc.
@@ -2183,7 +2229,7 @@
this.checkPosition()
}
- Affix.VERSION = '3.3.4'
+ Affix.VERSION = '3.3.6'
Affix.RESET = 'affix affix-top affix-bottom'
@@ -2233,7 +2279,7 @@
var offset = this.options.offset
var offsetTop = offset.top
var offsetBottom = offset.bottom
- var scrollHeight = $(document.body).height()
+ var scrollHeight = Math.max($(document).height(), $(document.body).height())
if (typeof offset != 'object') offsetBottom = offsetTop = offset
if (typeof offsetTop == 'function') offsetTop = offset.top(this.$element)
diff --git a/views/ngXosViews/serviceGrid/src/vendor/bootstrap-css/js/bootstrap.min.js b/views/ngXosViews/serviceGrid/src/vendor/bootstrap-css/js/bootstrap.min.js
new file mode 100644
index 0000000..e79c065
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/bootstrap-css/js/bootstrap.min.js
@@ -0,0 +1,7 @@
+/*!
+ * Bootstrap v3.3.6 (http://getbootstrap.com)
+ * Copyright 2011-2015 Twitter, Inc.
+ * Licensed under the MIT license
+ */
+if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(a){"use strict";var b=a.fn.jquery.split(" ")[0].split(".");if(b[0]<2&&b[1]<9||1==b[0]&&9==b[1]&&b[2]<1||b[0]>2)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 3")}(jQuery),+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]};return!1}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one("bsTransitionEnd",function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b(),a.support.transition&&(a.event.special.bsTransitionEnd={bindType:a.support.transition.end,delegateType:a.support.transition.end,handle:function(b){return a(b.target).is(this)?b.handleObj.handler.apply(this,arguments):void 0}})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var c=a(this),e=c.data("bs.alert");e||c.data("bs.alert",e=new d(this)),"string"==typeof b&&e[b].call(c)})}var c='[data-dismiss="alert"]',d=function(b){a(b).on("click",c,this.close)};d.VERSION="3.3.6",d.TRANSITION_DURATION=150,d.prototype.close=function(b){function c(){g.detach().trigger("closed.bs.alert").remove()}var e=a(this),f=e.attr("data-target");f||(f=e.attr("href"),f=f&&f.replace(/.*(?=#[^\s]*$)/,""));var g=a(f);b&&b.preventDefault(),g.length||(g=e.closest(".alert")),g.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(g.removeClass("in"),a.support.transition&&g.hasClass("fade")?g.one("bsTransitionEnd",c).emulateTransitionEnd(d.TRANSITION_DURATION):c())};var e=a.fn.alert;a.fn.alert=b,a.fn.alert.Constructor=d,a.fn.alert.noConflict=function(){return a.fn.alert=e,this},a(document).on("click.bs.alert.data-api",c,d.prototype.close)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof b&&b;e||d.data("bs.button",e=new c(this,f)),"toggle"==b?e.toggle():b&&e.setState(b)})}var c=function(b,d){this.$element=a(b),this.options=a.extend({},c.DEFAULTS,d),this.isLoading=!1};c.VERSION="3.3.6",c.DEFAULTS={loadingText:"loading..."},c.prototype.setState=function(b){var c="disabled",d=this.$element,e=d.is("input")?"val":"html",f=d.data();b+="Text",null==f.resetText&&d.data("resetText",d[e]()),setTimeout(a.proxy(function(){d[e](null==f[b]?this.options[b]:f[b]),"loadingText"==b?(this.isLoading=!0,d.addClass(c).attr(c,c)):this.isLoading&&(this.isLoading=!1,d.removeClass(c).removeAttr(c))},this),0)},c.prototype.toggle=function(){var a=!0,b=this.$element.closest('[data-toggle="buttons"]');if(b.length){var c=this.$element.find("input");"radio"==c.prop("type")?(c.prop("checked")&&(a=!1),b.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==c.prop("type")&&(c.prop("checked")!==this.$element.hasClass("active")&&(a=!1),this.$element.toggleClass("active")),c.prop("checked",this.$element.hasClass("active")),a&&c.trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active")};var d=a.fn.button;a.fn.button=b,a.fn.button.Constructor=c,a.fn.button.noConflict=function(){return a.fn.button=d,this},a(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(c){var d=a(c.target);d.hasClass("btn")||(d=d.closest(".btn")),b.call(d,"toggle"),a(c.target).is('input[type="radio"]')||a(c.target).is('input[type="checkbox"]')||c.preventDefault()}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(b){a(b.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(b.type))})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},c.DEFAULTS,d.data(),"object"==typeof b&&b),g="string"==typeof b?b:f.slide;e||d.data("bs.carousel",e=new c(this,f)),"number"==typeof b?e.to(b):g?e[g]():f.interval&&e.pause().cycle()})}var c=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",a.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",a.proxy(this.pause,this)).on("mouseleave.bs.carousel",a.proxy(this.cycle,this))};c.VERSION="3.3.6",c.TRANSITION_DURATION=600,c.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},c.prototype.keydown=function(a){if(!/input|textarea/i.test(a.target.tagName)){switch(a.which){case 37:this.prev();break;case 39:this.next();break;default:return}a.preventDefault()}},c.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},c.prototype.getItemIndex=function(a){return this.$items=a.parent().children(".item"),this.$items.index(a||this.$active)},c.prototype.getItemForDirection=function(a,b){var c=this.getItemIndex(b),d="prev"==a&&0===c||"next"==a&&c==this.$items.length-1;if(d&&!this.options.wrap)return b;var e="prev"==a?-1:1,f=(c+e)%this.$items.length;return this.$items.eq(f)},c.prototype.to=function(a){var b=this,c=this.getItemIndex(this.$active=this.$element.find(".item.active"));return a>this.$items.length-1||0>a?void 0:this.sliding?this.$element.one("slid.bs.carousel",function(){b.to(a)}):c==a?this.pause().cycle():this.slide(a>c?"next":"prev",this.$items.eq(a))},c.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},c.prototype.next=function(){return this.sliding?void 0:this.slide("next")},c.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},c.prototype.slide=function(b,d){var e=this.$element.find(".item.active"),f=d||this.getItemForDirection(b,e),g=this.interval,h="next"==b?"left":"right",i=this;if(f.hasClass("active"))return this.sliding=!1;var j=f[0],k=a.Event("slide.bs.carousel",{relatedTarget:j,direction:h});if(this.$element.trigger(k),!k.isDefaultPrevented()){if(this.sliding=!0,g&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var l=a(this.$indicators.children()[this.getItemIndex(f)]);l&&l.addClass("active")}var m=a.Event("slid.bs.carousel",{relatedTarget:j,direction:h});return a.support.transition&&this.$element.hasClass("slide")?(f.addClass(b),f[0].offsetWidth,e.addClass(h),f.addClass(h),e.one("bsTransitionEnd",function(){f.removeClass([b,h].join(" ")).addClass("active"),e.removeClass(["active",h].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger(m)},0)}).emulateTransitionEnd(c.TRANSITION_DURATION)):(e.removeClass("active"),f.addClass("active"),this.sliding=!1,this.$element.trigger(m)),g&&this.cycle(),this}};var d=a.fn.carousel;a.fn.carousel=b,a.fn.carousel.Constructor=c,a.fn.carousel.noConflict=function(){return a.fn.carousel=d,this};var e=function(c){var d,e=a(this),f=a(e.attr("data-target")||(d=e.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""));if(f.hasClass("carousel")){var g=a.extend({},f.data(),e.data()),h=e.attr("data-slide-to");h&&(g.interval=!1),b.call(f,g),h&&f.data("bs.carousel").to(h),c.preventDefault()}};a(document).on("click.bs.carousel.data-api","[data-slide]",e).on("click.bs.carousel.data-api","[data-slide-to]",e),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var c=a(this);b.call(c,c.data())})})}(jQuery),+function(a){"use strict";function b(b){var c,d=b.attr("data-target")||(c=b.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"");return a(d)}function c(b){return this.each(function(){var c=a(this),e=c.data("bs.collapse"),f=a.extend({},d.DEFAULTS,c.data(),"object"==typeof b&&b);!e&&f.toggle&&/show|hide/.test(b)&&(f.toggle=!1),e||c.data("bs.collapse",e=new d(this,f)),"string"==typeof b&&e[b]()})}var d=function(b,c){this.$element=a(b),this.options=a.extend({},d.DEFAULTS,c),this.$trigger=a('[data-toggle="collapse"][href="#'+b.id+'"],[data-toggle="collapse"][data-target="#'+b.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};d.VERSION="3.3.6",d.TRANSITION_DURATION=350,d.DEFAULTS={toggle:!0},d.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},d.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var b,e=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(e&&e.length&&(b=e.data("bs.collapse"),b&&b.transitioning))){var f=a.Event("show.bs.collapse");if(this.$element.trigger(f),!f.isDefaultPrevented()){e&&e.length&&(c.call(e,"hide"),b||e.data("bs.collapse",null));var g=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[g](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var h=function(){this.$element.removeClass("collapsing").addClass("collapse in")[g](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return h.call(this);var i=a.camelCase(["scroll",g].join("-"));this.$element.one("bsTransitionEnd",a.proxy(h,this)).emulateTransitionEnd(d.TRANSITION_DURATION)[g](this.$element[0][i])}}}},d.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var e=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};return a.support.transition?void this.$element[c](0).one("bsTransitionEnd",a.proxy(e,this)).emulateTransitionEnd(d.TRANSITION_DURATION):e.call(this)}}},d.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},d.prototype.getParent=function(){return a(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(a.proxy(function(c,d){var e=a(d);this.addAriaAndCollapsedClass(b(e),e)},this)).end()},d.prototype.addAriaAndCollapsedClass=function(a,b){var c=a.hasClass("in");a.attr("aria-expanded",c),b.toggleClass("collapsed",!c).attr("aria-expanded",c)};var e=a.fn.collapse;a.fn.collapse=c,a.fn.collapse.Constructor=d,a.fn.collapse.noConflict=function(){return a.fn.collapse=e,this},a(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(d){var e=a(this);e.attr("data-target")||d.preventDefault();var f=b(e),g=f.data("bs.collapse"),h=g?"toggle":e.data();c.call(f,h)})}(jQuery),+function(a){"use strict";function b(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#[A-Za-z]/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}function c(c){c&&3===c.which||(a(e).remove(),a(f).each(function(){var d=a(this),e=b(d),f={relatedTarget:this};e.hasClass("open")&&(c&&"click"==c.type&&/input|textarea/i.test(c.target.tagName)&&a.contains(e[0],c.target)||(e.trigger(c=a.Event("hide.bs.dropdown",f)),c.isDefaultPrevented()||(d.attr("aria-expanded","false"),e.removeClass("open").trigger(a.Event("hidden.bs.dropdown",f)))))}))}function d(b){return this.each(function(){var c=a(this),d=c.data("bs.dropdown");d||c.data("bs.dropdown",d=new g(this)),"string"==typeof b&&d[b].call(c)})}var e=".dropdown-backdrop",f='[data-toggle="dropdown"]',g=function(b){a(b).on("click.bs.dropdown",this.toggle)};g.VERSION="3.3.6",g.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=b(e),g=f.hasClass("open");if(c(),!g){"ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(a(this)).on("click",c);var h={relatedTarget:this};if(f.trigger(d=a.Event("show.bs.dropdown",h)),d.isDefaultPrevented())return;e.trigger("focus").attr("aria-expanded","true"),f.toggleClass("open").trigger(a.Event("shown.bs.dropdown",h))}return!1}},g.prototype.keydown=function(c){if(/(38|40|27|32)/.test(c.which)&&!/input|textarea/i.test(c.target.tagName)){var d=a(this);if(c.preventDefault(),c.stopPropagation(),!d.is(".disabled, :disabled")){var e=b(d),g=e.hasClass("open");if(!g&&27!=c.which||g&&27==c.which)return 27==c.which&&e.find(f).trigger("focus"),d.trigger("click");var h=" li:not(.disabled):visible a",i=e.find(".dropdown-menu"+h);if(i.length){var j=i.index(c.target);38==c.which&&j>0&&j--,40==c.which&&j<i.length-1&&j++,~j||(j=0),i.eq(j).trigger("focus")}}}};var h=a.fn.dropdown;a.fn.dropdown=d,a.fn.dropdown.Constructor=g,a.fn.dropdown.noConflict=function(){return a.fn.dropdown=h,this},a(document).on("click.bs.dropdown.data-api",c).on("click.bs.dropdown.data-api",".dropdown form",function(a){a.stopPropagation()}).on("click.bs.dropdown.data-api",f,g.prototype.toggle).on("keydown.bs.dropdown.data-api",f,g.prototype.keydown).on("keydown.bs.dropdown.data-api",".dropdown-menu",g.prototype.keydown)}(jQuery),+function(a){"use strict";function b(b,d){return this.each(function(){var e=a(this),f=e.data("bs.modal"),g=a.extend({},c.DEFAULTS,e.data(),"object"==typeof b&&b);f||e.data("bs.modal",f=new c(this,g)),"string"==typeof b?f[b](d):g.show&&f.show(d)})}var c=function(b,c){this.options=c,this.$body=a(document.body),this.$element=a(b),this.$dialog=this.$element.find(".modal-dialog"),this.$backdrop=null,this.isShown=null,this.originalBodyPad=null,this.scrollbarWidth=0,this.ignoreBackdropClick=!1,this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,a.proxy(function(){this.$element.trigger("loaded.bs.modal")},this))};c.VERSION="3.3.6",c.TRANSITION_DURATION=300,c.BACKDROP_TRANSITION_DURATION=150,c.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},c.prototype.toggle=function(a){return this.isShown?this.hide():this.show(a)},c.prototype.show=function(b){var d=this,e=a.Event("show.bs.modal",{relatedTarget:b});this.$element.trigger(e),this.isShown||e.isDefaultPrevented()||(this.isShown=!0,this.checkScrollbar(),this.setScrollbar(),this.$body.addClass("modal-open"),this.escape(),this.resize(),this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',a.proxy(this.hide,this)),this.$dialog.on("mousedown.dismiss.bs.modal",function(){d.$element.one("mouseup.dismiss.bs.modal",function(b){a(b.target).is(d.$element)&&(d.ignoreBackdropClick=!0)})}),this.backdrop(function(){var e=a.support.transition&&d.$element.hasClass("fade");d.$element.parent().length||d.$element.appendTo(d.$body),d.$element.show().scrollTop(0),d.adjustDialog(),e&&d.$element[0].offsetWidth,d.$element.addClass("in"),d.enforceFocus();var f=a.Event("shown.bs.modal",{relatedTarget:b});e?d.$dialog.one("bsTransitionEnd",function(){d.$element.trigger("focus").trigger(f)}).emulateTransitionEnd(c.TRANSITION_DURATION):d.$element.trigger("focus").trigger(f)}))},c.prototype.hide=function(b){b&&b.preventDefault(),b=a.Event("hide.bs.modal"),this.$element.trigger(b),this.isShown&&!b.isDefaultPrevented()&&(this.isShown=!1,this.escape(),this.resize(),a(document).off("focusin.bs.modal"),this.$element.removeClass("in").off("click.dismiss.bs.modal").off("mouseup.dismiss.bs.modal"),this.$dialog.off("mousedown.dismiss.bs.modal"),a.support.transition&&this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd",a.proxy(this.hideModal,this)).emulateTransitionEnd(c.TRANSITION_DURATION):this.hideModal())},c.prototype.enforceFocus=function(){a(document).off("focusin.bs.modal").on("focusin.bs.modal",a.proxy(function(a){this.$element[0]===a.target||this.$element.has(a.target).length||this.$element.trigger("focus")},this))},c.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keydown.dismiss.bs.modal",a.proxy(function(a){27==a.which&&this.hide()},this)):this.isShown||this.$element.off("keydown.dismiss.bs.modal")},c.prototype.resize=function(){this.isShown?a(window).on("resize.bs.modal",a.proxy(this.handleUpdate,this)):a(window).off("resize.bs.modal")},c.prototype.hideModal=function(){var a=this;this.$element.hide(),this.backdrop(function(){a.$body.removeClass("modal-open"),a.resetAdjustments(),a.resetScrollbar(),a.$element.trigger("hidden.bs.modal")})},c.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},c.prototype.backdrop=function(b){var d=this,e=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var f=a.support.transition&&e;if(this.$backdrop=a(document.createElement("div")).addClass("modal-backdrop "+e).appendTo(this.$body),this.$element.on("click.dismiss.bs.modal",a.proxy(function(a){return this.ignoreBackdropClick?void(this.ignoreBackdropClick=!1):void(a.target===a.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus():this.hide()))},this)),f&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!b)return;f?this.$backdrop.one("bsTransitionEnd",b).emulateTransitionEnd(c.BACKDROP_TRANSITION_DURATION):b()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass("in");var g=function(){d.removeBackdrop(),b&&b()};a.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",g).emulateTransitionEnd(c.BACKDROP_TRANSITION_DURATION):g()}else b&&b()},c.prototype.handleUpdate=function(){this.adjustDialog()},c.prototype.adjustDialog=function(){var a=this.$element[0].scrollHeight>document.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&a?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!a?this.scrollbarWidth:""})},c.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},c.prototype.checkScrollbar=function(){var a=window.innerWidth;if(!a){var b=document.documentElement.getBoundingClientRect();a=b.right-Math.abs(b.left)}this.bodyIsOverflowing=document.body.clientWidth<a,this.scrollbarWidth=this.measureScrollbar()},c.prototype.setScrollbar=function(){var a=parseInt(this.$body.css("padding-right")||0,10);this.originalBodyPad=document.body.style.paddingRight||"",this.bodyIsOverflowing&&this.$body.css("padding-right",a+this.scrollbarWidth)},c.prototype.resetScrollbar=function(){this.$body.css("padding-right",this.originalBodyPad)},c.prototype.measureScrollbar=function(){var a=document.createElement("div");a.className="modal-scrollbar-measure",this.$body.append(a);var b=a.offsetWidth-a.clientWidth;return this.$body[0].removeChild(a),b};var d=a.fn.modal;a.fn.modal=b,a.fn.modal.Constructor=c,a.fn.modal.noConflict=function(){return a.fn.modal=d,this},a(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(c){var d=a(this),e=d.attr("href"),f=a(d.attr("data-target")||e&&e.replace(/.*(?=#[^\s]+$)/,"")),g=f.data("bs.modal")?"toggle":a.extend({remote:!/#/.test(e)&&e},f.data(),d.data());d.is("a")&&c.preventDefault(),f.one("show.bs.modal",function(a){a.isDefaultPrevented()||f.one("hidden.bs.modal",function(){d.is(":visible")&&d.trigger("focus")})}),b.call(f,g,this)})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.tooltip"),f="object"==typeof b&&b;(e||!/destroy|hide/.test(b))&&(e||d.data("bs.tooltip",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.type=null,this.options=null,this.enabled=null,this.timeout=null,this.hoverState=null,this.$element=null,this.inState=null,this.init("tooltip",a,b)};c.VERSION="3.3.6",c.TRANSITION_DURATION=150,c.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},c.prototype.init=function(b,c,d){if(this.enabled=!0,this.type=b,this.$element=a(c),this.options=this.getOptions(d),this.$viewport=this.options.viewport&&a(a.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var e=this.options.trigger.split(" "),f=e.length;f--;){var g=e[f];if("click"==g)this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this));else if("manual"!=g){var h="hover"==g?"mouseenter":"focusin",i="hover"==g?"mouseleave":"focusout";this.$element.on(h+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(i+"."+this.type,this.options.selector,a.proxy(this.leave,this))}}this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.getOptions=function(b){return b=a.extend({},this.getDefaults(),this.$element.data(),b),b.delay&&"number"==typeof b.delay&&(b.delay={show:b.delay,hide:b.delay}),b},c.prototype.getDelegateOptions=function(){var b={},c=this.getDefaults();return this._options&&a.each(this._options,function(a,d){c[a]!=d&&(b[a]=d)}),b},c.prototype.enter=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),b instanceof a.Event&&(c.inState["focusin"==b.type?"focus":"hover"]=!0),c.tip().hasClass("in")||"in"==c.hoverState?void(c.hoverState="in"):(clearTimeout(c.timeout),c.hoverState="in",c.options.delay&&c.options.delay.show?void(c.timeout=setTimeout(function(){"in"==c.hoverState&&c.show()},c.options.delay.show)):c.show())},c.prototype.isInStateTrue=function(){for(var a in this.inState)if(this.inState[a])return!0;return!1},c.prototype.leave=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),b instanceof a.Event&&(c.inState["focusout"==b.type?"focus":"hover"]=!1),c.isInStateTrue()?void 0:(clearTimeout(c.timeout),c.hoverState="out",c.options.delay&&c.options.delay.hide?void(c.timeout=setTimeout(function(){"out"==c.hoverState&&c.hide()},c.options.delay.hide)):c.hide())},c.prototype.show=function(){var b=a.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(b);var d=a.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(b.isDefaultPrevented()||!d)return;var e=this,f=this.tip(),g=this.getUID(this.type);this.setContent(),f.attr("id",g),this.$element.attr("aria-describedby",g),this.options.animation&&f.addClass("fade");var h="function"==typeof this.options.placement?this.options.placement.call(this,f[0],this.$element[0]):this.options.placement,i=/\s?auto?\s?/i,j=i.test(h);j&&(h=h.replace(i,"")||"top"),f.detach().css({top:0,left:0,display:"block"}).addClass(h).data("bs."+this.type,this),this.options.container?f.appendTo(this.options.container):f.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var k=this.getPosition(),l=f[0].offsetWidth,m=f[0].offsetHeight;if(j){var n=h,o=this.getPosition(this.$viewport);h="bottom"==h&&k.bottom+m>o.bottom?"top":"top"==h&&k.top-m<o.top?"bottom":"right"==h&&k.right+l>o.width?"left":"left"==h&&k.left-l<o.left?"right":h,f.removeClass(n).addClass(h)}var p=this.getCalculatedOffset(h,k,l,m);this.applyPlacement(p,h);var q=function(){var a=e.hoverState;e.$element.trigger("shown.bs."+e.type),e.hoverState=null,"out"==a&&e.leave(e)};a.support.transition&&this.$tip.hasClass("fade")?f.one("bsTransitionEnd",q).emulateTransitionEnd(c.TRANSITION_DURATION):q()}},c.prototype.applyPlacement=function(b,c){var d=this.tip(),e=d[0].offsetWidth,f=d[0].offsetHeight,g=parseInt(d.css("margin-top"),10),h=parseInt(d.css("margin-left"),10);isNaN(g)&&(g=0),isNaN(h)&&(h=0),b.top+=g,b.left+=h,a.offset.setOffset(d[0],a.extend({using:function(a){d.css({top:Math.round(a.top),left:Math.round(a.left)})}},b),0),d.addClass("in");var i=d[0].offsetWidth,j=d[0].offsetHeight;"top"==c&&j!=f&&(b.top=b.top+f-j);var k=this.getViewportAdjustedDelta(c,b,i,j);k.left?b.left+=k.left:b.top+=k.top;var l=/top|bottom/.test(c),m=l?2*k.left-e+i:2*k.top-f+j,n=l?"offsetWidth":"offsetHeight";d.offset(b),this.replaceArrow(m,d[0][n],l)},c.prototype.replaceArrow=function(a,b,c){this.arrow().css(c?"left":"top",50*(1-a/b)+"%").css(c?"top":"left","")},c.prototype.setContent=function(){var a=this.tip(),b=this.getTitle();a.find(".tooltip-inner")[this.options.html?"html":"text"](b),a.removeClass("fade in top bottom left right")},c.prototype.hide=function(b){function d(){"in"!=e.hoverState&&f.detach(),e.$element.removeAttr("aria-describedby").trigger("hidden.bs."+e.type),b&&b()}var e=this,f=a(this.$tip),g=a.Event("hide.bs."+this.type);return this.$element.trigger(g),g.isDefaultPrevented()?void 0:(f.removeClass("in"),a.support.transition&&f.hasClass("fade")?f.one("bsTransitionEnd",d).emulateTransitionEnd(c.TRANSITION_DURATION):d(),this.hoverState=null,this)},c.prototype.fixTitle=function(){var a=this.$element;(a.attr("title")||"string"!=typeof a.attr("data-original-title"))&&a.attr("data-original-title",a.attr("title")||"").attr("title","")},c.prototype.hasContent=function(){return this.getTitle()},c.prototype.getPosition=function(b){b=b||this.$element;var c=b[0],d="BODY"==c.tagName,e=c.getBoundingClientRect();null==e.width&&(e=a.extend({},e,{width:e.right-e.left,height:e.bottom-e.top}));var f=d?{top:0,left:0}:b.offset(),g={scroll:d?document.documentElement.scrollTop||document.body.scrollTop:b.scrollTop()},h=d?{width:a(window).width(),height:a(window).height()}:null;return a.extend({},e,g,h,f)},c.prototype.getCalculatedOffset=function(a,b,c,d){return"bottom"==a?{top:b.top+b.height,left:b.left+b.width/2-c/2}:"top"==a?{top:b.top-d,left:b.left+b.width/2-c/2}:"left"==a?{top:b.top+b.height/2-d/2,left:b.left-c}:{top:b.top+b.height/2-d/2,left:b.left+b.width}},c.prototype.getViewportAdjustedDelta=function(a,b,c,d){var e={top:0,left:0};if(!this.$viewport)return e;var f=this.options.viewport&&this.options.viewport.padding||0,g=this.getPosition(this.$viewport);if(/right|left/.test(a)){var h=b.top-f-g.scroll,i=b.top+f-g.scroll+d;h<g.top?e.top=g.top-h:i>g.top+g.height&&(e.top=g.top+g.height-i)}else{var j=b.left-f,k=b.left+f+c;j<g.left?e.left=g.left-j:k>g.right&&(e.left=g.left+g.width-k)}return e},c.prototype.getTitle=function(){var a,b=this.$element,c=this.options;return a=b.attr("data-original-title")||("function"==typeof c.title?c.title.call(b[0]):c.title)},c.prototype.getUID=function(a){do a+=~~(1e6*Math.random());while(document.getElementById(a));return a},c.prototype.tip=function(){if(!this.$tip&&(this.$tip=a(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},c.prototype.enable=function(){this.enabled=!0},c.prototype.disable=function(){this.enabled=!1},c.prototype.toggleEnabled=function(){this.enabled=!this.enabled},c.prototype.toggle=function(b){var c=this;b&&(c=a(b.currentTarget).data("bs."+this.type),c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c))),b?(c.inState.click=!c.inState.click,c.isInStateTrue()?c.enter(c):c.leave(c)):c.tip().hasClass("in")?c.leave(c):c.enter(c)},c.prototype.destroy=function(){var a=this;clearTimeout(this.timeout),this.hide(function(){a.$element.off("."+a.type).removeData("bs."+a.type),a.$tip&&a.$tip.detach(),a.$tip=null,a.$arrow=null,a.$viewport=null})};var d=a.fn.tooltip;a.fn.tooltip=b,a.fn.tooltip.Constructor=c,a.fn.tooltip.noConflict=function(){return a.fn.tooltip=d,this}}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof b&&b;(e||!/destroy|hide/.test(b))&&(e||d.data("bs.popover",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.init("popover",a,b)};if(!a.fn.tooltip)throw new Error("Popover requires tooltip.js");c.VERSION="3.3.6",c.DEFAULTS=a.extend({},a.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),c.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),c.prototype.constructor=c,c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof c?"html":"append":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},c.prototype.hasContent=function(){return this.getTitle()||this.getContent()},c.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var d=a.fn.popover;a.fn.popover=b,a.fn.popover.Constructor=c,a.fn.popover.noConflict=function(){return a.fn.popover=d,this}}(jQuery),+function(a){"use strict";function b(c,d){this.$body=a(document.body),this.$scrollElement=a(a(c).is(document.body)?window:c),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",a.proxy(this.process,this)),this.refresh(),this.process()}function c(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})}b.VERSION="3.3.6",b.DEFAULTS={offset:10},b.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},b.prototype.refresh=function(){var b=this,c="offset",d=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),a.isWindow(this.$scrollElement[0])||(c="position",d=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var b=a(this),e=b.data("target")||b.attr("href"),f=/^#./.test(e)&&a(e);return f&&f.length&&f.is(":visible")&&[[f[c]().top+d,e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){b.offsets.push(this[0]),b.targets.push(this[1])})},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.getScrollHeight(),d=this.options.offset+c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(this.scrollHeight!=c&&this.refresh(),b>=d)return g!=(a=f[f.length-1])&&this.activate(a);if(g&&b<e[0])return this.activeTarget=null,this.clear();for(a=e.length;a--;)g!=f[a]&&b>=e[a]&&(void 0===e[a+1]||b<e[a+1])&&this.activate(f[a])},b.prototype.activate=function(b){this.activeTarget=b,this.clear();var c=this.selector+'[data-target="'+b+'"],'+this.selector+'[href="'+b+'"]',d=a(c).parents("li").addClass("active");
+d.parent(".dropdown-menu").length&&(d=d.closest("li.dropdown").addClass("active")),d.trigger("activate.bs.scrollspy")},b.prototype.clear=function(){a(this.selector).parentsUntil(this.options.target,".active").removeClass("active")};var d=a.fn.scrollspy;a.fn.scrollspy=c,a.fn.scrollspy.Constructor=b,a.fn.scrollspy.noConflict=function(){return a.fn.scrollspy=d,this},a(window).on("load.bs.scrollspy.data-api",function(){a('[data-spy="scroll"]').each(function(){var b=a(this);c.call(b,b.data())})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.tab");e||d.data("bs.tab",e=new c(this)),"string"==typeof b&&e[b]()})}var c=function(b){this.element=a(b)};c.VERSION="3.3.6",c.TRANSITION_DURATION=150,c.prototype.show=function(){var b=this.element,c=b.closest("ul:not(.dropdown-menu)"),d=b.data("target");if(d||(d=b.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,"")),!b.parent("li").hasClass("active")){var e=c.find(".active:last a"),f=a.Event("hide.bs.tab",{relatedTarget:b[0]}),g=a.Event("show.bs.tab",{relatedTarget:e[0]});if(e.trigger(f),b.trigger(g),!g.isDefaultPrevented()&&!f.isDefaultPrevented()){var h=a(d);this.activate(b.closest("li"),c),this.activate(h,h.parent(),function(){e.trigger({type:"hidden.bs.tab",relatedTarget:b[0]}),b.trigger({type:"shown.bs.tab",relatedTarget:e[0]})})}}},c.prototype.activate=function(b,d,e){function f(){g.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),b.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),h?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu").length&&b.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),e&&e()}var g=d.find("> .active"),h=e&&a.support.transition&&(g.length&&g.hasClass("fade")||!!d.find("> .fade").length);g.length&&h?g.one("bsTransitionEnd",f).emulateTransitionEnd(c.TRANSITION_DURATION):f(),g.removeClass("in")};var d=a.fn.tab;a.fn.tab=b,a.fn.tab.Constructor=c,a.fn.tab.noConflict=function(){return a.fn.tab=d,this};var e=function(c){c.preventDefault(),b.call(a(this),"show")};a(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',e).on("click.bs.tab.data-api",'[data-toggle="pill"]',e)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof b&&b;e||d.data("bs.affix",e=new c(this,f)),"string"==typeof b&&e[b]()})}var c=function(b,d){this.options=a.extend({},c.DEFAULTS,d),this.$target=a(this.options.target).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(b),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};c.VERSION="3.3.6",c.RESET="affix affix-top affix-bottom",c.DEFAULTS={offset:0,target:window},c.prototype.getState=function(a,b,c,d){var e=this.$target.scrollTop(),f=this.$element.offset(),g=this.$target.height();if(null!=c&&"top"==this.affixed)return c>e?"top":!1;if("bottom"==this.affixed)return null!=c?e+this.unpin<=f.top?!1:"bottom":a-d>=e+g?!1:"bottom";var h=null==this.affixed,i=h?e:f.top,j=h?g:b;return null!=c&&c>=e?"top":null!=d&&i+j>=a-d?"bottom":!1},c.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(c.RESET).addClass("affix");var a=this.$target.scrollTop(),b=this.$element.offset();return this.pinnedOffset=b.top-a},c.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},c.prototype.checkPosition=function(){if(this.$element.is(":visible")){var b=this.$element.height(),d=this.options.offset,e=d.top,f=d.bottom,g=Math.max(a(document).height(),a(document.body).height());"object"!=typeof d&&(f=e=d),"function"==typeof e&&(e=d.top(this.$element)),"function"==typeof f&&(f=d.bottom(this.$element));var h=this.getState(g,b,e,f);if(this.affixed!=h){null!=this.unpin&&this.$element.css("top","");var i="affix"+(h?"-"+h:""),j=a.Event(i+".bs.affix");if(this.$element.trigger(j),j.isDefaultPrevented())return;this.affixed=h,this.unpin="bottom"==h?this.getPinnedOffset():null,this.$element.removeClass(c.RESET).addClass(i).trigger(i.replace("affix","affixed")+".bs.affix")}"bottom"==h&&this.$element.offset({top:g-b-f})}};var d=a.fn.affix;a.fn.affix=b,a.fn.affix.Constructor=c,a.fn.affix.noConflict=function(){return a.fn.affix=d,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var c=a(this),d=c.data();d.offset=d.offset||{},null!=d.offsetBottom&&(d.offset.bottom=d.offsetBottom),null!=d.offsetTop&&(d.offset.top=d.offsetTop),b.call(c,d)})})}(jQuery);
\ No newline at end of file
diff --git a/views/ngXosViews/serviceGrid/src/vendor/d3/.bower.json b/views/ngXosViews/serviceGrid/src/vendor/d3/.bower.json
new file mode 100644
index 0000000..8a4a5dd
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/d3/.bower.json
@@ -0,0 +1,18 @@
+{
+ "name": "d3",
+ "description": "A JavaScript visualization library for HTML and SVG.",
+ "main": "d3.js",
+ "license": "BSD-3-Clause",
+ "ignore": [],
+ "homepage": "https://github.com/mbostock-bower/d3-bower",
+ "version": "3.5.17",
+ "_release": "3.5.17",
+ "_resolution": {
+ "type": "version",
+ "tag": "v3.5.17",
+ "commit": "abe0262a205c9f3755c3a757de4dfd1d49f34b24"
+ },
+ "_source": "https://github.com/mbostock-bower/d3-bower.git",
+ "_target": "~3.5.13",
+ "_originalSource": "d3"
+}
\ No newline at end of file
diff --git a/views/ngXosViews/serviceGrid/src/vendor/d3/LICENSE b/views/ngXosViews/serviceGrid/src/vendor/d3/LICENSE
new file mode 100644
index 0000000..ff3f2e5
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/d3/LICENSE
@@ -0,0 +1,26 @@
+Copyright (c) 2010-2016, 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.
diff --git a/views/ngXosViews/serviceGrid/src/vendor/d3/README.md b/views/ngXosViews/serviceGrid/src/vendor/d3/README.md
new file mode 100644
index 0000000..33e97bf
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/d3/README.md
@@ -0,0 +1,13 @@
+# Data-Driven Documents
+
+<a href="https://d3js.org"><img src="https://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** emphasizes web standards and combines powerful visualization components with a data-driven approach to DOM manipulation, giving you the full capabilities of modern browsers without tying yourself to a proprietary framework.
+
+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).
+
+## Good News, Everyone!
+
+The next major release of D3, 4.0, is coming! See the [4.0 development branch](https://github.com/mbostock/d3/tree/4) and read the [new API reference](https://github.com/mbostock/d3/blob/4/README.md) to get ready.
diff --git a/views/ngXosViews/serviceGrid/src/vendor/d3/bower.json b/views/ngXosViews/serviceGrid/src/vendor/d3/bower.json
new file mode 100644
index 0000000..5bc3d41
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/d3/bower.json
@@ -0,0 +1,7 @@
+{
+ "name": "d3",
+ "description": "A JavaScript visualization library for HTML and SVG.",
+ "main": "d3.js",
+ "license": "BSD-3-Clause",
+ "ignore": []
+}
diff --git a/views/ngXosViews/serviceGrid/src/vendor/d3/d3.js b/views/ngXosViews/serviceGrid/src/vendor/d3/d3.js
new file mode 100644
index 0000000..aded45c
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/d3/d3.js
@@ -0,0 +1,9554 @@
+!function() {
+ var d3 = {
+ version: "3.5.17"
+ };
+ var d3_arraySlice = [].slice, d3_array = function(list) {
+ return d3_arraySlice.call(list);
+ };
+ var d3_document = this.document;
+ function d3_documentElement(node) {
+ return node && (node.ownerDocument || node.document || node).documentElement;
+ }
+ function d3_window(node) {
+ return node && (node.ownerDocument && node.ownerDocument.defaultView || node.document && node || node.defaultView);
+ }
+ if (d3_document) {
+ try {
+ d3_array(d3_document.documentElement.childNodes)[0].nodeType;
+ } catch (e) {
+ d3_array = function(list) {
+ var i = list.length, array = new Array(i);
+ while (i--) array[i] = list[i];
+ return array;
+ };
+ }
+ }
+ if (!Date.now) Date.now = function() {
+ return +new Date();
+ };
+ if (d3_document) {
+ try {
+ d3_document.createElement("DIV").style.setProperty("opacity", 0, "");
+ } catch (error) {
+ var d3_element_prototype = this.Element.prototype, d3_element_setAttribute = d3_element_prototype.setAttribute, d3_element_setAttributeNS = d3_element_prototype.setAttributeNS, d3_style_prototype = this.CSSStyleDeclaration.prototype, d3_style_setProperty = d3_style_prototype.setProperty;
+ d3_element_prototype.setAttribute = function(name, value) {
+ d3_element_setAttribute.call(this, name, value + "");
+ };
+ d3_element_prototype.setAttributeNS = function(space, local, value) {
+ d3_element_setAttributeNS.call(this, space, local, value + "");
+ };
+ d3_style_prototype.setProperty = function(name, value, priority) {
+ d3_style_setProperty.call(this, name, value + "", priority);
+ };
+ }
+ }
+ d3.ascending = d3_ascending;
+ function d3_ascending(a, b) {
+ return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN;
+ }
+ d3.descending = function(a, b) {
+ return b < a ? -1 : b > a ? 1 : b >= a ? 0 : NaN;
+ };
+ d3.min = function(array, f) {
+ var i = -1, n = array.length, a, b;
+ if (arguments.length === 1) {
+ while (++i < n) if ((b = array[i]) != null && b >= b) {
+ a = b;
+ break;
+ }
+ while (++i < n) if ((b = array[i]) != null && a > b) a = b;
+ } else {
+ while (++i < n) if ((b = f.call(array, array[i], i)) != null && b >= b) {
+ a = b;
+ break;
+ }
+ while (++i < n) if ((b = f.call(array, array[i], i)) != null && a > b) a = b;
+ }
+ return a;
+ };
+ d3.max = function(array, f) {
+ var i = -1, n = array.length, a, b;
+ if (arguments.length === 1) {
+ while (++i < n) if ((b = array[i]) != null && b >= b) {
+ a = b;
+ break;
+ }
+ while (++i < n) if ((b = array[i]) != null && b > a) a = b;
+ } else {
+ while (++i < n) if ((b = f.call(array, array[i], i)) != null && b >= b) {
+ a = b;
+ break;
+ }
+ while (++i < n) if ((b = f.call(array, array[i], i)) != null && b > a) a = b;
+ }
+ return a;
+ };
+ d3.extent = function(array, f) {
+ var i = -1, n = array.length, a, b, c;
+ if (arguments.length === 1) {
+ while (++i < n) if ((b = array[i]) != null && b >= b) {
+ a = c = b;
+ break;
+ }
+ while (++i < n) if ((b = array[i]) != null) {
+ if (a > b) a = b;
+ if (c < b) c = b;
+ }
+ } else {
+ while (++i < n) if ((b = f.call(array, array[i], i)) != null && b >= b) {
+ a = c = b;
+ break;
+ }
+ while (++i < n) if ((b = f.call(array, array[i], i)) != null) {
+ if (a > b) a = b;
+ if (c < b) c = b;
+ }
+ }
+ return [ a, c ];
+ };
+ function d3_number(x) {
+ return x === null ? NaN : +x;
+ }
+ function d3_numeric(x) {
+ return !isNaN(x);
+ }
+ d3.sum = function(array, f) {
+ var s = 0, n = array.length, a, i = -1;
+ if (arguments.length === 1) {
+ while (++i < n) if (d3_numeric(a = +array[i])) s += a;
+ } else {
+ while (++i < n) if (d3_numeric(a = +f.call(array, array[i], i))) s += a;
+ }
+ return s;
+ };
+ d3.mean = function(array, f) {
+ var s = 0, n = array.length, a, i = -1, j = n;
+ if (arguments.length === 1) {
+ while (++i < n) if (d3_numeric(a = d3_number(array[i]))) s += a; else --j;
+ } else {
+ while (++i < n) if (d3_numeric(a = d3_number(f.call(array, array[i], i)))) s += a; else --j;
+ }
+ if (j) return s / j;
+ };
+ d3.quantile = function(values, p) {
+ var H = (values.length - 1) * p + 1, h = Math.floor(H), v = +values[h - 1], e = H - h;
+ return e ? v + e * (values[h] - v) : v;
+ };
+ d3.median = function(array, f) {
+ var numbers = [], n = array.length, a, i = -1;
+ if (arguments.length === 1) {
+ while (++i < n) if (d3_numeric(a = d3_number(array[i]))) numbers.push(a);
+ } else {
+ while (++i < n) if (d3_numeric(a = d3_number(f.call(array, array[i], i)))) numbers.push(a);
+ }
+ if (numbers.length) return d3.quantile(numbers.sort(d3_ascending), .5);
+ };
+ d3.variance = function(array, f) {
+ var n = array.length, m = 0, a, d, s = 0, i = -1, j = 0;
+ if (arguments.length === 1) {
+ while (++i < n) {
+ if (d3_numeric(a = d3_number(array[i]))) {
+ d = a - m;
+ m += d / ++j;
+ s += d * (a - m);
+ }
+ }
+ } else {
+ while (++i < n) {
+ if (d3_numeric(a = d3_number(f.call(array, array[i], i)))) {
+ d = a - m;
+ m += d / ++j;
+ s += d * (a - m);
+ }
+ }
+ }
+ if (j > 1) return s / (j - 1);
+ };
+ d3.deviation = function() {
+ var v = d3.variance.apply(this, arguments);
+ return v ? Math.sqrt(v) : v;
+ };
+ function d3_bisector(compare) {
+ return {
+ left: function(a, x, lo, hi) {
+ if (arguments.length < 3) lo = 0;
+ if (arguments.length < 4) hi = a.length;
+ while (lo < hi) {
+ var mid = lo + hi >>> 1;
+ if (compare(a[mid], x) < 0) lo = mid + 1; else hi = mid;
+ }
+ return lo;
+ },
+ right: function(a, x, lo, hi) {
+ if (arguments.length < 3) lo = 0;
+ if (arguments.length < 4) hi = a.length;
+ while (lo < hi) {
+ var mid = lo + hi >>> 1;
+ if (compare(a[mid], x) > 0) hi = mid; else lo = mid + 1;
+ }
+ return lo;
+ }
+ };
+ }
+ var d3_bisect = d3_bisector(d3_ascending);
+ d3.bisectLeft = d3_bisect.left;
+ d3.bisect = d3.bisectRight = d3_bisect.right;
+ d3.bisector = function(f) {
+ return d3_bisector(f.length === 1 ? function(d, x) {
+ return d3_ascending(f(d), x);
+ } : f);
+ };
+ d3.shuffle = function(array, i0, i1) {
+ if ((m = arguments.length) < 3) {
+ i1 = array.length;
+ if (m < 2) i0 = 0;
+ }
+ var m = i1 - i0, t, i;
+ while (m) {
+ i = Math.random() * m-- | 0;
+ t = array[m + i0], array[m + i0] = array[i + i0], array[i + i0] = t;
+ }
+ return array;
+ };
+ d3.permute = function(array, indexes) {
+ var i = indexes.length, permutes = new Array(i);
+ while (i--) permutes[i] = array[indexes[i]];
+ return permutes;
+ };
+ d3.pairs = function(array) {
+ var i = 0, n = array.length - 1, p0, p1 = array[0], pairs = new Array(n < 0 ? 0 : n);
+ while (i < n) pairs[i] = [ p0 = p1, p1 = array[++i] ];
+ return pairs;
+ };
+ d3.transpose = function(matrix) {
+ if (!(n = matrix.length)) return [];
+ for (var i = -1, m = d3.min(matrix, d3_transposeLength), transpose = new Array(m); ++i < m; ) {
+ for (var j = -1, n, row = transpose[i] = new Array(n); ++j < n; ) {
+ row[j] = matrix[j][i];
+ }
+ }
+ return transpose;
+ };
+ function d3_transposeLength(d) {
+ return d.length;
+ }
+ d3.zip = function() {
+ return d3.transpose(arguments);
+ };
+ d3.keys = function(map) {
+ var keys = [];
+ for (var key in map) keys.push(key);
+ return keys;
+ };
+ d3.values = function(map) {
+ var values = [];
+ for (var key in map) values.push(map[key]);
+ return values;
+ };
+ d3.entries = function(map) {
+ var entries = [];
+ for (var key in map) entries.push({
+ key: key,
+ value: map[key]
+ });
+ return entries;
+ };
+ d3.merge = function(arrays) {
+ var n = arrays.length, m, i = -1, j = 0, merged, array;
+ while (++i < n) j += arrays[i].length;
+ merged = new Array(j);
+ while (--n >= 0) {
+ array = arrays[n];
+ m = array.length;
+ while (--m >= 0) {
+ merged[--j] = array[m];
+ }
+ }
+ return merged;
+ };
+ var abs = Math.abs;
+ d3.range = function(start, stop, step) {
+ if (arguments.length < 3) {
+ step = 1;
+ if (arguments.length < 2) {
+ stop = start;
+ start = 0;
+ }
+ }
+ if ((stop - start) / step === Infinity) throw new Error("infinite range");
+ var range = [], k = d3_range_integerScale(abs(step)), i = -1, j;
+ start *= k, stop *= k, step *= k;
+ if (step < 0) while ((j = start + step * ++i) > stop) range.push(j / k); else while ((j = start + step * ++i) < stop) range.push(j / k);
+ return range;
+ };
+ function d3_range_integerScale(x) {
+ var k = 1;
+ while (x * k % 1) k *= 10;
+ return k;
+ }
+ function d3_class(ctor, properties) {
+ for (var key in properties) {
+ Object.defineProperty(ctor.prototype, key, {
+ value: properties[key],
+ enumerable: false
+ });
+ }
+ }
+ d3.map = function(object, f) {
+ var map = new d3_Map();
+ if (object instanceof d3_Map) {
+ object.forEach(function(key, value) {
+ map.set(key, value);
+ });
+ } else if (Array.isArray(object)) {
+ var i = -1, n = object.length, o;
+ if (arguments.length === 1) while (++i < n) map.set(i, object[i]); else while (++i < n) map.set(f.call(object, o = object[i], i), o);
+ } else {
+ for (var key in object) map.set(key, object[key]);
+ }
+ return map;
+ };
+ function d3_Map() {
+ this._ = Object.create(null);
+ }
+ var d3_map_proto = "__proto__", d3_map_zero = "\x00";
+ d3_class(d3_Map, {
+ has: d3_map_has,
+ get: function(key) {
+ return this._[d3_map_escape(key)];
+ },
+ set: function(key, value) {
+ return this._[d3_map_escape(key)] = value;
+ },
+ remove: d3_map_remove,
+ keys: d3_map_keys,
+ values: function() {
+ var values = [];
+ for (var key in this._) values.push(this._[key]);
+ return values;
+ },
+ entries: function() {
+ var entries = [];
+ for (var key in this._) entries.push({
+ key: d3_map_unescape(key),
+ value: this._[key]
+ });
+ return entries;
+ },
+ size: d3_map_size,
+ empty: d3_map_empty,
+ forEach: function(f) {
+ for (var key in this._) f.call(this, d3_map_unescape(key), this._[key]);
+ }
+ });
+ function d3_map_escape(key) {
+ return (key += "") === d3_map_proto || key[0] === d3_map_zero ? d3_map_zero + key : key;
+ }
+ function d3_map_unescape(key) {
+ return (key += "")[0] === d3_map_zero ? key.slice(1) : key;
+ }
+ function d3_map_has(key) {
+ return d3_map_escape(key) in this._;
+ }
+ function d3_map_remove(key) {
+ return (key = d3_map_escape(key)) in this._ && delete this._[key];
+ }
+ function d3_map_keys() {
+ var keys = [];
+ for (var key in this._) keys.push(d3_map_unescape(key));
+ return keys;
+ }
+ function d3_map_size() {
+ var size = 0;
+ for (var key in this._) ++size;
+ return size;
+ }
+ function d3_map_empty() {
+ for (var key in this._) return false;
+ return true;
+ }
+ d3.nest = function() {
+ var nest = {}, keys = [], sortKeys = [], sortValues, rollup;
+ function map(mapType, array, depth) {
+ if (depth >= keys.length) return rollup ? rollup.call(nest, array) : sortValues ? array.sort(sortValues) : array;
+ var i = -1, n = array.length, key = keys[depth++], keyValue, object, setter, valuesByKey = new d3_Map(), values;
+ while (++i < n) {
+ if (values = valuesByKey.get(keyValue = key(object = array[i]))) {
+ values.push(object);
+ } else {
+ valuesByKey.set(keyValue, [ object ]);
+ }
+ }
+ if (mapType) {
+ object = mapType();
+ setter = function(keyValue, values) {
+ object.set(keyValue, map(mapType, values, depth));
+ };
+ } else {
+ object = {};
+ setter = function(keyValue, values) {
+ object[keyValue] = map(mapType, values, depth);
+ };
+ }
+ valuesByKey.forEach(setter);
+ return object;
+ }
+ function entries(map, depth) {
+ if (depth >= keys.length) return map;
+ var array = [], sortKey = sortKeys[depth++];
+ map.forEach(function(key, keyMap) {
+ array.push({
+ key: key,
+ values: entries(keyMap, depth)
+ });
+ });
+ return sortKey ? array.sort(function(a, b) {
+ return sortKey(a.key, b.key);
+ }) : array;
+ }
+ nest.map = function(array, mapType) {
+ return map(mapType, array, 0);
+ };
+ nest.entries = function(array) {
+ return entries(map(d3.map, array, 0), 0);
+ };
+ nest.key = function(d) {
+ keys.push(d);
+ return nest;
+ };
+ nest.sortKeys = function(order) {
+ sortKeys[keys.length - 1] = order;
+ return nest;
+ };
+ nest.sortValues = function(order) {
+ sortValues = order;
+ return nest;
+ };
+ nest.rollup = function(f) {
+ rollup = f;
+ return nest;
+ };
+ return nest;
+ };
+ d3.set = function(array) {
+ var set = new d3_Set();
+ if (array) for (var i = 0, n = array.length; i < n; ++i) set.add(array[i]);
+ return set;
+ };
+ function d3_Set() {
+ this._ = Object.create(null);
+ }
+ d3_class(d3_Set, {
+ has: d3_map_has,
+ add: function(key) {
+ this._[d3_map_escape(key += "")] = true;
+ return key;
+ },
+ remove: d3_map_remove,
+ values: d3_map_keys,
+ size: d3_map_size,
+ empty: d3_map_empty,
+ forEach: function(f) {
+ for (var key in this._) f.call(this, d3_map_unescape(key));
+ }
+ });
+ d3.behavior = {};
+ function d3_identity(d) {
+ return d;
+ }
+ d3.rebind = function(target, source) {
+ var i = 1, n = arguments.length, method;
+ while (++i < n) target[method = arguments[i]] = d3_rebind(target, source, source[method]);
+ return target;
+ };
+ function d3_rebind(target, source, method) {
+ return function() {
+ var value = method.apply(source, arguments);
+ return value === source ? target : value;
+ };
+ }
+ function d3_vendorSymbol(object, name) {
+ if (name in object) return name;
+ name = name.charAt(0).toUpperCase() + name.slice(1);
+ for (var i = 0, n = d3_vendorPrefixes.length; i < n; ++i) {
+ var prefixName = d3_vendorPrefixes[i] + name;
+ if (prefixName in object) return prefixName;
+ }
+ }
+ var d3_vendorPrefixes = [ "webkit", "ms", "moz", "Moz", "o", "O" ];
+ function d3_noop() {}
+ d3.dispatch = function() {
+ var dispatch = new d3_dispatch(), i = -1, n = arguments.length;
+ while (++i < n) dispatch[arguments[i]] = d3_dispatch_event(dispatch);
+ return dispatch;
+ };
+ function d3_dispatch() {}
+ d3_dispatch.prototype.on = function(type, listener) {
+ var i = type.indexOf("."), name = "";
+ if (i >= 0) {
+ name = type.slice(i + 1);
+ type = type.slice(0, i);
+ }
+ if (type) return arguments.length < 2 ? this[type].on(name) : this[type].on(name, listener);
+ if (arguments.length === 2) {
+ if (listener == null) for (type in this) {
+ if (this.hasOwnProperty(type)) this[type].on(name, null);
+ }
+ return this;
+ }
+ };
+ function d3_dispatch_event(dispatch) {
+ var listeners = [], listenerByName = new d3_Map();
+ function event() {
+ var z = listeners, i = -1, n = z.length, l;
+ while (++i < n) if (l = z[i].on) l.apply(this, arguments);
+ return dispatch;
+ }
+ event.on = function(name, listener) {
+ var l = listenerByName.get(name), i;
+ if (arguments.length < 2) return l && l.on;
+ if (l) {
+ l.on = null;
+ listeners = listeners.slice(0, i = listeners.indexOf(l)).concat(listeners.slice(i + 1));
+ listenerByName.remove(name);
+ }
+ if (listener) listeners.push(listenerByName.set(name, {
+ on: listener
+ }));
+ return dispatch;
+ };
+ return event;
+ }
+ d3.event = null;
+ function d3_eventPreventDefault() {
+ d3.event.preventDefault();
+ }
+ function d3_eventSource() {
+ var e = d3.event, s;
+ while (s = e.sourceEvent) e = s;
+ return e;
+ }
+ function d3_eventDispatch(target) {
+ var dispatch = new d3_dispatch(), i = 0, n = arguments.length;
+ while (++i < n) dispatch[arguments[i]] = d3_dispatch_event(dispatch);
+ dispatch.of = function(thiz, argumentz) {
+ return function(e1) {
+ try {
+ var e0 = e1.sourceEvent = d3.event;
+ e1.target = target;
+ d3.event = e1;
+ dispatch[e1.type].apply(thiz, argumentz);
+ } finally {
+ d3.event = e0;
+ }
+ };
+ };
+ return dispatch;
+ }
+ d3.requote = function(s) {
+ return s.replace(d3_requote_re, "\\$&");
+ };
+ var d3_requote_re = /[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g;
+ var d3_subclass = {}.__proto__ ? function(object, prototype) {
+ object.__proto__ = prototype;
+ } : function(object, prototype) {
+ for (var property in prototype) object[property] = prototype[property];
+ };
+ function d3_selection(groups) {
+ d3_subclass(groups, d3_selectionPrototype);
+ return groups;
+ }
+ var d3_select = function(s, n) {
+ return n.querySelector(s);
+ }, d3_selectAll = function(s, n) {
+ return n.querySelectorAll(s);
+ }, d3_selectMatches = function(n, s) {
+ var d3_selectMatcher = n.matches || n[d3_vendorSymbol(n, "matchesSelector")];
+ d3_selectMatches = function(n, s) {
+ return d3_selectMatcher.call(n, s);
+ };
+ return d3_selectMatches(n, s);
+ };
+ if (typeof Sizzle === "function") {
+ d3_select = function(s, n) {
+ return Sizzle(s, n)[0] || null;
+ };
+ d3_selectAll = Sizzle;
+ d3_selectMatches = Sizzle.matchesSelector;
+ }
+ d3.selection = function() {
+ return d3.select(d3_document.documentElement);
+ };
+ var d3_selectionPrototype = d3.selection.prototype = [];
+ d3_selectionPrototype.select = function(selector) {
+ var subgroups = [], subgroup, subnode, group, node;
+ selector = d3_selection_selector(selector);
+ for (var j = -1, m = this.length; ++j < m; ) {
+ subgroups.push(subgroup = []);
+ subgroup.parentNode = (group = this[j]).parentNode;
+ for (var i = -1, n = group.length; ++i < n; ) {
+ if (node = group[i]) {
+ subgroup.push(subnode = selector.call(node, node.__data__, i, j));
+ if (subnode && "__data__" in node) subnode.__data__ = node.__data__;
+ } else {
+ subgroup.push(null);
+ }
+ }
+ }
+ return d3_selection(subgroups);
+ };
+ function d3_selection_selector(selector) {
+ return typeof selector === "function" ? selector : function() {
+ return d3_select(selector, this);
+ };
+ }
+ d3_selectionPrototype.selectAll = function(selector) {
+ var subgroups = [], subgroup, node;
+ selector = d3_selection_selectorAll(selector);
+ for (var j = -1, m = this.length; ++j < m; ) {
+ for (var group = this[j], i = -1, n = group.length; ++i < n; ) {
+ if (node = group[i]) {
+ subgroups.push(subgroup = d3_array(selector.call(node, node.__data__, i, j)));
+ subgroup.parentNode = node;
+ }
+ }
+ }
+ return d3_selection(subgroups);
+ };
+ function d3_selection_selectorAll(selector) {
+ return typeof selector === "function" ? selector : function() {
+ return d3_selectAll(selector, this);
+ };
+ }
+ var d3_nsXhtml = "http://www.w3.org/1999/xhtml";
+ var d3_nsPrefix = {
+ svg: "http://www.w3.org/2000/svg",
+ xhtml: d3_nsXhtml,
+ xlink: "http://www.w3.org/1999/xlink",
+ xml: "http://www.w3.org/XML/1998/namespace",
+ xmlns: "http://www.w3.org/2000/xmlns/"
+ };
+ d3.ns = {
+ prefix: d3_nsPrefix,
+ qualify: function(name) {
+ var i = name.indexOf(":"), prefix = name;
+ if (i >= 0 && (prefix = name.slice(0, i)) !== "xmlns") name = name.slice(i + 1);
+ return d3_nsPrefix.hasOwnProperty(prefix) ? {
+ space: d3_nsPrefix[prefix],
+ local: name
+ } : name;
+ }
+ };
+ d3_selectionPrototype.attr = function(name, value) {
+ if (arguments.length < 2) {
+ if (typeof name === "string") {
+ var node = this.node();
+ name = d3.ns.qualify(name);
+ return name.local ? node.getAttributeNS(name.space, name.local) : node.getAttribute(name);
+ }
+ for (value in name) this.each(d3_selection_attr(value, name[value]));
+ return this;
+ }
+ return this.each(d3_selection_attr(name, value));
+ };
+ function d3_selection_attr(name, value) {
+ name = d3.ns.qualify(name);
+ function attrNull() {
+ this.removeAttribute(name);
+ }
+ function attrNullNS() {
+ this.removeAttributeNS(name.space, name.local);
+ }
+ function attrConstant() {
+ this.setAttribute(name, value);
+ }
+ function attrConstantNS() {
+ this.setAttributeNS(name.space, name.local, value);
+ }
+ function attrFunction() {
+ var x = value.apply(this, arguments);
+ if (x == null) this.removeAttribute(name); else this.setAttribute(name, x);
+ }
+ function attrFunctionNS() {
+ var x = value.apply(this, arguments);
+ if (x == null) this.removeAttributeNS(name.space, name.local); else this.setAttributeNS(name.space, name.local, x);
+ }
+ return value == null ? name.local ? attrNullNS : attrNull : typeof value === "function" ? name.local ? attrFunctionNS : attrFunction : name.local ? attrConstantNS : attrConstant;
+ }
+ function d3_collapse(s) {
+ return s.trim().replace(/\s+/g, " ");
+ }
+ d3_selectionPrototype.classed = function(name, value) {
+ if (arguments.length < 2) {
+ if (typeof name === "string") {
+ var node = this.node(), n = (name = d3_selection_classes(name)).length, i = -1;
+ if (value = node.classList) {
+ while (++i < n) if (!value.contains(name[i])) return false;
+ } else {
+ value = node.getAttribute("class");
+ while (++i < n) if (!d3_selection_classedRe(name[i]).test(value)) return false;
+ }
+ return true;
+ }
+ for (value in name) this.each(d3_selection_classed(value, name[value]));
+ return this;
+ }
+ return this.each(d3_selection_classed(name, value));
+ };
+ function d3_selection_classedRe(name) {
+ return new RegExp("(?:^|\\s+)" + d3.requote(name) + "(?:\\s+|$)", "g");
+ }
+ function d3_selection_classes(name) {
+ return (name + "").trim().split(/^|\s+/);
+ }
+ function d3_selection_classed(name, value) {
+ name = d3_selection_classes(name).map(d3_selection_classedName);
+ var n = name.length;
+ function classedConstant() {
+ var i = -1;
+ while (++i < n) name[i](this, value);
+ }
+ function classedFunction() {
+ var i = -1, x = value.apply(this, arguments);
+ while (++i < n) name[i](this, x);
+ }
+ return typeof value === "function" ? classedFunction : classedConstant;
+ }
+ function d3_selection_classedName(name) {
+ var re = d3_selection_classedRe(name);
+ return function(node, value) {
+ if (c = node.classList) return value ? c.add(name) : c.remove(name);
+ var c = node.getAttribute("class") || "";
+ if (value) {
+ re.lastIndex = 0;
+ if (!re.test(c)) node.setAttribute("class", d3_collapse(c + " " + name));
+ } else {
+ node.setAttribute("class", d3_collapse(c.replace(re, " ")));
+ }
+ };
+ }
+ d3_selectionPrototype.style = function(name, value, priority) {
+ var n = arguments.length;
+ if (n < 3) {
+ if (typeof name !== "string") {
+ if (n < 2) value = "";
+ for (priority in name) this.each(d3_selection_style(priority, name[priority], value));
+ return this;
+ }
+ if (n < 2) {
+ var node = this.node();
+ return d3_window(node).getComputedStyle(node, null).getPropertyValue(name);
+ }
+ priority = "";
+ }
+ return this.each(d3_selection_style(name, value, priority));
+ };
+ function d3_selection_style(name, value, priority) {
+ function styleNull() {
+ this.style.removeProperty(name);
+ }
+ function styleConstant() {
+ this.style.setProperty(name, value, priority);
+ }
+ function styleFunction() {
+ var x = value.apply(this, arguments);
+ if (x == null) this.style.removeProperty(name); else this.style.setProperty(name, x, priority);
+ }
+ return value == null ? styleNull : typeof value === "function" ? styleFunction : styleConstant;
+ }
+ d3_selectionPrototype.property = function(name, value) {
+ if (arguments.length < 2) {
+ if (typeof name === "string") return this.node()[name];
+ for (value in name) this.each(d3_selection_property(value, name[value]));
+ return this;
+ }
+ return this.each(d3_selection_property(name, value));
+ };
+ function d3_selection_property(name, value) {
+ function propertyNull() {
+ delete this[name];
+ }
+ function propertyConstant() {
+ this[name] = value;
+ }
+ function propertyFunction() {
+ var x = value.apply(this, arguments);
+ if (x == null) delete this[name]; else this[name] = x;
+ }
+ return value == null ? propertyNull : typeof value === "function" ? propertyFunction : propertyConstant;
+ }
+ d3_selectionPrototype.text = function(value) {
+ return arguments.length ? this.each(typeof value === "function" ? function() {
+ var v = value.apply(this, arguments);
+ this.textContent = v == null ? "" : v;
+ } : value == null ? function() {
+ this.textContent = "";
+ } : function() {
+ this.textContent = value;
+ }) : this.node().textContent;
+ };
+ d3_selectionPrototype.html = function(value) {
+ return arguments.length ? this.each(typeof value === "function" ? function() {
+ var v = value.apply(this, arguments);
+ this.innerHTML = v == null ? "" : v;
+ } : value == null ? function() {
+ this.innerHTML = "";
+ } : function() {
+ this.innerHTML = value;
+ }) : this.node().innerHTML;
+ };
+ d3_selectionPrototype.append = function(name) {
+ name = d3_selection_creator(name);
+ return this.select(function() {
+ return this.appendChild(name.apply(this, arguments));
+ });
+ };
+ function d3_selection_creator(name) {
+ function create() {
+ var document = this.ownerDocument, namespace = this.namespaceURI;
+ return namespace === d3_nsXhtml && document.documentElement.namespaceURI === d3_nsXhtml ? document.createElement(name) : document.createElementNS(namespace, name);
+ }
+ function createNS() {
+ return this.ownerDocument.createElementNS(name.space, name.local);
+ }
+ return typeof name === "function" ? name : (name = d3.ns.qualify(name)).local ? createNS : create;
+ }
+ d3_selectionPrototype.insert = function(name, before) {
+ name = d3_selection_creator(name);
+ before = d3_selection_selector(before);
+ return this.select(function() {
+ return this.insertBefore(name.apply(this, arguments), before.apply(this, arguments) || null);
+ });
+ };
+ d3_selectionPrototype.remove = function() {
+ return this.each(d3_selectionRemove);
+ };
+ function d3_selectionRemove() {
+ var parent = this.parentNode;
+ if (parent) parent.removeChild(this);
+ }
+ d3_selectionPrototype.data = function(value, key) {
+ var i = -1, n = this.length, group, node;
+ if (!arguments.length) {
+ value = new Array(n = (group = this[0]).length);
+ while (++i < n) {
+ if (node = group[i]) {
+ value[i] = node.__data__;
+ }
+ }
+ return value;
+ }
+ function bind(group, groupData) {
+ var i, n = group.length, m = groupData.length, n0 = Math.min(n, m), updateNodes = new Array(m), enterNodes = new Array(m), exitNodes = new Array(n), node, nodeData;
+ if (key) {
+ var nodeByKeyValue = new d3_Map(), keyValues = new Array(n), keyValue;
+ for (i = -1; ++i < n; ) {
+ if (node = group[i]) {
+ if (nodeByKeyValue.has(keyValue = key.call(node, node.__data__, i))) {
+ exitNodes[i] = node;
+ } else {
+ nodeByKeyValue.set(keyValue, node);
+ }
+ keyValues[i] = keyValue;
+ }
+ }
+ for (i = -1; ++i < m; ) {
+ if (!(node = nodeByKeyValue.get(keyValue = key.call(groupData, nodeData = groupData[i], i)))) {
+ enterNodes[i] = d3_selection_dataNode(nodeData);
+ } else if (node !== true) {
+ updateNodes[i] = node;
+ node.__data__ = nodeData;
+ }
+ nodeByKeyValue.set(keyValue, true);
+ }
+ for (i = -1; ++i < n; ) {
+ if (i in keyValues && nodeByKeyValue.get(keyValues[i]) !== true) {
+ exitNodes[i] = group[i];
+ }
+ }
+ } else {
+ for (i = -1; ++i < n0; ) {
+ node = group[i];
+ nodeData = groupData[i];
+ if (node) {
+ node.__data__ = nodeData;
+ updateNodes[i] = node;
+ } else {
+ enterNodes[i] = d3_selection_dataNode(nodeData);
+ }
+ }
+ for (;i < m; ++i) {
+ enterNodes[i] = d3_selection_dataNode(groupData[i]);
+ }
+ for (;i < n; ++i) {
+ exitNodes[i] = group[i];
+ }
+ }
+ enterNodes.update = updateNodes;
+ enterNodes.parentNode = updateNodes.parentNode = exitNodes.parentNode = group.parentNode;
+ enter.push(enterNodes);
+ update.push(updateNodes);
+ exit.push(exitNodes);
+ }
+ var enter = d3_selection_enter([]), update = d3_selection([]), exit = d3_selection([]);
+ if (typeof value === "function") {
+ while (++i < n) {
+ bind(group = this[i], value.call(group, group.parentNode.__data__, i));
+ }
+ } else {
+ while (++i < n) {
+ bind(group = this[i], value);
+ }
+ }
+ update.enter = function() {
+ return enter;
+ };
+ update.exit = function() {
+ return exit;
+ };
+ return update;
+ };
+ function d3_selection_dataNode(data) {
+ return {
+ __data__: data
+ };
+ }
+ d3_selectionPrototype.datum = function(value) {
+ return arguments.length ? this.property("__data__", value) : this.property("__data__");
+ };
+ d3_selectionPrototype.filter = function(filter) {
+ var subgroups = [], subgroup, group, node;
+ if (typeof filter !== "function") filter = d3_selection_filter(filter);
+ for (var j = 0, m = this.length; j < m; j++) {
+ subgroups.push(subgroup = []);
+ subgroup.parentNode = (group = this[j]).parentNode;
+ for (var i = 0, n = group.length; i < n; i++) {
+ if ((node = group[i]) && filter.call(node, node.__data__, i, j)) {
+ subgroup.push(node);
+ }
+ }
+ }
+ return d3_selection(subgroups);
+ };
+ function d3_selection_filter(selector) {
+ return function() {
+ return d3_selectMatches(this, selector);
+ };
+ }
+ d3_selectionPrototype.order = function() {
+ for (var j = -1, m = this.length; ++j < m; ) {
+ for (var group = this[j], i = group.length - 1, next = group[i], node; --i >= 0; ) {
+ if (node = group[i]) {
+ if (next && next !== node.nextSibling) next.parentNode.insertBefore(node, next);
+ next = node;
+ }
+ }
+ }
+ return this;
+ };
+ d3_selectionPrototype.sort = function(comparator) {
+ comparator = d3_selection_sortComparator.apply(this, arguments);
+ for (var j = -1, m = this.length; ++j < m; ) this[j].sort(comparator);
+ return this.order();
+ };
+ function d3_selection_sortComparator(comparator) {
+ if (!arguments.length) comparator = d3_ascending;
+ return function(a, b) {
+ return a && b ? comparator(a.__data__, b.__data__) : !a - !b;
+ };
+ }
+ d3_selectionPrototype.each = function(callback) {
+ return d3_selection_each(this, function(node, i, j) {
+ callback.call(node, node.__data__, i, j);
+ });
+ };
+ function d3_selection_each(groups, callback) {
+ for (var j = 0, m = groups.length; j < m; j++) {
+ for (var group = groups[j], i = 0, n = group.length, node; i < n; i++) {
+ if (node = group[i]) callback(node, i, j);
+ }
+ }
+ return groups;
+ }
+ d3_selectionPrototype.call = function(callback) {
+ var args = d3_array(arguments);
+ callback.apply(args[0] = this, args);
+ return this;
+ };
+ d3_selectionPrototype.empty = function() {
+ return !this.node();
+ };
+ d3_selectionPrototype.node = function() {
+ for (var j = 0, m = this.length; j < m; j++) {
+ for (var group = this[j], i = 0, n = group.length; i < n; i++) {
+ var node = group[i];
+ if (node) return node;
+ }
+ }
+ return null;
+ };
+ d3_selectionPrototype.size = function() {
+ var n = 0;
+ d3_selection_each(this, function() {
+ ++n;
+ });
+ return n;
+ };
+ function d3_selection_enter(selection) {
+ d3_subclass(selection, d3_selection_enterPrototype);
+ return selection;
+ }
+ var d3_selection_enterPrototype = [];
+ d3.selection.enter = d3_selection_enter;
+ d3.selection.enter.prototype = d3_selection_enterPrototype;
+ d3_selection_enterPrototype.append = d3_selectionPrototype.append;
+ d3_selection_enterPrototype.empty = d3_selectionPrototype.empty;
+ d3_selection_enterPrototype.node = d3_selectionPrototype.node;
+ d3_selection_enterPrototype.call = d3_selectionPrototype.call;
+ d3_selection_enterPrototype.size = d3_selectionPrototype.size;
+ d3_selection_enterPrototype.select = function(selector) {
+ var subgroups = [], subgroup, subnode, upgroup, group, node;
+ for (var j = -1, m = this.length; ++j < m; ) {
+ upgroup = (group = this[j]).update;
+ subgroups.push(subgroup = []);
+ subgroup.parentNode = group.parentNode;
+ for (var i = -1, n = group.length; ++i < n; ) {
+ if (node = group[i]) {
+ subgroup.push(upgroup[i] = subnode = selector.call(group.parentNode, node.__data__, i, j));
+ subnode.__data__ = node.__data__;
+ } else {
+ subgroup.push(null);
+ }
+ }
+ }
+ return d3_selection(subgroups);
+ };
+ d3_selection_enterPrototype.insert = function(name, before) {
+ if (arguments.length < 2) before = d3_selection_enterInsertBefore(this);
+ return d3_selectionPrototype.insert.call(this, name, before);
+ };
+ function d3_selection_enterInsertBefore(enter) {
+ var i0, j0;
+ return function(d, i, j) {
+ var group = enter[j].update, n = group.length, node;
+ if (j != j0) j0 = j, i0 = 0;
+ if (i >= i0) i0 = i + 1;
+ while (!(node = group[i0]) && ++i0 < n) ;
+ return node;
+ };
+ }
+ d3.select = function(node) {
+ var group;
+ if (typeof node === "string") {
+ group = [ d3_select(node, d3_document) ];
+ group.parentNode = d3_document.documentElement;
+ } else {
+ group = [ node ];
+ group.parentNode = d3_documentElement(node);
+ }
+ return d3_selection([ group ]);
+ };
+ d3.selectAll = function(nodes) {
+ var group;
+ if (typeof nodes === "string") {
+ group = d3_array(d3_selectAll(nodes, d3_document));
+ group.parentNode = d3_document.documentElement;
+ } else {
+ group = d3_array(nodes);
+ group.parentNode = null;
+ }
+ return d3_selection([ group ]);
+ };
+ d3_selectionPrototype.on = function(type, listener, capture) {
+ var n = arguments.length;
+ if (n < 3) {
+ if (typeof type !== "string") {
+ if (n < 2) listener = false;
+ for (capture in type) this.each(d3_selection_on(capture, type[capture], listener));
+ return this;
+ }
+ if (n < 2) return (n = this.node()["__on" + type]) && n._;
+ capture = false;
+ }
+ return this.each(d3_selection_on(type, listener, capture));
+ };
+ function d3_selection_on(type, listener, capture) {
+ var name = "__on" + type, i = type.indexOf("."), wrap = d3_selection_onListener;
+ if (i > 0) type = type.slice(0, i);
+ var filter = d3_selection_onFilters.get(type);
+ if (filter) type = filter, wrap = d3_selection_onFilter;
+ function onRemove() {
+ var l = this[name];
+ if (l) {
+ this.removeEventListener(type, l, l.$);
+ delete this[name];
+ }
+ }
+ function onAdd() {
+ var l = wrap(listener, d3_array(arguments));
+ onRemove.call(this);
+ this.addEventListener(type, this[name] = l, l.$ = capture);
+ l._ = listener;
+ }
+ function removeAll() {
+ var re = new RegExp("^__on([^.]+)" + d3.requote(type) + "$"), match;
+ for (var name in this) {
+ if (match = name.match(re)) {
+ var l = this[name];
+ this.removeEventListener(match[1], l, l.$);
+ delete this[name];
+ }
+ }
+ }
+ return i ? listener ? onAdd : onRemove : listener ? d3_noop : removeAll;
+ }
+ var d3_selection_onFilters = d3.map({
+ mouseenter: "mouseover",
+ mouseleave: "mouseout"
+ });
+ if (d3_document) {
+ d3_selection_onFilters.forEach(function(k) {
+ if ("on" + k in d3_document) d3_selection_onFilters.remove(k);
+ });
+ }
+ function d3_selection_onListener(listener, argumentz) {
+ return function(e) {
+ var o = d3.event;
+ d3.event = e;
+ argumentz[0] = this.__data__;
+ try {
+ listener.apply(this, argumentz);
+ } finally {
+ d3.event = o;
+ }
+ };
+ }
+ function d3_selection_onFilter(listener, argumentz) {
+ var l = d3_selection_onListener(listener, argumentz);
+ return function(e) {
+ var target = this, related = e.relatedTarget;
+ if (!related || related !== target && !(related.compareDocumentPosition(target) & 8)) {
+ l.call(target, e);
+ }
+ };
+ }
+ var d3_event_dragSelect, d3_event_dragId = 0;
+ function d3_event_dragSuppress(node) {
+ var name = ".dragsuppress-" + ++d3_event_dragId, click = "click" + name, w = d3.select(d3_window(node)).on("touchmove" + name, d3_eventPreventDefault).on("dragstart" + name, d3_eventPreventDefault).on("selectstart" + name, d3_eventPreventDefault);
+ if (d3_event_dragSelect == null) {
+ d3_event_dragSelect = "onselectstart" in node ? false : d3_vendorSymbol(node.style, "userSelect");
+ }
+ if (d3_event_dragSelect) {
+ var style = d3_documentElement(node).style, select = style[d3_event_dragSelect];
+ style[d3_event_dragSelect] = "none";
+ }
+ return function(suppressClick) {
+ w.on(name, null);
+ if (d3_event_dragSelect) style[d3_event_dragSelect] = select;
+ if (suppressClick) {
+ var off = function() {
+ w.on(click, null);
+ };
+ w.on(click, function() {
+ d3_eventPreventDefault();
+ off();
+ }, true);
+ setTimeout(off, 0);
+ }
+ };
+ }
+ d3.mouse = function(container) {
+ return d3_mousePoint(container, d3_eventSource());
+ };
+ var d3_mouse_bug44083 = this.navigator && /WebKit/.test(this.navigator.userAgent) ? -1 : 0;
+ function d3_mousePoint(container, e) {
+ if (e.changedTouches) e = e.changedTouches[0];
+ var svg = container.ownerSVGElement || container;
+ if (svg.createSVGPoint) {
+ var point = svg.createSVGPoint();
+ if (d3_mouse_bug44083 < 0) {
+ var window = d3_window(container);
+ if (window.scrollX || window.scrollY) {
+ svg = d3.select("body").append("svg").style({
+ position: "absolute",
+ top: 0,
+ left: 0,
+ margin: 0,
+ padding: 0,
+ border: "none"
+ }, "important");
+ var ctm = svg[0][0].getScreenCTM();
+ d3_mouse_bug44083 = !(ctm.f || ctm.e);
+ svg.remove();
+ }
+ }
+ if (d3_mouse_bug44083) point.x = e.pageX, point.y = e.pageY; else point.x = e.clientX,
+ point.y = e.clientY;
+ point = point.matrixTransform(container.getScreenCTM().inverse());
+ return [ point.x, point.y ];
+ }
+ var rect = container.getBoundingClientRect();
+ return [ e.clientX - rect.left - container.clientLeft, e.clientY - rect.top - container.clientTop ];
+ }
+ d3.touch = function(container, touches, identifier) {
+ if (arguments.length < 3) identifier = touches, touches = d3_eventSource().changedTouches;
+ if (touches) for (var i = 0, n = touches.length, touch; i < n; ++i) {
+ if ((touch = touches[i]).identifier === identifier) {
+ return d3_mousePoint(container, touch);
+ }
+ }
+ };
+ d3.behavior.drag = function() {
+ var event = d3_eventDispatch(drag, "drag", "dragstart", "dragend"), origin = null, mousedown = dragstart(d3_noop, d3.mouse, d3_window, "mousemove", "mouseup"), touchstart = dragstart(d3_behavior_dragTouchId, d3.touch, d3_identity, "touchmove", "touchend");
+ function drag() {
+ this.on("mousedown.drag", mousedown).on("touchstart.drag", touchstart);
+ }
+ function dragstart(id, position, subject, move, end) {
+ return function() {
+ var that = this, target = d3.event.target.correspondingElement || d3.event.target, parent = that.parentNode, dispatch = event.of(that, arguments), dragged = 0, dragId = id(), dragName = ".drag" + (dragId == null ? "" : "-" + dragId), dragOffset, dragSubject = d3.select(subject(target)).on(move + dragName, moved).on(end + dragName, ended), dragRestore = d3_event_dragSuppress(target), position0 = position(parent, dragId);
+ if (origin) {
+ dragOffset = origin.apply(that, arguments);
+ dragOffset = [ dragOffset.x - position0[0], dragOffset.y - position0[1] ];
+ } else {
+ dragOffset = [ 0, 0 ];
+ }
+ dispatch({
+ type: "dragstart"
+ });
+ function moved() {
+ var position1 = position(parent, dragId), dx, dy;
+ if (!position1) return;
+ dx = position1[0] - position0[0];
+ dy = position1[1] - position0[1];
+ dragged |= dx | dy;
+ position0 = position1;
+ dispatch({
+ type: "drag",
+ x: position1[0] + dragOffset[0],
+ y: position1[1] + dragOffset[1],
+ dx: dx,
+ dy: dy
+ });
+ }
+ function ended() {
+ if (!position(parent, dragId)) return;
+ dragSubject.on(move + dragName, null).on(end + dragName, null);
+ dragRestore(dragged);
+ dispatch({
+ type: "dragend"
+ });
+ }
+ };
+ }
+ drag.origin = function(x) {
+ if (!arguments.length) return origin;
+ origin = x;
+ return drag;
+ };
+ return d3.rebind(drag, event, "on");
+ };
+ function d3_behavior_dragTouchId() {
+ return d3.event.changedTouches[0].identifier;
+ }
+ d3.touches = function(container, touches) {
+ if (arguments.length < 2) touches = d3_eventSource().touches;
+ return touches ? d3_array(touches).map(function(touch) {
+ var point = d3_mousePoint(container, touch);
+ point.identifier = touch.identifier;
+ return point;
+ }) : [];
+ };
+ var ε = 1e-6, ε2 = ε * ε, π = Math.PI, τ = 2 * π, τε = τ - ε, halfπ = π / 2, d3_radians = π / 180, d3_degrees = 180 / π;
+ function d3_sgn(x) {
+ return x > 0 ? 1 : x < 0 ? -1 : 0;
+ }
+ function d3_cross2d(a, b, c) {
+ return (b[0] - a[0]) * (c[1] - a[1]) - (b[1] - a[1]) * (c[0] - a[0]);
+ }
+ function d3_acos(x) {
+ return x > 1 ? 0 : x < -1 ? π : Math.acos(x);
+ }
+ function d3_asin(x) {
+ return x > 1 ? halfπ : x < -1 ? -halfπ : Math.asin(x);
+ }
+ function d3_sinh(x) {
+ return ((x = Math.exp(x)) - 1 / x) / 2;
+ }
+ function d3_cosh(x) {
+ return ((x = Math.exp(x)) + 1 / x) / 2;
+ }
+ function d3_tanh(x) {
+ return ((x = Math.exp(2 * x)) - 1) / (x + 1);
+ }
+ function d3_haversin(x) {
+ return (x = Math.sin(x / 2)) * x;
+ }
+ var ρ = Math.SQRT2, ρ2 = 2, ρ4 = 4;
+ d3.interpolateZoom = function(p0, p1) {
+ var ux0 = p0[0], uy0 = p0[1], w0 = p0[2], ux1 = p1[0], uy1 = p1[1], w1 = p1[2], dx = ux1 - ux0, dy = uy1 - uy0, d2 = dx * dx + dy * dy, i, S;
+ if (d2 < ε2) {
+ S = Math.log(w1 / w0) / ρ;
+ i = function(t) {
+ return [ ux0 + t * dx, uy0 + t * dy, w0 * Math.exp(ρ * t * S) ];
+ };
+ } else {
+ var d1 = Math.sqrt(d2), b0 = (w1 * w1 - w0 * w0 + ρ4 * d2) / (2 * w0 * ρ2 * d1), b1 = (w1 * w1 - w0 * w0 - ρ4 * d2) / (2 * w1 * ρ2 * d1), r0 = Math.log(Math.sqrt(b0 * b0 + 1) - b0), r1 = Math.log(Math.sqrt(b1 * b1 + 1) - b1);
+ S = (r1 - r0) / ρ;
+ i = function(t) {
+ var s = t * S, coshr0 = d3_cosh(r0), u = w0 / (ρ2 * d1) * (coshr0 * d3_tanh(ρ * s + r0) - d3_sinh(r0));
+ return [ ux0 + u * dx, uy0 + u * dy, w0 * coshr0 / d3_cosh(ρ * s + r0) ];
+ };
+ }
+ i.duration = S * 1e3;
+ return i;
+ };
+ d3.behavior.zoom = function() {
+ var view = {
+ x: 0,
+ y: 0,
+ k: 1
+ }, translate0, center0, center, size = [ 960, 500 ], scaleExtent = d3_behavior_zoomInfinity, duration = 250, zooming = 0, mousedown = "mousedown.zoom", mousemove = "mousemove.zoom", mouseup = "mouseup.zoom", mousewheelTimer, touchstart = "touchstart.zoom", touchtime, event = d3_eventDispatch(zoom, "zoomstart", "zoom", "zoomend"), x0, x1, y0, y1;
+ if (!d3_behavior_zoomWheel) {
+ d3_behavior_zoomWheel = "onwheel" in d3_document ? (d3_behavior_zoomDelta = function() {
+ return -d3.event.deltaY * (d3.event.deltaMode ? 120 : 1);
+ }, "wheel") : "onmousewheel" in d3_document ? (d3_behavior_zoomDelta = function() {
+ return d3.event.wheelDelta;
+ }, "mousewheel") : (d3_behavior_zoomDelta = function() {
+ return -d3.event.detail;
+ }, "MozMousePixelScroll");
+ }
+ function zoom(g) {
+ g.on(mousedown, mousedowned).on(d3_behavior_zoomWheel + ".zoom", mousewheeled).on("dblclick.zoom", dblclicked).on(touchstart, touchstarted);
+ }
+ zoom.event = function(g) {
+ g.each(function() {
+ var dispatch = event.of(this, arguments), view1 = view;
+ if (d3_transitionInheritId) {
+ d3.select(this).transition().each("start.zoom", function() {
+ view = this.__chart__ || {
+ x: 0,
+ y: 0,
+ k: 1
+ };
+ zoomstarted(dispatch);
+ }).tween("zoom:zoom", function() {
+ var dx = size[0], dy = size[1], cx = center0 ? center0[0] : dx / 2, cy = center0 ? center0[1] : dy / 2, i = d3.interpolateZoom([ (cx - view.x) / view.k, (cy - view.y) / view.k, dx / view.k ], [ (cx - view1.x) / view1.k, (cy - view1.y) / view1.k, dx / view1.k ]);
+ return function(t) {
+ var l = i(t), k = dx / l[2];
+ this.__chart__ = view = {
+ x: cx - l[0] * k,
+ y: cy - l[1] * k,
+ k: k
+ };
+ zoomed(dispatch);
+ };
+ }).each("interrupt.zoom", function() {
+ zoomended(dispatch);
+ }).each("end.zoom", function() {
+ zoomended(dispatch);
+ });
+ } else {
+ this.__chart__ = view;
+ zoomstarted(dispatch);
+ zoomed(dispatch);
+ zoomended(dispatch);
+ }
+ });
+ };
+ zoom.translate = function(_) {
+ if (!arguments.length) return [ view.x, view.y ];
+ view = {
+ x: +_[0],
+ y: +_[1],
+ k: view.k
+ };
+ rescale();
+ return zoom;
+ };
+ zoom.scale = function(_) {
+ if (!arguments.length) return view.k;
+ view = {
+ x: view.x,
+ y: view.y,
+ k: null
+ };
+ scaleTo(+_);
+ rescale();
+ return zoom;
+ };
+ zoom.scaleExtent = function(_) {
+ if (!arguments.length) return scaleExtent;
+ scaleExtent = _ == null ? d3_behavior_zoomInfinity : [ +_[0], +_[1] ];
+ return zoom;
+ };
+ zoom.center = function(_) {
+ if (!arguments.length) return center;
+ center = _ && [ +_[0], +_[1] ];
+ return zoom;
+ };
+ zoom.size = function(_) {
+ if (!arguments.length) return size;
+ size = _ && [ +_[0], +_[1] ];
+ return zoom;
+ };
+ zoom.duration = function(_) {
+ if (!arguments.length) return duration;
+ duration = +_;
+ return zoom;
+ };
+ zoom.x = function(z) {
+ if (!arguments.length) return x1;
+ x1 = z;
+ x0 = z.copy();
+ view = {
+ x: 0,
+ y: 0,
+ k: 1
+ };
+ return zoom;
+ };
+ zoom.y = function(z) {
+ if (!arguments.length) return y1;
+ y1 = z;
+ y0 = z.copy();
+ view = {
+ x: 0,
+ y: 0,
+ k: 1
+ };
+ return zoom;
+ };
+ function location(p) {
+ return [ (p[0] - view.x) / view.k, (p[1] - view.y) / view.k ];
+ }
+ function point(l) {
+ return [ l[0] * view.k + view.x, l[1] * view.k + view.y ];
+ }
+ function scaleTo(s) {
+ view.k = Math.max(scaleExtent[0], Math.min(scaleExtent[1], s));
+ }
+ function translateTo(p, l) {
+ l = point(l);
+ view.x += p[0] - l[0];
+ view.y += p[1] - l[1];
+ }
+ function zoomTo(that, p, l, k) {
+ that.__chart__ = {
+ x: view.x,
+ y: view.y,
+ k: view.k
+ };
+ scaleTo(Math.pow(2, k));
+ translateTo(center0 = p, l);
+ that = d3.select(that);
+ if (duration > 0) that = that.transition().duration(duration);
+ that.call(zoom.event);
+ }
+ function rescale() {
+ if (x1) x1.domain(x0.range().map(function(x) {
+ return (x - view.x) / view.k;
+ }).map(x0.invert));
+ if (y1) y1.domain(y0.range().map(function(y) {
+ return (y - view.y) / view.k;
+ }).map(y0.invert));
+ }
+ function zoomstarted(dispatch) {
+ if (!zooming++) dispatch({
+ type: "zoomstart"
+ });
+ }
+ function zoomed(dispatch) {
+ rescale();
+ dispatch({
+ type: "zoom",
+ scale: view.k,
+ translate: [ view.x, view.y ]
+ });
+ }
+ function zoomended(dispatch) {
+ if (!--zooming) dispatch({
+ type: "zoomend"
+ }), center0 = null;
+ }
+ function mousedowned() {
+ var that = this, dispatch = event.of(that, arguments), dragged = 0, subject = d3.select(d3_window(that)).on(mousemove, moved).on(mouseup, ended), location0 = location(d3.mouse(that)), dragRestore = d3_event_dragSuppress(that);
+ d3_selection_interrupt.call(that);
+ zoomstarted(dispatch);
+ function moved() {
+ dragged = 1;
+ translateTo(d3.mouse(that), location0);
+ zoomed(dispatch);
+ }
+ function ended() {
+ subject.on(mousemove, null).on(mouseup, null);
+ dragRestore(dragged);
+ zoomended(dispatch);
+ }
+ }
+ function touchstarted() {
+ var that = this, dispatch = event.of(that, arguments), locations0 = {}, distance0 = 0, scale0, zoomName = ".zoom-" + d3.event.changedTouches[0].identifier, touchmove = "touchmove" + zoomName, touchend = "touchend" + zoomName, targets = [], subject = d3.select(that), dragRestore = d3_event_dragSuppress(that);
+ started();
+ zoomstarted(dispatch);
+ subject.on(mousedown, null).on(touchstart, started);
+ function relocate() {
+ var touches = d3.touches(that);
+ scale0 = view.k;
+ touches.forEach(function(t) {
+ if (t.identifier in locations0) locations0[t.identifier] = location(t);
+ });
+ return touches;
+ }
+ function started() {
+ var target = d3.event.target;
+ d3.select(target).on(touchmove, moved).on(touchend, ended);
+ targets.push(target);
+ var changed = d3.event.changedTouches;
+ for (var i = 0, n = changed.length; i < n; ++i) {
+ locations0[changed[i].identifier] = null;
+ }
+ var touches = relocate(), now = Date.now();
+ if (touches.length === 1) {
+ if (now - touchtime < 500) {
+ var p = touches[0];
+ zoomTo(that, p, locations0[p.identifier], Math.floor(Math.log(view.k) / Math.LN2) + 1);
+ d3_eventPreventDefault();
+ }
+ touchtime = now;
+ } else if (touches.length > 1) {
+ var p = touches[0], q = touches[1], dx = p[0] - q[0], dy = p[1] - q[1];
+ distance0 = dx * dx + dy * dy;
+ }
+ }
+ function moved() {
+ var touches = d3.touches(that), p0, l0, p1, l1;
+ d3_selection_interrupt.call(that);
+ for (var i = 0, n = touches.length; i < n; ++i, l1 = null) {
+ p1 = touches[i];
+ if (l1 = locations0[p1.identifier]) {
+ if (l0) break;
+ p0 = p1, l0 = l1;
+ }
+ }
+ if (l1) {
+ var distance1 = (distance1 = p1[0] - p0[0]) * distance1 + (distance1 = p1[1] - p0[1]) * distance1, scale1 = distance0 && Math.sqrt(distance1 / distance0);
+ p0 = [ (p0[0] + p1[0]) / 2, (p0[1] + p1[1]) / 2 ];
+ l0 = [ (l0[0] + l1[0]) / 2, (l0[1] + l1[1]) / 2 ];
+ scaleTo(scale1 * scale0);
+ }
+ touchtime = null;
+ translateTo(p0, l0);
+ zoomed(dispatch);
+ }
+ function ended() {
+ if (d3.event.touches.length) {
+ var changed = d3.event.changedTouches;
+ for (var i = 0, n = changed.length; i < n; ++i) {
+ delete locations0[changed[i].identifier];
+ }
+ for (var identifier in locations0) {
+ return void relocate();
+ }
+ }
+ d3.selectAll(targets).on(zoomName, null);
+ subject.on(mousedown, mousedowned).on(touchstart, touchstarted);
+ dragRestore();
+ zoomended(dispatch);
+ }
+ }
+ function mousewheeled() {
+ var dispatch = event.of(this, arguments);
+ if (mousewheelTimer) clearTimeout(mousewheelTimer); else d3_selection_interrupt.call(this),
+ translate0 = location(center0 = center || d3.mouse(this)), zoomstarted(dispatch);
+ mousewheelTimer = setTimeout(function() {
+ mousewheelTimer = null;
+ zoomended(dispatch);
+ }, 50);
+ d3_eventPreventDefault();
+ scaleTo(Math.pow(2, d3_behavior_zoomDelta() * .002) * view.k);
+ translateTo(center0, translate0);
+ zoomed(dispatch);
+ }
+ function dblclicked() {
+ var p = d3.mouse(this), k = Math.log(view.k) / Math.LN2;
+ zoomTo(this, p, location(p), d3.event.shiftKey ? Math.ceil(k) - 1 : Math.floor(k) + 1);
+ }
+ return d3.rebind(zoom, event, "on");
+ };
+ var d3_behavior_zoomInfinity = [ 0, Infinity ], d3_behavior_zoomDelta, d3_behavior_zoomWheel;
+ d3.color = d3_color;
+ function d3_color() {}
+ d3_color.prototype.toString = function() {
+ return this.rgb() + "";
+ };
+ d3.hsl = d3_hsl;
+ function d3_hsl(h, s, l) {
+ return this instanceof d3_hsl ? void (this.h = +h, this.s = +s, this.l = +l) : arguments.length < 2 ? h instanceof d3_hsl ? new d3_hsl(h.h, h.s, h.l) : d3_rgb_parse("" + h, d3_rgb_hsl, d3_hsl) : new d3_hsl(h, s, l);
+ }
+ var d3_hslPrototype = d3_hsl.prototype = new d3_color();
+ d3_hslPrototype.brighter = function(k) {
+ k = Math.pow(.7, arguments.length ? k : 1);
+ return new d3_hsl(this.h, this.s, this.l / k);
+ };
+ d3_hslPrototype.darker = function(k) {
+ k = Math.pow(.7, arguments.length ? k : 1);
+ return new d3_hsl(this.h, this.s, k * this.l);
+ };
+ d3_hslPrototype.rgb = function() {
+ return d3_hsl_rgb(this.h, this.s, this.l);
+ };
+ function d3_hsl_rgb(h, s, l) {
+ var m1, m2;
+ h = isNaN(h) ? 0 : (h %= 360) < 0 ? h + 360 : h;
+ s = isNaN(s) ? 0 : s < 0 ? 0 : s > 1 ? 1 : s;
+ l = l < 0 ? 0 : l > 1 ? 1 : l;
+ m2 = l <= .5 ? l * (1 + s) : l + s - l * s;
+ m1 = 2 * l - m2;
+ function v(h) {
+ if (h > 360) h -= 360; else if (h < 0) h += 360;
+ if (h < 60) return m1 + (m2 - m1) * h / 60;
+ if (h < 180) return m2;
+ if (h < 240) return m1 + (m2 - m1) * (240 - h) / 60;
+ return m1;
+ }
+ function vv(h) {
+ return Math.round(v(h) * 255);
+ }
+ return new d3_rgb(vv(h + 120), vv(h), vv(h - 120));
+ }
+ d3.hcl = d3_hcl;
+ function d3_hcl(h, c, l) {
+ return this instanceof d3_hcl ? void (this.h = +h, this.c = +c, this.l = +l) : arguments.length < 2 ? h instanceof d3_hcl ? new d3_hcl(h.h, h.c, h.l) : h instanceof d3_lab ? d3_lab_hcl(h.l, h.a, h.b) : d3_lab_hcl((h = d3_rgb_lab((h = d3.rgb(h)).r, h.g, h.b)).l, h.a, h.b) : new d3_hcl(h, c, l);
+ }
+ var d3_hclPrototype = d3_hcl.prototype = new d3_color();
+ d3_hclPrototype.brighter = function(k) {
+ return new d3_hcl(this.h, this.c, Math.min(100, this.l + d3_lab_K * (arguments.length ? k : 1)));
+ };
+ d3_hclPrototype.darker = function(k) {
+ return new d3_hcl(this.h, this.c, Math.max(0, this.l - d3_lab_K * (arguments.length ? k : 1)));
+ };
+ d3_hclPrototype.rgb = function() {
+ return d3_hcl_lab(this.h, this.c, this.l).rgb();
+ };
+ function d3_hcl_lab(h, c, l) {
+ if (isNaN(h)) h = 0;
+ if (isNaN(c)) c = 0;
+ return new d3_lab(l, Math.cos(h *= d3_radians) * c, Math.sin(h) * c);
+ }
+ d3.lab = d3_lab;
+ function d3_lab(l, a, b) {
+ return this instanceof d3_lab ? void (this.l = +l, this.a = +a, this.b = +b) : arguments.length < 2 ? l instanceof d3_lab ? new d3_lab(l.l, l.a, l.b) : l instanceof d3_hcl ? d3_hcl_lab(l.h, l.c, l.l) : d3_rgb_lab((l = d3_rgb(l)).r, l.g, l.b) : new d3_lab(l, a, b);
+ }
+ var d3_lab_K = 18;
+ var d3_lab_X = .95047, d3_lab_Y = 1, d3_lab_Z = 1.08883;
+ var d3_labPrototype = d3_lab.prototype = new d3_color();
+ d3_labPrototype.brighter = function(k) {
+ return new d3_lab(Math.min(100, this.l + d3_lab_K * (arguments.length ? k : 1)), this.a, this.b);
+ };
+ d3_labPrototype.darker = function(k) {
+ return new d3_lab(Math.max(0, this.l - d3_lab_K * (arguments.length ? k : 1)), this.a, this.b);
+ };
+ d3_labPrototype.rgb = function() {
+ return d3_lab_rgb(this.l, this.a, this.b);
+ };
+ function d3_lab_rgb(l, a, b) {
+ var y = (l + 16) / 116, x = y + a / 500, z = y - b / 200;
+ x = d3_lab_xyz(x) * d3_lab_X;
+ y = d3_lab_xyz(y) * d3_lab_Y;
+ z = d3_lab_xyz(z) * d3_lab_Z;
+ return new d3_rgb(d3_xyz_rgb(3.2404542 * x - 1.5371385 * y - .4985314 * z), d3_xyz_rgb(-.969266 * x + 1.8760108 * y + .041556 * z), d3_xyz_rgb(.0556434 * x - .2040259 * y + 1.0572252 * z));
+ }
+ function d3_lab_hcl(l, a, b) {
+ return l > 0 ? new d3_hcl(Math.atan2(b, a) * d3_degrees, Math.sqrt(a * a + b * b), l) : new d3_hcl(NaN, NaN, l);
+ }
+ function d3_lab_xyz(x) {
+ return x > .206893034 ? x * x * x : (x - 4 / 29) / 7.787037;
+ }
+ function d3_xyz_lab(x) {
+ return x > .008856 ? Math.pow(x, 1 / 3) : 7.787037 * x + 4 / 29;
+ }
+ function d3_xyz_rgb(r) {
+ return Math.round(255 * (r <= .00304 ? 12.92 * r : 1.055 * Math.pow(r, 1 / 2.4) - .055));
+ }
+ d3.rgb = d3_rgb;
+ function d3_rgb(r, g, b) {
+ return this instanceof d3_rgb ? void (this.r = ~~r, this.g = ~~g, this.b = ~~b) : arguments.length < 2 ? r instanceof d3_rgb ? new d3_rgb(r.r, r.g, r.b) : d3_rgb_parse("" + r, d3_rgb, d3_hsl_rgb) : new d3_rgb(r, g, b);
+ }
+ function d3_rgbNumber(value) {
+ return new d3_rgb(value >> 16, value >> 8 & 255, value & 255);
+ }
+ function d3_rgbString(value) {
+ return d3_rgbNumber(value) + "";
+ }
+ var d3_rgbPrototype = d3_rgb.prototype = new d3_color();
+ d3_rgbPrototype.brighter = function(k) {
+ k = Math.pow(.7, arguments.length ? k : 1);
+ var r = this.r, g = this.g, b = this.b, i = 30;
+ if (!r && !g && !b) return new d3_rgb(i, i, i);
+ if (r && r < i) r = i;
+ if (g && g < i) g = i;
+ if (b && b < i) b = i;
+ return new d3_rgb(Math.min(255, r / k), Math.min(255, g / k), Math.min(255, b / k));
+ };
+ d3_rgbPrototype.darker = function(k) {
+ k = Math.pow(.7, arguments.length ? k : 1);
+ return new d3_rgb(k * this.r, k * this.g, k * this.b);
+ };
+ d3_rgbPrototype.hsl = function() {
+ return d3_rgb_hsl(this.r, this.g, this.b);
+ };
+ d3_rgbPrototype.toString = function() {
+ return "#" + d3_rgb_hex(this.r) + d3_rgb_hex(this.g) + d3_rgb_hex(this.b);
+ };
+ function d3_rgb_hex(v) {
+ return v < 16 ? "0" + Math.max(0, v).toString(16) : Math.min(255, v).toString(16);
+ }
+ function d3_rgb_parse(format, rgb, hsl) {
+ var r = 0, g = 0, b = 0, m1, m2, color;
+ m1 = /([a-z]+)\((.*)\)/.exec(format = format.toLowerCase());
+ if (m1) {
+ m2 = m1[2].split(",");
+ switch (m1[1]) {
+ case "hsl":
+ {
+ return hsl(parseFloat(m2[0]), parseFloat(m2[1]) / 100, parseFloat(m2[2]) / 100);
+ }
+
+ case "rgb":
+ {
+ return rgb(d3_rgb_parseNumber(m2[0]), d3_rgb_parseNumber(m2[1]), d3_rgb_parseNumber(m2[2]));
+ }
+ }
+ }
+ if (color = d3_rgb_names.get(format)) {
+ return rgb(color.r, color.g, color.b);
+ }
+ if (format != null && format.charAt(0) === "#" && !isNaN(color = parseInt(format.slice(1), 16))) {
+ if (format.length === 4) {
+ r = (color & 3840) >> 4;
+ r = r >> 4 | r;
+ g = color & 240;
+ g = g >> 4 | g;
+ b = color & 15;
+ b = b << 4 | b;
+ } else if (format.length === 7) {
+ r = (color & 16711680) >> 16;
+ g = (color & 65280) >> 8;
+ b = color & 255;
+ }
+ }
+ return rgb(r, g, b);
+ }
+ function d3_rgb_hsl(r, g, b) {
+ var min = Math.min(r /= 255, g /= 255, b /= 255), max = Math.max(r, g, b), d = max - min, h, s, l = (max + min) / 2;
+ if (d) {
+ s = l < .5 ? d / (max + min) : d / (2 - max - min);
+ if (r == max) h = (g - b) / d + (g < b ? 6 : 0); else if (g == max) h = (b - r) / d + 2; else h = (r - g) / d + 4;
+ h *= 60;
+ } else {
+ h = NaN;
+ s = l > 0 && l < 1 ? 0 : h;
+ }
+ return new d3_hsl(h, s, l);
+ }
+ function d3_rgb_lab(r, g, b) {
+ r = d3_rgb_xyz(r);
+ g = d3_rgb_xyz(g);
+ b = d3_rgb_xyz(b);
+ var x = d3_xyz_lab((.4124564 * r + .3575761 * g + .1804375 * b) / d3_lab_X), y = d3_xyz_lab((.2126729 * r + .7151522 * g + .072175 * b) / d3_lab_Y), z = d3_xyz_lab((.0193339 * r + .119192 * g + .9503041 * b) / d3_lab_Z);
+ return d3_lab(116 * y - 16, 500 * (x - y), 200 * (y - z));
+ }
+ function d3_rgb_xyz(r) {
+ return (r /= 255) <= .04045 ? r / 12.92 : Math.pow((r + .055) / 1.055, 2.4);
+ }
+ function d3_rgb_parseNumber(c) {
+ var f = parseFloat(c);
+ return c.charAt(c.length - 1) === "%" ? Math.round(f * 2.55) : f;
+ }
+ var d3_rgb_names = d3.map({
+ aliceblue: 15792383,
+ antiquewhite: 16444375,
+ aqua: 65535,
+ aquamarine: 8388564,
+ azure: 15794175,
+ beige: 16119260,
+ bisque: 16770244,
+ black: 0,
+ blanchedalmond: 16772045,
+ blue: 255,
+ blueviolet: 9055202,
+ brown: 10824234,
+ burlywood: 14596231,
+ cadetblue: 6266528,
+ chartreuse: 8388352,
+ chocolate: 13789470,
+ coral: 16744272,
+ cornflowerblue: 6591981,
+ cornsilk: 16775388,
+ crimson: 14423100,
+ cyan: 65535,
+ darkblue: 139,
+ darkcyan: 35723,
+ darkgoldenrod: 12092939,
+ darkgray: 11119017,
+ darkgreen: 25600,
+ darkgrey: 11119017,
+ darkkhaki: 12433259,
+ darkmagenta: 9109643,
+ darkolivegreen: 5597999,
+ darkorange: 16747520,
+ darkorchid: 10040012,
+ darkred: 9109504,
+ darksalmon: 15308410,
+ darkseagreen: 9419919,
+ darkslateblue: 4734347,
+ darkslategray: 3100495,
+ darkslategrey: 3100495,
+ darkturquoise: 52945,
+ darkviolet: 9699539,
+ deeppink: 16716947,
+ deepskyblue: 49151,
+ dimgray: 6908265,
+ dimgrey: 6908265,
+ dodgerblue: 2003199,
+ firebrick: 11674146,
+ floralwhite: 16775920,
+ forestgreen: 2263842,
+ fuchsia: 16711935,
+ gainsboro: 14474460,
+ ghostwhite: 16316671,
+ gold: 16766720,
+ goldenrod: 14329120,
+ gray: 8421504,
+ green: 32768,
+ greenyellow: 11403055,
+ grey: 8421504,
+ honeydew: 15794160,
+ hotpink: 16738740,
+ indianred: 13458524,
+ indigo: 4915330,
+ ivory: 16777200,
+ khaki: 15787660,
+ lavender: 15132410,
+ lavenderblush: 16773365,
+ lawngreen: 8190976,
+ lemonchiffon: 16775885,
+ lightblue: 11393254,
+ lightcoral: 15761536,
+ lightcyan: 14745599,
+ lightgoldenrodyellow: 16448210,
+ lightgray: 13882323,
+ lightgreen: 9498256,
+ lightgrey: 13882323,
+ lightpink: 16758465,
+ lightsalmon: 16752762,
+ lightseagreen: 2142890,
+ lightskyblue: 8900346,
+ lightslategray: 7833753,
+ lightslategrey: 7833753,
+ lightsteelblue: 11584734,
+ lightyellow: 16777184,
+ lime: 65280,
+ limegreen: 3329330,
+ linen: 16445670,
+ magenta: 16711935,
+ maroon: 8388608,
+ mediumaquamarine: 6737322,
+ mediumblue: 205,
+ mediumorchid: 12211667,
+ mediumpurple: 9662683,
+ mediumseagreen: 3978097,
+ mediumslateblue: 8087790,
+ mediumspringgreen: 64154,
+ mediumturquoise: 4772300,
+ mediumvioletred: 13047173,
+ midnightblue: 1644912,
+ mintcream: 16121850,
+ mistyrose: 16770273,
+ moccasin: 16770229,
+ navajowhite: 16768685,
+ navy: 128,
+ oldlace: 16643558,
+ olive: 8421376,
+ olivedrab: 7048739,
+ orange: 16753920,
+ orangered: 16729344,
+ orchid: 14315734,
+ palegoldenrod: 15657130,
+ palegreen: 10025880,
+ paleturquoise: 11529966,
+ palevioletred: 14381203,
+ papayawhip: 16773077,
+ peachpuff: 16767673,
+ peru: 13468991,
+ pink: 16761035,
+ plum: 14524637,
+ powderblue: 11591910,
+ purple: 8388736,
+ rebeccapurple: 6697881,
+ red: 16711680,
+ rosybrown: 12357519,
+ royalblue: 4286945,
+ saddlebrown: 9127187,
+ salmon: 16416882,
+ sandybrown: 16032864,
+ seagreen: 3050327,
+ seashell: 16774638,
+ sienna: 10506797,
+ silver: 12632256,
+ skyblue: 8900331,
+ slateblue: 6970061,
+ slategray: 7372944,
+ slategrey: 7372944,
+ snow: 16775930,
+ springgreen: 65407,
+ steelblue: 4620980,
+ tan: 13808780,
+ teal: 32896,
+ thistle: 14204888,
+ tomato: 16737095,
+ turquoise: 4251856,
+ violet: 15631086,
+ wheat: 16113331,
+ white: 16777215,
+ whitesmoke: 16119285,
+ yellow: 16776960,
+ yellowgreen: 10145074
+ });
+ d3_rgb_names.forEach(function(key, value) {
+ d3_rgb_names.set(key, d3_rgbNumber(value));
+ });
+ function d3_functor(v) {
+ return typeof v === "function" ? v : function() {
+ return v;
+ };
+ }
+ d3.functor = d3_functor;
+ d3.xhr = d3_xhrType(d3_identity);
+ function d3_xhrType(response) {
+ return function(url, mimeType, callback) {
+ if (arguments.length === 2 && typeof mimeType === "function") callback = mimeType,
+ mimeType = null;
+ return d3_xhr(url, mimeType, response, callback);
+ };
+ }
+ function d3_xhr(url, mimeType, response, callback) {
+ var xhr = {}, dispatch = d3.dispatch("beforesend", "progress", "load", "error"), headers = {}, request = new XMLHttpRequest(), responseType = null;
+ if (this.XDomainRequest && !("withCredentials" in request) && /^(http(s)?:)?\/\//.test(url)) request = new XDomainRequest();
+ "onload" in request ? request.onload = request.onerror = respond : request.onreadystatechange = function() {
+ request.readyState > 3 && respond();
+ };
+ function respond() {
+ var status = request.status, result;
+ if (!status && d3_xhrHasResponse(request) || status >= 200 && status < 300 || status === 304) {
+ try {
+ result = response.call(xhr, request);
+ } catch (e) {
+ dispatch.error.call(xhr, e);
+ return;
+ }
+ dispatch.load.call(xhr, result);
+ } else {
+ dispatch.error.call(xhr, request);
+ }
+ }
+ request.onprogress = function(event) {
+ var o = d3.event;
+ d3.event = event;
+ try {
+ dispatch.progress.call(xhr, request);
+ } finally {
+ d3.event = o;
+ }
+ };
+ xhr.header = function(name, value) {
+ name = (name + "").toLowerCase();
+ if (arguments.length < 2) return headers[name];
+ if (value == null) delete headers[name]; else headers[name] = value + "";
+ return xhr;
+ };
+ xhr.mimeType = function(value) {
+ if (!arguments.length) return mimeType;
+ mimeType = value == null ? null : value + "";
+ return xhr;
+ };
+ xhr.responseType = function(value) {
+ if (!arguments.length) return responseType;
+ responseType = value;
+ return xhr;
+ };
+ xhr.response = function(value) {
+ response = value;
+ return xhr;
+ };
+ [ "get", "post" ].forEach(function(method) {
+ xhr[method] = function() {
+ return xhr.send.apply(xhr, [ method ].concat(d3_array(arguments)));
+ };
+ });
+ xhr.send = function(method, data, callback) {
+ if (arguments.length === 2 && typeof data === "function") callback = data, data = null;
+ request.open(method, url, true);
+ if (mimeType != null && !("accept" in headers)) headers["accept"] = mimeType + ",*/*";
+ if (request.setRequestHeader) for (var name in headers) request.setRequestHeader(name, headers[name]);
+ if (mimeType != null && request.overrideMimeType) request.overrideMimeType(mimeType);
+ if (responseType != null) request.responseType = responseType;
+ if (callback != null) xhr.on("error", callback).on("load", function(request) {
+ callback(null, request);
+ });
+ dispatch.beforesend.call(xhr, request);
+ request.send(data == null ? null : data);
+ return xhr;
+ };
+ xhr.abort = function() {
+ request.abort();
+ return xhr;
+ };
+ d3.rebind(xhr, dispatch, "on");
+ return callback == null ? xhr : xhr.get(d3_xhr_fixCallback(callback));
+ }
+ function d3_xhr_fixCallback(callback) {
+ return callback.length === 1 ? function(error, request) {
+ callback(error == null ? request : null);
+ } : callback;
+ }
+ function d3_xhrHasResponse(request) {
+ var type = request.responseType;
+ return type && type !== "text" ? request.response : request.responseText;
+ }
+ d3.dsv = function(delimiter, mimeType) {
+ var reFormat = new RegExp('["' + delimiter + "\n]"), delimiterCode = delimiter.charCodeAt(0);
+ function dsv(url, row, callback) {
+ if (arguments.length < 3) callback = row, row = null;
+ var xhr = d3_xhr(url, mimeType, row == null ? response : typedResponse(row), callback);
+ xhr.row = function(_) {
+ return arguments.length ? xhr.response((row = _) == null ? response : typedResponse(_)) : row;
+ };
+ return xhr;
+ }
+ function response(request) {
+ return dsv.parse(request.responseText);
+ }
+ function typedResponse(f) {
+ return function(request) {
+ return dsv.parse(request.responseText, f);
+ };
+ }
+ dsv.parse = function(text, f) {
+ var o;
+ return dsv.parseRows(text, function(row, i) {
+ if (o) return o(row, i - 1);
+ var a = new Function("d", "return {" + row.map(function(name, i) {
+ return JSON.stringify(name) + ": d[" + i + "]";
+ }).join(",") + "}");
+ o = f ? function(row, i) {
+ return f(a(row), i);
+ } : a;
+ });
+ };
+ dsv.parseRows = function(text, f) {
+ var EOL = {}, EOF = {}, rows = [], N = text.length, I = 0, n = 0, t, eol;
+ function token() {
+ if (I >= N) return EOF;
+ if (eol) return eol = false, EOL;
+ var j = I;
+ if (text.charCodeAt(j) === 34) {
+ var i = j;
+ while (i++ < N) {
+ if (text.charCodeAt(i) === 34) {
+ if (text.charCodeAt(i + 1) !== 34) break;
+ ++i;
+ }
+ }
+ I = i + 2;
+ var c = text.charCodeAt(i + 1);
+ if (c === 13) {
+ eol = true;
+ if (text.charCodeAt(i + 2) === 10) ++I;
+ } else if (c === 10) {
+ eol = true;
+ }
+ return text.slice(j + 1, i).replace(/""/g, '"');
+ }
+ while (I < N) {
+ var c = text.charCodeAt(I++), k = 1;
+ if (c === 10) eol = true; else if (c === 13) {
+ eol = true;
+ if (text.charCodeAt(I) === 10) ++I, ++k;
+ } else if (c !== delimiterCode) continue;
+ return text.slice(j, I - k);
+ }
+ return text.slice(j);
+ }
+ while ((t = token()) !== EOF) {
+ var a = [];
+ while (t !== EOL && t !== EOF) {
+ a.push(t);
+ t = token();
+ }
+ if (f && (a = f(a, n++)) == null) continue;
+ rows.push(a);
+ }
+ return rows;
+ };
+ dsv.format = function(rows) {
+ if (Array.isArray(rows[0])) return dsv.formatRows(rows);
+ var fieldSet = new d3_Set(), fields = [];
+ rows.forEach(function(row) {
+ for (var field in row) {
+ if (!fieldSet.has(field)) {
+ fields.push(fieldSet.add(field));
+ }
+ }
+ });
+ return [ fields.map(formatValue).join(delimiter) ].concat(rows.map(function(row) {
+ return fields.map(function(field) {
+ return formatValue(row[field]);
+ }).join(delimiter);
+ })).join("\n");
+ };
+ dsv.formatRows = function(rows) {
+ return rows.map(formatRow).join("\n");
+ };
+ function formatRow(row) {
+ return row.map(formatValue).join(delimiter);
+ }
+ function formatValue(text) {
+ return reFormat.test(text) ? '"' + text.replace(/\"/g, '""') + '"' : text;
+ }
+ return dsv;
+ };
+ d3.csv = d3.dsv(",", "text/csv");
+ d3.tsv = d3.dsv(" ", "text/tab-separated-values");
+ var d3_timer_queueHead, d3_timer_queueTail, d3_timer_interval, d3_timer_timeout, d3_timer_frame = this[d3_vendorSymbol(this, "requestAnimationFrame")] || function(callback) {
+ setTimeout(callback, 17);
+ };
+ d3.timer = function() {
+ d3_timer.apply(this, arguments);
+ };
+ function d3_timer(callback, delay, then) {
+ var n = arguments.length;
+ if (n < 2) delay = 0;
+ if (n < 3) then = Date.now();
+ var time = then + delay, timer = {
+ c: callback,
+ t: time,
+ n: null
+ };
+ if (d3_timer_queueTail) d3_timer_queueTail.n = timer; else d3_timer_queueHead = timer;
+ d3_timer_queueTail = timer;
+ if (!d3_timer_interval) {
+ d3_timer_timeout = clearTimeout(d3_timer_timeout);
+ d3_timer_interval = 1;
+ d3_timer_frame(d3_timer_step);
+ }
+ return timer;
+ }
+ function d3_timer_step() {
+ var now = d3_timer_mark(), delay = d3_timer_sweep() - now;
+ if (delay > 24) {
+ if (isFinite(delay)) {
+ clearTimeout(d3_timer_timeout);
+ d3_timer_timeout = setTimeout(d3_timer_step, delay);
+ }
+ d3_timer_interval = 0;
+ } else {
+ d3_timer_interval = 1;
+ d3_timer_frame(d3_timer_step);
+ }
+ }
+ d3.timer.flush = function() {
+ d3_timer_mark();
+ d3_timer_sweep();
+ };
+ function d3_timer_mark() {
+ var now = Date.now(), timer = d3_timer_queueHead;
+ while (timer) {
+ if (now >= timer.t && timer.c(now - timer.t)) timer.c = null;
+ timer = timer.n;
+ }
+ return now;
+ }
+ function d3_timer_sweep() {
+ var t0, t1 = d3_timer_queueHead, time = Infinity;
+ while (t1) {
+ if (t1.c) {
+ if (t1.t < time) time = t1.t;
+ t1 = (t0 = t1).n;
+ } else {
+ t1 = t0 ? t0.n = t1.n : d3_timer_queueHead = t1.n;
+ }
+ }
+ d3_timer_queueTail = t0;
+ return time;
+ }
+ function d3_format_precision(x, p) {
+ return p - (x ? Math.ceil(Math.log(x) / Math.LN10) : 1);
+ }
+ d3.round = function(x, n) {
+ return n ? Math.round(x * (n = Math.pow(10, n))) / n : Math.round(x);
+ };
+ var d3_formatPrefixes = [ "y", "z", "a", "f", "p", "n", "µ", "m", "", "k", "M", "G", "T", "P", "E", "Z", "Y" ].map(d3_formatPrefix);
+ d3.formatPrefix = function(value, precision) {
+ var i = 0;
+ if (value = +value) {
+ if (value < 0) value *= -1;
+ if (precision) value = d3.round(value, d3_format_precision(value, precision));
+ i = 1 + Math.floor(1e-12 + Math.log(value) / Math.LN10);
+ i = Math.max(-24, Math.min(24, Math.floor((i - 1) / 3) * 3));
+ }
+ return d3_formatPrefixes[8 + i / 3];
+ };
+ function d3_formatPrefix(d, i) {
+ var k = Math.pow(10, abs(8 - i) * 3);
+ return {
+ scale: i > 8 ? function(d) {
+ return d / k;
+ } : function(d) {
+ return d * k;
+ },
+ symbol: d
+ };
+ }
+ function d3_locale_numberFormat(locale) {
+ var locale_decimal = locale.decimal, locale_thousands = locale.thousands, locale_grouping = locale.grouping, locale_currency = locale.currency, formatGroup = locale_grouping && locale_thousands ? function(value, width) {
+ var i = value.length, t = [], j = 0, g = locale_grouping[0], length = 0;
+ while (i > 0 && g > 0) {
+ if (length + g + 1 > width) g = Math.max(1, width - length);
+ t.push(value.substring(i -= g, i + g));
+ if ((length += g + 1) > width) break;
+ g = locale_grouping[j = (j + 1) % locale_grouping.length];
+ }
+ return t.reverse().join(locale_thousands);
+ } : d3_identity;
+ return function(specifier) {
+ var match = d3_format_re.exec(specifier), fill = match[1] || " ", align = match[2] || ">", sign = match[3] || "-", symbol = match[4] || "", zfill = match[5], width = +match[6], comma = match[7], precision = match[8], type = match[9], scale = 1, prefix = "", suffix = "", integer = false, exponent = true;
+ if (precision) precision = +precision.substring(1);
+ if (zfill || fill === "0" && align === "=") {
+ zfill = fill = "0";
+ align = "=";
+ }
+ switch (type) {
+ case "n":
+ comma = true;
+ type = "g";
+ break;
+
+ case "%":
+ scale = 100;
+ suffix = "%";
+ type = "f";
+ break;
+
+ case "p":
+ scale = 100;
+ suffix = "%";
+ type = "r";
+ break;
+
+ case "b":
+ case "o":
+ case "x":
+ case "X":
+ if (symbol === "#") prefix = "0" + type.toLowerCase();
+
+ case "c":
+ exponent = false;
+
+ case "d":
+ integer = true;
+ precision = 0;
+ break;
+
+ case "s":
+ scale = -1;
+ type = "r";
+ break;
+ }
+ if (symbol === "$") prefix = locale_currency[0], suffix = locale_currency[1];
+ if (type == "r" && !precision) type = "g";
+ if (precision != null) {
+ if (type == "g") precision = Math.max(1, Math.min(21, precision)); else if (type == "e" || type == "f") precision = Math.max(0, Math.min(20, precision));
+ }
+ type = d3_format_types.get(type) || d3_format_typeDefault;
+ var zcomma = zfill && comma;
+ return function(value) {
+ var fullSuffix = suffix;
+ if (integer && value % 1) return "";
+ var negative = value < 0 || value === 0 && 1 / value < 0 ? (value = -value, "-") : sign === "-" ? "" : sign;
+ if (scale < 0) {
+ var unit = d3.formatPrefix(value, precision);
+ value = unit.scale(value);
+ fullSuffix = unit.symbol + suffix;
+ } else {
+ value *= scale;
+ }
+ value = type(value, precision);
+ var i = value.lastIndexOf("."), before, after;
+ if (i < 0) {
+ var j = exponent ? value.lastIndexOf("e") : -1;
+ if (j < 0) before = value, after = ""; else before = value.substring(0, j), after = value.substring(j);
+ } else {
+ before = value.substring(0, i);
+ after = locale_decimal + value.substring(i + 1);
+ }
+ if (!zfill && comma) before = formatGroup(before, Infinity);
+ var length = prefix.length + before.length + after.length + (zcomma ? 0 : negative.length), padding = length < width ? new Array(length = width - length + 1).join(fill) : "";
+ if (zcomma) before = formatGroup(padding + before, padding.length ? width - after.length : Infinity);
+ negative += prefix;
+ value = before + after;
+ return (align === "<" ? negative + value + padding : align === ">" ? padding + negative + value : align === "^" ? padding.substring(0, length >>= 1) + negative + value + padding.substring(length) : negative + (zcomma ? value : padding + value)) + fullSuffix;
+ };
+ };
+ }
+ var d3_format_re = /(?:([^{])?([<>=^]))?([+\- ])?([$#])?(0)?(\d+)?(,)?(\.-?\d+)?([a-z%])?/i;
+ var d3_format_types = d3.map({
+ b: function(x) {
+ return x.toString(2);
+ },
+ c: function(x) {
+ return String.fromCharCode(x);
+ },
+ o: function(x) {
+ return x.toString(8);
+ },
+ x: function(x) {
+ return x.toString(16);
+ },
+ X: function(x) {
+ return x.toString(16).toUpperCase();
+ },
+ g: function(x, p) {
+ return x.toPrecision(p);
+ },
+ e: function(x, p) {
+ return x.toExponential(p);
+ },
+ f: function(x, p) {
+ return x.toFixed(p);
+ },
+ r: function(x, p) {
+ return (x = d3.round(x, d3_format_precision(x, p))).toFixed(Math.max(0, Math.min(20, d3_format_precision(x * (1 + 1e-15), p))));
+ }
+ });
+ function d3_format_typeDefault(x) {
+ return x + "";
+ }
+ var d3_time = d3.time = {}, d3_date = Date;
+ function d3_date_utc() {
+ this._ = new Date(arguments.length > 1 ? Date.UTC.apply(this, arguments) : arguments[0]);
+ }
+ d3_date_utc.prototype = {
+ getDate: function() {
+ return this._.getUTCDate();
+ },
+ getDay: function() {
+ return this._.getUTCDay();
+ },
+ getFullYear: function() {
+ return this._.getUTCFullYear();
+ },
+ getHours: function() {
+ return this._.getUTCHours();
+ },
+ getMilliseconds: function() {
+ return this._.getUTCMilliseconds();
+ },
+ getMinutes: function() {
+ return this._.getUTCMinutes();
+ },
+ getMonth: function() {
+ return this._.getUTCMonth();
+ },
+ getSeconds: function() {
+ return this._.getUTCSeconds();
+ },
+ getTime: function() {
+ return this._.getTime();
+ },
+ getTimezoneOffset: function() {
+ return 0;
+ },
+ valueOf: function() {
+ return this._.valueOf();
+ },
+ setDate: function() {
+ d3_time_prototype.setUTCDate.apply(this._, arguments);
+ },
+ setDay: function() {
+ d3_time_prototype.setUTCDay.apply(this._, arguments);
+ },
+ setFullYear: function() {
+ d3_time_prototype.setUTCFullYear.apply(this._, arguments);
+ },
+ setHours: function() {
+ d3_time_prototype.setUTCHours.apply(this._, arguments);
+ },
+ setMilliseconds: function() {
+ d3_time_prototype.setUTCMilliseconds.apply(this._, arguments);
+ },
+ setMinutes: function() {
+ d3_time_prototype.setUTCMinutes.apply(this._, arguments);
+ },
+ setMonth: function() {
+ d3_time_prototype.setUTCMonth.apply(this._, arguments);
+ },
+ setSeconds: function() {
+ d3_time_prototype.setUTCSeconds.apply(this._, arguments);
+ },
+ setTime: function() {
+ d3_time_prototype.setTime.apply(this._, arguments);
+ }
+ };
+ var d3_time_prototype = Date.prototype;
+ function d3_time_interval(local, step, number) {
+ function round(date) {
+ var d0 = local(date), d1 = offset(d0, 1);
+ return date - d0 < d1 - date ? d0 : d1;
+ }
+ function ceil(date) {
+ step(date = local(new d3_date(date - 1)), 1);
+ return date;
+ }
+ function offset(date, k) {
+ step(date = new d3_date(+date), k);
+ return date;
+ }
+ function range(t0, t1, dt) {
+ var time = ceil(t0), times = [];
+ if (dt > 1) {
+ while (time < t1) {
+ if (!(number(time) % dt)) times.push(new Date(+time));
+ step(time, 1);
+ }
+ } else {
+ while (time < t1) times.push(new Date(+time)), step(time, 1);
+ }
+ return times;
+ }
+ function range_utc(t0, t1, dt) {
+ try {
+ d3_date = d3_date_utc;
+ var utc = new d3_date_utc();
+ utc._ = t0;
+ return range(utc, t1, dt);
+ } finally {
+ d3_date = Date;
+ }
+ }
+ local.floor = local;
+ local.round = round;
+ local.ceil = ceil;
+ local.offset = offset;
+ local.range = range;
+ var utc = local.utc = d3_time_interval_utc(local);
+ utc.floor = utc;
+ utc.round = d3_time_interval_utc(round);
+ utc.ceil = d3_time_interval_utc(ceil);
+ utc.offset = d3_time_interval_utc(offset);
+ utc.range = range_utc;
+ return local;
+ }
+ function d3_time_interval_utc(method) {
+ return function(date, k) {
+ try {
+ d3_date = d3_date_utc;
+ var utc = new d3_date_utc();
+ utc._ = date;
+ return method(utc, k)._;
+ } finally {
+ d3_date = Date;
+ }
+ };
+ }
+ d3_time.year = d3_time_interval(function(date) {
+ date = d3_time.day(date);
+ date.setMonth(0, 1);
+ return date;
+ }, function(date, offset) {
+ date.setFullYear(date.getFullYear() + offset);
+ }, function(date) {
+ return date.getFullYear();
+ });
+ d3_time.years = d3_time.year.range;
+ d3_time.years.utc = d3_time.year.utc.range;
+ d3_time.day = d3_time_interval(function(date) {
+ var day = new d3_date(2e3, 0);
+ day.setFullYear(date.getFullYear(), date.getMonth(), date.getDate());
+ return day;
+ }, function(date, offset) {
+ date.setDate(date.getDate() + offset);
+ }, function(date) {
+ return date.getDate() - 1;
+ });
+ d3_time.days = d3_time.day.range;
+ d3_time.days.utc = d3_time.day.utc.range;
+ d3_time.dayOfYear = function(date) {
+ var year = d3_time.year(date);
+ return Math.floor((date - year - (date.getTimezoneOffset() - year.getTimezoneOffset()) * 6e4) / 864e5);
+ };
+ [ "sunday", "monday", "tuesday", "wednesday", "thursday", "friday", "saturday" ].forEach(function(day, i) {
+ i = 7 - i;
+ var interval = d3_time[day] = d3_time_interval(function(date) {
+ (date = d3_time.day(date)).setDate(date.getDate() - (date.getDay() + i) % 7);
+ return date;
+ }, function(date, offset) {
+ date.setDate(date.getDate() + Math.floor(offset) * 7);
+ }, function(date) {
+ var day = d3_time.year(date).getDay();
+ return Math.floor((d3_time.dayOfYear(date) + (day + i) % 7) / 7) - (day !== i);
+ });
+ d3_time[day + "s"] = interval.range;
+ d3_time[day + "s"].utc = interval.utc.range;
+ d3_time[day + "OfYear"] = function(date) {
+ var day = d3_time.year(date).getDay();
+ return Math.floor((d3_time.dayOfYear(date) + (day + i) % 7) / 7);
+ };
+ });
+ d3_time.week = d3_time.sunday;
+ d3_time.weeks = d3_time.sunday.range;
+ d3_time.weeks.utc = d3_time.sunday.utc.range;
+ d3_time.weekOfYear = d3_time.sundayOfYear;
+ function d3_locale_timeFormat(locale) {
+ var locale_dateTime = locale.dateTime, locale_date = locale.date, locale_time = locale.time, locale_periods = locale.periods, locale_days = locale.days, locale_shortDays = locale.shortDays, locale_months = locale.months, locale_shortMonths = locale.shortMonths;
+ function d3_time_format(template) {
+ var n = template.length;
+ function format(date) {
+ var string = [], i = -1, j = 0, c, p, f;
+ while (++i < n) {
+ if (template.charCodeAt(i) === 37) {
+ string.push(template.slice(j, i));
+ if ((p = d3_time_formatPads[c = template.charAt(++i)]) != null) c = template.charAt(++i);
+ if (f = d3_time_formats[c]) c = f(date, p == null ? c === "e" ? " " : "0" : p);
+ string.push(c);
+ j = i + 1;
+ }
+ }
+ string.push(template.slice(j, i));
+ return string.join("");
+ }
+ format.parse = function(string) {
+ var d = {
+ y: 1900,
+ m: 0,
+ d: 1,
+ H: 0,
+ M: 0,
+ S: 0,
+ L: 0,
+ Z: null
+ }, i = d3_time_parse(d, template, string, 0);
+ if (i != string.length) return null;
+ if ("p" in d) d.H = d.H % 12 + d.p * 12;
+ var localZ = d.Z != null && d3_date !== d3_date_utc, date = new (localZ ? d3_date_utc : d3_date)();
+ if ("j" in d) date.setFullYear(d.y, 0, d.j); else if ("W" in d || "U" in d) {
+ if (!("w" in d)) d.w = "W" in d ? 1 : 0;
+ date.setFullYear(d.y, 0, 1);
+ date.setFullYear(d.y, 0, "W" in d ? (d.w + 6) % 7 + d.W * 7 - (date.getDay() + 5) % 7 : d.w + d.U * 7 - (date.getDay() + 6) % 7);
+ } else date.setFullYear(d.y, d.m, d.d);
+ date.setHours(d.H + (d.Z / 100 | 0), d.M + d.Z % 100, d.S, d.L);
+ return localZ ? date._ : date;
+ };
+ format.toString = function() {
+ return template;
+ };
+ return format;
+ }
+ function d3_time_parse(date, template, string, j) {
+ var c, p, t, i = 0, n = template.length, m = string.length;
+ while (i < n) {
+ if (j >= m) return -1;
+ c = template.charCodeAt(i++);
+ if (c === 37) {
+ t = template.charAt(i++);
+ p = d3_time_parsers[t in d3_time_formatPads ? template.charAt(i++) : t];
+ if (!p || (j = p(date, string, j)) < 0) return -1;
+ } else if (c != string.charCodeAt(j++)) {
+ return -1;
+ }
+ }
+ return j;
+ }
+ d3_time_format.utc = function(template) {
+ var local = d3_time_format(template);
+ function format(date) {
+ try {
+ d3_date = d3_date_utc;
+ var utc = new d3_date();
+ utc._ = date;
+ return local(utc);
+ } finally {
+ d3_date = Date;
+ }
+ }
+ format.parse = function(string) {
+ try {
+ d3_date = d3_date_utc;
+ var date = local.parse(string);
+ return date && date._;
+ } finally {
+ d3_date = Date;
+ }
+ };
+ format.toString = local.toString;
+ return format;
+ };
+ d3_time_format.multi = d3_time_format.utc.multi = d3_time_formatMulti;
+ var d3_time_periodLookup = d3.map(), d3_time_dayRe = d3_time_formatRe(locale_days), d3_time_dayLookup = d3_time_formatLookup(locale_days), d3_time_dayAbbrevRe = d3_time_formatRe(locale_shortDays), d3_time_dayAbbrevLookup = d3_time_formatLookup(locale_shortDays), d3_time_monthRe = d3_time_formatRe(locale_months), d3_time_monthLookup = d3_time_formatLookup(locale_months), d3_time_monthAbbrevRe = d3_time_formatRe(locale_shortMonths), d3_time_monthAbbrevLookup = d3_time_formatLookup(locale_shortMonths);
+ locale_periods.forEach(function(p, i) {
+ d3_time_periodLookup.set(p.toLowerCase(), i);
+ });
+ var d3_time_formats = {
+ a: function(d) {
+ return locale_shortDays[d.getDay()];
+ },
+ A: function(d) {
+ return locale_days[d.getDay()];
+ },
+ b: function(d) {
+ return locale_shortMonths[d.getMonth()];
+ },
+ B: function(d) {
+ return locale_months[d.getMonth()];
+ },
+ c: d3_time_format(locale_dateTime),
+ d: function(d, p) {
+ return d3_time_formatPad(d.getDate(), p, 2);
+ },
+ e: function(d, p) {
+ return d3_time_formatPad(d.getDate(), p, 2);
+ },
+ H: function(d, p) {
+ return d3_time_formatPad(d.getHours(), p, 2);
+ },
+ I: function(d, p) {
+ return d3_time_formatPad(d.getHours() % 12 || 12, p, 2);
+ },
+ j: function(d, p) {
+ return d3_time_formatPad(1 + d3_time.dayOfYear(d), p, 3);
+ },
+ L: function(d, p) {
+ return d3_time_formatPad(d.getMilliseconds(), p, 3);
+ },
+ m: function(d, p) {
+ return d3_time_formatPad(d.getMonth() + 1, p, 2);
+ },
+ M: function(d, p) {
+ return d3_time_formatPad(d.getMinutes(), p, 2);
+ },
+ p: function(d) {
+ return locale_periods[+(d.getHours() >= 12)];
+ },
+ S: function(d, p) {
+ return d3_time_formatPad(d.getSeconds(), p, 2);
+ },
+ U: function(d, p) {
+ return d3_time_formatPad(d3_time.sundayOfYear(d), p, 2);
+ },
+ w: function(d) {
+ return d.getDay();
+ },
+ W: function(d, p) {
+ return d3_time_formatPad(d3_time.mondayOfYear(d), p, 2);
+ },
+ x: d3_time_format(locale_date),
+ X: d3_time_format(locale_time),
+ y: function(d, p) {
+ return d3_time_formatPad(d.getFullYear() % 100, p, 2);
+ },
+ Y: function(d, p) {
+ return d3_time_formatPad(d.getFullYear() % 1e4, p, 4);
+ },
+ Z: d3_time_zone,
+ "%": function() {
+ return "%";
+ }
+ };
+ var d3_time_parsers = {
+ a: d3_time_parseWeekdayAbbrev,
+ A: d3_time_parseWeekday,
+ b: d3_time_parseMonthAbbrev,
+ B: d3_time_parseMonth,
+ c: d3_time_parseLocaleFull,
+ d: d3_time_parseDay,
+ e: d3_time_parseDay,
+ H: d3_time_parseHour24,
+ I: d3_time_parseHour24,
+ j: d3_time_parseDayOfYear,
+ L: d3_time_parseMilliseconds,
+ m: d3_time_parseMonthNumber,
+ M: d3_time_parseMinutes,
+ p: d3_time_parseAmPm,
+ S: d3_time_parseSeconds,
+ U: d3_time_parseWeekNumberSunday,
+ w: d3_time_parseWeekdayNumber,
+ W: d3_time_parseWeekNumberMonday,
+ x: d3_time_parseLocaleDate,
+ X: d3_time_parseLocaleTime,
+ y: d3_time_parseYear,
+ Y: d3_time_parseFullYear,
+ Z: d3_time_parseZone,
+ "%": d3_time_parseLiteralPercent
+ };
+ function d3_time_parseWeekdayAbbrev(date, string, i) {
+ d3_time_dayAbbrevRe.lastIndex = 0;
+ var n = d3_time_dayAbbrevRe.exec(string.slice(i));
+ return n ? (date.w = d3_time_dayAbbrevLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;
+ }
+ function d3_time_parseWeekday(date, string, i) {
+ d3_time_dayRe.lastIndex = 0;
+ var n = d3_time_dayRe.exec(string.slice(i));
+ return n ? (date.w = d3_time_dayLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;
+ }
+ function d3_time_parseMonthAbbrev(date, string, i) {
+ d3_time_monthAbbrevRe.lastIndex = 0;
+ var n = d3_time_monthAbbrevRe.exec(string.slice(i));
+ return n ? (date.m = d3_time_monthAbbrevLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;
+ }
+ function d3_time_parseMonth(date, string, i) {
+ d3_time_monthRe.lastIndex = 0;
+ var n = d3_time_monthRe.exec(string.slice(i));
+ return n ? (date.m = d3_time_monthLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;
+ }
+ function d3_time_parseLocaleFull(date, string, i) {
+ return d3_time_parse(date, d3_time_formats.c.toString(), string, i);
+ }
+ function d3_time_parseLocaleDate(date, string, i) {
+ return d3_time_parse(date, d3_time_formats.x.toString(), string, i);
+ }
+ function d3_time_parseLocaleTime(date, string, i) {
+ return d3_time_parse(date, d3_time_formats.X.toString(), string, i);
+ }
+ function d3_time_parseAmPm(date, string, i) {
+ var n = d3_time_periodLookup.get(string.slice(i, i += 2).toLowerCase());
+ return n == null ? -1 : (date.p = n, i);
+ }
+ return d3_time_format;
+ }
+ var d3_time_formatPads = {
+ "-": "",
+ _: " ",
+ "0": "0"
+ }, d3_time_numberRe = /^\s*\d+/, d3_time_percentRe = /^%/;
+ function d3_time_formatPad(value, fill, width) {
+ var sign = value < 0 ? "-" : "", string = (sign ? -value : value) + "", length = string.length;
+ return sign + (length < width ? new Array(width - length + 1).join(fill) + string : string);
+ }
+ function d3_time_formatRe(names) {
+ return new RegExp("^(?:" + names.map(d3.requote).join("|") + ")", "i");
+ }
+ function d3_time_formatLookup(names) {
+ var map = new d3_Map(), i = -1, n = names.length;
+ while (++i < n) map.set(names[i].toLowerCase(), i);
+ return map;
+ }
+ function d3_time_parseWeekdayNumber(date, string, i) {
+ d3_time_numberRe.lastIndex = 0;
+ var n = d3_time_numberRe.exec(string.slice(i, i + 1));
+ return n ? (date.w = +n[0], i + n[0].length) : -1;
+ }
+ function d3_time_parseWeekNumberSunday(date, string, i) {
+ d3_time_numberRe.lastIndex = 0;
+ var n = d3_time_numberRe.exec(string.slice(i));
+ return n ? (date.U = +n[0], i + n[0].length) : -1;
+ }
+ function d3_time_parseWeekNumberMonday(date, string, i) {
+ d3_time_numberRe.lastIndex = 0;
+ var n = d3_time_numberRe.exec(string.slice(i));
+ return n ? (date.W = +n[0], i + n[0].length) : -1;
+ }
+ function d3_time_parseFullYear(date, string, i) {
+ d3_time_numberRe.lastIndex = 0;
+ var n = d3_time_numberRe.exec(string.slice(i, i + 4));
+ return n ? (date.y = +n[0], i + n[0].length) : -1;
+ }
+ function d3_time_parseYear(date, string, i) {
+ d3_time_numberRe.lastIndex = 0;
+ var n = d3_time_numberRe.exec(string.slice(i, i + 2));
+ return n ? (date.y = d3_time_expandYear(+n[0]), i + n[0].length) : -1;
+ }
+ function d3_time_parseZone(date, string, i) {
+ return /^[+-]\d{4}$/.test(string = string.slice(i, i + 5)) ? (date.Z = -string,
+ i + 5) : -1;
+ }
+ function d3_time_expandYear(d) {
+ return d + (d > 68 ? 1900 : 2e3);
+ }
+ function d3_time_parseMonthNumber(date, string, i) {
+ d3_time_numberRe.lastIndex = 0;
+ var n = d3_time_numberRe.exec(string.slice(i, i + 2));
+ return n ? (date.m = n[0] - 1, i + n[0].length) : -1;
+ }
+ function d3_time_parseDay(date, string, i) {
+ d3_time_numberRe.lastIndex = 0;
+ var n = d3_time_numberRe.exec(string.slice(i, i + 2));
+ return n ? (date.d = +n[0], i + n[0].length) : -1;
+ }
+ function d3_time_parseDayOfYear(date, string, i) {
+ d3_time_numberRe.lastIndex = 0;
+ var n = d3_time_numberRe.exec(string.slice(i, i + 3));
+ return n ? (date.j = +n[0], i + n[0].length) : -1;
+ }
+ function d3_time_parseHour24(date, string, i) {
+ d3_time_numberRe.lastIndex = 0;
+ var n = d3_time_numberRe.exec(string.slice(i, i + 2));
+ return n ? (date.H = +n[0], i + n[0].length) : -1;
+ }
+ function d3_time_parseMinutes(date, string, i) {
+ d3_time_numberRe.lastIndex = 0;
+ var n = d3_time_numberRe.exec(string.slice(i, i + 2));
+ return n ? (date.M = +n[0], i + n[0].length) : -1;
+ }
+ function d3_time_parseSeconds(date, string, i) {
+ d3_time_numberRe.lastIndex = 0;
+ var n = d3_time_numberRe.exec(string.slice(i, i + 2));
+ return n ? (date.S = +n[0], i + n[0].length) : -1;
+ }
+ function d3_time_parseMilliseconds(date, string, i) {
+ d3_time_numberRe.lastIndex = 0;
+ var n = d3_time_numberRe.exec(string.slice(i, i + 3));
+ return n ? (date.L = +n[0], i + n[0].length) : -1;
+ }
+ function d3_time_zone(d) {
+ var z = d.getTimezoneOffset(), zs = z > 0 ? "-" : "+", zh = abs(z) / 60 | 0, zm = abs(z) % 60;
+ return zs + d3_time_formatPad(zh, "0", 2) + d3_time_formatPad(zm, "0", 2);
+ }
+ function d3_time_parseLiteralPercent(date, string, i) {
+ d3_time_percentRe.lastIndex = 0;
+ var n = d3_time_percentRe.exec(string.slice(i, i + 1));
+ return n ? i + n[0].length : -1;
+ }
+ function d3_time_formatMulti(formats) {
+ var n = formats.length, i = -1;
+ while (++i < n) formats[i][0] = this(formats[i][0]);
+ return function(date) {
+ var i = 0, f = formats[i];
+ while (!f[1](date)) f = formats[++i];
+ return f[0](date);
+ };
+ }
+ d3.locale = function(locale) {
+ return {
+ numberFormat: d3_locale_numberFormat(locale),
+ timeFormat: d3_locale_timeFormat(locale)
+ };
+ };
+ var d3_locale_enUS = d3.locale({
+ decimal: ".",
+ thousands: ",",
+ grouping: [ 3 ],
+ currency: [ "$", "" ],
+ dateTime: "%a %b %e %X %Y",
+ date: "%m/%d/%Y",
+ time: "%H:%M:%S",
+ periods: [ "AM", "PM" ],
+ days: [ "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" ],
+ shortDays: [ "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" ],
+ months: [ "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" ],
+ shortMonths: [ "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" ]
+ });
+ d3.format = d3_locale_enUS.numberFormat;
+ d3.geo = {};
+ function d3_adder() {}
+ d3_adder.prototype = {
+ s: 0,
+ t: 0,
+ add: function(y) {
+ d3_adderSum(y, this.t, d3_adderTemp);
+ d3_adderSum(d3_adderTemp.s, this.s, this);
+ if (this.s) this.t += d3_adderTemp.t; else this.s = d3_adderTemp.t;
+ },
+ reset: function() {
+ this.s = this.t = 0;
+ },
+ valueOf: function() {
+ return this.s;
+ }
+ };
+ var d3_adderTemp = new d3_adder();
+ function d3_adderSum(a, b, o) {
+ var x = o.s = a + b, bv = x - a, av = x - bv;
+ o.t = a - av + (b - bv);
+ }
+ d3.geo.stream = function(object, listener) {
+ if (object && d3_geo_streamObjectType.hasOwnProperty(object.type)) {
+ d3_geo_streamObjectType[object.type](object, listener);
+ } else {
+ d3_geo_streamGeometry(object, listener);
+ }
+ };
+ function d3_geo_streamGeometry(geometry, listener) {
+ if (geometry && d3_geo_streamGeometryType.hasOwnProperty(geometry.type)) {
+ d3_geo_streamGeometryType[geometry.type](geometry, listener);
+ }
+ }
+ var d3_geo_streamObjectType = {
+ Feature: function(feature, listener) {
+ d3_geo_streamGeometry(feature.geometry, listener);
+ },
+ FeatureCollection: function(object, listener) {
+ var features = object.features, i = -1, n = features.length;
+ while (++i < n) d3_geo_streamGeometry(features[i].geometry, listener);
+ }
+ };
+ var d3_geo_streamGeometryType = {
+ Sphere: function(object, listener) {
+ listener.sphere();
+ },
+ Point: function(object, listener) {
+ object = object.coordinates;
+ listener.point(object[0], object[1], object[2]);
+ },
+ MultiPoint: function(object, listener) {
+ var coordinates = object.coordinates, i = -1, n = coordinates.length;
+ while (++i < n) object = coordinates[i], listener.point(object[0], object[1], object[2]);
+ },
+ LineString: function(object, listener) {
+ d3_geo_streamLine(object.coordinates, listener, 0);
+ },
+ MultiLineString: function(object, listener) {
+ var coordinates = object.coordinates, i = -1, n = coordinates.length;
+ while (++i < n) d3_geo_streamLine(coordinates[i], listener, 0);
+ },
+ Polygon: function(object, listener) {
+ d3_geo_streamPolygon(object.coordinates, listener);
+ },
+ MultiPolygon: function(object, listener) {
+ var coordinates = object.coordinates, i = -1, n = coordinates.length;
+ while (++i < n) d3_geo_streamPolygon(coordinates[i], listener);
+ },
+ GeometryCollection: function(object, listener) {
+ var geometries = object.geometries, i = -1, n = geometries.length;
+ while (++i < n) d3_geo_streamGeometry(geometries[i], listener);
+ }
+ };
+ function d3_geo_streamLine(coordinates, listener, closed) {
+ var i = -1, n = coordinates.length - closed, coordinate;
+ listener.lineStart();
+ while (++i < n) coordinate = coordinates[i], listener.point(coordinate[0], coordinate[1], coordinate[2]);
+ listener.lineEnd();
+ }
+ function d3_geo_streamPolygon(coordinates, listener) {
+ var i = -1, n = coordinates.length;
+ listener.polygonStart();
+ while (++i < n) d3_geo_streamLine(coordinates[i], listener, 1);
+ listener.polygonEnd();
+ }
+ d3.geo.area = function(object) {
+ d3_geo_areaSum = 0;
+ d3.geo.stream(object, d3_geo_area);
+ return d3_geo_areaSum;
+ };
+ var d3_geo_areaSum, d3_geo_areaRingSum = new d3_adder();
+ var d3_geo_area = {
+ sphere: function() {
+ d3_geo_areaSum += 4 * π;
+ },
+ point: d3_noop,
+ lineStart: d3_noop,
+ lineEnd: d3_noop,
+ polygonStart: function() {
+ d3_geo_areaRingSum.reset();
+ d3_geo_area.lineStart = d3_geo_areaRingStart;
+ },
+ polygonEnd: function() {
+ var area = 2 * d3_geo_areaRingSum;
+ d3_geo_areaSum += area < 0 ? 4 * π + area : area;
+ d3_geo_area.lineStart = d3_geo_area.lineEnd = d3_geo_area.point = d3_noop;
+ }
+ };
+ function d3_geo_areaRingStart() {
+ var λ00, φ00, λ0, cosφ0, sinφ0;
+ d3_geo_area.point = function(λ, φ) {
+ d3_geo_area.point = nextPoint;
+ λ0 = (λ00 = λ) * d3_radians, cosφ0 = Math.cos(φ = (φ00 = φ) * d3_radians / 2 + π / 4),
+ sinφ0 = Math.sin(φ);
+ };
+ function nextPoint(λ, φ) {
+ λ *= d3_radians;
+ φ = φ * d3_radians / 2 + π / 4;
+ var dλ = λ - λ0, sdλ = dλ >= 0 ? 1 : -1, adλ = sdλ * dλ, cosφ = Math.cos(φ), sinφ = Math.sin(φ), k = sinφ0 * sinφ, u = cosφ0 * cosφ + k * Math.cos(adλ), v = k * sdλ * Math.sin(adλ);
+ d3_geo_areaRingSum.add(Math.atan2(v, u));
+ λ0 = λ, cosφ0 = cosφ, sinφ0 = sinφ;
+ }
+ d3_geo_area.lineEnd = function() {
+ nextPoint(λ00, φ00);
+ };
+ }
+ function d3_geo_cartesian(spherical) {
+ var λ = spherical[0], φ = spherical[1], cosφ = Math.cos(φ);
+ return [ cosφ * Math.cos(λ), cosφ * Math.sin(λ), Math.sin(φ) ];
+ }
+ function d3_geo_cartesianDot(a, b) {
+ return a[0] * b[0] + a[1] * b[1] + a[2] * b[2];
+ }
+ function d3_geo_cartesianCross(a, b) {
+ return [ a[1] * b[2] - a[2] * b[1], a[2] * b[0] - a[0] * b[2], a[0] * b[1] - a[1] * b[0] ];
+ }
+ function d3_geo_cartesianAdd(a, b) {
+ a[0] += b[0];
+ a[1] += b[1];
+ a[2] += b[2];
+ }
+ function d3_geo_cartesianScale(vector, k) {
+ return [ vector[0] * k, vector[1] * k, vector[2] * k ];
+ }
+ function d3_geo_cartesianNormalize(d) {
+ var l = Math.sqrt(d[0] * d[0] + d[1] * d[1] + d[2] * d[2]);
+ d[0] /= l;
+ d[1] /= l;
+ d[2] /= l;
+ }
+ function d3_geo_spherical(cartesian) {
+ return [ Math.atan2(cartesian[1], cartesian[0]), d3_asin(cartesian[2]) ];
+ }
+ function d3_geo_sphericalEqual(a, b) {
+ return abs(a[0] - b[0]) < ε && abs(a[1] - b[1]) < ε;
+ }
+ d3.geo.bounds = function() {
+ var λ0, φ0, λ1, φ1, λ_, λ__, φ__, p0, dλSum, ranges, range;
+ var bound = {
+ point: point,
+ lineStart: lineStart,
+ lineEnd: lineEnd,
+ polygonStart: function() {
+ bound.point = ringPoint;
+ bound.lineStart = ringStart;
+ bound.lineEnd = ringEnd;
+ dλSum = 0;
+ d3_geo_area.polygonStart();
+ },
+ polygonEnd: function() {
+ d3_geo_area.polygonEnd();
+ bound.point = point;
+ bound.lineStart = lineStart;
+ bound.lineEnd = lineEnd;
+ if (d3_geo_areaRingSum < 0) λ0 = -(λ1 = 180), φ0 = -(φ1 = 90); else if (dλSum > ε) φ1 = 90; else if (dλSum < -ε) φ0 = -90;
+ range[0] = λ0, range[1] = λ1;
+ }
+ };
+ function point(λ, φ) {
+ ranges.push(range = [ λ0 = λ, λ1 = λ ]);
+ if (φ < φ0) φ0 = φ;
+ if (φ > φ1) φ1 = φ;
+ }
+ function linePoint(λ, φ) {
+ var p = d3_geo_cartesian([ λ * d3_radians, φ * d3_radians ]);
+ if (p0) {
+ var normal = d3_geo_cartesianCross(p0, p), equatorial = [ normal[1], -normal[0], 0 ], inflection = d3_geo_cartesianCross(equatorial, normal);
+ d3_geo_cartesianNormalize(inflection);
+ inflection = d3_geo_spherical(inflection);
+ var dλ = λ - λ_, s = dλ > 0 ? 1 : -1, λi = inflection[0] * d3_degrees * s, antimeridian = abs(dλ) > 180;
+ if (antimeridian ^ (s * λ_ < λi && λi < s * λ)) {
+ var φi = inflection[1] * d3_degrees;
+ if (φi > φ1) φ1 = φi;
+ } else if (λi = (λi + 360) % 360 - 180, antimeridian ^ (s * λ_ < λi && λi < s * λ)) {
+ var φi = -inflection[1] * d3_degrees;
+ if (φi < φ0) φ0 = φi;
+ } else {
+ if (φ < φ0) φ0 = φ;
+ if (φ > φ1) φ1 = φ;
+ }
+ if (antimeridian) {
+ if (λ < λ_) {
+ if (angle(λ0, λ) > angle(λ0, λ1)) λ1 = λ;
+ } else {
+ if (angle(λ, λ1) > angle(λ0, λ1)) λ0 = λ;
+ }
+ } else {
+ if (λ1 >= λ0) {
+ if (λ < λ0) λ0 = λ;
+ if (λ > λ1) λ1 = λ;
+ } else {
+ if (λ > λ_) {
+ if (angle(λ0, λ) > angle(λ0, λ1)) λ1 = λ;
+ } else {
+ if (angle(λ, λ1) > angle(λ0, λ1)) λ0 = λ;
+ }
+ }
+ }
+ } else {
+ point(λ, φ);
+ }
+ p0 = p, λ_ = λ;
+ }
+ function lineStart() {
+ bound.point = linePoint;
+ }
+ function lineEnd() {
+ range[0] = λ0, range[1] = λ1;
+ bound.point = point;
+ p0 = null;
+ }
+ function ringPoint(λ, φ) {
+ if (p0) {
+ var dλ = λ - λ_;
+ dλSum += abs(dλ) > 180 ? dλ + (dλ > 0 ? 360 : -360) : dλ;
+ } else λ__ = λ, φ__ = φ;
+ d3_geo_area.point(λ, φ);
+ linePoint(λ, φ);
+ }
+ function ringStart() {
+ d3_geo_area.lineStart();
+ }
+ function ringEnd() {
+ ringPoint(λ__, φ__);
+ d3_geo_area.lineEnd();
+ if (abs(dλSum) > ε) λ0 = -(λ1 = 180);
+ range[0] = λ0, range[1] = λ1;
+ p0 = null;
+ }
+ function angle(λ0, λ1) {
+ return (λ1 -= λ0) < 0 ? λ1 + 360 : λ1;
+ }
+ function compareRanges(a, b) {
+ return a[0] - b[0];
+ }
+ function withinRange(x, range) {
+ return range[0] <= range[1] ? range[0] <= x && x <= range[1] : x < range[0] || range[1] < x;
+ }
+ return function(feature) {
+ φ1 = λ1 = -(λ0 = φ0 = Infinity);
+ ranges = [];
+ d3.geo.stream(feature, bound);
+ var n = ranges.length;
+ if (n) {
+ ranges.sort(compareRanges);
+ for (var i = 1, a = ranges[0], b, merged = [ a ]; i < n; ++i) {
+ b = ranges[i];
+ if (withinRange(b[0], a) || withinRange(b[1], a)) {
+ if (angle(a[0], b[1]) > angle(a[0], a[1])) a[1] = b[1];
+ if (angle(b[0], a[1]) > angle(a[0], a[1])) a[0] = b[0];
+ } else {
+ merged.push(a = b);
+ }
+ }
+ var best = -Infinity, dλ;
+ for (var n = merged.length - 1, i = 0, a = merged[n], b; i <= n; a = b, ++i) {
+ b = merged[i];
+ if ((dλ = angle(a[1], b[0])) > best) best = dλ, λ0 = b[0], λ1 = a[1];
+ }
+ }
+ ranges = range = null;
+ return λ0 === Infinity || φ0 === Infinity ? [ [ NaN, NaN ], [ NaN, NaN ] ] : [ [ λ0, φ0 ], [ λ1, φ1 ] ];
+ };
+ }();
+ d3.geo.centroid = function(object) {
+ d3_geo_centroidW0 = d3_geo_centroidW1 = d3_geo_centroidX0 = d3_geo_centroidY0 = d3_geo_centroidZ0 = d3_geo_centroidX1 = d3_geo_centroidY1 = d3_geo_centroidZ1 = d3_geo_centroidX2 = d3_geo_centroidY2 = d3_geo_centroidZ2 = 0;
+ d3.geo.stream(object, d3_geo_centroid);
+ var x = d3_geo_centroidX2, y = d3_geo_centroidY2, z = d3_geo_centroidZ2, m = x * x + y * y + z * z;
+ if (m < ε2) {
+ x = d3_geo_centroidX1, y = d3_geo_centroidY1, z = d3_geo_centroidZ1;
+ if (d3_geo_centroidW1 < ε) x = d3_geo_centroidX0, y = d3_geo_centroidY0, z = d3_geo_centroidZ0;
+ m = x * x + y * y + z * z;
+ if (m < ε2) return [ NaN, NaN ];
+ }
+ return [ Math.atan2(y, x) * d3_degrees, d3_asin(z / Math.sqrt(m)) * d3_degrees ];
+ };
+ var d3_geo_centroidW0, d3_geo_centroidW1, d3_geo_centroidX0, d3_geo_centroidY0, d3_geo_centroidZ0, d3_geo_centroidX1, d3_geo_centroidY1, d3_geo_centroidZ1, d3_geo_centroidX2, d3_geo_centroidY2, d3_geo_centroidZ2;
+ var d3_geo_centroid = {
+ sphere: d3_noop,
+ point: d3_geo_centroidPoint,
+ lineStart: d3_geo_centroidLineStart,
+ lineEnd: d3_geo_centroidLineEnd,
+ polygonStart: function() {
+ d3_geo_centroid.lineStart = d3_geo_centroidRingStart;
+ },
+ polygonEnd: function() {
+ d3_geo_centroid.lineStart = d3_geo_centroidLineStart;
+ }
+ };
+ function d3_geo_centroidPoint(λ, φ) {
+ λ *= d3_radians;
+ var cosφ = Math.cos(φ *= d3_radians);
+ d3_geo_centroidPointXYZ(cosφ * Math.cos(λ), cosφ * Math.sin(λ), Math.sin(φ));
+ }
+ function d3_geo_centroidPointXYZ(x, y, z) {
+ ++d3_geo_centroidW0;
+ d3_geo_centroidX0 += (x - d3_geo_centroidX0) / d3_geo_centroidW0;
+ d3_geo_centroidY0 += (y - d3_geo_centroidY0) / d3_geo_centroidW0;
+ d3_geo_centroidZ0 += (z - d3_geo_centroidZ0) / d3_geo_centroidW0;
+ }
+ function d3_geo_centroidLineStart() {
+ var x0, y0, z0;
+ d3_geo_centroid.point = function(λ, φ) {
+ λ *= d3_radians;
+ var cosφ = Math.cos(φ *= d3_radians);
+ x0 = cosφ * Math.cos(λ);
+ y0 = cosφ * Math.sin(λ);
+ z0 = Math.sin(φ);
+ d3_geo_centroid.point = nextPoint;
+ d3_geo_centroidPointXYZ(x0, y0, z0);
+ };
+ function nextPoint(λ, φ) {
+ λ *= d3_radians;
+ var cosφ = Math.cos(φ *= d3_radians), x = cosφ * Math.cos(λ), y = cosφ * Math.sin(λ), z = Math.sin(φ), w = Math.atan2(Math.sqrt((w = y0 * z - z0 * y) * w + (w = z0 * x - x0 * z) * w + (w = x0 * y - y0 * x) * w), x0 * x + y0 * y + z0 * z);
+ d3_geo_centroidW1 += w;
+ d3_geo_centroidX1 += w * (x0 + (x0 = x));
+ d3_geo_centroidY1 += w * (y0 + (y0 = y));
+ d3_geo_centroidZ1 += w * (z0 + (z0 = z));
+ d3_geo_centroidPointXYZ(x0, y0, z0);
+ }
+ }
+ function d3_geo_centroidLineEnd() {
+ d3_geo_centroid.point = d3_geo_centroidPoint;
+ }
+ function d3_geo_centroidRingStart() {
+ var λ00, φ00, x0, y0, z0;
+ d3_geo_centroid.point = function(λ, φ) {
+ λ00 = λ, φ00 = φ;
+ d3_geo_centroid.point = nextPoint;
+ λ *= d3_radians;
+ var cosφ = Math.cos(φ *= d3_radians);
+ x0 = cosφ * Math.cos(λ);
+ y0 = cosφ * Math.sin(λ);
+ z0 = Math.sin(φ);
+ d3_geo_centroidPointXYZ(x0, y0, z0);
+ };
+ d3_geo_centroid.lineEnd = function() {
+ nextPoint(λ00, φ00);
+ d3_geo_centroid.lineEnd = d3_geo_centroidLineEnd;
+ d3_geo_centroid.point = d3_geo_centroidPoint;
+ };
+ function nextPoint(λ, φ) {
+ λ *= d3_radians;
+ var cosφ = Math.cos(φ *= d3_radians), x = cosφ * Math.cos(λ), y = cosφ * Math.sin(λ), z = Math.sin(φ), cx = y0 * z - z0 * y, cy = z0 * x - x0 * z, cz = x0 * y - y0 * x, m = Math.sqrt(cx * cx + cy * cy + cz * cz), u = x0 * x + y0 * y + z0 * z, v = m && -d3_acos(u) / m, w = Math.atan2(m, u);
+ d3_geo_centroidX2 += v * cx;
+ d3_geo_centroidY2 += v * cy;
+ d3_geo_centroidZ2 += v * cz;
+ d3_geo_centroidW1 += w;
+ d3_geo_centroidX1 += w * (x0 + (x0 = x));
+ d3_geo_centroidY1 += w * (y0 + (y0 = y));
+ d3_geo_centroidZ1 += w * (z0 + (z0 = z));
+ d3_geo_centroidPointXYZ(x0, y0, z0);
+ }
+ }
+ function d3_geo_compose(a, b) {
+ function compose(x, y) {
+ return x = a(x, y), b(x[0], x[1]);
+ }
+ if (a.invert && b.invert) compose.invert = function(x, y) {
+ return x = b.invert(x, y), x && a.invert(x[0], x[1]);
+ };
+ return compose;
+ }
+ function d3_true() {
+ return true;
+ }
+ function d3_geo_clipPolygon(segments, compare, clipStartInside, interpolate, listener) {
+ var subject = [], clip = [];
+ segments.forEach(function(segment) {
+ if ((n = segment.length - 1) <= 0) return;
+ var n, p0 = segment[0], p1 = segment[n];
+ if (d3_geo_sphericalEqual(p0, p1)) {
+ listener.lineStart();
+ for (var i = 0; i < n; ++i) listener.point((p0 = segment[i])[0], p0[1]);
+ listener.lineEnd();
+ return;
+ }
+ var a = new d3_geo_clipPolygonIntersection(p0, segment, null, true), b = new d3_geo_clipPolygonIntersection(p0, null, a, false);
+ a.o = b;
+ subject.push(a);
+ clip.push(b);
+ a = new d3_geo_clipPolygonIntersection(p1, segment, null, false);
+ b = new d3_geo_clipPolygonIntersection(p1, null, a, true);
+ a.o = b;
+ subject.push(a);
+ clip.push(b);
+ });
+ clip.sort(compare);
+ d3_geo_clipPolygonLinkCircular(subject);
+ d3_geo_clipPolygonLinkCircular(clip);
+ if (!subject.length) return;
+ for (var i = 0, entry = clipStartInside, n = clip.length; i < n; ++i) {
+ clip[i].e = entry = !entry;
+ }
+ var start = subject[0], points, point;
+ while (1) {
+ var current = start, isSubject = true;
+ while (current.v) if ((current = current.n) === start) return;
+ points = current.z;
+ listener.lineStart();
+ do {
+ current.v = current.o.v = true;
+ if (current.e) {
+ if (isSubject) {
+ for (var i = 0, n = points.length; i < n; ++i) listener.point((point = points[i])[0], point[1]);
+ } else {
+ interpolate(current.x, current.n.x, 1, listener);
+ }
+ current = current.n;
+ } else {
+ if (isSubject) {
+ points = current.p.z;
+ for (var i = points.length - 1; i >= 0; --i) listener.point((point = points[i])[0], point[1]);
+ } else {
+ interpolate(current.x, current.p.x, -1, listener);
+ }
+ current = current.p;
+ }
+ current = current.o;
+ points = current.z;
+ isSubject = !isSubject;
+ } while (!current.v);
+ listener.lineEnd();
+ }
+ }
+ function d3_geo_clipPolygonLinkCircular(array) {
+ if (!(n = array.length)) return;
+ var n, i = 0, a = array[0], b;
+ while (++i < n) {
+ a.n = b = array[i];
+ b.p = a;
+ a = b;
+ }
+ a.n = b = array[0];
+ b.p = a;
+ }
+ function d3_geo_clipPolygonIntersection(point, points, other, entry) {
+ this.x = point;
+ this.z = points;
+ this.o = other;
+ this.e = entry;
+ this.v = false;
+ this.n = this.p = null;
+ }
+ function d3_geo_clip(pointVisible, clipLine, interpolate, clipStart) {
+ return function(rotate, listener) {
+ var line = clipLine(listener), rotatedClipStart = rotate.invert(clipStart[0], clipStart[1]);
+ var clip = {
+ point: point,
+ lineStart: lineStart,
+ lineEnd: lineEnd,
+ polygonStart: function() {
+ clip.point = pointRing;
+ clip.lineStart = ringStart;
+ clip.lineEnd = ringEnd;
+ segments = [];
+ polygon = [];
+ },
+ polygonEnd: function() {
+ clip.point = point;
+ clip.lineStart = lineStart;
+ clip.lineEnd = lineEnd;
+ segments = d3.merge(segments);
+ var clipStartInside = d3_geo_pointInPolygon(rotatedClipStart, polygon);
+ if (segments.length) {
+ if (!polygonStarted) listener.polygonStart(), polygonStarted = true;
+ d3_geo_clipPolygon(segments, d3_geo_clipSort, clipStartInside, interpolate, listener);
+ } else if (clipStartInside) {
+ if (!polygonStarted) listener.polygonStart(), polygonStarted = true;
+ listener.lineStart();
+ interpolate(null, null, 1, listener);
+ listener.lineEnd();
+ }
+ if (polygonStarted) listener.polygonEnd(), polygonStarted = false;
+ segments = polygon = null;
+ },
+ sphere: function() {
+ listener.polygonStart();
+ listener.lineStart();
+ interpolate(null, null, 1, listener);
+ listener.lineEnd();
+ listener.polygonEnd();
+ }
+ };
+ function point(λ, φ) {
+ var point = rotate(λ, φ);
+ if (pointVisible(λ = point[0], φ = point[1])) listener.point(λ, φ);
+ }
+ function pointLine(λ, φ) {
+ var point = rotate(λ, φ);
+ line.point(point[0], point[1]);
+ }
+ function lineStart() {
+ clip.point = pointLine;
+ line.lineStart();
+ }
+ function lineEnd() {
+ clip.point = point;
+ line.lineEnd();
+ }
+ var segments;
+ var buffer = d3_geo_clipBufferListener(), ringListener = clipLine(buffer), polygonStarted = false, polygon, ring;
+ function pointRing(λ, φ) {
+ ring.push([ λ, φ ]);
+ var point = rotate(λ, φ);
+ ringListener.point(point[0], point[1]);
+ }
+ function ringStart() {
+ ringListener.lineStart();
+ ring = [];
+ }
+ function ringEnd() {
+ pointRing(ring[0][0], ring[0][1]);
+ ringListener.lineEnd();
+ var clean = ringListener.clean(), ringSegments = buffer.buffer(), segment, n = ringSegments.length;
+ ring.pop();
+ polygon.push(ring);
+ ring = null;
+ if (!n) return;
+ if (clean & 1) {
+ segment = ringSegments[0];
+ var n = segment.length - 1, i = -1, point;
+ if (n > 0) {
+ if (!polygonStarted) listener.polygonStart(), polygonStarted = true;
+ listener.lineStart();
+ while (++i < n) listener.point((point = segment[i])[0], point[1]);
+ listener.lineEnd();
+ }
+ return;
+ }
+ if (n > 1 && clean & 2) ringSegments.push(ringSegments.pop().concat(ringSegments.shift()));
+ segments.push(ringSegments.filter(d3_geo_clipSegmentLength1));
+ }
+ return clip;
+ };
+ }
+ function d3_geo_clipSegmentLength1(segment) {
+ return segment.length > 1;
+ }
+ function d3_geo_clipBufferListener() {
+ var lines = [], line;
+ return {
+ lineStart: function() {
+ lines.push(line = []);
+ },
+ point: function(λ, φ) {
+ line.push([ λ, φ ]);
+ },
+ lineEnd: d3_noop,
+ buffer: function() {
+ var buffer = lines;
+ lines = [];
+ line = null;
+ return buffer;
+ },
+ rejoin: function() {
+ if (lines.length > 1) lines.push(lines.pop().concat(lines.shift()));
+ }
+ };
+ }
+ function d3_geo_clipSort(a, b) {
+ return ((a = a.x)[0] < 0 ? a[1] - halfπ - ε : halfπ - a[1]) - ((b = b.x)[0] < 0 ? b[1] - halfπ - ε : halfπ - b[1]);
+ }
+ var d3_geo_clipAntimeridian = d3_geo_clip(d3_true, d3_geo_clipAntimeridianLine, d3_geo_clipAntimeridianInterpolate, [ -π, -π / 2 ]);
+ function d3_geo_clipAntimeridianLine(listener) {
+ var λ0 = NaN, φ0 = NaN, sλ0 = NaN, clean;
+ return {
+ lineStart: function() {
+ listener.lineStart();
+ clean = 1;
+ },
+ point: function(λ1, φ1) {
+ var sλ1 = λ1 > 0 ? π : -π, dλ = abs(λ1 - λ0);
+ if (abs(dλ - π) < ε) {
+ listener.point(λ0, φ0 = (φ0 + φ1) / 2 > 0 ? halfπ : -halfπ);
+ listener.point(sλ0, φ0);
+ listener.lineEnd();
+ listener.lineStart();
+ listener.point(sλ1, φ0);
+ listener.point(λ1, φ0);
+ clean = 0;
+ } else if (sλ0 !== sλ1 && dλ >= π) {
+ if (abs(λ0 - sλ0) < ε) λ0 -= sλ0 * ε;
+ if (abs(λ1 - sλ1) < ε) λ1 -= sλ1 * ε;
+ φ0 = d3_geo_clipAntimeridianIntersect(λ0, φ0, λ1, φ1);
+ listener.point(sλ0, φ0);
+ listener.lineEnd();
+ listener.lineStart();
+ listener.point(sλ1, φ0);
+ clean = 0;
+ }
+ listener.point(λ0 = λ1, φ0 = φ1);
+ sλ0 = sλ1;
+ },
+ lineEnd: function() {
+ listener.lineEnd();
+ λ0 = φ0 = NaN;
+ },
+ clean: function() {
+ return 2 - clean;
+ }
+ };
+ }
+ function d3_geo_clipAntimeridianIntersect(λ0, φ0, λ1, φ1) {
+ var cosφ0, cosφ1, sinλ0_λ1 = Math.sin(λ0 - λ1);
+ return abs(sinλ0_λ1) > ε ? Math.atan((Math.sin(φ0) * (cosφ1 = Math.cos(φ1)) * Math.sin(λ1) - Math.sin(φ1) * (cosφ0 = Math.cos(φ0)) * Math.sin(λ0)) / (cosφ0 * cosφ1 * sinλ0_λ1)) : (φ0 + φ1) / 2;
+ }
+ function d3_geo_clipAntimeridianInterpolate(from, to, direction, listener) {
+ var φ;
+ if (from == null) {
+ φ = direction * halfπ;
+ listener.point(-π, φ);
+ listener.point(0, φ);
+ listener.point(π, φ);
+ listener.point(π, 0);
+ listener.point(π, -φ);
+ listener.point(0, -φ);
+ listener.point(-π, -φ);
+ listener.point(-π, 0);
+ listener.point(-π, φ);
+ } else if (abs(from[0] - to[0]) > ε) {
+ var s = from[0] < to[0] ? π : -π;
+ φ = direction * s / 2;
+ listener.point(-s, φ);
+ listener.point(0, φ);
+ listener.point(s, φ);
+ } else {
+ listener.point(to[0], to[1]);
+ }
+ }
+ function d3_geo_pointInPolygon(point, polygon) {
+ var meridian = point[0], parallel = point[1], meridianNormal = [ Math.sin(meridian), -Math.cos(meridian), 0 ], polarAngle = 0, winding = 0;
+ d3_geo_areaRingSum.reset();
+ for (var i = 0, n = polygon.length; i < n; ++i) {
+ var ring = polygon[i], m = ring.length;
+ if (!m) continue;
+ var point0 = ring[0], λ0 = point0[0], φ0 = point0[1] / 2 + π / 4, sinφ0 = Math.sin(φ0), cosφ0 = Math.cos(φ0), j = 1;
+ while (true) {
+ if (j === m) j = 0;
+ point = ring[j];
+ var λ = point[0], φ = point[1] / 2 + π / 4, sinφ = Math.sin(φ), cosφ = Math.cos(φ), dλ = λ - λ0, sdλ = dλ >= 0 ? 1 : -1, adλ = sdλ * dλ, antimeridian = adλ > π, k = sinφ0 * sinφ;
+ d3_geo_areaRingSum.add(Math.atan2(k * sdλ * Math.sin(adλ), cosφ0 * cosφ + k * Math.cos(adλ)));
+ polarAngle += antimeridian ? dλ + sdλ * τ : dλ;
+ if (antimeridian ^ λ0 >= meridian ^ λ >= meridian) {
+ var arc = d3_geo_cartesianCross(d3_geo_cartesian(point0), d3_geo_cartesian(point));
+ d3_geo_cartesianNormalize(arc);
+ var intersection = d3_geo_cartesianCross(meridianNormal, arc);
+ d3_geo_cartesianNormalize(intersection);
+ var φarc = (antimeridian ^ dλ >= 0 ? -1 : 1) * d3_asin(intersection[2]);
+ if (parallel > φarc || parallel === φarc && (arc[0] || arc[1])) {
+ winding += antimeridian ^ dλ >= 0 ? 1 : -1;
+ }
+ }
+ if (!j++) break;
+ λ0 = λ, sinφ0 = sinφ, cosφ0 = cosφ, point0 = point;
+ }
+ }
+ return (polarAngle < -ε || polarAngle < ε && d3_geo_areaRingSum < -ε) ^ winding & 1;
+ }
+ function d3_geo_clipCircle(radius) {
+ var cr = Math.cos(radius), smallRadius = cr > 0, notHemisphere = abs(cr) > ε, interpolate = d3_geo_circleInterpolate(radius, 6 * d3_radians);
+ return d3_geo_clip(visible, clipLine, interpolate, smallRadius ? [ 0, -radius ] : [ -π, radius - π ]);
+ function visible(λ, φ) {
+ return Math.cos(λ) * Math.cos(φ) > cr;
+ }
+ function clipLine(listener) {
+ var point0, c0, v0, v00, clean;
+ return {
+ lineStart: function() {
+ v00 = v0 = false;
+ clean = 1;
+ },
+ point: function(λ, φ) {
+ var point1 = [ λ, φ ], point2, v = visible(λ, φ), c = smallRadius ? v ? 0 : code(λ, φ) : v ? code(λ + (λ < 0 ? π : -π), φ) : 0;
+ if (!point0 && (v00 = v0 = v)) listener.lineStart();
+ if (v !== v0) {
+ point2 = intersect(point0, point1);
+ if (d3_geo_sphericalEqual(point0, point2) || d3_geo_sphericalEqual(point1, point2)) {
+ point1[0] += ε;
+ point1[1] += ε;
+ v = visible(point1[0], point1[1]);
+ }
+ }
+ if (v !== v0) {
+ clean = 0;
+ if (v) {
+ listener.lineStart();
+ point2 = intersect(point1, point0);
+ listener.point(point2[0], point2[1]);
+ } else {
+ point2 = intersect(point0, point1);
+ listener.point(point2[0], point2[1]);
+ listener.lineEnd();
+ }
+ point0 = point2;
+ } else if (notHemisphere && point0 && smallRadius ^ v) {
+ var t;
+ if (!(c & c0) && (t = intersect(point1, point0, true))) {
+ clean = 0;
+ if (smallRadius) {
+ listener.lineStart();
+ listener.point(t[0][0], t[0][1]);
+ listener.point(t[1][0], t[1][1]);
+ listener.lineEnd();
+ } else {
+ listener.point(t[1][0], t[1][1]);
+ listener.lineEnd();
+ listener.lineStart();
+ listener.point(t[0][0], t[0][1]);
+ }
+ }
+ }
+ if (v && (!point0 || !d3_geo_sphericalEqual(point0, point1))) {
+ listener.point(point1[0], point1[1]);
+ }
+ point0 = point1, v0 = v, c0 = c;
+ },
+ lineEnd: function() {
+ if (v0) listener.lineEnd();
+ point0 = null;
+ },
+ clean: function() {
+ return clean | (v00 && v0) << 1;
+ }
+ };
+ }
+ function intersect(a, b, two) {
+ var pa = d3_geo_cartesian(a), pb = d3_geo_cartesian(b);
+ var n1 = [ 1, 0, 0 ], n2 = d3_geo_cartesianCross(pa, pb), n2n2 = d3_geo_cartesianDot(n2, n2), n1n2 = n2[0], determinant = n2n2 - n1n2 * n1n2;
+ if (!determinant) return !two && a;
+ var c1 = cr * n2n2 / determinant, c2 = -cr * n1n2 / determinant, n1xn2 = d3_geo_cartesianCross(n1, n2), A = d3_geo_cartesianScale(n1, c1), B = d3_geo_cartesianScale(n2, c2);
+ d3_geo_cartesianAdd(A, B);
+ var u = n1xn2, w = d3_geo_cartesianDot(A, u), uu = d3_geo_cartesianDot(u, u), t2 = w * w - uu * (d3_geo_cartesianDot(A, A) - 1);
+ if (t2 < 0) return;
+ var t = Math.sqrt(t2), q = d3_geo_cartesianScale(u, (-w - t) / uu);
+ d3_geo_cartesianAdd(q, A);
+ q = d3_geo_spherical(q);
+ if (!two) return q;
+ var λ0 = a[0], λ1 = b[0], φ0 = a[1], φ1 = b[1], z;
+ if (λ1 < λ0) z = λ0, λ0 = λ1, λ1 = z;
+ var δλ = λ1 - λ0, polar = abs(δλ - π) < ε, meridian = polar || δλ < ε;
+ if (!polar && φ1 < φ0) z = φ0, φ0 = φ1, φ1 = z;
+ if (meridian ? polar ? φ0 + φ1 > 0 ^ q[1] < (abs(q[0] - λ0) < ε ? φ0 : φ1) : φ0 <= q[1] && q[1] <= φ1 : δλ > π ^ (λ0 <= q[0] && q[0] <= λ1)) {
+ var q1 = d3_geo_cartesianScale(u, (-w + t) / uu);
+ d3_geo_cartesianAdd(q1, A);
+ return [ q, d3_geo_spherical(q1) ];
+ }
+ }
+ function code(λ, φ) {
+ var r = smallRadius ? radius : π - radius, code = 0;
+ if (λ < -r) code |= 1; else if (λ > r) code |= 2;
+ if (φ < -r) code |= 4; else if (φ > r) code |= 8;
+ return code;
+ }
+ }
+ function d3_geom_clipLine(x0, y0, x1, y1) {
+ return function(line) {
+ var a = line.a, b = line.b, ax = a.x, ay = a.y, bx = b.x, by = b.y, t0 = 0, t1 = 1, dx = bx - ax, dy = by - ay, r;
+ r = x0 - ax;
+ if (!dx && r > 0) return;
+ r /= dx;
+ if (dx < 0) {
+ if (r < t0) return;
+ if (r < t1) t1 = r;
+ } else if (dx > 0) {
+ if (r > t1) return;
+ if (r > t0) t0 = r;
+ }
+ r = x1 - ax;
+ if (!dx && r < 0) return;
+ r /= dx;
+ if (dx < 0) {
+ if (r > t1) return;
+ if (r > t0) t0 = r;
+ } else if (dx > 0) {
+ if (r < t0) return;
+ if (r < t1) t1 = r;
+ }
+ r = y0 - ay;
+ if (!dy && r > 0) return;
+ r /= dy;
+ if (dy < 0) {
+ if (r < t0) return;
+ if (r < t1) t1 = r;
+ } else if (dy > 0) {
+ if (r > t1) return;
+ if (r > t0) t0 = r;
+ }
+ r = y1 - ay;
+ if (!dy && r < 0) return;
+ r /= dy;
+ if (dy < 0) {
+ if (r > t1) return;
+ if (r > t0) t0 = r;
+ } else if (dy > 0) {
+ if (r < t0) return;
+ if (r < t1) t1 = r;
+ }
+ if (t0 > 0) line.a = {
+ x: ax + t0 * dx,
+ y: ay + t0 * dy
+ };
+ if (t1 < 1) line.b = {
+ x: ax + t1 * dx,
+ y: ay + t1 * dy
+ };
+ return line;
+ };
+ }
+ var d3_geo_clipExtentMAX = 1e9;
+ d3.geo.clipExtent = function() {
+ var x0, y0, x1, y1, stream, clip, clipExtent = {
+ stream: function(output) {
+ if (stream) stream.valid = false;
+ stream = clip(output);
+ stream.valid = true;
+ return stream;
+ },
+ extent: function(_) {
+ if (!arguments.length) return [ [ x0, y0 ], [ x1, y1 ] ];
+ clip = d3_geo_clipExtent(x0 = +_[0][0], y0 = +_[0][1], x1 = +_[1][0], y1 = +_[1][1]);
+ if (stream) stream.valid = false, stream = null;
+ return clipExtent;
+ }
+ };
+ return clipExtent.extent([ [ 0, 0 ], [ 960, 500 ] ]);
+ };
+ function d3_geo_clipExtent(x0, y0, x1, y1) {
+ return function(listener) {
+ var listener_ = listener, bufferListener = d3_geo_clipBufferListener(), clipLine = d3_geom_clipLine(x0, y0, x1, y1), segments, polygon, ring;
+ var clip = {
+ point: point,
+ lineStart: lineStart,
+ lineEnd: lineEnd,
+ polygonStart: function() {
+ listener = bufferListener;
+ segments = [];
+ polygon = [];
+ clean = true;
+ },
+ polygonEnd: function() {
+ listener = listener_;
+ segments = d3.merge(segments);
+ var clipStartInside = insidePolygon([ x0, y1 ]), inside = clean && clipStartInside, visible = segments.length;
+ if (inside || visible) {
+ listener.polygonStart();
+ if (inside) {
+ listener.lineStart();
+ interpolate(null, null, 1, listener);
+ listener.lineEnd();
+ }
+ if (visible) {
+ d3_geo_clipPolygon(segments, compare, clipStartInside, interpolate, listener);
+ }
+ listener.polygonEnd();
+ }
+ segments = polygon = ring = null;
+ }
+ };
+ function insidePolygon(p) {
+ var wn = 0, n = polygon.length, y = p[1];
+ for (var i = 0; i < n; ++i) {
+ for (var j = 1, v = polygon[i], m = v.length, a = v[0], b; j < m; ++j) {
+ b = v[j];
+ if (a[1] <= y) {
+ if (b[1] > y && d3_cross2d(a, b, p) > 0) ++wn;
+ } else {
+ if (b[1] <= y && d3_cross2d(a, b, p) < 0) --wn;
+ }
+ a = b;
+ }
+ }
+ return wn !== 0;
+ }
+ function interpolate(from, to, direction, listener) {
+ var a = 0, a1 = 0;
+ if (from == null || (a = corner(from, direction)) !== (a1 = corner(to, direction)) || comparePoints(from, to) < 0 ^ direction > 0) {
+ do {
+ listener.point(a === 0 || a === 3 ? x0 : x1, a > 1 ? y1 : y0);
+ } while ((a = (a + direction + 4) % 4) !== a1);
+ } else {
+ listener.point(to[0], to[1]);
+ }
+ }
+ function pointVisible(x, y) {
+ return x0 <= x && x <= x1 && y0 <= y && y <= y1;
+ }
+ function point(x, y) {
+ if (pointVisible(x, y)) listener.point(x, y);
+ }
+ var x__, y__, v__, x_, y_, v_, first, clean;
+ function lineStart() {
+ clip.point = linePoint;
+ if (polygon) polygon.push(ring = []);
+ first = true;
+ v_ = false;
+ x_ = y_ = NaN;
+ }
+ function lineEnd() {
+ if (segments) {
+ linePoint(x__, y__);
+ if (v__ && v_) bufferListener.rejoin();
+ segments.push(bufferListener.buffer());
+ }
+ clip.point = point;
+ if (v_) listener.lineEnd();
+ }
+ function linePoint(x, y) {
+ x = Math.max(-d3_geo_clipExtentMAX, Math.min(d3_geo_clipExtentMAX, x));
+ y = Math.max(-d3_geo_clipExtentMAX, Math.min(d3_geo_clipExtentMAX, y));
+ var v = pointVisible(x, y);
+ if (polygon) ring.push([ x, y ]);
+ if (first) {
+ x__ = x, y__ = y, v__ = v;
+ first = false;
+ if (v) {
+ listener.lineStart();
+ listener.point(x, y);
+ }
+ } else {
+ if (v && v_) listener.point(x, y); else {
+ var l = {
+ a: {
+ x: x_,
+ y: y_
+ },
+ b: {
+ x: x,
+ y: y
+ }
+ };
+ if (clipLine(l)) {
+ if (!v_) {
+ listener.lineStart();
+ listener.point(l.a.x, l.a.y);
+ }
+ listener.point(l.b.x, l.b.y);
+ if (!v) listener.lineEnd();
+ clean = false;
+ } else if (v) {
+ listener.lineStart();
+ listener.point(x, y);
+ clean = false;
+ }
+ }
+ }
+ x_ = x, y_ = y, v_ = v;
+ }
+ return clip;
+ };
+ function corner(p, direction) {
+ return abs(p[0] - x0) < ε ? direction > 0 ? 0 : 3 : abs(p[0] - x1) < ε ? direction > 0 ? 2 : 1 : abs(p[1] - y0) < ε ? direction > 0 ? 1 : 0 : direction > 0 ? 3 : 2;
+ }
+ function compare(a, b) {
+ return comparePoints(a.x, b.x);
+ }
+ function comparePoints(a, b) {
+ var ca = corner(a, 1), cb = corner(b, 1);
+ return ca !== cb ? ca - cb : ca === 0 ? b[1] - a[1] : ca === 1 ? a[0] - b[0] : ca === 2 ? a[1] - b[1] : b[0] - a[0];
+ }
+ }
+ function d3_geo_conic(projectAt) {
+ var φ0 = 0, φ1 = π / 3, m = d3_geo_projectionMutator(projectAt), p = m(φ0, φ1);
+ p.parallels = function(_) {
+ if (!arguments.length) return [ φ0 / π * 180, φ1 / π * 180 ];
+ return m(φ0 = _[0] * π / 180, φ1 = _[1] * π / 180);
+ };
+ return p;
+ }
+ function d3_geo_conicEqualArea(φ0, φ1) {
+ var sinφ0 = Math.sin(φ0), n = (sinφ0 + Math.sin(φ1)) / 2, C = 1 + sinφ0 * (2 * n - sinφ0), ρ0 = Math.sqrt(C) / n;
+ function forward(λ, φ) {
+ var ρ = Math.sqrt(C - 2 * n * Math.sin(φ)) / n;
+ return [ ρ * Math.sin(λ *= n), ρ0 - ρ * Math.cos(λ) ];
+ }
+ forward.invert = function(x, y) {
+ var ρ0_y = ρ0 - y;
+ return [ Math.atan2(x, ρ0_y) / n, d3_asin((C - (x * x + ρ0_y * ρ0_y) * n * n) / (2 * n)) ];
+ };
+ return forward;
+ }
+ (d3.geo.conicEqualArea = function() {
+ return d3_geo_conic(d3_geo_conicEqualArea);
+ }).raw = d3_geo_conicEqualArea;
+ d3.geo.albers = function() {
+ return d3.geo.conicEqualArea().rotate([ 96, 0 ]).center([ -.6, 38.7 ]).parallels([ 29.5, 45.5 ]).scale(1070);
+ };
+ d3.geo.albersUsa = function() {
+ var lower48 = d3.geo.albers();
+ var alaska = d3.geo.conicEqualArea().rotate([ 154, 0 ]).center([ -2, 58.5 ]).parallels([ 55, 65 ]);
+ var hawaii = d3.geo.conicEqualArea().rotate([ 157, 0 ]).center([ -3, 19.9 ]).parallels([ 8, 18 ]);
+ var point, pointStream = {
+ point: function(x, y) {
+ point = [ x, y ];
+ }
+ }, lower48Point, alaskaPoint, hawaiiPoint;
+ function albersUsa(coordinates) {
+ var x = coordinates[0], y = coordinates[1];
+ point = null;
+ (lower48Point(x, y), point) || (alaskaPoint(x, y), point) || hawaiiPoint(x, y);
+ return point;
+ }
+ albersUsa.invert = function(coordinates) {
+ var k = lower48.scale(), t = lower48.translate(), x = (coordinates[0] - t[0]) / k, y = (coordinates[1] - t[1]) / k;
+ return (y >= .12 && y < .234 && x >= -.425 && x < -.214 ? alaska : y >= .166 && y < .234 && x >= -.214 && x < -.115 ? hawaii : lower48).invert(coordinates);
+ };
+ albersUsa.stream = function(stream) {
+ var lower48Stream = lower48.stream(stream), alaskaStream = alaska.stream(stream), hawaiiStream = hawaii.stream(stream);
+ return {
+ point: function(x, y) {
+ lower48Stream.point(x, y);
+ alaskaStream.point(x, y);
+ hawaiiStream.point(x, y);
+ },
+ sphere: function() {
+ lower48Stream.sphere();
+ alaskaStream.sphere();
+ hawaiiStream.sphere();
+ },
+ lineStart: function() {
+ lower48Stream.lineStart();
+ alaskaStream.lineStart();
+ hawaiiStream.lineStart();
+ },
+ lineEnd: function() {
+ lower48Stream.lineEnd();
+ alaskaStream.lineEnd();
+ hawaiiStream.lineEnd();
+ },
+ polygonStart: function() {
+ lower48Stream.polygonStart();
+ alaskaStream.polygonStart();
+ hawaiiStream.polygonStart();
+ },
+ polygonEnd: function() {
+ lower48Stream.polygonEnd();
+ alaskaStream.polygonEnd();
+ hawaiiStream.polygonEnd();
+ }
+ };
+ };
+ albersUsa.precision = function(_) {
+ if (!arguments.length) return lower48.precision();
+ lower48.precision(_);
+ alaska.precision(_);
+ hawaii.precision(_);
+ return albersUsa;
+ };
+ albersUsa.scale = function(_) {
+ if (!arguments.length) return lower48.scale();
+ lower48.scale(_);
+ alaska.scale(_ * .35);
+ hawaii.scale(_);
+ return albersUsa.translate(lower48.translate());
+ };
+ albersUsa.translate = function(_) {
+ if (!arguments.length) return lower48.translate();
+ var k = lower48.scale(), x = +_[0], y = +_[1];
+ lower48Point = lower48.translate(_).clipExtent([ [ x - .455 * k, y - .238 * k ], [ x + .455 * k, y + .238 * k ] ]).stream(pointStream).point;
+ alaskaPoint = alaska.translate([ x - .307 * k, y + .201 * k ]).clipExtent([ [ x - .425 * k + ε, y + .12 * k + ε ], [ x - .214 * k - ε, y + .234 * k - ε ] ]).stream(pointStream).point;
+ hawaiiPoint = hawaii.translate([ x - .205 * k, y + .212 * k ]).clipExtent([ [ x - .214 * k + ε, y + .166 * k + ε ], [ x - .115 * k - ε, y + .234 * k - ε ] ]).stream(pointStream).point;
+ return albersUsa;
+ };
+ return albersUsa.scale(1070);
+ };
+ var d3_geo_pathAreaSum, d3_geo_pathAreaPolygon, d3_geo_pathArea = {
+ point: d3_noop,
+ lineStart: d3_noop,
+ lineEnd: d3_noop,
+ polygonStart: function() {
+ d3_geo_pathAreaPolygon = 0;
+ d3_geo_pathArea.lineStart = d3_geo_pathAreaRingStart;
+ },
+ polygonEnd: function() {
+ d3_geo_pathArea.lineStart = d3_geo_pathArea.lineEnd = d3_geo_pathArea.point = d3_noop;
+ d3_geo_pathAreaSum += abs(d3_geo_pathAreaPolygon / 2);
+ }
+ };
+ function d3_geo_pathAreaRingStart() {
+ var x00, y00, x0, y0;
+ d3_geo_pathArea.point = function(x, y) {
+ d3_geo_pathArea.point = nextPoint;
+ x00 = x0 = x, y00 = y0 = y;
+ };
+ function nextPoint(x, y) {
+ d3_geo_pathAreaPolygon += y0 * x - x0 * y;
+ x0 = x, y0 = y;
+ }
+ d3_geo_pathArea.lineEnd = function() {
+ nextPoint(x00, y00);
+ };
+ }
+ var d3_geo_pathBoundsX0, d3_geo_pathBoundsY0, d3_geo_pathBoundsX1, d3_geo_pathBoundsY1;
+ var d3_geo_pathBounds = {
+ point: d3_geo_pathBoundsPoint,
+ lineStart: d3_noop,
+ lineEnd: d3_noop,
+ polygonStart: d3_noop,
+ polygonEnd: d3_noop
+ };
+ function d3_geo_pathBoundsPoint(x, y) {
+ if (x < d3_geo_pathBoundsX0) d3_geo_pathBoundsX0 = x;
+ if (x > d3_geo_pathBoundsX1) d3_geo_pathBoundsX1 = x;
+ if (y < d3_geo_pathBoundsY0) d3_geo_pathBoundsY0 = y;
+ if (y > d3_geo_pathBoundsY1) d3_geo_pathBoundsY1 = y;
+ }
+ function d3_geo_pathBuffer() {
+ var pointCircle = d3_geo_pathBufferCircle(4.5), buffer = [];
+ var stream = {
+ point: point,
+ lineStart: function() {
+ stream.point = pointLineStart;
+ },
+ lineEnd: lineEnd,
+ polygonStart: function() {
+ stream.lineEnd = lineEndPolygon;
+ },
+ polygonEnd: function() {
+ stream.lineEnd = lineEnd;
+ stream.point = point;
+ },
+ pointRadius: function(_) {
+ pointCircle = d3_geo_pathBufferCircle(_);
+ return stream;
+ },
+ result: function() {
+ if (buffer.length) {
+ var result = buffer.join("");
+ buffer = [];
+ return result;
+ }
+ }
+ };
+ function point(x, y) {
+ buffer.push("M", x, ",", y, pointCircle);
+ }
+ function pointLineStart(x, y) {
+ buffer.push("M", x, ",", y);
+ stream.point = pointLine;
+ }
+ function pointLine(x, y) {
+ buffer.push("L", x, ",", y);
+ }
+ function lineEnd() {
+ stream.point = point;
+ }
+ function lineEndPolygon() {
+ buffer.push("Z");
+ }
+ return stream;
+ }
+ function d3_geo_pathBufferCircle(radius) {
+ return "m0," + radius + "a" + radius + "," + radius + " 0 1,1 0," + -2 * radius + "a" + radius + "," + radius + " 0 1,1 0," + 2 * radius + "z";
+ }
+ var d3_geo_pathCentroid = {
+ point: d3_geo_pathCentroidPoint,
+ lineStart: d3_geo_pathCentroidLineStart,
+ lineEnd: d3_geo_pathCentroidLineEnd,
+ polygonStart: function() {
+ d3_geo_pathCentroid.lineStart = d3_geo_pathCentroidRingStart;
+ },
+ polygonEnd: function() {
+ d3_geo_pathCentroid.point = d3_geo_pathCentroidPoint;
+ d3_geo_pathCentroid.lineStart = d3_geo_pathCentroidLineStart;
+ d3_geo_pathCentroid.lineEnd = d3_geo_pathCentroidLineEnd;
+ }
+ };
+ function d3_geo_pathCentroidPoint(x, y) {
+ d3_geo_centroidX0 += x;
+ d3_geo_centroidY0 += y;
+ ++d3_geo_centroidZ0;
+ }
+ function d3_geo_pathCentroidLineStart() {
+ var x0, y0;
+ d3_geo_pathCentroid.point = function(x, y) {
+ d3_geo_pathCentroid.point = nextPoint;
+ d3_geo_pathCentroidPoint(x0 = x, y0 = y);
+ };
+ function nextPoint(x, y) {
+ var dx = x - x0, dy = y - y0, z = Math.sqrt(dx * dx + dy * dy);
+ d3_geo_centroidX1 += z * (x0 + x) / 2;
+ d3_geo_centroidY1 += z * (y0 + y) / 2;
+ d3_geo_centroidZ1 += z;
+ d3_geo_pathCentroidPoint(x0 = x, y0 = y);
+ }
+ }
+ function d3_geo_pathCentroidLineEnd() {
+ d3_geo_pathCentroid.point = d3_geo_pathCentroidPoint;
+ }
+ function d3_geo_pathCentroidRingStart() {
+ var x00, y00, x0, y0;
+ d3_geo_pathCentroid.point = function(x, y) {
+ d3_geo_pathCentroid.point = nextPoint;
+ d3_geo_pathCentroidPoint(x00 = x0 = x, y00 = y0 = y);
+ };
+ function nextPoint(x, y) {
+ var dx = x - x0, dy = y - y0, z = Math.sqrt(dx * dx + dy * dy);
+ d3_geo_centroidX1 += z * (x0 + x) / 2;
+ d3_geo_centroidY1 += z * (y0 + y) / 2;
+ d3_geo_centroidZ1 += z;
+ z = y0 * x - x0 * y;
+ d3_geo_centroidX2 += z * (x0 + x);
+ d3_geo_centroidY2 += z * (y0 + y);
+ d3_geo_centroidZ2 += z * 3;
+ d3_geo_pathCentroidPoint(x0 = x, y0 = y);
+ }
+ d3_geo_pathCentroid.lineEnd = function() {
+ nextPoint(x00, y00);
+ };
+ }
+ function d3_geo_pathContext(context) {
+ var pointRadius = 4.5;
+ var stream = {
+ point: point,
+ lineStart: function() {
+ stream.point = pointLineStart;
+ },
+ lineEnd: lineEnd,
+ polygonStart: function() {
+ stream.lineEnd = lineEndPolygon;
+ },
+ polygonEnd: function() {
+ stream.lineEnd = lineEnd;
+ stream.point = point;
+ },
+ pointRadius: function(_) {
+ pointRadius = _;
+ return stream;
+ },
+ result: d3_noop
+ };
+ function point(x, y) {
+ context.moveTo(x + pointRadius, y);
+ context.arc(x, y, pointRadius, 0, τ);
+ }
+ function pointLineStart(x, y) {
+ context.moveTo(x, y);
+ stream.point = pointLine;
+ }
+ function pointLine(x, y) {
+ context.lineTo(x, y);
+ }
+ function lineEnd() {
+ stream.point = point;
+ }
+ function lineEndPolygon() {
+ context.closePath();
+ }
+ return stream;
+ }
+ function d3_geo_resample(project) {
+ var δ2 = .5, cosMinDistance = Math.cos(30 * d3_radians), maxDepth = 16;
+ function resample(stream) {
+ return (maxDepth ? resampleRecursive : resampleNone)(stream);
+ }
+ function resampleNone(stream) {
+ return d3_geo_transformPoint(stream, function(x, y) {
+ x = project(x, y);
+ stream.point(x[0], x[1]);
+ });
+ }
+ function resampleRecursive(stream) {
+ var λ00, φ00, x00, y00, a00, b00, c00, λ0, x0, y0, a0, b0, c0;
+ var resample = {
+ point: point,
+ lineStart: lineStart,
+ lineEnd: lineEnd,
+ polygonStart: function() {
+ stream.polygonStart();
+ resample.lineStart = ringStart;
+ },
+ polygonEnd: function() {
+ stream.polygonEnd();
+ resample.lineStart = lineStart;
+ }
+ };
+ function point(x, y) {
+ x = project(x, y);
+ stream.point(x[0], x[1]);
+ }
+ function lineStart() {
+ x0 = NaN;
+ resample.point = linePoint;
+ stream.lineStart();
+ }
+ function linePoint(λ, φ) {
+ var c = d3_geo_cartesian([ λ, φ ]), p = project(λ, φ);
+ resampleLineTo(x0, y0, λ0, a0, b0, c0, x0 = p[0], y0 = p[1], λ0 = λ, a0 = c[0], b0 = c[1], c0 = c[2], maxDepth, stream);
+ stream.point(x0, y0);
+ }
+ function lineEnd() {
+ resample.point = point;
+ stream.lineEnd();
+ }
+ function ringStart() {
+ lineStart();
+ resample.point = ringPoint;
+ resample.lineEnd = ringEnd;
+ }
+ function ringPoint(λ, φ) {
+ linePoint(λ00 = λ, φ00 = φ), x00 = x0, y00 = y0, a00 = a0, b00 = b0, c00 = c0;
+ resample.point = linePoint;
+ }
+ function ringEnd() {
+ resampleLineTo(x0, y0, λ0, a0, b0, c0, x00, y00, λ00, a00, b00, c00, maxDepth, stream);
+ resample.lineEnd = lineEnd;
+ lineEnd();
+ }
+ return resample;
+ }
+ function resampleLineTo(x0, y0, λ0, a0, b0, c0, x1, y1, λ1, a1, b1, c1, depth, stream) {
+ var dx = x1 - x0, dy = y1 - y0, d2 = dx * dx + dy * dy;
+ if (d2 > 4 * δ2 && depth--) {
+ var a = a0 + a1, b = b0 + b1, c = c0 + c1, m = Math.sqrt(a * a + b * b + c * c), φ2 = Math.asin(c /= m), λ2 = abs(abs(c) - 1) < ε || abs(λ0 - λ1) < ε ? (λ0 + λ1) / 2 : Math.atan2(b, a), p = project(λ2, φ2), x2 = p[0], y2 = p[1], dx2 = x2 - x0, dy2 = y2 - y0, dz = dy * dx2 - dx * dy2;
+ if (dz * dz / d2 > δ2 || abs((dx * dx2 + dy * dy2) / d2 - .5) > .3 || a0 * a1 + b0 * b1 + c0 * c1 < cosMinDistance) {
+ resampleLineTo(x0, y0, λ0, a0, b0, c0, x2, y2, λ2, a /= m, b /= m, c, depth, stream);
+ stream.point(x2, y2);
+ resampleLineTo(x2, y2, λ2, a, b, c, x1, y1, λ1, a1, b1, c1, depth, stream);
+ }
+ }
+ }
+ resample.precision = function(_) {
+ if (!arguments.length) return Math.sqrt(δ2);
+ maxDepth = (δ2 = _ * _) > 0 && 16;
+ return resample;
+ };
+ return resample;
+ }
+ d3.geo.path = function() {
+ var pointRadius = 4.5, projection, context, projectStream, contextStream, cacheStream;
+ function path(object) {
+ if (object) {
+ if (typeof pointRadius === "function") contextStream.pointRadius(+pointRadius.apply(this, arguments));
+ if (!cacheStream || !cacheStream.valid) cacheStream = projectStream(contextStream);
+ d3.geo.stream(object, cacheStream);
+ }
+ return contextStream.result();
+ }
+ path.area = function(object) {
+ d3_geo_pathAreaSum = 0;
+ d3.geo.stream(object, projectStream(d3_geo_pathArea));
+ return d3_geo_pathAreaSum;
+ };
+ path.centroid = function(object) {
+ d3_geo_centroidX0 = d3_geo_centroidY0 = d3_geo_centroidZ0 = d3_geo_centroidX1 = d3_geo_centroidY1 = d3_geo_centroidZ1 = d3_geo_centroidX2 = d3_geo_centroidY2 = d3_geo_centroidZ2 = 0;
+ d3.geo.stream(object, projectStream(d3_geo_pathCentroid));
+ return d3_geo_centroidZ2 ? [ d3_geo_centroidX2 / d3_geo_centroidZ2, d3_geo_centroidY2 / d3_geo_centroidZ2 ] : d3_geo_centroidZ1 ? [ d3_geo_centroidX1 / d3_geo_centroidZ1, d3_geo_centroidY1 / d3_geo_centroidZ1 ] : d3_geo_centroidZ0 ? [ d3_geo_centroidX0 / d3_geo_centroidZ0, d3_geo_centroidY0 / d3_geo_centroidZ0 ] : [ NaN, NaN ];
+ };
+ path.bounds = function(object) {
+ d3_geo_pathBoundsX1 = d3_geo_pathBoundsY1 = -(d3_geo_pathBoundsX0 = d3_geo_pathBoundsY0 = Infinity);
+ d3.geo.stream(object, projectStream(d3_geo_pathBounds));
+ return [ [ d3_geo_pathBoundsX0, d3_geo_pathBoundsY0 ], [ d3_geo_pathBoundsX1, d3_geo_pathBoundsY1 ] ];
+ };
+ path.projection = function(_) {
+ if (!arguments.length) return projection;
+ projectStream = (projection = _) ? _.stream || d3_geo_pathProjectStream(_) : d3_identity;
+ return reset();
+ };
+ path.context = function(_) {
+ if (!arguments.length) return context;
+ contextStream = (context = _) == null ? new d3_geo_pathBuffer() : new d3_geo_pathContext(_);
+ if (typeof pointRadius !== "function") contextStream.pointRadius(pointRadius);
+ return reset();
+ };
+ path.pointRadius = function(_) {
+ if (!arguments.length) return pointRadius;
+ pointRadius = typeof _ === "function" ? _ : (contextStream.pointRadius(+_), +_);
+ return path;
+ };
+ function reset() {
+ cacheStream = null;
+ return path;
+ }
+ return path.projection(d3.geo.albersUsa()).context(null);
+ };
+ function d3_geo_pathProjectStream(project) {
+ var resample = d3_geo_resample(function(x, y) {
+ return project([ x * d3_degrees, y * d3_degrees ]);
+ });
+ return function(stream) {
+ return d3_geo_projectionRadians(resample(stream));
+ };
+ }
+ d3.geo.transform = function(methods) {
+ return {
+ stream: function(stream) {
+ var transform = new d3_geo_transform(stream);
+ for (var k in methods) transform[k] = methods[k];
+ return transform;
+ }
+ };
+ };
+ function d3_geo_transform(stream) {
+ this.stream = stream;
+ }
+ d3_geo_transform.prototype = {
+ point: function(x, y) {
+ this.stream.point(x, y);
+ },
+ sphere: function() {
+ this.stream.sphere();
+ },
+ lineStart: function() {
+ this.stream.lineStart();
+ },
+ lineEnd: function() {
+ this.stream.lineEnd();
+ },
+ polygonStart: function() {
+ this.stream.polygonStart();
+ },
+ polygonEnd: function() {
+ this.stream.polygonEnd();
+ }
+ };
+ function d3_geo_transformPoint(stream, point) {
+ return {
+ point: point,
+ sphere: function() {
+ stream.sphere();
+ },
+ lineStart: function() {
+ stream.lineStart();
+ },
+ lineEnd: function() {
+ stream.lineEnd();
+ },
+ polygonStart: function() {
+ stream.polygonStart();
+ },
+ polygonEnd: function() {
+ stream.polygonEnd();
+ }
+ };
+ }
+ d3.geo.projection = d3_geo_projection;
+ d3.geo.projectionMutator = d3_geo_projectionMutator;
+ function d3_geo_projection(project) {
+ return d3_geo_projectionMutator(function() {
+ return project;
+ })();
+ }
+ function d3_geo_projectionMutator(projectAt) {
+ var project, rotate, projectRotate, projectResample = d3_geo_resample(function(x, y) {
+ x = project(x, y);
+ return [ x[0] * k + δx, δy - x[1] * k ];
+ }), k = 150, x = 480, y = 250, λ = 0, φ = 0, δλ = 0, δφ = 0, δγ = 0, δx, δy, preclip = d3_geo_clipAntimeridian, postclip = d3_identity, clipAngle = null, clipExtent = null, stream;
+ function projection(point) {
+ point = projectRotate(point[0] * d3_radians, point[1] * d3_radians);
+ return [ point[0] * k + δx, δy - point[1] * k ];
+ }
+ function invert(point) {
+ point = projectRotate.invert((point[0] - δx) / k, (δy - point[1]) / k);
+ return point && [ point[0] * d3_degrees, point[1] * d3_degrees ];
+ }
+ projection.stream = function(output) {
+ if (stream) stream.valid = false;
+ stream = d3_geo_projectionRadians(preclip(rotate, projectResample(postclip(output))));
+ stream.valid = true;
+ return stream;
+ };
+ projection.clipAngle = function(_) {
+ if (!arguments.length) return clipAngle;
+ preclip = _ == null ? (clipAngle = _, d3_geo_clipAntimeridian) : d3_geo_clipCircle((clipAngle = +_) * d3_radians);
+ return invalidate();
+ };
+ projection.clipExtent = function(_) {
+ if (!arguments.length) return clipExtent;
+ clipExtent = _;
+ postclip = _ ? d3_geo_clipExtent(_[0][0], _[0][1], _[1][0], _[1][1]) : d3_identity;
+ return invalidate();
+ };
+ projection.scale = function(_) {
+ if (!arguments.length) return k;
+ k = +_;
+ return reset();
+ };
+ projection.translate = function(_) {
+ if (!arguments.length) return [ x, y ];
+ x = +_[0];
+ y = +_[1];
+ return reset();
+ };
+ projection.center = function(_) {
+ if (!arguments.length) return [ λ * d3_degrees, φ * d3_degrees ];
+ λ = _[0] % 360 * d3_radians;
+ φ = _[1] % 360 * d3_radians;
+ return reset();
+ };
+ projection.rotate = function(_) {
+ if (!arguments.length) return [ δλ * d3_degrees, δφ * d3_degrees, δγ * d3_degrees ];
+ δλ = _[0] % 360 * d3_radians;
+ δφ = _[1] % 360 * d3_radians;
+ δγ = _.length > 2 ? _[2] % 360 * d3_radians : 0;
+ return reset();
+ };
+ d3.rebind(projection, projectResample, "precision");
+ function reset() {
+ projectRotate = d3_geo_compose(rotate = d3_geo_rotation(δλ, δφ, δγ), project);
+ var center = project(λ, φ);
+ δx = x - center[0] * k;
+ δy = y + center[1] * k;
+ return invalidate();
+ }
+ function invalidate() {
+ if (stream) stream.valid = false, stream = null;
+ return projection;
+ }
+ return function() {
+ project = projectAt.apply(this, arguments);
+ projection.invert = project.invert && invert;
+ return reset();
+ };
+ }
+ function d3_geo_projectionRadians(stream) {
+ return d3_geo_transformPoint(stream, function(x, y) {
+ stream.point(x * d3_radians, y * d3_radians);
+ });
+ }
+ function d3_geo_equirectangular(λ, φ) {
+ return [ λ, φ ];
+ }
+ (d3.geo.equirectangular = function() {
+ return d3_geo_projection(d3_geo_equirectangular);
+ }).raw = d3_geo_equirectangular.invert = d3_geo_equirectangular;
+ d3.geo.rotation = function(rotate) {
+ rotate = d3_geo_rotation(rotate[0] % 360 * d3_radians, rotate[1] * d3_radians, rotate.length > 2 ? rotate[2] * d3_radians : 0);
+ function forward(coordinates) {
+ coordinates = rotate(coordinates[0] * d3_radians, coordinates[1] * d3_radians);
+ return coordinates[0] *= d3_degrees, coordinates[1] *= d3_degrees, coordinates;
+ }
+ forward.invert = function(coordinates) {
+ coordinates = rotate.invert(coordinates[0] * d3_radians, coordinates[1] * d3_radians);
+ return coordinates[0] *= d3_degrees, coordinates[1] *= d3_degrees, coordinates;
+ };
+ return forward;
+ };
+ function d3_geo_identityRotation(λ, φ) {
+ return [ λ > π ? λ - τ : λ < -π ? λ + τ : λ, φ ];
+ }
+ d3_geo_identityRotation.invert = d3_geo_equirectangular;
+ function d3_geo_rotation(δλ, δφ, δγ) {
+ return δλ ? δφ || δγ ? d3_geo_compose(d3_geo_rotationλ(δλ), d3_geo_rotationφγ(δφ, δγ)) : d3_geo_rotationλ(δλ) : δφ || δγ ? d3_geo_rotationφγ(δφ, δγ) : d3_geo_identityRotation;
+ }
+ function d3_geo_forwardRotationλ(δλ) {
+ return function(λ, φ) {
+ return λ += δλ, [ λ > π ? λ - τ : λ < -π ? λ + τ : λ, φ ];
+ };
+ }
+ function d3_geo_rotationλ(δλ) {
+ var rotation = d3_geo_forwardRotationλ(δλ);
+ rotation.invert = d3_geo_forwardRotationλ(-δλ);
+ return rotation;
+ }
+ function d3_geo_rotationφγ(δφ, δγ) {
+ var cosδφ = Math.cos(δφ), sinδφ = Math.sin(δφ), cosδγ = Math.cos(δγ), sinδγ = Math.sin(δγ);
+ function rotation(λ, φ) {
+ var cosφ = Math.cos(φ), x = Math.cos(λ) * cosφ, y = Math.sin(λ) * cosφ, z = Math.sin(φ), k = z * cosδφ + x * sinδφ;
+ return [ Math.atan2(y * cosδγ - k * sinδγ, x * cosδφ - z * sinδφ), d3_asin(k * cosδγ + y * sinδγ) ];
+ }
+ rotation.invert = function(λ, φ) {
+ var cosφ = Math.cos(φ), x = Math.cos(λ) * cosφ, y = Math.sin(λ) * cosφ, z = Math.sin(φ), k = z * cosδγ - y * sinδγ;
+ return [ Math.atan2(y * cosδγ + z * sinδγ, x * cosδφ + k * sinδφ), d3_asin(k * cosδφ - x * sinδφ) ];
+ };
+ return rotation;
+ }
+ d3.geo.circle = function() {
+ var origin = [ 0, 0 ], angle, precision = 6, interpolate;
+ function circle() {
+ var center = typeof origin === "function" ? origin.apply(this, arguments) : origin, rotate = d3_geo_rotation(-center[0] * d3_radians, -center[1] * d3_radians, 0).invert, ring = [];
+ interpolate(null, null, 1, {
+ point: function(x, y) {
+ ring.push(x = rotate(x, y));
+ x[0] *= d3_degrees, x[1] *= d3_degrees;
+ }
+ });
+ return {
+ type: "Polygon",
+ coordinates: [ ring ]
+ };
+ }
+ circle.origin = function(x) {
+ if (!arguments.length) return origin;
+ origin = x;
+ return circle;
+ };
+ circle.angle = function(x) {
+ if (!arguments.length) return angle;
+ interpolate = d3_geo_circleInterpolate((angle = +x) * d3_radians, precision * d3_radians);
+ return circle;
+ };
+ circle.precision = function(_) {
+ if (!arguments.length) return precision;
+ interpolate = d3_geo_circleInterpolate(angle * d3_radians, (precision = +_) * d3_radians);
+ return circle;
+ };
+ return circle.angle(90);
+ };
+ function d3_geo_circleInterpolate(radius, precision) {
+ var cr = Math.cos(radius), sr = Math.sin(radius);
+ return function(from, to, direction, listener) {
+ var step = direction * precision;
+ if (from != null) {
+ from = d3_geo_circleAngle(cr, from);
+ to = d3_geo_circleAngle(cr, to);
+ if (direction > 0 ? from < to : from > to) from += direction * τ;
+ } else {
+ from = radius + direction * τ;
+ to = radius - .5 * step;
+ }
+ for (var point, t = from; direction > 0 ? t > to : t < to; t -= step) {
+ listener.point((point = d3_geo_spherical([ cr, -sr * Math.cos(t), -sr * Math.sin(t) ]))[0], point[1]);
+ }
+ };
+ }
+ function d3_geo_circleAngle(cr, point) {
+ var a = d3_geo_cartesian(point);
+ a[0] -= cr;
+ d3_geo_cartesianNormalize(a);
+ var angle = d3_acos(-a[1]);
+ return ((-a[2] < 0 ? -angle : angle) + 2 * Math.PI - ε) % (2 * Math.PI);
+ }
+ d3.geo.distance = function(a, b) {
+ var Δλ = (b[0] - a[0]) * d3_radians, φ0 = a[1] * d3_radians, φ1 = b[1] * d3_radians, sinΔλ = Math.sin(Δλ), cosΔλ = Math.cos(Δλ), sinφ0 = Math.sin(φ0), cosφ0 = Math.cos(φ0), sinφ1 = Math.sin(φ1), cosφ1 = Math.cos(φ1), t;
+ return Math.atan2(Math.sqrt((t = cosφ1 * sinΔλ) * t + (t = cosφ0 * sinφ1 - sinφ0 * cosφ1 * cosΔλ) * t), sinφ0 * sinφ1 + cosφ0 * cosφ1 * cosΔλ);
+ };
+ d3.geo.graticule = function() {
+ var x1, x0, X1, X0, y1, y0, Y1, Y0, dx = 10, dy = dx, DX = 90, DY = 360, x, y, X, Y, precision = 2.5;
+ function graticule() {
+ return {
+ type: "MultiLineString",
+ coordinates: lines()
+ };
+ }
+ function lines() {
+ return d3.range(Math.ceil(X0 / DX) * DX, X1, DX).map(X).concat(d3.range(Math.ceil(Y0 / DY) * DY, Y1, DY).map(Y)).concat(d3.range(Math.ceil(x0 / dx) * dx, x1, dx).filter(function(x) {
+ return abs(x % DX) > ε;
+ }).map(x)).concat(d3.range(Math.ceil(y0 / dy) * dy, y1, dy).filter(function(y) {
+ return abs(y % DY) > ε;
+ }).map(y));
+ }
+ graticule.lines = function() {
+ return lines().map(function(coordinates) {
+ return {
+ type: "LineString",
+ coordinates: coordinates
+ };
+ });
+ };
+ graticule.outline = function() {
+ return {
+ type: "Polygon",
+ coordinates: [ X(X0).concat(Y(Y1).slice(1), X(X1).reverse().slice(1), Y(Y0).reverse().slice(1)) ]
+ };
+ };
+ graticule.extent = function(_) {
+ if (!arguments.length) return graticule.minorExtent();
+ return graticule.majorExtent(_).minorExtent(_);
+ };
+ graticule.majorExtent = function(_) {
+ if (!arguments.length) return [ [ X0, Y0 ], [ X1, Y1 ] ];
+ X0 = +_[0][0], X1 = +_[1][0];
+ Y0 = +_[0][1], Y1 = +_[1][1];
+ if (X0 > X1) _ = X0, X0 = X1, X1 = _;
+ if (Y0 > Y1) _ = Y0, Y0 = Y1, Y1 = _;
+ return graticule.precision(precision);
+ };
+ graticule.minorExtent = function(_) {
+ if (!arguments.length) return [ [ x0, y0 ], [ x1, y1 ] ];
+ x0 = +_[0][0], x1 = +_[1][0];
+ y0 = +_[0][1], y1 = +_[1][1];
+ if (x0 > x1) _ = x0, x0 = x1, x1 = _;
+ if (y0 > y1) _ = y0, y0 = y1, y1 = _;
+ return graticule.precision(precision);
+ };
+ graticule.step = function(_) {
+ if (!arguments.length) return graticule.minorStep();
+ return graticule.majorStep(_).minorStep(_);
+ };
+ graticule.majorStep = function(_) {
+ if (!arguments.length) return [ DX, DY ];
+ DX = +_[0], DY = +_[1];
+ return graticule;
+ };
+ graticule.minorStep = function(_) {
+ if (!arguments.length) return [ dx, dy ];
+ dx = +_[0], dy = +_[1];
+ return graticule;
+ };
+ graticule.precision = function(_) {
+ if (!arguments.length) return precision;
+ precision = +_;
+ x = d3_geo_graticuleX(y0, y1, 90);
+ y = d3_geo_graticuleY(x0, x1, precision);
+ X = d3_geo_graticuleX(Y0, Y1, 90);
+ Y = d3_geo_graticuleY(X0, X1, precision);
+ return graticule;
+ };
+ return graticule.majorExtent([ [ -180, -90 + ε ], [ 180, 90 - ε ] ]).minorExtent([ [ -180, -80 - ε ], [ 180, 80 + ε ] ]);
+ };
+ function d3_geo_graticuleX(y0, y1, dy) {
+ var y = d3.range(y0, y1 - ε, dy).concat(y1);
+ return function(x) {
+ return y.map(function(y) {
+ return [ x, y ];
+ });
+ };
+ }
+ function d3_geo_graticuleY(x0, x1, dx) {
+ var x = d3.range(x0, x1 - ε, dx).concat(x1);
+ return function(y) {
+ return x.map(function(x) {
+ return [ x, y ];
+ });
+ };
+ }
+ function d3_source(d) {
+ return d.source;
+ }
+ function d3_target(d) {
+ return d.target;
+ }
+ d3.geo.greatArc = function() {
+ var source = d3_source, source_, target = d3_target, target_;
+ function greatArc() {
+ return {
+ type: "LineString",
+ coordinates: [ source_ || source.apply(this, arguments), target_ || target.apply(this, arguments) ]
+ };
+ }
+ greatArc.distance = function() {
+ return d3.geo.distance(source_ || source.apply(this, arguments), target_ || target.apply(this, arguments));
+ };
+ greatArc.source = function(_) {
+ if (!arguments.length) return source;
+ source = _, source_ = typeof _ === "function" ? null : _;
+ return greatArc;
+ };
+ greatArc.target = function(_) {
+ if (!arguments.length) return target;
+ target = _, target_ = typeof _ === "function" ? null : _;
+ return greatArc;
+ };
+ greatArc.precision = function() {
+ return arguments.length ? greatArc : 0;
+ };
+ return greatArc;
+ };
+ d3.geo.interpolate = function(source, target) {
+ return d3_geo_interpolate(source[0] * d3_radians, source[1] * d3_radians, target[0] * d3_radians, target[1] * d3_radians);
+ };
+ function d3_geo_interpolate(x0, y0, x1, y1) {
+ var cy0 = Math.cos(y0), sy0 = Math.sin(y0), cy1 = Math.cos(y1), sy1 = Math.sin(y1), kx0 = cy0 * Math.cos(x0), ky0 = cy0 * Math.sin(x0), kx1 = cy1 * Math.cos(x1), ky1 = cy1 * Math.sin(x1), d = 2 * Math.asin(Math.sqrt(d3_haversin(y1 - y0) + cy0 * cy1 * d3_haversin(x1 - x0))), k = 1 / Math.sin(d);
+ var interpolate = d ? function(t) {
+ var B = Math.sin(t *= d) * k, A = Math.sin(d - t) * k, x = A * kx0 + B * kx1, y = A * ky0 + B * ky1, z = A * sy0 + B * sy1;
+ return [ Math.atan2(y, x) * d3_degrees, Math.atan2(z, Math.sqrt(x * x + y * y)) * d3_degrees ];
+ } : function() {
+ return [ x0 * d3_degrees, y0 * d3_degrees ];
+ };
+ interpolate.distance = d;
+ return interpolate;
+ }
+ d3.geo.length = function(object) {
+ d3_geo_lengthSum = 0;
+ d3.geo.stream(object, d3_geo_length);
+ return d3_geo_lengthSum;
+ };
+ var d3_geo_lengthSum;
+ var d3_geo_length = {
+ sphere: d3_noop,
+ point: d3_noop,
+ lineStart: d3_geo_lengthLineStart,
+ lineEnd: d3_noop,
+ polygonStart: d3_noop,
+ polygonEnd: d3_noop
+ };
+ function d3_geo_lengthLineStart() {
+ var λ0, sinφ0, cosφ0;
+ d3_geo_length.point = function(λ, φ) {
+ λ0 = λ * d3_radians, sinφ0 = Math.sin(φ *= d3_radians), cosφ0 = Math.cos(φ);
+ d3_geo_length.point = nextPoint;
+ };
+ d3_geo_length.lineEnd = function() {
+ d3_geo_length.point = d3_geo_length.lineEnd = d3_noop;
+ };
+ function nextPoint(λ, φ) {
+ var sinφ = Math.sin(φ *= d3_radians), cosφ = Math.cos(φ), t = abs((λ *= d3_radians) - λ0), cosΔλ = Math.cos(t);
+ d3_geo_lengthSum += Math.atan2(Math.sqrt((t = cosφ * Math.sin(t)) * t + (t = cosφ0 * sinφ - sinφ0 * cosφ * cosΔλ) * t), sinφ0 * sinφ + cosφ0 * cosφ * cosΔλ);
+ λ0 = λ, sinφ0 = sinφ, cosφ0 = cosφ;
+ }
+ }
+ function d3_geo_azimuthal(scale, angle) {
+ function azimuthal(λ, φ) {
+ var cosλ = Math.cos(λ), cosφ = Math.cos(φ), k = scale(cosλ * cosφ);
+ return [ k * cosφ * Math.sin(λ), k * Math.sin(φ) ];
+ }
+ azimuthal.invert = function(x, y) {
+ var ρ = Math.sqrt(x * x + y * y), c = angle(ρ), sinc = Math.sin(c), cosc = Math.cos(c);
+ return [ Math.atan2(x * sinc, ρ * cosc), Math.asin(ρ && y * sinc / ρ) ];
+ };
+ return azimuthal;
+ }
+ var d3_geo_azimuthalEqualArea = d3_geo_azimuthal(function(cosλcosφ) {
+ return Math.sqrt(2 / (1 + cosλcosφ));
+ }, function(ρ) {
+ return 2 * Math.asin(ρ / 2);
+ });
+ (d3.geo.azimuthalEqualArea = function() {
+ return d3_geo_projection(d3_geo_azimuthalEqualArea);
+ }).raw = d3_geo_azimuthalEqualArea;
+ var d3_geo_azimuthalEquidistant = d3_geo_azimuthal(function(cosλcosφ) {
+ var c = Math.acos(cosλcosφ);
+ return c && c / Math.sin(c);
+ }, d3_identity);
+ (d3.geo.azimuthalEquidistant = function() {
+ return d3_geo_projection(d3_geo_azimuthalEquidistant);
+ }).raw = d3_geo_azimuthalEquidistant;
+ function d3_geo_conicConformal(φ0, φ1) {
+ var cosφ0 = Math.cos(φ0), t = function(φ) {
+ return Math.tan(π / 4 + φ / 2);
+ }, n = φ0 === φ1 ? Math.sin(φ0) : Math.log(cosφ0 / Math.cos(φ1)) / Math.log(t(φ1) / t(φ0)), F = cosφ0 * Math.pow(t(φ0), n) / n;
+ if (!n) return d3_geo_mercator;
+ function forward(λ, φ) {
+ if (F > 0) {
+ if (φ < -halfπ + ε) φ = -halfπ + ε;
+ } else {
+ if (φ > halfπ - ε) φ = halfπ - ε;
+ }
+ var ρ = F / Math.pow(t(φ), n);
+ return [ ρ * Math.sin(n * λ), F - ρ * Math.cos(n * λ) ];
+ }
+ forward.invert = function(x, y) {
+ var ρ0_y = F - y, ρ = d3_sgn(n) * Math.sqrt(x * x + ρ0_y * ρ0_y);
+ return [ Math.atan2(x, ρ0_y) / n, 2 * Math.atan(Math.pow(F / ρ, 1 / n)) - halfπ ];
+ };
+ return forward;
+ }
+ (d3.geo.conicConformal = function() {
+ return d3_geo_conic(d3_geo_conicConformal);
+ }).raw = d3_geo_conicConformal;
+ function d3_geo_conicEquidistant(φ0, φ1) {
+ var cosφ0 = Math.cos(φ0), n = φ0 === φ1 ? Math.sin(φ0) : (cosφ0 - Math.cos(φ1)) / (φ1 - φ0), G = cosφ0 / n + φ0;
+ if (abs(n) < ε) return d3_geo_equirectangular;
+ function forward(λ, φ) {
+ var ρ = G - φ;
+ return [ ρ * Math.sin(n * λ), G - ρ * Math.cos(n * λ) ];
+ }
+ forward.invert = function(x, y) {
+ var ρ0_y = G - y;
+ return [ Math.atan2(x, ρ0_y) / n, G - d3_sgn(n) * Math.sqrt(x * x + ρ0_y * ρ0_y) ];
+ };
+ return forward;
+ }
+ (d3.geo.conicEquidistant = function() {
+ return d3_geo_conic(d3_geo_conicEquidistant);
+ }).raw = d3_geo_conicEquidistant;
+ var d3_geo_gnomonic = d3_geo_azimuthal(function(cosλcosφ) {
+ return 1 / cosλcosφ;
+ }, Math.atan);
+ (d3.geo.gnomonic = function() {
+ return d3_geo_projection(d3_geo_gnomonic);
+ }).raw = d3_geo_gnomonic;
+ function d3_geo_mercator(λ, φ) {
+ return [ λ, Math.log(Math.tan(π / 4 + φ / 2)) ];
+ }
+ d3_geo_mercator.invert = function(x, y) {
+ return [ x, 2 * Math.atan(Math.exp(y)) - halfπ ];
+ };
+ function d3_geo_mercatorProjection(project) {
+ var m = d3_geo_projection(project), scale = m.scale, translate = m.translate, clipExtent = m.clipExtent, clipAuto;
+ m.scale = function() {
+ var v = scale.apply(m, arguments);
+ return v === m ? clipAuto ? m.clipExtent(null) : m : v;
+ };
+ m.translate = function() {
+ var v = translate.apply(m, arguments);
+ return v === m ? clipAuto ? m.clipExtent(null) : m : v;
+ };
+ m.clipExtent = function(_) {
+ var v = clipExtent.apply(m, arguments);
+ if (v === m) {
+ if (clipAuto = _ == null) {
+ var k = π * scale(), t = translate();
+ clipExtent([ [ t[0] - k, t[1] - k ], [ t[0] + k, t[1] + k ] ]);
+ }
+ } else if (clipAuto) {
+ v = null;
+ }
+ return v;
+ };
+ return m.clipExtent(null);
+ }
+ (d3.geo.mercator = function() {
+ return d3_geo_mercatorProjection(d3_geo_mercator);
+ }).raw = d3_geo_mercator;
+ var d3_geo_orthographic = d3_geo_azimuthal(function() {
+ return 1;
+ }, Math.asin);
+ (d3.geo.orthographic = function() {
+ return d3_geo_projection(d3_geo_orthographic);
+ }).raw = d3_geo_orthographic;
+ var d3_geo_stereographic = d3_geo_azimuthal(function(cosλcosφ) {
+ return 1 / (1 + cosλcosφ);
+ }, function(ρ) {
+ return 2 * Math.atan(ρ);
+ });
+ (d3.geo.stereographic = function() {
+ return d3_geo_projection(d3_geo_stereographic);
+ }).raw = d3_geo_stereographic;
+ function d3_geo_transverseMercator(λ, φ) {
+ return [ Math.log(Math.tan(π / 4 + φ / 2)), -λ ];
+ }
+ d3_geo_transverseMercator.invert = function(x, y) {
+ return [ -y, 2 * Math.atan(Math.exp(x)) - halfπ ];
+ };
+ (d3.geo.transverseMercator = function() {
+ var projection = d3_geo_mercatorProjection(d3_geo_transverseMercator), center = projection.center, rotate = projection.rotate;
+ projection.center = function(_) {
+ return _ ? center([ -_[1], _[0] ]) : (_ = center(), [ _[1], -_[0] ]);
+ };
+ projection.rotate = function(_) {
+ return _ ? rotate([ _[0], _[1], _.length > 2 ? _[2] + 90 : 90 ]) : (_ = rotate(),
+ [ _[0], _[1], _[2] - 90 ]);
+ };
+ return rotate([ 0, 0, 90 ]);
+ }).raw = d3_geo_transverseMercator;
+ d3.geom = {};
+ function d3_geom_pointX(d) {
+ return d[0];
+ }
+ function d3_geom_pointY(d) {
+ return d[1];
+ }
+ d3.geom.hull = function(vertices) {
+ var x = d3_geom_pointX, y = d3_geom_pointY;
+ if (arguments.length) return hull(vertices);
+ function hull(data) {
+ if (data.length < 3) return [];
+ var fx = d3_functor(x), fy = d3_functor(y), i, n = data.length, points = [], flippedPoints = [];
+ for (i = 0; i < n; i++) {
+ points.push([ +fx.call(this, data[i], i), +fy.call(this, data[i], i), i ]);
+ }
+ points.sort(d3_geom_hullOrder);
+ for (i = 0; i < n; i++) flippedPoints.push([ points[i][0], -points[i][1] ]);
+ var upper = d3_geom_hullUpper(points), lower = d3_geom_hullUpper(flippedPoints);
+ var skipLeft = lower[0] === upper[0], skipRight = lower[lower.length - 1] === upper[upper.length - 1], polygon = [];
+ for (i = upper.length - 1; i >= 0; --i) polygon.push(data[points[upper[i]][2]]);
+ for (i = +skipLeft; i < lower.length - skipRight; ++i) polygon.push(data[points[lower[i]][2]]);
+ return polygon;
+ }
+ hull.x = function(_) {
+ return arguments.length ? (x = _, hull) : x;
+ };
+ hull.y = function(_) {
+ return arguments.length ? (y = _, hull) : y;
+ };
+ return hull;
+ };
+ function d3_geom_hullUpper(points) {
+ var n = points.length, hull = [ 0, 1 ], hs = 2;
+ for (var i = 2; i < n; i++) {
+ while (hs > 1 && d3_cross2d(points[hull[hs - 2]], points[hull[hs - 1]], points[i]) <= 0) --hs;
+ hull[hs++] = i;
+ }
+ return hull.slice(0, hs);
+ }
+ function d3_geom_hullOrder(a, b) {
+ return a[0] - b[0] || a[1] - b[1];
+ }
+ d3.geom.polygon = function(coordinates) {
+ d3_subclass(coordinates, d3_geom_polygonPrototype);
+ return coordinates;
+ };
+ var d3_geom_polygonPrototype = d3.geom.polygon.prototype = [];
+ d3_geom_polygonPrototype.area = function() {
+ var i = -1, n = this.length, a, b = this[n - 1], area = 0;
+ while (++i < n) {
+ a = b;
+ b = this[i];
+ area += a[1] * b[0] - a[0] * b[1];
+ }
+ return area * .5;
+ };
+ d3_geom_polygonPrototype.centroid = function(k) {
+ var i = -1, n = this.length, x = 0, y = 0, a, b = this[n - 1], c;
+ if (!arguments.length) k = -1 / (6 * this.area());
+ while (++i < n) {
+ a = b;
+ b = this[i];
+ c = a[0] * b[1] - b[0] * a[1];
+ x += (a[0] + b[0]) * c;
+ y += (a[1] + b[1]) * c;
+ }
+ return [ x * k, y * k ];
+ };
+ d3_geom_polygonPrototype.clip = function(subject) {
+ var input, closed = d3_geom_polygonClosed(subject), i = -1, n = this.length - d3_geom_polygonClosed(this), j, m, a = this[n - 1], b, c, d;
+ while (++i < n) {
+ input = subject.slice();
+ subject.length = 0;
+ b = this[i];
+ c = input[(m = input.length - closed) - 1];
+ j = -1;
+ while (++j < m) {
+ d = input[j];
+ if (d3_geom_polygonInside(d, a, b)) {
+ if (!d3_geom_polygonInside(c, a, b)) {
+ subject.push(d3_geom_polygonIntersect(c, d, a, b));
+ }
+ subject.push(d);
+ } else if (d3_geom_polygonInside(c, a, b)) {
+ subject.push(d3_geom_polygonIntersect(c, d, a, b));
+ }
+ c = d;
+ }
+ if (closed) subject.push(subject[0]);
+ a = b;
+ }
+ return subject;
+ };
+ function d3_geom_polygonInside(p, a, b) {
+ return (b[0] - a[0]) * (p[1] - a[1]) < (b[1] - a[1]) * (p[0] - a[0]);
+ }
+ function d3_geom_polygonIntersect(c, d, a, b) {
+ var x1 = c[0], x3 = a[0], x21 = d[0] - x1, x43 = b[0] - x3, y1 = c[1], y3 = a[1], y21 = d[1] - y1, y43 = b[1] - y3, ua = (x43 * (y1 - y3) - y43 * (x1 - x3)) / (y43 * x21 - x43 * y21);
+ return [ x1 + ua * x21, y1 + ua * y21 ];
+ }
+ function d3_geom_polygonClosed(coordinates) {
+ var a = coordinates[0], b = coordinates[coordinates.length - 1];
+ return !(a[0] - b[0] || a[1] - b[1]);
+ }
+ var d3_geom_voronoiEdges, d3_geom_voronoiCells, d3_geom_voronoiBeaches, d3_geom_voronoiBeachPool = [], d3_geom_voronoiFirstCircle, d3_geom_voronoiCircles, d3_geom_voronoiCirclePool = [];
+ function d3_geom_voronoiBeach() {
+ d3_geom_voronoiRedBlackNode(this);
+ this.edge = this.site = this.circle = null;
+ }
+ function d3_geom_voronoiCreateBeach(site) {
+ var beach = d3_geom_voronoiBeachPool.pop() || new d3_geom_voronoiBeach();
+ beach.site = site;
+ return beach;
+ }
+ function d3_geom_voronoiDetachBeach(beach) {
+ d3_geom_voronoiDetachCircle(beach);
+ d3_geom_voronoiBeaches.remove(beach);
+ d3_geom_voronoiBeachPool.push(beach);
+ d3_geom_voronoiRedBlackNode(beach);
+ }
+ function d3_geom_voronoiRemoveBeach(beach) {
+ var circle = beach.circle, x = circle.x, y = circle.cy, vertex = {
+ x: x,
+ y: y
+ }, previous = beach.P, next = beach.N, disappearing = [ beach ];
+ d3_geom_voronoiDetachBeach(beach);
+ var lArc = previous;
+ while (lArc.circle && abs(x - lArc.circle.x) < ε && abs(y - lArc.circle.cy) < ε) {
+ previous = lArc.P;
+ disappearing.unshift(lArc);
+ d3_geom_voronoiDetachBeach(lArc);
+ lArc = previous;
+ }
+ disappearing.unshift(lArc);
+ d3_geom_voronoiDetachCircle(lArc);
+ var rArc = next;
+ while (rArc.circle && abs(x - rArc.circle.x) < ε && abs(y - rArc.circle.cy) < ε) {
+ next = rArc.N;
+ disappearing.push(rArc);
+ d3_geom_voronoiDetachBeach(rArc);
+ rArc = next;
+ }
+ disappearing.push(rArc);
+ d3_geom_voronoiDetachCircle(rArc);
+ var nArcs = disappearing.length, iArc;
+ for (iArc = 1; iArc < nArcs; ++iArc) {
+ rArc = disappearing[iArc];
+ lArc = disappearing[iArc - 1];
+ d3_geom_voronoiSetEdgeEnd(rArc.edge, lArc.site, rArc.site, vertex);
+ }
+ lArc = disappearing[0];
+ rArc = disappearing[nArcs - 1];
+ rArc.edge = d3_geom_voronoiCreateEdge(lArc.site, rArc.site, null, vertex);
+ d3_geom_voronoiAttachCircle(lArc);
+ d3_geom_voronoiAttachCircle(rArc);
+ }
+ function d3_geom_voronoiAddBeach(site) {
+ var x = site.x, directrix = site.y, lArc, rArc, dxl, dxr, node = d3_geom_voronoiBeaches._;
+ while (node) {
+ dxl = d3_geom_voronoiLeftBreakPoint(node, directrix) - x;
+ if (dxl > ε) node = node.L; else {
+ dxr = x - d3_geom_voronoiRightBreakPoint(node, directrix);
+ if (dxr > ε) {
+ if (!node.R) {
+ lArc = node;
+ break;
+ }
+ node = node.R;
+ } else {
+ if (dxl > -ε) {
+ lArc = node.P;
+ rArc = node;
+ } else if (dxr > -ε) {
+ lArc = node;
+ rArc = node.N;
+ } else {
+ lArc = rArc = node;
+ }
+ break;
+ }
+ }
+ }
+ var newArc = d3_geom_voronoiCreateBeach(site);
+ d3_geom_voronoiBeaches.insert(lArc, newArc);
+ if (!lArc && !rArc) return;
+ if (lArc === rArc) {
+ d3_geom_voronoiDetachCircle(lArc);
+ rArc = d3_geom_voronoiCreateBeach(lArc.site);
+ d3_geom_voronoiBeaches.insert(newArc, rArc);
+ newArc.edge = rArc.edge = d3_geom_voronoiCreateEdge(lArc.site, newArc.site);
+ d3_geom_voronoiAttachCircle(lArc);
+ d3_geom_voronoiAttachCircle(rArc);
+ return;
+ }
+ if (!rArc) {
+ newArc.edge = d3_geom_voronoiCreateEdge(lArc.site, newArc.site);
+ return;
+ }
+ d3_geom_voronoiDetachCircle(lArc);
+ d3_geom_voronoiDetachCircle(rArc);
+ var lSite = lArc.site, ax = lSite.x, ay = lSite.y, bx = site.x - ax, by = site.y - ay, rSite = rArc.site, cx = rSite.x - ax, cy = rSite.y - ay, d = 2 * (bx * cy - by * cx), hb = bx * bx + by * by, hc = cx * cx + cy * cy, vertex = {
+ x: (cy * hb - by * hc) / d + ax,
+ y: (bx * hc - cx * hb) / d + ay
+ };
+ d3_geom_voronoiSetEdgeEnd(rArc.edge, lSite, rSite, vertex);
+ newArc.edge = d3_geom_voronoiCreateEdge(lSite, site, null, vertex);
+ rArc.edge = d3_geom_voronoiCreateEdge(site, rSite, null, vertex);
+ d3_geom_voronoiAttachCircle(lArc);
+ d3_geom_voronoiAttachCircle(rArc);
+ }
+ function d3_geom_voronoiLeftBreakPoint(arc, directrix) {
+ var site = arc.site, rfocx = site.x, rfocy = site.y, pby2 = rfocy - directrix;
+ if (!pby2) return rfocx;
+ var lArc = arc.P;
+ if (!lArc) return -Infinity;
+ site = lArc.site;
+ var lfocx = site.x, lfocy = site.y, plby2 = lfocy - directrix;
+ if (!plby2) return lfocx;
+ var hl = lfocx - rfocx, aby2 = 1 / pby2 - 1 / plby2, b = hl / plby2;
+ if (aby2) return (-b + Math.sqrt(b * b - 2 * aby2 * (hl * hl / (-2 * plby2) - lfocy + plby2 / 2 + rfocy - pby2 / 2))) / aby2 + rfocx;
+ return (rfocx + lfocx) / 2;
+ }
+ function d3_geom_voronoiRightBreakPoint(arc, directrix) {
+ var rArc = arc.N;
+ if (rArc) return d3_geom_voronoiLeftBreakPoint(rArc, directrix);
+ var site = arc.site;
+ return site.y === directrix ? site.x : Infinity;
+ }
+ function d3_geom_voronoiCell(site) {
+ this.site = site;
+ this.edges = [];
+ }
+ d3_geom_voronoiCell.prototype.prepare = function() {
+ var halfEdges = this.edges, iHalfEdge = halfEdges.length, edge;
+ while (iHalfEdge--) {
+ edge = halfEdges[iHalfEdge].edge;
+ if (!edge.b || !edge.a) halfEdges.splice(iHalfEdge, 1);
+ }
+ halfEdges.sort(d3_geom_voronoiHalfEdgeOrder);
+ return halfEdges.length;
+ };
+ function d3_geom_voronoiCloseCells(extent) {
+ var x0 = extent[0][0], x1 = extent[1][0], y0 = extent[0][1], y1 = extent[1][1], x2, y2, x3, y3, cells = d3_geom_voronoiCells, iCell = cells.length, cell, iHalfEdge, halfEdges, nHalfEdges, start, end;
+ while (iCell--) {
+ cell = cells[iCell];
+ if (!cell || !cell.prepare()) continue;
+ halfEdges = cell.edges;
+ nHalfEdges = halfEdges.length;
+ iHalfEdge = 0;
+ while (iHalfEdge < nHalfEdges) {
+ end = halfEdges[iHalfEdge].end(), x3 = end.x, y3 = end.y;
+ start = halfEdges[++iHalfEdge % nHalfEdges].start(), x2 = start.x, y2 = start.y;
+ if (abs(x3 - x2) > ε || abs(y3 - y2) > ε) {
+ halfEdges.splice(iHalfEdge, 0, new d3_geom_voronoiHalfEdge(d3_geom_voronoiCreateBorderEdge(cell.site, end, abs(x3 - x0) < ε && y1 - y3 > ε ? {
+ x: x0,
+ y: abs(x2 - x0) < ε ? y2 : y1
+ } : abs(y3 - y1) < ε && x1 - x3 > ε ? {
+ x: abs(y2 - y1) < ε ? x2 : x1,
+ y: y1
+ } : abs(x3 - x1) < ε && y3 - y0 > ε ? {
+ x: x1,
+ y: abs(x2 - x1) < ε ? y2 : y0
+ } : abs(y3 - y0) < ε && x3 - x0 > ε ? {
+ x: abs(y2 - y0) < ε ? x2 : x0,
+ y: y0
+ } : null), cell.site, null));
+ ++nHalfEdges;
+ }
+ }
+ }
+ }
+ function d3_geom_voronoiHalfEdgeOrder(a, b) {
+ return b.angle - a.angle;
+ }
+ function d3_geom_voronoiCircle() {
+ d3_geom_voronoiRedBlackNode(this);
+ this.x = this.y = this.arc = this.site = this.cy = null;
+ }
+ function d3_geom_voronoiAttachCircle(arc) {
+ var lArc = arc.P, rArc = arc.N;
+ if (!lArc || !rArc) return;
+ var lSite = lArc.site, cSite = arc.site, rSite = rArc.site;
+ if (lSite === rSite) return;
+ var bx = cSite.x, by = cSite.y, ax = lSite.x - bx, ay = lSite.y - by, cx = rSite.x - bx, cy = rSite.y - by;
+ var d = 2 * (ax * cy - ay * cx);
+ if (d >= -ε2) return;
+ var ha = ax * ax + ay * ay, hc = cx * cx + cy * cy, x = (cy * ha - ay * hc) / d, y = (ax * hc - cx * ha) / d, cy = y + by;
+ var circle = d3_geom_voronoiCirclePool.pop() || new d3_geom_voronoiCircle();
+ circle.arc = arc;
+ circle.site = cSite;
+ circle.x = x + bx;
+ circle.y = cy + Math.sqrt(x * x + y * y);
+ circle.cy = cy;
+ arc.circle = circle;
+ var before = null, node = d3_geom_voronoiCircles._;
+ while (node) {
+ if (circle.y < node.y || circle.y === node.y && circle.x <= node.x) {
+ if (node.L) node = node.L; else {
+ before = node.P;
+ break;
+ }
+ } else {
+ if (node.R) node = node.R; else {
+ before = node;
+ break;
+ }
+ }
+ }
+ d3_geom_voronoiCircles.insert(before, circle);
+ if (!before) d3_geom_voronoiFirstCircle = circle;
+ }
+ function d3_geom_voronoiDetachCircle(arc) {
+ var circle = arc.circle;
+ if (circle) {
+ if (!circle.P) d3_geom_voronoiFirstCircle = circle.N;
+ d3_geom_voronoiCircles.remove(circle);
+ d3_geom_voronoiCirclePool.push(circle);
+ d3_geom_voronoiRedBlackNode(circle);
+ arc.circle = null;
+ }
+ }
+ function d3_geom_voronoiClipEdges(extent) {
+ var edges = d3_geom_voronoiEdges, clip = d3_geom_clipLine(extent[0][0], extent[0][1], extent[1][0], extent[1][1]), i = edges.length, e;
+ while (i--) {
+ e = edges[i];
+ if (!d3_geom_voronoiConnectEdge(e, extent) || !clip(e) || abs(e.a.x - e.b.x) < ε && abs(e.a.y - e.b.y) < ε) {
+ e.a = e.b = null;
+ edges.splice(i, 1);
+ }
+ }
+ }
+ function d3_geom_voronoiConnectEdge(edge, extent) {
+ var vb = edge.b;
+ if (vb) return true;
+ var va = edge.a, x0 = extent[0][0], x1 = extent[1][0], y0 = extent[0][1], y1 = extent[1][1], lSite = edge.l, rSite = edge.r, lx = lSite.x, ly = lSite.y, rx = rSite.x, ry = rSite.y, fx = (lx + rx) / 2, fy = (ly + ry) / 2, fm, fb;
+ if (ry === ly) {
+ if (fx < x0 || fx >= x1) return;
+ if (lx > rx) {
+ if (!va) va = {
+ x: fx,
+ y: y0
+ }; else if (va.y >= y1) return;
+ vb = {
+ x: fx,
+ y: y1
+ };
+ } else {
+ if (!va) va = {
+ x: fx,
+ y: y1
+ }; else if (va.y < y0) return;
+ vb = {
+ x: fx,
+ y: y0
+ };
+ }
+ } else {
+ fm = (lx - rx) / (ry - ly);
+ fb = fy - fm * fx;
+ if (fm < -1 || fm > 1) {
+ if (lx > rx) {
+ if (!va) va = {
+ x: (y0 - fb) / fm,
+ y: y0
+ }; else if (va.y >= y1) return;
+ vb = {
+ x: (y1 - fb) / fm,
+ y: y1
+ };
+ } else {
+ if (!va) va = {
+ x: (y1 - fb) / fm,
+ y: y1
+ }; else if (va.y < y0) return;
+ vb = {
+ x: (y0 - fb) / fm,
+ y: y0
+ };
+ }
+ } else {
+ if (ly < ry) {
+ if (!va) va = {
+ x: x0,
+ y: fm * x0 + fb
+ }; else if (va.x >= x1) return;
+ vb = {
+ x: x1,
+ y: fm * x1 + fb
+ };
+ } else {
+ if (!va) va = {
+ x: x1,
+ y: fm * x1 + fb
+ }; else if (va.x < x0) return;
+ vb = {
+ x: x0,
+ y: fm * x0 + fb
+ };
+ }
+ }
+ }
+ edge.a = va;
+ edge.b = vb;
+ return true;
+ }
+ function d3_geom_voronoiEdge(lSite, rSite) {
+ this.l = lSite;
+ this.r = rSite;
+ this.a = this.b = null;
+ }
+ function d3_geom_voronoiCreateEdge(lSite, rSite, va, vb) {
+ var edge = new d3_geom_voronoiEdge(lSite, rSite);
+ d3_geom_voronoiEdges.push(edge);
+ if (va) d3_geom_voronoiSetEdgeEnd(edge, lSite, rSite, va);
+ if (vb) d3_geom_voronoiSetEdgeEnd(edge, rSite, lSite, vb);
+ d3_geom_voronoiCells[lSite.i].edges.push(new d3_geom_voronoiHalfEdge(edge, lSite, rSite));
+ d3_geom_voronoiCells[rSite.i].edges.push(new d3_geom_voronoiHalfEdge(edge, rSite, lSite));
+ return edge;
+ }
+ function d3_geom_voronoiCreateBorderEdge(lSite, va, vb) {
+ var edge = new d3_geom_voronoiEdge(lSite, null);
+ edge.a = va;
+ edge.b = vb;
+ d3_geom_voronoiEdges.push(edge);
+ return edge;
+ }
+ function d3_geom_voronoiSetEdgeEnd(edge, lSite, rSite, vertex) {
+ if (!edge.a && !edge.b) {
+ edge.a = vertex;
+ edge.l = lSite;
+ edge.r = rSite;
+ } else if (edge.l === rSite) {
+ edge.b = vertex;
+ } else {
+ edge.a = vertex;
+ }
+ }
+ function d3_geom_voronoiHalfEdge(edge, lSite, rSite) {
+ var va = edge.a, vb = edge.b;
+ this.edge = edge;
+ this.site = lSite;
+ this.angle = rSite ? Math.atan2(rSite.y - lSite.y, rSite.x - lSite.x) : edge.l === lSite ? Math.atan2(vb.x - va.x, va.y - vb.y) : Math.atan2(va.x - vb.x, vb.y - va.y);
+ }
+ d3_geom_voronoiHalfEdge.prototype = {
+ start: function() {
+ return this.edge.l === this.site ? this.edge.a : this.edge.b;
+ },
+ end: function() {
+ return this.edge.l === this.site ? this.edge.b : this.edge.a;
+ }
+ };
+ function d3_geom_voronoiRedBlackTree() {
+ this._ = null;
+ }
+ function d3_geom_voronoiRedBlackNode(node) {
+ node.U = node.C = node.L = node.R = node.P = node.N = null;
+ }
+ d3_geom_voronoiRedBlackTree.prototype = {
+ insert: function(after, node) {
+ var parent, grandpa, uncle;
+ if (after) {
+ node.P = after;
+ node.N = after.N;
+ if (after.N) after.N.P = node;
+ after.N = node;
+ if (after.R) {
+ after = after.R;
+ while (after.L) after = after.L;
+ after.L = node;
+ } else {
+ after.R = node;
+ }
+ parent = after;
+ } else if (this._) {
+ after = d3_geom_voronoiRedBlackFirst(this._);
+ node.P = null;
+ node.N = after;
+ after.P = after.L = node;
+ parent = after;
+ } else {
+ node.P = node.N = null;
+ this._ = node;
+ parent = null;
+ }
+ node.L = node.R = null;
+ node.U = parent;
+ node.C = true;
+ after = node;
+ while (parent && parent.C) {
+ grandpa = parent.U;
+ if (parent === grandpa.L) {
+ uncle = grandpa.R;
+ if (uncle && uncle.C) {
+ parent.C = uncle.C = false;
+ grandpa.C = true;
+ after = grandpa;
+ } else {
+ if (after === parent.R) {
+ d3_geom_voronoiRedBlackRotateLeft(this, parent);
+ after = parent;
+ parent = after.U;
+ }
+ parent.C = false;
+ grandpa.C = true;
+ d3_geom_voronoiRedBlackRotateRight(this, grandpa);
+ }
+ } else {
+ uncle = grandpa.L;
+ if (uncle && uncle.C) {
+ parent.C = uncle.C = false;
+ grandpa.C = true;
+ after = grandpa;
+ } else {
+ if (after === parent.L) {
+ d3_geom_voronoiRedBlackRotateRight(this, parent);
+ after = parent;
+ parent = after.U;
+ }
+ parent.C = false;
+ grandpa.C = true;
+ d3_geom_voronoiRedBlackRotateLeft(this, grandpa);
+ }
+ }
+ parent = after.U;
+ }
+ this._.C = false;
+ },
+ remove: function(node) {
+ if (node.N) node.N.P = node.P;
+ if (node.P) node.P.N = node.N;
+ node.N = node.P = null;
+ var parent = node.U, sibling, left = node.L, right = node.R, next, red;
+ if (!left) next = right; else if (!right) next = left; else next = d3_geom_voronoiRedBlackFirst(right);
+ if (parent) {
+ if (parent.L === node) parent.L = next; else parent.R = next;
+ } else {
+ this._ = next;
+ }
+ if (left && right) {
+ red = next.C;
+ next.C = node.C;
+ next.L = left;
+ left.U = next;
+ if (next !== right) {
+ parent = next.U;
+ next.U = node.U;
+ node = next.R;
+ parent.L = node;
+ next.R = right;
+ right.U = next;
+ } else {
+ next.U = parent;
+ parent = next;
+ node = next.R;
+ }
+ } else {
+ red = node.C;
+ node = next;
+ }
+ if (node) node.U = parent;
+ if (red) return;
+ if (node && node.C) {
+ node.C = false;
+ return;
+ }
+ do {
+ if (node === this._) break;
+ if (node === parent.L) {
+ sibling = parent.R;
+ if (sibling.C) {
+ sibling.C = false;
+ parent.C = true;
+ d3_geom_voronoiRedBlackRotateLeft(this, parent);
+ sibling = parent.R;
+ }
+ if (sibling.L && sibling.L.C || sibling.R && sibling.R.C) {
+ if (!sibling.R || !sibling.R.C) {
+ sibling.L.C = false;
+ sibling.C = true;
+ d3_geom_voronoiRedBlackRotateRight(this, sibling);
+ sibling = parent.R;
+ }
+ sibling.C = parent.C;
+ parent.C = sibling.R.C = false;
+ d3_geom_voronoiRedBlackRotateLeft(this, parent);
+ node = this._;
+ break;
+ }
+ } else {
+ sibling = parent.L;
+ if (sibling.C) {
+ sibling.C = false;
+ parent.C = true;
+ d3_geom_voronoiRedBlackRotateRight(this, parent);
+ sibling = parent.L;
+ }
+ if (sibling.L && sibling.L.C || sibling.R && sibling.R.C) {
+ if (!sibling.L || !sibling.L.C) {
+ sibling.R.C = false;
+ sibling.C = true;
+ d3_geom_voronoiRedBlackRotateLeft(this, sibling);
+ sibling = parent.L;
+ }
+ sibling.C = parent.C;
+ parent.C = sibling.L.C = false;
+ d3_geom_voronoiRedBlackRotateRight(this, parent);
+ node = this._;
+ break;
+ }
+ }
+ sibling.C = true;
+ node = parent;
+ parent = parent.U;
+ } while (!node.C);
+ if (node) node.C = false;
+ }
+ };
+ function d3_geom_voronoiRedBlackRotateLeft(tree, node) {
+ var p = node, q = node.R, parent = p.U;
+ if (parent) {
+ if (parent.L === p) parent.L = q; else parent.R = q;
+ } else {
+ tree._ = q;
+ }
+ q.U = parent;
+ p.U = q;
+ p.R = q.L;
+ if (p.R) p.R.U = p;
+ q.L = p;
+ }
+ function d3_geom_voronoiRedBlackRotateRight(tree, node) {
+ var p = node, q = node.L, parent = p.U;
+ if (parent) {
+ if (parent.L === p) parent.L = q; else parent.R = q;
+ } else {
+ tree._ = q;
+ }
+ q.U = parent;
+ p.U = q;
+ p.L = q.R;
+ if (p.L) p.L.U = p;
+ q.R = p;
+ }
+ function d3_geom_voronoiRedBlackFirst(node) {
+ while (node.L) node = node.L;
+ return node;
+ }
+ function d3_geom_voronoi(sites, bbox) {
+ var site = sites.sort(d3_geom_voronoiVertexOrder).pop(), x0, y0, circle;
+ d3_geom_voronoiEdges = [];
+ d3_geom_voronoiCells = new Array(sites.length);
+ d3_geom_voronoiBeaches = new d3_geom_voronoiRedBlackTree();
+ d3_geom_voronoiCircles = new d3_geom_voronoiRedBlackTree();
+ while (true) {
+ circle = d3_geom_voronoiFirstCircle;
+ if (site && (!circle || site.y < circle.y || site.y === circle.y && site.x < circle.x)) {
+ if (site.x !== x0 || site.y !== y0) {
+ d3_geom_voronoiCells[site.i] = new d3_geom_voronoiCell(site);
+ d3_geom_voronoiAddBeach(site);
+ x0 = site.x, y0 = site.y;
+ }
+ site = sites.pop();
+ } else if (circle) {
+ d3_geom_voronoiRemoveBeach(circle.arc);
+ } else {
+ break;
+ }
+ }
+ if (bbox) d3_geom_voronoiClipEdges(bbox), d3_geom_voronoiCloseCells(bbox);
+ var diagram = {
+ cells: d3_geom_voronoiCells,
+ edges: d3_geom_voronoiEdges
+ };
+ d3_geom_voronoiBeaches = d3_geom_voronoiCircles = d3_geom_voronoiEdges = d3_geom_voronoiCells = null;
+ return diagram;
+ }
+ function d3_geom_voronoiVertexOrder(a, b) {
+ return b.y - a.y || b.x - a.x;
+ }
+ d3.geom.voronoi = function(points) {
+ var x = d3_geom_pointX, y = d3_geom_pointY, fx = x, fy = y, clipExtent = d3_geom_voronoiClipExtent;
+ if (points) return voronoi(points);
+ function voronoi(data) {
+ var polygons = new Array(data.length), x0 = clipExtent[0][0], y0 = clipExtent[0][1], x1 = clipExtent[1][0], y1 = clipExtent[1][1];
+ d3_geom_voronoi(sites(data), clipExtent).cells.forEach(function(cell, i) {
+ var edges = cell.edges, site = cell.site, polygon = polygons[i] = edges.length ? edges.map(function(e) {
+ var s = e.start();
+ return [ s.x, s.y ];
+ }) : site.x >= x0 && site.x <= x1 && site.y >= y0 && site.y <= y1 ? [ [ x0, y1 ], [ x1, y1 ], [ x1, y0 ], [ x0, y0 ] ] : [];
+ polygon.point = data[i];
+ });
+ return polygons;
+ }
+ function sites(data) {
+ return data.map(function(d, i) {
+ return {
+ x: Math.round(fx(d, i) / ε) * ε,
+ y: Math.round(fy(d, i) / ε) * ε,
+ i: i
+ };
+ });
+ }
+ voronoi.links = function(data) {
+ return d3_geom_voronoi(sites(data)).edges.filter(function(edge) {
+ return edge.l && edge.r;
+ }).map(function(edge) {
+ return {
+ source: data[edge.l.i],
+ target: data[edge.r.i]
+ };
+ });
+ };
+ voronoi.triangles = function(data) {
+ var triangles = [];
+ d3_geom_voronoi(sites(data)).cells.forEach(function(cell, i) {
+ var site = cell.site, edges = cell.edges.sort(d3_geom_voronoiHalfEdgeOrder), j = -1, m = edges.length, e0, s0, e1 = edges[m - 1].edge, s1 = e1.l === site ? e1.r : e1.l;
+ while (++j < m) {
+ e0 = e1;
+ s0 = s1;
+ e1 = edges[j].edge;
+ s1 = e1.l === site ? e1.r : e1.l;
+ if (i < s0.i && i < s1.i && d3_geom_voronoiTriangleArea(site, s0, s1) < 0) {
+ triangles.push([ data[i], data[s0.i], data[s1.i] ]);
+ }
+ }
+ });
+ return triangles;
+ };
+ voronoi.x = function(_) {
+ return arguments.length ? (fx = d3_functor(x = _), voronoi) : x;
+ };
+ voronoi.y = function(_) {
+ return arguments.length ? (fy = d3_functor(y = _), voronoi) : y;
+ };
+ voronoi.clipExtent = function(_) {
+ if (!arguments.length) return clipExtent === d3_geom_voronoiClipExtent ? null : clipExtent;
+ clipExtent = _ == null ? d3_geom_voronoiClipExtent : _;
+ return voronoi;
+ };
+ voronoi.size = function(_) {
+ if (!arguments.length) return clipExtent === d3_geom_voronoiClipExtent ? null : clipExtent && clipExtent[1];
+ return voronoi.clipExtent(_ && [ [ 0, 0 ], _ ]);
+ };
+ return voronoi;
+ };
+ var d3_geom_voronoiClipExtent = [ [ -1e6, -1e6 ], [ 1e6, 1e6 ] ];
+ function d3_geom_voronoiTriangleArea(a, b, c) {
+ return (a.x - c.x) * (b.y - a.y) - (a.x - b.x) * (c.y - a.y);
+ }
+ d3.geom.delaunay = function(vertices) {
+ return d3.geom.voronoi().triangles(vertices);
+ };
+ d3.geom.quadtree = function(points, x1, y1, x2, y2) {
+ var x = d3_geom_pointX, y = d3_geom_pointY, compat;
+ if (compat = arguments.length) {
+ x = d3_geom_quadtreeCompatX;
+ y = d3_geom_quadtreeCompatY;
+ if (compat === 3) {
+ y2 = y1;
+ x2 = x1;
+ y1 = x1 = 0;
+ }
+ return quadtree(points);
+ }
+ function quadtree(data) {
+ var d, fx = d3_functor(x), fy = d3_functor(y), xs, ys, i, n, x1_, y1_, x2_, y2_;
+ if (x1 != null) {
+ x1_ = x1, y1_ = y1, x2_ = x2, y2_ = y2;
+ } else {
+ x2_ = y2_ = -(x1_ = y1_ = Infinity);
+ xs = [], ys = [];
+ n = data.length;
+ if (compat) for (i = 0; i < n; ++i) {
+ d = data[i];
+ if (d.x < x1_) x1_ = d.x;
+ if (d.y < y1_) y1_ = d.y;
+ if (d.x > x2_) x2_ = d.x;
+ if (d.y > y2_) y2_ = d.y;
+ xs.push(d.x);
+ ys.push(d.y);
+ } else for (i = 0; i < n; ++i) {
+ var x_ = +fx(d = data[i], i), y_ = +fy(d, i);
+ if (x_ < x1_) x1_ = x_;
+ if (y_ < y1_) y1_ = y_;
+ if (x_ > x2_) x2_ = x_;
+ if (y_ > y2_) y2_ = y_;
+ xs.push(x_);
+ ys.push(y_);
+ }
+ }
+ var dx = x2_ - x1_, dy = y2_ - y1_;
+ if (dx > dy) y2_ = y1_ + dx; else x2_ = x1_ + dy;
+ function insert(n, d, x, y, x1, y1, x2, y2) {
+ if (isNaN(x) || isNaN(y)) return;
+ if (n.leaf) {
+ var nx = n.x, ny = n.y;
+ if (nx != null) {
+ if (abs(nx - x) + abs(ny - y) < .01) {
+ insertChild(n, d, x, y, x1, y1, x2, y2);
+ } else {
+ var nPoint = n.point;
+ n.x = n.y = n.point = null;
+ insertChild(n, nPoint, nx, ny, x1, y1, x2, y2);
+ insertChild(n, d, x, y, x1, y1, x2, y2);
+ }
+ } else {
+ n.x = x, n.y = y, n.point = d;
+ }
+ } else {
+ insertChild(n, d, x, y, x1, y1, x2, y2);
+ }
+ }
+ function insertChild(n, d, x, y, x1, y1, x2, y2) {
+ var xm = (x1 + x2) * .5, ym = (y1 + y2) * .5, right = x >= xm, below = y >= ym, i = below << 1 | right;
+ n.leaf = false;
+ n = n.nodes[i] || (n.nodes[i] = d3_geom_quadtreeNode());
+ if (right) x1 = xm; else x2 = xm;
+ if (below) y1 = ym; else y2 = ym;
+ insert(n, d, x, y, x1, y1, x2, y2);
+ }
+ var root = d3_geom_quadtreeNode();
+ root.add = function(d) {
+ insert(root, d, +fx(d, ++i), +fy(d, i), x1_, y1_, x2_, y2_);
+ };
+ root.visit = function(f) {
+ d3_geom_quadtreeVisit(f, root, x1_, y1_, x2_, y2_);
+ };
+ root.find = function(point) {
+ return d3_geom_quadtreeFind(root, point[0], point[1], x1_, y1_, x2_, y2_);
+ };
+ i = -1;
+ if (x1 == null) {
+ while (++i < n) {
+ insert(root, data[i], xs[i], ys[i], x1_, y1_, x2_, y2_);
+ }
+ --i;
+ } else data.forEach(root.add);
+ xs = ys = data = d = null;
+ return root;
+ }
+ quadtree.x = function(_) {
+ return arguments.length ? (x = _, quadtree) : x;
+ };
+ quadtree.y = function(_) {
+ return arguments.length ? (y = _, quadtree) : y;
+ };
+ quadtree.extent = function(_) {
+ if (!arguments.length) return x1 == null ? null : [ [ x1, y1 ], [ x2, y2 ] ];
+ if (_ == null) x1 = y1 = x2 = y2 = null; else x1 = +_[0][0], y1 = +_[0][1], x2 = +_[1][0],
+ y2 = +_[1][1];
+ return quadtree;
+ };
+ quadtree.size = function(_) {
+ if (!arguments.length) return x1 == null ? null : [ x2 - x1, y2 - y1 ];
+ if (_ == null) x1 = y1 = x2 = y2 = null; else x1 = y1 = 0, x2 = +_[0], y2 = +_[1];
+ return quadtree;
+ };
+ return quadtree;
+ };
+ function d3_geom_quadtreeCompatX(d) {
+ return d.x;
+ }
+ function d3_geom_quadtreeCompatY(d) {
+ return d.y;
+ }
+ function d3_geom_quadtreeNode() {
+ return {
+ leaf: true,
+ nodes: [],
+ point: null,
+ x: null,
+ y: null
+ };
+ }
+ function d3_geom_quadtreeVisit(f, node, x1, y1, x2, y2) {
+ if (!f(node, x1, y1, x2, y2)) {
+ var sx = (x1 + x2) * .5, sy = (y1 + y2) * .5, children = node.nodes;
+ if (children[0]) d3_geom_quadtreeVisit(f, children[0], x1, y1, sx, sy);
+ if (children[1]) d3_geom_quadtreeVisit(f, children[1], sx, y1, x2, sy);
+ if (children[2]) d3_geom_quadtreeVisit(f, children[2], x1, sy, sx, y2);
+ if (children[3]) d3_geom_quadtreeVisit(f, children[3], sx, sy, x2, y2);
+ }
+ }
+ function d3_geom_quadtreeFind(root, x, y, x0, y0, x3, y3) {
+ var minDistance2 = Infinity, closestPoint;
+ (function find(node, x1, y1, x2, y2) {
+ if (x1 > x3 || y1 > y3 || x2 < x0 || y2 < y0) return;
+ if (point = node.point) {
+ var point, dx = x - node.x, dy = y - node.y, distance2 = dx * dx + dy * dy;
+ if (distance2 < minDistance2) {
+ var distance = Math.sqrt(minDistance2 = distance2);
+ x0 = x - distance, y0 = y - distance;
+ x3 = x + distance, y3 = y + distance;
+ closestPoint = point;
+ }
+ }
+ var children = node.nodes, xm = (x1 + x2) * .5, ym = (y1 + y2) * .5, right = x >= xm, below = y >= ym;
+ for (var i = below << 1 | right, j = i + 4; i < j; ++i) {
+ if (node = children[i & 3]) switch (i & 3) {
+ case 0:
+ find(node, x1, y1, xm, ym);
+ break;
+
+ case 1:
+ find(node, xm, y1, x2, ym);
+ break;
+
+ case 2:
+ find(node, x1, ym, xm, y2);
+ break;
+
+ case 3:
+ find(node, xm, ym, x2, y2);
+ break;
+ }
+ }
+ })(root, x0, y0, x3, y3);
+ return closestPoint;
+ }
+ d3.interpolateRgb = d3_interpolateRgb;
+ function d3_interpolateRgb(a, b) {
+ a = d3.rgb(a);
+ b = d3.rgb(b);
+ var ar = a.r, ag = a.g, ab = a.b, br = b.r - ar, bg = b.g - ag, bb = b.b - ab;
+ return function(t) {
+ return "#" + d3_rgb_hex(Math.round(ar + br * t)) + d3_rgb_hex(Math.round(ag + bg * t)) + d3_rgb_hex(Math.round(ab + bb * t));
+ };
+ }
+ d3.interpolateObject = d3_interpolateObject;
+ function d3_interpolateObject(a, b) {
+ var i = {}, c = {}, k;
+ for (k in a) {
+ if (k in b) {
+ i[k] = d3_interpolate(a[k], b[k]);
+ } else {
+ c[k] = a[k];
+ }
+ }
+ for (k in b) {
+ if (!(k in a)) {
+ c[k] = b[k];
+ }
+ }
+ return function(t) {
+ for (k in i) c[k] = i[k](t);
+ return c;
+ };
+ }
+ d3.interpolateNumber = d3_interpolateNumber;
+ function d3_interpolateNumber(a, b) {
+ a = +a, b = +b;
+ return function(t) {
+ return a * (1 - t) + b * t;
+ };
+ }
+ d3.interpolateString = d3_interpolateString;
+ function d3_interpolateString(a, b) {
+ var bi = d3_interpolate_numberA.lastIndex = d3_interpolate_numberB.lastIndex = 0, am, bm, bs, i = -1, s = [], q = [];
+ a = a + "", b = b + "";
+ while ((am = d3_interpolate_numberA.exec(a)) && (bm = d3_interpolate_numberB.exec(b))) {
+ if ((bs = bm.index) > bi) {
+ bs = b.slice(bi, bs);
+ if (s[i]) s[i] += bs; else s[++i] = bs;
+ }
+ if ((am = am[0]) === (bm = bm[0])) {
+ if (s[i]) s[i] += bm; else s[++i] = bm;
+ } else {
+ s[++i] = null;
+ q.push({
+ i: i,
+ x: d3_interpolateNumber(am, bm)
+ });
+ }
+ bi = d3_interpolate_numberB.lastIndex;
+ }
+ if (bi < b.length) {
+ bs = b.slice(bi);
+ if (s[i]) s[i] += bs; else s[++i] = bs;
+ }
+ return s.length < 2 ? q[0] ? (b = q[0].x, function(t) {
+ return b(t) + "";
+ }) : function() {
+ return b;
+ } : (b = q.length, function(t) {
+ for (var i = 0, o; i < b; ++i) s[(o = q[i]).i] = o.x(t);
+ return s.join("");
+ });
+ }
+ var d3_interpolate_numberA = /[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g, d3_interpolate_numberB = new RegExp(d3_interpolate_numberA.source, "g");
+ d3.interpolate = d3_interpolate;
+ function d3_interpolate(a, b) {
+ var i = d3.interpolators.length, f;
+ while (--i >= 0 && !(f = d3.interpolators[i](a, b))) ;
+ return f;
+ }
+ d3.interpolators = [ function(a, b) {
+ var t = typeof b;
+ return (t === "string" ? d3_rgb_names.has(b.toLowerCase()) || /^(#|rgb\(|hsl\()/i.test(b) ? d3_interpolateRgb : d3_interpolateString : b instanceof d3_color ? d3_interpolateRgb : Array.isArray(b) ? d3_interpolateArray : t === "object" && isNaN(b) ? d3_interpolateObject : d3_interpolateNumber)(a, b);
+ } ];
+ d3.interpolateArray = d3_interpolateArray;
+ function d3_interpolateArray(a, b) {
+ var x = [], c = [], na = a.length, nb = b.length, n0 = Math.min(a.length, b.length), i;
+ for (i = 0; i < n0; ++i) x.push(d3_interpolate(a[i], b[i]));
+ for (;i < na; ++i) c[i] = a[i];
+ for (;i < nb; ++i) c[i] = b[i];
+ return function(t) {
+ for (i = 0; i < n0; ++i) c[i] = x[i](t);
+ return c;
+ };
+ }
+ var d3_ease_default = function() {
+ return d3_identity;
+ };
+ var d3_ease = d3.map({
+ linear: d3_ease_default,
+ poly: d3_ease_poly,
+ quad: function() {
+ return d3_ease_quad;
+ },
+ cubic: function() {
+ return d3_ease_cubic;
+ },
+ sin: function() {
+ return d3_ease_sin;
+ },
+ exp: function() {
+ return d3_ease_exp;
+ },
+ circle: function() {
+ return d3_ease_circle;
+ },
+ elastic: d3_ease_elastic,
+ back: d3_ease_back,
+ bounce: function() {
+ return d3_ease_bounce;
+ }
+ });
+ var d3_ease_mode = d3.map({
+ "in": d3_identity,
+ out: d3_ease_reverse,
+ "in-out": d3_ease_reflect,
+ "out-in": function(f) {
+ return d3_ease_reflect(d3_ease_reverse(f));
+ }
+ });
+ d3.ease = function(name) {
+ var i = name.indexOf("-"), t = i >= 0 ? name.slice(0, i) : name, m = i >= 0 ? name.slice(i + 1) : "in";
+ t = d3_ease.get(t) || d3_ease_default;
+ m = d3_ease_mode.get(m) || d3_identity;
+ return d3_ease_clamp(m(t.apply(null, d3_arraySlice.call(arguments, 1))));
+ };
+ function d3_ease_clamp(f) {
+ return function(t) {
+ return t <= 0 ? 0 : t >= 1 ? 1 : f(t);
+ };
+ }
+ function d3_ease_reverse(f) {
+ return function(t) {
+ return 1 - f(1 - t);
+ };
+ }
+ function d3_ease_reflect(f) {
+ return function(t) {
+ return .5 * (t < .5 ? f(2 * t) : 2 - f(2 - 2 * t));
+ };
+ }
+ function d3_ease_quad(t) {
+ return t * t;
+ }
+ function d3_ease_cubic(t) {
+ return t * t * t;
+ }
+ function d3_ease_cubicInOut(t) {
+ if (t <= 0) return 0;
+ if (t >= 1) return 1;
+ var t2 = t * t, t3 = t2 * t;
+ return 4 * (t < .5 ? t3 : 3 * (t - t2) + t3 - .75);
+ }
+ function d3_ease_poly(e) {
+ return function(t) {
+ return Math.pow(t, e);
+ };
+ }
+ function d3_ease_sin(t) {
+ return 1 - Math.cos(t * halfπ);
+ }
+ function d3_ease_exp(t) {
+ return Math.pow(2, 10 * (t - 1));
+ }
+ function d3_ease_circle(t) {
+ return 1 - Math.sqrt(1 - t * t);
+ }
+ function d3_ease_elastic(a, p) {
+ var s;
+ if (arguments.length < 2) p = .45;
+ if (arguments.length) s = p / τ * Math.asin(1 / a); else a = 1, s = p / 4;
+ return function(t) {
+ return 1 + a * Math.pow(2, -10 * t) * Math.sin((t - s) * τ / p);
+ };
+ }
+ function d3_ease_back(s) {
+ if (!s) s = 1.70158;
+ return function(t) {
+ return t * t * ((s + 1) * t - s);
+ };
+ }
+ function d3_ease_bounce(t) {
+ return t < 1 / 2.75 ? 7.5625 * t * t : t < 2 / 2.75 ? 7.5625 * (t -= 1.5 / 2.75) * t + .75 : t < 2.5 / 2.75 ? 7.5625 * (t -= 2.25 / 2.75) * t + .9375 : 7.5625 * (t -= 2.625 / 2.75) * t + .984375;
+ }
+ d3.interpolateHcl = d3_interpolateHcl;
+ function d3_interpolateHcl(a, b) {
+ a = d3.hcl(a);
+ b = d3.hcl(b);
+ var ah = a.h, ac = a.c, al = a.l, bh = b.h - ah, bc = b.c - ac, bl = b.l - al;
+ if (isNaN(bc)) bc = 0, ac = isNaN(ac) ? b.c : ac;
+ if (isNaN(bh)) bh = 0, ah = isNaN(ah) ? b.h : ah; else if (bh > 180) bh -= 360; else if (bh < -180) bh += 360;
+ return function(t) {
+ return d3_hcl_lab(ah + bh * t, ac + bc * t, al + bl * t) + "";
+ };
+ }
+ d3.interpolateHsl = d3_interpolateHsl;
+ function d3_interpolateHsl(a, b) {
+ a = d3.hsl(a);
+ b = d3.hsl(b);
+ var ah = a.h, as = a.s, al = a.l, bh = b.h - ah, bs = b.s - as, bl = b.l - al;
+ if (isNaN(bs)) bs = 0, as = isNaN(as) ? b.s : as;
+ if (isNaN(bh)) bh = 0, ah = isNaN(ah) ? b.h : ah; else if (bh > 180) bh -= 360; else if (bh < -180) bh += 360;
+ return function(t) {
+ return d3_hsl_rgb(ah + bh * t, as + bs * t, al + bl * t) + "";
+ };
+ }
+ d3.interpolateLab = d3_interpolateLab;
+ function d3_interpolateLab(a, b) {
+ a = d3.lab(a);
+ b = d3.lab(b);
+ var al = a.l, aa = a.a, ab = a.b, bl = b.l - al, ba = b.a - aa, bb = b.b - ab;
+ return function(t) {
+ return d3_lab_rgb(al + bl * t, aa + ba * t, ab + bb * t) + "";
+ };
+ }
+ d3.interpolateRound = d3_interpolateRound;
+ function d3_interpolateRound(a, b) {
+ b -= a;
+ return function(t) {
+ return Math.round(a + b * t);
+ };
+ }
+ d3.transform = function(string) {
+ var g = d3_document.createElementNS(d3.ns.prefix.svg, "g");
+ return (d3.transform = function(string) {
+ if (string != null) {
+ g.setAttribute("transform", string);
+ var t = g.transform.baseVal.consolidate();
+ }
+ return new d3_transform(t ? t.matrix : d3_transformIdentity);
+ })(string);
+ };
+ function d3_transform(m) {
+ var r0 = [ m.a, m.b ], r1 = [ m.c, m.d ], kx = d3_transformNormalize(r0), kz = d3_transformDot(r0, r1), ky = d3_transformNormalize(d3_transformCombine(r1, r0, -kz)) || 0;
+ if (r0[0] * r1[1] < r1[0] * r0[1]) {
+ r0[0] *= -1;
+ r0[1] *= -1;
+ kx *= -1;
+ kz *= -1;
+ }
+ this.rotate = (kx ? Math.atan2(r0[1], r0[0]) : Math.atan2(-r1[0], r1[1])) * d3_degrees;
+ this.translate = [ m.e, m.f ];
+ this.scale = [ kx, ky ];
+ this.skew = ky ? Math.atan2(kz, ky) * d3_degrees : 0;
+ }
+ d3_transform.prototype.toString = function() {
+ return "translate(" + this.translate + ")rotate(" + this.rotate + ")skewX(" + this.skew + ")scale(" + this.scale + ")";
+ };
+ function d3_transformDot(a, b) {
+ return a[0] * b[0] + a[1] * b[1];
+ }
+ function d3_transformNormalize(a) {
+ var k = Math.sqrt(d3_transformDot(a, a));
+ if (k) {
+ a[0] /= k;
+ a[1] /= k;
+ }
+ return k;
+ }
+ function d3_transformCombine(a, b, k) {
+ a[0] += k * b[0];
+ a[1] += k * b[1];
+ return a;
+ }
+ var d3_transformIdentity = {
+ a: 1,
+ b: 0,
+ c: 0,
+ d: 1,
+ e: 0,
+ f: 0
+ };
+ d3.interpolateTransform = d3_interpolateTransform;
+ function d3_interpolateTransformPop(s) {
+ return s.length ? s.pop() + "," : "";
+ }
+ function d3_interpolateTranslate(ta, tb, s, q) {
+ if (ta[0] !== tb[0] || ta[1] !== tb[1]) {
+ var i = s.push("translate(", null, ",", null, ")");
+ q.push({
+ i: i - 4,
+ x: d3_interpolateNumber(ta[0], tb[0])
+ }, {
+ i: i - 2,
+ x: d3_interpolateNumber(ta[1], tb[1])
+ });
+ } else if (tb[0] || tb[1]) {
+ s.push("translate(" + tb + ")");
+ }
+ }
+ function d3_interpolateRotate(ra, rb, s, q) {
+ if (ra !== rb) {
+ if (ra - rb > 180) rb += 360; else if (rb - ra > 180) ra += 360;
+ q.push({
+ i: s.push(d3_interpolateTransformPop(s) + "rotate(", null, ")") - 2,
+ x: d3_interpolateNumber(ra, rb)
+ });
+ } else if (rb) {
+ s.push(d3_interpolateTransformPop(s) + "rotate(" + rb + ")");
+ }
+ }
+ function d3_interpolateSkew(wa, wb, s, q) {
+ if (wa !== wb) {
+ q.push({
+ i: s.push(d3_interpolateTransformPop(s) + "skewX(", null, ")") - 2,
+ x: d3_interpolateNumber(wa, wb)
+ });
+ } else if (wb) {
+ s.push(d3_interpolateTransformPop(s) + "skewX(" + wb + ")");
+ }
+ }
+ function d3_interpolateScale(ka, kb, s, q) {
+ if (ka[0] !== kb[0] || ka[1] !== kb[1]) {
+ var i = s.push(d3_interpolateTransformPop(s) + "scale(", null, ",", null, ")");
+ q.push({
+ i: i - 4,
+ x: d3_interpolateNumber(ka[0], kb[0])
+ }, {
+ i: i - 2,
+ x: d3_interpolateNumber(ka[1], kb[1])
+ });
+ } else if (kb[0] !== 1 || kb[1] !== 1) {
+ s.push(d3_interpolateTransformPop(s) + "scale(" + kb + ")");
+ }
+ }
+ function d3_interpolateTransform(a, b) {
+ var s = [], q = [];
+ a = d3.transform(a), b = d3.transform(b);
+ d3_interpolateTranslate(a.translate, b.translate, s, q);
+ d3_interpolateRotate(a.rotate, b.rotate, s, q);
+ d3_interpolateSkew(a.skew, b.skew, s, q);
+ d3_interpolateScale(a.scale, b.scale, s, q);
+ a = b = null;
+ return function(t) {
+ var i = -1, n = q.length, o;
+ while (++i < n) s[(o = q[i]).i] = o.x(t);
+ return s.join("");
+ };
+ }
+ function d3_uninterpolateNumber(a, b) {
+ b = (b -= a = +a) || 1 / b;
+ return function(x) {
+ return (x - a) / b;
+ };
+ }
+ function d3_uninterpolateClamp(a, b) {
+ b = (b -= a = +a) || 1 / b;
+ return function(x) {
+ return Math.max(0, Math.min(1, (x - a) / b));
+ };
+ }
+ d3.layout = {};
+ d3.layout.bundle = function() {
+ return function(links) {
+ var paths = [], i = -1, n = links.length;
+ while (++i < n) paths.push(d3_layout_bundlePath(links[i]));
+ return paths;
+ };
+ };
+ function d3_layout_bundlePath(link) {
+ var start = link.source, end = link.target, lca = d3_layout_bundleLeastCommonAncestor(start, end), points = [ start ];
+ while (start !== lca) {
+ start = start.parent;
+ points.push(start);
+ }
+ var k = points.length;
+ while (end !== lca) {
+ points.splice(k, 0, end);
+ end = end.parent;
+ }
+ return points;
+ }
+ function d3_layout_bundleAncestors(node) {
+ var ancestors = [], parent = node.parent;
+ while (parent != null) {
+ ancestors.push(node);
+ node = parent;
+ parent = parent.parent;
+ }
+ ancestors.push(node);
+ return ancestors;
+ }
+ function d3_layout_bundleLeastCommonAncestor(a, b) {
+ if (a === b) return a;
+ var aNodes = d3_layout_bundleAncestors(a), bNodes = d3_layout_bundleAncestors(b), aNode = aNodes.pop(), bNode = bNodes.pop(), sharedNode = null;
+ while (aNode === bNode) {
+ sharedNode = aNode;
+ aNode = aNodes.pop();
+ bNode = bNodes.pop();
+ }
+ return sharedNode;
+ }
+ d3.layout.chord = function() {
+ var chord = {}, chords, groups, matrix, n, padding = 0, sortGroups, sortSubgroups, sortChords;
+ function relayout() {
+ var subgroups = {}, groupSums = [], groupIndex = d3.range(n), subgroupIndex = [], k, x, x0, i, j;
+ chords = [];
+ groups = [];
+ k = 0, i = -1;
+ while (++i < n) {
+ x = 0, j = -1;
+ while (++j < n) {
+ x += matrix[i][j];
+ }
+ groupSums.push(x);
+ subgroupIndex.push(d3.range(n));
+ k += x;
+ }
+ if (sortGroups) {
+ groupIndex.sort(function(a, b) {
+ return sortGroups(groupSums[a], groupSums[b]);
+ });
+ }
+ if (sortSubgroups) {
+ subgroupIndex.forEach(function(d, i) {
+ d.sort(function(a, b) {
+ return sortSubgroups(matrix[i][a], matrix[i][b]);
+ });
+ });
+ }
+ k = (τ - padding * n) / k;
+ x = 0, i = -1;
+ while (++i < n) {
+ x0 = x, j = -1;
+ while (++j < n) {
+ var di = groupIndex[i], dj = subgroupIndex[di][j], v = matrix[di][dj], a0 = x, a1 = x += v * k;
+ subgroups[di + "-" + dj] = {
+ index: di,
+ subindex: dj,
+ startAngle: a0,
+ endAngle: a1,
+ value: v
+ };
+ }
+ groups[di] = {
+ index: di,
+ startAngle: x0,
+ endAngle: x,
+ value: groupSums[di]
+ };
+ x += padding;
+ }
+ i = -1;
+ while (++i < n) {
+ j = i - 1;
+ while (++j < n) {
+ var source = subgroups[i + "-" + j], target = subgroups[j + "-" + i];
+ if (source.value || target.value) {
+ chords.push(source.value < target.value ? {
+ source: target,
+ target: source
+ } : {
+ source: source,
+ target: target
+ });
+ }
+ }
+ }
+ if (sortChords) resort();
+ }
+ function resort() {
+ chords.sort(function(a, b) {
+ return sortChords((a.source.value + a.target.value) / 2, (b.source.value + b.target.value) / 2);
+ });
+ }
+ chord.matrix = function(x) {
+ if (!arguments.length) return matrix;
+ n = (matrix = x) && matrix.length;
+ chords = groups = null;
+ return chord;
+ };
+ chord.padding = function(x) {
+ if (!arguments.length) return padding;
+ padding = x;
+ chords = groups = null;
+ return chord;
+ };
+ chord.sortGroups = function(x) {
+ if (!arguments.length) return sortGroups;
+ sortGroups = x;
+ chords = groups = null;
+ return chord;
+ };
+ chord.sortSubgroups = function(x) {
+ if (!arguments.length) return sortSubgroups;
+ sortSubgroups = x;
+ chords = null;
+ return chord;
+ };
+ chord.sortChords = function(x) {
+ if (!arguments.length) return sortChords;
+ sortChords = x;
+ if (chords) resort();
+ return chord;
+ };
+ chord.chords = function() {
+ if (!chords) relayout();
+ return chords;
+ };
+ chord.groups = function() {
+ if (!groups) relayout();
+ return groups;
+ };
+ return chord;
+ };
+ d3.layout.force = function() {
+ var force = {}, event = d3.dispatch("start", "tick", "end"), timer, size = [ 1, 1 ], drag, alpha, friction = .9, linkDistance = d3_layout_forceLinkDistance, linkStrength = d3_layout_forceLinkStrength, charge = -30, chargeDistance2 = d3_layout_forceChargeDistance2, gravity = .1, theta2 = .64, nodes = [], links = [], distances, strengths, charges;
+ function repulse(node) {
+ return function(quad, x1, _, x2) {
+ if (quad.point !== node) {
+ var dx = quad.cx - node.x, dy = quad.cy - node.y, dw = x2 - x1, dn = dx * dx + dy * dy;
+ if (dw * dw / theta2 < dn) {
+ if (dn < chargeDistance2) {
+ var k = quad.charge / dn;
+ node.px -= dx * k;
+ node.py -= dy * k;
+ }
+ return true;
+ }
+ if (quad.point && dn && dn < chargeDistance2) {
+ var k = quad.pointCharge / dn;
+ node.px -= dx * k;
+ node.py -= dy * k;
+ }
+ }
+ return !quad.charge;
+ };
+ }
+ force.tick = function() {
+ if ((alpha *= .99) < .005) {
+ timer = null;
+ event.end({
+ type: "end",
+ alpha: alpha = 0
+ });
+ return true;
+ }
+ var n = nodes.length, m = links.length, q, i, o, s, t, l, k, x, y;
+ for (i = 0; i < m; ++i) {
+ o = links[i];
+ s = o.source;
+ t = o.target;
+ x = t.x - s.x;
+ y = t.y - s.y;
+ if (l = x * x + y * y) {
+ l = alpha * strengths[i] * ((l = Math.sqrt(l)) - distances[i]) / l;
+ x *= l;
+ y *= l;
+ t.x -= x * (k = s.weight + t.weight ? s.weight / (s.weight + t.weight) : .5);
+ t.y -= y * k;
+ s.x += x * (k = 1 - k);
+ s.y += y * k;
+ }
+ }
+ if (k = alpha * gravity) {
+ x = size[0] / 2;
+ y = size[1] / 2;
+ i = -1;
+ if (k) while (++i < n) {
+ o = nodes[i];
+ o.x += (x - o.x) * k;
+ o.y += (y - o.y) * k;
+ }
+ }
+ if (charge) {
+ d3_layout_forceAccumulate(q = d3.geom.quadtree(nodes), alpha, charges);
+ i = -1;
+ while (++i < n) {
+ if (!(o = nodes[i]).fixed) {
+ q.visit(repulse(o));
+ }
+ }
+ }
+ i = -1;
+ while (++i < n) {
+ o = nodes[i];
+ if (o.fixed) {
+ o.x = o.px;
+ o.y = o.py;
+ } else {
+ o.x -= (o.px - (o.px = o.x)) * friction;
+ o.y -= (o.py - (o.py = o.y)) * friction;
+ }
+ }
+ event.tick({
+ type: "tick",
+ alpha: alpha
+ });
+ };
+ force.nodes = function(x) {
+ if (!arguments.length) return nodes;
+ nodes = x;
+ return force;
+ };
+ force.links = function(x) {
+ if (!arguments.length) return links;
+ links = x;
+ return force;
+ };
+ force.size = function(x) {
+ if (!arguments.length) return size;
+ size = x;
+ return force;
+ };
+ force.linkDistance = function(x) {
+ if (!arguments.length) return linkDistance;
+ linkDistance = typeof x === "function" ? x : +x;
+ return force;
+ };
+ force.distance = force.linkDistance;
+ force.linkStrength = function(x) {
+ if (!arguments.length) return linkStrength;
+ linkStrength = typeof x === "function" ? x : +x;
+ return force;
+ };
+ force.friction = function(x) {
+ if (!arguments.length) return friction;
+ friction = +x;
+ return force;
+ };
+ force.charge = function(x) {
+ if (!arguments.length) return charge;
+ charge = typeof x === "function" ? x : +x;
+ return force;
+ };
+ force.chargeDistance = function(x) {
+ if (!arguments.length) return Math.sqrt(chargeDistance2);
+ chargeDistance2 = x * x;
+ return force;
+ };
+ force.gravity = function(x) {
+ if (!arguments.length) return gravity;
+ gravity = +x;
+ return force;
+ };
+ force.theta = function(x) {
+ if (!arguments.length) return Math.sqrt(theta2);
+ theta2 = x * x;
+ return force;
+ };
+ force.alpha = function(x) {
+ if (!arguments.length) return alpha;
+ x = +x;
+ if (alpha) {
+ if (x > 0) {
+ alpha = x;
+ } else {
+ timer.c = null, timer.t = NaN, timer = null;
+ event.end({
+ type: "end",
+ alpha: alpha = 0
+ });
+ }
+ } else if (x > 0) {
+ event.start({
+ type: "start",
+ alpha: alpha = x
+ });
+ timer = d3_timer(force.tick);
+ }
+ return force;
+ };
+ force.start = function() {
+ var i, n = nodes.length, m = links.length, w = size[0], h = size[1], neighbors, o;
+ for (i = 0; i < n; ++i) {
+ (o = nodes[i]).index = i;
+ o.weight = 0;
+ }
+ for (i = 0; i < m; ++i) {
+ o = links[i];
+ if (typeof o.source == "number") o.source = nodes[o.source];
+ if (typeof o.target == "number") o.target = nodes[o.target];
+ ++o.source.weight;
+ ++o.target.weight;
+ }
+ for (i = 0; i < n; ++i) {
+ o = nodes[i];
+ if (isNaN(o.x)) o.x = position("x", w);
+ if (isNaN(o.y)) o.y = position("y", h);
+ if (isNaN(o.px)) o.px = o.x;
+ if (isNaN(o.py)) o.py = o.y;
+ }
+ distances = [];
+ if (typeof linkDistance === "function") for (i = 0; i < m; ++i) distances[i] = +linkDistance.call(this, links[i], i); else for (i = 0; i < m; ++i) distances[i] = linkDistance;
+ strengths = [];
+ if (typeof linkStrength === "function") for (i = 0; i < m; ++i) strengths[i] = +linkStrength.call(this, links[i], i); else for (i = 0; i < m; ++i) strengths[i] = linkStrength;
+ charges = [];
+ if (typeof charge === "function") for (i = 0; i < n; ++i) charges[i] = +charge.call(this, nodes[i], i); else for (i = 0; i < n; ++i) charges[i] = charge;
+ function position(dimension, size) {
+ if (!neighbors) {
+ neighbors = new Array(n);
+ for (j = 0; j < n; ++j) {
+ neighbors[j] = [];
+ }
+ for (j = 0; j < m; ++j) {
+ var o = links[j];
+ neighbors[o.source.index].push(o.target);
+ neighbors[o.target.index].push(o.source);
+ }
+ }
+ var candidates = neighbors[i], j = -1, l = candidates.length, x;
+ while (++j < l) if (!isNaN(x = candidates[j][dimension])) return x;
+ return Math.random() * size;
+ }
+ return force.resume();
+ };
+ force.resume = function() {
+ return force.alpha(.1);
+ };
+ force.stop = function() {
+ return force.alpha(0);
+ };
+ force.drag = function() {
+ if (!drag) drag = d3.behavior.drag().origin(d3_identity).on("dragstart.force", d3_layout_forceDragstart).on("drag.force", dragmove).on("dragend.force", d3_layout_forceDragend);
+ if (!arguments.length) return drag;
+ this.on("mouseover.force", d3_layout_forceMouseover).on("mouseout.force", d3_layout_forceMouseout).call(drag);
+ };
+ function dragmove(d) {
+ d.px = d3.event.x, d.py = d3.event.y;
+ force.resume();
+ }
+ return d3.rebind(force, event, "on");
+ };
+ function d3_layout_forceDragstart(d) {
+ d.fixed |= 2;
+ }
+ function d3_layout_forceDragend(d) {
+ d.fixed &= ~6;
+ }
+ function d3_layout_forceMouseover(d) {
+ d.fixed |= 4;
+ d.px = d.x, d.py = d.y;
+ }
+ function d3_layout_forceMouseout(d) {
+ d.fixed &= ~4;
+ }
+ function d3_layout_forceAccumulate(quad, alpha, charges) {
+ var cx = 0, cy = 0;
+ quad.charge = 0;
+ if (!quad.leaf) {
+ var nodes = quad.nodes, n = nodes.length, i = -1, c;
+ while (++i < n) {
+ c = nodes[i];
+ if (c == null) continue;
+ d3_layout_forceAccumulate(c, alpha, charges);
+ quad.charge += c.charge;
+ cx += c.charge * c.cx;
+ cy += c.charge * c.cy;
+ }
+ }
+ if (quad.point) {
+ if (!quad.leaf) {
+ quad.point.x += Math.random() - .5;
+ quad.point.y += Math.random() - .5;
+ }
+ var k = alpha * charges[quad.point.index];
+ quad.charge += quad.pointCharge = k;
+ cx += k * quad.point.x;
+ cy += k * quad.point.y;
+ }
+ quad.cx = cx / quad.charge;
+ quad.cy = cy / quad.charge;
+ }
+ var d3_layout_forceLinkDistance = 20, d3_layout_forceLinkStrength = 1, d3_layout_forceChargeDistance2 = Infinity;
+ d3.layout.hierarchy = function() {
+ var sort = d3_layout_hierarchySort, children = d3_layout_hierarchyChildren, value = d3_layout_hierarchyValue;
+ function hierarchy(root) {
+ var stack = [ root ], nodes = [], node;
+ root.depth = 0;
+ while ((node = stack.pop()) != null) {
+ nodes.push(node);
+ if ((childs = children.call(hierarchy, node, node.depth)) && (n = childs.length)) {
+ var n, childs, child;
+ while (--n >= 0) {
+ stack.push(child = childs[n]);
+ child.parent = node;
+ child.depth = node.depth + 1;
+ }
+ if (value) node.value = 0;
+ node.children = childs;
+ } else {
+ if (value) node.value = +value.call(hierarchy, node, node.depth) || 0;
+ delete node.children;
+ }
+ }
+ d3_layout_hierarchyVisitAfter(root, function(node) {
+ var childs, parent;
+ if (sort && (childs = node.children)) childs.sort(sort);
+ if (value && (parent = node.parent)) parent.value += node.value;
+ });
+ return nodes;
+ }
+ hierarchy.sort = function(x) {
+ if (!arguments.length) return sort;
+ sort = x;
+ return hierarchy;
+ };
+ hierarchy.children = function(x) {
+ if (!arguments.length) return children;
+ children = x;
+ return hierarchy;
+ };
+ hierarchy.value = function(x) {
+ if (!arguments.length) return value;
+ value = x;
+ return hierarchy;
+ };
+ hierarchy.revalue = function(root) {
+ if (value) {
+ d3_layout_hierarchyVisitBefore(root, function(node) {
+ if (node.children) node.value = 0;
+ });
+ d3_layout_hierarchyVisitAfter(root, function(node) {
+ var parent;
+ if (!node.children) node.value = +value.call(hierarchy, node, node.depth) || 0;
+ if (parent = node.parent) parent.value += node.value;
+ });
+ }
+ return root;
+ };
+ return hierarchy;
+ };
+ function d3_layout_hierarchyRebind(object, hierarchy) {
+ d3.rebind(object, hierarchy, "sort", "children", "value");
+ object.nodes = object;
+ object.links = d3_layout_hierarchyLinks;
+ return object;
+ }
+ function d3_layout_hierarchyVisitBefore(node, callback) {
+ var nodes = [ node ];
+ while ((node = nodes.pop()) != null) {
+ callback(node);
+ if ((children = node.children) && (n = children.length)) {
+ var n, children;
+ while (--n >= 0) nodes.push(children[n]);
+ }
+ }
+ }
+ function d3_layout_hierarchyVisitAfter(node, callback) {
+ var nodes = [ node ], nodes2 = [];
+ while ((node = nodes.pop()) != null) {
+ nodes2.push(node);
+ if ((children = node.children) && (n = children.length)) {
+ var i = -1, n, children;
+ while (++i < n) nodes.push(children[i]);
+ }
+ }
+ while ((node = nodes2.pop()) != null) {
+ callback(node);
+ }
+ }
+ function d3_layout_hierarchyChildren(d) {
+ return d.children;
+ }
+ function d3_layout_hierarchyValue(d) {
+ return d.value;
+ }
+ function d3_layout_hierarchySort(a, b) {
+ return b.value - a.value;
+ }
+ function d3_layout_hierarchyLinks(nodes) {
+ return d3.merge(nodes.map(function(parent) {
+ return (parent.children || []).map(function(child) {
+ return {
+ source: parent,
+ target: child
+ };
+ });
+ }));
+ }
+ d3.layout.partition = function() {
+ var hierarchy = d3.layout.hierarchy(), size = [ 1, 1 ];
+ function position(node, x, dx, dy) {
+ var children = node.children;
+ node.x = x;
+ node.y = node.depth * dy;
+ node.dx = dx;
+ node.dy = dy;
+ if (children && (n = children.length)) {
+ var i = -1, n, c, d;
+ dx = node.value ? dx / node.value : 0;
+ while (++i < n) {
+ position(c = children[i], x, d = c.value * dx, dy);
+ x += d;
+ }
+ }
+ }
+ function depth(node) {
+ var children = node.children, d = 0;
+ if (children && (n = children.length)) {
+ var i = -1, n;
+ while (++i < n) d = Math.max(d, depth(children[i]));
+ }
+ return 1 + d;
+ }
+ function partition(d, i) {
+ var nodes = hierarchy.call(this, d, i);
+ position(nodes[0], 0, size[0], size[1] / depth(nodes[0]));
+ return nodes;
+ }
+ partition.size = function(x) {
+ if (!arguments.length) return size;
+ size = x;
+ return partition;
+ };
+ return d3_layout_hierarchyRebind(partition, hierarchy);
+ };
+ d3.layout.pie = function() {
+ var value = Number, sort = d3_layout_pieSortByValue, startAngle = 0, endAngle = τ, padAngle = 0;
+ function pie(data) {
+ var n = data.length, values = data.map(function(d, i) {
+ return +value.call(pie, d, i);
+ }), a = +(typeof startAngle === "function" ? startAngle.apply(this, arguments) : startAngle), da = (typeof endAngle === "function" ? endAngle.apply(this, arguments) : endAngle) - a, p = Math.min(Math.abs(da) / n, +(typeof padAngle === "function" ? padAngle.apply(this, arguments) : padAngle)), pa = p * (da < 0 ? -1 : 1), sum = d3.sum(values), k = sum ? (da - n * pa) / sum : 0, index = d3.range(n), arcs = [], v;
+ if (sort != null) index.sort(sort === d3_layout_pieSortByValue ? function(i, j) {
+ return values[j] - values[i];
+ } : function(i, j) {
+ return sort(data[i], data[j]);
+ });
+ index.forEach(function(i) {
+ arcs[i] = {
+ data: data[i],
+ value: v = values[i],
+ startAngle: a,
+ endAngle: a += v * k + pa,
+ padAngle: p
+ };
+ });
+ return arcs;
+ }
+ pie.value = function(_) {
+ if (!arguments.length) return value;
+ value = _;
+ return pie;
+ };
+ pie.sort = function(_) {
+ if (!arguments.length) return sort;
+ sort = _;
+ return pie;
+ };
+ pie.startAngle = function(_) {
+ if (!arguments.length) return startAngle;
+ startAngle = _;
+ return pie;
+ };
+ pie.endAngle = function(_) {
+ if (!arguments.length) return endAngle;
+ endAngle = _;
+ return pie;
+ };
+ pie.padAngle = function(_) {
+ if (!arguments.length) return padAngle;
+ padAngle = _;
+ return pie;
+ };
+ return pie;
+ };
+ var d3_layout_pieSortByValue = {};
+ d3.layout.stack = function() {
+ var values = d3_identity, order = d3_layout_stackOrderDefault, offset = d3_layout_stackOffsetZero, out = d3_layout_stackOut, x = d3_layout_stackX, y = d3_layout_stackY;
+ function stack(data, index) {
+ if (!(n = data.length)) return data;
+ var series = data.map(function(d, i) {
+ return values.call(stack, d, i);
+ });
+ var points = series.map(function(d) {
+ return d.map(function(v, i) {
+ return [ x.call(stack, v, i), y.call(stack, v, i) ];
+ });
+ });
+ var orders = order.call(stack, points, index);
+ series = d3.permute(series, orders);
+ points = d3.permute(points, orders);
+ var offsets = offset.call(stack, points, index);
+ var m = series[0].length, n, i, j, o;
+ for (j = 0; j < m; ++j) {
+ out.call(stack, series[0][j], o = offsets[j], points[0][j][1]);
+ for (i = 1; i < n; ++i) {
+ out.call(stack, series[i][j], o += points[i - 1][j][1], points[i][j][1]);
+ }
+ }
+ return data;
+ }
+ stack.values = function(x) {
+ if (!arguments.length) return values;
+ values = x;
+ return stack;
+ };
+ stack.order = function(x) {
+ if (!arguments.length) return order;
+ order = typeof x === "function" ? x : d3_layout_stackOrders.get(x) || d3_layout_stackOrderDefault;
+ return stack;
+ };
+ stack.offset = function(x) {
+ if (!arguments.length) return offset;
+ offset = typeof x === "function" ? x : d3_layout_stackOffsets.get(x) || d3_layout_stackOffsetZero;
+ return stack;
+ };
+ stack.x = function(z) {
+ if (!arguments.length) return x;
+ x = z;
+ return stack;
+ };
+ stack.y = function(z) {
+ if (!arguments.length) return y;
+ y = z;
+ return stack;
+ };
+ stack.out = function(z) {
+ if (!arguments.length) return out;
+ out = z;
+ return stack;
+ };
+ return stack;
+ };
+ function d3_layout_stackX(d) {
+ return d.x;
+ }
+ function d3_layout_stackY(d) {
+ return d.y;
+ }
+ function d3_layout_stackOut(d, y0, y) {
+ d.y0 = y0;
+ d.y = y;
+ }
+ var d3_layout_stackOrders = d3.map({
+ "inside-out": function(data) {
+ var n = data.length, i, j, max = data.map(d3_layout_stackMaxIndex), sums = data.map(d3_layout_stackReduceSum), index = d3.range(n).sort(function(a, b) {
+ return max[a] - max[b];
+ }), top = 0, bottom = 0, tops = [], bottoms = [];
+ for (i = 0; i < n; ++i) {
+ j = index[i];
+ if (top < bottom) {
+ top += sums[j];
+ tops.push(j);
+ } else {
+ bottom += sums[j];
+ bottoms.push(j);
+ }
+ }
+ return bottoms.reverse().concat(tops);
+ },
+ reverse: function(data) {
+ return d3.range(data.length).reverse();
+ },
+ "default": d3_layout_stackOrderDefault
+ });
+ var d3_layout_stackOffsets = d3.map({
+ silhouette: function(data) {
+ var n = data.length, m = data[0].length, sums = [], max = 0, i, j, o, y0 = [];
+ for (j = 0; j < m; ++j) {
+ for (i = 0, o = 0; i < n; i++) o += data[i][j][1];
+ if (o > max) max = o;
+ sums.push(o);
+ }
+ for (j = 0; j < m; ++j) {
+ y0[j] = (max - sums[j]) / 2;
+ }
+ return y0;
+ },
+ wiggle: function(data) {
+ var n = data.length, x = data[0], m = x.length, i, j, k, s1, s2, s3, dx, o, o0, y0 = [];
+ y0[0] = o = o0 = 0;
+ for (j = 1; j < m; ++j) {
+ for (i = 0, s1 = 0; i < n; ++i) s1 += data[i][j][1];
+ for (i = 0, s2 = 0, dx = x[j][0] - x[j - 1][0]; i < n; ++i) {
+ for (k = 0, s3 = (data[i][j][1] - data[i][j - 1][1]) / (2 * dx); k < i; ++k) {
+ s3 += (data[k][j][1] - data[k][j - 1][1]) / dx;
+ }
+ s2 += s3 * data[i][j][1];
+ }
+ y0[j] = o -= s1 ? s2 / s1 * dx : 0;
+ if (o < o0) o0 = o;
+ }
+ for (j = 0; j < m; ++j) y0[j] -= o0;
+ return y0;
+ },
+ expand: function(data) {
+ var n = data.length, m = data[0].length, k = 1 / n, i, j, o, y0 = [];
+ for (j = 0; j < m; ++j) {
+ for (i = 0, o = 0; i < n; i++) o += data[i][j][1];
+ if (o) for (i = 0; i < n; i++) data[i][j][1] /= o; else for (i = 0; i < n; i++) data[i][j][1] = k;
+ }
+ for (j = 0; j < m; ++j) y0[j] = 0;
+ return y0;
+ },
+ zero: d3_layout_stackOffsetZero
+ });
+ function d3_layout_stackOrderDefault(data) {
+ return d3.range(data.length);
+ }
+ function d3_layout_stackOffsetZero(data) {
+ var j = -1, m = data[0].length, y0 = [];
+ while (++j < m) y0[j] = 0;
+ return y0;
+ }
+ function d3_layout_stackMaxIndex(array) {
+ var i = 1, j = 0, v = array[0][1], k, n = array.length;
+ for (;i < n; ++i) {
+ if ((k = array[i][1]) > v) {
+ j = i;
+ v = k;
+ }
+ }
+ return j;
+ }
+ function d3_layout_stackReduceSum(d) {
+ return d.reduce(d3_layout_stackSum, 0);
+ }
+ function d3_layout_stackSum(p, d) {
+ return p + d[1];
+ }
+ d3.layout.histogram = function() {
+ var frequency = true, valuer = Number, ranger = d3_layout_histogramRange, binner = d3_layout_histogramBinSturges;
+ function histogram(data, i) {
+ var bins = [], values = data.map(valuer, this), range = ranger.call(this, values, i), thresholds = binner.call(this, range, values, i), bin, i = -1, n = values.length, m = thresholds.length - 1, k = frequency ? 1 : 1 / n, x;
+ while (++i < m) {
+ bin = bins[i] = [];
+ bin.dx = thresholds[i + 1] - (bin.x = thresholds[i]);
+ bin.y = 0;
+ }
+ if (m > 0) {
+ i = -1;
+ while (++i < n) {
+ x = values[i];
+ if (x >= range[0] && x <= range[1]) {
+ bin = bins[d3.bisect(thresholds, x, 1, m) - 1];
+ bin.y += k;
+ bin.push(data[i]);
+ }
+ }
+ }
+ return bins;
+ }
+ histogram.value = function(x) {
+ if (!arguments.length) return valuer;
+ valuer = x;
+ return histogram;
+ };
+ histogram.range = function(x) {
+ if (!arguments.length) return ranger;
+ ranger = d3_functor(x);
+ return histogram;
+ };
+ histogram.bins = function(x) {
+ if (!arguments.length) return binner;
+ binner = typeof x === "number" ? function(range) {
+ return d3_layout_histogramBinFixed(range, x);
+ } : d3_functor(x);
+ return histogram;
+ };
+ histogram.frequency = function(x) {
+ if (!arguments.length) return frequency;
+ frequency = !!x;
+ return histogram;
+ };
+ return histogram;
+ };
+ function d3_layout_histogramBinSturges(range, values) {
+ return d3_layout_histogramBinFixed(range, Math.ceil(Math.log(values.length) / Math.LN2 + 1));
+ }
+ function d3_layout_histogramBinFixed(range, n) {
+ var x = -1, b = +range[0], m = (range[1] - b) / n, f = [];
+ while (++x <= n) f[x] = m * x + b;
+ return f;
+ }
+ function d3_layout_histogramRange(values) {
+ return [ d3.min(values), d3.max(values) ];
+ }
+ d3.layout.pack = function() {
+ var hierarchy = d3.layout.hierarchy().sort(d3_layout_packSort), padding = 0, size = [ 1, 1 ], radius;
+ function pack(d, i) {
+ var nodes = hierarchy.call(this, d, i), root = nodes[0], w = size[0], h = size[1], r = radius == null ? Math.sqrt : typeof radius === "function" ? radius : function() {
+ return radius;
+ };
+ root.x = root.y = 0;
+ d3_layout_hierarchyVisitAfter(root, function(d) {
+ d.r = +r(d.value);
+ });
+ d3_layout_hierarchyVisitAfter(root, d3_layout_packSiblings);
+ if (padding) {
+ var dr = padding * (radius ? 1 : Math.max(2 * root.r / w, 2 * root.r / h)) / 2;
+ d3_layout_hierarchyVisitAfter(root, function(d) {
+ d.r += dr;
+ });
+ d3_layout_hierarchyVisitAfter(root, d3_layout_packSiblings);
+ d3_layout_hierarchyVisitAfter(root, function(d) {
+ d.r -= dr;
+ });
+ }
+ d3_layout_packTransform(root, w / 2, h / 2, radius ? 1 : 1 / Math.max(2 * root.r / w, 2 * root.r / h));
+ return nodes;
+ }
+ pack.size = function(_) {
+ if (!arguments.length) return size;
+ size = _;
+ return pack;
+ };
+ pack.radius = function(_) {
+ if (!arguments.length) return radius;
+ radius = _ == null || typeof _ === "function" ? _ : +_;
+ return pack;
+ };
+ pack.padding = function(_) {
+ if (!arguments.length) return padding;
+ padding = +_;
+ return pack;
+ };
+ return d3_layout_hierarchyRebind(pack, hierarchy);
+ };
+ function d3_layout_packSort(a, b) {
+ return a.value - b.value;
+ }
+ function d3_layout_packInsert(a, b) {
+ var c = a._pack_next;
+ a._pack_next = b;
+ b._pack_prev = a;
+ b._pack_next = c;
+ c._pack_prev = b;
+ }
+ function d3_layout_packSplice(a, b) {
+ a._pack_next = b;
+ b._pack_prev = a;
+ }
+ function d3_layout_packIntersects(a, b) {
+ var dx = b.x - a.x, dy = b.y - a.y, dr = a.r + b.r;
+ return .999 * dr * dr > dx * dx + dy * dy;
+ }
+ function d3_layout_packSiblings(node) {
+ if (!(nodes = node.children) || !(n = nodes.length)) return;
+ var nodes, xMin = Infinity, xMax = -Infinity, yMin = Infinity, yMax = -Infinity, a, b, c, i, j, k, n;
+ function bound(node) {
+ xMin = Math.min(node.x - node.r, xMin);
+ xMax = Math.max(node.x + node.r, xMax);
+ yMin = Math.min(node.y - node.r, yMin);
+ yMax = Math.max(node.y + node.r, yMax);
+ }
+ nodes.forEach(d3_layout_packLink);
+ a = nodes[0];
+ a.x = -a.r;
+ a.y = 0;
+ bound(a);
+ if (n > 1) {
+ b = nodes[1];
+ b.x = b.r;
+ b.y = 0;
+ bound(b);
+ if (n > 2) {
+ c = nodes[2];
+ d3_layout_packPlace(a, b, c);
+ bound(c);
+ d3_layout_packInsert(a, c);
+ a._pack_prev = c;
+ d3_layout_packInsert(c, b);
+ b = a._pack_next;
+ for (i = 3; i < n; i++) {
+ d3_layout_packPlace(a, b, c = nodes[i]);
+ var isect = 0, s1 = 1, s2 = 1;
+ for (j = b._pack_next; j !== b; j = j._pack_next, s1++) {
+ if (d3_layout_packIntersects(j, c)) {
+ isect = 1;
+ break;
+ }
+ }
+ if (isect == 1) {
+ for (k = a._pack_prev; k !== j._pack_prev; k = k._pack_prev, s2++) {
+ if (d3_layout_packIntersects(k, c)) {
+ break;
+ }
+ }
+ }
+ if (isect) {
+ if (s1 < s2 || s1 == s2 && b.r < a.r) d3_layout_packSplice(a, b = j); else d3_layout_packSplice(a = k, b);
+ i--;
+ } else {
+ d3_layout_packInsert(a, c);
+ b = c;
+ bound(c);
+ }
+ }
+ }
+ }
+ var cx = (xMin + xMax) / 2, cy = (yMin + yMax) / 2, cr = 0;
+ for (i = 0; i < n; i++) {
+ c = nodes[i];
+ c.x -= cx;
+ c.y -= cy;
+ cr = Math.max(cr, c.r + Math.sqrt(c.x * c.x + c.y * c.y));
+ }
+ node.r = cr;
+ nodes.forEach(d3_layout_packUnlink);
+ }
+ function d3_layout_packLink(node) {
+ node._pack_next = node._pack_prev = node;
+ }
+ function d3_layout_packUnlink(node) {
+ delete node._pack_next;
+ delete node._pack_prev;
+ }
+ function d3_layout_packTransform(node, x, y, k) {
+ var children = node.children;
+ node.x = x += k * node.x;
+ node.y = y += k * node.y;
+ node.r *= k;
+ if (children) {
+ var i = -1, n = children.length;
+ while (++i < n) d3_layout_packTransform(children[i], x, y, k);
+ }
+ }
+ function d3_layout_packPlace(a, b, c) {
+ var db = a.r + c.r, dx = b.x - a.x, dy = b.y - a.y;
+ if (db && (dx || dy)) {
+ var da = b.r + c.r, dc = dx * dx + dy * dy;
+ da *= da;
+ db *= db;
+ var x = .5 + (db - da) / (2 * dc), y = Math.sqrt(Math.max(0, 2 * da * (db + dc) - (db -= dc) * db - da * da)) / (2 * dc);
+ c.x = a.x + x * dx + y * dy;
+ c.y = a.y + x * dy - y * dx;
+ } else {
+ c.x = a.x + db;
+ c.y = a.y;
+ }
+ }
+ d3.layout.tree = function() {
+ var hierarchy = d3.layout.hierarchy().sort(null).value(null), separation = d3_layout_treeSeparation, size = [ 1, 1 ], nodeSize = null;
+ function tree(d, i) {
+ var nodes = hierarchy.call(this, d, i), root0 = nodes[0], root1 = wrapTree(root0);
+ d3_layout_hierarchyVisitAfter(root1, firstWalk), root1.parent.m = -root1.z;
+ d3_layout_hierarchyVisitBefore(root1, secondWalk);
+ if (nodeSize) d3_layout_hierarchyVisitBefore(root0, sizeNode); else {
+ var left = root0, right = root0, bottom = root0;
+ d3_layout_hierarchyVisitBefore(root0, function(node) {
+ if (node.x < left.x) left = node;
+ if (node.x > right.x) right = node;
+ if (node.depth > bottom.depth) bottom = node;
+ });
+ var tx = separation(left, right) / 2 - left.x, kx = size[0] / (right.x + separation(right, left) / 2 + tx), ky = size[1] / (bottom.depth || 1);
+ d3_layout_hierarchyVisitBefore(root0, function(node) {
+ node.x = (node.x + tx) * kx;
+ node.y = node.depth * ky;
+ });
+ }
+ return nodes;
+ }
+ function wrapTree(root0) {
+ var root1 = {
+ A: null,
+ children: [ root0 ]
+ }, queue = [ root1 ], node1;
+ while ((node1 = queue.pop()) != null) {
+ for (var children = node1.children, child, i = 0, n = children.length; i < n; ++i) {
+ queue.push((children[i] = child = {
+ _: children[i],
+ parent: node1,
+ children: (child = children[i].children) && child.slice() || [],
+ A: null,
+ a: null,
+ z: 0,
+ m: 0,
+ c: 0,
+ s: 0,
+ t: null,
+ i: i
+ }).a = child);
+ }
+ }
+ return root1.children[0];
+ }
+ function firstWalk(v) {
+ var children = v.children, siblings = v.parent.children, w = v.i ? siblings[v.i - 1] : null;
+ if (children.length) {
+ d3_layout_treeShift(v);
+ var midpoint = (children[0].z + children[children.length - 1].z) / 2;
+ if (w) {
+ v.z = w.z + separation(v._, w._);
+ v.m = v.z - midpoint;
+ } else {
+ v.z = midpoint;
+ }
+ } else if (w) {
+ v.z = w.z + separation(v._, w._);
+ }
+ v.parent.A = apportion(v, w, v.parent.A || siblings[0]);
+ }
+ function secondWalk(v) {
+ v._.x = v.z + v.parent.m;
+ v.m += v.parent.m;
+ }
+ function apportion(v, w, ancestor) {
+ if (w) {
+ var vip = v, vop = v, vim = w, vom = vip.parent.children[0], sip = vip.m, sop = vop.m, sim = vim.m, som = vom.m, shift;
+ while (vim = d3_layout_treeRight(vim), vip = d3_layout_treeLeft(vip), vim && vip) {
+ vom = d3_layout_treeLeft(vom);
+ vop = d3_layout_treeRight(vop);
+ vop.a = v;
+ shift = vim.z + sim - vip.z - sip + separation(vim._, vip._);
+ if (shift > 0) {
+ d3_layout_treeMove(d3_layout_treeAncestor(vim, v, ancestor), v, shift);
+ sip += shift;
+ sop += shift;
+ }
+ sim += vim.m;
+ sip += vip.m;
+ som += vom.m;
+ sop += vop.m;
+ }
+ if (vim && !d3_layout_treeRight(vop)) {
+ vop.t = vim;
+ vop.m += sim - sop;
+ }
+ if (vip && !d3_layout_treeLeft(vom)) {
+ vom.t = vip;
+ vom.m += sip - som;
+ ancestor = v;
+ }
+ }
+ return ancestor;
+ }
+ function sizeNode(node) {
+ node.x *= size[0];
+ node.y = node.depth * size[1];
+ }
+ tree.separation = function(x) {
+ if (!arguments.length) return separation;
+ separation = x;
+ return tree;
+ };
+ tree.size = function(x) {
+ if (!arguments.length) return nodeSize ? null : size;
+ nodeSize = (size = x) == null ? sizeNode : null;
+ return tree;
+ };
+ tree.nodeSize = function(x) {
+ if (!arguments.length) return nodeSize ? size : null;
+ nodeSize = (size = x) == null ? null : sizeNode;
+ return tree;
+ };
+ return d3_layout_hierarchyRebind(tree, hierarchy);
+ };
+ function d3_layout_treeSeparation(a, b) {
+ return a.parent == b.parent ? 1 : 2;
+ }
+ function d3_layout_treeLeft(v) {
+ var children = v.children;
+ return children.length ? children[0] : v.t;
+ }
+ function d3_layout_treeRight(v) {
+ var children = v.children, n;
+ return (n = children.length) ? children[n - 1] : v.t;
+ }
+ function d3_layout_treeMove(wm, wp, shift) {
+ var change = shift / (wp.i - wm.i);
+ wp.c -= change;
+ wp.s += shift;
+ wm.c += change;
+ wp.z += shift;
+ wp.m += shift;
+ }
+ function d3_layout_treeShift(v) {
+ var shift = 0, change = 0, children = v.children, i = children.length, w;
+ while (--i >= 0) {
+ w = children[i];
+ w.z += shift;
+ w.m += shift;
+ shift += w.s + (change += w.c);
+ }
+ }
+ function d3_layout_treeAncestor(vim, v, ancestor) {
+ return vim.a.parent === v.parent ? vim.a : ancestor;
+ }
+ d3.layout.cluster = function() {
+ var hierarchy = d3.layout.hierarchy().sort(null).value(null), separation = d3_layout_treeSeparation, size = [ 1, 1 ], nodeSize = false;
+ function cluster(d, i) {
+ var nodes = hierarchy.call(this, d, i), root = nodes[0], previousNode, x = 0;
+ d3_layout_hierarchyVisitAfter(root, function(node) {
+ var children = node.children;
+ if (children && children.length) {
+ node.x = d3_layout_clusterX(children);
+ node.y = d3_layout_clusterY(children);
+ } else {
+ node.x = previousNode ? x += separation(node, previousNode) : 0;
+ node.y = 0;
+ previousNode = node;
+ }
+ });
+ var left = d3_layout_clusterLeft(root), right = d3_layout_clusterRight(root), x0 = left.x - separation(left, right) / 2, x1 = right.x + separation(right, left) / 2;
+ d3_layout_hierarchyVisitAfter(root, nodeSize ? function(node) {
+ node.x = (node.x - root.x) * size[0];
+ node.y = (root.y - node.y) * size[1];
+ } : function(node) {
+ node.x = (node.x - x0) / (x1 - x0) * size[0];
+ node.y = (1 - (root.y ? node.y / root.y : 1)) * size[1];
+ });
+ return nodes;
+ }
+ cluster.separation = function(x) {
+ if (!arguments.length) return separation;
+ separation = x;
+ return cluster;
+ };
+ cluster.size = function(x) {
+ if (!arguments.length) return nodeSize ? null : size;
+ nodeSize = (size = x) == null;
+ return cluster;
+ };
+ cluster.nodeSize = function(x) {
+ if (!arguments.length) return nodeSize ? size : null;
+ nodeSize = (size = x) != null;
+ return cluster;
+ };
+ return d3_layout_hierarchyRebind(cluster, hierarchy);
+ };
+ function d3_layout_clusterY(children) {
+ return 1 + d3.max(children, function(child) {
+ return child.y;
+ });
+ }
+ function d3_layout_clusterX(children) {
+ return children.reduce(function(x, child) {
+ return x + child.x;
+ }, 0) / children.length;
+ }
+ function d3_layout_clusterLeft(node) {
+ var children = node.children;
+ return children && children.length ? d3_layout_clusterLeft(children[0]) : node;
+ }
+ function d3_layout_clusterRight(node) {
+ var children = node.children, n;
+ return children && (n = children.length) ? d3_layout_clusterRight(children[n - 1]) : node;
+ }
+ d3.layout.treemap = function() {
+ var hierarchy = d3.layout.hierarchy(), round = Math.round, size = [ 1, 1 ], padding = null, pad = d3_layout_treemapPadNull, sticky = false, stickies, mode = "squarify", ratio = .5 * (1 + Math.sqrt(5));
+ function scale(children, k) {
+ var i = -1, n = children.length, child, area;
+ while (++i < n) {
+ area = (child = children[i]).value * (k < 0 ? 0 : k);
+ child.area = isNaN(area) || area <= 0 ? 0 : area;
+ }
+ }
+ function squarify(node) {
+ var children = node.children;
+ if (children && children.length) {
+ var rect = pad(node), row = [], remaining = children.slice(), child, best = Infinity, score, u = mode === "slice" ? rect.dx : mode === "dice" ? rect.dy : mode === "slice-dice" ? node.depth & 1 ? rect.dy : rect.dx : Math.min(rect.dx, rect.dy), n;
+ scale(remaining, rect.dx * rect.dy / node.value);
+ row.area = 0;
+ while ((n = remaining.length) > 0) {
+ row.push(child = remaining[n - 1]);
+ row.area += child.area;
+ if (mode !== "squarify" || (score = worst(row, u)) <= best) {
+ remaining.pop();
+ best = score;
+ } else {
+ row.area -= row.pop().area;
+ position(row, u, rect, false);
+ u = Math.min(rect.dx, rect.dy);
+ row.length = row.area = 0;
+ best = Infinity;
+ }
+ }
+ if (row.length) {
+ position(row, u, rect, true);
+ row.length = row.area = 0;
+ }
+ children.forEach(squarify);
+ }
+ }
+ function stickify(node) {
+ var children = node.children;
+ if (children && children.length) {
+ var rect = pad(node), remaining = children.slice(), child, row = [];
+ scale(remaining, rect.dx * rect.dy / node.value);
+ row.area = 0;
+ while (child = remaining.pop()) {
+ row.push(child);
+ row.area += child.area;
+ if (child.z != null) {
+ position(row, child.z ? rect.dx : rect.dy, rect, !remaining.length);
+ row.length = row.area = 0;
+ }
+ }
+ children.forEach(stickify);
+ }
+ }
+ function worst(row, u) {
+ var s = row.area, r, rmax = 0, rmin = Infinity, i = -1, n = row.length;
+ while (++i < n) {
+ if (!(r = row[i].area)) continue;
+ if (r < rmin) rmin = r;
+ if (r > rmax) rmax = r;
+ }
+ s *= s;
+ u *= u;
+ return s ? Math.max(u * rmax * ratio / s, s / (u * rmin * ratio)) : Infinity;
+ }
+ function position(row, u, rect, flush) {
+ var i = -1, n = row.length, x = rect.x, y = rect.y, v = u ? round(row.area / u) : 0, o;
+ if (u == rect.dx) {
+ if (flush || v > rect.dy) v = rect.dy;
+ while (++i < n) {
+ o = row[i];
+ o.x = x;
+ o.y = y;
+ o.dy = v;
+ x += o.dx = Math.min(rect.x + rect.dx - x, v ? round(o.area / v) : 0);
+ }
+ o.z = true;
+ o.dx += rect.x + rect.dx - x;
+ rect.y += v;
+ rect.dy -= v;
+ } else {
+ if (flush || v > rect.dx) v = rect.dx;
+ while (++i < n) {
+ o = row[i];
+ o.x = x;
+ o.y = y;
+ o.dx = v;
+ y += o.dy = Math.min(rect.y + rect.dy - y, v ? round(o.area / v) : 0);
+ }
+ o.z = false;
+ o.dy += rect.y + rect.dy - y;
+ rect.x += v;
+ rect.dx -= v;
+ }
+ }
+ function treemap(d) {
+ var nodes = stickies || hierarchy(d), root = nodes[0];
+ root.x = root.y = 0;
+ if (root.value) root.dx = size[0], root.dy = size[1]; else root.dx = root.dy = 0;
+ if (stickies) hierarchy.revalue(root);
+ scale([ root ], root.dx * root.dy / root.value);
+ (stickies ? stickify : squarify)(root);
+ if (sticky) stickies = nodes;
+ return nodes;
+ }
+ treemap.size = function(x) {
+ if (!arguments.length) return size;
+ size = x;
+ return treemap;
+ };
+ treemap.padding = function(x) {
+ if (!arguments.length) return padding;
+ function padFunction(node) {
+ var p = x.call(treemap, node, node.depth);
+ return p == null ? d3_layout_treemapPadNull(node) : d3_layout_treemapPad(node, typeof p === "number" ? [ p, p, p, p ] : p);
+ }
+ function padConstant(node) {
+ return d3_layout_treemapPad(node, x);
+ }
+ var type;
+ pad = (padding = x) == null ? d3_layout_treemapPadNull : (type = typeof x) === "function" ? padFunction : type === "number" ? (x = [ x, x, x, x ],
+ padConstant) : padConstant;
+ return treemap;
+ };
+ treemap.round = function(x) {
+ if (!arguments.length) return round != Number;
+ round = x ? Math.round : Number;
+ return treemap;
+ };
+ treemap.sticky = function(x) {
+ if (!arguments.length) return sticky;
+ sticky = x;
+ stickies = null;
+ return treemap;
+ };
+ treemap.ratio = function(x) {
+ if (!arguments.length) return ratio;
+ ratio = x;
+ return treemap;
+ };
+ treemap.mode = function(x) {
+ if (!arguments.length) return mode;
+ mode = x + "";
+ return treemap;
+ };
+ return d3_layout_hierarchyRebind(treemap, hierarchy);
+ };
+ function d3_layout_treemapPadNull(node) {
+ return {
+ x: node.x,
+ y: node.y,
+ dx: node.dx,
+ dy: node.dy
+ };
+ }
+ function d3_layout_treemapPad(node, padding) {
+ var x = node.x + padding[3], y = node.y + padding[0], dx = node.dx - padding[1] - padding[3], dy = node.dy - padding[0] - padding[2];
+ if (dx < 0) {
+ x += dx / 2;
+ dx = 0;
+ }
+ if (dy < 0) {
+ y += dy / 2;
+ dy = 0;
+ }
+ return {
+ x: x,
+ y: y,
+ dx: dx,
+ dy: dy
+ };
+ }
+ d3.random = {
+ normal: function(µ, σ) {
+ var n = arguments.length;
+ if (n < 2) σ = 1;
+ if (n < 1) µ = 0;
+ return function() {
+ var x, y, r;
+ do {
+ x = Math.random() * 2 - 1;
+ y = Math.random() * 2 - 1;
+ r = x * x + y * y;
+ } while (!r || r > 1);
+ return µ + σ * x * Math.sqrt(-2 * Math.log(r) / r);
+ };
+ },
+ logNormal: function() {
+ var random = d3.random.normal.apply(d3, arguments);
+ return function() {
+ return Math.exp(random());
+ };
+ },
+ bates: function(m) {
+ var random = d3.random.irwinHall(m);
+ return function() {
+ return random() / m;
+ };
+ },
+ irwinHall: function(m) {
+ return function() {
+ for (var s = 0, j = 0; j < m; j++) s += Math.random();
+ return s;
+ };
+ }
+ };
+ d3.scale = {};
+ function d3_scaleExtent(domain) {
+ var start = domain[0], stop = domain[domain.length - 1];
+ return start < stop ? [ start, stop ] : [ stop, start ];
+ }
+ function d3_scaleRange(scale) {
+ return scale.rangeExtent ? scale.rangeExtent() : d3_scaleExtent(scale.range());
+ }
+ function d3_scale_bilinear(domain, range, uninterpolate, interpolate) {
+ var u = uninterpolate(domain[0], domain[1]), i = interpolate(range[0], range[1]);
+ return function(x) {
+ return i(u(x));
+ };
+ }
+ function d3_scale_nice(domain, nice) {
+ var i0 = 0, i1 = domain.length - 1, x0 = domain[i0], x1 = domain[i1], dx;
+ if (x1 < x0) {
+ dx = i0, i0 = i1, i1 = dx;
+ dx = x0, x0 = x1, x1 = dx;
+ }
+ domain[i0] = nice.floor(x0);
+ domain[i1] = nice.ceil(x1);
+ return domain;
+ }
+ function d3_scale_niceStep(step) {
+ return step ? {
+ floor: function(x) {
+ return Math.floor(x / step) * step;
+ },
+ ceil: function(x) {
+ return Math.ceil(x / step) * step;
+ }
+ } : d3_scale_niceIdentity;
+ }
+ var d3_scale_niceIdentity = {
+ floor: d3_identity,
+ ceil: d3_identity
+ };
+ function d3_scale_polylinear(domain, range, uninterpolate, interpolate) {
+ var u = [], i = [], j = 0, k = Math.min(domain.length, range.length) - 1;
+ if (domain[k] < domain[0]) {
+ domain = domain.slice().reverse();
+ range = range.slice().reverse();
+ }
+ while (++j <= k) {
+ u.push(uninterpolate(domain[j - 1], domain[j]));
+ i.push(interpolate(range[j - 1], range[j]));
+ }
+ return function(x) {
+ var j = d3.bisect(domain, x, 1, k) - 1;
+ return i[j](u[j](x));
+ };
+ }
+ d3.scale.linear = function() {
+ return d3_scale_linear([ 0, 1 ], [ 0, 1 ], d3_interpolate, false);
+ };
+ function d3_scale_linear(domain, range, interpolate, clamp) {
+ var output, input;
+ function rescale() {
+ var linear = Math.min(domain.length, range.length) > 2 ? d3_scale_polylinear : d3_scale_bilinear, uninterpolate = clamp ? d3_uninterpolateClamp : d3_uninterpolateNumber;
+ output = linear(domain, range, uninterpolate, interpolate);
+ input = linear(range, domain, uninterpolate, d3_interpolate);
+ return scale;
+ }
+ function scale(x) {
+ return output(x);
+ }
+ scale.invert = function(y) {
+ return input(y);
+ };
+ scale.domain = function(x) {
+ if (!arguments.length) return domain;
+ domain = x.map(Number);
+ return rescale();
+ };
+ scale.range = function(x) {
+ if (!arguments.length) return range;
+ range = x;
+ return rescale();
+ };
+ scale.rangeRound = function(x) {
+ return scale.range(x).interpolate(d3_interpolateRound);
+ };
+ scale.clamp = function(x) {
+ if (!arguments.length) return clamp;
+ clamp = x;
+ return rescale();
+ };
+ scale.interpolate = function(x) {
+ if (!arguments.length) return interpolate;
+ interpolate = x;
+ return rescale();
+ };
+ scale.ticks = function(m) {
+ return d3_scale_linearTicks(domain, m);
+ };
+ scale.tickFormat = function(m, format) {
+ return d3_scale_linearTickFormat(domain, m, format);
+ };
+ scale.nice = function(m) {
+ d3_scale_linearNice(domain, m);
+ return rescale();
+ };
+ scale.copy = function() {
+ return d3_scale_linear(domain, range, interpolate, clamp);
+ };
+ return rescale();
+ }
+ function d3_scale_linearRebind(scale, linear) {
+ return d3.rebind(scale, linear, "range", "rangeRound", "interpolate", "clamp");
+ }
+ function d3_scale_linearNice(domain, m) {
+ d3_scale_nice(domain, d3_scale_niceStep(d3_scale_linearTickRange(domain, m)[2]));
+ d3_scale_nice(domain, d3_scale_niceStep(d3_scale_linearTickRange(domain, m)[2]));
+ return domain;
+ }
+ function d3_scale_linearTickRange(domain, m) {
+ if (m == null) m = 10;
+ var extent = d3_scaleExtent(domain), span = extent[1] - extent[0], step = Math.pow(10, Math.floor(Math.log(span / m) / Math.LN10)), err = m / span * step;
+ if (err <= .15) step *= 10; else if (err <= .35) step *= 5; else if (err <= .75) step *= 2;
+ extent[0] = Math.ceil(extent[0] / step) * step;
+ extent[1] = Math.floor(extent[1] / step) * step + step * .5;
+ extent[2] = step;
+ return extent;
+ }
+ function d3_scale_linearTicks(domain, m) {
+ return d3.range.apply(d3, d3_scale_linearTickRange(domain, m));
+ }
+ function d3_scale_linearTickFormat(domain, m, format) {
+ var range = d3_scale_linearTickRange(domain, m);
+ if (format) {
+ var match = d3_format_re.exec(format);
+ match.shift();
+ if (match[8] === "s") {
+ var prefix = d3.formatPrefix(Math.max(abs(range[0]), abs(range[1])));
+ if (!match[7]) match[7] = "." + d3_scale_linearPrecision(prefix.scale(range[2]));
+ match[8] = "f";
+ format = d3.format(match.join(""));
+ return function(d) {
+ return format(prefix.scale(d)) + prefix.symbol;
+ };
+ }
+ if (!match[7]) match[7] = "." + d3_scale_linearFormatPrecision(match[8], range);
+ format = match.join("");
+ } else {
+ format = ",." + d3_scale_linearPrecision(range[2]) + "f";
+ }
+ return d3.format(format);
+ }
+ var d3_scale_linearFormatSignificant = {
+ s: 1,
+ g: 1,
+ p: 1,
+ r: 1,
+ e: 1
+ };
+ function d3_scale_linearPrecision(value) {
+ return -Math.floor(Math.log(value) / Math.LN10 + .01);
+ }
+ function d3_scale_linearFormatPrecision(type, range) {
+ var p = d3_scale_linearPrecision(range[2]);
+ return type in d3_scale_linearFormatSignificant ? Math.abs(p - d3_scale_linearPrecision(Math.max(abs(range[0]), abs(range[1])))) + +(type !== "e") : p - (type === "%") * 2;
+ }
+ d3.scale.log = function() {
+ return d3_scale_log(d3.scale.linear().domain([ 0, 1 ]), 10, true, [ 1, 10 ]);
+ };
+ function d3_scale_log(linear, base, positive, domain) {
+ function log(x) {
+ return (positive ? Math.log(x < 0 ? 0 : x) : -Math.log(x > 0 ? 0 : -x)) / Math.log(base);
+ }
+ function pow(x) {
+ return positive ? Math.pow(base, x) : -Math.pow(base, -x);
+ }
+ function scale(x) {
+ return linear(log(x));
+ }
+ scale.invert = function(x) {
+ return pow(linear.invert(x));
+ };
+ scale.domain = function(x) {
+ if (!arguments.length) return domain;
+ positive = x[0] >= 0;
+ linear.domain((domain = x.map(Number)).map(log));
+ return scale;
+ };
+ scale.base = function(_) {
+ if (!arguments.length) return base;
+ base = +_;
+ linear.domain(domain.map(log));
+ return scale;
+ };
+ scale.nice = function() {
+ var niced = d3_scale_nice(domain.map(log), positive ? Math : d3_scale_logNiceNegative);
+ linear.domain(niced);
+ domain = niced.map(pow);
+ return scale;
+ };
+ scale.ticks = function() {
+ var extent = d3_scaleExtent(domain), ticks = [], u = extent[0], v = extent[1], i = Math.floor(log(u)), j = Math.ceil(log(v)), n = base % 1 ? 2 : base;
+ if (isFinite(j - i)) {
+ if (positive) {
+ for (;i < j; i++) for (var k = 1; k < n; k++) ticks.push(pow(i) * k);
+ ticks.push(pow(i));
+ } else {
+ ticks.push(pow(i));
+ for (;i++ < j; ) for (var k = n - 1; k > 0; k--) ticks.push(pow(i) * k);
+ }
+ for (i = 0; ticks[i] < u; i++) {}
+ for (j = ticks.length; ticks[j - 1] > v; j--) {}
+ ticks = ticks.slice(i, j);
+ }
+ return ticks;
+ };
+ scale.tickFormat = function(n, format) {
+ if (!arguments.length) return d3_scale_logFormat;
+ if (arguments.length < 2) format = d3_scale_logFormat; else if (typeof format !== "function") format = d3.format(format);
+ var k = Math.max(1, base * n / scale.ticks().length);
+ return function(d) {
+ var i = d / pow(Math.round(log(d)));
+ if (i * base < base - .5) i *= base;
+ return i <= k ? format(d) : "";
+ };
+ };
+ scale.copy = function() {
+ return d3_scale_log(linear.copy(), base, positive, domain);
+ };
+ return d3_scale_linearRebind(scale, linear);
+ }
+ var d3_scale_logFormat = d3.format(".0e"), d3_scale_logNiceNegative = {
+ floor: function(x) {
+ return -Math.ceil(-x);
+ },
+ ceil: function(x) {
+ return -Math.floor(-x);
+ }
+ };
+ d3.scale.pow = function() {
+ return d3_scale_pow(d3.scale.linear(), 1, [ 0, 1 ]);
+ };
+ function d3_scale_pow(linear, exponent, domain) {
+ var powp = d3_scale_powPow(exponent), powb = d3_scale_powPow(1 / exponent);
+ function scale(x) {
+ return linear(powp(x));
+ }
+ scale.invert = function(x) {
+ return powb(linear.invert(x));
+ };
+ scale.domain = function(x) {
+ if (!arguments.length) return domain;
+ linear.domain((domain = x.map(Number)).map(powp));
+ return scale;
+ };
+ scale.ticks = function(m) {
+ return d3_scale_linearTicks(domain, m);
+ };
+ scale.tickFormat = function(m, format) {
+ return d3_scale_linearTickFormat(domain, m, format);
+ };
+ scale.nice = function(m) {
+ return scale.domain(d3_scale_linearNice(domain, m));
+ };
+ scale.exponent = function(x) {
+ if (!arguments.length) return exponent;
+ powp = d3_scale_powPow(exponent = x);
+ powb = d3_scale_powPow(1 / exponent);
+ linear.domain(domain.map(powp));
+ return scale;
+ };
+ scale.copy = function() {
+ return d3_scale_pow(linear.copy(), exponent, domain);
+ };
+ return d3_scale_linearRebind(scale, linear);
+ }
+ function d3_scale_powPow(e) {
+ return function(x) {
+ return x < 0 ? -Math.pow(-x, e) : Math.pow(x, e);
+ };
+ }
+ d3.scale.sqrt = function() {
+ return d3.scale.pow().exponent(.5);
+ };
+ d3.scale.ordinal = function() {
+ return d3_scale_ordinal([], {
+ t: "range",
+ a: [ [] ]
+ });
+ };
+ function d3_scale_ordinal(domain, ranger) {
+ var index, range, rangeBand;
+ function scale(x) {
+ return range[((index.get(x) || (ranger.t === "range" ? index.set(x, domain.push(x)) : NaN)) - 1) % range.length];
+ }
+ function steps(start, step) {
+ return d3.range(domain.length).map(function(i) {
+ return start + step * i;
+ });
+ }
+ scale.domain = function(x) {
+ if (!arguments.length) return domain;
+ domain = [];
+ index = new d3_Map();
+ var i = -1, n = x.length, xi;
+ while (++i < n) if (!index.has(xi = x[i])) index.set(xi, domain.push(xi));
+ return scale[ranger.t].apply(scale, ranger.a);
+ };
+ scale.range = function(x) {
+ if (!arguments.length) return range;
+ range = x;
+ rangeBand = 0;
+ ranger = {
+ t: "range",
+ a: arguments
+ };
+ return scale;
+ };
+ scale.rangePoints = function(x, padding) {
+ if (arguments.length < 2) padding = 0;
+ var start = x[0], stop = x[1], step = domain.length < 2 ? (start = (start + stop) / 2,
+ 0) : (stop - start) / (domain.length - 1 + padding);
+ range = steps(start + step * padding / 2, step);
+ rangeBand = 0;
+ ranger = {
+ t: "rangePoints",
+ a: arguments
+ };
+ return scale;
+ };
+ scale.rangeRoundPoints = function(x, padding) {
+ if (arguments.length < 2) padding = 0;
+ var start = x[0], stop = x[1], step = domain.length < 2 ? (start = stop = Math.round((start + stop) / 2),
+ 0) : (stop - start) / (domain.length - 1 + padding) | 0;
+ range = steps(start + Math.round(step * padding / 2 + (stop - start - (domain.length - 1 + padding) * step) / 2), step);
+ rangeBand = 0;
+ ranger = {
+ t: "rangeRoundPoints",
+ a: arguments
+ };
+ return scale;
+ };
+ scale.rangeBands = function(x, padding, outerPadding) {
+ if (arguments.length < 2) padding = 0;
+ if (arguments.length < 3) outerPadding = padding;
+ var reverse = x[1] < x[0], start = x[reverse - 0], stop = x[1 - reverse], step = (stop - start) / (domain.length - padding + 2 * outerPadding);
+ range = steps(start + step * outerPadding, step);
+ if (reverse) range.reverse();
+ rangeBand = step * (1 - padding);
+ ranger = {
+ t: "rangeBands",
+ a: arguments
+ };
+ return scale;
+ };
+ scale.rangeRoundBands = function(x, padding, outerPadding) {
+ if (arguments.length < 2) padding = 0;
+ if (arguments.length < 3) outerPadding = padding;
+ var reverse = x[1] < x[0], start = x[reverse - 0], stop = x[1 - reverse], step = Math.floor((stop - start) / (domain.length - padding + 2 * outerPadding));
+ range = steps(start + Math.round((stop - start - (domain.length - padding) * step) / 2), step);
+ if (reverse) range.reverse();
+ rangeBand = Math.round(step * (1 - padding));
+ ranger = {
+ t: "rangeRoundBands",
+ a: arguments
+ };
+ return scale;
+ };
+ scale.rangeBand = function() {
+ return rangeBand;
+ };
+ scale.rangeExtent = function() {
+ return d3_scaleExtent(ranger.a[0]);
+ };
+ scale.copy = function() {
+ return d3_scale_ordinal(domain, ranger);
+ };
+ return scale.domain(domain);
+ }
+ d3.scale.category10 = function() {
+ return d3.scale.ordinal().range(d3_category10);
+ };
+ d3.scale.category20 = function() {
+ return d3.scale.ordinal().range(d3_category20);
+ };
+ d3.scale.category20b = function() {
+ return d3.scale.ordinal().range(d3_category20b);
+ };
+ d3.scale.category20c = function() {
+ return d3.scale.ordinal().range(d3_category20c);
+ };
+ var d3_category10 = [ 2062260, 16744206, 2924588, 14034728, 9725885, 9197131, 14907330, 8355711, 12369186, 1556175 ].map(d3_rgbString);
+ var d3_category20 = [ 2062260, 11454440, 16744206, 16759672, 2924588, 10018698, 14034728, 16750742, 9725885, 12955861, 9197131, 12885140, 14907330, 16234194, 8355711, 13092807, 12369186, 14408589, 1556175, 10410725 ].map(d3_rgbString);
+ var d3_category20b = [ 3750777, 5395619, 7040719, 10264286, 6519097, 9216594, 11915115, 13556636, 9202993, 12426809, 15186514, 15190932, 8666169, 11356490, 14049643, 15177372, 8077683, 10834324, 13528509, 14589654 ].map(d3_rgbString);
+ var d3_category20c = [ 3244733, 7057110, 10406625, 13032431, 15095053, 16616764, 16625259, 16634018, 3253076, 7652470, 10607003, 13101504, 7695281, 10394312, 12369372, 14342891, 6513507, 9868950, 12434877, 14277081 ].map(d3_rgbString);
+ d3.scale.quantile = function() {
+ return d3_scale_quantile([], []);
+ };
+ function d3_scale_quantile(domain, range) {
+ var thresholds;
+ function rescale() {
+ var k = 0, q = range.length;
+ thresholds = [];
+ while (++k < q) thresholds[k - 1] = d3.quantile(domain, k / q);
+ return scale;
+ }
+ function scale(x) {
+ if (!isNaN(x = +x)) return range[d3.bisect(thresholds, x)];
+ }
+ scale.domain = function(x) {
+ if (!arguments.length) return domain;
+ domain = x.map(d3_number).filter(d3_numeric).sort(d3_ascending);
+ return rescale();
+ };
+ scale.range = function(x) {
+ if (!arguments.length) return range;
+ range = x;
+ return rescale();
+ };
+ scale.quantiles = function() {
+ return thresholds;
+ };
+ scale.invertExtent = function(y) {
+ y = range.indexOf(y);
+ return y < 0 ? [ NaN, NaN ] : [ y > 0 ? thresholds[y - 1] : domain[0], y < thresholds.length ? thresholds[y] : domain[domain.length - 1] ];
+ };
+ scale.copy = function() {
+ return d3_scale_quantile(domain, range);
+ };
+ return rescale();
+ }
+ d3.scale.quantize = function() {
+ return d3_scale_quantize(0, 1, [ 0, 1 ]);
+ };
+ function d3_scale_quantize(x0, x1, range) {
+ var kx, i;
+ function scale(x) {
+ return range[Math.max(0, Math.min(i, Math.floor(kx * (x - x0))))];
+ }
+ function rescale() {
+ kx = range.length / (x1 - x0);
+ i = range.length - 1;
+ return scale;
+ }
+ scale.domain = function(x) {
+ if (!arguments.length) return [ x0, x1 ];
+ x0 = +x[0];
+ x1 = +x[x.length - 1];
+ return rescale();
+ };
+ scale.range = function(x) {
+ if (!arguments.length) return range;
+ range = x;
+ return rescale();
+ };
+ scale.invertExtent = function(y) {
+ y = range.indexOf(y);
+ y = y < 0 ? NaN : y / kx + x0;
+ return [ y, y + 1 / kx ];
+ };
+ scale.copy = function() {
+ return d3_scale_quantize(x0, x1, range);
+ };
+ return rescale();
+ }
+ d3.scale.threshold = function() {
+ return d3_scale_threshold([ .5 ], [ 0, 1 ]);
+ };
+ function d3_scale_threshold(domain, range) {
+ function scale(x) {
+ if (x <= x) return range[d3.bisect(domain, x)];
+ }
+ scale.domain = function(_) {
+ if (!arguments.length) return domain;
+ domain = _;
+ return scale;
+ };
+ scale.range = function(_) {
+ if (!arguments.length) return range;
+ range = _;
+ return scale;
+ };
+ scale.invertExtent = function(y) {
+ y = range.indexOf(y);
+ return [ domain[y - 1], domain[y] ];
+ };
+ scale.copy = function() {
+ return d3_scale_threshold(domain, range);
+ };
+ return scale;
+ }
+ d3.scale.identity = function() {
+ return d3_scale_identity([ 0, 1 ]);
+ };
+ function d3_scale_identity(domain) {
+ function identity(x) {
+ return +x;
+ }
+ identity.invert = identity;
+ identity.domain = identity.range = function(x) {
+ if (!arguments.length) return domain;
+ domain = x.map(identity);
+ return identity;
+ };
+ identity.ticks = function(m) {
+ return d3_scale_linearTicks(domain, m);
+ };
+ identity.tickFormat = function(m, format) {
+ return d3_scale_linearTickFormat(domain, m, format);
+ };
+ identity.copy = function() {
+ return d3_scale_identity(domain);
+ };
+ return identity;
+ }
+ d3.svg = {};
+ function d3_zero() {
+ return 0;
+ }
+ d3.svg.arc = function() {
+ var innerRadius = d3_svg_arcInnerRadius, outerRadius = d3_svg_arcOuterRadius, cornerRadius = d3_zero, padRadius = d3_svg_arcAuto, startAngle = d3_svg_arcStartAngle, endAngle = d3_svg_arcEndAngle, padAngle = d3_svg_arcPadAngle;
+ function arc() {
+ var r0 = Math.max(0, +innerRadius.apply(this, arguments)), r1 = Math.max(0, +outerRadius.apply(this, arguments)), a0 = startAngle.apply(this, arguments) - halfπ, a1 = endAngle.apply(this, arguments) - halfπ, da = Math.abs(a1 - a0), cw = a0 > a1 ? 0 : 1;
+ if (r1 < r0) rc = r1, r1 = r0, r0 = rc;
+ if (da >= τε) return circleSegment(r1, cw) + (r0 ? circleSegment(r0, 1 - cw) : "") + "Z";
+ var rc, cr, rp, ap, p0 = 0, p1 = 0, x0, y0, x1, y1, x2, y2, x3, y3, path = [];
+ if (ap = (+padAngle.apply(this, arguments) || 0) / 2) {
+ rp = padRadius === d3_svg_arcAuto ? Math.sqrt(r0 * r0 + r1 * r1) : +padRadius.apply(this, arguments);
+ if (!cw) p1 *= -1;
+ if (r1) p1 = d3_asin(rp / r1 * Math.sin(ap));
+ if (r0) p0 = d3_asin(rp / r0 * Math.sin(ap));
+ }
+ if (r1) {
+ x0 = r1 * Math.cos(a0 + p1);
+ y0 = r1 * Math.sin(a0 + p1);
+ x1 = r1 * Math.cos(a1 - p1);
+ y1 = r1 * Math.sin(a1 - p1);
+ var l1 = Math.abs(a1 - a0 - 2 * p1) <= π ? 0 : 1;
+ if (p1 && d3_svg_arcSweep(x0, y0, x1, y1) === cw ^ l1) {
+ var h1 = (a0 + a1) / 2;
+ x0 = r1 * Math.cos(h1);
+ y0 = r1 * Math.sin(h1);
+ x1 = y1 = null;
+ }
+ } else {
+ x0 = y0 = 0;
+ }
+ if (r0) {
+ x2 = r0 * Math.cos(a1 - p0);
+ y2 = r0 * Math.sin(a1 - p0);
+ x3 = r0 * Math.cos(a0 + p0);
+ y3 = r0 * Math.sin(a0 + p0);
+ var l0 = Math.abs(a0 - a1 + 2 * p0) <= π ? 0 : 1;
+ if (p0 && d3_svg_arcSweep(x2, y2, x3, y3) === 1 - cw ^ l0) {
+ var h0 = (a0 + a1) / 2;
+ x2 = r0 * Math.cos(h0);
+ y2 = r0 * Math.sin(h0);
+ x3 = y3 = null;
+ }
+ } else {
+ x2 = y2 = 0;
+ }
+ if (da > ε && (rc = Math.min(Math.abs(r1 - r0) / 2, +cornerRadius.apply(this, arguments))) > .001) {
+ cr = r0 < r1 ^ cw ? 0 : 1;
+ var rc1 = rc, rc0 = rc;
+ if (da < π) {
+ var oc = x3 == null ? [ x2, y2 ] : x1 == null ? [ x0, y0 ] : d3_geom_polygonIntersect([ x0, y0 ], [ x3, y3 ], [ x1, y1 ], [ x2, y2 ]), ax = x0 - oc[0], ay = y0 - oc[1], bx = x1 - oc[0], by = y1 - oc[1], kc = 1 / Math.sin(Math.acos((ax * bx + ay * by) / (Math.sqrt(ax * ax + ay * ay) * Math.sqrt(bx * bx + by * by))) / 2), lc = Math.sqrt(oc[0] * oc[0] + oc[1] * oc[1]);
+ rc0 = Math.min(rc, (r0 - lc) / (kc - 1));
+ rc1 = Math.min(rc, (r1 - lc) / (kc + 1));
+ }
+ if (x1 != null) {
+ var t30 = d3_svg_arcCornerTangents(x3 == null ? [ x2, y2 ] : [ x3, y3 ], [ x0, y0 ], r1, rc1, cw), t12 = d3_svg_arcCornerTangents([ x1, y1 ], [ x2, y2 ], r1, rc1, cw);
+ if (rc === rc1) {
+ path.push("M", t30[0], "A", rc1, ",", rc1, " 0 0,", cr, " ", t30[1], "A", r1, ",", r1, " 0 ", 1 - cw ^ d3_svg_arcSweep(t30[1][0], t30[1][1], t12[1][0], t12[1][1]), ",", cw, " ", t12[1], "A", rc1, ",", rc1, " 0 0,", cr, " ", t12[0]);
+ } else {
+ path.push("M", t30[0], "A", rc1, ",", rc1, " 0 1,", cr, " ", t12[0]);
+ }
+ } else {
+ path.push("M", x0, ",", y0);
+ }
+ if (x3 != null) {
+ var t03 = d3_svg_arcCornerTangents([ x0, y0 ], [ x3, y3 ], r0, -rc0, cw), t21 = d3_svg_arcCornerTangents([ x2, y2 ], x1 == null ? [ x0, y0 ] : [ x1, y1 ], r0, -rc0, cw);
+ if (rc === rc0) {
+ path.push("L", t21[0], "A", rc0, ",", rc0, " 0 0,", cr, " ", t21[1], "A", r0, ",", r0, " 0 ", cw ^ d3_svg_arcSweep(t21[1][0], t21[1][1], t03[1][0], t03[1][1]), ",", 1 - cw, " ", t03[1], "A", rc0, ",", rc0, " 0 0,", cr, " ", t03[0]);
+ } else {
+ path.push("L", t21[0], "A", rc0, ",", rc0, " 0 0,", cr, " ", t03[0]);
+ }
+ } else {
+ path.push("L", x2, ",", y2);
+ }
+ } else {
+ path.push("M", x0, ",", y0);
+ if (x1 != null) path.push("A", r1, ",", r1, " 0 ", l1, ",", cw, " ", x1, ",", y1);
+ path.push("L", x2, ",", y2);
+ if (x3 != null) path.push("A", r0, ",", r0, " 0 ", l0, ",", 1 - cw, " ", x3, ",", y3);
+ }
+ path.push("Z");
+ return path.join("");
+ }
+ function circleSegment(r1, cw) {
+ return "M0," + r1 + "A" + r1 + "," + r1 + " 0 1," + cw + " 0," + -r1 + "A" + r1 + "," + r1 + " 0 1," + cw + " 0," + r1;
+ }
+ arc.innerRadius = function(v) {
+ if (!arguments.length) return innerRadius;
+ innerRadius = d3_functor(v);
+ return arc;
+ };
+ arc.outerRadius = function(v) {
+ if (!arguments.length) return outerRadius;
+ outerRadius = d3_functor(v);
+ return arc;
+ };
+ arc.cornerRadius = function(v) {
+ if (!arguments.length) return cornerRadius;
+ cornerRadius = d3_functor(v);
+ return arc;
+ };
+ arc.padRadius = function(v) {
+ if (!arguments.length) return padRadius;
+ padRadius = v == d3_svg_arcAuto ? d3_svg_arcAuto : d3_functor(v);
+ return arc;
+ };
+ arc.startAngle = function(v) {
+ if (!arguments.length) return startAngle;
+ startAngle = d3_functor(v);
+ return arc;
+ };
+ arc.endAngle = function(v) {
+ if (!arguments.length) return endAngle;
+ endAngle = d3_functor(v);
+ return arc;
+ };
+ arc.padAngle = function(v) {
+ if (!arguments.length) return padAngle;
+ padAngle = d3_functor(v);
+ return arc;
+ };
+ arc.centroid = function() {
+ var r = (+innerRadius.apply(this, arguments) + +outerRadius.apply(this, arguments)) / 2, a = (+startAngle.apply(this, arguments) + +endAngle.apply(this, arguments)) / 2 - halfπ;
+ return [ Math.cos(a) * r, Math.sin(a) * r ];
+ };
+ return arc;
+ };
+ var d3_svg_arcAuto = "auto";
+ function d3_svg_arcInnerRadius(d) {
+ return d.innerRadius;
+ }
+ function d3_svg_arcOuterRadius(d) {
+ return d.outerRadius;
+ }
+ function d3_svg_arcStartAngle(d) {
+ return d.startAngle;
+ }
+ function d3_svg_arcEndAngle(d) {
+ return d.endAngle;
+ }
+ function d3_svg_arcPadAngle(d) {
+ return d && d.padAngle;
+ }
+ function d3_svg_arcSweep(x0, y0, x1, y1) {
+ return (x0 - x1) * y0 - (y0 - y1) * x0 > 0 ? 0 : 1;
+ }
+ function d3_svg_arcCornerTangents(p0, p1, r1, rc, cw) {
+ var x01 = p0[0] - p1[0], y01 = p0[1] - p1[1], lo = (cw ? rc : -rc) / Math.sqrt(x01 * x01 + y01 * y01), ox = lo * y01, oy = -lo * x01, x1 = p0[0] + ox, y1 = p0[1] + oy, x2 = p1[0] + ox, y2 = p1[1] + oy, x3 = (x1 + x2) / 2, y3 = (y1 + y2) / 2, dx = x2 - x1, dy = y2 - y1, d2 = dx * dx + dy * dy, r = r1 - rc, D = x1 * y2 - x2 * y1, d = (dy < 0 ? -1 : 1) * Math.sqrt(Math.max(0, r * r * d2 - D * D)), cx0 = (D * dy - dx * d) / d2, cy0 = (-D * dx - dy * d) / d2, cx1 = (D * dy + dx * d) / d2, cy1 = (-D * dx + dy * d) / d2, dx0 = cx0 - x3, dy0 = cy0 - y3, dx1 = cx1 - x3, dy1 = cy1 - y3;
+ if (dx0 * dx0 + dy0 * dy0 > dx1 * dx1 + dy1 * dy1) cx0 = cx1, cy0 = cy1;
+ return [ [ cx0 - ox, cy0 - oy ], [ cx0 * r1 / r, cy0 * r1 / r ] ];
+ }
+ function d3_svg_line(projection) {
+ var x = d3_geom_pointX, y = d3_geom_pointY, defined = d3_true, interpolate = d3_svg_lineLinear, interpolateKey = interpolate.key, tension = .7;
+ function line(data) {
+ var segments = [], points = [], i = -1, n = data.length, d, fx = d3_functor(x), fy = d3_functor(y);
+ function segment() {
+ segments.push("M", interpolate(projection(points), tension));
+ }
+ while (++i < n) {
+ if (defined.call(this, d = data[i], i)) {
+ points.push([ +fx.call(this, d, i), +fy.call(this, d, i) ]);
+ } else if (points.length) {
+ segment();
+ points = [];
+ }
+ }
+ if (points.length) segment();
+ return segments.length ? segments.join("") : null;
+ }
+ line.x = function(_) {
+ if (!arguments.length) return x;
+ x = _;
+ return line;
+ };
+ line.y = function(_) {
+ if (!arguments.length) return y;
+ y = _;
+ return line;
+ };
+ line.defined = function(_) {
+ if (!arguments.length) return defined;
+ defined = _;
+ return line;
+ };
+ line.interpolate = function(_) {
+ if (!arguments.length) return interpolateKey;
+ if (typeof _ === "function") interpolateKey = interpolate = _; else interpolateKey = (interpolate = d3_svg_lineInterpolators.get(_) || d3_svg_lineLinear).key;
+ return line;
+ };
+ line.tension = function(_) {
+ if (!arguments.length) return tension;
+ tension = _;
+ return line;
+ };
+ return line;
+ }
+ d3.svg.line = function() {
+ return d3_svg_line(d3_identity);
+ };
+ var d3_svg_lineInterpolators = d3.map({
+ linear: d3_svg_lineLinear,
+ "linear-closed": d3_svg_lineLinearClosed,
+ step: d3_svg_lineStep,
+ "step-before": d3_svg_lineStepBefore,
+ "step-after": d3_svg_lineStepAfter,
+ basis: d3_svg_lineBasis,
+ "basis-open": d3_svg_lineBasisOpen,
+ "basis-closed": d3_svg_lineBasisClosed,
+ bundle: d3_svg_lineBundle,
+ cardinal: d3_svg_lineCardinal,
+ "cardinal-open": d3_svg_lineCardinalOpen,
+ "cardinal-closed": d3_svg_lineCardinalClosed,
+ monotone: d3_svg_lineMonotone
+ });
+ d3_svg_lineInterpolators.forEach(function(key, value) {
+ value.key = key;
+ value.closed = /-closed$/.test(key);
+ });
+ function d3_svg_lineLinear(points) {
+ return points.length > 1 ? points.join("L") : points + "Z";
+ }
+ function d3_svg_lineLinearClosed(points) {
+ return points.join("L") + "Z";
+ }
+ function d3_svg_lineStep(points) {
+ var i = 0, n = points.length, p = points[0], path = [ p[0], ",", p[1] ];
+ while (++i < n) path.push("H", (p[0] + (p = points[i])[0]) / 2, "V", p[1]);
+ if (n > 1) path.push("H", p[0]);
+ return path.join("");
+ }
+ function d3_svg_lineStepBefore(points) {
+ var i = 0, n = points.length, p = points[0], path = [ p[0], ",", p[1] ];
+ while (++i < n) path.push("V", (p = points[i])[1], "H", p[0]);
+ return path.join("");
+ }
+ function d3_svg_lineStepAfter(points) {
+ var i = 0, n = points.length, p = points[0], path = [ p[0], ",", p[1] ];
+ while (++i < n) path.push("H", (p = points[i])[0], "V", p[1]);
+ return path.join("");
+ }
+ function d3_svg_lineCardinalOpen(points, tension) {
+ return points.length < 4 ? d3_svg_lineLinear(points) : points[1] + d3_svg_lineHermite(points.slice(1, -1), d3_svg_lineCardinalTangents(points, tension));
+ }
+ function d3_svg_lineCardinalClosed(points, tension) {
+ return points.length < 3 ? d3_svg_lineLinearClosed(points) : points[0] + d3_svg_lineHermite((points.push(points[0]),
+ points), d3_svg_lineCardinalTangents([ points[points.length - 2] ].concat(points, [ points[1] ]), tension));
+ }
+ function d3_svg_lineCardinal(points, tension) {
+ return points.length < 3 ? d3_svg_lineLinear(points) : points[0] + d3_svg_lineHermite(points, d3_svg_lineCardinalTangents(points, tension));
+ }
+ function d3_svg_lineHermite(points, tangents) {
+ if (tangents.length < 1 || points.length != tangents.length && points.length != tangents.length + 2) {
+ return d3_svg_lineLinear(points);
+ }
+ var quad = points.length != tangents.length, path = "", p0 = points[0], p = points[1], t0 = tangents[0], t = t0, pi = 1;
+ if (quad) {
+ path += "Q" + (p[0] - t0[0] * 2 / 3) + "," + (p[1] - t0[1] * 2 / 3) + "," + p[0] + "," + p[1];
+ p0 = points[1];
+ pi = 2;
+ }
+ if (tangents.length > 1) {
+ t = tangents[1];
+ p = points[pi];
+ pi++;
+ path += "C" + (p0[0] + t0[0]) + "," + (p0[1] + t0[1]) + "," + (p[0] - t[0]) + "," + (p[1] - t[1]) + "," + p[0] + "," + p[1];
+ for (var i = 2; i < tangents.length; i++, pi++) {
+ p = points[pi];
+ t = tangents[i];
+ path += "S" + (p[0] - t[0]) + "," + (p[1] - t[1]) + "," + p[0] + "," + p[1];
+ }
+ }
+ if (quad) {
+ var lp = points[pi];
+ path += "Q" + (p[0] + t[0] * 2 / 3) + "," + (p[1] + t[1] * 2 / 3) + "," + lp[0] + "," + lp[1];
+ }
+ return path;
+ }
+ function d3_svg_lineCardinalTangents(points, tension) {
+ var tangents = [], a = (1 - tension) / 2, p0, p1 = points[0], p2 = points[1], i = 1, n = points.length;
+ while (++i < n) {
+ p0 = p1;
+ p1 = p2;
+ p2 = points[i];
+ tangents.push([ a * (p2[0] - p0[0]), a * (p2[1] - p0[1]) ]);
+ }
+ return tangents;
+ }
+ function d3_svg_lineBasis(points) {
+ if (points.length < 3) return d3_svg_lineLinear(points);
+ var i = 1, n = points.length, pi = points[0], x0 = pi[0], y0 = pi[1], px = [ x0, x0, x0, (pi = points[1])[0] ], py = [ y0, y0, y0, pi[1] ], path = [ x0, ",", y0, "L", d3_svg_lineDot4(d3_svg_lineBasisBezier3, px), ",", d3_svg_lineDot4(d3_svg_lineBasisBezier3, py) ];
+ points.push(points[n - 1]);
+ while (++i <= n) {
+ pi = points[i];
+ px.shift();
+ px.push(pi[0]);
+ py.shift();
+ py.push(pi[1]);
+ d3_svg_lineBasisBezier(path, px, py);
+ }
+ points.pop();
+ path.push("L", pi);
+ return path.join("");
+ }
+ function d3_svg_lineBasisOpen(points) {
+ if (points.length < 4) return d3_svg_lineLinear(points);
+ var path = [], i = -1, n = points.length, pi, px = [ 0 ], py = [ 0 ];
+ while (++i < 3) {
+ pi = points[i];
+ px.push(pi[0]);
+ py.push(pi[1]);
+ }
+ path.push(d3_svg_lineDot4(d3_svg_lineBasisBezier3, px) + "," + d3_svg_lineDot4(d3_svg_lineBasisBezier3, py));
+ --i;
+ while (++i < n) {
+ pi = points[i];
+ px.shift();
+ px.push(pi[0]);
+ py.shift();
+ py.push(pi[1]);
+ d3_svg_lineBasisBezier(path, px, py);
+ }
+ return path.join("");
+ }
+ function d3_svg_lineBasisClosed(points) {
+ var path, i = -1, n = points.length, m = n + 4, pi, px = [], py = [];
+ while (++i < 4) {
+ pi = points[i % n];
+ px.push(pi[0]);
+ py.push(pi[1]);
+ }
+ path = [ d3_svg_lineDot4(d3_svg_lineBasisBezier3, px), ",", d3_svg_lineDot4(d3_svg_lineBasisBezier3, py) ];
+ --i;
+ while (++i < m) {
+ pi = points[i % n];
+ px.shift();
+ px.push(pi[0]);
+ py.shift();
+ py.push(pi[1]);
+ d3_svg_lineBasisBezier(path, px, py);
+ }
+ return path.join("");
+ }
+ function d3_svg_lineBundle(points, tension) {
+ var n = points.length - 1;
+ if (n) {
+ var x0 = points[0][0], y0 = points[0][1], dx = points[n][0] - x0, dy = points[n][1] - y0, i = -1, p, t;
+ while (++i <= n) {
+ p = points[i];
+ t = i / n;
+ p[0] = tension * p[0] + (1 - tension) * (x0 + t * dx);
+ p[1] = tension * p[1] + (1 - tension) * (y0 + t * dy);
+ }
+ }
+ return d3_svg_lineBasis(points);
+ }
+ function d3_svg_lineDot4(a, b) {
+ return a[0] * b[0] + a[1] * b[1] + a[2] * b[2] + a[3] * b[3];
+ }
+ var d3_svg_lineBasisBezier1 = [ 0, 2 / 3, 1 / 3, 0 ], d3_svg_lineBasisBezier2 = [ 0, 1 / 3, 2 / 3, 0 ], d3_svg_lineBasisBezier3 = [ 0, 1 / 6, 2 / 3, 1 / 6 ];
+ function d3_svg_lineBasisBezier(path, x, y) {
+ path.push("C", d3_svg_lineDot4(d3_svg_lineBasisBezier1, x), ",", d3_svg_lineDot4(d3_svg_lineBasisBezier1, y), ",", d3_svg_lineDot4(d3_svg_lineBasisBezier2, x), ",", d3_svg_lineDot4(d3_svg_lineBasisBezier2, y), ",", d3_svg_lineDot4(d3_svg_lineBasisBezier3, x), ",", d3_svg_lineDot4(d3_svg_lineBasisBezier3, y));
+ }
+ function d3_svg_lineSlope(p0, p1) {
+ return (p1[1] - p0[1]) / (p1[0] - p0[0]);
+ }
+ function d3_svg_lineFiniteDifferences(points) {
+ var i = 0, j = points.length - 1, m = [], p0 = points[0], p1 = points[1], d = m[0] = d3_svg_lineSlope(p0, p1);
+ while (++i < j) {
+ m[i] = (d + (d = d3_svg_lineSlope(p0 = p1, p1 = points[i + 1]))) / 2;
+ }
+ m[i] = d;
+ return m;
+ }
+ function d3_svg_lineMonotoneTangents(points) {
+ var tangents = [], d, a, b, s, m = d3_svg_lineFiniteDifferences(points), i = -1, j = points.length - 1;
+ while (++i < j) {
+ d = d3_svg_lineSlope(points[i], points[i + 1]);
+ if (abs(d) < ε) {
+ m[i] = m[i + 1] = 0;
+ } else {
+ a = m[i] / d;
+ b = m[i + 1] / d;
+ s = a * a + b * b;
+ if (s > 9) {
+ s = d * 3 / Math.sqrt(s);
+ m[i] = s * a;
+ m[i + 1] = s * b;
+ }
+ }
+ }
+ i = -1;
+ while (++i <= j) {
+ s = (points[Math.min(j, i + 1)][0] - points[Math.max(0, i - 1)][0]) / (6 * (1 + m[i] * m[i]));
+ tangents.push([ s || 0, m[i] * s || 0 ]);
+ }
+ return tangents;
+ }
+ function d3_svg_lineMonotone(points) {
+ return points.length < 3 ? d3_svg_lineLinear(points) : points[0] + d3_svg_lineHermite(points, d3_svg_lineMonotoneTangents(points));
+ }
+ d3.svg.line.radial = function() {
+ var line = d3_svg_line(d3_svg_lineRadial);
+ line.radius = line.x, delete line.x;
+ line.angle = line.y, delete line.y;
+ return line;
+ };
+ function d3_svg_lineRadial(points) {
+ var point, i = -1, n = points.length, r, a;
+ while (++i < n) {
+ point = points[i];
+ r = point[0];
+ a = point[1] - halfπ;
+ point[0] = r * Math.cos(a);
+ point[1] = r * Math.sin(a);
+ }
+ return points;
+ }
+ function d3_svg_area(projection) {
+ var x0 = d3_geom_pointX, x1 = d3_geom_pointX, y0 = 0, y1 = d3_geom_pointY, defined = d3_true, interpolate = d3_svg_lineLinear, interpolateKey = interpolate.key, interpolateReverse = interpolate, L = "L", tension = .7;
+ function area(data) {
+ var segments = [], points0 = [], points1 = [], i = -1, n = data.length, d, fx0 = d3_functor(x0), fy0 = d3_functor(y0), fx1 = x0 === x1 ? function() {
+ return x;
+ } : d3_functor(x1), fy1 = y0 === y1 ? function() {
+ return y;
+ } : d3_functor(y1), x, y;
+ function segment() {
+ segments.push("M", interpolate(projection(points1), tension), L, interpolateReverse(projection(points0.reverse()), tension), "Z");
+ }
+ while (++i < n) {
+ if (defined.call(this, d = data[i], i)) {
+ points0.push([ x = +fx0.call(this, d, i), y = +fy0.call(this, d, i) ]);
+ points1.push([ +fx1.call(this, d, i), +fy1.call(this, d, i) ]);
+ } else if (points0.length) {
+ segment();
+ points0 = [];
+ points1 = [];
+ }
+ }
+ if (points0.length) segment();
+ return segments.length ? segments.join("") : null;
+ }
+ area.x = function(_) {
+ if (!arguments.length) return x1;
+ x0 = x1 = _;
+ return area;
+ };
+ area.x0 = function(_) {
+ if (!arguments.length) return x0;
+ x0 = _;
+ return area;
+ };
+ area.x1 = function(_) {
+ if (!arguments.length) return x1;
+ x1 = _;
+ return area;
+ };
+ area.y = function(_) {
+ if (!arguments.length) return y1;
+ y0 = y1 = _;
+ return area;
+ };
+ area.y0 = function(_) {
+ if (!arguments.length) return y0;
+ y0 = _;
+ return area;
+ };
+ area.y1 = function(_) {
+ if (!arguments.length) return y1;
+ y1 = _;
+ return area;
+ };
+ area.defined = function(_) {
+ if (!arguments.length) return defined;
+ defined = _;
+ return area;
+ };
+ area.interpolate = function(_) {
+ if (!arguments.length) return interpolateKey;
+ if (typeof _ === "function") interpolateKey = interpolate = _; else interpolateKey = (interpolate = d3_svg_lineInterpolators.get(_) || d3_svg_lineLinear).key;
+ interpolateReverse = interpolate.reverse || interpolate;
+ L = interpolate.closed ? "M" : "L";
+ return area;
+ };
+ area.tension = function(_) {
+ if (!arguments.length) return tension;
+ tension = _;
+ return area;
+ };
+ return area;
+ }
+ d3_svg_lineStepBefore.reverse = d3_svg_lineStepAfter;
+ d3_svg_lineStepAfter.reverse = d3_svg_lineStepBefore;
+ d3.svg.area = function() {
+ return d3_svg_area(d3_identity);
+ };
+ d3.svg.area.radial = function() {
+ var area = d3_svg_area(d3_svg_lineRadial);
+ area.radius = area.x, delete area.x;
+ area.innerRadius = area.x0, delete area.x0;
+ area.outerRadius = area.x1, delete area.x1;
+ area.angle = area.y, delete area.y;
+ area.startAngle = area.y0, delete area.y0;
+ area.endAngle = area.y1, delete area.y1;
+ return area;
+ };
+ d3.svg.chord = function() {
+ var source = d3_source, target = d3_target, radius = d3_svg_chordRadius, startAngle = d3_svg_arcStartAngle, endAngle = d3_svg_arcEndAngle;
+ function chord(d, i) {
+ var s = subgroup(this, source, d, i), t = subgroup(this, target, d, i);
+ return "M" + s.p0 + arc(s.r, s.p1, s.a1 - s.a0) + (equals(s, t) ? curve(s.r, s.p1, s.r, s.p0) : curve(s.r, s.p1, t.r, t.p0) + arc(t.r, t.p1, t.a1 - t.a0) + curve(t.r, t.p1, s.r, s.p0)) + "Z";
+ }
+ function subgroup(self, f, d, i) {
+ var subgroup = f.call(self, d, i), r = radius.call(self, subgroup, i), a0 = startAngle.call(self, subgroup, i) - halfπ, a1 = endAngle.call(self, subgroup, i) - halfπ;
+ return {
+ r: r,
+ a0: a0,
+ a1: a1,
+ p0: [ r * Math.cos(a0), r * Math.sin(a0) ],
+ p1: [ r * Math.cos(a1), r * Math.sin(a1) ]
+ };
+ }
+ function equals(a, b) {
+ return a.a0 == b.a0 && a.a1 == b.a1;
+ }
+ function arc(r, p, a) {
+ return "A" + r + "," + r + " 0 " + +(a > π) + ",1 " + p;
+ }
+ function curve(r0, p0, r1, p1) {
+ return "Q 0,0 " + p1;
+ }
+ chord.radius = function(v) {
+ if (!arguments.length) return radius;
+ radius = d3_functor(v);
+ return chord;
+ };
+ chord.source = function(v) {
+ if (!arguments.length) return source;
+ source = d3_functor(v);
+ return chord;
+ };
+ chord.target = function(v) {
+ if (!arguments.length) return target;
+ target = d3_functor(v);
+ return chord;
+ };
+ chord.startAngle = function(v) {
+ if (!arguments.length) return startAngle;
+ startAngle = d3_functor(v);
+ return chord;
+ };
+ chord.endAngle = function(v) {
+ if (!arguments.length) return endAngle;
+ endAngle = d3_functor(v);
+ return chord;
+ };
+ return chord;
+ };
+ function d3_svg_chordRadius(d) {
+ return d.radius;
+ }
+ d3.svg.diagonal = function() {
+ var source = d3_source, target = d3_target, projection = d3_svg_diagonalProjection;
+ function diagonal(d, i) {
+ var p0 = source.call(this, d, i), p3 = target.call(this, d, i), m = (p0.y + p3.y) / 2, p = [ p0, {
+ x: p0.x,
+ y: m
+ }, {
+ x: p3.x,
+ y: m
+ }, p3 ];
+ p = p.map(projection);
+ return "M" + p[0] + "C" + p[1] + " " + p[2] + " " + p[3];
+ }
+ diagonal.source = function(x) {
+ if (!arguments.length) return source;
+ source = d3_functor(x);
+ return diagonal;
+ };
+ diagonal.target = function(x) {
+ if (!arguments.length) return target;
+ target = d3_functor(x);
+ return diagonal;
+ };
+ diagonal.projection = function(x) {
+ if (!arguments.length) return projection;
+ projection = x;
+ return diagonal;
+ };
+ return diagonal;
+ };
+ function d3_svg_diagonalProjection(d) {
+ return [ d.x, d.y ];
+ }
+ d3.svg.diagonal.radial = function() {
+ var diagonal = d3.svg.diagonal(), projection = d3_svg_diagonalProjection, projection_ = diagonal.projection;
+ diagonal.projection = function(x) {
+ return arguments.length ? projection_(d3_svg_diagonalRadialProjection(projection = x)) : projection;
+ };
+ return diagonal;
+ };
+ function d3_svg_diagonalRadialProjection(projection) {
+ return function() {
+ var d = projection.apply(this, arguments), r = d[0], a = d[1] - halfπ;
+ return [ r * Math.cos(a), r * Math.sin(a) ];
+ };
+ }
+ d3.svg.symbol = function() {
+ var type = d3_svg_symbolType, size = d3_svg_symbolSize;
+ function symbol(d, i) {
+ return (d3_svg_symbols.get(type.call(this, d, i)) || d3_svg_symbolCircle)(size.call(this, d, i));
+ }
+ symbol.type = function(x) {
+ if (!arguments.length) return type;
+ type = d3_functor(x);
+ return symbol;
+ };
+ symbol.size = function(x) {
+ if (!arguments.length) return size;
+ size = d3_functor(x);
+ return symbol;
+ };
+ return symbol;
+ };
+ function d3_svg_symbolSize() {
+ return 64;
+ }
+ function d3_svg_symbolType() {
+ return "circle";
+ }
+ function d3_svg_symbolCircle(size) {
+ var r = Math.sqrt(size / π);
+ return "M0," + r + "A" + r + "," + r + " 0 1,1 0," + -r + "A" + r + "," + r + " 0 1,1 0," + r + "Z";
+ }
+ var d3_svg_symbols = d3.map({
+ circle: d3_svg_symbolCircle,
+ cross: function(size) {
+ var r = Math.sqrt(size / 5) / 2;
+ return "M" + -3 * r + "," + -r + "H" + -r + "V" + -3 * r + "H" + r + "V" + -r + "H" + 3 * r + "V" + r + "H" + r + "V" + 3 * r + "H" + -r + "V" + r + "H" + -3 * r + "Z";
+ },
+ diamond: function(size) {
+ var ry = Math.sqrt(size / (2 * d3_svg_symbolTan30)), rx = ry * d3_svg_symbolTan30;
+ return "M0," + -ry + "L" + rx + ",0" + " 0," + ry + " " + -rx + ",0" + "Z";
+ },
+ square: function(size) {
+ var r = Math.sqrt(size) / 2;
+ return "M" + -r + "," + -r + "L" + r + "," + -r + " " + r + "," + r + " " + -r + "," + r + "Z";
+ },
+ "triangle-down": function(size) {
+ var rx = Math.sqrt(size / d3_svg_symbolSqrt3), ry = rx * d3_svg_symbolSqrt3 / 2;
+ return "M0," + ry + "L" + rx + "," + -ry + " " + -rx + "," + -ry + "Z";
+ },
+ "triangle-up": function(size) {
+ var rx = Math.sqrt(size / d3_svg_symbolSqrt3), ry = rx * d3_svg_symbolSqrt3 / 2;
+ return "M0," + -ry + "L" + rx + "," + ry + " " + -rx + "," + ry + "Z";
+ }
+ });
+ d3.svg.symbolTypes = d3_svg_symbols.keys();
+ var d3_svg_symbolSqrt3 = Math.sqrt(3), d3_svg_symbolTan30 = Math.tan(30 * d3_radians);
+ d3_selectionPrototype.transition = function(name) {
+ var id = d3_transitionInheritId || ++d3_transitionId, ns = d3_transitionNamespace(name), subgroups = [], subgroup, node, transition = d3_transitionInherit || {
+ time: Date.now(),
+ ease: d3_ease_cubicInOut,
+ delay: 0,
+ duration: 250
+ };
+ for (var j = -1, m = this.length; ++j < m; ) {
+ subgroups.push(subgroup = []);
+ for (var group = this[j], i = -1, n = group.length; ++i < n; ) {
+ if (node = group[i]) d3_transitionNode(node, i, ns, id, transition);
+ subgroup.push(node);
+ }
+ }
+ return d3_transition(subgroups, ns, id);
+ };
+ d3_selectionPrototype.interrupt = function(name) {
+ return this.each(name == null ? d3_selection_interrupt : d3_selection_interruptNS(d3_transitionNamespace(name)));
+ };
+ var d3_selection_interrupt = d3_selection_interruptNS(d3_transitionNamespace());
+ function d3_selection_interruptNS(ns) {
+ return function() {
+ var lock, activeId, active;
+ if ((lock = this[ns]) && (active = lock[activeId = lock.active])) {
+ active.timer.c = null;
+ active.timer.t = NaN;
+ if (--lock.count) delete lock[activeId]; else delete this[ns];
+ lock.active += .5;
+ active.event && active.event.interrupt.call(this, this.__data__, active.index);
+ }
+ };
+ }
+ function d3_transition(groups, ns, id) {
+ d3_subclass(groups, d3_transitionPrototype);
+ groups.namespace = ns;
+ groups.id = id;
+ return groups;
+ }
+ var d3_transitionPrototype = [], d3_transitionId = 0, d3_transitionInheritId, d3_transitionInherit;
+ d3_transitionPrototype.call = d3_selectionPrototype.call;
+ d3_transitionPrototype.empty = d3_selectionPrototype.empty;
+ d3_transitionPrototype.node = d3_selectionPrototype.node;
+ d3_transitionPrototype.size = d3_selectionPrototype.size;
+ d3.transition = function(selection, name) {
+ return selection && selection.transition ? d3_transitionInheritId ? selection.transition(name) : selection : d3.selection().transition(selection);
+ };
+ d3.transition.prototype = d3_transitionPrototype;
+ d3_transitionPrototype.select = function(selector) {
+ var id = this.id, ns = this.namespace, subgroups = [], subgroup, subnode, node;
+ selector = d3_selection_selector(selector);
+ for (var j = -1, m = this.length; ++j < m; ) {
+ subgroups.push(subgroup = []);
+ for (var group = this[j], i = -1, n = group.length; ++i < n; ) {
+ if ((node = group[i]) && (subnode = selector.call(node, node.__data__, i, j))) {
+ if ("__data__" in node) subnode.__data__ = node.__data__;
+ d3_transitionNode(subnode, i, ns, id, node[ns][id]);
+ subgroup.push(subnode);
+ } else {
+ subgroup.push(null);
+ }
+ }
+ }
+ return d3_transition(subgroups, ns, id);
+ };
+ d3_transitionPrototype.selectAll = function(selector) {
+ var id = this.id, ns = this.namespace, subgroups = [], subgroup, subnodes, node, subnode, transition;
+ selector = d3_selection_selectorAll(selector);
+ for (var j = -1, m = this.length; ++j < m; ) {
+ for (var group = this[j], i = -1, n = group.length; ++i < n; ) {
+ if (node = group[i]) {
+ transition = node[ns][id];
+ subnodes = selector.call(node, node.__data__, i, j);
+ subgroups.push(subgroup = []);
+ for (var k = -1, o = subnodes.length; ++k < o; ) {
+ if (subnode = subnodes[k]) d3_transitionNode(subnode, k, ns, id, transition);
+ subgroup.push(subnode);
+ }
+ }
+ }
+ }
+ return d3_transition(subgroups, ns, id);
+ };
+ d3_transitionPrototype.filter = function(filter) {
+ var subgroups = [], subgroup, group, node;
+ if (typeof filter !== "function") filter = d3_selection_filter(filter);
+ for (var j = 0, m = this.length; j < m; j++) {
+ subgroups.push(subgroup = []);
+ for (var group = this[j], i = 0, n = group.length; i < n; i++) {
+ if ((node = group[i]) && filter.call(node, node.__data__, i, j)) {
+ subgroup.push(node);
+ }
+ }
+ }
+ return d3_transition(subgroups, this.namespace, this.id);
+ };
+ d3_transitionPrototype.tween = function(name, tween) {
+ var id = this.id, ns = this.namespace;
+ if (arguments.length < 2) return this.node()[ns][id].tween.get(name);
+ return d3_selection_each(this, tween == null ? function(node) {
+ node[ns][id].tween.remove(name);
+ } : function(node) {
+ node[ns][id].tween.set(name, tween);
+ });
+ };
+ function d3_transition_tween(groups, name, value, tween) {
+ var id = groups.id, ns = groups.namespace;
+ return d3_selection_each(groups, typeof value === "function" ? function(node, i, j) {
+ node[ns][id].tween.set(name, tween(value.call(node, node.__data__, i, j)));
+ } : (value = tween(value), function(node) {
+ node[ns][id].tween.set(name, value);
+ }));
+ }
+ d3_transitionPrototype.attr = function(nameNS, value) {
+ if (arguments.length < 2) {
+ for (value in nameNS) this.attr(value, nameNS[value]);
+ return this;
+ }
+ var interpolate = nameNS == "transform" ? d3_interpolateTransform : d3_interpolate, name = d3.ns.qualify(nameNS);
+ function attrNull() {
+ this.removeAttribute(name);
+ }
+ function attrNullNS() {
+ this.removeAttributeNS(name.space, name.local);
+ }
+ function attrTween(b) {
+ return b == null ? attrNull : (b += "", function() {
+ var a = this.getAttribute(name), i;
+ return a !== b && (i = interpolate(a, b), function(t) {
+ this.setAttribute(name, i(t));
+ });
+ });
+ }
+ function attrTweenNS(b) {
+ return b == null ? attrNullNS : (b += "", function() {
+ var a = this.getAttributeNS(name.space, name.local), i;
+ return a !== b && (i = interpolate(a, b), function(t) {
+ this.setAttributeNS(name.space, name.local, i(t));
+ });
+ });
+ }
+ return d3_transition_tween(this, "attr." + nameNS, value, name.local ? attrTweenNS : attrTween);
+ };
+ d3_transitionPrototype.attrTween = function(nameNS, tween) {
+ var name = d3.ns.qualify(nameNS);
+ function attrTween(d, i) {
+ var f = tween.call(this, d, i, this.getAttribute(name));
+ return f && function(t) {
+ this.setAttribute(name, f(t));
+ };
+ }
+ function attrTweenNS(d, i) {
+ var f = tween.call(this, d, i, this.getAttributeNS(name.space, name.local));
+ return f && function(t) {
+ this.setAttributeNS(name.space, name.local, f(t));
+ };
+ }
+ return this.tween("attr." + nameNS, name.local ? attrTweenNS : attrTween);
+ };
+ d3_transitionPrototype.style = function(name, value, priority) {
+ var n = arguments.length;
+ if (n < 3) {
+ if (typeof name !== "string") {
+ if (n < 2) value = "";
+ for (priority in name) this.style(priority, name[priority], value);
+ return this;
+ }
+ priority = "";
+ }
+ function styleNull() {
+ this.style.removeProperty(name);
+ }
+ function styleString(b) {
+ return b == null ? styleNull : (b += "", function() {
+ var a = d3_window(this).getComputedStyle(this, null).getPropertyValue(name), i;
+ return a !== b && (i = d3_interpolate(a, b), function(t) {
+ this.style.setProperty(name, i(t), priority);
+ });
+ });
+ }
+ return d3_transition_tween(this, "style." + name, value, styleString);
+ };
+ d3_transitionPrototype.styleTween = function(name, tween, priority) {
+ if (arguments.length < 3) priority = "";
+ function styleTween(d, i) {
+ var f = tween.call(this, d, i, d3_window(this).getComputedStyle(this, null).getPropertyValue(name));
+ return f && function(t) {
+ this.style.setProperty(name, f(t), priority);
+ };
+ }
+ return this.tween("style." + name, styleTween);
+ };
+ d3_transitionPrototype.text = function(value) {
+ return d3_transition_tween(this, "text", value, d3_transition_text);
+ };
+ function d3_transition_text(b) {
+ if (b == null) b = "";
+ return function() {
+ this.textContent = b;
+ };
+ }
+ d3_transitionPrototype.remove = function() {
+ var ns = this.namespace;
+ return this.each("end.transition", function() {
+ var p;
+ if (this[ns].count < 2 && (p = this.parentNode)) p.removeChild(this);
+ });
+ };
+ d3_transitionPrototype.ease = function(value) {
+ var id = this.id, ns = this.namespace;
+ if (arguments.length < 1) return this.node()[ns][id].ease;
+ if (typeof value !== "function") value = d3.ease.apply(d3, arguments);
+ return d3_selection_each(this, function(node) {
+ node[ns][id].ease = value;
+ });
+ };
+ d3_transitionPrototype.delay = function(value) {
+ var id = this.id, ns = this.namespace;
+ if (arguments.length < 1) return this.node()[ns][id].delay;
+ return d3_selection_each(this, typeof value === "function" ? function(node, i, j) {
+ node[ns][id].delay = +value.call(node, node.__data__, i, j);
+ } : (value = +value, function(node) {
+ node[ns][id].delay = value;
+ }));
+ };
+ d3_transitionPrototype.duration = function(value) {
+ var id = this.id, ns = this.namespace;
+ if (arguments.length < 1) return this.node()[ns][id].duration;
+ return d3_selection_each(this, typeof value === "function" ? function(node, i, j) {
+ node[ns][id].duration = Math.max(1, value.call(node, node.__data__, i, j));
+ } : (value = Math.max(1, value), function(node) {
+ node[ns][id].duration = value;
+ }));
+ };
+ d3_transitionPrototype.each = function(type, listener) {
+ var id = this.id, ns = this.namespace;
+ if (arguments.length < 2) {
+ var inherit = d3_transitionInherit, inheritId = d3_transitionInheritId;
+ try {
+ d3_transitionInheritId = id;
+ d3_selection_each(this, function(node, i, j) {
+ d3_transitionInherit = node[ns][id];
+ type.call(node, node.__data__, i, j);
+ });
+ } finally {
+ d3_transitionInherit = inherit;
+ d3_transitionInheritId = inheritId;
+ }
+ } else {
+ d3_selection_each(this, function(node) {
+ var transition = node[ns][id];
+ (transition.event || (transition.event = d3.dispatch("start", "end", "interrupt"))).on(type, listener);
+ });
+ }
+ return this;
+ };
+ d3_transitionPrototype.transition = function() {
+ var id0 = this.id, id1 = ++d3_transitionId, ns = this.namespace, subgroups = [], subgroup, group, node, transition;
+ for (var j = 0, m = this.length; j < m; j++) {
+ subgroups.push(subgroup = []);
+ for (var group = this[j], i = 0, n = group.length; i < n; i++) {
+ if (node = group[i]) {
+ transition = node[ns][id0];
+ d3_transitionNode(node, i, ns, id1, {
+ time: transition.time,
+ ease: transition.ease,
+ delay: transition.delay + transition.duration,
+ duration: transition.duration
+ });
+ }
+ subgroup.push(node);
+ }
+ }
+ return d3_transition(subgroups, ns, id1);
+ };
+ function d3_transitionNamespace(name) {
+ return name == null ? "__transition__" : "__transition_" + name + "__";
+ }
+ function d3_transitionNode(node, i, ns, id, inherit) {
+ var lock = node[ns] || (node[ns] = {
+ active: 0,
+ count: 0
+ }), transition = lock[id], time, timer, duration, ease, tweens;
+ function schedule(elapsed) {
+ var delay = transition.delay;
+ timer.t = delay + time;
+ if (delay <= elapsed) return start(elapsed - delay);
+ timer.c = start;
+ }
+ function start(elapsed) {
+ var activeId = lock.active, active = lock[activeId];
+ if (active) {
+ active.timer.c = null;
+ active.timer.t = NaN;
+ --lock.count;
+ delete lock[activeId];
+ active.event && active.event.interrupt.call(node, node.__data__, active.index);
+ }
+ for (var cancelId in lock) {
+ if (+cancelId < id) {
+ var cancel = lock[cancelId];
+ cancel.timer.c = null;
+ cancel.timer.t = NaN;
+ --lock.count;
+ delete lock[cancelId];
+ }
+ }
+ timer.c = tick;
+ d3_timer(function() {
+ if (timer.c && tick(elapsed || 1)) {
+ timer.c = null;
+ timer.t = NaN;
+ }
+ return 1;
+ }, 0, time);
+ lock.active = id;
+ transition.event && transition.event.start.call(node, node.__data__, i);
+ tweens = [];
+ transition.tween.forEach(function(key, value) {
+ if (value = value.call(node, node.__data__, i)) {
+ tweens.push(value);
+ }
+ });
+ ease = transition.ease;
+ duration = transition.duration;
+ }
+ function tick(elapsed) {
+ var t = elapsed / duration, e = ease(t), n = tweens.length;
+ while (n > 0) {
+ tweens[--n].call(node, e);
+ }
+ if (t >= 1) {
+ transition.event && transition.event.end.call(node, node.__data__, i);
+ if (--lock.count) delete lock[id]; else delete node[ns];
+ return 1;
+ }
+ }
+ if (!transition) {
+ time = inherit.time;
+ timer = d3_timer(schedule, 0, time);
+ transition = lock[id] = {
+ tween: new d3_Map(),
+ time: time,
+ timer: timer,
+ delay: inherit.delay,
+ duration: inherit.duration,
+ ease: inherit.ease,
+ index: i
+ };
+ inherit = null;
+ ++lock.count;
+ }
+ }
+ d3.svg.axis = function() {
+ var scale = d3.scale.linear(), orient = d3_svg_axisDefaultOrient, innerTickSize = 6, outerTickSize = 6, tickPadding = 3, tickArguments_ = [ 10 ], tickValues = null, tickFormat_;
+ function axis(g) {
+ g.each(function() {
+ var g = d3.select(this);
+ var scale0 = this.__chart__ || scale, scale1 = this.__chart__ = scale.copy();
+ var ticks = tickValues == null ? scale1.ticks ? scale1.ticks.apply(scale1, tickArguments_) : scale1.domain() : tickValues, tickFormat = tickFormat_ == null ? scale1.tickFormat ? scale1.tickFormat.apply(scale1, tickArguments_) : d3_identity : tickFormat_, tick = g.selectAll(".tick").data(ticks, scale1), tickEnter = tick.enter().insert("g", ".domain").attr("class", "tick").style("opacity", ε), tickExit = d3.transition(tick.exit()).style("opacity", ε).remove(), tickUpdate = d3.transition(tick.order()).style("opacity", 1), tickSpacing = Math.max(innerTickSize, 0) + tickPadding, tickTransform;
+ var range = d3_scaleRange(scale1), path = g.selectAll(".domain").data([ 0 ]), pathUpdate = (path.enter().append("path").attr("class", "domain"),
+ d3.transition(path));
+ tickEnter.append("line");
+ tickEnter.append("text");
+ var lineEnter = tickEnter.select("line"), lineUpdate = tickUpdate.select("line"), text = tick.select("text").text(tickFormat), textEnter = tickEnter.select("text"), textUpdate = tickUpdate.select("text"), sign = orient === "top" || orient === "left" ? -1 : 1, x1, x2, y1, y2;
+ if (orient === "bottom" || orient === "top") {
+ tickTransform = d3_svg_axisX, x1 = "x", y1 = "y", x2 = "x2", y2 = "y2";
+ text.attr("dy", sign < 0 ? "0em" : ".71em").style("text-anchor", "middle");
+ pathUpdate.attr("d", "M" + range[0] + "," + sign * outerTickSize + "V0H" + range[1] + "V" + sign * outerTickSize);
+ } else {
+ tickTransform = d3_svg_axisY, x1 = "y", y1 = "x", x2 = "y2", y2 = "x2";
+ text.attr("dy", ".32em").style("text-anchor", sign < 0 ? "end" : "start");
+ pathUpdate.attr("d", "M" + sign * outerTickSize + "," + range[0] + "H0V" + range[1] + "H" + sign * outerTickSize);
+ }
+ lineEnter.attr(y2, sign * innerTickSize);
+ textEnter.attr(y1, sign * tickSpacing);
+ lineUpdate.attr(x2, 0).attr(y2, sign * innerTickSize);
+ textUpdate.attr(x1, 0).attr(y1, sign * tickSpacing);
+ if (scale1.rangeBand) {
+ var x = scale1, dx = x.rangeBand() / 2;
+ scale0 = scale1 = function(d) {
+ return x(d) + dx;
+ };
+ } else if (scale0.rangeBand) {
+ scale0 = scale1;
+ } else {
+ tickExit.call(tickTransform, scale1, scale0);
+ }
+ tickEnter.call(tickTransform, scale0, scale1);
+ tickUpdate.call(tickTransform, scale1, scale1);
+ });
+ }
+ axis.scale = function(x) {
+ if (!arguments.length) return scale;
+ scale = x;
+ return axis;
+ };
+ axis.orient = function(x) {
+ if (!arguments.length) return orient;
+ orient = x in d3_svg_axisOrients ? x + "" : d3_svg_axisDefaultOrient;
+ return axis;
+ };
+ axis.ticks = function() {
+ if (!arguments.length) return tickArguments_;
+ tickArguments_ = d3_array(arguments);
+ return axis;
+ };
+ axis.tickValues = function(x) {
+ if (!arguments.length) return tickValues;
+ tickValues = x;
+ return axis;
+ };
+ axis.tickFormat = function(x) {
+ if (!arguments.length) return tickFormat_;
+ tickFormat_ = x;
+ return axis;
+ };
+ axis.tickSize = function(x) {
+ var n = arguments.length;
+ if (!n) return innerTickSize;
+ innerTickSize = +x;
+ outerTickSize = +arguments[n - 1];
+ return axis;
+ };
+ axis.innerTickSize = function(x) {
+ if (!arguments.length) return innerTickSize;
+ innerTickSize = +x;
+ return axis;
+ };
+ axis.outerTickSize = function(x) {
+ if (!arguments.length) return outerTickSize;
+ outerTickSize = +x;
+ return axis;
+ };
+ axis.tickPadding = function(x) {
+ if (!arguments.length) return tickPadding;
+ tickPadding = +x;
+ return axis;
+ };
+ axis.tickSubdivide = function() {
+ return arguments.length && axis;
+ };
+ return axis;
+ };
+ var d3_svg_axisDefaultOrient = "bottom", d3_svg_axisOrients = {
+ top: 1,
+ right: 1,
+ bottom: 1,
+ left: 1
+ };
+ function d3_svg_axisX(selection, x0, x1) {
+ selection.attr("transform", function(d) {
+ var v0 = x0(d);
+ return "translate(" + (isFinite(v0) ? v0 : x1(d)) + ",0)";
+ });
+ }
+ function d3_svg_axisY(selection, y0, y1) {
+ selection.attr("transform", function(d) {
+ var v0 = y0(d);
+ return "translate(0," + (isFinite(v0) ? v0 : y1(d)) + ")";
+ });
+ }
+ d3.svg.brush = function() {
+ var event = d3_eventDispatch(brush, "brushstart", "brush", "brushend"), x = null, y = null, xExtent = [ 0, 0 ], yExtent = [ 0, 0 ], xExtentDomain, yExtentDomain, xClamp = true, yClamp = true, resizes = d3_svg_brushResizes[0];
+ function brush(g) {
+ g.each(function() {
+ var g = d3.select(this).style("pointer-events", "all").style("-webkit-tap-highlight-color", "rgba(0,0,0,0)").on("mousedown.brush", brushstart).on("touchstart.brush", brushstart);
+ var background = g.selectAll(".background").data([ 0 ]);
+ background.enter().append("rect").attr("class", "background").style("visibility", "hidden").style("cursor", "crosshair");
+ g.selectAll(".extent").data([ 0 ]).enter().append("rect").attr("class", "extent").style("cursor", "move");
+ var resize = g.selectAll(".resize").data(resizes, d3_identity);
+ resize.exit().remove();
+ resize.enter().append("g").attr("class", function(d) {
+ return "resize " + d;
+ }).style("cursor", function(d) {
+ return d3_svg_brushCursor[d];
+ }).append("rect").attr("x", function(d) {
+ return /[ew]$/.test(d) ? -3 : null;
+ }).attr("y", function(d) {
+ return /^[ns]/.test(d) ? -3 : null;
+ }).attr("width", 6).attr("height", 6).style("visibility", "hidden");
+ resize.style("display", brush.empty() ? "none" : null);
+ var gUpdate = d3.transition(g), backgroundUpdate = d3.transition(background), range;
+ if (x) {
+ range = d3_scaleRange(x);
+ backgroundUpdate.attr("x", range[0]).attr("width", range[1] - range[0]);
+ redrawX(gUpdate);
+ }
+ if (y) {
+ range = d3_scaleRange(y);
+ backgroundUpdate.attr("y", range[0]).attr("height", range[1] - range[0]);
+ redrawY(gUpdate);
+ }
+ redraw(gUpdate);
+ });
+ }
+ brush.event = function(g) {
+ g.each(function() {
+ var event_ = event.of(this, arguments), extent1 = {
+ x: xExtent,
+ y: yExtent,
+ i: xExtentDomain,
+ j: yExtentDomain
+ }, extent0 = this.__chart__ || extent1;
+ this.__chart__ = extent1;
+ if (d3_transitionInheritId) {
+ d3.select(this).transition().each("start.brush", function() {
+ xExtentDomain = extent0.i;
+ yExtentDomain = extent0.j;
+ xExtent = extent0.x;
+ yExtent = extent0.y;
+ event_({
+ type: "brushstart"
+ });
+ }).tween("brush:brush", function() {
+ var xi = d3_interpolateArray(xExtent, extent1.x), yi = d3_interpolateArray(yExtent, extent1.y);
+ xExtentDomain = yExtentDomain = null;
+ return function(t) {
+ xExtent = extent1.x = xi(t);
+ yExtent = extent1.y = yi(t);
+ event_({
+ type: "brush",
+ mode: "resize"
+ });
+ };
+ }).each("end.brush", function() {
+ xExtentDomain = extent1.i;
+ yExtentDomain = extent1.j;
+ event_({
+ type: "brush",
+ mode: "resize"
+ });
+ event_({
+ type: "brushend"
+ });
+ });
+ } else {
+ event_({
+ type: "brushstart"
+ });
+ event_({
+ type: "brush",
+ mode: "resize"
+ });
+ event_({
+ type: "brushend"
+ });
+ }
+ });
+ };
+ function redraw(g) {
+ g.selectAll(".resize").attr("transform", function(d) {
+ return "translate(" + xExtent[+/e$/.test(d)] + "," + yExtent[+/^s/.test(d)] + ")";
+ });
+ }
+ function redrawX(g) {
+ g.select(".extent").attr("x", xExtent[0]);
+ g.selectAll(".extent,.n>rect,.s>rect").attr("width", xExtent[1] - xExtent[0]);
+ }
+ function redrawY(g) {
+ g.select(".extent").attr("y", yExtent[0]);
+ g.selectAll(".extent,.e>rect,.w>rect").attr("height", yExtent[1] - yExtent[0]);
+ }
+ function brushstart() {
+ var target = this, eventTarget = d3.select(d3.event.target), event_ = event.of(target, arguments), g = d3.select(target), resizing = eventTarget.datum(), resizingX = !/^(n|s)$/.test(resizing) && x, resizingY = !/^(e|w)$/.test(resizing) && y, dragging = eventTarget.classed("extent"), dragRestore = d3_event_dragSuppress(target), center, origin = d3.mouse(target), offset;
+ var w = d3.select(d3_window(target)).on("keydown.brush", keydown).on("keyup.brush", keyup);
+ if (d3.event.changedTouches) {
+ w.on("touchmove.brush", brushmove).on("touchend.brush", brushend);
+ } else {
+ w.on("mousemove.brush", brushmove).on("mouseup.brush", brushend);
+ }
+ g.interrupt().selectAll("*").interrupt();
+ if (dragging) {
+ origin[0] = xExtent[0] - origin[0];
+ origin[1] = yExtent[0] - origin[1];
+ } else if (resizing) {
+ var ex = +/w$/.test(resizing), ey = +/^n/.test(resizing);
+ offset = [ xExtent[1 - ex] - origin[0], yExtent[1 - ey] - origin[1] ];
+ origin[0] = xExtent[ex];
+ origin[1] = yExtent[ey];
+ } else if (d3.event.altKey) center = origin.slice();
+ g.style("pointer-events", "none").selectAll(".resize").style("display", null);
+ d3.select("body").style("cursor", eventTarget.style("cursor"));
+ event_({
+ type: "brushstart"
+ });
+ brushmove();
+ function keydown() {
+ if (d3.event.keyCode == 32) {
+ if (!dragging) {
+ center = null;
+ origin[0] -= xExtent[1];
+ origin[1] -= yExtent[1];
+ dragging = 2;
+ }
+ d3_eventPreventDefault();
+ }
+ }
+ function keyup() {
+ if (d3.event.keyCode == 32 && dragging == 2) {
+ origin[0] += xExtent[1];
+ origin[1] += yExtent[1];
+ dragging = 0;
+ d3_eventPreventDefault();
+ }
+ }
+ function brushmove() {
+ var point = d3.mouse(target), moved = false;
+ if (offset) {
+ point[0] += offset[0];
+ point[1] += offset[1];
+ }
+ if (!dragging) {
+ if (d3.event.altKey) {
+ if (!center) center = [ (xExtent[0] + xExtent[1]) / 2, (yExtent[0] + yExtent[1]) / 2 ];
+ origin[0] = xExtent[+(point[0] < center[0])];
+ origin[1] = yExtent[+(point[1] < center[1])];
+ } else center = null;
+ }
+ if (resizingX && move1(point, x, 0)) {
+ redrawX(g);
+ moved = true;
+ }
+ if (resizingY && move1(point, y, 1)) {
+ redrawY(g);
+ moved = true;
+ }
+ if (moved) {
+ redraw(g);
+ event_({
+ type: "brush",
+ mode: dragging ? "move" : "resize"
+ });
+ }
+ }
+ function move1(point, scale, i) {
+ var range = d3_scaleRange(scale), r0 = range[0], r1 = range[1], position = origin[i], extent = i ? yExtent : xExtent, size = extent[1] - extent[0], min, max;
+ if (dragging) {
+ r0 -= position;
+ r1 -= size + position;
+ }
+ min = (i ? yClamp : xClamp) ? Math.max(r0, Math.min(r1, point[i])) : point[i];
+ if (dragging) {
+ max = (min += position) + size;
+ } else {
+ if (center) position = Math.max(r0, Math.min(r1, 2 * center[i] - min));
+ if (position < min) {
+ max = min;
+ min = position;
+ } else {
+ max = position;
+ }
+ }
+ if (extent[0] != min || extent[1] != max) {
+ if (i) yExtentDomain = null; else xExtentDomain = null;
+ extent[0] = min;
+ extent[1] = max;
+ return true;
+ }
+ }
+ function brushend() {
+ brushmove();
+ g.style("pointer-events", "all").selectAll(".resize").style("display", brush.empty() ? "none" : null);
+ d3.select("body").style("cursor", null);
+ w.on("mousemove.brush", null).on("mouseup.brush", null).on("touchmove.brush", null).on("touchend.brush", null).on("keydown.brush", null).on("keyup.brush", null);
+ dragRestore();
+ event_({
+ type: "brushend"
+ });
+ }
+ }
+ brush.x = function(z) {
+ if (!arguments.length) return x;
+ x = z;
+ resizes = d3_svg_brushResizes[!x << 1 | !y];
+ return brush;
+ };
+ brush.y = function(z) {
+ if (!arguments.length) return y;
+ y = z;
+ resizes = d3_svg_brushResizes[!x << 1 | !y];
+ return brush;
+ };
+ brush.clamp = function(z) {
+ if (!arguments.length) return x && y ? [ xClamp, yClamp ] : x ? xClamp : y ? yClamp : null;
+ if (x && y) xClamp = !!z[0], yClamp = !!z[1]; else if (x) xClamp = !!z; else if (y) yClamp = !!z;
+ return brush;
+ };
+ brush.extent = function(z) {
+ var x0, x1, y0, y1, t;
+ if (!arguments.length) {
+ if (x) {
+ if (xExtentDomain) {
+ x0 = xExtentDomain[0], x1 = xExtentDomain[1];
+ } else {
+ x0 = xExtent[0], x1 = xExtent[1];
+ if (x.invert) x0 = x.invert(x0), x1 = x.invert(x1);
+ if (x1 < x0) t = x0, x0 = x1, x1 = t;
+ }
+ }
+ if (y) {
+ if (yExtentDomain) {
+ y0 = yExtentDomain[0], y1 = yExtentDomain[1];
+ } else {
+ y0 = yExtent[0], y1 = yExtent[1];
+ if (y.invert) y0 = y.invert(y0), y1 = y.invert(y1);
+ if (y1 < y0) t = y0, y0 = y1, y1 = t;
+ }
+ }
+ return x && y ? [ [ x0, y0 ], [ x1, y1 ] ] : x ? [ x0, x1 ] : y && [ y0, y1 ];
+ }
+ if (x) {
+ x0 = z[0], x1 = z[1];
+ if (y) x0 = x0[0], x1 = x1[0];
+ xExtentDomain = [ x0, x1 ];
+ if (x.invert) x0 = x(x0), x1 = x(x1);
+ if (x1 < x0) t = x0, x0 = x1, x1 = t;
+ if (x0 != xExtent[0] || x1 != xExtent[1]) xExtent = [ x0, x1 ];
+ }
+ if (y) {
+ y0 = z[0], y1 = z[1];
+ if (x) y0 = y0[1], y1 = y1[1];
+ yExtentDomain = [ y0, y1 ];
+ if (y.invert) y0 = y(y0), y1 = y(y1);
+ if (y1 < y0) t = y0, y0 = y1, y1 = t;
+ if (y0 != yExtent[0] || y1 != yExtent[1]) yExtent = [ y0, y1 ];
+ }
+ return brush;
+ };
+ brush.clear = function() {
+ if (!brush.empty()) {
+ xExtent = [ 0, 0 ], yExtent = [ 0, 0 ];
+ xExtentDomain = yExtentDomain = null;
+ }
+ return brush;
+ };
+ brush.empty = function() {
+ return !!x && xExtent[0] == xExtent[1] || !!y && yExtent[0] == yExtent[1];
+ };
+ return d3.rebind(brush, event, "on");
+ };
+ var d3_svg_brushCursor = {
+ n: "ns-resize",
+ e: "ew-resize",
+ s: "ns-resize",
+ w: "ew-resize",
+ nw: "nwse-resize",
+ ne: "nesw-resize",
+ se: "nwse-resize",
+ sw: "nesw-resize"
+ };
+ var d3_svg_brushResizes = [ [ "n", "e", "s", "w", "nw", "ne", "se", "sw" ], [ "e", "w" ], [ "n", "s" ], [] ];
+ var d3_time_format = d3_time.format = d3_locale_enUS.timeFormat;
+ var d3_time_formatUtc = d3_time_format.utc;
+ var d3_time_formatIso = d3_time_formatUtc("%Y-%m-%dT%H:%M:%S.%LZ");
+ d3_time_format.iso = Date.prototype.toISOString && +new Date("2000-01-01T00:00:00.000Z") ? d3_time_formatIsoNative : d3_time_formatIso;
+ function d3_time_formatIsoNative(date) {
+ return date.toISOString();
+ }
+ d3_time_formatIsoNative.parse = function(string) {
+ var date = new Date(string);
+ return isNaN(date) ? null : date;
+ };
+ d3_time_formatIsoNative.toString = d3_time_formatIso.toString;
+ d3_time.second = d3_time_interval(function(date) {
+ return new d3_date(Math.floor(date / 1e3) * 1e3);
+ }, function(date, offset) {
+ date.setTime(date.getTime() + Math.floor(offset) * 1e3);
+ }, function(date) {
+ return date.getSeconds();
+ });
+ d3_time.seconds = d3_time.second.range;
+ d3_time.seconds.utc = d3_time.second.utc.range;
+ d3_time.minute = d3_time_interval(function(date) {
+ return new d3_date(Math.floor(date / 6e4) * 6e4);
+ }, function(date, offset) {
+ date.setTime(date.getTime() + Math.floor(offset) * 6e4);
+ }, function(date) {
+ return date.getMinutes();
+ });
+ d3_time.minutes = d3_time.minute.range;
+ d3_time.minutes.utc = d3_time.minute.utc.range;
+ d3_time.hour = d3_time_interval(function(date) {
+ var timezone = date.getTimezoneOffset() / 60;
+ return new d3_date((Math.floor(date / 36e5 - timezone) + timezone) * 36e5);
+ }, function(date, offset) {
+ date.setTime(date.getTime() + Math.floor(offset) * 36e5);
+ }, function(date) {
+ return date.getHours();
+ });
+ d3_time.hours = d3_time.hour.range;
+ d3_time.hours.utc = d3_time.hour.utc.range;
+ d3_time.month = d3_time_interval(function(date) {
+ date = d3_time.day(date);
+ date.setDate(1);
+ return date;
+ }, function(date, offset) {
+ date.setMonth(date.getMonth() + offset);
+ }, function(date) {
+ return date.getMonth();
+ });
+ d3_time.months = d3_time.month.range;
+ d3_time.months.utc = d3_time.month.utc.range;
+ function d3_time_scale(linear, methods, format) {
+ function scale(x) {
+ return linear(x);
+ }
+ scale.invert = function(x) {
+ return d3_time_scaleDate(linear.invert(x));
+ };
+ scale.domain = function(x) {
+ if (!arguments.length) return linear.domain().map(d3_time_scaleDate);
+ linear.domain(x);
+ return scale;
+ };
+ function tickMethod(extent, count) {
+ var span = extent[1] - extent[0], target = span / count, i = d3.bisect(d3_time_scaleSteps, target);
+ return i == d3_time_scaleSteps.length ? [ methods.year, d3_scale_linearTickRange(extent.map(function(d) {
+ return d / 31536e6;
+ }), count)[2] ] : !i ? [ d3_time_scaleMilliseconds, d3_scale_linearTickRange(extent, count)[2] ] : methods[target / d3_time_scaleSteps[i - 1] < d3_time_scaleSteps[i] / target ? i - 1 : i];
+ }
+ scale.nice = function(interval, skip) {
+ var domain = scale.domain(), extent = d3_scaleExtent(domain), method = interval == null ? tickMethod(extent, 10) : typeof interval === "number" && tickMethod(extent, interval);
+ if (method) interval = method[0], skip = method[1];
+ function skipped(date) {
+ return !isNaN(date) && !interval.range(date, d3_time_scaleDate(+date + 1), skip).length;
+ }
+ return scale.domain(d3_scale_nice(domain, skip > 1 ? {
+ floor: function(date) {
+ while (skipped(date = interval.floor(date))) date = d3_time_scaleDate(date - 1);
+ return date;
+ },
+ ceil: function(date) {
+ while (skipped(date = interval.ceil(date))) date = d3_time_scaleDate(+date + 1);
+ return date;
+ }
+ } : interval));
+ };
+ scale.ticks = function(interval, skip) {
+ var extent = d3_scaleExtent(scale.domain()), method = interval == null ? tickMethod(extent, 10) : typeof interval === "number" ? tickMethod(extent, interval) : !interval.range && [ {
+ range: interval
+ }, skip ];
+ if (method) interval = method[0], skip = method[1];
+ return interval.range(extent[0], d3_time_scaleDate(+extent[1] + 1), skip < 1 ? 1 : skip);
+ };
+ scale.tickFormat = function() {
+ return format;
+ };
+ scale.copy = function() {
+ return d3_time_scale(linear.copy(), methods, format);
+ };
+ return d3_scale_linearRebind(scale, linear);
+ }
+ function d3_time_scaleDate(t) {
+ return new Date(t);
+ }
+ var d3_time_scaleSteps = [ 1e3, 5e3, 15e3, 3e4, 6e4, 3e5, 9e5, 18e5, 36e5, 108e5, 216e5, 432e5, 864e5, 1728e5, 6048e5, 2592e6, 7776e6, 31536e6 ];
+ var d3_time_scaleLocalMethods = [ [ d3_time.second, 1 ], [ d3_time.second, 5 ], [ d3_time.second, 15 ], [ d3_time.second, 30 ], [ d3_time.minute, 1 ], [ d3_time.minute, 5 ], [ d3_time.minute, 15 ], [ d3_time.minute, 30 ], [ d3_time.hour, 1 ], [ d3_time.hour, 3 ], [ d3_time.hour, 6 ], [ d3_time.hour, 12 ], [ d3_time.day, 1 ], [ d3_time.day, 2 ], [ d3_time.week, 1 ], [ d3_time.month, 1 ], [ d3_time.month, 3 ], [ d3_time.year, 1 ] ];
+ var d3_time_scaleLocalFormat = d3_time_format.multi([ [ ".%L", function(d) {
+ return d.getMilliseconds();
+ } ], [ ":%S", function(d) {
+ return d.getSeconds();
+ } ], [ "%I:%M", function(d) {
+ return d.getMinutes();
+ } ], [ "%I %p", function(d) {
+ return d.getHours();
+ } ], [ "%a %d", function(d) {
+ return d.getDay() && d.getDate() != 1;
+ } ], [ "%b %d", function(d) {
+ return d.getDate() != 1;
+ } ], [ "%B", function(d) {
+ return d.getMonth();
+ } ], [ "%Y", d3_true ] ]);
+ var d3_time_scaleMilliseconds = {
+ range: function(start, stop, step) {
+ return d3.range(Math.ceil(start / step) * step, +stop, step).map(d3_time_scaleDate);
+ },
+ floor: d3_identity,
+ ceil: d3_identity
+ };
+ d3_time_scaleLocalMethods.year = d3_time.year;
+ d3_time.scale = function() {
+ return d3_time_scale(d3.scale.linear(), d3_time_scaleLocalMethods, d3_time_scaleLocalFormat);
+ };
+ var d3_time_scaleUtcMethods = d3_time_scaleLocalMethods.map(function(m) {
+ return [ m[0].utc, m[1] ];
+ });
+ var d3_time_scaleUtcFormat = d3_time_formatUtc.multi([ [ ".%L", function(d) {
+ return d.getUTCMilliseconds();
+ } ], [ ":%S", function(d) {
+ return d.getUTCSeconds();
+ } ], [ "%I:%M", function(d) {
+ return d.getUTCMinutes();
+ } ], [ "%I %p", function(d) {
+ return d.getUTCHours();
+ } ], [ "%a %d", function(d) {
+ return d.getUTCDay() && d.getUTCDate() != 1;
+ } ], [ "%b %d", function(d) {
+ return d.getUTCDate() != 1;
+ } ], [ "%B", function(d) {
+ return d.getUTCMonth();
+ } ], [ "%Y", d3_true ] ]);
+ d3_time_scaleUtcMethods.year = d3_time.year.utc;
+ d3_time.scale.utc = function() {
+ return d3_time_scale(d3.scale.linear(), d3_time_scaleUtcMethods, d3_time_scaleUtcFormat);
+ };
+ d3.text = d3_xhrType(function(request) {
+ return request.responseText;
+ });
+ d3.json = function(url, callback) {
+ return d3_xhr(url, "application/json", d3_json, callback);
+ };
+ function d3_json(request) {
+ return JSON.parse(request.responseText);
+ }
+ d3.html = function(url, callback) {
+ return d3_xhr(url, "text/html", d3_html, callback);
+ };
+ function d3_html(request) {
+ var range = d3_document.createRange();
+ range.selectNode(d3_document.body);
+ return range.createContextualFragment(request.responseText);
+ }
+ d3.xml = d3_xhrType(function(request) {
+ return request.responseXML;
+ });
+ if (typeof define === "function" && define.amd) this.d3 = d3, define(d3); else if (typeof module === "object" && module.exports) module.exports = d3; else this.d3 = d3;
+}();
\ No newline at end of file
diff --git a/views/ngXosViews/serviceGrid/src/vendor/d3/d3.min.js b/views/ngXosViews/serviceGrid/src/vendor/d3/d3.min.js
new file mode 100644
index 0000000..1664873
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/d3/d3.min.js
@@ -0,0 +1,5 @@
+!function(){function n(n){return n&&(n.ownerDocument||n.document||n).documentElement}function t(n){return n&&(n.ownerDocument&&n.ownerDocument.defaultView||n.document&&n||n.defaultView)}function e(n,t){return t>n?-1:n>t?1:n>=t?0:NaN}function r(n){return null===n?NaN:+n}function i(n){return!isNaN(n)}function u(n){return{left:function(t,e,r,i){for(arguments.length<3&&(r=0),arguments.length<4&&(i=t.length);i>r;){var u=r+i>>>1;n(t[u],e)<0?r=u+1:i=u}return r},right:function(t,e,r,i){for(arguments.length<3&&(r=0),arguments.length<4&&(i=t.length);i>r;){var u=r+i>>>1;n(t[u],e)>0?i=u:r=u+1}return r}}}function o(n){return n.length}function a(n){for(var t=1;n*t%1;)t*=10;return t}function l(n,t){for(var e in t)Object.defineProperty(n.prototype,e,{value:t[e],enumerable:!1})}function c(){this._=Object.create(null)}function f(n){return(n+="")===bo||n[0]===_o?_o+n:n}function s(n){return(n+="")[0]===_o?n.slice(1):n}function h(n){return f(n)in this._}function p(n){return(n=f(n))in this._&&delete this._[n]}function g(){var n=[];for(var t in this._)n.push(s(t));return n}function v(){var n=0;for(var t in this._)++n;return n}function d(){for(var n in this._)return!1;return!0}function y(){this._=Object.create(null)}function m(n){return n}function M(n,t,e){return function(){var r=e.apply(t,arguments);return r===t?n:r}}function x(n,t){if(t in n)return t;t=t.charAt(0).toUpperCase()+t.slice(1);for(var e=0,r=wo.length;r>e;++e){var i=wo[e]+t;if(i in n)return i}}function b(){}function _(){}function w(n){function t(){for(var t,r=e,i=-1,u=r.length;++i<u;)(t=r[i].on)&&t.apply(this,arguments);return n}var e=[],r=new c;return t.on=function(t,i){var u,o=r.get(t);return arguments.length<2?o&&o.on:(o&&(o.on=null,e=e.slice(0,u=e.indexOf(o)).concat(e.slice(u+1)),r.remove(t)),i&&e.push(r.set(t,{on:i})),n)},t}function S(){ao.event.preventDefault()}function k(){for(var n,t=ao.event;n=t.sourceEvent;)t=n;return t}function N(n){for(var t=new _,e=0,r=arguments.length;++e<r;)t[arguments[e]]=w(t);return t.of=function(e,r){return function(i){try{var u=i.sourceEvent=ao.event;i.target=n,ao.event=i,t[i.type].apply(e,r)}finally{ao.event=u}}},t}function E(n){return ko(n,Co),n}function A(n){return"function"==typeof n?n:function(){return No(n,this)}}function C(n){return"function"==typeof n?n:function(){return Eo(n,this)}}function z(n,t){function e(){this.removeAttribute(n)}function r(){this.removeAttributeNS(n.space,n.local)}function i(){this.setAttribute(n,t)}function u(){this.setAttributeNS(n.space,n.local,t)}function o(){var e=t.apply(this,arguments);null==e?this.removeAttribute(n):this.setAttribute(n,e)}function a(){var e=t.apply(this,arguments);null==e?this.removeAttributeNS(n.space,n.local):this.setAttributeNS(n.space,n.local,e)}return n=ao.ns.qualify(n),null==t?n.local?r:e:"function"==typeof t?n.local?a:o:n.local?u:i}function L(n){return n.trim().replace(/\s+/g," ")}function q(n){return new RegExp("(?:^|\\s+)"+ao.requote(n)+"(?:\\s+|$)","g")}function T(n){return(n+"").trim().split(/^|\s+/)}function R(n,t){function e(){for(var e=-1;++e<i;)n[e](this,t)}function r(){for(var e=-1,r=t.apply(this,arguments);++e<i;)n[e](this,r)}n=T(n).map(D);var i=n.length;return"function"==typeof t?r:e}function D(n){var t=q(n);return function(e,r){if(i=e.classList)return r?i.add(n):i.remove(n);var i=e.getAttribute("class")||"";r?(t.lastIndex=0,t.test(i)||e.setAttribute("class",L(i+" "+n))):e.setAttribute("class",L(i.replace(t," ")))}}function P(n,t,e){function r(){this.style.removeProperty(n)}function i(){this.style.setProperty(n,t,e)}function u(){var r=t.apply(this,arguments);null==r?this.style.removeProperty(n):this.style.setProperty(n,r,e)}return null==t?r:"function"==typeof t?u:i}function U(n,t){function e(){delete this[n]}function r(){this[n]=t}function i(){var e=t.apply(this,arguments);null==e?delete this[n]:this[n]=e}return null==t?e:"function"==typeof t?i:r}function j(n){function t(){var t=this.ownerDocument,e=this.namespaceURI;return e===zo&&t.documentElement.namespaceURI===zo?t.createElement(n):t.createElementNS(e,n)}function e(){return this.ownerDocument.createElementNS(n.space,n.local)}return"function"==typeof n?n:(n=ao.ns.qualify(n)).local?e:t}function F(){var n=this.parentNode;n&&n.removeChild(this)}function H(n){return{__data__:n}}function O(n){return function(){return Ao(this,n)}}function I(n){return arguments.length||(n=e),function(t,e){return t&&e?n(t.__data__,e.__data__):!t-!e}}function Y(n,t){for(var e=0,r=n.length;r>e;e++)for(var i,u=n[e],o=0,a=u.length;a>o;o++)(i=u[o])&&t(i,o,e);return n}function Z(n){return ko(n,qo),n}function V(n){var t,e;return function(r,i,u){var o,a=n[u].update,l=a.length;for(u!=e&&(e=u,t=0),i>=t&&(t=i+1);!(o=a[t])&&++t<l;);return o}}function X(n,t,e){function r(){var t=this[o];t&&(this.removeEventListener(n,t,t.$),delete this[o])}function i(){var i=l(t,co(arguments));r.call(this),this.addEventListener(n,this[o]=i,i.$=e),i._=t}function u(){var t,e=new RegExp("^__on([^.]+)"+ao.requote(n)+"$");for(var r in this)if(t=r.match(e)){var i=this[r];this.removeEventListener(t[1],i,i.$),delete this[r]}}var o="__on"+n,a=n.indexOf("."),l=$;a>0&&(n=n.slice(0,a));var c=To.get(n);return c&&(n=c,l=B),a?t?i:r:t?b:u}function $(n,t){return function(e){var r=ao.event;ao.event=e,t[0]=this.__data__;try{n.apply(this,t)}finally{ao.event=r}}}function B(n,t){var e=$(n,t);return function(n){var t=this,r=n.relatedTarget;r&&(r===t||8&r.compareDocumentPosition(t))||e.call(t,n)}}function W(e){var r=".dragsuppress-"+ ++Do,i="click"+r,u=ao.select(t(e)).on("touchmove"+r,S).on("dragstart"+r,S).on("selectstart"+r,S);if(null==Ro&&(Ro="onselectstart"in e?!1:x(e.style,"userSelect")),Ro){var o=n(e).style,a=o[Ro];o[Ro]="none"}return function(n){if(u.on(r,null),Ro&&(o[Ro]=a),n){var t=function(){u.on(i,null)};u.on(i,function(){S(),t()},!0),setTimeout(t,0)}}}function J(n,e){e.changedTouches&&(e=e.changedTouches[0]);var r=n.ownerSVGElement||n;if(r.createSVGPoint){var i=r.createSVGPoint();if(0>Po){var u=t(n);if(u.scrollX||u.scrollY){r=ao.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var o=r[0][0].getScreenCTM();Po=!(o.f||o.e),r.remove()}}return Po?(i.x=e.pageX,i.y=e.pageY):(i.x=e.clientX,i.y=e.clientY),i=i.matrixTransform(n.getScreenCTM().inverse()),[i.x,i.y]}var a=n.getBoundingClientRect();return[e.clientX-a.left-n.clientLeft,e.clientY-a.top-n.clientTop]}function G(){return ao.event.changedTouches[0].identifier}function K(n){return n>0?1:0>n?-1:0}function Q(n,t,e){return(t[0]-n[0])*(e[1]-n[1])-(t[1]-n[1])*(e[0]-n[0])}function nn(n){return n>1?0:-1>n?Fo:Math.acos(n)}function tn(n){return n>1?Io:-1>n?-Io:Math.asin(n)}function en(n){return((n=Math.exp(n))-1/n)/2}function rn(n){return((n=Math.exp(n))+1/n)/2}function un(n){return((n=Math.exp(2*n))-1)/(n+1)}function on(n){return(n=Math.sin(n/2))*n}function an(){}function ln(n,t,e){return this instanceof ln?(this.h=+n,this.s=+t,void(this.l=+e)):arguments.length<2?n instanceof ln?new ln(n.h,n.s,n.l):_n(""+n,wn,ln):new ln(n,t,e)}function cn(n,t,e){function r(n){return n>360?n-=360:0>n&&(n+=360),60>n?u+(o-u)*n/60:180>n?o:240>n?u+(o-u)*(240-n)/60:u}function i(n){return Math.round(255*r(n))}var u,o;return n=isNaN(n)?0:(n%=360)<0?n+360:n,t=isNaN(t)?0:0>t?0:t>1?1:t,e=0>e?0:e>1?1:e,o=.5>=e?e*(1+t):e+t-e*t,u=2*e-o,new mn(i(n+120),i(n),i(n-120))}function fn(n,t,e){return this instanceof fn?(this.h=+n,this.c=+t,void(this.l=+e)):arguments.length<2?n instanceof fn?new fn(n.h,n.c,n.l):n instanceof hn?gn(n.l,n.a,n.b):gn((n=Sn((n=ao.rgb(n)).r,n.g,n.b)).l,n.a,n.b):new fn(n,t,e)}function sn(n,t,e){return isNaN(n)&&(n=0),isNaN(t)&&(t=0),new hn(e,Math.cos(n*=Yo)*t,Math.sin(n)*t)}function hn(n,t,e){return this instanceof hn?(this.l=+n,this.a=+t,void(this.b=+e)):arguments.length<2?n instanceof hn?new hn(n.l,n.a,n.b):n instanceof fn?sn(n.h,n.c,n.l):Sn((n=mn(n)).r,n.g,n.b):new hn(n,t,e)}function pn(n,t,e){var r=(n+16)/116,i=r+t/500,u=r-e/200;return i=vn(i)*na,r=vn(r)*ta,u=vn(u)*ea,new mn(yn(3.2404542*i-1.5371385*r-.4985314*u),yn(-.969266*i+1.8760108*r+.041556*u),yn(.0556434*i-.2040259*r+1.0572252*u))}function gn(n,t,e){return n>0?new fn(Math.atan2(e,t)*Zo,Math.sqrt(t*t+e*e),n):new fn(NaN,NaN,n)}function vn(n){return n>.206893034?n*n*n:(n-4/29)/7.787037}function dn(n){return n>.008856?Math.pow(n,1/3):7.787037*n+4/29}function yn(n){return Math.round(255*(.00304>=n?12.92*n:1.055*Math.pow(n,1/2.4)-.055))}function mn(n,t,e){return this instanceof mn?(this.r=~~n,this.g=~~t,void(this.b=~~e)):arguments.length<2?n instanceof mn?new mn(n.r,n.g,n.b):_n(""+n,mn,cn):new mn(n,t,e)}function Mn(n){return new mn(n>>16,n>>8&255,255&n)}function xn(n){return Mn(n)+""}function bn(n){return 16>n?"0"+Math.max(0,n).toString(16):Math.min(255,n).toString(16)}function _n(n,t,e){var r,i,u,o=0,a=0,l=0;if(r=/([a-z]+)\((.*)\)/.exec(n=n.toLowerCase()))switch(i=r[2].split(","),r[1]){case"hsl":return e(parseFloat(i[0]),parseFloat(i[1])/100,parseFloat(i[2])/100);case"rgb":return t(Nn(i[0]),Nn(i[1]),Nn(i[2]))}return(u=ua.get(n))?t(u.r,u.g,u.b):(null==n||"#"!==n.charAt(0)||isNaN(u=parseInt(n.slice(1),16))||(4===n.length?(o=(3840&u)>>4,o=o>>4|o,a=240&u,a=a>>4|a,l=15&u,l=l<<4|l):7===n.length&&(o=(16711680&u)>>16,a=(65280&u)>>8,l=255&u)),t(o,a,l))}function wn(n,t,e){var r,i,u=Math.min(n/=255,t/=255,e/=255),o=Math.max(n,t,e),a=o-u,l=(o+u)/2;return a?(i=.5>l?a/(o+u):a/(2-o-u),r=n==o?(t-e)/a+(e>t?6:0):t==o?(e-n)/a+2:(n-t)/a+4,r*=60):(r=NaN,i=l>0&&1>l?0:r),new ln(r,i,l)}function Sn(n,t,e){n=kn(n),t=kn(t),e=kn(e);var r=dn((.4124564*n+.3575761*t+.1804375*e)/na),i=dn((.2126729*n+.7151522*t+.072175*e)/ta),u=dn((.0193339*n+.119192*t+.9503041*e)/ea);return hn(116*i-16,500*(r-i),200*(i-u))}function kn(n){return(n/=255)<=.04045?n/12.92:Math.pow((n+.055)/1.055,2.4)}function Nn(n){var t=parseFloat(n);return"%"===n.charAt(n.length-1)?Math.round(2.55*t):t}function En(n){return"function"==typeof n?n:function(){return n}}function An(n){return function(t,e,r){return 2===arguments.length&&"function"==typeof e&&(r=e,e=null),Cn(t,e,n,r)}}function Cn(n,t,e,r){function i(){var n,t=l.status;if(!t&&Ln(l)||t>=200&&300>t||304===t){try{n=e.call(u,l)}catch(r){return void o.error.call(u,r)}o.load.call(u,n)}else o.error.call(u,l)}var u={},o=ao.dispatch("beforesend","progress","load","error"),a={},l=new XMLHttpRequest,c=null;return!this.XDomainRequest||"withCredentials"in l||!/^(http(s)?:)?\/\//.test(n)||(l=new XDomainRequest),"onload"in l?l.onload=l.onerror=i:l.onreadystatechange=function(){l.readyState>3&&i()},l.onprogress=function(n){var t=ao.event;ao.event=n;try{o.progress.call(u,l)}finally{ao.event=t}},u.header=function(n,t){return n=(n+"").toLowerCase(),arguments.length<2?a[n]:(null==t?delete a[n]:a[n]=t+"",u)},u.mimeType=function(n){return arguments.length?(t=null==n?null:n+"",u):t},u.responseType=function(n){return arguments.length?(c=n,u):c},u.response=function(n){return e=n,u},["get","post"].forEach(function(n){u[n]=function(){return u.send.apply(u,[n].concat(co(arguments)))}}),u.send=function(e,r,i){if(2===arguments.length&&"function"==typeof r&&(i=r,r=null),l.open(e,n,!0),null==t||"accept"in a||(a.accept=t+",*/*"),l.setRequestHeader)for(var f in a)l.setRequestHeader(f,a[f]);return null!=t&&l.overrideMimeType&&l.overrideMimeType(t),null!=c&&(l.responseType=c),null!=i&&u.on("error",i).on("load",function(n){i(null,n)}),o.beforesend.call(u,l),l.send(null==r?null:r),u},u.abort=function(){return l.abort(),u},ao.rebind(u,o,"on"),null==r?u:u.get(zn(r))}function zn(n){return 1===n.length?function(t,e){n(null==t?e:null)}:n}function Ln(n){var t=n.responseType;return t&&"text"!==t?n.response:n.responseText}function qn(n,t,e){var r=arguments.length;2>r&&(t=0),3>r&&(e=Date.now());var i=e+t,u={c:n,t:i,n:null};return aa?aa.n=u:oa=u,aa=u,la||(ca=clearTimeout(ca),la=1,fa(Tn)),u}function Tn(){var n=Rn(),t=Dn()-n;t>24?(isFinite(t)&&(clearTimeout(ca),ca=setTimeout(Tn,t)),la=0):(la=1,fa(Tn))}function Rn(){for(var n=Date.now(),t=oa;t;)n>=t.t&&t.c(n-t.t)&&(t.c=null),t=t.n;return n}function Dn(){for(var n,t=oa,e=1/0;t;)t.c?(t.t<e&&(e=t.t),t=(n=t).n):t=n?n.n=t.n:oa=t.n;return aa=n,e}function Pn(n,t){return t-(n?Math.ceil(Math.log(n)/Math.LN10):1)}function Un(n,t){var e=Math.pow(10,3*xo(8-t));return{scale:t>8?function(n){return n/e}:function(n){return n*e},symbol:n}}function jn(n){var t=n.decimal,e=n.thousands,r=n.grouping,i=n.currency,u=r&&e?function(n,t){for(var i=n.length,u=[],o=0,a=r[0],l=0;i>0&&a>0&&(l+a+1>t&&(a=Math.max(1,t-l)),u.push(n.substring(i-=a,i+a)),!((l+=a+1)>t));)a=r[o=(o+1)%r.length];return u.reverse().join(e)}:m;return function(n){var e=ha.exec(n),r=e[1]||" ",o=e[2]||">",a=e[3]||"-",l=e[4]||"",c=e[5],f=+e[6],s=e[7],h=e[8],p=e[9],g=1,v="",d="",y=!1,m=!0;switch(h&&(h=+h.substring(1)),(c||"0"===r&&"="===o)&&(c=r="0",o="="),p){case"n":s=!0,p="g";break;case"%":g=100,d="%",p="f";break;case"p":g=100,d="%",p="r";break;case"b":case"o":case"x":case"X":"#"===l&&(v="0"+p.toLowerCase());case"c":m=!1;case"d":y=!0,h=0;break;case"s":g=-1,p="r"}"$"===l&&(v=i[0],d=i[1]),"r"!=p||h||(p="g"),null!=h&&("g"==p?h=Math.max(1,Math.min(21,h)):"e"!=p&&"f"!=p||(h=Math.max(0,Math.min(20,h)))),p=pa.get(p)||Fn;var M=c&&s;return function(n){var e=d;if(y&&n%1)return"";var i=0>n||0===n&&0>1/n?(n=-n,"-"):"-"===a?"":a;if(0>g){var l=ao.formatPrefix(n,h);n=l.scale(n),e=l.symbol+d}else n*=g;n=p(n,h);var x,b,_=n.lastIndexOf(".");if(0>_){var w=m?n.lastIndexOf("e"):-1;0>w?(x=n,b=""):(x=n.substring(0,w),b=n.substring(w))}else x=n.substring(0,_),b=t+n.substring(_+1);!c&&s&&(x=u(x,1/0));var S=v.length+x.length+b.length+(M?0:i.length),k=f>S?new Array(S=f-S+1).join(r):"";return M&&(x=u(k+x,k.length?f-b.length:1/0)),i+=v,n=x+b,("<"===o?i+n+k:">"===o?k+i+n:"^"===o?k.substring(0,S>>=1)+i+n+k.substring(S):i+(M?n:k+n))+e}}}function Fn(n){return n+""}function Hn(){this._=new Date(arguments.length>1?Date.UTC.apply(this,arguments):arguments[0])}function On(n,t,e){function r(t){var e=n(t),r=u(e,1);return r-t>t-e?e:r}function i(e){return t(e=n(new va(e-1)),1),e}function u(n,e){return t(n=new va(+n),e),n}function o(n,r,u){var o=i(n),a=[];if(u>1)for(;r>o;)e(o)%u||a.push(new Date(+o)),t(o,1);else for(;r>o;)a.push(new Date(+o)),t(o,1);return a}function a(n,t,e){try{va=Hn;var r=new Hn;return r._=n,o(r,t,e)}finally{va=Date}}n.floor=n,n.round=r,n.ceil=i,n.offset=u,n.range=o;var l=n.utc=In(n);return l.floor=l,l.round=In(r),l.ceil=In(i),l.offset=In(u),l.range=a,n}function In(n){return function(t,e){try{va=Hn;var r=new Hn;return r._=t,n(r,e)._}finally{va=Date}}}function Yn(n){function t(n){function t(t){for(var e,i,u,o=[],a=-1,l=0;++a<r;)37===n.charCodeAt(a)&&(o.push(n.slice(l,a)),null!=(i=ya[e=n.charAt(++a)])&&(e=n.charAt(++a)),(u=A[e])&&(e=u(t,null==i?"e"===e?" ":"0":i)),o.push(e),l=a+1);return o.push(n.slice(l,a)),o.join("")}var r=n.length;return t.parse=function(t){var r={y:1900,m:0,d:1,H:0,M:0,S:0,L:0,Z:null},i=e(r,n,t,0);if(i!=t.length)return null;"p"in r&&(r.H=r.H%12+12*r.p);var u=null!=r.Z&&va!==Hn,o=new(u?Hn:va);return"j"in r?o.setFullYear(r.y,0,r.j):"W"in r||"U"in r?("w"in r||(r.w="W"in r?1:0),o.setFullYear(r.y,0,1),o.setFullYear(r.y,0,"W"in r?(r.w+6)%7+7*r.W-(o.getDay()+5)%7:r.w+7*r.U-(o.getDay()+6)%7)):o.setFullYear(r.y,r.m,r.d),o.setHours(r.H+(r.Z/100|0),r.M+r.Z%100,r.S,r.L),u?o._:o},t.toString=function(){return n},t}function e(n,t,e,r){for(var i,u,o,a=0,l=t.length,c=e.length;l>a;){if(r>=c)return-1;if(i=t.charCodeAt(a++),37===i){if(o=t.charAt(a++),u=C[o in ya?t.charAt(a++):o],!u||(r=u(n,e,r))<0)return-1}else if(i!=e.charCodeAt(r++))return-1}return r}function r(n,t,e){_.lastIndex=0;var r=_.exec(t.slice(e));return r?(n.w=w.get(r[0].toLowerCase()),e+r[0].length):-1}function i(n,t,e){x.lastIndex=0;var r=x.exec(t.slice(e));return r?(n.w=b.get(r[0].toLowerCase()),e+r[0].length):-1}function u(n,t,e){N.lastIndex=0;var r=N.exec(t.slice(e));return r?(n.m=E.get(r[0].toLowerCase()),e+r[0].length):-1}function o(n,t,e){S.lastIndex=0;var r=S.exec(t.slice(e));return r?(n.m=k.get(r[0].toLowerCase()),e+r[0].length):-1}function a(n,t,r){return e(n,A.c.toString(),t,r)}function l(n,t,r){return e(n,A.x.toString(),t,r)}function c(n,t,r){return e(n,A.X.toString(),t,r)}function f(n,t,e){var r=M.get(t.slice(e,e+=2).toLowerCase());return null==r?-1:(n.p=r,e)}var s=n.dateTime,h=n.date,p=n.time,g=n.periods,v=n.days,d=n.shortDays,y=n.months,m=n.shortMonths;t.utc=function(n){function e(n){try{va=Hn;var t=new va;return t._=n,r(t)}finally{va=Date}}var r=t(n);return e.parse=function(n){try{va=Hn;var t=r.parse(n);return t&&t._}finally{va=Date}},e.toString=r.toString,e},t.multi=t.utc.multi=ct;var M=ao.map(),x=Vn(v),b=Xn(v),_=Vn(d),w=Xn(d),S=Vn(y),k=Xn(y),N=Vn(m),E=Xn(m);g.forEach(function(n,t){M.set(n.toLowerCase(),t)});var A={a:function(n){return d[n.getDay()]},A:function(n){return v[n.getDay()]},b:function(n){return m[n.getMonth()]},B:function(n){return y[n.getMonth()]},c:t(s),d:function(n,t){return Zn(n.getDate(),t,2)},e:function(n,t){return Zn(n.getDate(),t,2)},H:function(n,t){return Zn(n.getHours(),t,2)},I:function(n,t){return Zn(n.getHours()%12||12,t,2)},j:function(n,t){return Zn(1+ga.dayOfYear(n),t,3)},L:function(n,t){return Zn(n.getMilliseconds(),t,3)},m:function(n,t){return Zn(n.getMonth()+1,t,2)},M:function(n,t){return Zn(n.getMinutes(),t,2)},p:function(n){return g[+(n.getHours()>=12)]},S:function(n,t){return Zn(n.getSeconds(),t,2)},U:function(n,t){return Zn(ga.sundayOfYear(n),t,2)},w:function(n){return n.getDay()},W:function(n,t){return Zn(ga.mondayOfYear(n),t,2)},x:t(h),X:t(p),y:function(n,t){return Zn(n.getFullYear()%100,t,2)},Y:function(n,t){return Zn(n.getFullYear()%1e4,t,4)},Z:at,"%":function(){return"%"}},C={a:r,A:i,b:u,B:o,c:a,d:tt,e:tt,H:rt,I:rt,j:et,L:ot,m:nt,M:it,p:f,S:ut,U:Bn,w:$n,W:Wn,x:l,X:c,y:Gn,Y:Jn,Z:Kn,"%":lt};return t}function Zn(n,t,e){var r=0>n?"-":"",i=(r?-n:n)+"",u=i.length;return r+(e>u?new Array(e-u+1).join(t)+i:i)}function Vn(n){return new RegExp("^(?:"+n.map(ao.requote).join("|")+")","i")}function Xn(n){for(var t=new c,e=-1,r=n.length;++e<r;)t.set(n[e].toLowerCase(),e);return t}function $n(n,t,e){ma.lastIndex=0;var r=ma.exec(t.slice(e,e+1));return r?(n.w=+r[0],e+r[0].length):-1}function Bn(n,t,e){ma.lastIndex=0;var r=ma.exec(t.slice(e));return r?(n.U=+r[0],e+r[0].length):-1}function Wn(n,t,e){ma.lastIndex=0;var r=ma.exec(t.slice(e));return r?(n.W=+r[0],e+r[0].length):-1}function Jn(n,t,e){ma.lastIndex=0;var r=ma.exec(t.slice(e,e+4));return r?(n.y=+r[0],e+r[0].length):-1}function Gn(n,t,e){ma.lastIndex=0;var r=ma.exec(t.slice(e,e+2));return r?(n.y=Qn(+r[0]),e+r[0].length):-1}function Kn(n,t,e){return/^[+-]\d{4}$/.test(t=t.slice(e,e+5))?(n.Z=-t,e+5):-1}function Qn(n){return n+(n>68?1900:2e3)}function nt(n,t,e){ma.lastIndex=0;var r=ma.exec(t.slice(e,e+2));return r?(n.m=r[0]-1,e+r[0].length):-1}function tt(n,t,e){ma.lastIndex=0;var r=ma.exec(t.slice(e,e+2));return r?(n.d=+r[0],e+r[0].length):-1}function et(n,t,e){ma.lastIndex=0;var r=ma.exec(t.slice(e,e+3));return r?(n.j=+r[0],e+r[0].length):-1}function rt(n,t,e){ma.lastIndex=0;var r=ma.exec(t.slice(e,e+2));return r?(n.H=+r[0],e+r[0].length):-1}function it(n,t,e){ma.lastIndex=0;var r=ma.exec(t.slice(e,e+2));return r?(n.M=+r[0],e+r[0].length):-1}function ut(n,t,e){ma.lastIndex=0;var r=ma.exec(t.slice(e,e+2));return r?(n.S=+r[0],e+r[0].length):-1}function ot(n,t,e){ma.lastIndex=0;var r=ma.exec(t.slice(e,e+3));return r?(n.L=+r[0],e+r[0].length):-1}function at(n){var t=n.getTimezoneOffset(),e=t>0?"-":"+",r=xo(t)/60|0,i=xo(t)%60;return e+Zn(r,"0",2)+Zn(i,"0",2)}function lt(n,t,e){Ma.lastIndex=0;var r=Ma.exec(t.slice(e,e+1));return r?e+r[0].length:-1}function ct(n){for(var t=n.length,e=-1;++e<t;)n[e][0]=this(n[e][0]);return function(t){for(var e=0,r=n[e];!r[1](t);)r=n[++e];return r[0](t)}}function ft(){}function st(n,t,e){var r=e.s=n+t,i=r-n,u=r-i;e.t=n-u+(t-i)}function ht(n,t){n&&wa.hasOwnProperty(n.type)&&wa[n.type](n,t)}function pt(n,t,e){var r,i=-1,u=n.length-e;for(t.lineStart();++i<u;)r=n[i],t.point(r[0],r[1],r[2]);t.lineEnd()}function gt(n,t){var e=-1,r=n.length;for(t.polygonStart();++e<r;)pt(n[e],t,1);t.polygonEnd()}function vt(){function n(n,t){n*=Yo,t=t*Yo/2+Fo/4;var e=n-r,o=e>=0?1:-1,a=o*e,l=Math.cos(t),c=Math.sin(t),f=u*c,s=i*l+f*Math.cos(a),h=f*o*Math.sin(a);ka.add(Math.atan2(h,s)),r=n,i=l,u=c}var t,e,r,i,u;Na.point=function(o,a){Na.point=n,r=(t=o)*Yo,i=Math.cos(a=(e=a)*Yo/2+Fo/4),u=Math.sin(a)},Na.lineEnd=function(){n(t,e)}}function dt(n){var t=n[0],e=n[1],r=Math.cos(e);return[r*Math.cos(t),r*Math.sin(t),Math.sin(e)]}function yt(n,t){return n[0]*t[0]+n[1]*t[1]+n[2]*t[2]}function mt(n,t){return[n[1]*t[2]-n[2]*t[1],n[2]*t[0]-n[0]*t[2],n[0]*t[1]-n[1]*t[0]]}function Mt(n,t){n[0]+=t[0],n[1]+=t[1],n[2]+=t[2]}function xt(n,t){return[n[0]*t,n[1]*t,n[2]*t]}function bt(n){var t=Math.sqrt(n[0]*n[0]+n[1]*n[1]+n[2]*n[2]);n[0]/=t,n[1]/=t,n[2]/=t}function _t(n){return[Math.atan2(n[1],n[0]),tn(n[2])]}function wt(n,t){return xo(n[0]-t[0])<Uo&&xo(n[1]-t[1])<Uo}function St(n,t){n*=Yo;var e=Math.cos(t*=Yo);kt(e*Math.cos(n),e*Math.sin(n),Math.sin(t))}function kt(n,t,e){++Ea,Ca+=(n-Ca)/Ea,za+=(t-za)/Ea,La+=(e-La)/Ea}function Nt(){function n(n,i){n*=Yo;var u=Math.cos(i*=Yo),o=u*Math.cos(n),a=u*Math.sin(n),l=Math.sin(i),c=Math.atan2(Math.sqrt((c=e*l-r*a)*c+(c=r*o-t*l)*c+(c=t*a-e*o)*c),t*o+e*a+r*l);Aa+=c,qa+=c*(t+(t=o)),Ta+=c*(e+(e=a)),Ra+=c*(r+(r=l)),kt(t,e,r)}var t,e,r;ja.point=function(i,u){i*=Yo;var o=Math.cos(u*=Yo);t=o*Math.cos(i),e=o*Math.sin(i),r=Math.sin(u),ja.point=n,kt(t,e,r)}}function Et(){ja.point=St}function At(){function n(n,t){n*=Yo;var e=Math.cos(t*=Yo),o=e*Math.cos(n),a=e*Math.sin(n),l=Math.sin(t),c=i*l-u*a,f=u*o-r*l,s=r*a-i*o,h=Math.sqrt(c*c+f*f+s*s),p=r*o+i*a+u*l,g=h&&-nn(p)/h,v=Math.atan2(h,p);Da+=g*c,Pa+=g*f,Ua+=g*s,Aa+=v,qa+=v*(r+(r=o)),Ta+=v*(i+(i=a)),Ra+=v*(u+(u=l)),kt(r,i,u)}var t,e,r,i,u;ja.point=function(o,a){t=o,e=a,ja.point=n,o*=Yo;var l=Math.cos(a*=Yo);r=l*Math.cos(o),i=l*Math.sin(o),u=Math.sin(a),kt(r,i,u)},ja.lineEnd=function(){n(t,e),ja.lineEnd=Et,ja.point=St}}function Ct(n,t){function e(e,r){return e=n(e,r),t(e[0],e[1])}return n.invert&&t.invert&&(e.invert=function(e,r){return e=t.invert(e,r),e&&n.invert(e[0],e[1])}),e}function zt(){return!0}function Lt(n,t,e,r,i){var u=[],o=[];if(n.forEach(function(n){if(!((t=n.length-1)<=0)){var t,e=n[0],r=n[t];if(wt(e,r)){i.lineStart();for(var a=0;t>a;++a)i.point((e=n[a])[0],e[1]);return void i.lineEnd()}var l=new Tt(e,n,null,!0),c=new Tt(e,null,l,!1);l.o=c,u.push(l),o.push(c),l=new Tt(r,n,null,!1),c=new Tt(r,null,l,!0),l.o=c,u.push(l),o.push(c)}}),o.sort(t),qt(u),qt(o),u.length){for(var a=0,l=e,c=o.length;c>a;++a)o[a].e=l=!l;for(var f,s,h=u[0];;){for(var p=h,g=!0;p.v;)if((p=p.n)===h)return;f=p.z,i.lineStart();do{if(p.v=p.o.v=!0,p.e){if(g)for(var a=0,c=f.length;c>a;++a)i.point((s=f[a])[0],s[1]);else r(p.x,p.n.x,1,i);p=p.n}else{if(g){f=p.p.z;for(var a=f.length-1;a>=0;--a)i.point((s=f[a])[0],s[1])}else r(p.x,p.p.x,-1,i);p=p.p}p=p.o,f=p.z,g=!g}while(!p.v);i.lineEnd()}}}function qt(n){if(t=n.length){for(var t,e,r=0,i=n[0];++r<t;)i.n=e=n[r],e.p=i,i=e;i.n=e=n[0],e.p=i}}function Tt(n,t,e,r){this.x=n,this.z=t,this.o=e,this.e=r,this.v=!1,this.n=this.p=null}function Rt(n,t,e,r){return function(i,u){function o(t,e){var r=i(t,e);n(t=r[0],e=r[1])&&u.point(t,e)}function a(n,t){var e=i(n,t);d.point(e[0],e[1])}function l(){m.point=a,d.lineStart()}function c(){m.point=o,d.lineEnd()}function f(n,t){v.push([n,t]);var e=i(n,t);x.point(e[0],e[1])}function s(){x.lineStart(),v=[]}function h(){f(v[0][0],v[0][1]),x.lineEnd();var n,t=x.clean(),e=M.buffer(),r=e.length;if(v.pop(),g.push(v),v=null,r)if(1&t){n=e[0];var i,r=n.length-1,o=-1;if(r>0){for(b||(u.polygonStart(),b=!0),u.lineStart();++o<r;)u.point((i=n[o])[0],i[1]);u.lineEnd()}}else r>1&&2&t&&e.push(e.pop().concat(e.shift())),p.push(e.filter(Dt))}var p,g,v,d=t(u),y=i.invert(r[0],r[1]),m={point:o,lineStart:l,lineEnd:c,polygonStart:function(){m.point=f,m.lineStart=s,m.lineEnd=h,p=[],g=[]},polygonEnd:function(){m.point=o,m.lineStart=l,m.lineEnd=c,p=ao.merge(p);var n=Ot(y,g);p.length?(b||(u.polygonStart(),b=!0),Lt(p,Ut,n,e,u)):n&&(b||(u.polygonStart(),b=!0),u.lineStart(),e(null,null,1,u),u.lineEnd()),b&&(u.polygonEnd(),b=!1),p=g=null},sphere:function(){u.polygonStart(),u.lineStart(),e(null,null,1,u),u.lineEnd(),u.polygonEnd()}},M=Pt(),x=t(M),b=!1;return m}}function Dt(n){return n.length>1}function Pt(){var n,t=[];return{lineStart:function(){t.push(n=[])},point:function(t,e){n.push([t,e])},lineEnd:b,buffer:function(){var e=t;return t=[],n=null,e},rejoin:function(){t.length>1&&t.push(t.pop().concat(t.shift()))}}}function Ut(n,t){return((n=n.x)[0]<0?n[1]-Io-Uo:Io-n[1])-((t=t.x)[0]<0?t[1]-Io-Uo:Io-t[1])}function jt(n){var t,e=NaN,r=NaN,i=NaN;return{lineStart:function(){n.lineStart(),t=1},point:function(u,o){var a=u>0?Fo:-Fo,l=xo(u-e);xo(l-Fo)<Uo?(n.point(e,r=(r+o)/2>0?Io:-Io),n.point(i,r),n.lineEnd(),n.lineStart(),n.point(a,r),n.point(u,r),t=0):i!==a&&l>=Fo&&(xo(e-i)<Uo&&(e-=i*Uo),xo(u-a)<Uo&&(u-=a*Uo),r=Ft(e,r,u,o),n.point(i,r),n.lineEnd(),n.lineStart(),n.point(a,r),t=0),n.point(e=u,r=o),i=a},lineEnd:function(){n.lineEnd(),e=r=NaN},clean:function(){return 2-t}}}function Ft(n,t,e,r){var i,u,o=Math.sin(n-e);return xo(o)>Uo?Math.atan((Math.sin(t)*(u=Math.cos(r))*Math.sin(e)-Math.sin(r)*(i=Math.cos(t))*Math.sin(n))/(i*u*o)):(t+r)/2}function Ht(n,t,e,r){var i;if(null==n)i=e*Io,r.point(-Fo,i),r.point(0,i),r.point(Fo,i),r.point(Fo,0),r.point(Fo,-i),r.point(0,-i),r.point(-Fo,-i),r.point(-Fo,0),r.point(-Fo,i);else if(xo(n[0]-t[0])>Uo){var u=n[0]<t[0]?Fo:-Fo;i=e*u/2,r.point(-u,i),r.point(0,i),r.point(u,i)}else r.point(t[0],t[1])}function Ot(n,t){var e=n[0],r=n[1],i=[Math.sin(e),-Math.cos(e),0],u=0,o=0;ka.reset();for(var a=0,l=t.length;l>a;++a){var c=t[a],f=c.length;if(f)for(var s=c[0],h=s[0],p=s[1]/2+Fo/4,g=Math.sin(p),v=Math.cos(p),d=1;;){d===f&&(d=0),n=c[d];var y=n[0],m=n[1]/2+Fo/4,M=Math.sin(m),x=Math.cos(m),b=y-h,_=b>=0?1:-1,w=_*b,S=w>Fo,k=g*M;if(ka.add(Math.atan2(k*_*Math.sin(w),v*x+k*Math.cos(w))),u+=S?b+_*Ho:b,S^h>=e^y>=e){var N=mt(dt(s),dt(n));bt(N);var E=mt(i,N);bt(E);var A=(S^b>=0?-1:1)*tn(E[2]);(r>A||r===A&&(N[0]||N[1]))&&(o+=S^b>=0?1:-1)}if(!d++)break;h=y,g=M,v=x,s=n}}return(-Uo>u||Uo>u&&-Uo>ka)^1&o}function It(n){function t(n,t){return Math.cos(n)*Math.cos(t)>u}function e(n){var e,u,l,c,f;return{lineStart:function(){c=l=!1,f=1},point:function(s,h){var p,g=[s,h],v=t(s,h),d=o?v?0:i(s,h):v?i(s+(0>s?Fo:-Fo),h):0;if(!e&&(c=l=v)&&n.lineStart(),v!==l&&(p=r(e,g),(wt(e,p)||wt(g,p))&&(g[0]+=Uo,g[1]+=Uo,v=t(g[0],g[1]))),v!==l)f=0,v?(n.lineStart(),p=r(g,e),n.point(p[0],p[1])):(p=r(e,g),n.point(p[0],p[1]),n.lineEnd()),e=p;else if(a&&e&&o^v){var y;d&u||!(y=r(g,e,!0))||(f=0,o?(n.lineStart(),n.point(y[0][0],y[0][1]),n.point(y[1][0],y[1][1]),n.lineEnd()):(n.point(y[1][0],y[1][1]),n.lineEnd(),n.lineStart(),n.point(y[0][0],y[0][1])))}!v||e&&wt(e,g)||n.point(g[0],g[1]),e=g,l=v,u=d},lineEnd:function(){l&&n.lineEnd(),e=null},clean:function(){return f|(c&&l)<<1}}}function r(n,t,e){var r=dt(n),i=dt(t),o=[1,0,0],a=mt(r,i),l=yt(a,a),c=a[0],f=l-c*c;if(!f)return!e&&n;var s=u*l/f,h=-u*c/f,p=mt(o,a),g=xt(o,s),v=xt(a,h);Mt(g,v);var d=p,y=yt(g,d),m=yt(d,d),M=y*y-m*(yt(g,g)-1);if(!(0>M)){var x=Math.sqrt(M),b=xt(d,(-y-x)/m);if(Mt(b,g),b=_t(b),!e)return b;var _,w=n[0],S=t[0],k=n[1],N=t[1];w>S&&(_=w,w=S,S=_);var E=S-w,A=xo(E-Fo)<Uo,C=A||Uo>E;if(!A&&k>N&&(_=k,k=N,N=_),C?A?k+N>0^b[1]<(xo(b[0]-w)<Uo?k:N):k<=b[1]&&b[1]<=N:E>Fo^(w<=b[0]&&b[0]<=S)){var z=xt(d,(-y+x)/m);return Mt(z,g),[b,_t(z)]}}}function i(t,e){var r=o?n:Fo-n,i=0;return-r>t?i|=1:t>r&&(i|=2),-r>e?i|=4:e>r&&(i|=8),i}var u=Math.cos(n),o=u>0,a=xo(u)>Uo,l=ve(n,6*Yo);return Rt(t,e,l,o?[0,-n]:[-Fo,n-Fo])}function Yt(n,t,e,r){return function(i){var u,o=i.a,a=i.b,l=o.x,c=o.y,f=a.x,s=a.y,h=0,p=1,g=f-l,v=s-c;if(u=n-l,g||!(u>0)){if(u/=g,0>g){if(h>u)return;p>u&&(p=u)}else if(g>0){if(u>p)return;u>h&&(h=u)}if(u=e-l,g||!(0>u)){if(u/=g,0>g){if(u>p)return;u>h&&(h=u)}else if(g>0){if(h>u)return;p>u&&(p=u)}if(u=t-c,v||!(u>0)){if(u/=v,0>v){if(h>u)return;p>u&&(p=u)}else if(v>0){if(u>p)return;u>h&&(h=u)}if(u=r-c,v||!(0>u)){if(u/=v,0>v){if(u>p)return;u>h&&(h=u)}else if(v>0){if(h>u)return;p>u&&(p=u)}return h>0&&(i.a={x:l+h*g,y:c+h*v}),1>p&&(i.b={x:l+p*g,y:c+p*v}),i}}}}}}function Zt(n,t,e,r){function i(r,i){return xo(r[0]-n)<Uo?i>0?0:3:xo(r[0]-e)<Uo?i>0?2:1:xo(r[1]-t)<Uo?i>0?1:0:i>0?3:2}function u(n,t){return o(n.x,t.x)}function o(n,t){var e=i(n,1),r=i(t,1);return e!==r?e-r:0===e?t[1]-n[1]:1===e?n[0]-t[0]:2===e?n[1]-t[1]:t[0]-n[0]}return function(a){function l(n){for(var t=0,e=d.length,r=n[1],i=0;e>i;++i)for(var u,o=1,a=d[i],l=a.length,c=a[0];l>o;++o)u=a[o],c[1]<=r?u[1]>r&&Q(c,u,n)>0&&++t:u[1]<=r&&Q(c,u,n)<0&&--t,c=u;return 0!==t}function c(u,a,l,c){var f=0,s=0;if(null==u||(f=i(u,l))!==(s=i(a,l))||o(u,a)<0^l>0){do c.point(0===f||3===f?n:e,f>1?r:t);while((f=(f+l+4)%4)!==s)}else c.point(a[0],a[1])}function f(i,u){return i>=n&&e>=i&&u>=t&&r>=u}function s(n,t){f(n,t)&&a.point(n,t)}function h(){C.point=g,d&&d.push(y=[]),S=!0,w=!1,b=_=NaN}function p(){v&&(g(m,M),x&&w&&E.rejoin(),v.push(E.buffer())),C.point=s,w&&a.lineEnd()}function g(n,t){n=Math.max(-Ha,Math.min(Ha,n)),t=Math.max(-Ha,Math.min(Ha,t));var e=f(n,t);if(d&&y.push([n,t]),S)m=n,M=t,x=e,S=!1,e&&(a.lineStart(),a.point(n,t));else if(e&&w)a.point(n,t);else{var r={a:{x:b,y:_},b:{x:n,y:t}};A(r)?(w||(a.lineStart(),a.point(r.a.x,r.a.y)),a.point(r.b.x,r.b.y),e||a.lineEnd(),k=!1):e&&(a.lineStart(),a.point(n,t),k=!1)}b=n,_=t,w=e}var v,d,y,m,M,x,b,_,w,S,k,N=a,E=Pt(),A=Yt(n,t,e,r),C={point:s,lineStart:h,lineEnd:p,polygonStart:function(){a=E,v=[],d=[],k=!0},polygonEnd:function(){a=N,v=ao.merge(v);var t=l([n,r]),e=k&&t,i=v.length;(e||i)&&(a.polygonStart(),e&&(a.lineStart(),c(null,null,1,a),a.lineEnd()),i&&Lt(v,u,t,c,a),a.polygonEnd()),v=d=y=null}};return C}}function Vt(n){var t=0,e=Fo/3,r=ae(n),i=r(t,e);return i.parallels=function(n){return arguments.length?r(t=n[0]*Fo/180,e=n[1]*Fo/180):[t/Fo*180,e/Fo*180]},i}function Xt(n,t){function e(n,t){var e=Math.sqrt(u-2*i*Math.sin(t))/i;return[e*Math.sin(n*=i),o-e*Math.cos(n)]}var r=Math.sin(n),i=(r+Math.sin(t))/2,u=1+r*(2*i-r),o=Math.sqrt(u)/i;return e.invert=function(n,t){var e=o-t;return[Math.atan2(n,e)/i,tn((u-(n*n+e*e)*i*i)/(2*i))]},e}function $t(){function n(n,t){Ia+=i*n-r*t,r=n,i=t}var t,e,r,i;$a.point=function(u,o){$a.point=n,t=r=u,e=i=o},$a.lineEnd=function(){n(t,e)}}function Bt(n,t){Ya>n&&(Ya=n),n>Va&&(Va=n),Za>t&&(Za=t),t>Xa&&(Xa=t)}function Wt(){function n(n,t){o.push("M",n,",",t,u)}function t(n,t){o.push("M",n,",",t),a.point=e}function e(n,t){o.push("L",n,",",t)}function r(){a.point=n}function i(){o.push("Z")}var u=Jt(4.5),o=[],a={point:n,lineStart:function(){a.point=t},lineEnd:r,polygonStart:function(){a.lineEnd=i},polygonEnd:function(){a.lineEnd=r,a.point=n},pointRadius:function(n){return u=Jt(n),a},result:function(){if(o.length){var n=o.join("");return o=[],n}}};return a}function Jt(n){return"m0,"+n+"a"+n+","+n+" 0 1,1 0,"+-2*n+"a"+n+","+n+" 0 1,1 0,"+2*n+"z"}function Gt(n,t){Ca+=n,za+=t,++La}function Kt(){function n(n,r){var i=n-t,u=r-e,o=Math.sqrt(i*i+u*u);qa+=o*(t+n)/2,Ta+=o*(e+r)/2,Ra+=o,Gt(t=n,e=r)}var t,e;Wa.point=function(r,i){Wa.point=n,Gt(t=r,e=i)}}function Qt(){Wa.point=Gt}function ne(){function n(n,t){var e=n-r,u=t-i,o=Math.sqrt(e*e+u*u);qa+=o*(r+n)/2,Ta+=o*(i+t)/2,Ra+=o,o=i*n-r*t,Da+=o*(r+n),Pa+=o*(i+t),Ua+=3*o,Gt(r=n,i=t)}var t,e,r,i;Wa.point=function(u,o){Wa.point=n,Gt(t=r=u,e=i=o)},Wa.lineEnd=function(){n(t,e)}}function te(n){function t(t,e){n.moveTo(t+o,e),n.arc(t,e,o,0,Ho)}function e(t,e){n.moveTo(t,e),a.point=r}function r(t,e){n.lineTo(t,e)}function i(){a.point=t}function u(){n.closePath()}var o=4.5,a={point:t,lineStart:function(){a.point=e},lineEnd:i,polygonStart:function(){a.lineEnd=u},polygonEnd:function(){a.lineEnd=i,a.point=t},pointRadius:function(n){return o=n,a},result:b};return a}function ee(n){function t(n){return(a?r:e)(n)}function e(t){return ue(t,function(e,r){e=n(e,r),t.point(e[0],e[1])})}function r(t){function e(e,r){e=n(e,r),t.point(e[0],e[1])}function r(){M=NaN,S.point=u,t.lineStart()}function u(e,r){var u=dt([e,r]),o=n(e,r);i(M,x,m,b,_,w,M=o[0],x=o[1],m=e,b=u[0],_=u[1],w=u[2],a,t),t.point(M,x)}function o(){S.point=e,t.lineEnd()}function l(){
+r(),S.point=c,S.lineEnd=f}function c(n,t){u(s=n,h=t),p=M,g=x,v=b,d=_,y=w,S.point=u}function f(){i(M,x,m,b,_,w,p,g,s,v,d,y,a,t),S.lineEnd=o,o()}var s,h,p,g,v,d,y,m,M,x,b,_,w,S={point:e,lineStart:r,lineEnd:o,polygonStart:function(){t.polygonStart(),S.lineStart=l},polygonEnd:function(){t.polygonEnd(),S.lineStart=r}};return S}function i(t,e,r,a,l,c,f,s,h,p,g,v,d,y){var m=f-t,M=s-e,x=m*m+M*M;if(x>4*u&&d--){var b=a+p,_=l+g,w=c+v,S=Math.sqrt(b*b+_*_+w*w),k=Math.asin(w/=S),N=xo(xo(w)-1)<Uo||xo(r-h)<Uo?(r+h)/2:Math.atan2(_,b),E=n(N,k),A=E[0],C=E[1],z=A-t,L=C-e,q=M*z-m*L;(q*q/x>u||xo((m*z+M*L)/x-.5)>.3||o>a*p+l*g+c*v)&&(i(t,e,r,a,l,c,A,C,N,b/=S,_/=S,w,d,y),y.point(A,C),i(A,C,N,b,_,w,f,s,h,p,g,v,d,y))}}var u=.5,o=Math.cos(30*Yo),a=16;return t.precision=function(n){return arguments.length?(a=(u=n*n)>0&&16,t):Math.sqrt(u)},t}function re(n){var t=ee(function(t,e){return n([t*Zo,e*Zo])});return function(n){return le(t(n))}}function ie(n){this.stream=n}function ue(n,t){return{point:t,sphere:function(){n.sphere()},lineStart:function(){n.lineStart()},lineEnd:function(){n.lineEnd()},polygonStart:function(){n.polygonStart()},polygonEnd:function(){n.polygonEnd()}}}function oe(n){return ae(function(){return n})()}function ae(n){function t(n){return n=a(n[0]*Yo,n[1]*Yo),[n[0]*h+l,c-n[1]*h]}function e(n){return n=a.invert((n[0]-l)/h,(c-n[1])/h),n&&[n[0]*Zo,n[1]*Zo]}function r(){a=Ct(o=se(y,M,x),u);var n=u(v,d);return l=p-n[0]*h,c=g+n[1]*h,i()}function i(){return f&&(f.valid=!1,f=null),t}var u,o,a,l,c,f,s=ee(function(n,t){return n=u(n,t),[n[0]*h+l,c-n[1]*h]}),h=150,p=480,g=250,v=0,d=0,y=0,M=0,x=0,b=Fa,_=m,w=null,S=null;return t.stream=function(n){return f&&(f.valid=!1),f=le(b(o,s(_(n)))),f.valid=!0,f},t.clipAngle=function(n){return arguments.length?(b=null==n?(w=n,Fa):It((w=+n)*Yo),i()):w},t.clipExtent=function(n){return arguments.length?(S=n,_=n?Zt(n[0][0],n[0][1],n[1][0],n[1][1]):m,i()):S},t.scale=function(n){return arguments.length?(h=+n,r()):h},t.translate=function(n){return arguments.length?(p=+n[0],g=+n[1],r()):[p,g]},t.center=function(n){return arguments.length?(v=n[0]%360*Yo,d=n[1]%360*Yo,r()):[v*Zo,d*Zo]},t.rotate=function(n){return arguments.length?(y=n[0]%360*Yo,M=n[1]%360*Yo,x=n.length>2?n[2]%360*Yo:0,r()):[y*Zo,M*Zo,x*Zo]},ao.rebind(t,s,"precision"),function(){return u=n.apply(this,arguments),t.invert=u.invert&&e,r()}}function le(n){return ue(n,function(t,e){n.point(t*Yo,e*Yo)})}function ce(n,t){return[n,t]}function fe(n,t){return[n>Fo?n-Ho:-Fo>n?n+Ho:n,t]}function se(n,t,e){return n?t||e?Ct(pe(n),ge(t,e)):pe(n):t||e?ge(t,e):fe}function he(n){return function(t,e){return t+=n,[t>Fo?t-Ho:-Fo>t?t+Ho:t,e]}}function pe(n){var t=he(n);return t.invert=he(-n),t}function ge(n,t){function e(n,t){var e=Math.cos(t),a=Math.cos(n)*e,l=Math.sin(n)*e,c=Math.sin(t),f=c*r+a*i;return[Math.atan2(l*u-f*o,a*r-c*i),tn(f*u+l*o)]}var r=Math.cos(n),i=Math.sin(n),u=Math.cos(t),o=Math.sin(t);return e.invert=function(n,t){var e=Math.cos(t),a=Math.cos(n)*e,l=Math.sin(n)*e,c=Math.sin(t),f=c*u-l*o;return[Math.atan2(l*u+c*o,a*r+f*i),tn(f*r-a*i)]},e}function ve(n,t){var e=Math.cos(n),r=Math.sin(n);return function(i,u,o,a){var l=o*t;null!=i?(i=de(e,i),u=de(e,u),(o>0?u>i:i>u)&&(i+=o*Ho)):(i=n+o*Ho,u=n-.5*l);for(var c,f=i;o>0?f>u:u>f;f-=l)a.point((c=_t([e,-r*Math.cos(f),-r*Math.sin(f)]))[0],c[1])}}function de(n,t){var e=dt(t);e[0]-=n,bt(e);var r=nn(-e[1]);return((-e[2]<0?-r:r)+2*Math.PI-Uo)%(2*Math.PI)}function ye(n,t,e){var r=ao.range(n,t-Uo,e).concat(t);return function(n){return r.map(function(t){return[n,t]})}}function me(n,t,e){var r=ao.range(n,t-Uo,e).concat(t);return function(n){return r.map(function(t){return[t,n]})}}function Me(n){return n.source}function xe(n){return n.target}function be(n,t,e,r){var i=Math.cos(t),u=Math.sin(t),o=Math.cos(r),a=Math.sin(r),l=i*Math.cos(n),c=i*Math.sin(n),f=o*Math.cos(e),s=o*Math.sin(e),h=2*Math.asin(Math.sqrt(on(r-t)+i*o*on(e-n))),p=1/Math.sin(h),g=h?function(n){var t=Math.sin(n*=h)*p,e=Math.sin(h-n)*p,r=e*l+t*f,i=e*c+t*s,o=e*u+t*a;return[Math.atan2(i,r)*Zo,Math.atan2(o,Math.sqrt(r*r+i*i))*Zo]}:function(){return[n*Zo,t*Zo]};return g.distance=h,g}function _e(){function n(n,i){var u=Math.sin(i*=Yo),o=Math.cos(i),a=xo((n*=Yo)-t),l=Math.cos(a);Ja+=Math.atan2(Math.sqrt((a=o*Math.sin(a))*a+(a=r*u-e*o*l)*a),e*u+r*o*l),t=n,e=u,r=o}var t,e,r;Ga.point=function(i,u){t=i*Yo,e=Math.sin(u*=Yo),r=Math.cos(u),Ga.point=n},Ga.lineEnd=function(){Ga.point=Ga.lineEnd=b}}function we(n,t){function e(t,e){var r=Math.cos(t),i=Math.cos(e),u=n(r*i);return[u*i*Math.sin(t),u*Math.sin(e)]}return e.invert=function(n,e){var r=Math.sqrt(n*n+e*e),i=t(r),u=Math.sin(i),o=Math.cos(i);return[Math.atan2(n*u,r*o),Math.asin(r&&e*u/r)]},e}function Se(n,t){function e(n,t){o>0?-Io+Uo>t&&(t=-Io+Uo):t>Io-Uo&&(t=Io-Uo);var e=o/Math.pow(i(t),u);return[e*Math.sin(u*n),o-e*Math.cos(u*n)]}var r=Math.cos(n),i=function(n){return Math.tan(Fo/4+n/2)},u=n===t?Math.sin(n):Math.log(r/Math.cos(t))/Math.log(i(t)/i(n)),o=r*Math.pow(i(n),u)/u;return u?(e.invert=function(n,t){var e=o-t,r=K(u)*Math.sqrt(n*n+e*e);return[Math.atan2(n,e)/u,2*Math.atan(Math.pow(o/r,1/u))-Io]},e):Ne}function ke(n,t){function e(n,t){var e=u-t;return[e*Math.sin(i*n),u-e*Math.cos(i*n)]}var r=Math.cos(n),i=n===t?Math.sin(n):(r-Math.cos(t))/(t-n),u=r/i+n;return xo(i)<Uo?ce:(e.invert=function(n,t){var e=u-t;return[Math.atan2(n,e)/i,u-K(i)*Math.sqrt(n*n+e*e)]},e)}function Ne(n,t){return[n,Math.log(Math.tan(Fo/4+t/2))]}function Ee(n){var t,e=oe(n),r=e.scale,i=e.translate,u=e.clipExtent;return e.scale=function(){var n=r.apply(e,arguments);return n===e?t?e.clipExtent(null):e:n},e.translate=function(){var n=i.apply(e,arguments);return n===e?t?e.clipExtent(null):e:n},e.clipExtent=function(n){var o=u.apply(e,arguments);if(o===e){if(t=null==n){var a=Fo*r(),l=i();u([[l[0]-a,l[1]-a],[l[0]+a,l[1]+a]])}}else t&&(o=null);return o},e.clipExtent(null)}function Ae(n,t){return[Math.log(Math.tan(Fo/4+t/2)),-n]}function Ce(n){return n[0]}function ze(n){return n[1]}function Le(n){for(var t=n.length,e=[0,1],r=2,i=2;t>i;i++){for(;r>1&&Q(n[e[r-2]],n[e[r-1]],n[i])<=0;)--r;e[r++]=i}return e.slice(0,r)}function qe(n,t){return n[0]-t[0]||n[1]-t[1]}function Te(n,t,e){return(e[0]-t[0])*(n[1]-t[1])<(e[1]-t[1])*(n[0]-t[0])}function Re(n,t,e,r){var i=n[0],u=e[0],o=t[0]-i,a=r[0]-u,l=n[1],c=e[1],f=t[1]-l,s=r[1]-c,h=(a*(l-c)-s*(i-u))/(s*o-a*f);return[i+h*o,l+h*f]}function De(n){var t=n[0],e=n[n.length-1];return!(t[0]-e[0]||t[1]-e[1])}function Pe(){rr(this),this.edge=this.site=this.circle=null}function Ue(n){var t=cl.pop()||new Pe;return t.site=n,t}function je(n){Be(n),ol.remove(n),cl.push(n),rr(n)}function Fe(n){var t=n.circle,e=t.x,r=t.cy,i={x:e,y:r},u=n.P,o=n.N,a=[n];je(n);for(var l=u;l.circle&&xo(e-l.circle.x)<Uo&&xo(r-l.circle.cy)<Uo;)u=l.P,a.unshift(l),je(l),l=u;a.unshift(l),Be(l);for(var c=o;c.circle&&xo(e-c.circle.x)<Uo&&xo(r-c.circle.cy)<Uo;)o=c.N,a.push(c),je(c),c=o;a.push(c),Be(c);var f,s=a.length;for(f=1;s>f;++f)c=a[f],l=a[f-1],nr(c.edge,l.site,c.site,i);l=a[0],c=a[s-1],c.edge=Ke(l.site,c.site,null,i),$e(l),$e(c)}function He(n){for(var t,e,r,i,u=n.x,o=n.y,a=ol._;a;)if(r=Oe(a,o)-u,r>Uo)a=a.L;else{if(i=u-Ie(a,o),!(i>Uo)){r>-Uo?(t=a.P,e=a):i>-Uo?(t=a,e=a.N):t=e=a;break}if(!a.R){t=a;break}a=a.R}var l=Ue(n);if(ol.insert(t,l),t||e){if(t===e)return Be(t),e=Ue(t.site),ol.insert(l,e),l.edge=e.edge=Ke(t.site,l.site),$e(t),void $e(e);if(!e)return void(l.edge=Ke(t.site,l.site));Be(t),Be(e);var c=t.site,f=c.x,s=c.y,h=n.x-f,p=n.y-s,g=e.site,v=g.x-f,d=g.y-s,y=2*(h*d-p*v),m=h*h+p*p,M=v*v+d*d,x={x:(d*m-p*M)/y+f,y:(h*M-v*m)/y+s};nr(e.edge,c,g,x),l.edge=Ke(c,n,null,x),e.edge=Ke(n,g,null,x),$e(t),$e(e)}}function Oe(n,t){var e=n.site,r=e.x,i=e.y,u=i-t;if(!u)return r;var o=n.P;if(!o)return-(1/0);e=o.site;var a=e.x,l=e.y,c=l-t;if(!c)return a;var f=a-r,s=1/u-1/c,h=f/c;return s?(-h+Math.sqrt(h*h-2*s*(f*f/(-2*c)-l+c/2+i-u/2)))/s+r:(r+a)/2}function Ie(n,t){var e=n.N;if(e)return Oe(e,t);var r=n.site;return r.y===t?r.x:1/0}function Ye(n){this.site=n,this.edges=[]}function Ze(n){for(var t,e,r,i,u,o,a,l,c,f,s=n[0][0],h=n[1][0],p=n[0][1],g=n[1][1],v=ul,d=v.length;d--;)if(u=v[d],u&&u.prepare())for(a=u.edges,l=a.length,o=0;l>o;)f=a[o].end(),r=f.x,i=f.y,c=a[++o%l].start(),t=c.x,e=c.y,(xo(r-t)>Uo||xo(i-e)>Uo)&&(a.splice(o,0,new tr(Qe(u.site,f,xo(r-s)<Uo&&g-i>Uo?{x:s,y:xo(t-s)<Uo?e:g}:xo(i-g)<Uo&&h-r>Uo?{x:xo(e-g)<Uo?t:h,y:g}:xo(r-h)<Uo&&i-p>Uo?{x:h,y:xo(t-h)<Uo?e:p}:xo(i-p)<Uo&&r-s>Uo?{x:xo(e-p)<Uo?t:s,y:p}:null),u.site,null)),++l)}function Ve(n,t){return t.angle-n.angle}function Xe(){rr(this),this.x=this.y=this.arc=this.site=this.cy=null}function $e(n){var t=n.P,e=n.N;if(t&&e){var r=t.site,i=n.site,u=e.site;if(r!==u){var o=i.x,a=i.y,l=r.x-o,c=r.y-a,f=u.x-o,s=u.y-a,h=2*(l*s-c*f);if(!(h>=-jo)){var p=l*l+c*c,g=f*f+s*s,v=(s*p-c*g)/h,d=(l*g-f*p)/h,s=d+a,y=fl.pop()||new Xe;y.arc=n,y.site=i,y.x=v+o,y.y=s+Math.sqrt(v*v+d*d),y.cy=s,n.circle=y;for(var m=null,M=ll._;M;)if(y.y<M.y||y.y===M.y&&y.x<=M.x){if(!M.L){m=M.P;break}M=M.L}else{if(!M.R){m=M;break}M=M.R}ll.insert(m,y),m||(al=y)}}}}function Be(n){var t=n.circle;t&&(t.P||(al=t.N),ll.remove(t),fl.push(t),rr(t),n.circle=null)}function We(n){for(var t,e=il,r=Yt(n[0][0],n[0][1],n[1][0],n[1][1]),i=e.length;i--;)t=e[i],(!Je(t,n)||!r(t)||xo(t.a.x-t.b.x)<Uo&&xo(t.a.y-t.b.y)<Uo)&&(t.a=t.b=null,e.splice(i,1))}function Je(n,t){var e=n.b;if(e)return!0;var r,i,u=n.a,o=t[0][0],a=t[1][0],l=t[0][1],c=t[1][1],f=n.l,s=n.r,h=f.x,p=f.y,g=s.x,v=s.y,d=(h+g)/2,y=(p+v)/2;if(v===p){if(o>d||d>=a)return;if(h>g){if(u){if(u.y>=c)return}else u={x:d,y:l};e={x:d,y:c}}else{if(u){if(u.y<l)return}else u={x:d,y:c};e={x:d,y:l}}}else if(r=(h-g)/(v-p),i=y-r*d,-1>r||r>1)if(h>g){if(u){if(u.y>=c)return}else u={x:(l-i)/r,y:l};e={x:(c-i)/r,y:c}}else{if(u){if(u.y<l)return}else u={x:(c-i)/r,y:c};e={x:(l-i)/r,y:l}}else if(v>p){if(u){if(u.x>=a)return}else u={x:o,y:r*o+i};e={x:a,y:r*a+i}}else{if(u){if(u.x<o)return}else u={x:a,y:r*a+i};e={x:o,y:r*o+i}}return n.a=u,n.b=e,!0}function Ge(n,t){this.l=n,this.r=t,this.a=this.b=null}function Ke(n,t,e,r){var i=new Ge(n,t);return il.push(i),e&&nr(i,n,t,e),r&&nr(i,t,n,r),ul[n.i].edges.push(new tr(i,n,t)),ul[t.i].edges.push(new tr(i,t,n)),i}function Qe(n,t,e){var r=new Ge(n,null);return r.a=t,r.b=e,il.push(r),r}function nr(n,t,e,r){n.a||n.b?n.l===e?n.b=r:n.a=r:(n.a=r,n.l=t,n.r=e)}function tr(n,t,e){var r=n.a,i=n.b;this.edge=n,this.site=t,this.angle=e?Math.atan2(e.y-t.y,e.x-t.x):n.l===t?Math.atan2(i.x-r.x,r.y-i.y):Math.atan2(r.x-i.x,i.y-r.y)}function er(){this._=null}function rr(n){n.U=n.C=n.L=n.R=n.P=n.N=null}function ir(n,t){var e=t,r=t.R,i=e.U;i?i.L===e?i.L=r:i.R=r:n._=r,r.U=i,e.U=r,e.R=r.L,e.R&&(e.R.U=e),r.L=e}function ur(n,t){var e=t,r=t.L,i=e.U;i?i.L===e?i.L=r:i.R=r:n._=r,r.U=i,e.U=r,e.L=r.R,e.L&&(e.L.U=e),r.R=e}function or(n){for(;n.L;)n=n.L;return n}function ar(n,t){var e,r,i,u=n.sort(lr).pop();for(il=[],ul=new Array(n.length),ol=new er,ll=new er;;)if(i=al,u&&(!i||u.y<i.y||u.y===i.y&&u.x<i.x))u.x===e&&u.y===r||(ul[u.i]=new Ye(u),He(u),e=u.x,r=u.y),u=n.pop();else{if(!i)break;Fe(i.arc)}t&&(We(t),Ze(t));var o={cells:ul,edges:il};return ol=ll=il=ul=null,o}function lr(n,t){return t.y-n.y||t.x-n.x}function cr(n,t,e){return(n.x-e.x)*(t.y-n.y)-(n.x-t.x)*(e.y-n.y)}function fr(n){return n.x}function sr(n){return n.y}function hr(){return{leaf:!0,nodes:[],point:null,x:null,y:null}}function pr(n,t,e,r,i,u){if(!n(t,e,r,i,u)){var o=.5*(e+i),a=.5*(r+u),l=t.nodes;l[0]&&pr(n,l[0],e,r,o,a),l[1]&&pr(n,l[1],o,r,i,a),l[2]&&pr(n,l[2],e,a,o,u),l[3]&&pr(n,l[3],o,a,i,u)}}function gr(n,t,e,r,i,u,o){var a,l=1/0;return function c(n,f,s,h,p){if(!(f>u||s>o||r>h||i>p)){if(g=n.point){var g,v=t-n.x,d=e-n.y,y=v*v+d*d;if(l>y){var m=Math.sqrt(l=y);r=t-m,i=e-m,u=t+m,o=e+m,a=g}}for(var M=n.nodes,x=.5*(f+h),b=.5*(s+p),_=t>=x,w=e>=b,S=w<<1|_,k=S+4;k>S;++S)if(n=M[3&S])switch(3&S){case 0:c(n,f,s,x,b);break;case 1:c(n,x,s,h,b);break;case 2:c(n,f,b,x,p);break;case 3:c(n,x,b,h,p)}}}(n,r,i,u,o),a}function vr(n,t){n=ao.rgb(n),t=ao.rgb(t);var e=n.r,r=n.g,i=n.b,u=t.r-e,o=t.g-r,a=t.b-i;return function(n){return"#"+bn(Math.round(e+u*n))+bn(Math.round(r+o*n))+bn(Math.round(i+a*n))}}function dr(n,t){var e,r={},i={};for(e in n)e in t?r[e]=Mr(n[e],t[e]):i[e]=n[e];for(e in t)e in n||(i[e]=t[e]);return function(n){for(e in r)i[e]=r[e](n);return i}}function yr(n,t){return n=+n,t=+t,function(e){return n*(1-e)+t*e}}function mr(n,t){var e,r,i,u=hl.lastIndex=pl.lastIndex=0,o=-1,a=[],l=[];for(n+="",t+="";(e=hl.exec(n))&&(r=pl.exec(t));)(i=r.index)>u&&(i=t.slice(u,i),a[o]?a[o]+=i:a[++o]=i),(e=e[0])===(r=r[0])?a[o]?a[o]+=r:a[++o]=r:(a[++o]=null,l.push({i:o,x:yr(e,r)})),u=pl.lastIndex;return u<t.length&&(i=t.slice(u),a[o]?a[o]+=i:a[++o]=i),a.length<2?l[0]?(t=l[0].x,function(n){return t(n)+""}):function(){return t}:(t=l.length,function(n){for(var e,r=0;t>r;++r)a[(e=l[r]).i]=e.x(n);return a.join("")})}function Mr(n,t){for(var e,r=ao.interpolators.length;--r>=0&&!(e=ao.interpolators[r](n,t)););return e}function xr(n,t){var e,r=[],i=[],u=n.length,o=t.length,a=Math.min(n.length,t.length);for(e=0;a>e;++e)r.push(Mr(n[e],t[e]));for(;u>e;++e)i[e]=n[e];for(;o>e;++e)i[e]=t[e];return function(n){for(e=0;a>e;++e)i[e]=r[e](n);return i}}function br(n){return function(t){return 0>=t?0:t>=1?1:n(t)}}function _r(n){return function(t){return 1-n(1-t)}}function wr(n){return function(t){return.5*(.5>t?n(2*t):2-n(2-2*t))}}function Sr(n){return n*n}function kr(n){return n*n*n}function Nr(n){if(0>=n)return 0;if(n>=1)return 1;var t=n*n,e=t*n;return 4*(.5>n?e:3*(n-t)+e-.75)}function Er(n){return function(t){return Math.pow(t,n)}}function Ar(n){return 1-Math.cos(n*Io)}function Cr(n){return Math.pow(2,10*(n-1))}function zr(n){return 1-Math.sqrt(1-n*n)}function Lr(n,t){var e;return arguments.length<2&&(t=.45),arguments.length?e=t/Ho*Math.asin(1/n):(n=1,e=t/4),function(r){return 1+n*Math.pow(2,-10*r)*Math.sin((r-e)*Ho/t)}}function qr(n){return n||(n=1.70158),function(t){return t*t*((n+1)*t-n)}}function Tr(n){return 1/2.75>n?7.5625*n*n:2/2.75>n?7.5625*(n-=1.5/2.75)*n+.75:2.5/2.75>n?7.5625*(n-=2.25/2.75)*n+.9375:7.5625*(n-=2.625/2.75)*n+.984375}function Rr(n,t){n=ao.hcl(n),t=ao.hcl(t);var e=n.h,r=n.c,i=n.l,u=t.h-e,o=t.c-r,a=t.l-i;return isNaN(o)&&(o=0,r=isNaN(r)?t.c:r),isNaN(u)?(u=0,e=isNaN(e)?t.h:e):u>180?u-=360:-180>u&&(u+=360),function(n){return sn(e+u*n,r+o*n,i+a*n)+""}}function Dr(n,t){n=ao.hsl(n),t=ao.hsl(t);var e=n.h,r=n.s,i=n.l,u=t.h-e,o=t.s-r,a=t.l-i;return isNaN(o)&&(o=0,r=isNaN(r)?t.s:r),isNaN(u)?(u=0,e=isNaN(e)?t.h:e):u>180?u-=360:-180>u&&(u+=360),function(n){return cn(e+u*n,r+o*n,i+a*n)+""}}function Pr(n,t){n=ao.lab(n),t=ao.lab(t);var e=n.l,r=n.a,i=n.b,u=t.l-e,o=t.a-r,a=t.b-i;return function(n){return pn(e+u*n,r+o*n,i+a*n)+""}}function Ur(n,t){return t-=n,function(e){return Math.round(n+t*e)}}function jr(n){var t=[n.a,n.b],e=[n.c,n.d],r=Hr(t),i=Fr(t,e),u=Hr(Or(e,t,-i))||0;t[0]*e[1]<e[0]*t[1]&&(t[0]*=-1,t[1]*=-1,r*=-1,i*=-1),this.rotate=(r?Math.atan2(t[1],t[0]):Math.atan2(-e[0],e[1]))*Zo,this.translate=[n.e,n.f],this.scale=[r,u],this.skew=u?Math.atan2(i,u)*Zo:0}function Fr(n,t){return n[0]*t[0]+n[1]*t[1]}function Hr(n){var t=Math.sqrt(Fr(n,n));return t&&(n[0]/=t,n[1]/=t),t}function Or(n,t,e){return n[0]+=e*t[0],n[1]+=e*t[1],n}function Ir(n){return n.length?n.pop()+",":""}function Yr(n,t,e,r){if(n[0]!==t[0]||n[1]!==t[1]){var i=e.push("translate(",null,",",null,")");r.push({i:i-4,x:yr(n[0],t[0])},{i:i-2,x:yr(n[1],t[1])})}else(t[0]||t[1])&&e.push("translate("+t+")")}function Zr(n,t,e,r){n!==t?(n-t>180?t+=360:t-n>180&&(n+=360),r.push({i:e.push(Ir(e)+"rotate(",null,")")-2,x:yr(n,t)})):t&&e.push(Ir(e)+"rotate("+t+")")}function Vr(n,t,e,r){n!==t?r.push({i:e.push(Ir(e)+"skewX(",null,")")-2,x:yr(n,t)}):t&&e.push(Ir(e)+"skewX("+t+")")}function Xr(n,t,e,r){if(n[0]!==t[0]||n[1]!==t[1]){var i=e.push(Ir(e)+"scale(",null,",",null,")");r.push({i:i-4,x:yr(n[0],t[0])},{i:i-2,x:yr(n[1],t[1])})}else 1===t[0]&&1===t[1]||e.push(Ir(e)+"scale("+t+")")}function $r(n,t){var e=[],r=[];return n=ao.transform(n),t=ao.transform(t),Yr(n.translate,t.translate,e,r),Zr(n.rotate,t.rotate,e,r),Vr(n.skew,t.skew,e,r),Xr(n.scale,t.scale,e,r),n=t=null,function(n){for(var t,i=-1,u=r.length;++i<u;)e[(t=r[i]).i]=t.x(n);return e.join("")}}function Br(n,t){return t=(t-=n=+n)||1/t,function(e){return(e-n)/t}}function Wr(n,t){return t=(t-=n=+n)||1/t,function(e){return Math.max(0,Math.min(1,(e-n)/t))}}function Jr(n){for(var t=n.source,e=n.target,r=Kr(t,e),i=[t];t!==r;)t=t.parent,i.push(t);for(var u=i.length;e!==r;)i.splice(u,0,e),e=e.parent;return i}function Gr(n){for(var t=[],e=n.parent;null!=e;)t.push(n),n=e,e=e.parent;return t.push(n),t}function Kr(n,t){if(n===t)return n;for(var e=Gr(n),r=Gr(t),i=e.pop(),u=r.pop(),o=null;i===u;)o=i,i=e.pop(),u=r.pop();return o}function Qr(n){n.fixed|=2}function ni(n){n.fixed&=-7}function ti(n){n.fixed|=4,n.px=n.x,n.py=n.y}function ei(n){n.fixed&=-5}function ri(n,t,e){var r=0,i=0;if(n.charge=0,!n.leaf)for(var u,o=n.nodes,a=o.length,l=-1;++l<a;)u=o[l],null!=u&&(ri(u,t,e),n.charge+=u.charge,r+=u.charge*u.cx,i+=u.charge*u.cy);if(n.point){n.leaf||(n.point.x+=Math.random()-.5,n.point.y+=Math.random()-.5);var c=t*e[n.point.index];n.charge+=n.pointCharge=c,r+=c*n.point.x,i+=c*n.point.y}n.cx=r/n.charge,n.cy=i/n.charge}function ii(n,t){return ao.rebind(n,t,"sort","children","value"),n.nodes=n,n.links=fi,n}function ui(n,t){for(var e=[n];null!=(n=e.pop());)if(t(n),(i=n.children)&&(r=i.length))for(var r,i;--r>=0;)e.push(i[r])}function oi(n,t){for(var e=[n],r=[];null!=(n=e.pop());)if(r.push(n),(u=n.children)&&(i=u.length))for(var i,u,o=-1;++o<i;)e.push(u[o]);for(;null!=(n=r.pop());)t(n)}function ai(n){return n.children}function li(n){return n.value}function ci(n,t){return t.value-n.value}function fi(n){return ao.merge(n.map(function(n){return(n.children||[]).map(function(t){return{source:n,target:t}})}))}function si(n){return n.x}function hi(n){return n.y}function pi(n,t,e){n.y0=t,n.y=e}function gi(n){return ao.range(n.length)}function vi(n){for(var t=-1,e=n[0].length,r=[];++t<e;)r[t]=0;return r}function di(n){for(var t,e=1,r=0,i=n[0][1],u=n.length;u>e;++e)(t=n[e][1])>i&&(r=e,i=t);return r}function yi(n){return n.reduce(mi,0)}function mi(n,t){return n+t[1]}function Mi(n,t){return xi(n,Math.ceil(Math.log(t.length)/Math.LN2+1))}function xi(n,t){for(var e=-1,r=+n[0],i=(n[1]-r)/t,u=[];++e<=t;)u[e]=i*e+r;return u}function bi(n){return[ao.min(n),ao.max(n)]}function _i(n,t){return n.value-t.value}function wi(n,t){var e=n._pack_next;n._pack_next=t,t._pack_prev=n,t._pack_next=e,e._pack_prev=t}function Si(n,t){n._pack_next=t,t._pack_prev=n}function ki(n,t){var e=t.x-n.x,r=t.y-n.y,i=n.r+t.r;return.999*i*i>e*e+r*r}function Ni(n){function t(n){f=Math.min(n.x-n.r,f),s=Math.max(n.x+n.r,s),h=Math.min(n.y-n.r,h),p=Math.max(n.y+n.r,p)}if((e=n.children)&&(c=e.length)){var e,r,i,u,o,a,l,c,f=1/0,s=-(1/0),h=1/0,p=-(1/0);if(e.forEach(Ei),r=e[0],r.x=-r.r,r.y=0,t(r),c>1&&(i=e[1],i.x=i.r,i.y=0,t(i),c>2))for(u=e[2],zi(r,i,u),t(u),wi(r,u),r._pack_prev=u,wi(u,i),i=r._pack_next,o=3;c>o;o++){zi(r,i,u=e[o]);var g=0,v=1,d=1;for(a=i._pack_next;a!==i;a=a._pack_next,v++)if(ki(a,u)){g=1;break}if(1==g)for(l=r._pack_prev;l!==a._pack_prev&&!ki(l,u);l=l._pack_prev,d++);g?(d>v||v==d&&i.r<r.r?Si(r,i=a):Si(r=l,i),o--):(wi(r,u),i=u,t(u))}var y=(f+s)/2,m=(h+p)/2,M=0;for(o=0;c>o;o++)u=e[o],u.x-=y,u.y-=m,M=Math.max(M,u.r+Math.sqrt(u.x*u.x+u.y*u.y));n.r=M,e.forEach(Ai)}}function Ei(n){n._pack_next=n._pack_prev=n}function Ai(n){delete n._pack_next,delete n._pack_prev}function Ci(n,t,e,r){var i=n.children;if(n.x=t+=r*n.x,n.y=e+=r*n.y,n.r*=r,i)for(var u=-1,o=i.length;++u<o;)Ci(i[u],t,e,r)}function zi(n,t,e){var r=n.r+e.r,i=t.x-n.x,u=t.y-n.y;if(r&&(i||u)){var o=t.r+e.r,a=i*i+u*u;o*=o,r*=r;var l=.5+(r-o)/(2*a),c=Math.sqrt(Math.max(0,2*o*(r+a)-(r-=a)*r-o*o))/(2*a);e.x=n.x+l*i+c*u,e.y=n.y+l*u-c*i}else e.x=n.x+r,e.y=n.y}function Li(n,t){return n.parent==t.parent?1:2}function qi(n){var t=n.children;return t.length?t[0]:n.t}function Ti(n){var t,e=n.children;return(t=e.length)?e[t-1]:n.t}function Ri(n,t,e){var r=e/(t.i-n.i);t.c-=r,t.s+=e,n.c+=r,t.z+=e,t.m+=e}function Di(n){for(var t,e=0,r=0,i=n.children,u=i.length;--u>=0;)t=i[u],t.z+=e,t.m+=e,e+=t.s+(r+=t.c)}function Pi(n,t,e){return n.a.parent===t.parent?n.a:e}function Ui(n){return 1+ao.max(n,function(n){return n.y})}function ji(n){return n.reduce(function(n,t){return n+t.x},0)/n.length}function Fi(n){var t=n.children;return t&&t.length?Fi(t[0]):n}function Hi(n){var t,e=n.children;return e&&(t=e.length)?Hi(e[t-1]):n}function Oi(n){return{x:n.x,y:n.y,dx:n.dx,dy:n.dy}}function Ii(n,t){var e=n.x+t[3],r=n.y+t[0],i=n.dx-t[1]-t[3],u=n.dy-t[0]-t[2];return 0>i&&(e+=i/2,i=0),0>u&&(r+=u/2,u=0),{x:e,y:r,dx:i,dy:u}}function Yi(n){var t=n[0],e=n[n.length-1];return e>t?[t,e]:[e,t]}function Zi(n){return n.rangeExtent?n.rangeExtent():Yi(n.range())}function Vi(n,t,e,r){var i=e(n[0],n[1]),u=r(t[0],t[1]);return function(n){return u(i(n))}}function Xi(n,t){var e,r=0,i=n.length-1,u=n[r],o=n[i];return u>o&&(e=r,r=i,i=e,e=u,u=o,o=e),n[r]=t.floor(u),n[i]=t.ceil(o),n}function $i(n){return n?{floor:function(t){return Math.floor(t/n)*n},ceil:function(t){return Math.ceil(t/n)*n}}:Sl}function Bi(n,t,e,r){var i=[],u=[],o=0,a=Math.min(n.length,t.length)-1;for(n[a]<n[0]&&(n=n.slice().reverse(),t=t.slice().reverse());++o<=a;)i.push(e(n[o-1],n[o])),u.push(r(t[o-1],t[o]));return function(t){var e=ao.bisect(n,t,1,a)-1;return u[e](i[e](t))}}function Wi(n,t,e,r){function i(){var i=Math.min(n.length,t.length)>2?Bi:Vi,l=r?Wr:Br;return o=i(n,t,l,e),a=i(t,n,l,Mr),u}function u(n){return o(n)}var o,a;return u.invert=function(n){return a(n)},u.domain=function(t){return arguments.length?(n=t.map(Number),i()):n},u.range=function(n){return arguments.length?(t=n,i()):t},u.rangeRound=function(n){return u.range(n).interpolate(Ur)},u.clamp=function(n){return arguments.length?(r=n,i()):r},u.interpolate=function(n){return arguments.length?(e=n,i()):e},u.ticks=function(t){return Qi(n,t)},u.tickFormat=function(t,e){return nu(n,t,e)},u.nice=function(t){return Gi(n,t),i()},u.copy=function(){return Wi(n,t,e,r)},i()}function Ji(n,t){return ao.rebind(n,t,"range","rangeRound","interpolate","clamp")}function Gi(n,t){return Xi(n,$i(Ki(n,t)[2])),Xi(n,$i(Ki(n,t)[2])),n}function Ki(n,t){null==t&&(t=10);var e=Yi(n),r=e[1]-e[0],i=Math.pow(10,Math.floor(Math.log(r/t)/Math.LN10)),u=t/r*i;return.15>=u?i*=10:.35>=u?i*=5:.75>=u&&(i*=2),e[0]=Math.ceil(e[0]/i)*i,e[1]=Math.floor(e[1]/i)*i+.5*i,e[2]=i,e}function Qi(n,t){return ao.range.apply(ao,Ki(n,t))}function nu(n,t,e){var r=Ki(n,t);if(e){var i=ha.exec(e);if(i.shift(),"s"===i[8]){var u=ao.formatPrefix(Math.max(xo(r[0]),xo(r[1])));return i[7]||(i[7]="."+tu(u.scale(r[2]))),i[8]="f",e=ao.format(i.join("")),function(n){return e(u.scale(n))+u.symbol}}i[7]||(i[7]="."+eu(i[8],r)),e=i.join("")}else e=",."+tu(r[2])+"f";return ao.format(e)}function tu(n){return-Math.floor(Math.log(n)/Math.LN10+.01)}function eu(n,t){var e=tu(t[2]);return n in kl?Math.abs(e-tu(Math.max(xo(t[0]),xo(t[1]))))+ +("e"!==n):e-2*("%"===n)}function ru(n,t,e,r){function i(n){return(e?Math.log(0>n?0:n):-Math.log(n>0?0:-n))/Math.log(t)}function u(n){return e?Math.pow(t,n):-Math.pow(t,-n)}function o(t){return n(i(t))}return o.invert=function(t){return u(n.invert(t))},o.domain=function(t){return arguments.length?(e=t[0]>=0,n.domain((r=t.map(Number)).map(i)),o):r},o.base=function(e){return arguments.length?(t=+e,n.domain(r.map(i)),o):t},o.nice=function(){var t=Xi(r.map(i),e?Math:El);return n.domain(t),r=t.map(u),o},o.ticks=function(){var n=Yi(r),o=[],a=n[0],l=n[1],c=Math.floor(i(a)),f=Math.ceil(i(l)),s=t%1?2:t;if(isFinite(f-c)){if(e){for(;f>c;c++)for(var h=1;s>h;h++)o.push(u(c)*h);o.push(u(c))}else for(o.push(u(c));c++<f;)for(var h=s-1;h>0;h--)o.push(u(c)*h);for(c=0;o[c]<a;c++);for(f=o.length;o[f-1]>l;f--);o=o.slice(c,f)}return o},o.tickFormat=function(n,e){if(!arguments.length)return Nl;arguments.length<2?e=Nl:"function"!=typeof e&&(e=ao.format(e));var r=Math.max(1,t*n/o.ticks().length);return function(n){var o=n/u(Math.round(i(n)));return t-.5>o*t&&(o*=t),r>=o?e(n):""}},o.copy=function(){return ru(n.copy(),t,e,r)},Ji(o,n)}function iu(n,t,e){function r(t){return n(i(t))}var i=uu(t),u=uu(1/t);return r.invert=function(t){return u(n.invert(t))},r.domain=function(t){return arguments.length?(n.domain((e=t.map(Number)).map(i)),r):e},r.ticks=function(n){return Qi(e,n)},r.tickFormat=function(n,t){return nu(e,n,t)},r.nice=function(n){return r.domain(Gi(e,n))},r.exponent=function(o){return arguments.length?(i=uu(t=o),u=uu(1/t),n.domain(e.map(i)),r):t},r.copy=function(){return iu(n.copy(),t,e)},Ji(r,n)}function uu(n){return function(t){return 0>t?-Math.pow(-t,n):Math.pow(t,n)}}function ou(n,t){function e(e){return u[((i.get(e)||("range"===t.t?i.set(e,n.push(e)):NaN))-1)%u.length]}function r(t,e){return ao.range(n.length).map(function(n){return t+e*n})}var i,u,o;return e.domain=function(r){if(!arguments.length)return n;n=[],i=new c;for(var u,o=-1,a=r.length;++o<a;)i.has(u=r[o])||i.set(u,n.push(u));return e[t.t].apply(e,t.a)},e.range=function(n){return arguments.length?(u=n,o=0,t={t:"range",a:arguments},e):u},e.rangePoints=function(i,a){arguments.length<2&&(a=0);var l=i[0],c=i[1],f=n.length<2?(l=(l+c)/2,0):(c-l)/(n.length-1+a);return u=r(l+f*a/2,f),o=0,t={t:"rangePoints",a:arguments},e},e.rangeRoundPoints=function(i,a){arguments.length<2&&(a=0);var l=i[0],c=i[1],f=n.length<2?(l=c=Math.round((l+c)/2),0):(c-l)/(n.length-1+a)|0;return u=r(l+Math.round(f*a/2+(c-l-(n.length-1+a)*f)/2),f),o=0,t={t:"rangeRoundPoints",a:arguments},e},e.rangeBands=function(i,a,l){arguments.length<2&&(a=0),arguments.length<3&&(l=a);var c=i[1]<i[0],f=i[c-0],s=i[1-c],h=(s-f)/(n.length-a+2*l);return u=r(f+h*l,h),c&&u.reverse(),o=h*(1-a),t={t:"rangeBands",a:arguments},e},e.rangeRoundBands=function(i,a,l){arguments.length<2&&(a=0),arguments.length<3&&(l=a);var c=i[1]<i[0],f=i[c-0],s=i[1-c],h=Math.floor((s-f)/(n.length-a+2*l));return u=r(f+Math.round((s-f-(n.length-a)*h)/2),h),c&&u.reverse(),o=Math.round(h*(1-a)),t={t:"rangeRoundBands",a:arguments},e},e.rangeBand=function(){return o},e.rangeExtent=function(){return Yi(t.a[0])},e.copy=function(){return ou(n,t)},e.domain(n)}function au(n,t){function u(){var e=0,r=t.length;for(a=[];++e<r;)a[e-1]=ao.quantile(n,e/r);return o}function o(n){return isNaN(n=+n)?void 0:t[ao.bisect(a,n)]}var a;return o.domain=function(t){return arguments.length?(n=t.map(r).filter(i).sort(e),u()):n},o.range=function(n){return arguments.length?(t=n,u()):t},o.quantiles=function(){return a},o.invertExtent=function(e){return e=t.indexOf(e),0>e?[NaN,NaN]:[e>0?a[e-1]:n[0],e<a.length?a[e]:n[n.length-1]]},o.copy=function(){return au(n,t)},u()}function lu(n,t,e){function r(t){return e[Math.max(0,Math.min(o,Math.floor(u*(t-n))))]}function i(){return u=e.length/(t-n),o=e.length-1,r}var u,o;return r.domain=function(e){return arguments.length?(n=+e[0],t=+e[e.length-1],i()):[n,t]},r.range=function(n){return arguments.length?(e=n,i()):e},r.invertExtent=function(t){return t=e.indexOf(t),t=0>t?NaN:t/u+n,[t,t+1/u]},r.copy=function(){return lu(n,t,e)},i()}function cu(n,t){function e(e){return e>=e?t[ao.bisect(n,e)]:void 0}return e.domain=function(t){return arguments.length?(n=t,e):n},e.range=function(n){return arguments.length?(t=n,e):t},e.invertExtent=function(e){return e=t.indexOf(e),[n[e-1],n[e]]},e.copy=function(){return cu(n,t)},e}function fu(n){function t(n){return+n}return t.invert=t,t.domain=t.range=function(e){return arguments.length?(n=e.map(t),t):n},t.ticks=function(t){return Qi(n,t)},t.tickFormat=function(t,e){return nu(n,t,e)},t.copy=function(){return fu(n)},t}function su(){return 0}function hu(n){return n.innerRadius}function pu(n){return n.outerRadius}function gu(n){return n.startAngle}function vu(n){return n.endAngle}function du(n){return n&&n.padAngle}function yu(n,t,e,r){return(n-e)*t-(t-r)*n>0?0:1}function mu(n,t,e,r,i){var u=n[0]-t[0],o=n[1]-t[1],a=(i?r:-r)/Math.sqrt(u*u+o*o),l=a*o,c=-a*u,f=n[0]+l,s=n[1]+c,h=t[0]+l,p=t[1]+c,g=(f+h)/2,v=(s+p)/2,d=h-f,y=p-s,m=d*d+y*y,M=e-r,x=f*p-h*s,b=(0>y?-1:1)*Math.sqrt(Math.max(0,M*M*m-x*x)),_=(x*y-d*b)/m,w=(-x*d-y*b)/m,S=(x*y+d*b)/m,k=(-x*d+y*b)/m,N=_-g,E=w-v,A=S-g,C=k-v;return N*N+E*E>A*A+C*C&&(_=S,w=k),[[_-l,w-c],[_*e/M,w*e/M]]}function Mu(n){function t(t){function o(){c.push("M",u(n(f),a))}for(var l,c=[],f=[],s=-1,h=t.length,p=En(e),g=En(r);++s<h;)i.call(this,l=t[s],s)?f.push([+p.call(this,l,s),+g.call(this,l,s)]):f.length&&(o(),f=[]);return f.length&&o(),c.length?c.join(""):null}var e=Ce,r=ze,i=zt,u=xu,o=u.key,a=.7;return t.x=function(n){return arguments.length?(e=n,t):e},t.y=function(n){return arguments.length?(r=n,t):r},t.defined=function(n){return arguments.length?(i=n,t):i},t.interpolate=function(n){return arguments.length?(o="function"==typeof n?u=n:(u=Tl.get(n)||xu).key,t):o},t.tension=function(n){return arguments.length?(a=n,t):a},t}function xu(n){return n.length>1?n.join("L"):n+"Z"}function bu(n){return n.join("L")+"Z"}function _u(n){for(var t=0,e=n.length,r=n[0],i=[r[0],",",r[1]];++t<e;)i.push("H",(r[0]+(r=n[t])[0])/2,"V",r[1]);return e>1&&i.push("H",r[0]),i.join("")}function wu(n){for(var t=0,e=n.length,r=n[0],i=[r[0],",",r[1]];++t<e;)i.push("V",(r=n[t])[1],"H",r[0]);return i.join("")}function Su(n){for(var t=0,e=n.length,r=n[0],i=[r[0],",",r[1]];++t<e;)i.push("H",(r=n[t])[0],"V",r[1]);return i.join("")}function ku(n,t){return n.length<4?xu(n):n[1]+Au(n.slice(1,-1),Cu(n,t))}function Nu(n,t){return n.length<3?bu(n):n[0]+Au((n.push(n[0]),n),Cu([n[n.length-2]].concat(n,[n[1]]),t))}function Eu(n,t){return n.length<3?xu(n):n[0]+Au(n,Cu(n,t))}function Au(n,t){if(t.length<1||n.length!=t.length&&n.length!=t.length+2)return xu(n);var e=n.length!=t.length,r="",i=n[0],u=n[1],o=t[0],a=o,l=1;if(e&&(r+="Q"+(u[0]-2*o[0]/3)+","+(u[1]-2*o[1]/3)+","+u[0]+","+u[1],i=n[1],l=2),t.length>1){a=t[1],u=n[l],l++,r+="C"+(i[0]+o[0])+","+(i[1]+o[1])+","+(u[0]-a[0])+","+(u[1]-a[1])+","+u[0]+","+u[1];for(var c=2;c<t.length;c++,l++)u=n[l],a=t[c],r+="S"+(u[0]-a[0])+","+(u[1]-a[1])+","+u[0]+","+u[1]}if(e){var f=n[l];r+="Q"+(u[0]+2*a[0]/3)+","+(u[1]+2*a[1]/3)+","+f[0]+","+f[1]}return r}function Cu(n,t){for(var e,r=[],i=(1-t)/2,u=n[0],o=n[1],a=1,l=n.length;++a<l;)e=u,u=o,o=n[a],r.push([i*(o[0]-e[0]),i*(o[1]-e[1])]);return r}function zu(n){if(n.length<3)return xu(n);var t=1,e=n.length,r=n[0],i=r[0],u=r[1],o=[i,i,i,(r=n[1])[0]],a=[u,u,u,r[1]],l=[i,",",u,"L",Ru(Pl,o),",",Ru(Pl,a)];for(n.push(n[e-1]);++t<=e;)r=n[t],o.shift(),o.push(r[0]),a.shift(),a.push(r[1]),Du(l,o,a);return n.pop(),l.push("L",r),l.join("")}function Lu(n){if(n.length<4)return xu(n);for(var t,e=[],r=-1,i=n.length,u=[0],o=[0];++r<3;)t=n[r],u.push(t[0]),o.push(t[1]);for(e.push(Ru(Pl,u)+","+Ru(Pl,o)),--r;++r<i;)t=n[r],u.shift(),u.push(t[0]),o.shift(),o.push(t[1]),Du(e,u,o);return e.join("")}function qu(n){for(var t,e,r=-1,i=n.length,u=i+4,o=[],a=[];++r<4;)e=n[r%i],o.push(e[0]),a.push(e[1]);for(t=[Ru(Pl,o),",",Ru(Pl,a)],--r;++r<u;)e=n[r%i],o.shift(),o.push(e[0]),a.shift(),a.push(e[1]),Du(t,o,a);return t.join("")}function Tu(n,t){var e=n.length-1;if(e)for(var r,i,u=n[0][0],o=n[0][1],a=n[e][0]-u,l=n[e][1]-o,c=-1;++c<=e;)r=n[c],i=c/e,r[0]=t*r[0]+(1-t)*(u+i*a),r[1]=t*r[1]+(1-t)*(o+i*l);return zu(n)}function Ru(n,t){return n[0]*t[0]+n[1]*t[1]+n[2]*t[2]+n[3]*t[3]}function Du(n,t,e){n.push("C",Ru(Rl,t),",",Ru(Rl,e),",",Ru(Dl,t),",",Ru(Dl,e),",",Ru(Pl,t),",",Ru(Pl,e))}function Pu(n,t){return(t[1]-n[1])/(t[0]-n[0])}function Uu(n){for(var t=0,e=n.length-1,r=[],i=n[0],u=n[1],o=r[0]=Pu(i,u);++t<e;)r[t]=(o+(o=Pu(i=u,u=n[t+1])))/2;return r[t]=o,r}function ju(n){for(var t,e,r,i,u=[],o=Uu(n),a=-1,l=n.length-1;++a<l;)t=Pu(n[a],n[a+1]),xo(t)<Uo?o[a]=o[a+1]=0:(e=o[a]/t,r=o[a+1]/t,i=e*e+r*r,i>9&&(i=3*t/Math.sqrt(i),o[a]=i*e,o[a+1]=i*r));for(a=-1;++a<=l;)i=(n[Math.min(l,a+1)][0]-n[Math.max(0,a-1)][0])/(6*(1+o[a]*o[a])),u.push([i||0,o[a]*i||0]);return u}function Fu(n){return n.length<3?xu(n):n[0]+Au(n,ju(n))}function Hu(n){for(var t,e,r,i=-1,u=n.length;++i<u;)t=n[i],e=t[0],r=t[1]-Io,t[0]=e*Math.cos(r),t[1]=e*Math.sin(r);return n}function Ou(n){function t(t){function l(){v.push("M",a(n(y),s),f,c(n(d.reverse()),s),"Z")}for(var h,p,g,v=[],d=[],y=[],m=-1,M=t.length,x=En(e),b=En(i),_=e===r?function(){
+return p}:En(r),w=i===u?function(){return g}:En(u);++m<M;)o.call(this,h=t[m],m)?(d.push([p=+x.call(this,h,m),g=+b.call(this,h,m)]),y.push([+_.call(this,h,m),+w.call(this,h,m)])):d.length&&(l(),d=[],y=[]);return d.length&&l(),v.length?v.join(""):null}var e=Ce,r=Ce,i=0,u=ze,o=zt,a=xu,l=a.key,c=a,f="L",s=.7;return t.x=function(n){return arguments.length?(e=r=n,t):r},t.x0=function(n){return arguments.length?(e=n,t):e},t.x1=function(n){return arguments.length?(r=n,t):r},t.y=function(n){return arguments.length?(i=u=n,t):u},t.y0=function(n){return arguments.length?(i=n,t):i},t.y1=function(n){return arguments.length?(u=n,t):u},t.defined=function(n){return arguments.length?(o=n,t):o},t.interpolate=function(n){return arguments.length?(l="function"==typeof n?a=n:(a=Tl.get(n)||xu).key,c=a.reverse||a,f=a.closed?"M":"L",t):l},t.tension=function(n){return arguments.length?(s=n,t):s},t}function Iu(n){return n.radius}function Yu(n){return[n.x,n.y]}function Zu(n){return function(){var t=n.apply(this,arguments),e=t[0],r=t[1]-Io;return[e*Math.cos(r),e*Math.sin(r)]}}function Vu(){return 64}function Xu(){return"circle"}function $u(n){var t=Math.sqrt(n/Fo);return"M0,"+t+"A"+t+","+t+" 0 1,1 0,"+-t+"A"+t+","+t+" 0 1,1 0,"+t+"Z"}function Bu(n){return function(){var t,e,r;(t=this[n])&&(r=t[e=t.active])&&(r.timer.c=null,r.timer.t=NaN,--t.count?delete t[e]:delete this[n],t.active+=.5,r.event&&r.event.interrupt.call(this,this.__data__,r.index))}}function Wu(n,t,e){return ko(n,Yl),n.namespace=t,n.id=e,n}function Ju(n,t,e,r){var i=n.id,u=n.namespace;return Y(n,"function"==typeof e?function(n,o,a){n[u][i].tween.set(t,r(e.call(n,n.__data__,o,a)))}:(e=r(e),function(n){n[u][i].tween.set(t,e)}))}function Gu(n){return null==n&&(n=""),function(){this.textContent=n}}function Ku(n){return null==n?"__transition__":"__transition_"+n+"__"}function Qu(n,t,e,r,i){function u(n){var t=v.delay;return f.t=t+l,n>=t?o(n-t):void(f.c=o)}function o(e){var i=g.active,u=g[i];u&&(u.timer.c=null,u.timer.t=NaN,--g.count,delete g[i],u.event&&u.event.interrupt.call(n,n.__data__,u.index));for(var o in g)if(r>+o){var c=g[o];c.timer.c=null,c.timer.t=NaN,--g.count,delete g[o]}f.c=a,qn(function(){return f.c&&a(e||1)&&(f.c=null,f.t=NaN),1},0,l),g.active=r,v.event&&v.event.start.call(n,n.__data__,t),p=[],v.tween.forEach(function(e,r){(r=r.call(n,n.__data__,t))&&p.push(r)}),h=v.ease,s=v.duration}function a(i){for(var u=i/s,o=h(u),a=p.length;a>0;)p[--a].call(n,o);return u>=1?(v.event&&v.event.end.call(n,n.__data__,t),--g.count?delete g[r]:delete n[e],1):void 0}var l,f,s,h,p,g=n[e]||(n[e]={active:0,count:0}),v=g[r];v||(l=i.time,f=qn(u,0,l),v=g[r]={tween:new c,time:l,timer:f,delay:i.delay,duration:i.duration,ease:i.ease,index:t},i=null,++g.count)}function no(n,t,e){n.attr("transform",function(n){var r=t(n);return"translate("+(isFinite(r)?r:e(n))+",0)"})}function to(n,t,e){n.attr("transform",function(n){var r=t(n);return"translate(0,"+(isFinite(r)?r:e(n))+")"})}function eo(n){return n.toISOString()}function ro(n,t,e){function r(t){return n(t)}function i(n,e){var r=n[1]-n[0],i=r/e,u=ao.bisect(Kl,i);return u==Kl.length?[t.year,Ki(n.map(function(n){return n/31536e6}),e)[2]]:u?t[i/Kl[u-1]<Kl[u]/i?u-1:u]:[tc,Ki(n,e)[2]]}return r.invert=function(t){return io(n.invert(t))},r.domain=function(t){return arguments.length?(n.domain(t),r):n.domain().map(io)},r.nice=function(n,t){function e(e){return!isNaN(e)&&!n.range(e,io(+e+1),t).length}var u=r.domain(),o=Yi(u),a=null==n?i(o,10):"number"==typeof n&&i(o,n);return a&&(n=a[0],t=a[1]),r.domain(Xi(u,t>1?{floor:function(t){for(;e(t=n.floor(t));)t=io(t-1);return t},ceil:function(t){for(;e(t=n.ceil(t));)t=io(+t+1);return t}}:n))},r.ticks=function(n,t){var e=Yi(r.domain()),u=null==n?i(e,10):"number"==typeof n?i(e,n):!n.range&&[{range:n},t];return u&&(n=u[0],t=u[1]),n.range(e[0],io(+e[1]+1),1>t?1:t)},r.tickFormat=function(){return e},r.copy=function(){return ro(n.copy(),t,e)},Ji(r,n)}function io(n){return new Date(n)}function uo(n){return JSON.parse(n.responseText)}function oo(n){var t=fo.createRange();return t.selectNode(fo.body),t.createContextualFragment(n.responseText)}var ao={version:"3.5.17"},lo=[].slice,co=function(n){return lo.call(n)},fo=this.document;if(fo)try{co(fo.documentElement.childNodes)[0].nodeType}catch(so){co=function(n){for(var t=n.length,e=new Array(t);t--;)e[t]=n[t];return e}}if(Date.now||(Date.now=function(){return+new Date}),fo)try{fo.createElement("DIV").style.setProperty("opacity",0,"")}catch(ho){var po=this.Element.prototype,go=po.setAttribute,vo=po.setAttributeNS,yo=this.CSSStyleDeclaration.prototype,mo=yo.setProperty;po.setAttribute=function(n,t){go.call(this,n,t+"")},po.setAttributeNS=function(n,t,e){vo.call(this,n,t,e+"")},yo.setProperty=function(n,t,e){mo.call(this,n,t+"",e)}}ao.ascending=e,ao.descending=function(n,t){return n>t?-1:t>n?1:t>=n?0:NaN},ao.min=function(n,t){var e,r,i=-1,u=n.length;if(1===arguments.length){for(;++i<u;)if(null!=(r=n[i])&&r>=r){e=r;break}for(;++i<u;)null!=(r=n[i])&&e>r&&(e=r)}else{for(;++i<u;)if(null!=(r=t.call(n,n[i],i))&&r>=r){e=r;break}for(;++i<u;)null!=(r=t.call(n,n[i],i))&&e>r&&(e=r)}return e},ao.max=function(n,t){var e,r,i=-1,u=n.length;if(1===arguments.length){for(;++i<u;)if(null!=(r=n[i])&&r>=r){e=r;break}for(;++i<u;)null!=(r=n[i])&&r>e&&(e=r)}else{for(;++i<u;)if(null!=(r=t.call(n,n[i],i))&&r>=r){e=r;break}for(;++i<u;)null!=(r=t.call(n,n[i],i))&&r>e&&(e=r)}return e},ao.extent=function(n,t){var e,r,i,u=-1,o=n.length;if(1===arguments.length){for(;++u<o;)if(null!=(r=n[u])&&r>=r){e=i=r;break}for(;++u<o;)null!=(r=n[u])&&(e>r&&(e=r),r>i&&(i=r))}else{for(;++u<o;)if(null!=(r=t.call(n,n[u],u))&&r>=r){e=i=r;break}for(;++u<o;)null!=(r=t.call(n,n[u],u))&&(e>r&&(e=r),r>i&&(i=r))}return[e,i]},ao.sum=function(n,t){var e,r=0,u=n.length,o=-1;if(1===arguments.length)for(;++o<u;)i(e=+n[o])&&(r+=e);else for(;++o<u;)i(e=+t.call(n,n[o],o))&&(r+=e);return r},ao.mean=function(n,t){var e,u=0,o=n.length,a=-1,l=o;if(1===arguments.length)for(;++a<o;)i(e=r(n[a]))?u+=e:--l;else for(;++a<o;)i(e=r(t.call(n,n[a],a)))?u+=e:--l;return l?u/l:void 0},ao.quantile=function(n,t){var e=(n.length-1)*t+1,r=Math.floor(e),i=+n[r-1],u=e-r;return u?i+u*(n[r]-i):i},ao.median=function(n,t){var u,o=[],a=n.length,l=-1;if(1===arguments.length)for(;++l<a;)i(u=r(n[l]))&&o.push(u);else for(;++l<a;)i(u=r(t.call(n,n[l],l)))&&o.push(u);return o.length?ao.quantile(o.sort(e),.5):void 0},ao.variance=function(n,t){var e,u,o=n.length,a=0,l=0,c=-1,f=0;if(1===arguments.length)for(;++c<o;)i(e=r(n[c]))&&(u=e-a,a+=u/++f,l+=u*(e-a));else for(;++c<o;)i(e=r(t.call(n,n[c],c)))&&(u=e-a,a+=u/++f,l+=u*(e-a));return f>1?l/(f-1):void 0},ao.deviation=function(){var n=ao.variance.apply(this,arguments);return n?Math.sqrt(n):n};var Mo=u(e);ao.bisectLeft=Mo.left,ao.bisect=ao.bisectRight=Mo.right,ao.bisector=function(n){return u(1===n.length?function(t,r){return e(n(t),r)}:n)},ao.shuffle=function(n,t,e){(u=arguments.length)<3&&(e=n.length,2>u&&(t=0));for(var r,i,u=e-t;u;)i=Math.random()*u--|0,r=n[u+t],n[u+t]=n[i+t],n[i+t]=r;return n},ao.permute=function(n,t){for(var e=t.length,r=new Array(e);e--;)r[e]=n[t[e]];return r},ao.pairs=function(n){for(var t,e=0,r=n.length-1,i=n[0],u=new Array(0>r?0:r);r>e;)u[e]=[t=i,i=n[++e]];return u},ao.transpose=function(n){if(!(i=n.length))return[];for(var t=-1,e=ao.min(n,o),r=new Array(e);++t<e;)for(var i,u=-1,a=r[t]=new Array(i);++u<i;)a[u]=n[u][t];return r},ao.zip=function(){return ao.transpose(arguments)},ao.keys=function(n){var t=[];for(var e in n)t.push(e);return t},ao.values=function(n){var t=[];for(var e in n)t.push(n[e]);return t},ao.entries=function(n){var t=[];for(var e in n)t.push({key:e,value:n[e]});return t},ao.merge=function(n){for(var t,e,r,i=n.length,u=-1,o=0;++u<i;)o+=n[u].length;for(e=new Array(o);--i>=0;)for(r=n[i],t=r.length;--t>=0;)e[--o]=r[t];return e};var xo=Math.abs;ao.range=function(n,t,e){if(arguments.length<3&&(e=1,arguments.length<2&&(t=n,n=0)),(t-n)/e===1/0)throw new Error("infinite range");var r,i=[],u=a(xo(e)),o=-1;if(n*=u,t*=u,e*=u,0>e)for(;(r=n+e*++o)>t;)i.push(r/u);else for(;(r=n+e*++o)<t;)i.push(r/u);return i},ao.map=function(n,t){var e=new c;if(n instanceof c)n.forEach(function(n,t){e.set(n,t)});else if(Array.isArray(n)){var r,i=-1,u=n.length;if(1===arguments.length)for(;++i<u;)e.set(i,n[i]);else for(;++i<u;)e.set(t.call(n,r=n[i],i),r)}else for(var o in n)e.set(o,n[o]);return e};var bo="__proto__",_o="\x00";l(c,{has:h,get:function(n){return this._[f(n)]},set:function(n,t){return this._[f(n)]=t},remove:p,keys:g,values:function(){var n=[];for(var t in this._)n.push(this._[t]);return n},entries:function(){var n=[];for(var t in this._)n.push({key:s(t),value:this._[t]});return n},size:v,empty:d,forEach:function(n){for(var t in this._)n.call(this,s(t),this._[t])}}),ao.nest=function(){function n(t,o,a){if(a>=u.length)return r?r.call(i,o):e?o.sort(e):o;for(var l,f,s,h,p=-1,g=o.length,v=u[a++],d=new c;++p<g;)(h=d.get(l=v(f=o[p])))?h.push(f):d.set(l,[f]);return t?(f=t(),s=function(e,r){f.set(e,n(t,r,a))}):(f={},s=function(e,r){f[e]=n(t,r,a)}),d.forEach(s),f}function t(n,e){if(e>=u.length)return n;var r=[],i=o[e++];return n.forEach(function(n,i){r.push({key:n,values:t(i,e)})}),i?r.sort(function(n,t){return i(n.key,t.key)}):r}var e,r,i={},u=[],o=[];return i.map=function(t,e){return n(e,t,0)},i.entries=function(e){return t(n(ao.map,e,0),0)},i.key=function(n){return u.push(n),i},i.sortKeys=function(n){return o[u.length-1]=n,i},i.sortValues=function(n){return e=n,i},i.rollup=function(n){return r=n,i},i},ao.set=function(n){var t=new y;if(n)for(var e=0,r=n.length;r>e;++e)t.add(n[e]);return t},l(y,{has:h,add:function(n){return this._[f(n+="")]=!0,n},remove:p,values:g,size:v,empty:d,forEach:function(n){for(var t in this._)n.call(this,s(t))}}),ao.behavior={},ao.rebind=function(n,t){for(var e,r=1,i=arguments.length;++r<i;)n[e=arguments[r]]=M(n,t,t[e]);return n};var wo=["webkit","ms","moz","Moz","o","O"];ao.dispatch=function(){for(var n=new _,t=-1,e=arguments.length;++t<e;)n[arguments[t]]=w(n);return n},_.prototype.on=function(n,t){var e=n.indexOf("."),r="";if(e>=0&&(r=n.slice(e+1),n=n.slice(0,e)),n)return arguments.length<2?this[n].on(r):this[n].on(r,t);if(2===arguments.length){if(null==t)for(n in this)this.hasOwnProperty(n)&&this[n].on(r,null);return this}},ao.event=null,ao.requote=function(n){return n.replace(So,"\\$&")};var So=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,ko={}.__proto__?function(n,t){n.__proto__=t}:function(n,t){for(var e in t)n[e]=t[e]},No=function(n,t){return t.querySelector(n)},Eo=function(n,t){return t.querySelectorAll(n)},Ao=function(n,t){var e=n.matches||n[x(n,"matchesSelector")];return(Ao=function(n,t){return e.call(n,t)})(n,t)};"function"==typeof Sizzle&&(No=function(n,t){return Sizzle(n,t)[0]||null},Eo=Sizzle,Ao=Sizzle.matchesSelector),ao.selection=function(){return ao.select(fo.documentElement)};var Co=ao.selection.prototype=[];Co.select=function(n){var t,e,r,i,u=[];n=A(n);for(var o=-1,a=this.length;++o<a;){u.push(t=[]),t.parentNode=(r=this[o]).parentNode;for(var l=-1,c=r.length;++l<c;)(i=r[l])?(t.push(e=n.call(i,i.__data__,l,o)),e&&"__data__"in i&&(e.__data__=i.__data__)):t.push(null)}return E(u)},Co.selectAll=function(n){var t,e,r=[];n=C(n);for(var i=-1,u=this.length;++i<u;)for(var o=this[i],a=-1,l=o.length;++a<l;)(e=o[a])&&(r.push(t=co(n.call(e,e.__data__,a,i))),t.parentNode=e);return E(r)};var zo="http://www.w3.org/1999/xhtml",Lo={svg:"http://www.w3.org/2000/svg",xhtml:zo,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};ao.ns={prefix:Lo,qualify:function(n){var t=n.indexOf(":"),e=n;return t>=0&&"xmlns"!==(e=n.slice(0,t))&&(n=n.slice(t+1)),Lo.hasOwnProperty(e)?{space:Lo[e],local:n}:n}},Co.attr=function(n,t){if(arguments.length<2){if("string"==typeof n){var e=this.node();return n=ao.ns.qualify(n),n.local?e.getAttributeNS(n.space,n.local):e.getAttribute(n)}for(t in n)this.each(z(t,n[t]));return this}return this.each(z(n,t))},Co.classed=function(n,t){if(arguments.length<2){if("string"==typeof n){var e=this.node(),r=(n=T(n)).length,i=-1;if(t=e.classList){for(;++i<r;)if(!t.contains(n[i]))return!1}else for(t=e.getAttribute("class");++i<r;)if(!q(n[i]).test(t))return!1;return!0}for(t in n)this.each(R(t,n[t]));return this}return this.each(R(n,t))},Co.style=function(n,e,r){var i=arguments.length;if(3>i){if("string"!=typeof n){2>i&&(e="");for(r in n)this.each(P(r,n[r],e));return this}if(2>i){var u=this.node();return t(u).getComputedStyle(u,null).getPropertyValue(n)}r=""}return this.each(P(n,e,r))},Co.property=function(n,t){if(arguments.length<2){if("string"==typeof n)return this.node()[n];for(t in n)this.each(U(t,n[t]));return this}return this.each(U(n,t))},Co.text=function(n){return arguments.length?this.each("function"==typeof n?function(){var t=n.apply(this,arguments);this.textContent=null==t?"":t}:null==n?function(){this.textContent=""}:function(){this.textContent=n}):this.node().textContent},Co.html=function(n){return arguments.length?this.each("function"==typeof n?function(){var t=n.apply(this,arguments);this.innerHTML=null==t?"":t}:null==n?function(){this.innerHTML=""}:function(){this.innerHTML=n}):this.node().innerHTML},Co.append=function(n){return n=j(n),this.select(function(){return this.appendChild(n.apply(this,arguments))})},Co.insert=function(n,t){return n=j(n),t=A(t),this.select(function(){return this.insertBefore(n.apply(this,arguments),t.apply(this,arguments)||null)})},Co.remove=function(){return this.each(F)},Co.data=function(n,t){function e(n,e){var r,i,u,o=n.length,s=e.length,h=Math.min(o,s),p=new Array(s),g=new Array(s),v=new Array(o);if(t){var d,y=new c,m=new Array(o);for(r=-1;++r<o;)(i=n[r])&&(y.has(d=t.call(i,i.__data__,r))?v[r]=i:y.set(d,i),m[r]=d);for(r=-1;++r<s;)(i=y.get(d=t.call(e,u=e[r],r)))?i!==!0&&(p[r]=i,i.__data__=u):g[r]=H(u),y.set(d,!0);for(r=-1;++r<o;)r in m&&y.get(m[r])!==!0&&(v[r]=n[r])}else{for(r=-1;++r<h;)i=n[r],u=e[r],i?(i.__data__=u,p[r]=i):g[r]=H(u);for(;s>r;++r)g[r]=H(e[r]);for(;o>r;++r)v[r]=n[r]}g.update=p,g.parentNode=p.parentNode=v.parentNode=n.parentNode,a.push(g),l.push(p),f.push(v)}var r,i,u=-1,o=this.length;if(!arguments.length){for(n=new Array(o=(r=this[0]).length);++u<o;)(i=r[u])&&(n[u]=i.__data__);return n}var a=Z([]),l=E([]),f=E([]);if("function"==typeof n)for(;++u<o;)e(r=this[u],n.call(r,r.parentNode.__data__,u));else for(;++u<o;)e(r=this[u],n);return l.enter=function(){return a},l.exit=function(){return f},l},Co.datum=function(n){return arguments.length?this.property("__data__",n):this.property("__data__")},Co.filter=function(n){var t,e,r,i=[];"function"!=typeof n&&(n=O(n));for(var u=0,o=this.length;o>u;u++){i.push(t=[]),t.parentNode=(e=this[u]).parentNode;for(var a=0,l=e.length;l>a;a++)(r=e[a])&&n.call(r,r.__data__,a,u)&&t.push(r)}return E(i)},Co.order=function(){for(var n=-1,t=this.length;++n<t;)for(var e,r=this[n],i=r.length-1,u=r[i];--i>=0;)(e=r[i])&&(u&&u!==e.nextSibling&&u.parentNode.insertBefore(e,u),u=e);return this},Co.sort=function(n){n=I.apply(this,arguments);for(var t=-1,e=this.length;++t<e;)this[t].sort(n);return this.order()},Co.each=function(n){return Y(this,function(t,e,r){n.call(t,t.__data__,e,r)})},Co.call=function(n){var t=co(arguments);return n.apply(t[0]=this,t),this},Co.empty=function(){return!this.node()},Co.node=function(){for(var n=0,t=this.length;t>n;n++)for(var e=this[n],r=0,i=e.length;i>r;r++){var u=e[r];if(u)return u}return null},Co.size=function(){var n=0;return Y(this,function(){++n}),n};var qo=[];ao.selection.enter=Z,ao.selection.enter.prototype=qo,qo.append=Co.append,qo.empty=Co.empty,qo.node=Co.node,qo.call=Co.call,qo.size=Co.size,qo.select=function(n){for(var t,e,r,i,u,o=[],a=-1,l=this.length;++a<l;){r=(i=this[a]).update,o.push(t=[]),t.parentNode=i.parentNode;for(var c=-1,f=i.length;++c<f;)(u=i[c])?(t.push(r[c]=e=n.call(i.parentNode,u.__data__,c,a)),e.__data__=u.__data__):t.push(null)}return E(o)},qo.insert=function(n,t){return arguments.length<2&&(t=V(this)),Co.insert.call(this,n,t)},ao.select=function(t){var e;return"string"==typeof t?(e=[No(t,fo)],e.parentNode=fo.documentElement):(e=[t],e.parentNode=n(t)),E([e])},ao.selectAll=function(n){var t;return"string"==typeof n?(t=co(Eo(n,fo)),t.parentNode=fo.documentElement):(t=co(n),t.parentNode=null),E([t])},Co.on=function(n,t,e){var r=arguments.length;if(3>r){if("string"!=typeof n){2>r&&(t=!1);for(e in n)this.each(X(e,n[e],t));return this}if(2>r)return(r=this.node()["__on"+n])&&r._;e=!1}return this.each(X(n,t,e))};var To=ao.map({mouseenter:"mouseover",mouseleave:"mouseout"});fo&&To.forEach(function(n){"on"+n in fo&&To.remove(n)});var Ro,Do=0;ao.mouse=function(n){return J(n,k())};var Po=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;ao.touch=function(n,t,e){if(arguments.length<3&&(e=t,t=k().changedTouches),t)for(var r,i=0,u=t.length;u>i;++i)if((r=t[i]).identifier===e)return J(n,r)},ao.behavior.drag=function(){function n(){this.on("mousedown.drag",u).on("touchstart.drag",o)}function e(n,t,e,u,o){return function(){function a(){var n,e,r=t(h,v);r&&(n=r[0]-M[0],e=r[1]-M[1],g|=n|e,M=r,p({type:"drag",x:r[0]+c[0],y:r[1]+c[1],dx:n,dy:e}))}function l(){t(h,v)&&(y.on(u+d,null).on(o+d,null),m(g),p({type:"dragend"}))}var c,f=this,s=ao.event.target.correspondingElement||ao.event.target,h=f.parentNode,p=r.of(f,arguments),g=0,v=n(),d=".drag"+(null==v?"":"-"+v),y=ao.select(e(s)).on(u+d,a).on(o+d,l),m=W(s),M=t(h,v);i?(c=i.apply(f,arguments),c=[c.x-M[0],c.y-M[1]]):c=[0,0],p({type:"dragstart"})}}var r=N(n,"drag","dragstart","dragend"),i=null,u=e(b,ao.mouse,t,"mousemove","mouseup"),o=e(G,ao.touch,m,"touchmove","touchend");return n.origin=function(t){return arguments.length?(i=t,n):i},ao.rebind(n,r,"on")},ao.touches=function(n,t){return arguments.length<2&&(t=k().touches),t?co(t).map(function(t){var e=J(n,t);return e.identifier=t.identifier,e}):[]};var Uo=1e-6,jo=Uo*Uo,Fo=Math.PI,Ho=2*Fo,Oo=Ho-Uo,Io=Fo/2,Yo=Fo/180,Zo=180/Fo,Vo=Math.SQRT2,Xo=2,$o=4;ao.interpolateZoom=function(n,t){var e,r,i=n[0],u=n[1],o=n[2],a=t[0],l=t[1],c=t[2],f=a-i,s=l-u,h=f*f+s*s;if(jo>h)r=Math.log(c/o)/Vo,e=function(n){return[i+n*f,u+n*s,o*Math.exp(Vo*n*r)]};else{var p=Math.sqrt(h),g=(c*c-o*o+$o*h)/(2*o*Xo*p),v=(c*c-o*o-$o*h)/(2*c*Xo*p),d=Math.log(Math.sqrt(g*g+1)-g),y=Math.log(Math.sqrt(v*v+1)-v);r=(y-d)/Vo,e=function(n){var t=n*r,e=rn(d),a=o/(Xo*p)*(e*un(Vo*t+d)-en(d));return[i+a*f,u+a*s,o*e/rn(Vo*t+d)]}}return e.duration=1e3*r,e},ao.behavior.zoom=function(){function n(n){n.on(L,s).on(Wo+".zoom",p).on("dblclick.zoom",g).on(R,h)}function e(n){return[(n[0]-k.x)/k.k,(n[1]-k.y)/k.k]}function r(n){return[n[0]*k.k+k.x,n[1]*k.k+k.y]}function i(n){k.k=Math.max(A[0],Math.min(A[1],n))}function u(n,t){t=r(t),k.x+=n[0]-t[0],k.y+=n[1]-t[1]}function o(t,e,r,o){t.__chart__={x:k.x,y:k.y,k:k.k},i(Math.pow(2,o)),u(d=e,r),t=ao.select(t),C>0&&(t=t.transition().duration(C)),t.call(n.event)}function a(){b&&b.domain(x.range().map(function(n){return(n-k.x)/k.k}).map(x.invert)),w&&w.domain(_.range().map(function(n){return(n-k.y)/k.k}).map(_.invert))}function l(n){z++||n({type:"zoomstart"})}function c(n){a(),n({type:"zoom",scale:k.k,translate:[k.x,k.y]})}function f(n){--z||(n({type:"zoomend"}),d=null)}function s(){function n(){a=1,u(ao.mouse(i),h),c(o)}function r(){s.on(q,null).on(T,null),p(a),f(o)}var i=this,o=D.of(i,arguments),a=0,s=ao.select(t(i)).on(q,n).on(T,r),h=e(ao.mouse(i)),p=W(i);Il.call(i),l(o)}function h(){function n(){var n=ao.touches(g);return p=k.k,n.forEach(function(n){n.identifier in d&&(d[n.identifier]=e(n))}),n}function t(){var t=ao.event.target;ao.select(t).on(x,r).on(b,a),_.push(t);for(var e=ao.event.changedTouches,i=0,u=e.length;u>i;++i)d[e[i].identifier]=null;var l=n(),c=Date.now();if(1===l.length){if(500>c-M){var f=l[0];o(g,f,d[f.identifier],Math.floor(Math.log(k.k)/Math.LN2)+1),S()}M=c}else if(l.length>1){var f=l[0],s=l[1],h=f[0]-s[0],p=f[1]-s[1];y=h*h+p*p}}function r(){var n,t,e,r,o=ao.touches(g);Il.call(g);for(var a=0,l=o.length;l>a;++a,r=null)if(e=o[a],r=d[e.identifier]){if(t)break;n=e,t=r}if(r){var f=(f=e[0]-n[0])*f+(f=e[1]-n[1])*f,s=y&&Math.sqrt(f/y);n=[(n[0]+e[0])/2,(n[1]+e[1])/2],t=[(t[0]+r[0])/2,(t[1]+r[1])/2],i(s*p)}M=null,u(n,t),c(v)}function a(){if(ao.event.touches.length){for(var t=ao.event.changedTouches,e=0,r=t.length;r>e;++e)delete d[t[e].identifier];for(var i in d)return void n()}ao.selectAll(_).on(m,null),w.on(L,s).on(R,h),N(),f(v)}var p,g=this,v=D.of(g,arguments),d={},y=0,m=".zoom-"+ao.event.changedTouches[0].identifier,x="touchmove"+m,b="touchend"+m,_=[],w=ao.select(g),N=W(g);t(),l(v),w.on(L,null).on(R,t)}function p(){var n=D.of(this,arguments);m?clearTimeout(m):(Il.call(this),v=e(d=y||ao.mouse(this)),l(n)),m=setTimeout(function(){m=null,f(n)},50),S(),i(Math.pow(2,.002*Bo())*k.k),u(d,v),c(n)}function g(){var n=ao.mouse(this),t=Math.log(k.k)/Math.LN2;o(this,n,e(n),ao.event.shiftKey?Math.ceil(t)-1:Math.floor(t)+1)}var v,d,y,m,M,x,b,_,w,k={x:0,y:0,k:1},E=[960,500],A=Jo,C=250,z=0,L="mousedown.zoom",q="mousemove.zoom",T="mouseup.zoom",R="touchstart.zoom",D=N(n,"zoomstart","zoom","zoomend");return Wo||(Wo="onwheel"in fo?(Bo=function(){return-ao.event.deltaY*(ao.event.deltaMode?120:1)},"wheel"):"onmousewheel"in fo?(Bo=function(){return ao.event.wheelDelta},"mousewheel"):(Bo=function(){return-ao.event.detail},"MozMousePixelScroll")),n.event=function(n){n.each(function(){var n=D.of(this,arguments),t=k;Hl?ao.select(this).transition().each("start.zoom",function(){k=this.__chart__||{x:0,y:0,k:1},l(n)}).tween("zoom:zoom",function(){var e=E[0],r=E[1],i=d?d[0]:e/2,u=d?d[1]:r/2,o=ao.interpolateZoom([(i-k.x)/k.k,(u-k.y)/k.k,e/k.k],[(i-t.x)/t.k,(u-t.y)/t.k,e/t.k]);return function(t){var r=o(t),a=e/r[2];this.__chart__=k={x:i-r[0]*a,y:u-r[1]*a,k:a},c(n)}}).each("interrupt.zoom",function(){f(n)}).each("end.zoom",function(){f(n)}):(this.__chart__=k,l(n),c(n),f(n))})},n.translate=function(t){return arguments.length?(k={x:+t[0],y:+t[1],k:k.k},a(),n):[k.x,k.y]},n.scale=function(t){return arguments.length?(k={x:k.x,y:k.y,k:null},i(+t),a(),n):k.k},n.scaleExtent=function(t){return arguments.length?(A=null==t?Jo:[+t[0],+t[1]],n):A},n.center=function(t){return arguments.length?(y=t&&[+t[0],+t[1]],n):y},n.size=function(t){return arguments.length?(E=t&&[+t[0],+t[1]],n):E},n.duration=function(t){return arguments.length?(C=+t,n):C},n.x=function(t){return arguments.length?(b=t,x=t.copy(),k={x:0,y:0,k:1},n):b},n.y=function(t){return arguments.length?(w=t,_=t.copy(),k={x:0,y:0,k:1},n):w},ao.rebind(n,D,"on")};var Bo,Wo,Jo=[0,1/0];ao.color=an,an.prototype.toString=function(){return this.rgb()+""},ao.hsl=ln;var Go=ln.prototype=new an;Go.brighter=function(n){return n=Math.pow(.7,arguments.length?n:1),new ln(this.h,this.s,this.l/n)},Go.darker=function(n){return n=Math.pow(.7,arguments.length?n:1),new ln(this.h,this.s,n*this.l)},Go.rgb=function(){return cn(this.h,this.s,this.l)},ao.hcl=fn;var Ko=fn.prototype=new an;Ko.brighter=function(n){return new fn(this.h,this.c,Math.min(100,this.l+Qo*(arguments.length?n:1)))},Ko.darker=function(n){return new fn(this.h,this.c,Math.max(0,this.l-Qo*(arguments.length?n:1)))},Ko.rgb=function(){return sn(this.h,this.c,this.l).rgb()},ao.lab=hn;var Qo=18,na=.95047,ta=1,ea=1.08883,ra=hn.prototype=new an;ra.brighter=function(n){return new hn(Math.min(100,this.l+Qo*(arguments.length?n:1)),this.a,this.b)},ra.darker=function(n){return new hn(Math.max(0,this.l-Qo*(arguments.length?n:1)),this.a,this.b)},ra.rgb=function(){return pn(this.l,this.a,this.b)},ao.rgb=mn;var ia=mn.prototype=new an;ia.brighter=function(n){n=Math.pow(.7,arguments.length?n:1);var t=this.r,e=this.g,r=this.b,i=30;return t||e||r?(t&&i>t&&(t=i),e&&i>e&&(e=i),r&&i>r&&(r=i),new mn(Math.min(255,t/n),Math.min(255,e/n),Math.min(255,r/n))):new mn(i,i,i)},ia.darker=function(n){return n=Math.pow(.7,arguments.length?n:1),new mn(n*this.r,n*this.g,n*this.b)},ia.hsl=function(){return wn(this.r,this.g,this.b)},ia.toString=function(){return"#"+bn(this.r)+bn(this.g)+bn(this.b)};var ua=ao.map({aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074});ua.forEach(function(n,t){ua.set(n,Mn(t))}),ao.functor=En,ao.xhr=An(m),ao.dsv=function(n,t){function e(n,e,u){arguments.length<3&&(u=e,e=null);var o=Cn(n,t,null==e?r:i(e),u);return o.row=function(n){return arguments.length?o.response(null==(e=n)?r:i(n)):e},o}function r(n){return e.parse(n.responseText)}function i(n){return function(t){return e.parse(t.responseText,n)}}function u(t){return t.map(o).join(n)}function o(n){return a.test(n)?'"'+n.replace(/\"/g,'""')+'"':n}var a=new RegExp('["'+n+"\n]"),l=n.charCodeAt(0);return e.parse=function(n,t){var r;return e.parseRows(n,function(n,e){if(r)return r(n,e-1);var i=new Function("d","return {"+n.map(function(n,t){return JSON.stringify(n)+": d["+t+"]"}).join(",")+"}");r=t?function(n,e){return t(i(n),e)}:i})},e.parseRows=function(n,t){function e(){if(f>=c)return o;if(i)return i=!1,u;var t=f;if(34===n.charCodeAt(t)){for(var e=t;e++<c;)if(34===n.charCodeAt(e)){if(34!==n.charCodeAt(e+1))break;++e}f=e+2;var r=n.charCodeAt(e+1);return 13===r?(i=!0,10===n.charCodeAt(e+2)&&++f):10===r&&(i=!0),n.slice(t+1,e).replace(/""/g,'"')}for(;c>f;){var r=n.charCodeAt(f++),a=1;if(10===r)i=!0;else if(13===r)i=!0,10===n.charCodeAt(f)&&(++f,++a);else if(r!==l)continue;return n.slice(t,f-a)}return n.slice(t)}for(var r,i,u={},o={},a=[],c=n.length,f=0,s=0;(r=e())!==o;){for(var h=[];r!==u&&r!==o;)h.push(r),r=e();t&&null==(h=t(h,s++))||a.push(h)}return a},e.format=function(t){if(Array.isArray(t[0]))return e.formatRows(t);var r=new y,i=[];return t.forEach(function(n){for(var t in n)r.has(t)||i.push(r.add(t))}),[i.map(o).join(n)].concat(t.map(function(t){return i.map(function(n){return o(t[n])}).join(n)})).join("\n")},e.formatRows=function(n){return n.map(u).join("\n")},e},ao.csv=ao.dsv(",","text/csv"),ao.tsv=ao.dsv(" ","text/tab-separated-values");var oa,aa,la,ca,fa=this[x(this,"requestAnimationFrame")]||function(n){setTimeout(n,17)};ao.timer=function(){qn.apply(this,arguments)},ao.timer.flush=function(){Rn(),Dn()},ao.round=function(n,t){return t?Math.round(n*(t=Math.pow(10,t)))/t:Math.round(n)};var sa=["y","z","a","f","p","n","\xb5","m","","k","M","G","T","P","E","Z","Y"].map(Un);ao.formatPrefix=function(n,t){var e=0;return(n=+n)&&(0>n&&(n*=-1),t&&(n=ao.round(n,Pn(n,t))),e=1+Math.floor(1e-12+Math.log(n)/Math.LN10),e=Math.max(-24,Math.min(24,3*Math.floor((e-1)/3)))),sa[8+e/3]};var ha=/(?:([^{])?([<>=^]))?([+\- ])?([$#])?(0)?(\d+)?(,)?(\.-?\d+)?([a-z%])?/i,pa=ao.map({b:function(n){return n.toString(2)},c:function(n){return String.fromCharCode(n)},o:function(n){return n.toString(8)},x:function(n){return n.toString(16)},X:function(n){return n.toString(16).toUpperCase()},g:function(n,t){return n.toPrecision(t)},e:function(n,t){return n.toExponential(t)},f:function(n,t){return n.toFixed(t)},r:function(n,t){return(n=ao.round(n,Pn(n,t))).toFixed(Math.max(0,Math.min(20,Pn(n*(1+1e-15),t))))}}),ga=ao.time={},va=Date;Hn.prototype={getDate:function(){return this._.getUTCDate()},getDay:function(){return this._.getUTCDay()},getFullYear:function(){return this._.getUTCFullYear()},getHours:function(){return this._.getUTCHours()},getMilliseconds:function(){return this._.getUTCMilliseconds()},getMinutes:function(){return this._.getUTCMinutes()},getMonth:function(){return this._.getUTCMonth()},getSeconds:function(){return this._.getUTCSeconds()},getTime:function(){return this._.getTime()},getTimezoneOffset:function(){return 0},valueOf:function(){return this._.valueOf()},setDate:function(){da.setUTCDate.apply(this._,arguments)},setDay:function(){da.setUTCDay.apply(this._,arguments)},setFullYear:function(){da.setUTCFullYear.apply(this._,arguments)},setHours:function(){da.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){da.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){da.setUTCMinutes.apply(this._,arguments)},setMonth:function(){da.setUTCMonth.apply(this._,arguments)},setSeconds:function(){da.setUTCSeconds.apply(this._,arguments)},setTime:function(){da.setTime.apply(this._,arguments)}};var da=Date.prototype;ga.year=On(function(n){return n=ga.day(n),n.setMonth(0,1),n},function(n,t){n.setFullYear(n.getFullYear()+t)},function(n){return n.getFullYear()}),ga.years=ga.year.range,ga.years.utc=ga.year.utc.range,ga.day=On(function(n){var t=new va(2e3,0);return t.setFullYear(n.getFullYear(),n.getMonth(),n.getDate()),t},function(n,t){n.setDate(n.getDate()+t)},function(n){return n.getDate()-1}),ga.days=ga.day.range,ga.days.utc=ga.day.utc.range,ga.dayOfYear=function(n){var t=ga.year(n);return Math.floor((n-t-6e4*(n.getTimezoneOffset()-t.getTimezoneOffset()))/864e5)},["sunday","monday","tuesday","wednesday","thursday","friday","saturday"].forEach(function(n,t){t=7-t;var e=ga[n]=On(function(n){return(n=ga.day(n)).setDate(n.getDate()-(n.getDay()+t)%7),n},function(n,t){n.setDate(n.getDate()+7*Math.floor(t))},function(n){var e=ga.year(n).getDay();return Math.floor((ga.dayOfYear(n)+(e+t)%7)/7)-(e!==t)});ga[n+"s"]=e.range,ga[n+"s"].utc=e.utc.range,ga[n+"OfYear"]=function(n){var e=ga.year(n).getDay();return Math.floor((ga.dayOfYear(n)+(e+t)%7)/7)}}),ga.week=ga.sunday,ga.weeks=ga.sunday.range,ga.weeks.utc=ga.sunday.utc.range,ga.weekOfYear=ga.sundayOfYear;var ya={"-":"",_:" ",0:"0"},ma=/^\s*\d+/,Ma=/^%/;ao.locale=function(n){return{numberFormat:jn(n),timeFormat:Yn(n)}};var xa=ao.locale({decimal:".",thousands:",",grouping:[3],currency:["$",""],dateTime:"%a %b %e %X %Y",date:"%m/%d/%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],
+shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});ao.format=xa.numberFormat,ao.geo={},ft.prototype={s:0,t:0,add:function(n){st(n,this.t,ba),st(ba.s,this.s,this),this.s?this.t+=ba.t:this.s=ba.t},reset:function(){this.s=this.t=0},valueOf:function(){return this.s}};var ba=new ft;ao.geo.stream=function(n,t){n&&_a.hasOwnProperty(n.type)?_a[n.type](n,t):ht(n,t)};var _a={Feature:function(n,t){ht(n.geometry,t)},FeatureCollection:function(n,t){for(var e=n.features,r=-1,i=e.length;++r<i;)ht(e[r].geometry,t)}},wa={Sphere:function(n,t){t.sphere()},Point:function(n,t){n=n.coordinates,t.point(n[0],n[1],n[2])},MultiPoint:function(n,t){for(var e=n.coordinates,r=-1,i=e.length;++r<i;)n=e[r],t.point(n[0],n[1],n[2])},LineString:function(n,t){pt(n.coordinates,t,0)},MultiLineString:function(n,t){for(var e=n.coordinates,r=-1,i=e.length;++r<i;)pt(e[r],t,0)},Polygon:function(n,t){gt(n.coordinates,t)},MultiPolygon:function(n,t){for(var e=n.coordinates,r=-1,i=e.length;++r<i;)gt(e[r],t)},GeometryCollection:function(n,t){for(var e=n.geometries,r=-1,i=e.length;++r<i;)ht(e[r],t)}};ao.geo.area=function(n){return Sa=0,ao.geo.stream(n,Na),Sa};var Sa,ka=new ft,Na={sphere:function(){Sa+=4*Fo},point:b,lineStart:b,lineEnd:b,polygonStart:function(){ka.reset(),Na.lineStart=vt},polygonEnd:function(){var n=2*ka;Sa+=0>n?4*Fo+n:n,Na.lineStart=Na.lineEnd=Na.point=b}};ao.geo.bounds=function(){function n(n,t){M.push(x=[f=n,h=n]),s>t&&(s=t),t>p&&(p=t)}function t(t,e){var r=dt([t*Yo,e*Yo]);if(y){var i=mt(y,r),u=[i[1],-i[0],0],o=mt(u,i);bt(o),o=_t(o);var l=t-g,c=l>0?1:-1,v=o[0]*Zo*c,d=xo(l)>180;if(d^(v>c*g&&c*t>v)){var m=o[1]*Zo;m>p&&(p=m)}else if(v=(v+360)%360-180,d^(v>c*g&&c*t>v)){var m=-o[1]*Zo;s>m&&(s=m)}else s>e&&(s=e),e>p&&(p=e);d?g>t?a(f,t)>a(f,h)&&(h=t):a(t,h)>a(f,h)&&(f=t):h>=f?(f>t&&(f=t),t>h&&(h=t)):t>g?a(f,t)>a(f,h)&&(h=t):a(t,h)>a(f,h)&&(f=t)}else n(t,e);y=r,g=t}function e(){b.point=t}function r(){x[0]=f,x[1]=h,b.point=n,y=null}function i(n,e){if(y){var r=n-g;m+=xo(r)>180?r+(r>0?360:-360):r}else v=n,d=e;Na.point(n,e),t(n,e)}function u(){Na.lineStart()}function o(){i(v,d),Na.lineEnd(),xo(m)>Uo&&(f=-(h=180)),x[0]=f,x[1]=h,y=null}function a(n,t){return(t-=n)<0?t+360:t}function l(n,t){return n[0]-t[0]}function c(n,t){return t[0]<=t[1]?t[0]<=n&&n<=t[1]:n<t[0]||t[1]<n}var f,s,h,p,g,v,d,y,m,M,x,b={point:n,lineStart:e,lineEnd:r,polygonStart:function(){b.point=i,b.lineStart=u,b.lineEnd=o,m=0,Na.polygonStart()},polygonEnd:function(){Na.polygonEnd(),b.point=n,b.lineStart=e,b.lineEnd=r,0>ka?(f=-(h=180),s=-(p=90)):m>Uo?p=90:-Uo>m&&(s=-90),x[0]=f,x[1]=h}};return function(n){p=h=-(f=s=1/0),M=[],ao.geo.stream(n,b);var t=M.length;if(t){M.sort(l);for(var e,r=1,i=M[0],u=[i];t>r;++r)e=M[r],c(e[0],i)||c(e[1],i)?(a(i[0],e[1])>a(i[0],i[1])&&(i[1]=e[1]),a(e[0],i[1])>a(i[0],i[1])&&(i[0]=e[0])):u.push(i=e);for(var o,e,g=-(1/0),t=u.length-1,r=0,i=u[t];t>=r;i=e,++r)e=u[r],(o=a(i[1],e[0]))>g&&(g=o,f=e[0],h=i[1])}return M=x=null,f===1/0||s===1/0?[[NaN,NaN],[NaN,NaN]]:[[f,s],[h,p]]}}(),ao.geo.centroid=function(n){Ea=Aa=Ca=za=La=qa=Ta=Ra=Da=Pa=Ua=0,ao.geo.stream(n,ja);var t=Da,e=Pa,r=Ua,i=t*t+e*e+r*r;return jo>i&&(t=qa,e=Ta,r=Ra,Uo>Aa&&(t=Ca,e=za,r=La),i=t*t+e*e+r*r,jo>i)?[NaN,NaN]:[Math.atan2(e,t)*Zo,tn(r/Math.sqrt(i))*Zo]};var Ea,Aa,Ca,za,La,qa,Ta,Ra,Da,Pa,Ua,ja={sphere:b,point:St,lineStart:Nt,lineEnd:Et,polygonStart:function(){ja.lineStart=At},polygonEnd:function(){ja.lineStart=Nt}},Fa=Rt(zt,jt,Ht,[-Fo,-Fo/2]),Ha=1e9;ao.geo.clipExtent=function(){var n,t,e,r,i,u,o={stream:function(n){return i&&(i.valid=!1),i=u(n),i.valid=!0,i},extent:function(a){return arguments.length?(u=Zt(n=+a[0][0],t=+a[0][1],e=+a[1][0],r=+a[1][1]),i&&(i.valid=!1,i=null),o):[[n,t],[e,r]]}};return o.extent([[0,0],[960,500]])},(ao.geo.conicEqualArea=function(){return Vt(Xt)}).raw=Xt,ao.geo.albers=function(){return ao.geo.conicEqualArea().rotate([96,0]).center([-.6,38.7]).parallels([29.5,45.5]).scale(1070)},ao.geo.albersUsa=function(){function n(n){var u=n[0],o=n[1];return t=null,e(u,o),t||(r(u,o),t)||i(u,o),t}var t,e,r,i,u=ao.geo.albers(),o=ao.geo.conicEqualArea().rotate([154,0]).center([-2,58.5]).parallels([55,65]),a=ao.geo.conicEqualArea().rotate([157,0]).center([-3,19.9]).parallels([8,18]),l={point:function(n,e){t=[n,e]}};return n.invert=function(n){var t=u.scale(),e=u.translate(),r=(n[0]-e[0])/t,i=(n[1]-e[1])/t;return(i>=.12&&.234>i&&r>=-.425&&-.214>r?o:i>=.166&&.234>i&&r>=-.214&&-.115>r?a:u).invert(n)},n.stream=function(n){var t=u.stream(n),e=o.stream(n),r=a.stream(n);return{point:function(n,i){t.point(n,i),e.point(n,i),r.point(n,i)},sphere:function(){t.sphere(),e.sphere(),r.sphere()},lineStart:function(){t.lineStart(),e.lineStart(),r.lineStart()},lineEnd:function(){t.lineEnd(),e.lineEnd(),r.lineEnd()},polygonStart:function(){t.polygonStart(),e.polygonStart(),r.polygonStart()},polygonEnd:function(){t.polygonEnd(),e.polygonEnd(),r.polygonEnd()}}},n.precision=function(t){return arguments.length?(u.precision(t),o.precision(t),a.precision(t),n):u.precision()},n.scale=function(t){return arguments.length?(u.scale(t),o.scale(.35*t),a.scale(t),n.translate(u.translate())):u.scale()},n.translate=function(t){if(!arguments.length)return u.translate();var c=u.scale(),f=+t[0],s=+t[1];return e=u.translate(t).clipExtent([[f-.455*c,s-.238*c],[f+.455*c,s+.238*c]]).stream(l).point,r=o.translate([f-.307*c,s+.201*c]).clipExtent([[f-.425*c+Uo,s+.12*c+Uo],[f-.214*c-Uo,s+.234*c-Uo]]).stream(l).point,i=a.translate([f-.205*c,s+.212*c]).clipExtent([[f-.214*c+Uo,s+.166*c+Uo],[f-.115*c-Uo,s+.234*c-Uo]]).stream(l).point,n},n.scale(1070)};var Oa,Ia,Ya,Za,Va,Xa,$a={point:b,lineStart:b,lineEnd:b,polygonStart:function(){Ia=0,$a.lineStart=$t},polygonEnd:function(){$a.lineStart=$a.lineEnd=$a.point=b,Oa+=xo(Ia/2)}},Ba={point:Bt,lineStart:b,lineEnd:b,polygonStart:b,polygonEnd:b},Wa={point:Gt,lineStart:Kt,lineEnd:Qt,polygonStart:function(){Wa.lineStart=ne},polygonEnd:function(){Wa.point=Gt,Wa.lineStart=Kt,Wa.lineEnd=Qt}};ao.geo.path=function(){function n(n){return n&&("function"==typeof a&&u.pointRadius(+a.apply(this,arguments)),o&&o.valid||(o=i(u)),ao.geo.stream(n,o)),u.result()}function t(){return o=null,n}var e,r,i,u,o,a=4.5;return n.area=function(n){return Oa=0,ao.geo.stream(n,i($a)),Oa},n.centroid=function(n){return Ca=za=La=qa=Ta=Ra=Da=Pa=Ua=0,ao.geo.stream(n,i(Wa)),Ua?[Da/Ua,Pa/Ua]:Ra?[qa/Ra,Ta/Ra]:La?[Ca/La,za/La]:[NaN,NaN]},n.bounds=function(n){return Va=Xa=-(Ya=Za=1/0),ao.geo.stream(n,i(Ba)),[[Ya,Za],[Va,Xa]]},n.projection=function(n){return arguments.length?(i=(e=n)?n.stream||re(n):m,t()):e},n.context=function(n){return arguments.length?(u=null==(r=n)?new Wt:new te(n),"function"!=typeof a&&u.pointRadius(a),t()):r},n.pointRadius=function(t){return arguments.length?(a="function"==typeof t?t:(u.pointRadius(+t),+t),n):a},n.projection(ao.geo.albersUsa()).context(null)},ao.geo.transform=function(n){return{stream:function(t){var e=new ie(t);for(var r in n)e[r]=n[r];return e}}},ie.prototype={point:function(n,t){this.stream.point(n,t)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}},ao.geo.projection=oe,ao.geo.projectionMutator=ae,(ao.geo.equirectangular=function(){return oe(ce)}).raw=ce.invert=ce,ao.geo.rotation=function(n){function t(t){return t=n(t[0]*Yo,t[1]*Yo),t[0]*=Zo,t[1]*=Zo,t}return n=se(n[0]%360*Yo,n[1]*Yo,n.length>2?n[2]*Yo:0),t.invert=function(t){return t=n.invert(t[0]*Yo,t[1]*Yo),t[0]*=Zo,t[1]*=Zo,t},t},fe.invert=ce,ao.geo.circle=function(){function n(){var n="function"==typeof r?r.apply(this,arguments):r,t=se(-n[0]*Yo,-n[1]*Yo,0).invert,i=[];return e(null,null,1,{point:function(n,e){i.push(n=t(n,e)),n[0]*=Zo,n[1]*=Zo}}),{type:"Polygon",coordinates:[i]}}var t,e,r=[0,0],i=6;return n.origin=function(t){return arguments.length?(r=t,n):r},n.angle=function(r){return arguments.length?(e=ve((t=+r)*Yo,i*Yo),n):t},n.precision=function(r){return arguments.length?(e=ve(t*Yo,(i=+r)*Yo),n):i},n.angle(90)},ao.geo.distance=function(n,t){var e,r=(t[0]-n[0])*Yo,i=n[1]*Yo,u=t[1]*Yo,o=Math.sin(r),a=Math.cos(r),l=Math.sin(i),c=Math.cos(i),f=Math.sin(u),s=Math.cos(u);return Math.atan2(Math.sqrt((e=s*o)*e+(e=c*f-l*s*a)*e),l*f+c*s*a)},ao.geo.graticule=function(){function n(){return{type:"MultiLineString",coordinates:t()}}function t(){return ao.range(Math.ceil(u/d)*d,i,d).map(h).concat(ao.range(Math.ceil(c/y)*y,l,y).map(p)).concat(ao.range(Math.ceil(r/g)*g,e,g).filter(function(n){return xo(n%d)>Uo}).map(f)).concat(ao.range(Math.ceil(a/v)*v,o,v).filter(function(n){return xo(n%y)>Uo}).map(s))}var e,r,i,u,o,a,l,c,f,s,h,p,g=10,v=g,d=90,y=360,m=2.5;return n.lines=function(){return t().map(function(n){return{type:"LineString",coordinates:n}})},n.outline=function(){return{type:"Polygon",coordinates:[h(u).concat(p(l).slice(1),h(i).reverse().slice(1),p(c).reverse().slice(1))]}},n.extent=function(t){return arguments.length?n.majorExtent(t).minorExtent(t):n.minorExtent()},n.majorExtent=function(t){return arguments.length?(u=+t[0][0],i=+t[1][0],c=+t[0][1],l=+t[1][1],u>i&&(t=u,u=i,i=t),c>l&&(t=c,c=l,l=t),n.precision(m)):[[u,c],[i,l]]},n.minorExtent=function(t){return arguments.length?(r=+t[0][0],e=+t[1][0],a=+t[0][1],o=+t[1][1],r>e&&(t=r,r=e,e=t),a>o&&(t=a,a=o,o=t),n.precision(m)):[[r,a],[e,o]]},n.step=function(t){return arguments.length?n.majorStep(t).minorStep(t):n.minorStep()},n.majorStep=function(t){return arguments.length?(d=+t[0],y=+t[1],n):[d,y]},n.minorStep=function(t){return arguments.length?(g=+t[0],v=+t[1],n):[g,v]},n.precision=function(t){return arguments.length?(m=+t,f=ye(a,o,90),s=me(r,e,m),h=ye(c,l,90),p=me(u,i,m),n):m},n.majorExtent([[-180,-90+Uo],[180,90-Uo]]).minorExtent([[-180,-80-Uo],[180,80+Uo]])},ao.geo.greatArc=function(){function n(){return{type:"LineString",coordinates:[t||r.apply(this,arguments),e||i.apply(this,arguments)]}}var t,e,r=Me,i=xe;return n.distance=function(){return ao.geo.distance(t||r.apply(this,arguments),e||i.apply(this,arguments))},n.source=function(e){return arguments.length?(r=e,t="function"==typeof e?null:e,n):r},n.target=function(t){return arguments.length?(i=t,e="function"==typeof t?null:t,n):i},n.precision=function(){return arguments.length?n:0},n},ao.geo.interpolate=function(n,t){return be(n[0]*Yo,n[1]*Yo,t[0]*Yo,t[1]*Yo)},ao.geo.length=function(n){return Ja=0,ao.geo.stream(n,Ga),Ja};var Ja,Ga={sphere:b,point:b,lineStart:_e,lineEnd:b,polygonStart:b,polygonEnd:b},Ka=we(function(n){return Math.sqrt(2/(1+n))},function(n){return 2*Math.asin(n/2)});(ao.geo.azimuthalEqualArea=function(){return oe(Ka)}).raw=Ka;var Qa=we(function(n){var t=Math.acos(n);return t&&t/Math.sin(t)},m);(ao.geo.azimuthalEquidistant=function(){return oe(Qa)}).raw=Qa,(ao.geo.conicConformal=function(){return Vt(Se)}).raw=Se,(ao.geo.conicEquidistant=function(){return Vt(ke)}).raw=ke;var nl=we(function(n){return 1/n},Math.atan);(ao.geo.gnomonic=function(){return oe(nl)}).raw=nl,Ne.invert=function(n,t){return[n,2*Math.atan(Math.exp(t))-Io]},(ao.geo.mercator=function(){return Ee(Ne)}).raw=Ne;var tl=we(function(){return 1},Math.asin);(ao.geo.orthographic=function(){return oe(tl)}).raw=tl;var el=we(function(n){return 1/(1+n)},function(n){return 2*Math.atan(n)});(ao.geo.stereographic=function(){return oe(el)}).raw=el,Ae.invert=function(n,t){return[-t,2*Math.atan(Math.exp(n))-Io]},(ao.geo.transverseMercator=function(){var n=Ee(Ae),t=n.center,e=n.rotate;return n.center=function(n){return n?t([-n[1],n[0]]):(n=t(),[n[1],-n[0]])},n.rotate=function(n){return n?e([n[0],n[1],n.length>2?n[2]+90:90]):(n=e(),[n[0],n[1],n[2]-90])},e([0,0,90])}).raw=Ae,ao.geom={},ao.geom.hull=function(n){function t(n){if(n.length<3)return[];var t,i=En(e),u=En(r),o=n.length,a=[],l=[];for(t=0;o>t;t++)a.push([+i.call(this,n[t],t),+u.call(this,n[t],t),t]);for(a.sort(qe),t=0;o>t;t++)l.push([a[t][0],-a[t][1]]);var c=Le(a),f=Le(l),s=f[0]===c[0],h=f[f.length-1]===c[c.length-1],p=[];for(t=c.length-1;t>=0;--t)p.push(n[a[c[t]][2]]);for(t=+s;t<f.length-h;++t)p.push(n[a[f[t]][2]]);return p}var e=Ce,r=ze;return arguments.length?t(n):(t.x=function(n){return arguments.length?(e=n,t):e},t.y=function(n){return arguments.length?(r=n,t):r},t)},ao.geom.polygon=function(n){return ko(n,rl),n};var rl=ao.geom.polygon.prototype=[];rl.area=function(){for(var n,t=-1,e=this.length,r=this[e-1],i=0;++t<e;)n=r,r=this[t],i+=n[1]*r[0]-n[0]*r[1];return.5*i},rl.centroid=function(n){var t,e,r=-1,i=this.length,u=0,o=0,a=this[i-1];for(arguments.length||(n=-1/(6*this.area()));++r<i;)t=a,a=this[r],e=t[0]*a[1]-a[0]*t[1],u+=(t[0]+a[0])*e,o+=(t[1]+a[1])*e;return[u*n,o*n]},rl.clip=function(n){for(var t,e,r,i,u,o,a=De(n),l=-1,c=this.length-De(this),f=this[c-1];++l<c;){for(t=n.slice(),n.length=0,i=this[l],u=t[(r=t.length-a)-1],e=-1;++e<r;)o=t[e],Te(o,f,i)?(Te(u,f,i)||n.push(Re(u,o,f,i)),n.push(o)):Te(u,f,i)&&n.push(Re(u,o,f,i)),u=o;a&&n.push(n[0]),f=i}return n};var il,ul,ol,al,ll,cl=[],fl=[];Ye.prototype.prepare=function(){for(var n,t=this.edges,e=t.length;e--;)n=t[e].edge,n.b&&n.a||t.splice(e,1);return t.sort(Ve),t.length},tr.prototype={start:function(){return this.edge.l===this.site?this.edge.a:this.edge.b},end:function(){return this.edge.l===this.site?this.edge.b:this.edge.a}},er.prototype={insert:function(n,t){var e,r,i;if(n){if(t.P=n,t.N=n.N,n.N&&(n.N.P=t),n.N=t,n.R){for(n=n.R;n.L;)n=n.L;n.L=t}else n.R=t;e=n}else this._?(n=or(this._),t.P=null,t.N=n,n.P=n.L=t,e=n):(t.P=t.N=null,this._=t,e=null);for(t.L=t.R=null,t.U=e,t.C=!0,n=t;e&&e.C;)r=e.U,e===r.L?(i=r.R,i&&i.C?(e.C=i.C=!1,r.C=!0,n=r):(n===e.R&&(ir(this,e),n=e,e=n.U),e.C=!1,r.C=!0,ur(this,r))):(i=r.L,i&&i.C?(e.C=i.C=!1,r.C=!0,n=r):(n===e.L&&(ur(this,e),n=e,e=n.U),e.C=!1,r.C=!0,ir(this,r))),e=n.U;this._.C=!1},remove:function(n){n.N&&(n.N.P=n.P),n.P&&(n.P.N=n.N),n.N=n.P=null;var t,e,r,i=n.U,u=n.L,o=n.R;if(e=u?o?or(o):u:o,i?i.L===n?i.L=e:i.R=e:this._=e,u&&o?(r=e.C,e.C=n.C,e.L=u,u.U=e,e!==o?(i=e.U,e.U=n.U,n=e.R,i.L=n,e.R=o,o.U=e):(e.U=i,i=e,n=e.R)):(r=n.C,n=e),n&&(n.U=i),!r){if(n&&n.C)return void(n.C=!1);do{if(n===this._)break;if(n===i.L){if(t=i.R,t.C&&(t.C=!1,i.C=!0,ir(this,i),t=i.R),t.L&&t.L.C||t.R&&t.R.C){t.R&&t.R.C||(t.L.C=!1,t.C=!0,ur(this,t),t=i.R),t.C=i.C,i.C=t.R.C=!1,ir(this,i),n=this._;break}}else if(t=i.L,t.C&&(t.C=!1,i.C=!0,ur(this,i),t=i.L),t.L&&t.L.C||t.R&&t.R.C){t.L&&t.L.C||(t.R.C=!1,t.C=!0,ir(this,t),t=i.L),t.C=i.C,i.C=t.L.C=!1,ur(this,i),n=this._;break}t.C=!0,n=i,i=i.U}while(!n.C);n&&(n.C=!1)}}},ao.geom.voronoi=function(n){function t(n){var t=new Array(n.length),r=a[0][0],i=a[0][1],u=a[1][0],o=a[1][1];return ar(e(n),a).cells.forEach(function(e,a){var l=e.edges,c=e.site,f=t[a]=l.length?l.map(function(n){var t=n.start();return[t.x,t.y]}):c.x>=r&&c.x<=u&&c.y>=i&&c.y<=o?[[r,o],[u,o],[u,i],[r,i]]:[];f.point=n[a]}),t}function e(n){return n.map(function(n,t){return{x:Math.round(u(n,t)/Uo)*Uo,y:Math.round(o(n,t)/Uo)*Uo,i:t}})}var r=Ce,i=ze,u=r,o=i,a=sl;return n?t(n):(t.links=function(n){return ar(e(n)).edges.filter(function(n){return n.l&&n.r}).map(function(t){return{source:n[t.l.i],target:n[t.r.i]}})},t.triangles=function(n){var t=[];return ar(e(n)).cells.forEach(function(e,r){for(var i,u,o=e.site,a=e.edges.sort(Ve),l=-1,c=a.length,f=a[c-1].edge,s=f.l===o?f.r:f.l;++l<c;)i=f,u=s,f=a[l].edge,s=f.l===o?f.r:f.l,r<u.i&&r<s.i&&cr(o,u,s)<0&&t.push([n[r],n[u.i],n[s.i]])}),t},t.x=function(n){return arguments.length?(u=En(r=n),t):r},t.y=function(n){return arguments.length?(o=En(i=n),t):i},t.clipExtent=function(n){return arguments.length?(a=null==n?sl:n,t):a===sl?null:a},t.size=function(n){return arguments.length?t.clipExtent(n&&[[0,0],n]):a===sl?null:a&&a[1]},t)};var sl=[[-1e6,-1e6],[1e6,1e6]];ao.geom.delaunay=function(n){return ao.geom.voronoi().triangles(n)},ao.geom.quadtree=function(n,t,e,r,i){function u(n){function u(n,t,e,r,i,u,o,a){if(!isNaN(e)&&!isNaN(r))if(n.leaf){var l=n.x,f=n.y;if(null!=l)if(xo(l-e)+xo(f-r)<.01)c(n,t,e,r,i,u,o,a);else{var s=n.point;n.x=n.y=n.point=null,c(n,s,l,f,i,u,o,a),c(n,t,e,r,i,u,o,a)}else n.x=e,n.y=r,n.point=t}else c(n,t,e,r,i,u,o,a)}function c(n,t,e,r,i,o,a,l){var c=.5*(i+a),f=.5*(o+l),s=e>=c,h=r>=f,p=h<<1|s;n.leaf=!1,n=n.nodes[p]||(n.nodes[p]=hr()),s?i=c:a=c,h?o=f:l=f,u(n,t,e,r,i,o,a,l)}var f,s,h,p,g,v,d,y,m,M=En(a),x=En(l);if(null!=t)v=t,d=e,y=r,m=i;else if(y=m=-(v=d=1/0),s=[],h=[],g=n.length,o)for(p=0;g>p;++p)f=n[p],f.x<v&&(v=f.x),f.y<d&&(d=f.y),f.x>y&&(y=f.x),f.y>m&&(m=f.y),s.push(f.x),h.push(f.y);else for(p=0;g>p;++p){var b=+M(f=n[p],p),_=+x(f,p);v>b&&(v=b),d>_&&(d=_),b>y&&(y=b),_>m&&(m=_),s.push(b),h.push(_)}var w=y-v,S=m-d;w>S?m=d+w:y=v+S;var k=hr();if(k.add=function(n){u(k,n,+M(n,++p),+x(n,p),v,d,y,m)},k.visit=function(n){pr(n,k,v,d,y,m)},k.find=function(n){return gr(k,n[0],n[1],v,d,y,m)},p=-1,null==t){for(;++p<g;)u(k,n[p],s[p],h[p],v,d,y,m);--p}else n.forEach(k.add);return s=h=n=f=null,k}var o,a=Ce,l=ze;return(o=arguments.length)?(a=fr,l=sr,3===o&&(i=e,r=t,e=t=0),u(n)):(u.x=function(n){return arguments.length?(a=n,u):a},u.y=function(n){return arguments.length?(l=n,u):l},u.extent=function(n){return arguments.length?(null==n?t=e=r=i=null:(t=+n[0][0],e=+n[0][1],r=+n[1][0],i=+n[1][1]),u):null==t?null:[[t,e],[r,i]]},u.size=function(n){return arguments.length?(null==n?t=e=r=i=null:(t=e=0,r=+n[0],i=+n[1]),u):null==t?null:[r-t,i-e]},u)},ao.interpolateRgb=vr,ao.interpolateObject=dr,ao.interpolateNumber=yr,ao.interpolateString=mr;var hl=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,pl=new RegExp(hl.source,"g");ao.interpolate=Mr,ao.interpolators=[function(n,t){var e=typeof t;return("string"===e?ua.has(t.toLowerCase())||/^(#|rgb\(|hsl\()/i.test(t)?vr:mr:t instanceof an?vr:Array.isArray(t)?xr:"object"===e&&isNaN(t)?dr:yr)(n,t)}],ao.interpolateArray=xr;var gl=function(){return m},vl=ao.map({linear:gl,poly:Er,quad:function(){return Sr},cubic:function(){return kr},sin:function(){return Ar},exp:function(){return Cr},circle:function(){return zr},elastic:Lr,back:qr,bounce:function(){return Tr}}),dl=ao.map({"in":m,out:_r,"in-out":wr,"out-in":function(n){return wr(_r(n))}});ao.ease=function(n){var t=n.indexOf("-"),e=t>=0?n.slice(0,t):n,r=t>=0?n.slice(t+1):"in";return e=vl.get(e)||gl,r=dl.get(r)||m,br(r(e.apply(null,lo.call(arguments,1))))},ao.interpolateHcl=Rr,ao.interpolateHsl=Dr,ao.interpolateLab=Pr,ao.interpolateRound=Ur,ao.transform=function(n){var t=fo.createElementNS(ao.ns.prefix.svg,"g");return(ao.transform=function(n){if(null!=n){t.setAttribute("transform",n);var e=t.transform.baseVal.consolidate()}return new jr(e?e.matrix:yl)})(n)},jr.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var yl={a:1,b:0,c:0,d:1,e:0,f:0};ao.interpolateTransform=$r,ao.layout={},ao.layout.bundle=function(){return function(n){for(var t=[],e=-1,r=n.length;++e<r;)t.push(Jr(n[e]));return t}},ao.layout.chord=function(){function n(){var n,c,s,h,p,g={},v=[],d=ao.range(u),y=[];for(e=[],r=[],n=0,h=-1;++h<u;){for(c=0,p=-1;++p<u;)c+=i[h][p];v.push(c),y.push(ao.range(u)),n+=c}for(o&&d.sort(function(n,t){return o(v[n],v[t])}),a&&y.forEach(function(n,t){n.sort(function(n,e){return a(i[t][n],i[t][e])})}),n=(Ho-f*u)/n,c=0,h=-1;++h<u;){for(s=c,p=-1;++p<u;){var m=d[h],M=y[m][p],x=i[m][M],b=c,_=c+=x*n;g[m+"-"+M]={index:m,subindex:M,startAngle:b,endAngle:_,value:x}}r[m]={index:m,startAngle:s,endAngle:c,value:v[m]},c+=f}for(h=-1;++h<u;)for(p=h-1;++p<u;){var w=g[h+"-"+p],S=g[p+"-"+h];(w.value||S.value)&&e.push(w.value<S.value?{source:S,target:w}:{source:w,target:S})}l&&t()}function t(){e.sort(function(n,t){return l((n.source.value+n.target.value)/2,(t.source.value+t.target.value)/2)})}var e,r,i,u,o,a,l,c={},f=0;return c.matrix=function(n){return arguments.length?(u=(i=n)&&i.length,e=r=null,c):i},c.padding=function(n){return arguments.length?(f=n,e=r=null,c):f},c.sortGroups=function(n){return arguments.length?(o=n,e=r=null,c):o},c.sortSubgroups=function(n){return arguments.length?(a=n,e=null,c):a},c.sortChords=function(n){return arguments.length?(l=n,e&&t(),c):l},c.chords=function(){return e||n(),e},c.groups=function(){return r||n(),r},c},ao.layout.force=function(){function n(n){return function(t,e,r,i){if(t.point!==n){var u=t.cx-n.x,o=t.cy-n.y,a=i-e,l=u*u+o*o;if(l>a*a/y){if(v>l){var c=t.charge/l;n.px-=u*c,n.py-=o*c}return!0}if(t.point&&l&&v>l){var c=t.pointCharge/l;n.px-=u*c,n.py-=o*c}}return!t.charge}}function t(n){n.px=ao.event.x,n.py=ao.event.y,l.resume()}var e,r,i,u,o,a,l={},c=ao.dispatch("start","tick","end"),f=[1,1],s=.9,h=ml,p=Ml,g=-30,v=xl,d=.1,y=.64,M=[],x=[];return l.tick=function(){if((i*=.99)<.005)return e=null,c.end({type:"end",alpha:i=0}),!0;var t,r,l,h,p,v,y,m,b,_=M.length,w=x.length;for(r=0;w>r;++r)l=x[r],h=l.source,p=l.target,m=p.x-h.x,b=p.y-h.y,(v=m*m+b*b)&&(v=i*o[r]*((v=Math.sqrt(v))-u[r])/v,m*=v,b*=v,p.x-=m*(y=h.weight+p.weight?h.weight/(h.weight+p.weight):.5),p.y-=b*y,h.x+=m*(y=1-y),h.y+=b*y);if((y=i*d)&&(m=f[0]/2,b=f[1]/2,r=-1,y))for(;++r<_;)l=M[r],l.x+=(m-l.x)*y,l.y+=(b-l.y)*y;if(g)for(ri(t=ao.geom.quadtree(M),i,a),r=-1;++r<_;)(l=M[r]).fixed||t.visit(n(l));for(r=-1;++r<_;)l=M[r],l.fixed?(l.x=l.px,l.y=l.py):(l.x-=(l.px-(l.px=l.x))*s,l.y-=(l.py-(l.py=l.y))*s);c.tick({type:"tick",alpha:i})},l.nodes=function(n){return arguments.length?(M=n,l):M},l.links=function(n){return arguments.length?(x=n,l):x},l.size=function(n){return arguments.length?(f=n,l):f},l.linkDistance=function(n){return arguments.length?(h="function"==typeof n?n:+n,l):h},l.distance=l.linkDistance,l.linkStrength=function(n){return arguments.length?(p="function"==typeof n?n:+n,l):p},l.friction=function(n){return arguments.length?(s=+n,l):s},l.charge=function(n){return arguments.length?(g="function"==typeof n?n:+n,l):g},l.chargeDistance=function(n){return arguments.length?(v=n*n,l):Math.sqrt(v)},l.gravity=function(n){return arguments.length?(d=+n,l):d},l.theta=function(n){return arguments.length?(y=n*n,l):Math.sqrt(y)},l.alpha=function(n){return arguments.length?(n=+n,i?n>0?i=n:(e.c=null,e.t=NaN,e=null,c.end({type:"end",alpha:i=0})):n>0&&(c.start({type:"start",alpha:i=n}),e=qn(l.tick)),l):i},l.start=function(){function n(n,r){if(!e){for(e=new Array(i),l=0;i>l;++l)e[l]=[];for(l=0;c>l;++l){var u=x[l];e[u.source.index].push(u.target),e[u.target.index].push(u.source)}}for(var o,a=e[t],l=-1,f=a.length;++l<f;)if(!isNaN(o=a[l][n]))return o;return Math.random()*r}var t,e,r,i=M.length,c=x.length,s=f[0],v=f[1];for(t=0;i>t;++t)(r=M[t]).index=t,r.weight=0;for(t=0;c>t;++t)r=x[t],"number"==typeof r.source&&(r.source=M[r.source]),"number"==typeof r.target&&(r.target=M[r.target]),++r.source.weight,++r.target.weight;for(t=0;i>t;++t)r=M[t],isNaN(r.x)&&(r.x=n("x",s)),isNaN(r.y)&&(r.y=n("y",v)),isNaN(r.px)&&(r.px=r.x),isNaN(r.py)&&(r.py=r.y);if(u=[],"function"==typeof h)for(t=0;c>t;++t)u[t]=+h.call(this,x[t],t);else for(t=0;c>t;++t)u[t]=h;if(o=[],"function"==typeof p)for(t=0;c>t;++t)o[t]=+p.call(this,x[t],t);else for(t=0;c>t;++t)o[t]=p;if(a=[],"function"==typeof g)for(t=0;i>t;++t)a[t]=+g.call(this,M[t],t);else for(t=0;i>t;++t)a[t]=g;return l.resume()},l.resume=function(){return l.alpha(.1)},l.stop=function(){return l.alpha(0)},l.drag=function(){return r||(r=ao.behavior.drag().origin(m).on("dragstart.force",Qr).on("drag.force",t).on("dragend.force",ni)),arguments.length?void this.on("mouseover.force",ti).on("mouseout.force",ei).call(r):r},ao.rebind(l,c,"on")};var ml=20,Ml=1,xl=1/0;ao.layout.hierarchy=function(){function n(i){var u,o=[i],a=[];for(i.depth=0;null!=(u=o.pop());)if(a.push(u),(c=e.call(n,u,u.depth))&&(l=c.length)){for(var l,c,f;--l>=0;)o.push(f=c[l]),f.parent=u,f.depth=u.depth+1;r&&(u.value=0),u.children=c}else r&&(u.value=+r.call(n,u,u.depth)||0),delete u.children;return oi(i,function(n){var e,i;t&&(e=n.children)&&e.sort(t),r&&(i=n.parent)&&(i.value+=n.value)}),a}var t=ci,e=ai,r=li;return n.sort=function(e){return arguments.length?(t=e,n):t},n.children=function(t){return arguments.length?(e=t,n):e},n.value=function(t){return arguments.length?(r=t,n):r},n.revalue=function(t){return r&&(ui(t,function(n){n.children&&(n.value=0)}),oi(t,function(t){var e;t.children||(t.value=+r.call(n,t,t.depth)||0),(e=t.parent)&&(e.value+=t.value)})),t},n},ao.layout.partition=function(){function n(t,e,r,i){var u=t.children;if(t.x=e,t.y=t.depth*i,t.dx=r,t.dy=i,u&&(o=u.length)){var o,a,l,c=-1;for(r=t.value?r/t.value:0;++c<o;)n(a=u[c],e,l=a.value*r,i),e+=l}}function t(n){var e=n.children,r=0;if(e&&(i=e.length))for(var i,u=-1;++u<i;)r=Math.max(r,t(e[u]));return 1+r}function e(e,u){var o=r.call(this,e,u);return n(o[0],0,i[0],i[1]/t(o[0])),o}var r=ao.layout.hierarchy(),i=[1,1];return e.size=function(n){return arguments.length?(i=n,e):i},ii(e,r)},ao.layout.pie=function(){function n(o){var a,l=o.length,c=o.map(function(e,r){return+t.call(n,e,r)}),f=+("function"==typeof r?r.apply(this,arguments):r),s=("function"==typeof i?i.apply(this,arguments):i)-f,h=Math.min(Math.abs(s)/l,+("function"==typeof u?u.apply(this,arguments):u)),p=h*(0>s?-1:1),g=ao.sum(c),v=g?(s-l*p)/g:0,d=ao.range(l),y=[];return null!=e&&d.sort(e===bl?function(n,t){return c[t]-c[n]}:function(n,t){return e(o[n],o[t])}),d.forEach(function(n){y[n]={data:o[n],value:a=c[n],startAngle:f,endAngle:f+=a*v+p,padAngle:h}}),y}var t=Number,e=bl,r=0,i=Ho,u=0;return n.value=function(e){return arguments.length?(t=e,n):t},n.sort=function(t){return arguments.length?(e=t,n):e},n.startAngle=function(t){return arguments.length?(r=t,n):r},n.endAngle=function(t){return arguments.length?(i=t,n):i},n.padAngle=function(t){return arguments.length?(u=t,n):u},n};var bl={};ao.layout.stack=function(){function n(a,l){if(!(h=a.length))return a;var c=a.map(function(e,r){return t.call(n,e,r)}),f=c.map(function(t){return t.map(function(t,e){return[u.call(n,t,e),o.call(n,t,e)]})}),s=e.call(n,f,l);c=ao.permute(c,s),f=ao.permute(f,s);var h,p,g,v,d=r.call(n,f,l),y=c[0].length;for(g=0;y>g;++g)for(i.call(n,c[0][g],v=d[g],f[0][g][1]),p=1;h>p;++p)i.call(n,c[p][g],v+=f[p-1][g][1],f[p][g][1]);return a}var t=m,e=gi,r=vi,i=pi,u=si,o=hi;return n.values=function(e){return arguments.length?(t=e,n):t},n.order=function(t){return arguments.length?(e="function"==typeof t?t:_l.get(t)||gi,n):e},n.offset=function(t){return arguments.length?(r="function"==typeof t?t:wl.get(t)||vi,n):r},n.x=function(t){return arguments.length?(u=t,n):u},n.y=function(t){return arguments.length?(o=t,n):o},n.out=function(t){return arguments.length?(i=t,n):i},n};var _l=ao.map({"inside-out":function(n){var t,e,r=n.length,i=n.map(di),u=n.map(yi),o=ao.range(r).sort(function(n,t){return i[n]-i[t]}),a=0,l=0,c=[],f=[];for(t=0;r>t;++t)e=o[t],l>a?(a+=u[e],c.push(e)):(l+=u[e],f.push(e));return f.reverse().concat(c)},reverse:function(n){return ao.range(n.length).reverse()},"default":gi}),wl=ao.map({silhouette:function(n){var t,e,r,i=n.length,u=n[0].length,o=[],a=0,l=[];for(e=0;u>e;++e){for(t=0,r=0;i>t;t++)r+=n[t][e][1];r>a&&(a=r),o.push(r)}for(e=0;u>e;++e)l[e]=(a-o[e])/2;return l},wiggle:function(n){var t,e,r,i,u,o,a,l,c,f=n.length,s=n[0],h=s.length,p=[];for(p[0]=l=c=0,e=1;h>e;++e){for(t=0,i=0;f>t;++t)i+=n[t][e][1];for(t=0,u=0,a=s[e][0]-s[e-1][0];f>t;++t){for(r=0,o=(n[t][e][1]-n[t][e-1][1])/(2*a);t>r;++r)o+=(n[r][e][1]-n[r][e-1][1])/a;u+=o*n[t][e][1]}p[e]=l-=i?u/i*a:0,c>l&&(c=l)}for(e=0;h>e;++e)p[e]-=c;return p},expand:function(n){var t,e,r,i=n.length,u=n[0].length,o=1/i,a=[];for(e=0;u>e;++e){for(t=0,r=0;i>t;t++)r+=n[t][e][1];if(r)for(t=0;i>t;t++)n[t][e][1]/=r;else for(t=0;i>t;t++)n[t][e][1]=o}for(e=0;u>e;++e)a[e]=0;return a},zero:vi});ao.layout.histogram=function(){function n(n,u){for(var o,a,l=[],c=n.map(e,this),f=r.call(this,c,u),s=i.call(this,f,c,u),u=-1,h=c.length,p=s.length-1,g=t?1:1/h;++u<p;)o=l[u]=[],o.dx=s[u+1]-(o.x=s[u]),o.y=0;if(p>0)for(u=-1;++u<h;)a=c[u],a>=f[0]&&a<=f[1]&&(o=l[ao.bisect(s,a,1,p)-1],o.y+=g,o.push(n[u]));return l}var t=!0,e=Number,r=bi,i=Mi;return n.value=function(t){return arguments.length?(e=t,n):e},n.range=function(t){return arguments.length?(r=En(t),n):r},n.bins=function(t){return arguments.length?(i="number"==typeof t?function(n){return xi(n,t)}:En(t),n):i},n.frequency=function(e){return arguments.length?(t=!!e,n):t},n},ao.layout.pack=function(){function n(n,u){var o=e.call(this,n,u),a=o[0],l=i[0],c=i[1],f=null==t?Math.sqrt:"function"==typeof t?t:function(){return t};if(a.x=a.y=0,oi(a,function(n){n.r=+f(n.value)}),oi(a,Ni),r){var s=r*(t?1:Math.max(2*a.r/l,2*a.r/c))/2;oi(a,function(n){n.r+=s}),oi(a,Ni),oi(a,function(n){n.r-=s})}return Ci(a,l/2,c/2,t?1:1/Math.max(2*a.r/l,2*a.r/c)),o}var t,e=ao.layout.hierarchy().sort(_i),r=0,i=[1,1];return n.size=function(t){return arguments.length?(i=t,n):i},n.radius=function(e){return arguments.length?(t=null==e||"function"==typeof e?e:+e,n):t},n.padding=function(t){return arguments.length?(r=+t,n):r},ii(n,e)},ao.layout.tree=function(){function n(n,i){var f=o.call(this,n,i),s=f[0],h=t(s);if(oi(h,e),h.parent.m=-h.z,ui(h,r),c)ui(s,u);else{var p=s,g=s,v=s;ui(s,function(n){n.x<p.x&&(p=n),n.x>g.x&&(g=n),n.depth>v.depth&&(v=n)});var d=a(p,g)/2-p.x,y=l[0]/(g.x+a(g,p)/2+d),m=l[1]/(v.depth||1);ui(s,function(n){n.x=(n.x+d)*y,n.y=n.depth*m})}return f}function t(n){for(var t,e={A:null,children:[n]},r=[e];null!=(t=r.pop());)for(var i,u=t.children,o=0,a=u.length;a>o;++o)r.push((u[o]=i={_:u[o],parent:t,children:(i=u[o].children)&&i.slice()||[],A:null,a:null,z:0,m:0,c:0,s:0,t:null,i:o}).a=i);return e.children[0]}function e(n){var t=n.children,e=n.parent.children,r=n.i?e[n.i-1]:null;if(t.length){Di(n);var u=(t[0].z+t[t.length-1].z)/2;r?(n.z=r.z+a(n._,r._),n.m=n.z-u):n.z=u}else r&&(n.z=r.z+a(n._,r._));n.parent.A=i(n,r,n.parent.A||e[0])}function r(n){n._.x=n.z+n.parent.m,n.m+=n.parent.m}function i(n,t,e){if(t){for(var r,i=n,u=n,o=t,l=i.parent.children[0],c=i.m,f=u.m,s=o.m,h=l.m;o=Ti(o),i=qi(i),o&&i;)l=qi(l),u=Ti(u),u.a=n,r=o.z+s-i.z-c+a(o._,i._),r>0&&(Ri(Pi(o,n,e),n,r),c+=r,f+=r),s+=o.m,c+=i.m,h+=l.m,f+=u.m;o&&!Ti(u)&&(u.t=o,u.m+=s-f),i&&!qi(l)&&(l.t=i,l.m+=c-h,e=n)}return e}function u(n){n.x*=l[0],n.y=n.depth*l[1]}var o=ao.layout.hierarchy().sort(null).value(null),a=Li,l=[1,1],c=null;return n.separation=function(t){return arguments.length?(a=t,n):a},n.size=function(t){return arguments.length?(c=null==(l=t)?u:null,n):c?null:l},n.nodeSize=function(t){return arguments.length?(c=null==(l=t)?null:u,n):c?l:null},ii(n,o)},ao.layout.cluster=function(){function n(n,u){var o,a=t.call(this,n,u),l=a[0],c=0;oi(l,function(n){var t=n.children;t&&t.length?(n.x=ji(t),n.y=Ui(t)):(n.x=o?c+=e(n,o):0,n.y=0,o=n)});var f=Fi(l),s=Hi(l),h=f.x-e(f,s)/2,p=s.x+e(s,f)/2;return oi(l,i?function(n){n.x=(n.x-l.x)*r[0],n.y=(l.y-n.y)*r[1]}:function(n){n.x=(n.x-h)/(p-h)*r[0],n.y=(1-(l.y?n.y/l.y:1))*r[1]}),a}var t=ao.layout.hierarchy().sort(null).value(null),e=Li,r=[1,1],i=!1;return n.separation=function(t){return arguments.length?(e=t,n):e},n.size=function(t){return arguments.length?(i=null==(r=t),n):i?null:r},n.nodeSize=function(t){return arguments.length?(i=null!=(r=t),n):i?r:null},ii(n,t)},ao.layout.treemap=function(){function n(n,t){for(var e,r,i=-1,u=n.length;++i<u;)r=(e=n[i]).value*(0>t?0:t),e.area=isNaN(r)||0>=r?0:r}function t(e){var u=e.children;if(u&&u.length){var o,a,l,c=s(e),f=[],h=u.slice(),g=1/0,v="slice"===p?c.dx:"dice"===p?c.dy:"slice-dice"===p?1&e.depth?c.dy:c.dx:Math.min(c.dx,c.dy);for(n(h,c.dx*c.dy/e.value),f.area=0;(l=h.length)>0;)f.push(o=h[l-1]),f.area+=o.area,"squarify"!==p||(a=r(f,v))<=g?(h.pop(),g=a):(f.area-=f.pop().area,i(f,v,c,!1),v=Math.min(c.dx,c.dy),f.length=f.area=0,g=1/0);f.length&&(i(f,v,c,!0),f.length=f.area=0),u.forEach(t)}}function e(t){var r=t.children;if(r&&r.length){var u,o=s(t),a=r.slice(),l=[];for(n(a,o.dx*o.dy/t.value),l.area=0;u=a.pop();)l.push(u),l.area+=u.area,null!=u.z&&(i(l,u.z?o.dx:o.dy,o,!a.length),l.length=l.area=0);r.forEach(e)}}function r(n,t){for(var e,r=n.area,i=0,u=1/0,o=-1,a=n.length;++o<a;)(e=n[o].area)&&(u>e&&(u=e),e>i&&(i=e));return r*=r,t*=t,r?Math.max(t*i*g/r,r/(t*u*g)):1/0}function i(n,t,e,r){var i,u=-1,o=n.length,a=e.x,c=e.y,f=t?l(n.area/t):0;
+if(t==e.dx){for((r||f>e.dy)&&(f=e.dy);++u<o;)i=n[u],i.x=a,i.y=c,i.dy=f,a+=i.dx=Math.min(e.x+e.dx-a,f?l(i.area/f):0);i.z=!0,i.dx+=e.x+e.dx-a,e.y+=f,e.dy-=f}else{for((r||f>e.dx)&&(f=e.dx);++u<o;)i=n[u],i.x=a,i.y=c,i.dx=f,c+=i.dy=Math.min(e.y+e.dy-c,f?l(i.area/f):0);i.z=!1,i.dy+=e.y+e.dy-c,e.x+=f,e.dx-=f}}function u(r){var i=o||a(r),u=i[0];return u.x=u.y=0,u.value?(u.dx=c[0],u.dy=c[1]):u.dx=u.dy=0,o&&a.revalue(u),n([u],u.dx*u.dy/u.value),(o?e:t)(u),h&&(o=i),i}var o,a=ao.layout.hierarchy(),l=Math.round,c=[1,1],f=null,s=Oi,h=!1,p="squarify",g=.5*(1+Math.sqrt(5));return u.size=function(n){return arguments.length?(c=n,u):c},u.padding=function(n){function t(t){var e=n.call(u,t,t.depth);return null==e?Oi(t):Ii(t,"number"==typeof e?[e,e,e,e]:e)}function e(t){return Ii(t,n)}if(!arguments.length)return f;var r;return s=null==(f=n)?Oi:"function"==(r=typeof n)?t:"number"===r?(n=[n,n,n,n],e):e,u},u.round=function(n){return arguments.length?(l=n?Math.round:Number,u):l!=Number},u.sticky=function(n){return arguments.length?(h=n,o=null,u):h},u.ratio=function(n){return arguments.length?(g=n,u):g},u.mode=function(n){return arguments.length?(p=n+"",u):p},ii(u,a)},ao.random={normal:function(n,t){var e=arguments.length;return 2>e&&(t=1),1>e&&(n=0),function(){var e,r,i;do e=2*Math.random()-1,r=2*Math.random()-1,i=e*e+r*r;while(!i||i>1);return n+t*e*Math.sqrt(-2*Math.log(i)/i)}},logNormal:function(){var n=ao.random.normal.apply(ao,arguments);return function(){return Math.exp(n())}},bates:function(n){var t=ao.random.irwinHall(n);return function(){return t()/n}},irwinHall:function(n){return function(){for(var t=0,e=0;n>e;e++)t+=Math.random();return t}}},ao.scale={};var Sl={floor:m,ceil:m};ao.scale.linear=function(){return Wi([0,1],[0,1],Mr,!1)};var kl={s:1,g:1,p:1,r:1,e:1};ao.scale.log=function(){return ru(ao.scale.linear().domain([0,1]),10,!0,[1,10])};var Nl=ao.format(".0e"),El={floor:function(n){return-Math.ceil(-n)},ceil:function(n){return-Math.floor(-n)}};ao.scale.pow=function(){return iu(ao.scale.linear(),1,[0,1])},ao.scale.sqrt=function(){return ao.scale.pow().exponent(.5)},ao.scale.ordinal=function(){return ou([],{t:"range",a:[[]]})},ao.scale.category10=function(){return ao.scale.ordinal().range(Al)},ao.scale.category20=function(){return ao.scale.ordinal().range(Cl)},ao.scale.category20b=function(){return ao.scale.ordinal().range(zl)},ao.scale.category20c=function(){return ao.scale.ordinal().range(Ll)};var Al=[2062260,16744206,2924588,14034728,9725885,9197131,14907330,8355711,12369186,1556175].map(xn),Cl=[2062260,11454440,16744206,16759672,2924588,10018698,14034728,16750742,9725885,12955861,9197131,12885140,14907330,16234194,8355711,13092807,12369186,14408589,1556175,10410725].map(xn),zl=[3750777,5395619,7040719,10264286,6519097,9216594,11915115,13556636,9202993,12426809,15186514,15190932,8666169,11356490,14049643,15177372,8077683,10834324,13528509,14589654].map(xn),Ll=[3244733,7057110,10406625,13032431,15095053,16616764,16625259,16634018,3253076,7652470,10607003,13101504,7695281,10394312,12369372,14342891,6513507,9868950,12434877,14277081].map(xn);ao.scale.quantile=function(){return au([],[])},ao.scale.quantize=function(){return lu(0,1,[0,1])},ao.scale.threshold=function(){return cu([.5],[0,1])},ao.scale.identity=function(){return fu([0,1])},ao.svg={},ao.svg.arc=function(){function n(){var n=Math.max(0,+e.apply(this,arguments)),c=Math.max(0,+r.apply(this,arguments)),f=o.apply(this,arguments)-Io,s=a.apply(this,arguments)-Io,h=Math.abs(s-f),p=f>s?0:1;if(n>c&&(g=c,c=n,n=g),h>=Oo)return t(c,p)+(n?t(n,1-p):"")+"Z";var g,v,d,y,m,M,x,b,_,w,S,k,N=0,E=0,A=[];if((y=(+l.apply(this,arguments)||0)/2)&&(d=u===ql?Math.sqrt(n*n+c*c):+u.apply(this,arguments),p||(E*=-1),c&&(E=tn(d/c*Math.sin(y))),n&&(N=tn(d/n*Math.sin(y)))),c){m=c*Math.cos(f+E),M=c*Math.sin(f+E),x=c*Math.cos(s-E),b=c*Math.sin(s-E);var C=Math.abs(s-f-2*E)<=Fo?0:1;if(E&&yu(m,M,x,b)===p^C){var z=(f+s)/2;m=c*Math.cos(z),M=c*Math.sin(z),x=b=null}}else m=M=0;if(n){_=n*Math.cos(s-N),w=n*Math.sin(s-N),S=n*Math.cos(f+N),k=n*Math.sin(f+N);var L=Math.abs(f-s+2*N)<=Fo?0:1;if(N&&yu(_,w,S,k)===1-p^L){var q=(f+s)/2;_=n*Math.cos(q),w=n*Math.sin(q),S=k=null}}else _=w=0;if(h>Uo&&(g=Math.min(Math.abs(c-n)/2,+i.apply(this,arguments)))>.001){v=c>n^p?0:1;var T=g,R=g;if(Fo>h){var D=null==S?[_,w]:null==x?[m,M]:Re([m,M],[S,k],[x,b],[_,w]),P=m-D[0],U=M-D[1],j=x-D[0],F=b-D[1],H=1/Math.sin(Math.acos((P*j+U*F)/(Math.sqrt(P*P+U*U)*Math.sqrt(j*j+F*F)))/2),O=Math.sqrt(D[0]*D[0]+D[1]*D[1]);R=Math.min(g,(n-O)/(H-1)),T=Math.min(g,(c-O)/(H+1))}if(null!=x){var I=mu(null==S?[_,w]:[S,k],[m,M],c,T,p),Y=mu([x,b],[_,w],c,T,p);g===T?A.push("M",I[0],"A",T,",",T," 0 0,",v," ",I[1],"A",c,",",c," 0 ",1-p^yu(I[1][0],I[1][1],Y[1][0],Y[1][1]),",",p," ",Y[1],"A",T,",",T," 0 0,",v," ",Y[0]):A.push("M",I[0],"A",T,",",T," 0 1,",v," ",Y[0])}else A.push("M",m,",",M);if(null!=S){var Z=mu([m,M],[S,k],n,-R,p),V=mu([_,w],null==x?[m,M]:[x,b],n,-R,p);g===R?A.push("L",V[0],"A",R,",",R," 0 0,",v," ",V[1],"A",n,",",n," 0 ",p^yu(V[1][0],V[1][1],Z[1][0],Z[1][1]),",",1-p," ",Z[1],"A",R,",",R," 0 0,",v," ",Z[0]):A.push("L",V[0],"A",R,",",R," 0 0,",v," ",Z[0])}else A.push("L",_,",",w)}else A.push("M",m,",",M),null!=x&&A.push("A",c,",",c," 0 ",C,",",p," ",x,",",b),A.push("L",_,",",w),null!=S&&A.push("A",n,",",n," 0 ",L,",",1-p," ",S,",",k);return A.push("Z"),A.join("")}function t(n,t){return"M0,"+n+"A"+n+","+n+" 0 1,"+t+" 0,"+-n+"A"+n+","+n+" 0 1,"+t+" 0,"+n}var e=hu,r=pu,i=su,u=ql,o=gu,a=vu,l=du;return n.innerRadius=function(t){return arguments.length?(e=En(t),n):e},n.outerRadius=function(t){return arguments.length?(r=En(t),n):r},n.cornerRadius=function(t){return arguments.length?(i=En(t),n):i},n.padRadius=function(t){return arguments.length?(u=t==ql?ql:En(t),n):u},n.startAngle=function(t){return arguments.length?(o=En(t),n):o},n.endAngle=function(t){return arguments.length?(a=En(t),n):a},n.padAngle=function(t){return arguments.length?(l=En(t),n):l},n.centroid=function(){var n=(+e.apply(this,arguments)+ +r.apply(this,arguments))/2,t=(+o.apply(this,arguments)+ +a.apply(this,arguments))/2-Io;return[Math.cos(t)*n,Math.sin(t)*n]},n};var ql="auto";ao.svg.line=function(){return Mu(m)};var Tl=ao.map({linear:xu,"linear-closed":bu,step:_u,"step-before":wu,"step-after":Su,basis:zu,"basis-open":Lu,"basis-closed":qu,bundle:Tu,cardinal:Eu,"cardinal-open":ku,"cardinal-closed":Nu,monotone:Fu});Tl.forEach(function(n,t){t.key=n,t.closed=/-closed$/.test(n)});var Rl=[0,2/3,1/3,0],Dl=[0,1/3,2/3,0],Pl=[0,1/6,2/3,1/6];ao.svg.line.radial=function(){var n=Mu(Hu);return n.radius=n.x,delete n.x,n.angle=n.y,delete n.y,n},wu.reverse=Su,Su.reverse=wu,ao.svg.area=function(){return Ou(m)},ao.svg.area.radial=function(){var n=Ou(Hu);return n.radius=n.x,delete n.x,n.innerRadius=n.x0,delete n.x0,n.outerRadius=n.x1,delete n.x1,n.angle=n.y,delete n.y,n.startAngle=n.y0,delete n.y0,n.endAngle=n.y1,delete n.y1,n},ao.svg.chord=function(){function n(n,a){var l=t(this,u,n,a),c=t(this,o,n,a);return"M"+l.p0+r(l.r,l.p1,l.a1-l.a0)+(e(l,c)?i(l.r,l.p1,l.r,l.p0):i(l.r,l.p1,c.r,c.p0)+r(c.r,c.p1,c.a1-c.a0)+i(c.r,c.p1,l.r,l.p0))+"Z"}function t(n,t,e,r){var i=t.call(n,e,r),u=a.call(n,i,r),o=l.call(n,i,r)-Io,f=c.call(n,i,r)-Io;return{r:u,a0:o,a1:f,p0:[u*Math.cos(o),u*Math.sin(o)],p1:[u*Math.cos(f),u*Math.sin(f)]}}function e(n,t){return n.a0==t.a0&&n.a1==t.a1}function r(n,t,e){return"A"+n+","+n+" 0 "+ +(e>Fo)+",1 "+t}function i(n,t,e,r){return"Q 0,0 "+r}var u=Me,o=xe,a=Iu,l=gu,c=vu;return n.radius=function(t){return arguments.length?(a=En(t),n):a},n.source=function(t){return arguments.length?(u=En(t),n):u},n.target=function(t){return arguments.length?(o=En(t),n):o},n.startAngle=function(t){return arguments.length?(l=En(t),n):l},n.endAngle=function(t){return arguments.length?(c=En(t),n):c},n},ao.svg.diagonal=function(){function n(n,i){var u=t.call(this,n,i),o=e.call(this,n,i),a=(u.y+o.y)/2,l=[u,{x:u.x,y:a},{x:o.x,y:a},o];return l=l.map(r),"M"+l[0]+"C"+l[1]+" "+l[2]+" "+l[3]}var t=Me,e=xe,r=Yu;return n.source=function(e){return arguments.length?(t=En(e),n):t},n.target=function(t){return arguments.length?(e=En(t),n):e},n.projection=function(t){return arguments.length?(r=t,n):r},n},ao.svg.diagonal.radial=function(){var n=ao.svg.diagonal(),t=Yu,e=n.projection;return n.projection=function(n){return arguments.length?e(Zu(t=n)):t},n},ao.svg.symbol=function(){function n(n,r){return(Ul.get(t.call(this,n,r))||$u)(e.call(this,n,r))}var t=Xu,e=Vu;return n.type=function(e){return arguments.length?(t=En(e),n):t},n.size=function(t){return arguments.length?(e=En(t),n):e},n};var Ul=ao.map({circle:$u,cross:function(n){var t=Math.sqrt(n/5)/2;return"M"+-3*t+","+-t+"H"+-t+"V"+-3*t+"H"+t+"V"+-t+"H"+3*t+"V"+t+"H"+t+"V"+3*t+"H"+-t+"V"+t+"H"+-3*t+"Z"},diamond:function(n){var t=Math.sqrt(n/(2*Fl)),e=t*Fl;return"M0,"+-t+"L"+e+",0 0,"+t+" "+-e+",0Z"},square:function(n){var t=Math.sqrt(n)/2;return"M"+-t+","+-t+"L"+t+","+-t+" "+t+","+t+" "+-t+","+t+"Z"},"triangle-down":function(n){var t=Math.sqrt(n/jl),e=t*jl/2;return"M0,"+e+"L"+t+","+-e+" "+-t+","+-e+"Z"},"triangle-up":function(n){var t=Math.sqrt(n/jl),e=t*jl/2;return"M0,"+-e+"L"+t+","+e+" "+-t+","+e+"Z"}});ao.svg.symbolTypes=Ul.keys();var jl=Math.sqrt(3),Fl=Math.tan(30*Yo);Co.transition=function(n){for(var t,e,r=Hl||++Zl,i=Ku(n),u=[],o=Ol||{time:Date.now(),ease:Nr,delay:0,duration:250},a=-1,l=this.length;++a<l;){u.push(t=[]);for(var c=this[a],f=-1,s=c.length;++f<s;)(e=c[f])&&Qu(e,f,i,r,o),t.push(e)}return Wu(u,i,r)},Co.interrupt=function(n){return this.each(null==n?Il:Bu(Ku(n)))};var Hl,Ol,Il=Bu(Ku()),Yl=[],Zl=0;Yl.call=Co.call,Yl.empty=Co.empty,Yl.node=Co.node,Yl.size=Co.size,ao.transition=function(n,t){return n&&n.transition?Hl?n.transition(t):n:ao.selection().transition(n)},ao.transition.prototype=Yl,Yl.select=function(n){var t,e,r,i=this.id,u=this.namespace,o=[];n=A(n);for(var a=-1,l=this.length;++a<l;){o.push(t=[]);for(var c=this[a],f=-1,s=c.length;++f<s;)(r=c[f])&&(e=n.call(r,r.__data__,f,a))?("__data__"in r&&(e.__data__=r.__data__),Qu(e,f,u,i,r[u][i]),t.push(e)):t.push(null)}return Wu(o,u,i)},Yl.selectAll=function(n){var t,e,r,i,u,o=this.id,a=this.namespace,l=[];n=C(n);for(var c=-1,f=this.length;++c<f;)for(var s=this[c],h=-1,p=s.length;++h<p;)if(r=s[h]){u=r[a][o],e=n.call(r,r.__data__,h,c),l.push(t=[]);for(var g=-1,v=e.length;++g<v;)(i=e[g])&&Qu(i,g,a,o,u),t.push(i)}return Wu(l,a,o)},Yl.filter=function(n){var t,e,r,i=[];"function"!=typeof n&&(n=O(n));for(var u=0,o=this.length;o>u;u++){i.push(t=[]);for(var e=this[u],a=0,l=e.length;l>a;a++)(r=e[a])&&n.call(r,r.__data__,a,u)&&t.push(r)}return Wu(i,this.namespace,this.id)},Yl.tween=function(n,t){var e=this.id,r=this.namespace;return arguments.length<2?this.node()[r][e].tween.get(n):Y(this,null==t?function(t){t[r][e].tween.remove(n)}:function(i){i[r][e].tween.set(n,t)})},Yl.attr=function(n,t){function e(){this.removeAttribute(a)}function r(){this.removeAttributeNS(a.space,a.local)}function i(n){return null==n?e:(n+="",function(){var t,e=this.getAttribute(a);return e!==n&&(t=o(e,n),function(n){this.setAttribute(a,t(n))})})}function u(n){return null==n?r:(n+="",function(){var t,e=this.getAttributeNS(a.space,a.local);return e!==n&&(t=o(e,n),function(n){this.setAttributeNS(a.space,a.local,t(n))})})}if(arguments.length<2){for(t in n)this.attr(t,n[t]);return this}var o="transform"==n?$r:Mr,a=ao.ns.qualify(n);return Ju(this,"attr."+n,t,a.local?u:i)},Yl.attrTween=function(n,t){function e(n,e){var r=t.call(this,n,e,this.getAttribute(i));return r&&function(n){this.setAttribute(i,r(n))}}function r(n,e){var r=t.call(this,n,e,this.getAttributeNS(i.space,i.local));return r&&function(n){this.setAttributeNS(i.space,i.local,r(n))}}var i=ao.ns.qualify(n);return this.tween("attr."+n,i.local?r:e)},Yl.style=function(n,e,r){function i(){this.style.removeProperty(n)}function u(e){return null==e?i:(e+="",function(){var i,u=t(this).getComputedStyle(this,null).getPropertyValue(n);return u!==e&&(i=Mr(u,e),function(t){this.style.setProperty(n,i(t),r)})})}var o=arguments.length;if(3>o){if("string"!=typeof n){2>o&&(e="");for(r in n)this.style(r,n[r],e);return this}r=""}return Ju(this,"style."+n,e,u)},Yl.styleTween=function(n,e,r){function i(i,u){var o=e.call(this,i,u,t(this).getComputedStyle(this,null).getPropertyValue(n));return o&&function(t){this.style.setProperty(n,o(t),r)}}return arguments.length<3&&(r=""),this.tween("style."+n,i)},Yl.text=function(n){return Ju(this,"text",n,Gu)},Yl.remove=function(){var n=this.namespace;return this.each("end.transition",function(){var t;this[n].count<2&&(t=this.parentNode)&&t.removeChild(this)})},Yl.ease=function(n){var t=this.id,e=this.namespace;return arguments.length<1?this.node()[e][t].ease:("function"!=typeof n&&(n=ao.ease.apply(ao,arguments)),Y(this,function(r){r[e][t].ease=n}))},Yl.delay=function(n){var t=this.id,e=this.namespace;return arguments.length<1?this.node()[e][t].delay:Y(this,"function"==typeof n?function(r,i,u){r[e][t].delay=+n.call(r,r.__data__,i,u)}:(n=+n,function(r){r[e][t].delay=n}))},Yl.duration=function(n){var t=this.id,e=this.namespace;return arguments.length<1?this.node()[e][t].duration:Y(this,"function"==typeof n?function(r,i,u){r[e][t].duration=Math.max(1,n.call(r,r.__data__,i,u))}:(n=Math.max(1,n),function(r){r[e][t].duration=n}))},Yl.each=function(n,t){var e=this.id,r=this.namespace;if(arguments.length<2){var i=Ol,u=Hl;try{Hl=e,Y(this,function(t,i,u){Ol=t[r][e],n.call(t,t.__data__,i,u)})}finally{Ol=i,Hl=u}}else Y(this,function(i){var u=i[r][e];(u.event||(u.event=ao.dispatch("start","end","interrupt"))).on(n,t)});return this},Yl.transition=function(){for(var n,t,e,r,i=this.id,u=++Zl,o=this.namespace,a=[],l=0,c=this.length;c>l;l++){a.push(n=[]);for(var t=this[l],f=0,s=t.length;s>f;f++)(e=t[f])&&(r=e[o][i],Qu(e,f,o,u,{time:r.time,ease:r.ease,delay:r.delay+r.duration,duration:r.duration})),n.push(e)}return Wu(a,o,u)},ao.svg.axis=function(){function n(n){n.each(function(){var n,c=ao.select(this),f=this.__chart__||e,s=this.__chart__=e.copy(),h=null==l?s.ticks?s.ticks.apply(s,a):s.domain():l,p=null==t?s.tickFormat?s.tickFormat.apply(s,a):m:t,g=c.selectAll(".tick").data(h,s),v=g.enter().insert("g",".domain").attr("class","tick").style("opacity",Uo),d=ao.transition(g.exit()).style("opacity",Uo).remove(),y=ao.transition(g.order()).style("opacity",1),M=Math.max(i,0)+o,x=Zi(s),b=c.selectAll(".domain").data([0]),_=(b.enter().append("path").attr("class","domain"),ao.transition(b));v.append("line"),v.append("text");var w,S,k,N,E=v.select("line"),A=y.select("line"),C=g.select("text").text(p),z=v.select("text"),L=y.select("text"),q="top"===r||"left"===r?-1:1;if("bottom"===r||"top"===r?(n=no,w="x",k="y",S="x2",N="y2",C.attr("dy",0>q?"0em":".71em").style("text-anchor","middle"),_.attr("d","M"+x[0]+","+q*u+"V0H"+x[1]+"V"+q*u)):(n=to,w="y",k="x",S="y2",N="x2",C.attr("dy",".32em").style("text-anchor",0>q?"end":"start"),_.attr("d","M"+q*u+","+x[0]+"H0V"+x[1]+"H"+q*u)),E.attr(N,q*i),z.attr(k,q*M),A.attr(S,0).attr(N,q*i),L.attr(w,0).attr(k,q*M),s.rangeBand){var T=s,R=T.rangeBand()/2;f=s=function(n){return T(n)+R}}else f.rangeBand?f=s:d.call(n,s,f);v.call(n,f,s),y.call(n,s,s)})}var t,e=ao.scale.linear(),r=Vl,i=6,u=6,o=3,a=[10],l=null;return n.scale=function(t){return arguments.length?(e=t,n):e},n.orient=function(t){return arguments.length?(r=t in Xl?t+"":Vl,n):r},n.ticks=function(){return arguments.length?(a=co(arguments),n):a},n.tickValues=function(t){return arguments.length?(l=t,n):l},n.tickFormat=function(e){return arguments.length?(t=e,n):t},n.tickSize=function(t){var e=arguments.length;return e?(i=+t,u=+arguments[e-1],n):i},n.innerTickSize=function(t){return arguments.length?(i=+t,n):i},n.outerTickSize=function(t){return arguments.length?(u=+t,n):u},n.tickPadding=function(t){return arguments.length?(o=+t,n):o},n.tickSubdivide=function(){return arguments.length&&n},n};var Vl="bottom",Xl={top:1,right:1,bottom:1,left:1};ao.svg.brush=function(){function n(t){t.each(function(){var t=ao.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",u).on("touchstart.brush",u),o=t.selectAll(".background").data([0]);o.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),t.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var a=t.selectAll(".resize").data(v,m);a.exit().remove(),a.enter().append("g").attr("class",function(n){return"resize "+n}).style("cursor",function(n){return $l[n]}).append("rect").attr("x",function(n){return/[ew]$/.test(n)?-3:null}).attr("y",function(n){return/^[ns]/.test(n)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),a.style("display",n.empty()?"none":null);var l,s=ao.transition(t),h=ao.transition(o);c&&(l=Zi(c),h.attr("x",l[0]).attr("width",l[1]-l[0]),r(s)),f&&(l=Zi(f),h.attr("y",l[0]).attr("height",l[1]-l[0]),i(s)),e(s)})}function e(n){n.selectAll(".resize").attr("transform",function(n){return"translate("+s[+/e$/.test(n)]+","+h[+/^s/.test(n)]+")"})}function r(n){n.select(".extent").attr("x",s[0]),n.selectAll(".extent,.n>rect,.s>rect").attr("width",s[1]-s[0])}function i(n){n.select(".extent").attr("y",h[0]),n.selectAll(".extent,.e>rect,.w>rect").attr("height",h[1]-h[0])}function u(){function u(){32==ao.event.keyCode&&(C||(M=null,L[0]-=s[1],L[1]-=h[1],C=2),S())}function v(){32==ao.event.keyCode&&2==C&&(L[0]+=s[1],L[1]+=h[1],C=0,S())}function d(){var n=ao.mouse(b),t=!1;x&&(n[0]+=x[0],n[1]+=x[1]),C||(ao.event.altKey?(M||(M=[(s[0]+s[1])/2,(h[0]+h[1])/2]),L[0]=s[+(n[0]<M[0])],L[1]=h[+(n[1]<M[1])]):M=null),E&&y(n,c,0)&&(r(k),t=!0),A&&y(n,f,1)&&(i(k),t=!0),t&&(e(k),w({type:"brush",mode:C?"move":"resize"}))}function y(n,t,e){var r,i,u=Zi(t),l=u[0],c=u[1],f=L[e],v=e?h:s,d=v[1]-v[0];return C&&(l-=f,c-=d+f),r=(e?g:p)?Math.max(l,Math.min(c,n[e])):n[e],C?i=(r+=f)+d:(M&&(f=Math.max(l,Math.min(c,2*M[e]-r))),r>f?(i=r,r=f):i=f),v[0]!=r||v[1]!=i?(e?a=null:o=null,v[0]=r,v[1]=i,!0):void 0}function m(){d(),k.style("pointer-events","all").selectAll(".resize").style("display",n.empty()?"none":null),ao.select("body").style("cursor",null),q.on("mousemove.brush",null).on("mouseup.brush",null).on("touchmove.brush",null).on("touchend.brush",null).on("keydown.brush",null).on("keyup.brush",null),z(),w({type:"brushend"})}var M,x,b=this,_=ao.select(ao.event.target),w=l.of(b,arguments),k=ao.select(b),N=_.datum(),E=!/^(n|s)$/.test(N)&&c,A=!/^(e|w)$/.test(N)&&f,C=_.classed("extent"),z=W(b),L=ao.mouse(b),q=ao.select(t(b)).on("keydown.brush",u).on("keyup.brush",v);if(ao.event.changedTouches?q.on("touchmove.brush",d).on("touchend.brush",m):q.on("mousemove.brush",d).on("mouseup.brush",m),k.interrupt().selectAll("*").interrupt(),C)L[0]=s[0]-L[0],L[1]=h[0]-L[1];else if(N){var T=+/w$/.test(N),R=+/^n/.test(N);x=[s[1-T]-L[0],h[1-R]-L[1]],L[0]=s[T],L[1]=h[R]}else ao.event.altKey&&(M=L.slice());k.style("pointer-events","none").selectAll(".resize").style("display",null),ao.select("body").style("cursor",_.style("cursor")),w({type:"brushstart"}),d()}var o,a,l=N(n,"brushstart","brush","brushend"),c=null,f=null,s=[0,0],h=[0,0],p=!0,g=!0,v=Bl[0];return n.event=function(n){n.each(function(){var n=l.of(this,arguments),t={x:s,y:h,i:o,j:a},e=this.__chart__||t;this.__chart__=t,Hl?ao.select(this).transition().each("start.brush",function(){o=e.i,a=e.j,s=e.x,h=e.y,n({type:"brushstart"})}).tween("brush:brush",function(){var e=xr(s,t.x),r=xr(h,t.y);return o=a=null,function(i){s=t.x=e(i),h=t.y=r(i),n({type:"brush",mode:"resize"})}}).each("end.brush",function(){o=t.i,a=t.j,n({type:"brush",mode:"resize"}),n({type:"brushend"})}):(n({type:"brushstart"}),n({type:"brush",mode:"resize"}),n({type:"brushend"}))})},n.x=function(t){return arguments.length?(c=t,v=Bl[!c<<1|!f],n):c},n.y=function(t){return arguments.length?(f=t,v=Bl[!c<<1|!f],n):f},n.clamp=function(t){return arguments.length?(c&&f?(p=!!t[0],g=!!t[1]):c?p=!!t:f&&(g=!!t),n):c&&f?[p,g]:c?p:f?g:null},n.extent=function(t){var e,r,i,u,l;return arguments.length?(c&&(e=t[0],r=t[1],f&&(e=e[0],r=r[0]),o=[e,r],c.invert&&(e=c(e),r=c(r)),e>r&&(l=e,e=r,r=l),e==s[0]&&r==s[1]||(s=[e,r])),f&&(i=t[0],u=t[1],c&&(i=i[1],u=u[1]),a=[i,u],f.invert&&(i=f(i),u=f(u)),i>u&&(l=i,i=u,u=l),i==h[0]&&u==h[1]||(h=[i,u])),n):(c&&(o?(e=o[0],r=o[1]):(e=s[0],r=s[1],c.invert&&(e=c.invert(e),r=c.invert(r)),e>r&&(l=e,e=r,r=l))),f&&(a?(i=a[0],u=a[1]):(i=h[0],u=h[1],f.invert&&(i=f.invert(i),u=f.invert(u)),i>u&&(l=i,i=u,u=l))),c&&f?[[e,i],[r,u]]:c?[e,r]:f&&[i,u])},n.clear=function(){return n.empty()||(s=[0,0],h=[0,0],o=a=null),n},n.empty=function(){return!!c&&s[0]==s[1]||!!f&&h[0]==h[1]},ao.rebind(n,l,"on")};var $l={n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},Bl=[["n","e","s","w","nw","ne","se","sw"],["e","w"],["n","s"],[]],Wl=ga.format=xa.timeFormat,Jl=Wl.utc,Gl=Jl("%Y-%m-%dT%H:%M:%S.%LZ");Wl.iso=Date.prototype.toISOString&&+new Date("2000-01-01T00:00:00.000Z")?eo:Gl,eo.parse=function(n){var t=new Date(n);return isNaN(t)?null:t},eo.toString=Gl.toString,ga.second=On(function(n){return new va(1e3*Math.floor(n/1e3))},function(n,t){n.setTime(n.getTime()+1e3*Math.floor(t))},function(n){return n.getSeconds()}),ga.seconds=ga.second.range,ga.seconds.utc=ga.second.utc.range,ga.minute=On(function(n){return new va(6e4*Math.floor(n/6e4))},function(n,t){n.setTime(n.getTime()+6e4*Math.floor(t))},function(n){return n.getMinutes()}),ga.minutes=ga.minute.range,ga.minutes.utc=ga.minute.utc.range,ga.hour=On(function(n){var t=n.getTimezoneOffset()/60;return new va(36e5*(Math.floor(n/36e5-t)+t))},function(n,t){n.setTime(n.getTime()+36e5*Math.floor(t))},function(n){return n.getHours()}),ga.hours=ga.hour.range,ga.hours.utc=ga.hour.utc.range,ga.month=On(function(n){return n=ga.day(n),n.setDate(1),n},function(n,t){n.setMonth(n.getMonth()+t)},function(n){return n.getMonth()}),ga.months=ga.month.range,ga.months.utc=ga.month.utc.range;var Kl=[1e3,5e3,15e3,3e4,6e4,3e5,9e5,18e5,36e5,108e5,216e5,432e5,864e5,1728e5,6048e5,2592e6,7776e6,31536e6],Ql=[[ga.second,1],[ga.second,5],[ga.second,15],[ga.second,30],[ga.minute,1],[ga.minute,5],[ga.minute,15],[ga.minute,30],[ga.hour,1],[ga.hour,3],[ga.hour,6],[ga.hour,12],[ga.day,1],[ga.day,2],[ga.week,1],[ga.month,1],[ga.month,3],[ga.year,1]],nc=Wl.multi([[".%L",function(n){return n.getMilliseconds()}],[":%S",function(n){return n.getSeconds()}],["%I:%M",function(n){return n.getMinutes()}],["%I %p",function(n){return n.getHours()}],["%a %d",function(n){return n.getDay()&&1!=n.getDate()}],["%b %d",function(n){return 1!=n.getDate()}],["%B",function(n){return n.getMonth()}],["%Y",zt]]),tc={range:function(n,t,e){return ao.range(Math.ceil(n/e)*e,+t,e).map(io)},floor:m,ceil:m};Ql.year=ga.year,ga.scale=function(){return ro(ao.scale.linear(),Ql,nc)};var ec=Ql.map(function(n){return[n[0].utc,n[1]]}),rc=Jl.multi([[".%L",function(n){return n.getUTCMilliseconds()}],[":%S",function(n){return n.getUTCSeconds()}],["%I:%M",function(n){return n.getUTCMinutes()}],["%I %p",function(n){return n.getUTCHours()}],["%a %d",function(n){return n.getUTCDay()&&1!=n.getUTCDate()}],["%b %d",function(n){return 1!=n.getUTCDate()}],["%B",function(n){return n.getUTCMonth()}],["%Y",zt]]);ec.year=ga.year.utc,ga.scale.utc=function(){return ro(ao.scale.linear(),ec,rc)},ao.text=An(function(n){return n.responseText}),ao.json=function(n,t){return Cn(n,"application/json",uo,t)},ao.html=function(n,t){return Cn(n,"text/html",oo,t)},ao.xml=An(function(n){return n.responseXML}),"function"==typeof define&&define.amd?(this.d3=ao,define(ao)):"object"==typeof module&&module.exports?module.exports=ao:this.d3=ao}();
\ No newline at end of file
diff --git a/applications/auto-scale/gui/src/vendor/jquery/.bower.json b/views/ngXosViews/serviceGrid/src/vendor/jquery/.bower.json
similarity index 82%
rename from applications/auto-scale/gui/src/vendor/jquery/.bower.json
rename to views/ngXosViews/serviceGrid/src/vendor/jquery/.bower.json
index a5f3c21..b4040a3 100644
--- a/applications/auto-scale/gui/src/vendor/jquery/.bower.json
+++ b/views/ngXosViews/serviceGrid/src/vendor/jquery/.bower.json
@@ -25,14 +25,14 @@
"javascript",
"library"
],
- "homepage": "https://github.com/jquery/jquery",
+ "homepage": "https://github.com/jquery/jquery-dist",
"_release": "2.1.4",
"_resolution": {
"type": "version",
"tag": "2.1.4",
"commit": "7751e69b615c6eca6f783a81e292a55725af6b85"
},
- "_source": "git://github.com/jquery/jquery.git",
- "_target": "~2.1.4",
+ "_source": "https://github.com/jquery/jquery-dist.git",
+ "_target": "2.1.4",
"_originalSource": "jquery"
}
\ No newline at end of file
diff --git a/applications/auto-scale/gui/src/vendor/jquery/MIT-LICENSE.txt b/views/ngXosViews/serviceGrid/src/vendor/jquery/MIT-LICENSE.txt
similarity index 100%
rename from applications/auto-scale/gui/src/vendor/jquery/MIT-LICENSE.txt
rename to views/ngXosViews/serviceGrid/src/vendor/jquery/MIT-LICENSE.txt
diff --git a/applications/auto-scale/gui/src/vendor/jquery/bower.json b/views/ngXosViews/serviceGrid/src/vendor/jquery/bower.json
similarity index 100%
rename from applications/auto-scale/gui/src/vendor/jquery/bower.json
rename to views/ngXosViews/serviceGrid/src/vendor/jquery/bower.json
diff --git a/views/ngXosViews/serviceGrid/src/vendor/jquery/dist/jquery.js b/views/ngXosViews/serviceGrid/src/vendor/jquery/dist/jquery.js
new file mode 100644
index 0000000..eed1777
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/jquery/dist/jquery.js
@@ -0,0 +1,9210 @@
+/*!
+ * jQuery JavaScript Library v2.1.4
+ * http://jquery.com/
+ *
+ * Includes Sizzle.js
+ * http://sizzlejs.com/
+ *
+ * Copyright 2005, 2014 jQuery Foundation, Inc. and other contributors
+ * Released under the MIT license
+ * http://jquery.org/license
+ *
+ * Date: 2015-04-28T16:01Z
+ */
+
+(function( global, factory ) {
+
+ if ( typeof module === "object" && typeof module.exports === "object" ) {
+ // For CommonJS and CommonJS-like environments where a proper `window`
+ // is present, execute the factory and get jQuery.
+ // For environments that do not have a `window` with a `document`
+ // (such as Node.js), expose a factory as module.exports.
+ // This accentuates the need for the creation of a real `window`.
+ // e.g. var jQuery = require("jquery")(window);
+ // See ticket #14549 for more info.
+ module.exports = global.document ?
+ factory( global, true ) :
+ function( w ) {
+ if ( !w.document ) {
+ throw new Error( "jQuery requires a window with a document" );
+ }
+ return factory( w );
+ };
+ } else {
+ factory( global );
+ }
+
+// Pass this if window is not defined yet
+}(typeof window !== "undefined" ? window : this, function( window, noGlobal ) {
+
+// Support: Firefox 18+
+// Can't be in strict mode, several libs including ASP.NET trace
+// the stack via arguments.caller.callee and Firefox dies if
+// you try to trace through "use strict" call chains. (#13335)
+//
+
+var arr = [];
+
+var slice = arr.slice;
+
+var concat = arr.concat;
+
+var push = arr.push;
+
+var indexOf = arr.indexOf;
+
+var class2type = {};
+
+var toString = class2type.toString;
+
+var hasOwn = class2type.hasOwnProperty;
+
+var support = {};
+
+
+
+var
+ // Use the correct document accordingly with window argument (sandbox)
+ document = window.document,
+
+ version = "2.1.4",
+
+ // Define a local copy of jQuery
+ jQuery = function( selector, context ) {
+ // The jQuery object is actually just the init constructor 'enhanced'
+ // Need init if jQuery is called (just allow error to be thrown if not included)
+ return new jQuery.fn.init( selector, context );
+ },
+
+ // Support: Android<4.1
+ // Make sure we trim BOM and NBSP
+ rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,
+
+ // Matches dashed string for camelizing
+ rmsPrefix = /^-ms-/,
+ rdashAlpha = /-([\da-z])/gi,
+
+ // Used by jQuery.camelCase as callback to replace()
+ fcamelCase = function( all, letter ) {
+ return letter.toUpperCase();
+ };
+
+jQuery.fn = jQuery.prototype = {
+ // The current version of jQuery being used
+ jquery: version,
+
+ constructor: jQuery,
+
+ // Start with an empty selector
+ selector: "",
+
+ // The default length of a jQuery object is 0
+ length: 0,
+
+ toArray: function() {
+ return slice.call( this );
+ },
+
+ // Get the Nth element in the matched element set OR
+ // Get the whole matched element set as a clean array
+ get: function( num ) {
+ return num != null ?
+
+ // Return just the one element from the set
+ ( num < 0 ? this[ num + this.length ] : this[ num ] ) :
+
+ // Return all the elements in a clean array
+ slice.call( this );
+ },
+
+ // Take an array of elements and push it onto the stack
+ // (returning the new matched element set)
+ pushStack: function( elems ) {
+
+ // Build a new jQuery matched element set
+ var ret = jQuery.merge( this.constructor(), elems );
+
+ // Add the old object onto the stack (as a reference)
+ ret.prevObject = this;
+ ret.context = this.context;
+
+ // Return the newly-formed element set
+ return ret;
+ },
+
+ // Execute a callback for every element in the matched set.
+ // (You can seed the arguments with an array of args, but this is
+ // only used internally.)
+ each: function( callback, args ) {
+ return jQuery.each( this, callback, args );
+ },
+
+ map: function( callback ) {
+ return this.pushStack( jQuery.map(this, function( elem, i ) {
+ return callback.call( elem, i, elem );
+ }));
+ },
+
+ slice: function() {
+ return this.pushStack( slice.apply( this, arguments ) );
+ },
+
+ first: function() {
+ return this.eq( 0 );
+ },
+
+ last: function() {
+ return this.eq( -1 );
+ },
+
+ eq: function( i ) {
+ var len = this.length,
+ j = +i + ( i < 0 ? len : 0 );
+ return this.pushStack( j >= 0 && j < len ? [ this[j] ] : [] );
+ },
+
+ end: function() {
+ return this.prevObject || this.constructor(null);
+ },
+
+ // For internal use only.
+ // Behaves like an Array's method, not like a jQuery method.
+ push: push,
+ sort: arr.sort,
+ splice: arr.splice
+};
+
+jQuery.extend = jQuery.fn.extend = function() {
+ var options, name, src, copy, copyIsArray, clone,
+ target = arguments[0] || {},
+ i = 1,
+ length = arguments.length,
+ deep = false;
+
+ // Handle a deep copy situation
+ if ( typeof target === "boolean" ) {
+ deep = target;
+
+ // Skip the boolean and the target
+ target = arguments[ i ] || {};
+ i++;
+ }
+
+ // Handle case when target is a string or something (possible in deep copy)
+ if ( typeof target !== "object" && !jQuery.isFunction(target) ) {
+ target = {};
+ }
+
+ // Extend jQuery itself if only one argument is passed
+ if ( i === length ) {
+ target = this;
+ i--;
+ }
+
+ for ( ; i < length; i++ ) {
+ // Only deal with non-null/undefined values
+ if ( (options = arguments[ i ]) != null ) {
+ // Extend the base object
+ for ( name in options ) {
+ src = target[ name ];
+ copy = options[ name ];
+
+ // Prevent never-ending loop
+ if ( target === copy ) {
+ continue;
+ }
+
+ // Recurse if we're merging plain objects or arrays
+ if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) {
+ if ( copyIsArray ) {
+ copyIsArray = false;
+ clone = src && jQuery.isArray(src) ? src : [];
+
+ } else {
+ clone = src && jQuery.isPlainObject(src) ? src : {};
+ }
+
+ // Never move original objects, clone them
+ target[ name ] = jQuery.extend( deep, clone, copy );
+
+ // Don't bring in undefined values
+ } else if ( copy !== undefined ) {
+ target[ name ] = copy;
+ }
+ }
+ }
+ }
+
+ // Return the modified object
+ return target;
+};
+
+jQuery.extend({
+ // Unique for each copy of jQuery on the page
+ expando: "jQuery" + ( version + Math.random() ).replace( /\D/g, "" ),
+
+ // Assume jQuery is ready without the ready module
+ isReady: true,
+
+ error: function( msg ) {
+ throw new Error( msg );
+ },
+
+ noop: function() {},
+
+ isFunction: function( obj ) {
+ return jQuery.type(obj) === "function";
+ },
+
+ isArray: Array.isArray,
+
+ isWindow: function( obj ) {
+ return obj != null && obj === obj.window;
+ },
+
+ isNumeric: function( obj ) {
+ // parseFloat NaNs numeric-cast false positives (null|true|false|"")
+ // ...but misinterprets leading-number strings, particularly hex literals ("0x...")
+ // subtraction forces infinities to NaN
+ // adding 1 corrects loss of precision from parseFloat (#15100)
+ return !jQuery.isArray( obj ) && (obj - parseFloat( obj ) + 1) >= 0;
+ },
+
+ isPlainObject: function( obj ) {
+ // Not plain objects:
+ // - Any object or value whose internal [[Class]] property is not "[object Object]"
+ // - DOM nodes
+ // - window
+ if ( jQuery.type( obj ) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) {
+ return false;
+ }
+
+ if ( obj.constructor &&
+ !hasOwn.call( obj.constructor.prototype, "isPrototypeOf" ) ) {
+ return false;
+ }
+
+ // If the function hasn't returned already, we're confident that
+ // |obj| is a plain object, created by {} or constructed with new Object
+ return true;
+ },
+
+ isEmptyObject: function( obj ) {
+ var name;
+ for ( name in obj ) {
+ return false;
+ }
+ return true;
+ },
+
+ type: function( obj ) {
+ if ( obj == null ) {
+ return obj + "";
+ }
+ // Support: Android<4.0, iOS<6 (functionish RegExp)
+ return typeof obj === "object" || typeof obj === "function" ?
+ class2type[ toString.call(obj) ] || "object" :
+ typeof obj;
+ },
+
+ // Evaluates a script in a global context
+ globalEval: function( code ) {
+ var script,
+ indirect = eval;
+
+ code = jQuery.trim( code );
+
+ if ( code ) {
+ // If the code includes a valid, prologue position
+ // strict mode pragma, execute code by injecting a
+ // script tag into the document.
+ if ( code.indexOf("use strict") === 1 ) {
+ script = document.createElement("script");
+ script.text = code;
+ document.head.appendChild( script ).parentNode.removeChild( script );
+ } else {
+ // Otherwise, avoid the DOM node creation, insertion
+ // and removal by using an indirect global eval
+ indirect( code );
+ }
+ }
+ },
+
+ // Convert dashed to camelCase; used by the css and data modules
+ // Support: IE9-11+
+ // Microsoft forgot to hump their vendor prefix (#9572)
+ camelCase: function( string ) {
+ return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase );
+ },
+
+ nodeName: function( elem, name ) {
+ return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();
+ },
+
+ // args is for internal usage only
+ each: function( obj, callback, args ) {
+ var value,
+ i = 0,
+ length = obj.length,
+ isArray = isArraylike( obj );
+
+ if ( args ) {
+ if ( isArray ) {
+ for ( ; i < length; i++ ) {
+ value = callback.apply( obj[ i ], args );
+
+ if ( value === false ) {
+ break;
+ }
+ }
+ } else {
+ for ( i in obj ) {
+ value = callback.apply( obj[ i ], args );
+
+ if ( value === false ) {
+ break;
+ }
+ }
+ }
+
+ // A special, fast, case for the most common use of each
+ } else {
+ if ( isArray ) {
+ for ( ; i < length; i++ ) {
+ value = callback.call( obj[ i ], i, obj[ i ] );
+
+ if ( value === false ) {
+ break;
+ }
+ }
+ } else {
+ for ( i in obj ) {
+ value = callback.call( obj[ i ], i, obj[ i ] );
+
+ if ( value === false ) {
+ break;
+ }
+ }
+ }
+ }
+
+ return obj;
+ },
+
+ // Support: Android<4.1
+ trim: function( text ) {
+ return text == null ?
+ "" :
+ ( text + "" ).replace( rtrim, "" );
+ },
+
+ // results is for internal usage only
+ makeArray: function( arr, results ) {
+ var ret = results || [];
+
+ if ( arr != null ) {
+ if ( isArraylike( Object(arr) ) ) {
+ jQuery.merge( ret,
+ typeof arr === "string" ?
+ [ arr ] : arr
+ );
+ } else {
+ push.call( ret, arr );
+ }
+ }
+
+ return ret;
+ },
+
+ inArray: function( elem, arr, i ) {
+ return arr == null ? -1 : indexOf.call( arr, elem, i );
+ },
+
+ merge: function( first, second ) {
+ var len = +second.length,
+ j = 0,
+ i = first.length;
+
+ for ( ; j < len; j++ ) {
+ first[ i++ ] = second[ j ];
+ }
+
+ first.length = i;
+
+ return first;
+ },
+
+ grep: function( elems, callback, invert ) {
+ var callbackInverse,
+ matches = [],
+ i = 0,
+ length = elems.length,
+ callbackExpect = !invert;
+
+ // Go through the array, only saving the items
+ // that pass the validator function
+ for ( ; i < length; i++ ) {
+ callbackInverse = !callback( elems[ i ], i );
+ if ( callbackInverse !== callbackExpect ) {
+ matches.push( elems[ i ] );
+ }
+ }
+
+ return matches;
+ },
+
+ // arg is for internal usage only
+ map: function( elems, callback, arg ) {
+ var value,
+ i = 0,
+ length = elems.length,
+ isArray = isArraylike( elems ),
+ ret = [];
+
+ // Go through the array, translating each of the items to their new values
+ if ( isArray ) {
+ for ( ; i < length; i++ ) {
+ value = callback( elems[ i ], i, arg );
+
+ if ( value != null ) {
+ ret.push( value );
+ }
+ }
+
+ // Go through every key on the object,
+ } else {
+ for ( i in elems ) {
+ value = callback( elems[ i ], i, arg );
+
+ if ( value != null ) {
+ ret.push( value );
+ }
+ }
+ }
+
+ // Flatten any nested arrays
+ return concat.apply( [], ret );
+ },
+
+ // A global GUID counter for objects
+ guid: 1,
+
+ // Bind a function to a context, optionally partially applying any
+ // arguments.
+ proxy: function( fn, context ) {
+ var tmp, args, proxy;
+
+ if ( typeof context === "string" ) {
+ tmp = fn[ context ];
+ context = fn;
+ fn = tmp;
+ }
+
+ // Quick check to determine if target is callable, in the spec
+ // this throws a TypeError, but we will just return undefined.
+ if ( !jQuery.isFunction( fn ) ) {
+ return undefined;
+ }
+
+ // Simulated bind
+ args = slice.call( arguments, 2 );
+ proxy = function() {
+ return fn.apply( context || this, args.concat( slice.call( arguments ) ) );
+ };
+
+ // Set the guid of unique handler to the same of original handler, so it can be removed
+ proxy.guid = fn.guid = fn.guid || jQuery.guid++;
+
+ return proxy;
+ },
+
+ now: Date.now,
+
+ // jQuery.support is not used in Core but other projects attach their
+ // properties to it so it needs to exist.
+ support: support
+});
+
+// Populate the class2type map
+jQuery.each("Boolean Number String Function Array Date RegExp Object Error".split(" "), function(i, name) {
+ class2type[ "[object " + name + "]" ] = name.toLowerCase();
+});
+
+function isArraylike( obj ) {
+
+ // Support: iOS 8.2 (not reproducible in simulator)
+ // `in` check used to prevent JIT error (gh-2145)
+ // hasOwn isn't used here due to false negatives
+ // regarding Nodelist length in IE
+ var length = "length" in obj && obj.length,
+ type = jQuery.type( obj );
+
+ if ( type === "function" || jQuery.isWindow( obj ) ) {
+ return false;
+ }
+
+ if ( obj.nodeType === 1 && length ) {
+ return true;
+ }
+
+ return type === "array" || length === 0 ||
+ typeof length === "number" && length > 0 && ( length - 1 ) in obj;
+}
+var Sizzle =
+/*!
+ * Sizzle CSS Selector Engine v2.2.0-pre
+ * http://sizzlejs.com/
+ *
+ * Copyright 2008, 2014 jQuery Foundation, Inc. and other contributors
+ * Released under the MIT license
+ * http://jquery.org/license
+ *
+ * Date: 2014-12-16
+ */
+(function( window ) {
+
+var i,
+ support,
+ Expr,
+ getText,
+ isXML,
+ tokenize,
+ compile,
+ select,
+ outermostContext,
+ sortInput,
+ hasDuplicate,
+
+ // Local document vars
+ setDocument,
+ document,
+ docElem,
+ documentIsHTML,
+ rbuggyQSA,
+ rbuggyMatches,
+ matches,
+ contains,
+
+ // Instance-specific data
+ expando = "sizzle" + 1 * new Date(),
+ preferredDoc = window.document,
+ dirruns = 0,
+ done = 0,
+ classCache = createCache(),
+ tokenCache = createCache(),
+ compilerCache = createCache(),
+ sortOrder = function( a, b ) {
+ if ( a === b ) {
+ hasDuplicate = true;
+ }
+ return 0;
+ },
+
+ // General-purpose constants
+ MAX_NEGATIVE = 1 << 31,
+
+ // Instance methods
+ hasOwn = ({}).hasOwnProperty,
+ arr = [],
+ pop = arr.pop,
+ push_native = arr.push,
+ push = arr.push,
+ slice = arr.slice,
+ // Use a stripped-down indexOf as it's faster than native
+ // http://jsperf.com/thor-indexof-vs-for/5
+ indexOf = function( list, elem ) {
+ var i = 0,
+ len = list.length;
+ for ( ; i < len; i++ ) {
+ if ( list[i] === elem ) {
+ return i;
+ }
+ }
+ return -1;
+ },
+
+ booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",
+
+ // Regular expressions
+
+ // Whitespace characters http://www.w3.org/TR/css3-selectors/#whitespace
+ whitespace = "[\\x20\\t\\r\\n\\f]",
+ // http://www.w3.org/TR/css3-syntax/#characters
+ characterEncoding = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",
+
+ // Loosely modeled on CSS identifier characters
+ // An unquoted value should be a CSS identifier http://www.w3.org/TR/css3-selectors/#attribute-selectors
+ // Proper syntax: http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier
+ identifier = characterEncoding.replace( "w", "w#" ),
+
+ // Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors
+ attributes = "\\[" + whitespace + "*(" + characterEncoding + ")(?:" + whitespace +
+ // Operator (capture 2)
+ "*([*^$|!~]?=)" + whitespace +
+ // "Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]"
+ "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" + whitespace +
+ "*\\]",
+
+ pseudos = ":(" + characterEncoding + ")(?:\\((" +
+ // To reduce the number of selectors needing tokenize in the preFilter, prefer arguments:
+ // 1. quoted (capture 3; capture 4 or capture 5)
+ "('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|" +
+ // 2. simple (capture 6)
+ "((?:\\\\.|[^\\\\()[\\]]|" + attributes + ")*)|" +
+ // 3. anything else (capture 2)
+ ".*" +
+ ")\\)|)",
+
+ // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter
+ rwhitespace = new RegExp( whitespace + "+", "g" ),
+ rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ),
+
+ rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ),
+ rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*" ),
+
+ rattributeQuotes = new RegExp( "=" + whitespace + "*([^\\]'\"]*?)" + whitespace + "*\\]", "g" ),
+
+ rpseudo = new RegExp( pseudos ),
+ ridentifier = new RegExp( "^" + identifier + "$" ),
+
+ matchExpr = {
+ "ID": new RegExp( "^#(" + characterEncoding + ")" ),
+ "CLASS": new RegExp( "^\\.(" + characterEncoding + ")" ),
+ "TAG": new RegExp( "^(" + characterEncoding.replace( "w", "w*" ) + ")" ),
+ "ATTR": new RegExp( "^" + attributes ),
+ "PSEUDO": new RegExp( "^" + pseudos ),
+ "CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace +
+ "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace +
+ "*(\\d+)|))" + whitespace + "*\\)|)", "i" ),
+ "bool": new RegExp( "^(?:" + booleans + ")$", "i" ),
+ // For use in libraries implementing .is()
+ // We use this for POS matching in `select`
+ "needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" +
+ whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" )
+ },
+
+ rinputs = /^(?:input|select|textarea|button)$/i,
+ rheader = /^h\d$/i,
+
+ rnative = /^[^{]+\{\s*\[native \w/,
+
+ // Easily-parseable/retrievable ID or TAG or CLASS selectors
+ rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,
+
+ rsibling = /[+~]/,
+ rescape = /'|\\/g,
+
+ // CSS escapes http://www.w3.org/TR/CSS21/syndata.html#escaped-characters
+ runescape = new RegExp( "\\\\([\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", "ig" ),
+ funescape = function( _, escaped, escapedWhitespace ) {
+ var high = "0x" + escaped - 0x10000;
+ // NaN means non-codepoint
+ // Support: Firefox<24
+ // Workaround erroneous numeric interpretation of +"0x"
+ return high !== high || escapedWhitespace ?
+ escaped :
+ high < 0 ?
+ // BMP codepoint
+ String.fromCharCode( high + 0x10000 ) :
+ // Supplemental Plane codepoint (surrogate pair)
+ String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 );
+ },
+
+ // Used for iframes
+ // See setDocument()
+ // Removing the function wrapper causes a "Permission Denied"
+ // error in IE
+ unloadHandler = function() {
+ setDocument();
+ };
+
+// Optimize for push.apply( _, NodeList )
+try {
+ push.apply(
+ (arr = slice.call( preferredDoc.childNodes )),
+ preferredDoc.childNodes
+ );
+ // Support: Android<4.0
+ // Detect silently failing push.apply
+ arr[ preferredDoc.childNodes.length ].nodeType;
+} catch ( e ) {
+ push = { apply: arr.length ?
+
+ // Leverage slice if possible
+ function( target, els ) {
+ push_native.apply( target, slice.call(els) );
+ } :
+
+ // Support: IE<9
+ // Otherwise append directly
+ function( target, els ) {
+ var j = target.length,
+ i = 0;
+ // Can't trust NodeList.length
+ while ( (target[j++] = els[i++]) ) {}
+ target.length = j - 1;
+ }
+ };
+}
+
+function Sizzle( selector, context, results, seed ) {
+ var match, elem, m, nodeType,
+ // QSA vars
+ i, groups, old, nid, newContext, newSelector;
+
+ if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) {
+ setDocument( context );
+ }
+
+ context = context || document;
+ results = results || [];
+ nodeType = context.nodeType;
+
+ if ( typeof selector !== "string" || !selector ||
+ nodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) {
+
+ return results;
+ }
+
+ if ( !seed && documentIsHTML ) {
+
+ // Try to shortcut find operations when possible (e.g., not under DocumentFragment)
+ if ( nodeType !== 11 && (match = rquickExpr.exec( selector )) ) {
+ // Speed-up: Sizzle("#ID")
+ if ( (m = match[1]) ) {
+ if ( nodeType === 9 ) {
+ elem = context.getElementById( m );
+ // Check parentNode to catch when Blackberry 4.6 returns
+ // nodes that are no longer in the document (jQuery #6963)
+ if ( elem && elem.parentNode ) {
+ // Handle the case where IE, Opera, and Webkit return items
+ // by name instead of ID
+ if ( elem.id === m ) {
+ results.push( elem );
+ return results;
+ }
+ } else {
+ return results;
+ }
+ } else {
+ // Context is not a document
+ if ( context.ownerDocument && (elem = context.ownerDocument.getElementById( m )) &&
+ contains( context, elem ) && elem.id === m ) {
+ results.push( elem );
+ return results;
+ }
+ }
+
+ // Speed-up: Sizzle("TAG")
+ } else if ( match[2] ) {
+ push.apply( results, context.getElementsByTagName( selector ) );
+ return results;
+
+ // Speed-up: Sizzle(".CLASS")
+ } else if ( (m = match[3]) && support.getElementsByClassName ) {
+ push.apply( results, context.getElementsByClassName( m ) );
+ return results;
+ }
+ }
+
+ // QSA path
+ if ( support.qsa && (!rbuggyQSA || !rbuggyQSA.test( selector )) ) {
+ nid = old = expando;
+ newContext = context;
+ newSelector = nodeType !== 1 && selector;
+
+ // qSA works strangely on Element-rooted queries
+ // We can work around this by specifying an extra ID on the root
+ // and working up from there (Thanks to Andrew Dupont for the technique)
+ // IE 8 doesn't work on object elements
+ if ( nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) {
+ groups = tokenize( selector );
+
+ if ( (old = context.getAttribute("id")) ) {
+ nid = old.replace( rescape, "\\$&" );
+ } else {
+ context.setAttribute( "id", nid );
+ }
+ nid = "[id='" + nid + "'] ";
+
+ i = groups.length;
+ while ( i-- ) {
+ groups[i] = nid + toSelector( groups[i] );
+ }
+ newContext = rsibling.test( selector ) && testContext( context.parentNode ) || context;
+ newSelector = groups.join(",");
+ }
+
+ if ( newSelector ) {
+ try {
+ push.apply( results,
+ newContext.querySelectorAll( newSelector )
+ );
+ return results;
+ } catch(qsaError) {
+ } finally {
+ if ( !old ) {
+ context.removeAttribute("id");
+ }
+ }
+ }
+ }
+ }
+
+ // All others
+ return select( selector.replace( rtrim, "$1" ), context, results, seed );
+}
+
+/**
+ * Create key-value caches of limited size
+ * @returns {Function(string, Object)} Returns the Object data after storing it on itself with
+ * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength)
+ * deleting the oldest entry
+ */
+function createCache() {
+ var keys = [];
+
+ function cache( key, value ) {
+ // Use (key + " ") to avoid collision with native prototype properties (see Issue #157)
+ if ( keys.push( key + " " ) > Expr.cacheLength ) {
+ // Only keep the most recent entries
+ delete cache[ keys.shift() ];
+ }
+ return (cache[ key + " " ] = value);
+ }
+ return cache;
+}
+
+/**
+ * Mark a function for special use by Sizzle
+ * @param {Function} fn The function to mark
+ */
+function markFunction( fn ) {
+ fn[ expando ] = true;
+ return fn;
+}
+
+/**
+ * Support testing using an element
+ * @param {Function} fn Passed the created div and expects a boolean result
+ */
+function assert( fn ) {
+ var div = document.createElement("div");
+
+ try {
+ return !!fn( div );
+ } catch (e) {
+ return false;
+ } finally {
+ // Remove from its parent by default
+ if ( div.parentNode ) {
+ div.parentNode.removeChild( div );
+ }
+ // release memory in IE
+ div = null;
+ }
+}
+
+/**
+ * Adds the same handler for all of the specified attrs
+ * @param {String} attrs Pipe-separated list of attributes
+ * @param {Function} handler The method that will be applied
+ */
+function addHandle( attrs, handler ) {
+ var arr = attrs.split("|"),
+ i = attrs.length;
+
+ while ( i-- ) {
+ Expr.attrHandle[ arr[i] ] = handler;
+ }
+}
+
+/**
+ * Checks document order of two siblings
+ * @param {Element} a
+ * @param {Element} b
+ * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b
+ */
+function siblingCheck( a, b ) {
+ var cur = b && a,
+ diff = cur && a.nodeType === 1 && b.nodeType === 1 &&
+ ( ~b.sourceIndex || MAX_NEGATIVE ) -
+ ( ~a.sourceIndex || MAX_NEGATIVE );
+
+ // Use IE sourceIndex if available on both nodes
+ if ( diff ) {
+ return diff;
+ }
+
+ // Check if b follows a
+ if ( cur ) {
+ while ( (cur = cur.nextSibling) ) {
+ if ( cur === b ) {
+ return -1;
+ }
+ }
+ }
+
+ return a ? 1 : -1;
+}
+
+/**
+ * Returns a function to use in pseudos for input types
+ * @param {String} type
+ */
+function createInputPseudo( type ) {
+ return function( elem ) {
+ var name = elem.nodeName.toLowerCase();
+ return name === "input" && elem.type === type;
+ };
+}
+
+/**
+ * Returns a function to use in pseudos for buttons
+ * @param {String} type
+ */
+function createButtonPseudo( type ) {
+ return function( elem ) {
+ var name = elem.nodeName.toLowerCase();
+ return (name === "input" || name === "button") && elem.type === type;
+ };
+}
+
+/**
+ * Returns a function to use in pseudos for positionals
+ * @param {Function} fn
+ */
+function createPositionalPseudo( fn ) {
+ return markFunction(function( argument ) {
+ argument = +argument;
+ return markFunction(function( seed, matches ) {
+ var j,
+ matchIndexes = fn( [], seed.length, argument ),
+ i = matchIndexes.length;
+
+ // Match elements found at the specified indexes
+ while ( i-- ) {
+ if ( seed[ (j = matchIndexes[i]) ] ) {
+ seed[j] = !(matches[j] = seed[j]);
+ }
+ }
+ });
+ });
+}
+
+/**
+ * Checks a node for validity as a Sizzle context
+ * @param {Element|Object=} context
+ * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value
+ */
+function testContext( context ) {
+ return context && typeof context.getElementsByTagName !== "undefined" && context;
+}
+
+// Expose support vars for convenience
+support = Sizzle.support = {};
+
+/**
+ * Detects XML nodes
+ * @param {Element|Object} elem An element or a document
+ * @returns {Boolean} True iff elem is a non-HTML XML node
+ */
+isXML = Sizzle.isXML = function( elem ) {
+ // documentElement is verified for cases where it doesn't yet exist
+ // (such as loading iframes in IE - #4833)
+ var documentElement = elem && (elem.ownerDocument || elem).documentElement;
+ return documentElement ? documentElement.nodeName !== "HTML" : false;
+};
+
+/**
+ * Sets document-related variables once based on the current document
+ * @param {Element|Object} [doc] An element or document object to use to set the document
+ * @returns {Object} Returns the current document
+ */
+setDocument = Sizzle.setDocument = function( node ) {
+ var hasCompare, parent,
+ doc = node ? node.ownerDocument || node : preferredDoc;
+
+ // If no document and documentElement is available, return
+ if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) {
+ return document;
+ }
+
+ // Set our document
+ document = doc;
+ docElem = doc.documentElement;
+ parent = doc.defaultView;
+
+ // Support: IE>8
+ // If iframe document is assigned to "document" variable and if iframe has been reloaded,
+ // IE will throw "permission denied" error when accessing "document" variable, see jQuery #13936
+ // IE6-8 do not support the defaultView property so parent will be undefined
+ if ( parent && parent !== parent.top ) {
+ // IE11 does not have attachEvent, so all must suffer
+ if ( parent.addEventListener ) {
+ parent.addEventListener( "unload", unloadHandler, false );
+ } else if ( parent.attachEvent ) {
+ parent.attachEvent( "onunload", unloadHandler );
+ }
+ }
+
+ /* Support tests
+ ---------------------------------------------------------------------- */
+ documentIsHTML = !isXML( doc );
+
+ /* Attributes
+ ---------------------------------------------------------------------- */
+
+ // Support: IE<8
+ // Verify that getAttribute really returns attributes and not properties
+ // (excepting IE8 booleans)
+ support.attributes = assert(function( div ) {
+ div.className = "i";
+ return !div.getAttribute("className");
+ });
+
+ /* getElement(s)By*
+ ---------------------------------------------------------------------- */
+
+ // Check if getElementsByTagName("*") returns only elements
+ support.getElementsByTagName = assert(function( div ) {
+ div.appendChild( doc.createComment("") );
+ return !div.getElementsByTagName("*").length;
+ });
+
+ // Support: IE<9
+ support.getElementsByClassName = rnative.test( doc.getElementsByClassName );
+
+ // Support: IE<10
+ // Check if getElementById returns elements by name
+ // The broken getElementById methods don't pick up programatically-set names,
+ // so use a roundabout getElementsByName test
+ support.getById = assert(function( div ) {
+ docElem.appendChild( div ).id = expando;
+ return !doc.getElementsByName || !doc.getElementsByName( expando ).length;
+ });
+
+ // ID find and filter
+ if ( support.getById ) {
+ Expr.find["ID"] = function( id, context ) {
+ if ( typeof context.getElementById !== "undefined" && documentIsHTML ) {
+ var m = context.getElementById( id );
+ // Check parentNode to catch when Blackberry 4.6 returns
+ // nodes that are no longer in the document #6963
+ return m && m.parentNode ? [ m ] : [];
+ }
+ };
+ Expr.filter["ID"] = function( id ) {
+ var attrId = id.replace( runescape, funescape );
+ return function( elem ) {
+ return elem.getAttribute("id") === attrId;
+ };
+ };
+ } else {
+ // Support: IE6/7
+ // getElementById is not reliable as a find shortcut
+ delete Expr.find["ID"];
+
+ Expr.filter["ID"] = function( id ) {
+ var attrId = id.replace( runescape, funescape );
+ return function( elem ) {
+ var node = typeof elem.getAttributeNode !== "undefined" && elem.getAttributeNode("id");
+ return node && node.value === attrId;
+ };
+ };
+ }
+
+ // Tag
+ Expr.find["TAG"] = support.getElementsByTagName ?
+ function( tag, context ) {
+ if ( typeof context.getElementsByTagName !== "undefined" ) {
+ return context.getElementsByTagName( tag );
+
+ // DocumentFragment nodes don't have gEBTN
+ } else if ( support.qsa ) {
+ return context.querySelectorAll( tag );
+ }
+ } :
+
+ function( tag, context ) {
+ var elem,
+ tmp = [],
+ i = 0,
+ // By happy coincidence, a (broken) gEBTN appears on DocumentFragment nodes too
+ results = context.getElementsByTagName( tag );
+
+ // Filter out possible comments
+ if ( tag === "*" ) {
+ while ( (elem = results[i++]) ) {
+ if ( elem.nodeType === 1 ) {
+ tmp.push( elem );
+ }
+ }
+
+ return tmp;
+ }
+ return results;
+ };
+
+ // Class
+ Expr.find["CLASS"] = support.getElementsByClassName && function( className, context ) {
+ if ( documentIsHTML ) {
+ return context.getElementsByClassName( className );
+ }
+ };
+
+ /* QSA/matchesSelector
+ ---------------------------------------------------------------------- */
+
+ // QSA and matchesSelector support
+
+ // matchesSelector(:active) reports false when true (IE9/Opera 11.5)
+ rbuggyMatches = [];
+
+ // qSa(:focus) reports false when true (Chrome 21)
+ // We allow this because of a bug in IE8/9 that throws an error
+ // whenever `document.activeElement` is accessed on an iframe
+ // So, we allow :focus to pass through QSA all the time to avoid the IE error
+ // See http://bugs.jquery.com/ticket/13378
+ rbuggyQSA = [];
+
+ if ( (support.qsa = rnative.test( doc.querySelectorAll )) ) {
+ // Build QSA regex
+ // Regex strategy adopted from Diego Perini
+ assert(function( div ) {
+ // Select is set to empty string on purpose
+ // This is to test IE's treatment of not explicitly
+ // setting a boolean content attribute,
+ // since its presence should be enough
+ // http://bugs.jquery.com/ticket/12359
+ docElem.appendChild( div ).innerHTML = "<a id='" + expando + "'></a>" +
+ "<select id='" + expando + "-\f]' msallowcapture=''>" +
+ "<option selected=''></option></select>";
+
+ // Support: IE8, Opera 11-12.16
+ // Nothing should be selected when empty strings follow ^= or $= or *=
+ // The test attribute must be unknown in Opera but "safe" for WinRT
+ // http://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section
+ if ( div.querySelectorAll("[msallowcapture^='']").length ) {
+ rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" );
+ }
+
+ // Support: IE8
+ // Boolean attributes and "value" are not treated correctly
+ if ( !div.querySelectorAll("[selected]").length ) {
+ rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" );
+ }
+
+ // Support: Chrome<29, Android<4.2+, Safari<7.0+, iOS<7.0+, PhantomJS<1.9.7+
+ if ( !div.querySelectorAll( "[id~=" + expando + "-]" ).length ) {
+ rbuggyQSA.push("~=");
+ }
+
+ // Webkit/Opera - :checked should return selected option elements
+ // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
+ // IE8 throws error here and will not see later tests
+ if ( !div.querySelectorAll(":checked").length ) {
+ rbuggyQSA.push(":checked");
+ }
+
+ // Support: Safari 8+, iOS 8+
+ // https://bugs.webkit.org/show_bug.cgi?id=136851
+ // In-page `selector#id sibing-combinator selector` fails
+ if ( !div.querySelectorAll( "a#" + expando + "+*" ).length ) {
+ rbuggyQSA.push(".#.+[+~]");
+ }
+ });
+
+ assert(function( div ) {
+ // Support: Windows 8 Native Apps
+ // The type and name attributes are restricted during .innerHTML assignment
+ var input = doc.createElement("input");
+ input.setAttribute( "type", "hidden" );
+ div.appendChild( input ).setAttribute( "name", "D" );
+
+ // Support: IE8
+ // Enforce case-sensitivity of name attribute
+ if ( div.querySelectorAll("[name=d]").length ) {
+ rbuggyQSA.push( "name" + whitespace + "*[*^$|!~]?=" );
+ }
+
+ // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled)
+ // IE8 throws error here and will not see later tests
+ if ( !div.querySelectorAll(":enabled").length ) {
+ rbuggyQSA.push( ":enabled", ":disabled" );
+ }
+
+ // Opera 10-11 does not throw on post-comma invalid pseudos
+ div.querySelectorAll("*,:x");
+ rbuggyQSA.push(",.*:");
+ });
+ }
+
+ if ( (support.matchesSelector = rnative.test( (matches = docElem.matches ||
+ docElem.webkitMatchesSelector ||
+ docElem.mozMatchesSelector ||
+ docElem.oMatchesSelector ||
+ docElem.msMatchesSelector) )) ) {
+
+ assert(function( div ) {
+ // Check to see if it's possible to do matchesSelector
+ // on a disconnected node (IE 9)
+ support.disconnectedMatch = matches.call( div, "div" );
+
+ // This should fail with an exception
+ // Gecko does not error, returns false instead
+ matches.call( div, "[s!='']:x" );
+ rbuggyMatches.push( "!=", pseudos );
+ });
+ }
+
+ rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join("|") );
+ rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join("|") );
+
+ /* Contains
+ ---------------------------------------------------------------------- */
+ hasCompare = rnative.test( docElem.compareDocumentPosition );
+
+ // Element contains another
+ // Purposefully does not implement inclusive descendent
+ // As in, an element does not contain itself
+ contains = hasCompare || rnative.test( docElem.contains ) ?
+ function( a, b ) {
+ var adown = a.nodeType === 9 ? a.documentElement : a,
+ bup = b && b.parentNode;
+ return a === bup || !!( bup && bup.nodeType === 1 && (
+ adown.contains ?
+ adown.contains( bup ) :
+ a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16
+ ));
+ } :
+ function( a, b ) {
+ if ( b ) {
+ while ( (b = b.parentNode) ) {
+ if ( b === a ) {
+ return true;
+ }
+ }
+ }
+ return false;
+ };
+
+ /* Sorting
+ ---------------------------------------------------------------------- */
+
+ // Document order sorting
+ sortOrder = hasCompare ?
+ function( a, b ) {
+
+ // Flag for duplicate removal
+ if ( a === b ) {
+ hasDuplicate = true;
+ return 0;
+ }
+
+ // Sort on method existence if only one input has compareDocumentPosition
+ var compare = !a.compareDocumentPosition - !b.compareDocumentPosition;
+ if ( compare ) {
+ return compare;
+ }
+
+ // Calculate position if both inputs belong to the same document
+ compare = ( a.ownerDocument || a ) === ( b.ownerDocument || b ) ?
+ a.compareDocumentPosition( b ) :
+
+ // Otherwise we know they are disconnected
+ 1;
+
+ // Disconnected nodes
+ if ( compare & 1 ||
+ (!support.sortDetached && b.compareDocumentPosition( a ) === compare) ) {
+
+ // Choose the first element that is related to our preferred document
+ if ( a === doc || a.ownerDocument === preferredDoc && contains(preferredDoc, a) ) {
+ return -1;
+ }
+ if ( b === doc || b.ownerDocument === preferredDoc && contains(preferredDoc, b) ) {
+ return 1;
+ }
+
+ // Maintain original order
+ return sortInput ?
+ ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) :
+ 0;
+ }
+
+ return compare & 4 ? -1 : 1;
+ } :
+ function( a, b ) {
+ // Exit early if the nodes are identical
+ if ( a === b ) {
+ hasDuplicate = true;
+ return 0;
+ }
+
+ var cur,
+ i = 0,
+ aup = a.parentNode,
+ bup = b.parentNode,
+ ap = [ a ],
+ bp = [ b ];
+
+ // Parentless nodes are either documents or disconnected
+ if ( !aup || !bup ) {
+ return a === doc ? -1 :
+ b === doc ? 1 :
+ aup ? -1 :
+ bup ? 1 :
+ sortInput ?
+ ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) :
+ 0;
+
+ // If the nodes are siblings, we can do a quick check
+ } else if ( aup === bup ) {
+ return siblingCheck( a, b );
+ }
+
+ // Otherwise we need full lists of their ancestors for comparison
+ cur = a;
+ while ( (cur = cur.parentNode) ) {
+ ap.unshift( cur );
+ }
+ cur = b;
+ while ( (cur = cur.parentNode) ) {
+ bp.unshift( cur );
+ }
+
+ // Walk down the tree looking for a discrepancy
+ while ( ap[i] === bp[i] ) {
+ i++;
+ }
+
+ return i ?
+ // Do a sibling check if the nodes have a common ancestor
+ siblingCheck( ap[i], bp[i] ) :
+
+ // Otherwise nodes in our document sort first
+ ap[i] === preferredDoc ? -1 :
+ bp[i] === preferredDoc ? 1 :
+ 0;
+ };
+
+ return doc;
+};
+
+Sizzle.matches = function( expr, elements ) {
+ return Sizzle( expr, null, null, elements );
+};
+
+Sizzle.matchesSelector = function( elem, expr ) {
+ // Set document vars if needed
+ if ( ( elem.ownerDocument || elem ) !== document ) {
+ setDocument( elem );
+ }
+
+ // Make sure that attribute selectors are quoted
+ expr = expr.replace( rattributeQuotes, "='$1']" );
+
+ if ( support.matchesSelector && documentIsHTML &&
+ ( !rbuggyMatches || !rbuggyMatches.test( expr ) ) &&
+ ( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) {
+
+ try {
+ var ret = matches.call( elem, expr );
+
+ // IE 9's matchesSelector returns false on disconnected nodes
+ if ( ret || support.disconnectedMatch ||
+ // As well, disconnected nodes are said to be in a document
+ // fragment in IE 9
+ elem.document && elem.document.nodeType !== 11 ) {
+ return ret;
+ }
+ } catch (e) {}
+ }
+
+ return Sizzle( expr, document, null, [ elem ] ).length > 0;
+};
+
+Sizzle.contains = function( context, elem ) {
+ // Set document vars if needed
+ if ( ( context.ownerDocument || context ) !== document ) {
+ setDocument( context );
+ }
+ return contains( context, elem );
+};
+
+Sizzle.attr = function( elem, name ) {
+ // Set document vars if needed
+ if ( ( elem.ownerDocument || elem ) !== document ) {
+ setDocument( elem );
+ }
+
+ var fn = Expr.attrHandle[ name.toLowerCase() ],
+ // Don't get fooled by Object.prototype properties (jQuery #13807)
+ val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ?
+ fn( elem, name, !documentIsHTML ) :
+ undefined;
+
+ return val !== undefined ?
+ val :
+ support.attributes || !documentIsHTML ?
+ elem.getAttribute( name ) :
+ (val = elem.getAttributeNode(name)) && val.specified ?
+ val.value :
+ null;
+};
+
+Sizzle.error = function( msg ) {
+ throw new Error( "Syntax error, unrecognized expression: " + msg );
+};
+
+/**
+ * Document sorting and removing duplicates
+ * @param {ArrayLike} results
+ */
+Sizzle.uniqueSort = function( results ) {
+ var elem,
+ duplicates = [],
+ j = 0,
+ i = 0;
+
+ // Unless we *know* we can detect duplicates, assume their presence
+ hasDuplicate = !support.detectDuplicates;
+ sortInput = !support.sortStable && results.slice( 0 );
+ results.sort( sortOrder );
+
+ if ( hasDuplicate ) {
+ while ( (elem = results[i++]) ) {
+ if ( elem === results[ i ] ) {
+ j = duplicates.push( i );
+ }
+ }
+ while ( j-- ) {
+ results.splice( duplicates[ j ], 1 );
+ }
+ }
+
+ // Clear input after sorting to release objects
+ // See https://github.com/jquery/sizzle/pull/225
+ sortInput = null;
+
+ return results;
+};
+
+/**
+ * Utility function for retrieving the text value of an array of DOM nodes
+ * @param {Array|Element} elem
+ */
+getText = Sizzle.getText = function( elem ) {
+ var node,
+ ret = "",
+ i = 0,
+ nodeType = elem.nodeType;
+
+ if ( !nodeType ) {
+ // If no nodeType, this is expected to be an array
+ while ( (node = elem[i++]) ) {
+ // Do not traverse comment nodes
+ ret += getText( node );
+ }
+ } else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) {
+ // Use textContent for elements
+ // innerText usage removed for consistency of new lines (jQuery #11153)
+ if ( typeof elem.textContent === "string" ) {
+ return elem.textContent;
+ } else {
+ // Traverse its children
+ for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
+ ret += getText( elem );
+ }
+ }
+ } else if ( nodeType === 3 || nodeType === 4 ) {
+ return elem.nodeValue;
+ }
+ // Do not include comment or processing instruction nodes
+
+ return ret;
+};
+
+Expr = Sizzle.selectors = {
+
+ // Can be adjusted by the user
+ cacheLength: 50,
+
+ createPseudo: markFunction,
+
+ match: matchExpr,
+
+ attrHandle: {},
+
+ find: {},
+
+ relative: {
+ ">": { dir: "parentNode", first: true },
+ " ": { dir: "parentNode" },
+ "+": { dir: "previousSibling", first: true },
+ "~": { dir: "previousSibling" }
+ },
+
+ preFilter: {
+ "ATTR": function( match ) {
+ match[1] = match[1].replace( runescape, funescape );
+
+ // Move the given value to match[3] whether quoted or unquoted
+ match[3] = ( match[3] || match[4] || match[5] || "" ).replace( runescape, funescape );
+
+ if ( match[2] === "~=" ) {
+ match[3] = " " + match[3] + " ";
+ }
+
+ return match.slice( 0, 4 );
+ },
+
+ "CHILD": function( match ) {
+ /* matches from matchExpr["CHILD"]
+ 1 type (only|nth|...)
+ 2 what (child|of-type)
+ 3 argument (even|odd|\d*|\d*n([+-]\d+)?|...)
+ 4 xn-component of xn+y argument ([+-]?\d*n|)
+ 5 sign of xn-component
+ 6 x of xn-component
+ 7 sign of y-component
+ 8 y of y-component
+ */
+ match[1] = match[1].toLowerCase();
+
+ if ( match[1].slice( 0, 3 ) === "nth" ) {
+ // nth-* requires argument
+ if ( !match[3] ) {
+ Sizzle.error( match[0] );
+ }
+
+ // numeric x and y parameters for Expr.filter.CHILD
+ // remember that false/true cast respectively to 0/1
+ match[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === "even" || match[3] === "odd" ) );
+ match[5] = +( ( match[7] + match[8] ) || match[3] === "odd" );
+
+ // other types prohibit arguments
+ } else if ( match[3] ) {
+ Sizzle.error( match[0] );
+ }
+
+ return match;
+ },
+
+ "PSEUDO": function( match ) {
+ var excess,
+ unquoted = !match[6] && match[2];
+
+ if ( matchExpr["CHILD"].test( match[0] ) ) {
+ return null;
+ }
+
+ // Accept quoted arguments as-is
+ if ( match[3] ) {
+ match[2] = match[4] || match[5] || "";
+
+ // Strip excess characters from unquoted arguments
+ } else if ( unquoted && rpseudo.test( unquoted ) &&
+ // Get excess from tokenize (recursively)
+ (excess = tokenize( unquoted, true )) &&
+ // advance to the next closing parenthesis
+ (excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) {
+
+ // excess is a negative index
+ match[0] = match[0].slice( 0, excess );
+ match[2] = unquoted.slice( 0, excess );
+ }
+
+ // Return only captures needed by the pseudo filter method (type and argument)
+ return match.slice( 0, 3 );
+ }
+ },
+
+ filter: {
+
+ "TAG": function( nodeNameSelector ) {
+ var nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase();
+ return nodeNameSelector === "*" ?
+ function() { return true; } :
+ function( elem ) {
+ return elem.nodeName && elem.nodeName.toLowerCase() === nodeName;
+ };
+ },
+
+ "CLASS": function( className ) {
+ var pattern = classCache[ className + " " ];
+
+ return pattern ||
+ (pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" )) &&
+ classCache( className, function( elem ) {
+ return pattern.test( typeof elem.className === "string" && elem.className || typeof elem.getAttribute !== "undefined" && elem.getAttribute("class") || "" );
+ });
+ },
+
+ "ATTR": function( name, operator, check ) {
+ return function( elem ) {
+ var result = Sizzle.attr( elem, name );
+
+ if ( result == null ) {
+ return operator === "!=";
+ }
+ if ( !operator ) {
+ return true;
+ }
+
+ result += "";
+
+ return operator === "=" ? result === check :
+ operator === "!=" ? result !== check :
+ operator === "^=" ? check && result.indexOf( check ) === 0 :
+ operator === "*=" ? check && result.indexOf( check ) > -1 :
+ operator === "$=" ? check && result.slice( -check.length ) === check :
+ operator === "~=" ? ( " " + result.replace( rwhitespace, " " ) + " " ).indexOf( check ) > -1 :
+ operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" :
+ false;
+ };
+ },
+
+ "CHILD": function( type, what, argument, first, last ) {
+ var simple = type.slice( 0, 3 ) !== "nth",
+ forward = type.slice( -4 ) !== "last",
+ ofType = what === "of-type";
+
+ return first === 1 && last === 0 ?
+
+ // Shortcut for :nth-*(n)
+ function( elem ) {
+ return !!elem.parentNode;
+ } :
+
+ function( elem, context, xml ) {
+ var cache, outerCache, node, diff, nodeIndex, start,
+ dir = simple !== forward ? "nextSibling" : "previousSibling",
+ parent = elem.parentNode,
+ name = ofType && elem.nodeName.toLowerCase(),
+ useCache = !xml && !ofType;
+
+ if ( parent ) {
+
+ // :(first|last|only)-(child|of-type)
+ if ( simple ) {
+ while ( dir ) {
+ node = elem;
+ while ( (node = node[ dir ]) ) {
+ if ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) {
+ return false;
+ }
+ }
+ // Reverse direction for :only-* (if we haven't yet done so)
+ start = dir = type === "only" && !start && "nextSibling";
+ }
+ return true;
+ }
+
+ start = [ forward ? parent.firstChild : parent.lastChild ];
+
+ // non-xml :nth-child(...) stores cache data on `parent`
+ if ( forward && useCache ) {
+ // Seek `elem` from a previously-cached index
+ outerCache = parent[ expando ] || (parent[ expando ] = {});
+ cache = outerCache[ type ] || [];
+ nodeIndex = cache[0] === dirruns && cache[1];
+ diff = cache[0] === dirruns && cache[2];
+ node = nodeIndex && parent.childNodes[ nodeIndex ];
+
+ while ( (node = ++nodeIndex && node && node[ dir ] ||
+
+ // Fallback to seeking `elem` from the start
+ (diff = nodeIndex = 0) || start.pop()) ) {
+
+ // When found, cache indexes on `parent` and break
+ if ( node.nodeType === 1 && ++diff && node === elem ) {
+ outerCache[ type ] = [ dirruns, nodeIndex, diff ];
+ break;
+ }
+ }
+
+ // Use previously-cached element index if available
+ } else if ( useCache && (cache = (elem[ expando ] || (elem[ expando ] = {}))[ type ]) && cache[0] === dirruns ) {
+ diff = cache[1];
+
+ // xml :nth-child(...) or :nth-last-child(...) or :nth(-last)?-of-type(...)
+ } else {
+ // Use the same loop as above to seek `elem` from the start
+ while ( (node = ++nodeIndex && node && node[ dir ] ||
+ (diff = nodeIndex = 0) || start.pop()) ) {
+
+ if ( ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) && ++diff ) {
+ // Cache the index of each encountered element
+ if ( useCache ) {
+ (node[ expando ] || (node[ expando ] = {}))[ type ] = [ dirruns, diff ];
+ }
+
+ if ( node === elem ) {
+ break;
+ }
+ }
+ }
+ }
+
+ // Incorporate the offset, then check against cycle size
+ diff -= last;
+ return diff === first || ( diff % first === 0 && diff / first >= 0 );
+ }
+ };
+ },
+
+ "PSEUDO": function( pseudo, argument ) {
+ // pseudo-class names are case-insensitive
+ // http://www.w3.org/TR/selectors/#pseudo-classes
+ // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters
+ // Remember that setFilters inherits from pseudos
+ var args,
+ fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] ||
+ Sizzle.error( "unsupported pseudo: " + pseudo );
+
+ // The user may use createPseudo to indicate that
+ // arguments are needed to create the filter function
+ // just as Sizzle does
+ if ( fn[ expando ] ) {
+ return fn( argument );
+ }
+
+ // But maintain support for old signatures
+ if ( fn.length > 1 ) {
+ args = [ pseudo, pseudo, "", argument ];
+ return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ?
+ markFunction(function( seed, matches ) {
+ var idx,
+ matched = fn( seed, argument ),
+ i = matched.length;
+ while ( i-- ) {
+ idx = indexOf( seed, matched[i] );
+ seed[ idx ] = !( matches[ idx ] = matched[i] );
+ }
+ }) :
+ function( elem ) {
+ return fn( elem, 0, args );
+ };
+ }
+
+ return fn;
+ }
+ },
+
+ pseudos: {
+ // Potentially complex pseudos
+ "not": markFunction(function( selector ) {
+ // Trim the selector passed to compile
+ // to avoid treating leading and trailing
+ // spaces as combinators
+ var input = [],
+ results = [],
+ matcher = compile( selector.replace( rtrim, "$1" ) );
+
+ return matcher[ expando ] ?
+ markFunction(function( seed, matches, context, xml ) {
+ var elem,
+ unmatched = matcher( seed, null, xml, [] ),
+ i = seed.length;
+
+ // Match elements unmatched by `matcher`
+ while ( i-- ) {
+ if ( (elem = unmatched[i]) ) {
+ seed[i] = !(matches[i] = elem);
+ }
+ }
+ }) :
+ function( elem, context, xml ) {
+ input[0] = elem;
+ matcher( input, null, xml, results );
+ // Don't keep the element (issue #299)
+ input[0] = null;
+ return !results.pop();
+ };
+ }),
+
+ "has": markFunction(function( selector ) {
+ return function( elem ) {
+ return Sizzle( selector, elem ).length > 0;
+ };
+ }),
+
+ "contains": markFunction(function( text ) {
+ text = text.replace( runescape, funescape );
+ return function( elem ) {
+ return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1;
+ };
+ }),
+
+ // "Whether an element is represented by a :lang() selector
+ // is based solely on the element's language value
+ // being equal to the identifier C,
+ // or beginning with the identifier C immediately followed by "-".
+ // The matching of C against the element's language value is performed case-insensitively.
+ // The identifier C does not have to be a valid language name."
+ // http://www.w3.org/TR/selectors/#lang-pseudo
+ "lang": markFunction( function( lang ) {
+ // lang value must be a valid identifier
+ if ( !ridentifier.test(lang || "") ) {
+ Sizzle.error( "unsupported lang: " + lang );
+ }
+ lang = lang.replace( runescape, funescape ).toLowerCase();
+ return function( elem ) {
+ var elemLang;
+ do {
+ if ( (elemLang = documentIsHTML ?
+ elem.lang :
+ elem.getAttribute("xml:lang") || elem.getAttribute("lang")) ) {
+
+ elemLang = elemLang.toLowerCase();
+ return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0;
+ }
+ } while ( (elem = elem.parentNode) && elem.nodeType === 1 );
+ return false;
+ };
+ }),
+
+ // Miscellaneous
+ "target": function( elem ) {
+ var hash = window.location && window.location.hash;
+ return hash && hash.slice( 1 ) === elem.id;
+ },
+
+ "root": function( elem ) {
+ return elem === docElem;
+ },
+
+ "focus": function( elem ) {
+ return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex);
+ },
+
+ // Boolean properties
+ "enabled": function( elem ) {
+ return elem.disabled === false;
+ },
+
+ "disabled": function( elem ) {
+ return elem.disabled === true;
+ },
+
+ "checked": function( elem ) {
+ // In CSS3, :checked should return both checked and selected elements
+ // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
+ var nodeName = elem.nodeName.toLowerCase();
+ return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected);
+ },
+
+ "selected": function( elem ) {
+ // Accessing this property makes selected-by-default
+ // options in Safari work properly
+ if ( elem.parentNode ) {
+ elem.parentNode.selectedIndex;
+ }
+
+ return elem.selected === true;
+ },
+
+ // Contents
+ "empty": function( elem ) {
+ // http://www.w3.org/TR/selectors/#empty-pseudo
+ // :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5),
+ // but not by others (comment: 8; processing instruction: 7; etc.)
+ // nodeType < 6 works because attributes (2) do not appear as children
+ for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
+ if ( elem.nodeType < 6 ) {
+ return false;
+ }
+ }
+ return true;
+ },
+
+ "parent": function( elem ) {
+ return !Expr.pseudos["empty"]( elem );
+ },
+
+ // Element/input types
+ "header": function( elem ) {
+ return rheader.test( elem.nodeName );
+ },
+
+ "input": function( elem ) {
+ return rinputs.test( elem.nodeName );
+ },
+
+ "button": function( elem ) {
+ var name = elem.nodeName.toLowerCase();
+ return name === "input" && elem.type === "button" || name === "button";
+ },
+
+ "text": function( elem ) {
+ var attr;
+ return elem.nodeName.toLowerCase() === "input" &&
+ elem.type === "text" &&
+
+ // Support: IE<8
+ // New HTML5 attribute values (e.g., "search") appear with elem.type === "text"
+ ( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === "text" );
+ },
+
+ // Position-in-collection
+ "first": createPositionalPseudo(function() {
+ return [ 0 ];
+ }),
+
+ "last": createPositionalPseudo(function( matchIndexes, length ) {
+ return [ length - 1 ];
+ }),
+
+ "eq": createPositionalPseudo(function( matchIndexes, length, argument ) {
+ return [ argument < 0 ? argument + length : argument ];
+ }),
+
+ "even": createPositionalPseudo(function( matchIndexes, length ) {
+ var i = 0;
+ for ( ; i < length; i += 2 ) {
+ matchIndexes.push( i );
+ }
+ return matchIndexes;
+ }),
+
+ "odd": createPositionalPseudo(function( matchIndexes, length ) {
+ var i = 1;
+ for ( ; i < length; i += 2 ) {
+ matchIndexes.push( i );
+ }
+ return matchIndexes;
+ }),
+
+ "lt": createPositionalPseudo(function( matchIndexes, length, argument ) {
+ var i = argument < 0 ? argument + length : argument;
+ for ( ; --i >= 0; ) {
+ matchIndexes.push( i );
+ }
+ return matchIndexes;
+ }),
+
+ "gt": createPositionalPseudo(function( matchIndexes, length, argument ) {
+ var i = argument < 0 ? argument + length : argument;
+ for ( ; ++i < length; ) {
+ matchIndexes.push( i );
+ }
+ return matchIndexes;
+ })
+ }
+};
+
+Expr.pseudos["nth"] = Expr.pseudos["eq"];
+
+// Add button/input type pseudos
+for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) {
+ Expr.pseudos[ i ] = createInputPseudo( i );
+}
+for ( i in { submit: true, reset: true } ) {
+ Expr.pseudos[ i ] = createButtonPseudo( i );
+}
+
+// Easy API for creating new setFilters
+function setFilters() {}
+setFilters.prototype = Expr.filters = Expr.pseudos;
+Expr.setFilters = new setFilters();
+
+tokenize = Sizzle.tokenize = function( selector, parseOnly ) {
+ var matched, match, tokens, type,
+ soFar, groups, preFilters,
+ cached = tokenCache[ selector + " " ];
+
+ if ( cached ) {
+ return parseOnly ? 0 : cached.slice( 0 );
+ }
+
+ soFar = selector;
+ groups = [];
+ preFilters = Expr.preFilter;
+
+ while ( soFar ) {
+
+ // Comma and first run
+ if ( !matched || (match = rcomma.exec( soFar )) ) {
+ if ( match ) {
+ // Don't consume trailing commas as valid
+ soFar = soFar.slice( match[0].length ) || soFar;
+ }
+ groups.push( (tokens = []) );
+ }
+
+ matched = false;
+
+ // Combinators
+ if ( (match = rcombinators.exec( soFar )) ) {
+ matched = match.shift();
+ tokens.push({
+ value: matched,
+ // Cast descendant combinators to space
+ type: match[0].replace( rtrim, " " )
+ });
+ soFar = soFar.slice( matched.length );
+ }
+
+ // Filters
+ for ( type in Expr.filter ) {
+ if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] ||
+ (match = preFilters[ type ]( match ))) ) {
+ matched = match.shift();
+ tokens.push({
+ value: matched,
+ type: type,
+ matches: match
+ });
+ soFar = soFar.slice( matched.length );
+ }
+ }
+
+ if ( !matched ) {
+ break;
+ }
+ }
+
+ // Return the length of the invalid excess
+ // if we're just parsing
+ // Otherwise, throw an error or return tokens
+ return parseOnly ?
+ soFar.length :
+ soFar ?
+ Sizzle.error( selector ) :
+ // Cache the tokens
+ tokenCache( selector, groups ).slice( 0 );
+};
+
+function toSelector( tokens ) {
+ var i = 0,
+ len = tokens.length,
+ selector = "";
+ for ( ; i < len; i++ ) {
+ selector += tokens[i].value;
+ }
+ return selector;
+}
+
+function addCombinator( matcher, combinator, base ) {
+ var dir = combinator.dir,
+ checkNonElements = base && dir === "parentNode",
+ doneName = done++;
+
+ return combinator.first ?
+ // Check against closest ancestor/preceding element
+ function( elem, context, xml ) {
+ while ( (elem = elem[ dir ]) ) {
+ if ( elem.nodeType === 1 || checkNonElements ) {
+ return matcher( elem, context, xml );
+ }
+ }
+ } :
+
+ // Check against all ancestor/preceding elements
+ function( elem, context, xml ) {
+ var oldCache, outerCache,
+ newCache = [ dirruns, doneName ];
+
+ // We can't set arbitrary data on XML nodes, so they don't benefit from dir caching
+ if ( xml ) {
+ while ( (elem = elem[ dir ]) ) {
+ if ( elem.nodeType === 1 || checkNonElements ) {
+ if ( matcher( elem, context, xml ) ) {
+ return true;
+ }
+ }
+ }
+ } else {
+ while ( (elem = elem[ dir ]) ) {
+ if ( elem.nodeType === 1 || checkNonElements ) {
+ outerCache = elem[ expando ] || (elem[ expando ] = {});
+ if ( (oldCache = outerCache[ dir ]) &&
+ oldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) {
+
+ // Assign to newCache so results back-propagate to previous elements
+ return (newCache[ 2 ] = oldCache[ 2 ]);
+ } else {
+ // Reuse newcache so results back-propagate to previous elements
+ outerCache[ dir ] = newCache;
+
+ // A match means we're done; a fail means we have to keep checking
+ if ( (newCache[ 2 ] = matcher( elem, context, xml )) ) {
+ return true;
+ }
+ }
+ }
+ }
+ }
+ };
+}
+
+function elementMatcher( matchers ) {
+ return matchers.length > 1 ?
+ function( elem, context, xml ) {
+ var i = matchers.length;
+ while ( i-- ) {
+ if ( !matchers[i]( elem, context, xml ) ) {
+ return false;
+ }
+ }
+ return true;
+ } :
+ matchers[0];
+}
+
+function multipleContexts( selector, contexts, results ) {
+ var i = 0,
+ len = contexts.length;
+ for ( ; i < len; i++ ) {
+ Sizzle( selector, contexts[i], results );
+ }
+ return results;
+}
+
+function condense( unmatched, map, filter, context, xml ) {
+ var elem,
+ newUnmatched = [],
+ i = 0,
+ len = unmatched.length,
+ mapped = map != null;
+
+ for ( ; i < len; i++ ) {
+ if ( (elem = unmatched[i]) ) {
+ if ( !filter || filter( elem, context, xml ) ) {
+ newUnmatched.push( elem );
+ if ( mapped ) {
+ map.push( i );
+ }
+ }
+ }
+ }
+
+ return newUnmatched;
+}
+
+function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {
+ if ( postFilter && !postFilter[ expando ] ) {
+ postFilter = setMatcher( postFilter );
+ }
+ if ( postFinder && !postFinder[ expando ] ) {
+ postFinder = setMatcher( postFinder, postSelector );
+ }
+ return markFunction(function( seed, results, context, xml ) {
+ var temp, i, elem,
+ preMap = [],
+ postMap = [],
+ preexisting = results.length,
+
+ // Get initial elements from seed or context
+ elems = seed || multipleContexts( selector || "*", context.nodeType ? [ context ] : context, [] ),
+
+ // Prefilter to get matcher input, preserving a map for seed-results synchronization
+ matcherIn = preFilter && ( seed || !selector ) ?
+ condense( elems, preMap, preFilter, context, xml ) :
+ elems,
+
+ matcherOut = matcher ?
+ // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results,
+ postFinder || ( seed ? preFilter : preexisting || postFilter ) ?
+
+ // ...intermediate processing is necessary
+ [] :
+
+ // ...otherwise use results directly
+ results :
+ matcherIn;
+
+ // Find primary matches
+ if ( matcher ) {
+ matcher( matcherIn, matcherOut, context, xml );
+ }
+
+ // Apply postFilter
+ if ( postFilter ) {
+ temp = condense( matcherOut, postMap );
+ postFilter( temp, [], context, xml );
+
+ // Un-match failing elements by moving them back to matcherIn
+ i = temp.length;
+ while ( i-- ) {
+ if ( (elem = temp[i]) ) {
+ matcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem);
+ }
+ }
+ }
+
+ if ( seed ) {
+ if ( postFinder || preFilter ) {
+ if ( postFinder ) {
+ // Get the final matcherOut by condensing this intermediate into postFinder contexts
+ temp = [];
+ i = matcherOut.length;
+ while ( i-- ) {
+ if ( (elem = matcherOut[i]) ) {
+ // Restore matcherIn since elem is not yet a final match
+ temp.push( (matcherIn[i] = elem) );
+ }
+ }
+ postFinder( null, (matcherOut = []), temp, xml );
+ }
+
+ // Move matched elements from seed to results to keep them synchronized
+ i = matcherOut.length;
+ while ( i-- ) {
+ if ( (elem = matcherOut[i]) &&
+ (temp = postFinder ? indexOf( seed, elem ) : preMap[i]) > -1 ) {
+
+ seed[temp] = !(results[temp] = elem);
+ }
+ }
+ }
+
+ // Add elements to results, through postFinder if defined
+ } else {
+ matcherOut = condense(
+ matcherOut === results ?
+ matcherOut.splice( preexisting, matcherOut.length ) :
+ matcherOut
+ );
+ if ( postFinder ) {
+ postFinder( null, results, matcherOut, xml );
+ } else {
+ push.apply( results, matcherOut );
+ }
+ }
+ });
+}
+
+function matcherFromTokens( tokens ) {
+ var checkContext, matcher, j,
+ len = tokens.length,
+ leadingRelative = Expr.relative[ tokens[0].type ],
+ implicitRelative = leadingRelative || Expr.relative[" "],
+ i = leadingRelative ? 1 : 0,
+
+ // The foundational matcher ensures that elements are reachable from top-level context(s)
+ matchContext = addCombinator( function( elem ) {
+ return elem === checkContext;
+ }, implicitRelative, true ),
+ matchAnyContext = addCombinator( function( elem ) {
+ return indexOf( checkContext, elem ) > -1;
+ }, implicitRelative, true ),
+ matchers = [ function( elem, context, xml ) {
+ var ret = ( !leadingRelative && ( xml || context !== outermostContext ) ) || (
+ (checkContext = context).nodeType ?
+ matchContext( elem, context, xml ) :
+ matchAnyContext( elem, context, xml ) );
+ // Avoid hanging onto element (issue #299)
+ checkContext = null;
+ return ret;
+ } ];
+
+ for ( ; i < len; i++ ) {
+ if ( (matcher = Expr.relative[ tokens[i].type ]) ) {
+ matchers = [ addCombinator(elementMatcher( matchers ), matcher) ];
+ } else {
+ matcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches );
+
+ // Return special upon seeing a positional matcher
+ if ( matcher[ expando ] ) {
+ // Find the next relative operator (if any) for proper handling
+ j = ++i;
+ for ( ; j < len; j++ ) {
+ if ( Expr.relative[ tokens[j].type ] ) {
+ break;
+ }
+ }
+ return setMatcher(
+ i > 1 && elementMatcher( matchers ),
+ i > 1 && toSelector(
+ // If the preceding token was a descendant combinator, insert an implicit any-element `*`
+ tokens.slice( 0, i - 1 ).concat({ value: tokens[ i - 2 ].type === " " ? "*" : "" })
+ ).replace( rtrim, "$1" ),
+ matcher,
+ i < j && matcherFromTokens( tokens.slice( i, j ) ),
+ j < len && matcherFromTokens( (tokens = tokens.slice( j )) ),
+ j < len && toSelector( tokens )
+ );
+ }
+ matchers.push( matcher );
+ }
+ }
+
+ return elementMatcher( matchers );
+}
+
+function matcherFromGroupMatchers( elementMatchers, setMatchers ) {
+ var bySet = setMatchers.length > 0,
+ byElement = elementMatchers.length > 0,
+ superMatcher = function( seed, context, xml, results, outermost ) {
+ var elem, j, matcher,
+ matchedCount = 0,
+ i = "0",
+ unmatched = seed && [],
+ setMatched = [],
+ contextBackup = outermostContext,
+ // We must always have either seed elements or outermost context
+ elems = seed || byElement && Expr.find["TAG"]( "*", outermost ),
+ // Use integer dirruns iff this is the outermost matcher
+ dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1),
+ len = elems.length;
+
+ if ( outermost ) {
+ outermostContext = context !== document && context;
+ }
+
+ // Add elements passing elementMatchers directly to results
+ // Keep `i` a string if there are no elements so `matchedCount` will be "00" below
+ // Support: IE<9, Safari
+ // Tolerate NodeList properties (IE: "length"; Safari: <number>) matching elements by id
+ for ( ; i !== len && (elem = elems[i]) != null; i++ ) {
+ if ( byElement && elem ) {
+ j = 0;
+ while ( (matcher = elementMatchers[j++]) ) {
+ if ( matcher( elem, context, xml ) ) {
+ results.push( elem );
+ break;
+ }
+ }
+ if ( outermost ) {
+ dirruns = dirrunsUnique;
+ }
+ }
+
+ // Track unmatched elements for set filters
+ if ( bySet ) {
+ // They will have gone through all possible matchers
+ if ( (elem = !matcher && elem) ) {
+ matchedCount--;
+ }
+
+ // Lengthen the array for every element, matched or not
+ if ( seed ) {
+ unmatched.push( elem );
+ }
+ }
+ }
+
+ // Apply set filters to unmatched elements
+ matchedCount += i;
+ if ( bySet && i !== matchedCount ) {
+ j = 0;
+ while ( (matcher = setMatchers[j++]) ) {
+ matcher( unmatched, setMatched, context, xml );
+ }
+
+ if ( seed ) {
+ // Reintegrate element matches to eliminate the need for sorting
+ if ( matchedCount > 0 ) {
+ while ( i-- ) {
+ if ( !(unmatched[i] || setMatched[i]) ) {
+ setMatched[i] = pop.call( results );
+ }
+ }
+ }
+
+ // Discard index placeholder values to get only actual matches
+ setMatched = condense( setMatched );
+ }
+
+ // Add matches to results
+ push.apply( results, setMatched );
+
+ // Seedless set matches succeeding multiple successful matchers stipulate sorting
+ if ( outermost && !seed && setMatched.length > 0 &&
+ ( matchedCount + setMatchers.length ) > 1 ) {
+
+ Sizzle.uniqueSort( results );
+ }
+ }
+
+ // Override manipulation of globals by nested matchers
+ if ( outermost ) {
+ dirruns = dirrunsUnique;
+ outermostContext = contextBackup;
+ }
+
+ return unmatched;
+ };
+
+ return bySet ?
+ markFunction( superMatcher ) :
+ superMatcher;
+}
+
+compile = Sizzle.compile = function( selector, match /* Internal Use Only */ ) {
+ var i,
+ setMatchers = [],
+ elementMatchers = [],
+ cached = compilerCache[ selector + " " ];
+
+ if ( !cached ) {
+ // Generate a function of recursive functions that can be used to check each element
+ if ( !match ) {
+ match = tokenize( selector );
+ }
+ i = match.length;
+ while ( i-- ) {
+ cached = matcherFromTokens( match[i] );
+ if ( cached[ expando ] ) {
+ setMatchers.push( cached );
+ } else {
+ elementMatchers.push( cached );
+ }
+ }
+
+ // Cache the compiled function
+ cached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) );
+
+ // Save selector and tokenization
+ cached.selector = selector;
+ }
+ return cached;
+};
+
+/**
+ * A low-level selection function that works with Sizzle's compiled
+ * selector functions
+ * @param {String|Function} selector A selector or a pre-compiled
+ * selector function built with Sizzle.compile
+ * @param {Element} context
+ * @param {Array} [results]
+ * @param {Array} [seed] A set of elements to match against
+ */
+select = Sizzle.select = function( selector, context, results, seed ) {
+ var i, tokens, token, type, find,
+ compiled = typeof selector === "function" && selector,
+ match = !seed && tokenize( (selector = compiled.selector || selector) );
+
+ results = results || [];
+
+ // Try to minimize operations if there is no seed and only one group
+ if ( match.length === 1 ) {
+
+ // Take a shortcut and set the context if the root selector is an ID
+ tokens = match[0] = match[0].slice( 0 );
+ if ( tokens.length > 2 && (token = tokens[0]).type === "ID" &&
+ support.getById && context.nodeType === 9 && documentIsHTML &&
+ Expr.relative[ tokens[1].type ] ) {
+
+ context = ( Expr.find["ID"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0];
+ if ( !context ) {
+ return results;
+
+ // Precompiled matchers will still verify ancestry, so step up a level
+ } else if ( compiled ) {
+ context = context.parentNode;
+ }
+
+ selector = selector.slice( tokens.shift().value.length );
+ }
+
+ // Fetch a seed set for right-to-left matching
+ i = matchExpr["needsContext"].test( selector ) ? 0 : tokens.length;
+ while ( i-- ) {
+ token = tokens[i];
+
+ // Abort if we hit a combinator
+ if ( Expr.relative[ (type = token.type) ] ) {
+ break;
+ }
+ if ( (find = Expr.find[ type ]) ) {
+ // Search, expanding context for leading sibling combinators
+ if ( (seed = find(
+ token.matches[0].replace( runescape, funescape ),
+ rsibling.test( tokens[0].type ) && testContext( context.parentNode ) || context
+ )) ) {
+
+ // If seed is empty or no tokens remain, we can return early
+ tokens.splice( i, 1 );
+ selector = seed.length && toSelector( tokens );
+ if ( !selector ) {
+ push.apply( results, seed );
+ return results;
+ }
+
+ break;
+ }
+ }
+ }
+ }
+
+ // Compile and execute a filtering function if one is not provided
+ // Provide `match` to avoid retokenization if we modified the selector above
+ ( compiled || compile( selector, match ) )(
+ seed,
+ context,
+ !documentIsHTML,
+ results,
+ rsibling.test( selector ) && testContext( context.parentNode ) || context
+ );
+ return results;
+};
+
+// One-time assignments
+
+// Sort stability
+support.sortStable = expando.split("").sort( sortOrder ).join("") === expando;
+
+// Support: Chrome 14-35+
+// Always assume duplicates if they aren't passed to the comparison function
+support.detectDuplicates = !!hasDuplicate;
+
+// Initialize against the default document
+setDocument();
+
+// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27)
+// Detached nodes confoundingly follow *each other*
+support.sortDetached = assert(function( div1 ) {
+ // Should return 1, but returns 4 (following)
+ return div1.compareDocumentPosition( document.createElement("div") ) & 1;
+});
+
+// Support: IE<8
+// Prevent attribute/property "interpolation"
+// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx
+if ( !assert(function( div ) {
+ div.innerHTML = "<a href='#'></a>";
+ return div.firstChild.getAttribute("href") === "#" ;
+}) ) {
+ addHandle( "type|href|height|width", function( elem, name, isXML ) {
+ if ( !isXML ) {
+ return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 );
+ }
+ });
+}
+
+// Support: IE<9
+// Use defaultValue in place of getAttribute("value")
+if ( !support.attributes || !assert(function( div ) {
+ div.innerHTML = "<input/>";
+ div.firstChild.setAttribute( "value", "" );
+ return div.firstChild.getAttribute( "value" ) === "";
+}) ) {
+ addHandle( "value", function( elem, name, isXML ) {
+ if ( !isXML && elem.nodeName.toLowerCase() === "input" ) {
+ return elem.defaultValue;
+ }
+ });
+}
+
+// Support: IE<9
+// Use getAttributeNode to fetch booleans when getAttribute lies
+if ( !assert(function( div ) {
+ return div.getAttribute("disabled") == null;
+}) ) {
+ addHandle( booleans, function( elem, name, isXML ) {
+ var val;
+ if ( !isXML ) {
+ return elem[ name ] === true ? name.toLowerCase() :
+ (val = elem.getAttributeNode( name )) && val.specified ?
+ val.value :
+ null;
+ }
+ });
+}
+
+return Sizzle;
+
+})( window );
+
+
+
+jQuery.find = Sizzle;
+jQuery.expr = Sizzle.selectors;
+jQuery.expr[":"] = jQuery.expr.pseudos;
+jQuery.unique = Sizzle.uniqueSort;
+jQuery.text = Sizzle.getText;
+jQuery.isXMLDoc = Sizzle.isXML;
+jQuery.contains = Sizzle.contains;
+
+
+
+var rneedsContext = jQuery.expr.match.needsContext;
+
+var rsingleTag = (/^<(\w+)\s*\/?>(?:<\/\1>|)$/);
+
+
+
+var risSimple = /^.[^:#\[\.,]*$/;
+
+// Implement the identical functionality for filter and not
+function winnow( elements, qualifier, not ) {
+ if ( jQuery.isFunction( qualifier ) ) {
+ return jQuery.grep( elements, function( elem, i ) {
+ /* jshint -W018 */
+ return !!qualifier.call( elem, i, elem ) !== not;
+ });
+
+ }
+
+ if ( qualifier.nodeType ) {
+ return jQuery.grep( elements, function( elem ) {
+ return ( elem === qualifier ) !== not;
+ });
+
+ }
+
+ if ( typeof qualifier === "string" ) {
+ if ( risSimple.test( qualifier ) ) {
+ return jQuery.filter( qualifier, elements, not );
+ }
+
+ qualifier = jQuery.filter( qualifier, elements );
+ }
+
+ return jQuery.grep( elements, function( elem ) {
+ return ( indexOf.call( qualifier, elem ) >= 0 ) !== not;
+ });
+}
+
+jQuery.filter = function( expr, elems, not ) {
+ var elem = elems[ 0 ];
+
+ if ( not ) {
+ expr = ":not(" + expr + ")";
+ }
+
+ return elems.length === 1 && elem.nodeType === 1 ?
+ jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [] :
+ jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) {
+ return elem.nodeType === 1;
+ }));
+};
+
+jQuery.fn.extend({
+ find: function( selector ) {
+ var i,
+ len = this.length,
+ ret = [],
+ self = this;
+
+ if ( typeof selector !== "string" ) {
+ return this.pushStack( jQuery( selector ).filter(function() {
+ for ( i = 0; i < len; i++ ) {
+ if ( jQuery.contains( self[ i ], this ) ) {
+ return true;
+ }
+ }
+ }) );
+ }
+
+ for ( i = 0; i < len; i++ ) {
+ jQuery.find( selector, self[ i ], ret );
+ }
+
+ // Needed because $( selector, context ) becomes $( context ).find( selector )
+ ret = this.pushStack( len > 1 ? jQuery.unique( ret ) : ret );
+ ret.selector = this.selector ? this.selector + " " + selector : selector;
+ return ret;
+ },
+ filter: function( selector ) {
+ return this.pushStack( winnow(this, selector || [], false) );
+ },
+ not: function( selector ) {
+ return this.pushStack( winnow(this, selector || [], true) );
+ },
+ is: function( selector ) {
+ return !!winnow(
+ this,
+
+ // If this is a positional/relative selector, check membership in the returned set
+ // so $("p:first").is("p:last") won't return true for a doc with two "p".
+ typeof selector === "string" && rneedsContext.test( selector ) ?
+ jQuery( selector ) :
+ selector || [],
+ false
+ ).length;
+ }
+});
+
+
+// Initialize a jQuery object
+
+
+// A central reference to the root jQuery(document)
+var rootjQuery,
+
+ // A simple way to check for HTML strings
+ // Prioritize #id over <tag> to avoid XSS via location.hash (#9521)
+ // Strict HTML recognition (#11290: must start with <)
+ rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,
+
+ init = jQuery.fn.init = function( selector, context ) {
+ var match, elem;
+
+ // HANDLE: $(""), $(null), $(undefined), $(false)
+ if ( !selector ) {
+ return this;
+ }
+
+ // Handle HTML strings
+ if ( typeof selector === "string" ) {
+ if ( selector[0] === "<" && selector[ selector.length - 1 ] === ">" && selector.length >= 3 ) {
+ // Assume that strings that start and end with <> are HTML and skip the regex check
+ match = [ null, selector, null ];
+
+ } else {
+ match = rquickExpr.exec( selector );
+ }
+
+ // Match html or make sure no context is specified for #id
+ if ( match && (match[1] || !context) ) {
+
+ // HANDLE: $(html) -> $(array)
+ if ( match[1] ) {
+ context = context instanceof jQuery ? context[0] : context;
+
+ // Option to run scripts is true for back-compat
+ // Intentionally let the error be thrown if parseHTML is not present
+ jQuery.merge( this, jQuery.parseHTML(
+ match[1],
+ context && context.nodeType ? context.ownerDocument || context : document,
+ true
+ ) );
+
+ // HANDLE: $(html, props)
+ if ( rsingleTag.test( match[1] ) && jQuery.isPlainObject( context ) ) {
+ for ( match in context ) {
+ // Properties of context are called as methods if possible
+ if ( jQuery.isFunction( this[ match ] ) ) {
+ this[ match ]( context[ match ] );
+
+ // ...and otherwise set as attributes
+ } else {
+ this.attr( match, context[ match ] );
+ }
+ }
+ }
+
+ return this;
+
+ // HANDLE: $(#id)
+ } else {
+ elem = document.getElementById( match[2] );
+
+ // Support: Blackberry 4.6
+ // gEBID returns nodes no longer in the document (#6963)
+ if ( elem && elem.parentNode ) {
+ // Inject the element directly into the jQuery object
+ this.length = 1;
+ this[0] = elem;
+ }
+
+ this.context = document;
+ this.selector = selector;
+ return this;
+ }
+
+ // HANDLE: $(expr, $(...))
+ } else if ( !context || context.jquery ) {
+ return ( context || rootjQuery ).find( selector );
+
+ // HANDLE: $(expr, context)
+ // (which is just equivalent to: $(context).find(expr)
+ } else {
+ return this.constructor( context ).find( selector );
+ }
+
+ // HANDLE: $(DOMElement)
+ } else if ( selector.nodeType ) {
+ this.context = this[0] = selector;
+ this.length = 1;
+ return this;
+
+ // HANDLE: $(function)
+ // Shortcut for document ready
+ } else if ( jQuery.isFunction( selector ) ) {
+ return typeof rootjQuery.ready !== "undefined" ?
+ rootjQuery.ready( selector ) :
+ // Execute immediately if ready is not present
+ selector( jQuery );
+ }
+
+ if ( selector.selector !== undefined ) {
+ this.selector = selector.selector;
+ this.context = selector.context;
+ }
+
+ return jQuery.makeArray( selector, this );
+ };
+
+// Give the init function the jQuery prototype for later instantiation
+init.prototype = jQuery.fn;
+
+// Initialize central reference
+rootjQuery = jQuery( document );
+
+
+var rparentsprev = /^(?:parents|prev(?:Until|All))/,
+ // Methods guaranteed to produce a unique set when starting from a unique set
+ guaranteedUnique = {
+ children: true,
+ contents: true,
+ next: true,
+ prev: true
+ };
+
+jQuery.extend({
+ dir: function( elem, dir, until ) {
+ var matched = [],
+ truncate = until !== undefined;
+
+ while ( (elem = elem[ dir ]) && elem.nodeType !== 9 ) {
+ if ( elem.nodeType === 1 ) {
+ if ( truncate && jQuery( elem ).is( until ) ) {
+ break;
+ }
+ matched.push( elem );
+ }
+ }
+ return matched;
+ },
+
+ sibling: function( n, elem ) {
+ var matched = [];
+
+ for ( ; n; n = n.nextSibling ) {
+ if ( n.nodeType === 1 && n !== elem ) {
+ matched.push( n );
+ }
+ }
+
+ return matched;
+ }
+});
+
+jQuery.fn.extend({
+ has: function( target ) {
+ var targets = jQuery( target, this ),
+ l = targets.length;
+
+ return this.filter(function() {
+ var i = 0;
+ for ( ; i < l; i++ ) {
+ if ( jQuery.contains( this, targets[i] ) ) {
+ return true;
+ }
+ }
+ });
+ },
+
+ closest: function( selectors, context ) {
+ var cur,
+ i = 0,
+ l = this.length,
+ matched = [],
+ pos = rneedsContext.test( selectors ) || typeof selectors !== "string" ?
+ jQuery( selectors, context || this.context ) :
+ 0;
+
+ for ( ; i < l; i++ ) {
+ for ( cur = this[i]; cur && cur !== context; cur = cur.parentNode ) {
+ // Always skip document fragments
+ if ( cur.nodeType < 11 && (pos ?
+ pos.index(cur) > -1 :
+
+ // Don't pass non-elements to Sizzle
+ cur.nodeType === 1 &&
+ jQuery.find.matchesSelector(cur, selectors)) ) {
+
+ matched.push( cur );
+ break;
+ }
+ }
+ }
+
+ return this.pushStack( matched.length > 1 ? jQuery.unique( matched ) : matched );
+ },
+
+ // Determine the position of an element within the set
+ index: function( elem ) {
+
+ // No argument, return index in parent
+ if ( !elem ) {
+ return ( this[ 0 ] && this[ 0 ].parentNode ) ? this.first().prevAll().length : -1;
+ }
+
+ // Index in selector
+ if ( typeof elem === "string" ) {
+ return indexOf.call( jQuery( elem ), this[ 0 ] );
+ }
+
+ // Locate the position of the desired element
+ return indexOf.call( this,
+
+ // If it receives a jQuery object, the first element is used
+ elem.jquery ? elem[ 0 ] : elem
+ );
+ },
+
+ add: function( selector, context ) {
+ return this.pushStack(
+ jQuery.unique(
+ jQuery.merge( this.get(), jQuery( selector, context ) )
+ )
+ );
+ },
+
+ addBack: function( selector ) {
+ return this.add( selector == null ?
+ this.prevObject : this.prevObject.filter(selector)
+ );
+ }
+});
+
+function sibling( cur, dir ) {
+ while ( (cur = cur[dir]) && cur.nodeType !== 1 ) {}
+ return cur;
+}
+
+jQuery.each({
+ parent: function( elem ) {
+ var parent = elem.parentNode;
+ return parent && parent.nodeType !== 11 ? parent : null;
+ },
+ parents: function( elem ) {
+ return jQuery.dir( elem, "parentNode" );
+ },
+ parentsUntil: function( elem, i, until ) {
+ return jQuery.dir( elem, "parentNode", until );
+ },
+ next: function( elem ) {
+ return sibling( elem, "nextSibling" );
+ },
+ prev: function( elem ) {
+ return sibling( elem, "previousSibling" );
+ },
+ nextAll: function( elem ) {
+ return jQuery.dir( elem, "nextSibling" );
+ },
+ prevAll: function( elem ) {
+ return jQuery.dir( elem, "previousSibling" );
+ },
+ nextUntil: function( elem, i, until ) {
+ return jQuery.dir( elem, "nextSibling", until );
+ },
+ prevUntil: function( elem, i, until ) {
+ return jQuery.dir( elem, "previousSibling", until );
+ },
+ siblings: function( elem ) {
+ return jQuery.sibling( ( elem.parentNode || {} ).firstChild, elem );
+ },
+ children: function( elem ) {
+ return jQuery.sibling( elem.firstChild );
+ },
+ contents: function( elem ) {
+ return elem.contentDocument || jQuery.merge( [], elem.childNodes );
+ }
+}, function( name, fn ) {
+ jQuery.fn[ name ] = function( until, selector ) {
+ var matched = jQuery.map( this, fn, until );
+
+ if ( name.slice( -5 ) !== "Until" ) {
+ selector = until;
+ }
+
+ if ( selector && typeof selector === "string" ) {
+ matched = jQuery.filter( selector, matched );
+ }
+
+ if ( this.length > 1 ) {
+ // Remove duplicates
+ if ( !guaranteedUnique[ name ] ) {
+ jQuery.unique( matched );
+ }
+
+ // Reverse order for parents* and prev-derivatives
+ if ( rparentsprev.test( name ) ) {
+ matched.reverse();
+ }
+ }
+
+ return this.pushStack( matched );
+ };
+});
+var rnotwhite = (/\S+/g);
+
+
+
+// String to Object options format cache
+var optionsCache = {};
+
+// Convert String-formatted options into Object-formatted ones and store in cache
+function createOptions( options ) {
+ var object = optionsCache[ options ] = {};
+ jQuery.each( options.match( rnotwhite ) || [], function( _, flag ) {
+ object[ flag ] = true;
+ });
+ return object;
+}
+
+/*
+ * Create a callback list using the following parameters:
+ *
+ * options: an optional list of space-separated options that will change how
+ * the callback list behaves or a more traditional option object
+ *
+ * By default a callback list will act like an event callback list and can be
+ * "fired" multiple times.
+ *
+ * Possible options:
+ *
+ * once: will ensure the callback list can only be fired once (like a Deferred)
+ *
+ * memory: will keep track of previous values and will call any callback added
+ * after the list has been fired right away with the latest "memorized"
+ * values (like a Deferred)
+ *
+ * unique: will ensure a callback can only be added once (no duplicate in the list)
+ *
+ * stopOnFalse: interrupt callings when a callback returns false
+ *
+ */
+jQuery.Callbacks = function( options ) {
+
+ // Convert options from String-formatted to Object-formatted if needed
+ // (we check in cache first)
+ options = typeof options === "string" ?
+ ( optionsCache[ options ] || createOptions( options ) ) :
+ jQuery.extend( {}, options );
+
+ var // Last fire value (for non-forgettable lists)
+ memory,
+ // Flag to know if list was already fired
+ fired,
+ // Flag to know if list is currently firing
+ firing,
+ // First callback to fire (used internally by add and fireWith)
+ firingStart,
+ // End of the loop when firing
+ firingLength,
+ // Index of currently firing callback (modified by remove if needed)
+ firingIndex,
+ // Actual callback list
+ list = [],
+ // Stack of fire calls for repeatable lists
+ stack = !options.once && [],
+ // Fire callbacks
+ fire = function( data ) {
+ memory = options.memory && data;
+ fired = true;
+ firingIndex = firingStart || 0;
+ firingStart = 0;
+ firingLength = list.length;
+ firing = true;
+ for ( ; list && firingIndex < firingLength; firingIndex++ ) {
+ if ( list[ firingIndex ].apply( data[ 0 ], data[ 1 ] ) === false && options.stopOnFalse ) {
+ memory = false; // To prevent further calls using add
+ break;
+ }
+ }
+ firing = false;
+ if ( list ) {
+ if ( stack ) {
+ if ( stack.length ) {
+ fire( stack.shift() );
+ }
+ } else if ( memory ) {
+ list = [];
+ } else {
+ self.disable();
+ }
+ }
+ },
+ // Actual Callbacks object
+ self = {
+ // Add a callback or a collection of callbacks to the list
+ add: function() {
+ if ( list ) {
+ // First, we save the current length
+ var start = list.length;
+ (function add( args ) {
+ jQuery.each( args, function( _, arg ) {
+ var type = jQuery.type( arg );
+ if ( type === "function" ) {
+ if ( !options.unique || !self.has( arg ) ) {
+ list.push( arg );
+ }
+ } else if ( arg && arg.length && type !== "string" ) {
+ // Inspect recursively
+ add( arg );
+ }
+ });
+ })( arguments );
+ // Do we need to add the callbacks to the
+ // current firing batch?
+ if ( firing ) {
+ firingLength = list.length;
+ // With memory, if we're not firing then
+ // we should call right away
+ } else if ( memory ) {
+ firingStart = start;
+ fire( memory );
+ }
+ }
+ return this;
+ },
+ // Remove a callback from the list
+ remove: function() {
+ if ( list ) {
+ jQuery.each( arguments, function( _, arg ) {
+ var index;
+ while ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) {
+ list.splice( index, 1 );
+ // Handle firing indexes
+ if ( firing ) {
+ if ( index <= firingLength ) {
+ firingLength--;
+ }
+ if ( index <= firingIndex ) {
+ firingIndex--;
+ }
+ }
+ }
+ });
+ }
+ return this;
+ },
+ // Check if a given callback is in the list.
+ // If no argument is given, return whether or not list has callbacks attached.
+ has: function( fn ) {
+ return fn ? jQuery.inArray( fn, list ) > -1 : !!( list && list.length );
+ },
+ // Remove all callbacks from the list
+ empty: function() {
+ list = [];
+ firingLength = 0;
+ return this;
+ },
+ // Have the list do nothing anymore
+ disable: function() {
+ list = stack = memory = undefined;
+ return this;
+ },
+ // Is it disabled?
+ disabled: function() {
+ return !list;
+ },
+ // Lock the list in its current state
+ lock: function() {
+ stack = undefined;
+ if ( !memory ) {
+ self.disable();
+ }
+ return this;
+ },
+ // Is it locked?
+ locked: function() {
+ return !stack;
+ },
+ // Call all callbacks with the given context and arguments
+ fireWith: function( context, args ) {
+ if ( list && ( !fired || stack ) ) {
+ args = args || [];
+ args = [ context, args.slice ? args.slice() : args ];
+ if ( firing ) {
+ stack.push( args );
+ } else {
+ fire( args );
+ }
+ }
+ return this;
+ },
+ // Call all the callbacks with the given arguments
+ fire: function() {
+ self.fireWith( this, arguments );
+ return this;
+ },
+ // To know if the callbacks have already been called at least once
+ fired: function() {
+ return !!fired;
+ }
+ };
+
+ return self;
+};
+
+
+jQuery.extend({
+
+ Deferred: function( func ) {
+ var tuples = [
+ // action, add listener, listener list, final state
+ [ "resolve", "done", jQuery.Callbacks("once memory"), "resolved" ],
+ [ "reject", "fail", jQuery.Callbacks("once memory"), "rejected" ],
+ [ "notify", "progress", jQuery.Callbacks("memory") ]
+ ],
+ state = "pending",
+ promise = {
+ state: function() {
+ return state;
+ },
+ always: function() {
+ deferred.done( arguments ).fail( arguments );
+ return this;
+ },
+ then: function( /* fnDone, fnFail, fnProgress */ ) {
+ var fns = arguments;
+ return jQuery.Deferred(function( newDefer ) {
+ jQuery.each( tuples, function( i, tuple ) {
+ var fn = jQuery.isFunction( fns[ i ] ) && fns[ i ];
+ // deferred[ done | fail | progress ] for forwarding actions to newDefer
+ deferred[ tuple[1] ](function() {
+ var returned = fn && fn.apply( this, arguments );
+ if ( returned && jQuery.isFunction( returned.promise ) ) {
+ returned.promise()
+ .done( newDefer.resolve )
+ .fail( newDefer.reject )
+ .progress( newDefer.notify );
+ } else {
+ newDefer[ tuple[ 0 ] + "With" ]( this === promise ? newDefer.promise() : this, fn ? [ returned ] : arguments );
+ }
+ });
+ });
+ fns = null;
+ }).promise();
+ },
+ // Get a promise for this deferred
+ // If obj is provided, the promise aspect is added to the object
+ promise: function( obj ) {
+ return obj != null ? jQuery.extend( obj, promise ) : promise;
+ }
+ },
+ deferred = {};
+
+ // Keep pipe for back-compat
+ promise.pipe = promise.then;
+
+ // Add list-specific methods
+ jQuery.each( tuples, function( i, tuple ) {
+ var list = tuple[ 2 ],
+ stateString = tuple[ 3 ];
+
+ // promise[ done | fail | progress ] = list.add
+ promise[ tuple[1] ] = list.add;
+
+ // Handle state
+ if ( stateString ) {
+ list.add(function() {
+ // state = [ resolved | rejected ]
+ state = stateString;
+
+ // [ reject_list | resolve_list ].disable; progress_list.lock
+ }, tuples[ i ^ 1 ][ 2 ].disable, tuples[ 2 ][ 2 ].lock );
+ }
+
+ // deferred[ resolve | reject | notify ]
+ deferred[ tuple[0] ] = function() {
+ deferred[ tuple[0] + "With" ]( this === deferred ? promise : this, arguments );
+ return this;
+ };
+ deferred[ tuple[0] + "With" ] = list.fireWith;
+ });
+
+ // Make the deferred a promise
+ promise.promise( deferred );
+
+ // Call given func if any
+ if ( func ) {
+ func.call( deferred, deferred );
+ }
+
+ // All done!
+ return deferred;
+ },
+
+ // Deferred helper
+ when: function( subordinate /* , ..., subordinateN */ ) {
+ var i = 0,
+ resolveValues = slice.call( arguments ),
+ length = resolveValues.length,
+
+ // the count of uncompleted subordinates
+ remaining = length !== 1 || ( subordinate && jQuery.isFunction( subordinate.promise ) ) ? length : 0,
+
+ // the master Deferred. If resolveValues consist of only a single Deferred, just use that.
+ deferred = remaining === 1 ? subordinate : jQuery.Deferred(),
+
+ // Update function for both resolve and progress values
+ updateFunc = function( i, contexts, values ) {
+ return function( value ) {
+ contexts[ i ] = this;
+ values[ i ] = arguments.length > 1 ? slice.call( arguments ) : value;
+ if ( values === progressValues ) {
+ deferred.notifyWith( contexts, values );
+ } else if ( !( --remaining ) ) {
+ deferred.resolveWith( contexts, values );
+ }
+ };
+ },
+
+ progressValues, progressContexts, resolveContexts;
+
+ // Add listeners to Deferred subordinates; treat others as resolved
+ if ( length > 1 ) {
+ progressValues = new Array( length );
+ progressContexts = new Array( length );
+ resolveContexts = new Array( length );
+ for ( ; i < length; i++ ) {
+ if ( resolveValues[ i ] && jQuery.isFunction( resolveValues[ i ].promise ) ) {
+ resolveValues[ i ].promise()
+ .done( updateFunc( i, resolveContexts, resolveValues ) )
+ .fail( deferred.reject )
+ .progress( updateFunc( i, progressContexts, progressValues ) );
+ } else {
+ --remaining;
+ }
+ }
+ }
+
+ // If we're not waiting on anything, resolve the master
+ if ( !remaining ) {
+ deferred.resolveWith( resolveContexts, resolveValues );
+ }
+
+ return deferred.promise();
+ }
+});
+
+
+// The deferred used on DOM ready
+var readyList;
+
+jQuery.fn.ready = function( fn ) {
+ // Add the callback
+ jQuery.ready.promise().done( fn );
+
+ return this;
+};
+
+jQuery.extend({
+ // Is the DOM ready to be used? Set to true once it occurs.
+ isReady: false,
+
+ // A counter to track how many items to wait for before
+ // the ready event fires. See #6781
+ readyWait: 1,
+
+ // Hold (or release) the ready event
+ holdReady: function( hold ) {
+ if ( hold ) {
+ jQuery.readyWait++;
+ } else {
+ jQuery.ready( true );
+ }
+ },
+
+ // Handle when the DOM is ready
+ ready: function( wait ) {
+
+ // Abort if there are pending holds or we're already ready
+ if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) {
+ return;
+ }
+
+ // Remember that the DOM is ready
+ jQuery.isReady = true;
+
+ // If a normal DOM Ready event fired, decrement, and wait if need be
+ if ( wait !== true && --jQuery.readyWait > 0 ) {
+ return;
+ }
+
+ // If there are functions bound, to execute
+ readyList.resolveWith( document, [ jQuery ] );
+
+ // Trigger any bound ready events
+ if ( jQuery.fn.triggerHandler ) {
+ jQuery( document ).triggerHandler( "ready" );
+ jQuery( document ).off( "ready" );
+ }
+ }
+});
+
+/**
+ * The ready event handler and self cleanup method
+ */
+function completed() {
+ document.removeEventListener( "DOMContentLoaded", completed, false );
+ window.removeEventListener( "load", completed, false );
+ jQuery.ready();
+}
+
+jQuery.ready.promise = function( obj ) {
+ if ( !readyList ) {
+
+ readyList = jQuery.Deferred();
+
+ // Catch cases where $(document).ready() is called after the browser event has already occurred.
+ // We once tried to use readyState "interactive" here, but it caused issues like the one
+ // discovered by ChrisS here: http://bugs.jquery.com/ticket/12282#comment:15
+ if ( document.readyState === "complete" ) {
+ // Handle it asynchronously to allow scripts the opportunity to delay ready
+ setTimeout( jQuery.ready );
+
+ } else {
+
+ // Use the handy event callback
+ document.addEventListener( "DOMContentLoaded", completed, false );
+
+ // A fallback to window.onload, that will always work
+ window.addEventListener( "load", completed, false );
+ }
+ }
+ return readyList.promise( obj );
+};
+
+// Kick off the DOM ready check even if the user does not
+jQuery.ready.promise();
+
+
+
+
+// Multifunctional method to get and set values of a collection
+// The value/s can optionally be executed if it's a function
+var access = jQuery.access = function( elems, fn, key, value, chainable, emptyGet, raw ) {
+ var i = 0,
+ len = elems.length,
+ bulk = key == null;
+
+ // Sets many values
+ if ( jQuery.type( key ) === "object" ) {
+ chainable = true;
+ for ( i in key ) {
+ jQuery.access( elems, fn, i, key[i], true, emptyGet, raw );
+ }
+
+ // Sets one value
+ } else if ( value !== undefined ) {
+ chainable = true;
+
+ if ( !jQuery.isFunction( value ) ) {
+ raw = true;
+ }
+
+ if ( bulk ) {
+ // Bulk operations run against the entire set
+ if ( raw ) {
+ fn.call( elems, value );
+ fn = null;
+
+ // ...except when executing function values
+ } else {
+ bulk = fn;
+ fn = function( elem, key, value ) {
+ return bulk.call( jQuery( elem ), value );
+ };
+ }
+ }
+
+ if ( fn ) {
+ for ( ; i < len; i++ ) {
+ fn( elems[i], key, raw ? value : value.call( elems[i], i, fn( elems[i], key ) ) );
+ }
+ }
+ }
+
+ return chainable ?
+ elems :
+
+ // Gets
+ bulk ?
+ fn.call( elems ) :
+ len ? fn( elems[0], key ) : emptyGet;
+};
+
+
+/**
+ * Determines whether an object can have data
+ */
+jQuery.acceptData = function( owner ) {
+ // Accepts only:
+ // - Node
+ // - Node.ELEMENT_NODE
+ // - Node.DOCUMENT_NODE
+ // - Object
+ // - Any
+ /* jshint -W018 */
+ return owner.nodeType === 1 || owner.nodeType === 9 || !( +owner.nodeType );
+};
+
+
+function Data() {
+ // Support: Android<4,
+ // Old WebKit does not have Object.preventExtensions/freeze method,
+ // return new empty object instead with no [[set]] accessor
+ Object.defineProperty( this.cache = {}, 0, {
+ get: function() {
+ return {};
+ }
+ });
+
+ this.expando = jQuery.expando + Data.uid++;
+}
+
+Data.uid = 1;
+Data.accepts = jQuery.acceptData;
+
+Data.prototype = {
+ key: function( owner ) {
+ // We can accept data for non-element nodes in modern browsers,
+ // but we should not, see #8335.
+ // Always return the key for a frozen object.
+ if ( !Data.accepts( owner ) ) {
+ return 0;
+ }
+
+ var descriptor = {},
+ // Check if the owner object already has a cache key
+ unlock = owner[ this.expando ];
+
+ // If not, create one
+ if ( !unlock ) {
+ unlock = Data.uid++;
+
+ // Secure it in a non-enumerable, non-writable property
+ try {
+ descriptor[ this.expando ] = { value: unlock };
+ Object.defineProperties( owner, descriptor );
+
+ // Support: Android<4
+ // Fallback to a less secure definition
+ } catch ( e ) {
+ descriptor[ this.expando ] = unlock;
+ jQuery.extend( owner, descriptor );
+ }
+ }
+
+ // Ensure the cache object
+ if ( !this.cache[ unlock ] ) {
+ this.cache[ unlock ] = {};
+ }
+
+ return unlock;
+ },
+ set: function( owner, data, value ) {
+ var prop,
+ // There may be an unlock assigned to this node,
+ // if there is no entry for this "owner", create one inline
+ // and set the unlock as though an owner entry had always existed
+ unlock = this.key( owner ),
+ cache = this.cache[ unlock ];
+
+ // Handle: [ owner, key, value ] args
+ if ( typeof data === "string" ) {
+ cache[ data ] = value;
+
+ // Handle: [ owner, { properties } ] args
+ } else {
+ // Fresh assignments by object are shallow copied
+ if ( jQuery.isEmptyObject( cache ) ) {
+ jQuery.extend( this.cache[ unlock ], data );
+ // Otherwise, copy the properties one-by-one to the cache object
+ } else {
+ for ( prop in data ) {
+ cache[ prop ] = data[ prop ];
+ }
+ }
+ }
+ return cache;
+ },
+ get: function( owner, key ) {
+ // Either a valid cache is found, or will be created.
+ // New caches will be created and the unlock returned,
+ // allowing direct access to the newly created
+ // empty data object. A valid owner object must be provided.
+ var cache = this.cache[ this.key( owner ) ];
+
+ return key === undefined ?
+ cache : cache[ key ];
+ },
+ access: function( owner, key, value ) {
+ var stored;
+ // In cases where either:
+ //
+ // 1. No key was specified
+ // 2. A string key was specified, but no value provided
+ //
+ // Take the "read" path and allow the get method to determine
+ // which value to return, respectively either:
+ //
+ // 1. The entire cache object
+ // 2. The data stored at the key
+ //
+ if ( key === undefined ||
+ ((key && typeof key === "string") && value === undefined) ) {
+
+ stored = this.get( owner, key );
+
+ return stored !== undefined ?
+ stored : this.get( owner, jQuery.camelCase(key) );
+ }
+
+ // [*]When the key is not a string, or both a key and value
+ // are specified, set or extend (existing objects) with either:
+ //
+ // 1. An object of properties
+ // 2. A key and value
+ //
+ this.set( owner, key, value );
+
+ // Since the "set" path can have two possible entry points
+ // return the expected data based on which path was taken[*]
+ return value !== undefined ? value : key;
+ },
+ remove: function( owner, key ) {
+ var i, name, camel,
+ unlock = this.key( owner ),
+ cache = this.cache[ unlock ];
+
+ if ( key === undefined ) {
+ this.cache[ unlock ] = {};
+
+ } else {
+ // Support array or space separated string of keys
+ if ( jQuery.isArray( key ) ) {
+ // If "name" is an array of keys...
+ // When data is initially created, via ("key", "val") signature,
+ // keys will be converted to camelCase.
+ // Since there is no way to tell _how_ a key was added, remove
+ // both plain key and camelCase key. #12786
+ // This will only penalize the array argument path.
+ name = key.concat( key.map( jQuery.camelCase ) );
+ } else {
+ camel = jQuery.camelCase( key );
+ // Try the string as a key before any manipulation
+ if ( key in cache ) {
+ name = [ key, camel ];
+ } else {
+ // If a key with the spaces exists, use it.
+ // Otherwise, create an array by matching non-whitespace
+ name = camel;
+ name = name in cache ?
+ [ name ] : ( name.match( rnotwhite ) || [] );
+ }
+ }
+
+ i = name.length;
+ while ( i-- ) {
+ delete cache[ name[ i ] ];
+ }
+ }
+ },
+ hasData: function( owner ) {
+ return !jQuery.isEmptyObject(
+ this.cache[ owner[ this.expando ] ] || {}
+ );
+ },
+ discard: function( owner ) {
+ if ( owner[ this.expando ] ) {
+ delete this.cache[ owner[ this.expando ] ];
+ }
+ }
+};
+var data_priv = new Data();
+
+var data_user = new Data();
+
+
+
+// Implementation Summary
+//
+// 1. Enforce API surface and semantic compatibility with 1.9.x branch
+// 2. Improve the module's maintainability by reducing the storage
+// paths to a single mechanism.
+// 3. Use the same single mechanism to support "private" and "user" data.
+// 4. _Never_ expose "private" data to user code (TODO: Drop _data, _removeData)
+// 5. Avoid exposing implementation details on user objects (eg. expando properties)
+// 6. Provide a clear path for implementation upgrade to WeakMap in 2014
+
+var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,
+ rmultiDash = /([A-Z])/g;
+
+function dataAttr( elem, key, data ) {
+ var name;
+
+ // If nothing was found internally, try to fetch any
+ // data from the HTML5 data-* attribute
+ if ( data === undefined && elem.nodeType === 1 ) {
+ name = "data-" + key.replace( rmultiDash, "-$1" ).toLowerCase();
+ data = elem.getAttribute( name );
+
+ if ( typeof data === "string" ) {
+ try {
+ data = data === "true" ? true :
+ data === "false" ? false :
+ data === "null" ? null :
+ // Only convert to a number if it doesn't change the string
+ +data + "" === data ? +data :
+ rbrace.test( data ) ? jQuery.parseJSON( data ) :
+ data;
+ } catch( e ) {}
+
+ // Make sure we set the data so it isn't changed later
+ data_user.set( elem, key, data );
+ } else {
+ data = undefined;
+ }
+ }
+ return data;
+}
+
+jQuery.extend({
+ hasData: function( elem ) {
+ return data_user.hasData( elem ) || data_priv.hasData( elem );
+ },
+
+ data: function( elem, name, data ) {
+ return data_user.access( elem, name, data );
+ },
+
+ removeData: function( elem, name ) {
+ data_user.remove( elem, name );
+ },
+
+ // TODO: Now that all calls to _data and _removeData have been replaced
+ // with direct calls to data_priv methods, these can be deprecated.
+ _data: function( elem, name, data ) {
+ return data_priv.access( elem, name, data );
+ },
+
+ _removeData: function( elem, name ) {
+ data_priv.remove( elem, name );
+ }
+});
+
+jQuery.fn.extend({
+ data: function( key, value ) {
+ var i, name, data,
+ elem = this[ 0 ],
+ attrs = elem && elem.attributes;
+
+ // Gets all values
+ if ( key === undefined ) {
+ if ( this.length ) {
+ data = data_user.get( elem );
+
+ if ( elem.nodeType === 1 && !data_priv.get( elem, "hasDataAttrs" ) ) {
+ i = attrs.length;
+ while ( i-- ) {
+
+ // Support: IE11+
+ // The attrs elements can be null (#14894)
+ if ( attrs[ i ] ) {
+ name = attrs[ i ].name;
+ if ( name.indexOf( "data-" ) === 0 ) {
+ name = jQuery.camelCase( name.slice(5) );
+ dataAttr( elem, name, data[ name ] );
+ }
+ }
+ }
+ data_priv.set( elem, "hasDataAttrs", true );
+ }
+ }
+
+ return data;
+ }
+
+ // Sets multiple values
+ if ( typeof key === "object" ) {
+ return this.each(function() {
+ data_user.set( this, key );
+ });
+ }
+
+ return access( this, function( value ) {
+ var data,
+ camelKey = jQuery.camelCase( key );
+
+ // The calling jQuery object (element matches) is not empty
+ // (and therefore has an element appears at this[ 0 ]) and the
+ // `value` parameter was not undefined. An empty jQuery object
+ // will result in `undefined` for elem = this[ 0 ] which will
+ // throw an exception if an attempt to read a data cache is made.
+ if ( elem && value === undefined ) {
+ // Attempt to get data from the cache
+ // with the key as-is
+ data = data_user.get( elem, key );
+ if ( data !== undefined ) {
+ return data;
+ }
+
+ // Attempt to get data from the cache
+ // with the key camelized
+ data = data_user.get( elem, camelKey );
+ if ( data !== undefined ) {
+ return data;
+ }
+
+ // Attempt to "discover" the data in
+ // HTML5 custom data-* attrs
+ data = dataAttr( elem, camelKey, undefined );
+ if ( data !== undefined ) {
+ return data;
+ }
+
+ // We tried really hard, but the data doesn't exist.
+ return;
+ }
+
+ // Set the data...
+ this.each(function() {
+ // First, attempt to store a copy or reference of any
+ // data that might've been store with a camelCased key.
+ var data = data_user.get( this, camelKey );
+
+ // For HTML5 data-* attribute interop, we have to
+ // store property names with dashes in a camelCase form.
+ // This might not apply to all properties...*
+ data_user.set( this, camelKey, value );
+
+ // *... In the case of properties that might _actually_
+ // have dashes, we need to also store a copy of that
+ // unchanged property.
+ if ( key.indexOf("-") !== -1 && data !== undefined ) {
+ data_user.set( this, key, value );
+ }
+ });
+ }, null, value, arguments.length > 1, null, true );
+ },
+
+ removeData: function( key ) {
+ return this.each(function() {
+ data_user.remove( this, key );
+ });
+ }
+});
+
+
+jQuery.extend({
+ queue: function( elem, type, data ) {
+ var queue;
+
+ if ( elem ) {
+ type = ( type || "fx" ) + "queue";
+ queue = data_priv.get( elem, type );
+
+ // Speed up dequeue by getting out quickly if this is just a lookup
+ if ( data ) {
+ if ( !queue || jQuery.isArray( data ) ) {
+ queue = data_priv.access( elem, type, jQuery.makeArray(data) );
+ } else {
+ queue.push( data );
+ }
+ }
+ return queue || [];
+ }
+ },
+
+ dequeue: function( elem, type ) {
+ type = type || "fx";
+
+ var queue = jQuery.queue( elem, type ),
+ startLength = queue.length,
+ fn = queue.shift(),
+ hooks = jQuery._queueHooks( elem, type ),
+ next = function() {
+ jQuery.dequeue( elem, type );
+ };
+
+ // If the fx queue is dequeued, always remove the progress sentinel
+ if ( fn === "inprogress" ) {
+ fn = queue.shift();
+ startLength--;
+ }
+
+ if ( fn ) {
+
+ // Add a progress sentinel to prevent the fx queue from being
+ // automatically dequeued
+ if ( type === "fx" ) {
+ queue.unshift( "inprogress" );
+ }
+
+ // Clear up the last queue stop function
+ delete hooks.stop;
+ fn.call( elem, next, hooks );
+ }
+
+ if ( !startLength && hooks ) {
+ hooks.empty.fire();
+ }
+ },
+
+ // Not public - generate a queueHooks object, or return the current one
+ _queueHooks: function( elem, type ) {
+ var key = type + "queueHooks";
+ return data_priv.get( elem, key ) || data_priv.access( elem, key, {
+ empty: jQuery.Callbacks("once memory").add(function() {
+ data_priv.remove( elem, [ type + "queue", key ] );
+ })
+ });
+ }
+});
+
+jQuery.fn.extend({
+ queue: function( type, data ) {
+ var setter = 2;
+
+ if ( typeof type !== "string" ) {
+ data = type;
+ type = "fx";
+ setter--;
+ }
+
+ if ( arguments.length < setter ) {
+ return jQuery.queue( this[0], type );
+ }
+
+ return data === undefined ?
+ this :
+ this.each(function() {
+ var queue = jQuery.queue( this, type, data );
+
+ // Ensure a hooks for this queue
+ jQuery._queueHooks( this, type );
+
+ if ( type === "fx" && queue[0] !== "inprogress" ) {
+ jQuery.dequeue( this, type );
+ }
+ });
+ },
+ dequeue: function( type ) {
+ return this.each(function() {
+ jQuery.dequeue( this, type );
+ });
+ },
+ clearQueue: function( type ) {
+ return this.queue( type || "fx", [] );
+ },
+ // Get a promise resolved when queues of a certain type
+ // are emptied (fx is the type by default)
+ promise: function( type, obj ) {
+ var tmp,
+ count = 1,
+ defer = jQuery.Deferred(),
+ elements = this,
+ i = this.length,
+ resolve = function() {
+ if ( !( --count ) ) {
+ defer.resolveWith( elements, [ elements ] );
+ }
+ };
+
+ if ( typeof type !== "string" ) {
+ obj = type;
+ type = undefined;
+ }
+ type = type || "fx";
+
+ while ( i-- ) {
+ tmp = data_priv.get( elements[ i ], type + "queueHooks" );
+ if ( tmp && tmp.empty ) {
+ count++;
+ tmp.empty.add( resolve );
+ }
+ }
+ resolve();
+ return defer.promise( obj );
+ }
+});
+var pnum = (/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/).source;
+
+var cssExpand = [ "Top", "Right", "Bottom", "Left" ];
+
+var isHidden = function( elem, el ) {
+ // isHidden might be called from jQuery#filter function;
+ // in that case, element will be second argument
+ elem = el || elem;
+ return jQuery.css( elem, "display" ) === "none" || !jQuery.contains( elem.ownerDocument, elem );
+ };
+
+var rcheckableType = (/^(?:checkbox|radio)$/i);
+
+
+
+(function() {
+ var fragment = document.createDocumentFragment(),
+ div = fragment.appendChild( document.createElement( "div" ) ),
+ input = document.createElement( "input" );
+
+ // Support: Safari<=5.1
+ // Check state lost if the name is set (#11217)
+ // Support: Windows Web Apps (WWA)
+ // `name` and `type` must use .setAttribute for WWA (#14901)
+ input.setAttribute( "type", "radio" );
+ input.setAttribute( "checked", "checked" );
+ input.setAttribute( "name", "t" );
+
+ div.appendChild( input );
+
+ // Support: Safari<=5.1, Android<4.2
+ // Older WebKit doesn't clone checked state correctly in fragments
+ support.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked;
+
+ // Support: IE<=11+
+ // Make sure textarea (and checkbox) defaultValue is properly cloned
+ div.innerHTML = "<textarea>x</textarea>";
+ support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue;
+})();
+var strundefined = typeof undefined;
+
+
+
+support.focusinBubbles = "onfocusin" in window;
+
+
+var
+ rkeyEvent = /^key/,
+ rmouseEvent = /^(?:mouse|pointer|contextmenu)|click/,
+ rfocusMorph = /^(?:focusinfocus|focusoutblur)$/,
+ rtypenamespace = /^([^.]*)(?:\.(.+)|)$/;
+
+function returnTrue() {
+ return true;
+}
+
+function returnFalse() {
+ return false;
+}
+
+function safeActiveElement() {
+ try {
+ return document.activeElement;
+ } catch ( err ) { }
+}
+
+/*
+ * Helper functions for managing events -- not part of the public interface.
+ * Props to Dean Edwards' addEvent library for many of the ideas.
+ */
+jQuery.event = {
+
+ global: {},
+
+ add: function( elem, types, handler, data, selector ) {
+
+ var handleObjIn, eventHandle, tmp,
+ events, t, handleObj,
+ special, handlers, type, namespaces, origType,
+ elemData = data_priv.get( elem );
+
+ // Don't attach events to noData or text/comment nodes (but allow plain objects)
+ if ( !elemData ) {
+ return;
+ }
+
+ // Caller can pass in an object of custom data in lieu of the handler
+ if ( handler.handler ) {
+ handleObjIn = handler;
+ handler = handleObjIn.handler;
+ selector = handleObjIn.selector;
+ }
+
+ // Make sure that the handler has a unique ID, used to find/remove it later
+ if ( !handler.guid ) {
+ handler.guid = jQuery.guid++;
+ }
+
+ // Init the element's event structure and main handler, if this is the first
+ if ( !(events = elemData.events) ) {
+ events = elemData.events = {};
+ }
+ if ( !(eventHandle = elemData.handle) ) {
+ eventHandle = elemData.handle = function( e ) {
+ // Discard the second event of a jQuery.event.trigger() and
+ // when an event is called after a page has unloaded
+ return typeof jQuery !== strundefined && jQuery.event.triggered !== e.type ?
+ jQuery.event.dispatch.apply( elem, arguments ) : undefined;
+ };
+ }
+
+ // Handle multiple events separated by a space
+ types = ( types || "" ).match( rnotwhite ) || [ "" ];
+ t = types.length;
+ while ( t-- ) {
+ tmp = rtypenamespace.exec( types[t] ) || [];
+ type = origType = tmp[1];
+ namespaces = ( tmp[2] || "" ).split( "." ).sort();
+
+ // There *must* be a type, no attaching namespace-only handlers
+ if ( !type ) {
+ continue;
+ }
+
+ // If event changes its type, use the special event handlers for the changed type
+ special = jQuery.event.special[ type ] || {};
+
+ // If selector defined, determine special event api type, otherwise given type
+ type = ( selector ? special.delegateType : special.bindType ) || type;
+
+ // Update special based on newly reset type
+ special = jQuery.event.special[ type ] || {};
+
+ // handleObj is passed to all event handlers
+ handleObj = jQuery.extend({
+ type: type,
+ origType: origType,
+ data: data,
+ handler: handler,
+ guid: handler.guid,
+ selector: selector,
+ needsContext: selector && jQuery.expr.match.needsContext.test( selector ),
+ namespace: namespaces.join(".")
+ }, handleObjIn );
+
+ // Init the event handler queue if we're the first
+ if ( !(handlers = events[ type ]) ) {
+ handlers = events[ type ] = [];
+ handlers.delegateCount = 0;
+
+ // Only use addEventListener if the special events handler returns false
+ if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) {
+ if ( elem.addEventListener ) {
+ elem.addEventListener( type, eventHandle, false );
+ }
+ }
+ }
+
+ if ( special.add ) {
+ special.add.call( elem, handleObj );
+
+ if ( !handleObj.handler.guid ) {
+ handleObj.handler.guid = handler.guid;
+ }
+ }
+
+ // Add to the element's handler list, delegates in front
+ if ( selector ) {
+ handlers.splice( handlers.delegateCount++, 0, handleObj );
+ } else {
+ handlers.push( handleObj );
+ }
+
+ // Keep track of which events have ever been used, for event optimization
+ jQuery.event.global[ type ] = true;
+ }
+
+ },
+
+ // Detach an event or set of events from an element
+ remove: function( elem, types, handler, selector, mappedTypes ) {
+
+ var j, origCount, tmp,
+ events, t, handleObj,
+ special, handlers, type, namespaces, origType,
+ elemData = data_priv.hasData( elem ) && data_priv.get( elem );
+
+ if ( !elemData || !(events = elemData.events) ) {
+ return;
+ }
+
+ // Once for each type.namespace in types; type may be omitted
+ types = ( types || "" ).match( rnotwhite ) || [ "" ];
+ t = types.length;
+ while ( t-- ) {
+ tmp = rtypenamespace.exec( types[t] ) || [];
+ type = origType = tmp[1];
+ namespaces = ( tmp[2] || "" ).split( "." ).sort();
+
+ // Unbind all events (on this namespace, if provided) for the element
+ if ( !type ) {
+ for ( type in events ) {
+ jQuery.event.remove( elem, type + types[ t ], handler, selector, true );
+ }
+ continue;
+ }
+
+ special = jQuery.event.special[ type ] || {};
+ type = ( selector ? special.delegateType : special.bindType ) || type;
+ handlers = events[ type ] || [];
+ tmp = tmp[2] && new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" );
+
+ // Remove matching events
+ origCount = j = handlers.length;
+ while ( j-- ) {
+ handleObj = handlers[ j ];
+
+ if ( ( mappedTypes || origType === handleObj.origType ) &&
+ ( !handler || handler.guid === handleObj.guid ) &&
+ ( !tmp || tmp.test( handleObj.namespace ) ) &&
+ ( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) ) {
+ handlers.splice( j, 1 );
+
+ if ( handleObj.selector ) {
+ handlers.delegateCount--;
+ }
+ if ( special.remove ) {
+ special.remove.call( elem, handleObj );
+ }
+ }
+ }
+
+ // Remove generic event handler if we removed something and no more handlers exist
+ // (avoids potential for endless recursion during removal of special event handlers)
+ if ( origCount && !handlers.length ) {
+ if ( !special.teardown || special.teardown.call( elem, namespaces, elemData.handle ) === false ) {
+ jQuery.removeEvent( elem, type, elemData.handle );
+ }
+
+ delete events[ type ];
+ }
+ }
+
+ // Remove the expando if it's no longer used
+ if ( jQuery.isEmptyObject( events ) ) {
+ delete elemData.handle;
+ data_priv.remove( elem, "events" );
+ }
+ },
+
+ trigger: function( event, data, elem, onlyHandlers ) {
+
+ var i, cur, tmp, bubbleType, ontype, handle, special,
+ eventPath = [ elem || document ],
+ type = hasOwn.call( event, "type" ) ? event.type : event,
+ namespaces = hasOwn.call( event, "namespace" ) ? event.namespace.split(".") : [];
+
+ cur = tmp = elem = elem || document;
+
+ // Don't do events on text and comment nodes
+ if ( elem.nodeType === 3 || elem.nodeType === 8 ) {
+ return;
+ }
+
+ // focus/blur morphs to focusin/out; ensure we're not firing them right now
+ if ( rfocusMorph.test( type + jQuery.event.triggered ) ) {
+ return;
+ }
+
+ if ( type.indexOf(".") >= 0 ) {
+ // Namespaced trigger; create a regexp to match event type in handle()
+ namespaces = type.split(".");
+ type = namespaces.shift();
+ namespaces.sort();
+ }
+ ontype = type.indexOf(":") < 0 && "on" + type;
+
+ // Caller can pass in a jQuery.Event object, Object, or just an event type string
+ event = event[ jQuery.expando ] ?
+ event :
+ new jQuery.Event( type, typeof event === "object" && event );
+
+ // Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true)
+ event.isTrigger = onlyHandlers ? 2 : 3;
+ event.namespace = namespaces.join(".");
+ event.namespace_re = event.namespace ?
+ new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" ) :
+ null;
+
+ // Clean up the event in case it is being reused
+ event.result = undefined;
+ if ( !event.target ) {
+ event.target = elem;
+ }
+
+ // Clone any incoming data and prepend the event, creating the handler arg list
+ data = data == null ?
+ [ event ] :
+ jQuery.makeArray( data, [ event ] );
+
+ // Allow special events to draw outside the lines
+ special = jQuery.event.special[ type ] || {};
+ if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) {
+ return;
+ }
+
+ // Determine event propagation path in advance, per W3C events spec (#9951)
+ // Bubble up to document, then to window; watch for a global ownerDocument var (#9724)
+ if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) {
+
+ bubbleType = special.delegateType || type;
+ if ( !rfocusMorph.test( bubbleType + type ) ) {
+ cur = cur.parentNode;
+ }
+ for ( ; cur; cur = cur.parentNode ) {
+ eventPath.push( cur );
+ tmp = cur;
+ }
+
+ // Only add window if we got to document (e.g., not plain obj or detached DOM)
+ if ( tmp === (elem.ownerDocument || document) ) {
+ eventPath.push( tmp.defaultView || tmp.parentWindow || window );
+ }
+ }
+
+ // Fire handlers on the event path
+ i = 0;
+ while ( (cur = eventPath[i++]) && !event.isPropagationStopped() ) {
+
+ event.type = i > 1 ?
+ bubbleType :
+ special.bindType || type;
+
+ // jQuery handler
+ handle = ( data_priv.get( cur, "events" ) || {} )[ event.type ] && data_priv.get( cur, "handle" );
+ if ( handle ) {
+ handle.apply( cur, data );
+ }
+
+ // Native handler
+ handle = ontype && cur[ ontype ];
+ if ( handle && handle.apply && jQuery.acceptData( cur ) ) {
+ event.result = handle.apply( cur, data );
+ if ( event.result === false ) {
+ event.preventDefault();
+ }
+ }
+ }
+ event.type = type;
+
+ // If nobody prevented the default action, do it now
+ if ( !onlyHandlers && !event.isDefaultPrevented() ) {
+
+ if ( (!special._default || special._default.apply( eventPath.pop(), data ) === false) &&
+ jQuery.acceptData( elem ) ) {
+
+ // Call a native DOM method on the target with the same name name as the event.
+ // Don't do default actions on window, that's where global variables be (#6170)
+ if ( ontype && jQuery.isFunction( elem[ type ] ) && !jQuery.isWindow( elem ) ) {
+
+ // Don't re-trigger an onFOO event when we call its FOO() method
+ tmp = elem[ ontype ];
+
+ if ( tmp ) {
+ elem[ ontype ] = null;
+ }
+
+ // Prevent re-triggering of the same event, since we already bubbled it above
+ jQuery.event.triggered = type;
+ elem[ type ]();
+ jQuery.event.triggered = undefined;
+
+ if ( tmp ) {
+ elem[ ontype ] = tmp;
+ }
+ }
+ }
+ }
+
+ return event.result;
+ },
+
+ dispatch: function( event ) {
+
+ // Make a writable jQuery.Event from the native event object
+ event = jQuery.event.fix( event );
+
+ var i, j, ret, matched, handleObj,
+ handlerQueue = [],
+ args = slice.call( arguments ),
+ handlers = ( data_priv.get( this, "events" ) || {} )[ event.type ] || [],
+ special = jQuery.event.special[ event.type ] || {};
+
+ // Use the fix-ed jQuery.Event rather than the (read-only) native event
+ args[0] = event;
+ event.delegateTarget = this;
+
+ // Call the preDispatch hook for the mapped type, and let it bail if desired
+ if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) {
+ return;
+ }
+
+ // Determine handlers
+ handlerQueue = jQuery.event.handlers.call( this, event, handlers );
+
+ // Run delegates first; they may want to stop propagation beneath us
+ i = 0;
+ while ( (matched = handlerQueue[ i++ ]) && !event.isPropagationStopped() ) {
+ event.currentTarget = matched.elem;
+
+ j = 0;
+ while ( (handleObj = matched.handlers[ j++ ]) && !event.isImmediatePropagationStopped() ) {
+
+ // Triggered event must either 1) have no namespace, or 2) have namespace(s)
+ // a subset or equal to those in the bound event (both can have no namespace).
+ if ( !event.namespace_re || event.namespace_re.test( handleObj.namespace ) ) {
+
+ event.handleObj = handleObj;
+ event.data = handleObj.data;
+
+ ret = ( (jQuery.event.special[ handleObj.origType ] || {}).handle || handleObj.handler )
+ .apply( matched.elem, args );
+
+ if ( ret !== undefined ) {
+ if ( (event.result = ret) === false ) {
+ event.preventDefault();
+ event.stopPropagation();
+ }
+ }
+ }
+ }
+ }
+
+ // Call the postDispatch hook for the mapped type
+ if ( special.postDispatch ) {
+ special.postDispatch.call( this, event );
+ }
+
+ return event.result;
+ },
+
+ handlers: function( event, handlers ) {
+ var i, matches, sel, handleObj,
+ handlerQueue = [],
+ delegateCount = handlers.delegateCount,
+ cur = event.target;
+
+ // Find delegate handlers
+ // Black-hole SVG <use> instance trees (#13180)
+ // Avoid non-left-click bubbling in Firefox (#3861)
+ if ( delegateCount && cur.nodeType && (!event.button || event.type !== "click") ) {
+
+ for ( ; cur !== this; cur = cur.parentNode || this ) {
+
+ // Don't process clicks on disabled elements (#6911, #8165, #11382, #11764)
+ if ( cur.disabled !== true || event.type !== "click" ) {
+ matches = [];
+ for ( i = 0; i < delegateCount; i++ ) {
+ handleObj = handlers[ i ];
+
+ // Don't conflict with Object.prototype properties (#13203)
+ sel = handleObj.selector + " ";
+
+ if ( matches[ sel ] === undefined ) {
+ matches[ sel ] = handleObj.needsContext ?
+ jQuery( sel, this ).index( cur ) >= 0 :
+ jQuery.find( sel, this, null, [ cur ] ).length;
+ }
+ if ( matches[ sel ] ) {
+ matches.push( handleObj );
+ }
+ }
+ if ( matches.length ) {
+ handlerQueue.push({ elem: cur, handlers: matches });
+ }
+ }
+ }
+ }
+
+ // Add the remaining (directly-bound) handlers
+ if ( delegateCount < handlers.length ) {
+ handlerQueue.push({ elem: this, handlers: handlers.slice( delegateCount ) });
+ }
+
+ return handlerQueue;
+ },
+
+ // Includes some event props shared by KeyEvent and MouseEvent
+ props: "altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),
+
+ fixHooks: {},
+
+ keyHooks: {
+ props: "char charCode key keyCode".split(" "),
+ filter: function( event, original ) {
+
+ // Add which for key events
+ if ( event.which == null ) {
+ event.which = original.charCode != null ? original.charCode : original.keyCode;
+ }
+
+ return event;
+ }
+ },
+
+ mouseHooks: {
+ props: "button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),
+ filter: function( event, original ) {
+ var eventDoc, doc, body,
+ button = original.button;
+
+ // Calculate pageX/Y if missing and clientX/Y available
+ if ( event.pageX == null && original.clientX != null ) {
+ eventDoc = event.target.ownerDocument || document;
+ doc = eventDoc.documentElement;
+ body = eventDoc.body;
+
+ event.pageX = original.clientX + ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - ( doc && doc.clientLeft || body && body.clientLeft || 0 );
+ event.pageY = original.clientY + ( doc && doc.scrollTop || body && body.scrollTop || 0 ) - ( doc && doc.clientTop || body && body.clientTop || 0 );
+ }
+
+ // Add which for click: 1 === left; 2 === middle; 3 === right
+ // Note: button is not normalized, so don't use it
+ if ( !event.which && button !== undefined ) {
+ event.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) );
+ }
+
+ return event;
+ }
+ },
+
+ fix: function( event ) {
+ if ( event[ jQuery.expando ] ) {
+ return event;
+ }
+
+ // Create a writable copy of the event object and normalize some properties
+ var i, prop, copy,
+ type = event.type,
+ originalEvent = event,
+ fixHook = this.fixHooks[ type ];
+
+ if ( !fixHook ) {
+ this.fixHooks[ type ] = fixHook =
+ rmouseEvent.test( type ) ? this.mouseHooks :
+ rkeyEvent.test( type ) ? this.keyHooks :
+ {};
+ }
+ copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props;
+
+ event = new jQuery.Event( originalEvent );
+
+ i = copy.length;
+ while ( i-- ) {
+ prop = copy[ i ];
+ event[ prop ] = originalEvent[ prop ];
+ }
+
+ // Support: Cordova 2.5 (WebKit) (#13255)
+ // All events should have a target; Cordova deviceready doesn't
+ if ( !event.target ) {
+ event.target = document;
+ }
+
+ // Support: Safari 6.0+, Chrome<28
+ // Target should not be a text node (#504, #13143)
+ if ( event.target.nodeType === 3 ) {
+ event.target = event.target.parentNode;
+ }
+
+ return fixHook.filter ? fixHook.filter( event, originalEvent ) : event;
+ },
+
+ special: {
+ load: {
+ // Prevent triggered image.load events from bubbling to window.load
+ noBubble: true
+ },
+ focus: {
+ // Fire native event if possible so blur/focus sequence is correct
+ trigger: function() {
+ if ( this !== safeActiveElement() && this.focus ) {
+ this.focus();
+ return false;
+ }
+ },
+ delegateType: "focusin"
+ },
+ blur: {
+ trigger: function() {
+ if ( this === safeActiveElement() && this.blur ) {
+ this.blur();
+ return false;
+ }
+ },
+ delegateType: "focusout"
+ },
+ click: {
+ // For checkbox, fire native event so checked state will be right
+ trigger: function() {
+ if ( this.type === "checkbox" && this.click && jQuery.nodeName( this, "input" ) ) {
+ this.click();
+ return false;
+ }
+ },
+
+ // For cross-browser consistency, don't fire native .click() on links
+ _default: function( event ) {
+ return jQuery.nodeName( event.target, "a" );
+ }
+ },
+
+ beforeunload: {
+ postDispatch: function( event ) {
+
+ // Support: Firefox 20+
+ // Firefox doesn't alert if the returnValue field is not set.
+ if ( event.result !== undefined && event.originalEvent ) {
+ event.originalEvent.returnValue = event.result;
+ }
+ }
+ }
+ },
+
+ simulate: function( type, elem, event, bubble ) {
+ // Piggyback on a donor event to simulate a different one.
+ // Fake originalEvent to avoid donor's stopPropagation, but if the
+ // simulated event prevents default then we do the same on the donor.
+ var e = jQuery.extend(
+ new jQuery.Event(),
+ event,
+ {
+ type: type,
+ isSimulated: true,
+ originalEvent: {}
+ }
+ );
+ if ( bubble ) {
+ jQuery.event.trigger( e, null, elem );
+ } else {
+ jQuery.event.dispatch.call( elem, e );
+ }
+ if ( e.isDefaultPrevented() ) {
+ event.preventDefault();
+ }
+ }
+};
+
+jQuery.removeEvent = function( elem, type, handle ) {
+ if ( elem.removeEventListener ) {
+ elem.removeEventListener( type, handle, false );
+ }
+};
+
+jQuery.Event = function( src, props ) {
+ // Allow instantiation without the 'new' keyword
+ if ( !(this instanceof jQuery.Event) ) {
+ return new jQuery.Event( src, props );
+ }
+
+ // Event object
+ if ( src && src.type ) {
+ this.originalEvent = src;
+ this.type = src.type;
+
+ // Events bubbling up the document may have been marked as prevented
+ // by a handler lower down the tree; reflect the correct value.
+ this.isDefaultPrevented = src.defaultPrevented ||
+ src.defaultPrevented === undefined &&
+ // Support: Android<4.0
+ src.returnValue === false ?
+ returnTrue :
+ returnFalse;
+
+ // Event type
+ } else {
+ this.type = src;
+ }
+
+ // Put explicitly provided properties onto the event object
+ if ( props ) {
+ jQuery.extend( this, props );
+ }
+
+ // Create a timestamp if incoming event doesn't have one
+ this.timeStamp = src && src.timeStamp || jQuery.now();
+
+ // Mark it as fixed
+ this[ jQuery.expando ] = true;
+};
+
+// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding
+// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html
+jQuery.Event.prototype = {
+ isDefaultPrevented: returnFalse,
+ isPropagationStopped: returnFalse,
+ isImmediatePropagationStopped: returnFalse,
+
+ preventDefault: function() {
+ var e = this.originalEvent;
+
+ this.isDefaultPrevented = returnTrue;
+
+ if ( e && e.preventDefault ) {
+ e.preventDefault();
+ }
+ },
+ stopPropagation: function() {
+ var e = this.originalEvent;
+
+ this.isPropagationStopped = returnTrue;
+
+ if ( e && e.stopPropagation ) {
+ e.stopPropagation();
+ }
+ },
+ stopImmediatePropagation: function() {
+ var e = this.originalEvent;
+
+ this.isImmediatePropagationStopped = returnTrue;
+
+ if ( e && e.stopImmediatePropagation ) {
+ e.stopImmediatePropagation();
+ }
+
+ this.stopPropagation();
+ }
+};
+
+// Create mouseenter/leave events using mouseover/out and event-time checks
+// Support: Chrome 15+
+jQuery.each({
+ mouseenter: "mouseover",
+ mouseleave: "mouseout",
+ pointerenter: "pointerover",
+ pointerleave: "pointerout"
+}, function( orig, fix ) {
+ jQuery.event.special[ orig ] = {
+ delegateType: fix,
+ bindType: fix,
+
+ handle: function( event ) {
+ var ret,
+ target = this,
+ related = event.relatedTarget,
+ handleObj = event.handleObj;
+
+ // For mousenter/leave call the handler if related is outside the target.
+ // NB: No relatedTarget if the mouse left/entered the browser window
+ if ( !related || (related !== target && !jQuery.contains( target, related )) ) {
+ event.type = handleObj.origType;
+ ret = handleObj.handler.apply( this, arguments );
+ event.type = fix;
+ }
+ return ret;
+ }
+ };
+});
+
+// Support: Firefox, Chrome, Safari
+// Create "bubbling" focus and blur events
+if ( !support.focusinBubbles ) {
+ jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) {
+
+ // Attach a single capturing handler on the document while someone wants focusin/focusout
+ var handler = function( event ) {
+ jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ), true );
+ };
+
+ jQuery.event.special[ fix ] = {
+ setup: function() {
+ var doc = this.ownerDocument || this,
+ attaches = data_priv.access( doc, fix );
+
+ if ( !attaches ) {
+ doc.addEventListener( orig, handler, true );
+ }
+ data_priv.access( doc, fix, ( attaches || 0 ) + 1 );
+ },
+ teardown: function() {
+ var doc = this.ownerDocument || this,
+ attaches = data_priv.access( doc, fix ) - 1;
+
+ if ( !attaches ) {
+ doc.removeEventListener( orig, handler, true );
+ data_priv.remove( doc, fix );
+
+ } else {
+ data_priv.access( doc, fix, attaches );
+ }
+ }
+ };
+ });
+}
+
+jQuery.fn.extend({
+
+ on: function( types, selector, data, fn, /*INTERNAL*/ one ) {
+ var origFn, type;
+
+ // Types can be a map of types/handlers
+ if ( typeof types === "object" ) {
+ // ( types-Object, selector, data )
+ if ( typeof selector !== "string" ) {
+ // ( types-Object, data )
+ data = data || selector;
+ selector = undefined;
+ }
+ for ( type in types ) {
+ this.on( type, selector, data, types[ type ], one );
+ }
+ return this;
+ }
+
+ if ( data == null && fn == null ) {
+ // ( types, fn )
+ fn = selector;
+ data = selector = undefined;
+ } else if ( fn == null ) {
+ if ( typeof selector === "string" ) {
+ // ( types, selector, fn )
+ fn = data;
+ data = undefined;
+ } else {
+ // ( types, data, fn )
+ fn = data;
+ data = selector;
+ selector = undefined;
+ }
+ }
+ if ( fn === false ) {
+ fn = returnFalse;
+ } else if ( !fn ) {
+ return this;
+ }
+
+ if ( one === 1 ) {
+ origFn = fn;
+ fn = function( event ) {
+ // Can use an empty set, since event contains the info
+ jQuery().off( event );
+ return origFn.apply( this, arguments );
+ };
+ // Use same guid so caller can remove using origFn
+ fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ );
+ }
+ return this.each( function() {
+ jQuery.event.add( this, types, fn, data, selector );
+ });
+ },
+ one: function( types, selector, data, fn ) {
+ return this.on( types, selector, data, fn, 1 );
+ },
+ off: function( types, selector, fn ) {
+ var handleObj, type;
+ if ( types && types.preventDefault && types.handleObj ) {
+ // ( event ) dispatched jQuery.Event
+ handleObj = types.handleObj;
+ jQuery( types.delegateTarget ).off(
+ handleObj.namespace ? handleObj.origType + "." + handleObj.namespace : handleObj.origType,
+ handleObj.selector,
+ handleObj.handler
+ );
+ return this;
+ }
+ if ( typeof types === "object" ) {
+ // ( types-object [, selector] )
+ for ( type in types ) {
+ this.off( type, selector, types[ type ] );
+ }
+ return this;
+ }
+ if ( selector === false || typeof selector === "function" ) {
+ // ( types [, fn] )
+ fn = selector;
+ selector = undefined;
+ }
+ if ( fn === false ) {
+ fn = returnFalse;
+ }
+ return this.each(function() {
+ jQuery.event.remove( this, types, fn, selector );
+ });
+ },
+
+ trigger: function( type, data ) {
+ return this.each(function() {
+ jQuery.event.trigger( type, data, this );
+ });
+ },
+ triggerHandler: function( type, data ) {
+ var elem = this[0];
+ if ( elem ) {
+ return jQuery.event.trigger( type, data, elem, true );
+ }
+ }
+});
+
+
+var
+ rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,
+ rtagName = /<([\w:]+)/,
+ rhtml = /<|&#?\w+;/,
+ rnoInnerhtml = /<(?:script|style|link)/i,
+ // checked="checked" or checked
+ rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i,
+ rscriptType = /^$|\/(?:java|ecma)script/i,
+ rscriptTypeMasked = /^true\/(.*)/,
+ rcleanScript = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,
+
+ // We have to close these tags to support XHTML (#13200)
+ wrapMap = {
+
+ // Support: IE9
+ option: [ 1, "<select multiple='multiple'>", "</select>" ],
+
+ thead: [ 1, "<table>", "</table>" ],
+ col: [ 2, "<table><colgroup>", "</colgroup></table>" ],
+ tr: [ 2, "<table><tbody>", "</tbody></table>" ],
+ td: [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ],
+
+ _default: [ 0, "", "" ]
+ };
+
+// Support: IE9
+wrapMap.optgroup = wrapMap.option;
+
+wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;
+wrapMap.th = wrapMap.td;
+
+// Support: 1.x compatibility
+// Manipulating tables requires a tbody
+function manipulationTarget( elem, content ) {
+ return jQuery.nodeName( elem, "table" ) &&
+ jQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, "tr" ) ?
+
+ elem.getElementsByTagName("tbody")[0] ||
+ elem.appendChild( elem.ownerDocument.createElement("tbody") ) :
+ elem;
+}
+
+// Replace/restore the type attribute of script elements for safe DOM manipulation
+function disableScript( elem ) {
+ elem.type = (elem.getAttribute("type") !== null) + "/" + elem.type;
+ return elem;
+}
+function restoreScript( elem ) {
+ var match = rscriptTypeMasked.exec( elem.type );
+
+ if ( match ) {
+ elem.type = match[ 1 ];
+ } else {
+ elem.removeAttribute("type");
+ }
+
+ return elem;
+}
+
+// Mark scripts as having already been evaluated
+function setGlobalEval( elems, refElements ) {
+ var i = 0,
+ l = elems.length;
+
+ for ( ; i < l; i++ ) {
+ data_priv.set(
+ elems[ i ], "globalEval", !refElements || data_priv.get( refElements[ i ], "globalEval" )
+ );
+ }
+}
+
+function cloneCopyEvent( src, dest ) {
+ var i, l, type, pdataOld, pdataCur, udataOld, udataCur, events;
+
+ if ( dest.nodeType !== 1 ) {
+ return;
+ }
+
+ // 1. Copy private data: events, handlers, etc.
+ if ( data_priv.hasData( src ) ) {
+ pdataOld = data_priv.access( src );
+ pdataCur = data_priv.set( dest, pdataOld );
+ events = pdataOld.events;
+
+ if ( events ) {
+ delete pdataCur.handle;
+ pdataCur.events = {};
+
+ for ( type in events ) {
+ for ( i = 0, l = events[ type ].length; i < l; i++ ) {
+ jQuery.event.add( dest, type, events[ type ][ i ] );
+ }
+ }
+ }
+ }
+
+ // 2. Copy user data
+ if ( data_user.hasData( src ) ) {
+ udataOld = data_user.access( src );
+ udataCur = jQuery.extend( {}, udataOld );
+
+ data_user.set( dest, udataCur );
+ }
+}
+
+function getAll( context, tag ) {
+ var ret = context.getElementsByTagName ? context.getElementsByTagName( tag || "*" ) :
+ context.querySelectorAll ? context.querySelectorAll( tag || "*" ) :
+ [];
+
+ return tag === undefined || tag && jQuery.nodeName( context, tag ) ?
+ jQuery.merge( [ context ], ret ) :
+ ret;
+}
+
+// Fix IE bugs, see support tests
+function fixInput( src, dest ) {
+ var nodeName = dest.nodeName.toLowerCase();
+
+ // Fails to persist the checked state of a cloned checkbox or radio button.
+ if ( nodeName === "input" && rcheckableType.test( src.type ) ) {
+ dest.checked = src.checked;
+
+ // Fails to return the selected option to the default selected state when cloning options
+ } else if ( nodeName === "input" || nodeName === "textarea" ) {
+ dest.defaultValue = src.defaultValue;
+ }
+}
+
+jQuery.extend({
+ clone: function( elem, dataAndEvents, deepDataAndEvents ) {
+ var i, l, srcElements, destElements,
+ clone = elem.cloneNode( true ),
+ inPage = jQuery.contains( elem.ownerDocument, elem );
+
+ // Fix IE cloning issues
+ if ( !support.noCloneChecked && ( elem.nodeType === 1 || elem.nodeType === 11 ) &&
+ !jQuery.isXMLDoc( elem ) ) {
+
+ // We eschew Sizzle here for performance reasons: http://jsperf.com/getall-vs-sizzle/2
+ destElements = getAll( clone );
+ srcElements = getAll( elem );
+
+ for ( i = 0, l = srcElements.length; i < l; i++ ) {
+ fixInput( srcElements[ i ], destElements[ i ] );
+ }
+ }
+
+ // Copy the events from the original to the clone
+ if ( dataAndEvents ) {
+ if ( deepDataAndEvents ) {
+ srcElements = srcElements || getAll( elem );
+ destElements = destElements || getAll( clone );
+
+ for ( i = 0, l = srcElements.length; i < l; i++ ) {
+ cloneCopyEvent( srcElements[ i ], destElements[ i ] );
+ }
+ } else {
+ cloneCopyEvent( elem, clone );
+ }
+ }
+
+ // Preserve script evaluation history
+ destElements = getAll( clone, "script" );
+ if ( destElements.length > 0 ) {
+ setGlobalEval( destElements, !inPage && getAll( elem, "script" ) );
+ }
+
+ // Return the cloned set
+ return clone;
+ },
+
+ buildFragment: function( elems, context, scripts, selection ) {
+ var elem, tmp, tag, wrap, contains, j,
+ fragment = context.createDocumentFragment(),
+ nodes = [],
+ i = 0,
+ l = elems.length;
+
+ for ( ; i < l; i++ ) {
+ elem = elems[ i ];
+
+ if ( elem || elem === 0 ) {
+
+ // Add nodes directly
+ if ( jQuery.type( elem ) === "object" ) {
+ // Support: QtWebKit, PhantomJS
+ // push.apply(_, arraylike) throws on ancient WebKit
+ jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem );
+
+ // Convert non-html into a text node
+ } else if ( !rhtml.test( elem ) ) {
+ nodes.push( context.createTextNode( elem ) );
+
+ // Convert html into DOM nodes
+ } else {
+ tmp = tmp || fragment.appendChild( context.createElement("div") );
+
+ // Deserialize a standard representation
+ tag = ( rtagName.exec( elem ) || [ "", "" ] )[ 1 ].toLowerCase();
+ wrap = wrapMap[ tag ] || wrapMap._default;
+ tmp.innerHTML = wrap[ 1 ] + elem.replace( rxhtmlTag, "<$1></$2>" ) + wrap[ 2 ];
+
+ // Descend through wrappers to the right content
+ j = wrap[ 0 ];
+ while ( j-- ) {
+ tmp = tmp.lastChild;
+ }
+
+ // Support: QtWebKit, PhantomJS
+ // push.apply(_, arraylike) throws on ancient WebKit
+ jQuery.merge( nodes, tmp.childNodes );
+
+ // Remember the top-level container
+ tmp = fragment.firstChild;
+
+ // Ensure the created nodes are orphaned (#12392)
+ tmp.textContent = "";
+ }
+ }
+ }
+
+ // Remove wrapper from fragment
+ fragment.textContent = "";
+
+ i = 0;
+ while ( (elem = nodes[ i++ ]) ) {
+
+ // #4087 - If origin and destination elements are the same, and this is
+ // that element, do not do anything
+ if ( selection && jQuery.inArray( elem, selection ) !== -1 ) {
+ continue;
+ }
+
+ contains = jQuery.contains( elem.ownerDocument, elem );
+
+ // Append to fragment
+ tmp = getAll( fragment.appendChild( elem ), "script" );
+
+ // Preserve script evaluation history
+ if ( contains ) {
+ setGlobalEval( tmp );
+ }
+
+ // Capture executables
+ if ( scripts ) {
+ j = 0;
+ while ( (elem = tmp[ j++ ]) ) {
+ if ( rscriptType.test( elem.type || "" ) ) {
+ scripts.push( elem );
+ }
+ }
+ }
+ }
+
+ return fragment;
+ },
+
+ cleanData: function( elems ) {
+ var data, elem, type, key,
+ special = jQuery.event.special,
+ i = 0;
+
+ for ( ; (elem = elems[ i ]) !== undefined; i++ ) {
+ if ( jQuery.acceptData( elem ) ) {
+ key = elem[ data_priv.expando ];
+
+ if ( key && (data = data_priv.cache[ key ]) ) {
+ if ( data.events ) {
+ for ( type in data.events ) {
+ if ( special[ type ] ) {
+ jQuery.event.remove( elem, type );
+
+ // This is a shortcut to avoid jQuery.event.remove's overhead
+ } else {
+ jQuery.removeEvent( elem, type, data.handle );
+ }
+ }
+ }
+ if ( data_priv.cache[ key ] ) {
+ // Discard any remaining `private` data
+ delete data_priv.cache[ key ];
+ }
+ }
+ }
+ // Discard any remaining `user` data
+ delete data_user.cache[ elem[ data_user.expando ] ];
+ }
+ }
+});
+
+jQuery.fn.extend({
+ text: function( value ) {
+ return access( this, function( value ) {
+ return value === undefined ?
+ jQuery.text( this ) :
+ this.empty().each(function() {
+ if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {
+ this.textContent = value;
+ }
+ });
+ }, null, value, arguments.length );
+ },
+
+ append: function() {
+ return this.domManip( arguments, function( elem ) {
+ if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {
+ var target = manipulationTarget( this, elem );
+ target.appendChild( elem );
+ }
+ });
+ },
+
+ prepend: function() {
+ return this.domManip( arguments, function( elem ) {
+ if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {
+ var target = manipulationTarget( this, elem );
+ target.insertBefore( elem, target.firstChild );
+ }
+ });
+ },
+
+ before: function() {
+ return this.domManip( arguments, function( elem ) {
+ if ( this.parentNode ) {
+ this.parentNode.insertBefore( elem, this );
+ }
+ });
+ },
+
+ after: function() {
+ return this.domManip( arguments, function( elem ) {
+ if ( this.parentNode ) {
+ this.parentNode.insertBefore( elem, this.nextSibling );
+ }
+ });
+ },
+
+ remove: function( selector, keepData /* Internal Use Only */ ) {
+ var elem,
+ elems = selector ? jQuery.filter( selector, this ) : this,
+ i = 0;
+
+ for ( ; (elem = elems[i]) != null; i++ ) {
+ if ( !keepData && elem.nodeType === 1 ) {
+ jQuery.cleanData( getAll( elem ) );
+ }
+
+ if ( elem.parentNode ) {
+ if ( keepData && jQuery.contains( elem.ownerDocument, elem ) ) {
+ setGlobalEval( getAll( elem, "script" ) );
+ }
+ elem.parentNode.removeChild( elem );
+ }
+ }
+
+ return this;
+ },
+
+ empty: function() {
+ var elem,
+ i = 0;
+
+ for ( ; (elem = this[i]) != null; i++ ) {
+ if ( elem.nodeType === 1 ) {
+
+ // Prevent memory leaks
+ jQuery.cleanData( getAll( elem, false ) );
+
+ // Remove any remaining nodes
+ elem.textContent = "";
+ }
+ }
+
+ return this;
+ },
+
+ clone: function( dataAndEvents, deepDataAndEvents ) {
+ dataAndEvents = dataAndEvents == null ? false : dataAndEvents;
+ deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;
+
+ return this.map(function() {
+ return jQuery.clone( this, dataAndEvents, deepDataAndEvents );
+ });
+ },
+
+ html: function( value ) {
+ return access( this, function( value ) {
+ var elem = this[ 0 ] || {},
+ i = 0,
+ l = this.length;
+
+ if ( value === undefined && elem.nodeType === 1 ) {
+ return elem.innerHTML;
+ }
+
+ // See if we can take a shortcut and just use innerHTML
+ if ( typeof value === "string" && !rnoInnerhtml.test( value ) &&
+ !wrapMap[ ( rtagName.exec( value ) || [ "", "" ] )[ 1 ].toLowerCase() ] ) {
+
+ value = value.replace( rxhtmlTag, "<$1></$2>" );
+
+ try {
+ for ( ; i < l; i++ ) {
+ elem = this[ i ] || {};
+
+ // Remove element nodes and prevent memory leaks
+ if ( elem.nodeType === 1 ) {
+ jQuery.cleanData( getAll( elem, false ) );
+ elem.innerHTML = value;
+ }
+ }
+
+ elem = 0;
+
+ // If using innerHTML throws an exception, use the fallback method
+ } catch( e ) {}
+ }
+
+ if ( elem ) {
+ this.empty().append( value );
+ }
+ }, null, value, arguments.length );
+ },
+
+ replaceWith: function() {
+ var arg = arguments[ 0 ];
+
+ // Make the changes, replacing each context element with the new content
+ this.domManip( arguments, function( elem ) {
+ arg = this.parentNode;
+
+ jQuery.cleanData( getAll( this ) );
+
+ if ( arg ) {
+ arg.replaceChild( elem, this );
+ }
+ });
+
+ // Force removal if there was no new content (e.g., from empty arguments)
+ return arg && (arg.length || arg.nodeType) ? this : this.remove();
+ },
+
+ detach: function( selector ) {
+ return this.remove( selector, true );
+ },
+
+ domManip: function( args, callback ) {
+
+ // Flatten any nested arrays
+ args = concat.apply( [], args );
+
+ var fragment, first, scripts, hasScripts, node, doc,
+ i = 0,
+ l = this.length,
+ set = this,
+ iNoClone = l - 1,
+ value = args[ 0 ],
+ isFunction = jQuery.isFunction( value );
+
+ // We can't cloneNode fragments that contain checked, in WebKit
+ if ( isFunction ||
+ ( l > 1 && typeof value === "string" &&
+ !support.checkClone && rchecked.test( value ) ) ) {
+ return this.each(function( index ) {
+ var self = set.eq( index );
+ if ( isFunction ) {
+ args[ 0 ] = value.call( this, index, self.html() );
+ }
+ self.domManip( args, callback );
+ });
+ }
+
+ if ( l ) {
+ fragment = jQuery.buildFragment( args, this[ 0 ].ownerDocument, false, this );
+ first = fragment.firstChild;
+
+ if ( fragment.childNodes.length === 1 ) {
+ fragment = first;
+ }
+
+ if ( first ) {
+ scripts = jQuery.map( getAll( fragment, "script" ), disableScript );
+ hasScripts = scripts.length;
+
+ // Use the original fragment for the last item instead of the first because it can end up
+ // being emptied incorrectly in certain situations (#8070).
+ for ( ; i < l; i++ ) {
+ node = fragment;
+
+ if ( i !== iNoClone ) {
+ node = jQuery.clone( node, true, true );
+
+ // Keep references to cloned scripts for later restoration
+ if ( hasScripts ) {
+ // Support: QtWebKit
+ // jQuery.merge because push.apply(_, arraylike) throws
+ jQuery.merge( scripts, getAll( node, "script" ) );
+ }
+ }
+
+ callback.call( this[ i ], node, i );
+ }
+
+ if ( hasScripts ) {
+ doc = scripts[ scripts.length - 1 ].ownerDocument;
+
+ // Reenable scripts
+ jQuery.map( scripts, restoreScript );
+
+ // Evaluate executable scripts on first document insertion
+ for ( i = 0; i < hasScripts; i++ ) {
+ node = scripts[ i ];
+ if ( rscriptType.test( node.type || "" ) &&
+ !data_priv.access( node, "globalEval" ) && jQuery.contains( doc, node ) ) {
+
+ if ( node.src ) {
+ // Optional AJAX dependency, but won't run scripts if not present
+ if ( jQuery._evalUrl ) {
+ jQuery._evalUrl( node.src );
+ }
+ } else {
+ jQuery.globalEval( node.textContent.replace( rcleanScript, "" ) );
+ }
+ }
+ }
+ }
+ }
+ }
+
+ return this;
+ }
+});
+
+jQuery.each({
+ appendTo: "append",
+ prependTo: "prepend",
+ insertBefore: "before",
+ insertAfter: "after",
+ replaceAll: "replaceWith"
+}, function( name, original ) {
+ jQuery.fn[ name ] = function( selector ) {
+ var elems,
+ ret = [],
+ insert = jQuery( selector ),
+ last = insert.length - 1,
+ i = 0;
+
+ for ( ; i <= last; i++ ) {
+ elems = i === last ? this : this.clone( true );
+ jQuery( insert[ i ] )[ original ]( elems );
+
+ // Support: QtWebKit
+ // .get() because push.apply(_, arraylike) throws
+ push.apply( ret, elems.get() );
+ }
+
+ return this.pushStack( ret );
+ };
+});
+
+
+var iframe,
+ elemdisplay = {};
+
+/**
+ * Retrieve the actual display of a element
+ * @param {String} name nodeName of the element
+ * @param {Object} doc Document object
+ */
+// Called only from within defaultDisplay
+function actualDisplay( name, doc ) {
+ var style,
+ elem = jQuery( doc.createElement( name ) ).appendTo( doc.body ),
+
+ // getDefaultComputedStyle might be reliably used only on attached element
+ display = window.getDefaultComputedStyle && ( style = window.getDefaultComputedStyle( elem[ 0 ] ) ) ?
+
+ // Use of this method is a temporary fix (more like optimization) until something better comes along,
+ // since it was removed from specification and supported only in FF
+ style.display : jQuery.css( elem[ 0 ], "display" );
+
+ // We don't have any data stored on the element,
+ // so use "detach" method as fast way to get rid of the element
+ elem.detach();
+
+ return display;
+}
+
+/**
+ * Try to determine the default display value of an element
+ * @param {String} nodeName
+ */
+function defaultDisplay( nodeName ) {
+ var doc = document,
+ display = elemdisplay[ nodeName ];
+
+ if ( !display ) {
+ display = actualDisplay( nodeName, doc );
+
+ // If the simple way fails, read from inside an iframe
+ if ( display === "none" || !display ) {
+
+ // Use the already-created iframe if possible
+ iframe = (iframe || jQuery( "<iframe frameborder='0' width='0' height='0'/>" )).appendTo( doc.documentElement );
+
+ // Always write a new HTML skeleton so Webkit and Firefox don't choke on reuse
+ doc = iframe[ 0 ].contentDocument;
+
+ // Support: IE
+ doc.write();
+ doc.close();
+
+ display = actualDisplay( nodeName, doc );
+ iframe.detach();
+ }
+
+ // Store the correct default display
+ elemdisplay[ nodeName ] = display;
+ }
+
+ return display;
+}
+var rmargin = (/^margin/);
+
+var rnumnonpx = new RegExp( "^(" + pnum + ")(?!px)[a-z%]+$", "i" );
+
+var getStyles = function( elem ) {
+ // Support: IE<=11+, Firefox<=30+ (#15098, #14150)
+ // IE throws on elements created in popups
+ // FF meanwhile throws on frame elements through "defaultView.getComputedStyle"
+ if ( elem.ownerDocument.defaultView.opener ) {
+ return elem.ownerDocument.defaultView.getComputedStyle( elem, null );
+ }
+
+ return window.getComputedStyle( elem, null );
+ };
+
+
+
+function curCSS( elem, name, computed ) {
+ var width, minWidth, maxWidth, ret,
+ style = elem.style;
+
+ computed = computed || getStyles( elem );
+
+ // Support: IE9
+ // getPropertyValue is only needed for .css('filter') (#12537)
+ if ( computed ) {
+ ret = computed.getPropertyValue( name ) || computed[ name ];
+ }
+
+ if ( computed ) {
+
+ if ( ret === "" && !jQuery.contains( elem.ownerDocument, elem ) ) {
+ ret = jQuery.style( elem, name );
+ }
+
+ // Support: iOS < 6
+ // A tribute to the "awesome hack by Dean Edwards"
+ // iOS < 6 (at least) returns percentage for a larger set of values, but width seems to be reliably pixels
+ // this is against the CSSOM draft spec: http://dev.w3.org/csswg/cssom/#resolved-values
+ if ( rnumnonpx.test( ret ) && rmargin.test( name ) ) {
+
+ // Remember the original values
+ width = style.width;
+ minWidth = style.minWidth;
+ maxWidth = style.maxWidth;
+
+ // Put in the new values to get a computed value out
+ style.minWidth = style.maxWidth = style.width = ret;
+ ret = computed.width;
+
+ // Revert the changed values
+ style.width = width;
+ style.minWidth = minWidth;
+ style.maxWidth = maxWidth;
+ }
+ }
+
+ return ret !== undefined ?
+ // Support: IE
+ // IE returns zIndex value as an integer.
+ ret + "" :
+ ret;
+}
+
+
+function addGetHookIf( conditionFn, hookFn ) {
+ // Define the hook, we'll check on the first run if it's really needed.
+ return {
+ get: function() {
+ if ( conditionFn() ) {
+ // Hook not needed (or it's not possible to use it due
+ // to missing dependency), remove it.
+ delete this.get;
+ return;
+ }
+
+ // Hook needed; redefine it so that the support test is not executed again.
+ return (this.get = hookFn).apply( this, arguments );
+ }
+ };
+}
+
+
+(function() {
+ var pixelPositionVal, boxSizingReliableVal,
+ docElem = document.documentElement,
+ container = document.createElement( "div" ),
+ div = document.createElement( "div" );
+
+ if ( !div.style ) {
+ return;
+ }
+
+ // Support: IE9-11+
+ // Style of cloned element affects source element cloned (#8908)
+ div.style.backgroundClip = "content-box";
+ div.cloneNode( true ).style.backgroundClip = "";
+ support.clearCloneStyle = div.style.backgroundClip === "content-box";
+
+ container.style.cssText = "border:0;width:0;height:0;top:0;left:-9999px;margin-top:1px;" +
+ "position:absolute";
+ container.appendChild( div );
+
+ // Executing both pixelPosition & boxSizingReliable tests require only one layout
+ // so they're executed at the same time to save the second computation.
+ function computePixelPositionAndBoxSizingReliable() {
+ div.style.cssText =
+ // Support: Firefox<29, Android 2.3
+ // Vendor-prefix box-sizing
+ "-webkit-box-sizing:border-box;-moz-box-sizing:border-box;" +
+ "box-sizing:border-box;display:block;margin-top:1%;top:1%;" +
+ "border:1px;padding:1px;width:4px;position:absolute";
+ div.innerHTML = "";
+ docElem.appendChild( container );
+
+ var divStyle = window.getComputedStyle( div, null );
+ pixelPositionVal = divStyle.top !== "1%";
+ boxSizingReliableVal = divStyle.width === "4px";
+
+ docElem.removeChild( container );
+ }
+
+ // Support: node.js jsdom
+ // Don't assume that getComputedStyle is a property of the global object
+ if ( window.getComputedStyle ) {
+ jQuery.extend( support, {
+ pixelPosition: function() {
+
+ // This test is executed only once but we still do memoizing
+ // since we can use the boxSizingReliable pre-computing.
+ // No need to check if the test was already performed, though.
+ computePixelPositionAndBoxSizingReliable();
+ return pixelPositionVal;
+ },
+ boxSizingReliable: function() {
+ if ( boxSizingReliableVal == null ) {
+ computePixelPositionAndBoxSizingReliable();
+ }
+ return boxSizingReliableVal;
+ },
+ reliableMarginRight: function() {
+
+ // Support: Android 2.3
+ // Check if div with explicit width and no margin-right incorrectly
+ // gets computed margin-right based on width of container. (#3333)
+ // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
+ // This support function is only executed once so no memoizing is needed.
+ var ret,
+ marginDiv = div.appendChild( document.createElement( "div" ) );
+
+ // Reset CSS: box-sizing; display; margin; border; padding
+ marginDiv.style.cssText = div.style.cssText =
+ // Support: Firefox<29, Android 2.3
+ // Vendor-prefix box-sizing
+ "-webkit-box-sizing:content-box;-moz-box-sizing:content-box;" +
+ "box-sizing:content-box;display:block;margin:0;border:0;padding:0";
+ marginDiv.style.marginRight = marginDiv.style.width = "0";
+ div.style.width = "1px";
+ docElem.appendChild( container );
+
+ ret = !parseFloat( window.getComputedStyle( marginDiv, null ).marginRight );
+
+ docElem.removeChild( container );
+ div.removeChild( marginDiv );
+
+ return ret;
+ }
+ });
+ }
+})();
+
+
+// A method for quickly swapping in/out CSS properties to get correct calculations.
+jQuery.swap = function( elem, options, callback, args ) {
+ var ret, name,
+ old = {};
+
+ // Remember the old values, and insert the new ones
+ for ( name in options ) {
+ old[ name ] = elem.style[ name ];
+ elem.style[ name ] = options[ name ];
+ }
+
+ ret = callback.apply( elem, args || [] );
+
+ // Revert the old values
+ for ( name in options ) {
+ elem.style[ name ] = old[ name ];
+ }
+
+ return ret;
+};
+
+
+var
+ // Swappable if display is none or starts with table except "table", "table-cell", or "table-caption"
+ // See here for display values: https://developer.mozilla.org/en-US/docs/CSS/display
+ rdisplayswap = /^(none|table(?!-c[ea]).+)/,
+ rnumsplit = new RegExp( "^(" + pnum + ")(.*)$", "i" ),
+ rrelNum = new RegExp( "^([+-])=(" + pnum + ")", "i" ),
+
+ cssShow = { position: "absolute", visibility: "hidden", display: "block" },
+ cssNormalTransform = {
+ letterSpacing: "0",
+ fontWeight: "400"
+ },
+
+ cssPrefixes = [ "Webkit", "O", "Moz", "ms" ];
+
+// Return a css property mapped to a potentially vendor prefixed property
+function vendorPropName( style, name ) {
+
+ // Shortcut for names that are not vendor prefixed
+ if ( name in style ) {
+ return name;
+ }
+
+ // Check for vendor prefixed names
+ var capName = name[0].toUpperCase() + name.slice(1),
+ origName = name,
+ i = cssPrefixes.length;
+
+ while ( i-- ) {
+ name = cssPrefixes[ i ] + capName;
+ if ( name in style ) {
+ return name;
+ }
+ }
+
+ return origName;
+}
+
+function setPositiveNumber( elem, value, subtract ) {
+ var matches = rnumsplit.exec( value );
+ return matches ?
+ // Guard against undefined "subtract", e.g., when used as in cssHooks
+ Math.max( 0, matches[ 1 ] - ( subtract || 0 ) ) + ( matches[ 2 ] || "px" ) :
+ value;
+}
+
+function augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) {
+ var i = extra === ( isBorderBox ? "border" : "content" ) ?
+ // If we already have the right measurement, avoid augmentation
+ 4 :
+ // Otherwise initialize for horizontal or vertical properties
+ name === "width" ? 1 : 0,
+
+ val = 0;
+
+ for ( ; i < 4; i += 2 ) {
+ // Both box models exclude margin, so add it if we want it
+ if ( extra === "margin" ) {
+ val += jQuery.css( elem, extra + cssExpand[ i ], true, styles );
+ }
+
+ if ( isBorderBox ) {
+ // border-box includes padding, so remove it if we want content
+ if ( extra === "content" ) {
+ val -= jQuery.css( elem, "padding" + cssExpand[ i ], true, styles );
+ }
+
+ // At this point, extra isn't border nor margin, so remove border
+ if ( extra !== "margin" ) {
+ val -= jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );
+ }
+ } else {
+ // At this point, extra isn't content, so add padding
+ val += jQuery.css( elem, "padding" + cssExpand[ i ], true, styles );
+
+ // At this point, extra isn't content nor padding, so add border
+ if ( extra !== "padding" ) {
+ val += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );
+ }
+ }
+ }
+
+ return val;
+}
+
+function getWidthOrHeight( elem, name, extra ) {
+
+ // Start with offset property, which is equivalent to the border-box value
+ var valueIsBorderBox = true,
+ val = name === "width" ? elem.offsetWidth : elem.offsetHeight,
+ styles = getStyles( elem ),
+ isBorderBox = jQuery.css( elem, "boxSizing", false, styles ) === "border-box";
+
+ // Some non-html elements return undefined for offsetWidth, so check for null/undefined
+ // svg - https://bugzilla.mozilla.org/show_bug.cgi?id=649285
+ // MathML - https://bugzilla.mozilla.org/show_bug.cgi?id=491668
+ if ( val <= 0 || val == null ) {
+ // Fall back to computed then uncomputed css if necessary
+ val = curCSS( elem, name, styles );
+ if ( val < 0 || val == null ) {
+ val = elem.style[ name ];
+ }
+
+ // Computed unit is not pixels. Stop here and return.
+ if ( rnumnonpx.test(val) ) {
+ return val;
+ }
+
+ // Check for style in case a browser which returns unreliable values
+ // for getComputedStyle silently falls back to the reliable elem.style
+ valueIsBorderBox = isBorderBox &&
+ ( support.boxSizingReliable() || val === elem.style[ name ] );
+
+ // Normalize "", auto, and prepare for extra
+ val = parseFloat( val ) || 0;
+ }
+
+ // Use the active box-sizing model to add/subtract irrelevant styles
+ return ( val +
+ augmentWidthOrHeight(
+ elem,
+ name,
+ extra || ( isBorderBox ? "border" : "content" ),
+ valueIsBorderBox,
+ styles
+ )
+ ) + "px";
+}
+
+function showHide( elements, show ) {
+ var display, elem, hidden,
+ values = [],
+ index = 0,
+ length = elements.length;
+
+ for ( ; index < length; index++ ) {
+ elem = elements[ index ];
+ if ( !elem.style ) {
+ continue;
+ }
+
+ values[ index ] = data_priv.get( elem, "olddisplay" );
+ display = elem.style.display;
+ if ( show ) {
+ // Reset the inline display of this element to learn if it is
+ // being hidden by cascaded rules or not
+ if ( !values[ index ] && display === "none" ) {
+ elem.style.display = "";
+ }
+
+ // Set elements which have been overridden with display: none
+ // in a stylesheet to whatever the default browser style is
+ // for such an element
+ if ( elem.style.display === "" && isHidden( elem ) ) {
+ values[ index ] = data_priv.access( elem, "olddisplay", defaultDisplay(elem.nodeName) );
+ }
+ } else {
+ hidden = isHidden( elem );
+
+ if ( display !== "none" || !hidden ) {
+ data_priv.set( elem, "olddisplay", hidden ? display : jQuery.css( elem, "display" ) );
+ }
+ }
+ }
+
+ // Set the display of most of the elements in a second loop
+ // to avoid the constant reflow
+ for ( index = 0; index < length; index++ ) {
+ elem = elements[ index ];
+ if ( !elem.style ) {
+ continue;
+ }
+ if ( !show || elem.style.display === "none" || elem.style.display === "" ) {
+ elem.style.display = show ? values[ index ] || "" : "none";
+ }
+ }
+
+ return elements;
+}
+
+jQuery.extend({
+
+ // Add in style property hooks for overriding the default
+ // behavior of getting and setting a style property
+ cssHooks: {
+ opacity: {
+ get: function( elem, computed ) {
+ if ( computed ) {
+
+ // We should always get a number back from opacity
+ var ret = curCSS( elem, "opacity" );
+ return ret === "" ? "1" : ret;
+ }
+ }
+ }
+ },
+
+ // Don't automatically add "px" to these possibly-unitless properties
+ cssNumber: {
+ "columnCount": true,
+ "fillOpacity": true,
+ "flexGrow": true,
+ "flexShrink": true,
+ "fontWeight": true,
+ "lineHeight": true,
+ "opacity": true,
+ "order": true,
+ "orphans": true,
+ "widows": true,
+ "zIndex": true,
+ "zoom": true
+ },
+
+ // Add in properties whose names you wish to fix before
+ // setting or getting the value
+ cssProps: {
+ "float": "cssFloat"
+ },
+
+ // Get and set the style property on a DOM Node
+ style: function( elem, name, value, extra ) {
+
+ // Don't set styles on text and comment nodes
+ if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {
+ return;
+ }
+
+ // Make sure that we're working with the right name
+ var ret, type, hooks,
+ origName = jQuery.camelCase( name ),
+ style = elem.style;
+
+ name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( style, origName ) );
+
+ // Gets hook for the prefixed version, then unprefixed version
+ hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];
+
+ // Check if we're setting a value
+ if ( value !== undefined ) {
+ type = typeof value;
+
+ // Convert "+=" or "-=" to relative numbers (#7345)
+ if ( type === "string" && (ret = rrelNum.exec( value )) ) {
+ value = ( ret[1] + 1 ) * ret[2] + parseFloat( jQuery.css( elem, name ) );
+ // Fixes bug #9237
+ type = "number";
+ }
+
+ // Make sure that null and NaN values aren't set (#7116)
+ if ( value == null || value !== value ) {
+ return;
+ }
+
+ // If a number, add 'px' to the (except for certain CSS properties)
+ if ( type === "number" && !jQuery.cssNumber[ origName ] ) {
+ value += "px";
+ }
+
+ // Support: IE9-11+
+ // background-* props affect original clone's values
+ if ( !support.clearCloneStyle && value === "" && name.indexOf( "background" ) === 0 ) {
+ style[ name ] = "inherit";
+ }
+
+ // If a hook was provided, use that value, otherwise just set the specified value
+ if ( !hooks || !("set" in hooks) || (value = hooks.set( elem, value, extra )) !== undefined ) {
+ style[ name ] = value;
+ }
+
+ } else {
+ // If a hook was provided get the non-computed value from there
+ if ( hooks && "get" in hooks && (ret = hooks.get( elem, false, extra )) !== undefined ) {
+ return ret;
+ }
+
+ // Otherwise just get the value from the style object
+ return style[ name ];
+ }
+ },
+
+ css: function( elem, name, extra, styles ) {
+ var val, num, hooks,
+ origName = jQuery.camelCase( name );
+
+ // Make sure that we're working with the right name
+ name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( elem.style, origName ) );
+
+ // Try prefixed name followed by the unprefixed name
+ hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];
+
+ // If a hook was provided get the computed value from there
+ if ( hooks && "get" in hooks ) {
+ val = hooks.get( elem, true, extra );
+ }
+
+ // Otherwise, if a way to get the computed value exists, use that
+ if ( val === undefined ) {
+ val = curCSS( elem, name, styles );
+ }
+
+ // Convert "normal" to computed value
+ if ( val === "normal" && name in cssNormalTransform ) {
+ val = cssNormalTransform[ name ];
+ }
+
+ // Make numeric if forced or a qualifier was provided and val looks numeric
+ if ( extra === "" || extra ) {
+ num = parseFloat( val );
+ return extra === true || jQuery.isNumeric( num ) ? num || 0 : val;
+ }
+ return val;
+ }
+});
+
+jQuery.each([ "height", "width" ], function( i, name ) {
+ jQuery.cssHooks[ name ] = {
+ get: function( elem, computed, extra ) {
+ if ( computed ) {
+
+ // Certain elements can have dimension info if we invisibly show them
+ // but it must have a current display style that would benefit
+ return rdisplayswap.test( jQuery.css( elem, "display" ) ) && elem.offsetWidth === 0 ?
+ jQuery.swap( elem, cssShow, function() {
+ return getWidthOrHeight( elem, name, extra );
+ }) :
+ getWidthOrHeight( elem, name, extra );
+ }
+ },
+
+ set: function( elem, value, extra ) {
+ var styles = extra && getStyles( elem );
+ return setPositiveNumber( elem, value, extra ?
+ augmentWidthOrHeight(
+ elem,
+ name,
+ extra,
+ jQuery.css( elem, "boxSizing", false, styles ) === "border-box",
+ styles
+ ) : 0
+ );
+ }
+ };
+});
+
+// Support: Android 2.3
+jQuery.cssHooks.marginRight = addGetHookIf( support.reliableMarginRight,
+ function( elem, computed ) {
+ if ( computed ) {
+ return jQuery.swap( elem, { "display": "inline-block" },
+ curCSS, [ elem, "marginRight" ] );
+ }
+ }
+);
+
+// These hooks are used by animate to expand properties
+jQuery.each({
+ margin: "",
+ padding: "",
+ border: "Width"
+}, function( prefix, suffix ) {
+ jQuery.cssHooks[ prefix + suffix ] = {
+ expand: function( value ) {
+ var i = 0,
+ expanded = {},
+
+ // Assumes a single number if not a string
+ parts = typeof value === "string" ? value.split(" ") : [ value ];
+
+ for ( ; i < 4; i++ ) {
+ expanded[ prefix + cssExpand[ i ] + suffix ] =
+ parts[ i ] || parts[ i - 2 ] || parts[ 0 ];
+ }
+
+ return expanded;
+ }
+ };
+
+ if ( !rmargin.test( prefix ) ) {
+ jQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber;
+ }
+});
+
+jQuery.fn.extend({
+ css: function( name, value ) {
+ return access( this, function( elem, name, value ) {
+ var styles, len,
+ map = {},
+ i = 0;
+
+ if ( jQuery.isArray( name ) ) {
+ styles = getStyles( elem );
+ len = name.length;
+
+ for ( ; i < len; i++ ) {
+ map[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles );
+ }
+
+ return map;
+ }
+
+ return value !== undefined ?
+ jQuery.style( elem, name, value ) :
+ jQuery.css( elem, name );
+ }, name, value, arguments.length > 1 );
+ },
+ show: function() {
+ return showHide( this, true );
+ },
+ hide: function() {
+ return showHide( this );
+ },
+ toggle: function( state ) {
+ if ( typeof state === "boolean" ) {
+ return state ? this.show() : this.hide();
+ }
+
+ return this.each(function() {
+ if ( isHidden( this ) ) {
+ jQuery( this ).show();
+ } else {
+ jQuery( this ).hide();
+ }
+ });
+ }
+});
+
+
+function Tween( elem, options, prop, end, easing ) {
+ return new Tween.prototype.init( elem, options, prop, end, easing );
+}
+jQuery.Tween = Tween;
+
+Tween.prototype = {
+ constructor: Tween,
+ init: function( elem, options, prop, end, easing, unit ) {
+ this.elem = elem;
+ this.prop = prop;
+ this.easing = easing || "swing";
+ this.options = options;
+ this.start = this.now = this.cur();
+ this.end = end;
+ this.unit = unit || ( jQuery.cssNumber[ prop ] ? "" : "px" );
+ },
+ cur: function() {
+ var hooks = Tween.propHooks[ this.prop ];
+
+ return hooks && hooks.get ?
+ hooks.get( this ) :
+ Tween.propHooks._default.get( this );
+ },
+ run: function( percent ) {
+ var eased,
+ hooks = Tween.propHooks[ this.prop ];
+
+ if ( this.options.duration ) {
+ this.pos = eased = jQuery.easing[ this.easing ](
+ percent, this.options.duration * percent, 0, 1, this.options.duration
+ );
+ } else {
+ this.pos = eased = percent;
+ }
+ this.now = ( this.end - this.start ) * eased + this.start;
+
+ if ( this.options.step ) {
+ this.options.step.call( this.elem, this.now, this );
+ }
+
+ if ( hooks && hooks.set ) {
+ hooks.set( this );
+ } else {
+ Tween.propHooks._default.set( this );
+ }
+ return this;
+ }
+};
+
+Tween.prototype.init.prototype = Tween.prototype;
+
+Tween.propHooks = {
+ _default: {
+ get: function( tween ) {
+ var result;
+
+ if ( tween.elem[ tween.prop ] != null &&
+ (!tween.elem.style || tween.elem.style[ tween.prop ] == null) ) {
+ return tween.elem[ tween.prop ];
+ }
+
+ // Passing an empty string as a 3rd parameter to .css will automatically
+ // attempt a parseFloat and fallback to a string if the parse fails.
+ // Simple values such as "10px" are parsed to Float;
+ // complex values such as "rotate(1rad)" are returned as-is.
+ result = jQuery.css( tween.elem, tween.prop, "" );
+ // Empty strings, null, undefined and "auto" are converted to 0.
+ return !result || result === "auto" ? 0 : result;
+ },
+ set: function( tween ) {
+ // Use step hook for back compat.
+ // Use cssHook if its there.
+ // Use .style if available and use plain properties where available.
+ if ( jQuery.fx.step[ tween.prop ] ) {
+ jQuery.fx.step[ tween.prop ]( tween );
+ } else if ( tween.elem.style && ( tween.elem.style[ jQuery.cssProps[ tween.prop ] ] != null || jQuery.cssHooks[ tween.prop ] ) ) {
+ jQuery.style( tween.elem, tween.prop, tween.now + tween.unit );
+ } else {
+ tween.elem[ tween.prop ] = tween.now;
+ }
+ }
+ }
+};
+
+// Support: IE9
+// Panic based approach to setting things on disconnected nodes
+Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = {
+ set: function( tween ) {
+ if ( tween.elem.nodeType && tween.elem.parentNode ) {
+ tween.elem[ tween.prop ] = tween.now;
+ }
+ }
+};
+
+jQuery.easing = {
+ linear: function( p ) {
+ return p;
+ },
+ swing: function( p ) {
+ return 0.5 - Math.cos( p * Math.PI ) / 2;
+ }
+};
+
+jQuery.fx = Tween.prototype.init;
+
+// Back Compat <1.8 extension point
+jQuery.fx.step = {};
+
+
+
+
+var
+ fxNow, timerId,
+ rfxtypes = /^(?:toggle|show|hide)$/,
+ rfxnum = new RegExp( "^(?:([+-])=|)(" + pnum + ")([a-z%]*)$", "i" ),
+ rrun = /queueHooks$/,
+ animationPrefilters = [ defaultPrefilter ],
+ tweeners = {
+ "*": [ function( prop, value ) {
+ var tween = this.createTween( prop, value ),
+ target = tween.cur(),
+ parts = rfxnum.exec( value ),
+ unit = parts && parts[ 3 ] || ( jQuery.cssNumber[ prop ] ? "" : "px" ),
+
+ // Starting value computation is required for potential unit mismatches
+ start = ( jQuery.cssNumber[ prop ] || unit !== "px" && +target ) &&
+ rfxnum.exec( jQuery.css( tween.elem, prop ) ),
+ scale = 1,
+ maxIterations = 20;
+
+ if ( start && start[ 3 ] !== unit ) {
+ // Trust units reported by jQuery.css
+ unit = unit || start[ 3 ];
+
+ // Make sure we update the tween properties later on
+ parts = parts || [];
+
+ // Iteratively approximate from a nonzero starting point
+ start = +target || 1;
+
+ do {
+ // If previous iteration zeroed out, double until we get *something*.
+ // Use string for doubling so we don't accidentally see scale as unchanged below
+ scale = scale || ".5";
+
+ // Adjust and apply
+ start = start / scale;
+ jQuery.style( tween.elem, prop, start + unit );
+
+ // Update scale, tolerating zero or NaN from tween.cur(),
+ // break the loop if scale is unchanged or perfect, or if we've just had enough
+ } while ( scale !== (scale = tween.cur() / target) && scale !== 1 && --maxIterations );
+ }
+
+ // Update tween properties
+ if ( parts ) {
+ start = tween.start = +start || +target || 0;
+ tween.unit = unit;
+ // If a +=/-= token was provided, we're doing a relative animation
+ tween.end = parts[ 1 ] ?
+ start + ( parts[ 1 ] + 1 ) * parts[ 2 ] :
+ +parts[ 2 ];
+ }
+
+ return tween;
+ } ]
+ };
+
+// Animations created synchronously will run synchronously
+function createFxNow() {
+ setTimeout(function() {
+ fxNow = undefined;
+ });
+ return ( fxNow = jQuery.now() );
+}
+
+// Generate parameters to create a standard animation
+function genFx( type, includeWidth ) {
+ var which,
+ i = 0,
+ attrs = { height: type };
+
+ // If we include width, step value is 1 to do all cssExpand values,
+ // otherwise step value is 2 to skip over Left and Right
+ includeWidth = includeWidth ? 1 : 0;
+ for ( ; i < 4 ; i += 2 - includeWidth ) {
+ which = cssExpand[ i ];
+ attrs[ "margin" + which ] = attrs[ "padding" + which ] = type;
+ }
+
+ if ( includeWidth ) {
+ attrs.opacity = attrs.width = type;
+ }
+
+ return attrs;
+}
+
+function createTween( value, prop, animation ) {
+ var tween,
+ collection = ( tweeners[ prop ] || [] ).concat( tweeners[ "*" ] ),
+ index = 0,
+ length = collection.length;
+ for ( ; index < length; index++ ) {
+ if ( (tween = collection[ index ].call( animation, prop, value )) ) {
+
+ // We're done with this property
+ return tween;
+ }
+ }
+}
+
+function defaultPrefilter( elem, props, opts ) {
+ /* jshint validthis: true */
+ var prop, value, toggle, tween, hooks, oldfire, display, checkDisplay,
+ anim = this,
+ orig = {},
+ style = elem.style,
+ hidden = elem.nodeType && isHidden( elem ),
+ dataShow = data_priv.get( elem, "fxshow" );
+
+ // Handle queue: false promises
+ if ( !opts.queue ) {
+ hooks = jQuery._queueHooks( elem, "fx" );
+ if ( hooks.unqueued == null ) {
+ hooks.unqueued = 0;
+ oldfire = hooks.empty.fire;
+ hooks.empty.fire = function() {
+ if ( !hooks.unqueued ) {
+ oldfire();
+ }
+ };
+ }
+ hooks.unqueued++;
+
+ anim.always(function() {
+ // Ensure the complete handler is called before this completes
+ anim.always(function() {
+ hooks.unqueued--;
+ if ( !jQuery.queue( elem, "fx" ).length ) {
+ hooks.empty.fire();
+ }
+ });
+ });
+ }
+
+ // Height/width overflow pass
+ if ( elem.nodeType === 1 && ( "height" in props || "width" in props ) ) {
+ // Make sure that nothing sneaks out
+ // Record all 3 overflow attributes because IE9-10 do not
+ // change the overflow attribute when overflowX and
+ // overflowY are set to the same value
+ opts.overflow = [ style.overflow, style.overflowX, style.overflowY ];
+
+ // Set display property to inline-block for height/width
+ // animations on inline elements that are having width/height animated
+ display = jQuery.css( elem, "display" );
+
+ // Test default display if display is currently "none"
+ checkDisplay = display === "none" ?
+ data_priv.get( elem, "olddisplay" ) || defaultDisplay( elem.nodeName ) : display;
+
+ if ( checkDisplay === "inline" && jQuery.css( elem, "float" ) === "none" ) {
+ style.display = "inline-block";
+ }
+ }
+
+ if ( opts.overflow ) {
+ style.overflow = "hidden";
+ anim.always(function() {
+ style.overflow = opts.overflow[ 0 ];
+ style.overflowX = opts.overflow[ 1 ];
+ style.overflowY = opts.overflow[ 2 ];
+ });
+ }
+
+ // show/hide pass
+ for ( prop in props ) {
+ value = props[ prop ];
+ if ( rfxtypes.exec( value ) ) {
+ delete props[ prop ];
+ toggle = toggle || value === "toggle";
+ if ( value === ( hidden ? "hide" : "show" ) ) {
+
+ // If there is dataShow left over from a stopped hide or show and we are going to proceed with show, we should pretend to be hidden
+ if ( value === "show" && dataShow && dataShow[ prop ] !== undefined ) {
+ hidden = true;
+ } else {
+ continue;
+ }
+ }
+ orig[ prop ] = dataShow && dataShow[ prop ] || jQuery.style( elem, prop );
+
+ // Any non-fx value stops us from restoring the original display value
+ } else {
+ display = undefined;
+ }
+ }
+
+ if ( !jQuery.isEmptyObject( orig ) ) {
+ if ( dataShow ) {
+ if ( "hidden" in dataShow ) {
+ hidden = dataShow.hidden;
+ }
+ } else {
+ dataShow = data_priv.access( elem, "fxshow", {} );
+ }
+
+ // Store state if its toggle - enables .stop().toggle() to "reverse"
+ if ( toggle ) {
+ dataShow.hidden = !hidden;
+ }
+ if ( hidden ) {
+ jQuery( elem ).show();
+ } else {
+ anim.done(function() {
+ jQuery( elem ).hide();
+ });
+ }
+ anim.done(function() {
+ var prop;
+
+ data_priv.remove( elem, "fxshow" );
+ for ( prop in orig ) {
+ jQuery.style( elem, prop, orig[ prop ] );
+ }
+ });
+ for ( prop in orig ) {
+ tween = createTween( hidden ? dataShow[ prop ] : 0, prop, anim );
+
+ if ( !( prop in dataShow ) ) {
+ dataShow[ prop ] = tween.start;
+ if ( hidden ) {
+ tween.end = tween.start;
+ tween.start = prop === "width" || prop === "height" ? 1 : 0;
+ }
+ }
+ }
+
+ // If this is a noop like .hide().hide(), restore an overwritten display value
+ } else if ( (display === "none" ? defaultDisplay( elem.nodeName ) : display) === "inline" ) {
+ style.display = display;
+ }
+}
+
+function propFilter( props, specialEasing ) {
+ var index, name, easing, value, hooks;
+
+ // camelCase, specialEasing and expand cssHook pass
+ for ( index in props ) {
+ name = jQuery.camelCase( index );
+ easing = specialEasing[ name ];
+ value = props[ index ];
+ if ( jQuery.isArray( value ) ) {
+ easing = value[ 1 ];
+ value = props[ index ] = value[ 0 ];
+ }
+
+ if ( index !== name ) {
+ props[ name ] = value;
+ delete props[ index ];
+ }
+
+ hooks = jQuery.cssHooks[ name ];
+ if ( hooks && "expand" in hooks ) {
+ value = hooks.expand( value );
+ delete props[ name ];
+
+ // Not quite $.extend, this won't overwrite existing keys.
+ // Reusing 'index' because we have the correct "name"
+ for ( index in value ) {
+ if ( !( index in props ) ) {
+ props[ index ] = value[ index ];
+ specialEasing[ index ] = easing;
+ }
+ }
+ } else {
+ specialEasing[ name ] = easing;
+ }
+ }
+}
+
+function Animation( elem, properties, options ) {
+ var result,
+ stopped,
+ index = 0,
+ length = animationPrefilters.length,
+ deferred = jQuery.Deferred().always( function() {
+ // Don't match elem in the :animated selector
+ delete tick.elem;
+ }),
+ tick = function() {
+ if ( stopped ) {
+ return false;
+ }
+ var currentTime = fxNow || createFxNow(),
+ remaining = Math.max( 0, animation.startTime + animation.duration - currentTime ),
+ // Support: Android 2.3
+ // Archaic crash bug won't allow us to use `1 - ( 0.5 || 0 )` (#12497)
+ temp = remaining / animation.duration || 0,
+ percent = 1 - temp,
+ index = 0,
+ length = animation.tweens.length;
+
+ for ( ; index < length ; index++ ) {
+ animation.tweens[ index ].run( percent );
+ }
+
+ deferred.notifyWith( elem, [ animation, percent, remaining ]);
+
+ if ( percent < 1 && length ) {
+ return remaining;
+ } else {
+ deferred.resolveWith( elem, [ animation ] );
+ return false;
+ }
+ },
+ animation = deferred.promise({
+ elem: elem,
+ props: jQuery.extend( {}, properties ),
+ opts: jQuery.extend( true, { specialEasing: {} }, options ),
+ originalProperties: properties,
+ originalOptions: options,
+ startTime: fxNow || createFxNow(),
+ duration: options.duration,
+ tweens: [],
+ createTween: function( prop, end ) {
+ var tween = jQuery.Tween( elem, animation.opts, prop, end,
+ animation.opts.specialEasing[ prop ] || animation.opts.easing );
+ animation.tweens.push( tween );
+ return tween;
+ },
+ stop: function( gotoEnd ) {
+ var index = 0,
+ // If we are going to the end, we want to run all the tweens
+ // otherwise we skip this part
+ length = gotoEnd ? animation.tweens.length : 0;
+ if ( stopped ) {
+ return this;
+ }
+ stopped = true;
+ for ( ; index < length ; index++ ) {
+ animation.tweens[ index ].run( 1 );
+ }
+
+ // Resolve when we played the last frame; otherwise, reject
+ if ( gotoEnd ) {
+ deferred.resolveWith( elem, [ animation, gotoEnd ] );
+ } else {
+ deferred.rejectWith( elem, [ animation, gotoEnd ] );
+ }
+ return this;
+ }
+ }),
+ props = animation.props;
+
+ propFilter( props, animation.opts.specialEasing );
+
+ for ( ; index < length ; index++ ) {
+ result = animationPrefilters[ index ].call( animation, elem, props, animation.opts );
+ if ( result ) {
+ return result;
+ }
+ }
+
+ jQuery.map( props, createTween, animation );
+
+ if ( jQuery.isFunction( animation.opts.start ) ) {
+ animation.opts.start.call( elem, animation );
+ }
+
+ jQuery.fx.timer(
+ jQuery.extend( tick, {
+ elem: elem,
+ anim: animation,
+ queue: animation.opts.queue
+ })
+ );
+
+ // attach callbacks from options
+ return animation.progress( animation.opts.progress )
+ .done( animation.opts.done, animation.opts.complete )
+ .fail( animation.opts.fail )
+ .always( animation.opts.always );
+}
+
+jQuery.Animation = jQuery.extend( Animation, {
+
+ tweener: function( props, callback ) {
+ if ( jQuery.isFunction( props ) ) {
+ callback = props;
+ props = [ "*" ];
+ } else {
+ props = props.split(" ");
+ }
+
+ var prop,
+ index = 0,
+ length = props.length;
+
+ for ( ; index < length ; index++ ) {
+ prop = props[ index ];
+ tweeners[ prop ] = tweeners[ prop ] || [];
+ tweeners[ prop ].unshift( callback );
+ }
+ },
+
+ prefilter: function( callback, prepend ) {
+ if ( prepend ) {
+ animationPrefilters.unshift( callback );
+ } else {
+ animationPrefilters.push( callback );
+ }
+ }
+});
+
+jQuery.speed = function( speed, easing, fn ) {
+ var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : {
+ complete: fn || !fn && easing ||
+ jQuery.isFunction( speed ) && speed,
+ duration: speed,
+ easing: fn && easing || easing && !jQuery.isFunction( easing ) && easing
+ };
+
+ opt.duration = jQuery.fx.off ? 0 : typeof opt.duration === "number" ? opt.duration :
+ opt.duration in jQuery.fx.speeds ? jQuery.fx.speeds[ opt.duration ] : jQuery.fx.speeds._default;
+
+ // Normalize opt.queue - true/undefined/null -> "fx"
+ if ( opt.queue == null || opt.queue === true ) {
+ opt.queue = "fx";
+ }
+
+ // Queueing
+ opt.old = opt.complete;
+
+ opt.complete = function() {
+ if ( jQuery.isFunction( opt.old ) ) {
+ opt.old.call( this );
+ }
+
+ if ( opt.queue ) {
+ jQuery.dequeue( this, opt.queue );
+ }
+ };
+
+ return opt;
+};
+
+jQuery.fn.extend({
+ fadeTo: function( speed, to, easing, callback ) {
+
+ // Show any hidden elements after setting opacity to 0
+ return this.filter( isHidden ).css( "opacity", 0 ).show()
+
+ // Animate to the value specified
+ .end().animate({ opacity: to }, speed, easing, callback );
+ },
+ animate: function( prop, speed, easing, callback ) {
+ var empty = jQuery.isEmptyObject( prop ),
+ optall = jQuery.speed( speed, easing, callback ),
+ doAnimation = function() {
+ // Operate on a copy of prop so per-property easing won't be lost
+ var anim = Animation( this, jQuery.extend( {}, prop ), optall );
+
+ // Empty animations, or finishing resolves immediately
+ if ( empty || data_priv.get( this, "finish" ) ) {
+ anim.stop( true );
+ }
+ };
+ doAnimation.finish = doAnimation;
+
+ return empty || optall.queue === false ?
+ this.each( doAnimation ) :
+ this.queue( optall.queue, doAnimation );
+ },
+ stop: function( type, clearQueue, gotoEnd ) {
+ var stopQueue = function( hooks ) {
+ var stop = hooks.stop;
+ delete hooks.stop;
+ stop( gotoEnd );
+ };
+
+ if ( typeof type !== "string" ) {
+ gotoEnd = clearQueue;
+ clearQueue = type;
+ type = undefined;
+ }
+ if ( clearQueue && type !== false ) {
+ this.queue( type || "fx", [] );
+ }
+
+ return this.each(function() {
+ var dequeue = true,
+ index = type != null && type + "queueHooks",
+ timers = jQuery.timers,
+ data = data_priv.get( this );
+
+ if ( index ) {
+ if ( data[ index ] && data[ index ].stop ) {
+ stopQueue( data[ index ] );
+ }
+ } else {
+ for ( index in data ) {
+ if ( data[ index ] && data[ index ].stop && rrun.test( index ) ) {
+ stopQueue( data[ index ] );
+ }
+ }
+ }
+
+ for ( index = timers.length; index--; ) {
+ if ( timers[ index ].elem === this && (type == null || timers[ index ].queue === type) ) {
+ timers[ index ].anim.stop( gotoEnd );
+ dequeue = false;
+ timers.splice( index, 1 );
+ }
+ }
+
+ // Start the next in the queue if the last step wasn't forced.
+ // Timers currently will call their complete callbacks, which
+ // will dequeue but only if they were gotoEnd.
+ if ( dequeue || !gotoEnd ) {
+ jQuery.dequeue( this, type );
+ }
+ });
+ },
+ finish: function( type ) {
+ if ( type !== false ) {
+ type = type || "fx";
+ }
+ return this.each(function() {
+ var index,
+ data = data_priv.get( this ),
+ queue = data[ type + "queue" ],
+ hooks = data[ type + "queueHooks" ],
+ timers = jQuery.timers,
+ length = queue ? queue.length : 0;
+
+ // Enable finishing flag on private data
+ data.finish = true;
+
+ // Empty the queue first
+ jQuery.queue( this, type, [] );
+
+ if ( hooks && hooks.stop ) {
+ hooks.stop.call( this, true );
+ }
+
+ // Look for any active animations, and finish them
+ for ( index = timers.length; index--; ) {
+ if ( timers[ index ].elem === this && timers[ index ].queue === type ) {
+ timers[ index ].anim.stop( true );
+ timers.splice( index, 1 );
+ }
+ }
+
+ // Look for any animations in the old queue and finish them
+ for ( index = 0; index < length; index++ ) {
+ if ( queue[ index ] && queue[ index ].finish ) {
+ queue[ index ].finish.call( this );
+ }
+ }
+
+ // Turn off finishing flag
+ delete data.finish;
+ });
+ }
+});
+
+jQuery.each([ "toggle", "show", "hide" ], function( i, name ) {
+ var cssFn = jQuery.fn[ name ];
+ jQuery.fn[ name ] = function( speed, easing, callback ) {
+ return speed == null || typeof speed === "boolean" ?
+ cssFn.apply( this, arguments ) :
+ this.animate( genFx( name, true ), speed, easing, callback );
+ };
+});
+
+// Generate shortcuts for custom animations
+jQuery.each({
+ slideDown: genFx("show"),
+ slideUp: genFx("hide"),
+ slideToggle: genFx("toggle"),
+ fadeIn: { opacity: "show" },
+ fadeOut: { opacity: "hide" },
+ fadeToggle: { opacity: "toggle" }
+}, function( name, props ) {
+ jQuery.fn[ name ] = function( speed, easing, callback ) {
+ return this.animate( props, speed, easing, callback );
+ };
+});
+
+jQuery.timers = [];
+jQuery.fx.tick = function() {
+ var timer,
+ i = 0,
+ timers = jQuery.timers;
+
+ fxNow = jQuery.now();
+
+ for ( ; i < timers.length; i++ ) {
+ timer = timers[ i ];
+ // Checks the timer has not already been removed
+ if ( !timer() && timers[ i ] === timer ) {
+ timers.splice( i--, 1 );
+ }
+ }
+
+ if ( !timers.length ) {
+ jQuery.fx.stop();
+ }
+ fxNow = undefined;
+};
+
+jQuery.fx.timer = function( timer ) {
+ jQuery.timers.push( timer );
+ if ( timer() ) {
+ jQuery.fx.start();
+ } else {
+ jQuery.timers.pop();
+ }
+};
+
+jQuery.fx.interval = 13;
+
+jQuery.fx.start = function() {
+ if ( !timerId ) {
+ timerId = setInterval( jQuery.fx.tick, jQuery.fx.interval );
+ }
+};
+
+jQuery.fx.stop = function() {
+ clearInterval( timerId );
+ timerId = null;
+};
+
+jQuery.fx.speeds = {
+ slow: 600,
+ fast: 200,
+ // Default speed
+ _default: 400
+};
+
+
+// Based off of the plugin by Clint Helfers, with permission.
+// http://blindsignals.com/index.php/2009/07/jquery-delay/
+jQuery.fn.delay = function( time, type ) {
+ time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time;
+ type = type || "fx";
+
+ return this.queue( type, function( next, hooks ) {
+ var timeout = setTimeout( next, time );
+ hooks.stop = function() {
+ clearTimeout( timeout );
+ };
+ });
+};
+
+
+(function() {
+ var input = document.createElement( "input" ),
+ select = document.createElement( "select" ),
+ opt = select.appendChild( document.createElement( "option" ) );
+
+ input.type = "checkbox";
+
+ // Support: iOS<=5.1, Android<=4.2+
+ // Default value for a checkbox should be "on"
+ support.checkOn = input.value !== "";
+
+ // Support: IE<=11+
+ // Must access selectedIndex to make default options select
+ support.optSelected = opt.selected;
+
+ // Support: Android<=2.3
+ // Options inside disabled selects are incorrectly marked as disabled
+ select.disabled = true;
+ support.optDisabled = !opt.disabled;
+
+ // Support: IE<=11+
+ // An input loses its value after becoming a radio
+ input = document.createElement( "input" );
+ input.value = "t";
+ input.type = "radio";
+ support.radioValue = input.value === "t";
+})();
+
+
+var nodeHook, boolHook,
+ attrHandle = jQuery.expr.attrHandle;
+
+jQuery.fn.extend({
+ attr: function( name, value ) {
+ return access( this, jQuery.attr, name, value, arguments.length > 1 );
+ },
+
+ removeAttr: function( name ) {
+ return this.each(function() {
+ jQuery.removeAttr( this, name );
+ });
+ }
+});
+
+jQuery.extend({
+ attr: function( elem, name, value ) {
+ var hooks, ret,
+ nType = elem.nodeType;
+
+ // don't get/set attributes on text, comment and attribute nodes
+ if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {
+ return;
+ }
+
+ // Fallback to prop when attributes are not supported
+ if ( typeof elem.getAttribute === strundefined ) {
+ return jQuery.prop( elem, name, value );
+ }
+
+ // All attributes are lowercase
+ // Grab necessary hook if one is defined
+ if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {
+ name = name.toLowerCase();
+ hooks = jQuery.attrHooks[ name ] ||
+ ( jQuery.expr.match.bool.test( name ) ? boolHook : nodeHook );
+ }
+
+ if ( value !== undefined ) {
+
+ if ( value === null ) {
+ jQuery.removeAttr( elem, name );
+
+ } else if ( hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) {
+ return ret;
+
+ } else {
+ elem.setAttribute( name, value + "" );
+ return value;
+ }
+
+ } else if ( hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ) {
+ return ret;
+
+ } else {
+ ret = jQuery.find.attr( elem, name );
+
+ // Non-existent attributes return null, we normalize to undefined
+ return ret == null ?
+ undefined :
+ ret;
+ }
+ },
+
+ removeAttr: function( elem, value ) {
+ var name, propName,
+ i = 0,
+ attrNames = value && value.match( rnotwhite );
+
+ if ( attrNames && elem.nodeType === 1 ) {
+ while ( (name = attrNames[i++]) ) {
+ propName = jQuery.propFix[ name ] || name;
+
+ // Boolean attributes get special treatment (#10870)
+ if ( jQuery.expr.match.bool.test( name ) ) {
+ // Set corresponding property to false
+ elem[ propName ] = false;
+ }
+
+ elem.removeAttribute( name );
+ }
+ }
+ },
+
+ attrHooks: {
+ type: {
+ set: function( elem, value ) {
+ if ( !support.radioValue && value === "radio" &&
+ jQuery.nodeName( elem, "input" ) ) {
+ var val = elem.value;
+ elem.setAttribute( "type", value );
+ if ( val ) {
+ elem.value = val;
+ }
+ return value;
+ }
+ }
+ }
+ }
+});
+
+// Hooks for boolean attributes
+boolHook = {
+ set: function( elem, value, name ) {
+ if ( value === false ) {
+ // Remove boolean attributes when set to false
+ jQuery.removeAttr( elem, name );
+ } else {
+ elem.setAttribute( name, name );
+ }
+ return name;
+ }
+};
+jQuery.each( jQuery.expr.match.bool.source.match( /\w+/g ), function( i, name ) {
+ var getter = attrHandle[ name ] || jQuery.find.attr;
+
+ attrHandle[ name ] = function( elem, name, isXML ) {
+ var ret, handle;
+ if ( !isXML ) {
+ // Avoid an infinite loop by temporarily removing this function from the getter
+ handle = attrHandle[ name ];
+ attrHandle[ name ] = ret;
+ ret = getter( elem, name, isXML ) != null ?
+ name.toLowerCase() :
+ null;
+ attrHandle[ name ] = handle;
+ }
+ return ret;
+ };
+});
+
+
+
+
+var rfocusable = /^(?:input|select|textarea|button)$/i;
+
+jQuery.fn.extend({
+ prop: function( name, value ) {
+ return access( this, jQuery.prop, name, value, arguments.length > 1 );
+ },
+
+ removeProp: function( name ) {
+ return this.each(function() {
+ delete this[ jQuery.propFix[ name ] || name ];
+ });
+ }
+});
+
+jQuery.extend({
+ propFix: {
+ "for": "htmlFor",
+ "class": "className"
+ },
+
+ prop: function( elem, name, value ) {
+ var ret, hooks, notxml,
+ nType = elem.nodeType;
+
+ // Don't get/set properties on text, comment and attribute nodes
+ if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {
+ return;
+ }
+
+ notxml = nType !== 1 || !jQuery.isXMLDoc( elem );
+
+ if ( notxml ) {
+ // Fix name and attach hooks
+ name = jQuery.propFix[ name ] || name;
+ hooks = jQuery.propHooks[ name ];
+ }
+
+ if ( value !== undefined ) {
+ return hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ?
+ ret :
+ ( elem[ name ] = value );
+
+ } else {
+ return hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ?
+ ret :
+ elem[ name ];
+ }
+ },
+
+ propHooks: {
+ tabIndex: {
+ get: function( elem ) {
+ return elem.hasAttribute( "tabindex" ) || rfocusable.test( elem.nodeName ) || elem.href ?
+ elem.tabIndex :
+ -1;
+ }
+ }
+ }
+});
+
+if ( !support.optSelected ) {
+ jQuery.propHooks.selected = {
+ get: function( elem ) {
+ var parent = elem.parentNode;
+ if ( parent && parent.parentNode ) {
+ parent.parentNode.selectedIndex;
+ }
+ return null;
+ }
+ };
+}
+
+jQuery.each([
+ "tabIndex",
+ "readOnly",
+ "maxLength",
+ "cellSpacing",
+ "cellPadding",
+ "rowSpan",
+ "colSpan",
+ "useMap",
+ "frameBorder",
+ "contentEditable"
+], function() {
+ jQuery.propFix[ this.toLowerCase() ] = this;
+});
+
+
+
+
+var rclass = /[\t\r\n\f]/g;
+
+jQuery.fn.extend({
+ addClass: function( value ) {
+ var classes, elem, cur, clazz, j, finalValue,
+ proceed = typeof value === "string" && value,
+ i = 0,
+ len = this.length;
+
+ if ( jQuery.isFunction( value ) ) {
+ return this.each(function( j ) {
+ jQuery( this ).addClass( value.call( this, j, this.className ) );
+ });
+ }
+
+ if ( proceed ) {
+ // The disjunction here is for better compressibility (see removeClass)
+ classes = ( value || "" ).match( rnotwhite ) || [];
+
+ for ( ; i < len; i++ ) {
+ elem = this[ i ];
+ cur = elem.nodeType === 1 && ( elem.className ?
+ ( " " + elem.className + " " ).replace( rclass, " " ) :
+ " "
+ );
+
+ if ( cur ) {
+ j = 0;
+ while ( (clazz = classes[j++]) ) {
+ if ( cur.indexOf( " " + clazz + " " ) < 0 ) {
+ cur += clazz + " ";
+ }
+ }
+
+ // only assign if different to avoid unneeded rendering.
+ finalValue = jQuery.trim( cur );
+ if ( elem.className !== finalValue ) {
+ elem.className = finalValue;
+ }
+ }
+ }
+ }
+
+ return this;
+ },
+
+ removeClass: function( value ) {
+ var classes, elem, cur, clazz, j, finalValue,
+ proceed = arguments.length === 0 || typeof value === "string" && value,
+ i = 0,
+ len = this.length;
+
+ if ( jQuery.isFunction( value ) ) {
+ return this.each(function( j ) {
+ jQuery( this ).removeClass( value.call( this, j, this.className ) );
+ });
+ }
+ if ( proceed ) {
+ classes = ( value || "" ).match( rnotwhite ) || [];
+
+ for ( ; i < len; i++ ) {
+ elem = this[ i ];
+ // This expression is here for better compressibility (see addClass)
+ cur = elem.nodeType === 1 && ( elem.className ?
+ ( " " + elem.className + " " ).replace( rclass, " " ) :
+ ""
+ );
+
+ if ( cur ) {
+ j = 0;
+ while ( (clazz = classes[j++]) ) {
+ // Remove *all* instances
+ while ( cur.indexOf( " " + clazz + " " ) >= 0 ) {
+ cur = cur.replace( " " + clazz + " ", " " );
+ }
+ }
+
+ // Only assign if different to avoid unneeded rendering.
+ finalValue = value ? jQuery.trim( cur ) : "";
+ if ( elem.className !== finalValue ) {
+ elem.className = finalValue;
+ }
+ }
+ }
+ }
+
+ return this;
+ },
+
+ toggleClass: function( value, stateVal ) {
+ var type = typeof value;
+
+ if ( typeof stateVal === "boolean" && type === "string" ) {
+ return stateVal ? this.addClass( value ) : this.removeClass( value );
+ }
+
+ if ( jQuery.isFunction( value ) ) {
+ return this.each(function( i ) {
+ jQuery( this ).toggleClass( value.call(this, i, this.className, stateVal), stateVal );
+ });
+ }
+
+ return this.each(function() {
+ if ( type === "string" ) {
+ // Toggle individual class names
+ var className,
+ i = 0,
+ self = jQuery( this ),
+ classNames = value.match( rnotwhite ) || [];
+
+ while ( (className = classNames[ i++ ]) ) {
+ // Check each className given, space separated list
+ if ( self.hasClass( className ) ) {
+ self.removeClass( className );
+ } else {
+ self.addClass( className );
+ }
+ }
+
+ // Toggle whole class name
+ } else if ( type === strundefined || type === "boolean" ) {
+ if ( this.className ) {
+ // store className if set
+ data_priv.set( this, "__className__", this.className );
+ }
+
+ // If the element has a class name or if we're passed `false`,
+ // then remove the whole classname (if there was one, the above saved it).
+ // Otherwise bring back whatever was previously saved (if anything),
+ // falling back to the empty string if nothing was stored.
+ this.className = this.className || value === false ? "" : data_priv.get( this, "__className__" ) || "";
+ }
+ });
+ },
+
+ hasClass: function( selector ) {
+ var className = " " + selector + " ",
+ i = 0,
+ l = this.length;
+ for ( ; i < l; i++ ) {
+ if ( this[i].nodeType === 1 && (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) >= 0 ) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+});
+
+
+
+
+var rreturn = /\r/g;
+
+jQuery.fn.extend({
+ val: function( value ) {
+ var hooks, ret, isFunction,
+ elem = this[0];
+
+ if ( !arguments.length ) {
+ if ( elem ) {
+ hooks = jQuery.valHooks[ elem.type ] || jQuery.valHooks[ elem.nodeName.toLowerCase() ];
+
+ if ( hooks && "get" in hooks && (ret = hooks.get( elem, "value" )) !== undefined ) {
+ return ret;
+ }
+
+ ret = elem.value;
+
+ return typeof ret === "string" ?
+ // Handle most common string cases
+ ret.replace(rreturn, "") :
+ // Handle cases where value is null/undef or number
+ ret == null ? "" : ret;
+ }
+
+ return;
+ }
+
+ isFunction = jQuery.isFunction( value );
+
+ return this.each(function( i ) {
+ var val;
+
+ if ( this.nodeType !== 1 ) {
+ return;
+ }
+
+ if ( isFunction ) {
+ val = value.call( this, i, jQuery( this ).val() );
+ } else {
+ val = value;
+ }
+
+ // Treat null/undefined as ""; convert numbers to string
+ if ( val == null ) {
+ val = "";
+
+ } else if ( typeof val === "number" ) {
+ val += "";
+
+ } else if ( jQuery.isArray( val ) ) {
+ val = jQuery.map( val, function( value ) {
+ return value == null ? "" : value + "";
+ });
+ }
+
+ hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ];
+
+ // If set returns undefined, fall back to normal setting
+ if ( !hooks || !("set" in hooks) || hooks.set( this, val, "value" ) === undefined ) {
+ this.value = val;
+ }
+ });
+ }
+});
+
+jQuery.extend({
+ valHooks: {
+ option: {
+ get: function( elem ) {
+ var val = jQuery.find.attr( elem, "value" );
+ return val != null ?
+ val :
+ // Support: IE10-11+
+ // option.text throws exceptions (#14686, #14858)
+ jQuery.trim( jQuery.text( elem ) );
+ }
+ },
+ select: {
+ get: function( elem ) {
+ var value, option,
+ options = elem.options,
+ index = elem.selectedIndex,
+ one = elem.type === "select-one" || index < 0,
+ values = one ? null : [],
+ max = one ? index + 1 : options.length,
+ i = index < 0 ?
+ max :
+ one ? index : 0;
+
+ // Loop through all the selected options
+ for ( ; i < max; i++ ) {
+ option = options[ i ];
+
+ // IE6-9 doesn't update selected after form reset (#2551)
+ if ( ( option.selected || i === index ) &&
+ // Don't return options that are disabled or in a disabled optgroup
+ ( support.optDisabled ? !option.disabled : option.getAttribute( "disabled" ) === null ) &&
+ ( !option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" ) ) ) {
+
+ // Get the specific value for the option
+ value = jQuery( option ).val();
+
+ // We don't need an array for one selects
+ if ( one ) {
+ return value;
+ }
+
+ // Multi-Selects return an array
+ values.push( value );
+ }
+ }
+
+ return values;
+ },
+
+ set: function( elem, value ) {
+ var optionSet, option,
+ options = elem.options,
+ values = jQuery.makeArray( value ),
+ i = options.length;
+
+ while ( i-- ) {
+ option = options[ i ];
+ if ( (option.selected = jQuery.inArray( option.value, values ) >= 0) ) {
+ optionSet = true;
+ }
+ }
+
+ // Force browsers to behave consistently when non-matching value is set
+ if ( !optionSet ) {
+ elem.selectedIndex = -1;
+ }
+ return values;
+ }
+ }
+ }
+});
+
+// Radios and checkboxes getter/setter
+jQuery.each([ "radio", "checkbox" ], function() {
+ jQuery.valHooks[ this ] = {
+ set: function( elem, value ) {
+ if ( jQuery.isArray( value ) ) {
+ return ( elem.checked = jQuery.inArray( jQuery(elem).val(), value ) >= 0 );
+ }
+ }
+ };
+ if ( !support.checkOn ) {
+ jQuery.valHooks[ this ].get = function( elem ) {
+ return elem.getAttribute("value") === null ? "on" : elem.value;
+ };
+ }
+});
+
+
+
+
+// Return jQuery for attributes-only inclusion
+
+
+jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblclick " +
+ "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " +
+ "change select submit keydown keypress keyup error contextmenu").split(" "), function( i, name ) {
+
+ // Handle event binding
+ jQuery.fn[ name ] = function( data, fn ) {
+ return arguments.length > 0 ?
+ this.on( name, null, data, fn ) :
+ this.trigger( name );
+ };
+});
+
+jQuery.fn.extend({
+ hover: function( fnOver, fnOut ) {
+ return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver );
+ },
+
+ bind: function( types, data, fn ) {
+ return this.on( types, null, data, fn );
+ },
+ unbind: function( types, fn ) {
+ return this.off( types, null, fn );
+ },
+
+ delegate: function( selector, types, data, fn ) {
+ return this.on( types, selector, data, fn );
+ },
+ undelegate: function( selector, types, fn ) {
+ // ( namespace ) or ( selector, types [, fn] )
+ return arguments.length === 1 ? this.off( selector, "**" ) : this.off( types, selector || "**", fn );
+ }
+});
+
+
+var nonce = jQuery.now();
+
+var rquery = (/\?/);
+
+
+
+// Support: Android 2.3
+// Workaround failure to string-cast null input
+jQuery.parseJSON = function( data ) {
+ return JSON.parse( data + "" );
+};
+
+
+// Cross-browser xml parsing
+jQuery.parseXML = function( data ) {
+ var xml, tmp;
+ if ( !data || typeof data !== "string" ) {
+ return null;
+ }
+
+ // Support: IE9
+ try {
+ tmp = new DOMParser();
+ xml = tmp.parseFromString( data, "text/xml" );
+ } catch ( e ) {
+ xml = undefined;
+ }
+
+ if ( !xml || xml.getElementsByTagName( "parsererror" ).length ) {
+ jQuery.error( "Invalid XML: " + data );
+ }
+ return xml;
+};
+
+
+var
+ rhash = /#.*$/,
+ rts = /([?&])_=[^&]*/,
+ rheaders = /^(.*?):[ \t]*([^\r\n]*)$/mg,
+ // #7653, #8125, #8152: local protocol detection
+ rlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/,
+ rnoContent = /^(?:GET|HEAD)$/,
+ rprotocol = /^\/\//,
+ rurl = /^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,
+
+ /* Prefilters
+ * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example)
+ * 2) These are called:
+ * - BEFORE asking for a transport
+ * - AFTER param serialization (s.data is a string if s.processData is true)
+ * 3) key is the dataType
+ * 4) the catchall symbol "*" can be used
+ * 5) execution will start with transport dataType and THEN continue down to "*" if needed
+ */
+ prefilters = {},
+
+ /* Transports bindings
+ * 1) key is the dataType
+ * 2) the catchall symbol "*" can be used
+ * 3) selection will start with transport dataType and THEN go to "*" if needed
+ */
+ transports = {},
+
+ // Avoid comment-prolog char sequence (#10098); must appease lint and evade compression
+ allTypes = "*/".concat( "*" ),
+
+ // Document location
+ ajaxLocation = window.location.href,
+
+ // Segment location into parts
+ ajaxLocParts = rurl.exec( ajaxLocation.toLowerCase() ) || [];
+
+// Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport
+function addToPrefiltersOrTransports( structure ) {
+
+ // dataTypeExpression is optional and defaults to "*"
+ return function( dataTypeExpression, func ) {
+
+ if ( typeof dataTypeExpression !== "string" ) {
+ func = dataTypeExpression;
+ dataTypeExpression = "*";
+ }
+
+ var dataType,
+ i = 0,
+ dataTypes = dataTypeExpression.toLowerCase().match( rnotwhite ) || [];
+
+ if ( jQuery.isFunction( func ) ) {
+ // For each dataType in the dataTypeExpression
+ while ( (dataType = dataTypes[i++]) ) {
+ // Prepend if requested
+ if ( dataType[0] === "+" ) {
+ dataType = dataType.slice( 1 ) || "*";
+ (structure[ dataType ] = structure[ dataType ] || []).unshift( func );
+
+ // Otherwise append
+ } else {
+ (structure[ dataType ] = structure[ dataType ] || []).push( func );
+ }
+ }
+ }
+ };
+}
+
+// Base inspection function for prefilters and transports
+function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {
+
+ var inspected = {},
+ seekingTransport = ( structure === transports );
+
+ function inspect( dataType ) {
+ var selected;
+ inspected[ dataType ] = true;
+ jQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {
+ var dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );
+ if ( typeof dataTypeOrTransport === "string" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {
+ options.dataTypes.unshift( dataTypeOrTransport );
+ inspect( dataTypeOrTransport );
+ return false;
+ } else if ( seekingTransport ) {
+ return !( selected = dataTypeOrTransport );
+ }
+ });
+ return selected;
+ }
+
+ return inspect( options.dataTypes[ 0 ] ) || !inspected[ "*" ] && inspect( "*" );
+}
+
+// A special extend for ajax options
+// that takes "flat" options (not to be deep extended)
+// Fixes #9887
+function ajaxExtend( target, src ) {
+ var key, deep,
+ flatOptions = jQuery.ajaxSettings.flatOptions || {};
+
+ for ( key in src ) {
+ if ( src[ key ] !== undefined ) {
+ ( flatOptions[ key ] ? target : ( deep || (deep = {}) ) )[ key ] = src[ key ];
+ }
+ }
+ if ( deep ) {
+ jQuery.extend( true, target, deep );
+ }
+
+ return target;
+}
+
+/* Handles responses to an ajax request:
+ * - finds the right dataType (mediates between content-type and expected dataType)
+ * - returns the corresponding response
+ */
+function ajaxHandleResponses( s, jqXHR, responses ) {
+
+ var ct, type, finalDataType, firstDataType,
+ contents = s.contents,
+ dataTypes = s.dataTypes;
+
+ // Remove auto dataType and get content-type in the process
+ while ( dataTypes[ 0 ] === "*" ) {
+ dataTypes.shift();
+ if ( ct === undefined ) {
+ ct = s.mimeType || jqXHR.getResponseHeader("Content-Type");
+ }
+ }
+
+ // Check if we're dealing with a known content-type
+ if ( ct ) {
+ for ( type in contents ) {
+ if ( contents[ type ] && contents[ type ].test( ct ) ) {
+ dataTypes.unshift( type );
+ break;
+ }
+ }
+ }
+
+ // Check to see if we have a response for the expected dataType
+ if ( dataTypes[ 0 ] in responses ) {
+ finalDataType = dataTypes[ 0 ];
+ } else {
+ // Try convertible dataTypes
+ for ( type in responses ) {
+ if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[0] ] ) {
+ finalDataType = type;
+ break;
+ }
+ if ( !firstDataType ) {
+ firstDataType = type;
+ }
+ }
+ // Or just use first one
+ finalDataType = finalDataType || firstDataType;
+ }
+
+ // If we found a dataType
+ // We add the dataType to the list if needed
+ // and return the corresponding response
+ if ( finalDataType ) {
+ if ( finalDataType !== dataTypes[ 0 ] ) {
+ dataTypes.unshift( finalDataType );
+ }
+ return responses[ finalDataType ];
+ }
+}
+
+/* Chain conversions given the request and the original response
+ * Also sets the responseXXX fields on the jqXHR instance
+ */
+function ajaxConvert( s, response, jqXHR, isSuccess ) {
+ var conv2, current, conv, tmp, prev,
+ converters = {},
+ // Work with a copy of dataTypes in case we need to modify it for conversion
+ dataTypes = s.dataTypes.slice();
+
+ // Create converters map with lowercased keys
+ if ( dataTypes[ 1 ] ) {
+ for ( conv in s.converters ) {
+ converters[ conv.toLowerCase() ] = s.converters[ conv ];
+ }
+ }
+
+ current = dataTypes.shift();
+
+ // Convert to each sequential dataType
+ while ( current ) {
+
+ if ( s.responseFields[ current ] ) {
+ jqXHR[ s.responseFields[ current ] ] = response;
+ }
+
+ // Apply the dataFilter if provided
+ if ( !prev && isSuccess && s.dataFilter ) {
+ response = s.dataFilter( response, s.dataType );
+ }
+
+ prev = current;
+ current = dataTypes.shift();
+
+ if ( current ) {
+
+ // There's only work to do if current dataType is non-auto
+ if ( current === "*" ) {
+
+ current = prev;
+
+ // Convert response if prev dataType is non-auto and differs from current
+ } else if ( prev !== "*" && prev !== current ) {
+
+ // Seek a direct converter
+ conv = converters[ prev + " " + current ] || converters[ "* " + current ];
+
+ // If none found, seek a pair
+ if ( !conv ) {
+ for ( conv2 in converters ) {
+
+ // If conv2 outputs current
+ tmp = conv2.split( " " );
+ if ( tmp[ 1 ] === current ) {
+
+ // If prev can be converted to accepted input
+ conv = converters[ prev + " " + tmp[ 0 ] ] ||
+ converters[ "* " + tmp[ 0 ] ];
+ if ( conv ) {
+ // Condense equivalence converters
+ if ( conv === true ) {
+ conv = converters[ conv2 ];
+
+ // Otherwise, insert the intermediate dataType
+ } else if ( converters[ conv2 ] !== true ) {
+ current = tmp[ 0 ];
+ dataTypes.unshift( tmp[ 1 ] );
+ }
+ break;
+ }
+ }
+ }
+ }
+
+ // Apply converter (if not an equivalence)
+ if ( conv !== true ) {
+
+ // Unless errors are allowed to bubble, catch and return them
+ if ( conv && s[ "throws" ] ) {
+ response = conv( response );
+ } else {
+ try {
+ response = conv( response );
+ } catch ( e ) {
+ return { state: "parsererror", error: conv ? e : "No conversion from " + prev + " to " + current };
+ }
+ }
+ }
+ }
+ }
+ }
+
+ return { state: "success", data: response };
+}
+
+jQuery.extend({
+
+ // Counter for holding the number of active queries
+ active: 0,
+
+ // Last-Modified header cache for next request
+ lastModified: {},
+ etag: {},
+
+ ajaxSettings: {
+ url: ajaxLocation,
+ type: "GET",
+ isLocal: rlocalProtocol.test( ajaxLocParts[ 1 ] ),
+ global: true,
+ processData: true,
+ async: true,
+ contentType: "application/x-www-form-urlencoded; charset=UTF-8",
+ /*
+ timeout: 0,
+ data: null,
+ dataType: null,
+ username: null,
+ password: null,
+ cache: null,
+ throws: false,
+ traditional: false,
+ headers: {},
+ */
+
+ accepts: {
+ "*": allTypes,
+ text: "text/plain",
+ html: "text/html",
+ xml: "application/xml, text/xml",
+ json: "application/json, text/javascript"
+ },
+
+ contents: {
+ xml: /xml/,
+ html: /html/,
+ json: /json/
+ },
+
+ responseFields: {
+ xml: "responseXML",
+ text: "responseText",
+ json: "responseJSON"
+ },
+
+ // Data converters
+ // Keys separate source (or catchall "*") and destination types with a single space
+ converters: {
+
+ // Convert anything to text
+ "* text": String,
+
+ // Text to html (true = no transformation)
+ "text html": true,
+
+ // Evaluate text as a json expression
+ "text json": jQuery.parseJSON,
+
+ // Parse text as xml
+ "text xml": jQuery.parseXML
+ },
+
+ // For options that shouldn't be deep extended:
+ // you can add your own custom options here if
+ // and when you create one that shouldn't be
+ // deep extended (see ajaxExtend)
+ flatOptions: {
+ url: true,
+ context: true
+ }
+ },
+
+ // Creates a full fledged settings object into target
+ // with both ajaxSettings and settings fields.
+ // If target is omitted, writes into ajaxSettings.
+ ajaxSetup: function( target, settings ) {
+ return settings ?
+
+ // Building a settings object
+ ajaxExtend( ajaxExtend( target, jQuery.ajaxSettings ), settings ) :
+
+ // Extending ajaxSettings
+ ajaxExtend( jQuery.ajaxSettings, target );
+ },
+
+ ajaxPrefilter: addToPrefiltersOrTransports( prefilters ),
+ ajaxTransport: addToPrefiltersOrTransports( transports ),
+
+ // Main method
+ ajax: function( url, options ) {
+
+ // If url is an object, simulate pre-1.5 signature
+ if ( typeof url === "object" ) {
+ options = url;
+ url = undefined;
+ }
+
+ // Force options to be an object
+ options = options || {};
+
+ var transport,
+ // URL without anti-cache param
+ cacheURL,
+ // Response headers
+ responseHeadersString,
+ responseHeaders,
+ // timeout handle
+ timeoutTimer,
+ // Cross-domain detection vars
+ parts,
+ // To know if global events are to be dispatched
+ fireGlobals,
+ // Loop variable
+ i,
+ // Create the final options object
+ s = jQuery.ajaxSetup( {}, options ),
+ // Callbacks context
+ callbackContext = s.context || s,
+ // Context for global events is callbackContext if it is a DOM node or jQuery collection
+ globalEventContext = s.context && ( callbackContext.nodeType || callbackContext.jquery ) ?
+ jQuery( callbackContext ) :
+ jQuery.event,
+ // Deferreds
+ deferred = jQuery.Deferred(),
+ completeDeferred = jQuery.Callbacks("once memory"),
+ // Status-dependent callbacks
+ statusCode = s.statusCode || {},
+ // Headers (they are sent all at once)
+ requestHeaders = {},
+ requestHeadersNames = {},
+ // The jqXHR state
+ state = 0,
+ // Default abort message
+ strAbort = "canceled",
+ // Fake xhr
+ jqXHR = {
+ readyState: 0,
+
+ // Builds headers hashtable if needed
+ getResponseHeader: function( key ) {
+ var match;
+ if ( state === 2 ) {
+ if ( !responseHeaders ) {
+ responseHeaders = {};
+ while ( (match = rheaders.exec( responseHeadersString )) ) {
+ responseHeaders[ match[1].toLowerCase() ] = match[ 2 ];
+ }
+ }
+ match = responseHeaders[ key.toLowerCase() ];
+ }
+ return match == null ? null : match;
+ },
+
+ // Raw string
+ getAllResponseHeaders: function() {
+ return state === 2 ? responseHeadersString : null;
+ },
+
+ // Caches the header
+ setRequestHeader: function( name, value ) {
+ var lname = name.toLowerCase();
+ if ( !state ) {
+ name = requestHeadersNames[ lname ] = requestHeadersNames[ lname ] || name;
+ requestHeaders[ name ] = value;
+ }
+ return this;
+ },
+
+ // Overrides response content-type header
+ overrideMimeType: function( type ) {
+ if ( !state ) {
+ s.mimeType = type;
+ }
+ return this;
+ },
+
+ // Status-dependent callbacks
+ statusCode: function( map ) {
+ var code;
+ if ( map ) {
+ if ( state < 2 ) {
+ for ( code in map ) {
+ // Lazy-add the new callback in a way that preserves old ones
+ statusCode[ code ] = [ statusCode[ code ], map[ code ] ];
+ }
+ } else {
+ // Execute the appropriate callbacks
+ jqXHR.always( map[ jqXHR.status ] );
+ }
+ }
+ return this;
+ },
+
+ // Cancel the request
+ abort: function( statusText ) {
+ var finalText = statusText || strAbort;
+ if ( transport ) {
+ transport.abort( finalText );
+ }
+ done( 0, finalText );
+ return this;
+ }
+ };
+
+ // Attach deferreds
+ deferred.promise( jqXHR ).complete = completeDeferred.add;
+ jqXHR.success = jqXHR.done;
+ jqXHR.error = jqXHR.fail;
+
+ // Remove hash character (#7531: and string promotion)
+ // Add protocol if not provided (prefilters might expect it)
+ // Handle falsy url in the settings object (#10093: consistency with old signature)
+ // We also use the url parameter if available
+ s.url = ( ( url || s.url || ajaxLocation ) + "" ).replace( rhash, "" )
+ .replace( rprotocol, ajaxLocParts[ 1 ] + "//" );
+
+ // Alias method option to type as per ticket #12004
+ s.type = options.method || options.type || s.method || s.type;
+
+ // Extract dataTypes list
+ s.dataTypes = jQuery.trim( s.dataType || "*" ).toLowerCase().match( rnotwhite ) || [ "" ];
+
+ // A cross-domain request is in order when we have a protocol:host:port mismatch
+ if ( s.crossDomain == null ) {
+ parts = rurl.exec( s.url.toLowerCase() );
+ s.crossDomain = !!( parts &&
+ ( parts[ 1 ] !== ajaxLocParts[ 1 ] || parts[ 2 ] !== ajaxLocParts[ 2 ] ||
+ ( parts[ 3 ] || ( parts[ 1 ] === "http:" ? "80" : "443" ) ) !==
+ ( ajaxLocParts[ 3 ] || ( ajaxLocParts[ 1 ] === "http:" ? "80" : "443" ) ) )
+ );
+ }
+
+ // Convert data if not already a string
+ if ( s.data && s.processData && typeof s.data !== "string" ) {
+ s.data = jQuery.param( s.data, s.traditional );
+ }
+
+ // Apply prefilters
+ inspectPrefiltersOrTransports( prefilters, s, options, jqXHR );
+
+ // If request was aborted inside a prefilter, stop there
+ if ( state === 2 ) {
+ return jqXHR;
+ }
+
+ // We can fire global events as of now if asked to
+ // Don't fire events if jQuery.event is undefined in an AMD-usage scenario (#15118)
+ fireGlobals = jQuery.event && s.global;
+
+ // Watch for a new set of requests
+ if ( fireGlobals && jQuery.active++ === 0 ) {
+ jQuery.event.trigger("ajaxStart");
+ }
+
+ // Uppercase the type
+ s.type = s.type.toUpperCase();
+
+ // Determine if request has content
+ s.hasContent = !rnoContent.test( s.type );
+
+ // Save the URL in case we're toying with the If-Modified-Since
+ // and/or If-None-Match header later on
+ cacheURL = s.url;
+
+ // More options handling for requests with no content
+ if ( !s.hasContent ) {
+
+ // If data is available, append data to url
+ if ( s.data ) {
+ cacheURL = ( s.url += ( rquery.test( cacheURL ) ? "&" : "?" ) + s.data );
+ // #9682: remove data so that it's not used in an eventual retry
+ delete s.data;
+ }
+
+ // Add anti-cache in url if needed
+ if ( s.cache === false ) {
+ s.url = rts.test( cacheURL ) ?
+
+ // If there is already a '_' parameter, set its value
+ cacheURL.replace( rts, "$1_=" + nonce++ ) :
+
+ // Otherwise add one to the end
+ cacheURL + ( rquery.test( cacheURL ) ? "&" : "?" ) + "_=" + nonce++;
+ }
+ }
+
+ // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
+ if ( s.ifModified ) {
+ if ( jQuery.lastModified[ cacheURL ] ) {
+ jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ cacheURL ] );
+ }
+ if ( jQuery.etag[ cacheURL ] ) {
+ jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ cacheURL ] );
+ }
+ }
+
+ // Set the correct header, if data is being sent
+ if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) {
+ jqXHR.setRequestHeader( "Content-Type", s.contentType );
+ }
+
+ // Set the Accepts header for the server, depending on the dataType
+ jqXHR.setRequestHeader(
+ "Accept",
+ s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[0] ] ?
+ s.accepts[ s.dataTypes[0] ] + ( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) :
+ s.accepts[ "*" ]
+ );
+
+ // Check for headers option
+ for ( i in s.headers ) {
+ jqXHR.setRequestHeader( i, s.headers[ i ] );
+ }
+
+ // Allow custom headers/mimetypes and early abort
+ if ( s.beforeSend && ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || state === 2 ) ) {
+ // Abort if not done already and return
+ return jqXHR.abort();
+ }
+
+ // Aborting is no longer a cancellation
+ strAbort = "abort";
+
+ // Install callbacks on deferreds
+ for ( i in { success: 1, error: 1, complete: 1 } ) {
+ jqXHR[ i ]( s[ i ] );
+ }
+
+ // Get transport
+ transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR );
+
+ // If no transport, we auto-abort
+ if ( !transport ) {
+ done( -1, "No Transport" );
+ } else {
+ jqXHR.readyState = 1;
+
+ // Send global event
+ if ( fireGlobals ) {
+ globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] );
+ }
+ // Timeout
+ if ( s.async && s.timeout > 0 ) {
+ timeoutTimer = setTimeout(function() {
+ jqXHR.abort("timeout");
+ }, s.timeout );
+ }
+
+ try {
+ state = 1;
+ transport.send( requestHeaders, done );
+ } catch ( e ) {
+ // Propagate exception as error if not done
+ if ( state < 2 ) {
+ done( -1, e );
+ // Simply rethrow otherwise
+ } else {
+ throw e;
+ }
+ }
+ }
+
+ // Callback for when everything is done
+ function done( status, nativeStatusText, responses, headers ) {
+ var isSuccess, success, error, response, modified,
+ statusText = nativeStatusText;
+
+ // Called once
+ if ( state === 2 ) {
+ return;
+ }
+
+ // State is "done" now
+ state = 2;
+
+ // Clear timeout if it exists
+ if ( timeoutTimer ) {
+ clearTimeout( timeoutTimer );
+ }
+
+ // Dereference transport for early garbage collection
+ // (no matter how long the jqXHR object will be used)
+ transport = undefined;
+
+ // Cache response headers
+ responseHeadersString = headers || "";
+
+ // Set readyState
+ jqXHR.readyState = status > 0 ? 4 : 0;
+
+ // Determine if successful
+ isSuccess = status >= 200 && status < 300 || status === 304;
+
+ // Get response data
+ if ( responses ) {
+ response = ajaxHandleResponses( s, jqXHR, responses );
+ }
+
+ // Convert no matter what (that way responseXXX fields are always set)
+ response = ajaxConvert( s, response, jqXHR, isSuccess );
+
+ // If successful, handle type chaining
+ if ( isSuccess ) {
+
+ // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
+ if ( s.ifModified ) {
+ modified = jqXHR.getResponseHeader("Last-Modified");
+ if ( modified ) {
+ jQuery.lastModified[ cacheURL ] = modified;
+ }
+ modified = jqXHR.getResponseHeader("etag");
+ if ( modified ) {
+ jQuery.etag[ cacheURL ] = modified;
+ }
+ }
+
+ // if no content
+ if ( status === 204 || s.type === "HEAD" ) {
+ statusText = "nocontent";
+
+ // if not modified
+ } else if ( status === 304 ) {
+ statusText = "notmodified";
+
+ // If we have data, let's convert it
+ } else {
+ statusText = response.state;
+ success = response.data;
+ error = response.error;
+ isSuccess = !error;
+ }
+ } else {
+ // Extract error from statusText and normalize for non-aborts
+ error = statusText;
+ if ( status || !statusText ) {
+ statusText = "error";
+ if ( status < 0 ) {
+ status = 0;
+ }
+ }
+ }
+
+ // Set data for the fake xhr object
+ jqXHR.status = status;
+ jqXHR.statusText = ( nativeStatusText || statusText ) + "";
+
+ // Success/Error
+ if ( isSuccess ) {
+ deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] );
+ } else {
+ deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] );
+ }
+
+ // Status-dependent callbacks
+ jqXHR.statusCode( statusCode );
+ statusCode = undefined;
+
+ if ( fireGlobals ) {
+ globalEventContext.trigger( isSuccess ? "ajaxSuccess" : "ajaxError",
+ [ jqXHR, s, isSuccess ? success : error ] );
+ }
+
+ // Complete
+ completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] );
+
+ if ( fireGlobals ) {
+ globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] );
+ // Handle the global AJAX counter
+ if ( !( --jQuery.active ) ) {
+ jQuery.event.trigger("ajaxStop");
+ }
+ }
+ }
+
+ return jqXHR;
+ },
+
+ getJSON: function( url, data, callback ) {
+ return jQuery.get( url, data, callback, "json" );
+ },
+
+ getScript: function( url, callback ) {
+ return jQuery.get( url, undefined, callback, "script" );
+ }
+});
+
+jQuery.each( [ "get", "post" ], function( i, method ) {
+ jQuery[ method ] = function( url, data, callback, type ) {
+ // Shift arguments if data argument was omitted
+ if ( jQuery.isFunction( data ) ) {
+ type = type || callback;
+ callback = data;
+ data = undefined;
+ }
+
+ return jQuery.ajax({
+ url: url,
+ type: method,
+ dataType: type,
+ data: data,
+ success: callback
+ });
+ };
+});
+
+
+jQuery._evalUrl = function( url ) {
+ return jQuery.ajax({
+ url: url,
+ type: "GET",
+ dataType: "script",
+ async: false,
+ global: false,
+ "throws": true
+ });
+};
+
+
+jQuery.fn.extend({
+ wrapAll: function( html ) {
+ var wrap;
+
+ if ( jQuery.isFunction( html ) ) {
+ return this.each(function( i ) {
+ jQuery( this ).wrapAll( html.call(this, i) );
+ });
+ }
+
+ if ( this[ 0 ] ) {
+
+ // The elements to wrap the target around
+ wrap = jQuery( html, this[ 0 ].ownerDocument ).eq( 0 ).clone( true );
+
+ if ( this[ 0 ].parentNode ) {
+ wrap.insertBefore( this[ 0 ] );
+ }
+
+ wrap.map(function() {
+ var elem = this;
+
+ while ( elem.firstElementChild ) {
+ elem = elem.firstElementChild;
+ }
+
+ return elem;
+ }).append( this );
+ }
+
+ return this;
+ },
+
+ wrapInner: function( html ) {
+ if ( jQuery.isFunction( html ) ) {
+ return this.each(function( i ) {
+ jQuery( this ).wrapInner( html.call(this, i) );
+ });
+ }
+
+ return this.each(function() {
+ var self = jQuery( this ),
+ contents = self.contents();
+
+ if ( contents.length ) {
+ contents.wrapAll( html );
+
+ } else {
+ self.append( html );
+ }
+ });
+ },
+
+ wrap: function( html ) {
+ var isFunction = jQuery.isFunction( html );
+
+ return this.each(function( i ) {
+ jQuery( this ).wrapAll( isFunction ? html.call(this, i) : html );
+ });
+ },
+
+ unwrap: function() {
+ return this.parent().each(function() {
+ if ( !jQuery.nodeName( this, "body" ) ) {
+ jQuery( this ).replaceWith( this.childNodes );
+ }
+ }).end();
+ }
+});
+
+
+jQuery.expr.filters.hidden = function( elem ) {
+ // Support: Opera <= 12.12
+ // Opera reports offsetWidths and offsetHeights less than zero on some elements
+ return elem.offsetWidth <= 0 && elem.offsetHeight <= 0;
+};
+jQuery.expr.filters.visible = function( elem ) {
+ return !jQuery.expr.filters.hidden( elem );
+};
+
+
+
+
+var r20 = /%20/g,
+ rbracket = /\[\]$/,
+ rCRLF = /\r?\n/g,
+ rsubmitterTypes = /^(?:submit|button|image|reset|file)$/i,
+ rsubmittable = /^(?:input|select|textarea|keygen)/i;
+
+function buildParams( prefix, obj, traditional, add ) {
+ var name;
+
+ if ( jQuery.isArray( obj ) ) {
+ // Serialize array item.
+ jQuery.each( obj, function( i, v ) {
+ if ( traditional || rbracket.test( prefix ) ) {
+ // Treat each array item as a scalar.
+ add( prefix, v );
+
+ } else {
+ // Item is non-scalar (array or object), encode its numeric index.
+ buildParams( prefix + "[" + ( typeof v === "object" ? i : "" ) + "]", v, traditional, add );
+ }
+ });
+
+ } else if ( !traditional && jQuery.type( obj ) === "object" ) {
+ // Serialize object item.
+ for ( name in obj ) {
+ buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add );
+ }
+
+ } else {
+ // Serialize scalar item.
+ add( prefix, obj );
+ }
+}
+
+// Serialize an array of form elements or a set of
+// key/values into a query string
+jQuery.param = function( a, traditional ) {
+ var prefix,
+ s = [],
+ add = function( key, value ) {
+ // If value is a function, invoke it and return its value
+ value = jQuery.isFunction( value ) ? value() : ( value == null ? "" : value );
+ s[ s.length ] = encodeURIComponent( key ) + "=" + encodeURIComponent( value );
+ };
+
+ // Set traditional to true for jQuery <= 1.3.2 behavior.
+ if ( traditional === undefined ) {
+ traditional = jQuery.ajaxSettings && jQuery.ajaxSettings.traditional;
+ }
+
+ // If an array was passed in, assume that it is an array of form elements.
+ if ( jQuery.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) {
+ // Serialize the form elements
+ jQuery.each( a, function() {
+ add( this.name, this.value );
+ });
+
+ } else {
+ // If traditional, encode the "old" way (the way 1.3.2 or older
+ // did it), otherwise encode params recursively.
+ for ( prefix in a ) {
+ buildParams( prefix, a[ prefix ], traditional, add );
+ }
+ }
+
+ // Return the resulting serialization
+ return s.join( "&" ).replace( r20, "+" );
+};
+
+jQuery.fn.extend({
+ serialize: function() {
+ return jQuery.param( this.serializeArray() );
+ },
+ serializeArray: function() {
+ return this.map(function() {
+ // Can add propHook for "elements" to filter or add form elements
+ var elements = jQuery.prop( this, "elements" );
+ return elements ? jQuery.makeArray( elements ) : this;
+ })
+ .filter(function() {
+ var type = this.type;
+
+ // Use .is( ":disabled" ) so that fieldset[disabled] works
+ return this.name && !jQuery( this ).is( ":disabled" ) &&
+ rsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) &&
+ ( this.checked || !rcheckableType.test( type ) );
+ })
+ .map(function( i, elem ) {
+ var val = jQuery( this ).val();
+
+ return val == null ?
+ null :
+ jQuery.isArray( val ) ?
+ jQuery.map( val, function( val ) {
+ return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
+ }) :
+ { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
+ }).get();
+ }
+});
+
+
+jQuery.ajaxSettings.xhr = function() {
+ try {
+ return new XMLHttpRequest();
+ } catch( e ) {}
+};
+
+var xhrId = 0,
+ xhrCallbacks = {},
+ xhrSuccessStatus = {
+ // file protocol always yields status code 0, assume 200
+ 0: 200,
+ // Support: IE9
+ // #1450: sometimes IE returns 1223 when it should be 204
+ 1223: 204
+ },
+ xhrSupported = jQuery.ajaxSettings.xhr();
+
+// Support: IE9
+// Open requests must be manually aborted on unload (#5280)
+// See https://support.microsoft.com/kb/2856746 for more info
+if ( window.attachEvent ) {
+ window.attachEvent( "onunload", function() {
+ for ( var key in xhrCallbacks ) {
+ xhrCallbacks[ key ]();
+ }
+ });
+}
+
+support.cors = !!xhrSupported && ( "withCredentials" in xhrSupported );
+support.ajax = xhrSupported = !!xhrSupported;
+
+jQuery.ajaxTransport(function( options ) {
+ var callback;
+
+ // Cross domain only allowed if supported through XMLHttpRequest
+ if ( support.cors || xhrSupported && !options.crossDomain ) {
+ return {
+ send: function( headers, complete ) {
+ var i,
+ xhr = options.xhr(),
+ id = ++xhrId;
+
+ xhr.open( options.type, options.url, options.async, options.username, options.password );
+
+ // Apply custom fields if provided
+ if ( options.xhrFields ) {
+ for ( i in options.xhrFields ) {
+ xhr[ i ] = options.xhrFields[ i ];
+ }
+ }
+
+ // Override mime type if needed
+ if ( options.mimeType && xhr.overrideMimeType ) {
+ xhr.overrideMimeType( options.mimeType );
+ }
+
+ // X-Requested-With header
+ // For cross-domain requests, seeing as conditions for a preflight are
+ // akin to a jigsaw puzzle, we simply never set it to be sure.
+ // (it can always be set on a per-request basis or even using ajaxSetup)
+ // For same-domain requests, won't change header if already provided.
+ if ( !options.crossDomain && !headers["X-Requested-With"] ) {
+ headers["X-Requested-With"] = "XMLHttpRequest";
+ }
+
+ // Set headers
+ for ( i in headers ) {
+ xhr.setRequestHeader( i, headers[ i ] );
+ }
+
+ // Callback
+ callback = function( type ) {
+ return function() {
+ if ( callback ) {
+ delete xhrCallbacks[ id ];
+ callback = xhr.onload = xhr.onerror = null;
+
+ if ( type === "abort" ) {
+ xhr.abort();
+ } else if ( type === "error" ) {
+ complete(
+ // file: protocol always yields status 0; see #8605, #14207
+ xhr.status,
+ xhr.statusText
+ );
+ } else {
+ complete(
+ xhrSuccessStatus[ xhr.status ] || xhr.status,
+ xhr.statusText,
+ // Support: IE9
+ // Accessing binary-data responseText throws an exception
+ // (#11426)
+ typeof xhr.responseText === "string" ? {
+ text: xhr.responseText
+ } : undefined,
+ xhr.getAllResponseHeaders()
+ );
+ }
+ }
+ };
+ };
+
+ // Listen to events
+ xhr.onload = callback();
+ xhr.onerror = callback("error");
+
+ // Create the abort callback
+ callback = xhrCallbacks[ id ] = callback("abort");
+
+ try {
+ // Do send the request (this may raise an exception)
+ xhr.send( options.hasContent && options.data || null );
+ } catch ( e ) {
+ // #14683: Only rethrow if this hasn't been notified as an error yet
+ if ( callback ) {
+ throw e;
+ }
+ }
+ },
+
+ abort: function() {
+ if ( callback ) {
+ callback();
+ }
+ }
+ };
+ }
+});
+
+
+
+
+// Install script dataType
+jQuery.ajaxSetup({
+ accepts: {
+ script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"
+ },
+ contents: {
+ script: /(?:java|ecma)script/
+ },
+ converters: {
+ "text script": function( text ) {
+ jQuery.globalEval( text );
+ return text;
+ }
+ }
+});
+
+// Handle cache's special case and crossDomain
+jQuery.ajaxPrefilter( "script", function( s ) {
+ if ( s.cache === undefined ) {
+ s.cache = false;
+ }
+ if ( s.crossDomain ) {
+ s.type = "GET";
+ }
+});
+
+// Bind script tag hack transport
+jQuery.ajaxTransport( "script", function( s ) {
+ // This transport only deals with cross domain requests
+ if ( s.crossDomain ) {
+ var script, callback;
+ return {
+ send: function( _, complete ) {
+ script = jQuery("<script>").prop({
+ async: true,
+ charset: s.scriptCharset,
+ src: s.url
+ }).on(
+ "load error",
+ callback = function( evt ) {
+ script.remove();
+ callback = null;
+ if ( evt ) {
+ complete( evt.type === "error" ? 404 : 200, evt.type );
+ }
+ }
+ );
+ document.head.appendChild( script[ 0 ] );
+ },
+ abort: function() {
+ if ( callback ) {
+ callback();
+ }
+ }
+ };
+ }
+});
+
+
+
+
+var oldCallbacks = [],
+ rjsonp = /(=)\?(?=&|$)|\?\?/;
+
+// Default jsonp settings
+jQuery.ajaxSetup({
+ jsonp: "callback",
+ jsonpCallback: function() {
+ var callback = oldCallbacks.pop() || ( jQuery.expando + "_" + ( nonce++ ) );
+ this[ callback ] = true;
+ return callback;
+ }
+});
+
+// Detect, normalize options and install callbacks for jsonp requests
+jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) {
+
+ var callbackName, overwritten, responseContainer,
+ jsonProp = s.jsonp !== false && ( rjsonp.test( s.url ) ?
+ "url" :
+ typeof s.data === "string" && !( s.contentType || "" ).indexOf("application/x-www-form-urlencoded") && rjsonp.test( s.data ) && "data"
+ );
+
+ // Handle iff the expected data type is "jsonp" or we have a parameter to set
+ if ( jsonProp || s.dataTypes[ 0 ] === "jsonp" ) {
+
+ // Get callback name, remembering preexisting value associated with it
+ callbackName = s.jsonpCallback = jQuery.isFunction( s.jsonpCallback ) ?
+ s.jsonpCallback() :
+ s.jsonpCallback;
+
+ // Insert callback into url or form data
+ if ( jsonProp ) {
+ s[ jsonProp ] = s[ jsonProp ].replace( rjsonp, "$1" + callbackName );
+ } else if ( s.jsonp !== false ) {
+ s.url += ( rquery.test( s.url ) ? "&" : "?" ) + s.jsonp + "=" + callbackName;
+ }
+
+ // Use data converter to retrieve json after script execution
+ s.converters["script json"] = function() {
+ if ( !responseContainer ) {
+ jQuery.error( callbackName + " was not called" );
+ }
+ return responseContainer[ 0 ];
+ };
+
+ // force json dataType
+ s.dataTypes[ 0 ] = "json";
+
+ // Install callback
+ overwritten = window[ callbackName ];
+ window[ callbackName ] = function() {
+ responseContainer = arguments;
+ };
+
+ // Clean-up function (fires after converters)
+ jqXHR.always(function() {
+ // Restore preexisting value
+ window[ callbackName ] = overwritten;
+
+ // Save back as free
+ if ( s[ callbackName ] ) {
+ // make sure that re-using the options doesn't screw things around
+ s.jsonpCallback = originalSettings.jsonpCallback;
+
+ // save the callback name for future use
+ oldCallbacks.push( callbackName );
+ }
+
+ // Call if it was a function and we have a response
+ if ( responseContainer && jQuery.isFunction( overwritten ) ) {
+ overwritten( responseContainer[ 0 ] );
+ }
+
+ responseContainer = overwritten = undefined;
+ });
+
+ // Delegate to script
+ return "script";
+ }
+});
+
+
+
+
+// data: string of html
+// context (optional): If specified, the fragment will be created in this context, defaults to document
+// keepScripts (optional): If true, will include scripts passed in the html string
+jQuery.parseHTML = function( data, context, keepScripts ) {
+ if ( !data || typeof data !== "string" ) {
+ return null;
+ }
+ if ( typeof context === "boolean" ) {
+ keepScripts = context;
+ context = false;
+ }
+ context = context || document;
+
+ var parsed = rsingleTag.exec( data ),
+ scripts = !keepScripts && [];
+
+ // Single tag
+ if ( parsed ) {
+ return [ context.createElement( parsed[1] ) ];
+ }
+
+ parsed = jQuery.buildFragment( [ data ], context, scripts );
+
+ if ( scripts && scripts.length ) {
+ jQuery( scripts ).remove();
+ }
+
+ return jQuery.merge( [], parsed.childNodes );
+};
+
+
+// Keep a copy of the old load method
+var _load = jQuery.fn.load;
+
+/**
+ * Load a url into a page
+ */
+jQuery.fn.load = function( url, params, callback ) {
+ if ( typeof url !== "string" && _load ) {
+ return _load.apply( this, arguments );
+ }
+
+ var selector, type, response,
+ self = this,
+ off = url.indexOf(" ");
+
+ if ( off >= 0 ) {
+ selector = jQuery.trim( url.slice( off ) );
+ url = url.slice( 0, off );
+ }
+
+ // If it's a function
+ if ( jQuery.isFunction( params ) ) {
+
+ // We assume that it's the callback
+ callback = params;
+ params = undefined;
+
+ // Otherwise, build a param string
+ } else if ( params && typeof params === "object" ) {
+ type = "POST";
+ }
+
+ // If we have elements to modify, make the request
+ if ( self.length > 0 ) {
+ jQuery.ajax({
+ url: url,
+
+ // if "type" variable is undefined, then "GET" method will be used
+ type: type,
+ dataType: "html",
+ data: params
+ }).done(function( responseText ) {
+
+ // Save response for use in complete callback
+ response = arguments;
+
+ self.html( selector ?
+
+ // If a selector was specified, locate the right elements in a dummy div
+ // Exclude scripts to avoid IE 'Permission Denied' errors
+ jQuery("<div>").append( jQuery.parseHTML( responseText ) ).find( selector ) :
+
+ // Otherwise use the full result
+ responseText );
+
+ }).complete( callback && function( jqXHR, status ) {
+ self.each( callback, response || [ jqXHR.responseText, status, jqXHR ] );
+ });
+ }
+
+ return this;
+};
+
+
+
+
+// Attach a bunch of functions for handling common AJAX events
+jQuery.each( [ "ajaxStart", "ajaxStop", "ajaxComplete", "ajaxError", "ajaxSuccess", "ajaxSend" ], function( i, type ) {
+ jQuery.fn[ type ] = function( fn ) {
+ return this.on( type, fn );
+ };
+});
+
+
+
+
+jQuery.expr.filters.animated = function( elem ) {
+ return jQuery.grep(jQuery.timers, function( fn ) {
+ return elem === fn.elem;
+ }).length;
+};
+
+
+
+
+var docElem = window.document.documentElement;
+
+/**
+ * Gets a window from an element
+ */
+function getWindow( elem ) {
+ return jQuery.isWindow( elem ) ? elem : elem.nodeType === 9 && elem.defaultView;
+}
+
+jQuery.offset = {
+ setOffset: function( elem, options, i ) {
+ var curPosition, curLeft, curCSSTop, curTop, curOffset, curCSSLeft, calculatePosition,
+ position = jQuery.css( elem, "position" ),
+ curElem = jQuery( elem ),
+ props = {};
+
+ // Set position first, in-case top/left are set even on static elem
+ if ( position === "static" ) {
+ elem.style.position = "relative";
+ }
+
+ curOffset = curElem.offset();
+ curCSSTop = jQuery.css( elem, "top" );
+ curCSSLeft = jQuery.css( elem, "left" );
+ calculatePosition = ( position === "absolute" || position === "fixed" ) &&
+ ( curCSSTop + curCSSLeft ).indexOf("auto") > -1;
+
+ // Need to be able to calculate position if either
+ // top or left is auto and position is either absolute or fixed
+ if ( calculatePosition ) {
+ curPosition = curElem.position();
+ curTop = curPosition.top;
+ curLeft = curPosition.left;
+
+ } else {
+ curTop = parseFloat( curCSSTop ) || 0;
+ curLeft = parseFloat( curCSSLeft ) || 0;
+ }
+
+ if ( jQuery.isFunction( options ) ) {
+ options = options.call( elem, i, curOffset );
+ }
+
+ if ( options.top != null ) {
+ props.top = ( options.top - curOffset.top ) + curTop;
+ }
+ if ( options.left != null ) {
+ props.left = ( options.left - curOffset.left ) + curLeft;
+ }
+
+ if ( "using" in options ) {
+ options.using.call( elem, props );
+
+ } else {
+ curElem.css( props );
+ }
+ }
+};
+
+jQuery.fn.extend({
+ offset: function( options ) {
+ if ( arguments.length ) {
+ return options === undefined ?
+ this :
+ this.each(function( i ) {
+ jQuery.offset.setOffset( this, options, i );
+ });
+ }
+
+ var docElem, win,
+ elem = this[ 0 ],
+ box = { top: 0, left: 0 },
+ doc = elem && elem.ownerDocument;
+
+ if ( !doc ) {
+ return;
+ }
+
+ docElem = doc.documentElement;
+
+ // Make sure it's not a disconnected DOM node
+ if ( !jQuery.contains( docElem, elem ) ) {
+ return box;
+ }
+
+ // Support: BlackBerry 5, iOS 3 (original iPhone)
+ // If we don't have gBCR, just use 0,0 rather than error
+ if ( typeof elem.getBoundingClientRect !== strundefined ) {
+ box = elem.getBoundingClientRect();
+ }
+ win = getWindow( doc );
+ return {
+ top: box.top + win.pageYOffset - docElem.clientTop,
+ left: box.left + win.pageXOffset - docElem.clientLeft
+ };
+ },
+
+ position: function() {
+ if ( !this[ 0 ] ) {
+ return;
+ }
+
+ var offsetParent, offset,
+ elem = this[ 0 ],
+ parentOffset = { top: 0, left: 0 };
+
+ // Fixed elements are offset from window (parentOffset = {top:0, left: 0}, because it is its only offset parent
+ if ( jQuery.css( elem, "position" ) === "fixed" ) {
+ // Assume getBoundingClientRect is there when computed position is fixed
+ offset = elem.getBoundingClientRect();
+
+ } else {
+ // Get *real* offsetParent
+ offsetParent = this.offsetParent();
+
+ // Get correct offsets
+ offset = this.offset();
+ if ( !jQuery.nodeName( offsetParent[ 0 ], "html" ) ) {
+ parentOffset = offsetParent.offset();
+ }
+
+ // Add offsetParent borders
+ parentOffset.top += jQuery.css( offsetParent[ 0 ], "borderTopWidth", true );
+ parentOffset.left += jQuery.css( offsetParent[ 0 ], "borderLeftWidth", true );
+ }
+
+ // Subtract parent offsets and element margins
+ return {
+ top: offset.top - parentOffset.top - jQuery.css( elem, "marginTop", true ),
+ left: offset.left - parentOffset.left - jQuery.css( elem, "marginLeft", true )
+ };
+ },
+
+ offsetParent: function() {
+ return this.map(function() {
+ var offsetParent = this.offsetParent || docElem;
+
+ while ( offsetParent && ( !jQuery.nodeName( offsetParent, "html" ) && jQuery.css( offsetParent, "position" ) === "static" ) ) {
+ offsetParent = offsetParent.offsetParent;
+ }
+
+ return offsetParent || docElem;
+ });
+ }
+});
+
+// Create scrollLeft and scrollTop methods
+jQuery.each( { scrollLeft: "pageXOffset", scrollTop: "pageYOffset" }, function( method, prop ) {
+ var top = "pageYOffset" === prop;
+
+ jQuery.fn[ method ] = function( val ) {
+ return access( this, function( elem, method, val ) {
+ var win = getWindow( elem );
+
+ if ( val === undefined ) {
+ return win ? win[ prop ] : elem[ method ];
+ }
+
+ if ( win ) {
+ win.scrollTo(
+ !top ? val : window.pageXOffset,
+ top ? val : window.pageYOffset
+ );
+
+ } else {
+ elem[ method ] = val;
+ }
+ }, method, val, arguments.length, null );
+ };
+});
+
+// Support: Safari<7+, Chrome<37+
+// Add the top/left cssHooks using jQuery.fn.position
+// Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=29084
+// Blink bug: https://code.google.com/p/chromium/issues/detail?id=229280
+// getComputedStyle returns percent when specified for top/left/bottom/right;
+// rather than make the css module depend on the offset module, just check for it here
+jQuery.each( [ "top", "left" ], function( i, prop ) {
+ jQuery.cssHooks[ prop ] = addGetHookIf( support.pixelPosition,
+ function( elem, computed ) {
+ if ( computed ) {
+ computed = curCSS( elem, prop );
+ // If curCSS returns percentage, fallback to offset
+ return rnumnonpx.test( computed ) ?
+ jQuery( elem ).position()[ prop ] + "px" :
+ computed;
+ }
+ }
+ );
+});
+
+
+// Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods
+jQuery.each( { Height: "height", Width: "width" }, function( name, type ) {
+ jQuery.each( { padding: "inner" + name, content: type, "": "outer" + name }, function( defaultExtra, funcName ) {
+ // Margin is only for outerHeight, outerWidth
+ jQuery.fn[ funcName ] = function( margin, value ) {
+ var chainable = arguments.length && ( defaultExtra || typeof margin !== "boolean" ),
+ extra = defaultExtra || ( margin === true || value === true ? "margin" : "border" );
+
+ return access( this, function( elem, type, value ) {
+ var doc;
+
+ if ( jQuery.isWindow( elem ) ) {
+ // As of 5/8/2012 this will yield incorrect results for Mobile Safari, but there
+ // isn't a whole lot we can do. See pull request at this URL for discussion:
+ // https://github.com/jquery/jquery/pull/764
+ return elem.document.documentElement[ "client" + name ];
+ }
+
+ // Get document width or height
+ if ( elem.nodeType === 9 ) {
+ doc = elem.documentElement;
+
+ // Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height],
+ // whichever is greatest
+ return Math.max(
+ elem.body[ "scroll" + name ], doc[ "scroll" + name ],
+ elem.body[ "offset" + name ], doc[ "offset" + name ],
+ doc[ "client" + name ]
+ );
+ }
+
+ return value === undefined ?
+ // Get width or height on the element, requesting but not forcing parseFloat
+ jQuery.css( elem, type, extra ) :
+
+ // Set width or height on the element
+ jQuery.style( elem, type, value, extra );
+ }, type, chainable ? margin : undefined, chainable, null );
+ };
+ });
+});
+
+
+// The number of elements contained in the matched element set
+jQuery.fn.size = function() {
+ return this.length;
+};
+
+jQuery.fn.andSelf = jQuery.fn.addBack;
+
+
+
+
+// Register as a named AMD module, since jQuery can be concatenated with other
+// files that may use define, but not via a proper concatenation script that
+// understands anonymous AMD modules. A named AMD is safest and most robust
+// way to register. Lowercase jquery is used because AMD module names are
+// derived from file names, and jQuery is normally delivered in a lowercase
+// file name. Do this after creating the global so that if an AMD module wants
+// to call noConflict to hide this version of jQuery, it will work.
+
+// Note that for maximum portability, libraries that are not jQuery should
+// declare themselves as anonymous modules, and avoid setting a global if an
+// AMD loader is present. jQuery is a special case. For more information, see
+// https://github.com/jrburke/requirejs/wiki/Updating-existing-libraries#wiki-anon
+
+if ( typeof define === "function" && define.amd ) {
+ define( "jquery", [], function() {
+ return jQuery;
+ });
+}
+
+
+
+
+var
+ // Map over jQuery in case of overwrite
+ _jQuery = window.jQuery,
+
+ // Map over the $ in case of overwrite
+ _$ = window.$;
+
+jQuery.noConflict = function( deep ) {
+ if ( window.$ === jQuery ) {
+ window.$ = _$;
+ }
+
+ if ( deep && window.jQuery === jQuery ) {
+ window.jQuery = _jQuery;
+ }
+
+ return jQuery;
+};
+
+// Expose jQuery and $ identifiers, even in AMD
+// (#7102#comment:10, https://github.com/jquery/jquery/pull/557)
+// and CommonJS for browser emulators (#13566)
+if ( typeof noGlobal === strundefined ) {
+ window.jQuery = window.$ = jQuery;
+}
+
+
+
+
+return jQuery;
+
+}));
diff --git a/views/ngXosViews/serviceGrid/src/vendor/jquery/dist/jquery.min.js b/views/ngXosViews/serviceGrid/src/vendor/jquery/dist/jquery.min.js
new file mode 100644
index 0000000..fad9ab1
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/jquery/dist/jquery.min.js
@@ -0,0 +1,5 @@
+/*! jQuery v2.1.4 | (c) 2005, 2015 jQuery Foundation, Inc. | jquery.org/license */
+!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l=a.document,m="2.1.4",n=function(a,b){return new n.fn.init(a,b)},o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return n.each(this,a,b)},map:function(a){return this.pushStack(n.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},n.extend=n.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||n.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(a=arguments[h]))for(b in a)c=g[b],d=a[b],g!==d&&(j&&d&&(n.isPlainObject(d)||(e=n.isArray(d)))?(e?(e=!1,f=c&&n.isArray(c)?c:[]):f=c&&n.isPlainObject(c)?c:{},g[b]=n.extend(j,f,d)):void 0!==d&&(g[b]=d));return g},n.extend({expando:"jQuery"+(m+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===n.type(a)},isArray:Array.isArray,isWindow:function(a){return null!=a&&a===a.window},isNumeric:function(a){return!n.isArray(a)&&a-parseFloat(a)+1>=0},isPlainObject:function(a){return"object"!==n.type(a)||a.nodeType||n.isWindow(a)?!1:a.constructor&&!j.call(a.constructor.prototype,"isPrototypeOf")?!1:!0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(a){var b,c=eval;a=n.trim(a),a&&(1===a.indexOf("use strict")?(b=l.createElement("script"),b.text=a,l.head.appendChild(b).parentNode.removeChild(b)):c(a))},camelCase:function(a){return a.replace(p,"ms-").replace(q,r)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=s(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(o,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(s(Object(a))?n.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){return null==b?-1:g.call(b,a,c)},merge:function(a,b){for(var c=+b.length,d=0,e=a.length;c>d;d++)a[e++]=b[d];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=s(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(c=a[b],b=a,a=c),n.isFunction(a)?(e=d.call(arguments,2),f=function(){return a.apply(b||this,e.concat(d.call(arguments)))},f.guid=a.guid=a.guid||n.guid++,f):void 0},now:Date.now,support:k}),n.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function s(a){var b="length"in a&&a.length,c=n.type(a);return"function"===c||n.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var t=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+1*new Date,v=a.document,w=0,x=0,y=ha(),z=ha(),A=ha(),B=function(a,b){return a===b&&(l=!0),0},C=1<<31,D={}.hasOwnProperty,E=[],F=E.pop,G=E.push,H=E.push,I=E.slice,J=function(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1},K="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",L="[\\x20\\t\\r\\n\\f]",M="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",N=M.replace("w","w#"),O="\\["+L+"*("+M+")(?:"+L+"*([*^$|!~]?=)"+L+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+N+"))|)"+L+"*\\]",P=":("+M+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+O+")*)|.*)\\)|)",Q=new RegExp(L+"+","g"),R=new RegExp("^"+L+"+|((?:^|[^\\\\])(?:\\\\.)*)"+L+"+$","g"),S=new RegExp("^"+L+"*,"+L+"*"),T=new RegExp("^"+L+"*([>+~]|"+L+")"+L+"*"),U=new RegExp("="+L+"*([^\\]'\"]*?)"+L+"*\\]","g"),V=new RegExp(P),W=new RegExp("^"+N+"$"),X={ID:new RegExp("^#("+M+")"),CLASS:new RegExp("^\\.("+M+")"),TAG:new RegExp("^("+M.replace("w","w*")+")"),ATTR:new RegExp("^"+O),PSEUDO:new RegExp("^"+P),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+L+"*(even|odd|(([+-]|)(\\d*)n|)"+L+"*(?:([+-]|)"+L+"*(\\d+)|))"+L+"*\\)|)","i"),bool:new RegExp("^(?:"+K+")$","i"),needsContext:new RegExp("^"+L+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+L+"*((?:-\\d)?\\d*)"+L+"*\\)|)(?=[^-]|$)","i")},Y=/^(?:input|select|textarea|button)$/i,Z=/^h\d$/i,$=/^[^{]+\{\s*\[native \w/,_=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,aa=/[+~]/,ba=/'|\\/g,ca=new RegExp("\\\\([\\da-f]{1,6}"+L+"?|("+L+")|.)","ig"),da=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)},ea=function(){m()};try{H.apply(E=I.call(v.childNodes),v.childNodes),E[v.childNodes.length].nodeType}catch(fa){H={apply:E.length?function(a,b){G.apply(a,I.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function ga(a,b,d,e){var f,h,j,k,l,o,r,s,w,x;if((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,d=d||[],k=b.nodeType,"string"!=typeof a||!a||1!==k&&9!==k&&11!==k)return d;if(!e&&p){if(11!==k&&(f=_.exec(a)))if(j=f[1]){if(9===k){if(h=b.getElementById(j),!h||!h.parentNode)return d;if(h.id===j)return d.push(h),d}else if(b.ownerDocument&&(h=b.ownerDocument.getElementById(j))&&t(b,h)&&h.id===j)return d.push(h),d}else{if(f[2])return H.apply(d,b.getElementsByTagName(a)),d;if((j=f[3])&&c.getElementsByClassName)return H.apply(d,b.getElementsByClassName(j)),d}if(c.qsa&&(!q||!q.test(a))){if(s=r=u,w=b,x=1!==k&&a,1===k&&"object"!==b.nodeName.toLowerCase()){o=g(a),(r=b.getAttribute("id"))?s=r.replace(ba,"\\$&"):b.setAttribute("id",s),s="[id='"+s+"'] ",l=o.length;while(l--)o[l]=s+ra(o[l]);w=aa.test(a)&&pa(b.parentNode)||b,x=o.join(",")}if(x)try{return H.apply(d,w.querySelectorAll(x)),d}catch(y){}finally{r||b.removeAttribute("id")}}}return i(a.replace(R,"$1"),b,d,e)}function ha(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function ia(a){return a[u]=!0,a}function ja(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function ka(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function la(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||C)-(~a.sourceIndex||C);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function ma(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function na(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function oa(a){return ia(function(b){return b=+b,ia(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function pa(a){return a&&"undefined"!=typeof a.getElementsByTagName&&a}c=ga.support={},f=ga.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=ga.setDocument=function(a){var b,e,g=a?a.ownerDocument||a:v;return g!==n&&9===g.nodeType&&g.documentElement?(n=g,o=g.documentElement,e=g.defaultView,e&&e!==e.top&&(e.addEventListener?e.addEventListener("unload",ea,!1):e.attachEvent&&e.attachEvent("onunload",ea)),p=!f(g),c.attributes=ja(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ja(function(a){return a.appendChild(g.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=$.test(g.getElementsByClassName),c.getById=ja(function(a){return o.appendChild(a).id=u,!g.getElementsByName||!g.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(ca,da);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(ca,da);return function(a){var c="undefined"!=typeof a.getAttributeNode&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return"undefined"!=typeof b.getElementsByTagName?b.getElementsByTagName(a):c.qsa?b.querySelectorAll(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=$.test(g.querySelectorAll))&&(ja(function(a){o.appendChild(a).innerHTML="<a id='"+u+"'></a><select id='"+u+"-\f]' msallowcapture=''><option selected=''></option></select>",a.querySelectorAll("[msallowcapture^='']").length&&q.push("[*^$]="+L+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+L+"*(?:value|"+K+")"),a.querySelectorAll("[id~="+u+"-]").length||q.push("~="),a.querySelectorAll(":checked").length||q.push(":checked"),a.querySelectorAll("a#"+u+"+*").length||q.push(".#.+[+~]")}),ja(function(a){var b=g.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+L+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=$.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ja(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",P)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=$.test(o.compareDocumentPosition),t=b||$.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===g||a.ownerDocument===v&&t(v,a)?-1:b===g||b.ownerDocument===v&&t(v,b)?1:k?J(k,a)-J(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,e=a.parentNode,f=b.parentNode,h=[a],i=[b];if(!e||!f)return a===g?-1:b===g?1:e?-1:f?1:k?J(k,a)-J(k,b):0;if(e===f)return la(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)i.unshift(c);while(h[d]===i[d])d++;return d?la(h[d],i[d]):h[d]===v?-1:i[d]===v?1:0},g):n},ga.matches=function(a,b){return ga(a,null,null,b)},ga.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(U,"='$1']"),!(!c.matchesSelector||!p||r&&r.test(b)||q&&q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return ga(b,n,null,[a]).length>0},ga.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},ga.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&D.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},ga.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},ga.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=ga.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=ga.selectors={cacheLength:50,createPseudo:ia,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(ca,da),a[3]=(a[3]||a[4]||a[5]||"").replace(ca,da),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||ga.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&ga.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return X.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&V.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(ca,da).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+L+")"+a+"("+L+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||"undefined"!=typeof a.getAttribute&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=ga.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e.replace(Q," ")+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){k=q[u]||(q[u]={}),j=k[a]||[],n=j[0]===w&&j[1],m=j[0]===w&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[w,n,m];break}}else if(s&&(j=(b[u]||(b[u]={}))[a])&&j[0]===w)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(s&&((l[u]||(l[u]={}))[a]=[w,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||ga.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?ia(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=J(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:ia(function(a){var b=[],c=[],d=h(a.replace(R,"$1"));return d[u]?ia(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),b[0]=null,!c.pop()}}),has:ia(function(a){return function(b){return ga(a,b).length>0}}),contains:ia(function(a){return a=a.replace(ca,da),function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:ia(function(a){return W.test(a||"")||ga.error("unsupported lang: "+a),a=a.replace(ca,da).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Z.test(a.nodeName)},input:function(a){return Y.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:oa(function(){return[0]}),last:oa(function(a,b){return[b-1]}),eq:oa(function(a,b,c){return[0>c?c+b:c]}),even:oa(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:oa(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:oa(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:oa(function(a,b,c){for(var d=0>c?c+b:c;++d<b;)a.push(d);return a})}},d.pseudos.nth=d.pseudos.eq;for(b in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})d.pseudos[b]=ma(b);for(b in{submit:!0,reset:!0})d.pseudos[b]=na(b);function qa(){}qa.prototype=d.filters=d.pseudos,d.setFilters=new qa,g=ga.tokenize=function(a,b){var c,e,f,g,h,i,j,k=z[a+" "];if(k)return b?0:k.slice(0);h=a,i=[],j=d.preFilter;while(h){(!c||(e=S.exec(h)))&&(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),c=!1,(e=T.exec(h))&&(c=e.shift(),f.push({value:c,type:e[0].replace(R," ")}),h=h.slice(c.length));for(g in d.filter)!(e=X[g].exec(h))||j[g]&&!(e=j[g](e))||(c=e.shift(),f.push({value:c,type:g,matches:e}),h=h.slice(c.length));if(!c)break}return b?h.length:h?ga.error(a):z(a,i).slice(0)};function ra(a){for(var b=0,c=a.length,d="";c>b;b++)d+=a[b].value;return d}function sa(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[u]||(b[u]={}),(h=i[d])&&h[0]===w&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function ta(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function ua(a,b,c){for(var d=0,e=b.length;e>d;d++)ga(a,b[d],c);return c}function va(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function wa(a,b,c,d,e,f){return d&&!d[u]&&(d=wa(d)),e&&!e[u]&&(e=wa(e,f)),ia(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||ua(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:va(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=va(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?J(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=va(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):H.apply(g,r)})}function xa(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=sa(function(a){return a===b},h,!0),l=sa(function(a){return J(b,a)>-1},h,!0),m=[function(a,c,d){var e=!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d));return b=null,e}];f>i;i++)if(c=d.relative[a[i].type])m=[sa(ta(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return wa(i>1&&ta(m),i>1&&ra(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(R,"$1"),c,e>i&&xa(a.slice(i,e)),f>e&&xa(a=a.slice(e)),f>e&&ra(a))}m.push(c)}return ta(m)}function ya(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,m,o,p=0,q="0",r=f&&[],s=[],t=j,u=f||e&&d.find.TAG("*",k),v=w+=null==t?1:Math.random()||.1,x=u.length;for(k&&(j=g!==n&&g);q!==x&&null!=(l=u[q]);q++){if(e&&l){m=0;while(o=a[m++])if(o(l,g,h)){i.push(l);break}k&&(w=v)}c&&((l=!o&&l)&&p--,f&&r.push(l))}if(p+=q,c&&q!==p){m=0;while(o=b[m++])o(r,s,g,h);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=F.call(i));s=va(s)}H.apply(i,s),k&&!f&&s.length>0&&p+b.length>1&&ga.uniqueSort(i)}return k&&(w=v,j=t),r};return c?ia(f):f}return h=ga.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=xa(b[c]),f[u]?d.push(f):e.push(f);f=A(a,ya(e,d)),f.selector=a}return f},i=ga.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(ca,da),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=X.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(ca,da),aa.test(j[0].type)&&pa(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&ra(j),!a)return H.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,aa.test(a)&&pa(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ja(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),ja(function(a){return a.innerHTML="<a href='#'></a>","#"===a.firstChild.getAttribute("href")})||ka("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ja(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||ka("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ja(function(a){return null==a.getAttribute("disabled")})||ka(K,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),ga}(a);n.find=t,n.expr=t.selectors,n.expr[":"]=n.expr.pseudos,n.unique=t.uniqueSort,n.text=t.getText,n.isXMLDoc=t.isXML,n.contains=t.contains;var u=n.expr.match.needsContext,v=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,w=/^.[^:#\[\.,]*$/;function x(a,b,c){if(n.isFunction(b))return n.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return n.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(w.test(b))return n.filter(b,a,c);b=n.filter(b,a)}return n.grep(a,function(a){return g.call(b,a)>=0!==c})}n.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?n.find.matchesSelector(d,a)?[d]:[]:n.find.matches(a,n.grep(b,function(a){return 1===a.nodeType}))},n.fn.extend({find:function(a){var b,c=this.length,d=[],e=this;if("string"!=typeof a)return this.pushStack(n(a).filter(function(){for(b=0;c>b;b++)if(n.contains(e[b],this))return!0}));for(b=0;c>b;b++)n.find(a,e[b],d);return d=this.pushStack(c>1?n.unique(d):d),d.selector=this.selector?this.selector+" "+a:a,d},filter:function(a){return this.pushStack(x(this,a||[],!1))},not:function(a){return this.pushStack(x(this,a||[],!0))},is:function(a){return!!x(this,"string"==typeof a&&u.test(a)?n(a):a||[],!1).length}});var y,z=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,A=n.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a[0]&&">"===a[a.length-1]&&a.length>=3?[null,a,null]:z.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||y).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof n?b[0]:b,n.merge(this,n.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:l,!0)),v.test(c[1])&&n.isPlainObject(b))for(c in b)n.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}return d=l.getElementById(c[2]),d&&d.parentNode&&(this.length=1,this[0]=d),this.context=l,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):n.isFunction(a)?"undefined"!=typeof y.ready?y.ready(a):a(n):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),n.makeArray(a,this))};A.prototype=n.fn,y=n(l);var B=/^(?:parents|prev(?:Until|All))/,C={children:!0,contents:!0,next:!0,prev:!0};n.extend({dir:function(a,b,c){var d=[],e=void 0!==c;while((a=a[b])&&9!==a.nodeType)if(1===a.nodeType){if(e&&n(a).is(c))break;d.push(a)}return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),n.fn.extend({has:function(a){var b=n(a,this),c=b.length;return this.filter(function(){for(var a=0;c>a;a++)if(n.contains(this,b[a]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=u.test(a)||"string"!=typeof a?n(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&n.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?n.unique(f):f)},index:function(a){return a?"string"==typeof a?g.call(n(a),this[0]):g.call(this,a.jquery?a[0]:a):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(n.unique(n.merge(this.get(),n(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function D(a,b){while((a=a[b])&&1!==a.nodeType);return a}n.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return n.dir(a,"parentNode")},parentsUntil:function(a,b,c){return n.dir(a,"parentNode",c)},next:function(a){return D(a,"nextSibling")},prev:function(a){return D(a,"previousSibling")},nextAll:function(a){return n.dir(a,"nextSibling")},prevAll:function(a){return n.dir(a,"previousSibling")},nextUntil:function(a,b,c){return n.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return n.dir(a,"previousSibling",c)},siblings:function(a){return n.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return n.sibling(a.firstChild)},contents:function(a){return a.contentDocument||n.merge([],a.childNodes)}},function(a,b){n.fn[a]=function(c,d){var e=n.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=n.filter(d,e)),this.length>1&&(C[a]||n.unique(e),B.test(a)&&e.reverse()),this.pushStack(e)}});var E=/\S+/g,F={};function G(a){var b=F[a]={};return n.each(a.match(E)||[],function(a,c){b[c]=!0}),b}n.Callbacks=function(a){a="string"==typeof a?F[a]||G(a):n.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(b=a.memory&&l,c=!0,g=e||0,e=0,f=h.length,d=!0;h&&f>g;g++)if(h[g].apply(l[0],l[1])===!1&&a.stopOnFalse){b=!1;break}d=!1,h&&(i?i.length&&j(i.shift()):b?h=[]:k.disable())},k={add:function(){if(h){var c=h.length;!function g(b){n.each(b,function(b,c){var d=n.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&g(c)})}(arguments),d?f=h.length:b&&(e=c,j(b))}return this},remove:function(){return h&&n.each(arguments,function(a,b){var c;while((c=n.inArray(b,h,c))>-1)h.splice(c,1),d&&(f>=c&&f--,g>=c&&g--)}),this},has:function(a){return a?n.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],f=0,this},disable:function(){return h=i=b=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,b||k.disable(),this},locked:function(){return!i},fireWith:function(a,b){return!h||c&&!i||(b=b||[],b=[a,b.slice?b.slice():b],d?i.push(b):j(b)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!c}};return k},n.extend({Deferred:function(a){var b=[["resolve","done",n.Callbacks("once memory"),"resolved"],["reject","fail",n.Callbacks("once memory"),"rejected"],["notify","progress",n.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return n.Deferred(function(c){n.each(b,function(b,f){var g=n.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&n.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?n.extend(a,d):d}},e={};return d.pipe=d.then,n.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&n.isFunction(a.promise)?e:0,g=1===f?a:n.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&n.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var H;n.fn.ready=function(a){return n.ready.promise().done(a),this},n.extend({isReady:!1,readyWait:1,holdReady:function(a){a?n.readyWait++:n.ready(!0)},ready:function(a){(a===!0?--n.readyWait:n.isReady)||(n.isReady=!0,a!==!0&&--n.readyWait>0||(H.resolveWith(l,[n]),n.fn.triggerHandler&&(n(l).triggerHandler("ready"),n(l).off("ready"))))}});function I(){l.removeEventListener("DOMContentLoaded",I,!1),a.removeEventListener("load",I,!1),n.ready()}n.ready.promise=function(b){return H||(H=n.Deferred(),"complete"===l.readyState?setTimeout(n.ready):(l.addEventListener("DOMContentLoaded",I,!1),a.addEventListener("load",I,!1))),H.promise(b)},n.ready.promise();var J=n.access=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===n.type(c)){e=!0;for(h in c)n.access(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,n.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(n(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f};n.acceptData=function(a){return 1===a.nodeType||9===a.nodeType||!+a.nodeType};function K(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=n.expando+K.uid++}K.uid=1,K.accepts=n.acceptData,K.prototype={key:function(a){if(!K.accepts(a))return 0;var b={},c=a[this.expando];if(!c){c=K.uid++;try{b[this.expando]={value:c},Object.defineProperties(a,b)}catch(d){b[this.expando]=c,n.extend(a,b)}}return this.cache[c]||(this.cache[c]={}),c},set:function(a,b,c){var d,e=this.key(a),f=this.cache[e];if("string"==typeof b)f[b]=c;else if(n.isEmptyObject(f))n.extend(this.cache[e],b);else for(d in b)f[d]=b[d];return f},get:function(a,b){var c=this.cache[this.key(a)];return void 0===b?c:c[b]},access:function(a,b,c){var d;return void 0===b||b&&"string"==typeof b&&void 0===c?(d=this.get(a,b),void 0!==d?d:this.get(a,n.camelCase(b))):(this.set(a,b,c),void 0!==c?c:b)},remove:function(a,b){var c,d,e,f=this.key(a),g=this.cache[f];if(void 0===b)this.cache[f]={};else{n.isArray(b)?d=b.concat(b.map(n.camelCase)):(e=n.camelCase(b),b in g?d=[b,e]:(d=e,d=d in g?[d]:d.match(E)||[])),c=d.length;while(c--)delete g[d[c]]}},hasData:function(a){return!n.isEmptyObject(this.cache[a[this.expando]]||{})},discard:function(a){a[this.expando]&&delete this.cache[a[this.expando]]}};var L=new K,M=new K,N=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,O=/([A-Z])/g;function P(a,b,c){var d;if(void 0===c&&1===a.nodeType)if(d="data-"+b.replace(O,"-$1").toLowerCase(),c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:N.test(c)?n.parseJSON(c):c}catch(e){}M.set(a,b,c)}else c=void 0;return c}n.extend({hasData:function(a){return M.hasData(a)||L.hasData(a)},data:function(a,b,c){
+return M.access(a,b,c)},removeData:function(a,b){M.remove(a,b)},_data:function(a,b,c){return L.access(a,b,c)},_removeData:function(a,b){L.remove(a,b)}}),n.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=M.get(f),1===f.nodeType&&!L.get(f,"hasDataAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=n.camelCase(d.slice(5)),P(f,d,e[d])));L.set(f,"hasDataAttrs",!0)}return e}return"object"==typeof a?this.each(function(){M.set(this,a)}):J(this,function(b){var c,d=n.camelCase(a);if(f&&void 0===b){if(c=M.get(f,a),void 0!==c)return c;if(c=M.get(f,d),void 0!==c)return c;if(c=P(f,d,void 0),void 0!==c)return c}else this.each(function(){var c=M.get(this,d);M.set(this,d,b),-1!==a.indexOf("-")&&void 0!==c&&M.set(this,a,b)})},null,b,arguments.length>1,null,!0)},removeData:function(a){return this.each(function(){M.remove(this,a)})}}),n.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=L.get(a,b),c&&(!d||n.isArray(c)?d=L.access(a,b,n.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=n.queue(a,b),d=c.length,e=c.shift(),f=n._queueHooks(a,b),g=function(){n.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return L.get(a,c)||L.access(a,c,{empty:n.Callbacks("once memory").add(function(){L.remove(a,[b+"queue",c])})})}}),n.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?n.queue(this[0],a):void 0===b?this:this.each(function(){var c=n.queue(this,a,b);n._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&n.dequeue(this,a)})},dequeue:function(a){return this.each(function(){n.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=n.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};"string"!=typeof a&&(b=a,a=void 0),a=a||"fx";while(g--)c=L.get(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}});var Q=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,R=["Top","Right","Bottom","Left"],S=function(a,b){return a=b||a,"none"===n.css(a,"display")||!n.contains(a.ownerDocument,a)},T=/^(?:checkbox|radio)$/i;!function(){var a=l.createDocumentFragment(),b=a.appendChild(l.createElement("div")),c=l.createElement("input");c.setAttribute("type","radio"),c.setAttribute("checked","checked"),c.setAttribute("name","t"),b.appendChild(c),k.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,b.innerHTML="<textarea>x</textarea>",k.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue}();var U="undefined";k.focusinBubbles="onfocusin"in a;var V=/^key/,W=/^(?:mouse|pointer|contextmenu)|click/,X=/^(?:focusinfocus|focusoutblur)$/,Y=/^([^.]*)(?:\.(.+)|)$/;function Z(){return!0}function $(){return!1}function _(){try{return l.activeElement}catch(a){}}n.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=L.get(a);if(r){c.handler&&(f=c,c=f.handler,e=f.selector),c.guid||(c.guid=n.guid++),(i=r.events)||(i=r.events={}),(g=r.handle)||(g=r.handle=function(b){return typeof n!==U&&n.event.triggered!==b.type?n.event.dispatch.apply(a,arguments):void 0}),b=(b||"").match(E)||[""],j=b.length;while(j--)h=Y.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o&&(l=n.event.special[o]||{},o=(e?l.delegateType:l.bindType)||o,l=n.event.special[o]||{},k=n.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&n.expr.match.needsContext.test(e),namespace:p.join(".")},f),(m=i[o])||(m=i[o]=[],m.delegateCount=0,l.setup&&l.setup.call(a,d,p,g)!==!1||a.addEventListener&&a.addEventListener(o,g,!1)),l.add&&(l.add.call(a,k),k.handler.guid||(k.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,k):m.push(k),n.event.global[o]=!0)}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=L.hasData(a)&&L.get(a);if(r&&(i=r.events)){b=(b||"").match(E)||[""],j=b.length;while(j--)if(h=Y.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=n.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,m=i[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),g=f=m.length;while(f--)k=m[f],!e&&q!==k.origType||c&&c.guid!==k.guid||h&&!h.test(k.namespace)||d&&d!==k.selector&&("**"!==d||!k.selector)||(m.splice(f,1),k.selector&&m.delegateCount--,l.remove&&l.remove.call(a,k));g&&!m.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||n.removeEvent(a,o,r.handle),delete i[o])}else for(o in i)n.event.remove(a,o+b[j],c,d,!0);n.isEmptyObject(i)&&(delete r.handle,L.remove(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,m,o,p=[d||l],q=j.call(b,"type")?b.type:b,r=j.call(b,"namespace")?b.namespace.split("."):[];if(g=h=d=d||l,3!==d.nodeType&&8!==d.nodeType&&!X.test(q+n.event.triggered)&&(q.indexOf(".")>=0&&(r=q.split("."),q=r.shift(),r.sort()),k=q.indexOf(":")<0&&"on"+q,b=b[n.expando]?b:new n.Event(q,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=r.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+r.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:n.makeArray(c,[b]),o=n.event.special[q]||{},e||!o.trigger||o.trigger.apply(d,c)!==!1)){if(!e&&!o.noBubble&&!n.isWindow(d)){for(i=o.delegateType||q,X.test(i+q)||(g=g.parentNode);g;g=g.parentNode)p.push(g),h=g;h===(d.ownerDocument||l)&&p.push(h.defaultView||h.parentWindow||a)}f=0;while((g=p[f++])&&!b.isPropagationStopped())b.type=f>1?i:o.bindType||q,m=(L.get(g,"events")||{})[b.type]&&L.get(g,"handle"),m&&m.apply(g,c),m=k&&g[k],m&&m.apply&&n.acceptData(g)&&(b.result=m.apply(g,c),b.result===!1&&b.preventDefault());return b.type=q,e||b.isDefaultPrevented()||o._default&&o._default.apply(p.pop(),c)!==!1||!n.acceptData(d)||k&&n.isFunction(d[q])&&!n.isWindow(d)&&(h=d[k],h&&(d[k]=null),n.event.triggered=q,d[q](),n.event.triggered=void 0,h&&(d[k]=h)),b.result}},dispatch:function(a){a=n.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(L.get(this,"events")||{})[a.type]||[],k=n.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=n.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,c=0;while((g=f.handlers[c++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(g.namespace))&&(a.handleObj=g,a.data=g.data,e=((n.event.special[g.origType]||{}).handle||g.handler).apply(f.elem,i),void 0!==e&&(a.result=e)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!==this;i=i.parentNode||this)if(i.disabled!==!0||"click"!==a.type){for(d=[],c=0;h>c;c++)f=b[c],e=f.selector+" ",void 0===d[e]&&(d[e]=f.needsContext?n(e,this).index(i)>=0:n.find(e,this,null,[i]).length),d[e]&&d.push(f);d.length&&g.push({elem:i,handlers:d})}return h<b.length&&g.push({elem:this,handlers:b.slice(h)}),g},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){return null==a.which&&(a.which=null!=b.charCode?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,b){var c,d,e,f=b.button;return null==a.pageX&&null!=b.clientX&&(c=a.target.ownerDocument||l,d=c.documentElement,e=c.body,a.pageX=b.clientX+(d&&d.scrollLeft||e&&e.scrollLeft||0)-(d&&d.clientLeft||e&&e.clientLeft||0),a.pageY=b.clientY+(d&&d.scrollTop||e&&e.scrollTop||0)-(d&&d.clientTop||e&&e.clientTop||0)),a.which||void 0===f||(a.which=1&f?1:2&f?3:4&f?2:0),a}},fix:function(a){if(a[n.expando])return a;var b,c,d,e=a.type,f=a,g=this.fixHooks[e];g||(this.fixHooks[e]=g=W.test(e)?this.mouseHooks:V.test(e)?this.keyHooks:{}),d=g.props?this.props.concat(g.props):this.props,a=new n.Event(f),b=d.length;while(b--)c=d[b],a[c]=f[c];return a.target||(a.target=l),3===a.target.nodeType&&(a.target=a.target.parentNode),g.filter?g.filter(a,f):a},special:{load:{noBubble:!0},focus:{trigger:function(){return this!==_()&&this.focus?(this.focus(),!1):void 0},delegateType:"focusin"},blur:{trigger:function(){return this===_()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return"checkbox"===this.type&&this.click&&n.nodeName(this,"input")?(this.click(),!1):void 0},_default:function(a){return n.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&a.originalEvent&&(a.originalEvent.returnValue=a.result)}}},simulate:function(a,b,c,d){var e=n.extend(new n.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?n.event.trigger(e,null,b):n.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},n.removeEvent=function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)},n.Event=function(a,b){return this instanceof n.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&a.returnValue===!1?Z:$):this.type=a,b&&n.extend(this,b),this.timeStamp=a&&a.timeStamp||n.now(),void(this[n.expando]=!0)):new n.Event(a,b)},n.Event.prototype={isDefaultPrevented:$,isPropagationStopped:$,isImmediatePropagationStopped:$,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=Z,a&&a.preventDefault&&a.preventDefault()},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=Z,a&&a.stopPropagation&&a.stopPropagation()},stopImmediatePropagation:function(){var a=this.originalEvent;this.isImmediatePropagationStopped=Z,a&&a.stopImmediatePropagation&&a.stopImmediatePropagation(),this.stopPropagation()}},n.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(a,b){n.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return(!e||e!==d&&!n.contains(d,e))&&(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),k.focusinBubbles||n.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){n.event.simulate(b,a.target,n.event.fix(a),!0)};n.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=L.access(d,b);e||d.addEventListener(a,c,!0),L.access(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=L.access(d,b)-1;e?L.access(d,b,e):(d.removeEventListener(a,c,!0),L.remove(d,b))}}}),n.fn.extend({on:function(a,b,c,d,e){var f,g;if("object"==typeof a){"string"!=typeof b&&(c=c||b,b=void 0);for(g in a)this.on(g,b,c,a[g],e);return this}if(null==c&&null==d?(d=b,c=b=void 0):null==d&&("string"==typeof b?(d=c,c=void 0):(d=c,c=b,b=void 0)),d===!1)d=$;else if(!d)return this;return 1===e&&(f=d,d=function(a){return n().off(a),f.apply(this,arguments)},d.guid=f.guid||(f.guid=n.guid++)),this.each(function(){n.event.add(this,a,d,c,b)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,b,c){var d,e;if(a&&a.preventDefault&&a.handleObj)return d=a.handleObj,n(a.delegateTarget).off(d.namespace?d.origType+"."+d.namespace:d.origType,d.selector,d.handler),this;if("object"==typeof a){for(e in a)this.off(e,b,a[e]);return this}return(b===!1||"function"==typeof b)&&(c=b,b=void 0),c===!1&&(c=$),this.each(function(){n.event.remove(this,a,c,b)})},trigger:function(a,b){return this.each(function(){n.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];return c?n.event.trigger(a,b,c,!0):void 0}});var aa=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,ba=/<([\w:]+)/,ca=/<|&#?\w+;/,da=/<(?:script|style|link)/i,ea=/checked\s*(?:[^=]|=\s*.checked.)/i,fa=/^$|\/(?:java|ecma)script/i,ga=/^true\/(.*)/,ha=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,ia={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};ia.optgroup=ia.option,ia.tbody=ia.tfoot=ia.colgroup=ia.caption=ia.thead,ia.th=ia.td;function ja(a,b){return n.nodeName(a,"table")&&n.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function ka(a){return a.type=(null!==a.getAttribute("type"))+"/"+a.type,a}function la(a){var b=ga.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function ma(a,b){for(var c=0,d=a.length;d>c;c++)L.set(a[c],"globalEval",!b||L.get(b[c],"globalEval"))}function na(a,b){var c,d,e,f,g,h,i,j;if(1===b.nodeType){if(L.hasData(a)&&(f=L.access(a),g=L.set(b,f),j=f.events)){delete g.handle,g.events={};for(e in j)for(c=0,d=j[e].length;d>c;c++)n.event.add(b,e,j[e][c])}M.hasData(a)&&(h=M.access(a),i=n.extend({},h),M.set(b,i))}}function oa(a,b){var c=a.getElementsByTagName?a.getElementsByTagName(b||"*"):a.querySelectorAll?a.querySelectorAll(b||"*"):[];return void 0===b||b&&n.nodeName(a,b)?n.merge([a],c):c}function pa(a,b){var c=b.nodeName.toLowerCase();"input"===c&&T.test(a.type)?b.checked=a.checked:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}n.extend({clone:function(a,b,c){var d,e,f,g,h=a.cloneNode(!0),i=n.contains(a.ownerDocument,a);if(!(k.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||n.isXMLDoc(a)))for(g=oa(h),f=oa(a),d=0,e=f.length;e>d;d++)pa(f[d],g[d]);if(b)if(c)for(f=f||oa(a),g=g||oa(h),d=0,e=f.length;e>d;d++)na(f[d],g[d]);else na(a,h);return g=oa(h,"script"),g.length>0&&ma(g,!i&&oa(a,"script")),h},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,k=b.createDocumentFragment(),l=[],m=0,o=a.length;o>m;m++)if(e=a[m],e||0===e)if("object"===n.type(e))n.merge(l,e.nodeType?[e]:e);else if(ca.test(e)){f=f||k.appendChild(b.createElement("div")),g=(ba.exec(e)||["",""])[1].toLowerCase(),h=ia[g]||ia._default,f.innerHTML=h[1]+e.replace(aa,"<$1></$2>")+h[2],j=h[0];while(j--)f=f.lastChild;n.merge(l,f.childNodes),f=k.firstChild,f.textContent=""}else l.push(b.createTextNode(e));k.textContent="",m=0;while(e=l[m++])if((!d||-1===n.inArray(e,d))&&(i=n.contains(e.ownerDocument,e),f=oa(k.appendChild(e),"script"),i&&ma(f),c)){j=0;while(e=f[j++])fa.test(e.type||"")&&c.push(e)}return k},cleanData:function(a){for(var b,c,d,e,f=n.event.special,g=0;void 0!==(c=a[g]);g++){if(n.acceptData(c)&&(e=c[L.expando],e&&(b=L.cache[e]))){if(b.events)for(d in b.events)f[d]?n.event.remove(c,d):n.removeEvent(c,d,b.handle);L.cache[e]&&delete L.cache[e]}delete M.cache[c[M.expando]]}}}),n.fn.extend({text:function(a){return J(this,function(a){return void 0===a?n.text(this):this.empty().each(function(){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&(this.textContent=a)})},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=ja(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=ja(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?n.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||n.cleanData(oa(c)),c.parentNode&&(b&&n.contains(c.ownerDocument,c)&&ma(oa(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++)1===a.nodeType&&(n.cleanData(oa(a,!1)),a.textContent="");return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return n.clone(this,a,b)})},html:function(a){return J(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a&&1===b.nodeType)return b.innerHTML;if("string"==typeof a&&!da.test(a)&&!ia[(ba.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(aa,"<$1></$2>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(n.cleanData(oa(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,n.cleanData(oa(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,l=this.length,m=this,o=l-1,p=a[0],q=n.isFunction(p);if(q||l>1&&"string"==typeof p&&!k.checkClone&&ea.test(p))return this.each(function(c){var d=m.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(l&&(c=n.buildFragment(a,this[0].ownerDocument,!1,this),d=c.firstChild,1===c.childNodes.length&&(c=d),d)){for(f=n.map(oa(c,"script"),ka),g=f.length;l>j;j++)h=c,j!==o&&(h=n.clone(h,!0,!0),g&&n.merge(f,oa(h,"script"))),b.call(this[j],h,j);if(g)for(i=f[f.length-1].ownerDocument,n.map(f,la),j=0;g>j;j++)h=f[j],fa.test(h.type||"")&&!L.access(h,"globalEval")&&n.contains(i,h)&&(h.src?n._evalUrl&&n._evalUrl(h.src):n.globalEval(h.textContent.replace(ha,"")))}return this}}),n.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){n.fn[a]=function(a){for(var c,d=[],e=n(a),g=e.length-1,h=0;g>=h;h++)c=h===g?this:this.clone(!0),n(e[h])[b](c),f.apply(d,c.get());return this.pushStack(d)}});var qa,ra={};function sa(b,c){var d,e=n(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:n.css(e[0],"display");return e.detach(),f}function ta(a){var b=l,c=ra[a];return c||(c=sa(a,b),"none"!==c&&c||(qa=(qa||n("<iframe frameborder='0' width='0' height='0'/>")).appendTo(b.documentElement),b=qa[0].contentDocument,b.write(),b.close(),c=sa(a,b),qa.detach()),ra[a]=c),c}var ua=/^margin/,va=new RegExp("^("+Q+")(?!px)[a-z%]+$","i"),wa=function(b){return b.ownerDocument.defaultView.opener?b.ownerDocument.defaultView.getComputedStyle(b,null):a.getComputedStyle(b,null)};function xa(a,b,c){var d,e,f,g,h=a.style;return c=c||wa(a),c&&(g=c.getPropertyValue(b)||c[b]),c&&(""!==g||n.contains(a.ownerDocument,a)||(g=n.style(a,b)),va.test(g)&&ua.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f)),void 0!==g?g+"":g}function ya(a,b){return{get:function(){return a()?void delete this.get:(this.get=b).apply(this,arguments)}}}!function(){var b,c,d=l.documentElement,e=l.createElement("div"),f=l.createElement("div");if(f.style){f.style.backgroundClip="content-box",f.cloneNode(!0).style.backgroundClip="",k.clearCloneStyle="content-box"===f.style.backgroundClip,e.style.cssText="border:0;width:0;height:0;top:0;left:-9999px;margin-top:1px;position:absolute",e.appendChild(f);function g(){f.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;margin-top:1%;top:1%;border:1px;padding:1px;width:4px;position:absolute",f.innerHTML="",d.appendChild(e);var g=a.getComputedStyle(f,null);b="1%"!==g.top,c="4px"===g.width,d.removeChild(e)}a.getComputedStyle&&n.extend(k,{pixelPosition:function(){return g(),b},boxSizingReliable:function(){return null==c&&g(),c},reliableMarginRight:function(){var b,c=f.appendChild(l.createElement("div"));return c.style.cssText=f.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",c.style.marginRight=c.style.width="0",f.style.width="1px",d.appendChild(e),b=!parseFloat(a.getComputedStyle(c,null).marginRight),d.removeChild(e),f.removeChild(c),b}})}}(),n.swap=function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e};var za=/^(none|table(?!-c[ea]).+)/,Aa=new RegExp("^("+Q+")(.*)$","i"),Ba=new RegExp("^([+-])=("+Q+")","i"),Ca={position:"absolute",visibility:"hidden",display:"block"},Da={letterSpacing:"0",fontWeight:"400"},Ea=["Webkit","O","Moz","ms"];function Fa(a,b){if(b in a)return b;var c=b[0].toUpperCase()+b.slice(1),d=b,e=Ea.length;while(e--)if(b=Ea[e]+c,b in a)return b;return d}function Ga(a,b,c){var d=Aa.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function Ha(a,b,c,d,e){for(var f=c===(d?"border":"content")?4:"width"===b?1:0,g=0;4>f;f+=2)"margin"===c&&(g+=n.css(a,c+R[f],!0,e)),d?("content"===c&&(g-=n.css(a,"padding"+R[f],!0,e)),"margin"!==c&&(g-=n.css(a,"border"+R[f]+"Width",!0,e))):(g+=n.css(a,"padding"+R[f],!0,e),"padding"!==c&&(g+=n.css(a,"border"+R[f]+"Width",!0,e)));return g}function Ia(a,b,c){var d=!0,e="width"===b?a.offsetWidth:a.offsetHeight,f=wa(a),g="border-box"===n.css(a,"boxSizing",!1,f);if(0>=e||null==e){if(e=xa(a,b,f),(0>e||null==e)&&(e=a.style[b]),va.test(e))return e;d=g&&(k.boxSizingReliable()||e===a.style[b]),e=parseFloat(e)||0}return e+Ha(a,b,c||(g?"border":"content"),d,f)+"px"}function Ja(a,b){for(var c,d,e,f=[],g=0,h=a.length;h>g;g++)d=a[g],d.style&&(f[g]=L.get(d,"olddisplay"),c=d.style.display,b?(f[g]||"none"!==c||(d.style.display=""),""===d.style.display&&S(d)&&(f[g]=L.access(d,"olddisplay",ta(d.nodeName)))):(e=S(d),"none"===c&&e||L.set(d,"olddisplay",e?c:n.css(d,"display"))));for(g=0;h>g;g++)d=a[g],d.style&&(b&&"none"!==d.style.display&&""!==d.style.display||(d.style.display=b?f[g]||"":"none"));return a}n.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=xa(a,"opacity");return""===c?"1":c}}}},cssNumber:{columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":"cssFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=n.camelCase(b),i=a.style;return b=n.cssProps[h]||(n.cssProps[h]=Fa(i,h)),g=n.cssHooks[b]||n.cssHooks[h],void 0===c?g&&"get"in g&&void 0!==(e=g.get(a,!1,d))?e:i[b]:(f=typeof c,"string"===f&&(e=Ba.exec(c))&&(c=(e[1]+1)*e[2]+parseFloat(n.css(a,b)),f="number"),null!=c&&c===c&&("number"!==f||n.cssNumber[h]||(c+="px"),k.clearCloneStyle||""!==c||0!==b.indexOf("background")||(i[b]="inherit"),g&&"set"in g&&void 0===(c=g.set(a,c,d))||(i[b]=c)),void 0)}},css:function(a,b,c,d){var e,f,g,h=n.camelCase(b);return b=n.cssProps[h]||(n.cssProps[h]=Fa(a.style,h)),g=n.cssHooks[b]||n.cssHooks[h],g&&"get"in g&&(e=g.get(a,!0,c)),void 0===e&&(e=xa(a,b,d)),"normal"===e&&b in Da&&(e=Da[b]),""===c||c?(f=parseFloat(e),c===!0||n.isNumeric(f)?f||0:e):e}}),n.each(["height","width"],function(a,b){n.cssHooks[b]={get:function(a,c,d){return c?za.test(n.css(a,"display"))&&0===a.offsetWidth?n.swap(a,Ca,function(){return Ia(a,b,d)}):Ia(a,b,d):void 0},set:function(a,c,d){var e=d&&wa(a);return Ga(a,c,d?Ha(a,b,d,"border-box"===n.css(a,"boxSizing",!1,e),e):0)}}}),n.cssHooks.marginRight=ya(k.reliableMarginRight,function(a,b){return b?n.swap(a,{display:"inline-block"},xa,[a,"marginRight"]):void 0}),n.each({margin:"",padding:"",border:"Width"},function(a,b){n.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];4>d;d++)e[a+R[d]+b]=f[d]||f[d-2]||f[0];return e}},ua.test(a)||(n.cssHooks[a+b].set=Ga)}),n.fn.extend({css:function(a,b){return J(this,function(a,b,c){var d,e,f={},g=0;if(n.isArray(b)){for(d=wa(a),e=b.length;e>g;g++)f[b[g]]=n.css(a,b[g],!1,d);return f}return void 0!==c?n.style(a,b,c):n.css(a,b)},a,b,arguments.length>1)},show:function(){return Ja(this,!0)},hide:function(){return Ja(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){S(this)?n(this).show():n(this).hide()})}});function Ka(a,b,c,d,e){return new Ka.prototype.init(a,b,c,d,e)}n.Tween=Ka,Ka.prototype={constructor:Ka,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||"swing",this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(n.cssNumber[c]?"":"px")},cur:function(){var a=Ka.propHooks[this.prop];return a&&a.get?a.get(this):Ka.propHooks._default.get(this)},run:function(a){var b,c=Ka.propHooks[this.prop];return this.options.duration?this.pos=b=n.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):this.pos=b=a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):Ka.propHooks._default.set(this),this}},Ka.prototype.init.prototype=Ka.prototype,Ka.propHooks={_default:{get:function(a){var b;return null==a.elem[a.prop]||a.elem.style&&null!=a.elem.style[a.prop]?(b=n.css(a.elem,a.prop,""),b&&"auto"!==b?b:0):a.elem[a.prop]},set:function(a){n.fx.step[a.prop]?n.fx.step[a.prop](a):a.elem.style&&(null!=a.elem.style[n.cssProps[a.prop]]||n.cssHooks[a.prop])?n.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}},Ka.propHooks.scrollTop=Ka.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},n.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2}},n.fx=Ka.prototype.init,n.fx.step={};var La,Ma,Na=/^(?:toggle|show|hide)$/,Oa=new RegExp("^(?:([+-])=|)("+Q+")([a-z%]*)$","i"),Pa=/queueHooks$/,Qa=[Va],Ra={"*":[function(a,b){var c=this.createTween(a,b),d=c.cur(),e=Oa.exec(b),f=e&&e[3]||(n.cssNumber[a]?"":"px"),g=(n.cssNumber[a]||"px"!==f&&+d)&&Oa.exec(n.css(c.elem,a)),h=1,i=20;if(g&&g[3]!==f){f=f||g[3],e=e||[],g=+d||1;do h=h||".5",g/=h,n.style(c.elem,a,g+f);while(h!==(h=c.cur()/d)&&1!==h&&--i)}return e&&(g=c.start=+g||+d||0,c.unit=f,c.end=e[1]?g+(e[1]+1)*e[2]:+e[2]),c}]};function Sa(){return setTimeout(function(){La=void 0}),La=n.now()}function Ta(a,b){var c,d=0,e={height:a};for(b=b?1:0;4>d;d+=2-b)c=R[d],e["margin"+c]=e["padding"+c]=a;return b&&(e.opacity=e.width=a),e}function Ua(a,b,c){for(var d,e=(Ra[b]||[]).concat(Ra["*"]),f=0,g=e.length;g>f;f++)if(d=e[f].call(c,b,a))return d}function Va(a,b,c){var d,e,f,g,h,i,j,k,l=this,m={},o=a.style,p=a.nodeType&&S(a),q=L.get(a,"fxshow");c.queue||(h=n._queueHooks(a,"fx"),null==h.unqueued&&(h.unqueued=0,i=h.empty.fire,h.empty.fire=function(){h.unqueued||i()}),h.unqueued++,l.always(function(){l.always(function(){h.unqueued--,n.queue(a,"fx").length||h.empty.fire()})})),1===a.nodeType&&("height"in b||"width"in b)&&(c.overflow=[o.overflow,o.overflowX,o.overflowY],j=n.css(a,"display"),k="none"===j?L.get(a,"olddisplay")||ta(a.nodeName):j,"inline"===k&&"none"===n.css(a,"float")&&(o.display="inline-block")),c.overflow&&(o.overflow="hidden",l.always(function(){o.overflow=c.overflow[0],o.overflowX=c.overflow[1],o.overflowY=c.overflow[2]}));for(d in b)if(e=b[d],Na.exec(e)){if(delete b[d],f=f||"toggle"===e,e===(p?"hide":"show")){if("show"!==e||!q||void 0===q[d])continue;p=!0}m[d]=q&&q[d]||n.style(a,d)}else j=void 0;if(n.isEmptyObject(m))"inline"===("none"===j?ta(a.nodeName):j)&&(o.display=j);else{q?"hidden"in q&&(p=q.hidden):q=L.access(a,"fxshow",{}),f&&(q.hidden=!p),p?n(a).show():l.done(function(){n(a).hide()}),l.done(function(){var b;L.remove(a,"fxshow");for(b in m)n.style(a,b,m[b])});for(d in m)g=Ua(p?q[d]:0,d,l),d in q||(q[d]=g.start,p&&(g.end=g.start,g.start="width"===d||"height"===d?1:0))}}function Wa(a,b){var c,d,e,f,g;for(c in a)if(d=n.camelCase(c),e=b[d],f=a[c],n.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=n.cssHooks[d],g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}function Xa(a,b,c){var d,e,f=0,g=Qa.length,h=n.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=La||Sa(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;i>g;g++)j.tweens[g].run(f);return h.notifyWith(a,[j,f,c]),1>f&&i?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:n.extend({},b),opts:n.extend(!0,{specialEasing:{}},c),originalProperties:b,originalOptions:c,startTime:La||Sa(),duration:c.duration,tweens:[],createTween:function(b,c){var d=n.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e)return this;for(e=!0;d>c;c++)j.tweens[c].run(1);return b?h.resolveWith(a,[j,b]):h.rejectWith(a,[j,b]),this}}),k=j.props;for(Wa(k,j.opts.specialEasing);g>f;f++)if(d=Qa[f].call(j,a,k,j.opts))return d;return n.map(k,Ua,j),n.isFunction(j.opts.start)&&j.opts.start.call(a,j),n.fx.timer(n.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}n.Animation=n.extend(Xa,{tweener:function(a,b){n.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");for(var c,d=0,e=a.length;e>d;d++)c=a[d],Ra[c]=Ra[c]||[],Ra[c].unshift(b)},prefilter:function(a,b){b?Qa.unshift(a):Qa.push(a)}}),n.speed=function(a,b,c){var d=a&&"object"==typeof a?n.extend({},a):{complete:c||!c&&b||n.isFunction(a)&&a,duration:a,easing:c&&b||b&&!n.isFunction(b)&&b};return d.duration=n.fx.off?0:"number"==typeof d.duration?d.duration:d.duration in n.fx.speeds?n.fx.speeds[d.duration]:n.fx.speeds._default,(null==d.queue||d.queue===!0)&&(d.queue="fx"),d.old=d.complete,d.complete=function(){n.isFunction(d.old)&&d.old.call(this),d.queue&&n.dequeue(this,d.queue)},d},n.fn.extend({fadeTo:function(a,b,c,d){return this.filter(S).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=n.isEmptyObject(a),f=n.speed(b,c,d),g=function(){var b=Xa(this,n.extend({},a),f);(e||L.get(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop,b(c)};return"string"!=typeof a&&(c=b,b=a,a=void 0),b&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",f=n.timers,g=L.get(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&Pa.test(e)&&d(g[e]);for(e=f.length;e--;)f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1));(b||!c)&&n.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=L.get(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=n.timers,g=d?d.length:0;for(c.finish=!0,n.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;g>b;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),n.each(["toggle","show","hide"],function(a,b){var c=n.fn[b];n.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(Ta(b,!0),a,d,e)}}),n.each({slideDown:Ta("show"),slideUp:Ta("hide"),slideToggle:Ta("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){n.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),n.timers=[],n.fx.tick=function(){var a,b=0,c=n.timers;for(La=n.now();b<c.length;b++)a=c[b],a()||c[b]!==a||c.splice(b--,1);c.length||n.fx.stop(),La=void 0},n.fx.timer=function(a){n.timers.push(a),a()?n.fx.start():n.timers.pop()},n.fx.interval=13,n.fx.start=function(){Ma||(Ma=setInterval(n.fx.tick,n.fx.interval))},n.fx.stop=function(){clearInterval(Ma),Ma=null},n.fx.speeds={slow:600,fast:200,_default:400},n.fn.delay=function(a,b){return a=n.fx?n.fx.speeds[a]||a:a,b=b||"fx",this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},function(){var a=l.createElement("input"),b=l.createElement("select"),c=b.appendChild(l.createElement("option"));a.type="checkbox",k.checkOn=""!==a.value,k.optSelected=c.selected,b.disabled=!0,k.optDisabled=!c.disabled,a=l.createElement("input"),a.value="t",a.type="radio",k.radioValue="t"===a.value}();var Ya,Za,$a=n.expr.attrHandle;n.fn.extend({attr:function(a,b){return J(this,n.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){n.removeAttr(this,a)})}}),n.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(a&&3!==f&&8!==f&&2!==f)return typeof a.getAttribute===U?n.prop(a,b,c):(1===f&&n.isXMLDoc(a)||(b=b.toLowerCase(),d=n.attrHooks[b]||(n.expr.match.bool.test(b)?Za:Ya)),
+void 0===c?d&&"get"in d&&null!==(e=d.get(a,b))?e:(e=n.find.attr(a,b),null==e?void 0:e):null!==c?d&&"set"in d&&void 0!==(e=d.set(a,c,b))?e:(a.setAttribute(b,c+""),c):void n.removeAttr(a,b))},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(E);if(f&&1===a.nodeType)while(c=f[e++])d=n.propFix[c]||c,n.expr.match.bool.test(c)&&(a[d]=!1),a.removeAttribute(c)},attrHooks:{type:{set:function(a,b){if(!k.radioValue&&"radio"===b&&n.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}}}),Za={set:function(a,b,c){return b===!1?n.removeAttr(a,c):a.setAttribute(c,c),c}},n.each(n.expr.match.bool.source.match(/\w+/g),function(a,b){var c=$a[b]||n.find.attr;$a[b]=function(a,b,d){var e,f;return d||(f=$a[b],$a[b]=e,e=null!=c(a,b,d)?b.toLowerCase():null,$a[b]=f),e}});var _a=/^(?:input|select|textarea|button)$/i;n.fn.extend({prop:function(a,b){return J(this,n.prop,a,b,arguments.length>1)},removeProp:function(a){return this.each(function(){delete this[n.propFix[a]||a]})}}),n.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(a,b,c){var d,e,f,g=a.nodeType;if(a&&3!==g&&8!==g&&2!==g)return f=1!==g||!n.isXMLDoc(a),f&&(b=n.propFix[b]||b,e=n.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){return a.hasAttribute("tabindex")||_a.test(a.nodeName)||a.href?a.tabIndex:-1}}}}),k.optSelected||(n.propHooks.selected={get:function(a){var b=a.parentNode;return b&&b.parentNode&&b.parentNode.selectedIndex,null}}),n.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){n.propFix[this.toLowerCase()]=this});var ab=/[\t\r\n\f]/g;n.fn.extend({addClass:function(a){var b,c,d,e,f,g,h="string"==typeof a&&a,i=0,j=this.length;if(n.isFunction(a))return this.each(function(b){n(this).addClass(a.call(this,b,this.className))});if(h)for(b=(a||"").match(E)||[];j>i;i++)if(c=this[i],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(ab," "):" ")){f=0;while(e=b[f++])d.indexOf(" "+e+" ")<0&&(d+=e+" ");g=n.trim(d),c.className!==g&&(c.className=g)}return this},removeClass:function(a){var b,c,d,e,f,g,h=0===arguments.length||"string"==typeof a&&a,i=0,j=this.length;if(n.isFunction(a))return this.each(function(b){n(this).removeClass(a.call(this,b,this.className))});if(h)for(b=(a||"").match(E)||[];j>i;i++)if(c=this[i],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(ab," "):"")){f=0;while(e=b[f++])while(d.indexOf(" "+e+" ")>=0)d=d.replace(" "+e+" "," ");g=a?n.trim(d):"",c.className!==g&&(c.className=g)}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):this.each(n.isFunction(a)?function(c){n(this).toggleClass(a.call(this,c,this.className,b),b)}:function(){if("string"===c){var b,d=0,e=n(this),f=a.match(E)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else(c===U||"boolean"===c)&&(this.className&&L.set(this,"__className__",this.className),this.className=this.className||a===!1?"":L.get(this,"__className__")||"")})},hasClass:function(a){for(var b=" "+a+" ",c=0,d=this.length;d>c;c++)if(1===this[c].nodeType&&(" "+this[c].className+" ").replace(ab," ").indexOf(b)>=0)return!0;return!1}});var bb=/\r/g;n.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=n.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,n(this).val()):a,null==e?e="":"number"==typeof e?e+="":n.isArray(e)&&(e=n.map(e,function(a){return null==a?"":a+""})),b=n.valHooks[this.type]||n.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=n.valHooks[e.type]||n.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(bb,""):null==c?"":c)}}}),n.extend({valHooks:{option:{get:function(a){var b=n.find.attr(a,"value");return null!=b?b:n.trim(n.text(a))}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||0>e,g=f?null:[],h=f?e+1:d.length,i=0>e?h:f?e:0;h>i;i++)if(c=d[i],!(!c.selected&&i!==e||(k.optDisabled?c.disabled:null!==c.getAttribute("disabled"))||c.parentNode.disabled&&n.nodeName(c.parentNode,"optgroup"))){if(b=n(c).val(),f)return b;g.push(b)}return g},set:function(a,b){var c,d,e=a.options,f=n.makeArray(b),g=e.length;while(g--)d=e[g],(d.selected=n.inArray(d.value,f)>=0)&&(c=!0);return c||(a.selectedIndex=-1),f}}}}),n.each(["radio","checkbox"],function(){n.valHooks[this]={set:function(a,b){return n.isArray(b)?a.checked=n.inArray(n(a).val(),b)>=0:void 0}},k.checkOn||(n.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})}),n.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){n.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),n.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)}});var cb=n.now(),db=/\?/;n.parseJSON=function(a){return JSON.parse(a+"")},n.parseXML=function(a){var b,c;if(!a||"string"!=typeof a)return null;try{c=new DOMParser,b=c.parseFromString(a,"text/xml")}catch(d){b=void 0}return(!b||b.getElementsByTagName("parsererror").length)&&n.error("Invalid XML: "+a),b};var eb=/#.*$/,fb=/([?&])_=[^&]*/,gb=/^(.*?):[ \t]*([^\r\n]*)$/gm,hb=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,ib=/^(?:GET|HEAD)$/,jb=/^\/\//,kb=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,lb={},mb={},nb="*/".concat("*"),ob=a.location.href,pb=kb.exec(ob.toLowerCase())||[];function qb(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(E)||[];if(n.isFunction(c))while(d=f[e++])"+"===d[0]?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function rb(a,b,c,d){var e={},f=a===mb;function g(h){var i;return e[h]=!0,n.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function sb(a,b){var c,d,e=n.ajaxSettings.flatOptions||{};for(c in b)void 0!==b[c]&&((e[c]?a:d||(d={}))[c]=b[c]);return d&&n.extend(!0,a,d),a}function tb(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===d&&(d=a.mimeType||b.getResponseHeader("Content-Type"));if(d)for(e in h)if(h[e]&&h[e].test(d)){i.unshift(e);break}if(i[0]in c)f=i[0];else{for(e in c){if(!i[0]||a.converters[e+" "+i[0]]){f=e;break}g||(g=e)}f=f||g}return f?(f!==i[0]&&i.unshift(f),c[f]):void 0}function ub(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}n.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:ob,type:"GET",isLocal:hb.test(pb[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":nb,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":n.parseJSON,"text xml":n.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?sb(sb(a,n.ajaxSettings),b):sb(n.ajaxSettings,a)},ajaxPrefilter:qb(lb),ajaxTransport:qb(mb),ajax:function(a,b){"object"==typeof a&&(b=a,a=void 0),b=b||{};var c,d,e,f,g,h,i,j,k=n.ajaxSetup({},b),l=k.context||k,m=k.context&&(l.nodeType||l.jquery)?n(l):n.event,o=n.Deferred(),p=n.Callbacks("once memory"),q=k.statusCode||{},r={},s={},t=0,u="canceled",v={readyState:0,getResponseHeader:function(a){var b;if(2===t){if(!f){f={};while(b=gb.exec(e))f[b[1].toLowerCase()]=b[2]}b=f[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===t?e:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return t||(a=s[c]=s[c]||a,r[a]=b),this},overrideMimeType:function(a){return t||(k.mimeType=a),this},statusCode:function(a){var b;if(a)if(2>t)for(b in a)q[b]=[q[b],a[b]];else v.always(a[v.status]);return this},abort:function(a){var b=a||u;return c&&c.abort(b),x(0,b),this}};if(o.promise(v).complete=p.add,v.success=v.done,v.error=v.fail,k.url=((a||k.url||ob)+"").replace(eb,"").replace(jb,pb[1]+"//"),k.type=b.method||b.type||k.method||k.type,k.dataTypes=n.trim(k.dataType||"*").toLowerCase().match(E)||[""],null==k.crossDomain&&(h=kb.exec(k.url.toLowerCase()),k.crossDomain=!(!h||h[1]===pb[1]&&h[2]===pb[2]&&(h[3]||("http:"===h[1]?"80":"443"))===(pb[3]||("http:"===pb[1]?"80":"443")))),k.data&&k.processData&&"string"!=typeof k.data&&(k.data=n.param(k.data,k.traditional)),rb(lb,k,b,v),2===t)return v;i=n.event&&k.global,i&&0===n.active++&&n.event.trigger("ajaxStart"),k.type=k.type.toUpperCase(),k.hasContent=!ib.test(k.type),d=k.url,k.hasContent||(k.data&&(d=k.url+=(db.test(d)?"&":"?")+k.data,delete k.data),k.cache===!1&&(k.url=fb.test(d)?d.replace(fb,"$1_="+cb++):d+(db.test(d)?"&":"?")+"_="+cb++)),k.ifModified&&(n.lastModified[d]&&v.setRequestHeader("If-Modified-Since",n.lastModified[d]),n.etag[d]&&v.setRequestHeader("If-None-Match",n.etag[d])),(k.data&&k.hasContent&&k.contentType!==!1||b.contentType)&&v.setRequestHeader("Content-Type",k.contentType),v.setRequestHeader("Accept",k.dataTypes[0]&&k.accepts[k.dataTypes[0]]?k.accepts[k.dataTypes[0]]+("*"!==k.dataTypes[0]?", "+nb+"; q=0.01":""):k.accepts["*"]);for(j in k.headers)v.setRequestHeader(j,k.headers[j]);if(k.beforeSend&&(k.beforeSend.call(l,v,k)===!1||2===t))return v.abort();u="abort";for(j in{success:1,error:1,complete:1})v[j](k[j]);if(c=rb(mb,k,b,v)){v.readyState=1,i&&m.trigger("ajaxSend",[v,k]),k.async&&k.timeout>0&&(g=setTimeout(function(){v.abort("timeout")},k.timeout));try{t=1,c.send(r,x)}catch(w){if(!(2>t))throw w;x(-1,w)}}else x(-1,"No Transport");function x(a,b,f,h){var j,r,s,u,w,x=b;2!==t&&(t=2,g&&clearTimeout(g),c=void 0,e=h||"",v.readyState=a>0?4:0,j=a>=200&&300>a||304===a,f&&(u=tb(k,v,f)),u=ub(k,u,v,j),j?(k.ifModified&&(w=v.getResponseHeader("Last-Modified"),w&&(n.lastModified[d]=w),w=v.getResponseHeader("etag"),w&&(n.etag[d]=w)),204===a||"HEAD"===k.type?x="nocontent":304===a?x="notmodified":(x=u.state,r=u.data,s=u.error,j=!s)):(s=x,(a||!x)&&(x="error",0>a&&(a=0))),v.status=a,v.statusText=(b||x)+"",j?o.resolveWith(l,[r,x,v]):o.rejectWith(l,[v,x,s]),v.statusCode(q),q=void 0,i&&m.trigger(j?"ajaxSuccess":"ajaxError",[v,k,j?r:s]),p.fireWith(l,[v,x]),i&&(m.trigger("ajaxComplete",[v,k]),--n.active||n.event.trigger("ajaxStop")))}return v},getJSON:function(a,b,c){return n.get(a,b,c,"json")},getScript:function(a,b){return n.get(a,void 0,b,"script")}}),n.each(["get","post"],function(a,b){n[b]=function(a,c,d,e){return n.isFunction(c)&&(e=e||d,d=c,c=void 0),n.ajax({url:a,type:b,dataType:e,data:c,success:d})}}),n._evalUrl=function(a){return n.ajax({url:a,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},n.fn.extend({wrapAll:function(a){var b;return n.isFunction(a)?this.each(function(b){n(this).wrapAll(a.call(this,b))}):(this[0]&&(b=n(a,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstElementChild)a=a.firstElementChild;return a}).append(this)),this)},wrapInner:function(a){return this.each(n.isFunction(a)?function(b){n(this).wrapInner(a.call(this,b))}:function(){var b=n(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=n.isFunction(a);return this.each(function(c){n(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){n.nodeName(this,"body")||n(this).replaceWith(this.childNodes)}).end()}}),n.expr.filters.hidden=function(a){return a.offsetWidth<=0&&a.offsetHeight<=0},n.expr.filters.visible=function(a){return!n.expr.filters.hidden(a)};var vb=/%20/g,wb=/\[\]$/,xb=/\r?\n/g,yb=/^(?:submit|button|image|reset|file)$/i,zb=/^(?:input|select|textarea|keygen)/i;function Ab(a,b,c,d){var e;if(n.isArray(b))n.each(b,function(b,e){c||wb.test(a)?d(a,e):Ab(a+"["+("object"==typeof e?b:"")+"]",e,c,d)});else if(c||"object"!==n.type(b))d(a,b);else for(e in b)Ab(a+"["+e+"]",b[e],c,d)}n.param=function(a,b){var c,d=[],e=function(a,b){b=n.isFunction(b)?b():null==b?"":b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(void 0===b&&(b=n.ajaxSettings&&n.ajaxSettings.traditional),n.isArray(a)||a.jquery&&!n.isPlainObject(a))n.each(a,function(){e(this.name,this.value)});else for(c in a)Ab(c,a[c],b,e);return d.join("&").replace(vb,"+")},n.fn.extend({serialize:function(){return n.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=n.prop(this,"elements");return a?n.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!n(this).is(":disabled")&&zb.test(this.nodeName)&&!yb.test(a)&&(this.checked||!T.test(a))}).map(function(a,b){var c=n(this).val();return null==c?null:n.isArray(c)?n.map(c,function(a){return{name:b.name,value:a.replace(xb,"\r\n")}}):{name:b.name,value:c.replace(xb,"\r\n")}}).get()}}),n.ajaxSettings.xhr=function(){try{return new XMLHttpRequest}catch(a){}};var Bb=0,Cb={},Db={0:200,1223:204},Eb=n.ajaxSettings.xhr();a.attachEvent&&a.attachEvent("onunload",function(){for(var a in Cb)Cb[a]()}),k.cors=!!Eb&&"withCredentials"in Eb,k.ajax=Eb=!!Eb,n.ajaxTransport(function(a){var b;return k.cors||Eb&&!a.crossDomain?{send:function(c,d){var e,f=a.xhr(),g=++Bb;if(f.open(a.type,a.url,a.async,a.username,a.password),a.xhrFields)for(e in a.xhrFields)f[e]=a.xhrFields[e];a.mimeType&&f.overrideMimeType&&f.overrideMimeType(a.mimeType),a.crossDomain||c["X-Requested-With"]||(c["X-Requested-With"]="XMLHttpRequest");for(e in c)f.setRequestHeader(e,c[e]);b=function(a){return function(){b&&(delete Cb[g],b=f.onload=f.onerror=null,"abort"===a?f.abort():"error"===a?d(f.status,f.statusText):d(Db[f.status]||f.status,f.statusText,"string"==typeof f.responseText?{text:f.responseText}:void 0,f.getAllResponseHeaders()))}},f.onload=b(),f.onerror=b("error"),b=Cb[g]=b("abort");try{f.send(a.hasContent&&a.data||null)}catch(h){if(b)throw h}},abort:function(){b&&b()}}:void 0}),n.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(a){return n.globalEval(a),a}}}),n.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET")}),n.ajaxTransport("script",function(a){if(a.crossDomain){var b,c;return{send:function(d,e){b=n("<script>").prop({async:!0,charset:a.scriptCharset,src:a.url}).on("load error",c=function(a){b.remove(),c=null,a&&e("error"===a.type?404:200,a.type)}),l.head.appendChild(b[0])},abort:function(){c&&c()}}}});var Fb=[],Gb=/(=)\?(?=&|$)|\?\?/;n.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=Fb.pop()||n.expando+"_"+cb++;return this[a]=!0,a}}),n.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(Gb.test(b.url)?"url":"string"==typeof b.data&&!(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&Gb.test(b.data)&&"data");return h||"jsonp"===b.dataTypes[0]?(e=b.jsonpCallback=n.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h?b[h]=b[h].replace(Gb,"$1"+e):b.jsonp!==!1&&(b.url+=(db.test(b.url)?"&":"?")+b.jsonp+"="+e),b.converters["script json"]=function(){return g||n.error(e+" was not called"),g[0]},b.dataTypes[0]="json",f=a[e],a[e]=function(){g=arguments},d.always(function(){a[e]=f,b[e]&&(b.jsonpCallback=c.jsonpCallback,Fb.push(e)),g&&n.isFunction(f)&&f(g[0]),g=f=void 0}),"script"):void 0}),n.parseHTML=function(a,b,c){if(!a||"string"!=typeof a)return null;"boolean"==typeof b&&(c=b,b=!1),b=b||l;var d=v.exec(a),e=!c&&[];return d?[b.createElement(d[1])]:(d=n.buildFragment([a],b,e),e&&e.length&&n(e).remove(),n.merge([],d.childNodes))};var Hb=n.fn.load;n.fn.load=function(a,b,c){if("string"!=typeof a&&Hb)return Hb.apply(this,arguments);var d,e,f,g=this,h=a.indexOf(" ");return h>=0&&(d=n.trim(a.slice(h)),a=a.slice(0,h)),n.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(e="POST"),g.length>0&&n.ajax({url:a,type:e,dataType:"html",data:b}).done(function(a){f=arguments,g.html(d?n("<div>").append(n.parseHTML(a)).find(d):a)}).complete(c&&function(a,b){g.each(c,f||[a.responseText,b,a])}),this},n.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){n.fn[b]=function(a){return this.on(b,a)}}),n.expr.filters.animated=function(a){return n.grep(n.timers,function(b){return a===b.elem}).length};var Ib=a.document.documentElement;function Jb(a){return n.isWindow(a)?a:9===a.nodeType&&a.defaultView}n.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=n.css(a,"position"),l=n(a),m={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=n.css(a,"top"),i=n.css(a,"left"),j=("absolute"===k||"fixed"===k)&&(f+i).indexOf("auto")>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),n.isFunction(b)&&(b=b.call(a,c,h)),null!=b.top&&(m.top=b.top-h.top+g),null!=b.left&&(m.left=b.left-h.left+e),"using"in b?b.using.call(a,m):l.css(m)}},n.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){n.offset.setOffset(this,a,b)});var b,c,d=this[0],e={top:0,left:0},f=d&&d.ownerDocument;if(f)return b=f.documentElement,n.contains(b,d)?(typeof d.getBoundingClientRect!==U&&(e=d.getBoundingClientRect()),c=Jb(f),{top:e.top+c.pageYOffset-b.clientTop,left:e.left+c.pageXOffset-b.clientLeft}):e},position:function(){if(this[0]){var a,b,c=this[0],d={top:0,left:0};return"fixed"===n.css(c,"position")?b=c.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),n.nodeName(a[0],"html")||(d=a.offset()),d.top+=n.css(a[0],"borderTopWidth",!0),d.left+=n.css(a[0],"borderLeftWidth",!0)),{top:b.top-d.top-n.css(c,"marginTop",!0),left:b.left-d.left-n.css(c,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||Ib;while(a&&!n.nodeName(a,"html")&&"static"===n.css(a,"position"))a=a.offsetParent;return a||Ib})}}),n.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(b,c){var d="pageYOffset"===c;n.fn[b]=function(e){return J(this,function(b,e,f){var g=Jb(b);return void 0===f?g?g[c]:b[e]:void(g?g.scrollTo(d?a.pageXOffset:f,d?f:a.pageYOffset):b[e]=f)},b,e,arguments.length,null)}}),n.each(["top","left"],function(a,b){n.cssHooks[b]=ya(k.pixelPosition,function(a,c){return c?(c=xa(a,b),va.test(c)?n(a).position()[b]+"px":c):void 0})}),n.each({Height:"height",Width:"width"},function(a,b){n.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){n.fn[d]=function(d,e){var f=arguments.length&&(c||"boolean"!=typeof d),g=c||(d===!0||e===!0?"margin":"border");return J(this,function(b,c,d){var e;return n.isWindow(b)?b.document.documentElement["client"+a]:9===b.nodeType?(e=b.documentElement,Math.max(b.body["scroll"+a],e["scroll"+a],b.body["offset"+a],e["offset"+a],e["client"+a])):void 0===d?n.css(b,c,g):n.style(b,c,d,g)},b,f?d:void 0,f,null)}})}),n.fn.size=function(){return this.length},n.fn.andSelf=n.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return n});var Kb=a.jQuery,Lb=a.$;return n.noConflict=function(b){return a.$===n&&(a.$=Lb),b&&a.jQuery===n&&(a.jQuery=Kb),n},typeof b===U&&(a.jQuery=a.$=n),n});
+//# sourceMappingURL=jquery.min.map
\ No newline at end of file
diff --git a/views/ngXosViews/serviceGrid/src/vendor/jquery/dist/jquery.min.map b/views/ngXosViews/serviceGrid/src/vendor/jquery/dist/jquery.min.map
new file mode 100644
index 0000000..95fc122
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/jquery/dist/jquery.min.map
@@ -0,0 +1 @@
+{"version":3,"file":"jquery.min.js","sources":["jquery.js"],"names":["global","factory","module","exports","document","w","Error","window","this","noGlobal","arr","slice","concat","push","indexOf","class2type","toString","hasOwn","hasOwnProperty","support","version","jQuery","selector","context","fn","init","rtrim","rmsPrefix","rdashAlpha","fcamelCase","all","letter","toUpperCase","prototype","jquery","constructor","length","toArray","call","get","num","pushStack","elems","ret","merge","prevObject","each","callback","args","map","elem","i","apply","arguments","first","eq","last","len","j","end","sort","splice","extend","options","name","src","copy","copyIsArray","clone","target","deep","isFunction","isPlainObject","isArray","undefined","expando","Math","random","replace","isReady","error","msg","noop","obj","type","Array","isWindow","isNumeric","parseFloat","nodeType","isEmptyObject","globalEval","code","script","indirect","eval","trim","createElement","text","head","appendChild","parentNode","removeChild","camelCase","string","nodeName","toLowerCase","value","isArraylike","makeArray","results","Object","inArray","second","grep","invert","callbackInverse","matches","callbackExpect","arg","guid","proxy","tmp","now","Date","split","Sizzle","Expr","getText","isXML","tokenize","compile","select","outermostContext","sortInput","hasDuplicate","setDocument","docElem","documentIsHTML","rbuggyQSA","rbuggyMatches","contains","preferredDoc","dirruns","done","classCache","createCache","tokenCache","compilerCache","sortOrder","a","b","MAX_NEGATIVE","pop","push_native","list","booleans","whitespace","characterEncoding","identifier","attributes","pseudos","rwhitespace","RegExp","rcomma","rcombinators","rattributeQuotes","rpseudo","ridentifier","matchExpr","ID","CLASS","TAG","ATTR","PSEUDO","CHILD","bool","needsContext","rinputs","rheader","rnative","rquickExpr","rsibling","rescape","runescape","funescape","_","escaped","escapedWhitespace","high","String","fromCharCode","unloadHandler","childNodes","e","els","seed","match","m","groups","old","nid","newContext","newSelector","ownerDocument","exec","getElementById","id","getElementsByTagName","getElementsByClassName","qsa","test","getAttribute","setAttribute","toSelector","testContext","join","querySelectorAll","qsaError","removeAttribute","keys","cache","key","cacheLength","shift","markFunction","assert","div","addHandle","attrs","handler","attrHandle","siblingCheck","cur","diff","sourceIndex","nextSibling","createInputPseudo","createButtonPseudo","createPositionalPseudo","argument","matchIndexes","documentElement","node","hasCompare","parent","doc","defaultView","top","addEventListener","attachEvent","className","createComment","getById","getElementsByName","find","filter","attrId","getAttributeNode","tag","innerHTML","input","matchesSelector","webkitMatchesSelector","mozMatchesSelector","oMatchesSelector","msMatchesSelector","disconnectedMatch","compareDocumentPosition","adown","bup","compare","sortDetached","aup","ap","bp","unshift","expr","elements","attr","val","specified","uniqueSort","duplicates","detectDuplicates","sortStable","textContent","firstChild","nodeValue","selectors","createPseudo","relative",">","dir"," ","+","~","preFilter","excess","unquoted","nodeNameSelector","pattern","operator","check","result","what","simple","forward","ofType","xml","outerCache","nodeIndex","start","useCache","lastChild","pseudo","setFilters","idx","matched","not","matcher","unmatched","has","innerText","lang","elemLang","hash","location","root","focus","activeElement","hasFocus","href","tabIndex","enabled","disabled","checked","selected","selectedIndex","empty","header","button","even","odd","lt","gt","radio","checkbox","file","password","image","submit","reset","filters","parseOnly","tokens","soFar","preFilters","cached","addCombinator","combinator","base","checkNonElements","doneName","oldCache","newCache","elementMatcher","matchers","multipleContexts","contexts","condense","newUnmatched","mapped","setMatcher","postFilter","postFinder","postSelector","temp","preMap","postMap","preexisting","matcherIn","matcherOut","matcherFromTokens","checkContext","leadingRelative","implicitRelative","matchContext","matchAnyContext","matcherFromGroupMatchers","elementMatchers","setMatchers","bySet","byElement","superMatcher","outermost","matchedCount","setMatched","contextBackup","dirrunsUnique","token","compiled","div1","defaultValue","unique","isXMLDoc","rneedsContext","rsingleTag","risSimple","winnow","qualifier","self","is","rootjQuery","parseHTML","ready","rparentsprev","guaranteedUnique","children","contents","next","prev","until","truncate","sibling","n","targets","l","closest","pos","index","prevAll","add","addBack","parents","parentsUntil","nextAll","nextUntil","prevUntil","siblings","contentDocument","reverse","rnotwhite","optionsCache","createOptions","object","flag","Callbacks","memory","fired","firing","firingStart","firingLength","firingIndex","stack","once","fire","data","stopOnFalse","disable","remove","lock","locked","fireWith","Deferred","func","tuples","state","promise","always","deferred","fail","then","fns","newDefer","tuple","returned","resolve","reject","progress","notify","pipe","stateString","when","subordinate","resolveValues","remaining","updateFunc","values","progressValues","notifyWith","resolveWith","progressContexts","resolveContexts","readyList","readyWait","holdReady","hold","wait","triggerHandler","off","completed","removeEventListener","readyState","setTimeout","access","chainable","emptyGet","raw","bulk","acceptData","owner","Data","defineProperty","uid","accepts","descriptor","unlock","defineProperties","set","prop","stored","camel","hasData","discard","data_priv","data_user","rbrace","rmultiDash","dataAttr","parseJSON","removeData","_data","_removeData","camelKey","queue","dequeue","startLength","hooks","_queueHooks","stop","setter","clearQueue","count","defer","pnum","source","cssExpand","isHidden","el","css","rcheckableType","fragment","createDocumentFragment","checkClone","cloneNode","noCloneChecked","strundefined","focusinBubbles","rkeyEvent","rmouseEvent","rfocusMorph","rtypenamespace","returnTrue","returnFalse","safeActiveElement","err","event","types","handleObjIn","eventHandle","events","t","handleObj","special","handlers","namespaces","origType","elemData","handle","triggered","dispatch","delegateType","bindType","namespace","delegateCount","setup","mappedTypes","origCount","teardown","removeEvent","trigger","onlyHandlers","bubbleType","ontype","eventPath","Event","isTrigger","namespace_re","noBubble","parentWindow","isPropagationStopped","preventDefault","isDefaultPrevented","_default","fix","handlerQueue","delegateTarget","preDispatch","currentTarget","isImmediatePropagationStopped","stopPropagation","postDispatch","sel","props","fixHooks","keyHooks","original","which","charCode","keyCode","mouseHooks","eventDoc","body","pageX","clientX","scrollLeft","clientLeft","pageY","clientY","scrollTop","clientTop","originalEvent","fixHook","load","blur","click","beforeunload","returnValue","simulate","bubble","isSimulated","defaultPrevented","timeStamp","stopImmediatePropagation","mouseenter","mouseleave","pointerenter","pointerleave","orig","related","relatedTarget","attaches","on","one","origFn","rxhtmlTag","rtagName","rhtml","rnoInnerhtml","rchecked","rscriptType","rscriptTypeMasked","rcleanScript","wrapMap","option","thead","col","tr","td","optgroup","tbody","tfoot","colgroup","caption","th","manipulationTarget","content","disableScript","restoreScript","setGlobalEval","refElements","cloneCopyEvent","dest","pdataOld","pdataCur","udataOld","udataCur","getAll","fixInput","dataAndEvents","deepDataAndEvents","srcElements","destElements","inPage","buildFragment","scripts","selection","wrap","nodes","createTextNode","cleanData","append","domManip","prepend","insertBefore","before","after","keepData","html","replaceWith","replaceChild","detach","hasScripts","iNoClone","_evalUrl","appendTo","prependTo","insertAfter","replaceAll","insert","iframe","elemdisplay","actualDisplay","style","display","getDefaultComputedStyle","defaultDisplay","write","close","rmargin","rnumnonpx","getStyles","opener","getComputedStyle","curCSS","computed","width","minWidth","maxWidth","getPropertyValue","addGetHookIf","conditionFn","hookFn","pixelPositionVal","boxSizingReliableVal","container","backgroundClip","clearCloneStyle","cssText","computePixelPositionAndBoxSizingReliable","divStyle","pixelPosition","boxSizingReliable","reliableMarginRight","marginDiv","marginRight","swap","rdisplayswap","rnumsplit","rrelNum","cssShow","position","visibility","cssNormalTransform","letterSpacing","fontWeight","cssPrefixes","vendorPropName","capName","origName","setPositiveNumber","subtract","max","augmentWidthOrHeight","extra","isBorderBox","styles","getWidthOrHeight","valueIsBorderBox","offsetWidth","offsetHeight","showHide","show","hidden","cssHooks","opacity","cssNumber","columnCount","fillOpacity","flexGrow","flexShrink","lineHeight","order","orphans","widows","zIndex","zoom","cssProps","float","margin","padding","border","prefix","suffix","expand","expanded","parts","hide","toggle","Tween","easing","unit","propHooks","run","percent","eased","duration","step","tween","fx","linear","p","swing","cos","PI","fxNow","timerId","rfxtypes","rfxnum","rrun","animationPrefilters","defaultPrefilter","tweeners","*","createTween","scale","maxIterations","createFxNow","genFx","includeWidth","height","animation","collection","opts","oldfire","checkDisplay","anim","dataShow","unqueued","overflow","overflowX","overflowY","propFilter","specialEasing","Animation","properties","stopped","tick","currentTime","startTime","tweens","originalProperties","originalOptions","gotoEnd","rejectWith","timer","complete","tweener","prefilter","speed","opt","speeds","fadeTo","to","animate","optall","doAnimation","finish","stopQueue","timers","cssFn","slideDown","slideUp","slideToggle","fadeIn","fadeOut","fadeToggle","interval","setInterval","clearInterval","slow","fast","delay","time","timeout","clearTimeout","checkOn","optSelected","optDisabled","radioValue","nodeHook","boolHook","removeAttr","nType","attrHooks","propName","attrNames","propFix","getter","rfocusable","removeProp","for","class","notxml","hasAttribute","rclass","addClass","classes","clazz","finalValue","proceed","removeClass","toggleClass","stateVal","classNames","hasClass","rreturn","valHooks","optionSet","hover","fnOver","fnOut","bind","unbind","delegate","undelegate","nonce","rquery","JSON","parse","parseXML","DOMParser","parseFromString","rhash","rts","rheaders","rlocalProtocol","rnoContent","rprotocol","rurl","prefilters","transports","allTypes","ajaxLocation","ajaxLocParts","addToPrefiltersOrTransports","structure","dataTypeExpression","dataType","dataTypes","inspectPrefiltersOrTransports","jqXHR","inspected","seekingTransport","inspect","prefilterOrFactory","dataTypeOrTransport","ajaxExtend","flatOptions","ajaxSettings","ajaxHandleResponses","s","responses","ct","finalDataType","firstDataType","mimeType","getResponseHeader","converters","ajaxConvert","response","isSuccess","conv2","current","conv","responseFields","dataFilter","active","lastModified","etag","url","isLocal","processData","async","contentType","json","* text","text html","text json","text xml","ajaxSetup","settings","ajaxPrefilter","ajaxTransport","ajax","transport","cacheURL","responseHeadersString","responseHeaders","timeoutTimer","fireGlobals","callbackContext","globalEventContext","completeDeferred","statusCode","requestHeaders","requestHeadersNames","strAbort","getAllResponseHeaders","setRequestHeader","lname","overrideMimeType","status","abort","statusText","finalText","success","method","crossDomain","param","traditional","hasContent","ifModified","headers","beforeSend","send","nativeStatusText","modified","getJSON","getScript","throws","wrapAll","firstElementChild","wrapInner","unwrap","visible","r20","rbracket","rCRLF","rsubmitterTypes","rsubmittable","buildParams","v","encodeURIComponent","serialize","serializeArray","xhr","XMLHttpRequest","xhrId","xhrCallbacks","xhrSuccessStatus",1223,"xhrSupported","cors","open","username","xhrFields","onload","onerror","responseText","text script","charset","scriptCharset","evt","oldCallbacks","rjsonp","jsonp","jsonpCallback","originalSettings","callbackName","overwritten","responseContainer","jsonProp","keepScripts","parsed","_load","params","animated","getWindow","offset","setOffset","curPosition","curLeft","curCSSTop","curTop","curOffset","curCSSLeft","calculatePosition","curElem","left","using","win","box","getBoundingClientRect","pageYOffset","pageXOffset","offsetParent","parentOffset","scrollTo","Height","Width","defaultExtra","funcName","size","andSelf","define","amd","_jQuery","_$","$","noConflict"],"mappings":";CAcC,SAAUA,EAAQC,GAEK,gBAAXC,SAAiD,gBAAnBA,QAAOC,QAQhDD,OAAOC,QAAUH,EAAOI,SACvBH,EAASD,GAAQ,GACjB,SAAUK,GACT,IAAMA,EAAED,SACP,KAAM,IAAIE,OAAO,2CAElB,OAAOL,GAASI,IAGlBJ,EAASD,IAIS,mBAAXO,QAAyBA,OAASC,KAAM,SAAUD,EAAQE,GAQnE,GAAIC,MAEAC,EAAQD,EAAIC,MAEZC,EAASF,EAAIE,OAEbC,EAAOH,EAAIG,KAEXC,EAAUJ,EAAII,QAEdC,KAEAC,EAAWD,EAAWC,SAEtBC,EAASF,EAAWG,eAEpBC,KAMHf,EAAWG,EAAOH,SAElBgB,EAAU,QAGVC,EAAS,SAAUC,EAAUC,GAG5B,MAAO,IAAIF,GAAOG,GAAGC,KAAMH,EAAUC,IAKtCG,EAAQ,qCAGRC,EAAY,QACZC,EAAa,eAGbC,EAAa,SAAUC,EAAKC,GAC3B,MAAOA,GAAOC,cAGhBX,GAAOG,GAAKH,EAAOY,WAElBC,OAAQd,EAERe,YAAad,EAGbC,SAAU,GAGVc,OAAQ,EAERC,QAAS,WACR,MAAO1B,GAAM2B,KAAM9B,OAKpB+B,IAAK,SAAUC,GACd,MAAc,OAAPA,EAGE,EAANA,EAAUhC,KAAMg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AAKjO,GAAOiE,SAAUpC,GAIdA,EAAK9C,SAAS8O,gBAAiB,SAAWlL,GAI3B,IAAlBd,EAAKuC,UACT6J,EAAMpM,EAAKgM,gBAIJtK,KAAKyrB,IACXntB,EAAK6jB,KAAM,SAAW/iB,GAAQsL,EAAK,SAAWtL,GAC9Cd,EAAK6jB,KAAM,SAAW/iB,GAAQsL,EAAK,SAAWtL,GAC9CsL,EAAK,SAAWtL,KAIDU,SAAViC,EAENtF,EAAOihB,IAAKpf,EAAMkC,EAAMmrB,GAGxBlvB,EAAO+rB,MAAOlqB,EAAMkC,EAAMuB,EAAO4pB,IAChCnrB,EAAMsa,EAAYsS,EAASttB,OAAWgb,EAAW,WAOvDre,EAAOG,GAAGkkC,KAAO,WAChB,MAAOllC,MAAK4B,QAGbf,EAAOG,GAAGmkC,QAAUtkC,EAAOG,GAAGyZ,QAkBP,kBAAX2qB,SAAyBA,OAAOC,KAC3CD,OAAQ,YAAc,WACrB,MAAOvkC,IAOT,IAECykC,IAAUvlC,EAAOc,OAGjB0kC,GAAKxlC,EAAOylC,CAwBb,OAtBA3kC,GAAO4kC,WAAa,SAAU3hC,GAS7B,MARK/D,GAAOylC,IAAM3kC,IACjBd,EAAOylC,EAAID,IAGPzhC,GAAQ/D,EAAOc,SAAWA,IAC9Bd,EAAOc,OAASykC,IAGVzkC,SAMIZ,KAAaoiB,IACxBtiB,EAAOc,OAASd,EAAOylC,EAAI3kC,GAMrBA"}
\ No newline at end of file
diff --git a/applications/auto-scale/gui/src/vendor/jquery/src/ajax.js b/views/ngXosViews/serviceGrid/src/vendor/jquery/src/ajax.js
similarity index 100%
rename from applications/auto-scale/gui/src/vendor/jquery/src/ajax.js
rename to views/ngXosViews/serviceGrid/src/vendor/jquery/src/ajax.js
diff --git a/applications/auto-scale/gui/src/vendor/jquery/src/ajax/jsonp.js b/views/ngXosViews/serviceGrid/src/vendor/jquery/src/ajax/jsonp.js
similarity index 100%
rename from applications/auto-scale/gui/src/vendor/jquery/src/ajax/jsonp.js
rename to views/ngXosViews/serviceGrid/src/vendor/jquery/src/ajax/jsonp.js
diff --git a/applications/auto-scale/gui/src/vendor/jquery/src/ajax/load.js b/views/ngXosViews/serviceGrid/src/vendor/jquery/src/ajax/load.js
similarity index 100%
rename from applications/auto-scale/gui/src/vendor/jquery/src/ajax/load.js
rename to views/ngXosViews/serviceGrid/src/vendor/jquery/src/ajax/load.js
diff --git a/applications/auto-scale/gui/src/vendor/jquery/src/ajax/parseJSON.js b/views/ngXosViews/serviceGrid/src/vendor/jquery/src/ajax/parseJSON.js
similarity index 100%
rename from applications/auto-scale/gui/src/vendor/jquery/src/ajax/parseJSON.js
rename to views/ngXosViews/serviceGrid/src/vendor/jquery/src/ajax/parseJSON.js
diff --git a/applications/auto-scale/gui/src/vendor/jquery/src/ajax/parseXML.js b/views/ngXosViews/serviceGrid/src/vendor/jquery/src/ajax/parseXML.js
similarity index 100%
rename from applications/auto-scale/gui/src/vendor/jquery/src/ajax/parseXML.js
rename to views/ngXosViews/serviceGrid/src/vendor/jquery/src/ajax/parseXML.js
diff --git a/applications/auto-scale/gui/src/vendor/jquery/src/ajax/script.js b/views/ngXosViews/serviceGrid/src/vendor/jquery/src/ajax/script.js
similarity index 100%
rename from applications/auto-scale/gui/src/vendor/jquery/src/ajax/script.js
rename to views/ngXosViews/serviceGrid/src/vendor/jquery/src/ajax/script.js
diff --git a/applications/auto-scale/gui/src/vendor/jquery/src/ajax/var/nonce.js b/views/ngXosViews/serviceGrid/src/vendor/jquery/src/ajax/var/nonce.js
similarity index 100%
rename from applications/auto-scale/gui/src/vendor/jquery/src/ajax/var/nonce.js
rename to views/ngXosViews/serviceGrid/src/vendor/jquery/src/ajax/var/nonce.js
diff --git a/applications/auto-scale/gui/src/vendor/jquery/src/ajax/var/rquery.js b/views/ngXosViews/serviceGrid/src/vendor/jquery/src/ajax/var/rquery.js
similarity index 100%
rename from applications/auto-scale/gui/src/vendor/jquery/src/ajax/var/rquery.js
rename to views/ngXosViews/serviceGrid/src/vendor/jquery/src/ajax/var/rquery.js
diff --git a/applications/auto-scale/gui/src/vendor/jquery/src/ajax/xhr.js b/views/ngXosViews/serviceGrid/src/vendor/jquery/src/ajax/xhr.js
similarity index 100%
rename from applications/auto-scale/gui/src/vendor/jquery/src/ajax/xhr.js
rename to views/ngXosViews/serviceGrid/src/vendor/jquery/src/ajax/xhr.js
diff --git a/applications/auto-scale/gui/src/vendor/jquery/src/attributes.js b/views/ngXosViews/serviceGrid/src/vendor/jquery/src/attributes.js
similarity index 100%
rename from applications/auto-scale/gui/src/vendor/jquery/src/attributes.js
rename to views/ngXosViews/serviceGrid/src/vendor/jquery/src/attributes.js
diff --git a/applications/auto-scale/gui/src/vendor/jquery/src/attributes/attr.js b/views/ngXosViews/serviceGrid/src/vendor/jquery/src/attributes/attr.js
similarity index 100%
rename from applications/auto-scale/gui/src/vendor/jquery/src/attributes/attr.js
rename to views/ngXosViews/serviceGrid/src/vendor/jquery/src/attributes/attr.js
diff --git a/applications/auto-scale/gui/src/vendor/jquery/src/attributes/classes.js b/views/ngXosViews/serviceGrid/src/vendor/jquery/src/attributes/classes.js
similarity index 100%
rename from applications/auto-scale/gui/src/vendor/jquery/src/attributes/classes.js
rename to views/ngXosViews/serviceGrid/src/vendor/jquery/src/attributes/classes.js
diff --git a/applications/auto-scale/gui/src/vendor/jquery/src/attributes/prop.js b/views/ngXosViews/serviceGrid/src/vendor/jquery/src/attributes/prop.js
similarity index 100%
rename from applications/auto-scale/gui/src/vendor/jquery/src/attributes/prop.js
rename to views/ngXosViews/serviceGrid/src/vendor/jquery/src/attributes/prop.js
diff --git a/applications/auto-scale/gui/src/vendor/jquery/src/attributes/support.js b/views/ngXosViews/serviceGrid/src/vendor/jquery/src/attributes/support.js
similarity index 100%
rename from applications/auto-scale/gui/src/vendor/jquery/src/attributes/support.js
rename to views/ngXosViews/serviceGrid/src/vendor/jquery/src/attributes/support.js
diff --git a/applications/auto-scale/gui/src/vendor/jquery/src/attributes/val.js b/views/ngXosViews/serviceGrid/src/vendor/jquery/src/attributes/val.js
similarity index 100%
rename from applications/auto-scale/gui/src/vendor/jquery/src/attributes/val.js
rename to views/ngXosViews/serviceGrid/src/vendor/jquery/src/attributes/val.js
diff --git a/applications/auto-scale/gui/src/vendor/jquery/src/callbacks.js b/views/ngXosViews/serviceGrid/src/vendor/jquery/src/callbacks.js
similarity index 100%
rename from applications/auto-scale/gui/src/vendor/jquery/src/callbacks.js
rename to views/ngXosViews/serviceGrid/src/vendor/jquery/src/callbacks.js
diff --git a/applications/auto-scale/gui/src/vendor/jquery/src/core.js b/views/ngXosViews/serviceGrid/src/vendor/jquery/src/core.js
similarity index 100%
rename from applications/auto-scale/gui/src/vendor/jquery/src/core.js
rename to views/ngXosViews/serviceGrid/src/vendor/jquery/src/core.js
diff --git a/applications/auto-scale/gui/src/vendor/jquery/src/core/access.js b/views/ngXosViews/serviceGrid/src/vendor/jquery/src/core/access.js
similarity index 100%
rename from applications/auto-scale/gui/src/vendor/jquery/src/core/access.js
rename to views/ngXosViews/serviceGrid/src/vendor/jquery/src/core/access.js
diff --git a/applications/auto-scale/gui/src/vendor/jquery/src/core/init.js b/views/ngXosViews/serviceGrid/src/vendor/jquery/src/core/init.js
similarity index 100%
rename from applications/auto-scale/gui/src/vendor/jquery/src/core/init.js
rename to views/ngXosViews/serviceGrid/src/vendor/jquery/src/core/init.js
diff --git a/applications/auto-scale/gui/src/vendor/jquery/src/core/parseHTML.js b/views/ngXosViews/serviceGrid/src/vendor/jquery/src/core/parseHTML.js
similarity index 100%
rename from applications/auto-scale/gui/src/vendor/jquery/src/core/parseHTML.js
rename to views/ngXosViews/serviceGrid/src/vendor/jquery/src/core/parseHTML.js
diff --git a/applications/auto-scale/gui/src/vendor/jquery/src/core/ready.js b/views/ngXosViews/serviceGrid/src/vendor/jquery/src/core/ready.js
similarity index 100%
rename from applications/auto-scale/gui/src/vendor/jquery/src/core/ready.js
rename to views/ngXosViews/serviceGrid/src/vendor/jquery/src/core/ready.js
diff --git a/applications/auto-scale/gui/src/vendor/jquery/src/core/var/rsingleTag.js b/views/ngXosViews/serviceGrid/src/vendor/jquery/src/core/var/rsingleTag.js
similarity index 100%
rename from applications/auto-scale/gui/src/vendor/jquery/src/core/var/rsingleTag.js
rename to views/ngXosViews/serviceGrid/src/vendor/jquery/src/core/var/rsingleTag.js
diff --git a/applications/auto-scale/gui/src/vendor/jquery/src/css.js b/views/ngXosViews/serviceGrid/src/vendor/jquery/src/css.js
similarity index 100%
rename from applications/auto-scale/gui/src/vendor/jquery/src/css.js
rename to views/ngXosViews/serviceGrid/src/vendor/jquery/src/css.js
diff --git a/applications/auto-scale/gui/src/vendor/jquery/src/css/addGetHookIf.js b/views/ngXosViews/serviceGrid/src/vendor/jquery/src/css/addGetHookIf.js
similarity index 100%
rename from applications/auto-scale/gui/src/vendor/jquery/src/css/addGetHookIf.js
rename to views/ngXosViews/serviceGrid/src/vendor/jquery/src/css/addGetHookIf.js
diff --git a/applications/auto-scale/gui/src/vendor/jquery/src/css/curCSS.js b/views/ngXosViews/serviceGrid/src/vendor/jquery/src/css/curCSS.js
similarity index 100%
rename from applications/auto-scale/gui/src/vendor/jquery/src/css/curCSS.js
rename to views/ngXosViews/serviceGrid/src/vendor/jquery/src/css/curCSS.js
diff --git a/applications/auto-scale/gui/src/vendor/jquery/src/css/defaultDisplay.js b/views/ngXosViews/serviceGrid/src/vendor/jquery/src/css/defaultDisplay.js
similarity index 100%
rename from applications/auto-scale/gui/src/vendor/jquery/src/css/defaultDisplay.js
rename to views/ngXosViews/serviceGrid/src/vendor/jquery/src/css/defaultDisplay.js
diff --git a/applications/auto-scale/gui/src/vendor/jquery/src/css/hiddenVisibleSelectors.js b/views/ngXosViews/serviceGrid/src/vendor/jquery/src/css/hiddenVisibleSelectors.js
similarity index 100%
rename from applications/auto-scale/gui/src/vendor/jquery/src/css/hiddenVisibleSelectors.js
rename to views/ngXosViews/serviceGrid/src/vendor/jquery/src/css/hiddenVisibleSelectors.js
diff --git a/applications/auto-scale/gui/src/vendor/jquery/src/css/support.js b/views/ngXosViews/serviceGrid/src/vendor/jquery/src/css/support.js
similarity index 100%
rename from applications/auto-scale/gui/src/vendor/jquery/src/css/support.js
rename to views/ngXosViews/serviceGrid/src/vendor/jquery/src/css/support.js
diff --git a/applications/auto-scale/gui/src/vendor/jquery/src/css/swap.js b/views/ngXosViews/serviceGrid/src/vendor/jquery/src/css/swap.js
similarity index 100%
rename from applications/auto-scale/gui/src/vendor/jquery/src/css/swap.js
rename to views/ngXosViews/serviceGrid/src/vendor/jquery/src/css/swap.js
diff --git a/applications/auto-scale/gui/src/vendor/jquery/src/css/var/cssExpand.js b/views/ngXosViews/serviceGrid/src/vendor/jquery/src/css/var/cssExpand.js
similarity index 100%
rename from applications/auto-scale/gui/src/vendor/jquery/src/css/var/cssExpand.js
rename to views/ngXosViews/serviceGrid/src/vendor/jquery/src/css/var/cssExpand.js
diff --git a/applications/auto-scale/gui/src/vendor/jquery/src/css/var/getStyles.js b/views/ngXosViews/serviceGrid/src/vendor/jquery/src/css/var/getStyles.js
similarity index 100%
rename from applications/auto-scale/gui/src/vendor/jquery/src/css/var/getStyles.js
rename to views/ngXosViews/serviceGrid/src/vendor/jquery/src/css/var/getStyles.js
diff --git a/applications/auto-scale/gui/src/vendor/jquery/src/css/var/isHidden.js b/views/ngXosViews/serviceGrid/src/vendor/jquery/src/css/var/isHidden.js
similarity index 100%
rename from applications/auto-scale/gui/src/vendor/jquery/src/css/var/isHidden.js
rename to views/ngXosViews/serviceGrid/src/vendor/jquery/src/css/var/isHidden.js
diff --git a/applications/auto-scale/gui/src/vendor/jquery/src/css/var/rmargin.js b/views/ngXosViews/serviceGrid/src/vendor/jquery/src/css/var/rmargin.js
similarity index 100%
rename from applications/auto-scale/gui/src/vendor/jquery/src/css/var/rmargin.js
rename to views/ngXosViews/serviceGrid/src/vendor/jquery/src/css/var/rmargin.js
diff --git a/applications/auto-scale/gui/src/vendor/jquery/src/css/var/rnumnonpx.js b/views/ngXosViews/serviceGrid/src/vendor/jquery/src/css/var/rnumnonpx.js
similarity index 100%
rename from applications/auto-scale/gui/src/vendor/jquery/src/css/var/rnumnonpx.js
rename to views/ngXosViews/serviceGrid/src/vendor/jquery/src/css/var/rnumnonpx.js
diff --git a/applications/auto-scale/gui/src/vendor/jquery/src/data.js b/views/ngXosViews/serviceGrid/src/vendor/jquery/src/data.js
similarity index 100%
rename from applications/auto-scale/gui/src/vendor/jquery/src/data.js
rename to views/ngXosViews/serviceGrid/src/vendor/jquery/src/data.js
diff --git a/applications/auto-scale/gui/src/vendor/jquery/src/data/Data.js b/views/ngXosViews/serviceGrid/src/vendor/jquery/src/data/Data.js
similarity index 100%
rename from applications/auto-scale/gui/src/vendor/jquery/src/data/Data.js
rename to views/ngXosViews/serviceGrid/src/vendor/jquery/src/data/Data.js
diff --git a/applications/auto-scale/gui/src/vendor/jquery/src/data/accepts.js b/views/ngXosViews/serviceGrid/src/vendor/jquery/src/data/accepts.js
similarity index 100%
rename from applications/auto-scale/gui/src/vendor/jquery/src/data/accepts.js
rename to views/ngXosViews/serviceGrid/src/vendor/jquery/src/data/accepts.js
diff --git a/applications/auto-scale/gui/src/vendor/jquery/src/data/var/data_priv.js b/views/ngXosViews/serviceGrid/src/vendor/jquery/src/data/var/data_priv.js
similarity index 100%
rename from applications/auto-scale/gui/src/vendor/jquery/src/data/var/data_priv.js
rename to views/ngXosViews/serviceGrid/src/vendor/jquery/src/data/var/data_priv.js
diff --git a/applications/auto-scale/gui/src/vendor/jquery/src/data/var/data_user.js b/views/ngXosViews/serviceGrid/src/vendor/jquery/src/data/var/data_user.js
similarity index 100%
rename from applications/auto-scale/gui/src/vendor/jquery/src/data/var/data_user.js
rename to views/ngXosViews/serviceGrid/src/vendor/jquery/src/data/var/data_user.js
diff --git a/applications/auto-scale/gui/src/vendor/jquery/src/deferred.js b/views/ngXosViews/serviceGrid/src/vendor/jquery/src/deferred.js
similarity index 100%
rename from applications/auto-scale/gui/src/vendor/jquery/src/deferred.js
rename to views/ngXosViews/serviceGrid/src/vendor/jquery/src/deferred.js
diff --git a/applications/auto-scale/gui/src/vendor/jquery/src/deprecated.js b/views/ngXosViews/serviceGrid/src/vendor/jquery/src/deprecated.js
similarity index 100%
rename from applications/auto-scale/gui/src/vendor/jquery/src/deprecated.js
rename to views/ngXosViews/serviceGrid/src/vendor/jquery/src/deprecated.js
diff --git a/applications/auto-scale/gui/src/vendor/jquery/src/dimensions.js b/views/ngXosViews/serviceGrid/src/vendor/jquery/src/dimensions.js
similarity index 100%
rename from applications/auto-scale/gui/src/vendor/jquery/src/dimensions.js
rename to views/ngXosViews/serviceGrid/src/vendor/jquery/src/dimensions.js
diff --git a/applications/auto-scale/gui/src/vendor/jquery/src/effects.js b/views/ngXosViews/serviceGrid/src/vendor/jquery/src/effects.js
similarity index 100%
rename from applications/auto-scale/gui/src/vendor/jquery/src/effects.js
rename to views/ngXosViews/serviceGrid/src/vendor/jquery/src/effects.js
diff --git a/applications/auto-scale/gui/src/vendor/jquery/src/effects/Tween.js b/views/ngXosViews/serviceGrid/src/vendor/jquery/src/effects/Tween.js
similarity index 100%
rename from applications/auto-scale/gui/src/vendor/jquery/src/effects/Tween.js
rename to views/ngXosViews/serviceGrid/src/vendor/jquery/src/effects/Tween.js
diff --git a/applications/auto-scale/gui/src/vendor/jquery/src/effects/animatedSelector.js b/views/ngXosViews/serviceGrid/src/vendor/jquery/src/effects/animatedSelector.js
similarity index 100%
rename from applications/auto-scale/gui/src/vendor/jquery/src/effects/animatedSelector.js
rename to views/ngXosViews/serviceGrid/src/vendor/jquery/src/effects/animatedSelector.js
diff --git a/applications/auto-scale/gui/src/vendor/jquery/src/event.js b/views/ngXosViews/serviceGrid/src/vendor/jquery/src/event.js
similarity index 100%
rename from applications/auto-scale/gui/src/vendor/jquery/src/event.js
rename to views/ngXosViews/serviceGrid/src/vendor/jquery/src/event.js
diff --git a/applications/auto-scale/gui/src/vendor/jquery/src/event/ajax.js b/views/ngXosViews/serviceGrid/src/vendor/jquery/src/event/ajax.js
similarity index 100%
rename from applications/auto-scale/gui/src/vendor/jquery/src/event/ajax.js
rename to views/ngXosViews/serviceGrid/src/vendor/jquery/src/event/ajax.js
diff --git a/applications/auto-scale/gui/src/vendor/jquery/src/event/alias.js b/views/ngXosViews/serviceGrid/src/vendor/jquery/src/event/alias.js
similarity index 100%
rename from applications/auto-scale/gui/src/vendor/jquery/src/event/alias.js
rename to views/ngXosViews/serviceGrid/src/vendor/jquery/src/event/alias.js
diff --git a/applications/auto-scale/gui/src/vendor/jquery/src/event/support.js b/views/ngXosViews/serviceGrid/src/vendor/jquery/src/event/support.js
similarity index 100%
rename from applications/auto-scale/gui/src/vendor/jquery/src/event/support.js
rename to views/ngXosViews/serviceGrid/src/vendor/jquery/src/event/support.js
diff --git a/applications/auto-scale/gui/src/vendor/jquery/src/exports/amd.js b/views/ngXosViews/serviceGrid/src/vendor/jquery/src/exports/amd.js
similarity index 100%
rename from applications/auto-scale/gui/src/vendor/jquery/src/exports/amd.js
rename to views/ngXosViews/serviceGrid/src/vendor/jquery/src/exports/amd.js
diff --git a/applications/auto-scale/gui/src/vendor/jquery/src/exports/global.js b/views/ngXosViews/serviceGrid/src/vendor/jquery/src/exports/global.js
similarity index 100%
rename from applications/auto-scale/gui/src/vendor/jquery/src/exports/global.js
rename to views/ngXosViews/serviceGrid/src/vendor/jquery/src/exports/global.js
diff --git a/applications/auto-scale/gui/src/vendor/jquery/src/intro.js b/views/ngXosViews/serviceGrid/src/vendor/jquery/src/intro.js
similarity index 100%
rename from applications/auto-scale/gui/src/vendor/jquery/src/intro.js
rename to views/ngXosViews/serviceGrid/src/vendor/jquery/src/intro.js
diff --git a/applications/auto-scale/gui/src/vendor/jquery/src/jquery.js b/views/ngXosViews/serviceGrid/src/vendor/jquery/src/jquery.js
similarity index 100%
rename from applications/auto-scale/gui/src/vendor/jquery/src/jquery.js
rename to views/ngXosViews/serviceGrid/src/vendor/jquery/src/jquery.js
diff --git a/applications/auto-scale/gui/src/vendor/jquery/src/manipulation.js b/views/ngXosViews/serviceGrid/src/vendor/jquery/src/manipulation.js
similarity index 100%
rename from applications/auto-scale/gui/src/vendor/jquery/src/manipulation.js
rename to views/ngXosViews/serviceGrid/src/vendor/jquery/src/manipulation.js
diff --git a/applications/auto-scale/gui/src/vendor/jquery/src/manipulation/_evalUrl.js b/views/ngXosViews/serviceGrid/src/vendor/jquery/src/manipulation/_evalUrl.js
similarity index 100%
rename from applications/auto-scale/gui/src/vendor/jquery/src/manipulation/_evalUrl.js
rename to views/ngXosViews/serviceGrid/src/vendor/jquery/src/manipulation/_evalUrl.js
diff --git a/applications/auto-scale/gui/src/vendor/jquery/src/manipulation/support.js b/views/ngXosViews/serviceGrid/src/vendor/jquery/src/manipulation/support.js
similarity index 100%
rename from applications/auto-scale/gui/src/vendor/jquery/src/manipulation/support.js
rename to views/ngXosViews/serviceGrid/src/vendor/jquery/src/manipulation/support.js
diff --git a/applications/auto-scale/gui/src/vendor/jquery/src/manipulation/var/rcheckableType.js b/views/ngXosViews/serviceGrid/src/vendor/jquery/src/manipulation/var/rcheckableType.js
similarity index 100%
rename from applications/auto-scale/gui/src/vendor/jquery/src/manipulation/var/rcheckableType.js
rename to views/ngXosViews/serviceGrid/src/vendor/jquery/src/manipulation/var/rcheckableType.js
diff --git a/applications/auto-scale/gui/src/vendor/jquery/src/offset.js b/views/ngXosViews/serviceGrid/src/vendor/jquery/src/offset.js
similarity index 100%
rename from applications/auto-scale/gui/src/vendor/jquery/src/offset.js
rename to views/ngXosViews/serviceGrid/src/vendor/jquery/src/offset.js
diff --git a/applications/auto-scale/gui/src/vendor/jquery/src/outro.js b/views/ngXosViews/serviceGrid/src/vendor/jquery/src/outro.js
similarity index 100%
rename from applications/auto-scale/gui/src/vendor/jquery/src/outro.js
rename to views/ngXosViews/serviceGrid/src/vendor/jquery/src/outro.js
diff --git a/applications/auto-scale/gui/src/vendor/jquery/src/queue.js b/views/ngXosViews/serviceGrid/src/vendor/jquery/src/queue.js
similarity index 100%
rename from applications/auto-scale/gui/src/vendor/jquery/src/queue.js
rename to views/ngXosViews/serviceGrid/src/vendor/jquery/src/queue.js
diff --git a/applications/auto-scale/gui/src/vendor/jquery/src/queue/delay.js b/views/ngXosViews/serviceGrid/src/vendor/jquery/src/queue/delay.js
similarity index 100%
rename from applications/auto-scale/gui/src/vendor/jquery/src/queue/delay.js
rename to views/ngXosViews/serviceGrid/src/vendor/jquery/src/queue/delay.js
diff --git a/applications/auto-scale/gui/src/vendor/jquery/src/selector-native.js b/views/ngXosViews/serviceGrid/src/vendor/jquery/src/selector-native.js
similarity index 100%
rename from applications/auto-scale/gui/src/vendor/jquery/src/selector-native.js
rename to views/ngXosViews/serviceGrid/src/vendor/jquery/src/selector-native.js
diff --git a/applications/auto-scale/gui/src/vendor/jquery/src/selector-sizzle.js b/views/ngXosViews/serviceGrid/src/vendor/jquery/src/selector-sizzle.js
similarity index 100%
rename from applications/auto-scale/gui/src/vendor/jquery/src/selector-sizzle.js
rename to views/ngXosViews/serviceGrid/src/vendor/jquery/src/selector-sizzle.js
diff --git a/applications/auto-scale/gui/src/vendor/jquery/src/selector.js b/views/ngXosViews/serviceGrid/src/vendor/jquery/src/selector.js
similarity index 100%
rename from applications/auto-scale/gui/src/vendor/jquery/src/selector.js
rename to views/ngXosViews/serviceGrid/src/vendor/jquery/src/selector.js
diff --git a/applications/auto-scale/gui/src/vendor/jquery/src/serialize.js b/views/ngXosViews/serviceGrid/src/vendor/jquery/src/serialize.js
similarity index 100%
rename from applications/auto-scale/gui/src/vendor/jquery/src/serialize.js
rename to views/ngXosViews/serviceGrid/src/vendor/jquery/src/serialize.js
diff --git a/views/ngXosViews/serviceGrid/src/vendor/jquery/src/sizzle/dist/sizzle.js b/views/ngXosViews/serviceGrid/src/vendor/jquery/src/sizzle/dist/sizzle.js
new file mode 100644
index 0000000..89aecbc
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/jquery/src/sizzle/dist/sizzle.js
@@ -0,0 +1,2067 @@
+/*!
+ * Sizzle CSS Selector Engine v2.2.0-pre
+ * http://sizzlejs.com/
+ *
+ * Copyright 2008, 2014 jQuery Foundation, Inc. and other contributors
+ * Released under the MIT license
+ * http://jquery.org/license
+ *
+ * Date: 2014-12-16
+ */
+(function( window ) {
+
+var i,
+ support,
+ Expr,
+ getText,
+ isXML,
+ tokenize,
+ compile,
+ select,
+ outermostContext,
+ sortInput,
+ hasDuplicate,
+
+ // Local document vars
+ setDocument,
+ document,
+ docElem,
+ documentIsHTML,
+ rbuggyQSA,
+ rbuggyMatches,
+ matches,
+ contains,
+
+ // Instance-specific data
+ expando = "sizzle" + 1 * new Date(),
+ preferredDoc = window.document,
+ dirruns = 0,
+ done = 0,
+ classCache = createCache(),
+ tokenCache = createCache(),
+ compilerCache = createCache(),
+ sortOrder = function( a, b ) {
+ if ( a === b ) {
+ hasDuplicate = true;
+ }
+ return 0;
+ },
+
+ // General-purpose constants
+ MAX_NEGATIVE = 1 << 31,
+
+ // Instance methods
+ hasOwn = ({}).hasOwnProperty,
+ arr = [],
+ pop = arr.pop,
+ push_native = arr.push,
+ push = arr.push,
+ slice = arr.slice,
+ // Use a stripped-down indexOf as it's faster than native
+ // http://jsperf.com/thor-indexof-vs-for/5
+ indexOf = function( list, elem ) {
+ var i = 0,
+ len = list.length;
+ for ( ; i < len; i++ ) {
+ if ( list[i] === elem ) {
+ return i;
+ }
+ }
+ return -1;
+ },
+
+ booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",
+
+ // Regular expressions
+
+ // Whitespace characters http://www.w3.org/TR/css3-selectors/#whitespace
+ whitespace = "[\\x20\\t\\r\\n\\f]",
+ // http://www.w3.org/TR/css3-syntax/#characters
+ characterEncoding = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",
+
+ // Loosely modeled on CSS identifier characters
+ // An unquoted value should be a CSS identifier http://www.w3.org/TR/css3-selectors/#attribute-selectors
+ // Proper syntax: http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier
+ identifier = characterEncoding.replace( "w", "w#" ),
+
+ // Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors
+ attributes = "\\[" + whitespace + "*(" + characterEncoding + ")(?:" + whitespace +
+ // Operator (capture 2)
+ "*([*^$|!~]?=)" + whitespace +
+ // "Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]"
+ "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" + whitespace +
+ "*\\]",
+
+ pseudos = ":(" + characterEncoding + ")(?:\\((" +
+ // To reduce the number of selectors needing tokenize in the preFilter, prefer arguments:
+ // 1. quoted (capture 3; capture 4 or capture 5)
+ "('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|" +
+ // 2. simple (capture 6)
+ "((?:\\\\.|[^\\\\()[\\]]|" + attributes + ")*)|" +
+ // 3. anything else (capture 2)
+ ".*" +
+ ")\\)|)",
+
+ // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter
+ rwhitespace = new RegExp( whitespace + "+", "g" ),
+ rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ),
+
+ rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ),
+ rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*" ),
+
+ rattributeQuotes = new RegExp( "=" + whitespace + "*([^\\]'\"]*?)" + whitespace + "*\\]", "g" ),
+
+ rpseudo = new RegExp( pseudos ),
+ ridentifier = new RegExp( "^" + identifier + "$" ),
+
+ matchExpr = {
+ "ID": new RegExp( "^#(" + characterEncoding + ")" ),
+ "CLASS": new RegExp( "^\\.(" + characterEncoding + ")" ),
+ "TAG": new RegExp( "^(" + characterEncoding.replace( "w", "w*" ) + ")" ),
+ "ATTR": new RegExp( "^" + attributes ),
+ "PSEUDO": new RegExp( "^" + pseudos ),
+ "CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace +
+ "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace +
+ "*(\\d+)|))" + whitespace + "*\\)|)", "i" ),
+ "bool": new RegExp( "^(?:" + booleans + ")$", "i" ),
+ // For use in libraries implementing .is()
+ // We use this for POS matching in `select`
+ "needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" +
+ whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" )
+ },
+
+ rinputs = /^(?:input|select|textarea|button)$/i,
+ rheader = /^h\d$/i,
+
+ rnative = /^[^{]+\{\s*\[native \w/,
+
+ // Easily-parseable/retrievable ID or TAG or CLASS selectors
+ rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,
+
+ rsibling = /[+~]/,
+ rescape = /'|\\/g,
+
+ // CSS escapes http://www.w3.org/TR/CSS21/syndata.html#escaped-characters
+ runescape = new RegExp( "\\\\([\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", "ig" ),
+ funescape = function( _, escaped, escapedWhitespace ) {
+ var high = "0x" + escaped - 0x10000;
+ // NaN means non-codepoint
+ // Support: Firefox<24
+ // Workaround erroneous numeric interpretation of +"0x"
+ return high !== high || escapedWhitespace ?
+ escaped :
+ high < 0 ?
+ // BMP codepoint
+ String.fromCharCode( high + 0x10000 ) :
+ // Supplemental Plane codepoint (surrogate pair)
+ String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 );
+ },
+
+ // Used for iframes
+ // See setDocument()
+ // Removing the function wrapper causes a "Permission Denied"
+ // error in IE
+ unloadHandler = function() {
+ setDocument();
+ };
+
+// Optimize for push.apply( _, NodeList )
+try {
+ push.apply(
+ (arr = slice.call( preferredDoc.childNodes )),
+ preferredDoc.childNodes
+ );
+ // Support: Android<4.0
+ // Detect silently failing push.apply
+ arr[ preferredDoc.childNodes.length ].nodeType;
+} catch ( e ) {
+ push = { apply: arr.length ?
+
+ // Leverage slice if possible
+ function( target, els ) {
+ push_native.apply( target, slice.call(els) );
+ } :
+
+ // Support: IE<9
+ // Otherwise append directly
+ function( target, els ) {
+ var j = target.length,
+ i = 0;
+ // Can't trust NodeList.length
+ while ( (target[j++] = els[i++]) ) {}
+ target.length = j - 1;
+ }
+ };
+}
+
+function Sizzle( selector, context, results, seed ) {
+ var match, elem, m, nodeType,
+ // QSA vars
+ i, groups, old, nid, newContext, newSelector;
+
+ if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) {
+ setDocument( context );
+ }
+
+ context = context || document;
+ results = results || [];
+ nodeType = context.nodeType;
+
+ if ( typeof selector !== "string" || !selector ||
+ nodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) {
+
+ return results;
+ }
+
+ if ( !seed && documentIsHTML ) {
+
+ // Try to shortcut find operations when possible (e.g., not under DocumentFragment)
+ if ( nodeType !== 11 && (match = rquickExpr.exec( selector )) ) {
+ // Speed-up: Sizzle("#ID")
+ if ( (m = match[1]) ) {
+ if ( nodeType === 9 ) {
+ elem = context.getElementById( m );
+ // Check parentNode to catch when Blackberry 4.6 returns
+ // nodes that are no longer in the document (jQuery #6963)
+ if ( elem && elem.parentNode ) {
+ // Handle the case where IE, Opera, and Webkit return items
+ // by name instead of ID
+ if ( elem.id === m ) {
+ results.push( elem );
+ return results;
+ }
+ } else {
+ return results;
+ }
+ } else {
+ // Context is not a document
+ if ( context.ownerDocument && (elem = context.ownerDocument.getElementById( m )) &&
+ contains( context, elem ) && elem.id === m ) {
+ results.push( elem );
+ return results;
+ }
+ }
+
+ // Speed-up: Sizzle("TAG")
+ } else if ( match[2] ) {
+ push.apply( results, context.getElementsByTagName( selector ) );
+ return results;
+
+ // Speed-up: Sizzle(".CLASS")
+ } else if ( (m = match[3]) && support.getElementsByClassName ) {
+ push.apply( results, context.getElementsByClassName( m ) );
+ return results;
+ }
+ }
+
+ // QSA path
+ if ( support.qsa && (!rbuggyQSA || !rbuggyQSA.test( selector )) ) {
+ nid = old = expando;
+ newContext = context;
+ newSelector = nodeType !== 1 && selector;
+
+ // qSA works strangely on Element-rooted queries
+ // We can work around this by specifying an extra ID on the root
+ // and working up from there (Thanks to Andrew Dupont for the technique)
+ // IE 8 doesn't work on object elements
+ if ( nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) {
+ groups = tokenize( selector );
+
+ if ( (old = context.getAttribute("id")) ) {
+ nid = old.replace( rescape, "\\$&" );
+ } else {
+ context.setAttribute( "id", nid );
+ }
+ nid = "[id='" + nid + "'] ";
+
+ i = groups.length;
+ while ( i-- ) {
+ groups[i] = nid + toSelector( groups[i] );
+ }
+ newContext = rsibling.test( selector ) && testContext( context.parentNode ) || context;
+ newSelector = groups.join(",");
+ }
+
+ if ( newSelector ) {
+ try {
+ push.apply( results,
+ newContext.querySelectorAll( newSelector )
+ );
+ return results;
+ } catch(qsaError) {
+ } finally {
+ if ( !old ) {
+ context.removeAttribute("id");
+ }
+ }
+ }
+ }
+ }
+
+ // All others
+ return select( selector.replace( rtrim, "$1" ), context, results, seed );
+}
+
+/**
+ * Create key-value caches of limited size
+ * @returns {Function(string, Object)} Returns the Object data after storing it on itself with
+ * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength)
+ * deleting the oldest entry
+ */
+function createCache() {
+ var keys = [];
+
+ function cache( key, value ) {
+ // Use (key + " ") to avoid collision with native prototype properties (see Issue #157)
+ if ( keys.push( key + " " ) > Expr.cacheLength ) {
+ // Only keep the most recent entries
+ delete cache[ keys.shift() ];
+ }
+ return (cache[ key + " " ] = value);
+ }
+ return cache;
+}
+
+/**
+ * Mark a function for special use by Sizzle
+ * @param {Function} fn The function to mark
+ */
+function markFunction( fn ) {
+ fn[ expando ] = true;
+ return fn;
+}
+
+/**
+ * Support testing using an element
+ * @param {Function} fn Passed the created div and expects a boolean result
+ */
+function assert( fn ) {
+ var div = document.createElement("div");
+
+ try {
+ return !!fn( div );
+ } catch (e) {
+ return false;
+ } finally {
+ // Remove from its parent by default
+ if ( div.parentNode ) {
+ div.parentNode.removeChild( div );
+ }
+ // release memory in IE
+ div = null;
+ }
+}
+
+/**
+ * Adds the same handler for all of the specified attrs
+ * @param {String} attrs Pipe-separated list of attributes
+ * @param {Function} handler The method that will be applied
+ */
+function addHandle( attrs, handler ) {
+ var arr = attrs.split("|"),
+ i = attrs.length;
+
+ while ( i-- ) {
+ Expr.attrHandle[ arr[i] ] = handler;
+ }
+}
+
+/**
+ * Checks document order of two siblings
+ * @param {Element} a
+ * @param {Element} b
+ * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b
+ */
+function siblingCheck( a, b ) {
+ var cur = b && a,
+ diff = cur && a.nodeType === 1 && b.nodeType === 1 &&
+ ( ~b.sourceIndex || MAX_NEGATIVE ) -
+ ( ~a.sourceIndex || MAX_NEGATIVE );
+
+ // Use IE sourceIndex if available on both nodes
+ if ( diff ) {
+ return diff;
+ }
+
+ // Check if b follows a
+ if ( cur ) {
+ while ( (cur = cur.nextSibling) ) {
+ if ( cur === b ) {
+ return -1;
+ }
+ }
+ }
+
+ return a ? 1 : -1;
+}
+
+/**
+ * Returns a function to use in pseudos for input types
+ * @param {String} type
+ */
+function createInputPseudo( type ) {
+ return function( elem ) {
+ var name = elem.nodeName.toLowerCase();
+ return name === "input" && elem.type === type;
+ };
+}
+
+/**
+ * Returns a function to use in pseudos for buttons
+ * @param {String} type
+ */
+function createButtonPseudo( type ) {
+ return function( elem ) {
+ var name = elem.nodeName.toLowerCase();
+ return (name === "input" || name === "button") && elem.type === type;
+ };
+}
+
+/**
+ * Returns a function to use in pseudos for positionals
+ * @param {Function} fn
+ */
+function createPositionalPseudo( fn ) {
+ return markFunction(function( argument ) {
+ argument = +argument;
+ return markFunction(function( seed, matches ) {
+ var j,
+ matchIndexes = fn( [], seed.length, argument ),
+ i = matchIndexes.length;
+
+ // Match elements found at the specified indexes
+ while ( i-- ) {
+ if ( seed[ (j = matchIndexes[i]) ] ) {
+ seed[j] = !(matches[j] = seed[j]);
+ }
+ }
+ });
+ });
+}
+
+/**
+ * Checks a node for validity as a Sizzle context
+ * @param {Element|Object=} context
+ * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value
+ */
+function testContext( context ) {
+ return context && typeof context.getElementsByTagName !== "undefined" && context;
+}
+
+// Expose support vars for convenience
+support = Sizzle.support = {};
+
+/**
+ * Detects XML nodes
+ * @param {Element|Object} elem An element or a document
+ * @returns {Boolean} True iff elem is a non-HTML XML node
+ */
+isXML = Sizzle.isXML = function( elem ) {
+ // documentElement is verified for cases where it doesn't yet exist
+ // (such as loading iframes in IE - #4833)
+ var documentElement = elem && (elem.ownerDocument || elem).documentElement;
+ return documentElement ? documentElement.nodeName !== "HTML" : false;
+};
+
+/**
+ * Sets document-related variables once based on the current document
+ * @param {Element|Object} [doc] An element or document object to use to set the document
+ * @returns {Object} Returns the current document
+ */
+setDocument = Sizzle.setDocument = function( node ) {
+ var hasCompare, parent,
+ doc = node ? node.ownerDocument || node : preferredDoc;
+
+ // If no document and documentElement is available, return
+ if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) {
+ return document;
+ }
+
+ // Set our document
+ document = doc;
+ docElem = doc.documentElement;
+ parent = doc.defaultView;
+
+ // Support: IE>8
+ // If iframe document is assigned to "document" variable and if iframe has been reloaded,
+ // IE will throw "permission denied" error when accessing "document" variable, see jQuery #13936
+ // IE6-8 do not support the defaultView property so parent will be undefined
+ if ( parent && parent !== parent.top ) {
+ // IE11 does not have attachEvent, so all must suffer
+ if ( parent.addEventListener ) {
+ parent.addEventListener( "unload", unloadHandler, false );
+ } else if ( parent.attachEvent ) {
+ parent.attachEvent( "onunload", unloadHandler );
+ }
+ }
+
+ /* Support tests
+ ---------------------------------------------------------------------- */
+ documentIsHTML = !isXML( doc );
+
+ /* Attributes
+ ---------------------------------------------------------------------- */
+
+ // Support: IE<8
+ // Verify that getAttribute really returns attributes and not properties
+ // (excepting IE8 booleans)
+ support.attributes = assert(function( div ) {
+ div.className = "i";
+ return !div.getAttribute("className");
+ });
+
+ /* getElement(s)By*
+ ---------------------------------------------------------------------- */
+
+ // Check if getElementsByTagName("*") returns only elements
+ support.getElementsByTagName = assert(function( div ) {
+ div.appendChild( doc.createComment("") );
+ return !div.getElementsByTagName("*").length;
+ });
+
+ // Support: IE<9
+ support.getElementsByClassName = rnative.test( doc.getElementsByClassName );
+
+ // Support: IE<10
+ // Check if getElementById returns elements by name
+ // The broken getElementById methods don't pick up programatically-set names,
+ // so use a roundabout getElementsByName test
+ support.getById = assert(function( div ) {
+ docElem.appendChild( div ).id = expando;
+ return !doc.getElementsByName || !doc.getElementsByName( expando ).length;
+ });
+
+ // ID find and filter
+ if ( support.getById ) {
+ Expr.find["ID"] = function( id, context ) {
+ if ( typeof context.getElementById !== "undefined" && documentIsHTML ) {
+ var m = context.getElementById( id );
+ // Check parentNode to catch when Blackberry 4.6 returns
+ // nodes that are no longer in the document #6963
+ return m && m.parentNode ? [ m ] : [];
+ }
+ };
+ Expr.filter["ID"] = function( id ) {
+ var attrId = id.replace( runescape, funescape );
+ return function( elem ) {
+ return elem.getAttribute("id") === attrId;
+ };
+ };
+ } else {
+ // Support: IE6/7
+ // getElementById is not reliable as a find shortcut
+ delete Expr.find["ID"];
+
+ Expr.filter["ID"] = function( id ) {
+ var attrId = id.replace( runescape, funescape );
+ return function( elem ) {
+ var node = typeof elem.getAttributeNode !== "undefined" && elem.getAttributeNode("id");
+ return node && node.value === attrId;
+ };
+ };
+ }
+
+ // Tag
+ Expr.find["TAG"] = support.getElementsByTagName ?
+ function( tag, context ) {
+ if ( typeof context.getElementsByTagName !== "undefined" ) {
+ return context.getElementsByTagName( tag );
+
+ // DocumentFragment nodes don't have gEBTN
+ } else if ( support.qsa ) {
+ return context.querySelectorAll( tag );
+ }
+ } :
+
+ function( tag, context ) {
+ var elem,
+ tmp = [],
+ i = 0,
+ // By happy coincidence, a (broken) gEBTN appears on DocumentFragment nodes too
+ results = context.getElementsByTagName( tag );
+
+ // Filter out possible comments
+ if ( tag === "*" ) {
+ while ( (elem = results[i++]) ) {
+ if ( elem.nodeType === 1 ) {
+ tmp.push( elem );
+ }
+ }
+
+ return tmp;
+ }
+ return results;
+ };
+
+ // Class
+ Expr.find["CLASS"] = support.getElementsByClassName && function( className, context ) {
+ if ( documentIsHTML ) {
+ return context.getElementsByClassName( className );
+ }
+ };
+
+ /* QSA/matchesSelector
+ ---------------------------------------------------------------------- */
+
+ // QSA and matchesSelector support
+
+ // matchesSelector(:active) reports false when true (IE9/Opera 11.5)
+ rbuggyMatches = [];
+
+ // qSa(:focus) reports false when true (Chrome 21)
+ // We allow this because of a bug in IE8/9 that throws an error
+ // whenever `document.activeElement` is accessed on an iframe
+ // So, we allow :focus to pass through QSA all the time to avoid the IE error
+ // See http://bugs.jquery.com/ticket/13378
+ rbuggyQSA = [];
+
+ if ( (support.qsa = rnative.test( doc.querySelectorAll )) ) {
+ // Build QSA regex
+ // Regex strategy adopted from Diego Perini
+ assert(function( div ) {
+ // Select is set to empty string on purpose
+ // This is to test IE's treatment of not explicitly
+ // setting a boolean content attribute,
+ // since its presence should be enough
+ // http://bugs.jquery.com/ticket/12359
+ docElem.appendChild( div ).innerHTML = "<a id='" + expando + "'></a>" +
+ "<select id='" + expando + "-\f]' msallowcapture=''>" +
+ "<option selected=''></option></select>";
+
+ // Support: IE8, Opera 11-12.16
+ // Nothing should be selected when empty strings follow ^= or $= or *=
+ // The test attribute must be unknown in Opera but "safe" for WinRT
+ // http://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section
+ if ( div.querySelectorAll("[msallowcapture^='']").length ) {
+ rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" );
+ }
+
+ // Support: IE8
+ // Boolean attributes and "value" are not treated correctly
+ if ( !div.querySelectorAll("[selected]").length ) {
+ rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" );
+ }
+
+ // Support: Chrome<29, Android<4.2+, Safari<7.0+, iOS<7.0+, PhantomJS<1.9.7+
+ if ( !div.querySelectorAll( "[id~=" + expando + "-]" ).length ) {
+ rbuggyQSA.push("~=");
+ }
+
+ // Webkit/Opera - :checked should return selected option elements
+ // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
+ // IE8 throws error here and will not see later tests
+ if ( !div.querySelectorAll(":checked").length ) {
+ rbuggyQSA.push(":checked");
+ }
+
+ // Support: Safari 8+, iOS 8+
+ // https://bugs.webkit.org/show_bug.cgi?id=136851
+ // In-page `selector#id sibing-combinator selector` fails
+ if ( !div.querySelectorAll( "a#" + expando + "+*" ).length ) {
+ rbuggyQSA.push(".#.+[+~]");
+ }
+ });
+
+ assert(function( div ) {
+ // Support: Windows 8 Native Apps
+ // The type and name attributes are restricted during .innerHTML assignment
+ var input = doc.createElement("input");
+ input.setAttribute( "type", "hidden" );
+ div.appendChild( input ).setAttribute( "name", "D" );
+
+ // Support: IE8
+ // Enforce case-sensitivity of name attribute
+ if ( div.querySelectorAll("[name=d]").length ) {
+ rbuggyQSA.push( "name" + whitespace + "*[*^$|!~]?=" );
+ }
+
+ // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled)
+ // IE8 throws error here and will not see later tests
+ if ( !div.querySelectorAll(":enabled").length ) {
+ rbuggyQSA.push( ":enabled", ":disabled" );
+ }
+
+ // Opera 10-11 does not throw on post-comma invalid pseudos
+ div.querySelectorAll("*,:x");
+ rbuggyQSA.push(",.*:");
+ });
+ }
+
+ if ( (support.matchesSelector = rnative.test( (matches = docElem.matches ||
+ docElem.webkitMatchesSelector ||
+ docElem.mozMatchesSelector ||
+ docElem.oMatchesSelector ||
+ docElem.msMatchesSelector) )) ) {
+
+ assert(function( div ) {
+ // Check to see if it's possible to do matchesSelector
+ // on a disconnected node (IE 9)
+ support.disconnectedMatch = matches.call( div, "div" );
+
+ // This should fail with an exception
+ // Gecko does not error, returns false instead
+ matches.call( div, "[s!='']:x" );
+ rbuggyMatches.push( "!=", pseudos );
+ });
+ }
+
+ rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join("|") );
+ rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join("|") );
+
+ /* Contains
+ ---------------------------------------------------------------------- */
+ hasCompare = rnative.test( docElem.compareDocumentPosition );
+
+ // Element contains another
+ // Purposefully does not implement inclusive descendent
+ // As in, an element does not contain itself
+ contains = hasCompare || rnative.test( docElem.contains ) ?
+ function( a, b ) {
+ var adown = a.nodeType === 9 ? a.documentElement : a,
+ bup = b && b.parentNode;
+ return a === bup || !!( bup && bup.nodeType === 1 && (
+ adown.contains ?
+ adown.contains( bup ) :
+ a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16
+ ));
+ } :
+ function( a, b ) {
+ if ( b ) {
+ while ( (b = b.parentNode) ) {
+ if ( b === a ) {
+ return true;
+ }
+ }
+ }
+ return false;
+ };
+
+ /* Sorting
+ ---------------------------------------------------------------------- */
+
+ // Document order sorting
+ sortOrder = hasCompare ?
+ function( a, b ) {
+
+ // Flag for duplicate removal
+ if ( a === b ) {
+ hasDuplicate = true;
+ return 0;
+ }
+
+ // Sort on method existence if only one input has compareDocumentPosition
+ var compare = !a.compareDocumentPosition - !b.compareDocumentPosition;
+ if ( compare ) {
+ return compare;
+ }
+
+ // Calculate position if both inputs belong to the same document
+ compare = ( a.ownerDocument || a ) === ( b.ownerDocument || b ) ?
+ a.compareDocumentPosition( b ) :
+
+ // Otherwise we know they are disconnected
+ 1;
+
+ // Disconnected nodes
+ if ( compare & 1 ||
+ (!support.sortDetached && b.compareDocumentPosition( a ) === compare) ) {
+
+ // Choose the first element that is related to our preferred document
+ if ( a === doc || a.ownerDocument === preferredDoc && contains(preferredDoc, a) ) {
+ return -1;
+ }
+ if ( b === doc || b.ownerDocument === preferredDoc && contains(preferredDoc, b) ) {
+ return 1;
+ }
+
+ // Maintain original order
+ return sortInput ?
+ ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) :
+ 0;
+ }
+
+ return compare & 4 ? -1 : 1;
+ } :
+ function( a, b ) {
+ // Exit early if the nodes are identical
+ if ( a === b ) {
+ hasDuplicate = true;
+ return 0;
+ }
+
+ var cur,
+ i = 0,
+ aup = a.parentNode,
+ bup = b.parentNode,
+ ap = [ a ],
+ bp = [ b ];
+
+ // Parentless nodes are either documents or disconnected
+ if ( !aup || !bup ) {
+ return a === doc ? -1 :
+ b === doc ? 1 :
+ aup ? -1 :
+ bup ? 1 :
+ sortInput ?
+ ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) :
+ 0;
+
+ // If the nodes are siblings, we can do a quick check
+ } else if ( aup === bup ) {
+ return siblingCheck( a, b );
+ }
+
+ // Otherwise we need full lists of their ancestors for comparison
+ cur = a;
+ while ( (cur = cur.parentNode) ) {
+ ap.unshift( cur );
+ }
+ cur = b;
+ while ( (cur = cur.parentNode) ) {
+ bp.unshift( cur );
+ }
+
+ // Walk down the tree looking for a discrepancy
+ while ( ap[i] === bp[i] ) {
+ i++;
+ }
+
+ return i ?
+ // Do a sibling check if the nodes have a common ancestor
+ siblingCheck( ap[i], bp[i] ) :
+
+ // Otherwise nodes in our document sort first
+ ap[i] === preferredDoc ? -1 :
+ bp[i] === preferredDoc ? 1 :
+ 0;
+ };
+
+ return doc;
+};
+
+Sizzle.matches = function( expr, elements ) {
+ return Sizzle( expr, null, null, elements );
+};
+
+Sizzle.matchesSelector = function( elem, expr ) {
+ // Set document vars if needed
+ if ( ( elem.ownerDocument || elem ) !== document ) {
+ setDocument( elem );
+ }
+
+ // Make sure that attribute selectors are quoted
+ expr = expr.replace( rattributeQuotes, "='$1']" );
+
+ if ( support.matchesSelector && documentIsHTML &&
+ ( !rbuggyMatches || !rbuggyMatches.test( expr ) ) &&
+ ( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) {
+
+ try {
+ var ret = matches.call( elem, expr );
+
+ // IE 9's matchesSelector returns false on disconnected nodes
+ if ( ret || support.disconnectedMatch ||
+ // As well, disconnected nodes are said to be in a document
+ // fragment in IE 9
+ elem.document && elem.document.nodeType !== 11 ) {
+ return ret;
+ }
+ } catch (e) {}
+ }
+
+ return Sizzle( expr, document, null, [ elem ] ).length > 0;
+};
+
+Sizzle.contains = function( context, elem ) {
+ // Set document vars if needed
+ if ( ( context.ownerDocument || context ) !== document ) {
+ setDocument( context );
+ }
+ return contains( context, elem );
+};
+
+Sizzle.attr = function( elem, name ) {
+ // Set document vars if needed
+ if ( ( elem.ownerDocument || elem ) !== document ) {
+ setDocument( elem );
+ }
+
+ var fn = Expr.attrHandle[ name.toLowerCase() ],
+ // Don't get fooled by Object.prototype properties (jQuery #13807)
+ val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ?
+ fn( elem, name, !documentIsHTML ) :
+ undefined;
+
+ return val !== undefined ?
+ val :
+ support.attributes || !documentIsHTML ?
+ elem.getAttribute( name ) :
+ (val = elem.getAttributeNode(name)) && val.specified ?
+ val.value :
+ null;
+};
+
+Sizzle.error = function( msg ) {
+ throw new Error( "Syntax error, unrecognized expression: " + msg );
+};
+
+/**
+ * Document sorting and removing duplicates
+ * @param {ArrayLike} results
+ */
+Sizzle.uniqueSort = function( results ) {
+ var elem,
+ duplicates = [],
+ j = 0,
+ i = 0;
+
+ // Unless we *know* we can detect duplicates, assume their presence
+ hasDuplicate = !support.detectDuplicates;
+ sortInput = !support.sortStable && results.slice( 0 );
+ results.sort( sortOrder );
+
+ if ( hasDuplicate ) {
+ while ( (elem = results[i++]) ) {
+ if ( elem === results[ i ] ) {
+ j = duplicates.push( i );
+ }
+ }
+ while ( j-- ) {
+ results.splice( duplicates[ j ], 1 );
+ }
+ }
+
+ // Clear input after sorting to release objects
+ // See https://github.com/jquery/sizzle/pull/225
+ sortInput = null;
+
+ return results;
+};
+
+/**
+ * Utility function for retrieving the text value of an array of DOM nodes
+ * @param {Array|Element} elem
+ */
+getText = Sizzle.getText = function( elem ) {
+ var node,
+ ret = "",
+ i = 0,
+ nodeType = elem.nodeType;
+
+ if ( !nodeType ) {
+ // If no nodeType, this is expected to be an array
+ while ( (node = elem[i++]) ) {
+ // Do not traverse comment nodes
+ ret += getText( node );
+ }
+ } else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) {
+ // Use textContent for elements
+ // innerText usage removed for consistency of new lines (jQuery #11153)
+ if ( typeof elem.textContent === "string" ) {
+ return elem.textContent;
+ } else {
+ // Traverse its children
+ for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
+ ret += getText( elem );
+ }
+ }
+ } else if ( nodeType === 3 || nodeType === 4 ) {
+ return elem.nodeValue;
+ }
+ // Do not include comment or processing instruction nodes
+
+ return ret;
+};
+
+Expr = Sizzle.selectors = {
+
+ // Can be adjusted by the user
+ cacheLength: 50,
+
+ createPseudo: markFunction,
+
+ match: matchExpr,
+
+ attrHandle: {},
+
+ find: {},
+
+ relative: {
+ ">": { dir: "parentNode", first: true },
+ " ": { dir: "parentNode" },
+ "+": { dir: "previousSibling", first: true },
+ "~": { dir: "previousSibling" }
+ },
+
+ preFilter: {
+ "ATTR": function( match ) {
+ match[1] = match[1].replace( runescape, funescape );
+
+ // Move the given value to match[3] whether quoted or unquoted
+ match[3] = ( match[3] || match[4] || match[5] || "" ).replace( runescape, funescape );
+
+ if ( match[2] === "~=" ) {
+ match[3] = " " + match[3] + " ";
+ }
+
+ return match.slice( 0, 4 );
+ },
+
+ "CHILD": function( match ) {
+ /* matches from matchExpr["CHILD"]
+ 1 type (only|nth|...)
+ 2 what (child|of-type)
+ 3 argument (even|odd|\d*|\d*n([+-]\d+)?|...)
+ 4 xn-component of xn+y argument ([+-]?\d*n|)
+ 5 sign of xn-component
+ 6 x of xn-component
+ 7 sign of y-component
+ 8 y of y-component
+ */
+ match[1] = match[1].toLowerCase();
+
+ if ( match[1].slice( 0, 3 ) === "nth" ) {
+ // nth-* requires argument
+ if ( !match[3] ) {
+ Sizzle.error( match[0] );
+ }
+
+ // numeric x and y parameters for Expr.filter.CHILD
+ // remember that false/true cast respectively to 0/1
+ match[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === "even" || match[3] === "odd" ) );
+ match[5] = +( ( match[7] + match[8] ) || match[3] === "odd" );
+
+ // other types prohibit arguments
+ } else if ( match[3] ) {
+ Sizzle.error( match[0] );
+ }
+
+ return match;
+ },
+
+ "PSEUDO": function( match ) {
+ var excess,
+ unquoted = !match[6] && match[2];
+
+ if ( matchExpr["CHILD"].test( match[0] ) ) {
+ return null;
+ }
+
+ // Accept quoted arguments as-is
+ if ( match[3] ) {
+ match[2] = match[4] || match[5] || "";
+
+ // Strip excess characters from unquoted arguments
+ } else if ( unquoted && rpseudo.test( unquoted ) &&
+ // Get excess from tokenize (recursively)
+ (excess = tokenize( unquoted, true )) &&
+ // advance to the next closing parenthesis
+ (excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) {
+
+ // excess is a negative index
+ match[0] = match[0].slice( 0, excess );
+ match[2] = unquoted.slice( 0, excess );
+ }
+
+ // Return only captures needed by the pseudo filter method (type and argument)
+ return match.slice( 0, 3 );
+ }
+ },
+
+ filter: {
+
+ "TAG": function( nodeNameSelector ) {
+ var nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase();
+ return nodeNameSelector === "*" ?
+ function() { return true; } :
+ function( elem ) {
+ return elem.nodeName && elem.nodeName.toLowerCase() === nodeName;
+ };
+ },
+
+ "CLASS": function( className ) {
+ var pattern = classCache[ className + " " ];
+
+ return pattern ||
+ (pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" )) &&
+ classCache( className, function( elem ) {
+ return pattern.test( typeof elem.className === "string" && elem.className || typeof elem.getAttribute !== "undefined" && elem.getAttribute("class") || "" );
+ });
+ },
+
+ "ATTR": function( name, operator, check ) {
+ return function( elem ) {
+ var result = Sizzle.attr( elem, name );
+
+ if ( result == null ) {
+ return operator === "!=";
+ }
+ if ( !operator ) {
+ return true;
+ }
+
+ result += "";
+
+ return operator === "=" ? result === check :
+ operator === "!=" ? result !== check :
+ operator === "^=" ? check && result.indexOf( check ) === 0 :
+ operator === "*=" ? check && result.indexOf( check ) > -1 :
+ operator === "$=" ? check && result.slice( -check.length ) === check :
+ operator === "~=" ? ( " " + result.replace( rwhitespace, " " ) + " " ).indexOf( check ) > -1 :
+ operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" :
+ false;
+ };
+ },
+
+ "CHILD": function( type, what, argument, first, last ) {
+ var simple = type.slice( 0, 3 ) !== "nth",
+ forward = type.slice( -4 ) !== "last",
+ ofType = what === "of-type";
+
+ return first === 1 && last === 0 ?
+
+ // Shortcut for :nth-*(n)
+ function( elem ) {
+ return !!elem.parentNode;
+ } :
+
+ function( elem, context, xml ) {
+ var cache, outerCache, node, diff, nodeIndex, start,
+ dir = simple !== forward ? "nextSibling" : "previousSibling",
+ parent = elem.parentNode,
+ name = ofType && elem.nodeName.toLowerCase(),
+ useCache = !xml && !ofType;
+
+ if ( parent ) {
+
+ // :(first|last|only)-(child|of-type)
+ if ( simple ) {
+ while ( dir ) {
+ node = elem;
+ while ( (node = node[ dir ]) ) {
+ if ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) {
+ return false;
+ }
+ }
+ // Reverse direction for :only-* (if we haven't yet done so)
+ start = dir = type === "only" && !start && "nextSibling";
+ }
+ return true;
+ }
+
+ start = [ forward ? parent.firstChild : parent.lastChild ];
+
+ // non-xml :nth-child(...) stores cache data on `parent`
+ if ( forward && useCache ) {
+ // Seek `elem` from a previously-cached index
+ outerCache = parent[ expando ] || (parent[ expando ] = {});
+ cache = outerCache[ type ] || [];
+ nodeIndex = cache[0] === dirruns && cache[1];
+ diff = cache[0] === dirruns && cache[2];
+ node = nodeIndex && parent.childNodes[ nodeIndex ];
+
+ while ( (node = ++nodeIndex && node && node[ dir ] ||
+
+ // Fallback to seeking `elem` from the start
+ (diff = nodeIndex = 0) || start.pop()) ) {
+
+ // When found, cache indexes on `parent` and break
+ if ( node.nodeType === 1 && ++diff && node === elem ) {
+ outerCache[ type ] = [ dirruns, nodeIndex, diff ];
+ break;
+ }
+ }
+
+ // Use previously-cached element index if available
+ } else if ( useCache && (cache = (elem[ expando ] || (elem[ expando ] = {}))[ type ]) && cache[0] === dirruns ) {
+ diff = cache[1];
+
+ // xml :nth-child(...) or :nth-last-child(...) or :nth(-last)?-of-type(...)
+ } else {
+ // Use the same loop as above to seek `elem` from the start
+ while ( (node = ++nodeIndex && node && node[ dir ] ||
+ (diff = nodeIndex = 0) || start.pop()) ) {
+
+ if ( ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) && ++diff ) {
+ // Cache the index of each encountered element
+ if ( useCache ) {
+ (node[ expando ] || (node[ expando ] = {}))[ type ] = [ dirruns, diff ];
+ }
+
+ if ( node === elem ) {
+ break;
+ }
+ }
+ }
+ }
+
+ // Incorporate the offset, then check against cycle size
+ diff -= last;
+ return diff === first || ( diff % first === 0 && diff / first >= 0 );
+ }
+ };
+ },
+
+ "PSEUDO": function( pseudo, argument ) {
+ // pseudo-class names are case-insensitive
+ // http://www.w3.org/TR/selectors/#pseudo-classes
+ // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters
+ // Remember that setFilters inherits from pseudos
+ var args,
+ fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] ||
+ Sizzle.error( "unsupported pseudo: " + pseudo );
+
+ // The user may use createPseudo to indicate that
+ // arguments are needed to create the filter function
+ // just as Sizzle does
+ if ( fn[ expando ] ) {
+ return fn( argument );
+ }
+
+ // But maintain support for old signatures
+ if ( fn.length > 1 ) {
+ args = [ pseudo, pseudo, "", argument ];
+ return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ?
+ markFunction(function( seed, matches ) {
+ var idx,
+ matched = fn( seed, argument ),
+ i = matched.length;
+ while ( i-- ) {
+ idx = indexOf( seed, matched[i] );
+ seed[ idx ] = !( matches[ idx ] = matched[i] );
+ }
+ }) :
+ function( elem ) {
+ return fn( elem, 0, args );
+ };
+ }
+
+ return fn;
+ }
+ },
+
+ pseudos: {
+ // Potentially complex pseudos
+ "not": markFunction(function( selector ) {
+ // Trim the selector passed to compile
+ // to avoid treating leading and trailing
+ // spaces as combinators
+ var input = [],
+ results = [],
+ matcher = compile( selector.replace( rtrim, "$1" ) );
+
+ return matcher[ expando ] ?
+ markFunction(function( seed, matches, context, xml ) {
+ var elem,
+ unmatched = matcher( seed, null, xml, [] ),
+ i = seed.length;
+
+ // Match elements unmatched by `matcher`
+ while ( i-- ) {
+ if ( (elem = unmatched[i]) ) {
+ seed[i] = !(matches[i] = elem);
+ }
+ }
+ }) :
+ function( elem, context, xml ) {
+ input[0] = elem;
+ matcher( input, null, xml, results );
+ // Don't keep the element (issue #299)
+ input[0] = null;
+ return !results.pop();
+ };
+ }),
+
+ "has": markFunction(function( selector ) {
+ return function( elem ) {
+ return Sizzle( selector, elem ).length > 0;
+ };
+ }),
+
+ "contains": markFunction(function( text ) {
+ text = text.replace( runescape, funescape );
+ return function( elem ) {
+ return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1;
+ };
+ }),
+
+ // "Whether an element is represented by a :lang() selector
+ // is based solely on the element's language value
+ // being equal to the identifier C,
+ // or beginning with the identifier C immediately followed by "-".
+ // The matching of C against the element's language value is performed case-insensitively.
+ // The identifier C does not have to be a valid language name."
+ // http://www.w3.org/TR/selectors/#lang-pseudo
+ "lang": markFunction( function( lang ) {
+ // lang value must be a valid identifier
+ if ( !ridentifier.test(lang || "") ) {
+ Sizzle.error( "unsupported lang: " + lang );
+ }
+ lang = lang.replace( runescape, funescape ).toLowerCase();
+ return function( elem ) {
+ var elemLang;
+ do {
+ if ( (elemLang = documentIsHTML ?
+ elem.lang :
+ elem.getAttribute("xml:lang") || elem.getAttribute("lang")) ) {
+
+ elemLang = elemLang.toLowerCase();
+ return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0;
+ }
+ } while ( (elem = elem.parentNode) && elem.nodeType === 1 );
+ return false;
+ };
+ }),
+
+ // Miscellaneous
+ "target": function( elem ) {
+ var hash = window.location && window.location.hash;
+ return hash && hash.slice( 1 ) === elem.id;
+ },
+
+ "root": function( elem ) {
+ return elem === docElem;
+ },
+
+ "focus": function( elem ) {
+ return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex);
+ },
+
+ // Boolean properties
+ "enabled": function( elem ) {
+ return elem.disabled === false;
+ },
+
+ "disabled": function( elem ) {
+ return elem.disabled === true;
+ },
+
+ "checked": function( elem ) {
+ // In CSS3, :checked should return both checked and selected elements
+ // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
+ var nodeName = elem.nodeName.toLowerCase();
+ return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected);
+ },
+
+ "selected": function( elem ) {
+ // Accessing this property makes selected-by-default
+ // options in Safari work properly
+ if ( elem.parentNode ) {
+ elem.parentNode.selectedIndex;
+ }
+
+ return elem.selected === true;
+ },
+
+ // Contents
+ "empty": function( elem ) {
+ // http://www.w3.org/TR/selectors/#empty-pseudo
+ // :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5),
+ // but not by others (comment: 8; processing instruction: 7; etc.)
+ // nodeType < 6 works because attributes (2) do not appear as children
+ for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
+ if ( elem.nodeType < 6 ) {
+ return false;
+ }
+ }
+ return true;
+ },
+
+ "parent": function( elem ) {
+ return !Expr.pseudos["empty"]( elem );
+ },
+
+ // Element/input types
+ "header": function( elem ) {
+ return rheader.test( elem.nodeName );
+ },
+
+ "input": function( elem ) {
+ return rinputs.test( elem.nodeName );
+ },
+
+ "button": function( elem ) {
+ var name = elem.nodeName.toLowerCase();
+ return name === "input" && elem.type === "button" || name === "button";
+ },
+
+ "text": function( elem ) {
+ var attr;
+ return elem.nodeName.toLowerCase() === "input" &&
+ elem.type === "text" &&
+
+ // Support: IE<8
+ // New HTML5 attribute values (e.g., "search") appear with elem.type === "text"
+ ( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === "text" );
+ },
+
+ // Position-in-collection
+ "first": createPositionalPseudo(function() {
+ return [ 0 ];
+ }),
+
+ "last": createPositionalPseudo(function( matchIndexes, length ) {
+ return [ length - 1 ];
+ }),
+
+ "eq": createPositionalPseudo(function( matchIndexes, length, argument ) {
+ return [ argument < 0 ? argument + length : argument ];
+ }),
+
+ "even": createPositionalPseudo(function( matchIndexes, length ) {
+ var i = 0;
+ for ( ; i < length; i += 2 ) {
+ matchIndexes.push( i );
+ }
+ return matchIndexes;
+ }),
+
+ "odd": createPositionalPseudo(function( matchIndexes, length ) {
+ var i = 1;
+ for ( ; i < length; i += 2 ) {
+ matchIndexes.push( i );
+ }
+ return matchIndexes;
+ }),
+
+ "lt": createPositionalPseudo(function( matchIndexes, length, argument ) {
+ var i = argument < 0 ? argument + length : argument;
+ for ( ; --i >= 0; ) {
+ matchIndexes.push( i );
+ }
+ return matchIndexes;
+ }),
+
+ "gt": createPositionalPseudo(function( matchIndexes, length, argument ) {
+ var i = argument < 0 ? argument + length : argument;
+ for ( ; ++i < length; ) {
+ matchIndexes.push( i );
+ }
+ return matchIndexes;
+ })
+ }
+};
+
+Expr.pseudos["nth"] = Expr.pseudos["eq"];
+
+// Add button/input type pseudos
+for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) {
+ Expr.pseudos[ i ] = createInputPseudo( i );
+}
+for ( i in { submit: true, reset: true } ) {
+ Expr.pseudos[ i ] = createButtonPseudo( i );
+}
+
+// Easy API for creating new setFilters
+function setFilters() {}
+setFilters.prototype = Expr.filters = Expr.pseudos;
+Expr.setFilters = new setFilters();
+
+tokenize = Sizzle.tokenize = function( selector, parseOnly ) {
+ var matched, match, tokens, type,
+ soFar, groups, preFilters,
+ cached = tokenCache[ selector + " " ];
+
+ if ( cached ) {
+ return parseOnly ? 0 : cached.slice( 0 );
+ }
+
+ soFar = selector;
+ groups = [];
+ preFilters = Expr.preFilter;
+
+ while ( soFar ) {
+
+ // Comma and first run
+ if ( !matched || (match = rcomma.exec( soFar )) ) {
+ if ( match ) {
+ // Don't consume trailing commas as valid
+ soFar = soFar.slice( match[0].length ) || soFar;
+ }
+ groups.push( (tokens = []) );
+ }
+
+ matched = false;
+
+ // Combinators
+ if ( (match = rcombinators.exec( soFar )) ) {
+ matched = match.shift();
+ tokens.push({
+ value: matched,
+ // Cast descendant combinators to space
+ type: match[0].replace( rtrim, " " )
+ });
+ soFar = soFar.slice( matched.length );
+ }
+
+ // Filters
+ for ( type in Expr.filter ) {
+ if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] ||
+ (match = preFilters[ type ]( match ))) ) {
+ matched = match.shift();
+ tokens.push({
+ value: matched,
+ type: type,
+ matches: match
+ });
+ soFar = soFar.slice( matched.length );
+ }
+ }
+
+ if ( !matched ) {
+ break;
+ }
+ }
+
+ // Return the length of the invalid excess
+ // if we're just parsing
+ // Otherwise, throw an error or return tokens
+ return parseOnly ?
+ soFar.length :
+ soFar ?
+ Sizzle.error( selector ) :
+ // Cache the tokens
+ tokenCache( selector, groups ).slice( 0 );
+};
+
+function toSelector( tokens ) {
+ var i = 0,
+ len = tokens.length,
+ selector = "";
+ for ( ; i < len; i++ ) {
+ selector += tokens[i].value;
+ }
+ return selector;
+}
+
+function addCombinator( matcher, combinator, base ) {
+ var dir = combinator.dir,
+ checkNonElements = base && dir === "parentNode",
+ doneName = done++;
+
+ return combinator.first ?
+ // Check against closest ancestor/preceding element
+ function( elem, context, xml ) {
+ while ( (elem = elem[ dir ]) ) {
+ if ( elem.nodeType === 1 || checkNonElements ) {
+ return matcher( elem, context, xml );
+ }
+ }
+ } :
+
+ // Check against all ancestor/preceding elements
+ function( elem, context, xml ) {
+ var oldCache, outerCache,
+ newCache = [ dirruns, doneName ];
+
+ // We can't set arbitrary data on XML nodes, so they don't benefit from dir caching
+ if ( xml ) {
+ while ( (elem = elem[ dir ]) ) {
+ if ( elem.nodeType === 1 || checkNonElements ) {
+ if ( matcher( elem, context, xml ) ) {
+ return true;
+ }
+ }
+ }
+ } else {
+ while ( (elem = elem[ dir ]) ) {
+ if ( elem.nodeType === 1 || checkNonElements ) {
+ outerCache = elem[ expando ] || (elem[ expando ] = {});
+ if ( (oldCache = outerCache[ dir ]) &&
+ oldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) {
+
+ // Assign to newCache so results back-propagate to previous elements
+ return (newCache[ 2 ] = oldCache[ 2 ]);
+ } else {
+ // Reuse newcache so results back-propagate to previous elements
+ outerCache[ dir ] = newCache;
+
+ // A match means we're done; a fail means we have to keep checking
+ if ( (newCache[ 2 ] = matcher( elem, context, xml )) ) {
+ return true;
+ }
+ }
+ }
+ }
+ }
+ };
+}
+
+function elementMatcher( matchers ) {
+ return matchers.length > 1 ?
+ function( elem, context, xml ) {
+ var i = matchers.length;
+ while ( i-- ) {
+ if ( !matchers[i]( elem, context, xml ) ) {
+ return false;
+ }
+ }
+ return true;
+ } :
+ matchers[0];
+}
+
+function multipleContexts( selector, contexts, results ) {
+ var i = 0,
+ len = contexts.length;
+ for ( ; i < len; i++ ) {
+ Sizzle( selector, contexts[i], results );
+ }
+ return results;
+}
+
+function condense( unmatched, map, filter, context, xml ) {
+ var elem,
+ newUnmatched = [],
+ i = 0,
+ len = unmatched.length,
+ mapped = map != null;
+
+ for ( ; i < len; i++ ) {
+ if ( (elem = unmatched[i]) ) {
+ if ( !filter || filter( elem, context, xml ) ) {
+ newUnmatched.push( elem );
+ if ( mapped ) {
+ map.push( i );
+ }
+ }
+ }
+ }
+
+ return newUnmatched;
+}
+
+function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {
+ if ( postFilter && !postFilter[ expando ] ) {
+ postFilter = setMatcher( postFilter );
+ }
+ if ( postFinder && !postFinder[ expando ] ) {
+ postFinder = setMatcher( postFinder, postSelector );
+ }
+ return markFunction(function( seed, results, context, xml ) {
+ var temp, i, elem,
+ preMap = [],
+ postMap = [],
+ preexisting = results.length,
+
+ // Get initial elements from seed or context
+ elems = seed || multipleContexts( selector || "*", context.nodeType ? [ context ] : context, [] ),
+
+ // Prefilter to get matcher input, preserving a map for seed-results synchronization
+ matcherIn = preFilter && ( seed || !selector ) ?
+ condense( elems, preMap, preFilter, context, xml ) :
+ elems,
+
+ matcherOut = matcher ?
+ // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results,
+ postFinder || ( seed ? preFilter : preexisting || postFilter ) ?
+
+ // ...intermediate processing is necessary
+ [] :
+
+ // ...otherwise use results directly
+ results :
+ matcherIn;
+
+ // Find primary matches
+ if ( matcher ) {
+ matcher( matcherIn, matcherOut, context, xml );
+ }
+
+ // Apply postFilter
+ if ( postFilter ) {
+ temp = condense( matcherOut, postMap );
+ postFilter( temp, [], context, xml );
+
+ // Un-match failing elements by moving them back to matcherIn
+ i = temp.length;
+ while ( i-- ) {
+ if ( (elem = temp[i]) ) {
+ matcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem);
+ }
+ }
+ }
+
+ if ( seed ) {
+ if ( postFinder || preFilter ) {
+ if ( postFinder ) {
+ // Get the final matcherOut by condensing this intermediate into postFinder contexts
+ temp = [];
+ i = matcherOut.length;
+ while ( i-- ) {
+ if ( (elem = matcherOut[i]) ) {
+ // Restore matcherIn since elem is not yet a final match
+ temp.push( (matcherIn[i] = elem) );
+ }
+ }
+ postFinder( null, (matcherOut = []), temp, xml );
+ }
+
+ // Move matched elements from seed to results to keep them synchronized
+ i = matcherOut.length;
+ while ( i-- ) {
+ if ( (elem = matcherOut[i]) &&
+ (temp = postFinder ? indexOf( seed, elem ) : preMap[i]) > -1 ) {
+
+ seed[temp] = !(results[temp] = elem);
+ }
+ }
+ }
+
+ // Add elements to results, through postFinder if defined
+ } else {
+ matcherOut = condense(
+ matcherOut === results ?
+ matcherOut.splice( preexisting, matcherOut.length ) :
+ matcherOut
+ );
+ if ( postFinder ) {
+ postFinder( null, results, matcherOut, xml );
+ } else {
+ push.apply( results, matcherOut );
+ }
+ }
+ });
+}
+
+function matcherFromTokens( tokens ) {
+ var checkContext, matcher, j,
+ len = tokens.length,
+ leadingRelative = Expr.relative[ tokens[0].type ],
+ implicitRelative = leadingRelative || Expr.relative[" "],
+ i = leadingRelative ? 1 : 0,
+
+ // The foundational matcher ensures that elements are reachable from top-level context(s)
+ matchContext = addCombinator( function( elem ) {
+ return elem === checkContext;
+ }, implicitRelative, true ),
+ matchAnyContext = addCombinator( function( elem ) {
+ return indexOf( checkContext, elem ) > -1;
+ }, implicitRelative, true ),
+ matchers = [ function( elem, context, xml ) {
+ var ret = ( !leadingRelative && ( xml || context !== outermostContext ) ) || (
+ (checkContext = context).nodeType ?
+ matchContext( elem, context, xml ) :
+ matchAnyContext( elem, context, xml ) );
+ // Avoid hanging onto element (issue #299)
+ checkContext = null;
+ return ret;
+ } ];
+
+ for ( ; i < len; i++ ) {
+ if ( (matcher = Expr.relative[ tokens[i].type ]) ) {
+ matchers = [ addCombinator(elementMatcher( matchers ), matcher) ];
+ } else {
+ matcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches );
+
+ // Return special upon seeing a positional matcher
+ if ( matcher[ expando ] ) {
+ // Find the next relative operator (if any) for proper handling
+ j = ++i;
+ for ( ; j < len; j++ ) {
+ if ( Expr.relative[ tokens[j].type ] ) {
+ break;
+ }
+ }
+ return setMatcher(
+ i > 1 && elementMatcher( matchers ),
+ i > 1 && toSelector(
+ // If the preceding token was a descendant combinator, insert an implicit any-element `*`
+ tokens.slice( 0, i - 1 ).concat({ value: tokens[ i - 2 ].type === " " ? "*" : "" })
+ ).replace( rtrim, "$1" ),
+ matcher,
+ i < j && matcherFromTokens( tokens.slice( i, j ) ),
+ j < len && matcherFromTokens( (tokens = tokens.slice( j )) ),
+ j < len && toSelector( tokens )
+ );
+ }
+ matchers.push( matcher );
+ }
+ }
+
+ return elementMatcher( matchers );
+}
+
+function matcherFromGroupMatchers( elementMatchers, setMatchers ) {
+ var bySet = setMatchers.length > 0,
+ byElement = elementMatchers.length > 0,
+ superMatcher = function( seed, context, xml, results, outermost ) {
+ var elem, j, matcher,
+ matchedCount = 0,
+ i = "0",
+ unmatched = seed && [],
+ setMatched = [],
+ contextBackup = outermostContext,
+ // We must always have either seed elements or outermost context
+ elems = seed || byElement && Expr.find["TAG"]( "*", outermost ),
+ // Use integer dirruns iff this is the outermost matcher
+ dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1),
+ len = elems.length;
+
+ if ( outermost ) {
+ outermostContext = context !== document && context;
+ }
+
+ // Add elements passing elementMatchers directly to results
+ // Keep `i` a string if there are no elements so `matchedCount` will be "00" below
+ // Support: IE<9, Safari
+ // Tolerate NodeList properties (IE: "length"; Safari: <number>) matching elements by id
+ for ( ; i !== len && (elem = elems[i]) != null; i++ ) {
+ if ( byElement && elem ) {
+ j = 0;
+ while ( (matcher = elementMatchers[j++]) ) {
+ if ( matcher( elem, context, xml ) ) {
+ results.push( elem );
+ break;
+ }
+ }
+ if ( outermost ) {
+ dirruns = dirrunsUnique;
+ }
+ }
+
+ // Track unmatched elements for set filters
+ if ( bySet ) {
+ // They will have gone through all possible matchers
+ if ( (elem = !matcher && elem) ) {
+ matchedCount--;
+ }
+
+ // Lengthen the array for every element, matched or not
+ if ( seed ) {
+ unmatched.push( elem );
+ }
+ }
+ }
+
+ // Apply set filters to unmatched elements
+ matchedCount += i;
+ if ( bySet && i !== matchedCount ) {
+ j = 0;
+ while ( (matcher = setMatchers[j++]) ) {
+ matcher( unmatched, setMatched, context, xml );
+ }
+
+ if ( seed ) {
+ // Reintegrate element matches to eliminate the need for sorting
+ if ( matchedCount > 0 ) {
+ while ( i-- ) {
+ if ( !(unmatched[i] || setMatched[i]) ) {
+ setMatched[i] = pop.call( results );
+ }
+ }
+ }
+
+ // Discard index placeholder values to get only actual matches
+ setMatched = condense( setMatched );
+ }
+
+ // Add matches to results
+ push.apply( results, setMatched );
+
+ // Seedless set matches succeeding multiple successful matchers stipulate sorting
+ if ( outermost && !seed && setMatched.length > 0 &&
+ ( matchedCount + setMatchers.length ) > 1 ) {
+
+ Sizzle.uniqueSort( results );
+ }
+ }
+
+ // Override manipulation of globals by nested matchers
+ if ( outermost ) {
+ dirruns = dirrunsUnique;
+ outermostContext = contextBackup;
+ }
+
+ return unmatched;
+ };
+
+ return bySet ?
+ markFunction( superMatcher ) :
+ superMatcher;
+}
+
+compile = Sizzle.compile = function( selector, match /* Internal Use Only */ ) {
+ var i,
+ setMatchers = [],
+ elementMatchers = [],
+ cached = compilerCache[ selector + " " ];
+
+ if ( !cached ) {
+ // Generate a function of recursive functions that can be used to check each element
+ if ( !match ) {
+ match = tokenize( selector );
+ }
+ i = match.length;
+ while ( i-- ) {
+ cached = matcherFromTokens( match[i] );
+ if ( cached[ expando ] ) {
+ setMatchers.push( cached );
+ } else {
+ elementMatchers.push( cached );
+ }
+ }
+
+ // Cache the compiled function
+ cached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) );
+
+ // Save selector and tokenization
+ cached.selector = selector;
+ }
+ return cached;
+};
+
+/**
+ * A low-level selection function that works with Sizzle's compiled
+ * selector functions
+ * @param {String|Function} selector A selector or a pre-compiled
+ * selector function built with Sizzle.compile
+ * @param {Element} context
+ * @param {Array} [results]
+ * @param {Array} [seed] A set of elements to match against
+ */
+select = Sizzle.select = function( selector, context, results, seed ) {
+ var i, tokens, token, type, find,
+ compiled = typeof selector === "function" && selector,
+ match = !seed && tokenize( (selector = compiled.selector || selector) );
+
+ results = results || [];
+
+ // Try to minimize operations if there is no seed and only one group
+ if ( match.length === 1 ) {
+
+ // Take a shortcut and set the context if the root selector is an ID
+ tokens = match[0] = match[0].slice( 0 );
+ if ( tokens.length > 2 && (token = tokens[0]).type === "ID" &&
+ support.getById && context.nodeType === 9 && documentIsHTML &&
+ Expr.relative[ tokens[1].type ] ) {
+
+ context = ( Expr.find["ID"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0];
+ if ( !context ) {
+ return results;
+
+ // Precompiled matchers will still verify ancestry, so step up a level
+ } else if ( compiled ) {
+ context = context.parentNode;
+ }
+
+ selector = selector.slice( tokens.shift().value.length );
+ }
+
+ // Fetch a seed set for right-to-left matching
+ i = matchExpr["needsContext"].test( selector ) ? 0 : tokens.length;
+ while ( i-- ) {
+ token = tokens[i];
+
+ // Abort if we hit a combinator
+ if ( Expr.relative[ (type = token.type) ] ) {
+ break;
+ }
+ if ( (find = Expr.find[ type ]) ) {
+ // Search, expanding context for leading sibling combinators
+ if ( (seed = find(
+ token.matches[0].replace( runescape, funescape ),
+ rsibling.test( tokens[0].type ) && testContext( context.parentNode ) || context
+ )) ) {
+
+ // If seed is empty or no tokens remain, we can return early
+ tokens.splice( i, 1 );
+ selector = seed.length && toSelector( tokens );
+ if ( !selector ) {
+ push.apply( results, seed );
+ return results;
+ }
+
+ break;
+ }
+ }
+ }
+ }
+
+ // Compile and execute a filtering function if one is not provided
+ // Provide `match` to avoid retokenization if we modified the selector above
+ ( compiled || compile( selector, match ) )(
+ seed,
+ context,
+ !documentIsHTML,
+ results,
+ rsibling.test( selector ) && testContext( context.parentNode ) || context
+ );
+ return results;
+};
+
+// One-time assignments
+
+// Sort stability
+support.sortStable = expando.split("").sort( sortOrder ).join("") === expando;
+
+// Support: Chrome 14-35+
+// Always assume duplicates if they aren't passed to the comparison function
+support.detectDuplicates = !!hasDuplicate;
+
+// Initialize against the default document
+setDocument();
+
+// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27)
+// Detached nodes confoundingly follow *each other*
+support.sortDetached = assert(function( div1 ) {
+ // Should return 1, but returns 4 (following)
+ return div1.compareDocumentPosition( document.createElement("div") ) & 1;
+});
+
+// Support: IE<8
+// Prevent attribute/property "interpolation"
+// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx
+if ( !assert(function( div ) {
+ div.innerHTML = "<a href='#'></a>";
+ return div.firstChild.getAttribute("href") === "#" ;
+}) ) {
+ addHandle( "type|href|height|width", function( elem, name, isXML ) {
+ if ( !isXML ) {
+ return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 );
+ }
+ });
+}
+
+// Support: IE<9
+// Use defaultValue in place of getAttribute("value")
+if ( !support.attributes || !assert(function( div ) {
+ div.innerHTML = "<input/>";
+ div.firstChild.setAttribute( "value", "" );
+ return div.firstChild.getAttribute( "value" ) === "";
+}) ) {
+ addHandle( "value", function( elem, name, isXML ) {
+ if ( !isXML && elem.nodeName.toLowerCase() === "input" ) {
+ return elem.defaultValue;
+ }
+ });
+}
+
+// Support: IE<9
+// Use getAttributeNode to fetch booleans when getAttribute lies
+if ( !assert(function( div ) {
+ return div.getAttribute("disabled") == null;
+}) ) {
+ addHandle( booleans, function( elem, name, isXML ) {
+ var val;
+ if ( !isXML ) {
+ return elem[ name ] === true ? name.toLowerCase() :
+ (val = elem.getAttributeNode( name )) && val.specified ?
+ val.value :
+ null;
+ }
+ });
+}
+
+// EXPOSE
+if ( typeof define === "function" && define.amd ) {
+ define(function() { return Sizzle; });
+// Sizzle requires that there be a global window in Common-JS like environments
+} else if ( typeof module !== "undefined" && module.exports ) {
+ module.exports = Sizzle;
+} else {
+ window.Sizzle = Sizzle;
+}
+// EXPOSE
+
+})( window );
diff --git a/views/ngXosViews/serviceGrid/src/vendor/jquery/src/sizzle/dist/sizzle.min.js b/views/ngXosViews/serviceGrid/src/vendor/jquery/src/sizzle/dist/sizzle.min.js
new file mode 100644
index 0000000..cf4d1a6
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/jquery/src/sizzle/dist/sizzle.min.js
@@ -0,0 +1,3 @@
+/*! Sizzle v2.2.0-pre | (c) 2008, 2014 jQuery Foundation, Inc. | jquery.org/license */
+!function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+1*new Date,v=a.document,w=0,x=0,y=hb(),z=hb(),A=hb(),B=function(a,b){return a===b&&(l=!0),0},C=1<<31,D={}.hasOwnProperty,E=[],F=E.pop,G=E.push,H=E.push,I=E.slice,J=function(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1},K="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",L="[\\x20\\t\\r\\n\\f]",M="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",N=M.replace("w","w#"),O="\\["+L+"*("+M+")(?:"+L+"*([*^$|!~]?=)"+L+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+N+"))|)"+L+"*\\]",P=":("+M+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+O+")*)|.*)\\)|)",Q=new RegExp(L+"+","g"),R=new RegExp("^"+L+"+|((?:^|[^\\\\])(?:\\\\.)*)"+L+"+$","g"),S=new RegExp("^"+L+"*,"+L+"*"),T=new RegExp("^"+L+"*([>+~]|"+L+")"+L+"*"),U=new RegExp("="+L+"*([^\\]'\"]*?)"+L+"*\\]","g"),V=new RegExp(P),W=new RegExp("^"+N+"$"),X={ID:new RegExp("^#("+M+")"),CLASS:new RegExp("^\\.("+M+")"),TAG:new RegExp("^("+M.replace("w","w*")+")"),ATTR:new RegExp("^"+O),PSEUDO:new RegExp("^"+P),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+L+"*(even|odd|(([+-]|)(\\d*)n|)"+L+"*(?:([+-]|)"+L+"*(\\d+)|))"+L+"*\\)|)","i"),bool:new RegExp("^(?:"+K+")$","i"),needsContext:new RegExp("^"+L+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+L+"*((?:-\\d)?\\d*)"+L+"*\\)|)(?=[^-]|$)","i")},Y=/^(?:input|select|textarea|button)$/i,Z=/^h\d$/i,$=/^[^{]+\{\s*\[native \w/,_=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ab=/[+~]/,bb=/'|\\/g,cb=new RegExp("\\\\([\\da-f]{1,6}"+L+"?|("+L+")|.)","ig"),db=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)},eb=function(){m()};try{H.apply(E=I.call(v.childNodes),v.childNodes),E[v.childNodes.length].nodeType}catch(fb){H={apply:E.length?function(a,b){G.apply(a,I.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function gb(a,b,d,e){var f,h,j,k,l,o,r,s,w,x;if((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,d=d||[],k=b.nodeType,"string"!=typeof a||!a||1!==k&&9!==k&&11!==k)return d;if(!e&&p){if(11!==k&&(f=_.exec(a)))if(j=f[1]){if(9===k){if(h=b.getElementById(j),!h||!h.parentNode)return d;if(h.id===j)return d.push(h),d}else if(b.ownerDocument&&(h=b.ownerDocument.getElementById(j))&&t(b,h)&&h.id===j)return d.push(h),d}else{if(f[2])return H.apply(d,b.getElementsByTagName(a)),d;if((j=f[3])&&c.getElementsByClassName)return H.apply(d,b.getElementsByClassName(j)),d}if(c.qsa&&(!q||!q.test(a))){if(s=r=u,w=b,x=1!==k&&a,1===k&&"object"!==b.nodeName.toLowerCase()){o=g(a),(r=b.getAttribute("id"))?s=r.replace(bb,"\\$&"):b.setAttribute("id",s),s="[id='"+s+"'] ",l=o.length;while(l--)o[l]=s+rb(o[l]);w=ab.test(a)&&pb(b.parentNode)||b,x=o.join(",")}if(x)try{return H.apply(d,w.querySelectorAll(x)),d}catch(y){}finally{r||b.removeAttribute("id")}}}return i(a.replace(R,"$1"),b,d,e)}function hb(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function ib(a){return a[u]=!0,a}function jb(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function kb(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function lb(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||C)-(~a.sourceIndex||C);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function mb(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function nb(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function ob(a){return ib(function(b){return b=+b,ib(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function pb(a){return a&&"undefined"!=typeof a.getElementsByTagName&&a}c=gb.support={},f=gb.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=gb.setDocument=function(a){var b,e,g=a?a.ownerDocument||a:v;return g!==n&&9===g.nodeType&&g.documentElement?(n=g,o=g.documentElement,e=g.defaultView,e&&e!==e.top&&(e.addEventListener?e.addEventListener("unload",eb,!1):e.attachEvent&&e.attachEvent("onunload",eb)),p=!f(g),c.attributes=jb(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=jb(function(a){return a.appendChild(g.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=$.test(g.getElementsByClassName),c.getById=jb(function(a){return o.appendChild(a).id=u,!g.getElementsByName||!g.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){var c="undefined"!=typeof a.getAttributeNode&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return"undefined"!=typeof b.getElementsByTagName?b.getElementsByTagName(a):c.qsa?b.querySelectorAll(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=$.test(g.querySelectorAll))&&(jb(function(a){o.appendChild(a).innerHTML="<a id='"+u+"'></a><select id='"+u+"-\f]' msallowcapture=''><option selected=''></option></select>",a.querySelectorAll("[msallowcapture^='']").length&&q.push("[*^$]="+L+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+L+"*(?:value|"+K+")"),a.querySelectorAll("[id~="+u+"-]").length||q.push("~="),a.querySelectorAll(":checked").length||q.push(":checked"),a.querySelectorAll("a#"+u+"+*").length||q.push(".#.+[+~]")}),jb(function(a){var b=g.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+L+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=$.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&jb(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",P)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=$.test(o.compareDocumentPosition),t=b||$.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===g||a.ownerDocument===v&&t(v,a)?-1:b===g||b.ownerDocument===v&&t(v,b)?1:k?J(k,a)-J(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,e=a.parentNode,f=b.parentNode,h=[a],i=[b];if(!e||!f)return a===g?-1:b===g?1:e?-1:f?1:k?J(k,a)-J(k,b):0;if(e===f)return lb(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)i.unshift(c);while(h[d]===i[d])d++;return d?lb(h[d],i[d]):h[d]===v?-1:i[d]===v?1:0},g):n},gb.matches=function(a,b){return gb(a,null,null,b)},gb.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(U,"='$1']"),!(!c.matchesSelector||!p||r&&r.test(b)||q&&q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return gb(b,n,null,[a]).length>0},gb.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},gb.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&D.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},gb.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},gb.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=gb.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=gb.selectors={cacheLength:50,createPseudo:ib,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(cb,db),a[3]=(a[3]||a[4]||a[5]||"").replace(cb,db),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||gb.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&gb.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return X.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&V.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(cb,db).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+L+")"+a+"("+L+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||"undefined"!=typeof a.getAttribute&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=gb.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e.replace(Q," ")+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){k=q[u]||(q[u]={}),j=k[a]||[],n=j[0]===w&&j[1],m=j[0]===w&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[w,n,m];break}}else if(s&&(j=(b[u]||(b[u]={}))[a])&&j[0]===w)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(s&&((l[u]||(l[u]={}))[a]=[w,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||gb.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?ib(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=J(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:ib(function(a){var b=[],c=[],d=h(a.replace(R,"$1"));return d[u]?ib(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),b[0]=null,!c.pop()}}),has:ib(function(a){return function(b){return gb(a,b).length>0}}),contains:ib(function(a){return a=a.replace(cb,db),function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:ib(function(a){return W.test(a||"")||gb.error("unsupported lang: "+a),a=a.replace(cb,db).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Z.test(a.nodeName)},input:function(a){return Y.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:ob(function(){return[0]}),last:ob(function(a,b){return[b-1]}),eq:ob(function(a,b,c){return[0>c?c+b:c]}),even:ob(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:ob(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:ob(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:ob(function(a,b,c){for(var d=0>c?c+b:c;++d<b;)a.push(d);return a})}},d.pseudos.nth=d.pseudos.eq;for(b in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})d.pseudos[b]=mb(b);for(b in{submit:!0,reset:!0})d.pseudos[b]=nb(b);function qb(){}qb.prototype=d.filters=d.pseudos,d.setFilters=new qb,g=gb.tokenize=function(a,b){var c,e,f,g,h,i,j,k=z[a+" "];if(k)return b?0:k.slice(0);h=a,i=[],j=d.preFilter;while(h){(!c||(e=S.exec(h)))&&(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),c=!1,(e=T.exec(h))&&(c=e.shift(),f.push({value:c,type:e[0].replace(R," ")}),h=h.slice(c.length));for(g in d.filter)!(e=X[g].exec(h))||j[g]&&!(e=j[g](e))||(c=e.shift(),f.push({value:c,type:g,matches:e}),h=h.slice(c.length));if(!c)break}return b?h.length:h?gb.error(a):z(a,i).slice(0)};function rb(a){for(var b=0,c=a.length,d="";c>b;b++)d+=a[b].value;return d}function sb(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[u]||(b[u]={}),(h=i[d])&&h[0]===w&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function tb(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function ub(a,b,c){for(var d=0,e=b.length;e>d;d++)gb(a,b[d],c);return c}function vb(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function wb(a,b,c,d,e,f){return d&&!d[u]&&(d=wb(d)),e&&!e[u]&&(e=wb(e,f)),ib(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||ub(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:vb(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=vb(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?J(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=vb(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):H.apply(g,r)})}function xb(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=sb(function(a){return a===b},h,!0),l=sb(function(a){return J(b,a)>-1},h,!0),m=[function(a,c,d){var e=!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d));return b=null,e}];f>i;i++)if(c=d.relative[a[i].type])m=[sb(tb(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return wb(i>1&&tb(m),i>1&&rb(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(R,"$1"),c,e>i&&xb(a.slice(i,e)),f>e&&xb(a=a.slice(e)),f>e&&rb(a))}m.push(c)}return tb(m)}function yb(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,m,o,p=0,q="0",r=f&&[],s=[],t=j,u=f||e&&d.find.TAG("*",k),v=w+=null==t?1:Math.random()||.1,x=u.length;for(k&&(j=g!==n&&g);q!==x&&null!=(l=u[q]);q++){if(e&&l){m=0;while(o=a[m++])if(o(l,g,h)){i.push(l);break}k&&(w=v)}c&&((l=!o&&l)&&p--,f&&r.push(l))}if(p+=q,c&&q!==p){m=0;while(o=b[m++])o(r,s,g,h);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=F.call(i));s=vb(s)}H.apply(i,s),k&&!f&&s.length>0&&p+b.length>1&&gb.uniqueSort(i)}return k&&(w=v,j=t),r};return c?ib(f):f}h=gb.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=xb(b[c]),f[u]?d.push(f):e.push(f);f=A(a,yb(e,d)),f.selector=a}return f},i=gb.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(cb,db),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=X.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(cb,db),ab.test(j[0].type)&&pb(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&rb(j),!a)return H.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,ab.test(a)&&pb(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=jb(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),jb(function(a){return a.innerHTML="<a href='#'></a>","#"===a.firstChild.getAttribute("href")})||kb("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&jb(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||kb("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),jb(function(a){return null==a.getAttribute("disabled")})||kb(K,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),"function"==typeof define&&define.amd?define(function(){return gb}):"undefined"!=typeof module&&module.exports?module.exports=gb:a.Sizzle=gb}(window);
+//# sourceMappingURL=sizzle.min.map
\ No newline at end of file
diff --git a/views/ngXosViews/serviceGrid/src/vendor/jquery/src/sizzle/dist/sizzle.min.map b/views/ngXosViews/serviceGrid/src/vendor/jquery/src/sizzle/dist/sizzle.min.map
new file mode 100644
index 0000000..e39754e
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/jquery/src/sizzle/dist/sizzle.min.map
@@ -0,0 +1 @@
+{"version":3,"file":"sizzle.min.js","sources":["sizzle.js"],"names":["window","i","support","Expr","getText","isXML","tokenize","compile","select","outermostContext","sortInput","hasDuplicate","setDocument","document","docElem","documentIsHTML","rbuggyQSA","rbuggyMatches","matches","contains","expando","Date","preferredDoc","dirruns","done","classCache","createCache","tokenCache","compilerCache","sortOrder","a","b","MAX_NEGATIVE","hasOwn","hasOwnProperty","arr","pop","push_native","push","slice","indexOf","list","elem","len","length","booleans","whitespace","characterEncoding","identifier","replace","attributes","pseudos","rwhitespace","RegExp","rtrim","rcomma","rcombinators","rattributeQuotes","rpseudo","ridentifier","matchExpr","ID","CLASS","TAG","ATTR","PSEUDO","CHILD","bool","needsContext","rinputs","rheader","rnative","rquickExpr","rsibling","rescape","runescape","funescape","_","escaped","escapedWhitespace","high","String","fromCharCode","unloadHandler","apply","call","childNodes","nodeType","e","target","els","j","Sizzle","selector","context","results","seed","match","m","groups","old","nid","newContext","newSelector","ownerDocument","exec","getElementById","parentNode","id","getElementsByTagName","getElementsByClassName","qsa","test","nodeName","toLowerCase","getAttribute","setAttribute","toSelector","testContext","join","querySelectorAll","qsaError","removeAttribute","keys","cache","key","value","cacheLength","shift","markFunction","fn","assert","div","createElement","removeChild","addHandle","attrs","handler","split","attrHandle","siblingCheck","cur","diff","sourceIndex","nextSibling","createInputPseudo","type","name","createButtonPseudo","createPositionalPseudo","argument","matchIndexes","documentElement","node","hasCompare","parent","doc","defaultView","top","addEventListener","attachEvent","className","appendChild","createComment","getById","getElementsByName","find","filter","attrId","getAttributeNode","tag","tmp","innerHTML","input","matchesSelector","webkitMatchesSelector","mozMatchesSelector","oMatchesSelector","msMatchesSelector","disconnectedMatch","compareDocumentPosition","adown","bup","compare","sortDetached","aup","ap","bp","unshift","expr","elements","ret","attr","val","undefined","specified","error","msg","Error","uniqueSort","duplicates","detectDuplicates","sortStable","sort","splice","textContent","firstChild","nodeValue","selectors","createPseudo","relative",">","dir","first"," ","+","~","preFilter","excess","unquoted","nodeNameSelector","pattern","operator","check","result","what","last","simple","forward","ofType","xml","outerCache","nodeIndex","start","useCache","lastChild","pseudo","args","setFilters","idx","matched","not","matcher","unmatched","has","text","innerText","lang","elemLang","hash","location","root","focus","activeElement","hasFocus","href","tabIndex","enabled","disabled","checked","selected","selectedIndex","empty","header","button","eq","even","odd","lt","gt","radio","checkbox","file","password","image","submit","reset","prototype","filters","parseOnly","tokens","soFar","preFilters","cached","addCombinator","combinator","base","checkNonElements","doneName","oldCache","newCache","elementMatcher","matchers","multipleContexts","contexts","condense","map","newUnmatched","mapped","setMatcher","postFilter","postFinder","postSelector","temp","preMap","postMap","preexisting","elems","matcherIn","matcherOut","matcherFromTokens","checkContext","leadingRelative","implicitRelative","matchContext","matchAnyContext","concat","matcherFromGroupMatchers","elementMatchers","setMatchers","bySet","byElement","superMatcher","outermost","matchedCount","setMatched","contextBackup","dirrunsUnique","Math","random","token","compiled","div1","defaultValue","define","amd","module","exports"],"mappings":";CAUA,SAAWA,GAEX,GAAIC,GACHC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EAGAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EAGAC,EAAU,SAAW,EAAI,GAAIC,MAC7BC,EAAetB,EAAOa,SACtBU,EAAU,EACVC,EAAO,EACPC,EAAaC,KACbC,EAAaD,KACbE,EAAgBF,KAChBG,EAAY,SAAUC,EAAGC,GAIxB,MAHKD,KAAMC,IACVpB,GAAe,GAET,GAIRqB,EAAe,GAAK,GAGpBC,KAAcC,eACdC,KACAC,EAAMD,EAAIC,IACVC,EAAcF,EAAIG,KAClBA,EAAOH,EAAIG,KACXC,EAAQJ,EAAII,MAGZC,EAAU,SAAUC,EAAMC,GAGzB,IAFA,GAAIzC,GAAI,EACP0C,EAAMF,EAAKG,OACAD,EAAJ1C,EAASA,IAChB,GAAKwC,EAAKxC,KAAOyC,EAChB,MAAOzC,EAGT,OAAO,IAGR4C,EAAW,6HAKXC,EAAa,sBAEbC,EAAoB,mCAKpBC,EAAaD,EAAkBE,QAAS,IAAK,MAG7CC,EAAa,MAAQJ,EAAa,KAAOC,EAAoB,OAASD,EAErE,gBAAkBA,EAElB,2DAA6DE,EAAa,OAASF,EACnF,OAEDK,EAAU,KAAOJ,EA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CxC,EAAI0E,WAAW3F,aAAa,WAEnCoB,GAAW,yBAA0B,SAAU7F,EAAMyG,EAAM9I,GAC1D,MAAMA,GAAN,OACQqC,EAAKyE,aAAcgC,EAA6B,SAAvBA,EAAKjC,cAA2B,EAAI,KAOjEhH,EAAQgD,YAAeiF,GAAO,SAAUC,GAG7C,MAFAA,GAAIwC,UAAY,WAChBxC,EAAI0E,WAAW1F,aAAc,QAAS,IACY,KAA3CgB,EAAI0E,WAAW3F,aAAc,YAEpCoB,GAAW,QAAS,SAAU7F,EAAMyG,EAAM9I,GACzC,MAAMA,IAAyC,UAAhCqC,EAAKuE,SAASC,cAA7B,OACQxE,EAAKmS,eAOT1M,GAAO,SAAUC,GACtB,MAAuC,OAAhCA,EAAIjB,aAAa,eAExBoB,GAAW1F,EAAU,SAAUH,EAAMyG,EAAM9I,GAC1C,GAAI4L,EACJ,OAAM5L,GAAN,OACQqC,EAAMyG,MAAW,EAAOA,EAAKjC,eACjC+E,EAAMvJ,EAAK+H,iBAAkBtB,KAAW8C,EAAIE,UAC7CF,EAAInE,MACL,OAMmB,kBAAXgN,SAAyBA,OAAOC,IAC3CD,OAAO,WAAa,MAAOlP,MAEE,mBAAXoP,SAA0BA,OAAOC,QACnDD,OAAOC,QAAUrP,GAEjB5F,EAAO4F,OAASA,IAIb5F"}
\ No newline at end of file
diff --git a/applications/auto-scale/gui/src/vendor/jquery/src/traversing.js b/views/ngXosViews/serviceGrid/src/vendor/jquery/src/traversing.js
similarity index 100%
rename from applications/auto-scale/gui/src/vendor/jquery/src/traversing.js
rename to views/ngXosViews/serviceGrid/src/vendor/jquery/src/traversing.js
diff --git a/applications/auto-scale/gui/src/vendor/jquery/src/traversing/findFilter.js b/views/ngXosViews/serviceGrid/src/vendor/jquery/src/traversing/findFilter.js
similarity index 100%
rename from applications/auto-scale/gui/src/vendor/jquery/src/traversing/findFilter.js
rename to views/ngXosViews/serviceGrid/src/vendor/jquery/src/traversing/findFilter.js
diff --git a/applications/auto-scale/gui/src/vendor/jquery/src/traversing/var/rneedsContext.js b/views/ngXosViews/serviceGrid/src/vendor/jquery/src/traversing/var/rneedsContext.js
similarity index 100%
rename from applications/auto-scale/gui/src/vendor/jquery/src/traversing/var/rneedsContext.js
rename to views/ngXosViews/serviceGrid/src/vendor/jquery/src/traversing/var/rneedsContext.js
diff --git a/applications/auto-scale/gui/src/vendor/jquery/src/var/arr.js b/views/ngXosViews/serviceGrid/src/vendor/jquery/src/var/arr.js
similarity index 100%
rename from applications/auto-scale/gui/src/vendor/jquery/src/var/arr.js
rename to views/ngXosViews/serviceGrid/src/vendor/jquery/src/var/arr.js
diff --git a/applications/auto-scale/gui/src/vendor/jquery/src/var/class2type.js b/views/ngXosViews/serviceGrid/src/vendor/jquery/src/var/class2type.js
similarity index 100%
rename from applications/auto-scale/gui/src/vendor/jquery/src/var/class2type.js
rename to views/ngXosViews/serviceGrid/src/vendor/jquery/src/var/class2type.js
diff --git a/applications/auto-scale/gui/src/vendor/jquery/src/var/concat.js b/views/ngXosViews/serviceGrid/src/vendor/jquery/src/var/concat.js
similarity index 100%
rename from applications/auto-scale/gui/src/vendor/jquery/src/var/concat.js
rename to views/ngXosViews/serviceGrid/src/vendor/jquery/src/var/concat.js
diff --git a/applications/auto-scale/gui/src/vendor/jquery/src/var/hasOwn.js b/views/ngXosViews/serviceGrid/src/vendor/jquery/src/var/hasOwn.js
similarity index 100%
rename from applications/auto-scale/gui/src/vendor/jquery/src/var/hasOwn.js
rename to views/ngXosViews/serviceGrid/src/vendor/jquery/src/var/hasOwn.js
diff --git a/applications/auto-scale/gui/src/vendor/jquery/src/var/indexOf.js b/views/ngXosViews/serviceGrid/src/vendor/jquery/src/var/indexOf.js
similarity index 100%
rename from applications/auto-scale/gui/src/vendor/jquery/src/var/indexOf.js
rename to views/ngXosViews/serviceGrid/src/vendor/jquery/src/var/indexOf.js
diff --git a/applications/auto-scale/gui/src/vendor/jquery/src/var/pnum.js b/views/ngXosViews/serviceGrid/src/vendor/jquery/src/var/pnum.js
similarity index 100%
rename from applications/auto-scale/gui/src/vendor/jquery/src/var/pnum.js
rename to views/ngXosViews/serviceGrid/src/vendor/jquery/src/var/pnum.js
diff --git a/applications/auto-scale/gui/src/vendor/jquery/src/var/push.js b/views/ngXosViews/serviceGrid/src/vendor/jquery/src/var/push.js
similarity index 100%
rename from applications/auto-scale/gui/src/vendor/jquery/src/var/push.js
rename to views/ngXosViews/serviceGrid/src/vendor/jquery/src/var/push.js
diff --git a/applications/auto-scale/gui/src/vendor/jquery/src/var/rnotwhite.js b/views/ngXosViews/serviceGrid/src/vendor/jquery/src/var/rnotwhite.js
similarity index 100%
rename from applications/auto-scale/gui/src/vendor/jquery/src/var/rnotwhite.js
rename to views/ngXosViews/serviceGrid/src/vendor/jquery/src/var/rnotwhite.js
diff --git a/applications/auto-scale/gui/src/vendor/jquery/src/var/slice.js b/views/ngXosViews/serviceGrid/src/vendor/jquery/src/var/slice.js
similarity index 100%
rename from applications/auto-scale/gui/src/vendor/jquery/src/var/slice.js
rename to views/ngXosViews/serviceGrid/src/vendor/jquery/src/var/slice.js
diff --git a/applications/auto-scale/gui/src/vendor/jquery/src/var/strundefined.js b/views/ngXosViews/serviceGrid/src/vendor/jquery/src/var/strundefined.js
similarity index 100%
rename from applications/auto-scale/gui/src/vendor/jquery/src/var/strundefined.js
rename to views/ngXosViews/serviceGrid/src/vendor/jquery/src/var/strundefined.js
diff --git a/applications/auto-scale/gui/src/vendor/jquery/src/var/support.js b/views/ngXosViews/serviceGrid/src/vendor/jquery/src/var/support.js
similarity index 100%
rename from applications/auto-scale/gui/src/vendor/jquery/src/var/support.js
rename to views/ngXosViews/serviceGrid/src/vendor/jquery/src/var/support.js
diff --git a/applications/auto-scale/gui/src/vendor/jquery/src/var/toString.js b/views/ngXosViews/serviceGrid/src/vendor/jquery/src/var/toString.js
similarity index 100%
rename from applications/auto-scale/gui/src/vendor/jquery/src/var/toString.js
rename to views/ngXosViews/serviceGrid/src/vendor/jquery/src/var/toString.js
diff --git a/applications/auto-scale/gui/src/vendor/jquery/src/wrap.js b/views/ngXosViews/serviceGrid/src/vendor/jquery/src/wrap.js
similarity index 100%
rename from applications/auto-scale/gui/src/vendor/jquery/src/wrap.js
rename to views/ngXosViews/serviceGrid/src/vendor/jquery/src/wrap.js
diff --git a/views/ngXosViews/serviceGrid/src/vendor/lodash/.bower.json b/views/ngXosViews/serviceGrid/src/vendor/lodash/.bower.json
new file mode 100644
index 0000000..6b70939
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/lodash/.bower.json
@@ -0,0 +1,14 @@
+{
+ "name": "lodash",
+ "homepage": "https://github.com/lodash/lodash",
+ "version": "4.11.2",
+ "_release": "4.11.2",
+ "_resolution": {
+ "type": "version",
+ "tag": "4.11.2",
+ "commit": "64fbb18fc7a4dd44240e25ed9cac2576b16f45a3"
+ },
+ "_source": "https://github.com/lodash/lodash.git",
+ "_target": "~4.11.1",
+ "_originalSource": "lodash"
+}
\ No newline at end of file
diff --git a/applications/auto-scale/gui/src/vendor/ui.bootstrap/.editorconfig b/views/ngXosViews/serviceGrid/src/vendor/lodash/.editorconfig
similarity index 72%
rename from applications/auto-scale/gui/src/vendor/ui.bootstrap/.editorconfig
rename to views/ngXosViews/serviceGrid/src/vendor/lodash/.editorconfig
index 8565360..b889a36 100644
--- a/applications/auto-scale/gui/src/vendor/ui.bootstrap/.editorconfig
+++ b/views/ngXosViews/serviceGrid/src/vendor/lodash/.editorconfig
@@ -4,15 +4,9 @@
root = true
[*]
-end_of_line = lf
charset = utf-8
-trim_trailing_whitespace = true
-insert_final_newline = true
-
-# Tabs in JS unless otherwise specified
-[**.js]
-indent_style = space
+end_of_line = lf
indent_size = 2
-
-[*.md]
-trim_trailing_whitespace = false
\ No newline at end of file
+indent_style = space
+insert_final_newline = true
+trim_trailing_whitespace = true
diff --git a/views/ngXosViews/serviceGrid/src/vendor/lodash/.gitattributes b/views/ngXosViews/serviceGrid/src/vendor/lodash/.gitattributes
new file mode 100644
index 0000000..176a458
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/lodash/.gitattributes
@@ -0,0 +1 @@
+* text=auto
diff --git a/views/ngXosViews/serviceGrid/src/vendor/lodash/.github/CONTRIBUTING.md b/views/ngXosViews/serviceGrid/src/vendor/lodash/.github/CONTRIBUTING.md
new file mode 100644
index 0000000..b3427fd
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/lodash/.github/CONTRIBUTING.md
@@ -0,0 +1,78 @@
+# Contributing to Lodash
+
+Contributions are always welcome. Before contributing please read the
+[code of conduct](https://github.com/lodash/lodash/blob/master/CODE_OF_CONDUCT.md)
+& [search the issue tracker](https://github.com/lodash/lodash/issues); your issue
+may have already been discussed or fixed in `master`. To contribute,
+[fork](https://help.github.com/articles/fork-a-repo/) Lodash, commit your changes,
+& [send a pull request](https://help.github.com/articles/using-pull-requests/).
+
+## Feature Requests
+
+Feature requests should be submitted in the
+[issue tracker](https://github.com/lodash/lodash/issues), with a description of
+the expected behavior & use case, where they’ll remain closed until sufficient interest,
+[e.g. :+1: reactions](https://help.github.com/articles/about-discussions-in-issues-and-pull-requests/),
+has been shown by the community. Before submitting a request, please search for
+similar ones in the
+[closed issues](https://github.com/lodash/lodash/issues?q=is%3Aissue+is%3Aclosed+label%3Aenhancement).
+
+## Pull Requests
+
+For additions or bug fixes you should only need to modify `lodash.js`. Include
+updated unit tests in the `test` directory as part of your pull request. Don’t
+worry about regenerating the `dist/` or `doc/` files.
+
+Before running the unit tests you’ll need to install, `npm i`,
+[development dependencies](https://docs.npmjs.com/files/package.json#devdependencies).
+Run unit tests from the command-line via `npm test`, or open `test/index.html` &
+`test/fp.html` in a web browser. The [Backbone](http://backbonejs.org/) &
+[Underscore](http://underscorejs.org/) test suites are included as well.
+
+## Contributor License Agreement
+
+Lodash is a member of the [jQuery Foundation](https://jquery.org/).
+As such, we request that all contributors sign the jQuery Foundation
+[contributor license agreement (CLA)](https://contribute.jquery.org/CLA/).
+
+For more information about CLAs, please check out Alex Russell’s excellent post,
+[“Why Do I Need to Sign This?”](http://infrequently.org/2008/06/why-do-i-need-to-sign-this/).
+
+## Coding Guidelines
+
+In addition to the following guidelines, please follow the conventions already
+established in the code.
+
+- **Spacing**:<br>
+ Use two spaces for indentation. No tabs.
+
+- **Naming**:<br>
+ Keep variable & method names concise & descriptive.<br>
+ Variable names `index`, `collection`, & `callback` are preferable to
+ `i`, `arr`, & `fn`.
+
+- **Quotes**:<br>
+ Single-quoted strings are preferred to double-quoted strings; however,
+ please use a double-quoted string if the value contains a single-quote
+ character to avoid unnecessary escaping.
+
+- **Comments**:<br>
+ Please use single-line comments to annotate significant additions, &
+ [JSDoc-style](http://www.2ality.com/2011/08/jsdoc-intro.html) comments for
+ functions.
+
+Guidelines are enforced using [JSCS](https://www.npmjs.com/package/jscs):
+```bash
+$ npm run style
+```
+
+## Tips
+
+You can opt-in to a pre-push git hook by adding an `.opt-in` file to the root of
+the project containing:
+```txt
+pre-push
+```
+
+With that, when you `git push`, the pre-push git hook will trigger and execute
+`npm run validate`.
diff --git a/views/ngXosViews/serviceGrid/src/vendor/lodash/.gitignore b/views/ngXosViews/serviceGrid/src/vendor/lodash/.gitignore
new file mode 100644
index 0000000..6eb2db8
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/lodash/.gitignore
@@ -0,0 +1,9 @@
+.DS_Store
+*.custom.*
+*.log
+*.map
+lodash.compat.min.js
+coverage
+node_modules
+.opt-in
+.opt-out
diff --git a/views/ngXosViews/serviceGrid/src/vendor/lodash/.jscsrc b/views/ngXosViews/serviceGrid/src/vendor/lodash/.jscsrc
new file mode 100644
index 0000000..5f44ab8
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/lodash/.jscsrc
@@ -0,0 +1,97 @@
+{
+ "maxErrors": "2000",
+ "maximumLineLength": {
+ "value": 180,
+ "allExcept": ["comments", "functionSignature", "regex"]
+ },
+ "requireCurlyBraces": [
+ "if",
+ "else",
+ "for",
+ "while",
+ "do",
+ "try",
+ "catch"
+ ],
+ "requireOperatorBeforeLineBreak": [
+ "=",
+ "+",
+ "-",
+ "/",
+ "*",
+ "==",
+ "===",
+ "!=",
+ "!==",
+ ">",
+ ">=",
+ "<",
+ "<="
+ ],
+ "requireSpaceAfterKeywords": [
+ "if",
+ "else",
+ "for",
+ "while",
+ "do",
+ "switch",
+ "return",
+ "try",
+ "catch"
+ ],
+ "requireSpaceBeforeBinaryOperators": [
+ "=", "+=", "-=", "*=", "/=", "%=", "<<=", ">>=", ">>>=",
+ "&=", "|=", "^=", "+=",
+
+ "+", "-", "*", "/", "%", "<<", ">>", ">>>", "&",
+ "|", "^", "&&", "||", "===", "==", ">=",
+ "<=", "<", ">", "!=", "!=="
+ ],
+ "requireSpacesInFunctionExpression": {
+ "beforeOpeningCurlyBrace": true
+ },
+ "requireCamelCaseOrUpperCaseIdentifiers": true,
+ "requireDotNotation": { "allExcept": ["keywords"] },
+ "requireEarlyReturn": true,
+ "requireLineFeedAtFileEnd": true,
+ "requireSemicolons": true,
+ "requireSpaceAfterBinaryOperators": true,
+ "requireSpacesInConditionalExpression": true,
+ "requireSpaceBeforeObjectValues": true,
+ "requireSpaceBeforeBlockStatements": true,
+ "requireSpacesInForStatement": true,
+
+ "validateIndentation": 2,
+ "validateParameterSeparator": ", ",
+ "validateQuoteMarks": { "mark": "'", "escape": true },
+
+ "disallowSpacesInAnonymousFunctionExpression": {
+ "beforeOpeningRoundBrace": true
+ },
+ "disallowSpacesInFunctionDeclaration": {
+ "beforeOpeningRoundBrace": true
+ },
+ "disallowSpacesInFunctionExpression": {
+ "beforeOpeningRoundBrace": true
+ },
+ "disallowKeywords": ["with"],
+ "disallowMixedSpacesAndTabs": true,
+ "disallowMultipleLineBreaks": true,
+ "disallowNewlineBeforeBlockStatements": true,
+ "disallowSpaceAfterObjectKeys": true,
+ "disallowSpaceAfterPrefixUnaryOperators": true,
+ "disallowSpacesInCallExpression": true,
+ "disallowSpacesInsideArrayBrackets": true,
+ "disallowSpacesInsideParentheses": true,
+ "disallowTrailingWhitespace": true,
+ "disallowUnusedVariables": true,
+
+ "jsDoc": {
+ "checkRedundantAccess": true,
+ "checkTypes": true,
+ "requireNewlineAfterDescription": true,
+ "requireParamDescription": true,
+ "requireParamTypes": true,
+ "requireReturnTypes": true
+ }
+}
diff --git a/views/ngXosViews/serviceGrid/src/vendor/lodash/.travis.yml b/views/ngXosViews/serviceGrid/src/vendor/lodash/.travis.yml
new file mode 100644
index 0000000..161f0cd
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/lodash/.travis.yml
@@ -0,0 +1,77 @@
+language: node_js
+sudo: false
+node_js:
+ - "5"
+env:
+ global:
+ - BIN="node" ISTANBUL=false OPTION=""
+ - SAUCE_LABS=false SAUCE_USERNAME="lodash"
+ - secure: "tg1JFsIFnxzLaTboFPOnm+aJCuMm5+JdhLlESlqg9x3fwro++7KCnwHKLNovhchaPe4otC43ZMB/nfWhDnDm11dKbm/V6HlTkED+dadTsaLxVDg6J+7yK41QhokBPJOxLV78iDaNaAQVYEirAgZ0yn8kFubxmNKV+bpCGQNc9yU="
+ matrix:
+ -
+ - BIN="phantomjs"
+ - ISTANBUL=true
+ - SAUCE_LABS=true
+matrix:
+ include:
+ - node_js: "0.10"
+ env:
+ - node_js: "0.12"
+ env:
+ - node_js: "4"
+ env:
+git:
+ depth: 10
+branches:
+ only:
+ - master
+notifications:
+ webhooks:
+ urls:
+ - https://webhooks.gitter.im/e/4aab6358b0e9aed0b628
+ on_success: change
+ on_failure: always
+before_install:
+ - "nvm use $TRAVIS_NODE_VERSION"
+ - "npm set loglevel error"
+ - "npm set progress false"
+ - "npm i -g npm@\"^2.0.0\""
+ - |
+ PATTERN[0]="|\s*if\s*\(isHostObject\b[\s\S]+?\}(?=\n)|"
+ PATTERN[1]="|\s*if\s*\(enumerate\b[\s\S]+?\};\s*\}|"
+ PATTERN[2]="|\s*while\s*\([^)]+\)\s*\{\s*iteratee\(index\);\s*\}|"
+ PATTERN[3]="|\s*else\s*\{\s*assocSet\(data\b[\s\S]+?\}|"
+ PATTERN[4]="|\bcase\s+(?:dataView|set|map|weakMap)CtorString:.+|g"
+ PATTERN[5]="|\bindex,\s*iterable\)\s*===\s*false\)[^}]+?(break;)|"
+ PATTERN[6]="|\s*if\s*\(\!lodashFunc\)\s*\{\s*return;\s*\}|"
+ PATTERN[7]="|\s*define\([\s\S]+?\);|"
+ PATTERN[8]="|\s*root\._\s*=\s*_;|"
+
+ if [ $ISTANBUL == true ]; then
+ set -e
+ for PTRN in ${PATTERN[@]}; do
+ node ./test/remove.js "$PTRN" ./lodash.js
+ done
+ fi
+ - "git clone --depth=10 --branch=master git://github.com/lodash/lodash-cli ./node_modules/lodash-cli && mkdir $_/node_modules && cd $_ && ln -s ../../../ ./lodash && cd ../ && npm i && cd ../../"
+ - "node ./node_modules/lodash-cli/bin/lodash -o ./dist/lodash.js"
+script:
+ - "[ $ISTANBUL == false ] || istanbul cover -x \"**/vendor/**\" --report lcovonly ./test/test.js -- ./lodash.js"
+ - "[ $ISTANBUL == false ] || [ $TRAVIS_SECURE_ENV_VARS == false ] || (cat ./coverage/lcov.info | coveralls) || true"
+ - "[ $ISTANBUL == false ] || [ $TRAVIS_SECURE_ENV_VARS == false ] || (cat ./coverage/coverage.json | codecov) || true"
+ - "[ $SAUCE_LABS == true ] || [ $ISTANBUL == true ] || cd ./test"
+ - "[ $SAUCE_LABS == true ] || [ $ISTANBUL == true ] || $BIN $OPTION ./test.js ../lodash.js"
+ - "[ $SAUCE_LABS == true ] || [ $ISTANBUL == true ] || [ $TRAVIS_SECURE_ENV_VARS == false ] || $BIN $OPTION ./test.js ../dist/lodash.min.js"
+ - "[ $SAUCE_LABS == false ] || rm -rf ./node_modules/lodash"
+ - "[ $SAUCE_LABS == false ] || ($BIN ./node_modules/lodash-cli/bin/lodash -d -o ./node_modules/lodash/index.js && cd ./node_modules/lodash/ && ln -s ./index.js ./lodash.js && cd ../../)"
+ - "[ $SAUCE_LABS == false ] || $BIN ./node_modules/lodash-cli/bin/lodash core -o ./dist/lodash.core.js"
+ - "[ $SAUCE_LABS == false ] || npm run build"
+ - "[ $SAUCE_LABS == false ] || $BIN ./test/saucelabs.js name=\"lodash tests\" runner=\"test/index.html?build=../dist/lodash.js&noglobals=true\" tags=\"development\""
+ - "[ $SAUCE_LABS == false ] || $BIN ./test/saucelabs.js name=\"lodash tests\" runner=\"test/index.html?build=../dist/lodash.min.js&noglobals=true\" tags=\"production\""
+ - "[ $SAUCE_LABS == false ] || $BIN ./test/saucelabs.js name=\"lodash-fp tests\" runner=\"test/fp.html?noglobals=true\" tags=\"development\""
+ - "[ $SAUCE_LABS == false ] || $BIN ./test/saucelabs.js name=\"underscore tests\" runner=\"test/underscore.html?build=../dist/lodash.js\" tags=\"development,underscore\""
+ - "[ $SAUCE_LABS == false ] || $BIN ./test/saucelabs.js name=\"underscore tests\" runner=\"test/underscore.html?build=../dist/lodash.min.js\" tags=\"production,underscore\""
+ - "[ $SAUCE_LABS == false ] || $BIN ./test/saucelabs.js name=\"backbone tests\" runner=\"test/backbone.html?build=../dist/lodash.js\" tags=\"development,backbone\""
+ - "[ $SAUCE_LABS == false ] || $BIN ./test/saucelabs.js name=\"backbone tests\" runner=\"test/backbone.html?build=../dist/lodash.min.js\" tags=\"production,backbone\""
+ - "[ $SAUCE_LABS == false ] || $BIN ./test/saucelabs.js name=\"backbone tests\" runner=\"test/backbone.html?build=../dist/lodash.core.js\" tags=\"development,backbone\""
+ - "[ $SAUCE_LABS == false ] || $BIN ./test/saucelabs.js name=\"backbone tests\" runner=\"test/backbone.html?build=../dist/lodash.core.min.js\" tags=\"production,backbone\""
diff --git a/views/ngXosViews/serviceGrid/src/vendor/lodash/LICENSE b/views/ngXosViews/serviceGrid/src/vendor/lodash/LICENSE
new file mode 100644
index 0000000..e0c69d5
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/lodash/LICENSE
@@ -0,0 +1,47 @@
+Copyright jQuery Foundation and other contributors <https://jquery.org/>
+
+Based on Underscore.js, copyright Jeremy Ashkenas,
+DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>
+
+This software consists of voluntary contributions made by many
+individuals. For exact contribution history, see the revision history
+available at https://github.com/lodash/lodash
+
+The following license applies to all parts of this software except as
+documented below:
+
+====
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+====
+
+Copyright and related rights for sample code are waived via CC0. Sample
+code is defined as all source code displayed within the prose of the
+documentation.
+
+CC0: http://creativecommons.org/publicdomain/zero/1.0/
+
+====
+
+Files located in the node_modules and vendor directories are externally
+maintained libraries used by this software which have their own
+licenses; we recommend you read them, as their terms may differ from the
+terms above.
diff --git a/views/ngXosViews/serviceGrid/src/vendor/lodash/README.md b/views/ngXosViews/serviceGrid/src/vendor/lodash/README.md
new file mode 100644
index 0000000..fe14559
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/lodash/README.md
@@ -0,0 +1,46 @@
+# lodash v4.11.2
+
+[Site](https://lodash.com/) |
+[Docs](https://lodash.com/docs) |
+[FP Guide](https://github.com/lodash/lodash/wiki/FP-Guide) |
+[Contributing](https://github.com/lodash/lodash/blob/4.11.2/.github/CONTRIBUTING.md) |
+[Wiki](https://github.com/lodash/lodash/wiki "Changelog, Roadmap, etc.") |
+[Code of Conduct](https://jquery.org/conduct/) |
+[Twitter](https://twitter.com/bestiejs) |
+[Chat](https://gitter.im/lodash/lodash)
+
+The [Lodash](https://lodash.com/) library exported as a [UMD](https://github.com/umdjs/umd) module.
+
+Generated using [lodash-cli](https://www.npmjs.com/package/lodash-cli):
+```bash
+$ npm run build
+$ lodash -o ./dist/lodash.js
+$ lodash core -o ./dist/lodash.core.js
+```
+
+## Download
+
+Lodash is released under the [MIT license](https://raw.githubusercontent.com/lodash/lodash/4.11.2/LICENSE) & supports [modern environments](#support).<br>
+Review the [build differences](https://github.com/lodash/lodash/wiki/build-differences) & pick one that’s right for you.
+
+ * [Core build](https://raw.githubusercontent.com/lodash/lodash/4.11.2/dist/lodash.core.js) ([~4 kB gzipped](https://raw.githubusercontent.com/lodash/lodash/4.11.2/dist/lodash.core.min.js))
+ * [Full build](https://raw.githubusercontent.com/lodash/lodash/4.11.2/dist/lodash.js) ([~22 kB gzipped](https://raw.githubusercontent.com/lodash/lodash/4.11.2/dist/lodash.min.js))
+ * [CDN copies](https://www.jsdelivr.com/projects/lodash)
+
+## Why Lodash?
+
+Lodash makes JavaScript easier by taking the hassle out of working with arrays,<br>
+numbers, objects, strings, etc. Lodash’s modular methods are great for:
+
+* Iterating arrays, objects, & strings
+* Manipulating & testing values
+* Creating composite functions
+
+## Module Formats
+
+Lodash is available in a [variety of builds](https://lodash.com/custom-builds) & module formats.
+
+ * [lodash](https://www.npmjs.com/package/lodash) & [per method packages](https://www.npmjs.com/browse/keyword/lodash-modularized)
+ * [lodash-amd](https://www.npmjs.com/package/lodash-amd)
+ * [lodash-es](https://www.npmjs.com/package/lodash-es) & [babel-plugin-lodash](https://www.npmjs.com/package/babel-plugin-lodash)
+ * [lodash/fp](https://github.com/lodash/lodash/tree/4.11.2-npm/fp)
diff --git a/views/ngXosViews/serviceGrid/src/vendor/lodash/dist/lodash.core.js b/views/ngXosViews/serviceGrid/src/vendor/lodash/dist/lodash.core.js
new file mode 100644
index 0000000..73b541b
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/lodash/dist/lodash.core.js
@@ -0,0 +1,3978 @@
+/**
+ * @license
+ * lodash 4.11.2 (Custom Build) <https://lodash.com/>
+ * Build: `lodash core -o ./dist/lodash.core.js`
+ * Copyright jQuery Foundation and other contributors <https://jquery.org/>
+ * Released under MIT license <https://lodash.com/license>
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
+ * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+ */
+;(function() {
+
+ /** Used as a safe reference for `undefined` in pre-ES5 environments. */
+ var undefined;
+
+ /** Used as the semantic version number. */
+ var VERSION = '4.11.2';
+
+ /** Used as the `TypeError` message for "Functions" methods. */
+ var FUNC_ERROR_TEXT = 'Expected a function';
+
+ /** Used to compose bitmasks for wrapper metadata. */
+ var BIND_FLAG = 1,
+ PARTIAL_FLAG = 32;
+
+ /** Used to compose bitmasks for comparison styles. */
+ var UNORDERED_COMPARE_FLAG = 1,
+ PARTIAL_COMPARE_FLAG = 2;
+
+ /** Used as references for various `Number` constants. */
+ var INFINITY = 1 / 0,
+ MAX_SAFE_INTEGER = 9007199254740991;
+
+ /** `Object#toString` result references. */
+ var argsTag = '[object Arguments]',
+ arrayTag = '[object Array]',
+ boolTag = '[object Boolean]',
+ dateTag = '[object Date]',
+ errorTag = '[object Error]',
+ funcTag = '[object Function]',
+ genTag = '[object GeneratorFunction]',
+ numberTag = '[object Number]',
+ objectTag = '[object Object]',
+ regexpTag = '[object RegExp]',
+ stringTag = '[object String]';
+
+ /** Used to match HTML entities and HTML characters. */
+ var reUnescapedHtml = /[&<>"'`]/g,
+ reHasUnescapedHtml = RegExp(reUnescapedHtml.source);
+
+ /** Used to detect unsigned integer values. */
+ var reIsUint = /^(?:0|[1-9]\d*)$/;
+
+ /** Used to map characters to HTML entities. */
+ var htmlEscapes = {
+ '&': '&',
+ '<': '<',
+ '>': '>',
+ '"': '"',
+ "'": ''',
+ '`': '`'
+ };
+
+ /** Used to determine if values are of the language type `Object`. */
+ var objectTypes = {
+ 'function': true,
+ 'object': true
+ };
+
+ /** Detect free variable `exports`. */
+ var freeExports = (objectTypes[typeof exports] && exports && !exports.nodeType)
+ ? exports
+ : undefined;
+
+ /** Detect free variable `module`. */
+ var freeModule = (objectTypes[typeof module] && module && !module.nodeType)
+ ? module
+ : undefined;
+
+ /** Detect the popular CommonJS extension `module.exports`. */
+ var moduleExports = (freeModule && freeModule.exports === freeExports)
+ ? freeExports
+ : undefined;
+
+ /** Detect free variable `global` from Node.js. */
+ var freeGlobal = checkGlobal(freeExports && freeModule && typeof global == 'object' && global);
+
+ /** Detect free variable `self`. */
+ var freeSelf = checkGlobal(objectTypes[typeof self] && self);
+
+ /** Detect free variable `window`. */
+ var freeWindow = checkGlobal(objectTypes[typeof window] && window);
+
+ /** Detect `this` as the global object. */
+ var thisGlobal = checkGlobal(objectTypes[typeof this] && this);
+
+ /**
+ * Used as a reference to the global object.
+ *
+ * The `this` value is used if it's the global object to avoid Greasemonkey's
+ * restricted `window` object, otherwise the `window` object is used.
+ */
+ var root = freeGlobal ||
+ ((freeWindow !== (thisGlobal && thisGlobal.window)) && freeWindow) ||
+ freeSelf || thisGlobal || Function('return this')();
+
+ /*--------------------------------------------------------------------------*/
+
+ /**
+ * Creates a new array concatenating `array` with `other`.
+ *
+ * @private
+ * @param {Array} array The first array to concatenate.
+ * @param {Array} other The second array to concatenate.
+ * @returns {Array} Returns the new concatenated array.
+ */
+ function arrayConcat(array, other) {
+ return arrayPush(copyArray(array), values);
+ }
+
+ /**
+ * Appends the elements of `values` to `array`.
+ *
+ * @private
+ * @param {Array} array The array to modify.
+ * @param {Array} values The values to append.
+ * @returns {Array} Returns `array`.
+ */
+ function arrayPush(array, values) {
+ array.push.apply(array, values);
+ return array;
+ }
+
+ /**
+ * The base implementation of methods like `_.find` and `_.findKey`, without
+ * support for iteratee shorthands, which iterates over `collection` using
+ * `eachFunc`.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to search.
+ * @param {Function} predicate The function invoked per iteration.
+ * @param {Function} eachFunc The function to iterate over `collection`.
+ * @param {boolean} [retKey] Specify returning the key of the found element
+ * instead of the element itself.
+ * @returns {*} Returns the found element or its key, else `undefined`.
+ */
+ function baseFind(collection, predicate, eachFunc, retKey) {
+ var result;
+ eachFunc(collection, function(value, key, collection) {
+ if (predicate(value, key, collection)) {
+ result = retKey ? key : value;
+ return false;
+ }
+ });
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.reduce` and `_.reduceRight`, without support
+ * for iteratee shorthands, which iterates over `collection` using `eachFunc`.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @param {*} accumulator The initial value.
+ * @param {boolean} initAccum Specify using the first or last element of
+ * `collection` as the initial value.
+ * @param {Function} eachFunc The function to iterate over `collection`.
+ * @returns {*} Returns the accumulated value.
+ */
+ function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) {
+ eachFunc(collection, function(value, index, collection) {
+ accumulator = initAccum
+ ? (initAccum = false, value)
+ : iteratee(accumulator, value, index, collection);
+ });
+ return accumulator;
+ }
+
+ /**
+ * The base implementation of `_.times` without support for iteratee shorthands
+ * or max array length checks.
+ *
+ * @private
+ * @param {number} n The number of times to invoke `iteratee`.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Array} Returns the array of results.
+ */
+ function baseTimes(n, iteratee) {
+ var index = -1,
+ result = Array(n);
+
+ while (++index < n) {
+ result[index] = iteratee(index);
+ }
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.values` and `_.valuesIn` which creates an
+ * array of `object` property values corresponding to the property names
+ * of `props`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {Array} props The property names to get values for.
+ * @returns {Object} Returns the array of property values.
+ */
+ function baseValues(object, props) {
+ return baseMap(props, function(key) {
+ return object[key];
+ });
+ }
+
+ /**
+ * Checks if `value` is a global object.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {null|Object} Returns `value` if it's a global object, else `null`.
+ */
+ function checkGlobal(value) {
+ return (value && value.Object === Object) ? value : null;
+ }
+
+ /**
+ * Used by `_.escape` to convert characters to HTML entities.
+ *
+ * @private
+ * @param {string} chr The matched character to escape.
+ * @returns {string} Returns the escaped character.
+ */
+ function escapeHtmlChar(chr) {
+ return htmlEscapes[chr];
+ }
+
+ /**
+ * Checks if `value` is a host object in IE < 9.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a host object, else `false`.
+ */
+ function isHostObject(value) {
+ // Many host objects are `Object` objects that can coerce to strings
+ // despite having improperly defined `toString` methods.
+ var result = false;
+ if (value != null && typeof value.toString != 'function') {
+ try {
+ result = !!(value + '');
+ } catch (e) {}
+ }
+ return result;
+ }
+
+ /**
+ * Converts `iterator` to an array.
+ *
+ * @private
+ * @param {Object} iterator The iterator to convert.
+ * @returns {Array} Returns the converted array.
+ */
+ function iteratorToArray(iterator) {
+ var data,
+ result = [];
+
+ while (!(data = iterator.next()).done) {
+ result.push(data.value);
+ }
+ return result;
+ }
+
+ /*--------------------------------------------------------------------------*/
+
+ /** Used for built-in method references. */
+ var arrayProto = Array.prototype,
+ objectProto = Object.prototype;
+
+ /** Used to check objects for own properties. */
+ var hasOwnProperty = objectProto.hasOwnProperty;
+
+ /** Used to generate unique IDs. */
+ var idCounter = 0;
+
+ /**
+ * Used to resolve the
+ * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
+ * of values.
+ */
+ var objectToString = objectProto.toString;
+
+ /** Used to restore the original `_` reference in `_.noConflict`. */
+ var oldDash = root._;
+
+ /** Built-in value references. */
+ var Reflect = root.Reflect,
+ Symbol = root.Symbol,
+ Uint8Array = root.Uint8Array,
+ enumerate = Reflect ? Reflect.enumerate : undefined,
+ objectCreate = Object.create,
+ propertyIsEnumerable = objectProto.propertyIsEnumerable;
+
+ /* Built-in method references for those with the same name as other `lodash` methods. */
+ var nativeIsFinite = root.isFinite,
+ nativeKeys = Object.keys,
+ nativeMax = Math.max;
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Creates a `lodash` object which wraps `value` to enable implicit method
+ * chain sequences. Methods that operate on and return arrays, collections,
+ * and functions can be chained together. Methods that retrieve a single value
+ * or may return a primitive value will automatically end the chain sequence
+ * and return the unwrapped value. Otherwise, the value must be unwrapped
+ * with `_#value`.
+ *
+ * Explicit chain sequences, which must be unwrapped with `_#value`, may be
+ * enabled using `_.chain`.
+ *
+ * The execution of chained methods is lazy, that is, it's deferred until
+ * `_#value` is implicitly or explicitly called.
+ *
+ * Lazy evaluation allows several methods to support shortcut fusion.
+ * Shortcut fusion is an optimization to merge iteratee calls; this avoids
+ * the creation of intermediate arrays and can greatly reduce the number of
+ * iteratee executions. Sections of a chain sequence qualify for shortcut
+ * fusion if the section is applied to an array of at least `200` elements
+ * and any iteratees accept only one argument. The heuristic for whether a
+ * section qualifies for shortcut fusion is subject to change.
+ *
+ * Chaining is supported in custom builds as long as the `_#value` method is
+ * directly or indirectly included in the build.
+ *
+ * In addition to lodash methods, wrappers have `Array` and `String` methods.
+ *
+ * The wrapper `Array` methods are:
+ * `concat`, `join`, `pop`, `push`, `shift`, `sort`, `splice`, and `unshift`
+ *
+ * The wrapper `String` methods are:
+ * `replace` and `split`
+ *
+ * The wrapper methods that support shortcut fusion are:
+ * `at`, `compact`, `drop`, `dropRight`, `dropWhile`, `filter`, `find`,
+ * `findLast`, `head`, `initial`, `last`, `map`, `reject`, `reverse`, `slice`,
+ * `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, and `toArray`
+ *
+ * The chainable wrapper methods are:
+ * `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`,
+ * `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`,
+ * `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`,
+ * `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`,
+ * `difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`,
+ * `dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`,
+ * `flatMap`, `flatMapDeep`, `flatMapDepth`, `flatten`, `flattenDeep`,
+ * `flattenDepth`, `flip`, `flow`, `flowRight`, `fromPairs`, `functions`,
+ * `functionsIn`, `groupBy`, `initial`, `intersection`, `intersectionBy`,
+ * `intersectionWith`, `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`,
+ * `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`,
+ * `memoize`, `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`,
+ * `nthArg`, `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`,
+ * `overEvery`, `overSome`, `partial`, `partialRight`, `partition`, `pick`,
+ * `pickBy`, `plant`, `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`,
+ * `pullAllWith`, `pullAt`, `push`, `range`, `rangeRight`, `rearg`, `reject`,
+ * `remove`, `rest`, `reverse`, `sampleSize`, `set`, `setWith`, `shuffle`,
+ * `slice`, `sort`, `sortBy`, `splice`, `spread`, `tail`, `take`, `takeRight`,
+ * `takeRightWhile`, `takeWhile`, `tap`, `throttle`, `thru`, `toArray`,
+ * `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, `transform`, `unary`,
+ * `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`,
+ * `unshift`, `unzip`, `unzipWith`, `update`, `updateWith`, `values`,
+ * `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`,
+ * `zipObject`, `zipObjectDeep`, and `zipWith`
+ *
+ * The wrapper methods that are **not** chainable by default are:
+ * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`,
+ * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `deburr`, `divide`, `each`,
+ * `eachRight`, `endsWith`, `eq`, `escape`, `escapeRegExp`, `every`, `find`,
+ * `findIndex`, `findKey`, `findLast`, `findLastIndex`, `findLastKey`, `first`,
+ * `floor`, `forEach`, `forEachRight`, `forIn`, `forInRight`, `forOwn`,
+ * `forOwnRight`, `get`, `gt`, `gte`, `has`, `hasIn`, `head`, `identity`,
+ * `includes`, `indexOf`, `inRange`, `invoke`, `isArguments`, `isArray`,
+ * `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`, `isBoolean`, `isBuffer`,
+ * `isDate`, `isElement`, `isEmpty`, `isEqual`, `isEqualWith`, `isError`,
+ * `isFinite`, `isFunction`, `isInteger`, `isLength`, `isMap`, `isMatch`,
+ * `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`, `isNumber`,
+ * `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`, `isSafeInteger`,
+ * `isSet`, `isString`, `isUndefined`, `isTypedArray`, `isWeakMap`, `isWeakSet`,
+ * `join`, `kebabCase`, `last`, `lastIndexOf`, `lowerCase`, `lowerFirst`,
+ * `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`, `min`, `minBy`, `multiply`,
+ * `noConflict`, `noop`, `now`, `nth`, `pad`, `padEnd`, `padStart`, `parseInt`,
+ * `pop`, `random`, `reduce`, `reduceRight`, `repeat`, `result`, `round`,
+ * `runInContext`, `sample`, `shift`, `size`, `snakeCase`, `some`, `sortedIndex`,
+ * `sortedIndexBy`, `sortedLastIndex`, `sortedLastIndexBy`, `startCase`,
+ * `startsWith`, `subtract`, `sum`, `sumBy`, `template`, `times`, `toInteger`,
+ * `toJSON`, `toLength`, `toLower`, `toNumber`, `toSafeInteger`, `toString`,
+ * `toUpper`, `trim`, `trimEnd`, `trimStart`, `truncate`, `unescape`,
+ * `uniqueId`, `upperCase`, `upperFirst`, `value`, and `words`
+ *
+ * @name _
+ * @constructor
+ * @category Seq
+ * @param {*} value The value to wrap in a `lodash` instance.
+ * @returns {Object} Returns the new `lodash` wrapper instance.
+ * @example
+ *
+ * function square(n) {
+ * return n * n;
+ * }
+ *
+ * var wrapped = _([1, 2, 3]);
+ *
+ * // Returns an unwrapped value.
+ * wrapped.reduce(_.add);
+ * // => 6
+ *
+ * // Returns a wrapped value.
+ * var squares = wrapped.map(square);
+ *
+ * _.isArray(squares);
+ * // => false
+ *
+ * _.isArray(squares.value());
+ * // => true
+ */
+ function lodash(value) {
+ return value instanceof LodashWrapper
+ ? value
+ : new LodashWrapper(value);
+ }
+
+ /**
+ * The base constructor for creating `lodash` wrapper objects.
+ *
+ * @private
+ * @param {*} value The value to wrap.
+ * @param {boolean} [chainAll] Enable explicit method chain sequences.
+ */
+ function LodashWrapper(value, chainAll) {
+ this.__wrapped__ = value;
+ this.__actions__ = [];
+ this.__chain__ = !!chainAll;
+ }
+
+ LodashWrapper.prototype = baseCreate(lodash.prototype);
+ LodashWrapper.prototype.constructor = LodashWrapper;
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Used by `_.defaults` to customize its `_.assignIn` use.
+ *
+ * @private
+ * @param {*} objValue The destination value.
+ * @param {*} srcValue The source value.
+ * @param {string} key The key of the property to assign.
+ * @param {Object} object The parent object of `objValue`.
+ * @returns {*} Returns the value to assign.
+ */
+ function assignInDefaults(objValue, srcValue, key, object) {
+ if (objValue === undefined ||
+ (eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) {
+ return srcValue;
+ }
+ return objValue;
+ }
+
+ /**
+ * Assigns `value` to `key` of `object` if the existing value is not equivalent
+ * using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
+ * for equality comparisons.
+ *
+ * @private
+ * @param {Object} object The object to modify.
+ * @param {string} key The key of the property to assign.
+ * @param {*} value The value to assign.
+ */
+ function assignValue(object, key, value) {
+ var objValue = object[key];
+ if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||
+ (value === undefined && !(key in object))) {
+ object[key] = value;
+ }
+ }
+
+ /**
+ * The base implementation of `_.create` without support for assigning
+ * properties to the created object.
+ *
+ * @private
+ * @param {Object} prototype The object to inherit from.
+ * @returns {Object} Returns the new object.
+ */
+ function baseCreate(proto) {
+ return isObject(proto) ? objectCreate(proto) : {};
+ }
+
+ /**
+ * The base implementation of `_.delay` and `_.defer` which accepts an array
+ * of `func` arguments.
+ *
+ * @private
+ * @param {Function} func The function to delay.
+ * @param {number} wait The number of milliseconds to delay invocation.
+ * @param {Object} args The arguments to provide to `func`.
+ * @returns {number} Returns the timer id.
+ */
+ function baseDelay(func, wait, args) {
+ if (typeof func != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ return setTimeout(function() { func.apply(undefined, args); }, wait);
+ }
+
+ /**
+ * The base implementation of `_.forEach` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Array|Object} Returns `collection`.
+ */
+ var baseEach = createBaseEach(baseForOwn);
+
+ /**
+ * The base implementation of `_.every` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} predicate The function invoked per iteration.
+ * @returns {boolean} Returns `true` if all elements pass the predicate check,
+ * else `false`
+ */
+ function baseEvery(collection, predicate) {
+ var result = true;
+ baseEach(collection, function(value, index, collection) {
+ result = !!predicate(value, index, collection);
+ return result;
+ });
+ return result;
+ }
+
+ /**
+ * The base implementation of methods like `_.max` and `_.min` which accepts a
+ * `comparator` to determine the extremum value.
+ *
+ * @private
+ * @param {Array} array The array to iterate over.
+ * @param {Function} iteratee The iteratee invoked per iteration.
+ * @param {Function} comparator The comparator used to compare values.
+ * @returns {*} Returns the extremum value.
+ */
+ function baseExtremum(array, iteratee, comparator) {
+ var index = -1,
+ length = array.length;
+
+ while (++index < length) {
+ var value = array[index],
+ current = iteratee(value);
+
+ if (current != null && (computed === undefined
+ ? (current === current && !false)
+ : comparator(current, computed)
+ )) {
+ var computed = current,
+ result = value;
+ }
+ }
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.filter` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} predicate The function invoked per iteration.
+ * @returns {Array} Returns the new filtered array.
+ */
+ function baseFilter(collection, predicate) {
+ var result = [];
+ baseEach(collection, function(value, index, collection) {
+ if (predicate(value, index, collection)) {
+ result.push(value);
+ }
+ });
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.flatten` with support for restricting flattening.
+ *
+ * @private
+ * @param {Array} array The array to flatten.
+ * @param {number} depth The maximum recursion depth.
+ * @param {boolean} [predicate=isFlattenable] The function invoked per iteration.
+ * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.
+ * @param {Array} [result=[]] The initial result value.
+ * @returns {Array} Returns the new flattened array.
+ */
+ function baseFlatten(array, depth, predicate, isStrict, result) {
+ var index = -1,
+ length = array.length;
+
+ predicate || (predicate = isFlattenable);
+ result || (result = []);
+
+ while (++index < length) {
+ var value = array[index];
+ if (depth > 0 && predicate(value)) {
+ if (depth > 1) {
+ // Recursively flatten arrays (susceptible to call stack limits).
+ baseFlatten(value, depth - 1, predicate, isStrict, result);
+ } else {
+ arrayPush(result, value);
+ }
+ } else if (!isStrict) {
+ result[result.length] = value;
+ }
+ }
+ return result;
+ }
+
+ /**
+ * The base implementation of `baseForOwn` which iterates over `object`
+ * properties returned by `keysFunc` and invokes `iteratee` for each property.
+ * Iteratee functions may exit iteration early by explicitly returning `false`.
+ *
+ * @private
+ * @param {Object} object The object to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @param {Function} keysFunc The function to get the keys of `object`.
+ * @returns {Object} Returns `object`.
+ */
+ var baseFor = createBaseFor();
+
+ /**
+ * The base implementation of `_.forOwn` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Object} object The object to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Object} Returns `object`.
+ */
+ function baseForOwn(object, iteratee) {
+ return object && baseFor(object, iteratee, keys);
+ }
+
+ /**
+ * The base implementation of `_.functions` which creates an array of
+ * `object` function property names filtered from `props`.
+ *
+ * @private
+ * @param {Object} object The object to inspect.
+ * @param {Array} props The property names to filter.
+ * @returns {Array} Returns the new array of filtered property names.
+ */
+ function baseFunctions(object, props) {
+ return baseFilter(props, function(key) {
+ return isFunction(object[key]);
+ });
+ }
+
+ /**
+ * The base implementation of `_.gt` which doesn't coerce arguments to numbers.
+ *
+ * @private
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @returns {boolean} Returns `true` if `value` is greater than `other`,
+ * else `false`.
+ */
+ function baseGt(value, other) {
+ return value > other;
+ }
+
+ /**
+ * The base implementation of `_.isEqual` which supports partial comparisons
+ * and tracks traversed objects.
+ *
+ * @private
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @param {Function} [customizer] The function to customize comparisons.
+ * @param {boolean} [bitmask] The bitmask of comparison flags.
+ * The bitmask may be composed of the following flags:
+ * 1 - Unordered comparison
+ * 2 - Partial comparison
+ * @param {Object} [stack] Tracks traversed `value` and `other` objects.
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
+ */
+ function baseIsEqual(value, other, customizer, bitmask, stack) {
+ if (value === other) {
+ return true;
+ }
+ if (value == null || other == null || (!isObject(value) && !isObjectLike(other))) {
+ return value !== value && other !== other;
+ }
+ return baseIsEqualDeep(value, other, baseIsEqual, customizer, bitmask, stack);
+ }
+
+ /**
+ * A specialized version of `baseIsEqual` for arrays and objects which performs
+ * deep comparisons and tracks traversed objects enabling objects with circular
+ * references to be compared.
+ *
+ * @private
+ * @param {Object} object The object to compare.
+ * @param {Object} other The other object to compare.
+ * @param {Function} equalFunc The function to determine equivalents of values.
+ * @param {Function} [customizer] The function to customize comparisons.
+ * @param {number} [bitmask] The bitmask of comparison flags. See `baseIsEqual`
+ * for more details.
+ * @param {Object} [stack] Tracks traversed `object` and `other` objects.
+ * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
+ */
+ function baseIsEqualDeep(object, other, equalFunc, customizer, bitmask, stack) {
+ var objIsArr = isArray(object),
+ othIsArr = isArray(other),
+ objTag = arrayTag,
+ othTag = arrayTag;
+
+ if (!objIsArr) {
+ objTag = objectToString.call(object);
+ objTag = objTag == argsTag ? objectTag : objTag;
+ }
+ if (!othIsArr) {
+ othTag = objectToString.call(other);
+ othTag = othTag == argsTag ? objectTag : othTag;
+ }
+ var objIsObj = objTag == objectTag && !isHostObject(object),
+ othIsObj = othTag == objectTag && !isHostObject(other),
+ isSameTag = objTag == othTag;
+
+ stack || (stack = []);
+ var stacked = find(stack, function(entry) {
+ return entry[0] === object;
+ });
+ if (stacked && stacked[1]) {
+ return stacked[1] == other;
+ }
+ stack.push([object, other]);
+ if (isSameTag && !objIsObj) {
+ var result = (objIsArr || isTypedArray(object))
+ ? equalArrays(object, other, equalFunc, customizer, bitmask, stack)
+ : equalByTag(object, other, objTag, equalFunc, customizer, bitmask, stack);
+ stack.pop();
+ return result;
+ }
+ if (!(bitmask & PARTIAL_COMPARE_FLAG)) {
+ var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),
+ othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');
+
+ if (objIsWrapped || othIsWrapped) {
+ var objUnwrapped = objIsWrapped ? object.value() : object,
+ othUnwrapped = othIsWrapped ? other.value() : other;
+
+ var result = equalFunc(objUnwrapped, othUnwrapped, customizer, bitmask, stack);
+ stack.pop();
+ return result;
+ }
+ }
+ if (!isSameTag) {
+ return false;
+ }
+ var result = equalObjects(object, other, equalFunc, customizer, bitmask, stack);
+ stack.pop();
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.iteratee`.
+ *
+ * @private
+ * @param {*} [value=_.identity] The value to convert to an iteratee.
+ * @returns {Function} Returns the iteratee.
+ */
+ function baseIteratee(func) {
+ if (typeof func == 'function') {
+ return func;
+ }
+ if (func == null) {
+ return identity;
+ }
+ return (typeof func == 'object' ? baseMatches : baseProperty)(func);
+ }
+
+ /**
+ * The base implementation of `_.keys` which doesn't skip the constructor
+ * property of prototypes or treat sparse arrays as dense.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property names.
+ */
+ function baseKeys(object) {
+ return nativeKeys(Object(object));
+ }
+
+ /**
+ * The base implementation of `_.keysIn` which doesn't skip the constructor
+ * property of prototypes or treat sparse arrays as dense.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property names.
+ */
+ function baseKeysIn(object) {
+ object = object == null ? object : Object(object);
+
+ var result = [];
+ for (var key in object) {
+ result.push(key);
+ }
+ return result;
+ }
+
+ // Fallback for IE < 9 with es6-shim.
+ if (enumerate && !propertyIsEnumerable.call({ 'valueOf': 1 }, 'valueOf')) {
+ baseKeysIn = function(object) {
+ return iteratorToArray(enumerate(object));
+ };
+ }
+
+ /**
+ * The base implementation of `_.lt` which doesn't coerce arguments to numbers.
+ *
+ * @private
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @returns {boolean} Returns `true` if `value` is less than `other`,
+ * else `false`.
+ */
+ function baseLt(value, other) {
+ return value < other;
+ }
+
+ /**
+ * The base implementation of `_.map` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Array} Returns the new mapped array.
+ */
+ function baseMap(collection, iteratee) {
+ var index = -1,
+ result = isArrayLike(collection) ? Array(collection.length) : [];
+
+ baseEach(collection, function(value, key, collection) {
+ result[++index] = iteratee(value, key, collection);
+ });
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.matches` which doesn't clone `source`.
+ *
+ * @private
+ * @param {Object} source The object of property values to match.
+ * @returns {Function} Returns the new function.
+ */
+ function baseMatches(source) {
+ var props = keys(source);
+ return function(object) {
+ var length = props.length;
+ if (object == null) {
+ return !length;
+ }
+ object = Object(object);
+ while (length--) {
+ var key = props[length];
+ if (!(key in object &&
+ baseIsEqual(source[key], object[key], undefined, UNORDERED_COMPARE_FLAG | PARTIAL_COMPARE_FLAG)
+ )) {
+ return false;
+ }
+ }
+ return true;
+ };
+ }
+
+ /**
+ * The base implementation of `_.pick` without support for individual
+ * property identifiers.
+ *
+ * @private
+ * @param {Object} object The source object.
+ * @param {string[]} props The property identifiers to pick.
+ * @returns {Object} Returns the new object.
+ */
+ function basePick(object, props) {
+ object = Object(object);
+ return reduce(props, function(result, key) {
+ if (key in object) {
+ result[key] = object[key];
+ }
+ return result;
+ }, {});
+ }
+
+ /**
+ * The base implementation of `_.property` without support for deep paths.
+ *
+ * @private
+ * @param {string} key The key of the property to get.
+ * @returns {Function} Returns the new function.
+ */
+ function baseProperty(key) {
+ return function(object) {
+ return object == null ? undefined : object[key];
+ };
+ }
+
+ /**
+ * The base implementation of `_.slice` without an iteratee call guard.
+ *
+ * @private
+ * @param {Array} array The array to slice.
+ * @param {number} [start=0] The start position.
+ * @param {number} [end=array.length] The end position.
+ * @returns {Array} Returns the slice of `array`.
+ */
+ function baseSlice(array, start, end) {
+ var index = -1,
+ length = array.length;
+
+ if (start < 0) {
+ start = -start > length ? 0 : (length + start);
+ }
+ end = end > length ? length : end;
+ if (end < 0) {
+ end += length;
+ }
+ length = start > end ? 0 : ((end - start) >>> 0);
+ start >>>= 0;
+
+ var result = Array(length);
+ while (++index < length) {
+ result[index] = array[index + start];
+ }
+ return result;
+ }
+
+ /**
+ * Copies the values of `source` to `array`.
+ *
+ * @private
+ * @param {Array} source The array to copy values from.
+ * @param {Array} [array=[]] The array to copy values to.
+ * @returns {Array} Returns `array`.
+ */
+ function copyArray(source) {
+ return baseSlice(source, 0, source.length);
+ }
+
+ /**
+ * The base implementation of `_.some` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} predicate The function invoked per iteration.
+ * @returns {boolean} Returns `true` if any element passes the predicate check,
+ * else `false`.
+ */
+ function baseSome(collection, predicate) {
+ var result;
+
+ baseEach(collection, function(value, index, collection) {
+ result = predicate(value, index, collection);
+ return !result;
+ });
+ return !!result;
+ }
+
+ /**
+ * The base implementation of `wrapperValue` which returns the result of
+ * performing a sequence of actions on the unwrapped `value`, where each
+ * successive action is supplied the return value of the previous.
+ *
+ * @private
+ * @param {*} value The unwrapped value.
+ * @param {Array} actions Actions to perform to resolve the unwrapped value.
+ * @returns {*} Returns the resolved value.
+ */
+ function baseWrapperValue(value, actions) {
+ var result = value;
+ return reduce(actions, function(result, action) {
+ return action.func.apply(action.thisArg, arrayPush([result], action.args));
+ }, result);
+ }
+
+ /**
+ * Compares values to sort them in ascending order.
+ *
+ * @private
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @returns {number} Returns the sort order indicator for `value`.
+ */
+ function compareAscending(value, other) {
+ if (value !== other) {
+ var valIsDefined = value !== undefined,
+ valIsNull = value === null,
+ valIsReflexive = value === value,
+ valIsSymbol = false;
+
+ var othIsDefined = other !== undefined,
+ othIsNull = other === null,
+ othIsReflexive = other === other,
+ othIsSymbol = false;
+
+ if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) ||
+ (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) ||
+ (valIsNull && othIsDefined && othIsReflexive) ||
+ (!valIsDefined && othIsReflexive) ||
+ !valIsReflexive) {
+ return 1;
+ }
+ if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) ||
+ (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) ||
+ (othIsNull && valIsDefined && valIsReflexive) ||
+ (!othIsDefined && valIsReflexive) ||
+ !othIsReflexive) {
+ return -1;
+ }
+ }
+ return 0;
+ }
+
+ /**
+ * Copies properties of `source` to `object`.
+ *
+ * @private
+ * @param {Object} source The object to copy properties from.
+ * @param {Array} props The property identifiers to copy.
+ * @param {Object} [object={}] The object to copy properties to.
+ * @param {Function} [customizer] The function to customize copied values.
+ * @returns {Object} Returns `object`.
+ */
+ function copyObject(source, props, object, customizer) {
+ object || (object = {});
+
+ var index = -1,
+ length = props.length;
+
+ while (++index < length) {
+ var key = props[index];
+
+ var newValue = customizer
+ ? customizer(object[key], source[key], key, object, source)
+ : source[key];
+
+ assignValue(object, key, newValue);
+ }
+ return object;
+ }
+
+ /**
+ * Creates a function like `_.assign`.
+ *
+ * @private
+ * @param {Function} assigner The function to assign values.
+ * @returns {Function} Returns the new assigner function.
+ */
+ function createAssigner(assigner) {
+ return rest(function(object, sources) {
+ var index = -1,
+ length = sources.length,
+ customizer = length > 1 ? sources[length - 1] : undefined;
+
+ customizer = typeof customizer == 'function'
+ ? (length--, customizer)
+ : undefined;
+
+ object = Object(object);
+ while (++index < length) {
+ var source = sources[index];
+ if (source) {
+ assigner(object, source, index, customizer);
+ }
+ }
+ return object;
+ });
+ }
+
+ /**
+ * Creates a `baseEach` or `baseEachRight` function.
+ *
+ * @private
+ * @param {Function} eachFunc The function to iterate over a collection.
+ * @param {boolean} [fromRight] Specify iterating from right to left.
+ * @returns {Function} Returns the new base function.
+ */
+ function createBaseEach(eachFunc, fromRight) {
+ return function(collection, iteratee) {
+ if (collection == null) {
+ return collection;
+ }
+ if (!isArrayLike(collection)) {
+ return eachFunc(collection, iteratee);
+ }
+ var length = collection.length,
+ index = fromRight ? length : -1,
+ iterable = Object(collection);
+
+ while ((fromRight ? index-- : ++index < length)) {
+ if (iteratee(iterable[index], index, iterable) === false) {
+ break;
+ }
+ }
+ return collection;
+ };
+ }
+
+ /**
+ * Creates a base function for methods like `_.forIn` and `_.forOwn`.
+ *
+ * @private
+ * @param {boolean} [fromRight] Specify iterating from right to left.
+ * @returns {Function} Returns the new base function.
+ */
+ function createBaseFor(fromRight) {
+ return function(object, iteratee, keysFunc) {
+ var index = -1,
+ iterable = Object(object),
+ props = keysFunc(object),
+ length = props.length;
+
+ while (length--) {
+ var key = props[fromRight ? length : ++index];
+ if (iteratee(iterable[key], key, iterable) === false) {
+ break;
+ }
+ }
+ return object;
+ };
+ }
+
+ /**
+ * Creates a function that produces an instance of `Ctor` regardless of
+ * whether it was invoked as part of a `new` expression or by `call` or `apply`.
+ *
+ * @private
+ * @param {Function} Ctor The constructor to wrap.
+ * @returns {Function} Returns the new wrapped function.
+ */
+ function createCtorWrapper(Ctor) {
+ return function() {
+ // Use a `switch` statement to work with class constructors. See
+ // http://ecma-international.org/ecma-262/6.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist
+ // for more details.
+ var args = arguments;
+ var thisBinding = baseCreate(Ctor.prototype),
+ result = Ctor.apply(thisBinding, args);
+
+ // Mimic the constructor's `return` behavior.
+ // See https://es5.github.io/#x13.2.2 for more details.
+ return isObject(result) ? result : thisBinding;
+ };
+ }
+
+ /**
+ * Creates a function that wraps `func` to invoke it with the `this` binding
+ * of `thisArg` and `partials` prepended to the arguments it receives.
+ *
+ * @private
+ * @param {Function} func The function to wrap.
+ * @param {number} bitmask The bitmask of wrapper flags. See `createWrapper`
+ * for more details.
+ * @param {*} thisArg The `this` binding of `func`.
+ * @param {Array} partials The arguments to prepend to those provided to
+ * the new function.
+ * @returns {Function} Returns the new wrapped function.
+ */
+ function createPartialWrapper(func, bitmask, thisArg, partials) {
+ if (typeof func != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ var isBind = bitmask & BIND_FLAG,
+ Ctor = createCtorWrapper(func);
+
+ function wrapper() {
+ var argsIndex = -1,
+ argsLength = arguments.length,
+ leftIndex = -1,
+ leftLength = partials.length,
+ args = Array(leftLength + argsLength),
+ fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
+
+ while (++leftIndex < leftLength) {
+ args[leftIndex] = partials[leftIndex];
+ }
+ while (argsLength--) {
+ args[leftIndex++] = arguments[++argsIndex];
+ }
+ return fn.apply(isBind ? thisArg : this, args);
+ }
+ return wrapper;
+ }
+
+ /**
+ * A specialized version of `baseIsEqualDeep` for arrays with support for
+ * partial deep comparisons.
+ *
+ * @private
+ * @param {Array} array The array to compare.
+ * @param {Array} other The other array to compare.
+ * @param {Function} equalFunc The function to determine equivalents of values.
+ * @param {Function} customizer The function to customize comparisons.
+ * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual`
+ * for more details.
+ * @param {Object} stack Tracks traversed `array` and `other` objects.
+ * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.
+ */
+ function equalArrays(array, other, equalFunc, customizer, bitmask, stack) {
+ var index = -1,
+ isPartial = bitmask & PARTIAL_COMPARE_FLAG,
+ isUnordered = bitmask & UNORDERED_COMPARE_FLAG,
+ arrLength = array.length,
+ othLength = other.length;
+
+ if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
+ return false;
+ }
+ var result = true;
+
+ // Ignore non-index properties.
+ while (++index < arrLength) {
+ var arrValue = array[index],
+ othValue = other[index];
+
+ var compared;
+ if (compared !== undefined) {
+ if (compared) {
+ continue;
+ }
+ result = false;
+ break;
+ }
+ // Recursively compare arrays (susceptible to call stack limits).
+ if (isUnordered) {
+ if (!baseSome(other, function(othValue) {
+ return arrValue === othValue ||
+ equalFunc(arrValue, othValue, customizer, bitmask, stack);
+ })) {
+ result = false;
+ break;
+ }
+ } else if (!(
+ arrValue === othValue ||
+ equalFunc(arrValue, othValue, customizer, bitmask, stack)
+ )) {
+ result = false;
+ break;
+ }
+ }
+ return result;
+ }
+
+ /**
+ * A specialized version of `baseIsEqualDeep` for comparing objects of
+ * the same `toStringTag`.
+ *
+ * **Note:** This function only supports comparing values with tags of
+ * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
+ *
+ * @private
+ * @param {Object} object The object to compare.
+ * @param {Object} other The other object to compare.
+ * @param {string} tag The `toStringTag` of the objects to compare.
+ * @param {Function} equalFunc The function to determine equivalents of values.
+ * @param {Function} customizer The function to customize comparisons.
+ * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual`
+ * for more details.
+ * @param {Object} stack Tracks traversed `object` and `other` objects.
+ * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
+ */
+ function equalByTag(object, other, tag, equalFunc, customizer, bitmask, stack) {
+ switch (tag) {
+
+ case boolTag:
+ case dateTag:
+ // Coerce dates and booleans to numbers, dates to milliseconds and
+ // booleans to `1` or `0` treating invalid dates coerced to `NaN` as
+ // not equal.
+ return +object == +other;
+
+ case errorTag:
+ return object.name == other.name && object.message == other.message;
+
+ case numberTag:
+ // Treat `NaN` vs. `NaN` as equal.
+ return (object != +object) ? other != +other : object == +other;
+
+ case regexpTag:
+ case stringTag:
+ // Coerce regexes to strings and treat strings, primitives and objects,
+ // as equal. See http://www.ecma-international.org/ecma-262/6.0/#sec-regexp.prototype.tostring
+ // for more details.
+ return object == (other + '');
+
+ }
+ return false;
+ }
+
+ /**
+ * A specialized version of `baseIsEqualDeep` for objects with support for
+ * partial deep comparisons.
+ *
+ * @private
+ * @param {Object} object The object to compare.
+ * @param {Object} other The other object to compare.
+ * @param {Function} equalFunc The function to determine equivalents of values.
+ * @param {Function} customizer The function to customize comparisons.
+ * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual`
+ * for more details.
+ * @param {Object} stack Tracks traversed `object` and `other` objects.
+ * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
+ */
+ function equalObjects(object, other, equalFunc, customizer, bitmask, stack) {
+ var isPartial = bitmask & PARTIAL_COMPARE_FLAG,
+ objProps = keys(object),
+ objLength = objProps.length,
+ othProps = keys(other),
+ othLength = othProps.length;
+
+ if (objLength != othLength && !isPartial) {
+ return false;
+ }
+ var index = objLength;
+ while (index--) {
+ var key = objProps[index];
+ if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {
+ return false;
+ }
+ }
+ var result = true;
+
+ var skipCtor = isPartial;
+ while (++index < objLength) {
+ key = objProps[index];
+ var objValue = object[key],
+ othValue = other[key];
+
+ var compared;
+ // Recursively compare objects (susceptible to call stack limits).
+ if (!(compared === undefined
+ ? (objValue === othValue || equalFunc(objValue, othValue, customizer, bitmask, stack))
+ : compared
+ )) {
+ result = false;
+ break;
+ }
+ skipCtor || (skipCtor = key == 'constructor');
+ }
+ if (result && !skipCtor) {
+ var objCtor = object.constructor,
+ othCtor = other.constructor;
+
+ // Non `Object` object instances with different constructors are not equal.
+ if (objCtor != othCtor &&
+ ('constructor' in object && 'constructor' in other) &&
+ !(typeof objCtor == 'function' && objCtor instanceof objCtor &&
+ typeof othCtor == 'function' && othCtor instanceof othCtor)) {
+ result = false;
+ }
+ }
+ return result;
+ }
+
+ /**
+ * Gets the "length" property value of `object`.
+ *
+ * **Note:** This function is used to avoid a
+ * [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792) that affects
+ * Safari on at least iOS 8.1-8.3 ARM64.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {*} Returns the "length" value.
+ */
+ var getLength = baseProperty('length');
+
+ /**
+ * Creates an array of index keys for `object` values of arrays,
+ * `arguments` objects, and strings, otherwise `null` is returned.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array|null} Returns index keys, else `null`.
+ */
+ function indexKeys(object) {
+ var length = object ? object.length : undefined;
+ if (isLength(length) &&
+ (isArray(object) || isString(object) || isArguments(object))) {
+ return baseTimes(length, String);
+ }
+ return null;
+ }
+
+ /**
+ * Checks if `value` is a flattenable `arguments` object or array.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.
+ */
+ function isFlattenable(value) {
+ return isArrayLikeObject(value) && (isArray(value) || isArguments(value));
+ }
+
+ /**
+ * Checks if `value` is a valid array-like index.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
+ * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
+ */
+ function isIndex(value, length) {
+ length = length == null ? MAX_SAFE_INTEGER : length;
+ return !!length &&
+ (typeof value == 'number' || reIsUint.test(value)) &&
+ (value > -1 && value % 1 == 0 && value < length);
+ }
+
+ /**
+ * Checks if `value` is likely a prototype object.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
+ */
+ function isPrototype(value) {
+ var Ctor = value && value.constructor,
+ proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;
+
+ return value === proto;
+ }
+
+ /**
+ * Converts `value` to a string key if it's not a string or symbol.
+ *
+ * @private
+ * @param {*} value The value to inspect.
+ * @returns {string|symbol} Returns the key.
+ */
+ var toKey = String;
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Creates an array with all falsey values removed. The values `false`, `null`,
+ * `0`, `""`, `undefined`, and `NaN` are falsey.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {Array} array The array to compact.
+ * @returns {Array} Returns the new array of filtered values.
+ * @example
+ *
+ * _.compact([0, 1, false, 2, '', 3]);
+ * // => [1, 2, 3]
+ */
+ function compact(array) {
+ return baseFilter(array, Boolean);
+ }
+
+ /**
+ * Creates a new array concatenating `array` with any additional arrays
+ * and/or values.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to concatenate.
+ * @param {...*} [values] The values to concatenate.
+ * @returns {Array} Returns the new concatenated array.
+ * @example
+ *
+ * var array = [1];
+ * var other = _.concat(array, 2, [3], [[4]]);
+ *
+ * console.log(other);
+ * // => [1, 2, 3, [4]]
+ *
+ * console.log(array);
+ * // => [1]
+ */
+ function concat() {
+ var length = arguments.length,
+ array = castArray(arguments[0]);
+
+ if (length < 2) {
+ return length ? copyArray(array) : [];
+ }
+ var args = Array(length - 1);
+ while (length--) {
+ args[length - 1] = arguments[length];
+ }
+ return arrayConcat(array, baseFlatten(args, 1));
+ }
+
+ /**
+ * Flattens `array` a single level deep.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {Array} array The array to flatten.
+ * @returns {Array} Returns the new flattened array.
+ * @example
+ *
+ * _.flatten([1, [2, [3, [4]], 5]]);
+ * // => [1, 2, [3, [4]], 5]
+ */
+ function flatten(array) {
+ var length = array ? array.length : 0;
+ return length ? baseFlatten(array, 1) : [];
+ }
+
+ /**
+ * Recursively flattens `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Array
+ * @param {Array} array The array to flatten.
+ * @returns {Array} Returns the new flattened array.
+ * @example
+ *
+ * _.flattenDeep([1, [2, [3, [4]], 5]]);
+ * // => [1, 2, 3, 4, 5]
+ */
+ function flattenDeep(array) {
+ var length = array ? array.length : 0;
+ return length ? baseFlatten(array, INFINITY) : [];
+ }
+
+ /**
+ * Gets the first element of `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @alias first
+ * @category Array
+ * @param {Array} array The array to query.
+ * @returns {*} Returns the first element of `array`.
+ * @example
+ *
+ * _.head([1, 2, 3]);
+ * // => 1
+ *
+ * _.head([]);
+ * // => undefined
+ */
+ function head(array) {
+ return (array && array.length) ? array[0] : undefined;
+ }
+
+ /**
+ * Gets the index at which the first occurrence of `value` is found in `array`
+ * using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
+ * for equality comparisons. If `fromIndex` is negative, it's used as the
+ * offset from the end of `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {Array} array The array to search.
+ * @param {*} value The value to search for.
+ * @param {number} [fromIndex=0] The index to search from.
+ * @returns {number} Returns the index of the matched value, else `-1`.
+ * @example
+ *
+ * _.indexOf([1, 2, 1, 2], 2);
+ * // => 1
+ *
+ * // Search from the `fromIndex`.
+ * _.indexOf([1, 2, 1, 2], 2, 2);
+ * // => 3
+ */
+ function indexOf(array, value, fromIndex) {
+ var length = array ? array.length : 0;
+ if (typeof fromIndex == 'number') {
+ fromIndex = fromIndex < 0 ? nativeMax(length + fromIndex, 0) : fromIndex;
+ } else {
+ fromIndex = 0;
+ }
+ var index = (fromIndex || 0) - 1,
+ isReflexive = value === value;
+
+ while (++index < length) {
+ var other = array[index];
+ if ((isReflexive ? other === value : other !== other)) {
+ return index;
+ }
+ }
+ return -1;
+ }
+
+ /**
+ * Gets the last element of `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {Array} array The array to query.
+ * @returns {*} Returns the last element of `array`.
+ * @example
+ *
+ * _.last([1, 2, 3]);
+ * // => 3
+ */
+ function last(array) {
+ var length = array ? array.length : 0;
+ return length ? array[length - 1] : undefined;
+ }
+
+ /**
+ * Creates a slice of `array` from `start` up to, but not including, `end`.
+ *
+ * **Note:** This method is used instead of
+ * [`Array#slice`](https://mdn.io/Array/slice) to ensure dense arrays are
+ * returned.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Array
+ * @param {Array} array The array to slice.
+ * @param {number} [start=0] The start position.
+ * @param {number} [end=array.length] The end position.
+ * @returns {Array} Returns the slice of `array`.
+ */
+ function slice(array, start, end) {
+ var length = array ? array.length : 0;
+ start = start == null ? 0 : +start;
+ end = end === undefined ? length : +end;
+ return length ? baseSlice(array, start, end) : [];
+ }
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Creates a `lodash` wrapper instance that wraps `value` with explicit method
+ * chain sequences enabled. The result of such sequences must be unwrapped
+ * with `_#value`.
+ *
+ * @static
+ * @memberOf _
+ * @since 1.3.0
+ * @category Seq
+ * @param {*} value The value to wrap.
+ * @returns {Object} Returns the new `lodash` wrapper instance.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'age': 36 },
+ * { 'user': 'fred', 'age': 40 },
+ * { 'user': 'pebbles', 'age': 1 }
+ * ];
+ *
+ * var youngest = _
+ * .chain(users)
+ * .sortBy('age')
+ * .map(function(o) {
+ * return o.user + ' is ' + o.age;
+ * })
+ * .head()
+ * .value();
+ * // => 'pebbles is 1'
+ */
+ function chain(value) {
+ var result = lodash(value);
+ result.__chain__ = true;
+ return result;
+ }
+
+ /**
+ * This method invokes `interceptor` and returns `value`. The interceptor
+ * is invoked with one argument; (value). The purpose of this method is to
+ * "tap into" a method chain sequence in order to modify intermediate results.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Seq
+ * @param {*} value The value to provide to `interceptor`.
+ * @param {Function} interceptor The function to invoke.
+ * @returns {*} Returns `value`.
+ * @example
+ *
+ * _([1, 2, 3])
+ * .tap(function(array) {
+ * // Mutate input array.
+ * array.pop();
+ * })
+ * .reverse()
+ * .value();
+ * // => [2, 1]
+ */
+ function tap(value, interceptor) {
+ interceptor(value);
+ return value;
+ }
+
+ /**
+ * This method is like `_.tap` except that it returns the result of `interceptor`.
+ * The purpose of this method is to "pass thru" values replacing intermediate
+ * results in a method chain sequence.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Seq
+ * @param {*} value The value to provide to `interceptor`.
+ * @param {Function} interceptor The function to invoke.
+ * @returns {*} Returns the result of `interceptor`.
+ * @example
+ *
+ * _(' abc ')
+ * .chain()
+ * .trim()
+ * .thru(function(value) {
+ * return [value];
+ * })
+ * .value();
+ * // => ['abc']
+ */
+ function thru(value, interceptor) {
+ return interceptor(value);
+ }
+
+ /**
+ * Creates a `lodash` wrapper instance with explicit method chain sequences enabled.
+ *
+ * @name chain
+ * @memberOf _
+ * @since 0.1.0
+ * @category Seq
+ * @returns {Object} Returns the new `lodash` wrapper instance.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'age': 36 },
+ * { 'user': 'fred', 'age': 40 }
+ * ];
+ *
+ * // A sequence without explicit chaining.
+ * _(users).head();
+ * // => { 'user': 'barney', 'age': 36 }
+ *
+ * // A sequence with explicit chaining.
+ * _(users)
+ * .chain()
+ * .head()
+ * .pick('user')
+ * .value();
+ * // => { 'user': 'barney' }
+ */
+ function wrapperChain() {
+ return chain(this);
+ }
+
+ /**
+ * Executes the chain sequence to resolve the unwrapped value.
+ *
+ * @name value
+ * @memberOf _
+ * @since 0.1.0
+ * @alias toJSON, valueOf
+ * @category Seq
+ * @returns {*} Returns the resolved unwrapped value.
+ * @example
+ *
+ * _([1, 2, 3]).value();
+ * // => [1, 2, 3]
+ */
+ function wrapperValue() {
+ return baseWrapperValue(this.__wrapped__, this.__actions__);
+ }
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Checks if `predicate` returns truthy for **all** elements of `collection`.
+ * Iteration is stopped once `predicate` returns falsey. The predicate is
+ * invoked with three arguments: (value, index|key, collection).
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Array|Function|Object|string} [predicate=_.identity]
+ * The function invoked per iteration.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {boolean} Returns `true` if all elements pass the predicate check,
+ * else `false`.
+ * @example
+ *
+ * _.every([true, 1, null, 'yes'], Boolean);
+ * // => false
+ *
+ * var users = [
+ * { 'user': 'barney', 'age': 36, 'active': false },
+ * { 'user': 'fred', 'age': 40, 'active': false }
+ * ];
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.every(users, { 'user': 'barney', 'active': false });
+ * // => false
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.every(users, ['active', false]);
+ * // => true
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.every(users, 'active');
+ * // => false
+ */
+ function every(collection, predicate, guard) {
+ predicate = guard ? undefined : predicate;
+ return baseEvery(collection, baseIteratee(predicate));
+ }
+
+ /**
+ * Iterates over elements of `collection`, returning an array of all elements
+ * `predicate` returns truthy for. The predicate is invoked with three
+ * arguments: (value, index|key, collection).
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Array|Function|Object|string} [predicate=_.identity]
+ * The function invoked per iteration.
+ * @returns {Array} Returns the new filtered array.
+ * @see _.reject
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'age': 36, 'active': true },
+ * { 'user': 'fred', 'age': 40, 'active': false }
+ * ];
+ *
+ * _.filter(users, function(o) { return !o.active; });
+ * // => objects for ['fred']
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.filter(users, { 'age': 36, 'active': true });
+ * // => objects for ['barney']
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.filter(users, ['active', false]);
+ * // => objects for ['fred']
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.filter(users, 'active');
+ * // => objects for ['barney']
+ */
+ function filter(collection, predicate) {
+ return baseFilter(collection, baseIteratee(predicate));
+ }
+
+ /**
+ * Iterates over elements of `collection`, returning the first element
+ * `predicate` returns truthy for. The predicate is invoked with three
+ * arguments: (value, index|key, collection).
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to search.
+ * @param {Array|Function|Object|string} [predicate=_.identity]
+ * The function invoked per iteration.
+ * @returns {*} Returns the matched element, else `undefined`.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'age': 36, 'active': true },
+ * { 'user': 'fred', 'age': 40, 'active': false },
+ * { 'user': 'pebbles', 'age': 1, 'active': true }
+ * ];
+ *
+ * _.find(users, function(o) { return o.age < 40; });
+ * // => object for 'barney'
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.find(users, { 'age': 1, 'active': true });
+ * // => object for 'pebbles'
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.find(users, ['active', false]);
+ * // => object for 'fred'
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.find(users, 'active');
+ * // => object for 'barney'
+ */
+ function find(collection, predicate) {
+ return baseFind(collection, baseIteratee(predicate), baseEach);
+ }
+
+ /**
+ * Iterates over elements of `collection` and invokes `iteratee` for each element.
+ * The iteratee is invoked with three arguments: (value, index|key, collection).
+ * Iteratee functions may exit iteration early by explicitly returning `false`.
+ *
+ * **Note:** As with other "Collections" methods, objects with a "length"
+ * property are iterated like arrays. To avoid this behavior use `_.forIn`
+ * or `_.forOwn` for object iteration.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @alias each
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @returns {Array|Object} Returns `collection`.
+ * @see _.forEachRight
+ * @example
+ *
+ * _([1, 2]).forEach(function(value) {
+ * console.log(value);
+ * });
+ * // => Logs `1` then `2`.
+ *
+ * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) {
+ * console.log(key);
+ * });
+ * // => Logs 'a' then 'b' (iteration order is not guaranteed).
+ */
+ function forEach(collection, iteratee) {
+ return baseEach(collection, baseIteratee(iteratee));
+ }
+
+ /**
+ * Creates an array of values by running each element in `collection` thru
+ * `iteratee`. The iteratee is invoked with three arguments:
+ * (value, index|key, collection).
+ *
+ * Many lodash methods are guarded to work as iteratees for methods like
+ * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`.
+ *
+ * The guarded methods are:
+ * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`,
+ * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`,
+ * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`,
+ * `template`, `trim`, `trimEnd`, `trimStart`, and `words`
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Array|Function|Object|string} [iteratee=_.identity]
+ * The function invoked per iteration.
+ * @returns {Array} Returns the new mapped array.
+ * @example
+ *
+ * function square(n) {
+ * return n * n;
+ * }
+ *
+ * _.map([4, 8], square);
+ * // => [16, 64]
+ *
+ * _.map({ 'a': 4, 'b': 8 }, square);
+ * // => [16, 64] (iteration order is not guaranteed)
+ *
+ * var users = [
+ * { 'user': 'barney' },
+ * { 'user': 'fred' }
+ * ];
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.map(users, 'user');
+ * // => ['barney', 'fred']
+ */
+ function map(collection, iteratee) {
+ return baseMap(collection, baseIteratee(iteratee));
+ }
+
+ /**
+ * Reduces `collection` to a value which is the accumulated result of running
+ * each element in `collection` thru `iteratee`, where each successive
+ * invocation is supplied the return value of the previous. If `accumulator`
+ * is not given, the first element of `collection` is used as the initial
+ * value. The iteratee is invoked with four arguments:
+ * (accumulator, value, index|key, collection).
+ *
+ * Many lodash methods are guarded to work as iteratees for methods like
+ * `_.reduce`, `_.reduceRight`, and `_.transform`.
+ *
+ * The guarded methods are:
+ * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`,
+ * and `sortBy`
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @param {*} [accumulator] The initial value.
+ * @returns {*} Returns the accumulated value.
+ * @see _.reduceRight
+ * @example
+ *
+ * _.reduce([1, 2], function(sum, n) {
+ * return sum + n;
+ * }, 0);
+ * // => 3
+ *
+ * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {
+ * (result[value] || (result[value] = [])).push(key);
+ * return result;
+ * }, {});
+ * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed)
+ */
+ function reduce(collection, iteratee, accumulator) {
+ return baseReduce(collection, baseIteratee(iteratee), accumulator, arguments.length < 3, baseEach);
+ }
+
+ /**
+ * Gets the size of `collection` by returning its length for array-like
+ * values or the number of own enumerable string keyed properties for objects.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to inspect.
+ * @returns {number} Returns the collection size.
+ * @example
+ *
+ * _.size([1, 2, 3]);
+ * // => 3
+ *
+ * _.size({ 'a': 1, 'b': 2 });
+ * // => 2
+ *
+ * _.size('pebbles');
+ * // => 7
+ */
+ function size(collection) {
+ if (collection == null) {
+ return 0;
+ }
+ collection = isArrayLike(collection) ? collection : keys(collection);
+ return collection.length;
+ }
+
+ /**
+ * Checks if `predicate` returns truthy for **any** element of `collection`.
+ * Iteration is stopped once `predicate` returns truthy. The predicate is
+ * invoked with three arguments: (value, index|key, collection).
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Array|Function|Object|string} [predicate=_.identity]
+ * The function invoked per iteration.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {boolean} Returns `true` if any element passes the predicate check,
+ * else `false`.
+ * @example
+ *
+ * _.some([null, 0, 'yes', false], Boolean);
+ * // => true
+ *
+ * var users = [
+ * { 'user': 'barney', 'active': true },
+ * { 'user': 'fred', 'active': false }
+ * ];
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.some(users, { 'user': 'barney', 'active': false });
+ * // => false
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.some(users, ['active', false]);
+ * // => true
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.some(users, 'active');
+ * // => true
+ */
+ function some(collection, predicate, guard) {
+ predicate = guard ? undefined : predicate;
+ return baseSome(collection, baseIteratee(predicate));
+ }
+
+ /**
+ * Creates an array of elements, sorted in ascending order by the results of
+ * running each element in a collection thru each iteratee. This method
+ * performs a stable sort, that is, it preserves the original sort order of
+ * equal elements. The iteratees are invoked with one argument: (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {...(Array|Array[]|Function|Function[]|Object|Object[]|string|string[])}
+ * [iteratees=[_.identity]] The iteratees to sort by.
+ * @returns {Array} Returns the new sorted array.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'fred', 'age': 48 },
+ * { 'user': 'barney', 'age': 36 },
+ * { 'user': 'fred', 'age': 40 },
+ * { 'user': 'barney', 'age': 34 }
+ * ];
+ *
+ * _.sortBy(users, function(o) { return o.user; });
+ * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]
+ *
+ * _.sortBy(users, ['user', 'age']);
+ * // => objects for [['barney', 34], ['barney', 36], ['fred', 40], ['fred', 48]]
+ *
+ * _.sortBy(users, 'user', function(o) {
+ * return Math.floor(o.age / 10);
+ * });
+ * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]
+ */
+ function sortBy(collection, iteratee) {
+ var index = 0;
+ iteratee = baseIteratee(iteratee);
+
+ return baseMap(baseMap(collection, function(value, key, collection) {
+ return { 'value': value, 'index': index++, 'criteria': iteratee(value, key, collection) };
+ }).sort(function(object, other) {
+ return compareAscending(object.criteria, other.criteria) || (object.index - other.index);
+ }), baseProperty('value'));
+ }
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Creates a function that invokes `func`, with the `this` binding and arguments
+ * of the created function, while it's called less than `n` times. Subsequent
+ * calls to the created function return the result of the last `func` invocation.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Function
+ * @param {number} n The number of calls at which `func` is no longer invoked.
+ * @param {Function} func The function to restrict.
+ * @returns {Function} Returns the new restricted function.
+ * @example
+ *
+ * jQuery(element).on('click', _.before(5, addContactToList));
+ * // => allows adding up to 4 contacts to the list
+ */
+ function before(n, func) {
+ var result;
+ if (typeof func != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ n = toInteger(n);
+ return function() {
+ if (--n > 0) {
+ result = func.apply(this, arguments);
+ }
+ if (n <= 1) {
+ func = undefined;
+ }
+ return result;
+ };
+ }
+
+ /**
+ * Creates a function that invokes `func` with the `this` binding of `thisArg`
+ * and `partials` prepended to the arguments it receives.
+ *
+ * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds,
+ * may be used as a placeholder for partially applied arguments.
+ *
+ * **Note:** Unlike native `Function#bind` this method doesn't set the "length"
+ * property of bound functions.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Function
+ * @param {Function} func The function to bind.
+ * @param {*} thisArg The `this` binding of `func`.
+ * @param {...*} [partials] The arguments to be partially applied.
+ * @returns {Function} Returns the new bound function.
+ * @example
+ *
+ * var greet = function(greeting, punctuation) {
+ * return greeting + ' ' + this.user + punctuation;
+ * };
+ *
+ * var object = { 'user': 'fred' };
+ *
+ * var bound = _.bind(greet, object, 'hi');
+ * bound('!');
+ * // => 'hi fred!'
+ *
+ * // Bound with placeholders.
+ * var bound = _.bind(greet, object, _, '!');
+ * bound('hi');
+ * // => 'hi fred!'
+ */
+ var bind = rest(function(func, thisArg, partials) {
+ return createPartialWrapper(func, BIND_FLAG | PARTIAL_FLAG, thisArg, partials);
+ });
+
+ /**
+ * Defers invoking the `func` until the current call stack has cleared. Any
+ * additional arguments are provided to `func` when it's invoked.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Function
+ * @param {Function} func The function to defer.
+ * @param {...*} [args] The arguments to invoke `func` with.
+ * @returns {number} Returns the timer id.
+ * @example
+ *
+ * _.defer(function(text) {
+ * console.log(text);
+ * }, 'deferred');
+ * // => Logs 'deferred' after one or more milliseconds.
+ */
+ var defer = rest(function(func, args) {
+ return baseDelay(func, 1, args);
+ });
+
+ /**
+ * Invokes `func` after `wait` milliseconds. Any additional arguments are
+ * provided to `func` when it's invoked.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Function
+ * @param {Function} func The function to delay.
+ * @param {number} wait The number of milliseconds to delay invocation.
+ * @param {...*} [args] The arguments to invoke `func` with.
+ * @returns {number} Returns the timer id.
+ * @example
+ *
+ * _.delay(function(text) {
+ * console.log(text);
+ * }, 1000, 'later');
+ * // => Logs 'later' after one second.
+ */
+ var delay = rest(function(func, wait, args) {
+ return baseDelay(func, toNumber(wait) || 0, args);
+ });
+
+ /**
+ * Creates a function that negates the result of the predicate `func`. The
+ * `func` predicate is invoked with the `this` binding and arguments of the
+ * created function.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Function
+ * @param {Function} predicate The predicate to negate.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * function isEven(n) {
+ * return n % 2 == 0;
+ * }
+ *
+ * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven));
+ * // => [1, 3, 5]
+ */
+ function negate(predicate) {
+ if (typeof predicate != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ return function() {
+ return !predicate.apply(this, arguments);
+ };
+ }
+
+ /**
+ * Creates a function that is restricted to invoking `func` once. Repeat calls
+ * to the function return the value of the first invocation. The `func` is
+ * invoked with the `this` binding and arguments of the created function.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Function
+ * @param {Function} func The function to restrict.
+ * @returns {Function} Returns the new restricted function.
+ * @example
+ *
+ * var initialize = _.once(createApplication);
+ * initialize();
+ * initialize();
+ * // `initialize` invokes `createApplication` once
+ */
+ function once(func) {
+ return before(2, func);
+ }
+
+ /**
+ * Creates a function that invokes `func` with the `this` binding of the
+ * created function and arguments from `start` and beyond provided as
+ * an array.
+ *
+ * **Note:** This method is based on the
+ * [rest parameter](https://mdn.io/rest_parameters).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Function
+ * @param {Function} func The function to apply a rest parameter to.
+ * @param {number} [start=func.length-1] The start position of the rest parameter.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * var say = _.rest(function(what, names) {
+ * return what + ' ' + _.initial(names).join(', ') +
+ * (_.size(names) > 1 ? ', & ' : '') + _.last(names);
+ * });
+ *
+ * say('hello', 'fred', 'barney', 'pebbles');
+ * // => 'hello fred, barney, & pebbles'
+ */
+ function rest(func, start) {
+ if (typeof func != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ start = nativeMax(start === undefined ? (func.length - 1) : toInteger(start), 0);
+ return function() {
+ var args = arguments,
+ index = -1,
+ length = nativeMax(args.length - start, 0),
+ array = Array(length);
+
+ while (++index < length) {
+ array[index] = args[start + index];
+ }
+ var otherArgs = Array(start + 1);
+ index = -1;
+ while (++index < start) {
+ otherArgs[index] = args[index];
+ }
+ otherArgs[start] = array;
+ return func.apply(this, otherArgs);
+ };
+ }
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Casts `value` as an array if it's not one.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.4.0
+ * @category Lang
+ * @param {*} value The value to inspect.
+ * @returns {Array} Returns the cast array.
+ * @example
+ *
+ * _.castArray(1);
+ * // => [1]
+ *
+ * _.castArray({ 'a': 1 });
+ * // => [{ 'a': 1 }]
+ *
+ * _.castArray('abc');
+ * // => ['abc']
+ *
+ * _.castArray(null);
+ * // => [null]
+ *
+ * _.castArray(undefined);
+ * // => [undefined]
+ *
+ * _.castArray();
+ * // => []
+ *
+ * var array = [1, 2, 3];
+ * console.log(_.castArray(array) === array);
+ * // => true
+ */
+ function castArray() {
+ if (!arguments.length) {
+ return [];
+ }
+ var value = arguments[0];
+ return isArray(value) ? value : [value];
+ }
+
+ /**
+ * Creates a shallow clone of `value`.
+ *
+ * **Note:** This method is loosely based on the
+ * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm)
+ * and supports cloning arrays, array buffers, booleans, date objects, maps,
+ * numbers, `Object` objects, regexes, sets, strings, symbols, and typed
+ * arrays. The own enumerable properties of `arguments` objects are cloned
+ * as plain objects. An empty object is returned for uncloneable values such
+ * as error objects, functions, DOM nodes, and WeakMaps.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to clone.
+ * @returns {*} Returns the cloned value.
+ * @see _.cloneDeep
+ * @example
+ *
+ * var objects = [{ 'a': 1 }, { 'b': 2 }];
+ *
+ * var shallow = _.clone(objects);
+ * console.log(shallow[0] === objects[0]);
+ * // => true
+ */
+ function clone(value) {
+ if (!isObject(value)) {
+ return value;
+ }
+ return isArray(value) ? copyArray(value) : copyObject(value, keys(value));
+ }
+
+ /**
+ * Performs a
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
+ * comparison between two values to determine if they are equivalent.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
+ * @example
+ *
+ * var object = { 'user': 'fred' };
+ * var other = { 'user': 'fred' };
+ *
+ * _.eq(object, object);
+ * // => true
+ *
+ * _.eq(object, other);
+ * // => false
+ *
+ * _.eq('a', 'a');
+ * // => true
+ *
+ * _.eq('a', Object('a'));
+ * // => false
+ *
+ * _.eq(NaN, NaN);
+ * // => true
+ */
+ function eq(value, other) {
+ return value === other || (value !== value && other !== other);
+ }
+
+ /**
+ * Checks if `value` is likely an `arguments` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is correctly classified,
+ * else `false`.
+ * @example
+ *
+ * _.isArguments(function() { return arguments; }());
+ * // => true
+ *
+ * _.isArguments([1, 2, 3]);
+ * // => false
+ */
+ function isArguments(value) {
+ // Safari 8.1 incorrectly makes `arguments.callee` enumerable in strict mode.
+ return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') &&
+ (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag);
+ }
+
+ /**
+ * Checks if `value` is classified as an `Array` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @type {Function}
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is correctly classified,
+ * else `false`.
+ * @example
+ *
+ * _.isArray([1, 2, 3]);
+ * // => true
+ *
+ * _.isArray(document.body.children);
+ * // => false
+ *
+ * _.isArray('abc');
+ * // => false
+ *
+ * _.isArray(_.noop);
+ * // => false
+ */
+ var isArray = Array.isArray;
+
+ /**
+ * Checks if `value` is array-like. A value is considered array-like if it's
+ * not a function and has a `value.length` that's an integer greater than or
+ * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
+ * @example
+ *
+ * _.isArrayLike([1, 2, 3]);
+ * // => true
+ *
+ * _.isArrayLike(document.body.children);
+ * // => true
+ *
+ * _.isArrayLike('abc');
+ * // => true
+ *
+ * _.isArrayLike(_.noop);
+ * // => false
+ */
+ function isArrayLike(value) {
+ return value != null && isLength(getLength(value)) && !isFunction(value);
+ }
+
+ /**
+ * This method is like `_.isArrayLike` except that it also checks if `value`
+ * is an object.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an array-like object,
+ * else `false`.
+ * @example
+ *
+ * _.isArrayLikeObject([1, 2, 3]);
+ * // => true
+ *
+ * _.isArrayLikeObject(document.body.children);
+ * // => true
+ *
+ * _.isArrayLikeObject('abc');
+ * // => false
+ *
+ * _.isArrayLikeObject(_.noop);
+ * // => false
+ */
+ function isArrayLikeObject(value) {
+ return isObjectLike(value) && isArrayLike(value);
+ }
+
+ /**
+ * Checks if `value` is classified as a boolean primitive or object.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is correctly classified,
+ * else `false`.
+ * @example
+ *
+ * _.isBoolean(false);
+ * // => true
+ *
+ * _.isBoolean(null);
+ * // => false
+ */
+ function isBoolean(value) {
+ return value === true || value === false ||
+ (isObjectLike(value) && objectToString.call(value) == boolTag);
+ }
+
+ /**
+ * Checks if `value` is classified as a `Date` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is correctly classified,
+ * else `false`.
+ * @example
+ *
+ * _.isDate(new Date);
+ * // => true
+ *
+ * _.isDate('Mon April 23 2012');
+ * // => false
+ */
+ function isDate(value) {
+ return isObjectLike(value) && objectToString.call(value) == dateTag;
+ }
+
+ /**
+ * Checks if `value` is an empty object, collection, map, or set.
+ *
+ * Objects are considered empty if they have no own enumerable string keyed
+ * properties.
+ *
+ * Array-like values such as `arguments` objects, arrays, buffers, strings, or
+ * jQuery-like collections are considered empty if they have a `length` of `0`.
+ * Similarly, maps and sets are considered empty if they have a `size` of `0`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is empty, else `false`.
+ * @example
+ *
+ * _.isEmpty(null);
+ * // => true
+ *
+ * _.isEmpty(true);
+ * // => true
+ *
+ * _.isEmpty(1);
+ * // => true
+ *
+ * _.isEmpty([1, 2, 3]);
+ * // => false
+ *
+ * _.isEmpty({ 'a': 1 });
+ * // => false
+ */
+ function isEmpty(value) {
+ if (isArrayLike(value) &&
+ (isArray(value) || isString(value) ||
+ isFunction(value.splice) || isArguments(value))) {
+ return !value.length;
+ }
+ return !keys(value).length;
+ }
+
+ /**
+ * Performs a deep comparison between two values to determine if they are
+ * equivalent.
+ *
+ * **Note:** This method supports comparing arrays, array buffers, booleans,
+ * date objects, error objects, maps, numbers, `Object` objects, regexes,
+ * sets, strings, symbols, and typed arrays. `Object` objects are compared
+ * by their own, not inherited, enumerable properties. Functions and DOM
+ * nodes are **not** supported.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @returns {boolean} Returns `true` if the values are equivalent,
+ * else `false`.
+ * @example
+ *
+ * var object = { 'user': 'fred' };
+ * var other = { 'user': 'fred' };
+ *
+ * _.isEqual(object, other);
+ * // => true
+ *
+ * object === other;
+ * // => false
+ */
+ function isEqual(value, other) {
+ return baseIsEqual(value, other);
+ }
+
+ /**
+ * Checks if `value` is a finite primitive number.
+ *
+ * **Note:** This method is based on
+ * [`Number.isFinite`](https://mdn.io/Number/isFinite).
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a finite number,
+ * else `false`.
+ * @example
+ *
+ * _.isFinite(3);
+ * // => true
+ *
+ * _.isFinite(Number.MAX_VALUE);
+ * // => true
+ *
+ * _.isFinite(3.14);
+ * // => true
+ *
+ * _.isFinite(Infinity);
+ * // => false
+ */
+ function isFinite(value) {
+ return typeof value == 'number' && nativeIsFinite(value);
+ }
+
+ /**
+ * Checks if `value` is classified as a `Function` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is correctly classified,
+ * else `false`.
+ * @example
+ *
+ * _.isFunction(_);
+ * // => true
+ *
+ * _.isFunction(/abc/);
+ * // => false
+ */
+ function isFunction(value) {
+ // The use of `Object#toString` avoids issues with the `typeof` operator
+ // in Safari 8 which returns 'object' for typed array and weak map constructors,
+ // and PhantomJS 1.9 which returns 'function' for `NodeList` instances.
+ var tag = isObject(value) ? objectToString.call(value) : '';
+ return tag == funcTag || tag == genTag;
+ }
+
+ /**
+ * Checks if `value` is a valid array-like length.
+ *
+ * **Note:** This function is loosely based on
+ * [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a valid length,
+ * else `false`.
+ * @example
+ *
+ * _.isLength(3);
+ * // => true
+ *
+ * _.isLength(Number.MIN_VALUE);
+ * // => false
+ *
+ * _.isLength(Infinity);
+ * // => false
+ *
+ * _.isLength('3');
+ * // => false
+ */
+ function isLength(value) {
+ return typeof value == 'number' &&
+ value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
+ }
+
+ /**
+ * Checks if `value` is the
+ * [language type](http://www.ecma-international.org/ecma-262/6.0/#sec-ecmascript-language-types)
+ * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an object, else `false`.
+ * @example
+ *
+ * _.isObject({});
+ * // => true
+ *
+ * _.isObject([1, 2, 3]);
+ * // => true
+ *
+ * _.isObject(_.noop);
+ * // => true
+ *
+ * _.isObject(null);
+ * // => false
+ */
+ function isObject(value) {
+ var type = typeof value;
+ return !!value && (type == 'object' || type == 'function');
+ }
+
+ /**
+ * Checks if `value` is object-like. A value is object-like if it's not `null`
+ * and has a `typeof` result of "object".
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
+ * @example
+ *
+ * _.isObjectLike({});
+ * // => true
+ *
+ * _.isObjectLike([1, 2, 3]);
+ * // => true
+ *
+ * _.isObjectLike(_.noop);
+ * // => false
+ *
+ * _.isObjectLike(null);
+ * // => false
+ */
+ function isObjectLike(value) {
+ return !!value && typeof value == 'object';
+ }
+
+ /**
+ * Checks if `value` is `NaN`.
+ *
+ * **Note:** This method is based on
+ * [`Number.isNaN`](https://mdn.io/Number/isNaN) and is not the same as
+ * global [`isNaN`](https://mdn.io/isNaN) which returns `true` for
+ * `undefined` and other non-number values.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.
+ * @example
+ *
+ * _.isNaN(NaN);
+ * // => true
+ *
+ * _.isNaN(new Number(NaN));
+ * // => true
+ *
+ * isNaN(undefined);
+ * // => true
+ *
+ * _.isNaN(undefined);
+ * // => false
+ */
+ function isNaN(value) {
+ // An `NaN` primitive is the only value that is not equal to itself.
+ // Perform the `toStringTag` check first to avoid errors with some
+ // ActiveX objects in IE.
+ return isNumber(value) && value != +value;
+ }
+
+ /**
+ * Checks if `value` is `null`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is `null`, else `false`.
+ * @example
+ *
+ * _.isNull(null);
+ * // => true
+ *
+ * _.isNull(void 0);
+ * // => false
+ */
+ function isNull(value) {
+ return value === null;
+ }
+
+ /**
+ * Checks if `value` is classified as a `Number` primitive or object.
+ *
+ * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are
+ * classified as numbers, use the `_.isFinite` method.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is correctly classified,
+ * else `false`.
+ * @example
+ *
+ * _.isNumber(3);
+ * // => true
+ *
+ * _.isNumber(Number.MIN_VALUE);
+ * // => true
+ *
+ * _.isNumber(Infinity);
+ * // => true
+ *
+ * _.isNumber('3');
+ * // => false
+ */
+ function isNumber(value) {
+ return typeof value == 'number' ||
+ (isObjectLike(value) && objectToString.call(value) == numberTag);
+ }
+
+ /**
+ * Checks if `value` is classified as a `RegExp` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is correctly classified,
+ * else `false`.
+ * @example
+ *
+ * _.isRegExp(/abc/);
+ * // => true
+ *
+ * _.isRegExp('/abc/');
+ * // => false
+ */
+ function isRegExp(value) {
+ return isObject(value) && objectToString.call(value) == regexpTag;
+ }
+
+ /**
+ * Checks if `value` is classified as a `String` primitive or object.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is correctly classified,
+ * else `false`.
+ * @example
+ *
+ * _.isString('abc');
+ * // => true
+ *
+ * _.isString(1);
+ * // => false
+ */
+ function isString(value) {
+ return typeof value == 'string' ||
+ (!isArray(value) && isObjectLike(value) && objectToString.call(value) == stringTag);
+ }
+
+ /**
+ * Checks if `value` is `undefined`.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`.
+ * @example
+ *
+ * _.isUndefined(void 0);
+ * // => true
+ *
+ * _.isUndefined(null);
+ * // => false
+ */
+ function isUndefined(value) {
+ return value === undefined;
+ }
+
+ /**
+ * Converts `value` to an array.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to convert.
+ * @returns {Array} Returns the converted array.
+ * @example
+ *
+ * _.toArray({ 'a': 1, 'b': 2 });
+ * // => [1, 2]
+ *
+ * _.toArray('abc');
+ * // => ['a', 'b', 'c']
+ *
+ * _.toArray(1);
+ * // => []
+ *
+ * _.toArray(null);
+ * // => []
+ */
+ function toArray(value) {
+ if (!isArrayLike(value)) {
+ return values(value);
+ }
+ return value.length ? copyArray(value) : [];
+ }
+
+ /**
+ * Converts `value` to an integer.
+ *
+ * **Note:** This function is loosely based on
+ * [`ToInteger`](http://www.ecma-international.org/ecma-262/6.0/#sec-tointeger).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to convert.
+ * @returns {number} Returns the converted integer.
+ * @example
+ *
+ * _.toInteger(3);
+ * // => 3
+ *
+ * _.toInteger(Number.MIN_VALUE);
+ * // => 0
+ *
+ * _.toInteger(Infinity);
+ * // => 1.7976931348623157e+308
+ *
+ * _.toInteger('3');
+ * // => 3
+ */
+ var toInteger = Number;
+
+ /**
+ * Converts `value` to a number.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to process.
+ * @returns {number} Returns the number.
+ * @example
+ *
+ * _.toNumber(3);
+ * // => 3
+ *
+ * _.toNumber(Number.MIN_VALUE);
+ * // => 5e-324
+ *
+ * _.toNumber(Infinity);
+ * // => Infinity
+ *
+ * _.toNumber('3');
+ * // => 3
+ */
+ var toNumber = Number;
+
+ /**
+ * Converts `value` to a string. An empty string is returned for `null`
+ * and `undefined` values. The sign of `-0` is preserved.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to process.
+ * @returns {string} Returns the string.
+ * @example
+ *
+ * _.toString(null);
+ * // => ''
+ *
+ * _.toString(-0);
+ * // => '-0'
+ *
+ * _.toString([1, 2, 3]);
+ * // => '1,2,3'
+ */
+ function toString(value) {
+ if (typeof value == 'string') {
+ return value;
+ }
+ return value == null ? '' : (value + '');
+ }
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Assigns own enumerable string keyed properties of source objects to the
+ * destination object. Source objects are applied from left to right.
+ * Subsequent sources overwrite property assignments of previous sources.
+ *
+ * **Note:** This method mutates `object` and is loosely based on
+ * [`Object.assign`](https://mdn.io/Object/assign).
+ *
+ * @static
+ * @memberOf _
+ * @since 0.10.0
+ * @category Object
+ * @param {Object} object The destination object.
+ * @param {...Object} [sources] The source objects.
+ * @returns {Object} Returns `object`.
+ * @see _.assignIn
+ * @example
+ *
+ * function Foo() {
+ * this.c = 3;
+ * }
+ *
+ * function Bar() {
+ * this.e = 5;
+ * }
+ *
+ * Foo.prototype.d = 4;
+ * Bar.prototype.f = 6;
+ *
+ * _.assign({ 'a': 1 }, new Foo, new Bar);
+ * // => { 'a': 1, 'c': 3, 'e': 5 }
+ */
+ var assign = createAssigner(function(object, source) {
+ copyObject(source, keys(source), object);
+ });
+
+ /**
+ * This method is like `_.assign` except that it iterates over own and
+ * inherited source properties.
+ *
+ * **Note:** This method mutates `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @alias extend
+ * @category Object
+ * @param {Object} object The destination object.
+ * @param {...Object} [sources] The source objects.
+ * @returns {Object} Returns `object`.
+ * @see _.assign
+ * @example
+ *
+ * function Foo() {
+ * this.b = 2;
+ * }
+ *
+ * function Bar() {
+ * this.d = 4;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ * Bar.prototype.e = 5;
+ *
+ * _.assignIn({ 'a': 1 }, new Foo, new Bar);
+ * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4, 'e': 5 }
+ */
+ var assignIn = createAssigner(function(object, source) {
+ copyObject(source, keysIn(source), object);
+ });
+
+ /**
+ * This method is like `_.assignIn` except that it accepts `customizer`
+ * which is invoked to produce the assigned values. If `customizer` returns
+ * `undefined`, assignment is handled by the method instead. The `customizer`
+ * is invoked with five arguments: (objValue, srcValue, key, object, source).
+ *
+ * **Note:** This method mutates `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @alias extendWith
+ * @category Object
+ * @param {Object} object The destination object.
+ * @param {...Object} sources The source objects.
+ * @param {Function} [customizer] The function to customize assigned values.
+ * @returns {Object} Returns `object`.
+ * @see _.assignWith
+ * @example
+ *
+ * function customizer(objValue, srcValue) {
+ * return _.isUndefined(objValue) ? srcValue : objValue;
+ * }
+ *
+ * var defaults = _.partialRight(_.assignInWith, customizer);
+ *
+ * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
+ * // => { 'a': 1, 'b': 2 }
+ */
+ var assignInWith = createAssigner(function(object, source, srcIndex, customizer) {
+ copyObject(source, keysIn(source), object, customizer);
+ });
+
+ /**
+ * Creates an object that inherits from the `prototype` object. If a
+ * `properties` object is given, its own enumerable string keyed properties
+ * are assigned to the created object.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.3.0
+ * @category Object
+ * @param {Object} prototype The object to inherit from.
+ * @param {Object} [properties] The properties to assign to the object.
+ * @returns {Object} Returns the new object.
+ * @example
+ *
+ * function Shape() {
+ * this.x = 0;
+ * this.y = 0;
+ * }
+ *
+ * function Circle() {
+ * Shape.call(this);
+ * }
+ *
+ * Circle.prototype = _.create(Shape.prototype, {
+ * 'constructor': Circle
+ * });
+ *
+ * var circle = new Circle;
+ * circle instanceof Circle;
+ * // => true
+ *
+ * circle instanceof Shape;
+ * // => true
+ */
+ function create(prototype, properties) {
+ var result = baseCreate(prototype);
+ return properties ? assign(result, properties) : result;
+ }
+
+ /**
+ * Assigns own and inherited enumerable string keyed properties of source
+ * objects to the destination object for all destination properties that
+ * resolve to `undefined`. Source objects are applied from left to right.
+ * Once a property is set, additional values of the same property are ignored.
+ *
+ * **Note:** This method mutates `object`.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The destination object.
+ * @param {...Object} [sources] The source objects.
+ * @returns {Object} Returns `object`.
+ * @see _.defaultsDeep
+ * @example
+ *
+ * _.defaults({ 'user': 'barney' }, { 'age': 36 }, { 'user': 'fred' });
+ * // => { 'user': 'barney', 'age': 36 }
+ */
+ var defaults = rest(function(args) {
+ args.push(undefined, assignInDefaults);
+ return assignInWith.apply(undefined, args);
+ });
+
+ /**
+ * Checks if `path` is a direct property of `object`.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The object to query.
+ * @param {Array|string} path The path to check.
+ * @returns {boolean} Returns `true` if `path` exists, else `false`.
+ * @example
+ *
+ * var object = { 'a': { 'b': 2 } };
+ * var other = _.create({ 'a': _.create({ 'b': 2 }) });
+ *
+ * _.has(object, 'a');
+ * // => true
+ *
+ * _.has(object, 'a.b');
+ * // => true
+ *
+ * _.has(object, ['a', 'b']);
+ * // => true
+ *
+ * _.has(other, 'a');
+ * // => false
+ */
+ function has(object, path) {
+ return object != null && hasOwnProperty.call(object, path);
+ }
+
+ /**
+ * Creates an array of the own enumerable property names of `object`.
+ *
+ * **Note:** Non-object values are coerced to objects. See the
+ * [ES spec](http://ecma-international.org/ecma-262/6.0/#sec-object.keys)
+ * for more details.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property names.
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.keys(new Foo);
+ * // => ['a', 'b'] (iteration order is not guaranteed)
+ *
+ * _.keys('hi');
+ * // => ['0', '1']
+ */
+ function keys(object) {
+ var isProto = isPrototype(object);
+ if (!(isProto || isArrayLike(object))) {
+ return baseKeys(object);
+ }
+ var indexes = indexKeys(object),
+ skipIndexes = !!indexes,
+ result = indexes || [],
+ length = result.length;
+
+ for (var key in object) {
+ if (hasOwnProperty.call(object, key) &&
+ !(skipIndexes && (key == 'length' || isIndex(key, length))) &&
+ !(isProto && key == 'constructor')) {
+ result.push(key);
+ }
+ }
+ return result;
+ }
+
+ /**
+ * Creates an array of the own and inherited enumerable property names of `object`.
+ *
+ * **Note:** Non-object values are coerced to objects.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Object
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property names.
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.keysIn(new Foo);
+ * // => ['a', 'b', 'c'] (iteration order is not guaranteed)
+ */
+ function keysIn(object) {
+ var index = -1,
+ isProto = isPrototype(object),
+ props = baseKeysIn(object),
+ propsLength = props.length,
+ indexes = indexKeys(object),
+ skipIndexes = !!indexes,
+ result = indexes || [],
+ length = result.length;
+
+ while (++index < propsLength) {
+ var key = props[index];
+ if (!(skipIndexes && (key == 'length' || isIndex(key, length))) &&
+ !(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {
+ result.push(key);
+ }
+ }
+ return result;
+ }
+
+ /**
+ * Creates an object composed of the picked `object` properties.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The source object.
+ * @param {...(string|string[])} [props] The property identifiers to pick.
+ * @returns {Object} Returns the new object.
+ * @example
+ *
+ * var object = { 'a': 1, 'b': '2', 'c': 3 };
+ *
+ * _.pick(object, ['a', 'c']);
+ * // => { 'a': 1, 'c': 3 }
+ */
+ var pick = rest(function(object, props) {
+ return object == null ? {} : basePick(object, baseMap(baseFlatten(props, 1), toKey));
+ });
+
+ /**
+ * This method is like `_.get` except that if the resolved value is a
+ * function it's invoked with the `this` binding of its parent object and
+ * its result is returned.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The object to query.
+ * @param {Array|string} path The path of the property to resolve.
+ * @param {*} [defaultValue] The value returned for `undefined` resolved values.
+ * @returns {*} Returns the resolved value.
+ * @example
+ *
+ * var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] };
+ *
+ * _.result(object, 'a[0].b.c1');
+ * // => 3
+ *
+ * _.result(object, 'a[0].b.c2');
+ * // => 4
+ *
+ * _.result(object, 'a[0].b.c3', 'default');
+ * // => 'default'
+ *
+ * _.result(object, 'a[0].b.c3', _.constant('default'));
+ * // => 'default'
+ */
+ function result(object, path, defaultValue) {
+ var value = object == null ? undefined : object[path];
+ if (value === undefined) {
+ value = defaultValue;
+ }
+ return isFunction(value) ? value.call(object) : value;
+ }
+
+ /**
+ * Creates an array of the own enumerable string keyed property values of `object`.
+ *
+ * **Note:** Non-object values are coerced to objects.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property values.
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.values(new Foo);
+ * // => [1, 2] (iteration order is not guaranteed)
+ *
+ * _.values('hi');
+ * // => ['h', 'i']
+ */
+ function values(object) {
+ return object ? baseValues(object, keys(object)) : [];
+ }
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Converts the characters "&", "<", ">", '"', "'", and "\`" in `string` to
+ * their corresponding HTML entities.
+ *
+ * **Note:** No other characters are escaped. To escape additional
+ * characters use a third-party library like [_he_](https://mths.be/he).
+ *
+ * Though the ">" character is escaped for symmetry, characters like
+ * ">" and "/" don't need escaping in HTML and have no special meaning
+ * unless they're part of a tag or unquoted attribute value. See
+ * [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands)
+ * (under "semi-related fun fact") for more details.
+ *
+ * Backticks are escaped because in IE < 9, they can break out of
+ * attribute values or HTML comments. See [#59](https://html5sec.org/#59),
+ * [#102](https://html5sec.org/#102), [#108](https://html5sec.org/#108), and
+ * [#133](https://html5sec.org/#133) of the
+ * [HTML5 Security Cheatsheet](https://html5sec.org/) for more details.
+ *
+ * When working with HTML you should always
+ * [quote attribute values](http://wonko.com/post/html-escaping) to reduce
+ * XSS vectors.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category String
+ * @param {string} [string=''] The string to escape.
+ * @returns {string} Returns the escaped string.
+ * @example
+ *
+ * _.escape('fred, barney, & pebbles');
+ * // => 'fred, barney, & pebbles'
+ */
+ function escape(string) {
+ string = toString(string);
+ return (string && reHasUnescapedHtml.test(string))
+ ? string.replace(reUnescapedHtml, escapeHtmlChar)
+ : string;
+ }
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * This method returns the first argument given to it.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Util
+ * @param {*} value Any value.
+ * @returns {*} Returns `value`.
+ * @example
+ *
+ * var object = { 'user': 'fred' };
+ *
+ * _.identity(object) === object;
+ * // => true
+ */
+ function identity(value) {
+ return value;
+ }
+
+ /**
+ * Creates a function that invokes `func` with the arguments of the created
+ * function. If `func` is a property name, the created function returns the
+ * property value for a given element. If `func` is an array or object, the
+ * created function returns `true` for elements that contain the equivalent
+ * source properties, otherwise it returns `false`.
+ *
+ * @static
+ * @since 4.0.0
+ * @memberOf _
+ * @category Util
+ * @param {*} [func=_.identity] The value to convert to a callback.
+ * @returns {Function} Returns the callback.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'age': 36, 'active': true },
+ * { 'user': 'fred', 'age': 40, 'active': false }
+ * ];
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.filter(users, _.iteratee({ 'user': 'barney', 'active': true }));
+ * // => [{ 'user': 'barney', 'age': 36, 'active': true }]
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.filter(users, _.iteratee(['user', 'fred']));
+ * // => [{ 'user': 'fred', 'age': 40 }]
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.map(users, _.iteratee('user'));
+ * // => ['barney', 'fred']
+ *
+ * // Create custom iteratee shorthands.
+ * _.iteratee = _.wrap(_.iteratee, function(iteratee, func) {
+ * return !_.isRegExp(func) ? iteratee(func) : function(string) {
+ * return func.test(string);
+ * };
+ * });
+ *
+ * _.filter(['abc', 'def'], /ef/);
+ * // => ['def']
+ */
+ var iteratee = baseIteratee;
+
+ /**
+ * Creates a function that performs a partial deep comparison between a given
+ * object and `source`, returning `true` if the given object has equivalent
+ * property values, else `false`. The created function is equivalent to
+ * `_.isMatch` with a `source` partially applied.
+ *
+ * **Note:** This method supports comparing the same values as `_.isEqual`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Util
+ * @param {Object} source The object of property values to match.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'age': 36, 'active': true },
+ * { 'user': 'fred', 'age': 40, 'active': false }
+ * ];
+ *
+ * _.filter(users, _.matches({ 'age': 40, 'active': false }));
+ * // => [{ 'user': 'fred', 'age': 40, 'active': false }]
+ */
+ function matches(source) {
+ return baseMatches(assign({}, source));
+ }
+
+ /**
+ * Adds all own enumerable string keyed function properties of a source
+ * object to the destination object. If `object` is a function, then methods
+ * are added to its prototype as well.
+ *
+ * **Note:** Use `_.runInContext` to create a pristine `lodash` function to
+ * avoid conflicts caused by modifying the original.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Util
+ * @param {Function|Object} [object=lodash] The destination object.
+ * @param {Object} source The object of functions to add.
+ * @param {Object} [options={}] The options object.
+ * @param {boolean} [options.chain=true] Specify whether mixins are chainable.
+ * @returns {Function|Object} Returns `object`.
+ * @example
+ *
+ * function vowels(string) {
+ * return _.filter(string, function(v) {
+ * return /[aeiou]/i.test(v);
+ * });
+ * }
+ *
+ * _.mixin({ 'vowels': vowels });
+ * _.vowels('fred');
+ * // => ['e']
+ *
+ * _('fred').vowels().value();
+ * // => ['e']
+ *
+ * _.mixin({ 'vowels': vowels }, { 'chain': false });
+ * _('fred').vowels();
+ * // => ['e']
+ */
+ function mixin(object, source, options) {
+ var props = keys(source),
+ methodNames = baseFunctions(source, props);
+
+ if (options == null &&
+ !(isObject(source) && (methodNames.length || !props.length))) {
+ options = source;
+ source = object;
+ object = this;
+ methodNames = baseFunctions(source, keys(source));
+ }
+ var chain = !(isObject(options) && 'chain' in options) || !!options.chain,
+ isFunc = isFunction(object);
+
+ baseEach(methodNames, function(methodName) {
+ var func = source[methodName];
+ object[methodName] = func;
+ if (isFunc) {
+ object.prototype[methodName] = function() {
+ var chainAll = this.__chain__;
+ if (chain || chainAll) {
+ var result = object(this.__wrapped__),
+ actions = result.__actions__ = copyArray(this.__actions__);
+
+ actions.push({ 'func': func, 'args': arguments, 'thisArg': object });
+ result.__chain__ = chainAll;
+ return result;
+ }
+ return func.apply(object, arrayPush([this.value()], arguments));
+ };
+ }
+ });
+
+ return object;
+ }
+
+ /**
+ * Reverts the `_` variable to its previous value and returns a reference to
+ * the `lodash` function.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Util
+ * @returns {Function} Returns the `lodash` function.
+ * @example
+ *
+ * var lodash = _.noConflict();
+ */
+ function noConflict() {
+ if (root._ === this) {
+ root._ = oldDash;
+ }
+ return this;
+ }
+
+ /**
+ * A no-operation function that returns `undefined` regardless of the
+ * arguments it receives.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.3.0
+ * @category Util
+ * @example
+ *
+ * var object = { 'user': 'fred' };
+ *
+ * _.noop(object) === undefined;
+ * // => true
+ */
+ function noop() {
+ // No operation performed.
+ }
+
+ /**
+ * Generates a unique ID. If `prefix` is given, the ID is appended to it.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Util
+ * @param {string} [prefix=''] The value to prefix the ID with.
+ * @returns {string} Returns the unique ID.
+ * @example
+ *
+ * _.uniqueId('contact_');
+ * // => 'contact_104'
+ *
+ * _.uniqueId();
+ * // => '105'
+ */
+ function uniqueId(prefix) {
+ var id = ++idCounter;
+ return toString(prefix) + id;
+ }
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Computes the maximum value of `array`. If `array` is empty or falsey,
+ * `undefined` is returned.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Math
+ * @param {Array} array The array to iterate over.
+ * @returns {*} Returns the maximum value.
+ * @example
+ *
+ * _.max([4, 2, 8, 6]);
+ * // => 8
+ *
+ * _.max([]);
+ * // => undefined
+ */
+ function max(array) {
+ return (array && array.length)
+ ? baseExtremum(array, identity, baseGt)
+ : undefined;
+ }
+
+ /**
+ * Computes the minimum value of `array`. If `array` is empty or falsey,
+ * `undefined` is returned.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Math
+ * @param {Array} array The array to iterate over.
+ * @returns {*} Returns the minimum value.
+ * @example
+ *
+ * _.min([4, 2, 8, 6]);
+ * // => 2
+ *
+ * _.min([]);
+ * // => undefined
+ */
+ function min(array) {
+ return (array && array.length)
+ ? baseExtremum(array, identity, baseLt)
+ : undefined;
+ }
+
+ /*------------------------------------------------------------------------*/
+
+ // Add methods that return wrapped values in chain sequences.
+ lodash.assignIn = assignIn;
+ lodash.before = before;
+ lodash.bind = bind;
+ lodash.chain = chain;
+ lodash.compact = compact;
+ lodash.concat = concat;
+ lodash.create = create;
+ lodash.defaults = defaults;
+ lodash.defer = defer;
+ lodash.delay = delay;
+ lodash.filter = filter;
+ lodash.flatten = flatten;
+ lodash.flattenDeep = flattenDeep;
+ lodash.iteratee = iteratee;
+ lodash.keys = keys;
+ lodash.map = map;
+ lodash.matches = matches;
+ lodash.mixin = mixin;
+ lodash.negate = negate;
+ lodash.once = once;
+ lodash.pick = pick;
+ lodash.slice = slice;
+ lodash.sortBy = sortBy;
+ lodash.tap = tap;
+ lodash.thru = thru;
+ lodash.toArray = toArray;
+ lodash.values = values;
+
+ // Add aliases.
+ lodash.extend = assignIn;
+
+ // Add methods to `lodash.prototype`.
+ mixin(lodash, lodash);
+
+ /*------------------------------------------------------------------------*/
+
+ // Add methods that return unwrapped values in chain sequences.
+ lodash.clone = clone;
+ lodash.escape = escape;
+ lodash.every = every;
+ lodash.find = find;
+ lodash.forEach = forEach;
+ lodash.has = has;
+ lodash.head = head;
+ lodash.identity = identity;
+ lodash.indexOf = indexOf;
+ lodash.isArguments = isArguments;
+ lodash.isArray = isArray;
+ lodash.isBoolean = isBoolean;
+ lodash.isDate = isDate;
+ lodash.isEmpty = isEmpty;
+ lodash.isEqual = isEqual;
+ lodash.isFinite = isFinite;
+ lodash.isFunction = isFunction;
+ lodash.isNaN = isNaN;
+ lodash.isNull = isNull;
+ lodash.isNumber = isNumber;
+ lodash.isObject = isObject;
+ lodash.isRegExp = isRegExp;
+ lodash.isString = isString;
+ lodash.isUndefined = isUndefined;
+ lodash.last = last;
+ lodash.max = max;
+ lodash.min = min;
+ lodash.noConflict = noConflict;
+ lodash.noop = noop;
+ lodash.reduce = reduce;
+ lodash.result = result;
+ lodash.size = size;
+ lodash.some = some;
+ lodash.uniqueId = uniqueId;
+
+ // Add aliases.
+ lodash.each = forEach;
+ lodash.first = head;
+
+ mixin(lodash, (function() {
+ var source = {};
+ baseForOwn(lodash, function(func, methodName) {
+ if (!hasOwnProperty.call(lodash.prototype, methodName)) {
+ source[methodName] = func;
+ }
+ });
+ return source;
+ }()), { 'chain': false });
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * The semantic version number.
+ *
+ * @static
+ * @memberOf _
+ * @type {string}
+ */
+ lodash.VERSION = VERSION;
+
+ // Add `Array` methods to `lodash.prototype`.
+ baseEach(['pop', 'join', 'replace', 'reverse', 'split', 'push', 'shift', 'sort', 'splice', 'unshift'], function(methodName) {
+ var func = (/^(?:replace|split)$/.test(methodName) ? String.prototype : arrayProto)[methodName],
+ chainName = /^(?:push|sort|unshift)$/.test(methodName) ? 'tap' : 'thru',
+ retUnwrapped = /^(?:pop|join|replace|shift)$/.test(methodName);
+
+ lodash.prototype[methodName] = function() {
+ var args = arguments;
+ if (retUnwrapped && !this.__chain__) {
+ var value = this.value();
+ return func.apply(isArray(value) ? value : [], args);
+ }
+ return this[chainName](function(value) {
+ return func.apply(isArray(value) ? value : [], args);
+ });
+ };
+ });
+
+ // Add chain sequence methods to the `lodash` wrapper.
+ lodash.prototype.toJSON = lodash.prototype.valueOf = lodash.prototype.value = wrapperValue;
+
+ /*--------------------------------------------------------------------------*/
+
+ // Expose Lodash on the free variable `window` or `self` when available so it's
+ // globally accessible, even when bundled with Browserify, Webpack, etc. This
+ // also prevents errors in cases where Lodash is loaded by a script tag in the
+ // presence of an AMD loader. See http://requirejs.org/docs/errors.html#mismatch
+ // for more details. Use `_.noConflict` to remove Lodash from the global object.
+ (freeWindow || freeSelf || {})._ = lodash;
+
+ // Some AMD build optimizers like r.js check for condition patterns like the following:
+ if (typeof define == 'function' && typeof define.amd == 'object' && define.amd) {
+ // Define as an anonymous module so, through path mapping, it can be
+ // referenced as the "underscore" module.
+ define(function() {
+ return lodash;
+ });
+ }
+ // Check for `exports` after `define` in case a build optimizer adds an `exports` object.
+ else if (freeExports && freeModule) {
+ // Export for Node.js.
+ if (moduleExports) {
+ (freeModule.exports = lodash)._ = lodash;
+ }
+ // Export for CommonJS support.
+ freeExports._ = lodash;
+ }
+ else {
+ // Export to the global object.
+ root._ = lodash;
+ }
+}.call(this));
diff --git a/views/ngXosViews/serviceGrid/src/vendor/lodash/dist/lodash.core.min.js b/views/ngXosViews/serviceGrid/src/vendor/lodash/dist/lodash.core.min.js
new file mode 100644
index 0000000..af9a225
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/lodash/dist/lodash.core.min.js
@@ -0,0 +1,30 @@
+/**
+ * @license
+ * lodash 4.11.2 (Custom Build) lodash.com/license | Underscore.js 1.8.3 underscorejs.org/LICENSE
+ * Build: `lodash core -o ./dist/lodash.core.js`
+ */
+;(function(){function n(n,t){return n.push.apply(n,t),n}function t(n,t,r){var e;return r(n,function(n,r,u){return t(n,r,u)?(e=n,false):void 0}),e}function r(n,t,r,e,u){return u(n,function(n,u,o){r=e?(e=false,n):t(r,n,u,o)}),r}function e(n,t){return O(t,function(t){return n[t]})}function u(n){return n&&n.Object===Object?n:null}function o(n){return gn[n]}function i(n){var t=false;if(null!=n&&typeof n.toString!="function")try{t=!!(n+"")}catch(r){}return t}function c(n){return n instanceof f?n:new f(n)}function f(n,t){
+this.__wrapped__=n,this.__actions__=[],this.__chain__=!!t}function a(n,t,r,e){var u;return(u=n===pn)||(u=En[r],u=(n===u||n!==n&&u!==u)&&!kn.call(e,r)),u?t:n}function l(n){return nn(n)?Bn(n):{}}function p(n,t,r){if(typeof n!="function")throw new TypeError("Expected a function");return setTimeout(function(){n.apply(pn,r)},t)}function s(n,t){var r=true;return zn(n,function(n,e,u){return r=!!t(n,e,u)}),r}function h(n,t,r){for(var e=-1,u=n.length;++e<u;){var o=n[e],i=t(o);if(null!=i&&(c===pn?i===i:r(i,c)))var c=i,f=o;
+}return f}function v(n,t){var r=[];return zn(n,function(n,e,u){t(n,e,u)&&r.push(n)}),r}function y(t,r,e,u,o){var i=-1,c=t.length;for(e||(e=G),o||(o=[]);++i<c;){var f=t[i];r>0&&e(f)?r>1?y(f,r-1,e,u,o):n(o,f):u||(o[o.length]=f)}return o}function g(n,t){return n&&Cn(n,t,on)}function b(n,t){return v(t,function(t){return Y(n[t])})}function _(n,t){return n>t}function d(n,t,r,e,u){return n===t?true:null==n||null==t||!nn(n)&&!tn(t)?n!==n&&t!==t:j(n,t,d,r,e,u)}function j(n,t,r,e,u,o){var c=Vn(n),f=Vn(t),a="[object Array]",l="[object Array]";
+c||(a=Sn.call(n),a="[object Arguments]"==a?"[object Object]":a),f||(l=Sn.call(t),l="[object Arguments]"==l?"[object Object]":l);var p="[object Object]"==a&&!i(n),f="[object Object]"==l&&!i(t),l=a==l;o||(o=[]);var s=U(o,function(t){return t[0]===n});return s&&s[1]?s[1]==t:(o.push([n,t]),l&&!p?(r=c||isTypedArray(n)?$(n,t,r,e,u,o):q(n,t,a),o.pop(),r):2&u||(c=p&&kn.call(n,"__wrapped__"),a=f&&kn.call(t,"__wrapped__"),!c&&!a)?l?(r=z(n,t,r,e,u,o),o.pop(),r):false:(c=c?n.value():n,t=a?t.value():t,r=r(c,t,e,u,o),
+o.pop(),r))}function m(n){return typeof n=="function"?n:null==n?an:(typeof n=="object"?A:k)(n)}function w(n){n=null==n?n:Object(n);var t,r=[];for(t in n)r.push(t);return r}function x(n,t){return t>n}function O(n,t){var r=-1,e=X(n)?Array(n.length):[];return zn(n,function(n,u,o){e[++r]=t(n,u,o)}),e}function A(n){var t=on(n);return function(r){var e=t.length;if(null==r)return!e;for(r=Object(r);e--;){var u=t[e];if(!(u in r&&d(n[u],r[u],pn,3)))return false}return true}}function E(n,t){return n=Object(n),H(t,function(t,r){
+return r in n&&(t[r]=n[r]),t},{})}function k(n){return function(t){return null==t?pn:t[n]}}function N(n,t,r){var e=-1,u=n.length;for(0>t&&(t=-t>u?0:u+t),r=r>u?u:r,0>r&&(r+=u),u=t>r?0:r-t>>>0,t>>>=0,r=Array(u);++e<u;)r[e]=n[e+t];return r}function S(n){return N(n,0,n.length)}function T(n,t){var r;return zn(n,function(n,e,u){return r=t(n,e,u),!r}),!!r}function F(t,r){return H(r,function(t,r){return r.func.apply(r.thisArg,n([t],r.args))},t)}function R(n,t,r,e){r||(r={});for(var u=-1,o=t.length;++u<o;){
+var i=t[u],c=e?e(r[i],n[i],i,r,n):n[i],f=r,a=f[i];kn.call(f,i)&&(a===c||a!==a&&c!==c)&&(c!==pn||i in f)||(f[i]=c)}return r}function B(n){return L(function(t,r){var e=-1,u=r.length,o=u>1?r[u-1]:pn,o=typeof o=="function"?(u--,o):pn;for(t=Object(t);++e<u;){var i=r[e];i&&n(t,i,e,o)}return t})}function D(n){return function(){var t=arguments,r=l(n.prototype),t=n.apply(r,t);return nn(t)?t:r}}function I(n,t,r){function e(){for(var o=-1,i=arguments.length,c=-1,f=r.length,a=Array(f+i),l=this&&this!==On&&this instanceof e?u:n;++c<f;)a[c]=r[c];
+for(;i--;)a[c++]=arguments[++o];return l.apply(t,a)}if(typeof n!="function")throw new TypeError("Expected a function");var u=D(n);return e}function $(n,t,r,e,u,o){var i=-1,c=1&u,f=n.length,a=t.length;if(f!=a&&!(2&u&&a>f))return false;for(a=true;++i<f;){var l=n[i],p=t[i];if(void 0!==pn){a=false;break}if(c){if(!T(t,function(n){return l===n||r(l,n,e,u,o)})){a=false;break}}else if(l!==p&&!r(l,p,e,u,o)){a=false;break}}return a}function q(n,t,r){switch(r){case"[object Boolean]":case"[object Date]":return+n==+t;case"[object Error]":
+return n.name==t.name&&n.message==t.message;case"[object Number]":return n!=+n?t!=+t:n==+t;case"[object RegExp]":case"[object String]":return n==t+""}return false}function z(n,t,r,e,u,o){var i=2&u,c=on(n),f=c.length,a=on(t).length;if(f!=a&&!i)return false;for(var l=f;l--;){var p=c[l];if(!(i?p in t:kn.call(t,p)))return false}for(a=true;++l<f;){var p=c[l],s=n[p],h=t[p];if(void 0!==pn||s!==h&&!r(s,h,e,u,o)){a=false;break}i||(i="constructor"==p)}return a&&!i&&(r=n.constructor,e=t.constructor,r!=e&&"constructor"in n&&"constructor"in t&&!(typeof r=="function"&&r instanceof r&&typeof e=="function"&&e instanceof e)&&(a=false)),
+a}function C(n){var t=n?n.length:pn;if(Z(t)&&(Vn(n)||en(n)||W(n))){n=String;for(var r=-1,e=Array(t);++r<t;)e[r]=n(r);t=e}else t=null;return t}function G(n){return tn(n)&&X(n)&&(Vn(n)||W(n))}function J(n,t){return t=null==t?9007199254740991:t,!!t&&(typeof n=="number"||yn.test(n))&&n>-1&&0==n%1&&t>n}function M(n){var t=n&&n.constructor;return n===(typeof t=="function"&&t.prototype||En)}function P(n){return n&&n.length?n[0]:pn}function U(n,r){return t(n,m(r),zn)}function V(n,t){return zn(n,m(t))}function H(n,t,e){
+return r(n,m(t),e,3>arguments.length,zn)}function K(n,t){var r;if(typeof t!="function")throw new TypeError("Expected a function");return n=Hn(n),function(){return 0<--n&&(r=t.apply(this,arguments)),1>=n&&(t=pn),r}}function L(n){var t;if(typeof n!="function")throw new TypeError("Expected a function");return t=qn(t===pn?n.length-1:Hn(t),0),function(){for(var r=arguments,e=-1,u=qn(r.length-t,0),o=Array(u);++e<u;)o[e]=r[t+e];for(u=Array(t+1),e=-1;++e<t;)u[e]=r[e];return u[t]=o,n.apply(this,u)}}function Q(){
+if(!arguments.length)return[];var n=arguments[0];return Vn(n)?n:[n]}function W(n){return tn(n)&&X(n)&&kn.call(n,"callee")&&(!Dn.call(n,"callee")||"[object Arguments]"==Sn.call(n))}function X(n){return null!=n&&Z(Gn(n))&&!Y(n)}function Y(n){return n=nn(n)?Sn.call(n):"","[object Function]"==n||"[object GeneratorFunction]"==n}function Z(n){return typeof n=="number"&&n>-1&&0==n%1&&9007199254740991>=n}function nn(n){var t=typeof n;return!!n&&("object"==t||"function"==t)}function tn(n){return!!n&&typeof n=="object";
+}function rn(n){return typeof n=="number"||tn(n)&&"[object Number]"==Sn.call(n)}function en(n){return typeof n=="string"||!Vn(n)&&tn(n)&&"[object String]"==Sn.call(n)}function un(n){return typeof n=="string"?n:null==n?"":n+""}function on(n){var t=M(n);if(!t&&!X(n))return $n(Object(n));var r,e=C(n),u=!!e,e=e||[],o=e.length;for(r in n)!kn.call(n,r)||u&&("length"==r||J(r,o))||t&&"constructor"==r||e.push(r);return e}function cn(n){for(var t=-1,r=M(n),e=w(n),u=e.length,o=C(n),i=!!o,o=o||[],c=o.length;++t<u;){
+var f=e[t];i&&("length"==f||J(f,c))||"constructor"==f&&(r||!kn.call(n,f))||o.push(f)}return o}function fn(n){return n?e(n,on(n)):[]}function an(n){return n}function ln(t,r,e){var u=on(r),o=b(r,u);null!=e||nn(r)&&(o.length||!u.length)||(e=r,r=t,t=this,o=b(r,on(r)));var i=!(nn(e)&&"chain"in e&&!e.chain),c=Y(t);return zn(o,function(e){var u=r[e];t[e]=u,c&&(t.prototype[e]=function(){var r=this.__chain__;if(i||r){var e=t(this.__wrapped__);return(e.__actions__=S(this.__actions__)).push({func:u,args:arguments,
+thisArg:t}),e.__chain__=r,e}return u.apply(t,n([this.value()],arguments))})}),t}var pn,sn=1/0,hn=/[&<>"'`]/g,vn=RegExp(hn.source),yn=/^(?:0|[1-9]\d*)$/,gn={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},bn={"function":true,object:true},_n=bn[typeof exports]&&exports&&!exports.nodeType?exports:pn,dn=bn[typeof module]&&module&&!module.nodeType?module:pn,jn=dn&&dn.exports===_n?_n:pn,mn=u(bn[typeof self]&&self),wn=u(bn[typeof window]&&window),xn=u(bn[typeof this]&&this),On=u(_n&&dn&&typeof global=="object"&&global)||wn!==(xn&&xn.window)&&wn||mn||xn||Function("return this")(),An=Array.prototype,En=Object.prototype,kn=En.hasOwnProperty,Nn=0,Sn=En.toString,Tn=On._,Fn=On.Reflect,Rn=Fn?Fn.a:pn,Bn=Object.create,Dn=En.propertyIsEnumerable,In=On.isFinite,$n=Object.keys,qn=Math.max;
+f.prototype=l(c.prototype),f.prototype.constructor=f;var zn=function(n,t){return function(r,e){if(null==r)return r;if(!X(r))return n(r,e);for(var u=r.length,o=t?u:-1,i=Object(r);(t?o--:++o<u)&&false!==e(i[o],o,i););return r}}(g),Cn=function(n){return function(t,r,e){var u=-1,o=Object(t);e=e(t);for(var i=e.length;i--;){var c=e[n?i:++u];if(false===r(o[c],c,o))break}return t}}();Rn&&!Dn.call({valueOf:1},"valueOf")&&(w=function(n){n=Rn(n);for(var t,r=[];!(t=n.next()).done;)r.push(t.value);return r});var Gn=k("length"),Jn=String,Mn=L(function(n,t,r){
+return I(n,t,r)}),Pn=L(function(n,t){return p(n,1,t)}),Un=L(function(n,t,r){return p(n,Kn(t)||0,r)}),Vn=Array.isArray,Hn=Number,Kn=Number,Ln=B(function(n,t){R(t,on(t),n)}),Qn=B(function(n,t){R(t,cn(t),n)}),Wn=B(function(n,t,r,e){R(t,cn(t),n,e)}),Xn=L(function(n){return n.push(pn,a),Wn.apply(pn,n)}),Yn=L(function(n,t){return null==n?{}:E(n,O(y(t,1),Jn))}),Zn=m;c.assignIn=Qn,c.before=K,c.bind=Mn,c.chain=function(n){return n=c(n),n.__chain__=true,n},c.compact=function(n){return v(n,Boolean)},c.concat=function(){
+var t=arguments.length,r=Q(arguments[0]);if(2>t)return t?S(r):[];for(var e=Array(t-1);t--;)e[t-1]=arguments[t];return y(e,1),n(S(r),fn)},c.create=function(n,t){var r=l(n);return t?Ln(r,t):r},c.defaults=Xn,c.defer=Pn,c.delay=Un,c.filter=function(n,t){return v(n,m(t))},c.flatten=function(n){return n&&n.length?y(n,1):[]},c.flattenDeep=function(n){return n&&n.length?y(n,sn):[]},c.iteratee=Zn,c.keys=on,c.map=function(n,t){return O(n,m(t))},c.matches=function(n){return A(Ln({},n))},c.mixin=ln,c.negate=function(n){
+if(typeof n!="function")throw new TypeError("Expected a function");return function(){return!n.apply(this,arguments)}},c.once=function(n){return K(2,n)},c.pick=Yn,c.slice=function(n,t,r){var e=n?n.length:0;return r=r===pn?e:+r,e?N(n,null==t?0:+t,r):[]},c.sortBy=function(n,t){var r=0;return t=m(t),O(O(n,function(n,e,u){return{value:n,index:r++,criteria:t(n,e,u)}}).sort(function(n,t){var r;n:{r=n.criteria;var e=t.criteria;if(r!==e){var u=r!==pn,o=null===r,i=r===r,c=e!==pn,f=null===e,a=e===e;if(!f&&r>e||o&&c&&a||!u&&a||!i){
+r=1;break n}if(!o&&e>r||f&&u&&i||!c&&i||!a){r=-1;break n}}r=0}return r||n.index-t.index}),k("value"))},c.tap=function(n,t){return t(n),n},c.thru=function(n,t){return t(n)},c.toArray=function(n){return X(n)?n.length?S(n):[]:fn(n)},c.values=fn,c.extend=Qn,ln(c,c),c.clone=function(n){return nn(n)?Vn(n)?S(n):R(n,on(n)):n},c.escape=function(n){return(n=un(n))&&vn.test(n)?n.replace(hn,o):n},c.every=function(n,t,r){return t=r?pn:t,s(n,m(t))},c.find=U,c.forEach=V,c.has=function(n,t){return null!=n&&kn.call(n,t);
+},c.head=P,c.identity=an,c.indexOf=function(n,t,r){var e=n?n.length:0;r=typeof r=="number"?0>r?qn(e+r,0):r:0,r=(r||0)-1;for(var u=t===t;++r<e;){var o=n[r];if(u?o===t:o!==o)return r}return-1},c.isArguments=W,c.isArray=Vn,c.isBoolean=function(n){return true===n||false===n||tn(n)&&"[object Boolean]"==Sn.call(n)},c.isDate=function(n){return tn(n)&&"[object Date]"==Sn.call(n)},c.isEmpty=function(n){return X(n)&&(Vn(n)||en(n)||Y(n.splice)||W(n))?!n.length:!on(n).length},c.isEqual=function(n,t){return d(n,t)},
+c.isFinite=function(n){return typeof n=="number"&&In(n)},c.isFunction=Y,c.isNaN=function(n){return rn(n)&&n!=+n},c.isNull=function(n){return null===n},c.isNumber=rn,c.isObject=nn,c.isRegExp=function(n){return nn(n)&&"[object RegExp]"==Sn.call(n)},c.isString=en,c.isUndefined=function(n){return n===pn},c.last=function(n){var t=n?n.length:0;return t?n[t-1]:pn},c.max=function(n){return n&&n.length?h(n,an,_):pn},c.min=function(n){return n&&n.length?h(n,an,x):pn},c.noConflict=function(){return On._===this&&(On._=Tn),
+this},c.noop=function(){},c.reduce=H,c.result=function(n,t,r){return t=null==n?pn:n[t],t===pn&&(t=r),Y(t)?t.call(n):t},c.size=function(n){return null==n?0:(n=X(n)?n:on(n),n.length)},c.some=function(n,t,r){return t=r?pn:t,T(n,m(t))},c.uniqueId=function(n){var t=++Nn;return un(n)+t},c.each=V,c.first=P,ln(c,function(){var n={};return g(c,function(t,r){kn.call(c.prototype,r)||(n[r]=t)}),n}(),{chain:false}),c.VERSION="4.11.2",zn("pop join replace reverse split push shift sort splice unshift".split(" "),function(n){
+var t=(/^(?:replace|split)$/.test(n)?String.prototype:An)[n],r=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",e=/^(?:pop|join|replace|shift)$/.test(n);c.prototype[n]=function(){var n=arguments;if(e&&!this.__chain__){var u=this.value();return t.apply(Vn(u)?u:[],n)}return this[r](function(r){return t.apply(Vn(r)?r:[],n)})}}),c.prototype.toJSON=c.prototype.valueOf=c.prototype.value=function(){return F(this.__wrapped__,this.__actions__)},(wn||mn||{})._=c,typeof define=="function"&&typeof define.amd=="object"&&define.amd? define(function(){
+return c}):_n&&dn?(jn&&((dn.exports=c)._=c),_n._=c):On._=c}).call(this);
\ No newline at end of file
diff --git a/views/ngXosViews/serviceGrid/src/vendor/lodash/dist/lodash.fp.js b/views/ngXosViews/serviceGrid/src/vendor/lodash/dist/lodash.fp.js
new file mode 100644
index 0000000..6181b35
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/lodash/dist/lodash.fp.js
@@ -0,0 +1,863 @@
+(function webpackUniversalModuleDefinition(root, factory) {
+ if(typeof exports === 'object' && typeof module === 'object')
+ module.exports = factory();
+ else if(typeof define === 'function' && define.amd)
+ define([], factory);
+ else if(typeof exports === 'object')
+ exports["fp"] = factory();
+ else
+ root["fp"] = factory();
+})(this, function() {
+return /******/ (function(modules) { // webpackBootstrap
+/******/ // The module cache
+/******/ var installedModules = {};
+
+/******/ // The require function
+/******/ function __webpack_require__(moduleId) {
+
+/******/ // Check if module is in cache
+/******/ if(installedModules[moduleId])
+/******/ return installedModules[moduleId].exports;
+
+/******/ // Create a new module (and put it into the cache)
+/******/ var module = installedModules[moduleId] = {
+/******/ exports: {},
+/******/ id: moduleId,
+/******/ loaded: false
+/******/ };
+
+/******/ // Execute the module function
+/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
+
+/******/ // Flag the module as loaded
+/******/ module.loaded = true;
+
+/******/ // Return the exports of the module
+/******/ return module.exports;
+/******/ }
+
+
+/******/ // expose the modules object (__webpack_modules__)
+/******/ __webpack_require__.m = modules;
+
+/******/ // expose the module cache
+/******/ __webpack_require__.c = installedModules;
+
+/******/ // __webpack_public_path__
+/******/ __webpack_require__.p = "";
+
+/******/ // Load entry module and return exports
+/******/ return __webpack_require__(0);
+/******/ })
+/************************************************************************/
+/******/ ([
+/* 0 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var baseConvert = __webpack_require__(1);
+
+ /**
+ * Converts `lodash` to an immutable auto-curried iteratee-first data-last
+ * version with conversion `options` applied.
+ *
+ * @param {Function} lodash The lodash function to convert.
+ * @param {Object} [options] The options object. See `baseConvert` for more details.
+ * @returns {Function} Returns the converted `lodash`.
+ */
+ function browserConvert(lodash, options) {
+ return baseConvert(lodash, lodash, options);
+ }
+
+ if (typeof _ == 'function') {
+ _ = browserConvert(_.runInContext());
+ }
+ module.exports = browserConvert;
+
+
+/***/ },
+/* 1 */
+/***/ function(module, exports, __webpack_require__) {
+
+ var mapping = __webpack_require__(2),
+ mutateMap = mapping.mutate,
+ fallbackHolder = __webpack_require__(3);
+
+ /**
+ * Creates a function, with an arity of `n`, that invokes `func` with the
+ * arguments it receives.
+ *
+ * @private
+ * @param {Function} func The function to wrap.
+ * @param {number} n The arity of the new function.
+ * @returns {Function} Returns the new function.
+ */
+ function baseArity(func, n) {
+ return n == 2
+ ? function(a, b) { return func.apply(undefined, arguments); }
+ : function(a) { return func.apply(undefined, arguments); };
+ }
+
+ /**
+ * Creates a function that invokes `func`, with up to `n` arguments, ignoring
+ * any additional arguments.
+ *
+ * @private
+ * @param {Function} func The function to cap arguments for.
+ * @param {number} n The arity cap.
+ * @returns {Function} Returns the new function.
+ */
+ function baseAry(func, n) {
+ return n == 2
+ ? function(a, b) { return func(a, b); }
+ : function(a) { return func(a); };
+ }
+
+ /**
+ * Creates a clone of `array`.
+ *
+ * @private
+ * @param {Array} array The array to clone.
+ * @returns {Array} Returns the cloned array.
+ */
+ function cloneArray(array) {
+ var length = array ? array.length : 0,
+ result = Array(length);
+
+ while (length--) {
+ result[length] = array[length];
+ }
+ return result;
+ }
+
+ /**
+ * Creates a function that clones a given object using the assignment `func`.
+ *
+ * @private
+ * @param {Function} func The assignment function.
+ * @returns {Function} Returns the new cloner function.
+ */
+ function createCloner(func) {
+ return function(object) {
+ return func({}, object);
+ };
+ }
+
+ /**
+ * Creates a function that wraps `func` and uses `cloner` to clone the first
+ * argument it receives.
+ *
+ * @private
+ * @param {Function} func The function to wrap.
+ * @param {Function} cloner The function to clone arguments.
+ * @returns {Function} Returns the new immutable function.
+ */
+ function immutWrap(func, cloner) {
+ return function() {
+ var length = arguments.length;
+ if (!length) {
+ return result;
+ }
+ var args = Array(length);
+ while (length--) {
+ args[length] = arguments[length];
+ }
+ var result = args[0] = cloner.apply(undefined, args);
+ func.apply(undefined, args);
+ return result;
+ };
+ }
+
+ /**
+ * The base implementation of `convert` which accepts a `util` object of methods
+ * required to perform conversions.
+ *
+ * @param {Object} util The util object.
+ * @param {string} name The name of the function to convert.
+ * @param {Function} func The function to convert.
+ * @param {Object} [options] The options object.
+ * @param {boolean} [options.cap=true] Specify capping iteratee arguments.
+ * @param {boolean} [options.curry=true] Specify currying.
+ * @param {boolean} [options.fixed=true] Specify fixed arity.
+ * @param {boolean} [options.immutable=true] Specify immutable operations.
+ * @param {boolean} [options.rearg=true] Specify rearranging arguments.
+ * @returns {Function|Object} Returns the converted function or object.
+ */
+ function baseConvert(util, name, func, options) {
+ var setPlaceholder,
+ isLib = typeof name == 'function',
+ isObj = name === Object(name);
+
+ if (isObj) {
+ options = func;
+ func = name;
+ name = undefined;
+ }
+ if (func == null) {
+ throw new TypeError;
+ }
+ options || (options = {});
+
+ var config = {
+ 'cap': 'cap' in options ? options.cap : true,
+ 'curry': 'curry' in options ? options.curry : true,
+ 'fixed': 'fixed' in options ? options.fixed : true,
+ 'immutable': 'immutable' in options ? options.immutable : true,
+ 'rearg': 'rearg' in options ? options.rearg : true
+ };
+
+ var forceCurry = ('curry' in options) && options.curry,
+ forceFixed = ('fixed' in options) && options.fixed,
+ forceRearg = ('rearg' in options) && options.rearg,
+ placeholder = isLib ? func : fallbackHolder,
+ pristine = isLib ? func.runInContext() : undefined;
+
+ var helpers = isLib ? func : {
+ 'ary': util.ary,
+ 'assign': util.assign,
+ 'clone': util.clone,
+ 'curry': util.curry,
+ 'forEach': util.forEach,
+ 'isArray': util.isArray,
+ 'isFunction': util.isFunction,
+ 'iteratee': util.iteratee,
+ 'keys': util.keys,
+ 'rearg': util.rearg,
+ 'spread': util.spread,
+ 'toPath': util.toPath
+ };
+
+ var ary = helpers.ary,
+ assign = helpers.assign,
+ clone = helpers.clone,
+ curry = helpers.curry,
+ each = helpers.forEach,
+ isArray = helpers.isArray,
+ isFunction = helpers.isFunction,
+ keys = helpers.keys,
+ rearg = helpers.rearg,
+ spread = helpers.spread,
+ toPath = helpers.toPath;
+
+ var aryMethodKeys = keys(mapping.aryMethod);
+
+ var wrappers = {
+ 'castArray': function(castArray) {
+ return function() {
+ var value = arguments[0];
+ return isArray(value)
+ ? castArray(cloneArray(value))
+ : castArray.apply(undefined, arguments);
+ };
+ },
+ 'iteratee': function(iteratee) {
+ return function() {
+ var func = arguments[0],
+ arity = arguments[1],
+ result = iteratee(func, arity),
+ length = result.length;
+
+ if (config.cap && typeof arity == 'number') {
+ arity = arity > 2 ? (arity - 2) : 1;
+ return (length && length <= arity) ? result : baseAry(result, arity);
+ }
+ return result;
+ };
+ },
+ 'mixin': function(mixin) {
+ return function(source) {
+ var func = this;
+ if (!isFunction(func)) {
+ return mixin(func, Object(source));
+ }
+ var methods = [],
+ methodNames = [];
+
+ each(keys(source), function(key) {
+ var value = source[key];
+ if (isFunction(value)) {
+ methodNames.push(key);
+ methods.push(func.prototype[key]);
+ }
+ });
+
+ mixin(func, Object(source));
+
+ each(methodNames, function(methodName, index) {
+ var method = methods[index];
+ if (isFunction(method)) {
+ func.prototype[methodName] = method;
+ } else {
+ delete func.prototype[methodName];
+ }
+ });
+ return func;
+ };
+ },
+ 'runInContext': function(runInContext) {
+ return function(context) {
+ return baseConvert(util, runInContext(context), options);
+ };
+ }
+ };
+
+ /*--------------------------------------------------------------------------*/
+
+ /**
+ * Creates a clone of `object` by `path`.
+ *
+ * @private
+ * @param {Object} object The object to clone.
+ * @param {Array|string} path The path to clone by.
+ * @returns {Object} Returns the cloned object.
+ */
+ function cloneByPath(object, path) {
+ path = toPath(path);
+
+ var index = -1,
+ length = path.length,
+ result = clone(Object(object)),
+ nested = result;
+
+ while (nested != null && ++index < length) {
+ var key = path[index],
+ value = nested[key];
+
+ if (value != null) {
+ nested[key] = clone(Object(value));
+ }
+ nested = nested[key];
+ }
+ return result;
+ }
+
+ /**
+ * Converts `lodash` to an immutable auto-curried iteratee-first data-last
+ * version with conversion `options` applied.
+ *
+ * @param {Object} [options] The options object. See `baseConvert` for more details.
+ * @returns {Function} Returns the converted `lodash`.
+ */
+ function convertLib(options) {
+ return _.runInContext.convert(options)(undefined);
+ }
+
+ /**
+ * Create a converter function for `func` of `name`.
+ *
+ * @param {string} name The name of the function to convert.
+ * @param {Function} func The function to convert.
+ * @returns {Function} Returns the new converter function.
+ */
+ function createConverter(name, func) {
+ var oldOptions = options;
+ return function(options) {
+ var newUtil = isLib ? pristine : helpers,
+ newFunc = isLib ? pristine[name] : func,
+ newOptions = assign(assign({}, oldOptions), options);
+
+ return baseConvert(newUtil, name, newFunc, newOptions);
+ };
+ }
+
+ /**
+ * Creates a function that wraps `func` to invoke its iteratee, with up to `n`
+ * arguments, ignoring any additional arguments.
+ *
+ * @private
+ * @param {Function} func The function to cap iteratee arguments for.
+ * @param {number} n The arity cap.
+ * @returns {Function} Returns the new function.
+ */
+ function iterateeAry(func, n) {
+ return overArg(func, function(func) {
+ return typeof func == 'function' ? baseAry(func, n) : func;
+ });
+ }
+
+ /**
+ * Creates a function that wraps `func` to invoke its iteratee with arguments
+ * arranged according to the specified `indexes` where the argument value at
+ * the first index is provided as the first argument, the argument value at
+ * the second index is provided as the second argument, and so on.
+ *
+ * @private
+ * @param {Function} func The function to rearrange iteratee arguments for.
+ * @param {number[]} indexes The arranged argument indexes.
+ * @returns {Function} Returns the new function.
+ */
+ function iterateeRearg(func, indexes) {
+ return overArg(func, function(func) {
+ var n = indexes.length;
+ return baseArity(rearg(baseAry(func, n), indexes), n);
+ });
+ }
+
+ /**
+ * Creates a function that invokes `func` with its first argument passed
+ * thru `transform`.
+ *
+ * @private
+ * @param {Function} func The function to wrap.
+ * @param {...Function} transform The functions to transform the first argument.
+ * @returns {Function} Returns the new function.
+ */
+ function overArg(func, transform) {
+ return function() {
+ var length = arguments.length;
+ if (!length) {
+ return func();
+ }
+ var args = Array(length);
+ while (length--) {
+ args[length] = arguments[length];
+ }
+ var index = config.rearg ? 0 : (length - 1);
+ args[index] = transform(args[index]);
+ return func.apply(undefined, args);
+ };
+ }
+
+ /**
+ * Creates a function that wraps `func` and applys the conversions
+ * rules by `name`.
+ *
+ * @private
+ * @param {string} name The name of the function to wrap.
+ * @param {Function} func The function to wrap.
+ * @returns {Function} Returns the converted function.
+ */
+ function wrap(name, func) {
+ name = mapping.aliasToReal[name] || name;
+
+ var result,
+ wrapped = func,
+ wrapper = wrappers[name];
+
+ if (wrapper) {
+ wrapped = wrapper(func);
+ }
+ else if (config.immutable) {
+ if (mutateMap.array[name]) {
+ wrapped = immutWrap(func, cloneArray);
+ }
+ else if (mutateMap.object[name]) {
+ wrapped = immutWrap(func, createCloner(func));
+ }
+ else if (mutateMap.set[name]) {
+ wrapped = immutWrap(func, cloneByPath);
+ }
+ }
+ each(aryMethodKeys, function(aryKey) {
+ each(mapping.aryMethod[aryKey], function(otherName) {
+ if (name == otherName) {
+ var aryN = !isLib && mapping.iterateeAry[name],
+ reargIndexes = mapping.iterateeRearg[name],
+ spreadStart = mapping.methodSpread[name];
+
+ result = wrapped;
+ if (config.fixed && (forceFixed || !mapping.skipFixed[name])) {
+ result = spreadStart === undefined
+ ? ary(result, aryKey)
+ : spread(result, spreadStart);
+ }
+ if (config.rearg && aryKey > 1 && (forceRearg || !mapping.skipRearg[name])) {
+ result = rearg(result, mapping.methodRearg[name] || mapping.aryRearg[aryKey]);
+ }
+ if (config.cap) {
+ if (reargIndexes) {
+ result = iterateeRearg(result, reargIndexes);
+ } else if (aryN) {
+ result = iterateeAry(result, aryN);
+ }
+ }
+ if (forceCurry || (config.curry && aryKey > 1)) {
+ forceCurry && console.log(forceCurry, name);
+ result = curry(result, aryKey);
+ }
+ return false;
+ }
+ });
+ return !result;
+ });
+
+ result || (result = wrapped);
+ if (result == func) {
+ result = forceCurry ? curry(result, 1) : function() {
+ return func.apply(this, arguments);
+ };
+ }
+ result.convert = createConverter(name, func);
+ if (mapping.placeholder[name]) {
+ setPlaceholder = true;
+ result.placeholder = func.placeholder = placeholder;
+ }
+ return result;
+ }
+
+ /*--------------------------------------------------------------------------*/
+
+ if (!isObj) {
+ return wrap(name, func);
+ }
+ var _ = func;
+
+ // Convert methods by ary cap.
+ var pairs = [];
+ each(aryMethodKeys, function(aryKey) {
+ each(mapping.aryMethod[aryKey], function(key) {
+ var func = _[mapping.remap[key] || key];
+ if (func) {
+ pairs.push([key, wrap(key, func)]);
+ }
+ });
+ });
+
+ // Convert remaining methods.
+ each(keys(_), function(key) {
+ var func = _[key];
+ if (typeof func == 'function') {
+ var length = pairs.length;
+ while (length--) {
+ if (pairs[length][0] == key) {
+ return;
+ }
+ }
+ func.convert = createConverter(key, func);
+ pairs.push([key, func]);
+ }
+ });
+
+ // Assign to `_` leaving `_.prototype` unchanged to allow chaining.
+ each(pairs, function(pair) {
+ _[pair[0]] = pair[1];
+ });
+
+ _.convert = convertLib;
+ if (setPlaceholder) {
+ _.placeholder = placeholder;
+ }
+ // Assign aliases.
+ each(keys(_), function(key) {
+ each(mapping.realToAlias[key] || [], function(alias) {
+ _[alias] = _[key];
+ });
+ });
+
+ return _;
+ }
+
+ module.exports = baseConvert;
+
+
+/***/ },
+/* 2 */
+/***/ function(module, exports) {
+
+ /** Used to map aliases to their real names. */
+ exports.aliasToReal = {
+
+ // Lodash aliases.
+ 'each': 'forEach',
+ 'eachRight': 'forEachRight',
+ 'entries': 'toPairs',
+ 'entriesIn': 'toPairsIn',
+ 'extend': 'assignIn',
+ 'extendWith': 'assignInWith',
+ 'first': 'head',
+
+ // Ramda aliases.
+ '__': 'placeholder',
+ 'all': 'every',
+ 'allPass': 'overEvery',
+ 'always': 'constant',
+ 'any': 'some',
+ 'anyPass': 'overSome',
+ 'apply': 'spread',
+ 'assoc': 'set',
+ 'assocPath': 'set',
+ 'complement': 'negate',
+ 'compose': 'flowRight',
+ 'contains': 'includes',
+ 'dissoc': 'unset',
+ 'dissocPath': 'unset',
+ 'equals': 'isEqual',
+ 'identical': 'eq',
+ 'init': 'initial',
+ 'invertObj': 'invert',
+ 'juxt': 'over',
+ 'omitAll': 'omit',
+ 'nAry': 'ary',
+ 'path': 'get',
+ 'pathEq': 'matchesProperty',
+ 'pathOr': 'getOr',
+ 'paths': 'at',
+ 'pickAll': 'pick',
+ 'pipe': 'flow',
+ 'pluck': 'map',
+ 'prop': 'get',
+ 'propEq': 'matchesProperty',
+ 'propOr': 'getOr',
+ 'props': 'at',
+ 'unapply': 'rest',
+ 'unnest': 'flatten',
+ 'useWith': 'overArgs',
+ 'whereEq': 'filter',
+ 'zipObj': 'zipObject'
+ };
+
+ /** Used to map ary to method names. */
+ exports.aryMethod = {
+ '1': [
+ 'attempt', 'castArray', 'ceil', 'create', 'curry', 'curryRight', 'floor',
+ 'flow', 'flowRight', 'fromPairs', 'invert', 'iteratee', 'memoize', 'method',
+ 'methodOf', 'mixin', 'over', 'overEvery', 'overSome', 'rest', 'reverse',
+ 'round', 'runInContext', 'spread', 'template', 'trim', 'trimEnd', 'trimStart',
+ 'uniqueId', 'words'
+ ],
+ '2': [
+ 'add', 'after', 'ary', 'assign', 'assignIn', 'at', 'before', 'bind', 'bindAll',
+ 'bindKey', 'chunk', 'cloneDeepWith', 'cloneWith', 'concat', 'countBy', 'curryN',
+ 'curryRightN', 'debounce', 'defaults', 'defaultsDeep', 'delay', 'difference',
+ 'divide', 'drop', 'dropRight', 'dropRightWhile', 'dropWhile', 'endsWith',
+ 'eq', 'every', 'filter', 'find', 'find', 'findIndex', 'findKey', 'findLast',
+ 'findLastIndex', 'findLastKey', 'flatMap', 'flatMapDeep', 'flattenDepth',
+ 'forEach', 'forEachRight', 'forIn', 'forInRight', 'forOwn', 'forOwnRight',
+ 'get', 'groupBy', 'gt', 'gte', 'has', 'hasIn', 'includes', 'indexOf',
+ 'intersection', 'invertBy', 'invoke', 'invokeMap', 'isEqual', 'isMatch',
+ 'join', 'keyBy', 'lastIndexOf', 'lt', 'lte', 'map', 'mapKeys', 'mapValues',
+ 'matchesProperty', 'maxBy', 'meanBy', 'merge', 'minBy', 'multiply', 'nth',
+ 'omit', 'omitBy', 'overArgs', 'pad', 'padEnd', 'padStart', 'parseInt',
+ 'partial', 'partialRight', 'partition', 'pick', 'pickBy', 'pull', 'pullAll',
+ 'pullAt', 'random', 'range', 'rangeRight', 'rearg', 'reject', 'remove',
+ 'repeat', 'restFrom', 'result', 'sampleSize', 'some', 'sortBy', 'sortedIndex',
+ 'sortedIndexOf', 'sortedLastIndex', 'sortedLastIndexOf', 'sortedUniqBy',
+ 'split', 'spreadFrom', 'startsWith', 'subtract', 'sumBy', 'take', 'takeRight',
+ 'takeRightWhile', 'takeWhile', 'tap', 'throttle', 'thru', 'times', 'trimChars',
+ 'trimCharsEnd', 'trimCharsStart', 'truncate', 'union', 'uniqBy', 'uniqWith',
+ 'unset', 'unzipWith', 'without', 'wrap', 'xor', 'zip', 'zipObject',
+ 'zipObjectDeep'
+ ],
+ '3': [
+ 'assignInWith', 'assignWith', 'clamp', 'differenceBy', 'differenceWith',
+ 'getOr', 'inRange', 'intersectionBy', 'intersectionWith', 'invokeArgs',
+ 'invokeArgsMap', 'isEqualWith', 'isMatchWith', 'flatMapDepth', 'mergeWith',
+ 'orderBy', 'padChars', 'padCharsEnd', 'padCharsStart', 'pullAllBy',
+ 'pullAllWith', 'reduce', 'reduceRight', 'replace', 'set', 'slice',
+ 'sortedIndexBy', 'sortedLastIndexBy', 'transform', 'unionBy', 'unionWith',
+ 'update', 'xorBy', 'xorWith', 'zipWith'
+ ],
+ '4': [
+ 'fill', 'setWith', 'updateWith'
+ ]
+ };
+
+ /** Used to map ary to rearg configs. */
+ exports.aryRearg = {
+ '2': [1, 0],
+ '3': [2, 0, 1],
+ '4': [3, 2, 0, 1]
+ };
+
+ /** Used to map method names to their iteratee ary. */
+ exports.iterateeAry = {
+ 'dropRightWhile': 1,
+ 'dropWhile': 1,
+ 'every': 1,
+ 'filter': 1,
+ 'find': 1,
+ 'findIndex': 1,
+ 'findKey': 1,
+ 'findLast': 1,
+ 'findLastIndex': 1,
+ 'findLastKey': 1,
+ 'flatMap': 1,
+ 'flatMapDeep': 1,
+ 'flatMapDepth': 1,
+ 'forEach': 1,
+ 'forEachRight': 1,
+ 'forIn': 1,
+ 'forInRight': 1,
+ 'forOwn': 1,
+ 'forOwnRight': 1,
+ 'map': 1,
+ 'mapKeys': 1,
+ 'mapValues': 1,
+ 'partition': 1,
+ 'reduce': 2,
+ 'reduceRight': 2,
+ 'reject': 1,
+ 'remove': 1,
+ 'some': 1,
+ 'takeRightWhile': 1,
+ 'takeWhile': 1,
+ 'times': 1,
+ 'transform': 2
+ };
+
+ /** Used to map method names to iteratee rearg configs. */
+ exports.iterateeRearg = {
+ 'mapKeys': [1]
+ };
+
+ /** Used to map method names to rearg configs. */
+ exports.methodRearg = {
+ 'assignInWith': [1, 2, 0],
+ 'assignWith': [1, 2, 0],
+ 'getOr': [2, 1, 0],
+ 'isEqualWith': [1, 2, 0],
+ 'isMatchWith': [2, 1, 0],
+ 'mergeWith': [1, 2, 0],
+ 'padChars': [2, 1, 0],
+ 'padCharsEnd': [2, 1, 0],
+ 'padCharsStart': [2, 1, 0],
+ 'pullAllBy': [2, 1, 0],
+ 'pullAllWith': [2, 1, 0],
+ 'setWith': [3, 1, 2, 0],
+ 'sortedIndexBy': [2, 1, 0],
+ 'sortedLastIndexBy': [2, 1, 0],
+ 'updateWith': [3, 1, 2, 0],
+ 'zipWith': [1, 2, 0]
+ };
+
+ /** Used to map method names to spread configs. */
+ exports.methodSpread = {
+ 'invokeArgs': 2,
+ 'invokeArgsMap': 2,
+ 'partial': 1,
+ 'partialRight': 1,
+ 'without': 1
+ };
+
+ /** Used to identify methods which mutate arrays or objects. */
+ exports.mutate = {
+ 'array': {
+ 'fill': true,
+ 'pull': true,
+ 'pullAll': true,
+ 'pullAllBy': true,
+ 'pullAllWith': true,
+ 'pullAt': true,
+ 'remove': true,
+ 'reverse': true
+ },
+ 'object': {
+ 'assign': true,
+ 'assignIn': true,
+ 'assignInWith': true,
+ 'assignWith': true,
+ 'defaults': true,
+ 'defaultsDeep': true,
+ 'merge': true,
+ 'mergeWith': true
+ },
+ 'set': {
+ 'set': true,
+ 'setWith': true,
+ 'unset': true,
+ 'update': true,
+ 'updateWith': true
+ }
+ };
+
+ /** Used to track methods with placeholder support */
+ exports.placeholder = {
+ 'bind': true,
+ 'bindKey': true,
+ 'curry': true,
+ 'curryRight': true,
+ 'partial': true,
+ 'partialRight': true
+ };
+
+ /** Used to map real names to their aliases. */
+ exports.realToAlias = (function() {
+ var hasOwnProperty = Object.prototype.hasOwnProperty,
+ object = exports.aliasToReal,
+ result = {};
+
+ for (var key in object) {
+ var value = object[key];
+ if (hasOwnProperty.call(result, value)) {
+ result[value].push(key);
+ } else {
+ result[value] = [key];
+ }
+ }
+ return result;
+ }());
+
+ /** Used to map method names to other names. */
+ exports.remap = {
+ 'curryN': 'curry',
+ 'curryRightN': 'curryRight',
+ 'getOr': 'get',
+ 'invokeArgs': 'invoke',
+ 'invokeArgsMap': 'invokeMap',
+ 'padChars': 'pad',
+ 'padCharsEnd': 'padEnd',
+ 'padCharsStart': 'padStart',
+ 'restFrom': 'rest',
+ 'spreadFrom': 'spread',
+ 'trimChars': 'trim',
+ 'trimCharsEnd': 'trimEnd',
+ 'trimCharsStart': 'trimStart'
+ };
+
+ /** Used to track methods that skip fixing their arity. */
+ exports.skipFixed = {
+ 'castArray': true,
+ 'flow': true,
+ 'flowRight': true,
+ 'iteratee': true,
+ 'mixin': true,
+ 'runInContext': true
+ };
+
+ /** Used to track methods that skip rearranging arguments. */
+ exports.skipRearg = {
+ 'add': true,
+ 'assign': true,
+ 'assignIn': true,
+ 'bind': true,
+ 'bindKey': true,
+ 'concat': true,
+ 'difference': true,
+ 'divide': true,
+ 'eq': true,
+ 'gt': true,
+ 'gte': true,
+ 'isEqual': true,
+ 'lt': true,
+ 'lte': true,
+ 'matchesProperty': true,
+ 'merge': true,
+ 'multiply': true,
+ 'overArgs': true,
+ 'partial': true,
+ 'partialRight': true,
+ 'random': true,
+ 'range': true,
+ 'rangeRight': true,
+ 'subtract': true,
+ 'without': true,
+ 'zip': true,
+ 'zipObject': true
+ };
+
+
+/***/ },
+/* 3 */
+/***/ function(module, exports) {
+
+ /**
+ * The default argument placeholder value for methods.
+ *
+ * @type {Object}
+ */
+ module.exports = {};
+
+
+/***/ }
+/******/ ])
+});
+;
\ No newline at end of file
diff --git a/views/ngXosViews/serviceGrid/src/vendor/lodash/dist/lodash.fp.min.js b/views/ngXosViews/serviceGrid/src/vendor/lodash/dist/lodash.fp.min.js
new file mode 100644
index 0000000..bd12b9e
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/lodash/dist/lodash.fp.min.js
@@ -0,0 +1,16 @@
+!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.fp=e():t.fp=e()}(this,function(){return function(t){function e(n){if(r[n])return r[n].exports;var i=r[n]={exports:{},id:n,loaded:!1};return t[n].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var r={};return e.m=t,e.c=r,e.p="",e(0)}([function(t,e,r){function n(t,e){return i(t,t,e)}var i=r(1);"function"==typeof _&&(_=n(_.runInContext())),
+t.exports=n},function(t,e,r){function n(t,e){return 2==e?function(e,r){return t.apply(void 0,arguments)}:function(e){return t.apply(void 0,arguments)}}function i(t,e){return 2==e?function(e,r){return t(e,r)}:function(e){return t(e)}}function a(t){for(var e=t?t.length:0,r=Array(e);e--;)r[e]=t[e];return r}function o(t){return function(e){return t({},e)}}function s(t,e){return function(){var r=arguments.length;if(!r)return i;for(var n=Array(r);r--;)n[r]=arguments[r];var i=n[0]=e.apply(void 0,n);return t.apply(void 0,n),
+i}}function u(t,e,r,d){function f(t,e){e=F(e);for(var r=-1,n=e.length,i=M(Object(t)),a=i;null!=a&&++r<n;){var o=e[r],s=a[o];null!=s&&(a[o]=M(Object(s))),a=a[o]}return i}function h(t){return N.runInContext.convert(t)(void 0)}function y(t,e){var r=d;return function(n){var i=R?B:j,a=R?B[t]:e,o=w(w({},r),n);return u(i,t,a,o)}}function g(t,e){return v(t,function(t){return"function"==typeof t?i(t,e):t})}function m(t,e){return v(t,function(t){var r=e.length;return n(L(i(t,r),e),r)})}function v(t,e){return function(){
+var r=arguments.length;if(!r)return t();for(var n=Array(r);r--;)n[r]=arguments[r];var i=I.rearg?0:r-1;return n[i]=e(n[i]),t.apply(void 0,n)}}function x(t,e){t=p.aliasToReal[t]||t;var r,n=e,i=_[t];return i?n=i(e):I.immutable&&(l.array[t]?n=s(e,a):l.object[t]?n=s(e,o(e)):l.set[t]&&(n=s(e,f))),P(T,function(e){return P(p.aryMethod[e],function(i){if(t==i){var a=!R&&p.iterateeAry[t],o=p.iterateeRearg[t],s=p.methodSpread[t];return r=n,!I.fixed||!k&&p.skipFixed[t]||(r=void 0===s?C(r,e):D(r,s)),I.rearg&&e>1&&(E||!p.skipRearg[t])&&(r=L(r,p.methodRearg[t]||p.aryRearg[e])),
+I.cap&&(o?r=m(r,o):a&&(r=g(r,a))),(b||I.curry&&e>1)&&(b&&console.log(b,t),r=q(r,e)),!1}}),!r}),r||(r=n),r==e&&(r=b?q(r,1):function(){return e.apply(this,arguments)}),r.convert=y(t,e),p.placeholder[t]&&(W=!0,r.placeholder=e.placeholder=O),r}var W,R="function"==typeof e,A=e===Object(e);if(A&&(d=r,r=e,e=void 0),null==r)throw new TypeError;d||(d={});var I={cap:"cap"in d?d.cap:!0,curry:"curry"in d?d.curry:!0,fixed:"fixed"in d?d.fixed:!0,immutable:"immutable"in d?d.immutable:!0,rearg:"rearg"in d?d.rearg:!0
+},b="curry"in d&&d.curry,k="fixed"in d&&d.fixed,E="rearg"in d&&d.rearg,O=R?r:c,B=R?r.runInContext():void 0,j=R?r:{ary:t.ary,assign:t.assign,clone:t.clone,curry:t.curry,forEach:t.forEach,isArray:t.isArray,isFunction:t.isFunction,iteratee:t.iteratee,keys:t.keys,rearg:t.rearg,spread:t.spread,toPath:t.toPath},C=j.ary,w=j.assign,M=j.clone,q=j.curry,P=j.forEach,S=j.isArray,z=j.isFunction,K=j.keys,L=j.rearg,D=j.spread,F=j.toPath,T=K(p.aryMethod),_={castArray:function(t){return function(){var e=arguments[0];
+return S(e)?t(a(e)):t.apply(void 0,arguments)}},iteratee:function(t){return function(){var e=arguments[0],r=arguments[1],n=t(e,r),a=n.length;return I.cap&&"number"==typeof r?(r=r>2?r-2:1,a&&r>=a?n:i(n,r)):n}},mixin:function(t){return function(e){var r=this;if(!z(r))return t(r,Object(e));var n=[],i=[];return P(K(e),function(t){var a=e[t];z(a)&&(i.push(t),n.push(r.prototype[t]))}),t(r,Object(e)),P(i,function(t,e){var i=n[e];z(i)?r.prototype[t]=i:delete r.prototype[t]}),r}},runInContext:function(e){
+return function(r){return u(t,e(r),d)}}};if(!A)return x(e,r);var N=r,V=[];return P(T,function(t){P(p.aryMethod[t],function(t){var e=N[p.remap[t]||t];e&&V.push([t,x(t,e)])})}),P(K(N),function(t){var e=N[t];if("function"==typeof e){for(var r=V.length;r--;)if(V[r][0]==t)return;e.convert=y(t,e),V.push([t,e])}}),P(V,function(t){N[t[0]]=t[1]}),N.convert=h,W&&(N.placeholder=O),P(K(N),function(t){P(p.realToAlias[t]||[],function(e){N[e]=N[t]})}),N}var p=r(2),l=p.mutate,c=r(3);t.exports=u},function(t,e){e.aliasToReal={
+each:"forEach",eachRight:"forEachRight",entries:"toPairs",entriesIn:"toPairsIn",extend:"assignIn",extendWith:"assignInWith",first:"head",__:"placeholder",all:"every",allPass:"overEvery",always:"constant",any:"some",anyPass:"overSome",apply:"spread",assoc:"set",assocPath:"set",complement:"negate",compose:"flowRight",contains:"includes",dissoc:"unset",dissocPath:"unset",equals:"isEqual",identical:"eq",init:"initial",invertObj:"invert",juxt:"over",omitAll:"omit",nAry:"ary",path:"get",pathEq:"matchesProperty",
+pathOr:"getOr",paths:"at",pickAll:"pick",pipe:"flow",pluck:"map",prop:"get",propEq:"matchesProperty",propOr:"getOr",props:"at",unapply:"rest",unnest:"flatten",useWith:"overArgs",whereEq:"filter",zipObj:"zipObject"},e.aryMethod={1:["attempt","castArray","ceil","create","curry","curryRight","floor","flow","flowRight","fromPairs","invert","iteratee","memoize","method","methodOf","mixin","over","overEvery","overSome","rest","reverse","round","runInContext","spread","template","trim","trimEnd","trimStart","uniqueId","words"],
+2:["add","after","ary","assign","assignIn","at","before","bind","bindAll","bindKey","chunk","cloneDeepWith","cloneWith","concat","countBy","curryN","curryRightN","debounce","defaults","defaultsDeep","delay","difference","divide","drop","dropRight","dropRightWhile","dropWhile","endsWith","eq","every","filter","find","find","findIndex","findKey","findLast","findLastIndex","findLastKey","flatMap","flatMapDeep","flattenDepth","forEach","forEachRight","forIn","forInRight","forOwn","forOwnRight","get","groupBy","gt","gte","has","hasIn","includes","indexOf","intersection","invertBy","invoke","invokeMap","isEqual","isMatch","join","keyBy","lastIndexOf","lt","lte","map","mapKeys","mapValues","matchesProperty","maxBy","meanBy","merge","minBy","multiply","nth","omit","omitBy","overArgs","pad","padEnd","padStart","parseInt","partial","partialRight","partition","pick","pickBy","pull","pullAll","pullAt","random","range","rangeRight","rearg","reject","remove","repeat","restFrom","result","sampleSize","some","sortBy","sortedIndex","sortedIndexOf","sortedLastIndex","sortedLastIndexOf","sortedUniqBy","split","spreadFrom","startsWith","subtract","sumBy","take","takeRight","takeRightWhile","takeWhile","tap","throttle","thru","times","trimChars","trimCharsEnd","trimCharsStart","truncate","union","uniqBy","uniqWith","unset","unzipWith","without","wrap","xor","zip","zipObject","zipObjectDeep"],
+3:["assignInWith","assignWith","clamp","differenceBy","differenceWith","getOr","inRange","intersectionBy","intersectionWith","invokeArgs","invokeArgsMap","isEqualWith","isMatchWith","flatMapDepth","mergeWith","orderBy","padChars","padCharsEnd","padCharsStart","pullAllBy","pullAllWith","reduce","reduceRight","replace","set","slice","sortedIndexBy","sortedLastIndexBy","transform","unionBy","unionWith","update","xorBy","xorWith","zipWith"],4:["fill","setWith","updateWith"]},e.aryRearg={2:[1,0],3:[2,0,1],
+4:[3,2,0,1]},e.iterateeAry={dropRightWhile:1,dropWhile:1,every:1,filter:1,find:1,findIndex:1,findKey:1,findLast:1,findLastIndex:1,findLastKey:1,flatMap:1,flatMapDeep:1,flatMapDepth:1,forEach:1,forEachRight:1,forIn:1,forInRight:1,forOwn:1,forOwnRight:1,map:1,mapKeys:1,mapValues:1,partition:1,reduce:2,reduceRight:2,reject:1,remove:1,some:1,takeRightWhile:1,takeWhile:1,times:1,transform:2},e.iterateeRearg={mapKeys:[1]},e.methodRearg={assignInWith:[1,2,0],assignWith:[1,2,0],getOr:[2,1,0],isEqualWith:[1,2,0],
+isMatchWith:[2,1,0],mergeWith:[1,2,0],padChars:[2,1,0],padCharsEnd:[2,1,0],padCharsStart:[2,1,0],pullAllBy:[2,1,0],pullAllWith:[2,1,0],setWith:[3,1,2,0],sortedIndexBy:[2,1,0],sortedLastIndexBy:[2,1,0],updateWith:[3,1,2,0],zipWith:[1,2,0]},e.methodSpread={invokeArgs:2,invokeArgsMap:2,partial:1,partialRight:1,without:1},e.mutate={array:{fill:!0,pull:!0,pullAll:!0,pullAllBy:!0,pullAllWith:!0,pullAt:!0,remove:!0,reverse:!0},object:{assign:!0,assignIn:!0,assignInWith:!0,assignWith:!0,defaults:!0,defaultsDeep:!0,
+merge:!0,mergeWith:!0},set:{set:!0,setWith:!0,unset:!0,update:!0,updateWith:!0}},e.placeholder={bind:!0,bindKey:!0,curry:!0,curryRight:!0,partial:!0,partialRight:!0},e.realToAlias=function(){var t=Object.prototype.hasOwnProperty,r=e.aliasToReal,n={};for(var i in r){var a=r[i];t.call(n,a)?n[a].push(i):n[a]=[i]}return n}(),e.remap={curryN:"curry",curryRightN:"curryRight",getOr:"get",invokeArgs:"invoke",invokeArgsMap:"invokeMap",padChars:"pad",padCharsEnd:"padEnd",padCharsStart:"padStart",restFrom:"rest",
+spreadFrom:"spread",trimChars:"trim",trimCharsEnd:"trimEnd",trimCharsStart:"trimStart"},e.skipFixed={castArray:!0,flow:!0,flowRight:!0,iteratee:!0,mixin:!0,runInContext:!0},e.skipRearg={add:!0,assign:!0,assignIn:!0,bind:!0,bindKey:!0,concat:!0,difference:!0,divide:!0,eq:!0,gt:!0,gte:!0,isEqual:!0,lt:!0,lte:!0,matchesProperty:!0,merge:!0,multiply:!0,overArgs:!0,partial:!0,partialRight:!0,random:!0,range:!0,rangeRight:!0,subtract:!0,without:!0,zip:!0,zipObject:!0}},function(t,e){t.exports={}}])});
\ No newline at end of file
diff --git a/views/ngXosViews/serviceGrid/src/vendor/lodash/dist/lodash.js b/views/ngXosViews/serviceGrid/src/vendor/lodash/dist/lodash.js
new file mode 100644
index 0000000..7bc771f
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/lodash/dist/lodash.js
@@ -0,0 +1,16149 @@
+/**
+ * @license
+ * lodash 4.11.2 (Custom Build) <https://lodash.com/>
+ * Build: `lodash -o ./dist/lodash.js`
+ * Copyright jQuery Foundation and other contributors <https://jquery.org/>
+ * Released under MIT license <https://lodash.com/license>
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
+ * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+ */
+;(function() {
+
+ /** Used as a safe reference for `undefined` in pre-ES5 environments. */
+ var undefined;
+
+ /** Used as the semantic version number. */
+ var VERSION = '4.11.2';
+
+ /** Used as the size to enable large array optimizations. */
+ var LARGE_ARRAY_SIZE = 200;
+
+ /** Used as the `TypeError` message for "Functions" methods. */
+ var FUNC_ERROR_TEXT = 'Expected a function';
+
+ /** Used to stand-in for `undefined` hash values. */
+ var HASH_UNDEFINED = '__lodash_hash_undefined__';
+
+ /** Used as the internal argument placeholder. */
+ var PLACEHOLDER = '__lodash_placeholder__';
+
+ /** Used to compose bitmasks for wrapper metadata. */
+ var BIND_FLAG = 1,
+ BIND_KEY_FLAG = 2,
+ CURRY_BOUND_FLAG = 4,
+ CURRY_FLAG = 8,
+ CURRY_RIGHT_FLAG = 16,
+ PARTIAL_FLAG = 32,
+ PARTIAL_RIGHT_FLAG = 64,
+ ARY_FLAG = 128,
+ REARG_FLAG = 256,
+ FLIP_FLAG = 512;
+
+ /** Used to compose bitmasks for comparison styles. */
+ var UNORDERED_COMPARE_FLAG = 1,
+ PARTIAL_COMPARE_FLAG = 2;
+
+ /** Used as default options for `_.truncate`. */
+ var DEFAULT_TRUNC_LENGTH = 30,
+ DEFAULT_TRUNC_OMISSION = '...';
+
+ /** Used to detect hot functions by number of calls within a span of milliseconds. */
+ var HOT_COUNT = 150,
+ HOT_SPAN = 16;
+
+ /** Used to indicate the type of lazy iteratees. */
+ var LAZY_FILTER_FLAG = 1,
+ LAZY_MAP_FLAG = 2,
+ LAZY_WHILE_FLAG = 3;
+
+ /** Used as references for various `Number` constants. */
+ var INFINITY = 1 / 0,
+ MAX_SAFE_INTEGER = 9007199254740991,
+ MAX_INTEGER = 1.7976931348623157e+308,
+ NAN = 0 / 0;
+
+ /** Used as references for the maximum length and index of an array. */
+ var MAX_ARRAY_LENGTH = 4294967295,
+ MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1,
+ HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1;
+
+ /** `Object#toString` result references. */
+ var argsTag = '[object Arguments]',
+ arrayTag = '[object Array]',
+ boolTag = '[object Boolean]',
+ dateTag = '[object Date]',
+ errorTag = '[object Error]',
+ funcTag = '[object Function]',
+ genTag = '[object GeneratorFunction]',
+ mapTag = '[object Map]',
+ numberTag = '[object Number]',
+ objectTag = '[object Object]',
+ promiseTag = '[object Promise]',
+ regexpTag = '[object RegExp]',
+ setTag = '[object Set]',
+ stringTag = '[object String]',
+ symbolTag = '[object Symbol]',
+ weakMapTag = '[object WeakMap]',
+ weakSetTag = '[object WeakSet]';
+
+ var arrayBufferTag = '[object ArrayBuffer]',
+ dataViewTag = '[object DataView]',
+ float32Tag = '[object Float32Array]',
+ float64Tag = '[object Float64Array]',
+ int8Tag = '[object Int8Array]',
+ int16Tag = '[object Int16Array]',
+ int32Tag = '[object Int32Array]',
+ uint8Tag = '[object Uint8Array]',
+ uint8ClampedTag = '[object Uint8ClampedArray]',
+ uint16Tag = '[object Uint16Array]',
+ uint32Tag = '[object Uint32Array]';
+
+ /** Used to match empty string literals in compiled template source. */
+ var reEmptyStringLeading = /\b__p \+= '';/g,
+ reEmptyStringMiddle = /\b(__p \+=) '' \+/g,
+ reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g;
+
+ /** Used to match HTML entities and HTML characters. */
+ var reEscapedHtml = /&(?:amp|lt|gt|quot|#39|#96);/g,
+ reUnescapedHtml = /[&<>"'`]/g,
+ reHasEscapedHtml = RegExp(reEscapedHtml.source),
+ reHasUnescapedHtml = RegExp(reUnescapedHtml.source);
+
+ /** Used to match template delimiters. */
+ var reEscape = /<%-([\s\S]+?)%>/g,
+ reEvaluate = /<%([\s\S]+?)%>/g,
+ reInterpolate = /<%=([\s\S]+?)%>/g;
+
+ /** Used to match property names within property paths. */
+ var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
+ reIsPlainProp = /^\w*$/,
+ rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]/g;
+
+ /**
+ * Used to match `RegExp`
+ * [syntax characters](http://ecma-international.org/ecma-262/6.0/#sec-patterns).
+ */
+ var reRegExpChar = /[\\^$.*+?()[\]{}|]/g,
+ reHasRegExpChar = RegExp(reRegExpChar.source);
+
+ /** Used to match leading and trailing whitespace. */
+ var reTrim = /^\s+|\s+$/g,
+ reTrimStart = /^\s+/,
+ reTrimEnd = /\s+$/;
+
+ /** Used to match non-compound words composed of alphanumeric characters. */
+ var reBasicWord = /[a-zA-Z0-9]+/g;
+
+ /** Used to match backslashes in property paths. */
+ var reEscapeChar = /\\(\\)?/g;
+
+ /**
+ * Used to match
+ * [ES template delimiters](http://ecma-international.org/ecma-262/6.0/#sec-template-literal-lexical-components).
+ */
+ var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g;
+
+ /** Used to match `RegExp` flags from their coerced string values. */
+ var reFlags = /\w*$/;
+
+ /** Used to detect hexadecimal string values. */
+ var reHasHexPrefix = /^0x/i;
+
+ /** Used to detect bad signed hexadecimal string values. */
+ var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
+
+ /** Used to detect binary string values. */
+ var reIsBinary = /^0b[01]+$/i;
+
+ /** Used to detect host constructors (Safari). */
+ var reIsHostCtor = /^\[object .+?Constructor\]$/;
+
+ /** Used to detect octal string values. */
+ var reIsOctal = /^0o[0-7]+$/i;
+
+ /** Used to detect unsigned integer values. */
+ var reIsUint = /^(?:0|[1-9]\d*)$/;
+
+ /** Used to match latin-1 supplementary letters (excluding mathematical operators). */
+ var reLatin1 = /[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g;
+
+ /** Used to ensure capturing order of template delimiters. */
+ var reNoMatch = /($^)/;
+
+ /** Used to match unescaped characters in compiled string literals. */
+ var reUnescapedString = /['\n\r\u2028\u2029\\]/g;
+
+ /** Used to compose unicode character classes. */
+ var rsAstralRange = '\\ud800-\\udfff',
+ rsComboMarksRange = '\\u0300-\\u036f\\ufe20-\\ufe23',
+ rsComboSymbolsRange = '\\u20d0-\\u20f0',
+ rsDingbatRange = '\\u2700-\\u27bf',
+ rsLowerRange = 'a-z\\xdf-\\xf6\\xf8-\\xff',
+ rsMathOpRange = '\\xac\\xb1\\xd7\\xf7',
+ rsNonCharRange = '\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf',
+ rsPunctuationRange = '\\u2000-\\u206f',
+ rsSpaceRange = ' \\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',
+ rsUpperRange = 'A-Z\\xc0-\\xd6\\xd8-\\xde',
+ rsVarRange = '\\ufe0e\\ufe0f',
+ rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange;
+
+ /** Used to compose unicode capture groups. */
+ var rsApos = "['\u2019]",
+ rsAstral = '[' + rsAstralRange + ']',
+ rsBreak = '[' + rsBreakRange + ']',
+ rsCombo = '[' + rsComboMarksRange + rsComboSymbolsRange + ']',
+ rsDigits = '\\d+',
+ rsDingbat = '[' + rsDingbatRange + ']',
+ rsLower = '[' + rsLowerRange + ']',
+ rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']',
+ rsFitz = '\\ud83c[\\udffb-\\udfff]',
+ rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',
+ rsNonAstral = '[^' + rsAstralRange + ']',
+ rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}',
+ rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]',
+ rsUpper = '[' + rsUpperRange + ']',
+ rsZWJ = '\\u200d';
+
+ /** Used to compose unicode regexes. */
+ var rsLowerMisc = '(?:' + rsLower + '|' + rsMisc + ')',
+ rsUpperMisc = '(?:' + rsUpper + '|' + rsMisc + ')',
+ rsOptLowerContr = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?',
+ rsOptUpperContr = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?',
+ reOptMod = rsModifier + '?',
+ rsOptVar = '[' + rsVarRange + ']?',
+ rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',
+ rsSeq = rsOptVar + reOptMod + rsOptJoin,
+ rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq,
+ rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';
+
+ /** Used to match apostrophes. */
+ var reApos = RegExp(rsApos, 'g');
+
+ /**
+ * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and
+ * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols).
+ */
+ var reComboMark = RegExp(rsCombo, 'g');
+
+ /** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */
+ var reComplexSymbol = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');
+
+ /** Used to match complex or compound words. */
+ var reComplexWord = RegExp([
+ rsUpper + '?' + rsLower + '+' + rsOptLowerContr + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')',
+ rsUpperMisc + '+' + rsOptUpperContr + '(?=' + [rsBreak, rsUpper + rsLowerMisc, '$'].join('|') + ')',
+ rsUpper + '?' + rsLowerMisc + '+' + rsOptLowerContr,
+ rsUpper + '+' + rsOptUpperContr,
+ rsDigits,
+ rsEmoji
+ ].join('|'), 'g');
+
+ /** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */
+ var reHasComplexSymbol = RegExp('[' + rsZWJ + rsAstralRange + rsComboMarksRange + rsComboSymbolsRange + rsVarRange + ']');
+
+ /** Used to detect strings that need a more robust regexp to match words. */
+ var reHasComplexWord = /[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;
+
+ /** Used to assign default `context` object properties. */
+ var contextProps = [
+ 'Array', 'Buffer', 'DataView', 'Date', 'Error', 'Float32Array', 'Float64Array',
+ 'Function', 'Int8Array', 'Int16Array', 'Int32Array', 'Map', 'Math', 'Object',
+ 'Promise', 'Reflect', 'RegExp', 'Set', 'String', 'Symbol', 'TypeError',
+ 'Uint8Array', 'Uint8ClampedArray', 'Uint16Array', 'Uint32Array', 'WeakMap',
+ '_', 'clearTimeout', 'isFinite', 'parseInt', 'setTimeout'
+ ];
+
+ /** Used to make template sourceURLs easier to identify. */
+ var templateCounter = -1;
+
+ /** Used to identify `toStringTag` values of typed arrays. */
+ var typedArrayTags = {};
+ typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =
+ typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =
+ typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =
+ typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =
+ typedArrayTags[uint32Tag] = true;
+ typedArrayTags[argsTag] = typedArrayTags[arrayTag] =
+ typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =
+ typedArrayTags[dataViewTag] = typedArrayTags[dateTag] =
+ typedArrayTags[errorTag] = typedArrayTags[funcTag] =
+ typedArrayTags[mapTag] = typedArrayTags[numberTag] =
+ typedArrayTags[objectTag] = typedArrayTags[regexpTag] =
+ typedArrayTags[setTag] = typedArrayTags[stringTag] =
+ typedArrayTags[weakMapTag] = false;
+
+ /** Used to identify `toStringTag` values supported by `_.clone`. */
+ var cloneableTags = {};
+ cloneableTags[argsTag] = cloneableTags[arrayTag] =
+ cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =
+ cloneableTags[boolTag] = cloneableTags[dateTag] =
+ cloneableTags[float32Tag] = cloneableTags[float64Tag] =
+ cloneableTags[int8Tag] = cloneableTags[int16Tag] =
+ cloneableTags[int32Tag] = cloneableTags[mapTag] =
+ cloneableTags[numberTag] = cloneableTags[objectTag] =
+ cloneableTags[regexpTag] = cloneableTags[setTag] =
+ cloneableTags[stringTag] = cloneableTags[symbolTag] =
+ cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =
+ cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
+ cloneableTags[errorTag] = cloneableTags[funcTag] =
+ cloneableTags[weakMapTag] = false;
+
+ /** Used to map latin-1 supplementary letters to basic latin letters. */
+ var deburredLetters = {
+ '\xc0': 'A', '\xc1': 'A', '\xc2': 'A', '\xc3': 'A', '\xc4': 'A', '\xc5': 'A',
+ '\xe0': 'a', '\xe1': 'a', '\xe2': 'a', '\xe3': 'a', '\xe4': 'a', '\xe5': 'a',
+ '\xc7': 'C', '\xe7': 'c',
+ '\xd0': 'D', '\xf0': 'd',
+ '\xc8': 'E', '\xc9': 'E', '\xca': 'E', '\xcb': 'E',
+ '\xe8': 'e', '\xe9': 'e', '\xea': 'e', '\xeb': 'e',
+ '\xcC': 'I', '\xcd': 'I', '\xce': 'I', '\xcf': 'I',
+ '\xeC': 'i', '\xed': 'i', '\xee': 'i', '\xef': 'i',
+ '\xd1': 'N', '\xf1': 'n',
+ '\xd2': 'O', '\xd3': 'O', '\xd4': 'O', '\xd5': 'O', '\xd6': 'O', '\xd8': 'O',
+ '\xf2': 'o', '\xf3': 'o', '\xf4': 'o', '\xf5': 'o', '\xf6': 'o', '\xf8': 'o',
+ '\xd9': 'U', '\xda': 'U', '\xdb': 'U', '\xdc': 'U',
+ '\xf9': 'u', '\xfa': 'u', '\xfb': 'u', '\xfc': 'u',
+ '\xdd': 'Y', '\xfd': 'y', '\xff': 'y',
+ '\xc6': 'Ae', '\xe6': 'ae',
+ '\xde': 'Th', '\xfe': 'th',
+ '\xdf': 'ss'
+ };
+
+ /** Used to map characters to HTML entities. */
+ var htmlEscapes = {
+ '&': '&',
+ '<': '<',
+ '>': '>',
+ '"': '"',
+ "'": ''',
+ '`': '`'
+ };
+
+ /** Used to map HTML entities to characters. */
+ var htmlUnescapes = {
+ '&': '&',
+ '<': '<',
+ '>': '>',
+ '"': '"',
+ ''': "'",
+ '`': '`'
+ };
+
+ /** Used to determine if values are of the language type `Object`. */
+ var objectTypes = {
+ 'function': true,
+ 'object': true
+ };
+
+ /** Used to escape characters for inclusion in compiled string literals. */
+ var stringEscapes = {
+ '\\': '\\',
+ "'": "'",
+ '\n': 'n',
+ '\r': 'r',
+ '\u2028': 'u2028',
+ '\u2029': 'u2029'
+ };
+
+ /** Built-in method references without a dependency on `root`. */
+ var freeParseFloat = parseFloat,
+ freeParseInt = parseInt;
+
+ /** Detect free variable `exports`. */
+ var freeExports = (objectTypes[typeof exports] && exports && !exports.nodeType)
+ ? exports
+ : undefined;
+
+ /** Detect free variable `module`. */
+ var freeModule = (objectTypes[typeof module] && module && !module.nodeType)
+ ? module
+ : undefined;
+
+ /** Detect the popular CommonJS extension `module.exports`. */
+ var moduleExports = (freeModule && freeModule.exports === freeExports)
+ ? freeExports
+ : undefined;
+
+ /** Detect free variable `global` from Node.js. */
+ var freeGlobal = checkGlobal(freeExports && freeModule && typeof global == 'object' && global);
+
+ /** Detect free variable `self`. */
+ var freeSelf = checkGlobal(objectTypes[typeof self] && self);
+
+ /** Detect free variable `window`. */
+ var freeWindow = checkGlobal(objectTypes[typeof window] && window);
+
+ /** Detect `this` as the global object. */
+ var thisGlobal = checkGlobal(objectTypes[typeof this] && this);
+
+ /**
+ * Used as a reference to the global object.
+ *
+ * The `this` value is used if it's the global object to avoid Greasemonkey's
+ * restricted `window` object, otherwise the `window` object is used.
+ */
+ var root = freeGlobal ||
+ ((freeWindow !== (thisGlobal && thisGlobal.window)) && freeWindow) ||
+ freeSelf || thisGlobal || Function('return this')();
+
+ /*--------------------------------------------------------------------------*/
+
+ /**
+ * Adds the key-value `pair` to `map`.
+ *
+ * @private
+ * @param {Object} map The map to modify.
+ * @param {Array} pair The key-value pair to add.
+ * @returns {Object} Returns `map`.
+ */
+ function addMapEntry(map, pair) {
+ // Don't return `Map#set` because it doesn't return the map instance in IE 11.
+ map.set(pair[0], pair[1]);
+ return map;
+ }
+
+ /**
+ * Adds `value` to `set`.
+ *
+ * @private
+ * @param {Object} set The set to modify.
+ * @param {*} value The value to add.
+ * @returns {Object} Returns `set`.
+ */
+ function addSetEntry(set, value) {
+ set.add(value);
+ return set;
+ }
+
+ /**
+ * A faster alternative to `Function#apply`, this function invokes `func`
+ * with the `this` binding of `thisArg` and the arguments of `args`.
+ *
+ * @private
+ * @param {Function} func The function to invoke.
+ * @param {*} thisArg The `this` binding of `func`.
+ * @param {Array} args The arguments to invoke `func` with.
+ * @returns {*} Returns the result of `func`.
+ */
+ function apply(func, thisArg, args) {
+ var length = args.length;
+ switch (length) {
+ case 0: return func.call(thisArg);
+ case 1: return func.call(thisArg, args[0]);
+ case 2: return func.call(thisArg, args[0], args[1]);
+ case 3: return func.call(thisArg, args[0], args[1], args[2]);
+ }
+ return func.apply(thisArg, args);
+ }
+
+ /**
+ * A specialized version of `baseAggregator` for arrays.
+ *
+ * @private
+ * @param {Array} array The array to iterate over.
+ * @param {Function} setter The function to set `accumulator` values.
+ * @param {Function} iteratee The iteratee to transform keys.
+ * @param {Object} accumulator The initial aggregated object.
+ * @returns {Function} Returns `accumulator`.
+ */
+ function arrayAggregator(array, setter, iteratee, accumulator) {
+ var index = -1,
+ length = array.length;
+
+ while (++index < length) {
+ var value = array[index];
+ setter(accumulator, value, iteratee(value), array);
+ }
+ return accumulator;
+ }
+
+ /**
+ * Creates a new array concatenating `array` with `other`.
+ *
+ * @private
+ * @param {Array} array The first array to concatenate.
+ * @param {Array} other The second array to concatenate.
+ * @returns {Array} Returns the new concatenated array.
+ */
+ function arrayConcat(array, other) {
+ var index = -1,
+ length = array.length,
+ othIndex = -1,
+ othLength = other.length,
+ result = Array(length + othLength);
+
+ while (++index < length) {
+ result[index] = array[index];
+ }
+ while (++othIndex < othLength) {
+ result[index++] = other[othIndex];
+ }
+ return result;
+ }
+
+ /**
+ * A specialized version of `_.forEach` for arrays without support for
+ * iteratee shorthands.
+ *
+ * @private
+ * @param {Array} array The array to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Array} Returns `array`.
+ */
+ function arrayEach(array, iteratee) {
+ var index = -1,
+ length = array.length;
+
+ while (++index < length) {
+ if (iteratee(array[index], index, array) === false) {
+ break;
+ }
+ }
+ return array;
+ }
+
+ /**
+ * A specialized version of `_.forEachRight` for arrays without support for
+ * iteratee shorthands.
+ *
+ * @private
+ * @param {Array} array The array to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Array} Returns `array`.
+ */
+ function arrayEachRight(array, iteratee) {
+ var length = array.length;
+
+ while (length--) {
+ if (iteratee(array[length], length, array) === false) {
+ break;
+ }
+ }
+ return array;
+ }
+
+ /**
+ * A specialized version of `_.every` for arrays without support for
+ * iteratee shorthands.
+ *
+ * @private
+ * @param {Array} array The array to iterate over.
+ * @param {Function} predicate The function invoked per iteration.
+ * @returns {boolean} Returns `true` if all elements pass the predicate check,
+ * else `false`.
+ */
+ function arrayEvery(array, predicate) {
+ var index = -1,
+ length = array.length;
+
+ while (++index < length) {
+ if (!predicate(array[index], index, array)) {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ /**
+ * A specialized version of `_.filter` for arrays without support for
+ * iteratee shorthands.
+ *
+ * @private
+ * @param {Array} array The array to iterate over.
+ * @param {Function} predicate The function invoked per iteration.
+ * @returns {Array} Returns the new filtered array.
+ */
+ function arrayFilter(array, predicate) {
+ var index = -1,
+ length = array.length,
+ resIndex = 0,
+ result = [];
+
+ while (++index < length) {
+ var value = array[index];
+ if (predicate(value, index, array)) {
+ result[resIndex++] = value;
+ }
+ }
+ return result;
+ }
+
+ /**
+ * A specialized version of `_.includes` for arrays without support for
+ * specifying an index to search from.
+ *
+ * @private
+ * @param {Array} array The array to search.
+ * @param {*} target The value to search for.
+ * @returns {boolean} Returns `true` if `target` is found, else `false`.
+ */
+ function arrayIncludes(array, value) {
+ return !!array.length && baseIndexOf(array, value, 0) > -1;
+ }
+
+ /**
+ * This function is like `arrayIncludes` except that it accepts a comparator.
+ *
+ * @private
+ * @param {Array} array The array to search.
+ * @param {*} target The value to search for.
+ * @param {Function} comparator The comparator invoked per element.
+ * @returns {boolean} Returns `true` if `target` is found, else `false`.
+ */
+ function arrayIncludesWith(array, value, comparator) {
+ var index = -1,
+ length = array.length;
+
+ while (++index < length) {
+ if (comparator(value, array[index])) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ /**
+ * A specialized version of `_.map` for arrays without support for iteratee
+ * shorthands.
+ *
+ * @private
+ * @param {Array} array The array to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Array} Returns the new mapped array.
+ */
+ function arrayMap(array, iteratee) {
+ var index = -1,
+ length = array.length,
+ result = Array(length);
+
+ while (++index < length) {
+ result[index] = iteratee(array[index], index, array);
+ }
+ return result;
+ }
+
+ /**
+ * Appends the elements of `values` to `array`.
+ *
+ * @private
+ * @param {Array} array The array to modify.
+ * @param {Array} values The values to append.
+ * @returns {Array} Returns `array`.
+ */
+ function arrayPush(array, values) {
+ var index = -1,
+ length = values.length,
+ offset = array.length;
+
+ while (++index < length) {
+ array[offset + index] = values[index];
+ }
+ return array;
+ }
+
+ /**
+ * A specialized version of `_.reduce` for arrays without support for
+ * iteratee shorthands.
+ *
+ * @private
+ * @param {Array} array The array to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @param {*} [accumulator] The initial value.
+ * @param {boolean} [initAccum] Specify using the first element of `array` as
+ * the initial value.
+ * @returns {*} Returns the accumulated value.
+ */
+ function arrayReduce(array, iteratee, accumulator, initAccum) {
+ var index = -1,
+ length = array.length;
+
+ if (initAccum && length) {
+ accumulator = array[++index];
+ }
+ while (++index < length) {
+ accumulator = iteratee(accumulator, array[index], index, array);
+ }
+ return accumulator;
+ }
+
+ /**
+ * A specialized version of `_.reduceRight` for arrays without support for
+ * iteratee shorthands.
+ *
+ * @private
+ * @param {Array} array The array to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @param {*} [accumulator] The initial value.
+ * @param {boolean} [initAccum] Specify using the last element of `array` as
+ * the initial value.
+ * @returns {*} Returns the accumulated value.
+ */
+ function arrayReduceRight(array, iteratee, accumulator, initAccum) {
+ var length = array.length;
+ if (initAccum && length) {
+ accumulator = array[--length];
+ }
+ while (length--) {
+ accumulator = iteratee(accumulator, array[length], length, array);
+ }
+ return accumulator;
+ }
+
+ /**
+ * A specialized version of `_.some` for arrays without support for iteratee
+ * shorthands.
+ *
+ * @private
+ * @param {Array} array The array to iterate over.
+ * @param {Function} predicate The function invoked per iteration.
+ * @returns {boolean} Returns `true` if any element passes the predicate check,
+ * else `false`.
+ */
+ function arraySome(array, predicate) {
+ var index = -1,
+ length = array.length;
+
+ while (++index < length) {
+ if (predicate(array[index], index, array)) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ /**
+ * The base implementation of methods like `_.find` and `_.findKey`, without
+ * support for iteratee shorthands, which iterates over `collection` using
+ * `eachFunc`.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to search.
+ * @param {Function} predicate The function invoked per iteration.
+ * @param {Function} eachFunc The function to iterate over `collection`.
+ * @param {boolean} [retKey] Specify returning the key of the found element
+ * instead of the element itself.
+ * @returns {*} Returns the found element or its key, else `undefined`.
+ */
+ function baseFind(collection, predicate, eachFunc, retKey) {
+ var result;
+ eachFunc(collection, function(value, key, collection) {
+ if (predicate(value, key, collection)) {
+ result = retKey ? key : value;
+ return false;
+ }
+ });
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.findIndex` and `_.findLastIndex` without
+ * support for iteratee shorthands.
+ *
+ * @private
+ * @param {Array} array The array to search.
+ * @param {Function} predicate The function invoked per iteration.
+ * @param {boolean} [fromRight] Specify iterating from right to left.
+ * @returns {number} Returns the index of the matched value, else `-1`.
+ */
+ function baseFindIndex(array, predicate, fromRight) {
+ var length = array.length,
+ index = fromRight ? length : -1;
+
+ while ((fromRight ? index-- : ++index < length)) {
+ if (predicate(array[index], index, array)) {
+ return index;
+ }
+ }
+ return -1;
+ }
+
+ /**
+ * The base implementation of `_.indexOf` without `fromIndex` bounds checks.
+ *
+ * @private
+ * @param {Array} array The array to search.
+ * @param {*} value The value to search for.
+ * @param {number} fromIndex The index to search from.
+ * @returns {number} Returns the index of the matched value, else `-1`.
+ */
+ function baseIndexOf(array, value, fromIndex) {
+ if (value !== value) {
+ return indexOfNaN(array, fromIndex);
+ }
+ var index = fromIndex - 1,
+ length = array.length;
+
+ while (++index < length) {
+ if (array[index] === value) {
+ return index;
+ }
+ }
+ return -1;
+ }
+
+ /**
+ * This function is like `baseIndexOf` except that it accepts a comparator.
+ *
+ * @private
+ * @param {Array} array The array to search.
+ * @param {*} value The value to search for.
+ * @param {number} fromIndex The index to search from.
+ * @param {Function} comparator The comparator invoked per element.
+ * @returns {number} Returns the index of the matched value, else `-1`.
+ */
+ function baseIndexOfWith(array, value, fromIndex, comparator) {
+ var index = fromIndex - 1,
+ length = array.length;
+
+ while (++index < length) {
+ if (comparator(array[index], value)) {
+ return index;
+ }
+ }
+ return -1;
+ }
+
+ /**
+ * The base implementation of `_.mean` and `_.meanBy` without support for
+ * iteratee shorthands.
+ *
+ * @private
+ * @param {Array} array The array to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {number} Returns the mean.
+ */
+ function baseMean(array, iteratee) {
+ var length = array ? array.length : 0;
+ return length ? (baseSum(array, iteratee) / length) : NAN;
+ }
+
+ /**
+ * The base implementation of `_.reduce` and `_.reduceRight`, without support
+ * for iteratee shorthands, which iterates over `collection` using `eachFunc`.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @param {*} accumulator The initial value.
+ * @param {boolean} initAccum Specify using the first or last element of
+ * `collection` as the initial value.
+ * @param {Function} eachFunc The function to iterate over `collection`.
+ * @returns {*} Returns the accumulated value.
+ */
+ function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) {
+ eachFunc(collection, function(value, index, collection) {
+ accumulator = initAccum
+ ? (initAccum = false, value)
+ : iteratee(accumulator, value, index, collection);
+ });
+ return accumulator;
+ }
+
+ /**
+ * The base implementation of `_.sortBy` which uses `comparer` to define the
+ * sort order of `array` and replaces criteria objects with their corresponding
+ * values.
+ *
+ * @private
+ * @param {Array} array The array to sort.
+ * @param {Function} comparer The function to define sort order.
+ * @returns {Array} Returns `array`.
+ */
+ function baseSortBy(array, comparer) {
+ var length = array.length;
+
+ array.sort(comparer);
+ while (length--) {
+ array[length] = array[length].value;
+ }
+ return array;
+ }
+
+ /**
+ * The base implementation of `_.sum` and `_.sumBy` without support for
+ * iteratee shorthands.
+ *
+ * @private
+ * @param {Array} array The array to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {number} Returns the sum.
+ */
+ function baseSum(array, iteratee) {
+ var result,
+ index = -1,
+ length = array.length;
+
+ while (++index < length) {
+ var current = iteratee(array[index]);
+ if (current !== undefined) {
+ result = result === undefined ? current : (result + current);
+ }
+ }
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.times` without support for iteratee shorthands
+ * or max array length checks.
+ *
+ * @private
+ * @param {number} n The number of times to invoke `iteratee`.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Array} Returns the array of results.
+ */
+ function baseTimes(n, iteratee) {
+ var index = -1,
+ result = Array(n);
+
+ while (++index < n) {
+ result[index] = iteratee(index);
+ }
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.toPairs` and `_.toPairsIn` which creates an array
+ * of key-value pairs for `object` corresponding to the property names of `props`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {Array} props The property names to get values for.
+ * @returns {Object} Returns the new array of key-value pairs.
+ */
+ function baseToPairs(object, props) {
+ return arrayMap(props, function(key) {
+ return [key, object[key]];
+ });
+ }
+
+ /**
+ * The base implementation of `_.unary` without support for storing wrapper metadata.
+ *
+ * @private
+ * @param {Function} func The function to cap arguments for.
+ * @returns {Function} Returns the new function.
+ */
+ function baseUnary(func) {
+ return function(value) {
+ return func(value);
+ };
+ }
+
+ /**
+ * The base implementation of `_.values` and `_.valuesIn` which creates an
+ * array of `object` property values corresponding to the property names
+ * of `props`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {Array} props The property names to get values for.
+ * @returns {Object} Returns the array of property values.
+ */
+ function baseValues(object, props) {
+ return arrayMap(props, function(key) {
+ return object[key];
+ });
+ }
+
+ /**
+ * Used by `_.trim` and `_.trimStart` to get the index of the first string symbol
+ * that is not found in the character symbols.
+ *
+ * @private
+ * @param {Array} strSymbols The string symbols to inspect.
+ * @param {Array} chrSymbols The character symbols to find.
+ * @returns {number} Returns the index of the first unmatched string symbol.
+ */
+ function charsStartIndex(strSymbols, chrSymbols) {
+ var index = -1,
+ length = strSymbols.length;
+
+ while (++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}
+ return index;
+ }
+
+ /**
+ * Used by `_.trim` and `_.trimEnd` to get the index of the last string symbol
+ * that is not found in the character symbols.
+ *
+ * @private
+ * @param {Array} strSymbols The string symbols to inspect.
+ * @param {Array} chrSymbols The character symbols to find.
+ * @returns {number} Returns the index of the last unmatched string symbol.
+ */
+ function charsEndIndex(strSymbols, chrSymbols) {
+ var index = strSymbols.length;
+
+ while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}
+ return index;
+ }
+
+ /**
+ * Checks if `value` is a global object.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {null|Object} Returns `value` if it's a global object, else `null`.
+ */
+ function checkGlobal(value) {
+ return (value && value.Object === Object) ? value : null;
+ }
+
+ /**
+ * Gets the number of `placeholder` occurrences in `array`.
+ *
+ * @private
+ * @param {Array} array The array to inspect.
+ * @param {*} placeholder The placeholder to search for.
+ * @returns {number} Returns the placeholder count.
+ */
+ function countHolders(array, placeholder) {
+ var length = array.length,
+ result = 0;
+
+ while (length--) {
+ if (array[length] === placeholder) {
+ result++;
+ }
+ }
+ return result;
+ }
+
+ /**
+ * Used by `_.deburr` to convert latin-1 supplementary letters to basic latin letters.
+ *
+ * @private
+ * @param {string} letter The matched letter to deburr.
+ * @returns {string} Returns the deburred letter.
+ */
+ function deburrLetter(letter) {
+ return deburredLetters[letter];
+ }
+
+ /**
+ * Used by `_.escape` to convert characters to HTML entities.
+ *
+ * @private
+ * @param {string} chr The matched character to escape.
+ * @returns {string} Returns the escaped character.
+ */
+ function escapeHtmlChar(chr) {
+ return htmlEscapes[chr];
+ }
+
+ /**
+ * Used by `_.template` to escape characters for inclusion in compiled string literals.
+ *
+ * @private
+ * @param {string} chr The matched character to escape.
+ * @returns {string} Returns the escaped character.
+ */
+ function escapeStringChar(chr) {
+ return '\\' + stringEscapes[chr];
+ }
+
+ /**
+ * Gets the index at which the first occurrence of `NaN` is found in `array`.
+ *
+ * @private
+ * @param {Array} array The array to search.
+ * @param {number} fromIndex The index to search from.
+ * @param {boolean} [fromRight] Specify iterating from right to left.
+ * @returns {number} Returns the index of the matched `NaN`, else `-1`.
+ */
+ function indexOfNaN(array, fromIndex, fromRight) {
+ var length = array.length,
+ index = fromIndex + (fromRight ? 0 : -1);
+
+ while ((fromRight ? index-- : ++index < length)) {
+ var other = array[index];
+ if (other !== other) {
+ return index;
+ }
+ }
+ return -1;
+ }
+
+ /**
+ * Checks if `value` is a host object in IE < 9.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a host object, else `false`.
+ */
+ function isHostObject(value) {
+ // Many host objects are `Object` objects that can coerce to strings
+ // despite having improperly defined `toString` methods.
+ var result = false;
+ if (value != null && typeof value.toString != 'function') {
+ try {
+ result = !!(value + '');
+ } catch (e) {}
+ }
+ return result;
+ }
+
+ /**
+ * Converts `iterator` to an array.
+ *
+ * @private
+ * @param {Object} iterator The iterator to convert.
+ * @returns {Array} Returns the converted array.
+ */
+ function iteratorToArray(iterator) {
+ var data,
+ result = [];
+
+ while (!(data = iterator.next()).done) {
+ result.push(data.value);
+ }
+ return result;
+ }
+
+ /**
+ * Converts `map` to an array.
+ *
+ * @private
+ * @param {Object} map The map to convert.
+ * @returns {Array} Returns the converted array.
+ */
+ function mapToArray(map) {
+ var index = -1,
+ result = Array(map.size);
+
+ map.forEach(function(value, key) {
+ result[++index] = [key, value];
+ });
+ return result;
+ }
+
+ /**
+ * Replaces all `placeholder` elements in `array` with an internal placeholder
+ * and returns an array of their indexes.
+ *
+ * @private
+ * @param {Array} array The array to modify.
+ * @param {*} placeholder The placeholder to replace.
+ * @returns {Array} Returns the new array of placeholder indexes.
+ */
+ function replaceHolders(array, placeholder) {
+ var index = -1,
+ length = array.length,
+ resIndex = 0,
+ result = [];
+
+ while (++index < length) {
+ var value = array[index];
+ if (value === placeholder || value === PLACEHOLDER) {
+ array[index] = PLACEHOLDER;
+ result[resIndex++] = index;
+ }
+ }
+ return result;
+ }
+
+ /**
+ * Converts `set` to an array.
+ *
+ * @private
+ * @param {Object} set The set to convert.
+ * @returns {Array} Returns the converted array.
+ */
+ function setToArray(set) {
+ var index = -1,
+ result = Array(set.size);
+
+ set.forEach(function(value) {
+ result[++index] = value;
+ });
+ return result;
+ }
+
+ /**
+ * Gets the number of symbols in `string`.
+ *
+ * @private
+ * @param {string} string The string to inspect.
+ * @returns {number} Returns the string size.
+ */
+ function stringSize(string) {
+ if (!(string && reHasComplexSymbol.test(string))) {
+ return string.length;
+ }
+ var result = reComplexSymbol.lastIndex = 0;
+ while (reComplexSymbol.test(string)) {
+ result++;
+ }
+ return result;
+ }
+
+ /**
+ * Converts `string` to an array.
+ *
+ * @private
+ * @param {string} string The string to convert.
+ * @returns {Array} Returns the converted array.
+ */
+ function stringToArray(string) {
+ return string.match(reComplexSymbol);
+ }
+
+ /**
+ * Used by `_.unescape` to convert HTML entities to characters.
+ *
+ * @private
+ * @param {string} chr The matched character to unescape.
+ * @returns {string} Returns the unescaped character.
+ */
+ function unescapeHtmlChar(chr) {
+ return htmlUnescapes[chr];
+ }
+
+ /*--------------------------------------------------------------------------*/
+
+ /**
+ * Create a new pristine `lodash` function using the `context` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 1.1.0
+ * @category Util
+ * @param {Object} [context=root] The context object.
+ * @returns {Function} Returns a new `lodash` function.
+ * @example
+ *
+ * _.mixin({ 'foo': _.constant('foo') });
+ *
+ * var lodash = _.runInContext();
+ * lodash.mixin({ 'bar': lodash.constant('bar') });
+ *
+ * _.isFunction(_.foo);
+ * // => true
+ * _.isFunction(_.bar);
+ * // => false
+ *
+ * lodash.isFunction(lodash.foo);
+ * // => false
+ * lodash.isFunction(lodash.bar);
+ * // => true
+ *
+ * // Use `context` to mock `Date#getTime` use in `_.now`.
+ * var mock = _.runInContext({
+ * 'Date': function() {
+ * return { 'getTime': getTimeMock };
+ * }
+ * });
+ *
+ * // Create a suped-up `defer` in Node.js.
+ * var defer = _.runInContext({ 'setTimeout': setImmediate }).defer;
+ */
+ function runInContext(context) {
+ context = context ? _.defaults({}, context, _.pick(root, contextProps)) : root;
+
+ /** Built-in constructor references. */
+ var Date = context.Date,
+ Error = context.Error,
+ Math = context.Math,
+ RegExp = context.RegExp,
+ TypeError = context.TypeError;
+
+ /** Used for built-in method references. */
+ var arrayProto = context.Array.prototype,
+ objectProto = context.Object.prototype,
+ stringProto = context.String.prototype;
+
+ /** Used to resolve the decompiled source of functions. */
+ var funcToString = context.Function.prototype.toString;
+
+ /** Used to check objects for own properties. */
+ var hasOwnProperty = objectProto.hasOwnProperty;
+
+ /** Used to generate unique IDs. */
+ var idCounter = 0;
+
+ /** Used to infer the `Object` constructor. */
+ var objectCtorString = funcToString.call(Object);
+
+ /**
+ * Used to resolve the
+ * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
+ * of values.
+ */
+ var objectToString = objectProto.toString;
+
+ /** Used to restore the original `_` reference in `_.noConflict`. */
+ var oldDash = root._;
+
+ /** Used to detect if a method is native. */
+ var reIsNative = RegExp('^' +
+ funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&')
+ .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
+ );
+
+ /** Built-in value references. */
+ var Buffer = moduleExports ? context.Buffer : undefined,
+ Reflect = context.Reflect,
+ Symbol = context.Symbol,
+ Uint8Array = context.Uint8Array,
+ clearTimeout = context.clearTimeout,
+ enumerate = Reflect ? Reflect.enumerate : undefined,
+ getOwnPropertySymbols = Object.getOwnPropertySymbols,
+ iteratorSymbol = typeof (iteratorSymbol = Symbol && Symbol.iterator) == 'symbol' ? iteratorSymbol : undefined,
+ objectCreate = Object.create,
+ propertyIsEnumerable = objectProto.propertyIsEnumerable,
+ setTimeout = context.setTimeout,
+ splice = arrayProto.splice;
+
+ /* Built-in method references for those with the same name as other `lodash` methods. */
+ var nativeCeil = Math.ceil,
+ nativeFloor = Math.floor,
+ nativeGetPrototype = Object.getPrototypeOf,
+ nativeIsFinite = context.isFinite,
+ nativeJoin = arrayProto.join,
+ nativeKeys = Object.keys,
+ nativeMax = Math.max,
+ nativeMin = Math.min,
+ nativeParseInt = context.parseInt,
+ nativeRandom = Math.random,
+ nativeReplace = stringProto.replace,
+ nativeReverse = arrayProto.reverse,
+ nativeSplit = stringProto.split;
+
+ /* Built-in method references that are verified to be native. */
+ var DataView = getNative(context, 'DataView'),
+ Map = getNative(context, 'Map'),
+ Promise = getNative(context, 'Promise'),
+ Set = getNative(context, 'Set'),
+ WeakMap = getNative(context, 'WeakMap'),
+ nativeCreate = getNative(Object, 'create');
+
+ /** Used to store function metadata. */
+ var metaMap = WeakMap && new WeakMap;
+
+ /** Detect if properties shadowing those on `Object.prototype` are non-enumerable. */
+ var nonEnumShadows = !propertyIsEnumerable.call({ 'valueOf': 1 }, 'valueOf');
+
+ /** Used to lookup unminified function names. */
+ var realNames = {};
+
+ /** Used to detect maps, sets, and weakmaps. */
+ var dataViewCtorString = toSource(DataView),
+ mapCtorString = toSource(Map),
+ promiseCtorString = toSource(Promise),
+ setCtorString = toSource(Set),
+ weakMapCtorString = toSource(WeakMap);
+
+ /** Used to convert symbols to primitives and strings. */
+ var symbolProto = Symbol ? Symbol.prototype : undefined,
+ symbolValueOf = symbolProto ? symbolProto.valueOf : undefined,
+ symbolToString = symbolProto ? symbolProto.toString : undefined;
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Creates a `lodash` object which wraps `value` to enable implicit method
+ * chain sequences. Methods that operate on and return arrays, collections,
+ * and functions can be chained together. Methods that retrieve a single value
+ * or may return a primitive value will automatically end the chain sequence
+ * and return the unwrapped value. Otherwise, the value must be unwrapped
+ * with `_#value`.
+ *
+ * Explicit chain sequences, which must be unwrapped with `_#value`, may be
+ * enabled using `_.chain`.
+ *
+ * The execution of chained methods is lazy, that is, it's deferred until
+ * `_#value` is implicitly or explicitly called.
+ *
+ * Lazy evaluation allows several methods to support shortcut fusion.
+ * Shortcut fusion is an optimization to merge iteratee calls; this avoids
+ * the creation of intermediate arrays and can greatly reduce the number of
+ * iteratee executions. Sections of a chain sequence qualify for shortcut
+ * fusion if the section is applied to an array of at least `200` elements
+ * and any iteratees accept only one argument. The heuristic for whether a
+ * section qualifies for shortcut fusion is subject to change.
+ *
+ * Chaining is supported in custom builds as long as the `_#value` method is
+ * directly or indirectly included in the build.
+ *
+ * In addition to lodash methods, wrappers have `Array` and `String` methods.
+ *
+ * The wrapper `Array` methods are:
+ * `concat`, `join`, `pop`, `push`, `shift`, `sort`, `splice`, and `unshift`
+ *
+ * The wrapper `String` methods are:
+ * `replace` and `split`
+ *
+ * The wrapper methods that support shortcut fusion are:
+ * `at`, `compact`, `drop`, `dropRight`, `dropWhile`, `filter`, `find`,
+ * `findLast`, `head`, `initial`, `last`, `map`, `reject`, `reverse`, `slice`,
+ * `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, and `toArray`
+ *
+ * The chainable wrapper methods are:
+ * `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`,
+ * `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`,
+ * `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`,
+ * `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`,
+ * `difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`,
+ * `dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`,
+ * `flatMap`, `flatMapDeep`, `flatMapDepth`, `flatten`, `flattenDeep`,
+ * `flattenDepth`, `flip`, `flow`, `flowRight`, `fromPairs`, `functions`,
+ * `functionsIn`, `groupBy`, `initial`, `intersection`, `intersectionBy`,
+ * `intersectionWith`, `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`,
+ * `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`,
+ * `memoize`, `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`,
+ * `nthArg`, `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`,
+ * `overEvery`, `overSome`, `partial`, `partialRight`, `partition`, `pick`,
+ * `pickBy`, `plant`, `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`,
+ * `pullAllWith`, `pullAt`, `push`, `range`, `rangeRight`, `rearg`, `reject`,
+ * `remove`, `rest`, `reverse`, `sampleSize`, `set`, `setWith`, `shuffle`,
+ * `slice`, `sort`, `sortBy`, `splice`, `spread`, `tail`, `take`, `takeRight`,
+ * `takeRightWhile`, `takeWhile`, `tap`, `throttle`, `thru`, `toArray`,
+ * `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, `transform`, `unary`,
+ * `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`,
+ * `unshift`, `unzip`, `unzipWith`, `update`, `updateWith`, `values`,
+ * `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`,
+ * `zipObject`, `zipObjectDeep`, and `zipWith`
+ *
+ * The wrapper methods that are **not** chainable by default are:
+ * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`,
+ * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `deburr`, `divide`, `each`,
+ * `eachRight`, `endsWith`, `eq`, `escape`, `escapeRegExp`, `every`, `find`,
+ * `findIndex`, `findKey`, `findLast`, `findLastIndex`, `findLastKey`, `first`,
+ * `floor`, `forEach`, `forEachRight`, `forIn`, `forInRight`, `forOwn`,
+ * `forOwnRight`, `get`, `gt`, `gte`, `has`, `hasIn`, `head`, `identity`,
+ * `includes`, `indexOf`, `inRange`, `invoke`, `isArguments`, `isArray`,
+ * `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`, `isBoolean`, `isBuffer`,
+ * `isDate`, `isElement`, `isEmpty`, `isEqual`, `isEqualWith`, `isError`,
+ * `isFinite`, `isFunction`, `isInteger`, `isLength`, `isMap`, `isMatch`,
+ * `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`, `isNumber`,
+ * `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`, `isSafeInteger`,
+ * `isSet`, `isString`, `isUndefined`, `isTypedArray`, `isWeakMap`, `isWeakSet`,
+ * `join`, `kebabCase`, `last`, `lastIndexOf`, `lowerCase`, `lowerFirst`,
+ * `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`, `min`, `minBy`, `multiply`,
+ * `noConflict`, `noop`, `now`, `nth`, `pad`, `padEnd`, `padStart`, `parseInt`,
+ * `pop`, `random`, `reduce`, `reduceRight`, `repeat`, `result`, `round`,
+ * `runInContext`, `sample`, `shift`, `size`, `snakeCase`, `some`, `sortedIndex`,
+ * `sortedIndexBy`, `sortedLastIndex`, `sortedLastIndexBy`, `startCase`,
+ * `startsWith`, `subtract`, `sum`, `sumBy`, `template`, `times`, `toInteger`,
+ * `toJSON`, `toLength`, `toLower`, `toNumber`, `toSafeInteger`, `toString`,
+ * `toUpper`, `trim`, `trimEnd`, `trimStart`, `truncate`, `unescape`,
+ * `uniqueId`, `upperCase`, `upperFirst`, `value`, and `words`
+ *
+ * @name _
+ * @constructor
+ * @category Seq
+ * @param {*} value The value to wrap in a `lodash` instance.
+ * @returns {Object} Returns the new `lodash` wrapper instance.
+ * @example
+ *
+ * function square(n) {
+ * return n * n;
+ * }
+ *
+ * var wrapped = _([1, 2, 3]);
+ *
+ * // Returns an unwrapped value.
+ * wrapped.reduce(_.add);
+ * // => 6
+ *
+ * // Returns a wrapped value.
+ * var squares = wrapped.map(square);
+ *
+ * _.isArray(squares);
+ * // => false
+ *
+ * _.isArray(squares.value());
+ * // => true
+ */
+ function lodash(value) {
+ if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) {
+ if (value instanceof LodashWrapper) {
+ return value;
+ }
+ if (hasOwnProperty.call(value, '__wrapped__')) {
+ return wrapperClone(value);
+ }
+ }
+ return new LodashWrapper(value);
+ }
+
+ /**
+ * The function whose prototype chain sequence wrappers inherit from.
+ *
+ * @private
+ */
+ function baseLodash() {
+ // No operation performed.
+ }
+
+ /**
+ * The base constructor for creating `lodash` wrapper objects.
+ *
+ * @private
+ * @param {*} value The value to wrap.
+ * @param {boolean} [chainAll] Enable explicit method chain sequences.
+ */
+ function LodashWrapper(value, chainAll) {
+ this.__wrapped__ = value;
+ this.__actions__ = [];
+ this.__chain__ = !!chainAll;
+ this.__index__ = 0;
+ this.__values__ = undefined;
+ }
+
+ /**
+ * By default, the template delimiters used by lodash are like those in
+ * embedded Ruby (ERB). Change the following template settings to use
+ * alternative delimiters.
+ *
+ * @static
+ * @memberOf _
+ * @type {Object}
+ */
+ lodash.templateSettings = {
+
+ /**
+ * Used to detect `data` property values to be HTML-escaped.
+ *
+ * @memberOf _.templateSettings
+ * @type {RegExp}
+ */
+ 'escape': reEscape,
+
+ /**
+ * Used to detect code to be evaluated.
+ *
+ * @memberOf _.templateSettings
+ * @type {RegExp}
+ */
+ 'evaluate': reEvaluate,
+
+ /**
+ * Used to detect `data` property values to inject.
+ *
+ * @memberOf _.templateSettings
+ * @type {RegExp}
+ */
+ 'interpolate': reInterpolate,
+
+ /**
+ * Used to reference the data object in the template text.
+ *
+ * @memberOf _.templateSettings
+ * @type {string}
+ */
+ 'variable': '',
+
+ /**
+ * Used to import variables into the compiled template.
+ *
+ * @memberOf _.templateSettings
+ * @type {Object}
+ */
+ 'imports': {
+
+ /**
+ * A reference to the `lodash` function.
+ *
+ * @memberOf _.templateSettings.imports
+ * @type {Function}
+ */
+ '_': lodash
+ }
+ };
+
+ // Ensure wrappers are instances of `baseLodash`.
+ lodash.prototype = baseLodash.prototype;
+ lodash.prototype.constructor = lodash;
+
+ LodashWrapper.prototype = baseCreate(baseLodash.prototype);
+ LodashWrapper.prototype.constructor = LodashWrapper;
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Creates a lazy wrapper object which wraps `value` to enable lazy evaluation.
+ *
+ * @private
+ * @constructor
+ * @param {*} value The value to wrap.
+ */
+ function LazyWrapper(value) {
+ this.__wrapped__ = value;
+ this.__actions__ = [];
+ this.__dir__ = 1;
+ this.__filtered__ = false;
+ this.__iteratees__ = [];
+ this.__takeCount__ = MAX_ARRAY_LENGTH;
+ this.__views__ = [];
+ }
+
+ /**
+ * Creates a clone of the lazy wrapper object.
+ *
+ * @private
+ * @name clone
+ * @memberOf LazyWrapper
+ * @returns {Object} Returns the cloned `LazyWrapper` object.
+ */
+ function lazyClone() {
+ var result = new LazyWrapper(this.__wrapped__);
+ result.__actions__ = copyArray(this.__actions__);
+ result.__dir__ = this.__dir__;
+ result.__filtered__ = this.__filtered__;
+ result.__iteratees__ = copyArray(this.__iteratees__);
+ result.__takeCount__ = this.__takeCount__;
+ result.__views__ = copyArray(this.__views__);
+ return result;
+ }
+
+ /**
+ * Reverses the direction of lazy iteration.
+ *
+ * @private
+ * @name reverse
+ * @memberOf LazyWrapper
+ * @returns {Object} Returns the new reversed `LazyWrapper` object.
+ */
+ function lazyReverse() {
+ if (this.__filtered__) {
+ var result = new LazyWrapper(this);
+ result.__dir__ = -1;
+ result.__filtered__ = true;
+ } else {
+ result = this.clone();
+ result.__dir__ *= -1;
+ }
+ return result;
+ }
+
+ /**
+ * Extracts the unwrapped value from its lazy wrapper.
+ *
+ * @private
+ * @name value
+ * @memberOf LazyWrapper
+ * @returns {*} Returns the unwrapped value.
+ */
+ function lazyValue() {
+ var array = this.__wrapped__.value(),
+ dir = this.__dir__,
+ isArr = isArray(array),
+ isRight = dir < 0,
+ arrLength = isArr ? array.length : 0,
+ view = getView(0, arrLength, this.__views__),
+ start = view.start,
+ end = view.end,
+ length = end - start,
+ index = isRight ? end : (start - 1),
+ iteratees = this.__iteratees__,
+ iterLength = iteratees.length,
+ resIndex = 0,
+ takeCount = nativeMin(length, this.__takeCount__);
+
+ if (!isArr || arrLength < LARGE_ARRAY_SIZE ||
+ (arrLength == length && takeCount == length)) {
+ return baseWrapperValue(array, this.__actions__);
+ }
+ var result = [];
+
+ outer:
+ while (length-- && resIndex < takeCount) {
+ index += dir;
+
+ var iterIndex = -1,
+ value = array[index];
+
+ while (++iterIndex < iterLength) {
+ var data = iteratees[iterIndex],
+ iteratee = data.iteratee,
+ type = data.type,
+ computed = iteratee(value);
+
+ if (type == LAZY_MAP_FLAG) {
+ value = computed;
+ } else if (!computed) {
+ if (type == LAZY_FILTER_FLAG) {
+ continue outer;
+ } else {
+ break outer;
+ }
+ }
+ }
+ result[resIndex++] = value;
+ }
+ return result;
+ }
+
+ // Ensure `LazyWrapper` is an instance of `baseLodash`.
+ LazyWrapper.prototype = baseCreate(baseLodash.prototype);
+ LazyWrapper.prototype.constructor = LazyWrapper;
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Creates a hash object.
+ *
+ * @private
+ * @constructor
+ * @returns {Object} Returns the new hash object.
+ */
+ function Hash() {}
+
+ /**
+ * Removes `key` and its value from the hash.
+ *
+ * @private
+ * @param {Object} hash The hash to modify.
+ * @param {string} key The key of the value to remove.
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
+ */
+ function hashDelete(hash, key) {
+ return hashHas(hash, key) && delete hash[key];
+ }
+
+ /**
+ * Gets the hash value for `key`.
+ *
+ * @private
+ * @param {Object} hash The hash to query.
+ * @param {string} key The key of the value to get.
+ * @returns {*} Returns the entry value.
+ */
+ function hashGet(hash, key) {
+ if (nativeCreate) {
+ var result = hash[key];
+ return result === HASH_UNDEFINED ? undefined : result;
+ }
+ return hasOwnProperty.call(hash, key) ? hash[key] : undefined;
+ }
+
+ /**
+ * Checks if a hash value for `key` exists.
+ *
+ * @private
+ * @param {Object} hash The hash to query.
+ * @param {string} key The key of the entry to check.
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
+ */
+ function hashHas(hash, key) {
+ return nativeCreate ? hash[key] !== undefined : hasOwnProperty.call(hash, key);
+ }
+
+ /**
+ * Sets the hash `key` to `value`.
+ *
+ * @private
+ * @param {Object} hash The hash to modify.
+ * @param {string} key The key of the value to set.
+ * @param {*} value The value to set.
+ */
+ function hashSet(hash, key, value) {
+ hash[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
+ }
+
+ // Avoid inheriting from `Object.prototype` when possible.
+ Hash.prototype = nativeCreate ? nativeCreate(null) : objectProto;
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Creates a map cache object to store key-value pairs.
+ *
+ * @private
+ * @constructor
+ * @param {Array} [values] The values to cache.
+ */
+ function MapCache(values) {
+ var index = -1,
+ length = values ? values.length : 0;
+
+ this.clear();
+ while (++index < length) {
+ var entry = values[index];
+ this.set(entry[0], entry[1]);
+ }
+ }
+
+ /**
+ * Removes all key-value entries from the map.
+ *
+ * @private
+ * @name clear
+ * @memberOf MapCache
+ */
+ function mapClear() {
+ this.__data__ = {
+ 'hash': new Hash,
+ 'map': Map ? new Map : [],
+ 'string': new Hash
+ };
+ }
+
+ /**
+ * Removes `key` and its value from the map.
+ *
+ * @private
+ * @name delete
+ * @memberOf MapCache
+ * @param {string} key The key of the value to remove.
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
+ */
+ function mapDelete(key) {
+ var data = this.__data__;
+ if (isKeyable(key)) {
+ return hashDelete(typeof key == 'string' ? data.string : data.hash, key);
+ }
+ return Map ? data.map['delete'](key) : assocDelete(data.map, key);
+ }
+
+ /**
+ * Gets the map value for `key`.
+ *
+ * @private
+ * @name get
+ * @memberOf MapCache
+ * @param {string} key The key of the value to get.
+ * @returns {*} Returns the entry value.
+ */
+ function mapGet(key) {
+ var data = this.__data__;
+ if (isKeyable(key)) {
+ return hashGet(typeof key == 'string' ? data.string : data.hash, key);
+ }
+ return Map ? data.map.get(key) : assocGet(data.map, key);
+ }
+
+ /**
+ * Checks if a map value for `key` exists.
+ *
+ * @private
+ * @name has
+ * @memberOf MapCache
+ * @param {string} key The key of the entry to check.
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
+ */
+ function mapHas(key) {
+ var data = this.__data__;
+ if (isKeyable(key)) {
+ return hashHas(typeof key == 'string' ? data.string : data.hash, key);
+ }
+ return Map ? data.map.has(key) : assocHas(data.map, key);
+ }
+
+ /**
+ * Sets the map `key` to `value`.
+ *
+ * @private
+ * @name set
+ * @memberOf MapCache
+ * @param {string} key The key of the value to set.
+ * @param {*} value The value to set.
+ * @returns {Object} Returns the map cache instance.
+ */
+ function mapSet(key, value) {
+ var data = this.__data__;
+ if (isKeyable(key)) {
+ hashSet(typeof key == 'string' ? data.string : data.hash, key, value);
+ } else if (Map) {
+ data.map.set(key, value);
+ } else {
+ assocSet(data.map, key, value);
+ }
+ return this;
+ }
+
+ // Add methods to `MapCache`.
+ MapCache.prototype.clear = mapClear;
+ MapCache.prototype['delete'] = mapDelete;
+ MapCache.prototype.get = mapGet;
+ MapCache.prototype.has = mapHas;
+ MapCache.prototype.set = mapSet;
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ *
+ * Creates a set cache object to store unique values.
+ *
+ * @private
+ * @constructor
+ * @param {Array} [values] The values to cache.
+ */
+ function SetCache(values) {
+ var index = -1,
+ length = values ? values.length : 0;
+
+ this.__data__ = new MapCache;
+ while (++index < length) {
+ this.push(values[index]);
+ }
+ }
+
+ /**
+ * Checks if `value` is in `cache`.
+ *
+ * @private
+ * @param {Object} cache The set cache to search.
+ * @param {*} value The value to search for.
+ * @returns {number} Returns `true` if `value` is found, else `false`.
+ */
+ function cacheHas(cache, value) {
+ var map = cache.__data__;
+ if (isKeyable(value)) {
+ var data = map.__data__,
+ hash = typeof value == 'string' ? data.string : data.hash;
+
+ return hash[value] === HASH_UNDEFINED;
+ }
+ return map.has(value);
+ }
+
+ /**
+ * Adds `value` to the set cache.
+ *
+ * @private
+ * @name push
+ * @memberOf SetCache
+ * @param {*} value The value to cache.
+ */
+ function cachePush(value) {
+ var map = this.__data__;
+ if (isKeyable(value)) {
+ var data = map.__data__,
+ hash = typeof value == 'string' ? data.string : data.hash;
+
+ hash[value] = HASH_UNDEFINED;
+ }
+ else {
+ map.set(value, HASH_UNDEFINED);
+ }
+ }
+
+ // Add methods to `SetCache`.
+ SetCache.prototype.push = cachePush;
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Creates a stack cache object to store key-value pairs.
+ *
+ * @private
+ * @constructor
+ * @param {Array} [values] The values to cache.
+ */
+ function Stack(values) {
+ var index = -1,
+ length = values ? values.length : 0;
+
+ this.clear();
+ while (++index < length) {
+ var entry = values[index];
+ this.set(entry[0], entry[1]);
+ }
+ }
+
+ /**
+ * Removes all key-value entries from the stack.
+ *
+ * @private
+ * @name clear
+ * @memberOf Stack
+ */
+ function stackClear() {
+ this.__data__ = { 'array': [], 'map': null };
+ }
+
+ /**
+ * Removes `key` and its value from the stack.
+ *
+ * @private
+ * @name delete
+ * @memberOf Stack
+ * @param {string} key The key of the value to remove.
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
+ */
+ function stackDelete(key) {
+ var data = this.__data__,
+ array = data.array;
+
+ return array ? assocDelete(array, key) : data.map['delete'](key);
+ }
+
+ /**
+ * Gets the stack value for `key`.
+ *
+ * @private
+ * @name get
+ * @memberOf Stack
+ * @param {string} key The key of the value to get.
+ * @returns {*} Returns the entry value.
+ */
+ function stackGet(key) {
+ var data = this.__data__,
+ array = data.array;
+
+ return array ? assocGet(array, key) : data.map.get(key);
+ }
+
+ /**
+ * Checks if a stack value for `key` exists.
+ *
+ * @private
+ * @name has
+ * @memberOf Stack
+ * @param {string} key The key of the entry to check.
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
+ */
+ function stackHas(key) {
+ var data = this.__data__,
+ array = data.array;
+
+ return array ? assocHas(array, key) : data.map.has(key);
+ }
+
+ /**
+ * Sets the stack `key` to `value`.
+ *
+ * @private
+ * @name set
+ * @memberOf Stack
+ * @param {string} key The key of the value to set.
+ * @param {*} value The value to set.
+ * @returns {Object} Returns the stack cache instance.
+ */
+ function stackSet(key, value) {
+ var data = this.__data__,
+ array = data.array;
+
+ if (array) {
+ if (array.length < (LARGE_ARRAY_SIZE - 1)) {
+ assocSet(array, key, value);
+ } else {
+ data.array = null;
+ data.map = new MapCache(array);
+ }
+ }
+ var map = data.map;
+ if (map) {
+ map.set(key, value);
+ }
+ return this;
+ }
+
+ // Add methods to `Stack`.
+ Stack.prototype.clear = stackClear;
+ Stack.prototype['delete'] = stackDelete;
+ Stack.prototype.get = stackGet;
+ Stack.prototype.has = stackHas;
+ Stack.prototype.set = stackSet;
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Removes `key` and its value from the associative array.
+ *
+ * @private
+ * @param {Array} array The array to modify.
+ * @param {string} key The key of the value to remove.
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
+ */
+ function assocDelete(array, key) {
+ var index = assocIndexOf(array, key);
+ if (index < 0) {
+ return false;
+ }
+ var lastIndex = array.length - 1;
+ if (index == lastIndex) {
+ array.pop();
+ } else {
+ splice.call(array, index, 1);
+ }
+ return true;
+ }
+
+ /**
+ * Gets the associative array value for `key`.
+ *
+ * @private
+ * @param {Array} array The array to query.
+ * @param {string} key The key of the value to get.
+ * @returns {*} Returns the entry value.
+ */
+ function assocGet(array, key) {
+ var index = assocIndexOf(array, key);
+ return index < 0 ? undefined : array[index][1];
+ }
+
+ /**
+ * Checks if an associative array value for `key` exists.
+ *
+ * @private
+ * @param {Array} array The array to query.
+ * @param {string} key The key of the entry to check.
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
+ */
+ function assocHas(array, key) {
+ return assocIndexOf(array, key) > -1;
+ }
+
+ /**
+ * Gets the index at which the `key` is found in `array` of key-value pairs.
+ *
+ * @private
+ * @param {Array} array The array to search.
+ * @param {*} key The key to search for.
+ * @returns {number} Returns the index of the matched value, else `-1`.
+ */
+ function assocIndexOf(array, key) {
+ var length = array.length;
+ while (length--) {
+ if (eq(array[length][0], key)) {
+ return length;
+ }
+ }
+ return -1;
+ }
+
+ /**
+ * Sets the associative array `key` to `value`.
+ *
+ * @private
+ * @param {Array} array The array to modify.
+ * @param {string} key The key of the value to set.
+ * @param {*} value The value to set.
+ */
+ function assocSet(array, key, value) {
+ var index = assocIndexOf(array, key);
+ if (index < 0) {
+ array.push([key, value]);
+ } else {
+ array[index][1] = value;
+ }
+ }
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Used by `_.defaults` to customize its `_.assignIn` use.
+ *
+ * @private
+ * @param {*} objValue The destination value.
+ * @param {*} srcValue The source value.
+ * @param {string} key The key of the property to assign.
+ * @param {Object} object The parent object of `objValue`.
+ * @returns {*} Returns the value to assign.
+ */
+ function assignInDefaults(objValue, srcValue, key, object) {
+ if (objValue === undefined ||
+ (eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) {
+ return srcValue;
+ }
+ return objValue;
+ }
+
+ /**
+ * This function is like `assignValue` except that it doesn't assign
+ * `undefined` values.
+ *
+ * @private
+ * @param {Object} object The object to modify.
+ * @param {string} key The key of the property to assign.
+ * @param {*} value The value to assign.
+ */
+ function assignMergeValue(object, key, value) {
+ if ((value !== undefined && !eq(object[key], value)) ||
+ (typeof key == 'number' && value === undefined && !(key in object))) {
+ object[key] = value;
+ }
+ }
+
+ /**
+ * Assigns `value` to `key` of `object` if the existing value is not equivalent
+ * using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
+ * for equality comparisons.
+ *
+ * @private
+ * @param {Object} object The object to modify.
+ * @param {string} key The key of the property to assign.
+ * @param {*} value The value to assign.
+ */
+ function assignValue(object, key, value) {
+ var objValue = object[key];
+ if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||
+ (value === undefined && !(key in object))) {
+ object[key] = value;
+ }
+ }
+
+ /**
+ * Aggregates elements of `collection` on `accumulator` with keys transformed
+ * by `iteratee` and values set by `setter`.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} setter The function to set `accumulator` values.
+ * @param {Function} iteratee The iteratee to transform keys.
+ * @param {Object} accumulator The initial aggregated object.
+ * @returns {Function} Returns `accumulator`.
+ */
+ function baseAggregator(collection, setter, iteratee, accumulator) {
+ baseEach(collection, function(value, key, collection) {
+ setter(accumulator, value, iteratee(value), collection);
+ });
+ return accumulator;
+ }
+
+ /**
+ * The base implementation of `_.assign` without support for multiple sources
+ * or `customizer` functions.
+ *
+ * @private
+ * @param {Object} object The destination object.
+ * @param {Object} source The source object.
+ * @returns {Object} Returns `object`.
+ */
+ function baseAssign(object, source) {
+ return object && copyObject(source, keys(source), object);
+ }
+
+ /**
+ * The base implementation of `_.at` without support for individual paths.
+ *
+ * @private
+ * @param {Object} object The object to iterate over.
+ * @param {string[]} paths The property paths of elements to pick.
+ * @returns {Array} Returns the new array of picked elements.
+ */
+ function baseAt(object, paths) {
+ var index = -1,
+ isNil = object == null,
+ length = paths.length,
+ result = Array(length);
+
+ while (++index < length) {
+ result[index] = isNil ? undefined : get(object, paths[index]);
+ }
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.clamp` which doesn't coerce arguments to numbers.
+ *
+ * @private
+ * @param {number} number The number to clamp.
+ * @param {number} [lower] The lower bound.
+ * @param {number} upper The upper bound.
+ * @returns {number} Returns the clamped number.
+ */
+ function baseClamp(number, lower, upper) {
+ if (number === number) {
+ if (upper !== undefined) {
+ number = number <= upper ? number : upper;
+ }
+ if (lower !== undefined) {
+ number = number >= lower ? number : lower;
+ }
+ }
+ return number;
+ }
+
+ /**
+ * The base implementation of `_.clone` and `_.cloneDeep` which tracks
+ * traversed objects.
+ *
+ * @private
+ * @param {*} value The value to clone.
+ * @param {boolean} [isDeep] Specify a deep clone.
+ * @param {boolean} [isFull] Specify a clone including symbols.
+ * @param {Function} [customizer] The function to customize cloning.
+ * @param {string} [key] The key of `value`.
+ * @param {Object} [object] The parent object of `value`.
+ * @param {Object} [stack] Tracks traversed objects and their clone counterparts.
+ * @returns {*} Returns the cloned value.
+ */
+ function baseClone(value, isDeep, isFull, customizer, key, object, stack) {
+ var result;
+ if (customizer) {
+ result = object ? customizer(value, key, object, stack) : customizer(value);
+ }
+ if (result !== undefined) {
+ return result;
+ }
+ if (!isObject(value)) {
+ return value;
+ }
+ var isArr = isArray(value);
+ if (isArr) {
+ result = initCloneArray(value);
+ if (!isDeep) {
+ return copyArray(value, result);
+ }
+ } else {
+ var tag = getTag(value),
+ isFunc = tag == funcTag || tag == genTag;
+
+ if (isBuffer(value)) {
+ return cloneBuffer(value, isDeep);
+ }
+ if (tag == objectTag || tag == argsTag || (isFunc && !object)) {
+ if (isHostObject(value)) {
+ return object ? value : {};
+ }
+ result = initCloneObject(isFunc ? {} : value);
+ if (!isDeep) {
+ return copySymbols(value, baseAssign(result, value));
+ }
+ } else {
+ if (!cloneableTags[tag]) {
+ return object ? value : {};
+ }
+ result = initCloneByTag(value, tag, baseClone, isDeep);
+ }
+ }
+ // Check for circular references and return its corresponding clone.
+ stack || (stack = new Stack);
+ var stacked = stack.get(value);
+ if (stacked) {
+ return stacked;
+ }
+ stack.set(value, result);
+
+ if (!isArr) {
+ var props = isFull ? getAllKeys(value) : keys(value);
+ }
+ // Recursively populate clone (susceptible to call stack limits).
+ arrayEach(props || value, function(subValue, key) {
+ if (props) {
+ key = subValue;
+ subValue = value[key];
+ }
+ assignValue(result, key, baseClone(subValue, isDeep, isFull, customizer, key, value, stack));
+ });
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.conforms` which doesn't clone `source`.
+ *
+ * @private
+ * @param {Object} source The object of property predicates to conform to.
+ * @returns {Function} Returns the new function.
+ */
+ function baseConforms(source) {
+ var props = keys(source),
+ length = props.length;
+
+ return function(object) {
+ if (object == null) {
+ return !length;
+ }
+ var index = length;
+ while (index--) {
+ var key = props[index],
+ predicate = source[key],
+ value = object[key];
+
+ if ((value === undefined &&
+ !(key in Object(object))) || !predicate(value)) {
+ return false;
+ }
+ }
+ return true;
+ };
+ }
+
+ /**
+ * The base implementation of `_.create` without support for assigning
+ * properties to the created object.
+ *
+ * @private
+ * @param {Object} prototype The object to inherit from.
+ * @returns {Object} Returns the new object.
+ */
+ function baseCreate(proto) {
+ return isObject(proto) ? objectCreate(proto) : {};
+ }
+
+ /**
+ * The base implementation of `_.delay` and `_.defer` which accepts an array
+ * of `func` arguments.
+ *
+ * @private
+ * @param {Function} func The function to delay.
+ * @param {number} wait The number of milliseconds to delay invocation.
+ * @param {Object} args The arguments to provide to `func`.
+ * @returns {number} Returns the timer id.
+ */
+ function baseDelay(func, wait, args) {
+ if (typeof func != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ return setTimeout(function() { func.apply(undefined, args); }, wait);
+ }
+
+ /**
+ * The base implementation of methods like `_.difference` without support
+ * for excluding multiple arrays or iteratee shorthands.
+ *
+ * @private
+ * @param {Array} array The array to inspect.
+ * @param {Array} values The values to exclude.
+ * @param {Function} [iteratee] The iteratee invoked per element.
+ * @param {Function} [comparator] The comparator invoked per element.
+ * @returns {Array} Returns the new array of filtered values.
+ */
+ function baseDifference(array, values, iteratee, comparator) {
+ var index = -1,
+ includes = arrayIncludes,
+ isCommon = true,
+ length = array.length,
+ result = [],
+ valuesLength = values.length;
+
+ if (!length) {
+ return result;
+ }
+ if (iteratee) {
+ values = arrayMap(values, baseUnary(iteratee));
+ }
+ if (comparator) {
+ includes = arrayIncludesWith;
+ isCommon = false;
+ }
+ else if (values.length >= LARGE_ARRAY_SIZE) {
+ includes = cacheHas;
+ isCommon = false;
+ values = new SetCache(values);
+ }
+ outer:
+ while (++index < length) {
+ var value = array[index],
+ computed = iteratee ? iteratee(value) : value;
+
+ value = (comparator || value !== 0) ? value : 0;
+ if (isCommon && computed === computed) {
+ var valuesIndex = valuesLength;
+ while (valuesIndex--) {
+ if (values[valuesIndex] === computed) {
+ continue outer;
+ }
+ }
+ result.push(value);
+ }
+ else if (!includes(values, computed, comparator)) {
+ result.push(value);
+ }
+ }
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.forEach` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Array|Object} Returns `collection`.
+ */
+ var baseEach = createBaseEach(baseForOwn);
+
+ /**
+ * The base implementation of `_.forEachRight` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Array|Object} Returns `collection`.
+ */
+ var baseEachRight = createBaseEach(baseForOwnRight, true);
+
+ /**
+ * The base implementation of `_.every` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} predicate The function invoked per iteration.
+ * @returns {boolean} Returns `true` if all elements pass the predicate check,
+ * else `false`
+ */
+ function baseEvery(collection, predicate) {
+ var result = true;
+ baseEach(collection, function(value, index, collection) {
+ result = !!predicate(value, index, collection);
+ return result;
+ });
+ return result;
+ }
+
+ /**
+ * The base implementation of methods like `_.max` and `_.min` which accepts a
+ * `comparator` to determine the extremum value.
+ *
+ * @private
+ * @param {Array} array The array to iterate over.
+ * @param {Function} iteratee The iteratee invoked per iteration.
+ * @param {Function} comparator The comparator used to compare values.
+ * @returns {*} Returns the extremum value.
+ */
+ function baseExtremum(array, iteratee, comparator) {
+ var index = -1,
+ length = array.length;
+
+ while (++index < length) {
+ var value = array[index],
+ current = iteratee(value);
+
+ if (current != null && (computed === undefined
+ ? (current === current && !isSymbol(current))
+ : comparator(current, computed)
+ )) {
+ var computed = current,
+ result = value;
+ }
+ }
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.fill` without an iteratee call guard.
+ *
+ * @private
+ * @param {Array} array The array to fill.
+ * @param {*} value The value to fill `array` with.
+ * @param {number} [start=0] The start position.
+ * @param {number} [end=array.length] The end position.
+ * @returns {Array} Returns `array`.
+ */
+ function baseFill(array, value, start, end) {
+ var length = array.length;
+
+ start = toInteger(start);
+ if (start < 0) {
+ start = -start > length ? 0 : (length + start);
+ }
+ end = (end === undefined || end > length) ? length : toInteger(end);
+ if (end < 0) {
+ end += length;
+ }
+ end = start > end ? 0 : toLength(end);
+ while (start < end) {
+ array[start++] = value;
+ }
+ return array;
+ }
+
+ /**
+ * The base implementation of `_.filter` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} predicate The function invoked per iteration.
+ * @returns {Array} Returns the new filtered array.
+ */
+ function baseFilter(collection, predicate) {
+ var result = [];
+ baseEach(collection, function(value, index, collection) {
+ if (predicate(value, index, collection)) {
+ result.push(value);
+ }
+ });
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.flatten` with support for restricting flattening.
+ *
+ * @private
+ * @param {Array} array The array to flatten.
+ * @param {number} depth The maximum recursion depth.
+ * @param {boolean} [predicate=isFlattenable] The function invoked per iteration.
+ * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.
+ * @param {Array} [result=[]] The initial result value.
+ * @returns {Array} Returns the new flattened array.
+ */
+ function baseFlatten(array, depth, predicate, isStrict, result) {
+ var index = -1,
+ length = array.length;
+
+ predicate || (predicate = isFlattenable);
+ result || (result = []);
+
+ while (++index < length) {
+ var value = array[index];
+ if (depth > 0 && predicate(value)) {
+ if (depth > 1) {
+ // Recursively flatten arrays (susceptible to call stack limits).
+ baseFlatten(value, depth - 1, predicate, isStrict, result);
+ } else {
+ arrayPush(result, value);
+ }
+ } else if (!isStrict) {
+ result[result.length] = value;
+ }
+ }
+ return result;
+ }
+
+ /**
+ * The base implementation of `baseForOwn` which iterates over `object`
+ * properties returned by `keysFunc` and invokes `iteratee` for each property.
+ * Iteratee functions may exit iteration early by explicitly returning `false`.
+ *
+ * @private
+ * @param {Object} object The object to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @param {Function} keysFunc The function to get the keys of `object`.
+ * @returns {Object} Returns `object`.
+ */
+ var baseFor = createBaseFor();
+
+ /**
+ * This function is like `baseFor` except that it iterates over properties
+ * in the opposite order.
+ *
+ * @private
+ * @param {Object} object The object to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @param {Function} keysFunc The function to get the keys of `object`.
+ * @returns {Object} Returns `object`.
+ */
+ var baseForRight = createBaseFor(true);
+
+ /**
+ * The base implementation of `_.forOwn` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Object} object The object to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Object} Returns `object`.
+ */
+ function baseForOwn(object, iteratee) {
+ return object && baseFor(object, iteratee, keys);
+ }
+
+ /**
+ * The base implementation of `_.forOwnRight` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Object} object The object to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Object} Returns `object`.
+ */
+ function baseForOwnRight(object, iteratee) {
+ return object && baseForRight(object, iteratee, keys);
+ }
+
+ /**
+ * The base implementation of `_.functions` which creates an array of
+ * `object` function property names filtered from `props`.
+ *
+ * @private
+ * @param {Object} object The object to inspect.
+ * @param {Array} props The property names to filter.
+ * @returns {Array} Returns the new array of filtered property names.
+ */
+ function baseFunctions(object, props) {
+ return arrayFilter(props, function(key) {
+ return isFunction(object[key]);
+ });
+ }
+
+ /**
+ * The base implementation of `_.get` without support for default values.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {Array|string} path The path of the property to get.
+ * @returns {*} Returns the resolved value.
+ */
+ function baseGet(object, path) {
+ path = isKey(path, object) ? [path] : castPath(path);
+
+ var index = 0,
+ length = path.length;
+
+ while (object != null && index < length) {
+ object = object[toKey(path[index++])];
+ }
+ return (index && index == length) ? object : undefined;
+ }
+
+ /**
+ * The base implementation of `getAllKeys` and `getAllKeysIn` which uses
+ * `keysFunc` and `symbolsFunc` to get the enumerable property names and
+ * symbols of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {Function} keysFunc The function to get the keys of `object`.
+ * @param {Function} symbolsFunc The function to get the symbols of `object`.
+ * @returns {Array} Returns the array of property names and symbols.
+ */
+ function baseGetAllKeys(object, keysFunc, symbolsFunc) {
+ var result = keysFunc(object);
+ return isArray(object)
+ ? result
+ : arrayPush(result, symbolsFunc(object));
+ }
+
+ /**
+ * The base implementation of `_.gt` which doesn't coerce arguments to numbers.
+ *
+ * @private
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @returns {boolean} Returns `true` if `value` is greater than `other`,
+ * else `false`.
+ */
+ function baseGt(value, other) {
+ return value > other;
+ }
+
+ /**
+ * The base implementation of `_.has` without support for deep paths.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {Array|string} key The key to check.
+ * @returns {boolean} Returns `true` if `key` exists, else `false`.
+ */
+ function baseHas(object, key) {
+ // Avoid a bug in IE 10-11 where objects with a [[Prototype]] of `null`,
+ // that are composed entirely of index properties, return `false` for
+ // `hasOwnProperty` checks of them.
+ return hasOwnProperty.call(object, key) ||
+ (typeof object == 'object' && key in object && getPrototype(object) === null);
+ }
+
+ /**
+ * The base implementation of `_.hasIn` without support for deep paths.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {Array|string} key The key to check.
+ * @returns {boolean} Returns `true` if `key` exists, else `false`.
+ */
+ function baseHasIn(object, key) {
+ return key in Object(object);
+ }
+
+ /**
+ * The base implementation of `_.inRange` which doesn't coerce arguments to numbers.
+ *
+ * @private
+ * @param {number} number The number to check.
+ * @param {number} start The start of the range.
+ * @param {number} end The end of the range.
+ * @returns {boolean} Returns `true` if `number` is in the range, else `false`.
+ */
+ function baseInRange(number, start, end) {
+ return number >= nativeMin(start, end) && number < nativeMax(start, end);
+ }
+
+ /**
+ * The base implementation of methods like `_.intersection`, without support
+ * for iteratee shorthands, that accepts an array of arrays to inspect.
+ *
+ * @private
+ * @param {Array} arrays The arrays to inspect.
+ * @param {Function} [iteratee] The iteratee invoked per element.
+ * @param {Function} [comparator] The comparator invoked per element.
+ * @returns {Array} Returns the new array of shared values.
+ */
+ function baseIntersection(arrays, iteratee, comparator) {
+ var includes = comparator ? arrayIncludesWith : arrayIncludes,
+ length = arrays[0].length,
+ othLength = arrays.length,
+ othIndex = othLength,
+ caches = Array(othLength),
+ maxLength = Infinity,
+ result = [];
+
+ while (othIndex--) {
+ var array = arrays[othIndex];
+ if (othIndex && iteratee) {
+ array = arrayMap(array, baseUnary(iteratee));
+ }
+ maxLength = nativeMin(array.length, maxLength);
+ caches[othIndex] = !comparator && (iteratee || (length >= 120 && array.length >= 120))
+ ? new SetCache(othIndex && array)
+ : undefined;
+ }
+ array = arrays[0];
+
+ var index = -1,
+ seen = caches[0];
+
+ outer:
+ while (++index < length && result.length < maxLength) {
+ var value = array[index],
+ computed = iteratee ? iteratee(value) : value;
+
+ value = (comparator || value !== 0) ? value : 0;
+ if (!(seen
+ ? cacheHas(seen, computed)
+ : includes(result, computed, comparator)
+ )) {
+ othIndex = othLength;
+ while (--othIndex) {
+ var cache = caches[othIndex];
+ if (!(cache
+ ? cacheHas(cache, computed)
+ : includes(arrays[othIndex], computed, comparator))
+ ) {
+ continue outer;
+ }
+ }
+ if (seen) {
+ seen.push(computed);
+ }
+ result.push(value);
+ }
+ }
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.invert` and `_.invertBy` which inverts
+ * `object` with values transformed by `iteratee` and set by `setter`.
+ *
+ * @private
+ * @param {Object} object The object to iterate over.
+ * @param {Function} setter The function to set `accumulator` values.
+ * @param {Function} iteratee The iteratee to transform values.
+ * @param {Object} accumulator The initial inverted object.
+ * @returns {Function} Returns `accumulator`.
+ */
+ function baseInverter(object, setter, iteratee, accumulator) {
+ baseForOwn(object, function(value, key, object) {
+ setter(accumulator, iteratee(value), key, object);
+ });
+ return accumulator;
+ }
+
+ /**
+ * The base implementation of `_.invoke` without support for individual
+ * method arguments.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {Array|string} path The path of the method to invoke.
+ * @param {Array} args The arguments to invoke the method with.
+ * @returns {*} Returns the result of the invoked method.
+ */
+ function baseInvoke(object, path, args) {
+ if (!isKey(path, object)) {
+ path = castPath(path);
+ object = parent(object, path);
+ path = last(path);
+ }
+ var func = object == null ? object : object[toKey(path)];
+ return func == null ? undefined : apply(func, object, args);
+ }
+
+ /**
+ * The base implementation of `_.isEqual` which supports partial comparisons
+ * and tracks traversed objects.
+ *
+ * @private
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @param {Function} [customizer] The function to customize comparisons.
+ * @param {boolean} [bitmask] The bitmask of comparison flags.
+ * The bitmask may be composed of the following flags:
+ * 1 - Unordered comparison
+ * 2 - Partial comparison
+ * @param {Object} [stack] Tracks traversed `value` and `other` objects.
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
+ */
+ function baseIsEqual(value, other, customizer, bitmask, stack) {
+ if (value === other) {
+ return true;
+ }
+ if (value == null || other == null || (!isObject(value) && !isObjectLike(other))) {
+ return value !== value && other !== other;
+ }
+ return baseIsEqualDeep(value, other, baseIsEqual, customizer, bitmask, stack);
+ }
+
+ /**
+ * A specialized version of `baseIsEqual` for arrays and objects which performs
+ * deep comparisons and tracks traversed objects enabling objects with circular
+ * references to be compared.
+ *
+ * @private
+ * @param {Object} object The object to compare.
+ * @param {Object} other The other object to compare.
+ * @param {Function} equalFunc The function to determine equivalents of values.
+ * @param {Function} [customizer] The function to customize comparisons.
+ * @param {number} [bitmask] The bitmask of comparison flags. See `baseIsEqual`
+ * for more details.
+ * @param {Object} [stack] Tracks traversed `object` and `other` objects.
+ * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
+ */
+ function baseIsEqualDeep(object, other, equalFunc, customizer, bitmask, stack) {
+ var objIsArr = isArray(object),
+ othIsArr = isArray(other),
+ objTag = arrayTag,
+ othTag = arrayTag;
+
+ if (!objIsArr) {
+ objTag = getTag(object);
+ objTag = objTag == argsTag ? objectTag : objTag;
+ }
+ if (!othIsArr) {
+ othTag = getTag(other);
+ othTag = othTag == argsTag ? objectTag : othTag;
+ }
+ var objIsObj = objTag == objectTag && !isHostObject(object),
+ othIsObj = othTag == objectTag && !isHostObject(other),
+ isSameTag = objTag == othTag;
+
+ if (isSameTag && !objIsObj) {
+ stack || (stack = new Stack);
+ return (objIsArr || isTypedArray(object))
+ ? equalArrays(object, other, equalFunc, customizer, bitmask, stack)
+ : equalByTag(object, other, objTag, equalFunc, customizer, bitmask, stack);
+ }
+ if (!(bitmask & PARTIAL_COMPARE_FLAG)) {
+ var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),
+ othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');
+
+ if (objIsWrapped || othIsWrapped) {
+ var objUnwrapped = objIsWrapped ? object.value() : object,
+ othUnwrapped = othIsWrapped ? other.value() : other;
+
+ stack || (stack = new Stack);
+ return equalFunc(objUnwrapped, othUnwrapped, customizer, bitmask, stack);
+ }
+ }
+ if (!isSameTag) {
+ return false;
+ }
+ stack || (stack = new Stack);
+ return equalObjects(object, other, equalFunc, customizer, bitmask, stack);
+ }
+
+ /**
+ * The base implementation of `_.isMatch` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Object} object The object to inspect.
+ * @param {Object} source The object of property values to match.
+ * @param {Array} matchData The property names, values, and compare flags to match.
+ * @param {Function} [customizer] The function to customize comparisons.
+ * @returns {boolean} Returns `true` if `object` is a match, else `false`.
+ */
+ function baseIsMatch(object, source, matchData, customizer) {
+ var index = matchData.length,
+ length = index,
+ noCustomizer = !customizer;
+
+ if (object == null) {
+ return !length;
+ }
+ object = Object(object);
+ while (index--) {
+ var data = matchData[index];
+ if ((noCustomizer && data[2])
+ ? data[1] !== object[data[0]]
+ : !(data[0] in object)
+ ) {
+ return false;
+ }
+ }
+ while (++index < length) {
+ data = matchData[index];
+ var key = data[0],
+ objValue = object[key],
+ srcValue = data[1];
+
+ if (noCustomizer && data[2]) {
+ if (objValue === undefined && !(key in object)) {
+ return false;
+ }
+ } else {
+ var stack = new Stack;
+ if (customizer) {
+ var result = customizer(objValue, srcValue, key, object, source, stack);
+ }
+ if (!(result === undefined
+ ? baseIsEqual(srcValue, objValue, customizer, UNORDERED_COMPARE_FLAG | PARTIAL_COMPARE_FLAG, stack)
+ : result
+ )) {
+ return false;
+ }
+ }
+ }
+ return true;
+ }
+
+ /**
+ * The base implementation of `_.iteratee`.
+ *
+ * @private
+ * @param {*} [value=_.identity] The value to convert to an iteratee.
+ * @returns {Function} Returns the iteratee.
+ */
+ function baseIteratee(value) {
+ // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.
+ // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.
+ if (typeof value == 'function') {
+ return value;
+ }
+ if (value == null) {
+ return identity;
+ }
+ if (typeof value == 'object') {
+ return isArray(value)
+ ? baseMatchesProperty(value[0], value[1])
+ : baseMatches(value);
+ }
+ return property(value);
+ }
+
+ /**
+ * The base implementation of `_.keys` which doesn't skip the constructor
+ * property of prototypes or treat sparse arrays as dense.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property names.
+ */
+ function baseKeys(object) {
+ return nativeKeys(Object(object));
+ }
+
+ /**
+ * The base implementation of `_.keysIn` which doesn't skip the constructor
+ * property of prototypes or treat sparse arrays as dense.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property names.
+ */
+ function baseKeysIn(object) {
+ object = object == null ? object : Object(object);
+
+ var result = [];
+ for (var key in object) {
+ result.push(key);
+ }
+ return result;
+ }
+
+ // Fallback for IE < 9 with es6-shim.
+ if (enumerate && !propertyIsEnumerable.call({ 'valueOf': 1 }, 'valueOf')) {
+ baseKeysIn = function(object) {
+ return iteratorToArray(enumerate(object));
+ };
+ }
+
+ /**
+ * The base implementation of `_.lt` which doesn't coerce arguments to numbers.
+ *
+ * @private
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @returns {boolean} Returns `true` if `value` is less than `other`,
+ * else `false`.
+ */
+ function baseLt(value, other) {
+ return value < other;
+ }
+
+ /**
+ * The base implementation of `_.map` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Array} Returns the new mapped array.
+ */
+ function baseMap(collection, iteratee) {
+ var index = -1,
+ result = isArrayLike(collection) ? Array(collection.length) : [];
+
+ baseEach(collection, function(value, key, collection) {
+ result[++index] = iteratee(value, key, collection);
+ });
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.matches` which doesn't clone `source`.
+ *
+ * @private
+ * @param {Object} source The object of property values to match.
+ * @returns {Function} Returns the new function.
+ */
+ function baseMatches(source) {
+ var matchData = getMatchData(source);
+ if (matchData.length == 1 && matchData[0][2]) {
+ return matchesStrictComparable(matchData[0][0], matchData[0][1]);
+ }
+ return function(object) {
+ return object === source || baseIsMatch(object, source, matchData);
+ };
+ }
+
+ /**
+ * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.
+ *
+ * @private
+ * @param {string} path The path of the property to get.
+ * @param {*} srcValue The value to match.
+ * @returns {Function} Returns the new function.
+ */
+ function baseMatchesProperty(path, srcValue) {
+ if (isKey(path) && isStrictComparable(srcValue)) {
+ return matchesStrictComparable(toKey(path), srcValue);
+ }
+ return function(object) {
+ var objValue = get(object, path);
+ return (objValue === undefined && objValue === srcValue)
+ ? hasIn(object, path)
+ : baseIsEqual(srcValue, objValue, undefined, UNORDERED_COMPARE_FLAG | PARTIAL_COMPARE_FLAG);
+ };
+ }
+
+ /**
+ * The base implementation of `_.merge` without support for multiple sources.
+ *
+ * @private
+ * @param {Object} object The destination object.
+ * @param {Object} source The source object.
+ * @param {number} srcIndex The index of `source`.
+ * @param {Function} [customizer] The function to customize merged values.
+ * @param {Object} [stack] Tracks traversed source values and their merged
+ * counterparts.
+ */
+ function baseMerge(object, source, srcIndex, customizer, stack) {
+ if (object === source) {
+ return;
+ }
+ if (!(isArray(source) || isTypedArray(source))) {
+ var props = keysIn(source);
+ }
+ arrayEach(props || source, function(srcValue, key) {
+ if (props) {
+ key = srcValue;
+ srcValue = source[key];
+ }
+ if (isObject(srcValue)) {
+ stack || (stack = new Stack);
+ baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);
+ }
+ else {
+ var newValue = customizer
+ ? customizer(object[key], srcValue, (key + ''), object, source, stack)
+ : undefined;
+
+ if (newValue === undefined) {
+ newValue = srcValue;
+ }
+ assignMergeValue(object, key, newValue);
+ }
+ });
+ }
+
+ /**
+ * A specialized version of `baseMerge` for arrays and objects which performs
+ * deep merges and tracks traversed objects enabling objects with circular
+ * references to be merged.
+ *
+ * @private
+ * @param {Object} object The destination object.
+ * @param {Object} source The source object.
+ * @param {string} key The key of the value to merge.
+ * @param {number} srcIndex The index of `source`.
+ * @param {Function} mergeFunc The function to merge values.
+ * @param {Function} [customizer] The function to customize assigned values.
+ * @param {Object} [stack] Tracks traversed source values and their merged
+ * counterparts.
+ */
+ function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {
+ var objValue = object[key],
+ srcValue = source[key],
+ stacked = stack.get(srcValue);
+
+ if (stacked) {
+ assignMergeValue(object, key, stacked);
+ return;
+ }
+ var newValue = customizer
+ ? customizer(objValue, srcValue, (key + ''), object, source, stack)
+ : undefined;
+
+ var isCommon = newValue === undefined;
+
+ if (isCommon) {
+ newValue = srcValue;
+ if (isArray(srcValue) || isTypedArray(srcValue)) {
+ if (isArray(objValue)) {
+ newValue = objValue;
+ }
+ else if (isArrayLikeObject(objValue)) {
+ newValue = copyArray(objValue);
+ }
+ else {
+ isCommon = false;
+ newValue = baseClone(srcValue, true);
+ }
+ }
+ else if (isPlainObject(srcValue) || isArguments(srcValue)) {
+ if (isArguments(objValue)) {
+ newValue = toPlainObject(objValue);
+ }
+ else if (!isObject(objValue) || (srcIndex && isFunction(objValue))) {
+ isCommon = false;
+ newValue = baseClone(srcValue, true);
+ }
+ else {
+ newValue = objValue;
+ }
+ }
+ else {
+ isCommon = false;
+ }
+ }
+ stack.set(srcValue, newValue);
+
+ if (isCommon) {
+ // Recursively merge objects and arrays (susceptible to call stack limits).
+ mergeFunc(newValue, srcValue, srcIndex, customizer, stack);
+ }
+ stack['delete'](srcValue);
+ assignMergeValue(object, key, newValue);
+ }
+
+ /**
+ * The base implementation of `_.nth` which doesn't coerce `n` to an integer.
+ *
+ * @private
+ * @param {Array} array The array to query.
+ * @param {number} n The index of the element to return.
+ * @returns {*} Returns the nth element of `array`.
+ */
+ function baseNth(array, n) {
+ var length = array.length;
+ if (!length) {
+ return;
+ }
+ n += n < 0 ? length : 0;
+ return isIndex(n, length) ? array[n] : undefined;
+ }
+
+ /**
+ * The base implementation of `_.orderBy` without param guards.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by.
+ * @param {string[]} orders The sort orders of `iteratees`.
+ * @returns {Array} Returns the new sorted array.
+ */
+ function baseOrderBy(collection, iteratees, orders) {
+ var index = -1;
+ iteratees = arrayMap(iteratees.length ? iteratees : [identity], baseUnary(getIteratee()));
+
+ var result = baseMap(collection, function(value, key, collection) {
+ var criteria = arrayMap(iteratees, function(iteratee) {
+ return iteratee(value);
+ });
+ return { 'criteria': criteria, 'index': ++index, 'value': value };
+ });
+
+ return baseSortBy(result, function(object, other) {
+ return compareMultiple(object, other, orders);
+ });
+ }
+
+ /**
+ * The base implementation of `_.pick` without support for individual
+ * property identifiers.
+ *
+ * @private
+ * @param {Object} object The source object.
+ * @param {string[]} props The property identifiers to pick.
+ * @returns {Object} Returns the new object.
+ */
+ function basePick(object, props) {
+ object = Object(object);
+ return arrayReduce(props, function(result, key) {
+ if (key in object) {
+ result[key] = object[key];
+ }
+ return result;
+ }, {});
+ }
+
+ /**
+ * The base implementation of `_.pickBy` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Object} object The source object.
+ * @param {Function} predicate The function invoked per property.
+ * @returns {Object} Returns the new object.
+ */
+ function basePickBy(object, predicate) {
+ var index = -1,
+ props = getAllKeysIn(object),
+ length = props.length,
+ result = {};
+
+ while (++index < length) {
+ var key = props[index],
+ value = object[key];
+
+ if (predicate(value, key)) {
+ result[key] = value;
+ }
+ }
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.property` without support for deep paths.
+ *
+ * @private
+ * @param {string} key The key of the property to get.
+ * @returns {Function} Returns the new function.
+ */
+ function baseProperty(key) {
+ return function(object) {
+ return object == null ? undefined : object[key];
+ };
+ }
+
+ /**
+ * A specialized version of `baseProperty` which supports deep paths.
+ *
+ * @private
+ * @param {Array|string} path The path of the property to get.
+ * @returns {Function} Returns the new function.
+ */
+ function basePropertyDeep(path) {
+ return function(object) {
+ return baseGet(object, path);
+ };
+ }
+
+ /**
+ * The base implementation of `_.pullAllBy` without support for iteratee
+ * shorthands.
+ *
+ * @private
+ * @param {Array} array The array to modify.
+ * @param {Array} values The values to remove.
+ * @param {Function} [iteratee] The iteratee invoked per element.
+ * @param {Function} [comparator] The comparator invoked per element.
+ * @returns {Array} Returns `array`.
+ */
+ function basePullAll(array, values, iteratee, comparator) {
+ var indexOf = comparator ? baseIndexOfWith : baseIndexOf,
+ index = -1,
+ length = values.length,
+ seen = array;
+
+ if (iteratee) {
+ seen = arrayMap(array, baseUnary(iteratee));
+ }
+ while (++index < length) {
+ var fromIndex = 0,
+ value = values[index],
+ computed = iteratee ? iteratee(value) : value;
+
+ while ((fromIndex = indexOf(seen, computed, fromIndex, comparator)) > -1) {
+ if (seen !== array) {
+ splice.call(seen, fromIndex, 1);
+ }
+ splice.call(array, fromIndex, 1);
+ }
+ }
+ return array;
+ }
+
+ /**
+ * The base implementation of `_.pullAt` without support for individual
+ * indexes or capturing the removed elements.
+ *
+ * @private
+ * @param {Array} array The array to modify.
+ * @param {number[]} indexes The indexes of elements to remove.
+ * @returns {Array} Returns `array`.
+ */
+ function basePullAt(array, indexes) {
+ var length = array ? indexes.length : 0,
+ lastIndex = length - 1;
+
+ while (length--) {
+ var index = indexes[length];
+ if (length == lastIndex || index !== previous) {
+ var previous = index;
+ if (isIndex(index)) {
+ splice.call(array, index, 1);
+ }
+ else if (!isKey(index, array)) {
+ var path = castPath(index),
+ object = parent(array, path);
+
+ if (object != null) {
+ delete object[toKey(last(path))];
+ }
+ }
+ else {
+ delete array[toKey(index)];
+ }
+ }
+ }
+ return array;
+ }
+
+ /**
+ * The base implementation of `_.random` without support for returning
+ * floating-point numbers.
+ *
+ * @private
+ * @param {number} lower The lower bound.
+ * @param {number} upper The upper bound.
+ * @returns {number} Returns the random number.
+ */
+ function baseRandom(lower, upper) {
+ return lower + nativeFloor(nativeRandom() * (upper - lower + 1));
+ }
+
+ /**
+ * The base implementation of `_.range` and `_.rangeRight` which doesn't
+ * coerce arguments to numbers.
+ *
+ * @private
+ * @param {number} start The start of the range.
+ * @param {number} end The end of the range.
+ * @param {number} step The value to increment or decrement by.
+ * @param {boolean} [fromRight] Specify iterating from right to left.
+ * @returns {Array} Returns the new array of numbers.
+ */
+ function baseRange(start, end, step, fromRight) {
+ var index = -1,
+ length = nativeMax(nativeCeil((end - start) / (step || 1)), 0),
+ result = Array(length);
+
+ while (length--) {
+ result[fromRight ? length : ++index] = start;
+ start += step;
+ }
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.repeat` which doesn't coerce arguments.
+ *
+ * @private
+ * @param {string} string The string to repeat.
+ * @param {number} n The number of times to repeat the string.
+ * @returns {string} Returns the repeated string.
+ */
+ function baseRepeat(string, n) {
+ var result = '';
+ if (!string || n < 1 || n > MAX_SAFE_INTEGER) {
+ return result;
+ }
+ // Leverage the exponentiation by squaring algorithm for a faster repeat.
+ // See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details.
+ do {
+ if (n % 2) {
+ result += string;
+ }
+ n = nativeFloor(n / 2);
+ if (n) {
+ string += string;
+ }
+ } while (n);
+
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.set`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {Array|string} path The path of the property to set.
+ * @param {*} value The value to set.
+ * @param {Function} [customizer] The function to customize path creation.
+ * @returns {Object} Returns `object`.
+ */
+ function baseSet(object, path, value, customizer) {
+ path = isKey(path, object) ? [path] : castPath(path);
+
+ var index = -1,
+ length = path.length,
+ lastIndex = length - 1,
+ nested = object;
+
+ while (nested != null && ++index < length) {
+ var key = toKey(path[index]);
+ if (isObject(nested)) {
+ var newValue = value;
+ if (index != lastIndex) {
+ var objValue = nested[key];
+ newValue = customizer ? customizer(objValue, key, nested) : undefined;
+ if (newValue === undefined) {
+ newValue = objValue == null
+ ? (isIndex(path[index + 1]) ? [] : {})
+ : objValue;
+ }
+ }
+ assignValue(nested, key, newValue);
+ }
+ nested = nested[key];
+ }
+ return object;
+ }
+
+ /**
+ * The base implementation of `setData` without support for hot loop detection.
+ *
+ * @private
+ * @param {Function} func The function to associate metadata with.
+ * @param {*} data The metadata.
+ * @returns {Function} Returns `func`.
+ */
+ var baseSetData = !metaMap ? identity : function(func, data) {
+ metaMap.set(func, data);
+ return func;
+ };
+
+ /**
+ * The base implementation of `_.slice` without an iteratee call guard.
+ *
+ * @private
+ * @param {Array} array The array to slice.
+ * @param {number} [start=0] The start position.
+ * @param {number} [end=array.length] The end position.
+ * @returns {Array} Returns the slice of `array`.
+ */
+ function baseSlice(array, start, end) {
+ var index = -1,
+ length = array.length;
+
+ if (start < 0) {
+ start = -start > length ? 0 : (length + start);
+ }
+ end = end > length ? length : end;
+ if (end < 0) {
+ end += length;
+ }
+ length = start > end ? 0 : ((end - start) >>> 0);
+ start >>>= 0;
+
+ var result = Array(length);
+ while (++index < length) {
+ result[index] = array[index + start];
+ }
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.some` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} predicate The function invoked per iteration.
+ * @returns {boolean} Returns `true` if any element passes the predicate check,
+ * else `false`.
+ */
+ function baseSome(collection, predicate) {
+ var result;
+
+ baseEach(collection, function(value, index, collection) {
+ result = predicate(value, index, collection);
+ return !result;
+ });
+ return !!result;
+ }
+
+ /**
+ * The base implementation of `_.sortedIndex` and `_.sortedLastIndex` which
+ * performs a binary search of `array` to determine the index at which `value`
+ * should be inserted into `array` in order to maintain its sort order.
+ *
+ * @private
+ * @param {Array} array The sorted array to inspect.
+ * @param {*} value The value to evaluate.
+ * @param {boolean} [retHighest] Specify returning the highest qualified index.
+ * @returns {number} Returns the index at which `value` should be inserted
+ * into `array`.
+ */
+ function baseSortedIndex(array, value, retHighest) {
+ var low = 0,
+ high = array ? array.length : low;
+
+ if (typeof value == 'number' && value === value && high <= HALF_MAX_ARRAY_LENGTH) {
+ while (low < high) {
+ var mid = (low + high) >>> 1,
+ computed = array[mid];
+
+ if (computed !== null && !isSymbol(computed) &&
+ (retHighest ? (computed <= value) : (computed < value))) {
+ low = mid + 1;
+ } else {
+ high = mid;
+ }
+ }
+ return high;
+ }
+ return baseSortedIndexBy(array, value, identity, retHighest);
+ }
+
+ /**
+ * The base implementation of `_.sortedIndexBy` and `_.sortedLastIndexBy`
+ * which invokes `iteratee` for `value` and each element of `array` to compute
+ * their sort ranking. The iteratee is invoked with one argument; (value).
+ *
+ * @private
+ * @param {Array} array The sorted array to inspect.
+ * @param {*} value The value to evaluate.
+ * @param {Function} iteratee The iteratee invoked per element.
+ * @param {boolean} [retHighest] Specify returning the highest qualified index.
+ * @returns {number} Returns the index at which `value` should be inserted
+ * into `array`.
+ */
+ function baseSortedIndexBy(array, value, iteratee, retHighest) {
+ value = iteratee(value);
+
+ var low = 0,
+ high = array ? array.length : 0,
+ valIsNaN = value !== value,
+ valIsNull = value === null,
+ valIsSymbol = isSymbol(value),
+ valIsUndefined = value === undefined;
+
+ while (low < high) {
+ var mid = nativeFloor((low + high) / 2),
+ computed = iteratee(array[mid]),
+ othIsDefined = computed !== undefined,
+ othIsNull = computed === null,
+ othIsReflexive = computed === computed,
+ othIsSymbol = isSymbol(computed);
+
+ if (valIsNaN) {
+ var setLow = retHighest || othIsReflexive;
+ } else if (valIsUndefined) {
+ setLow = othIsReflexive && (retHighest || othIsDefined);
+ } else if (valIsNull) {
+ setLow = othIsReflexive && othIsDefined && (retHighest || !othIsNull);
+ } else if (valIsSymbol) {
+ setLow = othIsReflexive && othIsDefined && !othIsNull && (retHighest || !othIsSymbol);
+ } else if (othIsNull || othIsSymbol) {
+ setLow = false;
+ } else {
+ setLow = retHighest ? (computed <= value) : (computed < value);
+ }
+ if (setLow) {
+ low = mid + 1;
+ } else {
+ high = mid;
+ }
+ }
+ return nativeMin(high, MAX_ARRAY_INDEX);
+ }
+
+ /**
+ * The base implementation of `_.sortedUniq` and `_.sortedUniqBy` without
+ * support for iteratee shorthands.
+ *
+ * @private
+ * @param {Array} array The array to inspect.
+ * @param {Function} [iteratee] The iteratee invoked per element.
+ * @returns {Array} Returns the new duplicate free array.
+ */
+ function baseSortedUniq(array, iteratee) {
+ var index = -1,
+ length = array.length,
+ resIndex = 0,
+ result = [];
+
+ while (++index < length) {
+ var value = array[index],
+ computed = iteratee ? iteratee(value) : value;
+
+ if (!index || !eq(computed, seen)) {
+ var seen = computed;
+ result[resIndex++] = value === 0 ? 0 : value;
+ }
+ }
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.toNumber` which doesn't ensure correct
+ * conversions of binary, hexadecimal, or octal string values.
+ *
+ * @private
+ * @param {*} value The value to process.
+ * @returns {number} Returns the number.
+ */
+ function baseToNumber(value) {
+ if (typeof value == 'number') {
+ return value;
+ }
+ if (isSymbol(value)) {
+ return NAN;
+ }
+ return +value;
+ }
+
+ /**
+ * The base implementation of `_.toString` which doesn't convert nullish
+ * values to empty strings.
+ *
+ * @private
+ * @param {*} value The value to process.
+ * @returns {string} Returns the string.
+ */
+ function baseToString(value) {
+ // Exit early for strings to avoid a performance hit in some environments.
+ if (typeof value == 'string') {
+ return value;
+ }
+ if (isSymbol(value)) {
+ return symbolToString ? symbolToString.call(value) : '';
+ }
+ var result = (value + '');
+ return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
+ }
+
+ /**
+ * The base implementation of `_.uniqBy` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Array} array The array to inspect.
+ * @param {Function} [iteratee] The iteratee invoked per element.
+ * @param {Function} [comparator] The comparator invoked per element.
+ * @returns {Array} Returns the new duplicate free array.
+ */
+ function baseUniq(array, iteratee, comparator) {
+ var index = -1,
+ includes = arrayIncludes,
+ length = array.length,
+ isCommon = true,
+ result = [],
+ seen = result;
+
+ if (comparator) {
+ isCommon = false;
+ includes = arrayIncludesWith;
+ }
+ else if (length >= LARGE_ARRAY_SIZE) {
+ var set = iteratee ? null : createSet(array);
+ if (set) {
+ return setToArray(set);
+ }
+ isCommon = false;
+ includes = cacheHas;
+ seen = new SetCache;
+ }
+ else {
+ seen = iteratee ? [] : result;
+ }
+ outer:
+ while (++index < length) {
+ var value = array[index],
+ computed = iteratee ? iteratee(value) : value;
+
+ value = (comparator || value !== 0) ? value : 0;
+ if (isCommon && computed === computed) {
+ var seenIndex = seen.length;
+ while (seenIndex--) {
+ if (seen[seenIndex] === computed) {
+ continue outer;
+ }
+ }
+ if (iteratee) {
+ seen.push(computed);
+ }
+ result.push(value);
+ }
+ else if (!includes(seen, computed, comparator)) {
+ if (seen !== result) {
+ seen.push(computed);
+ }
+ result.push(value);
+ }
+ }
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.unset`.
+ *
+ * @private
+ * @param {Object} object The object to modify.
+ * @param {Array|string} path The path of the property to unset.
+ * @returns {boolean} Returns `true` if the property is deleted, else `false`.
+ */
+ function baseUnset(object, path) {
+ path = isKey(path, object) ? [path] : castPath(path);
+ object = parent(object, path);
+
+ var key = toKey(last(path));
+ return !(object != null && baseHas(object, key)) || delete object[key];
+ }
+
+ /**
+ * The base implementation of `_.update`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {Array|string} path The path of the property to update.
+ * @param {Function} updater The function to produce the updated value.
+ * @param {Function} [customizer] The function to customize path creation.
+ * @returns {Object} Returns `object`.
+ */
+ function baseUpdate(object, path, updater, customizer) {
+ return baseSet(object, path, updater(baseGet(object, path)), customizer);
+ }
+
+ /**
+ * The base implementation of methods like `_.dropWhile` and `_.takeWhile`
+ * without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Array} array The array to query.
+ * @param {Function} predicate The function invoked per iteration.
+ * @param {boolean} [isDrop] Specify dropping elements instead of taking them.
+ * @param {boolean} [fromRight] Specify iterating from right to left.
+ * @returns {Array} Returns the slice of `array`.
+ */
+ function baseWhile(array, predicate, isDrop, fromRight) {
+ var length = array.length,
+ index = fromRight ? length : -1;
+
+ while ((fromRight ? index-- : ++index < length) &&
+ predicate(array[index], index, array)) {}
+
+ return isDrop
+ ? baseSlice(array, (fromRight ? 0 : index), (fromRight ? index + 1 : length))
+ : baseSlice(array, (fromRight ? index + 1 : 0), (fromRight ? length : index));
+ }
+
+ /**
+ * The base implementation of `wrapperValue` which returns the result of
+ * performing a sequence of actions on the unwrapped `value`, where each
+ * successive action is supplied the return value of the previous.
+ *
+ * @private
+ * @param {*} value The unwrapped value.
+ * @param {Array} actions Actions to perform to resolve the unwrapped value.
+ * @returns {*} Returns the resolved value.
+ */
+ function baseWrapperValue(value, actions) {
+ var result = value;
+ if (result instanceof LazyWrapper) {
+ result = result.value();
+ }
+ return arrayReduce(actions, function(result, action) {
+ return action.func.apply(action.thisArg, arrayPush([result], action.args));
+ }, result);
+ }
+
+ /**
+ * The base implementation of methods like `_.xor`, without support for
+ * iteratee shorthands, that accepts an array of arrays to inspect.
+ *
+ * @private
+ * @param {Array} arrays The arrays to inspect.
+ * @param {Function} [iteratee] The iteratee invoked per element.
+ * @param {Function} [comparator] The comparator invoked per element.
+ * @returns {Array} Returns the new array of values.
+ */
+ function baseXor(arrays, iteratee, comparator) {
+ var index = -1,
+ length = arrays.length;
+
+ while (++index < length) {
+ var result = result
+ ? arrayPush(
+ baseDifference(result, arrays[index], iteratee, comparator),
+ baseDifference(arrays[index], result, iteratee, comparator)
+ )
+ : arrays[index];
+ }
+ return (result && result.length) ? baseUniq(result, iteratee, comparator) : [];
+ }
+
+ /**
+ * This base implementation of `_.zipObject` which assigns values using `assignFunc`.
+ *
+ * @private
+ * @param {Array} props The property identifiers.
+ * @param {Array} values The property values.
+ * @param {Function} assignFunc The function to assign values.
+ * @returns {Object} Returns the new object.
+ */
+ function baseZipObject(props, values, assignFunc) {
+ var index = -1,
+ length = props.length,
+ valsLength = values.length,
+ result = {};
+
+ while (++index < length) {
+ var value = index < valsLength ? values[index] : undefined;
+ assignFunc(result, props[index], value);
+ }
+ return result;
+ }
+
+ /**
+ * Casts `value` to an empty array if it's not an array like object.
+ *
+ * @private
+ * @param {*} value The value to inspect.
+ * @returns {Array|Object} Returns the cast array-like object.
+ */
+ function castArrayLikeObject(value) {
+ return isArrayLikeObject(value) ? value : [];
+ }
+
+ /**
+ * Casts `value` to `identity` if it's not a function.
+ *
+ * @private
+ * @param {*} value The value to inspect.
+ * @returns {Function} Returns cast function.
+ */
+ function castFunction(value) {
+ return typeof value == 'function' ? value : identity;
+ }
+
+ /**
+ * Casts `value` to a path array if it's not one.
+ *
+ * @private
+ * @param {*} value The value to inspect.
+ * @returns {Array} Returns the cast property path array.
+ */
+ function castPath(value) {
+ return isArray(value) ? value : stringToPath(value);
+ }
+
+ /**
+ * Casts `array` to a slice if it's needed.
+ *
+ * @private
+ * @param {Array} array The array to inspect.
+ * @param {number} start The start position.
+ * @param {number} [end=array.length] The end position.
+ * @returns {Array} Returns the cast slice.
+ */
+ function castSlice(array, start, end) {
+ var length = array.length;
+ end = end === undefined ? length : end;
+ return (!start && end >= length) ? array : baseSlice(array, start, end);
+ }
+
+ /**
+ * Creates a clone of `buffer`.
+ *
+ * @private
+ * @param {Buffer} buffer The buffer to clone.
+ * @param {boolean} [isDeep] Specify a deep clone.
+ * @returns {Buffer} Returns the cloned buffer.
+ */
+ function cloneBuffer(buffer, isDeep) {
+ if (isDeep) {
+ return buffer.slice();
+ }
+ var result = new buffer.constructor(buffer.length);
+ buffer.copy(result);
+ return result;
+ }
+
+ /**
+ * Creates a clone of `arrayBuffer`.
+ *
+ * @private
+ * @param {ArrayBuffer} arrayBuffer The array buffer to clone.
+ * @returns {ArrayBuffer} Returns the cloned array buffer.
+ */
+ function cloneArrayBuffer(arrayBuffer) {
+ var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
+ new Uint8Array(result).set(new Uint8Array(arrayBuffer));
+ return result;
+ }
+
+ /**
+ * Creates a clone of `dataView`.
+ *
+ * @private
+ * @param {Object} dataView The data view to clone.
+ * @param {boolean} [isDeep] Specify a deep clone.
+ * @returns {Object} Returns the cloned data view.
+ */
+ function cloneDataView(dataView, isDeep) {
+ var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;
+ return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
+ }
+
+ /**
+ * Creates a clone of `map`.
+ *
+ * @private
+ * @param {Object} map The map to clone.
+ * @param {Function} cloneFunc The function to clone values.
+ * @param {boolean} [isDeep] Specify a deep clone.
+ * @returns {Object} Returns the cloned map.
+ */
+ function cloneMap(map, isDeep, cloneFunc) {
+ var array = isDeep ? cloneFunc(mapToArray(map), true) : mapToArray(map);
+ return arrayReduce(array, addMapEntry, new map.constructor);
+ }
+
+ /**
+ * Creates a clone of `regexp`.
+ *
+ * @private
+ * @param {Object} regexp The regexp to clone.
+ * @returns {Object} Returns the cloned regexp.
+ */
+ function cloneRegExp(regexp) {
+ var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));
+ result.lastIndex = regexp.lastIndex;
+ return result;
+ }
+
+ /**
+ * Creates a clone of `set`.
+ *
+ * @private
+ * @param {Object} set The set to clone.
+ * @param {Function} cloneFunc The function to clone values.
+ * @param {boolean} [isDeep] Specify a deep clone.
+ * @returns {Object} Returns the cloned set.
+ */
+ function cloneSet(set, isDeep, cloneFunc) {
+ var array = isDeep ? cloneFunc(setToArray(set), true) : setToArray(set);
+ return arrayReduce(array, addSetEntry, new set.constructor);
+ }
+
+ /**
+ * Creates a clone of the `symbol` object.
+ *
+ * @private
+ * @param {Object} symbol The symbol object to clone.
+ * @returns {Object} Returns the cloned symbol object.
+ */
+ function cloneSymbol(symbol) {
+ return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};
+ }
+
+ /**
+ * Creates a clone of `typedArray`.
+ *
+ * @private
+ * @param {Object} typedArray The typed array to clone.
+ * @param {boolean} [isDeep] Specify a deep clone.
+ * @returns {Object} Returns the cloned typed array.
+ */
+ function cloneTypedArray(typedArray, isDeep) {
+ var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;
+ return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
+ }
+
+ /**
+ * Compares values to sort them in ascending order.
+ *
+ * @private
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @returns {number} Returns the sort order indicator for `value`.
+ */
+ function compareAscending(value, other) {
+ if (value !== other) {
+ var valIsDefined = value !== undefined,
+ valIsNull = value === null,
+ valIsReflexive = value === value,
+ valIsSymbol = isSymbol(value);
+
+ var othIsDefined = other !== undefined,
+ othIsNull = other === null,
+ othIsReflexive = other === other,
+ othIsSymbol = isSymbol(other);
+
+ if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) ||
+ (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) ||
+ (valIsNull && othIsDefined && othIsReflexive) ||
+ (!valIsDefined && othIsReflexive) ||
+ !valIsReflexive) {
+ return 1;
+ }
+ if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) ||
+ (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) ||
+ (othIsNull && valIsDefined && valIsReflexive) ||
+ (!othIsDefined && valIsReflexive) ||
+ !othIsReflexive) {
+ return -1;
+ }
+ }
+ return 0;
+ }
+
+ /**
+ * Used by `_.orderBy` to compare multiple properties of a value to another
+ * and stable sort them.
+ *
+ * If `orders` is unspecified, all values are sorted in ascending order. Otherwise,
+ * specify an order of "desc" for descending or "asc" for ascending sort order
+ * of corresponding values.
+ *
+ * @private
+ * @param {Object} object The object to compare.
+ * @param {Object} other The other object to compare.
+ * @param {boolean[]|string[]} orders The order to sort by for each property.
+ * @returns {number} Returns the sort order indicator for `object`.
+ */
+ function compareMultiple(object, other, orders) {
+ var index = -1,
+ objCriteria = object.criteria,
+ othCriteria = other.criteria,
+ length = objCriteria.length,
+ ordersLength = orders.length;
+
+ while (++index < length) {
+ var result = compareAscending(objCriteria[index], othCriteria[index]);
+ if (result) {
+ if (index >= ordersLength) {
+ return result;
+ }
+ var order = orders[index];
+ return result * (order == 'desc' ? -1 : 1);
+ }
+ }
+ // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications
+ // that causes it, under certain circumstances, to provide the same value for
+ // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247
+ // for more details.
+ //
+ // This also ensures a stable sort in V8 and other engines.
+ // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details.
+ return object.index - other.index;
+ }
+
+ /**
+ * Creates an array that is the composition of partially applied arguments,
+ * placeholders, and provided arguments into a single array of arguments.
+ *
+ * @private
+ * @param {Array|Object} args The provided arguments.
+ * @param {Array} partials The arguments to prepend to those provided.
+ * @param {Array} holders The `partials` placeholder indexes.
+ * @params {boolean} [isCurried] Specify composing for a curried function.
+ * @returns {Array} Returns the new array of composed arguments.
+ */
+ function composeArgs(args, partials, holders, isCurried) {
+ var argsIndex = -1,
+ argsLength = args.length,
+ holdersLength = holders.length,
+ leftIndex = -1,
+ leftLength = partials.length,
+ rangeLength = nativeMax(argsLength - holdersLength, 0),
+ result = Array(leftLength + rangeLength),
+ isUncurried = !isCurried;
+
+ while (++leftIndex < leftLength) {
+ result[leftIndex] = partials[leftIndex];
+ }
+ while (++argsIndex < holdersLength) {
+ if (isUncurried || argsIndex < argsLength) {
+ result[holders[argsIndex]] = args[argsIndex];
+ }
+ }
+ while (rangeLength--) {
+ result[leftIndex++] = args[argsIndex++];
+ }
+ return result;
+ }
+
+ /**
+ * This function is like `composeArgs` except that the arguments composition
+ * is tailored for `_.partialRight`.
+ *
+ * @private
+ * @param {Array|Object} args The provided arguments.
+ * @param {Array} partials The arguments to append to those provided.
+ * @param {Array} holders The `partials` placeholder indexes.
+ * @params {boolean} [isCurried] Specify composing for a curried function.
+ * @returns {Array} Returns the new array of composed arguments.
+ */
+ function composeArgsRight(args, partials, holders, isCurried) {
+ var argsIndex = -1,
+ argsLength = args.length,
+ holdersIndex = -1,
+ holdersLength = holders.length,
+ rightIndex = -1,
+ rightLength = partials.length,
+ rangeLength = nativeMax(argsLength - holdersLength, 0),
+ result = Array(rangeLength + rightLength),
+ isUncurried = !isCurried;
+
+ while (++argsIndex < rangeLength) {
+ result[argsIndex] = args[argsIndex];
+ }
+ var offset = argsIndex;
+ while (++rightIndex < rightLength) {
+ result[offset + rightIndex] = partials[rightIndex];
+ }
+ while (++holdersIndex < holdersLength) {
+ if (isUncurried || argsIndex < argsLength) {
+ result[offset + holders[holdersIndex]] = args[argsIndex++];
+ }
+ }
+ return result;
+ }
+
+ /**
+ * Copies the values of `source` to `array`.
+ *
+ * @private
+ * @param {Array} source The array to copy values from.
+ * @param {Array} [array=[]] The array to copy values to.
+ * @returns {Array} Returns `array`.
+ */
+ function copyArray(source, array) {
+ var index = -1,
+ length = source.length;
+
+ array || (array = Array(length));
+ while (++index < length) {
+ array[index] = source[index];
+ }
+ return array;
+ }
+
+ /**
+ * Copies properties of `source` to `object`.
+ *
+ * @private
+ * @param {Object} source The object to copy properties from.
+ * @param {Array} props The property identifiers to copy.
+ * @param {Object} [object={}] The object to copy properties to.
+ * @param {Function} [customizer] The function to customize copied values.
+ * @returns {Object} Returns `object`.
+ */
+ function copyObject(source, props, object, customizer) {
+ object || (object = {});
+
+ var index = -1,
+ length = props.length;
+
+ while (++index < length) {
+ var key = props[index];
+
+ var newValue = customizer
+ ? customizer(object[key], source[key], key, object, source)
+ : source[key];
+
+ assignValue(object, key, newValue);
+ }
+ return object;
+ }
+
+ /**
+ * Copies own symbol properties of `source` to `object`.
+ *
+ * @private
+ * @param {Object} source The object to copy symbols from.
+ * @param {Object} [object={}] The object to copy symbols to.
+ * @returns {Object} Returns `object`.
+ */
+ function copySymbols(source, object) {
+ return copyObject(source, getSymbols(source), object);
+ }
+
+ /**
+ * Creates a function like `_.groupBy`.
+ *
+ * @private
+ * @param {Function} setter The function to set accumulator values.
+ * @param {Function} [initializer] The accumulator object initializer.
+ * @returns {Function} Returns the new aggregator function.
+ */
+ function createAggregator(setter, initializer) {
+ return function(collection, iteratee) {
+ var func = isArray(collection) ? arrayAggregator : baseAggregator,
+ accumulator = initializer ? initializer() : {};
+
+ return func(collection, setter, getIteratee(iteratee), accumulator);
+ };
+ }
+
+ /**
+ * Creates a function like `_.assign`.
+ *
+ * @private
+ * @param {Function} assigner The function to assign values.
+ * @returns {Function} Returns the new assigner function.
+ */
+ function createAssigner(assigner) {
+ return rest(function(object, sources) {
+ var index = -1,
+ length = sources.length,
+ customizer = length > 1 ? sources[length - 1] : undefined,
+ guard = length > 2 ? sources[2] : undefined;
+
+ customizer = typeof customizer == 'function'
+ ? (length--, customizer)
+ : undefined;
+
+ if (guard && isIterateeCall(sources[0], sources[1], guard)) {
+ customizer = length < 3 ? undefined : customizer;
+ length = 1;
+ }
+ object = Object(object);
+ while (++index < length) {
+ var source = sources[index];
+ if (source) {
+ assigner(object, source, index, customizer);
+ }
+ }
+ return object;
+ });
+ }
+
+ /**
+ * Creates a `baseEach` or `baseEachRight` function.
+ *
+ * @private
+ * @param {Function} eachFunc The function to iterate over a collection.
+ * @param {boolean} [fromRight] Specify iterating from right to left.
+ * @returns {Function} Returns the new base function.
+ */
+ function createBaseEach(eachFunc, fromRight) {
+ return function(collection, iteratee) {
+ if (collection == null) {
+ return collection;
+ }
+ if (!isArrayLike(collection)) {
+ return eachFunc(collection, iteratee);
+ }
+ var length = collection.length,
+ index = fromRight ? length : -1,
+ iterable = Object(collection);
+
+ while ((fromRight ? index-- : ++index < length)) {
+ if (iteratee(iterable[index], index, iterable) === false) {
+ break;
+ }
+ }
+ return collection;
+ };
+ }
+
+ /**
+ * Creates a base function for methods like `_.forIn` and `_.forOwn`.
+ *
+ * @private
+ * @param {boolean} [fromRight] Specify iterating from right to left.
+ * @returns {Function} Returns the new base function.
+ */
+ function createBaseFor(fromRight) {
+ return function(object, iteratee, keysFunc) {
+ var index = -1,
+ iterable = Object(object),
+ props = keysFunc(object),
+ length = props.length;
+
+ while (length--) {
+ var key = props[fromRight ? length : ++index];
+ if (iteratee(iterable[key], key, iterable) === false) {
+ break;
+ }
+ }
+ return object;
+ };
+ }
+
+ /**
+ * Creates a function that wraps `func` to invoke it with the optional `this`
+ * binding of `thisArg`.
+ *
+ * @private
+ * @param {Function} func The function to wrap.
+ * @param {number} bitmask The bitmask of wrapper flags. See `createWrapper`
+ * for more details.
+ * @param {*} [thisArg] The `this` binding of `func`.
+ * @returns {Function} Returns the new wrapped function.
+ */
+ function createBaseWrapper(func, bitmask, thisArg) {
+ var isBind = bitmask & BIND_FLAG,
+ Ctor = createCtorWrapper(func);
+
+ function wrapper() {
+ var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
+ return fn.apply(isBind ? thisArg : this, arguments);
+ }
+ return wrapper;
+ }
+
+ /**
+ * Creates a function like `_.lowerFirst`.
+ *
+ * @private
+ * @param {string} methodName The name of the `String` case method to use.
+ * @returns {Function} Returns the new function.
+ */
+ function createCaseFirst(methodName) {
+ return function(string) {
+ string = toString(string);
+
+ var strSymbols = reHasComplexSymbol.test(string)
+ ? stringToArray(string)
+ : undefined;
+
+ var chr = strSymbols
+ ? strSymbols[0]
+ : string.charAt(0);
+
+ var trailing = strSymbols
+ ? castSlice(strSymbols, 1).join('')
+ : string.slice(1);
+
+ return chr[methodName]() + trailing;
+ };
+ }
+
+ /**
+ * Creates a function like `_.camelCase`.
+ *
+ * @private
+ * @param {Function} callback The function to combine each word.
+ * @returns {Function} Returns the new compounder function.
+ */
+ function createCompounder(callback) {
+ return function(string) {
+ return arrayReduce(words(deburr(string).replace(reApos, '')), callback, '');
+ };
+ }
+
+ /**
+ * Creates a function that produces an instance of `Ctor` regardless of
+ * whether it was invoked as part of a `new` expression or by `call` or `apply`.
+ *
+ * @private
+ * @param {Function} Ctor The constructor to wrap.
+ * @returns {Function} Returns the new wrapped function.
+ */
+ function createCtorWrapper(Ctor) {
+ return function() {
+ // Use a `switch` statement to work with class constructors. See
+ // http://ecma-international.org/ecma-262/6.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist
+ // for more details.
+ var args = arguments;
+ switch (args.length) {
+ case 0: return new Ctor;
+ case 1: return new Ctor(args[0]);
+ case 2: return new Ctor(args[0], args[1]);
+ case 3: return new Ctor(args[0], args[1], args[2]);
+ case 4: return new Ctor(args[0], args[1], args[2], args[3]);
+ case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]);
+ case 6: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]);
+ case 7: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]);
+ }
+ var thisBinding = baseCreate(Ctor.prototype),
+ result = Ctor.apply(thisBinding, args);
+
+ // Mimic the constructor's `return` behavior.
+ // See https://es5.github.io/#x13.2.2 for more details.
+ return isObject(result) ? result : thisBinding;
+ };
+ }
+
+ /**
+ * Creates a function that wraps `func` to enable currying.
+ *
+ * @private
+ * @param {Function} func The function to wrap.
+ * @param {number} bitmask The bitmask of wrapper flags. See `createWrapper`
+ * for more details.
+ * @param {number} arity The arity of `func`.
+ * @returns {Function} Returns the new wrapped function.
+ */
+ function createCurryWrapper(func, bitmask, arity) {
+ var Ctor = createCtorWrapper(func);
+
+ function wrapper() {
+ var length = arguments.length,
+ args = Array(length),
+ index = length,
+ placeholder = getPlaceholder(wrapper);
+
+ while (index--) {
+ args[index] = arguments[index];
+ }
+ var holders = (length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder)
+ ? []
+ : replaceHolders(args, placeholder);
+
+ length -= holders.length;
+ if (length < arity) {
+ return createRecurryWrapper(
+ func, bitmask, createHybridWrapper, wrapper.placeholder, undefined,
+ args, holders, undefined, undefined, arity - length);
+ }
+ var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
+ return apply(fn, this, args);
+ }
+ return wrapper;
+ }
+
+ /**
+ * Creates a `_.flow` or `_.flowRight` function.
+ *
+ * @private
+ * @param {boolean} [fromRight] Specify iterating from right to left.
+ * @returns {Function} Returns the new flow function.
+ */
+ function createFlow(fromRight) {
+ return rest(function(funcs) {
+ funcs = baseFlatten(funcs, 1);
+
+ var length = funcs.length,
+ index = length,
+ prereq = LodashWrapper.prototype.thru;
+
+ if (fromRight) {
+ funcs.reverse();
+ }
+ while (index--) {
+ var func = funcs[index];
+ if (typeof func != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ if (prereq && !wrapper && getFuncName(func) == 'wrapper') {
+ var wrapper = new LodashWrapper([], true);
+ }
+ }
+ index = wrapper ? index : length;
+ while (++index < length) {
+ func = funcs[index];
+
+ var funcName = getFuncName(func),
+ data = funcName == 'wrapper' ? getData(func) : undefined;
+
+ if (data && isLaziable(data[0]) &&
+ data[1] == (ARY_FLAG | CURRY_FLAG | PARTIAL_FLAG | REARG_FLAG) &&
+ !data[4].length && data[9] == 1
+ ) {
+ wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]);
+ } else {
+ wrapper = (func.length == 1 && isLaziable(func))
+ ? wrapper[funcName]()
+ : wrapper.thru(func);
+ }
+ }
+ return function() {
+ var args = arguments,
+ value = args[0];
+
+ if (wrapper && args.length == 1 &&
+ isArray(value) && value.length >= LARGE_ARRAY_SIZE) {
+ return wrapper.plant(value).value();
+ }
+ var index = 0,
+ result = length ? funcs[index].apply(this, args) : value;
+
+ while (++index < length) {
+ result = funcs[index].call(this, result);
+ }
+ return result;
+ };
+ });
+ }
+
+ /**
+ * Creates a function that wraps `func` to invoke it with optional `this`
+ * binding of `thisArg`, partial application, and currying.
+ *
+ * @private
+ * @param {Function|string} func The function or method name to wrap.
+ * @param {number} bitmask The bitmask of wrapper flags. See `createWrapper`
+ * for more details.
+ * @param {*} [thisArg] The `this` binding of `func`.
+ * @param {Array} [partials] The arguments to prepend to those provided to
+ * the new function.
+ * @param {Array} [holders] The `partials` placeholder indexes.
+ * @param {Array} [partialsRight] The arguments to append to those provided
+ * to the new function.
+ * @param {Array} [holdersRight] The `partialsRight` placeholder indexes.
+ * @param {Array} [argPos] The argument positions of the new function.
+ * @param {number} [ary] The arity cap of `func`.
+ * @param {number} [arity] The arity of `func`.
+ * @returns {Function} Returns the new wrapped function.
+ */
+ function createHybridWrapper(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) {
+ var isAry = bitmask & ARY_FLAG,
+ isBind = bitmask & BIND_FLAG,
+ isBindKey = bitmask & BIND_KEY_FLAG,
+ isCurried = bitmask & (CURRY_FLAG | CURRY_RIGHT_FLAG),
+ isFlip = bitmask & FLIP_FLAG,
+ Ctor = isBindKey ? undefined : createCtorWrapper(func);
+
+ function wrapper() {
+ var length = arguments.length,
+ index = length,
+ args = Array(length);
+
+ while (index--) {
+ args[index] = arguments[index];
+ }
+ if (isCurried) {
+ var placeholder = getPlaceholder(wrapper),
+ holdersCount = countHolders(args, placeholder);
+ }
+ if (partials) {
+ args = composeArgs(args, partials, holders, isCurried);
+ }
+ if (partialsRight) {
+ args = composeArgsRight(args, partialsRight, holdersRight, isCurried);
+ }
+ length -= holdersCount;
+ if (isCurried && length < arity) {
+ var newHolders = replaceHolders(args, placeholder);
+ return createRecurryWrapper(
+ func, bitmask, createHybridWrapper, wrapper.placeholder, thisArg,
+ args, newHolders, argPos, ary, arity - length
+ );
+ }
+ var thisBinding = isBind ? thisArg : this,
+ fn = isBindKey ? thisBinding[func] : func;
+
+ length = args.length;
+ if (argPos) {
+ args = reorder(args, argPos);
+ } else if (isFlip && length > 1) {
+ args.reverse();
+ }
+ if (isAry && ary < length) {
+ args.length = ary;
+ }
+ if (this && this !== root && this instanceof wrapper) {
+ fn = Ctor || createCtorWrapper(fn);
+ }
+ return fn.apply(thisBinding, args);
+ }
+ return wrapper;
+ }
+
+ /**
+ * Creates a function like `_.invertBy`.
+ *
+ * @private
+ * @param {Function} setter The function to set accumulator values.
+ * @param {Function} toIteratee The function to resolve iteratees.
+ * @returns {Function} Returns the new inverter function.
+ */
+ function createInverter(setter, toIteratee) {
+ return function(object, iteratee) {
+ return baseInverter(object, setter, toIteratee(iteratee), {});
+ };
+ }
+
+ /**
+ * Creates a function that performs a mathematical operation on two values.
+ *
+ * @private
+ * @param {Function} operator The function to perform the operation.
+ * @returns {Function} Returns the new mathematical operation function.
+ */
+ function createMathOperation(operator) {
+ return function(value, other) {
+ var result;
+ if (value === undefined && other === undefined) {
+ return 0;
+ }
+ if (value !== undefined) {
+ result = value;
+ }
+ if (other !== undefined) {
+ if (result === undefined) {
+ return other;
+ }
+ if (typeof value == 'string' || typeof other == 'string') {
+ value = baseToString(value);
+ other = baseToString(other);
+ } else {
+ value = baseToNumber(value);
+ other = baseToNumber(other);
+ }
+ result = operator(value, other);
+ }
+ return result;
+ };
+ }
+
+ /**
+ * Creates a function like `_.over`.
+ *
+ * @private
+ * @param {Function} arrayFunc The function to iterate over iteratees.
+ * @returns {Function} Returns the new invoker function.
+ */
+ function createOver(arrayFunc) {
+ return rest(function(iteratees) {
+ iteratees = (iteratees.length == 1 && isArray(iteratees[0]))
+ ? arrayMap(iteratees[0], baseUnary(getIteratee()))
+ : arrayMap(baseFlatten(iteratees, 1, isFlattenableIteratee), baseUnary(getIteratee()));
+
+ return rest(function(args) {
+ var thisArg = this;
+ return arrayFunc(iteratees, function(iteratee) {
+ return apply(iteratee, thisArg, args);
+ });
+ });
+ });
+ }
+
+ /**
+ * Creates the padding for `string` based on `length`. The `chars` string
+ * is truncated if the number of characters exceeds `length`.
+ *
+ * @private
+ * @param {number} length The padding length.
+ * @param {string} [chars=' '] The string used as padding.
+ * @returns {string} Returns the padding for `string`.
+ */
+ function createPadding(length, chars) {
+ chars = chars === undefined ? ' ' : baseToString(chars);
+
+ var charsLength = chars.length;
+ if (charsLength < 2) {
+ return charsLength ? baseRepeat(chars, length) : chars;
+ }
+ var result = baseRepeat(chars, nativeCeil(length / stringSize(chars)));
+ return reHasComplexSymbol.test(chars)
+ ? castSlice(stringToArray(result), 0, length).join('')
+ : result.slice(0, length);
+ }
+
+ /**
+ * Creates a function that wraps `func` to invoke it with the `this` binding
+ * of `thisArg` and `partials` prepended to the arguments it receives.
+ *
+ * @private
+ * @param {Function} func The function to wrap.
+ * @param {number} bitmask The bitmask of wrapper flags. See `createWrapper`
+ * for more details.
+ * @param {*} thisArg The `this` binding of `func`.
+ * @param {Array} partials The arguments to prepend to those provided to
+ * the new function.
+ * @returns {Function} Returns the new wrapped function.
+ */
+ function createPartialWrapper(func, bitmask, thisArg, partials) {
+ var isBind = bitmask & BIND_FLAG,
+ Ctor = createCtorWrapper(func);
+
+ function wrapper() {
+ var argsIndex = -1,
+ argsLength = arguments.length,
+ leftIndex = -1,
+ leftLength = partials.length,
+ args = Array(leftLength + argsLength),
+ fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
+
+ while (++leftIndex < leftLength) {
+ args[leftIndex] = partials[leftIndex];
+ }
+ while (argsLength--) {
+ args[leftIndex++] = arguments[++argsIndex];
+ }
+ return apply(fn, isBind ? thisArg : this, args);
+ }
+ return wrapper;
+ }
+
+ /**
+ * Creates a `_.range` or `_.rangeRight` function.
+ *
+ * @private
+ * @param {boolean} [fromRight] Specify iterating from right to left.
+ * @returns {Function} Returns the new range function.
+ */
+ function createRange(fromRight) {
+ return function(start, end, step) {
+ if (step && typeof step != 'number' && isIterateeCall(start, end, step)) {
+ end = step = undefined;
+ }
+ // Ensure the sign of `-0` is preserved.
+ start = toNumber(start);
+ start = start === start ? start : 0;
+ if (end === undefined) {
+ end = start;
+ start = 0;
+ } else {
+ end = toNumber(end) || 0;
+ }
+ step = step === undefined ? (start < end ? 1 : -1) : (toNumber(step) || 0);
+ return baseRange(start, end, step, fromRight);
+ };
+ }
+
+ /**
+ * Creates a function that performs a relational operation on two values.
+ *
+ * @private
+ * @param {Function} operator The function to perform the operation.
+ * @returns {Function} Returns the new relational operation function.
+ */
+ function createRelationalOperation(operator) {
+ return function(value, other) {
+ if (!(typeof value == 'string' && typeof other == 'string')) {
+ value = toNumber(value);
+ other = toNumber(other);
+ }
+ return operator(value, other);
+ };
+ }
+
+ /**
+ * Creates a function that wraps `func` to continue currying.
+ *
+ * @private
+ * @param {Function} func The function to wrap.
+ * @param {number} bitmask The bitmask of wrapper flags. See `createWrapper`
+ * for more details.
+ * @param {Function} wrapFunc The function to create the `func` wrapper.
+ * @param {*} placeholder The placeholder value.
+ * @param {*} [thisArg] The `this` binding of `func`.
+ * @param {Array} [partials] The arguments to prepend to those provided to
+ * the new function.
+ * @param {Array} [holders] The `partials` placeholder indexes.
+ * @param {Array} [argPos] The argument positions of the new function.
+ * @param {number} [ary] The arity cap of `func`.
+ * @param {number} [arity] The arity of `func`.
+ * @returns {Function} Returns the new wrapped function.
+ */
+ function createRecurryWrapper(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) {
+ var isCurry = bitmask & CURRY_FLAG,
+ newHolders = isCurry ? holders : undefined,
+ newHoldersRight = isCurry ? undefined : holders,
+ newPartials = isCurry ? partials : undefined,
+ newPartialsRight = isCurry ? undefined : partials;
+
+ bitmask |= (isCurry ? PARTIAL_FLAG : PARTIAL_RIGHT_FLAG);
+ bitmask &= ~(isCurry ? PARTIAL_RIGHT_FLAG : PARTIAL_FLAG);
+
+ if (!(bitmask & CURRY_BOUND_FLAG)) {
+ bitmask &= ~(BIND_FLAG | BIND_KEY_FLAG);
+ }
+ var newData = [
+ func, bitmask, thisArg, newPartials, newHolders, newPartialsRight,
+ newHoldersRight, argPos, ary, arity
+ ];
+
+ var result = wrapFunc.apply(undefined, newData);
+ if (isLaziable(func)) {
+ setData(result, newData);
+ }
+ result.placeholder = placeholder;
+ return result;
+ }
+
+ /**
+ * Creates a function like `_.round`.
+ *
+ * @private
+ * @param {string} methodName The name of the `Math` method to use when rounding.
+ * @returns {Function} Returns the new round function.
+ */
+ function createRound(methodName) {
+ var func = Math[methodName];
+ return function(number, precision) {
+ number = toNumber(number);
+ precision = toInteger(precision);
+ if (precision) {
+ // Shift with exponential notation to avoid floating-point issues.
+ // See [MDN](https://mdn.io/round#Examples) for more details.
+ var pair = (toString(number) + 'e').split('e'),
+ value = func(pair[0] + 'e' + (+pair[1] + precision));
+
+ pair = (toString(value) + 'e').split('e');
+ return +(pair[0] + 'e' + (+pair[1] - precision));
+ }
+ return func(number);
+ };
+ }
+
+ /**
+ * Creates a set of `values`.
+ *
+ * @private
+ * @param {Array} values The values to add to the set.
+ * @returns {Object} Returns the new set.
+ */
+ var createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) {
+ return new Set(values);
+ };
+
+ /**
+ * Creates a function that either curries or invokes `func` with optional
+ * `this` binding and partially applied arguments.
+ *
+ * @private
+ * @param {Function|string} func The function or method name to wrap.
+ * @param {number} bitmask The bitmask of wrapper flags.
+ * The bitmask may be composed of the following flags:
+ * 1 - `_.bind`
+ * 2 - `_.bindKey`
+ * 4 - `_.curry` or `_.curryRight` of a bound function
+ * 8 - `_.curry`
+ * 16 - `_.curryRight`
+ * 32 - `_.partial`
+ * 64 - `_.partialRight`
+ * 128 - `_.rearg`
+ * 256 - `_.ary`
+ * @param {*} [thisArg] The `this` binding of `func`.
+ * @param {Array} [partials] The arguments to be partially applied.
+ * @param {Array} [holders] The `partials` placeholder indexes.
+ * @param {Array} [argPos] The argument positions of the new function.
+ * @param {number} [ary] The arity cap of `func`.
+ * @param {number} [arity] The arity of `func`.
+ * @returns {Function} Returns the new wrapped function.
+ */
+ function createWrapper(func, bitmask, thisArg, partials, holders, argPos, ary, arity) {
+ var isBindKey = bitmask & BIND_KEY_FLAG;
+ if (!isBindKey && typeof func != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ var length = partials ? partials.length : 0;
+ if (!length) {
+ bitmask &= ~(PARTIAL_FLAG | PARTIAL_RIGHT_FLAG);
+ partials = holders = undefined;
+ }
+ ary = ary === undefined ? ary : nativeMax(toInteger(ary), 0);
+ arity = arity === undefined ? arity : toInteger(arity);
+ length -= holders ? holders.length : 0;
+
+ if (bitmask & PARTIAL_RIGHT_FLAG) {
+ var partialsRight = partials,
+ holdersRight = holders;
+
+ partials = holders = undefined;
+ }
+ var data = isBindKey ? undefined : getData(func);
+
+ var newData = [
+ func, bitmask, thisArg, partials, holders, partialsRight, holdersRight,
+ argPos, ary, arity
+ ];
+
+ if (data) {
+ mergeData(newData, data);
+ }
+ func = newData[0];
+ bitmask = newData[1];
+ thisArg = newData[2];
+ partials = newData[3];
+ holders = newData[4];
+ arity = newData[9] = newData[9] == null
+ ? (isBindKey ? 0 : func.length)
+ : nativeMax(newData[9] - length, 0);
+
+ if (!arity && bitmask & (CURRY_FLAG | CURRY_RIGHT_FLAG)) {
+ bitmask &= ~(CURRY_FLAG | CURRY_RIGHT_FLAG);
+ }
+ if (!bitmask || bitmask == BIND_FLAG) {
+ var result = createBaseWrapper(func, bitmask, thisArg);
+ } else if (bitmask == CURRY_FLAG || bitmask == CURRY_RIGHT_FLAG) {
+ result = createCurryWrapper(func, bitmask, arity);
+ } else if ((bitmask == PARTIAL_FLAG || bitmask == (BIND_FLAG | PARTIAL_FLAG)) && !holders.length) {
+ result = createPartialWrapper(func, bitmask, thisArg, partials);
+ } else {
+ result = createHybridWrapper.apply(undefined, newData);
+ }
+ var setter = data ? baseSetData : setData;
+ return setter(result, newData);
+ }
+
+ /**
+ * A specialized version of `baseIsEqualDeep` for arrays with support for
+ * partial deep comparisons.
+ *
+ * @private
+ * @param {Array} array The array to compare.
+ * @param {Array} other The other array to compare.
+ * @param {Function} equalFunc The function to determine equivalents of values.
+ * @param {Function} customizer The function to customize comparisons.
+ * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual`
+ * for more details.
+ * @param {Object} stack Tracks traversed `array` and `other` objects.
+ * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.
+ */
+ function equalArrays(array, other, equalFunc, customizer, bitmask, stack) {
+ var index = -1,
+ isPartial = bitmask & PARTIAL_COMPARE_FLAG,
+ isUnordered = bitmask & UNORDERED_COMPARE_FLAG,
+ arrLength = array.length,
+ othLength = other.length;
+
+ if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
+ return false;
+ }
+ // Assume cyclic values are equal.
+ var stacked = stack.get(array);
+ if (stacked) {
+ return stacked == other;
+ }
+ var result = true;
+ stack.set(array, other);
+
+ // Ignore non-index properties.
+ while (++index < arrLength) {
+ var arrValue = array[index],
+ othValue = other[index];
+
+ if (customizer) {
+ var compared = isPartial
+ ? customizer(othValue, arrValue, index, other, array, stack)
+ : customizer(arrValue, othValue, index, array, other, stack);
+ }
+ if (compared !== undefined) {
+ if (compared) {
+ continue;
+ }
+ result = false;
+ break;
+ }
+ // Recursively compare arrays (susceptible to call stack limits).
+ if (isUnordered) {
+ if (!arraySome(other, function(othValue) {
+ return arrValue === othValue ||
+ equalFunc(arrValue, othValue, customizer, bitmask, stack);
+ })) {
+ result = false;
+ break;
+ }
+ } else if (!(
+ arrValue === othValue ||
+ equalFunc(arrValue, othValue, customizer, bitmask, stack)
+ )) {
+ result = false;
+ break;
+ }
+ }
+ stack['delete'](array);
+ return result;
+ }
+
+ /**
+ * A specialized version of `baseIsEqualDeep` for comparing objects of
+ * the same `toStringTag`.
+ *
+ * **Note:** This function only supports comparing values with tags of
+ * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
+ *
+ * @private
+ * @param {Object} object The object to compare.
+ * @param {Object} other The other object to compare.
+ * @param {string} tag The `toStringTag` of the objects to compare.
+ * @param {Function} equalFunc The function to determine equivalents of values.
+ * @param {Function} customizer The function to customize comparisons.
+ * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual`
+ * for more details.
+ * @param {Object} stack Tracks traversed `object` and `other` objects.
+ * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
+ */
+ function equalByTag(object, other, tag, equalFunc, customizer, bitmask, stack) {
+ switch (tag) {
+ case dataViewTag:
+ if ((object.byteLength != other.byteLength) ||
+ (object.byteOffset != other.byteOffset)) {
+ return false;
+ }
+ object = object.buffer;
+ other = other.buffer;
+
+ case arrayBufferTag:
+ if ((object.byteLength != other.byteLength) ||
+ !equalFunc(new Uint8Array(object), new Uint8Array(other))) {
+ return false;
+ }
+ return true;
+
+ case boolTag:
+ case dateTag:
+ // Coerce dates and booleans to numbers, dates to milliseconds and
+ // booleans to `1` or `0` treating invalid dates coerced to `NaN` as
+ // not equal.
+ return +object == +other;
+
+ case errorTag:
+ return object.name == other.name && object.message == other.message;
+
+ case numberTag:
+ // Treat `NaN` vs. `NaN` as equal.
+ return (object != +object) ? other != +other : object == +other;
+
+ case regexpTag:
+ case stringTag:
+ // Coerce regexes to strings and treat strings, primitives and objects,
+ // as equal. See http://www.ecma-international.org/ecma-262/6.0/#sec-regexp.prototype.tostring
+ // for more details.
+ return object == (other + '');
+
+ case mapTag:
+ var convert = mapToArray;
+
+ case setTag:
+ var isPartial = bitmask & PARTIAL_COMPARE_FLAG;
+ convert || (convert = setToArray);
+
+ if (object.size != other.size && !isPartial) {
+ return false;
+ }
+ // Assume cyclic values are equal.
+ var stacked = stack.get(object);
+ if (stacked) {
+ return stacked == other;
+ }
+ bitmask |= UNORDERED_COMPARE_FLAG;
+ stack.set(object, other);
+
+ // Recursively compare objects (susceptible to call stack limits).
+ return equalArrays(convert(object), convert(other), equalFunc, customizer, bitmask, stack);
+
+ case symbolTag:
+ if (symbolValueOf) {
+ return symbolValueOf.call(object) == symbolValueOf.call(other);
+ }
+ }
+ return false;
+ }
+
+ /**
+ * A specialized version of `baseIsEqualDeep` for objects with support for
+ * partial deep comparisons.
+ *
+ * @private
+ * @param {Object} object The object to compare.
+ * @param {Object} other The other object to compare.
+ * @param {Function} equalFunc The function to determine equivalents of values.
+ * @param {Function} customizer The function to customize comparisons.
+ * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual`
+ * for more details.
+ * @param {Object} stack Tracks traversed `object` and `other` objects.
+ * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
+ */
+ function equalObjects(object, other, equalFunc, customizer, bitmask, stack) {
+ var isPartial = bitmask & PARTIAL_COMPARE_FLAG,
+ objProps = keys(object),
+ objLength = objProps.length,
+ othProps = keys(other),
+ othLength = othProps.length;
+
+ if (objLength != othLength && !isPartial) {
+ return false;
+ }
+ var index = objLength;
+ while (index--) {
+ var key = objProps[index];
+ if (!(isPartial ? key in other : baseHas(other, key))) {
+ return false;
+ }
+ }
+ // Assume cyclic values are equal.
+ var stacked = stack.get(object);
+ if (stacked) {
+ return stacked == other;
+ }
+ var result = true;
+ stack.set(object, other);
+
+ var skipCtor = isPartial;
+ while (++index < objLength) {
+ key = objProps[index];
+ var objValue = object[key],
+ othValue = other[key];
+
+ if (customizer) {
+ var compared = isPartial
+ ? customizer(othValue, objValue, key, other, object, stack)
+ : customizer(objValue, othValue, key, object, other, stack);
+ }
+ // Recursively compare objects (susceptible to call stack limits).
+ if (!(compared === undefined
+ ? (objValue === othValue || equalFunc(objValue, othValue, customizer, bitmask, stack))
+ : compared
+ )) {
+ result = false;
+ break;
+ }
+ skipCtor || (skipCtor = key == 'constructor');
+ }
+ if (result && !skipCtor) {
+ var objCtor = object.constructor,
+ othCtor = other.constructor;
+
+ // Non `Object` object instances with different constructors are not equal.
+ if (objCtor != othCtor &&
+ ('constructor' in object && 'constructor' in other) &&
+ !(typeof objCtor == 'function' && objCtor instanceof objCtor &&
+ typeof othCtor == 'function' && othCtor instanceof othCtor)) {
+ result = false;
+ }
+ }
+ stack['delete'](object);
+ return result;
+ }
+
+ /**
+ * Creates an array of own enumerable property names and symbols of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property names and symbols.
+ */
+ function getAllKeys(object) {
+ return baseGetAllKeys(object, keys, getSymbols);
+ }
+
+ /**
+ * Creates an array of own and inherited enumerable property names and
+ * symbols of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property names and symbols.
+ */
+ function getAllKeysIn(object) {
+ return baseGetAllKeys(object, keysIn, getSymbolsIn);
+ }
+
+ /**
+ * Gets metadata for `func`.
+ *
+ * @private
+ * @param {Function} func The function to query.
+ * @returns {*} Returns the metadata for `func`.
+ */
+ var getData = !metaMap ? noop : function(func) {
+ return metaMap.get(func);
+ };
+
+ /**
+ * Gets the name of `func`.
+ *
+ * @private
+ * @param {Function} func The function to query.
+ * @returns {string} Returns the function name.
+ */
+ function getFuncName(func) {
+ var result = (func.name + ''),
+ array = realNames[result],
+ length = hasOwnProperty.call(realNames, result) ? array.length : 0;
+
+ while (length--) {
+ var data = array[length],
+ otherFunc = data.func;
+ if (otherFunc == null || otherFunc == func) {
+ return data.name;
+ }
+ }
+ return result;
+ }
+
+ /**
+ * Gets the appropriate "iteratee" function. If `_.iteratee` is customized,
+ * this function returns the custom method, otherwise it returns `baseIteratee`.
+ * If arguments are provided, the chosen function is invoked with them and
+ * its result is returned.
+ *
+ * @private
+ * @param {*} [value] The value to convert to an iteratee.
+ * @param {number} [arity] The arity of the created iteratee.
+ * @returns {Function} Returns the chosen function or its result.
+ */
+ function getIteratee() {
+ var result = lodash.iteratee || iteratee;
+ result = result === iteratee ? baseIteratee : result;
+ return arguments.length ? result(arguments[0], arguments[1]) : result;
+ }
+
+ /**
+ * Gets the "length" property value of `object`.
+ *
+ * **Note:** This function is used to avoid a
+ * [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792) that affects
+ * Safari on at least iOS 8.1-8.3 ARM64.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {*} Returns the "length" value.
+ */
+ var getLength = baseProperty('length');
+
+ /**
+ * Gets the property names, values, and compare flags of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the match data of `object`.
+ */
+ function getMatchData(object) {
+ var result = toPairs(object),
+ length = result.length;
+
+ while (length--) {
+ result[length][2] = isStrictComparable(result[length][1]);
+ }
+ return result;
+ }
+
+ /**
+ * Gets the native function at `key` of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {string} key The key of the method to get.
+ * @returns {*} Returns the function if it's native, else `undefined`.
+ */
+ function getNative(object, key) {
+ var value = object[key];
+ return isNative(value) ? value : undefined;
+ }
+
+ /**
+ * Gets the argument placeholder value for `func`.
+ *
+ * @private
+ * @param {Function} func The function to inspect.
+ * @returns {*} Returns the placeholder value.
+ */
+ function getPlaceholder(func) {
+ var object = hasOwnProperty.call(lodash, 'placeholder') ? lodash : func;
+ return object.placeholder;
+ }
+
+ /**
+ * Gets the `[[Prototype]]` of `value`.
+ *
+ * @private
+ * @param {*} value The value to query.
+ * @returns {null|Object} Returns the `[[Prototype]]`.
+ */
+ function getPrototype(value) {
+ return nativeGetPrototype(Object(value));
+ }
+
+ /**
+ * Creates an array of the own enumerable symbol properties of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of symbols.
+ */
+ function getSymbols(object) {
+ // Coerce `object` to an object to avoid non-object errors in V8.
+ // See https://bugs.chromium.org/p/v8/issues/detail?id=3443 for more details.
+ return getOwnPropertySymbols(Object(object));
+ }
+
+ // Fallback for IE < 11.
+ if (!getOwnPropertySymbols) {
+ getSymbols = function() {
+ return [];
+ };
+ }
+
+ /**
+ * Creates an array of the own and inherited enumerable symbol properties
+ * of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of symbols.
+ */
+ var getSymbolsIn = !getOwnPropertySymbols ? getSymbols : function(object) {
+ var result = [];
+ while (object) {
+ arrayPush(result, getSymbols(object));
+ object = getPrototype(object);
+ }
+ return result;
+ };
+
+ /**
+ * Gets the `toStringTag` of `value`.
+ *
+ * @private
+ * @param {*} value The value to query.
+ * @returns {string} Returns the `toStringTag`.
+ */
+ function getTag(value) {
+ return objectToString.call(value);
+ }
+
+ // Fallback for data views, maps, sets, and weak maps in IE 11,
+ // for data views in Edge, and promises in Node.js.
+ if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||
+ (Map && getTag(new Map) != mapTag) ||
+ (Promise && getTag(Promise.resolve()) != promiseTag) ||
+ (Set && getTag(new Set) != setTag) ||
+ (WeakMap && getTag(new WeakMap) != weakMapTag)) {
+ getTag = function(value) {
+ var result = objectToString.call(value),
+ Ctor = result == objectTag ? value.constructor : undefined,
+ ctorString = Ctor ? toSource(Ctor) : undefined;
+
+ if (ctorString) {
+ switch (ctorString) {
+ case dataViewCtorString: return dataViewTag;
+ case mapCtorString: return mapTag;
+ case promiseCtorString: return promiseTag;
+ case setCtorString: return setTag;
+ case weakMapCtorString: return weakMapTag;
+ }
+ }
+ return result;
+ };
+ }
+
+ /**
+ * Gets the view, applying any `transforms` to the `start` and `end` positions.
+ *
+ * @private
+ * @param {number} start The start of the view.
+ * @param {number} end The end of the view.
+ * @param {Array} transforms The transformations to apply to the view.
+ * @returns {Object} Returns an object containing the `start` and `end`
+ * positions of the view.
+ */
+ function getView(start, end, transforms) {
+ var index = -1,
+ length = transforms.length;
+
+ while (++index < length) {
+ var data = transforms[index],
+ size = data.size;
+
+ switch (data.type) {
+ case 'drop': start += size; break;
+ case 'dropRight': end -= size; break;
+ case 'take': end = nativeMin(end, start + size); break;
+ case 'takeRight': start = nativeMax(start, end - size); break;
+ }
+ }
+ return { 'start': start, 'end': end };
+ }
+
+ /**
+ * Checks if `path` exists on `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {Array|string} path The path to check.
+ * @param {Function} hasFunc The function to check properties.
+ * @returns {boolean} Returns `true` if `path` exists, else `false`.
+ */
+ function hasPath(object, path, hasFunc) {
+ path = isKey(path, object) ? [path] : castPath(path);
+
+ var result,
+ index = -1,
+ length = path.length;
+
+ while (++index < length) {
+ var key = toKey(path[index]);
+ if (!(result = object != null && hasFunc(object, key))) {
+ break;
+ }
+ object = object[key];
+ }
+ if (result) {
+ return result;
+ }
+ var length = object ? object.length : 0;
+ return !!length && isLength(length) && isIndex(key, length) &&
+ (isArray(object) || isString(object) || isArguments(object));
+ }
+
+ /**
+ * Initializes an array clone.
+ *
+ * @private
+ * @param {Array} array The array to clone.
+ * @returns {Array} Returns the initialized clone.
+ */
+ function initCloneArray(array) {
+ var length = array.length,
+ result = array.constructor(length);
+
+ // Add properties assigned by `RegExp#exec`.
+ if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {
+ result.index = array.index;
+ result.input = array.input;
+ }
+ return result;
+ }
+
+ /**
+ * Initializes an object clone.
+ *
+ * @private
+ * @param {Object} object The object to clone.
+ * @returns {Object} Returns the initialized clone.
+ */
+ function initCloneObject(object) {
+ return (typeof object.constructor == 'function' && !isPrototype(object))
+ ? baseCreate(getPrototype(object))
+ : {};
+ }
+
+ /**
+ * Initializes an object clone based on its `toStringTag`.
+ *
+ * **Note:** This function only supports cloning values with tags of
+ * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
+ *
+ * @private
+ * @param {Object} object The object to clone.
+ * @param {string} tag The `toStringTag` of the object to clone.
+ * @param {Function} cloneFunc The function to clone values.
+ * @param {boolean} [isDeep] Specify a deep clone.
+ * @returns {Object} Returns the initialized clone.
+ */
+ function initCloneByTag(object, tag, cloneFunc, isDeep) {
+ var Ctor = object.constructor;
+ switch (tag) {
+ case arrayBufferTag:
+ return cloneArrayBuffer(object);
+
+ case boolTag:
+ case dateTag:
+ return new Ctor(+object);
+
+ case dataViewTag:
+ return cloneDataView(object, isDeep);
+
+ case float32Tag: case float64Tag:
+ case int8Tag: case int16Tag: case int32Tag:
+ case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:
+ return cloneTypedArray(object, isDeep);
+
+ case mapTag:
+ return cloneMap(object, isDeep, cloneFunc);
+
+ case numberTag:
+ case stringTag:
+ return new Ctor(object);
+
+ case regexpTag:
+ return cloneRegExp(object);
+
+ case setTag:
+ return cloneSet(object, isDeep, cloneFunc);
+
+ case symbolTag:
+ return cloneSymbol(object);
+ }
+ }
+
+ /**
+ * Creates an array of index keys for `object` values of arrays,
+ * `arguments` objects, and strings, otherwise `null` is returned.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array|null} Returns index keys, else `null`.
+ */
+ function indexKeys(object) {
+ var length = object ? object.length : undefined;
+ if (isLength(length) &&
+ (isArray(object) || isString(object) || isArguments(object))) {
+ return baseTimes(length, String);
+ }
+ return null;
+ }
+
+ /**
+ * Checks if `value` is a flattenable `arguments` object or array.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.
+ */
+ function isFlattenable(value) {
+ return isArrayLikeObject(value) && (isArray(value) || isArguments(value));
+ }
+
+ /**
+ * Checks if `value` is a flattenable array and not a `_.matchesProperty`
+ * iteratee shorthand.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.
+ */
+ function isFlattenableIteratee(value) {
+ return isArray(value) && !(value.length == 2 && !isFunction(value[0]));
+ }
+
+ /**
+ * Checks if `value` is a valid array-like index.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
+ * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
+ */
+ function isIndex(value, length) {
+ length = length == null ? MAX_SAFE_INTEGER : length;
+ return !!length &&
+ (typeof value == 'number' || reIsUint.test(value)) &&
+ (value > -1 && value % 1 == 0 && value < length);
+ }
+
+ /**
+ * Checks if the given arguments are from an iteratee call.
+ *
+ * @private
+ * @param {*} value The potential iteratee value argument.
+ * @param {*} index The potential iteratee index or key argument.
+ * @param {*} object The potential iteratee object argument.
+ * @returns {boolean} Returns `true` if the arguments are from an iteratee call,
+ * else `false`.
+ */
+ function isIterateeCall(value, index, object) {
+ if (!isObject(object)) {
+ return false;
+ }
+ var type = typeof index;
+ if (type == 'number'
+ ? (isArrayLike(object) && isIndex(index, object.length))
+ : (type == 'string' && index in object)
+ ) {
+ return eq(object[index], value);
+ }
+ return false;
+ }
+
+ /**
+ * Checks if `value` is a property name and not a property path.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @param {Object} [object] The object to query keys on.
+ * @returns {boolean} Returns `true` if `value` is a property name, else `false`.
+ */
+ function isKey(value, object) {
+ if (isArray(value)) {
+ return false;
+ }
+ var type = typeof value;
+ if (type == 'number' || type == 'symbol' || type == 'boolean' ||
+ value == null || isSymbol(value)) {
+ return true;
+ }
+ return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||
+ (object != null && value in Object(object));
+ }
+
+ /**
+ * Checks if `value` is suitable for use as unique object key.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
+ */
+ function isKeyable(value) {
+ var type = typeof value;
+ return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
+ ? (value !== '__proto__')
+ : (value === null);
+ }
+
+ /**
+ * Checks if `func` has a lazy counterpart.
+ *
+ * @private
+ * @param {Function} func The function to check.
+ * @returns {boolean} Returns `true` if `func` has a lazy counterpart,
+ * else `false`.
+ */
+ function isLaziable(func) {
+ var funcName = getFuncName(func),
+ other = lodash[funcName];
+
+ if (typeof other != 'function' || !(funcName in LazyWrapper.prototype)) {
+ return false;
+ }
+ if (func === other) {
+ return true;
+ }
+ var data = getData(other);
+ return !!data && func === data[0];
+ }
+
+ /**
+ * Checks if `value` is likely a prototype object.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
+ */
+ function isPrototype(value) {
+ var Ctor = value && value.constructor,
+ proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;
+
+ return value === proto;
+ }
+
+ /**
+ * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` if suitable for strict
+ * equality comparisons, else `false`.
+ */
+ function isStrictComparable(value) {
+ return value === value && !isObject(value);
+ }
+
+ /**
+ * A specialized version of `matchesProperty` for source values suitable
+ * for strict equality comparisons, i.e. `===`.
+ *
+ * @private
+ * @param {string} key The key of the property to get.
+ * @param {*} srcValue The value to match.
+ * @returns {Function} Returns the new function.
+ */
+ function matchesStrictComparable(key, srcValue) {
+ return function(object) {
+ if (object == null) {
+ return false;
+ }
+ return object[key] === srcValue &&
+ (srcValue !== undefined || (key in Object(object)));
+ };
+ }
+
+ /**
+ * Merges the function metadata of `source` into `data`.
+ *
+ * Merging metadata reduces the number of wrappers used to invoke a function.
+ * This is possible because methods like `_.bind`, `_.curry`, and `_.partial`
+ * may be applied regardless of execution order. Methods like `_.ary` and
+ * `_.rearg` modify function arguments, making the order in which they are
+ * executed important, preventing the merging of metadata. However, we make
+ * an exception for a safe combined case where curried functions have `_.ary`
+ * and or `_.rearg` applied.
+ *
+ * @private
+ * @param {Array} data The destination metadata.
+ * @param {Array} source The source metadata.
+ * @returns {Array} Returns `data`.
+ */
+ function mergeData(data, source) {
+ var bitmask = data[1],
+ srcBitmask = source[1],
+ newBitmask = bitmask | srcBitmask,
+ isCommon = newBitmask < (BIND_FLAG | BIND_KEY_FLAG | ARY_FLAG);
+
+ var isCombo =
+ ((srcBitmask == ARY_FLAG) && (bitmask == CURRY_FLAG)) ||
+ ((srcBitmask == ARY_FLAG) && (bitmask == REARG_FLAG) && (data[7].length <= source[8])) ||
+ ((srcBitmask == (ARY_FLAG | REARG_FLAG)) && (source[7].length <= source[8]) && (bitmask == CURRY_FLAG));
+
+ // Exit early if metadata can't be merged.
+ if (!(isCommon || isCombo)) {
+ return data;
+ }
+ // Use source `thisArg` if available.
+ if (srcBitmask & BIND_FLAG) {
+ data[2] = source[2];
+ // Set when currying a bound function.
+ newBitmask |= bitmask & BIND_FLAG ? 0 : CURRY_BOUND_FLAG;
+ }
+ // Compose partial arguments.
+ var value = source[3];
+ if (value) {
+ var partials = data[3];
+ data[3] = partials ? composeArgs(partials, value, source[4]) : value;
+ data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : source[4];
+ }
+ // Compose partial right arguments.
+ value = source[5];
+ if (value) {
+ partials = data[5];
+ data[5] = partials ? composeArgsRight(partials, value, source[6]) : value;
+ data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source[6];
+ }
+ // Use source `argPos` if available.
+ value = source[7];
+ if (value) {
+ data[7] = value;
+ }
+ // Use source `ary` if it's smaller.
+ if (srcBitmask & ARY_FLAG) {
+ data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]);
+ }
+ // Use source `arity` if one is not provided.
+ if (data[9] == null) {
+ data[9] = source[9];
+ }
+ // Use source `func` and merge bitmasks.
+ data[0] = source[0];
+ data[1] = newBitmask;
+
+ return data;
+ }
+
+ /**
+ * Used by `_.defaultsDeep` to customize its `_.merge` use.
+ *
+ * @private
+ * @param {*} objValue The destination value.
+ * @param {*} srcValue The source value.
+ * @param {string} key The key of the property to merge.
+ * @param {Object} object The parent object of `objValue`.
+ * @param {Object} source The parent object of `srcValue`.
+ * @param {Object} [stack] Tracks traversed source values and their merged
+ * counterparts.
+ * @returns {*} Returns the value to assign.
+ */
+ function mergeDefaults(objValue, srcValue, key, object, source, stack) {
+ if (isObject(objValue) && isObject(srcValue)) {
+ baseMerge(objValue, srcValue, undefined, mergeDefaults, stack.set(srcValue, objValue));
+ }
+ return objValue;
+ }
+
+ /**
+ * Gets the parent value at `path` of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {Array} path The path to get the parent value of.
+ * @returns {*} Returns the parent value.
+ */
+ function parent(object, path) {
+ return path.length == 1 ? object : baseGet(object, baseSlice(path, 0, -1));
+ }
+
+ /**
+ * Reorder `array` according to the specified indexes where the element at
+ * the first index is assigned as the first element, the element at
+ * the second index is assigned as the second element, and so on.
+ *
+ * @private
+ * @param {Array} array The array to reorder.
+ * @param {Array} indexes The arranged array indexes.
+ * @returns {Array} Returns `array`.
+ */
+ function reorder(array, indexes) {
+ var arrLength = array.length,
+ length = nativeMin(indexes.length, arrLength),
+ oldArray = copyArray(array);
+
+ while (length--) {
+ var index = indexes[length];
+ array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined;
+ }
+ return array;
+ }
+
+ /**
+ * Sets metadata for `func`.
+ *
+ * **Note:** If this function becomes hot, i.e. is invoked a lot in a short
+ * period of time, it will trip its breaker and transition to an identity
+ * function to avoid garbage collection pauses in V8. See
+ * [V8 issue 2070](https://bugs.chromium.org/p/v8/issues/detail?id=2070)
+ * for more details.
+ *
+ * @private
+ * @param {Function} func The function to associate metadata with.
+ * @param {*} data The metadata.
+ * @returns {Function} Returns `func`.
+ */
+ var setData = (function() {
+ var count = 0,
+ lastCalled = 0;
+
+ return function(key, value) {
+ var stamp = now(),
+ remaining = HOT_SPAN - (stamp - lastCalled);
+
+ lastCalled = stamp;
+ if (remaining > 0) {
+ if (++count >= HOT_COUNT) {
+ return key;
+ }
+ } else {
+ count = 0;
+ }
+ return baseSetData(key, value);
+ };
+ }());
+
+ /**
+ * Converts `string` to a property path array.
+ *
+ * @private
+ * @param {string} string The string to convert.
+ * @returns {Array} Returns the property path array.
+ */
+ var stringToPath = memoize(function(string) {
+ var result = [];
+ toString(string).replace(rePropName, function(match, number, quote, string) {
+ result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match));
+ });
+ return result;
+ });
+
+ /**
+ * Converts `value` to a string key if it's not a string or symbol.
+ *
+ * @private
+ * @param {*} value The value to inspect.
+ * @returns {string|symbol} Returns the key.
+ */
+ function toKey(value) {
+ if (typeof value == 'string' || isSymbol(value)) {
+ return value;
+ }
+ var result = (value + '');
+ return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
+ }
+
+ /**
+ * Converts `func` to its source code.
+ *
+ * @private
+ * @param {Function} func The function to process.
+ * @returns {string} Returns the source code.
+ */
+ function toSource(func) {
+ if (func != null) {
+ try {
+ return funcToString.call(func);
+ } catch (e) {}
+ try {
+ return (func + '');
+ } catch (e) {}
+ }
+ return '';
+ }
+
+ /**
+ * Creates a clone of `wrapper`.
+ *
+ * @private
+ * @param {Object} wrapper The wrapper to clone.
+ * @returns {Object} Returns the cloned wrapper.
+ */
+ function wrapperClone(wrapper) {
+ if (wrapper instanceof LazyWrapper) {
+ return wrapper.clone();
+ }
+ var result = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__);
+ result.__actions__ = copyArray(wrapper.__actions__);
+ result.__index__ = wrapper.__index__;
+ result.__values__ = wrapper.__values__;
+ return result;
+ }
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Creates an array of elements split into groups the length of `size`.
+ * If `array` can't be split evenly, the final chunk will be the remaining
+ * elements.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Array
+ * @param {Array} array The array to process.
+ * @param {number} [size=1] The length of each chunk
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {Array} Returns the new array containing chunks.
+ * @example
+ *
+ * _.chunk(['a', 'b', 'c', 'd'], 2);
+ * // => [['a', 'b'], ['c', 'd']]
+ *
+ * _.chunk(['a', 'b', 'c', 'd'], 3);
+ * // => [['a', 'b', 'c'], ['d']]
+ */
+ function chunk(array, size, guard) {
+ if ((guard ? isIterateeCall(array, size, guard) : size === undefined)) {
+ size = 1;
+ } else {
+ size = nativeMax(toInteger(size), 0);
+ }
+ var length = array ? array.length : 0;
+ if (!length || size < 1) {
+ return [];
+ }
+ var index = 0,
+ resIndex = 0,
+ result = Array(nativeCeil(length / size));
+
+ while (index < length) {
+ result[resIndex++] = baseSlice(array, index, (index += size));
+ }
+ return result;
+ }
+
+ /**
+ * Creates an array with all falsey values removed. The values `false`, `null`,
+ * `0`, `""`, `undefined`, and `NaN` are falsey.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {Array} array The array to compact.
+ * @returns {Array} Returns the new array of filtered values.
+ * @example
+ *
+ * _.compact([0, 1, false, 2, '', 3]);
+ * // => [1, 2, 3]
+ */
+ function compact(array) {
+ var index = -1,
+ length = array ? array.length : 0,
+ resIndex = 0,
+ result = [];
+
+ while (++index < length) {
+ var value = array[index];
+ if (value) {
+ result[resIndex++] = value;
+ }
+ }
+ return result;
+ }
+
+ /**
+ * Creates a new array concatenating `array` with any additional arrays
+ * and/or values.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to concatenate.
+ * @param {...*} [values] The values to concatenate.
+ * @returns {Array} Returns the new concatenated array.
+ * @example
+ *
+ * var array = [1];
+ * var other = _.concat(array, 2, [3], [[4]]);
+ *
+ * console.log(other);
+ * // => [1, 2, 3, [4]]
+ *
+ * console.log(array);
+ * // => [1]
+ */
+ function concat() {
+ var length = arguments.length,
+ array = castArray(arguments[0]);
+
+ if (length < 2) {
+ return length ? copyArray(array) : [];
+ }
+ var args = Array(length - 1);
+ while (length--) {
+ args[length - 1] = arguments[length];
+ }
+ return arrayConcat(array, baseFlatten(args, 1));
+ }
+
+ /**
+ * Creates an array of unique `array` values not included in the other given
+ * arrays using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
+ * for equality comparisons. The order of result values is determined by the
+ * order they occur in the first array.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @param {...Array} [values] The values to exclude.
+ * @returns {Array} Returns the new array of filtered values.
+ * @see _.without, _.xor
+ * @example
+ *
+ * _.difference([3, 2, 1], [4, 2]);
+ * // => [3, 1]
+ */
+ var difference = rest(function(array, values) {
+ return isArrayLikeObject(array)
+ ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true))
+ : [];
+ });
+
+ /**
+ * This method is like `_.difference` except that it accepts `iteratee` which
+ * is invoked for each element of `array` and `values` to generate the criterion
+ * by which they're compared. Result values are chosen from the first array.
+ * The iteratee is invoked with one argument: (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @param {...Array} [values] The values to exclude.
+ * @param {Array|Function|Object|string} [iteratee=_.identity]
+ * The iteratee invoked per element.
+ * @returns {Array} Returns the new array of filtered values.
+ * @example
+ *
+ * _.differenceBy([3.1, 2.2, 1.3], [4.4, 2.5], Math.floor);
+ * // => [3.1, 1.3]
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.differenceBy([{ 'x': 2 }, { 'x': 1 }], [{ 'x': 1 }], 'x');
+ * // => [{ 'x': 2 }]
+ */
+ var differenceBy = rest(function(array, values) {
+ var iteratee = last(values);
+ if (isArrayLikeObject(iteratee)) {
+ iteratee = undefined;
+ }
+ return isArrayLikeObject(array)
+ ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), getIteratee(iteratee))
+ : [];
+ });
+
+ /**
+ * This method is like `_.difference` except that it accepts `comparator`
+ * which is invoked to compare elements of `array` to `values`. Result values
+ * are chosen from the first array. The comparator is invoked with two arguments:
+ * (arrVal, othVal).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @param {...Array} [values] The values to exclude.
+ * @param {Function} [comparator] The comparator invoked per element.
+ * @returns {Array} Returns the new array of filtered values.
+ * @example
+ *
+ * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
+ *
+ * _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], _.isEqual);
+ * // => [{ 'x': 2, 'y': 1 }]
+ */
+ var differenceWith = rest(function(array, values) {
+ var comparator = last(values);
+ if (isArrayLikeObject(comparator)) {
+ comparator = undefined;
+ }
+ return isArrayLikeObject(array)
+ ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), undefined, comparator)
+ : [];
+ });
+
+ /**
+ * Creates a slice of `array` with `n` elements dropped from the beginning.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.5.0
+ * @category Array
+ * @param {Array} array The array to query.
+ * @param {number} [n=1] The number of elements to drop.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {Array} Returns the slice of `array`.
+ * @example
+ *
+ * _.drop([1, 2, 3]);
+ * // => [2, 3]
+ *
+ * _.drop([1, 2, 3], 2);
+ * // => [3]
+ *
+ * _.drop([1, 2, 3], 5);
+ * // => []
+ *
+ * _.drop([1, 2, 3], 0);
+ * // => [1, 2, 3]
+ */
+ function drop(array, n, guard) {
+ var length = array ? array.length : 0;
+ if (!length) {
+ return [];
+ }
+ n = (guard || n === undefined) ? 1 : toInteger(n);
+ return baseSlice(array, n < 0 ? 0 : n, length);
+ }
+
+ /**
+ * Creates a slice of `array` with `n` elements dropped from the end.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Array
+ * @param {Array} array The array to query.
+ * @param {number} [n=1] The number of elements to drop.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {Array} Returns the slice of `array`.
+ * @example
+ *
+ * _.dropRight([1, 2, 3]);
+ * // => [1, 2]
+ *
+ * _.dropRight([1, 2, 3], 2);
+ * // => [1]
+ *
+ * _.dropRight([1, 2, 3], 5);
+ * // => []
+ *
+ * _.dropRight([1, 2, 3], 0);
+ * // => [1, 2, 3]
+ */
+ function dropRight(array, n, guard) {
+ var length = array ? array.length : 0;
+ if (!length) {
+ return [];
+ }
+ n = (guard || n === undefined) ? 1 : toInteger(n);
+ n = length - n;
+ return baseSlice(array, 0, n < 0 ? 0 : n);
+ }
+
+ /**
+ * Creates a slice of `array` excluding elements dropped from the end.
+ * Elements are dropped until `predicate` returns falsey. The predicate is
+ * invoked with three arguments: (value, index, array).
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Array
+ * @param {Array} array The array to query.
+ * @param {Array|Function|Object|string} [predicate=_.identity]
+ * The function invoked per iteration.
+ * @returns {Array} Returns the slice of `array`.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'active': true },
+ * { 'user': 'fred', 'active': false },
+ * { 'user': 'pebbles', 'active': false }
+ * ];
+ *
+ * _.dropRightWhile(users, function(o) { return !o.active; });
+ * // => objects for ['barney']
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.dropRightWhile(users, { 'user': 'pebbles', 'active': false });
+ * // => objects for ['barney', 'fred']
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.dropRightWhile(users, ['active', false]);
+ * // => objects for ['barney']
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.dropRightWhile(users, 'active');
+ * // => objects for ['barney', 'fred', 'pebbles']
+ */
+ function dropRightWhile(array, predicate) {
+ return (array && array.length)
+ ? baseWhile(array, getIteratee(predicate, 3), true, true)
+ : [];
+ }
+
+ /**
+ * Creates a slice of `array` excluding elements dropped from the beginning.
+ * Elements are dropped until `predicate` returns falsey. The predicate is
+ * invoked with three arguments: (value, index, array).
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Array
+ * @param {Array} array The array to query.
+ * @param {Array|Function|Object|string} [predicate=_.identity]
+ * The function invoked per iteration.
+ * @returns {Array} Returns the slice of `array`.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'active': false },
+ * { 'user': 'fred', 'active': false },
+ * { 'user': 'pebbles', 'active': true }
+ * ];
+ *
+ * _.dropWhile(users, function(o) { return !o.active; });
+ * // => objects for ['pebbles']
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.dropWhile(users, { 'user': 'barney', 'active': false });
+ * // => objects for ['fred', 'pebbles']
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.dropWhile(users, ['active', false]);
+ * // => objects for ['pebbles']
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.dropWhile(users, 'active');
+ * // => objects for ['barney', 'fred', 'pebbles']
+ */
+ function dropWhile(array, predicate) {
+ return (array && array.length)
+ ? baseWhile(array, getIteratee(predicate, 3), true)
+ : [];
+ }
+
+ /**
+ * Fills elements of `array` with `value` from `start` up to, but not
+ * including, `end`.
+ *
+ * **Note:** This method mutates `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.2.0
+ * @category Array
+ * @param {Array} array The array to fill.
+ * @param {*} value The value to fill `array` with.
+ * @param {number} [start=0] The start position.
+ * @param {number} [end=array.length] The end position.
+ * @returns {Array} Returns `array`.
+ * @example
+ *
+ * var array = [1, 2, 3];
+ *
+ * _.fill(array, 'a');
+ * console.log(array);
+ * // => ['a', 'a', 'a']
+ *
+ * _.fill(Array(3), 2);
+ * // => [2, 2, 2]
+ *
+ * _.fill([4, 6, 8, 10], '*', 1, 3);
+ * // => [4, '*', '*', 10]
+ */
+ function fill(array, value, start, end) {
+ var length = array ? array.length : 0;
+ if (!length) {
+ return [];
+ }
+ if (start && typeof start != 'number' && isIterateeCall(array, value, start)) {
+ start = 0;
+ end = length;
+ }
+ return baseFill(array, value, start, end);
+ }
+
+ /**
+ * This method is like `_.find` except that it returns the index of the first
+ * element `predicate` returns truthy for instead of the element itself.
+ *
+ * @static
+ * @memberOf _
+ * @since 1.1.0
+ * @category Array
+ * @param {Array} array The array to search.
+ * @param {Array|Function|Object|string} [predicate=_.identity]
+ * The function invoked per iteration.
+ * @returns {number} Returns the index of the found element, else `-1`.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'active': false },
+ * { 'user': 'fred', 'active': false },
+ * { 'user': 'pebbles', 'active': true }
+ * ];
+ *
+ * _.findIndex(users, function(o) { return o.user == 'barney'; });
+ * // => 0
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.findIndex(users, { 'user': 'fred', 'active': false });
+ * // => 1
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.findIndex(users, ['active', false]);
+ * // => 0
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.findIndex(users, 'active');
+ * // => 2
+ */
+ function findIndex(array, predicate) {
+ return (array && array.length)
+ ? baseFindIndex(array, getIteratee(predicate, 3))
+ : -1;
+ }
+
+ /**
+ * This method is like `_.findIndex` except that it iterates over elements
+ * of `collection` from right to left.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.0.0
+ * @category Array
+ * @param {Array} array The array to search.
+ * @param {Array|Function|Object|string} [predicate=_.identity]
+ * The function invoked per iteration.
+ * @returns {number} Returns the index of the found element, else `-1`.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'active': true },
+ * { 'user': 'fred', 'active': false },
+ * { 'user': 'pebbles', 'active': false }
+ * ];
+ *
+ * _.findLastIndex(users, function(o) { return o.user == 'pebbles'; });
+ * // => 2
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.findLastIndex(users, { 'user': 'barney', 'active': true });
+ * // => 0
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.findLastIndex(users, ['active', false]);
+ * // => 2
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.findLastIndex(users, 'active');
+ * // => 0
+ */
+ function findLastIndex(array, predicate) {
+ return (array && array.length)
+ ? baseFindIndex(array, getIteratee(predicate, 3), true)
+ : -1;
+ }
+
+ /**
+ * Flattens `array` a single level deep.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {Array} array The array to flatten.
+ * @returns {Array} Returns the new flattened array.
+ * @example
+ *
+ * _.flatten([1, [2, [3, [4]], 5]]);
+ * // => [1, 2, [3, [4]], 5]
+ */
+ function flatten(array) {
+ var length = array ? array.length : 0;
+ return length ? baseFlatten(array, 1) : [];
+ }
+
+ /**
+ * Recursively flattens `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Array
+ * @param {Array} array The array to flatten.
+ * @returns {Array} Returns the new flattened array.
+ * @example
+ *
+ * _.flattenDeep([1, [2, [3, [4]], 5]]);
+ * // => [1, 2, 3, 4, 5]
+ */
+ function flattenDeep(array) {
+ var length = array ? array.length : 0;
+ return length ? baseFlatten(array, INFINITY) : [];
+ }
+
+ /**
+ * Recursively flatten `array` up to `depth` times.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.4.0
+ * @category Array
+ * @param {Array} array The array to flatten.
+ * @param {number} [depth=1] The maximum recursion depth.
+ * @returns {Array} Returns the new flattened array.
+ * @example
+ *
+ * var array = [1, [2, [3, [4]], 5]];
+ *
+ * _.flattenDepth(array, 1);
+ * // => [1, 2, [3, [4]], 5]
+ *
+ * _.flattenDepth(array, 2);
+ * // => [1, 2, 3, [4], 5]
+ */
+ function flattenDepth(array, depth) {
+ var length = array ? array.length : 0;
+ if (!length) {
+ return [];
+ }
+ depth = depth === undefined ? 1 : toInteger(depth);
+ return baseFlatten(array, depth);
+ }
+
+ /**
+ * The inverse of `_.toPairs`; this method returns an object composed
+ * from key-value `pairs`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} pairs The key-value pairs.
+ * @returns {Object} Returns the new object.
+ * @example
+ *
+ * _.fromPairs([['fred', 30], ['barney', 40]]);
+ * // => { 'fred': 30, 'barney': 40 }
+ */
+ function fromPairs(pairs) {
+ var index = -1,
+ length = pairs ? pairs.length : 0,
+ result = {};
+
+ while (++index < length) {
+ var pair = pairs[index];
+ result[pair[0]] = pair[1];
+ }
+ return result;
+ }
+
+ /**
+ * Gets the first element of `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @alias first
+ * @category Array
+ * @param {Array} array The array to query.
+ * @returns {*} Returns the first element of `array`.
+ * @example
+ *
+ * _.head([1, 2, 3]);
+ * // => 1
+ *
+ * _.head([]);
+ * // => undefined
+ */
+ function head(array) {
+ return (array && array.length) ? array[0] : undefined;
+ }
+
+ /**
+ * Gets the index at which the first occurrence of `value` is found in `array`
+ * using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
+ * for equality comparisons. If `fromIndex` is negative, it's used as the
+ * offset from the end of `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {Array} array The array to search.
+ * @param {*} value The value to search for.
+ * @param {number} [fromIndex=0] The index to search from.
+ * @returns {number} Returns the index of the matched value, else `-1`.
+ * @example
+ *
+ * _.indexOf([1, 2, 1, 2], 2);
+ * // => 1
+ *
+ * // Search from the `fromIndex`.
+ * _.indexOf([1, 2, 1, 2], 2, 2);
+ * // => 3
+ */
+ function indexOf(array, value, fromIndex) {
+ var length = array ? array.length : 0;
+ if (!length) {
+ return -1;
+ }
+ fromIndex = toInteger(fromIndex);
+ if (fromIndex < 0) {
+ fromIndex = nativeMax(length + fromIndex, 0);
+ }
+ return baseIndexOf(array, value, fromIndex);
+ }
+
+ /**
+ * Gets all but the last element of `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {Array} array The array to query.
+ * @returns {Array} Returns the slice of `array`.
+ * @example
+ *
+ * _.initial([1, 2, 3]);
+ * // => [1, 2]
+ */
+ function initial(array) {
+ return dropRight(array, 1);
+ }
+
+ /**
+ * Creates an array of unique values that are included in all given arrays
+ * using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
+ * for equality comparisons. The order of result values is determined by the
+ * order they occur in the first array.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {...Array} [arrays] The arrays to inspect.
+ * @returns {Array} Returns the new array of intersecting values.
+ * @example
+ *
+ * _.intersection([2, 1], [4, 2], [1, 2]);
+ * // => [2]
+ */
+ var intersection = rest(function(arrays) {
+ var mapped = arrayMap(arrays, castArrayLikeObject);
+ return (mapped.length && mapped[0] === arrays[0])
+ ? baseIntersection(mapped)
+ : [];
+ });
+
+ /**
+ * This method is like `_.intersection` except that it accepts `iteratee`
+ * which is invoked for each element of each `arrays` to generate the criterion
+ * by which they're compared. Result values are chosen from the first array.
+ * The iteratee is invoked with one argument: (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {...Array} [arrays] The arrays to inspect.
+ * @param {Array|Function|Object|string} [iteratee=_.identity]
+ * The iteratee invoked per element.
+ * @returns {Array} Returns the new array of intersecting values.
+ * @example
+ *
+ * _.intersectionBy([2.1, 1.2], [4.3, 2.4], Math.floor);
+ * // => [2.1]
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
+ * // => [{ 'x': 1 }]
+ */
+ var intersectionBy = rest(function(arrays) {
+ var iteratee = last(arrays),
+ mapped = arrayMap(arrays, castArrayLikeObject);
+
+ if (iteratee === last(mapped)) {
+ iteratee = undefined;
+ } else {
+ mapped.pop();
+ }
+ return (mapped.length && mapped[0] === arrays[0])
+ ? baseIntersection(mapped, getIteratee(iteratee))
+ : [];
+ });
+
+ /**
+ * This method is like `_.intersection` except that it accepts `comparator`
+ * which is invoked to compare elements of `arrays`. Result values are chosen
+ * from the first array. The comparator is invoked with two arguments:
+ * (arrVal, othVal).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {...Array} [arrays] The arrays to inspect.
+ * @param {Function} [comparator] The comparator invoked per element.
+ * @returns {Array} Returns the new array of intersecting values.
+ * @example
+ *
+ * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
+ * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];
+ *
+ * _.intersectionWith(objects, others, _.isEqual);
+ * // => [{ 'x': 1, 'y': 2 }]
+ */
+ var intersectionWith = rest(function(arrays) {
+ var comparator = last(arrays),
+ mapped = arrayMap(arrays, castArrayLikeObject);
+
+ if (comparator === last(mapped)) {
+ comparator = undefined;
+ } else {
+ mapped.pop();
+ }
+ return (mapped.length && mapped[0] === arrays[0])
+ ? baseIntersection(mapped, undefined, comparator)
+ : [];
+ });
+
+ /**
+ * Converts all elements in `array` into a string separated by `separator`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to convert.
+ * @param {string} [separator=','] The element separator.
+ * @returns {string} Returns the joined string.
+ * @example
+ *
+ * _.join(['a', 'b', 'c'], '~');
+ * // => 'a~b~c'
+ */
+ function join(array, separator) {
+ return array ? nativeJoin.call(array, separator) : '';
+ }
+
+ /**
+ * Gets the last element of `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {Array} array The array to query.
+ * @returns {*} Returns the last element of `array`.
+ * @example
+ *
+ * _.last([1, 2, 3]);
+ * // => 3
+ */
+ function last(array) {
+ var length = array ? array.length : 0;
+ return length ? array[length - 1] : undefined;
+ }
+
+ /**
+ * This method is like `_.indexOf` except that it iterates over elements of
+ * `array` from right to left.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {Array} array The array to search.
+ * @param {*} value The value to search for.
+ * @param {number} [fromIndex=array.length-1] The index to search from.
+ * @returns {number} Returns the index of the matched value, else `-1`.
+ * @example
+ *
+ * _.lastIndexOf([1, 2, 1, 2], 2);
+ * // => 3
+ *
+ * // Search from the `fromIndex`.
+ * _.lastIndexOf([1, 2, 1, 2], 2, 2);
+ * // => 1
+ */
+ function lastIndexOf(array, value, fromIndex) {
+ var length = array ? array.length : 0;
+ if (!length) {
+ return -1;
+ }
+ var index = length;
+ if (fromIndex !== undefined) {
+ index = toInteger(fromIndex);
+ index = (
+ index < 0
+ ? nativeMax(length + index, 0)
+ : nativeMin(index, length - 1)
+ ) + 1;
+ }
+ if (value !== value) {
+ return indexOfNaN(array, index, true);
+ }
+ while (index--) {
+ if (array[index] === value) {
+ return index;
+ }
+ }
+ return -1;
+ }
+
+ /**
+ * Gets the nth element of `array`. If `n` is negative, the nth element
+ * from the end is returned.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.11.0
+ * @category Array
+ * @param {Array} array The array to query.
+ * @param {number} [n=0] The index of the element to return.
+ * @returns {*} Returns the nth element of `array`.
+ * @example
+ *
+ * var array = ['a', 'b', 'c', 'd'];
+ *
+ * _.nth(array, 1);
+ * // => 'b'
+ *
+ * _.nth(array, -2);
+ * // => 'c';
+ */
+ function nth(array, n) {
+ return (array && array.length) ? baseNth(array, toInteger(n)) : undefined;
+ }
+
+ /**
+ * Removes all given values from `array` using
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
+ * for equality comparisons.
+ *
+ * **Note:** Unlike `_.without`, this method mutates `array`. Use `_.remove`
+ * to remove elements from an array by predicate.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.0.0
+ * @category Array
+ * @param {Array} array The array to modify.
+ * @param {...*} [values] The values to remove.
+ * @returns {Array} Returns `array`.
+ * @example
+ *
+ * var array = [1, 2, 3, 1, 2, 3];
+ *
+ * _.pull(array, 2, 3);
+ * console.log(array);
+ * // => [1, 1]
+ */
+ var pull = rest(pullAll);
+
+ /**
+ * This method is like `_.pull` except that it accepts an array of values to remove.
+ *
+ * **Note:** Unlike `_.difference`, this method mutates `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to modify.
+ * @param {Array} values The values to remove.
+ * @returns {Array} Returns `array`.
+ * @example
+ *
+ * var array = [1, 2, 3, 1, 2, 3];
+ *
+ * _.pullAll(array, [2, 3]);
+ * console.log(array);
+ * // => [1, 1]
+ */
+ function pullAll(array, values) {
+ return (array && array.length && values && values.length)
+ ? basePullAll(array, values)
+ : array;
+ }
+
+ /**
+ * This method is like `_.pullAll` except that it accepts `iteratee` which is
+ * invoked for each element of `array` and `values` to generate the criterion
+ * by which they're compared. The iteratee is invoked with one argument: (value).
+ *
+ * **Note:** Unlike `_.differenceBy`, this method mutates `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to modify.
+ * @param {Array} values The values to remove.
+ * @param {Array|Function|Object|string} [iteratee=_.identity]
+ * The iteratee invoked per element.
+ * @returns {Array} Returns `array`.
+ * @example
+ *
+ * var array = [{ 'x': 1 }, { 'x': 2 }, { 'x': 3 }, { 'x': 1 }];
+ *
+ * _.pullAllBy(array, [{ 'x': 1 }, { 'x': 3 }], 'x');
+ * console.log(array);
+ * // => [{ 'x': 2 }]
+ */
+ function pullAllBy(array, values, iteratee) {
+ return (array && array.length && values && values.length)
+ ? basePullAll(array, values, getIteratee(iteratee))
+ : array;
+ }
+
+ /**
+ * This method is like `_.pullAll` except that it accepts `comparator` which
+ * is invoked to compare elements of `array` to `values`. The comparator is
+ * invoked with two arguments: (arrVal, othVal).
+ *
+ * **Note:** Unlike `_.differenceWith`, this method mutates `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.6.0
+ * @category Array
+ * @param {Array} array The array to modify.
+ * @param {Array} values The values to remove.
+ * @param {Function} [comparator] The comparator invoked per element.
+ * @returns {Array} Returns `array`.
+ * @example
+ *
+ * var array = [{ 'x': 1, 'y': 2 }, { 'x': 3, 'y': 4 }, { 'x': 5, 'y': 6 }];
+ *
+ * _.pullAllWith(array, [{ 'x': 3, 'y': 4 }], _.isEqual);
+ * console.log(array);
+ * // => [{ 'x': 1, 'y': 2 }, { 'x': 5, 'y': 6 }]
+ */
+ function pullAllWith(array, values, comparator) {
+ return (array && array.length && values && values.length)
+ ? basePullAll(array, values, undefined, comparator)
+ : array;
+ }
+
+ /**
+ * Removes elements from `array` corresponding to `indexes` and returns an
+ * array of removed elements.
+ *
+ * **Note:** Unlike `_.at`, this method mutates `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Array
+ * @param {Array} array The array to modify.
+ * @param {...(number|number[])} [indexes] The indexes of elements to remove.
+ * @returns {Array} Returns the new array of removed elements.
+ * @example
+ *
+ * var array = [5, 10, 15, 20];
+ * var evens = _.pullAt(array, 1, 3);
+ *
+ * console.log(array);
+ * // => [5, 15]
+ *
+ * console.log(evens);
+ * // => [10, 20]
+ */
+ var pullAt = rest(function(array, indexes) {
+ indexes = baseFlatten(indexes, 1);
+
+ var length = array ? array.length : 0,
+ result = baseAt(array, indexes);
+
+ basePullAt(array, arrayMap(indexes, function(index) {
+ return isIndex(index, length) ? +index : index;
+ }).sort(compareAscending));
+
+ return result;
+ });
+
+ /**
+ * Removes all elements from `array` that `predicate` returns truthy for
+ * and returns an array of the removed elements. The predicate is invoked
+ * with three arguments: (value, index, array).
+ *
+ * **Note:** Unlike `_.filter`, this method mutates `array`. Use `_.pull`
+ * to pull elements from an array by value.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.0.0
+ * @category Array
+ * @param {Array} array The array to modify.
+ * @param {Array|Function|Object|string} [predicate=_.identity]
+ * The function invoked per iteration.
+ * @returns {Array} Returns the new array of removed elements.
+ * @example
+ *
+ * var array = [1, 2, 3, 4];
+ * var evens = _.remove(array, function(n) {
+ * return n % 2 == 0;
+ * });
+ *
+ * console.log(array);
+ * // => [1, 3]
+ *
+ * console.log(evens);
+ * // => [2, 4]
+ */
+ function remove(array, predicate) {
+ var result = [];
+ if (!(array && array.length)) {
+ return result;
+ }
+ var index = -1,
+ indexes = [],
+ length = array.length;
+
+ predicate = getIteratee(predicate, 3);
+ while (++index < length) {
+ var value = array[index];
+ if (predicate(value, index, array)) {
+ result.push(value);
+ indexes.push(index);
+ }
+ }
+ basePullAt(array, indexes);
+ return result;
+ }
+
+ /**
+ * Reverses `array` so that the first element becomes the last, the second
+ * element becomes the second to last, and so on.
+ *
+ * **Note:** This method mutates `array` and is based on
+ * [`Array#reverse`](https://mdn.io/Array/reverse).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to modify.
+ * @returns {Array} Returns `array`.
+ * @example
+ *
+ * var array = [1, 2, 3];
+ *
+ * _.reverse(array);
+ * // => [3, 2, 1]
+ *
+ * console.log(array);
+ * // => [3, 2, 1]
+ */
+ function reverse(array) {
+ return array ? nativeReverse.call(array) : array;
+ }
+
+ /**
+ * Creates a slice of `array` from `start` up to, but not including, `end`.
+ *
+ * **Note:** This method is used instead of
+ * [`Array#slice`](https://mdn.io/Array/slice) to ensure dense arrays are
+ * returned.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Array
+ * @param {Array} array The array to slice.
+ * @param {number} [start=0] The start position.
+ * @param {number} [end=array.length] The end position.
+ * @returns {Array} Returns the slice of `array`.
+ */
+ function slice(array, start, end) {
+ var length = array ? array.length : 0;
+ if (!length) {
+ return [];
+ }
+ if (end && typeof end != 'number' && isIterateeCall(array, start, end)) {
+ start = 0;
+ end = length;
+ }
+ else {
+ start = start == null ? 0 : toInteger(start);
+ end = end === undefined ? length : toInteger(end);
+ }
+ return baseSlice(array, start, end);
+ }
+
+ /**
+ * Uses a binary search to determine the lowest index at which `value`
+ * should be inserted into `array` in order to maintain its sort order.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {Array} array The sorted array to inspect.
+ * @param {*} value The value to evaluate.
+ * @returns {number} Returns the index at which `value` should be inserted
+ * into `array`.
+ * @example
+ *
+ * _.sortedIndex([30, 50], 40);
+ * // => 1
+ *
+ * _.sortedIndex([4, 5], 4);
+ * // => 0
+ */
+ function sortedIndex(array, value) {
+ return baseSortedIndex(array, value);
+ }
+
+ /**
+ * This method is like `_.sortedIndex` except that it accepts `iteratee`
+ * which is invoked for `value` and each element of `array` to compute their
+ * sort ranking. The iteratee is invoked with one argument: (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The sorted array to inspect.
+ * @param {*} value The value to evaluate.
+ * @param {Array|Function|Object|string} [iteratee=_.identity]
+ * The iteratee invoked per element.
+ * @returns {number} Returns the index at which `value` should be inserted
+ * into `array`.
+ * @example
+ *
+ * var dict = { 'thirty': 30, 'forty': 40, 'fifty': 50 };
+ *
+ * _.sortedIndexBy(['thirty', 'fifty'], 'forty', _.propertyOf(dict));
+ * // => 1
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.sortedIndexBy([{ 'x': 4 }, { 'x': 5 }], { 'x': 4 }, 'x');
+ * // => 0
+ */
+ function sortedIndexBy(array, value, iteratee) {
+ return baseSortedIndexBy(array, value, getIteratee(iteratee));
+ }
+
+ /**
+ * This method is like `_.indexOf` except that it performs a binary
+ * search on a sorted `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to search.
+ * @param {*} value The value to search for.
+ * @returns {number} Returns the index of the matched value, else `-1`.
+ * @example
+ *
+ * _.sortedIndexOf([1, 1, 2, 2], 2);
+ * // => 2
+ */
+ function sortedIndexOf(array, value) {
+ var length = array ? array.length : 0;
+ if (length) {
+ var index = baseSortedIndex(array, value);
+ if (index < length && eq(array[index], value)) {
+ return index;
+ }
+ }
+ return -1;
+ }
+
+ /**
+ * This method is like `_.sortedIndex` except that it returns the highest
+ * index at which `value` should be inserted into `array` in order to
+ * maintain its sort order.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Array
+ * @param {Array} array The sorted array to inspect.
+ * @param {*} value The value to evaluate.
+ * @returns {number} Returns the index at which `value` should be inserted
+ * into `array`.
+ * @example
+ *
+ * _.sortedLastIndex([4, 5], 4);
+ * // => 1
+ */
+ function sortedLastIndex(array, value) {
+ return baseSortedIndex(array, value, true);
+ }
+
+ /**
+ * This method is like `_.sortedLastIndex` except that it accepts `iteratee`
+ * which is invoked for `value` and each element of `array` to compute their
+ * sort ranking. The iteratee is invoked with one argument: (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The sorted array to inspect.
+ * @param {*} value The value to evaluate.
+ * @param {Array|Function|Object|string} [iteratee=_.identity]
+ * The iteratee invoked per element.
+ * @returns {number} Returns the index at which `value` should be inserted
+ * into `array`.
+ * @example
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.sortedLastIndexBy([{ 'x': 4 }, { 'x': 5 }], { 'x': 4 }, 'x');
+ * // => 1
+ */
+ function sortedLastIndexBy(array, value, iteratee) {
+ return baseSortedIndexBy(array, value, getIteratee(iteratee), true);
+ }
+
+ /**
+ * This method is like `_.lastIndexOf` except that it performs a binary
+ * search on a sorted `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to search.
+ * @param {*} value The value to search for.
+ * @returns {number} Returns the index of the matched value, else `-1`.
+ * @example
+ *
+ * _.sortedLastIndexOf([1, 1, 2, 2], 2);
+ * // => 3
+ */
+ function sortedLastIndexOf(array, value) {
+ var length = array ? array.length : 0;
+ if (length) {
+ var index = baseSortedIndex(array, value, true) - 1;
+ if (eq(array[index], value)) {
+ return index;
+ }
+ }
+ return -1;
+ }
+
+ /**
+ * This method is like `_.uniq` except that it's designed and optimized
+ * for sorted arrays.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @returns {Array} Returns the new duplicate free array.
+ * @example
+ *
+ * _.sortedUniq([1, 1, 2]);
+ * // => [1, 2]
+ */
+ function sortedUniq(array) {
+ return (array && array.length)
+ ? baseSortedUniq(array)
+ : [];
+ }
+
+ /**
+ * This method is like `_.uniqBy` except that it's designed and optimized
+ * for sorted arrays.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @param {Function} [iteratee] The iteratee invoked per element.
+ * @returns {Array} Returns the new duplicate free array.
+ * @example
+ *
+ * _.sortedUniqBy([1.1, 1.2, 2.3, 2.4], Math.floor);
+ * // => [1.1, 2.3]
+ */
+ function sortedUniqBy(array, iteratee) {
+ return (array && array.length)
+ ? baseSortedUniq(array, getIteratee(iteratee))
+ : [];
+ }
+
+ /**
+ * Gets all but the first element of `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to query.
+ * @returns {Array} Returns the slice of `array`.
+ * @example
+ *
+ * _.tail([1, 2, 3]);
+ * // => [2, 3]
+ */
+ function tail(array) {
+ return drop(array, 1);
+ }
+
+ /**
+ * Creates a slice of `array` with `n` elements taken from the beginning.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {Array} array The array to query.
+ * @param {number} [n=1] The number of elements to take.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {Array} Returns the slice of `array`.
+ * @example
+ *
+ * _.take([1, 2, 3]);
+ * // => [1]
+ *
+ * _.take([1, 2, 3], 2);
+ * // => [1, 2]
+ *
+ * _.take([1, 2, 3], 5);
+ * // => [1, 2, 3]
+ *
+ * _.take([1, 2, 3], 0);
+ * // => []
+ */
+ function take(array, n, guard) {
+ if (!(array && array.length)) {
+ return [];
+ }
+ n = (guard || n === undefined) ? 1 : toInteger(n);
+ return baseSlice(array, 0, n < 0 ? 0 : n);
+ }
+
+ /**
+ * Creates a slice of `array` with `n` elements taken from the end.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Array
+ * @param {Array} array The array to query.
+ * @param {number} [n=1] The number of elements to take.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {Array} Returns the slice of `array`.
+ * @example
+ *
+ * _.takeRight([1, 2, 3]);
+ * // => [3]
+ *
+ * _.takeRight([1, 2, 3], 2);
+ * // => [2, 3]
+ *
+ * _.takeRight([1, 2, 3], 5);
+ * // => [1, 2, 3]
+ *
+ * _.takeRight([1, 2, 3], 0);
+ * // => []
+ */
+ function takeRight(array, n, guard) {
+ var length = array ? array.length : 0;
+ if (!length) {
+ return [];
+ }
+ n = (guard || n === undefined) ? 1 : toInteger(n);
+ n = length - n;
+ return baseSlice(array, n < 0 ? 0 : n, length);
+ }
+
+ /**
+ * Creates a slice of `array` with elements taken from the end. Elements are
+ * taken until `predicate` returns falsey. The predicate is invoked with
+ * three arguments: (value, index, array).
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Array
+ * @param {Array} array The array to query.
+ * @param {Array|Function|Object|string} [predicate=_.identity]
+ * The function invoked per iteration.
+ * @returns {Array} Returns the slice of `array`.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'active': true },
+ * { 'user': 'fred', 'active': false },
+ * { 'user': 'pebbles', 'active': false }
+ * ];
+ *
+ * _.takeRightWhile(users, function(o) { return !o.active; });
+ * // => objects for ['fred', 'pebbles']
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.takeRightWhile(users, { 'user': 'pebbles', 'active': false });
+ * // => objects for ['pebbles']
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.takeRightWhile(users, ['active', false]);
+ * // => objects for ['fred', 'pebbles']
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.takeRightWhile(users, 'active');
+ * // => []
+ */
+ function takeRightWhile(array, predicate) {
+ return (array && array.length)
+ ? baseWhile(array, getIteratee(predicate, 3), false, true)
+ : [];
+ }
+
+ /**
+ * Creates a slice of `array` with elements taken from the beginning. Elements
+ * are taken until `predicate` returns falsey. The predicate is invoked with
+ * three arguments: (value, index, array).
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Array
+ * @param {Array} array The array to query.
+ * @param {Array|Function|Object|string} [predicate=_.identity]
+ * The function invoked per iteration.
+ * @returns {Array} Returns the slice of `array`.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'active': false },
+ * { 'user': 'fred', 'active': false},
+ * { 'user': 'pebbles', 'active': true }
+ * ];
+ *
+ * _.takeWhile(users, function(o) { return !o.active; });
+ * // => objects for ['barney', 'fred']
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.takeWhile(users, { 'user': 'barney', 'active': false });
+ * // => objects for ['barney']
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.takeWhile(users, ['active', false]);
+ * // => objects for ['barney', 'fred']
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.takeWhile(users, 'active');
+ * // => []
+ */
+ function takeWhile(array, predicate) {
+ return (array && array.length)
+ ? baseWhile(array, getIteratee(predicate, 3))
+ : [];
+ }
+
+ /**
+ * Creates an array of unique values, in order, from all given arrays using
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
+ * for equality comparisons.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {...Array} [arrays] The arrays to inspect.
+ * @returns {Array} Returns the new array of combined values.
+ * @example
+ *
+ * _.union([2, 1], [4, 2], [1, 2]);
+ * // => [2, 1, 4]
+ */
+ var union = rest(function(arrays) {
+ return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true));
+ });
+
+ /**
+ * This method is like `_.union` except that it accepts `iteratee` which is
+ * invoked for each element of each `arrays` to generate the criterion by
+ * which uniqueness is computed. The iteratee is invoked with one argument:
+ * (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {...Array} [arrays] The arrays to inspect.
+ * @param {Array|Function|Object|string} [iteratee=_.identity]
+ * The iteratee invoked per element.
+ * @returns {Array} Returns the new array of combined values.
+ * @example
+ *
+ * _.unionBy([2.1, 1.2], [4.3, 2.4], Math.floor);
+ * // => [2.1, 1.2, 4.3]
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.unionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
+ * // => [{ 'x': 1 }, { 'x': 2 }]
+ */
+ var unionBy = rest(function(arrays) {
+ var iteratee = last(arrays);
+ if (isArrayLikeObject(iteratee)) {
+ iteratee = undefined;
+ }
+ return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), getIteratee(iteratee));
+ });
+
+ /**
+ * This method is like `_.union` except that it accepts `comparator` which
+ * is invoked to compare elements of `arrays`. The comparator is invoked
+ * with two arguments: (arrVal, othVal).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {...Array} [arrays] The arrays to inspect.
+ * @param {Function} [comparator] The comparator invoked per element.
+ * @returns {Array} Returns the new array of combined values.
+ * @example
+ *
+ * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
+ * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];
+ *
+ * _.unionWith(objects, others, _.isEqual);
+ * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]
+ */
+ var unionWith = rest(function(arrays) {
+ var comparator = last(arrays);
+ if (isArrayLikeObject(comparator)) {
+ comparator = undefined;
+ }
+ return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), undefined, comparator);
+ });
+
+ /**
+ * Creates a duplicate-free version of an array, using
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
+ * for equality comparisons, in which only the first occurrence of each
+ * element is kept.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @returns {Array} Returns the new duplicate free array.
+ * @example
+ *
+ * _.uniq([2, 1, 2]);
+ * // => [2, 1]
+ */
+ function uniq(array) {
+ return (array && array.length)
+ ? baseUniq(array)
+ : [];
+ }
+
+ /**
+ * This method is like `_.uniq` except that it accepts `iteratee` which is
+ * invoked for each element in `array` to generate the criterion by which
+ * uniqueness is computed. The iteratee is invoked with one argument: (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @param {Array|Function|Object|string} [iteratee=_.identity]
+ * The iteratee invoked per element.
+ * @returns {Array} Returns the new duplicate free array.
+ * @example
+ *
+ * _.uniqBy([2.1, 1.2, 2.3], Math.floor);
+ * // => [2.1, 1.2]
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x');
+ * // => [{ 'x': 1 }, { 'x': 2 }]
+ */
+ function uniqBy(array, iteratee) {
+ return (array && array.length)
+ ? baseUniq(array, getIteratee(iteratee))
+ : [];
+ }
+
+ /**
+ * This method is like `_.uniq` except that it accepts `comparator` which
+ * is invoked to compare elements of `array`. The comparator is invoked with
+ * two arguments: (arrVal, othVal).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @param {Function} [comparator] The comparator invoked per element.
+ * @returns {Array} Returns the new duplicate free array.
+ * @example
+ *
+ * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 2 }];
+ *
+ * _.uniqWith(objects, _.isEqual);
+ * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]
+ */
+ function uniqWith(array, comparator) {
+ return (array && array.length)
+ ? baseUniq(array, undefined, comparator)
+ : [];
+ }
+
+ /**
+ * This method is like `_.zip` except that it accepts an array of grouped
+ * elements and creates an array regrouping the elements to their pre-zip
+ * configuration.
+ *
+ * @static
+ * @memberOf _
+ * @since 1.2.0
+ * @category Array
+ * @param {Array} array The array of grouped elements to process.
+ * @returns {Array} Returns the new array of regrouped elements.
+ * @example
+ *
+ * var zipped = _.zip(['fred', 'barney'], [30, 40], [true, false]);
+ * // => [['fred', 30, true], ['barney', 40, false]]
+ *
+ * _.unzip(zipped);
+ * // => [['fred', 'barney'], [30, 40], [true, false]]
+ */
+ function unzip(array) {
+ if (!(array && array.length)) {
+ return [];
+ }
+ var length = 0;
+ array = arrayFilter(array, function(group) {
+ if (isArrayLikeObject(group)) {
+ length = nativeMax(group.length, length);
+ return true;
+ }
+ });
+ return baseTimes(length, function(index) {
+ return arrayMap(array, baseProperty(index));
+ });
+ }
+
+ /**
+ * This method is like `_.unzip` except that it accepts `iteratee` to specify
+ * how regrouped values should be combined. The iteratee is invoked with the
+ * elements of each group: (...group).
+ *
+ * @static
+ * @memberOf _
+ * @since 3.8.0
+ * @category Array
+ * @param {Array} array The array of grouped elements to process.
+ * @param {Function} [iteratee=_.identity] The function to combine
+ * regrouped values.
+ * @returns {Array} Returns the new array of regrouped elements.
+ * @example
+ *
+ * var zipped = _.zip([1, 2], [10, 20], [100, 200]);
+ * // => [[1, 10, 100], [2, 20, 200]]
+ *
+ * _.unzipWith(zipped, _.add);
+ * // => [3, 30, 300]
+ */
+ function unzipWith(array, iteratee) {
+ if (!(array && array.length)) {
+ return [];
+ }
+ var result = unzip(array);
+ if (iteratee == null) {
+ return result;
+ }
+ return arrayMap(result, function(group) {
+ return apply(iteratee, undefined, group);
+ });
+ }
+
+ /**
+ * Creates an array excluding all given values using
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
+ * for equality comparisons.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {Array} array The array to filter.
+ * @param {...*} [values] The values to exclude.
+ * @returns {Array} Returns the new array of filtered values.
+ * @see _.difference, _.xor
+ * @example
+ *
+ * _.without([1, 2, 1, 3], 1, 2);
+ * // => [3]
+ */
+ var without = rest(function(array, values) {
+ return isArrayLikeObject(array)
+ ? baseDifference(array, values)
+ : [];
+ });
+
+ /**
+ * Creates an array of unique values that is the
+ * [symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference)
+ * of the given arrays. The order of result values is determined by the order
+ * they occur in the arrays.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.4.0
+ * @category Array
+ * @param {...Array} [arrays] The arrays to inspect.
+ * @returns {Array} Returns the new array of values.
+ * @see _.difference, _.without
+ * @example
+ *
+ * _.xor([2, 1], [4, 2]);
+ * // => [1, 4]
+ */
+ var xor = rest(function(arrays) {
+ return baseXor(arrayFilter(arrays, isArrayLikeObject));
+ });
+
+ /**
+ * This method is like `_.xor` except that it accepts `iteratee` which is
+ * invoked for each element of each `arrays` to generate the criterion by
+ * which by which they're compared. The iteratee is invoked with one argument:
+ * (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {...Array} [arrays] The arrays to inspect.
+ * @param {Array|Function|Object|string} [iteratee=_.identity]
+ * The iteratee invoked per element.
+ * @returns {Array} Returns the new array of values.
+ * @example
+ *
+ * _.xorBy([2.1, 1.2], [4.3, 2.4], Math.floor);
+ * // => [1.2, 4.3]
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.xorBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
+ * // => [{ 'x': 2 }]
+ */
+ var xorBy = rest(function(arrays) {
+ var iteratee = last(arrays);
+ if (isArrayLikeObject(iteratee)) {
+ iteratee = undefined;
+ }
+ return baseXor(arrayFilter(arrays, isArrayLikeObject), getIteratee(iteratee));
+ });
+
+ /**
+ * This method is like `_.xor` except that it accepts `comparator` which is
+ * invoked to compare elements of `arrays`. The comparator is invoked with
+ * two arguments: (arrVal, othVal).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {...Array} [arrays] The arrays to inspect.
+ * @param {Function} [comparator] The comparator invoked per element.
+ * @returns {Array} Returns the new array of values.
+ * @example
+ *
+ * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
+ * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];
+ *
+ * _.xorWith(objects, others, _.isEqual);
+ * // => [{ 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]
+ */
+ var xorWith = rest(function(arrays) {
+ var comparator = last(arrays);
+ if (isArrayLikeObject(comparator)) {
+ comparator = undefined;
+ }
+ return baseXor(arrayFilter(arrays, isArrayLikeObject), undefined, comparator);
+ });
+
+ /**
+ * Creates an array of grouped elements, the first of which contains the
+ * first elements of the given arrays, the second of which contains the
+ * second elements of the given arrays, and so on.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {...Array} [arrays] The arrays to process.
+ * @returns {Array} Returns the new array of grouped elements.
+ * @example
+ *
+ * _.zip(['fred', 'barney'], [30, 40], [true, false]);
+ * // => [['fred', 30, true], ['barney', 40, false]]
+ */
+ var zip = rest(unzip);
+
+ /**
+ * This method is like `_.fromPairs` except that it accepts two arrays,
+ * one of property identifiers and one of corresponding values.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.4.0
+ * @category Array
+ * @param {Array} [props=[]] The property identifiers.
+ * @param {Array} [values=[]] The property values.
+ * @returns {Object} Returns the new object.
+ * @example
+ *
+ * _.zipObject(['a', 'b'], [1, 2]);
+ * // => { 'a': 1, 'b': 2 }
+ */
+ function zipObject(props, values) {
+ return baseZipObject(props || [], values || [], assignValue);
+ }
+
+ /**
+ * This method is like `_.zipObject` except that it supports property paths.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.1.0
+ * @category Array
+ * @param {Array} [props=[]] The property identifiers.
+ * @param {Array} [values=[]] The property values.
+ * @returns {Object} Returns the new object.
+ * @example
+ *
+ * _.zipObjectDeep(['a.b[0].c', 'a.b[1].d'], [1, 2]);
+ * // => { 'a': { 'b': [{ 'c': 1 }, { 'd': 2 }] } }
+ */
+ function zipObjectDeep(props, values) {
+ return baseZipObject(props || [], values || [], baseSet);
+ }
+
+ /**
+ * This method is like `_.zip` except that it accepts `iteratee` to specify
+ * how grouped values should be combined. The iteratee is invoked with the
+ * elements of each group: (...group).
+ *
+ * @static
+ * @memberOf _
+ * @since 3.8.0
+ * @category Array
+ * @param {...Array} [arrays] The arrays to process.
+ * @param {Function} [iteratee=_.identity] The function to combine grouped values.
+ * @returns {Array} Returns the new array of grouped elements.
+ * @example
+ *
+ * _.zipWith([1, 2], [10, 20], [100, 200], function(a, b, c) {
+ * return a + b + c;
+ * });
+ * // => [111, 222]
+ */
+ var zipWith = rest(function(arrays) {
+ var length = arrays.length,
+ iteratee = length > 1 ? arrays[length - 1] : undefined;
+
+ iteratee = typeof iteratee == 'function' ? (arrays.pop(), iteratee) : undefined;
+ return unzipWith(arrays, iteratee);
+ });
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Creates a `lodash` wrapper instance that wraps `value` with explicit method
+ * chain sequences enabled. The result of such sequences must be unwrapped
+ * with `_#value`.
+ *
+ * @static
+ * @memberOf _
+ * @since 1.3.0
+ * @category Seq
+ * @param {*} value The value to wrap.
+ * @returns {Object} Returns the new `lodash` wrapper instance.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'age': 36 },
+ * { 'user': 'fred', 'age': 40 },
+ * { 'user': 'pebbles', 'age': 1 }
+ * ];
+ *
+ * var youngest = _
+ * .chain(users)
+ * .sortBy('age')
+ * .map(function(o) {
+ * return o.user + ' is ' + o.age;
+ * })
+ * .head()
+ * .value();
+ * // => 'pebbles is 1'
+ */
+ function chain(value) {
+ var result = lodash(value);
+ result.__chain__ = true;
+ return result;
+ }
+
+ /**
+ * This method invokes `interceptor` and returns `value`. The interceptor
+ * is invoked with one argument; (value). The purpose of this method is to
+ * "tap into" a method chain sequence in order to modify intermediate results.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Seq
+ * @param {*} value The value to provide to `interceptor`.
+ * @param {Function} interceptor The function to invoke.
+ * @returns {*} Returns `value`.
+ * @example
+ *
+ * _([1, 2, 3])
+ * .tap(function(array) {
+ * // Mutate input array.
+ * array.pop();
+ * })
+ * .reverse()
+ * .value();
+ * // => [2, 1]
+ */
+ function tap(value, interceptor) {
+ interceptor(value);
+ return value;
+ }
+
+ /**
+ * This method is like `_.tap` except that it returns the result of `interceptor`.
+ * The purpose of this method is to "pass thru" values replacing intermediate
+ * results in a method chain sequence.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Seq
+ * @param {*} value The value to provide to `interceptor`.
+ * @param {Function} interceptor The function to invoke.
+ * @returns {*} Returns the result of `interceptor`.
+ * @example
+ *
+ * _(' abc ')
+ * .chain()
+ * .trim()
+ * .thru(function(value) {
+ * return [value];
+ * })
+ * .value();
+ * // => ['abc']
+ */
+ function thru(value, interceptor) {
+ return interceptor(value);
+ }
+
+ /**
+ * This method is the wrapper version of `_.at`.
+ *
+ * @name at
+ * @memberOf _
+ * @since 1.0.0
+ * @category Seq
+ * @param {...(string|string[])} [paths] The property paths of elements to pick.
+ * @returns {Object} Returns the new `lodash` wrapper instance.
+ * @example
+ *
+ * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };
+ *
+ * _(object).at(['a[0].b.c', 'a[1]']).value();
+ * // => [3, 4]
+ *
+ * _(['a', 'b', 'c']).at(0, 2).value();
+ * // => ['a', 'c']
+ */
+ var wrapperAt = rest(function(paths) {
+ paths = baseFlatten(paths, 1);
+ var length = paths.length,
+ start = length ? paths[0] : 0,
+ value = this.__wrapped__,
+ interceptor = function(object) { return baseAt(object, paths); };
+
+ if (length > 1 || this.__actions__.length ||
+ !(value instanceof LazyWrapper) || !isIndex(start)) {
+ return this.thru(interceptor);
+ }
+ value = value.slice(start, +start + (length ? 1 : 0));
+ value.__actions__.push({
+ 'func': thru,
+ 'args': [interceptor],
+ 'thisArg': undefined
+ });
+ return new LodashWrapper(value, this.__chain__).thru(function(array) {
+ if (length && !array.length) {
+ array.push(undefined);
+ }
+ return array;
+ });
+ });
+
+ /**
+ * Creates a `lodash` wrapper instance with explicit method chain sequences enabled.
+ *
+ * @name chain
+ * @memberOf _
+ * @since 0.1.0
+ * @category Seq
+ * @returns {Object} Returns the new `lodash` wrapper instance.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'age': 36 },
+ * { 'user': 'fred', 'age': 40 }
+ * ];
+ *
+ * // A sequence without explicit chaining.
+ * _(users).head();
+ * // => { 'user': 'barney', 'age': 36 }
+ *
+ * // A sequence with explicit chaining.
+ * _(users)
+ * .chain()
+ * .head()
+ * .pick('user')
+ * .value();
+ * // => { 'user': 'barney' }
+ */
+ function wrapperChain() {
+ return chain(this);
+ }
+
+ /**
+ * Executes the chain sequence and returns the wrapped result.
+ *
+ * @name commit
+ * @memberOf _
+ * @since 3.2.0
+ * @category Seq
+ * @returns {Object} Returns the new `lodash` wrapper instance.
+ * @example
+ *
+ * var array = [1, 2];
+ * var wrapped = _(array).push(3);
+ *
+ * console.log(array);
+ * // => [1, 2]
+ *
+ * wrapped = wrapped.commit();
+ * console.log(array);
+ * // => [1, 2, 3]
+ *
+ * wrapped.last();
+ * // => 3
+ *
+ * console.log(array);
+ * // => [1, 2, 3]
+ */
+ function wrapperCommit() {
+ return new LodashWrapper(this.value(), this.__chain__);
+ }
+
+ /**
+ * Gets the next value on a wrapped object following the
+ * [iterator protocol](https://mdn.io/iteration_protocols#iterator).
+ *
+ * @name next
+ * @memberOf _
+ * @since 4.0.0
+ * @category Seq
+ * @returns {Object} Returns the next iterator value.
+ * @example
+ *
+ * var wrapped = _([1, 2]);
+ *
+ * wrapped.next();
+ * // => { 'done': false, 'value': 1 }
+ *
+ * wrapped.next();
+ * // => { 'done': false, 'value': 2 }
+ *
+ * wrapped.next();
+ * // => { 'done': true, 'value': undefined }
+ */
+ function wrapperNext() {
+ if (this.__values__ === undefined) {
+ this.__values__ = toArray(this.value());
+ }
+ var done = this.__index__ >= this.__values__.length,
+ value = done ? undefined : this.__values__[this.__index__++];
+
+ return { 'done': done, 'value': value };
+ }
+
+ /**
+ * Enables the wrapper to be iterable.
+ *
+ * @name Symbol.iterator
+ * @memberOf _
+ * @since 4.0.0
+ * @category Seq
+ * @returns {Object} Returns the wrapper object.
+ * @example
+ *
+ * var wrapped = _([1, 2]);
+ *
+ * wrapped[Symbol.iterator]() === wrapped;
+ * // => true
+ *
+ * Array.from(wrapped);
+ * // => [1, 2]
+ */
+ function wrapperToIterator() {
+ return this;
+ }
+
+ /**
+ * Creates a clone of the chain sequence planting `value` as the wrapped value.
+ *
+ * @name plant
+ * @memberOf _
+ * @since 3.2.0
+ * @category Seq
+ * @param {*} value The value to plant.
+ * @returns {Object} Returns the new `lodash` wrapper instance.
+ * @example
+ *
+ * function square(n) {
+ * return n * n;
+ * }
+ *
+ * var wrapped = _([1, 2]).map(square);
+ * var other = wrapped.plant([3, 4]);
+ *
+ * other.value();
+ * // => [9, 16]
+ *
+ * wrapped.value();
+ * // => [1, 4]
+ */
+ function wrapperPlant(value) {
+ var result,
+ parent = this;
+
+ while (parent instanceof baseLodash) {
+ var clone = wrapperClone(parent);
+ clone.__index__ = 0;
+ clone.__values__ = undefined;
+ if (result) {
+ previous.__wrapped__ = clone;
+ } else {
+ result = clone;
+ }
+ var previous = clone;
+ parent = parent.__wrapped__;
+ }
+ previous.__wrapped__ = value;
+ return result;
+ }
+
+ /**
+ * This method is the wrapper version of `_.reverse`.
+ *
+ * **Note:** This method mutates the wrapped array.
+ *
+ * @name reverse
+ * @memberOf _
+ * @since 0.1.0
+ * @category Seq
+ * @returns {Object} Returns the new `lodash` wrapper instance.
+ * @example
+ *
+ * var array = [1, 2, 3];
+ *
+ * _(array).reverse().value()
+ * // => [3, 2, 1]
+ *
+ * console.log(array);
+ * // => [3, 2, 1]
+ */
+ function wrapperReverse() {
+ var value = this.__wrapped__;
+ if (value instanceof LazyWrapper) {
+ var wrapped = value;
+ if (this.__actions__.length) {
+ wrapped = new LazyWrapper(this);
+ }
+ wrapped = wrapped.reverse();
+ wrapped.__actions__.push({
+ 'func': thru,
+ 'args': [reverse],
+ 'thisArg': undefined
+ });
+ return new LodashWrapper(wrapped, this.__chain__);
+ }
+ return this.thru(reverse);
+ }
+
+ /**
+ * Executes the chain sequence to resolve the unwrapped value.
+ *
+ * @name value
+ * @memberOf _
+ * @since 0.1.0
+ * @alias toJSON, valueOf
+ * @category Seq
+ * @returns {*} Returns the resolved unwrapped value.
+ * @example
+ *
+ * _([1, 2, 3]).value();
+ * // => [1, 2, 3]
+ */
+ function wrapperValue() {
+ return baseWrapperValue(this.__wrapped__, this.__actions__);
+ }
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Creates an object composed of keys generated from the results of running
+ * each element of `collection` thru `iteratee`. The corresponding value of
+ * each key is the number of times the key was returned by `iteratee`. The
+ * iteratee is invoked with one argument: (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 0.5.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Array|Function|Object|string} [iteratee=_.identity]
+ * The iteratee to transform keys.
+ * @returns {Object} Returns the composed aggregate object.
+ * @example
+ *
+ * _.countBy([6.1, 4.2, 6.3], Math.floor);
+ * // => { '4': 1, '6': 2 }
+ *
+ * _.countBy(['one', 'two', 'three'], 'length');
+ * // => { '3': 2, '5': 1 }
+ */
+ var countBy = createAggregator(function(result, value, key) {
+ hasOwnProperty.call(result, key) ? ++result[key] : (result[key] = 1);
+ });
+
+ /**
+ * Checks if `predicate` returns truthy for **all** elements of `collection`.
+ * Iteration is stopped once `predicate` returns falsey. The predicate is
+ * invoked with three arguments: (value, index|key, collection).
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Array|Function|Object|string} [predicate=_.identity]
+ * The function invoked per iteration.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {boolean} Returns `true` if all elements pass the predicate check,
+ * else `false`.
+ * @example
+ *
+ * _.every([true, 1, null, 'yes'], Boolean);
+ * // => false
+ *
+ * var users = [
+ * { 'user': 'barney', 'age': 36, 'active': false },
+ * { 'user': 'fred', 'age': 40, 'active': false }
+ * ];
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.every(users, { 'user': 'barney', 'active': false });
+ * // => false
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.every(users, ['active', false]);
+ * // => true
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.every(users, 'active');
+ * // => false
+ */
+ function every(collection, predicate, guard) {
+ var func = isArray(collection) ? arrayEvery : baseEvery;
+ if (guard && isIterateeCall(collection, predicate, guard)) {
+ predicate = undefined;
+ }
+ return func(collection, getIteratee(predicate, 3));
+ }
+
+ /**
+ * Iterates over elements of `collection`, returning an array of all elements
+ * `predicate` returns truthy for. The predicate is invoked with three
+ * arguments: (value, index|key, collection).
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Array|Function|Object|string} [predicate=_.identity]
+ * The function invoked per iteration.
+ * @returns {Array} Returns the new filtered array.
+ * @see _.reject
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'age': 36, 'active': true },
+ * { 'user': 'fred', 'age': 40, 'active': false }
+ * ];
+ *
+ * _.filter(users, function(o) { return !o.active; });
+ * // => objects for ['fred']
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.filter(users, { 'age': 36, 'active': true });
+ * // => objects for ['barney']
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.filter(users, ['active', false]);
+ * // => objects for ['fred']
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.filter(users, 'active');
+ * // => objects for ['barney']
+ */
+ function filter(collection, predicate) {
+ var func = isArray(collection) ? arrayFilter : baseFilter;
+ return func(collection, getIteratee(predicate, 3));
+ }
+
+ /**
+ * Iterates over elements of `collection`, returning the first element
+ * `predicate` returns truthy for. The predicate is invoked with three
+ * arguments: (value, index|key, collection).
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to search.
+ * @param {Array|Function|Object|string} [predicate=_.identity]
+ * The function invoked per iteration.
+ * @returns {*} Returns the matched element, else `undefined`.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'age': 36, 'active': true },
+ * { 'user': 'fred', 'age': 40, 'active': false },
+ * { 'user': 'pebbles', 'age': 1, 'active': true }
+ * ];
+ *
+ * _.find(users, function(o) { return o.age < 40; });
+ * // => object for 'barney'
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.find(users, { 'age': 1, 'active': true });
+ * // => object for 'pebbles'
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.find(users, ['active', false]);
+ * // => object for 'fred'
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.find(users, 'active');
+ * // => object for 'barney'
+ */
+ function find(collection, predicate) {
+ predicate = getIteratee(predicate, 3);
+ if (isArray(collection)) {
+ var index = baseFindIndex(collection, predicate);
+ return index > -1 ? collection[index] : undefined;
+ }
+ return baseFind(collection, predicate, baseEach);
+ }
+
+ /**
+ * This method is like `_.find` except that it iterates over elements of
+ * `collection` from right to left.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.0.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to search.
+ * @param {Array|Function|Object|string} [predicate=_.identity]
+ * The function invoked per iteration.
+ * @returns {*} Returns the matched element, else `undefined`.
+ * @example
+ *
+ * _.findLast([1, 2, 3, 4], function(n) {
+ * return n % 2 == 1;
+ * });
+ * // => 3
+ */
+ function findLast(collection, predicate) {
+ predicate = getIteratee(predicate, 3);
+ if (isArray(collection)) {
+ var index = baseFindIndex(collection, predicate, true);
+ return index > -1 ? collection[index] : undefined;
+ }
+ return baseFind(collection, predicate, baseEachRight);
+ }
+
+ /**
+ * Creates a flattened array of values by running each element in `collection`
+ * thru `iteratee` and flattening the mapped results. The iteratee is invoked
+ * with three arguments: (value, index|key, collection).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Array|Function|Object|string} [iteratee=_.identity]
+ * The function invoked per iteration.
+ * @returns {Array} Returns the new flattened array.
+ * @example
+ *
+ * function duplicate(n) {
+ * return [n, n];
+ * }
+ *
+ * _.flatMap([1, 2], duplicate);
+ * // => [1, 1, 2, 2]
+ */
+ function flatMap(collection, iteratee) {
+ return baseFlatten(map(collection, iteratee), 1);
+ }
+
+ /**
+ * This method is like `_.flatMap` except that it recursively flattens the
+ * mapped results.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.7.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Array|Function|Object|string} [iteratee=_.identity]
+ * The function invoked per iteration.
+ * @returns {Array} Returns the new flattened array.
+ * @example
+ *
+ * function duplicate(n) {
+ * return [[[n, n]]];
+ * }
+ *
+ * _.flatMapDeep([1, 2], duplicate);
+ * // => [1, 1, 2, 2]
+ */
+ function flatMapDeep(collection, iteratee) {
+ return baseFlatten(map(collection, iteratee), INFINITY);
+ }
+
+ /**
+ * This method is like `_.flatMap` except that it recursively flattens the
+ * mapped results up to `depth` times.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.7.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Array|Function|Object|string} [iteratee=_.identity]
+ * The function invoked per iteration.
+ * @param {number} [depth=1] The maximum recursion depth.
+ * @returns {Array} Returns the new flattened array.
+ * @example
+ *
+ * function duplicate(n) {
+ * return [[[n, n]]];
+ * }
+ *
+ * _.flatMapDepth([1, 2], duplicate, 2);
+ * // => [[1, 1], [2, 2]]
+ */
+ function flatMapDepth(collection, iteratee, depth) {
+ depth = depth === undefined ? 1 : toInteger(depth);
+ return baseFlatten(map(collection, iteratee), depth);
+ }
+
+ /**
+ * Iterates over elements of `collection` and invokes `iteratee` for each element.
+ * The iteratee is invoked with three arguments: (value, index|key, collection).
+ * Iteratee functions may exit iteration early by explicitly returning `false`.
+ *
+ * **Note:** As with other "Collections" methods, objects with a "length"
+ * property are iterated like arrays. To avoid this behavior use `_.forIn`
+ * or `_.forOwn` for object iteration.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @alias each
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @returns {Array|Object} Returns `collection`.
+ * @see _.forEachRight
+ * @example
+ *
+ * _([1, 2]).forEach(function(value) {
+ * console.log(value);
+ * });
+ * // => Logs `1` then `2`.
+ *
+ * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) {
+ * console.log(key);
+ * });
+ * // => Logs 'a' then 'b' (iteration order is not guaranteed).
+ */
+ function forEach(collection, iteratee) {
+ return (typeof iteratee == 'function' && isArray(collection))
+ ? arrayEach(collection, iteratee)
+ : baseEach(collection, getIteratee(iteratee));
+ }
+
+ /**
+ * This method is like `_.forEach` except that it iterates over elements of
+ * `collection` from right to left.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.0.0
+ * @alias eachRight
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @returns {Array|Object} Returns `collection`.
+ * @see _.forEach
+ * @example
+ *
+ * _.forEachRight([1, 2], function(value) {
+ * console.log(value);
+ * });
+ * // => Logs `2` then `1`.
+ */
+ function forEachRight(collection, iteratee) {
+ return (typeof iteratee == 'function' && isArray(collection))
+ ? arrayEachRight(collection, iteratee)
+ : baseEachRight(collection, getIteratee(iteratee));
+ }
+
+ /**
+ * Creates an object composed of keys generated from the results of running
+ * each element of `collection` thru `iteratee`. The order of grouped values
+ * is determined by the order they occur in `collection`. The corresponding
+ * value of each key is an array of elements responsible for generating the
+ * key. The iteratee is invoked with one argument: (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Array|Function|Object|string} [iteratee=_.identity]
+ * The iteratee to transform keys.
+ * @returns {Object} Returns the composed aggregate object.
+ * @example
+ *
+ * _.groupBy([6.1, 4.2, 6.3], Math.floor);
+ * // => { '4': [4.2], '6': [6.1, 6.3] }
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.groupBy(['one', 'two', 'three'], 'length');
+ * // => { '3': ['one', 'two'], '5': ['three'] }
+ */
+ var groupBy = createAggregator(function(result, value, key) {
+ if (hasOwnProperty.call(result, key)) {
+ result[key].push(value);
+ } else {
+ result[key] = [value];
+ }
+ });
+
+ /**
+ * Checks if `value` is in `collection`. If `collection` is a string, it's
+ * checked for a substring of `value`, otherwise
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
+ * is used for equality comparisons. If `fromIndex` is negative, it's used as
+ * the offset from the end of `collection`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object|string} collection The collection to search.
+ * @param {*} value The value to search for.
+ * @param {number} [fromIndex=0] The index to search from.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.
+ * @returns {boolean} Returns `true` if `value` is found, else `false`.
+ * @example
+ *
+ * _.includes([1, 2, 3], 1);
+ * // => true
+ *
+ * _.includes([1, 2, 3], 1, 2);
+ * // => false
+ *
+ * _.includes({ 'user': 'fred', 'age': 40 }, 'fred');
+ * // => true
+ *
+ * _.includes('pebbles', 'eb');
+ * // => true
+ */
+ function includes(collection, value, fromIndex, guard) {
+ collection = isArrayLike(collection) ? collection : values(collection);
+ fromIndex = (fromIndex && !guard) ? toInteger(fromIndex) : 0;
+
+ var length = collection.length;
+ if (fromIndex < 0) {
+ fromIndex = nativeMax(length + fromIndex, 0);
+ }
+ return isString(collection)
+ ? (fromIndex <= length && collection.indexOf(value, fromIndex) > -1)
+ : (!!length && baseIndexOf(collection, value, fromIndex) > -1);
+ }
+
+ /**
+ * Invokes the method at `path` of each element in `collection`, returning
+ * an array of the results of each invoked method. Any additional arguments
+ * are provided to each invoked method. If `methodName` is a function, it's
+ * invoked for and `this` bound to, each element in `collection`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Array|Function|string} path The path of the method to invoke or
+ * the function invoked per iteration.
+ * @param {...*} [args] The arguments to invoke each method with.
+ * @returns {Array} Returns the array of results.
+ * @example
+ *
+ * _.invokeMap([[5, 1, 7], [3, 2, 1]], 'sort');
+ * // => [[1, 5, 7], [1, 2, 3]]
+ *
+ * _.invokeMap([123, 456], String.prototype.split, '');
+ * // => [['1', '2', '3'], ['4', '5', '6']]
+ */
+ var invokeMap = rest(function(collection, path, args) {
+ var index = -1,
+ isFunc = typeof path == 'function',
+ isProp = isKey(path),
+ result = isArrayLike(collection) ? Array(collection.length) : [];
+
+ baseEach(collection, function(value) {
+ var func = isFunc ? path : ((isProp && value != null) ? value[path] : undefined);
+ result[++index] = func ? apply(func, value, args) : baseInvoke(value, path, args);
+ });
+ return result;
+ });
+
+ /**
+ * Creates an object composed of keys generated from the results of running
+ * each element of `collection` thru `iteratee`. The corresponding value of
+ * each key is the last element responsible for generating the key. The
+ * iteratee is invoked with one argument: (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Array|Function|Object|string} [iteratee=_.identity]
+ * The iteratee to transform keys.
+ * @returns {Object} Returns the composed aggregate object.
+ * @example
+ *
+ * var array = [
+ * { 'dir': 'left', 'code': 97 },
+ * { 'dir': 'right', 'code': 100 }
+ * ];
+ *
+ * _.keyBy(array, function(o) {
+ * return String.fromCharCode(o.code);
+ * });
+ * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } }
+ *
+ * _.keyBy(array, 'dir');
+ * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } }
+ */
+ var keyBy = createAggregator(function(result, value, key) {
+ result[key] = value;
+ });
+
+ /**
+ * Creates an array of values by running each element in `collection` thru
+ * `iteratee`. The iteratee is invoked with three arguments:
+ * (value, index|key, collection).
+ *
+ * Many lodash methods are guarded to work as iteratees for methods like
+ * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`.
+ *
+ * The guarded methods are:
+ * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`,
+ * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`,
+ * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`,
+ * `template`, `trim`, `trimEnd`, `trimStart`, and `words`
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Array|Function|Object|string} [iteratee=_.identity]
+ * The function invoked per iteration.
+ * @returns {Array} Returns the new mapped array.
+ * @example
+ *
+ * function square(n) {
+ * return n * n;
+ * }
+ *
+ * _.map([4, 8], square);
+ * // => [16, 64]
+ *
+ * _.map({ 'a': 4, 'b': 8 }, square);
+ * // => [16, 64] (iteration order is not guaranteed)
+ *
+ * var users = [
+ * { 'user': 'barney' },
+ * { 'user': 'fred' }
+ * ];
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.map(users, 'user');
+ * // => ['barney', 'fred']
+ */
+ function map(collection, iteratee) {
+ var func = isArray(collection) ? arrayMap : baseMap;
+ return func(collection, getIteratee(iteratee, 3));
+ }
+
+ /**
+ * This method is like `_.sortBy` except that it allows specifying the sort
+ * orders of the iteratees to sort by. If `orders` is unspecified, all values
+ * are sorted in ascending order. Otherwise, specify an order of "desc" for
+ * descending or "asc" for ascending sort order of corresponding values.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Array[]|Function[]|Object[]|string[]} [iteratees=[_.identity]]
+ * The iteratees to sort by.
+ * @param {string[]} [orders] The sort orders of `iteratees`.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.
+ * @returns {Array} Returns the new sorted array.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'fred', 'age': 48 },
+ * { 'user': 'barney', 'age': 34 },
+ * { 'user': 'fred', 'age': 40 },
+ * { 'user': 'barney', 'age': 36 }
+ * ];
+ *
+ * // Sort by `user` in ascending order and by `age` in descending order.
+ * _.orderBy(users, ['user', 'age'], ['asc', 'desc']);
+ * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]
+ */
+ function orderBy(collection, iteratees, orders, guard) {
+ if (collection == null) {
+ return [];
+ }
+ if (!isArray(iteratees)) {
+ iteratees = iteratees == null ? [] : [iteratees];
+ }
+ orders = guard ? undefined : orders;
+ if (!isArray(orders)) {
+ orders = orders == null ? [] : [orders];
+ }
+ return baseOrderBy(collection, iteratees, orders);
+ }
+
+ /**
+ * Creates an array of elements split into two groups, the first of which
+ * contains elements `predicate` returns truthy for, the second of which
+ * contains elements `predicate` returns falsey for. The predicate is
+ * invoked with one argument: (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Array|Function|Object|string} [predicate=_.identity]
+ * The function invoked per iteration.
+ * @returns {Array} Returns the array of grouped elements.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'age': 36, 'active': false },
+ * { 'user': 'fred', 'age': 40, 'active': true },
+ * { 'user': 'pebbles', 'age': 1, 'active': false }
+ * ];
+ *
+ * _.partition(users, function(o) { return o.active; });
+ * // => objects for [['fred'], ['barney', 'pebbles']]
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.partition(users, { 'age': 1, 'active': false });
+ * // => objects for [['pebbles'], ['barney', 'fred']]
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.partition(users, ['active', false]);
+ * // => objects for [['barney', 'pebbles'], ['fred']]
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.partition(users, 'active');
+ * // => objects for [['fred'], ['barney', 'pebbles']]
+ */
+ var partition = createAggregator(function(result, value, key) {
+ result[key ? 0 : 1].push(value);
+ }, function() { return [[], []]; });
+
+ /**
+ * Reduces `collection` to a value which is the accumulated result of running
+ * each element in `collection` thru `iteratee`, where each successive
+ * invocation is supplied the return value of the previous. If `accumulator`
+ * is not given, the first element of `collection` is used as the initial
+ * value. The iteratee is invoked with four arguments:
+ * (accumulator, value, index|key, collection).
+ *
+ * Many lodash methods are guarded to work as iteratees for methods like
+ * `_.reduce`, `_.reduceRight`, and `_.transform`.
+ *
+ * The guarded methods are:
+ * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`,
+ * and `sortBy`
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @param {*} [accumulator] The initial value.
+ * @returns {*} Returns the accumulated value.
+ * @see _.reduceRight
+ * @example
+ *
+ * _.reduce([1, 2], function(sum, n) {
+ * return sum + n;
+ * }, 0);
+ * // => 3
+ *
+ * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {
+ * (result[value] || (result[value] = [])).push(key);
+ * return result;
+ * }, {});
+ * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed)
+ */
+ function reduce(collection, iteratee, accumulator) {
+ var func = isArray(collection) ? arrayReduce : baseReduce,
+ initAccum = arguments.length < 3;
+
+ return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEach);
+ }
+
+ /**
+ * This method is like `_.reduce` except that it iterates over elements of
+ * `collection` from right to left.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @param {*} [accumulator] The initial value.
+ * @returns {*} Returns the accumulated value.
+ * @see _.reduce
+ * @example
+ *
+ * var array = [[0, 1], [2, 3], [4, 5]];
+ *
+ * _.reduceRight(array, function(flattened, other) {
+ * return flattened.concat(other);
+ * }, []);
+ * // => [4, 5, 2, 3, 0, 1]
+ */
+ function reduceRight(collection, iteratee, accumulator) {
+ var func = isArray(collection) ? arrayReduceRight : baseReduce,
+ initAccum = arguments.length < 3;
+
+ return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEachRight);
+ }
+
+ /**
+ * The opposite of `_.filter`; this method returns the elements of `collection`
+ * that `predicate` does **not** return truthy for.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Array|Function|Object|string} [predicate=_.identity]
+ * The function invoked per iteration.
+ * @returns {Array} Returns the new filtered array.
+ * @see _.filter
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'age': 36, 'active': false },
+ * { 'user': 'fred', 'age': 40, 'active': true }
+ * ];
+ *
+ * _.reject(users, function(o) { return !o.active; });
+ * // => objects for ['fred']
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.reject(users, { 'age': 40, 'active': true });
+ * // => objects for ['barney']
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.reject(users, ['active', false]);
+ * // => objects for ['fred']
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.reject(users, 'active');
+ * // => objects for ['barney']
+ */
+ function reject(collection, predicate) {
+ var func = isArray(collection) ? arrayFilter : baseFilter;
+ predicate = getIteratee(predicate, 3);
+ return func(collection, function(value, index, collection) {
+ return !predicate(value, index, collection);
+ });
+ }
+
+ /**
+ * Gets a random element from `collection`.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.0.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to sample.
+ * @returns {*} Returns the random element.
+ * @example
+ *
+ * _.sample([1, 2, 3, 4]);
+ * // => 2
+ */
+ function sample(collection) {
+ var array = isArrayLike(collection) ? collection : values(collection),
+ length = array.length;
+
+ return length > 0 ? array[baseRandom(0, length - 1)] : undefined;
+ }
+
+ /**
+ * Gets `n` random elements at unique keys from `collection` up to the
+ * size of `collection`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to sample.
+ * @param {number} [n=1] The number of elements to sample.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {Array} Returns the random elements.
+ * @example
+ *
+ * _.sampleSize([1, 2, 3], 2);
+ * // => [3, 1]
+ *
+ * _.sampleSize([1, 2, 3], 4);
+ * // => [2, 3, 1]
+ */
+ function sampleSize(collection, n, guard) {
+ var index = -1,
+ result = toArray(collection),
+ length = result.length,
+ lastIndex = length - 1;
+
+ if ((guard ? isIterateeCall(collection, n, guard) : n === undefined)) {
+ n = 1;
+ } else {
+ n = baseClamp(toInteger(n), 0, length);
+ }
+ while (++index < n) {
+ var rand = baseRandom(index, lastIndex),
+ value = result[rand];
+
+ result[rand] = result[index];
+ result[index] = value;
+ }
+ result.length = n;
+ return result;
+ }
+
+ /**
+ * Creates an array of shuffled values, using a version of the
+ * [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher-Yates_shuffle).
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to shuffle.
+ * @returns {Array} Returns the new shuffled array.
+ * @example
+ *
+ * _.shuffle([1, 2, 3, 4]);
+ * // => [4, 1, 3, 2]
+ */
+ function shuffle(collection) {
+ return sampleSize(collection, MAX_ARRAY_LENGTH);
+ }
+
+ /**
+ * Gets the size of `collection` by returning its length for array-like
+ * values or the number of own enumerable string keyed properties for objects.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to inspect.
+ * @returns {number} Returns the collection size.
+ * @example
+ *
+ * _.size([1, 2, 3]);
+ * // => 3
+ *
+ * _.size({ 'a': 1, 'b': 2 });
+ * // => 2
+ *
+ * _.size('pebbles');
+ * // => 7
+ */
+ function size(collection) {
+ if (collection == null) {
+ return 0;
+ }
+ if (isArrayLike(collection)) {
+ var result = collection.length;
+ return (result && isString(collection)) ? stringSize(collection) : result;
+ }
+ if (isObjectLike(collection)) {
+ var tag = getTag(collection);
+ if (tag == mapTag || tag == setTag) {
+ return collection.size;
+ }
+ }
+ return keys(collection).length;
+ }
+
+ /**
+ * Checks if `predicate` returns truthy for **any** element of `collection`.
+ * Iteration is stopped once `predicate` returns truthy. The predicate is
+ * invoked with three arguments: (value, index|key, collection).
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Array|Function|Object|string} [predicate=_.identity]
+ * The function invoked per iteration.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {boolean} Returns `true` if any element passes the predicate check,
+ * else `false`.
+ * @example
+ *
+ * _.some([null, 0, 'yes', false], Boolean);
+ * // => true
+ *
+ * var users = [
+ * { 'user': 'barney', 'active': true },
+ * { 'user': 'fred', 'active': false }
+ * ];
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.some(users, { 'user': 'barney', 'active': false });
+ * // => false
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.some(users, ['active', false]);
+ * // => true
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.some(users, 'active');
+ * // => true
+ */
+ function some(collection, predicate, guard) {
+ var func = isArray(collection) ? arraySome : baseSome;
+ if (guard && isIterateeCall(collection, predicate, guard)) {
+ predicate = undefined;
+ }
+ return func(collection, getIteratee(predicate, 3));
+ }
+
+ /**
+ * Creates an array of elements, sorted in ascending order by the results of
+ * running each element in a collection thru each iteratee. This method
+ * performs a stable sort, that is, it preserves the original sort order of
+ * equal elements. The iteratees are invoked with one argument: (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {...(Array|Array[]|Function|Function[]|Object|Object[]|string|string[])}
+ * [iteratees=[_.identity]] The iteratees to sort by.
+ * @returns {Array} Returns the new sorted array.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'fred', 'age': 48 },
+ * { 'user': 'barney', 'age': 36 },
+ * { 'user': 'fred', 'age': 40 },
+ * { 'user': 'barney', 'age': 34 }
+ * ];
+ *
+ * _.sortBy(users, function(o) { return o.user; });
+ * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]
+ *
+ * _.sortBy(users, ['user', 'age']);
+ * // => objects for [['barney', 34], ['barney', 36], ['fred', 40], ['fred', 48]]
+ *
+ * _.sortBy(users, 'user', function(o) {
+ * return Math.floor(o.age / 10);
+ * });
+ * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]
+ */
+ var sortBy = rest(function(collection, iteratees) {
+ if (collection == null) {
+ return [];
+ }
+ var length = iteratees.length;
+ if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) {
+ iteratees = [];
+ } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) {
+ iteratees = [iteratees[0]];
+ }
+ iteratees = (iteratees.length == 1 && isArray(iteratees[0]))
+ ? iteratees[0]
+ : baseFlatten(iteratees, 1, isFlattenableIteratee);
+
+ return baseOrderBy(collection, iteratees, []);
+ });
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Gets the timestamp of the number of milliseconds that have elapsed since
+ * the Unix epoch (1 January 1970 00:00:00 UTC).
+ *
+ * @static
+ * @memberOf _
+ * @since 2.4.0
+ * @type {Function}
+ * @category Date
+ * @returns {number} Returns the timestamp.
+ * @example
+ *
+ * _.defer(function(stamp) {
+ * console.log(_.now() - stamp);
+ * }, _.now());
+ * // => Logs the number of milliseconds it took for the deferred function to be invoked.
+ */
+ var now = Date.now;
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * The opposite of `_.before`; this method creates a function that invokes
+ * `func` once it's called `n` or more times.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Function
+ * @param {number} n The number of calls before `func` is invoked.
+ * @param {Function} func The function to restrict.
+ * @returns {Function} Returns the new restricted function.
+ * @example
+ *
+ * var saves = ['profile', 'settings'];
+ *
+ * var done = _.after(saves.length, function() {
+ * console.log('done saving!');
+ * });
+ *
+ * _.forEach(saves, function(type) {
+ * asyncSave({ 'type': type, 'complete': done });
+ * });
+ * // => Logs 'done saving!' after the two async saves have completed.
+ */
+ function after(n, func) {
+ if (typeof func != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ n = toInteger(n);
+ return function() {
+ if (--n < 1) {
+ return func.apply(this, arguments);
+ }
+ };
+ }
+
+ /**
+ * Creates a function that invokes `func`, with up to `n` arguments,
+ * ignoring any additional arguments.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Function
+ * @param {Function} func The function to cap arguments for.
+ * @param {number} [n=func.length] The arity cap.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * _.map(['6', '8', '10'], _.ary(parseInt, 1));
+ * // => [6, 8, 10]
+ */
+ function ary(func, n, guard) {
+ n = guard ? undefined : n;
+ n = (func && n == null) ? func.length : n;
+ return createWrapper(func, ARY_FLAG, undefined, undefined, undefined, undefined, n);
+ }
+
+ /**
+ * Creates a function that invokes `func`, with the `this` binding and arguments
+ * of the created function, while it's called less than `n` times. Subsequent
+ * calls to the created function return the result of the last `func` invocation.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Function
+ * @param {number} n The number of calls at which `func` is no longer invoked.
+ * @param {Function} func The function to restrict.
+ * @returns {Function} Returns the new restricted function.
+ * @example
+ *
+ * jQuery(element).on('click', _.before(5, addContactToList));
+ * // => allows adding up to 4 contacts to the list
+ */
+ function before(n, func) {
+ var result;
+ if (typeof func != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ n = toInteger(n);
+ return function() {
+ if (--n > 0) {
+ result = func.apply(this, arguments);
+ }
+ if (n <= 1) {
+ func = undefined;
+ }
+ return result;
+ };
+ }
+
+ /**
+ * Creates a function that invokes `func` with the `this` binding of `thisArg`
+ * and `partials` prepended to the arguments it receives.
+ *
+ * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds,
+ * may be used as a placeholder for partially applied arguments.
+ *
+ * **Note:** Unlike native `Function#bind` this method doesn't set the "length"
+ * property of bound functions.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Function
+ * @param {Function} func The function to bind.
+ * @param {*} thisArg The `this` binding of `func`.
+ * @param {...*} [partials] The arguments to be partially applied.
+ * @returns {Function} Returns the new bound function.
+ * @example
+ *
+ * var greet = function(greeting, punctuation) {
+ * return greeting + ' ' + this.user + punctuation;
+ * };
+ *
+ * var object = { 'user': 'fred' };
+ *
+ * var bound = _.bind(greet, object, 'hi');
+ * bound('!');
+ * // => 'hi fred!'
+ *
+ * // Bound with placeholders.
+ * var bound = _.bind(greet, object, _, '!');
+ * bound('hi');
+ * // => 'hi fred!'
+ */
+ var bind = rest(function(func, thisArg, partials) {
+ var bitmask = BIND_FLAG;
+ if (partials.length) {
+ var holders = replaceHolders(partials, getPlaceholder(bind));
+ bitmask |= PARTIAL_FLAG;
+ }
+ return createWrapper(func, bitmask, thisArg, partials, holders);
+ });
+
+ /**
+ * Creates a function that invokes the method at `object[key]` with `partials`
+ * prepended to the arguments it receives.
+ *
+ * This method differs from `_.bind` by allowing bound functions to reference
+ * methods that may be redefined or don't yet exist. See
+ * [Peter Michaux's article](http://peter.michaux.ca/articles/lazy-function-definition-pattern)
+ * for more details.
+ *
+ * The `_.bindKey.placeholder` value, which defaults to `_` in monolithic
+ * builds, may be used as a placeholder for partially applied arguments.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.10.0
+ * @category Function
+ * @param {Object} object The object to invoke the method on.
+ * @param {string} key The key of the method.
+ * @param {...*} [partials] The arguments to be partially applied.
+ * @returns {Function} Returns the new bound function.
+ * @example
+ *
+ * var object = {
+ * 'user': 'fred',
+ * 'greet': function(greeting, punctuation) {
+ * return greeting + ' ' + this.user + punctuation;
+ * }
+ * };
+ *
+ * var bound = _.bindKey(object, 'greet', 'hi');
+ * bound('!');
+ * // => 'hi fred!'
+ *
+ * object.greet = function(greeting, punctuation) {
+ * return greeting + 'ya ' + this.user + punctuation;
+ * };
+ *
+ * bound('!');
+ * // => 'hiya fred!'
+ *
+ * // Bound with placeholders.
+ * var bound = _.bindKey(object, 'greet', _, '!');
+ * bound('hi');
+ * // => 'hiya fred!'
+ */
+ var bindKey = rest(function(object, key, partials) {
+ var bitmask = BIND_FLAG | BIND_KEY_FLAG;
+ if (partials.length) {
+ var holders = replaceHolders(partials, getPlaceholder(bindKey));
+ bitmask |= PARTIAL_FLAG;
+ }
+ return createWrapper(key, bitmask, object, partials, holders);
+ });
+
+ /**
+ * Creates a function that accepts arguments of `func` and either invokes
+ * `func` returning its result, if at least `arity` number of arguments have
+ * been provided, or returns a function that accepts the remaining `func`
+ * arguments, and so on. The arity of `func` may be specified if `func.length`
+ * is not sufficient.
+ *
+ * The `_.curry.placeholder` value, which defaults to `_` in monolithic builds,
+ * may be used as a placeholder for provided arguments.
+ *
+ * **Note:** This method doesn't set the "length" property of curried functions.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.0.0
+ * @category Function
+ * @param {Function} func The function to curry.
+ * @param {number} [arity=func.length] The arity of `func`.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {Function} Returns the new curried function.
+ * @example
+ *
+ * var abc = function(a, b, c) {
+ * return [a, b, c];
+ * };
+ *
+ * var curried = _.curry(abc);
+ *
+ * curried(1)(2)(3);
+ * // => [1, 2, 3]
+ *
+ * curried(1, 2)(3);
+ * // => [1, 2, 3]
+ *
+ * curried(1, 2, 3);
+ * // => [1, 2, 3]
+ *
+ * // Curried with placeholders.
+ * curried(1)(_, 3)(2);
+ * // => [1, 2, 3]
+ */
+ function curry(func, arity, guard) {
+ arity = guard ? undefined : arity;
+ var result = createWrapper(func, CURRY_FLAG, undefined, undefined, undefined, undefined, undefined, arity);
+ result.placeholder = curry.placeholder;
+ return result;
+ }
+
+ /**
+ * This method is like `_.curry` except that arguments are applied to `func`
+ * in the manner of `_.partialRight` instead of `_.partial`.
+ *
+ * The `_.curryRight.placeholder` value, which defaults to `_` in monolithic
+ * builds, may be used as a placeholder for provided arguments.
+ *
+ * **Note:** This method doesn't set the "length" property of curried functions.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Function
+ * @param {Function} func The function to curry.
+ * @param {number} [arity=func.length] The arity of `func`.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {Function} Returns the new curried function.
+ * @example
+ *
+ * var abc = function(a, b, c) {
+ * return [a, b, c];
+ * };
+ *
+ * var curried = _.curryRight(abc);
+ *
+ * curried(3)(2)(1);
+ * // => [1, 2, 3]
+ *
+ * curried(2, 3)(1);
+ * // => [1, 2, 3]
+ *
+ * curried(1, 2, 3);
+ * // => [1, 2, 3]
+ *
+ * // Curried with placeholders.
+ * curried(3)(1, _)(2);
+ * // => [1, 2, 3]
+ */
+ function curryRight(func, arity, guard) {
+ arity = guard ? undefined : arity;
+ var result = createWrapper(func, CURRY_RIGHT_FLAG, undefined, undefined, undefined, undefined, undefined, arity);
+ result.placeholder = curryRight.placeholder;
+ return result;
+ }
+
+ /**
+ * Creates a debounced function that delays invoking `func` until after `wait`
+ * milliseconds have elapsed since the last time the debounced function was
+ * invoked. The debounced function comes with a `cancel` method to cancel
+ * delayed `func` invocations and a `flush` method to immediately invoke them.
+ * Provide an options object to indicate whether `func` should be invoked on
+ * the leading and/or trailing edge of the `wait` timeout. The `func` is invoked
+ * with the last arguments provided to the debounced function. Subsequent calls
+ * to the debounced function return the result of the last `func` invocation.
+ *
+ * **Note:** If `leading` and `trailing` options are `true`, `func` is invoked
+ * on the trailing edge of the timeout only if the debounced function is
+ * invoked more than once during the `wait` timeout.
+ *
+ * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
+ * for details over the differences between `_.debounce` and `_.throttle`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Function
+ * @param {Function} func The function to debounce.
+ * @param {number} [wait=0] The number of milliseconds to delay.
+ * @param {Object} [options={}] The options object.
+ * @param {boolean} [options.leading=false]
+ * Specify invoking on the leading edge of the timeout.
+ * @param {number} [options.maxWait]
+ * The maximum time `func` is allowed to be delayed before it's invoked.
+ * @param {boolean} [options.trailing=true]
+ * Specify invoking on the trailing edge of the timeout.
+ * @returns {Function} Returns the new debounced function.
+ * @example
+ *
+ * // Avoid costly calculations while the window size is in flux.
+ * jQuery(window).on('resize', _.debounce(calculateLayout, 150));
+ *
+ * // Invoke `sendMail` when clicked, debouncing subsequent calls.
+ * jQuery(element).on('click', _.debounce(sendMail, 300, {
+ * 'leading': true,
+ * 'trailing': false
+ * }));
+ *
+ * // Ensure `batchLog` is invoked once after 1 second of debounced calls.
+ * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });
+ * var source = new EventSource('/stream');
+ * jQuery(source).on('message', debounced);
+ *
+ * // Cancel the trailing debounced invocation.
+ * jQuery(window).on('popstate', debounced.cancel);
+ */
+ function debounce(func, wait, options) {
+ var lastArgs,
+ lastThis,
+ maxWait,
+ result,
+ timerId,
+ lastCallTime = 0,
+ lastInvokeTime = 0,
+ leading = false,
+ maxing = false,
+ trailing = true;
+
+ if (typeof func != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ wait = toNumber(wait) || 0;
+ if (isObject(options)) {
+ leading = !!options.leading;
+ maxing = 'maxWait' in options;
+ maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
+ trailing = 'trailing' in options ? !!options.trailing : trailing;
+ }
+
+ function invokeFunc(time) {
+ var args = lastArgs,
+ thisArg = lastThis;
+
+ lastArgs = lastThis = undefined;
+ lastInvokeTime = time;
+ result = func.apply(thisArg, args);
+ return result;
+ }
+
+ function leadingEdge(time) {
+ // Reset any `maxWait` timer.
+ lastInvokeTime = time;
+ // Start the timer for the trailing edge.
+ timerId = setTimeout(timerExpired, wait);
+ // Invoke the leading edge.
+ return leading ? invokeFunc(time) : result;
+ }
+
+ function remainingWait(time) {
+ var timeSinceLastCall = time - lastCallTime,
+ timeSinceLastInvoke = time - lastInvokeTime,
+ result = wait - timeSinceLastCall;
+
+ return maxing ? nativeMin(result, maxWait - timeSinceLastInvoke) : result;
+ }
+
+ function shouldInvoke(time) {
+ var timeSinceLastCall = time - lastCallTime,
+ timeSinceLastInvoke = time - lastInvokeTime;
+
+ // Either this is the first call, activity has stopped and we're at the
+ // trailing edge, the system time has gone backwards and we're treating
+ // it as the trailing edge, or we've hit the `maxWait` limit.
+ return (!lastCallTime || (timeSinceLastCall >= wait) ||
+ (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));
+ }
+
+ function timerExpired() {
+ var time = now();
+ if (shouldInvoke(time)) {
+ return trailingEdge(time);
+ }
+ // Restart the timer.
+ timerId = setTimeout(timerExpired, remainingWait(time));
+ }
+
+ function trailingEdge(time) {
+ clearTimeout(timerId);
+ timerId = undefined;
+
+ // Only invoke if we have `lastArgs` which means `func` has been
+ // debounced at least once.
+ if (trailing && lastArgs) {
+ return invokeFunc(time);
+ }
+ lastArgs = lastThis = undefined;
+ return result;
+ }
+
+ function cancel() {
+ if (timerId !== undefined) {
+ clearTimeout(timerId);
+ }
+ lastCallTime = lastInvokeTime = 0;
+ lastArgs = lastThis = timerId = undefined;
+ }
+
+ function flush() {
+ return timerId === undefined ? result : trailingEdge(now());
+ }
+
+ function debounced() {
+ var time = now(),
+ isInvoking = shouldInvoke(time);
+
+ lastArgs = arguments;
+ lastThis = this;
+ lastCallTime = time;
+
+ if (isInvoking) {
+ if (timerId === undefined) {
+ return leadingEdge(lastCallTime);
+ }
+ if (maxing) {
+ // Handle invocations in a tight loop.
+ clearTimeout(timerId);
+ timerId = setTimeout(timerExpired, wait);
+ return invokeFunc(lastCallTime);
+ }
+ }
+ if (timerId === undefined) {
+ timerId = setTimeout(timerExpired, wait);
+ }
+ return result;
+ }
+ debounced.cancel = cancel;
+ debounced.flush = flush;
+ return debounced;
+ }
+
+ /**
+ * Defers invoking the `func` until the current call stack has cleared. Any
+ * additional arguments are provided to `func` when it's invoked.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Function
+ * @param {Function} func The function to defer.
+ * @param {...*} [args] The arguments to invoke `func` with.
+ * @returns {number} Returns the timer id.
+ * @example
+ *
+ * _.defer(function(text) {
+ * console.log(text);
+ * }, 'deferred');
+ * // => Logs 'deferred' after one or more milliseconds.
+ */
+ var defer = rest(function(func, args) {
+ return baseDelay(func, 1, args);
+ });
+
+ /**
+ * Invokes `func` after `wait` milliseconds. Any additional arguments are
+ * provided to `func` when it's invoked.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Function
+ * @param {Function} func The function to delay.
+ * @param {number} wait The number of milliseconds to delay invocation.
+ * @param {...*} [args] The arguments to invoke `func` with.
+ * @returns {number} Returns the timer id.
+ * @example
+ *
+ * _.delay(function(text) {
+ * console.log(text);
+ * }, 1000, 'later');
+ * // => Logs 'later' after one second.
+ */
+ var delay = rest(function(func, wait, args) {
+ return baseDelay(func, toNumber(wait) || 0, args);
+ });
+
+ /**
+ * Creates a function that invokes `func` with arguments reversed.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Function
+ * @param {Function} func The function to flip arguments for.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * var flipped = _.flip(function() {
+ * return _.toArray(arguments);
+ * });
+ *
+ * flipped('a', 'b', 'c', 'd');
+ * // => ['d', 'c', 'b', 'a']
+ */
+ function flip(func) {
+ return createWrapper(func, FLIP_FLAG);
+ }
+
+ /**
+ * Creates a function that memoizes the result of `func`. If `resolver` is
+ * provided, it determines the cache key for storing the result based on the
+ * arguments provided to the memoized function. By default, the first argument
+ * provided to the memoized function is used as the map cache key. The `func`
+ * is invoked with the `this` binding of the memoized function.
+ *
+ * **Note:** The cache is exposed as the `cache` property on the memoized
+ * function. Its creation may be customized by replacing the `_.memoize.Cache`
+ * constructor with one whose instances implement the
+ * [`Map`](http://ecma-international.org/ecma-262/6.0/#sec-properties-of-the-map-prototype-object)
+ * method interface of `delete`, `get`, `has`, and `set`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Function
+ * @param {Function} func The function to have its output memoized.
+ * @param {Function} [resolver] The function to resolve the cache key.
+ * @returns {Function} Returns the new memoizing function.
+ * @example
+ *
+ * var object = { 'a': 1, 'b': 2 };
+ * var other = { 'c': 3, 'd': 4 };
+ *
+ * var values = _.memoize(_.values);
+ * values(object);
+ * // => [1, 2]
+ *
+ * values(other);
+ * // => [3, 4]
+ *
+ * object.a = 2;
+ * values(object);
+ * // => [1, 2]
+ *
+ * // Modify the result cache.
+ * values.cache.set(object, ['a', 'b']);
+ * values(object);
+ * // => ['a', 'b']
+ *
+ * // Replace `_.memoize.Cache`.
+ * _.memoize.Cache = WeakMap;
+ */
+ function memoize(func, resolver) {
+ if (typeof func != 'function' || (resolver && typeof resolver != 'function')) {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ var memoized = function() {
+ var args = arguments,
+ key = resolver ? resolver.apply(this, args) : args[0],
+ cache = memoized.cache;
+
+ if (cache.has(key)) {
+ return cache.get(key);
+ }
+ var result = func.apply(this, args);
+ memoized.cache = cache.set(key, result);
+ return result;
+ };
+ memoized.cache = new (memoize.Cache || MapCache);
+ return memoized;
+ }
+
+ // Assign cache to `_.memoize`.
+ memoize.Cache = MapCache;
+
+ /**
+ * Creates a function that negates the result of the predicate `func`. The
+ * `func` predicate is invoked with the `this` binding and arguments of the
+ * created function.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Function
+ * @param {Function} predicate The predicate to negate.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * function isEven(n) {
+ * return n % 2 == 0;
+ * }
+ *
+ * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven));
+ * // => [1, 3, 5]
+ */
+ function negate(predicate) {
+ if (typeof predicate != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ return function() {
+ return !predicate.apply(this, arguments);
+ };
+ }
+
+ /**
+ * Creates a function that is restricted to invoking `func` once. Repeat calls
+ * to the function return the value of the first invocation. The `func` is
+ * invoked with the `this` binding and arguments of the created function.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Function
+ * @param {Function} func The function to restrict.
+ * @returns {Function} Returns the new restricted function.
+ * @example
+ *
+ * var initialize = _.once(createApplication);
+ * initialize();
+ * initialize();
+ * // `initialize` invokes `createApplication` once
+ */
+ function once(func) {
+ return before(2, func);
+ }
+
+ /**
+ * Creates a function that invokes `func` with arguments transformed by
+ * corresponding `transforms`.
+ *
+ * @static
+ * @since 4.0.0
+ * @memberOf _
+ * @category Function
+ * @param {Function} func The function to wrap.
+ * @param {...(Array|Array[]|Function|Function[]|Object|Object[]|string|string[])}
+ * [transforms[_.identity]] The functions to transform.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * function doubled(n) {
+ * return n * 2;
+ * }
+ *
+ * function square(n) {
+ * return n * n;
+ * }
+ *
+ * var func = _.overArgs(function(x, y) {
+ * return [x, y];
+ * }, square, doubled);
+ *
+ * func(9, 3);
+ * // => [81, 6]
+ *
+ * func(10, 5);
+ * // => [100, 10]
+ */
+ var overArgs = rest(function(func, transforms) {
+ transforms = (transforms.length == 1 && isArray(transforms[0]))
+ ? arrayMap(transforms[0], baseUnary(getIteratee()))
+ : arrayMap(baseFlatten(transforms, 1, isFlattenableIteratee), baseUnary(getIteratee()));
+
+ var funcsLength = transforms.length;
+ return rest(function(args) {
+ var index = -1,
+ length = nativeMin(args.length, funcsLength);
+
+ while (++index < length) {
+ args[index] = transforms[index].call(this, args[index]);
+ }
+ return apply(func, this, args);
+ });
+ });
+
+ /**
+ * Creates a function that invokes `func` with `partials` prepended to the
+ * arguments it receives. This method is like `_.bind` except it does **not**
+ * alter the `this` binding.
+ *
+ * The `_.partial.placeholder` value, which defaults to `_` in monolithic
+ * builds, may be used as a placeholder for partially applied arguments.
+ *
+ * **Note:** This method doesn't set the "length" property of partially
+ * applied functions.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.2.0
+ * @category Function
+ * @param {Function} func The function to partially apply arguments to.
+ * @param {...*} [partials] The arguments to be partially applied.
+ * @returns {Function} Returns the new partially applied function.
+ * @example
+ *
+ * var greet = function(greeting, name) {
+ * return greeting + ' ' + name;
+ * };
+ *
+ * var sayHelloTo = _.partial(greet, 'hello');
+ * sayHelloTo('fred');
+ * // => 'hello fred'
+ *
+ * // Partially applied with placeholders.
+ * var greetFred = _.partial(greet, _, 'fred');
+ * greetFred('hi');
+ * // => 'hi fred'
+ */
+ var partial = rest(function(func, partials) {
+ var holders = replaceHolders(partials, getPlaceholder(partial));
+ return createWrapper(func, PARTIAL_FLAG, undefined, partials, holders);
+ });
+
+ /**
+ * This method is like `_.partial` except that partially applied arguments
+ * are appended to the arguments it receives.
+ *
+ * The `_.partialRight.placeholder` value, which defaults to `_` in monolithic
+ * builds, may be used as a placeholder for partially applied arguments.
+ *
+ * **Note:** This method doesn't set the "length" property of partially
+ * applied functions.
+ *
+ * @static
+ * @memberOf _
+ * @since 1.0.0
+ * @category Function
+ * @param {Function} func The function to partially apply arguments to.
+ * @param {...*} [partials] The arguments to be partially applied.
+ * @returns {Function} Returns the new partially applied function.
+ * @example
+ *
+ * var greet = function(greeting, name) {
+ * return greeting + ' ' + name;
+ * };
+ *
+ * var greetFred = _.partialRight(greet, 'fred');
+ * greetFred('hi');
+ * // => 'hi fred'
+ *
+ * // Partially applied with placeholders.
+ * var sayHelloTo = _.partialRight(greet, 'hello', _);
+ * sayHelloTo('fred');
+ * // => 'hello fred'
+ */
+ var partialRight = rest(function(func, partials) {
+ var holders = replaceHolders(partials, getPlaceholder(partialRight));
+ return createWrapper(func, PARTIAL_RIGHT_FLAG, undefined, partials, holders);
+ });
+
+ /**
+ * Creates a function that invokes `func` with arguments arranged according
+ * to the specified `indexes` where the argument value at the first index is
+ * provided as the first argument, the argument value at the second index is
+ * provided as the second argument, and so on.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Function
+ * @param {Function} func The function to rearrange arguments for.
+ * @param {...(number|number[])} indexes The arranged argument indexes.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * var rearged = _.rearg(function(a, b, c) {
+ * return [a, b, c];
+ * }, 2, 0, 1);
+ *
+ * rearged('b', 'c', 'a')
+ * // => ['a', 'b', 'c']
+ */
+ var rearg = rest(function(func, indexes) {
+ return createWrapper(func, REARG_FLAG, undefined, undefined, undefined, baseFlatten(indexes, 1));
+ });
+
+ /**
+ * Creates a function that invokes `func` with the `this` binding of the
+ * created function and arguments from `start` and beyond provided as
+ * an array.
+ *
+ * **Note:** This method is based on the
+ * [rest parameter](https://mdn.io/rest_parameters).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Function
+ * @param {Function} func The function to apply a rest parameter to.
+ * @param {number} [start=func.length-1] The start position of the rest parameter.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * var say = _.rest(function(what, names) {
+ * return what + ' ' + _.initial(names).join(', ') +
+ * (_.size(names) > 1 ? ', & ' : '') + _.last(names);
+ * });
+ *
+ * say('hello', 'fred', 'barney', 'pebbles');
+ * // => 'hello fred, barney, & pebbles'
+ */
+ function rest(func, start) {
+ if (typeof func != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ start = nativeMax(start === undefined ? (func.length - 1) : toInteger(start), 0);
+ return function() {
+ var args = arguments,
+ index = -1,
+ length = nativeMax(args.length - start, 0),
+ array = Array(length);
+
+ while (++index < length) {
+ array[index] = args[start + index];
+ }
+ switch (start) {
+ case 0: return func.call(this, array);
+ case 1: return func.call(this, args[0], array);
+ case 2: return func.call(this, args[0], args[1], array);
+ }
+ var otherArgs = Array(start + 1);
+ index = -1;
+ while (++index < start) {
+ otherArgs[index] = args[index];
+ }
+ otherArgs[start] = array;
+ return apply(func, this, otherArgs);
+ };
+ }
+
+ /**
+ * Creates a function that invokes `func` with the `this` binding of the
+ * create function and an array of arguments much like
+ * [`Function#apply`](http://www.ecma-international.org/ecma-262/6.0/#sec-function.prototype.apply).
+ *
+ * **Note:** This method is based on the
+ * [spread operator](https://mdn.io/spread_operator).
+ *
+ * @static
+ * @memberOf _
+ * @since 3.2.0
+ * @category Function
+ * @param {Function} func The function to spread arguments over.
+ * @param {number} [start=0] The start position of the spread.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * var say = _.spread(function(who, what) {
+ * return who + ' says ' + what;
+ * });
+ *
+ * say(['fred', 'hello']);
+ * // => 'fred says hello'
+ *
+ * var numbers = Promise.all([
+ * Promise.resolve(40),
+ * Promise.resolve(36)
+ * ]);
+ *
+ * numbers.then(_.spread(function(x, y) {
+ * return x + y;
+ * }));
+ * // => a Promise of 76
+ */
+ function spread(func, start) {
+ if (typeof func != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ start = start === undefined ? 0 : nativeMax(toInteger(start), 0);
+ return rest(function(args) {
+ var array = args[start],
+ otherArgs = castSlice(args, 0, start);
+
+ if (array) {
+ arrayPush(otherArgs, array);
+ }
+ return apply(func, this, otherArgs);
+ });
+ }
+
+ /**
+ * Creates a throttled function that only invokes `func` at most once per
+ * every `wait` milliseconds. The throttled function comes with a `cancel`
+ * method to cancel delayed `func` invocations and a `flush` method to
+ * immediately invoke them. Provide an options object to indicate whether
+ * `func` should be invoked on the leading and/or trailing edge of the `wait`
+ * timeout. The `func` is invoked with the last arguments provided to the
+ * throttled function. Subsequent calls to the throttled function return the
+ * result of the last `func` invocation.
+ *
+ * **Note:** If `leading` and `trailing` options are `true`, `func` is
+ * invoked on the trailing edge of the timeout only if the throttled function
+ * is invoked more than once during the `wait` timeout.
+ *
+ * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
+ * for details over the differences between `_.throttle` and `_.debounce`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Function
+ * @param {Function} func The function to throttle.
+ * @param {number} [wait=0] The number of milliseconds to throttle invocations to.
+ * @param {Object} [options={}] The options object.
+ * @param {boolean} [options.leading=true]
+ * Specify invoking on the leading edge of the timeout.
+ * @param {boolean} [options.trailing=true]
+ * Specify invoking on the trailing edge of the timeout.
+ * @returns {Function} Returns the new throttled function.
+ * @example
+ *
+ * // Avoid excessively updating the position while scrolling.
+ * jQuery(window).on('scroll', _.throttle(updatePosition, 100));
+ *
+ * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.
+ * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });
+ * jQuery(element).on('click', throttled);
+ *
+ * // Cancel the trailing throttled invocation.
+ * jQuery(window).on('popstate', throttled.cancel);
+ */
+ function throttle(func, wait, options) {
+ var leading = true,
+ trailing = true;
+
+ if (typeof func != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ if (isObject(options)) {
+ leading = 'leading' in options ? !!options.leading : leading;
+ trailing = 'trailing' in options ? !!options.trailing : trailing;
+ }
+ return debounce(func, wait, {
+ 'leading': leading,
+ 'maxWait': wait,
+ 'trailing': trailing
+ });
+ }
+
+ /**
+ * Creates a function that accepts up to one argument, ignoring any
+ * additional arguments.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Function
+ * @param {Function} func The function to cap arguments for.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * _.map(['6', '8', '10'], _.unary(parseInt));
+ * // => [6, 8, 10]
+ */
+ function unary(func) {
+ return ary(func, 1);
+ }
+
+ /**
+ * Creates a function that provides `value` to the wrapper function as its
+ * first argument. Any additional arguments provided to the function are
+ * appended to those provided to the wrapper function. The wrapper is invoked
+ * with the `this` binding of the created function.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Function
+ * @param {*} value The value to wrap.
+ * @param {Function} [wrapper=identity] The wrapper function.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * var p = _.wrap(_.escape, function(func, text) {
+ * return '<p>' + func(text) + '</p>';
+ * });
+ *
+ * p('fred, barney, & pebbles');
+ * // => '<p>fred, barney, & pebbles</p>'
+ */
+ function wrap(value, wrapper) {
+ wrapper = wrapper == null ? identity : wrapper;
+ return partial(wrapper, value);
+ }
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Casts `value` as an array if it's not one.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.4.0
+ * @category Lang
+ * @param {*} value The value to inspect.
+ * @returns {Array} Returns the cast array.
+ * @example
+ *
+ * _.castArray(1);
+ * // => [1]
+ *
+ * _.castArray({ 'a': 1 });
+ * // => [{ 'a': 1 }]
+ *
+ * _.castArray('abc');
+ * // => ['abc']
+ *
+ * _.castArray(null);
+ * // => [null]
+ *
+ * _.castArray(undefined);
+ * // => [undefined]
+ *
+ * _.castArray();
+ * // => []
+ *
+ * var array = [1, 2, 3];
+ * console.log(_.castArray(array) === array);
+ * // => true
+ */
+ function castArray() {
+ if (!arguments.length) {
+ return [];
+ }
+ var value = arguments[0];
+ return isArray(value) ? value : [value];
+ }
+
+ /**
+ * Creates a shallow clone of `value`.
+ *
+ * **Note:** This method is loosely based on the
+ * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm)
+ * and supports cloning arrays, array buffers, booleans, date objects, maps,
+ * numbers, `Object` objects, regexes, sets, strings, symbols, and typed
+ * arrays. The own enumerable properties of `arguments` objects are cloned
+ * as plain objects. An empty object is returned for uncloneable values such
+ * as error objects, functions, DOM nodes, and WeakMaps.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to clone.
+ * @returns {*} Returns the cloned value.
+ * @see _.cloneDeep
+ * @example
+ *
+ * var objects = [{ 'a': 1 }, { 'b': 2 }];
+ *
+ * var shallow = _.clone(objects);
+ * console.log(shallow[0] === objects[0]);
+ * // => true
+ */
+ function clone(value) {
+ return baseClone(value, false, true);
+ }
+
+ /**
+ * This method is like `_.clone` except that it accepts `customizer` which
+ * is invoked to produce the cloned value. If `customizer` returns `undefined`,
+ * cloning is handled by the method instead. The `customizer` is invoked with
+ * up to four arguments; (value [, index|key, object, stack]).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to clone.
+ * @param {Function} [customizer] The function to customize cloning.
+ * @returns {*} Returns the cloned value.
+ * @see _.cloneDeepWith
+ * @example
+ *
+ * function customizer(value) {
+ * if (_.isElement(value)) {
+ * return value.cloneNode(false);
+ * }
+ * }
+ *
+ * var el = _.cloneWith(document.body, customizer);
+ *
+ * console.log(el === document.body);
+ * // => false
+ * console.log(el.nodeName);
+ * // => 'BODY'
+ * console.log(el.childNodes.length);
+ * // => 0
+ */
+ function cloneWith(value, customizer) {
+ return baseClone(value, false, true, customizer);
+ }
+
+ /**
+ * This method is like `_.clone` except that it recursively clones `value`.
+ *
+ * @static
+ * @memberOf _
+ * @since 1.0.0
+ * @category Lang
+ * @param {*} value The value to recursively clone.
+ * @returns {*} Returns the deep cloned value.
+ * @see _.clone
+ * @example
+ *
+ * var objects = [{ 'a': 1 }, { 'b': 2 }];
+ *
+ * var deep = _.cloneDeep(objects);
+ * console.log(deep[0] === objects[0]);
+ * // => false
+ */
+ function cloneDeep(value) {
+ return baseClone(value, true, true);
+ }
+
+ /**
+ * This method is like `_.cloneWith` except that it recursively clones `value`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to recursively clone.
+ * @param {Function} [customizer] The function to customize cloning.
+ * @returns {*} Returns the deep cloned value.
+ * @see _.cloneWith
+ * @example
+ *
+ * function customizer(value) {
+ * if (_.isElement(value)) {
+ * return value.cloneNode(true);
+ * }
+ * }
+ *
+ * var el = _.cloneDeepWith(document.body, customizer);
+ *
+ * console.log(el === document.body);
+ * // => false
+ * console.log(el.nodeName);
+ * // => 'BODY'
+ * console.log(el.childNodes.length);
+ * // => 20
+ */
+ function cloneDeepWith(value, customizer) {
+ return baseClone(value, true, true, customizer);
+ }
+
+ /**
+ * Performs a
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
+ * comparison between two values to determine if they are equivalent.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
+ * @example
+ *
+ * var object = { 'user': 'fred' };
+ * var other = { 'user': 'fred' };
+ *
+ * _.eq(object, object);
+ * // => true
+ *
+ * _.eq(object, other);
+ * // => false
+ *
+ * _.eq('a', 'a');
+ * // => true
+ *
+ * _.eq('a', Object('a'));
+ * // => false
+ *
+ * _.eq(NaN, NaN);
+ * // => true
+ */
+ function eq(value, other) {
+ return value === other || (value !== value && other !== other);
+ }
+
+ /**
+ * Checks if `value` is greater than `other`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.9.0
+ * @category Lang
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @returns {boolean} Returns `true` if `value` is greater than `other`,
+ * else `false`.
+ * @see _.lt
+ * @example
+ *
+ * _.gt(3, 1);
+ * // => true
+ *
+ * _.gt(3, 3);
+ * // => false
+ *
+ * _.gt(1, 3);
+ * // => false
+ */
+ var gt = createRelationalOperation(baseGt);
+
+ /**
+ * Checks if `value` is greater than or equal to `other`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.9.0
+ * @category Lang
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @returns {boolean} Returns `true` if `value` is greater than or equal to
+ * `other`, else `false`.
+ * @see _.lte
+ * @example
+ *
+ * _.gte(3, 1);
+ * // => true
+ *
+ * _.gte(3, 3);
+ * // => true
+ *
+ * _.gte(1, 3);
+ * // => false
+ */
+ var gte = createRelationalOperation(function(value, other) {
+ return value >= other;
+ });
+
+ /**
+ * Checks if `value` is likely an `arguments` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is correctly classified,
+ * else `false`.
+ * @example
+ *
+ * _.isArguments(function() { return arguments; }());
+ * // => true
+ *
+ * _.isArguments([1, 2, 3]);
+ * // => false
+ */
+ function isArguments(value) {
+ // Safari 8.1 incorrectly makes `arguments.callee` enumerable in strict mode.
+ return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') &&
+ (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag);
+ }
+
+ /**
+ * Checks if `value` is classified as an `Array` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @type {Function}
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is correctly classified,
+ * else `false`.
+ * @example
+ *
+ * _.isArray([1, 2, 3]);
+ * // => true
+ *
+ * _.isArray(document.body.children);
+ * // => false
+ *
+ * _.isArray('abc');
+ * // => false
+ *
+ * _.isArray(_.noop);
+ * // => false
+ */
+ var isArray = Array.isArray;
+
+ /**
+ * Checks if `value` is classified as an `ArrayBuffer` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.3.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is correctly classified,
+ * else `false`.
+ * @example
+ *
+ * _.isArrayBuffer(new ArrayBuffer(2));
+ * // => true
+ *
+ * _.isArrayBuffer(new Array(2));
+ * // => false
+ */
+ function isArrayBuffer(value) {
+ return isObjectLike(value) && objectToString.call(value) == arrayBufferTag;
+ }
+
+ /**
+ * Checks if `value` is array-like. A value is considered array-like if it's
+ * not a function and has a `value.length` that's an integer greater than or
+ * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
+ * @example
+ *
+ * _.isArrayLike([1, 2, 3]);
+ * // => true
+ *
+ * _.isArrayLike(document.body.children);
+ * // => true
+ *
+ * _.isArrayLike('abc');
+ * // => true
+ *
+ * _.isArrayLike(_.noop);
+ * // => false
+ */
+ function isArrayLike(value) {
+ return value != null && isLength(getLength(value)) && !isFunction(value);
+ }
+
+ /**
+ * This method is like `_.isArrayLike` except that it also checks if `value`
+ * is an object.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an array-like object,
+ * else `false`.
+ * @example
+ *
+ * _.isArrayLikeObject([1, 2, 3]);
+ * // => true
+ *
+ * _.isArrayLikeObject(document.body.children);
+ * // => true
+ *
+ * _.isArrayLikeObject('abc');
+ * // => false
+ *
+ * _.isArrayLikeObject(_.noop);
+ * // => false
+ */
+ function isArrayLikeObject(value) {
+ return isObjectLike(value) && isArrayLike(value);
+ }
+
+ /**
+ * Checks if `value` is classified as a boolean primitive or object.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is correctly classified,
+ * else `false`.
+ * @example
+ *
+ * _.isBoolean(false);
+ * // => true
+ *
+ * _.isBoolean(null);
+ * // => false
+ */
+ function isBoolean(value) {
+ return value === true || value === false ||
+ (isObjectLike(value) && objectToString.call(value) == boolTag);
+ }
+
+ /**
+ * Checks if `value` is a buffer.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.3.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
+ * @example
+ *
+ * _.isBuffer(new Buffer(2));
+ * // => true
+ *
+ * _.isBuffer(new Uint8Array(2));
+ * // => false
+ */
+ var isBuffer = !Buffer ? constant(false) : function(value) {
+ return value instanceof Buffer;
+ };
+
+ /**
+ * Checks if `value` is classified as a `Date` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is correctly classified,
+ * else `false`.
+ * @example
+ *
+ * _.isDate(new Date);
+ * // => true
+ *
+ * _.isDate('Mon April 23 2012');
+ * // => false
+ */
+ function isDate(value) {
+ return isObjectLike(value) && objectToString.call(value) == dateTag;
+ }
+
+ /**
+ * Checks if `value` is likely a DOM element.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a DOM element,
+ * else `false`.
+ * @example
+ *
+ * _.isElement(document.body);
+ * // => true
+ *
+ * _.isElement('<body>');
+ * // => false
+ */
+ function isElement(value) {
+ return !!value && value.nodeType === 1 && isObjectLike(value) && !isPlainObject(value);
+ }
+
+ /**
+ * Checks if `value` is an empty object, collection, map, or set.
+ *
+ * Objects are considered empty if they have no own enumerable string keyed
+ * properties.
+ *
+ * Array-like values such as `arguments` objects, arrays, buffers, strings, or
+ * jQuery-like collections are considered empty if they have a `length` of `0`.
+ * Similarly, maps and sets are considered empty if they have a `size` of `0`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is empty, else `false`.
+ * @example
+ *
+ * _.isEmpty(null);
+ * // => true
+ *
+ * _.isEmpty(true);
+ * // => true
+ *
+ * _.isEmpty(1);
+ * // => true
+ *
+ * _.isEmpty([1, 2, 3]);
+ * // => false
+ *
+ * _.isEmpty({ 'a': 1 });
+ * // => false
+ */
+ function isEmpty(value) {
+ if (isArrayLike(value) &&
+ (isArray(value) || isString(value) || isFunction(value.splice) ||
+ isArguments(value) || isBuffer(value))) {
+ return !value.length;
+ }
+ if (isObjectLike(value)) {
+ var tag = getTag(value);
+ if (tag == mapTag || tag == setTag) {
+ return !value.size;
+ }
+ }
+ for (var key in value) {
+ if (hasOwnProperty.call(value, key)) {
+ return false;
+ }
+ }
+ return !(nonEnumShadows && keys(value).length);
+ }
+
+ /**
+ * Performs a deep comparison between two values to determine if they are
+ * equivalent.
+ *
+ * **Note:** This method supports comparing arrays, array buffers, booleans,
+ * date objects, error objects, maps, numbers, `Object` objects, regexes,
+ * sets, strings, symbols, and typed arrays. `Object` objects are compared
+ * by their own, not inherited, enumerable properties. Functions and DOM
+ * nodes are **not** supported.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @returns {boolean} Returns `true` if the values are equivalent,
+ * else `false`.
+ * @example
+ *
+ * var object = { 'user': 'fred' };
+ * var other = { 'user': 'fred' };
+ *
+ * _.isEqual(object, other);
+ * // => true
+ *
+ * object === other;
+ * // => false
+ */
+ function isEqual(value, other) {
+ return baseIsEqual(value, other);
+ }
+
+ /**
+ * This method is like `_.isEqual` except that it accepts `customizer` which
+ * is invoked to compare values. If `customizer` returns `undefined`, comparisons
+ * are handled by the method instead. The `customizer` is invoked with up to
+ * six arguments: (objValue, othValue [, index|key, object, other, stack]).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @param {Function} [customizer] The function to customize comparisons.
+ * @returns {boolean} Returns `true` if the values are equivalent,
+ * else `false`.
+ * @example
+ *
+ * function isGreeting(value) {
+ * return /^h(?:i|ello)$/.test(value);
+ * }
+ *
+ * function customizer(objValue, othValue) {
+ * if (isGreeting(objValue) && isGreeting(othValue)) {
+ * return true;
+ * }
+ * }
+ *
+ * var array = ['hello', 'goodbye'];
+ * var other = ['hi', 'goodbye'];
+ *
+ * _.isEqualWith(array, other, customizer);
+ * // => true
+ */
+ function isEqualWith(value, other, customizer) {
+ customizer = typeof customizer == 'function' ? customizer : undefined;
+ var result = customizer ? customizer(value, other) : undefined;
+ return result === undefined ? baseIsEqual(value, other, customizer) : !!result;
+ }
+
+ /**
+ * Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`,
+ * `SyntaxError`, `TypeError`, or `URIError` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an error object,
+ * else `false`.
+ * @example
+ *
+ * _.isError(new Error);
+ * // => true
+ *
+ * _.isError(Error);
+ * // => false
+ */
+ function isError(value) {
+ if (!isObjectLike(value)) {
+ return false;
+ }
+ return (objectToString.call(value) == errorTag) ||
+ (typeof value.message == 'string' && typeof value.name == 'string');
+ }
+
+ /**
+ * Checks if `value` is a finite primitive number.
+ *
+ * **Note:** This method is based on
+ * [`Number.isFinite`](https://mdn.io/Number/isFinite).
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a finite number,
+ * else `false`.
+ * @example
+ *
+ * _.isFinite(3);
+ * // => true
+ *
+ * _.isFinite(Number.MAX_VALUE);
+ * // => true
+ *
+ * _.isFinite(3.14);
+ * // => true
+ *
+ * _.isFinite(Infinity);
+ * // => false
+ */
+ function isFinite(value) {
+ return typeof value == 'number' && nativeIsFinite(value);
+ }
+
+ /**
+ * Checks if `value` is classified as a `Function` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is correctly classified,
+ * else `false`.
+ * @example
+ *
+ * _.isFunction(_);
+ * // => true
+ *
+ * _.isFunction(/abc/);
+ * // => false
+ */
+ function isFunction(value) {
+ // The use of `Object#toString` avoids issues with the `typeof` operator
+ // in Safari 8 which returns 'object' for typed array and weak map constructors,
+ // and PhantomJS 1.9 which returns 'function' for `NodeList` instances.
+ var tag = isObject(value) ? objectToString.call(value) : '';
+ return tag == funcTag || tag == genTag;
+ }
+
+ /**
+ * Checks if `value` is an integer.
+ *
+ * **Note:** This method is based on
+ * [`Number.isInteger`](https://mdn.io/Number/isInteger).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an integer, else `false`.
+ * @example
+ *
+ * _.isInteger(3);
+ * // => true
+ *
+ * _.isInteger(Number.MIN_VALUE);
+ * // => false
+ *
+ * _.isInteger(Infinity);
+ * // => false
+ *
+ * _.isInteger('3');
+ * // => false
+ */
+ function isInteger(value) {
+ return typeof value == 'number' && value == toInteger(value);
+ }
+
+ /**
+ * Checks if `value` is a valid array-like length.
+ *
+ * **Note:** This function is loosely based on
+ * [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a valid length,
+ * else `false`.
+ * @example
+ *
+ * _.isLength(3);
+ * // => true
+ *
+ * _.isLength(Number.MIN_VALUE);
+ * // => false
+ *
+ * _.isLength(Infinity);
+ * // => false
+ *
+ * _.isLength('3');
+ * // => false
+ */
+ function isLength(value) {
+ return typeof value == 'number' &&
+ value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
+ }
+
+ /**
+ * Checks if `value` is the
+ * [language type](http://www.ecma-international.org/ecma-262/6.0/#sec-ecmascript-language-types)
+ * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an object, else `false`.
+ * @example
+ *
+ * _.isObject({});
+ * // => true
+ *
+ * _.isObject([1, 2, 3]);
+ * // => true
+ *
+ * _.isObject(_.noop);
+ * // => true
+ *
+ * _.isObject(null);
+ * // => false
+ */
+ function isObject(value) {
+ var type = typeof value;
+ return !!value && (type == 'object' || type == 'function');
+ }
+
+ /**
+ * Checks if `value` is object-like. A value is object-like if it's not `null`
+ * and has a `typeof` result of "object".
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
+ * @example
+ *
+ * _.isObjectLike({});
+ * // => true
+ *
+ * _.isObjectLike([1, 2, 3]);
+ * // => true
+ *
+ * _.isObjectLike(_.noop);
+ * // => false
+ *
+ * _.isObjectLike(null);
+ * // => false
+ */
+ function isObjectLike(value) {
+ return !!value && typeof value == 'object';
+ }
+
+ /**
+ * Checks if `value` is classified as a `Map` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.3.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is correctly classified,
+ * else `false`.
+ * @example
+ *
+ * _.isMap(new Map);
+ * // => true
+ *
+ * _.isMap(new WeakMap);
+ * // => false
+ */
+ function isMap(value) {
+ return isObjectLike(value) && getTag(value) == mapTag;
+ }
+
+ /**
+ * Performs a partial deep comparison between `object` and `source` to
+ * determine if `object` contains equivalent property values. This method is
+ * equivalent to a `_.matches` function when `source` is partially applied.
+ *
+ * **Note:** This method supports comparing the same values as `_.isEqual`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Lang
+ * @param {Object} object The object to inspect.
+ * @param {Object} source The object of property values to match.
+ * @returns {boolean} Returns `true` if `object` is a match, else `false`.
+ * @example
+ *
+ * var object = { 'user': 'fred', 'age': 40 };
+ *
+ * _.isMatch(object, { 'age': 40 });
+ * // => true
+ *
+ * _.isMatch(object, { 'age': 36 });
+ * // => false
+ */
+ function isMatch(object, source) {
+ return object === source || baseIsMatch(object, source, getMatchData(source));
+ }
+
+ /**
+ * This method is like `_.isMatch` except that it accepts `customizer` which
+ * is invoked to compare values. If `customizer` returns `undefined`, comparisons
+ * are handled by the method instead. The `customizer` is invoked with five
+ * arguments: (objValue, srcValue, index|key, object, source).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {Object} object The object to inspect.
+ * @param {Object} source The object of property values to match.
+ * @param {Function} [customizer] The function to customize comparisons.
+ * @returns {boolean} Returns `true` if `object` is a match, else `false`.
+ * @example
+ *
+ * function isGreeting(value) {
+ * return /^h(?:i|ello)$/.test(value);
+ * }
+ *
+ * function customizer(objValue, srcValue) {
+ * if (isGreeting(objValue) && isGreeting(srcValue)) {
+ * return true;
+ * }
+ * }
+ *
+ * var object = { 'greeting': 'hello' };
+ * var source = { 'greeting': 'hi' };
+ *
+ * _.isMatchWith(object, source, customizer);
+ * // => true
+ */
+ function isMatchWith(object, source, customizer) {
+ customizer = typeof customizer == 'function' ? customizer : undefined;
+ return baseIsMatch(object, source, getMatchData(source), customizer);
+ }
+
+ /**
+ * Checks if `value` is `NaN`.
+ *
+ * **Note:** This method is based on
+ * [`Number.isNaN`](https://mdn.io/Number/isNaN) and is not the same as
+ * global [`isNaN`](https://mdn.io/isNaN) which returns `true` for
+ * `undefined` and other non-number values.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.
+ * @example
+ *
+ * _.isNaN(NaN);
+ * // => true
+ *
+ * _.isNaN(new Number(NaN));
+ * // => true
+ *
+ * isNaN(undefined);
+ * // => true
+ *
+ * _.isNaN(undefined);
+ * // => false
+ */
+ function isNaN(value) {
+ // An `NaN` primitive is the only value that is not equal to itself.
+ // Perform the `toStringTag` check first to avoid errors with some
+ // ActiveX objects in IE.
+ return isNumber(value) && value != +value;
+ }
+
+ /**
+ * Checks if `value` is a native function.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a native function,
+ * else `false`.
+ * @example
+ *
+ * _.isNative(Array.prototype.push);
+ * // => true
+ *
+ * _.isNative(_);
+ * // => false
+ */
+ function isNative(value) {
+ if (!isObject(value)) {
+ return false;
+ }
+ var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor;
+ return pattern.test(toSource(value));
+ }
+
+ /**
+ * Checks if `value` is `null`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is `null`, else `false`.
+ * @example
+ *
+ * _.isNull(null);
+ * // => true
+ *
+ * _.isNull(void 0);
+ * // => false
+ */
+ function isNull(value) {
+ return value === null;
+ }
+
+ /**
+ * Checks if `value` is `null` or `undefined`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is nullish, else `false`.
+ * @example
+ *
+ * _.isNil(null);
+ * // => true
+ *
+ * _.isNil(void 0);
+ * // => true
+ *
+ * _.isNil(NaN);
+ * // => false
+ */
+ function isNil(value) {
+ return value == null;
+ }
+
+ /**
+ * Checks if `value` is classified as a `Number` primitive or object.
+ *
+ * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are
+ * classified as numbers, use the `_.isFinite` method.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is correctly classified,
+ * else `false`.
+ * @example
+ *
+ * _.isNumber(3);
+ * // => true
+ *
+ * _.isNumber(Number.MIN_VALUE);
+ * // => true
+ *
+ * _.isNumber(Infinity);
+ * // => true
+ *
+ * _.isNumber('3');
+ * // => false
+ */
+ function isNumber(value) {
+ return typeof value == 'number' ||
+ (isObjectLike(value) && objectToString.call(value) == numberTag);
+ }
+
+ /**
+ * Checks if `value` is a plain object, that is, an object created by the
+ * `Object` constructor or one with a `[[Prototype]]` of `null`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.8.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a plain object,
+ * else `false`.
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * }
+ *
+ * _.isPlainObject(new Foo);
+ * // => false
+ *
+ * _.isPlainObject([1, 2, 3]);
+ * // => false
+ *
+ * _.isPlainObject({ 'x': 0, 'y': 0 });
+ * // => true
+ *
+ * _.isPlainObject(Object.create(null));
+ * // => true
+ */
+ function isPlainObject(value) {
+ if (!isObjectLike(value) ||
+ objectToString.call(value) != objectTag || isHostObject(value)) {
+ return false;
+ }
+ var proto = getPrototype(value);
+ if (proto === null) {
+ return true;
+ }
+ var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;
+ return (typeof Ctor == 'function' &&
+ Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString);
+ }
+
+ /**
+ * Checks if `value` is classified as a `RegExp` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is correctly classified,
+ * else `false`.
+ * @example
+ *
+ * _.isRegExp(/abc/);
+ * // => true
+ *
+ * _.isRegExp('/abc/');
+ * // => false
+ */
+ function isRegExp(value) {
+ return isObject(value) && objectToString.call(value) == regexpTag;
+ }
+
+ /**
+ * Checks if `value` is a safe integer. An integer is safe if it's an IEEE-754
+ * double precision number which isn't the result of a rounded unsafe integer.
+ *
+ * **Note:** This method is based on
+ * [`Number.isSafeInteger`](https://mdn.io/Number/isSafeInteger).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a safe integer,
+ * else `false`.
+ * @example
+ *
+ * _.isSafeInteger(3);
+ * // => true
+ *
+ * _.isSafeInteger(Number.MIN_VALUE);
+ * // => false
+ *
+ * _.isSafeInteger(Infinity);
+ * // => false
+ *
+ * _.isSafeInteger('3');
+ * // => false
+ */
+ function isSafeInteger(value) {
+ return isInteger(value) && value >= -MAX_SAFE_INTEGER && value <= MAX_SAFE_INTEGER;
+ }
+
+ /**
+ * Checks if `value` is classified as a `Set` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.3.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is correctly classified,
+ * else `false`.
+ * @example
+ *
+ * _.isSet(new Set);
+ * // => true
+ *
+ * _.isSet(new WeakSet);
+ * // => false
+ */
+ function isSet(value) {
+ return isObjectLike(value) && getTag(value) == setTag;
+ }
+
+ /**
+ * Checks if `value` is classified as a `String` primitive or object.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is correctly classified,
+ * else `false`.
+ * @example
+ *
+ * _.isString('abc');
+ * // => true
+ *
+ * _.isString(1);
+ * // => false
+ */
+ function isString(value) {
+ return typeof value == 'string' ||
+ (!isArray(value) && isObjectLike(value) && objectToString.call(value) == stringTag);
+ }
+
+ /**
+ * Checks if `value` is classified as a `Symbol` primitive or object.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is correctly classified,
+ * else `false`.
+ * @example
+ *
+ * _.isSymbol(Symbol.iterator);
+ * // => true
+ *
+ * _.isSymbol('abc');
+ * // => false
+ */
+ function isSymbol(value) {
+ return typeof value == 'symbol' ||
+ (isObjectLike(value) && objectToString.call(value) == symbolTag);
+ }
+
+ /**
+ * Checks if `value` is classified as a typed array.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is correctly classified,
+ * else `false`.
+ * @example
+ *
+ * _.isTypedArray(new Uint8Array);
+ * // => true
+ *
+ * _.isTypedArray([]);
+ * // => false
+ */
+ function isTypedArray(value) {
+ return isObjectLike(value) &&
+ isLength(value.length) && !!typedArrayTags[objectToString.call(value)];
+ }
+
+ /**
+ * Checks if `value` is `undefined`.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`.
+ * @example
+ *
+ * _.isUndefined(void 0);
+ * // => true
+ *
+ * _.isUndefined(null);
+ * // => false
+ */
+ function isUndefined(value) {
+ return value === undefined;
+ }
+
+ /**
+ * Checks if `value` is classified as a `WeakMap` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.3.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is correctly classified,
+ * else `false`.
+ * @example
+ *
+ * _.isWeakMap(new WeakMap);
+ * // => true
+ *
+ * _.isWeakMap(new Map);
+ * // => false
+ */
+ function isWeakMap(value) {
+ return isObjectLike(value) && getTag(value) == weakMapTag;
+ }
+
+ /**
+ * Checks if `value` is classified as a `WeakSet` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.3.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is correctly classified,
+ * else `false`.
+ * @example
+ *
+ * _.isWeakSet(new WeakSet);
+ * // => true
+ *
+ * _.isWeakSet(new Set);
+ * // => false
+ */
+ function isWeakSet(value) {
+ return isObjectLike(value) && objectToString.call(value) == weakSetTag;
+ }
+
+ /**
+ * Checks if `value` is less than `other`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.9.0
+ * @category Lang
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @returns {boolean} Returns `true` if `value` is less than `other`,
+ * else `false`.
+ * @see _.gt
+ * @example
+ *
+ * _.lt(1, 3);
+ * // => true
+ *
+ * _.lt(3, 3);
+ * // => false
+ *
+ * _.lt(3, 1);
+ * // => false
+ */
+ var lt = createRelationalOperation(baseLt);
+
+ /**
+ * Checks if `value` is less than or equal to `other`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.9.0
+ * @category Lang
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @returns {boolean} Returns `true` if `value` is less than or equal to
+ * `other`, else `false`.
+ * @see _.gte
+ * @example
+ *
+ * _.lte(1, 3);
+ * // => true
+ *
+ * _.lte(3, 3);
+ * // => true
+ *
+ * _.lte(3, 1);
+ * // => false
+ */
+ var lte = createRelationalOperation(function(value, other) {
+ return value <= other;
+ });
+
+ /**
+ * Converts `value` to an array.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to convert.
+ * @returns {Array} Returns the converted array.
+ * @example
+ *
+ * _.toArray({ 'a': 1, 'b': 2 });
+ * // => [1, 2]
+ *
+ * _.toArray('abc');
+ * // => ['a', 'b', 'c']
+ *
+ * _.toArray(1);
+ * // => []
+ *
+ * _.toArray(null);
+ * // => []
+ */
+ function toArray(value) {
+ if (!value) {
+ return [];
+ }
+ if (isArrayLike(value)) {
+ return isString(value) ? stringToArray(value) : copyArray(value);
+ }
+ if (iteratorSymbol && value[iteratorSymbol]) {
+ return iteratorToArray(value[iteratorSymbol]());
+ }
+ var tag = getTag(value),
+ func = tag == mapTag ? mapToArray : (tag == setTag ? setToArray : values);
+
+ return func(value);
+ }
+
+ /**
+ * Converts `value` to an integer.
+ *
+ * **Note:** This function is loosely based on
+ * [`ToInteger`](http://www.ecma-international.org/ecma-262/6.0/#sec-tointeger).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to convert.
+ * @returns {number} Returns the converted integer.
+ * @example
+ *
+ * _.toInteger(3);
+ * // => 3
+ *
+ * _.toInteger(Number.MIN_VALUE);
+ * // => 0
+ *
+ * _.toInteger(Infinity);
+ * // => 1.7976931348623157e+308
+ *
+ * _.toInteger('3');
+ * // => 3
+ */
+ function toInteger(value) {
+ if (!value) {
+ return value === 0 ? value : 0;
+ }
+ value = toNumber(value);
+ if (value === INFINITY || value === -INFINITY) {
+ var sign = (value < 0 ? -1 : 1);
+ return sign * MAX_INTEGER;
+ }
+ var remainder = value % 1;
+ return value === value ? (remainder ? value - remainder : value) : 0;
+ }
+
+ /**
+ * Converts `value` to an integer suitable for use as the length of an
+ * array-like object.
+ *
+ * **Note:** This method is based on
+ * [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to convert.
+ * @returns {number} Returns the converted integer.
+ * @example
+ *
+ * _.toLength(3);
+ * // => 3
+ *
+ * _.toLength(Number.MIN_VALUE);
+ * // => 0
+ *
+ * _.toLength(Infinity);
+ * // => 4294967295
+ *
+ * _.toLength('3');
+ * // => 3
+ */
+ function toLength(value) {
+ return value ? baseClamp(toInteger(value), 0, MAX_ARRAY_LENGTH) : 0;
+ }
+
+ /**
+ * Converts `value` to a number.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to process.
+ * @returns {number} Returns the number.
+ * @example
+ *
+ * _.toNumber(3);
+ * // => 3
+ *
+ * _.toNumber(Number.MIN_VALUE);
+ * // => 5e-324
+ *
+ * _.toNumber(Infinity);
+ * // => Infinity
+ *
+ * _.toNumber('3');
+ * // => 3
+ */
+ function toNumber(value) {
+ if (typeof value == 'number') {
+ return value;
+ }
+ if (isSymbol(value)) {
+ return NAN;
+ }
+ if (isObject(value)) {
+ var other = isFunction(value.valueOf) ? value.valueOf() : value;
+ value = isObject(other) ? (other + '') : other;
+ }
+ if (typeof value != 'string') {
+ return value === 0 ? value : +value;
+ }
+ value = value.replace(reTrim, '');
+ var isBinary = reIsBinary.test(value);
+ return (isBinary || reIsOctal.test(value))
+ ? freeParseInt(value.slice(2), isBinary ? 2 : 8)
+ : (reIsBadHex.test(value) ? NAN : +value);
+ }
+
+ /**
+ * Converts `value` to a plain object flattening inherited enumerable string
+ * keyed properties of `value` to own properties of the plain object.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Lang
+ * @param {*} value The value to convert.
+ * @returns {Object} Returns the converted plain object.
+ * @example
+ *
+ * function Foo() {
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.assign({ 'a': 1 }, new Foo);
+ * // => { 'a': 1, 'b': 2 }
+ *
+ * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));
+ * // => { 'a': 1, 'b': 2, 'c': 3 }
+ */
+ function toPlainObject(value) {
+ return copyObject(value, keysIn(value));
+ }
+
+ /**
+ * Converts `value` to a safe integer. A safe integer can be compared and
+ * represented correctly.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to convert.
+ * @returns {number} Returns the converted integer.
+ * @example
+ *
+ * _.toSafeInteger(3);
+ * // => 3
+ *
+ * _.toSafeInteger(Number.MIN_VALUE);
+ * // => 0
+ *
+ * _.toSafeInteger(Infinity);
+ * // => 9007199254740991
+ *
+ * _.toSafeInteger('3');
+ * // => 3
+ */
+ function toSafeInteger(value) {
+ return baseClamp(toInteger(value), -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER);
+ }
+
+ /**
+ * Converts `value` to a string. An empty string is returned for `null`
+ * and `undefined` values. The sign of `-0` is preserved.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to process.
+ * @returns {string} Returns the string.
+ * @example
+ *
+ * _.toString(null);
+ * // => ''
+ *
+ * _.toString(-0);
+ * // => '-0'
+ *
+ * _.toString([1, 2, 3]);
+ * // => '1,2,3'
+ */
+ function toString(value) {
+ return value == null ? '' : baseToString(value);
+ }
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Assigns own enumerable string keyed properties of source objects to the
+ * destination object. Source objects are applied from left to right.
+ * Subsequent sources overwrite property assignments of previous sources.
+ *
+ * **Note:** This method mutates `object` and is loosely based on
+ * [`Object.assign`](https://mdn.io/Object/assign).
+ *
+ * @static
+ * @memberOf _
+ * @since 0.10.0
+ * @category Object
+ * @param {Object} object The destination object.
+ * @param {...Object} [sources] The source objects.
+ * @returns {Object} Returns `object`.
+ * @see _.assignIn
+ * @example
+ *
+ * function Foo() {
+ * this.c = 3;
+ * }
+ *
+ * function Bar() {
+ * this.e = 5;
+ * }
+ *
+ * Foo.prototype.d = 4;
+ * Bar.prototype.f = 6;
+ *
+ * _.assign({ 'a': 1 }, new Foo, new Bar);
+ * // => { 'a': 1, 'c': 3, 'e': 5 }
+ */
+ var assign = createAssigner(function(object, source) {
+ if (nonEnumShadows || isPrototype(source) || isArrayLike(source)) {
+ copyObject(source, keys(source), object);
+ return;
+ }
+ for (var key in source) {
+ if (hasOwnProperty.call(source, key)) {
+ assignValue(object, key, source[key]);
+ }
+ }
+ });
+
+ /**
+ * This method is like `_.assign` except that it iterates over own and
+ * inherited source properties.
+ *
+ * **Note:** This method mutates `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @alias extend
+ * @category Object
+ * @param {Object} object The destination object.
+ * @param {...Object} [sources] The source objects.
+ * @returns {Object} Returns `object`.
+ * @see _.assign
+ * @example
+ *
+ * function Foo() {
+ * this.b = 2;
+ * }
+ *
+ * function Bar() {
+ * this.d = 4;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ * Bar.prototype.e = 5;
+ *
+ * _.assignIn({ 'a': 1 }, new Foo, new Bar);
+ * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4, 'e': 5 }
+ */
+ var assignIn = createAssigner(function(object, source) {
+ if (nonEnumShadows || isPrototype(source) || isArrayLike(source)) {
+ copyObject(source, keysIn(source), object);
+ return;
+ }
+ for (var key in source) {
+ assignValue(object, key, source[key]);
+ }
+ });
+
+ /**
+ * This method is like `_.assignIn` except that it accepts `customizer`
+ * which is invoked to produce the assigned values. If `customizer` returns
+ * `undefined`, assignment is handled by the method instead. The `customizer`
+ * is invoked with five arguments: (objValue, srcValue, key, object, source).
+ *
+ * **Note:** This method mutates `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @alias extendWith
+ * @category Object
+ * @param {Object} object The destination object.
+ * @param {...Object} sources The source objects.
+ * @param {Function} [customizer] The function to customize assigned values.
+ * @returns {Object} Returns `object`.
+ * @see _.assignWith
+ * @example
+ *
+ * function customizer(objValue, srcValue) {
+ * return _.isUndefined(objValue) ? srcValue : objValue;
+ * }
+ *
+ * var defaults = _.partialRight(_.assignInWith, customizer);
+ *
+ * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
+ * // => { 'a': 1, 'b': 2 }
+ */
+ var assignInWith = createAssigner(function(object, source, srcIndex, customizer) {
+ copyObject(source, keysIn(source), object, customizer);
+ });
+
+ /**
+ * This method is like `_.assign` except that it accepts `customizer`
+ * which is invoked to produce the assigned values. If `customizer` returns
+ * `undefined`, assignment is handled by the method instead. The `customizer`
+ * is invoked with five arguments: (objValue, srcValue, key, object, source).
+ *
+ * **Note:** This method mutates `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Object
+ * @param {Object} object The destination object.
+ * @param {...Object} sources The source objects.
+ * @param {Function} [customizer] The function to customize assigned values.
+ * @returns {Object} Returns `object`.
+ * @see _.assignInWith
+ * @example
+ *
+ * function customizer(objValue, srcValue) {
+ * return _.isUndefined(objValue) ? srcValue : objValue;
+ * }
+ *
+ * var defaults = _.partialRight(_.assignWith, customizer);
+ *
+ * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
+ * // => { 'a': 1, 'b': 2 }
+ */
+ var assignWith = createAssigner(function(object, source, srcIndex, customizer) {
+ copyObject(source, keys(source), object, customizer);
+ });
+
+ /**
+ * Creates an array of values corresponding to `paths` of `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 1.0.0
+ * @category Object
+ * @param {Object} object The object to iterate over.
+ * @param {...(string|string[])} [paths] The property paths of elements to pick.
+ * @returns {Array} Returns the new array of picked elements.
+ * @example
+ *
+ * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };
+ *
+ * _.at(object, ['a[0].b.c', 'a[1]']);
+ * // => [3, 4]
+ *
+ * _.at(['a', 'b', 'c'], 0, 2);
+ * // => ['a', 'c']
+ */
+ var at = rest(function(object, paths) {
+ return baseAt(object, baseFlatten(paths, 1));
+ });
+
+ /**
+ * Creates an object that inherits from the `prototype` object. If a
+ * `properties` object is given, its own enumerable string keyed properties
+ * are assigned to the created object.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.3.0
+ * @category Object
+ * @param {Object} prototype The object to inherit from.
+ * @param {Object} [properties] The properties to assign to the object.
+ * @returns {Object} Returns the new object.
+ * @example
+ *
+ * function Shape() {
+ * this.x = 0;
+ * this.y = 0;
+ * }
+ *
+ * function Circle() {
+ * Shape.call(this);
+ * }
+ *
+ * Circle.prototype = _.create(Shape.prototype, {
+ * 'constructor': Circle
+ * });
+ *
+ * var circle = new Circle;
+ * circle instanceof Circle;
+ * // => true
+ *
+ * circle instanceof Shape;
+ * // => true
+ */
+ function create(prototype, properties) {
+ var result = baseCreate(prototype);
+ return properties ? baseAssign(result, properties) : result;
+ }
+
+ /**
+ * Assigns own and inherited enumerable string keyed properties of source
+ * objects to the destination object for all destination properties that
+ * resolve to `undefined`. Source objects are applied from left to right.
+ * Once a property is set, additional values of the same property are ignored.
+ *
+ * **Note:** This method mutates `object`.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The destination object.
+ * @param {...Object} [sources] The source objects.
+ * @returns {Object} Returns `object`.
+ * @see _.defaultsDeep
+ * @example
+ *
+ * _.defaults({ 'user': 'barney' }, { 'age': 36 }, { 'user': 'fred' });
+ * // => { 'user': 'barney', 'age': 36 }
+ */
+ var defaults = rest(function(args) {
+ args.push(undefined, assignInDefaults);
+ return apply(assignInWith, undefined, args);
+ });
+
+ /**
+ * This method is like `_.defaults` except that it recursively assigns
+ * default properties.
+ *
+ * **Note:** This method mutates `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.10.0
+ * @category Object
+ * @param {Object} object The destination object.
+ * @param {...Object} [sources] The source objects.
+ * @returns {Object} Returns `object`.
+ * @see _.defaults
+ * @example
+ *
+ * _.defaultsDeep({ 'user': { 'name': 'barney' } }, { 'user': { 'name': 'fred', 'age': 36 } });
+ * // => { 'user': { 'name': 'barney', 'age': 36 } }
+ *
+ */
+ var defaultsDeep = rest(function(args) {
+ args.push(undefined, mergeDefaults);
+ return apply(mergeWith, undefined, args);
+ });
+
+ /**
+ * This method is like `_.find` except that it returns the key of the first
+ * element `predicate` returns truthy for instead of the element itself.
+ *
+ * @static
+ * @memberOf _
+ * @since 1.1.0
+ * @category Object
+ * @param {Object} object The object to search.
+ * @param {Array|Function|Object|string} [predicate=_.identity]
+ * The function invoked per iteration.
+ * @returns {string|undefined} Returns the key of the matched element,
+ * else `undefined`.
+ * @example
+ *
+ * var users = {
+ * 'barney': { 'age': 36, 'active': true },
+ * 'fred': { 'age': 40, 'active': false },
+ * 'pebbles': { 'age': 1, 'active': true }
+ * };
+ *
+ * _.findKey(users, function(o) { return o.age < 40; });
+ * // => 'barney' (iteration order is not guaranteed)
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.findKey(users, { 'age': 1, 'active': true });
+ * // => 'pebbles'
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.findKey(users, ['active', false]);
+ * // => 'fred'
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.findKey(users, 'active');
+ * // => 'barney'
+ */
+ function findKey(object, predicate) {
+ return baseFind(object, getIteratee(predicate, 3), baseForOwn, true);
+ }
+
+ /**
+ * This method is like `_.findKey` except that it iterates over elements of
+ * a collection in the opposite order.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.0.0
+ * @category Object
+ * @param {Object} object The object to search.
+ * @param {Array|Function|Object|string} [predicate=_.identity]
+ * The function invoked per iteration.
+ * @returns {string|undefined} Returns the key of the matched element,
+ * else `undefined`.
+ * @example
+ *
+ * var users = {
+ * 'barney': { 'age': 36, 'active': true },
+ * 'fred': { 'age': 40, 'active': false },
+ * 'pebbles': { 'age': 1, 'active': true }
+ * };
+ *
+ * _.findLastKey(users, function(o) { return o.age < 40; });
+ * // => returns 'pebbles' assuming `_.findKey` returns 'barney'
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.findLastKey(users, { 'age': 36, 'active': true });
+ * // => 'barney'
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.findLastKey(users, ['active', false]);
+ * // => 'fred'
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.findLastKey(users, 'active');
+ * // => 'pebbles'
+ */
+ function findLastKey(object, predicate) {
+ return baseFind(object, getIteratee(predicate, 3), baseForOwnRight, true);
+ }
+
+ /**
+ * Iterates over own and inherited enumerable string keyed properties of an
+ * object and invokes `iteratee` for each property. The iteratee is invoked
+ * with three arguments: (value, key, object). Iteratee functions may exit
+ * iteration early by explicitly returning `false`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.3.0
+ * @category Object
+ * @param {Object} object The object to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @returns {Object} Returns `object`.
+ * @see _.forInRight
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.forIn(new Foo, function(value, key) {
+ * console.log(key);
+ * });
+ * // => Logs 'a', 'b', then 'c' (iteration order is not guaranteed).
+ */
+ function forIn(object, iteratee) {
+ return object == null
+ ? object
+ : baseFor(object, getIteratee(iteratee), keysIn);
+ }
+
+ /**
+ * This method is like `_.forIn` except that it iterates over properties of
+ * `object` in the opposite order.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.0.0
+ * @category Object
+ * @param {Object} object The object to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @returns {Object} Returns `object`.
+ * @see _.forIn
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.forInRight(new Foo, function(value, key) {
+ * console.log(key);
+ * });
+ * // => Logs 'c', 'b', then 'a' assuming `_.forIn` logs 'a', 'b', then 'c'.
+ */
+ function forInRight(object, iteratee) {
+ return object == null
+ ? object
+ : baseForRight(object, getIteratee(iteratee), keysIn);
+ }
+
+ /**
+ * Iterates over own enumerable string keyed properties of an object and
+ * invokes `iteratee` for each property. The iteratee is invoked with three
+ * arguments: (value, key, object). Iteratee functions may exit iteration
+ * early by explicitly returning `false`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.3.0
+ * @category Object
+ * @param {Object} object The object to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @returns {Object} Returns `object`.
+ * @see _.forOwnRight
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.forOwn(new Foo, function(value, key) {
+ * console.log(key);
+ * });
+ * // => Logs 'a' then 'b' (iteration order is not guaranteed).
+ */
+ function forOwn(object, iteratee) {
+ return object && baseForOwn(object, getIteratee(iteratee));
+ }
+
+ /**
+ * This method is like `_.forOwn` except that it iterates over properties of
+ * `object` in the opposite order.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.0.0
+ * @category Object
+ * @param {Object} object The object to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @returns {Object} Returns `object`.
+ * @see _.forOwn
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.forOwnRight(new Foo, function(value, key) {
+ * console.log(key);
+ * });
+ * // => Logs 'b' then 'a' assuming `_.forOwn` logs 'a' then 'b'.
+ */
+ function forOwnRight(object, iteratee) {
+ return object && baseForOwnRight(object, getIteratee(iteratee));
+ }
+
+ /**
+ * Creates an array of function property names from own enumerable properties
+ * of `object`.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The object to inspect.
+ * @returns {Array} Returns the new array of property names.
+ * @see _.functionsIn
+ * @example
+ *
+ * function Foo() {
+ * this.a = _.constant('a');
+ * this.b = _.constant('b');
+ * }
+ *
+ * Foo.prototype.c = _.constant('c');
+ *
+ * _.functions(new Foo);
+ * // => ['a', 'b']
+ */
+ function functions(object) {
+ return object == null ? [] : baseFunctions(object, keys(object));
+ }
+
+ /**
+ * Creates an array of function property names from own and inherited
+ * enumerable properties of `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Object
+ * @param {Object} object The object to inspect.
+ * @returns {Array} Returns the new array of property names.
+ * @see _.functions
+ * @example
+ *
+ * function Foo() {
+ * this.a = _.constant('a');
+ * this.b = _.constant('b');
+ * }
+ *
+ * Foo.prototype.c = _.constant('c');
+ *
+ * _.functionsIn(new Foo);
+ * // => ['a', 'b', 'c']
+ */
+ function functionsIn(object) {
+ return object == null ? [] : baseFunctions(object, keysIn(object));
+ }
+
+ /**
+ * Gets the value at `path` of `object`. If the resolved value is
+ * `undefined`, the `defaultValue` is used in its place.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.7.0
+ * @category Object
+ * @param {Object} object The object to query.
+ * @param {Array|string} path The path of the property to get.
+ * @param {*} [defaultValue] The value returned for `undefined` resolved values.
+ * @returns {*} Returns the resolved value.
+ * @example
+ *
+ * var object = { 'a': [{ 'b': { 'c': 3 } }] };
+ *
+ * _.get(object, 'a[0].b.c');
+ * // => 3
+ *
+ * _.get(object, ['a', '0', 'b', 'c']);
+ * // => 3
+ *
+ * _.get(object, 'a.b.c', 'default');
+ * // => 'default'
+ */
+ function get(object, path, defaultValue) {
+ var result = object == null ? undefined : baseGet(object, path);
+ return result === undefined ? defaultValue : result;
+ }
+
+ /**
+ * Checks if `path` is a direct property of `object`.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The object to query.
+ * @param {Array|string} path The path to check.
+ * @returns {boolean} Returns `true` if `path` exists, else `false`.
+ * @example
+ *
+ * var object = { 'a': { 'b': 2 } };
+ * var other = _.create({ 'a': _.create({ 'b': 2 }) });
+ *
+ * _.has(object, 'a');
+ * // => true
+ *
+ * _.has(object, 'a.b');
+ * // => true
+ *
+ * _.has(object, ['a', 'b']);
+ * // => true
+ *
+ * _.has(other, 'a');
+ * // => false
+ */
+ function has(object, path) {
+ return object != null && hasPath(object, path, baseHas);
+ }
+
+ /**
+ * Checks if `path` is a direct or inherited property of `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Object
+ * @param {Object} object The object to query.
+ * @param {Array|string} path The path to check.
+ * @returns {boolean} Returns `true` if `path` exists, else `false`.
+ * @example
+ *
+ * var object = _.create({ 'a': _.create({ 'b': 2 }) });
+ *
+ * _.hasIn(object, 'a');
+ * // => true
+ *
+ * _.hasIn(object, 'a.b');
+ * // => true
+ *
+ * _.hasIn(object, ['a', 'b']);
+ * // => true
+ *
+ * _.hasIn(object, 'b');
+ * // => false
+ */
+ function hasIn(object, path) {
+ return object != null && hasPath(object, path, baseHasIn);
+ }
+
+ /**
+ * Creates an object composed of the inverted keys and values of `object`.
+ * If `object` contains duplicate values, subsequent values overwrite
+ * property assignments of previous values.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.7.0
+ * @category Object
+ * @param {Object} object The object to invert.
+ * @returns {Object} Returns the new inverted object.
+ * @example
+ *
+ * var object = { 'a': 1, 'b': 2, 'c': 1 };
+ *
+ * _.invert(object);
+ * // => { '1': 'c', '2': 'b' }
+ */
+ var invert = createInverter(function(result, value, key) {
+ result[value] = key;
+ }, constant(identity));
+
+ /**
+ * This method is like `_.invert` except that the inverted object is generated
+ * from the results of running each element of `object` thru `iteratee`. The
+ * corresponding inverted value of each inverted key is an array of keys
+ * responsible for generating the inverted value. The iteratee is invoked
+ * with one argument: (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.1.0
+ * @category Object
+ * @param {Object} object The object to invert.
+ * @param {Array|Function|Object|string} [iteratee=_.identity]
+ * The iteratee invoked per element.
+ * @returns {Object} Returns the new inverted object.
+ * @example
+ *
+ * var object = { 'a': 1, 'b': 2, 'c': 1 };
+ *
+ * _.invertBy(object);
+ * // => { '1': ['a', 'c'], '2': ['b'] }
+ *
+ * _.invertBy(object, function(value) {
+ * return 'group' + value;
+ * });
+ * // => { 'group1': ['a', 'c'], 'group2': ['b'] }
+ */
+ var invertBy = createInverter(function(result, value, key) {
+ if (hasOwnProperty.call(result, value)) {
+ result[value].push(key);
+ } else {
+ result[value] = [key];
+ }
+ }, getIteratee);
+
+ /**
+ * Invokes the method at `path` of `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Object
+ * @param {Object} object The object to query.
+ * @param {Array|string} path The path of the method to invoke.
+ * @param {...*} [args] The arguments to invoke the method with.
+ * @returns {*} Returns the result of the invoked method.
+ * @example
+ *
+ * var object = { 'a': [{ 'b': { 'c': [1, 2, 3, 4] } }] };
+ *
+ * _.invoke(object, 'a[0].b.c.slice', 1, 3);
+ * // => [2, 3]
+ */
+ var invoke = rest(baseInvoke);
+
+ /**
+ * Creates an array of the own enumerable property names of `object`.
+ *
+ * **Note:** Non-object values are coerced to objects. See the
+ * [ES spec](http://ecma-international.org/ecma-262/6.0/#sec-object.keys)
+ * for more details.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property names.
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.keys(new Foo);
+ * // => ['a', 'b'] (iteration order is not guaranteed)
+ *
+ * _.keys('hi');
+ * // => ['0', '1']
+ */
+ function keys(object) {
+ var isProto = isPrototype(object);
+ if (!(isProto || isArrayLike(object))) {
+ return baseKeys(object);
+ }
+ var indexes = indexKeys(object),
+ skipIndexes = !!indexes,
+ result = indexes || [],
+ length = result.length;
+
+ for (var key in object) {
+ if (baseHas(object, key) &&
+ !(skipIndexes && (key == 'length' || isIndex(key, length))) &&
+ !(isProto && key == 'constructor')) {
+ result.push(key);
+ }
+ }
+ return result;
+ }
+
+ /**
+ * Creates an array of the own and inherited enumerable property names of `object`.
+ *
+ * **Note:** Non-object values are coerced to objects.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Object
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property names.
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.keysIn(new Foo);
+ * // => ['a', 'b', 'c'] (iteration order is not guaranteed)
+ */
+ function keysIn(object) {
+ var index = -1,
+ isProto = isPrototype(object),
+ props = baseKeysIn(object),
+ propsLength = props.length,
+ indexes = indexKeys(object),
+ skipIndexes = !!indexes,
+ result = indexes || [],
+ length = result.length;
+
+ while (++index < propsLength) {
+ var key = props[index];
+ if (!(skipIndexes && (key == 'length' || isIndex(key, length))) &&
+ !(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {
+ result.push(key);
+ }
+ }
+ return result;
+ }
+
+ /**
+ * The opposite of `_.mapValues`; this method creates an object with the
+ * same values as `object` and keys generated by running each own enumerable
+ * string keyed property of `object` thru `iteratee`. The iteratee is invoked
+ * with three arguments: (value, key, object).
+ *
+ * @static
+ * @memberOf _
+ * @since 3.8.0
+ * @category Object
+ * @param {Object} object The object to iterate over.
+ * @param {Array|Function|Object|string} [iteratee=_.identity]
+ * The function invoked per iteration.
+ * @returns {Object} Returns the new mapped object.
+ * @see _.mapValues
+ * @example
+ *
+ * _.mapKeys({ 'a': 1, 'b': 2 }, function(value, key) {
+ * return key + value;
+ * });
+ * // => { 'a1': 1, 'b2': 2 }
+ */
+ function mapKeys(object, iteratee) {
+ var result = {};
+ iteratee = getIteratee(iteratee, 3);
+
+ baseForOwn(object, function(value, key, object) {
+ result[iteratee(value, key, object)] = value;
+ });
+ return result;
+ }
+
+ /**
+ * Creates an object with the same keys as `object` and values generated
+ * by running each own enumerable string keyed property of `object` thru
+ * `iteratee`. The iteratee is invoked with three arguments:
+ * (value, key, object).
+ *
+ * @static
+ * @memberOf _
+ * @since 2.4.0
+ * @category Object
+ * @param {Object} object The object to iterate over.
+ * @param {Array|Function|Object|string} [iteratee=_.identity]
+ * The function invoked per iteration.
+ * @returns {Object} Returns the new mapped object.
+ * @see _.mapKeys
+ * @example
+ *
+ * var users = {
+ * 'fred': { 'user': 'fred', 'age': 40 },
+ * 'pebbles': { 'user': 'pebbles', 'age': 1 }
+ * };
+ *
+ * _.mapValues(users, function(o) { return o.age; });
+ * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.mapValues(users, 'age');
+ * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)
+ */
+ function mapValues(object, iteratee) {
+ var result = {};
+ iteratee = getIteratee(iteratee, 3);
+
+ baseForOwn(object, function(value, key, object) {
+ result[key] = iteratee(value, key, object);
+ });
+ return result;
+ }
+
+ /**
+ * This method is like `_.assign` except that it recursively merges own and
+ * inherited enumerable string keyed properties of source objects into the
+ * destination object. Source properties that resolve to `undefined` are
+ * skipped if a destination value exists. Array and plain object properties
+ * are merged recursively.Other objects and value types are overridden by
+ * assignment. Source objects are applied from left to right. Subsequent
+ * sources overwrite property assignments of previous sources.
+ *
+ * **Note:** This method mutates `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.5.0
+ * @category Object
+ * @param {Object} object The destination object.
+ * @param {...Object} [sources] The source objects.
+ * @returns {Object} Returns `object`.
+ * @example
+ *
+ * var users = {
+ * 'data': [{ 'user': 'barney' }, { 'user': 'fred' }]
+ * };
+ *
+ * var ages = {
+ * 'data': [{ 'age': 36 }, { 'age': 40 }]
+ * };
+ *
+ * _.merge(users, ages);
+ * // => { 'data': [{ 'user': 'barney', 'age': 36 }, { 'user': 'fred', 'age': 40 }] }
+ */
+ var merge = createAssigner(function(object, source, srcIndex) {
+ baseMerge(object, source, srcIndex);
+ });
+
+ /**
+ * This method is like `_.merge` except that it accepts `customizer` which
+ * is invoked to produce the merged values of the destination and source
+ * properties. If `customizer` returns `undefined`, merging is handled by the
+ * method instead. The `customizer` is invoked with seven arguments:
+ * (objValue, srcValue, key, object, source, stack).
+ *
+ * **Note:** This method mutates `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Object
+ * @param {Object} object The destination object.
+ * @param {...Object} sources The source objects.
+ * @param {Function} customizer The function to customize assigned values.
+ * @returns {Object} Returns `object`.
+ * @example
+ *
+ * function customizer(objValue, srcValue) {
+ * if (_.isArray(objValue)) {
+ * return objValue.concat(srcValue);
+ * }
+ * }
+ *
+ * var object = {
+ * 'fruits': ['apple'],
+ * 'vegetables': ['beet']
+ * };
+ *
+ * var other = {
+ * 'fruits': ['banana'],
+ * 'vegetables': ['carrot']
+ * };
+ *
+ * _.mergeWith(object, other, customizer);
+ * // => { 'fruits': ['apple', 'banana'], 'vegetables': ['beet', 'carrot'] }
+ */
+ var mergeWith = createAssigner(function(object, source, srcIndex, customizer) {
+ baseMerge(object, source, srcIndex, customizer);
+ });
+
+ /**
+ * The opposite of `_.pick`; this method creates an object composed of the
+ * own and inherited enumerable string keyed properties of `object` that are
+ * not omitted.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The source object.
+ * @param {...(string|string[])} [props] The property identifiers to omit.
+ * @returns {Object} Returns the new object.
+ * @example
+ *
+ * var object = { 'a': 1, 'b': '2', 'c': 3 };
+ *
+ * _.omit(object, ['a', 'c']);
+ * // => { 'b': '2' }
+ */
+ var omit = rest(function(object, props) {
+ if (object == null) {
+ return {};
+ }
+ props = arrayMap(baseFlatten(props, 1), toKey);
+ return basePick(object, baseDifference(getAllKeysIn(object), props));
+ });
+
+ /**
+ * The opposite of `_.pickBy`; this method creates an object composed of
+ * the own and inherited enumerable string keyed properties of `object` that
+ * `predicate` doesn't return truthy for. The predicate is invoked with two
+ * arguments: (value, key).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Object
+ * @param {Object} object The source object.
+ * @param {Array|Function|Object|string} [predicate=_.identity]
+ * The function invoked per property.
+ * @returns {Object} Returns the new object.
+ * @example
+ *
+ * var object = { 'a': 1, 'b': '2', 'c': 3 };
+ *
+ * _.omitBy(object, _.isNumber);
+ * // => { 'b': '2' }
+ */
+ function omitBy(object, predicate) {
+ predicate = getIteratee(predicate);
+ return basePickBy(object, function(value, key) {
+ return !predicate(value, key);
+ });
+ }
+
+ /**
+ * Creates an object composed of the picked `object` properties.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The source object.
+ * @param {...(string|string[])} [props] The property identifiers to pick.
+ * @returns {Object} Returns the new object.
+ * @example
+ *
+ * var object = { 'a': 1, 'b': '2', 'c': 3 };
+ *
+ * _.pick(object, ['a', 'c']);
+ * // => { 'a': 1, 'c': 3 }
+ */
+ var pick = rest(function(object, props) {
+ return object == null ? {} : basePick(object, arrayMap(baseFlatten(props, 1), toKey));
+ });
+
+ /**
+ * Creates an object composed of the `object` properties `predicate` returns
+ * truthy for. The predicate is invoked with two arguments: (value, key).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Object
+ * @param {Object} object The source object.
+ * @param {Array|Function|Object|string} [predicate=_.identity]
+ * The function invoked per property.
+ * @returns {Object} Returns the new object.
+ * @example
+ *
+ * var object = { 'a': 1, 'b': '2', 'c': 3 };
+ *
+ * _.pickBy(object, _.isNumber);
+ * // => { 'a': 1, 'c': 3 }
+ */
+ function pickBy(object, predicate) {
+ return object == null ? {} : basePickBy(object, getIteratee(predicate));
+ }
+
+ /**
+ * This method is like `_.get` except that if the resolved value is a
+ * function it's invoked with the `this` binding of its parent object and
+ * its result is returned.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The object to query.
+ * @param {Array|string} path The path of the property to resolve.
+ * @param {*} [defaultValue] The value returned for `undefined` resolved values.
+ * @returns {*} Returns the resolved value.
+ * @example
+ *
+ * var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] };
+ *
+ * _.result(object, 'a[0].b.c1');
+ * // => 3
+ *
+ * _.result(object, 'a[0].b.c2');
+ * // => 4
+ *
+ * _.result(object, 'a[0].b.c3', 'default');
+ * // => 'default'
+ *
+ * _.result(object, 'a[0].b.c3', _.constant('default'));
+ * // => 'default'
+ */
+ function result(object, path, defaultValue) {
+ path = isKey(path, object) ? [path] : castPath(path);
+
+ var index = -1,
+ length = path.length;
+
+ // Ensure the loop is entered when path is empty.
+ if (!length) {
+ object = undefined;
+ length = 1;
+ }
+ while (++index < length) {
+ var value = object == null ? undefined : object[toKey(path[index])];
+ if (value === undefined) {
+ index = length;
+ value = defaultValue;
+ }
+ object = isFunction(value) ? value.call(object) : value;
+ }
+ return object;
+ }
+
+ /**
+ * Sets the value at `path` of `object`. If a portion of `path` doesn't exist,
+ * it's created. Arrays are created for missing index properties while objects
+ * are created for all other missing properties. Use `_.setWith` to customize
+ * `path` creation.
+ *
+ * **Note:** This method mutates `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.7.0
+ * @category Object
+ * @param {Object} object The object to modify.
+ * @param {Array|string} path The path of the property to set.
+ * @param {*} value The value to set.
+ * @returns {Object} Returns `object`.
+ * @example
+ *
+ * var object = { 'a': [{ 'b': { 'c': 3 } }] };
+ *
+ * _.set(object, 'a[0].b.c', 4);
+ * console.log(object.a[0].b.c);
+ * // => 4
+ *
+ * _.set(object, ['x', '0', 'y', 'z'], 5);
+ * console.log(object.x[0].y.z);
+ * // => 5
+ */
+ function set(object, path, value) {
+ return object == null ? object : baseSet(object, path, value);
+ }
+
+ /**
+ * This method is like `_.set` except that it accepts `customizer` which is
+ * invoked to produce the objects of `path`. If `customizer` returns `undefined`
+ * path creation is handled by the method instead. The `customizer` is invoked
+ * with three arguments: (nsValue, key, nsObject).
+ *
+ * **Note:** This method mutates `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Object
+ * @param {Object} object The object to modify.
+ * @param {Array|string} path The path of the property to set.
+ * @param {*} value The value to set.
+ * @param {Function} [customizer] The function to customize assigned values.
+ * @returns {Object} Returns `object`.
+ * @example
+ *
+ * var object = {};
+ *
+ * _.setWith(object, '[0][1]', 'a', Object);
+ * // => { '0': { '1': 'a' } }
+ */
+ function setWith(object, path, value, customizer) {
+ customizer = typeof customizer == 'function' ? customizer : undefined;
+ return object == null ? object : baseSet(object, path, value, customizer);
+ }
+
+ /**
+ * Creates an array of own enumerable string keyed-value pairs for `object`
+ * which can be consumed by `_.fromPairs`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @alias entries
+ * @category Object
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the new array of key-value pairs.
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.toPairs(new Foo);
+ * // => [['a', 1], ['b', 2]] (iteration order is not guaranteed)
+ */
+ function toPairs(object) {
+ return baseToPairs(object, keys(object));
+ }
+
+ /**
+ * Creates an array of own and inherited enumerable string keyed-value pairs
+ * for `object` which can be consumed by `_.fromPairs`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @alias entriesIn
+ * @category Object
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the new array of key-value pairs.
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.toPairsIn(new Foo);
+ * // => [['a', 1], ['b', 2], ['c', 1]] (iteration order is not guaranteed)
+ */
+ function toPairsIn(object) {
+ return baseToPairs(object, keysIn(object));
+ }
+
+ /**
+ * An alternative to `_.reduce`; this method transforms `object` to a new
+ * `accumulator` object which is the result of running each of its own
+ * enumerable string keyed properties thru `iteratee`, with each invocation
+ * potentially mutating the `accumulator` object. The iteratee is invoked
+ * with four arguments: (accumulator, value, key, object). Iteratee functions
+ * may exit iteration early by explicitly returning `false`.
+ *
+ * @static
+ * @memberOf _
+ * @since 1.3.0
+ * @category Object
+ * @param {Array|Object} object The object to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @param {*} [accumulator] The custom accumulator value.
+ * @returns {*} Returns the accumulated value.
+ * @example
+ *
+ * _.transform([2, 3, 4], function(result, n) {
+ * result.push(n *= n);
+ * return n % 2 == 0;
+ * }, []);
+ * // => [4, 9]
+ *
+ * _.transform({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {
+ * (result[value] || (result[value] = [])).push(key);
+ * }, {});
+ * // => { '1': ['a', 'c'], '2': ['b'] }
+ */
+ function transform(object, iteratee, accumulator) {
+ var isArr = isArray(object) || isTypedArray(object);
+ iteratee = getIteratee(iteratee, 4);
+
+ if (accumulator == null) {
+ if (isArr || isObject(object)) {
+ var Ctor = object.constructor;
+ if (isArr) {
+ accumulator = isArray(object) ? new Ctor : [];
+ } else {
+ accumulator = isFunction(Ctor) ? baseCreate(getPrototype(object)) : {};
+ }
+ } else {
+ accumulator = {};
+ }
+ }
+ (isArr ? arrayEach : baseForOwn)(object, function(value, index, object) {
+ return iteratee(accumulator, value, index, object);
+ });
+ return accumulator;
+ }
+
+ /**
+ * Removes the property at `path` of `object`.
+ *
+ * **Note:** This method mutates `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Object
+ * @param {Object} object The object to modify.
+ * @param {Array|string} path The path of the property to unset.
+ * @returns {boolean} Returns `true` if the property is deleted, else `false`.
+ * @example
+ *
+ * var object = { 'a': [{ 'b': { 'c': 7 } }] };
+ * _.unset(object, 'a[0].b.c');
+ * // => true
+ *
+ * console.log(object);
+ * // => { 'a': [{ 'b': {} }] };
+ *
+ * _.unset(object, ['a', '0', 'b', 'c']);
+ * // => true
+ *
+ * console.log(object);
+ * // => { 'a': [{ 'b': {} }] };
+ */
+ function unset(object, path) {
+ return object == null ? true : baseUnset(object, path);
+ }
+
+ /**
+ * This method is like `_.set` except that accepts `updater` to produce the
+ * value to set. Use `_.updateWith` to customize `path` creation. The `updater`
+ * is invoked with one argument: (value).
+ *
+ * **Note:** This method mutates `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.6.0
+ * @category Object
+ * @param {Object} object The object to modify.
+ * @param {Array|string} path The path of the property to set.
+ * @param {Function} updater The function to produce the updated value.
+ * @returns {Object} Returns `object`.
+ * @example
+ *
+ * var object = { 'a': [{ 'b': { 'c': 3 } }] };
+ *
+ * _.update(object, 'a[0].b.c', function(n) { return n * n; });
+ * console.log(object.a[0].b.c);
+ * // => 9
+ *
+ * _.update(object, 'x[0].y.z', function(n) { return n ? n + 1 : 0; });
+ * console.log(object.x[0].y.z);
+ * // => 0
+ */
+ function update(object, path, updater) {
+ return object == null ? object : baseUpdate(object, path, castFunction(updater));
+ }
+
+ /**
+ * This method is like `_.update` except that it accepts `customizer` which is
+ * invoked to produce the objects of `path`. If `customizer` returns `undefined`
+ * path creation is handled by the method instead. The `customizer` is invoked
+ * with three arguments: (nsValue, key, nsObject).
+ *
+ * **Note:** This method mutates `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.6.0
+ * @category Object
+ * @param {Object} object The object to modify.
+ * @param {Array|string} path The path of the property to set.
+ * @param {Function} updater The function to produce the updated value.
+ * @param {Function} [customizer] The function to customize assigned values.
+ * @returns {Object} Returns `object`.
+ * @example
+ *
+ * var object = {};
+ *
+ * _.updateWith(object, '[0][1]', _.constant('a'), Object);
+ * // => { '0': { '1': 'a' } }
+ */
+ function updateWith(object, path, updater, customizer) {
+ customizer = typeof customizer == 'function' ? customizer : undefined;
+ return object == null ? object : baseUpdate(object, path, castFunction(updater), customizer);
+ }
+
+ /**
+ * Creates an array of the own enumerable string keyed property values of `object`.
+ *
+ * **Note:** Non-object values are coerced to objects.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property values.
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.values(new Foo);
+ * // => [1, 2] (iteration order is not guaranteed)
+ *
+ * _.values('hi');
+ * // => ['h', 'i']
+ */
+ function values(object) {
+ return object ? baseValues(object, keys(object)) : [];
+ }
+
+ /**
+ * Creates an array of the own and inherited enumerable string keyed property
+ * values of `object`.
+ *
+ * **Note:** Non-object values are coerced to objects.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Object
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property values.
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.valuesIn(new Foo);
+ * // => [1, 2, 3] (iteration order is not guaranteed)
+ */
+ function valuesIn(object) {
+ return object == null ? [] : baseValues(object, keysIn(object));
+ }
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Clamps `number` within the inclusive `lower` and `upper` bounds.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Number
+ * @param {number} number The number to clamp.
+ * @param {number} [lower] The lower bound.
+ * @param {number} upper The upper bound.
+ * @returns {number} Returns the clamped number.
+ * @example
+ *
+ * _.clamp(-10, -5, 5);
+ * // => -5
+ *
+ * _.clamp(10, -5, 5);
+ * // => 5
+ */
+ function clamp(number, lower, upper) {
+ if (upper === undefined) {
+ upper = lower;
+ lower = undefined;
+ }
+ if (upper !== undefined) {
+ upper = toNumber(upper);
+ upper = upper === upper ? upper : 0;
+ }
+ if (lower !== undefined) {
+ lower = toNumber(lower);
+ lower = lower === lower ? lower : 0;
+ }
+ return baseClamp(toNumber(number), lower, upper);
+ }
+
+ /**
+ * Checks if `n` is between `start` and up to, but not including, `end`. If
+ * `end` is not specified, it's set to `start` with `start` then set to `0`.
+ * If `start` is greater than `end` the params are swapped to support
+ * negative ranges.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.3.0
+ * @category Number
+ * @param {number} number The number to check.
+ * @param {number} [start=0] The start of the range.
+ * @param {number} end The end of the range.
+ * @returns {boolean} Returns `true` if `number` is in the range, else `false`.
+ * @see _.range, _.rangeRight
+ * @example
+ *
+ * _.inRange(3, 2, 4);
+ * // => true
+ *
+ * _.inRange(4, 8);
+ * // => true
+ *
+ * _.inRange(4, 2);
+ * // => false
+ *
+ * _.inRange(2, 2);
+ * // => false
+ *
+ * _.inRange(1.2, 2);
+ * // => true
+ *
+ * _.inRange(5.2, 4);
+ * // => false
+ *
+ * _.inRange(-3, -2, -6);
+ * // => true
+ */
+ function inRange(number, start, end) {
+ start = toNumber(start) || 0;
+ if (end === undefined) {
+ end = start;
+ start = 0;
+ } else {
+ end = toNumber(end) || 0;
+ }
+ number = toNumber(number);
+ return baseInRange(number, start, end);
+ }
+
+ /**
+ * Produces a random number between the inclusive `lower` and `upper` bounds.
+ * If only one argument is provided a number between `0` and the given number
+ * is returned. If `floating` is `true`, or either `lower` or `upper` are
+ * floats, a floating-point number is returned instead of an integer.
+ *
+ * **Note:** JavaScript follows the IEEE-754 standard for resolving
+ * floating-point values which can produce unexpected results.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.7.0
+ * @category Number
+ * @param {number} [lower=0] The lower bound.
+ * @param {number} [upper=1] The upper bound.
+ * @param {boolean} [floating] Specify returning a floating-point number.
+ * @returns {number} Returns the random number.
+ * @example
+ *
+ * _.random(0, 5);
+ * // => an integer between 0 and 5
+ *
+ * _.random(5);
+ * // => also an integer between 0 and 5
+ *
+ * _.random(5, true);
+ * // => a floating-point number between 0 and 5
+ *
+ * _.random(1.2, 5.2);
+ * // => a floating-point number between 1.2 and 5.2
+ */
+ function random(lower, upper, floating) {
+ if (floating && typeof floating != 'boolean' && isIterateeCall(lower, upper, floating)) {
+ upper = floating = undefined;
+ }
+ if (floating === undefined) {
+ if (typeof upper == 'boolean') {
+ floating = upper;
+ upper = undefined;
+ }
+ else if (typeof lower == 'boolean') {
+ floating = lower;
+ lower = undefined;
+ }
+ }
+ if (lower === undefined && upper === undefined) {
+ lower = 0;
+ upper = 1;
+ }
+ else {
+ lower = toNumber(lower) || 0;
+ if (upper === undefined) {
+ upper = lower;
+ lower = 0;
+ } else {
+ upper = toNumber(upper) || 0;
+ }
+ }
+ if (lower > upper) {
+ var temp = lower;
+ lower = upper;
+ upper = temp;
+ }
+ if (floating || lower % 1 || upper % 1) {
+ var rand = nativeRandom();
+ return nativeMin(lower + (rand * (upper - lower + freeParseFloat('1e-' + ((rand + '').length - 1)))), upper);
+ }
+ return baseRandom(lower, upper);
+ }
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase).
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category String
+ * @param {string} [string=''] The string to convert.
+ * @returns {string} Returns the camel cased string.
+ * @example
+ *
+ * _.camelCase('Foo Bar');
+ * // => 'fooBar'
+ *
+ * _.camelCase('--foo-bar--');
+ * // => 'fooBar'
+ *
+ * _.camelCase('__FOO_BAR__');
+ * // => 'fooBar'
+ */
+ var camelCase = createCompounder(function(result, word, index) {
+ word = word.toLowerCase();
+ return result + (index ? capitalize(word) : word);
+ });
+
+ /**
+ * Converts the first character of `string` to upper case and the remaining
+ * to lower case.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category String
+ * @param {string} [string=''] The string to capitalize.
+ * @returns {string} Returns the capitalized string.
+ * @example
+ *
+ * _.capitalize('FRED');
+ * // => 'Fred'
+ */
+ function capitalize(string) {
+ return upperFirst(toString(string).toLowerCase());
+ }
+
+ /**
+ * Deburrs `string` by converting
+ * [latin-1 supplementary letters](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table)
+ * to basic latin letters and removing
+ * [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks).
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category String
+ * @param {string} [string=''] The string to deburr.
+ * @returns {string} Returns the deburred string.
+ * @example
+ *
+ * _.deburr('déjà vu');
+ * // => 'deja vu'
+ */
+ function deburr(string) {
+ string = toString(string);
+ return string && string.replace(reLatin1, deburrLetter).replace(reComboMark, '');
+ }
+
+ /**
+ * Checks if `string` ends with the given target string.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category String
+ * @param {string} [string=''] The string to search.
+ * @param {string} [target] The string to search for.
+ * @param {number} [position=string.length] The position to search from.
+ * @returns {boolean} Returns `true` if `string` ends with `target`,
+ * else `false`.
+ * @example
+ *
+ * _.endsWith('abc', 'c');
+ * // => true
+ *
+ * _.endsWith('abc', 'b');
+ * // => false
+ *
+ * _.endsWith('abc', 'b', 2);
+ * // => true
+ */
+ function endsWith(string, target, position) {
+ string = toString(string);
+ target = baseToString(target);
+
+ var length = string.length;
+ position = position === undefined
+ ? length
+ : baseClamp(toInteger(position), 0, length);
+
+ position -= target.length;
+ return position >= 0 && string.indexOf(target, position) == position;
+ }
+
+ /**
+ * Converts the characters "&", "<", ">", '"', "'", and "\`" in `string` to
+ * their corresponding HTML entities.
+ *
+ * **Note:** No other characters are escaped. To escape additional
+ * characters use a third-party library like [_he_](https://mths.be/he).
+ *
+ * Though the ">" character is escaped for symmetry, characters like
+ * ">" and "/" don't need escaping in HTML and have no special meaning
+ * unless they're part of a tag or unquoted attribute value. See
+ * [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands)
+ * (under "semi-related fun fact") for more details.
+ *
+ * Backticks are escaped because in IE < 9, they can break out of
+ * attribute values or HTML comments. See [#59](https://html5sec.org/#59),
+ * [#102](https://html5sec.org/#102), [#108](https://html5sec.org/#108), and
+ * [#133](https://html5sec.org/#133) of the
+ * [HTML5 Security Cheatsheet](https://html5sec.org/) for more details.
+ *
+ * When working with HTML you should always
+ * [quote attribute values](http://wonko.com/post/html-escaping) to reduce
+ * XSS vectors.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category String
+ * @param {string} [string=''] The string to escape.
+ * @returns {string} Returns the escaped string.
+ * @example
+ *
+ * _.escape('fred, barney, & pebbles');
+ * // => 'fred, barney, & pebbles'
+ */
+ function escape(string) {
+ string = toString(string);
+ return (string && reHasUnescapedHtml.test(string))
+ ? string.replace(reUnescapedHtml, escapeHtmlChar)
+ : string;
+ }
+
+ /**
+ * Escapes the `RegExp` special characters "^", "$", "\", ".", "*", "+",
+ * "?", "(", ")", "[", "]", "{", "}", and "|" in `string`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category String
+ * @param {string} [string=''] The string to escape.
+ * @returns {string} Returns the escaped string.
+ * @example
+ *
+ * _.escapeRegExp('[lodash](https://lodash.com/)');
+ * // => '\[lodash\]\(https://lodash\.com/\)'
+ */
+ function escapeRegExp(string) {
+ string = toString(string);
+ return (string && reHasRegExpChar.test(string))
+ ? string.replace(reRegExpChar, '\\$&')
+ : string;
+ }
+
+ /**
+ * Converts `string` to
+ * [kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles).
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category String
+ * @param {string} [string=''] The string to convert.
+ * @returns {string} Returns the kebab cased string.
+ * @example
+ *
+ * _.kebabCase('Foo Bar');
+ * // => 'foo-bar'
+ *
+ * _.kebabCase('fooBar');
+ * // => 'foo-bar'
+ *
+ * _.kebabCase('__FOO_BAR__');
+ * // => 'foo-bar'
+ */
+ var kebabCase = createCompounder(function(result, word, index) {
+ return result + (index ? '-' : '') + word.toLowerCase();
+ });
+
+ /**
+ * Converts `string`, as space separated words, to lower case.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category String
+ * @param {string} [string=''] The string to convert.
+ * @returns {string} Returns the lower cased string.
+ * @example
+ *
+ * _.lowerCase('--Foo-Bar--');
+ * // => 'foo bar'
+ *
+ * _.lowerCase('fooBar');
+ * // => 'foo bar'
+ *
+ * _.lowerCase('__FOO_BAR__');
+ * // => 'foo bar'
+ */
+ var lowerCase = createCompounder(function(result, word, index) {
+ return result + (index ? ' ' : '') + word.toLowerCase();
+ });
+
+ /**
+ * Converts the first character of `string` to lower case.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category String
+ * @param {string} [string=''] The string to convert.
+ * @returns {string} Returns the converted string.
+ * @example
+ *
+ * _.lowerFirst('Fred');
+ * // => 'fred'
+ *
+ * _.lowerFirst('FRED');
+ * // => 'fRED'
+ */
+ var lowerFirst = createCaseFirst('toLowerCase');
+
+ /**
+ * Pads `string` on the left and right sides if it's shorter than `length`.
+ * Padding characters are truncated if they can't be evenly divided by `length`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category String
+ * @param {string} [string=''] The string to pad.
+ * @param {number} [length=0] The padding length.
+ * @param {string} [chars=' '] The string used as padding.
+ * @returns {string} Returns the padded string.
+ * @example
+ *
+ * _.pad('abc', 8);
+ * // => ' abc '
+ *
+ * _.pad('abc', 8, '_-');
+ * // => '_-abc_-_'
+ *
+ * _.pad('abc', 3);
+ * // => 'abc'
+ */
+ function pad(string, length, chars) {
+ string = toString(string);
+ length = toInteger(length);
+
+ var strLength = length ? stringSize(string) : 0;
+ if (!length || strLength >= length) {
+ return string;
+ }
+ var mid = (length - strLength) / 2;
+ return (
+ createPadding(nativeFloor(mid), chars) +
+ string +
+ createPadding(nativeCeil(mid), chars)
+ );
+ }
+
+ /**
+ * Pads `string` on the right side if it's shorter than `length`. Padding
+ * characters are truncated if they exceed `length`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category String
+ * @param {string} [string=''] The string to pad.
+ * @param {number} [length=0] The padding length.
+ * @param {string} [chars=' '] The string used as padding.
+ * @returns {string} Returns the padded string.
+ * @example
+ *
+ * _.padEnd('abc', 6);
+ * // => 'abc '
+ *
+ * _.padEnd('abc', 6, '_-');
+ * // => 'abc_-_'
+ *
+ * _.padEnd('abc', 3);
+ * // => 'abc'
+ */
+ function padEnd(string, length, chars) {
+ string = toString(string);
+ length = toInteger(length);
+
+ var strLength = length ? stringSize(string) : 0;
+ return (length && strLength < length)
+ ? (string + createPadding(length - strLength, chars))
+ : string;
+ }
+
+ /**
+ * Pads `string` on the left side if it's shorter than `length`. Padding
+ * characters are truncated if they exceed `length`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category String
+ * @param {string} [string=''] The string to pad.
+ * @param {number} [length=0] The padding length.
+ * @param {string} [chars=' '] The string used as padding.
+ * @returns {string} Returns the padded string.
+ * @example
+ *
+ * _.padStart('abc', 6);
+ * // => ' abc'
+ *
+ * _.padStart('abc', 6, '_-');
+ * // => '_-_abc'
+ *
+ * _.padStart('abc', 3);
+ * // => 'abc'
+ */
+ function padStart(string, length, chars) {
+ string = toString(string);
+ length = toInteger(length);
+
+ var strLength = length ? stringSize(string) : 0;
+ return (length && strLength < length)
+ ? (createPadding(length - strLength, chars) + string)
+ : string;
+ }
+
+ /**
+ * Converts `string` to an integer of the specified radix. If `radix` is
+ * `undefined` or `0`, a `radix` of `10` is used unless `value` is a
+ * hexadecimal, in which case a `radix` of `16` is used.
+ *
+ * **Note:** This method aligns with the
+ * [ES5 implementation](https://es5.github.io/#x15.1.2.2) of `parseInt`.
+ *
+ * @static
+ * @memberOf _
+ * @since 1.1.0
+ * @category String
+ * @param {string} string The string to convert.
+ * @param {number} [radix=10] The radix to interpret `value` by.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {number} Returns the converted integer.
+ * @example
+ *
+ * _.parseInt('08');
+ * // => 8
+ *
+ * _.map(['6', '08', '10'], _.parseInt);
+ * // => [6, 8, 10]
+ */
+ function parseInt(string, radix, guard) {
+ // Chrome fails to trim leading <BOM> whitespace characters.
+ // See https://bugs.chromium.org/p/v8/issues/detail?id=3109 for more details.
+ if (guard || radix == null) {
+ radix = 0;
+ } else if (radix) {
+ radix = +radix;
+ }
+ string = toString(string).replace(reTrim, '');
+ return nativeParseInt(string, radix || (reHasHexPrefix.test(string) ? 16 : 10));
+ }
+
+ /**
+ * Repeats the given string `n` times.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category String
+ * @param {string} [string=''] The string to repeat.
+ * @param {number} [n=1] The number of times to repeat the string.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {string} Returns the repeated string.
+ * @example
+ *
+ * _.repeat('*', 3);
+ * // => '***'
+ *
+ * _.repeat('abc', 2);
+ * // => 'abcabc'
+ *
+ * _.repeat('abc', 0);
+ * // => ''
+ */
+ function repeat(string, n, guard) {
+ if ((guard ? isIterateeCall(string, n, guard) : n === undefined)) {
+ n = 1;
+ } else {
+ n = toInteger(n);
+ }
+ return baseRepeat(toString(string), n);
+ }
+
+ /**
+ * Replaces matches for `pattern` in `string` with `replacement`.
+ *
+ * **Note:** This method is based on
+ * [`String#replace`](https://mdn.io/String/replace).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category String
+ * @param {string} [string=''] The string to modify.
+ * @param {RegExp|string} pattern The pattern to replace.
+ * @param {Function|string} replacement The match replacement.
+ * @returns {string} Returns the modified string.
+ * @example
+ *
+ * _.replace('Hi Fred', 'Fred', 'Barney');
+ * // => 'Hi Barney'
+ */
+ function replace() {
+ var args = arguments,
+ string = toString(args[0]);
+
+ return args.length < 3 ? string : nativeReplace.call(string, args[1], args[2]);
+ }
+
+ /**
+ * Converts `string` to
+ * [snake case](https://en.wikipedia.org/wiki/Snake_case).
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category String
+ * @param {string} [string=''] The string to convert.
+ * @returns {string} Returns the snake cased string.
+ * @example
+ *
+ * _.snakeCase('Foo Bar');
+ * // => 'foo_bar'
+ *
+ * _.snakeCase('fooBar');
+ * // => 'foo_bar'
+ *
+ * _.snakeCase('--FOO-BAR--');
+ * // => 'foo_bar'
+ */
+ var snakeCase = createCompounder(function(result, word, index) {
+ return result + (index ? '_' : '') + word.toLowerCase();
+ });
+
+ /**
+ * Splits `string` by `separator`.
+ *
+ * **Note:** This method is based on
+ * [`String#split`](https://mdn.io/String/split).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category String
+ * @param {string} [string=''] The string to split.
+ * @param {RegExp|string} separator The separator pattern to split by.
+ * @param {number} [limit] The length to truncate results to.
+ * @returns {Array} Returns the new array of string segments.
+ * @example
+ *
+ * _.split('a-b-c', '-', 2);
+ * // => ['a', 'b']
+ */
+ function split(string, separator, limit) {
+ if (limit && typeof limit != 'number' && isIterateeCall(string, separator, limit)) {
+ separator = limit = undefined;
+ }
+ limit = limit === undefined ? MAX_ARRAY_LENGTH : limit >>> 0;
+ if (!limit) {
+ return [];
+ }
+ string = toString(string);
+ if (string && (
+ typeof separator == 'string' ||
+ (separator != null && !isRegExp(separator))
+ )) {
+ separator = baseToString(separator);
+ if (separator == '' && reHasComplexSymbol.test(string)) {
+ return castSlice(stringToArray(string), 0, limit);
+ }
+ }
+ return nativeSplit.call(string, separator, limit);
+ }
+
+ /**
+ * Converts `string` to
+ * [start case](https://en.wikipedia.org/wiki/Letter_case#Stylistic_or_specialised_usage).
+ *
+ * @static
+ * @memberOf _
+ * @since 3.1.0
+ * @category String
+ * @param {string} [string=''] The string to convert.
+ * @returns {string} Returns the start cased string.
+ * @example
+ *
+ * _.startCase('--foo-bar--');
+ * // => 'Foo Bar'
+ *
+ * _.startCase('fooBar');
+ * // => 'Foo Bar'
+ *
+ * _.startCase('__FOO_BAR__');
+ * // => 'FOO BAR'
+ */
+ var startCase = createCompounder(function(result, word, index) {
+ return result + (index ? ' ' : '') + upperFirst(word);
+ });
+
+ /**
+ * Checks if `string` starts with the given target string.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category String
+ * @param {string} [string=''] The string to search.
+ * @param {string} [target] The string to search for.
+ * @param {number} [position=0] The position to search from.
+ * @returns {boolean} Returns `true` if `string` starts with `target`,
+ * else `false`.
+ * @example
+ *
+ * _.startsWith('abc', 'a');
+ * // => true
+ *
+ * _.startsWith('abc', 'b');
+ * // => false
+ *
+ * _.startsWith('abc', 'b', 1);
+ * // => true
+ */
+ function startsWith(string, target, position) {
+ string = toString(string);
+ position = baseClamp(toInteger(position), 0, string.length);
+ return string.lastIndexOf(baseToString(target), position) == position;
+ }
+
+ /**
+ * Creates a compiled template function that can interpolate data properties
+ * in "interpolate" delimiters, HTML-escape interpolated data properties in
+ * "escape" delimiters, and execute JavaScript in "evaluate" delimiters. Data
+ * properties may be accessed as free variables in the template. If a setting
+ * object is given, it takes precedence over `_.templateSettings` values.
+ *
+ * **Note:** In the development build `_.template` utilizes
+ * [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl)
+ * for easier debugging.
+ *
+ * For more information on precompiling templates see
+ * [lodash's custom builds documentation](https://lodash.com/custom-builds).
+ *
+ * For more information on Chrome extension sandboxes see
+ * [Chrome's extensions documentation](https://developer.chrome.com/extensions/sandboxingEval).
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category String
+ * @param {string} [string=''] The template string.
+ * @param {Object} [options={}] The options object.
+ * @param {RegExp} [options.escape=_.templateSettings.escape]
+ * The HTML "escape" delimiter.
+ * @param {RegExp} [options.evaluate=_.templateSettings.evaluate]
+ * The "evaluate" delimiter.
+ * @param {Object} [options.imports=_.templateSettings.imports]
+ * An object to import into the template as free variables.
+ * @param {RegExp} [options.interpolate=_.templateSettings.interpolate]
+ * The "interpolate" delimiter.
+ * @param {string} [options.sourceURL='lodash.templateSources[n]']
+ * The sourceURL of the compiled template.
+ * @param {string} [options.variable='obj']
+ * The data object variable name.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {Function} Returns the compiled template function.
+ * @example
+ *
+ * // Use the "interpolate" delimiter to create a compiled template.
+ * var compiled = _.template('hello <%= user %>!');
+ * compiled({ 'user': 'fred' });
+ * // => 'hello fred!'
+ *
+ * // Use the HTML "escape" delimiter to escape data property values.
+ * var compiled = _.template('<b><%- value %></b>');
+ * compiled({ 'value': '<script>' });
+ * // => '<b><script></b>'
+ *
+ * // Use the "evaluate" delimiter to execute JavaScript and generate HTML.
+ * var compiled = _.template('<% _.forEach(users, function(user) { %><li><%- user %></li><% }); %>');
+ * compiled({ 'users': ['fred', 'barney'] });
+ * // => '<li>fred</li><li>barney</li>'
+ *
+ * // Use the internal `print` function in "evaluate" delimiters.
+ * var compiled = _.template('<% print("hello " + user); %>!');
+ * compiled({ 'user': 'barney' });
+ * // => 'hello barney!'
+ *
+ * // Use the ES delimiter as an alternative to the default "interpolate" delimiter.
+ * var compiled = _.template('hello ${ user }!');
+ * compiled({ 'user': 'pebbles' });
+ * // => 'hello pebbles!'
+ *
+ * // Use custom template delimiters.
+ * _.templateSettings.interpolate = /{{([\s\S]+?)}}/g;
+ * var compiled = _.template('hello {{ user }}!');
+ * compiled({ 'user': 'mustache' });
+ * // => 'hello mustache!'
+ *
+ * // Use backslashes to treat delimiters as plain text.
+ * var compiled = _.template('<%= "\\<%- value %\\>" %>');
+ * compiled({ 'value': 'ignored' });
+ * // => '<%- value %>'
+ *
+ * // Use the `imports` option to import `jQuery` as `jq`.
+ * var text = '<% jq.each(users, function(user) { %><li><%- user %></li><% }); %>';
+ * var compiled = _.template(text, { 'imports': { 'jq': jQuery } });
+ * compiled({ 'users': ['fred', 'barney'] });
+ * // => '<li>fred</li><li>barney</li>'
+ *
+ * // Use the `sourceURL` option to specify a custom sourceURL for the template.
+ * var compiled = _.template('hello <%= user %>!', { 'sourceURL': '/basic/greeting.jst' });
+ * compiled(data);
+ * // => Find the source of "greeting.jst" under the Sources tab or Resources panel of the web inspector.
+ *
+ * // Use the `variable` option to ensure a with-statement isn't used in the compiled template.
+ * var compiled = _.template('hi <%= data.user %>!', { 'variable': 'data' });
+ * compiled.source;
+ * // => function(data) {
+ * // var __t, __p = '';
+ * // __p += 'hi ' + ((__t = ( data.user )) == null ? '' : __t) + '!';
+ * // return __p;
+ * // }
+ *
+ * // Use the `source` property to inline compiled templates for meaningful
+ * // line numbers in error messages and stack traces.
+ * fs.writeFileSync(path.join(cwd, 'jst.js'), '\
+ * var JST = {\
+ * "main": ' + _.template(mainText).source + '\
+ * };\
+ * ');
+ */
+ function template(string, options, guard) {
+ // Based on John Resig's `tmpl` implementation
+ // (http://ejohn.org/blog/javascript-micro-templating/)
+ // and Laura Doktorova's doT.js (https://github.com/olado/doT).
+ var settings = lodash.templateSettings;
+
+ if (guard && isIterateeCall(string, options, guard)) {
+ options = undefined;
+ }
+ string = toString(string);
+ options = assignInWith({}, options, settings, assignInDefaults);
+
+ var imports = assignInWith({}, options.imports, settings.imports, assignInDefaults),
+ importsKeys = keys(imports),
+ importsValues = baseValues(imports, importsKeys);
+
+ var isEscaping,
+ isEvaluating,
+ index = 0,
+ interpolate = options.interpolate || reNoMatch,
+ source = "__p += '";
+
+ // Compile the regexp to match each delimiter.
+ var reDelimiters = RegExp(
+ (options.escape || reNoMatch).source + '|' +
+ interpolate.source + '|' +
+ (interpolate === reInterpolate ? reEsTemplate : reNoMatch).source + '|' +
+ (options.evaluate || reNoMatch).source + '|$'
+ , 'g');
+
+ // Use a sourceURL for easier debugging.
+ var sourceURL = '//# sourceURL=' +
+ ('sourceURL' in options
+ ? options.sourceURL
+ : ('lodash.templateSources[' + (++templateCounter) + ']')
+ ) + '\n';
+
+ string.replace(reDelimiters, function(match, escapeValue, interpolateValue, esTemplateValue, evaluateValue, offset) {
+ interpolateValue || (interpolateValue = esTemplateValue);
+
+ // Escape characters that can't be included in string literals.
+ source += string.slice(index, offset).replace(reUnescapedString, escapeStringChar);
+
+ // Replace delimiters with snippets.
+ if (escapeValue) {
+ isEscaping = true;
+ source += "' +\n__e(" + escapeValue + ") +\n'";
+ }
+ if (evaluateValue) {
+ isEvaluating = true;
+ source += "';\n" + evaluateValue + ";\n__p += '";
+ }
+ if (interpolateValue) {
+ source += "' +\n((__t = (" + interpolateValue + ")) == null ? '' : __t) +\n'";
+ }
+ index = offset + match.length;
+
+ // The JS engine embedded in Adobe products needs `match` returned in
+ // order to produce the correct `offset` value.
+ return match;
+ });
+
+ source += "';\n";
+
+ // If `variable` is not specified wrap a with-statement around the generated
+ // code to add the data object to the top of the scope chain.
+ var variable = options.variable;
+ if (!variable) {
+ source = 'with (obj) {\n' + source + '\n}\n';
+ }
+ // Cleanup code by stripping empty strings.
+ source = (isEvaluating ? source.replace(reEmptyStringLeading, '') : source)
+ .replace(reEmptyStringMiddle, '$1')
+ .replace(reEmptyStringTrailing, '$1;');
+
+ // Frame code as the function body.
+ source = 'function(' + (variable || 'obj') + ') {\n' +
+ (variable
+ ? ''
+ : 'obj || (obj = {});\n'
+ ) +
+ "var __t, __p = ''" +
+ (isEscaping
+ ? ', __e = _.escape'
+ : ''
+ ) +
+ (isEvaluating
+ ? ', __j = Array.prototype.join;\n' +
+ "function print() { __p += __j.call(arguments, '') }\n"
+ : ';\n'
+ ) +
+ source +
+ 'return __p\n}';
+
+ var result = attempt(function() {
+ return Function(importsKeys, sourceURL + 'return ' + source)
+ .apply(undefined, importsValues);
+ });
+
+ // Provide the compiled function's source by its `toString` method or
+ // the `source` property as a convenience for inlining compiled templates.
+ result.source = source;
+ if (isError(result)) {
+ throw result;
+ }
+ return result;
+ }
+
+ /**
+ * Converts `string`, as a whole, to lower case just like
+ * [String#toLowerCase](https://mdn.io/toLowerCase).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category String
+ * @param {string} [string=''] The string to convert.
+ * @returns {string} Returns the lower cased string.
+ * @example
+ *
+ * _.toLower('--Foo-Bar--');
+ * // => '--foo-bar--'
+ *
+ * _.toLower('fooBar');
+ * // => 'foobar'
+ *
+ * _.toLower('__FOO_BAR__');
+ * // => '__foo_bar__'
+ */
+ function toLower(value) {
+ return toString(value).toLowerCase();
+ }
+
+ /**
+ * Converts `string`, as a whole, to upper case just like
+ * [String#toUpperCase](https://mdn.io/toUpperCase).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category String
+ * @param {string} [string=''] The string to convert.
+ * @returns {string} Returns the upper cased string.
+ * @example
+ *
+ * _.toUpper('--foo-bar--');
+ * // => '--FOO-BAR--'
+ *
+ * _.toUpper('fooBar');
+ * // => 'FOOBAR'
+ *
+ * _.toUpper('__foo_bar__');
+ * // => '__FOO_BAR__'
+ */
+ function toUpper(value) {
+ return toString(value).toUpperCase();
+ }
+
+ /**
+ * Removes leading and trailing whitespace or specified characters from `string`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category String
+ * @param {string} [string=''] The string to trim.
+ * @param {string} [chars=whitespace] The characters to trim.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {string} Returns the trimmed string.
+ * @example
+ *
+ * _.trim(' abc ');
+ * // => 'abc'
+ *
+ * _.trim('-_-abc-_-', '_-');
+ * // => 'abc'
+ *
+ * _.map([' foo ', ' bar '], _.trim);
+ * // => ['foo', 'bar']
+ */
+ function trim(string, chars, guard) {
+ string = toString(string);
+ if (string && (guard || chars === undefined)) {
+ return string.replace(reTrim, '');
+ }
+ if (!string || !(chars = baseToString(chars))) {
+ return string;
+ }
+ var strSymbols = stringToArray(string),
+ chrSymbols = stringToArray(chars),
+ start = charsStartIndex(strSymbols, chrSymbols),
+ end = charsEndIndex(strSymbols, chrSymbols) + 1;
+
+ return castSlice(strSymbols, start, end).join('');
+ }
+
+ /**
+ * Removes trailing whitespace or specified characters from `string`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category String
+ * @param {string} [string=''] The string to trim.
+ * @param {string} [chars=whitespace] The characters to trim.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {string} Returns the trimmed string.
+ * @example
+ *
+ * _.trimEnd(' abc ');
+ * // => ' abc'
+ *
+ * _.trimEnd('-_-abc-_-', '_-');
+ * // => '-_-abc'
+ */
+ function trimEnd(string, chars, guard) {
+ string = toString(string);
+ if (string && (guard || chars === undefined)) {
+ return string.replace(reTrimEnd, '');
+ }
+ if (!string || !(chars = baseToString(chars))) {
+ return string;
+ }
+ var strSymbols = stringToArray(string),
+ end = charsEndIndex(strSymbols, stringToArray(chars)) + 1;
+
+ return castSlice(strSymbols, 0, end).join('');
+ }
+
+ /**
+ * Removes leading whitespace or specified characters from `string`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category String
+ * @param {string} [string=''] The string to trim.
+ * @param {string} [chars=whitespace] The characters to trim.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {string} Returns the trimmed string.
+ * @example
+ *
+ * _.trimStart(' abc ');
+ * // => 'abc '
+ *
+ * _.trimStart('-_-abc-_-', '_-');
+ * // => 'abc-_-'
+ */
+ function trimStart(string, chars, guard) {
+ string = toString(string);
+ if (string && (guard || chars === undefined)) {
+ return string.replace(reTrimStart, '');
+ }
+ if (!string || !(chars = baseToString(chars))) {
+ return string;
+ }
+ var strSymbols = stringToArray(string),
+ start = charsStartIndex(strSymbols, stringToArray(chars));
+
+ return castSlice(strSymbols, start).join('');
+ }
+
+ /**
+ * Truncates `string` if it's longer than the given maximum string length.
+ * The last characters of the truncated string are replaced with the omission
+ * string which defaults to "...".
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category String
+ * @param {string} [string=''] The string to truncate.
+ * @param {Object} [options={}] The options object.
+ * @param {number} [options.length=30] The maximum string length.
+ * @param {string} [options.omission='...'] The string to indicate text is omitted.
+ * @param {RegExp|string} [options.separator] The separator pattern to truncate to.
+ * @returns {string} Returns the truncated string.
+ * @example
+ *
+ * _.truncate('hi-diddly-ho there, neighborino');
+ * // => 'hi-diddly-ho there, neighbo...'
+ *
+ * _.truncate('hi-diddly-ho there, neighborino', {
+ * 'length': 24,
+ * 'separator': ' '
+ * });
+ * // => 'hi-diddly-ho there,...'
+ *
+ * _.truncate('hi-diddly-ho there, neighborino', {
+ * 'length': 24,
+ * 'separator': /,? +/
+ * });
+ * // => 'hi-diddly-ho there...'
+ *
+ * _.truncate('hi-diddly-ho there, neighborino', {
+ * 'omission': ' [...]'
+ * });
+ * // => 'hi-diddly-ho there, neig [...]'
+ */
+ function truncate(string, options) {
+ var length = DEFAULT_TRUNC_LENGTH,
+ omission = DEFAULT_TRUNC_OMISSION;
+
+ if (isObject(options)) {
+ var separator = 'separator' in options ? options.separator : separator;
+ length = 'length' in options ? toInteger(options.length) : length;
+ omission = 'omission' in options ? baseToString(options.omission) : omission;
+ }
+ string = toString(string);
+
+ var strLength = string.length;
+ if (reHasComplexSymbol.test(string)) {
+ var strSymbols = stringToArray(string);
+ strLength = strSymbols.length;
+ }
+ if (length >= strLength) {
+ return string;
+ }
+ var end = length - stringSize(omission);
+ if (end < 1) {
+ return omission;
+ }
+ var result = strSymbols
+ ? castSlice(strSymbols, 0, end).join('')
+ : string.slice(0, end);
+
+ if (separator === undefined) {
+ return result + omission;
+ }
+ if (strSymbols) {
+ end += (result.length - end);
+ }
+ if (isRegExp(separator)) {
+ if (string.slice(end).search(separator)) {
+ var match,
+ substring = result;
+
+ if (!separator.global) {
+ separator = RegExp(separator.source, toString(reFlags.exec(separator)) + 'g');
+ }
+ separator.lastIndex = 0;
+ while ((match = separator.exec(substring))) {
+ var newEnd = match.index;
+ }
+ result = result.slice(0, newEnd === undefined ? end : newEnd);
+ }
+ } else if (string.indexOf(baseToString(separator), end) != end) {
+ var index = result.lastIndexOf(separator);
+ if (index > -1) {
+ result = result.slice(0, index);
+ }
+ }
+ return result + omission;
+ }
+
+ /**
+ * The inverse of `_.escape`; this method converts the HTML entities
+ * `&`, `<`, `>`, `"`, `'`, and ``` in `string` to
+ * their corresponding characters.
+ *
+ * **Note:** No other HTML entities are unescaped. To unescape additional
+ * HTML entities use a third-party library like [_he_](https://mths.be/he).
+ *
+ * @static
+ * @memberOf _
+ * @since 0.6.0
+ * @category String
+ * @param {string} [string=''] The string to unescape.
+ * @returns {string} Returns the unescaped string.
+ * @example
+ *
+ * _.unescape('fred, barney, & pebbles');
+ * // => 'fred, barney, & pebbles'
+ */
+ function unescape(string) {
+ string = toString(string);
+ return (string && reHasEscapedHtml.test(string))
+ ? string.replace(reEscapedHtml, unescapeHtmlChar)
+ : string;
+ }
+
+ /**
+ * Converts `string`, as space separated words, to upper case.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category String
+ * @param {string} [string=''] The string to convert.
+ * @returns {string} Returns the upper cased string.
+ * @example
+ *
+ * _.upperCase('--foo-bar');
+ * // => 'FOO BAR'
+ *
+ * _.upperCase('fooBar');
+ * // => 'FOO BAR'
+ *
+ * _.upperCase('__foo_bar__');
+ * // => 'FOO BAR'
+ */
+ var upperCase = createCompounder(function(result, word, index) {
+ return result + (index ? ' ' : '') + word.toUpperCase();
+ });
+
+ /**
+ * Converts the first character of `string` to upper case.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category String
+ * @param {string} [string=''] The string to convert.
+ * @returns {string} Returns the converted string.
+ * @example
+ *
+ * _.upperFirst('fred');
+ * // => 'Fred'
+ *
+ * _.upperFirst('FRED');
+ * // => 'FRED'
+ */
+ var upperFirst = createCaseFirst('toUpperCase');
+
+ /**
+ * Splits `string` into an array of its words.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category String
+ * @param {string} [string=''] The string to inspect.
+ * @param {RegExp|string} [pattern] The pattern to match words.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {Array} Returns the words of `string`.
+ * @example
+ *
+ * _.words('fred, barney, & pebbles');
+ * // => ['fred', 'barney', 'pebbles']
+ *
+ * _.words('fred, barney, & pebbles', /[^, ]+/g);
+ * // => ['fred', 'barney', '&', 'pebbles']
+ */
+ function words(string, pattern, guard) {
+ string = toString(string);
+ pattern = guard ? undefined : pattern;
+
+ if (pattern === undefined) {
+ pattern = reHasComplexWord.test(string) ? reComplexWord : reBasicWord;
+ }
+ return string.match(pattern) || [];
+ }
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Attempts to invoke `func`, returning either the result or the caught error
+ * object. Any additional arguments are provided to `func` when it's invoked.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Util
+ * @param {Function} func The function to attempt.
+ * @param {...*} [args] The arguments to invoke `func` with.
+ * @returns {*} Returns the `func` result or error object.
+ * @example
+ *
+ * // Avoid throwing errors for invalid selectors.
+ * var elements = _.attempt(function(selector) {
+ * return document.querySelectorAll(selector);
+ * }, '>_>');
+ *
+ * if (_.isError(elements)) {
+ * elements = [];
+ * }
+ */
+ var attempt = rest(function(func, args) {
+ try {
+ return apply(func, undefined, args);
+ } catch (e) {
+ return isError(e) ? e : new Error(e);
+ }
+ });
+
+ /**
+ * Binds methods of an object to the object itself, overwriting the existing
+ * method.
+ *
+ * **Note:** This method doesn't set the "length" property of bound functions.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Util
+ * @param {Object} object The object to bind and assign the bound methods to.
+ * @param {...(string|string[])} methodNames The object method names to bind.
+ * @returns {Object} Returns `object`.
+ * @example
+ *
+ * var view = {
+ * 'label': 'docs',
+ * 'onClick': function() {
+ * console.log('clicked ' + this.label);
+ * }
+ * };
+ *
+ * _.bindAll(view, 'onClick');
+ * jQuery(element).on('click', view.onClick);
+ * // => Logs 'clicked docs' when clicked.
+ */
+ var bindAll = rest(function(object, methodNames) {
+ arrayEach(baseFlatten(methodNames, 1), function(key) {
+ key = toKey(key);
+ object[key] = bind(object[key], object);
+ });
+ return object;
+ });
+
+ /**
+ * Creates a function that iterates over `pairs` and invokes the corresponding
+ * function of the first predicate to return truthy. The predicate-function
+ * pairs are invoked with the `this` binding and arguments of the created
+ * function.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Util
+ * @param {Array} pairs The predicate-function pairs.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * var func = _.cond([
+ * [_.matches({ 'a': 1 }), _.constant('matches A')],
+ * [_.conforms({ 'b': _.isNumber }), _.constant('matches B')],
+ * [_.constant(true), _.constant('no match')]
+ * ]);
+ *
+ * func({ 'a': 1, 'b': 2 });
+ * // => 'matches A'
+ *
+ * func({ 'a': 0, 'b': 1 });
+ * // => 'matches B'
+ *
+ * func({ 'a': '1', 'b': '2' });
+ * // => 'no match'
+ */
+ function cond(pairs) {
+ var length = pairs ? pairs.length : 0,
+ toIteratee = getIteratee();
+
+ pairs = !length ? [] : arrayMap(pairs, function(pair) {
+ if (typeof pair[1] != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ return [toIteratee(pair[0]), pair[1]];
+ });
+
+ return rest(function(args) {
+ var index = -1;
+ while (++index < length) {
+ var pair = pairs[index];
+ if (apply(pair[0], this, args)) {
+ return apply(pair[1], this, args);
+ }
+ }
+ });
+ }
+
+ /**
+ * Creates a function that invokes the predicate properties of `source` with
+ * the corresponding property values of a given object, returning `true` if
+ * all predicates return truthy, else `false`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Util
+ * @param {Object} source The object of property predicates to conform to.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'age': 36 },
+ * { 'user': 'fred', 'age': 40 }
+ * ];
+ *
+ * _.filter(users, _.conforms({ 'age': _.partial(_.gt, _, 38) }));
+ * // => [{ 'user': 'fred', 'age': 40 }]
+ */
+ function conforms(source) {
+ return baseConforms(baseClone(source, true));
+ }
+
+ /**
+ * Creates a function that returns `value`.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.4.0
+ * @category Util
+ * @param {*} value The value to return from the new function.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * var object = { 'user': 'fred' };
+ * var getter = _.constant(object);
+ *
+ * getter() === object;
+ * // => true
+ */
+ function constant(value) {
+ return function() {
+ return value;
+ };
+ }
+
+ /**
+ * Creates a function that returns the result of invoking the given functions
+ * with the `this` binding of the created function, where each successive
+ * invocation is supplied the return value of the previous.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Util
+ * @param {...(Function|Function[])} [funcs] Functions to invoke.
+ * @returns {Function} Returns the new function.
+ * @see _.flowRight
+ * @example
+ *
+ * function square(n) {
+ * return n * n;
+ * }
+ *
+ * var addSquare = _.flow(_.add, square);
+ * addSquare(1, 2);
+ * // => 9
+ */
+ var flow = createFlow();
+
+ /**
+ * This method is like `_.flow` except that it creates a function that
+ * invokes the given functions from right to left.
+ *
+ * @static
+ * @since 3.0.0
+ * @memberOf _
+ * @category Util
+ * @param {...(Function|Function[])} [funcs] Functions to invoke.
+ * @returns {Function} Returns the new function.
+ * @see _.flow
+ * @example
+ *
+ * function square(n) {
+ * return n * n;
+ * }
+ *
+ * var addSquare = _.flowRight(square, _.add);
+ * addSquare(1, 2);
+ * // => 9
+ */
+ var flowRight = createFlow(true);
+
+ /**
+ * This method returns the first argument given to it.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Util
+ * @param {*} value Any value.
+ * @returns {*} Returns `value`.
+ * @example
+ *
+ * var object = { 'user': 'fred' };
+ *
+ * _.identity(object) === object;
+ * // => true
+ */
+ function identity(value) {
+ return value;
+ }
+
+ /**
+ * Creates a function that invokes `func` with the arguments of the created
+ * function. If `func` is a property name, the created function returns the
+ * property value for a given element. If `func` is an array or object, the
+ * created function returns `true` for elements that contain the equivalent
+ * source properties, otherwise it returns `false`.
+ *
+ * @static
+ * @since 4.0.0
+ * @memberOf _
+ * @category Util
+ * @param {*} [func=_.identity] The value to convert to a callback.
+ * @returns {Function} Returns the callback.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'age': 36, 'active': true },
+ * { 'user': 'fred', 'age': 40, 'active': false }
+ * ];
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.filter(users, _.iteratee({ 'user': 'barney', 'active': true }));
+ * // => [{ 'user': 'barney', 'age': 36, 'active': true }]
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.filter(users, _.iteratee(['user', 'fred']));
+ * // => [{ 'user': 'fred', 'age': 40 }]
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.map(users, _.iteratee('user'));
+ * // => ['barney', 'fred']
+ *
+ * // Create custom iteratee shorthands.
+ * _.iteratee = _.wrap(_.iteratee, function(iteratee, func) {
+ * return !_.isRegExp(func) ? iteratee(func) : function(string) {
+ * return func.test(string);
+ * };
+ * });
+ *
+ * _.filter(['abc', 'def'], /ef/);
+ * // => ['def']
+ */
+ function iteratee(func) {
+ return baseIteratee(typeof func == 'function' ? func : baseClone(func, true));
+ }
+
+ /**
+ * Creates a function that performs a partial deep comparison between a given
+ * object and `source`, returning `true` if the given object has equivalent
+ * property values, else `false`. The created function is equivalent to
+ * `_.isMatch` with a `source` partially applied.
+ *
+ * **Note:** This method supports comparing the same values as `_.isEqual`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Util
+ * @param {Object} source The object of property values to match.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'age': 36, 'active': true },
+ * { 'user': 'fred', 'age': 40, 'active': false }
+ * ];
+ *
+ * _.filter(users, _.matches({ 'age': 40, 'active': false }));
+ * // => [{ 'user': 'fred', 'age': 40, 'active': false }]
+ */
+ function matches(source) {
+ return baseMatches(baseClone(source, true));
+ }
+
+ /**
+ * Creates a function that performs a partial deep comparison between the
+ * value at `path` of a given object to `srcValue`, returning `true` if the
+ * object value is equivalent, else `false`.
+ *
+ * **Note:** This method supports comparing the same values as `_.isEqual`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.2.0
+ * @category Util
+ * @param {Array|string} path The path of the property to get.
+ * @param {*} srcValue The value to match.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney' },
+ * { 'user': 'fred' }
+ * ];
+ *
+ * _.find(users, _.matchesProperty('user', 'fred'));
+ * // => { 'user': 'fred' }
+ */
+ function matchesProperty(path, srcValue) {
+ return baseMatchesProperty(path, baseClone(srcValue, true));
+ }
+
+ /**
+ * Creates a function that invokes the method at `path` of a given object.
+ * Any additional arguments are provided to the invoked method.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.7.0
+ * @category Util
+ * @param {Array|string} path The path of the method to invoke.
+ * @param {...*} [args] The arguments to invoke the method with.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * var objects = [
+ * { 'a': { 'b': _.constant(2) } },
+ * { 'a': { 'b': _.constant(1) } }
+ * ];
+ *
+ * _.map(objects, _.method('a.b'));
+ * // => [2, 1]
+ *
+ * _.map(objects, _.method(['a', 'b']));
+ * // => [2, 1]
+ */
+ var method = rest(function(path, args) {
+ return function(object) {
+ return baseInvoke(object, path, args);
+ };
+ });
+
+ /**
+ * The opposite of `_.method`; this method creates a function that invokes
+ * the method at a given path of `object`. Any additional arguments are
+ * provided to the invoked method.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.7.0
+ * @category Util
+ * @param {Object} object The object to query.
+ * @param {...*} [args] The arguments to invoke the method with.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * var array = _.times(3, _.constant),
+ * object = { 'a': array, 'b': array, 'c': array };
+ *
+ * _.map(['a[2]', 'c[0]'], _.methodOf(object));
+ * // => [2, 0]
+ *
+ * _.map([['a', '2'], ['c', '0']], _.methodOf(object));
+ * // => [2, 0]
+ */
+ var methodOf = rest(function(object, args) {
+ return function(path) {
+ return baseInvoke(object, path, args);
+ };
+ });
+
+ /**
+ * Adds all own enumerable string keyed function properties of a source
+ * object to the destination object. If `object` is a function, then methods
+ * are added to its prototype as well.
+ *
+ * **Note:** Use `_.runInContext` to create a pristine `lodash` function to
+ * avoid conflicts caused by modifying the original.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Util
+ * @param {Function|Object} [object=lodash] The destination object.
+ * @param {Object} source The object of functions to add.
+ * @param {Object} [options={}] The options object.
+ * @param {boolean} [options.chain=true] Specify whether mixins are chainable.
+ * @returns {Function|Object} Returns `object`.
+ * @example
+ *
+ * function vowels(string) {
+ * return _.filter(string, function(v) {
+ * return /[aeiou]/i.test(v);
+ * });
+ * }
+ *
+ * _.mixin({ 'vowels': vowels });
+ * _.vowels('fred');
+ * // => ['e']
+ *
+ * _('fred').vowels().value();
+ * // => ['e']
+ *
+ * _.mixin({ 'vowels': vowels }, { 'chain': false });
+ * _('fred').vowels();
+ * // => ['e']
+ */
+ function mixin(object, source, options) {
+ var props = keys(source),
+ methodNames = baseFunctions(source, props);
+
+ if (options == null &&
+ !(isObject(source) && (methodNames.length || !props.length))) {
+ options = source;
+ source = object;
+ object = this;
+ methodNames = baseFunctions(source, keys(source));
+ }
+ var chain = !(isObject(options) && 'chain' in options) || !!options.chain,
+ isFunc = isFunction(object);
+
+ arrayEach(methodNames, function(methodName) {
+ var func = source[methodName];
+ object[methodName] = func;
+ if (isFunc) {
+ object.prototype[methodName] = function() {
+ var chainAll = this.__chain__;
+ if (chain || chainAll) {
+ var result = object(this.__wrapped__),
+ actions = result.__actions__ = copyArray(this.__actions__);
+
+ actions.push({ 'func': func, 'args': arguments, 'thisArg': object });
+ result.__chain__ = chainAll;
+ return result;
+ }
+ return func.apply(object, arrayPush([this.value()], arguments));
+ };
+ }
+ });
+
+ return object;
+ }
+
+ /**
+ * Reverts the `_` variable to its previous value and returns a reference to
+ * the `lodash` function.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Util
+ * @returns {Function} Returns the `lodash` function.
+ * @example
+ *
+ * var lodash = _.noConflict();
+ */
+ function noConflict() {
+ if (root._ === this) {
+ root._ = oldDash;
+ }
+ return this;
+ }
+
+ /**
+ * A no-operation function that returns `undefined` regardless of the
+ * arguments it receives.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.3.0
+ * @category Util
+ * @example
+ *
+ * var object = { 'user': 'fred' };
+ *
+ * _.noop(object) === undefined;
+ * // => true
+ */
+ function noop() {
+ // No operation performed.
+ }
+
+ /**
+ * Creates a function that returns its nth argument. If `n` is negative,
+ * the nth argument from the end is returned.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Util
+ * @param {number} [n=0] The index of the argument to return.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * var func = _.nthArg(1);
+ * func('a', 'b', 'c', 'd');
+ * // => 'b'
+ *
+ * var func = _.nthArg(-2);
+ * func('a', 'b', 'c', 'd');
+ * // => 'c'
+ */
+ function nthArg(n) {
+ n = toInteger(n);
+ return rest(function(args) {
+ return baseNth(args, n);
+ });
+ }
+
+ /**
+ * Creates a function that invokes `iteratees` with the arguments it receives
+ * and returns their results.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Util
+ * @param {...(Array|Array[]|Function|Function[]|Object|Object[]|string|string[])}
+ * [iteratees=[_.identity]] The iteratees to invoke.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * var func = _.over(Math.max, Math.min);
+ *
+ * func(1, 2, 3, 4);
+ * // => [4, 1]
+ */
+ var over = createOver(arrayMap);
+
+ /**
+ * Creates a function that checks if **all** of the `predicates` return
+ * truthy when invoked with the arguments it receives.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Util
+ * @param {...(Array|Array[]|Function|Function[]|Object|Object[]|string|string[])}
+ * [predicates=[_.identity]] The predicates to check.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * var func = _.overEvery(Boolean, isFinite);
+ *
+ * func('1');
+ * // => true
+ *
+ * func(null);
+ * // => false
+ *
+ * func(NaN);
+ * // => false
+ */
+ var overEvery = createOver(arrayEvery);
+
+ /**
+ * Creates a function that checks if **any** of the `predicates` return
+ * truthy when invoked with the arguments it receives.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Util
+ * @param {...(Array|Array[]|Function|Function[]|Object|Object[]|string|string[])}
+ * [predicates=[_.identity]] The predicates to check.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * var func = _.overSome(Boolean, isFinite);
+ *
+ * func('1');
+ * // => true
+ *
+ * func(null);
+ * // => true
+ *
+ * func(NaN);
+ * // => false
+ */
+ var overSome = createOver(arraySome);
+
+ /**
+ * Creates a function that returns the value at `path` of a given object.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.4.0
+ * @category Util
+ * @param {Array|string} path The path of the property to get.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * var objects = [
+ * { 'a': { 'b': 2 } },
+ * { 'a': { 'b': 1 } }
+ * ];
+ *
+ * _.map(objects, _.property('a.b'));
+ * // => [2, 1]
+ *
+ * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');
+ * // => [1, 2]
+ */
+ function property(path) {
+ return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);
+ }
+
+ /**
+ * The opposite of `_.property`; this method creates a function that returns
+ * the value at a given path of `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Util
+ * @param {Object} object The object to query.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * var array = [0, 1, 2],
+ * object = { 'a': array, 'b': array, 'c': array };
+ *
+ * _.map(['a[2]', 'c[0]'], _.propertyOf(object));
+ * // => [2, 0]
+ *
+ * _.map([['a', '2'], ['c', '0']], _.propertyOf(object));
+ * // => [2, 0]
+ */
+ function propertyOf(object) {
+ return function(path) {
+ return object == null ? undefined : baseGet(object, path);
+ };
+ }
+
+ /**
+ * Creates an array of numbers (positive and/or negative) progressing from
+ * `start` up to, but not including, `end`. A step of `-1` is used if a negative
+ * `start` is specified without an `end` or `step`. If `end` is not specified,
+ * it's set to `start` with `start` then set to `0`.
+ *
+ * **Note:** JavaScript follows the IEEE-754 standard for resolving
+ * floating-point values which can produce unexpected results.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Util
+ * @param {number} [start=0] The start of the range.
+ * @param {number} end The end of the range.
+ * @param {number} [step=1] The value to increment or decrement by.
+ * @returns {Array} Returns the new array of numbers.
+ * @see _.inRange, _.rangeRight
+ * @example
+ *
+ * _.range(4);
+ * // => [0, 1, 2, 3]
+ *
+ * _.range(-4);
+ * // => [0, -1, -2, -3]
+ *
+ * _.range(1, 5);
+ * // => [1, 2, 3, 4]
+ *
+ * _.range(0, 20, 5);
+ * // => [0, 5, 10, 15]
+ *
+ * _.range(0, -4, -1);
+ * // => [0, -1, -2, -3]
+ *
+ * _.range(1, 4, 0);
+ * // => [1, 1, 1]
+ *
+ * _.range(0);
+ * // => []
+ */
+ var range = createRange();
+
+ /**
+ * This method is like `_.range` except that it populates values in
+ * descending order.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Util
+ * @param {number} [start=0] The start of the range.
+ * @param {number} end The end of the range.
+ * @param {number} [step=1] The value to increment or decrement by.
+ * @returns {Array} Returns the new array of numbers.
+ * @see _.inRange, _.range
+ * @example
+ *
+ * _.rangeRight(4);
+ * // => [3, 2, 1, 0]
+ *
+ * _.rangeRight(-4);
+ * // => [-3, -2, -1, 0]
+ *
+ * _.rangeRight(1, 5);
+ * // => [4, 3, 2, 1]
+ *
+ * _.rangeRight(0, 20, 5);
+ * // => [15, 10, 5, 0]
+ *
+ * _.rangeRight(0, -4, -1);
+ * // => [-3, -2, -1, 0]
+ *
+ * _.rangeRight(1, 4, 0);
+ * // => [1, 1, 1]
+ *
+ * _.rangeRight(0);
+ * // => []
+ */
+ var rangeRight = createRange(true);
+
+ /**
+ * Invokes the iteratee `n` times, returning an array of the results of
+ * each invocation. The iteratee is invoked with one argument; (index).
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Util
+ * @param {number} n The number of times to invoke `iteratee`.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @returns {Array} Returns the array of results.
+ * @example
+ *
+ * _.times(3, String);
+ * // => ['0', '1', '2']
+ *
+ * _.times(4, _.constant(true));
+ * // => [true, true, true, true]
+ */
+ function times(n, iteratee) {
+ n = toInteger(n);
+ if (n < 1 || n > MAX_SAFE_INTEGER) {
+ return [];
+ }
+ var index = MAX_ARRAY_LENGTH,
+ length = nativeMin(n, MAX_ARRAY_LENGTH);
+
+ iteratee = getIteratee(iteratee);
+ n -= MAX_ARRAY_LENGTH;
+
+ var result = baseTimes(length, iteratee);
+ while (++index < n) {
+ iteratee(index);
+ }
+ return result;
+ }
+
+ /**
+ * Converts `value` to a property path array.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Util
+ * @param {*} value The value to convert.
+ * @returns {Array} Returns the new property path array.
+ * @example
+ *
+ * _.toPath('a.b.c');
+ * // => ['a', 'b', 'c']
+ *
+ * _.toPath('a[0].b.c');
+ * // => ['a', '0', 'b', 'c']
+ *
+ * var path = ['a', 'b', 'c'],
+ * newPath = _.toPath(path);
+ *
+ * console.log(newPath);
+ * // => ['a', 'b', 'c']
+ *
+ * console.log(path === newPath);
+ * // => false
+ */
+ function toPath(value) {
+ if (isArray(value)) {
+ return arrayMap(value, toKey);
+ }
+ return isSymbol(value) ? [value] : copyArray(stringToPath(value));
+ }
+
+ /**
+ * Generates a unique ID. If `prefix` is given, the ID is appended to it.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Util
+ * @param {string} [prefix=''] The value to prefix the ID with.
+ * @returns {string} Returns the unique ID.
+ * @example
+ *
+ * _.uniqueId('contact_');
+ * // => 'contact_104'
+ *
+ * _.uniqueId();
+ * // => '105'
+ */
+ function uniqueId(prefix) {
+ var id = ++idCounter;
+ return toString(prefix) + id;
+ }
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Adds two numbers.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.4.0
+ * @category Math
+ * @param {number} augend The first number in an addition.
+ * @param {number} addend The second number in an addition.
+ * @returns {number} Returns the total.
+ * @example
+ *
+ * _.add(6, 4);
+ * // => 10
+ */
+ var add = createMathOperation(function(augend, addend) {
+ return augend + addend;
+ });
+
+ /**
+ * Computes `number` rounded up to `precision`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.10.0
+ * @category Math
+ * @param {number} number The number to round up.
+ * @param {number} [precision=0] The precision to round up to.
+ * @returns {number} Returns the rounded up number.
+ * @example
+ *
+ * _.ceil(4.006);
+ * // => 5
+ *
+ * _.ceil(6.004, 2);
+ * // => 6.01
+ *
+ * _.ceil(6040, -2);
+ * // => 6100
+ */
+ var ceil = createRound('ceil');
+
+ /**
+ * Divide two numbers.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.7.0
+ * @category Math
+ * @param {number} dividend The first number in a division.
+ * @param {number} divisor The second number in a division.
+ * @returns {number} Returns the quotient.
+ * @example
+ *
+ * _.divide(6, 4);
+ * // => 1.5
+ */
+ var divide = createMathOperation(function(dividend, divisor) {
+ return dividend / divisor;
+ });
+
+ /**
+ * Computes `number` rounded down to `precision`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.10.0
+ * @category Math
+ * @param {number} number The number to round down.
+ * @param {number} [precision=0] The precision to round down to.
+ * @returns {number} Returns the rounded down number.
+ * @example
+ *
+ * _.floor(4.006);
+ * // => 4
+ *
+ * _.floor(0.046, 2);
+ * // => 0.04
+ *
+ * _.floor(4060, -2);
+ * // => 4000
+ */
+ var floor = createRound('floor');
+
+ /**
+ * Computes the maximum value of `array`. If `array` is empty or falsey,
+ * `undefined` is returned.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Math
+ * @param {Array} array The array to iterate over.
+ * @returns {*} Returns the maximum value.
+ * @example
+ *
+ * _.max([4, 2, 8, 6]);
+ * // => 8
+ *
+ * _.max([]);
+ * // => undefined
+ */
+ function max(array) {
+ return (array && array.length)
+ ? baseExtremum(array, identity, baseGt)
+ : undefined;
+ }
+
+ /**
+ * This method is like `_.max` except that it accepts `iteratee` which is
+ * invoked for each element in `array` to generate the criterion by which
+ * the value is ranked. The iteratee is invoked with one argument: (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Math
+ * @param {Array} array The array to iterate over.
+ * @param {Array|Function|Object|string} [iteratee=_.identity]
+ * The iteratee invoked per element.
+ * @returns {*} Returns the maximum value.
+ * @example
+ *
+ * var objects = [{ 'n': 1 }, { 'n': 2 }];
+ *
+ * _.maxBy(objects, function(o) { return o.n; });
+ * // => { 'n': 2 }
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.maxBy(objects, 'n');
+ * // => { 'n': 2 }
+ */
+ function maxBy(array, iteratee) {
+ return (array && array.length)
+ ? baseExtremum(array, getIteratee(iteratee), baseGt)
+ : undefined;
+ }
+
+ /**
+ * Computes the mean of the values in `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Math
+ * @param {Array} array The array to iterate over.
+ * @returns {number} Returns the mean.
+ * @example
+ *
+ * _.mean([4, 2, 8, 6]);
+ * // => 5
+ */
+ function mean(array) {
+ return baseMean(array, identity);
+ }
+
+ /**
+ * This method is like `_.mean` except that it accepts `iteratee` which is
+ * invoked for each element in `array` to generate the value to be averaged.
+ * The iteratee is invoked with one argument: (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.7.0
+ * @category Math
+ * @param {Array} array The array to iterate over.
+ * @param {Array|Function|Object|string} [iteratee=_.identity]
+ * The iteratee invoked per element.
+ * @returns {number} Returns the mean.
+ * @example
+ *
+ * var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }];
+ *
+ * _.meanBy(objects, function(o) { return o.n; });
+ * // => 5
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.meanBy(objects, 'n');
+ * // => 5
+ */
+ function meanBy(array, iteratee) {
+ return baseMean(array, getIteratee(iteratee));
+ }
+
+ /**
+ * Computes the minimum value of `array`. If `array` is empty or falsey,
+ * `undefined` is returned.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Math
+ * @param {Array} array The array to iterate over.
+ * @returns {*} Returns the minimum value.
+ * @example
+ *
+ * _.min([4, 2, 8, 6]);
+ * // => 2
+ *
+ * _.min([]);
+ * // => undefined
+ */
+ function min(array) {
+ return (array && array.length)
+ ? baseExtremum(array, identity, baseLt)
+ : undefined;
+ }
+
+ /**
+ * This method is like `_.min` except that it accepts `iteratee` which is
+ * invoked for each element in `array` to generate the criterion by which
+ * the value is ranked. The iteratee is invoked with one argument: (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Math
+ * @param {Array} array The array to iterate over.
+ * @param {Array|Function|Object|string} [iteratee=_.identity]
+ * The iteratee invoked per element.
+ * @returns {*} Returns the minimum value.
+ * @example
+ *
+ * var objects = [{ 'n': 1 }, { 'n': 2 }];
+ *
+ * _.minBy(objects, function(o) { return o.n; });
+ * // => { 'n': 1 }
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.minBy(objects, 'n');
+ * // => { 'n': 1 }
+ */
+ function minBy(array, iteratee) {
+ return (array && array.length)
+ ? baseExtremum(array, getIteratee(iteratee), baseLt)
+ : undefined;
+ }
+
+ /**
+ * Multiply two numbers.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.7.0
+ * @category Math
+ * @param {number} multiplier The first number in a multiplication.
+ * @param {number} multiplicand The second number in a multiplication.
+ * @returns {number} Returns the product.
+ * @example
+ *
+ * _.multiply(6, 4);
+ * // => 24
+ */
+ var multiply = createMathOperation(function(multiplier, multiplicand) {
+ return multiplier * multiplicand;
+ });
+
+ /**
+ * Computes `number` rounded to `precision`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.10.0
+ * @category Math
+ * @param {number} number The number to round.
+ * @param {number} [precision=0] The precision to round to.
+ * @returns {number} Returns the rounded number.
+ * @example
+ *
+ * _.round(4.006);
+ * // => 4
+ *
+ * _.round(4.006, 2);
+ * // => 4.01
+ *
+ * _.round(4060, -2);
+ * // => 4100
+ */
+ var round = createRound('round');
+
+ /**
+ * Subtract two numbers.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Math
+ * @param {number} minuend The first number in a subtraction.
+ * @param {number} subtrahend The second number in a subtraction.
+ * @returns {number} Returns the difference.
+ * @example
+ *
+ * _.subtract(6, 4);
+ * // => 2
+ */
+ var subtract = createMathOperation(function(minuend, subtrahend) {
+ return minuend - subtrahend;
+ });
+
+ /**
+ * Computes the sum of the values in `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.4.0
+ * @category Math
+ * @param {Array} array The array to iterate over.
+ * @returns {number} Returns the sum.
+ * @example
+ *
+ * _.sum([4, 2, 8, 6]);
+ * // => 20
+ */
+ function sum(array) {
+ return (array && array.length)
+ ? baseSum(array, identity)
+ : 0;
+ }
+
+ /**
+ * This method is like `_.sum` except that it accepts `iteratee` which is
+ * invoked for each element in `array` to generate the value to be summed.
+ * The iteratee is invoked with one argument: (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Math
+ * @param {Array} array The array to iterate over.
+ * @param {Array|Function|Object|string} [iteratee=_.identity]
+ * The iteratee invoked per element.
+ * @returns {number} Returns the sum.
+ * @example
+ *
+ * var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }];
+ *
+ * _.sumBy(objects, function(o) { return o.n; });
+ * // => 20
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.sumBy(objects, 'n');
+ * // => 20
+ */
+ function sumBy(array, iteratee) {
+ return (array && array.length)
+ ? baseSum(array, getIteratee(iteratee))
+ : 0;
+ }
+
+ /*------------------------------------------------------------------------*/
+
+ // Add methods that return wrapped values in chain sequences.
+ lodash.after = after;
+ lodash.ary = ary;
+ lodash.assign = assign;
+ lodash.assignIn = assignIn;
+ lodash.assignInWith = assignInWith;
+ lodash.assignWith = assignWith;
+ lodash.at = at;
+ lodash.before = before;
+ lodash.bind = bind;
+ lodash.bindAll = bindAll;
+ lodash.bindKey = bindKey;
+ lodash.castArray = castArray;
+ lodash.chain = chain;
+ lodash.chunk = chunk;
+ lodash.compact = compact;
+ lodash.concat = concat;
+ lodash.cond = cond;
+ lodash.conforms = conforms;
+ lodash.constant = constant;
+ lodash.countBy = countBy;
+ lodash.create = create;
+ lodash.curry = curry;
+ lodash.curryRight = curryRight;
+ lodash.debounce = debounce;
+ lodash.defaults = defaults;
+ lodash.defaultsDeep = defaultsDeep;
+ lodash.defer = defer;
+ lodash.delay = delay;
+ lodash.difference = difference;
+ lodash.differenceBy = differenceBy;
+ lodash.differenceWith = differenceWith;
+ lodash.drop = drop;
+ lodash.dropRight = dropRight;
+ lodash.dropRightWhile = dropRightWhile;
+ lodash.dropWhile = dropWhile;
+ lodash.fill = fill;
+ lodash.filter = filter;
+ lodash.flatMap = flatMap;
+ lodash.flatMapDeep = flatMapDeep;
+ lodash.flatMapDepth = flatMapDepth;
+ lodash.flatten = flatten;
+ lodash.flattenDeep = flattenDeep;
+ lodash.flattenDepth = flattenDepth;
+ lodash.flip = flip;
+ lodash.flow = flow;
+ lodash.flowRight = flowRight;
+ lodash.fromPairs = fromPairs;
+ lodash.functions = functions;
+ lodash.functionsIn = functionsIn;
+ lodash.groupBy = groupBy;
+ lodash.initial = initial;
+ lodash.intersection = intersection;
+ lodash.intersectionBy = intersectionBy;
+ lodash.intersectionWith = intersectionWith;
+ lodash.invert = invert;
+ lodash.invertBy = invertBy;
+ lodash.invokeMap = invokeMap;
+ lodash.iteratee = iteratee;
+ lodash.keyBy = keyBy;
+ lodash.keys = keys;
+ lodash.keysIn = keysIn;
+ lodash.map = map;
+ lodash.mapKeys = mapKeys;
+ lodash.mapValues = mapValues;
+ lodash.matches = matches;
+ lodash.matchesProperty = matchesProperty;
+ lodash.memoize = memoize;
+ lodash.merge = merge;
+ lodash.mergeWith = mergeWith;
+ lodash.method = method;
+ lodash.methodOf = methodOf;
+ lodash.mixin = mixin;
+ lodash.negate = negate;
+ lodash.nthArg = nthArg;
+ lodash.omit = omit;
+ lodash.omitBy = omitBy;
+ lodash.once = once;
+ lodash.orderBy = orderBy;
+ lodash.over = over;
+ lodash.overArgs = overArgs;
+ lodash.overEvery = overEvery;
+ lodash.overSome = overSome;
+ lodash.partial = partial;
+ lodash.partialRight = partialRight;
+ lodash.partition = partition;
+ lodash.pick = pick;
+ lodash.pickBy = pickBy;
+ lodash.property = property;
+ lodash.propertyOf = propertyOf;
+ lodash.pull = pull;
+ lodash.pullAll = pullAll;
+ lodash.pullAllBy = pullAllBy;
+ lodash.pullAllWith = pullAllWith;
+ lodash.pullAt = pullAt;
+ lodash.range = range;
+ lodash.rangeRight = rangeRight;
+ lodash.rearg = rearg;
+ lodash.reject = reject;
+ lodash.remove = remove;
+ lodash.rest = rest;
+ lodash.reverse = reverse;
+ lodash.sampleSize = sampleSize;
+ lodash.set = set;
+ lodash.setWith = setWith;
+ lodash.shuffle = shuffle;
+ lodash.slice = slice;
+ lodash.sortBy = sortBy;
+ lodash.sortedUniq = sortedUniq;
+ lodash.sortedUniqBy = sortedUniqBy;
+ lodash.split = split;
+ lodash.spread = spread;
+ lodash.tail = tail;
+ lodash.take = take;
+ lodash.takeRight = takeRight;
+ lodash.takeRightWhile = takeRightWhile;
+ lodash.takeWhile = takeWhile;
+ lodash.tap = tap;
+ lodash.throttle = throttle;
+ lodash.thru = thru;
+ lodash.toArray = toArray;
+ lodash.toPairs = toPairs;
+ lodash.toPairsIn = toPairsIn;
+ lodash.toPath = toPath;
+ lodash.toPlainObject = toPlainObject;
+ lodash.transform = transform;
+ lodash.unary = unary;
+ lodash.union = union;
+ lodash.unionBy = unionBy;
+ lodash.unionWith = unionWith;
+ lodash.uniq = uniq;
+ lodash.uniqBy = uniqBy;
+ lodash.uniqWith = uniqWith;
+ lodash.unset = unset;
+ lodash.unzip = unzip;
+ lodash.unzipWith = unzipWith;
+ lodash.update = update;
+ lodash.updateWith = updateWith;
+ lodash.values = values;
+ lodash.valuesIn = valuesIn;
+ lodash.without = without;
+ lodash.words = words;
+ lodash.wrap = wrap;
+ lodash.xor = xor;
+ lodash.xorBy = xorBy;
+ lodash.xorWith = xorWith;
+ lodash.zip = zip;
+ lodash.zipObject = zipObject;
+ lodash.zipObjectDeep = zipObjectDeep;
+ lodash.zipWith = zipWith;
+
+ // Add aliases.
+ lodash.entries = toPairs;
+ lodash.entriesIn = toPairsIn;
+ lodash.extend = assignIn;
+ lodash.extendWith = assignInWith;
+
+ // Add methods to `lodash.prototype`.
+ mixin(lodash, lodash);
+
+ /*------------------------------------------------------------------------*/
+
+ // Add methods that return unwrapped values in chain sequences.
+ lodash.add = add;
+ lodash.attempt = attempt;
+ lodash.camelCase = camelCase;
+ lodash.capitalize = capitalize;
+ lodash.ceil = ceil;
+ lodash.clamp = clamp;
+ lodash.clone = clone;
+ lodash.cloneDeep = cloneDeep;
+ lodash.cloneDeepWith = cloneDeepWith;
+ lodash.cloneWith = cloneWith;
+ lodash.deburr = deburr;
+ lodash.divide = divide;
+ lodash.endsWith = endsWith;
+ lodash.eq = eq;
+ lodash.escape = escape;
+ lodash.escapeRegExp = escapeRegExp;
+ lodash.every = every;
+ lodash.find = find;
+ lodash.findIndex = findIndex;
+ lodash.findKey = findKey;
+ lodash.findLast = findLast;
+ lodash.findLastIndex = findLastIndex;
+ lodash.findLastKey = findLastKey;
+ lodash.floor = floor;
+ lodash.forEach = forEach;
+ lodash.forEachRight = forEachRight;
+ lodash.forIn = forIn;
+ lodash.forInRight = forInRight;
+ lodash.forOwn = forOwn;
+ lodash.forOwnRight = forOwnRight;
+ lodash.get = get;
+ lodash.gt = gt;
+ lodash.gte = gte;
+ lodash.has = has;
+ lodash.hasIn = hasIn;
+ lodash.head = head;
+ lodash.identity = identity;
+ lodash.includes = includes;
+ lodash.indexOf = indexOf;
+ lodash.inRange = inRange;
+ lodash.invoke = invoke;
+ lodash.isArguments = isArguments;
+ lodash.isArray = isArray;
+ lodash.isArrayBuffer = isArrayBuffer;
+ lodash.isArrayLike = isArrayLike;
+ lodash.isArrayLikeObject = isArrayLikeObject;
+ lodash.isBoolean = isBoolean;
+ lodash.isBuffer = isBuffer;
+ lodash.isDate = isDate;
+ lodash.isElement = isElement;
+ lodash.isEmpty = isEmpty;
+ lodash.isEqual = isEqual;
+ lodash.isEqualWith = isEqualWith;
+ lodash.isError = isError;
+ lodash.isFinite = isFinite;
+ lodash.isFunction = isFunction;
+ lodash.isInteger = isInteger;
+ lodash.isLength = isLength;
+ lodash.isMap = isMap;
+ lodash.isMatch = isMatch;
+ lodash.isMatchWith = isMatchWith;
+ lodash.isNaN = isNaN;
+ lodash.isNative = isNative;
+ lodash.isNil = isNil;
+ lodash.isNull = isNull;
+ lodash.isNumber = isNumber;
+ lodash.isObject = isObject;
+ lodash.isObjectLike = isObjectLike;
+ lodash.isPlainObject = isPlainObject;
+ lodash.isRegExp = isRegExp;
+ lodash.isSafeInteger = isSafeInteger;
+ lodash.isSet = isSet;
+ lodash.isString = isString;
+ lodash.isSymbol = isSymbol;
+ lodash.isTypedArray = isTypedArray;
+ lodash.isUndefined = isUndefined;
+ lodash.isWeakMap = isWeakMap;
+ lodash.isWeakSet = isWeakSet;
+ lodash.join = join;
+ lodash.kebabCase = kebabCase;
+ lodash.last = last;
+ lodash.lastIndexOf = lastIndexOf;
+ lodash.lowerCase = lowerCase;
+ lodash.lowerFirst = lowerFirst;
+ lodash.lt = lt;
+ lodash.lte = lte;
+ lodash.max = max;
+ lodash.maxBy = maxBy;
+ lodash.mean = mean;
+ lodash.meanBy = meanBy;
+ lodash.min = min;
+ lodash.minBy = minBy;
+ lodash.multiply = multiply;
+ lodash.nth = nth;
+ lodash.noConflict = noConflict;
+ lodash.noop = noop;
+ lodash.now = now;
+ lodash.pad = pad;
+ lodash.padEnd = padEnd;
+ lodash.padStart = padStart;
+ lodash.parseInt = parseInt;
+ lodash.random = random;
+ lodash.reduce = reduce;
+ lodash.reduceRight = reduceRight;
+ lodash.repeat = repeat;
+ lodash.replace = replace;
+ lodash.result = result;
+ lodash.round = round;
+ lodash.runInContext = runInContext;
+ lodash.sample = sample;
+ lodash.size = size;
+ lodash.snakeCase = snakeCase;
+ lodash.some = some;
+ lodash.sortedIndex = sortedIndex;
+ lodash.sortedIndexBy = sortedIndexBy;
+ lodash.sortedIndexOf = sortedIndexOf;
+ lodash.sortedLastIndex = sortedLastIndex;
+ lodash.sortedLastIndexBy = sortedLastIndexBy;
+ lodash.sortedLastIndexOf = sortedLastIndexOf;
+ lodash.startCase = startCase;
+ lodash.startsWith = startsWith;
+ lodash.subtract = subtract;
+ lodash.sum = sum;
+ lodash.sumBy = sumBy;
+ lodash.template = template;
+ lodash.times = times;
+ lodash.toInteger = toInteger;
+ lodash.toLength = toLength;
+ lodash.toLower = toLower;
+ lodash.toNumber = toNumber;
+ lodash.toSafeInteger = toSafeInteger;
+ lodash.toString = toString;
+ lodash.toUpper = toUpper;
+ lodash.trim = trim;
+ lodash.trimEnd = trimEnd;
+ lodash.trimStart = trimStart;
+ lodash.truncate = truncate;
+ lodash.unescape = unescape;
+ lodash.uniqueId = uniqueId;
+ lodash.upperCase = upperCase;
+ lodash.upperFirst = upperFirst;
+
+ // Add aliases.
+ lodash.each = forEach;
+ lodash.eachRight = forEachRight;
+ lodash.first = head;
+
+ mixin(lodash, (function() {
+ var source = {};
+ baseForOwn(lodash, function(func, methodName) {
+ if (!hasOwnProperty.call(lodash.prototype, methodName)) {
+ source[methodName] = func;
+ }
+ });
+ return source;
+ }()), { 'chain': false });
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * The semantic version number.
+ *
+ * @static
+ * @memberOf _
+ * @type {string}
+ */
+ lodash.VERSION = VERSION;
+
+ // Assign default placeholders.
+ arrayEach(['bind', 'bindKey', 'curry', 'curryRight', 'partial', 'partialRight'], function(methodName) {
+ lodash[methodName].placeholder = lodash;
+ });
+
+ // Add `LazyWrapper` methods for `_.drop` and `_.take` variants.
+ arrayEach(['drop', 'take'], function(methodName, index) {
+ LazyWrapper.prototype[methodName] = function(n) {
+ var filtered = this.__filtered__;
+ if (filtered && !index) {
+ return new LazyWrapper(this);
+ }
+ n = n === undefined ? 1 : nativeMax(toInteger(n), 0);
+
+ var result = this.clone();
+ if (filtered) {
+ result.__takeCount__ = nativeMin(n, result.__takeCount__);
+ } else {
+ result.__views__.push({
+ 'size': nativeMin(n, MAX_ARRAY_LENGTH),
+ 'type': methodName + (result.__dir__ < 0 ? 'Right' : '')
+ });
+ }
+ return result;
+ };
+
+ LazyWrapper.prototype[methodName + 'Right'] = function(n) {
+ return this.reverse()[methodName](n).reverse();
+ };
+ });
+
+ // Add `LazyWrapper` methods that accept an `iteratee` value.
+ arrayEach(['filter', 'map', 'takeWhile'], function(methodName, index) {
+ var type = index + 1,
+ isFilter = type == LAZY_FILTER_FLAG || type == LAZY_WHILE_FLAG;
+
+ LazyWrapper.prototype[methodName] = function(iteratee) {
+ var result = this.clone();
+ result.__iteratees__.push({
+ 'iteratee': getIteratee(iteratee, 3),
+ 'type': type
+ });
+ result.__filtered__ = result.__filtered__ || isFilter;
+ return result;
+ };
+ });
+
+ // Add `LazyWrapper` methods for `_.head` and `_.last`.
+ arrayEach(['head', 'last'], function(methodName, index) {
+ var takeName = 'take' + (index ? 'Right' : '');
+
+ LazyWrapper.prototype[methodName] = function() {
+ return this[takeName](1).value()[0];
+ };
+ });
+
+ // Add `LazyWrapper` methods for `_.initial` and `_.tail`.
+ arrayEach(['initial', 'tail'], function(methodName, index) {
+ var dropName = 'drop' + (index ? '' : 'Right');
+
+ LazyWrapper.prototype[methodName] = function() {
+ return this.__filtered__ ? new LazyWrapper(this) : this[dropName](1);
+ };
+ });
+
+ LazyWrapper.prototype.compact = function() {
+ return this.filter(identity);
+ };
+
+ LazyWrapper.prototype.find = function(predicate) {
+ return this.filter(predicate).head();
+ };
+
+ LazyWrapper.prototype.findLast = function(predicate) {
+ return this.reverse().find(predicate);
+ };
+
+ LazyWrapper.prototype.invokeMap = rest(function(path, args) {
+ if (typeof path == 'function') {
+ return new LazyWrapper(this);
+ }
+ return this.map(function(value) {
+ return baseInvoke(value, path, args);
+ });
+ });
+
+ LazyWrapper.prototype.reject = function(predicate) {
+ predicate = getIteratee(predicate, 3);
+ return this.filter(function(value) {
+ return !predicate(value);
+ });
+ };
+
+ LazyWrapper.prototype.slice = function(start, end) {
+ start = toInteger(start);
+
+ var result = this;
+ if (result.__filtered__ && (start > 0 || end < 0)) {
+ return new LazyWrapper(result);
+ }
+ if (start < 0) {
+ result = result.takeRight(-start);
+ } else if (start) {
+ result = result.drop(start);
+ }
+ if (end !== undefined) {
+ end = toInteger(end);
+ result = end < 0 ? result.dropRight(-end) : result.take(end - start);
+ }
+ return result;
+ };
+
+ LazyWrapper.prototype.takeRightWhile = function(predicate) {
+ return this.reverse().takeWhile(predicate).reverse();
+ };
+
+ LazyWrapper.prototype.toArray = function() {
+ return this.take(MAX_ARRAY_LENGTH);
+ };
+
+ // Add `LazyWrapper` methods to `lodash.prototype`.
+ baseForOwn(LazyWrapper.prototype, function(func, methodName) {
+ var checkIteratee = /^(?:filter|find|map|reject)|While$/.test(methodName),
+ isTaker = /^(?:head|last)$/.test(methodName),
+ lodashFunc = lodash[isTaker ? ('take' + (methodName == 'last' ? 'Right' : '')) : methodName],
+ retUnwrapped = isTaker || /^find/.test(methodName);
+
+ if (!lodashFunc) {
+ return;
+ }
+ lodash.prototype[methodName] = function() {
+ var value = this.__wrapped__,
+ args = isTaker ? [1] : arguments,
+ isLazy = value instanceof LazyWrapper,
+ iteratee = args[0],
+ useLazy = isLazy || isArray(value);
+
+ var interceptor = function(value) {
+ var result = lodashFunc.apply(lodash, arrayPush([value], args));
+ return (isTaker && chainAll) ? result[0] : result;
+ };
+
+ if (useLazy && checkIteratee && typeof iteratee == 'function' && iteratee.length != 1) {
+ // Avoid lazy use if the iteratee has a "length" value other than `1`.
+ isLazy = useLazy = false;
+ }
+ var chainAll = this.__chain__,
+ isHybrid = !!this.__actions__.length,
+ isUnwrapped = retUnwrapped && !chainAll,
+ onlyLazy = isLazy && !isHybrid;
+
+ if (!retUnwrapped && useLazy) {
+ value = onlyLazy ? value : new LazyWrapper(this);
+ var result = func.apply(value, args);
+ result.__actions__.push({ 'func': thru, 'args': [interceptor], 'thisArg': undefined });
+ return new LodashWrapper(result, chainAll);
+ }
+ if (isUnwrapped && onlyLazy) {
+ return func.apply(this, args);
+ }
+ result = this.thru(interceptor);
+ return isUnwrapped ? (isTaker ? result.value()[0] : result.value()) : result;
+ };
+ });
+
+ // Add `Array` methods to `lodash.prototype`.
+ arrayEach(['pop', 'push', 'shift', 'sort', 'splice', 'unshift'], function(methodName) {
+ var func = arrayProto[methodName],
+ chainName = /^(?:push|sort|unshift)$/.test(methodName) ? 'tap' : 'thru',
+ retUnwrapped = /^(?:pop|shift)$/.test(methodName);
+
+ lodash.prototype[methodName] = function() {
+ var args = arguments;
+ if (retUnwrapped && !this.__chain__) {
+ var value = this.value();
+ return func.apply(isArray(value) ? value : [], args);
+ }
+ return this[chainName](function(value) {
+ return func.apply(isArray(value) ? value : [], args);
+ });
+ };
+ });
+
+ // Map minified method names to their real names.
+ baseForOwn(LazyWrapper.prototype, function(func, methodName) {
+ var lodashFunc = lodash[methodName];
+ if (lodashFunc) {
+ var key = (lodashFunc.name + ''),
+ names = realNames[key] || (realNames[key] = []);
+
+ names.push({ 'name': methodName, 'func': lodashFunc });
+ }
+ });
+
+ realNames[createHybridWrapper(undefined, BIND_KEY_FLAG).name] = [{
+ 'name': 'wrapper',
+ 'func': undefined
+ }];
+
+ // Add methods to `LazyWrapper`.
+ LazyWrapper.prototype.clone = lazyClone;
+ LazyWrapper.prototype.reverse = lazyReverse;
+ LazyWrapper.prototype.value = lazyValue;
+
+ // Add chain sequence methods to the `lodash` wrapper.
+ lodash.prototype.at = wrapperAt;
+ lodash.prototype.chain = wrapperChain;
+ lodash.prototype.commit = wrapperCommit;
+ lodash.prototype.next = wrapperNext;
+ lodash.prototype.plant = wrapperPlant;
+ lodash.prototype.reverse = wrapperReverse;
+ lodash.prototype.toJSON = lodash.prototype.valueOf = lodash.prototype.value = wrapperValue;
+
+ if (iteratorSymbol) {
+ lodash.prototype[iteratorSymbol] = wrapperToIterator;
+ }
+ return lodash;
+ }
+
+ /*--------------------------------------------------------------------------*/
+
+ // Export lodash.
+ var _ = runInContext();
+
+ // Expose Lodash on the free variable `window` or `self` when available so it's
+ // globally accessible, even when bundled with Browserify, Webpack, etc. This
+ // also prevents errors in cases where Lodash is loaded by a script tag in the
+ // presence of an AMD loader. See http://requirejs.org/docs/errors.html#mismatch
+ // for more details. Use `_.noConflict` to remove Lodash from the global object.
+ (freeWindow || freeSelf || {})._ = _;
+
+ // Some AMD build optimizers like r.js check for condition patterns like the following:
+ if (typeof define == 'function' && typeof define.amd == 'object' && define.amd) {
+ // Define as an anonymous module so, through path mapping, it can be
+ // referenced as the "underscore" module.
+ define(function() {
+ return _;
+ });
+ }
+ // Check for `exports` after `define` in case a build optimizer adds an `exports` object.
+ else if (freeExports && freeModule) {
+ // Export for Node.js.
+ if (moduleExports) {
+ (freeModule.exports = _)._ = _;
+ }
+ // Export for CommonJS support.
+ freeExports._ = _;
+ }
+ else {
+ // Export to the global object.
+ root._ = _;
+ }
+}.call(this));
diff --git a/views/ngXosViews/serviceGrid/src/vendor/lodash/dist/lodash.min.js b/views/ngXosViews/serviceGrid/src/vendor/lodash/dist/lodash.min.js
new file mode 100644
index 0000000..4994229
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/lodash/dist/lodash.min.js
@@ -0,0 +1,126 @@
+/**
+ * @license
+ * lodash 4.11.2 (Custom Build) lodash.com/license | Underscore.js 1.8.3 underscorejs.org/LICENSE
+ * Build: `lodash -o ./dist/lodash.js`
+ */
+;(function(){function t(t,n){return t.set(n[0],n[1]),t}function n(t,n){return t.add(n),t}function r(t,n,r){switch(r.length){case 0:return t.call(n);case 1:return t.call(n,r[0]);case 2:return t.call(n,r[0],r[1]);case 3:return t.call(n,r[0],r[1],r[2])}return t.apply(n,r)}function e(t,n,r,e){for(var u=-1,o=t.length;++u<o;){var i=t[u];n(e,i,r(i),t)}return e}function u(t,n){for(var r=-1,e=t.length;++r<e&&false!==n(t[r],r,t););return t}function o(t,n){for(var r=-1,e=t.length;++r<e;)if(!n(t[r],r,t))return false;
+return true}function i(t,n){for(var r=-1,e=t.length,u=0,o=[];++r<e;){var i=t[r];n(i,r,t)&&(o[u++]=i)}return o}function f(t,n){return!!t.length&&-1<g(t,n,0)}function c(t,n,r){for(var e=-1,u=t.length;++e<u;)if(r(n,t[e]))return true;return false}function a(t,n){for(var r=-1,e=t.length,u=Array(e);++r<e;)u[r]=n(t[r],r,t);return u}function l(t,n){for(var r=-1,e=n.length,u=t.length;++r<e;)t[u+r]=n[r];return t}function s(t,n,r,e){var u=-1,o=t.length;for(e&&o&&(r=t[++u]);++u<o;)r=n(r,t[u],u,t);return r}function h(t,n,r,e){
+var u=t.length;for(e&&u&&(r=t[--u]);u--;)r=n(r,t[u],u,t);return r}function p(t,n){for(var r=-1,e=t.length;++r<e;)if(n(t[r],r,t))return true;return false}function _(t,n,r,e){var u;return r(t,function(t,r,o){return n(t,r,o)?(u=e?r:t,false):void 0}),u}function v(t,n,r){for(var e=t.length,u=r?e:-1;r?u--:++u<e;)if(n(t[u],u,t))return u;return-1}function g(t,n,r){if(n!==n)return B(t,r);--r;for(var e=t.length;++r<e;)if(t[r]===n)return r;return-1}function d(t,n,r,e){--r;for(var u=t.length;++r<u;)if(e(t[r],n))return r;
+return-1}function y(t,n){var r=t?t.length:0;return r?j(t,n)/r:Z}function b(t,n,r,e,u){return u(t,function(t,u,o){r=e?(e=false,t):n(r,t,u,o)}),r}function x(t,n){var r=t.length;for(t.sort(n);r--;)t[r]=t[r].c;return t}function j(t,n){for(var r,e=-1,u=t.length;++e<u;){var o=n(t[e]);o!==N&&(r=r===N?o:r+o)}return r}function m(t,n){for(var r=-1,e=Array(t);++r<t;)e[r]=n(r);return e}function w(t,n){return a(n,function(n){return[n,t[n]]})}function A(t){return function(n){return t(n)}}function O(t,n){return a(n,function(n){
+return t[n]})}function k(t,n){for(var r=-1,e=t.length;++r<e&&-1<g(n,t[r],0););return r}function E(t,n){for(var r=t.length;r--&&-1<g(n,t[r],0););return r}function I(t){return t&&t.Object===Object?t:null}function S(t){return Lt[t]}function R(t){return Ct[t]}function W(t){return"\\"+zt[t]}function B(t,n,r){var e=t.length;for(n+=r?0:-1;r?n--:++n<e;){var u=t[n];if(u!==u)return n}return-1}function L(t){var n=false;if(null!=t&&typeof t.toString!="function")try{n=!!(t+"")}catch(r){}return n}function C(t){for(var n,r=[];!(n=t.next()).done;)r.push(n.value);
+return r}function M(t){var n=-1,r=Array(t.size);return t.forEach(function(t,e){r[++n]=[e,t]}),r}function U(t,n){for(var r=-1,e=t.length,u=0,o=[];++r<e;){var i=t[r];i!==n&&"__lodash_placeholder__"!==i||(t[r]="__lodash_placeholder__",o[u++]=r)}return o}function z(t){var n=-1,r=Array(t.size);return t.forEach(function(t){r[++n]=t}),r}function D(t){if(!t||!It.test(t))return t.length;for(var n=kt.lastIndex=0;kt.test(t);)n++;return n}function $(t){return Mt[t]}function F(I){function jt(t){if(De(t)&&!li(t)&&!(t instanceof Lt)){
+if(t instanceof wt)return t;if(wu.call(t,"__wrapped__"))return oe(t)}return new wt(t)}function mt(){}function wt(t,n){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!n,this.__index__=0,this.__values__=N}function Lt(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=false,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}function Ct(){}function Mt(t){var n=-1,r=t?t.length:0;for(this.clear();++n<r;){var e=t[n];this.set(e[0],e[1])}}function Ut(t){var n=-1,r=t?t.length:0;
+for(this.__data__=new Mt;++n<r;)this.push(t[n])}function zt(t,n){var r=t.__data__;return Hr(n)?(r=r.__data__,"__lodash_hash_undefined__"===(typeof n=="string"?r.string:r.hash)[n]):r.has(n)}function Ft(t){var n=-1,r=t?t.length:0;for(this.clear();++n<r;){var e=t[n];this.set(e[0],e[1])}}function Nt(t,n){var r=Tt(t,n);return 0>r?false:(r==t.length-1?t.pop():Fu.call(t,r,1),true)}function Zt(t,n){var r=Tt(t,n);return 0>r?N:t[r][1]}function Tt(t,n){for(var r=t.length;r--;)if(Se(t[r][0],n))return r;return-1}function qt(t,n,r){
+var e=Tt(t,n);0>e?t.push([n,r]):t[e][1]=r}function Gt(t,n,r,e){return t===N||Se(t,xu[r])&&!wu.call(e,r)?n:t}function Jt(t,n,r){(r===N||Se(t[n],r))&&(typeof n!="number"||r!==N||n in t)||(t[n]=r)}function Yt(t,n,r){var e=t[n];wu.call(t,n)&&Se(e,r)&&(r!==N||n in t)||(t[n]=r)}function Ht(t,n,r,e){return yo(t,function(t,u,o){n(e,t,r(t),o)}),e}function Qt(t,n){return t&&ar(n,tu(n),t)}function Xt(t,n){for(var r=-1,e=null==t,u=n.length,o=Array(u);++r<u;)o[r]=e?N:Qe(t,n[r]);return o}function tn(t,n,r){return t===t&&(r!==N&&(t=r>=t?t:r),
+n!==N&&(t=t>=n?t:n)),t}function nn(t,n,r,e,o,i,f){var c;if(e&&(c=i?e(t,o,i,f):e(t)),c!==N)return c;if(!ze(t))return t;if(o=li(t)){if(c=Pr(t),!n)return cr(t,c)}else{var a=Fr(t),l="[object Function]"==a||"[object GeneratorFunction]"==a;if(si(t))return er(t,n);if("[object Object]"==a||"[object Arguments]"==a||l&&!i){if(L(t))return i?t:{};if(c=Zr(l?{}:t),!n)return lr(t,Qt(c,t))}else{if(!Bt[a])return i?t:{};c=Tr(t,a,nn,n)}}if(f||(f=new Ft),i=f.get(t))return i;if(f.set(t,c),!o)var s=r?vn(t,tu,$r):tu(t);
+return u(s||t,function(u,o){s&&(o=u,u=t[o]),Yt(c,o,nn(u,n,r,e,o,t,f))}),c}function rn(t){var n=tu(t),r=n.length;return function(e){if(null==e)return!r;for(var u=r;u--;){var o=n[u],i=t[o],f=e[o];if(f===N&&!(o in Object(e))||!i(f))return false}return true}}function en(t){return ze(t)?zu(t):{}}function un(t,n,r){if(typeof t!="function")throw new yu("Expected a function");return $u(function(){t.apply(N,r)},n)}function on(t,n,r,e){var u=-1,o=f,i=true,l=t.length,s=[],h=n.length;if(!l)return s;r&&(n=a(n,A(r))),e?(o=c,
+i=false):n.length>=200&&(o=zt,i=false,n=new Ut(n));t:for(;++u<l;){var p=t[u],_=r?r(p):p,p=e||0!==p?p:0;if(i&&_===_){for(var v=h;v--;)if(n[v]===_)continue t;s.push(p)}else o(n,_,e)||s.push(p)}return s}function fn(t,n){var r=true;return yo(t,function(t,e,u){return r=!!n(t,e,u)}),r}function cn(t,n,r){for(var e=-1,u=t.length;++e<u;){var o=t[e],i=n(o);if(null!=i&&(f===N?i===i&&!Te(i):r(i,f)))var f=i,c=o}return c}function an(t,n){var r=[];return yo(t,function(t,e,u){n(t,e,u)&&r.push(t)}),r}function ln(t,n,r,e,u){
+var o=-1,i=t.length;for(r||(r=Vr),u||(u=[]);++o<i;){var f=t[o];n>0&&r(f)?n>1?ln(f,n-1,r,e,u):l(u,f):e||(u[u.length]=f)}return u}function sn(t,n){return t&&xo(t,n,tu)}function hn(t,n){return t&&jo(t,n,tu)}function pn(t,n){return i(n,function(n){return Ce(t[n])})}function _n(t,n){n=Yr(n,t)?[n]:nr(n);for(var r=0,e=n.length;null!=t&&e>r;)t=t[ee(n[r++])];return r&&r==e?t:N}function vn(t,n,r){return n=n(t),li(t)?n:l(n,r(t))}function gn(t,n){return t>n}function dn(t,n){return wu.call(t,n)||typeof t=="object"&&n in t&&null===Zu(Object(t));
+}function yn(t,n){return n in Object(t)}function bn(t,n,r){for(var e=r?c:f,u=t[0].length,o=t.length,i=o,l=Array(o),s=1/0,h=[];i--;){var p=t[i];i&&n&&(p=a(p,A(n))),s=Gu(p.length,s),l[i]=!r&&(n||u>=120&&p.length>=120)?new Ut(i&&p):N}var p=t[0],_=-1,v=l[0];t:for(;++_<u&&s>h.length;){var g=p[_],d=n?n(g):g,g=r||0!==g?g:0;if(v?!zt(v,d):!e(h,d,r)){for(i=o;--i;){var y=l[i];if(y?!zt(y,d):!e(t[i],d,r))continue t}v&&v.push(d),h.push(g)}}return h}function xn(t,n,r){var e={};return sn(t,function(t,u,o){n(e,r(t),u,o);
+}),e}function jn(t,n,e){return Yr(n,t)||(n=nr(n),t=re(t,n),n=ae(n)),n=null==t?t:t[ee(n)],null==n?N:r(n,t,e)}function mn(t,n,r,e,u){if(t===n)n=true;else if(null==t||null==n||!ze(t)&&!De(n))n=t!==t&&n!==n;else t:{var o=li(t),i=li(n),f="[object Array]",c="[object Array]";o||(f=Fr(t),f="[object Arguments]"==f?"[object Object]":f),i||(c=Fr(n),c="[object Arguments]"==c?"[object Object]":c);var a="[object Object]"==f&&!L(t),i="[object Object]"==c&&!L(n);if((c=f==c)&&!a)u||(u=new Ft),n=o||qe(t)?Br(t,n,mn,r,e,u):Lr(t,n,f,mn,r,e,u);else{
+if(!(2&e)&&(o=a&&wu.call(t,"__wrapped__"),f=i&&wu.call(n,"__wrapped__"),o||f)){t=o?t.value():t,n=f?n.value():n,u||(u=new Ft),n=mn(t,n,r,e,u);break t}if(c)n:if(u||(u=new Ft),o=2&e,f=tu(t),i=f.length,c=tu(n).length,i==c||o){for(a=i;a--;){var l=f[a];if(!(o?l in n:dn(n,l))){n=false;break n}}if(c=u.get(t))n=c==n;else{c=true,u.set(t,n);for(var s=o;++a<i;){var l=f[a],h=t[l],p=n[l];if(r)var _=o?r(p,h,l,n,t,u):r(h,p,l,t,n,u);if(_===N?h!==p&&!mn(h,p,r,e,u):!_){c=false;break}s||(s="constructor"==l)}c&&!s&&(r=t.constructor,
+e=n.constructor,r!=e&&"constructor"in t&&"constructor"in n&&!(typeof r=="function"&&r instanceof r&&typeof e=="function"&&e instanceof e)&&(c=false)),u["delete"](t),n=c}}else n=false;else n=false}}return n}function wn(t,n,r,e){var u=r.length,o=u,i=!e;if(null==t)return!o;for(t=Object(t);u--;){var f=r[u];if(i&&f[2]?f[1]!==t[f[0]]:!(f[0]in t))return false}for(;++u<o;){var f=r[u],c=f[0],a=t[c],l=f[1];if(i&&f[2]){if(a===N&&!(c in t))return false}else{if(f=new Ft,e)var s=e(a,l,c,t,n,f);if(s===N?!mn(l,a,e,3,f):!s)return false;
+}}return true}function An(t){return typeof t=="function"?t:null==t?au:typeof t=="object"?li(t)?Sn(t[0],t[1]):In(t):pu(t)}function On(t){t=null==t?t:Object(t);var n,r=[];for(n in t)r.push(n);return r}function kn(t,n){return n>t}function En(t,n){var r=-1,e=We(t)?Array(t.length):[];return yo(t,function(t,u,o){e[++r]=n(t,u,o)}),e}function In(t){var n=Ur(t);return 1==n.length&&n[0][2]?te(n[0][0],n[0][1]):function(r){return r===t||wn(r,t,n)}}function Sn(t,n){return Yr(t)&&n===n&&!ze(n)?te(ee(t),n):function(r){
+var e=Qe(r,t);return e===N&&e===n?Xe(r,t):mn(n,e,N,3)}}function Rn(t,n,r,e,o){if(t!==n){if(!li(n)&&!qe(n))var i=nu(n);u(i||n,function(u,f){if(i&&(f=u,u=n[f]),ze(u)){o||(o=new Ft);var c=f,a=o,l=t[c],s=n[c],h=a.get(s);if(h)Jt(t,c,h);else{var h=e?e(l,s,c+"",t,n,a):N,p=h===N;p&&(h=s,li(s)||qe(s)?li(l)?h=l:Be(l)?h=cr(l):(p=false,h=nn(s,true)):Ne(s)||Re(s)?Re(l)?h=Ye(l):!ze(l)||r&&Ce(l)?(p=false,h=nn(s,true)):h=l:p=false),a.set(s,h),p&&Rn(h,s,r,e,a),a["delete"](s),Jt(t,c,h)}}else c=e?e(t[f],u,f+"",t,n,o):N,c===N&&(c=u),
+Jt(t,f,c)})}}function Wn(t,n){var r=t.length;return r?(n+=0>n?r:0,Gr(n,r)?t[n]:N):void 0}function Bn(t,n,r){var e=-1;return n=a(n.length?n:[au],A(Mr())),t=En(t,function(t){return{a:a(n,function(n){return n(t)}),b:++e,c:t}}),x(t,function(t,n){var e;t:{e=-1;for(var u=t.a,o=n.a,i=u.length,f=r.length;++e<i;){var c=or(u[e],o[e]);if(c){e=e>=f?c:c*("desc"==r[e]?-1:1);break t}}e=t.b-n.b}return e})}function Ln(t,n){return t=Object(t),s(n,function(n,r){return r in t&&(n[r]=t[r]),n},{})}function Cn(t,n){for(var r=-1,e=vn(t,nu,ko),u=e.length,o={};++r<u;){
+var i=e[r],f=t[i];n(f,i)&&(o[i]=f)}return o}function Mn(t){return function(n){return null==n?N:n[t]}}function Un(t){return function(n){return _n(n,t)}}function zn(t,n,r,e){var u=e?d:g,o=-1,i=n.length,f=t;for(r&&(f=a(t,A(r)));++o<i;)for(var c=0,l=n[o],l=r?r(l):l;-1<(c=u(f,l,c,e));)f!==t&&Fu.call(f,c,1),Fu.call(t,c,1);return t}function Dn(t,n){for(var r=t?n.length:0,e=r-1;r--;){var u=n[r];if(r==e||u!==o){var o=u;if(Gr(u))Fu.call(t,u,1);else if(Yr(u,t))delete t[ee(u)];else{var u=nr(u),i=re(t,u);null!=i&&delete i[ee(ae(u))];
+}}}}function $n(t,n){return t+Pu(Yu()*(n-t+1))}function Fn(t,n){var r="";if(!t||1>n||n>9007199254740991)return r;do n%2&&(r+=t),(n=Pu(n/2))&&(t+=t);while(n);return r}function Nn(t,n,r,e){n=Yr(n,t)?[n]:nr(n);for(var u=-1,o=n.length,i=o-1,f=t;null!=f&&++u<o;){var c=ee(n[u]);if(ze(f)){var a=r;if(u!=i){var l=f[c],a=e?e(l,c,f):N;a===N&&(a=null==l?Gr(n[u+1])?[]:{}:l)}Yt(f,c,a)}f=f[c]}return t}function Pn(t,n,r){var e=-1,u=t.length;for(0>n&&(n=-n>u?0:u+n),r=r>u?u:r,0>r&&(r+=u),u=n>r?0:r-n>>>0,n>>>=0,r=Array(u);++e<u;)r[e]=t[e+n];
+return r}function Zn(t,n){var r;return yo(t,function(t,e,u){return r=n(t,e,u),!r}),!!r}function Tn(t,n,r){var e=0,u=t?t.length:e;if(typeof n=="number"&&n===n&&2147483647>=u){for(;u>e;){var o=e+u>>>1,i=t[o];null!==i&&!Te(i)&&(r?n>=i:n>i)?e=o+1:u=o}return u}return qn(t,n,au,r)}function qn(t,n,r,e){n=r(n);for(var u=0,o=t?t.length:0,i=n!==n,f=null===n,c=Te(n),a=n===N;o>u;){var l=Pu((u+o)/2),s=r(t[l]),h=s!==N,p=null===s,_=s===s,v=Te(s);(i?e||_:a?_&&(e||h):f?_&&h&&(e||!p):c?_&&h&&!p&&(e||!v):p||v?0:e?n>=s:n>s)?u=l+1:o=l;
+}return Gu(o,4294967294)}function Vn(t,n){for(var r=-1,e=t.length,u=0,o=[];++r<e;){var i=t[r],f=n?n(i):i;if(!r||!Se(f,c)){var c=f;o[u++]=0===i?0:i}}return o}function Kn(t){return typeof t=="number"?t:Te(t)?Z:+t}function Gn(t){if(typeof t=="string")return t;if(Te(t))return go?go.call(t):"";var n=t+"";return"0"==n&&1/t==-P?"-0":n}function Jn(t,n,r){var e=-1,u=f,o=t.length,i=true,a=[],l=a;if(r)i=false,u=c;else if(o>=200){if(u=n?null:wo(t))return z(u);i=false,u=zt,l=new Ut}else l=n?[]:a;t:for(;++e<o;){var s=t[e],h=n?n(s):s,s=r||0!==s?s:0;
+if(i&&h===h){for(var p=l.length;p--;)if(l[p]===h)continue t;n&&l.push(h),a.push(s)}else u(l,h,r)||(l!==a&&l.push(h),a.push(s))}return a}function Yn(t,n,r,e){for(var u=t.length,o=e?u:-1;(e?o--:++o<u)&&n(t[o],o,t););return r?Pn(t,e?0:o,e?o+1:u):Pn(t,e?o+1:0,e?u:o)}function Hn(t,n){var r=t;return r instanceof Lt&&(r=r.value()),s(n,function(t,n){return n.func.apply(n.thisArg,l([t],n.args))},r)}function Qn(t,n,r){for(var e=-1,u=t.length;++e<u;)var o=o?l(on(o,t[e],n,r),on(t[e],o,n,r)):t[e];return o&&o.length?Jn(o,n,r):[];
+}function Xn(t,n,r){for(var e=-1,u=t.length,o=n.length,i={};++e<u;)r(i,t[e],o>e?n[e]:N);return i}function tr(t){return Be(t)?t:[]}function nr(t){return li(t)?t:Io(t)}function rr(t,n,r){var e=t.length;return r=r===N?e:r,!n&&r>=e?t:Pn(t,n,r)}function er(t,n){if(n)return t.slice();var r=new t.constructor(t.length);return t.copy(r),r}function ur(t){var n=new t.constructor(t.byteLength);return new Bu(n).set(new Bu(t)),n}function or(t,n){if(t!==n){var r=t!==N,e=null===t,u=t===t,o=Te(t),i=n!==N,f=null===n,c=n===n,a=Te(n);
+if(!f&&!a&&!o&&t>n||o&&i&&c&&!f&&!a||e&&i&&c||!r&&c||!u)return 1;if(!e&&!o&&!a&&n>t||a&&r&&u&&!e&&!o||f&&r&&u||!i&&u||!c)return-1}return 0}function ir(t,n,r,e){var u=-1,o=t.length,i=r.length,f=-1,c=n.length,a=Ku(o-i,0),l=Array(c+a);for(e=!e;++f<c;)l[f]=n[f];for(;++u<i;)(e||o>u)&&(l[r[u]]=t[u]);for(;a--;)l[f++]=t[u++];return l}function fr(t,n,r,e){var u=-1,o=t.length,i=-1,f=r.length,c=-1,a=n.length,l=Ku(o-f,0),s=Array(l+a);for(e=!e;++u<l;)s[u]=t[u];for(l=u;++c<a;)s[l+c]=n[c];for(;++i<f;)(e||o>u)&&(s[l+r[i]]=t[u++]);
+return s}function cr(t,n){var r=-1,e=t.length;for(n||(n=Array(e));++r<e;)n[r]=t[r];return n}function ar(t,n,r,e){r||(r={});for(var u=-1,o=n.length;++u<o;){var i=n[u],f=e?e(r[i],t[i],i,r,t):t[i];Yt(r,i,f)}return r}function lr(t,n){return ar(t,$r(t),n)}function sr(t,n){return function(r,u){var o=li(r)?e:Ht,i=n?n():{};return o(r,t,Mr(u),i)}}function hr(t){return Ee(function(n,r){var e=-1,u=r.length,o=u>1?r[u-1]:N,i=u>2?r[2]:N,o=typeof o=="function"?(u--,o):N;for(i&&Jr(r[0],r[1],i)&&(o=3>u?N:o,u=1),n=Object(n);++e<u;)(i=r[e])&&t(n,i,e,o);
+return n})}function pr(t,n){return function(r,e){if(null==r)return r;if(!We(r))return t(r,e);for(var u=r.length,o=n?u:-1,i=Object(r);(n?o--:++o<u)&&false!==e(i[o],o,i););return r}}function _r(t){return function(n,r,e){var u=-1,o=Object(n);e=e(n);for(var i=e.length;i--;){var f=e[t?i:++u];if(false===r(o[f],f,o))break}return n}}function vr(t,n,r){function e(){return(this&&this!==Vt&&this instanceof e?o:t).apply(u?r:this,arguments)}var u=1&n,o=yr(t);return e}function gr(t){return function(n){n=He(n);var r=It.test(n)?n.match(kt):N,e=r?r[0]:n.charAt(0);
+return n=r?rr(r,1).join(""):n.slice(1),e[t]()+n}}function dr(t){return function(n){return s(fu(iu(n).replace(At,"")),t,"")}}function yr(t){return function(){var n=arguments;switch(n.length){case 0:return new t;case 1:return new t(n[0]);case 2:return new t(n[0],n[1]);case 3:return new t(n[0],n[1],n[2]);case 4:return new t(n[0],n[1],n[2],n[3]);case 5:return new t(n[0],n[1],n[2],n[3],n[4]);case 6:return new t(n[0],n[1],n[2],n[3],n[4],n[5]);case 7:return new t(n[0],n[1],n[2],n[3],n[4],n[5],n[6])}var r=en(t.prototype),n=t.apply(r,n);
+return ze(n)?n:r}}function br(t,n,e){function u(){for(var i=arguments.length,f=Array(i),c=i,a=Dr(u);c--;)f[c]=arguments[c];return c=3>i&&f[0]!==a&&f[i-1]!==a?[]:U(f,a),i-=c.length,e>i?Sr(t,n,jr,u.placeholder,N,f,c,N,N,e-i):r(this&&this!==Vt&&this instanceof u?o:t,this,f)}var o=yr(t);return u}function xr(t){return Ee(function(n){n=ln(n,1);var r=n.length,e=r,u=wt.prototype.thru;for(t&&n.reverse();e--;){var o=n[e];if(typeof o!="function")throw new yu("Expected a function");if(u&&!i&&"wrapper"==Cr(o))var i=new wt([],true);
+}for(e=i?e:r;++e<r;)var o=n[e],u=Cr(o),f="wrapper"==u?Ao(o):N,i=f&&Qr(f[0])&&424==f[1]&&!f[4].length&&1==f[9]?i[Cr(f[0])].apply(i,f[3]):1==o.length&&Qr(o)?i[u]():i.thru(o);return function(){var t=arguments,e=t[0];if(i&&1==t.length&&li(e)&&e.length>=200)return i.plant(e).value();for(var u=0,t=r?n[u].apply(this,t):e;++u<r;)t=n[u].call(this,t);return t}})}function jr(t,n,r,e,u,o,i,f,c,a){function l(){for(var d=arguments.length,y=d,b=Array(d);y--;)b[y]=arguments[y];if(_){var x,j=Dr(l),y=b.length;for(x=0;y--;)b[y]===j&&x++;
+}if(e&&(b=ir(b,e,u,_)),o&&(b=fr(b,o,i,_)),d-=x,_&&a>d)return j=U(b,j),Sr(t,n,jr,l.placeholder,r,b,j,f,c,a-d);if(j=h?r:this,y=p?j[t]:t,d=b.length,f){x=b.length;for(var m=Gu(f.length,x),w=cr(b);m--;){var A=f[m];b[m]=Gr(A,x)?w[A]:N}}else v&&d>1&&b.reverse();return s&&d>c&&(b.length=c),this&&this!==Vt&&this instanceof l&&(y=g||yr(y)),y.apply(j,b)}var s=128&n,h=1&n,p=2&n,_=24&n,v=512&n,g=p?N:yr(t);return l}function mr(t,n){return function(r,e){return xn(r,t,n(e))}}function wr(t){return function(n,r){var e;
+if(n===N&&r===N)return 0;if(n!==N&&(e=n),r!==N){if(e===N)return r;typeof n=="string"||typeof r=="string"?(n=Gn(n),r=Gn(r)):(n=Kn(n),r=Kn(r)),e=t(n,r)}return e}}function Ar(t){return Ee(function(n){return n=1==n.length&&li(n[0])?a(n[0],A(Mr())):a(ln(n,1,Kr),A(Mr())),Ee(function(e){var u=this;return t(n,function(t){return r(t,u,e)})})})}function Or(t,n){n=n===N?" ":Gn(n);var r=n.length;return 2>r?r?Fn(n,t):n:(r=Fn(n,Nu(t/D(n))),It.test(n)?rr(r.match(kt),0,t).join(""):r.slice(0,t))}function kr(t,n,e,u){
+function o(){for(var n=-1,c=arguments.length,a=-1,l=u.length,s=Array(l+c),h=this&&this!==Vt&&this instanceof o?f:t;++a<l;)s[a]=u[a];for(;c--;)s[a++]=arguments[++n];return r(h,i?e:this,s)}var i=1&n,f=yr(t);return o}function Er(t){return function(n,r,e){e&&typeof e!="number"&&Jr(n,r,e)&&(r=e=N),n=Je(n),n=n===n?n:0,r===N?(r=n,n=0):r=Je(r)||0,e=e===N?r>n?1:-1:Je(e)||0;var u=-1;r=Ku(Nu((r-n)/(e||1)),0);for(var o=Array(r);r--;)o[t?r:++u]=n,n+=e;return o}}function Ir(t){return function(n,r){return typeof n=="string"&&typeof r=="string"||(n=Je(n),
+r=Je(r)),t(n,r)}}function Sr(t,n,r,e,u,o,i,f,c,a){var l=8&n,s=l?i:N;i=l?N:i;var h=l?o:N;return o=l?N:o,n=(n|(l?32:64))&~(l?64:32),4&n||(n&=-4),n=[t,n,u,h,s,o,i,f,c,a],r=r.apply(N,n),Qr(t)&&Eo(r,n),r.placeholder=e,r}function Rr(t){var n=gu[t];return function(t,r){if(t=Je(t),r=Ke(r)){var e=(He(t)+"e").split("e"),e=n(e[0]+"e"+(+e[1]+r)),e=(He(e)+"e").split("e");return+(e[0]+"e"+(+e[1]-r))}return n(t)}}function Wr(t,n,r,e,u,o,i,f){var c=2&n;if(!c&&typeof t!="function")throw new yu("Expected a function");
+var a=e?e.length:0;if(a||(n&=-97,e=u=N),i=i===N?i:Ku(Ke(i),0),f=f===N?f:Ke(f),a-=u?u.length:0,64&n){var l=e,s=u;e=u=N}var h=c?N:Ao(t);return o=[t,n,r,e,u,l,s,o,i,f],h&&(r=o[1],t=h[1],n=r|t,e=128==t&&8==r||128==t&&256==r&&h[8]>=o[7].length||384==t&&h[8]>=h[7].length&&8==r,131>n||e)&&(1&t&&(o[2]=h[2],n|=1&r?0:4),(r=h[3])&&(e=o[3],o[3]=e?ir(e,r,h[4]):r,o[4]=e?U(o[3],"__lodash_placeholder__"):h[4]),(r=h[5])&&(e=o[5],o[5]=e?fr(e,r,h[6]):r,o[6]=e?U(o[5],"__lodash_placeholder__"):h[6]),(r=h[7])&&(o[7]=r),
+128&t&&(o[8]=null==o[8]?h[8]:Gu(o[8],h[8])),null==o[9]&&(o[9]=h[9]),o[0]=h[0],o[1]=n),t=o[0],n=o[1],r=o[2],e=o[3],u=o[4],f=o[9]=null==o[9]?c?0:t.length:Ku(o[9]-a,0),!f&&24&n&&(n&=-25),(h?mo:Eo)(n&&1!=n?8==n||16==n?br(t,n,f):32!=n&&33!=n||u.length?jr.apply(N,o):kr(t,n,r,e):vr(t,n,r),o)}function Br(t,n,r,e,u,o){var i=-1,f=2&u,c=1&u,a=t.length,l=n.length;if(a!=l&&!(f&&l>a))return false;if(l=o.get(t))return l==n;for(l=true,o.set(t,n);++i<a;){var s=t[i],h=n[i];if(e)var _=f?e(h,s,i,n,t,o):e(s,h,i,t,n,o);if(_!==N){
+if(_)continue;l=false;break}if(c){if(!p(n,function(t){return s===t||r(s,t,e,u,o)})){l=false;break}}else if(s!==h&&!r(s,h,e,u,o)){l=false;break}}return o["delete"](t),l}function Lr(t,n,r,e,u,o,i){switch(r){case"[object DataView]":if(t.byteLength!=n.byteLength||t.byteOffset!=n.byteOffset)break;t=t.buffer,n=n.buffer;case"[object ArrayBuffer]":if(t.byteLength!=n.byteLength||!e(new Bu(t),new Bu(n)))break;return true;case"[object Boolean]":case"[object Date]":return+t==+n;case"[object Error]":return t.name==n.name&&t.message==n.message;
+case"[object Number]":return t!=+t?n!=+n:t==+n;case"[object RegExp]":case"[object String]":return t==n+"";case"[object Map]":var f=M;case"[object Set]":if(f||(f=z),t.size!=n.size&&!(2&o))break;return(r=i.get(t))?r==n:(o|=1,i.set(t,n),Br(f(t),f(n),e,u,o,i));case"[object Symbol]":if(vo)return vo.call(t)==vo.call(n)}return false}function Cr(t){for(var n=t.name+"",r=co[n],e=wu.call(co,n)?r.length:0;e--;){var u=r[e],o=u.func;if(null==o||o==t)return u.name}return n}function Mr(){var t=jt.iteratee||lu,t=t===lu?An:t;
+return arguments.length?t(arguments[0],arguments[1]):t}function Ur(t){t=ru(t);for(var n=t.length;n--;){var r=t[n][1];t[n][2]=r===r&&!ze(r)}return t}function zr(t,n){var r=t[n];return $e(r)?r:N}function Dr(t){return(wu.call(jt,"placeholder")?jt:t).placeholder}function $r(t){return Mu(Object(t))}function Fr(t){return ku.call(t)}function Nr(t,n,r){n=Yr(n,t)?[n]:nr(n);for(var e,u=-1,o=n.length;++u<o;){var i=ee(n[u]);if(!(e=null!=t&&r(t,i)))break;t=t[i]}return e?e:(o=t?t.length:0,!!o&&Ue(o)&&Gr(i,o)&&(li(t)||Ze(t)||Re(t)));
+}function Pr(t){var n=t.length,r=t.constructor(n);return n&&"string"==typeof t[0]&&wu.call(t,"index")&&(r.index=t.index,r.input=t.input),r}function Zr(t){return typeof t.constructor!="function"||Xr(t)?{}:en(Zu(Object(t)))}function Tr(r,e,u,o){var i=r.constructor;switch(e){case"[object ArrayBuffer]":return ur(r);case"[object Boolean]":case"[object Date]":return new i(+r);case"[object DataView]":return e=o?ur(r.buffer):r.buffer,new r.constructor(e,r.byteOffset,r.byteLength);case"[object Float32Array]":
+case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return e=o?ur(r.buffer):r.buffer,new r.constructor(e,r.byteOffset,r.length);case"[object Map]":return e=o?u(M(r),true):M(r),s(e,t,new r.constructor);case"[object Number]":case"[object String]":return new i(r);case"[object RegExp]":return e=new r.constructor(r.source,st.exec(r)),e.lastIndex=r.lastIndex,
+e;case"[object Set]":return e=o?u(z(r),true):z(r),s(e,n,new r.constructor);case"[object Symbol]":return vo?Object(vo.call(r)):{}}}function qr(t){var n=t?t.length:N;return Ue(n)&&(li(t)||Ze(t)||Re(t))?m(n,String):null}function Vr(t){return Be(t)&&(li(t)||Re(t))}function Kr(t){return li(t)&&!(2==t.length&&!Ce(t[0]))}function Gr(t,n){return n=null==n?9007199254740991:n,!!n&&(typeof t=="number"||dt.test(t))&&t>-1&&0==t%1&&n>t}function Jr(t,n,r){if(!ze(r))return false;var e=typeof n;return("number"==e?We(r)&&Gr(n,r.length):"string"==e&&n in r)?Se(r[n],t):false;
+}function Yr(t,n){if(li(t))return false;var r=typeof t;return"number"==r||"symbol"==r||"boolean"==r||null==t||Te(t)?true:nt.test(t)||!tt.test(t)||null!=n&&t in Object(n)}function Hr(t){var n=typeof t;return"string"==n||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==t:null===t}function Qr(t){var n=Cr(t),r=jt[n];return typeof r=="function"&&n in Lt.prototype?t===r?true:(n=Ao(r),!!n&&t===n[0]):false}function Xr(t){var n=t&&t.constructor;return t===(typeof n=="function"&&n.prototype||xu)}function te(t,n){return function(r){
+return null==r?false:r[t]===n&&(n!==N||t in Object(r))}}function ne(t,n,r,e,u,o){return ze(t)&&ze(n)&&Rn(t,n,N,ne,o.set(n,t)),t}function re(t,n){return 1==n.length?t:_n(t,Pn(n,0,-1))}function ee(t){if(typeof t=="string"||Te(t))return t;var n=t+"";return"0"==n&&1/t==-P?"-0":n}function ue(t){if(null!=t){try{return mu.call(t)}catch(n){}return t+""}return""}function oe(t){if(t instanceof Lt)return t.clone();var n=new wt(t.__wrapped__,t.__chain__);return n.__actions__=cr(t.__actions__),n.__index__=t.__index__,
+n.__values__=t.__values__,n}function ie(t,n,r){var e=t?t.length:0;return e?(n=r||n===N?1:Ke(n),Pn(t,0>n?0:n,e)):[]}function fe(t,n,r){var e=t?t.length:0;return e?(n=r||n===N?1:Ke(n),n=e-n,Pn(t,0,0>n?0:n)):[]}function ce(t){return t&&t.length?t[0]:N}function ae(t){var n=t?t.length:0;return n?t[n-1]:N}function le(t,n){return t&&t.length&&n&&n.length?zn(t,n):t}function se(t){return t?Qu.call(t):t}function he(t){if(!t||!t.length)return[];var n=0;return t=i(t,function(t){return Be(t)?(n=Ku(t.length,n),
+!0):void 0}),m(n,function(n){return a(t,Mn(n))})}function pe(t,n){if(!t||!t.length)return[];var e=he(t);return null==n?e:a(e,function(t){return r(n,N,t)})}function _e(t){return t=jt(t),t.__chain__=true,t}function ve(t,n){return n(t)}function ge(){return this}function de(t,n){return typeof n=="function"&&li(t)?u(t,n):yo(t,Mr(n))}function ye(t,n){var r;if(typeof n=="function"&&li(t)){for(r=t.length;r--&&false!==n(t[r],r,t););r=t}else r=bo(t,Mr(n));return r}function be(t,n){return(li(t)?a:En)(t,Mr(n,3))}function xe(t,n,r){
+var e=-1,u=Ve(t),o=u.length,i=o-1;for(n=(r?Jr(t,n,r):n===N)?1:tn(Ke(n),0,o);++e<n;)t=$n(e,i),r=u[t],u[t]=u[e],u[e]=r;return u.length=n,u}function je(t,n,r){return n=r?N:n,n=t&&null==n?t.length:n,Wr(t,128,N,N,N,N,n)}function me(t,n){var r;if(typeof n!="function")throw new yu("Expected a function");return t=Ke(t),function(){return 0<--t&&(r=n.apply(this,arguments)),1>=t&&(n=N),r}}function we(t,n,r){return n=r?N:n,t=Wr(t,8,N,N,N,N,N,n),t.placeholder=we.placeholder,t}function Ae(t,n,r){return n=r?N:n,
+t=Wr(t,16,N,N,N,N,N,n),t.placeholder=Ae.placeholder,t}function Oe(t,n,r){function e(n){var r=c,e=a;return c=a=N,_=n,s=t.apply(e,r)}function u(t){var r=t-p;return t-=_,!p||r>=n||0>r||g&&t>=l}function o(){var t=Xo();if(u(t))return i(t);var r;r=t-_,t=n-(t-p),r=g?Gu(t,l-r):t,h=$u(o,r)}function i(t){return Lu(h),h=N,d&&c?e(t):(c=a=N,s)}function f(){var t=Xo(),r=u(t);if(c=arguments,a=this,p=t,r){if(h===N)return _=t=p,h=$u(o,n),v?e(t):s;if(g)return Lu(h),h=$u(o,n),e(p)}return h===N&&(h=$u(o,n)),s}var c,a,l,s,h,p=0,_=0,v=false,g=false,d=true;
+if(typeof t!="function")throw new yu("Expected a function");return n=Je(n)||0,ze(r)&&(v=!!r.leading,l=(g="maxWait"in r)?Ku(Je(r.maxWait)||0,n):l,d="trailing"in r?!!r.trailing:d),f.cancel=function(){h!==N&&Lu(h),p=_=0,c=a=h=N},f.flush=function(){return h===N?s:i(Xo())},f}function ke(t,n){function r(){var e=arguments,u=n?n.apply(this,e):e[0],o=r.cache;return o.has(u)?o.get(u):(e=t.apply(this,e),r.cache=o.set(u,e),e)}if(typeof t!="function"||n&&typeof n!="function")throw new yu("Expected a function");
+return r.cache=new(ke.Cache||Mt),r}function Ee(t,n){if(typeof t!="function")throw new yu("Expected a function");return n=Ku(n===N?t.length-1:Ke(n),0),function(){for(var e=arguments,u=-1,o=Ku(e.length-n,0),i=Array(o);++u<o;)i[u]=e[n+u];switch(n){case 0:return t.call(this,i);case 1:return t.call(this,e[0],i);case 2:return t.call(this,e[0],e[1],i)}for(o=Array(n+1),u=-1;++u<n;)o[u]=e[u];return o[n]=i,r(t,this,o)}}function Ie(){if(!arguments.length)return[];var t=arguments[0];return li(t)?t:[t]}function Se(t,n){
+return t===n||t!==t&&n!==n}function Re(t){return Be(t)&&wu.call(t,"callee")&&(!Du.call(t,"callee")||"[object Arguments]"==ku.call(t))}function We(t){return null!=t&&Ue(Oo(t))&&!Ce(t)}function Be(t){return De(t)&&We(t)}function Le(t){return De(t)?"[object Error]"==ku.call(t)||typeof t.message=="string"&&typeof t.name=="string":false}function Ce(t){return t=ze(t)?ku.call(t):"","[object Function]"==t||"[object GeneratorFunction]"==t}function Me(t){return typeof t=="number"&&t==Ke(t)}function Ue(t){return typeof t=="number"&&t>-1&&0==t%1&&9007199254740991>=t;
+}function ze(t){var n=typeof t;return!!t&&("object"==n||"function"==n)}function De(t){return!!t&&typeof t=="object"}function $e(t){return ze(t)?(Ce(t)||L(t)?Iu:vt).test(ue(t)):false}function Fe(t){return typeof t=="number"||De(t)&&"[object Number]"==ku.call(t)}function Ne(t){return!De(t)||"[object Object]"!=ku.call(t)||L(t)?false:(t=Zu(Object(t)),null===t?true:(t=wu.call(t,"constructor")&&t.constructor,typeof t=="function"&&t instanceof t&&mu.call(t)==Ou))}function Pe(t){return ze(t)&&"[object RegExp]"==ku.call(t);
+}function Ze(t){return typeof t=="string"||!li(t)&&De(t)&&"[object String]"==ku.call(t)}function Te(t){return typeof t=="symbol"||De(t)&&"[object Symbol]"==ku.call(t)}function qe(t){return De(t)&&Ue(t.length)&&!!Wt[ku.call(t)]}function Ve(t){if(!t)return[];if(We(t))return Ze(t)?t.match(kt):cr(t);if(Uu&&t[Uu])return C(t[Uu]());var n=Fr(t);return("[object Map]"==n?M:"[object Set]"==n?z:uu)(t)}function Ke(t){if(!t)return 0===t?t:0;if(t=Je(t),t===P||t===-P)return 1.7976931348623157e308*(0>t?-1:1);var n=t%1;
+return t===t?n?t-n:t:0}function Ge(t){return t?tn(Ke(t),0,4294967295):0}function Je(t){if(typeof t=="number")return t;if(Te(t))return Z;if(ze(t)&&(t=Ce(t.valueOf)?t.valueOf():t,t=ze(t)?t+"":t),typeof t!="string")return 0===t?t:+t;t=t.replace(ot,"");var n=_t.test(t);return n||gt.test(t)?$t(t.slice(2),n?2:8):pt.test(t)?Z:+t}function Ye(t){return ar(t,nu(t))}function He(t){return null==t?"":Gn(t)}function Qe(t,n,r){return t=null==t?N:_n(t,n),t===N?r:t}function Xe(t,n){return null!=t&&Nr(t,n,yn)}function tu(t){
+var n=Xr(t);if(!n&&!We(t))return Vu(Object(t));var r,e=qr(t),u=!!e,e=e||[],o=e.length;for(r in t)!dn(t,r)||u&&("length"==r||Gr(r,o))||n&&"constructor"==r||e.push(r);return e}function nu(t){for(var n=-1,r=Xr(t),e=On(t),u=e.length,o=qr(t),i=!!o,o=o||[],f=o.length;++n<u;){var c=e[n];i&&("length"==c||Gr(c,f))||"constructor"==c&&(r||!wu.call(t,c))||o.push(c)}return o}function ru(t){return w(t,tu(t))}function eu(t){return w(t,nu(t))}function uu(t){return t?O(t,tu(t)):[]}function ou(t){return Mi(He(t).toLowerCase());
+}function iu(t){return(t=He(t))&&t.replace(yt,S).replace(Ot,"")}function fu(t,n,r){return t=He(t),n=r?N:n,n===N&&(n=St.test(t)?Et:ct),t.match(n)||[]}function cu(t){return function(){return t}}function au(t){return t}function lu(t){return An(typeof t=="function"?t:nn(t,true))}function su(t,n,r){var e=tu(n),o=pn(n,e);null!=r||ze(n)&&(o.length||!e.length)||(r=n,n=t,t=this,o=pn(n,tu(n)));var i=!(ze(r)&&"chain"in r&&!r.chain),f=Ce(t);return u(o,function(r){var e=n[r];t[r]=e,f&&(t.prototype[r]=function(){
+var n=this.__chain__;if(i||n){var r=t(this.__wrapped__);return(r.__actions__=cr(this.__actions__)).push({func:e,args:arguments,thisArg:t}),r.__chain__=n,r}return e.apply(t,l([this.value()],arguments))})}),t}function hu(){}function pu(t){return Yr(t)?Mn(ee(t)):Un(t)}I=I?Kt.defaults({},I,Kt.pick(Vt,Rt)):Vt;var _u=I.Date,vu=I.Error,gu=I.Math,du=I.RegExp,yu=I.TypeError,bu=I.Array.prototype,xu=I.Object.prototype,ju=I.String.prototype,mu=I.Function.prototype.toString,wu=xu.hasOwnProperty,Au=0,Ou=mu.call(Object),ku=xu.toString,Eu=Vt._,Iu=du("^"+mu.call(wu).replace(et,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Su=Pt?I.Buffer:N,Ru=I.Reflect,Wu=I.Symbol,Bu=I.Uint8Array,Lu=I.clearTimeout,Cu=Ru?Ru.f:N,Mu=Object.getOwnPropertySymbols,Uu=typeof(Uu=Wu&&Wu.iterator)=="symbol"?Uu:N,zu=Object.create,Du=xu.propertyIsEnumerable,$u=I.setTimeout,Fu=bu.splice,Nu=gu.ceil,Pu=gu.floor,Zu=Object.getPrototypeOf,Tu=I.isFinite,qu=bu.join,Vu=Object.keys,Ku=gu.max,Gu=gu.min,Ju=I.parseInt,Yu=gu.random,Hu=ju.replace,Qu=bu.reverse,Xu=ju.split,to=zr(I,"DataView"),no=zr(I,"Map"),ro=zr(I,"Promise"),eo=zr(I,"Set"),uo=zr(I,"WeakMap"),oo=zr(Object,"create"),io=uo&&new uo,fo=!Du.call({
+valueOf:1},"valueOf"),co={},ao=ue(to),lo=ue(no),so=ue(ro),ho=ue(eo),po=ue(uo),_o=Wu?Wu.prototype:N,vo=_o?_o.valueOf:N,go=_o?_o.toString:N;jt.templateSettings={escape:H,evaluate:Q,interpolate:X,variable:"",imports:{_:jt}},jt.prototype=mt.prototype,jt.prototype.constructor=jt,wt.prototype=en(mt.prototype),wt.prototype.constructor=wt,Lt.prototype=en(mt.prototype),Lt.prototype.constructor=Lt,Ct.prototype=oo?oo(null):xu,Mt.prototype.clear=function(){this.__data__={hash:new Ct,map:no?new no:[],string:new Ct
+}},Mt.prototype["delete"]=function(t){var n=this.__data__;return Hr(t)?(n=typeof t=="string"?n.string:n.hash,t=(oo?n[t]!==N:wu.call(n,t))&&delete n[t]):t=no?n.map["delete"](t):Nt(n.map,t),t},Mt.prototype.get=function(t){var n=this.__data__;return Hr(t)?(n=typeof t=="string"?n.string:n.hash,oo?(t=n[t],t="__lodash_hash_undefined__"===t?N:t):t=wu.call(n,t)?n[t]:N):t=no?n.map.get(t):Zt(n.map,t),t},Mt.prototype.has=function(t){var n=this.__data__;return Hr(t)?(n=typeof t=="string"?n.string:n.hash,t=oo?n[t]!==N:wu.call(n,t)):t=no?n.map.has(t):-1<Tt(n.map,t),
+t},Mt.prototype.set=function(t,n){var r=this.__data__;return Hr(t)?(typeof t=="string"?r.string:r.hash)[t]=oo&&n===N?"__lodash_hash_undefined__":n:no?r.map.set(t,n):qt(r.map,t,n),this},Ut.prototype.push=function(t){var n=this.__data__;Hr(t)?(n=n.__data__,(typeof t=="string"?n.string:n.hash)[t]="__lodash_hash_undefined__"):n.set(t,"__lodash_hash_undefined__")},Ft.prototype.clear=function(){this.__data__={array:[],map:null}},Ft.prototype["delete"]=function(t){var n=this.__data__,r=n.array;return r?Nt(r,t):n.map["delete"](t);
+},Ft.prototype.get=function(t){var n=this.__data__,r=n.array;return r?Zt(r,t):n.map.get(t)},Ft.prototype.has=function(t){var n=this.__data__,r=n.array;return r?-1<Tt(r,t):n.map.has(t)},Ft.prototype.set=function(t,n){var r=this.__data__,e=r.array;return e&&(199>e.length?qt(e,t,n):(r.array=null,r.map=new Mt(e))),(r=r.map)&&r.set(t,n),this};var yo=pr(sn),bo=pr(hn,true),xo=_r(),jo=_r(true);Cu&&!Du.call({valueOf:1},"valueOf")&&(On=function(t){return C(Cu(t))});var mo=io?function(t,n){return io.set(t,n),t}:au,wo=eo&&1/z(new eo([,-0]))[1]==P?function(t){
+return new eo(t)}:hu,Ao=io?function(t){return io.get(t)}:hu,Oo=Mn("length");Mu||($r=function(){return[]});var ko=Mu?function(t){for(var n=[];t;)l(n,$r(t)),t=Zu(Object(t));return n}:$r;(to&&"[object DataView]"!=Fr(new to(new ArrayBuffer(1)))||no&&"[object Map]"!=Fr(new no)||ro&&"[object Promise]"!=Fr(ro.resolve())||eo&&"[object Set]"!=Fr(new eo)||uo&&"[object WeakMap]"!=Fr(new uo))&&(Fr=function(t){var n=ku.call(t);if(t=(t="[object Object]"==n?t.constructor:N)?ue(t):N)switch(t){case ao:return"[object DataView]";
+case lo:return"[object Map]";case so:return"[object Promise]";case ho:return"[object Set]";case po:return"[object WeakMap]"}return n});var Eo=function(){var t=0,n=0;return function(r,e){var u=Xo(),o=16-(u-n);if(n=u,o>0){if(150<=++t)return r}else t=0;return mo(r,e)}}(),Io=ke(function(t){var n=[];return He(t).replace(rt,function(t,r,e,u){n.push(e?u.replace(at,"$1"):r||t)}),n}),So=Ee(function(t,n){return Be(t)?on(t,ln(n,1,Be,true)):[]}),Ro=Ee(function(t,n){var r=ae(n);return Be(r)&&(r=N),Be(t)?on(t,ln(n,1,Be,true),Mr(r)):[];
+}),Wo=Ee(function(t,n){var r=ae(n);return Be(r)&&(r=N),Be(t)?on(t,ln(n,1,Be,true),N,r):[]}),Bo=Ee(function(t){var n=a(t,tr);return n.length&&n[0]===t[0]?bn(n):[]}),Lo=Ee(function(t){var n=ae(t),r=a(t,tr);return n===ae(r)?n=N:r.pop(),r.length&&r[0]===t[0]?bn(r,Mr(n)):[]}),Co=Ee(function(t){var n=ae(t),r=a(t,tr);return n===ae(r)?n=N:r.pop(),r.length&&r[0]===t[0]?bn(r,N,n):[]}),Mo=Ee(le),Uo=Ee(function(t,n){n=ln(n,1);var r=t?t.length:0,e=Xt(t,n);return Dn(t,a(n,function(t){return Gr(t,r)?+t:t}).sort(or)),
+e}),zo=Ee(function(t){return Jn(ln(t,1,Be,true))}),Do=Ee(function(t){var n=ae(t);return Be(n)&&(n=N),Jn(ln(t,1,Be,true),Mr(n))}),$o=Ee(function(t){var n=ae(t);return Be(n)&&(n=N),Jn(ln(t,1,Be,true),N,n)}),Fo=Ee(function(t,n){return Be(t)?on(t,n):[]}),No=Ee(function(t){return Qn(i(t,Be))}),Po=Ee(function(t){var n=ae(t);return Be(n)&&(n=N),Qn(i(t,Be),Mr(n))}),Zo=Ee(function(t){var n=ae(t);return Be(n)&&(n=N),Qn(i(t,Be),N,n)}),To=Ee(he),qo=Ee(function(t){var n=t.length,n=n>1?t[n-1]:N,n=typeof n=="function"?(t.pop(),
+n):N;return pe(t,n)}),Vo=Ee(function(t){function n(n){return Xt(n,t)}t=ln(t,1);var r=t.length,e=r?t[0]:0,u=this.__wrapped__;return!(r>1||this.__actions__.length)&&u instanceof Lt&&Gr(e)?(u=u.slice(e,+e+(r?1:0)),u.__actions__.push({func:ve,args:[n],thisArg:N}),new wt(u,this.__chain__).thru(function(t){return r&&!t.length&&t.push(N),t})):this.thru(n)}),Ko=sr(function(t,n,r){wu.call(t,r)?++t[r]:t[r]=1}),Go=sr(function(t,n,r){wu.call(t,r)?t[r].push(n):t[r]=[n]}),Jo=Ee(function(t,n,e){var u=-1,o=typeof n=="function",i=Yr(n),f=We(t)?Array(t.length):[];
+return yo(t,function(t){var c=o?n:i&&null!=t?t[n]:N;f[++u]=c?r(c,t,e):jn(t,n,e)}),f}),Yo=sr(function(t,n,r){t[r]=n}),Ho=sr(function(t,n,r){t[r?0:1].push(n)},function(){return[[],[]]}),Qo=Ee(function(t,n){if(null==t)return[];var r=n.length;return r>1&&Jr(t,n[0],n[1])?n=[]:r>2&&Jr(n[0],n[1],n[2])&&(n=[n[0]]),n=1==n.length&&li(n[0])?n[0]:ln(n,1,Kr),Bn(t,n,[])}),Xo=_u.now,ti=Ee(function(t,n,r){var e=1;if(r.length)var u=U(r,Dr(ti)),e=32|e;return Wr(t,e,n,r,u)}),ni=Ee(function(t,n,r){var e=3;if(r.length)var u=U(r,Dr(ni)),e=32|e;
+return Wr(n,e,t,r,u)}),ri=Ee(function(t,n){return un(t,1,n)}),ei=Ee(function(t,n,r){return un(t,Je(n)||0,r)});ke.Cache=Mt;var ui=Ee(function(t,n){n=1==n.length&&li(n[0])?a(n[0],A(Mr())):a(ln(n,1,Kr),A(Mr()));var e=n.length;return Ee(function(u){for(var o=-1,i=Gu(u.length,e);++o<i;)u[o]=n[o].call(this,u[o]);return r(t,this,u)})}),oi=Ee(function(t,n){var r=U(n,Dr(oi));return Wr(t,32,N,n,r)}),ii=Ee(function(t,n){var r=U(n,Dr(ii));return Wr(t,64,N,n,r)}),fi=Ee(function(t,n){return Wr(t,256,N,N,N,ln(n,1));
+}),ci=Ir(gn),ai=Ir(function(t,n){return t>=n}),li=Array.isArray,si=Su?function(t){return t instanceof Su}:cu(false),hi=Ir(kn),pi=Ir(function(t,n){return n>=t}),_i=hr(function(t,n){if(fo||Xr(n)||We(n))ar(n,tu(n),t);else for(var r in n)wu.call(n,r)&&Yt(t,r,n[r])}),vi=hr(function(t,n){if(fo||Xr(n)||We(n))ar(n,nu(n),t);else for(var r in n)Yt(t,r,n[r])}),gi=hr(function(t,n,r,e){ar(n,nu(n),t,e)}),di=hr(function(t,n,r,e){ar(n,tu(n),t,e)}),yi=Ee(function(t,n){return Xt(t,ln(n,1))}),bi=Ee(function(t){return t.push(N,Gt),
+r(gi,N,t)}),xi=Ee(function(t){return t.push(N,ne),r(Oi,N,t)}),ji=mr(function(t,n,r){t[n]=r},cu(au)),mi=mr(function(t,n,r){wu.call(t,n)?t[n].push(r):t[n]=[r]},Mr),wi=Ee(jn),Ai=hr(function(t,n,r){Rn(t,n,r)}),Oi=hr(function(t,n,r,e){Rn(t,n,r,e)}),ki=Ee(function(t,n){return null==t?{}:(n=a(ln(n,1),ee),Ln(t,on(vn(t,nu,ko),n)))}),Ei=Ee(function(t,n){return null==t?{}:Ln(t,a(ln(n,1),ee))}),Ii=dr(function(t,n,r){return n=n.toLowerCase(),t+(r?ou(n):n)}),Si=dr(function(t,n,r){return t+(r?"-":"")+n.toLowerCase();
+}),Ri=dr(function(t,n,r){return t+(r?" ":"")+n.toLowerCase()}),Wi=gr("toLowerCase"),Bi=dr(function(t,n,r){return t+(r?"_":"")+n.toLowerCase()}),Li=dr(function(t,n,r){return t+(r?" ":"")+Mi(n)}),Ci=dr(function(t,n,r){return t+(r?" ":"")+n.toUpperCase()}),Mi=gr("toUpperCase"),Ui=Ee(function(t,n){try{return r(t,N,n)}catch(e){return Le(e)?e:new vu(e)}}),zi=Ee(function(t,n){return u(ln(n,1),function(n){n=ee(n),t[n]=ti(t[n],t)}),t}),Di=xr(),$i=xr(true),Fi=Ee(function(t,n){return function(r){return jn(r,t,n);
+}}),Ni=Ee(function(t,n){return function(r){return jn(t,r,n)}}),Pi=Ar(a),Zi=Ar(o),Ti=Ar(p),qi=Er(),Vi=Er(true),Ki=wr(function(t,n){return t+n}),Gi=Rr("ceil"),Ji=wr(function(t,n){return t/n}),Yi=Rr("floor"),Hi=wr(function(t,n){return t*n}),Qi=Rr("round"),Xi=wr(function(t,n){return t-n});return jt.after=function(t,n){if(typeof n!="function")throw new yu("Expected a function");return t=Ke(t),function(){return 1>--t?n.apply(this,arguments):void 0}},jt.ary=je,jt.assign=_i,jt.assignIn=vi,jt.assignInWith=gi,
+jt.assignWith=di,jt.at=yi,jt.before=me,jt.bind=ti,jt.bindAll=zi,jt.bindKey=ni,jt.castArray=Ie,jt.chain=_e,jt.chunk=function(t,n,r){if(n=(r?Jr(t,n,r):n===N)?1:Ku(Ke(n),0),r=t?t.length:0,!r||1>n)return[];for(var e=0,u=0,o=Array(Nu(r/n));r>e;)o[u++]=Pn(t,e,e+=n);return o},jt.compact=function(t){for(var n=-1,r=t?t.length:0,e=0,u=[];++n<r;){var o=t[n];o&&(u[e++]=o)}return u},jt.concat=function(){var t=arguments.length,n=Ie(arguments[0]);if(2>t)return t?cr(n):[];for(var r=Array(t-1);t--;)r[t-1]=arguments[t];
+for(var t=ln(r,1),r=-1,e=n.length,u=-1,o=t.length,i=Array(e+o);++r<e;)i[r]=n[r];for(;++u<o;)i[r++]=t[u];return i},jt.cond=function(t){var n=t?t.length:0,e=Mr();return t=n?a(t,function(t){if("function"!=typeof t[1])throw new yu("Expected a function");return[e(t[0]),t[1]]}):[],Ee(function(e){for(var u=-1;++u<n;){var o=t[u];if(r(o[0],this,e))return r(o[1],this,e)}})},jt.conforms=function(t){return rn(nn(t,true))},jt.constant=cu,jt.countBy=Ko,jt.create=function(t,n){var r=en(t);return n?Qt(r,n):r},jt.curry=we,
+jt.curryRight=Ae,jt.debounce=Oe,jt.defaults=bi,jt.defaultsDeep=xi,jt.defer=ri,jt.delay=ei,jt.difference=So,jt.differenceBy=Ro,jt.differenceWith=Wo,jt.drop=ie,jt.dropRight=fe,jt.dropRightWhile=function(t,n){return t&&t.length?Yn(t,Mr(n,3),true,true):[]},jt.dropWhile=function(t,n){return t&&t.length?Yn(t,Mr(n,3),true):[]},jt.fill=function(t,n,r,e){var u=t?t.length:0;if(!u)return[];for(r&&typeof r!="number"&&Jr(t,n,r)&&(r=0,e=u),u=t.length,r=Ke(r),0>r&&(r=-r>u?0:u+r),e=e===N||e>u?u:Ke(e),0>e&&(e+=u),e=r>e?0:Ge(e);e>r;)t[r++]=n;
+return t},jt.filter=function(t,n){return(li(t)?i:an)(t,Mr(n,3))},jt.flatMap=function(t,n){return ln(be(t,n),1)},jt.flatMapDeep=function(t,n){return ln(be(t,n),P)},jt.flatMapDepth=function(t,n,r){return r=r===N?1:Ke(r),ln(be(t,n),r)},jt.flatten=function(t){return t&&t.length?ln(t,1):[]},jt.flattenDeep=function(t){return t&&t.length?ln(t,P):[]},jt.flattenDepth=function(t,n){return t&&t.length?(n=n===N?1:Ke(n),ln(t,n)):[]},jt.flip=function(t){return Wr(t,512)},jt.flow=Di,jt.flowRight=$i,jt.fromPairs=function(t){
+for(var n=-1,r=t?t.length:0,e={};++n<r;){var u=t[n];e[u[0]]=u[1]}return e},jt.functions=function(t){return null==t?[]:pn(t,tu(t))},jt.functionsIn=function(t){return null==t?[]:pn(t,nu(t))},jt.groupBy=Go,jt.initial=function(t){return fe(t,1)},jt.intersection=Bo,jt.intersectionBy=Lo,jt.intersectionWith=Co,jt.invert=ji,jt.invertBy=mi,jt.invokeMap=Jo,jt.iteratee=lu,jt.keyBy=Yo,jt.keys=tu,jt.keysIn=nu,jt.map=be,jt.mapKeys=function(t,n){var r={};return n=Mr(n,3),sn(t,function(t,e,u){r[n(t,e,u)]=t}),r},
+jt.mapValues=function(t,n){var r={};return n=Mr(n,3),sn(t,function(t,e,u){r[e]=n(t,e,u)}),r},jt.matches=function(t){return In(nn(t,true))},jt.matchesProperty=function(t,n){return Sn(t,nn(n,true))},jt.memoize=ke,jt.merge=Ai,jt.mergeWith=Oi,jt.method=Fi,jt.methodOf=Ni,jt.mixin=su,jt.negate=function(t){if(typeof t!="function")throw new yu("Expected a function");return function(){return!t.apply(this,arguments)}},jt.nthArg=function(t){return t=Ke(t),Ee(function(n){return Wn(n,t)})},jt.omit=ki,jt.omitBy=function(t,n){
+return n=Mr(n),Cn(t,function(t,r){return!n(t,r)})},jt.once=function(t){return me(2,t)},jt.orderBy=function(t,n,r,e){return null==t?[]:(li(n)||(n=null==n?[]:[n]),r=e?N:r,li(r)||(r=null==r?[]:[r]),Bn(t,n,r))},jt.over=Pi,jt.overArgs=ui,jt.overEvery=Zi,jt.overSome=Ti,jt.partial=oi,jt.partialRight=ii,jt.partition=Ho,jt.pick=Ei,jt.pickBy=function(t,n){return null==t?{}:Cn(t,Mr(n))},jt.property=pu,jt.propertyOf=function(t){return function(n){return null==t?N:_n(t,n)}},jt.pull=Mo,jt.pullAll=le,jt.pullAllBy=function(t,n,r){
+return t&&t.length&&n&&n.length?zn(t,n,Mr(r)):t},jt.pullAllWith=function(t,n,r){return t&&t.length&&n&&n.length?zn(t,n,N,r):t},jt.pullAt=Uo,jt.range=qi,jt.rangeRight=Vi,jt.rearg=fi,jt.reject=function(t,n){var r=li(t)?i:an;return n=Mr(n,3),r(t,function(t,r,e){return!n(t,r,e)})},jt.remove=function(t,n){var r=[];if(!t||!t.length)return r;var e=-1,u=[],o=t.length;for(n=Mr(n,3);++e<o;){var i=t[e];n(i,e,t)&&(r.push(i),u.push(e))}return Dn(t,u),r},jt.rest=Ee,jt.reverse=se,jt.sampleSize=xe,jt.set=function(t,n,r){
+return null==t?t:Nn(t,n,r)},jt.setWith=function(t,n,r,e){return e=typeof e=="function"?e:N,null==t?t:Nn(t,n,r,e)},jt.shuffle=function(t){return xe(t,4294967295)},jt.slice=function(t,n,r){var e=t?t.length:0;return e?(r&&typeof r!="number"&&Jr(t,n,r)?(n=0,r=e):(n=null==n?0:Ke(n),r=r===N?e:Ke(r)),Pn(t,n,r)):[]},jt.sortBy=Qo,jt.sortedUniq=function(t){return t&&t.length?Vn(t):[]},jt.sortedUniqBy=function(t,n){return t&&t.length?Vn(t,Mr(n)):[]},jt.split=function(t,n,r){return r&&typeof r!="number"&&Jr(t,n,r)&&(n=r=N),
+r=r===N?4294967295:r>>>0,r?(t=He(t))&&(typeof n=="string"||null!=n&&!Pe(n))&&(n=Gn(n),""==n&&It.test(t))?rr(t.match(kt),0,r):Xu.call(t,n,r):[]},jt.spread=function(t,n){if(typeof t!="function")throw new yu("Expected a function");return n=n===N?0:Ku(Ke(n),0),Ee(function(e){var u=e[n];return e=rr(e,0,n),u&&l(e,u),r(t,this,e)})},jt.tail=function(t){return ie(t,1)},jt.take=function(t,n,r){return t&&t.length?(n=r||n===N?1:Ke(n),Pn(t,0,0>n?0:n)):[]},jt.takeRight=function(t,n,r){var e=t?t.length:0;return e?(n=r||n===N?1:Ke(n),
+n=e-n,Pn(t,0>n?0:n,e)):[]},jt.takeRightWhile=function(t,n){return t&&t.length?Yn(t,Mr(n,3),false,true):[]},jt.takeWhile=function(t,n){return t&&t.length?Yn(t,Mr(n,3)):[]},jt.tap=function(t,n){return n(t),t},jt.throttle=function(t,n,r){var e=true,u=true;if(typeof t!="function")throw new yu("Expected a function");return ze(r)&&(e="leading"in r?!!r.leading:e,u="trailing"in r?!!r.trailing:u),Oe(t,n,{leading:e,maxWait:n,trailing:u})},jt.thru=ve,jt.toArray=Ve,jt.toPairs=ru,jt.toPairsIn=eu,jt.toPath=function(t){
+return li(t)?a(t,ee):Te(t)?[t]:cr(Io(t))},jt.toPlainObject=Ye,jt.transform=function(t,n,r){var e=li(t)||qe(t);if(n=Mr(n,4),null==r)if(e||ze(t)){var o=t.constructor;r=e?li(t)?new o:[]:Ce(o)?en(Zu(Object(t))):{}}else r={};return(e?u:sn)(t,function(t,e,u){return n(r,t,e,u)}),r},jt.unary=function(t){return je(t,1)},jt.union=zo,jt.unionBy=Do,jt.unionWith=$o,jt.uniq=function(t){return t&&t.length?Jn(t):[]},jt.uniqBy=function(t,n){return t&&t.length?Jn(t,Mr(n)):[]},jt.uniqWith=function(t,n){return t&&t.length?Jn(t,N,n):[];
+},jt.unset=function(t,n){var r;if(null==t)r=true;else{r=t;var e=n,e=Yr(e,r)?[e]:nr(e);r=re(r,e),e=ee(ae(e)),r=!(null!=r&&dn(r,e))||delete r[e]}return r},jt.unzip=he,jt.unzipWith=pe,jt.update=function(t,n,r){return null==t?t:Nn(t,n,(typeof r=="function"?r:au)(_n(t,n)),void 0)},jt.updateWith=function(t,n,r,e){return e=typeof e=="function"?e:N,null!=t&&(t=Nn(t,n,(typeof r=="function"?r:au)(_n(t,n)),e)),t},jt.values=uu,jt.valuesIn=function(t){return null==t?[]:O(t,nu(t))},jt.without=Fo,jt.words=fu,jt.wrap=function(t,n){
+return n=null==n?au:n,oi(n,t)},jt.xor=No,jt.xorBy=Po,jt.xorWith=Zo,jt.zip=To,jt.zipObject=function(t,n){return Xn(t||[],n||[],Yt)},jt.zipObjectDeep=function(t,n){return Xn(t||[],n||[],Nn)},jt.zipWith=qo,jt.entries=ru,jt.entriesIn=eu,jt.extend=vi,jt.extendWith=gi,su(jt,jt),jt.add=Ki,jt.attempt=Ui,jt.camelCase=Ii,jt.capitalize=ou,jt.ceil=Gi,jt.clamp=function(t,n,r){return r===N&&(r=n,n=N),r!==N&&(r=Je(r),r=r===r?r:0),n!==N&&(n=Je(n),n=n===n?n:0),tn(Je(t),n,r)},jt.clone=function(t){return nn(t,false,true);
+},jt.cloneDeep=function(t){return nn(t,true,true)},jt.cloneDeepWith=function(t,n){return nn(t,true,true,n)},jt.cloneWith=function(t,n){return nn(t,false,true,n)},jt.deburr=iu,jt.divide=Ji,jt.endsWith=function(t,n,r){t=He(t),n=Gn(n);var e=t.length;return r=r===N?e:tn(Ke(r),0,e),r-=n.length,r>=0&&t.indexOf(n,r)==r},jt.eq=Se,jt.escape=function(t){return(t=He(t))&&Y.test(t)?t.replace(G,R):t},jt.escapeRegExp=function(t){return(t=He(t))&&ut.test(t)?t.replace(et,"\\$&"):t},jt.every=function(t,n,r){var e=li(t)?o:fn;return r&&Jr(t,n,r)&&(n=N),
+e(t,Mr(n,3))},jt.find=function(t,n){if(n=Mr(n,3),li(t)){var r=v(t,n);return r>-1?t[r]:N}return _(t,n,yo)},jt.findIndex=function(t,n){return t&&t.length?v(t,Mr(n,3)):-1},jt.findKey=function(t,n){return _(t,Mr(n,3),sn,true)},jt.findLast=function(t,n){if(n=Mr(n,3),li(t)){var r=v(t,n,true);return r>-1?t[r]:N}return _(t,n,bo)},jt.findLastIndex=function(t,n){return t&&t.length?v(t,Mr(n,3),true):-1},jt.findLastKey=function(t,n){return _(t,Mr(n,3),hn,true)},jt.floor=Yi,jt.forEach=de,jt.forEachRight=ye,jt.forIn=function(t,n){
+return null==t?t:xo(t,Mr(n),nu)},jt.forInRight=function(t,n){return null==t?t:jo(t,Mr(n),nu)},jt.forOwn=function(t,n){return t&&sn(t,Mr(n))},jt.forOwnRight=function(t,n){return t&&hn(t,Mr(n))},jt.get=Qe,jt.gt=ci,jt.gte=ai,jt.has=function(t,n){return null!=t&&Nr(t,n,dn)},jt.hasIn=Xe,jt.head=ce,jt.identity=au,jt.includes=function(t,n,r,e){return t=We(t)?t:uu(t),r=r&&!e?Ke(r):0,e=t.length,0>r&&(r=Ku(e+r,0)),Ze(t)?e>=r&&-1<t.indexOf(n,r):!!e&&-1<g(t,n,r)},jt.indexOf=function(t,n,r){var e=t?t.length:0;
+return e?(r=Ke(r),0>r&&(r=Ku(e+r,0)),g(t,n,r)):-1},jt.inRange=function(t,n,r){return n=Je(n)||0,r===N?(r=n,n=0):r=Je(r)||0,t=Je(t),t>=Gu(n,r)&&t<Ku(n,r)},jt.invoke=wi,jt.isArguments=Re,jt.isArray=li,jt.isArrayBuffer=function(t){return De(t)&&"[object ArrayBuffer]"==ku.call(t)},jt.isArrayLike=We,jt.isArrayLikeObject=Be,jt.isBoolean=function(t){return true===t||false===t||De(t)&&"[object Boolean]"==ku.call(t)},jt.isBuffer=si,jt.isDate=function(t){return De(t)&&"[object Date]"==ku.call(t)},jt.isElement=function(t){
+return!!t&&1===t.nodeType&&De(t)&&!Ne(t)},jt.isEmpty=function(t){if(We(t)&&(li(t)||Ze(t)||Ce(t.splice)||Re(t)||si(t)))return!t.length;if(De(t)){var n=Fr(t);if("[object Map]"==n||"[object Set]"==n)return!t.size}for(var r in t)if(wu.call(t,r))return false;return!(fo&&tu(t).length)},jt.isEqual=function(t,n){return mn(t,n)},jt.isEqualWith=function(t,n,r){var e=(r=typeof r=="function"?r:N)?r(t,n):N;return e===N?mn(t,n,r):!!e},jt.isError=Le,jt.isFinite=function(t){return typeof t=="number"&&Tu(t)},jt.isFunction=Ce,
+jt.isInteger=Me,jt.isLength=Ue,jt.isMap=function(t){return De(t)&&"[object Map]"==Fr(t)},jt.isMatch=function(t,n){return t===n||wn(t,n,Ur(n))},jt.isMatchWith=function(t,n,r){return r=typeof r=="function"?r:N,wn(t,n,Ur(n),r)},jt.isNaN=function(t){return Fe(t)&&t!=+t},jt.isNative=$e,jt.isNil=function(t){return null==t},jt.isNull=function(t){return null===t},jt.isNumber=Fe,jt.isObject=ze,jt.isObjectLike=De,jt.isPlainObject=Ne,jt.isRegExp=Pe,jt.isSafeInteger=function(t){return Me(t)&&t>=-9007199254740991&&9007199254740991>=t;
+},jt.isSet=function(t){return De(t)&&"[object Set]"==Fr(t)},jt.isString=Ze,jt.isSymbol=Te,jt.isTypedArray=qe,jt.isUndefined=function(t){return t===N},jt.isWeakMap=function(t){return De(t)&&"[object WeakMap]"==Fr(t)},jt.isWeakSet=function(t){return De(t)&&"[object WeakSet]"==ku.call(t)},jt.join=function(t,n){return t?qu.call(t,n):""},jt.kebabCase=Si,jt.last=ae,jt.lastIndexOf=function(t,n,r){var e=t?t.length:0;if(!e)return-1;var u=e;if(r!==N&&(u=Ke(r),u=(0>u?Ku(e+u,0):Gu(u,e-1))+1),n!==n)return B(t,u,true);
+for(;u--;)if(t[u]===n)return u;return-1},jt.lowerCase=Ri,jt.lowerFirst=Wi,jt.lt=hi,jt.lte=pi,jt.max=function(t){return t&&t.length?cn(t,au,gn):N},jt.maxBy=function(t,n){return t&&t.length?cn(t,Mr(n),gn):N},jt.mean=function(t){return y(t,au)},jt.meanBy=function(t,n){return y(t,Mr(n))},jt.min=function(t){return t&&t.length?cn(t,au,kn):N},jt.minBy=function(t,n){return t&&t.length?cn(t,Mr(n),kn):N},jt.multiply=Hi,jt.nth=function(t,n){return t&&t.length?Wn(t,Ke(n)):N},jt.noConflict=function(){return Vt._===this&&(Vt._=Eu),
+this},jt.noop=hu,jt.now=Xo,jt.pad=function(t,n,r){t=He(t);var e=(n=Ke(n))?D(t):0;return!n||e>=n?t:(n=(n-e)/2,Or(Pu(n),r)+t+Or(Nu(n),r))},jt.padEnd=function(t,n,r){t=He(t);var e=(n=Ke(n))?D(t):0;return n&&n>e?t+Or(n-e,r):t},jt.padStart=function(t,n,r){t=He(t);var e=(n=Ke(n))?D(t):0;return n&&n>e?Or(n-e,r)+t:t},jt.parseInt=function(t,n,r){return r||null==n?n=0:n&&(n=+n),t=He(t).replace(ot,""),Ju(t,n||(ht.test(t)?16:10))},jt.random=function(t,n,r){if(r&&typeof r!="boolean"&&Jr(t,n,r)&&(n=r=N),r===N&&(typeof n=="boolean"?(r=n,
+n=N):typeof t=="boolean"&&(r=t,t=N)),t===N&&n===N?(t=0,n=1):(t=Je(t)||0,n===N?(n=t,t=0):n=Je(n)||0),t>n){var e=t;t=n,n=e}return r||t%1||n%1?(r=Yu(),Gu(t+r*(n-t+Dt("1e-"+((r+"").length-1))),n)):$n(t,n)},jt.reduce=function(t,n,r){var e=li(t)?s:b,u=3>arguments.length;return e(t,Mr(n,4),r,u,yo)},jt.reduceRight=function(t,n,r){var e=li(t)?h:b,u=3>arguments.length;return e(t,Mr(n,4),r,u,bo)},jt.repeat=function(t,n,r){return n=(r?Jr(t,n,r):n===N)?1:Ke(n),Fn(He(t),n)},jt.replace=function(){var t=arguments,n=He(t[0]);
+return 3>t.length?n:Hu.call(n,t[1],t[2])},jt.result=function(t,n,r){n=Yr(n,t)?[n]:nr(n);var e=-1,u=n.length;for(u||(t=N,u=1);++e<u;){var o=null==t?N:t[ee(n[e])];o===N&&(e=u,o=r),t=Ce(o)?o.call(t):o}return t},jt.round=Qi,jt.runInContext=F,jt.sample=function(t){t=We(t)?t:uu(t);var n=t.length;return n>0?t[$n(0,n-1)]:N},jt.size=function(t){if(null==t)return 0;if(We(t)){var n=t.length;return n&&Ze(t)?D(t):n}return De(t)&&(n=Fr(t),"[object Map]"==n||"[object Set]"==n)?t.size:tu(t).length},jt.snakeCase=Bi,
+jt.some=function(t,n,r){var e=li(t)?p:Zn;return r&&Jr(t,n,r)&&(n=N),e(t,Mr(n,3))},jt.sortedIndex=function(t,n){return Tn(t,n)},jt.sortedIndexBy=function(t,n,r){return qn(t,n,Mr(r))},jt.sortedIndexOf=function(t,n){var r=t?t.length:0;if(r){var e=Tn(t,n);if(r>e&&Se(t[e],n))return e}return-1},jt.sortedLastIndex=function(t,n){return Tn(t,n,true)},jt.sortedLastIndexBy=function(t,n,r){return qn(t,n,Mr(r),true)},jt.sortedLastIndexOf=function(t,n){if(t&&t.length){var r=Tn(t,n,true)-1;if(Se(t[r],n))return r}return-1;
+},jt.startCase=Li,jt.startsWith=function(t,n,r){return t=He(t),r=tn(Ke(r),0,t.length),t.lastIndexOf(Gn(n),r)==r},jt.subtract=Xi,jt.sum=function(t){return t&&t.length?j(t,au):0},jt.sumBy=function(t,n){return t&&t.length?j(t,Mr(n)):0},jt.template=function(t,n,r){var e=jt.templateSettings;r&&Jr(t,n,r)&&(n=N),t=He(t),n=gi({},n,e,Gt),r=gi({},n.imports,e.imports,Gt);var u,o,i=tu(r),f=O(r,i),c=0;r=n.interpolate||bt;var a="__p+='";r=du((n.escape||bt).source+"|"+r.source+"|"+(r===X?lt:bt).source+"|"+(n.evaluate||bt).source+"|$","g");
+var l="sourceURL"in n?"//# sourceURL="+n.sourceURL+"\n":"";if(t.replace(r,function(n,r,e,i,f,l){return e||(e=i),a+=t.slice(c,l).replace(xt,W),r&&(u=true,a+="'+__e("+r+")+'"),f&&(o=true,a+="';"+f+";\n__p+='"),e&&(a+="'+((__t=("+e+"))==null?'':__t)+'"),c=l+n.length,n}),a+="';",(n=n.variable)||(a="with(obj){"+a+"}"),a=(o?a.replace(T,""):a).replace(q,"$1").replace(V,"$1;"),a="function("+(n||"obj")+"){"+(n?"":"obj||(obj={});")+"var __t,__p=''"+(u?",__e=_.escape":"")+(o?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":";")+a+"return __p}",
+n=Ui(function(){return Function(i,l+"return "+a).apply(N,f)}),n.source=a,Le(n))throw n;return n},jt.times=function(t,n){if(t=Ke(t),1>t||t>9007199254740991)return[];var r=4294967295,e=Gu(t,4294967295);for(n=Mr(n),t-=4294967295,e=m(e,n);++r<t;)n(r);return e},jt.toInteger=Ke,jt.toLength=Ge,jt.toLower=function(t){return He(t).toLowerCase()},jt.toNumber=Je,jt.toSafeInteger=function(t){return tn(Ke(t),-9007199254740991,9007199254740991)},jt.toString=He,jt.toUpper=function(t){return He(t).toUpperCase()},
+jt.trim=function(t,n,r){return(t=He(t))&&(r||n===N)?t.replace(ot,""):t&&(n=Gn(n))?(t=t.match(kt),n=n.match(kt),rr(t,k(t,n),E(t,n)+1).join("")):t},jt.trimEnd=function(t,n,r){return(t=He(t))&&(r||n===N)?t.replace(ft,""):t&&(n=Gn(n))?(t=t.match(kt),n=E(t,n.match(kt))+1,rr(t,0,n).join("")):t},jt.trimStart=function(t,n,r){return(t=He(t))&&(r||n===N)?t.replace(it,""):t&&(n=Gn(n))?(t=t.match(kt),n=k(t,n.match(kt)),rr(t,n).join("")):t},jt.truncate=function(t,n){var r=30,e="...";if(ze(n))var u="separator"in n?n.separator:u,r="length"in n?Ke(n.length):r,e="omission"in n?Gn(n.omission):e;
+t=He(t);var o=t.length;if(It.test(t))var i=t.match(kt),o=i.length;if(r>=o)return t;if(o=r-D(e),1>o)return e;if(r=i?rr(i,0,o).join(""):t.slice(0,o),u===N)return r+e;if(i&&(o+=r.length-o),Pe(u)){if(t.slice(o).search(u)){var f=r;for(u.global||(u=du(u.source,He(st.exec(u))+"g")),u.lastIndex=0;i=u.exec(f);)var c=i.index;r=r.slice(0,c===N?o:c)}}else t.indexOf(Gn(u),o)!=o&&(u=r.lastIndexOf(u),u>-1&&(r=r.slice(0,u)));return r+e},jt.unescape=function(t){return(t=He(t))&&J.test(t)?t.replace(K,$):t},jt.uniqueId=function(t){
+var n=++Au;return He(t)+n},jt.upperCase=Ci,jt.upperFirst=Mi,jt.each=de,jt.eachRight=ye,jt.first=ce,su(jt,function(){var t={};return sn(jt,function(n,r){wu.call(jt.prototype,r)||(t[r]=n)}),t}(),{chain:false}),jt.VERSION="4.11.2",u("bind bindKey curry curryRight partial partialRight".split(" "),function(t){jt[t].placeholder=jt}),u(["drop","take"],function(t,n){Lt.prototype[t]=function(r){var e=this.__filtered__;if(e&&!n)return new Lt(this);r=r===N?1:Ku(Ke(r),0);var u=this.clone();return e?u.__takeCount__=Gu(r,u.__takeCount__):u.__views__.push({
+size:Gu(r,4294967295),type:t+(0>u.__dir__?"Right":"")}),u},Lt.prototype[t+"Right"]=function(n){return this.reverse()[t](n).reverse()}}),u(["filter","map","takeWhile"],function(t,n){var r=n+1,e=1==r||3==r;Lt.prototype[t]=function(t){var n=this.clone();return n.__iteratees__.push({iteratee:Mr(t,3),type:r}),n.__filtered__=n.__filtered__||e,n}}),u(["head","last"],function(t,n){var r="take"+(n?"Right":"");Lt.prototype[t]=function(){return this[r](1).value()[0]}}),u(["initial","tail"],function(t,n){var r="drop"+(n?"":"Right");
+Lt.prototype[t]=function(){return this.__filtered__?new Lt(this):this[r](1)}}),Lt.prototype.compact=function(){return this.filter(au)},Lt.prototype.find=function(t){return this.filter(t).head()},Lt.prototype.findLast=function(t){return this.reverse().find(t)},Lt.prototype.invokeMap=Ee(function(t,n){return typeof t=="function"?new Lt(this):this.map(function(r){return jn(r,t,n)})}),Lt.prototype.reject=function(t){return t=Mr(t,3),this.filter(function(n){return!t(n)})},Lt.prototype.slice=function(t,n){
+t=Ke(t);var r=this;return r.__filtered__&&(t>0||0>n)?new Lt(r):(0>t?r=r.takeRight(-t):t&&(r=r.drop(t)),n!==N&&(n=Ke(n),r=0>n?r.dropRight(-n):r.take(n-t)),r)},Lt.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},Lt.prototype.toArray=function(){return this.take(4294967295)},sn(Lt.prototype,function(t,n){var r=/^(?:filter|find|map|reject)|While$/.test(n),e=/^(?:head|last)$/.test(n),u=jt[e?"take"+("last"==n?"Right":""):n],o=e||/^find/.test(n);u&&(jt.prototype[n]=function(){
+function n(t){return t=u.apply(jt,l([t],f)),e&&h?t[0]:t}var i=this.__wrapped__,f=e?[1]:arguments,c=i instanceof Lt,a=f[0],s=c||li(i);s&&r&&typeof a=="function"&&1!=a.length&&(c=s=false);var h=this.__chain__,p=!!this.__actions__.length,a=o&&!h,c=c&&!p;return!o&&s?(i=c?i:new Lt(this),i=t.apply(i,f),i.__actions__.push({func:ve,args:[n],thisArg:N}),new wt(i,h)):a&&c?t.apply(this,f):(i=this.thru(n),a?e?i.value()[0]:i.value():i)})}),u("pop push shift sort splice unshift".split(" "),function(t){var n=bu[t],r=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",e=/^(?:pop|shift)$/.test(t);
+jt.prototype[t]=function(){var t=arguments;if(e&&!this.__chain__){var u=this.value();return n.apply(li(u)?u:[],t)}return this[r](function(r){return n.apply(li(r)?r:[],t)})}}),sn(Lt.prototype,function(t,n){var r=jt[n];if(r){var e=r.name+"";(co[e]||(co[e]=[])).push({name:n,func:r})}}),co[jr(N,2).name]=[{name:"wrapper",func:N}],Lt.prototype.clone=function(){var t=new Lt(this.__wrapped__);return t.__actions__=cr(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=cr(this.__iteratees__),
+t.__takeCount__=this.__takeCount__,t.__views__=cr(this.__views__),t},Lt.prototype.reverse=function(){if(this.__filtered__){var t=new Lt(this);t.__dir__=-1,t.__filtered__=true}else t=this.clone(),t.__dir__*=-1;return t},Lt.prototype.value=function(){var t,n=this.__wrapped__.value(),r=this.__dir__,e=li(n),u=0>r,o=e?n.length:0;t=o;for(var i=this.__views__,f=0,c=-1,a=i.length;++c<a;){var l=i[c],s=l.size;switch(l.type){case"drop":f+=s;break;case"dropRight":t-=s;break;case"take":t=Gu(t,f+s);break;case"takeRight":
+f=Ku(f,t-s)}}if(t={start:f,end:t},i=t.start,f=t.end,t=f-i,u=u?f:i-1,i=this.__iteratees__,f=i.length,c=0,a=Gu(t,this.__takeCount__),!e||200>o||o==t&&a==t)return Hn(n,this.__actions__);e=[];t:for(;t--&&a>c;){for(u+=r,o=-1,l=n[u];++o<f;){var h=i[o],s=h.type,h=(0,h.iteratee)(l);if(2==s)l=h;else if(!h){if(1==s)continue t;break t}}e[c++]=l}return e},jt.prototype.at=Vo,jt.prototype.chain=function(){return _e(this)},jt.prototype.commit=function(){return new wt(this.value(),this.__chain__)},jt.prototype.next=function(){
+this.__values__===N&&(this.__values__=Ve(this.value()));var t=this.__index__>=this.__values__.length,n=t?N:this.__values__[this.__index__++];return{done:t,value:n}},jt.prototype.plant=function(t){for(var n,r=this;r instanceof mt;){var e=oe(r);e.__index__=0,e.__values__=N,n?u.__wrapped__=e:n=e;var u=e,r=r.__wrapped__}return u.__wrapped__=t,n},jt.prototype.reverse=function(){var t=this.__wrapped__;return t instanceof Lt?(this.__actions__.length&&(t=new Lt(this)),t=t.reverse(),t.__actions__.push({func:ve,
+args:[se],thisArg:N}),new wt(t,this.__chain__)):this.thru(se)},jt.prototype.toJSON=jt.prototype.valueOf=jt.prototype.value=function(){return Hn(this.__wrapped__,this.__actions__)},Uu&&(jt.prototype[Uu]=ge),jt}var N,P=1/0,Z=NaN,T=/\b__p\+='';/g,q=/\b(__p\+=)''\+/g,V=/(__e\(.*?\)|\b__t\))\+'';/g,K=/&(?:amp|lt|gt|quot|#39|#96);/g,G=/[&<>"'`]/g,J=RegExp(K.source),Y=RegExp(G.source),H=/<%-([\s\S]+?)%>/g,Q=/<%([\s\S]+?)%>/g,X=/<%=([\s\S]+?)%>/g,tt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,nt=/^\w*$/,rt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]/g,et=/[\\^$.*+?()[\]{}|]/g,ut=RegExp(et.source),ot=/^\s+|\s+$/g,it=/^\s+/,ft=/\s+$/,ct=/[a-zA-Z0-9]+/g,at=/\\(\\)?/g,lt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,st=/\w*$/,ht=/^0x/i,pt=/^[-+]0x[0-9a-f]+$/i,_t=/^0b[01]+$/i,vt=/^\[object .+?Constructor\]$/,gt=/^0o[0-7]+$/i,dt=/^(?:0|[1-9]\d*)$/,yt=/[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g,bt=/($^)/,xt=/['\n\r\u2028\u2029\\]/g,jt="[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]|\\ud83c[\\udffb-\\udfff])?(?:\\u200d(?:[^\\ud800-\\udfff]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]|\\ud83c[\\udffb-\\udfff])?)*",mt="(?:[\\u2700-\\u27bf]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])"+jt,wt="(?:[^\\ud800-\\udfff][\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]?|[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff]|[\\ud800-\\udfff])",At=RegExp("['\u2019]","g"),Ot=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]","g"),kt=RegExp("\\ud83c[\\udffb-\\udfff](?=\\ud83c[\\udffb-\\udfff])|"+wt+jt,"g"),Et=RegExp(["[A-Z\\xc0-\\xd6\\xd8-\\xde]?[a-z\\xdf-\\xf6\\xf8-\\xff]+(?:['\u2019](?:d|ll|m|re|s|t|ve))?(?=[\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000]|[A-Z\\xc0-\\xd6\\xd8-\\xde]|$)|(?:[A-Z\\xc0-\\xd6\\xd8-\\xde]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])+(?:['\u2019](?:D|LL|M|RE|S|T|VE))?(?=[\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000]|[A-Z\\xc0-\\xd6\\xd8-\\xde](?:[a-z\\xdf-\\xf6\\xf8-\\xff]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])|$)|[A-Z\\xc0-\\xd6\\xd8-\\xde]?(?:[a-z\\xdf-\\xf6\\xf8-\\xff]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])+(?:['\u2019](?:d|ll|m|re|s|t|ve))?|[A-Z\\xc0-\\xd6\\xd8-\\xde]+(?:['\u2019](?:D|LL|M|RE|S|T|VE))?|\\d+",mt].join("|"),"g"),It=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0\\ufe0e\\ufe0f]"),St=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Rt="Array Buffer DataView Date Error Float32Array Float64Array Function Int8Array Int16Array Int32Array Map Math Object Promise Reflect RegExp Set String Symbol TypeError Uint8Array Uint8ClampedArray Uint16Array Uint32Array WeakMap _ clearTimeout isFinite parseInt setTimeout".split(" "),Wt={};
+Wt["[object Float32Array]"]=Wt["[object Float64Array]"]=Wt["[object Int8Array]"]=Wt["[object Int16Array]"]=Wt["[object Int32Array]"]=Wt["[object Uint8Array]"]=Wt["[object Uint8ClampedArray]"]=Wt["[object Uint16Array]"]=Wt["[object Uint32Array]"]=true,Wt["[object Arguments]"]=Wt["[object Array]"]=Wt["[object ArrayBuffer]"]=Wt["[object Boolean]"]=Wt["[object DataView]"]=Wt["[object Date]"]=Wt["[object Error]"]=Wt["[object Function]"]=Wt["[object Map]"]=Wt["[object Number]"]=Wt["[object Object]"]=Wt["[object RegExp]"]=Wt["[object Set]"]=Wt["[object String]"]=Wt["[object WeakMap]"]=false;
+var Bt={};Bt["[object Arguments]"]=Bt["[object Array]"]=Bt["[object ArrayBuffer]"]=Bt["[object DataView]"]=Bt["[object Boolean]"]=Bt["[object Date]"]=Bt["[object Float32Array]"]=Bt["[object Float64Array]"]=Bt["[object Int8Array]"]=Bt["[object Int16Array]"]=Bt["[object Int32Array]"]=Bt["[object Map]"]=Bt["[object Number]"]=Bt["[object Object]"]=Bt["[object RegExp]"]=Bt["[object Set]"]=Bt["[object String]"]=Bt["[object Symbol]"]=Bt["[object Uint8Array]"]=Bt["[object Uint8ClampedArray]"]=Bt["[object Uint16Array]"]=Bt["[object Uint32Array]"]=true,
+Bt["[object Error]"]=Bt["[object Function]"]=Bt["[object WeakMap]"]=false;var Lt={"\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a","\xc7":"C","\xe7":"c","\xd0":"D","\xf0":"d","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xcc":"I","\xcd":"I","\xce":"I","\xcf":"I","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xd1":"N","\xf1":"n","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O",
+"\xd8":"O","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xdd":"Y","\xfd":"y","\xff":"y","\xc6":"Ae","\xe6":"ae","\xde":"Th","\xfe":"th","\xdf":"ss"},Ct={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},Mt={"&":"&","<":"<",">":">",""":'"',"'":"'","`":"`"},Ut={"function":true,object:true},zt={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"
+},Dt=parseFloat,$t=parseInt,Ft=Ut[typeof exports]&&exports&&!exports.nodeType?exports:N,Nt=Ut[typeof module]&&module&&!module.nodeType?module:N,Pt=Nt&&Nt.exports===Ft?Ft:N,Zt=I(Ut[typeof self]&&self),Tt=I(Ut[typeof window]&&window),qt=I(Ut[typeof this]&&this),Vt=I(Ft&&Nt&&typeof global=="object"&&global)||Tt!==(qt&&qt.window)&&Tt||Zt||qt||Function("return this")(),Kt=F();(Tt||Zt||{})._=Kt,typeof define=="function"&&typeof define.amd=="object"&&define.amd? define(function(){return Kt}):Ft&&Nt?(Pt&&((Nt.exports=Kt)._=Kt),
+Ft._=Kt):Vt._=Kt}).call(this);
\ No newline at end of file
diff --git a/views/ngXosViews/serviceGrid/src/vendor/lodash/dist/mapping.fp.js b/views/ngXosViews/serviceGrid/src/vendor/lodash/dist/mapping.fp.js
new file mode 100644
index 0000000..8adef99
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/lodash/dist/mapping.fp.js
@@ -0,0 +1,352 @@
+(function webpackUniversalModuleDefinition(root, factory) {
+ if(typeof exports === 'object' && typeof module === 'object')
+ module.exports = factory();
+ else if(typeof define === 'function' && define.amd)
+ define([], factory);
+ else if(typeof exports === 'object')
+ exports["mapping"] = factory();
+ else
+ root["mapping"] = factory();
+})(this, function() {
+return /******/ (function(modules) { // webpackBootstrap
+/******/ // The module cache
+/******/ var installedModules = {};
+
+/******/ // The require function
+/******/ function __webpack_require__(moduleId) {
+
+/******/ // Check if module is in cache
+/******/ if(installedModules[moduleId])
+/******/ return installedModules[moduleId].exports;
+
+/******/ // Create a new module (and put it into the cache)
+/******/ var module = installedModules[moduleId] = {
+/******/ exports: {},
+/******/ id: moduleId,
+/******/ loaded: false
+/******/ };
+
+/******/ // Execute the module function
+/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
+
+/******/ // Flag the module as loaded
+/******/ module.loaded = true;
+
+/******/ // Return the exports of the module
+/******/ return module.exports;
+/******/ }
+
+
+/******/ // expose the modules object (__webpack_modules__)
+/******/ __webpack_require__.m = modules;
+
+/******/ // expose the module cache
+/******/ __webpack_require__.c = installedModules;
+
+/******/ // __webpack_public_path__
+/******/ __webpack_require__.p = "";
+
+/******/ // Load entry module and return exports
+/******/ return __webpack_require__(0);
+/******/ })
+/************************************************************************/
+/******/ ([
+/* 0 */
+/***/ function(module, exports) {
+
+ /** Used to map aliases to their real names. */
+ exports.aliasToReal = {
+
+ // Lodash aliases.
+ 'each': 'forEach',
+ 'eachRight': 'forEachRight',
+ 'entries': 'toPairs',
+ 'entriesIn': 'toPairsIn',
+ 'extend': 'assignIn',
+ 'extendWith': 'assignInWith',
+ 'first': 'head',
+
+ // Ramda aliases.
+ '__': 'placeholder',
+ 'all': 'every',
+ 'allPass': 'overEvery',
+ 'always': 'constant',
+ 'any': 'some',
+ 'anyPass': 'overSome',
+ 'apply': 'spread',
+ 'assoc': 'set',
+ 'assocPath': 'set',
+ 'complement': 'negate',
+ 'compose': 'flowRight',
+ 'contains': 'includes',
+ 'dissoc': 'unset',
+ 'dissocPath': 'unset',
+ 'equals': 'isEqual',
+ 'identical': 'eq',
+ 'init': 'initial',
+ 'invertObj': 'invert',
+ 'juxt': 'over',
+ 'omitAll': 'omit',
+ 'nAry': 'ary',
+ 'path': 'get',
+ 'pathEq': 'matchesProperty',
+ 'pathOr': 'getOr',
+ 'paths': 'at',
+ 'pickAll': 'pick',
+ 'pipe': 'flow',
+ 'pluck': 'map',
+ 'prop': 'get',
+ 'propEq': 'matchesProperty',
+ 'propOr': 'getOr',
+ 'props': 'at',
+ 'unapply': 'rest',
+ 'unnest': 'flatten',
+ 'useWith': 'overArgs',
+ 'whereEq': 'filter',
+ 'zipObj': 'zipObject'
+ };
+
+ /** Used to map ary to method names. */
+ exports.aryMethod = {
+ '1': [
+ 'attempt', 'castArray', 'ceil', 'create', 'curry', 'curryRight', 'floor',
+ 'flow', 'flowRight', 'fromPairs', 'invert', 'iteratee', 'memoize', 'method',
+ 'methodOf', 'mixin', 'over', 'overEvery', 'overSome', 'rest', 'reverse',
+ 'round', 'runInContext', 'spread', 'template', 'trim', 'trimEnd', 'trimStart',
+ 'uniqueId', 'words'
+ ],
+ '2': [
+ 'add', 'after', 'ary', 'assign', 'assignIn', 'at', 'before', 'bind', 'bindAll',
+ 'bindKey', 'chunk', 'cloneDeepWith', 'cloneWith', 'concat', 'countBy', 'curryN',
+ 'curryRightN', 'debounce', 'defaults', 'defaultsDeep', 'delay', 'difference',
+ 'divide', 'drop', 'dropRight', 'dropRightWhile', 'dropWhile', 'endsWith',
+ 'eq', 'every', 'filter', 'find', 'find', 'findIndex', 'findKey', 'findLast',
+ 'findLastIndex', 'findLastKey', 'flatMap', 'flatMapDeep', 'flattenDepth',
+ 'forEach', 'forEachRight', 'forIn', 'forInRight', 'forOwn', 'forOwnRight',
+ 'get', 'groupBy', 'gt', 'gte', 'has', 'hasIn', 'includes', 'indexOf',
+ 'intersection', 'invertBy', 'invoke', 'invokeMap', 'isEqual', 'isMatch',
+ 'join', 'keyBy', 'lastIndexOf', 'lt', 'lte', 'map', 'mapKeys', 'mapValues',
+ 'matchesProperty', 'maxBy', 'meanBy', 'merge', 'minBy', 'multiply', 'nth',
+ 'omit', 'omitBy', 'overArgs', 'pad', 'padEnd', 'padStart', 'parseInt',
+ 'partial', 'partialRight', 'partition', 'pick', 'pickBy', 'pull', 'pullAll',
+ 'pullAt', 'random', 'range', 'rangeRight', 'rearg', 'reject', 'remove',
+ 'repeat', 'restFrom', 'result', 'sampleSize', 'some', 'sortBy', 'sortedIndex',
+ 'sortedIndexOf', 'sortedLastIndex', 'sortedLastIndexOf', 'sortedUniqBy',
+ 'split', 'spreadFrom', 'startsWith', 'subtract', 'sumBy', 'take', 'takeRight',
+ 'takeRightWhile', 'takeWhile', 'tap', 'throttle', 'thru', 'times', 'trimChars',
+ 'trimCharsEnd', 'trimCharsStart', 'truncate', 'union', 'uniqBy', 'uniqWith',
+ 'unset', 'unzipWith', 'without', 'wrap', 'xor', 'zip', 'zipObject',
+ 'zipObjectDeep'
+ ],
+ '3': [
+ 'assignInWith', 'assignWith', 'clamp', 'differenceBy', 'differenceWith',
+ 'getOr', 'inRange', 'intersectionBy', 'intersectionWith', 'invokeArgs',
+ 'invokeArgsMap', 'isEqualWith', 'isMatchWith', 'flatMapDepth', 'mergeWith',
+ 'orderBy', 'padChars', 'padCharsEnd', 'padCharsStart', 'pullAllBy',
+ 'pullAllWith', 'reduce', 'reduceRight', 'replace', 'set', 'slice',
+ 'sortedIndexBy', 'sortedLastIndexBy', 'transform', 'unionBy', 'unionWith',
+ 'update', 'xorBy', 'xorWith', 'zipWith'
+ ],
+ '4': [
+ 'fill', 'setWith', 'updateWith'
+ ]
+ };
+
+ /** Used to map ary to rearg configs. */
+ exports.aryRearg = {
+ '2': [1, 0],
+ '3': [2, 0, 1],
+ '4': [3, 2, 0, 1]
+ };
+
+ /** Used to map method names to their iteratee ary. */
+ exports.iterateeAry = {
+ 'dropRightWhile': 1,
+ 'dropWhile': 1,
+ 'every': 1,
+ 'filter': 1,
+ 'find': 1,
+ 'findIndex': 1,
+ 'findKey': 1,
+ 'findLast': 1,
+ 'findLastIndex': 1,
+ 'findLastKey': 1,
+ 'flatMap': 1,
+ 'flatMapDeep': 1,
+ 'flatMapDepth': 1,
+ 'forEach': 1,
+ 'forEachRight': 1,
+ 'forIn': 1,
+ 'forInRight': 1,
+ 'forOwn': 1,
+ 'forOwnRight': 1,
+ 'map': 1,
+ 'mapKeys': 1,
+ 'mapValues': 1,
+ 'partition': 1,
+ 'reduce': 2,
+ 'reduceRight': 2,
+ 'reject': 1,
+ 'remove': 1,
+ 'some': 1,
+ 'takeRightWhile': 1,
+ 'takeWhile': 1,
+ 'times': 1,
+ 'transform': 2
+ };
+
+ /** Used to map method names to iteratee rearg configs. */
+ exports.iterateeRearg = {
+ 'mapKeys': [1]
+ };
+
+ /** Used to map method names to rearg configs. */
+ exports.methodRearg = {
+ 'assignInWith': [1, 2, 0],
+ 'assignWith': [1, 2, 0],
+ 'getOr': [2, 1, 0],
+ 'isEqualWith': [1, 2, 0],
+ 'isMatchWith': [2, 1, 0],
+ 'mergeWith': [1, 2, 0],
+ 'padChars': [2, 1, 0],
+ 'padCharsEnd': [2, 1, 0],
+ 'padCharsStart': [2, 1, 0],
+ 'pullAllBy': [2, 1, 0],
+ 'pullAllWith': [2, 1, 0],
+ 'setWith': [3, 1, 2, 0],
+ 'sortedIndexBy': [2, 1, 0],
+ 'sortedLastIndexBy': [2, 1, 0],
+ 'updateWith': [3, 1, 2, 0],
+ 'zipWith': [1, 2, 0]
+ };
+
+ /** Used to map method names to spread configs. */
+ exports.methodSpread = {
+ 'invokeArgs': 2,
+ 'invokeArgsMap': 2,
+ 'partial': 1,
+ 'partialRight': 1,
+ 'without': 1
+ };
+
+ /** Used to identify methods which mutate arrays or objects. */
+ exports.mutate = {
+ 'array': {
+ 'fill': true,
+ 'pull': true,
+ 'pullAll': true,
+ 'pullAllBy': true,
+ 'pullAllWith': true,
+ 'pullAt': true,
+ 'remove': true,
+ 'reverse': true
+ },
+ 'object': {
+ 'assign': true,
+ 'assignIn': true,
+ 'assignInWith': true,
+ 'assignWith': true,
+ 'defaults': true,
+ 'defaultsDeep': true,
+ 'merge': true,
+ 'mergeWith': true
+ },
+ 'set': {
+ 'set': true,
+ 'setWith': true,
+ 'unset': true,
+ 'update': true,
+ 'updateWith': true
+ }
+ };
+
+ /** Used to track methods with placeholder support */
+ exports.placeholder = {
+ 'bind': true,
+ 'bindKey': true,
+ 'curry': true,
+ 'curryRight': true,
+ 'partial': true,
+ 'partialRight': true
+ };
+
+ /** Used to map real names to their aliases. */
+ exports.realToAlias = (function() {
+ var hasOwnProperty = Object.prototype.hasOwnProperty,
+ object = exports.aliasToReal,
+ result = {};
+
+ for (var key in object) {
+ var value = object[key];
+ if (hasOwnProperty.call(result, value)) {
+ result[value].push(key);
+ } else {
+ result[value] = [key];
+ }
+ }
+ return result;
+ }());
+
+ /** Used to map method names to other names. */
+ exports.remap = {
+ 'curryN': 'curry',
+ 'curryRightN': 'curryRight',
+ 'getOr': 'get',
+ 'invokeArgs': 'invoke',
+ 'invokeArgsMap': 'invokeMap',
+ 'padChars': 'pad',
+ 'padCharsEnd': 'padEnd',
+ 'padCharsStart': 'padStart',
+ 'restFrom': 'rest',
+ 'spreadFrom': 'spread',
+ 'trimChars': 'trim',
+ 'trimCharsEnd': 'trimEnd',
+ 'trimCharsStart': 'trimStart'
+ };
+
+ /** Used to track methods that skip fixing their arity. */
+ exports.skipFixed = {
+ 'castArray': true,
+ 'flow': true,
+ 'flowRight': true,
+ 'iteratee': true,
+ 'mixin': true,
+ 'runInContext': true
+ };
+
+ /** Used to track methods that skip rearranging arguments. */
+ exports.skipRearg = {
+ 'add': true,
+ 'assign': true,
+ 'assignIn': true,
+ 'bind': true,
+ 'bindKey': true,
+ 'concat': true,
+ 'difference': true,
+ 'divide': true,
+ 'eq': true,
+ 'gt': true,
+ 'gte': true,
+ 'isEqual': true,
+ 'lt': true,
+ 'lte': true,
+ 'matchesProperty': true,
+ 'merge': true,
+ 'multiply': true,
+ 'overArgs': true,
+ 'partial': true,
+ 'partialRight': true,
+ 'random': true,
+ 'range': true,
+ 'rangeRight': true,
+ 'subtract': true,
+ 'without': true,
+ 'zip': true,
+ 'zipObject': true
+ };
+
+
+/***/ }
+/******/ ])
+});
+;
\ No newline at end of file
diff --git a/views/ngXosViews/serviceGrid/src/vendor/lodash/doc/README.md b/views/ngXosViews/serviceGrid/src/vendor/lodash/doc/README.md
new file mode 100644
index 0000000..f9da2b3
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/lodash/doc/README.md
@@ -0,0 +1,10738 @@
+# <a href="https://lodash.com/">lodash</a> <span>v4.11.2</span>
+
+<!-- div class="toc-container" -->
+
+<!-- div -->
+
+## `Array`
+* <a href="#_chunkarray-size1">`_.chunk`</a>
+* <a href="#_compactarray">`_.compact`</a>
+* <a href="#_concatarray-values">`_.concat`</a>
+* <a href="#_differencearray-values">`_.difference`</a>
+* <a href="#_differencebyarray-values-iteratee_identity">`_.differenceBy`</a>
+* <a href="#_differencewitharray-values-comparator">`_.differenceWith`</a>
+* <a href="#_droparray-n1">`_.drop`</a>
+* <a href="#_droprightarray-n1">`_.dropRight`</a>
+* <a href="#_droprightwhilearray-predicate_identity">`_.dropRightWhile`</a>
+* <a href="#_dropwhilearray-predicate_identity">`_.dropWhile`</a>
+* <a href="#_fillarray-value-start0-endarraylength">`_.fill`</a>
+* <a href="#_findindexarray-predicate_identity">`_.findIndex`</a>
+* <a href="#_findlastindexarray-predicate_identity">`_.findLastIndex`</a>
+* <a href="#_headarray" class="alias">`_.first` -> `head`</a>
+* <a href="#_flattenarray">`_.flatten`</a>
+* <a href="#_flattendeeparray">`_.flattenDeep`</a>
+* <a href="#_flattendeptharray-depth1">`_.flattenDepth`</a>
+* <a href="#_frompairspairs">`_.fromPairs`</a>
+* <a href="#_headarray">`_.head`</a>
+* <a href="#_indexofarray-value-fromindex0">`_.indexOf`</a>
+* <a href="#_initialarray">`_.initial`</a>
+* <a href="#_intersectionarrays">`_.intersection`</a>
+* <a href="#_intersectionbyarrays-iteratee_identity">`_.intersectionBy`</a>
+* <a href="#_intersectionwitharrays-comparator">`_.intersectionWith`</a>
+* <a href="#_joinarray-separator-">`_.join`</a>
+* <a href="#_lastarray">`_.last`</a>
+* <a href="#_lastindexofarray-value-fromindexarraylength-1">`_.lastIndexOf`</a>
+* <a href="#_ntharray-n0">`_.nth`</a>
+* <a href="#_pullarray-values">`_.pull`</a>
+* <a href="#_pullallarray-values">`_.pullAll`</a>
+* <a href="#_pullallbyarray-values-iteratee_identity">`_.pullAllBy`</a>
+* <a href="#_pullallwitharray-values-comparator">`_.pullAllWith`</a>
+* <a href="#_pullatarray-indexes">`_.pullAt`</a>
+* <a href="#_removearray-predicate_identity">`_.remove`</a>
+* <a href="#_reversearray">`_.reverse`</a>
+* <a href="#_slicearray-start0-endarraylength">`_.slice`</a>
+* <a href="#_sortedindexarray-value">`_.sortedIndex`</a>
+* <a href="#_sortedindexbyarray-value-iteratee_identity">`_.sortedIndexBy`</a>
+* <a href="#_sortedindexofarray-value">`_.sortedIndexOf`</a>
+* <a href="#_sortedlastindexarray-value">`_.sortedLastIndex`</a>
+* <a href="#_sortedlastindexbyarray-value-iteratee_identity">`_.sortedLastIndexBy`</a>
+* <a href="#_sortedlastindexofarray-value">`_.sortedLastIndexOf`</a>
+* <a href="#_sorteduniqarray">`_.sortedUniq`</a>
+* <a href="#_sorteduniqbyarray-iteratee">`_.sortedUniqBy`</a>
+* <a href="#_tailarray">`_.tail`</a>
+* <a href="#_takearray-n1">`_.take`</a>
+* <a href="#_takerightarray-n1">`_.takeRight`</a>
+* <a href="#_takerightwhilearray-predicate_identity">`_.takeRightWhile`</a>
+* <a href="#_takewhilearray-predicate_identity">`_.takeWhile`</a>
+* <a href="#_unionarrays">`_.union`</a>
+* <a href="#_unionbyarrays-iteratee_identity">`_.unionBy`</a>
+* <a href="#_unionwitharrays-comparator">`_.unionWith`</a>
+* <a href="#_uniqarray">`_.uniq`</a>
+* <a href="#_uniqbyarray-iteratee_identity">`_.uniqBy`</a>
+* <a href="#_uniqwitharray-comparator">`_.uniqWith`</a>
+* <a href="#_unziparray">`_.unzip`</a>
+* <a href="#_unzipwitharray-iteratee_identity">`_.unzipWith`</a>
+* <a href="#_withoutarray-values">`_.without`</a>
+* <a href="#_xorarrays">`_.xor`</a>
+* <a href="#_xorbyarrays-iteratee_identity">`_.xorBy`</a>
+* <a href="#_xorwitharrays-comparator">`_.xorWith`</a>
+* <a href="#_ziparrays">`_.zip`</a>
+* <a href="#_zipobjectprops-values">`_.zipObject`</a>
+* <a href="#_zipobjectdeepprops-values">`_.zipObjectDeep`</a>
+* <a href="#_zipwitharrays-iteratee_identity">`_.zipWith`</a>
+
+<!-- /div -->
+
+<!-- div -->
+
+## `Collection`
+* <a href="#_countbycollection-iteratee_identity">`_.countBy`</a>
+* <a href="#_foreachcollection-iteratee_identity" class="alias">`_.each` -> `forEach`</a>
+* <a href="#_foreachrightcollection-iteratee_identity" class="alias">`_.eachRight` -> `forEachRight`</a>
+* <a href="#_everycollection-predicate_identity">`_.every`</a>
+* <a href="#_filtercollection-predicate_identity">`_.filter`</a>
+* <a href="#_findcollection-predicate_identity">`_.find`</a>
+* <a href="#_findlastcollection-predicate_identity">`_.findLast`</a>
+* <a href="#_flatmapcollection-iteratee_identity">`_.flatMap`</a>
+* <a href="#_flatmapdeepcollection-iteratee_identity">`_.flatMapDeep`</a>
+* <a href="#_flatmapdepthcollection-iteratee_identity-depth1">`_.flatMapDepth`</a>
+* <a href="#_foreachcollection-iteratee_identity">`_.forEach`</a>
+* <a href="#_foreachrightcollection-iteratee_identity">`_.forEachRight`</a>
+* <a href="#_groupbycollection-iteratee_identity">`_.groupBy`</a>
+* <a href="#_includescollection-value-fromindex0">`_.includes`</a>
+* <a href="#_invokemapcollection-path-args">`_.invokeMap`</a>
+* <a href="#_keybycollection-iteratee_identity">`_.keyBy`</a>
+* <a href="#_mapcollection-iteratee_identity">`_.map`</a>
+* <a href="#_orderbycollection-iteratees_identity-orders">`_.orderBy`</a>
+* <a href="#_partitioncollection-predicate_identity">`_.partition`</a>
+* <a href="#_reducecollection-iteratee_identity-accumulator">`_.reduce`</a>
+* <a href="#_reducerightcollection-iteratee_identity-accumulator">`_.reduceRight`</a>
+* <a href="#_rejectcollection-predicate_identity">`_.reject`</a>
+* <a href="#_samplecollection">`_.sample`</a>
+* <a href="#_samplesizecollection-n1">`_.sampleSize`</a>
+* <a href="#_shufflecollection">`_.shuffle`</a>
+* <a href="#_sizecollection">`_.size`</a>
+* <a href="#_somecollection-predicate_identity">`_.some`</a>
+* <a href="#_sortbycollection-iteratees_identity">`_.sortBy`</a>
+
+<!-- /div -->
+
+<!-- div -->
+
+## `Date`
+* <a href="#_now">`_.now`</a>
+
+<!-- /div -->
+
+<!-- div -->
+
+## `Function`
+* <a href="#_aftern-func">`_.after`</a>
+* <a href="#_aryfunc-nfunclength">`_.ary`</a>
+* <a href="#_beforen-func">`_.before`</a>
+* <a href="#_bindfunc-thisarg-partials">`_.bind`</a>
+* <a href="#_bindkeyobject-key-partials">`_.bindKey`</a>
+* <a href="#_curryfunc-arityfunclength">`_.curry`</a>
+* <a href="#_curryrightfunc-arityfunclength">`_.curryRight`</a>
+* <a href="#_debouncefunc-wait0-options-optionsleadingfalse-optionsmaxwait-optionstrailingtrue">`_.debounce`</a>
+* <a href="#_deferfunc-args">`_.defer`</a>
+* <a href="#_delayfunc-wait-args">`_.delay`</a>
+* <a href="#_flipfunc">`_.flip`</a>
+* <a href="#_memoizefunc-resolver">`_.memoize`</a>
+* <a href="#_negatepredicate">`_.negate`</a>
+* <a href="#_oncefunc">`_.once`</a>
+* <a href="#_overargsfunc">`_.overArgs`</a>
+* <a href="#_partialfunc-partials">`_.partial`</a>
+* <a href="#_partialrightfunc-partials">`_.partialRight`</a>
+* <a href="#_reargfunc-indexes">`_.rearg`</a>
+* <a href="#_restfunc-startfunclength-1">`_.rest`</a>
+* <a href="#_spreadfunc-start0">`_.spread`</a>
+* <a href="#_throttlefunc-wait0-options-optionsleadingtrue-optionstrailingtrue">`_.throttle`</a>
+* <a href="#_unaryfunc">`_.unary`</a>
+* <a href="#_wrapvalue-wrapperidentity">`_.wrap`</a>
+
+<!-- /div -->
+
+<!-- div -->
+
+## `Lang`
+* <a href="#_castarrayvalue">`_.castArray`</a>
+* <a href="#_clonevalue">`_.clone`</a>
+* <a href="#_clonedeepvalue">`_.cloneDeep`</a>
+* <a href="#_clonedeepwithvalue-customizer">`_.cloneDeepWith`</a>
+* <a href="#_clonewithvalue-customizer">`_.cloneWith`</a>
+* <a href="#_eqvalue-other">`_.eq`</a>
+* <a href="#_gtvalue-other">`_.gt`</a>
+* <a href="#_gtevalue-other">`_.gte`</a>
+* <a href="#_isargumentsvalue">`_.isArguments`</a>
+* <a href="#_isarrayvalue">`_.isArray`</a>
+* <a href="#_isarraybuffervalue">`_.isArrayBuffer`</a>
+* <a href="#_isarraylikevalue">`_.isArrayLike`</a>
+* <a href="#_isarraylikeobjectvalue">`_.isArrayLikeObject`</a>
+* <a href="#_isbooleanvalue">`_.isBoolean`</a>
+* <a href="#_isbuffervalue">`_.isBuffer`</a>
+* <a href="#_isdatevalue">`_.isDate`</a>
+* <a href="#_iselementvalue">`_.isElement`</a>
+* <a href="#_isemptyvalue">`_.isEmpty`</a>
+* <a href="#_isequalvalue-other">`_.isEqual`</a>
+* <a href="#_isequalwithvalue-other-customizer">`_.isEqualWith`</a>
+* <a href="#_iserrorvalue">`_.isError`</a>
+* <a href="#_isfinitevalue">`_.isFinite`</a>
+* <a href="#_isfunctionvalue">`_.isFunction`</a>
+* <a href="#_isintegervalue">`_.isInteger`</a>
+* <a href="#_islengthvalue">`_.isLength`</a>
+* <a href="#_ismapvalue">`_.isMap`</a>
+* <a href="#_ismatchobject-source">`_.isMatch`</a>
+* <a href="#_ismatchwithobject-source-customizer">`_.isMatchWith`</a>
+* <a href="#_isnanvalue">`_.isNaN`</a>
+* <a href="#_isnativevalue">`_.isNative`</a>
+* <a href="#_isnilvalue">`_.isNil`</a>
+* <a href="#_isnullvalue">`_.isNull`</a>
+* <a href="#_isnumbervalue">`_.isNumber`</a>
+* <a href="#_isobjectvalue">`_.isObject`</a>
+* <a href="#_isobjectlikevalue">`_.isObjectLike`</a>
+* <a href="#_isplainobjectvalue">`_.isPlainObject`</a>
+* <a href="#_isregexpvalue">`_.isRegExp`</a>
+* <a href="#_issafeintegervalue">`_.isSafeInteger`</a>
+* <a href="#_issetvalue">`_.isSet`</a>
+* <a href="#_isstringvalue">`_.isString`</a>
+* <a href="#_issymbolvalue">`_.isSymbol`</a>
+* <a href="#_istypedarrayvalue">`_.isTypedArray`</a>
+* <a href="#_isundefinedvalue">`_.isUndefined`</a>
+* <a href="#_isweakmapvalue">`_.isWeakMap`</a>
+* <a href="#_isweaksetvalue">`_.isWeakSet`</a>
+* <a href="#_ltvalue-other">`_.lt`</a>
+* <a href="#_ltevalue-other">`_.lte`</a>
+* <a href="#_toarrayvalue">`_.toArray`</a>
+* <a href="#_tointegervalue">`_.toInteger`</a>
+* <a href="#_tolengthvalue">`_.toLength`</a>
+* <a href="#_tonumbervalue">`_.toNumber`</a>
+* <a href="#_toplainobjectvalue">`_.toPlainObject`</a>
+* <a href="#_tosafeintegervalue">`_.toSafeInteger`</a>
+* <a href="#_tostringvalue">`_.toString`</a>
+
+<!-- /div -->
+
+<!-- div -->
+
+## `Math`
+* <a href="#_addaugend-addend">`_.add`</a>
+* <a href="#_ceilnumber-precision0">`_.ceil`</a>
+* <a href="#_dividedividend-divisor">`_.divide`</a>
+* <a href="#_floornumber-precision0">`_.floor`</a>
+* <a href="#_maxarray">`_.max`</a>
+* <a href="#_maxbyarray-iteratee_identity">`_.maxBy`</a>
+* <a href="#_meanarray">`_.mean`</a>
+* <a href="#_meanbyarray-iteratee_identity">`_.meanBy`</a>
+* <a href="#_minarray">`_.min`</a>
+* <a href="#_minbyarray-iteratee_identity">`_.minBy`</a>
+* <a href="#_multiplymultiplier-multiplicand">`_.multiply`</a>
+* <a href="#_roundnumber-precision0">`_.round`</a>
+* <a href="#_subtractminuend-subtrahend">`_.subtract`</a>
+* <a href="#_sumarray">`_.sum`</a>
+* <a href="#_sumbyarray-iteratee_identity">`_.sumBy`</a>
+
+<!-- /div -->
+
+<!-- div -->
+
+## `Number`
+* <a href="#_clampnumber-lower-upper">`_.clamp`</a>
+* <a href="#_inrangenumber-start0-end">`_.inRange`</a>
+* <a href="#_randomlower0-upper1-floating">`_.random`</a>
+
+<!-- /div -->
+
+<!-- div -->
+
+## `Object`
+* <a href="#_assignobject-sources">`_.assign`</a>
+* <a href="#_assigninobject-sources">`_.assignIn`</a>
+* <a href="#_assigninwithobject-sources-customizer">`_.assignInWith`</a>
+* <a href="#_assignwithobject-sources-customizer">`_.assignWith`</a>
+* <a href="#_atobject-paths">`_.at`</a>
+* <a href="#_createprototype-properties">`_.create`</a>
+* <a href="#_defaultsobject-sources">`_.defaults`</a>
+* <a href="#_defaultsdeepobject-sources">`_.defaultsDeep`</a>
+* <a href="#_topairsobject" class="alias">`_.entries` -> `toPairs`</a>
+* <a href="#_topairsinobject" class="alias">`_.entriesIn` -> `toPairsIn`</a>
+* <a href="#_assigninobject-sources" class="alias">`_.extend` -> `assignIn`</a>
+* <a href="#_assigninwithobject-sources-customizer" class="alias">`_.extendWith` -> `assignInWith`</a>
+* <a href="#_findkeyobject-predicate_identity">`_.findKey`</a>
+* <a href="#_findlastkeyobject-predicate_identity">`_.findLastKey`</a>
+* <a href="#_forinobject-iteratee_identity">`_.forIn`</a>
+* <a href="#_forinrightobject-iteratee_identity">`_.forInRight`</a>
+* <a href="#_forownobject-iteratee_identity">`_.forOwn`</a>
+* <a href="#_forownrightobject-iteratee_identity">`_.forOwnRight`</a>
+* <a href="#_functionsobject">`_.functions`</a>
+* <a href="#_functionsinobject">`_.functionsIn`</a>
+* <a href="#_getobject-path-defaultvalue">`_.get`</a>
+* <a href="#_hasobject-path">`_.has`</a>
+* <a href="#_hasinobject-path">`_.hasIn`</a>
+* <a href="#_invertobject">`_.invert`</a>
+* <a href="#_invertbyobject-iteratee_identity">`_.invertBy`</a>
+* <a href="#_invokeobject-path-args">`_.invoke`</a>
+* <a href="#_keysobject">`_.keys`</a>
+* <a href="#_keysinobject">`_.keysIn`</a>
+* <a href="#_mapkeysobject-iteratee_identity">`_.mapKeys`</a>
+* <a href="#_mapvaluesobject-iteratee_identity">`_.mapValues`</a>
+* <a href="#_mergeobject-sources">`_.merge`</a>
+* <a href="#_mergewithobject-sources-customizer">`_.mergeWith`</a>
+* <a href="#_omitobject-props">`_.omit`</a>
+* <a href="#_omitbyobject-predicate_identity">`_.omitBy`</a>
+* <a href="#_pickobject-props">`_.pick`</a>
+* <a href="#_pickbyobject-predicate_identity">`_.pickBy`</a>
+* <a href="#_resultobject-path-defaultvalue">`_.result`</a>
+* <a href="#_setobject-path-value">`_.set`</a>
+* <a href="#_setwithobject-path-value-customizer">`_.setWith`</a>
+* <a href="#_topairsobject">`_.toPairs`</a>
+* <a href="#_topairsinobject">`_.toPairsIn`</a>
+* <a href="#_transformobject-iteratee_identity-accumulator">`_.transform`</a>
+* <a href="#_unsetobject-path">`_.unset`</a>
+* <a href="#_updateobject-path-updater">`_.update`</a>
+* <a href="#_updatewithobject-path-updater-customizer">`_.updateWith`</a>
+* <a href="#_valuesobject">`_.values`</a>
+* <a href="#_valuesinobject">`_.valuesIn`</a>
+
+<!-- /div -->
+
+<!-- div -->
+
+## `Seq`
+* <a href="#_value">`_`</a>
+* <a href="#_chainvalue">`_.chain`</a>
+* <a href="#_tapvalue-interceptor">`_.tap`</a>
+* <a href="#_thruvalue-interceptor">`_.thru`</a>
+* <a href="#_prototypesymboliterator">`_.prototype[Symbol.iterator]`</a>
+* <a href="#_prototypeatpaths">`_.prototype.at`</a>
+* <a href="#_prototypechain">`_.prototype.chain`</a>
+* <a href="#_prototypecommit">`_.prototype.commit`</a>
+* <a href="#_prototypenext">`_.prototype.next`</a>
+* <a href="#_prototypeplantvalue">`_.prototype.plant`</a>
+* <a href="#_prototypereverse">`_.prototype.reverse`</a>
+* <a href="#_prototypevalue" class="alias">`_.prototype.toJSON` -> `value`</a>
+* <a href="#_prototypevalue">`_.prototype.value`</a>
+* <a href="#_prototypevalue" class="alias">`_.prototype.valueOf` -> `value`</a>
+
+<!-- /div -->
+
+<!-- div -->
+
+## `String`
+* <a href="#_camelcasestring">`_.camelCase`</a>
+* <a href="#_capitalizestring">`_.capitalize`</a>
+* <a href="#_deburrstring">`_.deburr`</a>
+* <a href="#_endswithstring-target-positionstringlength">`_.endsWith`</a>
+* <a href="#_escapestring">`_.escape`</a>
+* <a href="#_escaperegexpstring">`_.escapeRegExp`</a>
+* <a href="#_kebabcasestring">`_.kebabCase`</a>
+* <a href="#_lowercasestring">`_.lowerCase`</a>
+* <a href="#_lowerfirststring">`_.lowerFirst`</a>
+* <a href="#_padstring-length0-chars">`_.pad`</a>
+* <a href="#_padendstring-length0-chars">`_.padEnd`</a>
+* <a href="#_padstartstring-length0-chars">`_.padStart`</a>
+* <a href="#_parseintstring-radix10">`_.parseInt`</a>
+* <a href="#_repeatstring-n1">`_.repeat`</a>
+* <a href="#_replacestring-pattern-replacement">`_.replace`</a>
+* <a href="#_snakecasestring">`_.snakeCase`</a>
+* <a href="#_splitstring-separator-limit">`_.split`</a>
+* <a href="#_startcasestring">`_.startCase`</a>
+* <a href="#_startswithstring-target-position0">`_.startsWith`</a>
+* <a href="#_templatestring-options-optionsescape_templatesettingsescape-optionsevaluate_templatesettingsevaluate-optionsimports_templatesettingsimports-optionsinterpolate_templatesettingsinterpolate-optionssourceurllodashtemplatesourcesn-optionsvariableobj">`_.template`</a>
+* <a href="#_tolowerstring">`_.toLower`</a>
+* <a href="#_toupperstring">`_.toUpper`</a>
+* <a href="#_trimstring-charswhitespace">`_.trim`</a>
+* <a href="#_trimendstring-charswhitespace">`_.trimEnd`</a>
+* <a href="#_trimstartstring-charswhitespace">`_.trimStart`</a>
+* <a href="#_truncatestring-options-optionslength30-optionsomission-optionsseparator">`_.truncate`</a>
+* <a href="#_unescapestring">`_.unescape`</a>
+* <a href="#_uppercasestring">`_.upperCase`</a>
+* <a href="#_upperfirststring">`_.upperFirst`</a>
+* <a href="#_wordsstring-pattern">`_.words`</a>
+
+<!-- /div -->
+
+<!-- div -->
+
+## `Util`
+* <a href="#_attemptfunc-args">`_.attempt`</a>
+* <a href="#_bindallobject-methodnames">`_.bindAll`</a>
+* <a href="#_condpairs">`_.cond`</a>
+* <a href="#_conformssource">`_.conforms`</a>
+* <a href="#_constantvalue">`_.constant`</a>
+* <a href="#_flowfuncs">`_.flow`</a>
+* <a href="#_flowrightfuncs">`_.flowRight`</a>
+* <a href="#_identityvalue">`_.identity`</a>
+* <a href="#_iterateefunc_identity">`_.iteratee`</a>
+* <a href="#_matchessource">`_.matches`</a>
+* <a href="#_matchespropertypath-srcvalue">`_.matchesProperty`</a>
+* <a href="#_methodpath-args">`_.method`</a>
+* <a href="#_methodofobject-args">`_.methodOf`</a>
+* <a href="#_mixinobjectlodash-source-options-optionschaintrue">`_.mixin`</a>
+* <a href="#_noconflict">`_.noConflict`</a>
+* <a href="#_noop">`_.noop`</a>
+* <a href="#_nthargn0">`_.nthArg`</a>
+* <a href="#_overiteratees_identity">`_.over`</a>
+* <a href="#_overeverypredicates_identity">`_.overEvery`</a>
+* <a href="#_oversomepredicates_identity">`_.overSome`</a>
+* <a href="#_propertypath">`_.property`</a>
+* <a href="#_propertyofobject">`_.propertyOf`</a>
+* <a href="#_rangestart0-end-step1">`_.range`</a>
+* <a href="#_rangerightstart0-end-step1">`_.rangeRight`</a>
+* <a href="#_runincontextcontextroot">`_.runInContext`</a>
+* <a href="#_timesn-iteratee_identity">`_.times`</a>
+* <a href="#_topathvalue">`_.toPath`</a>
+* <a href="#_uniqueidprefix">`_.uniqueId`</a>
+
+<!-- /div -->
+
+<!-- div -->
+
+## `Properties`
+* <a href="#_version">`_.VERSION`</a>
+* <a href="#_templatesettings">`_.templateSettings`</a>
+* <a href="#_templatesettingsescape">`_.templateSettings.escape`</a>
+* <a href="#_templatesettingsevaluate">`_.templateSettings.evaluate`</a>
+* <a href="#_templatesettingsimports">`_.templateSettings.imports`</a>
+* <a href="#_templatesettingsinterpolate">`_.templateSettings.interpolate`</a>
+* <a href="#_templatesettingsvariable">`_.templateSettings.variable`</a>
+
+<!-- /div -->
+
+<!-- div -->
+
+## `Methods`
+* <a href="#_templatesettingsimports_">`_.templateSettings.imports._`</a>
+
+<!-- /div -->
+
+<!-- /div -->
+
+<!-- div class="doc-container" -->
+
+<!-- div -->
+
+## `“Array” Methods`
+
+<!-- div -->
+
+### <a id="_chunkarray-size1"></a>`_.chunk(array, [size=1])`
+<a href="#_chunkarray-size1">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L5982 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.chunk "See the npm package")
+
+Creates an array of elements split into groups the length of `size`.
+If `array` can't be split evenly, the final chunk will be the remaining
+elements.
+
+#### Since
+3.0.0
+#### Arguments
+1. `array` *(Array)*: The array to process.
+2. `[size=1]` *(number)*: The length of each chunk
+
+#### Returns
+*(Array)*: Returns the new array containing chunks.
+
+#### Example
+```js
+_.chunk(['a', 'b', 'c', 'd'], 2);
+// => [['a', 'b'], ['c', 'd']]
+
+_.chunk(['a', 'b', 'c', 'd'], 3);
+// => [['a', 'b', 'c'], ['d']]
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_compactarray"></a>`_.compact(array)`
+<a href="#_compactarray">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L6017 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.compact "See the npm package")
+
+Creates an array with all falsey values removed. The values `false`, `null`,
+`0`, `""`, `undefined`, and `NaN` are falsey.
+
+#### Since
+0.1.0
+#### Arguments
+1. `array` *(Array)*: The array to compact.
+
+#### Returns
+*(Array)*: Returns the new array of filtered values.
+
+#### Example
+```js
+_.compact([0, 1, false, 2, '', 3]);
+// => [1, 2, 3]
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_concatarray-values"></a>`_.concat(array, [values])`
+<a href="#_concatarray-values">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L6054 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.concat "See the npm package")
+
+Creates a new array concatenating `array` with any additional arrays
+and/or values.
+
+#### Since
+4.0.0
+#### Arguments
+1. `array` *(Array)*: The array to concatenate.
+2. `[values]` *(...*)*: The values to concatenate.
+
+#### Returns
+*(Array)*: Returns the new concatenated array.
+
+#### Example
+```js
+var array = [1];
+var other = _.concat(array, 2, [3], [[4]]);
+
+console.log(other);
+// => [1, 2, 3, [4]]
+
+console.log(array);
+// => [1]
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_differencearray-values"></a>`_.difference(array, [values])`
+<a href="#_differencearray-values">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L6087 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.difference "See the npm package")
+
+Creates an array of unique `array` values not included in the other given
+arrays using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
+for equality comparisons. The order of result values is determined by the
+order they occur in the first array.
+
+#### Since
+0.1.0
+#### Arguments
+1. `array` *(Array)*: The array to inspect.
+2. `[values]` *(...Array)*: The values to exclude.
+
+#### Returns
+*(Array)*: Returns the new array of filtered values.
+
+#### Example
+```js
+_.difference([3, 2, 1], [4, 2]);
+// => [3, 1]
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_differencebyarray-values-iteratee_identity"></a>`_.differenceBy(array, [values], [iteratee=_.identity])`
+<a href="#_differencebyarray-values-iteratee_identity">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L6117 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.differenceby "See the npm package")
+
+This method is like `_.difference` except that it accepts `iteratee` which
+is invoked for each element of `array` and `values` to generate the criterion
+by which they're compared. Result values are chosen from the first array.
+The iteratee is invoked with one argument: *(value)*.
+
+#### Since
+4.0.0
+#### Arguments
+1. `array` *(Array)*: The array to inspect.
+2. `[values]` *(...Array)*: The values to exclude.
+3. `[iteratee=_.identity]` *(Array|Function|Object|string)*: The iteratee invoked per element.
+
+#### Returns
+*(Array)*: Returns the new array of filtered values.
+
+#### Example
+```js
+_.differenceBy([3.1, 2.2, 1.3], [4.4, 2.5], Math.floor);
+// => [3.1, 1.3]
+
+// The `_.property` iteratee shorthand.
+_.differenceBy([{ 'x': 2 }, { 'x': 1 }], [{ 'x': 1 }], 'x');
+// => [{ 'x': 2 }]
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_differencewitharray-values-comparator"></a>`_.differenceWith(array, [values], [comparator])`
+<a href="#_differencewitharray-values-comparator">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L6148 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.differencewith "See the npm package")
+
+This method is like `_.difference` except that it accepts `comparator`
+which is invoked to compare elements of `array` to `values`. Result values
+are chosen from the first array. The comparator is invoked with two arguments:<br>
+*(arrVal, othVal)*.
+
+#### Since
+4.0.0
+#### Arguments
+1. `array` *(Array)*: The array to inspect.
+2. `[values]` *(...Array)*: The values to exclude.
+3. `[comparator]` *(Function)*: The comparator invoked per element.
+
+#### Returns
+*(Array)*: Returns the new array of filtered values.
+
+#### Example
+```js
+var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
+
+_.differenceWith(objects, [{ 'x': 1, 'y': 2 }], _.isEqual);
+// => [{ 'x': 2, 'y': 1 }]
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_droparray-n1"></a>`_.drop(array, [n=1])`
+<a href="#_droparray-n1">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L6183 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.drop "See the npm package")
+
+Creates a slice of `array` with `n` elements dropped from the beginning.
+
+#### Since
+0.5.0
+#### Arguments
+1. `array` *(Array)*: The array to query.
+2. `[n=1]` *(number)*: The number of elements to drop.
+
+#### Returns
+*(Array)*: Returns the slice of `array`.
+
+#### Example
+```js
+_.drop([1, 2, 3]);
+// => [2, 3]
+
+_.drop([1, 2, 3], 2);
+// => [3]
+
+_.drop([1, 2, 3], 5);
+// => []
+
+_.drop([1, 2, 3], 0);
+// => [1, 2, 3]
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_droprightarray-n1"></a>`_.dropRight(array, [n=1])`
+<a href="#_droprightarray-n1">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L6217 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.dropright "See the npm package")
+
+Creates a slice of `array` with `n` elements dropped from the end.
+
+#### Since
+3.0.0
+#### Arguments
+1. `array` *(Array)*: The array to query.
+2. `[n=1]` *(number)*: The number of elements to drop.
+
+#### Returns
+*(Array)*: Returns the slice of `array`.
+
+#### Example
+```js
+_.dropRight([1, 2, 3]);
+// => [1, 2]
+
+_.dropRight([1, 2, 3], 2);
+// => [1]
+
+_.dropRight([1, 2, 3], 5);
+// => []
+
+_.dropRight([1, 2, 3], 0);
+// => [1, 2, 3]
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_droprightwhilearray-predicate_identity"></a>`_.dropRightWhile(array, [predicate=_.identity])`
+<a href="#_droprightwhilearray-predicate_identity">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L6263 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.droprightwhile "See the npm package")
+
+Creates a slice of `array` excluding elements dropped from the end.
+Elements are dropped until `predicate` returns falsey. The predicate is
+invoked with three arguments: *(value, index, array)*.
+
+#### Since
+3.0.0
+#### Arguments
+1. `array` *(Array)*: The array to query.
+2. `[predicate=_.identity]` *(Array|Function|Object|string)*: The function invoked per iteration.
+
+#### Returns
+*(Array)*: Returns the slice of `array`.
+
+#### Example
+```js
+var users = [
+ { 'user': 'barney', 'active': true },
+ { 'user': 'fred', 'active': false },
+ { 'user': 'pebbles', 'active': false }
+];
+
+_.dropRightWhile(users, function(o) { return !o.active; });
+// => objects for ['barney']
+
+// The `_.matches` iteratee shorthand.
+_.dropRightWhile(users, { 'user': 'pebbles', 'active': false });
+// => objects for ['barney', 'fred']
+
+// The `_.matchesProperty` iteratee shorthand.
+_.dropRightWhile(users, ['active', false]);
+// => objects for ['barney']
+
+// The `_.property` iteratee shorthand.
+_.dropRightWhile(users, 'active');
+// => objects for ['barney', 'fred', 'pebbles']
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_dropwhilearray-predicate_identity"></a>`_.dropWhile(array, [predicate=_.identity])`
+<a href="#_dropwhilearray-predicate_identity">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L6305 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.dropwhile "See the npm package")
+
+Creates a slice of `array` excluding elements dropped from the beginning.
+Elements are dropped until `predicate` returns falsey. The predicate is
+invoked with three arguments: *(value, index, array)*.
+
+#### Since
+3.0.0
+#### Arguments
+1. `array` *(Array)*: The array to query.
+2. `[predicate=_.identity]` *(Array|Function|Object|string)*: The function invoked per iteration.
+
+#### Returns
+*(Array)*: Returns the slice of `array`.
+
+#### Example
+```js
+var users = [
+ { 'user': 'barney', 'active': false },
+ { 'user': 'fred', 'active': false },
+ { 'user': 'pebbles', 'active': true }
+];
+
+_.dropWhile(users, function(o) { return !o.active; });
+// => objects for ['pebbles']
+
+// The `_.matches` iteratee shorthand.
+_.dropWhile(users, { 'user': 'barney', 'active': false });
+// => objects for ['fred', 'pebbles']
+
+// The `_.matchesProperty` iteratee shorthand.
+_.dropWhile(users, ['active', false]);
+// => objects for ['pebbles']
+
+// The `_.property` iteratee shorthand.
+_.dropWhile(users, 'active');
+// => objects for ['barney', 'fred', 'pebbles']
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_fillarray-value-start0-endarraylength"></a>`_.fill(array, value, [start=0], [end=array.length])`
+<a href="#_fillarray-value-start0-endarraylength">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L6340 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.fill "See the npm package")
+
+Fills elements of `array` with `value` from `start` up to, but not
+including, `end`.
+<br>
+<br>
+**Note:** This method mutates `array`.
+
+#### Since
+3.2.0
+#### Arguments
+1. `array` *(Array)*: The array to fill.
+2. `value` *(*)*: The value to fill `array` with.
+3. `[start=0]` *(number)*: The start position.
+4. `[end=array.length]` *(number)*: The end position.
+
+#### Returns
+*(Array)*: Returns `array`.
+
+#### Example
+```js
+var array = [1, 2, 3];
+
+_.fill(array, 'a');
+console.log(array);
+// => ['a', 'a', 'a']
+
+_.fill(Array(3), 2);
+// => [2, 2, 2]
+
+_.fill([4, 6, 8, 10], '*', 1, 3);
+// => [4, '*', '*', 10]
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_findindexarray-predicate_identity"></a>`_.findIndex(array, [predicate=_.identity])`
+<a href="#_findindexarray-predicate_identity">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L6387 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.findindex "See the npm package")
+
+This method is like `_.find` except that it returns the index of the first
+element `predicate` returns truthy for instead of the element itself.
+
+#### Since
+1.1.0
+#### Arguments
+1. `array` *(Array)*: The array to search.
+2. `[predicate=_.identity]` *(Array|Function|Object|string)*: The function invoked per iteration.
+
+#### Returns
+*(number)*: Returns the index of the found element, else `-1`.
+
+#### Example
+```js
+var users = [
+ { 'user': 'barney', 'active': false },
+ { 'user': 'fred', 'active': false },
+ { 'user': 'pebbles', 'active': true }
+];
+
+_.findIndex(users, function(o) { return o.user == 'barney'; });
+// => 0
+
+// The `_.matches` iteratee shorthand.
+_.findIndex(users, { 'user': 'fred', 'active': false });
+// => 1
+
+// The `_.matchesProperty` iteratee shorthand.
+_.findIndex(users, ['active', false]);
+// => 0
+
+// The `_.property` iteratee shorthand.
+_.findIndex(users, 'active');
+// => 2
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_findlastindexarray-predicate_identity"></a>`_.findLastIndex(array, [predicate=_.identity])`
+<a href="#_findlastindexarray-predicate_identity">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L6428 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.findlastindex "See the npm package")
+
+This method is like `_.findIndex` except that it iterates over elements
+of `collection` from right to left.
+
+#### Since
+2.0.0
+#### Arguments
+1. `array` *(Array)*: The array to search.
+2. `[predicate=_.identity]` *(Array|Function|Object|string)*: The function invoked per iteration.
+
+#### Returns
+*(number)*: Returns the index of the found element, else `-1`.
+
+#### Example
+```js
+var users = [
+ { 'user': 'barney', 'active': true },
+ { 'user': 'fred', 'active': false },
+ { 'user': 'pebbles', 'active': false }
+];
+
+_.findLastIndex(users, function(o) { return o.user == 'pebbles'; });
+// => 2
+
+// The `_.matches` iteratee shorthand.
+_.findLastIndex(users, { 'user': 'barney', 'active': true });
+// => 0
+
+// The `_.matchesProperty` iteratee shorthand.
+_.findLastIndex(users, ['active', false]);
+// => 2
+
+// The `_.property` iteratee shorthand.
+_.findLastIndex(users, 'active');
+// => 0
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_flattenarray"></a>`_.flatten(array)`
+<a href="#_flattenarray">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L6448 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.flatten "See the npm package")
+
+Flattens `array` a single level deep.
+
+#### Since
+0.1.0
+#### Arguments
+1. `array` *(Array)*: The array to flatten.
+
+#### Returns
+*(Array)*: Returns the new flattened array.
+
+#### Example
+```js
+_.flatten([1, [2, [3, [4]], 5]]);
+// => [1, 2, [3, [4]], 5]
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_flattendeeparray"></a>`_.flattenDeep(array)`
+<a href="#_flattendeeparray">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L6467 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.flattendeep "See the npm package")
+
+Recursively flattens `array`.
+
+#### Since
+3.0.0
+#### Arguments
+1. `array` *(Array)*: The array to flatten.
+
+#### Returns
+*(Array)*: Returns the new flattened array.
+
+#### Example
+```js
+_.flattenDeep([1, [2, [3, [4]], 5]]);
+// => [1, 2, 3, 4, 5]
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_flattendeptharray-depth1"></a>`_.flattenDepth(array, [depth=1])`
+<a href="#_flattendeptharray-depth1">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L6492 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.flattendepth "See the npm package")
+
+Recursively flatten `array` up to `depth` times.
+
+#### Since
+4.4.0
+#### Arguments
+1. `array` *(Array)*: The array to flatten.
+2. `[depth=1]` *(number)*: The maximum recursion depth.
+
+#### Returns
+*(Array)*: Returns the new flattened array.
+
+#### Example
+```js
+var array = [1, [2, [3, [4]], 5]];
+
+_.flattenDepth(array, 1);
+// => [1, 2, [3, [4]], 5]
+
+_.flattenDepth(array, 2);
+// => [1, 2, 3, [4], 5]
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_frompairspairs"></a>`_.fromPairs(pairs)`
+<a href="#_frompairspairs">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L6516 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.frompairs "See the npm package")
+
+The inverse of `_.toPairs`; this method returns an object composed
+from key-value `pairs`.
+
+#### Since
+4.0.0
+#### Arguments
+1. `pairs` *(Array)*: The key-value pairs.
+
+#### Returns
+*(Object)*: Returns the new object.
+
+#### Example
+```js
+_.fromPairs([['fred', 30], ['barney', 40]]);
+// => { 'fred': 30, 'barney': 40 }
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_headarray"></a>`_.head(array)`
+<a href="#_headarray">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L6546 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.head "See the npm package")
+
+Gets the first element of `array`.
+
+#### Since
+0.1.0
+#### Aliases
+*_.first*
+
+#### Arguments
+1. `array` *(Array)*: The array to query.
+
+#### Returns
+*(*)*: Returns the first element of `array`.
+
+#### Example
+```js
+_.head([1, 2, 3]);
+// => 1
+
+_.head([]);
+// => undefined
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_indexofarray-value-fromindex0"></a>`_.indexOf(array, value, [fromIndex=0])`
+<a href="#_indexofarray-value-fromindex0">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L6573 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.indexof "See the npm package")
+
+Gets the index at which the first occurrence of `value` is found in `array`
+using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
+for equality comparisons. If `fromIndex` is negative, it's used as the
+offset from the end of `array`.
+
+#### Since
+0.1.0
+#### Arguments
+1. `array` *(Array)*: The array to search.
+2. `value` *(*)*: The value to search for.
+3. `[fromIndex=0]` *(number)*: The index to search from.
+
+#### Returns
+*(number)*: Returns the index of the matched value, else `-1`.
+
+#### Example
+```js
+_.indexOf([1, 2, 1, 2], 2);
+// => 1
+
+// Search from the `fromIndex`.
+_.indexOf([1, 2, 1, 2], 2, 2);
+// => 3
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_initialarray"></a>`_.initial(array)`
+<a href="#_initialarray">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L6599 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.initial "See the npm package")
+
+Gets all but the last element of `array`.
+
+#### Since
+0.1.0
+#### Arguments
+1. `array` *(Array)*: The array to query.
+
+#### Returns
+*(Array)*: Returns the slice of `array`.
+
+#### Example
+```js
+_.initial([1, 2, 3]);
+// => [1, 2]
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_intersectionarrays"></a>`_.intersection([arrays])`
+<a href="#_intersectionarrays">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L6620 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.intersection "See the npm package")
+
+Creates an array of unique values that are included in all given arrays
+using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
+for equality comparisons. The order of result values is determined by the
+order they occur in the first array.
+
+#### Since
+0.1.0
+#### Arguments
+1. `[arrays]` *(...Array)*: The arrays to inspect.
+
+#### Returns
+*(Array)*: Returns the new array of intersecting values.
+
+#### Example
+```js
+_.intersection([2, 1], [4, 2], [1, 2]);
+// => [2]
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_intersectionbyarrays-iteratee_identity"></a>`_.intersectionBy([arrays], [iteratee=_.identity])`
+<a href="#_intersectionbyarrays-iteratee_identity">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L6650 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.intersectionby "See the npm package")
+
+This method is like `_.intersection` except that it accepts `iteratee`
+which is invoked for each element of each `arrays` to generate the criterion
+by which they're compared. Result values are chosen from the first array.
+The iteratee is invoked with one argument: *(value)*.
+
+#### Since
+4.0.0
+#### Arguments
+1. `[arrays]` *(...Array)*: The arrays to inspect.
+2. `[iteratee=_.identity]` *(Array|Function|Object|string)*: The iteratee invoked per element.
+
+#### Returns
+*(Array)*: Returns the new array of intersecting values.
+
+#### Example
+```js
+_.intersectionBy([2.1, 1.2], [4.3, 2.4], Math.floor);
+// => [2.1]
+
+// The `_.property` iteratee shorthand.
+_.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
+// => [{ 'x': 1 }]
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_intersectionwitharrays-comparator"></a>`_.intersectionWith([arrays], [comparator])`
+<a href="#_intersectionwitharrays-comparator">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L6685 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.intersectionwith "See the npm package")
+
+This method is like `_.intersection` except that it accepts `comparator`
+which is invoked to compare elements of `arrays`. Result values are chosen
+from the first array. The comparator is invoked with two arguments:<br>
+*(arrVal, othVal)*.
+
+#### Since
+4.0.0
+#### Arguments
+1. `[arrays]` *(...Array)*: The arrays to inspect.
+2. `[comparator]` *(Function)*: The comparator invoked per element.
+
+#### Returns
+*(Array)*: Returns the new array of intersecting values.
+
+#### Example
+```js
+var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
+var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];
+
+_.intersectionWith(objects, others, _.isEqual);
+// => [{ 'x': 1, 'y': 2 }]
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_joinarray-separator-"></a>`_.join(array, [separator=','])`
+<a href="#_joinarray-separator-">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L6714 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.join "See the npm package")
+
+Converts all elements in `array` into a string separated by `separator`.
+
+#### Since
+4.0.0
+#### Arguments
+1. `array` *(Array)*: The array to convert.
+2. `[separator=',']` *(string)*: The element separator.
+
+#### Returns
+*(string)*: Returns the joined string.
+
+#### Example
+```js
+_.join(['a', 'b', 'c'], '~');
+// => 'a~b~c'
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_lastarray"></a>`_.last(array)`
+<a href="#_lastarray">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L6732 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.last "See the npm package")
+
+Gets the last element of `array`.
+
+#### Since
+0.1.0
+#### Arguments
+1. `array` *(Array)*: The array to query.
+
+#### Returns
+*(*)*: Returns the last element of `array`.
+
+#### Example
+```js
+_.last([1, 2, 3]);
+// => 3
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_lastindexofarray-value-fromindexarraylength-1"></a>`_.lastIndexOf(array, value, [fromIndex=array.length-1])`
+<a href="#_lastindexofarray-value-fromindexarraylength-1">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L6758 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.lastindexof "See the npm package")
+
+This method is like `_.indexOf` except that it iterates over elements of
+`array` from right to left.
+
+#### Since
+0.1.0
+#### Arguments
+1. `array` *(Array)*: The array to search.
+2. `value` *(*)*: The value to search for.
+3. `[fromIndex=array.length-1]` *(number)*: The index to search from.
+
+#### Returns
+*(number)*: Returns the index of the matched value, else `-1`.
+
+#### Example
+```js
+_.lastIndexOf([1, 2, 1, 2], 2);
+// => 3
+
+// Search from the `fromIndex`.
+_.lastIndexOf([1, 2, 1, 2], 2, 2);
+// => 1
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_ntharray-n0"></a>`_.nth(array, [n=0])`
+<a href="#_ntharray-n0">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L6804 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.nth "See the npm package")
+
+Gets the nth element of `array`. If `n` is negative, the nth element
+from the end is returned.
+
+#### Since
+4.11.0
+#### Arguments
+1. `array` *(Array)*: The array to query.
+2. `[n=0]` *(number)*: The index of the element to return.
+
+#### Returns
+*(*)*: Returns the nth element of `array`.
+
+#### Example
+```js
+var array = ['a', 'b', 'c', 'd'];
+
+_.nth(array, 1);
+// => 'b'
+
+_.nth(array, -2);
+// => 'c';
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_pullarray-values"></a>`_.pull(array, [values])`
+<a href="#_pullarray-values">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L6831 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.pull "See the npm package")
+
+Removes all given values from `array` using
+[`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
+for equality comparisons.
+<br>
+<br>
+**Note:** Unlike `_.without`, this method mutates `array`. Use `_.remove`
+to remove elements from an array by predicate.
+
+#### Since
+2.0.0
+#### Arguments
+1. `array` *(Array)*: The array to modify.
+2. `[values]` *(...*)*: The values to remove.
+
+#### Returns
+*(Array)*: Returns `array`.
+
+#### Example
+```js
+var array = [1, 2, 3, 1, 2, 3];
+
+_.pull(array, 2, 3);
+console.log(array);
+// => [1, 1]
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_pullallarray-values"></a>`_.pullAll(array, values)`
+<a href="#_pullallarray-values">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L6853 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.pullall "See the npm package")
+
+This method is like `_.pull` except that it accepts an array of values to remove.
+<br>
+<br>
+**Note:** Unlike `_.difference`, this method mutates `array`.
+
+#### Since
+4.0.0
+#### Arguments
+1. `array` *(Array)*: The array to modify.
+2. `values` *(Array)*: The values to remove.
+
+#### Returns
+*(Array)*: Returns `array`.
+
+#### Example
+```js
+var array = [1, 2, 3, 1, 2, 3];
+
+_.pullAll(array, [2, 3]);
+console.log(array);
+// => [1, 1]
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_pullallbyarray-values-iteratee_identity"></a>`_.pullAllBy(array, values, [iteratee=_.identity])`
+<a href="#_pullallbyarray-values-iteratee_identity">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L6883 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.pullallby "See the npm package")
+
+This method is like `_.pullAll` except that it accepts `iteratee` which is
+invoked for each element of `array` and `values` to generate the criterion
+by which they're compared. The iteratee is invoked with one argument: *(value)*.
+<br>
+<br>
+**Note:** Unlike `_.differenceBy`, this method mutates `array`.
+
+#### Since
+4.0.0
+#### Arguments
+1. `array` *(Array)*: The array to modify.
+2. `values` *(Array)*: The values to remove.
+3. `[iteratee=_.identity]` *(Array|Function|Object|string)*: The iteratee invoked per element.
+
+#### Returns
+*(Array)*: Returns `array`.
+
+#### Example
+```js
+var array = [{ 'x': 1 }, { 'x': 2 }, { 'x': 3 }, { 'x': 1 }];
+
+_.pullAllBy(array, [{ 'x': 1 }, { 'x': 3 }], 'x');
+console.log(array);
+// => [{ 'x': 2 }]
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_pullallwitharray-values-comparator"></a>`_.pullAllWith(array, values, [comparator])`
+<a href="#_pullallwitharray-values-comparator">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L6912 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.pullallwith "See the npm package")
+
+This method is like `_.pullAll` except that it accepts `comparator` which
+is invoked to compare elements of `array` to `values`. The comparator is
+invoked with two arguments: *(arrVal, othVal)*.
+<br>
+<br>
+**Note:** Unlike `_.differenceWith`, this method mutates `array`.
+
+#### Since
+4.6.0
+#### Arguments
+1. `array` *(Array)*: The array to modify.
+2. `values` *(Array)*: The values to remove.
+3. `[comparator]` *(Function)*: The comparator invoked per element.
+
+#### Returns
+*(Array)*: Returns `array`.
+
+#### Example
+```js
+var array = [{ 'x': 1, 'y': 2 }, { 'x': 3, 'y': 4 }, { 'x': 5, 'y': 6 }];
+
+_.pullAllWith(array, [{ 'x': 3, 'y': 4 }], _.isEqual);
+console.log(array);
+// => [{ 'x': 1, 'y': 2 }, { 'x': 5, 'y': 6 }]
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_pullatarray-indexes"></a>`_.pullAt(array, [indexes])`
+<a href="#_pullatarray-indexes">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L6942 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.pullat "See the npm package")
+
+Removes elements from `array` corresponding to `indexes` and returns an
+array of removed elements.
+<br>
+<br>
+**Note:** Unlike `_.at`, this method mutates `array`.
+
+#### Since
+3.0.0
+#### Arguments
+1. `array` *(Array)*: The array to modify.
+2. `[indexes]` *(...(number|number[]))*: The indexes of elements to remove.
+
+#### Returns
+*(Array)*: Returns the new array of removed elements.
+
+#### Example
+```js
+var array = [5, 10, 15, 20];
+var evens = _.pullAt(array, 1, 3);
+
+console.log(array);
+// => [5, 15]
+
+console.log(evens);
+// => [10, 20]
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_removearray-predicate_identity"></a>`_.remove(array, [predicate=_.identity])`
+<a href="#_removearray-predicate_identity">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L6984 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.remove "See the npm package")
+
+Removes all elements from `array` that `predicate` returns truthy for
+and returns an array of the removed elements. The predicate is invoked
+with three arguments: *(value, index, array)*.
+<br>
+<br>
+**Note:** Unlike `_.filter`, this method mutates `array`. Use `_.pull`
+to pull elements from an array by value.
+
+#### Since
+2.0.0
+#### Arguments
+1. `array` *(Array)*: The array to modify.
+2. `[predicate=_.identity]` *(Array|Function|Object|string)*: The function invoked per iteration.
+
+#### Returns
+*(Array)*: Returns the new array of removed elements.
+
+#### Example
+```js
+var array = [1, 2, 3, 4];
+var evens = _.remove(array, function(n) {
+ return n % 2 == 0;
+});
+
+console.log(array);
+// => [1, 3]
+
+console.log(evens);
+// => [2, 4]
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_reversearray"></a>`_.reverse(array)`
+<a href="#_reversearray">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L7028 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.reverse "See the npm package")
+
+Reverses `array` so that the first element becomes the last, the second
+element becomes the second to last, and so on.
+<br>
+<br>
+**Note:** This method mutates `array` and is based on
+[`Array#reverse`](https://mdn.io/Array/reverse).
+
+#### Since
+4.0.0
+#### Arguments
+1. `array` *(Array)*: The array to modify.
+
+#### Returns
+*(Array)*: Returns `array`.
+
+#### Example
+```js
+var array = [1, 2, 3];
+
+_.reverse(array);
+// => [3, 2, 1]
+
+console.log(array);
+// => [3, 2, 1]
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_slicearray-start0-endarraylength"></a>`_.slice(array, [start=0], [end=array.length])`
+<a href="#_slicearray-start0-endarraylength">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L7048 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.slice "See the npm package")
+
+Creates a slice of `array` from `start` up to, but not including, `end`.
+<br>
+<br>
+**Note:** This method is used instead of
+[`Array#slice`](https://mdn.io/Array/slice) to ensure dense arrays are
+returned.
+
+#### Since
+3.0.0
+#### Arguments
+1. `array` *(Array)*: The array to slice.
+2. `[start=0]` *(number)*: The start position.
+3. `[end=array.length]` *(number)*: The end position.
+
+#### Returns
+*(Array)*: Returns the slice of `array`.
+
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_sortedindexarray-value"></a>`_.sortedIndex(array, value)`
+<a href="#_sortedindexarray-value">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L7084 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.sortedindex "See the npm package")
+
+Uses a binary search to determine the lowest index at which `value`
+should be inserted into `array` in order to maintain its sort order.
+
+#### Since
+0.1.0
+#### Arguments
+1. `array` *(Array)*: The sorted array to inspect.
+2. `value` *(*)*: The value to evaluate.
+
+#### Returns
+*(number)*: Returns the index at which `value` should be inserted into `array`.
+
+#### Example
+```js
+_.sortedIndex([30, 50], 40);
+// => 1
+
+_.sortedIndex([4, 5], 4);
+// => 0
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_sortedindexbyarray-value-iteratee_identity"></a>`_.sortedIndexBy(array, value, [iteratee=_.identity])`
+<a href="#_sortedindexbyarray-value-iteratee_identity">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L7114 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.sortedindexby "See the npm package")
+
+This method is like `_.sortedIndex` except that it accepts `iteratee`
+which is invoked for `value` and each element of `array` to compute their
+sort ranking. The iteratee is invoked with one argument: *(value)*.
+
+#### Since
+4.0.0
+#### Arguments
+1. `array` *(Array)*: The sorted array to inspect.
+2. `value` *(*)*: The value to evaluate.
+3. `[iteratee=_.identity]` *(Array|Function|Object|string)*: The iteratee invoked per element.
+
+#### Returns
+*(number)*: Returns the index at which `value` should be inserted into `array`.
+
+#### Example
+```js
+var dict = { 'thirty': 30, 'forty': 40, 'fifty': 50 };
+
+_.sortedIndexBy(['thirty', 'fifty'], 'forty', _.propertyOf(dict));
+// => 1
+
+// The `_.property` iteratee shorthand.
+_.sortedIndexBy([{ 'x': 4 }, { 'x': 5 }], { 'x': 4 }, 'x');
+// => 0
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_sortedindexofarray-value"></a>`_.sortedIndexOf(array, value)`
+<a href="#_sortedindexofarray-value">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L7134 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.sortedindexof "See the npm package")
+
+This method is like `_.indexOf` except that it performs a binary
+search on a sorted `array`.
+
+#### Since
+4.0.0
+#### Arguments
+1. `array` *(Array)*: The array to search.
+2. `value` *(*)*: The value to search for.
+
+#### Returns
+*(number)*: Returns the index of the matched value, else `-1`.
+
+#### Example
+```js
+_.sortedIndexOf([1, 1, 2, 2], 2);
+// => 2
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_sortedlastindexarray-value"></a>`_.sortedLastIndex(array, value)`
+<a href="#_sortedlastindexarray-value">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L7163 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.sortedlastindex "See the npm package")
+
+This method is like `_.sortedIndex` except that it returns the highest
+index at which `value` should be inserted into `array` in order to
+maintain its sort order.
+
+#### Since
+3.0.0
+#### Arguments
+1. `array` *(Array)*: The sorted array to inspect.
+2. `value` *(*)*: The value to evaluate.
+
+#### Returns
+*(number)*: Returns the index at which `value` should be inserted into `array`.
+
+#### Example
+```js
+_.sortedLastIndex([4, 5], 4);
+// => 1
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_sortedlastindexbyarray-value-iteratee_identity"></a>`_.sortedLastIndexBy(array, value, [iteratee=_.identity])`
+<a href="#_sortedlastindexbyarray-value-iteratee_identity">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L7188 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.sortedlastindexby "See the npm package")
+
+This method is like `_.sortedLastIndex` except that it accepts `iteratee`
+which is invoked for `value` and each element of `array` to compute their
+sort ranking. The iteratee is invoked with one argument: *(value)*.
+
+#### Since
+4.0.0
+#### Arguments
+1. `array` *(Array)*: The sorted array to inspect.
+2. `value` *(*)*: The value to evaluate.
+3. `[iteratee=_.identity]` *(Array|Function|Object|string)*: The iteratee invoked per element.
+
+#### Returns
+*(number)*: Returns the index at which `value` should be inserted into `array`.
+
+#### Example
+```js
+// The `_.property` iteratee shorthand.
+_.sortedLastIndexBy([{ 'x': 4 }, { 'x': 5 }], { 'x': 4 }, 'x');
+// => 1
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_sortedlastindexofarray-value"></a>`_.sortedLastIndexOf(array, value)`
+<a href="#_sortedlastindexofarray-value">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L7208 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.sortedlastindexof "See the npm package")
+
+This method is like `_.lastIndexOf` except that it performs a binary
+search on a sorted `array`.
+
+#### Since
+4.0.0
+#### Arguments
+1. `array` *(Array)*: The array to search.
+2. `value` *(*)*: The value to search for.
+
+#### Returns
+*(number)*: Returns the index of the matched value, else `-1`.
+
+#### Example
+```js
+_.sortedLastIndexOf([1, 1, 2, 2], 2);
+// => 3
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_sorteduniqarray"></a>`_.sortedUniq(array)`
+<a href="#_sorteduniqarray">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L7234 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.sorteduniq "See the npm package")
+
+This method is like `_.uniq` except that it's designed and optimized
+for sorted arrays.
+
+#### Since
+4.0.0
+#### Arguments
+1. `array` *(Array)*: The array to inspect.
+
+#### Returns
+*(Array)*: Returns the new duplicate free array.
+
+#### Example
+```js
+_.sortedUniq([1, 1, 2]);
+// => [1, 2]
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_sorteduniqbyarray-iteratee"></a>`_.sortedUniqBy(array, [iteratee])`
+<a href="#_sorteduniqbyarray-iteratee">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L7256 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.sorteduniqby "See the npm package")
+
+This method is like `_.uniqBy` except that it's designed and optimized
+for sorted arrays.
+
+#### Since
+4.0.0
+#### Arguments
+1. `array` *(Array)*: The array to inspect.
+2. `[iteratee]` *(Function)*: The iteratee invoked per element.
+
+#### Returns
+*(Array)*: Returns the new duplicate free array.
+
+#### Example
+```js
+_.sortedUniqBy([1.1, 1.2, 2.3, 2.4], Math.floor);
+// => [1.1, 2.3]
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_tailarray"></a>`_.tail(array)`
+<a href="#_tailarray">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L7276 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.tail "See the npm package")
+
+Gets all but the first element of `array`.
+
+#### Since
+4.0.0
+#### Arguments
+1. `array` *(Array)*: The array to query.
+
+#### Returns
+*(Array)*: Returns the slice of `array`.
+
+#### Example
+```js
+_.tail([1, 2, 3]);
+// => [2, 3]
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_takearray-n1"></a>`_.take(array, [n=1])`
+<a href="#_takearray-n1">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L7305 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.take "See the npm package")
+
+Creates a slice of `array` with `n` elements taken from the beginning.
+
+#### Since
+0.1.0
+#### Arguments
+1. `array` *(Array)*: The array to query.
+2. `[n=1]` *(number)*: The number of elements to take.
+
+#### Returns
+*(Array)*: Returns the slice of `array`.
+
+#### Example
+```js
+_.take([1, 2, 3]);
+// => [1]
+
+_.take([1, 2, 3], 2);
+// => [1, 2]
+
+_.take([1, 2, 3], 5);
+// => [1, 2, 3]
+
+_.take([1, 2, 3], 0);
+// => []
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_takerightarray-n1"></a>`_.takeRight(array, [n=1])`
+<a href="#_takerightarray-n1">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L7338 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.takeright "See the npm package")
+
+Creates a slice of `array` with `n` elements taken from the end.
+
+#### Since
+3.0.0
+#### Arguments
+1. `array` *(Array)*: The array to query.
+2. `[n=1]` *(number)*: The number of elements to take.
+
+#### Returns
+*(Array)*: Returns the slice of `array`.
+
+#### Example
+```js
+_.takeRight([1, 2, 3]);
+// => [3]
+
+_.takeRight([1, 2, 3], 2);
+// => [2, 3]
+
+_.takeRight([1, 2, 3], 5);
+// => [1, 2, 3]
+
+_.takeRight([1, 2, 3], 0);
+// => []
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_takerightwhilearray-predicate_identity"></a>`_.takeRightWhile(array, [predicate=_.identity])`
+<a href="#_takerightwhilearray-predicate_identity">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L7384 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.takerightwhile "See the npm package")
+
+Creates a slice of `array` with elements taken from the end. Elements are
+taken until `predicate` returns falsey. The predicate is invoked with
+three arguments: *(value, index, array)*.
+
+#### Since
+3.0.0
+#### Arguments
+1. `array` *(Array)*: The array to query.
+2. `[predicate=_.identity]` *(Array|Function|Object|string)*: The function invoked per iteration.
+
+#### Returns
+*(Array)*: Returns the slice of `array`.
+
+#### Example
+```js
+var users = [
+ { 'user': 'barney', 'active': true },
+ { 'user': 'fred', 'active': false },
+ { 'user': 'pebbles', 'active': false }
+];
+
+_.takeRightWhile(users, function(o) { return !o.active; });
+// => objects for ['fred', 'pebbles']
+
+// The `_.matches` iteratee shorthand.
+_.takeRightWhile(users, { 'user': 'pebbles', 'active': false });
+// => objects for ['pebbles']
+
+// The `_.matchesProperty` iteratee shorthand.
+_.takeRightWhile(users, ['active', false]);
+// => objects for ['fred', 'pebbles']
+
+// The `_.property` iteratee shorthand.
+_.takeRightWhile(users, 'active');
+// => []
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_takewhilearray-predicate_identity"></a>`_.takeWhile(array, [predicate=_.identity])`
+<a href="#_takewhilearray-predicate_identity">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L7426 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.takewhile "See the npm package")
+
+Creates a slice of `array` with elements taken from the beginning. Elements
+are taken until `predicate` returns falsey. The predicate is invoked with
+three arguments: *(value, index, array)*.
+
+#### Since
+3.0.0
+#### Arguments
+1. `array` *(Array)*: The array to query.
+2. `[predicate=_.identity]` *(Array|Function|Object|string)*: The function invoked per iteration.
+
+#### Returns
+*(Array)*: Returns the slice of `array`.
+
+#### Example
+```js
+var users = [
+ { 'user': 'barney', 'active': false },
+ { 'user': 'fred', 'active': false},
+ { 'user': 'pebbles', 'active': true }
+];
+
+_.takeWhile(users, function(o) { return !o.active; });
+// => objects for ['barney', 'fred']
+
+// The `_.matches` iteratee shorthand.
+_.takeWhile(users, { 'user': 'barney', 'active': false });
+// => objects for ['barney']
+
+// The `_.matchesProperty` iteratee shorthand.
+_.takeWhile(users, ['active', false]);
+// => objects for ['barney', 'fred']
+
+// The `_.property` iteratee shorthand.
+_.takeWhile(users, 'active');
+// => []
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_unionarrays"></a>`_.union([arrays])`
+<a href="#_unionarrays">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L7448 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.union "See the npm package")
+
+Creates an array of unique values, in order, from all given arrays using
+[`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
+for equality comparisons.
+
+#### Since
+0.1.0
+#### Arguments
+1. `[arrays]` *(...Array)*: The arrays to inspect.
+
+#### Returns
+*(Array)*: Returns the new array of combined values.
+
+#### Example
+```js
+_.union([2, 1], [4, 2], [1, 2]);
+// => [2, 1, 4]
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_unionbyarrays-iteratee_identity"></a>`_.unionBy([arrays], [iteratee=_.identity])`
+<a href="#_unionbyarrays-iteratee_identity">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L7475 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.unionby "See the npm package")
+
+This method is like `_.union` except that it accepts `iteratee` which is
+invoked for each element of each `arrays` to generate the criterion by
+which uniqueness is computed. The iteratee is invoked with one argument:<br>
+*(value)*.
+
+#### Since
+4.0.0
+#### Arguments
+1. `[arrays]` *(...Array)*: The arrays to inspect.
+2. `[iteratee=_.identity]` *(Array|Function|Object|string)*: The iteratee invoked per element.
+
+#### Returns
+*(Array)*: Returns the new array of combined values.
+
+#### Example
+```js
+_.unionBy([2.1, 1.2], [4.3, 2.4], Math.floor);
+// => [2.1, 1.2, 4.3]
+
+// The `_.property` iteratee shorthand.
+_.unionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
+// => [{ 'x': 1 }, { 'x': 2 }]
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_unionwitharrays-comparator"></a>`_.unionWith([arrays], [comparator])`
+<a href="#_unionwitharrays-comparator">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L7503 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.unionwith "See the npm package")
+
+This method is like `_.union` except that it accepts `comparator` which
+is invoked to compare elements of `arrays`. The comparator is invoked
+with two arguments: *(arrVal, othVal)*.
+
+#### Since
+4.0.0
+#### Arguments
+1. `[arrays]` *(...Array)*: The arrays to inspect.
+2. `[comparator]` *(Function)*: The comparator invoked per element.
+
+#### Returns
+*(Array)*: Returns the new array of combined values.
+
+#### Example
+```js
+var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
+var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];
+
+_.unionWith(objects, others, _.isEqual);
+// => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_uniqarray"></a>`_.uniq(array)`
+<a href="#_uniqarray">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L7528 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.uniq "See the npm package")
+
+Creates a duplicate-free version of an array, using
+[`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
+for equality comparisons, in which only the first occurrence of each
+element is kept.
+
+#### Since
+0.1.0
+#### Arguments
+1. `array` *(Array)*: The array to inspect.
+
+#### Returns
+*(Array)*: Returns the new duplicate free array.
+
+#### Example
+```js
+_.uniq([2, 1, 2]);
+// => [2, 1]
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_uniqbyarray-iteratee_identity"></a>`_.uniqBy(array, [iteratee=_.identity])`
+<a href="#_uniqbyarray-iteratee_identity">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L7556 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.uniqby "See the npm package")
+
+This method is like `_.uniq` except that it accepts `iteratee` which is
+invoked for each element in `array` to generate the criterion by which
+uniqueness is computed. The iteratee is invoked with one argument: *(value)*.
+
+#### Since
+4.0.0
+#### Arguments
+1. `array` *(Array)*: The array to inspect.
+2. `[iteratee=_.identity]` *(Array|Function|Object|string)*: The iteratee invoked per element.
+
+#### Returns
+*(Array)*: Returns the new duplicate free array.
+
+#### Example
+```js
+_.uniqBy([2.1, 1.2, 2.3], Math.floor);
+// => [2.1, 1.2]
+
+// The `_.property` iteratee shorthand.
+_.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x');
+// => [{ 'x': 1 }, { 'x': 2 }]
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_uniqwitharray-comparator"></a>`_.uniqWith(array, [comparator])`
+<a href="#_uniqwitharray-comparator">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L7581 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.uniqwith "See the npm package")
+
+This method is like `_.uniq` except that it accepts `comparator` which
+is invoked to compare elements of `array`. The comparator is invoked with
+two arguments: *(arrVal, othVal)*.
+
+#### Since
+4.0.0
+#### Arguments
+1. `array` *(Array)*: The array to inspect.
+2. `[comparator]` *(Function)*: The comparator invoked per element.
+
+#### Returns
+*(Array)*: Returns the new duplicate free array.
+
+#### Example
+```js
+var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 2 }];
+
+_.uniqWith(objects, _.isEqual);
+// => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_unziparray"></a>`_.unzip(array)`
+<a href="#_unziparray">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L7606 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.unzip "See the npm package")
+
+This method is like `_.zip` except that it accepts an array of grouped
+elements and creates an array regrouping the elements to their pre-zip
+configuration.
+
+#### Since
+1.2.0
+#### Arguments
+1. `array` *(Array)*: The array of grouped elements to process.
+
+#### Returns
+*(Array)*: Returns the new array of regrouped elements.
+
+#### Example
+```js
+var zipped = _.zip(['fred', 'barney'], [30, 40], [true, false]);
+// => [['fred', 30, true], ['barney', 40, false]]
+
+_.unzip(zipped);
+// => [['fred', 'barney'], [30, 40], [true, false]]
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_unzipwitharray-iteratee_identity"></a>`_.unzipWith(array, [iteratee=_.identity])`
+<a href="#_unzipwitharray-iteratee_identity">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L7643 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.unzipwith "See the npm package")
+
+This method is like `_.unzip` except that it accepts `iteratee` to specify
+how regrouped values should be combined. The iteratee is invoked with the
+elements of each group: *(...group)*.
+
+#### Since
+3.8.0
+#### Arguments
+1. `array` *(Array)*: The array of grouped elements to process.
+2. `[iteratee=_.identity]` *(Function)*: The function to combine regrouped values.
+
+#### Returns
+*(Array)*: Returns the new array of regrouped elements.
+
+#### Example
+```js
+var zipped = _.zip([1, 2], [10, 20], [100, 200]);
+// => [[1, 10, 100], [2, 20, 200]]
+
+_.unzipWith(zipped, _.add);
+// => [3, 30, 300]
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_withoutarray-values"></a>`_.without(array, [values])`
+<a href="#_withoutarray-values">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L7674 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.without "See the npm package")
+
+Creates an array excluding all given values using
+[`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
+for equality comparisons.
+
+#### Since
+0.1.0
+#### Arguments
+1. `array` *(Array)*: The array to filter.
+2. `[values]` *(...*)*: The values to exclude.
+
+#### Returns
+*(Array)*: Returns the new array of filtered values.
+
+#### Example
+```js
+_.without([1, 2, 1, 3], 1, 2);
+// => [3]
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_xorarrays"></a>`_.xor([arrays])`
+<a href="#_xorarrays">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L7698 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.xor "See the npm package")
+
+Creates an array of unique values that is the
+[symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference)
+of the given arrays. The order of result values is determined by the order
+they occur in the arrays.
+
+#### Since
+2.4.0
+#### Arguments
+1. `[arrays]` *(...Array)*: The arrays to inspect.
+
+#### Returns
+*(Array)*: Returns the new array of values.
+
+#### Example
+```js
+_.xor([2, 1], [4, 2]);
+// => [1, 4]
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_xorbyarrays-iteratee_identity"></a>`_.xorBy([arrays], [iteratee=_.identity])`
+<a href="#_xorbyarrays-iteratee_identity">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L7725 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.xorby "See the npm package")
+
+This method is like `_.xor` except that it accepts `iteratee` which is
+invoked for each element of each `arrays` to generate the criterion by
+which by which they're compared. The iteratee is invoked with one argument:<br>
+*(value)*.
+
+#### Since
+4.0.0
+#### Arguments
+1. `[arrays]` *(...Array)*: The arrays to inspect.
+2. `[iteratee=_.identity]` *(Array|Function|Object|string)*: The iteratee invoked per element.
+
+#### Returns
+*(Array)*: Returns the new array of values.
+
+#### Example
+```js
+_.xorBy([2.1, 1.2], [4.3, 2.4], Math.floor);
+// => [1.2, 4.3]
+
+// The `_.property` iteratee shorthand.
+_.xorBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
+// => [{ 'x': 2 }]
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_xorwitharrays-comparator"></a>`_.xorWith([arrays], [comparator])`
+<a href="#_xorwitharrays-comparator">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L7753 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.xorwith "See the npm package")
+
+This method is like `_.xor` except that it accepts `comparator` which is
+invoked to compare elements of `arrays`. The comparator is invoked with
+two arguments: *(arrVal, othVal)*.
+
+#### Since
+4.0.0
+#### Arguments
+1. `[arrays]` *(...Array)*: The arrays to inspect.
+2. `[comparator]` *(Function)*: The comparator invoked per element.
+
+#### Returns
+*(Array)*: Returns the new array of values.
+
+#### Example
+```js
+var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
+var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];
+
+_.xorWith(objects, others, _.isEqual);
+// => [{ 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_ziparrays"></a>`_.zip([arrays])`
+<a href="#_ziparrays">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L7777 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.zip "See the npm package")
+
+Creates an array of grouped elements, the first of which contains the
+first elements of the given arrays, the second of which contains the
+second elements of the given arrays, and so on.
+
+#### Since
+0.1.0
+#### Arguments
+1. `[arrays]` *(...Array)*: The arrays to process.
+
+#### Returns
+*(Array)*: Returns the new array of grouped elements.
+
+#### Example
+```js
+_.zip(['fred', 'barney'], [30, 40], [true, false]);
+// => [['fred', 30, true], ['barney', 40, false]]
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_zipobjectprops-values"></a>`_.zipObject([props=[]], [values=[]])`
+<a href="#_zipobjectprops-values">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L7795 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.zipobject "See the npm package")
+
+This method is like `_.fromPairs` except that it accepts two arrays,
+one of property identifiers and one of corresponding values.
+
+#### Since
+0.4.0
+#### Arguments
+1. `[props=[]]` *(Array)*: The property identifiers.
+2. `[values=[]]` *(Array)*: The property values.
+
+#### Returns
+*(Object)*: Returns the new object.
+
+#### Example
+```js
+_.zipObject(['a', 'b'], [1, 2]);
+// => { 'a': 1, 'b': 2 }
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_zipobjectdeepprops-values"></a>`_.zipObjectDeep([props=[]], [values=[]])`
+<a href="#_zipobjectdeepprops-values">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L7814 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.zipobjectdeep "See the npm package")
+
+This method is like `_.zipObject` except that it supports property paths.
+
+#### Since
+4.1.0
+#### Arguments
+1. `[props=[]]` *(Array)*: The property identifiers.
+2. `[values=[]]` *(Array)*: The property values.
+
+#### Returns
+*(Object)*: Returns the new object.
+
+#### Example
+```js
+_.zipObjectDeep(['a.b[0].c', 'a.b[1].d'], [1, 2]);
+// => { 'a': { 'b': [{ 'c': 1 }, { 'd': 2 }] } }
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_zipwitharrays-iteratee_identity"></a>`_.zipWith([arrays], [iteratee=_.identity])`
+<a href="#_zipwitharrays-iteratee_identity">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L7837 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.zipwith "See the npm package")
+
+This method is like `_.zip` except that it accepts `iteratee` to specify
+how grouped values should be combined. The iteratee is invoked with the
+elements of each group: *(...group)*.
+
+#### Since
+3.8.0
+#### Arguments
+1. `[arrays]` *(...Array)*: The arrays to process.
+2. `[iteratee=_.identity]` *(Function)*: The function to combine grouped values.
+
+#### Returns
+*(Array)*: Returns the new array of grouped elements.
+
+#### Example
+```js
+_.zipWith([1, 2], [10, 20], [100, 200], function(a, b, c) {
+ return a + b + c;
+});
+// => [111, 222]
+```
+* * *
+
+<!-- /div -->
+
+<!-- /div -->
+
+<!-- div -->
+
+## `“Collection” Methods`
+
+<!-- div -->
+
+### <a id="_countbycollection-iteratee_identity"></a>`_.countBy(collection, [iteratee=_.identity])`
+<a href="#_countbycollection-iteratee_identity">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L8220 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.countby "See the npm package")
+
+Creates an object composed of keys generated from the results of running
+each element of `collection` thru `iteratee`. The corresponding value of
+each key is the number of times the key was returned by `iteratee`. The
+iteratee is invoked with one argument: *(value)*.
+
+#### Since
+0.5.0
+#### Arguments
+1. `collection` *(Array|Object)*: The collection to iterate over.
+2. `[iteratee=_.identity]` *(Array|Function|Object|string)*: The iteratee to transform keys.
+
+#### Returns
+*(Object)*: Returns the composed aggregate object.
+
+#### Example
+```js
+_.countBy([6.1, 4.2, 6.3], Math.floor);
+// => { '4': 1, '6': 2 }
+
+_.countBy(['one', 'two', 'three'], 'length');
+// => { '3': 2, '5': 1 }
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_everycollection-predicate_identity"></a>`_.every(collection, [predicate=_.identity])`
+<a href="#_everycollection-predicate_identity">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L8261 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.every "See the npm package")
+
+Checks if `predicate` returns truthy for **all** elements of `collection`.
+Iteration is stopped once `predicate` returns falsey. The predicate is
+invoked with three arguments: *(value, index|key, collection)*.
+
+#### Since
+0.1.0
+#### Arguments
+1. `collection` *(Array|Object)*: The collection to iterate over.
+2. `[predicate=_.identity]` *(Array|Function|Object|string)*: The function invoked per iteration.
+
+#### Returns
+*(boolean)*: Returns `true` if all elements pass the predicate check, else `false`.
+
+#### Example
+```js
+_.every([true, 1, null, 'yes'], Boolean);
+// => false
+
+var users = [
+ { 'user': 'barney', 'age': 36, 'active': false },
+ { 'user': 'fred', 'age': 40, 'active': false }
+];
+
+// The `_.matches` iteratee shorthand.
+_.every(users, { 'user': 'barney', 'active': false });
+// => false
+
+// The `_.matchesProperty` iteratee shorthand.
+_.every(users, ['active', false]);
+// => true
+
+// The `_.property` iteratee shorthand.
+_.every(users, 'active');
+// => false
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_filtercollection-predicate_identity"></a>`_.filter(collection, [predicate=_.identity])`
+<a href="#_filtercollection-predicate_identity">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L8305 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.filter "See the npm package")
+
+Iterates over elements of `collection`, returning an array of all elements
+`predicate` returns truthy for. The predicate is invoked with three
+arguments: *(value, index|key, collection)*.
+
+#### Since
+0.1.0
+#### Arguments
+1. `collection` *(Array|Object)*: The collection to iterate over.
+2. `[predicate=_.identity]` *(Array|Function|Object|string)*: The function invoked per iteration.
+
+#### Returns
+*(Array)*: Returns the new filtered array.
+
+#### Example
+```js
+var users = [
+ { 'user': 'barney', 'age': 36, 'active': true },
+ { 'user': 'fred', 'age': 40, 'active': false }
+];
+
+_.filter(users, function(o) { return !o.active; });
+// => objects for ['fred']
+
+// The `_.matches` iteratee shorthand.
+_.filter(users, { 'age': 36, 'active': true });
+// => objects for ['barney']
+
+// The `_.matchesProperty` iteratee shorthand.
+_.filter(users, ['active', false]);
+// => objects for ['fred']
+
+// The `_.property` iteratee shorthand.
+_.filter(users, 'active');
+// => objects for ['barney']
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_findcollection-predicate_identity"></a>`_.find(collection, [predicate=_.identity])`
+<a href="#_findcollection-predicate_identity">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L8346 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.find "See the npm package")
+
+Iterates over elements of `collection`, returning the first element
+`predicate` returns truthy for. The predicate is invoked with three
+arguments: *(value, index|key, collection)*.
+
+#### Since
+0.1.0
+#### Arguments
+1. `collection` *(Array|Object)*: The collection to search.
+2. `[predicate=_.identity]` *(Array|Function|Object|string)*: The function invoked per iteration.
+
+#### Returns
+*(*)*: Returns the matched element, else `undefined`.
+
+#### Example
+```js
+var users = [
+ { 'user': 'barney', 'age': 36, 'active': true },
+ { 'user': 'fred', 'age': 40, 'active': false },
+ { 'user': 'pebbles', 'age': 1, 'active': true }
+];
+
+_.find(users, function(o) { return o.age < 40; });
+// => object for 'barney'
+
+// The `_.matches` iteratee shorthand.
+_.find(users, { 'age': 1, 'active': true });
+// => object for 'pebbles'
+
+// The `_.matchesProperty` iteratee shorthand.
+_.find(users, ['active', false]);
+// => object for 'fred'
+
+// The `_.property` iteratee shorthand.
+_.find(users, 'active');
+// => object for 'barney'
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_findlastcollection-predicate_identity"></a>`_.findLast(collection, [predicate=_.identity])`
+<a href="#_findlastcollection-predicate_identity">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L8374 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.findlast "See the npm package")
+
+This method is like `_.find` except that it iterates over elements of
+`collection` from right to left.
+
+#### Since
+2.0.0
+#### Arguments
+1. `collection` *(Array|Object)*: The collection to search.
+2. `[predicate=_.identity]` *(Array|Function|Object|string)*: The function invoked per iteration.
+
+#### Returns
+*(*)*: Returns the matched element, else `undefined`.
+
+#### Example
+```js
+_.findLast([1, 2, 3, 4], function(n) {
+ return n % 2 == 1;
+});
+// => 3
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_flatmapcollection-iteratee_identity"></a>`_.flatMap(collection, [iteratee=_.identity])`
+<a href="#_flatmapcollection-iteratee_identity">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L8405 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.flatmap "See the npm package")
+
+Creates a flattened array of values by running each element in `collection`
+thru `iteratee` and flattening the mapped results. The iteratee is invoked
+with three arguments: *(value, index|key, collection)*.
+
+#### Since
+4.0.0
+#### Arguments
+1. `collection` *(Array|Object)*: The collection to iterate over.
+2. `[iteratee=_.identity]` *(Array|Function|Object|string)*: The function invoked per iteration.
+
+#### Returns
+*(Array)*: Returns the new flattened array.
+
+#### Example
+```js
+function duplicate(n) {
+ return [n, n];
+}
+
+_.flatMap([1, 2], duplicate);
+// => [1, 1, 2, 2]
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_flatmapdeepcollection-iteratee_identity"></a>`_.flatMapDeep(collection, [iteratee=_.identity])`
+<a href="#_flatmapdeepcollection-iteratee_identity">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L8430 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.flatmapdeep "See the npm package")
+
+This method is like `_.flatMap` except that it recursively flattens the
+mapped results.
+
+#### Since
+4.7.0
+#### Arguments
+1. `collection` *(Array|Object)*: The collection to iterate over.
+2. `[iteratee=_.identity]` *(Array|Function|Object|string)*: The function invoked per iteration.
+
+#### Returns
+*(Array)*: Returns the new flattened array.
+
+#### Example
+```js
+function duplicate(n) {
+ return [[[n, n]]];
+}
+
+_.flatMapDeep([1, 2], duplicate);
+// => [1, 1, 2, 2]
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_flatmapdepthcollection-iteratee_identity-depth1"></a>`_.flatMapDepth(collection, [iteratee=_.identity], [depth=1])`
+<a href="#_flatmapdepthcollection-iteratee_identity-depth1">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L8456 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.flatmapdepth "See the npm package")
+
+This method is like `_.flatMap` except that it recursively flattens the
+mapped results up to `depth` times.
+
+#### Since
+4.7.0
+#### Arguments
+1. `collection` *(Array|Object)*: The collection to iterate over.
+2. `[iteratee=_.identity]` *(Array|Function|Object|string)*: The function invoked per iteration.
+3. `[depth=1]` *(number)*: The maximum recursion depth.
+
+#### Returns
+*(Array)*: Returns the new flattened array.
+
+#### Example
+```js
+function duplicate(n) {
+ return [[[n, n]]];
+}
+
+_.flatMapDepth([1, 2], duplicate, 2);
+// => [[1, 1], [2, 2]]
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_foreachcollection-iteratee_identity"></a>`_.forEach(collection, [iteratee=_.identity])`
+<a href="#_foreachcollection-iteratee_identity">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L8491 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.foreach "See the npm package")
+
+Iterates over elements of `collection` and invokes `iteratee` for each element.
+The iteratee is invoked with three arguments: *(value, index|key, collection)*.
+Iteratee functions may exit iteration early by explicitly returning `false`.
+<br>
+<br>
+**Note:** As with other "Collections" methods, objects with a "length"
+property are iterated like arrays. To avoid this behavior use `_.forIn`
+or `_.forOwn` for object iteration.
+
+#### Since
+0.1.0
+#### Aliases
+*_.each*
+
+#### Arguments
+1. `collection` *(Array|Object)*: The collection to iterate over.
+2. `[iteratee=_.identity]` *(Function)*: The function invoked per iteration.
+
+#### Returns
+*(*)*: Returns `collection`.
+
+#### Example
+```js
+_([1, 2]).forEach(function(value) {
+ console.log(value);
+});
+// => Logs `1` then `2`.
+
+_.forEach({ 'a': 1, 'b': 2 }, function(value, key) {
+ console.log(key);
+});
+// => Logs 'a' then 'b' (iteration order is not guaranteed).
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_foreachrightcollection-iteratee_identity"></a>`_.forEachRight(collection, [iteratee=_.identity])`
+<a href="#_foreachrightcollection-iteratee_identity">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L8517 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.foreachright "See the npm package")
+
+This method is like `_.forEach` except that it iterates over elements of
+`collection` from right to left.
+
+#### Since
+2.0.0
+#### Aliases
+*_.eachRight*
+
+#### Arguments
+1. `collection` *(Array|Object)*: The collection to iterate over.
+2. `[iteratee=_.identity]` *(Function)*: The function invoked per iteration.
+
+#### Returns
+*(*)*: Returns `collection`.
+
+#### Example
+```js
+_.forEachRight([1, 2], function(value) {
+ console.log(value);
+});
+// => Logs `2` then `1`.
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_groupbycollection-iteratee_identity"></a>`_.groupBy(collection, [iteratee=_.identity])`
+<a href="#_groupbycollection-iteratee_identity">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L8547 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.groupby "See the npm package")
+
+Creates an object composed of keys generated from the results of running
+each element of `collection` thru `iteratee`. The order of grouped values
+is determined by the order they occur in `collection`. The corresponding
+value of each key is an array of elements responsible for generating the
+key. The iteratee is invoked with one argument: *(value)*.
+
+#### Since
+0.1.0
+#### Arguments
+1. `collection` *(Array|Object)*: The collection to iterate over.
+2. `[iteratee=_.identity]` *(Array|Function|Object|string)*: The iteratee to transform keys.
+
+#### Returns
+*(Object)*: Returns the composed aggregate object.
+
+#### Example
+```js
+_.groupBy([6.1, 4.2, 6.3], Math.floor);
+// => { '4': [4.2], '6': [6.1, 6.3] }
+
+// The `_.property` iteratee shorthand.
+_.groupBy(['one', 'two', 'three'], 'length');
+// => { '3': ['one', 'two'], '5': ['three'] }
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_includescollection-value-fromindex0"></a>`_.includes(collection, value, [fromIndex=0])`
+<a href="#_includescollection-value-fromindex0">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L8585 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.includes "See the npm package")
+
+Checks if `value` is in `collection`. If `collection` is a string, it's
+checked for a substring of `value`, otherwise
+[`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
+is used for equality comparisons. If `fromIndex` is negative, it's used as
+the offset from the end of `collection`.
+
+#### Since
+0.1.0
+#### Arguments
+1. `collection` *(Array|Object|string)*: The collection to search.
+2. `value` *(*)*: The value to search for.
+3. `[fromIndex=0]` *(number)*: The index to search from.
+
+#### Returns
+*(boolean)*: Returns `true` if `value` is found, else `false`.
+
+#### Example
+```js
+_.includes([1, 2, 3], 1);
+// => true
+
+_.includes([1, 2, 3], 1, 2);
+// => false
+
+_.includes({ 'user': 'fred', 'age': 40 }, 'fred');
+// => true
+
+_.includes('pebbles', 'eb');
+// => true
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_invokemapcollection-path-args"></a>`_.invokeMap(collection, path, [args])`
+<a href="#_invokemapcollection-path-args">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L8621 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.invokemap "See the npm package")
+
+Invokes the method at `path` of each element in `collection`, returning
+an array of the results of each invoked method. Any additional arguments
+are provided to each invoked method. If `methodName` is a function, it's
+invoked for and `this` bound to, each element in `collection`.
+
+#### Since
+4.0.0
+#### Arguments
+1. `collection` *(Array|Object)*: The collection to iterate over.
+2. `path` *(Array|Function|string)*: The path of the method to invoke or the function invoked per iteration.
+3. `[args]` *(...*)*: The arguments to invoke each method with.
+
+#### Returns
+*(Array)*: Returns the array of results.
+
+#### Example
+```js
+_.invokeMap([[5, 1, 7], [3, 2, 1]], 'sort');
+// => [[1, 5, 7], [1, 2, 3]]
+
+_.invokeMap([123, 456], String.prototype.split, '');
+// => [['1', '2', '3'], ['4', '5', '6']]
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_keybycollection-iteratee_identity"></a>`_.keyBy(collection, [iteratee=_.identity])`
+<a href="#_keybycollection-iteratee_identity">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L8663 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.keyby "See the npm package")
+
+Creates an object composed of keys generated from the results of running
+each element of `collection` thru `iteratee`. The corresponding value of
+each key is the last element responsible for generating the key. The
+iteratee is invoked with one argument: *(value)*.
+
+#### Since
+4.0.0
+#### Arguments
+1. `collection` *(Array|Object)*: The collection to iterate over.
+2. `[iteratee=_.identity]` *(Array|Function|Object|string)*: The iteratee to transform keys.
+
+#### Returns
+*(Object)*: Returns the composed aggregate object.
+
+#### Example
+```js
+var array = [
+ { 'dir': 'left', 'code': 97 },
+ { 'dir': 'right', 'code': 100 }
+];
+
+_.keyBy(array, function(o) {
+ return String.fromCharCode(o.code);
+});
+// => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } }
+
+_.keyBy(array, 'dir');
+// => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } }
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_mapcollection-iteratee_identity"></a>`_.map(collection, [iteratee=_.identity])`
+<a href="#_mapcollection-iteratee_identity">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L8710 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.map "See the npm package")
+
+Creates an array of values by running each element in `collection` thru
+`iteratee`. The iteratee is invoked with three arguments:<br>
+*(value, index|key, collection)*.
+<br>
+<br>
+Many lodash methods are guarded to work as iteratees for methods like
+`_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`.
+<br>
+<br>
+The guarded methods are:<br>
+`ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`,
+`fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`,
+`sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`,
+`template`, `trim`, `trimEnd`, `trimStart`, and `words`
+
+#### Since
+0.1.0
+#### Arguments
+1. `collection` *(Array|Object)*: The collection to iterate over.
+2. `[iteratee=_.identity]` *(Array|Function|Object|string)*: The function invoked per iteration.
+
+#### Returns
+*(Array)*: Returns the new mapped array.
+
+#### Example
+```js
+function square(n) {
+ return n * n;
+}
+
+_.map([4, 8], square);
+// => [16, 64]
+
+_.map({ 'a': 4, 'b': 8 }, square);
+// => [16, 64] (iteration order is not guaranteed)
+
+var users = [
+ { 'user': 'barney' },
+ { 'user': 'fred' }
+];
+
+// The `_.property` iteratee shorthand.
+_.map(users, 'user');
+// => ['barney', 'fred']
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_orderbycollection-iteratees_identity-orders"></a>`_.orderBy(collection, [iteratees=[_.identity]], [orders])`
+<a href="#_orderbycollection-iteratees_identity-orders">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L8744 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.orderby "See the npm package")
+
+This method is like `_.sortBy` except that it allows specifying the sort
+orders of the iteratees to sort by. If `orders` is unspecified, all values
+are sorted in ascending order. Otherwise, specify an order of "desc" for
+descending or "asc" for ascending sort order of corresponding values.
+
+#### Since
+4.0.0
+#### Arguments
+1. `collection` *(Array|Object)*: The collection to iterate over.
+2. `[iteratees=[_.identity]]` *(Array[]|Function[]|Object[]|string[])*: The iteratees to sort by.
+3. `[orders]` *(string[])*: The sort orders of `iteratees`.
+
+#### Returns
+*(Array)*: Returns the new sorted array.
+
+#### Example
+```js
+var users = [
+ { 'user': 'fred', 'age': 48 },
+ { 'user': 'barney', 'age': 34 },
+ { 'user': 'fred', 'age': 40 },
+ { 'user': 'barney', 'age': 36 }
+];
+
+// Sort by `user` in ascending order and by `age` in descending order.
+_.orderBy(users, ['user', 'age'], ['asc', 'desc']);
+// => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_partitioncollection-predicate_identity"></a>`_.partition(collection, [predicate=_.identity])`
+<a href="#_partitioncollection-predicate_identity">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L8795 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.partition "See the npm package")
+
+Creates an array of elements split into two groups, the first of which
+contains elements `predicate` returns truthy for, the second of which
+contains elements `predicate` returns falsey for. The predicate is
+invoked with one argument: *(value)*.
+
+#### Since
+3.0.0
+#### Arguments
+1. `collection` *(Array|Object)*: The collection to iterate over.
+2. `[predicate=_.identity]` *(Array|Function|Object|string)*: The function invoked per iteration.
+
+#### Returns
+*(Array)*: Returns the array of grouped elements.
+
+#### Example
+```js
+var users = [
+ { 'user': 'barney', 'age': 36, 'active': false },
+ { 'user': 'fred', 'age': 40, 'active': true },
+ { 'user': 'pebbles', 'age': 1, 'active': false }
+];
+
+_.partition(users, function(o) { return o.active; });
+// => objects for [['fred'], ['barney', 'pebbles']]
+
+// The `_.matches` iteratee shorthand.
+_.partition(users, { 'age': 1, 'active': false });
+// => objects for [['pebbles'], ['barney', 'fred']]
+
+// The `_.matchesProperty` iteratee shorthand.
+_.partition(users, ['active', false]);
+// => objects for [['barney', 'pebbles'], ['fred']]
+
+// The `_.property` iteratee shorthand.
+_.partition(users, 'active');
+// => objects for [['fred'], ['barney', 'pebbles']]
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_reducecollection-iteratee_identity-accumulator"></a>`_.reduce(collection, [iteratee=_.identity], [accumulator])`
+<a href="#_reducecollection-iteratee_identity-accumulator">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L8836 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.reduce "See the npm package")
+
+Reduces `collection` to a value which is the accumulated result of running
+each element in `collection` thru `iteratee`, where each successive
+invocation is supplied the return value of the previous. If `accumulator`
+is not given, the first element of `collection` is used as the initial
+value. The iteratee is invoked with four arguments:<br>
+*(accumulator, value, index|key, collection)*.
+<br>
+<br>
+Many lodash methods are guarded to work as iteratees for methods like
+`_.reduce`, `_.reduceRight`, and `_.transform`.
+<br>
+<br>
+The guarded methods are:<br>
+`assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`,
+and `sortBy`
+
+#### Since
+0.1.0
+#### Arguments
+1. `collection` *(Array|Object)*: The collection to iterate over.
+2. `[iteratee=_.identity]` *(Function)*: The function invoked per iteration.
+3. `[accumulator]` *(*)*: The initial value.
+
+#### Returns
+*(*)*: Returns the accumulated value.
+
+#### Example
+```js
+_.reduce([1, 2], function(sum, n) {
+ return sum + n;
+}, 0);
+// => 3
+
+_.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {
+ (result[value] || (result[value] = [])).push(key);
+ return result;
+}, {});
+// => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed)
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_reducerightcollection-iteratee_identity-accumulator"></a>`_.reduceRight(collection, [iteratee=_.identity], [accumulator])`
+<a href="#_reducerightcollection-iteratee_identity-accumulator">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L8865 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.reduceright "See the npm package")
+
+This method is like `_.reduce` except that it iterates over elements of
+`collection` from right to left.
+
+#### Since
+0.1.0
+#### Arguments
+1. `collection` *(Array|Object)*: The collection to iterate over.
+2. `[iteratee=_.identity]` *(Function)*: The function invoked per iteration.
+3. `[accumulator]` *(*)*: The initial value.
+
+#### Returns
+*(*)*: Returns the accumulated value.
+
+#### Example
+```js
+var array = [[0, 1], [2, 3], [4, 5]];
+
+_.reduceRight(array, function(flattened, other) {
+ return flattened.concat(other);
+}, []);
+// => [4, 5, 2, 3, 0, 1]
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_rejectcollection-predicate_identity"></a>`_.reject(collection, [predicate=_.identity])`
+<a href="#_rejectcollection-predicate_identity">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L8907 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.reject "See the npm package")
+
+The opposite of `_.filter`; this method returns the elements of `collection`
+that `predicate` does **not** return truthy for.
+
+#### Since
+0.1.0
+#### Arguments
+1. `collection` *(Array|Object)*: The collection to iterate over.
+2. `[predicate=_.identity]` *(Array|Function|Object|string)*: The function invoked per iteration.
+
+#### Returns
+*(Array)*: Returns the new filtered array.
+
+#### Example
+```js
+var users = [
+ { 'user': 'barney', 'age': 36, 'active': false },
+ { 'user': 'fred', 'age': 40, 'active': true }
+];
+
+_.reject(users, function(o) { return !o.active; });
+// => objects for ['fred']
+
+// The `_.matches` iteratee shorthand.
+_.reject(users, { 'age': 40, 'active': true });
+// => objects for ['barney']
+
+// The `_.matchesProperty` iteratee shorthand.
+_.reject(users, ['active', false]);
+// => objects for ['fred']
+
+// The `_.property` iteratee shorthand.
+_.reject(users, 'active');
+// => objects for ['barney']
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_samplecollection"></a>`_.sample(collection)`
+<a href="#_samplecollection">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L8929 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.sample "See the npm package")
+
+Gets a random element from `collection`.
+
+#### Since
+2.0.0
+#### Arguments
+1. `collection` *(Array|Object)*: The collection to sample.
+
+#### Returns
+*(*)*: Returns the random element.
+
+#### Example
+```js
+_.sample([1, 2, 3, 4]);
+// => 2
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_samplesizecollection-n1"></a>`_.sampleSize(collection, [n=1])`
+<a href="#_samplesizecollection-n1">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L8956 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.samplesize "See the npm package")
+
+Gets `n` random elements at unique keys from `collection` up to the
+size of `collection`.
+
+#### Since
+4.0.0
+#### Arguments
+1. `collection` *(Array|Object)*: The collection to sample.
+2. `[n=1]` *(number)*: The number of elements to sample.
+
+#### Returns
+*(Array)*: Returns the random elements.
+
+#### Example
+```js
+_.sampleSize([1, 2, 3], 2);
+// => [3, 1]
+
+_.sampleSize([1, 2, 3], 4);
+// => [2, 3, 1]
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_shufflecollection"></a>`_.shuffle(collection)`
+<a href="#_shufflecollection">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L8993 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.shuffle "See the npm package")
+
+Creates an array of shuffled values, using a version of the
+[Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher-Yates_shuffle).
+
+#### Since
+0.1.0
+#### Arguments
+1. `collection` *(Array|Object)*: The collection to shuffle.
+
+#### Returns
+*(Array)*: Returns the new shuffled array.
+
+#### Example
+```js
+_.shuffle([1, 2, 3, 4]);
+// => [4, 1, 3, 2]
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_sizecollection"></a>`_.size(collection)`
+<a href="#_sizecollection">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L9018 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.size "See the npm package")
+
+Gets the size of `collection` by returning its length for array-like
+values or the number of own enumerable string keyed properties for objects.
+
+#### Since
+0.1.0
+#### Arguments
+1. `collection` *(Array|Object)*: The collection to inspect.
+
+#### Returns
+*(number)*: Returns the collection size.
+
+#### Example
+```js
+_.size([1, 2, 3]);
+// => 3
+
+_.size({ 'a': 1, 'b': 2 });
+// => 2
+
+_.size('pebbles');
+// => 7
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_somecollection-predicate_identity"></a>`_.some(collection, [predicate=_.identity])`
+<a href="#_somecollection-predicate_identity">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L9072 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.some "See the npm package")
+
+Checks if `predicate` returns truthy for **any** element of `collection`.
+Iteration is stopped once `predicate` returns truthy. The predicate is
+invoked with three arguments: *(value, index|key, collection)*.
+
+#### Since
+0.1.0
+#### Arguments
+1. `collection` *(Array|Object)*: The collection to iterate over.
+2. `[predicate=_.identity]` *(Array|Function|Object|string)*: The function invoked per iteration.
+
+#### Returns
+*(boolean)*: Returns `true` if any element passes the predicate check, else `false`.
+
+#### Example
+```js
+_.some([null, 0, 'yes', false], Boolean);
+// => true
+
+var users = [
+ { 'user': 'barney', 'active': true },
+ { 'user': 'fred', 'active': false }
+];
+
+// The `_.matches` iteratee shorthand.
+_.some(users, { 'user': 'barney', 'active': false });
+// => false
+
+// The `_.matchesProperty` iteratee shorthand.
+_.some(users, ['active', false]);
+// => true
+
+// The `_.property` iteratee shorthand.
+_.some(users, 'active');
+// => true
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_sortbycollection-iteratees_identity"></a>`_.sortBy(collection, [iteratees=[_.identity]])`
+<a href="#_sortbycollection-iteratees_identity">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L9114 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.sortby "See the npm package")
+
+Creates an array of elements, sorted in ascending order by the results of
+running each element in a collection thru each iteratee. This method
+performs a stable sort, that is, it preserves the original sort order of
+equal elements. The iteratees are invoked with one argument: *(value)*.
+
+#### Since
+0.1.0
+#### Arguments
+1. `collection` *(Array|Object)*: The collection to iterate over.
+2. `[iteratees=[_.identity]]` *(...(Array|Array[]|Function|Function[]|Object|Object[]|string|string[]))*: The iteratees to sort by.
+
+#### Returns
+*(Array)*: Returns the new sorted array.
+
+#### Example
+```js
+var users = [
+ { 'user': 'fred', 'age': 48 },
+ { 'user': 'barney', 'age': 36 },
+ { 'user': 'fred', 'age': 40 },
+ { 'user': 'barney', 'age': 34 }
+];
+
+_.sortBy(users, function(o) { return o.user; });
+// => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]
+
+_.sortBy(users, ['user', 'age']);
+// => objects for [['barney', 34], ['barney', 36], ['fred', 40], ['fred', 48]]
+
+_.sortBy(users, 'user', function(o) {
+ return Math.floor(o.age / 10);
+});
+// => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]
+```
+* * *
+
+<!-- /div -->
+
+<!-- /div -->
+
+<!-- div -->
+
+## `“Date” Methods`
+
+<!-- div -->
+
+### <a id="_now"></a>`_.now()`
+<a href="#_now">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L9150 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.now "See the npm package")
+
+Gets the timestamp of the number of milliseconds that have elapsed since
+the Unix epoch *(1 January `1970 00`:00:00 UTC)*.
+
+#### Since
+2.4.0
+#### Returns
+*(number)*: Returns the timestamp.
+
+#### Example
+```js
+_.defer(function(stamp) {
+ console.log(_.now() - stamp);
+}, _.now());
+// => Logs the number of milliseconds it took for the deferred function to be invoked.
+```
+* * *
+
+<!-- /div -->
+
+<!-- /div -->
+
+<!-- div -->
+
+## `“Function” Methods`
+
+<!-- div -->
+
+### <a id="_aftern-func"></a>`_.after(n, func)`
+<a href="#_aftern-func">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L9178 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.after "See the npm package")
+
+The opposite of `_.before`; this method creates a function that invokes
+`func` once it's called `n` or more times.
+
+#### Since
+0.1.0
+#### Arguments
+1. `n` *(number)*: The number of calls before `func` is invoked.
+2. `func` *(Function)*: The function to restrict.
+
+#### Returns
+*(Function)*: Returns the new restricted function.
+
+#### Example
+```js
+var saves = ['profile', 'settings'];
+
+var done = _.after(saves.length, function() {
+ console.log('done saving!');
+});
+
+_.forEach(saves, function(type) {
+ asyncSave({ 'type': type, 'complete': done });
+});
+// => Logs 'done saving!' after the two async saves have completed.
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_aryfunc-nfunclength"></a>`_.ary(func, [n=func.length])`
+<a href="#_aryfunc-nfunclength">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L9207 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.ary "See the npm package")
+
+Creates a function that invokes `func`, with up to `n` arguments,
+ignoring any additional arguments.
+
+#### Since
+3.0.0
+#### Arguments
+1. `func` *(Function)*: The function to cap arguments for.
+2. `[n=func.length]` *(number)*: The arity cap.
+
+#### Returns
+*(Function)*: Returns the new function.
+
+#### Example
+```js
+_.map(['6', '8', '10'], _.ary(parseInt, 1));
+// => [6, 8, 10]
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_beforen-func"></a>`_.before(n, func)`
+<a href="#_beforen-func">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L9230 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.before "See the npm package")
+
+Creates a function that invokes `func`, with the `this` binding and arguments
+of the created function, while it's called less than `n` times. Subsequent
+calls to the created function return the result of the last `func` invocation.
+
+#### Since
+3.0.0
+#### Arguments
+1. `n` *(number)*: The number of calls at which `func` is no longer invoked.
+2. `func` *(Function)*: The function to restrict.
+
+#### Returns
+*(Function)*: Returns the new restricted function.
+
+#### Example
+```js
+jQuery(element).on('click', _.before(5, addContactToList));
+// => allows adding up to 4 contacts to the list
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_bindfunc-thisarg-partials"></a>`_.bind(func, thisArg, [partials])`
+<a href="#_bindfunc-thisarg-partials">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L9282 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.bind "See the npm package")
+
+Creates a function that invokes `func` with the `this` binding of `thisArg`
+and `partials` prepended to the arguments it receives.
+<br>
+<br>
+The `_.bind.placeholder` value, which defaults to `_` in monolithic builds,
+may be used as a placeholder for partially applied arguments.
+<br>
+<br>
+**Note:** Unlike native `Function#bind` this method doesn't set the "length"
+property of bound functions.
+
+#### Since
+0.1.0
+#### Arguments
+1. `func` *(Function)*: The function to bind.
+2. `thisArg` *(*)*: The `this` binding of `func`.
+3. `[partials]` *(...*)*: The arguments to be partially applied.
+
+#### Returns
+*(Function)*: Returns the new bound function.
+
+#### Example
+```js
+var greet = function(greeting, punctuation) {
+ return greeting + ' ' + this.user + punctuation;
+};
+
+var object = { 'user': 'fred' };
+
+var bound = _.bind(greet, object, 'hi');
+bound('!');
+// => 'hi fred!'
+
+// Bound with placeholders.
+var bound = _.bind(greet, object, _, '!');
+bound('hi');
+// => 'hi fred!'
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_bindkeyobject-key-partials"></a>`_.bindKey(object, key, [partials])`
+<a href="#_bindkeyobject-key-partials">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L9336 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.bindkey "See the npm package")
+
+Creates a function that invokes the method at `object[key]` with `partials`
+prepended to the arguments it receives.
+<br>
+<br>
+This method differs from `_.bind` by allowing bound functions to reference
+methods that may be redefined or don't yet exist. See
+[Peter Michaux's article](http://peter.michaux.ca/articles/lazy-function-definition-pattern)
+for more details.
+<br>
+<br>
+The `_.bindKey.placeholder` value, which defaults to `_` in monolithic
+builds, may be used as a placeholder for partially applied arguments.
+
+#### Since
+0.10.0
+#### Arguments
+1. `object` *(Object)*: The object to invoke the method on.
+2. `key` *(string)*: The key of the method.
+3. `[partials]` *(...*)*: The arguments to be partially applied.
+
+#### Returns
+*(Function)*: Returns the new bound function.
+
+#### Example
+```js
+var object = {
+ 'user': 'fred',
+ 'greet': function(greeting, punctuation) {
+ return greeting + ' ' + this.user + punctuation;
+ }
+};
+
+var bound = _.bindKey(object, 'greet', 'hi');
+bound('!');
+// => 'hi fred!'
+
+object.greet = function(greeting, punctuation) {
+ return greeting + 'ya ' + this.user + punctuation;
+};
+
+bound('!');
+// => 'hiya fred!'
+
+// Bound with placeholders.
+var bound = _.bindKey(object, 'greet', _, '!');
+bound('hi');
+// => 'hiya fred!'
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_curryfunc-arityfunclength"></a>`_.curry(func, [arity=func.length])`
+<a href="#_curryfunc-arityfunclength">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L9386 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.curry "See the npm package")
+
+Creates a function that accepts arguments of `func` and either invokes
+`func` returning its result, if at least `arity` number of arguments have
+been provided, or returns a function that accepts the remaining `func`
+arguments, and so on. The arity of `func` may be specified if `func.length`
+is not sufficient.
+<br>
+<br>
+The `_.curry.placeholder` value, which defaults to `_` in monolithic builds,
+may be used as a placeholder for provided arguments.
+<br>
+<br>
+**Note:** This method doesn't set the "length" property of curried functions.
+
+#### Since
+2.0.0
+#### Arguments
+1. `func` *(Function)*: The function to curry.
+2. `[arity=func.length]` *(number)*: The arity of `func`.
+
+#### Returns
+*(Function)*: Returns the new curried function.
+
+#### Example
+```js
+var abc = function(a, b, c) {
+ return [a, b, c];
+};
+
+var curried = _.curry(abc);
+
+curried(1)(2)(3);
+// => [1, 2, 3]
+
+curried(1, 2)(3);
+// => [1, 2, 3]
+
+curried(1, 2, 3);
+// => [1, 2, 3]
+
+// Curried with placeholders.
+curried(1)(_, 3)(2);
+// => [1, 2, 3]
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_curryrightfunc-arityfunclength"></a>`_.curryRight(func, [arity=func.length])`
+<a href="#_curryrightfunc-arityfunclength">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L9431 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.curryright "See the npm package")
+
+This method is like `_.curry` except that arguments are applied to `func`
+in the manner of `_.partialRight` instead of `_.partial`.
+<br>
+<br>
+The `_.curryRight.placeholder` value, which defaults to `_` in monolithic
+builds, may be used as a placeholder for provided arguments.
+<br>
+<br>
+**Note:** This method doesn't set the "length" property of curried functions.
+
+#### Since
+3.0.0
+#### Arguments
+1. `func` *(Function)*: The function to curry.
+2. `[arity=func.length]` *(number)*: The arity of `func`.
+
+#### Returns
+*(Function)*: Returns the new curried function.
+
+#### Example
+```js
+var abc = function(a, b, c) {
+ return [a, b, c];
+};
+
+var curried = _.curryRight(abc);
+
+curried(3)(2)(1);
+// => [1, 2, 3]
+
+curried(2, 3)(1);
+// => [1, 2, 3]
+
+curried(1, 2, 3);
+// => [1, 2, 3]
+
+// Curried with placeholders.
+curried(3)(1, _)(2);
+// => [1, 2, 3]
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_debouncefunc-wait0-options-optionsleadingfalse-optionsmaxwait-optionstrailingtrue"></a>`_.debounce(func, [wait=0], [options={}], [options.leading=false], [options.maxWait], [options.trailing=true])`
+<a href="#_debouncefunc-wait0-options-optionsleadingfalse-optionsmaxwait-optionstrailingtrue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L9488 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.debounce "See the npm package")
+
+Creates a debounced function that delays invoking `func` until after `wait`
+milliseconds have elapsed since the last time the debounced function was
+invoked. The debounced function comes with a `cancel` method to cancel
+delayed `func` invocations and a `flush` method to immediately invoke them.
+Provide an options object to indicate whether `func` should be invoked on
+the leading and/or trailing edge of the `wait` timeout. The `func` is invoked
+with the last arguments provided to the debounced function. Subsequent calls
+to the debounced function return the result of the last `func` invocation.
+<br>
+<br>
+**Note:** If `leading` and `trailing` options are `true`, `func` is invoked
+on the trailing edge of the timeout only if the debounced function is
+invoked more than once during the `wait` timeout.
+<br>
+<br>
+See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
+for details over the differences between `_.debounce` and `_.throttle`.
+
+#### Since
+0.1.0
+#### Arguments
+1. `func` *(Function)*: The function to debounce.
+2. `[wait=0]` *(number)*: The number of milliseconds to delay.
+3. `[options={}]` *(Object)*: The options object.
+4. `[options.leading=false]` *(boolean)*: Specify invoking on the leading edge of the timeout.
+5. `[options.maxWait]` *(number)*: The maximum time `func` is allowed to be delayed before it's invoked.
+6. `[options.trailing=true]` *(boolean)*: Specify invoking on the trailing edge of the timeout.
+
+#### Returns
+*(Function)*: Returns the new debounced function.
+
+#### Example
+```js
+// Avoid costly calculations while the window size is in flux.
+jQuery(window).on('resize', _.debounce(calculateLayout, 150));
+
+// Invoke `sendMail` when clicked, debouncing subsequent calls.
+jQuery(element).on('click', _.debounce(sendMail, 300, {
+ 'leading': true,
+ 'trailing': false
+}));
+
+// Ensure `batchLog` is invoked once after 1 second of debounced calls.
+var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });
+var source = new EventSource('/stream');
+jQuery(source).on('message', debounced);
+
+// Cancel the trailing debounced invocation.
+jQuery(window).on('popstate', debounced.cancel);
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_deferfunc-args"></a>`_.defer(func, [args])`
+<a href="#_deferfunc-args">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L9630 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.defer "See the npm package")
+
+Defers invoking the `func` until the current call stack has cleared. Any
+additional arguments are provided to `func` when it's invoked.
+
+#### Since
+0.1.0
+#### Arguments
+1. `func` *(Function)*: The function to defer.
+2. `[args]` *(...*)*: The arguments to invoke `func` with.
+
+#### Returns
+*(number)*: Returns the timer id.
+
+#### Example
+```js
+_.defer(function(text) {
+ console.log(text);
+}, 'deferred');
+// => Logs 'deferred' after one or more milliseconds.
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_delayfunc-wait-args"></a>`_.delay(func, wait, [args])`
+<a href="#_delayfunc-wait-args">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L9653 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.delay "See the npm package")
+
+Invokes `func` after `wait` milliseconds. Any additional arguments are
+provided to `func` when it's invoked.
+
+#### Since
+0.1.0
+#### Arguments
+1. `func` *(Function)*: The function to delay.
+2. `wait` *(number)*: The number of milliseconds to delay invocation.
+3. `[args]` *(...*)*: The arguments to invoke `func` with.
+
+#### Returns
+*(number)*: Returns the timer id.
+
+#### Example
+```js
+_.delay(function(text) {
+ console.log(text);
+}, 1000, 'later');
+// => Logs 'later' after one second.
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_flipfunc"></a>`_.flip(func)`
+<a href="#_flipfunc">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L9675 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.flip "See the npm package")
+
+Creates a function that invokes `func` with arguments reversed.
+
+#### Since
+4.0.0
+#### Arguments
+1. `func` *(Function)*: The function to flip arguments for.
+
+#### Returns
+*(Function)*: Returns the new function.
+
+#### Example
+```js
+var flipped = _.flip(function() {
+ return _.toArray(arguments);
+});
+
+flipped('a', 'b', 'c', 'd');
+// => ['d', 'c', 'b', 'a']
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_memoizefunc-resolver"></a>`_.memoize(func, [resolver])`
+<a href="#_memoizefunc-resolver">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L9723 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.memoize "See the npm package")
+
+Creates a function that memoizes the result of `func`. If `resolver` is
+provided, it determines the cache key for storing the result based on the
+arguments provided to the memoized function. By default, the first argument
+provided to the memoized function is used as the map cache key. The `func`
+is invoked with the `this` binding of the memoized function.
+<br>
+<br>
+**Note:** The cache is exposed as the `cache` property on the memoized
+function. Its creation may be customized by replacing the `_.memoize.Cache`
+constructor with one whose instances implement the
+[`Map`](http://ecma-international.org/ecma-262/6.0/#sec-properties-of-the-map-prototype-object)
+method interface of `delete`, `get`, `has`, and `set`.
+
+#### Since
+0.1.0
+#### Arguments
+1. `func` *(Function)*: The function to have its output memoized.
+2. `[resolver]` *(Function)*: The function to resolve the cache key.
+
+#### Returns
+*(Function)*: Returns the new memoizing function.
+
+#### Example
+```js
+var object = { 'a': 1, 'b': 2 };
+var other = { 'c': 3, 'd': 4 };
+
+var values = _.memoize(_.values);
+values(object);
+// => [1, 2]
+
+values(other);
+// => [3, 4]
+
+object.a = 2;
+values(object);
+// => [1, 2]
+
+// Modify the result cache.
+values.cache.set(object, ['a', 'b']);
+values(object);
+// => ['a', 'b']
+
+// Replace `_.memoize.Cache`.
+_.memoize.Cache = WeakMap;
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_negatepredicate"></a>`_.negate(predicate)`
+<a href="#_negatepredicate">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L9766 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.negate "See the npm package")
+
+Creates a function that negates the result of the predicate `func`. The
+`func` predicate is invoked with the `this` binding and arguments of the
+created function.
+
+#### Since
+3.0.0
+#### Arguments
+1. `predicate` *(Function)*: The predicate to negate.
+
+#### Returns
+*(Function)*: Returns the new function.
+
+#### Example
+```js
+function isEven(n) {
+ return n % 2 == 0;
+}
+
+_.filter([1, 2, 3, 4, 5, 6], _.negate(isEven));
+// => [1, 3, 5]
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_oncefunc"></a>`_.once(func)`
+<a href="#_oncefunc">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L9793 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.once "See the npm package")
+
+Creates a function that is restricted to invoking `func` once. Repeat calls
+to the function return the value of the first invocation. The `func` is
+invoked with the `this` binding and arguments of the created function.
+
+#### Since
+0.1.0
+#### Arguments
+1. `func` *(Function)*: The function to restrict.
+
+#### Returns
+*(Function)*: Returns the new restricted function.
+
+#### Example
+```js
+var initialize = _.once(createApplication);
+initialize();
+initialize();
+// `initialize` invokes `createApplication` once
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_overargsfunc"></a>`_.overArgs(func)`
+<a href="#_overargsfunc">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L9829 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.overargs "See the npm package")
+
+Creates a function that invokes `func` with arguments transformed by
+corresponding `transforms`.
+
+#### Since
+4.0.0
+#### Arguments
+1. `func` *(Function)*: The function to wrap.
+
+#### Returns
+*(Function)*: Returns the new function.
+
+#### Example
+```js
+function doubled(n) {
+ return n * 2;
+}
+
+function square(n) {
+ return n * n;
+}
+
+var func = _.overArgs(function(x, y) {
+ return [x, y];
+}, square, doubled);
+
+func(9, 3);
+// => [81, 6]
+
+func(10, 5);
+// => [100, 10]
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_partialfunc-partials"></a>`_.partial(func, [partials])`
+<a href="#_partialfunc-partials">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L9879 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.partial "See the npm package")
+
+Creates a function that invokes `func` with `partials` prepended to the
+arguments it receives. This method is like `_.bind` except it does **not**
+alter the `this` binding.
+<br>
+<br>
+The `_.partial.placeholder` value, which defaults to `_` in monolithic
+builds, may be used as a placeholder for partially applied arguments.
+<br>
+<br>
+**Note:** This method doesn't set the "length" property of partially
+applied functions.
+
+#### Since
+0.2.0
+#### Arguments
+1. `func` *(Function)*: The function to partially apply arguments to.
+2. `[partials]` *(...*)*: The arguments to be partially applied.
+
+#### Returns
+*(Function)*: Returns the new partially applied function.
+
+#### Example
+```js
+var greet = function(greeting, name) {
+ return greeting + ' ' + name;
+};
+
+var sayHelloTo = _.partial(greet, 'hello');
+sayHelloTo('fred');
+// => 'hello fred'
+
+// Partially applied with placeholders.
+var greetFred = _.partial(greet, _, 'fred');
+greetFred('hi');
+// => 'hi fred'
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_partialrightfunc-partials"></a>`_.partialRight(func, [partials])`
+<a href="#_partialrightfunc-partials">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L9916 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.partialright "See the npm package")
+
+This method is like `_.partial` except that partially applied arguments
+are appended to the arguments it receives.
+<br>
+<br>
+The `_.partialRight.placeholder` value, which defaults to `_` in monolithic
+builds, may be used as a placeholder for partially applied arguments.
+<br>
+<br>
+**Note:** This method doesn't set the "length" property of partially
+applied functions.
+
+#### Since
+1.0.0
+#### Arguments
+1. `func` *(Function)*: The function to partially apply arguments to.
+2. `[partials]` *(...*)*: The arguments to be partially applied.
+
+#### Returns
+*(Function)*: Returns the new partially applied function.
+
+#### Example
+```js
+var greet = function(greeting, name) {
+ return greeting + ' ' + name;
+};
+
+var greetFred = _.partialRight(greet, 'fred');
+greetFred('hi');
+// => 'hi fred'
+
+// Partially applied with placeholders.
+var sayHelloTo = _.partialRight(greet, 'hello', _);
+sayHelloTo('fred');
+// => 'hello fred'
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_reargfunc-indexes"></a>`_.rearg(func, indexes)`
+<a href="#_reargfunc-indexes">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L9943 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.rearg "See the npm package")
+
+Creates a function that invokes `func` with arguments arranged according
+to the specified `indexes` where the argument value at the first index is
+provided as the first argument, the argument value at the second index is
+provided as the second argument, and so on.
+
+#### Since
+3.0.0
+#### Arguments
+1. `func` *(Function)*: The function to rearrange arguments for.
+2. `indexes` *(...(number|number[]))*: The arranged argument indexes.
+
+#### Returns
+*(Function)*: Returns the new function.
+
+#### Example
+```js
+var rearged = _.rearg(function(a, b, c) {
+ return [a, b, c];
+}, 2, 0, 1);
+
+rearged('b', 'c', 'a')
+// => ['a', 'b', 'c']
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_restfunc-startfunclength-1"></a>`_.rest(func, [start=func.length-1])`
+<a href="#_restfunc-startfunclength-1">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L9972 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.rest "See the npm package")
+
+Creates a function that invokes `func` with the `this` binding of the
+created function and arguments from `start` and beyond provided as
+an array.
+<br>
+<br>
+**Note:** This method is based on the
+[rest parameter](https://mdn.io/rest_parameters).
+
+#### Since
+4.0.0
+#### Arguments
+1. `func` *(Function)*: The function to apply a rest parameter to.
+2. `[start=func.length-1]` *(number)*: The start position of the rest parameter.
+
+#### Returns
+*(Function)*: Returns the new function.
+
+#### Example
+```js
+var say = _.rest(function(what, names) {
+ return what + ' ' + _.initial(names).join(', ') +
+ (_.size(names) > 1 ? ', & ' : '') + _.last(names);
+});
+
+say('hello', 'fred', 'barney', 'pebbles');
+// => 'hello fred, barney, & pebbles'
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_spreadfunc-start0"></a>`_.spread(func, [start=0])`
+<a href="#_spreadfunc-start0">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L10035 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.spread "See the npm package")
+
+Creates a function that invokes `func` with the `this` binding of the
+create function and an array of arguments much like
+[`Function#apply`](http://www.ecma-international.org/ecma-262/6.0/#sec-function.prototype.apply).
+<br>
+<br>
+**Note:** This method is based on the
+[spread operator](https://mdn.io/spread_operator).
+
+#### Since
+3.2.0
+#### Arguments
+1. `func` *(Function)*: The function to spread arguments over.
+2. `[start=0]` *(number)*: The start position of the spread.
+
+#### Returns
+*(Function)*: Returns the new function.
+
+#### Example
+```js
+var say = _.spread(function(who, what) {
+ return who + ' says ' + what;
+});
+
+say(['fred', 'hello']);
+// => 'fred says hello'
+
+var numbers = Promise.all([
+ Promise.resolve(40),
+ Promise.resolve(36)
+]);
+
+numbers.then(_.spread(function(x, y) {
+ return x + y;
+}));
+// => a Promise of 76
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_throttlefunc-wait0-options-optionsleadingtrue-optionstrailingtrue"></a>`_.throttle(func, [wait=0], [options={}], [options.leading=true], [options.trailing=true])`
+<a href="#_throttlefunc-wait0-options-optionsleadingtrue-optionstrailingtrue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L10092 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.throttle "See the npm package")
+
+Creates a throttled function that only invokes `func` at most once per
+every `wait` milliseconds. The throttled function comes with a `cancel`
+method to cancel delayed `func` invocations and a `flush` method to
+immediately invoke them. Provide an options object to indicate whether
+`func` should be invoked on the leading and/or trailing edge of the `wait`
+timeout. The `func` is invoked with the last arguments provided to the
+throttled function. Subsequent calls to the throttled function return the
+result of the last `func` invocation.
+<br>
+<br>
+**Note:** If `leading` and `trailing` options are `true`, `func` is
+invoked on the trailing edge of the timeout only if the throttled function
+is invoked more than once during the `wait` timeout.
+<br>
+<br>
+See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
+for details over the differences between `_.throttle` and `_.debounce`.
+
+#### Since
+0.1.0
+#### Arguments
+1. `func` *(Function)*: The function to throttle.
+2. `[wait=0]` *(number)*: The number of milliseconds to throttle invocations to.
+3. `[options={}]` *(Object)*: The options object.
+4. `[options.leading=true]` *(boolean)*: Specify invoking on the leading edge of the timeout.
+5. `[options.trailing=true]` *(boolean)*: Specify invoking on the trailing edge of the timeout.
+
+#### Returns
+*(Function)*: Returns the new throttled function.
+
+#### Example
+```js
+// Avoid excessively updating the position while scrolling.
+jQuery(window).on('scroll', _.throttle(updatePosition, 100));
+
+// Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.
+var throttled = _.throttle(renewToken, 300000, { 'trailing': false });
+jQuery(element).on('click', throttled);
+
+// Cancel the trailing throttled invocation.
+jQuery(window).on('popstate', throttled.cancel);
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_unaryfunc"></a>`_.unary(func)`
+<a href="#_unaryfunc">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L10125 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.unary "See the npm package")
+
+Creates a function that accepts up to one argument, ignoring any
+additional arguments.
+
+#### Since
+4.0.0
+#### Arguments
+1. `func` *(Function)*: The function to cap arguments for.
+
+#### Returns
+*(Function)*: Returns the new function.
+
+#### Example
+```js
+_.map(['6', '8', '10'], _.unary(parseInt));
+// => [6, 8, 10]
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_wrapvalue-wrapperidentity"></a>`_.wrap(value, [wrapper=identity])`
+<a href="#_wrapvalue-wrapperidentity">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L10151 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.wrap "See the npm package")
+
+Creates a function that provides `value` to the wrapper function as its
+first argument. Any additional arguments provided to the function are
+appended to those provided to the wrapper function. The wrapper is invoked
+with the `this` binding of the created function.
+
+#### Since
+0.1.0
+#### Arguments
+1. `value` *(*)*: The value to wrap.
+2. `[wrapper=identity]` *(Function)*: The wrapper function.
+
+#### Returns
+*(Function)*: Returns the new function.
+
+#### Example
+```js
+var p = _.wrap(_.escape, function(func, text) {
+ return '<p>' + func(text) + '</p>';
+});
+
+p('fred, barney, & pebbles');
+// => '<p>fred, barney, & pebbles</p>'
+```
+* * *
+
+<!-- /div -->
+
+<!-- /div -->
+
+<!-- div -->
+
+## `“Lang” Methods`
+
+<!-- div -->
+
+### <a id="_castarrayvalue"></a>`_.castArray(value)`
+<a href="#_castarrayvalue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L10191 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.castarray "See the npm package")
+
+Casts `value` as an array if it's not one.
+
+#### Since
+4.4.0
+#### Arguments
+1. `value` *(*)*: The value to inspect.
+
+#### Returns
+*(Array)*: Returns the cast array.
+
+#### Example
+```js
+_.castArray(1);
+// => [1]
+
+_.castArray({ 'a': 1 });
+// => [{ 'a': 1 }]
+
+_.castArray('abc');
+// => ['abc']
+
+_.castArray(null);
+// => [null]
+
+_.castArray(undefined);
+// => [undefined]
+
+_.castArray();
+// => []
+
+var array = [1, 2, 3];
+console.log(_.castArray(array) === array);
+// => true
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_clonevalue"></a>`_.clone(value)`
+<a href="#_clonevalue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L10225 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.clone "See the npm package")
+
+Creates a shallow clone of `value`.
+<br>
+<br>
+**Note:** This method is loosely based on the
+[structured clone algorithm](https://mdn.io/Structured_clone_algorithm)
+and supports cloning arrays, array buffers, booleans, date objects, maps,
+numbers, `Object` objects, regexes, sets, strings, symbols, and typed
+arrays. The own enumerable properties of `arguments` objects are cloned
+as plain objects. An empty object is returned for uncloneable values such
+as error objects, functions, DOM nodes, and WeakMaps.
+
+#### Since
+0.1.0
+#### Arguments
+1. `value` *(*)*: The value to clone.
+
+#### Returns
+*(*)*: Returns the cloned value.
+
+#### Example
+```js
+var objects = [{ 'a': 1 }, { 'b': 2 }];
+
+var shallow = _.clone(objects);
+console.log(shallow[0] === objects[0]);
+// => true
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_clonedeepvalue"></a>`_.cloneDeep(value)`
+<a href="#_clonedeepvalue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L10282 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.clonedeep "See the npm package")
+
+This method is like `_.clone` except that it recursively clones `value`.
+
+#### Since
+1.0.0
+#### Arguments
+1. `value` *(*)*: The value to recursively clone.
+
+#### Returns
+*(*)*: Returns the deep cloned value.
+
+#### Example
+```js
+var objects = [{ 'a': 1 }, { 'b': 2 }];
+
+var deep = _.cloneDeep(objects);
+console.log(deep[0] === objects[0]);
+// => false
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_clonedeepwithvalue-customizer"></a>`_.cloneDeepWith(value, [customizer])`
+<a href="#_clonedeepwithvalue-customizer">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L10314 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.clonedeepwith "See the npm package")
+
+This method is like `_.cloneWith` except that it recursively clones `value`.
+
+#### Since
+4.0.0
+#### Arguments
+1. `value` *(*)*: The value to recursively clone.
+2. `[customizer]` *(Function)*: The function to customize cloning.
+
+#### Returns
+*(*)*: Returns the deep cloned value.
+
+#### Example
+```js
+function customizer(value) {
+ if (_.isElement(value)) {
+ return value.cloneNode(true);
+ }
+}
+
+var el = _.cloneDeepWith(document.body, customizer);
+
+console.log(el === document.body);
+// => false
+console.log(el.nodeName);
+// => 'BODY'
+console.log(el.childNodes.length);
+// => 20
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_clonewithvalue-customizer"></a>`_.cloneWith(value, [customizer])`
+<a href="#_clonewithvalue-customizer">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L10260 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.clonewith "See the npm package")
+
+This method is like `_.clone` except that it accepts `customizer` which
+is invoked to produce the cloned value. If `customizer` returns `undefined`,
+cloning is handled by the method instead. The `customizer` is invoked with
+up to four arguments; *(value [, index|key, object, stack])*.
+
+#### Since
+4.0.0
+#### Arguments
+1. `value` *(*)*: The value to clone.
+2. `[customizer]` *(Function)*: The function to customize cloning.
+
+#### Returns
+*(*)*: Returns the cloned value.
+
+#### Example
+```js
+function customizer(value) {
+ if (_.isElement(value)) {
+ return value.cloneNode(false);
+ }
+}
+
+var el = _.cloneWith(document.body, customizer);
+
+console.log(el === document.body);
+// => false
+console.log(el.nodeName);
+// => 'BODY'
+console.log(el.childNodes.length);
+// => 0
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_eqvalue-other"></a>`_.eq(value, other)`
+<a href="#_eqvalue-other">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L10350 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.eq "See the npm package")
+
+Performs a
+[`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
+comparison between two values to determine if they are equivalent.
+
+#### Since
+4.0.0
+#### Arguments
+1. `value` *(*)*: The value to compare.
+2. `other` *(*)*: The other value to compare.
+
+#### Returns
+*(boolean)*: Returns `true` if the values are equivalent, else `false`.
+
+#### Example
+```js
+var object = { 'user': 'fred' };
+var other = { 'user': 'fred' };
+
+_.eq(object, object);
+// => true
+
+_.eq(object, other);
+// => false
+
+_.eq('a', 'a');
+// => true
+
+_.eq('a', Object('a'));
+// => false
+
+_.eq(NaN, NaN);
+// => true
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_gtvalue-other"></a>`_.gt(value, other)`
+<a href="#_gtvalue-other">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L10377 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.gt "See the npm package")
+
+Checks if `value` is greater than `other`.
+
+#### Since
+3.9.0
+#### Arguments
+1. `value` *(*)*: The value to compare.
+2. `other` *(*)*: The other value to compare.
+
+#### Returns
+*(boolean)*: Returns `true` if `value` is greater than `other`, else `false`.
+
+#### Example
+```js
+_.gt(3, 1);
+// => true
+
+_.gt(3, 3);
+// => false
+
+_.gt(1, 3);
+// => false
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_gtevalue-other"></a>`_.gte(value, other)`
+<a href="#_gtevalue-other">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L10402 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.gte "See the npm package")
+
+Checks if `value` is greater than or equal to `other`.
+
+#### Since
+3.9.0
+#### Arguments
+1. `value` *(*)*: The value to compare.
+2. `other` *(*)*: The other value to compare.
+
+#### Returns
+*(boolean)*: Returns `true` if `value` is greater than or equal to `other`, else `false`.
+
+#### Example
+```js
+_.gte(3, 1);
+// => true
+
+_.gte(3, 3);
+// => true
+
+_.gte(1, 3);
+// => false
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_isargumentsvalue"></a>`_.isArguments(value)`
+<a href="#_isargumentsvalue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L10424 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isarguments "See the npm package")
+
+Checks if `value` is likely an `arguments` object.
+
+#### Since
+0.1.0
+#### Arguments
+1. `value` *(*)*: The value to check.
+
+#### Returns
+*(boolean)*: Returns `true` if `value` is correctly classified, else `false`.
+
+#### Example
+```js
+_.isArguments(function() { return arguments; }());
+// => true
+
+_.isArguments([1, 2, 3]);
+// => false
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_isarrayvalue"></a>`_.isArray(value)`
+<a href="#_isarrayvalue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L10455 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isarray "See the npm package")
+
+Checks if `value` is classified as an `Array` object.
+
+#### Since
+0.1.0
+#### Arguments
+1. `value` *(*)*: The value to check.
+
+#### Returns
+*(boolean)*: Returns `true` if `value` is correctly classified, else `false`.
+
+#### Example
+```js
+_.isArray([1, 2, 3]);
+// => true
+
+_.isArray(document.body.children);
+// => false
+
+_.isArray('abc');
+// => false
+
+_.isArray(_.noop);
+// => false
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_isarraybuffervalue"></a>`_.isArrayBuffer(value)`
+<a href="#_isarraybuffervalue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L10475 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isarraybuffer "See the npm package")
+
+Checks if `value` is classified as an `ArrayBuffer` object.
+
+#### Since
+4.3.0
+#### Arguments
+1. `value` *(*)*: The value to check.
+
+#### Returns
+*(boolean)*: Returns `true` if `value` is correctly classified, else `false`.
+
+#### Example
+```js
+_.isArrayBuffer(new ArrayBuffer(2));
+// => true
+
+_.isArrayBuffer(new Array(2));
+// => false
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_isarraylikevalue"></a>`_.isArrayLike(value)`
+<a href="#_isarraylikevalue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L10504 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isarraylike "See the npm package")
+
+Checks if `value` is array-like. A value is considered array-like if it's
+not a function and has a `value.length` that's an integer greater than or
+equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
+
+#### Since
+4.0.0
+#### Arguments
+1. `value` *(*)*: The value to check.
+
+#### Returns
+*(boolean)*: Returns `true` if `value` is array-like, else `false`.
+
+#### Example
+```js
+_.isArrayLike([1, 2, 3]);
+// => true
+
+_.isArrayLike(document.body.children);
+// => true
+
+_.isArrayLike('abc');
+// => true
+
+_.isArrayLike(_.noop);
+// => false
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_isarraylikeobjectvalue"></a>`_.isArrayLikeObject(value)`
+<a href="#_isarraylikeobjectvalue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L10533 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isarraylikeobject "See the npm package")
+
+This method is like `_.isArrayLike` except that it also checks if `value`
+is an object.
+
+#### Since
+4.0.0
+#### Arguments
+1. `value` *(*)*: The value to check.
+
+#### Returns
+*(boolean)*: Returns `true` if `value` is an array-like object, else `false`.
+
+#### Example
+```js
+_.isArrayLikeObject([1, 2, 3]);
+// => true
+
+_.isArrayLikeObject(document.body.children);
+// => true
+
+_.isArrayLikeObject('abc');
+// => false
+
+_.isArrayLikeObject(_.noop);
+// => false
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_isbooleanvalue"></a>`_.isBoolean(value)`
+<a href="#_isbooleanvalue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L10555 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isboolean "See the npm package")
+
+Checks if `value` is classified as a boolean primitive or object.
+
+#### Since
+0.1.0
+#### Arguments
+1. `value` *(*)*: The value to check.
+
+#### Returns
+*(boolean)*: Returns `true` if `value` is correctly classified, else `false`.
+
+#### Example
+```js
+_.isBoolean(false);
+// => true
+
+_.isBoolean(null);
+// => false
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_isbuffervalue"></a>`_.isBuffer(value)`
+<a href="#_isbuffervalue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L10577 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isbuffer "See the npm package")
+
+Checks if `value` is a buffer.
+
+#### Since
+4.3.0
+#### Arguments
+1. `value` *(*)*: The value to check.
+
+#### Returns
+*(boolean)*: Returns `true` if `value` is a buffer, else `false`.
+
+#### Example
+```js
+_.isBuffer(new Buffer(2));
+// => true
+
+_.isBuffer(new Uint8Array(2));
+// => false
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_isdatevalue"></a>`_.isDate(value)`
+<a href="#_isdatevalue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L10599 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isdate "See the npm package")
+
+Checks if `value` is classified as a `Date` object.
+
+#### Since
+0.1.0
+#### Arguments
+1. `value` *(*)*: The value to check.
+
+#### Returns
+*(boolean)*: Returns `true` if `value` is correctly classified, else `false`.
+
+#### Example
+```js
+_.isDate(new Date);
+// => true
+
+_.isDate('Mon April 23 2012');
+// => false
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_iselementvalue"></a>`_.isElement(value)`
+<a href="#_iselementvalue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L10621 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.iselement "See the npm package")
+
+Checks if `value` is likely a DOM element.
+
+#### Since
+0.1.0
+#### Arguments
+1. `value` *(*)*: The value to check.
+
+#### Returns
+*(boolean)*: Returns `true` if `value` is a DOM element, else `false`.
+
+#### Example
+```js
+_.isElement(document.body);
+// => true
+
+_.isElement('<body>');
+// => false
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_isemptyvalue"></a>`_.isEmpty(value)`
+<a href="#_isemptyvalue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L10658 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isempty "See the npm package")
+
+Checks if `value` is an empty object, collection, map, or set.
+<br>
+<br>
+Objects are considered empty if they have no own enumerable string keyed
+properties.
+<br>
+<br>
+Array-like values such as `arguments` objects, arrays, buffers, strings, or
+jQuery-like collections are considered empty if they have a `length` of `0`.
+Similarly, maps and sets are considered empty if they have a `size` of `0`.
+
+#### Since
+0.1.0
+#### Arguments
+1. `value` *(*)*: The value to check.
+
+#### Returns
+*(boolean)*: Returns `true` if `value` is empty, else `false`.
+
+#### Example
+```js
+_.isEmpty(null);
+// => true
+
+_.isEmpty(true);
+// => true
+
+_.isEmpty(1);
+// => true
+
+_.isEmpty([1, 2, 3]);
+// => false
+
+_.isEmpty({ 'a': 1 });
+// => false
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_isequalvalue-other"></a>`_.isEqual(value, other)`
+<a href="#_isequalvalue-other">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L10707 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isequal "See the npm package")
+
+Performs a deep comparison between two values to determine if they are
+equivalent.
+<br>
+<br>
+**Note:** This method supports comparing arrays, array buffers, booleans,
+date objects, error objects, maps, numbers, `Object` objects, regexes,
+sets, strings, symbols, and typed arrays. `Object` objects are compared
+by their own, not inherited, enumerable properties. Functions and DOM
+nodes are **not** supported.
+
+#### Since
+0.1.0
+#### Arguments
+1. `value` *(*)*: The value to compare.
+2. `other` *(*)*: The other value to compare.
+
+#### Returns
+*(boolean)*: Returns `true` if the values are equivalent, else `false`.
+
+#### Example
+```js
+var object = { 'user': 'fred' };
+var other = { 'user': 'fred' };
+
+_.isEqual(object, other);
+// => true
+
+object === other;
+// => false
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_isequalwithvalue-other-customizer"></a>`_.isEqualWith(value, other, [customizer])`
+<a href="#_isequalwithvalue-other-customizer">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L10744 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isequalwith "See the npm package")
+
+This method is like `_.isEqual` except that it accepts `customizer` which
+is invoked to compare values. If `customizer` returns `undefined`, comparisons
+are handled by the method instead. The `customizer` is invoked with up to
+six arguments: *(objValue, othValue [, index|key, object, other, stack])*.
+
+#### Since
+4.0.0
+#### Arguments
+1. `value` *(*)*: The value to compare.
+2. `other` *(*)*: The other value to compare.
+3. `[customizer]` *(Function)*: The function to customize comparisons.
+
+#### Returns
+*(boolean)*: Returns `true` if the values are equivalent, else `false`.
+
+#### Example
+```js
+function isGreeting(value) {
+ return /^h(?:i|ello)$/.test(value);
+}
+
+function customizer(objValue, othValue) {
+ if (isGreeting(objValue) && isGreeting(othValue)) {
+ return true;
+ }
+}
+
+var array = ['hello', 'goodbye'];
+var other = ['hi', 'goodbye'];
+
+_.isEqualWith(array, other, customizer);
+// => true
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_iserrorvalue"></a>`_.isError(value)`
+<a href="#_iserrorvalue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L10769 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.iserror "See the npm package")
+
+Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`,
+`SyntaxError`, `TypeError`, or `URIError` object.
+
+#### Since
+3.0.0
+#### Arguments
+1. `value` *(*)*: The value to check.
+
+#### Returns
+*(boolean)*: Returns `true` if `value` is an error object, else `false`.
+
+#### Example
+```js
+_.isError(new Error);
+// => true
+
+_.isError(Error);
+// => false
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_isfinitevalue"></a>`_.isFinite(value)`
+<a href="#_isfinitevalue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L10804 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isfinite "See the npm package")
+
+Checks if `value` is a finite primitive number.
+<br>
+<br>
+**Note:** This method is based on
+[`Number.isFinite`](https://mdn.io/Number/isFinite).
+
+#### Since
+0.1.0
+#### Arguments
+1. `value` *(*)*: The value to check.
+
+#### Returns
+*(boolean)*: Returns `true` if `value` is a finite number, else `false`.
+
+#### Example
+```js
+_.isFinite(3);
+// => true
+
+_.isFinite(Number.MAX_VALUE);
+// => true
+
+_.isFinite(3.14);
+// => true
+
+_.isFinite(Infinity);
+// => false
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_isfunctionvalue"></a>`_.isFunction(value)`
+<a href="#_isfunctionvalue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L10826 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isfunction "See the npm package")
+
+Checks if `value` is classified as a `Function` object.
+
+#### Since
+0.1.0
+#### Arguments
+1. `value` *(*)*: The value to check.
+
+#### Returns
+*(boolean)*: Returns `true` if `value` is correctly classified, else `false`.
+
+#### Example
+```js
+_.isFunction(_);
+// => true
+
+_.isFunction(/abc/);
+// => false
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_isintegervalue"></a>`_.isInteger(value)`
+<a href="#_isintegervalue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L10860 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isinteger "See the npm package")
+
+Checks if `value` is an integer.
+<br>
+<br>
+**Note:** This method is based on
+[`Number.isInteger`](https://mdn.io/Number/isInteger).
+
+#### Since
+4.0.0
+#### Arguments
+1. `value` *(*)*: The value to check.
+
+#### Returns
+*(boolean)*: Returns `true` if `value` is an integer, else `false`.
+
+#### Example
+```js
+_.isInteger(3);
+// => true
+
+_.isInteger(Number.MIN_VALUE);
+// => false
+
+_.isInteger(Infinity);
+// => false
+
+_.isInteger('3');
+// => false
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_islengthvalue"></a>`_.isLength(value)`
+<a href="#_islengthvalue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L10891 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.islength "See the npm package")
+
+Checks if `value` is a valid array-like length.
+<br>
+<br>
+**Note:** This function is loosely based on
+[`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength).
+
+#### Since
+4.0.0
+#### Arguments
+1. `value` *(*)*: The value to check.
+
+#### Returns
+*(boolean)*: Returns `true` if `value` is a valid length, else `false`.
+
+#### Example
+```js
+_.isLength(3);
+// => true
+
+_.isLength(Number.MIN_VALUE);
+// => false
+
+_.isLength(Infinity);
+// => false
+
+_.isLength('3');
+// => false
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_ismapvalue"></a>`_.isMap(value)`
+<a href="#_ismapvalue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L10972 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.ismap "See the npm package")
+
+Checks if `value` is classified as a `Map` object.
+
+#### Since
+4.3.0
+#### Arguments
+1. `value` *(*)*: The value to check.
+
+#### Returns
+*(boolean)*: Returns `true` if `value` is correctly classified, else `false`.
+
+#### Example
+```js
+_.isMap(new Map);
+// => true
+
+_.isMap(new WeakMap);
+// => false
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_ismatchobject-source"></a>`_.isMatch(object, source)`
+<a href="#_ismatchobject-source">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L11000 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.ismatch "See the npm package")
+
+Performs a partial deep comparison between `object` and `source` to
+determine if `object` contains equivalent property values. This method is
+equivalent to a `_.matches` function when `source` is partially applied.
+<br>
+<br>
+**Note:** This method supports comparing the same values as `_.isEqual`.
+
+#### Since
+3.0.0
+#### Arguments
+1. `object` *(Object)*: The object to inspect.
+2. `source` *(Object)*: The object of property values to match.
+
+#### Returns
+*(boolean)*: Returns `true` if `object` is a match, else `false`.
+
+#### Example
+```js
+var object = { 'user': 'fred', 'age': 40 };
+
+_.isMatch(object, { 'age': 40 });
+// => true
+
+_.isMatch(object, { 'age': 36 });
+// => false
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_ismatchwithobject-source-customizer"></a>`_.isMatchWith(object, source, [customizer])`
+<a href="#_ismatchwithobject-source-customizer">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L11036 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.ismatchwith "See the npm package")
+
+This method is like `_.isMatch` except that it accepts `customizer` which
+is invoked to compare values. If `customizer` returns `undefined`, comparisons
+are handled by the method instead. The `customizer` is invoked with five
+arguments: *(objValue, srcValue, index|key, object, source)*.
+
+#### Since
+4.0.0
+#### Arguments
+1. `object` *(Object)*: The object to inspect.
+2. `source` *(Object)*: The object of property values to match.
+3. `[customizer]` *(Function)*: The function to customize comparisons.
+
+#### Returns
+*(boolean)*: Returns `true` if `object` is a match, else `false`.
+
+#### Example
+```js
+function isGreeting(value) {
+ return /^h(?:i|ello)$/.test(value);
+}
+
+function customizer(objValue, srcValue) {
+ if (isGreeting(objValue) && isGreeting(srcValue)) {
+ return true;
+ }
+}
+
+var object = { 'greeting': 'hello' };
+var source = { 'greeting': 'hi' };
+
+_.isMatchWith(object, source, customizer);
+// => true
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_isnanvalue"></a>`_.isNaN(value)`
+<a href="#_isnanvalue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L11069 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isnan "See the npm package")
+
+Checks if `value` is `NaN`.
+<br>
+<br>
+**Note:** This method is based on
+[`Number.isNaN`](https://mdn.io/Number/isNaN) and is not the same as
+global [`isNaN`](https://mdn.io/isNaN) which returns `true` for
+`undefined` and other non-number values.
+
+#### Since
+0.1.0
+#### Arguments
+1. `value` *(*)*: The value to check.
+
+#### Returns
+*(boolean)*: Returns `true` if `value` is `NaN`, else `false`.
+
+#### Example
+```js
+_.isNaN(NaN);
+// => true
+
+_.isNaN(new Number(NaN));
+// => true
+
+isNaN(undefined);
+// => true
+
+_.isNaN(undefined);
+// => false
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_isnativevalue"></a>`_.isNative(value)`
+<a href="#_isnativevalue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L11094 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isnative "See the npm package")
+
+Checks if `value` is a native function.
+
+#### Since
+3.0.0
+#### Arguments
+1. `value` *(*)*: The value to check.
+
+#### Returns
+*(boolean)*: Returns `true` if `value` is a native function, else `false`.
+
+#### Example
+```js
+_.isNative(Array.prototype.push);
+// => true
+
+_.isNative(_);
+// => false
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_isnilvalue"></a>`_.isNil(value)`
+<a href="#_isnilvalue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L11143 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isnil "See the npm package")
+
+Checks if `value` is `null` or `undefined`.
+
+#### Since
+4.0.0
+#### Arguments
+1. `value` *(*)*: The value to check.
+
+#### Returns
+*(boolean)*: Returns `true` if `value` is nullish, else `false`.
+
+#### Example
+```js
+_.isNil(null);
+// => true
+
+_.isNil(void 0);
+// => true
+
+_.isNil(NaN);
+// => false
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_isnullvalue"></a>`_.isNull(value)`
+<a href="#_isnullvalue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L11119 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isnull "See the npm package")
+
+Checks if `value` is `null`.
+
+#### Since
+0.1.0
+#### Arguments
+1. `value` *(*)*: The value to check.
+
+#### Returns
+*(boolean)*: Returns `true` if `value` is `null`, else `false`.
+
+#### Example
+```js
+_.isNull(null);
+// => true
+
+_.isNull(void 0);
+// => false
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_isnumbervalue"></a>`_.isNumber(value)`
+<a href="#_isnumbervalue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L11174 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isnumber "See the npm package")
+
+Checks if `value` is classified as a `Number` primitive or object.
+<br>
+<br>
+**Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are
+classified as numbers, use the `_.isFinite` method.
+
+#### Since
+0.1.0
+#### Arguments
+1. `value` *(*)*: The value to check.
+
+#### Returns
+*(boolean)*: Returns `true` if `value` is correctly classified, else `false`.
+
+#### Example
+```js
+_.isNumber(3);
+// => true
+
+_.isNumber(Number.MIN_VALUE);
+// => true
+
+_.isNumber(Infinity);
+// => true
+
+_.isNumber('3');
+// => false
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_isobjectvalue"></a>`_.isObject(value)`
+<a href="#_isobjectvalue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L10921 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isobject "See the npm package")
+
+Checks if `value` is the
+[language type](http://www.ecma-international.org/ecma-262/6.0/#sec-ecmascript-language-types)
+of `Object`. *(e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)*
+
+#### Since
+0.1.0
+#### Arguments
+1. `value` *(*)*: The value to check.
+
+#### Returns
+*(boolean)*: Returns `true` if `value` is an object, else `false`.
+
+#### Example
+```js
+_.isObject({});
+// => true
+
+_.isObject([1, 2, 3]);
+// => true
+
+_.isObject(_.noop);
+// => true
+
+_.isObject(null);
+// => false
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_isobjectlikevalue"></a>`_.isObjectLike(value)`
+<a href="#_isobjectlikevalue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L10950 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isobjectlike "See the npm package")
+
+Checks if `value` is object-like. A value is object-like if it's not `null`
+and has a `typeof` result of "object".
+
+#### Since
+4.0.0
+#### Arguments
+1. `value` *(*)*: The value to check.
+
+#### Returns
+*(boolean)*: Returns `true` if `value` is object-like, else `false`.
+
+#### Example
+```js
+_.isObjectLike({});
+// => true
+
+_.isObjectLike([1, 2, 3]);
+// => true
+
+_.isObjectLike(_.noop);
+// => false
+
+_.isObjectLike(null);
+// => false
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_isplainobjectvalue"></a>`_.isPlainObject(value)`
+<a href="#_isplainobjectvalue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L11208 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isplainobject "See the npm package")
+
+Checks if `value` is a plain object, that is, an object created by the
+`Object` constructor or one with a `[[Prototype]]` of `null`.
+
+#### Since
+0.8.0
+#### Arguments
+1. `value` *(*)*: The value to check.
+
+#### Returns
+*(boolean)*: Returns `true` if `value` is a plain object, else `false`.
+
+#### Example
+```js
+function Foo() {
+ this.a = 1;
+}
+
+_.isPlainObject(new Foo);
+// => false
+
+_.isPlainObject([1, 2, 3]);
+// => false
+
+_.isPlainObject({ 'x': 0, 'y': 0 });
+// => true
+
+_.isPlainObject(Object.create(null));
+// => true
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_isregexpvalue"></a>`_.isRegExp(value)`
+<a href="#_isregexpvalue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L11240 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isregexp "See the npm package")
+
+Checks if `value` is classified as a `RegExp` object.
+
+#### Since
+0.1.0
+#### Arguments
+1. `value` *(*)*: The value to check.
+
+#### Returns
+*(boolean)*: Returns `true` if `value` is correctly classified, else `false`.
+
+#### Example
+```js
+_.isRegExp(/abc/);
+// => true
+
+_.isRegExp('/abc/');
+// => false
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_issafeintegervalue"></a>`_.isSafeInteger(value)`
+<a href="#_issafeintegervalue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L11272 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.issafeinteger "See the npm package")
+
+Checks if `value` is a safe integer. An integer is safe if it's an IEEE-754
+double precision number which isn't the result of a rounded unsafe integer.
+<br>
+<br>
+**Note:** This method is based on
+[`Number.isSafeInteger`](https://mdn.io/Number/isSafeInteger).
+
+#### Since
+4.0.0
+#### Arguments
+1. `value` *(*)*: The value to check.
+
+#### Returns
+*(boolean)*: Returns `true` if `value` is a safe integer, else `false`.
+
+#### Example
+```js
+_.isSafeInteger(3);
+// => true
+
+_.isSafeInteger(Number.MIN_VALUE);
+// => false
+
+_.isSafeInteger(Infinity);
+// => false
+
+_.isSafeInteger('3');
+// => false
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_issetvalue"></a>`_.isSet(value)`
+<a href="#_issetvalue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L11294 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isset "See the npm package")
+
+Checks if `value` is classified as a `Set` object.
+
+#### Since
+4.3.0
+#### Arguments
+1. `value` *(*)*: The value to check.
+
+#### Returns
+*(boolean)*: Returns `true` if `value` is correctly classified, else `false`.
+
+#### Example
+```js
+_.isSet(new Set);
+// => true
+
+_.isSet(new WeakSet);
+// => false
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_isstringvalue"></a>`_.isString(value)`
+<a href="#_isstringvalue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L11316 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isstring "See the npm package")
+
+Checks if `value` is classified as a `String` primitive or object.
+
+#### Since
+0.1.0
+#### Arguments
+1. `value` *(*)*: The value to check.
+
+#### Returns
+*(boolean)*: Returns `true` if `value` is correctly classified, else `false`.
+
+#### Example
+```js
+_.isString('abc');
+// => true
+
+_.isString(1);
+// => false
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_issymbolvalue"></a>`_.isSymbol(value)`
+<a href="#_issymbolvalue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L11339 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.issymbol "See the npm package")
+
+Checks if `value` is classified as a `Symbol` primitive or object.
+
+#### Since
+4.0.0
+#### Arguments
+1. `value` *(*)*: The value to check.
+
+#### Returns
+*(boolean)*: Returns `true` if `value` is correctly classified, else `false`.
+
+#### Example
+```js
+_.isSymbol(Symbol.iterator);
+// => true
+
+_.isSymbol('abc');
+// => false
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_istypedarrayvalue"></a>`_.isTypedArray(value)`
+<a href="#_istypedarrayvalue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L11362 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.istypedarray "See the npm package")
+
+Checks if `value` is classified as a typed array.
+
+#### Since
+3.0.0
+#### Arguments
+1. `value` *(*)*: The value to check.
+
+#### Returns
+*(boolean)*: Returns `true` if `value` is correctly classified, else `false`.
+
+#### Example
+```js
+_.isTypedArray(new Uint8Array);
+// => true
+
+_.isTypedArray([]);
+// => false
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_isundefinedvalue"></a>`_.isUndefined(value)`
+<a href="#_isundefinedvalue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L11384 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isundefined "See the npm package")
+
+Checks if `value` is `undefined`.
+
+#### Since
+0.1.0
+#### Arguments
+1. `value` *(*)*: The value to check.
+
+#### Returns
+*(boolean)*: Returns `true` if `value` is `undefined`, else `false`.
+
+#### Example
+```js
+_.isUndefined(void 0);
+// => true
+
+_.isUndefined(null);
+// => false
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_isweakmapvalue"></a>`_.isWeakMap(value)`
+<a href="#_isweakmapvalue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L11406 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isweakmap "See the npm package")
+
+Checks if `value` is classified as a `WeakMap` object.
+
+#### Since
+4.3.0
+#### Arguments
+1. `value` *(*)*: The value to check.
+
+#### Returns
+*(boolean)*: Returns `true` if `value` is correctly classified, else `false`.
+
+#### Example
+```js
+_.isWeakMap(new WeakMap);
+// => true
+
+_.isWeakMap(new Map);
+// => false
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_isweaksetvalue"></a>`_.isWeakSet(value)`
+<a href="#_isweaksetvalue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L11428 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isweakset "See the npm package")
+
+Checks if `value` is classified as a `WeakSet` object.
+
+#### Since
+4.3.0
+#### Arguments
+1. `value` *(*)*: The value to check.
+
+#### Returns
+*(boolean)*: Returns `true` if `value` is correctly classified, else `false`.
+
+#### Example
+```js
+_.isWeakSet(new WeakSet);
+// => true
+
+_.isWeakSet(new Set);
+// => false
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_ltvalue-other"></a>`_.lt(value, other)`
+<a href="#_ltvalue-other">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L11455 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.lt "See the npm package")
+
+Checks if `value` is less than `other`.
+
+#### Since
+3.9.0
+#### Arguments
+1. `value` *(*)*: The value to compare.
+2. `other` *(*)*: The other value to compare.
+
+#### Returns
+*(boolean)*: Returns `true` if `value` is less than `other`, else `false`.
+
+#### Example
+```js
+_.lt(1, 3);
+// => true
+
+_.lt(3, 3);
+// => false
+
+_.lt(3, 1);
+// => false
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_ltevalue-other"></a>`_.lte(value, other)`
+<a href="#_ltevalue-other">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L11480 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.lte "See the npm package")
+
+Checks if `value` is less than or equal to `other`.
+
+#### Since
+3.9.0
+#### Arguments
+1. `value` *(*)*: The value to compare.
+2. `other` *(*)*: The other value to compare.
+
+#### Returns
+*(boolean)*: Returns `true` if `value` is less than or equal to `other`, else `false`.
+
+#### Example
+```js
+_.lte(1, 3);
+// => true
+
+_.lte(3, 3);
+// => true
+
+_.lte(3, 1);
+// => false
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_toarrayvalue"></a>`_.toArray(value)`
+<a href="#_toarrayvalue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L11507 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.toarray "See the npm package")
+
+Converts `value` to an array.
+
+#### Since
+0.1.0
+#### Arguments
+1. `value` *(*)*: The value to convert.
+
+#### Returns
+*(Array)*: Returns the converted array.
+
+#### Example
+```js
+_.toArray({ 'a': 1, 'b': 2 });
+// => [1, 2]
+
+_.toArray('abc');
+// => ['a', 'b', 'c']
+
+_.toArray(1);
+// => []
+
+_.toArray(null);
+// => []
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_tointegervalue"></a>`_.toInteger(value)`
+<a href="#_tointegervalue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L11549 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.tointeger "See the npm package")
+
+Converts `value` to an integer.
+<br>
+<br>
+**Note:** This function is loosely based on
+[`ToInteger`](http://www.ecma-international.org/ecma-262/6.0/#sec-tointeger).
+
+#### Since
+4.0.0
+#### Arguments
+1. `value` *(*)*: The value to convert.
+
+#### Returns
+*(number)*: Returns the converted integer.
+
+#### Example
+```js
+_.toInteger(3);
+// => 3
+
+_.toInteger(Number.MIN_VALUE);
+// => 0
+
+_.toInteger(Infinity);
+// => 1.7976931348623157e+308
+
+_.toInteger('3');
+// => 3
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_tolengthvalue"></a>`_.toLength(value)`
+<a href="#_tolengthvalue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L11589 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.tolength "See the npm package")
+
+Converts `value` to an integer suitable for use as the length of an
+array-like object.
+<br>
+<br>
+**Note:** This method is based on
+[`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength).
+
+#### Since
+4.0.0
+#### Arguments
+1. `value` *(*)*: The value to convert.
+
+#### Returns
+*(number)*: Returns the converted integer.
+
+#### Example
+```js
+_.toLength(3);
+// => 3
+
+_.toLength(Number.MIN_VALUE);
+// => 0
+
+_.toLength(Infinity);
+// => 4294967295
+
+_.toLength('3');
+// => 3
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_tonumbervalue"></a>`_.toNumber(value)`
+<a href="#_tonumbervalue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L11616 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.tonumber "See the npm package")
+
+Converts `value` to a number.
+
+#### Since
+4.0.0
+#### Arguments
+1. `value` *(*)*: The value to process.
+
+#### Returns
+*(number)*: Returns the number.
+
+#### Example
+```js
+_.toNumber(3);
+// => 3
+
+_.toNumber(Number.MIN_VALUE);
+// => 5e-324
+
+_.toNumber(Infinity);
+// => Infinity
+
+_.toNumber('3');
+// => 3
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_toplainobjectvalue"></a>`_.toPlainObject(value)`
+<a href="#_toplainobjectvalue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L11661 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.toplainobject "See the npm package")
+
+Converts `value` to a plain object flattening inherited enumerable string
+keyed properties of `value` to own properties of the plain object.
+
+#### Since
+3.0.0
+#### Arguments
+1. `value` *(*)*: The value to convert.
+
+#### Returns
+*(Object)*: Returns the converted plain object.
+
+#### Example
+```js
+function Foo() {
+ this.b = 2;
+}
+
+Foo.prototype.c = 3;
+
+_.assign({ 'a': 1 }, new Foo);
+// => { 'a': 1, 'b': 2 }
+
+_.assign({ 'a': 1 }, _.toPlainObject(new Foo));
+// => { 'a': 1, 'b': 2, 'c': 3 }
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_tosafeintegervalue"></a>`_.toSafeInteger(value)`
+<a href="#_tosafeintegervalue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L11689 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.tosafeinteger "See the npm package")
+
+Converts `value` to a safe integer. A safe integer can be compared and
+represented correctly.
+
+#### Since
+4.0.0
+#### Arguments
+1. `value` *(*)*: The value to convert.
+
+#### Returns
+*(number)*: Returns the converted integer.
+
+#### Example
+```js
+_.toSafeInteger(3);
+// => 3
+
+_.toSafeInteger(Number.MIN_VALUE);
+// => 0
+
+_.toSafeInteger(Infinity);
+// => 9007199254740991
+
+_.toSafeInteger('3');
+// => 3
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_tostringvalue"></a>`_.toString(value)`
+<a href="#_tostringvalue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L11714 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.tostring "See the npm package")
+
+Converts `value` to a string. An empty string is returned for `null`
+and `undefined` values. The sign of `-0` is preserved.
+
+#### Since
+4.0.0
+#### Arguments
+1. `value` *(*)*: The value to process.
+
+#### Returns
+*(string)*: Returns the string.
+
+#### Example
+```js
+_.toString(null);
+// => ''
+
+_.toString(-0);
+// => '-0'
+
+_.toString([1, 2, 3]);
+// => '1,2,3'
+```
+* * *
+
+<!-- /div -->
+
+<!-- /div -->
+
+<!-- div -->
+
+## `“Math” Methods`
+
+<!-- div -->
+
+### <a id="_addaugend-addend"></a>`_.add(augend, addend)`
+<a href="#_addaugend-addend">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L15229 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.add "See the npm package")
+
+Adds two numbers.
+
+#### Since
+3.4.0
+#### Arguments
+1. `augend` *(number)*: The first number in an addition.
+2. `addend` *(number)*: The second number in an addition.
+
+#### Returns
+*(number)*: Returns the total.
+
+#### Example
+```js
+_.add(6, 4);
+// => 10
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_ceilnumber-precision0"></a>`_.ceil(number, [precision=0])`
+<a href="#_ceilnumber-precision0">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L15254 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.ceil "See the npm package")
+
+Computes `number` rounded up to `precision`.
+
+#### Since
+3.10.0
+#### Arguments
+1. `number` *(number)*: The number to round up.
+2. `[precision=0]` *(number)*: The precision to round up to.
+
+#### Returns
+*(number)*: Returns the rounded up number.
+
+#### Example
+```js
+_.ceil(4.006);
+// => 5
+
+_.ceil(6.004, 2);
+// => 6.01
+
+_.ceil(6040, -2);
+// => 6100
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_dividedividend-divisor"></a>`_.divide(dividend, divisor)`
+<a href="#_dividedividend-divisor">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L15271 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.divide "See the npm package")
+
+Divide two numbers.
+
+#### Since
+4.7.0
+#### Arguments
+1. `dividend` *(number)*: The first number in a division.
+2. `divisor` *(number)*: The second number in a division.
+
+#### Returns
+*(number)*: Returns the quotient.
+
+#### Example
+```js
+_.divide(6, 4);
+// => 1.5
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_floornumber-precision0"></a>`_.floor(number, [precision=0])`
+<a href="#_floornumber-precision0">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L15296 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.floor "See the npm package")
+
+Computes `number` rounded down to `precision`.
+
+#### Since
+3.10.0
+#### Arguments
+1. `number` *(number)*: The number to round down.
+2. `[precision=0]` *(number)*: The precision to round down to.
+
+#### Returns
+*(number)*: Returns the rounded down number.
+
+#### Example
+```js
+_.floor(4.006);
+// => 4
+
+_.floor(0.046, 2);
+// => 0.04
+
+_.floor(4060, -2);
+// => 4000
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_maxarray"></a>`_.max(array)`
+<a href="#_maxarray">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L15316 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.max "See the npm package")
+
+Computes the maximum value of `array`. If `array` is empty or falsey,
+`undefined` is returned.
+
+#### Since
+0.1.0
+#### Arguments
+1. `array` *(Array)*: The array to iterate over.
+
+#### Returns
+*(*)*: Returns the maximum value.
+
+#### Example
+```js
+_.max([4, 2, 8, 6]);
+// => 8
+
+_.max([]);
+// => undefined
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_maxbyarray-iteratee_identity"></a>`_.maxBy(array, [iteratee=_.identity])`
+<a href="#_maxbyarray-iteratee_identity">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L15346 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.maxby "See the npm package")
+
+This method is like `_.max` except that it accepts `iteratee` which is
+invoked for each element in `array` to generate the criterion by which
+the value is ranked. The iteratee is invoked with one argument: *(value)*.
+
+#### Since
+4.0.0
+#### Arguments
+1. `array` *(Array)*: The array to iterate over.
+2. `[iteratee=_.identity]` *(Array|Function|Object|string)*: The iteratee invoked per element.
+
+#### Returns
+*(*)*: Returns the maximum value.
+
+#### Example
+```js
+var objects = [{ 'n': 1 }, { 'n': 2 }];
+
+_.maxBy(objects, function(o) { return o.n; });
+// => { 'n': 2 }
+
+// The `_.property` iteratee shorthand.
+_.maxBy(objects, 'n');
+// => { 'n': 2 }
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_meanarray"></a>`_.mean(array)`
+<a href="#_meanarray">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L15366 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.mean "See the npm package")
+
+Computes the mean of the values in `array`.
+
+#### Since
+4.0.0
+#### Arguments
+1. `array` *(Array)*: The array to iterate over.
+
+#### Returns
+*(number)*: Returns the mean.
+
+#### Example
+```js
+_.mean([4, 2, 8, 6]);
+// => 5
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_meanbyarray-iteratee_identity"></a>`_.meanBy(array, [iteratee=_.identity])`
+<a href="#_meanbyarray-iteratee_identity">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L15394 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.meanby "See the npm package")
+
+This method is like `_.mean` except that it accepts `iteratee` which is
+invoked for each element in `array` to generate the value to be averaged.
+The iteratee is invoked with one argument: *(value)*.
+
+#### Since
+4.7.0
+#### Arguments
+1. `array` *(Array)*: The array to iterate over.
+2. `[iteratee=_.identity]` *(Array|Function|Object|string)*: The iteratee invoked per element.
+
+#### Returns
+*(number)*: Returns the mean.
+
+#### Example
+```js
+var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }];
+
+_.meanBy(objects, function(o) { return o.n; });
+// => 5
+
+// The `_.property` iteratee shorthand.
+_.meanBy(objects, 'n');
+// => 5
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_minarray"></a>`_.min(array)`
+<a href="#_minarray">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L15416 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.min "See the npm package")
+
+Computes the minimum value of `array`. If `array` is empty or falsey,
+`undefined` is returned.
+
+#### Since
+0.1.0
+#### Arguments
+1. `array` *(Array)*: The array to iterate over.
+
+#### Returns
+*(*)*: Returns the minimum value.
+
+#### Example
+```js
+_.min([4, 2, 8, 6]);
+// => 2
+
+_.min([]);
+// => undefined
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_minbyarray-iteratee_identity"></a>`_.minBy(array, [iteratee=_.identity])`
+<a href="#_minbyarray-iteratee_identity">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L15446 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.minby "See the npm package")
+
+This method is like `_.min` except that it accepts `iteratee` which is
+invoked for each element in `array` to generate the criterion by which
+the value is ranked. The iteratee is invoked with one argument: *(value)*.
+
+#### Since
+4.0.0
+#### Arguments
+1. `array` *(Array)*: The array to iterate over.
+2. `[iteratee=_.identity]` *(Array|Function|Object|string)*: The iteratee invoked per element.
+
+#### Returns
+*(*)*: Returns the minimum value.
+
+#### Example
+```js
+var objects = [{ 'n': 1 }, { 'n': 2 }];
+
+_.minBy(objects, function(o) { return o.n; });
+// => { 'n': 1 }
+
+// The `_.property` iteratee shorthand.
+_.minBy(objects, 'n');
+// => { 'n': 1 }
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_multiplymultiplier-multiplicand"></a>`_.multiply(multiplier, multiplicand)`
+<a href="#_multiplymultiplier-multiplicand">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L15467 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.multiply "See the npm package")
+
+Multiply two numbers.
+
+#### Since
+4.7.0
+#### Arguments
+1. `multiplier` *(number)*: The first number in a multiplication.
+2. `multiplicand` *(number)*: The second number in a multiplication.
+
+#### Returns
+*(number)*: Returns the product.
+
+#### Example
+```js
+_.multiply(6, 4);
+// => 24
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_roundnumber-precision0"></a>`_.round(number, [precision=0])`
+<a href="#_roundnumber-precision0">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L15492 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.round "See the npm package")
+
+Computes `number` rounded to `precision`.
+
+#### Since
+3.10.0
+#### Arguments
+1. `number` *(number)*: The number to round.
+2. `[precision=0]` *(number)*: The precision to round to.
+
+#### Returns
+*(number)*: Returns the rounded number.
+
+#### Example
+```js
+_.round(4.006);
+// => 4
+
+_.round(4.006, 2);
+// => 4.01
+
+_.round(4060, -2);
+// => 4100
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_subtractminuend-subtrahend"></a>`_.subtract(minuend, subtrahend)`
+<a href="#_subtractminuend-subtrahend">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L15509 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.subtract "See the npm package")
+
+Subtract two numbers.
+
+#### Since
+4.0.0
+#### Arguments
+1. `minuend` *(number)*: The first number in a subtraction.
+2. `subtrahend` *(number)*: The second number in a subtraction.
+
+#### Returns
+*(number)*: Returns the difference.
+
+#### Example
+```js
+_.subtract(6, 4);
+// => 2
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_sumarray"></a>`_.sum(array)`
+<a href="#_sumarray">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L15527 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.sum "See the npm package")
+
+Computes the sum of the values in `array`.
+
+#### Since
+3.4.0
+#### Arguments
+1. `array` *(Array)*: The array to iterate over.
+
+#### Returns
+*(number)*: Returns the sum.
+
+#### Example
+```js
+_.sum([4, 2, 8, 6]);
+// => 20
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_sumbyarray-iteratee_identity"></a>`_.sumBy(array, [iteratee=_.identity])`
+<a href="#_sumbyarray-iteratee_identity">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L15557 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.sumby "See the npm package")
+
+This method is like `_.sum` except that it accepts `iteratee` which is
+invoked for each element in `array` to generate the value to be summed.
+The iteratee is invoked with one argument: *(value)*.
+
+#### Since
+4.0.0
+#### Arguments
+1. `array` *(Array)*: The array to iterate over.
+2. `[iteratee=_.identity]` *(Array|Function|Object|string)*: The iteratee invoked per element.
+
+#### Returns
+*(number)*: Returns the sum.
+
+#### Example
+```js
+var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }];
+
+_.sumBy(objects, function(o) { return o.n; });
+// => 20
+
+// The `_.property` iteratee shorthand.
+_.sumBy(objects, 'n');
+// => 20
+```
+* * *
+
+<!-- /div -->
+
+<!-- /div -->
+
+<!-- div -->
+
+## `“Number” Methods`
+
+<!-- div -->
+
+### <a id="_clampnumber-lower-upper"></a>`_.clamp(number, [lower], upper)`
+<a href="#_clampnumber-lower-upper">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L13139 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.clamp "See the npm package")
+
+Clamps `number` within the inclusive `lower` and `upper` bounds.
+
+#### Since
+4.0.0
+#### Arguments
+1. `number` *(number)*: The number to clamp.
+2. `[lower]` *(number)*: The lower bound.
+3. `upper` *(number)*: The upper bound.
+
+#### Returns
+*(number)*: Returns the clamped number.
+
+#### Example
+```js
+_.clamp(-10, -5, 5);
+// => -5
+
+_.clamp(10, -5, 5);
+// => 5
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_inrangenumber-start0-end"></a>`_.inRange(number, [start=0], end)`
+<a href="#_inrangenumber-start0-end">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L13193 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.inrange "See the npm package")
+
+Checks if `n` is between `start` and up to, but not including, `end`. If
+`end` is not specified, it's set to `start` with `start` then set to `0`.
+If `start` is greater than `end` the params are swapped to support
+negative ranges.
+
+#### Since
+3.3.0
+#### Arguments
+1. `number` *(number)*: The number to check.
+2. `[start=0]` *(number)*: The start of the range.
+3. `end` *(number)*: The end of the range.
+
+#### Returns
+*(boolean)*: Returns `true` if `number` is in the range, else `false`.
+
+#### Example
+```js
+_.inRange(3, 2, 4);
+// => true
+
+_.inRange(4, 8);
+// => true
+
+_.inRange(4, 2);
+// => false
+
+_.inRange(2, 2);
+// => false
+
+_.inRange(1.2, 2);
+// => true
+
+_.inRange(5.2, 4);
+// => false
+
+_.inRange(-3, -2, -6);
+// => true
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_randomlower0-upper1-floating"></a>`_.random([lower=0], [upper=1], [floating])`
+<a href="#_randomlower0-upper1-floating">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L13236 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.random "See the npm package")
+
+Produces a random number between the inclusive `lower` and `upper` bounds.
+If only one argument is provided a number between `0` and the given number
+is returned. If `floating` is `true`, or either `lower` or `upper` are
+floats, a floating-point number is returned instead of an integer.
+<br>
+<br>
+**Note:** JavaScript follows the IEEE-754 standard for resolving
+floating-point values which can produce unexpected results.
+
+#### Since
+0.7.0
+#### Arguments
+1. `[lower=0]` *(number)*: The lower bound.
+2. `[upper=1]` *(number)*: The upper bound.
+3. `[floating]` *(boolean)*: Specify returning a floating-point number.
+
+#### Returns
+*(number)*: Returns the random number.
+
+#### Example
+```js
+_.random(0, 5);
+// => an integer between 0 and 5
+
+_.random(5);
+// => also an integer between 0 and 5
+
+_.random(5, true);
+// => a floating-point number between 0 and 5
+
+_.random(1.2, 5.2);
+// => a floating-point number between 1.2 and 5.2
+```
+* * *
+
+<!-- /div -->
+
+<!-- /div -->
+
+<!-- div -->
+
+## `“Object” Methods`
+
+<!-- div -->
+
+### <a id="_assignobject-sources"></a>`_.assign(object, [sources])`
+<a href="#_assignobject-sources">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L11752 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.assign "See the npm package")
+
+Assigns own enumerable string keyed properties of source objects to the
+destination object. Source objects are applied from left to right.
+Subsequent sources overwrite property assignments of previous sources.
+<br>
+<br>
+**Note:** This method mutates `object` and is loosely based on
+[`Object.assign`](https://mdn.io/Object/assign).
+
+#### Since
+0.10.0
+#### Arguments
+1. `object` *(Object)*: The destination object.
+2. `[sources]` *(...Object)*: The source objects.
+
+#### Returns
+*(Object)*: Returns `object`.
+
+#### Example
+```js
+function Foo() {
+ this.c = 3;
+}
+
+function Bar() {
+ this.e = 5;
+}
+
+Foo.prototype.d = 4;
+Bar.prototype.f = 6;
+
+_.assign({ 'a': 1 }, new Foo, new Bar);
+// => { 'a': 1, 'c': 3, 'e': 5 }
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_assigninobject-sources"></a>`_.assignIn(object, [sources])`
+<a href="#_assigninobject-sources">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L11795 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.assignin "See the npm package")
+
+This method is like `_.assign` except that it iterates over own and
+inherited source properties.
+<br>
+<br>
+**Note:** This method mutates `object`.
+
+#### Since
+4.0.0
+#### Aliases
+*_.extend*
+
+#### Arguments
+1. `object` *(Object)*: The destination object.
+2. `[sources]` *(...Object)*: The source objects.
+
+#### Returns
+*(Object)*: Returns `object`.
+
+#### Example
+```js
+function Foo() {
+ this.b = 2;
+}
+
+function Bar() {
+ this.d = 4;
+}
+
+Foo.prototype.c = 3;
+Bar.prototype.e = 5;
+
+_.assignIn({ 'a': 1 }, new Foo, new Bar);
+// => { 'a': 1, 'b': 2, 'c': 3, 'd': 4, 'e': 5 }
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_assigninwithobject-sources-customizer"></a>`_.assignInWith(object, sources, [customizer])`
+<a href="#_assigninwithobject-sources-customizer">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L11834 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.assigninwith "See the npm package")
+
+This method is like `_.assignIn` except that it accepts `customizer`
+which is invoked to produce the assigned values. If `customizer` returns
+`undefined`, assignment is handled by the method instead. The `customizer`
+is invoked with five arguments: *(objValue, srcValue, key, object, source)*.
+<br>
+<br>
+**Note:** This method mutates `object`.
+
+#### Since
+4.0.0
+#### Aliases
+*_.extendWith*
+
+#### Arguments
+1. `object` *(Object)*: The destination object.
+2. `sources` *(...Object)*: The source objects.
+3. `[customizer]` *(Function)*: The function to customize assigned values.
+
+#### Returns
+*(Object)*: Returns `object`.
+
+#### Example
+```js
+function customizer(objValue, srcValue) {
+ return _.isUndefined(objValue) ? srcValue : objValue;
+}
+
+var defaults = _.partialRight(_.assignInWith, customizer);
+
+defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
+// => { 'a': 1, 'b': 2 }
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_assignwithobject-sources-customizer"></a>`_.assignWith(object, sources, [customizer])`
+<a href="#_assignwithobject-sources-customizer">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L11866 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.assignwith "See the npm package")
+
+This method is like `_.assign` except that it accepts `customizer`
+which is invoked to produce the assigned values. If `customizer` returns
+`undefined`, assignment is handled by the method instead. The `customizer`
+is invoked with five arguments: *(objValue, srcValue, key, object, source)*.
+<br>
+<br>
+**Note:** This method mutates `object`.
+
+#### Since
+4.0.0
+#### Arguments
+1. `object` *(Object)*: The destination object.
+2. `sources` *(...Object)*: The source objects.
+3. `[customizer]` *(Function)*: The function to customize assigned values.
+
+#### Returns
+*(Object)*: Returns `object`.
+
+#### Example
+```js
+function customizer(objValue, srcValue) {
+ return _.isUndefined(objValue) ? srcValue : objValue;
+}
+
+var defaults = _.partialRight(_.assignWith, customizer);
+
+defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
+// => { 'a': 1, 'b': 2 }
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_atobject-paths"></a>`_.at(object, [paths])`
+<a href="#_atobject-paths">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L11890 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.at "See the npm package")
+
+Creates an array of values corresponding to `paths` of `object`.
+
+#### Since
+1.0.0
+#### Arguments
+1. `object` *(Object)*: The object to iterate over.
+2. `[paths]` *(...(string|string[]))*: The property paths of elements to pick.
+
+#### Returns
+*(Array)*: Returns the new array of picked elements.
+
+#### Example
+```js
+var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };
+
+_.at(object, ['a[0].b.c', 'a[1]']);
+// => [3, 4]
+
+_.at(['a', 'b', 'c'], 0, 2);
+// => ['a', 'c']
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_createprototype-properties"></a>`_.create(prototype, [properties])`
+<a href="#_createprototype-properties">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L11928 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.create "See the npm package")
+
+Creates an object that inherits from the `prototype` object. If a
+`properties` object is given, its own enumerable string keyed properties
+are assigned to the created object.
+
+#### Since
+2.3.0
+#### Arguments
+1. `prototype` *(Object)*: The object to inherit from.
+2. `[properties]` *(Object)*: The properties to assign to the object.
+
+#### Returns
+*(Object)*: Returns the new object.
+
+#### Example
+```js
+function Shape() {
+ this.x = 0;
+ this.y = 0;
+}
+
+function Circle() {
+ Shape.call(this);
+}
+
+Circle.prototype = _.create(Shape.prototype, {
+ 'constructor': Circle
+});
+
+var circle = new Circle;
+circle instanceof Circle;
+// => true
+
+circle instanceof Shape;
+// => true
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_defaultsobject-sources"></a>`_.defaults(object, [sources])`
+<a href="#_defaultsobject-sources">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L11954 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.defaults "See the npm package")
+
+Assigns own and inherited enumerable string keyed properties of source
+objects to the destination object for all destination properties that
+resolve to `undefined`. Source objects are applied from left to right.
+Once a property is set, additional values of the same property are ignored.
+<br>
+<br>
+**Note:** This method mutates `object`.
+
+#### Since
+0.1.0
+#### Arguments
+1. `object` *(Object)*: The destination object.
+2. `[sources]` *(...Object)*: The source objects.
+
+#### Returns
+*(Object)*: Returns `object`.
+
+#### Example
+```js
+_.defaults({ 'user': 'barney' }, { 'age': 36 }, { 'user': 'fred' });
+// => { 'user': 'barney', 'age': 36 }
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_defaultsdeepobject-sources"></a>`_.defaultsDeep(object, [sources])`
+<a href="#_defaultsdeepobject-sources">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L11979 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.defaultsdeep "See the npm package")
+
+This method is like `_.defaults` except that it recursively assigns
+default properties.
+<br>
+<br>
+**Note:** This method mutates `object`.
+
+#### Since
+3.10.0
+#### Arguments
+1. `object` *(Object)*: The destination object.
+2. `[sources]` *(...Object)*: The source objects.
+
+#### Returns
+*(Object)*: Returns `object`.
+
+#### Example
+```js
+_.defaultsDeep({ 'user': { 'name': 'barney' } }, { 'user': { 'name': 'fred', 'age': 36 } });
+// => { 'user': { 'name': 'barney', 'age': 36 } }
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_findkeyobject-predicate_identity"></a>`_.findKey(object, [predicate=_.identity])`
+<a href="#_findkeyobject-predicate_identity">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L12020 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.findkey "See the npm package")
+
+This method is like `_.find` except that it returns the key of the first
+element `predicate` returns truthy for instead of the element itself.
+
+#### Since
+1.1.0
+#### Arguments
+1. `object` *(Object)*: The object to search.
+2. `[predicate=_.identity]` *(Array|Function|Object|string)*: The function invoked per iteration.
+
+#### Returns
+*(*)*: Returns the key of the matched element, else `undefined`.
+
+#### Example
+```js
+var users = {
+ 'barney': { 'age': 36, 'active': true },
+ 'fred': { 'age': 40, 'active': false },
+ 'pebbles': { 'age': 1, 'active': true }
+};
+
+_.findKey(users, function(o) { return o.age < 40; });
+// => 'barney' (iteration order is not guaranteed)
+
+// The `_.matches` iteratee shorthand.
+_.findKey(users, { 'age': 1, 'active': true });
+// => 'pebbles'
+
+// The `_.matchesProperty` iteratee shorthand.
+_.findKey(users, ['active', false]);
+// => 'fred'
+
+// The `_.property` iteratee shorthand.
+_.findKey(users, 'active');
+// => 'barney'
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_findlastkeyobject-predicate_identity"></a>`_.findLastKey(object, [predicate=_.identity])`
+<a href="#_findlastkeyobject-predicate_identity">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L12060 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.findlastkey "See the npm package")
+
+This method is like `_.findKey` except that it iterates over elements of
+a collection in the opposite order.
+
+#### Since
+2.0.0
+#### Arguments
+1. `object` *(Object)*: The object to search.
+2. `[predicate=_.identity]` *(Array|Function|Object|string)*: The function invoked per iteration.
+
+#### Returns
+*(*)*: Returns the key of the matched element, else `undefined`.
+
+#### Example
+```js
+var users = {
+ 'barney': { 'age': 36, 'active': true },
+ 'fred': { 'age': 40, 'active': false },
+ 'pebbles': { 'age': 1, 'active': true }
+};
+
+_.findLastKey(users, function(o) { return o.age < 40; });
+// => returns 'pebbles' assuming `_.findKey` returns 'barney'
+
+// The `_.matches` iteratee shorthand.
+_.findLastKey(users, { 'age': 36, 'active': true });
+// => 'barney'
+
+// The `_.matchesProperty` iteratee shorthand.
+_.findLastKey(users, ['active', false]);
+// => 'fred'
+
+// The `_.property` iteratee shorthand.
+_.findLastKey(users, 'active');
+// => 'pebbles'
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_forinobject-iteratee_identity"></a>`_.forIn(object, [iteratee=_.identity])`
+<a href="#_forinobject-iteratee_identity">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L12092 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.forin "See the npm package")
+
+Iterates over own and inherited enumerable string keyed properties of an
+object and invokes `iteratee` for each property. The iteratee is invoked
+with three arguments: *(value, key, object)*. Iteratee functions may exit
+iteration early by explicitly returning `false`.
+
+#### Since
+0.3.0
+#### Arguments
+1. `object` *(Object)*: The object to iterate over.
+2. `[iteratee=_.identity]` *(Function)*: The function invoked per iteration.
+
+#### Returns
+*(Object)*: Returns `object`.
+
+#### Example
+```js
+function Foo() {
+ this.a = 1;
+ this.b = 2;
+}
+
+Foo.prototype.c = 3;
+
+_.forIn(new Foo, function(value, key) {
+ console.log(key);
+});
+// => Logs 'a', 'b', then 'c' (iteration order is not guaranteed).
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_forinrightobject-iteratee_identity"></a>`_.forInRight(object, [iteratee=_.identity])`
+<a href="#_forinrightobject-iteratee_identity">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L12124 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.forinright "See the npm package")
+
+This method is like `_.forIn` except that it iterates over properties of
+`object` in the opposite order.
+
+#### Since
+2.0.0
+#### Arguments
+1. `object` *(Object)*: The object to iterate over.
+2. `[iteratee=_.identity]` *(Function)*: The function invoked per iteration.
+
+#### Returns
+*(Object)*: Returns `object`.
+
+#### Example
+```js
+function Foo() {
+ this.a = 1;
+ this.b = 2;
+}
+
+Foo.prototype.c = 3;
+
+_.forInRight(new Foo, function(value, key) {
+ console.log(key);
+});
+// => Logs 'c', 'b', then 'a' assuming `_.forIn` logs 'a', 'b', then 'c'.
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_forownobject-iteratee_identity"></a>`_.forOwn(object, [iteratee=_.identity])`
+<a href="#_forownobject-iteratee_identity">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L12158 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.forown "See the npm package")
+
+Iterates over own enumerable string keyed properties of an object and
+invokes `iteratee` for each property. The iteratee is invoked with three
+arguments: *(value, key, object)*. Iteratee functions may exit iteration
+early by explicitly returning `false`.
+
+#### Since
+0.3.0
+#### Arguments
+1. `object` *(Object)*: The object to iterate over.
+2. `[iteratee=_.identity]` *(Function)*: The function invoked per iteration.
+
+#### Returns
+*(Object)*: Returns `object`.
+
+#### Example
+```js
+function Foo() {
+ this.a = 1;
+ this.b = 2;
+}
+
+Foo.prototype.c = 3;
+
+_.forOwn(new Foo, function(value, key) {
+ console.log(key);
+});
+// => Logs 'a' then 'b' (iteration order is not guaranteed).
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_forownrightobject-iteratee_identity"></a>`_.forOwnRight(object, [iteratee=_.identity])`
+<a href="#_forownrightobject-iteratee_identity">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L12188 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.forownright "See the npm package")
+
+This method is like `_.forOwn` except that it iterates over properties of
+`object` in the opposite order.
+
+#### Since
+2.0.0
+#### Arguments
+1. `object` *(Object)*: The object to iterate over.
+2. `[iteratee=_.identity]` *(Function)*: The function invoked per iteration.
+
+#### Returns
+*(Object)*: Returns `object`.
+
+#### Example
+```js
+function Foo() {
+ this.a = 1;
+ this.b = 2;
+}
+
+Foo.prototype.c = 3;
+
+_.forOwnRight(new Foo, function(value, key) {
+ console.log(key);
+});
+// => Logs 'b' then 'a' assuming `_.forOwn` logs 'a' then 'b'.
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_functionsobject"></a>`_.functions(object)`
+<a href="#_functionsobject">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L12215 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.functions "See the npm package")
+
+Creates an array of function property names from own enumerable properties
+of `object`.
+
+#### Since
+0.1.0
+#### Arguments
+1. `object` *(Object)*: The object to inspect.
+
+#### Returns
+*(Array)*: Returns the new array of property names.
+
+#### Example
+```js
+function Foo() {
+ this.a = _.constant('a');
+ this.b = _.constant('b');
+}
+
+Foo.prototype.c = _.constant('c');
+
+_.functions(new Foo);
+// => ['a', 'b']
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_functionsinobject"></a>`_.functionsIn(object)`
+<a href="#_functionsinobject">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L12242 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.functionsin "See the npm package")
+
+Creates an array of function property names from own and inherited
+enumerable properties of `object`.
+
+#### Since
+4.0.0
+#### Arguments
+1. `object` *(Object)*: The object to inspect.
+
+#### Returns
+*(Array)*: Returns the new array of property names.
+
+#### Example
+```js
+function Foo() {
+ this.a = _.constant('a');
+ this.b = _.constant('b');
+}
+
+Foo.prototype.c = _.constant('c');
+
+_.functionsIn(new Foo);
+// => ['a', 'b', 'c']
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_getobject-path-defaultvalue"></a>`_.get(object, path, [defaultValue])`
+<a href="#_getobject-path-defaultvalue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L12271 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.get "See the npm package")
+
+Gets the value at `path` of `object`. If the resolved value is
+`undefined`, the `defaultValue` is used in its place.
+
+#### Since
+3.7.0
+#### Arguments
+1. `object` *(Object)*: The object to query.
+2. `path` *(Array|string)*: The path of the property to get.
+3. `[defaultValue]` *(*)*: The value returned for `undefined` resolved values.
+
+#### Returns
+*(*)*: Returns the resolved value.
+
+#### Example
+```js
+var object = { 'a': [{ 'b': { 'c': 3 } }] };
+
+_.get(object, 'a[0].b.c');
+// => 3
+
+_.get(object, ['a', '0', 'b', 'c']);
+// => 3
+
+_.get(object, 'a.b.c', 'default');
+// => 'default'
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_hasobject-path"></a>`_.has(object, path)`
+<a href="#_hasobject-path">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L12303 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.has "See the npm package")
+
+Checks if `path` is a direct property of `object`.
+
+#### Since
+0.1.0
+#### Arguments
+1. `object` *(Object)*: The object to query.
+2. `path` *(Array|string)*: The path to check.
+
+#### Returns
+*(boolean)*: Returns `true` if `path` exists, else `false`.
+
+#### Example
+```js
+var object = { 'a': { 'b': 2 } };
+var other = _.create({ 'a': _.create({ 'b': 2 }) });
+
+_.has(object, 'a');
+// => true
+
+_.has(object, 'a.b');
+// => true
+
+_.has(object, ['a', 'b']);
+// => true
+
+_.has(other, 'a');
+// => false
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_hasinobject-path"></a>`_.hasIn(object, path)`
+<a href="#_hasinobject-path">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L12333 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.hasin "See the npm package")
+
+Checks if `path` is a direct or inherited property of `object`.
+
+#### Since
+4.0.0
+#### Arguments
+1. `object` *(Object)*: The object to query.
+2. `path` *(Array|string)*: The path to check.
+
+#### Returns
+*(boolean)*: Returns `true` if `path` exists, else `false`.
+
+#### Example
+```js
+var object = _.create({ 'a': _.create({ 'b': 2 }) });
+
+_.hasIn(object, 'a');
+// => true
+
+_.hasIn(object, 'a.b');
+// => true
+
+_.hasIn(object, ['a', 'b']);
+// => true
+
+_.hasIn(object, 'b');
+// => false
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_invertobject"></a>`_.invert(object)`
+<a href="#_invertobject">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L12355 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.invert "See the npm package")
+
+Creates an object composed of the inverted keys and values of `object`.
+If `object` contains duplicate values, subsequent values overwrite
+property assignments of previous values.
+
+#### Since
+0.7.0
+#### Arguments
+1. `object` *(Object)*: The object to invert.
+
+#### Returns
+*(Object)*: Returns the new inverted object.
+
+#### Example
+```js
+var object = { 'a': 1, 'b': 2, 'c': 1 };
+
+_.invert(object);
+// => { '1': 'c', '2': 'b' }
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_invertbyobject-iteratee_identity"></a>`_.invertBy(object, [iteratee=_.identity])`
+<a href="#_invertbyobject-iteratee_identity">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L12386 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.invertby "See the npm package")
+
+This method is like `_.invert` except that the inverted object is generated
+from the results of running each element of `object` thru `iteratee`. The
+corresponding inverted value of each inverted key is an array of keys
+responsible for generating the inverted value. The iteratee is invoked
+with one argument: *(value)*.
+
+#### Since
+4.1.0
+#### Arguments
+1. `object` *(Object)*: The object to invert.
+2. `[iteratee=_.identity]` *(Array|Function|Object|string)*: The iteratee invoked per element.
+
+#### Returns
+*(Object)*: Returns the new inverted object.
+
+#### Example
+```js
+var object = { 'a': 1, 'b': 2, 'c': 1 };
+
+_.invertBy(object);
+// => { '1': ['a', 'c'], '2': ['b'] }
+
+_.invertBy(object, function(value) {
+ return 'group' + value;
+});
+// => { 'group1': ['a', 'c'], 'group2': ['b'] }
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_invokeobject-path-args"></a>`_.invoke(object, path, [args])`
+<a href="#_invokeobject-path-args">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L12412 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.invoke "See the npm package")
+
+Invokes the method at `path` of `object`.
+
+#### Since
+4.0.0
+#### Arguments
+1. `object` *(Object)*: The object to query.
+2. `path` *(Array|string)*: The path of the method to invoke.
+3. `[args]` *(...*)*: The arguments to invoke the method with.
+
+#### Returns
+*(*)*: Returns the result of the invoked method.
+
+#### Example
+```js
+var object = { 'a': [{ 'b': { 'c': [1, 2, 3, 4] } }] };
+
+_.invoke(object, 'a[0].b.c.slice', 1, 3);
+// => [2, 3]
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_keysobject"></a>`_.keys(object)`
+<a href="#_keysobject">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L12442 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.keys "See the npm package")
+
+Creates an array of the own enumerable property names of `object`.
+<br>
+<br>
+**Note:** Non-object values are coerced to objects. See the
+[ES spec](http://ecma-international.org/ecma-262/6.0/#sec-object.keys)
+for more details.
+
+#### Since
+0.1.0
+#### Arguments
+1. `object` *(Object)*: The object to query.
+
+#### Returns
+*(Array)*: Returns the array of property names.
+
+#### Example
+```js
+function Foo() {
+ this.a = 1;
+ this.b = 2;
+}
+
+Foo.prototype.c = 3;
+
+_.keys(new Foo);
+// => ['a', 'b'] (iteration order is not guaranteed)
+
+_.keys('hi');
+// => ['0', '1']
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_keysinobject"></a>`_.keysIn(object)`
+<a href="#_keysinobject">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L12485 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.keysin "See the npm package")
+
+Creates an array of the own and inherited enumerable property names of `object`.
+<br>
+<br>
+**Note:** Non-object values are coerced to objects.
+
+#### Since
+3.0.0
+#### Arguments
+1. `object` *(Object)*: The object to query.
+
+#### Returns
+*(Array)*: Returns the array of property names.
+
+#### Example
+```js
+function Foo() {
+ this.a = 1;
+ this.b = 2;
+}
+
+Foo.prototype.c = 3;
+
+_.keysIn(new Foo);
+// => ['a', 'b', 'c'] (iteration order is not guaranteed)
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_mapkeysobject-iteratee_identity"></a>`_.mapKeys(object, [iteratee=_.identity])`
+<a href="#_mapkeysobject-iteratee_identity">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L12527 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.mapkeys "See the npm package")
+
+The opposite of `_.mapValues`; this method creates an object with the
+same values as `object` and keys generated by running each own enumerable
+string keyed property of `object` thru `iteratee`. The iteratee is invoked
+with three arguments: *(value, key, object)*.
+
+#### Since
+3.8.0
+#### Arguments
+1. `object` *(Object)*: The object to iterate over.
+2. `[iteratee=_.identity]` *(Array|Function|Object|string)*: The function invoked per iteration.
+
+#### Returns
+*(Object)*: Returns the new mapped object.
+
+#### Example
+```js
+_.mapKeys({ 'a': 1, 'b': 2 }, function(value, key) {
+ return key + value;
+});
+// => { 'a1': 1, 'b2': 2 }
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_mapvaluesobject-iteratee_identity"></a>`_.mapValues(object, [iteratee=_.identity])`
+<a href="#_mapvaluesobject-iteratee_identity">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L12566 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.mapvalues "See the npm package")
+
+Creates an object with the same keys as `object` and values generated
+by running each own enumerable string keyed property of `object` thru
+`iteratee`. The iteratee is invoked with three arguments:<br>
+*(value, key, object)*.
+
+#### Since
+2.4.0
+#### Arguments
+1. `object` *(Object)*: The object to iterate over.
+2. `[iteratee=_.identity]` *(Array|Function|Object|string)*: The function invoked per iteration.
+
+#### Returns
+*(Object)*: Returns the new mapped object.
+
+#### Example
+```js
+var users = {
+ 'fred': { 'user': 'fred', 'age': 40 },
+ 'pebbles': { 'user': 'pebbles', 'age': 1 }
+};
+
+_.mapValues(users, function(o) { return o.age; });
+// => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)
+
+// The `_.property` iteratee shorthand.
+_.mapValues(users, 'age');
+// => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_mergeobject-sources"></a>`_.merge(object, [sources])`
+<a href="#_mergeobject-sources">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L12607 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.merge "See the npm package")
+
+This method is like `_.assign` except that it recursively merges own and
+inherited enumerable string keyed properties of source objects into the
+destination object. Source properties that resolve to `undefined` are
+skipped if a destination value exists. Array and plain object properties
+are merged recursively.Other objects and value types are overridden by
+assignment. Source objects are applied from left to right. Subsequent
+sources overwrite property assignments of previous sources.
+<br>
+<br>
+**Note:** This method mutates `object`.
+
+#### Since
+0.5.0
+#### Arguments
+1. `object` *(Object)*: The destination object.
+2. `[sources]` *(...Object)*: The source objects.
+
+#### Returns
+*(Object)*: Returns `object`.
+
+#### Example
+```js
+var users = {
+ 'data': [{ 'user': 'barney' }, { 'user': 'fred' }]
+};
+
+var ages = {
+ 'data': [{ 'age': 36 }, { 'age': 40 }]
+};
+
+_.merge(users, ages);
+// => { 'data': [{ 'user': 'barney', 'age': 36 }, { 'user': 'fred', 'age': 40 }] }
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_mergewithobject-sources-customizer"></a>`_.mergeWith(object, sources, customizer)`
+<a href="#_mergewithobject-sources-customizer">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L12649 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.mergewith "See the npm package")
+
+This method is like `_.merge` except that it accepts `customizer` which
+is invoked to produce the merged values of the destination and source
+properties. If `customizer` returns `undefined`, merging is handled by the
+method instead. The `customizer` is invoked with seven arguments:<br>
+*(objValue, srcValue, key, object, source, stack)*.
+<br>
+<br>
+**Note:** This method mutates `object`.
+
+#### Since
+4.0.0
+#### Arguments
+1. `object` *(Object)*: The destination object.
+2. `sources` *(...Object)*: The source objects.
+3. `customizer` *(Function)*: The function to customize assigned values.
+
+#### Returns
+*(Object)*: Returns `object`.
+
+#### Example
+```js
+function customizer(objValue, srcValue) {
+ if (_.isArray(objValue)) {
+ return objValue.concat(srcValue);
+ }
+}
+
+var object = {
+ 'fruits': ['apple'],
+ 'vegetables': ['beet']
+};
+
+var other = {
+ 'fruits': ['banana'],
+ 'vegetables': ['carrot']
+};
+
+_.mergeWith(object, other, customizer);
+// => { 'fruits': ['apple', 'banana'], 'vegetables': ['beet', 'carrot'] }
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_omitobject-props"></a>`_.omit(object, [props])`
+<a href="#_omitobject-props">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L12672 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.omit "See the npm package")
+
+The opposite of `_.pick`; this method creates an object composed of the
+own and inherited enumerable string keyed properties of `object` that are
+not omitted.
+
+#### Since
+0.1.0
+#### Arguments
+1. `object` *(Object)*: The source object.
+2. `[props]` *(...(string|string[]))*: The property identifiers to omit.
+
+#### Returns
+*(Object)*: Returns the new object.
+
+#### Example
+```js
+var object = { 'a': 1, 'b': '2', 'c': 3 };
+
+_.omit(object, ['a', 'c']);
+// => { 'b': '2' }
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_omitbyobject-predicate_identity"></a>`_.omitBy(object, [predicate=_.identity])`
+<a href="#_omitbyobject-predicate_identity">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L12701 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.omitby "See the npm package")
+
+The opposite of `_.pickBy`; this method creates an object composed of
+the own and inherited enumerable string keyed properties of `object` that
+`predicate` doesn't return truthy for. The predicate is invoked with two
+arguments: *(value, key)*.
+
+#### Since
+4.0.0
+#### Arguments
+1. `object` *(Object)*: The source object.
+2. `[predicate=_.identity]` *(Array|Function|Object|string)*: The function invoked per property.
+
+#### Returns
+*(Object)*: Returns the new object.
+
+#### Example
+```js
+var object = { 'a': 1, 'b': '2', 'c': 3 };
+
+_.omitBy(object, _.isNumber);
+// => { 'b': '2' }
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_pickobject-props"></a>`_.pick(object, [props])`
+<a href="#_pickobject-props">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L12725 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.pick "See the npm package")
+
+Creates an object composed of the picked `object` properties.
+
+#### Since
+0.1.0
+#### Arguments
+1. `object` *(Object)*: The source object.
+2. `[props]` *(...(string|string[]))*: The property identifiers to pick.
+
+#### Returns
+*(Object)*: Returns the new object.
+
+#### Example
+```js
+var object = { 'a': 1, 'b': '2', 'c': 3 };
+
+_.pick(object, ['a', 'c']);
+// => { 'a': 1, 'c': 3 }
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_pickbyobject-predicate_identity"></a>`_.pickBy(object, [predicate=_.identity])`
+<a href="#_pickbyobject-predicate_identity">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L12748 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.pickby "See the npm package")
+
+Creates an object composed of the `object` properties `predicate` returns
+truthy for. The predicate is invoked with two arguments: *(value, key)*.
+
+#### Since
+4.0.0
+#### Arguments
+1. `object` *(Object)*: The source object.
+2. `[predicate=_.identity]` *(Array|Function|Object|string)*: The function invoked per property.
+
+#### Returns
+*(Object)*: Returns the new object.
+
+#### Example
+```js
+var object = { 'a': 1, 'b': '2', 'c': 3 };
+
+_.pickBy(object, _.isNumber);
+// => { 'a': 1, 'c': 3 }
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_resultobject-path-defaultvalue"></a>`_.result(object, path, [defaultValue])`
+<a href="#_resultobject-path-defaultvalue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L12781 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.result "See the npm package")
+
+This method is like `_.get` except that if the resolved value is a
+function it's invoked with the `this` binding of its parent object and
+its result is returned.
+
+#### Since
+0.1.0
+#### Arguments
+1. `object` *(Object)*: The object to query.
+2. `path` *(Array|string)*: The path of the property to resolve.
+3. `[defaultValue]` *(*)*: The value returned for `undefined` resolved values.
+
+#### Returns
+*(*)*: Returns the resolved value.
+
+#### Example
+```js
+var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] };
+
+_.result(object, 'a[0].b.c1');
+// => 3
+
+_.result(object, 'a[0].b.c2');
+// => 4
+
+_.result(object, 'a[0].b.c3', 'default');
+// => 'default'
+
+_.result(object, 'a[0].b.c3', _.constant('default'));
+// => 'default'
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_setobject-path-value"></a>`_.set(object, path, value)`
+<a href="#_setobject-path-value">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L12831 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.set "See the npm package")
+
+Sets the value at `path` of `object`. If a portion of `path` doesn't exist,
+it's created. Arrays are created for missing index properties while objects
+are created for all other missing properties. Use `_.setWith` to customize
+`path` creation.
+<br>
+<br>
+**Note:** This method mutates `object`.
+
+#### Since
+3.7.0
+#### Arguments
+1. `object` *(Object)*: The object to modify.
+2. `path` *(Array|string)*: The path of the property to set.
+3. `value` *(*)*: The value to set.
+
+#### Returns
+*(Object)*: Returns `object`.
+
+#### Example
+```js
+var object = { 'a': [{ 'b': { 'c': 3 } }] };
+
+_.set(object, 'a[0].b.c', 4);
+console.log(object.a[0].b.c);
+// => 4
+
+_.set(object, ['x', '0', 'y', 'z'], 5);
+console.log(object.x[0].y.z);
+// => 5
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_setwithobject-path-value-customizer"></a>`_.setWith(object, path, value, [customizer])`
+<a href="#_setwithobject-path-value-customizer">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L12859 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.setwith "See the npm package")
+
+This method is like `_.set` except that it accepts `customizer` which is
+invoked to produce the objects of `path`. If `customizer` returns `undefined`
+path creation is handled by the method instead. The `customizer` is invoked
+with three arguments: *(nsValue, key, nsObject)*.
+<br>
+<br>
+**Note:** This method mutates `object`.
+
+#### Since
+4.0.0
+#### Arguments
+1. `object` *(Object)*: The object to modify.
+2. `path` *(Array|string)*: The path of the property to set.
+3. `value` *(*)*: The value to set.
+4. `[customizer]` *(Function)*: The function to customize assigned values.
+
+#### Returns
+*(Object)*: Returns `object`.
+
+#### Example
+```js
+var object = {};
+
+_.setWith(object, '[0][1]', 'a', Object);
+// => { '0': { '1': 'a' } }
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_topairsobject"></a>`_.toPairs(object)`
+<a href="#_topairsobject">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L12887 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.topairs "See the npm package")
+
+Creates an array of own enumerable string keyed-value pairs for `object`
+which can be consumed by `_.fromPairs`.
+
+#### Since
+4.0.0
+#### Aliases
+*_.entries*
+
+#### Arguments
+1. `object` *(Object)*: The object to query.
+
+#### Returns
+*(Array)*: Returns the new array of key-value pairs.
+
+#### Example
+```js
+function Foo() {
+ this.a = 1;
+ this.b = 2;
+}
+
+Foo.prototype.c = 3;
+
+_.toPairs(new Foo);
+// => [['a', 1], ['b', 2]] (iteration order is not guaranteed)
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_topairsinobject"></a>`_.toPairsIn(object)`
+<a href="#_topairsinobject">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L12914 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.topairsin "See the npm package")
+
+Creates an array of own and inherited enumerable string keyed-value pairs
+for `object` which can be consumed by `_.fromPairs`.
+
+#### Since
+4.0.0
+#### Aliases
+*_.entriesIn*
+
+#### Arguments
+1. `object` *(Object)*: The object to query.
+
+#### Returns
+*(Array)*: Returns the new array of key-value pairs.
+
+#### Example
+```js
+function Foo() {
+ this.a = 1;
+ this.b = 2;
+}
+
+Foo.prototype.c = 3;
+
+_.toPairsIn(new Foo);
+// => [['a', 1], ['b', 2], ['c', 1]] (iteration order is not guaranteed)
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_transformobject-iteratee_identity-accumulator"></a>`_.transform(object, [iteratee=_.identity], [accumulator])`
+<a href="#_transformobject-iteratee_identity-accumulator">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L12947 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.transform "See the npm package")
+
+An alternative to `_.reduce`; this method transforms `object` to a new
+`accumulator` object which is the result of running each of its own
+enumerable string keyed properties thru `iteratee`, with each invocation
+potentially mutating the `accumulator` object. The iteratee is invoked
+with four arguments: *(accumulator, value, key, object)*. Iteratee functions
+may exit iteration early by explicitly returning `false`.
+
+#### Since
+1.3.0
+#### Arguments
+1. `object` *(Array|Object)*: The object to iterate over.
+2. `[iteratee=_.identity]` *(Function)*: The function invoked per iteration.
+3. `[accumulator]` *(*)*: The custom accumulator value.
+
+#### Returns
+*(*)*: Returns the accumulated value.
+
+#### Example
+```js
+_.transform([2, 3, 4], function(result, n) {
+ result.push(n *= n);
+ return n % 2 == 0;
+}, []);
+// => [4, 9]
+
+_.transform({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {
+ (result[value] || (result[value] = [])).push(key);
+}, {});
+// => { '1': ['a', 'c'], '2': ['b'] }
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_unsetobject-path"></a>`_.unset(object, path)`
+<a href="#_unsetobject-path">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L12996 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.unset "See the npm package")
+
+Removes the property at `path` of `object`.
+<br>
+<br>
+**Note:** This method mutates `object`.
+
+#### Since
+4.0.0
+#### Arguments
+1. `object` *(Object)*: The object to modify.
+2. `path` *(Array|string)*: The path of the property to unset.
+
+#### Returns
+*(boolean)*: Returns `true` if the property is deleted, else `false`.
+
+#### Example
+```js
+var object = { 'a': [{ 'b': { 'c': 7 } }] };
+_.unset(object, 'a[0].b.c');
+// => true
+
+console.log(object);
+// => { 'a': [{ 'b': {} }] };
+
+_.unset(object, ['a', '0', 'b', 'c']);
+// => true
+
+console.log(object);
+// => { 'a': [{ 'b': {} }] };
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_updateobject-path-updater"></a>`_.update(object, path, updater)`
+<a href="#_updateobject-path-updater">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L13027 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.update "See the npm package")
+
+This method is like `_.set` except that accepts `updater` to produce the
+value to set. Use `_.updateWith` to customize `path` creation. The `updater`
+is invoked with one argument: *(value)*.
+<br>
+<br>
+**Note:** This method mutates `object`.
+
+#### Since
+4.6.0
+#### Arguments
+1. `object` *(Object)*: The object to modify.
+2. `path` *(Array|string)*: The path of the property to set.
+3. `updater` *(Function)*: The function to produce the updated value.
+
+#### Returns
+*(Object)*: Returns `object`.
+
+#### Example
+```js
+var object = { 'a': [{ 'b': { 'c': 3 } }] };
+
+_.update(object, 'a[0].b.c', function(n) { return n * n; });
+console.log(object.a[0].b.c);
+// => 9
+
+_.update(object, 'x[0].y.z', function(n) { return n ? n + 1 : 0; });
+console.log(object.x[0].y.z);
+// => 0
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_updatewithobject-path-updater-customizer"></a>`_.updateWith(object, path, updater, [customizer])`
+<a href="#_updatewithobject-path-updater-customizer">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L13055 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.updatewith "See the npm package")
+
+This method is like `_.update` except that it accepts `customizer` which is
+invoked to produce the objects of `path`. If `customizer` returns `undefined`
+path creation is handled by the method instead. The `customizer` is invoked
+with three arguments: *(nsValue, key, nsObject)*.
+<br>
+<br>
+**Note:** This method mutates `object`.
+
+#### Since
+4.6.0
+#### Arguments
+1. `object` *(Object)*: The object to modify.
+2. `path` *(Array|string)*: The path of the property to set.
+3. `updater` *(Function)*: The function to produce the updated value.
+4. `[customizer]` *(Function)*: The function to customize assigned values.
+
+#### Returns
+*(Object)*: Returns `object`.
+
+#### Example
+```js
+var object = {};
+
+_.updateWith(object, '[0][1]', _.constant('a'), Object);
+// => { '0': { '1': 'a' } }
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_valuesobject"></a>`_.values(object)`
+<a href="#_valuesobject">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L13086 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.values "See the npm package")
+
+Creates an array of the own enumerable string keyed property values of `object`.
+<br>
+<br>
+**Note:** Non-object values are coerced to objects.
+
+#### Since
+0.1.0
+#### Arguments
+1. `object` *(Object)*: The object to query.
+
+#### Returns
+*(Array)*: Returns the array of property values.
+
+#### Example
+```js
+function Foo() {
+ this.a = 1;
+ this.b = 2;
+}
+
+Foo.prototype.c = 3;
+
+_.values(new Foo);
+// => [1, 2] (iteration order is not guaranteed)
+
+_.values('hi');
+// => ['h', 'i']
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_valuesinobject"></a>`_.valuesIn(object)`
+<a href="#_valuesinobject">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L13114 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.valuesin "See the npm package")
+
+Creates an array of the own and inherited enumerable string keyed property
+values of `object`.
+<br>
+<br>
+**Note:** Non-object values are coerced to objects.
+
+#### Since
+3.0.0
+#### Arguments
+1. `object` *(Object)*: The object to query.
+
+#### Returns
+*(Array)*: Returns the array of property values.
+
+#### Example
+```js
+function Foo() {
+ this.a = 1;
+ this.b = 2;
+}
+
+Foo.prototype.c = 3;
+
+_.valuesIn(new Foo);
+// => [1, 2, 3] (iteration order is not guaranteed)
+```
+* * *
+
+<!-- /div -->
+
+<!-- /div -->
+
+<!-- div -->
+
+## `“Seq” Methods`
+
+<!-- div -->
+
+### <a id="_value"></a>`_(value)`
+<a href="#_value">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L1457 "View in source") [Ⓣ][1]
+
+Creates a `lodash` object which wraps `value` to enable implicit method
+chain sequences. Methods that operate on and return arrays, collections,
+and functions can be chained together. Methods that retrieve a single value
+or may return a primitive value will automatically end the chain sequence
+and return the unwrapped value. Otherwise, the value must be unwrapped
+with `_#value`.
+<br>
+<br>
+Explicit chain sequences, which must be unwrapped with `_#value`, may be
+enabled using `_.chain`.
+<br>
+<br>
+The execution of chained methods is lazy, that is, it's deferred until
+`_#value` is implicitly or explicitly called.
+<br>
+<br>
+Lazy evaluation allows several methods to support shortcut fusion.
+Shortcut fusion is an optimization to merge iteratee calls; this avoids
+the creation of intermediate arrays and can greatly reduce the number of
+iteratee executions. Sections of a chain sequence qualify for shortcut
+fusion if the section is applied to an array of at least `200` elements
+and any iteratees accept only one argument. The heuristic for whether a
+section qualifies for shortcut fusion is subject to change.
+<br>
+<br>
+Chaining is supported in custom builds as long as the `_#value` method is
+directly or indirectly included in the build.
+<br>
+<br>
+In addition to lodash methods, wrappers have `Array` and `String` methods.
+<br>
+<br>
+The wrapper `Array` methods are:<br>
+`concat`, `join`, `pop`, `push`, `shift`, `sort`, `splice`, and `unshift`
+<br>
+<br>
+The wrapper `String` methods are:<br>
+`replace` and `split`
+<br>
+<br>
+The wrapper methods that support shortcut fusion are:<br>
+`at`, `compact`, `drop`, `dropRight`, `dropWhile`, `filter`, `find`,
+`findLast`, `head`, `initial`, `last`, `map`, `reject`, `reverse`, `slice`,
+`tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, and `toArray`
+<br>
+<br>
+The chainable wrapper methods are:<br>
+`after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`,
+`before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`,
+`commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`,
+`curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`,
+`difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`,
+`dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`,
+`flatMap`, `flatMapDeep`, `flatMapDepth`, `flatten`, `flattenDeep`,
+`flattenDepth`, `flip`, `flow`, `flowRight`, `fromPairs`, `functions`,
+`functionsIn`, `groupBy`, `initial`, `intersection`, `intersectionBy`,
+`intersectionWith`, `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`,
+`keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`,
+`memoize`, `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`,
+`nthArg`, `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`,
+`overEvery`, `overSome`, `partial`, `partialRight`, `partition`, `pick`,
+`pickBy`, `plant`, `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`,
+`pullAllWith`, `pullAt`, `push`, `range`, `rangeRight`, `rearg`, `reject`,
+`remove`, `rest`, `reverse`, `sampleSize`, `set`, `setWith`, `shuffle`,
+`slice`, `sort`, `sortBy`, `splice`, `spread`, `tail`, `take`, `takeRight`,
+`takeRightWhile`, `takeWhile`, `tap`, `throttle`, `thru`, `toArray`,
+`toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, `transform`, `unary`,
+`union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`,
+`unshift`, `unzip`, `unzipWith`, `update`, `updateWith`, `values`,
+`valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`,
+`zipObject`, `zipObjectDeep`, and `zipWith`
+<br>
+<br>
+The wrapper methods that are **not** chainable by default are:<br>
+`add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`,
+`cloneDeep`, `cloneDeepWith`, `cloneWith`, `deburr`, `divide`, `each`,
+`eachRight`, `endsWith`, `eq`, `escape`, `escapeRegExp`, `every`, `find`,
+`findIndex`, `findKey`, `findLast`, `findLastIndex`, `findLastKey`, `first`,
+`floor`, `forEach`, `forEachRight`, `forIn`, `forInRight`, `forOwn`,
+`forOwnRight`, `get`, `gt`, `gte`, `has`, `hasIn`, `head`, `identity`,
+`includes`, `indexOf`, `inRange`, `invoke`, `isArguments`, `isArray`,
+`isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`, `isBoolean`, `isBuffer`,
+`isDate`, `isElement`, `isEmpty`, `isEqual`, `isEqualWith`, `isError`,
+`isFinite`, `isFunction`, `isInteger`, `isLength`, `isMap`, `isMatch`,
+`isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`, `isNumber`,
+`isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`, `isSafeInteger`,
+`isSet`, `isString`, `isUndefined`, `isTypedArray`, `isWeakMap`, `isWeakSet`,
+`join`, `kebabCase`, `last`, `lastIndexOf`, `lowerCase`, `lowerFirst`,
+`lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`, `min`, `minBy`, `multiply`,
+`noConflict`, `noop`, `now`, `nth`, `pad`, `padEnd`, `padStart`, `parseInt`,
+`pop`, `random`, `reduce`, `reduceRight`, `repeat`, `result`, `round`,
+`runInContext`, `sample`, `shift`, `size`, `snakeCase`, `some`, `sortedIndex`,
+`sortedIndexBy`, `sortedLastIndex`, `sortedLastIndexBy`, `startCase`,
+`startsWith`, `subtract`, `sum`, `sumBy`, `template`, `times`, `toInteger`,
+`toJSON`, `toLength`, `toLower`, `toNumber`, `toSafeInteger`, `toString`,
+`toUpper`, `trim`, `trimEnd`, `trimStart`, `truncate`, `unescape`,
+`uniqueId`, `upperCase`, `upperFirst`, `value`, and `words`
+
+#### Arguments
+1. `value` *(*)*: The value to wrap in a `lodash` instance.
+
+#### Returns
+*(Object)*: Returns the new `lodash` wrapper instance.
+
+#### Example
+```js
+function square(n) {
+ return n * n;
+}
+
+var wrapped = _([1, 2, 3]);
+
+// Returns an unwrapped value.
+wrapped.reduce(_.add);
+// => 6
+
+// Returns a wrapped value.
+var squares = wrapped.map(square);
+
+_.isArray(squares);
+// => false
+
+_.isArray(squares.value());
+// => true
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_chainvalue"></a>`_.chain(value)`
+<a href="#_chainvalue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L7876 "View in source") [Ⓣ][1]
+
+Creates a `lodash` wrapper instance that wraps `value` with explicit method
+chain sequences enabled. The result of such sequences must be unwrapped
+with `_#value`.
+
+#### Since
+1.3.0
+#### Arguments
+1. `value` *(*)*: The value to wrap.
+
+#### Returns
+*(Object)*: Returns the new `lodash` wrapper instance.
+
+#### Example
+```js
+var users = [
+ { 'user': 'barney', 'age': 36 },
+ { 'user': 'fred', 'age': 40 },
+ { 'user': 'pebbles', 'age': 1 }
+];
+
+var youngest = _
+ .chain(users)
+ .sortBy('age')
+ .map(function(o) {
+ return o.user + ' is ' + o.age;
+ })
+ .head()
+ .value();
+// => 'pebbles is 1'
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_tapvalue-interceptor"></a>`_.tap(value, interceptor)`
+<a href="#_tapvalue-interceptor">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L7905 "View in source") [Ⓣ][1]
+
+This method invokes `interceptor` and returns `value`. The interceptor
+is invoked with one argument; *(value)*. The purpose of this method is to
+"tap into" a method chain sequence in order to modify intermediate results.
+
+#### Since
+0.1.0
+#### Arguments
+1. `value` *(*)*: The value to provide to `interceptor`.
+2. `interceptor` *(Function)*: The function to invoke.
+
+#### Returns
+*(*)*: Returns `value`.
+
+#### Example
+```js
+_([1, 2, 3])
+ .tap(function(array) {
+ // Mutate input array.
+ array.pop();
+ })
+ .reverse()
+ .value();
+// => [2, 1]
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_thruvalue-interceptor"></a>`_.thru(value, interceptor)`
+<a href="#_thruvalue-interceptor">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L7933 "View in source") [Ⓣ][1]
+
+This method is like `_.tap` except that it returns the result of `interceptor`.
+The purpose of this method is to "pass thru" values replacing intermediate
+results in a method chain sequence.
+
+#### Since
+3.0.0
+#### Arguments
+1. `value` *(*)*: The value to provide to `interceptor`.
+2. `interceptor` *(Function)*: The function to invoke.
+
+#### Returns
+*(*)*: Returns the result of `interceptor`.
+
+#### Example
+```js
+_(' abc ')
+ .chain()
+ .trim()
+ .thru(function(value) {
+ return [value];
+ })
+ .value();
+// => ['abc']
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_prototypesymboliterator"></a>`_.prototype[Symbol.iterator]()`
+<a href="#_prototypesymboliterator">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L8092 "View in source") [Ⓣ][1]
+
+Enables the wrapper to be iterable.
+
+#### Since
+4.0.0
+#### Returns
+*(Object)*: Returns the wrapper object.
+
+#### Example
+```js
+var wrapped = _([1, 2]);
+
+wrapped[Symbol.iterator]() === wrapped;
+// => true
+
+Array.from(wrapped);
+// => [1, 2]
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_prototypeatpaths"></a>`_.prototype.at([paths])`
+<a href="#_prototypeatpaths">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L7956 "View in source") [Ⓣ][1]
+
+This method is the wrapper version of `_.at`.
+
+#### Since
+1.0.0
+#### Arguments
+1. `[paths]` *(...(string|string[]))*: The property paths of elements to pick.
+
+#### Returns
+*(Object)*: Returns the new `lodash` wrapper instance.
+
+#### Example
+```js
+var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };
+
+_(object).at(['a[0].b.c', 'a[1]']).value();
+// => [3, 4]
+
+_(['a', 'b', 'c']).at(0, 2).value();
+// => ['a', 'c']
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_prototypechain"></a>`_.prototype.chain()`
+<a href="#_prototypechain">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L8008 "View in source") [Ⓣ][1]
+
+Creates a `lodash` wrapper instance with explicit method chain sequences enabled.
+
+#### Since
+0.1.0
+#### Returns
+*(Object)*: Returns the new `lodash` wrapper instance.
+
+#### Example
+```js
+var users = [
+ { 'user': 'barney', 'age': 36 },
+ { 'user': 'fred', 'age': 40 }
+];
+
+// A sequence without explicit chaining.
+_(users).head();
+// => { 'user': 'barney', 'age': 36 }
+
+// A sequence with explicit chaining.
+_(users)
+ .chain()
+ .head()
+ .pick('user')
+ .value();
+// => { 'user': 'barney' }
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_prototypecommit"></a>`_.prototype.commit()`
+<a href="#_prototypecommit">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L8038 "View in source") [Ⓣ][1]
+
+Executes the chain sequence and returns the wrapped result.
+
+#### Since
+3.2.0
+#### Returns
+*(Object)*: Returns the new `lodash` wrapper instance.
+
+#### Example
+```js
+var array = [1, 2];
+var wrapped = _(array).push(3);
+
+console.log(array);
+// => [1, 2]
+
+wrapped = wrapped.commit();
+console.log(array);
+// => [1, 2, 3]
+
+wrapped.last();
+// => 3
+
+console.log(array);
+// => [1, 2, 3]
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_prototypenext"></a>`_.prototype.next()`
+<a href="#_prototypenext">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L8064 "View in source") [Ⓣ][1]
+
+Gets the next value on a wrapped object following the
+[iterator protocol](https://mdn.io/iteration_protocols#iterator).
+
+#### Since
+4.0.0
+#### Returns
+*(Object)*: Returns the next iterator value.
+
+#### Example
+```js
+var wrapped = _([1, 2]);
+
+wrapped.next();
+// => { 'done': false, 'value': 1 }
+
+wrapped.next();
+// => { 'done': false, 'value': 2 }
+
+wrapped.next();
+// => { 'done': true, 'value': undefined }
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_prototypeplantvalue"></a>`_.prototype.plant(value)`
+<a href="#_prototypeplantvalue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L8120 "View in source") [Ⓣ][1]
+
+Creates a clone of the chain sequence planting `value` as the wrapped value.
+
+#### Since
+3.2.0
+#### Arguments
+1. `value` *(*)*: The value to plant.
+
+#### Returns
+*(Object)*: Returns the new `lodash` wrapper instance.
+
+#### Example
+```js
+function square(n) {
+ return n * n;
+}
+
+var wrapped = _([1, 2]).map(square);
+var other = wrapped.plant([3, 4]);
+
+other.value();
+// => [9, 16]
+
+wrapped.value();
+// => [1, 4]
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_prototypereverse"></a>`_.prototype.reverse()`
+<a href="#_prototypereverse">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L8160 "View in source") [Ⓣ][1]
+
+This method is the wrapper version of `_.reverse`.
+<br>
+<br>
+**Note:** This method mutates the wrapped array.
+
+#### Since
+0.1.0
+#### Returns
+*(Object)*: Returns the new `lodash` wrapper instance.
+
+#### Example
+```js
+var array = [1, 2, 3];
+
+_(array).reverse().value()
+// => [3, 2, 1]
+
+console.log(array);
+// => [3, 2, 1]
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_prototypevalue"></a>`_.prototype.value()`
+<a href="#_prototypevalue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L8192 "View in source") [Ⓣ][1]
+
+Executes the chain sequence to resolve the unwrapped value.
+
+#### Since
+0.1.0
+#### Aliases
+*_.prototype.toJSON, _.prototype.valueOf*
+
+#### Returns
+*(*)*: Returns the resolved unwrapped value.
+
+#### Example
+```js
+_([1, 2, 3]).value();
+// => [1, 2, 3]
+```
+* * *
+
+<!-- /div -->
+
+<!-- /div -->
+
+<!-- div -->
+
+## `“String” Methods`
+
+<!-- div -->
+
+### <a id="_camelcasestring"></a>`_.camelCase([string=''])`
+<a href="#_camelcasestring">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L13297 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.camelcase "See the npm package")
+
+Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase).
+
+#### Since
+3.0.0
+#### Arguments
+1. `[string='']` *(string)*: The string to convert.
+
+#### Returns
+*(string)*: Returns the camel cased string.
+
+#### Example
+```js
+_.camelCase('Foo Bar');
+// => 'fooBar'
+
+_.camelCase('--foo-bar--');
+// => 'fooBar'
+
+_.camelCase('__FOO_BAR__');
+// => 'fooBar'
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_capitalizestring"></a>`_.capitalize([string=''])`
+<a href="#_capitalizestring">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L13317 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.capitalize "See the npm package")
+
+Converts the first character of `string` to upper case and the remaining
+to lower case.
+
+#### Since
+3.0.0
+#### Arguments
+1. `[string='']` *(string)*: The string to capitalize.
+
+#### Returns
+*(string)*: Returns the capitalized string.
+
+#### Example
+```js
+_.capitalize('FRED');
+// => 'Fred'
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_deburrstring"></a>`_.deburr([string=''])`
+<a href="#_deburrstring">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L13338 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.deburr "See the npm package")
+
+Deburrs `string` by converting
+[latin-1 supplementary letters](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table)
+to basic latin letters and removing
+[combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks).
+
+#### Since
+3.0.0
+#### Arguments
+1. `[string='']` *(string)*: The string to deburr.
+
+#### Returns
+*(string)*: Returns the deburred string.
+
+#### Example
+```js
+_.deburr('déjà vu');
+// => 'deja vu'
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_endswithstring-target-positionstringlength"></a>`_.endsWith([string=''], [target], [position=string.length])`
+<a href="#_endswithstring-target-positionstringlength">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L13366 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.endswith "See the npm package")
+
+Checks if `string` ends with the given target string.
+
+#### Since
+3.0.0
+#### Arguments
+1. `[string='']` *(string)*: The string to search.
+2. `[target]` *(string)*: The string to search for.
+3. `[position=string.length]` *(number)*: The position to search from.
+
+#### Returns
+*(boolean)*: Returns `true` if `string` ends with `target`, else `false`.
+
+#### Example
+```js
+_.endsWith('abc', 'c');
+// => true
+
+_.endsWith('abc', 'b');
+// => false
+
+_.endsWith('abc', 'b', 2);
+// => true
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_escapestring"></a>`_.escape([string=''])`
+<a href="#_escapestring">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L13413 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.escape "See the npm package")
+
+Converts the characters "&", "<", ">", '"', "'", and "\`" in `string` to
+their corresponding HTML entities.
+<br>
+<br>
+**Note:** No other characters are escaped. To escape additional
+characters use a third-party library like [_he_](https://mths.be/he).
+<br>
+<br>
+Though the ">" character is escaped for symmetry, characters like
+">" and "/" don't need escaping in HTML and have no special meaning
+unless they're part of a tag or unquoted attribute value. See
+[Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands)
+*(under "semi-related fun fact")* for more details.
+<br>
+<br>
+Backticks are escaped because in IE < `9`, they can break out of
+attribute values or HTML comments. See [#59](https://html5sec.org/#59),
+[#102](https://html5sec.org/#102), [#108](https://html5sec.org/#108), and
+[#133](https://html5sec.org/#133) of the
+[HTML5 Security Cheatsheet](https://html5sec.org/) for more details.
+<br>
+<br>
+When working with HTML you should always
+[quote attribute values](http://wonko.com/post/html-escaping) to reduce
+XSS vectors.
+
+#### Since
+0.1.0
+#### Arguments
+1. `[string='']` *(string)*: The string to escape.
+
+#### Returns
+*(string)*: Returns the escaped string.
+
+#### Example
+```js
+_.escape('fred, barney, & pebbles');
+// => 'fred, barney, & pebbles'
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_escaperegexpstring"></a>`_.escapeRegExp([string=''])`
+<a href="#_escaperegexpstring">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L13435 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.escaperegexp "See the npm package")
+
+Escapes the `RegExp` special characters "^", "$", "\", ".", "*", "+",
+"?", "(", ")", "[", "]", "{", "}", and "|" in `string`.
+
+#### Since
+3.0.0
+#### Arguments
+1. `[string='']` *(string)*: The string to escape.
+
+#### Returns
+*(string)*: Returns the escaped string.
+
+#### Example
+```js
+_.escapeRegExp('[lodash](https://lodash.com/)');
+// => '\[lodash\]\(https://lodash\.com/\)'
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_kebabcasestring"></a>`_.kebabCase([string=''])`
+<a href="#_kebabcasestring">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L13463 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.kebabcase "See the npm package")
+
+Converts `string` to
+[kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles).
+
+#### Since
+3.0.0
+#### Arguments
+1. `[string='']` *(string)*: The string to convert.
+
+#### Returns
+*(string)*: Returns the kebab cased string.
+
+#### Example
+```js
+_.kebabCase('Foo Bar');
+// => 'foo-bar'
+
+_.kebabCase('fooBar');
+// => 'foo-bar'
+
+_.kebabCase('__FOO_BAR__');
+// => 'foo-bar'
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_lowercasestring"></a>`_.lowerCase([string=''])`
+<a href="#_lowercasestring">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L13487 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.lowercase "See the npm package")
+
+Converts `string`, as space separated words, to lower case.
+
+#### Since
+4.0.0
+#### Arguments
+1. `[string='']` *(string)*: The string to convert.
+
+#### Returns
+*(string)*: Returns the lower cased string.
+
+#### Example
+```js
+_.lowerCase('--Foo-Bar--');
+// => 'foo bar'
+
+_.lowerCase('fooBar');
+// => 'foo bar'
+
+_.lowerCase('__FOO_BAR__');
+// => 'foo bar'
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_lowerfirststring"></a>`_.lowerFirst([string=''])`
+<a href="#_lowerfirststring">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L13508 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.lowerfirst "See the npm package")
+
+Converts the first character of `string` to lower case.
+
+#### Since
+4.0.0
+#### Arguments
+1. `[string='']` *(string)*: The string to convert.
+
+#### Returns
+*(string)*: Returns the converted string.
+
+#### Example
+```js
+_.lowerFirst('Fred');
+// => 'fred'
+
+_.lowerFirst('FRED');
+// => 'fRED'
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_padstring-length0-chars"></a>`_.pad([string=''], [length=0], [chars=' '])`
+<a href="#_padstring-length0-chars">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L13533 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.pad "See the npm package")
+
+Pads `string` on the left and right sides if it's shorter than `length`.
+Padding characters are truncated if they can't be evenly divided by `length`.
+
+#### Since
+3.0.0
+#### Arguments
+1. `[string='']` *(string)*: The string to pad.
+2. `[length=0]` *(number)*: The padding length.
+3. `[chars=' ']` *(string)*: The string used as padding.
+
+#### Returns
+*(string)*: Returns the padded string.
+
+#### Example
+```js
+_.pad('abc', 8);
+// => ' abc '
+
+_.pad('abc', 8, '_-');
+// => '_-abc_-_'
+
+_.pad('abc', 3);
+// => 'abc'
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_padendstring-length0-chars"></a>`_.padEnd([string=''], [length=0], [chars=' '])`
+<a href="#_padendstring-length0-chars">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L13572 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.padend "See the npm package")
+
+Pads `string` on the right side if it's shorter than `length`. Padding
+characters are truncated if they exceed `length`.
+
+#### Since
+4.0.0
+#### Arguments
+1. `[string='']` *(string)*: The string to pad.
+2. `[length=0]` *(number)*: The padding length.
+3. `[chars=' ']` *(string)*: The string used as padding.
+
+#### Returns
+*(string)*: Returns the padded string.
+
+#### Example
+```js
+_.padEnd('abc', 6);
+// => 'abc '
+
+_.padEnd('abc', 6, '_-');
+// => 'abc_-_'
+
+_.padEnd('abc', 3);
+// => 'abc'
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_padstartstring-length0-chars"></a>`_.padStart([string=''], [length=0], [chars=' '])`
+<a href="#_padstartstring-length0-chars">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L13605 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.padstart "See the npm package")
+
+Pads `string` on the left side if it's shorter than `length`. Padding
+characters are truncated if they exceed `length`.
+
+#### Since
+4.0.0
+#### Arguments
+1. `[string='']` *(string)*: The string to pad.
+2. `[length=0]` *(number)*: The padding length.
+3. `[chars=' ']` *(string)*: The string used as padding.
+
+#### Returns
+*(string)*: Returns the padded string.
+
+#### Example
+```js
+_.padStart('abc', 6);
+// => ' abc'
+
+_.padStart('abc', 6, '_-');
+// => '_-_abc'
+
+_.padStart('abc', 3);
+// => 'abc'
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_parseintstring-radix10"></a>`_.parseInt(string, [radix=10])`
+<a href="#_parseintstring-radix10">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L13639 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.parseint "See the npm package")
+
+Converts `string` to an integer of the specified radix. If `radix` is
+`undefined` or `0`, a `radix` of `10` is used unless `value` is a
+hexadecimal, in which case a `radix` of `16` is used.
+<br>
+<br>
+**Note:** This method aligns with the
+[ES5 implementation](https://es5.github.io/#x15.1.2.2) of `parseInt`.
+
+#### Since
+1.1.0
+#### Arguments
+1. `string` *(string)*: The string to convert.
+2. `[radix=10]` *(number)*: The radix to interpret `value` by.
+
+#### Returns
+*(number)*: Returns the converted integer.
+
+#### Example
+```js
+_.parseInt('08');
+// => 8
+
+_.map(['6', '08', '10'], _.parseInt);
+// => [6, 8, 10]
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_repeatstring-n1"></a>`_.repeat([string=''], [n=1])`
+<a href="#_repeatstring-n1">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L13673 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.repeat "See the npm package")
+
+Repeats the given string `n` times.
+
+#### Since
+3.0.0
+#### Arguments
+1. `[string='']` *(string)*: The string to repeat.
+2. `[n=1]` *(number)*: The number of times to repeat the string.
+
+#### Returns
+*(string)*: Returns the repeated string.
+
+#### Example
+```js
+_.repeat('*', 3);
+// => '***'
+
+_.repeat('abc', 2);
+// => 'abcabc'
+
+_.repeat('abc', 0);
+// => ''
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_replacestring-pattern-replacement"></a>`_.replace([string=''], pattern, replacement)`
+<a href="#_replacestring-pattern-replacement">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L13701 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.replace "See the npm package")
+
+Replaces matches for `pattern` in `string` with `replacement`.
+<br>
+<br>
+**Note:** This method is based on
+[`String#replace`](https://mdn.io/String/replace).
+
+#### Since
+4.0.0
+#### Arguments
+1. `[string='']` *(string)*: The string to modify.
+2. `pattern` *(RegExp|string)*: The pattern to replace.
+3. `replacement` *(Function|string)*: The match replacement.
+
+#### Returns
+*(string)*: Returns the modified string.
+
+#### Example
+```js
+_.replace('Hi Fred', 'Fred', 'Barney');
+// => 'Hi Barney'
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_snakecasestring"></a>`_.snakeCase([string=''])`
+<a href="#_snakecasestring">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L13729 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.snakecase "See the npm package")
+
+Converts `string` to
+[snake case](https://en.wikipedia.org/wiki/Snake_case).
+
+#### Since
+3.0.0
+#### Arguments
+1. `[string='']` *(string)*: The string to convert.
+
+#### Returns
+*(string)*: Returns the snake cased string.
+
+#### Example
+```js
+_.snakeCase('Foo Bar');
+// => 'foo_bar'
+
+_.snakeCase('fooBar');
+// => 'foo_bar'
+
+_.snakeCase('--FOO-BAR--');
+// => 'foo_bar'
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_splitstring-separator-limit"></a>`_.split([string=''], separator, [limit])`
+<a href="#_splitstring-separator-limit">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L13752 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.split "See the npm package")
+
+Splits `string` by `separator`.
+<br>
+<br>
+**Note:** This method is based on
+[`String#split`](https://mdn.io/String/split).
+
+#### Since
+4.0.0
+#### Arguments
+1. `[string='']` *(string)*: The string to split.
+2. `separator` *(RegExp|string)*: The separator pattern to split by.
+3. `[limit]` *(number)*: The length to truncate results to.
+
+#### Returns
+*(Array)*: Returns the new array of string segments.
+
+#### Example
+```js
+_.split('a-b-c', '-', 2);
+// => ['a', 'b']
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_startcasestring"></a>`_.startCase([string=''])`
+<a href="#_startcasestring">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L13794 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.startcase "See the npm package")
+
+Converts `string` to
+[start case](https://en.wikipedia.org/wiki/Letter_case#Stylistic_or_specialised_usage).
+
+#### Since
+3.1.0
+#### Arguments
+1. `[string='']` *(string)*: The string to convert.
+
+#### Returns
+*(string)*: Returns the start cased string.
+
+#### Example
+```js
+_.startCase('--foo-bar--');
+// => 'Foo Bar'
+
+_.startCase('fooBar');
+// => 'Foo Bar'
+
+_.startCase('__FOO_BAR__');
+// => 'FOO BAR'
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_startswithstring-target-position0"></a>`_.startsWith([string=''], [target], [position=0])`
+<a href="#_startswithstring-target-position0">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L13821 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.startswith "See the npm package")
+
+Checks if `string` starts with the given target string.
+
+#### Since
+3.0.0
+#### Arguments
+1. `[string='']` *(string)*: The string to search.
+2. `[target]` *(string)*: The string to search for.
+3. `[position=0]` *(number)*: The position to search from.
+
+#### Returns
+*(boolean)*: Returns `true` if `string` starts with `target`, else `false`.
+
+#### Example
+```js
+_.startsWith('abc', 'a');
+// => true
+
+_.startsWith('abc', 'b');
+// => false
+
+_.startsWith('abc', 'b', 1);
+// => true
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_templatestring-options-optionsescape_templatesettingsescape-optionsevaluate_templatesettingsevaluate-optionsimports_templatesettingsimports-optionsinterpolate_templatesettingsinterpolate-optionssourceurllodashtemplatesourcesn-optionsvariableobj"></a>`_.template([string=''], [options={}], [options.escape=_.templateSettings.escape], [options.evaluate=_.templateSettings.evaluate], [options.imports=_.templateSettings.imports], [options.interpolate=_.templateSettings.interpolate], [options.sourceURL='lodash.templateSources[n]'], [options.variable='obj'])`
+<a href="#_templatestring-options-optionsescape_templatesettingsescape-optionsevaluate_templatesettingsevaluate-optionsimports_templatesettingsimports-optionsinterpolate_templatesettingsinterpolate-optionssourceurllodashtemplatesourcesn-optionsvariableobj">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L13930 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.template "See the npm package")
+
+Creates a compiled template function that can interpolate data properties
+in "interpolate" delimiters, HTML-escape interpolated data properties in
+"escape" delimiters, and execute JavaScript in "evaluate" delimiters. Data
+properties may be accessed as free variables in the template. If a setting
+object is given, it takes precedence over `_.templateSettings` values.
+<br>
+<br>
+**Note:** In the development build `_.template` utilizes
+[sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl)
+for easier debugging.
+<br>
+<br>
+For more information on precompiling templates see
+[lodash's custom builds documentation](https://lodash.com/custom-builds).
+<br>
+<br>
+For more information on Chrome extension sandboxes see
+[Chrome's extensions documentation](https://developer.chrome.com/extensions/sandboxingEval).
+
+#### Since
+0.1.0
+#### Arguments
+1. `[string='']` *(string)*: The template string.
+2. `[options={}]` *(Object)*: The options object.
+3. `[options.escape=_.templateSettings.escape]` *(RegExp)*: The HTML "escape" delimiter.
+4. `[options.evaluate=_.templateSettings.evaluate]` *(RegExp)*: The "evaluate" delimiter.
+5. `[options.imports=_.templateSettings.imports]` *(Object)*: An object to import into the template as free variables.
+6. `[options.interpolate=_.templateSettings.interpolate]` *(RegExp)*: The "interpolate" delimiter.
+7. `[options.sourceURL='lodash.templateSources[n]']` *(string)*: The sourceURL of the compiled template.
+8. `[options.variable='obj']` *(string)*: The data object variable name.
+
+#### Returns
+*(Function)*: Returns the compiled template function.
+
+#### Example
+```js
+// Use the "interpolate" delimiter to create a compiled template.
+var compiled = _.template('hello <%= user %>!');
+compiled({ 'user': 'fred' });
+// => 'hello fred!'
+
+// Use the HTML "escape" delimiter to escape data property values.
+var compiled = _.template('<b><%- value %></b>');
+compiled({ 'value': '<script>' });
+// => '<b><script></b>'
+
+// Use the "evaluate" delimiter to execute JavaScript and generate HTML.
+var compiled = _.template('<% _.forEach(users, function(user) { %><li><%- user %></li><% }); %>');
+compiled({ 'users': ['fred', 'barney'] });
+// => '<li>fred</li><li>barney</li>'
+
+// Use the internal `print` function in "evaluate" delimiters.
+var compiled = _.template('<% print("hello " + user); %>!');
+compiled({ 'user': 'barney' });
+// => 'hello barney!'
+
+// Use the ES delimiter as an alternative to the default "interpolate" delimiter.
+var compiled = _.template('hello ${ user }!');
+compiled({ 'user': 'pebbles' });
+// => 'hello pebbles!'
+
+// Use custom template delimiters.
+_.templateSettings.interpolate = /{{([\s\S]+?)}}/g;
+var compiled = _.template('hello {{ user }}!');
+compiled({ 'user': 'mustache' });
+// => 'hello mustache!'
+
+// Use backslashes to treat delimiters as plain text.
+var compiled = _.template('<%= "\\<%- value %\\>" %>');
+compiled({ 'value': 'ignored' });
+// => '<%- value %>'
+
+// Use the `imports` option to import `jQuery` as `jq`.
+var text = '<% jq.each(users, function(user) { %><li><%- user %></li><% }); %>';
+var compiled = _.template(text, { 'imports': { 'jq': jQuery } });
+compiled({ 'users': ['fred', 'barney'] });
+// => '<li>fred</li><li>barney</li>'
+
+// Use the `sourceURL` option to specify a custom sourceURL for the template.
+var compiled = _.template('hello <%= user %>!', { 'sourceURL': '/basic/greeting.jst' });
+compiled(data);
+// => Find the source of "greeting.jst" under the Sources tab or Resources panel of the web inspector.
+
+// Use the `variable` option to ensure a with-statement isn't used in the compiled template.
+var compiled = _.template('hi <%= data.user %>!', { 'variable': 'data' });
+compiled.source;
+// => function(data) {
+// var __t, __p = '';
+// __p += 'hi ' + ((__t = ( data.user )) == null ? '' : __t) + '!';
+// return __p;
+// }
+
+// Use the `source` property to inline compiled templates for meaningful
+// line numbers in error messages and stack traces.
+fs.writeFileSync(path.join(cwd, 'jst.js'), '\
+ var JST = {\
+ "main": ' + _.template(mainText).source + '\
+ };\
+');
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_tolowerstring"></a>`_.toLower([string=''])`
+<a href="#_tolowerstring">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L14059 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.tolower "See the npm package")
+
+Converts `string`, as a whole, to lower case just like
+[String#toLowerCase](https://mdn.io/toLowerCase).
+
+#### Since
+4.0.0
+#### Arguments
+1. `[string='']` *(string)*: The string to convert.
+
+#### Returns
+*(string)*: Returns the lower cased string.
+
+#### Example
+```js
+_.toLower('--Foo-Bar--');
+// => '--foo-bar--'
+
+_.toLower('fooBar');
+// => 'foobar'
+
+_.toLower('__FOO_BAR__');
+// => '__foo_bar__'
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_toupperstring"></a>`_.toUpper([string=''])`
+<a href="#_toupperstring">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L14084 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.toupper "See the npm package")
+
+Converts `string`, as a whole, to upper case just like
+[String#toUpperCase](https://mdn.io/toUpperCase).
+
+#### Since
+4.0.0
+#### Arguments
+1. `[string='']` *(string)*: The string to convert.
+
+#### Returns
+*(string)*: Returns the upper cased string.
+
+#### Example
+```js
+_.toUpper('--foo-bar--');
+// => '--FOO-BAR--'
+
+_.toUpper('fooBar');
+// => 'FOOBAR'
+
+_.toUpper('__foo_bar__');
+// => '__FOO_BAR__'
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_trimstring-charswhitespace"></a>`_.trim([string=''], [chars=whitespace])`
+<a href="#_trimstring-charswhitespace">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L14110 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.trim "See the npm package")
+
+Removes leading and trailing whitespace or specified characters from `string`.
+
+#### Since
+3.0.0
+#### Arguments
+1. `[string='']` *(string)*: The string to trim.
+2. `[chars=whitespace]` *(string)*: The characters to trim.
+
+#### Returns
+*(string)*: Returns the trimmed string.
+
+#### Example
+```js
+_.trim(' abc ');
+// => 'abc'
+
+_.trim('-_-abc-_-', '_-');
+// => 'abc'
+
+_.map([' foo ', ' bar '], _.trim);
+// => ['foo', 'bar']
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_trimendstring-charswhitespace"></a>`_.trimEnd([string=''], [chars=whitespace])`
+<a href="#_trimendstring-charswhitespace">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L14145 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.trimend "See the npm package")
+
+Removes trailing whitespace or specified characters from `string`.
+
+#### Since
+4.0.0
+#### Arguments
+1. `[string='']` *(string)*: The string to trim.
+2. `[chars=whitespace]` *(string)*: The characters to trim.
+
+#### Returns
+*(string)*: Returns the trimmed string.
+
+#### Example
+```js
+_.trimEnd(' abc ');
+// => ' abc'
+
+_.trimEnd('-_-abc-_-', '_-');
+// => '-_-abc'
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_trimstartstring-charswhitespace"></a>`_.trimStart([string=''], [chars=whitespace])`
+<a href="#_trimstartstring-charswhitespace">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L14178 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.trimstart "See the npm package")
+
+Removes leading whitespace or specified characters from `string`.
+
+#### Since
+4.0.0
+#### Arguments
+1. `[string='']` *(string)*: The string to trim.
+2. `[chars=whitespace]` *(string)*: The characters to trim.
+
+#### Returns
+*(string)*: Returns the trimmed string.
+
+#### Example
+```js
+_.trimStart(' abc ');
+// => 'abc '
+
+_.trimStart('-_-abc-_-', '_-');
+// => 'abc-_-'
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_truncatestring-options-optionslength30-optionsomission-optionsseparator"></a>`_.truncate([string=''], [options={}], [options.length=30], [options.omission='...'], [options.separator])`
+<a href="#_truncatestring-options-optionslength30-optionsomission-optionsseparator">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L14229 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.truncate "See the npm package")
+
+Truncates `string` if it's longer than the given maximum string length.
+The last characters of the truncated string are replaced with the omission
+string which defaults to "...".
+
+#### Since
+4.0.0
+#### Arguments
+1. `[string='']` *(string)*: The string to truncate.
+2. `[options={}]` *(Object)*: The options object.
+3. `[options.length=30]` *(number)*: The maximum string length.
+4. `[options.omission='...']` *(string)*: The string to indicate text is omitted.
+5. `[options.separator]` *(RegExp|string)*: The separator pattern to truncate to.
+
+#### Returns
+*(string)*: Returns the truncated string.
+
+#### Example
+```js
+_.truncate('hi-diddly-ho there, neighborino');
+// => 'hi-diddly-ho there, neighbo...'
+
+_.truncate('hi-diddly-ho there, neighborino', {
+ 'length': 24,
+ 'separator': ' '
+});
+// => 'hi-diddly-ho there,...'
+
+_.truncate('hi-diddly-ho there, neighborino', {
+ 'length': 24,
+ 'separator': /,? +/
+});
+// => 'hi-diddly-ho there...'
+
+_.truncate('hi-diddly-ho there, neighborino', {
+ 'omission': ' [...]'
+});
+// => 'hi-diddly-ho there, neig [...]'
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_unescapestring"></a>`_.unescape([string=''])`
+<a href="#_unescapestring">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L14304 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.unescape "See the npm package")
+
+The inverse of `_.escape`; this method converts the HTML entities
+`&`, `<`, `>`, `"`, `'`, and ``` in `string` to
+their corresponding characters.
+<br>
+<br>
+**Note:** No other HTML entities are unescaped. To unescape additional
+HTML entities use a third-party library like [_he_](https://mths.be/he).
+
+#### Since
+0.6.0
+#### Arguments
+1. `[string='']` *(string)*: The string to unescape.
+
+#### Returns
+*(string)*: Returns the unescaped string.
+
+#### Example
+```js
+_.unescape('fred, barney, & pebbles');
+// => 'fred, barney, & pebbles'
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_uppercasestring"></a>`_.upperCase([string=''])`
+<a href="#_uppercasestring">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L14331 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.uppercase "See the npm package")
+
+Converts `string`, as space separated words, to upper case.
+
+#### Since
+4.0.0
+#### Arguments
+1. `[string='']` *(string)*: The string to convert.
+
+#### Returns
+*(string)*: Returns the upper cased string.
+
+#### Example
+```js
+_.upperCase('--foo-bar');
+// => 'FOO BAR'
+
+_.upperCase('fooBar');
+// => 'FOO BAR'
+
+_.upperCase('__foo_bar__');
+// => 'FOO BAR'
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_upperfirststring"></a>`_.upperFirst([string=''])`
+<a href="#_upperfirststring">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L14352 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.upperfirst "See the npm package")
+
+Converts the first character of `string` to upper case.
+
+#### Since
+4.0.0
+#### Arguments
+1. `[string='']` *(string)*: The string to convert.
+
+#### Returns
+*(string)*: Returns the converted string.
+
+#### Example
+```js
+_.upperFirst('fred');
+// => 'Fred'
+
+_.upperFirst('FRED');
+// => 'FRED'
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_wordsstring-pattern"></a>`_.words([string=''], [pattern])`
+<a href="#_wordsstring-pattern">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L14373 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.words "See the npm package")
+
+Splits `string` into an array of its words.
+
+#### Since
+3.0.0
+#### Arguments
+1. `[string='']` *(string)*: The string to inspect.
+2. `[pattern]` *(RegExp|string)*: The pattern to match words.
+
+#### Returns
+*(Array)*: Returns the words of `string`.
+
+#### Example
+```js
+_.words('fred, barney, & pebbles');
+// => ['fred', 'barney', 'pebbles']
+
+_.words('fred, barney, & pebbles', /[^, ]+/g);
+// => ['fred', 'barney', '&', 'pebbles']
+```
+* * *
+
+<!-- /div -->
+
+<!-- /div -->
+
+<!-- div -->
+
+## `“Util” Methods`
+
+<!-- div -->
+
+### <a id="_attemptfunc-args"></a>`_.attempt(func, [args])`
+<a href="#_attemptfunc-args">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L14407 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.attempt "See the npm package")
+
+Attempts to invoke `func`, returning either the result or the caught error
+object. Any additional arguments are provided to `func` when it's invoked.
+
+#### Since
+3.0.0
+#### Arguments
+1. `func` *(Function)*: The function to attempt.
+2. `[args]` *(...*)*: The arguments to invoke `func` with.
+
+#### Returns
+*(*)*: Returns the `func` result or error object.
+
+#### Example
+```js
+// Avoid throwing errors for invalid selectors.
+var elements = _.attempt(function(selector) {
+ return document.querySelectorAll(selector);
+}, '>_>');
+
+if (_.isError(elements)) {
+ elements = [];
+}
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_bindallobject-methodnames"></a>`_.bindAll(object, methodNames)`
+<a href="#_bindallobject-methodnames">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L14441 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.bindall "See the npm package")
+
+Binds methods of an object to the object itself, overwriting the existing
+method.
+<br>
+<br>
+**Note:** This method doesn't set the "length" property of bound functions.
+
+#### Since
+0.1.0
+#### Arguments
+1. `object` *(Object)*: The object to bind and assign the bound methods to.
+2. `methodNames` *(...(string|string[]))*: The object method names to bind.
+
+#### Returns
+*(Object)*: Returns `object`.
+
+#### Example
+```js
+var view = {
+ 'label': 'docs',
+ 'onClick': function() {
+ console.log('clicked ' + this.label);
+ }
+};
+
+_.bindAll(view, 'onClick');
+jQuery(element).on('click', view.onClick);
+// => Logs 'clicked docs' when clicked.
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_condpairs"></a>`_.cond(pairs)`
+<a href="#_condpairs">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L14478 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.cond "See the npm package")
+
+Creates a function that iterates over `pairs` and invokes the corresponding
+function of the first predicate to return truthy. The predicate-function
+pairs are invoked with the `this` binding and arguments of the created
+function.
+
+#### Since
+4.0.0
+#### Arguments
+1. `pairs` *(Array)*: The predicate-function pairs.
+
+#### Returns
+*(Function)*: Returns the new function.
+
+#### Example
+```js
+var func = _.cond([
+ [_.matches({ 'a': 1 }), _.constant('matches A')],
+ [_.conforms({ 'b': _.isNumber }), _.constant('matches B')],
+ [_.constant(true), _.constant('no match')]
+]);
+
+func({ 'a': 1, 'b': 2 });
+// => 'matches A'
+
+func({ 'a': 0, 'b': 1 });
+// => 'matches B'
+
+func({ 'a': '1', 'b': '2' });
+// => 'no match'
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_conformssource"></a>`_.conforms(source)`
+<a href="#_conformssource">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L14521 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.conforms "See the npm package")
+
+Creates a function that invokes the predicate properties of `source` with
+the corresponding property values of a given object, returning `true` if
+all predicates return truthy, else `false`.
+
+#### Since
+4.0.0
+#### Arguments
+1. `source` *(Object)*: The object of property predicates to conform to.
+
+#### Returns
+*(Function)*: Returns the new function.
+
+#### Example
+```js
+var users = [
+ { 'user': 'barney', 'age': 36 },
+ { 'user': 'fred', 'age': 40 }
+];
+
+_.filter(users, _.conforms({ 'age': _.partial(_.gt, _, 38) }));
+// => [{ 'user': 'fred', 'age': 40 }]
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_constantvalue"></a>`_.constant(value)`
+<a href="#_constantvalue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L14542 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.constant "See the npm package")
+
+Creates a function that returns `value`.
+
+#### Since
+2.4.0
+#### Arguments
+1. `value` *(*)*: The value to return from the new function.
+
+#### Returns
+*(Function)*: Returns the new function.
+
+#### Example
+```js
+var object = { 'user': 'fred' };
+var getter = _.constant(object);
+
+getter() === object;
+// => true
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_flowfuncs"></a>`_.flow([funcs])`
+<a href="#_flowfuncs">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L14570 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.flow "See the npm package")
+
+Creates a function that returns the result of invoking the given functions
+with the `this` binding of the created function, where each successive
+invocation is supplied the return value of the previous.
+
+#### Since
+3.0.0
+#### Arguments
+1. `[funcs]` *(...(Function|Function[]))*: Functions to invoke.
+
+#### Returns
+*(Function)*: Returns the new function.
+
+#### Example
+```js
+function square(n) {
+ return n * n;
+}
+
+var addSquare = _.flow(_.add, square);
+addSquare(1, 2);
+// => 9
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_flowrightfuncs"></a>`_.flowRight([funcs])`
+<a href="#_flowrightfuncs">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L14593 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.flowright "See the npm package")
+
+This method is like `_.flow` except that it creates a function that
+invokes the given functions from right to left.
+
+#### Since
+3.0.0
+#### Arguments
+1. `[funcs]` *(...(Function|Function[]))*: Functions to invoke.
+
+#### Returns
+*(Function)*: Returns the new function.
+
+#### Example
+```js
+function square(n) {
+ return n * n;
+}
+
+var addSquare = _.flowRight(square, _.add);
+addSquare(1, 2);
+// => 9
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_identityvalue"></a>`_.identity(value)`
+<a href="#_identityvalue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L14611 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.identity "See the npm package")
+
+This method returns the first argument given to it.
+
+#### Since
+0.1.0
+#### Arguments
+1. `value` *(*)*: Any value.
+
+#### Returns
+*(*)*: Returns `value`.
+
+#### Example
+```js
+var object = { 'user': 'fred' };
+
+_.identity(object) === object;
+// => true
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_iterateefunc_identity"></a>`_.iteratee([func=_.identity])`
+<a href="#_iterateefunc_identity">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L14657 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.iteratee "See the npm package")
+
+Creates a function that invokes `func` with the arguments of the created
+function. If `func` is a property name, the created function returns the
+property value for a given element. If `func` is an array or object, the
+created function returns `true` for elements that contain the equivalent
+source properties, otherwise it returns `false`.
+
+#### Since
+4.0.0
+#### Arguments
+1. `[func=_.identity]` *(*)*: The value to convert to a callback.
+
+#### Returns
+*(Function)*: Returns the callback.
+
+#### Example
+```js
+var users = [
+ { 'user': 'barney', 'age': 36, 'active': true },
+ { 'user': 'fred', 'age': 40, 'active': false }
+];
+
+// The `_.matches` iteratee shorthand.
+_.filter(users, _.iteratee({ 'user': 'barney', 'active': true }));
+// => [{ 'user': 'barney', 'age': 36, 'active': true }]
+
+// The `_.matchesProperty` iteratee shorthand.
+_.filter(users, _.iteratee(['user', 'fred']));
+// => [{ 'user': 'fred', 'age': 40 }]
+
+// The `_.property` iteratee shorthand.
+_.map(users, _.iteratee('user'));
+// => ['barney', 'fred']
+
+// Create custom iteratee shorthands.
+_.iteratee = _.wrap(_.iteratee, function(iteratee, func) {
+ return !_.isRegExp(func) ? iteratee(func) : function(string) {
+ return func.test(string);
+ };
+});
+
+_.filter(['abc', 'def'], /ef/);
+// => ['def']
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_matchessource"></a>`_.matches(source)`
+<a href="#_matchessource">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L14685 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.matches "See the npm package")
+
+Creates a function that performs a partial deep comparison between a given
+object and `source`, returning `true` if the given object has equivalent
+property values, else `false`. The created function is equivalent to
+`_.isMatch` with a `source` partially applied.
+<br>
+<br>
+**Note:** This method supports comparing the same values as `_.isEqual`.
+
+#### Since
+3.0.0
+#### Arguments
+1. `source` *(Object)*: The object of property values to match.
+
+#### Returns
+*(Function)*: Returns the new function.
+
+#### Example
+```js
+var users = [
+ { 'user': 'barney', 'age': 36, 'active': true },
+ { 'user': 'fred', 'age': 40, 'active': false }
+];
+
+_.filter(users, _.matches({ 'age': 40, 'active': false }));
+// => [{ 'user': 'fred', 'age': 40, 'active': false }]
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_matchespropertypath-srcvalue"></a>`_.matchesProperty(path, srcValue)`
+<a href="#_matchespropertypath-srcvalue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L14713 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.matchesproperty "See the npm package")
+
+Creates a function that performs a partial deep comparison between the
+value at `path` of a given object to `srcValue`, returning `true` if the
+object value is equivalent, else `false`.
+<br>
+<br>
+**Note:** This method supports comparing the same values as `_.isEqual`.
+
+#### Since
+3.2.0
+#### Arguments
+1. `path` *(Array|string)*: The path of the property to get.
+2. `srcValue` *(*)*: The value to match.
+
+#### Returns
+*(Function)*: Returns the new function.
+
+#### Example
+```js
+var users = [
+ { 'user': 'barney' },
+ { 'user': 'fred' }
+];
+
+_.find(users, _.matchesProperty('user', 'fred'));
+// => { 'user': 'fred' }
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_methodpath-args"></a>`_.method(path, [args])`
+<a href="#_methodpath-args">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L14741 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.method "See the npm package")
+
+Creates a function that invokes the method at `path` of a given object.
+Any additional arguments are provided to the invoked method.
+
+#### Since
+3.7.0
+#### Arguments
+1. `path` *(Array|string)*: The path of the method to invoke.
+2. `[args]` *(...*)*: The arguments to invoke the method with.
+
+#### Returns
+*(Function)*: Returns the new function.
+
+#### Example
+```js
+var objects = [
+ { 'a': { 'b': _.constant(2) } },
+ { 'a': { 'b': _.constant(1) } }
+];
+
+_.map(objects, _.method('a.b'));
+// => [2, 1]
+
+_.map(objects, _.method(['a', 'b']));
+// => [2, 1]
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_methodofobject-args"></a>`_.methodOf(object, [args])`
+<a href="#_methodofobject-args">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L14770 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.methodof "See the npm package")
+
+The opposite of `_.method`; this method creates a function that invokes
+the method at a given path of `object`. Any additional arguments are
+provided to the invoked method.
+
+#### Since
+3.7.0
+#### Arguments
+1. `object` *(Object)*: The object to query.
+2. `[args]` *(...*)*: The arguments to invoke the method with.
+
+#### Returns
+*(Function)*: Returns the new function.
+
+#### Example
+```js
+var array = _.times(3, _.constant),
+ object = { 'a': array, 'b': array, 'c': array };
+
+_.map(['a[2]', 'c[0]'], _.methodOf(object));
+// => [2, 0]
+
+_.map([['a', '2'], ['c', '0']], _.methodOf(object));
+// => [2, 0]
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_mixinobjectlodash-source-options-optionschaintrue"></a>`_.mixin([object=lodash], source, [options={}], [options.chain=true])`
+<a href="#_mixinobjectlodash-source-options-optionschaintrue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L14812 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.mixin "See the npm package")
+
+Adds all own enumerable string keyed function properties of a source
+object to the destination object. If `object` is a function, then methods
+are added to its prototype as well.
+<br>
+<br>
+**Note:** Use `_.runInContext` to create a pristine `lodash` function to
+avoid conflicts caused by modifying the original.
+
+#### Since
+0.1.0
+#### Arguments
+1. `[object=lodash]` *(Function|Object)*: The destination object.
+2. `source` *(Object)*: The object of functions to add.
+3. `[options={}]` *(Object)*: The options object.
+4. `[options.chain=true]` *(boolean)*: Specify whether mixins are chainable.
+
+#### Returns
+*(*)*: Returns `object`.
+
+#### Example
+```js
+function vowels(string) {
+ return _.filter(string, function(v) {
+ return /[aeiou]/i.test(v);
+ });
+}
+
+_.mixin({ 'vowels': vowels });
+_.vowels('fred');
+// => ['e']
+
+_('fred').vowels().value();
+// => ['e']
+
+_.mixin({ 'vowels': vowels }, { 'chain': false });
+_('fred').vowels();
+// => ['e']
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_noconflict"></a>`_.noConflict()`
+<a href="#_noconflict">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L14861 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.noconflict "See the npm package")
+
+Reverts the `_` variable to its previous value and returns a reference to
+the `lodash` function.
+
+#### Since
+0.1.0
+#### Returns
+*(Function)*: Returns the `lodash` function.
+
+#### Example
+```js
+var lodash = _.noConflict();
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_noop"></a>`_.noop()`
+<a href="#_noop">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L14883 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.noop "See the npm package")
+
+A no-operation function that returns `undefined` regardless of the
+arguments it receives.
+
+#### Since
+2.3.0
+#### Example
+```js
+var object = { 'user': 'fred' };
+
+_.noop(object) === undefined;
+// => true
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_nthargn0"></a>`_.nthArg([n=0])`
+<a href="#_nthargn0">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L14907 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.ntharg "See the npm package")
+
+Creates a function that returns its nth argument. If `n` is negative,
+the nth argument from the end is returned.
+
+#### Since
+4.0.0
+#### Arguments
+1. `[n=0]` *(number)*: The index of the argument to return.
+
+#### Returns
+*(Function)*: Returns the new function.
+
+#### Example
+```js
+var func = _.nthArg(1);
+func('a', 'b', 'c', 'd');
+// => 'b'
+
+var func = _.nthArg(-2);
+func('a', 'b', 'c', 'd');
+// => 'c'
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_overiteratees_identity"></a>`_.over([iteratees=[_.identity]])`
+<a href="#_overiteratees_identity">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L14932 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.over "See the npm package")
+
+Creates a function that invokes `iteratees` with the arguments it receives
+and returns their results.
+
+#### Since
+4.0.0
+#### Arguments
+1. `[iteratees=[_.identity]]` *(...(Array|Array[]|Function|Function[]|Object|Object[]|string|string[]))*: The iteratees to invoke.
+
+#### Returns
+*(Function)*: Returns the new function.
+
+#### Example
+```js
+var func = _.over(Math.max, Math.min);
+
+func(1, 2, 3, 4);
+// => [4, 1]
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_overeverypredicates_identity"></a>`_.overEvery([predicates=[_.identity]])`
+<a href="#_overeverypredicates_identity">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L14958 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.overevery "See the npm package")
+
+Creates a function that checks if **all** of the `predicates` return
+truthy when invoked with the arguments it receives.
+
+#### Since
+4.0.0
+#### Arguments
+1. `[predicates=[_.identity]]` *(...(Array|Array[]|Function|Function[]|Object|Object[]|string|string[]))*: The predicates to check.
+
+#### Returns
+*(Function)*: Returns the new function.
+
+#### Example
+```js
+var func = _.overEvery(Boolean, isFinite);
+
+func('1');
+// => true
+
+func(null);
+// => false
+
+func(NaN);
+// => false
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_oversomepredicates_identity"></a>`_.overSome([predicates=[_.identity]])`
+<a href="#_oversomepredicates_identity">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L14984 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.oversome "See the npm package")
+
+Creates a function that checks if **any** of the `predicates` return
+truthy when invoked with the arguments it receives.
+
+#### Since
+4.0.0
+#### Arguments
+1. `[predicates=[_.identity]]` *(...(Array|Array[]|Function|Function[]|Object|Object[]|string|string[]))*: The predicates to check.
+
+#### Returns
+*(Function)*: Returns the new function.
+
+#### Example
+```js
+var func = _.overSome(Boolean, isFinite);
+
+func('1');
+// => true
+
+func(null);
+// => true
+
+func(NaN);
+// => false
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_propertypath"></a>`_.property(path)`
+<a href="#_propertypath">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L15008 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.property "See the npm package")
+
+Creates a function that returns the value at `path` of a given object.
+
+#### Since
+2.4.0
+#### Arguments
+1. `path` *(Array|string)*: The path of the property to get.
+
+#### Returns
+*(Function)*: Returns the new function.
+
+#### Example
+```js
+var objects = [
+ { 'a': { 'b': 2 } },
+ { 'a': { 'b': 1 } }
+];
+
+_.map(objects, _.property('a.b'));
+// => [2, 1]
+
+_.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');
+// => [1, 2]
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_propertyofobject"></a>`_.propertyOf(object)`
+<a href="#_propertyofobject">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L15033 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.propertyof "See the npm package")
+
+The opposite of `_.property`; this method creates a function that returns
+the value at a given path of `object`.
+
+#### Since
+3.0.0
+#### Arguments
+1. `object` *(Object)*: The object to query.
+
+#### Returns
+*(Function)*: Returns the new function.
+
+#### Example
+```js
+var array = [0, 1, 2],
+ object = { 'a': array, 'b': array, 'c': array };
+
+_.map(['a[2]', 'c[0]'], _.propertyOf(object));
+// => [2, 0]
+
+_.map([['a', '2'], ['c', '0']], _.propertyOf(object));
+// => [2, 0]
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_rangestart0-end-step1"></a>`_.range([start=0], end, [step=1])`
+<a href="#_rangestart0-end-step1">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L15080 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.range "See the npm package")
+
+Creates an array of numbers *(positive and/or negative)* progressing from
+`start` up to, but not including, `end`. A step of `-1` is used if a negative
+`start` is specified without an `end` or `step`. If `end` is not specified,
+it's set to `start` with `start` then set to `0`.
+<br>
+<br>
+**Note:** JavaScript follows the IEEE-754 standard for resolving
+floating-point values which can produce unexpected results.
+
+#### Since
+0.1.0
+#### Arguments
+1. `[start=0]` *(number)*: The start of the range.
+2. `end` *(number)*: The end of the range.
+3. `[step=1]` *(number)*: The value to increment or decrement by.
+
+#### Returns
+*(Array)*: Returns the new array of numbers.
+
+#### Example
+```js
+_.range(4);
+// => [0, 1, 2, 3]
+
+_.range(-4);
+// => [0, -1, -2, -3]
+
+_.range(1, 5);
+// => [1, 2, 3, 4]
+
+_.range(0, 20, 5);
+// => [0, 5, 10, 15]
+
+_.range(0, -4, -1);
+// => [0, -1, -2, -3]
+
+_.range(1, 4, 0);
+// => [1, 1, 1]
+
+_.range(0);
+// => []
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_rangerightstart0-end-step1"></a>`_.rangeRight([start=0], end, [step=1])`
+<a href="#_rangerightstart0-end-step1">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L15118 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.rangeright "See the npm package")
+
+This method is like `_.range` except that it populates values in
+descending order.
+
+#### Since
+4.0.0
+#### Arguments
+1. `[start=0]` *(number)*: The start of the range.
+2. `end` *(number)*: The end of the range.
+3. `[step=1]` *(number)*: The value to increment or decrement by.
+
+#### Returns
+*(Array)*: Returns the new array of numbers.
+
+#### Example
+```js
+_.rangeRight(4);
+// => [3, 2, 1, 0]
+
+_.rangeRight(-4);
+// => [-3, -2, -1, 0]
+
+_.rangeRight(1, 5);
+// => [4, 3, 2, 1]
+
+_.rangeRight(0, 20, 5);
+// => [15, 10, 5, 0]
+
+_.rangeRight(0, -4, -1);
+// => [-3, -2, -1, 0]
+
+_.rangeRight(1, 4, 0);
+// => [1, 1, 1]
+
+_.rangeRight(0);
+// => []
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_runincontextcontextroot"></a>`_.runInContext([context=root])`
+<a href="#_runincontextcontextroot">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L1239 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.runincontext "See the npm package")
+
+Create a new pristine `lodash` function using the `context` object.
+
+#### Since
+1.1.0
+#### Arguments
+1. `[context=root]` *(Object)*: The context object.
+
+#### Returns
+*(Function)*: Returns a new `lodash` function.
+
+#### Example
+```js
+_.mixin({ 'foo': _.constant('foo') });
+
+var lodash = _.runInContext();
+lodash.mixin({ 'bar': lodash.constant('bar') });
+
+_.isFunction(_.foo);
+// => true
+_.isFunction(_.bar);
+// => false
+
+lodash.isFunction(lodash.foo);
+// => false
+lodash.isFunction(lodash.bar);
+// => true
+
+// Use `context` to mock `Date#getTime` use in `_.now`.
+var mock = _.runInContext({
+ 'Date': function() {
+ return { 'getTime': getTimeMock };
+ }
+});
+
+// Create a suped-up `defer` in Node.js.
+var defer = _.runInContext({ 'setTimeout': setImmediate }).defer;
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_timesn-iteratee_identity"></a>`_.times(n, [iteratee=_.identity])`
+<a href="#_timesn-iteratee_identity">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L15139 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.times "See the npm package")
+
+Invokes the iteratee `n` times, returning an array of the results of
+each invocation. The iteratee is invoked with one argument; *(index)*.
+
+#### Since
+0.1.0
+#### Arguments
+1. `n` *(number)*: The number of times to invoke `iteratee`.
+2. `[iteratee=_.identity]` *(Function)*: The function invoked per iteration.
+
+#### Returns
+*(Array)*: Returns the array of results.
+
+#### Example
+```js
+_.times(3, String);
+// => ['0', '1', '2']
+
+ _.times(4, _.constant(true));
+// => [true, true, true, true]
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_topathvalue"></a>`_.toPath(value)`
+<a href="#_topathvalue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L15183 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.topath "See the npm package")
+
+Converts `value` to a property path array.
+
+#### Since
+4.0.0
+#### Arguments
+1. `value` *(*)*: The value to convert.
+
+#### Returns
+*(Array)*: Returns the new property path array.
+
+#### Example
+```js
+_.toPath('a.b.c');
+// => ['a', 'b', 'c']
+
+_.toPath('a[0].b.c');
+// => ['a', '0', 'b', 'c']
+
+var path = ['a', 'b', 'c'],
+ newPath = _.toPath(path);
+
+console.log(newPath);
+// => ['a', 'b', 'c']
+
+console.log(path === newPath);
+// => false
+```
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_uniqueidprefix"></a>`_.uniqueId([prefix=''])`
+<a href="#_uniqueidprefix">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L15207 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.uniqueid "See the npm package")
+
+Generates a unique ID. If `prefix` is given, the ID is appended to it.
+
+#### Since
+0.1.0
+#### Arguments
+1. `[prefix='']` *(string)*: The value to prefix the ID with.
+
+#### Returns
+*(string)*: Returns the unique ID.
+
+#### Example
+```js
+_.uniqueId('contact_');
+// => 'contact_104'
+
+_.uniqueId();
+// => '105'
+```
+* * *
+
+<!-- /div -->
+
+<!-- /div -->
+
+<!-- div -->
+
+## `Properties`
+
+<!-- div -->
+
+### <a id="_version"></a>`_.VERSION`
+<a href="#_version">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L15894 "View in source") [Ⓣ][1]
+
+(string): The semantic version number.
+
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_templatesettings"></a>`_.templateSettings`
+<a href="#_templatesettings">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L1502 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.templatesettings "See the npm package")
+
+(Object): By default, the template delimiters used by lodash are like those in
+embedded Ruby *(ERB)*. Change the following template settings to use
+alternative delimiters.
+
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_templatesettingsescape"></a>`_.templateSettings.escape`
+<a href="#_templatesettingsescape">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L1510 "View in source") [Ⓣ][1]
+
+(RegExp): Used to detect `data` property values to be HTML-escaped.
+
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_templatesettingsevaluate"></a>`_.templateSettings.evaluate`
+<a href="#_templatesettingsevaluate">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L1518 "View in source") [Ⓣ][1]
+
+(RegExp): Used to detect code to be evaluated.
+
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_templatesettingsimports"></a>`_.templateSettings.imports`
+<a href="#_templatesettingsimports">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L1542 "View in source") [Ⓣ][1]
+
+(Object): Used to import variables into the compiled template.
+
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_templatesettingsinterpolate"></a>`_.templateSettings.interpolate`
+<a href="#_templatesettingsinterpolate">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L1526 "View in source") [Ⓣ][1]
+
+(RegExp): Used to detect `data` property values to inject.
+
+* * *
+
+<!-- /div -->
+
+<!-- div -->
+
+### <a id="_templatesettingsvariable"></a>`_.templateSettings.variable`
+<a href="#_templatesettingsvariable">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L1534 "View in source") [Ⓣ][1]
+
+(string): Used to reference the data object in the template text.
+
+* * *
+
+<!-- /div -->
+
+<!-- /div -->
+
+<!-- div -->
+
+## `Methods`
+
+<!-- div -->
+
+### <a id="_templatesettingsimports_"></a>`_.templateSettings.imports._`
+<a href="#_templatesettingsimports_">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.11.2/lodash.js#L1550 "View in source") [Ⓣ][1]
+
+A reference to the `lodash` function.
+
+* * *
+
+<!-- /div -->
+
+<!-- /div -->
+
+<!-- /div -->
+
+ [1]: #array "Jump back to the TOC."
diff --git a/views/ngXosViews/serviceGrid/src/vendor/lodash/fp/_baseConvert.js b/views/ngXosViews/serviceGrid/src/vendor/lodash/fp/_baseConvert.js
new file mode 100644
index 0000000..e7e631c
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/lodash/fp/_baseConvert.js
@@ -0,0 +1,469 @@
+var mapping = require('./_mapping'),
+ mutateMap = mapping.mutate,
+ fallbackHolder = require('./placeholder');
+
+/**
+ * Creates a function, with an arity of `n`, that invokes `func` with the
+ * arguments it receives.
+ *
+ * @private
+ * @param {Function} func The function to wrap.
+ * @param {number} n The arity of the new function.
+ * @returns {Function} Returns the new function.
+ */
+function baseArity(func, n) {
+ return n == 2
+ ? function(a, b) { return func.apply(undefined, arguments); }
+ : function(a) { return func.apply(undefined, arguments); };
+}
+
+/**
+ * Creates a function that invokes `func`, with up to `n` arguments, ignoring
+ * any additional arguments.
+ *
+ * @private
+ * @param {Function} func The function to cap arguments for.
+ * @param {number} n The arity cap.
+ * @returns {Function} Returns the new function.
+ */
+function baseAry(func, n) {
+ return n == 2
+ ? function(a, b) { return func(a, b); }
+ : function(a) { return func(a); };
+}
+
+/**
+ * Creates a clone of `array`.
+ *
+ * @private
+ * @param {Array} array The array to clone.
+ * @returns {Array} Returns the cloned array.
+ */
+function cloneArray(array) {
+ var length = array ? array.length : 0,
+ result = Array(length);
+
+ while (length--) {
+ result[length] = array[length];
+ }
+ return result;
+}
+
+/**
+ * Creates a function that clones a given object using the assignment `func`.
+ *
+ * @private
+ * @param {Function} func The assignment function.
+ * @returns {Function} Returns the new cloner function.
+ */
+function createCloner(func) {
+ return function(object) {
+ return func({}, object);
+ };
+}
+
+/**
+ * Creates a function that wraps `func` and uses `cloner` to clone the first
+ * argument it receives.
+ *
+ * @private
+ * @param {Function} func The function to wrap.
+ * @param {Function} cloner The function to clone arguments.
+ * @returns {Function} Returns the new immutable function.
+ */
+function immutWrap(func, cloner) {
+ return function() {
+ var length = arguments.length;
+ if (!length) {
+ return result;
+ }
+ var args = Array(length);
+ while (length--) {
+ args[length] = arguments[length];
+ }
+ var result = args[0] = cloner.apply(undefined, args);
+ func.apply(undefined, args);
+ return result;
+ };
+}
+
+/**
+ * The base implementation of `convert` which accepts a `util` object of methods
+ * required to perform conversions.
+ *
+ * @param {Object} util The util object.
+ * @param {string} name The name of the function to convert.
+ * @param {Function} func The function to convert.
+ * @param {Object} [options] The options object.
+ * @param {boolean} [options.cap=true] Specify capping iteratee arguments.
+ * @param {boolean} [options.curry=true] Specify currying.
+ * @param {boolean} [options.fixed=true] Specify fixed arity.
+ * @param {boolean} [options.immutable=true] Specify immutable operations.
+ * @param {boolean} [options.rearg=true] Specify rearranging arguments.
+ * @returns {Function|Object} Returns the converted function or object.
+ */
+function baseConvert(util, name, func, options) {
+ var setPlaceholder,
+ isLib = typeof name == 'function',
+ isObj = name === Object(name);
+
+ if (isObj) {
+ options = func;
+ func = name;
+ name = undefined;
+ }
+ if (func == null) {
+ throw new TypeError;
+ }
+ options || (options = {});
+
+ var config = {
+ 'cap': 'cap' in options ? options.cap : true,
+ 'curry': 'curry' in options ? options.curry : true,
+ 'fixed': 'fixed' in options ? options.fixed : true,
+ 'immutable': 'immutable' in options ? options.immutable : true,
+ 'rearg': 'rearg' in options ? options.rearg : true
+ };
+
+ var forceCurry = ('curry' in options) && options.curry,
+ forceFixed = ('fixed' in options) && options.fixed,
+ forceRearg = ('rearg' in options) && options.rearg,
+ placeholder = isLib ? func : fallbackHolder,
+ pristine = isLib ? func.runInContext() : undefined;
+
+ var helpers = isLib ? func : {
+ 'ary': util.ary,
+ 'assign': util.assign,
+ 'clone': util.clone,
+ 'curry': util.curry,
+ 'forEach': util.forEach,
+ 'isArray': util.isArray,
+ 'isFunction': util.isFunction,
+ 'iteratee': util.iteratee,
+ 'keys': util.keys,
+ 'rearg': util.rearg,
+ 'spread': util.spread,
+ 'toPath': util.toPath
+ };
+
+ var ary = helpers.ary,
+ assign = helpers.assign,
+ clone = helpers.clone,
+ curry = helpers.curry,
+ each = helpers.forEach,
+ isArray = helpers.isArray,
+ isFunction = helpers.isFunction,
+ keys = helpers.keys,
+ rearg = helpers.rearg,
+ spread = helpers.spread,
+ toPath = helpers.toPath;
+
+ var aryMethodKeys = keys(mapping.aryMethod);
+
+ var wrappers = {
+ 'castArray': function(castArray) {
+ return function() {
+ var value = arguments[0];
+ return isArray(value)
+ ? castArray(cloneArray(value))
+ : castArray.apply(undefined, arguments);
+ };
+ },
+ 'iteratee': function(iteratee) {
+ return function() {
+ var func = arguments[0],
+ arity = arguments[1],
+ result = iteratee(func, arity),
+ length = result.length;
+
+ if (config.cap && typeof arity == 'number') {
+ arity = arity > 2 ? (arity - 2) : 1;
+ return (length && length <= arity) ? result : baseAry(result, arity);
+ }
+ return result;
+ };
+ },
+ 'mixin': function(mixin) {
+ return function(source) {
+ var func = this;
+ if (!isFunction(func)) {
+ return mixin(func, Object(source));
+ }
+ var methods = [],
+ methodNames = [];
+
+ each(keys(source), function(key) {
+ var value = source[key];
+ if (isFunction(value)) {
+ methodNames.push(key);
+ methods.push(func.prototype[key]);
+ }
+ });
+
+ mixin(func, Object(source));
+
+ each(methodNames, function(methodName, index) {
+ var method = methods[index];
+ if (isFunction(method)) {
+ func.prototype[methodName] = method;
+ } else {
+ delete func.prototype[methodName];
+ }
+ });
+ return func;
+ };
+ },
+ 'runInContext': function(runInContext) {
+ return function(context) {
+ return baseConvert(util, runInContext(context), options);
+ };
+ }
+ };
+
+ /*--------------------------------------------------------------------------*/
+
+ /**
+ * Creates a clone of `object` by `path`.
+ *
+ * @private
+ * @param {Object} object The object to clone.
+ * @param {Array|string} path The path to clone by.
+ * @returns {Object} Returns the cloned object.
+ */
+ function cloneByPath(object, path) {
+ path = toPath(path);
+
+ var index = -1,
+ length = path.length,
+ result = clone(Object(object)),
+ nested = result;
+
+ while (nested != null && ++index < length) {
+ var key = path[index],
+ value = nested[key];
+
+ if (value != null) {
+ nested[key] = clone(Object(value));
+ }
+ nested = nested[key];
+ }
+ return result;
+ }
+
+ /**
+ * Converts `lodash` to an immutable auto-curried iteratee-first data-last
+ * version with conversion `options` applied.
+ *
+ * @param {Object} [options] The options object. See `baseConvert` for more details.
+ * @returns {Function} Returns the converted `lodash`.
+ */
+ function convertLib(options) {
+ return _.runInContext.convert(options)(undefined);
+ }
+
+ /**
+ * Create a converter function for `func` of `name`.
+ *
+ * @param {string} name The name of the function to convert.
+ * @param {Function} func The function to convert.
+ * @returns {Function} Returns the new converter function.
+ */
+ function createConverter(name, func) {
+ var oldOptions = options;
+ return function(options) {
+ var newUtil = isLib ? pristine : helpers,
+ newFunc = isLib ? pristine[name] : func,
+ newOptions = assign(assign({}, oldOptions), options);
+
+ return baseConvert(newUtil, name, newFunc, newOptions);
+ };
+ }
+
+ /**
+ * Creates a function that wraps `func` to invoke its iteratee, with up to `n`
+ * arguments, ignoring any additional arguments.
+ *
+ * @private
+ * @param {Function} func The function to cap iteratee arguments for.
+ * @param {number} n The arity cap.
+ * @returns {Function} Returns the new function.
+ */
+ function iterateeAry(func, n) {
+ return overArg(func, function(func) {
+ return typeof func == 'function' ? baseAry(func, n) : func;
+ });
+ }
+
+ /**
+ * Creates a function that wraps `func` to invoke its iteratee with arguments
+ * arranged according to the specified `indexes` where the argument value at
+ * the first index is provided as the first argument, the argument value at
+ * the second index is provided as the second argument, and so on.
+ *
+ * @private
+ * @param {Function} func The function to rearrange iteratee arguments for.
+ * @param {number[]} indexes The arranged argument indexes.
+ * @returns {Function} Returns the new function.
+ */
+ function iterateeRearg(func, indexes) {
+ return overArg(func, function(func) {
+ var n = indexes.length;
+ return baseArity(rearg(baseAry(func, n), indexes), n);
+ });
+ }
+
+ /**
+ * Creates a function that invokes `func` with its first argument passed
+ * thru `transform`.
+ *
+ * @private
+ * @param {Function} func The function to wrap.
+ * @param {...Function} transform The functions to transform the first argument.
+ * @returns {Function} Returns the new function.
+ */
+ function overArg(func, transform) {
+ return function() {
+ var length = arguments.length;
+ if (!length) {
+ return func();
+ }
+ var args = Array(length);
+ while (length--) {
+ args[length] = arguments[length];
+ }
+ var index = config.rearg ? 0 : (length - 1);
+ args[index] = transform(args[index]);
+ return func.apply(undefined, args);
+ };
+ }
+
+ /**
+ * Creates a function that wraps `func` and applys the conversions
+ * rules by `name`.
+ *
+ * @private
+ * @param {string} name The name of the function to wrap.
+ * @param {Function} func The function to wrap.
+ * @returns {Function} Returns the converted function.
+ */
+ function wrap(name, func) {
+ name = mapping.aliasToReal[name] || name;
+
+ var result,
+ wrapped = func,
+ wrapper = wrappers[name];
+
+ if (wrapper) {
+ wrapped = wrapper(func);
+ }
+ else if (config.immutable) {
+ if (mutateMap.array[name]) {
+ wrapped = immutWrap(func, cloneArray);
+ }
+ else if (mutateMap.object[name]) {
+ wrapped = immutWrap(func, createCloner(func));
+ }
+ else if (mutateMap.set[name]) {
+ wrapped = immutWrap(func, cloneByPath);
+ }
+ }
+ each(aryMethodKeys, function(aryKey) {
+ each(mapping.aryMethod[aryKey], function(otherName) {
+ if (name == otherName) {
+ var aryN = !isLib && mapping.iterateeAry[name],
+ reargIndexes = mapping.iterateeRearg[name],
+ spreadStart = mapping.methodSpread[name];
+
+ result = wrapped;
+ if (config.fixed && (forceFixed || !mapping.skipFixed[name])) {
+ result = spreadStart === undefined
+ ? ary(result, aryKey)
+ : spread(result, spreadStart);
+ }
+ if (config.rearg && aryKey > 1 && (forceRearg || !mapping.skipRearg[name])) {
+ result = rearg(result, mapping.methodRearg[name] || mapping.aryRearg[aryKey]);
+ }
+ if (config.cap) {
+ if (reargIndexes) {
+ result = iterateeRearg(result, reargIndexes);
+ } else if (aryN) {
+ result = iterateeAry(result, aryN);
+ }
+ }
+ if (forceCurry || (config.curry && aryKey > 1)) {
+ forceCurry && console.log(forceCurry, name);
+ result = curry(result, aryKey);
+ }
+ return false;
+ }
+ });
+ return !result;
+ });
+
+ result || (result = wrapped);
+ if (result == func) {
+ result = forceCurry ? curry(result, 1) : function() {
+ return func.apply(this, arguments);
+ };
+ }
+ result.convert = createConverter(name, func);
+ if (mapping.placeholder[name]) {
+ setPlaceholder = true;
+ result.placeholder = func.placeholder = placeholder;
+ }
+ return result;
+ }
+
+ /*--------------------------------------------------------------------------*/
+
+ if (!isObj) {
+ return wrap(name, func);
+ }
+ var _ = func;
+
+ // Convert methods by ary cap.
+ var pairs = [];
+ each(aryMethodKeys, function(aryKey) {
+ each(mapping.aryMethod[aryKey], function(key) {
+ var func = _[mapping.remap[key] || key];
+ if (func) {
+ pairs.push([key, wrap(key, func)]);
+ }
+ });
+ });
+
+ // Convert remaining methods.
+ each(keys(_), function(key) {
+ var func = _[key];
+ if (typeof func == 'function') {
+ var length = pairs.length;
+ while (length--) {
+ if (pairs[length][0] == key) {
+ return;
+ }
+ }
+ func.convert = createConverter(key, func);
+ pairs.push([key, func]);
+ }
+ });
+
+ // Assign to `_` leaving `_.prototype` unchanged to allow chaining.
+ each(pairs, function(pair) {
+ _[pair[0]] = pair[1];
+ });
+
+ _.convert = convertLib;
+ if (setPlaceholder) {
+ _.placeholder = placeholder;
+ }
+ // Assign aliases.
+ each(keys(_), function(key) {
+ each(mapping.realToAlias[key] || [], function(alias) {
+ _[alias] = _[key];
+ });
+ });
+
+ return _;
+}
+
+module.exports = baseConvert;
diff --git a/views/ngXosViews/serviceGrid/src/vendor/lodash/fp/_convertBrowser.js b/views/ngXosViews/serviceGrid/src/vendor/lodash/fp/_convertBrowser.js
new file mode 100644
index 0000000..1874a54
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/lodash/fp/_convertBrowser.js
@@ -0,0 +1,18 @@
+var baseConvert = require('./_baseConvert');
+
+/**
+ * Converts `lodash` to an immutable auto-curried iteratee-first data-last
+ * version with conversion `options` applied.
+ *
+ * @param {Function} lodash The lodash function to convert.
+ * @param {Object} [options] The options object. See `baseConvert` for more details.
+ * @returns {Function} Returns the converted `lodash`.
+ */
+function browserConvert(lodash, options) {
+ return baseConvert(lodash, lodash, options);
+}
+
+if (typeof _ == 'function') {
+ _ = browserConvert(_.runInContext());
+}
+module.exports = browserConvert;
diff --git a/views/ngXosViews/serviceGrid/src/vendor/lodash/fp/_mapping.js b/views/ngXosViews/serviceGrid/src/vendor/lodash/fp/_mapping.js
new file mode 100644
index 0000000..18a3196
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/lodash/fp/_mapping.js
@@ -0,0 +1,290 @@
+/** Used to map aliases to their real names. */
+exports.aliasToReal = {
+
+ // Lodash aliases.
+ 'each': 'forEach',
+ 'eachRight': 'forEachRight',
+ 'entries': 'toPairs',
+ 'entriesIn': 'toPairsIn',
+ 'extend': 'assignIn',
+ 'extendWith': 'assignInWith',
+ 'first': 'head',
+
+ // Ramda aliases.
+ '__': 'placeholder',
+ 'all': 'every',
+ 'allPass': 'overEvery',
+ 'always': 'constant',
+ 'any': 'some',
+ 'anyPass': 'overSome',
+ 'apply': 'spread',
+ 'assoc': 'set',
+ 'assocPath': 'set',
+ 'complement': 'negate',
+ 'compose': 'flowRight',
+ 'contains': 'includes',
+ 'dissoc': 'unset',
+ 'dissocPath': 'unset',
+ 'equals': 'isEqual',
+ 'identical': 'eq',
+ 'init': 'initial',
+ 'invertObj': 'invert',
+ 'juxt': 'over',
+ 'omitAll': 'omit',
+ 'nAry': 'ary',
+ 'path': 'get',
+ 'pathEq': 'matchesProperty',
+ 'pathOr': 'getOr',
+ 'paths': 'at',
+ 'pickAll': 'pick',
+ 'pipe': 'flow',
+ 'pluck': 'map',
+ 'prop': 'get',
+ 'propEq': 'matchesProperty',
+ 'propOr': 'getOr',
+ 'props': 'at',
+ 'unapply': 'rest',
+ 'unnest': 'flatten',
+ 'useWith': 'overArgs',
+ 'whereEq': 'filter',
+ 'zipObj': 'zipObject'
+};
+
+/** Used to map ary to method names. */
+exports.aryMethod = {
+ '1': [
+ 'attempt', 'castArray', 'ceil', 'create', 'curry', 'curryRight', 'floor',
+ 'flow', 'flowRight', 'fromPairs', 'invert', 'iteratee', 'memoize', 'method',
+ 'methodOf', 'mixin', 'over', 'overEvery', 'overSome', 'rest', 'reverse',
+ 'round', 'runInContext', 'spread', 'template', 'trim', 'trimEnd', 'trimStart',
+ 'uniqueId', 'words'
+ ],
+ '2': [
+ 'add', 'after', 'ary', 'assign', 'assignIn', 'at', 'before', 'bind', 'bindAll',
+ 'bindKey', 'chunk', 'cloneDeepWith', 'cloneWith', 'concat', 'countBy', 'curryN',
+ 'curryRightN', 'debounce', 'defaults', 'defaultsDeep', 'delay', 'difference',
+ 'divide', 'drop', 'dropRight', 'dropRightWhile', 'dropWhile', 'endsWith',
+ 'eq', 'every', 'filter', 'find', 'find', 'findIndex', 'findKey', 'findLast',
+ 'findLastIndex', 'findLastKey', 'flatMap', 'flatMapDeep', 'flattenDepth',
+ 'forEach', 'forEachRight', 'forIn', 'forInRight', 'forOwn', 'forOwnRight',
+ 'get', 'groupBy', 'gt', 'gte', 'has', 'hasIn', 'includes', 'indexOf',
+ 'intersection', 'invertBy', 'invoke', 'invokeMap', 'isEqual', 'isMatch',
+ 'join', 'keyBy', 'lastIndexOf', 'lt', 'lte', 'map', 'mapKeys', 'mapValues',
+ 'matchesProperty', 'maxBy', 'meanBy', 'merge', 'minBy', 'multiply', 'nth',
+ 'omit', 'omitBy', 'overArgs', 'pad', 'padEnd', 'padStart', 'parseInt',
+ 'partial', 'partialRight', 'partition', 'pick', 'pickBy', 'pull', 'pullAll',
+ 'pullAt', 'random', 'range', 'rangeRight', 'rearg', 'reject', 'remove',
+ 'repeat', 'restFrom', 'result', 'sampleSize', 'some', 'sortBy', 'sortedIndex',
+ 'sortedIndexOf', 'sortedLastIndex', 'sortedLastIndexOf', 'sortedUniqBy',
+ 'split', 'spreadFrom', 'startsWith', 'subtract', 'sumBy', 'take', 'takeRight',
+ 'takeRightWhile', 'takeWhile', 'tap', 'throttle', 'thru', 'times', 'trimChars',
+ 'trimCharsEnd', 'trimCharsStart', 'truncate', 'union', 'uniqBy', 'uniqWith',
+ 'unset', 'unzipWith', 'without', 'wrap', 'xor', 'zip', 'zipObject',
+ 'zipObjectDeep'
+ ],
+ '3': [
+ 'assignInWith', 'assignWith', 'clamp', 'differenceBy', 'differenceWith',
+ 'getOr', 'inRange', 'intersectionBy', 'intersectionWith', 'invokeArgs',
+ 'invokeArgsMap', 'isEqualWith', 'isMatchWith', 'flatMapDepth', 'mergeWith',
+ 'orderBy', 'padChars', 'padCharsEnd', 'padCharsStart', 'pullAllBy',
+ 'pullAllWith', 'reduce', 'reduceRight', 'replace', 'set', 'slice',
+ 'sortedIndexBy', 'sortedLastIndexBy', 'transform', 'unionBy', 'unionWith',
+ 'update', 'xorBy', 'xorWith', 'zipWith'
+ ],
+ '4': [
+ 'fill', 'setWith', 'updateWith'
+ ]
+};
+
+/** Used to map ary to rearg configs. */
+exports.aryRearg = {
+ '2': [1, 0],
+ '3': [2, 0, 1],
+ '4': [3, 2, 0, 1]
+};
+
+/** Used to map method names to their iteratee ary. */
+exports.iterateeAry = {
+ 'dropRightWhile': 1,
+ 'dropWhile': 1,
+ 'every': 1,
+ 'filter': 1,
+ 'find': 1,
+ 'findIndex': 1,
+ 'findKey': 1,
+ 'findLast': 1,
+ 'findLastIndex': 1,
+ 'findLastKey': 1,
+ 'flatMap': 1,
+ 'flatMapDeep': 1,
+ 'flatMapDepth': 1,
+ 'forEach': 1,
+ 'forEachRight': 1,
+ 'forIn': 1,
+ 'forInRight': 1,
+ 'forOwn': 1,
+ 'forOwnRight': 1,
+ 'map': 1,
+ 'mapKeys': 1,
+ 'mapValues': 1,
+ 'partition': 1,
+ 'reduce': 2,
+ 'reduceRight': 2,
+ 'reject': 1,
+ 'remove': 1,
+ 'some': 1,
+ 'takeRightWhile': 1,
+ 'takeWhile': 1,
+ 'times': 1,
+ 'transform': 2
+};
+
+/** Used to map method names to iteratee rearg configs. */
+exports.iterateeRearg = {
+ 'mapKeys': [1]
+};
+
+/** Used to map method names to rearg configs. */
+exports.methodRearg = {
+ 'assignInWith': [1, 2, 0],
+ 'assignWith': [1, 2, 0],
+ 'getOr': [2, 1, 0],
+ 'isEqualWith': [1, 2, 0],
+ 'isMatchWith': [2, 1, 0],
+ 'mergeWith': [1, 2, 0],
+ 'padChars': [2, 1, 0],
+ 'padCharsEnd': [2, 1, 0],
+ 'padCharsStart': [2, 1, 0],
+ 'pullAllBy': [2, 1, 0],
+ 'pullAllWith': [2, 1, 0],
+ 'setWith': [3, 1, 2, 0],
+ 'sortedIndexBy': [2, 1, 0],
+ 'sortedLastIndexBy': [2, 1, 0],
+ 'updateWith': [3, 1, 2, 0],
+ 'zipWith': [1, 2, 0]
+};
+
+/** Used to map method names to spread configs. */
+exports.methodSpread = {
+ 'invokeArgs': 2,
+ 'invokeArgsMap': 2,
+ 'partial': 1,
+ 'partialRight': 1,
+ 'without': 1
+};
+
+/** Used to identify methods which mutate arrays or objects. */
+exports.mutate = {
+ 'array': {
+ 'fill': true,
+ 'pull': true,
+ 'pullAll': true,
+ 'pullAllBy': true,
+ 'pullAllWith': true,
+ 'pullAt': true,
+ 'remove': true,
+ 'reverse': true
+ },
+ 'object': {
+ 'assign': true,
+ 'assignIn': true,
+ 'assignInWith': true,
+ 'assignWith': true,
+ 'defaults': true,
+ 'defaultsDeep': true,
+ 'merge': true,
+ 'mergeWith': true
+ },
+ 'set': {
+ 'set': true,
+ 'setWith': true,
+ 'unset': true,
+ 'update': true,
+ 'updateWith': true
+ }
+};
+
+/** Used to track methods with placeholder support */
+exports.placeholder = {
+ 'bind': true,
+ 'bindKey': true,
+ 'curry': true,
+ 'curryRight': true,
+ 'partial': true,
+ 'partialRight': true
+};
+
+/** Used to map real names to their aliases. */
+exports.realToAlias = (function() {
+ var hasOwnProperty = Object.prototype.hasOwnProperty,
+ object = exports.aliasToReal,
+ result = {};
+
+ for (var key in object) {
+ var value = object[key];
+ if (hasOwnProperty.call(result, value)) {
+ result[value].push(key);
+ } else {
+ result[value] = [key];
+ }
+ }
+ return result;
+}());
+
+/** Used to map method names to other names. */
+exports.remap = {
+ 'curryN': 'curry',
+ 'curryRightN': 'curryRight',
+ 'getOr': 'get',
+ 'invokeArgs': 'invoke',
+ 'invokeArgsMap': 'invokeMap',
+ 'padChars': 'pad',
+ 'padCharsEnd': 'padEnd',
+ 'padCharsStart': 'padStart',
+ 'restFrom': 'rest',
+ 'spreadFrom': 'spread',
+ 'trimChars': 'trim',
+ 'trimCharsEnd': 'trimEnd',
+ 'trimCharsStart': 'trimStart'
+};
+
+/** Used to track methods that skip fixing their arity. */
+exports.skipFixed = {
+ 'castArray': true,
+ 'flow': true,
+ 'flowRight': true,
+ 'iteratee': true,
+ 'mixin': true,
+ 'runInContext': true
+};
+
+/** Used to track methods that skip rearranging arguments. */
+exports.skipRearg = {
+ 'add': true,
+ 'assign': true,
+ 'assignIn': true,
+ 'bind': true,
+ 'bindKey': true,
+ 'concat': true,
+ 'difference': true,
+ 'divide': true,
+ 'eq': true,
+ 'gt': true,
+ 'gte': true,
+ 'isEqual': true,
+ 'lt': true,
+ 'lte': true,
+ 'matchesProperty': true,
+ 'merge': true,
+ 'multiply': true,
+ 'overArgs': true,
+ 'partial': true,
+ 'partialRight': true,
+ 'random': true,
+ 'range': true,
+ 'rangeRight': true,
+ 'subtract': true,
+ 'without': true,
+ 'zip': true,
+ 'zipObject': true
+};
diff --git a/views/ngXosViews/serviceGrid/src/vendor/lodash/fp/placeholder.js b/views/ngXosViews/serviceGrid/src/vendor/lodash/fp/placeholder.js
new file mode 100644
index 0000000..1ce1739
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/lodash/fp/placeholder.js
@@ -0,0 +1,6 @@
+/**
+ * The default argument placeholder value for methods.
+ *
+ * @type {Object}
+ */
+module.exports = {};
diff --git a/views/ngXosViews/serviceGrid/src/vendor/lodash/lib/common/file.js b/views/ngXosViews/serviceGrid/src/vendor/lodash/lib/common/file.js
new file mode 100644
index 0000000..9f9016f
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/lodash/lib/common/file.js
@@ -0,0 +1,71 @@
+'use strict';
+
+var _ = require('lodash'),
+ fs = require('fs-extra'),
+ glob = require('glob'),
+ path = require('path');
+
+var minify = require('../common/minify.js');
+
+/*----------------------------------------------------------------------------*/
+
+/**
+ * Creates a [fs.copy](https://github.com/jprichardson/node-fs-extra#copy)
+ * function with `srcPath` and `destPath` partially applied.
+ *
+ * @memberOf file
+ * @param {string} srcPath The path of the file to copy.
+ * @param {string} destPath The path to copy the file to.
+ * @returns {Function} Returns the partially applied function.
+ */
+function copy(srcPath, destPath) {
+ return _.partial(fs.copy, srcPath, destPath);
+}
+
+/**
+ * Creates an object of compiled template and base name pairs that match `pattern`.
+ *
+ * @memberOf file
+ * @param {string} pattern The glob pattern to be match.
+ * @returns {Object} Returns the object of compiled templates.
+ */
+function globTemplate(pattern) {
+ return _.transform(glob.sync(pattern), function(result, filePath) {
+ var key = path.basename(filePath, path.extname(filePath));
+ result[key] = _.template(fs.readFileSync(filePath, 'utf8'));
+ }, {});
+}
+
+/**
+ * Creates a `minify` function with `srcPath` and `destPath` partially applied.
+ *
+ * @memberOf file
+ * @param {string} srcPath The path of the file to minify.
+ * @param {string} destPath The path to write the file to.
+ * @returns {Function} Returns the partially applied function.
+ */
+function min(srcPath, destPath) {
+ return _.partial(minify, srcPath, destPath);
+}
+
+/**
+ * Creates a [fs.writeFile](https://nodejs.org/api/fs.html#fs_fs_writefile_file_data_options_callback)
+ * function with `filePath` and `data` partially applied.
+ *
+ * @memberOf file
+ * @param {string} destPath The path to write the file to.
+ * @param {string} data The data to write to the file.
+ * @returns {Function} Returns the partially applied function.
+ */
+function write(destPath, data) {
+ return _.partial(fs.writeFile, destPath, data);
+}
+
+/*----------------------------------------------------------------------------*/
+
+module.exports = {
+ 'copy': copy,
+ 'globTemplate': globTemplate,
+ 'min': min,
+ 'write': write
+};
diff --git a/views/ngXosViews/serviceGrid/src/vendor/lodash/lib/common/mapping.js b/views/ngXosViews/serviceGrid/src/vendor/lodash/lib/common/mapping.js
new file mode 100644
index 0000000..332f5af
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/lodash/lib/common/mapping.js
@@ -0,0 +1,9 @@
+'use strict';
+
+var _mapping = require('../../fp/_mapping'),
+ util = require('./util'),
+ Hash = util.Hash;
+
+/*----------------------------------------------------------------------------*/
+
+module.exports = new Hash(_mapping);
diff --git a/views/ngXosViews/serviceGrid/src/vendor/lodash/lib/common/minify.js b/views/ngXosViews/serviceGrid/src/vendor/lodash/lib/common/minify.js
new file mode 100644
index 0000000..7a0082d
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/lodash/lib/common/minify.js
@@ -0,0 +1,39 @@
+'use strict';
+
+var _ = require('lodash'),
+ fs = require('fs-extra'),
+ uglify = require('uglify-js');
+
+var uglifyOptions = require('./uglify.options');
+
+/*----------------------------------------------------------------------------*/
+
+/**
+ * Asynchronously minifies the file at `srcPath`, writes it to `destPath`, and
+ * invokes `callback` upon completion. The callback is invoked with one argument:
+ * (error).
+ *
+ * If unspecified, `destPath` is `srcPath` with an extension of `.min.js`. For
+ * example, a `srcPath` of `path/to/foo.js` would have a `destPath` of `path/to/foo.min.js`.
+ *
+ * @param {string} srcPath The path of the file to minify.
+ * @param {string} [destPath] The path to write the file to.
+ * @param {Function} callback The function invoked upon completion.
+ * @param {Object} [option] The UglifyJS options object.
+ */
+function minify(srcPath, destPath, callback, options) {
+ if (_.isFunction(destPath)) {
+ if (_.isObject(callback)) {
+ options = callback;
+ }
+ callback = destPath;
+ destPath = undefined;
+ }
+ if (!destPath) {
+ destPath = srcPath.replace(/(?=\.js$)/, '.min');
+ }
+ var output = uglify.minify(srcPath, _.defaults(options || {}, uglifyOptions));
+ fs.writeFile(destPath, output.code, 'utf-8', callback);
+}
+
+module.exports = minify;
diff --git a/views/ngXosViews/serviceGrid/src/vendor/lodash/lib/common/uglify.options.js b/views/ngXosViews/serviceGrid/src/vendor/lodash/lib/common/uglify.options.js
new file mode 100644
index 0000000..af0ff43
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/lodash/lib/common/uglify.options.js
@@ -0,0 +1,23 @@
+'use strict';
+
+/**
+ * The UglifyJS options object for
+ * [compress](https://github.com/mishoo/UglifyJS2#compressor-options),
+ * [mangle](https://github.com/mishoo/UglifyJS2#mangler-options), and
+ * [output](https://github.com/mishoo/UglifyJS2#beautifier-options) options.
+ */
+module.exports = {
+ 'compress': {
+ 'pure_getters': true,
+ 'unsafe': true,
+ 'warnings': false
+ },
+ 'mangle': {
+ 'except': ['define']
+ },
+ 'output': {
+ 'ascii_only': true,
+ 'comments': /^!|@cc_on|@license|@preserve/i,
+ 'max_line_len': 500
+ }
+};
diff --git a/views/ngXosViews/serviceGrid/src/vendor/lodash/lib/common/util.js b/views/ngXosViews/serviceGrid/src/vendor/lodash/lib/common/util.js
new file mode 100644
index 0000000..6445186
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/lodash/lib/common/util.js
@@ -0,0 +1,27 @@
+'use strict';
+
+var _ = require('lodash');
+
+/*----------------------------------------------------------------------------*/
+
+/**
+ * Creates a hash object. If a `properties` object is provided, its own
+ * enumerable properties are assigned to the created object.
+ *
+ * @memberOf util
+ * @param {Object} [properties] The properties to assign to the object.
+ * @returns {Object} Returns the new hash object.
+ */
+function Hash(properties) {
+ return _.transform(properties, function(result, value, key) {
+ result[key] = (_.isPlainObject(value) && !(value instanceof Hash))
+ ? new Hash(value)
+ : value;
+ }, this);
+}
+
+Hash.prototype = Object.create(null);
+
+module.exports = {
+ 'Hash': Hash
+};
diff --git a/views/ngXosViews/serviceGrid/src/vendor/lodash/lib/fp/build-dist.js b/views/ngXosViews/serviceGrid/src/vendor/lodash/lib/fp/build-dist.js
new file mode 100644
index 0000000..bad62d2
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/lodash/lib/fp/build-dist.js
@@ -0,0 +1,55 @@
+'use strict';
+
+var _ = require('lodash'),
+ async = require('async'),
+ path = require('path'),
+ webpack = require('webpack');
+
+var file = require('../common/file');
+
+var basePath = path.join(__dirname, '..', '..'),
+ distPath = path.join(basePath, 'dist'),
+ fpPath = path.join(basePath, 'fp'),
+ filename = 'lodash.fp.js';
+
+var fpConfig = {
+ 'entry': path.join(fpPath, '_convertBrowser.js'),
+ 'output': {
+ 'path': distPath,
+ 'filename': filename,
+ 'library': 'fp',
+ 'libraryTarget': 'umd'
+ },
+ 'plugins': [
+ new webpack.optimize.OccurenceOrderPlugin,
+ new webpack.optimize.DedupePlugin
+ ]
+};
+
+var mappingConfig = {
+ 'entry': path.join(fpPath, '_mapping.js'),
+ 'output': {
+ 'path': distPath,
+ 'filename': 'mapping.fp.js',
+ 'library': 'mapping',
+ 'libraryTarget': 'umd'
+ }
+};
+
+/*----------------------------------------------------------------------------*/
+
+function onComplete(error) {
+ if (error) {
+ throw error;
+ }
+}
+
+function build() {
+ async.series([
+ _.partial(webpack, mappingConfig),
+ _.partial(webpack, fpConfig),
+ file.min(path.join(distPath, filename))
+ ], onComplete);
+}
+
+build();
diff --git a/views/ngXosViews/serviceGrid/src/vendor/lodash/lib/fp/build-doc.js b/views/ngXosViews/serviceGrid/src/vendor/lodash/lib/fp/build-doc.js
new file mode 100644
index 0000000..02800bc
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/lodash/lib/fp/build-doc.js
@@ -0,0 +1,65 @@
+'use strict';
+
+var _ = require('lodash'),
+ fs = require('fs-extra'),
+ path = require('path');
+
+var file = require('../common/file'),
+ mapping = require('../common/mapping');
+
+var templatePath = path.join(__dirname, 'template/doc'),
+ template = file.globTemplate(path.join(templatePath, '*.jst'));
+
+var argNames = ['a', 'b', 'c', 'd'];
+
+var templateData = {
+ 'mapping': mapping,
+ 'toArgOrder': toArgOrder,
+ 'toFuncList': toFuncList
+};
+
+function toArgOrder(array) {
+ var reordered = [];
+ _.each(array, function(newIndex, index) {
+ reordered[newIndex] = argNames[index];
+ });
+ return '`(' + reordered.join(', ') + ')`';
+}
+
+function toFuncList(array) {
+ var chunks = _.chunk(array.slice().sort(), 5),
+ lastChunk = _.last(chunks),
+ last = lastChunk ? lastChunk.pop() : undefined;
+
+ chunks = _.reject(chunks, _.isEmpty);
+ lastChunk = _.last(chunks);
+
+ var result = '`' + _.map(chunks, function(chunk) {
+ return chunk.join('`, `') + '`';
+ }).join(',\n`');
+
+ if (last == null) {
+ return result;
+ }
+ if (_.size(chunks) > 1 || _.size(lastChunk) > 1) {
+ result += ',';
+ }
+ result += ' &';
+ result += _.size(lastChunk) < 5 ? ' ' : '\n';
+ return result + '`' + last + '`';
+}
+
+/*----------------------------------------------------------------------------*/
+
+function onComplete(error) {
+ if (error) {
+ throw error;
+ }
+}
+
+function build(target) {
+ target = path.resolve(target);
+ fs.writeFile(target, template.wiki(templateData), onComplete);
+}
+
+build(_.last(process.argv));
diff --git a/views/ngXosViews/serviceGrid/src/vendor/lodash/lib/fp/build-modules.js b/views/ngXosViews/serviceGrid/src/vendor/lodash/lib/fp/build-modules.js
new file mode 100644
index 0000000..43902e0
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/lodash/lib/fp/build-modules.js
@@ -0,0 +1,120 @@
+'use strict';
+
+var _ = require('lodash'),
+ async = require('async'),
+ glob = require('glob'),
+ path = require('path');
+
+var file = require('../common/file'),
+ mapping = require('../common/mapping');
+
+var templatePath = path.join(__dirname, 'template/modules'),
+ template = file.globTemplate(path.join(templatePath, '*.jst'));
+
+var aryMethods = _.union(
+ mapping.aryMethod[1],
+ mapping.aryMethod[2],
+ mapping.aryMethod[3],
+ mapping.aryMethod[4]
+);
+
+var categories = [
+ 'array',
+ 'collection',
+ 'date',
+ 'function',
+ 'lang',
+ 'math',
+ 'number',
+ 'object',
+ 'seq',
+ 'string',
+ 'util'
+];
+
+var ignored = [
+ '_*.js',
+ 'core.js',
+ 'core.min.js',
+ 'fp.js',
+ 'index.js',
+ 'lodash.js',
+ 'lodash.min.js'
+];
+
+function isAlias(funcName) {
+ return _.has(mapping.aliasToReal, funcName);
+}
+
+function isCategory(funcName) {
+ return _.includes(categories, funcName);
+}
+
+function isThru(funcName) {
+ return !_.includes(aryMethods, funcName);
+}
+
+function getTemplate(moduleName) {
+ var data = {
+ 'name': _.result(mapping.aliasToReal, moduleName, moduleName),
+ 'mapping': mapping
+ };
+
+ if (isAlias(moduleName)) {
+ return template.alias(data);
+ }
+ if (isCategory(moduleName)) {
+ return template.category(data);
+ }
+ if (isThru(moduleName)) {
+ return template.thru(data);
+ }
+ return template.module(data);
+}
+
+/*----------------------------------------------------------------------------*/
+
+function onComplete(error) {
+ if (error) {
+ throw error;
+ }
+}
+
+function build(target) {
+ target = path.resolve(target);
+
+ var fpPath = path.join(target, 'fp');
+
+ // Glob existing lodash module paths.
+ var modulePaths = glob.sync(path.join(target, '*.js'), {
+ 'nodir': true,
+ 'ignore': ignored.map(function(filename) {
+ return path.join(target, filename);
+ })
+ });
+
+ // Add FP alias and remapped module paths.
+ _.each([mapping.aliasToReal, mapping.remap], function(data) {
+ _.forOwn(data, function(realName, alias) {
+ var modulePath = path.join(target, alias + '.js');
+ if (!_.includes(modulePaths, modulePath)) {
+ modulePaths.push(modulePath);
+ }
+ });
+ });
+
+ var actions = modulePaths.map(function(modulePath) {
+ var moduleName = path.basename(modulePath, '.js');
+ return file.write(path.join(fpPath, moduleName + '.js'), getTemplate(moduleName));
+ });
+
+ actions.unshift(file.copy(path.join(__dirname, '../../fp'), fpPath));
+ actions.push(file.write(path.join(fpPath, '_falseOptions.js'), template._falseOptions()));
+ actions.push(file.write(path.join(fpPath, '_util.js'), template._util()));
+ actions.push(file.write(path.join(target, 'fp.js'), template.fp()));
+ actions.push(file.write(path.join(fpPath, 'convert.js'), template.convert()));
+
+ async.series(actions, onComplete);
+}
+
+build(_.last(process.argv));
diff --git a/views/ngXosViews/serviceGrid/src/vendor/lodash/lib/fp/template/doc/wiki.jst b/views/ngXosViews/serviceGrid/src/vendor/lodash/lib/fp/template/doc/wiki.jst
new file mode 100644
index 0000000..188302f
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/lodash/lib/fp/template/doc/wiki.jst
@@ -0,0 +1,220 @@
+## lodash/fp
+
+The `lodash/fp` module is an instance of `lodash` with its methods wrapped to
+produce immutable auto-curried iteratee-first data-last methods.
+
+## Installation
+
+In a browser:
+```html
+<script src='path/to/lodash.js'></script>
+<script src='path/to/lodash.fp.js'></script>
+<script>
+// Loading `lodash.fp.js` converts `_` to its fp variant.
+_.defaults({ 'a': 2, 'b': 2 })({ 'a': 1 });
+// → { 'a: 1, 'b': 2 }
+
+// Use `noConflict` to restore the pre-fp variant.
+var fp = _.noConflict();
+
+_.defaults({ 'a': 1 }, { 'a': 2, 'b': 2 });
+// → { 'a: 1, 'b': 2 }
+fp.defaults({ 'a': 2, 'b': 2 })({ 'a': 1 });
+// → { 'a: 1, 'b': 2 }
+</script>
+```
+
+In Node.js:
+```js
+// Load the fp build.
+var fp = require('lodash/fp');
+
+// Load a method category.
+var object = require('lodash/fp/object');
+
+// Load a single method for smaller builds with browserify/rollup/webpack.
+var extend = require('lodash/fp/extend');
+```
+
+## Mapping
+
+Immutable auto-curried iteratee-first data-last methods sound great, but what
+does that really mean for each method? Below is a breakdown of the mapping used
+to convert each method.
+
+#### Capped Iteratee Arguments
+
+Iteratee arguments are capped to avoid gotchas with variadic iteratees.
+```js
+// The `lodash/map` iteratee receives three arguments:
+// (value, index|key, collection)
+_.map(['6', '8', '10'], parseInt);
+// → [6, NaN, 2]
+
+// The `lodash/fp/map` iteratee is capped at one argument:
+// (value)
+fp.map(parseInt)(['6', '8', '10']);
+// → [6, 8, 10]
+```
+
+Methods that cap iteratees to one argument:<br>
+<%= toFuncList(_.keys(_.pickBy(mapping.iterateeAry, _.partial(_.eq, _, 1)))) %>
+
+Methods that cap iteratees to two arguments:<br>
+<%= toFuncList(_.keys(_.pickBy(mapping.iterateeAry, _.partial(_.eq, _, 2)))) %>
+
+The iteratee of `mapKeys` is invoked with one argument: (key)
+
+#### Fixed Arity
+
+Methods have fixed arities to support auto-currying.
+```js
+// `lodash/padStart` accepts an optional `chars` param.
+_.padStart('a', 3, '-')
+// → '--a'
+
+// `lodash/fp/padStart` does not.
+fp.padStart(3)('a');
+// → ' a'
+fp.padCharsStart('-')(3)('a');
+// → '--a'
+```
+
+Methods with a fixed arity of one:<br>
+<%= toFuncList(_.difference(mapping.aryMethod[1], _.keys(mapping.skipFixed))) %>
+
+Methods with a fixed arity of two:<br>
+<%= toFuncList(_.difference(mapping.aryMethod[2], _.keys(mapping.skipFixed))) %>
+
+Methods with a fixed arity of three:<br>
+<%= toFuncList(_.difference(mapping.aryMethod[3], _.keys(mapping.skipFixed))) %>
+
+Methods with a fixed arity of four:<br>
+<%= toFuncList(_.difference(mapping.aryMethod[4], _.keys(mapping.skipFixed))) %>
+
+#### Rearranged Arguments
+
+Method arguments are rearranged to make composition easier.
+```js
+// `lodash/filter` is data-first iteratee-last:
+// (collection, iteratee)
+var compact = _.partial(_.filter, _, Boolean);
+compact(['a', null, 'c']);
+// → ['a', 'c']
+
+// `lodash/fp/filter` is iteratee-first data-last:
+// (iteratee, collection)
+var compact = fp.filter(Boolean);
+compact(['a', null, 'c']);
+// → ['a', 'c']
+```
+
+##### Most methods follow these rules
+
+A fixed arity of two has an argument order of:<br>
+<%= toArgOrder(mapping.aryRearg[2]) %>
+
+A fixed arity of three has an argument order of:<br>
+<%= toArgOrder(mapping.aryRearg[3]) %>
+
+A fixed arity of four has an argument order of:<br>
+<%= toArgOrder(mapping.aryRearg[4]) %>
+
+##### Exceptions to the rules
+
+Methods that accept an array of arguments as their second parameter:<br>
+<%= toFuncList(_.keys(mapping.methodSpread)) %>
+
+Methods with unchanged argument orders:<br>
+<%= toFuncList(_.keys(mapping.skipRearg)) %>
+
+Methods with custom argument orders:<br>
+<%= _.map(_.keys(mapping.methodRearg), function(methodName) {
+ var orders = mapping.methodRearg[methodName];
+ return ' * `_.' + methodName + '` has an order of ' + toArgOrder(orders);
+}).join('\n') %>
+
+#### New Methods
+
+Not all variadic methods have corresponding new method variants. Feel free to
+[request](https://github.com/lodash/lodash/blob/master/.github/CONTRIBUTING.md#feature-requests)
+any additions.
+
+Methods created to accommodate Lodash’s variadic methods:<br>
+<%= toFuncList(_.keys(mapping.remap)) %>
+
+#### Aliases
+
+There are <%= _.size(mapping.aliasToReal) %> method aliases:<br>
+<%= _.map(_.keys(mapping.aliasToReal).sort(), function(alias) {
+ var realName = mapping.aliasToReal[alias];
+ return ' * `_.' + alias + '` is an alias of `_.' + realName + '`';
+}).join('\n') %>
+
+## Placeholders
+
+The placeholder argument, which defaults to `_`, may be used to fill in method
+arguments in a different order. Placeholders are filled by the first available
+arguments of the curried returned function.
+```js
+// The equivalent of `2 > 5`.
+_.gt(2)(5);
+// → false
+
+// The equivalent of `_.gt(5, 2)` or `5 > 2`.
+_.gt(_, 2)(5);
+// → true
+```
+
+## Chaining
+
+The `lodash/fp` module **does not** convert chain sequence methods. See
+[Izaak Schroeder’s article](https://medium.com/making-internets/why-using-chain-is-a-mistake-9bc1f80d51ba)
+on using functional composition as an alternative to method chaining.
+
+## Convert
+
+Although `lodash/fp` & its method modules come pre-converted, there are times
+when you may want to customize the conversion. That’s when the `convert` method
+comes in handy.
+```js
+// Every option is `true` by default.
+var _fp = fp.convert({
+ // Specify capping iteratee arguments.
+ 'cap': true,
+ // Specify currying.
+ 'curry': true,
+ // Specify fixed arity.
+ 'fixed': true,
+ // Specify immutable operations.
+ 'immutable': true,
+ // Specify rearranging arguments.
+ 'rearg': true
+});
+
+// The `convert` method is available on each method too.
+var mapValuesWithKey = fp.mapValues.convert({ 'cap': false });
+
+// Here’s an example of disabling iteratee argument caps to access the `key` param.
+mapValuesWithKey(function(value, key) {
+ return key == 'a' ? -1 : value;
+})({ 'a': 1, 'b': 1 });
+// => { 'a': -1, 'b': 1 }
+```
+
+Manual conversions are also possible with the `convert` module.
+```js
+var convert = require('lodash/fp/convert');
+
+// Convert by name.
+var assign = convert('assign', require('lodash.assign'));
+
+// Convert by object.
+var fp = convert({
+ 'assign': require('lodash.assign'),
+ 'chunk': require('lodash.chunk')
+});
+
+// Convert by `lodash` instance.
+var fp = convert(lodash.runInContext());
+```
diff --git a/views/ngXosViews/serviceGrid/src/vendor/lodash/lib/fp/template/modules/_falseOptions.jst b/views/ngXosViews/serviceGrid/src/vendor/lodash/lib/fp/template/modules/_falseOptions.jst
new file mode 100644
index 0000000..773235e
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/lodash/lib/fp/template/modules/_falseOptions.jst
@@ -0,0 +1,7 @@
+module.exports = {
+ 'cap': false,
+ 'curry': false,
+ 'fixed': false,
+ 'immutable': false,
+ 'rearg': false
+};
diff --git a/views/ngXosViews/serviceGrid/src/vendor/lodash/lib/fp/template/modules/_util.jst b/views/ngXosViews/serviceGrid/src/vendor/lodash/lib/fp/template/modules/_util.jst
new file mode 100644
index 0000000..d450396
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/lodash/lib/fp/template/modules/_util.jst
@@ -0,0 +1,14 @@
+module.exports = {
+ 'ary': require('../ary'),
+ 'assign': require('../_baseAssign'),
+ 'clone': require('../clone'),
+ 'curry': require('../curry'),
+ 'forEach': require('../_arrayEach'),
+ 'isArray': require('../isArray'),
+ 'isFunction': require('../isFunction'),
+ 'iteratee': require('../iteratee'),
+ 'keys': require('../_baseKeys'),
+ 'rearg': require('../rearg'),
+ 'spread': require('../spread'),
+ 'toPath': require('../toPath')
+};
diff --git a/views/ngXosViews/serviceGrid/src/vendor/lodash/lib/fp/template/modules/alias.jst b/views/ngXosViews/serviceGrid/src/vendor/lodash/lib/fp/template/modules/alias.jst
new file mode 100644
index 0000000..6d72710
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/lodash/lib/fp/template/modules/alias.jst
@@ -0,0 +1 @@
+module.exports = require('./<%= name %>');
diff --git a/views/ngXosViews/serviceGrid/src/vendor/lodash/lib/fp/template/modules/category.jst b/views/ngXosViews/serviceGrid/src/vendor/lodash/lib/fp/template/modules/category.jst
new file mode 100644
index 0000000..62c2db8
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/lodash/lib/fp/template/modules/category.jst
@@ -0,0 +1,2 @@
+var convert = require('./convert');
+module.exports = convert(require('../<%= name %>'));
diff --git a/views/ngXosViews/serviceGrid/src/vendor/lodash/lib/fp/template/modules/convert.jst b/views/ngXosViews/serviceGrid/src/vendor/lodash/lib/fp/template/modules/convert.jst
new file mode 100644
index 0000000..4795dc4
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/lodash/lib/fp/template/modules/convert.jst
@@ -0,0 +1,18 @@
+var baseConvert = require('./_baseConvert'),
+ util = require('./_util');
+
+/**
+ * Converts `func` of `name` to an immutable auto-curried iteratee-first data-last
+ * version with conversion `options` applied. If `name` is an object its methods
+ * will be converted.
+ *
+ * @param {string} name The name of the function to wrap.
+ * @param {Function} [func] The function to wrap.
+ * @param {Object} [options] The options object. See `baseConvert` for more details.
+ * @returns {Function|Object} Returns the converted function or object.
+ */
+function convert(name, func, options) {
+ return baseConvert(util, name, func, options);
+}
+
+module.exports = convert;
diff --git a/views/ngXosViews/serviceGrid/src/vendor/lodash/lib/fp/template/modules/fp.jst b/views/ngXosViews/serviceGrid/src/vendor/lodash/lib/fp/template/modules/fp.jst
new file mode 100644
index 0000000..e372dbb
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/lodash/lib/fp/template/modules/fp.jst
@@ -0,0 +1,2 @@
+var _ = require('./lodash.min').runInContext();
+module.exports = require('./fp/_baseConvert')(_, _);
diff --git a/views/ngXosViews/serviceGrid/src/vendor/lodash/lib/fp/template/modules/module.jst b/views/ngXosViews/serviceGrid/src/vendor/lodash/lib/fp/template/modules/module.jst
new file mode 100644
index 0000000..289bd2b
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/lodash/lib/fp/template/modules/module.jst
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('<%= name %>', require('../<%= _.result(mapping.remap, name, name) %>'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/views/ngXosViews/serviceGrid/src/vendor/lodash/lib/fp/template/modules/thru.jst b/views/ngXosViews/serviceGrid/src/vendor/lodash/lib/fp/template/modules/thru.jst
new file mode 100644
index 0000000..5bc1a7b
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/lodash/lib/fp/template/modules/thru.jst
@@ -0,0 +1,5 @@
+var convert = require('./convert'),
+ func = convert('<%= name %>', require('../<%= _.result(mapping.remap, name, name) %>'), require('./_falseOptions'));
+
+func.placeholder = require('./placeholder');
+module.exports = func;
diff --git a/views/ngXosViews/serviceGrid/src/vendor/lodash/lib/main/build-dist.js b/views/ngXosViews/serviceGrid/src/vendor/lodash/lib/main/build-dist.js
new file mode 100644
index 0000000..14b3fd3
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/lodash/lib/main/build-dist.js
@@ -0,0 +1,30 @@
+'use strict';
+
+var async = require('async'),
+ path = require('path');
+
+var file = require('../common/file');
+
+var basePath = path.join(__dirname, '..', '..'),
+ distPath = path.join(basePath, 'dist'),
+ filename = 'lodash.js';
+
+var baseLodash = path.join(basePath, filename),
+ distLodash = path.join(distPath, filename);
+
+/*----------------------------------------------------------------------------*/
+
+function onComplete(error) {
+ if (error) {
+ throw error;
+ }
+}
+
+function build() {
+ async.series([
+ file.copy(baseLodash, distLodash),
+ file.min(distLodash)
+ ], onComplete);
+}
+
+build();
diff --git a/views/ngXosViews/serviceGrid/src/vendor/lodash/lib/main/build-doc.js b/views/ngXosViews/serviceGrid/src/vendor/lodash/lib/main/build-doc.js
new file mode 100644
index 0000000..9756954
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/lodash/lib/main/build-doc.js
@@ -0,0 +1,60 @@
+'use strict';
+
+var _ = require('lodash'),
+ docdown = require('docdown'),
+ fs = require('fs-extra'),
+ path = require('path');
+
+var basePath = path.join(__dirname, '..', '..'),
+ docPath = path.join(basePath, 'doc'),
+ readmePath = path.join(docPath, 'README.md');
+
+var pkg = require('../../package.json'),
+ version = pkg.version;
+
+var config = {
+ 'base': {
+ 'entryLinks': [
+ '<% if (name == "templateSettings" || !/^(?:methods|properties|seq)$/i.test(category)) {' +
+ 'print("[Ⓝ](https://www.npmjs.com/package/lodash." + name.toLowerCase() + " \\"See the npm package\\")")' +
+ '} %>'
+ ],
+ 'path': path.join(basePath, 'lodash.js'),
+ 'title': '<a href="https://lodash.com/">lodash</a> <span>v' + version + '</span>',
+ 'toc': 'categories',
+ 'url': 'https://github.com/lodash/lodash/blob/' + version + '/lodash.js'
+ },
+ 'github': {
+ 'hash': 'github'
+ },
+ 'site': {
+ 'tocLink': '#docs'
+ }
+};
+
+function postprocess(string) {
+ // Fix docdown bugs.
+ return string
+ // Repair the default value of `chars`.
+ // See https://github.com/eslint/doctrine/issues/157 for more details.
+ .replace(/\bchars=''/g, "chars=' '")
+ // Wrap symbol property identifiers in brackets.
+ .replace(/\.(Symbol\.(?:[a-z]+[A-Z]?)+)/g, '[$1]');
+}
+
+/*----------------------------------------------------------------------------*/
+
+function onComplete(error) {
+ if (error) {
+ throw error;
+ }
+}
+
+function build(type) {
+ var options = _.defaults({}, config.base, config[type]),
+ markdown = docdown(options);
+
+ fs.writeFile(readmePath, postprocess(markdown), onComplete);
+}
+
+build(_.last(process.argv));
diff --git a/views/ngXosViews/serviceGrid/src/vendor/lodash/lib/main/build-modules.js b/views/ngXosViews/serviceGrid/src/vendor/lodash/lib/main/build-modules.js
new file mode 100644
index 0000000..5d89e0d
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/lodash/lib/main/build-modules.js
@@ -0,0 +1,34 @@
+'use strict';
+
+var _ = require('lodash'),
+ async = require('async'),
+ path = require('path');
+
+var file = require('../common/file');
+
+var basePath = path.join(__dirname, '..', '..'),
+ distPath = path.join(basePath, 'dist');
+
+var filePairs = [
+ [path.join(distPath, 'lodash.core.js'), 'core.js'],
+ [path.join(distPath, 'lodash.core.min.js'), 'core.min.js'],
+ [path.join(distPath, 'lodash.min.js'), 'lodash.min.js']
+];
+
+/*----------------------------------------------------------------------------*/
+
+function onComplete(error) {
+ if (error) {
+ throw error;
+ }
+}
+
+function build(target) {
+ var actions = _.map(filePairs, function(pair) {
+ return file.copy(pair[0], path.join(target, pair[1]));
+ });
+
+ async.series(actions, onComplete);
+}
+
+build(_.last(process.argv));
diff --git a/views/ngXosViews/serviceGrid/src/vendor/lodash/lodash.js b/views/ngXosViews/serviceGrid/src/vendor/lodash/lodash.js
new file mode 100644
index 0000000..9f472f6
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/lodash/lodash.js
@@ -0,0 +1,16148 @@
+/**
+ * @license
+ * lodash 4.11.2 <https://lodash.com/>
+ * Copyright jQuery Foundation and other contributors <https://jquery.org/>
+ * Released under MIT license <https://lodash.com/license>
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
+ * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+ */
+;(function() {
+
+ /** Used as a safe reference for `undefined` in pre-ES5 environments. */
+ var undefined;
+
+ /** Used as the semantic version number. */
+ var VERSION = '4.11.2';
+
+ /** Used as the size to enable large array optimizations. */
+ var LARGE_ARRAY_SIZE = 200;
+
+ /** Used as the `TypeError` message for "Functions" methods. */
+ var FUNC_ERROR_TEXT = 'Expected a function';
+
+ /** Used to stand-in for `undefined` hash values. */
+ var HASH_UNDEFINED = '__lodash_hash_undefined__';
+
+ /** Used as the internal argument placeholder. */
+ var PLACEHOLDER = '__lodash_placeholder__';
+
+ /** Used to compose bitmasks for wrapper metadata. */
+ var BIND_FLAG = 1,
+ BIND_KEY_FLAG = 2,
+ CURRY_BOUND_FLAG = 4,
+ CURRY_FLAG = 8,
+ CURRY_RIGHT_FLAG = 16,
+ PARTIAL_FLAG = 32,
+ PARTIAL_RIGHT_FLAG = 64,
+ ARY_FLAG = 128,
+ REARG_FLAG = 256,
+ FLIP_FLAG = 512;
+
+ /** Used to compose bitmasks for comparison styles. */
+ var UNORDERED_COMPARE_FLAG = 1,
+ PARTIAL_COMPARE_FLAG = 2;
+
+ /** Used as default options for `_.truncate`. */
+ var DEFAULT_TRUNC_LENGTH = 30,
+ DEFAULT_TRUNC_OMISSION = '...';
+
+ /** Used to detect hot functions by number of calls within a span of milliseconds. */
+ var HOT_COUNT = 150,
+ HOT_SPAN = 16;
+
+ /** Used to indicate the type of lazy iteratees. */
+ var LAZY_FILTER_FLAG = 1,
+ LAZY_MAP_FLAG = 2,
+ LAZY_WHILE_FLAG = 3;
+
+ /** Used as references for various `Number` constants. */
+ var INFINITY = 1 / 0,
+ MAX_SAFE_INTEGER = 9007199254740991,
+ MAX_INTEGER = 1.7976931348623157e+308,
+ NAN = 0 / 0;
+
+ /** Used as references for the maximum length and index of an array. */
+ var MAX_ARRAY_LENGTH = 4294967295,
+ MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1,
+ HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1;
+
+ /** `Object#toString` result references. */
+ var argsTag = '[object Arguments]',
+ arrayTag = '[object Array]',
+ boolTag = '[object Boolean]',
+ dateTag = '[object Date]',
+ errorTag = '[object Error]',
+ funcTag = '[object Function]',
+ genTag = '[object GeneratorFunction]',
+ mapTag = '[object Map]',
+ numberTag = '[object Number]',
+ objectTag = '[object Object]',
+ promiseTag = '[object Promise]',
+ regexpTag = '[object RegExp]',
+ setTag = '[object Set]',
+ stringTag = '[object String]',
+ symbolTag = '[object Symbol]',
+ weakMapTag = '[object WeakMap]',
+ weakSetTag = '[object WeakSet]';
+
+ var arrayBufferTag = '[object ArrayBuffer]',
+ dataViewTag = '[object DataView]',
+ float32Tag = '[object Float32Array]',
+ float64Tag = '[object Float64Array]',
+ int8Tag = '[object Int8Array]',
+ int16Tag = '[object Int16Array]',
+ int32Tag = '[object Int32Array]',
+ uint8Tag = '[object Uint8Array]',
+ uint8ClampedTag = '[object Uint8ClampedArray]',
+ uint16Tag = '[object Uint16Array]',
+ uint32Tag = '[object Uint32Array]';
+
+ /** Used to match empty string literals in compiled template source. */
+ var reEmptyStringLeading = /\b__p \+= '';/g,
+ reEmptyStringMiddle = /\b(__p \+=) '' \+/g,
+ reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g;
+
+ /** Used to match HTML entities and HTML characters. */
+ var reEscapedHtml = /&(?:amp|lt|gt|quot|#39|#96);/g,
+ reUnescapedHtml = /[&<>"'`]/g,
+ reHasEscapedHtml = RegExp(reEscapedHtml.source),
+ reHasUnescapedHtml = RegExp(reUnescapedHtml.source);
+
+ /** Used to match template delimiters. */
+ var reEscape = /<%-([\s\S]+?)%>/g,
+ reEvaluate = /<%([\s\S]+?)%>/g,
+ reInterpolate = /<%=([\s\S]+?)%>/g;
+
+ /** Used to match property names within property paths. */
+ var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
+ reIsPlainProp = /^\w*$/,
+ rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]/g;
+
+ /**
+ * Used to match `RegExp`
+ * [syntax characters](http://ecma-international.org/ecma-262/6.0/#sec-patterns).
+ */
+ var reRegExpChar = /[\\^$.*+?()[\]{}|]/g,
+ reHasRegExpChar = RegExp(reRegExpChar.source);
+
+ /** Used to match leading and trailing whitespace. */
+ var reTrim = /^\s+|\s+$/g,
+ reTrimStart = /^\s+/,
+ reTrimEnd = /\s+$/;
+
+ /** Used to match non-compound words composed of alphanumeric characters. */
+ var reBasicWord = /[a-zA-Z0-9]+/g;
+
+ /** Used to match backslashes in property paths. */
+ var reEscapeChar = /\\(\\)?/g;
+
+ /**
+ * Used to match
+ * [ES template delimiters](http://ecma-international.org/ecma-262/6.0/#sec-template-literal-lexical-components).
+ */
+ var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g;
+
+ /** Used to match `RegExp` flags from their coerced string values. */
+ var reFlags = /\w*$/;
+
+ /** Used to detect hexadecimal string values. */
+ var reHasHexPrefix = /^0x/i;
+
+ /** Used to detect bad signed hexadecimal string values. */
+ var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
+
+ /** Used to detect binary string values. */
+ var reIsBinary = /^0b[01]+$/i;
+
+ /** Used to detect host constructors (Safari). */
+ var reIsHostCtor = /^\[object .+?Constructor\]$/;
+
+ /** Used to detect octal string values. */
+ var reIsOctal = /^0o[0-7]+$/i;
+
+ /** Used to detect unsigned integer values. */
+ var reIsUint = /^(?:0|[1-9]\d*)$/;
+
+ /** Used to match latin-1 supplementary letters (excluding mathematical operators). */
+ var reLatin1 = /[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g;
+
+ /** Used to ensure capturing order of template delimiters. */
+ var reNoMatch = /($^)/;
+
+ /** Used to match unescaped characters in compiled string literals. */
+ var reUnescapedString = /['\n\r\u2028\u2029\\]/g;
+
+ /** Used to compose unicode character classes. */
+ var rsAstralRange = '\\ud800-\\udfff',
+ rsComboMarksRange = '\\u0300-\\u036f\\ufe20-\\ufe23',
+ rsComboSymbolsRange = '\\u20d0-\\u20f0',
+ rsDingbatRange = '\\u2700-\\u27bf',
+ rsLowerRange = 'a-z\\xdf-\\xf6\\xf8-\\xff',
+ rsMathOpRange = '\\xac\\xb1\\xd7\\xf7',
+ rsNonCharRange = '\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf',
+ rsPunctuationRange = '\\u2000-\\u206f',
+ rsSpaceRange = ' \\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',
+ rsUpperRange = 'A-Z\\xc0-\\xd6\\xd8-\\xde',
+ rsVarRange = '\\ufe0e\\ufe0f',
+ rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange;
+
+ /** Used to compose unicode capture groups. */
+ var rsApos = "['\u2019]",
+ rsAstral = '[' + rsAstralRange + ']',
+ rsBreak = '[' + rsBreakRange + ']',
+ rsCombo = '[' + rsComboMarksRange + rsComboSymbolsRange + ']',
+ rsDigits = '\\d+',
+ rsDingbat = '[' + rsDingbatRange + ']',
+ rsLower = '[' + rsLowerRange + ']',
+ rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']',
+ rsFitz = '\\ud83c[\\udffb-\\udfff]',
+ rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',
+ rsNonAstral = '[^' + rsAstralRange + ']',
+ rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}',
+ rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]',
+ rsUpper = '[' + rsUpperRange + ']',
+ rsZWJ = '\\u200d';
+
+ /** Used to compose unicode regexes. */
+ var rsLowerMisc = '(?:' + rsLower + '|' + rsMisc + ')',
+ rsUpperMisc = '(?:' + rsUpper + '|' + rsMisc + ')',
+ rsOptLowerContr = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?',
+ rsOptUpperContr = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?',
+ reOptMod = rsModifier + '?',
+ rsOptVar = '[' + rsVarRange + ']?',
+ rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',
+ rsSeq = rsOptVar + reOptMod + rsOptJoin,
+ rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq,
+ rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';
+
+ /** Used to match apostrophes. */
+ var reApos = RegExp(rsApos, 'g');
+
+ /**
+ * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and
+ * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols).
+ */
+ var reComboMark = RegExp(rsCombo, 'g');
+
+ /** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */
+ var reComplexSymbol = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');
+
+ /** Used to match complex or compound words. */
+ var reComplexWord = RegExp([
+ rsUpper + '?' + rsLower + '+' + rsOptLowerContr + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')',
+ rsUpperMisc + '+' + rsOptUpperContr + '(?=' + [rsBreak, rsUpper + rsLowerMisc, '$'].join('|') + ')',
+ rsUpper + '?' + rsLowerMisc + '+' + rsOptLowerContr,
+ rsUpper + '+' + rsOptUpperContr,
+ rsDigits,
+ rsEmoji
+ ].join('|'), 'g');
+
+ /** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */
+ var reHasComplexSymbol = RegExp('[' + rsZWJ + rsAstralRange + rsComboMarksRange + rsComboSymbolsRange + rsVarRange + ']');
+
+ /** Used to detect strings that need a more robust regexp to match words. */
+ var reHasComplexWord = /[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;
+
+ /** Used to assign default `context` object properties. */
+ var contextProps = [
+ 'Array', 'Buffer', 'DataView', 'Date', 'Error', 'Float32Array', 'Float64Array',
+ 'Function', 'Int8Array', 'Int16Array', 'Int32Array', 'Map', 'Math', 'Object',
+ 'Promise', 'Reflect', 'RegExp', 'Set', 'String', 'Symbol', 'TypeError',
+ 'Uint8Array', 'Uint8ClampedArray', 'Uint16Array', 'Uint32Array', 'WeakMap',
+ '_', 'clearTimeout', 'isFinite', 'parseInt', 'setTimeout'
+ ];
+
+ /** Used to make template sourceURLs easier to identify. */
+ var templateCounter = -1;
+
+ /** Used to identify `toStringTag` values of typed arrays. */
+ var typedArrayTags = {};
+ typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =
+ typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =
+ typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =
+ typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =
+ typedArrayTags[uint32Tag] = true;
+ typedArrayTags[argsTag] = typedArrayTags[arrayTag] =
+ typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =
+ typedArrayTags[dataViewTag] = typedArrayTags[dateTag] =
+ typedArrayTags[errorTag] = typedArrayTags[funcTag] =
+ typedArrayTags[mapTag] = typedArrayTags[numberTag] =
+ typedArrayTags[objectTag] = typedArrayTags[regexpTag] =
+ typedArrayTags[setTag] = typedArrayTags[stringTag] =
+ typedArrayTags[weakMapTag] = false;
+
+ /** Used to identify `toStringTag` values supported by `_.clone`. */
+ var cloneableTags = {};
+ cloneableTags[argsTag] = cloneableTags[arrayTag] =
+ cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =
+ cloneableTags[boolTag] = cloneableTags[dateTag] =
+ cloneableTags[float32Tag] = cloneableTags[float64Tag] =
+ cloneableTags[int8Tag] = cloneableTags[int16Tag] =
+ cloneableTags[int32Tag] = cloneableTags[mapTag] =
+ cloneableTags[numberTag] = cloneableTags[objectTag] =
+ cloneableTags[regexpTag] = cloneableTags[setTag] =
+ cloneableTags[stringTag] = cloneableTags[symbolTag] =
+ cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =
+ cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
+ cloneableTags[errorTag] = cloneableTags[funcTag] =
+ cloneableTags[weakMapTag] = false;
+
+ /** Used to map latin-1 supplementary letters to basic latin letters. */
+ var deburredLetters = {
+ '\xc0': 'A', '\xc1': 'A', '\xc2': 'A', '\xc3': 'A', '\xc4': 'A', '\xc5': 'A',
+ '\xe0': 'a', '\xe1': 'a', '\xe2': 'a', '\xe3': 'a', '\xe4': 'a', '\xe5': 'a',
+ '\xc7': 'C', '\xe7': 'c',
+ '\xd0': 'D', '\xf0': 'd',
+ '\xc8': 'E', '\xc9': 'E', '\xca': 'E', '\xcb': 'E',
+ '\xe8': 'e', '\xe9': 'e', '\xea': 'e', '\xeb': 'e',
+ '\xcC': 'I', '\xcd': 'I', '\xce': 'I', '\xcf': 'I',
+ '\xeC': 'i', '\xed': 'i', '\xee': 'i', '\xef': 'i',
+ '\xd1': 'N', '\xf1': 'n',
+ '\xd2': 'O', '\xd3': 'O', '\xd4': 'O', '\xd5': 'O', '\xd6': 'O', '\xd8': 'O',
+ '\xf2': 'o', '\xf3': 'o', '\xf4': 'o', '\xf5': 'o', '\xf6': 'o', '\xf8': 'o',
+ '\xd9': 'U', '\xda': 'U', '\xdb': 'U', '\xdc': 'U',
+ '\xf9': 'u', '\xfa': 'u', '\xfb': 'u', '\xfc': 'u',
+ '\xdd': 'Y', '\xfd': 'y', '\xff': 'y',
+ '\xc6': 'Ae', '\xe6': 'ae',
+ '\xde': 'Th', '\xfe': 'th',
+ '\xdf': 'ss'
+ };
+
+ /** Used to map characters to HTML entities. */
+ var htmlEscapes = {
+ '&': '&',
+ '<': '<',
+ '>': '>',
+ '"': '"',
+ "'": ''',
+ '`': '`'
+ };
+
+ /** Used to map HTML entities to characters. */
+ var htmlUnescapes = {
+ '&': '&',
+ '<': '<',
+ '>': '>',
+ '"': '"',
+ ''': "'",
+ '`': '`'
+ };
+
+ /** Used to determine if values are of the language type `Object`. */
+ var objectTypes = {
+ 'function': true,
+ 'object': true
+ };
+
+ /** Used to escape characters for inclusion in compiled string literals. */
+ var stringEscapes = {
+ '\\': '\\',
+ "'": "'",
+ '\n': 'n',
+ '\r': 'r',
+ '\u2028': 'u2028',
+ '\u2029': 'u2029'
+ };
+
+ /** Built-in method references without a dependency on `root`. */
+ var freeParseFloat = parseFloat,
+ freeParseInt = parseInt;
+
+ /** Detect free variable `exports`. */
+ var freeExports = (objectTypes[typeof exports] && exports && !exports.nodeType)
+ ? exports
+ : undefined;
+
+ /** Detect free variable `module`. */
+ var freeModule = (objectTypes[typeof module] && module && !module.nodeType)
+ ? module
+ : undefined;
+
+ /** Detect the popular CommonJS extension `module.exports`. */
+ var moduleExports = (freeModule && freeModule.exports === freeExports)
+ ? freeExports
+ : undefined;
+
+ /** Detect free variable `global` from Node.js. */
+ var freeGlobal = checkGlobal(freeExports && freeModule && typeof global == 'object' && global);
+
+ /** Detect free variable `self`. */
+ var freeSelf = checkGlobal(objectTypes[typeof self] && self);
+
+ /** Detect free variable `window`. */
+ var freeWindow = checkGlobal(objectTypes[typeof window] && window);
+
+ /** Detect `this` as the global object. */
+ var thisGlobal = checkGlobal(objectTypes[typeof this] && this);
+
+ /**
+ * Used as a reference to the global object.
+ *
+ * The `this` value is used if it's the global object to avoid Greasemonkey's
+ * restricted `window` object, otherwise the `window` object is used.
+ */
+ var root = freeGlobal ||
+ ((freeWindow !== (thisGlobal && thisGlobal.window)) && freeWindow) ||
+ freeSelf || thisGlobal || Function('return this')();
+
+ /*--------------------------------------------------------------------------*/
+
+ /**
+ * Adds the key-value `pair` to `map`.
+ *
+ * @private
+ * @param {Object} map The map to modify.
+ * @param {Array} pair The key-value pair to add.
+ * @returns {Object} Returns `map`.
+ */
+ function addMapEntry(map, pair) {
+ // Don't return `Map#set` because it doesn't return the map instance in IE 11.
+ map.set(pair[0], pair[1]);
+ return map;
+ }
+
+ /**
+ * Adds `value` to `set`.
+ *
+ * @private
+ * @param {Object} set The set to modify.
+ * @param {*} value The value to add.
+ * @returns {Object} Returns `set`.
+ */
+ function addSetEntry(set, value) {
+ set.add(value);
+ return set;
+ }
+
+ /**
+ * A faster alternative to `Function#apply`, this function invokes `func`
+ * with the `this` binding of `thisArg` and the arguments of `args`.
+ *
+ * @private
+ * @param {Function} func The function to invoke.
+ * @param {*} thisArg The `this` binding of `func`.
+ * @param {Array} args The arguments to invoke `func` with.
+ * @returns {*} Returns the result of `func`.
+ */
+ function apply(func, thisArg, args) {
+ var length = args.length;
+ switch (length) {
+ case 0: return func.call(thisArg);
+ case 1: return func.call(thisArg, args[0]);
+ case 2: return func.call(thisArg, args[0], args[1]);
+ case 3: return func.call(thisArg, args[0], args[1], args[2]);
+ }
+ return func.apply(thisArg, args);
+ }
+
+ /**
+ * A specialized version of `baseAggregator` for arrays.
+ *
+ * @private
+ * @param {Array} array The array to iterate over.
+ * @param {Function} setter The function to set `accumulator` values.
+ * @param {Function} iteratee The iteratee to transform keys.
+ * @param {Object} accumulator The initial aggregated object.
+ * @returns {Function} Returns `accumulator`.
+ */
+ function arrayAggregator(array, setter, iteratee, accumulator) {
+ var index = -1,
+ length = array.length;
+
+ while (++index < length) {
+ var value = array[index];
+ setter(accumulator, value, iteratee(value), array);
+ }
+ return accumulator;
+ }
+
+ /**
+ * Creates a new array concatenating `array` with `other`.
+ *
+ * @private
+ * @param {Array} array The first array to concatenate.
+ * @param {Array} other The second array to concatenate.
+ * @returns {Array} Returns the new concatenated array.
+ */
+ function arrayConcat(array, other) {
+ var index = -1,
+ length = array.length,
+ othIndex = -1,
+ othLength = other.length,
+ result = Array(length + othLength);
+
+ while (++index < length) {
+ result[index] = array[index];
+ }
+ while (++othIndex < othLength) {
+ result[index++] = other[othIndex];
+ }
+ return result;
+ }
+
+ /**
+ * A specialized version of `_.forEach` for arrays without support for
+ * iteratee shorthands.
+ *
+ * @private
+ * @param {Array} array The array to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Array} Returns `array`.
+ */
+ function arrayEach(array, iteratee) {
+ var index = -1,
+ length = array.length;
+
+ while (++index < length) {
+ if (iteratee(array[index], index, array) === false) {
+ break;
+ }
+ }
+ return array;
+ }
+
+ /**
+ * A specialized version of `_.forEachRight` for arrays without support for
+ * iteratee shorthands.
+ *
+ * @private
+ * @param {Array} array The array to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Array} Returns `array`.
+ */
+ function arrayEachRight(array, iteratee) {
+ var length = array.length;
+
+ while (length--) {
+ if (iteratee(array[length], length, array) === false) {
+ break;
+ }
+ }
+ return array;
+ }
+
+ /**
+ * A specialized version of `_.every` for arrays without support for
+ * iteratee shorthands.
+ *
+ * @private
+ * @param {Array} array The array to iterate over.
+ * @param {Function} predicate The function invoked per iteration.
+ * @returns {boolean} Returns `true` if all elements pass the predicate check,
+ * else `false`.
+ */
+ function arrayEvery(array, predicate) {
+ var index = -1,
+ length = array.length;
+
+ while (++index < length) {
+ if (!predicate(array[index], index, array)) {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ /**
+ * A specialized version of `_.filter` for arrays without support for
+ * iteratee shorthands.
+ *
+ * @private
+ * @param {Array} array The array to iterate over.
+ * @param {Function} predicate The function invoked per iteration.
+ * @returns {Array} Returns the new filtered array.
+ */
+ function arrayFilter(array, predicate) {
+ var index = -1,
+ length = array.length,
+ resIndex = 0,
+ result = [];
+
+ while (++index < length) {
+ var value = array[index];
+ if (predicate(value, index, array)) {
+ result[resIndex++] = value;
+ }
+ }
+ return result;
+ }
+
+ /**
+ * A specialized version of `_.includes` for arrays without support for
+ * specifying an index to search from.
+ *
+ * @private
+ * @param {Array} array The array to search.
+ * @param {*} target The value to search for.
+ * @returns {boolean} Returns `true` if `target` is found, else `false`.
+ */
+ function arrayIncludes(array, value) {
+ return !!array.length && baseIndexOf(array, value, 0) > -1;
+ }
+
+ /**
+ * This function is like `arrayIncludes` except that it accepts a comparator.
+ *
+ * @private
+ * @param {Array} array The array to search.
+ * @param {*} target The value to search for.
+ * @param {Function} comparator The comparator invoked per element.
+ * @returns {boolean} Returns `true` if `target` is found, else `false`.
+ */
+ function arrayIncludesWith(array, value, comparator) {
+ var index = -1,
+ length = array.length;
+
+ while (++index < length) {
+ if (comparator(value, array[index])) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ /**
+ * A specialized version of `_.map` for arrays without support for iteratee
+ * shorthands.
+ *
+ * @private
+ * @param {Array} array The array to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Array} Returns the new mapped array.
+ */
+ function arrayMap(array, iteratee) {
+ var index = -1,
+ length = array.length,
+ result = Array(length);
+
+ while (++index < length) {
+ result[index] = iteratee(array[index], index, array);
+ }
+ return result;
+ }
+
+ /**
+ * Appends the elements of `values` to `array`.
+ *
+ * @private
+ * @param {Array} array The array to modify.
+ * @param {Array} values The values to append.
+ * @returns {Array} Returns `array`.
+ */
+ function arrayPush(array, values) {
+ var index = -1,
+ length = values.length,
+ offset = array.length;
+
+ while (++index < length) {
+ array[offset + index] = values[index];
+ }
+ return array;
+ }
+
+ /**
+ * A specialized version of `_.reduce` for arrays without support for
+ * iteratee shorthands.
+ *
+ * @private
+ * @param {Array} array The array to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @param {*} [accumulator] The initial value.
+ * @param {boolean} [initAccum] Specify using the first element of `array` as
+ * the initial value.
+ * @returns {*} Returns the accumulated value.
+ */
+ function arrayReduce(array, iteratee, accumulator, initAccum) {
+ var index = -1,
+ length = array.length;
+
+ if (initAccum && length) {
+ accumulator = array[++index];
+ }
+ while (++index < length) {
+ accumulator = iteratee(accumulator, array[index], index, array);
+ }
+ return accumulator;
+ }
+
+ /**
+ * A specialized version of `_.reduceRight` for arrays without support for
+ * iteratee shorthands.
+ *
+ * @private
+ * @param {Array} array The array to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @param {*} [accumulator] The initial value.
+ * @param {boolean} [initAccum] Specify using the last element of `array` as
+ * the initial value.
+ * @returns {*} Returns the accumulated value.
+ */
+ function arrayReduceRight(array, iteratee, accumulator, initAccum) {
+ var length = array.length;
+ if (initAccum && length) {
+ accumulator = array[--length];
+ }
+ while (length--) {
+ accumulator = iteratee(accumulator, array[length], length, array);
+ }
+ return accumulator;
+ }
+
+ /**
+ * A specialized version of `_.some` for arrays without support for iteratee
+ * shorthands.
+ *
+ * @private
+ * @param {Array} array The array to iterate over.
+ * @param {Function} predicate The function invoked per iteration.
+ * @returns {boolean} Returns `true` if any element passes the predicate check,
+ * else `false`.
+ */
+ function arraySome(array, predicate) {
+ var index = -1,
+ length = array.length;
+
+ while (++index < length) {
+ if (predicate(array[index], index, array)) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ /**
+ * The base implementation of methods like `_.find` and `_.findKey`, without
+ * support for iteratee shorthands, which iterates over `collection` using
+ * `eachFunc`.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to search.
+ * @param {Function} predicate The function invoked per iteration.
+ * @param {Function} eachFunc The function to iterate over `collection`.
+ * @param {boolean} [retKey] Specify returning the key of the found element
+ * instead of the element itself.
+ * @returns {*} Returns the found element or its key, else `undefined`.
+ */
+ function baseFind(collection, predicate, eachFunc, retKey) {
+ var result;
+ eachFunc(collection, function(value, key, collection) {
+ if (predicate(value, key, collection)) {
+ result = retKey ? key : value;
+ return false;
+ }
+ });
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.findIndex` and `_.findLastIndex` without
+ * support for iteratee shorthands.
+ *
+ * @private
+ * @param {Array} array The array to search.
+ * @param {Function} predicate The function invoked per iteration.
+ * @param {boolean} [fromRight] Specify iterating from right to left.
+ * @returns {number} Returns the index of the matched value, else `-1`.
+ */
+ function baseFindIndex(array, predicate, fromRight) {
+ var length = array.length,
+ index = fromRight ? length : -1;
+
+ while ((fromRight ? index-- : ++index < length)) {
+ if (predicate(array[index], index, array)) {
+ return index;
+ }
+ }
+ return -1;
+ }
+
+ /**
+ * The base implementation of `_.indexOf` without `fromIndex` bounds checks.
+ *
+ * @private
+ * @param {Array} array The array to search.
+ * @param {*} value The value to search for.
+ * @param {number} fromIndex The index to search from.
+ * @returns {number} Returns the index of the matched value, else `-1`.
+ */
+ function baseIndexOf(array, value, fromIndex) {
+ if (value !== value) {
+ return indexOfNaN(array, fromIndex);
+ }
+ var index = fromIndex - 1,
+ length = array.length;
+
+ while (++index < length) {
+ if (array[index] === value) {
+ return index;
+ }
+ }
+ return -1;
+ }
+
+ /**
+ * This function is like `baseIndexOf` except that it accepts a comparator.
+ *
+ * @private
+ * @param {Array} array The array to search.
+ * @param {*} value The value to search for.
+ * @param {number} fromIndex The index to search from.
+ * @param {Function} comparator The comparator invoked per element.
+ * @returns {number} Returns the index of the matched value, else `-1`.
+ */
+ function baseIndexOfWith(array, value, fromIndex, comparator) {
+ var index = fromIndex - 1,
+ length = array.length;
+
+ while (++index < length) {
+ if (comparator(array[index], value)) {
+ return index;
+ }
+ }
+ return -1;
+ }
+
+ /**
+ * The base implementation of `_.mean` and `_.meanBy` without support for
+ * iteratee shorthands.
+ *
+ * @private
+ * @param {Array} array The array to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {number} Returns the mean.
+ */
+ function baseMean(array, iteratee) {
+ var length = array ? array.length : 0;
+ return length ? (baseSum(array, iteratee) / length) : NAN;
+ }
+
+ /**
+ * The base implementation of `_.reduce` and `_.reduceRight`, without support
+ * for iteratee shorthands, which iterates over `collection` using `eachFunc`.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @param {*} accumulator The initial value.
+ * @param {boolean} initAccum Specify using the first or last element of
+ * `collection` as the initial value.
+ * @param {Function} eachFunc The function to iterate over `collection`.
+ * @returns {*} Returns the accumulated value.
+ */
+ function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) {
+ eachFunc(collection, function(value, index, collection) {
+ accumulator = initAccum
+ ? (initAccum = false, value)
+ : iteratee(accumulator, value, index, collection);
+ });
+ return accumulator;
+ }
+
+ /**
+ * The base implementation of `_.sortBy` which uses `comparer` to define the
+ * sort order of `array` and replaces criteria objects with their corresponding
+ * values.
+ *
+ * @private
+ * @param {Array} array The array to sort.
+ * @param {Function} comparer The function to define sort order.
+ * @returns {Array} Returns `array`.
+ */
+ function baseSortBy(array, comparer) {
+ var length = array.length;
+
+ array.sort(comparer);
+ while (length--) {
+ array[length] = array[length].value;
+ }
+ return array;
+ }
+
+ /**
+ * The base implementation of `_.sum` and `_.sumBy` without support for
+ * iteratee shorthands.
+ *
+ * @private
+ * @param {Array} array The array to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {number} Returns the sum.
+ */
+ function baseSum(array, iteratee) {
+ var result,
+ index = -1,
+ length = array.length;
+
+ while (++index < length) {
+ var current = iteratee(array[index]);
+ if (current !== undefined) {
+ result = result === undefined ? current : (result + current);
+ }
+ }
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.times` without support for iteratee shorthands
+ * or max array length checks.
+ *
+ * @private
+ * @param {number} n The number of times to invoke `iteratee`.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Array} Returns the array of results.
+ */
+ function baseTimes(n, iteratee) {
+ var index = -1,
+ result = Array(n);
+
+ while (++index < n) {
+ result[index] = iteratee(index);
+ }
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.toPairs` and `_.toPairsIn` which creates an array
+ * of key-value pairs for `object` corresponding to the property names of `props`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {Array} props The property names to get values for.
+ * @returns {Object} Returns the new array of key-value pairs.
+ */
+ function baseToPairs(object, props) {
+ return arrayMap(props, function(key) {
+ return [key, object[key]];
+ });
+ }
+
+ /**
+ * The base implementation of `_.unary` without support for storing wrapper metadata.
+ *
+ * @private
+ * @param {Function} func The function to cap arguments for.
+ * @returns {Function} Returns the new function.
+ */
+ function baseUnary(func) {
+ return function(value) {
+ return func(value);
+ };
+ }
+
+ /**
+ * The base implementation of `_.values` and `_.valuesIn` which creates an
+ * array of `object` property values corresponding to the property names
+ * of `props`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {Array} props The property names to get values for.
+ * @returns {Object} Returns the array of property values.
+ */
+ function baseValues(object, props) {
+ return arrayMap(props, function(key) {
+ return object[key];
+ });
+ }
+
+ /**
+ * Used by `_.trim` and `_.trimStart` to get the index of the first string symbol
+ * that is not found in the character symbols.
+ *
+ * @private
+ * @param {Array} strSymbols The string symbols to inspect.
+ * @param {Array} chrSymbols The character symbols to find.
+ * @returns {number} Returns the index of the first unmatched string symbol.
+ */
+ function charsStartIndex(strSymbols, chrSymbols) {
+ var index = -1,
+ length = strSymbols.length;
+
+ while (++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}
+ return index;
+ }
+
+ /**
+ * Used by `_.trim` and `_.trimEnd` to get the index of the last string symbol
+ * that is not found in the character symbols.
+ *
+ * @private
+ * @param {Array} strSymbols The string symbols to inspect.
+ * @param {Array} chrSymbols The character symbols to find.
+ * @returns {number} Returns the index of the last unmatched string symbol.
+ */
+ function charsEndIndex(strSymbols, chrSymbols) {
+ var index = strSymbols.length;
+
+ while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}
+ return index;
+ }
+
+ /**
+ * Checks if `value` is a global object.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {null|Object} Returns `value` if it's a global object, else `null`.
+ */
+ function checkGlobal(value) {
+ return (value && value.Object === Object) ? value : null;
+ }
+
+ /**
+ * Gets the number of `placeholder` occurrences in `array`.
+ *
+ * @private
+ * @param {Array} array The array to inspect.
+ * @param {*} placeholder The placeholder to search for.
+ * @returns {number} Returns the placeholder count.
+ */
+ function countHolders(array, placeholder) {
+ var length = array.length,
+ result = 0;
+
+ while (length--) {
+ if (array[length] === placeholder) {
+ result++;
+ }
+ }
+ return result;
+ }
+
+ /**
+ * Used by `_.deburr` to convert latin-1 supplementary letters to basic latin letters.
+ *
+ * @private
+ * @param {string} letter The matched letter to deburr.
+ * @returns {string} Returns the deburred letter.
+ */
+ function deburrLetter(letter) {
+ return deburredLetters[letter];
+ }
+
+ /**
+ * Used by `_.escape` to convert characters to HTML entities.
+ *
+ * @private
+ * @param {string} chr The matched character to escape.
+ * @returns {string} Returns the escaped character.
+ */
+ function escapeHtmlChar(chr) {
+ return htmlEscapes[chr];
+ }
+
+ /**
+ * Used by `_.template` to escape characters for inclusion in compiled string literals.
+ *
+ * @private
+ * @param {string} chr The matched character to escape.
+ * @returns {string} Returns the escaped character.
+ */
+ function escapeStringChar(chr) {
+ return '\\' + stringEscapes[chr];
+ }
+
+ /**
+ * Gets the index at which the first occurrence of `NaN` is found in `array`.
+ *
+ * @private
+ * @param {Array} array The array to search.
+ * @param {number} fromIndex The index to search from.
+ * @param {boolean} [fromRight] Specify iterating from right to left.
+ * @returns {number} Returns the index of the matched `NaN`, else `-1`.
+ */
+ function indexOfNaN(array, fromIndex, fromRight) {
+ var length = array.length,
+ index = fromIndex + (fromRight ? 0 : -1);
+
+ while ((fromRight ? index-- : ++index < length)) {
+ var other = array[index];
+ if (other !== other) {
+ return index;
+ }
+ }
+ return -1;
+ }
+
+ /**
+ * Checks if `value` is a host object in IE < 9.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a host object, else `false`.
+ */
+ function isHostObject(value) {
+ // Many host objects are `Object` objects that can coerce to strings
+ // despite having improperly defined `toString` methods.
+ var result = false;
+ if (value != null && typeof value.toString != 'function') {
+ try {
+ result = !!(value + '');
+ } catch (e) {}
+ }
+ return result;
+ }
+
+ /**
+ * Converts `iterator` to an array.
+ *
+ * @private
+ * @param {Object} iterator The iterator to convert.
+ * @returns {Array} Returns the converted array.
+ */
+ function iteratorToArray(iterator) {
+ var data,
+ result = [];
+
+ while (!(data = iterator.next()).done) {
+ result.push(data.value);
+ }
+ return result;
+ }
+
+ /**
+ * Converts `map` to an array.
+ *
+ * @private
+ * @param {Object} map The map to convert.
+ * @returns {Array} Returns the converted array.
+ */
+ function mapToArray(map) {
+ var index = -1,
+ result = Array(map.size);
+
+ map.forEach(function(value, key) {
+ result[++index] = [key, value];
+ });
+ return result;
+ }
+
+ /**
+ * Replaces all `placeholder` elements in `array` with an internal placeholder
+ * and returns an array of their indexes.
+ *
+ * @private
+ * @param {Array} array The array to modify.
+ * @param {*} placeholder The placeholder to replace.
+ * @returns {Array} Returns the new array of placeholder indexes.
+ */
+ function replaceHolders(array, placeholder) {
+ var index = -1,
+ length = array.length,
+ resIndex = 0,
+ result = [];
+
+ while (++index < length) {
+ var value = array[index];
+ if (value === placeholder || value === PLACEHOLDER) {
+ array[index] = PLACEHOLDER;
+ result[resIndex++] = index;
+ }
+ }
+ return result;
+ }
+
+ /**
+ * Converts `set` to an array.
+ *
+ * @private
+ * @param {Object} set The set to convert.
+ * @returns {Array} Returns the converted array.
+ */
+ function setToArray(set) {
+ var index = -1,
+ result = Array(set.size);
+
+ set.forEach(function(value) {
+ result[++index] = value;
+ });
+ return result;
+ }
+
+ /**
+ * Gets the number of symbols in `string`.
+ *
+ * @private
+ * @param {string} string The string to inspect.
+ * @returns {number} Returns the string size.
+ */
+ function stringSize(string) {
+ if (!(string && reHasComplexSymbol.test(string))) {
+ return string.length;
+ }
+ var result = reComplexSymbol.lastIndex = 0;
+ while (reComplexSymbol.test(string)) {
+ result++;
+ }
+ return result;
+ }
+
+ /**
+ * Converts `string` to an array.
+ *
+ * @private
+ * @param {string} string The string to convert.
+ * @returns {Array} Returns the converted array.
+ */
+ function stringToArray(string) {
+ return string.match(reComplexSymbol);
+ }
+
+ /**
+ * Used by `_.unescape` to convert HTML entities to characters.
+ *
+ * @private
+ * @param {string} chr The matched character to unescape.
+ * @returns {string} Returns the unescaped character.
+ */
+ function unescapeHtmlChar(chr) {
+ return htmlUnescapes[chr];
+ }
+
+ /*--------------------------------------------------------------------------*/
+
+ /**
+ * Create a new pristine `lodash` function using the `context` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 1.1.0
+ * @category Util
+ * @param {Object} [context=root] The context object.
+ * @returns {Function} Returns a new `lodash` function.
+ * @example
+ *
+ * _.mixin({ 'foo': _.constant('foo') });
+ *
+ * var lodash = _.runInContext();
+ * lodash.mixin({ 'bar': lodash.constant('bar') });
+ *
+ * _.isFunction(_.foo);
+ * // => true
+ * _.isFunction(_.bar);
+ * // => false
+ *
+ * lodash.isFunction(lodash.foo);
+ * // => false
+ * lodash.isFunction(lodash.bar);
+ * // => true
+ *
+ * // Use `context` to mock `Date#getTime` use in `_.now`.
+ * var mock = _.runInContext({
+ * 'Date': function() {
+ * return { 'getTime': getTimeMock };
+ * }
+ * });
+ *
+ * // Create a suped-up `defer` in Node.js.
+ * var defer = _.runInContext({ 'setTimeout': setImmediate }).defer;
+ */
+ function runInContext(context) {
+ context = context ? _.defaults({}, context, _.pick(root, contextProps)) : root;
+
+ /** Built-in constructor references. */
+ var Date = context.Date,
+ Error = context.Error,
+ Math = context.Math,
+ RegExp = context.RegExp,
+ TypeError = context.TypeError;
+
+ /** Used for built-in method references. */
+ var arrayProto = context.Array.prototype,
+ objectProto = context.Object.prototype,
+ stringProto = context.String.prototype;
+
+ /** Used to resolve the decompiled source of functions. */
+ var funcToString = context.Function.prototype.toString;
+
+ /** Used to check objects for own properties. */
+ var hasOwnProperty = objectProto.hasOwnProperty;
+
+ /** Used to generate unique IDs. */
+ var idCounter = 0;
+
+ /** Used to infer the `Object` constructor. */
+ var objectCtorString = funcToString.call(Object);
+
+ /**
+ * Used to resolve the
+ * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
+ * of values.
+ */
+ var objectToString = objectProto.toString;
+
+ /** Used to restore the original `_` reference in `_.noConflict`. */
+ var oldDash = root._;
+
+ /** Used to detect if a method is native. */
+ var reIsNative = RegExp('^' +
+ funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&')
+ .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
+ );
+
+ /** Built-in value references. */
+ var Buffer = moduleExports ? context.Buffer : undefined,
+ Reflect = context.Reflect,
+ Symbol = context.Symbol,
+ Uint8Array = context.Uint8Array,
+ clearTimeout = context.clearTimeout,
+ enumerate = Reflect ? Reflect.enumerate : undefined,
+ getOwnPropertySymbols = Object.getOwnPropertySymbols,
+ iteratorSymbol = typeof (iteratorSymbol = Symbol && Symbol.iterator) == 'symbol' ? iteratorSymbol : undefined,
+ objectCreate = Object.create,
+ propertyIsEnumerable = objectProto.propertyIsEnumerable,
+ setTimeout = context.setTimeout,
+ splice = arrayProto.splice;
+
+ /* Built-in method references for those with the same name as other `lodash` methods. */
+ var nativeCeil = Math.ceil,
+ nativeFloor = Math.floor,
+ nativeGetPrototype = Object.getPrototypeOf,
+ nativeIsFinite = context.isFinite,
+ nativeJoin = arrayProto.join,
+ nativeKeys = Object.keys,
+ nativeMax = Math.max,
+ nativeMin = Math.min,
+ nativeParseInt = context.parseInt,
+ nativeRandom = Math.random,
+ nativeReplace = stringProto.replace,
+ nativeReverse = arrayProto.reverse,
+ nativeSplit = stringProto.split;
+
+ /* Built-in method references that are verified to be native. */
+ var DataView = getNative(context, 'DataView'),
+ Map = getNative(context, 'Map'),
+ Promise = getNative(context, 'Promise'),
+ Set = getNative(context, 'Set'),
+ WeakMap = getNative(context, 'WeakMap'),
+ nativeCreate = getNative(Object, 'create');
+
+ /** Used to store function metadata. */
+ var metaMap = WeakMap && new WeakMap;
+
+ /** Detect if properties shadowing those on `Object.prototype` are non-enumerable. */
+ var nonEnumShadows = !propertyIsEnumerable.call({ 'valueOf': 1 }, 'valueOf');
+
+ /** Used to lookup unminified function names. */
+ var realNames = {};
+
+ /** Used to detect maps, sets, and weakmaps. */
+ var dataViewCtorString = toSource(DataView),
+ mapCtorString = toSource(Map),
+ promiseCtorString = toSource(Promise),
+ setCtorString = toSource(Set),
+ weakMapCtorString = toSource(WeakMap);
+
+ /** Used to convert symbols to primitives and strings. */
+ var symbolProto = Symbol ? Symbol.prototype : undefined,
+ symbolValueOf = symbolProto ? symbolProto.valueOf : undefined,
+ symbolToString = symbolProto ? symbolProto.toString : undefined;
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Creates a `lodash` object which wraps `value` to enable implicit method
+ * chain sequences. Methods that operate on and return arrays, collections,
+ * and functions can be chained together. Methods that retrieve a single value
+ * or may return a primitive value will automatically end the chain sequence
+ * and return the unwrapped value. Otherwise, the value must be unwrapped
+ * with `_#value`.
+ *
+ * Explicit chain sequences, which must be unwrapped with `_#value`, may be
+ * enabled using `_.chain`.
+ *
+ * The execution of chained methods is lazy, that is, it's deferred until
+ * `_#value` is implicitly or explicitly called.
+ *
+ * Lazy evaluation allows several methods to support shortcut fusion.
+ * Shortcut fusion is an optimization to merge iteratee calls; this avoids
+ * the creation of intermediate arrays and can greatly reduce the number of
+ * iteratee executions. Sections of a chain sequence qualify for shortcut
+ * fusion if the section is applied to an array of at least `200` elements
+ * and any iteratees accept only one argument. The heuristic for whether a
+ * section qualifies for shortcut fusion is subject to change.
+ *
+ * Chaining is supported in custom builds as long as the `_#value` method is
+ * directly or indirectly included in the build.
+ *
+ * In addition to lodash methods, wrappers have `Array` and `String` methods.
+ *
+ * The wrapper `Array` methods are:
+ * `concat`, `join`, `pop`, `push`, `shift`, `sort`, `splice`, and `unshift`
+ *
+ * The wrapper `String` methods are:
+ * `replace` and `split`
+ *
+ * The wrapper methods that support shortcut fusion are:
+ * `at`, `compact`, `drop`, `dropRight`, `dropWhile`, `filter`, `find`,
+ * `findLast`, `head`, `initial`, `last`, `map`, `reject`, `reverse`, `slice`,
+ * `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, and `toArray`
+ *
+ * The chainable wrapper methods are:
+ * `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`,
+ * `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`,
+ * `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`,
+ * `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`,
+ * `difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`,
+ * `dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`,
+ * `flatMap`, `flatMapDeep`, `flatMapDepth`, `flatten`, `flattenDeep`,
+ * `flattenDepth`, `flip`, `flow`, `flowRight`, `fromPairs`, `functions`,
+ * `functionsIn`, `groupBy`, `initial`, `intersection`, `intersectionBy`,
+ * `intersectionWith`, `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`,
+ * `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`,
+ * `memoize`, `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`,
+ * `nthArg`, `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`,
+ * `overEvery`, `overSome`, `partial`, `partialRight`, `partition`, `pick`,
+ * `pickBy`, `plant`, `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`,
+ * `pullAllWith`, `pullAt`, `push`, `range`, `rangeRight`, `rearg`, `reject`,
+ * `remove`, `rest`, `reverse`, `sampleSize`, `set`, `setWith`, `shuffle`,
+ * `slice`, `sort`, `sortBy`, `splice`, `spread`, `tail`, `take`, `takeRight`,
+ * `takeRightWhile`, `takeWhile`, `tap`, `throttle`, `thru`, `toArray`,
+ * `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, `transform`, `unary`,
+ * `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`,
+ * `unshift`, `unzip`, `unzipWith`, `update`, `updateWith`, `values`,
+ * `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`,
+ * `zipObject`, `zipObjectDeep`, and `zipWith`
+ *
+ * The wrapper methods that are **not** chainable by default are:
+ * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`,
+ * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `deburr`, `divide`, `each`,
+ * `eachRight`, `endsWith`, `eq`, `escape`, `escapeRegExp`, `every`, `find`,
+ * `findIndex`, `findKey`, `findLast`, `findLastIndex`, `findLastKey`, `first`,
+ * `floor`, `forEach`, `forEachRight`, `forIn`, `forInRight`, `forOwn`,
+ * `forOwnRight`, `get`, `gt`, `gte`, `has`, `hasIn`, `head`, `identity`,
+ * `includes`, `indexOf`, `inRange`, `invoke`, `isArguments`, `isArray`,
+ * `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`, `isBoolean`, `isBuffer`,
+ * `isDate`, `isElement`, `isEmpty`, `isEqual`, `isEqualWith`, `isError`,
+ * `isFinite`, `isFunction`, `isInteger`, `isLength`, `isMap`, `isMatch`,
+ * `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`, `isNumber`,
+ * `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`, `isSafeInteger`,
+ * `isSet`, `isString`, `isUndefined`, `isTypedArray`, `isWeakMap`, `isWeakSet`,
+ * `join`, `kebabCase`, `last`, `lastIndexOf`, `lowerCase`, `lowerFirst`,
+ * `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`, `min`, `minBy`, `multiply`,
+ * `noConflict`, `noop`, `now`, `nth`, `pad`, `padEnd`, `padStart`, `parseInt`,
+ * `pop`, `random`, `reduce`, `reduceRight`, `repeat`, `result`, `round`,
+ * `runInContext`, `sample`, `shift`, `size`, `snakeCase`, `some`, `sortedIndex`,
+ * `sortedIndexBy`, `sortedLastIndex`, `sortedLastIndexBy`, `startCase`,
+ * `startsWith`, `subtract`, `sum`, `sumBy`, `template`, `times`, `toInteger`,
+ * `toJSON`, `toLength`, `toLower`, `toNumber`, `toSafeInteger`, `toString`,
+ * `toUpper`, `trim`, `trimEnd`, `trimStart`, `truncate`, `unescape`,
+ * `uniqueId`, `upperCase`, `upperFirst`, `value`, and `words`
+ *
+ * @name _
+ * @constructor
+ * @category Seq
+ * @param {*} value The value to wrap in a `lodash` instance.
+ * @returns {Object} Returns the new `lodash` wrapper instance.
+ * @example
+ *
+ * function square(n) {
+ * return n * n;
+ * }
+ *
+ * var wrapped = _([1, 2, 3]);
+ *
+ * // Returns an unwrapped value.
+ * wrapped.reduce(_.add);
+ * // => 6
+ *
+ * // Returns a wrapped value.
+ * var squares = wrapped.map(square);
+ *
+ * _.isArray(squares);
+ * // => false
+ *
+ * _.isArray(squares.value());
+ * // => true
+ */
+ function lodash(value) {
+ if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) {
+ if (value instanceof LodashWrapper) {
+ return value;
+ }
+ if (hasOwnProperty.call(value, '__wrapped__')) {
+ return wrapperClone(value);
+ }
+ }
+ return new LodashWrapper(value);
+ }
+
+ /**
+ * The function whose prototype chain sequence wrappers inherit from.
+ *
+ * @private
+ */
+ function baseLodash() {
+ // No operation performed.
+ }
+
+ /**
+ * The base constructor for creating `lodash` wrapper objects.
+ *
+ * @private
+ * @param {*} value The value to wrap.
+ * @param {boolean} [chainAll] Enable explicit method chain sequences.
+ */
+ function LodashWrapper(value, chainAll) {
+ this.__wrapped__ = value;
+ this.__actions__ = [];
+ this.__chain__ = !!chainAll;
+ this.__index__ = 0;
+ this.__values__ = undefined;
+ }
+
+ /**
+ * By default, the template delimiters used by lodash are like those in
+ * embedded Ruby (ERB). Change the following template settings to use
+ * alternative delimiters.
+ *
+ * @static
+ * @memberOf _
+ * @type {Object}
+ */
+ lodash.templateSettings = {
+
+ /**
+ * Used to detect `data` property values to be HTML-escaped.
+ *
+ * @memberOf _.templateSettings
+ * @type {RegExp}
+ */
+ 'escape': reEscape,
+
+ /**
+ * Used to detect code to be evaluated.
+ *
+ * @memberOf _.templateSettings
+ * @type {RegExp}
+ */
+ 'evaluate': reEvaluate,
+
+ /**
+ * Used to detect `data` property values to inject.
+ *
+ * @memberOf _.templateSettings
+ * @type {RegExp}
+ */
+ 'interpolate': reInterpolate,
+
+ /**
+ * Used to reference the data object in the template text.
+ *
+ * @memberOf _.templateSettings
+ * @type {string}
+ */
+ 'variable': '',
+
+ /**
+ * Used to import variables into the compiled template.
+ *
+ * @memberOf _.templateSettings
+ * @type {Object}
+ */
+ 'imports': {
+
+ /**
+ * A reference to the `lodash` function.
+ *
+ * @memberOf _.templateSettings.imports
+ * @type {Function}
+ */
+ '_': lodash
+ }
+ };
+
+ // Ensure wrappers are instances of `baseLodash`.
+ lodash.prototype = baseLodash.prototype;
+ lodash.prototype.constructor = lodash;
+
+ LodashWrapper.prototype = baseCreate(baseLodash.prototype);
+ LodashWrapper.prototype.constructor = LodashWrapper;
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Creates a lazy wrapper object which wraps `value` to enable lazy evaluation.
+ *
+ * @private
+ * @constructor
+ * @param {*} value The value to wrap.
+ */
+ function LazyWrapper(value) {
+ this.__wrapped__ = value;
+ this.__actions__ = [];
+ this.__dir__ = 1;
+ this.__filtered__ = false;
+ this.__iteratees__ = [];
+ this.__takeCount__ = MAX_ARRAY_LENGTH;
+ this.__views__ = [];
+ }
+
+ /**
+ * Creates a clone of the lazy wrapper object.
+ *
+ * @private
+ * @name clone
+ * @memberOf LazyWrapper
+ * @returns {Object} Returns the cloned `LazyWrapper` object.
+ */
+ function lazyClone() {
+ var result = new LazyWrapper(this.__wrapped__);
+ result.__actions__ = copyArray(this.__actions__);
+ result.__dir__ = this.__dir__;
+ result.__filtered__ = this.__filtered__;
+ result.__iteratees__ = copyArray(this.__iteratees__);
+ result.__takeCount__ = this.__takeCount__;
+ result.__views__ = copyArray(this.__views__);
+ return result;
+ }
+
+ /**
+ * Reverses the direction of lazy iteration.
+ *
+ * @private
+ * @name reverse
+ * @memberOf LazyWrapper
+ * @returns {Object} Returns the new reversed `LazyWrapper` object.
+ */
+ function lazyReverse() {
+ if (this.__filtered__) {
+ var result = new LazyWrapper(this);
+ result.__dir__ = -1;
+ result.__filtered__ = true;
+ } else {
+ result = this.clone();
+ result.__dir__ *= -1;
+ }
+ return result;
+ }
+
+ /**
+ * Extracts the unwrapped value from its lazy wrapper.
+ *
+ * @private
+ * @name value
+ * @memberOf LazyWrapper
+ * @returns {*} Returns the unwrapped value.
+ */
+ function lazyValue() {
+ var array = this.__wrapped__.value(),
+ dir = this.__dir__,
+ isArr = isArray(array),
+ isRight = dir < 0,
+ arrLength = isArr ? array.length : 0,
+ view = getView(0, arrLength, this.__views__),
+ start = view.start,
+ end = view.end,
+ length = end - start,
+ index = isRight ? end : (start - 1),
+ iteratees = this.__iteratees__,
+ iterLength = iteratees.length,
+ resIndex = 0,
+ takeCount = nativeMin(length, this.__takeCount__);
+
+ if (!isArr || arrLength < LARGE_ARRAY_SIZE ||
+ (arrLength == length && takeCount == length)) {
+ return baseWrapperValue(array, this.__actions__);
+ }
+ var result = [];
+
+ outer:
+ while (length-- && resIndex < takeCount) {
+ index += dir;
+
+ var iterIndex = -1,
+ value = array[index];
+
+ while (++iterIndex < iterLength) {
+ var data = iteratees[iterIndex],
+ iteratee = data.iteratee,
+ type = data.type,
+ computed = iteratee(value);
+
+ if (type == LAZY_MAP_FLAG) {
+ value = computed;
+ } else if (!computed) {
+ if (type == LAZY_FILTER_FLAG) {
+ continue outer;
+ } else {
+ break outer;
+ }
+ }
+ }
+ result[resIndex++] = value;
+ }
+ return result;
+ }
+
+ // Ensure `LazyWrapper` is an instance of `baseLodash`.
+ LazyWrapper.prototype = baseCreate(baseLodash.prototype);
+ LazyWrapper.prototype.constructor = LazyWrapper;
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Creates a hash object.
+ *
+ * @private
+ * @constructor
+ * @returns {Object} Returns the new hash object.
+ */
+ function Hash() {}
+
+ /**
+ * Removes `key` and its value from the hash.
+ *
+ * @private
+ * @param {Object} hash The hash to modify.
+ * @param {string} key The key of the value to remove.
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
+ */
+ function hashDelete(hash, key) {
+ return hashHas(hash, key) && delete hash[key];
+ }
+
+ /**
+ * Gets the hash value for `key`.
+ *
+ * @private
+ * @param {Object} hash The hash to query.
+ * @param {string} key The key of the value to get.
+ * @returns {*} Returns the entry value.
+ */
+ function hashGet(hash, key) {
+ if (nativeCreate) {
+ var result = hash[key];
+ return result === HASH_UNDEFINED ? undefined : result;
+ }
+ return hasOwnProperty.call(hash, key) ? hash[key] : undefined;
+ }
+
+ /**
+ * Checks if a hash value for `key` exists.
+ *
+ * @private
+ * @param {Object} hash The hash to query.
+ * @param {string} key The key of the entry to check.
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
+ */
+ function hashHas(hash, key) {
+ return nativeCreate ? hash[key] !== undefined : hasOwnProperty.call(hash, key);
+ }
+
+ /**
+ * Sets the hash `key` to `value`.
+ *
+ * @private
+ * @param {Object} hash The hash to modify.
+ * @param {string} key The key of the value to set.
+ * @param {*} value The value to set.
+ */
+ function hashSet(hash, key, value) {
+ hash[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
+ }
+
+ // Avoid inheriting from `Object.prototype` when possible.
+ Hash.prototype = nativeCreate ? nativeCreate(null) : objectProto;
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Creates a map cache object to store key-value pairs.
+ *
+ * @private
+ * @constructor
+ * @param {Array} [values] The values to cache.
+ */
+ function MapCache(values) {
+ var index = -1,
+ length = values ? values.length : 0;
+
+ this.clear();
+ while (++index < length) {
+ var entry = values[index];
+ this.set(entry[0], entry[1]);
+ }
+ }
+
+ /**
+ * Removes all key-value entries from the map.
+ *
+ * @private
+ * @name clear
+ * @memberOf MapCache
+ */
+ function mapClear() {
+ this.__data__ = {
+ 'hash': new Hash,
+ 'map': Map ? new Map : [],
+ 'string': new Hash
+ };
+ }
+
+ /**
+ * Removes `key` and its value from the map.
+ *
+ * @private
+ * @name delete
+ * @memberOf MapCache
+ * @param {string} key The key of the value to remove.
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
+ */
+ function mapDelete(key) {
+ var data = this.__data__;
+ if (isKeyable(key)) {
+ return hashDelete(typeof key == 'string' ? data.string : data.hash, key);
+ }
+ return Map ? data.map['delete'](key) : assocDelete(data.map, key);
+ }
+
+ /**
+ * Gets the map value for `key`.
+ *
+ * @private
+ * @name get
+ * @memberOf MapCache
+ * @param {string} key The key of the value to get.
+ * @returns {*} Returns the entry value.
+ */
+ function mapGet(key) {
+ var data = this.__data__;
+ if (isKeyable(key)) {
+ return hashGet(typeof key == 'string' ? data.string : data.hash, key);
+ }
+ return Map ? data.map.get(key) : assocGet(data.map, key);
+ }
+
+ /**
+ * Checks if a map value for `key` exists.
+ *
+ * @private
+ * @name has
+ * @memberOf MapCache
+ * @param {string} key The key of the entry to check.
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
+ */
+ function mapHas(key) {
+ var data = this.__data__;
+ if (isKeyable(key)) {
+ return hashHas(typeof key == 'string' ? data.string : data.hash, key);
+ }
+ return Map ? data.map.has(key) : assocHas(data.map, key);
+ }
+
+ /**
+ * Sets the map `key` to `value`.
+ *
+ * @private
+ * @name set
+ * @memberOf MapCache
+ * @param {string} key The key of the value to set.
+ * @param {*} value The value to set.
+ * @returns {Object} Returns the map cache instance.
+ */
+ function mapSet(key, value) {
+ var data = this.__data__;
+ if (isKeyable(key)) {
+ hashSet(typeof key == 'string' ? data.string : data.hash, key, value);
+ } else if (Map) {
+ data.map.set(key, value);
+ } else {
+ assocSet(data.map, key, value);
+ }
+ return this;
+ }
+
+ // Add methods to `MapCache`.
+ MapCache.prototype.clear = mapClear;
+ MapCache.prototype['delete'] = mapDelete;
+ MapCache.prototype.get = mapGet;
+ MapCache.prototype.has = mapHas;
+ MapCache.prototype.set = mapSet;
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ *
+ * Creates a set cache object to store unique values.
+ *
+ * @private
+ * @constructor
+ * @param {Array} [values] The values to cache.
+ */
+ function SetCache(values) {
+ var index = -1,
+ length = values ? values.length : 0;
+
+ this.__data__ = new MapCache;
+ while (++index < length) {
+ this.push(values[index]);
+ }
+ }
+
+ /**
+ * Checks if `value` is in `cache`.
+ *
+ * @private
+ * @param {Object} cache The set cache to search.
+ * @param {*} value The value to search for.
+ * @returns {number} Returns `true` if `value` is found, else `false`.
+ */
+ function cacheHas(cache, value) {
+ var map = cache.__data__;
+ if (isKeyable(value)) {
+ var data = map.__data__,
+ hash = typeof value == 'string' ? data.string : data.hash;
+
+ return hash[value] === HASH_UNDEFINED;
+ }
+ return map.has(value);
+ }
+
+ /**
+ * Adds `value` to the set cache.
+ *
+ * @private
+ * @name push
+ * @memberOf SetCache
+ * @param {*} value The value to cache.
+ */
+ function cachePush(value) {
+ var map = this.__data__;
+ if (isKeyable(value)) {
+ var data = map.__data__,
+ hash = typeof value == 'string' ? data.string : data.hash;
+
+ hash[value] = HASH_UNDEFINED;
+ }
+ else {
+ map.set(value, HASH_UNDEFINED);
+ }
+ }
+
+ // Add methods to `SetCache`.
+ SetCache.prototype.push = cachePush;
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Creates a stack cache object to store key-value pairs.
+ *
+ * @private
+ * @constructor
+ * @param {Array} [values] The values to cache.
+ */
+ function Stack(values) {
+ var index = -1,
+ length = values ? values.length : 0;
+
+ this.clear();
+ while (++index < length) {
+ var entry = values[index];
+ this.set(entry[0], entry[1]);
+ }
+ }
+
+ /**
+ * Removes all key-value entries from the stack.
+ *
+ * @private
+ * @name clear
+ * @memberOf Stack
+ */
+ function stackClear() {
+ this.__data__ = { 'array': [], 'map': null };
+ }
+
+ /**
+ * Removes `key` and its value from the stack.
+ *
+ * @private
+ * @name delete
+ * @memberOf Stack
+ * @param {string} key The key of the value to remove.
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
+ */
+ function stackDelete(key) {
+ var data = this.__data__,
+ array = data.array;
+
+ return array ? assocDelete(array, key) : data.map['delete'](key);
+ }
+
+ /**
+ * Gets the stack value for `key`.
+ *
+ * @private
+ * @name get
+ * @memberOf Stack
+ * @param {string} key The key of the value to get.
+ * @returns {*} Returns the entry value.
+ */
+ function stackGet(key) {
+ var data = this.__data__,
+ array = data.array;
+
+ return array ? assocGet(array, key) : data.map.get(key);
+ }
+
+ /**
+ * Checks if a stack value for `key` exists.
+ *
+ * @private
+ * @name has
+ * @memberOf Stack
+ * @param {string} key The key of the entry to check.
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
+ */
+ function stackHas(key) {
+ var data = this.__data__,
+ array = data.array;
+
+ return array ? assocHas(array, key) : data.map.has(key);
+ }
+
+ /**
+ * Sets the stack `key` to `value`.
+ *
+ * @private
+ * @name set
+ * @memberOf Stack
+ * @param {string} key The key of the value to set.
+ * @param {*} value The value to set.
+ * @returns {Object} Returns the stack cache instance.
+ */
+ function stackSet(key, value) {
+ var data = this.__data__,
+ array = data.array;
+
+ if (array) {
+ if (array.length < (LARGE_ARRAY_SIZE - 1)) {
+ assocSet(array, key, value);
+ } else {
+ data.array = null;
+ data.map = new MapCache(array);
+ }
+ }
+ var map = data.map;
+ if (map) {
+ map.set(key, value);
+ }
+ return this;
+ }
+
+ // Add methods to `Stack`.
+ Stack.prototype.clear = stackClear;
+ Stack.prototype['delete'] = stackDelete;
+ Stack.prototype.get = stackGet;
+ Stack.prototype.has = stackHas;
+ Stack.prototype.set = stackSet;
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Removes `key` and its value from the associative array.
+ *
+ * @private
+ * @param {Array} array The array to modify.
+ * @param {string} key The key of the value to remove.
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
+ */
+ function assocDelete(array, key) {
+ var index = assocIndexOf(array, key);
+ if (index < 0) {
+ return false;
+ }
+ var lastIndex = array.length - 1;
+ if (index == lastIndex) {
+ array.pop();
+ } else {
+ splice.call(array, index, 1);
+ }
+ return true;
+ }
+
+ /**
+ * Gets the associative array value for `key`.
+ *
+ * @private
+ * @param {Array} array The array to query.
+ * @param {string} key The key of the value to get.
+ * @returns {*} Returns the entry value.
+ */
+ function assocGet(array, key) {
+ var index = assocIndexOf(array, key);
+ return index < 0 ? undefined : array[index][1];
+ }
+
+ /**
+ * Checks if an associative array value for `key` exists.
+ *
+ * @private
+ * @param {Array} array The array to query.
+ * @param {string} key The key of the entry to check.
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
+ */
+ function assocHas(array, key) {
+ return assocIndexOf(array, key) > -1;
+ }
+
+ /**
+ * Gets the index at which the `key` is found in `array` of key-value pairs.
+ *
+ * @private
+ * @param {Array} array The array to search.
+ * @param {*} key The key to search for.
+ * @returns {number} Returns the index of the matched value, else `-1`.
+ */
+ function assocIndexOf(array, key) {
+ var length = array.length;
+ while (length--) {
+ if (eq(array[length][0], key)) {
+ return length;
+ }
+ }
+ return -1;
+ }
+
+ /**
+ * Sets the associative array `key` to `value`.
+ *
+ * @private
+ * @param {Array} array The array to modify.
+ * @param {string} key The key of the value to set.
+ * @param {*} value The value to set.
+ */
+ function assocSet(array, key, value) {
+ var index = assocIndexOf(array, key);
+ if (index < 0) {
+ array.push([key, value]);
+ } else {
+ array[index][1] = value;
+ }
+ }
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Used by `_.defaults` to customize its `_.assignIn` use.
+ *
+ * @private
+ * @param {*} objValue The destination value.
+ * @param {*} srcValue The source value.
+ * @param {string} key The key of the property to assign.
+ * @param {Object} object The parent object of `objValue`.
+ * @returns {*} Returns the value to assign.
+ */
+ function assignInDefaults(objValue, srcValue, key, object) {
+ if (objValue === undefined ||
+ (eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) {
+ return srcValue;
+ }
+ return objValue;
+ }
+
+ /**
+ * This function is like `assignValue` except that it doesn't assign
+ * `undefined` values.
+ *
+ * @private
+ * @param {Object} object The object to modify.
+ * @param {string} key The key of the property to assign.
+ * @param {*} value The value to assign.
+ */
+ function assignMergeValue(object, key, value) {
+ if ((value !== undefined && !eq(object[key], value)) ||
+ (typeof key == 'number' && value === undefined && !(key in object))) {
+ object[key] = value;
+ }
+ }
+
+ /**
+ * Assigns `value` to `key` of `object` if the existing value is not equivalent
+ * using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
+ * for equality comparisons.
+ *
+ * @private
+ * @param {Object} object The object to modify.
+ * @param {string} key The key of the property to assign.
+ * @param {*} value The value to assign.
+ */
+ function assignValue(object, key, value) {
+ var objValue = object[key];
+ if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||
+ (value === undefined && !(key in object))) {
+ object[key] = value;
+ }
+ }
+
+ /**
+ * Aggregates elements of `collection` on `accumulator` with keys transformed
+ * by `iteratee` and values set by `setter`.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} setter The function to set `accumulator` values.
+ * @param {Function} iteratee The iteratee to transform keys.
+ * @param {Object} accumulator The initial aggregated object.
+ * @returns {Function} Returns `accumulator`.
+ */
+ function baseAggregator(collection, setter, iteratee, accumulator) {
+ baseEach(collection, function(value, key, collection) {
+ setter(accumulator, value, iteratee(value), collection);
+ });
+ return accumulator;
+ }
+
+ /**
+ * The base implementation of `_.assign` without support for multiple sources
+ * or `customizer` functions.
+ *
+ * @private
+ * @param {Object} object The destination object.
+ * @param {Object} source The source object.
+ * @returns {Object} Returns `object`.
+ */
+ function baseAssign(object, source) {
+ return object && copyObject(source, keys(source), object);
+ }
+
+ /**
+ * The base implementation of `_.at` without support for individual paths.
+ *
+ * @private
+ * @param {Object} object The object to iterate over.
+ * @param {string[]} paths The property paths of elements to pick.
+ * @returns {Array} Returns the new array of picked elements.
+ */
+ function baseAt(object, paths) {
+ var index = -1,
+ isNil = object == null,
+ length = paths.length,
+ result = Array(length);
+
+ while (++index < length) {
+ result[index] = isNil ? undefined : get(object, paths[index]);
+ }
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.clamp` which doesn't coerce arguments to numbers.
+ *
+ * @private
+ * @param {number} number The number to clamp.
+ * @param {number} [lower] The lower bound.
+ * @param {number} upper The upper bound.
+ * @returns {number} Returns the clamped number.
+ */
+ function baseClamp(number, lower, upper) {
+ if (number === number) {
+ if (upper !== undefined) {
+ number = number <= upper ? number : upper;
+ }
+ if (lower !== undefined) {
+ number = number >= lower ? number : lower;
+ }
+ }
+ return number;
+ }
+
+ /**
+ * The base implementation of `_.clone` and `_.cloneDeep` which tracks
+ * traversed objects.
+ *
+ * @private
+ * @param {*} value The value to clone.
+ * @param {boolean} [isDeep] Specify a deep clone.
+ * @param {boolean} [isFull] Specify a clone including symbols.
+ * @param {Function} [customizer] The function to customize cloning.
+ * @param {string} [key] The key of `value`.
+ * @param {Object} [object] The parent object of `value`.
+ * @param {Object} [stack] Tracks traversed objects and their clone counterparts.
+ * @returns {*} Returns the cloned value.
+ */
+ function baseClone(value, isDeep, isFull, customizer, key, object, stack) {
+ var result;
+ if (customizer) {
+ result = object ? customizer(value, key, object, stack) : customizer(value);
+ }
+ if (result !== undefined) {
+ return result;
+ }
+ if (!isObject(value)) {
+ return value;
+ }
+ var isArr = isArray(value);
+ if (isArr) {
+ result = initCloneArray(value);
+ if (!isDeep) {
+ return copyArray(value, result);
+ }
+ } else {
+ var tag = getTag(value),
+ isFunc = tag == funcTag || tag == genTag;
+
+ if (isBuffer(value)) {
+ return cloneBuffer(value, isDeep);
+ }
+ if (tag == objectTag || tag == argsTag || (isFunc && !object)) {
+ if (isHostObject(value)) {
+ return object ? value : {};
+ }
+ result = initCloneObject(isFunc ? {} : value);
+ if (!isDeep) {
+ return copySymbols(value, baseAssign(result, value));
+ }
+ } else {
+ if (!cloneableTags[tag]) {
+ return object ? value : {};
+ }
+ result = initCloneByTag(value, tag, baseClone, isDeep);
+ }
+ }
+ // Check for circular references and return its corresponding clone.
+ stack || (stack = new Stack);
+ var stacked = stack.get(value);
+ if (stacked) {
+ return stacked;
+ }
+ stack.set(value, result);
+
+ if (!isArr) {
+ var props = isFull ? getAllKeys(value) : keys(value);
+ }
+ // Recursively populate clone (susceptible to call stack limits).
+ arrayEach(props || value, function(subValue, key) {
+ if (props) {
+ key = subValue;
+ subValue = value[key];
+ }
+ assignValue(result, key, baseClone(subValue, isDeep, isFull, customizer, key, value, stack));
+ });
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.conforms` which doesn't clone `source`.
+ *
+ * @private
+ * @param {Object} source The object of property predicates to conform to.
+ * @returns {Function} Returns the new function.
+ */
+ function baseConforms(source) {
+ var props = keys(source),
+ length = props.length;
+
+ return function(object) {
+ if (object == null) {
+ return !length;
+ }
+ var index = length;
+ while (index--) {
+ var key = props[index],
+ predicate = source[key],
+ value = object[key];
+
+ if ((value === undefined &&
+ !(key in Object(object))) || !predicate(value)) {
+ return false;
+ }
+ }
+ return true;
+ };
+ }
+
+ /**
+ * The base implementation of `_.create` without support for assigning
+ * properties to the created object.
+ *
+ * @private
+ * @param {Object} prototype The object to inherit from.
+ * @returns {Object} Returns the new object.
+ */
+ function baseCreate(proto) {
+ return isObject(proto) ? objectCreate(proto) : {};
+ }
+
+ /**
+ * The base implementation of `_.delay` and `_.defer` which accepts an array
+ * of `func` arguments.
+ *
+ * @private
+ * @param {Function} func The function to delay.
+ * @param {number} wait The number of milliseconds to delay invocation.
+ * @param {Object} args The arguments to provide to `func`.
+ * @returns {number} Returns the timer id.
+ */
+ function baseDelay(func, wait, args) {
+ if (typeof func != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ return setTimeout(function() { func.apply(undefined, args); }, wait);
+ }
+
+ /**
+ * The base implementation of methods like `_.difference` without support
+ * for excluding multiple arrays or iteratee shorthands.
+ *
+ * @private
+ * @param {Array} array The array to inspect.
+ * @param {Array} values The values to exclude.
+ * @param {Function} [iteratee] The iteratee invoked per element.
+ * @param {Function} [comparator] The comparator invoked per element.
+ * @returns {Array} Returns the new array of filtered values.
+ */
+ function baseDifference(array, values, iteratee, comparator) {
+ var index = -1,
+ includes = arrayIncludes,
+ isCommon = true,
+ length = array.length,
+ result = [],
+ valuesLength = values.length;
+
+ if (!length) {
+ return result;
+ }
+ if (iteratee) {
+ values = arrayMap(values, baseUnary(iteratee));
+ }
+ if (comparator) {
+ includes = arrayIncludesWith;
+ isCommon = false;
+ }
+ else if (values.length >= LARGE_ARRAY_SIZE) {
+ includes = cacheHas;
+ isCommon = false;
+ values = new SetCache(values);
+ }
+ outer:
+ while (++index < length) {
+ var value = array[index],
+ computed = iteratee ? iteratee(value) : value;
+
+ value = (comparator || value !== 0) ? value : 0;
+ if (isCommon && computed === computed) {
+ var valuesIndex = valuesLength;
+ while (valuesIndex--) {
+ if (values[valuesIndex] === computed) {
+ continue outer;
+ }
+ }
+ result.push(value);
+ }
+ else if (!includes(values, computed, comparator)) {
+ result.push(value);
+ }
+ }
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.forEach` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Array|Object} Returns `collection`.
+ */
+ var baseEach = createBaseEach(baseForOwn);
+
+ /**
+ * The base implementation of `_.forEachRight` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Array|Object} Returns `collection`.
+ */
+ var baseEachRight = createBaseEach(baseForOwnRight, true);
+
+ /**
+ * The base implementation of `_.every` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} predicate The function invoked per iteration.
+ * @returns {boolean} Returns `true` if all elements pass the predicate check,
+ * else `false`
+ */
+ function baseEvery(collection, predicate) {
+ var result = true;
+ baseEach(collection, function(value, index, collection) {
+ result = !!predicate(value, index, collection);
+ return result;
+ });
+ return result;
+ }
+
+ /**
+ * The base implementation of methods like `_.max` and `_.min` which accepts a
+ * `comparator` to determine the extremum value.
+ *
+ * @private
+ * @param {Array} array The array to iterate over.
+ * @param {Function} iteratee The iteratee invoked per iteration.
+ * @param {Function} comparator The comparator used to compare values.
+ * @returns {*} Returns the extremum value.
+ */
+ function baseExtremum(array, iteratee, comparator) {
+ var index = -1,
+ length = array.length;
+
+ while (++index < length) {
+ var value = array[index],
+ current = iteratee(value);
+
+ if (current != null && (computed === undefined
+ ? (current === current && !isSymbol(current))
+ : comparator(current, computed)
+ )) {
+ var computed = current,
+ result = value;
+ }
+ }
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.fill` without an iteratee call guard.
+ *
+ * @private
+ * @param {Array} array The array to fill.
+ * @param {*} value The value to fill `array` with.
+ * @param {number} [start=0] The start position.
+ * @param {number} [end=array.length] The end position.
+ * @returns {Array} Returns `array`.
+ */
+ function baseFill(array, value, start, end) {
+ var length = array.length;
+
+ start = toInteger(start);
+ if (start < 0) {
+ start = -start > length ? 0 : (length + start);
+ }
+ end = (end === undefined || end > length) ? length : toInteger(end);
+ if (end < 0) {
+ end += length;
+ }
+ end = start > end ? 0 : toLength(end);
+ while (start < end) {
+ array[start++] = value;
+ }
+ return array;
+ }
+
+ /**
+ * The base implementation of `_.filter` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} predicate The function invoked per iteration.
+ * @returns {Array} Returns the new filtered array.
+ */
+ function baseFilter(collection, predicate) {
+ var result = [];
+ baseEach(collection, function(value, index, collection) {
+ if (predicate(value, index, collection)) {
+ result.push(value);
+ }
+ });
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.flatten` with support for restricting flattening.
+ *
+ * @private
+ * @param {Array} array The array to flatten.
+ * @param {number} depth The maximum recursion depth.
+ * @param {boolean} [predicate=isFlattenable] The function invoked per iteration.
+ * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.
+ * @param {Array} [result=[]] The initial result value.
+ * @returns {Array} Returns the new flattened array.
+ */
+ function baseFlatten(array, depth, predicate, isStrict, result) {
+ var index = -1,
+ length = array.length;
+
+ predicate || (predicate = isFlattenable);
+ result || (result = []);
+
+ while (++index < length) {
+ var value = array[index];
+ if (depth > 0 && predicate(value)) {
+ if (depth > 1) {
+ // Recursively flatten arrays (susceptible to call stack limits).
+ baseFlatten(value, depth - 1, predicate, isStrict, result);
+ } else {
+ arrayPush(result, value);
+ }
+ } else if (!isStrict) {
+ result[result.length] = value;
+ }
+ }
+ return result;
+ }
+
+ /**
+ * The base implementation of `baseForOwn` which iterates over `object`
+ * properties returned by `keysFunc` and invokes `iteratee` for each property.
+ * Iteratee functions may exit iteration early by explicitly returning `false`.
+ *
+ * @private
+ * @param {Object} object The object to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @param {Function} keysFunc The function to get the keys of `object`.
+ * @returns {Object} Returns `object`.
+ */
+ var baseFor = createBaseFor();
+
+ /**
+ * This function is like `baseFor` except that it iterates over properties
+ * in the opposite order.
+ *
+ * @private
+ * @param {Object} object The object to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @param {Function} keysFunc The function to get the keys of `object`.
+ * @returns {Object} Returns `object`.
+ */
+ var baseForRight = createBaseFor(true);
+
+ /**
+ * The base implementation of `_.forOwn` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Object} object The object to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Object} Returns `object`.
+ */
+ function baseForOwn(object, iteratee) {
+ return object && baseFor(object, iteratee, keys);
+ }
+
+ /**
+ * The base implementation of `_.forOwnRight` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Object} object The object to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Object} Returns `object`.
+ */
+ function baseForOwnRight(object, iteratee) {
+ return object && baseForRight(object, iteratee, keys);
+ }
+
+ /**
+ * The base implementation of `_.functions` which creates an array of
+ * `object` function property names filtered from `props`.
+ *
+ * @private
+ * @param {Object} object The object to inspect.
+ * @param {Array} props The property names to filter.
+ * @returns {Array} Returns the new array of filtered property names.
+ */
+ function baseFunctions(object, props) {
+ return arrayFilter(props, function(key) {
+ return isFunction(object[key]);
+ });
+ }
+
+ /**
+ * The base implementation of `_.get` without support for default values.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {Array|string} path The path of the property to get.
+ * @returns {*} Returns the resolved value.
+ */
+ function baseGet(object, path) {
+ path = isKey(path, object) ? [path] : castPath(path);
+
+ var index = 0,
+ length = path.length;
+
+ while (object != null && index < length) {
+ object = object[toKey(path[index++])];
+ }
+ return (index && index == length) ? object : undefined;
+ }
+
+ /**
+ * The base implementation of `getAllKeys` and `getAllKeysIn` which uses
+ * `keysFunc` and `symbolsFunc` to get the enumerable property names and
+ * symbols of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {Function} keysFunc The function to get the keys of `object`.
+ * @param {Function} symbolsFunc The function to get the symbols of `object`.
+ * @returns {Array} Returns the array of property names and symbols.
+ */
+ function baseGetAllKeys(object, keysFunc, symbolsFunc) {
+ var result = keysFunc(object);
+ return isArray(object)
+ ? result
+ : arrayPush(result, symbolsFunc(object));
+ }
+
+ /**
+ * The base implementation of `_.gt` which doesn't coerce arguments to numbers.
+ *
+ * @private
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @returns {boolean} Returns `true` if `value` is greater than `other`,
+ * else `false`.
+ */
+ function baseGt(value, other) {
+ return value > other;
+ }
+
+ /**
+ * The base implementation of `_.has` without support for deep paths.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {Array|string} key The key to check.
+ * @returns {boolean} Returns `true` if `key` exists, else `false`.
+ */
+ function baseHas(object, key) {
+ // Avoid a bug in IE 10-11 where objects with a [[Prototype]] of `null`,
+ // that are composed entirely of index properties, return `false` for
+ // `hasOwnProperty` checks of them.
+ return hasOwnProperty.call(object, key) ||
+ (typeof object == 'object' && key in object && getPrototype(object) === null);
+ }
+
+ /**
+ * The base implementation of `_.hasIn` without support for deep paths.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {Array|string} key The key to check.
+ * @returns {boolean} Returns `true` if `key` exists, else `false`.
+ */
+ function baseHasIn(object, key) {
+ return key in Object(object);
+ }
+
+ /**
+ * The base implementation of `_.inRange` which doesn't coerce arguments to numbers.
+ *
+ * @private
+ * @param {number} number The number to check.
+ * @param {number} start The start of the range.
+ * @param {number} end The end of the range.
+ * @returns {boolean} Returns `true` if `number` is in the range, else `false`.
+ */
+ function baseInRange(number, start, end) {
+ return number >= nativeMin(start, end) && number < nativeMax(start, end);
+ }
+
+ /**
+ * The base implementation of methods like `_.intersection`, without support
+ * for iteratee shorthands, that accepts an array of arrays to inspect.
+ *
+ * @private
+ * @param {Array} arrays The arrays to inspect.
+ * @param {Function} [iteratee] The iteratee invoked per element.
+ * @param {Function} [comparator] The comparator invoked per element.
+ * @returns {Array} Returns the new array of shared values.
+ */
+ function baseIntersection(arrays, iteratee, comparator) {
+ var includes = comparator ? arrayIncludesWith : arrayIncludes,
+ length = arrays[0].length,
+ othLength = arrays.length,
+ othIndex = othLength,
+ caches = Array(othLength),
+ maxLength = Infinity,
+ result = [];
+
+ while (othIndex--) {
+ var array = arrays[othIndex];
+ if (othIndex && iteratee) {
+ array = arrayMap(array, baseUnary(iteratee));
+ }
+ maxLength = nativeMin(array.length, maxLength);
+ caches[othIndex] = !comparator && (iteratee || (length >= 120 && array.length >= 120))
+ ? new SetCache(othIndex && array)
+ : undefined;
+ }
+ array = arrays[0];
+
+ var index = -1,
+ seen = caches[0];
+
+ outer:
+ while (++index < length && result.length < maxLength) {
+ var value = array[index],
+ computed = iteratee ? iteratee(value) : value;
+
+ value = (comparator || value !== 0) ? value : 0;
+ if (!(seen
+ ? cacheHas(seen, computed)
+ : includes(result, computed, comparator)
+ )) {
+ othIndex = othLength;
+ while (--othIndex) {
+ var cache = caches[othIndex];
+ if (!(cache
+ ? cacheHas(cache, computed)
+ : includes(arrays[othIndex], computed, comparator))
+ ) {
+ continue outer;
+ }
+ }
+ if (seen) {
+ seen.push(computed);
+ }
+ result.push(value);
+ }
+ }
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.invert` and `_.invertBy` which inverts
+ * `object` with values transformed by `iteratee` and set by `setter`.
+ *
+ * @private
+ * @param {Object} object The object to iterate over.
+ * @param {Function} setter The function to set `accumulator` values.
+ * @param {Function} iteratee The iteratee to transform values.
+ * @param {Object} accumulator The initial inverted object.
+ * @returns {Function} Returns `accumulator`.
+ */
+ function baseInverter(object, setter, iteratee, accumulator) {
+ baseForOwn(object, function(value, key, object) {
+ setter(accumulator, iteratee(value), key, object);
+ });
+ return accumulator;
+ }
+
+ /**
+ * The base implementation of `_.invoke` without support for individual
+ * method arguments.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {Array|string} path The path of the method to invoke.
+ * @param {Array} args The arguments to invoke the method with.
+ * @returns {*} Returns the result of the invoked method.
+ */
+ function baseInvoke(object, path, args) {
+ if (!isKey(path, object)) {
+ path = castPath(path);
+ object = parent(object, path);
+ path = last(path);
+ }
+ var func = object == null ? object : object[toKey(path)];
+ return func == null ? undefined : apply(func, object, args);
+ }
+
+ /**
+ * The base implementation of `_.isEqual` which supports partial comparisons
+ * and tracks traversed objects.
+ *
+ * @private
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @param {Function} [customizer] The function to customize comparisons.
+ * @param {boolean} [bitmask] The bitmask of comparison flags.
+ * The bitmask may be composed of the following flags:
+ * 1 - Unordered comparison
+ * 2 - Partial comparison
+ * @param {Object} [stack] Tracks traversed `value` and `other` objects.
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
+ */
+ function baseIsEqual(value, other, customizer, bitmask, stack) {
+ if (value === other) {
+ return true;
+ }
+ if (value == null || other == null || (!isObject(value) && !isObjectLike(other))) {
+ return value !== value && other !== other;
+ }
+ return baseIsEqualDeep(value, other, baseIsEqual, customizer, bitmask, stack);
+ }
+
+ /**
+ * A specialized version of `baseIsEqual` for arrays and objects which performs
+ * deep comparisons and tracks traversed objects enabling objects with circular
+ * references to be compared.
+ *
+ * @private
+ * @param {Object} object The object to compare.
+ * @param {Object} other The other object to compare.
+ * @param {Function} equalFunc The function to determine equivalents of values.
+ * @param {Function} [customizer] The function to customize comparisons.
+ * @param {number} [bitmask] The bitmask of comparison flags. See `baseIsEqual`
+ * for more details.
+ * @param {Object} [stack] Tracks traversed `object` and `other` objects.
+ * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
+ */
+ function baseIsEqualDeep(object, other, equalFunc, customizer, bitmask, stack) {
+ var objIsArr = isArray(object),
+ othIsArr = isArray(other),
+ objTag = arrayTag,
+ othTag = arrayTag;
+
+ if (!objIsArr) {
+ objTag = getTag(object);
+ objTag = objTag == argsTag ? objectTag : objTag;
+ }
+ if (!othIsArr) {
+ othTag = getTag(other);
+ othTag = othTag == argsTag ? objectTag : othTag;
+ }
+ var objIsObj = objTag == objectTag && !isHostObject(object),
+ othIsObj = othTag == objectTag && !isHostObject(other),
+ isSameTag = objTag == othTag;
+
+ if (isSameTag && !objIsObj) {
+ stack || (stack = new Stack);
+ return (objIsArr || isTypedArray(object))
+ ? equalArrays(object, other, equalFunc, customizer, bitmask, stack)
+ : equalByTag(object, other, objTag, equalFunc, customizer, bitmask, stack);
+ }
+ if (!(bitmask & PARTIAL_COMPARE_FLAG)) {
+ var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),
+ othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');
+
+ if (objIsWrapped || othIsWrapped) {
+ var objUnwrapped = objIsWrapped ? object.value() : object,
+ othUnwrapped = othIsWrapped ? other.value() : other;
+
+ stack || (stack = new Stack);
+ return equalFunc(objUnwrapped, othUnwrapped, customizer, bitmask, stack);
+ }
+ }
+ if (!isSameTag) {
+ return false;
+ }
+ stack || (stack = new Stack);
+ return equalObjects(object, other, equalFunc, customizer, bitmask, stack);
+ }
+
+ /**
+ * The base implementation of `_.isMatch` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Object} object The object to inspect.
+ * @param {Object} source The object of property values to match.
+ * @param {Array} matchData The property names, values, and compare flags to match.
+ * @param {Function} [customizer] The function to customize comparisons.
+ * @returns {boolean} Returns `true` if `object` is a match, else `false`.
+ */
+ function baseIsMatch(object, source, matchData, customizer) {
+ var index = matchData.length,
+ length = index,
+ noCustomizer = !customizer;
+
+ if (object == null) {
+ return !length;
+ }
+ object = Object(object);
+ while (index--) {
+ var data = matchData[index];
+ if ((noCustomizer && data[2])
+ ? data[1] !== object[data[0]]
+ : !(data[0] in object)
+ ) {
+ return false;
+ }
+ }
+ while (++index < length) {
+ data = matchData[index];
+ var key = data[0],
+ objValue = object[key],
+ srcValue = data[1];
+
+ if (noCustomizer && data[2]) {
+ if (objValue === undefined && !(key in object)) {
+ return false;
+ }
+ } else {
+ var stack = new Stack;
+ if (customizer) {
+ var result = customizer(objValue, srcValue, key, object, source, stack);
+ }
+ if (!(result === undefined
+ ? baseIsEqual(srcValue, objValue, customizer, UNORDERED_COMPARE_FLAG | PARTIAL_COMPARE_FLAG, stack)
+ : result
+ )) {
+ return false;
+ }
+ }
+ }
+ return true;
+ }
+
+ /**
+ * The base implementation of `_.iteratee`.
+ *
+ * @private
+ * @param {*} [value=_.identity] The value to convert to an iteratee.
+ * @returns {Function} Returns the iteratee.
+ */
+ function baseIteratee(value) {
+ // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.
+ // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.
+ if (typeof value == 'function') {
+ return value;
+ }
+ if (value == null) {
+ return identity;
+ }
+ if (typeof value == 'object') {
+ return isArray(value)
+ ? baseMatchesProperty(value[0], value[1])
+ : baseMatches(value);
+ }
+ return property(value);
+ }
+
+ /**
+ * The base implementation of `_.keys` which doesn't skip the constructor
+ * property of prototypes or treat sparse arrays as dense.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property names.
+ */
+ function baseKeys(object) {
+ return nativeKeys(Object(object));
+ }
+
+ /**
+ * The base implementation of `_.keysIn` which doesn't skip the constructor
+ * property of prototypes or treat sparse arrays as dense.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property names.
+ */
+ function baseKeysIn(object) {
+ object = object == null ? object : Object(object);
+
+ var result = [];
+ for (var key in object) {
+ result.push(key);
+ }
+ return result;
+ }
+
+ // Fallback for IE < 9 with es6-shim.
+ if (enumerate && !propertyIsEnumerable.call({ 'valueOf': 1 }, 'valueOf')) {
+ baseKeysIn = function(object) {
+ return iteratorToArray(enumerate(object));
+ };
+ }
+
+ /**
+ * The base implementation of `_.lt` which doesn't coerce arguments to numbers.
+ *
+ * @private
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @returns {boolean} Returns `true` if `value` is less than `other`,
+ * else `false`.
+ */
+ function baseLt(value, other) {
+ return value < other;
+ }
+
+ /**
+ * The base implementation of `_.map` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Array} Returns the new mapped array.
+ */
+ function baseMap(collection, iteratee) {
+ var index = -1,
+ result = isArrayLike(collection) ? Array(collection.length) : [];
+
+ baseEach(collection, function(value, key, collection) {
+ result[++index] = iteratee(value, key, collection);
+ });
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.matches` which doesn't clone `source`.
+ *
+ * @private
+ * @param {Object} source The object of property values to match.
+ * @returns {Function} Returns the new function.
+ */
+ function baseMatches(source) {
+ var matchData = getMatchData(source);
+ if (matchData.length == 1 && matchData[0][2]) {
+ return matchesStrictComparable(matchData[0][0], matchData[0][1]);
+ }
+ return function(object) {
+ return object === source || baseIsMatch(object, source, matchData);
+ };
+ }
+
+ /**
+ * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.
+ *
+ * @private
+ * @param {string} path The path of the property to get.
+ * @param {*} srcValue The value to match.
+ * @returns {Function} Returns the new function.
+ */
+ function baseMatchesProperty(path, srcValue) {
+ if (isKey(path) && isStrictComparable(srcValue)) {
+ return matchesStrictComparable(toKey(path), srcValue);
+ }
+ return function(object) {
+ var objValue = get(object, path);
+ return (objValue === undefined && objValue === srcValue)
+ ? hasIn(object, path)
+ : baseIsEqual(srcValue, objValue, undefined, UNORDERED_COMPARE_FLAG | PARTIAL_COMPARE_FLAG);
+ };
+ }
+
+ /**
+ * The base implementation of `_.merge` without support for multiple sources.
+ *
+ * @private
+ * @param {Object} object The destination object.
+ * @param {Object} source The source object.
+ * @param {number} srcIndex The index of `source`.
+ * @param {Function} [customizer] The function to customize merged values.
+ * @param {Object} [stack] Tracks traversed source values and their merged
+ * counterparts.
+ */
+ function baseMerge(object, source, srcIndex, customizer, stack) {
+ if (object === source) {
+ return;
+ }
+ if (!(isArray(source) || isTypedArray(source))) {
+ var props = keysIn(source);
+ }
+ arrayEach(props || source, function(srcValue, key) {
+ if (props) {
+ key = srcValue;
+ srcValue = source[key];
+ }
+ if (isObject(srcValue)) {
+ stack || (stack = new Stack);
+ baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);
+ }
+ else {
+ var newValue = customizer
+ ? customizer(object[key], srcValue, (key + ''), object, source, stack)
+ : undefined;
+
+ if (newValue === undefined) {
+ newValue = srcValue;
+ }
+ assignMergeValue(object, key, newValue);
+ }
+ });
+ }
+
+ /**
+ * A specialized version of `baseMerge` for arrays and objects which performs
+ * deep merges and tracks traversed objects enabling objects with circular
+ * references to be merged.
+ *
+ * @private
+ * @param {Object} object The destination object.
+ * @param {Object} source The source object.
+ * @param {string} key The key of the value to merge.
+ * @param {number} srcIndex The index of `source`.
+ * @param {Function} mergeFunc The function to merge values.
+ * @param {Function} [customizer] The function to customize assigned values.
+ * @param {Object} [stack] Tracks traversed source values and their merged
+ * counterparts.
+ */
+ function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {
+ var objValue = object[key],
+ srcValue = source[key],
+ stacked = stack.get(srcValue);
+
+ if (stacked) {
+ assignMergeValue(object, key, stacked);
+ return;
+ }
+ var newValue = customizer
+ ? customizer(objValue, srcValue, (key + ''), object, source, stack)
+ : undefined;
+
+ var isCommon = newValue === undefined;
+
+ if (isCommon) {
+ newValue = srcValue;
+ if (isArray(srcValue) || isTypedArray(srcValue)) {
+ if (isArray(objValue)) {
+ newValue = objValue;
+ }
+ else if (isArrayLikeObject(objValue)) {
+ newValue = copyArray(objValue);
+ }
+ else {
+ isCommon = false;
+ newValue = baseClone(srcValue, true);
+ }
+ }
+ else if (isPlainObject(srcValue) || isArguments(srcValue)) {
+ if (isArguments(objValue)) {
+ newValue = toPlainObject(objValue);
+ }
+ else if (!isObject(objValue) || (srcIndex && isFunction(objValue))) {
+ isCommon = false;
+ newValue = baseClone(srcValue, true);
+ }
+ else {
+ newValue = objValue;
+ }
+ }
+ else {
+ isCommon = false;
+ }
+ }
+ stack.set(srcValue, newValue);
+
+ if (isCommon) {
+ // Recursively merge objects and arrays (susceptible to call stack limits).
+ mergeFunc(newValue, srcValue, srcIndex, customizer, stack);
+ }
+ stack['delete'](srcValue);
+ assignMergeValue(object, key, newValue);
+ }
+
+ /**
+ * The base implementation of `_.nth` which doesn't coerce `n` to an integer.
+ *
+ * @private
+ * @param {Array} array The array to query.
+ * @param {number} n The index of the element to return.
+ * @returns {*} Returns the nth element of `array`.
+ */
+ function baseNth(array, n) {
+ var length = array.length;
+ if (!length) {
+ return;
+ }
+ n += n < 0 ? length : 0;
+ return isIndex(n, length) ? array[n] : undefined;
+ }
+
+ /**
+ * The base implementation of `_.orderBy` without param guards.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by.
+ * @param {string[]} orders The sort orders of `iteratees`.
+ * @returns {Array} Returns the new sorted array.
+ */
+ function baseOrderBy(collection, iteratees, orders) {
+ var index = -1;
+ iteratees = arrayMap(iteratees.length ? iteratees : [identity], baseUnary(getIteratee()));
+
+ var result = baseMap(collection, function(value, key, collection) {
+ var criteria = arrayMap(iteratees, function(iteratee) {
+ return iteratee(value);
+ });
+ return { 'criteria': criteria, 'index': ++index, 'value': value };
+ });
+
+ return baseSortBy(result, function(object, other) {
+ return compareMultiple(object, other, orders);
+ });
+ }
+
+ /**
+ * The base implementation of `_.pick` without support for individual
+ * property identifiers.
+ *
+ * @private
+ * @param {Object} object The source object.
+ * @param {string[]} props The property identifiers to pick.
+ * @returns {Object} Returns the new object.
+ */
+ function basePick(object, props) {
+ object = Object(object);
+ return arrayReduce(props, function(result, key) {
+ if (key in object) {
+ result[key] = object[key];
+ }
+ return result;
+ }, {});
+ }
+
+ /**
+ * The base implementation of `_.pickBy` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Object} object The source object.
+ * @param {Function} predicate The function invoked per property.
+ * @returns {Object} Returns the new object.
+ */
+ function basePickBy(object, predicate) {
+ var index = -1,
+ props = getAllKeysIn(object),
+ length = props.length,
+ result = {};
+
+ while (++index < length) {
+ var key = props[index],
+ value = object[key];
+
+ if (predicate(value, key)) {
+ result[key] = value;
+ }
+ }
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.property` without support for deep paths.
+ *
+ * @private
+ * @param {string} key The key of the property to get.
+ * @returns {Function} Returns the new function.
+ */
+ function baseProperty(key) {
+ return function(object) {
+ return object == null ? undefined : object[key];
+ };
+ }
+
+ /**
+ * A specialized version of `baseProperty` which supports deep paths.
+ *
+ * @private
+ * @param {Array|string} path The path of the property to get.
+ * @returns {Function} Returns the new function.
+ */
+ function basePropertyDeep(path) {
+ return function(object) {
+ return baseGet(object, path);
+ };
+ }
+
+ /**
+ * The base implementation of `_.pullAllBy` without support for iteratee
+ * shorthands.
+ *
+ * @private
+ * @param {Array} array The array to modify.
+ * @param {Array} values The values to remove.
+ * @param {Function} [iteratee] The iteratee invoked per element.
+ * @param {Function} [comparator] The comparator invoked per element.
+ * @returns {Array} Returns `array`.
+ */
+ function basePullAll(array, values, iteratee, comparator) {
+ var indexOf = comparator ? baseIndexOfWith : baseIndexOf,
+ index = -1,
+ length = values.length,
+ seen = array;
+
+ if (iteratee) {
+ seen = arrayMap(array, baseUnary(iteratee));
+ }
+ while (++index < length) {
+ var fromIndex = 0,
+ value = values[index],
+ computed = iteratee ? iteratee(value) : value;
+
+ while ((fromIndex = indexOf(seen, computed, fromIndex, comparator)) > -1) {
+ if (seen !== array) {
+ splice.call(seen, fromIndex, 1);
+ }
+ splice.call(array, fromIndex, 1);
+ }
+ }
+ return array;
+ }
+
+ /**
+ * The base implementation of `_.pullAt` without support for individual
+ * indexes or capturing the removed elements.
+ *
+ * @private
+ * @param {Array} array The array to modify.
+ * @param {number[]} indexes The indexes of elements to remove.
+ * @returns {Array} Returns `array`.
+ */
+ function basePullAt(array, indexes) {
+ var length = array ? indexes.length : 0,
+ lastIndex = length - 1;
+
+ while (length--) {
+ var index = indexes[length];
+ if (length == lastIndex || index !== previous) {
+ var previous = index;
+ if (isIndex(index)) {
+ splice.call(array, index, 1);
+ }
+ else if (!isKey(index, array)) {
+ var path = castPath(index),
+ object = parent(array, path);
+
+ if (object != null) {
+ delete object[toKey(last(path))];
+ }
+ }
+ else {
+ delete array[toKey(index)];
+ }
+ }
+ }
+ return array;
+ }
+
+ /**
+ * The base implementation of `_.random` without support for returning
+ * floating-point numbers.
+ *
+ * @private
+ * @param {number} lower The lower bound.
+ * @param {number} upper The upper bound.
+ * @returns {number} Returns the random number.
+ */
+ function baseRandom(lower, upper) {
+ return lower + nativeFloor(nativeRandom() * (upper - lower + 1));
+ }
+
+ /**
+ * The base implementation of `_.range` and `_.rangeRight` which doesn't
+ * coerce arguments to numbers.
+ *
+ * @private
+ * @param {number} start The start of the range.
+ * @param {number} end The end of the range.
+ * @param {number} step The value to increment or decrement by.
+ * @param {boolean} [fromRight] Specify iterating from right to left.
+ * @returns {Array} Returns the new array of numbers.
+ */
+ function baseRange(start, end, step, fromRight) {
+ var index = -1,
+ length = nativeMax(nativeCeil((end - start) / (step || 1)), 0),
+ result = Array(length);
+
+ while (length--) {
+ result[fromRight ? length : ++index] = start;
+ start += step;
+ }
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.repeat` which doesn't coerce arguments.
+ *
+ * @private
+ * @param {string} string The string to repeat.
+ * @param {number} n The number of times to repeat the string.
+ * @returns {string} Returns the repeated string.
+ */
+ function baseRepeat(string, n) {
+ var result = '';
+ if (!string || n < 1 || n > MAX_SAFE_INTEGER) {
+ return result;
+ }
+ // Leverage the exponentiation by squaring algorithm for a faster repeat.
+ // See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details.
+ do {
+ if (n % 2) {
+ result += string;
+ }
+ n = nativeFloor(n / 2);
+ if (n) {
+ string += string;
+ }
+ } while (n);
+
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.set`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {Array|string} path The path of the property to set.
+ * @param {*} value The value to set.
+ * @param {Function} [customizer] The function to customize path creation.
+ * @returns {Object} Returns `object`.
+ */
+ function baseSet(object, path, value, customizer) {
+ path = isKey(path, object) ? [path] : castPath(path);
+
+ var index = -1,
+ length = path.length,
+ lastIndex = length - 1,
+ nested = object;
+
+ while (nested != null && ++index < length) {
+ var key = toKey(path[index]);
+ if (isObject(nested)) {
+ var newValue = value;
+ if (index != lastIndex) {
+ var objValue = nested[key];
+ newValue = customizer ? customizer(objValue, key, nested) : undefined;
+ if (newValue === undefined) {
+ newValue = objValue == null
+ ? (isIndex(path[index + 1]) ? [] : {})
+ : objValue;
+ }
+ }
+ assignValue(nested, key, newValue);
+ }
+ nested = nested[key];
+ }
+ return object;
+ }
+
+ /**
+ * The base implementation of `setData` without support for hot loop detection.
+ *
+ * @private
+ * @param {Function} func The function to associate metadata with.
+ * @param {*} data The metadata.
+ * @returns {Function} Returns `func`.
+ */
+ var baseSetData = !metaMap ? identity : function(func, data) {
+ metaMap.set(func, data);
+ return func;
+ };
+
+ /**
+ * The base implementation of `_.slice` without an iteratee call guard.
+ *
+ * @private
+ * @param {Array} array The array to slice.
+ * @param {number} [start=0] The start position.
+ * @param {number} [end=array.length] The end position.
+ * @returns {Array} Returns the slice of `array`.
+ */
+ function baseSlice(array, start, end) {
+ var index = -1,
+ length = array.length;
+
+ if (start < 0) {
+ start = -start > length ? 0 : (length + start);
+ }
+ end = end > length ? length : end;
+ if (end < 0) {
+ end += length;
+ }
+ length = start > end ? 0 : ((end - start) >>> 0);
+ start >>>= 0;
+
+ var result = Array(length);
+ while (++index < length) {
+ result[index] = array[index + start];
+ }
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.some` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} predicate The function invoked per iteration.
+ * @returns {boolean} Returns `true` if any element passes the predicate check,
+ * else `false`.
+ */
+ function baseSome(collection, predicate) {
+ var result;
+
+ baseEach(collection, function(value, index, collection) {
+ result = predicate(value, index, collection);
+ return !result;
+ });
+ return !!result;
+ }
+
+ /**
+ * The base implementation of `_.sortedIndex` and `_.sortedLastIndex` which
+ * performs a binary search of `array` to determine the index at which `value`
+ * should be inserted into `array` in order to maintain its sort order.
+ *
+ * @private
+ * @param {Array} array The sorted array to inspect.
+ * @param {*} value The value to evaluate.
+ * @param {boolean} [retHighest] Specify returning the highest qualified index.
+ * @returns {number} Returns the index at which `value` should be inserted
+ * into `array`.
+ */
+ function baseSortedIndex(array, value, retHighest) {
+ var low = 0,
+ high = array ? array.length : low;
+
+ if (typeof value == 'number' && value === value && high <= HALF_MAX_ARRAY_LENGTH) {
+ while (low < high) {
+ var mid = (low + high) >>> 1,
+ computed = array[mid];
+
+ if (computed !== null && !isSymbol(computed) &&
+ (retHighest ? (computed <= value) : (computed < value))) {
+ low = mid + 1;
+ } else {
+ high = mid;
+ }
+ }
+ return high;
+ }
+ return baseSortedIndexBy(array, value, identity, retHighest);
+ }
+
+ /**
+ * The base implementation of `_.sortedIndexBy` and `_.sortedLastIndexBy`
+ * which invokes `iteratee` for `value` and each element of `array` to compute
+ * their sort ranking. The iteratee is invoked with one argument; (value).
+ *
+ * @private
+ * @param {Array} array The sorted array to inspect.
+ * @param {*} value The value to evaluate.
+ * @param {Function} iteratee The iteratee invoked per element.
+ * @param {boolean} [retHighest] Specify returning the highest qualified index.
+ * @returns {number} Returns the index at which `value` should be inserted
+ * into `array`.
+ */
+ function baseSortedIndexBy(array, value, iteratee, retHighest) {
+ value = iteratee(value);
+
+ var low = 0,
+ high = array ? array.length : 0,
+ valIsNaN = value !== value,
+ valIsNull = value === null,
+ valIsSymbol = isSymbol(value),
+ valIsUndefined = value === undefined;
+
+ while (low < high) {
+ var mid = nativeFloor((low + high) / 2),
+ computed = iteratee(array[mid]),
+ othIsDefined = computed !== undefined,
+ othIsNull = computed === null,
+ othIsReflexive = computed === computed,
+ othIsSymbol = isSymbol(computed);
+
+ if (valIsNaN) {
+ var setLow = retHighest || othIsReflexive;
+ } else if (valIsUndefined) {
+ setLow = othIsReflexive && (retHighest || othIsDefined);
+ } else if (valIsNull) {
+ setLow = othIsReflexive && othIsDefined && (retHighest || !othIsNull);
+ } else if (valIsSymbol) {
+ setLow = othIsReflexive && othIsDefined && !othIsNull && (retHighest || !othIsSymbol);
+ } else if (othIsNull || othIsSymbol) {
+ setLow = false;
+ } else {
+ setLow = retHighest ? (computed <= value) : (computed < value);
+ }
+ if (setLow) {
+ low = mid + 1;
+ } else {
+ high = mid;
+ }
+ }
+ return nativeMin(high, MAX_ARRAY_INDEX);
+ }
+
+ /**
+ * The base implementation of `_.sortedUniq` and `_.sortedUniqBy` without
+ * support for iteratee shorthands.
+ *
+ * @private
+ * @param {Array} array The array to inspect.
+ * @param {Function} [iteratee] The iteratee invoked per element.
+ * @returns {Array} Returns the new duplicate free array.
+ */
+ function baseSortedUniq(array, iteratee) {
+ var index = -1,
+ length = array.length,
+ resIndex = 0,
+ result = [];
+
+ while (++index < length) {
+ var value = array[index],
+ computed = iteratee ? iteratee(value) : value;
+
+ if (!index || !eq(computed, seen)) {
+ var seen = computed;
+ result[resIndex++] = value === 0 ? 0 : value;
+ }
+ }
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.toNumber` which doesn't ensure correct
+ * conversions of binary, hexadecimal, or octal string values.
+ *
+ * @private
+ * @param {*} value The value to process.
+ * @returns {number} Returns the number.
+ */
+ function baseToNumber(value) {
+ if (typeof value == 'number') {
+ return value;
+ }
+ if (isSymbol(value)) {
+ return NAN;
+ }
+ return +value;
+ }
+
+ /**
+ * The base implementation of `_.toString` which doesn't convert nullish
+ * values to empty strings.
+ *
+ * @private
+ * @param {*} value The value to process.
+ * @returns {string} Returns the string.
+ */
+ function baseToString(value) {
+ // Exit early for strings to avoid a performance hit in some environments.
+ if (typeof value == 'string') {
+ return value;
+ }
+ if (isSymbol(value)) {
+ return symbolToString ? symbolToString.call(value) : '';
+ }
+ var result = (value + '');
+ return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
+ }
+
+ /**
+ * The base implementation of `_.uniqBy` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Array} array The array to inspect.
+ * @param {Function} [iteratee] The iteratee invoked per element.
+ * @param {Function} [comparator] The comparator invoked per element.
+ * @returns {Array} Returns the new duplicate free array.
+ */
+ function baseUniq(array, iteratee, comparator) {
+ var index = -1,
+ includes = arrayIncludes,
+ length = array.length,
+ isCommon = true,
+ result = [],
+ seen = result;
+
+ if (comparator) {
+ isCommon = false;
+ includes = arrayIncludesWith;
+ }
+ else if (length >= LARGE_ARRAY_SIZE) {
+ var set = iteratee ? null : createSet(array);
+ if (set) {
+ return setToArray(set);
+ }
+ isCommon = false;
+ includes = cacheHas;
+ seen = new SetCache;
+ }
+ else {
+ seen = iteratee ? [] : result;
+ }
+ outer:
+ while (++index < length) {
+ var value = array[index],
+ computed = iteratee ? iteratee(value) : value;
+
+ value = (comparator || value !== 0) ? value : 0;
+ if (isCommon && computed === computed) {
+ var seenIndex = seen.length;
+ while (seenIndex--) {
+ if (seen[seenIndex] === computed) {
+ continue outer;
+ }
+ }
+ if (iteratee) {
+ seen.push(computed);
+ }
+ result.push(value);
+ }
+ else if (!includes(seen, computed, comparator)) {
+ if (seen !== result) {
+ seen.push(computed);
+ }
+ result.push(value);
+ }
+ }
+ return result;
+ }
+
+ /**
+ * The base implementation of `_.unset`.
+ *
+ * @private
+ * @param {Object} object The object to modify.
+ * @param {Array|string} path The path of the property to unset.
+ * @returns {boolean} Returns `true` if the property is deleted, else `false`.
+ */
+ function baseUnset(object, path) {
+ path = isKey(path, object) ? [path] : castPath(path);
+ object = parent(object, path);
+
+ var key = toKey(last(path));
+ return !(object != null && baseHas(object, key)) || delete object[key];
+ }
+
+ /**
+ * The base implementation of `_.update`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {Array|string} path The path of the property to update.
+ * @param {Function} updater The function to produce the updated value.
+ * @param {Function} [customizer] The function to customize path creation.
+ * @returns {Object} Returns `object`.
+ */
+ function baseUpdate(object, path, updater, customizer) {
+ return baseSet(object, path, updater(baseGet(object, path)), customizer);
+ }
+
+ /**
+ * The base implementation of methods like `_.dropWhile` and `_.takeWhile`
+ * without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Array} array The array to query.
+ * @param {Function} predicate The function invoked per iteration.
+ * @param {boolean} [isDrop] Specify dropping elements instead of taking them.
+ * @param {boolean} [fromRight] Specify iterating from right to left.
+ * @returns {Array} Returns the slice of `array`.
+ */
+ function baseWhile(array, predicate, isDrop, fromRight) {
+ var length = array.length,
+ index = fromRight ? length : -1;
+
+ while ((fromRight ? index-- : ++index < length) &&
+ predicate(array[index], index, array)) {}
+
+ return isDrop
+ ? baseSlice(array, (fromRight ? 0 : index), (fromRight ? index + 1 : length))
+ : baseSlice(array, (fromRight ? index + 1 : 0), (fromRight ? length : index));
+ }
+
+ /**
+ * The base implementation of `wrapperValue` which returns the result of
+ * performing a sequence of actions on the unwrapped `value`, where each
+ * successive action is supplied the return value of the previous.
+ *
+ * @private
+ * @param {*} value The unwrapped value.
+ * @param {Array} actions Actions to perform to resolve the unwrapped value.
+ * @returns {*} Returns the resolved value.
+ */
+ function baseWrapperValue(value, actions) {
+ var result = value;
+ if (result instanceof LazyWrapper) {
+ result = result.value();
+ }
+ return arrayReduce(actions, function(result, action) {
+ return action.func.apply(action.thisArg, arrayPush([result], action.args));
+ }, result);
+ }
+
+ /**
+ * The base implementation of methods like `_.xor`, without support for
+ * iteratee shorthands, that accepts an array of arrays to inspect.
+ *
+ * @private
+ * @param {Array} arrays The arrays to inspect.
+ * @param {Function} [iteratee] The iteratee invoked per element.
+ * @param {Function} [comparator] The comparator invoked per element.
+ * @returns {Array} Returns the new array of values.
+ */
+ function baseXor(arrays, iteratee, comparator) {
+ var index = -1,
+ length = arrays.length;
+
+ while (++index < length) {
+ var result = result
+ ? arrayPush(
+ baseDifference(result, arrays[index], iteratee, comparator),
+ baseDifference(arrays[index], result, iteratee, comparator)
+ )
+ : arrays[index];
+ }
+ return (result && result.length) ? baseUniq(result, iteratee, comparator) : [];
+ }
+
+ /**
+ * This base implementation of `_.zipObject` which assigns values using `assignFunc`.
+ *
+ * @private
+ * @param {Array} props The property identifiers.
+ * @param {Array} values The property values.
+ * @param {Function} assignFunc The function to assign values.
+ * @returns {Object} Returns the new object.
+ */
+ function baseZipObject(props, values, assignFunc) {
+ var index = -1,
+ length = props.length,
+ valsLength = values.length,
+ result = {};
+
+ while (++index < length) {
+ var value = index < valsLength ? values[index] : undefined;
+ assignFunc(result, props[index], value);
+ }
+ return result;
+ }
+
+ /**
+ * Casts `value` to an empty array if it's not an array like object.
+ *
+ * @private
+ * @param {*} value The value to inspect.
+ * @returns {Array|Object} Returns the cast array-like object.
+ */
+ function castArrayLikeObject(value) {
+ return isArrayLikeObject(value) ? value : [];
+ }
+
+ /**
+ * Casts `value` to `identity` if it's not a function.
+ *
+ * @private
+ * @param {*} value The value to inspect.
+ * @returns {Function} Returns cast function.
+ */
+ function castFunction(value) {
+ return typeof value == 'function' ? value : identity;
+ }
+
+ /**
+ * Casts `value` to a path array if it's not one.
+ *
+ * @private
+ * @param {*} value The value to inspect.
+ * @returns {Array} Returns the cast property path array.
+ */
+ function castPath(value) {
+ return isArray(value) ? value : stringToPath(value);
+ }
+
+ /**
+ * Casts `array` to a slice if it's needed.
+ *
+ * @private
+ * @param {Array} array The array to inspect.
+ * @param {number} start The start position.
+ * @param {number} [end=array.length] The end position.
+ * @returns {Array} Returns the cast slice.
+ */
+ function castSlice(array, start, end) {
+ var length = array.length;
+ end = end === undefined ? length : end;
+ return (!start && end >= length) ? array : baseSlice(array, start, end);
+ }
+
+ /**
+ * Creates a clone of `buffer`.
+ *
+ * @private
+ * @param {Buffer} buffer The buffer to clone.
+ * @param {boolean} [isDeep] Specify a deep clone.
+ * @returns {Buffer} Returns the cloned buffer.
+ */
+ function cloneBuffer(buffer, isDeep) {
+ if (isDeep) {
+ return buffer.slice();
+ }
+ var result = new buffer.constructor(buffer.length);
+ buffer.copy(result);
+ return result;
+ }
+
+ /**
+ * Creates a clone of `arrayBuffer`.
+ *
+ * @private
+ * @param {ArrayBuffer} arrayBuffer The array buffer to clone.
+ * @returns {ArrayBuffer} Returns the cloned array buffer.
+ */
+ function cloneArrayBuffer(arrayBuffer) {
+ var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
+ new Uint8Array(result).set(new Uint8Array(arrayBuffer));
+ return result;
+ }
+
+ /**
+ * Creates a clone of `dataView`.
+ *
+ * @private
+ * @param {Object} dataView The data view to clone.
+ * @param {boolean} [isDeep] Specify a deep clone.
+ * @returns {Object} Returns the cloned data view.
+ */
+ function cloneDataView(dataView, isDeep) {
+ var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;
+ return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
+ }
+
+ /**
+ * Creates a clone of `map`.
+ *
+ * @private
+ * @param {Object} map The map to clone.
+ * @param {Function} cloneFunc The function to clone values.
+ * @param {boolean} [isDeep] Specify a deep clone.
+ * @returns {Object} Returns the cloned map.
+ */
+ function cloneMap(map, isDeep, cloneFunc) {
+ var array = isDeep ? cloneFunc(mapToArray(map), true) : mapToArray(map);
+ return arrayReduce(array, addMapEntry, new map.constructor);
+ }
+
+ /**
+ * Creates a clone of `regexp`.
+ *
+ * @private
+ * @param {Object} regexp The regexp to clone.
+ * @returns {Object} Returns the cloned regexp.
+ */
+ function cloneRegExp(regexp) {
+ var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));
+ result.lastIndex = regexp.lastIndex;
+ return result;
+ }
+
+ /**
+ * Creates a clone of `set`.
+ *
+ * @private
+ * @param {Object} set The set to clone.
+ * @param {Function} cloneFunc The function to clone values.
+ * @param {boolean} [isDeep] Specify a deep clone.
+ * @returns {Object} Returns the cloned set.
+ */
+ function cloneSet(set, isDeep, cloneFunc) {
+ var array = isDeep ? cloneFunc(setToArray(set), true) : setToArray(set);
+ return arrayReduce(array, addSetEntry, new set.constructor);
+ }
+
+ /**
+ * Creates a clone of the `symbol` object.
+ *
+ * @private
+ * @param {Object} symbol The symbol object to clone.
+ * @returns {Object} Returns the cloned symbol object.
+ */
+ function cloneSymbol(symbol) {
+ return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};
+ }
+
+ /**
+ * Creates a clone of `typedArray`.
+ *
+ * @private
+ * @param {Object} typedArray The typed array to clone.
+ * @param {boolean} [isDeep] Specify a deep clone.
+ * @returns {Object} Returns the cloned typed array.
+ */
+ function cloneTypedArray(typedArray, isDeep) {
+ var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;
+ return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
+ }
+
+ /**
+ * Compares values to sort them in ascending order.
+ *
+ * @private
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @returns {number} Returns the sort order indicator for `value`.
+ */
+ function compareAscending(value, other) {
+ if (value !== other) {
+ var valIsDefined = value !== undefined,
+ valIsNull = value === null,
+ valIsReflexive = value === value,
+ valIsSymbol = isSymbol(value);
+
+ var othIsDefined = other !== undefined,
+ othIsNull = other === null,
+ othIsReflexive = other === other,
+ othIsSymbol = isSymbol(other);
+
+ if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) ||
+ (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) ||
+ (valIsNull && othIsDefined && othIsReflexive) ||
+ (!valIsDefined && othIsReflexive) ||
+ !valIsReflexive) {
+ return 1;
+ }
+ if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) ||
+ (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) ||
+ (othIsNull && valIsDefined && valIsReflexive) ||
+ (!othIsDefined && valIsReflexive) ||
+ !othIsReflexive) {
+ return -1;
+ }
+ }
+ return 0;
+ }
+
+ /**
+ * Used by `_.orderBy` to compare multiple properties of a value to another
+ * and stable sort them.
+ *
+ * If `orders` is unspecified, all values are sorted in ascending order. Otherwise,
+ * specify an order of "desc" for descending or "asc" for ascending sort order
+ * of corresponding values.
+ *
+ * @private
+ * @param {Object} object The object to compare.
+ * @param {Object} other The other object to compare.
+ * @param {boolean[]|string[]} orders The order to sort by for each property.
+ * @returns {number} Returns the sort order indicator for `object`.
+ */
+ function compareMultiple(object, other, orders) {
+ var index = -1,
+ objCriteria = object.criteria,
+ othCriteria = other.criteria,
+ length = objCriteria.length,
+ ordersLength = orders.length;
+
+ while (++index < length) {
+ var result = compareAscending(objCriteria[index], othCriteria[index]);
+ if (result) {
+ if (index >= ordersLength) {
+ return result;
+ }
+ var order = orders[index];
+ return result * (order == 'desc' ? -1 : 1);
+ }
+ }
+ // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications
+ // that causes it, under certain circumstances, to provide the same value for
+ // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247
+ // for more details.
+ //
+ // This also ensures a stable sort in V8 and other engines.
+ // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details.
+ return object.index - other.index;
+ }
+
+ /**
+ * Creates an array that is the composition of partially applied arguments,
+ * placeholders, and provided arguments into a single array of arguments.
+ *
+ * @private
+ * @param {Array|Object} args The provided arguments.
+ * @param {Array} partials The arguments to prepend to those provided.
+ * @param {Array} holders The `partials` placeholder indexes.
+ * @params {boolean} [isCurried] Specify composing for a curried function.
+ * @returns {Array} Returns the new array of composed arguments.
+ */
+ function composeArgs(args, partials, holders, isCurried) {
+ var argsIndex = -1,
+ argsLength = args.length,
+ holdersLength = holders.length,
+ leftIndex = -1,
+ leftLength = partials.length,
+ rangeLength = nativeMax(argsLength - holdersLength, 0),
+ result = Array(leftLength + rangeLength),
+ isUncurried = !isCurried;
+
+ while (++leftIndex < leftLength) {
+ result[leftIndex] = partials[leftIndex];
+ }
+ while (++argsIndex < holdersLength) {
+ if (isUncurried || argsIndex < argsLength) {
+ result[holders[argsIndex]] = args[argsIndex];
+ }
+ }
+ while (rangeLength--) {
+ result[leftIndex++] = args[argsIndex++];
+ }
+ return result;
+ }
+
+ /**
+ * This function is like `composeArgs` except that the arguments composition
+ * is tailored for `_.partialRight`.
+ *
+ * @private
+ * @param {Array|Object} args The provided arguments.
+ * @param {Array} partials The arguments to append to those provided.
+ * @param {Array} holders The `partials` placeholder indexes.
+ * @params {boolean} [isCurried] Specify composing for a curried function.
+ * @returns {Array} Returns the new array of composed arguments.
+ */
+ function composeArgsRight(args, partials, holders, isCurried) {
+ var argsIndex = -1,
+ argsLength = args.length,
+ holdersIndex = -1,
+ holdersLength = holders.length,
+ rightIndex = -1,
+ rightLength = partials.length,
+ rangeLength = nativeMax(argsLength - holdersLength, 0),
+ result = Array(rangeLength + rightLength),
+ isUncurried = !isCurried;
+
+ while (++argsIndex < rangeLength) {
+ result[argsIndex] = args[argsIndex];
+ }
+ var offset = argsIndex;
+ while (++rightIndex < rightLength) {
+ result[offset + rightIndex] = partials[rightIndex];
+ }
+ while (++holdersIndex < holdersLength) {
+ if (isUncurried || argsIndex < argsLength) {
+ result[offset + holders[holdersIndex]] = args[argsIndex++];
+ }
+ }
+ return result;
+ }
+
+ /**
+ * Copies the values of `source` to `array`.
+ *
+ * @private
+ * @param {Array} source The array to copy values from.
+ * @param {Array} [array=[]] The array to copy values to.
+ * @returns {Array} Returns `array`.
+ */
+ function copyArray(source, array) {
+ var index = -1,
+ length = source.length;
+
+ array || (array = Array(length));
+ while (++index < length) {
+ array[index] = source[index];
+ }
+ return array;
+ }
+
+ /**
+ * Copies properties of `source` to `object`.
+ *
+ * @private
+ * @param {Object} source The object to copy properties from.
+ * @param {Array} props The property identifiers to copy.
+ * @param {Object} [object={}] The object to copy properties to.
+ * @param {Function} [customizer] The function to customize copied values.
+ * @returns {Object} Returns `object`.
+ */
+ function copyObject(source, props, object, customizer) {
+ object || (object = {});
+
+ var index = -1,
+ length = props.length;
+
+ while (++index < length) {
+ var key = props[index];
+
+ var newValue = customizer
+ ? customizer(object[key], source[key], key, object, source)
+ : source[key];
+
+ assignValue(object, key, newValue);
+ }
+ return object;
+ }
+
+ /**
+ * Copies own symbol properties of `source` to `object`.
+ *
+ * @private
+ * @param {Object} source The object to copy symbols from.
+ * @param {Object} [object={}] The object to copy symbols to.
+ * @returns {Object} Returns `object`.
+ */
+ function copySymbols(source, object) {
+ return copyObject(source, getSymbols(source), object);
+ }
+
+ /**
+ * Creates a function like `_.groupBy`.
+ *
+ * @private
+ * @param {Function} setter The function to set accumulator values.
+ * @param {Function} [initializer] The accumulator object initializer.
+ * @returns {Function} Returns the new aggregator function.
+ */
+ function createAggregator(setter, initializer) {
+ return function(collection, iteratee) {
+ var func = isArray(collection) ? arrayAggregator : baseAggregator,
+ accumulator = initializer ? initializer() : {};
+
+ return func(collection, setter, getIteratee(iteratee), accumulator);
+ };
+ }
+
+ /**
+ * Creates a function like `_.assign`.
+ *
+ * @private
+ * @param {Function} assigner The function to assign values.
+ * @returns {Function} Returns the new assigner function.
+ */
+ function createAssigner(assigner) {
+ return rest(function(object, sources) {
+ var index = -1,
+ length = sources.length,
+ customizer = length > 1 ? sources[length - 1] : undefined,
+ guard = length > 2 ? sources[2] : undefined;
+
+ customizer = typeof customizer == 'function'
+ ? (length--, customizer)
+ : undefined;
+
+ if (guard && isIterateeCall(sources[0], sources[1], guard)) {
+ customizer = length < 3 ? undefined : customizer;
+ length = 1;
+ }
+ object = Object(object);
+ while (++index < length) {
+ var source = sources[index];
+ if (source) {
+ assigner(object, source, index, customizer);
+ }
+ }
+ return object;
+ });
+ }
+
+ /**
+ * Creates a `baseEach` or `baseEachRight` function.
+ *
+ * @private
+ * @param {Function} eachFunc The function to iterate over a collection.
+ * @param {boolean} [fromRight] Specify iterating from right to left.
+ * @returns {Function} Returns the new base function.
+ */
+ function createBaseEach(eachFunc, fromRight) {
+ return function(collection, iteratee) {
+ if (collection == null) {
+ return collection;
+ }
+ if (!isArrayLike(collection)) {
+ return eachFunc(collection, iteratee);
+ }
+ var length = collection.length,
+ index = fromRight ? length : -1,
+ iterable = Object(collection);
+
+ while ((fromRight ? index-- : ++index < length)) {
+ if (iteratee(iterable[index], index, iterable) === false) {
+ break;
+ }
+ }
+ return collection;
+ };
+ }
+
+ /**
+ * Creates a base function for methods like `_.forIn` and `_.forOwn`.
+ *
+ * @private
+ * @param {boolean} [fromRight] Specify iterating from right to left.
+ * @returns {Function} Returns the new base function.
+ */
+ function createBaseFor(fromRight) {
+ return function(object, iteratee, keysFunc) {
+ var index = -1,
+ iterable = Object(object),
+ props = keysFunc(object),
+ length = props.length;
+
+ while (length--) {
+ var key = props[fromRight ? length : ++index];
+ if (iteratee(iterable[key], key, iterable) === false) {
+ break;
+ }
+ }
+ return object;
+ };
+ }
+
+ /**
+ * Creates a function that wraps `func` to invoke it with the optional `this`
+ * binding of `thisArg`.
+ *
+ * @private
+ * @param {Function} func The function to wrap.
+ * @param {number} bitmask The bitmask of wrapper flags. See `createWrapper`
+ * for more details.
+ * @param {*} [thisArg] The `this` binding of `func`.
+ * @returns {Function} Returns the new wrapped function.
+ */
+ function createBaseWrapper(func, bitmask, thisArg) {
+ var isBind = bitmask & BIND_FLAG,
+ Ctor = createCtorWrapper(func);
+
+ function wrapper() {
+ var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
+ return fn.apply(isBind ? thisArg : this, arguments);
+ }
+ return wrapper;
+ }
+
+ /**
+ * Creates a function like `_.lowerFirst`.
+ *
+ * @private
+ * @param {string} methodName The name of the `String` case method to use.
+ * @returns {Function} Returns the new function.
+ */
+ function createCaseFirst(methodName) {
+ return function(string) {
+ string = toString(string);
+
+ var strSymbols = reHasComplexSymbol.test(string)
+ ? stringToArray(string)
+ : undefined;
+
+ var chr = strSymbols
+ ? strSymbols[0]
+ : string.charAt(0);
+
+ var trailing = strSymbols
+ ? castSlice(strSymbols, 1).join('')
+ : string.slice(1);
+
+ return chr[methodName]() + trailing;
+ };
+ }
+
+ /**
+ * Creates a function like `_.camelCase`.
+ *
+ * @private
+ * @param {Function} callback The function to combine each word.
+ * @returns {Function} Returns the new compounder function.
+ */
+ function createCompounder(callback) {
+ return function(string) {
+ return arrayReduce(words(deburr(string).replace(reApos, '')), callback, '');
+ };
+ }
+
+ /**
+ * Creates a function that produces an instance of `Ctor` regardless of
+ * whether it was invoked as part of a `new` expression or by `call` or `apply`.
+ *
+ * @private
+ * @param {Function} Ctor The constructor to wrap.
+ * @returns {Function} Returns the new wrapped function.
+ */
+ function createCtorWrapper(Ctor) {
+ return function() {
+ // Use a `switch` statement to work with class constructors. See
+ // http://ecma-international.org/ecma-262/6.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist
+ // for more details.
+ var args = arguments;
+ switch (args.length) {
+ case 0: return new Ctor;
+ case 1: return new Ctor(args[0]);
+ case 2: return new Ctor(args[0], args[1]);
+ case 3: return new Ctor(args[0], args[1], args[2]);
+ case 4: return new Ctor(args[0], args[1], args[2], args[3]);
+ case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]);
+ case 6: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]);
+ case 7: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]);
+ }
+ var thisBinding = baseCreate(Ctor.prototype),
+ result = Ctor.apply(thisBinding, args);
+
+ // Mimic the constructor's `return` behavior.
+ // See https://es5.github.io/#x13.2.2 for more details.
+ return isObject(result) ? result : thisBinding;
+ };
+ }
+
+ /**
+ * Creates a function that wraps `func` to enable currying.
+ *
+ * @private
+ * @param {Function} func The function to wrap.
+ * @param {number} bitmask The bitmask of wrapper flags. See `createWrapper`
+ * for more details.
+ * @param {number} arity The arity of `func`.
+ * @returns {Function} Returns the new wrapped function.
+ */
+ function createCurryWrapper(func, bitmask, arity) {
+ var Ctor = createCtorWrapper(func);
+
+ function wrapper() {
+ var length = arguments.length,
+ args = Array(length),
+ index = length,
+ placeholder = getPlaceholder(wrapper);
+
+ while (index--) {
+ args[index] = arguments[index];
+ }
+ var holders = (length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder)
+ ? []
+ : replaceHolders(args, placeholder);
+
+ length -= holders.length;
+ if (length < arity) {
+ return createRecurryWrapper(
+ func, bitmask, createHybridWrapper, wrapper.placeholder, undefined,
+ args, holders, undefined, undefined, arity - length);
+ }
+ var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
+ return apply(fn, this, args);
+ }
+ return wrapper;
+ }
+
+ /**
+ * Creates a `_.flow` or `_.flowRight` function.
+ *
+ * @private
+ * @param {boolean} [fromRight] Specify iterating from right to left.
+ * @returns {Function} Returns the new flow function.
+ */
+ function createFlow(fromRight) {
+ return rest(function(funcs) {
+ funcs = baseFlatten(funcs, 1);
+
+ var length = funcs.length,
+ index = length,
+ prereq = LodashWrapper.prototype.thru;
+
+ if (fromRight) {
+ funcs.reverse();
+ }
+ while (index--) {
+ var func = funcs[index];
+ if (typeof func != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ if (prereq && !wrapper && getFuncName(func) == 'wrapper') {
+ var wrapper = new LodashWrapper([], true);
+ }
+ }
+ index = wrapper ? index : length;
+ while (++index < length) {
+ func = funcs[index];
+
+ var funcName = getFuncName(func),
+ data = funcName == 'wrapper' ? getData(func) : undefined;
+
+ if (data && isLaziable(data[0]) &&
+ data[1] == (ARY_FLAG | CURRY_FLAG | PARTIAL_FLAG | REARG_FLAG) &&
+ !data[4].length && data[9] == 1
+ ) {
+ wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]);
+ } else {
+ wrapper = (func.length == 1 && isLaziable(func))
+ ? wrapper[funcName]()
+ : wrapper.thru(func);
+ }
+ }
+ return function() {
+ var args = arguments,
+ value = args[0];
+
+ if (wrapper && args.length == 1 &&
+ isArray(value) && value.length >= LARGE_ARRAY_SIZE) {
+ return wrapper.plant(value).value();
+ }
+ var index = 0,
+ result = length ? funcs[index].apply(this, args) : value;
+
+ while (++index < length) {
+ result = funcs[index].call(this, result);
+ }
+ return result;
+ };
+ });
+ }
+
+ /**
+ * Creates a function that wraps `func` to invoke it with optional `this`
+ * binding of `thisArg`, partial application, and currying.
+ *
+ * @private
+ * @param {Function|string} func The function or method name to wrap.
+ * @param {number} bitmask The bitmask of wrapper flags. See `createWrapper`
+ * for more details.
+ * @param {*} [thisArg] The `this` binding of `func`.
+ * @param {Array} [partials] The arguments to prepend to those provided to
+ * the new function.
+ * @param {Array} [holders] The `partials` placeholder indexes.
+ * @param {Array} [partialsRight] The arguments to append to those provided
+ * to the new function.
+ * @param {Array} [holdersRight] The `partialsRight` placeholder indexes.
+ * @param {Array} [argPos] The argument positions of the new function.
+ * @param {number} [ary] The arity cap of `func`.
+ * @param {number} [arity] The arity of `func`.
+ * @returns {Function} Returns the new wrapped function.
+ */
+ function createHybridWrapper(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) {
+ var isAry = bitmask & ARY_FLAG,
+ isBind = bitmask & BIND_FLAG,
+ isBindKey = bitmask & BIND_KEY_FLAG,
+ isCurried = bitmask & (CURRY_FLAG | CURRY_RIGHT_FLAG),
+ isFlip = bitmask & FLIP_FLAG,
+ Ctor = isBindKey ? undefined : createCtorWrapper(func);
+
+ function wrapper() {
+ var length = arguments.length,
+ index = length,
+ args = Array(length);
+
+ while (index--) {
+ args[index] = arguments[index];
+ }
+ if (isCurried) {
+ var placeholder = getPlaceholder(wrapper),
+ holdersCount = countHolders(args, placeholder);
+ }
+ if (partials) {
+ args = composeArgs(args, partials, holders, isCurried);
+ }
+ if (partialsRight) {
+ args = composeArgsRight(args, partialsRight, holdersRight, isCurried);
+ }
+ length -= holdersCount;
+ if (isCurried && length < arity) {
+ var newHolders = replaceHolders(args, placeholder);
+ return createRecurryWrapper(
+ func, bitmask, createHybridWrapper, wrapper.placeholder, thisArg,
+ args, newHolders, argPos, ary, arity - length
+ );
+ }
+ var thisBinding = isBind ? thisArg : this,
+ fn = isBindKey ? thisBinding[func] : func;
+
+ length = args.length;
+ if (argPos) {
+ args = reorder(args, argPos);
+ } else if (isFlip && length > 1) {
+ args.reverse();
+ }
+ if (isAry && ary < length) {
+ args.length = ary;
+ }
+ if (this && this !== root && this instanceof wrapper) {
+ fn = Ctor || createCtorWrapper(fn);
+ }
+ return fn.apply(thisBinding, args);
+ }
+ return wrapper;
+ }
+
+ /**
+ * Creates a function like `_.invertBy`.
+ *
+ * @private
+ * @param {Function} setter The function to set accumulator values.
+ * @param {Function} toIteratee The function to resolve iteratees.
+ * @returns {Function} Returns the new inverter function.
+ */
+ function createInverter(setter, toIteratee) {
+ return function(object, iteratee) {
+ return baseInverter(object, setter, toIteratee(iteratee), {});
+ };
+ }
+
+ /**
+ * Creates a function that performs a mathematical operation on two values.
+ *
+ * @private
+ * @param {Function} operator The function to perform the operation.
+ * @returns {Function} Returns the new mathematical operation function.
+ */
+ function createMathOperation(operator) {
+ return function(value, other) {
+ var result;
+ if (value === undefined && other === undefined) {
+ return 0;
+ }
+ if (value !== undefined) {
+ result = value;
+ }
+ if (other !== undefined) {
+ if (result === undefined) {
+ return other;
+ }
+ if (typeof value == 'string' || typeof other == 'string') {
+ value = baseToString(value);
+ other = baseToString(other);
+ } else {
+ value = baseToNumber(value);
+ other = baseToNumber(other);
+ }
+ result = operator(value, other);
+ }
+ return result;
+ };
+ }
+
+ /**
+ * Creates a function like `_.over`.
+ *
+ * @private
+ * @param {Function} arrayFunc The function to iterate over iteratees.
+ * @returns {Function} Returns the new invoker function.
+ */
+ function createOver(arrayFunc) {
+ return rest(function(iteratees) {
+ iteratees = (iteratees.length == 1 && isArray(iteratees[0]))
+ ? arrayMap(iteratees[0], baseUnary(getIteratee()))
+ : arrayMap(baseFlatten(iteratees, 1, isFlattenableIteratee), baseUnary(getIteratee()));
+
+ return rest(function(args) {
+ var thisArg = this;
+ return arrayFunc(iteratees, function(iteratee) {
+ return apply(iteratee, thisArg, args);
+ });
+ });
+ });
+ }
+
+ /**
+ * Creates the padding for `string` based on `length`. The `chars` string
+ * is truncated if the number of characters exceeds `length`.
+ *
+ * @private
+ * @param {number} length The padding length.
+ * @param {string} [chars=' '] The string used as padding.
+ * @returns {string} Returns the padding for `string`.
+ */
+ function createPadding(length, chars) {
+ chars = chars === undefined ? ' ' : baseToString(chars);
+
+ var charsLength = chars.length;
+ if (charsLength < 2) {
+ return charsLength ? baseRepeat(chars, length) : chars;
+ }
+ var result = baseRepeat(chars, nativeCeil(length / stringSize(chars)));
+ return reHasComplexSymbol.test(chars)
+ ? castSlice(stringToArray(result), 0, length).join('')
+ : result.slice(0, length);
+ }
+
+ /**
+ * Creates a function that wraps `func` to invoke it with the `this` binding
+ * of `thisArg` and `partials` prepended to the arguments it receives.
+ *
+ * @private
+ * @param {Function} func The function to wrap.
+ * @param {number} bitmask The bitmask of wrapper flags. See `createWrapper`
+ * for more details.
+ * @param {*} thisArg The `this` binding of `func`.
+ * @param {Array} partials The arguments to prepend to those provided to
+ * the new function.
+ * @returns {Function} Returns the new wrapped function.
+ */
+ function createPartialWrapper(func, bitmask, thisArg, partials) {
+ var isBind = bitmask & BIND_FLAG,
+ Ctor = createCtorWrapper(func);
+
+ function wrapper() {
+ var argsIndex = -1,
+ argsLength = arguments.length,
+ leftIndex = -1,
+ leftLength = partials.length,
+ args = Array(leftLength + argsLength),
+ fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
+
+ while (++leftIndex < leftLength) {
+ args[leftIndex] = partials[leftIndex];
+ }
+ while (argsLength--) {
+ args[leftIndex++] = arguments[++argsIndex];
+ }
+ return apply(fn, isBind ? thisArg : this, args);
+ }
+ return wrapper;
+ }
+
+ /**
+ * Creates a `_.range` or `_.rangeRight` function.
+ *
+ * @private
+ * @param {boolean} [fromRight] Specify iterating from right to left.
+ * @returns {Function} Returns the new range function.
+ */
+ function createRange(fromRight) {
+ return function(start, end, step) {
+ if (step && typeof step != 'number' && isIterateeCall(start, end, step)) {
+ end = step = undefined;
+ }
+ // Ensure the sign of `-0` is preserved.
+ start = toNumber(start);
+ start = start === start ? start : 0;
+ if (end === undefined) {
+ end = start;
+ start = 0;
+ } else {
+ end = toNumber(end) || 0;
+ }
+ step = step === undefined ? (start < end ? 1 : -1) : (toNumber(step) || 0);
+ return baseRange(start, end, step, fromRight);
+ };
+ }
+
+ /**
+ * Creates a function that performs a relational operation on two values.
+ *
+ * @private
+ * @param {Function} operator The function to perform the operation.
+ * @returns {Function} Returns the new relational operation function.
+ */
+ function createRelationalOperation(operator) {
+ return function(value, other) {
+ if (!(typeof value == 'string' && typeof other == 'string')) {
+ value = toNumber(value);
+ other = toNumber(other);
+ }
+ return operator(value, other);
+ };
+ }
+
+ /**
+ * Creates a function that wraps `func` to continue currying.
+ *
+ * @private
+ * @param {Function} func The function to wrap.
+ * @param {number} bitmask The bitmask of wrapper flags. See `createWrapper`
+ * for more details.
+ * @param {Function} wrapFunc The function to create the `func` wrapper.
+ * @param {*} placeholder The placeholder value.
+ * @param {*} [thisArg] The `this` binding of `func`.
+ * @param {Array} [partials] The arguments to prepend to those provided to
+ * the new function.
+ * @param {Array} [holders] The `partials` placeholder indexes.
+ * @param {Array} [argPos] The argument positions of the new function.
+ * @param {number} [ary] The arity cap of `func`.
+ * @param {number} [arity] The arity of `func`.
+ * @returns {Function} Returns the new wrapped function.
+ */
+ function createRecurryWrapper(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) {
+ var isCurry = bitmask & CURRY_FLAG,
+ newHolders = isCurry ? holders : undefined,
+ newHoldersRight = isCurry ? undefined : holders,
+ newPartials = isCurry ? partials : undefined,
+ newPartialsRight = isCurry ? undefined : partials;
+
+ bitmask |= (isCurry ? PARTIAL_FLAG : PARTIAL_RIGHT_FLAG);
+ bitmask &= ~(isCurry ? PARTIAL_RIGHT_FLAG : PARTIAL_FLAG);
+
+ if (!(bitmask & CURRY_BOUND_FLAG)) {
+ bitmask &= ~(BIND_FLAG | BIND_KEY_FLAG);
+ }
+ var newData = [
+ func, bitmask, thisArg, newPartials, newHolders, newPartialsRight,
+ newHoldersRight, argPos, ary, arity
+ ];
+
+ var result = wrapFunc.apply(undefined, newData);
+ if (isLaziable(func)) {
+ setData(result, newData);
+ }
+ result.placeholder = placeholder;
+ return result;
+ }
+
+ /**
+ * Creates a function like `_.round`.
+ *
+ * @private
+ * @param {string} methodName The name of the `Math` method to use when rounding.
+ * @returns {Function} Returns the new round function.
+ */
+ function createRound(methodName) {
+ var func = Math[methodName];
+ return function(number, precision) {
+ number = toNumber(number);
+ precision = toInteger(precision);
+ if (precision) {
+ // Shift with exponential notation to avoid floating-point issues.
+ // See [MDN](https://mdn.io/round#Examples) for more details.
+ var pair = (toString(number) + 'e').split('e'),
+ value = func(pair[0] + 'e' + (+pair[1] + precision));
+
+ pair = (toString(value) + 'e').split('e');
+ return +(pair[0] + 'e' + (+pair[1] - precision));
+ }
+ return func(number);
+ };
+ }
+
+ /**
+ * Creates a set of `values`.
+ *
+ * @private
+ * @param {Array} values The values to add to the set.
+ * @returns {Object} Returns the new set.
+ */
+ var createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) {
+ return new Set(values);
+ };
+
+ /**
+ * Creates a function that either curries or invokes `func` with optional
+ * `this` binding and partially applied arguments.
+ *
+ * @private
+ * @param {Function|string} func The function or method name to wrap.
+ * @param {number} bitmask The bitmask of wrapper flags.
+ * The bitmask may be composed of the following flags:
+ * 1 - `_.bind`
+ * 2 - `_.bindKey`
+ * 4 - `_.curry` or `_.curryRight` of a bound function
+ * 8 - `_.curry`
+ * 16 - `_.curryRight`
+ * 32 - `_.partial`
+ * 64 - `_.partialRight`
+ * 128 - `_.rearg`
+ * 256 - `_.ary`
+ * @param {*} [thisArg] The `this` binding of `func`.
+ * @param {Array} [partials] The arguments to be partially applied.
+ * @param {Array} [holders] The `partials` placeholder indexes.
+ * @param {Array} [argPos] The argument positions of the new function.
+ * @param {number} [ary] The arity cap of `func`.
+ * @param {number} [arity] The arity of `func`.
+ * @returns {Function} Returns the new wrapped function.
+ */
+ function createWrapper(func, bitmask, thisArg, partials, holders, argPos, ary, arity) {
+ var isBindKey = bitmask & BIND_KEY_FLAG;
+ if (!isBindKey && typeof func != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ var length = partials ? partials.length : 0;
+ if (!length) {
+ bitmask &= ~(PARTIAL_FLAG | PARTIAL_RIGHT_FLAG);
+ partials = holders = undefined;
+ }
+ ary = ary === undefined ? ary : nativeMax(toInteger(ary), 0);
+ arity = arity === undefined ? arity : toInteger(arity);
+ length -= holders ? holders.length : 0;
+
+ if (bitmask & PARTIAL_RIGHT_FLAG) {
+ var partialsRight = partials,
+ holdersRight = holders;
+
+ partials = holders = undefined;
+ }
+ var data = isBindKey ? undefined : getData(func);
+
+ var newData = [
+ func, bitmask, thisArg, partials, holders, partialsRight, holdersRight,
+ argPos, ary, arity
+ ];
+
+ if (data) {
+ mergeData(newData, data);
+ }
+ func = newData[0];
+ bitmask = newData[1];
+ thisArg = newData[2];
+ partials = newData[3];
+ holders = newData[4];
+ arity = newData[9] = newData[9] == null
+ ? (isBindKey ? 0 : func.length)
+ : nativeMax(newData[9] - length, 0);
+
+ if (!arity && bitmask & (CURRY_FLAG | CURRY_RIGHT_FLAG)) {
+ bitmask &= ~(CURRY_FLAG | CURRY_RIGHT_FLAG);
+ }
+ if (!bitmask || bitmask == BIND_FLAG) {
+ var result = createBaseWrapper(func, bitmask, thisArg);
+ } else if (bitmask == CURRY_FLAG || bitmask == CURRY_RIGHT_FLAG) {
+ result = createCurryWrapper(func, bitmask, arity);
+ } else if ((bitmask == PARTIAL_FLAG || bitmask == (BIND_FLAG | PARTIAL_FLAG)) && !holders.length) {
+ result = createPartialWrapper(func, bitmask, thisArg, partials);
+ } else {
+ result = createHybridWrapper.apply(undefined, newData);
+ }
+ var setter = data ? baseSetData : setData;
+ return setter(result, newData);
+ }
+
+ /**
+ * A specialized version of `baseIsEqualDeep` for arrays with support for
+ * partial deep comparisons.
+ *
+ * @private
+ * @param {Array} array The array to compare.
+ * @param {Array} other The other array to compare.
+ * @param {Function} equalFunc The function to determine equivalents of values.
+ * @param {Function} customizer The function to customize comparisons.
+ * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual`
+ * for more details.
+ * @param {Object} stack Tracks traversed `array` and `other` objects.
+ * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.
+ */
+ function equalArrays(array, other, equalFunc, customizer, bitmask, stack) {
+ var index = -1,
+ isPartial = bitmask & PARTIAL_COMPARE_FLAG,
+ isUnordered = bitmask & UNORDERED_COMPARE_FLAG,
+ arrLength = array.length,
+ othLength = other.length;
+
+ if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
+ return false;
+ }
+ // Assume cyclic values are equal.
+ var stacked = stack.get(array);
+ if (stacked) {
+ return stacked == other;
+ }
+ var result = true;
+ stack.set(array, other);
+
+ // Ignore non-index properties.
+ while (++index < arrLength) {
+ var arrValue = array[index],
+ othValue = other[index];
+
+ if (customizer) {
+ var compared = isPartial
+ ? customizer(othValue, arrValue, index, other, array, stack)
+ : customizer(arrValue, othValue, index, array, other, stack);
+ }
+ if (compared !== undefined) {
+ if (compared) {
+ continue;
+ }
+ result = false;
+ break;
+ }
+ // Recursively compare arrays (susceptible to call stack limits).
+ if (isUnordered) {
+ if (!arraySome(other, function(othValue) {
+ return arrValue === othValue ||
+ equalFunc(arrValue, othValue, customizer, bitmask, stack);
+ })) {
+ result = false;
+ break;
+ }
+ } else if (!(
+ arrValue === othValue ||
+ equalFunc(arrValue, othValue, customizer, bitmask, stack)
+ )) {
+ result = false;
+ break;
+ }
+ }
+ stack['delete'](array);
+ return result;
+ }
+
+ /**
+ * A specialized version of `baseIsEqualDeep` for comparing objects of
+ * the same `toStringTag`.
+ *
+ * **Note:** This function only supports comparing values with tags of
+ * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
+ *
+ * @private
+ * @param {Object} object The object to compare.
+ * @param {Object} other The other object to compare.
+ * @param {string} tag The `toStringTag` of the objects to compare.
+ * @param {Function} equalFunc The function to determine equivalents of values.
+ * @param {Function} customizer The function to customize comparisons.
+ * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual`
+ * for more details.
+ * @param {Object} stack Tracks traversed `object` and `other` objects.
+ * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
+ */
+ function equalByTag(object, other, tag, equalFunc, customizer, bitmask, stack) {
+ switch (tag) {
+ case dataViewTag:
+ if ((object.byteLength != other.byteLength) ||
+ (object.byteOffset != other.byteOffset)) {
+ return false;
+ }
+ object = object.buffer;
+ other = other.buffer;
+
+ case arrayBufferTag:
+ if ((object.byteLength != other.byteLength) ||
+ !equalFunc(new Uint8Array(object), new Uint8Array(other))) {
+ return false;
+ }
+ return true;
+
+ case boolTag:
+ case dateTag:
+ // Coerce dates and booleans to numbers, dates to milliseconds and
+ // booleans to `1` or `0` treating invalid dates coerced to `NaN` as
+ // not equal.
+ return +object == +other;
+
+ case errorTag:
+ return object.name == other.name && object.message == other.message;
+
+ case numberTag:
+ // Treat `NaN` vs. `NaN` as equal.
+ return (object != +object) ? other != +other : object == +other;
+
+ case regexpTag:
+ case stringTag:
+ // Coerce regexes to strings and treat strings, primitives and objects,
+ // as equal. See http://www.ecma-international.org/ecma-262/6.0/#sec-regexp.prototype.tostring
+ // for more details.
+ return object == (other + '');
+
+ case mapTag:
+ var convert = mapToArray;
+
+ case setTag:
+ var isPartial = bitmask & PARTIAL_COMPARE_FLAG;
+ convert || (convert = setToArray);
+
+ if (object.size != other.size && !isPartial) {
+ return false;
+ }
+ // Assume cyclic values are equal.
+ var stacked = stack.get(object);
+ if (stacked) {
+ return stacked == other;
+ }
+ bitmask |= UNORDERED_COMPARE_FLAG;
+ stack.set(object, other);
+
+ // Recursively compare objects (susceptible to call stack limits).
+ return equalArrays(convert(object), convert(other), equalFunc, customizer, bitmask, stack);
+
+ case symbolTag:
+ if (symbolValueOf) {
+ return symbolValueOf.call(object) == symbolValueOf.call(other);
+ }
+ }
+ return false;
+ }
+
+ /**
+ * A specialized version of `baseIsEqualDeep` for objects with support for
+ * partial deep comparisons.
+ *
+ * @private
+ * @param {Object} object The object to compare.
+ * @param {Object} other The other object to compare.
+ * @param {Function} equalFunc The function to determine equivalents of values.
+ * @param {Function} customizer The function to customize comparisons.
+ * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual`
+ * for more details.
+ * @param {Object} stack Tracks traversed `object` and `other` objects.
+ * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
+ */
+ function equalObjects(object, other, equalFunc, customizer, bitmask, stack) {
+ var isPartial = bitmask & PARTIAL_COMPARE_FLAG,
+ objProps = keys(object),
+ objLength = objProps.length,
+ othProps = keys(other),
+ othLength = othProps.length;
+
+ if (objLength != othLength && !isPartial) {
+ return false;
+ }
+ var index = objLength;
+ while (index--) {
+ var key = objProps[index];
+ if (!(isPartial ? key in other : baseHas(other, key))) {
+ return false;
+ }
+ }
+ // Assume cyclic values are equal.
+ var stacked = stack.get(object);
+ if (stacked) {
+ return stacked == other;
+ }
+ var result = true;
+ stack.set(object, other);
+
+ var skipCtor = isPartial;
+ while (++index < objLength) {
+ key = objProps[index];
+ var objValue = object[key],
+ othValue = other[key];
+
+ if (customizer) {
+ var compared = isPartial
+ ? customizer(othValue, objValue, key, other, object, stack)
+ : customizer(objValue, othValue, key, object, other, stack);
+ }
+ // Recursively compare objects (susceptible to call stack limits).
+ if (!(compared === undefined
+ ? (objValue === othValue || equalFunc(objValue, othValue, customizer, bitmask, stack))
+ : compared
+ )) {
+ result = false;
+ break;
+ }
+ skipCtor || (skipCtor = key == 'constructor');
+ }
+ if (result && !skipCtor) {
+ var objCtor = object.constructor,
+ othCtor = other.constructor;
+
+ // Non `Object` object instances with different constructors are not equal.
+ if (objCtor != othCtor &&
+ ('constructor' in object && 'constructor' in other) &&
+ !(typeof objCtor == 'function' && objCtor instanceof objCtor &&
+ typeof othCtor == 'function' && othCtor instanceof othCtor)) {
+ result = false;
+ }
+ }
+ stack['delete'](object);
+ return result;
+ }
+
+ /**
+ * Creates an array of own enumerable property names and symbols of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property names and symbols.
+ */
+ function getAllKeys(object) {
+ return baseGetAllKeys(object, keys, getSymbols);
+ }
+
+ /**
+ * Creates an array of own and inherited enumerable property names and
+ * symbols of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property names and symbols.
+ */
+ function getAllKeysIn(object) {
+ return baseGetAllKeys(object, keysIn, getSymbolsIn);
+ }
+
+ /**
+ * Gets metadata for `func`.
+ *
+ * @private
+ * @param {Function} func The function to query.
+ * @returns {*} Returns the metadata for `func`.
+ */
+ var getData = !metaMap ? noop : function(func) {
+ return metaMap.get(func);
+ };
+
+ /**
+ * Gets the name of `func`.
+ *
+ * @private
+ * @param {Function} func The function to query.
+ * @returns {string} Returns the function name.
+ */
+ function getFuncName(func) {
+ var result = (func.name + ''),
+ array = realNames[result],
+ length = hasOwnProperty.call(realNames, result) ? array.length : 0;
+
+ while (length--) {
+ var data = array[length],
+ otherFunc = data.func;
+ if (otherFunc == null || otherFunc == func) {
+ return data.name;
+ }
+ }
+ return result;
+ }
+
+ /**
+ * Gets the appropriate "iteratee" function. If `_.iteratee` is customized,
+ * this function returns the custom method, otherwise it returns `baseIteratee`.
+ * If arguments are provided, the chosen function is invoked with them and
+ * its result is returned.
+ *
+ * @private
+ * @param {*} [value] The value to convert to an iteratee.
+ * @param {number} [arity] The arity of the created iteratee.
+ * @returns {Function} Returns the chosen function or its result.
+ */
+ function getIteratee() {
+ var result = lodash.iteratee || iteratee;
+ result = result === iteratee ? baseIteratee : result;
+ return arguments.length ? result(arguments[0], arguments[1]) : result;
+ }
+
+ /**
+ * Gets the "length" property value of `object`.
+ *
+ * **Note:** This function is used to avoid a
+ * [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792) that affects
+ * Safari on at least iOS 8.1-8.3 ARM64.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {*} Returns the "length" value.
+ */
+ var getLength = baseProperty('length');
+
+ /**
+ * Gets the property names, values, and compare flags of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the match data of `object`.
+ */
+ function getMatchData(object) {
+ var result = toPairs(object),
+ length = result.length;
+
+ while (length--) {
+ result[length][2] = isStrictComparable(result[length][1]);
+ }
+ return result;
+ }
+
+ /**
+ * Gets the native function at `key` of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {string} key The key of the method to get.
+ * @returns {*} Returns the function if it's native, else `undefined`.
+ */
+ function getNative(object, key) {
+ var value = object[key];
+ return isNative(value) ? value : undefined;
+ }
+
+ /**
+ * Gets the argument placeholder value for `func`.
+ *
+ * @private
+ * @param {Function} func The function to inspect.
+ * @returns {*} Returns the placeholder value.
+ */
+ function getPlaceholder(func) {
+ var object = hasOwnProperty.call(lodash, 'placeholder') ? lodash : func;
+ return object.placeholder;
+ }
+
+ /**
+ * Gets the `[[Prototype]]` of `value`.
+ *
+ * @private
+ * @param {*} value The value to query.
+ * @returns {null|Object} Returns the `[[Prototype]]`.
+ */
+ function getPrototype(value) {
+ return nativeGetPrototype(Object(value));
+ }
+
+ /**
+ * Creates an array of the own enumerable symbol properties of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of symbols.
+ */
+ function getSymbols(object) {
+ // Coerce `object` to an object to avoid non-object errors in V8.
+ // See https://bugs.chromium.org/p/v8/issues/detail?id=3443 for more details.
+ return getOwnPropertySymbols(Object(object));
+ }
+
+ // Fallback for IE < 11.
+ if (!getOwnPropertySymbols) {
+ getSymbols = function() {
+ return [];
+ };
+ }
+
+ /**
+ * Creates an array of the own and inherited enumerable symbol properties
+ * of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of symbols.
+ */
+ var getSymbolsIn = !getOwnPropertySymbols ? getSymbols : function(object) {
+ var result = [];
+ while (object) {
+ arrayPush(result, getSymbols(object));
+ object = getPrototype(object);
+ }
+ return result;
+ };
+
+ /**
+ * Gets the `toStringTag` of `value`.
+ *
+ * @private
+ * @param {*} value The value to query.
+ * @returns {string} Returns the `toStringTag`.
+ */
+ function getTag(value) {
+ return objectToString.call(value);
+ }
+
+ // Fallback for data views, maps, sets, and weak maps in IE 11,
+ // for data views in Edge, and promises in Node.js.
+ if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||
+ (Map && getTag(new Map) != mapTag) ||
+ (Promise && getTag(Promise.resolve()) != promiseTag) ||
+ (Set && getTag(new Set) != setTag) ||
+ (WeakMap && getTag(new WeakMap) != weakMapTag)) {
+ getTag = function(value) {
+ var result = objectToString.call(value),
+ Ctor = result == objectTag ? value.constructor : undefined,
+ ctorString = Ctor ? toSource(Ctor) : undefined;
+
+ if (ctorString) {
+ switch (ctorString) {
+ case dataViewCtorString: return dataViewTag;
+ case mapCtorString: return mapTag;
+ case promiseCtorString: return promiseTag;
+ case setCtorString: return setTag;
+ case weakMapCtorString: return weakMapTag;
+ }
+ }
+ return result;
+ };
+ }
+
+ /**
+ * Gets the view, applying any `transforms` to the `start` and `end` positions.
+ *
+ * @private
+ * @param {number} start The start of the view.
+ * @param {number} end The end of the view.
+ * @param {Array} transforms The transformations to apply to the view.
+ * @returns {Object} Returns an object containing the `start` and `end`
+ * positions of the view.
+ */
+ function getView(start, end, transforms) {
+ var index = -1,
+ length = transforms.length;
+
+ while (++index < length) {
+ var data = transforms[index],
+ size = data.size;
+
+ switch (data.type) {
+ case 'drop': start += size; break;
+ case 'dropRight': end -= size; break;
+ case 'take': end = nativeMin(end, start + size); break;
+ case 'takeRight': start = nativeMax(start, end - size); break;
+ }
+ }
+ return { 'start': start, 'end': end };
+ }
+
+ /**
+ * Checks if `path` exists on `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {Array|string} path The path to check.
+ * @param {Function} hasFunc The function to check properties.
+ * @returns {boolean} Returns `true` if `path` exists, else `false`.
+ */
+ function hasPath(object, path, hasFunc) {
+ path = isKey(path, object) ? [path] : castPath(path);
+
+ var result,
+ index = -1,
+ length = path.length;
+
+ while (++index < length) {
+ var key = toKey(path[index]);
+ if (!(result = object != null && hasFunc(object, key))) {
+ break;
+ }
+ object = object[key];
+ }
+ if (result) {
+ return result;
+ }
+ var length = object ? object.length : 0;
+ return !!length && isLength(length) && isIndex(key, length) &&
+ (isArray(object) || isString(object) || isArguments(object));
+ }
+
+ /**
+ * Initializes an array clone.
+ *
+ * @private
+ * @param {Array} array The array to clone.
+ * @returns {Array} Returns the initialized clone.
+ */
+ function initCloneArray(array) {
+ var length = array.length,
+ result = array.constructor(length);
+
+ // Add properties assigned by `RegExp#exec`.
+ if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {
+ result.index = array.index;
+ result.input = array.input;
+ }
+ return result;
+ }
+
+ /**
+ * Initializes an object clone.
+ *
+ * @private
+ * @param {Object} object The object to clone.
+ * @returns {Object} Returns the initialized clone.
+ */
+ function initCloneObject(object) {
+ return (typeof object.constructor == 'function' && !isPrototype(object))
+ ? baseCreate(getPrototype(object))
+ : {};
+ }
+
+ /**
+ * Initializes an object clone based on its `toStringTag`.
+ *
+ * **Note:** This function only supports cloning values with tags of
+ * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
+ *
+ * @private
+ * @param {Object} object The object to clone.
+ * @param {string} tag The `toStringTag` of the object to clone.
+ * @param {Function} cloneFunc The function to clone values.
+ * @param {boolean} [isDeep] Specify a deep clone.
+ * @returns {Object} Returns the initialized clone.
+ */
+ function initCloneByTag(object, tag, cloneFunc, isDeep) {
+ var Ctor = object.constructor;
+ switch (tag) {
+ case arrayBufferTag:
+ return cloneArrayBuffer(object);
+
+ case boolTag:
+ case dateTag:
+ return new Ctor(+object);
+
+ case dataViewTag:
+ return cloneDataView(object, isDeep);
+
+ case float32Tag: case float64Tag:
+ case int8Tag: case int16Tag: case int32Tag:
+ case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:
+ return cloneTypedArray(object, isDeep);
+
+ case mapTag:
+ return cloneMap(object, isDeep, cloneFunc);
+
+ case numberTag:
+ case stringTag:
+ return new Ctor(object);
+
+ case regexpTag:
+ return cloneRegExp(object);
+
+ case setTag:
+ return cloneSet(object, isDeep, cloneFunc);
+
+ case symbolTag:
+ return cloneSymbol(object);
+ }
+ }
+
+ /**
+ * Creates an array of index keys for `object` values of arrays,
+ * `arguments` objects, and strings, otherwise `null` is returned.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array|null} Returns index keys, else `null`.
+ */
+ function indexKeys(object) {
+ var length = object ? object.length : undefined;
+ if (isLength(length) &&
+ (isArray(object) || isString(object) || isArguments(object))) {
+ return baseTimes(length, String);
+ }
+ return null;
+ }
+
+ /**
+ * Checks if `value` is a flattenable `arguments` object or array.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.
+ */
+ function isFlattenable(value) {
+ return isArrayLikeObject(value) && (isArray(value) || isArguments(value));
+ }
+
+ /**
+ * Checks if `value` is a flattenable array and not a `_.matchesProperty`
+ * iteratee shorthand.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.
+ */
+ function isFlattenableIteratee(value) {
+ return isArray(value) && !(value.length == 2 && !isFunction(value[0]));
+ }
+
+ /**
+ * Checks if `value` is a valid array-like index.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
+ * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
+ */
+ function isIndex(value, length) {
+ length = length == null ? MAX_SAFE_INTEGER : length;
+ return !!length &&
+ (typeof value == 'number' || reIsUint.test(value)) &&
+ (value > -1 && value % 1 == 0 && value < length);
+ }
+
+ /**
+ * Checks if the given arguments are from an iteratee call.
+ *
+ * @private
+ * @param {*} value The potential iteratee value argument.
+ * @param {*} index The potential iteratee index or key argument.
+ * @param {*} object The potential iteratee object argument.
+ * @returns {boolean} Returns `true` if the arguments are from an iteratee call,
+ * else `false`.
+ */
+ function isIterateeCall(value, index, object) {
+ if (!isObject(object)) {
+ return false;
+ }
+ var type = typeof index;
+ if (type == 'number'
+ ? (isArrayLike(object) && isIndex(index, object.length))
+ : (type == 'string' && index in object)
+ ) {
+ return eq(object[index], value);
+ }
+ return false;
+ }
+
+ /**
+ * Checks if `value` is a property name and not a property path.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @param {Object} [object] The object to query keys on.
+ * @returns {boolean} Returns `true` if `value` is a property name, else `false`.
+ */
+ function isKey(value, object) {
+ if (isArray(value)) {
+ return false;
+ }
+ var type = typeof value;
+ if (type == 'number' || type == 'symbol' || type == 'boolean' ||
+ value == null || isSymbol(value)) {
+ return true;
+ }
+ return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||
+ (object != null && value in Object(object));
+ }
+
+ /**
+ * Checks if `value` is suitable for use as unique object key.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
+ */
+ function isKeyable(value) {
+ var type = typeof value;
+ return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
+ ? (value !== '__proto__')
+ : (value === null);
+ }
+
+ /**
+ * Checks if `func` has a lazy counterpart.
+ *
+ * @private
+ * @param {Function} func The function to check.
+ * @returns {boolean} Returns `true` if `func` has a lazy counterpart,
+ * else `false`.
+ */
+ function isLaziable(func) {
+ var funcName = getFuncName(func),
+ other = lodash[funcName];
+
+ if (typeof other != 'function' || !(funcName in LazyWrapper.prototype)) {
+ return false;
+ }
+ if (func === other) {
+ return true;
+ }
+ var data = getData(other);
+ return !!data && func === data[0];
+ }
+
+ /**
+ * Checks if `value` is likely a prototype object.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
+ */
+ function isPrototype(value) {
+ var Ctor = value && value.constructor,
+ proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;
+
+ return value === proto;
+ }
+
+ /**
+ * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` if suitable for strict
+ * equality comparisons, else `false`.
+ */
+ function isStrictComparable(value) {
+ return value === value && !isObject(value);
+ }
+
+ /**
+ * A specialized version of `matchesProperty` for source values suitable
+ * for strict equality comparisons, i.e. `===`.
+ *
+ * @private
+ * @param {string} key The key of the property to get.
+ * @param {*} srcValue The value to match.
+ * @returns {Function} Returns the new function.
+ */
+ function matchesStrictComparable(key, srcValue) {
+ return function(object) {
+ if (object == null) {
+ return false;
+ }
+ return object[key] === srcValue &&
+ (srcValue !== undefined || (key in Object(object)));
+ };
+ }
+
+ /**
+ * Merges the function metadata of `source` into `data`.
+ *
+ * Merging metadata reduces the number of wrappers used to invoke a function.
+ * This is possible because methods like `_.bind`, `_.curry`, and `_.partial`
+ * may be applied regardless of execution order. Methods like `_.ary` and
+ * `_.rearg` modify function arguments, making the order in which they are
+ * executed important, preventing the merging of metadata. However, we make
+ * an exception for a safe combined case where curried functions have `_.ary`
+ * and or `_.rearg` applied.
+ *
+ * @private
+ * @param {Array} data The destination metadata.
+ * @param {Array} source The source metadata.
+ * @returns {Array} Returns `data`.
+ */
+ function mergeData(data, source) {
+ var bitmask = data[1],
+ srcBitmask = source[1],
+ newBitmask = bitmask | srcBitmask,
+ isCommon = newBitmask < (BIND_FLAG | BIND_KEY_FLAG | ARY_FLAG);
+
+ var isCombo =
+ ((srcBitmask == ARY_FLAG) && (bitmask == CURRY_FLAG)) ||
+ ((srcBitmask == ARY_FLAG) && (bitmask == REARG_FLAG) && (data[7].length <= source[8])) ||
+ ((srcBitmask == (ARY_FLAG | REARG_FLAG)) && (source[7].length <= source[8]) && (bitmask == CURRY_FLAG));
+
+ // Exit early if metadata can't be merged.
+ if (!(isCommon || isCombo)) {
+ return data;
+ }
+ // Use source `thisArg` if available.
+ if (srcBitmask & BIND_FLAG) {
+ data[2] = source[2];
+ // Set when currying a bound function.
+ newBitmask |= bitmask & BIND_FLAG ? 0 : CURRY_BOUND_FLAG;
+ }
+ // Compose partial arguments.
+ var value = source[3];
+ if (value) {
+ var partials = data[3];
+ data[3] = partials ? composeArgs(partials, value, source[4]) : value;
+ data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : source[4];
+ }
+ // Compose partial right arguments.
+ value = source[5];
+ if (value) {
+ partials = data[5];
+ data[5] = partials ? composeArgsRight(partials, value, source[6]) : value;
+ data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source[6];
+ }
+ // Use source `argPos` if available.
+ value = source[7];
+ if (value) {
+ data[7] = value;
+ }
+ // Use source `ary` if it's smaller.
+ if (srcBitmask & ARY_FLAG) {
+ data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]);
+ }
+ // Use source `arity` if one is not provided.
+ if (data[9] == null) {
+ data[9] = source[9];
+ }
+ // Use source `func` and merge bitmasks.
+ data[0] = source[0];
+ data[1] = newBitmask;
+
+ return data;
+ }
+
+ /**
+ * Used by `_.defaultsDeep` to customize its `_.merge` use.
+ *
+ * @private
+ * @param {*} objValue The destination value.
+ * @param {*} srcValue The source value.
+ * @param {string} key The key of the property to merge.
+ * @param {Object} object The parent object of `objValue`.
+ * @param {Object} source The parent object of `srcValue`.
+ * @param {Object} [stack] Tracks traversed source values and their merged
+ * counterparts.
+ * @returns {*} Returns the value to assign.
+ */
+ function mergeDefaults(objValue, srcValue, key, object, source, stack) {
+ if (isObject(objValue) && isObject(srcValue)) {
+ baseMerge(objValue, srcValue, undefined, mergeDefaults, stack.set(srcValue, objValue));
+ }
+ return objValue;
+ }
+
+ /**
+ * Gets the parent value at `path` of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {Array} path The path to get the parent value of.
+ * @returns {*} Returns the parent value.
+ */
+ function parent(object, path) {
+ return path.length == 1 ? object : baseGet(object, baseSlice(path, 0, -1));
+ }
+
+ /**
+ * Reorder `array` according to the specified indexes where the element at
+ * the first index is assigned as the first element, the element at
+ * the second index is assigned as the second element, and so on.
+ *
+ * @private
+ * @param {Array} array The array to reorder.
+ * @param {Array} indexes The arranged array indexes.
+ * @returns {Array} Returns `array`.
+ */
+ function reorder(array, indexes) {
+ var arrLength = array.length,
+ length = nativeMin(indexes.length, arrLength),
+ oldArray = copyArray(array);
+
+ while (length--) {
+ var index = indexes[length];
+ array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined;
+ }
+ return array;
+ }
+
+ /**
+ * Sets metadata for `func`.
+ *
+ * **Note:** If this function becomes hot, i.e. is invoked a lot in a short
+ * period of time, it will trip its breaker and transition to an identity
+ * function to avoid garbage collection pauses in V8. See
+ * [V8 issue 2070](https://bugs.chromium.org/p/v8/issues/detail?id=2070)
+ * for more details.
+ *
+ * @private
+ * @param {Function} func The function to associate metadata with.
+ * @param {*} data The metadata.
+ * @returns {Function} Returns `func`.
+ */
+ var setData = (function() {
+ var count = 0,
+ lastCalled = 0;
+
+ return function(key, value) {
+ var stamp = now(),
+ remaining = HOT_SPAN - (stamp - lastCalled);
+
+ lastCalled = stamp;
+ if (remaining > 0) {
+ if (++count >= HOT_COUNT) {
+ return key;
+ }
+ } else {
+ count = 0;
+ }
+ return baseSetData(key, value);
+ };
+ }());
+
+ /**
+ * Converts `string` to a property path array.
+ *
+ * @private
+ * @param {string} string The string to convert.
+ * @returns {Array} Returns the property path array.
+ */
+ var stringToPath = memoize(function(string) {
+ var result = [];
+ toString(string).replace(rePropName, function(match, number, quote, string) {
+ result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match));
+ });
+ return result;
+ });
+
+ /**
+ * Converts `value` to a string key if it's not a string or symbol.
+ *
+ * @private
+ * @param {*} value The value to inspect.
+ * @returns {string|symbol} Returns the key.
+ */
+ function toKey(value) {
+ if (typeof value == 'string' || isSymbol(value)) {
+ return value;
+ }
+ var result = (value + '');
+ return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
+ }
+
+ /**
+ * Converts `func` to its source code.
+ *
+ * @private
+ * @param {Function} func The function to process.
+ * @returns {string} Returns the source code.
+ */
+ function toSource(func) {
+ if (func != null) {
+ try {
+ return funcToString.call(func);
+ } catch (e) {}
+ try {
+ return (func + '');
+ } catch (e) {}
+ }
+ return '';
+ }
+
+ /**
+ * Creates a clone of `wrapper`.
+ *
+ * @private
+ * @param {Object} wrapper The wrapper to clone.
+ * @returns {Object} Returns the cloned wrapper.
+ */
+ function wrapperClone(wrapper) {
+ if (wrapper instanceof LazyWrapper) {
+ return wrapper.clone();
+ }
+ var result = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__);
+ result.__actions__ = copyArray(wrapper.__actions__);
+ result.__index__ = wrapper.__index__;
+ result.__values__ = wrapper.__values__;
+ return result;
+ }
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Creates an array of elements split into groups the length of `size`.
+ * If `array` can't be split evenly, the final chunk will be the remaining
+ * elements.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Array
+ * @param {Array} array The array to process.
+ * @param {number} [size=1] The length of each chunk
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {Array} Returns the new array containing chunks.
+ * @example
+ *
+ * _.chunk(['a', 'b', 'c', 'd'], 2);
+ * // => [['a', 'b'], ['c', 'd']]
+ *
+ * _.chunk(['a', 'b', 'c', 'd'], 3);
+ * // => [['a', 'b', 'c'], ['d']]
+ */
+ function chunk(array, size, guard) {
+ if ((guard ? isIterateeCall(array, size, guard) : size === undefined)) {
+ size = 1;
+ } else {
+ size = nativeMax(toInteger(size), 0);
+ }
+ var length = array ? array.length : 0;
+ if (!length || size < 1) {
+ return [];
+ }
+ var index = 0,
+ resIndex = 0,
+ result = Array(nativeCeil(length / size));
+
+ while (index < length) {
+ result[resIndex++] = baseSlice(array, index, (index += size));
+ }
+ return result;
+ }
+
+ /**
+ * Creates an array with all falsey values removed. The values `false`, `null`,
+ * `0`, `""`, `undefined`, and `NaN` are falsey.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {Array} array The array to compact.
+ * @returns {Array} Returns the new array of filtered values.
+ * @example
+ *
+ * _.compact([0, 1, false, 2, '', 3]);
+ * // => [1, 2, 3]
+ */
+ function compact(array) {
+ var index = -1,
+ length = array ? array.length : 0,
+ resIndex = 0,
+ result = [];
+
+ while (++index < length) {
+ var value = array[index];
+ if (value) {
+ result[resIndex++] = value;
+ }
+ }
+ return result;
+ }
+
+ /**
+ * Creates a new array concatenating `array` with any additional arrays
+ * and/or values.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to concatenate.
+ * @param {...*} [values] The values to concatenate.
+ * @returns {Array} Returns the new concatenated array.
+ * @example
+ *
+ * var array = [1];
+ * var other = _.concat(array, 2, [3], [[4]]);
+ *
+ * console.log(other);
+ * // => [1, 2, 3, [4]]
+ *
+ * console.log(array);
+ * // => [1]
+ */
+ function concat() {
+ var length = arguments.length,
+ array = castArray(arguments[0]);
+
+ if (length < 2) {
+ return length ? copyArray(array) : [];
+ }
+ var args = Array(length - 1);
+ while (length--) {
+ args[length - 1] = arguments[length];
+ }
+ return arrayConcat(array, baseFlatten(args, 1));
+ }
+
+ /**
+ * Creates an array of unique `array` values not included in the other given
+ * arrays using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
+ * for equality comparisons. The order of result values is determined by the
+ * order they occur in the first array.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @param {...Array} [values] The values to exclude.
+ * @returns {Array} Returns the new array of filtered values.
+ * @see _.without, _.xor
+ * @example
+ *
+ * _.difference([3, 2, 1], [4, 2]);
+ * // => [3, 1]
+ */
+ var difference = rest(function(array, values) {
+ return isArrayLikeObject(array)
+ ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true))
+ : [];
+ });
+
+ /**
+ * This method is like `_.difference` except that it accepts `iteratee` which
+ * is invoked for each element of `array` and `values` to generate the criterion
+ * by which they're compared. Result values are chosen from the first array.
+ * The iteratee is invoked with one argument: (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @param {...Array} [values] The values to exclude.
+ * @param {Array|Function|Object|string} [iteratee=_.identity]
+ * The iteratee invoked per element.
+ * @returns {Array} Returns the new array of filtered values.
+ * @example
+ *
+ * _.differenceBy([3.1, 2.2, 1.3], [4.4, 2.5], Math.floor);
+ * // => [3.1, 1.3]
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.differenceBy([{ 'x': 2 }, { 'x': 1 }], [{ 'x': 1 }], 'x');
+ * // => [{ 'x': 2 }]
+ */
+ var differenceBy = rest(function(array, values) {
+ var iteratee = last(values);
+ if (isArrayLikeObject(iteratee)) {
+ iteratee = undefined;
+ }
+ return isArrayLikeObject(array)
+ ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), getIteratee(iteratee))
+ : [];
+ });
+
+ /**
+ * This method is like `_.difference` except that it accepts `comparator`
+ * which is invoked to compare elements of `array` to `values`. Result values
+ * are chosen from the first array. The comparator is invoked with two arguments:
+ * (arrVal, othVal).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @param {...Array} [values] The values to exclude.
+ * @param {Function} [comparator] The comparator invoked per element.
+ * @returns {Array} Returns the new array of filtered values.
+ * @example
+ *
+ * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
+ *
+ * _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], _.isEqual);
+ * // => [{ 'x': 2, 'y': 1 }]
+ */
+ var differenceWith = rest(function(array, values) {
+ var comparator = last(values);
+ if (isArrayLikeObject(comparator)) {
+ comparator = undefined;
+ }
+ return isArrayLikeObject(array)
+ ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), undefined, comparator)
+ : [];
+ });
+
+ /**
+ * Creates a slice of `array` with `n` elements dropped from the beginning.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.5.0
+ * @category Array
+ * @param {Array} array The array to query.
+ * @param {number} [n=1] The number of elements to drop.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {Array} Returns the slice of `array`.
+ * @example
+ *
+ * _.drop([1, 2, 3]);
+ * // => [2, 3]
+ *
+ * _.drop([1, 2, 3], 2);
+ * // => [3]
+ *
+ * _.drop([1, 2, 3], 5);
+ * // => []
+ *
+ * _.drop([1, 2, 3], 0);
+ * // => [1, 2, 3]
+ */
+ function drop(array, n, guard) {
+ var length = array ? array.length : 0;
+ if (!length) {
+ return [];
+ }
+ n = (guard || n === undefined) ? 1 : toInteger(n);
+ return baseSlice(array, n < 0 ? 0 : n, length);
+ }
+
+ /**
+ * Creates a slice of `array` with `n` elements dropped from the end.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Array
+ * @param {Array} array The array to query.
+ * @param {number} [n=1] The number of elements to drop.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {Array} Returns the slice of `array`.
+ * @example
+ *
+ * _.dropRight([1, 2, 3]);
+ * // => [1, 2]
+ *
+ * _.dropRight([1, 2, 3], 2);
+ * // => [1]
+ *
+ * _.dropRight([1, 2, 3], 5);
+ * // => []
+ *
+ * _.dropRight([1, 2, 3], 0);
+ * // => [1, 2, 3]
+ */
+ function dropRight(array, n, guard) {
+ var length = array ? array.length : 0;
+ if (!length) {
+ return [];
+ }
+ n = (guard || n === undefined) ? 1 : toInteger(n);
+ n = length - n;
+ return baseSlice(array, 0, n < 0 ? 0 : n);
+ }
+
+ /**
+ * Creates a slice of `array` excluding elements dropped from the end.
+ * Elements are dropped until `predicate` returns falsey. The predicate is
+ * invoked with three arguments: (value, index, array).
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Array
+ * @param {Array} array The array to query.
+ * @param {Array|Function|Object|string} [predicate=_.identity]
+ * The function invoked per iteration.
+ * @returns {Array} Returns the slice of `array`.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'active': true },
+ * { 'user': 'fred', 'active': false },
+ * { 'user': 'pebbles', 'active': false }
+ * ];
+ *
+ * _.dropRightWhile(users, function(o) { return !o.active; });
+ * // => objects for ['barney']
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.dropRightWhile(users, { 'user': 'pebbles', 'active': false });
+ * // => objects for ['barney', 'fred']
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.dropRightWhile(users, ['active', false]);
+ * // => objects for ['barney']
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.dropRightWhile(users, 'active');
+ * // => objects for ['barney', 'fred', 'pebbles']
+ */
+ function dropRightWhile(array, predicate) {
+ return (array && array.length)
+ ? baseWhile(array, getIteratee(predicate, 3), true, true)
+ : [];
+ }
+
+ /**
+ * Creates a slice of `array` excluding elements dropped from the beginning.
+ * Elements are dropped until `predicate` returns falsey. The predicate is
+ * invoked with three arguments: (value, index, array).
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Array
+ * @param {Array} array The array to query.
+ * @param {Array|Function|Object|string} [predicate=_.identity]
+ * The function invoked per iteration.
+ * @returns {Array} Returns the slice of `array`.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'active': false },
+ * { 'user': 'fred', 'active': false },
+ * { 'user': 'pebbles', 'active': true }
+ * ];
+ *
+ * _.dropWhile(users, function(o) { return !o.active; });
+ * // => objects for ['pebbles']
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.dropWhile(users, { 'user': 'barney', 'active': false });
+ * // => objects for ['fred', 'pebbles']
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.dropWhile(users, ['active', false]);
+ * // => objects for ['pebbles']
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.dropWhile(users, 'active');
+ * // => objects for ['barney', 'fred', 'pebbles']
+ */
+ function dropWhile(array, predicate) {
+ return (array && array.length)
+ ? baseWhile(array, getIteratee(predicate, 3), true)
+ : [];
+ }
+
+ /**
+ * Fills elements of `array` with `value` from `start` up to, but not
+ * including, `end`.
+ *
+ * **Note:** This method mutates `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.2.0
+ * @category Array
+ * @param {Array} array The array to fill.
+ * @param {*} value The value to fill `array` with.
+ * @param {number} [start=0] The start position.
+ * @param {number} [end=array.length] The end position.
+ * @returns {Array} Returns `array`.
+ * @example
+ *
+ * var array = [1, 2, 3];
+ *
+ * _.fill(array, 'a');
+ * console.log(array);
+ * // => ['a', 'a', 'a']
+ *
+ * _.fill(Array(3), 2);
+ * // => [2, 2, 2]
+ *
+ * _.fill([4, 6, 8, 10], '*', 1, 3);
+ * // => [4, '*', '*', 10]
+ */
+ function fill(array, value, start, end) {
+ var length = array ? array.length : 0;
+ if (!length) {
+ return [];
+ }
+ if (start && typeof start != 'number' && isIterateeCall(array, value, start)) {
+ start = 0;
+ end = length;
+ }
+ return baseFill(array, value, start, end);
+ }
+
+ /**
+ * This method is like `_.find` except that it returns the index of the first
+ * element `predicate` returns truthy for instead of the element itself.
+ *
+ * @static
+ * @memberOf _
+ * @since 1.1.0
+ * @category Array
+ * @param {Array} array The array to search.
+ * @param {Array|Function|Object|string} [predicate=_.identity]
+ * The function invoked per iteration.
+ * @returns {number} Returns the index of the found element, else `-1`.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'active': false },
+ * { 'user': 'fred', 'active': false },
+ * { 'user': 'pebbles', 'active': true }
+ * ];
+ *
+ * _.findIndex(users, function(o) { return o.user == 'barney'; });
+ * // => 0
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.findIndex(users, { 'user': 'fred', 'active': false });
+ * // => 1
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.findIndex(users, ['active', false]);
+ * // => 0
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.findIndex(users, 'active');
+ * // => 2
+ */
+ function findIndex(array, predicate) {
+ return (array && array.length)
+ ? baseFindIndex(array, getIteratee(predicate, 3))
+ : -1;
+ }
+
+ /**
+ * This method is like `_.findIndex` except that it iterates over elements
+ * of `collection` from right to left.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.0.0
+ * @category Array
+ * @param {Array} array The array to search.
+ * @param {Array|Function|Object|string} [predicate=_.identity]
+ * The function invoked per iteration.
+ * @returns {number} Returns the index of the found element, else `-1`.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'active': true },
+ * { 'user': 'fred', 'active': false },
+ * { 'user': 'pebbles', 'active': false }
+ * ];
+ *
+ * _.findLastIndex(users, function(o) { return o.user == 'pebbles'; });
+ * // => 2
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.findLastIndex(users, { 'user': 'barney', 'active': true });
+ * // => 0
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.findLastIndex(users, ['active', false]);
+ * // => 2
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.findLastIndex(users, 'active');
+ * // => 0
+ */
+ function findLastIndex(array, predicate) {
+ return (array && array.length)
+ ? baseFindIndex(array, getIteratee(predicate, 3), true)
+ : -1;
+ }
+
+ /**
+ * Flattens `array` a single level deep.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {Array} array The array to flatten.
+ * @returns {Array} Returns the new flattened array.
+ * @example
+ *
+ * _.flatten([1, [2, [3, [4]], 5]]);
+ * // => [1, 2, [3, [4]], 5]
+ */
+ function flatten(array) {
+ var length = array ? array.length : 0;
+ return length ? baseFlatten(array, 1) : [];
+ }
+
+ /**
+ * Recursively flattens `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Array
+ * @param {Array} array The array to flatten.
+ * @returns {Array} Returns the new flattened array.
+ * @example
+ *
+ * _.flattenDeep([1, [2, [3, [4]], 5]]);
+ * // => [1, 2, 3, 4, 5]
+ */
+ function flattenDeep(array) {
+ var length = array ? array.length : 0;
+ return length ? baseFlatten(array, INFINITY) : [];
+ }
+
+ /**
+ * Recursively flatten `array` up to `depth` times.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.4.0
+ * @category Array
+ * @param {Array} array The array to flatten.
+ * @param {number} [depth=1] The maximum recursion depth.
+ * @returns {Array} Returns the new flattened array.
+ * @example
+ *
+ * var array = [1, [2, [3, [4]], 5]];
+ *
+ * _.flattenDepth(array, 1);
+ * // => [1, 2, [3, [4]], 5]
+ *
+ * _.flattenDepth(array, 2);
+ * // => [1, 2, 3, [4], 5]
+ */
+ function flattenDepth(array, depth) {
+ var length = array ? array.length : 0;
+ if (!length) {
+ return [];
+ }
+ depth = depth === undefined ? 1 : toInteger(depth);
+ return baseFlatten(array, depth);
+ }
+
+ /**
+ * The inverse of `_.toPairs`; this method returns an object composed
+ * from key-value `pairs`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} pairs The key-value pairs.
+ * @returns {Object} Returns the new object.
+ * @example
+ *
+ * _.fromPairs([['fred', 30], ['barney', 40]]);
+ * // => { 'fred': 30, 'barney': 40 }
+ */
+ function fromPairs(pairs) {
+ var index = -1,
+ length = pairs ? pairs.length : 0,
+ result = {};
+
+ while (++index < length) {
+ var pair = pairs[index];
+ result[pair[0]] = pair[1];
+ }
+ return result;
+ }
+
+ /**
+ * Gets the first element of `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @alias first
+ * @category Array
+ * @param {Array} array The array to query.
+ * @returns {*} Returns the first element of `array`.
+ * @example
+ *
+ * _.head([1, 2, 3]);
+ * // => 1
+ *
+ * _.head([]);
+ * // => undefined
+ */
+ function head(array) {
+ return (array && array.length) ? array[0] : undefined;
+ }
+
+ /**
+ * Gets the index at which the first occurrence of `value` is found in `array`
+ * using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
+ * for equality comparisons. If `fromIndex` is negative, it's used as the
+ * offset from the end of `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {Array} array The array to search.
+ * @param {*} value The value to search for.
+ * @param {number} [fromIndex=0] The index to search from.
+ * @returns {number} Returns the index of the matched value, else `-1`.
+ * @example
+ *
+ * _.indexOf([1, 2, 1, 2], 2);
+ * // => 1
+ *
+ * // Search from the `fromIndex`.
+ * _.indexOf([1, 2, 1, 2], 2, 2);
+ * // => 3
+ */
+ function indexOf(array, value, fromIndex) {
+ var length = array ? array.length : 0;
+ if (!length) {
+ return -1;
+ }
+ fromIndex = toInteger(fromIndex);
+ if (fromIndex < 0) {
+ fromIndex = nativeMax(length + fromIndex, 0);
+ }
+ return baseIndexOf(array, value, fromIndex);
+ }
+
+ /**
+ * Gets all but the last element of `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {Array} array The array to query.
+ * @returns {Array} Returns the slice of `array`.
+ * @example
+ *
+ * _.initial([1, 2, 3]);
+ * // => [1, 2]
+ */
+ function initial(array) {
+ return dropRight(array, 1);
+ }
+
+ /**
+ * Creates an array of unique values that are included in all given arrays
+ * using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
+ * for equality comparisons. The order of result values is determined by the
+ * order they occur in the first array.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {...Array} [arrays] The arrays to inspect.
+ * @returns {Array} Returns the new array of intersecting values.
+ * @example
+ *
+ * _.intersection([2, 1], [4, 2], [1, 2]);
+ * // => [2]
+ */
+ var intersection = rest(function(arrays) {
+ var mapped = arrayMap(arrays, castArrayLikeObject);
+ return (mapped.length && mapped[0] === arrays[0])
+ ? baseIntersection(mapped)
+ : [];
+ });
+
+ /**
+ * This method is like `_.intersection` except that it accepts `iteratee`
+ * which is invoked for each element of each `arrays` to generate the criterion
+ * by which they're compared. Result values are chosen from the first array.
+ * The iteratee is invoked with one argument: (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {...Array} [arrays] The arrays to inspect.
+ * @param {Array|Function|Object|string} [iteratee=_.identity]
+ * The iteratee invoked per element.
+ * @returns {Array} Returns the new array of intersecting values.
+ * @example
+ *
+ * _.intersectionBy([2.1, 1.2], [4.3, 2.4], Math.floor);
+ * // => [2.1]
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
+ * // => [{ 'x': 1 }]
+ */
+ var intersectionBy = rest(function(arrays) {
+ var iteratee = last(arrays),
+ mapped = arrayMap(arrays, castArrayLikeObject);
+
+ if (iteratee === last(mapped)) {
+ iteratee = undefined;
+ } else {
+ mapped.pop();
+ }
+ return (mapped.length && mapped[0] === arrays[0])
+ ? baseIntersection(mapped, getIteratee(iteratee))
+ : [];
+ });
+
+ /**
+ * This method is like `_.intersection` except that it accepts `comparator`
+ * which is invoked to compare elements of `arrays`. Result values are chosen
+ * from the first array. The comparator is invoked with two arguments:
+ * (arrVal, othVal).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {...Array} [arrays] The arrays to inspect.
+ * @param {Function} [comparator] The comparator invoked per element.
+ * @returns {Array} Returns the new array of intersecting values.
+ * @example
+ *
+ * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
+ * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];
+ *
+ * _.intersectionWith(objects, others, _.isEqual);
+ * // => [{ 'x': 1, 'y': 2 }]
+ */
+ var intersectionWith = rest(function(arrays) {
+ var comparator = last(arrays),
+ mapped = arrayMap(arrays, castArrayLikeObject);
+
+ if (comparator === last(mapped)) {
+ comparator = undefined;
+ } else {
+ mapped.pop();
+ }
+ return (mapped.length && mapped[0] === arrays[0])
+ ? baseIntersection(mapped, undefined, comparator)
+ : [];
+ });
+
+ /**
+ * Converts all elements in `array` into a string separated by `separator`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to convert.
+ * @param {string} [separator=','] The element separator.
+ * @returns {string} Returns the joined string.
+ * @example
+ *
+ * _.join(['a', 'b', 'c'], '~');
+ * // => 'a~b~c'
+ */
+ function join(array, separator) {
+ return array ? nativeJoin.call(array, separator) : '';
+ }
+
+ /**
+ * Gets the last element of `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {Array} array The array to query.
+ * @returns {*} Returns the last element of `array`.
+ * @example
+ *
+ * _.last([1, 2, 3]);
+ * // => 3
+ */
+ function last(array) {
+ var length = array ? array.length : 0;
+ return length ? array[length - 1] : undefined;
+ }
+
+ /**
+ * This method is like `_.indexOf` except that it iterates over elements of
+ * `array` from right to left.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {Array} array The array to search.
+ * @param {*} value The value to search for.
+ * @param {number} [fromIndex=array.length-1] The index to search from.
+ * @returns {number} Returns the index of the matched value, else `-1`.
+ * @example
+ *
+ * _.lastIndexOf([1, 2, 1, 2], 2);
+ * // => 3
+ *
+ * // Search from the `fromIndex`.
+ * _.lastIndexOf([1, 2, 1, 2], 2, 2);
+ * // => 1
+ */
+ function lastIndexOf(array, value, fromIndex) {
+ var length = array ? array.length : 0;
+ if (!length) {
+ return -1;
+ }
+ var index = length;
+ if (fromIndex !== undefined) {
+ index = toInteger(fromIndex);
+ index = (
+ index < 0
+ ? nativeMax(length + index, 0)
+ : nativeMin(index, length - 1)
+ ) + 1;
+ }
+ if (value !== value) {
+ return indexOfNaN(array, index, true);
+ }
+ while (index--) {
+ if (array[index] === value) {
+ return index;
+ }
+ }
+ return -1;
+ }
+
+ /**
+ * Gets the nth element of `array`. If `n` is negative, the nth element
+ * from the end is returned.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.11.0
+ * @category Array
+ * @param {Array} array The array to query.
+ * @param {number} [n=0] The index of the element to return.
+ * @returns {*} Returns the nth element of `array`.
+ * @example
+ *
+ * var array = ['a', 'b', 'c', 'd'];
+ *
+ * _.nth(array, 1);
+ * // => 'b'
+ *
+ * _.nth(array, -2);
+ * // => 'c';
+ */
+ function nth(array, n) {
+ return (array && array.length) ? baseNth(array, toInteger(n)) : undefined;
+ }
+
+ /**
+ * Removes all given values from `array` using
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
+ * for equality comparisons.
+ *
+ * **Note:** Unlike `_.without`, this method mutates `array`. Use `_.remove`
+ * to remove elements from an array by predicate.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.0.0
+ * @category Array
+ * @param {Array} array The array to modify.
+ * @param {...*} [values] The values to remove.
+ * @returns {Array} Returns `array`.
+ * @example
+ *
+ * var array = [1, 2, 3, 1, 2, 3];
+ *
+ * _.pull(array, 2, 3);
+ * console.log(array);
+ * // => [1, 1]
+ */
+ var pull = rest(pullAll);
+
+ /**
+ * This method is like `_.pull` except that it accepts an array of values to remove.
+ *
+ * **Note:** Unlike `_.difference`, this method mutates `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to modify.
+ * @param {Array} values The values to remove.
+ * @returns {Array} Returns `array`.
+ * @example
+ *
+ * var array = [1, 2, 3, 1, 2, 3];
+ *
+ * _.pullAll(array, [2, 3]);
+ * console.log(array);
+ * // => [1, 1]
+ */
+ function pullAll(array, values) {
+ return (array && array.length && values && values.length)
+ ? basePullAll(array, values)
+ : array;
+ }
+
+ /**
+ * This method is like `_.pullAll` except that it accepts `iteratee` which is
+ * invoked for each element of `array` and `values` to generate the criterion
+ * by which they're compared. The iteratee is invoked with one argument: (value).
+ *
+ * **Note:** Unlike `_.differenceBy`, this method mutates `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to modify.
+ * @param {Array} values The values to remove.
+ * @param {Array|Function|Object|string} [iteratee=_.identity]
+ * The iteratee invoked per element.
+ * @returns {Array} Returns `array`.
+ * @example
+ *
+ * var array = [{ 'x': 1 }, { 'x': 2 }, { 'x': 3 }, { 'x': 1 }];
+ *
+ * _.pullAllBy(array, [{ 'x': 1 }, { 'x': 3 }], 'x');
+ * console.log(array);
+ * // => [{ 'x': 2 }]
+ */
+ function pullAllBy(array, values, iteratee) {
+ return (array && array.length && values && values.length)
+ ? basePullAll(array, values, getIteratee(iteratee))
+ : array;
+ }
+
+ /**
+ * This method is like `_.pullAll` except that it accepts `comparator` which
+ * is invoked to compare elements of `array` to `values`. The comparator is
+ * invoked with two arguments: (arrVal, othVal).
+ *
+ * **Note:** Unlike `_.differenceWith`, this method mutates `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.6.0
+ * @category Array
+ * @param {Array} array The array to modify.
+ * @param {Array} values The values to remove.
+ * @param {Function} [comparator] The comparator invoked per element.
+ * @returns {Array} Returns `array`.
+ * @example
+ *
+ * var array = [{ 'x': 1, 'y': 2 }, { 'x': 3, 'y': 4 }, { 'x': 5, 'y': 6 }];
+ *
+ * _.pullAllWith(array, [{ 'x': 3, 'y': 4 }], _.isEqual);
+ * console.log(array);
+ * // => [{ 'x': 1, 'y': 2 }, { 'x': 5, 'y': 6 }]
+ */
+ function pullAllWith(array, values, comparator) {
+ return (array && array.length && values && values.length)
+ ? basePullAll(array, values, undefined, comparator)
+ : array;
+ }
+
+ /**
+ * Removes elements from `array` corresponding to `indexes` and returns an
+ * array of removed elements.
+ *
+ * **Note:** Unlike `_.at`, this method mutates `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Array
+ * @param {Array} array The array to modify.
+ * @param {...(number|number[])} [indexes] The indexes of elements to remove.
+ * @returns {Array} Returns the new array of removed elements.
+ * @example
+ *
+ * var array = [5, 10, 15, 20];
+ * var evens = _.pullAt(array, 1, 3);
+ *
+ * console.log(array);
+ * // => [5, 15]
+ *
+ * console.log(evens);
+ * // => [10, 20]
+ */
+ var pullAt = rest(function(array, indexes) {
+ indexes = baseFlatten(indexes, 1);
+
+ var length = array ? array.length : 0,
+ result = baseAt(array, indexes);
+
+ basePullAt(array, arrayMap(indexes, function(index) {
+ return isIndex(index, length) ? +index : index;
+ }).sort(compareAscending));
+
+ return result;
+ });
+
+ /**
+ * Removes all elements from `array` that `predicate` returns truthy for
+ * and returns an array of the removed elements. The predicate is invoked
+ * with three arguments: (value, index, array).
+ *
+ * **Note:** Unlike `_.filter`, this method mutates `array`. Use `_.pull`
+ * to pull elements from an array by value.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.0.0
+ * @category Array
+ * @param {Array} array The array to modify.
+ * @param {Array|Function|Object|string} [predicate=_.identity]
+ * The function invoked per iteration.
+ * @returns {Array} Returns the new array of removed elements.
+ * @example
+ *
+ * var array = [1, 2, 3, 4];
+ * var evens = _.remove(array, function(n) {
+ * return n % 2 == 0;
+ * });
+ *
+ * console.log(array);
+ * // => [1, 3]
+ *
+ * console.log(evens);
+ * // => [2, 4]
+ */
+ function remove(array, predicate) {
+ var result = [];
+ if (!(array && array.length)) {
+ return result;
+ }
+ var index = -1,
+ indexes = [],
+ length = array.length;
+
+ predicate = getIteratee(predicate, 3);
+ while (++index < length) {
+ var value = array[index];
+ if (predicate(value, index, array)) {
+ result.push(value);
+ indexes.push(index);
+ }
+ }
+ basePullAt(array, indexes);
+ return result;
+ }
+
+ /**
+ * Reverses `array` so that the first element becomes the last, the second
+ * element becomes the second to last, and so on.
+ *
+ * **Note:** This method mutates `array` and is based on
+ * [`Array#reverse`](https://mdn.io/Array/reverse).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to modify.
+ * @returns {Array} Returns `array`.
+ * @example
+ *
+ * var array = [1, 2, 3];
+ *
+ * _.reverse(array);
+ * // => [3, 2, 1]
+ *
+ * console.log(array);
+ * // => [3, 2, 1]
+ */
+ function reverse(array) {
+ return array ? nativeReverse.call(array) : array;
+ }
+
+ /**
+ * Creates a slice of `array` from `start` up to, but not including, `end`.
+ *
+ * **Note:** This method is used instead of
+ * [`Array#slice`](https://mdn.io/Array/slice) to ensure dense arrays are
+ * returned.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Array
+ * @param {Array} array The array to slice.
+ * @param {number} [start=0] The start position.
+ * @param {number} [end=array.length] The end position.
+ * @returns {Array} Returns the slice of `array`.
+ */
+ function slice(array, start, end) {
+ var length = array ? array.length : 0;
+ if (!length) {
+ return [];
+ }
+ if (end && typeof end != 'number' && isIterateeCall(array, start, end)) {
+ start = 0;
+ end = length;
+ }
+ else {
+ start = start == null ? 0 : toInteger(start);
+ end = end === undefined ? length : toInteger(end);
+ }
+ return baseSlice(array, start, end);
+ }
+
+ /**
+ * Uses a binary search to determine the lowest index at which `value`
+ * should be inserted into `array` in order to maintain its sort order.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {Array} array The sorted array to inspect.
+ * @param {*} value The value to evaluate.
+ * @returns {number} Returns the index at which `value` should be inserted
+ * into `array`.
+ * @example
+ *
+ * _.sortedIndex([30, 50], 40);
+ * // => 1
+ *
+ * _.sortedIndex([4, 5], 4);
+ * // => 0
+ */
+ function sortedIndex(array, value) {
+ return baseSortedIndex(array, value);
+ }
+
+ /**
+ * This method is like `_.sortedIndex` except that it accepts `iteratee`
+ * which is invoked for `value` and each element of `array` to compute their
+ * sort ranking. The iteratee is invoked with one argument: (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The sorted array to inspect.
+ * @param {*} value The value to evaluate.
+ * @param {Array|Function|Object|string} [iteratee=_.identity]
+ * The iteratee invoked per element.
+ * @returns {number} Returns the index at which `value` should be inserted
+ * into `array`.
+ * @example
+ *
+ * var dict = { 'thirty': 30, 'forty': 40, 'fifty': 50 };
+ *
+ * _.sortedIndexBy(['thirty', 'fifty'], 'forty', _.propertyOf(dict));
+ * // => 1
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.sortedIndexBy([{ 'x': 4 }, { 'x': 5 }], { 'x': 4 }, 'x');
+ * // => 0
+ */
+ function sortedIndexBy(array, value, iteratee) {
+ return baseSortedIndexBy(array, value, getIteratee(iteratee));
+ }
+
+ /**
+ * This method is like `_.indexOf` except that it performs a binary
+ * search on a sorted `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to search.
+ * @param {*} value The value to search for.
+ * @returns {number} Returns the index of the matched value, else `-1`.
+ * @example
+ *
+ * _.sortedIndexOf([1, 1, 2, 2], 2);
+ * // => 2
+ */
+ function sortedIndexOf(array, value) {
+ var length = array ? array.length : 0;
+ if (length) {
+ var index = baseSortedIndex(array, value);
+ if (index < length && eq(array[index], value)) {
+ return index;
+ }
+ }
+ return -1;
+ }
+
+ /**
+ * This method is like `_.sortedIndex` except that it returns the highest
+ * index at which `value` should be inserted into `array` in order to
+ * maintain its sort order.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Array
+ * @param {Array} array The sorted array to inspect.
+ * @param {*} value The value to evaluate.
+ * @returns {number} Returns the index at which `value` should be inserted
+ * into `array`.
+ * @example
+ *
+ * _.sortedLastIndex([4, 5], 4);
+ * // => 1
+ */
+ function sortedLastIndex(array, value) {
+ return baseSortedIndex(array, value, true);
+ }
+
+ /**
+ * This method is like `_.sortedLastIndex` except that it accepts `iteratee`
+ * which is invoked for `value` and each element of `array` to compute their
+ * sort ranking. The iteratee is invoked with one argument: (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The sorted array to inspect.
+ * @param {*} value The value to evaluate.
+ * @param {Array|Function|Object|string} [iteratee=_.identity]
+ * The iteratee invoked per element.
+ * @returns {number} Returns the index at which `value` should be inserted
+ * into `array`.
+ * @example
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.sortedLastIndexBy([{ 'x': 4 }, { 'x': 5 }], { 'x': 4 }, 'x');
+ * // => 1
+ */
+ function sortedLastIndexBy(array, value, iteratee) {
+ return baseSortedIndexBy(array, value, getIteratee(iteratee), true);
+ }
+
+ /**
+ * This method is like `_.lastIndexOf` except that it performs a binary
+ * search on a sorted `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to search.
+ * @param {*} value The value to search for.
+ * @returns {number} Returns the index of the matched value, else `-1`.
+ * @example
+ *
+ * _.sortedLastIndexOf([1, 1, 2, 2], 2);
+ * // => 3
+ */
+ function sortedLastIndexOf(array, value) {
+ var length = array ? array.length : 0;
+ if (length) {
+ var index = baseSortedIndex(array, value, true) - 1;
+ if (eq(array[index], value)) {
+ return index;
+ }
+ }
+ return -1;
+ }
+
+ /**
+ * This method is like `_.uniq` except that it's designed and optimized
+ * for sorted arrays.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @returns {Array} Returns the new duplicate free array.
+ * @example
+ *
+ * _.sortedUniq([1, 1, 2]);
+ * // => [1, 2]
+ */
+ function sortedUniq(array) {
+ return (array && array.length)
+ ? baseSortedUniq(array)
+ : [];
+ }
+
+ /**
+ * This method is like `_.uniqBy` except that it's designed and optimized
+ * for sorted arrays.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @param {Function} [iteratee] The iteratee invoked per element.
+ * @returns {Array} Returns the new duplicate free array.
+ * @example
+ *
+ * _.sortedUniqBy([1.1, 1.2, 2.3, 2.4], Math.floor);
+ * // => [1.1, 2.3]
+ */
+ function sortedUniqBy(array, iteratee) {
+ return (array && array.length)
+ ? baseSortedUniq(array, getIteratee(iteratee))
+ : [];
+ }
+
+ /**
+ * Gets all but the first element of `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to query.
+ * @returns {Array} Returns the slice of `array`.
+ * @example
+ *
+ * _.tail([1, 2, 3]);
+ * // => [2, 3]
+ */
+ function tail(array) {
+ return drop(array, 1);
+ }
+
+ /**
+ * Creates a slice of `array` with `n` elements taken from the beginning.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {Array} array The array to query.
+ * @param {number} [n=1] The number of elements to take.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {Array} Returns the slice of `array`.
+ * @example
+ *
+ * _.take([1, 2, 3]);
+ * // => [1]
+ *
+ * _.take([1, 2, 3], 2);
+ * // => [1, 2]
+ *
+ * _.take([1, 2, 3], 5);
+ * // => [1, 2, 3]
+ *
+ * _.take([1, 2, 3], 0);
+ * // => []
+ */
+ function take(array, n, guard) {
+ if (!(array && array.length)) {
+ return [];
+ }
+ n = (guard || n === undefined) ? 1 : toInteger(n);
+ return baseSlice(array, 0, n < 0 ? 0 : n);
+ }
+
+ /**
+ * Creates a slice of `array` with `n` elements taken from the end.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Array
+ * @param {Array} array The array to query.
+ * @param {number} [n=1] The number of elements to take.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {Array} Returns the slice of `array`.
+ * @example
+ *
+ * _.takeRight([1, 2, 3]);
+ * // => [3]
+ *
+ * _.takeRight([1, 2, 3], 2);
+ * // => [2, 3]
+ *
+ * _.takeRight([1, 2, 3], 5);
+ * // => [1, 2, 3]
+ *
+ * _.takeRight([1, 2, 3], 0);
+ * // => []
+ */
+ function takeRight(array, n, guard) {
+ var length = array ? array.length : 0;
+ if (!length) {
+ return [];
+ }
+ n = (guard || n === undefined) ? 1 : toInteger(n);
+ n = length - n;
+ return baseSlice(array, n < 0 ? 0 : n, length);
+ }
+
+ /**
+ * Creates a slice of `array` with elements taken from the end. Elements are
+ * taken until `predicate` returns falsey. The predicate is invoked with
+ * three arguments: (value, index, array).
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Array
+ * @param {Array} array The array to query.
+ * @param {Array|Function|Object|string} [predicate=_.identity]
+ * The function invoked per iteration.
+ * @returns {Array} Returns the slice of `array`.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'active': true },
+ * { 'user': 'fred', 'active': false },
+ * { 'user': 'pebbles', 'active': false }
+ * ];
+ *
+ * _.takeRightWhile(users, function(o) { return !o.active; });
+ * // => objects for ['fred', 'pebbles']
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.takeRightWhile(users, { 'user': 'pebbles', 'active': false });
+ * // => objects for ['pebbles']
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.takeRightWhile(users, ['active', false]);
+ * // => objects for ['fred', 'pebbles']
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.takeRightWhile(users, 'active');
+ * // => []
+ */
+ function takeRightWhile(array, predicate) {
+ return (array && array.length)
+ ? baseWhile(array, getIteratee(predicate, 3), false, true)
+ : [];
+ }
+
+ /**
+ * Creates a slice of `array` with elements taken from the beginning. Elements
+ * are taken until `predicate` returns falsey. The predicate is invoked with
+ * three arguments: (value, index, array).
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Array
+ * @param {Array} array The array to query.
+ * @param {Array|Function|Object|string} [predicate=_.identity]
+ * The function invoked per iteration.
+ * @returns {Array} Returns the slice of `array`.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'active': false },
+ * { 'user': 'fred', 'active': false},
+ * { 'user': 'pebbles', 'active': true }
+ * ];
+ *
+ * _.takeWhile(users, function(o) { return !o.active; });
+ * // => objects for ['barney', 'fred']
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.takeWhile(users, { 'user': 'barney', 'active': false });
+ * // => objects for ['barney']
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.takeWhile(users, ['active', false]);
+ * // => objects for ['barney', 'fred']
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.takeWhile(users, 'active');
+ * // => []
+ */
+ function takeWhile(array, predicate) {
+ return (array && array.length)
+ ? baseWhile(array, getIteratee(predicate, 3))
+ : [];
+ }
+
+ /**
+ * Creates an array of unique values, in order, from all given arrays using
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
+ * for equality comparisons.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {...Array} [arrays] The arrays to inspect.
+ * @returns {Array} Returns the new array of combined values.
+ * @example
+ *
+ * _.union([2, 1], [4, 2], [1, 2]);
+ * // => [2, 1, 4]
+ */
+ var union = rest(function(arrays) {
+ return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true));
+ });
+
+ /**
+ * This method is like `_.union` except that it accepts `iteratee` which is
+ * invoked for each element of each `arrays` to generate the criterion by
+ * which uniqueness is computed. The iteratee is invoked with one argument:
+ * (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {...Array} [arrays] The arrays to inspect.
+ * @param {Array|Function|Object|string} [iteratee=_.identity]
+ * The iteratee invoked per element.
+ * @returns {Array} Returns the new array of combined values.
+ * @example
+ *
+ * _.unionBy([2.1, 1.2], [4.3, 2.4], Math.floor);
+ * // => [2.1, 1.2, 4.3]
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.unionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
+ * // => [{ 'x': 1 }, { 'x': 2 }]
+ */
+ var unionBy = rest(function(arrays) {
+ var iteratee = last(arrays);
+ if (isArrayLikeObject(iteratee)) {
+ iteratee = undefined;
+ }
+ return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), getIteratee(iteratee));
+ });
+
+ /**
+ * This method is like `_.union` except that it accepts `comparator` which
+ * is invoked to compare elements of `arrays`. The comparator is invoked
+ * with two arguments: (arrVal, othVal).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {...Array} [arrays] The arrays to inspect.
+ * @param {Function} [comparator] The comparator invoked per element.
+ * @returns {Array} Returns the new array of combined values.
+ * @example
+ *
+ * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
+ * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];
+ *
+ * _.unionWith(objects, others, _.isEqual);
+ * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]
+ */
+ var unionWith = rest(function(arrays) {
+ var comparator = last(arrays);
+ if (isArrayLikeObject(comparator)) {
+ comparator = undefined;
+ }
+ return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), undefined, comparator);
+ });
+
+ /**
+ * Creates a duplicate-free version of an array, using
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
+ * for equality comparisons, in which only the first occurrence of each
+ * element is kept.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @returns {Array} Returns the new duplicate free array.
+ * @example
+ *
+ * _.uniq([2, 1, 2]);
+ * // => [2, 1]
+ */
+ function uniq(array) {
+ return (array && array.length)
+ ? baseUniq(array)
+ : [];
+ }
+
+ /**
+ * This method is like `_.uniq` except that it accepts `iteratee` which is
+ * invoked for each element in `array` to generate the criterion by which
+ * uniqueness is computed. The iteratee is invoked with one argument: (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @param {Array|Function|Object|string} [iteratee=_.identity]
+ * The iteratee invoked per element.
+ * @returns {Array} Returns the new duplicate free array.
+ * @example
+ *
+ * _.uniqBy([2.1, 1.2, 2.3], Math.floor);
+ * // => [2.1, 1.2]
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x');
+ * // => [{ 'x': 1 }, { 'x': 2 }]
+ */
+ function uniqBy(array, iteratee) {
+ return (array && array.length)
+ ? baseUniq(array, getIteratee(iteratee))
+ : [];
+ }
+
+ /**
+ * This method is like `_.uniq` except that it accepts `comparator` which
+ * is invoked to compare elements of `array`. The comparator is invoked with
+ * two arguments: (arrVal, othVal).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @param {Function} [comparator] The comparator invoked per element.
+ * @returns {Array} Returns the new duplicate free array.
+ * @example
+ *
+ * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 2 }];
+ *
+ * _.uniqWith(objects, _.isEqual);
+ * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]
+ */
+ function uniqWith(array, comparator) {
+ return (array && array.length)
+ ? baseUniq(array, undefined, comparator)
+ : [];
+ }
+
+ /**
+ * This method is like `_.zip` except that it accepts an array of grouped
+ * elements and creates an array regrouping the elements to their pre-zip
+ * configuration.
+ *
+ * @static
+ * @memberOf _
+ * @since 1.2.0
+ * @category Array
+ * @param {Array} array The array of grouped elements to process.
+ * @returns {Array} Returns the new array of regrouped elements.
+ * @example
+ *
+ * var zipped = _.zip(['fred', 'barney'], [30, 40], [true, false]);
+ * // => [['fred', 30, true], ['barney', 40, false]]
+ *
+ * _.unzip(zipped);
+ * // => [['fred', 'barney'], [30, 40], [true, false]]
+ */
+ function unzip(array) {
+ if (!(array && array.length)) {
+ return [];
+ }
+ var length = 0;
+ array = arrayFilter(array, function(group) {
+ if (isArrayLikeObject(group)) {
+ length = nativeMax(group.length, length);
+ return true;
+ }
+ });
+ return baseTimes(length, function(index) {
+ return arrayMap(array, baseProperty(index));
+ });
+ }
+
+ /**
+ * This method is like `_.unzip` except that it accepts `iteratee` to specify
+ * how regrouped values should be combined. The iteratee is invoked with the
+ * elements of each group: (...group).
+ *
+ * @static
+ * @memberOf _
+ * @since 3.8.0
+ * @category Array
+ * @param {Array} array The array of grouped elements to process.
+ * @param {Function} [iteratee=_.identity] The function to combine
+ * regrouped values.
+ * @returns {Array} Returns the new array of regrouped elements.
+ * @example
+ *
+ * var zipped = _.zip([1, 2], [10, 20], [100, 200]);
+ * // => [[1, 10, 100], [2, 20, 200]]
+ *
+ * _.unzipWith(zipped, _.add);
+ * // => [3, 30, 300]
+ */
+ function unzipWith(array, iteratee) {
+ if (!(array && array.length)) {
+ return [];
+ }
+ var result = unzip(array);
+ if (iteratee == null) {
+ return result;
+ }
+ return arrayMap(result, function(group) {
+ return apply(iteratee, undefined, group);
+ });
+ }
+
+ /**
+ * Creates an array excluding all given values using
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
+ * for equality comparisons.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {Array} array The array to filter.
+ * @param {...*} [values] The values to exclude.
+ * @returns {Array} Returns the new array of filtered values.
+ * @see _.difference, _.xor
+ * @example
+ *
+ * _.without([1, 2, 1, 3], 1, 2);
+ * // => [3]
+ */
+ var without = rest(function(array, values) {
+ return isArrayLikeObject(array)
+ ? baseDifference(array, values)
+ : [];
+ });
+
+ /**
+ * Creates an array of unique values that is the
+ * [symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference)
+ * of the given arrays. The order of result values is determined by the order
+ * they occur in the arrays.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.4.0
+ * @category Array
+ * @param {...Array} [arrays] The arrays to inspect.
+ * @returns {Array} Returns the new array of values.
+ * @see _.difference, _.without
+ * @example
+ *
+ * _.xor([2, 1], [4, 2]);
+ * // => [1, 4]
+ */
+ var xor = rest(function(arrays) {
+ return baseXor(arrayFilter(arrays, isArrayLikeObject));
+ });
+
+ /**
+ * This method is like `_.xor` except that it accepts `iteratee` which is
+ * invoked for each element of each `arrays` to generate the criterion by
+ * which by which they're compared. The iteratee is invoked with one argument:
+ * (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {...Array} [arrays] The arrays to inspect.
+ * @param {Array|Function|Object|string} [iteratee=_.identity]
+ * The iteratee invoked per element.
+ * @returns {Array} Returns the new array of values.
+ * @example
+ *
+ * _.xorBy([2.1, 1.2], [4.3, 2.4], Math.floor);
+ * // => [1.2, 4.3]
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.xorBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
+ * // => [{ 'x': 2 }]
+ */
+ var xorBy = rest(function(arrays) {
+ var iteratee = last(arrays);
+ if (isArrayLikeObject(iteratee)) {
+ iteratee = undefined;
+ }
+ return baseXor(arrayFilter(arrays, isArrayLikeObject), getIteratee(iteratee));
+ });
+
+ /**
+ * This method is like `_.xor` except that it accepts `comparator` which is
+ * invoked to compare elements of `arrays`. The comparator is invoked with
+ * two arguments: (arrVal, othVal).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {...Array} [arrays] The arrays to inspect.
+ * @param {Function} [comparator] The comparator invoked per element.
+ * @returns {Array} Returns the new array of values.
+ * @example
+ *
+ * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
+ * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];
+ *
+ * _.xorWith(objects, others, _.isEqual);
+ * // => [{ 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]
+ */
+ var xorWith = rest(function(arrays) {
+ var comparator = last(arrays);
+ if (isArrayLikeObject(comparator)) {
+ comparator = undefined;
+ }
+ return baseXor(arrayFilter(arrays, isArrayLikeObject), undefined, comparator);
+ });
+
+ /**
+ * Creates an array of grouped elements, the first of which contains the
+ * first elements of the given arrays, the second of which contains the
+ * second elements of the given arrays, and so on.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Array
+ * @param {...Array} [arrays] The arrays to process.
+ * @returns {Array} Returns the new array of grouped elements.
+ * @example
+ *
+ * _.zip(['fred', 'barney'], [30, 40], [true, false]);
+ * // => [['fred', 30, true], ['barney', 40, false]]
+ */
+ var zip = rest(unzip);
+
+ /**
+ * This method is like `_.fromPairs` except that it accepts two arrays,
+ * one of property identifiers and one of corresponding values.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.4.0
+ * @category Array
+ * @param {Array} [props=[]] The property identifiers.
+ * @param {Array} [values=[]] The property values.
+ * @returns {Object} Returns the new object.
+ * @example
+ *
+ * _.zipObject(['a', 'b'], [1, 2]);
+ * // => { 'a': 1, 'b': 2 }
+ */
+ function zipObject(props, values) {
+ return baseZipObject(props || [], values || [], assignValue);
+ }
+
+ /**
+ * This method is like `_.zipObject` except that it supports property paths.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.1.0
+ * @category Array
+ * @param {Array} [props=[]] The property identifiers.
+ * @param {Array} [values=[]] The property values.
+ * @returns {Object} Returns the new object.
+ * @example
+ *
+ * _.zipObjectDeep(['a.b[0].c', 'a.b[1].d'], [1, 2]);
+ * // => { 'a': { 'b': [{ 'c': 1 }, { 'd': 2 }] } }
+ */
+ function zipObjectDeep(props, values) {
+ return baseZipObject(props || [], values || [], baseSet);
+ }
+
+ /**
+ * This method is like `_.zip` except that it accepts `iteratee` to specify
+ * how grouped values should be combined. The iteratee is invoked with the
+ * elements of each group: (...group).
+ *
+ * @static
+ * @memberOf _
+ * @since 3.8.0
+ * @category Array
+ * @param {...Array} [arrays] The arrays to process.
+ * @param {Function} [iteratee=_.identity] The function to combine grouped values.
+ * @returns {Array} Returns the new array of grouped elements.
+ * @example
+ *
+ * _.zipWith([1, 2], [10, 20], [100, 200], function(a, b, c) {
+ * return a + b + c;
+ * });
+ * // => [111, 222]
+ */
+ var zipWith = rest(function(arrays) {
+ var length = arrays.length,
+ iteratee = length > 1 ? arrays[length - 1] : undefined;
+
+ iteratee = typeof iteratee == 'function' ? (arrays.pop(), iteratee) : undefined;
+ return unzipWith(arrays, iteratee);
+ });
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Creates a `lodash` wrapper instance that wraps `value` with explicit method
+ * chain sequences enabled. The result of such sequences must be unwrapped
+ * with `_#value`.
+ *
+ * @static
+ * @memberOf _
+ * @since 1.3.0
+ * @category Seq
+ * @param {*} value The value to wrap.
+ * @returns {Object} Returns the new `lodash` wrapper instance.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'age': 36 },
+ * { 'user': 'fred', 'age': 40 },
+ * { 'user': 'pebbles', 'age': 1 }
+ * ];
+ *
+ * var youngest = _
+ * .chain(users)
+ * .sortBy('age')
+ * .map(function(o) {
+ * return o.user + ' is ' + o.age;
+ * })
+ * .head()
+ * .value();
+ * // => 'pebbles is 1'
+ */
+ function chain(value) {
+ var result = lodash(value);
+ result.__chain__ = true;
+ return result;
+ }
+
+ /**
+ * This method invokes `interceptor` and returns `value`. The interceptor
+ * is invoked with one argument; (value). The purpose of this method is to
+ * "tap into" a method chain sequence in order to modify intermediate results.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Seq
+ * @param {*} value The value to provide to `interceptor`.
+ * @param {Function} interceptor The function to invoke.
+ * @returns {*} Returns `value`.
+ * @example
+ *
+ * _([1, 2, 3])
+ * .tap(function(array) {
+ * // Mutate input array.
+ * array.pop();
+ * })
+ * .reverse()
+ * .value();
+ * // => [2, 1]
+ */
+ function tap(value, interceptor) {
+ interceptor(value);
+ return value;
+ }
+
+ /**
+ * This method is like `_.tap` except that it returns the result of `interceptor`.
+ * The purpose of this method is to "pass thru" values replacing intermediate
+ * results in a method chain sequence.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Seq
+ * @param {*} value The value to provide to `interceptor`.
+ * @param {Function} interceptor The function to invoke.
+ * @returns {*} Returns the result of `interceptor`.
+ * @example
+ *
+ * _(' abc ')
+ * .chain()
+ * .trim()
+ * .thru(function(value) {
+ * return [value];
+ * })
+ * .value();
+ * // => ['abc']
+ */
+ function thru(value, interceptor) {
+ return interceptor(value);
+ }
+
+ /**
+ * This method is the wrapper version of `_.at`.
+ *
+ * @name at
+ * @memberOf _
+ * @since 1.0.0
+ * @category Seq
+ * @param {...(string|string[])} [paths] The property paths of elements to pick.
+ * @returns {Object} Returns the new `lodash` wrapper instance.
+ * @example
+ *
+ * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };
+ *
+ * _(object).at(['a[0].b.c', 'a[1]']).value();
+ * // => [3, 4]
+ *
+ * _(['a', 'b', 'c']).at(0, 2).value();
+ * // => ['a', 'c']
+ */
+ var wrapperAt = rest(function(paths) {
+ paths = baseFlatten(paths, 1);
+ var length = paths.length,
+ start = length ? paths[0] : 0,
+ value = this.__wrapped__,
+ interceptor = function(object) { return baseAt(object, paths); };
+
+ if (length > 1 || this.__actions__.length ||
+ !(value instanceof LazyWrapper) || !isIndex(start)) {
+ return this.thru(interceptor);
+ }
+ value = value.slice(start, +start + (length ? 1 : 0));
+ value.__actions__.push({
+ 'func': thru,
+ 'args': [interceptor],
+ 'thisArg': undefined
+ });
+ return new LodashWrapper(value, this.__chain__).thru(function(array) {
+ if (length && !array.length) {
+ array.push(undefined);
+ }
+ return array;
+ });
+ });
+
+ /**
+ * Creates a `lodash` wrapper instance with explicit method chain sequences enabled.
+ *
+ * @name chain
+ * @memberOf _
+ * @since 0.1.0
+ * @category Seq
+ * @returns {Object} Returns the new `lodash` wrapper instance.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'age': 36 },
+ * { 'user': 'fred', 'age': 40 }
+ * ];
+ *
+ * // A sequence without explicit chaining.
+ * _(users).head();
+ * // => { 'user': 'barney', 'age': 36 }
+ *
+ * // A sequence with explicit chaining.
+ * _(users)
+ * .chain()
+ * .head()
+ * .pick('user')
+ * .value();
+ * // => { 'user': 'barney' }
+ */
+ function wrapperChain() {
+ return chain(this);
+ }
+
+ /**
+ * Executes the chain sequence and returns the wrapped result.
+ *
+ * @name commit
+ * @memberOf _
+ * @since 3.2.0
+ * @category Seq
+ * @returns {Object} Returns the new `lodash` wrapper instance.
+ * @example
+ *
+ * var array = [1, 2];
+ * var wrapped = _(array).push(3);
+ *
+ * console.log(array);
+ * // => [1, 2]
+ *
+ * wrapped = wrapped.commit();
+ * console.log(array);
+ * // => [1, 2, 3]
+ *
+ * wrapped.last();
+ * // => 3
+ *
+ * console.log(array);
+ * // => [1, 2, 3]
+ */
+ function wrapperCommit() {
+ return new LodashWrapper(this.value(), this.__chain__);
+ }
+
+ /**
+ * Gets the next value on a wrapped object following the
+ * [iterator protocol](https://mdn.io/iteration_protocols#iterator).
+ *
+ * @name next
+ * @memberOf _
+ * @since 4.0.0
+ * @category Seq
+ * @returns {Object} Returns the next iterator value.
+ * @example
+ *
+ * var wrapped = _([1, 2]);
+ *
+ * wrapped.next();
+ * // => { 'done': false, 'value': 1 }
+ *
+ * wrapped.next();
+ * // => { 'done': false, 'value': 2 }
+ *
+ * wrapped.next();
+ * // => { 'done': true, 'value': undefined }
+ */
+ function wrapperNext() {
+ if (this.__values__ === undefined) {
+ this.__values__ = toArray(this.value());
+ }
+ var done = this.__index__ >= this.__values__.length,
+ value = done ? undefined : this.__values__[this.__index__++];
+
+ return { 'done': done, 'value': value };
+ }
+
+ /**
+ * Enables the wrapper to be iterable.
+ *
+ * @name Symbol.iterator
+ * @memberOf _
+ * @since 4.0.0
+ * @category Seq
+ * @returns {Object} Returns the wrapper object.
+ * @example
+ *
+ * var wrapped = _([1, 2]);
+ *
+ * wrapped[Symbol.iterator]() === wrapped;
+ * // => true
+ *
+ * Array.from(wrapped);
+ * // => [1, 2]
+ */
+ function wrapperToIterator() {
+ return this;
+ }
+
+ /**
+ * Creates a clone of the chain sequence planting `value` as the wrapped value.
+ *
+ * @name plant
+ * @memberOf _
+ * @since 3.2.0
+ * @category Seq
+ * @param {*} value The value to plant.
+ * @returns {Object} Returns the new `lodash` wrapper instance.
+ * @example
+ *
+ * function square(n) {
+ * return n * n;
+ * }
+ *
+ * var wrapped = _([1, 2]).map(square);
+ * var other = wrapped.plant([3, 4]);
+ *
+ * other.value();
+ * // => [9, 16]
+ *
+ * wrapped.value();
+ * // => [1, 4]
+ */
+ function wrapperPlant(value) {
+ var result,
+ parent = this;
+
+ while (parent instanceof baseLodash) {
+ var clone = wrapperClone(parent);
+ clone.__index__ = 0;
+ clone.__values__ = undefined;
+ if (result) {
+ previous.__wrapped__ = clone;
+ } else {
+ result = clone;
+ }
+ var previous = clone;
+ parent = parent.__wrapped__;
+ }
+ previous.__wrapped__ = value;
+ return result;
+ }
+
+ /**
+ * This method is the wrapper version of `_.reverse`.
+ *
+ * **Note:** This method mutates the wrapped array.
+ *
+ * @name reverse
+ * @memberOf _
+ * @since 0.1.0
+ * @category Seq
+ * @returns {Object} Returns the new `lodash` wrapper instance.
+ * @example
+ *
+ * var array = [1, 2, 3];
+ *
+ * _(array).reverse().value()
+ * // => [3, 2, 1]
+ *
+ * console.log(array);
+ * // => [3, 2, 1]
+ */
+ function wrapperReverse() {
+ var value = this.__wrapped__;
+ if (value instanceof LazyWrapper) {
+ var wrapped = value;
+ if (this.__actions__.length) {
+ wrapped = new LazyWrapper(this);
+ }
+ wrapped = wrapped.reverse();
+ wrapped.__actions__.push({
+ 'func': thru,
+ 'args': [reverse],
+ 'thisArg': undefined
+ });
+ return new LodashWrapper(wrapped, this.__chain__);
+ }
+ return this.thru(reverse);
+ }
+
+ /**
+ * Executes the chain sequence to resolve the unwrapped value.
+ *
+ * @name value
+ * @memberOf _
+ * @since 0.1.0
+ * @alias toJSON, valueOf
+ * @category Seq
+ * @returns {*} Returns the resolved unwrapped value.
+ * @example
+ *
+ * _([1, 2, 3]).value();
+ * // => [1, 2, 3]
+ */
+ function wrapperValue() {
+ return baseWrapperValue(this.__wrapped__, this.__actions__);
+ }
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Creates an object composed of keys generated from the results of running
+ * each element of `collection` thru `iteratee`. The corresponding value of
+ * each key is the number of times the key was returned by `iteratee`. The
+ * iteratee is invoked with one argument: (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 0.5.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Array|Function|Object|string} [iteratee=_.identity]
+ * The iteratee to transform keys.
+ * @returns {Object} Returns the composed aggregate object.
+ * @example
+ *
+ * _.countBy([6.1, 4.2, 6.3], Math.floor);
+ * // => { '4': 1, '6': 2 }
+ *
+ * _.countBy(['one', 'two', 'three'], 'length');
+ * // => { '3': 2, '5': 1 }
+ */
+ var countBy = createAggregator(function(result, value, key) {
+ hasOwnProperty.call(result, key) ? ++result[key] : (result[key] = 1);
+ });
+
+ /**
+ * Checks if `predicate` returns truthy for **all** elements of `collection`.
+ * Iteration is stopped once `predicate` returns falsey. The predicate is
+ * invoked with three arguments: (value, index|key, collection).
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Array|Function|Object|string} [predicate=_.identity]
+ * The function invoked per iteration.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {boolean} Returns `true` if all elements pass the predicate check,
+ * else `false`.
+ * @example
+ *
+ * _.every([true, 1, null, 'yes'], Boolean);
+ * // => false
+ *
+ * var users = [
+ * { 'user': 'barney', 'age': 36, 'active': false },
+ * { 'user': 'fred', 'age': 40, 'active': false }
+ * ];
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.every(users, { 'user': 'barney', 'active': false });
+ * // => false
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.every(users, ['active', false]);
+ * // => true
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.every(users, 'active');
+ * // => false
+ */
+ function every(collection, predicate, guard) {
+ var func = isArray(collection) ? arrayEvery : baseEvery;
+ if (guard && isIterateeCall(collection, predicate, guard)) {
+ predicate = undefined;
+ }
+ return func(collection, getIteratee(predicate, 3));
+ }
+
+ /**
+ * Iterates over elements of `collection`, returning an array of all elements
+ * `predicate` returns truthy for. The predicate is invoked with three
+ * arguments: (value, index|key, collection).
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Array|Function|Object|string} [predicate=_.identity]
+ * The function invoked per iteration.
+ * @returns {Array} Returns the new filtered array.
+ * @see _.reject
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'age': 36, 'active': true },
+ * { 'user': 'fred', 'age': 40, 'active': false }
+ * ];
+ *
+ * _.filter(users, function(o) { return !o.active; });
+ * // => objects for ['fred']
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.filter(users, { 'age': 36, 'active': true });
+ * // => objects for ['barney']
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.filter(users, ['active', false]);
+ * // => objects for ['fred']
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.filter(users, 'active');
+ * // => objects for ['barney']
+ */
+ function filter(collection, predicate) {
+ var func = isArray(collection) ? arrayFilter : baseFilter;
+ return func(collection, getIteratee(predicate, 3));
+ }
+
+ /**
+ * Iterates over elements of `collection`, returning the first element
+ * `predicate` returns truthy for. The predicate is invoked with three
+ * arguments: (value, index|key, collection).
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to search.
+ * @param {Array|Function|Object|string} [predicate=_.identity]
+ * The function invoked per iteration.
+ * @returns {*} Returns the matched element, else `undefined`.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'age': 36, 'active': true },
+ * { 'user': 'fred', 'age': 40, 'active': false },
+ * { 'user': 'pebbles', 'age': 1, 'active': true }
+ * ];
+ *
+ * _.find(users, function(o) { return o.age < 40; });
+ * // => object for 'barney'
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.find(users, { 'age': 1, 'active': true });
+ * // => object for 'pebbles'
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.find(users, ['active', false]);
+ * // => object for 'fred'
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.find(users, 'active');
+ * // => object for 'barney'
+ */
+ function find(collection, predicate) {
+ predicate = getIteratee(predicate, 3);
+ if (isArray(collection)) {
+ var index = baseFindIndex(collection, predicate);
+ return index > -1 ? collection[index] : undefined;
+ }
+ return baseFind(collection, predicate, baseEach);
+ }
+
+ /**
+ * This method is like `_.find` except that it iterates over elements of
+ * `collection` from right to left.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.0.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to search.
+ * @param {Array|Function|Object|string} [predicate=_.identity]
+ * The function invoked per iteration.
+ * @returns {*} Returns the matched element, else `undefined`.
+ * @example
+ *
+ * _.findLast([1, 2, 3, 4], function(n) {
+ * return n % 2 == 1;
+ * });
+ * // => 3
+ */
+ function findLast(collection, predicate) {
+ predicate = getIteratee(predicate, 3);
+ if (isArray(collection)) {
+ var index = baseFindIndex(collection, predicate, true);
+ return index > -1 ? collection[index] : undefined;
+ }
+ return baseFind(collection, predicate, baseEachRight);
+ }
+
+ /**
+ * Creates a flattened array of values by running each element in `collection`
+ * thru `iteratee` and flattening the mapped results. The iteratee is invoked
+ * with three arguments: (value, index|key, collection).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Array|Function|Object|string} [iteratee=_.identity]
+ * The function invoked per iteration.
+ * @returns {Array} Returns the new flattened array.
+ * @example
+ *
+ * function duplicate(n) {
+ * return [n, n];
+ * }
+ *
+ * _.flatMap([1, 2], duplicate);
+ * // => [1, 1, 2, 2]
+ */
+ function flatMap(collection, iteratee) {
+ return baseFlatten(map(collection, iteratee), 1);
+ }
+
+ /**
+ * This method is like `_.flatMap` except that it recursively flattens the
+ * mapped results.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.7.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Array|Function|Object|string} [iteratee=_.identity]
+ * The function invoked per iteration.
+ * @returns {Array} Returns the new flattened array.
+ * @example
+ *
+ * function duplicate(n) {
+ * return [[[n, n]]];
+ * }
+ *
+ * _.flatMapDeep([1, 2], duplicate);
+ * // => [1, 1, 2, 2]
+ */
+ function flatMapDeep(collection, iteratee) {
+ return baseFlatten(map(collection, iteratee), INFINITY);
+ }
+
+ /**
+ * This method is like `_.flatMap` except that it recursively flattens the
+ * mapped results up to `depth` times.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.7.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Array|Function|Object|string} [iteratee=_.identity]
+ * The function invoked per iteration.
+ * @param {number} [depth=1] The maximum recursion depth.
+ * @returns {Array} Returns the new flattened array.
+ * @example
+ *
+ * function duplicate(n) {
+ * return [[[n, n]]];
+ * }
+ *
+ * _.flatMapDepth([1, 2], duplicate, 2);
+ * // => [[1, 1], [2, 2]]
+ */
+ function flatMapDepth(collection, iteratee, depth) {
+ depth = depth === undefined ? 1 : toInteger(depth);
+ return baseFlatten(map(collection, iteratee), depth);
+ }
+
+ /**
+ * Iterates over elements of `collection` and invokes `iteratee` for each element.
+ * The iteratee is invoked with three arguments: (value, index|key, collection).
+ * Iteratee functions may exit iteration early by explicitly returning `false`.
+ *
+ * **Note:** As with other "Collections" methods, objects with a "length"
+ * property are iterated like arrays. To avoid this behavior use `_.forIn`
+ * or `_.forOwn` for object iteration.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @alias each
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @returns {Array|Object} Returns `collection`.
+ * @see _.forEachRight
+ * @example
+ *
+ * _([1, 2]).forEach(function(value) {
+ * console.log(value);
+ * });
+ * // => Logs `1` then `2`.
+ *
+ * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) {
+ * console.log(key);
+ * });
+ * // => Logs 'a' then 'b' (iteration order is not guaranteed).
+ */
+ function forEach(collection, iteratee) {
+ return (typeof iteratee == 'function' && isArray(collection))
+ ? arrayEach(collection, iteratee)
+ : baseEach(collection, getIteratee(iteratee));
+ }
+
+ /**
+ * This method is like `_.forEach` except that it iterates over elements of
+ * `collection` from right to left.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.0.0
+ * @alias eachRight
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @returns {Array|Object} Returns `collection`.
+ * @see _.forEach
+ * @example
+ *
+ * _.forEachRight([1, 2], function(value) {
+ * console.log(value);
+ * });
+ * // => Logs `2` then `1`.
+ */
+ function forEachRight(collection, iteratee) {
+ return (typeof iteratee == 'function' && isArray(collection))
+ ? arrayEachRight(collection, iteratee)
+ : baseEachRight(collection, getIteratee(iteratee));
+ }
+
+ /**
+ * Creates an object composed of keys generated from the results of running
+ * each element of `collection` thru `iteratee`. The order of grouped values
+ * is determined by the order they occur in `collection`. The corresponding
+ * value of each key is an array of elements responsible for generating the
+ * key. The iteratee is invoked with one argument: (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Array|Function|Object|string} [iteratee=_.identity]
+ * The iteratee to transform keys.
+ * @returns {Object} Returns the composed aggregate object.
+ * @example
+ *
+ * _.groupBy([6.1, 4.2, 6.3], Math.floor);
+ * // => { '4': [4.2], '6': [6.1, 6.3] }
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.groupBy(['one', 'two', 'three'], 'length');
+ * // => { '3': ['one', 'two'], '5': ['three'] }
+ */
+ var groupBy = createAggregator(function(result, value, key) {
+ if (hasOwnProperty.call(result, key)) {
+ result[key].push(value);
+ } else {
+ result[key] = [value];
+ }
+ });
+
+ /**
+ * Checks if `value` is in `collection`. If `collection` is a string, it's
+ * checked for a substring of `value`, otherwise
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
+ * is used for equality comparisons. If `fromIndex` is negative, it's used as
+ * the offset from the end of `collection`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object|string} collection The collection to search.
+ * @param {*} value The value to search for.
+ * @param {number} [fromIndex=0] The index to search from.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.
+ * @returns {boolean} Returns `true` if `value` is found, else `false`.
+ * @example
+ *
+ * _.includes([1, 2, 3], 1);
+ * // => true
+ *
+ * _.includes([1, 2, 3], 1, 2);
+ * // => false
+ *
+ * _.includes({ 'user': 'fred', 'age': 40 }, 'fred');
+ * // => true
+ *
+ * _.includes('pebbles', 'eb');
+ * // => true
+ */
+ function includes(collection, value, fromIndex, guard) {
+ collection = isArrayLike(collection) ? collection : values(collection);
+ fromIndex = (fromIndex && !guard) ? toInteger(fromIndex) : 0;
+
+ var length = collection.length;
+ if (fromIndex < 0) {
+ fromIndex = nativeMax(length + fromIndex, 0);
+ }
+ return isString(collection)
+ ? (fromIndex <= length && collection.indexOf(value, fromIndex) > -1)
+ : (!!length && baseIndexOf(collection, value, fromIndex) > -1);
+ }
+
+ /**
+ * Invokes the method at `path` of each element in `collection`, returning
+ * an array of the results of each invoked method. Any additional arguments
+ * are provided to each invoked method. If `methodName` is a function, it's
+ * invoked for and `this` bound to, each element in `collection`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Array|Function|string} path The path of the method to invoke or
+ * the function invoked per iteration.
+ * @param {...*} [args] The arguments to invoke each method with.
+ * @returns {Array} Returns the array of results.
+ * @example
+ *
+ * _.invokeMap([[5, 1, 7], [3, 2, 1]], 'sort');
+ * // => [[1, 5, 7], [1, 2, 3]]
+ *
+ * _.invokeMap([123, 456], String.prototype.split, '');
+ * // => [['1', '2', '3'], ['4', '5', '6']]
+ */
+ var invokeMap = rest(function(collection, path, args) {
+ var index = -1,
+ isFunc = typeof path == 'function',
+ isProp = isKey(path),
+ result = isArrayLike(collection) ? Array(collection.length) : [];
+
+ baseEach(collection, function(value) {
+ var func = isFunc ? path : ((isProp && value != null) ? value[path] : undefined);
+ result[++index] = func ? apply(func, value, args) : baseInvoke(value, path, args);
+ });
+ return result;
+ });
+
+ /**
+ * Creates an object composed of keys generated from the results of running
+ * each element of `collection` thru `iteratee`. The corresponding value of
+ * each key is the last element responsible for generating the key. The
+ * iteratee is invoked with one argument: (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Array|Function|Object|string} [iteratee=_.identity]
+ * The iteratee to transform keys.
+ * @returns {Object} Returns the composed aggregate object.
+ * @example
+ *
+ * var array = [
+ * { 'dir': 'left', 'code': 97 },
+ * { 'dir': 'right', 'code': 100 }
+ * ];
+ *
+ * _.keyBy(array, function(o) {
+ * return String.fromCharCode(o.code);
+ * });
+ * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } }
+ *
+ * _.keyBy(array, 'dir');
+ * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } }
+ */
+ var keyBy = createAggregator(function(result, value, key) {
+ result[key] = value;
+ });
+
+ /**
+ * Creates an array of values by running each element in `collection` thru
+ * `iteratee`. The iteratee is invoked with three arguments:
+ * (value, index|key, collection).
+ *
+ * Many lodash methods are guarded to work as iteratees for methods like
+ * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`.
+ *
+ * The guarded methods are:
+ * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`,
+ * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`,
+ * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`,
+ * `template`, `trim`, `trimEnd`, `trimStart`, and `words`
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Array|Function|Object|string} [iteratee=_.identity]
+ * The function invoked per iteration.
+ * @returns {Array} Returns the new mapped array.
+ * @example
+ *
+ * function square(n) {
+ * return n * n;
+ * }
+ *
+ * _.map([4, 8], square);
+ * // => [16, 64]
+ *
+ * _.map({ 'a': 4, 'b': 8 }, square);
+ * // => [16, 64] (iteration order is not guaranteed)
+ *
+ * var users = [
+ * { 'user': 'barney' },
+ * { 'user': 'fred' }
+ * ];
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.map(users, 'user');
+ * // => ['barney', 'fred']
+ */
+ function map(collection, iteratee) {
+ var func = isArray(collection) ? arrayMap : baseMap;
+ return func(collection, getIteratee(iteratee, 3));
+ }
+
+ /**
+ * This method is like `_.sortBy` except that it allows specifying the sort
+ * orders of the iteratees to sort by. If `orders` is unspecified, all values
+ * are sorted in ascending order. Otherwise, specify an order of "desc" for
+ * descending or "asc" for ascending sort order of corresponding values.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Array[]|Function[]|Object[]|string[]} [iteratees=[_.identity]]
+ * The iteratees to sort by.
+ * @param {string[]} [orders] The sort orders of `iteratees`.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.
+ * @returns {Array} Returns the new sorted array.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'fred', 'age': 48 },
+ * { 'user': 'barney', 'age': 34 },
+ * { 'user': 'fred', 'age': 40 },
+ * { 'user': 'barney', 'age': 36 }
+ * ];
+ *
+ * // Sort by `user` in ascending order and by `age` in descending order.
+ * _.orderBy(users, ['user', 'age'], ['asc', 'desc']);
+ * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]
+ */
+ function orderBy(collection, iteratees, orders, guard) {
+ if (collection == null) {
+ return [];
+ }
+ if (!isArray(iteratees)) {
+ iteratees = iteratees == null ? [] : [iteratees];
+ }
+ orders = guard ? undefined : orders;
+ if (!isArray(orders)) {
+ orders = orders == null ? [] : [orders];
+ }
+ return baseOrderBy(collection, iteratees, orders);
+ }
+
+ /**
+ * Creates an array of elements split into two groups, the first of which
+ * contains elements `predicate` returns truthy for, the second of which
+ * contains elements `predicate` returns falsey for. The predicate is
+ * invoked with one argument: (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Array|Function|Object|string} [predicate=_.identity]
+ * The function invoked per iteration.
+ * @returns {Array} Returns the array of grouped elements.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'age': 36, 'active': false },
+ * { 'user': 'fred', 'age': 40, 'active': true },
+ * { 'user': 'pebbles', 'age': 1, 'active': false }
+ * ];
+ *
+ * _.partition(users, function(o) { return o.active; });
+ * // => objects for [['fred'], ['barney', 'pebbles']]
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.partition(users, { 'age': 1, 'active': false });
+ * // => objects for [['pebbles'], ['barney', 'fred']]
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.partition(users, ['active', false]);
+ * // => objects for [['barney', 'pebbles'], ['fred']]
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.partition(users, 'active');
+ * // => objects for [['fred'], ['barney', 'pebbles']]
+ */
+ var partition = createAggregator(function(result, value, key) {
+ result[key ? 0 : 1].push(value);
+ }, function() { return [[], []]; });
+
+ /**
+ * Reduces `collection` to a value which is the accumulated result of running
+ * each element in `collection` thru `iteratee`, where each successive
+ * invocation is supplied the return value of the previous. If `accumulator`
+ * is not given, the first element of `collection` is used as the initial
+ * value. The iteratee is invoked with four arguments:
+ * (accumulator, value, index|key, collection).
+ *
+ * Many lodash methods are guarded to work as iteratees for methods like
+ * `_.reduce`, `_.reduceRight`, and `_.transform`.
+ *
+ * The guarded methods are:
+ * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`,
+ * and `sortBy`
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @param {*} [accumulator] The initial value.
+ * @returns {*} Returns the accumulated value.
+ * @see _.reduceRight
+ * @example
+ *
+ * _.reduce([1, 2], function(sum, n) {
+ * return sum + n;
+ * }, 0);
+ * // => 3
+ *
+ * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {
+ * (result[value] || (result[value] = [])).push(key);
+ * return result;
+ * }, {});
+ * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed)
+ */
+ function reduce(collection, iteratee, accumulator) {
+ var func = isArray(collection) ? arrayReduce : baseReduce,
+ initAccum = arguments.length < 3;
+
+ return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEach);
+ }
+
+ /**
+ * This method is like `_.reduce` except that it iterates over elements of
+ * `collection` from right to left.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @param {*} [accumulator] The initial value.
+ * @returns {*} Returns the accumulated value.
+ * @see _.reduce
+ * @example
+ *
+ * var array = [[0, 1], [2, 3], [4, 5]];
+ *
+ * _.reduceRight(array, function(flattened, other) {
+ * return flattened.concat(other);
+ * }, []);
+ * // => [4, 5, 2, 3, 0, 1]
+ */
+ function reduceRight(collection, iteratee, accumulator) {
+ var func = isArray(collection) ? arrayReduceRight : baseReduce,
+ initAccum = arguments.length < 3;
+
+ return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEachRight);
+ }
+
+ /**
+ * The opposite of `_.filter`; this method returns the elements of `collection`
+ * that `predicate` does **not** return truthy for.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Array|Function|Object|string} [predicate=_.identity]
+ * The function invoked per iteration.
+ * @returns {Array} Returns the new filtered array.
+ * @see _.filter
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'age': 36, 'active': false },
+ * { 'user': 'fred', 'age': 40, 'active': true }
+ * ];
+ *
+ * _.reject(users, function(o) { return !o.active; });
+ * // => objects for ['fred']
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.reject(users, { 'age': 40, 'active': true });
+ * // => objects for ['barney']
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.reject(users, ['active', false]);
+ * // => objects for ['fred']
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.reject(users, 'active');
+ * // => objects for ['barney']
+ */
+ function reject(collection, predicate) {
+ var func = isArray(collection) ? arrayFilter : baseFilter;
+ predicate = getIteratee(predicate, 3);
+ return func(collection, function(value, index, collection) {
+ return !predicate(value, index, collection);
+ });
+ }
+
+ /**
+ * Gets a random element from `collection`.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.0.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to sample.
+ * @returns {*} Returns the random element.
+ * @example
+ *
+ * _.sample([1, 2, 3, 4]);
+ * // => 2
+ */
+ function sample(collection) {
+ var array = isArrayLike(collection) ? collection : values(collection),
+ length = array.length;
+
+ return length > 0 ? array[baseRandom(0, length - 1)] : undefined;
+ }
+
+ /**
+ * Gets `n` random elements at unique keys from `collection` up to the
+ * size of `collection`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to sample.
+ * @param {number} [n=1] The number of elements to sample.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {Array} Returns the random elements.
+ * @example
+ *
+ * _.sampleSize([1, 2, 3], 2);
+ * // => [3, 1]
+ *
+ * _.sampleSize([1, 2, 3], 4);
+ * // => [2, 3, 1]
+ */
+ function sampleSize(collection, n, guard) {
+ var index = -1,
+ result = toArray(collection),
+ length = result.length,
+ lastIndex = length - 1;
+
+ if ((guard ? isIterateeCall(collection, n, guard) : n === undefined)) {
+ n = 1;
+ } else {
+ n = baseClamp(toInteger(n), 0, length);
+ }
+ while (++index < n) {
+ var rand = baseRandom(index, lastIndex),
+ value = result[rand];
+
+ result[rand] = result[index];
+ result[index] = value;
+ }
+ result.length = n;
+ return result;
+ }
+
+ /**
+ * Creates an array of shuffled values, using a version of the
+ * [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher-Yates_shuffle).
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to shuffle.
+ * @returns {Array} Returns the new shuffled array.
+ * @example
+ *
+ * _.shuffle([1, 2, 3, 4]);
+ * // => [4, 1, 3, 2]
+ */
+ function shuffle(collection) {
+ return sampleSize(collection, MAX_ARRAY_LENGTH);
+ }
+
+ /**
+ * Gets the size of `collection` by returning its length for array-like
+ * values or the number of own enumerable string keyed properties for objects.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to inspect.
+ * @returns {number} Returns the collection size.
+ * @example
+ *
+ * _.size([1, 2, 3]);
+ * // => 3
+ *
+ * _.size({ 'a': 1, 'b': 2 });
+ * // => 2
+ *
+ * _.size('pebbles');
+ * // => 7
+ */
+ function size(collection) {
+ if (collection == null) {
+ return 0;
+ }
+ if (isArrayLike(collection)) {
+ var result = collection.length;
+ return (result && isString(collection)) ? stringSize(collection) : result;
+ }
+ if (isObjectLike(collection)) {
+ var tag = getTag(collection);
+ if (tag == mapTag || tag == setTag) {
+ return collection.size;
+ }
+ }
+ return keys(collection).length;
+ }
+
+ /**
+ * Checks if `predicate` returns truthy for **any** element of `collection`.
+ * Iteration is stopped once `predicate` returns truthy. The predicate is
+ * invoked with three arguments: (value, index|key, collection).
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Array|Function|Object|string} [predicate=_.identity]
+ * The function invoked per iteration.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {boolean} Returns `true` if any element passes the predicate check,
+ * else `false`.
+ * @example
+ *
+ * _.some([null, 0, 'yes', false], Boolean);
+ * // => true
+ *
+ * var users = [
+ * { 'user': 'barney', 'active': true },
+ * { 'user': 'fred', 'active': false }
+ * ];
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.some(users, { 'user': 'barney', 'active': false });
+ * // => false
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.some(users, ['active', false]);
+ * // => true
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.some(users, 'active');
+ * // => true
+ */
+ function some(collection, predicate, guard) {
+ var func = isArray(collection) ? arraySome : baseSome;
+ if (guard && isIterateeCall(collection, predicate, guard)) {
+ predicate = undefined;
+ }
+ return func(collection, getIteratee(predicate, 3));
+ }
+
+ /**
+ * Creates an array of elements, sorted in ascending order by the results of
+ * running each element in a collection thru each iteratee. This method
+ * performs a stable sort, that is, it preserves the original sort order of
+ * equal elements. The iteratees are invoked with one argument: (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Collection
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {...(Array|Array[]|Function|Function[]|Object|Object[]|string|string[])}
+ * [iteratees=[_.identity]] The iteratees to sort by.
+ * @returns {Array} Returns the new sorted array.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'fred', 'age': 48 },
+ * { 'user': 'barney', 'age': 36 },
+ * { 'user': 'fred', 'age': 40 },
+ * { 'user': 'barney', 'age': 34 }
+ * ];
+ *
+ * _.sortBy(users, function(o) { return o.user; });
+ * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]
+ *
+ * _.sortBy(users, ['user', 'age']);
+ * // => objects for [['barney', 34], ['barney', 36], ['fred', 40], ['fred', 48]]
+ *
+ * _.sortBy(users, 'user', function(o) {
+ * return Math.floor(o.age / 10);
+ * });
+ * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]
+ */
+ var sortBy = rest(function(collection, iteratees) {
+ if (collection == null) {
+ return [];
+ }
+ var length = iteratees.length;
+ if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) {
+ iteratees = [];
+ } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) {
+ iteratees = [iteratees[0]];
+ }
+ iteratees = (iteratees.length == 1 && isArray(iteratees[0]))
+ ? iteratees[0]
+ : baseFlatten(iteratees, 1, isFlattenableIteratee);
+
+ return baseOrderBy(collection, iteratees, []);
+ });
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Gets the timestamp of the number of milliseconds that have elapsed since
+ * the Unix epoch (1 January 1970 00:00:00 UTC).
+ *
+ * @static
+ * @memberOf _
+ * @since 2.4.0
+ * @type {Function}
+ * @category Date
+ * @returns {number} Returns the timestamp.
+ * @example
+ *
+ * _.defer(function(stamp) {
+ * console.log(_.now() - stamp);
+ * }, _.now());
+ * // => Logs the number of milliseconds it took for the deferred function to be invoked.
+ */
+ var now = Date.now;
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * The opposite of `_.before`; this method creates a function that invokes
+ * `func` once it's called `n` or more times.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Function
+ * @param {number} n The number of calls before `func` is invoked.
+ * @param {Function} func The function to restrict.
+ * @returns {Function} Returns the new restricted function.
+ * @example
+ *
+ * var saves = ['profile', 'settings'];
+ *
+ * var done = _.after(saves.length, function() {
+ * console.log('done saving!');
+ * });
+ *
+ * _.forEach(saves, function(type) {
+ * asyncSave({ 'type': type, 'complete': done });
+ * });
+ * // => Logs 'done saving!' after the two async saves have completed.
+ */
+ function after(n, func) {
+ if (typeof func != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ n = toInteger(n);
+ return function() {
+ if (--n < 1) {
+ return func.apply(this, arguments);
+ }
+ };
+ }
+
+ /**
+ * Creates a function that invokes `func`, with up to `n` arguments,
+ * ignoring any additional arguments.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Function
+ * @param {Function} func The function to cap arguments for.
+ * @param {number} [n=func.length] The arity cap.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * _.map(['6', '8', '10'], _.ary(parseInt, 1));
+ * // => [6, 8, 10]
+ */
+ function ary(func, n, guard) {
+ n = guard ? undefined : n;
+ n = (func && n == null) ? func.length : n;
+ return createWrapper(func, ARY_FLAG, undefined, undefined, undefined, undefined, n);
+ }
+
+ /**
+ * Creates a function that invokes `func`, with the `this` binding and arguments
+ * of the created function, while it's called less than `n` times. Subsequent
+ * calls to the created function return the result of the last `func` invocation.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Function
+ * @param {number} n The number of calls at which `func` is no longer invoked.
+ * @param {Function} func The function to restrict.
+ * @returns {Function} Returns the new restricted function.
+ * @example
+ *
+ * jQuery(element).on('click', _.before(5, addContactToList));
+ * // => allows adding up to 4 contacts to the list
+ */
+ function before(n, func) {
+ var result;
+ if (typeof func != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ n = toInteger(n);
+ return function() {
+ if (--n > 0) {
+ result = func.apply(this, arguments);
+ }
+ if (n <= 1) {
+ func = undefined;
+ }
+ return result;
+ };
+ }
+
+ /**
+ * Creates a function that invokes `func` with the `this` binding of `thisArg`
+ * and `partials` prepended to the arguments it receives.
+ *
+ * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds,
+ * may be used as a placeholder for partially applied arguments.
+ *
+ * **Note:** Unlike native `Function#bind` this method doesn't set the "length"
+ * property of bound functions.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Function
+ * @param {Function} func The function to bind.
+ * @param {*} thisArg The `this` binding of `func`.
+ * @param {...*} [partials] The arguments to be partially applied.
+ * @returns {Function} Returns the new bound function.
+ * @example
+ *
+ * var greet = function(greeting, punctuation) {
+ * return greeting + ' ' + this.user + punctuation;
+ * };
+ *
+ * var object = { 'user': 'fred' };
+ *
+ * var bound = _.bind(greet, object, 'hi');
+ * bound('!');
+ * // => 'hi fred!'
+ *
+ * // Bound with placeholders.
+ * var bound = _.bind(greet, object, _, '!');
+ * bound('hi');
+ * // => 'hi fred!'
+ */
+ var bind = rest(function(func, thisArg, partials) {
+ var bitmask = BIND_FLAG;
+ if (partials.length) {
+ var holders = replaceHolders(partials, getPlaceholder(bind));
+ bitmask |= PARTIAL_FLAG;
+ }
+ return createWrapper(func, bitmask, thisArg, partials, holders);
+ });
+
+ /**
+ * Creates a function that invokes the method at `object[key]` with `partials`
+ * prepended to the arguments it receives.
+ *
+ * This method differs from `_.bind` by allowing bound functions to reference
+ * methods that may be redefined or don't yet exist. See
+ * [Peter Michaux's article](http://peter.michaux.ca/articles/lazy-function-definition-pattern)
+ * for more details.
+ *
+ * The `_.bindKey.placeholder` value, which defaults to `_` in monolithic
+ * builds, may be used as a placeholder for partially applied arguments.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.10.0
+ * @category Function
+ * @param {Object} object The object to invoke the method on.
+ * @param {string} key The key of the method.
+ * @param {...*} [partials] The arguments to be partially applied.
+ * @returns {Function} Returns the new bound function.
+ * @example
+ *
+ * var object = {
+ * 'user': 'fred',
+ * 'greet': function(greeting, punctuation) {
+ * return greeting + ' ' + this.user + punctuation;
+ * }
+ * };
+ *
+ * var bound = _.bindKey(object, 'greet', 'hi');
+ * bound('!');
+ * // => 'hi fred!'
+ *
+ * object.greet = function(greeting, punctuation) {
+ * return greeting + 'ya ' + this.user + punctuation;
+ * };
+ *
+ * bound('!');
+ * // => 'hiya fred!'
+ *
+ * // Bound with placeholders.
+ * var bound = _.bindKey(object, 'greet', _, '!');
+ * bound('hi');
+ * // => 'hiya fred!'
+ */
+ var bindKey = rest(function(object, key, partials) {
+ var bitmask = BIND_FLAG | BIND_KEY_FLAG;
+ if (partials.length) {
+ var holders = replaceHolders(partials, getPlaceholder(bindKey));
+ bitmask |= PARTIAL_FLAG;
+ }
+ return createWrapper(key, bitmask, object, partials, holders);
+ });
+
+ /**
+ * Creates a function that accepts arguments of `func` and either invokes
+ * `func` returning its result, if at least `arity` number of arguments have
+ * been provided, or returns a function that accepts the remaining `func`
+ * arguments, and so on. The arity of `func` may be specified if `func.length`
+ * is not sufficient.
+ *
+ * The `_.curry.placeholder` value, which defaults to `_` in monolithic builds,
+ * may be used as a placeholder for provided arguments.
+ *
+ * **Note:** This method doesn't set the "length" property of curried functions.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.0.0
+ * @category Function
+ * @param {Function} func The function to curry.
+ * @param {number} [arity=func.length] The arity of `func`.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {Function} Returns the new curried function.
+ * @example
+ *
+ * var abc = function(a, b, c) {
+ * return [a, b, c];
+ * };
+ *
+ * var curried = _.curry(abc);
+ *
+ * curried(1)(2)(3);
+ * // => [1, 2, 3]
+ *
+ * curried(1, 2)(3);
+ * // => [1, 2, 3]
+ *
+ * curried(1, 2, 3);
+ * // => [1, 2, 3]
+ *
+ * // Curried with placeholders.
+ * curried(1)(_, 3)(2);
+ * // => [1, 2, 3]
+ */
+ function curry(func, arity, guard) {
+ arity = guard ? undefined : arity;
+ var result = createWrapper(func, CURRY_FLAG, undefined, undefined, undefined, undefined, undefined, arity);
+ result.placeholder = curry.placeholder;
+ return result;
+ }
+
+ /**
+ * This method is like `_.curry` except that arguments are applied to `func`
+ * in the manner of `_.partialRight` instead of `_.partial`.
+ *
+ * The `_.curryRight.placeholder` value, which defaults to `_` in monolithic
+ * builds, may be used as a placeholder for provided arguments.
+ *
+ * **Note:** This method doesn't set the "length" property of curried functions.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Function
+ * @param {Function} func The function to curry.
+ * @param {number} [arity=func.length] The arity of `func`.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {Function} Returns the new curried function.
+ * @example
+ *
+ * var abc = function(a, b, c) {
+ * return [a, b, c];
+ * };
+ *
+ * var curried = _.curryRight(abc);
+ *
+ * curried(3)(2)(1);
+ * // => [1, 2, 3]
+ *
+ * curried(2, 3)(1);
+ * // => [1, 2, 3]
+ *
+ * curried(1, 2, 3);
+ * // => [1, 2, 3]
+ *
+ * // Curried with placeholders.
+ * curried(3)(1, _)(2);
+ * // => [1, 2, 3]
+ */
+ function curryRight(func, arity, guard) {
+ arity = guard ? undefined : arity;
+ var result = createWrapper(func, CURRY_RIGHT_FLAG, undefined, undefined, undefined, undefined, undefined, arity);
+ result.placeholder = curryRight.placeholder;
+ return result;
+ }
+
+ /**
+ * Creates a debounced function that delays invoking `func` until after `wait`
+ * milliseconds have elapsed since the last time the debounced function was
+ * invoked. The debounced function comes with a `cancel` method to cancel
+ * delayed `func` invocations and a `flush` method to immediately invoke them.
+ * Provide an options object to indicate whether `func` should be invoked on
+ * the leading and/or trailing edge of the `wait` timeout. The `func` is invoked
+ * with the last arguments provided to the debounced function. Subsequent calls
+ * to the debounced function return the result of the last `func` invocation.
+ *
+ * **Note:** If `leading` and `trailing` options are `true`, `func` is invoked
+ * on the trailing edge of the timeout only if the debounced function is
+ * invoked more than once during the `wait` timeout.
+ *
+ * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
+ * for details over the differences between `_.debounce` and `_.throttle`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Function
+ * @param {Function} func The function to debounce.
+ * @param {number} [wait=0] The number of milliseconds to delay.
+ * @param {Object} [options={}] The options object.
+ * @param {boolean} [options.leading=false]
+ * Specify invoking on the leading edge of the timeout.
+ * @param {number} [options.maxWait]
+ * The maximum time `func` is allowed to be delayed before it's invoked.
+ * @param {boolean} [options.trailing=true]
+ * Specify invoking on the trailing edge of the timeout.
+ * @returns {Function} Returns the new debounced function.
+ * @example
+ *
+ * // Avoid costly calculations while the window size is in flux.
+ * jQuery(window).on('resize', _.debounce(calculateLayout, 150));
+ *
+ * // Invoke `sendMail` when clicked, debouncing subsequent calls.
+ * jQuery(element).on('click', _.debounce(sendMail, 300, {
+ * 'leading': true,
+ * 'trailing': false
+ * }));
+ *
+ * // Ensure `batchLog` is invoked once after 1 second of debounced calls.
+ * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });
+ * var source = new EventSource('/stream');
+ * jQuery(source).on('message', debounced);
+ *
+ * // Cancel the trailing debounced invocation.
+ * jQuery(window).on('popstate', debounced.cancel);
+ */
+ function debounce(func, wait, options) {
+ var lastArgs,
+ lastThis,
+ maxWait,
+ result,
+ timerId,
+ lastCallTime = 0,
+ lastInvokeTime = 0,
+ leading = false,
+ maxing = false,
+ trailing = true;
+
+ if (typeof func != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ wait = toNumber(wait) || 0;
+ if (isObject(options)) {
+ leading = !!options.leading;
+ maxing = 'maxWait' in options;
+ maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
+ trailing = 'trailing' in options ? !!options.trailing : trailing;
+ }
+
+ function invokeFunc(time) {
+ var args = lastArgs,
+ thisArg = lastThis;
+
+ lastArgs = lastThis = undefined;
+ lastInvokeTime = time;
+ result = func.apply(thisArg, args);
+ return result;
+ }
+
+ function leadingEdge(time) {
+ // Reset any `maxWait` timer.
+ lastInvokeTime = time;
+ // Start the timer for the trailing edge.
+ timerId = setTimeout(timerExpired, wait);
+ // Invoke the leading edge.
+ return leading ? invokeFunc(time) : result;
+ }
+
+ function remainingWait(time) {
+ var timeSinceLastCall = time - lastCallTime,
+ timeSinceLastInvoke = time - lastInvokeTime,
+ result = wait - timeSinceLastCall;
+
+ return maxing ? nativeMin(result, maxWait - timeSinceLastInvoke) : result;
+ }
+
+ function shouldInvoke(time) {
+ var timeSinceLastCall = time - lastCallTime,
+ timeSinceLastInvoke = time - lastInvokeTime;
+
+ // Either this is the first call, activity has stopped and we're at the
+ // trailing edge, the system time has gone backwards and we're treating
+ // it as the trailing edge, or we've hit the `maxWait` limit.
+ return (!lastCallTime || (timeSinceLastCall >= wait) ||
+ (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));
+ }
+
+ function timerExpired() {
+ var time = now();
+ if (shouldInvoke(time)) {
+ return trailingEdge(time);
+ }
+ // Restart the timer.
+ timerId = setTimeout(timerExpired, remainingWait(time));
+ }
+
+ function trailingEdge(time) {
+ clearTimeout(timerId);
+ timerId = undefined;
+
+ // Only invoke if we have `lastArgs` which means `func` has been
+ // debounced at least once.
+ if (trailing && lastArgs) {
+ return invokeFunc(time);
+ }
+ lastArgs = lastThis = undefined;
+ return result;
+ }
+
+ function cancel() {
+ if (timerId !== undefined) {
+ clearTimeout(timerId);
+ }
+ lastCallTime = lastInvokeTime = 0;
+ lastArgs = lastThis = timerId = undefined;
+ }
+
+ function flush() {
+ return timerId === undefined ? result : trailingEdge(now());
+ }
+
+ function debounced() {
+ var time = now(),
+ isInvoking = shouldInvoke(time);
+
+ lastArgs = arguments;
+ lastThis = this;
+ lastCallTime = time;
+
+ if (isInvoking) {
+ if (timerId === undefined) {
+ return leadingEdge(lastCallTime);
+ }
+ if (maxing) {
+ // Handle invocations in a tight loop.
+ clearTimeout(timerId);
+ timerId = setTimeout(timerExpired, wait);
+ return invokeFunc(lastCallTime);
+ }
+ }
+ if (timerId === undefined) {
+ timerId = setTimeout(timerExpired, wait);
+ }
+ return result;
+ }
+ debounced.cancel = cancel;
+ debounced.flush = flush;
+ return debounced;
+ }
+
+ /**
+ * Defers invoking the `func` until the current call stack has cleared. Any
+ * additional arguments are provided to `func` when it's invoked.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Function
+ * @param {Function} func The function to defer.
+ * @param {...*} [args] The arguments to invoke `func` with.
+ * @returns {number} Returns the timer id.
+ * @example
+ *
+ * _.defer(function(text) {
+ * console.log(text);
+ * }, 'deferred');
+ * // => Logs 'deferred' after one or more milliseconds.
+ */
+ var defer = rest(function(func, args) {
+ return baseDelay(func, 1, args);
+ });
+
+ /**
+ * Invokes `func` after `wait` milliseconds. Any additional arguments are
+ * provided to `func` when it's invoked.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Function
+ * @param {Function} func The function to delay.
+ * @param {number} wait The number of milliseconds to delay invocation.
+ * @param {...*} [args] The arguments to invoke `func` with.
+ * @returns {number} Returns the timer id.
+ * @example
+ *
+ * _.delay(function(text) {
+ * console.log(text);
+ * }, 1000, 'later');
+ * // => Logs 'later' after one second.
+ */
+ var delay = rest(function(func, wait, args) {
+ return baseDelay(func, toNumber(wait) || 0, args);
+ });
+
+ /**
+ * Creates a function that invokes `func` with arguments reversed.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Function
+ * @param {Function} func The function to flip arguments for.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * var flipped = _.flip(function() {
+ * return _.toArray(arguments);
+ * });
+ *
+ * flipped('a', 'b', 'c', 'd');
+ * // => ['d', 'c', 'b', 'a']
+ */
+ function flip(func) {
+ return createWrapper(func, FLIP_FLAG);
+ }
+
+ /**
+ * Creates a function that memoizes the result of `func`. If `resolver` is
+ * provided, it determines the cache key for storing the result based on the
+ * arguments provided to the memoized function. By default, the first argument
+ * provided to the memoized function is used as the map cache key. The `func`
+ * is invoked with the `this` binding of the memoized function.
+ *
+ * **Note:** The cache is exposed as the `cache` property on the memoized
+ * function. Its creation may be customized by replacing the `_.memoize.Cache`
+ * constructor with one whose instances implement the
+ * [`Map`](http://ecma-international.org/ecma-262/6.0/#sec-properties-of-the-map-prototype-object)
+ * method interface of `delete`, `get`, `has`, and `set`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Function
+ * @param {Function} func The function to have its output memoized.
+ * @param {Function} [resolver] The function to resolve the cache key.
+ * @returns {Function} Returns the new memoizing function.
+ * @example
+ *
+ * var object = { 'a': 1, 'b': 2 };
+ * var other = { 'c': 3, 'd': 4 };
+ *
+ * var values = _.memoize(_.values);
+ * values(object);
+ * // => [1, 2]
+ *
+ * values(other);
+ * // => [3, 4]
+ *
+ * object.a = 2;
+ * values(object);
+ * // => [1, 2]
+ *
+ * // Modify the result cache.
+ * values.cache.set(object, ['a', 'b']);
+ * values(object);
+ * // => ['a', 'b']
+ *
+ * // Replace `_.memoize.Cache`.
+ * _.memoize.Cache = WeakMap;
+ */
+ function memoize(func, resolver) {
+ if (typeof func != 'function' || (resolver && typeof resolver != 'function')) {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ var memoized = function() {
+ var args = arguments,
+ key = resolver ? resolver.apply(this, args) : args[0],
+ cache = memoized.cache;
+
+ if (cache.has(key)) {
+ return cache.get(key);
+ }
+ var result = func.apply(this, args);
+ memoized.cache = cache.set(key, result);
+ return result;
+ };
+ memoized.cache = new (memoize.Cache || MapCache);
+ return memoized;
+ }
+
+ // Assign cache to `_.memoize`.
+ memoize.Cache = MapCache;
+
+ /**
+ * Creates a function that negates the result of the predicate `func`. The
+ * `func` predicate is invoked with the `this` binding and arguments of the
+ * created function.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Function
+ * @param {Function} predicate The predicate to negate.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * function isEven(n) {
+ * return n % 2 == 0;
+ * }
+ *
+ * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven));
+ * // => [1, 3, 5]
+ */
+ function negate(predicate) {
+ if (typeof predicate != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ return function() {
+ return !predicate.apply(this, arguments);
+ };
+ }
+
+ /**
+ * Creates a function that is restricted to invoking `func` once. Repeat calls
+ * to the function return the value of the first invocation. The `func` is
+ * invoked with the `this` binding and arguments of the created function.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Function
+ * @param {Function} func The function to restrict.
+ * @returns {Function} Returns the new restricted function.
+ * @example
+ *
+ * var initialize = _.once(createApplication);
+ * initialize();
+ * initialize();
+ * // `initialize` invokes `createApplication` once
+ */
+ function once(func) {
+ return before(2, func);
+ }
+
+ /**
+ * Creates a function that invokes `func` with arguments transformed by
+ * corresponding `transforms`.
+ *
+ * @static
+ * @since 4.0.0
+ * @memberOf _
+ * @category Function
+ * @param {Function} func The function to wrap.
+ * @param {...(Array|Array[]|Function|Function[]|Object|Object[]|string|string[])}
+ * [transforms[_.identity]] The functions to transform.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * function doubled(n) {
+ * return n * 2;
+ * }
+ *
+ * function square(n) {
+ * return n * n;
+ * }
+ *
+ * var func = _.overArgs(function(x, y) {
+ * return [x, y];
+ * }, square, doubled);
+ *
+ * func(9, 3);
+ * // => [81, 6]
+ *
+ * func(10, 5);
+ * // => [100, 10]
+ */
+ var overArgs = rest(function(func, transforms) {
+ transforms = (transforms.length == 1 && isArray(transforms[0]))
+ ? arrayMap(transforms[0], baseUnary(getIteratee()))
+ : arrayMap(baseFlatten(transforms, 1, isFlattenableIteratee), baseUnary(getIteratee()));
+
+ var funcsLength = transforms.length;
+ return rest(function(args) {
+ var index = -1,
+ length = nativeMin(args.length, funcsLength);
+
+ while (++index < length) {
+ args[index] = transforms[index].call(this, args[index]);
+ }
+ return apply(func, this, args);
+ });
+ });
+
+ /**
+ * Creates a function that invokes `func` with `partials` prepended to the
+ * arguments it receives. This method is like `_.bind` except it does **not**
+ * alter the `this` binding.
+ *
+ * The `_.partial.placeholder` value, which defaults to `_` in monolithic
+ * builds, may be used as a placeholder for partially applied arguments.
+ *
+ * **Note:** This method doesn't set the "length" property of partially
+ * applied functions.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.2.0
+ * @category Function
+ * @param {Function} func The function to partially apply arguments to.
+ * @param {...*} [partials] The arguments to be partially applied.
+ * @returns {Function} Returns the new partially applied function.
+ * @example
+ *
+ * var greet = function(greeting, name) {
+ * return greeting + ' ' + name;
+ * };
+ *
+ * var sayHelloTo = _.partial(greet, 'hello');
+ * sayHelloTo('fred');
+ * // => 'hello fred'
+ *
+ * // Partially applied with placeholders.
+ * var greetFred = _.partial(greet, _, 'fred');
+ * greetFred('hi');
+ * // => 'hi fred'
+ */
+ var partial = rest(function(func, partials) {
+ var holders = replaceHolders(partials, getPlaceholder(partial));
+ return createWrapper(func, PARTIAL_FLAG, undefined, partials, holders);
+ });
+
+ /**
+ * This method is like `_.partial` except that partially applied arguments
+ * are appended to the arguments it receives.
+ *
+ * The `_.partialRight.placeholder` value, which defaults to `_` in monolithic
+ * builds, may be used as a placeholder for partially applied arguments.
+ *
+ * **Note:** This method doesn't set the "length" property of partially
+ * applied functions.
+ *
+ * @static
+ * @memberOf _
+ * @since 1.0.0
+ * @category Function
+ * @param {Function} func The function to partially apply arguments to.
+ * @param {...*} [partials] The arguments to be partially applied.
+ * @returns {Function} Returns the new partially applied function.
+ * @example
+ *
+ * var greet = function(greeting, name) {
+ * return greeting + ' ' + name;
+ * };
+ *
+ * var greetFred = _.partialRight(greet, 'fred');
+ * greetFred('hi');
+ * // => 'hi fred'
+ *
+ * // Partially applied with placeholders.
+ * var sayHelloTo = _.partialRight(greet, 'hello', _);
+ * sayHelloTo('fred');
+ * // => 'hello fred'
+ */
+ var partialRight = rest(function(func, partials) {
+ var holders = replaceHolders(partials, getPlaceholder(partialRight));
+ return createWrapper(func, PARTIAL_RIGHT_FLAG, undefined, partials, holders);
+ });
+
+ /**
+ * Creates a function that invokes `func` with arguments arranged according
+ * to the specified `indexes` where the argument value at the first index is
+ * provided as the first argument, the argument value at the second index is
+ * provided as the second argument, and so on.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Function
+ * @param {Function} func The function to rearrange arguments for.
+ * @param {...(number|number[])} indexes The arranged argument indexes.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * var rearged = _.rearg(function(a, b, c) {
+ * return [a, b, c];
+ * }, 2, 0, 1);
+ *
+ * rearged('b', 'c', 'a')
+ * // => ['a', 'b', 'c']
+ */
+ var rearg = rest(function(func, indexes) {
+ return createWrapper(func, REARG_FLAG, undefined, undefined, undefined, baseFlatten(indexes, 1));
+ });
+
+ /**
+ * Creates a function that invokes `func` with the `this` binding of the
+ * created function and arguments from `start` and beyond provided as
+ * an array.
+ *
+ * **Note:** This method is based on the
+ * [rest parameter](https://mdn.io/rest_parameters).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Function
+ * @param {Function} func The function to apply a rest parameter to.
+ * @param {number} [start=func.length-1] The start position of the rest parameter.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * var say = _.rest(function(what, names) {
+ * return what + ' ' + _.initial(names).join(', ') +
+ * (_.size(names) > 1 ? ', & ' : '') + _.last(names);
+ * });
+ *
+ * say('hello', 'fred', 'barney', 'pebbles');
+ * // => 'hello fred, barney, & pebbles'
+ */
+ function rest(func, start) {
+ if (typeof func != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ start = nativeMax(start === undefined ? (func.length - 1) : toInteger(start), 0);
+ return function() {
+ var args = arguments,
+ index = -1,
+ length = nativeMax(args.length - start, 0),
+ array = Array(length);
+
+ while (++index < length) {
+ array[index] = args[start + index];
+ }
+ switch (start) {
+ case 0: return func.call(this, array);
+ case 1: return func.call(this, args[0], array);
+ case 2: return func.call(this, args[0], args[1], array);
+ }
+ var otherArgs = Array(start + 1);
+ index = -1;
+ while (++index < start) {
+ otherArgs[index] = args[index];
+ }
+ otherArgs[start] = array;
+ return apply(func, this, otherArgs);
+ };
+ }
+
+ /**
+ * Creates a function that invokes `func` with the `this` binding of the
+ * create function and an array of arguments much like
+ * [`Function#apply`](http://www.ecma-international.org/ecma-262/6.0/#sec-function.prototype.apply).
+ *
+ * **Note:** This method is based on the
+ * [spread operator](https://mdn.io/spread_operator).
+ *
+ * @static
+ * @memberOf _
+ * @since 3.2.0
+ * @category Function
+ * @param {Function} func The function to spread arguments over.
+ * @param {number} [start=0] The start position of the spread.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * var say = _.spread(function(who, what) {
+ * return who + ' says ' + what;
+ * });
+ *
+ * say(['fred', 'hello']);
+ * // => 'fred says hello'
+ *
+ * var numbers = Promise.all([
+ * Promise.resolve(40),
+ * Promise.resolve(36)
+ * ]);
+ *
+ * numbers.then(_.spread(function(x, y) {
+ * return x + y;
+ * }));
+ * // => a Promise of 76
+ */
+ function spread(func, start) {
+ if (typeof func != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ start = start === undefined ? 0 : nativeMax(toInteger(start), 0);
+ return rest(function(args) {
+ var array = args[start],
+ otherArgs = castSlice(args, 0, start);
+
+ if (array) {
+ arrayPush(otherArgs, array);
+ }
+ return apply(func, this, otherArgs);
+ });
+ }
+
+ /**
+ * Creates a throttled function that only invokes `func` at most once per
+ * every `wait` milliseconds. The throttled function comes with a `cancel`
+ * method to cancel delayed `func` invocations and a `flush` method to
+ * immediately invoke them. Provide an options object to indicate whether
+ * `func` should be invoked on the leading and/or trailing edge of the `wait`
+ * timeout. The `func` is invoked with the last arguments provided to the
+ * throttled function. Subsequent calls to the throttled function return the
+ * result of the last `func` invocation.
+ *
+ * **Note:** If `leading` and `trailing` options are `true`, `func` is
+ * invoked on the trailing edge of the timeout only if the throttled function
+ * is invoked more than once during the `wait` timeout.
+ *
+ * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
+ * for details over the differences between `_.throttle` and `_.debounce`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Function
+ * @param {Function} func The function to throttle.
+ * @param {number} [wait=0] The number of milliseconds to throttle invocations to.
+ * @param {Object} [options={}] The options object.
+ * @param {boolean} [options.leading=true]
+ * Specify invoking on the leading edge of the timeout.
+ * @param {boolean} [options.trailing=true]
+ * Specify invoking on the trailing edge of the timeout.
+ * @returns {Function} Returns the new throttled function.
+ * @example
+ *
+ * // Avoid excessively updating the position while scrolling.
+ * jQuery(window).on('scroll', _.throttle(updatePosition, 100));
+ *
+ * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.
+ * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });
+ * jQuery(element).on('click', throttled);
+ *
+ * // Cancel the trailing throttled invocation.
+ * jQuery(window).on('popstate', throttled.cancel);
+ */
+ function throttle(func, wait, options) {
+ var leading = true,
+ trailing = true;
+
+ if (typeof func != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ if (isObject(options)) {
+ leading = 'leading' in options ? !!options.leading : leading;
+ trailing = 'trailing' in options ? !!options.trailing : trailing;
+ }
+ return debounce(func, wait, {
+ 'leading': leading,
+ 'maxWait': wait,
+ 'trailing': trailing
+ });
+ }
+
+ /**
+ * Creates a function that accepts up to one argument, ignoring any
+ * additional arguments.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Function
+ * @param {Function} func The function to cap arguments for.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * _.map(['6', '8', '10'], _.unary(parseInt));
+ * // => [6, 8, 10]
+ */
+ function unary(func) {
+ return ary(func, 1);
+ }
+
+ /**
+ * Creates a function that provides `value` to the wrapper function as its
+ * first argument. Any additional arguments provided to the function are
+ * appended to those provided to the wrapper function. The wrapper is invoked
+ * with the `this` binding of the created function.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Function
+ * @param {*} value The value to wrap.
+ * @param {Function} [wrapper=identity] The wrapper function.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * var p = _.wrap(_.escape, function(func, text) {
+ * return '<p>' + func(text) + '</p>';
+ * });
+ *
+ * p('fred, barney, & pebbles');
+ * // => '<p>fred, barney, & pebbles</p>'
+ */
+ function wrap(value, wrapper) {
+ wrapper = wrapper == null ? identity : wrapper;
+ return partial(wrapper, value);
+ }
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Casts `value` as an array if it's not one.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.4.0
+ * @category Lang
+ * @param {*} value The value to inspect.
+ * @returns {Array} Returns the cast array.
+ * @example
+ *
+ * _.castArray(1);
+ * // => [1]
+ *
+ * _.castArray({ 'a': 1 });
+ * // => [{ 'a': 1 }]
+ *
+ * _.castArray('abc');
+ * // => ['abc']
+ *
+ * _.castArray(null);
+ * // => [null]
+ *
+ * _.castArray(undefined);
+ * // => [undefined]
+ *
+ * _.castArray();
+ * // => []
+ *
+ * var array = [1, 2, 3];
+ * console.log(_.castArray(array) === array);
+ * // => true
+ */
+ function castArray() {
+ if (!arguments.length) {
+ return [];
+ }
+ var value = arguments[0];
+ return isArray(value) ? value : [value];
+ }
+
+ /**
+ * Creates a shallow clone of `value`.
+ *
+ * **Note:** This method is loosely based on the
+ * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm)
+ * and supports cloning arrays, array buffers, booleans, date objects, maps,
+ * numbers, `Object` objects, regexes, sets, strings, symbols, and typed
+ * arrays. The own enumerable properties of `arguments` objects are cloned
+ * as plain objects. An empty object is returned for uncloneable values such
+ * as error objects, functions, DOM nodes, and WeakMaps.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to clone.
+ * @returns {*} Returns the cloned value.
+ * @see _.cloneDeep
+ * @example
+ *
+ * var objects = [{ 'a': 1 }, { 'b': 2 }];
+ *
+ * var shallow = _.clone(objects);
+ * console.log(shallow[0] === objects[0]);
+ * // => true
+ */
+ function clone(value) {
+ return baseClone(value, false, true);
+ }
+
+ /**
+ * This method is like `_.clone` except that it accepts `customizer` which
+ * is invoked to produce the cloned value. If `customizer` returns `undefined`,
+ * cloning is handled by the method instead. The `customizer` is invoked with
+ * up to four arguments; (value [, index|key, object, stack]).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to clone.
+ * @param {Function} [customizer] The function to customize cloning.
+ * @returns {*} Returns the cloned value.
+ * @see _.cloneDeepWith
+ * @example
+ *
+ * function customizer(value) {
+ * if (_.isElement(value)) {
+ * return value.cloneNode(false);
+ * }
+ * }
+ *
+ * var el = _.cloneWith(document.body, customizer);
+ *
+ * console.log(el === document.body);
+ * // => false
+ * console.log(el.nodeName);
+ * // => 'BODY'
+ * console.log(el.childNodes.length);
+ * // => 0
+ */
+ function cloneWith(value, customizer) {
+ return baseClone(value, false, true, customizer);
+ }
+
+ /**
+ * This method is like `_.clone` except that it recursively clones `value`.
+ *
+ * @static
+ * @memberOf _
+ * @since 1.0.0
+ * @category Lang
+ * @param {*} value The value to recursively clone.
+ * @returns {*} Returns the deep cloned value.
+ * @see _.clone
+ * @example
+ *
+ * var objects = [{ 'a': 1 }, { 'b': 2 }];
+ *
+ * var deep = _.cloneDeep(objects);
+ * console.log(deep[0] === objects[0]);
+ * // => false
+ */
+ function cloneDeep(value) {
+ return baseClone(value, true, true);
+ }
+
+ /**
+ * This method is like `_.cloneWith` except that it recursively clones `value`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to recursively clone.
+ * @param {Function} [customizer] The function to customize cloning.
+ * @returns {*} Returns the deep cloned value.
+ * @see _.cloneWith
+ * @example
+ *
+ * function customizer(value) {
+ * if (_.isElement(value)) {
+ * return value.cloneNode(true);
+ * }
+ * }
+ *
+ * var el = _.cloneDeepWith(document.body, customizer);
+ *
+ * console.log(el === document.body);
+ * // => false
+ * console.log(el.nodeName);
+ * // => 'BODY'
+ * console.log(el.childNodes.length);
+ * // => 20
+ */
+ function cloneDeepWith(value, customizer) {
+ return baseClone(value, true, true, customizer);
+ }
+
+ /**
+ * Performs a
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
+ * comparison between two values to determine if they are equivalent.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
+ * @example
+ *
+ * var object = { 'user': 'fred' };
+ * var other = { 'user': 'fred' };
+ *
+ * _.eq(object, object);
+ * // => true
+ *
+ * _.eq(object, other);
+ * // => false
+ *
+ * _.eq('a', 'a');
+ * // => true
+ *
+ * _.eq('a', Object('a'));
+ * // => false
+ *
+ * _.eq(NaN, NaN);
+ * // => true
+ */
+ function eq(value, other) {
+ return value === other || (value !== value && other !== other);
+ }
+
+ /**
+ * Checks if `value` is greater than `other`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.9.0
+ * @category Lang
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @returns {boolean} Returns `true` if `value` is greater than `other`,
+ * else `false`.
+ * @see _.lt
+ * @example
+ *
+ * _.gt(3, 1);
+ * // => true
+ *
+ * _.gt(3, 3);
+ * // => false
+ *
+ * _.gt(1, 3);
+ * // => false
+ */
+ var gt = createRelationalOperation(baseGt);
+
+ /**
+ * Checks if `value` is greater than or equal to `other`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.9.0
+ * @category Lang
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @returns {boolean} Returns `true` if `value` is greater than or equal to
+ * `other`, else `false`.
+ * @see _.lte
+ * @example
+ *
+ * _.gte(3, 1);
+ * // => true
+ *
+ * _.gte(3, 3);
+ * // => true
+ *
+ * _.gte(1, 3);
+ * // => false
+ */
+ var gte = createRelationalOperation(function(value, other) {
+ return value >= other;
+ });
+
+ /**
+ * Checks if `value` is likely an `arguments` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is correctly classified,
+ * else `false`.
+ * @example
+ *
+ * _.isArguments(function() { return arguments; }());
+ * // => true
+ *
+ * _.isArguments([1, 2, 3]);
+ * // => false
+ */
+ function isArguments(value) {
+ // Safari 8.1 incorrectly makes `arguments.callee` enumerable in strict mode.
+ return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') &&
+ (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag);
+ }
+
+ /**
+ * Checks if `value` is classified as an `Array` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @type {Function}
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is correctly classified,
+ * else `false`.
+ * @example
+ *
+ * _.isArray([1, 2, 3]);
+ * // => true
+ *
+ * _.isArray(document.body.children);
+ * // => false
+ *
+ * _.isArray('abc');
+ * // => false
+ *
+ * _.isArray(_.noop);
+ * // => false
+ */
+ var isArray = Array.isArray;
+
+ /**
+ * Checks if `value` is classified as an `ArrayBuffer` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.3.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is correctly classified,
+ * else `false`.
+ * @example
+ *
+ * _.isArrayBuffer(new ArrayBuffer(2));
+ * // => true
+ *
+ * _.isArrayBuffer(new Array(2));
+ * // => false
+ */
+ function isArrayBuffer(value) {
+ return isObjectLike(value) && objectToString.call(value) == arrayBufferTag;
+ }
+
+ /**
+ * Checks if `value` is array-like. A value is considered array-like if it's
+ * not a function and has a `value.length` that's an integer greater than or
+ * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
+ * @example
+ *
+ * _.isArrayLike([1, 2, 3]);
+ * // => true
+ *
+ * _.isArrayLike(document.body.children);
+ * // => true
+ *
+ * _.isArrayLike('abc');
+ * // => true
+ *
+ * _.isArrayLike(_.noop);
+ * // => false
+ */
+ function isArrayLike(value) {
+ return value != null && isLength(getLength(value)) && !isFunction(value);
+ }
+
+ /**
+ * This method is like `_.isArrayLike` except that it also checks if `value`
+ * is an object.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an array-like object,
+ * else `false`.
+ * @example
+ *
+ * _.isArrayLikeObject([1, 2, 3]);
+ * // => true
+ *
+ * _.isArrayLikeObject(document.body.children);
+ * // => true
+ *
+ * _.isArrayLikeObject('abc');
+ * // => false
+ *
+ * _.isArrayLikeObject(_.noop);
+ * // => false
+ */
+ function isArrayLikeObject(value) {
+ return isObjectLike(value) && isArrayLike(value);
+ }
+
+ /**
+ * Checks if `value` is classified as a boolean primitive or object.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is correctly classified,
+ * else `false`.
+ * @example
+ *
+ * _.isBoolean(false);
+ * // => true
+ *
+ * _.isBoolean(null);
+ * // => false
+ */
+ function isBoolean(value) {
+ return value === true || value === false ||
+ (isObjectLike(value) && objectToString.call(value) == boolTag);
+ }
+
+ /**
+ * Checks if `value` is a buffer.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.3.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
+ * @example
+ *
+ * _.isBuffer(new Buffer(2));
+ * // => true
+ *
+ * _.isBuffer(new Uint8Array(2));
+ * // => false
+ */
+ var isBuffer = !Buffer ? constant(false) : function(value) {
+ return value instanceof Buffer;
+ };
+
+ /**
+ * Checks if `value` is classified as a `Date` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is correctly classified,
+ * else `false`.
+ * @example
+ *
+ * _.isDate(new Date);
+ * // => true
+ *
+ * _.isDate('Mon April 23 2012');
+ * // => false
+ */
+ function isDate(value) {
+ return isObjectLike(value) && objectToString.call(value) == dateTag;
+ }
+
+ /**
+ * Checks if `value` is likely a DOM element.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a DOM element,
+ * else `false`.
+ * @example
+ *
+ * _.isElement(document.body);
+ * // => true
+ *
+ * _.isElement('<body>');
+ * // => false
+ */
+ function isElement(value) {
+ return !!value && value.nodeType === 1 && isObjectLike(value) && !isPlainObject(value);
+ }
+
+ /**
+ * Checks if `value` is an empty object, collection, map, or set.
+ *
+ * Objects are considered empty if they have no own enumerable string keyed
+ * properties.
+ *
+ * Array-like values such as `arguments` objects, arrays, buffers, strings, or
+ * jQuery-like collections are considered empty if they have a `length` of `0`.
+ * Similarly, maps and sets are considered empty if they have a `size` of `0`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is empty, else `false`.
+ * @example
+ *
+ * _.isEmpty(null);
+ * // => true
+ *
+ * _.isEmpty(true);
+ * // => true
+ *
+ * _.isEmpty(1);
+ * // => true
+ *
+ * _.isEmpty([1, 2, 3]);
+ * // => false
+ *
+ * _.isEmpty({ 'a': 1 });
+ * // => false
+ */
+ function isEmpty(value) {
+ if (isArrayLike(value) &&
+ (isArray(value) || isString(value) || isFunction(value.splice) ||
+ isArguments(value) || isBuffer(value))) {
+ return !value.length;
+ }
+ if (isObjectLike(value)) {
+ var tag = getTag(value);
+ if (tag == mapTag || tag == setTag) {
+ return !value.size;
+ }
+ }
+ for (var key in value) {
+ if (hasOwnProperty.call(value, key)) {
+ return false;
+ }
+ }
+ return !(nonEnumShadows && keys(value).length);
+ }
+
+ /**
+ * Performs a deep comparison between two values to determine if they are
+ * equivalent.
+ *
+ * **Note:** This method supports comparing arrays, array buffers, booleans,
+ * date objects, error objects, maps, numbers, `Object` objects, regexes,
+ * sets, strings, symbols, and typed arrays. `Object` objects are compared
+ * by their own, not inherited, enumerable properties. Functions and DOM
+ * nodes are **not** supported.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @returns {boolean} Returns `true` if the values are equivalent,
+ * else `false`.
+ * @example
+ *
+ * var object = { 'user': 'fred' };
+ * var other = { 'user': 'fred' };
+ *
+ * _.isEqual(object, other);
+ * // => true
+ *
+ * object === other;
+ * // => false
+ */
+ function isEqual(value, other) {
+ return baseIsEqual(value, other);
+ }
+
+ /**
+ * This method is like `_.isEqual` except that it accepts `customizer` which
+ * is invoked to compare values. If `customizer` returns `undefined`, comparisons
+ * are handled by the method instead. The `customizer` is invoked with up to
+ * six arguments: (objValue, othValue [, index|key, object, other, stack]).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @param {Function} [customizer] The function to customize comparisons.
+ * @returns {boolean} Returns `true` if the values are equivalent,
+ * else `false`.
+ * @example
+ *
+ * function isGreeting(value) {
+ * return /^h(?:i|ello)$/.test(value);
+ * }
+ *
+ * function customizer(objValue, othValue) {
+ * if (isGreeting(objValue) && isGreeting(othValue)) {
+ * return true;
+ * }
+ * }
+ *
+ * var array = ['hello', 'goodbye'];
+ * var other = ['hi', 'goodbye'];
+ *
+ * _.isEqualWith(array, other, customizer);
+ * // => true
+ */
+ function isEqualWith(value, other, customizer) {
+ customizer = typeof customizer == 'function' ? customizer : undefined;
+ var result = customizer ? customizer(value, other) : undefined;
+ return result === undefined ? baseIsEqual(value, other, customizer) : !!result;
+ }
+
+ /**
+ * Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`,
+ * `SyntaxError`, `TypeError`, or `URIError` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an error object,
+ * else `false`.
+ * @example
+ *
+ * _.isError(new Error);
+ * // => true
+ *
+ * _.isError(Error);
+ * // => false
+ */
+ function isError(value) {
+ if (!isObjectLike(value)) {
+ return false;
+ }
+ return (objectToString.call(value) == errorTag) ||
+ (typeof value.message == 'string' && typeof value.name == 'string');
+ }
+
+ /**
+ * Checks if `value` is a finite primitive number.
+ *
+ * **Note:** This method is based on
+ * [`Number.isFinite`](https://mdn.io/Number/isFinite).
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a finite number,
+ * else `false`.
+ * @example
+ *
+ * _.isFinite(3);
+ * // => true
+ *
+ * _.isFinite(Number.MAX_VALUE);
+ * // => true
+ *
+ * _.isFinite(3.14);
+ * // => true
+ *
+ * _.isFinite(Infinity);
+ * // => false
+ */
+ function isFinite(value) {
+ return typeof value == 'number' && nativeIsFinite(value);
+ }
+
+ /**
+ * Checks if `value` is classified as a `Function` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is correctly classified,
+ * else `false`.
+ * @example
+ *
+ * _.isFunction(_);
+ * // => true
+ *
+ * _.isFunction(/abc/);
+ * // => false
+ */
+ function isFunction(value) {
+ // The use of `Object#toString` avoids issues with the `typeof` operator
+ // in Safari 8 which returns 'object' for typed array and weak map constructors,
+ // and PhantomJS 1.9 which returns 'function' for `NodeList` instances.
+ var tag = isObject(value) ? objectToString.call(value) : '';
+ return tag == funcTag || tag == genTag;
+ }
+
+ /**
+ * Checks if `value` is an integer.
+ *
+ * **Note:** This method is based on
+ * [`Number.isInteger`](https://mdn.io/Number/isInteger).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an integer, else `false`.
+ * @example
+ *
+ * _.isInteger(3);
+ * // => true
+ *
+ * _.isInteger(Number.MIN_VALUE);
+ * // => false
+ *
+ * _.isInteger(Infinity);
+ * // => false
+ *
+ * _.isInteger('3');
+ * // => false
+ */
+ function isInteger(value) {
+ return typeof value == 'number' && value == toInteger(value);
+ }
+
+ /**
+ * Checks if `value` is a valid array-like length.
+ *
+ * **Note:** This function is loosely based on
+ * [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a valid length,
+ * else `false`.
+ * @example
+ *
+ * _.isLength(3);
+ * // => true
+ *
+ * _.isLength(Number.MIN_VALUE);
+ * // => false
+ *
+ * _.isLength(Infinity);
+ * // => false
+ *
+ * _.isLength('3');
+ * // => false
+ */
+ function isLength(value) {
+ return typeof value == 'number' &&
+ value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
+ }
+
+ /**
+ * Checks if `value` is the
+ * [language type](http://www.ecma-international.org/ecma-262/6.0/#sec-ecmascript-language-types)
+ * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an object, else `false`.
+ * @example
+ *
+ * _.isObject({});
+ * // => true
+ *
+ * _.isObject([1, 2, 3]);
+ * // => true
+ *
+ * _.isObject(_.noop);
+ * // => true
+ *
+ * _.isObject(null);
+ * // => false
+ */
+ function isObject(value) {
+ var type = typeof value;
+ return !!value && (type == 'object' || type == 'function');
+ }
+
+ /**
+ * Checks if `value` is object-like. A value is object-like if it's not `null`
+ * and has a `typeof` result of "object".
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
+ * @example
+ *
+ * _.isObjectLike({});
+ * // => true
+ *
+ * _.isObjectLike([1, 2, 3]);
+ * // => true
+ *
+ * _.isObjectLike(_.noop);
+ * // => false
+ *
+ * _.isObjectLike(null);
+ * // => false
+ */
+ function isObjectLike(value) {
+ return !!value && typeof value == 'object';
+ }
+
+ /**
+ * Checks if `value` is classified as a `Map` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.3.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is correctly classified,
+ * else `false`.
+ * @example
+ *
+ * _.isMap(new Map);
+ * // => true
+ *
+ * _.isMap(new WeakMap);
+ * // => false
+ */
+ function isMap(value) {
+ return isObjectLike(value) && getTag(value) == mapTag;
+ }
+
+ /**
+ * Performs a partial deep comparison between `object` and `source` to
+ * determine if `object` contains equivalent property values. This method is
+ * equivalent to a `_.matches` function when `source` is partially applied.
+ *
+ * **Note:** This method supports comparing the same values as `_.isEqual`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Lang
+ * @param {Object} object The object to inspect.
+ * @param {Object} source The object of property values to match.
+ * @returns {boolean} Returns `true` if `object` is a match, else `false`.
+ * @example
+ *
+ * var object = { 'user': 'fred', 'age': 40 };
+ *
+ * _.isMatch(object, { 'age': 40 });
+ * // => true
+ *
+ * _.isMatch(object, { 'age': 36 });
+ * // => false
+ */
+ function isMatch(object, source) {
+ return object === source || baseIsMatch(object, source, getMatchData(source));
+ }
+
+ /**
+ * This method is like `_.isMatch` except that it accepts `customizer` which
+ * is invoked to compare values. If `customizer` returns `undefined`, comparisons
+ * are handled by the method instead. The `customizer` is invoked with five
+ * arguments: (objValue, srcValue, index|key, object, source).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {Object} object The object to inspect.
+ * @param {Object} source The object of property values to match.
+ * @param {Function} [customizer] The function to customize comparisons.
+ * @returns {boolean} Returns `true` if `object` is a match, else `false`.
+ * @example
+ *
+ * function isGreeting(value) {
+ * return /^h(?:i|ello)$/.test(value);
+ * }
+ *
+ * function customizer(objValue, srcValue) {
+ * if (isGreeting(objValue) && isGreeting(srcValue)) {
+ * return true;
+ * }
+ * }
+ *
+ * var object = { 'greeting': 'hello' };
+ * var source = { 'greeting': 'hi' };
+ *
+ * _.isMatchWith(object, source, customizer);
+ * // => true
+ */
+ function isMatchWith(object, source, customizer) {
+ customizer = typeof customizer == 'function' ? customizer : undefined;
+ return baseIsMatch(object, source, getMatchData(source), customizer);
+ }
+
+ /**
+ * Checks if `value` is `NaN`.
+ *
+ * **Note:** This method is based on
+ * [`Number.isNaN`](https://mdn.io/Number/isNaN) and is not the same as
+ * global [`isNaN`](https://mdn.io/isNaN) which returns `true` for
+ * `undefined` and other non-number values.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.
+ * @example
+ *
+ * _.isNaN(NaN);
+ * // => true
+ *
+ * _.isNaN(new Number(NaN));
+ * // => true
+ *
+ * isNaN(undefined);
+ * // => true
+ *
+ * _.isNaN(undefined);
+ * // => false
+ */
+ function isNaN(value) {
+ // An `NaN` primitive is the only value that is not equal to itself.
+ // Perform the `toStringTag` check first to avoid errors with some
+ // ActiveX objects in IE.
+ return isNumber(value) && value != +value;
+ }
+
+ /**
+ * Checks if `value` is a native function.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a native function,
+ * else `false`.
+ * @example
+ *
+ * _.isNative(Array.prototype.push);
+ * // => true
+ *
+ * _.isNative(_);
+ * // => false
+ */
+ function isNative(value) {
+ if (!isObject(value)) {
+ return false;
+ }
+ var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor;
+ return pattern.test(toSource(value));
+ }
+
+ /**
+ * Checks if `value` is `null`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is `null`, else `false`.
+ * @example
+ *
+ * _.isNull(null);
+ * // => true
+ *
+ * _.isNull(void 0);
+ * // => false
+ */
+ function isNull(value) {
+ return value === null;
+ }
+
+ /**
+ * Checks if `value` is `null` or `undefined`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is nullish, else `false`.
+ * @example
+ *
+ * _.isNil(null);
+ * // => true
+ *
+ * _.isNil(void 0);
+ * // => true
+ *
+ * _.isNil(NaN);
+ * // => false
+ */
+ function isNil(value) {
+ return value == null;
+ }
+
+ /**
+ * Checks if `value` is classified as a `Number` primitive or object.
+ *
+ * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are
+ * classified as numbers, use the `_.isFinite` method.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is correctly classified,
+ * else `false`.
+ * @example
+ *
+ * _.isNumber(3);
+ * // => true
+ *
+ * _.isNumber(Number.MIN_VALUE);
+ * // => true
+ *
+ * _.isNumber(Infinity);
+ * // => true
+ *
+ * _.isNumber('3');
+ * // => false
+ */
+ function isNumber(value) {
+ return typeof value == 'number' ||
+ (isObjectLike(value) && objectToString.call(value) == numberTag);
+ }
+
+ /**
+ * Checks if `value` is a plain object, that is, an object created by the
+ * `Object` constructor or one with a `[[Prototype]]` of `null`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.8.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a plain object,
+ * else `false`.
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * }
+ *
+ * _.isPlainObject(new Foo);
+ * // => false
+ *
+ * _.isPlainObject([1, 2, 3]);
+ * // => false
+ *
+ * _.isPlainObject({ 'x': 0, 'y': 0 });
+ * // => true
+ *
+ * _.isPlainObject(Object.create(null));
+ * // => true
+ */
+ function isPlainObject(value) {
+ if (!isObjectLike(value) ||
+ objectToString.call(value) != objectTag || isHostObject(value)) {
+ return false;
+ }
+ var proto = getPrototype(value);
+ if (proto === null) {
+ return true;
+ }
+ var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;
+ return (typeof Ctor == 'function' &&
+ Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString);
+ }
+
+ /**
+ * Checks if `value` is classified as a `RegExp` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is correctly classified,
+ * else `false`.
+ * @example
+ *
+ * _.isRegExp(/abc/);
+ * // => true
+ *
+ * _.isRegExp('/abc/');
+ * // => false
+ */
+ function isRegExp(value) {
+ return isObject(value) && objectToString.call(value) == regexpTag;
+ }
+
+ /**
+ * Checks if `value` is a safe integer. An integer is safe if it's an IEEE-754
+ * double precision number which isn't the result of a rounded unsafe integer.
+ *
+ * **Note:** This method is based on
+ * [`Number.isSafeInteger`](https://mdn.io/Number/isSafeInteger).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a safe integer,
+ * else `false`.
+ * @example
+ *
+ * _.isSafeInteger(3);
+ * // => true
+ *
+ * _.isSafeInteger(Number.MIN_VALUE);
+ * // => false
+ *
+ * _.isSafeInteger(Infinity);
+ * // => false
+ *
+ * _.isSafeInteger('3');
+ * // => false
+ */
+ function isSafeInteger(value) {
+ return isInteger(value) && value >= -MAX_SAFE_INTEGER && value <= MAX_SAFE_INTEGER;
+ }
+
+ /**
+ * Checks if `value` is classified as a `Set` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.3.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is correctly classified,
+ * else `false`.
+ * @example
+ *
+ * _.isSet(new Set);
+ * // => true
+ *
+ * _.isSet(new WeakSet);
+ * // => false
+ */
+ function isSet(value) {
+ return isObjectLike(value) && getTag(value) == setTag;
+ }
+
+ /**
+ * Checks if `value` is classified as a `String` primitive or object.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is correctly classified,
+ * else `false`.
+ * @example
+ *
+ * _.isString('abc');
+ * // => true
+ *
+ * _.isString(1);
+ * // => false
+ */
+ function isString(value) {
+ return typeof value == 'string' ||
+ (!isArray(value) && isObjectLike(value) && objectToString.call(value) == stringTag);
+ }
+
+ /**
+ * Checks if `value` is classified as a `Symbol` primitive or object.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is correctly classified,
+ * else `false`.
+ * @example
+ *
+ * _.isSymbol(Symbol.iterator);
+ * // => true
+ *
+ * _.isSymbol('abc');
+ * // => false
+ */
+ function isSymbol(value) {
+ return typeof value == 'symbol' ||
+ (isObjectLike(value) && objectToString.call(value) == symbolTag);
+ }
+
+ /**
+ * Checks if `value` is classified as a typed array.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is correctly classified,
+ * else `false`.
+ * @example
+ *
+ * _.isTypedArray(new Uint8Array);
+ * // => true
+ *
+ * _.isTypedArray([]);
+ * // => false
+ */
+ function isTypedArray(value) {
+ return isObjectLike(value) &&
+ isLength(value.length) && !!typedArrayTags[objectToString.call(value)];
+ }
+
+ /**
+ * Checks if `value` is `undefined`.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`.
+ * @example
+ *
+ * _.isUndefined(void 0);
+ * // => true
+ *
+ * _.isUndefined(null);
+ * // => false
+ */
+ function isUndefined(value) {
+ return value === undefined;
+ }
+
+ /**
+ * Checks if `value` is classified as a `WeakMap` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.3.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is correctly classified,
+ * else `false`.
+ * @example
+ *
+ * _.isWeakMap(new WeakMap);
+ * // => true
+ *
+ * _.isWeakMap(new Map);
+ * // => false
+ */
+ function isWeakMap(value) {
+ return isObjectLike(value) && getTag(value) == weakMapTag;
+ }
+
+ /**
+ * Checks if `value` is classified as a `WeakSet` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.3.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is correctly classified,
+ * else `false`.
+ * @example
+ *
+ * _.isWeakSet(new WeakSet);
+ * // => true
+ *
+ * _.isWeakSet(new Set);
+ * // => false
+ */
+ function isWeakSet(value) {
+ return isObjectLike(value) && objectToString.call(value) == weakSetTag;
+ }
+
+ /**
+ * Checks if `value` is less than `other`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.9.0
+ * @category Lang
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @returns {boolean} Returns `true` if `value` is less than `other`,
+ * else `false`.
+ * @see _.gt
+ * @example
+ *
+ * _.lt(1, 3);
+ * // => true
+ *
+ * _.lt(3, 3);
+ * // => false
+ *
+ * _.lt(3, 1);
+ * // => false
+ */
+ var lt = createRelationalOperation(baseLt);
+
+ /**
+ * Checks if `value` is less than or equal to `other`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.9.0
+ * @category Lang
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @returns {boolean} Returns `true` if `value` is less than or equal to
+ * `other`, else `false`.
+ * @see _.gte
+ * @example
+ *
+ * _.lte(1, 3);
+ * // => true
+ *
+ * _.lte(3, 3);
+ * // => true
+ *
+ * _.lte(3, 1);
+ * // => false
+ */
+ var lte = createRelationalOperation(function(value, other) {
+ return value <= other;
+ });
+
+ /**
+ * Converts `value` to an array.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to convert.
+ * @returns {Array} Returns the converted array.
+ * @example
+ *
+ * _.toArray({ 'a': 1, 'b': 2 });
+ * // => [1, 2]
+ *
+ * _.toArray('abc');
+ * // => ['a', 'b', 'c']
+ *
+ * _.toArray(1);
+ * // => []
+ *
+ * _.toArray(null);
+ * // => []
+ */
+ function toArray(value) {
+ if (!value) {
+ return [];
+ }
+ if (isArrayLike(value)) {
+ return isString(value) ? stringToArray(value) : copyArray(value);
+ }
+ if (iteratorSymbol && value[iteratorSymbol]) {
+ return iteratorToArray(value[iteratorSymbol]());
+ }
+ var tag = getTag(value),
+ func = tag == mapTag ? mapToArray : (tag == setTag ? setToArray : values);
+
+ return func(value);
+ }
+
+ /**
+ * Converts `value` to an integer.
+ *
+ * **Note:** This function is loosely based on
+ * [`ToInteger`](http://www.ecma-international.org/ecma-262/6.0/#sec-tointeger).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to convert.
+ * @returns {number} Returns the converted integer.
+ * @example
+ *
+ * _.toInteger(3);
+ * // => 3
+ *
+ * _.toInteger(Number.MIN_VALUE);
+ * // => 0
+ *
+ * _.toInteger(Infinity);
+ * // => 1.7976931348623157e+308
+ *
+ * _.toInteger('3');
+ * // => 3
+ */
+ function toInteger(value) {
+ if (!value) {
+ return value === 0 ? value : 0;
+ }
+ value = toNumber(value);
+ if (value === INFINITY || value === -INFINITY) {
+ var sign = (value < 0 ? -1 : 1);
+ return sign * MAX_INTEGER;
+ }
+ var remainder = value % 1;
+ return value === value ? (remainder ? value - remainder : value) : 0;
+ }
+
+ /**
+ * Converts `value` to an integer suitable for use as the length of an
+ * array-like object.
+ *
+ * **Note:** This method is based on
+ * [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to convert.
+ * @returns {number} Returns the converted integer.
+ * @example
+ *
+ * _.toLength(3);
+ * // => 3
+ *
+ * _.toLength(Number.MIN_VALUE);
+ * // => 0
+ *
+ * _.toLength(Infinity);
+ * // => 4294967295
+ *
+ * _.toLength('3');
+ * // => 3
+ */
+ function toLength(value) {
+ return value ? baseClamp(toInteger(value), 0, MAX_ARRAY_LENGTH) : 0;
+ }
+
+ /**
+ * Converts `value` to a number.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to process.
+ * @returns {number} Returns the number.
+ * @example
+ *
+ * _.toNumber(3);
+ * // => 3
+ *
+ * _.toNumber(Number.MIN_VALUE);
+ * // => 5e-324
+ *
+ * _.toNumber(Infinity);
+ * // => Infinity
+ *
+ * _.toNumber('3');
+ * // => 3
+ */
+ function toNumber(value) {
+ if (typeof value == 'number') {
+ return value;
+ }
+ if (isSymbol(value)) {
+ return NAN;
+ }
+ if (isObject(value)) {
+ var other = isFunction(value.valueOf) ? value.valueOf() : value;
+ value = isObject(other) ? (other + '') : other;
+ }
+ if (typeof value != 'string') {
+ return value === 0 ? value : +value;
+ }
+ value = value.replace(reTrim, '');
+ var isBinary = reIsBinary.test(value);
+ return (isBinary || reIsOctal.test(value))
+ ? freeParseInt(value.slice(2), isBinary ? 2 : 8)
+ : (reIsBadHex.test(value) ? NAN : +value);
+ }
+
+ /**
+ * Converts `value` to a plain object flattening inherited enumerable string
+ * keyed properties of `value` to own properties of the plain object.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Lang
+ * @param {*} value The value to convert.
+ * @returns {Object} Returns the converted plain object.
+ * @example
+ *
+ * function Foo() {
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.assign({ 'a': 1 }, new Foo);
+ * // => { 'a': 1, 'b': 2 }
+ *
+ * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));
+ * // => { 'a': 1, 'b': 2, 'c': 3 }
+ */
+ function toPlainObject(value) {
+ return copyObject(value, keysIn(value));
+ }
+
+ /**
+ * Converts `value` to a safe integer. A safe integer can be compared and
+ * represented correctly.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to convert.
+ * @returns {number} Returns the converted integer.
+ * @example
+ *
+ * _.toSafeInteger(3);
+ * // => 3
+ *
+ * _.toSafeInteger(Number.MIN_VALUE);
+ * // => 0
+ *
+ * _.toSafeInteger(Infinity);
+ * // => 9007199254740991
+ *
+ * _.toSafeInteger('3');
+ * // => 3
+ */
+ function toSafeInteger(value) {
+ return baseClamp(toInteger(value), -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER);
+ }
+
+ /**
+ * Converts `value` to a string. An empty string is returned for `null`
+ * and `undefined` values. The sign of `-0` is preserved.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to process.
+ * @returns {string} Returns the string.
+ * @example
+ *
+ * _.toString(null);
+ * // => ''
+ *
+ * _.toString(-0);
+ * // => '-0'
+ *
+ * _.toString([1, 2, 3]);
+ * // => '1,2,3'
+ */
+ function toString(value) {
+ return value == null ? '' : baseToString(value);
+ }
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Assigns own enumerable string keyed properties of source objects to the
+ * destination object. Source objects are applied from left to right.
+ * Subsequent sources overwrite property assignments of previous sources.
+ *
+ * **Note:** This method mutates `object` and is loosely based on
+ * [`Object.assign`](https://mdn.io/Object/assign).
+ *
+ * @static
+ * @memberOf _
+ * @since 0.10.0
+ * @category Object
+ * @param {Object} object The destination object.
+ * @param {...Object} [sources] The source objects.
+ * @returns {Object} Returns `object`.
+ * @see _.assignIn
+ * @example
+ *
+ * function Foo() {
+ * this.c = 3;
+ * }
+ *
+ * function Bar() {
+ * this.e = 5;
+ * }
+ *
+ * Foo.prototype.d = 4;
+ * Bar.prototype.f = 6;
+ *
+ * _.assign({ 'a': 1 }, new Foo, new Bar);
+ * // => { 'a': 1, 'c': 3, 'e': 5 }
+ */
+ var assign = createAssigner(function(object, source) {
+ if (nonEnumShadows || isPrototype(source) || isArrayLike(source)) {
+ copyObject(source, keys(source), object);
+ return;
+ }
+ for (var key in source) {
+ if (hasOwnProperty.call(source, key)) {
+ assignValue(object, key, source[key]);
+ }
+ }
+ });
+
+ /**
+ * This method is like `_.assign` except that it iterates over own and
+ * inherited source properties.
+ *
+ * **Note:** This method mutates `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @alias extend
+ * @category Object
+ * @param {Object} object The destination object.
+ * @param {...Object} [sources] The source objects.
+ * @returns {Object} Returns `object`.
+ * @see _.assign
+ * @example
+ *
+ * function Foo() {
+ * this.b = 2;
+ * }
+ *
+ * function Bar() {
+ * this.d = 4;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ * Bar.prototype.e = 5;
+ *
+ * _.assignIn({ 'a': 1 }, new Foo, new Bar);
+ * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4, 'e': 5 }
+ */
+ var assignIn = createAssigner(function(object, source) {
+ if (nonEnumShadows || isPrototype(source) || isArrayLike(source)) {
+ copyObject(source, keysIn(source), object);
+ return;
+ }
+ for (var key in source) {
+ assignValue(object, key, source[key]);
+ }
+ });
+
+ /**
+ * This method is like `_.assignIn` except that it accepts `customizer`
+ * which is invoked to produce the assigned values. If `customizer` returns
+ * `undefined`, assignment is handled by the method instead. The `customizer`
+ * is invoked with five arguments: (objValue, srcValue, key, object, source).
+ *
+ * **Note:** This method mutates `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @alias extendWith
+ * @category Object
+ * @param {Object} object The destination object.
+ * @param {...Object} sources The source objects.
+ * @param {Function} [customizer] The function to customize assigned values.
+ * @returns {Object} Returns `object`.
+ * @see _.assignWith
+ * @example
+ *
+ * function customizer(objValue, srcValue) {
+ * return _.isUndefined(objValue) ? srcValue : objValue;
+ * }
+ *
+ * var defaults = _.partialRight(_.assignInWith, customizer);
+ *
+ * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
+ * // => { 'a': 1, 'b': 2 }
+ */
+ var assignInWith = createAssigner(function(object, source, srcIndex, customizer) {
+ copyObject(source, keysIn(source), object, customizer);
+ });
+
+ /**
+ * This method is like `_.assign` except that it accepts `customizer`
+ * which is invoked to produce the assigned values. If `customizer` returns
+ * `undefined`, assignment is handled by the method instead. The `customizer`
+ * is invoked with five arguments: (objValue, srcValue, key, object, source).
+ *
+ * **Note:** This method mutates `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Object
+ * @param {Object} object The destination object.
+ * @param {...Object} sources The source objects.
+ * @param {Function} [customizer] The function to customize assigned values.
+ * @returns {Object} Returns `object`.
+ * @see _.assignInWith
+ * @example
+ *
+ * function customizer(objValue, srcValue) {
+ * return _.isUndefined(objValue) ? srcValue : objValue;
+ * }
+ *
+ * var defaults = _.partialRight(_.assignWith, customizer);
+ *
+ * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
+ * // => { 'a': 1, 'b': 2 }
+ */
+ var assignWith = createAssigner(function(object, source, srcIndex, customizer) {
+ copyObject(source, keys(source), object, customizer);
+ });
+
+ /**
+ * Creates an array of values corresponding to `paths` of `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 1.0.0
+ * @category Object
+ * @param {Object} object The object to iterate over.
+ * @param {...(string|string[])} [paths] The property paths of elements to pick.
+ * @returns {Array} Returns the new array of picked elements.
+ * @example
+ *
+ * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };
+ *
+ * _.at(object, ['a[0].b.c', 'a[1]']);
+ * // => [3, 4]
+ *
+ * _.at(['a', 'b', 'c'], 0, 2);
+ * // => ['a', 'c']
+ */
+ var at = rest(function(object, paths) {
+ return baseAt(object, baseFlatten(paths, 1));
+ });
+
+ /**
+ * Creates an object that inherits from the `prototype` object. If a
+ * `properties` object is given, its own enumerable string keyed properties
+ * are assigned to the created object.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.3.0
+ * @category Object
+ * @param {Object} prototype The object to inherit from.
+ * @param {Object} [properties] The properties to assign to the object.
+ * @returns {Object} Returns the new object.
+ * @example
+ *
+ * function Shape() {
+ * this.x = 0;
+ * this.y = 0;
+ * }
+ *
+ * function Circle() {
+ * Shape.call(this);
+ * }
+ *
+ * Circle.prototype = _.create(Shape.prototype, {
+ * 'constructor': Circle
+ * });
+ *
+ * var circle = new Circle;
+ * circle instanceof Circle;
+ * // => true
+ *
+ * circle instanceof Shape;
+ * // => true
+ */
+ function create(prototype, properties) {
+ var result = baseCreate(prototype);
+ return properties ? baseAssign(result, properties) : result;
+ }
+
+ /**
+ * Assigns own and inherited enumerable string keyed properties of source
+ * objects to the destination object for all destination properties that
+ * resolve to `undefined`. Source objects are applied from left to right.
+ * Once a property is set, additional values of the same property are ignored.
+ *
+ * **Note:** This method mutates `object`.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The destination object.
+ * @param {...Object} [sources] The source objects.
+ * @returns {Object} Returns `object`.
+ * @see _.defaultsDeep
+ * @example
+ *
+ * _.defaults({ 'user': 'barney' }, { 'age': 36 }, { 'user': 'fred' });
+ * // => { 'user': 'barney', 'age': 36 }
+ */
+ var defaults = rest(function(args) {
+ args.push(undefined, assignInDefaults);
+ return apply(assignInWith, undefined, args);
+ });
+
+ /**
+ * This method is like `_.defaults` except that it recursively assigns
+ * default properties.
+ *
+ * **Note:** This method mutates `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.10.0
+ * @category Object
+ * @param {Object} object The destination object.
+ * @param {...Object} [sources] The source objects.
+ * @returns {Object} Returns `object`.
+ * @see _.defaults
+ * @example
+ *
+ * _.defaultsDeep({ 'user': { 'name': 'barney' } }, { 'user': { 'name': 'fred', 'age': 36 } });
+ * // => { 'user': { 'name': 'barney', 'age': 36 } }
+ *
+ */
+ var defaultsDeep = rest(function(args) {
+ args.push(undefined, mergeDefaults);
+ return apply(mergeWith, undefined, args);
+ });
+
+ /**
+ * This method is like `_.find` except that it returns the key of the first
+ * element `predicate` returns truthy for instead of the element itself.
+ *
+ * @static
+ * @memberOf _
+ * @since 1.1.0
+ * @category Object
+ * @param {Object} object The object to search.
+ * @param {Array|Function|Object|string} [predicate=_.identity]
+ * The function invoked per iteration.
+ * @returns {string|undefined} Returns the key of the matched element,
+ * else `undefined`.
+ * @example
+ *
+ * var users = {
+ * 'barney': { 'age': 36, 'active': true },
+ * 'fred': { 'age': 40, 'active': false },
+ * 'pebbles': { 'age': 1, 'active': true }
+ * };
+ *
+ * _.findKey(users, function(o) { return o.age < 40; });
+ * // => 'barney' (iteration order is not guaranteed)
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.findKey(users, { 'age': 1, 'active': true });
+ * // => 'pebbles'
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.findKey(users, ['active', false]);
+ * // => 'fred'
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.findKey(users, 'active');
+ * // => 'barney'
+ */
+ function findKey(object, predicate) {
+ return baseFind(object, getIteratee(predicate, 3), baseForOwn, true);
+ }
+
+ /**
+ * This method is like `_.findKey` except that it iterates over elements of
+ * a collection in the opposite order.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.0.0
+ * @category Object
+ * @param {Object} object The object to search.
+ * @param {Array|Function|Object|string} [predicate=_.identity]
+ * The function invoked per iteration.
+ * @returns {string|undefined} Returns the key of the matched element,
+ * else `undefined`.
+ * @example
+ *
+ * var users = {
+ * 'barney': { 'age': 36, 'active': true },
+ * 'fred': { 'age': 40, 'active': false },
+ * 'pebbles': { 'age': 1, 'active': true }
+ * };
+ *
+ * _.findLastKey(users, function(o) { return o.age < 40; });
+ * // => returns 'pebbles' assuming `_.findKey` returns 'barney'
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.findLastKey(users, { 'age': 36, 'active': true });
+ * // => 'barney'
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.findLastKey(users, ['active', false]);
+ * // => 'fred'
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.findLastKey(users, 'active');
+ * // => 'pebbles'
+ */
+ function findLastKey(object, predicate) {
+ return baseFind(object, getIteratee(predicate, 3), baseForOwnRight, true);
+ }
+
+ /**
+ * Iterates over own and inherited enumerable string keyed properties of an
+ * object and invokes `iteratee` for each property. The iteratee is invoked
+ * with three arguments: (value, key, object). Iteratee functions may exit
+ * iteration early by explicitly returning `false`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.3.0
+ * @category Object
+ * @param {Object} object The object to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @returns {Object} Returns `object`.
+ * @see _.forInRight
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.forIn(new Foo, function(value, key) {
+ * console.log(key);
+ * });
+ * // => Logs 'a', 'b', then 'c' (iteration order is not guaranteed).
+ */
+ function forIn(object, iteratee) {
+ return object == null
+ ? object
+ : baseFor(object, getIteratee(iteratee), keysIn);
+ }
+
+ /**
+ * This method is like `_.forIn` except that it iterates over properties of
+ * `object` in the opposite order.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.0.0
+ * @category Object
+ * @param {Object} object The object to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @returns {Object} Returns `object`.
+ * @see _.forIn
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.forInRight(new Foo, function(value, key) {
+ * console.log(key);
+ * });
+ * // => Logs 'c', 'b', then 'a' assuming `_.forIn` logs 'a', 'b', then 'c'.
+ */
+ function forInRight(object, iteratee) {
+ return object == null
+ ? object
+ : baseForRight(object, getIteratee(iteratee), keysIn);
+ }
+
+ /**
+ * Iterates over own enumerable string keyed properties of an object and
+ * invokes `iteratee` for each property. The iteratee is invoked with three
+ * arguments: (value, key, object). Iteratee functions may exit iteration
+ * early by explicitly returning `false`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.3.0
+ * @category Object
+ * @param {Object} object The object to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @returns {Object} Returns `object`.
+ * @see _.forOwnRight
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.forOwn(new Foo, function(value, key) {
+ * console.log(key);
+ * });
+ * // => Logs 'a' then 'b' (iteration order is not guaranteed).
+ */
+ function forOwn(object, iteratee) {
+ return object && baseForOwn(object, getIteratee(iteratee));
+ }
+
+ /**
+ * This method is like `_.forOwn` except that it iterates over properties of
+ * `object` in the opposite order.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.0.0
+ * @category Object
+ * @param {Object} object The object to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @returns {Object} Returns `object`.
+ * @see _.forOwn
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.forOwnRight(new Foo, function(value, key) {
+ * console.log(key);
+ * });
+ * // => Logs 'b' then 'a' assuming `_.forOwn` logs 'a' then 'b'.
+ */
+ function forOwnRight(object, iteratee) {
+ return object && baseForOwnRight(object, getIteratee(iteratee));
+ }
+
+ /**
+ * Creates an array of function property names from own enumerable properties
+ * of `object`.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The object to inspect.
+ * @returns {Array} Returns the new array of property names.
+ * @see _.functionsIn
+ * @example
+ *
+ * function Foo() {
+ * this.a = _.constant('a');
+ * this.b = _.constant('b');
+ * }
+ *
+ * Foo.prototype.c = _.constant('c');
+ *
+ * _.functions(new Foo);
+ * // => ['a', 'b']
+ */
+ function functions(object) {
+ return object == null ? [] : baseFunctions(object, keys(object));
+ }
+
+ /**
+ * Creates an array of function property names from own and inherited
+ * enumerable properties of `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Object
+ * @param {Object} object The object to inspect.
+ * @returns {Array} Returns the new array of property names.
+ * @see _.functions
+ * @example
+ *
+ * function Foo() {
+ * this.a = _.constant('a');
+ * this.b = _.constant('b');
+ * }
+ *
+ * Foo.prototype.c = _.constant('c');
+ *
+ * _.functionsIn(new Foo);
+ * // => ['a', 'b', 'c']
+ */
+ function functionsIn(object) {
+ return object == null ? [] : baseFunctions(object, keysIn(object));
+ }
+
+ /**
+ * Gets the value at `path` of `object`. If the resolved value is
+ * `undefined`, the `defaultValue` is used in its place.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.7.0
+ * @category Object
+ * @param {Object} object The object to query.
+ * @param {Array|string} path The path of the property to get.
+ * @param {*} [defaultValue] The value returned for `undefined` resolved values.
+ * @returns {*} Returns the resolved value.
+ * @example
+ *
+ * var object = { 'a': [{ 'b': { 'c': 3 } }] };
+ *
+ * _.get(object, 'a[0].b.c');
+ * // => 3
+ *
+ * _.get(object, ['a', '0', 'b', 'c']);
+ * // => 3
+ *
+ * _.get(object, 'a.b.c', 'default');
+ * // => 'default'
+ */
+ function get(object, path, defaultValue) {
+ var result = object == null ? undefined : baseGet(object, path);
+ return result === undefined ? defaultValue : result;
+ }
+
+ /**
+ * Checks if `path` is a direct property of `object`.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The object to query.
+ * @param {Array|string} path The path to check.
+ * @returns {boolean} Returns `true` if `path` exists, else `false`.
+ * @example
+ *
+ * var object = { 'a': { 'b': 2 } };
+ * var other = _.create({ 'a': _.create({ 'b': 2 }) });
+ *
+ * _.has(object, 'a');
+ * // => true
+ *
+ * _.has(object, 'a.b');
+ * // => true
+ *
+ * _.has(object, ['a', 'b']);
+ * // => true
+ *
+ * _.has(other, 'a');
+ * // => false
+ */
+ function has(object, path) {
+ return object != null && hasPath(object, path, baseHas);
+ }
+
+ /**
+ * Checks if `path` is a direct or inherited property of `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Object
+ * @param {Object} object The object to query.
+ * @param {Array|string} path The path to check.
+ * @returns {boolean} Returns `true` if `path` exists, else `false`.
+ * @example
+ *
+ * var object = _.create({ 'a': _.create({ 'b': 2 }) });
+ *
+ * _.hasIn(object, 'a');
+ * // => true
+ *
+ * _.hasIn(object, 'a.b');
+ * // => true
+ *
+ * _.hasIn(object, ['a', 'b']);
+ * // => true
+ *
+ * _.hasIn(object, 'b');
+ * // => false
+ */
+ function hasIn(object, path) {
+ return object != null && hasPath(object, path, baseHasIn);
+ }
+
+ /**
+ * Creates an object composed of the inverted keys and values of `object`.
+ * If `object` contains duplicate values, subsequent values overwrite
+ * property assignments of previous values.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.7.0
+ * @category Object
+ * @param {Object} object The object to invert.
+ * @returns {Object} Returns the new inverted object.
+ * @example
+ *
+ * var object = { 'a': 1, 'b': 2, 'c': 1 };
+ *
+ * _.invert(object);
+ * // => { '1': 'c', '2': 'b' }
+ */
+ var invert = createInverter(function(result, value, key) {
+ result[value] = key;
+ }, constant(identity));
+
+ /**
+ * This method is like `_.invert` except that the inverted object is generated
+ * from the results of running each element of `object` thru `iteratee`. The
+ * corresponding inverted value of each inverted key is an array of keys
+ * responsible for generating the inverted value. The iteratee is invoked
+ * with one argument: (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.1.0
+ * @category Object
+ * @param {Object} object The object to invert.
+ * @param {Array|Function|Object|string} [iteratee=_.identity]
+ * The iteratee invoked per element.
+ * @returns {Object} Returns the new inverted object.
+ * @example
+ *
+ * var object = { 'a': 1, 'b': 2, 'c': 1 };
+ *
+ * _.invertBy(object);
+ * // => { '1': ['a', 'c'], '2': ['b'] }
+ *
+ * _.invertBy(object, function(value) {
+ * return 'group' + value;
+ * });
+ * // => { 'group1': ['a', 'c'], 'group2': ['b'] }
+ */
+ var invertBy = createInverter(function(result, value, key) {
+ if (hasOwnProperty.call(result, value)) {
+ result[value].push(key);
+ } else {
+ result[value] = [key];
+ }
+ }, getIteratee);
+
+ /**
+ * Invokes the method at `path` of `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Object
+ * @param {Object} object The object to query.
+ * @param {Array|string} path The path of the method to invoke.
+ * @param {...*} [args] The arguments to invoke the method with.
+ * @returns {*} Returns the result of the invoked method.
+ * @example
+ *
+ * var object = { 'a': [{ 'b': { 'c': [1, 2, 3, 4] } }] };
+ *
+ * _.invoke(object, 'a[0].b.c.slice', 1, 3);
+ * // => [2, 3]
+ */
+ var invoke = rest(baseInvoke);
+
+ /**
+ * Creates an array of the own enumerable property names of `object`.
+ *
+ * **Note:** Non-object values are coerced to objects. See the
+ * [ES spec](http://ecma-international.org/ecma-262/6.0/#sec-object.keys)
+ * for more details.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property names.
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.keys(new Foo);
+ * // => ['a', 'b'] (iteration order is not guaranteed)
+ *
+ * _.keys('hi');
+ * // => ['0', '1']
+ */
+ function keys(object) {
+ var isProto = isPrototype(object);
+ if (!(isProto || isArrayLike(object))) {
+ return baseKeys(object);
+ }
+ var indexes = indexKeys(object),
+ skipIndexes = !!indexes,
+ result = indexes || [],
+ length = result.length;
+
+ for (var key in object) {
+ if (baseHas(object, key) &&
+ !(skipIndexes && (key == 'length' || isIndex(key, length))) &&
+ !(isProto && key == 'constructor')) {
+ result.push(key);
+ }
+ }
+ return result;
+ }
+
+ /**
+ * Creates an array of the own and inherited enumerable property names of `object`.
+ *
+ * **Note:** Non-object values are coerced to objects.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Object
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property names.
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.keysIn(new Foo);
+ * // => ['a', 'b', 'c'] (iteration order is not guaranteed)
+ */
+ function keysIn(object) {
+ var index = -1,
+ isProto = isPrototype(object),
+ props = baseKeysIn(object),
+ propsLength = props.length,
+ indexes = indexKeys(object),
+ skipIndexes = !!indexes,
+ result = indexes || [],
+ length = result.length;
+
+ while (++index < propsLength) {
+ var key = props[index];
+ if (!(skipIndexes && (key == 'length' || isIndex(key, length))) &&
+ !(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {
+ result.push(key);
+ }
+ }
+ return result;
+ }
+
+ /**
+ * The opposite of `_.mapValues`; this method creates an object with the
+ * same values as `object` and keys generated by running each own enumerable
+ * string keyed property of `object` thru `iteratee`. The iteratee is invoked
+ * with three arguments: (value, key, object).
+ *
+ * @static
+ * @memberOf _
+ * @since 3.8.0
+ * @category Object
+ * @param {Object} object The object to iterate over.
+ * @param {Array|Function|Object|string} [iteratee=_.identity]
+ * The function invoked per iteration.
+ * @returns {Object} Returns the new mapped object.
+ * @see _.mapValues
+ * @example
+ *
+ * _.mapKeys({ 'a': 1, 'b': 2 }, function(value, key) {
+ * return key + value;
+ * });
+ * // => { 'a1': 1, 'b2': 2 }
+ */
+ function mapKeys(object, iteratee) {
+ var result = {};
+ iteratee = getIteratee(iteratee, 3);
+
+ baseForOwn(object, function(value, key, object) {
+ result[iteratee(value, key, object)] = value;
+ });
+ return result;
+ }
+
+ /**
+ * Creates an object with the same keys as `object` and values generated
+ * by running each own enumerable string keyed property of `object` thru
+ * `iteratee`. The iteratee is invoked with three arguments:
+ * (value, key, object).
+ *
+ * @static
+ * @memberOf _
+ * @since 2.4.0
+ * @category Object
+ * @param {Object} object The object to iterate over.
+ * @param {Array|Function|Object|string} [iteratee=_.identity]
+ * The function invoked per iteration.
+ * @returns {Object} Returns the new mapped object.
+ * @see _.mapKeys
+ * @example
+ *
+ * var users = {
+ * 'fred': { 'user': 'fred', 'age': 40 },
+ * 'pebbles': { 'user': 'pebbles', 'age': 1 }
+ * };
+ *
+ * _.mapValues(users, function(o) { return o.age; });
+ * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.mapValues(users, 'age');
+ * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)
+ */
+ function mapValues(object, iteratee) {
+ var result = {};
+ iteratee = getIteratee(iteratee, 3);
+
+ baseForOwn(object, function(value, key, object) {
+ result[key] = iteratee(value, key, object);
+ });
+ return result;
+ }
+
+ /**
+ * This method is like `_.assign` except that it recursively merges own and
+ * inherited enumerable string keyed properties of source objects into the
+ * destination object. Source properties that resolve to `undefined` are
+ * skipped if a destination value exists. Array and plain object properties
+ * are merged recursively.Other objects and value types are overridden by
+ * assignment. Source objects are applied from left to right. Subsequent
+ * sources overwrite property assignments of previous sources.
+ *
+ * **Note:** This method mutates `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.5.0
+ * @category Object
+ * @param {Object} object The destination object.
+ * @param {...Object} [sources] The source objects.
+ * @returns {Object} Returns `object`.
+ * @example
+ *
+ * var users = {
+ * 'data': [{ 'user': 'barney' }, { 'user': 'fred' }]
+ * };
+ *
+ * var ages = {
+ * 'data': [{ 'age': 36 }, { 'age': 40 }]
+ * };
+ *
+ * _.merge(users, ages);
+ * // => { 'data': [{ 'user': 'barney', 'age': 36 }, { 'user': 'fred', 'age': 40 }] }
+ */
+ var merge = createAssigner(function(object, source, srcIndex) {
+ baseMerge(object, source, srcIndex);
+ });
+
+ /**
+ * This method is like `_.merge` except that it accepts `customizer` which
+ * is invoked to produce the merged values of the destination and source
+ * properties. If `customizer` returns `undefined`, merging is handled by the
+ * method instead. The `customizer` is invoked with seven arguments:
+ * (objValue, srcValue, key, object, source, stack).
+ *
+ * **Note:** This method mutates `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Object
+ * @param {Object} object The destination object.
+ * @param {...Object} sources The source objects.
+ * @param {Function} customizer The function to customize assigned values.
+ * @returns {Object} Returns `object`.
+ * @example
+ *
+ * function customizer(objValue, srcValue) {
+ * if (_.isArray(objValue)) {
+ * return objValue.concat(srcValue);
+ * }
+ * }
+ *
+ * var object = {
+ * 'fruits': ['apple'],
+ * 'vegetables': ['beet']
+ * };
+ *
+ * var other = {
+ * 'fruits': ['banana'],
+ * 'vegetables': ['carrot']
+ * };
+ *
+ * _.mergeWith(object, other, customizer);
+ * // => { 'fruits': ['apple', 'banana'], 'vegetables': ['beet', 'carrot'] }
+ */
+ var mergeWith = createAssigner(function(object, source, srcIndex, customizer) {
+ baseMerge(object, source, srcIndex, customizer);
+ });
+
+ /**
+ * The opposite of `_.pick`; this method creates an object composed of the
+ * own and inherited enumerable string keyed properties of `object` that are
+ * not omitted.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The source object.
+ * @param {...(string|string[])} [props] The property identifiers to omit.
+ * @returns {Object} Returns the new object.
+ * @example
+ *
+ * var object = { 'a': 1, 'b': '2', 'c': 3 };
+ *
+ * _.omit(object, ['a', 'c']);
+ * // => { 'b': '2' }
+ */
+ var omit = rest(function(object, props) {
+ if (object == null) {
+ return {};
+ }
+ props = arrayMap(baseFlatten(props, 1), toKey);
+ return basePick(object, baseDifference(getAllKeysIn(object), props));
+ });
+
+ /**
+ * The opposite of `_.pickBy`; this method creates an object composed of
+ * the own and inherited enumerable string keyed properties of `object` that
+ * `predicate` doesn't return truthy for. The predicate is invoked with two
+ * arguments: (value, key).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Object
+ * @param {Object} object The source object.
+ * @param {Array|Function|Object|string} [predicate=_.identity]
+ * The function invoked per property.
+ * @returns {Object} Returns the new object.
+ * @example
+ *
+ * var object = { 'a': 1, 'b': '2', 'c': 3 };
+ *
+ * _.omitBy(object, _.isNumber);
+ * // => { 'b': '2' }
+ */
+ function omitBy(object, predicate) {
+ predicate = getIteratee(predicate);
+ return basePickBy(object, function(value, key) {
+ return !predicate(value, key);
+ });
+ }
+
+ /**
+ * Creates an object composed of the picked `object` properties.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The source object.
+ * @param {...(string|string[])} [props] The property identifiers to pick.
+ * @returns {Object} Returns the new object.
+ * @example
+ *
+ * var object = { 'a': 1, 'b': '2', 'c': 3 };
+ *
+ * _.pick(object, ['a', 'c']);
+ * // => { 'a': 1, 'c': 3 }
+ */
+ var pick = rest(function(object, props) {
+ return object == null ? {} : basePick(object, arrayMap(baseFlatten(props, 1), toKey));
+ });
+
+ /**
+ * Creates an object composed of the `object` properties `predicate` returns
+ * truthy for. The predicate is invoked with two arguments: (value, key).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Object
+ * @param {Object} object The source object.
+ * @param {Array|Function|Object|string} [predicate=_.identity]
+ * The function invoked per property.
+ * @returns {Object} Returns the new object.
+ * @example
+ *
+ * var object = { 'a': 1, 'b': '2', 'c': 3 };
+ *
+ * _.pickBy(object, _.isNumber);
+ * // => { 'a': 1, 'c': 3 }
+ */
+ function pickBy(object, predicate) {
+ return object == null ? {} : basePickBy(object, getIteratee(predicate));
+ }
+
+ /**
+ * This method is like `_.get` except that if the resolved value is a
+ * function it's invoked with the `this` binding of its parent object and
+ * its result is returned.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The object to query.
+ * @param {Array|string} path The path of the property to resolve.
+ * @param {*} [defaultValue] The value returned for `undefined` resolved values.
+ * @returns {*} Returns the resolved value.
+ * @example
+ *
+ * var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] };
+ *
+ * _.result(object, 'a[0].b.c1');
+ * // => 3
+ *
+ * _.result(object, 'a[0].b.c2');
+ * // => 4
+ *
+ * _.result(object, 'a[0].b.c3', 'default');
+ * // => 'default'
+ *
+ * _.result(object, 'a[0].b.c3', _.constant('default'));
+ * // => 'default'
+ */
+ function result(object, path, defaultValue) {
+ path = isKey(path, object) ? [path] : castPath(path);
+
+ var index = -1,
+ length = path.length;
+
+ // Ensure the loop is entered when path is empty.
+ if (!length) {
+ object = undefined;
+ length = 1;
+ }
+ while (++index < length) {
+ var value = object == null ? undefined : object[toKey(path[index])];
+ if (value === undefined) {
+ index = length;
+ value = defaultValue;
+ }
+ object = isFunction(value) ? value.call(object) : value;
+ }
+ return object;
+ }
+
+ /**
+ * Sets the value at `path` of `object`. If a portion of `path` doesn't exist,
+ * it's created. Arrays are created for missing index properties while objects
+ * are created for all other missing properties. Use `_.setWith` to customize
+ * `path` creation.
+ *
+ * **Note:** This method mutates `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.7.0
+ * @category Object
+ * @param {Object} object The object to modify.
+ * @param {Array|string} path The path of the property to set.
+ * @param {*} value The value to set.
+ * @returns {Object} Returns `object`.
+ * @example
+ *
+ * var object = { 'a': [{ 'b': { 'c': 3 } }] };
+ *
+ * _.set(object, 'a[0].b.c', 4);
+ * console.log(object.a[0].b.c);
+ * // => 4
+ *
+ * _.set(object, ['x', '0', 'y', 'z'], 5);
+ * console.log(object.x[0].y.z);
+ * // => 5
+ */
+ function set(object, path, value) {
+ return object == null ? object : baseSet(object, path, value);
+ }
+
+ /**
+ * This method is like `_.set` except that it accepts `customizer` which is
+ * invoked to produce the objects of `path`. If `customizer` returns `undefined`
+ * path creation is handled by the method instead. The `customizer` is invoked
+ * with three arguments: (nsValue, key, nsObject).
+ *
+ * **Note:** This method mutates `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Object
+ * @param {Object} object The object to modify.
+ * @param {Array|string} path The path of the property to set.
+ * @param {*} value The value to set.
+ * @param {Function} [customizer] The function to customize assigned values.
+ * @returns {Object} Returns `object`.
+ * @example
+ *
+ * var object = {};
+ *
+ * _.setWith(object, '[0][1]', 'a', Object);
+ * // => { '0': { '1': 'a' } }
+ */
+ function setWith(object, path, value, customizer) {
+ customizer = typeof customizer == 'function' ? customizer : undefined;
+ return object == null ? object : baseSet(object, path, value, customizer);
+ }
+
+ /**
+ * Creates an array of own enumerable string keyed-value pairs for `object`
+ * which can be consumed by `_.fromPairs`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @alias entries
+ * @category Object
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the new array of key-value pairs.
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.toPairs(new Foo);
+ * // => [['a', 1], ['b', 2]] (iteration order is not guaranteed)
+ */
+ function toPairs(object) {
+ return baseToPairs(object, keys(object));
+ }
+
+ /**
+ * Creates an array of own and inherited enumerable string keyed-value pairs
+ * for `object` which can be consumed by `_.fromPairs`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @alias entriesIn
+ * @category Object
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the new array of key-value pairs.
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.toPairsIn(new Foo);
+ * // => [['a', 1], ['b', 2], ['c', 1]] (iteration order is not guaranteed)
+ */
+ function toPairsIn(object) {
+ return baseToPairs(object, keysIn(object));
+ }
+
+ /**
+ * An alternative to `_.reduce`; this method transforms `object` to a new
+ * `accumulator` object which is the result of running each of its own
+ * enumerable string keyed properties thru `iteratee`, with each invocation
+ * potentially mutating the `accumulator` object. The iteratee is invoked
+ * with four arguments: (accumulator, value, key, object). Iteratee functions
+ * may exit iteration early by explicitly returning `false`.
+ *
+ * @static
+ * @memberOf _
+ * @since 1.3.0
+ * @category Object
+ * @param {Array|Object} object The object to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @param {*} [accumulator] The custom accumulator value.
+ * @returns {*} Returns the accumulated value.
+ * @example
+ *
+ * _.transform([2, 3, 4], function(result, n) {
+ * result.push(n *= n);
+ * return n % 2 == 0;
+ * }, []);
+ * // => [4, 9]
+ *
+ * _.transform({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {
+ * (result[value] || (result[value] = [])).push(key);
+ * }, {});
+ * // => { '1': ['a', 'c'], '2': ['b'] }
+ */
+ function transform(object, iteratee, accumulator) {
+ var isArr = isArray(object) || isTypedArray(object);
+ iteratee = getIteratee(iteratee, 4);
+
+ if (accumulator == null) {
+ if (isArr || isObject(object)) {
+ var Ctor = object.constructor;
+ if (isArr) {
+ accumulator = isArray(object) ? new Ctor : [];
+ } else {
+ accumulator = isFunction(Ctor) ? baseCreate(getPrototype(object)) : {};
+ }
+ } else {
+ accumulator = {};
+ }
+ }
+ (isArr ? arrayEach : baseForOwn)(object, function(value, index, object) {
+ return iteratee(accumulator, value, index, object);
+ });
+ return accumulator;
+ }
+
+ /**
+ * Removes the property at `path` of `object`.
+ *
+ * **Note:** This method mutates `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Object
+ * @param {Object} object The object to modify.
+ * @param {Array|string} path The path of the property to unset.
+ * @returns {boolean} Returns `true` if the property is deleted, else `false`.
+ * @example
+ *
+ * var object = { 'a': [{ 'b': { 'c': 7 } }] };
+ * _.unset(object, 'a[0].b.c');
+ * // => true
+ *
+ * console.log(object);
+ * // => { 'a': [{ 'b': {} }] };
+ *
+ * _.unset(object, ['a', '0', 'b', 'c']);
+ * // => true
+ *
+ * console.log(object);
+ * // => { 'a': [{ 'b': {} }] };
+ */
+ function unset(object, path) {
+ return object == null ? true : baseUnset(object, path);
+ }
+
+ /**
+ * This method is like `_.set` except that accepts `updater` to produce the
+ * value to set. Use `_.updateWith` to customize `path` creation. The `updater`
+ * is invoked with one argument: (value).
+ *
+ * **Note:** This method mutates `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.6.0
+ * @category Object
+ * @param {Object} object The object to modify.
+ * @param {Array|string} path The path of the property to set.
+ * @param {Function} updater The function to produce the updated value.
+ * @returns {Object} Returns `object`.
+ * @example
+ *
+ * var object = { 'a': [{ 'b': { 'c': 3 } }] };
+ *
+ * _.update(object, 'a[0].b.c', function(n) { return n * n; });
+ * console.log(object.a[0].b.c);
+ * // => 9
+ *
+ * _.update(object, 'x[0].y.z', function(n) { return n ? n + 1 : 0; });
+ * console.log(object.x[0].y.z);
+ * // => 0
+ */
+ function update(object, path, updater) {
+ return object == null ? object : baseUpdate(object, path, castFunction(updater));
+ }
+
+ /**
+ * This method is like `_.update` except that it accepts `customizer` which is
+ * invoked to produce the objects of `path`. If `customizer` returns `undefined`
+ * path creation is handled by the method instead. The `customizer` is invoked
+ * with three arguments: (nsValue, key, nsObject).
+ *
+ * **Note:** This method mutates `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.6.0
+ * @category Object
+ * @param {Object} object The object to modify.
+ * @param {Array|string} path The path of the property to set.
+ * @param {Function} updater The function to produce the updated value.
+ * @param {Function} [customizer] The function to customize assigned values.
+ * @returns {Object} Returns `object`.
+ * @example
+ *
+ * var object = {};
+ *
+ * _.updateWith(object, '[0][1]', _.constant('a'), Object);
+ * // => { '0': { '1': 'a' } }
+ */
+ function updateWith(object, path, updater, customizer) {
+ customizer = typeof customizer == 'function' ? customizer : undefined;
+ return object == null ? object : baseUpdate(object, path, castFunction(updater), customizer);
+ }
+
+ /**
+ * Creates an array of the own enumerable string keyed property values of `object`.
+ *
+ * **Note:** Non-object values are coerced to objects.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property values.
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.values(new Foo);
+ * // => [1, 2] (iteration order is not guaranteed)
+ *
+ * _.values('hi');
+ * // => ['h', 'i']
+ */
+ function values(object) {
+ return object ? baseValues(object, keys(object)) : [];
+ }
+
+ /**
+ * Creates an array of the own and inherited enumerable string keyed property
+ * values of `object`.
+ *
+ * **Note:** Non-object values are coerced to objects.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Object
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property values.
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.valuesIn(new Foo);
+ * // => [1, 2, 3] (iteration order is not guaranteed)
+ */
+ function valuesIn(object) {
+ return object == null ? [] : baseValues(object, keysIn(object));
+ }
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Clamps `number` within the inclusive `lower` and `upper` bounds.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Number
+ * @param {number} number The number to clamp.
+ * @param {number} [lower] The lower bound.
+ * @param {number} upper The upper bound.
+ * @returns {number} Returns the clamped number.
+ * @example
+ *
+ * _.clamp(-10, -5, 5);
+ * // => -5
+ *
+ * _.clamp(10, -5, 5);
+ * // => 5
+ */
+ function clamp(number, lower, upper) {
+ if (upper === undefined) {
+ upper = lower;
+ lower = undefined;
+ }
+ if (upper !== undefined) {
+ upper = toNumber(upper);
+ upper = upper === upper ? upper : 0;
+ }
+ if (lower !== undefined) {
+ lower = toNumber(lower);
+ lower = lower === lower ? lower : 0;
+ }
+ return baseClamp(toNumber(number), lower, upper);
+ }
+
+ /**
+ * Checks if `n` is between `start` and up to, but not including, `end`. If
+ * `end` is not specified, it's set to `start` with `start` then set to `0`.
+ * If `start` is greater than `end` the params are swapped to support
+ * negative ranges.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.3.0
+ * @category Number
+ * @param {number} number The number to check.
+ * @param {number} [start=0] The start of the range.
+ * @param {number} end The end of the range.
+ * @returns {boolean} Returns `true` if `number` is in the range, else `false`.
+ * @see _.range, _.rangeRight
+ * @example
+ *
+ * _.inRange(3, 2, 4);
+ * // => true
+ *
+ * _.inRange(4, 8);
+ * // => true
+ *
+ * _.inRange(4, 2);
+ * // => false
+ *
+ * _.inRange(2, 2);
+ * // => false
+ *
+ * _.inRange(1.2, 2);
+ * // => true
+ *
+ * _.inRange(5.2, 4);
+ * // => false
+ *
+ * _.inRange(-3, -2, -6);
+ * // => true
+ */
+ function inRange(number, start, end) {
+ start = toNumber(start) || 0;
+ if (end === undefined) {
+ end = start;
+ start = 0;
+ } else {
+ end = toNumber(end) || 0;
+ }
+ number = toNumber(number);
+ return baseInRange(number, start, end);
+ }
+
+ /**
+ * Produces a random number between the inclusive `lower` and `upper` bounds.
+ * If only one argument is provided a number between `0` and the given number
+ * is returned. If `floating` is `true`, or either `lower` or `upper` are
+ * floats, a floating-point number is returned instead of an integer.
+ *
+ * **Note:** JavaScript follows the IEEE-754 standard for resolving
+ * floating-point values which can produce unexpected results.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.7.0
+ * @category Number
+ * @param {number} [lower=0] The lower bound.
+ * @param {number} [upper=1] The upper bound.
+ * @param {boolean} [floating] Specify returning a floating-point number.
+ * @returns {number} Returns the random number.
+ * @example
+ *
+ * _.random(0, 5);
+ * // => an integer between 0 and 5
+ *
+ * _.random(5);
+ * // => also an integer between 0 and 5
+ *
+ * _.random(5, true);
+ * // => a floating-point number between 0 and 5
+ *
+ * _.random(1.2, 5.2);
+ * // => a floating-point number between 1.2 and 5.2
+ */
+ function random(lower, upper, floating) {
+ if (floating && typeof floating != 'boolean' && isIterateeCall(lower, upper, floating)) {
+ upper = floating = undefined;
+ }
+ if (floating === undefined) {
+ if (typeof upper == 'boolean') {
+ floating = upper;
+ upper = undefined;
+ }
+ else if (typeof lower == 'boolean') {
+ floating = lower;
+ lower = undefined;
+ }
+ }
+ if (lower === undefined && upper === undefined) {
+ lower = 0;
+ upper = 1;
+ }
+ else {
+ lower = toNumber(lower) || 0;
+ if (upper === undefined) {
+ upper = lower;
+ lower = 0;
+ } else {
+ upper = toNumber(upper) || 0;
+ }
+ }
+ if (lower > upper) {
+ var temp = lower;
+ lower = upper;
+ upper = temp;
+ }
+ if (floating || lower % 1 || upper % 1) {
+ var rand = nativeRandom();
+ return nativeMin(lower + (rand * (upper - lower + freeParseFloat('1e-' + ((rand + '').length - 1)))), upper);
+ }
+ return baseRandom(lower, upper);
+ }
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase).
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category String
+ * @param {string} [string=''] The string to convert.
+ * @returns {string} Returns the camel cased string.
+ * @example
+ *
+ * _.camelCase('Foo Bar');
+ * // => 'fooBar'
+ *
+ * _.camelCase('--foo-bar--');
+ * // => 'fooBar'
+ *
+ * _.camelCase('__FOO_BAR__');
+ * // => 'fooBar'
+ */
+ var camelCase = createCompounder(function(result, word, index) {
+ word = word.toLowerCase();
+ return result + (index ? capitalize(word) : word);
+ });
+
+ /**
+ * Converts the first character of `string` to upper case and the remaining
+ * to lower case.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category String
+ * @param {string} [string=''] The string to capitalize.
+ * @returns {string} Returns the capitalized string.
+ * @example
+ *
+ * _.capitalize('FRED');
+ * // => 'Fred'
+ */
+ function capitalize(string) {
+ return upperFirst(toString(string).toLowerCase());
+ }
+
+ /**
+ * Deburrs `string` by converting
+ * [latin-1 supplementary letters](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table)
+ * to basic latin letters and removing
+ * [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks).
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category String
+ * @param {string} [string=''] The string to deburr.
+ * @returns {string} Returns the deburred string.
+ * @example
+ *
+ * _.deburr('déjà vu');
+ * // => 'deja vu'
+ */
+ function deburr(string) {
+ string = toString(string);
+ return string && string.replace(reLatin1, deburrLetter).replace(reComboMark, '');
+ }
+
+ /**
+ * Checks if `string` ends with the given target string.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category String
+ * @param {string} [string=''] The string to search.
+ * @param {string} [target] The string to search for.
+ * @param {number} [position=string.length] The position to search from.
+ * @returns {boolean} Returns `true` if `string` ends with `target`,
+ * else `false`.
+ * @example
+ *
+ * _.endsWith('abc', 'c');
+ * // => true
+ *
+ * _.endsWith('abc', 'b');
+ * // => false
+ *
+ * _.endsWith('abc', 'b', 2);
+ * // => true
+ */
+ function endsWith(string, target, position) {
+ string = toString(string);
+ target = baseToString(target);
+
+ var length = string.length;
+ position = position === undefined
+ ? length
+ : baseClamp(toInteger(position), 0, length);
+
+ position -= target.length;
+ return position >= 0 && string.indexOf(target, position) == position;
+ }
+
+ /**
+ * Converts the characters "&", "<", ">", '"', "'", and "\`" in `string` to
+ * their corresponding HTML entities.
+ *
+ * **Note:** No other characters are escaped. To escape additional
+ * characters use a third-party library like [_he_](https://mths.be/he).
+ *
+ * Though the ">" character is escaped for symmetry, characters like
+ * ">" and "/" don't need escaping in HTML and have no special meaning
+ * unless they're part of a tag or unquoted attribute value. See
+ * [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands)
+ * (under "semi-related fun fact") for more details.
+ *
+ * Backticks are escaped because in IE < 9, they can break out of
+ * attribute values or HTML comments. See [#59](https://html5sec.org/#59),
+ * [#102](https://html5sec.org/#102), [#108](https://html5sec.org/#108), and
+ * [#133](https://html5sec.org/#133) of the
+ * [HTML5 Security Cheatsheet](https://html5sec.org/) for more details.
+ *
+ * When working with HTML you should always
+ * [quote attribute values](http://wonko.com/post/html-escaping) to reduce
+ * XSS vectors.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category String
+ * @param {string} [string=''] The string to escape.
+ * @returns {string} Returns the escaped string.
+ * @example
+ *
+ * _.escape('fred, barney, & pebbles');
+ * // => 'fred, barney, & pebbles'
+ */
+ function escape(string) {
+ string = toString(string);
+ return (string && reHasUnescapedHtml.test(string))
+ ? string.replace(reUnescapedHtml, escapeHtmlChar)
+ : string;
+ }
+
+ /**
+ * Escapes the `RegExp` special characters "^", "$", "\", ".", "*", "+",
+ * "?", "(", ")", "[", "]", "{", "}", and "|" in `string`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category String
+ * @param {string} [string=''] The string to escape.
+ * @returns {string} Returns the escaped string.
+ * @example
+ *
+ * _.escapeRegExp('[lodash](https://lodash.com/)');
+ * // => '\[lodash\]\(https://lodash\.com/\)'
+ */
+ function escapeRegExp(string) {
+ string = toString(string);
+ return (string && reHasRegExpChar.test(string))
+ ? string.replace(reRegExpChar, '\\$&')
+ : string;
+ }
+
+ /**
+ * Converts `string` to
+ * [kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles).
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category String
+ * @param {string} [string=''] The string to convert.
+ * @returns {string} Returns the kebab cased string.
+ * @example
+ *
+ * _.kebabCase('Foo Bar');
+ * // => 'foo-bar'
+ *
+ * _.kebabCase('fooBar');
+ * // => 'foo-bar'
+ *
+ * _.kebabCase('__FOO_BAR__');
+ * // => 'foo-bar'
+ */
+ var kebabCase = createCompounder(function(result, word, index) {
+ return result + (index ? '-' : '') + word.toLowerCase();
+ });
+
+ /**
+ * Converts `string`, as space separated words, to lower case.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category String
+ * @param {string} [string=''] The string to convert.
+ * @returns {string} Returns the lower cased string.
+ * @example
+ *
+ * _.lowerCase('--Foo-Bar--');
+ * // => 'foo bar'
+ *
+ * _.lowerCase('fooBar');
+ * // => 'foo bar'
+ *
+ * _.lowerCase('__FOO_BAR__');
+ * // => 'foo bar'
+ */
+ var lowerCase = createCompounder(function(result, word, index) {
+ return result + (index ? ' ' : '') + word.toLowerCase();
+ });
+
+ /**
+ * Converts the first character of `string` to lower case.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category String
+ * @param {string} [string=''] The string to convert.
+ * @returns {string} Returns the converted string.
+ * @example
+ *
+ * _.lowerFirst('Fred');
+ * // => 'fred'
+ *
+ * _.lowerFirst('FRED');
+ * // => 'fRED'
+ */
+ var lowerFirst = createCaseFirst('toLowerCase');
+
+ /**
+ * Pads `string` on the left and right sides if it's shorter than `length`.
+ * Padding characters are truncated if they can't be evenly divided by `length`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category String
+ * @param {string} [string=''] The string to pad.
+ * @param {number} [length=0] The padding length.
+ * @param {string} [chars=' '] The string used as padding.
+ * @returns {string} Returns the padded string.
+ * @example
+ *
+ * _.pad('abc', 8);
+ * // => ' abc '
+ *
+ * _.pad('abc', 8, '_-');
+ * // => '_-abc_-_'
+ *
+ * _.pad('abc', 3);
+ * // => 'abc'
+ */
+ function pad(string, length, chars) {
+ string = toString(string);
+ length = toInteger(length);
+
+ var strLength = length ? stringSize(string) : 0;
+ if (!length || strLength >= length) {
+ return string;
+ }
+ var mid = (length - strLength) / 2;
+ return (
+ createPadding(nativeFloor(mid), chars) +
+ string +
+ createPadding(nativeCeil(mid), chars)
+ );
+ }
+
+ /**
+ * Pads `string` on the right side if it's shorter than `length`. Padding
+ * characters are truncated if they exceed `length`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category String
+ * @param {string} [string=''] The string to pad.
+ * @param {number} [length=0] The padding length.
+ * @param {string} [chars=' '] The string used as padding.
+ * @returns {string} Returns the padded string.
+ * @example
+ *
+ * _.padEnd('abc', 6);
+ * // => 'abc '
+ *
+ * _.padEnd('abc', 6, '_-');
+ * // => 'abc_-_'
+ *
+ * _.padEnd('abc', 3);
+ * // => 'abc'
+ */
+ function padEnd(string, length, chars) {
+ string = toString(string);
+ length = toInteger(length);
+
+ var strLength = length ? stringSize(string) : 0;
+ return (length && strLength < length)
+ ? (string + createPadding(length - strLength, chars))
+ : string;
+ }
+
+ /**
+ * Pads `string` on the left side if it's shorter than `length`. Padding
+ * characters are truncated if they exceed `length`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category String
+ * @param {string} [string=''] The string to pad.
+ * @param {number} [length=0] The padding length.
+ * @param {string} [chars=' '] The string used as padding.
+ * @returns {string} Returns the padded string.
+ * @example
+ *
+ * _.padStart('abc', 6);
+ * // => ' abc'
+ *
+ * _.padStart('abc', 6, '_-');
+ * // => '_-_abc'
+ *
+ * _.padStart('abc', 3);
+ * // => 'abc'
+ */
+ function padStart(string, length, chars) {
+ string = toString(string);
+ length = toInteger(length);
+
+ var strLength = length ? stringSize(string) : 0;
+ return (length && strLength < length)
+ ? (createPadding(length - strLength, chars) + string)
+ : string;
+ }
+
+ /**
+ * Converts `string` to an integer of the specified radix. If `radix` is
+ * `undefined` or `0`, a `radix` of `10` is used unless `value` is a
+ * hexadecimal, in which case a `radix` of `16` is used.
+ *
+ * **Note:** This method aligns with the
+ * [ES5 implementation](https://es5.github.io/#x15.1.2.2) of `parseInt`.
+ *
+ * @static
+ * @memberOf _
+ * @since 1.1.0
+ * @category String
+ * @param {string} string The string to convert.
+ * @param {number} [radix=10] The radix to interpret `value` by.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {number} Returns the converted integer.
+ * @example
+ *
+ * _.parseInt('08');
+ * // => 8
+ *
+ * _.map(['6', '08', '10'], _.parseInt);
+ * // => [6, 8, 10]
+ */
+ function parseInt(string, radix, guard) {
+ // Chrome fails to trim leading <BOM> whitespace characters.
+ // See https://bugs.chromium.org/p/v8/issues/detail?id=3109 for more details.
+ if (guard || radix == null) {
+ radix = 0;
+ } else if (radix) {
+ radix = +radix;
+ }
+ string = toString(string).replace(reTrim, '');
+ return nativeParseInt(string, radix || (reHasHexPrefix.test(string) ? 16 : 10));
+ }
+
+ /**
+ * Repeats the given string `n` times.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category String
+ * @param {string} [string=''] The string to repeat.
+ * @param {number} [n=1] The number of times to repeat the string.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {string} Returns the repeated string.
+ * @example
+ *
+ * _.repeat('*', 3);
+ * // => '***'
+ *
+ * _.repeat('abc', 2);
+ * // => 'abcabc'
+ *
+ * _.repeat('abc', 0);
+ * // => ''
+ */
+ function repeat(string, n, guard) {
+ if ((guard ? isIterateeCall(string, n, guard) : n === undefined)) {
+ n = 1;
+ } else {
+ n = toInteger(n);
+ }
+ return baseRepeat(toString(string), n);
+ }
+
+ /**
+ * Replaces matches for `pattern` in `string` with `replacement`.
+ *
+ * **Note:** This method is based on
+ * [`String#replace`](https://mdn.io/String/replace).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category String
+ * @param {string} [string=''] The string to modify.
+ * @param {RegExp|string} pattern The pattern to replace.
+ * @param {Function|string} replacement The match replacement.
+ * @returns {string} Returns the modified string.
+ * @example
+ *
+ * _.replace('Hi Fred', 'Fred', 'Barney');
+ * // => 'Hi Barney'
+ */
+ function replace() {
+ var args = arguments,
+ string = toString(args[0]);
+
+ return args.length < 3 ? string : nativeReplace.call(string, args[1], args[2]);
+ }
+
+ /**
+ * Converts `string` to
+ * [snake case](https://en.wikipedia.org/wiki/Snake_case).
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category String
+ * @param {string} [string=''] The string to convert.
+ * @returns {string} Returns the snake cased string.
+ * @example
+ *
+ * _.snakeCase('Foo Bar');
+ * // => 'foo_bar'
+ *
+ * _.snakeCase('fooBar');
+ * // => 'foo_bar'
+ *
+ * _.snakeCase('--FOO-BAR--');
+ * // => 'foo_bar'
+ */
+ var snakeCase = createCompounder(function(result, word, index) {
+ return result + (index ? '_' : '') + word.toLowerCase();
+ });
+
+ /**
+ * Splits `string` by `separator`.
+ *
+ * **Note:** This method is based on
+ * [`String#split`](https://mdn.io/String/split).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category String
+ * @param {string} [string=''] The string to split.
+ * @param {RegExp|string} separator The separator pattern to split by.
+ * @param {number} [limit] The length to truncate results to.
+ * @returns {Array} Returns the new array of string segments.
+ * @example
+ *
+ * _.split('a-b-c', '-', 2);
+ * // => ['a', 'b']
+ */
+ function split(string, separator, limit) {
+ if (limit && typeof limit != 'number' && isIterateeCall(string, separator, limit)) {
+ separator = limit = undefined;
+ }
+ limit = limit === undefined ? MAX_ARRAY_LENGTH : limit >>> 0;
+ if (!limit) {
+ return [];
+ }
+ string = toString(string);
+ if (string && (
+ typeof separator == 'string' ||
+ (separator != null && !isRegExp(separator))
+ )) {
+ separator = baseToString(separator);
+ if (separator == '' && reHasComplexSymbol.test(string)) {
+ return castSlice(stringToArray(string), 0, limit);
+ }
+ }
+ return nativeSplit.call(string, separator, limit);
+ }
+
+ /**
+ * Converts `string` to
+ * [start case](https://en.wikipedia.org/wiki/Letter_case#Stylistic_or_specialised_usage).
+ *
+ * @static
+ * @memberOf _
+ * @since 3.1.0
+ * @category String
+ * @param {string} [string=''] The string to convert.
+ * @returns {string} Returns the start cased string.
+ * @example
+ *
+ * _.startCase('--foo-bar--');
+ * // => 'Foo Bar'
+ *
+ * _.startCase('fooBar');
+ * // => 'Foo Bar'
+ *
+ * _.startCase('__FOO_BAR__');
+ * // => 'FOO BAR'
+ */
+ var startCase = createCompounder(function(result, word, index) {
+ return result + (index ? ' ' : '') + upperFirst(word);
+ });
+
+ /**
+ * Checks if `string` starts with the given target string.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category String
+ * @param {string} [string=''] The string to search.
+ * @param {string} [target] The string to search for.
+ * @param {number} [position=0] The position to search from.
+ * @returns {boolean} Returns `true` if `string` starts with `target`,
+ * else `false`.
+ * @example
+ *
+ * _.startsWith('abc', 'a');
+ * // => true
+ *
+ * _.startsWith('abc', 'b');
+ * // => false
+ *
+ * _.startsWith('abc', 'b', 1);
+ * // => true
+ */
+ function startsWith(string, target, position) {
+ string = toString(string);
+ position = baseClamp(toInteger(position), 0, string.length);
+ return string.lastIndexOf(baseToString(target), position) == position;
+ }
+
+ /**
+ * Creates a compiled template function that can interpolate data properties
+ * in "interpolate" delimiters, HTML-escape interpolated data properties in
+ * "escape" delimiters, and execute JavaScript in "evaluate" delimiters. Data
+ * properties may be accessed as free variables in the template. If a setting
+ * object is given, it takes precedence over `_.templateSettings` values.
+ *
+ * **Note:** In the development build `_.template` utilizes
+ * [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl)
+ * for easier debugging.
+ *
+ * For more information on precompiling templates see
+ * [lodash's custom builds documentation](https://lodash.com/custom-builds).
+ *
+ * For more information on Chrome extension sandboxes see
+ * [Chrome's extensions documentation](https://developer.chrome.com/extensions/sandboxingEval).
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category String
+ * @param {string} [string=''] The template string.
+ * @param {Object} [options={}] The options object.
+ * @param {RegExp} [options.escape=_.templateSettings.escape]
+ * The HTML "escape" delimiter.
+ * @param {RegExp} [options.evaluate=_.templateSettings.evaluate]
+ * The "evaluate" delimiter.
+ * @param {Object} [options.imports=_.templateSettings.imports]
+ * An object to import into the template as free variables.
+ * @param {RegExp} [options.interpolate=_.templateSettings.interpolate]
+ * The "interpolate" delimiter.
+ * @param {string} [options.sourceURL='lodash.templateSources[n]']
+ * The sourceURL of the compiled template.
+ * @param {string} [options.variable='obj']
+ * The data object variable name.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {Function} Returns the compiled template function.
+ * @example
+ *
+ * // Use the "interpolate" delimiter to create a compiled template.
+ * var compiled = _.template('hello <%= user %>!');
+ * compiled({ 'user': 'fred' });
+ * // => 'hello fred!'
+ *
+ * // Use the HTML "escape" delimiter to escape data property values.
+ * var compiled = _.template('<b><%- value %></b>');
+ * compiled({ 'value': '<script>' });
+ * // => '<b><script></b>'
+ *
+ * // Use the "evaluate" delimiter to execute JavaScript and generate HTML.
+ * var compiled = _.template('<% _.forEach(users, function(user) { %><li><%- user %></li><% }); %>');
+ * compiled({ 'users': ['fred', 'barney'] });
+ * // => '<li>fred</li><li>barney</li>'
+ *
+ * // Use the internal `print` function in "evaluate" delimiters.
+ * var compiled = _.template('<% print("hello " + user); %>!');
+ * compiled({ 'user': 'barney' });
+ * // => 'hello barney!'
+ *
+ * // Use the ES delimiter as an alternative to the default "interpolate" delimiter.
+ * var compiled = _.template('hello ${ user }!');
+ * compiled({ 'user': 'pebbles' });
+ * // => 'hello pebbles!'
+ *
+ * // Use custom template delimiters.
+ * _.templateSettings.interpolate = /{{([\s\S]+?)}}/g;
+ * var compiled = _.template('hello {{ user }}!');
+ * compiled({ 'user': 'mustache' });
+ * // => 'hello mustache!'
+ *
+ * // Use backslashes to treat delimiters as plain text.
+ * var compiled = _.template('<%= "\\<%- value %\\>" %>');
+ * compiled({ 'value': 'ignored' });
+ * // => '<%- value %>'
+ *
+ * // Use the `imports` option to import `jQuery` as `jq`.
+ * var text = '<% jq.each(users, function(user) { %><li><%- user %></li><% }); %>';
+ * var compiled = _.template(text, { 'imports': { 'jq': jQuery } });
+ * compiled({ 'users': ['fred', 'barney'] });
+ * // => '<li>fred</li><li>barney</li>'
+ *
+ * // Use the `sourceURL` option to specify a custom sourceURL for the template.
+ * var compiled = _.template('hello <%= user %>!', { 'sourceURL': '/basic/greeting.jst' });
+ * compiled(data);
+ * // => Find the source of "greeting.jst" under the Sources tab or Resources panel of the web inspector.
+ *
+ * // Use the `variable` option to ensure a with-statement isn't used in the compiled template.
+ * var compiled = _.template('hi <%= data.user %>!', { 'variable': 'data' });
+ * compiled.source;
+ * // => function(data) {
+ * // var __t, __p = '';
+ * // __p += 'hi ' + ((__t = ( data.user )) == null ? '' : __t) + '!';
+ * // return __p;
+ * // }
+ *
+ * // Use the `source` property to inline compiled templates for meaningful
+ * // line numbers in error messages and stack traces.
+ * fs.writeFileSync(path.join(cwd, 'jst.js'), '\
+ * var JST = {\
+ * "main": ' + _.template(mainText).source + '\
+ * };\
+ * ');
+ */
+ function template(string, options, guard) {
+ // Based on John Resig's `tmpl` implementation
+ // (http://ejohn.org/blog/javascript-micro-templating/)
+ // and Laura Doktorova's doT.js (https://github.com/olado/doT).
+ var settings = lodash.templateSettings;
+
+ if (guard && isIterateeCall(string, options, guard)) {
+ options = undefined;
+ }
+ string = toString(string);
+ options = assignInWith({}, options, settings, assignInDefaults);
+
+ var imports = assignInWith({}, options.imports, settings.imports, assignInDefaults),
+ importsKeys = keys(imports),
+ importsValues = baseValues(imports, importsKeys);
+
+ var isEscaping,
+ isEvaluating,
+ index = 0,
+ interpolate = options.interpolate || reNoMatch,
+ source = "__p += '";
+
+ // Compile the regexp to match each delimiter.
+ var reDelimiters = RegExp(
+ (options.escape || reNoMatch).source + '|' +
+ interpolate.source + '|' +
+ (interpolate === reInterpolate ? reEsTemplate : reNoMatch).source + '|' +
+ (options.evaluate || reNoMatch).source + '|$'
+ , 'g');
+
+ // Use a sourceURL for easier debugging.
+ var sourceURL = '//# sourceURL=' +
+ ('sourceURL' in options
+ ? options.sourceURL
+ : ('lodash.templateSources[' + (++templateCounter) + ']')
+ ) + '\n';
+
+ string.replace(reDelimiters, function(match, escapeValue, interpolateValue, esTemplateValue, evaluateValue, offset) {
+ interpolateValue || (interpolateValue = esTemplateValue);
+
+ // Escape characters that can't be included in string literals.
+ source += string.slice(index, offset).replace(reUnescapedString, escapeStringChar);
+
+ // Replace delimiters with snippets.
+ if (escapeValue) {
+ isEscaping = true;
+ source += "' +\n__e(" + escapeValue + ") +\n'";
+ }
+ if (evaluateValue) {
+ isEvaluating = true;
+ source += "';\n" + evaluateValue + ";\n__p += '";
+ }
+ if (interpolateValue) {
+ source += "' +\n((__t = (" + interpolateValue + ")) == null ? '' : __t) +\n'";
+ }
+ index = offset + match.length;
+
+ // The JS engine embedded in Adobe products needs `match` returned in
+ // order to produce the correct `offset` value.
+ return match;
+ });
+
+ source += "';\n";
+
+ // If `variable` is not specified wrap a with-statement around the generated
+ // code to add the data object to the top of the scope chain.
+ var variable = options.variable;
+ if (!variable) {
+ source = 'with (obj) {\n' + source + '\n}\n';
+ }
+ // Cleanup code by stripping empty strings.
+ source = (isEvaluating ? source.replace(reEmptyStringLeading, '') : source)
+ .replace(reEmptyStringMiddle, '$1')
+ .replace(reEmptyStringTrailing, '$1;');
+
+ // Frame code as the function body.
+ source = 'function(' + (variable || 'obj') + ') {\n' +
+ (variable
+ ? ''
+ : 'obj || (obj = {});\n'
+ ) +
+ "var __t, __p = ''" +
+ (isEscaping
+ ? ', __e = _.escape'
+ : ''
+ ) +
+ (isEvaluating
+ ? ', __j = Array.prototype.join;\n' +
+ "function print() { __p += __j.call(arguments, '') }\n"
+ : ';\n'
+ ) +
+ source +
+ 'return __p\n}';
+
+ var result = attempt(function() {
+ return Function(importsKeys, sourceURL + 'return ' + source)
+ .apply(undefined, importsValues);
+ });
+
+ // Provide the compiled function's source by its `toString` method or
+ // the `source` property as a convenience for inlining compiled templates.
+ result.source = source;
+ if (isError(result)) {
+ throw result;
+ }
+ return result;
+ }
+
+ /**
+ * Converts `string`, as a whole, to lower case just like
+ * [String#toLowerCase](https://mdn.io/toLowerCase).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category String
+ * @param {string} [string=''] The string to convert.
+ * @returns {string} Returns the lower cased string.
+ * @example
+ *
+ * _.toLower('--Foo-Bar--');
+ * // => '--foo-bar--'
+ *
+ * _.toLower('fooBar');
+ * // => 'foobar'
+ *
+ * _.toLower('__FOO_BAR__');
+ * // => '__foo_bar__'
+ */
+ function toLower(value) {
+ return toString(value).toLowerCase();
+ }
+
+ /**
+ * Converts `string`, as a whole, to upper case just like
+ * [String#toUpperCase](https://mdn.io/toUpperCase).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category String
+ * @param {string} [string=''] The string to convert.
+ * @returns {string} Returns the upper cased string.
+ * @example
+ *
+ * _.toUpper('--foo-bar--');
+ * // => '--FOO-BAR--'
+ *
+ * _.toUpper('fooBar');
+ * // => 'FOOBAR'
+ *
+ * _.toUpper('__foo_bar__');
+ * // => '__FOO_BAR__'
+ */
+ function toUpper(value) {
+ return toString(value).toUpperCase();
+ }
+
+ /**
+ * Removes leading and trailing whitespace or specified characters from `string`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category String
+ * @param {string} [string=''] The string to trim.
+ * @param {string} [chars=whitespace] The characters to trim.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {string} Returns the trimmed string.
+ * @example
+ *
+ * _.trim(' abc ');
+ * // => 'abc'
+ *
+ * _.trim('-_-abc-_-', '_-');
+ * // => 'abc'
+ *
+ * _.map([' foo ', ' bar '], _.trim);
+ * // => ['foo', 'bar']
+ */
+ function trim(string, chars, guard) {
+ string = toString(string);
+ if (string && (guard || chars === undefined)) {
+ return string.replace(reTrim, '');
+ }
+ if (!string || !(chars = baseToString(chars))) {
+ return string;
+ }
+ var strSymbols = stringToArray(string),
+ chrSymbols = stringToArray(chars),
+ start = charsStartIndex(strSymbols, chrSymbols),
+ end = charsEndIndex(strSymbols, chrSymbols) + 1;
+
+ return castSlice(strSymbols, start, end).join('');
+ }
+
+ /**
+ * Removes trailing whitespace or specified characters from `string`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category String
+ * @param {string} [string=''] The string to trim.
+ * @param {string} [chars=whitespace] The characters to trim.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {string} Returns the trimmed string.
+ * @example
+ *
+ * _.trimEnd(' abc ');
+ * // => ' abc'
+ *
+ * _.trimEnd('-_-abc-_-', '_-');
+ * // => '-_-abc'
+ */
+ function trimEnd(string, chars, guard) {
+ string = toString(string);
+ if (string && (guard || chars === undefined)) {
+ return string.replace(reTrimEnd, '');
+ }
+ if (!string || !(chars = baseToString(chars))) {
+ return string;
+ }
+ var strSymbols = stringToArray(string),
+ end = charsEndIndex(strSymbols, stringToArray(chars)) + 1;
+
+ return castSlice(strSymbols, 0, end).join('');
+ }
+
+ /**
+ * Removes leading whitespace or specified characters from `string`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category String
+ * @param {string} [string=''] The string to trim.
+ * @param {string} [chars=whitespace] The characters to trim.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {string} Returns the trimmed string.
+ * @example
+ *
+ * _.trimStart(' abc ');
+ * // => 'abc '
+ *
+ * _.trimStart('-_-abc-_-', '_-');
+ * // => 'abc-_-'
+ */
+ function trimStart(string, chars, guard) {
+ string = toString(string);
+ if (string && (guard || chars === undefined)) {
+ return string.replace(reTrimStart, '');
+ }
+ if (!string || !(chars = baseToString(chars))) {
+ return string;
+ }
+ var strSymbols = stringToArray(string),
+ start = charsStartIndex(strSymbols, stringToArray(chars));
+
+ return castSlice(strSymbols, start).join('');
+ }
+
+ /**
+ * Truncates `string` if it's longer than the given maximum string length.
+ * The last characters of the truncated string are replaced with the omission
+ * string which defaults to "...".
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category String
+ * @param {string} [string=''] The string to truncate.
+ * @param {Object} [options={}] The options object.
+ * @param {number} [options.length=30] The maximum string length.
+ * @param {string} [options.omission='...'] The string to indicate text is omitted.
+ * @param {RegExp|string} [options.separator] The separator pattern to truncate to.
+ * @returns {string} Returns the truncated string.
+ * @example
+ *
+ * _.truncate('hi-diddly-ho there, neighborino');
+ * // => 'hi-diddly-ho there, neighbo...'
+ *
+ * _.truncate('hi-diddly-ho there, neighborino', {
+ * 'length': 24,
+ * 'separator': ' '
+ * });
+ * // => 'hi-diddly-ho there,...'
+ *
+ * _.truncate('hi-diddly-ho there, neighborino', {
+ * 'length': 24,
+ * 'separator': /,? +/
+ * });
+ * // => 'hi-diddly-ho there...'
+ *
+ * _.truncate('hi-diddly-ho there, neighborino', {
+ * 'omission': ' [...]'
+ * });
+ * // => 'hi-diddly-ho there, neig [...]'
+ */
+ function truncate(string, options) {
+ var length = DEFAULT_TRUNC_LENGTH,
+ omission = DEFAULT_TRUNC_OMISSION;
+
+ if (isObject(options)) {
+ var separator = 'separator' in options ? options.separator : separator;
+ length = 'length' in options ? toInteger(options.length) : length;
+ omission = 'omission' in options ? baseToString(options.omission) : omission;
+ }
+ string = toString(string);
+
+ var strLength = string.length;
+ if (reHasComplexSymbol.test(string)) {
+ var strSymbols = stringToArray(string);
+ strLength = strSymbols.length;
+ }
+ if (length >= strLength) {
+ return string;
+ }
+ var end = length - stringSize(omission);
+ if (end < 1) {
+ return omission;
+ }
+ var result = strSymbols
+ ? castSlice(strSymbols, 0, end).join('')
+ : string.slice(0, end);
+
+ if (separator === undefined) {
+ return result + omission;
+ }
+ if (strSymbols) {
+ end += (result.length - end);
+ }
+ if (isRegExp(separator)) {
+ if (string.slice(end).search(separator)) {
+ var match,
+ substring = result;
+
+ if (!separator.global) {
+ separator = RegExp(separator.source, toString(reFlags.exec(separator)) + 'g');
+ }
+ separator.lastIndex = 0;
+ while ((match = separator.exec(substring))) {
+ var newEnd = match.index;
+ }
+ result = result.slice(0, newEnd === undefined ? end : newEnd);
+ }
+ } else if (string.indexOf(baseToString(separator), end) != end) {
+ var index = result.lastIndexOf(separator);
+ if (index > -1) {
+ result = result.slice(0, index);
+ }
+ }
+ return result + omission;
+ }
+
+ /**
+ * The inverse of `_.escape`; this method converts the HTML entities
+ * `&`, `<`, `>`, `"`, `'`, and ``` in `string` to
+ * their corresponding characters.
+ *
+ * **Note:** No other HTML entities are unescaped. To unescape additional
+ * HTML entities use a third-party library like [_he_](https://mths.be/he).
+ *
+ * @static
+ * @memberOf _
+ * @since 0.6.0
+ * @category String
+ * @param {string} [string=''] The string to unescape.
+ * @returns {string} Returns the unescaped string.
+ * @example
+ *
+ * _.unescape('fred, barney, & pebbles');
+ * // => 'fred, barney, & pebbles'
+ */
+ function unescape(string) {
+ string = toString(string);
+ return (string && reHasEscapedHtml.test(string))
+ ? string.replace(reEscapedHtml, unescapeHtmlChar)
+ : string;
+ }
+
+ /**
+ * Converts `string`, as space separated words, to upper case.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category String
+ * @param {string} [string=''] The string to convert.
+ * @returns {string} Returns the upper cased string.
+ * @example
+ *
+ * _.upperCase('--foo-bar');
+ * // => 'FOO BAR'
+ *
+ * _.upperCase('fooBar');
+ * // => 'FOO BAR'
+ *
+ * _.upperCase('__foo_bar__');
+ * // => 'FOO BAR'
+ */
+ var upperCase = createCompounder(function(result, word, index) {
+ return result + (index ? ' ' : '') + word.toUpperCase();
+ });
+
+ /**
+ * Converts the first character of `string` to upper case.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category String
+ * @param {string} [string=''] The string to convert.
+ * @returns {string} Returns the converted string.
+ * @example
+ *
+ * _.upperFirst('fred');
+ * // => 'Fred'
+ *
+ * _.upperFirst('FRED');
+ * // => 'FRED'
+ */
+ var upperFirst = createCaseFirst('toUpperCase');
+
+ /**
+ * Splits `string` into an array of its words.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category String
+ * @param {string} [string=''] The string to inspect.
+ * @param {RegExp|string} [pattern] The pattern to match words.
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
+ * @returns {Array} Returns the words of `string`.
+ * @example
+ *
+ * _.words('fred, barney, & pebbles');
+ * // => ['fred', 'barney', 'pebbles']
+ *
+ * _.words('fred, barney, & pebbles', /[^, ]+/g);
+ * // => ['fred', 'barney', '&', 'pebbles']
+ */
+ function words(string, pattern, guard) {
+ string = toString(string);
+ pattern = guard ? undefined : pattern;
+
+ if (pattern === undefined) {
+ pattern = reHasComplexWord.test(string) ? reComplexWord : reBasicWord;
+ }
+ return string.match(pattern) || [];
+ }
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Attempts to invoke `func`, returning either the result or the caught error
+ * object. Any additional arguments are provided to `func` when it's invoked.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Util
+ * @param {Function} func The function to attempt.
+ * @param {...*} [args] The arguments to invoke `func` with.
+ * @returns {*} Returns the `func` result or error object.
+ * @example
+ *
+ * // Avoid throwing errors for invalid selectors.
+ * var elements = _.attempt(function(selector) {
+ * return document.querySelectorAll(selector);
+ * }, '>_>');
+ *
+ * if (_.isError(elements)) {
+ * elements = [];
+ * }
+ */
+ var attempt = rest(function(func, args) {
+ try {
+ return apply(func, undefined, args);
+ } catch (e) {
+ return isError(e) ? e : new Error(e);
+ }
+ });
+
+ /**
+ * Binds methods of an object to the object itself, overwriting the existing
+ * method.
+ *
+ * **Note:** This method doesn't set the "length" property of bound functions.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Util
+ * @param {Object} object The object to bind and assign the bound methods to.
+ * @param {...(string|string[])} methodNames The object method names to bind.
+ * @returns {Object} Returns `object`.
+ * @example
+ *
+ * var view = {
+ * 'label': 'docs',
+ * 'onClick': function() {
+ * console.log('clicked ' + this.label);
+ * }
+ * };
+ *
+ * _.bindAll(view, 'onClick');
+ * jQuery(element).on('click', view.onClick);
+ * // => Logs 'clicked docs' when clicked.
+ */
+ var bindAll = rest(function(object, methodNames) {
+ arrayEach(baseFlatten(methodNames, 1), function(key) {
+ key = toKey(key);
+ object[key] = bind(object[key], object);
+ });
+ return object;
+ });
+
+ /**
+ * Creates a function that iterates over `pairs` and invokes the corresponding
+ * function of the first predicate to return truthy. The predicate-function
+ * pairs are invoked with the `this` binding and arguments of the created
+ * function.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Util
+ * @param {Array} pairs The predicate-function pairs.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * var func = _.cond([
+ * [_.matches({ 'a': 1 }), _.constant('matches A')],
+ * [_.conforms({ 'b': _.isNumber }), _.constant('matches B')],
+ * [_.constant(true), _.constant('no match')]
+ * ]);
+ *
+ * func({ 'a': 1, 'b': 2 });
+ * // => 'matches A'
+ *
+ * func({ 'a': 0, 'b': 1 });
+ * // => 'matches B'
+ *
+ * func({ 'a': '1', 'b': '2' });
+ * // => 'no match'
+ */
+ function cond(pairs) {
+ var length = pairs ? pairs.length : 0,
+ toIteratee = getIteratee();
+
+ pairs = !length ? [] : arrayMap(pairs, function(pair) {
+ if (typeof pair[1] != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ return [toIteratee(pair[0]), pair[1]];
+ });
+
+ return rest(function(args) {
+ var index = -1;
+ while (++index < length) {
+ var pair = pairs[index];
+ if (apply(pair[0], this, args)) {
+ return apply(pair[1], this, args);
+ }
+ }
+ });
+ }
+
+ /**
+ * Creates a function that invokes the predicate properties of `source` with
+ * the corresponding property values of a given object, returning `true` if
+ * all predicates return truthy, else `false`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Util
+ * @param {Object} source The object of property predicates to conform to.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'age': 36 },
+ * { 'user': 'fred', 'age': 40 }
+ * ];
+ *
+ * _.filter(users, _.conforms({ 'age': _.partial(_.gt, _, 38) }));
+ * // => [{ 'user': 'fred', 'age': 40 }]
+ */
+ function conforms(source) {
+ return baseConforms(baseClone(source, true));
+ }
+
+ /**
+ * Creates a function that returns `value`.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.4.0
+ * @category Util
+ * @param {*} value The value to return from the new function.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * var object = { 'user': 'fred' };
+ * var getter = _.constant(object);
+ *
+ * getter() === object;
+ * // => true
+ */
+ function constant(value) {
+ return function() {
+ return value;
+ };
+ }
+
+ /**
+ * Creates a function that returns the result of invoking the given functions
+ * with the `this` binding of the created function, where each successive
+ * invocation is supplied the return value of the previous.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Util
+ * @param {...(Function|Function[])} [funcs] Functions to invoke.
+ * @returns {Function} Returns the new function.
+ * @see _.flowRight
+ * @example
+ *
+ * function square(n) {
+ * return n * n;
+ * }
+ *
+ * var addSquare = _.flow(_.add, square);
+ * addSquare(1, 2);
+ * // => 9
+ */
+ var flow = createFlow();
+
+ /**
+ * This method is like `_.flow` except that it creates a function that
+ * invokes the given functions from right to left.
+ *
+ * @static
+ * @since 3.0.0
+ * @memberOf _
+ * @category Util
+ * @param {...(Function|Function[])} [funcs] Functions to invoke.
+ * @returns {Function} Returns the new function.
+ * @see _.flow
+ * @example
+ *
+ * function square(n) {
+ * return n * n;
+ * }
+ *
+ * var addSquare = _.flowRight(square, _.add);
+ * addSquare(1, 2);
+ * // => 9
+ */
+ var flowRight = createFlow(true);
+
+ /**
+ * This method returns the first argument given to it.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Util
+ * @param {*} value Any value.
+ * @returns {*} Returns `value`.
+ * @example
+ *
+ * var object = { 'user': 'fred' };
+ *
+ * _.identity(object) === object;
+ * // => true
+ */
+ function identity(value) {
+ return value;
+ }
+
+ /**
+ * Creates a function that invokes `func` with the arguments of the created
+ * function. If `func` is a property name, the created function returns the
+ * property value for a given element. If `func` is an array or object, the
+ * created function returns `true` for elements that contain the equivalent
+ * source properties, otherwise it returns `false`.
+ *
+ * @static
+ * @since 4.0.0
+ * @memberOf _
+ * @category Util
+ * @param {*} [func=_.identity] The value to convert to a callback.
+ * @returns {Function} Returns the callback.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'age': 36, 'active': true },
+ * { 'user': 'fred', 'age': 40, 'active': false }
+ * ];
+ *
+ * // The `_.matches` iteratee shorthand.
+ * _.filter(users, _.iteratee({ 'user': 'barney', 'active': true }));
+ * // => [{ 'user': 'barney', 'age': 36, 'active': true }]
+ *
+ * // The `_.matchesProperty` iteratee shorthand.
+ * _.filter(users, _.iteratee(['user', 'fred']));
+ * // => [{ 'user': 'fred', 'age': 40 }]
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.map(users, _.iteratee('user'));
+ * // => ['barney', 'fred']
+ *
+ * // Create custom iteratee shorthands.
+ * _.iteratee = _.wrap(_.iteratee, function(iteratee, func) {
+ * return !_.isRegExp(func) ? iteratee(func) : function(string) {
+ * return func.test(string);
+ * };
+ * });
+ *
+ * _.filter(['abc', 'def'], /ef/);
+ * // => ['def']
+ */
+ function iteratee(func) {
+ return baseIteratee(typeof func == 'function' ? func : baseClone(func, true));
+ }
+
+ /**
+ * Creates a function that performs a partial deep comparison between a given
+ * object and `source`, returning `true` if the given object has equivalent
+ * property values, else `false`. The created function is equivalent to
+ * `_.isMatch` with a `source` partially applied.
+ *
+ * **Note:** This method supports comparing the same values as `_.isEqual`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Util
+ * @param {Object} source The object of property values to match.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'age': 36, 'active': true },
+ * { 'user': 'fred', 'age': 40, 'active': false }
+ * ];
+ *
+ * _.filter(users, _.matches({ 'age': 40, 'active': false }));
+ * // => [{ 'user': 'fred', 'age': 40, 'active': false }]
+ */
+ function matches(source) {
+ return baseMatches(baseClone(source, true));
+ }
+
+ /**
+ * Creates a function that performs a partial deep comparison between the
+ * value at `path` of a given object to `srcValue`, returning `true` if the
+ * object value is equivalent, else `false`.
+ *
+ * **Note:** This method supports comparing the same values as `_.isEqual`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.2.0
+ * @category Util
+ * @param {Array|string} path The path of the property to get.
+ * @param {*} srcValue The value to match.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney' },
+ * { 'user': 'fred' }
+ * ];
+ *
+ * _.find(users, _.matchesProperty('user', 'fred'));
+ * // => { 'user': 'fred' }
+ */
+ function matchesProperty(path, srcValue) {
+ return baseMatchesProperty(path, baseClone(srcValue, true));
+ }
+
+ /**
+ * Creates a function that invokes the method at `path` of a given object.
+ * Any additional arguments are provided to the invoked method.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.7.0
+ * @category Util
+ * @param {Array|string} path The path of the method to invoke.
+ * @param {...*} [args] The arguments to invoke the method with.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * var objects = [
+ * { 'a': { 'b': _.constant(2) } },
+ * { 'a': { 'b': _.constant(1) } }
+ * ];
+ *
+ * _.map(objects, _.method('a.b'));
+ * // => [2, 1]
+ *
+ * _.map(objects, _.method(['a', 'b']));
+ * // => [2, 1]
+ */
+ var method = rest(function(path, args) {
+ return function(object) {
+ return baseInvoke(object, path, args);
+ };
+ });
+
+ /**
+ * The opposite of `_.method`; this method creates a function that invokes
+ * the method at a given path of `object`. Any additional arguments are
+ * provided to the invoked method.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.7.0
+ * @category Util
+ * @param {Object} object The object to query.
+ * @param {...*} [args] The arguments to invoke the method with.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * var array = _.times(3, _.constant),
+ * object = { 'a': array, 'b': array, 'c': array };
+ *
+ * _.map(['a[2]', 'c[0]'], _.methodOf(object));
+ * // => [2, 0]
+ *
+ * _.map([['a', '2'], ['c', '0']], _.methodOf(object));
+ * // => [2, 0]
+ */
+ var methodOf = rest(function(object, args) {
+ return function(path) {
+ return baseInvoke(object, path, args);
+ };
+ });
+
+ /**
+ * Adds all own enumerable string keyed function properties of a source
+ * object to the destination object. If `object` is a function, then methods
+ * are added to its prototype as well.
+ *
+ * **Note:** Use `_.runInContext` to create a pristine `lodash` function to
+ * avoid conflicts caused by modifying the original.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Util
+ * @param {Function|Object} [object=lodash] The destination object.
+ * @param {Object} source The object of functions to add.
+ * @param {Object} [options={}] The options object.
+ * @param {boolean} [options.chain=true] Specify whether mixins are chainable.
+ * @returns {Function|Object} Returns `object`.
+ * @example
+ *
+ * function vowels(string) {
+ * return _.filter(string, function(v) {
+ * return /[aeiou]/i.test(v);
+ * });
+ * }
+ *
+ * _.mixin({ 'vowels': vowels });
+ * _.vowels('fred');
+ * // => ['e']
+ *
+ * _('fred').vowels().value();
+ * // => ['e']
+ *
+ * _.mixin({ 'vowels': vowels }, { 'chain': false });
+ * _('fred').vowels();
+ * // => ['e']
+ */
+ function mixin(object, source, options) {
+ var props = keys(source),
+ methodNames = baseFunctions(source, props);
+
+ if (options == null &&
+ !(isObject(source) && (methodNames.length || !props.length))) {
+ options = source;
+ source = object;
+ object = this;
+ methodNames = baseFunctions(source, keys(source));
+ }
+ var chain = !(isObject(options) && 'chain' in options) || !!options.chain,
+ isFunc = isFunction(object);
+
+ arrayEach(methodNames, function(methodName) {
+ var func = source[methodName];
+ object[methodName] = func;
+ if (isFunc) {
+ object.prototype[methodName] = function() {
+ var chainAll = this.__chain__;
+ if (chain || chainAll) {
+ var result = object(this.__wrapped__),
+ actions = result.__actions__ = copyArray(this.__actions__);
+
+ actions.push({ 'func': func, 'args': arguments, 'thisArg': object });
+ result.__chain__ = chainAll;
+ return result;
+ }
+ return func.apply(object, arrayPush([this.value()], arguments));
+ };
+ }
+ });
+
+ return object;
+ }
+
+ /**
+ * Reverts the `_` variable to its previous value and returns a reference to
+ * the `lodash` function.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Util
+ * @returns {Function} Returns the `lodash` function.
+ * @example
+ *
+ * var lodash = _.noConflict();
+ */
+ function noConflict() {
+ if (root._ === this) {
+ root._ = oldDash;
+ }
+ return this;
+ }
+
+ /**
+ * A no-operation function that returns `undefined` regardless of the
+ * arguments it receives.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.3.0
+ * @category Util
+ * @example
+ *
+ * var object = { 'user': 'fred' };
+ *
+ * _.noop(object) === undefined;
+ * // => true
+ */
+ function noop() {
+ // No operation performed.
+ }
+
+ /**
+ * Creates a function that returns its nth argument. If `n` is negative,
+ * the nth argument from the end is returned.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Util
+ * @param {number} [n=0] The index of the argument to return.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * var func = _.nthArg(1);
+ * func('a', 'b', 'c', 'd');
+ * // => 'b'
+ *
+ * var func = _.nthArg(-2);
+ * func('a', 'b', 'c', 'd');
+ * // => 'c'
+ */
+ function nthArg(n) {
+ n = toInteger(n);
+ return rest(function(args) {
+ return baseNth(args, n);
+ });
+ }
+
+ /**
+ * Creates a function that invokes `iteratees` with the arguments it receives
+ * and returns their results.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Util
+ * @param {...(Array|Array[]|Function|Function[]|Object|Object[]|string|string[])}
+ * [iteratees=[_.identity]] The iteratees to invoke.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * var func = _.over(Math.max, Math.min);
+ *
+ * func(1, 2, 3, 4);
+ * // => [4, 1]
+ */
+ var over = createOver(arrayMap);
+
+ /**
+ * Creates a function that checks if **all** of the `predicates` return
+ * truthy when invoked with the arguments it receives.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Util
+ * @param {...(Array|Array[]|Function|Function[]|Object|Object[]|string|string[])}
+ * [predicates=[_.identity]] The predicates to check.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * var func = _.overEvery(Boolean, isFinite);
+ *
+ * func('1');
+ * // => true
+ *
+ * func(null);
+ * // => false
+ *
+ * func(NaN);
+ * // => false
+ */
+ var overEvery = createOver(arrayEvery);
+
+ /**
+ * Creates a function that checks if **any** of the `predicates` return
+ * truthy when invoked with the arguments it receives.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Util
+ * @param {...(Array|Array[]|Function|Function[]|Object|Object[]|string|string[])}
+ * [predicates=[_.identity]] The predicates to check.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * var func = _.overSome(Boolean, isFinite);
+ *
+ * func('1');
+ * // => true
+ *
+ * func(null);
+ * // => true
+ *
+ * func(NaN);
+ * // => false
+ */
+ var overSome = createOver(arraySome);
+
+ /**
+ * Creates a function that returns the value at `path` of a given object.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.4.0
+ * @category Util
+ * @param {Array|string} path The path of the property to get.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * var objects = [
+ * { 'a': { 'b': 2 } },
+ * { 'a': { 'b': 1 } }
+ * ];
+ *
+ * _.map(objects, _.property('a.b'));
+ * // => [2, 1]
+ *
+ * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');
+ * // => [1, 2]
+ */
+ function property(path) {
+ return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);
+ }
+
+ /**
+ * The opposite of `_.property`; this method creates a function that returns
+ * the value at a given path of `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Util
+ * @param {Object} object The object to query.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * var array = [0, 1, 2],
+ * object = { 'a': array, 'b': array, 'c': array };
+ *
+ * _.map(['a[2]', 'c[0]'], _.propertyOf(object));
+ * // => [2, 0]
+ *
+ * _.map([['a', '2'], ['c', '0']], _.propertyOf(object));
+ * // => [2, 0]
+ */
+ function propertyOf(object) {
+ return function(path) {
+ return object == null ? undefined : baseGet(object, path);
+ };
+ }
+
+ /**
+ * Creates an array of numbers (positive and/or negative) progressing from
+ * `start` up to, but not including, `end`. A step of `-1` is used if a negative
+ * `start` is specified without an `end` or `step`. If `end` is not specified,
+ * it's set to `start` with `start` then set to `0`.
+ *
+ * **Note:** JavaScript follows the IEEE-754 standard for resolving
+ * floating-point values which can produce unexpected results.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Util
+ * @param {number} [start=0] The start of the range.
+ * @param {number} end The end of the range.
+ * @param {number} [step=1] The value to increment or decrement by.
+ * @returns {Array} Returns the new array of numbers.
+ * @see _.inRange, _.rangeRight
+ * @example
+ *
+ * _.range(4);
+ * // => [0, 1, 2, 3]
+ *
+ * _.range(-4);
+ * // => [0, -1, -2, -3]
+ *
+ * _.range(1, 5);
+ * // => [1, 2, 3, 4]
+ *
+ * _.range(0, 20, 5);
+ * // => [0, 5, 10, 15]
+ *
+ * _.range(0, -4, -1);
+ * // => [0, -1, -2, -3]
+ *
+ * _.range(1, 4, 0);
+ * // => [1, 1, 1]
+ *
+ * _.range(0);
+ * // => []
+ */
+ var range = createRange();
+
+ /**
+ * This method is like `_.range` except that it populates values in
+ * descending order.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Util
+ * @param {number} [start=0] The start of the range.
+ * @param {number} end The end of the range.
+ * @param {number} [step=1] The value to increment or decrement by.
+ * @returns {Array} Returns the new array of numbers.
+ * @see _.inRange, _.range
+ * @example
+ *
+ * _.rangeRight(4);
+ * // => [3, 2, 1, 0]
+ *
+ * _.rangeRight(-4);
+ * // => [-3, -2, -1, 0]
+ *
+ * _.rangeRight(1, 5);
+ * // => [4, 3, 2, 1]
+ *
+ * _.rangeRight(0, 20, 5);
+ * // => [15, 10, 5, 0]
+ *
+ * _.rangeRight(0, -4, -1);
+ * // => [-3, -2, -1, 0]
+ *
+ * _.rangeRight(1, 4, 0);
+ * // => [1, 1, 1]
+ *
+ * _.rangeRight(0);
+ * // => []
+ */
+ var rangeRight = createRange(true);
+
+ /**
+ * Invokes the iteratee `n` times, returning an array of the results of
+ * each invocation. The iteratee is invoked with one argument; (index).
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Util
+ * @param {number} n The number of times to invoke `iteratee`.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @returns {Array} Returns the array of results.
+ * @example
+ *
+ * _.times(3, String);
+ * // => ['0', '1', '2']
+ *
+ * _.times(4, _.constant(true));
+ * // => [true, true, true, true]
+ */
+ function times(n, iteratee) {
+ n = toInteger(n);
+ if (n < 1 || n > MAX_SAFE_INTEGER) {
+ return [];
+ }
+ var index = MAX_ARRAY_LENGTH,
+ length = nativeMin(n, MAX_ARRAY_LENGTH);
+
+ iteratee = getIteratee(iteratee);
+ n -= MAX_ARRAY_LENGTH;
+
+ var result = baseTimes(length, iteratee);
+ while (++index < n) {
+ iteratee(index);
+ }
+ return result;
+ }
+
+ /**
+ * Converts `value` to a property path array.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Util
+ * @param {*} value The value to convert.
+ * @returns {Array} Returns the new property path array.
+ * @example
+ *
+ * _.toPath('a.b.c');
+ * // => ['a', 'b', 'c']
+ *
+ * _.toPath('a[0].b.c');
+ * // => ['a', '0', 'b', 'c']
+ *
+ * var path = ['a', 'b', 'c'],
+ * newPath = _.toPath(path);
+ *
+ * console.log(newPath);
+ * // => ['a', 'b', 'c']
+ *
+ * console.log(path === newPath);
+ * // => false
+ */
+ function toPath(value) {
+ if (isArray(value)) {
+ return arrayMap(value, toKey);
+ }
+ return isSymbol(value) ? [value] : copyArray(stringToPath(value));
+ }
+
+ /**
+ * Generates a unique ID. If `prefix` is given, the ID is appended to it.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Util
+ * @param {string} [prefix=''] The value to prefix the ID with.
+ * @returns {string} Returns the unique ID.
+ * @example
+ *
+ * _.uniqueId('contact_');
+ * // => 'contact_104'
+ *
+ * _.uniqueId();
+ * // => '105'
+ */
+ function uniqueId(prefix) {
+ var id = ++idCounter;
+ return toString(prefix) + id;
+ }
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * Adds two numbers.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.4.0
+ * @category Math
+ * @param {number} augend The first number in an addition.
+ * @param {number} addend The second number in an addition.
+ * @returns {number} Returns the total.
+ * @example
+ *
+ * _.add(6, 4);
+ * // => 10
+ */
+ var add = createMathOperation(function(augend, addend) {
+ return augend + addend;
+ });
+
+ /**
+ * Computes `number` rounded up to `precision`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.10.0
+ * @category Math
+ * @param {number} number The number to round up.
+ * @param {number} [precision=0] The precision to round up to.
+ * @returns {number} Returns the rounded up number.
+ * @example
+ *
+ * _.ceil(4.006);
+ * // => 5
+ *
+ * _.ceil(6.004, 2);
+ * // => 6.01
+ *
+ * _.ceil(6040, -2);
+ * // => 6100
+ */
+ var ceil = createRound('ceil');
+
+ /**
+ * Divide two numbers.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.7.0
+ * @category Math
+ * @param {number} dividend The first number in a division.
+ * @param {number} divisor The second number in a division.
+ * @returns {number} Returns the quotient.
+ * @example
+ *
+ * _.divide(6, 4);
+ * // => 1.5
+ */
+ var divide = createMathOperation(function(dividend, divisor) {
+ return dividend / divisor;
+ });
+
+ /**
+ * Computes `number` rounded down to `precision`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.10.0
+ * @category Math
+ * @param {number} number The number to round down.
+ * @param {number} [precision=0] The precision to round down to.
+ * @returns {number} Returns the rounded down number.
+ * @example
+ *
+ * _.floor(4.006);
+ * // => 4
+ *
+ * _.floor(0.046, 2);
+ * // => 0.04
+ *
+ * _.floor(4060, -2);
+ * // => 4000
+ */
+ var floor = createRound('floor');
+
+ /**
+ * Computes the maximum value of `array`. If `array` is empty or falsey,
+ * `undefined` is returned.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Math
+ * @param {Array} array The array to iterate over.
+ * @returns {*} Returns the maximum value.
+ * @example
+ *
+ * _.max([4, 2, 8, 6]);
+ * // => 8
+ *
+ * _.max([]);
+ * // => undefined
+ */
+ function max(array) {
+ return (array && array.length)
+ ? baseExtremum(array, identity, baseGt)
+ : undefined;
+ }
+
+ /**
+ * This method is like `_.max` except that it accepts `iteratee` which is
+ * invoked for each element in `array` to generate the criterion by which
+ * the value is ranked. The iteratee is invoked with one argument: (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Math
+ * @param {Array} array The array to iterate over.
+ * @param {Array|Function|Object|string} [iteratee=_.identity]
+ * The iteratee invoked per element.
+ * @returns {*} Returns the maximum value.
+ * @example
+ *
+ * var objects = [{ 'n': 1 }, { 'n': 2 }];
+ *
+ * _.maxBy(objects, function(o) { return o.n; });
+ * // => { 'n': 2 }
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.maxBy(objects, 'n');
+ * // => { 'n': 2 }
+ */
+ function maxBy(array, iteratee) {
+ return (array && array.length)
+ ? baseExtremum(array, getIteratee(iteratee), baseGt)
+ : undefined;
+ }
+
+ /**
+ * Computes the mean of the values in `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Math
+ * @param {Array} array The array to iterate over.
+ * @returns {number} Returns the mean.
+ * @example
+ *
+ * _.mean([4, 2, 8, 6]);
+ * // => 5
+ */
+ function mean(array) {
+ return baseMean(array, identity);
+ }
+
+ /**
+ * This method is like `_.mean` except that it accepts `iteratee` which is
+ * invoked for each element in `array` to generate the value to be averaged.
+ * The iteratee is invoked with one argument: (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.7.0
+ * @category Math
+ * @param {Array} array The array to iterate over.
+ * @param {Array|Function|Object|string} [iteratee=_.identity]
+ * The iteratee invoked per element.
+ * @returns {number} Returns the mean.
+ * @example
+ *
+ * var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }];
+ *
+ * _.meanBy(objects, function(o) { return o.n; });
+ * // => 5
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.meanBy(objects, 'n');
+ * // => 5
+ */
+ function meanBy(array, iteratee) {
+ return baseMean(array, getIteratee(iteratee));
+ }
+
+ /**
+ * Computes the minimum value of `array`. If `array` is empty or falsey,
+ * `undefined` is returned.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Math
+ * @param {Array} array The array to iterate over.
+ * @returns {*} Returns the minimum value.
+ * @example
+ *
+ * _.min([4, 2, 8, 6]);
+ * // => 2
+ *
+ * _.min([]);
+ * // => undefined
+ */
+ function min(array) {
+ return (array && array.length)
+ ? baseExtremum(array, identity, baseLt)
+ : undefined;
+ }
+
+ /**
+ * This method is like `_.min` except that it accepts `iteratee` which is
+ * invoked for each element in `array` to generate the criterion by which
+ * the value is ranked. The iteratee is invoked with one argument: (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Math
+ * @param {Array} array The array to iterate over.
+ * @param {Array|Function|Object|string} [iteratee=_.identity]
+ * The iteratee invoked per element.
+ * @returns {*} Returns the minimum value.
+ * @example
+ *
+ * var objects = [{ 'n': 1 }, { 'n': 2 }];
+ *
+ * _.minBy(objects, function(o) { return o.n; });
+ * // => { 'n': 1 }
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.minBy(objects, 'n');
+ * // => { 'n': 1 }
+ */
+ function minBy(array, iteratee) {
+ return (array && array.length)
+ ? baseExtremum(array, getIteratee(iteratee), baseLt)
+ : undefined;
+ }
+
+ /**
+ * Multiply two numbers.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.7.0
+ * @category Math
+ * @param {number} multiplier The first number in a multiplication.
+ * @param {number} multiplicand The second number in a multiplication.
+ * @returns {number} Returns the product.
+ * @example
+ *
+ * _.multiply(6, 4);
+ * // => 24
+ */
+ var multiply = createMathOperation(function(multiplier, multiplicand) {
+ return multiplier * multiplicand;
+ });
+
+ /**
+ * Computes `number` rounded to `precision`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.10.0
+ * @category Math
+ * @param {number} number The number to round.
+ * @param {number} [precision=0] The precision to round to.
+ * @returns {number} Returns the rounded number.
+ * @example
+ *
+ * _.round(4.006);
+ * // => 4
+ *
+ * _.round(4.006, 2);
+ * // => 4.01
+ *
+ * _.round(4060, -2);
+ * // => 4100
+ */
+ var round = createRound('round');
+
+ /**
+ * Subtract two numbers.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Math
+ * @param {number} minuend The first number in a subtraction.
+ * @param {number} subtrahend The second number in a subtraction.
+ * @returns {number} Returns the difference.
+ * @example
+ *
+ * _.subtract(6, 4);
+ * // => 2
+ */
+ var subtract = createMathOperation(function(minuend, subtrahend) {
+ return minuend - subtrahend;
+ });
+
+ /**
+ * Computes the sum of the values in `array`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.4.0
+ * @category Math
+ * @param {Array} array The array to iterate over.
+ * @returns {number} Returns the sum.
+ * @example
+ *
+ * _.sum([4, 2, 8, 6]);
+ * // => 20
+ */
+ function sum(array) {
+ return (array && array.length)
+ ? baseSum(array, identity)
+ : 0;
+ }
+
+ /**
+ * This method is like `_.sum` except that it accepts `iteratee` which is
+ * invoked for each element in `array` to generate the value to be summed.
+ * The iteratee is invoked with one argument: (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Math
+ * @param {Array} array The array to iterate over.
+ * @param {Array|Function|Object|string} [iteratee=_.identity]
+ * The iteratee invoked per element.
+ * @returns {number} Returns the sum.
+ * @example
+ *
+ * var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }];
+ *
+ * _.sumBy(objects, function(o) { return o.n; });
+ * // => 20
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.sumBy(objects, 'n');
+ * // => 20
+ */
+ function sumBy(array, iteratee) {
+ return (array && array.length)
+ ? baseSum(array, getIteratee(iteratee))
+ : 0;
+ }
+
+ /*------------------------------------------------------------------------*/
+
+ // Add methods that return wrapped values in chain sequences.
+ lodash.after = after;
+ lodash.ary = ary;
+ lodash.assign = assign;
+ lodash.assignIn = assignIn;
+ lodash.assignInWith = assignInWith;
+ lodash.assignWith = assignWith;
+ lodash.at = at;
+ lodash.before = before;
+ lodash.bind = bind;
+ lodash.bindAll = bindAll;
+ lodash.bindKey = bindKey;
+ lodash.castArray = castArray;
+ lodash.chain = chain;
+ lodash.chunk = chunk;
+ lodash.compact = compact;
+ lodash.concat = concat;
+ lodash.cond = cond;
+ lodash.conforms = conforms;
+ lodash.constant = constant;
+ lodash.countBy = countBy;
+ lodash.create = create;
+ lodash.curry = curry;
+ lodash.curryRight = curryRight;
+ lodash.debounce = debounce;
+ lodash.defaults = defaults;
+ lodash.defaultsDeep = defaultsDeep;
+ lodash.defer = defer;
+ lodash.delay = delay;
+ lodash.difference = difference;
+ lodash.differenceBy = differenceBy;
+ lodash.differenceWith = differenceWith;
+ lodash.drop = drop;
+ lodash.dropRight = dropRight;
+ lodash.dropRightWhile = dropRightWhile;
+ lodash.dropWhile = dropWhile;
+ lodash.fill = fill;
+ lodash.filter = filter;
+ lodash.flatMap = flatMap;
+ lodash.flatMapDeep = flatMapDeep;
+ lodash.flatMapDepth = flatMapDepth;
+ lodash.flatten = flatten;
+ lodash.flattenDeep = flattenDeep;
+ lodash.flattenDepth = flattenDepth;
+ lodash.flip = flip;
+ lodash.flow = flow;
+ lodash.flowRight = flowRight;
+ lodash.fromPairs = fromPairs;
+ lodash.functions = functions;
+ lodash.functionsIn = functionsIn;
+ lodash.groupBy = groupBy;
+ lodash.initial = initial;
+ lodash.intersection = intersection;
+ lodash.intersectionBy = intersectionBy;
+ lodash.intersectionWith = intersectionWith;
+ lodash.invert = invert;
+ lodash.invertBy = invertBy;
+ lodash.invokeMap = invokeMap;
+ lodash.iteratee = iteratee;
+ lodash.keyBy = keyBy;
+ lodash.keys = keys;
+ lodash.keysIn = keysIn;
+ lodash.map = map;
+ lodash.mapKeys = mapKeys;
+ lodash.mapValues = mapValues;
+ lodash.matches = matches;
+ lodash.matchesProperty = matchesProperty;
+ lodash.memoize = memoize;
+ lodash.merge = merge;
+ lodash.mergeWith = mergeWith;
+ lodash.method = method;
+ lodash.methodOf = methodOf;
+ lodash.mixin = mixin;
+ lodash.negate = negate;
+ lodash.nthArg = nthArg;
+ lodash.omit = omit;
+ lodash.omitBy = omitBy;
+ lodash.once = once;
+ lodash.orderBy = orderBy;
+ lodash.over = over;
+ lodash.overArgs = overArgs;
+ lodash.overEvery = overEvery;
+ lodash.overSome = overSome;
+ lodash.partial = partial;
+ lodash.partialRight = partialRight;
+ lodash.partition = partition;
+ lodash.pick = pick;
+ lodash.pickBy = pickBy;
+ lodash.property = property;
+ lodash.propertyOf = propertyOf;
+ lodash.pull = pull;
+ lodash.pullAll = pullAll;
+ lodash.pullAllBy = pullAllBy;
+ lodash.pullAllWith = pullAllWith;
+ lodash.pullAt = pullAt;
+ lodash.range = range;
+ lodash.rangeRight = rangeRight;
+ lodash.rearg = rearg;
+ lodash.reject = reject;
+ lodash.remove = remove;
+ lodash.rest = rest;
+ lodash.reverse = reverse;
+ lodash.sampleSize = sampleSize;
+ lodash.set = set;
+ lodash.setWith = setWith;
+ lodash.shuffle = shuffle;
+ lodash.slice = slice;
+ lodash.sortBy = sortBy;
+ lodash.sortedUniq = sortedUniq;
+ lodash.sortedUniqBy = sortedUniqBy;
+ lodash.split = split;
+ lodash.spread = spread;
+ lodash.tail = tail;
+ lodash.take = take;
+ lodash.takeRight = takeRight;
+ lodash.takeRightWhile = takeRightWhile;
+ lodash.takeWhile = takeWhile;
+ lodash.tap = tap;
+ lodash.throttle = throttle;
+ lodash.thru = thru;
+ lodash.toArray = toArray;
+ lodash.toPairs = toPairs;
+ lodash.toPairsIn = toPairsIn;
+ lodash.toPath = toPath;
+ lodash.toPlainObject = toPlainObject;
+ lodash.transform = transform;
+ lodash.unary = unary;
+ lodash.union = union;
+ lodash.unionBy = unionBy;
+ lodash.unionWith = unionWith;
+ lodash.uniq = uniq;
+ lodash.uniqBy = uniqBy;
+ lodash.uniqWith = uniqWith;
+ lodash.unset = unset;
+ lodash.unzip = unzip;
+ lodash.unzipWith = unzipWith;
+ lodash.update = update;
+ lodash.updateWith = updateWith;
+ lodash.values = values;
+ lodash.valuesIn = valuesIn;
+ lodash.without = without;
+ lodash.words = words;
+ lodash.wrap = wrap;
+ lodash.xor = xor;
+ lodash.xorBy = xorBy;
+ lodash.xorWith = xorWith;
+ lodash.zip = zip;
+ lodash.zipObject = zipObject;
+ lodash.zipObjectDeep = zipObjectDeep;
+ lodash.zipWith = zipWith;
+
+ // Add aliases.
+ lodash.entries = toPairs;
+ lodash.entriesIn = toPairsIn;
+ lodash.extend = assignIn;
+ lodash.extendWith = assignInWith;
+
+ // Add methods to `lodash.prototype`.
+ mixin(lodash, lodash);
+
+ /*------------------------------------------------------------------------*/
+
+ // Add methods that return unwrapped values in chain sequences.
+ lodash.add = add;
+ lodash.attempt = attempt;
+ lodash.camelCase = camelCase;
+ lodash.capitalize = capitalize;
+ lodash.ceil = ceil;
+ lodash.clamp = clamp;
+ lodash.clone = clone;
+ lodash.cloneDeep = cloneDeep;
+ lodash.cloneDeepWith = cloneDeepWith;
+ lodash.cloneWith = cloneWith;
+ lodash.deburr = deburr;
+ lodash.divide = divide;
+ lodash.endsWith = endsWith;
+ lodash.eq = eq;
+ lodash.escape = escape;
+ lodash.escapeRegExp = escapeRegExp;
+ lodash.every = every;
+ lodash.find = find;
+ lodash.findIndex = findIndex;
+ lodash.findKey = findKey;
+ lodash.findLast = findLast;
+ lodash.findLastIndex = findLastIndex;
+ lodash.findLastKey = findLastKey;
+ lodash.floor = floor;
+ lodash.forEach = forEach;
+ lodash.forEachRight = forEachRight;
+ lodash.forIn = forIn;
+ lodash.forInRight = forInRight;
+ lodash.forOwn = forOwn;
+ lodash.forOwnRight = forOwnRight;
+ lodash.get = get;
+ lodash.gt = gt;
+ lodash.gte = gte;
+ lodash.has = has;
+ lodash.hasIn = hasIn;
+ lodash.head = head;
+ lodash.identity = identity;
+ lodash.includes = includes;
+ lodash.indexOf = indexOf;
+ lodash.inRange = inRange;
+ lodash.invoke = invoke;
+ lodash.isArguments = isArguments;
+ lodash.isArray = isArray;
+ lodash.isArrayBuffer = isArrayBuffer;
+ lodash.isArrayLike = isArrayLike;
+ lodash.isArrayLikeObject = isArrayLikeObject;
+ lodash.isBoolean = isBoolean;
+ lodash.isBuffer = isBuffer;
+ lodash.isDate = isDate;
+ lodash.isElement = isElement;
+ lodash.isEmpty = isEmpty;
+ lodash.isEqual = isEqual;
+ lodash.isEqualWith = isEqualWith;
+ lodash.isError = isError;
+ lodash.isFinite = isFinite;
+ lodash.isFunction = isFunction;
+ lodash.isInteger = isInteger;
+ lodash.isLength = isLength;
+ lodash.isMap = isMap;
+ lodash.isMatch = isMatch;
+ lodash.isMatchWith = isMatchWith;
+ lodash.isNaN = isNaN;
+ lodash.isNative = isNative;
+ lodash.isNil = isNil;
+ lodash.isNull = isNull;
+ lodash.isNumber = isNumber;
+ lodash.isObject = isObject;
+ lodash.isObjectLike = isObjectLike;
+ lodash.isPlainObject = isPlainObject;
+ lodash.isRegExp = isRegExp;
+ lodash.isSafeInteger = isSafeInteger;
+ lodash.isSet = isSet;
+ lodash.isString = isString;
+ lodash.isSymbol = isSymbol;
+ lodash.isTypedArray = isTypedArray;
+ lodash.isUndefined = isUndefined;
+ lodash.isWeakMap = isWeakMap;
+ lodash.isWeakSet = isWeakSet;
+ lodash.join = join;
+ lodash.kebabCase = kebabCase;
+ lodash.last = last;
+ lodash.lastIndexOf = lastIndexOf;
+ lodash.lowerCase = lowerCase;
+ lodash.lowerFirst = lowerFirst;
+ lodash.lt = lt;
+ lodash.lte = lte;
+ lodash.max = max;
+ lodash.maxBy = maxBy;
+ lodash.mean = mean;
+ lodash.meanBy = meanBy;
+ lodash.min = min;
+ lodash.minBy = minBy;
+ lodash.multiply = multiply;
+ lodash.nth = nth;
+ lodash.noConflict = noConflict;
+ lodash.noop = noop;
+ lodash.now = now;
+ lodash.pad = pad;
+ lodash.padEnd = padEnd;
+ lodash.padStart = padStart;
+ lodash.parseInt = parseInt;
+ lodash.random = random;
+ lodash.reduce = reduce;
+ lodash.reduceRight = reduceRight;
+ lodash.repeat = repeat;
+ lodash.replace = replace;
+ lodash.result = result;
+ lodash.round = round;
+ lodash.runInContext = runInContext;
+ lodash.sample = sample;
+ lodash.size = size;
+ lodash.snakeCase = snakeCase;
+ lodash.some = some;
+ lodash.sortedIndex = sortedIndex;
+ lodash.sortedIndexBy = sortedIndexBy;
+ lodash.sortedIndexOf = sortedIndexOf;
+ lodash.sortedLastIndex = sortedLastIndex;
+ lodash.sortedLastIndexBy = sortedLastIndexBy;
+ lodash.sortedLastIndexOf = sortedLastIndexOf;
+ lodash.startCase = startCase;
+ lodash.startsWith = startsWith;
+ lodash.subtract = subtract;
+ lodash.sum = sum;
+ lodash.sumBy = sumBy;
+ lodash.template = template;
+ lodash.times = times;
+ lodash.toInteger = toInteger;
+ lodash.toLength = toLength;
+ lodash.toLower = toLower;
+ lodash.toNumber = toNumber;
+ lodash.toSafeInteger = toSafeInteger;
+ lodash.toString = toString;
+ lodash.toUpper = toUpper;
+ lodash.trim = trim;
+ lodash.trimEnd = trimEnd;
+ lodash.trimStart = trimStart;
+ lodash.truncate = truncate;
+ lodash.unescape = unescape;
+ lodash.uniqueId = uniqueId;
+ lodash.upperCase = upperCase;
+ lodash.upperFirst = upperFirst;
+
+ // Add aliases.
+ lodash.each = forEach;
+ lodash.eachRight = forEachRight;
+ lodash.first = head;
+
+ mixin(lodash, (function() {
+ var source = {};
+ baseForOwn(lodash, function(func, methodName) {
+ if (!hasOwnProperty.call(lodash.prototype, methodName)) {
+ source[methodName] = func;
+ }
+ });
+ return source;
+ }()), { 'chain': false });
+
+ /*------------------------------------------------------------------------*/
+
+ /**
+ * The semantic version number.
+ *
+ * @static
+ * @memberOf _
+ * @type {string}
+ */
+ lodash.VERSION = VERSION;
+
+ // Assign default placeholders.
+ arrayEach(['bind', 'bindKey', 'curry', 'curryRight', 'partial', 'partialRight'], function(methodName) {
+ lodash[methodName].placeholder = lodash;
+ });
+
+ // Add `LazyWrapper` methods for `_.drop` and `_.take` variants.
+ arrayEach(['drop', 'take'], function(methodName, index) {
+ LazyWrapper.prototype[methodName] = function(n) {
+ var filtered = this.__filtered__;
+ if (filtered && !index) {
+ return new LazyWrapper(this);
+ }
+ n = n === undefined ? 1 : nativeMax(toInteger(n), 0);
+
+ var result = this.clone();
+ if (filtered) {
+ result.__takeCount__ = nativeMin(n, result.__takeCount__);
+ } else {
+ result.__views__.push({
+ 'size': nativeMin(n, MAX_ARRAY_LENGTH),
+ 'type': methodName + (result.__dir__ < 0 ? 'Right' : '')
+ });
+ }
+ return result;
+ };
+
+ LazyWrapper.prototype[methodName + 'Right'] = function(n) {
+ return this.reverse()[methodName](n).reverse();
+ };
+ });
+
+ // Add `LazyWrapper` methods that accept an `iteratee` value.
+ arrayEach(['filter', 'map', 'takeWhile'], function(methodName, index) {
+ var type = index + 1,
+ isFilter = type == LAZY_FILTER_FLAG || type == LAZY_WHILE_FLAG;
+
+ LazyWrapper.prototype[methodName] = function(iteratee) {
+ var result = this.clone();
+ result.__iteratees__.push({
+ 'iteratee': getIteratee(iteratee, 3),
+ 'type': type
+ });
+ result.__filtered__ = result.__filtered__ || isFilter;
+ return result;
+ };
+ });
+
+ // Add `LazyWrapper` methods for `_.head` and `_.last`.
+ arrayEach(['head', 'last'], function(methodName, index) {
+ var takeName = 'take' + (index ? 'Right' : '');
+
+ LazyWrapper.prototype[methodName] = function() {
+ return this[takeName](1).value()[0];
+ };
+ });
+
+ // Add `LazyWrapper` methods for `_.initial` and `_.tail`.
+ arrayEach(['initial', 'tail'], function(methodName, index) {
+ var dropName = 'drop' + (index ? '' : 'Right');
+
+ LazyWrapper.prototype[methodName] = function() {
+ return this.__filtered__ ? new LazyWrapper(this) : this[dropName](1);
+ };
+ });
+
+ LazyWrapper.prototype.compact = function() {
+ return this.filter(identity);
+ };
+
+ LazyWrapper.prototype.find = function(predicate) {
+ return this.filter(predicate).head();
+ };
+
+ LazyWrapper.prototype.findLast = function(predicate) {
+ return this.reverse().find(predicate);
+ };
+
+ LazyWrapper.prototype.invokeMap = rest(function(path, args) {
+ if (typeof path == 'function') {
+ return new LazyWrapper(this);
+ }
+ return this.map(function(value) {
+ return baseInvoke(value, path, args);
+ });
+ });
+
+ LazyWrapper.prototype.reject = function(predicate) {
+ predicate = getIteratee(predicate, 3);
+ return this.filter(function(value) {
+ return !predicate(value);
+ });
+ };
+
+ LazyWrapper.prototype.slice = function(start, end) {
+ start = toInteger(start);
+
+ var result = this;
+ if (result.__filtered__ && (start > 0 || end < 0)) {
+ return new LazyWrapper(result);
+ }
+ if (start < 0) {
+ result = result.takeRight(-start);
+ } else if (start) {
+ result = result.drop(start);
+ }
+ if (end !== undefined) {
+ end = toInteger(end);
+ result = end < 0 ? result.dropRight(-end) : result.take(end - start);
+ }
+ return result;
+ };
+
+ LazyWrapper.prototype.takeRightWhile = function(predicate) {
+ return this.reverse().takeWhile(predicate).reverse();
+ };
+
+ LazyWrapper.prototype.toArray = function() {
+ return this.take(MAX_ARRAY_LENGTH);
+ };
+
+ // Add `LazyWrapper` methods to `lodash.prototype`.
+ baseForOwn(LazyWrapper.prototype, function(func, methodName) {
+ var checkIteratee = /^(?:filter|find|map|reject)|While$/.test(methodName),
+ isTaker = /^(?:head|last)$/.test(methodName),
+ lodashFunc = lodash[isTaker ? ('take' + (methodName == 'last' ? 'Right' : '')) : methodName],
+ retUnwrapped = isTaker || /^find/.test(methodName);
+
+ if (!lodashFunc) {
+ return;
+ }
+ lodash.prototype[methodName] = function() {
+ var value = this.__wrapped__,
+ args = isTaker ? [1] : arguments,
+ isLazy = value instanceof LazyWrapper,
+ iteratee = args[0],
+ useLazy = isLazy || isArray(value);
+
+ var interceptor = function(value) {
+ var result = lodashFunc.apply(lodash, arrayPush([value], args));
+ return (isTaker && chainAll) ? result[0] : result;
+ };
+
+ if (useLazy && checkIteratee && typeof iteratee == 'function' && iteratee.length != 1) {
+ // Avoid lazy use if the iteratee has a "length" value other than `1`.
+ isLazy = useLazy = false;
+ }
+ var chainAll = this.__chain__,
+ isHybrid = !!this.__actions__.length,
+ isUnwrapped = retUnwrapped && !chainAll,
+ onlyLazy = isLazy && !isHybrid;
+
+ if (!retUnwrapped && useLazy) {
+ value = onlyLazy ? value : new LazyWrapper(this);
+ var result = func.apply(value, args);
+ result.__actions__.push({ 'func': thru, 'args': [interceptor], 'thisArg': undefined });
+ return new LodashWrapper(result, chainAll);
+ }
+ if (isUnwrapped && onlyLazy) {
+ return func.apply(this, args);
+ }
+ result = this.thru(interceptor);
+ return isUnwrapped ? (isTaker ? result.value()[0] : result.value()) : result;
+ };
+ });
+
+ // Add `Array` methods to `lodash.prototype`.
+ arrayEach(['pop', 'push', 'shift', 'sort', 'splice', 'unshift'], function(methodName) {
+ var func = arrayProto[methodName],
+ chainName = /^(?:push|sort|unshift)$/.test(methodName) ? 'tap' : 'thru',
+ retUnwrapped = /^(?:pop|shift)$/.test(methodName);
+
+ lodash.prototype[methodName] = function() {
+ var args = arguments;
+ if (retUnwrapped && !this.__chain__) {
+ var value = this.value();
+ return func.apply(isArray(value) ? value : [], args);
+ }
+ return this[chainName](function(value) {
+ return func.apply(isArray(value) ? value : [], args);
+ });
+ };
+ });
+
+ // Map minified method names to their real names.
+ baseForOwn(LazyWrapper.prototype, function(func, methodName) {
+ var lodashFunc = lodash[methodName];
+ if (lodashFunc) {
+ var key = (lodashFunc.name + ''),
+ names = realNames[key] || (realNames[key] = []);
+
+ names.push({ 'name': methodName, 'func': lodashFunc });
+ }
+ });
+
+ realNames[createHybridWrapper(undefined, BIND_KEY_FLAG).name] = [{
+ 'name': 'wrapper',
+ 'func': undefined
+ }];
+
+ // Add methods to `LazyWrapper`.
+ LazyWrapper.prototype.clone = lazyClone;
+ LazyWrapper.prototype.reverse = lazyReverse;
+ LazyWrapper.prototype.value = lazyValue;
+
+ // Add chain sequence methods to the `lodash` wrapper.
+ lodash.prototype.at = wrapperAt;
+ lodash.prototype.chain = wrapperChain;
+ lodash.prototype.commit = wrapperCommit;
+ lodash.prototype.next = wrapperNext;
+ lodash.prototype.plant = wrapperPlant;
+ lodash.prototype.reverse = wrapperReverse;
+ lodash.prototype.toJSON = lodash.prototype.valueOf = lodash.prototype.value = wrapperValue;
+
+ if (iteratorSymbol) {
+ lodash.prototype[iteratorSymbol] = wrapperToIterator;
+ }
+ return lodash;
+ }
+
+ /*--------------------------------------------------------------------------*/
+
+ // Export lodash.
+ var _ = runInContext();
+
+ // Expose Lodash on the free variable `window` or `self` when available so it's
+ // globally accessible, even when bundled with Browserify, Webpack, etc. This
+ // also prevents errors in cases where Lodash is loaded by a script tag in the
+ // presence of an AMD loader. See http://requirejs.org/docs/errors.html#mismatch
+ // for more details. Use `_.noConflict` to remove Lodash from the global object.
+ (freeWindow || freeSelf || {})._ = _;
+
+ // Some AMD build optimizers like r.js check for condition patterns like the following:
+ if (typeof define == 'function' && typeof define.amd == 'object' && define.amd) {
+ // Define as an anonymous module so, through path mapping, it can be
+ // referenced as the "underscore" module.
+ define(function() {
+ return _;
+ });
+ }
+ // Check for `exports` after `define` in case a build optimizer adds an `exports` object.
+ else if (freeExports && freeModule) {
+ // Export for Node.js.
+ if (moduleExports) {
+ (freeModule.exports = _)._ = _;
+ }
+ // Export for CommonJS support.
+ freeExports._ = _;
+ }
+ else {
+ // Export to the global object.
+ root._ = _;
+ }
+}.call(this));
diff --git a/views/ngXosViews/serviceGrid/src/vendor/lodash/package.json b/views/ngXosViews/serviceGrid/src/vendor/lodash/package.json
new file mode 100644
index 0000000..914499d
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/lodash/package.json
@@ -0,0 +1,52 @@
+{
+ "name": "lodash",
+ "version": "4.11.2",
+ "license": "MIT",
+ "private": true,
+ "main": "lodash.js",
+ "scripts": {
+ "build": "npm run build:main && npm run build:fp",
+ "build:fp": "node lib/fp/build-dist.js",
+ "build:fp-modules": "node lib/fp/build-modules.js",
+ "build:main": "node lib/main/build-dist.js",
+ "build:main-modules": "node lib/main/build-modules.js",
+ "doc": "node lib/main/build-doc github",
+ "doc:fp": "node lib/fp/build-doc",
+ "doc:site": "node lib/main/build-doc site",
+ "pretest": "npm run build",
+ "style": "npm run style:main && npm run style:fp && npm run style:perf && npm run style:test",
+ "style:fp": "jscs fp/*.js lib/**/*.js",
+ "style:main": "jscs lodash.js",
+ "style:perf": "jscs perf/*.js perf/**/*.js",
+ "style:test": "jscs test/*.js test/**/*.js",
+ "test": "npm run test:main && npm run test:fp",
+ "test:fp": "node test/test-fp",
+ "test:main": "node test/test",
+ "validate": "npm run style && npm run test"
+ },
+ "devDependencies": {
+ "async": "^1.5.2",
+ "benchmark": "^2.1.0",
+ "chalk": "^1.1.3",
+ "codecov.io": "~0.1.6",
+ "coveralls": "^2.11.9",
+ "curl-amd": "~0.8.12",
+ "docdown": "~0.5.1",
+ "dojo": "^1.11.1",
+ "ecstatic": "^1.4.0",
+ "fs-extra": "~0.28.0",
+ "glob": "^7.0.3",
+ "istanbul": "0.4.3",
+ "jquery": "^2.2.3",
+ "jscs": "^3.0.1",
+ "lodash": "4.10.0",
+ "platform": "^1.3.1",
+ "qunit-extras": "^1.5.0",
+ "qunitjs": "~1.23.1",
+ "request": "^2.69.0",
+ "requirejs": "^2.2.0",
+ "sauce-tunnel": "^2.4.0",
+ "uglify-js": "2.6.2",
+ "webpack": "^1.12.15"
+ }
+}
diff --git a/views/ngXosViews/serviceGrid/src/vendor/lodash/perf/asset/perf-ui.js b/views/ngXosViews/serviceGrid/src/vendor/lodash/perf/asset/perf-ui.js
new file mode 100644
index 0000000..e3ed64b
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/lodash/perf/asset/perf-ui.js
@@ -0,0 +1,131 @@
+;(function(window) {
+ 'use strict';
+
+ /** The base path of the lodash builds. */
+ var basePath = '../';
+
+ /** The lodash build to load. */
+ var build = (build = /build=([^&]+)/.exec(location.search)) && decodeURIComponent(build[1]);
+
+ /** The other library to load. */
+ var other = (other = /other=([^&]+)/.exec(location.search)) && decodeURIComponent(other[1]);
+
+ /** The `ui` object. */
+ var ui = {};
+
+ /*--------------------------------------------------------------------------*/
+
+ /**
+ * Registers an event listener on an element.
+ *
+ * @private
+ * @param {Element} element The element.
+ * @param {string} eventName The name of the event.
+ * @param {Function} handler The event handler.
+ * @returns {Element} The element.
+ */
+ function addListener(element, eventName, handler) {
+ if (typeof element.addEventListener != 'undefined') {
+ element.addEventListener(eventName, handler, false);
+ } else if (typeof element.attachEvent != 'undefined') {
+ element.attachEvent('on' + eventName, handler);
+ }
+ }
+
+ /*--------------------------------------------------------------------------*/
+
+ // Initialize controls.
+ addListener(window, 'load', function() {
+ function eventHandler(event) {
+ var buildIndex = buildList.selectedIndex,
+ otherIndex = otherList.selectedIndex,
+ search = location.search.replace(/^\?|&?(?:build|other)=[^&]*&?/g, '');
+
+ if (event.stopPropagation) {
+ event.stopPropagation();
+ } else {
+ event.cancelBubble = true;
+ }
+ location.href =
+ location.href.split('?')[0] + '?' +
+ (search ? search + '&' : '') +
+ 'build=' + (buildIndex < 0 ? build : buildList[buildIndex].value) + '&' +
+ 'other=' + (otherIndex < 0 ? other : otherList[otherIndex].value);
+ }
+
+ var span1 = document.createElement('span');
+ span1.style.cssText = 'float:right';
+ span1.innerHTML =
+ '<label for="perf-build">Build: </label>' +
+ '<select id="perf-build">' +
+ '<option value="lodash">lodash</option>' +
+ '</select>';
+
+ var span2 = document.createElement('span');
+ span2.style.cssText = 'float:right';
+ span2.innerHTML =
+ '<label for="perf-other">Other Library: </label>' +
+ '<select id="perf-other">' +
+ '<option value="underscore-dev">Underscore (development)</option>' +
+ '<option value="underscore">Underscore (production)</option>' +
+ '<option value="lodash">lodash</option>' +
+ '</select>';
+
+ var buildList = span1.lastChild,
+ otherList = span2.lastChild,
+ toolbar = document.getElementById('perf-toolbar');
+
+ toolbar.appendChild(span2);
+ toolbar.appendChild(span1);
+
+ buildList.selectedIndex = (function() {
+ switch (build) {
+ case 'lodash':
+ case null: return 0;
+ }
+ return -1;
+ }());
+
+ otherList.selectedIndex = (function() {
+ switch (other) {
+ case 'underscore-dev': return 0;
+ case 'lodash': return 2;
+ case 'underscore':
+ case null: return 1;
+ }
+ return -1;
+ }());
+
+ addListener(buildList, 'change', eventHandler);
+ addListener(otherList, 'change', eventHandler);
+ });
+
+ // The lodash build file path.
+ ui.buildPath = (function() {
+ var result;
+ switch (build) {
+ case null: build = 'lodash';
+ case 'lodash': result = 'dist/lodash.min.js'; break;
+ default: return build;
+ }
+ return basePath + result;
+ }());
+
+ // The other library file path.
+ ui.otherPath = (function() {
+ var result;
+ switch (other) {
+ case 'lodash': result = 'dist/lodash.min.js'; break;
+ case 'underscore-dev': result = 'vendor/underscore/underscore.js'; break;
+ case null: other = 'underscore';
+ case 'underscore': result = 'vendor/underscore/underscore-min.js'; break;
+ default: return other;
+ }
+ return basePath + result;
+ }());
+
+ ui.urlParams = { 'build': build, 'other': other };
+
+ window.ui = ui;
+
+}(this));
diff --git a/views/ngXosViews/serviceGrid/src/vendor/lodash/perf/index.html b/views/ngXosViews/serviceGrid/src/vendor/lodash/perf/index.html
new file mode 100644
index 0000000..16d41bf
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/lodash/perf/index.html
@@ -0,0 +1,69 @@
+<!doctype html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+ <title>lodash Performance Suite</title>
+ <style>
+ html, body {
+ margin: 0;
+ padding: 0;
+ height: 100%;
+ }
+ #FirebugUI {
+ top: 2em;
+ }
+ #perf-toolbar {
+ background-color: #EEE;
+ color: #5E740B;
+ font-family: "Helvetica Neue Light", "HelveticaNeue-Light", "Helvetica Neue", Calibri, Helvetica, Arial, sans-serif;
+ font-size: small;
+ padding: 0.5em 0 0.5em 2em;
+ overflow: hidden;
+ }
+ </style>
+ </head>
+ <body>
+ <div id="perf-toolbar"></div>
+ <script src="../lodash.js"></script>
+ <script src="../node_modules/platform/platform.js"></script>
+ <script src="../node_modules/benchmark/benchmark.js"></script>
+ <script src="../vendor/firebug-lite/src/firebug-lite-debug.js"></script>
+ <script src="./asset/perf-ui.js"></script>
+ <script>
+ document.write('<script src="' + ui.buildPath + '"><\/script>');
+ </script>
+ <script>
+ var lodash = _.noConflict();
+ </script>
+ <script>
+ document.write('<script src="' + ui.otherPath + '"><\/script>');
+ </script>
+ <script src="perf.js"></script>
+ <script>
+ (function() {
+ var measured,
+ perfNow,
+ begin = new Date;
+
+ function init() {
+ var fbUI = document.getElementById('FirebugUI'),
+ fbDoc = fbUI && (fbDoc = fbUI.contentWindow || fbUI.contentDocument).document || fbDoc,
+ fbCommandLine = fbDoc && fbDoc.getElementById('fbCommandLine');
+
+ if (!fbCommandLine) {
+ return setTimeout(init, 15);
+ }
+ fbUI.style.height = (
+ Math.max(document.documentElement.clientHeight, document.body.clientHeight) -
+ document.getElementById('perf-toolbar').clientHeight
+ ) + 'px';
+
+ fbDoc.body.style.height = fbDoc.documentElement.style.height = '100%';
+ setTimeout(run, 15);
+ }
+
+ window.onload = init;
+ }());
+ </script>
+ </body>
+</html>
diff --git a/views/ngXosViews/serviceGrid/src/vendor/lodash/perf/perf.js b/views/ngXosViews/serviceGrid/src/vendor/lodash/perf/perf.js
new file mode 100644
index 0000000..baee142
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/lodash/perf/perf.js
@@ -0,0 +1,1977 @@
+;(function() {
+
+ /** Used to access the Firebug Lite panel (set by `run`). */
+ var fbPanel;
+
+ /** Used as a safe reference for `undefined` in pre ES5 environments. */
+ var undefined;
+
+ /** Used as a reference to the global object. */
+ var root = typeof global == 'object' && global || this;
+
+ /** Method and object shortcuts. */
+ var phantom = root.phantom,
+ amd = root.define && define.amd,
+ argv = root.process && process.argv,
+ document = !phantom && root.document,
+ noop = function() {},
+ params = root.arguments,
+ system = root.system;
+
+ /** Add `console.log()` support for Rhino and RingoJS. */
+ var console = root.console || (root.console = { 'log': root.print });
+
+ /** The file path of the lodash file to test. */
+ var filePath = (function() {
+ var min = 0,
+ result = [];
+
+ if (phantom) {
+ result = params = phantom.args;
+ } else if (system) {
+ min = 1;
+ result = params = system.args;
+ } else if (argv) {
+ min = 2;
+ result = params = argv;
+ } else if (params) {
+ result = params;
+ }
+ var last = result[result.length - 1];
+ result = (result.length > min && !/perf(?:\.js)?$/.test(last)) ? last : '../lodash.js';
+
+ if (!amd) {
+ try {
+ result = require('fs').realpathSync(result);
+ } catch (e) {}
+
+ try {
+ result = require.resolve(result);
+ } catch (e) {}
+ }
+ return result;
+ }());
+
+ /** Used to match path separators. */
+ var rePathSeparator = /[\/\\]/;
+
+ /** Used to detect primitive types. */
+ var rePrimitive = /^(?:boolean|number|string|undefined)$/;
+
+ /** Used to match RegExp special characters. */
+ var reSpecialChars = /[.*+?^=!:${}()|[\]\/\\]/g;
+
+ /** The `ui` object. */
+ var ui = root.ui || (root.ui = {
+ 'buildPath': basename(filePath, '.js'),
+ 'otherPath': 'underscore'
+ });
+
+ /** The lodash build basename. */
+ var buildName = root.buildName = basename(ui.buildPath, '.js');
+
+ /** The other library basename. */
+ var otherName = root.otherName = (function() {
+ var result = basename(ui.otherPath, '.js');
+ return result + (result == buildName ? ' (2)' : '');
+ }());
+
+ /** Used to score performance. */
+ var score = { 'a': [], 'b': [] };
+
+ /** Used to queue benchmark suites. */
+ var suites = [];
+
+ /** Use a single "load" function. */
+ var load = (typeof require == 'function' && !amd)
+ ? require
+ : noop;
+
+ /** Load lodash. */
+ var lodash = root.lodash || (root.lodash = (
+ lodash = load(filePath) || root._,
+ lodash = lodash._ || lodash,
+ (lodash.runInContext ? lodash.runInContext(root) : lodash),
+ lodash.noConflict()
+ ));
+
+ /** Load Underscore. */
+ var _ = root.underscore || (root.underscore = (
+ _ = load('../vendor/underscore/underscore.js') || root._,
+ _._ || _
+ ));
+
+ /** Load Benchmark.js. */
+ var Benchmark = root.Benchmark || (root.Benchmark = (
+ Benchmark = load('../node_modules/benchmark/benchmark.js') || root.Benchmark,
+ Benchmark = Benchmark.Benchmark || Benchmark,
+ Benchmark.runInContext(lodash.extend({}, root, { '_': lodash }))
+ ));
+
+ /*--------------------------------------------------------------------------*/
+
+ /**
+ * Gets the basename of the given `filePath`. If the file `extension` is passed,
+ * it will be removed from the basename.
+ *
+ * @private
+ * @param {string} path The file path to inspect.
+ * @param {string} extension The extension to remove.
+ * @returns {string} Returns the basename.
+ */
+ function basename(filePath, extension) {
+ var result = (filePath || '').split(rePathSeparator).pop();
+ return (arguments.length < 2)
+ ? result
+ : result.replace(RegExp(extension.replace(reSpecialChars, '\\$&') + '$'), '');
+ }
+
+ /**
+ * Computes the geometric mean (log-average) of an array of values.
+ * See http://en.wikipedia.org/wiki/Geometric_mean#Relationship_with_arithmetic_mean_of_logarithms.
+ *
+ * @private
+ * @param {Array} array The array of values.
+ * @returns {number} The geometric mean.
+ */
+ function getGeometricMean(array) {
+ return Math.pow(Math.E, lodash.reduce(array, function(sum, x) {
+ return sum + Math.log(x);
+ }, 0) / array.length) || 0;
+ }
+
+ /**
+ * Gets the Hz, i.e. operations per second, of `bench` adjusted for the
+ * margin of error.
+ *
+ * @private
+ * @param {Object} bench The benchmark object.
+ * @returns {number} Returns the adjusted Hz.
+ */
+ function getHz(bench) {
+ var result = 1 / (bench.stats.mean + bench.stats.moe);
+ return isFinite(result) ? result : 0;
+ }
+
+ /**
+ * Host objects can return type values that are different from their actual
+ * data type. The objects we are concerned with usually return non-primitive
+ * types of "object", "function", or "unknown".
+ *
+ * @private
+ * @param {*} object The owner of the property.
+ * @param {string} property The property to check.
+ * @returns {boolean} Returns `true` if the property value is a non-primitive, else `false`.
+ */
+ function isHostType(object, property) {
+ if (object == null) {
+ return false;
+ }
+ var type = typeof object[property];
+ return !rePrimitive.test(type) && (type != 'object' || !!object[property]);
+ }
+
+ /**
+ * Logs text to the console.
+ *
+ * @private
+ * @param {string} text The text to log.
+ */
+ function log(text) {
+ console.log(text + '');
+ if (fbPanel) {
+ // Scroll the Firebug Lite panel down.
+ fbPanel.scrollTop = fbPanel.scrollHeight;
+ }
+ }
+
+ /**
+ * Runs all benchmark suites.
+ *
+ * @private (@public in the browser)
+ */
+ function run() {
+ fbPanel = (fbPanel = root.document && document.getElementById('FirebugUI')) &&
+ (fbPanel = (fbPanel = fbPanel.contentWindow || fbPanel.contentDocument).document || fbPanel) &&
+ fbPanel.getElementById('fbPanel1');
+
+ log('\nSit back and relax, this may take a while.');
+ suites[0].run({ 'async': true });
+ }
+
+ /*--------------------------------------------------------------------------*/
+
+ lodash.extend(Benchmark.Suite.options, {
+ 'onStart': function() {
+ log('\n' + this.name + ':');
+ },
+ 'onCycle': function(event) {
+ log(event.target);
+ },
+ 'onComplete': function() {
+ for (var index = 0, length = this.length; index < length; index++) {
+ var bench = this[index];
+ if (bench.error) {
+ var errored = true;
+ }
+ }
+ if (errored) {
+ log('There was a problem, skipping...');
+ }
+ else {
+ var formatNumber = Benchmark.formatNumber,
+ fastest = this.filter('fastest'),
+ fastestHz = getHz(fastest[0]),
+ slowest = this.filter('slowest'),
+ slowestHz = getHz(slowest[0]),
+ aHz = getHz(this[0]),
+ bHz = getHz(this[1]);
+
+ if (fastest.length > 1) {
+ log('It\'s too close to call.');
+ aHz = bHz = slowestHz;
+ }
+ else {
+ var percent = ((fastestHz / slowestHz) - 1) * 100;
+
+ log(
+ fastest[0].name + ' is ' +
+ formatNumber(percent < 1 ? percent.toFixed(2) : Math.round(percent)) +
+ '% faster.'
+ );
+ }
+ // Add score adjusted for margin of error.
+ score.a.push(aHz);
+ score.b.push(bHz);
+ }
+ // Remove current suite from queue.
+ suites.shift();
+
+ if (suites.length) {
+ // Run next suite.
+ suites[0].run({ 'async': true });
+ }
+ else {
+ var aMeanHz = getGeometricMean(score.a),
+ bMeanHz = getGeometricMean(score.b),
+ fastestMeanHz = Math.max(aMeanHz, bMeanHz),
+ slowestMeanHz = Math.min(aMeanHz, bMeanHz),
+ xFaster = fastestMeanHz / slowestMeanHz,
+ percentFaster = formatNumber(Math.round((xFaster - 1) * 100)),
+ message = 'is ' + percentFaster + '% ' + (xFaster == 1 ? '' : '(' + formatNumber(xFaster.toFixed(2)) + 'x) ') + 'faster than';
+
+ // Report results.
+ if (aMeanHz >= bMeanHz) {
+ log('\n' + buildName + ' ' + message + ' ' + otherName + '.');
+ } else {
+ log('\n' + otherName + ' ' + message + ' ' + buildName + '.');
+ }
+ }
+ }
+ });
+
+ /*--------------------------------------------------------------------------*/
+
+ lodash.extend(Benchmark.options, {
+ 'async': true,
+ 'setup': '\
+ var _ = global.underscore,\
+ lodash = global.lodash,\
+ belt = this.name == buildName ? lodash : _;\
+ \
+ var date = new Date,\
+ limit = 50,\
+ regexp = /x/,\
+ object = {},\
+ objects = Array(limit),\
+ numbers = Array(limit),\
+ fourNumbers = [5, 25, 10, 30],\
+ nestedNumbers = [1, [2], [3, [[4]]]],\
+ nestedObjects = [{}, [{}], [{}, [[{}]]]],\
+ twoNumbers = [12, 23];\
+ \
+ for (var index = 0; index < limit; index++) {\
+ numbers[index] = index;\
+ object["key" + index] = index;\
+ objects[index] = { "num": index };\
+ }\
+ var strNumbers = numbers + "";\
+ \
+ if (typeof assign != "undefined") {\
+ var _assign = _.assign || _.extend,\
+ lodashAssign = lodash.assign;\
+ }\
+ if (typeof bind != "undefined") {\
+ var thisArg = { "name": "fred" };\
+ \
+ var func = function(greeting, punctuation) {\
+ return (greeting || "hi") + " " + this.name + (punctuation || ".");\
+ };\
+ \
+ var _boundNormal = _.bind(func, thisArg),\
+ _boundMultiple = _boundNormal,\
+ _boundPartial = _.bind(func, thisArg, "hi");\
+ \
+ var lodashBoundNormal = lodash.bind(func, thisArg),\
+ lodashBoundMultiple = lodashBoundNormal,\
+ lodashBoundPartial = lodash.bind(func, thisArg, "hi");\
+ \
+ for (index = 0; index < 10; index++) {\
+ _boundMultiple = _.bind(_boundMultiple, { "name": "fred" + index });\
+ lodashBoundMultiple = lodash.bind(lodashBoundMultiple, { "name": "fred" + index });\
+ }\
+ }\
+ if (typeof bindAll != "undefined") {\
+ var bindAllCount = -1,\
+ bindAllObjects = Array(this.count);\
+ \
+ var funcNames = belt.reject(belt.functions(belt).slice(0, 40), function(funcName) {\
+ return /^_/.test(funcName);\
+ });\
+ \
+ // Potentially expensive.\n\
+ for (index = 0; index < this.count; index++) {\
+ bindAllObjects[index] = belt.reduce(funcNames, function(object, funcName) {\
+ object[funcName] = belt[funcName];\
+ return object;\
+ }, {});\
+ }\
+ }\
+ if (typeof chaining != "undefined") {\
+ var even = function(v) { return v % 2 == 0; },\
+ square = function(v) { return v * v; };\
+ \
+ var largeArray = belt.range(10000),\
+ _chaining = _(largeArray).chain(),\
+ lodashChaining = lodash(largeArray).chain();\
+ }\
+ if (typeof compact != "undefined") {\
+ var uncompacted = numbers.slice();\
+ uncompacted[2] = false;\
+ uncompacted[6] = null;\
+ uncompacted[18] = "";\
+ }\
+ if (typeof flowRight != "undefined") {\
+ var compAddOne = function(n) { return n + 1; },\
+ compAddTwo = function(n) { return n + 2; },\
+ compAddThree = function(n) { return n + 3; };\
+ \
+ var _composed = _.flowRight && _.flowRight(compAddThree, compAddTwo, compAddOne),\
+ lodashComposed = lodash.flowRight && lodash.flowRight(compAddThree, compAddTwo, compAddOne);\
+ }\
+ if (typeof countBy != "undefined" || typeof omit != "undefined") {\
+ var wordToNumber = {\
+ "one": 1,\
+ "two": 2,\
+ "three": 3,\
+ "four": 4,\
+ "five": 5,\
+ "six": 6,\
+ "seven": 7,\
+ "eight": 8,\
+ "nine": 9,\
+ "ten": 10,\
+ "eleven": 11,\
+ "twelve": 12,\
+ "thirteen": 13,\
+ "fourteen": 14,\
+ "fifteen": 15,\
+ "sixteen": 16,\
+ "seventeen": 17,\
+ "eighteen": 18,\
+ "nineteen": 19,\
+ "twenty": 20,\
+ "twenty-one": 21,\
+ "twenty-two": 22,\
+ "twenty-three": 23,\
+ "twenty-four": 24,\
+ "twenty-five": 25,\
+ "twenty-six": 26,\
+ "twenty-seven": 27,\
+ "twenty-eight": 28,\
+ "twenty-nine": 29,\
+ "thirty": 30,\
+ "thirty-one": 31,\
+ "thirty-two": 32,\
+ "thirty-three": 33,\
+ "thirty-four": 34,\
+ "thirty-five": 35,\
+ "thirty-six": 36,\
+ "thirty-seven": 37,\
+ "thirty-eight": 38,\
+ "thirty-nine": 39,\
+ "forty": 40\
+ };\
+ \
+ var words = belt.keys(wordToNumber).slice(0, limit);\
+ }\
+ if (typeof flatten != "undefined") {\
+ var _flattenDeep = _.flatten([[1]])[0] !== 1,\
+ lodashFlattenDeep = lodash.flatten([[1]])[0] !== 1;\
+ }\
+ if (typeof isEqual != "undefined") {\
+ var objectOfPrimitives = {\
+ "boolean": true,\
+ "number": 1,\
+ "string": "a"\
+ };\
+ \
+ var objectOfObjects = {\
+ "boolean": new Boolean(true),\
+ "number": new Number(1),\
+ "string": new String("a")\
+ };\
+ \
+ var objectOfObjects2 = {\
+ "boolean": new Boolean(true),\
+ "number": new Number(1),\
+ "string": new String("A")\
+ };\
+ \
+ var object2 = {},\
+ object3 = {},\
+ objects2 = Array(limit),\
+ objects3 = Array(limit),\
+ numbers2 = Array(limit),\
+ numbers3 = Array(limit),\
+ nestedNumbers2 = [1, [2], [3, [[4]]]],\
+ nestedNumbers3 = [1, [2], [3, [[6]]]];\
+ \
+ for (index = 0; index < limit; index++) {\
+ object2["key" + index] = index;\
+ object3["key" + index] = index;\
+ objects2[index] = { "num": index };\
+ objects3[index] = { "num": index };\
+ numbers2[index] = index;\
+ numbers3[index] = index;\
+ }\
+ object3["key" + (limit - 1)] = -1;\
+ objects3[limit - 1].num = -1;\
+ numbers3[limit - 1] = -1;\
+ }\
+ if (typeof matches != "undefined") {\
+ var source = { "num": 9 };\
+ \
+ var _matcher = (_.matches || _.noop)(source),\
+ lodashMatcher = (lodash.matches || lodash.noop)(source);\
+ }\
+ if (typeof multiArrays != "undefined") {\
+ var twentyValues = belt.shuffle(belt.range(20)),\
+ fortyValues = belt.shuffle(belt.range(40)),\
+ hundredSortedValues = belt.range(100),\
+ hundredValues = belt.shuffle(hundredSortedValues),\
+ hundredValues2 = belt.shuffle(hundredValues),\
+ hundredTwentyValues = belt.shuffle(belt.range(120)),\
+ hundredTwentyValues2 = belt.shuffle(hundredTwentyValues),\
+ twoHundredValues = belt.shuffle(belt.range(200)),\
+ twoHundredValues2 = belt.shuffle(twoHundredValues);\
+ }\
+ if (typeof partial != "undefined") {\
+ var func = function(greeting, punctuation) {\
+ return greeting + " fred" + (punctuation || ".");\
+ };\
+ \
+ var _partial = _.partial(func, "hi"),\
+ lodashPartial = lodash.partial(func, "hi");\
+ }\
+ if (typeof template != "undefined") {\
+ var tplData = {\
+ "header1": "Header1",\
+ "header2": "Header2",\
+ "header3": "Header3",\
+ "header4": "Header4",\
+ "header5": "Header5",\
+ "header6": "Header6",\
+ "list": ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10"]\
+ };\
+ \
+ var tpl =\
+ "<div>" +\
+ "<h1 class=\'header1\'><%= header1 %></h1>" +\
+ "<h2 class=\'header2\'><%= header2 %></h2>" +\
+ "<h3 class=\'header3\'><%= header3 %></h3>" +\
+ "<h4 class=\'header4\'><%= header4 %></h4>" +\
+ "<h5 class=\'header5\'><%= header5 %></h5>" +\
+ "<h6 class=\'header6\'><%= header6 %></h6>" +\
+ "<ul class=\'list\'>" +\
+ "<% for (var index = 0, length = list.length; index < length; index++) { %>" +\
+ "<li class=\'item\'><%= list[index] %></li>" +\
+ "<% } %>" +\
+ "</ul>" +\
+ "</div>";\
+ \
+ var tplVerbose =\
+ "<div>" +\
+ "<h1 class=\'header1\'><%= data.header1 %></h1>" +\
+ "<h2 class=\'header2\'><%= data.header2 %></h2>" +\
+ "<h3 class=\'header3\'><%= data.header3 %></h3>" +\
+ "<h4 class=\'header4\'><%= data.header4 %></h4>" +\
+ "<h5 class=\'header5\'><%= data.header5 %></h5>" +\
+ "<h6 class=\'header6\'><%= data.header6 %></h6>" +\
+ "<ul class=\'list\'>" +\
+ "<% for (var index = 0, length = data.list.length; index < length; index++) { %>" +\
+ "<li class=\'item\'><%= data.list[index] %></li>" +\
+ "<% } %>" +\
+ "</ul>" +\
+ "</div>";\
+ \
+ var settingsObject = { "variable": "data" };\
+ \
+ var _tpl = _.template(tpl),\
+ _tplVerbose = _.template(tplVerbose, null, settingsObject);\
+ \
+ var lodashTpl = lodash.template(tpl),\
+ lodashTplVerbose = lodash.template(tplVerbose, null, settingsObject);\
+ }\
+ if (typeof wrap != "undefined") {\
+ var add = function(a, b) {\
+ return a + b;\
+ };\
+ \
+ var average = function(func, a, b) {\
+ return (func(a, b) / 2).toFixed(2);\
+ };\
+ \
+ var _wrapped = _.wrap(add, average);\
+ lodashWrapped = lodash.wrap(add, average);\
+ }\
+ if (typeof zip != "undefined") {\
+ var unzipped = [["a", "b", "c"], [1, 2, 3], [true, false, true]];\
+ }'
+ });
+
+ /*--------------------------------------------------------------------------*/
+
+ suites.push(
+ Benchmark.Suite('`_(...).map(...).filter(...).take(...).value()`')
+ .add(buildName, {
+ 'fn': 'lodashChaining.map(square).filter(even).take(100).value()',
+ 'teardown': 'function chaining(){}'
+ })
+ .add(otherName, {
+ 'fn': '_chaining.map(square).filter(even).take(100).value()',
+ 'teardown': 'function chaining(){}'
+ })
+ );
+
+ /*--------------------------------------------------------------------------*/
+
+ suites.push(
+ Benchmark.Suite('`_.assign`')
+ .add(buildName, {
+ 'fn': 'lodashAssign({}, { "a": 1, "b": 2, "c": 3 })',
+ 'teardown': 'function assign(){}'
+ })
+ .add(otherName, {
+ 'fn': '_assign({}, { "a": 1, "b": 2, "c": 3 })',
+ 'teardown': 'function assign(){}'
+ })
+ );
+
+ suites.push(
+ Benchmark.Suite('`_.assign` with multiple sources')
+ .add(buildName, {
+ 'fn': 'lodashAssign({}, { "a": 1, "b": 2 }, { "c": 3, "d": 4 })',
+ 'teardown': 'function assign(){}'
+ })
+ .add(otherName, {
+ 'fn': '_assign({}, { "a": 1, "b": 2 }, { "c": 3, "d": 4 })',
+ 'teardown': 'function assign(){}'
+ })
+ );
+
+ /*--------------------------------------------------------------------------*/
+
+ suites.push(
+ Benchmark.Suite('`_.bind` (slow path)')
+ .add(buildName, {
+ 'fn': 'lodash.bind(function() { return this.name; }, { "name": "fred" })',
+ 'teardown': 'function bind(){}'
+ })
+ .add(otherName, {
+ 'fn': '_.bind(function() { return this.name; }, { "name": "fred" })',
+ 'teardown': 'function bind(){}'
+ })
+ );
+
+ suites.push(
+ Benchmark.Suite('bound call with arguments')
+ .add(buildName, {
+ 'fn': 'lodashBoundNormal("hi", "!")',
+ 'teardown': 'function bind(){}'
+ })
+ .add(otherName, {
+ 'fn': '_boundNormal("hi", "!")',
+ 'teardown': 'function bind(){}'
+ })
+ );
+
+ suites.push(
+ Benchmark.Suite('bound and partially applied call with arguments')
+ .add(buildName, {
+ 'fn': 'lodashBoundPartial("!")',
+ 'teardown': 'function bind(){}'
+ })
+ .add(otherName, {
+ 'fn': '_boundPartial("!")',
+ 'teardown': 'function bind(){}'
+ })
+ );
+
+ suites.push(
+ Benchmark.Suite('bound multiple times')
+ .add(buildName, {
+ 'fn': 'lodashBoundMultiple()',
+ 'teardown': 'function bind(){}'
+ })
+ .add(otherName, {
+ 'fn': '_boundMultiple()',
+ 'teardown': 'function bind(){}'
+ })
+ );
+
+ /*--------------------------------------------------------------------------*/
+
+ suites.push(
+ Benchmark.Suite('`_.bindAll`')
+ .add(buildName, {
+ 'fn': 'lodash.bindAll(bindAllObjects[++bindAllCount], funcNames)',
+ 'teardown': 'function bindAll(){}'
+ })
+ .add(otherName, {
+ 'fn': '_.bindAll(bindAllObjects[++bindAllCount], funcNames)',
+ 'teardown': 'function bindAll(){}'
+ })
+ );
+
+ /*--------------------------------------------------------------------------*/
+
+ suites.push(
+ Benchmark.Suite('`_.clone` with an array')
+ .add(buildName, '\
+ lodash.clone(numbers)'
+ )
+ .add(otherName, '\
+ _.clone(numbers)'
+ )
+ );
+
+ suites.push(
+ Benchmark.Suite('`_.clone` with an object')
+ .add(buildName, '\
+ lodash.clone(object)'
+ )
+ .add(otherName, '\
+ _.clone(object)'
+ )
+ );
+
+ /*--------------------------------------------------------------------------*/
+
+ suites.push(
+ Benchmark.Suite('`_.compact`')
+ .add(buildName, {
+ 'fn': 'lodash.compact(uncompacted)',
+ 'teardown': 'function compact(){}'
+ })
+ .add(otherName, {
+ 'fn': '_.compact(uncompacted)',
+ 'teardown': 'function compact(){}'
+ })
+ );
+
+ /*--------------------------------------------------------------------------*/
+
+ suites.push(
+ Benchmark.Suite('`_.countBy` with `callback` iterating an array')
+ .add(buildName, '\
+ lodash.countBy(numbers, function(num) { return num >> 1; })'
+ )
+ .add(otherName, '\
+ _.countBy(numbers, function(num) { return num >> 1; })'
+ )
+ );
+
+ suites.push(
+ Benchmark.Suite('`_.countBy` with `property` name iterating an array')
+ .add(buildName, {
+ 'fn': 'lodash.countBy(words, "length")',
+ 'teardown': 'function countBy(){}'
+ })
+ .add(otherName, {
+ 'fn': '_.countBy(words, "length")',
+ 'teardown': 'function countBy(){}'
+ })
+ );
+
+ suites.push(
+ Benchmark.Suite('`_.countBy` with `callback` iterating an object')
+ .add(buildName, {
+ 'fn': 'lodash.countBy(wordToNumber, function(num) { return num >> 1; })',
+ 'teardown': 'function countBy(){}'
+ })
+ .add(otherName, {
+ 'fn': '_.countBy(wordToNumber, function(num) { return num >> 1; })',
+ 'teardown': 'function countBy(){}'
+ })
+ );
+
+ /*--------------------------------------------------------------------------*/
+
+ suites.push(
+ Benchmark.Suite('`_.defaults`')
+ .add(buildName, '\
+ lodash.defaults({ "key2": 2, "key6": 6, "key18": 18 }, object)'
+ )
+ .add(otherName, '\
+ _.defaults({ "key2": 2, "key6": 6, "key18": 18 }, object)'
+ )
+ );
+
+ /*--------------------------------------------------------------------------*/
+
+ suites.push(
+ Benchmark.Suite('`_.difference`')
+ .add(buildName, '\
+ lodash.difference(numbers, twoNumbers, fourNumbers)'
+ )
+ .add(otherName, '\
+ _.difference(numbers, twoNumbers, fourNumbers)'
+ )
+ );
+
+ suites.push(
+ Benchmark.Suite('`_.difference` iterating 20 and 40 elements')
+ .add(buildName, {
+ 'fn': 'lodash.difference(twentyValues, fortyValues)',
+ 'teardown': 'function multiArrays(){}'
+ })
+ .add(otherName, {
+ 'fn': '_.difference(twentyValues, fortyValues)',
+ 'teardown': 'function multiArrays(){}'
+ })
+ );
+
+ suites.push(
+ Benchmark.Suite('`_.difference` iterating 200 elements')
+ .add(buildName, {
+ 'fn': 'lodash.difference(twoHundredValues, twoHundredValues2)',
+ 'teardown': 'function multiArrays(){}'
+ })
+ .add(otherName, {
+ 'fn': '_.difference(twoHundredValues, twoHundredValues2)',
+ 'teardown': 'function multiArrays(){}'
+ })
+ );
+
+ /*--------------------------------------------------------------------------*/
+
+ suites.push(
+ Benchmark.Suite('`_.each` iterating an array')
+ .add(buildName, '\
+ var result = [];\
+ lodash.each(numbers, function(num) {\
+ result.push(num * 2);\
+ })'
+ )
+ .add(otherName, '\
+ var result = [];\
+ _.each(numbers, function(num) {\
+ result.push(num * 2);\
+ })'
+ )
+ );
+
+ suites.push(
+ Benchmark.Suite('`_.each` iterating an object')
+ .add(buildName, '\
+ var result = [];\
+ lodash.each(object, function(num) {\
+ result.push(num * 2);\
+ })'
+ )
+ .add(otherName, '\
+ var result = [];\
+ _.each(object, function(num) {\
+ result.push(num * 2);\
+ })'
+ )
+ );
+
+ /*--------------------------------------------------------------------------*/
+
+ suites.push(
+ Benchmark.Suite('`_.every` iterating an array')
+ .add(buildName, '\
+ lodash.every(numbers, function(num) {\
+ return num < limit;\
+ })'
+ )
+ .add(otherName, '\
+ _.every(numbers, function(num) {\
+ return num < limit;\
+ })'
+ )
+ );
+
+ suites.push(
+ Benchmark.Suite('`_.every` iterating an object')
+ .add(buildName, '\
+ lodash.every(object, function(num) {\
+ return num < limit;\
+ })'
+ )
+ .add(otherName, '\
+ _.every(object, function(num) {\
+ return num < limit;\
+ })'
+ )
+ );
+
+ /*--------------------------------------------------------------------------*/
+
+ suites.push(
+ Benchmark.Suite('`_.filter` iterating an array')
+ .add(buildName, '\
+ lodash.filter(numbers, function(num) {\
+ return num % 2;\
+ })'
+ )
+ .add(otherName, '\
+ _.filter(numbers, function(num) {\
+ return num % 2;\
+ })'
+ )
+ );
+
+ suites.push(
+ Benchmark.Suite('`_.filter` iterating an object')
+ .add(buildName, '\
+ lodash.filter(object, function(num) {\
+ return num % 2\
+ })'
+ )
+ .add(otherName, '\
+ _.filter(object, function(num) {\
+ return num % 2\
+ })'
+ )
+ );
+
+ suites.push(
+ Benchmark.Suite('`_.filter` with `_.matches` shorthand')
+ .add(buildName, {
+ 'fn': 'lodash.filter(objects, source)',
+ 'teardown': 'function matches(){}'
+ })
+ .add(otherName, {
+ 'fn': '_.filter(objects, source)',
+ 'teardown': 'function matches(){}'
+ })
+ );
+
+ suites.push(
+ Benchmark.Suite('`_.filter` with `_.matches` predicate')
+ .add(buildName, {
+ 'fn': 'lodash.filter(objects, lodashMatcher)',
+ 'teardown': 'function matches(){}'
+ })
+ .add(otherName, {
+ 'fn': '_.filter(objects, _matcher)',
+ 'teardown': 'function matches(){}'
+ })
+ );
+
+ /*--------------------------------------------------------------------------*/
+
+ suites.push(
+ Benchmark.Suite('`_.find` iterating an array')
+ .add(buildName, '\
+ lodash.find(numbers, function(num) {\
+ return num === (limit - 1);\
+ })'
+ )
+ .add(otherName, '\
+ _.find(numbers, function(num) {\
+ return num === (limit - 1);\
+ })'
+ )
+ );
+
+ suites.push(
+ Benchmark.Suite('`_.find` iterating an object')
+ .add(buildName, '\
+ lodash.find(object, function(value, key) {\
+ return /\D9$/.test(key);\
+ })'
+ )
+ .add(otherName, '\
+ _.find(object, function(value, key) {\
+ return /\D9$/.test(key);\
+ })'
+ )
+ );
+
+ // Avoid Underscore induced `OutOfMemoryError` in Rhino and Ringo.
+ suites.push(
+ Benchmark.Suite('`_.find` with `_.matches` shorthand')
+ .add(buildName, {
+ 'fn': 'lodash.find(objects, source)',
+ 'teardown': 'function matches(){}'
+ })
+ .add(otherName, {
+ 'fn': '_.find(objects, source)',
+ 'teardown': 'function matches(){}'
+ })
+ );
+
+ /*--------------------------------------------------------------------------*/
+
+ suites.push(
+ Benchmark.Suite('`_.flatten`')
+ .add(buildName, {
+ 'fn': 'lodash.flatten(nestedNumbers, !lodashFlattenDeep)',
+ 'teardown': 'function flatten(){}'
+ })
+ .add(otherName, {
+ 'fn': '_.flatten(nestedNumbers, !_flattenDeep)',
+ 'teardown': 'function flatten(){}'
+ })
+ );
+
+ /*--------------------------------------------------------------------------*/
+
+ suites.push(
+ Benchmark.Suite('`_.flattenDeep` nested arrays of numbers')
+ .add(buildName, {
+ 'fn': 'lodash.flattenDeep(nestedNumbers)',
+ 'teardown': 'function flatten(){}'
+ })
+ .add(otherName, {
+ 'fn': '_.flattenDeep(nestedNumbers)',
+ 'teardown': 'function flatten(){}'
+ })
+ );
+
+ suites.push(
+ Benchmark.Suite('`_.flattenDeep` nest arrays of objects')
+ .add(buildName, {
+ 'fn': 'lodash.flattenDeep(nestedObjects)',
+ 'teardown': 'function flatten(){}'
+ })
+ .add(otherName, {
+ 'fn': '_.flattenDeep(nestedObjects)',
+ 'teardown': 'function flatten(){}'
+ })
+ );
+
+ /*--------------------------------------------------------------------------*/
+
+ suites.push(
+ Benchmark.Suite('`_.flowRight`')
+ .add(buildName, {
+ 'fn': 'lodash.flowRight(compAddThree, compAddTwo, compAddOne)',
+ 'teardown': 'function flowRight(){}'
+ })
+ .add(otherName, {
+ 'fn': '_.flowRight(compAddThree, compAddTwo, compAddOne)',
+ 'teardown': 'function flowRight(){}'
+ })
+ );
+
+ suites.push(
+ Benchmark.Suite('composed call')
+ .add(buildName, {
+ 'fn': 'lodashComposed(0)',
+ 'teardown': 'function flowRight(){}'
+ })
+ .add(otherName, {
+ 'fn': '_composed(0)',
+ 'teardown': 'function flowRight(){}'
+ })
+ );
+
+ /*--------------------------------------------------------------------------*/
+
+ suites.push(
+ Benchmark.Suite('`_.functions`')
+ .add(buildName, '\
+ lodash.functions(lodash)'
+ )
+ .add(otherName, '\
+ _.functions(lodash)'
+ )
+ );
+
+ /*--------------------------------------------------------------------------*/
+
+ suites.push(
+ Benchmark.Suite('`_.groupBy` with `callback` iterating an array')
+ .add(buildName, '\
+ lodash.groupBy(numbers, function(num) { return num >> 1; })'
+ )
+ .add(otherName, '\
+ _.groupBy(numbers, function(num) { return num >> 1; })'
+ )
+ );
+
+ suites.push(
+ Benchmark.Suite('`_.groupBy` with `property` name iterating an array')
+ .add(buildName, {
+ 'fn': 'lodash.groupBy(words, "length")',
+ 'teardown': 'function countBy(){}'
+ })
+ .add(otherName, {
+ 'fn': '_.groupBy(words, "length")',
+ 'teardown': 'function countBy(){}'
+ })
+ );
+
+ suites.push(
+ Benchmark.Suite('`_.groupBy` with `callback` iterating an object')
+ .add(buildName, {
+ 'fn': 'lodash.groupBy(wordToNumber, function(num) { return num >> 1; })',
+ 'teardown': 'function countBy(){}'
+ })
+ .add(otherName, {
+ 'fn': '_.groupBy(wordToNumber, function(num) { return num >> 1; })',
+ 'teardown': 'function countBy(){}'
+ })
+ );
+
+ /*--------------------------------------------------------------------------*/
+
+ suites.push(
+ Benchmark.Suite('`_.includes` searching an array')
+ .add(buildName, '\
+ lodash.includes(numbers, limit - 1)'
+ )
+ .add(otherName, '\
+ _.includes(numbers, limit - 1)'
+ )
+ );
+
+ suites.push(
+ Benchmark.Suite('`_.includes` searching an object')
+ .add(buildName, '\
+ lodash.includes(object, limit - 1)'
+ )
+ .add(otherName, '\
+ _.includes(object, limit - 1)'
+ )
+ );
+
+ if (lodash.includes('ab', 'ab') && _.includes('ab', 'ab')) {
+ suites.push(
+ Benchmark.Suite('`_.includes` searching a string')
+ .add(buildName, '\
+ lodash.includes(strNumbers, "," + (limit - 1))'
+ )
+ .add(otherName, '\
+ _.includes(strNumbers, "," + (limit - 1))'
+ )
+ );
+ }
+
+ /*--------------------------------------------------------------------------*/
+
+ suites.push(
+ Benchmark.Suite('`_.indexOf`')
+ .add(buildName, {
+ 'fn': 'lodash.indexOf(hundredSortedValues, 99)',
+ 'teardown': 'function multiArrays(){}'
+ })
+ .add(otherName, {
+ 'fn': '_.indexOf(hundredSortedValues, 99)',
+ 'teardown': 'function multiArrays(){}'
+ })
+ );
+
+ /*--------------------------------------------------------------------------*/
+
+ suites.push(
+ Benchmark.Suite('`_.intersection`')
+ .add(buildName, '\
+ lodash.intersection(numbers, twoNumbers, fourNumbers)'
+ )
+ .add(otherName, '\
+ _.intersection(numbers, twoNumbers, fourNumbers)'
+ )
+ );
+
+ suites.push(
+ Benchmark.Suite('`_.intersection` iterating 120 elements')
+ .add(buildName, {
+ 'fn': 'lodash.intersection(hundredTwentyValues, hundredTwentyValues2)',
+ 'teardown': 'function multiArrays(){}'
+ })
+ .add(otherName, {
+ 'fn': '_.intersection(hundredTwentyValues, hundredTwentyValues2)',
+ 'teardown': 'function multiArrays(){}'
+ })
+ );
+
+ /*--------------------------------------------------------------------------*/
+
+ suites.push(
+ Benchmark.Suite('`_.invert`')
+ .add(buildName, '\
+ lodash.invert(object)'
+ )
+ .add(otherName, '\
+ _.invert(object)'
+ )
+ );
+
+ /*--------------------------------------------------------------------------*/
+
+ suites.push(
+ Benchmark.Suite('`_.invokeMap` iterating an array')
+ .add(buildName, '\
+ lodash.invokeMap(numbers, "toFixed")'
+ )
+ .add(otherName, '\
+ _.invokeMap(numbers, "toFixed")'
+ )
+ );
+
+ suites.push(
+ Benchmark.Suite('`_.invokeMap` with arguments iterating an array')
+ .add(buildName, '\
+ lodash.invokeMap(numbers, "toFixed", 1)'
+ )
+ .add(otherName, '\
+ _.invokeMap(numbers, "toFixed", 1)'
+ )
+ );
+
+ suites.push(
+ Benchmark.Suite('`_.invokeMap` with a function for `path` iterating an array')
+ .add(buildName, '\
+ lodash.invokeMap(numbers, Number.prototype.toFixed, 1)'
+ )
+ .add(otherName, '\
+ _.invokeMap(numbers, Number.prototype.toFixed, 1)'
+ )
+ );
+
+ suites.push(
+ Benchmark.Suite('`_.invokeMap` iterating an object')
+ .add(buildName, '\
+ lodash.invokeMap(object, "toFixed", 1)'
+ )
+ .add(otherName, '\
+ _.invokeMap(object, "toFixed", 1)'
+ )
+ );
+
+ /*--------------------------------------------------------------------------*/
+
+ suites.push(
+ Benchmark.Suite('`_.isEqual` comparing primitives')
+ .add(buildName, {
+ 'fn': '\
+ lodash.isEqual(1, "1");\
+ lodash.isEqual(1, 1)',
+ 'teardown': 'function isEqual(){}'
+ })
+ .add(otherName, {
+ 'fn': '\
+ _.isEqual(1, "1");\
+ _.isEqual(1, 1);',
+ 'teardown': 'function isEqual(){}'
+ })
+ );
+
+ suites.push(
+ Benchmark.Suite('`_.isEqual` comparing primitives and their object counterparts (edge case)')
+ .add(buildName, {
+ 'fn': '\
+ lodash.isEqual(objectOfPrimitives, objectOfObjects);\
+ lodash.isEqual(objectOfPrimitives, objectOfObjects2)',
+ 'teardown': 'function isEqual(){}'
+ })
+ .add(otherName, {
+ 'fn': '\
+ _.isEqual(objectOfPrimitives, objectOfObjects);\
+ _.isEqual(objectOfPrimitives, objectOfObjects2)',
+ 'teardown': 'function isEqual(){}'
+ })
+ );
+
+ suites.push(
+ Benchmark.Suite('`_.isEqual` comparing arrays')
+ .add(buildName, {
+ 'fn': '\
+ lodash.isEqual(numbers, numbers2);\
+ lodash.isEqual(numbers2, numbers3)',
+ 'teardown': 'function isEqual(){}'
+ })
+ .add(otherName, {
+ 'fn': '\
+ _.isEqual(numbers, numbers2);\
+ _.isEqual(numbers2, numbers3)',
+ 'teardown': 'function isEqual(){}'
+ })
+ );
+
+ suites.push(
+ Benchmark.Suite('`_.isEqual` comparing nested arrays')
+ .add(buildName, {
+ 'fn': '\
+ lodash.isEqual(nestedNumbers, nestedNumbers2);\
+ lodash.isEqual(nestedNumbers2, nestedNumbers3)',
+ 'teardown': 'function isEqual(){}'
+ })
+ .add(otherName, {
+ 'fn': '\
+ _.isEqual(nestedNumbers, nestedNumbers2);\
+ _.isEqual(nestedNumbers2, nestedNumbers3)',
+ 'teardown': 'function isEqual(){}'
+ })
+ );
+
+ suites.push(
+ Benchmark.Suite('`_.isEqual` comparing arrays of objects')
+ .add(buildName, {
+ 'fn': '\
+ lodash.isEqual(objects, objects2);\
+ lodash.isEqual(objects2, objects3)',
+ 'teardown': 'function isEqual(){}'
+ })
+ .add(otherName, {
+ 'fn': '\
+ _.isEqual(objects, objects2);\
+ _.isEqual(objects2, objects3)',
+ 'teardown': 'function isEqual(){}'
+ })
+ );
+
+ suites.push(
+ Benchmark.Suite('`_.isEqual` comparing objects')
+ .add(buildName, {
+ 'fn': '\
+ lodash.isEqual(object, object2);\
+ lodash.isEqual(object2, object3)',
+ 'teardown': 'function isEqual(){}'
+ })
+ .add(otherName, {
+ 'fn': '\
+ _.isEqual(object, object2);\
+ _.isEqual(object2, object3)',
+ 'teardown': 'function isEqual(){}'
+ })
+ );
+
+ /*--------------------------------------------------------------------------*/
+
+ suites.push(
+ Benchmark.Suite('`_.isArguments`, `_.isDate`, `_.isFunction`, `_.isNumber`, `_.isObject`, `_.isRegExp`')
+ .add(buildName, '\
+ lodash.isArguments(arguments);\
+ lodash.isArguments(object);\
+ lodash.isDate(date);\
+ lodash.isDate(object);\
+ lodash.isFunction(lodash);\
+ lodash.isFunction(object);\
+ lodash.isNumber(1);\
+ lodash.isNumber(object);\
+ lodash.isObject(object);\
+ lodash.isObject(1);\
+ lodash.isRegExp(regexp);\
+ lodash.isRegExp(object)'
+ )
+ .add(otherName, '\
+ _.isArguments(arguments);\
+ _.isArguments(object);\
+ _.isDate(date);\
+ _.isDate(object);\
+ _.isFunction(_);\
+ _.isFunction(object);\
+ _.isNumber(1);\
+ _.isNumber(object);\
+ _.isObject(object);\
+ _.isObject(1);\
+ _.isRegExp(regexp);\
+ _.isRegExp(object)'
+ )
+ );
+
+ /*--------------------------------------------------------------------------*/
+
+ suites.push(
+ Benchmark.Suite('`_.keys` (uses native `Object.keys` if available)')
+ .add(buildName, '\
+ lodash.keys(object)'
+ )
+ .add(otherName, '\
+ _.keys(object)'
+ )
+ );
+
+ /*--------------------------------------------------------------------------*/
+
+ suites.push(
+ Benchmark.Suite('`_.lastIndexOf`')
+ .add(buildName, {
+ 'fn': 'lodash.lastIndexOf(hundredSortedValues, 0)',
+ 'teardown': 'function multiArrays(){}'
+ })
+ .add(otherName, {
+ 'fn': '_.lastIndexOf(hundredSortedValues, 0)',
+ 'teardown': 'function multiArrays(){}'
+ })
+ );
+
+ /*--------------------------------------------------------------------------*/
+
+ suites.push(
+ Benchmark.Suite('`_.map` iterating an array')
+ .add(buildName, '\
+ lodash.map(objects, function(value) {\
+ return value.num;\
+ })'
+ )
+ .add(otherName, '\
+ _.map(objects, function(value) {\
+ return value.num;\
+ })'
+ )
+ );
+
+ suites.push(
+ Benchmark.Suite('`_.map` iterating an object')
+ .add(buildName, '\
+ lodash.map(object, function(value) {\
+ return value;\
+ })'
+ )
+ .add(otherName, '\
+ _.map(object, function(value) {\
+ return value;\
+ })'
+ )
+ );
+
+ suites.push(
+ Benchmark.Suite('`_.map` with `_.property` shorthand')
+ .add(buildName, '\
+ lodash.map(objects, "num")'
+ )
+ .add(otherName, '\
+ _.map(objects, "num")'
+ )
+ );
+
+ /*--------------------------------------------------------------------------*/
+
+ suites.push(
+ Benchmark.Suite('`_.max`')
+ .add(buildName, '\
+ lodash.max(numbers)'
+ )
+ .add(otherName, '\
+ _.max(numbers)'
+ )
+ );
+
+ /*--------------------------------------------------------------------------*/
+
+ suites.push(
+ Benchmark.Suite('`_.min`')
+ .add(buildName, '\
+ lodash.min(numbers)'
+ )
+ .add(otherName, '\
+ _.min(numbers)'
+ )
+ );
+
+ /*--------------------------------------------------------------------------*/
+
+ suites.push(
+ Benchmark.Suite('`_.omit` iterating 20 properties, omitting 2 keys')
+ .add(buildName, '\
+ lodash.omit(object, "key6", "key13")'
+ )
+ .add(otherName, '\
+ _.omit(object, "key6", "key13")'
+ )
+ );
+
+ suites.push(
+ Benchmark.Suite('`_.omit` iterating 40 properties, omitting 20 keys')
+ .add(buildName, {
+ 'fn': 'lodash.omit(wordToNumber, words)',
+ 'teardown': 'function omit(){}'
+ })
+ .add(otherName, {
+ 'fn': '_.omit(wordToNumber, words)',
+ 'teardown': 'function omit(){}'
+ })
+ );
+
+ /*--------------------------------------------------------------------------*/
+
+ suites.push(
+ Benchmark.Suite('`_.partial` (slow path)')
+ .add(buildName, {
+ 'fn': 'lodash.partial(function(greeting) { return greeting + " " + this.name; }, "hi")',
+ 'teardown': 'function partial(){}'
+ })
+ .add(otherName, {
+ 'fn': '_.partial(function(greeting) { return greeting + " " + this.name; }, "hi")',
+ 'teardown': 'function partial(){}'
+ })
+ );
+
+ suites.push(
+ Benchmark.Suite('partially applied call with arguments')
+ .add(buildName, {
+ 'fn': 'lodashPartial("!")',
+ 'teardown': 'function partial(){}'
+ })
+ .add(otherName, {
+ 'fn': '_partial("!")',
+ 'teardown': 'function partial(){}'
+ })
+ );
+
+ /*--------------------------------------------------------------------------*/
+
+ suites.push(
+ Benchmark.Suite('`_.partition` iterating an array')
+ .add(buildName, '\
+ lodash.partition(numbers, function(num) {\
+ return num % 2;\
+ })'
+ )
+ .add(otherName, '\
+ _.partition(numbers, function(num) {\
+ return num % 2;\
+ })'
+ )
+ );
+
+ suites.push(
+ Benchmark.Suite('`_.partition` iterating an object')
+ .add(buildName, '\
+ lodash.partition(object, function(num) {\
+ return num % 2;\
+ })'
+ )
+ .add(otherName, '\
+ _.partition(object, function(num) {\
+ return num % 2;\
+ })'
+ )
+ );
+
+ /*--------------------------------------------------------------------------*/
+
+ suites.push(
+ Benchmark.Suite('`_.pick`')
+ .add(buildName, '\
+ lodash.pick(object, "key6", "key13")'
+ )
+ .add(otherName, '\
+ _.pick(object, "key6", "key13")'
+ )
+ );
+
+ /*--------------------------------------------------------------------------*/
+
+ suites.push(
+ Benchmark.Suite('`_.reduce` iterating an array')
+ .add(buildName, '\
+ lodash.reduce(numbers, function(result, value, index) {\
+ result[index] = value;\
+ return result;\
+ }, {})'
+ )
+ .add(otherName, '\
+ _.reduce(numbers, function(result, value, index) {\
+ result[index] = value;\
+ return result;\
+ }, {})'
+ )
+ );
+
+ suites.push(
+ Benchmark.Suite('`_.reduce` iterating an object')
+ .add(buildName, '\
+ lodash.reduce(object, function(result, value, key) {\
+ result.push(key, value);\
+ return result;\
+ }, [])'
+ )
+ .add(otherName, '\
+ _.reduce(object, function(result, value, key) {\
+ result.push(key, value);\
+ return result;\
+ }, [])'
+ )
+ );
+
+ /*--------------------------------------------------------------------------*/
+
+ suites.push(
+ Benchmark.Suite('`_.reduceRight` iterating an array')
+ .add(buildName, '\
+ lodash.reduceRight(numbers, function(result, value, index) {\
+ result[index] = value;\
+ return result;\
+ }, {})'
+ )
+ .add(otherName, '\
+ _.reduceRight(numbers, function(result, value, index) {\
+ result[index] = value;\
+ return result;\
+ }, {})'
+ )
+ );
+
+ suites.push(
+ Benchmark.Suite('`_.reduceRight` iterating an object')
+ .add(buildName, '\
+ lodash.reduceRight(object, function(result, value, key) {\
+ result.push(key, value);\
+ return result;\
+ }, [])'
+ )
+ .add(otherName, '\
+ _.reduceRight(object, function(result, value, key) {\
+ result.push(key, value);\
+ return result;\
+ }, [])'
+ )
+ );
+
+ /*--------------------------------------------------------------------------*/
+
+ suites.push(
+ Benchmark.Suite('`_.reject` iterating an array')
+ .add(buildName, '\
+ lodash.reject(numbers, function(num) {\
+ return num % 2;\
+ })'
+ )
+ .add(otherName, '\
+ _.reject(numbers, function(num) {\
+ return num % 2;\
+ })'
+ )
+ );
+
+ suites.push(
+ Benchmark.Suite('`_.reject` iterating an object')
+ .add(buildName, '\
+ lodash.reject(object, function(num) {\
+ return num % 2;\
+ })'
+ )
+ .add(otherName, '\
+ _.reject(object, function(num) {\
+ return num % 2;\
+ })'
+ )
+ );
+
+ /*--------------------------------------------------------------------------*/
+
+ suites.push(
+ Benchmark.Suite('`_.sampleSize`')
+ .add(buildName, '\
+ lodash.sampleSize(numbers, limit / 2)'
+ )
+ .add(otherName, '\
+ _.sampleSize(numbers, limit / 2)'
+ )
+ );
+
+ /*--------------------------------------------------------------------------*/
+
+ suites.push(
+ Benchmark.Suite('`_.shuffle`')
+ .add(buildName, '\
+ lodash.shuffle(numbers)'
+ )
+ .add(otherName, '\
+ _.shuffle(numbers)'
+ )
+ );
+
+ /*--------------------------------------------------------------------------*/
+
+ suites.push(
+ Benchmark.Suite('`_.size` with an object')
+ .add(buildName, '\
+ lodash.size(object)'
+ )
+ .add(otherName, '\
+ _.size(object)'
+ )
+ );
+
+ /*--------------------------------------------------------------------------*/
+
+ suites.push(
+ Benchmark.Suite('`_.some` iterating an array')
+ .add(buildName, '\
+ lodash.some(numbers, function(num) {\
+ return num == (limit - 1);\
+ })'
+ )
+ .add(otherName, '\
+ _.some(numbers, function(num) {\
+ return num == (limit - 1);\
+ })'
+ )
+ );
+
+ suites.push(
+ Benchmark.Suite('`_.some` iterating an object')
+ .add(buildName, '\
+ lodash.some(object, function(num) {\
+ return num == (limit - 1);\
+ })'
+ )
+ .add(otherName, '\
+ _.some(object, function(num) {\
+ return num == (limit - 1);\
+ })'
+ )
+ );
+
+ /*--------------------------------------------------------------------------*/
+
+ suites.push(
+ Benchmark.Suite('`_.sortBy` with `callback`')
+ .add(buildName, '\
+ lodash.sortBy(numbers, function(num) { return Math.sin(num); })'
+ )
+ .add(otherName, '\
+ _.sortBy(numbers, function(num) { return Math.sin(num); })'
+ )
+ );
+
+ suites.push(
+ Benchmark.Suite('`_.sortBy` with `property` name')
+ .add(buildName, {
+ 'fn': 'lodash.sortBy(words, "length")',
+ 'teardown': 'function countBy(){}'
+ })
+ .add(otherName, {
+ 'fn': '_.sortBy(words, "length")',
+ 'teardown': 'function countBy(){}'
+ })
+ );
+
+ /*--------------------------------------------------------------------------*/
+
+ suites.push(
+ Benchmark.Suite('`_.sortedIndex`')
+ .add(buildName, '\
+ lodash.sortedIndex(numbers, limit)'
+ )
+ .add(otherName, '\
+ _.sortedIndex(numbers, limit)'
+ )
+ );
+
+ /*--------------------------------------------------------------------------*/
+
+ suites.push(
+ Benchmark.Suite('`_.sortedIndexBy`')
+ .add(buildName, {
+ 'fn': '\
+ lodash.sortedIndexBy(words, "twenty-five", function(value) {\
+ return wordToNumber[value];\
+ })',
+ 'teardown': 'function countBy(){}'
+ })
+ .add(otherName, {
+ 'fn': '\
+ _.sortedIndexBy(words, "twenty-five", function(value) {\
+ return wordToNumber[value];\
+ })',
+ 'teardown': 'function countBy(){}'
+ })
+ );
+
+ /*--------------------------------------------------------------------------*/
+
+ suites.push(
+ Benchmark.Suite('`_.sortedIndexOf`')
+ .add(buildName, {
+ 'fn': 'lodash.sortedIndexOf(hundredSortedValues, 99)',
+ 'teardown': 'function multiArrays(){}'
+ })
+ .add(otherName, {
+ 'fn': '_.sortedIndexOf(hundredSortedValues, 99)',
+ 'teardown': 'function multiArrays(){}'
+ })
+ );
+
+ /*--------------------------------------------------------------------------*/
+
+ suites.push(
+ Benchmark.Suite('`_.sortedLastIndexOf`')
+ .add(buildName, {
+ 'fn': 'lodash.sortedLastIndexOf(hundredSortedValues, 0)',
+ 'teardown': 'function multiArrays(){}'
+ })
+ .add(otherName, {
+ 'fn': '_.sortedLastIndexOf(hundredSortedValues, 0)',
+ 'teardown': 'function multiArrays(){}'
+ })
+ );
+
+ /*--------------------------------------------------------------------------*/
+
+ suites.push(
+ Benchmark.Suite('`_.sum`')
+ .add(buildName, '\
+ lodash.sum(numbers)'
+ )
+ .add(otherName, '\
+ _.sum(numbers)'
+ )
+ );
+
+ /*--------------------------------------------------------------------------*/
+
+ suites.push(
+ Benchmark.Suite('`_.template` (slow path)')
+ .add(buildName, {
+ 'fn': 'lodash.template(tpl)(tplData)',
+ 'teardown': 'function template(){}'
+ })
+ .add(otherName, {
+ 'fn': '_.template(tpl)(tplData)',
+ 'teardown': 'function template(){}'
+ })
+ );
+
+ suites.push(
+ Benchmark.Suite('compiled template')
+ .add(buildName, {
+ 'fn': 'lodashTpl(tplData)',
+ 'teardown': 'function template(){}'
+ })
+ .add(otherName, {
+ 'fn': '_tpl(tplData)',
+ 'teardown': 'function template(){}'
+ })
+ );
+
+ suites.push(
+ Benchmark.Suite('compiled template without a with-statement')
+ .add(buildName, {
+ 'fn': 'lodashTplVerbose(tplData)',
+ 'teardown': 'function template(){}'
+ })
+ .add(otherName, {
+ 'fn': '_tplVerbose(tplData)',
+ 'teardown': 'function template(){}'
+ })
+ );
+
+ /*--------------------------------------------------------------------------*/
+
+ suites.push(
+ Benchmark.Suite('`_.times`')
+ .add(buildName, '\
+ var result = [];\
+ lodash.times(limit, function(n) { result.push(n); })'
+ )
+ .add(otherName, '\
+ var result = [];\
+ _.times(limit, function(n) { result.push(n); })'
+ )
+ );
+
+ /*--------------------------------------------------------------------------*/
+
+ suites.push(
+ Benchmark.Suite('`_.toArray` with an array (edge case)')
+ .add(buildName, '\
+ lodash.toArray(numbers)'
+ )
+ .add(otherName, '\
+ _.toArray(numbers)'
+ )
+ );
+
+ suites.push(
+ Benchmark.Suite('`_.toArray` with an object')
+ .add(buildName, '\
+ lodash.toArray(object)'
+ )
+ .add(otherName, '\
+ _.toArray(object)'
+ )
+ );
+
+ /*--------------------------------------------------------------------------*/
+
+ suites.push(
+ Benchmark.Suite('`_.toPairs`')
+ .add(buildName, '\
+ lodash.toPairs(object)'
+ )
+ .add(otherName, '\
+ _.toPairs(object)'
+ )
+ );
+
+ /*--------------------------------------------------------------------------*/
+
+ suites.push(
+ Benchmark.Suite('`_.unescape` string without html entities')
+ .add(buildName, '\
+ lodash.unescape("`&`, `<`, `>`, `\\"`, and `\'`")'
+ )
+ .add(otherName, '\
+ _.unescape("`&`, `<`, `>`, `\\"`, and `\'`")'
+ )
+ );
+
+ suites.push(
+ Benchmark.Suite('`_.unescape` string with html entities')
+ .add(buildName, '\
+ lodash.unescape("`&`, `<`, `>`, `"`, and `'`")'
+ )
+ .add(otherName, '\
+ _.unescape("`&`, `<`, `>`, `"`, and `'`")'
+ )
+ );
+
+ /*--------------------------------------------------------------------------*/
+
+ suites.push(
+ Benchmark.Suite('`_.union`')
+ .add(buildName, '\
+ lodash.union(numbers, twoNumbers, fourNumbers)'
+ )
+ .add(otherName, '\
+ _.union(numbers, twoNumbers, fourNumbers)'
+ )
+ );
+
+ suites.push(
+ Benchmark.Suite('`_.union` iterating an array of 200 elements')
+ .add(buildName, {
+ 'fn': 'lodash.union(hundredValues, hundredValues2)',
+ 'teardown': 'function multiArrays(){}'
+ })
+ .add(otherName, {
+ 'fn': '_.union(hundredValues, hundredValues2)',
+ 'teardown': 'function multiArrays(){}'
+ })
+ );
+
+ /*--------------------------------------------------------------------------*/
+
+ suites.push(
+ Benchmark.Suite('`_.uniq`')
+ .add(buildName, '\
+ lodash.uniq(numbers.concat(twoNumbers, fourNumbers))'
+ )
+ .add(otherName, '\
+ _.uniq(numbers.concat(twoNumbers, fourNumbers))'
+ )
+ );
+
+ suites.push(
+ Benchmark.Suite('`_.uniq` iterating an array of 200 elements')
+ .add(buildName, {
+ 'fn': 'lodash.uniq(twoHundredValues)',
+ 'teardown': 'function multiArrays(){}'
+ })
+ .add(otherName, {
+ 'fn': '_.uniq(twoHundredValues)',
+ 'teardown': 'function multiArrays(){}'
+ })
+ );
+
+ /*--------------------------------------------------------------------------*/
+
+ suites.push(
+ Benchmark.Suite('`_.uniqBy`')
+ .add(buildName, '\
+ lodash.uniqBy(numbers.concat(twoNumbers, fourNumbers), function(num) {\
+ return num % 2;\
+ })'
+ )
+ .add(otherName, '\
+ _.uniqBy(numbers.concat(twoNumbers, fourNumbers), function(num) {\
+ return num % 2;\
+ })'
+ )
+ );
+
+ /*--------------------------------------------------------------------------*/
+
+ suites.push(
+ Benchmark.Suite('`_.values`')
+ .add(buildName, '\
+ lodash.values(object)'
+ )
+ .add(otherName, '\
+ _.values(object)'
+ )
+ );
+
+ /*--------------------------------------------------------------------------*/
+
+ suites.push(
+ Benchmark.Suite('`_.without`')
+ .add(buildName, '\
+ lodash.without(numbers, 9, 12, 14, 15)'
+ )
+ .add(otherName, '\
+ _.without(numbers, 9, 12, 14, 15)'
+ )
+ );
+
+ /*--------------------------------------------------------------------------*/
+
+ suites.push(
+ Benchmark.Suite('`_.wrap` result called')
+ .add(buildName, {
+ 'fn': 'lodashWrapped(2, 5)',
+ 'teardown': 'function wrap(){}'
+ })
+ .add(otherName, {
+ 'fn': '_wrapped(2, 5)',
+ 'teardown': 'function wrap(){}'
+ })
+ );
+
+ /*--------------------------------------------------------------------------*/
+
+ suites.push(
+ Benchmark.Suite('`_.zip`')
+ .add(buildName, {
+ 'fn': 'lodash.zip.apply(lodash, unzipped)',
+ 'teardown': 'function zip(){}'
+ })
+ .add(otherName, {
+ 'fn': '_.zip.apply(_, unzipped)',
+ 'teardown': 'function zip(){}'
+ })
+ );
+
+ /*--------------------------------------------------------------------------*/
+
+ if (Benchmark.platform + '') {
+ log(Benchmark.platform);
+ }
+ // Expose `run` to be called later when executing in a browser.
+ if (document) {
+ root.run = run;
+ } else {
+ run();
+ }
+}.call(this));
diff --git a/views/ngXosViews/serviceGrid/src/vendor/lodash/test/asset/test-ui.js b/views/ngXosViews/serviceGrid/src/vendor/lodash/test/asset/test-ui.js
new file mode 100644
index 0000000..24f087a
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/lodash/test/asset/test-ui.js
@@ -0,0 +1,170 @@
+;(function(window) {
+ 'use strict';
+
+ /** The base path of the lodash builds. */
+ var basePath = '../';
+
+ /** The lodash build to load. */
+ var build = (build = /build=([^&]+)/.exec(location.search)) && decodeURIComponent(build[1]);
+
+ /** The module loader to use. */
+ var loader = (loader = /loader=([^&]+)/.exec(location.search)) && decodeURIComponent(loader[1]);
+
+ /** The `ui` object. */
+ var ui = {};
+
+ /*--------------------------------------------------------------------------*/
+
+ /**
+ * Registers an event listener on an element.
+ *
+ * @private
+ * @param {Element} element The element.
+ * @param {string} eventName The name of the event.
+ * @param {Function} handler The event handler.
+ * @returns {Element} The element.
+ */
+ function addListener(element, eventName, handler) {
+ if (typeof element.addEventListener != 'undefined') {
+ element.addEventListener(eventName, handler, false);
+ } else if (typeof element.attachEvent != 'undefined') {
+ element.attachEvent('on' + eventName, handler);
+ }
+ }
+
+ /*--------------------------------------------------------------------------*/
+
+ // Initialize controls.
+ addListener(window, 'load', function() {
+ function eventHandler(event) {
+ var buildIndex = buildList.selectedIndex,
+ loaderIndex = loaderList.selectedIndex,
+ search = location.search.replace(/^\?|&?(?:build|loader)=[^&]*&?/g, '');
+
+ if (event.stopPropagation) {
+ event.stopPropagation();
+ } else {
+ event.cancelBubble = true;
+ }
+ location.href =
+ location.href.split('?')[0] + '?' +
+ (search ? search + '&' : '') +
+ 'build=' + (buildIndex < 0 ? build : buildList[buildIndex].value) + '&' +
+ 'loader=' + (loaderIndex < 0 ? loader : loaderList[loaderIndex].value);
+ }
+
+ function init() {
+ var toolbar = document.getElementById('qunit-testrunner-toolbar');
+ if (!toolbar) {
+ setTimeout(init, 15);
+ return;
+ }
+ toolbar.appendChild(span1);
+ toolbar.appendChild(span2);
+
+ buildList.selectedIndex = (function() {
+ switch (build) {
+ case 'lodash': return 1;
+ case 'lodash-core-dev': return 2;
+ case 'lodash-core': return 3;
+ case 'lodash-dev':
+ case null: return 0;
+ }
+ return -1;
+ }());
+
+ loaderList.selectedIndex = (function() {
+ switch (loader) {
+ case 'curl': return 1;
+ case 'dojo': return 2;
+ case 'requirejs': return 3;
+ case 'none':
+ case null: return 0;
+ }
+ return -1;
+ }());
+
+ addListener(buildList, 'change', eventHandler);
+ addListener(loaderList, 'change', eventHandler);
+ }
+
+ var span1 = document.createElement('span');
+ span1.style.cssText = 'float:right';
+ span1.innerHTML =
+ '<label for="qunit-build">Build: </label>' +
+ '<select id="qunit-build">' +
+ '<option value="lodash-dev">lodash (development)</option>' +
+ '<option value="lodash">lodash (production)</option>' +
+ '<option value="lodash-core-dev">lodash-core (development)</option>' +
+ '<option value="lodash-core">lodash-core (production)</option>' +
+ '</select>';
+
+ var span2 = document.createElement('span');
+ span2.style.cssText = 'float:right';
+ span2.innerHTML =
+ '<label for="qunit-loader">Loader: </label>' +
+ '<select id="qunit-loader">' +
+ '<option value="none">None</option>' +
+ '<option value="curl">Curl</option>' +
+ '<option value="dojo">Dojo</option>' +
+ '<option value="requirejs">RequireJS</option>' +
+ '</select>';
+
+ var buildList = span1.lastChild,
+ loaderList = span2.lastChild;
+
+ setTimeout(function() {
+ ui.timing.loadEventEnd = +new Date;
+ }, 1);
+
+ init();
+ });
+
+ // The lodash build file path.
+ ui.buildPath = (function() {
+ var result;
+ switch (build) {
+ case 'lodash': result = 'dist/lodash.min.js'; break;
+ case 'lodash-core-dev': result = 'dist/lodash.core.js'; break;
+ case 'lodash-core': result = 'dist/lodash.core.min.js'; break;
+ case null: build = 'lodash-dev';
+ case 'lodash-dev': result = 'lodash.js'; break;
+ default: return build;
+ }
+ return basePath + result;
+ }());
+
+ // The module loader file path.
+ ui.loaderPath = (function() {
+ var result;
+ switch (loader) {
+ case 'curl': result = 'node_modules/curl-amd/dist/curl-kitchen-sink/curl.js'; break;
+ case 'dojo': result = 'node_modules/dojo/dojo.js'; break;
+ case 'requirejs': result = 'node_modules/requirejs/require.js'; break;
+ case null: loader = 'none'; return '';
+ default: return loader;
+ }
+ return basePath + result;
+ }());
+
+ // Used to indicate testing a core build.
+ ui.isCore = /\bcore(\.min)?\.js\b/.test(ui.buildPath);
+
+ // Used to indicate testing a foreign file.
+ ui.isForeign = RegExp('^(\\w+:)?//').test(build);
+
+ // Used to indicate testing a modularized build.
+ ui.isModularize = /\b(?:amd|commonjs|es|node|npm|(index|main)\.js)\b/.test([location.pathname, location.search]);
+
+ // Used to indicate testing in Sauce Labs' automated test cloud.
+ ui.isSauceLabs = location.port == '9001';
+
+ // Used to indicate that lodash is in strict mode.
+ ui.isStrict = /\bes\b/.test([location.pathname, location.search]);
+
+ ui.urlParams = { 'build': build, 'loader': loader };
+ ui.timing = { 'loadEventEnd': 0 };
+
+ window.ui = ui;
+
+}(this));
diff --git a/views/ngXosViews/serviceGrid/src/vendor/lodash/test/asset/worker.js b/views/ngXosViews/serviceGrid/src/vendor/lodash/test/asset/worker.js
new file mode 100644
index 0000000..8ccffa8
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/lodash/test/asset/worker.js
@@ -0,0 +1,15 @@
+self.console || (self.console = { 'log': function() {} });
+
+addEventListener('message', function(e) {
+ if (e.data) {
+ try {
+ importScripts('../' + e.data);
+ } catch (e) {
+ var lineNumber = e.lineNumber,
+ message = (lineNumber == null ? '' : (lineNumber + ': ')) + e.message;
+
+ self._ = { 'VERSION': message };
+ }
+ postMessage(_.VERSION);
+ }
+}, false);
diff --git a/views/ngXosViews/serviceGrid/src/vendor/lodash/test/backbone.html b/views/ngXosViews/serviceGrid/src/vendor/lodash/test/backbone.html
new file mode 100644
index 0000000..dd3df9f
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/lodash/test/backbone.html
@@ -0,0 +1,170 @@
+<!doctype html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+ <title>Backbone Test Suite</title>
+ <link rel="stylesheet" href="../node_modules/qunitjs/qunit/qunit.css">
+ </head>
+ <body>
+ <script>
+ // Avoid reporting tests to Sauce Labs when script errors occur.
+ if (location.port == '9001') {
+ window.onerror = function(message) {
+ if (window.QUnit) {
+ QUnit.config.done.length = 0;
+ }
+ global_test_results = { 'message': message };
+ };
+ }
+ </script>
+ <script src="../node_modules/qunitjs/qunit/qunit.js"></script>
+ <script src="../node_modules/qunit-extras/qunit-extras.js"></script>
+ <script src="../vendor/json-js/json2.js"></script>
+ <script src="../node_modules/platform/platform.js"></script>
+ <script src="./asset/test-ui.js"></script>
+ <script src="../lodash.js"></script>
+ <script>
+ QUnit.config.asyncRetries = 10;
+ QUnit.config.hidepassed = true;
+
+ var mixinPrereqs = (function() {
+ var aliasToReal = {
+ 'indexBy': 'keyBy',
+ 'invoke': 'invokeMap'
+ };
+
+ var keyMap = {
+ 'rest': 'tail'
+ };
+
+ var lodash = _.noConflict();
+
+ return function(_) {
+ lodash.defaultsDeep(_, { 'templateSettings': lodash.templateSettings });
+ lodash.mixin(_, lodash.pick(lodash, lodash.difference([
+ 'countBy',
+ 'debounce',
+ 'difference',
+ 'find',
+ 'findIndex',
+ 'findLastIndex',
+ 'groupBy',
+ 'includes',
+ 'invert',
+ 'invokeMap',
+ 'keyBy',
+ 'omit',
+ 'partition',
+ 'reduceRight',
+ 'reject',
+ 'sample',
+ 'without'
+ ], lodash.functions(_))));
+
+ lodash.forOwn(keyMap, function(realName, otherName) {
+ _[otherName] = lodash[realName];
+ _.prototype[otherName] = lodash.prototype[realName];
+ });
+
+ lodash.forOwn(aliasToReal, function(realName, alias) {
+ _[alias] = _[realName];
+ _.prototype[alias] = _.prototype[realName];
+ });
+ };
+ }());
+
+ // Load prerequisite scripts.
+ document.write(ui.urlParams.loader == 'none'
+ ? '<script src="' + ui.buildPath + '"><\/script>'
+ : '<script data-dojo-config="async:1" src="' + ui.loaderPath + '"><\/script>'
+ );
+ </script>
+ <script>
+ if (ui.urlParams.loader == 'none') {
+ mixinPrereqs(_);
+ document.write([
+ '<script src="../node_modules/jquery/dist/jquery.js"><\/script>',
+ '<script src="../vendor/backbone/backbone.js"><\/script>',
+ '<script src="../vendor/backbone/test/setup/dom-setup.js"><\/script>',
+ '<script src="../vendor/backbone/test/setup/environment.js"><\/script>',
+ '<script src="../vendor/backbone/test/noconflict.js"><\/script>',
+ '<script src="../vendor/backbone/test/events.js"><\/script>',
+ '<script src="../vendor/backbone/test/model.js"><\/script>',
+ '<script src="../vendor/backbone/test/collection.js"><\/script>',
+ '<script src="../vendor/backbone/test/router.js"><\/script>',
+ '<script src="../vendor/backbone/test/view.js"><\/script>',
+ '<script src="../vendor/backbone/test/sync.js"><\/script>'
+ ].join('\n'));
+ }
+ </script>
+ <script>
+ (function() {
+ if (window.curl) {
+ curl.config({ 'apiName': 'require' });
+ }
+ if (!window.require) {
+ return;
+ }
+ var reBasename = /[\w.-]+$/,
+ basePath = ('//' + location.host + location.pathname.replace(reBasename, '')).replace(/\btest\/$/, ''),
+ modulePath = ui.buildPath.replace(/\.js$/, ''),
+ locationPath = modulePath.replace(reBasename, '').replace(/^\/|\/$/g, ''),
+ moduleMain = modulePath.match(reBasename)[0],
+ uid = +new Date;
+
+ function getConfig() {
+ var result = {
+ 'baseUrl': './',
+ 'urlArgs': 't=' + uid++,
+ 'waitSeconds': 0,
+ 'paths': {
+ 'backbone': '../vendor/backbone/backbone',
+ 'jquery': '../node_modules/jquery/dist/jquery'
+ },
+ 'packages': [{
+ 'name': 'test',
+ 'location': '../vendor/backbone/test',
+ 'config': {
+ // Work around no global being exported.
+ 'exports': 'QUnit',
+ 'loader': 'curl/loader/legacy'
+ }
+ }]
+ };
+
+ if (ui.isModularize) {
+ result.packages.push({
+ 'name': 'underscore',
+ 'location': locationPath,
+ 'main': moduleMain
+ });
+ } else {
+ result.paths.underscore = modulePath;
+ }
+ return result;
+ }
+
+ QUnit.config.autostart = false;
+
+ require(getConfig(), ['underscore'], function(lodash) {
+ mixinPrereqs(lodash);
+ require(getConfig(), ['backbone'], function() {
+ require(getConfig(), [
+ 'test/setup/dom-setup',
+ 'test/setup/environment',
+ 'test/noconflict',
+ 'test/events',
+ 'test/model',
+ 'test/collection',
+ 'test/router',
+ 'test/view',
+ 'test/sync'
+ ], function() {
+ QUnit.start();
+ });
+ });
+ });
+ }());
+ </script>
+ </body>
+</html>
diff --git a/views/ngXosViews/serviceGrid/src/vendor/lodash/test/fp.html b/views/ngXosViews/serviceGrid/src/vendor/lodash/test/fp.html
new file mode 100644
index 0000000..7122966
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/lodash/test/fp.html
@@ -0,0 +1,41 @@
+<!doctype html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+ <title>lodash-fp Test Suite</title>
+ <link rel="stylesheet" href="../node_modules/qunitjs/qunit/qunit.css">
+ </head>
+ <body>
+ <script>
+ // Avoid reporting tests to Sauce Labs when script errors occur.
+ if (location.port == '9001') {
+ window.onerror = function(message) {
+ if (window.QUnit) {
+ QUnit.config.done.length = 0;
+ }
+ global_test_results = { 'message': message };
+ };
+ }
+ </script>
+ <script src="../lodash.js"></script>
+ <script src="../dist/lodash.fp.js"></script>
+ <script src="../dist/mapping.fp.js"></script>
+ <script src="../node_modules/qunitjs/qunit/qunit.js"></script>
+ <script src="../node_modules/qunit-extras/qunit-extras.js"></script>
+ <script src="../node_modules/platform/platform.js"></script>
+ <script src="./test-fp.js"></script>
+ <div id="qunit"></div>
+ <script>
+ // Set a more readable browser name.
+ window.onload = function() {
+ var timeoutId = setInterval(function() {
+ var ua = document.getElementById('qunit-userAgent');
+ if (ua) {
+ ua.innerHTML = platform;
+ clearInterval(timeoutId);
+ }
+ }, 16);
+ };
+ </script>
+ </body>
+</html>
diff --git a/views/ngXosViews/serviceGrid/src/vendor/lodash/test/index.html b/views/ngXosViews/serviceGrid/src/vendor/lodash/test/index.html
new file mode 100644
index 0000000..aee3942
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/lodash/test/index.html
@@ -0,0 +1,351 @@
+<!doctype html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+ <title>lodash Test Suite</title>
+ <link rel="stylesheet" href="../node_modules/qunitjs/qunit/qunit.css">
+ <style>
+ #exports, #module {
+ display: none;
+ }
+ </style>
+ </head>
+ <body>
+ <script>
+ // Avoid reporting tests to Sauce Labs when script errors occur.
+ if (location.port == '9001') {
+ window.onerror = function(message) {
+ if (window.QUnit) {
+ QUnit.config.done.length = 0;
+ }
+ global_test_results = { 'message': message };
+ };
+ }
+ </script>
+ <script src="../node_modules/lodash/lodash.js"></script>
+ <script>var lodashStable = _.noConflict();</script>
+ <script src="../node_modules/qunitjs/qunit/qunit.js"></script>
+ <script src="../node_modules/qunit-extras/qunit-extras.js"></script>
+ <script src="../node_modules/platform/platform.js"></script>
+ <script src="./asset/test-ui.js"></script>
+ <div id="qunit"></div>
+ <div id="exports"></div>
+ <div id="module"></div>
+ <script>
+ function setProperty(object, key, value) {
+ try {
+ Object.defineProperty(object, key, {
+ 'configurable': true,
+ 'enumerable': false,
+ 'writable': true,
+ 'value': value
+ });
+ } catch (e) {
+ object[key] = value;
+ }
+ return object;
+ }
+
+ function addBizarroMethods() {
+ var funcProto = Function.prototype,
+ objectProto = Object.prototype;
+
+ var hasOwnProperty = objectProto.hasOwnProperty,
+ fnToString = funcProto.toString,
+ nativeString = fnToString.call(objectProto.toString),
+ noop = function() {},
+ propertyIsEnumerable = objectProto.propertyIsEnumerable,
+ reToString = /toString/g;
+
+ function constant(value) {
+ return function() {
+ return value;
+ };
+ }
+
+ function createToString(funcName) {
+ return constant(nativeString.replace(reToString, funcName));
+ }
+
+ // Allow bypassing native checks.
+ setProperty(funcProto, 'toString', (function() {
+ function wrapper() {
+ setProperty(funcProto, 'toString', fnToString);
+ var result = hasOwnProperty.call(this, 'toString') ? this.toString() : fnToString.call(this);
+ setProperty(funcProto, 'toString', wrapper);
+ return result;
+ }
+ return wrapper;
+ }()));
+
+ // Add prototype extensions.
+ funcProto._method = noop;
+
+ // Set bad shims.
+ setProperty(Object, '_create', Object.create);
+ setProperty(Object, 'create', (function() {
+ function object() {}
+ return function(prototype) {
+ if (prototype === Object(prototype)) {
+ object.prototype = prototype;
+ var result = new object;
+ object.prototype = undefined;
+ }
+ return result || {};
+ };
+ }()));
+
+ setProperty(Object, '_getOwnPropertySymbols', Object.getOwnPropertySymbols);
+ setProperty(Object, 'getOwnPropertySymbols', undefined);
+
+ setProperty(objectProto, '_propertyIsEnumerable', propertyIsEnumerable);
+ setProperty(objectProto, 'propertyIsEnumerable', function(key) {
+ return !(key == 'valueOf' && this && this.valueOf === 1) && _propertyIsEnumerable.call(this, key);
+ });
+
+ setProperty(window, '_Map', window.Map);
+ if (_Map) {
+ setProperty(window, 'Map', (function(Map) {
+ var count = 0;
+ return function() {
+ if (count++) {
+ return new Map;
+ }
+ var result = {};
+ setProperty(window, 'Map', Map);
+ return result;
+ };
+ }(_Map)));
+
+ setProperty(Map, 'toString', createToString('Map'));
+ }
+ setProperty(window, '_Promise', window.Promise);
+ setProperty(window, 'Promise', noop);
+
+ setProperty(window, '_Set', window.Set);
+ setProperty(window, 'Set', noop);
+
+ setProperty(window, '_Symbol', window.Symbol);
+ setProperty(window, 'Symbol', undefined);
+
+ setProperty(window, '_WeakMap', window.WeakMap);
+ setProperty(window, 'WeakMap', noop);
+
+ // Fake `WinRTError`.
+ setProperty(window, 'WinRTError', Error);
+
+ // Fake free variable `global`.
+ setProperty(window, 'exports', window);
+ setProperty(window, 'global', window);
+ setProperty(window, 'module', {});
+ }
+
+ function removeBizarroMethods() {
+ var funcProto = Function.prototype,
+ objectProto = Object.prototype;
+
+ setProperty(objectProto, 'propertyIsEnumerable', objectProto._propertyIsEnumerable);
+
+ if (Object._create) {
+ Object.create = Object._create;
+ } else {
+ delete Object.create;
+ }
+ if (Object._getOwnPropertySymbols) {
+ Object.getOwnPropertySymbols = Object._getOwnPropertySymbols;
+ } else {
+ delete Object.getOwnPropertySymbols;
+ }
+ if (_Map) {
+ Map = _Map;
+ } else {
+ setProperty(window, 'Map', undefined);
+ }
+ if (_Promise) {
+ Promise = _Promise;
+ } else {
+ setProperty(window, 'Promise', undefined);
+ }
+ if (_Set) {
+ Set = _Set;
+ } else {
+ setProperty(window, 'Set', undefined);
+ }
+ if (_Symbol) {
+ Symbol = _Symbol;
+ }
+ if (_WeakMap) {
+ WeakMap = _WeakMap;
+ } else {
+ setProperty(window, 'WeakMap', undefined);
+ }
+ setProperty(window, '_Map', undefined);
+ setProperty(window, '_Promise', undefined);
+ setProperty(window, '_Set', undefined);
+ setProperty(window, '_Symbol', undefined);
+ setProperty(window, '_WeakMap', undefined);
+
+ setProperty(window, 'WinRTError', undefined);
+
+ setProperty(window, 'exports', document.getElementById('exports'));
+ setProperty(window, 'global', undefined);
+ setProperty(window, 'module', document.getElementById('module'));
+
+ delete funcProto._method;
+ delete Object._create;
+ delete Object._getOwnPropertySymbols;
+ delete objectProto._propertyIsEnumerable;
+ }
+
+ // Load lodash to expose it to the bad extensions/shims.
+ if (!ui.isModularize) {
+ addBizarroMethods();
+ document.write('<script src="' + ui.buildPath + '"><\/script>');
+ }
+ </script>
+ <script>
+ // Store lodash to test for bad extensions/shims.
+ if (!ui.isModularize) {
+ var lodashBizarro = window._;
+ window._ = undefined;
+ removeBizarroMethods();
+ }
+ // Load test scripts.
+ document.write((ui.isForeign || ui.urlParams.loader == 'none')
+ ? '<script src="' + ui.buildPath + '"><\/script><script src="test.js"><\/script>'
+ : '<script data-dojo-config="async:1" src="' + ui.loaderPath + '"><\/script>'
+ );
+ </script>
+ <script>
+ var lodashModule,
+ shimmedModule,
+ underscoreModule;
+
+ (function() {
+ if (window.curl) {
+ curl.config({ 'apiName': 'require' });
+ }
+ if (ui.isForeign || !window.require) {
+ return;
+ }
+ var reBasename = /[\w.-]+$/,
+ basePath = ('//' + location.host + location.pathname.replace(reBasename, '')).replace(/\btest\/$/, ''),
+ modulePath = ui.buildPath.replace(/\.js$/, ''),
+ moduleMain = modulePath.match(reBasename)[0],
+ locationPath = modulePath.replace(reBasename, '').replace(/^\/|\/$/g, ''),
+ shimmedLocationPath = './abc/../' + locationPath,
+ underscoreLocationPath = './xyz/../' + locationPath,
+ uid = +new Date;
+
+ function getConfig() {
+ var result = {
+ 'baseUrl': './',
+ 'urlArgs': 't=' + uid++,
+ 'waitSeconds': 0,
+ 'paths': {},
+ 'packages': [{
+ 'name': 'test',
+ 'location': basePath + 'test',
+ 'main': 'test',
+ 'config': {
+ // Work around no global being exported.
+ 'exports': 'QUnit',
+ 'loader': 'curl/loader/legacy'
+ }
+ }],
+ 'shim': {
+ 'shimmed': {
+ 'exports': '_'
+ }
+ }
+ };
+
+ if (ui.isModularize) {
+ result.packages.push({
+ 'name': 'lodash',
+ 'location': locationPath,
+ 'main': moduleMain
+ }, {
+ 'name': 'shimmed',
+ 'location': shimmedLocationPath,
+ 'main': moduleMain
+ }, {
+ 'name': 'underscore',
+ 'location': underscoreLocationPath,
+ 'main': moduleMain
+ });
+ } else {
+ result.paths.lodash = modulePath;
+ result.paths.shimmed = shimmedLocationPath + '/' + moduleMain;
+ result.paths.underscore = underscoreLocationPath + '/' + moduleMain;
+ }
+ return result;
+ }
+
+ function loadTests() {
+ require(getConfig(), ['test'], function() {
+ QUnit.start();
+ });
+ }
+
+ function loadModulesAndTests() {
+ require(getConfig(), ['lodash', 'shimmed', 'underscore'], function(lodash, shimmed, underscore) {
+ lodashModule = lodash;
+ lodashModule.moduleName = 'lodash';
+
+ if (shimmed) {
+ shimmedModule = shimmed.result(shimmed, 'noConflict') || shimmed;
+ shimmedModule.moduleName = 'shimmed';
+ }
+ if (underscore) {
+ underscoreModule = underscore.result(underscore, 'noConflict') || underscore;
+ underscoreModule.moduleName = 'underscore';
+ }
+ window._ = lodash;
+
+ if (ui.isModularize) {
+ require(getConfig(), [
+ 'lodash/_baseEach',
+ 'lodash/_isIndex',
+ 'lodash/_isIterateeCall'
+ ], function(baseEach, isIndex, isIterateeCall) {
+ lodash._baseEach = baseEach;
+ lodash._isIndex = isIndex;
+ lodash._isIterateeCall = isIterateeCall;
+ loadTests();
+ });
+ } else {
+ loadTests();
+ }
+ });
+ }
+
+ QUnit.config.autostart = false;
+
+ if (window.requirejs) {
+ addBizarroMethods();
+ require(getConfig(), ['lodash'], function(lodash) {
+ lodashBizarro = lodash.result(lodash, 'noConflict') || lodash;
+ delete requirejs.s.contexts._;
+
+ removeBizarroMethods();
+ loadModulesAndTests();
+ });
+ } else {
+ loadModulesAndTests();
+ }
+ }());
+
+ // Set a more readable browser name.
+ window.onload = function() {
+ var timeoutId = setInterval(function() {
+ var ua = document.getElementById('qunit-userAgent');
+ if (ua) {
+ ua.innerHTML = platform;
+ clearInterval(timeoutId);
+ }
+ }, 16);
+ };
+ </script>
+ </body>
+</html>
diff --git a/views/ngXosViews/serviceGrid/src/vendor/lodash/test/remove.js b/views/ngXosViews/serviceGrid/src/vendor/lodash/test/remove.js
new file mode 100644
index 0000000..bd5aaf9
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/lodash/test/remove.js
@@ -0,0 +1,27 @@
+#!/usr/bin/env node
+'use strict';
+
+var _ = require('../lodash'),
+ fs = require('fs'),
+ path = require('path');
+
+var args = (args = process.argv)
+ .slice((args[0] === process.execPath || args[0] === 'node') ? 2 : 0);
+
+var filePath = path.resolve(args[1]),
+ reLine = /.*/gm;
+
+var pattern = (function() {
+ var result = args[0],
+ delimiter = result.charAt(0),
+ lastIndex = result.lastIndexOf(delimiter);
+
+ return RegExp(result.slice(1, lastIndex), result.slice(lastIndex + 1));
+}());
+
+/*----------------------------------------------------------------------------*/
+
+fs.writeFileSync(filePath, fs.readFileSync(filePath, 'utf8').replace(pattern, function(match) {
+ var snippet = _.slice(arguments, -3, -2)[0];
+ return match.replace(snippet, snippet.replace(reLine, ''));
+}));
diff --git a/views/ngXosViews/serviceGrid/src/vendor/lodash/test/saucelabs.js b/views/ngXosViews/serviceGrid/src/vendor/lodash/test/saucelabs.js
new file mode 100644
index 0000000..d10a313
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/lodash/test/saucelabs.js
@@ -0,0 +1,914 @@
+#!/usr/bin/env node
+'use strict';
+
+/** Environment shortcut. */
+var env = process.env;
+
+if (env.TRAVIS_SECURE_ENV_VARS == 'false') {
+ console.log('Skipping Sauce Labs jobs; secure environment variables are unavailable');
+ process.exit(0);
+}
+
+/** Load Node.js modules. */
+var EventEmitter = require('events').EventEmitter,
+ http = require('http'),
+ path = require('path'),
+ url = require('url'),
+ util = require('util');
+
+/** Load other modules. */
+var _ = require('../lodash.js'),
+ chalk = require('chalk'),
+ ecstatic = require('ecstatic'),
+ request = require('request'),
+ SauceTunnel = require('sauce-tunnel');
+
+/** Used for Sauce Labs credentials. */
+var accessKey = env.SAUCE_ACCESS_KEY,
+ username = env.SAUCE_USERNAME;
+
+/** Used as the default maximum number of times to retry a job and tunnel. */
+var maxJobRetries = 3,
+ maxTunnelRetries = 3;
+
+/** Used as the static file server middleware. */
+var mount = ecstatic({
+ 'cache': 'no-cache',
+ 'root': process.cwd()
+});
+
+/** Used as the list of ports supported by Sauce Connect. */
+var ports = [
+ 80, 443, 888, 2000, 2001, 2020, 2109, 2222, 2310, 3000, 3001, 3030, 3210,
+ 3333, 4000, 4001, 4040, 4321, 4502, 4503, 4567, 5000, 5001, 5050, 5555, 5432,
+ 6000, 6001, 6060, 6666, 6543, 7000, 7070, 7774, 7777, 8000, 8001, 8003, 8031,
+ 8080, 8081, 8765, 8777, 8888, 9000, 9001, 9080, 9090, 9876, 9877, 9999, 49221,
+ 55001
+];
+
+/** Used by `logInline` to clear previously logged messages. */
+var prevLine = '';
+
+/** Method shortcut. */
+var push = Array.prototype.push;
+
+/** Used to detect error messages. */
+var reError = /(?:\be|E)rror\b/;
+
+/** Used to detect valid job ids. */
+var reJobId = /^[a-z0-9]{32}$/;
+
+/** Used to display the wait throbber. */
+var throbberDelay = 500,
+ waitCount = -1;
+
+/**
+ * Used as Sauce Labs config values.
+ * See the [Sauce Labs documentation](https://docs.saucelabs.com/reference/test-configuration/)
+ * for more details.
+ */
+var advisor = getOption('advisor', false),
+ build = getOption('build', (env.TRAVIS_COMMIT || '').slice(0, 10)),
+ commandTimeout = getOption('commandTimeout', 90),
+ compatMode = getOption('compatMode', null),
+ customData = Function('return {' + getOption('customData', '').replace(/^\{|}$/g, '') + '}')(),
+ deviceOrientation = getOption('deviceOrientation', 'portrait'),
+ framework = getOption('framework', 'qunit'),
+ idleTimeout = getOption('idleTimeout', 60),
+ jobName = getOption('name', 'unit tests'),
+ maxDuration = getOption('maxDuration', 180),
+ port = ports[Math.min(_.sortedIndex(ports, getOption('port', 9001)), ports.length - 1)],
+ publicAccess = getOption('public', true),
+ queueTimeout = getOption('queueTimeout', 240),
+ recordVideo = getOption('recordVideo', true),
+ recordScreenshots = getOption('recordScreenshots', false),
+ runner = getOption('runner', 'test/index.html').replace(/^\W+/, ''),
+ runnerUrl = getOption('runnerUrl', 'http://localhost:' + port + '/' + runner),
+ statusInterval = getOption('statusInterval', 5),
+ tags = getOption('tags', []),
+ throttled = getOption('throttled', 10),
+ tunneled = getOption('tunneled', true),
+ tunnelId = getOption('tunnelId', 'tunnel_' + (env.TRAVIS_JOB_ID || 0)),
+ tunnelTimeout = getOption('tunnelTimeout', 120),
+ videoUploadOnPass = getOption('videoUploadOnPass', false);
+
+/** Used to convert Sauce Labs browser identifiers to their formal names. */
+var browserNameMap = {
+ 'googlechrome': 'Chrome',
+ 'iehta': 'Internet Explorer',
+ 'ipad': 'iPad',
+ 'iphone': 'iPhone',
+ 'microsoftedge': 'Edge'
+};
+
+/** List of platforms to load the runner on. */
+var platforms = [
+ ['Linux', 'android', '5.1'],
+ ['Windows 10', 'chrome', '49'],
+ ['Windows 10', 'chrome', '48'],
+ ['Windows 10', 'firefox', '45'],
+ ['Windows 10', 'firefox', '44'],
+ ['Windows 10', 'microsoftedge', '13'],
+ ['Windows 10', 'internet explorer', '11'],
+ ['Windows 8', 'internet explorer', '10'],
+ ['Windows 7', 'internet explorer', '9'],
+ // ['OS X 10.10', 'ipad', '9.1'],
+ ['OS X 10.11', 'safari', '9'],
+ ['OS X 10.10', 'safari', '8']
+];
+
+/** Used to tailor the `platforms` array. */
+var isAMD = _.includes(tags, 'amd'),
+ isBackbone = _.includes(tags, 'backbone'),
+ isModern = _.includes(tags, 'modern');
+
+// The platforms to test IE compatibility modes.
+if (compatMode) {
+ platforms = [
+ ['Windows 10', 'internet explorer', '11'],
+ ['Windows 8', 'internet explorer', '10'],
+ ['Windows 7', 'internet explorer', '9'],
+ ['Windows 7', 'internet explorer', '8']
+ ];
+}
+// The platforms for AMD tests.
+if (isAMD) {
+ platforms = _.filter(platforms, function(platform) {
+ var browser = browserName(platform[1]),
+ version = +platform[2];
+
+ switch (browser) {
+ case 'Android': return version >= 4.4;
+ case 'Opera': return version >= 10;
+ }
+ return true;
+ });
+}
+// The platforms for Backbone tests.
+if (isBackbone) {
+ platforms = _.filter(platforms, function(platform) {
+ var browser = browserName(platform[1]),
+ version = +platform[2];
+
+ switch (browser) {
+ case 'Firefox': return version >= 4;
+ case 'Internet Explorer': return version >= 7;
+ case 'iPad': return version >= 5;
+ case 'Opera': return version >= 12;
+ }
+ return true;
+ });
+}
+// The platforms for modern builds.
+if (isModern) {
+ platforms = _.filter(platforms, function(platform) {
+ var browser = browserName(platform[1]),
+ version = +platform[2];
+
+ switch (browser) {
+ case 'Android': return version >= 4.1;
+ case 'Firefox': return version >= 10;
+ case 'Internet Explorer': return version >= 9;
+ case 'iPad': return version >= 6;
+ case 'Opera': return version >= 12;
+ case 'Safari': return version >= 6;
+ }
+ return true;
+ });
+}
+
+/** Used as the default `Job` options object. */
+var jobOptions = {
+ 'build': build,
+ 'command-timeout': commandTimeout,
+ 'custom-data': customData,
+ 'device-orientation': deviceOrientation,
+ 'framework': framework,
+ 'idle-timeout': idleTimeout,
+ 'max-duration': maxDuration,
+ 'name': jobName,
+ 'public': publicAccess,
+ 'platforms': platforms,
+ 'record-screenshots': recordScreenshots,
+ 'record-video': recordVideo,
+ 'sauce-advisor': advisor,
+ 'tags': tags,
+ 'url': runnerUrl,
+ 'video-upload-on-pass': videoUploadOnPass
+};
+
+if (publicAccess === true) {
+ jobOptions['public'] = 'public';
+}
+if (tunneled) {
+ jobOptions['tunnel-identifier'] = tunnelId;
+}
+
+/*----------------------------------------------------------------------------*/
+
+/**
+ * Resolves the formal browser name for a given Sauce Labs browser identifier.
+ *
+ * @private
+ * @param {string} identifier The browser identifier.
+ * @returns {string} Returns the formal browser name.
+ */
+function browserName(identifier) {
+ return browserNameMap[identifier] || _.startCase(identifier);
+}
+
+/**
+ * Gets the value for the given option name. If no value is available the
+ * `defaultValue` is returned.
+ *
+ * @private
+ * @param {string} name The name of the option.
+ * @param {*} defaultValue The default option value.
+ * @returns {*} Returns the option value.
+ */
+function getOption(name, defaultValue) {
+ var isArr = _.isArray(defaultValue);
+ return _.reduce(process.argv, function(result, value) {
+ if (isArr) {
+ value = optionToArray(name, value);
+ return _.isEmpty(value) ? result : value;
+ }
+ value = optionToValue(name, value);
+
+ return value == null ? result : value;
+ }, defaultValue);
+}
+
+/**
+ * Checks if `value` is a job ID.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a job ID, else `false`.
+ */
+function isJobId(value) {
+ return reJobId.test(value);
+}
+
+/**
+ * Writes an inline message to standard output.
+ *
+ * @private
+ * @param {string} [text=''] The text to log.
+ */
+function logInline(text) {
+ var blankLine = _.repeat(' ', _.size(prevLine));
+ prevLine = text = _.truncate(text, { 'length': 40 });
+ process.stdout.write(text + blankLine.slice(text.length) + '\r');
+}
+
+/**
+ * Writes the wait throbber to standard output.
+ *
+ * @private
+ */
+function logThrobber() {
+ logInline('Please wait' + _.repeat('.', (++waitCount % 3) + 1));
+}
+
+/**
+ * Converts a comma separated option value into an array.
+ *
+ * @private
+ * @param {string} name The name of the option to inspect.
+ * @param {string} string The options string.
+ * @returns {Array} Returns the new converted array.
+ */
+function optionToArray(name, string) {
+ return _.compact(_.invokeMap((optionToValue(name, string) || '').split(/, */), 'trim'));
+}
+
+/**
+ * Extracts the option value from an option string.
+ *
+ * @private
+ * @param {string} name The name of the option to inspect.
+ * @param {string} string The options string.
+ * @returns {string|undefined} Returns the option value, else `undefined`.
+ */
+function optionToValue(name, string) {
+ var result = string.match(RegExp('^' + name + '(?:=([\\s\\S]+))?$'));
+ if (result) {
+ result = _.result(result, 1);
+ result = result ? _.trim(result) : true;
+ }
+ if (result === 'false') {
+ return false;
+ }
+ return result || undefined;
+}
+
+/*----------------------------------------------------------------------------*/
+
+/**
+ * The `Job#remove` and `Tunnel#stop` callback used by `Jobs#restart`
+ * and `Tunnel#restart` respectively.
+ *
+ * @private
+ */
+function onGenericRestart() {
+ this.restarting = false;
+ this.emit('restart');
+ this.start();
+}
+
+/**
+ * The `request.put` and `SauceTunnel#stop` callback used by `Jobs#stop`
+ * and `Tunnel#stop` respectively.
+ *
+ * @private
+ * @param {Object} [error] The error object.
+ */
+function onGenericStop(error) {
+ this.running = this.stopping = false;
+ this.emit('stop', error);
+}
+
+/**
+ * The `request.del` callback used by `Jobs#remove`.
+ *
+ * @private
+ */
+function onJobRemove(error, res, body) {
+ this.id = this.taskId = this.url = null;
+ this.removing = false;
+ this.emit('remove');
+}
+
+/**
+ * The `Job#remove` callback used by `Jobs#reset`.
+ *
+ * @private
+ */
+function onJobReset() {
+ this.attempts = 0;
+ this.failed = this.resetting = false;
+ this._pollerId = this.id = this.result = this.taskId = this.url = null;
+ this.emit('reset');
+}
+
+/**
+ * The `request.post` callback used by `Jobs#start`.
+ *
+ * @private
+ * @param {Object} [error] The error object.
+ * @param {Object} res The response data object.
+ * @param {Object} body The response body JSON object.
+ */
+function onJobStart(error, res, body) {
+ this.starting = false;
+
+ if (this.stopping) {
+ return;
+ }
+ var statusCode = _.result(res, 'statusCode'),
+ taskId = _.first(_.result(body, 'js tests'));
+
+ if (error || !taskId || statusCode != 200) {
+ if (this.attempts < this.retries) {
+ this.restart();
+ return;
+ }
+ var na = 'unavailable',
+ bodyStr = _.isObject(body) ? '\n' + JSON.stringify(body) : na,
+ statusStr = _.isFinite(statusCode) ? statusCode : na;
+
+ logInline();
+ console.error('Failed to start job; status: %s, body: %s', statusStr, bodyStr);
+ if (error) {
+ console.error(error);
+ }
+ this.failed = true;
+ this.emit('complete');
+ return;
+ }
+ this.running = true;
+ this.taskId = taskId;
+ this.timestamp = _.now();
+ this.emit('start');
+ this.status();
+}
+
+/**
+ * The `request.post` callback used by `Job#status`.
+ *
+ * @private
+ * @param {Object} [error] The error object.
+ * @param {Object} res The response data object.
+ * @param {Object} body The response body JSON object.
+ */
+function onJobStatus(error, res, body) {
+ this.checking = false;
+
+ if (!this.running || this.stopping) {
+ return;
+ }
+ var completed = _.result(body, 'completed', false),
+ data = _.first(_.result(body, 'js tests')),
+ elapsed = (_.now() - this.timestamp) / 1000,
+ jobId = _.result(data, 'job_id', null),
+ jobResult = _.result(data, 'result', null),
+ jobStatus = _.result(data, 'status', ''),
+ jobUrl = _.result(data, 'url', null),
+ expired = (elapsed >= queueTimeout && !_.includes(jobStatus, 'in progress')),
+ options = this.options,
+ platform = options.platforms[0];
+
+ if (_.isObject(jobResult)) {
+ var message = _.result(jobResult, 'message');
+ } else {
+ if (typeof jobResult == 'string') {
+ message = jobResult;
+ }
+ jobResult = null;
+ }
+ if (isJobId(jobId)) {
+ this.id = jobId;
+ this.result = jobResult;
+ this.url = jobUrl;
+ } else {
+ completed = false;
+ }
+ this.emit('status', jobStatus);
+
+ if (!completed && !expired) {
+ this._pollerId = _.delay(_.bind(this.status, this), this.statusInterval * 1000);
+ return;
+ }
+ var description = browserName(platform[1]) + ' ' + platform[2] + ' on ' + _.startCase(platform[0]),
+ errored = !jobResult || !jobResult.passed || reError.test(message) || reError.test(jobStatus),
+ failures = _.result(jobResult, 'failed'),
+ label = options.name + ':',
+ tunnel = this.tunnel;
+
+ if (errored || failures) {
+ if (errored && this.attempts < this.retries) {
+ this.restart();
+ return;
+ }
+ var details = 'See ' + jobUrl + ' for details.';
+ this.failed = true;
+
+ logInline();
+ if (failures) {
+ console.error(label + ' %s ' + chalk.red('failed') + ' %d test' + (failures > 1 ? 's' : '') + '. %s', description, failures, details);
+ }
+ else if (tunnel.attempts < tunnel.retries) {
+ tunnel.restart();
+ return;
+ }
+ else {
+ if (typeof message == 'undefined') {
+ message = 'Results are unavailable. ' + details;
+ }
+ console.error(label, description, chalk.red('failed') + ';', message);
+ }
+ }
+ else {
+ logInline();
+ console.log(label, description, chalk.green('passed'));
+ }
+ this.running = false;
+ this.emit('complete');
+}
+
+/**
+ * The `SauceTunnel#start` callback used by `Tunnel#start`.
+ *
+ * @private
+ * @param {boolean} success The connection success indicator.
+ */
+function onTunnelStart(success) {
+ this.starting = false;
+
+ if (this._timeoutId) {
+ clearTimeout(this._timeoutId);
+ this._timeoutId = null;
+ }
+ if (!success) {
+ if (this.attempts < this.retries) {
+ this.restart();
+ return;
+ }
+ logInline();
+ console.error('Failed to open Sauce Connect tunnel');
+ process.exit(2);
+ }
+ logInline();
+ console.log('Sauce Connect tunnel opened');
+
+ var jobs = this.jobs;
+ push.apply(jobs.queue, jobs.all);
+
+ this.running = true;
+ this.emit('start');
+
+ console.log('Starting jobs...');
+ this.dequeue();
+}
+
+/*----------------------------------------------------------------------------*/
+
+/**
+ * The Job constructor.
+ *
+ * @private
+ * @param {Object} [properties] The properties to initialize a job with.
+ */
+function Job(properties) {
+ EventEmitter.call(this);
+
+ this.options = {};
+ _.merge(this, properties);
+ _.defaults(this.options, _.cloneDeep(jobOptions));
+
+ this.attempts = 0;
+ this.checking = this.failed = this.removing = this.resetting = this.restarting = this.running = this.starting = this.stopping = false;
+ this._pollerId = this.id = this.result = this.taskId = this.url = null;
+}
+
+util.inherits(Job, EventEmitter);
+
+/**
+ * Removes the job.
+ *
+ * @memberOf Job
+ * @param {Function} callback The function called once the job is removed.
+ * @param {Object} Returns the job instance.
+ */
+Job.prototype.remove = function(callback) {
+ this.once('remove', _.iteratee(callback));
+ if (this.removing) {
+ return this;
+ }
+ this.removing = true;
+ return this.stop(function() {
+ var onRemove = _.bind(onJobRemove, this);
+ if (!this.id) {
+ _.defer(onRemove);
+ return;
+ }
+ request.del(_.template('https://saucelabs.com/rest/v1/${user}/jobs/${id}')(this), {
+ 'auth': { 'user': this.user, 'pass': this.pass }
+ }, onRemove);
+ });
+};
+
+/**
+ * Resets the job.
+ *
+ * @memberOf Job
+ * @param {Function} callback The function called once the job is reset.
+ * @param {Object} Returns the job instance.
+ */
+Job.prototype.reset = function(callback) {
+ this.once('reset', _.iteratee(callback));
+ if (this.resetting) {
+ return this;
+ }
+ this.resetting = true;
+ return this.remove(onJobReset);
+};
+
+/**
+ * Restarts the job.
+ *
+ * @memberOf Job
+ * @param {Function} callback The function called once the job is restarted.
+ * @param {Object} Returns the job instance.
+ */
+Job.prototype.restart = function(callback) {
+ this.once('restart', _.iteratee(callback));
+ if (this.restarting) {
+ return this;
+ }
+ this.restarting = true;
+
+ var options = this.options,
+ platform = options.platforms[0],
+ description = browserName(platform[1]) + ' ' + platform[2] + ' on ' + _.startCase(platform[0]),
+ label = options.name + ':';
+
+ logInline();
+ console.log('%s %s restart %d of %d', label, description, ++this.attempts, this.retries);
+
+ return this.remove(onGenericRestart);
+};
+
+/**
+ * Starts the job.
+ *
+ * @memberOf Job
+ * @param {Function} callback The function called once the job is started.
+ * @param {Object} Returns the job instance.
+ */
+Job.prototype.start = function(callback) {
+ this.once('start', _.iteratee(callback));
+ if (this.starting || this.running) {
+ return this;
+ }
+ this.starting = true;
+ request.post(_.template('https://saucelabs.com/rest/v1/${user}/js-tests')(this), {
+ 'auth': { 'user': this.user, 'pass': this.pass },
+ 'json': this.options
+ }, _.bind(onJobStart, this));
+
+ return this;
+};
+
+/**
+ * Checks the status of a job.
+ *
+ * @memberOf Job
+ * @param {Function} callback The function called once the status is resolved.
+ * @param {Object} Returns the job instance.
+ */
+Job.prototype.status = function(callback) {
+ this.once('status', _.iteratee(callback));
+ if (this.checking || this.removing || this.resetting || this.restarting || this.starting || this.stopping) {
+ return this;
+ }
+ this._pollerId = null;
+ this.checking = true;
+ request.post(_.template('https://saucelabs.com/rest/v1/${user}/js-tests/status')(this), {
+ 'auth': { 'user': this.user, 'pass': this.pass },
+ 'json': { 'js tests': [this.taskId] }
+ }, _.bind(onJobStatus, this));
+
+ return this;
+};
+
+/**
+ * Stops the job.
+ *
+ * @memberOf Job
+ * @param {Function} callback The function called once the job is stopped.
+ * @param {Object} Returns the job instance.
+ */
+Job.prototype.stop = function(callback) {
+ this.once('stop', _.iteratee(callback));
+ if (this.stopping) {
+ return this;
+ }
+ this.stopping = true;
+ if (this._pollerId) {
+ clearTimeout(this._pollerId);
+ this._pollerId = null;
+ this.checking = false;
+ }
+ var onStop = _.bind(onGenericStop, this);
+ if (!this.running || !this.id) {
+ _.defer(onStop);
+ return this;
+ }
+ request.put(_.template('https://saucelabs.com/rest/v1/${user}/jobs/${id}/stop')(this), {
+ 'auth': { 'user': this.user, 'pass': this.pass }
+ }, onStop);
+
+ return this;
+};
+
+/*----------------------------------------------------------------------------*/
+
+/**
+ * The Tunnel constructor.
+ *
+ * @private
+ * @param {Object} [properties] The properties to initialize the tunnel with.
+ */
+function Tunnel(properties) {
+ EventEmitter.call(this);
+
+ _.merge(this, properties);
+
+ var active = [],
+ queue = [];
+
+ var all = _.map(this.platforms, _.bind(function(platform) {
+ return new Job(_.merge({
+ 'user': this.user,
+ 'pass': this.pass,
+ 'tunnel': this,
+ 'options': { 'platforms': [platform] }
+ }, this.job));
+ }, this));
+
+ var completed = 0,
+ restarted = [],
+ success = true,
+ total = all.length,
+ tunnel = this;
+
+ _.invokeMap(all, 'on', 'complete', function() {
+ _.pull(active, this);
+ if (success) {
+ success = !this.failed;
+ }
+ if (++completed == total) {
+ tunnel.stop(_.partial(tunnel.emit, 'complete', success));
+ return;
+ }
+ tunnel.dequeue();
+ });
+
+ _.invokeMap(all, 'on', 'restart', function() {
+ if (!_.includes(restarted, this)) {
+ restarted.push(this);
+ }
+ // Restart tunnel if all active jobs have restarted.
+ var threshold = Math.min(all.length, _.isFinite(throttled) ? throttled : 3);
+ if (tunnel.attempts < tunnel.retries &&
+ active.length >= threshold && _.isEmpty(_.difference(active, restarted))) {
+ tunnel.restart();
+ }
+ });
+
+ this.on('restart', function() {
+ completed = 0;
+ success = true;
+ restarted.length = 0;
+ });
+
+ this._timeoutId = null;
+ this.attempts = 0;
+ this.restarting = this.running = this.starting = this.stopping = false;
+ this.jobs = { 'active': active, 'all': all, 'queue': queue };
+ this.connection = new SauceTunnel(this.user, this.pass, this.id, this.tunneled, ['-P', '0']);
+}
+
+util.inherits(Tunnel, EventEmitter);
+
+/**
+ * Restarts the tunnel.
+ *
+ * @memberOf Tunnel
+ * @param {Function} callback The function called once the tunnel is restarted.
+ */
+Tunnel.prototype.restart = function(callback) {
+ this.once('restart', _.iteratee(callback));
+ if (this.restarting) {
+ return this;
+ }
+ this.restarting = true;
+
+ logInline();
+ console.log('Tunnel %s: restart %d of %d', this.id, ++this.attempts, this.retries);
+
+ var jobs = this.jobs,
+ active = jobs.active,
+ all = jobs.all;
+
+ var reset = _.after(all.length, _.bind(this.stop, this, onGenericRestart)),
+ stop = _.after(active.length, _.partial(_.invokeMap, all, 'reset', reset));
+
+ if (_.isEmpty(active)) {
+ _.defer(stop);
+ }
+ if (_.isEmpty(all)) {
+ _.defer(reset);
+ }
+ _.invokeMap(active, 'stop', function() {
+ _.pull(active, this);
+ stop();
+ });
+
+ if (this._timeoutId) {
+ clearTimeout(this._timeoutId);
+ this._timeoutId = null;
+ }
+ return this;
+};
+
+/**
+ * Starts the tunnel.
+ *
+ * @memberOf Tunnel
+ * @param {Function} callback The function called once the tunnel is started.
+ * @param {Object} Returns the tunnel instance.
+ */
+Tunnel.prototype.start = function(callback) {
+ this.once('start', _.iteratee(callback));
+ if (this.starting || this.running) {
+ return this;
+ }
+ this.starting = true;
+
+ logInline();
+ console.log('Opening Sauce Connect tunnel...');
+
+ var onStart = _.bind(onTunnelStart, this);
+ if (this.timeout) {
+ this._timeoutId = _.delay(onStart, this.timeout * 1000, false);
+ }
+ this.connection.start(onStart);
+ return this;
+};
+
+/**
+ * Removes jobs from the queue and starts them.
+ *
+ * @memberOf Tunnel
+ * @param {Object} Returns the tunnel instance.
+ */
+Tunnel.prototype.dequeue = function() {
+ var count = 0,
+ jobs = this.jobs,
+ active = jobs.active,
+ queue = jobs.queue,
+ throttled = this.throttled;
+
+ while (queue.length && (active.length < throttled)) {
+ var job = queue.shift();
+ active.push(job);
+ _.delay(_.bind(job.start, job), ++count * 1000);
+ }
+ return this;
+};
+
+/**
+ * Stops the tunnel.
+ *
+ * @memberOf Tunnel
+ * @param {Function} callback The function called once the tunnel is stopped.
+ * @param {Object} Returns the tunnel instance.
+ */
+Tunnel.prototype.stop = function(callback) {
+ this.once('stop', _.iteratee(callback));
+ if (this.stopping) {
+ return this;
+ }
+ this.stopping = true;
+
+ logInline();
+ console.log('Shutting down Sauce Connect tunnel...');
+
+ var jobs = this.jobs,
+ active = jobs.active;
+
+ var stop = _.after(active.length, _.bind(function() {
+ var onStop = _.bind(onGenericStop, this);
+ if (this.running) {
+ this.connection.stop(onStop);
+ } else {
+ onStop();
+ }
+ }, this));
+
+ jobs.queue.length = 0;
+ if (_.isEmpty(active)) {
+ _.defer(stop);
+ }
+ _.invokeMap(active, 'stop', function() {
+ _.pull(active, this);
+ stop();
+ });
+
+ if (this._timeoutId) {
+ clearTimeout(this._timeoutId);
+ this._timeoutId = null;
+ }
+ return this;
+};
+
+/*----------------------------------------------------------------------------*/
+
+// Cleanup any inline logs when exited via `ctrl+c`.
+process.on('SIGINT', function() {
+ logInline();
+ process.exit();
+});
+
+// Create a web server for the current working directory.
+http.createServer(function(req, res) {
+ // See http://msdn.microsoft.com/en-us/library/ff955275(v=vs.85).aspx.
+ if (compatMode && path.extname(url.parse(req.url).pathname) == '.html') {
+ res.setHeader('X-UA-Compatible', 'IE=' + compatMode);
+ }
+ mount(req, res);
+}).listen(port);
+
+// Setup Sauce Connect so we can use this server from Sauce Labs.
+var tunnel = new Tunnel({
+ 'user': username,
+ 'pass': accessKey,
+ 'id': tunnelId,
+ 'job': { 'retries': maxJobRetries, 'statusInterval': statusInterval },
+ 'platforms': platforms,
+ 'retries': maxTunnelRetries,
+ 'throttled': throttled,
+ 'tunneled': tunneled,
+ 'timeout': tunnelTimeout
+});
+
+tunnel.on('complete', function(success) {
+ process.exit(success ? 0 : 1);
+});
+
+tunnel.start();
+
+setInterval(logThrobber, throbberDelay);
diff --git a/views/ngXosViews/serviceGrid/src/vendor/lodash/test/test-fp.js b/views/ngXosViews/serviceGrid/src/vendor/lodash/test/test-fp.js
new file mode 100644
index 0000000..775d7ee
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/lodash/test/test-fp.js
@@ -0,0 +1,1769 @@
+;(function() {
+
+ /** Used as a safe reference for `undefined` in pre-ES5 environments. */
+ var undefined;
+
+ /** Used as the size to cover large array optimizations. */
+ var LARGE_ARRAY_SIZE = 200;
+
+ /** Used as a reference to the global object. */
+ var root = (typeof global == 'object' && global) || this;
+
+ /** Used for native method references. */
+ var arrayProto = Array.prototype;
+
+ /** Method and object shortcuts. */
+ var phantom = root.phantom,
+ amd = root.define && define.amd,
+ argv = root.process && process.argv,
+ document = !phantom && root.document,
+ noop = function() {},
+ slice = arrayProto.slice,
+ WeakMap = root.WeakMap;
+
+ // Leak to avoid sporadic `noglobals` fails on Edge in Sauce Labs.
+ root.msWDfn = undefined;
+
+ /*--------------------------------------------------------------------------*/
+
+ /** Use a single "load" function. */
+ var load = (!amd && typeof require == 'function')
+ ? require
+ : noop;
+
+ /** The unit testing framework. */
+ var QUnit = root.QUnit || (root.QUnit = (
+ QUnit = load('../node_modules/qunitjs/qunit/qunit.js') || root.QUnit,
+ QUnit = QUnit.QUnit || QUnit
+ ));
+
+ /** Load stable Lodash and QUnit Extras. */
+ var _ = root._ || (root._ = (
+ _ = load('../lodash.js'),
+ _.runInContext(root)
+ ));
+
+ var QUnitExtras = load('../node_modules/qunit-extras/qunit-extras.js');
+ if (QUnitExtras) {
+ QUnitExtras.runInContext(root);
+ }
+
+ var convert = (function() {
+ var baseConvert = root.fp || load('../fp/_baseConvert.js');
+ if (!root.fp) {
+ return function(name, func, options) {
+ return baseConvert(_, name, func, options);
+ };
+ }
+ return function(name, func, options) {
+ if (typeof name == 'function') {
+ options = func;
+ func = name;
+ name = undefined;
+ }
+ return name === undefined
+ ? baseConvert(func, options)
+ : baseConvert(_.runInContext(), options)[name];
+ };
+ }());
+
+ var allFalseOptions = {
+ 'cap': false,
+ 'curry': false,
+ 'fixed': false,
+ 'immutable': false,
+ 'rearg': false
+ };
+
+ var fp = root.fp
+ ? (fp = _.noConflict(), _ = root._, fp)
+ : convert(_.runInContext());
+
+ var mapping = root.mapping || load('../fp/_mapping.js');
+
+ /*--------------------------------------------------------------------------*/
+
+ /**
+ * Skips a given number of tests with a passing result.
+ *
+ * @private
+ * @param {Object} assert The QUnit assert object.
+ * @param {number} [count=1] The number of tests to skip.
+ */
+ function skipAssert(assert, count) {
+ count || (count = 1);
+ while (count--) {
+ assert.ok(true, 'test skipped');
+ }
+ }
+
+ /*--------------------------------------------------------------------------*/
+
+ if (argv) {
+ console.log('Running lodash/fp tests.');
+ }
+
+ QUnit.module('convert module');
+
+ (function() {
+ QUnit.test('should work with `name` and `func`', function(assert) {
+ assert.expect(2);
+
+ var array = [1, 2, 3, 4],
+ remove = convert('remove', _.remove);
+
+ var actual = remove(function(n) {
+ return n % 2 == 0;
+ })(array);
+
+ assert.deepEqual(array, [1, 2, 3, 4]);
+ assert.deepEqual(actual, [1, 3]);
+ });
+
+ QUnit.test('should work with `name`, `func`, and `options`', function(assert) {
+ assert.expect(3);
+
+ var array = [1, 2, 3, 4],
+ remove = convert('remove', _.remove, allFalseOptions);
+
+ var actual = remove(array, function(n, index) {
+ return index % 2 == 0;
+ });
+
+ assert.deepEqual(array, [2, 4]);
+ assert.deepEqual(actual, [1, 3]);
+ assert.deepEqual(remove(), []);
+ });
+
+ QUnit.test('should work with an object', function(assert) {
+ assert.expect(2);
+
+ if (!document) {
+ var array = [1, 2, 3, 4],
+ lodash = convert({ 'remove': _.remove });
+
+ var actual = lodash.remove(function(n) {
+ return n % 2 == 0;
+ })(array);
+
+ assert.deepEqual(array, [1, 2, 3, 4]);
+ assert.deepEqual(actual, [1, 3]);
+ }
+ else {
+ skipAssert(assert, 2);
+ }
+ });
+
+ QUnit.test('should work with an object and `options`', function(assert) {
+ assert.expect(3);
+
+ if (!document) {
+ var array = [1, 2, 3, 4],
+ lodash = convert({ 'remove': _.remove }, allFalseOptions);
+
+ var actual = lodash.remove(array, function(n, index) {
+ return index % 2 == 0;
+ });
+
+ assert.deepEqual(array, [2, 4]);
+ assert.deepEqual(actual, [1, 3]);
+ assert.deepEqual(lodash.remove(), []);
+ }
+ else {
+ skipAssert(assert, 3);
+ }
+ });
+
+ QUnit.test('should work with lodash and `options`', function(assert) {
+ assert.expect(3);
+
+ var array = [1, 2, 3, 4],
+ lodash = convert(_.runInContext(), allFalseOptions);
+
+ var actual = lodash.remove(array, function(n, index) {
+ return index % 2 == 0;
+ });
+
+ assert.deepEqual(array, [2, 4]);
+ assert.deepEqual(actual, [1, 3]);
+ assert.deepEqual(lodash.remove(), []);
+ });
+
+ QUnit.test('should work with `runInContext` and `options`', function(assert) {
+ assert.expect(3);
+
+ var array = [1, 2, 3, 4],
+ runInContext = convert('runInContext', _.runInContext, allFalseOptions),
+ lodash = runInContext();
+
+ var actual = lodash.remove(array, function(n, index) {
+ return index % 2 == 0;
+ });
+
+ assert.deepEqual(array, [2, 4]);
+ assert.deepEqual(actual, [1, 3]);
+ assert.deepEqual(lodash.remove(), []);
+ });
+
+ QUnit.test('should accept a variety of options', function(assert) {
+ assert.expect(8);
+
+ var array = [1, 2, 3, 4],
+ predicate = function(n) { return n % 2 == 0; },
+ value = _.clone(array),
+ remove = convert('remove', _.remove, { 'cap': false }),
+ actual = remove(function(n, index) { return index % 2 == 0; })(value);
+
+ assert.deepEqual(value, [1, 2, 3, 4]);
+ assert.deepEqual(actual, [2, 4]);
+
+ remove = convert('remove', _.remove, { 'curry': false });
+ actual = remove(predicate);
+
+ assert.deepEqual(actual, []);
+
+ var trim = convert('trim', _.trim, { 'fixed': false });
+ assert.strictEqual(trim('_-abc-_', '_-'), 'abc');
+
+ value = _.clone(array);
+ remove = convert('remove', _.remove, { 'immutable': false });
+ actual = remove(predicate)(value);
+
+ assert.deepEqual(value, [1, 3]);
+ assert.deepEqual(actual, [2, 4]);
+
+ value = _.clone(array);
+ remove = convert('remove', _.remove, { 'rearg': false });
+ actual = remove(value)(predicate);
+
+ assert.deepEqual(value, [1, 2, 3, 4]);
+ assert.deepEqual(actual, [1, 3]);
+ });
+
+ QUnit.test('should respect the `cap` option', function(assert) {
+ assert.expect(1);
+
+ var iteratee = convert('iteratee', _.iteratee, { 'cap': false });
+
+ var func = iteratee(function(a, b, c) {
+ return [a, b, c];
+ }, 3);
+
+ assert.deepEqual(func(1, 2, 3), [1, 2, 3]);
+ });
+
+ QUnit.test('should respect the `rearg` option', function(assert) {
+ assert.expect(1);
+
+ var add = convert('add', _.add, { 'rearg': true });
+
+ assert.strictEqual(add('2')('1'), '12');
+ });
+
+ QUnit.test('should only add a `placeholder` property if needed', function(assert) {
+ assert.expect(2);
+
+ if (!document) {
+ var methodNames = _.keys(mapping.placeholder),
+ expected = _.map(methodNames, _.constant(true));
+
+ var actual = _.map(methodNames, function(methodName) {
+ var object = {};
+ object[methodName] = _[methodName];
+
+ var lodash = convert(object);
+ return methodName in lodash;
+ });
+
+ assert.deepEqual(actual, expected);
+
+ var lodash = convert({ 'add': _.add });
+ assert.notOk('placeholder' in lodash);
+ }
+ else {
+ skipAssert(assert, 2);
+ }
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('method.convert');
+
+ (function() {
+ QUnit.test('should exist on unconverted methods', function(assert) {
+ assert.expect(2);
+
+ var array = [],
+ isArray = fp.isArray.convert({ 'curry': true });
+
+ assert.strictEqual(fp.isArray(array), true);
+ assert.strictEqual(isArray()(array), true);
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('convert methods');
+
+ _.each(['fp.convert', 'method.convert'], function(methodName) {
+ var isFp = methodName == 'fp.convert',
+ func = isFp ? fp.convert : fp.remove.convert;
+
+ QUnit.test('`' + methodName + '` should work with an object', function(assert) {
+ assert.expect(3);
+
+ var array = [1, 2, 3, 4],
+ lodash = func(allFalseOptions),
+ remove = isFp ? lodash.remove : lodash;
+
+ var actual = remove(array, function(n, index) {
+ return index % 2 == 0;
+ });
+
+ assert.deepEqual(array, [2, 4]);
+ assert.deepEqual(actual, [1, 3]);
+ assert.deepEqual(remove(), []);
+ });
+
+ QUnit.test('`' + methodName + '` should extend existing configs', function(assert) {
+ assert.expect(2);
+
+ var array = [1, 2, 3, 4],
+ lodash = func({ 'cap': false }),
+ remove = (isFp ? lodash.remove : lodash).convert({ 'rearg': false });
+
+ var actual = remove(array)(function(n, index) {
+ return index % 2 == 0;
+ });
+
+ assert.deepEqual(array, [1, 2, 3, 4]);
+ assert.deepEqual(actual, [2, 4]);
+ });
+ });
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('method arity checks');
+
+ (function() {
+ QUnit.test('should wrap methods with an arity > `1`', function(assert) {
+ assert.expect(1);
+
+ var methodNames = _.filter(_.functions(fp), function(methodName) {
+ return fp[methodName].length > 1;
+ });
+
+ assert.deepEqual(methodNames, []);
+ });
+
+ QUnit.test('should have >= arity of `aryMethod` designation', function(assert) {
+ assert.expect(4);
+
+ _.times(4, function(index) {
+ var aryCap = index + 1;
+
+ var methodNames = _.filter(mapping.aryMethod[aryCap], function(methodName) {
+ var key = _.result(mapping.remap, methodName, methodName),
+ arity = _[key].length;
+
+ return arity != 0 && arity < aryCap;
+ });
+
+ assert.deepEqual(methodNames, [], '`aryMethod[' + aryCap + ']`');
+ });
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('method aliases');
+
+ (function() {
+ QUnit.test('should have correct aliases', function(assert) {
+ assert.expect(1);
+
+ var actual = _.transform(mapping.aliasToReal, function(result, realName, alias) {
+ result.push([alias, fp[alias] === fp[realName]]);
+ }, []);
+
+ assert.deepEqual(_.reject(actual, 1), []);
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('method ary caps');
+
+ (function() {
+ QUnit.test('should have a cap of 1', function(assert) {
+ assert.expect(1);
+
+ var funcMethods = [
+ 'curry', 'iteratee', 'memoize', 'over', 'overEvery', 'overSome',
+ 'method', 'methodOf', 'rest', 'runInContext'
+ ];
+
+ var exceptions = funcMethods.concat('mixin', 'template'),
+ expected = _.map(mapping.aryMethod[1], _.constant(true));
+
+ var actual = _.map(mapping.aryMethod[1], function(methodName) {
+ var arg = _.includes(funcMethods, methodName) ? _.noop : 1,
+ result = _.attempt(function() { return fp[methodName](arg); });
+
+ if (_.includes(exceptions, methodName)
+ ? typeof result == 'function'
+ : typeof result != 'function'
+ ) {
+ return true;
+ }
+ console.log(methodName, result);
+ return false;
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('should have a cap of 2', function(assert) {
+ assert.expect(1);
+
+ var funcMethods = [
+ 'after', 'ary', 'before', 'bind', 'bindKey', 'curryN', 'debounce',
+ 'delay', 'overArgs', 'partial', 'partialRight', 'rearg', 'throttle',
+ 'wrap'
+ ];
+
+ var exceptions = _.difference(funcMethods.concat('matchesProperty'), ['cloneDeepWith', 'cloneWith', 'delay']),
+ expected = _.map(mapping.aryMethod[2], _.constant(true));
+
+ var actual = _.map(mapping.aryMethod[2], function(methodName) {
+ var args = _.includes(funcMethods, methodName) ? [methodName == 'curryN' ? 1 : _.noop, _.noop] : [1, []],
+ result = _.attempt(function() { return fp[methodName](args[0])(args[1]); });
+
+ if (_.includes(exceptions, methodName)
+ ? typeof result == 'function'
+ : typeof result != 'function'
+ ) {
+ return true;
+ }
+ console.log(methodName, result);
+ return false;
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('should have a cap of 3', function(assert) {
+ assert.expect(1);
+
+ var funcMethods = [
+ 'assignWith', 'extendWith', 'isEqualWith', 'isMatchWith', 'reduce',
+ 'reduceRight', 'transform', 'zipWith'
+ ];
+
+ var expected = _.map(mapping.aryMethod[3], _.constant(true));
+
+ var actual = _.map(mapping.aryMethod[3], function(methodName) {
+ var args = _.includes(funcMethods, methodName) ? [_.noop, 0, 1] : [0, 1, []],
+ result = _.attempt(function() { return fp[methodName](args[0])(args[1])(args[2]); });
+
+ if (typeof result != 'function') {
+ return true;
+ }
+ console.log(methodName, result);
+ return false;
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('methods that use `indexOf`');
+
+ (function() {
+ QUnit.test('should work with `fp.indexOf`', function(assert) {
+ assert.expect(10);
+
+ var array = ['a', 'b', 'c'],
+ other = ['b', 'd', 'b'],
+ object = { 'a': 1, 'b': 2, 'c': 2 },
+ actual = fp.difference(array)(other);
+
+ assert.deepEqual(actual, ['a', 'c'], 'fp.difference');
+
+ actual = fp.includes('b')(array);
+ assert.strictEqual(actual, true, 'fp.includes');
+
+ actual = fp.intersection(other)(array);
+ assert.deepEqual(actual, ['b'], 'fp.intersection');
+
+ actual = fp.omit(other)(object);
+ assert.deepEqual(actual, { 'a': 1, 'c': 2 }, 'fp.omit');
+
+ actual = fp.union(other)(array);
+ assert.deepEqual(actual, ['a', 'b', 'c', 'd'], 'fp.union');
+
+ actual = fp.uniq(other);
+ assert.deepEqual(actual, ['b', 'd'], 'fp.uniq');
+
+ actual = fp.uniqBy(_.identity, other);
+ assert.deepEqual(actual, ['b', 'd'], 'fp.uniqBy');
+
+ actual = fp.without(array)(other);
+ assert.deepEqual(actual, ['a', 'c'], 'fp.without');
+
+ actual = fp.xor(other)(array);
+ assert.deepEqual(actual, ['a', 'c', 'd'], 'fp.xor');
+
+ actual = fp.pull('b')(array);
+ assert.deepEqual(actual, ['a', 'c'], 'fp.pull');
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('cherry-picked methods');
+
+ (function() {
+ QUnit.test('should provide the correct `iteratee` arguments', function(assert) {
+ assert.expect(4);
+
+ var args,
+ array = [1, 2, 3],
+ object = { 'a': 1, 'b': 2 },
+ isFIFO = _.keys(object)[0] == 'a',
+ map = convert('map', _.map),
+ reduce = convert('reduce', _.reduce);
+
+ map(function() {
+ args || (args = slice.call(arguments));
+ })(array);
+
+ assert.deepEqual(args, [1]);
+
+ args = undefined;
+ map(function() {
+ args || (args = slice.call(arguments));
+ })(object);
+
+ assert.deepEqual(args, isFIFO ? [1] : [2]);
+
+ args = undefined;
+ reduce(function() {
+ args || (args = slice.call(arguments));
+ })(0)(array);
+
+ assert.deepEqual(args, [0, 1]);
+
+ args = undefined;
+ reduce(function() {
+ args || (args = slice.call(arguments));
+ })(0)(object);
+
+ assert.deepEqual(args, isFIFO ? [0, 1] : [0, 2]);
+ });
+
+ QUnit.test('should not support shortcut fusion', function(assert) {
+ assert.expect(3);
+
+ var array = fp.range(0, LARGE_ARRAY_SIZE),
+ filterCount = 0,
+ mapCount = 0;
+
+ var iteratee = function(value) {
+ mapCount++;
+ return value * value;
+ };
+
+ var predicate = function(value) {
+ filterCount++;
+ return value % 2 == 0;
+ };
+
+ var map1 = convert('map', _.map),
+ filter1 = convert('filter', _.filter),
+ take1 = convert('take', _.take);
+
+ var filter2 = filter1(predicate),
+ map2 = map1(iteratee),
+ take2 = take1(2);
+
+ var combined = fp.flow(map2, filter2, fp.compact, take2);
+
+ assert.deepEqual(combined(array), [4, 16]);
+ assert.strictEqual(filterCount, 200, 'filterCount');
+ assert.strictEqual(mapCount, 200, 'mapCount');
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('iteratee shorthands');
+
+ (function() {
+ var objects = [{ 'a': 1, 'b': 2 }, { 'a': 3, 'b': 4 }];
+
+ QUnit.test('should work with "_.matches" shorthands', function(assert) {
+ assert.expect(1);
+
+ assert.deepEqual(fp.filter({ 'a': 3 })(objects), [objects[1]]);
+ });
+
+ QUnit.test('should work with "_.matchesProperty" shorthands', function(assert) {
+ assert.expect(1);
+
+ assert.deepEqual(fp.filter(['a', 3])(objects), [objects[1]]);
+ });
+
+ QUnit.test('should work with "_.property" shorthands', function(assert) {
+ assert.expect(1);
+
+ assert.deepEqual(fp.map('a')(objects), [1, 3]);
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('mutation methods');
+
+ (function() {
+ var array = [1, 2, 3],
+ object = { 'a': 1 },
+ deepObject = { 'a': { 'b': 2, 'c': 3 } };
+
+ QUnit.test('should not mutate values', function(assert) {
+ assert.expect(42);
+
+ function Foo() {}
+ Foo.prototype = { 'b': 2 };
+
+ var value = _.clone(object),
+ actual = fp.assign(value)({ 'b': 2 });
+
+ assert.deepEqual(value, object, 'fp.assign');
+ assert.deepEqual(actual, { 'a': 1, 'b': 2 }, 'fp.assign');
+
+ value = _.clone(object);
+ actual = fp.assignWith(function(objValue, srcValue) {
+ return srcValue;
+ })(value)({ 'b': 2 });
+
+ assert.deepEqual(value, object, 'fp.assignWith');
+ assert.deepEqual(actual, { 'a': 1, 'b': 2 }, 'fp.assignWith');
+
+ value = _.clone(object);
+ actual = fp.assignIn(value)(new Foo);
+
+ assert.deepEqual(value, object, 'fp.assignIn');
+ assert.deepEqual(actual, { 'a': 1, 'b': 2 }, 'fp.assignIn');
+
+ value = _.clone(object);
+ actual = fp.assignInWith(function(objValue, srcValue) {
+ return srcValue;
+ })(value)(new Foo);
+
+ assert.deepEqual(value, object, 'fp.assignInWith');
+ assert.deepEqual(actual, { 'a': 1, 'b': 2 }, 'fp.assignInWith');
+
+ value = _.clone(object);
+ actual = fp.defaults({ 'a': 2, 'b': 2 })(value);
+
+ assert.deepEqual(value, object, 'fp.defaults');
+ assert.deepEqual(actual, { 'a': 1, 'b': 2 }, 'fp.defaults');
+
+ value = _.cloneDeep(deepObject);
+ actual = fp.defaultsDeep({ 'a': { 'c': 4, 'd': 4 } })(deepObject);
+
+ assert.deepEqual(value, { 'a': { 'b': 2, 'c': 3 } }, 'fp.defaultsDeep');
+ assert.deepEqual(actual, { 'a': { 'b': 2, 'c': 3, 'd': 4 } }, 'fp.defaultsDeep');
+
+ value = _.clone(object);
+ actual = fp.extend(value)(new Foo);
+
+ assert.deepEqual(value, object, 'fp.extend');
+ assert.deepEqual(actual, { 'a': 1, 'b': 2 }, 'fp.extend');
+
+ value = _.clone(object);
+ actual = fp.extendWith(function(objValue, srcValue) {
+ return srcValue;
+ })(value)(new Foo);
+
+ assert.deepEqual(value, object, 'fp.extendWith');
+ assert.deepEqual(actual, { 'a': 1, 'b': 2 }, 'fp.extendWith');
+
+ value = _.clone(array);
+ actual = fp.fill(1)(2)('*')(value);
+
+ assert.deepEqual(value, array, 'fp.fill');
+ assert.deepEqual(actual, [1, '*', 3], 'fp.fill');
+
+ value = _.cloneDeep(deepObject);
+ actual = fp.merge(value)({ 'a': { 'd': 4 } });
+
+ assert.deepEqual(value, { 'a': { 'b': 2, 'c': 3 } }, 'fp.merge');
+ assert.deepEqual(actual, { 'a': { 'b': 2, 'c': 3, 'd': 4 } }, 'fp.merge');
+
+ value = _.cloneDeep(deepObject);
+ value.a.b = [1];
+
+ actual = fp.mergeWith(function(objValue, srcValue) {
+ if (_.isArray(objValue)) {
+ return objValue.concat(srcValue);
+ }
+ }, value, { 'a': { 'b': [2, 3] } });
+
+ assert.deepEqual(value, { 'a': { 'b': [1], 'c': 3 } }, 'fp.mergeWith');
+ assert.deepEqual(actual, { 'a': { 'b': [1, 2, 3], 'c': 3 } }, 'fp.mergeWith');
+
+ value = _.clone(array);
+ actual = fp.pull(2)(value);
+
+ assert.deepEqual(value, array, 'fp.pull');
+ assert.deepEqual(actual, [1, 3], 'fp.pull');
+
+ value = _.clone(array);
+ actual = fp.pullAll([1, 3])(value);
+
+ assert.deepEqual(value, array, 'fp.pullAll');
+ assert.deepEqual(actual, [2], 'fp.pullAll');
+
+ value = _.clone(array);
+ actual = fp.pullAt([0, 2])(value);
+
+ assert.deepEqual(value, array, 'fp.pullAt');
+ assert.deepEqual(actual, [2], 'fp.pullAt');
+
+ value = _.clone(array);
+ actual = fp.remove(function(value) {
+ return value === 2;
+ })(value);
+
+ assert.deepEqual(value, array, 'fp.remove');
+ assert.deepEqual(actual, [1, 3], 'fp.remove');
+
+ value = _.clone(array);
+ actual = fp.reverse(value);
+
+ assert.deepEqual(value, array, 'fp.reverse');
+ assert.deepEqual(actual, [3, 2, 1], 'fp.reverse');
+
+ value = _.cloneDeep(deepObject);
+ actual = fp.set('a.b')(3)(value);
+
+ assert.deepEqual(value, deepObject, 'fp.set');
+ assert.deepEqual(actual, { 'a': { 'b': 3, 'c': 3 } }, 'fp.set');
+
+ value = _.cloneDeep(deepObject);
+ actual = fp.setWith(Object)('d.e')(4)(value);
+
+ assert.deepEqual(value, deepObject, 'fp.setWith');
+ assert.deepEqual(actual, { 'a': { 'b': 2, 'c': 3 }, 'd': { 'e': 4 } }, 'fp.setWith');
+
+ value = _.cloneDeep(deepObject);
+ actual = fp.unset('a.b')(value);
+
+ assert.deepEqual(value, deepObject, 'fp.unset');
+ assert.deepEqual(actual, { 'a': { 'c': 3 } }, 'fp.unset');
+
+ value = _.cloneDeep(deepObject);
+ actual = fp.update('a.b')(function(n) { return n * n; })(value);
+
+ assert.deepEqual(value, deepObject, 'fp.update');
+ assert.deepEqual(actual, { 'a': { 'b': 4, 'c': 3 } }, 'fp.update');
+
+ value = _.cloneDeep(deepObject);
+ actual = fp.updateWith(Object)('d.e')(_.constant(4))(value);
+
+ assert.deepEqual(value, deepObject, 'fp.updateWith');
+ assert.deepEqual(actual, { 'a': { 'b': 2, 'c': 3 }, 'd': { 'e': 4 } }, 'fp.updateWith');
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('placeholder methods');
+
+ (function() {
+ QUnit.test('should use `fp` as the default placeholder', function(assert) {
+ assert.expect(3);
+
+ var actual = fp.add(fp, 'b')('a');
+ assert.strictEqual(actual, 'ab');
+
+ actual = fp.slice(fp, 2)(1)(['a', 'b', 'c']);
+ assert.deepEqual(actual, ['b']);
+
+ actual = fp.fill(fp, 2)(1, '*')([1, 2, 3]);
+ assert.deepEqual(actual, [1, '*', 3]);
+ });
+
+ QUnit.test('should support `fp.placeholder`', function(assert) {
+ assert.expect(6);
+
+ _.each([[], fp.__], function(ph) {
+ fp.placeholder = ph;
+
+ var actual = fp.add(ph, 'b')('a');
+ assert.strictEqual(actual, 'ab');
+
+ actual = fp.slice(ph, 2)(1)(['a', 'b', 'c']);
+ assert.deepEqual(actual, ['b']);
+
+ actual = fp.fill(ph, 2)(1, '*')([1, 2, 3]);
+ assert.deepEqual(actual, [1, '*', 3]);
+ });
+ });
+
+ _.forOwn(mapping.placeholder, function(truthy, methodName) {
+ var func = fp[methodName];
+
+ QUnit.test('`_.' + methodName + '` should have a `placeholder` property', function(assert) {
+ assert.expect(2);
+
+ assert.ok(_.isObject(func.placeholder));
+ assert.strictEqual(func.placeholder, fp.__);
+ });
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('set methods');
+
+ (function() {
+ QUnit.test('should only clone objects in `path`', function(assert) {
+ assert.expect(11);
+
+ var object = { 'a': { 'b': 2, 'c': 3 }, 'd': { 'e': 4 } },
+ value = _.cloneDeep(object),
+ actual = fp.set('a.b.c.d', 5, value);
+
+ assert.ok(_.isObject(actual.a.b), 'fp.set');
+ assert.ok(_.isNumber(actual.a.b), 'fp.set');
+
+ assert.strictEqual(actual.a.b.c.d, 5, 'fp.set');
+ assert.strictEqual(actual.d, value.d, 'fp.set');
+
+ value = _.cloneDeep(object);
+ actual = fp.setWith(Object)('[0][1]')('a')(value);
+
+ assert.deepEqual(actual[0], { '1': 'a' }, 'fp.setWith');
+
+ value = _.cloneDeep(object);
+ actual = fp.unset('a.b')(value);
+
+ assert.notOk('b' in actual.a, 'fp.unset');
+ assert.strictEqual(actual.a.c, value.a.c, 'fp.unset');
+
+ value = _.cloneDeep(object);
+ actual = fp.update('a.b')(function(n) { return n * n; })(value);
+
+ assert.strictEqual(actual.a.b, 4, 'fp.update');
+ assert.strictEqual(actual.d, value.d, 'fp.update');
+
+ value = _.cloneDeep(object);
+ actual = fp.updateWith(Object)('[0][1]')(_.constant('a'))(value);
+
+ assert.deepEqual(actual[0], { '1': 'a' }, 'fp.updateWith');
+ assert.strictEqual(actual.d, value.d, 'fp.updateWith');
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('with methods');
+
+ (function() {
+ var object = { 'a': 1 };
+
+ QUnit.test('should provide the correct `customizer` arguments', function(assert) {
+ assert.expect(7);
+
+ var args,
+ value = _.clone(object);
+
+ fp.assignWith(function() {
+ args || (args = _.map(arguments, _.cloneDeep));
+ })(value)({ 'b': 2 });
+
+ assert.deepEqual(args, [undefined, 2, 'b', { 'a': 1 }, { 'b': 2 }], 'fp.assignWith');
+
+ args = undefined;
+ value = _.clone(object);
+
+ fp.extendWith(function() {
+ args || (args = _.map(arguments, _.cloneDeep));
+ })(value)({ 'b': 2 });
+
+ assert.deepEqual(args, [undefined, 2, 'b', { 'a': 1 }, { 'b': 2 }], 'fp.extendWith');
+
+ var iteration = 0,
+ objects = [{ 'a': 1 }, { 'a': 2 }],
+ stack = { '__data__': { 'array': [[objects[0], objects[1]]], 'map': null } },
+ expected = [1, 2, 'a', objects[0], objects[1], stack];
+
+ args = undefined;
+
+ fp.isEqualWith(function() {
+ if (++iteration == 2) {
+ args = _.map(arguments, _.cloneDeep);
+ }
+ })(objects[0])(objects[1]);
+
+ args[5] = _.omitBy(args[5], _.isFunction);
+ assert.deepEqual(args, expected, 'fp.isEqualWith');
+
+ args = undefined;
+ stack = { '__data__': { 'array': [], 'map': null } };
+ expected = [2, 1, 'a', objects[1], objects[0], stack];
+
+ fp.isMatchWith(function() {
+ args || (args = _.map(arguments, _.cloneDeep));
+ })(objects[0])(objects[1]);
+
+ args[5] = _.omitBy(args[5], _.isFunction);
+ assert.deepEqual(args, expected, 'fp.isMatchWith');
+
+ args = undefined;
+ value = { 'a': [1] };
+ expected = [[1], [2, 3], 'a', { 'a': [1] }, { 'a': [2, 3] }, stack];
+
+ fp.mergeWith(function() {
+ args || (args = _.map(arguments, _.cloneDeep));
+ })(value)({ 'a': [2, 3] });
+
+ args[5] = _.omitBy(args[5], _.isFunction);
+ assert.deepEqual(args, expected, 'fp.mergeWith');
+
+ args = undefined;
+ value = _.clone(object);
+
+ fp.setWith(function() {
+ args || (args = _.map(arguments, _.cloneDeep));
+ })('b.c')(2)(value);
+
+ assert.deepEqual(args, [undefined, 'b', { 'a': 1 }], 'fp.setWith');
+
+ args = undefined;
+ value = _.clone(object);
+
+ fp.updateWith(function() {
+ args || (args = _.map(arguments, _.cloneDeep));
+ })('b.c')(_.constant(2))(value);
+
+ assert.deepEqual(args, [undefined, 'b', { 'a': 1 }], 'fp.updateWith');
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('fp.add and fp.subtract');
+
+ _.each(['add', 'subtract'], function(methodName) {
+ var func = fp[methodName],
+ isAdd = methodName == 'add';
+
+ QUnit.test('`fp.' + methodName + '` should not have `rearg` applied', function(assert) {
+ assert.expect(1);
+
+ assert.strictEqual(func('1')('2'), isAdd ? '12' : -1);
+ });
+ });
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('fp.castArray');
+
+ (function() {
+ QUnit.test('should shallow clone array values', function(assert) {
+ assert.expect(2);
+
+ var array = [1],
+ actual = fp.castArray(array);
+
+ assert.deepEqual(actual, array);
+ assert.notStrictEqual(actual, array);
+ });
+
+ QUnit.test('should not shallow clone non-array values', function(assert) {
+ assert.expect(2);
+
+ var object = { 'a': 1 },
+ actual = fp.castArray(object);
+
+ assert.deepEqual(actual, [object]);
+ assert.strictEqual(actual[0], object);
+ });
+
+ QUnit.test('should convert by name', function(assert) {
+ assert.expect(4);
+
+ var array = [1],
+ object = { 'a': 1 },
+ castArray = convert('castArray', _.castArray),
+ actual = castArray(array);
+
+ assert.deepEqual(actual, array);
+ assert.notStrictEqual(actual, array);
+
+ actual = castArray(object);
+ assert.deepEqual(actual, [object]);
+ assert.strictEqual(actual[0], object);
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('fp.curry and fp.curryRight');
+
+ _.each(['curry', 'curryRight'], function(methodName) {
+ var func = fp[methodName];
+
+ QUnit.test('`_.' + methodName + '` should only accept a `func` param', function(assert) {
+ assert.expect(1);
+
+ assert.raises(function() { func(1, _.noop); }, TypeError);
+ });
+ });
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('fp.curryN and fp.curryRightN');
+
+ _.each(['curryN', 'curryRightN'], function(methodName) {
+ var func = fp[methodName];
+
+ QUnit.test('`_.' + methodName + '` should accept an `arity` param', function(assert) {
+ assert.expect(1);
+
+ var actual = func(1)(function(a, b) { return [a, b]; })('a');
+ assert.deepEqual(actual, ['a', undefined]);
+ });
+ });
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('fp.difference');
+
+ (function() {
+ QUnit.test('should return the elements of the first array not included in the second array', function(assert) {
+ assert.expect(1);
+
+ assert.deepEqual(fp.difference([1, 2])([2, 3]), [1]);
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('fp.divide and fp.multiply');
+
+ _.each(['divide', 'multiply'], function(methodName) {
+ var func = fp[methodName],
+ isDivide = methodName == 'divide';
+
+ QUnit.test('`fp.' + methodName + '` should not have `rearg` applied', function(assert) {
+ assert.expect(1);
+
+ assert.strictEqual(func('2')('4'), isDivide ? 0.5 : 8);
+ });
+ });
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('fp.extend');
+
+ (function() {
+ QUnit.test('should convert by name', function(assert) {
+ assert.expect(2);
+
+ function Foo() {}
+ Foo.prototype = { 'b': 2 };
+
+ var object = { 'a': 1 },
+ extend = convert('extend', _.extend),
+ value = _.clone(object),
+ actual = extend(value)(new Foo);
+
+ assert.deepEqual(value, object);
+ assert.deepEqual(actual, { 'a': 1, 'b': 2 });
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('fp.fill');
+
+ (function() {
+ QUnit.test('should have an argument order of `start`, `end`, then `value`', function(assert) {
+ assert.expect(1);
+
+ var array = [1, 2, 3];
+ assert.deepEqual(fp.fill(1)(2)('*')(array), [1, '*', 3]);
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('fp.flatMapDepth');
+
+ (function() {
+ QUnit.test('should have an argument order of `iteratee`, `depth`, then `collection`', function(assert) {
+ assert.expect(2);
+
+ function duplicate(n) {
+ return [[[n, n]]];
+ }
+
+ var array = [1, 2],
+ object = { 'a': 1, 'b': 2 },
+ expected = [[1, 1], [2, 2]];
+
+ assert.deepEqual(fp.flatMapDepth(duplicate)(2)(array), expected);
+ assert.deepEqual(fp.flatMapDepth(duplicate)(2)(object), expected);
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('fp.flow and fp.flowRight');
+
+ _.each(['flow', 'flowRight'], function(methodName) {
+ var func = fp[methodName],
+ isFlow = methodName == 'flow';
+
+ QUnit.test('`fp.' + methodName + '` should support shortcut fusion', function(assert) {
+ assert.expect(6);
+
+ var filterCount,
+ mapCount,
+ array = fp.range(0, LARGE_ARRAY_SIZE);
+
+ var iteratee = function(value) {
+ mapCount++;
+ return value * value;
+ };
+
+ var predicate = function(value) {
+ filterCount++;
+ return value % 2 == 0;
+ };
+
+ var filter = fp.filter(predicate),
+ map = fp.map(iteratee),
+ take = fp.take(2);
+
+ _.times(2, function(index) {
+ var combined = isFlow
+ ? func(map, filter, fp.compact, take)
+ : func(take, fp.compact, filter, map);
+
+ filterCount = mapCount = 0;
+
+ if (WeakMap && WeakMap.name) {
+ assert.deepEqual(combined(array), [4, 16]);
+ assert.strictEqual(filterCount, 5, 'filterCount');
+ assert.strictEqual(mapCount, 5, 'mapCount');
+ }
+ else {
+ skipAssert(assert, 3);
+ }
+ });
+ });
+ });
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('fp.getOr');
+
+ (function() {
+ QUnit.test('should accept a `defaultValue` param', function(assert) {
+ assert.expect(1);
+
+ var actual = fp.getOr('default')('path')({});
+ assert.strictEqual(actual, 'default');
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('fp.gt and fp.gte');
+
+ _.each(['gt', 'gte'], function(methodName) {
+ var func = fp[methodName];
+
+ QUnit.test('`fp.' + methodName + '` should have `rearg` applied', function(assert) {
+ assert.expect(1);
+
+ assert.strictEqual(func(2)(1), true);
+ });
+ });
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('fp.inRange');
+
+ (function() {
+ QUnit.test('should have an argument order of `start`, `end`, then `value`', function(assert) {
+ assert.expect(2);
+
+ assert.strictEqual(fp.inRange(2)(4)(3), true);
+ assert.strictEqual(fp.inRange(-2)(-6)(-3), true);
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('fp.invoke');
+
+ (function() {
+ QUnit.test('should not accept an `args` param', function(assert) {
+ assert.expect(1);
+
+ var actual = fp.invoke('toUpperCase')('a');
+ assert.strictEqual(actual, 'A');
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('fp.invokeMap');
+
+ (function() {
+ QUnit.test('should not accept an `args` param', function(assert) {
+ assert.expect(1);
+
+ var actual = fp.invokeMap('toUpperCase')(['a', 'b']);
+ assert.deepEqual(actual, ['A', 'B']);
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('fp.invokeArgs');
+
+ (function() {
+ QUnit.test('should accept an `args` param', function(assert) {
+ assert.expect(1);
+
+ var actual = fp.invokeArgs('concat')(['b', 'c'])('a');
+ assert.strictEqual(actual, 'abc');
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('fp.invokeArgsMap');
+
+ (function() {
+ QUnit.test('should accept an `args` param', function(assert) {
+ assert.expect(1);
+
+ var actual = fp.invokeArgsMap('concat')(['b', 'c'])(['a', 'A']);
+ assert.deepEqual(actual, ['abc', 'Abc']);
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('fp.iteratee');
+
+ (function() {
+ QUnit.test('should return a iteratee with capped params', function(assert) {
+ assert.expect(1);
+
+ var func = fp.iteratee(function(a, b, c) { return [a, b, c]; }, 3);
+ assert.deepEqual(func(1, 2, 3), [1, undefined, undefined]);
+ });
+
+ QUnit.test('should convert by name', function(assert) {
+ assert.expect(1);
+
+ var iteratee = convert('iteratee', _.iteratee),
+ func = iteratee(function(a, b, c) { return [a, b, c]; }, 3);
+
+ assert.deepEqual(func(1, 2, 3), [1, undefined, undefined]);
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('fp.lt and fp.lte');
+
+ _.each(['lt', 'lte'], function(methodName) {
+ var func = fp[methodName];
+
+ QUnit.test('`fp.' + methodName + '` should have `rearg` applied', function(assert) {
+ assert.expect(1);
+
+ assert.strictEqual(func(1)(2), true);
+ });
+ });
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('fp.mapKeys');
+
+ (function() {
+ QUnit.test('should only provide `key` to `iteratee`', function(assert) {
+ assert.expect(1);
+
+ var args,
+ object = { 'a': 1 };
+
+ fp.mapKeys(function() {
+ args || (args = slice.call(arguments));
+ }, object);
+
+ assert.deepEqual(args, ['a']);
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('fp.maxBy and fp.minBy');
+
+ _.each(['maxBy', 'minBy'], function(methodName) {
+ var array = [1, 2, 3],
+ func = fp[methodName],
+ isMax = methodName == 'maxBy';
+
+ QUnit.test('`fp.' + methodName + '` should work with an `iteratee` argument', function(assert) {
+ assert.expect(1);
+
+ var actual = func(function(num) {
+ return -num;
+ })(array);
+
+ assert.strictEqual(actual, isMax ? 1 : 3);
+ });
+
+ QUnit.test('`fp.' + methodName + '` should provide the correct `iteratee` arguments', function(assert) {
+ assert.expect(1);
+
+ var args;
+
+ func(function() {
+ args || (args = slice.call(arguments));
+ })(array);
+
+ assert.deepEqual(args, [1]);
+ });
+ });
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('fp.mixin');
+
+ (function() {
+ var source = { 'a': _.noop };
+
+ QUnit.test('should mixin static methods but not prototype methods', function(assert) {
+ assert.expect(2);
+
+ fp.mixin(source);
+
+ assert.strictEqual(typeof fp.a, 'function');
+ assert.notOk('a' in fp.prototype);
+
+ delete fp.a;
+ delete fp.prototype.a;
+ });
+
+ QUnit.test('should not assign inherited `source` methods', function(assert) {
+ assert.expect(2);
+
+ function Foo() {}
+ Foo.prototype.a = _.noop;
+ fp.mixin(new Foo);
+
+ assert.notOk('a' in fp);
+ assert.notOk('a' in fp.prototype);
+
+ delete fp.a;
+ delete fp.prototype.a;
+ });
+
+ QUnit.test('should not remove existing prototype methods', function(assert) {
+ assert.expect(2);
+
+ var each1 = fp.each,
+ each2 = fp.prototype.each;
+
+ fp.mixin({ 'each': source.a });
+
+ assert.strictEqual(fp.each, source.a);
+ assert.strictEqual(fp.prototype.each, each2);
+
+ fp.each = each1;
+ fp.prototype.each = each2;
+ });
+
+ QUnit.test('should not export to the global when `source` is not an object', function(assert) {
+ assert.expect(2);
+
+ var props = _.without(_.keys(_), '_');
+
+ _.times(2, function(index) {
+ fp.mixin.apply(fp, index ? [1] : []);
+
+ assert.ok(_.every(props, function(key) {
+ return root[key] !== fp[key];
+ }));
+
+ _.each(props, function(key) {
+ if (root[key] === fp[key]) {
+ delete root[key];
+ }
+ });
+ });
+ });
+
+ QUnit.test('should convert by name', function(assert) {
+ assert.expect(3);
+
+ var object = { 'mixin': convert('mixin', _.mixin) };
+
+ function Foo() {}
+ Foo.mixin = object.mixin;
+ Foo.mixin(source);
+
+ assert.strictEqual(typeof Foo.a, 'function');
+ assert.notOk('a' in Foo.prototype);
+
+ object.mixin(source);
+ assert.strictEqual(typeof object.a, 'function');
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('fp.over');
+
+ (function() {
+ QUnit.test('should not cap iteratee args', function(assert) {
+ assert.expect(2);
+
+ _.each([fp.over, convert('over', _.over)], function(func) {
+ var over = func([Math.max, Math.min]);
+ assert.deepEqual(over(1, 2, 3, 4), [4, 1]);
+ });
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('fp.omitBy and fp.pickBy');
+
+ _.each(['omitBy', 'pickBy'], function(methodName) {
+ var func = fp[methodName];
+
+ QUnit.test('`fp.' + methodName + '` should provide `value` and `key` to `iteratee`', function(assert) {
+ assert.expect(1);
+
+ var args,
+ object = { 'a': 1 };
+
+ func(function() {
+ args || (args = slice.call(arguments));
+ })(object);
+
+ assert.deepEqual(args, [1, 'a']);
+ });
+ });
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('padChars methods');
+
+ _.each(['padChars', 'padCharsStart', 'padCharsEnd'], function(methodName) {
+ var func = fp[methodName],
+ isPad = methodName == 'padChars',
+ isStart = methodName == 'padCharsStart';
+
+ QUnit.test('`_.' + methodName + '` should truncate pad characters to fit the pad length', function(assert) {
+ assert.expect(1);
+
+ if (isPad) {
+ assert.strictEqual(func('_-')(8)('abc'), '_-abc_-_');
+ } else {
+ assert.strictEqual(func('_-')(6)('abc'), isStart ? '_-_abc' : 'abc_-_');
+ }
+ });
+ });
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('fp.partial and fp.partialRight');
+
+ _.each(['partial', 'partialRight'], function(methodName) {
+ var func = fp[methodName],
+ isPartial = methodName == 'partial';
+
+ QUnit.test('`_.' + methodName + '` should accept an `args` param', function(assert) {
+ assert.expect(1);
+
+ var expected = isPartial ? [1, 2, 3] : [0, 1, 2];
+
+ var actual = func(function(a, b, c) {
+ return [a, b, c];
+ })([1, 2])(isPartial ? 3 : 0);
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('`_.' + methodName + '` should convert by name', function(assert) {
+ assert.expect(2);
+
+ var expected = isPartial ? [1, 2, 3] : [0, 1, 2],
+ par = convert(methodName, _[methodName]),
+ ph = par.placeholder;
+
+ var actual = par(function(a, b, c) {
+ return [a, b, c];
+ })([1, 2])(isPartial ? 3 : 0);
+
+ assert.deepEqual(actual, expected);
+
+ actual = par(function(a, b, c) {
+ return [a, b, c];
+ })([ph, 2])(isPartial ? 1 : 0, isPartial ? 3 : 1);
+
+ assert.deepEqual(actual, expected);
+ });
+ });
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('fp.random');
+
+ (function() {
+ var array = Array(1000);
+
+ QUnit.test('should support a `min` and `max` argument', function(assert) {
+ assert.expect(1);
+
+ var min = 5,
+ max = 10;
+
+ assert.ok(_.some(array, function() {
+ var result = fp.random(min)(max);
+ return result >= min && result <= max;
+ }));
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('fp.range');
+
+ (function() {
+ QUnit.test('should have an argument order of `start` then `end`', function(assert) {
+ assert.expect(1);
+
+ assert.deepEqual(fp.range(1)(4), [1, 2, 3]);
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('fp.reduce and fp.reduceRight');
+
+ _.each(['reduce', 'reduceRight'], function(methodName) {
+ var func = fp[methodName],
+ isReduce = methodName == 'reduce';
+
+ QUnit.test('`_.' + methodName + '` should provide the correct `iteratee` arguments when iterating an array', function(assert) {
+ assert.expect(1);
+
+ var args,
+ array = [1, 2, 3];
+
+ func(function() {
+ args || (args = slice.call(arguments));
+ })(0)(array);
+
+ assert.deepEqual(args, isReduce ? [0, 1] : [0, 3]);
+ });
+
+ QUnit.test('`_.' + methodName + '` should provide the correct `iteratee` arguments when iterating an object', function(assert) {
+ assert.expect(1);
+
+ var args,
+ object = { 'a': 1, 'b': 2 },
+ isFIFO = _.keys(object)[0] == 'a';
+
+ var expected = isFIFO
+ ? (isReduce ? [0, 1] : [0, 2])
+ : (isReduce ? [0, 2] : [0, 1]);
+
+ func(function() {
+ args || (args = slice.call(arguments));
+ })(0)(object);
+
+ assert.deepEqual(args, expected);
+ });
+ });
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('fp.restFrom');
+
+ (function() {
+ QUnit.test('should accept a `start` param', function(assert) {
+ assert.expect(1);
+
+ var actual = fp.restFrom(2)(function() {
+ return slice.call(arguments);
+ })('a', 'b', 'c', 'd');
+
+ assert.deepEqual(actual, ['a', 'b', ['c', 'd']]);
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('fp.runInContext');
+
+ (function() {
+ QUnit.test('should return a converted lodash instance', function(assert) {
+ assert.expect(1);
+
+ assert.strictEqual(typeof fp.runInContext({}).curryN, 'function');
+ });
+
+ QUnit.test('should convert by name', function(assert) {
+ assert.expect(1);
+
+ var runInContext = convert('runInContext', _.runInContext);
+ assert.strictEqual(typeof runInContext({}).curryN, 'function');
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('fp.spreadFrom');
+
+ (function() {
+ QUnit.test('should accept a `start` param', function(assert) {
+ assert.expect(1);
+
+ var actual = fp.spreadFrom(2)(function() {
+ return slice.call(arguments);
+ })('a', 'b', ['c', 'd']);
+
+ assert.deepEqual(actual, ['a', 'b', 'c', 'd']);
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('trimChars methods');
+
+ _.each(['trimChars', 'trimCharsStart', 'trimCharsEnd'], function(methodName, index) {
+ var func = fp[methodName],
+ parts = [];
+
+ if (index != 2) {
+ parts.push('leading');
+ }
+ if (index != 1) {
+ parts.push('trailing');
+ }
+ parts = parts.join(' and ');
+
+ QUnit.test('`_.' + methodName + '` should remove ' + parts + ' `chars`', function(assert) {
+ assert.expect(1);
+
+ var string = '-_-a-b-c-_-',
+ expected = (index == 2 ? '-_-' : '') + 'a-b-c' + (index == 1 ? '-_-' : '');
+
+ assert.strictEqual(func('_-')(string), expected);
+ });
+ });
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('fp.uniqBy');
+
+ (function() {
+ var objects = [{ 'a': 2 }, { 'a': 3 }, { 'a': 1 }, { 'a': 2 }, { 'a': 3 }, { 'a': 1 }];
+
+ QUnit.test('should work with an `iteratee` argument', function(assert) {
+ assert.expect(1);
+
+ var expected = objects.slice(0, 3);
+
+ var actual = fp.uniqBy(function(object) {
+ return object.a;
+ })(objects);
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('should provide the correct `iteratee` arguments', function(assert) {
+ assert.expect(1);
+
+ var args;
+
+ fp.uniqBy(function() {
+ args || (args = slice.call(arguments));
+ })(objects);
+
+ assert.deepEqual(args, [objects[0]]);
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('fp.zip');
+
+ (function() {
+ QUnit.test('should zip together two arrays', function(assert) {
+ assert.expect(1);
+
+ assert.deepEqual(fp.zip([1, 2])([3, 4]), [[1, 3], [2, 4]]);
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('fp.zipObject');
+
+ (function() {
+ QUnit.test('should zip together key/value arrays into an object', function(assert) {
+ assert.expect(1);
+
+ assert.deepEqual(fp.zipObject(['a', 'b'])([1, 2]), { 'a': 1, 'b': 2 });
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('fp.zipWith');
+
+ (function() {
+ QUnit.test('should zip arrays combining grouped elements with `iteratee`', function(assert) {
+ assert.expect(1);
+
+ var array1 = [1, 2, 3],
+ array2 = [4, 5, 6];
+
+ var actual = fp.zipWith(function(a, b) {
+ return a + b;
+ })(array1)(array2);
+
+ assert.deepEqual(actual, [5, 7, 9]);
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.config.asyncRetries = 10;
+ QUnit.config.hidepassed = true;
+
+ if (!document) {
+ QUnit.config.noglobals = true;
+ QUnit.load();
+ }
+}.call(this));
diff --git a/views/ngXosViews/serviceGrid/src/vendor/lodash/test/test.js b/views/ngXosViews/serviceGrid/src/vendor/lodash/test/test.js
new file mode 100644
index 0000000..0df49ab
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/lodash/test/test.js
@@ -0,0 +1,26225 @@
+;(function() {
+
+ /** Used as a safe reference for `undefined` in pre-ES5 environments. */
+ var undefined;
+
+ /** Used to detect when a function becomes hot. */
+ var HOT_COUNT = 150;
+
+ /** Used as the size to cover large array optimizations. */
+ var LARGE_ARRAY_SIZE = 200;
+
+ /** Used as the `TypeError` message for "Functions" methods. */
+ var FUNC_ERROR_TEXT = 'Expected a function';
+
+ /** Used as references for various `Number` constants. */
+ var MAX_SAFE_INTEGER = 9007199254740991,
+ MAX_INTEGER = 1.7976931348623157e+308;
+
+ /** Used as references for the maximum length and index of an array. */
+ var MAX_ARRAY_LENGTH = 4294967295,
+ MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1;
+
+ /** `Object#toString` result references. */
+ var funcTag = '[object Function]',
+ numberTag = '[object Number]',
+ objectTag = '[object Object]';
+
+ /** Used as a reference to the global object. */
+ var root = (typeof global == 'object' && global) || this;
+
+ /** Used to store lodash to test for bad extensions/shims. */
+ var lodashBizarro = root.lodashBizarro;
+
+ /** Used for native method references. */
+ var arrayProto = Array.prototype,
+ funcProto = Function.prototype,
+ objectProto = Object.prototype,
+ numberProto = Number.prototype,
+ stringProto = String.prototype;
+
+ /** Method and object shortcuts. */
+ var phantom = root.phantom,
+ process = root.process,
+ amd = root.define && define.amd,
+ argv = process && process.argv,
+ defineProperty = Object.defineProperty,
+ document = !phantom && root.document,
+ body = root.document && root.document.body,
+ create = Object.create,
+ fnToString = funcProto.toString,
+ freeze = Object.freeze,
+ getSymbols = Object.getOwnPropertySymbols,
+ identity = function(value) { return value; },
+ JSON = root.JSON,
+ noop = function() {},
+ objToString = objectProto.toString,
+ params = argv,
+ push = arrayProto.push,
+ realm = {},
+ slice = arrayProto.slice;
+
+ var ArrayBuffer = root.ArrayBuffer,
+ Buffer = root.Buffer,
+ Promise = root.Promise,
+ Map = root.Map,
+ Set = root.Set,
+ Symbol = root.Symbol,
+ Uint8Array = root.Uint8Array,
+ WeakMap = root.WeakMap,
+ WeakSet = root.WeakSet;
+
+ var arrayBuffer = ArrayBuffer ? new ArrayBuffer(2) : undefined,
+ map = Map ? new Map : undefined,
+ promise = Promise ? Promise.resolve(1) : undefined,
+ set = Set ? new Set : undefined,
+ symbol = Symbol ? Symbol('a') : undefined,
+ weakMap = WeakMap ? new WeakMap : undefined,
+ weakSet = WeakSet ? new WeakSet : undefined;
+
+ /** Math helpers. */
+ var add = function(x, y) { return x + y; },
+ doubled = function(n) { return n * 2; },
+ isEven = function(n) { return n % 2 == 0; },
+ square = function(n) { return n * n; };
+
+ /** Constant functions. */
+ var alwaysA = function() { return 'a'; },
+ alwaysB = function() { return 'b'; },
+ alwaysC = function() { return 'c'; };
+
+ var alwaysTrue = function() { return true; },
+ alwaysFalse = function() { return false; };
+
+ var alwaysNaN = function() { return NaN; },
+ alwaysNull = function() { return null; };
+
+ var alwaysZero = function() { return 0; },
+ alwaysOne = function() { return 1; },
+ alwaysTwo = function() { return 2; },
+ alwaysThree = function() { return 3; },
+ alwaysFour = function() { return 4; };
+
+ var alwaysEmptyArray = function() { return []; },
+ alwaysEmptyObject = function() { return {}; },
+ alwaysEmptyString = function() { return ''; };
+
+ /** List of latin-1 supplementary letters to basic latin letters. */
+ var burredLetters = [
+ '\xc0', '\xc1', '\xc2', '\xc3', '\xc4', '\xc5', '\xc6', '\xc7', '\xc8', '\xc9', '\xca', '\xcb', '\xcc', '\xcd', '\xce',
+ '\xcf', '\xd0', '\xd1', '\xd2', '\xd3', '\xd4', '\xd5', '\xd6', '\xd8', '\xd9', '\xda', '\xdb', '\xdc', '\xdd', '\xde',
+ '\xdf', '\xe0', '\xe1', '\xe2', '\xe3', '\xe4', '\xe5', '\xe6', '\xe7', '\xe8', '\xe9', '\xea', '\xeb', '\xec', '\xed', '\xee',
+ '\xef', '\xf0', '\xf1', '\xf2', '\xf3', '\xf4', '\xf5', '\xf6', '\xf8', '\xf9', '\xfa', '\xfb', '\xfc', '\xfd', '\xfe', '\xff'
+ ];
+
+ /** List of combining diacritical marks. */
+ var comboMarks = [
+ '\u0300', '\u0301', '\u0302', '\u0303', '\u0304', '\u0305', '\u0306', '\u0307', '\u0308', '\u0309', '\u030a', '\u030b', '\u030c', '\u030d', '\u030e', '\u030f',
+ '\u0310', '\u0311', '\u0312', '\u0313', '\u0314', '\u0315', '\u0316', '\u0317', '\u0318', '\u0319', '\u031a', '\u031b', '\u031c', '\u031d', '\u031e', '\u031f',
+ '\u0320', '\u0321', '\u0322', '\u0323', '\u0324', '\u0325', '\u0326', '\u0327', '\u0328', '\u0329', '\u032a', '\u032b', '\u032c', '\u032d', '\u032e', '\u032f',
+ '\u0330', '\u0331', '\u0332', '\u0333', '\u0334', '\u0335', '\u0336', '\u0337', '\u0338', '\u0339', '\u033a', '\u033b', '\u033c', '\u033d', '\u033e', '\u033f',
+ '\u0340', '\u0341', '\u0342', '\u0343', '\u0344', '\u0345', '\u0346', '\u0347', '\u0348', '\u0349', '\u034a', '\u034b', '\u034c', '\u034d', '\u034e', '\u034f',
+ '\u0350', '\u0351', '\u0352', '\u0353', '\u0354', '\u0355', '\u0356', '\u0357', '\u0358', '\u0359', '\u035a', '\u035b', '\u035c', '\u035d', '\u035e', '\u035f',
+ '\u0360', '\u0361', '\u0362', '\u0363', '\u0364', '\u0365', '\u0366', '\u0367', '\u0368', '\u0369', '\u036a', '\u036b', '\u036c', '\u036d', '\u036e', '\u036f',
+ '\ufe20', '\ufe21', '\ufe22', '\ufe23'
+ ];
+
+ /** List of `burredLetters` translated to basic latin letters. */
+ var deburredLetters = [
+ 'A', 'A', 'A', 'A', 'A', 'A', 'Ae', 'C', 'E', 'E', 'E', 'E', 'I', 'I', 'I',
+ 'I', 'D', 'N', 'O', 'O', 'O', 'O', 'O', 'O', 'U', 'U', 'U', 'U', 'Y', 'Th',
+ 'ss', 'a', 'a', 'a', 'a', 'a', 'a', 'ae', 'c', 'e', 'e', 'e', 'e', 'i', 'i', 'i',
+ 'i', 'd', 'n', 'o', 'o', 'o', 'o', 'o', 'o', 'u', 'u', 'u', 'u', 'y', 'th', 'y'
+ ];
+
+ /** Used to provide falsey values to methods. */
+ var falsey = [, null, undefined, false, 0, NaN, ''];
+
+ /** Used to specify the emoji style glyph variant of characters. */
+ var emojiVar = '\ufe0f';
+
+ /** Used to provide empty values to methods. */
+ var empties = [[], {}].concat(falsey.slice(1));
+
+ /** Used to test error objects. */
+ var errors = [
+ new Error,
+ new EvalError,
+ new RangeError,
+ new ReferenceError,
+ new SyntaxError,
+ new TypeError,
+ new URIError
+ ];
+
+ /** List of fitzpatrick modifiers. */
+ var fitzModifiers = [
+ '\ud83c\udffb',
+ '\ud83c\udffc',
+ '\ud83c\udffd',
+ '\ud83c\udffe',
+ '\ud83c\udfff'
+ ];
+
+ /** Used to provide primitive values to methods. */
+ var primitives = [null, undefined, false, true, 1, NaN, 'a'];
+
+ /** Used to check whether methods support typed arrays. */
+ var typedArrays = [
+ 'Float32Array',
+ 'Float64Array',
+ 'Int8Array',
+ 'Int16Array',
+ 'Int32Array',
+ 'Uint8Array',
+ 'Uint8ClampedArray',
+ 'Uint16Array',
+ 'Uint32Array'
+ ];
+
+ /** Used to check whether methods support array views. */
+ var arrayViews = typedArrays.concat('DataView');
+
+ /** The file path of the lodash file to test. */
+ var filePath = (function() {
+ var min = 2,
+ result = params || [];
+
+ if (phantom) {
+ min = 0;
+ result = params = phantom.args || require('system').args;
+ }
+ var last = result[result.length - 1];
+ result = (result.length > min && !/test(?:\.js)?$/.test(last)) ? last : '../lodash.js';
+
+ if (!amd) {
+ try {
+ result = require('fs').realpathSync(result);
+ } catch (e) {}
+
+ try {
+ result = require.resolve(result);
+ } catch (e) {}
+ }
+ return result;
+ }());
+
+ /** The `ui` object. */
+ var ui = root.ui || (root.ui = {
+ 'buildPath': filePath,
+ 'loaderPath': '',
+ 'isModularize': /\b(?:amd|commonjs|es|node|npm|(index|main)\.js)\b/.test(filePath),
+ 'isStrict': /\bes\b/.test(filePath),
+ 'urlParams': {}
+ });
+
+ /** The basename of the lodash file to test. */
+ var basename = /[\w.-]+$/.exec(filePath)[0];
+
+ /** Used to indicate testing a modularized build. */
+ var isModularize = ui.isModularize;
+
+ /** Detect if testing `npm` modules. */
+ var isNpm = isModularize && /\bnpm\b/.test([ui.buildPath, ui.urlParams.build]);
+
+ /** Detect if running in PhantomJS. */
+ var isPhantom = phantom || (typeof callPhantom == 'function');
+
+ /** Detect if lodash is in strict mode. */
+ var isStrict = ui.isStrict;
+
+ /*--------------------------------------------------------------------------*/
+
+ // Leak to avoid sporadic `noglobals` fails on Edge in Sauce Labs.
+ root.msWDfn = undefined;
+
+ // Exit early if going to run tests in a PhantomJS web page.
+ if (phantom && isModularize) {
+ var page = require('webpage').create();
+
+ page.onCallback = function(details) {
+ var coverage = details.coverage;
+ if (coverage) {
+ var fs = require('fs'),
+ cwd = fs.workingDirectory,
+ sep = fs.separator;
+
+ fs.write([cwd, 'coverage', 'coverage.json'].join(sep), JSON.stringify(coverage));
+ }
+ phantom.exit(details.failed ? 1 : 0);
+ };
+
+ page.onConsoleMessage = function(message) {
+ console.log(message);
+ };
+
+ page.onInitialized = function() {
+ page.evaluate(function() {
+ document.addEventListener('DOMContentLoaded', function() {
+ QUnit.done(function(details) {
+ details.coverage = window.__coverage__;
+ callPhantom(details);
+ });
+ });
+ });
+ };
+
+ page.open(filePath, function(status) {
+ if (status != 'success') {
+ console.log('PhantomJS failed to load page: ' + filePath);
+ phantom.exit(1);
+ }
+ });
+
+ console.log('test.js invoked with arguments: ' + JSON.stringify(slice.call(params)));
+ return;
+ }
+
+ /*--------------------------------------------------------------------------*/
+
+ /** Used to test Web Workers. */
+ var Worker = !(ui.isForeign || ui.isSauceLabs || isModularize) &&
+ (document && document.origin != 'null') && root.Worker;
+
+ /** Used to test host objects in IE. */
+ try {
+ var xml = new ActiveXObject('Microsoft.XMLDOM');
+ } catch (e) {}
+
+ /** Poison the free variable `root` in Node.js */
+ try {
+ defineProperty(global.root, 'root', {
+ 'configurable': false,
+ 'enumerable': false,
+ 'get': function() { throw new ReferenceError; }
+ });
+ } catch (e) {}
+
+ /** Use a single "load" function. */
+ var load = (!amd && typeof require == 'function')
+ ? require
+ : noop;
+
+ /** The unit testing framework. */
+ var QUnit = root.QUnit || (root.QUnit = load('../node_modules/qunitjs/qunit/qunit.js'));
+
+ /** Load stable Lodash and QUnit Extras. */
+ var lodashStable = root.lodashStable;
+ if (!lodashStable) {
+ try {
+ lodashStable = load('../node_modules/lodash/lodash.js');
+ } catch (e) {
+ console.log('Error: The stable lodash dev dependency should be at least a version behind master branch.');
+ return;
+ }
+ lodashStable = lodashStable.noConflict();
+ }
+ lodashStable = lodashStable.runInContext(root);
+
+ var QUnitExtras = load('../node_modules/qunit-extras/qunit-extras.js');
+ if (QUnitExtras) {
+ QUnitExtras.runInContext(root);
+ }
+
+ /** The `lodash` function to test. */
+ var _ = root._ || (root._ = (
+ _ = load(filePath),
+ _ = _._ || (isStrict = ui.isStrict = isStrict || 'default' in _, _['default']) || _,
+ (_.runInContext ? _.runInContext(root) : _)
+ ));
+
+ /** Used to detect instrumented istanbul code coverage runs. */
+ var coverage = root.__coverage__ || root[lodashStable.findKey(root, function(value, key) {
+ return /^(?:\$\$cov_\d+\$\$)$/.test(key);
+ })];
+
+ /** Used to test generator functions. */
+ var generator = lodashStable.attempt(function() {
+ return Function('return function*(){}');
+ });
+
+ /** Used to restore the `_` reference. */
+ var oldDash = root._;
+
+ /**
+ * Used to check for problems removing whitespace. For a whitespace reference,
+ * see [V8's unit test](https://code.google.com/p/v8/source/browse/branches/bleeding_edge/test/mjsunit/whitespaces.js).
+ */
+ var whitespace = lodashStable.filter([
+ // Basic whitespace characters.
+ ' ', '\t', '\x0b', '\f', '\xa0', '\ufeff',
+
+ // Line terminators.
+ '\n', '\r', '\u2028', '\u2029',
+
+ // Unicode category "Zs" space separators.
+ '\u1680', '\u180e', '\u2000', '\u2001', '\u2002', '\u2003', '\u2004', '\u2005',
+ '\u2006', '\u2007', '\u2008', '\u2009', '\u200a', '\u202f', '\u205f', '\u3000'
+ ],
+ function(chr) { return /\s/.exec(chr); })
+ .join('');
+
+ /**
+ * Creates a custom error object.
+ *
+ * @private
+ * @constructor
+ * @param {string} message The error message.
+ */
+ function CustomError(message) {
+ this.name = 'CustomError';
+ this.message = message;
+ }
+
+ CustomError.prototype = lodashStable.create(Error.prototype, {
+ 'constructor': CustomError
+ });
+
+ /**
+ * Removes all own enumerable string keyed properties from a given object.
+ *
+ * @private
+ * @param {Object} object The object to empty.
+ */
+ function emptyObject(object) {
+ lodashStable.forOwn(object, function(value, key, object) {
+ delete object[key];
+ });
+ }
+
+ /**
+ * Extracts the unwrapped value from its wrapper.
+ *
+ * @private
+ * @param {Object} wrapper The wrapper to unwrap.
+ * @returns {*} Returns the unwrapped value.
+ */
+ function getUnwrappedValue(wrapper) {
+ var index = -1,
+ actions = wrapper.__actions__,
+ length = actions.length,
+ result = wrapper.__wrapped__;
+
+ while (++index < length) {
+ var args = [result],
+ action = actions[index];
+
+ push.apply(args, action.args);
+ result = action.func.apply(action.thisArg, args);
+ }
+ return result;
+ }
+
+ /**
+ * Sets a non-enumerable property value on `object`.
+ *
+ * Note: This function is used to avoid a bug in older versions of V8 where
+ * overwriting non-enumerable built-ins makes them enumerable.
+ * See https://code.google.com/p/v8/issues/detail?id=1623
+ *
+ * @private
+ * @param {Object} object The object modify.
+ * @param {string} key The name of the property to set.
+ * @param {*} value The property value.
+ */
+ function setProperty(object, key, value) {
+ try {
+ defineProperty(object, key, {
+ 'configurable': true,
+ 'enumerable': false,
+ 'writable': true,
+ 'value': value
+ });
+ } catch (e) {
+ object[key] = value;
+ }
+ return object;
+ }
+
+ /**
+ * Skips a given number of tests with a passing result.
+ *
+ * @private
+ * @param {Object} assert The QUnit assert object.
+ * @param {number} [count=1] The number of tests to skip.
+ */
+ function skipAssert(assert, count) {
+ count || (count = 1);
+ while (count--) {
+ assert.ok(true, 'test skipped');
+ }
+ }
+
+ /*--------------------------------------------------------------------------*/
+
+ // Add bizarro values.
+ (function() {
+ if (document || (typeof require != 'function')) {
+ return;
+ }
+ var nativeString = fnToString.call(toString),
+ reToString = /toString/g;
+
+ function createToString(funcName) {
+ return lodashStable.constant(nativeString.replace(reToString, funcName));
+ }
+
+ // Allow bypassing native checks.
+ setProperty(funcProto, 'toString', function wrapper() {
+ setProperty(funcProto, 'toString', fnToString);
+ var result = lodashStable.has(this, 'toString') ? this.toString() : fnToString.call(this);
+ setProperty(funcProto, 'toString', wrapper);
+ return result;
+ });
+
+ // Add prototype extensions.
+ funcProto._method = noop;
+
+ // Set bad shims.
+ setProperty(Object, 'create', (function() {
+ function object() {}
+ return function(prototype) {
+ if (lodashStable.isObject(prototype)) {
+ object.prototype = prototype;
+ var result = new object;
+ object.prototype = undefined;
+ }
+ return result || {};
+ };
+ }()));
+
+ setProperty(Object, 'getOwnPropertySymbols', undefined);
+
+ var _propertyIsEnumerable = objectProto.propertyIsEnumerable;
+ setProperty(objectProto, 'propertyIsEnumerable', function(key) {
+ return !(key == 'valueOf' && this && this.valueOf === 1) && _propertyIsEnumerable.call(this, key);
+ });
+
+ if (Buffer) {
+ defineProperty(root, 'Buffer', {
+ 'configurable': true,
+ 'enumerable': true,
+ 'get': function get() {
+ var caller = get.caller,
+ name = caller ? caller.name : '';
+
+ if (!(name == 'runInContext' || name.length == 1 || /\b_\.isBuffer\b/.test(caller))) {
+ return Buffer;
+ }
+ }
+ });
+ }
+ if (Map) {
+ setProperty(root, 'Map', (function() {
+ var count = 0;
+ return function() {
+ if (count++) {
+ return new Map;
+ }
+ setProperty(root, 'Map', Map);
+ return {};
+ };
+ }()));
+
+ setProperty(root.Map, 'toString', createToString('Map'));
+ }
+ setProperty(root, 'Promise', noop);
+ setProperty(root, 'Set', noop);
+ setProperty(root, 'Symbol', undefined);
+ setProperty(root, 'WeakMap', noop);
+
+ // Fake `WinRTError`.
+ setProperty(root, 'WinRTError', Error);
+
+ // Clear cache so lodash can be reloaded.
+ emptyObject(require.cache);
+
+ // Load lodash and expose it to the bad extensions/shims.
+ lodashBizarro = (lodashBizarro = require(filePath))._ || lodashBizarro['default'] || lodashBizarro;
+ root._ = oldDash;
+
+ // Restore built-in methods.
+ setProperty(Object, 'create', create);
+ setProperty(objectProto, 'propertyIsEnumerable', _propertyIsEnumerable);
+ setProperty(root, 'Buffer', Buffer);
+
+ if (getSymbols) {
+ Object.getOwnPropertySymbols = getSymbols;
+ } else {
+ delete Object.getOwnPropertySymbols;
+ }
+ if (Map) {
+ setProperty(root, 'Map', Map);
+ } else {
+ delete root.Map;
+ }
+ if (Promise) {
+ setProperty(root, 'Promise', Promise);
+ } else {
+ delete root.Promise;
+ }
+ if (Set) {
+ setProperty(root, 'Set', Set);
+ } else {
+ delete root.Set;
+ }
+ if (Symbol) {
+ setProperty(root, 'Symbol', Symbol);
+ } else {
+ delete root.Symbol;
+ }
+ if (WeakMap) {
+ setProperty(root, 'WeakMap', WeakMap);
+ } else {
+ delete root.WeakMap;
+ }
+ delete root.WinRTError;
+ delete funcProto._method;
+ }());
+
+ // Add other realm values from the `vm` module.
+ lodashStable.attempt(function() {
+ lodashStable.assign(realm, require('vm').runInNewContext([
+ '(function() {',
+ ' var noop = function() {},',
+ ' root = this;',
+ '',
+ ' var object = {',
+ " 'ArrayBuffer': root.ArrayBuffer,",
+ " 'arguments': (function() { return arguments; }(1, 2, 3)),",
+ " 'array': [1],",
+ " 'arrayBuffer': root.ArrayBuffer ? new root.ArrayBuffer : undefined,",
+ " 'boolean': Object(false),",
+ " 'date': new Date,",
+ " 'errors': [new Error, new EvalError, new RangeError, new ReferenceError, new SyntaxError, new TypeError, new URIError],",
+ " 'function': noop,",
+ " 'map': root.Map ? new root.Map : undefined,",
+ " 'nan': NaN,",
+ " 'null': null,",
+ " 'number': Object(0),",
+ " 'object': { 'a': 1 },",
+ " 'promise': root.Promise ? Promise.resolve(1) : undefined,",
+ " 'regexp': /x/,",
+ " 'set': root.Set ? new root.Set : undefined,",
+ " 'string': Object('a'),",
+ " 'symbol': root.Symbol ? root.Symbol() : undefined,",
+ " 'undefined': undefined,",
+ " 'weakMap': root.WeakMap ? new root.WeakMap : undefined,",
+ " 'weakSet': root.WeakSet ? new root.WeakSet : undefined",
+ ' };',
+ '',
+ " ['" + arrayViews.join("', '") + "'].forEach(function(type) {",
+ ' var Ctor = root[type]',
+ ' object[type] = Ctor;',
+ ' object[type.toLowerCase()] = Ctor ? new Ctor(new ArrayBuffer(24)) : undefined;',
+ ' });',
+ '',
+ ' return object;',
+ '}())'
+ ].join('\n')));
+ });
+
+ // Add other realm values from an iframe.
+ lodashStable.attempt(function() {
+ _._realm = realm;
+
+ var iframe = document.createElement('iframe');
+ iframe.frameBorder = iframe.height = iframe.width = 0;
+ body.appendChild(iframe);
+
+ var idoc = (idoc = iframe.contentDocument || iframe.contentWindow).document || idoc;
+ idoc.write([
+ '<script>',
+ 'var _ = parent._;',
+ '',
+ ' var noop = function() {},',
+ ' root = this;',
+ '',
+ 'var object = {',
+ " 'ArrayBuffer': root.ArrayBuffer,",
+ " 'arguments': (function() { return arguments; }(1, 2, 3)),",
+ " 'array': [1],",
+ " 'arrayBuffer': root.ArrayBuffer ? new root.ArrayBuffer : undefined,",
+ " 'boolean': Object(false),",
+ " 'date': new Date,",
+ " 'errors': [new Error, new EvalError, new RangeError, new ReferenceError, new SyntaxError, new TypeError, new URIError],",
+ " 'function': noop,",
+ " 'map': root.Map ? new root.Map : undefined,",
+ " 'nan': NaN,",
+ " 'null': null,",
+ " 'number': Object(0),",
+ " 'object': { 'a': 1 },",
+ " 'promise': root.Promise ? Promise.resolve(1) : undefined,",
+ " 'regexp': /x/,",
+ " 'set': root.Set ? new root.Set : undefined,",
+ " 'string': Object('a'),",
+ " 'symbol': root.Symbol ? root.Symbol() : undefined,",
+ " 'undefined': undefined,",
+ " 'weakMap': root.WeakMap ? new root.WeakMap : undefined,",
+ " 'weakSet': root.WeakSet ? new root.WeakSet : undefined",
+ '};',
+ '',
+ "_.each(['" + arrayViews.join("', '") + "'], function(type) {",
+ ' var Ctor = root[type];',
+ ' object[type] = Ctor;',
+ ' object[type.toLowerCase()] = Ctor ? new Ctor(new ArrayBuffer(24)) : undefined;',
+ '});',
+ '',
+ '_.assign(_._realm, object);',
+ '<\/script>'
+ ].join('\n'));
+
+ idoc.close();
+ delete _._realm;
+ });
+
+ // Add a web worker.
+ lodashStable.attempt(function() {
+ var worker = new Worker('./asset/worker.js?t=' + (+new Date));
+ worker.addEventListener('message', function(e) {
+ _._VERSION = e.data || '';
+ }, false);
+
+ worker.postMessage(ui.buildPath);
+ });
+
+ // Expose internal modules for better code coverage.
+ lodashStable.attempt(function() {
+ var path = require('path'),
+ basePath = path.dirname(filePath);
+
+ if (isModularize && !(amd || isNpm)) {
+ lodashStable.each([
+ '_baseEach',
+ '_isIndex',
+ '_isIterateeCall'
+ ], function(relPath) {
+ var func = require(path.join(basePath, relPath)),
+ funcName = path.basename(relPath);
+
+ _['_' + funcName] = func[funcName] || func['default'] || func;
+ });
+ }
+ });
+
+ /*--------------------------------------------------------------------------*/
+
+ if (params) {
+ console.log('Running lodash tests.');
+ console.log('test.js invoked with arguments: ' + JSON.stringify(slice.call(params)));
+ }
+
+ QUnit.module(basename);
+
+ (function() {
+ QUnit.test('should support loading ' + basename + ' as the "lodash" module', function(assert) {
+ assert.expect(1);
+
+ if (amd) {
+ assert.strictEqual((lodashModule || {}).moduleName, 'lodash');
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+
+ QUnit.test('should support loading ' + basename + ' with the Require.js "shim" configuration option', function(assert) {
+ assert.expect(1);
+
+ if (amd && lodashStable.includes(ui.loaderPath, 'requirejs')) {
+ assert.strictEqual((shimmedModule || {}).moduleName, 'shimmed');
+ } else {
+ skipAssert(assert);
+ }
+ });
+
+ QUnit.test('should support loading ' + basename + ' as the "underscore" module', function(assert) {
+ assert.expect(1);
+
+ if (amd) {
+ assert.strictEqual((underscoreModule || {}).moduleName, 'underscore');
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+
+ QUnit.test('should support loading ' + basename + ' in a web worker', function(assert) {
+ assert.expect(1);
+
+ var done = assert.async();
+
+ if (Worker) {
+ var limit = 30000 / QUnit.config.asyncRetries,
+ start = +new Date;
+
+ var attempt = function() {
+ var actual = _._VERSION;
+ if ((new Date - start) < limit && typeof actual != 'string') {
+ setTimeout(attempt, 16);
+ return;
+ }
+ assert.strictEqual(actual, _.VERSION);
+ done();
+ };
+
+ attempt();
+ }
+ else {
+ skipAssert(assert);
+ done();
+ }
+ });
+
+ QUnit.test('should not add `Function.prototype` extensions to lodash', function(assert) {
+ assert.expect(1);
+
+ if (lodashBizarro) {
+ assert.notOk('_method' in lodashBizarro);
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+
+ QUnit.test('should avoid non-native built-ins', function(assert) {
+ assert.expect(7);
+
+ function message(lodashMethod, nativeMethod) {
+ return '`' + lodashMethod + '` should avoid overwritten native `' + nativeMethod + '`';
+ }
+
+ function Foo() {
+ this.a = 1;
+ }
+ Foo.prototype.b = 2;
+
+ var object = { 'a': 1 },
+ otherObject = { 'b': 2 },
+ largeArray = lodashStable.times(LARGE_ARRAY_SIZE, lodashStable.constant(object));
+
+ if (lodashBizarro) {
+ try {
+ var actual = lodashBizarro.keysIn(new Foo).sort();
+ } catch (e) {
+ actual = null;
+ }
+ var label = message('_.keysIn', 'Object#propertyIsEnumerable');
+ assert.deepEqual(actual, ['a', 'b'], label);
+
+ try {
+ var actual = lodashBizarro.isEmpty({});
+ } catch (e) {
+ actual = null;
+ }
+ var label = message('_.isEmpty', 'Object#propertyIsEnumerable');
+ assert.strictEqual(actual, true, label);
+
+ try {
+ actual = [
+ lodashBizarro.difference([object, otherObject], largeArray),
+ lodashBizarro.intersection(largeArray, [object]),
+ lodashBizarro.uniq(largeArray)
+ ];
+ } catch (e) {
+ actual = null;
+ }
+ label = message('_.difference`, `_.intersection`, and `_.uniq', 'Object.create` and `Map');
+ assert.deepEqual(actual, [[otherObject], [object], [object]], label);
+
+ try {
+ if (Symbol) {
+ object[symbol] = {};
+ }
+ actual = [
+ lodashBizarro.clone(object),
+ lodashBizarro.cloneDeep(object)
+ ];
+ } catch (e) {
+ actual = null;
+ }
+ label = message('_.clone` and `_.cloneDeep', 'Object.getOwnPropertySymbols');
+ assert.deepEqual(actual, [object, object], label);
+
+ try {
+ var symObject = Object(symbol);
+
+ // Avoid symbol detection in Babel's `typeof` helper.
+ symObject.constructor = Object;
+
+ actual = [
+ Symbol ? lodashBizarro.clone(symObject) : { 'constructor': Object },
+ Symbol ? lodashBizarro.isEqual(symObject, Object(symbol)) : false,
+ Symbol ? lodashBizarro.toString(symObject) : ''
+ ];
+ } catch (e) {
+ actual = null;
+ }
+ label = message('_.clone`, `_.isEqual`, and `_.toString', 'Symbol');
+ assert.deepEqual(actual, [{ 'constructor': Object }, false, ''], label);
+
+ try {
+ var map = new lodashBizarro.memoize.Cache;
+ actual = map.set('a', 1).get('a');
+ } catch (e) {
+ actual = null;
+ }
+ label = message('_.memoize.Cache', 'Map');
+ assert.deepEqual(actual, 1, label);
+
+ try {
+ map = new (Map || Object);
+ if (Symbol && Symbol.iterator) {
+ map[Symbol.iterator] = null;
+ }
+ actual = lodashBizarro.toArray(map);
+ } catch (e) {
+ actual = null;
+ }
+ label = message('_.toArray', 'Map');
+ assert.deepEqual(actual, [], label);
+ }
+ else {
+ skipAssert(assert, 7);
+ }
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('isIndex');
+
+ (function() {
+ var func = _._isIndex;
+
+ QUnit.test('should return `true` for indexes', function(assert) {
+ assert.expect(1);
+
+ if (func) {
+ var values = [[0], ['0'], ['1'], [3, 4], [MAX_SAFE_INTEGER - 1]],
+ expected = lodashStable.map(values, alwaysTrue);
+
+ var actual = lodashStable.map(values, function(args) {
+ return func.apply(undefined, args);
+ });
+
+ assert.deepEqual(actual, expected);
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+
+ QUnit.test('should return `false` for non-indexes', function(assert) {
+ assert.expect(1);
+
+ if (func) {
+ var values = [['1abc'], ['07'], ['0001'], [-1], [3, 3], [1.1], [MAX_SAFE_INTEGER]],
+ expected = lodashStable.map(values, alwaysFalse);
+
+ var actual = lodashStable.map(values, function(args) {
+ return func.apply(undefined, args);
+ });
+
+ assert.deepEqual(actual, expected);
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('isIterateeCall');
+
+ (function() {
+ var array = [1],
+ func = _._isIterateeCall,
+ object = { 'a': 1 };
+
+ QUnit.test('should return `true` for iteratee calls', function(assert) {
+ assert.expect(3);
+
+ function Foo() {}
+ Foo.prototype.a = 1;
+
+ if (func) {
+ assert.strictEqual(func(1, 0, array), true);
+ assert.strictEqual(func(1, 'a', object), true);
+ assert.strictEqual(func(1, 'a', new Foo), true);
+ }
+ else {
+ skipAssert(assert, 3);
+ }
+ });
+
+ QUnit.test('should return `false` for non-iteratee calls', function(assert) {
+ assert.expect(4);
+
+ if (func) {
+ assert.strictEqual(func(2, 0, array), false);
+ assert.strictEqual(func(1, 1.1, array), false);
+ assert.strictEqual(func(1, 0, { 'length': MAX_SAFE_INTEGER + 1 }), false);
+ assert.strictEqual(func(1, 'b', object), false);
+ }
+ else {
+ skipAssert(assert, 4);
+ }
+ });
+
+ QUnit.test('should work with `NaN` values', function(assert) {
+ assert.expect(2);
+
+ if (func) {
+ assert.strictEqual(func(NaN, 0, [NaN]), true);
+ assert.strictEqual(func(NaN, 'a', { 'a': NaN }), true);
+ }
+ else {
+ skipAssert(assert, 2);
+ }
+ });
+
+ QUnit.test('should not error when `index` is an object without a `toString` method', function(assert) {
+ assert.expect(1);
+
+ if (func) {
+ try {
+ var actual = func(1, { 'toString': null }, [1]);
+ } catch (e) {
+ var message = e.message;
+ }
+ assert.strictEqual(actual, false, message || '');
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash constructor');
+
+ (function() {
+ var values = empties.concat(true, 1, 'a'),
+ expected = lodashStable.map(values, alwaysTrue);
+
+ QUnit.test('should create a new instance when called without the `new` operator', function(assert) {
+ assert.expect(1);
+
+ if (!isNpm) {
+ var actual = lodashStable.map(values, function(value) {
+ return _(value) instanceof _;
+ });
+
+ assert.deepEqual(actual, expected);
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+
+ QUnit.test('should return the given `lodash` instances', function(assert) {
+ assert.expect(1);
+
+ if (!isNpm) {
+ var actual = lodashStable.map(values, function(value) {
+ var wrapped = _(value);
+ return _(wrapped) === wrapped;
+ });
+
+ assert.deepEqual(actual, expected);
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+
+ QUnit.test('should convert foreign wrapped values to `lodash` instances', function(assert) {
+ assert.expect(1);
+
+ if (!isNpm && lodashBizarro) {
+ var actual = lodashStable.map(values, function(value) {
+ var wrapped = _(lodashBizarro(value)),
+ unwrapped = wrapped.value();
+
+ return wrapped instanceof _ &&
+ ((unwrapped === value) || (unwrapped !== unwrapped && value !== value));
+ });
+
+ assert.deepEqual(actual, expected);
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.add');
+
+ (function() {
+ QUnit.test('should add two numbers', function(assert) {
+ assert.expect(3);
+
+ assert.strictEqual(_.add(6, 4), 10);
+ assert.strictEqual(_.add(-6, 4), -2);
+ assert.strictEqual(_.add(-6, -4), -10);
+ });
+
+ QUnit.test('should not coerce arguments to numbers', function(assert) {
+ assert.expect(2);
+
+ assert.strictEqual(_.add('6', '4'), '64');
+ assert.strictEqual(_.add('x', 'y'), 'xy');
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.after');
+
+ (function() {
+ function after(n, times) {
+ var count = 0;
+ lodashStable.times(times, _.after(n, function() { count++; }));
+ return count;
+ }
+
+ QUnit.test('should create a function that invokes `func` after `n` calls', function(assert) {
+ assert.expect(4);
+
+ assert.strictEqual(after(5, 5), 1, 'after(n) should invoke `func` after being called `n` times');
+ assert.strictEqual(after(5, 4), 0, 'after(n) should not invoke `func` before being called `n` times');
+ assert.strictEqual(after(0, 0), 0, 'after(0) should not invoke `func` immediately');
+ assert.strictEqual(after(0, 1), 1, 'after(0) should invoke `func` when called once');
+ });
+
+ QUnit.test('should coerce `n` values of `NaN` to `0`', function(assert) {
+ assert.expect(1);
+
+ assert.strictEqual(after(NaN, 1), 1);
+ });
+
+ QUnit.test('should not set a `this` binding', function(assert) {
+ assert.expect(2);
+
+ var after = _.after(1, function(assert) { return ++this.count; }),
+ object = { 'after': after, 'count': 0 };
+
+ object.after();
+ assert.strictEqual(object.after(), 2);
+ assert.strictEqual(object.count, 2);
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.ary');
+
+ (function() {
+ function fn(a, b, c) {
+ return slice.call(arguments);
+ }
+
+ QUnit.test('should cap the number of arguments provided to `func`', function(assert) {
+ assert.expect(2);
+
+ var actual = lodashStable.map(['6', '8', '10'], _.ary(parseInt, 1));
+ assert.deepEqual(actual, [6, 8, 10]);
+
+ var capped = _.ary(fn, 2);
+ assert.deepEqual(capped('a', 'b', 'c', 'd'), ['a', 'b']);
+ });
+
+ QUnit.test('should use `func.length` if `n` is not given', function(assert) {
+ assert.expect(1);
+
+ var capped = _.ary(fn);
+ assert.deepEqual(capped('a', 'b', 'c', 'd'), ['a', 'b', 'c']);
+ });
+
+ QUnit.test('should treat a negative `n` as `0`', function(assert) {
+ assert.expect(1);
+
+ var capped = _.ary(fn, -1);
+
+ try {
+ var actual = capped('a');
+ } catch (e) {}
+
+ assert.deepEqual(actual, []);
+ });
+
+ QUnit.test('should coerce `n` to an integer', function(assert) {
+ assert.expect(1);
+
+ var values = ['1', 1.6, 'xyz'],
+ expected = [['a'], ['a'], []];
+
+ var actual = lodashStable.map(values, function(n) {
+ var capped = _.ary(fn, n);
+ return capped('a', 'b');
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('should work when given less than the capped number of arguments', function(assert) {
+ assert.expect(1);
+
+ var capped = _.ary(fn, 3);
+ assert.deepEqual(capped('a'), ['a']);
+ });
+
+ QUnit.test('should use the existing `ary` if smaller', function(assert) {
+ assert.expect(1);
+
+ var capped = _.ary(_.ary(fn, 1), 2);
+ assert.deepEqual(capped('a', 'b', 'c'), ['a']);
+ });
+
+ QUnit.test('should work as an iteratee for methods like `_.map`', function(assert) {
+ assert.expect(1);
+
+ var funcs = lodashStable.map([fn], _.ary),
+ actual = funcs[0]('a', 'b', 'c');
+
+ assert.deepEqual(actual, ['a', 'b', 'c']);
+ });
+
+ QUnit.test('should work when combined with other methods that use metadata', function(assert) {
+ assert.expect(2);
+
+ var array = ['a', 'b', 'c'],
+ includes = _.curry(_.rearg(_.ary(_.includes, 2), 1, 0), 2);
+
+ assert.strictEqual(includes('b')(array, 2), true);
+
+ if (!isNpm) {
+ includes = _(_.includes).ary(2).rearg(1, 0).curry(2).value();
+ assert.strictEqual(includes('b')(array, 2), true);
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.assignIn');
+
+ (function() {
+ QUnit.test('should be aliased', function(assert) {
+ assert.expect(1);
+
+ assert.strictEqual(_.extend, _.assignIn);
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.assign and lodash.assignIn');
+
+ lodashStable.each(['assign', 'assignIn'], function(methodName) {
+ var func = _[methodName];
+
+ QUnit.test('`_.' + methodName + '` should assign source properties to `object`', function(assert) {
+ assert.expect(1);
+
+ assert.deepEqual(func({ 'a': 1 }, { 'b': 2 }), { 'a': 1, 'b': 2 });
+ });
+
+ QUnit.test('`_.' + methodName + '` should accept multiple sources', function(assert) {
+ assert.expect(2);
+
+ var expected = { 'a': 1, 'b': 2, 'c': 3 };
+ assert.deepEqual(func({ 'a': 1 }, { 'b': 2 }, { 'c': 3 }), expected);
+ assert.deepEqual(func({ 'a': 1 }, { 'b': 2, 'c': 2 }, { 'c': 3 }), expected);
+ });
+
+ QUnit.test('`_.' + methodName + '` should overwrite destination properties', function(assert) {
+ assert.expect(1);
+
+ var expected = { 'a': 3, 'b': 2, 'c': 1 };
+ assert.deepEqual(func({ 'a': 1, 'b': 2 }, expected), expected);
+ });
+
+ QUnit.test('`_.' + methodName + '` should assign source properties with nullish values', function(assert) {
+ assert.expect(1);
+
+ var expected = { 'a': null, 'b': undefined, 'c': null };
+ assert.deepEqual(func({ 'a': 1, 'b': 2 }, expected), expected);
+ });
+
+ QUnit.test('`_.' + methodName + '` should skip assignments if values are the same', function(assert) {
+ assert.expect(1);
+
+ var object = {};
+
+ var descriptor = {
+ 'configurable': true,
+ 'enumerable': true,
+ 'set': function() { throw new Error; }
+ };
+
+ var source = {
+ 'a': 1,
+ 'b': undefined,
+ 'c': NaN,
+ 'd': undefined,
+ 'constructor': Object,
+ 'toString': lodashStable.constant('source')
+ };
+
+ defineProperty(object, 'a', lodashStable.assign({}, descriptor, {
+ 'get': alwaysOne
+ }));
+
+ defineProperty(object, 'b', lodashStable.assign({}, descriptor, {
+ 'get': noop
+ }));
+
+ defineProperty(object, 'c', lodashStable.assign({}, descriptor, {
+ 'get': alwaysNaN
+ }));
+
+ defineProperty(object, 'constructor', lodashStable.assign({}, descriptor, {
+ 'get': lodashStable.constant(Object)
+ }));
+
+ try {
+ var actual = func(object, source);
+ } catch (e) {}
+
+ assert.deepEqual(actual, source);
+ });
+
+ QUnit.test('`_.' + methodName + '` should treat sparse array sources as dense', function(assert) {
+ assert.expect(1);
+
+ var array = [1];
+ array[2] = 3;
+
+ assert.deepEqual(func({}, array), { '0': 1, '1': undefined, '2': 3 });
+ });
+
+ QUnit.test('`_.' + methodName + '` should assign values of prototype objects', function(assert) {
+ assert.expect(1);
+
+ function Foo() {}
+ Foo.prototype.a = 1;
+
+ assert.deepEqual(func({}, Foo.prototype), { 'a': 1 });
+ });
+
+ QUnit.test('`_.' + methodName + '` should coerce string sources to objects', function(assert) {
+ assert.expect(1);
+
+ assert.deepEqual(func({}, 'a'), { '0': 'a' });
+ });
+ });
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.assignInWith');
+
+ (function() {
+ QUnit.test('should be aliased', function(assert) {
+ assert.expect(1);
+
+ assert.strictEqual(_.extendWith, _.assignInWith);
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.assignWith and lodash.assignInWith');
+
+ lodashStable.each(['assignWith', 'assignInWith'], function(methodName) {
+ var func = _[methodName];
+
+ QUnit.test('`_.' + methodName + '` should work with a `customizer` callback', function(assert) {
+ assert.expect(1);
+
+ var actual = func({ 'a': 1, 'b': 2 }, { 'a': 3, 'c': 3 }, function(a, b) {
+ return a === undefined ? b : a;
+ });
+
+ assert.deepEqual(actual, { 'a': 1, 'b': 2, 'c': 3 });
+ });
+
+ QUnit.test('`_.' + methodName + '` should work with a `customizer` that returns `undefined`', function(assert) {
+ assert.expect(1);
+
+ var expected = { 'a': undefined };
+ assert.deepEqual(func({}, expected, noop), expected);
+ });
+ });
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.at');
+
+ (function() {
+ var args = arguments,
+ array = ['a', 'b', 'c'],
+ object = { 'a': [{ 'b': { 'c': 3 } }, 4] };
+
+ QUnit.test('should return the elements corresponding to the specified keys', function(assert) {
+ assert.expect(1);
+
+ var actual = _.at(array, [0, 2]);
+ assert.deepEqual(actual, ['a', 'c']);
+ });
+
+ QUnit.test('should return `undefined` for nonexistent keys', function(assert) {
+ assert.expect(1);
+
+ var actual = _.at(array, [2, 4, 0]);
+ assert.deepEqual(actual, ['c', undefined, 'a']);
+ });
+
+ QUnit.test('should work with non-index keys on array values', function(assert) {
+ assert.expect(1);
+
+ var values = lodashStable.reject(empties, function(value) {
+ return (value === 0) || lodashStable.isArray(value);
+ }).concat(-1, 1.1);
+
+ var array = lodashStable.transform(values, function(result, value) {
+ result[value] = 1;
+ }, []);
+
+ var expected = lodashStable.map(values, alwaysOne),
+ actual = _.at(array, values);
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('should return an empty array when no keys are given', function(assert) {
+ assert.expect(2);
+
+ assert.deepEqual(_.at(array), []);
+ assert.deepEqual(_.at(array, [], []), []);
+ });
+
+ QUnit.test('should accept multiple key arguments', function(assert) {
+ assert.expect(1);
+
+ var actual = _.at(['a', 'b', 'c', 'd'], 3, 0, 2);
+ assert.deepEqual(actual, ['d', 'a', 'c']);
+ });
+
+ QUnit.test('should work with a falsey `object` argument when keys are given', function(assert) {
+ assert.expect(1);
+
+ var expected = lodashStable.map(falsey, lodashStable.constant(Array(4)));
+
+ var actual = lodashStable.map(falsey, function(object) {
+ try {
+ return _.at(object, 0, 1, 'pop', 'push');
+ } catch (e) {}
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('should work with an `arguments` object for `object`', function(assert) {
+ assert.expect(1);
+
+ var actual = _.at(args, [2, 0]);
+ assert.deepEqual(actual, [3, 1]);
+ });
+
+ QUnit.test('should work with `arguments` object as secondary arguments', function(assert) {
+ assert.expect(1);
+
+ var actual = _.at([1, 2, 3, 4, 5], args);
+ assert.deepEqual(actual, [2, 3, 4]);
+ });
+
+ QUnit.test('should work with an object for `object`', function(assert) {
+ assert.expect(1);
+
+ var actual = _.at(object, ['a[0].b.c', 'a[1]']);
+ assert.deepEqual(actual, [3, 4]);
+ });
+
+ QUnit.test('should pluck inherited property values', function(assert) {
+ assert.expect(1);
+
+ function Foo() {
+ this.a = 1;
+ }
+ Foo.prototype.b = 2;
+
+ var actual = _.at(new Foo, 'b');
+ assert.deepEqual(actual, [2]);
+ });
+
+ QUnit.test('should work in a lazy sequence', function(assert) {
+ assert.expect(6);
+
+ if (!isNpm) {
+ var largeArray = lodashStable.range(LARGE_ARRAY_SIZE),
+ smallArray = array;
+
+ lodashStable.each([[2], ['2'], [2, 1]], function(paths) {
+ lodashStable.times(2, function(index) {
+ var array = index ? largeArray : smallArray,
+ wrapped = _(array).map(identity).at(paths);
+
+ assert.deepEqual(wrapped.value(), _.at(_.map(array, identity), paths));
+ });
+ });
+ }
+ else {
+ skipAssert(assert, 6);
+ }
+ });
+
+ QUnit.test('should support shortcut fusion', function(assert) {
+ assert.expect(8);
+
+ if (!isNpm) {
+ var array = lodashStable.range(LARGE_ARRAY_SIZE),
+ count = 0,
+ iteratee = function(value) { count++; return square(value); },
+ lastIndex = LARGE_ARRAY_SIZE - 1;
+
+ lodashStable.each([lastIndex, lastIndex + '', LARGE_ARRAY_SIZE, []], function(n, index) {
+ count = 0;
+ var actual = _(array).map(iteratee).at(n).value(),
+ expected = index < 2 ? 1 : 0;
+
+ assert.strictEqual(count, expected);
+
+ expected = index == 3 ? [] : [index == 2 ? undefined : square(lastIndex)];
+ assert.deepEqual(actual, expected);
+ });
+ }
+ else {
+ skipAssert(assert, 8);
+ }
+ });
+
+ QUnit.test('work with an object for `object` when chaining', function(assert) {
+ assert.expect(2);
+
+ if (!isNpm) {
+ var paths = ['a[0].b.c', 'a[1]'],
+ actual = _(object).map(identity).at(paths).value();
+
+ assert.deepEqual(actual, _.at(_.map(object, identity), paths));
+
+ var indexObject = { '0': 1 };
+ actual = _(indexObject).at(0).value();
+ assert.deepEqual(actual, _.at(indexObject, 0));
+ }
+ else {
+ skipAssert(assert, 2);
+ }
+ });
+ }(1, 2, 3));
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.attempt');
+
+ (function() {
+ QUnit.test('should return the result of `func`', function(assert) {
+ assert.expect(1);
+
+ assert.strictEqual(_.attempt(lodashStable.constant('x')), 'x');
+ });
+
+ QUnit.test('should provide additional arguments to `func`', function(assert) {
+ assert.expect(1);
+
+ var actual = _.attempt(function() { return slice.call(arguments); }, 1, 2);
+ assert.deepEqual(actual, [1, 2]);
+ });
+
+ QUnit.test('should return the caught error', function(assert) {
+ assert.expect(1);
+
+ var expected = lodashStable.map(errors, alwaysTrue);
+
+ var actual = lodashStable.map(errors, function(error) {
+ return _.attempt(function() { throw error; }) === error;
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('should coerce errors to error objects', function(assert) {
+ assert.expect(1);
+
+ var actual = _.attempt(function() { throw 'x'; });
+ assert.ok(lodashStable.isEqual(actual, Error('x')));
+ });
+
+ QUnit.test('should preserve custom errors', function(assert) {
+ assert.expect(1);
+
+ var actual = _.attempt(function() { throw new CustomError('x'); });
+ assert.ok(actual instanceof CustomError);
+ });
+
+ QUnit.test('should work with an error object from another realm', function(assert) {
+ assert.expect(1);
+
+ if (realm.errors) {
+ var expected = lodashStable.map(realm.errors, alwaysTrue);
+
+ var actual = lodashStable.map(realm.errors, function(error) {
+ return _.attempt(function() { throw error; }) === error;
+ });
+
+ assert.deepEqual(actual, expected);
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+
+ QUnit.test('should return an unwrapped value when implicitly chaining', function(assert) {
+ assert.expect(1);
+
+ if (!isNpm) {
+ assert.strictEqual(_(lodashStable.constant('x')).attempt(), 'x');
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+
+ QUnit.test('should return a wrapped value when explicitly chaining', function(assert) {
+ assert.expect(1);
+
+ if (!isNpm) {
+ assert.ok(_(lodashStable.constant('x')).chain().attempt() instanceof _);
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.before');
+
+ (function() {
+ function before(n, times) {
+ var count = 0;
+ lodashStable.times(times, _.before(n, function() { count++; }));
+ return count;
+ }
+
+ QUnit.test('should create a function that invokes `func` after `n` calls', function(assert) {
+ assert.expect(4);
+
+ assert.strictEqual(before(5, 4), 4, 'before(n) should invoke `func` before being called `n` times');
+ assert.strictEqual(before(5, 6), 4, 'before(n) should not invoke `func` after being called `n - 1` times');
+ assert.strictEqual(before(0, 0), 0, 'before(0) should not invoke `func` immediately');
+ assert.strictEqual(before(0, 1), 0, 'before(0) should not invoke `func` when called');
+ });
+
+ QUnit.test('should coerce `n` values of `NaN` to `0`', function(assert) {
+ assert.expect(1);
+
+ assert.strictEqual(before(NaN, 1), 0);
+ });
+
+ QUnit.test('should not set a `this` binding', function(assert) {
+ assert.expect(2);
+
+ var before = _.before(2, function(assert) { return ++this.count; }),
+ object = { 'before': before, 'count': 0 };
+
+ object.before();
+ assert.strictEqual(object.before(), 1);
+ assert.strictEqual(object.count, 1);
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.bind');
+
+ (function() {
+ function fn() {
+ var result = [this];
+ push.apply(result, arguments);
+ return result;
+ }
+
+ QUnit.test('should bind a function to an object', function(assert) {
+ assert.expect(1);
+
+ var object = {},
+ bound = _.bind(fn, object);
+
+ assert.deepEqual(bound('a'), [object, 'a']);
+ });
+
+ QUnit.test('should accept a falsey `thisArg` argument', function(assert) {
+ assert.expect(1);
+
+ var values = lodashStable.reject(falsey.slice(1), function(value) { return value == null; }),
+ expected = lodashStable.map(values, function(value) { return [value]; });
+
+ var actual = lodashStable.map(values, function(value) {
+ try {
+ var bound = _.bind(fn, value);
+ return bound();
+ } catch (e) {}
+ });
+
+ assert.ok(lodashStable.every(actual, function(value, index) {
+ return lodashStable.isEqual(value, expected[index]);
+ }));
+ });
+
+ QUnit.test('should bind a function to nullish values', function(assert) {
+ assert.expect(6);
+
+ var bound = _.bind(fn, null),
+ actual = bound('a');
+
+ assert.ok((actual[0] === null) || (actual[0] && actual[0].Array));
+ assert.strictEqual(actual[1], 'a');
+
+ lodashStable.times(2, function(index) {
+ bound = index ? _.bind(fn, undefined) : _.bind(fn);
+ actual = bound('b');
+
+ assert.ok((actual[0] === undefined) || (actual[0] && actual[0].Array));
+ assert.strictEqual(actual[1], 'b');
+ });
+ });
+
+ QUnit.test('should partially apply arguments ', function(assert) {
+ assert.expect(4);
+
+ var object = {},
+ bound = _.bind(fn, object, 'a');
+
+ assert.deepEqual(bound(), [object, 'a']);
+
+ bound = _.bind(fn, object, 'a');
+ assert.deepEqual(bound('b'), [object, 'a', 'b']);
+
+ bound = _.bind(fn, object, 'a', 'b');
+ assert.deepEqual(bound(), [object, 'a', 'b']);
+ assert.deepEqual(bound('c', 'd'), [object, 'a', 'b', 'c', 'd']);
+ });
+
+ QUnit.test('should support placeholders', function(assert) {
+ assert.expect(4);
+
+ var object = {},
+ ph = _.bind.placeholder,
+ bound = _.bind(fn, object, ph, 'b', ph);
+
+ assert.deepEqual(bound('a', 'c'), [object, 'a', 'b', 'c']);
+ assert.deepEqual(bound('a'), [object, 'a', 'b', undefined]);
+ assert.deepEqual(bound('a', 'c', 'd'), [object, 'a', 'b', 'c', 'd']);
+ assert.deepEqual(bound(), [object, undefined, 'b', undefined]);
+ });
+
+ QUnit.test('should use `_.placeholder` when set', function(assert) {
+ assert.expect(1);
+
+ if (!isModularize) {
+ var _ph = _.placeholder = {},
+ ph = _.bind.placeholder,
+ object = {},
+ bound = _.bind(fn, object, _ph, 'b', ph);
+
+ assert.deepEqual(bound('a', 'c'), [object, 'a', 'b', ph, 'c']);
+ delete _.placeholder;
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+
+ QUnit.test('should create a function with a `length` of `0`', function(assert) {
+ assert.expect(2);
+
+ var fn = function(a, b, c) {},
+ bound = _.bind(fn, {});
+
+ assert.strictEqual(bound.length, 0);
+
+ bound = _.bind(fn, {}, 1);
+ assert.strictEqual(bound.length, 0);
+ });
+
+ QUnit.test('should ignore binding when called with the `new` operator', function(assert) {
+ assert.expect(3);
+
+ function Foo() {
+ return this;
+ }
+
+ var bound = _.bind(Foo, { 'a': 1 }),
+ newBound = new bound;
+
+ assert.strictEqual(bound().a, 1);
+ assert.strictEqual(newBound.a, undefined);
+ assert.ok(newBound instanceof Foo);
+ });
+
+ QUnit.test('should handle a number of arguments when called with the `new` operator', function(assert) {
+ assert.expect(1);
+
+ function Foo() {
+ return this;
+ }
+
+ function Bar() {}
+
+ var thisArg = { 'a': 1 },
+ boundFoo = _.bind(Foo, thisArg),
+ boundBar = _.bind(Bar, thisArg),
+ count = 9,
+ expected = lodashStable.times(count, lodashStable.constant([undefined, undefined]));
+
+ var actual = lodashStable.times(count, function(index) {
+ try {
+ switch (index) {
+ case 0: return [new boundFoo().a, new boundBar().a];
+ case 1: return [new boundFoo(1).a, new boundBar(1).a];
+ case 2: return [new boundFoo(1, 2).a, new boundBar(1, 2).a];
+ case 3: return [new boundFoo(1, 2, 3).a, new boundBar(1, 2, 3).a];
+ case 4: return [new boundFoo(1, 2, 3, 4).a, new boundBar(1, 2, 3, 4).a];
+ case 5: return [new boundFoo(1, 2, 3, 4, 5).a, new boundBar(1, 2, 3, 4, 5).a];
+ case 6: return [new boundFoo(1, 2, 3, 4, 5, 6).a, new boundBar(1, 2, 3, 4, 5, 6).a];
+ case 7: return [new boundFoo(1, 2, 3, 4, 5, 6, 7).a, new boundBar(1, 2, 3, 4, 5, 6, 7).a];
+ case 8: return [new boundFoo(1, 2, 3, 4, 5, 6, 7, 8).a, new boundBar(1, 2, 3, 4, 5, 6, 7, 8).a];
+ }
+ } catch (e) {}
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('should ensure `new bound` is an instance of `func`', function(assert) {
+ assert.expect(2);
+
+ function Foo(value) {
+ return value && object;
+ }
+
+ var bound = _.bind(Foo),
+ object = {};
+
+ assert.ok(new bound instanceof Foo);
+ assert.strictEqual(new bound(true), object);
+ });
+
+ QUnit.test('should append array arguments to partially applied arguments', function(assert) {
+ assert.expect(1);
+
+ var object = {},
+ bound = _.bind(fn, object, 'a');
+
+ assert.deepEqual(bound(['b'], 'c'), [object, 'a', ['b'], 'c']);
+ });
+
+ QUnit.test('should not rebind functions', function(assert) {
+ assert.expect(3);
+
+ var object1 = {},
+ object2 = {},
+ object3 = {};
+
+ var bound1 = _.bind(fn, object1),
+ bound2 = _.bind(bound1, object2, 'a'),
+ bound3 = _.bind(bound1, object3, 'b');
+
+ assert.deepEqual(bound1(), [object1]);
+ assert.deepEqual(bound2(), [object1, 'a']);
+ assert.deepEqual(bound3(), [object1, 'b']);
+ });
+
+ QUnit.test('should not error when instantiating bound built-ins', function(assert) {
+ assert.expect(2);
+
+ var Ctor = _.bind(Date, null),
+ expected = new Date(2012, 4, 23, 0, 0, 0, 0);
+
+ try {
+ var actual = new Ctor(2012, 4, 23, 0, 0, 0, 0);
+ } catch (e) {}
+
+ assert.deepEqual(actual, expected);
+
+ Ctor = _.bind(Date, null, 2012, 4, 23);
+
+ try {
+ actual = new Ctor(0, 0, 0, 0);
+ } catch (e) {}
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('should not error when calling bound class constructors with the `new` operator', function(assert) {
+ assert.expect(1);
+
+ var createCtor = lodashStable.attempt(Function, '"use strict";return class A{}');
+
+ if (typeof createCtor == 'function') {
+ var bound = _.bind(createCtor()),
+ count = 8,
+ expected = lodashStable.times(count, alwaysTrue);
+
+ var actual = lodashStable.times(count, function(index) {
+ try {
+ switch (index) {
+ case 0: return !!(new bound);
+ case 1: return !!(new bound(1));
+ case 2: return !!(new bound(1, 2));
+ case 3: return !!(new bound(1, 2, 3));
+ case 4: return !!(new bound(1, 2, 3, 4));
+ case 5: return !!(new bound(1, 2, 3, 4, 5));
+ case 6: return !!(new bound(1, 2, 3, 4, 5, 6));
+ case 7: return !!(new bound(1, 2, 3, 4, 5, 6, 7));
+ }
+ } catch (e) {}
+ });
+
+ assert.deepEqual(actual, expected);
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+
+ QUnit.test('should return a wrapped value when chaining', function(assert) {
+ assert.expect(2);
+
+ if (!isNpm) {
+ var object = {},
+ bound = _(fn).bind({}, 'a', 'b');
+
+ assert.ok(bound instanceof _);
+
+ var actual = bound.value()('c');
+ assert.deepEqual(actual, [object, 'a', 'b', 'c']);
+ }
+ else {
+ skipAssert(assert, 2);
+ }
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.bindAll');
+
+ (function() {
+ var args = arguments;
+
+ var source = {
+ '_n0': -2,
+ '_p0': -1,
+ '_a': 1,
+ '_b': 2,
+ '_c': 3,
+ '_d': 4,
+ '-0': function() { return this._n0; },
+ '0': function() { return this._p0; },
+ 'a': function() { return this._a; },
+ 'b': function() { return this._b; },
+ 'c': function() { return this._c; },
+ 'd': function() { return this._d; }
+ };
+
+ QUnit.test('should accept individual method names', function(assert) {
+ assert.expect(1);
+
+ var object = lodashStable.cloneDeep(source);
+ _.bindAll(object, 'a', 'b');
+
+ var actual = lodashStable.map(['a', 'b', 'c'], function(key) {
+ return object[key].call({});
+ });
+
+ assert.deepEqual(actual, [1, 2, undefined]);
+ });
+
+ QUnit.test('should accept arrays of method names', function(assert) {
+ assert.expect(1);
+
+ var object = lodashStable.cloneDeep(source);
+ _.bindAll(object, ['a', 'b'], ['c']);
+
+ var actual = lodashStable.map(['a', 'b', 'c', 'd'], function(key) {
+ return object[key].call({});
+ });
+
+ assert.deepEqual(actual, [1, 2, 3, undefined]);
+ });
+
+ QUnit.test('should preserve the sign of `0`', function(assert) {
+ assert.expect(1);
+
+ var props = [-0, Object(-0), 0, Object(0)];
+
+ var actual = lodashStable.map(props, function(key) {
+ var object = lodashStable.cloneDeep(source);
+ _.bindAll(object, key);
+ return object[lodashStable.toString(key)].call({});
+ });
+
+ assert.deepEqual(actual, [-2, -2, -1, -1]);
+ });
+
+ QUnit.test('should work with an array `object` argument', function(assert) {
+ assert.expect(1);
+
+ var array = ['push', 'pop'];
+ _.bindAll(array);
+ assert.strictEqual(array.pop, arrayProto.pop);
+ });
+
+ QUnit.test('should work with `arguments` objects as secondary arguments', function(assert) {
+ assert.expect(1);
+
+ var object = lodashStable.cloneDeep(source);
+ _.bindAll(object, args);
+
+ var actual = lodashStable.map(args, function(key) {
+ return object[key].call({});
+ });
+
+ assert.deepEqual(actual, [1]);
+ });
+ }('a'));
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.bindKey');
+
+ (function() {
+ QUnit.test('should work when the target function is overwritten', function(assert) {
+ assert.expect(2);
+
+ var object = {
+ 'user': 'fred',
+ 'greet': function(greeting) {
+ return this.user + ' says: ' + greeting;
+ }
+ };
+
+ var bound = _.bindKey(object, 'greet', 'hi');
+ assert.strictEqual(bound(), 'fred says: hi');
+
+ object.greet = function(greeting) {
+ return this.user + ' says: ' + greeting + '!';
+ };
+
+ assert.strictEqual(bound(), 'fred says: hi!');
+ });
+
+ QUnit.test('should support placeholders', function(assert) {
+ assert.expect(4);
+
+ var object = {
+ 'fn': function() {
+ return slice.call(arguments);
+ }
+ };
+
+ var ph = _.bindKey.placeholder,
+ bound = _.bindKey(object, 'fn', ph, 'b', ph);
+
+ assert.deepEqual(bound('a', 'c'), ['a', 'b', 'c']);
+ assert.deepEqual(bound('a'), ['a', 'b', undefined]);
+ assert.deepEqual(bound('a', 'c', 'd'), ['a', 'b', 'c', 'd']);
+ assert.deepEqual(bound(), [undefined, 'b', undefined]);
+ });
+
+ QUnit.test('should use `_.placeholder` when set', function(assert) {
+ assert.expect(1);
+
+ if (!isModularize) {
+ var object = {
+ 'fn': function() {
+ return slice.call(arguments);
+ }
+ };
+
+ var _ph = _.placeholder = {},
+ ph = _.bindKey.placeholder,
+ bound = _.bindKey(object, 'fn', _ph, 'b', ph);
+
+ assert.deepEqual(bound('a', 'c'), ['a', 'b', ph, 'c']);
+ delete _.placeholder;
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+
+ QUnit.test('should ensure `new bound` is an instance of `object[key]`', function(assert) {
+ assert.expect(2);
+
+ function Foo(value) {
+ return value && object;
+ }
+
+ var object = { 'Foo': Foo },
+ bound = _.bindKey(object, 'Foo');
+
+ assert.ok(new bound instanceof Foo);
+ assert.strictEqual(new bound(true), object);
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('case methods');
+
+ lodashStable.each(['camel', 'kebab', 'lower', 'snake', 'start', 'upper'], function(caseName) {
+ var methodName = caseName + 'Case',
+ func = _[methodName];
+
+ var strings = [
+ 'foo bar', 'Foo bar', 'foo Bar', 'Foo Bar',
+ 'FOO BAR', 'fooBar', '--foo-bar--', '__foo_bar__'
+ ];
+
+ var converted = (function() {
+ switch (caseName) {
+ case 'camel': return 'fooBar';
+ case 'kebab': return 'foo-bar';
+ case 'lower': return 'foo bar';
+ case 'snake': return 'foo_bar';
+ case 'start': return 'Foo Bar';
+ case 'upper': return 'FOO BAR';
+ }
+ }());
+
+ QUnit.test('`_.' + methodName + '` should convert `string` to ' + caseName + ' case', function(assert) {
+ assert.expect(1);
+
+ var actual = lodashStable.map(strings, function(string) {
+ var expected = (caseName == 'start' && string == 'FOO BAR') ? string : converted;
+ return func(string) === expected;
+ });
+
+ assert.deepEqual(actual, lodashStable.map(strings, alwaysTrue));
+ });
+
+ QUnit.test('`_.' + methodName + '` should handle double-converting strings', function(assert) {
+ assert.expect(1);
+
+ var actual = lodashStable.map(strings, function(string) {
+ var expected = (caseName == 'start' && string == 'FOO BAR') ? string : converted;
+ return func(func(string)) === expected;
+ });
+
+ assert.deepEqual(actual, lodashStable.map(strings, alwaysTrue));
+ });
+
+ QUnit.test('`_.' + methodName + '` should deburr letters', function(assert) {
+ assert.expect(1);
+
+ var actual = lodashStable.map(burredLetters, function(burred, index) {
+ var letter = deburredLetters[index];
+ if (caseName == 'start') {
+ letter = lodashStable.capitalize(letter);
+ } else if (caseName == 'upper') {
+ letter = letter.toUpperCase();
+ } else {
+ letter = letter.toLowerCase();
+ }
+ return func(burred) === letter;
+ });
+
+ assert.deepEqual(actual, lodashStable.map(burredLetters, alwaysTrue));
+ });
+
+ QUnit.test('`_.' + methodName + '` should remove contraction apostrophes', function(assert) {
+ assert.expect(2);
+
+ var postfixes = ['d', 'll', 'm', 're', 's', 't', 've'];
+
+ lodashStable.each(["'", '\u2019'], function(apos) {
+ var actual = lodashStable.map(postfixes, function(postfix) {
+ return func('a b' + apos + postfix + ' c');
+ });
+
+ var expected = lodashStable.map(postfixes, function(postfix) {
+ switch (caseName) {
+ case 'camel': return 'aB' + postfix + 'C';
+ case 'kebab': return 'a-b' + postfix + '-c';
+ case 'lower': return 'a b' + postfix + ' c';
+ case 'snake': return 'a_b' + postfix + '_c';
+ case 'start': return 'A B' + postfix + ' C';
+ case 'upper': return 'A B' + postfix.toUpperCase() + ' C';
+ }
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+ });
+
+ QUnit.test('`_.' + methodName + '` should remove latin-1 mathematical operators', function(assert) {
+ assert.expect(1);
+
+ var actual = lodashStable.map(['\xd7', '\xf7'], func);
+ assert.deepEqual(actual, ['', '']);
+ });
+
+ QUnit.test('`_.' + methodName + '` should coerce `string` to a string', function(assert) {
+ assert.expect(2);
+
+ var string = 'foo bar';
+ assert.strictEqual(func(Object(string)), converted);
+ assert.strictEqual(func({ 'toString': lodashStable.constant(string) }), converted);
+ });
+
+ QUnit.test('`_.' + methodName + '` should return an unwrapped value implicitly when chaining', function(assert) {
+ assert.expect(1);
+
+ if (!isNpm) {
+ assert.strictEqual(_('foo bar')[methodName](), converted);
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+
+ QUnit.test('`_.' + methodName + '` should return a wrapped value when explicitly chaining', function(assert) {
+ assert.expect(1);
+
+ if (!isNpm) {
+ assert.ok(_('foo bar').chain()[methodName]() instanceof _);
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+ });
+
+ (function() {
+ QUnit.test('should get the original value after cycling through all case methods', function(assert) {
+ assert.expect(1);
+
+ var funcs = [_.camelCase, _.kebabCase, _.lowerCase, _.snakeCase, _.startCase, _.lowerCase, _.camelCase];
+
+ var actual = lodashStable.reduce(funcs, function(result, func) {
+ return func(result);
+ }, 'enable 6h format');
+
+ assert.strictEqual(actual, 'enable6HFormat');
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.camelCase');
+
+ (function() {
+ QUnit.test('should work with numbers', function(assert) {
+ assert.expect(6);
+
+ assert.strictEqual(_.camelCase('12 feet'), '12Feet');
+ assert.strictEqual(_.camelCase('enable 6h format'), 'enable6HFormat');
+ assert.strictEqual(_.camelCase('enable 24H format'), 'enable24HFormat');
+ assert.strictEqual(_.camelCase('too legit 2 quit'), 'tooLegit2Quit');
+ assert.strictEqual(_.camelCase('walk 500 miles'), 'walk500Miles');
+ assert.strictEqual(_.camelCase('xhr2 request'), 'xhr2Request');
+ });
+
+ QUnit.test('should handle acronyms', function(assert) {
+ assert.expect(6);
+
+ lodashStable.each(['safe HTML', 'safeHTML'], function(string) {
+ assert.strictEqual(_.camelCase(string), 'safeHtml');
+ });
+
+ lodashStable.each(['escape HTML entities', 'escapeHTMLEntities'], function(string) {
+ assert.strictEqual(_.camelCase(string), 'escapeHtmlEntities');
+ });
+
+ lodashStable.each(['XMLHttpRequest', 'XmlHTTPRequest'], function(string) {
+ assert.strictEqual(_.camelCase(string), 'xmlHttpRequest');
+ });
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.capitalize');
+
+ (function() {
+ QUnit.test('should capitalize the first character of a string', function(assert) {
+ assert.expect(3);
+
+ assert.strictEqual(_.capitalize('fred'), 'Fred');
+ assert.strictEqual(_.capitalize('Fred'), 'Fred');
+ assert.strictEqual(_.capitalize(' fred'), ' fred');
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.castArray');
+
+ (function() {
+ QUnit.test('should wrap non-array items in an array', function(assert) {
+ assert.expect(1);
+
+ var values = falsey.concat(true, 1, 'a', { 'a': 1 }),
+ expected = lodashStable.map(values, function(value) { return [value]; }),
+ actual = lodashStable.map(values, _.castArray);
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('should return array values by reference', function(assert) {
+ assert.expect(1);
+
+ var array = [1];
+ assert.strictEqual(_.castArray(array), array);
+ });
+
+ QUnit.test('should return an empty array when no arguments are given', function(assert) {
+ assert.expect(1);
+
+ assert.deepEqual(_.castArray(), []);
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.chain');
+
+ (function() {
+ QUnit.test('should return a wrapped value', function(assert) {
+ assert.expect(1);
+
+ if (!isNpm) {
+ var actual = _.chain({ 'a': 0 });
+ assert.ok(actual instanceof _);
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+
+ QUnit.test('should return existing wrapped values', function(assert) {
+ assert.expect(2);
+
+ if (!isNpm) {
+ var wrapped = _({ 'a': 0 });
+ assert.strictEqual(_.chain(wrapped), wrapped);
+ assert.strictEqual(wrapped.chain(), wrapped);
+ }
+ else {
+ skipAssert(assert, 2);
+ }
+ });
+
+ QUnit.test('should enable chaining for methods that return unwrapped values', function(assert) {
+ assert.expect(6);
+
+ if (!isNpm) {
+ var array = ['c', 'b', 'a'];
+
+ assert.ok(_.chain(array).head() instanceof _);
+ assert.ok(_(array).chain().head() instanceof _);
+
+ assert.ok(_.chain(array).isArray() instanceof _);
+ assert.ok(_(array).chain().isArray() instanceof _);
+
+ assert.ok(_.chain(array).sortBy().head() instanceof _);
+ assert.ok(_(array).chain().sortBy().head() instanceof _);
+ }
+ else {
+ skipAssert(assert, 6);
+ }
+ });
+
+ QUnit.test('should chain multiple methods', function(assert) {
+ assert.expect(6);
+
+ if (!isNpm) {
+ lodashStable.times(2, function(index) {
+ var array = ['one two three four', 'five six seven eight', 'nine ten eleven twelve'],
+ expected = { ' ': 9, 'e': 14, 'f': 2, 'g': 1, 'h': 2, 'i': 4, 'l': 2, 'n': 6, 'o': 3, 'r': 2, 's': 2, 't': 5, 'u': 1, 'v': 4, 'w': 2, 'x': 1 },
+ wrapped = index ? _(array).chain() : _.chain(array);
+
+ var actual = wrapped
+ .chain()
+ .map(function(value) { return value.split(''); })
+ .flatten()
+ .reduce(function(object, chr) {
+ object[chr] || (object[chr] = 0);
+ object[chr]++;
+ return object;
+ }, {})
+ .value();
+
+ assert.deepEqual(actual, expected);
+
+ array = [1, 2, 3, 4, 5, 6];
+ wrapped = index ? _(array).chain() : _.chain(array);
+ actual = wrapped
+ .chain()
+ .filter(function(n) { return n % 2 != 0; })
+ .reject(function(n) { return n % 3 == 0; })
+ .sortBy(function(n) { return -n; })
+ .value();
+
+ assert.deepEqual(actual, [5, 1]);
+
+ array = [3, 4];
+ wrapped = index ? _(array).chain() : _.chain(array);
+ actual = wrapped
+ .reverse()
+ .concat([2, 1])
+ .unshift(5)
+ .tap(function(value) { value.pop(); })
+ .map(square)
+ .value();
+
+ assert.deepEqual(actual, [25, 16, 9, 4]);
+ });
+ }
+ else {
+ skipAssert(assert, 6);
+ }
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.chunk');
+
+ (function() {
+ var array = [0, 1, 2, 3, 4, 5];
+
+ QUnit.test('should return chunked arrays', function(assert) {
+ assert.expect(1);
+
+ var actual = _.chunk(array, 3);
+ assert.deepEqual(actual, [[0, 1, 2], [3, 4, 5]]);
+ });
+
+ QUnit.test('should return the last chunk as remaining elements', function(assert) {
+ assert.expect(1);
+
+ var actual = _.chunk(array, 4);
+ assert.deepEqual(actual, [[0, 1, 2, 3], [4, 5]]);
+ });
+
+ QUnit.test('should treat falsey `size` values, except `undefined`, as `0`', function(assert) {
+ assert.expect(1);
+
+ var expected = lodashStable.map(falsey, function(value) {
+ return value === undefined ? [[0], [1], [2], [3], [4], [5]] : [];
+ });
+
+ var actual = lodashStable.map(falsey, function(size, index) {
+ return index ? _.chunk(array, size) : _.chunk(array);
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('should ensure the minimum `size` is `0`', function(assert) {
+ assert.expect(1);
+
+ var values = lodashStable.reject(falsey, lodashStable.isUndefined).concat(-1, -Infinity),
+ expected = lodashStable.map(values, alwaysEmptyArray);
+
+ var actual = lodashStable.map(values, function(n) {
+ return _.chunk(array, n);
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('should coerce `size` to an integer', function(assert) {
+ assert.expect(1);
+
+ assert.deepEqual(_.chunk(array, array.length / 4), [[0], [1], [2], [3], [4], [5]]);
+ });
+
+ QUnit.test('should work as an iteratee for methods like `_.map`', function(assert) {
+ assert.expect(1);
+
+ var actual = lodashStable.map([[1, 2], [3, 4]], _.chunk);
+ assert.deepEqual(actual, [[[1], [2]], [[3], [4]]]);
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.clamp');
+
+ (function() {
+ QUnit.test('should work with a `max` argument', function(assert) {
+ assert.expect(2);
+
+ assert.strictEqual(_.clamp(5, 3), 3);
+ assert.strictEqual(_.clamp(1, 3), 1);
+ });
+
+ QUnit.test('should clamp negative numbers', function(assert) {
+ assert.expect(3);
+
+ assert.strictEqual(_.clamp(-10, -5, 5), -5);
+ assert.strictEqual(_.clamp(-10.2, -5.5, 5.5), -5.5);
+ assert.strictEqual(_.clamp(-Infinity, -5, 5), -5);
+ });
+
+ QUnit.test('should clamp positive numbers', function(assert) {
+ assert.expect(3);
+
+ assert.strictEqual(_.clamp(10, -5, 5), 5);
+ assert.strictEqual(_.clamp(10.6, -5.6, 5.4), 5.4);
+ assert.strictEqual(_.clamp(Infinity, -5, 5), 5);
+ });
+
+ QUnit.test('should not alter negative numbers in range', function(assert) {
+ assert.expect(3);
+
+ assert.strictEqual(_.clamp(-4, -5, 5), -4);
+ assert.strictEqual(_.clamp(-5, -5, 5), -5);
+ assert.strictEqual(_.clamp(-5.5, -5.6, 5.6), -5.5);
+ });
+
+ QUnit.test('should not alter positive numbers in range', function(assert) {
+ assert.expect(3);
+
+ assert.strictEqual(_.clamp(4, -5, 5), 4);
+ assert.strictEqual(_.clamp(5, -5, 5), 5);
+ assert.strictEqual(_.clamp(4.5, -5.1, 5.2), 4.5);
+ });
+
+ QUnit.test('should not alter `0` in range', function(assert) {
+ assert.expect(1);
+
+ assert.strictEqual(1 / _.clamp(0, -5, 5), Infinity);
+ });
+
+ QUnit.test('should clamp to `0`', function(assert) {
+ assert.expect(1);
+
+ assert.strictEqual(1 / _.clamp(-10, 0, 5), Infinity);
+ });
+
+ QUnit.test('should not alter `-0` in range', function(assert) {
+ assert.expect(1);
+
+ assert.strictEqual(1 / _.clamp(-0, -5, 5), -Infinity);
+ });
+
+ QUnit.test('should clamp to `-0`', function(assert) {
+ assert.expect(1);
+
+ assert.strictEqual(1 / _.clamp(-10, -0, 5), -Infinity);
+ });
+
+ QUnit.test('should return `NaN` when `number` is `NaN`', function(assert) {
+ assert.expect(1);
+
+ assert.deepEqual(_.clamp(NaN, -5, 5), NaN);
+ });
+
+ QUnit.test('should coerce `min` and `max` of `NaN` to `0`', function(assert) {
+ assert.expect(2);
+
+ assert.deepEqual(_.clamp(1, -5, NaN), 0);
+ assert.deepEqual(_.clamp(-1, NaN, 5), 0);
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('clone methods');
+
+ (function() {
+ function Foo() {
+ this.a = 1;
+ }
+ Foo.prototype.b = 1;
+ Foo.c = function() {};
+
+ if (Map) {
+ var map = new Map;
+ map.set('a', 1);
+ map.set('b', 2);
+ }
+ if (Set) {
+ var set = new Set;
+ set.add(1);
+ set.add(2);
+ }
+ var objects = {
+ '`arguments` objects': arguments,
+ 'arrays': ['a', ''],
+ 'array-like-objects': { '0': 'a', '1': '', 'length': 3 },
+ 'booleans': false,
+ 'boolean objects': Object(false),
+ 'date objects': new Date,
+ 'Foo instances': new Foo,
+ 'objects': { 'a': 0, 'b': 1, 'c': 2 },
+ 'objects with object values': { 'a': /a/, 'b': ['B'], 'c': { 'C': 1 } },
+ 'objects from another document': realm.object || {},
+ 'maps': map,
+ 'null values': null,
+ 'numbers': 0,
+ 'number objects': Object(0),
+ 'regexes': /a/gim,
+ 'sets': set,
+ 'strings': 'a',
+ 'string objects': Object('a'),
+ 'undefined values': undefined
+ };
+
+ objects.arrays.length = 3;
+
+ var uncloneable = {
+ 'DOM elements': body,
+ 'functions': Foo,
+ 'generators': generator
+ };
+
+ lodashStable.each(errors, function(error) {
+ uncloneable[error.name + 's'] = error;
+ });
+
+ QUnit.test('`_.clone` should perform a shallow clone', function(assert) {
+ assert.expect(2);
+
+ var array = [{ 'a': 0 }, { 'b': 1 }],
+ actual = _.clone(array);
+
+ assert.deepEqual(actual, array);
+ assert.ok(actual !== array && actual[0] === array[0]);
+ });
+
+ QUnit.test('`_.cloneDeep` should deep clone objects with circular references', function(assert) {
+ assert.expect(1);
+
+ var object = {
+ 'foo': { 'b': { 'c': { 'd': {} } } },
+ 'bar': {}
+ };
+
+ object.foo.b.c.d = object;
+ object.bar.b = object.foo.b;
+
+ var actual = _.cloneDeep(object);
+ assert.ok(actual.bar.b === actual.foo.b && actual === actual.foo.b.c.d && actual !== object);
+ });
+
+ QUnit.test('`_.cloneDeep` should deep clone objects with lots of circular references', function(assert) {
+ assert.expect(2);
+
+ var cyclical = {};
+ lodashStable.times(LARGE_ARRAY_SIZE + 1, function(index) {
+ cyclical['v' + index] = [index ? cyclical['v' + (index - 1)] : cyclical];
+ });
+
+ var clone = _.cloneDeep(cyclical),
+ actual = clone['v' + LARGE_ARRAY_SIZE][0];
+
+ assert.strictEqual(actual, clone['v' + (LARGE_ARRAY_SIZE - 1)]);
+ assert.notStrictEqual(actual, cyclical['v' + (LARGE_ARRAY_SIZE - 1)]);
+ });
+
+ QUnit.test('`_.cloneDeepWith` should provide `stack` to `customizer`', function(assert) {
+ assert.expect(164);
+
+ var Stack,
+ keys = [null, undefined, false, true, 1, -Infinity, NaN, {}, 'a', symbol || {}];
+
+ var pairs = lodashStable.map(keys, function(key, index) {
+ var lastIndex = keys.length - 1;
+ return [key, keys[lastIndex - index]];
+ });
+
+ _.cloneDeepWith({ 'a': 1 }, function() {
+ if (arguments.length > 1) {
+ Stack || (Stack = _.last(arguments).constructor);
+ }
+ });
+
+ var stacks = [new Stack(pairs), new Stack(pairs)];
+
+ lodashStable.times(LARGE_ARRAY_SIZE - pairs.length + 1, function() {
+ stacks[1].set({}, {});
+ });
+
+ lodashStable.each(stacks, function(stack) {
+ lodashStable.each(keys, function(key, index) {
+ var value = pairs[index][1];
+
+ assert.deepEqual(stack.get(key), value);
+ assert.strictEqual(stack.has(key), true);
+ assert.strictEqual(stack['delete'](key), true);
+ assert.strictEqual(stack.has(key), false);
+ assert.strictEqual(stack.get(key), undefined);
+ assert.strictEqual(stack['delete'](key), false);
+ assert.strictEqual(stack.set(key, value), stack);
+ assert.strictEqual(stack.has(key), true);
+ });
+
+ assert.strictEqual(stack.clear(), undefined);
+ assert.ok(lodashStable.every(keys, function(key) {
+ return !stack.has(key);
+ }));
+ });
+ });
+
+ lodashStable.each(['clone', 'cloneDeep'], function(methodName) {
+ var func = _[methodName],
+ isDeep = methodName == 'cloneDeep';
+
+ lodashStable.forOwn(objects, function(object, key) {
+ QUnit.test('`_.' + methodName + '` should clone ' + key, function(assert) {
+ assert.expect(2);
+
+ var isEqual = (key == 'maps' || key == 'sets') ? _.isEqual : lodashStable.isEqual,
+ actual = func(object);
+
+ assert.ok(isEqual(actual, object));
+
+ if (lodashStable.isObject(object)) {
+ assert.notStrictEqual(actual, object);
+ } else {
+ assert.strictEqual(actual, object);
+ }
+ });
+ });
+
+ QUnit.test('`_.' + methodName + '` should clone array buffers', function(assert) {
+ assert.expect(2);
+
+ if (ArrayBuffer) {
+ var actual = func(arrayBuffer);
+ assert.strictEqual(actual.byteLength, arrayBuffer.byteLength);
+ assert.notStrictEqual(actual, arrayBuffer);
+ }
+ else {
+ skipAssert(assert, 2);
+ }
+ });
+
+ QUnit.test('`_.' + methodName + '` should clone buffers', function(assert) {
+ assert.expect(4);
+
+ if (Buffer) {
+ var buffer = new Buffer([1, 2]),
+ actual = func(buffer);
+
+ assert.strictEqual(actual.byteLength, buffer.byteLength);
+ assert.strictEqual(actual.inspect(), buffer.inspect());
+ assert.notStrictEqual(actual, buffer);
+
+ buffer[0] = 2;
+ assert.strictEqual(actual[0], isDeep ? 2 : 1);
+ }
+ else {
+ skipAssert(assert, 4);
+ }
+ });
+
+ QUnit.test('`_.' + methodName + '` should clone `index` and `input` array properties', function(assert) {
+ assert.expect(2);
+
+ var array = /c/.exec('abcde'),
+ actual = func(array);
+
+ assert.strictEqual(actual.index, 2);
+ assert.strictEqual(actual.input, 'abcde');
+ });
+
+ QUnit.test('`_.' + methodName + '` should clone `lastIndex` regexp property', function(assert) {
+ assert.expect(1);
+
+ var regexp = /c/g;
+ regexp.exec('abcde');
+
+ assert.strictEqual(func(regexp).lastIndex, 3);
+ });
+
+ QUnit.test('`_.' + methodName + '` should clone expando properties', function(assert) {
+ assert.expect(1);
+
+ var values = lodashStable.map([false, true, 1, 'a'], function(value) {
+ var object = Object(value);
+ object.a = 1;
+ return object;
+ });
+
+ var expected = lodashStable.map(values, alwaysTrue);
+
+ var actual = lodashStable.map(values, function(value) {
+ return func(value).a === 1;
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('`_.' + methodName + '` should clone prototype objects', function(assert) {
+ assert.expect(2);
+
+ var actual = func(Foo.prototype);
+
+ assert.notOk(actual instanceof Foo);
+ assert.deepEqual(actual, { 'b': 1 });
+ });
+
+ QUnit.test('`_.' + methodName + '` should set the `[[Prototype]]` of a clone', function(assert) {
+ assert.expect(1);
+
+ assert.ok(func(new Foo) instanceof Foo);
+ });
+
+ QUnit.test('`_.' + methodName + '` should set the `[[Prototype]]` of a clone even when the `constructor` is incorrect', function(assert) {
+ assert.expect(1);
+
+ Foo.prototype.constructor = Object;
+ assert.ok(func(new Foo) instanceof Foo);
+ Foo.prototype.constructor = Foo;
+ });
+
+ QUnit.test('`_.' + methodName + '` should ensure `value` constructor is a function before using its `[[Prototype]]`', function(assert) {
+ assert.expect(1);
+
+ Foo.prototype.constructor = null;
+ assert.notOk(func(new Foo) instanceof Foo);
+ Foo.prototype.constructor = Foo;
+ });
+
+ QUnit.test('`_.' + methodName + '` should clone properties that shadow those on `Object.prototype`', function(assert) {
+ assert.expect(2);
+
+ var object = {
+ 'constructor': objectProto.constructor,
+ 'hasOwnProperty': objectProto.hasOwnProperty,
+ 'isPrototypeOf': objectProto.isPrototypeOf,
+ 'propertyIsEnumerable': objectProto.propertyIsEnumerable,
+ 'toLocaleString': objectProto.toLocaleString,
+ 'toString': objectProto.toString,
+ 'valueOf': objectProto.valueOf
+ };
+
+ var actual = func(object);
+
+ assert.deepEqual(actual, object);
+ assert.notStrictEqual(actual, object);
+ });
+
+ QUnit.test('`_.' + methodName + '` should clone symbol properties', function(assert) {
+ assert.expect(3);
+
+ function Foo() {
+ this[symbol] = { 'c': 1 };
+ }
+
+ if (Symbol) {
+ var symbol2 = Symbol('b');
+ Foo.prototype[symbol2] = 2;
+
+ var object = { 'a': { 'b': new Foo } };
+ object[symbol] = { 'b': 1 };
+
+ var actual = func(object);
+
+ assert.deepEqual(getSymbols(actual.a.b), [symbol]);
+
+ if (isDeep) {
+ assert.deepEqual(actual[symbol], object[symbol]);
+ assert.deepEqual(actual.a.b[symbol], object.a.b[symbol]);
+ }
+ else {
+ assert.strictEqual(actual[symbol], object[symbol]);
+ assert.strictEqual(actual.a, object.a);
+ }
+ }
+ else {
+ skipAssert(assert, 3);
+ }
+ });
+
+ QUnit.test('`_.' + methodName + '` should clone symbol objects', function(assert) {
+ assert.expect(4);
+
+ if (Symbol) {
+ assert.strictEqual(func(symbol), symbol);
+
+ var object = Object(symbol),
+ actual = func(object);
+
+ assert.strictEqual(typeof actual, 'object');
+ assert.strictEqual(typeof actual.valueOf(), 'symbol');
+ assert.notStrictEqual(actual, object);
+ }
+ else {
+ skipAssert(assert, 4);
+ }
+ });
+
+ QUnit.test('`_.' + methodName + '` should not clone symbol primitives', function(assert) {
+ assert.expect(1);
+
+ if (Symbol) {
+ assert.strictEqual(func(symbol), symbol);
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+
+ QUnit.test('`_.' + methodName + '` should not error on DOM elements', function(assert) {
+ assert.expect(1);
+
+ if (document) {
+ var element = document.createElement('div');
+
+ try {
+ assert.deepEqual(func(element), {});
+ } catch (e) {
+ assert.ok(false, e.message);
+ }
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+
+ QUnit.test('`_.' + methodName + '` should create an object from the same realm as `value`', function(assert) {
+ assert.expect(1);
+
+ var props = [];
+
+ var objects = lodashStable.transform(_, function(result, value, key) {
+ if (lodashStable.startsWith(key, '_') && lodashStable.isObject(value) &&
+ !lodashStable.isArguments(value) && !lodashStable.isElement(value) &&
+ !lodashStable.isFunction(value)) {
+ props.push(lodashStable.capitalize(lodashStable.camelCase(key)));
+ result.push(value);
+ }
+ }, []);
+
+ var expected = lodashStable.map(objects, alwaysTrue);
+
+ var actual = lodashStable.map(objects, function(object) {
+ var Ctor = object.constructor,
+ result = func(object);
+
+ return result !== object && ((result instanceof Ctor) || !(new Ctor instanceof Ctor));
+ });
+
+ assert.deepEqual(actual, expected, props.join(', '));
+ });
+
+ QUnit.test('`_.' + methodName + '` should perform a ' + (isDeep ? 'deep' : 'shallow') + ' clone when used as an iteratee for methods like `_.map`', function(assert) {
+ assert.expect(2);
+
+ var expected = [{ 'a': [0] }, { 'b': [1] }],
+ actual = lodashStable.map(expected, func);
+
+ assert.deepEqual(actual, expected);
+
+ if (isDeep) {
+ assert.ok(actual[0] !== expected[0] && actual[0].a !== expected[0].a && actual[1].b !== expected[1].b);
+ } else {
+ assert.ok(actual[0] !== expected[0] && actual[0].a === expected[0].a && actual[1].b === expected[1].b);
+ }
+ });
+
+ QUnit.test('`_.' + methodName + '` should return a unwrapped value when chaining', function(assert) {
+ assert.expect(2);
+
+ if (!isNpm) {
+ var object = objects.objects,
+ actual = _(object)[methodName]();
+
+ assert.deepEqual(actual, object);
+ assert.notStrictEqual(actual, object);
+ }
+ else {
+ skipAssert(assert, 2);
+ }
+ });
+
+ lodashStable.each(arrayViews, function(type) {
+ QUnit.test('`_.' + methodName + '` should clone ' + type + ' values', function(assert) {
+ assert.expect(10);
+
+ var Ctor = root[type];
+
+ lodashStable.times(2, function(index) {
+ if (Ctor) {
+ var buffer = new ArrayBuffer(24),
+ view = index ? new Ctor(buffer, 8, 1) : new Ctor(buffer),
+ actual = func(view);
+
+ assert.deepEqual(actual, view);
+ assert.notStrictEqual(actual, view);
+ assert.strictEqual(actual.buffer === view.buffer, !isDeep);
+ assert.strictEqual(actual.byteOffset, view.byteOffset);
+ assert.strictEqual(actual.length, view.length);
+ }
+ else {
+ skipAssert(assert, 5);
+ }
+ });
+ });
+ });
+
+ lodashStable.forOwn(uncloneable, function(value, key) {
+ QUnit.test('`_.' + methodName + '` should not clone ' + key, function(assert) {
+ assert.expect(3);
+
+ if (value) {
+ var object = { 'a': value, 'b': { 'c': value } },
+ actual = func(object),
+ expected = (typeof value == 'function' && !!value.c) ? { 'c': Foo.c } : {};
+
+ assert.deepEqual(actual, object);
+ assert.notStrictEqual(actual, object);
+ assert.deepEqual(func(value), expected);
+ }
+ else {
+ skipAssert(assert, 3);
+ }
+ });
+ });
+ });
+
+ lodashStable.each(['cloneWith', 'cloneDeepWith'], function(methodName) {
+ var func = _[methodName],
+ isDeep = methodName == 'cloneDeepWith';
+
+ QUnit.test('`_.' + methodName + '` should provide the correct `customizer` arguments', function(assert) {
+ assert.expect(1);
+
+ var argsList = [],
+ object = new Foo;
+
+ func(object, function() {
+ var length = arguments.length,
+ args = slice.call(arguments, 0, length - (length > 1 ? 1 : 0));
+
+ argsList.push(args);
+ });
+
+ assert.deepEqual(argsList, isDeep ? [[object], [1, 'a', object]] : [[object]]);
+ });
+
+ QUnit.test('`_.' + methodName + '` should handle cloning if `customizer` returns `undefined`', function(assert) {
+ assert.expect(1);
+
+ var actual = func({ 'a': { 'b': 'c' } }, noop);
+ assert.deepEqual(actual, { 'a': { 'b': 'c' } });
+ });
+
+ lodashStable.forOwn(uncloneable, function(value, key) {
+ QUnit.test('`_.' + methodName + '` should work with a `customizer` callback and ' + key, function(assert) {
+ assert.expect(4);
+
+ var customizer = function(value) {
+ return lodashStable.isPlainObject(value) ? undefined : value;
+ };
+
+ var actual = func(value, customizer);
+
+ assert.deepEqual(actual, value);
+ assert.strictEqual(actual, value);
+
+ var object = { 'a': value, 'b': { 'c': value } };
+ actual = func(object, customizer);
+
+ assert.deepEqual(actual, object);
+ assert.notStrictEqual(actual, object);
+ });
+ });
+ });
+ }(1, 2, 3));
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.compact');
+
+ (function() {
+ var largeArray = lodashStable.range(LARGE_ARRAY_SIZE).concat(null);
+
+ QUnit.test('should filter falsey values', function(assert) {
+ assert.expect(1);
+
+ var array = ['0', '1', '2'];
+ assert.deepEqual(_.compact(falsey.concat(array)), array);
+ });
+
+ QUnit.test('should work when in-between lazy operators', function(assert) {
+ assert.expect(2);
+
+ if (!isNpm) {
+ var actual = _(falsey).thru(_.slice).compact().thru(_.slice).value();
+ assert.deepEqual(actual, []);
+
+ actual = _(falsey).thru(_.slice).push(true, 1).compact().push('a').value();
+ assert.deepEqual(actual, [true, 1, 'a']);
+ }
+ else {
+ skipAssert(assert, 2);
+ }
+ });
+
+ QUnit.test('should work in a lazy sequence', function(assert) {
+ assert.expect(1);
+
+ if (!isNpm) {
+ var actual = _(largeArray).slice(1).compact().reverse().take().value();
+ assert.deepEqual(actual, _.take(_.compact(_.slice(largeArray, 1)).reverse()));
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+
+ QUnit.test('should work in a lazy sequence with a custom `_.iteratee`', function(assert) {
+ assert.expect(1);
+
+ if (!isModularize) {
+ var iteratee = _.iteratee,
+ pass = false;
+
+ _.iteratee = identity;
+
+ try {
+ var actual = _(largeArray).slice(1).compact().value();
+ pass = lodashStable.isEqual(actual, _.compact(_.slice(largeArray, 1)));
+ } catch (e) {console.log(e);}
+
+ assert.ok(pass);
+ _.iteratee = iteratee;
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.concat');
+
+ (function() {
+ QUnit.test('should shallow clone `array`', function(assert) {
+ assert.expect(2);
+
+ var array = [1, 2, 3],
+ actual = _.concat(array);
+
+ assert.deepEqual(actual, array);
+ assert.notStrictEqual(actual, array);
+ });
+
+ QUnit.test('should concat arrays and values', function(assert) {
+ assert.expect(2);
+
+ var array = [1],
+ actual = _.concat(array, 2, [3], [[4]]);
+
+ assert.deepEqual(actual, [1, 2, 3, [4]]);
+ assert.deepEqual(array, [1]);
+ });
+
+ QUnit.test('should cast non-array `array` values to arrays', function(assert) {
+ assert.expect(2);
+
+ var values = [, null, undefined, false, true, 1, NaN, 'a'];
+
+ var expected = lodashStable.map(values, function(value, index) {
+ return index ? [value] : [];
+ });
+
+ var actual = lodashStable.map(values, function(value, index) {
+ return index ? _.concat(value) : _.concat();
+ });
+
+ assert.deepEqual(actual, expected);
+
+ expected = lodashStable.map(values, function(value) {
+ return [value, 2, [3]];
+ });
+
+ actual = lodashStable.map(values, function(value) {
+ return _.concat(value, [2], [[3]]);
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('should treat sparse arrays as dense', function(assert) {
+ assert.expect(3);
+
+ var expected = [],
+ actual = _.concat(Array(1), Array(1));
+
+ expected.push(undefined, undefined);
+
+ assert.ok('0'in actual);
+ assert.ok('1' in actual);
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('should return a new wrapped array', function(assert) {
+ assert.expect(2);
+
+ if (!isNpm) {
+ var array = [1],
+ wrapped = _(array).concat([2, 3]),
+ actual = wrapped.value();
+
+ assert.deepEqual(array, [1]);
+ assert.deepEqual(actual, [1, 2, 3]);
+ }
+ else {
+ skipAssert(assert, 2);
+ }
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.cond');
+
+ (function() {
+ QUnit.test('should create a conditional function', function(assert) {
+ assert.expect(3);
+
+ var cond = _.cond([
+ [lodashStable.matches({ 'a': 1 }), alwaysA],
+ [lodashStable.matchesProperty('b', 1), alwaysB],
+ [lodashStable.property('c'), alwaysC]
+ ]);
+
+ assert.strictEqual(cond({ 'a': 1, 'b': 2, 'c': 3 }), 'a');
+ assert.strictEqual(cond({ 'a': 0, 'b': 1, 'c': 2 }), 'b');
+ assert.strictEqual(cond({ 'a': -1, 'b': 0, 'c': 1 }), 'c');
+ });
+
+ QUnit.test('should provide arguments to functions', function(assert) {
+ assert.expect(2);
+
+ var args1,
+ args2,
+ expected = ['a', 'b', 'c'];
+
+ var cond = _.cond([[
+ function() { args1 || (args1 = slice.call(arguments)); return true; },
+ function() { args2 || (args2 = slice.call(arguments)); }
+ ]]);
+
+ cond('a', 'b', 'c');
+
+ assert.deepEqual(args1, expected);
+ assert.deepEqual(args2, expected);
+ });
+
+ QUnit.test('should work with predicate shorthands', function(assert) {
+ assert.expect(3);
+
+ var cond = _.cond([
+ [{ 'a': 1 }, alwaysA],
+ [['b', 1], alwaysB],
+ ['c', alwaysC]
+ ]);
+
+ assert.strictEqual(cond({ 'a': 1, 'b': 2, 'c': 3 }), 'a');
+ assert.strictEqual(cond({ 'a': 0, 'b': 1, 'c': 2 }), 'b');
+ assert.strictEqual(cond({ 'a': -1, 'b': 0, 'c': 1 }), 'c');
+ });
+
+ QUnit.test('should return `undefined` when no condition is met', function(assert) {
+ assert.expect(1);
+
+ var cond = _.cond([[alwaysFalse, alwaysA]]);
+ assert.strictEqual(cond({ 'a': 1 }), undefined);
+ });
+
+ QUnit.test('should throw a TypeError if `pairs` is not composed of functions', function(assert) {
+ assert.expect(2);
+
+ lodashStable.each([false, true], function(value) {
+ assert.raises(function() { _.cond([[alwaysTrue, value]])(); }, TypeError);
+ });
+ });
+
+ QUnit.test('should use `this` binding of function for `pairs`', function(assert) {
+ assert.expect(1);
+
+ var cond = _.cond([
+ [function(a) { return this[a]; }, function(a, b) { return this[b]; }]
+ ]);
+
+ var object = { 'cond': cond, 'a': 1, 'b': 2 };
+ assert.strictEqual(object.cond('a', 'b'), 2);
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.conforms');
+
+ (function() {
+ var objects = [
+ { 'a': 1, 'b': 8 },
+ { 'a': 2, 'b': 4 },
+ { 'a': 3, 'b': 16 }
+ ];
+
+ QUnit.test('should create a function that checks if a given object conforms to `source`', function(assert) {
+ assert.expect(2);
+
+ var conforms = _.conforms({
+ 'b': function(value) { return value > 4; }
+ });
+
+ var actual = lodashStable.filter(objects, conforms);
+ assert.deepEqual(actual, [objects[0], objects[2]]);
+
+ conforms = _.conforms({
+ 'b': function(value) { return value > 8; },
+ 'a': function(value) { return value > 1; }
+ });
+
+ actual = lodashStable.filter(objects, conforms);
+ assert.deepEqual(actual, [objects[2]]);
+ });
+
+ QUnit.test('should not match by inherited `source` properties', function(assert) {
+ assert.expect(1);
+
+ function Foo() {
+ this.a = function(value) {
+ return value > 1;
+ };
+ }
+ Foo.prototype.b = function(value) {
+ return value > 8;
+ };
+
+ var conforms = _.conforms(new Foo),
+ actual = lodashStable.filter(objects, conforms);
+
+ assert.deepEqual(actual, [objects[1], objects[2]]);
+ });
+
+ QUnit.test('should not invoke `source` predicates for missing `object` properties', function(assert) {
+ assert.expect(2);
+
+ var count = 0;
+
+ var conforms = _.conforms({
+ 'a': function() { count++; return true; }
+ });
+
+ assert.strictEqual(conforms({}), false);
+ assert.strictEqual(count, 0);
+ });
+
+ QUnit.test('should work with a function for `object`', function(assert) {
+ assert.expect(2);
+
+ function Foo() {}
+ Foo.a = 1;
+
+ function Bar() {}
+ Bar.a = 2;
+
+ var conforms = _.conforms({
+ 'a': function(value) { return value > 1; }
+ });
+
+ assert.strictEqual(conforms(Foo), false);
+ assert.strictEqual(conforms(Bar), true);
+ });
+
+ QUnit.test('should work with a function for `source`', function(assert) {
+ assert.expect(1);
+
+ function Foo() {}
+ Foo.a = function(value) { return value > 1; };
+
+ var objects = [{ 'a': 1 }, { 'a': 2 }],
+ actual = lodashStable.filter(objects, _.conforms(Foo));
+
+ assert.deepEqual(actual, [objects[1]]);
+ });
+
+ QUnit.test('should work with a non-plain `object`', function(assert) {
+ assert.expect(1);
+
+ function Foo() {
+ this.a = 1;
+ }
+ Foo.prototype.b = 2;
+
+ var conforms = _.conforms({
+ 'b': function(value) { return value > 1; }
+ });
+
+ assert.strictEqual(conforms(new Foo), true);
+ });
+
+ QUnit.test('should return `false` when `object` is nullish', function(assert) {
+ assert.expect(1);
+
+ var values = [, null, undefined],
+ expected = lodashStable.map(values, alwaysFalse);
+
+ var conforms = _.conforms({
+ 'a': function(value) { return value > 1; }
+ });
+
+ var actual = lodashStable.map(values, function(value, index) {
+ try {
+ return index ? conforms(value) : conforms();
+ } catch (e) {}
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('should return `true` when comparing an empty `source` to a nullish `object`', function(assert) {
+ assert.expect(1);
+
+ var values = [, null, undefined],
+ expected = lodashStable.map(values, alwaysTrue),
+ conforms = _.conforms({});
+
+ var actual = lodashStable.map(values, function(value, index) {
+ try {
+ return index ? conforms(value) : conforms();
+ } catch (e) {}
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('should return `true` when comparing an empty `source`', function(assert) {
+ assert.expect(1);
+
+ var object = { 'a': 1 },
+ expected = lodashStable.map(empties, alwaysTrue);
+
+ var actual = lodashStable.map(empties, function(value) {
+ var conforms = _.conforms(value);
+ return conforms(object);
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('should not change behavior if `source` is modified', function(assert) {
+ assert.expect(2);
+
+ var source = {
+ 'a': function(value) { return value > 1; }
+ };
+
+ var object = { 'a': 2 },
+ conforms = _.conforms(source);
+
+ assert.strictEqual(conforms(object), true);
+
+ source.a = function(value) { return value < 2; };
+ assert.strictEqual(conforms(object), true);
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.constant');
+
+ (function() {
+ QUnit.test('should create a function that returns `value`', function(assert) {
+ assert.expect(1);
+
+ var object = { 'a': 1 },
+ values = Array(2).concat(empties, true, 1, 'a'),
+ constant = _.constant(object),
+ expected = lodashStable.map(values, function() { return true; });
+
+ var actual = lodashStable.map(values, function(value, index) {
+ if (index == 0) {
+ var result = constant();
+ } else if (index == 1) {
+ result = constant.call({});
+ } else {
+ result = constant(value);
+ }
+ return result === object;
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('should work with falsey values', function(assert) {
+ assert.expect(1);
+
+ var expected = lodashStable.map(falsey, function() { return true; });
+
+ var actual = lodashStable.map(falsey, function(value, index) {
+ var constant = index ? _.constant(value) : _.constant(),
+ result = constant();
+
+ return (result === value) || (result !== result && value !== value);
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('should return a wrapped value when chaining', function(assert) {
+ assert.expect(1);
+
+ if (!isNpm) {
+ var wrapped = _(true).constant();
+ assert.ok(wrapped instanceof _);
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.countBy');
+
+ (function() {
+ var array = [6.1, 4.2, 6.3];
+
+ QUnit.test('should transform keys by `iteratee`', function(assert) {
+ assert.expect(1);
+
+ var actual = _.countBy(array, Math.floor);
+ assert.deepEqual(actual, { '4': 1, '6': 2 });
+ });
+
+ QUnit.test('should use `_.identity` when `iteratee` is nullish', function(assert) {
+ assert.expect(1);
+
+ var array = [4, 6, 6],
+ values = [, null, undefined],
+ expected = lodashStable.map(values, lodashStable.constant({ '4': 1, '6': 2 }));
+
+ var actual = lodashStable.map(values, function(value, index) {
+ return index ? _.countBy(array, value) : _.countBy(array);
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('should work with `_.property` shorthands', function(assert) {
+ assert.expect(1);
+
+ var actual = _.countBy(['one', 'two', 'three'], 'length');
+ assert.deepEqual(actual, { '3': 2, '5': 1 });
+ });
+
+ QUnit.test('should only add values to own, not inherited, properties', function(assert) {
+ assert.expect(2);
+
+ var actual = _.countBy(array, function(n) {
+ return Math.floor(n) > 4 ? 'hasOwnProperty' : 'constructor';
+ });
+
+ assert.deepEqual(actual.constructor, 1);
+ assert.deepEqual(actual.hasOwnProperty, 2);
+ });
+
+ QUnit.test('should work with a number for `iteratee`', function(assert) {
+ assert.expect(2);
+
+ var array = [
+ [1, 'a'],
+ [2, 'a'],
+ [2, 'b']
+ ];
+
+ assert.deepEqual(_.countBy(array, 0), { '1': 1, '2': 2 });
+ assert.deepEqual(_.countBy(array, 1), { 'a': 2, 'b': 1 });
+ });
+
+ QUnit.test('should work with an object for `collection`', function(assert) {
+ assert.expect(1);
+
+ var actual = _.countBy({ 'a': 6.1, 'b': 4.2, 'c': 6.3 }, Math.floor);
+ assert.deepEqual(actual, { '4': 1, '6': 2 });
+ });
+
+ QUnit.test('should work in a lazy sequence', function(assert) {
+ assert.expect(1);
+
+ if (!isNpm) {
+ var array = lodashStable.range(LARGE_ARRAY_SIZE).concat(
+ lodashStable.range(Math.floor(LARGE_ARRAY_SIZE / 2), LARGE_ARRAY_SIZE),
+ lodashStable.range(Math.floor(LARGE_ARRAY_SIZE / 1.5), LARGE_ARRAY_SIZE)
+ );
+
+ var actual = _(array).countBy().map(square).filter(isEven).take().value();
+
+ assert.deepEqual(actual, _.take(_.filter(_.map(_.countBy(array), square), isEven)));
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.create');
+
+ (function() {
+ function Shape() {
+ this.x = 0;
+ this.y = 0;
+ }
+
+ function Circle() {
+ Shape.call(this);
+ }
+
+ QUnit.test('should create an object that inherits from the given `prototype` object', function(assert) {
+ assert.expect(3);
+
+ Circle.prototype = _.create(Shape.prototype);
+ Circle.prototype.constructor = Circle;
+
+ var actual = new Circle;
+
+ assert.ok(actual instanceof Circle);
+ assert.ok(actual instanceof Shape);
+ assert.notStrictEqual(Circle.prototype, Shape.prototype);
+ });
+
+ QUnit.test('should assign `properties` to the created object', function(assert) {
+ assert.expect(3);
+
+ var expected = { 'constructor': Circle, 'radius': 0 };
+ Circle.prototype = _.create(Shape.prototype, expected);
+
+ var actual = new Circle;
+
+ assert.ok(actual instanceof Circle);
+ assert.ok(actual instanceof Shape);
+ assert.deepEqual(Circle.prototype, expected);
+ });
+
+ QUnit.test('should assign own properties', function(assert) {
+ assert.expect(1);
+
+ function Foo() {
+ this.a = 1;
+ this.c = 3;
+ }
+ Foo.prototype.b = 2;
+
+ assert.deepEqual(_.create({}, new Foo), { 'a': 1, 'c': 3 });
+ });
+
+ QUnit.test('should assign properties that shadow those of `prototype`', function(assert) {
+ assert.expect(1);
+
+ function Foo() {
+ this.a = 1;
+ }
+ var object = _.create(new Foo, { 'a': 1 });
+ assert.deepEqual(lodashStable.keys(object), ['a']);
+ });
+
+ QUnit.test('should accept a falsey `prototype` argument', function(assert) {
+ assert.expect(1);
+
+ var expected = lodashStable.map(falsey, alwaysEmptyObject);
+
+ var actual = lodashStable.map(falsey, function(prototype, index) {
+ return index ? _.create(prototype) : _.create();
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('should ignore primitive `prototype` arguments and use an empty object instead', function(assert) {
+ assert.expect(1);
+
+ var expected = lodashStable.map(primitives, alwaysTrue);
+
+ var actual = lodashStable.map(primitives, function(value, index) {
+ return lodashStable.isPlainObject(index ? _.create(value) : _.create());
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('should work as an iteratee for methods like `_.map`', function(assert) {
+ assert.expect(1);
+
+ var array = [{ 'a': 1 }, { 'a': 1 }, { 'a': 1 }],
+ expected = lodashStable.map(array, alwaysTrue),
+ objects = lodashStable.map(array, _.create);
+
+ var actual = lodashStable.map(objects, function(object) {
+ return object.a === 1 && !_.keys(object).length;
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.curry');
+
+ (function() {
+ function fn(a, b, c, d) {
+ return slice.call(arguments);
+ }
+
+ QUnit.test('should curry based on the number of arguments given', function(assert) {
+ assert.expect(3);
+
+ var curried = _.curry(fn),
+ expected = [1, 2, 3, 4];
+
+ assert.deepEqual(curried(1)(2)(3)(4), expected);
+ assert.deepEqual(curried(1, 2)(3, 4), expected);
+ assert.deepEqual(curried(1, 2, 3, 4), expected);
+ });
+
+ QUnit.test('should allow specifying `arity`', function(assert) {
+ assert.expect(3);
+
+ var curried = _.curry(fn, 3),
+ expected = [1, 2, 3];
+
+ assert.deepEqual(curried(1)(2, 3), expected);
+ assert.deepEqual(curried(1, 2)(3), expected);
+ assert.deepEqual(curried(1, 2, 3), expected);
+ });
+
+ QUnit.test('should coerce `arity` to an integer', function(assert) {
+ assert.expect(2);
+
+ var values = ['0', 0.6, 'xyz'],
+ expected = lodashStable.map(values, alwaysEmptyArray);
+
+ var actual = lodashStable.map(values, function(arity) {
+ return _.curry(fn, arity)();
+ });
+
+ assert.deepEqual(actual, expected);
+ assert.deepEqual(_.curry(fn, '2')(1)(2), [1, 2]);
+ });
+
+ QUnit.test('should support placeholders', function(assert) {
+ assert.expect(4);
+
+ var curried = _.curry(fn),
+ ph = curried.placeholder;
+
+ assert.deepEqual(curried(1)(ph, 3)(ph, 4)(2), [1, 2, 3, 4]);
+ assert.deepEqual(curried(ph, 2)(1)(ph, 4)(3), [1, 2, 3, 4]);
+ assert.deepEqual(curried(ph, ph, 3)(ph, 2)(ph, 4)(1), [1, 2, 3, 4]);
+ assert.deepEqual(curried(ph, ph, ph, 4)(ph, ph, 3)(ph, 2)(1), [1, 2, 3, 4]);
+ });
+
+ QUnit.test('should persist placeholders', function(assert) {
+ assert.expect(1);
+
+ var curried = _.curry(fn),
+ ph = curried.placeholder,
+ actual = curried(ph, ph, ph, 'd')('a')(ph)('b')('c');
+
+ assert.deepEqual(actual, ['a', 'b', 'c', 'd']);
+ });
+
+ QUnit.test('should use `_.placeholder` when set', function(assert) {
+ assert.expect(1);
+
+ if (!isModularize) {
+ var curried = _.curry(fn),
+ _ph = _.placeholder = {},
+ ph = curried.placeholder;
+
+ assert.deepEqual(curried(1)(_ph, 3)(ph, 4), [1, ph, 3, 4]);
+ delete _.placeholder;
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+
+ QUnit.test('should provide additional arguments after reaching the target arity', function(assert) {
+ assert.expect(3);
+
+ var curried = _.curry(fn, 3);
+ assert.deepEqual(curried(1)(2, 3, 4), [1, 2, 3, 4]);
+ assert.deepEqual(curried(1, 2)(3, 4, 5), [1, 2, 3, 4, 5]);
+ assert.deepEqual(curried(1, 2, 3, 4, 5, 6), [1, 2, 3, 4, 5, 6]);
+ });
+
+ QUnit.test('should create a function with a `length` of `0`', function(assert) {
+ assert.expect(6);
+
+ lodashStable.times(2, function(index) {
+ var curried = index ? _.curry(fn, 4) : _.curry(fn);
+ assert.strictEqual(curried.length, 0);
+ assert.strictEqual(curried(1).length, 0);
+ assert.strictEqual(curried(1, 2).length, 0);
+ });
+ });
+
+ QUnit.test('should ensure `new curried` is an instance of `func`', function(assert) {
+ assert.expect(2);
+
+ function Foo(value) {
+ return value && object;
+ }
+
+ var curried = _.curry(Foo),
+ object = {};
+
+ assert.ok(new curried(false) instanceof Foo);
+ assert.strictEqual(new curried(true), object);
+ });
+
+ QUnit.test('should not set a `this` binding', function(assert) {
+ assert.expect(9);
+
+ var fn = function(a, b, c) {
+ var value = this || {};
+ return [value[a], value[b], value[c]];
+ };
+
+ var object = { 'a': 1, 'b': 2, 'c': 3 },
+ expected = [1, 2, 3];
+
+ assert.deepEqual(_.curry(_.bind(fn, object), 3)('a')('b')('c'), expected);
+ assert.deepEqual(_.curry(_.bind(fn, object), 3)('a', 'b')('c'), expected);
+ assert.deepEqual(_.curry(_.bind(fn, object), 3)('a', 'b', 'c'), expected);
+
+ assert.deepEqual(_.bind(_.curry(fn), object)('a')('b')('c'), Array(3));
+ assert.deepEqual(_.bind(_.curry(fn), object)('a', 'b')('c'), Array(3));
+ assert.deepEqual(_.bind(_.curry(fn), object)('a', 'b', 'c'), expected);
+
+ object.curried = _.curry(fn);
+ assert.deepEqual(object.curried('a')('b')('c'), Array(3));
+ assert.deepEqual(object.curried('a', 'b')('c'), Array(3));
+ assert.deepEqual(object.curried('a', 'b', 'c'), expected);
+ });
+
+ QUnit.test('should work with partialed methods', function(assert) {
+ assert.expect(2);
+
+ var curried = _.curry(fn),
+ expected = [1, 2, 3, 4];
+
+ var a = _.partial(curried, 1),
+ b = _.bind(a, null, 2),
+ c = _.partialRight(b, 4),
+ d = _.partialRight(b(3), 4);
+
+ assert.deepEqual(c(3), expected);
+ assert.deepEqual(d(), expected);
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.curryRight');
+
+ (function() {
+ function fn(a, b, c, d) {
+ return slice.call(arguments);
+ }
+
+ QUnit.test('should curry based on the number of arguments given', function(assert) {
+ assert.expect(3);
+
+ var curried = _.curryRight(fn),
+ expected = [1, 2, 3, 4];
+
+ assert.deepEqual(curried(4)(3)(2)(1), expected);
+ assert.deepEqual(curried(3, 4)(1, 2), expected);
+ assert.deepEqual(curried(1, 2, 3, 4), expected);
+ });
+
+ QUnit.test('should allow specifying `arity`', function(assert) {
+ assert.expect(3);
+
+ var curried = _.curryRight(fn, 3),
+ expected = [1, 2, 3];
+
+ assert.deepEqual(curried(3)(1, 2), expected);
+ assert.deepEqual(curried(2, 3)(1), expected);
+ assert.deepEqual(curried(1, 2, 3), expected);
+ });
+
+ QUnit.test('should coerce `arity` to an integer', function(assert) {
+ assert.expect(2);
+
+ var values = ['0', 0.6, 'xyz'],
+ expected = lodashStable.map(values, alwaysEmptyArray);
+
+ var actual = lodashStable.map(values, function(arity) {
+ return _.curryRight(fn, arity)();
+ });
+
+ assert.deepEqual(actual, expected);
+ assert.deepEqual(_.curryRight(fn, '2')(1)(2), [2, 1]);
+ });
+
+ QUnit.test('should support placeholders', function(assert) {
+ assert.expect(4);
+
+ var curried = _.curryRight(fn),
+ expected = [1, 2, 3, 4],
+ ph = curried.placeholder;
+
+ assert.deepEqual(curried(4)(2, ph)(1, ph)(3), expected);
+ assert.deepEqual(curried(3, ph)(4)(1, ph)(2), expected);
+ assert.deepEqual(curried(ph, ph, 4)(ph, 3)(ph, 2)(1), expected);
+ assert.deepEqual(curried(ph, ph, ph, 4)(ph, ph, 3)(ph, 2)(1), expected);
+ });
+
+ QUnit.test('should persist placeholders', function(assert) {
+ assert.expect(1);
+
+ var curried = _.curryRight(fn),
+ ph = curried.placeholder,
+ actual = curried('a', ph, ph, ph)('b')(ph)('c')('d');
+
+ assert.deepEqual(actual, ['a', 'b', 'c', 'd']);
+ });
+
+ QUnit.test('should use `_.placeholder` when set', function(assert) {
+ assert.expect(1);
+
+ if (!isModularize) {
+ var curried = _.curryRight(fn),
+ _ph = _.placeholder = {},
+ ph = curried.placeholder;
+
+ assert.deepEqual(curried(4)(2, _ph)(1, ph), [1, 2, ph, 4]);
+ delete _.placeholder;
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+
+ QUnit.test('should provide additional arguments after reaching the target arity', function(assert) {
+ assert.expect(3);
+
+ var curried = _.curryRight(fn, 3);
+ assert.deepEqual(curried(4)(1, 2, 3), [1, 2, 3, 4]);
+ assert.deepEqual(curried(4, 5)(1, 2, 3), [1, 2, 3, 4, 5]);
+ assert.deepEqual(curried(1, 2, 3, 4, 5, 6), [1, 2, 3, 4, 5, 6]);
+ });
+
+ QUnit.test('should create a function with a `length` of `0`', function(assert) {
+ assert.expect(6);
+
+ lodashStable.times(2, function(index) {
+ var curried = index ? _.curryRight(fn, 4) : _.curryRight(fn);
+ assert.strictEqual(curried.length, 0);
+ assert.strictEqual(curried(4).length, 0);
+ assert.strictEqual(curried(3, 4).length, 0);
+ });
+ });
+
+ QUnit.test('should ensure `new curried` is an instance of `func`', function(assert) {
+ assert.expect(2);
+
+ function Foo(value) {
+ return value && object;
+ }
+
+ var curried = _.curryRight(Foo),
+ object = {};
+
+ assert.ok(new curried(false) instanceof Foo);
+ assert.strictEqual(new curried(true), object);
+ });
+
+ QUnit.test('should not set a `this` binding', function(assert) {
+ assert.expect(9);
+
+ var fn = function(a, b, c) {
+ var value = this || {};
+ return [value[a], value[b], value[c]];
+ };
+
+ var object = { 'a': 1, 'b': 2, 'c': 3 },
+ expected = [1, 2, 3];
+
+ assert.deepEqual(_.curryRight(_.bind(fn, object), 3)('c')('b')('a'), expected);
+ assert.deepEqual(_.curryRight(_.bind(fn, object), 3)('b', 'c')('a'), expected);
+ assert.deepEqual(_.curryRight(_.bind(fn, object), 3)('a', 'b', 'c'), expected);
+
+ assert.deepEqual(_.bind(_.curryRight(fn), object)('c')('b')('a'), Array(3));
+ assert.deepEqual(_.bind(_.curryRight(fn), object)('b', 'c')('a'), Array(3));
+ assert.deepEqual(_.bind(_.curryRight(fn), object)('a', 'b', 'c'), expected);
+
+ object.curried = _.curryRight(fn);
+ assert.deepEqual(object.curried('c')('b')('a'), Array(3));
+ assert.deepEqual(object.curried('b', 'c')('a'), Array(3));
+ assert.deepEqual(object.curried('a', 'b', 'c'), expected);
+ });
+
+ QUnit.test('should work with partialed methods', function(assert) {
+ assert.expect(2);
+
+ var curried = _.curryRight(fn),
+ expected = [1, 2, 3, 4];
+
+ var a = _.partialRight(curried, 4),
+ b = _.partialRight(a, 3),
+ c = _.bind(b, null, 1),
+ d = _.partial(b(2), 1);
+
+ assert.deepEqual(c(2), expected);
+ assert.deepEqual(d(), expected);
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('curry methods');
+
+ lodashStable.each(['curry', 'curryRight'], function(methodName) {
+ var func = _[methodName],
+ fn = function(a, b) { return slice.call(arguments); },
+ isCurry = methodName == 'curry';
+
+ QUnit.test('`_.' + methodName + '` should not error on functions with the same name as lodash methods', function(assert) {
+ assert.expect(1);
+
+ function run(a, b) {
+ return a + b;
+ }
+
+ var curried = func(run);
+
+ try {
+ var actual = curried(1)(2);
+ } catch (e) {}
+
+ assert.strictEqual(actual, 3);
+ });
+
+ QUnit.test('`_.' + methodName + '` should work for function names that shadow those on `Object.prototype`', function(assert) {
+ assert.expect(1);
+
+ var curried = _.curry(function hasOwnProperty(a, b, c) {
+ return [a, b, c];
+ });
+
+ var expected = [1, 2, 3];
+
+ assert.deepEqual(curried(1)(2)(3), expected);
+ });
+
+ QUnit.test('`_.' + methodName + '` should work as an iteratee for methods like `_.map`', function(assert) {
+ assert.expect(2);
+
+ var array = [fn, fn, fn],
+ object = { 'a': fn, 'b': fn, 'c': fn };
+
+ lodashStable.each([array, object], function(collection) {
+ var curries = lodashStable.map(collection, func),
+ expected = lodashStable.map(collection, lodashStable.constant(isCurry ? ['a', 'b'] : ['b', 'a']));
+
+ var actual = lodashStable.map(curries, function(curried) {
+ return curried('a')('b');
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+ });
+ });
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.debounce');
+
+ (function() {
+ QUnit.test('should debounce a function', function(assert) {
+ assert.expect(6);
+
+ var done = assert.async();
+
+ var callCount = 0;
+
+ var debounced = _.debounce(function(value) {
+ ++callCount;
+ return value;
+ }, 32);
+
+ var actual = [debounced(0), debounced(1), debounced(2)];
+ assert.deepEqual(actual, [undefined, undefined, undefined]);
+ assert.strictEqual(callCount, 0);
+
+ setTimeout(function() {
+ assert.strictEqual(callCount, 1);
+
+ var actual = [debounced(3), debounced(4), debounced(5)];
+ assert.deepEqual(actual, [2, 2, 2]);
+ assert.strictEqual(callCount, 1);
+ }, 128);
+
+ setTimeout(function() {
+ assert.strictEqual(callCount, 2);
+ done();
+ }, 256);
+ });
+
+ QUnit.test('subsequent debounced calls return the last `func` result', function(assert) {
+ assert.expect(2);
+
+ var done = assert.async();
+
+ var debounced = _.debounce(identity, 32);
+ debounced('x');
+
+ setTimeout(function() {
+ assert.notEqual(debounced('y'), 'y');
+ }, 64);
+
+ setTimeout(function() {
+ assert.notEqual(debounced('z'), 'z');
+ done();
+ }, 128);
+ });
+
+ QUnit.test('should not immediately call `func` when `wait` is `0`', function(assert) {
+ assert.expect(2);
+
+ var done = assert.async();
+
+ var callCount = 0,
+ debounced = _.debounce(function() { ++callCount; }, 0);
+
+ debounced();
+ debounced();
+ assert.strictEqual(callCount, 0);
+
+ setTimeout(function() {
+ assert.strictEqual(callCount, 1);
+ done();
+ }, 5);
+ });
+
+ QUnit.test('should apply default options', function(assert) {
+ assert.expect(2);
+
+ var done = assert.async();
+
+ var callCount = 0,
+ debounced = _.debounce(function() { callCount++; }, 32, {});
+
+ debounced();
+ assert.strictEqual(callCount, 0);
+
+ setTimeout(function() {
+ assert.strictEqual(callCount, 1);
+ done();
+ }, 64);
+ });
+
+ QUnit.test('should support a `leading` option', function(assert) {
+ assert.expect(4);
+
+ var done = assert.async();
+
+ var callCounts = [0, 0];
+
+ var withLeading = _.debounce(function() {
+ callCounts[0]++;
+ }, 32, { 'leading': true });
+
+ var withLeadingAndTrailing = _.debounce(function() {
+ callCounts[1]++;
+ }, 32, { 'leading': true });
+
+ withLeading();
+ assert.strictEqual(callCounts[0], 1);
+
+ withLeadingAndTrailing();
+ withLeadingAndTrailing();
+ assert.strictEqual(callCounts[1], 1);
+
+ setTimeout(function() {
+ assert.deepEqual(callCounts, [1, 2]);
+
+ withLeading();
+ assert.strictEqual(callCounts[0], 2);
+
+ done();
+ }, 64);
+ });
+
+ QUnit.test('subsequent leading debounced calls return the last `func` result', function(assert) {
+ assert.expect(2);
+
+ var done = assert.async();
+
+ var debounced = _.debounce(identity, 32, { 'leading': true, 'trailing': false }),
+ result = [debounced('x'), debounced('y')];
+
+ assert.deepEqual(result, ['x', 'x']);
+
+ setTimeout(function() {
+ var result = [debounced('a'), debounced('b')];
+ assert.deepEqual(result, ['a', 'a']);
+ done();
+ }, 64);
+ });
+
+ QUnit.test('should support a `trailing` option', function(assert) {
+ assert.expect(4);
+
+ var done = assert.async();
+
+ var withCount = 0,
+ withoutCount = 0;
+
+ var withTrailing = _.debounce(function() {
+ withCount++;
+ }, 32, { 'trailing': true });
+
+ var withoutTrailing = _.debounce(function() {
+ withoutCount++;
+ }, 32, { 'trailing': false });
+
+ withTrailing();
+ assert.strictEqual(withCount, 0);
+
+ withoutTrailing();
+ assert.strictEqual(withoutCount, 0);
+
+ setTimeout(function() {
+ assert.strictEqual(withCount, 1);
+ assert.strictEqual(withoutCount, 0);
+ done();
+ }, 64);
+ });
+
+ QUnit.test('should support a `maxWait` option', function(assert) {
+ assert.expect(4);
+
+ var done = assert.async();
+
+ var callCount = 0;
+
+ var debounced = _.debounce(function(value) {
+ ++callCount;
+ return value;
+ }, 32, { 'maxWait': 64 });
+
+ debounced();
+ debounced();
+ assert.strictEqual(callCount, 0);
+
+ setTimeout(function() {
+ assert.strictEqual(callCount, 1);
+ debounced();
+ debounced();
+ assert.strictEqual(callCount, 1);
+ }, 128);
+
+ setTimeout(function() {
+ assert.strictEqual(callCount, 2);
+ done();
+ }, 256);
+ });
+
+ QUnit.test('should support `maxWait` in a tight loop', function(assert) {
+ assert.expect(1);
+
+ var done = assert.async();
+
+ var limit = (argv || isPhantom) ? 1000 : 320,
+ withCount = 0,
+ withoutCount = 0;
+
+ var withMaxWait = _.debounce(function() {
+ withCount++;
+ }, 64, { 'maxWait': 128 });
+
+ var withoutMaxWait = _.debounce(function() {
+ withoutCount++;
+ }, 96);
+
+ var start = +new Date;
+ while ((new Date - start) < limit) {
+ withMaxWait();
+ withoutMaxWait();
+ }
+ var actual = [Boolean(withoutCount), Boolean(withCount)];
+ setTimeout(function() {
+ assert.deepEqual(actual, [false, true]);
+ done();
+ }, 1);
+ });
+
+ QUnit.test('should queue a trailing call for subsequent debounced calls after `maxWait`', function(assert) {
+ assert.expect(1);
+
+ var done = assert.async();
+
+ var callCount = 0;
+
+ var debounced = _.debounce(function() {
+ ++callCount;
+ }, 64, { 'maxWait': 64 });
+
+ debounced();
+
+ lodashStable.times(20, function(index) {
+ setTimeout(debounced, 54 + index);
+ });
+
+ setTimeout(function() {
+ assert.strictEqual(callCount, 2);
+ done();
+ }, 160);
+ });
+
+ QUnit.test('should cancel `maxDelayed` when `delayed` is invoked', function(assert) {
+ assert.expect(2);
+
+ var done = assert.async();
+
+ var callCount = 0;
+
+ var debounced = _.debounce(function() {
+ callCount++;
+ }, 32, { 'maxWait': 64 });
+
+ debounced();
+
+ setTimeout(function() {
+ debounced();
+ assert.strictEqual(callCount, 1);
+ }, 128);
+
+ setTimeout(function() {
+ assert.strictEqual(callCount, 2);
+ done();
+ }, 192);
+ });
+
+ QUnit.test('should invoke the trailing call with the correct arguments and `this` binding', function(assert) {
+ assert.expect(2);
+
+ var done = assert.async();
+
+ var actual,
+ callCount = 0,
+ object = {};
+
+ var debounced = _.debounce(function(value) {
+ actual = [this];
+ push.apply(actual, arguments);
+ return ++callCount != 2;
+ }, 32, { 'leading': true, 'maxWait': 64 });
+
+ while (true) {
+ if (!debounced.call(object, 'a')) {
+ break;
+ }
+ }
+ setTimeout(function() {
+ assert.strictEqual(callCount, 2);
+ assert.deepEqual(actual, [object, 'a']);
+ done();
+ }, 64);
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.deburr');
+
+ (function() {
+ QUnit.test('should convert latin-1 supplementary letters to basic latin', function(assert) {
+ assert.expect(1);
+
+ var actual = lodashStable.map(burredLetters, _.deburr);
+ assert.deepEqual(actual, deburredLetters);
+ });
+
+ QUnit.test('should not deburr latin-1 mathematical operators', function(assert) {
+ assert.expect(1);
+
+ var operators = ['\xd7', '\xf7'],
+ actual = lodashStable.map(operators, _.deburr);
+
+ assert.deepEqual(actual, operators);
+ });
+
+ QUnit.test('should deburr combining diacritical marks', function(assert) {
+ assert.expect(1);
+
+ var expected = lodashStable.map(comboMarks, lodashStable.constant('ei'));
+
+ var actual = lodashStable.map(comboMarks, function(chr) {
+ return _.deburr('e' + chr + 'i');
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.defaults');
+
+ (function() {
+ QUnit.test('should assign source properties if missing on `object`', function(assert) {
+ assert.expect(1);
+
+ assert.deepEqual(_.defaults({ 'a': 1 }, { 'a': 2, 'b': 2 }), { 'a': 1, 'b': 2 });
+ });
+
+ QUnit.test('should accept multiple sources', function(assert) {
+ assert.expect(2);
+
+ var expected = { 'a': 1, 'b': 2, 'c': 3 };
+ assert.deepEqual(_.defaults({ 'a': 1, 'b': 2 }, { 'b': 3 }, { 'c': 3 }), expected);
+ assert.deepEqual(_.defaults({ 'a': 1, 'b': 2 }, { 'b': 3, 'c': 3 }, { 'c': 2 }), expected);
+ });
+
+ QUnit.test('should not overwrite `null` values', function(assert) {
+ assert.expect(1);
+
+ var actual = _.defaults({ 'a': null }, { 'a': 1 });
+ assert.strictEqual(actual.a, null);
+ });
+
+ QUnit.test('should overwrite `undefined` values', function(assert) {
+ assert.expect(1);
+
+ var actual = _.defaults({ 'a': undefined }, { 'a': 1 });
+ assert.strictEqual(actual.a, 1);
+ });
+
+ QUnit.test('should assign properties that shadow those on `Object.prototype`', function(assert) {
+ assert.expect(2);
+
+ var object = {
+ 'constructor': objectProto.constructor,
+ 'hasOwnProperty': objectProto.hasOwnProperty,
+ 'isPrototypeOf': objectProto.isPrototypeOf,
+ 'propertyIsEnumerable': objectProto.propertyIsEnumerable,
+ 'toLocaleString': objectProto.toLocaleString,
+ 'toString': objectProto.toString,
+ 'valueOf': objectProto.valueOf
+ };
+
+ var source = {
+ 'constructor': 1,
+ 'hasOwnProperty': 2,
+ 'isPrototypeOf': 3,
+ 'propertyIsEnumerable': 4,
+ 'toLocaleString': 5,
+ 'toString': 6,
+ 'valueOf': 7
+ };
+
+ assert.deepEqual(_.defaults({}, source), source);
+ assert.deepEqual(_.defaults({}, object, source), object);
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.defaultsDeep');
+
+ (function() {
+ QUnit.test('should deep assign source properties if missing on `object`', function(assert) {
+ assert.expect(1);
+
+ var object = { 'a': { 'b': 2 }, 'd': 4 },
+ source = { 'a': { 'b': 1, 'c': 3 }, 'e': 5 },
+ expected = { 'a': { 'b': 2, 'c': 3 }, 'd': 4, 'e': 5 };
+
+ assert.deepEqual(_.defaultsDeep(object, source), expected);
+ });
+
+ QUnit.test('should accept multiple sources', function(assert) {
+ assert.expect(2);
+
+ var source1 = { 'a': { 'b': 3 } },
+ source2 = { 'a': { 'c': 3 } },
+ source3 = { 'a': { 'b': 3, 'c': 3 } },
+ source4 = { 'a': { 'c': 4 } },
+ expected = { 'a': { 'b': 2, 'c': 3 } };
+
+ assert.deepEqual(_.defaultsDeep({ 'a': { 'b': 2 } }, source1, source2), expected);
+ assert.deepEqual(_.defaultsDeep({ 'a': { 'b': 2 } }, source3, source4), expected);
+ });
+
+ QUnit.test('should not overwrite `null` values', function(assert) {
+ assert.expect(1);
+
+ var object = { 'a': { 'b': null } },
+ source = { 'a': { 'b': 2 } },
+ actual = _.defaultsDeep(object, source);
+
+ assert.strictEqual(actual.a.b, null);
+ });
+
+ QUnit.test('should not overwrite regexp values', function(assert) {
+ assert.expect(1);
+
+ var object = { 'a': { 'b': /x/ } },
+ source = { 'a': { 'b': /y/ } },
+ actual = _.defaultsDeep(object, source);
+
+ assert.deepEqual(actual.a.b, /x/);
+ });
+
+ QUnit.test('should not convert function properties to objects', function(assert) {
+ assert.expect(2);
+
+ var actual = _.defaultsDeep({}, { 'a': noop });
+ assert.strictEqual(actual.a, noop);
+
+ actual = _.defaultsDeep({}, { 'a': { 'b': noop } });
+ assert.strictEqual(actual.a.b, noop);
+ });
+
+ QUnit.test('should overwrite `undefined` values', function(assert) {
+ assert.expect(1);
+
+ var object = { 'a': { 'b': undefined } },
+ source = { 'a': { 'b': 2 } },
+ actual = _.defaultsDeep(object, source);
+
+ assert.strictEqual(actual.a.b, 2);
+ });
+
+ QUnit.test('should merge sources containing circular references', function(assert) {
+ assert.expect(2);
+
+ var object = {
+ 'foo': { 'b': { 'c': { 'd': {} } } },
+ 'bar': { 'a': 2 }
+ };
+
+ var source = {
+ 'foo': { 'b': { 'c': { 'd': {} } } },
+ 'bar': {}
+ };
+
+ object.foo.b.c.d = object;
+ source.foo.b.c.d = source;
+ source.bar.b = source.foo.b;
+
+ var actual = _.defaultsDeep(object, source);
+
+ assert.strictEqual(actual.bar.b, actual.foo.b);
+ assert.strictEqual(actual.foo.b.c.d, actual.foo.b.c.d.foo.b.c.d);
+ });
+
+ QUnit.test('should not modify sources', function(assert) {
+ assert.expect(3);
+
+ var source1 = { 'a': 1, 'b': { 'c': 2 } },
+ source2 = { 'b': { 'c': 3, 'd': 3 } },
+ actual = _.defaultsDeep({}, source1, source2);
+
+ assert.deepEqual(actual, { 'a': 1, 'b': { 'c': 2, 'd': 3 } });
+ assert.deepEqual(source1, { 'a': 1, 'b': { 'c': 2 } });
+ assert.deepEqual(source2, { 'b': { 'c': 3, 'd': 3 } });
+ });
+
+ QUnit.test('should not attempt a merge of a string into an array', function(assert) {
+ assert.expect(1);
+
+ var actual = _.defaultsDeep({ 'a': ['abc'] }, { 'a': 'abc' });
+ assert.deepEqual(actual, { 'a': ['abc'] });
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.defer');
+
+ (function() {
+ QUnit.test('should defer `func` execution', function(assert) {
+ assert.expect(1);
+
+ var done = assert.async();
+
+ var pass = false;
+ _.defer(function() { pass = true; });
+
+ setTimeout(function() {
+ assert.ok(pass);
+ done();
+ }, 32);
+ });
+
+ QUnit.test('should provide additional arguments to `func`', function(assert) {
+ assert.expect(1);
+
+ var done = assert.async();
+
+ var args;
+
+ _.defer(function() {
+ args = slice.call(arguments);
+ }, 1, 2);
+
+ setTimeout(function() {
+ assert.deepEqual(args, [1, 2]);
+ done();
+ }, 32);
+ });
+
+ QUnit.test('should be cancelable', function(assert) {
+ assert.expect(1);
+
+ var done = assert.async();
+
+ var pass = true;
+
+ var timerId = _.defer(function() {
+ pass = false;
+ });
+
+ clearTimeout(timerId);
+
+ setTimeout(function() {
+ assert.ok(pass);
+ done();
+ }, 32);
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.delay');
+
+ (function() {
+ QUnit.test('should delay `func` execution', function(assert) {
+ assert.expect(2);
+
+ var done = assert.async();
+
+ var pass = false;
+ _.delay(function() { pass = true; }, 32);
+
+ setTimeout(function() {
+ assert.notOk(pass);
+ }, 1);
+
+ setTimeout(function() {
+ assert.ok(pass);
+ done();
+ }, 64);
+ });
+
+ QUnit.test('should provide additional arguments to `func`', function(assert) {
+ assert.expect(1);
+
+ var done = assert.async();
+
+ var args;
+
+ _.delay(function() {
+ args = slice.call(arguments);
+ }, 32, 1, 2);
+
+ setTimeout(function() {
+ assert.deepEqual(args, [1, 2]);
+ done();
+ }, 64);
+ });
+
+ QUnit.test('should use a default `wait` of `0`', function(assert) {
+ assert.expect(2);
+
+ var done = assert.async();
+
+ var pass = false;
+
+ _.delay(function() {
+ pass = true;
+ });
+
+ assert.notOk(pass);
+
+ setTimeout(function() {
+ assert.ok(pass);
+ done();
+ }, 0);
+ });
+
+ QUnit.test('should be cancelable', function(assert) {
+ assert.expect(1);
+
+ var done = assert.async();
+
+ var pass = true;
+
+ var timerId = _.delay(function() {
+ pass = false;
+ }, 32);
+
+ clearTimeout(timerId);
+
+ setTimeout(function() {
+ assert.ok(pass);
+ done();
+ }, 64);
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('difference methods');
+
+ lodashStable.each(['difference', 'differenceBy', 'differenceWith'], function(methodName) {
+ var args = (function() { return arguments; }(1, 2, 3)),
+ func = _[methodName];
+
+ QUnit.test('`_.' + methodName + '` should return the difference of the given arrays', function(assert) {
+ assert.expect(2);
+
+ var actual = func([1, 2, 3, 4, 5], [5, 2, 10]);
+ assert.deepEqual(actual, [1, 3, 4]);
+
+ actual = func([1, 2, 3, 4, 5], [5, 2, 10], [8, 4]);
+ assert.deepEqual(actual, [1, 3]);
+ });
+
+ QUnit.test('`_.' + methodName + '` should treat `-0` as `0`', function(assert) {
+ assert.expect(2);
+
+ var array = [-0, 0];
+
+ var actual = lodashStable.map(array, function(value) {
+ return func(array, [value]);
+ });
+
+ assert.deepEqual(actual, [[], []]);
+
+ actual = lodashStable.map(func([-0, 1], [1]), lodashStable.toString);
+ assert.deepEqual(actual, ['0']);
+ });
+
+ QUnit.test('`_.' + methodName + '` should match `NaN`', function(assert) {
+ assert.expect(1);
+
+ assert.deepEqual(func([1, NaN, 3], [NaN, 5, NaN]), [1, 3]);
+ });
+
+ QUnit.test('`_.' + methodName + '` should work with large arrays', function(assert) {
+ assert.expect(1);
+
+ var array1 = lodashStable.range(LARGE_ARRAY_SIZE + 1),
+ array2 = lodashStable.range(LARGE_ARRAY_SIZE),
+ a = {},
+ b = {},
+ c = {};
+
+ array1.push(a, b, c);
+ array2.push(b, c, a);
+
+ assert.deepEqual(func(array1, array2), [LARGE_ARRAY_SIZE]);
+ });
+
+ QUnit.test('`_.' + methodName + '` should work with large arrays of `-0` as `0`', function(assert) {
+ assert.expect(2);
+
+ var array = [-0, 0];
+
+ var actual = lodashStable.map(array, function(value) {
+ var largeArray = lodashStable.times(LARGE_ARRAY_SIZE, lodashStable.constant(value));
+ return func(array, largeArray);
+ });
+
+ assert.deepEqual(actual, [[], []]);
+
+ var largeArray = lodashStable.times(LARGE_ARRAY_SIZE, alwaysOne);
+ actual = lodashStable.map(func([-0, 1], largeArray), lodashStable.toString);
+ assert.deepEqual(actual, ['0']);
+ });
+
+ QUnit.test('`_.' + methodName + '` should work with large arrays of `NaN`', function(assert) {
+ assert.expect(1);
+
+ var largeArray = lodashStable.times(LARGE_ARRAY_SIZE, alwaysNaN);
+ assert.deepEqual(func([1, NaN, 3], largeArray), [1, 3]);
+ });
+
+ QUnit.test('`_.' + methodName + '` should work with large arrays of objects', function(assert) {
+ assert.expect(1);
+
+ var object1 = {},
+ object2 = {},
+ largeArray = lodashStable.times(LARGE_ARRAY_SIZE, lodashStable.constant(object1));
+
+ assert.deepEqual(func([object1, object2], largeArray), [object2]);
+ });
+
+ QUnit.test('`_.' + methodName + '` should ignore values that are not array-like', function(assert) {
+ assert.expect(3);
+
+ var array = [1, null, 3];
+
+ assert.deepEqual(func(args, 3, { '0': 1 }), [1, 2, 3]);
+ assert.deepEqual(func(null, array, 1), []);
+ assert.deepEqual(func(array, args, null), [null]);
+ });
+ });
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.differenceBy');
+
+ (function() {
+ QUnit.test('should accept an `iteratee` argument', function(assert) {
+ assert.expect(2);
+
+ var actual = _.differenceBy([3.1, 2.2, 1.3], [4.4, 2.5], Math.floor);
+ assert.deepEqual(actual, [3.1, 1.3]);
+
+ actual = _.differenceBy([{ 'x': 2 }, { 'x': 1 }], [{ 'x': 1 }], 'x');
+ assert.deepEqual(actual, [{ 'x': 2 }]);
+ });
+
+ QUnit.test('should provide the correct `iteratee` arguments', function(assert) {
+ assert.expect(1);
+
+ var args;
+
+ _.differenceBy([3.1, 2.2, 1.3], [4.4, 2.5], function() {
+ args || (args = slice.call(arguments));
+ });
+
+ assert.deepEqual(args, [4.4]);
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.differenceWith');
+
+ (function() {
+ QUnit.test('should work with a `comparator` argument', function(assert) {
+ assert.expect(1);
+
+ var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }],
+ actual = _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], lodashStable.isEqual);
+
+ assert.deepEqual(actual, [objects[1]]);
+ });
+
+ QUnit.test('should preserve the sign of `0`', function(assert) {
+ assert.expect(1);
+
+ var array = [-0, 1],
+ largeArray = lodashStable.times(LARGE_ARRAY_SIZE, alwaysOne),
+ others = [[1], largeArray],
+ expected = lodashStable.map(others, lodashStable.constant(['-0']));
+
+ var actual = lodashStable.map(others, function(other) {
+ return lodashStable.map(_.differenceWith(array, other, lodashStable.eq), lodashStable.toString);
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.divide');
+
+ (function() {
+ QUnit.test('should divide two numbers', function(assert) {
+ assert.expect(3);
+
+ assert.strictEqual(_.divide(6, 4), 1.5);
+ assert.strictEqual(_.divide(-6, 4), -1.5);
+ assert.strictEqual(_.divide(-6, -4), 1.5);
+ });
+
+ QUnit.test('should coerce arguments to numbers', function(assert) {
+ assert.expect(2);
+
+ assert.strictEqual(_.divide('6', '4'), 1.5);
+ assert.deepEqual(_.divide('x', 'y'), NaN);
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.drop');
+
+ (function() {
+ var array = [1, 2, 3];
+
+ QUnit.test('should drop the first two elements', function(assert) {
+ assert.expect(1);
+
+ assert.deepEqual(_.drop(array, 2), [3]);
+ });
+
+ QUnit.test('should treat falsey `n` values, except `undefined`, as `0`', function(assert) {
+ assert.expect(1);
+
+ var expected = lodashStable.map(falsey, function(value) {
+ return value === undefined ? [2, 3] : array;
+ });
+
+ var actual = lodashStable.map(falsey, function(n) {
+ return _.drop(array, n);
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('should return all elements when `n` < `1`', function(assert) {
+ assert.expect(3);
+
+ lodashStable.each([0, -1, -Infinity], function(n) {
+ assert.deepEqual(_.drop(array, n), array);
+ });
+ });
+
+ QUnit.test('should return an empty array when `n` >= `array.length`', function(assert) {
+ assert.expect(4);
+
+ lodashStable.each([3, 4, Math.pow(2, 32), Infinity], function(n) {
+ assert.deepEqual(_.drop(array, n), []);
+ });
+ });
+
+ QUnit.test('should coerce `n` to an integer', function(assert) {
+ assert.expect(1);
+
+ assert.deepEqual(_.drop(array, 1.6), [2, 3]);
+ });
+
+ QUnit.test('should work as an iteratee for methods like `_.map`', function(assert) {
+ assert.expect(1);
+
+ var array = [[1, 2, 3], [4, 5, 6], [7, 8, 9]],
+ actual = lodashStable.map(array, _.drop);
+
+ assert.deepEqual(actual, [[2, 3], [5, 6], [8, 9]]);
+ });
+
+ QUnit.test('should work in a lazy sequence', function(assert) {
+ assert.expect(6);
+
+ if (!isNpm) {
+ var array = lodashStable.range(1, LARGE_ARRAY_SIZE + 1),
+ predicate = function(value) { values.push(value); return isEven(value); },
+ values = [],
+ actual = _(array).drop(2).drop().value();
+
+ assert.deepEqual(actual, array.slice(3));
+
+ actual = _(array).filter(predicate).drop(2).drop().value();
+ assert.deepEqual(values, array);
+ assert.deepEqual(actual, _.drop(_.drop(_.filter(array, predicate), 2)));
+
+ actual = _(array).drop(2).dropRight().drop().dropRight(2).value();
+ assert.deepEqual(actual, _.dropRight(_.drop(_.dropRight(_.drop(array, 2))), 2));
+
+ values = [];
+
+ actual = _(array).drop().filter(predicate).drop(2).dropRight().drop().dropRight(2).value();
+ assert.deepEqual(values, array.slice(1));
+ assert.deepEqual(actual, _.dropRight(_.drop(_.dropRight(_.drop(_.filter(_.drop(array), predicate), 2))), 2));
+ }
+ else {
+ skipAssert(assert, 6);
+ }
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.dropRight');
+
+ (function() {
+ var array = [1, 2, 3];
+
+ QUnit.test('should drop the last two elements', function(assert) {
+ assert.expect(1);
+
+ assert.deepEqual(_.dropRight(array, 2), [1]);
+ });
+
+ QUnit.test('should treat falsey `n` values, except `undefined`, as `0`', function(assert) {
+ assert.expect(1);
+
+ var expected = lodashStable.map(falsey, function(value) {
+ return value === undefined ? [1, 2] : array;
+ });
+
+ var actual = lodashStable.map(falsey, function(n) {
+ return _.dropRight(array, n);
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('should return all elements when `n` < `1`', function(assert) {
+ assert.expect(3);
+
+ lodashStable.each([0, -1, -Infinity], function(n) {
+ assert.deepEqual(_.dropRight(array, n), array);
+ });
+ });
+
+ QUnit.test('should return an empty array when `n` >= `array.length`', function(assert) {
+ assert.expect(4);
+
+ lodashStable.each([3, 4, Math.pow(2, 32), Infinity], function(n) {
+ assert.deepEqual(_.dropRight(array, n), []);
+ });
+ });
+
+ QUnit.test('should coerce `n` to an integer', function(assert) {
+ assert.expect(1);
+
+ assert.deepEqual(_.dropRight(array, 1.6), [1, 2]);
+ });
+
+ QUnit.test('should work as an iteratee for methods like `_.map`', function(assert) {
+ assert.expect(1);
+
+ var array = [[1, 2, 3], [4, 5, 6], [7, 8, 9]],
+ actual = lodashStable.map(array, _.dropRight);
+
+ assert.deepEqual(actual, [[1, 2], [4, 5], [7, 8]]);
+ });
+
+ QUnit.test('should work in a lazy sequence', function(assert) {
+ assert.expect(6);
+
+ if (!isNpm) {
+ var array = lodashStable.range(1, LARGE_ARRAY_SIZE + 1),
+ predicate = function(value) { values.push(value); return isEven(value); },
+ values = [],
+ actual = _(array).dropRight(2).dropRight().value();
+
+ assert.deepEqual(actual, array.slice(0, -3));
+
+ actual = _(array).filter(predicate).dropRight(2).dropRight().value();
+ assert.deepEqual(values, array);
+ assert.deepEqual(actual, _.dropRight(_.dropRight(_.filter(array, predicate), 2)));
+
+ actual = _(array).dropRight(2).drop().dropRight().drop(2).value();
+ assert.deepEqual(actual, _.drop(_.dropRight(_.drop(_.dropRight(array, 2))), 2));
+
+ values = [];
+
+ actual = _(array).dropRight().filter(predicate).dropRight(2).drop().dropRight().drop(2).value();
+ assert.deepEqual(values, array.slice(0, -1));
+ assert.deepEqual(actual, _.drop(_.dropRight(_.drop(_.dropRight(_.filter(_.dropRight(array), predicate), 2))), 2));
+ }
+ else {
+ skipAssert(assert, 6);
+ }
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.dropRightWhile');
+
+ (function() {
+ var array = [1, 2, 3, 4];
+
+ var objects = [
+ { 'a': 0, 'b': 0 },
+ { 'a': 1, 'b': 1 },
+ { 'a': 2, 'b': 2 }
+ ];
+
+ QUnit.test('should drop elements while `predicate` returns truthy', function(assert) {
+ assert.expect(1);
+
+ var actual = _.dropRightWhile(array, function(n) {
+ return n > 2;
+ });
+
+ assert.deepEqual(actual, [1, 2]);
+ });
+
+ QUnit.test('should provide the correct `predicate` arguments', function(assert) {
+ assert.expect(1);
+
+ var args;
+
+ _.dropRightWhile(array, function() {
+ args = slice.call(arguments);
+ });
+
+ assert.deepEqual(args, [4, 3, array]);
+ });
+
+ QUnit.test('should work with `_.matches` shorthands', function(assert) {
+ assert.expect(1);
+
+ assert.deepEqual(_.dropRightWhile(objects, { 'b': 2 }), objects.slice(0, 2));
+ });
+
+ QUnit.test('should work with `_.matchesProperty` shorthands', function(assert) {
+ assert.expect(1);
+
+ assert.deepEqual(_.dropRightWhile(objects, ['b', 2]), objects.slice(0, 2));
+ });
+
+ QUnit.test('should work with `_.property` shorthands', function(assert) {
+ assert.expect(1);
+
+ assert.deepEqual(_.dropRightWhile(objects, 'b'), objects.slice(0, 1));
+ });
+
+ QUnit.test('should return a wrapped value when chaining', function(assert) {
+ assert.expect(2);
+
+ if (!isNpm) {
+ var wrapped = _(array).dropRightWhile(function(n) {
+ return n > 2;
+ });
+
+ assert.ok(wrapped instanceof _);
+ assert.deepEqual(wrapped.value(), [1, 2]);
+ }
+ else {
+ skipAssert(assert, 2);
+ }
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.dropWhile');
+
+ (function() {
+ var array = [1, 2, 3, 4];
+
+ var objects = [
+ { 'a': 2, 'b': 2 },
+ { 'a': 1, 'b': 1 },
+ { 'a': 0, 'b': 0 }
+ ];
+
+ QUnit.test('should drop elements while `predicate` returns truthy', function(assert) {
+ assert.expect(1);
+
+ var actual = _.dropWhile(array, function(n) {
+ return n < 3;
+ });
+
+ assert.deepEqual(actual, [3, 4]);
+ });
+
+ QUnit.test('should provide the correct `predicate` arguments', function(assert) {
+ assert.expect(1);
+
+ var args;
+
+ _.dropWhile(array, function() {
+ args = slice.call(arguments);
+ });
+
+ assert.deepEqual(args, [1, 0, array]);
+ });
+
+ QUnit.test('should work with `_.matches` shorthands', function(assert) {
+ assert.expect(1);
+
+ assert.deepEqual(_.dropWhile(objects, { 'b': 2 }), objects.slice(1));
+ });
+
+ QUnit.test('should work with `_.matchesProperty` shorthands', function(assert) {
+ assert.expect(1);
+
+ assert.deepEqual(_.dropWhile(objects, ['b', 2]), objects.slice(1));
+ });
+
+ QUnit.test('should work with `_.property` shorthands', function(assert) {
+ assert.expect(1);
+
+ assert.deepEqual(_.dropWhile(objects, 'b'), objects.slice(2));
+ });
+
+ QUnit.test('should work in a lazy sequence', function(assert) {
+ assert.expect(3);
+
+ if (!isNpm) {
+ var array = lodashStable.range(1, LARGE_ARRAY_SIZE + 3),
+ predicate = function(n) { return n < 3; },
+ expected = _.dropWhile(array, predicate),
+ wrapped = _(array).dropWhile(predicate);
+
+ assert.deepEqual(wrapped.value(), expected);
+ assert.deepEqual(wrapped.reverse().value(), expected.slice().reverse());
+ assert.strictEqual(wrapped.last(), _.last(expected));
+ }
+ else {
+ skipAssert(assert, 3);
+ }
+ });
+
+ QUnit.test('should work in a lazy sequence with `drop`', function(assert) {
+ assert.expect(1);
+
+ if (!isNpm) {
+ var array = lodashStable.range(1, LARGE_ARRAY_SIZE + 3);
+
+ var actual = _(array)
+ .dropWhile(function(n) { return n == 1; })
+ .drop()
+ .dropWhile(function(n) { return n == 3; })
+ .value();
+
+ assert.deepEqual(actual, array.slice(3));
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.endsWith');
+
+ (function() {
+ var string = 'abc';
+
+ QUnit.test('should return `true` if a string ends with `target`', function(assert) {
+ assert.expect(1);
+
+ assert.strictEqual(_.endsWith(string, 'c'), true);
+ });
+
+ QUnit.test('should return `false` if a string does not end with `target`', function(assert) {
+ assert.expect(1);
+
+ assert.strictEqual(_.endsWith(string, 'b'), false);
+ });
+
+ QUnit.test('should work with a `position` argument', function(assert) {
+ assert.expect(1);
+
+ assert.strictEqual(_.endsWith(string, 'b', 2), true);
+ });
+
+ QUnit.test('should work with `position` >= `string.length`', function(assert) {
+ assert.expect(4);
+
+ lodashStable.each([3, 5, MAX_SAFE_INTEGER, Infinity], function(position) {
+ assert.strictEqual(_.endsWith(string, 'c', position), true);
+ });
+ });
+
+ QUnit.test('should treat falsey `position` values, except `undefined`, as `0`', function(assert) {
+ assert.expect(1);
+
+ var expected = lodashStable.map(falsey, alwaysTrue);
+
+ var actual = lodashStable.map(falsey, function(position) {
+ return _.endsWith(string, position === undefined ? 'c' : '', position);
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('should treat a negative `position` as `0`', function(assert) {
+ assert.expect(6);
+
+ lodashStable.each([-1, -3, -Infinity], function(position) {
+ assert.ok(lodashStable.every(string, function(chr) {
+ return _.endsWith(string, chr, position) === false;
+ }));
+ assert.strictEqual(_.endsWith(string, '', position), true);
+ });
+ });
+
+ QUnit.test('should coerce `position` to an integer', function(assert) {
+ assert.expect(1);
+
+ assert.strictEqual(_.endsWith(string, 'ab', 2.2), true);
+ });
+
+ QUnit.test('should return `true` when `target` is an empty string regardless of `position`', function(assert) {
+ assert.expect(1);
+
+ assert.ok(lodashStable.every([-Infinity, NaN, -3, -1, 0, 1, 2, 3, 5, MAX_SAFE_INTEGER, Infinity], function(position) {
+ return _.endsWith(string, '', position, true);
+ }));
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.eq');
+
+ (function() {
+ QUnit.test('should perform a `SameValueZero` comparison of two values', function(assert) {
+ assert.expect(11);
+
+ assert.strictEqual(_.eq(), true);
+ assert.strictEqual(_.eq(undefined), true);
+ assert.strictEqual(_.eq(0, -0), true);
+ assert.strictEqual(_.eq(NaN, NaN), true);
+ assert.strictEqual(_.eq(1, 1), true);
+
+ assert.strictEqual(_.eq(null, undefined), false);
+ assert.strictEqual(_.eq(1, Object(1)), false);
+ assert.strictEqual(_.eq(1, '1'), false);
+ assert.strictEqual(_.eq(1, '1'), false);
+
+ var object = { 'a': 1 };
+ assert.strictEqual(_.eq(object, object), true);
+ assert.strictEqual(_.eq(object, { 'a': 1 }), false);
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.escape');
+
+ (function() {
+ var escaped = '&<>"'`\/',
+ unescaped = '&<>"\'`\/';
+
+ escaped += escaped;
+ unescaped += unescaped;
+
+ QUnit.test('should escape values', function(assert) {
+ assert.expect(1);
+
+ assert.strictEqual(_.escape(unescaped), escaped);
+ });
+
+ QUnit.test('should not escape the "/" character', function(assert) {
+ assert.expect(1);
+
+ assert.strictEqual(_.escape('/'), '/');
+ });
+
+ QUnit.test('should handle strings with nothing to escape', function(assert) {
+ assert.expect(1);
+
+ assert.strictEqual(_.escape('abc'), 'abc');
+ });
+
+ QUnit.test('should escape the same characters unescaped by `_.unescape`', function(assert) {
+ assert.expect(1);
+
+ assert.strictEqual(_.escape(_.unescape(escaped)), escaped);
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.escapeRegExp');
+
+ (function() {
+ var escaped = '\\^\\$\\.\\*\\+\\?\\(\\)\\[\\]\\{\\}\\|\\\\',
+ unescaped = '^$.*+?()[]{}|\\';
+
+ QUnit.test('should escape values', function(assert) {
+ assert.expect(1);
+
+ assert.strictEqual(_.escapeRegExp(unescaped + unescaped), escaped + escaped);
+ });
+
+ QUnit.test('should handle strings with nothing to escape', function(assert) {
+ assert.expect(1);
+
+ assert.strictEqual(_.escapeRegExp('abc'), 'abc');
+ });
+
+ QUnit.test('should return an empty string for empty values', function(assert) {
+ assert.expect(1);
+
+ var values = [, null, undefined, ''],
+ expected = lodashStable.map(values, alwaysEmptyString);
+
+ var actual = lodashStable.map(values, function(value, index) {
+ return index ? _.escapeRegExp(value) : _.escapeRegExp();
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.every');
+
+ (function() {
+ QUnit.test('should return `true` if `predicate` returns truthy for all elements', function(assert) {
+ assert.expect(1);
+
+ assert.strictEqual(lodashStable.every([true, 1, 'a'], identity), true);
+ });
+
+ QUnit.test('should return `true` for empty collections', function(assert) {
+ assert.expect(1);
+
+ var expected = lodashStable.map(empties, alwaysTrue);
+
+ var actual = lodashStable.map(empties, function(value) {
+ try {
+ return _.every(value, identity);
+ } catch (e) {}
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('should return `false` as soon as `predicate` returns falsey', function(assert) {
+ assert.expect(2);
+
+ var count = 0;
+
+ assert.strictEqual(_.every([true, null, true], function(value) {
+ count++;
+ return value;
+ }), false);
+
+ assert.strictEqual(count, 2);
+ });
+
+ QUnit.test('should work with collections of `undefined` values (test in IE < 9)', function(assert) {
+ assert.expect(1);
+
+ assert.strictEqual(_.every([undefined, undefined, undefined], identity), false);
+ });
+
+ QUnit.test('should use `_.identity` when `predicate` is nullish', function(assert) {
+ assert.expect(2);
+
+ var values = [, null, undefined],
+ expected = lodashStable.map(values, alwaysFalse);
+
+ var actual = lodashStable.map(values, function(value, index) {
+ var array = [0];
+ return index ? _.every(array, value) : _.every(array);
+ });
+
+ assert.deepEqual(actual, expected);
+
+ expected = lodashStable.map(values, alwaysTrue);
+ actual = lodashStable.map(values, function(value, index) {
+ var array = [1];
+ return index ? _.every(array, value) : _.every(array);
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('should work with `_.property` shorthands', function(assert) {
+ assert.expect(2);
+
+ var objects = [{ 'a': 0, 'b': 1 }, { 'a': 1, 'b': 2 }];
+ assert.strictEqual(_.every(objects, 'a'), false);
+ assert.strictEqual(_.every(objects, 'b'), true);
+ });
+
+ QUnit.test('should work with `_.matches` shorthands', function(assert) {
+ assert.expect(2);
+
+ var objects = [{ 'a': 0, 'b': 0 }, { 'a': 0, 'b': 1 }];
+ assert.strictEqual(_.every(objects, { 'a': 0 }), true);
+ assert.strictEqual(_.every(objects, { 'b': 1 }), false);
+ });
+
+ QUnit.test('should work as an iteratee for methods like `_.map`', function(assert) {
+ assert.expect(1);
+
+ var actual = lodashStable.map([[1]], _.every);
+ assert.deepEqual(actual, [true]);
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('strict mode checks');
+
+ lodashStable.each(['assign', 'assignIn', 'bindAll', 'defaults'], function(methodName) {
+ var func = _[methodName],
+ isBindAll = methodName == 'bindAll';
+
+ QUnit.test('`_.' + methodName + '` should ' + (isStrict ? '' : 'not ') + 'throw strict mode errors', function(assert) {
+ assert.expect(1);
+
+ if (freeze) {
+ var object = freeze({ 'a': undefined, 'b': function() {} }),
+ pass = !isStrict;
+
+ try {
+ func(object, isBindAll ? 'b' : { 'a': 1 });
+ } catch (e) {
+ pass = !pass;
+ }
+ assert.ok(pass);
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+ });
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.fill');
+
+ (function() {
+ QUnit.test('should use a default `start` of `0` and a default `end` of `array.length`', function(assert) {
+ assert.expect(1);
+
+ var array = [1, 2, 3];
+ assert.deepEqual(_.fill(array, 'a'), ['a', 'a', 'a']);
+ });
+
+ QUnit.test('should use `undefined` for `value` if not given', function(assert) {
+ assert.expect(2);
+
+ var array = [1, 2, 3],
+ actual = _.fill(array);
+
+ assert.deepEqual(actual, Array(3));
+ assert.ok(lodashStable.every(actual, function(value, index) {
+ return index in actual;
+ }));
+ });
+
+ QUnit.test('should work with a positive `start`', function(assert) {
+ assert.expect(1);
+
+ var array = [1, 2, 3];
+ assert.deepEqual(_.fill(array, 'a', 1), [1, 'a', 'a']);
+ });
+
+ QUnit.test('should work with a `start` >= `array.length`', function(assert) {
+ assert.expect(4);
+
+ lodashStable.each([3, 4, Math.pow(2, 32), Infinity], function(start) {
+ var array = [1, 2, 3];
+ assert.deepEqual(_.fill(array, 'a', start), [1, 2, 3]);
+ });
+ });
+
+ QUnit.test('should treat falsey `start` values as `0`', function(assert) {
+ assert.expect(1);
+
+ var expected = lodashStable.map(falsey, lodashStable.constant(['a', 'a', 'a']));
+
+ var actual = lodashStable.map(falsey, function(start) {
+ var array = [1, 2, 3];
+ return _.fill(array, 'a', start);
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('should work with a negative `start`', function(assert) {
+ assert.expect(1);
+
+ var array = [1, 2, 3];
+ assert.deepEqual(_.fill(array, 'a', -1), [1, 2, 'a']);
+ });
+
+ QUnit.test('should work with a negative `start` <= negative `array.length`', function(assert) {
+ assert.expect(3);
+
+ lodashStable.each([-3, -4, -Infinity], function(start) {
+ var array = [1, 2, 3];
+ assert.deepEqual(_.fill(array, 'a', start), ['a', 'a', 'a']);
+ });
+ });
+
+ QUnit.test('should work with `start` >= `end`', function(assert) {
+ assert.expect(2);
+
+ lodashStable.each([2, 3], function(start) {
+ var array = [1, 2, 3];
+ assert.deepEqual(_.fill(array, 'a', start, 2), [1, 2, 3]);
+ });
+ });
+
+ QUnit.test('should work with a positive `end`', function(assert) {
+ assert.expect(1);
+
+ var array = [1, 2, 3];
+ assert.deepEqual(_.fill(array, 'a', 0, 1), ['a', 2, 3]);
+ });
+
+ QUnit.test('should work with a `end` >= `array.length`', function(assert) {
+ assert.expect(4);
+
+ lodashStable.each([3, 4, Math.pow(2, 32), Infinity], function(end) {
+ var array = [1, 2, 3];
+ assert.deepEqual(_.fill(array, 'a', 0, end), ['a', 'a', 'a']);
+ });
+ });
+
+ QUnit.test('should treat falsey `end` values, except `undefined`, as `0`', function(assert) {
+ assert.expect(1);
+
+ var expected = lodashStable.map(falsey, function(value) {
+ return value === undefined ? ['a', 'a', 'a'] : [1, 2, 3];
+ });
+
+ var actual = lodashStable.map(falsey, function(end) {
+ var array = [1, 2, 3];
+ return _.fill(array, 'a', 0, end);
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('should work with a negative `end`', function(assert) {
+ assert.expect(1);
+
+ var array = [1, 2, 3];
+ assert.deepEqual(_.fill(array, 'a', 0, -1), ['a', 'a', 3]);
+ });
+
+ QUnit.test('should work with a negative `end` <= negative `array.length`', function(assert) {
+ assert.expect(3);
+
+ lodashStable.each([-3, -4, -Infinity], function(end) {
+ var array = [1, 2, 3];
+ assert.deepEqual(_.fill(array, 'a', 0, end), [1, 2, 3]);
+ });
+ });
+
+ QUnit.test('should coerce `start` and `end` to integers', function(assert) {
+ assert.expect(1);
+
+ var positions = [[0.1, 1.6], ['0', 1], [0, '1'], ['1'], [NaN, 1], [1, NaN]];
+
+ var actual = lodashStable.map(positions, function(pos) {
+ var array = [1, 2, 3];
+ return _.fill.apply(_, [array, 'a'].concat(pos));
+ });
+
+ assert.deepEqual(actual, [['a', 2, 3], ['a', 2, 3], ['a', 2, 3], [1, 'a', 'a'], ['a', 2, 3], [1, 2, 3]]);
+ });
+
+ QUnit.test('should work as an iteratee for methods like `_.map`', function(assert) {
+ assert.expect(1);
+
+ var array = [[1, 2], [3, 4]],
+ actual = lodashStable.map(array, _.fill);
+
+ assert.deepEqual(actual, [[0, 0], [1, 1]]);
+ });
+
+ QUnit.test('should return a wrapped value when chaining', function(assert) {
+ assert.expect(3);
+
+ if (!isNpm) {
+ var array = [1, 2, 3],
+ wrapped = _(array).fill('a'),
+ actual = wrapped.value();
+
+ assert.ok(wrapped instanceof _);
+ assert.deepEqual(actual, ['a', 'a', 'a']);
+ assert.strictEqual(actual, array);
+ }
+ else {
+ skipAssert(assert, 3);
+ }
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.filter');
+
+ (function() {
+ var array = [1, 2, 3];
+
+ QUnit.test('should return elements `predicate` returns truthy for', function(assert) {
+ assert.expect(1);
+
+ assert.deepEqual(_.filter(array, isEven), [2]);
+ });
+
+ QUnit.test('should iterate over an object with numeric keys (test in Mobile Safari 8)', function(assert) {
+ assert.expect(1);
+
+ // Trigger a mobile Safari 8 JIT bug.
+ // See https://github.com/lodash/lodash/issues/799.
+ var counter = 0,
+ object = { '1': 'foo', '8': 'bar', '50': 'baz' };
+
+ lodashStable.times(1000, function(assert) {
+ _.filter([], alwaysTrue);
+ });
+
+ _.filter(object, function() {
+ counter++;
+ return true;
+ });
+
+ assert.strictEqual(counter, 3);
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ lodashStable.each(['find', 'findLast', 'findIndex', 'findLastIndex', 'findKey', 'findLastKey'], function(methodName) {
+ QUnit.module('lodash.' + methodName);
+
+ var func = _[methodName];
+
+ (function() {
+ var objects = [
+ { 'a': 0, 'b': 0 },
+ { 'a': 1, 'b': 1 },
+ { 'a': 2, 'b': 2 }
+ ];
+
+ var expected = ({
+ 'find': [objects[1], undefined, objects[2], objects[1]],
+ 'findLast': [objects[2], undefined, objects[2], objects[2]],
+ 'findIndex': [1, -1, 2, 1],
+ 'findLastIndex': [2, -1, 2, 2],
+ 'findKey': ['1', undefined, '2', '1'],
+ 'findLastKey': ['2', undefined, '2', '2']
+ })[methodName];
+
+ QUnit.test('`_.' + methodName + '` should return the found value', function(assert) {
+ assert.expect(1);
+
+ assert.strictEqual(func(objects, function(object) { return object.a; }), expected[0]);
+ });
+
+ QUnit.test('`_.' + methodName + '` should return `' + expected[1] + '` if value is not found', function(assert) {
+ assert.expect(1);
+
+ assert.strictEqual(func(objects, function(object) { return object.a === 3; }), expected[1]);
+ });
+
+ QUnit.test('`_.' + methodName + '` should work with `_.matches` shorthands', function(assert) {
+ assert.expect(1);
+
+ assert.strictEqual(func(objects, { 'b': 2 }), expected[2]);
+ });
+
+ QUnit.test('`_.' + methodName + '` should work with `_.matchesProperty` shorthands', function(assert) {
+ assert.expect(1);
+
+ assert.strictEqual(func(objects, ['b', 2]), expected[2]);
+ });
+
+ QUnit.test('`_.' + methodName + '` should work with `_.property` shorthands', function(assert) {
+ assert.expect(1);
+
+ assert.strictEqual(func(objects, 'b'), expected[3]);
+ });
+
+ QUnit.test('`_.' + methodName + '` should return `' + expected[1] + '` for empty collections', function(assert) {
+ assert.expect(1);
+
+ var emptyValues = lodashStable.endsWith(methodName, 'Index') ? lodashStable.reject(empties, lodashStable.isPlainObject) : empties,
+ expecting = lodashStable.map(emptyValues, lodashStable.constant(expected[1]));
+
+ var actual = lodashStable.map(emptyValues, function(value) {
+ try {
+ return func(value, { 'a': 3 });
+ } catch (e) {}
+ });
+
+ assert.deepEqual(actual, expecting);
+ });
+ }());
+
+ (function() {
+ var array = [1, 2, 3, 4];
+
+ var expected = ({
+ 'find': 1,
+ 'findLast': 4,
+ 'findIndex': 0,
+ 'findLastIndex': 3,
+ 'findKey': '0',
+ 'findLastKey': '3'
+ })[methodName];
+
+ QUnit.test('`_.' + methodName + '` should return an unwrapped value when implicitly chaining', function(assert) {
+ assert.expect(1);
+
+ if (!isNpm) {
+ assert.strictEqual(_(array)[methodName](), expected);
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+
+ QUnit.test('`_.' + methodName + '` should return a wrapped value when explicitly chaining', function(assert) {
+ assert.expect(1);
+
+ if (!isNpm) {
+ assert.ok(_(array).chain()[methodName]() instanceof _);
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+
+ QUnit.test('`_.' + methodName + '` should not execute immediately when explicitly chaining', function(assert) {
+ assert.expect(1);
+
+ if (!isNpm) {
+ var wrapped = _(array).chain()[methodName]();
+ assert.strictEqual(wrapped.__wrapped__, array);
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+
+ QUnit.test('`_.' + methodName + '` should work in a lazy sequence', function(assert) {
+ assert.expect(2);
+
+ if (!isNpm) {
+ var largeArray = lodashStable.range(1, LARGE_ARRAY_SIZE + 1),
+ smallArray = array;
+
+ lodashStable.times(2, function(index) {
+ var array = index ? largeArray : smallArray,
+ wrapped = _(array).filter(isEven);
+
+ assert.strictEqual(wrapped[methodName](), func(lodashStable.filter(array, isEven)));
+ });
+ }
+ else {
+ skipAssert(assert, 2);
+ }
+ });
+ }());
+
+ (function() {
+ var expected = ({
+ 'find': 1,
+ 'findLast': 2,
+ 'findKey': 'a',
+ 'findLastKey': 'b'
+ })[methodName];
+
+ if (expected != null) {
+ QUnit.test('`_.' + methodName + '` should work with an object for `collection`', function(assert) {
+ assert.expect(1);
+
+ var actual = func({ 'a': 1, 'b': 2, 'c': 3 }, function(n) {
+ return n < 3;
+ });
+
+ assert.strictEqual(actual, expected);
+ });
+ }
+ }());
+ });
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.find and lodash.findLast');
+
+ lodashStable.each(['find', 'findLast'], function(methodName) {
+ var isFind = methodName == 'find';
+
+ QUnit.test('`_.' + methodName + '` should support shortcut fusion', function(assert) {
+ assert.expect(3);
+
+ if (!isNpm) {
+ var findCount = 0,
+ mapCount = 0,
+ array = lodashStable.range(1, LARGE_ARRAY_SIZE + 1),
+ iteratee = function(value) { mapCount++; return square(value); },
+ predicate = function(value) { findCount++; return isEven(value); },
+ actual = _(array).map(iteratee)[methodName](predicate);
+
+ assert.strictEqual(findCount, isFind ? 2 : 1);
+ assert.strictEqual(mapCount, isFind ? 2 : 1);
+ assert.strictEqual(actual, isFind ? 4 : square(LARGE_ARRAY_SIZE));
+ }
+ else {
+ skipAssert(assert, 3);
+ }
+ });
+ });
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.flip');
+
+ (function() {
+ function fn() {
+ return slice.call(arguments);
+ }
+
+ QUnit.test('should flip arguments provided to `func`', function(assert) {
+ assert.expect(1);
+
+ var flipped = _.flip(fn);
+ assert.deepEqual(flipped('a', 'b', 'c', 'd'), ['d', 'c', 'b', 'a']);
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.flatMapDepth');
+
+ (function() {
+ var array = [1, [2, [3, [4]], 5]];
+
+ QUnit.test('should use a default `depth` of `1`', function(assert) {
+ assert.expect(1);
+
+ assert.deepEqual(_.flatMapDepth(array, identity), [1, 2, [3, [4]], 5]);
+ });
+
+ QUnit.test('should use `_.identity` when `iteratee` is nullish', function(assert) {
+ assert.expect(1);
+
+ var values = [, null, undefined],
+ expected = lodashStable.map(values, lodashStable.constant([1, 2, [3, [4]], 5]));
+
+ var actual = lodashStable.map(values, function(value, index) {
+ return index ? _.flatMapDepth(array, value) : _.flatMapDepth(array);
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('should treat a `depth` of < `1` as a shallow clone', function(assert) {
+ assert.expect(2);
+
+ lodashStable.each([-1, 0], function(depth) {
+ assert.deepEqual(_.flatMapDepth(array, identity, depth), [1, [2, [3, [4]], 5]]);
+ });
+ });
+
+ QUnit.test('should coerce `depth` to an integer', function(assert) {
+ assert.expect(1);
+
+ assert.deepEqual(_.flatMapDepth(array, identity, 2.2), [1, 2, 3, [4], 5]);
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('flatMap methods');
+
+ lodashStable.each(['flatMap', 'flatMapDeep', 'flatMapDepth'], function(methodName) {
+ var func = _[methodName],
+ array = [1, 2, 3, 4];
+
+ function duplicate(n) {
+ return [n, n];
+ }
+
+ QUnit.test('`_.' + methodName + '` should map values in `array` to a new flattened array', function(assert) {
+ assert.expect(1);
+
+ var actual = func(array, duplicate),
+ expected = lodashStable.flatten(lodashStable.map(array, duplicate));
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('`_.' + methodName + '` should work with `_.property` shorthands', function(assert) {
+ assert.expect(1);
+
+ var objects = [{ 'a': [1, 2] }, { 'a': [3, 4] }];
+ assert.deepEqual(func(objects, 'a'), array);
+ });
+
+ QUnit.test('`_.' + methodName + '` should iterate over own string keyed properties of objects', function(assert) {
+ assert.expect(1);
+
+ function Foo() {
+ this.a = [1, 2];
+ }
+ Foo.prototype.b = [3, 4];
+
+ var actual = func(new Foo, identity);
+ assert.deepEqual(actual, [1, 2]);
+ });
+
+ QUnit.test('`_.' + methodName + '` should use `_.identity` when `iteratee` is nullish', function(assert) {
+ assert.expect(2);
+
+ var array = [[1, 2], [3, 4]],
+ object = { 'a': [1, 2], 'b': [3, 4] },
+ values = [, null, undefined],
+ expected = lodashStable.map(values, lodashStable.constant([1, 2, 3, 4]));
+
+ lodashStable.each([array, object], function(collection) {
+ var actual = lodashStable.map(values, function(value, index) {
+ return index ? func(collection, value) : func(collection);
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+ });
+
+ QUnit.test('`_.' + methodName + '` should accept a falsey `collection` argument', function(assert) {
+ assert.expect(1);
+
+ var expected = lodashStable.map(falsey, alwaysEmptyArray);
+
+ var actual = lodashStable.map(falsey, function(collection, index) {
+ try {
+ return index ? func(collection) : func();
+ } catch (e) {}
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('`_.' + methodName + '` should treat number values for `collection` as empty', function(assert) {
+ assert.expect(1);
+
+ assert.deepEqual(func(1), []);
+ });
+
+ QUnit.test('`_.' + methodName + '` should work with objects with non-number length properties', function(assert) {
+ assert.expect(1);
+
+ var object = { 'length': [1, 2] };
+ assert.deepEqual(func(object, identity), [1, 2]);
+ });
+ });
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.flattenDepth');
+
+ (function() {
+ var array = [1, [2, [3, [4]], 5]];
+
+ QUnit.test('should use a default `depth` of `1`', function(assert) {
+ assert.expect(1);
+
+ assert.deepEqual(_.flattenDepth(array), [1, 2, [3, [4]], 5]);
+ });
+
+ QUnit.test('should treat a `depth` of < `1` as a shallow clone', function(assert) {
+ assert.expect(2);
+
+ lodashStable.each([-1, 0], function(depth) {
+ assert.deepEqual(_.flattenDepth(array, depth), [1, [2, [3, [4]], 5]]);
+ });
+ });
+
+ QUnit.test('should coerce `depth` to an integer', function(assert) {
+ assert.expect(1);
+
+ assert.deepEqual(_.flattenDepth(array, 2.2), [1, 2, 3, [4], 5]);
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('flatten methods');
+
+ (function() {
+ var args = arguments,
+ array = [1, [2, [3, [4]], 5]];
+
+ QUnit.test('should flatten `arguments` objects', function(assert) {
+ assert.expect(3);
+
+ var array = [args, [args]];
+
+ assert.deepEqual(_.flatten(array), [1, 2, 3, args]);
+ assert.deepEqual(_.flattenDeep(array), [1, 2, 3, 1, 2, 3]);
+ assert.deepEqual(_.flattenDepth(array, 2), [1, 2, 3, 1, 2, 3]);
+ });
+
+ QUnit.test('should treat sparse arrays as dense', function(assert) {
+ assert.expect(6);
+
+ var array = [[1, 2, 3], Array(3)],
+ expected = [1, 2, 3];
+
+ expected.push(undefined, undefined, undefined);
+
+ lodashStable.each([_.flatten(array), _.flattenDeep(array), _.flattenDepth(array)], function(actual) {
+ assert.deepEqual(actual, expected);
+ assert.ok('4' in actual);
+ });
+ });
+
+ QUnit.test('should work with extremely large arrays', function(assert) {
+ assert.expect(3);
+
+ lodashStable.times(3, function(index) {
+ var expected = Array(5e5);
+ try {
+ var func = _.flatten;
+ if (index == 1) {
+ func = _.flattenDeep;
+ } else if (index == 2) {
+ func = _.flattenDepth;
+ }
+ assert.deepEqual(func([expected]), expected);
+ } catch (e) {
+ assert.ok(false, e.message);
+ }
+ });
+ });
+
+ QUnit.test('should work with empty arrays', function(assert) {
+ assert.expect(3);
+
+ var array = [[], [[]], [[], [[[]]]]];
+
+ assert.deepEqual(_.flatten(array), [[], [], [[[]]]]);
+ assert.deepEqual(_.flattenDeep(array), []);
+ assert.deepEqual(_.flattenDepth(array, 2), [[[]]]);
+ });
+
+ QUnit.test('should support flattening of nested arrays', function(assert) {
+ assert.expect(3);
+
+ assert.deepEqual(_.flatten(array), [1, 2, [3, [4]], 5]);
+ assert.deepEqual(_.flattenDeep(array), [1, 2, 3, 4, 5]);
+ assert.deepEqual(_.flattenDepth(array, 2), [1, 2, 3, [4], 5]);
+ });
+
+ QUnit.test('should return an empty array for non array-like objects', function(assert) {
+ assert.expect(3);
+
+ var expected = [],
+ nonArray = { 'a': 1 };
+
+ assert.deepEqual(_.flatten(nonArray), expected);
+ assert.deepEqual(_.flattenDeep(nonArray), expected);
+ assert.deepEqual(_.flattenDepth(nonArray, 2), expected);
+ });
+
+ QUnit.test('should return a wrapped value when chaining', function(assert) {
+ assert.expect(6);
+
+ if (!isNpm) {
+ var wrapped = _(array),
+ actual = wrapped.flatten();
+
+ assert.ok(actual instanceof _);
+ assert.deepEqual(actual.value(), [1, 2, [3, [4]], 5]);
+
+ actual = wrapped.flattenDeep();
+
+ assert.ok(actual instanceof _);
+ assert.deepEqual(actual.value(), [1, 2, 3, 4, 5]);
+
+ actual = wrapped.flattenDepth(2);
+
+ assert.ok(actual instanceof _);
+ assert.deepEqual(actual.value(), [1, 2, 3, [4], 5]);
+ }
+ else {
+ skipAssert(assert, 6);
+ }
+ });
+ }(1, 2, 3));
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('flow methods');
+
+ lodashStable.each(['flow', 'flowRight'], function(methodName) {
+ var func = _[methodName],
+ isFlow = methodName == 'flow';
+
+ QUnit.test('`_.' + methodName + '` should supply each function with the return value of the previous', function(assert) {
+ assert.expect(1);
+
+ var fixed = function(n) { return n.toFixed(1); },
+ combined = isFlow ? func(add, square, fixed) : func(fixed, square, add);
+
+ assert.strictEqual(combined(1, 2), '9.0');
+ });
+
+ QUnit.test('`_.' + methodName + '` should return a new function', function(assert) {
+ assert.expect(1);
+
+ assert.notStrictEqual(func(noop), noop);
+ });
+
+ QUnit.test('`_.' + methodName + '` should return an identity function when no arguments are given', function(assert) {
+ assert.expect(6);
+
+ _.times(2, function(index) {
+ try {
+ var combined = index ? func([]) : func();
+ assert.strictEqual(combined('a'), 'a');
+ } catch (e) {
+ assert.ok(false, e.message);
+ }
+ assert.strictEqual(combined.length, 0);
+ assert.notStrictEqual(combined, identity);
+ });
+ });
+
+ QUnit.test('`_.' + methodName + '` should work with a curried function and `_.head`', function(assert) {
+ assert.expect(1);
+
+ var curried = _.curry(identity);
+
+ var combined = isFlow
+ ? func(_.head, curried)
+ : func(curried, _.head);
+
+ assert.strictEqual(combined([1]), 1);
+ });
+
+ QUnit.test('`_.' + methodName + '` should support shortcut fusion', function(assert) {
+ assert.expect(6);
+
+ var filterCount,
+ mapCount,
+ array = lodashStable.range(LARGE_ARRAY_SIZE),
+ iteratee = function(value) { mapCount++; return square(value); },
+ predicate = function(value) { filterCount++; return isEven(value); };
+
+ lodashStable.times(2, function(index) {
+ var filter1 = _.filter,
+ filter2 = _.curry(_.rearg(_.ary(_.filter, 2), 1, 0), 2),
+ filter3 = (_.filter = index ? filter2 : filter1, filter2(predicate));
+
+ var map1 = _.map,
+ map2 = _.curry(_.rearg(_.ary(_.map, 2), 1, 0), 2),
+ map3 = (_.map = index ? map2 : map1, map2(iteratee));
+
+ var take1 = _.take,
+ take2 = _.curry(_.rearg(_.ary(_.take, 2), 1, 0), 2),
+ take3 = (_.take = index ? take2 : take1, take2(2));
+
+ var combined = isFlow
+ ? func(map3, filter3, _.compact, take3)
+ : func(take3, _.compact, filter3, map3);
+
+ filterCount = mapCount = 0;
+ assert.deepEqual(combined(array), [4, 16]);
+
+ if (!isNpm && WeakMap && WeakMap.name) {
+ assert.strictEqual(filterCount, 5, 'filterCount');
+ assert.strictEqual(mapCount, 5, 'mapCount');
+ }
+ else {
+ skipAssert(assert, 2);
+ }
+ _.filter = filter1;
+ _.map = map1;
+ _.take = take1;
+ });
+ });
+
+ QUnit.test('`_.' + methodName + '` should work with curried functions with placeholders', function(assert) {
+ assert.expect(1);
+
+ var curried = _.curry(_.ary(_.map, 2), 2),
+ getProp = curried(curried.placeholder, 'a'),
+ objects = [{ 'a': 1 }, { 'a': 2 }, { 'a': 1 }];
+
+ var combined = isFlow
+ ? func(getProp, _.uniq)
+ : func(_.uniq, getProp);
+
+ assert.deepEqual(combined(objects), [1, 2]);
+ });
+
+ QUnit.test('`_.' + methodName + '` should return a wrapped value when chaining', function(assert) {
+ assert.expect(1);
+
+ if (!isNpm) {
+ var wrapped = _(noop)[methodName]();
+ assert.ok(wrapped instanceof _);
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+ });
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.forEach');
+
+ (function() {
+ QUnit.test('should be aliased', function(assert) {
+ assert.expect(1);
+
+ assert.strictEqual(_.each, _.forEach);
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.forEachRight');
+
+ (function() {
+ QUnit.test('should be aliased', function(assert) {
+ assert.expect(1);
+
+ assert.strictEqual(_.eachRight, _.forEachRight);
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('forIn methods');
+
+ lodashStable.each(['forIn', 'forInRight'], function(methodName) {
+ var func = _[methodName];
+
+ QUnit.test('`_.' + methodName + '` iterates over inherited string keyed properties', function(assert) {
+ assert.expect(1);
+
+ function Foo() {
+ this.a = 1;
+ }
+ Foo.prototype.b = 2;
+
+ var keys = [];
+ func(new Foo, function(value, key) { keys.push(key); });
+ assert.deepEqual(keys.sort(), ['a', 'b']);
+ });
+ });
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('forOwn methods');
+
+ lodashStable.each(['forOwn', 'forOwnRight'], function(methodName) {
+ var func = _[methodName];
+
+ QUnit.test('`_.' + methodName + '` should iterate over `length` properties', function(assert) {
+ assert.expect(1);
+
+ var object = { '0': 'zero', '1': 'one', 'length': 2 },
+ props = [];
+
+ func(object, function(value, prop) { props.push(prop); });
+ assert.deepEqual(props.sort(), ['0', '1', 'length']);
+ });
+ });
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('iteration methods');
+
+ (function() {
+ var methods = [
+ '_baseEach',
+ 'countBy',
+ 'every',
+ 'filter',
+ 'find',
+ 'findIndex',
+ 'findKey',
+ 'findLast',
+ 'findLastIndex',
+ 'findLastKey',
+ 'forEach',
+ 'forEachRight',
+ 'forIn',
+ 'forInRight',
+ 'forOwn',
+ 'forOwnRight',
+ 'groupBy',
+ 'keyBy',
+ 'map',
+ 'mapKeys',
+ 'mapValues',
+ 'maxBy',
+ 'minBy',
+ 'omitBy',
+ 'partition',
+ 'pickBy',
+ 'reject',
+ 'some'
+ ];
+
+ var arrayMethods = [
+ 'findIndex',
+ 'findLastIndex',
+ 'maxBy',
+ 'minBy'
+ ];
+
+ var collectionMethods = [
+ '_baseEach',
+ 'countBy',
+ 'every',
+ 'filter',
+ 'find',
+ 'findLast',
+ 'forEach',
+ 'forEachRight',
+ 'groupBy',
+ 'keyBy',
+ 'map',
+ 'partition',
+ 'reduce',
+ 'reduceRight',
+ 'reject',
+ 'some'
+ ];
+
+ var forInMethods = [
+ 'forIn',
+ 'forInRight',
+ 'omitBy',
+ 'pickBy'
+ ];
+
+ var iterationMethods = [
+ '_baseEach',
+ 'forEach',
+ 'forEachRight',
+ 'forIn',
+ 'forInRight',
+ 'forOwn',
+ 'forOwnRight'
+ ];
+
+ var objectMethods = [
+ 'findKey',
+ 'findLastKey',
+ 'forIn',
+ 'forInRight',
+ 'forOwn',
+ 'forOwnRight',
+ 'mapKeys',
+ 'mapValues',
+ 'omitBy',
+ 'pickBy'
+ ];
+
+ var rightMethods = [
+ 'findLast',
+ 'findLastIndex',
+ 'findLastKey',
+ 'forEachRight',
+ 'forInRight',
+ 'forOwnRight'
+ ];
+
+ var unwrappedMethods = [
+ 'each',
+ 'eachRight',
+ 'every',
+ 'find',
+ 'findIndex',
+ 'findKey',
+ 'findLast',
+ 'findLastIndex',
+ 'findLastKey',
+ 'forEach',
+ 'forEachRight',
+ 'forIn',
+ 'forInRight',
+ 'forOwn',
+ 'forOwnRight',
+ 'max',
+ 'maxBy',
+ 'min',
+ 'minBy',
+ 'some'
+ ];
+
+ lodashStable.each(methods, function(methodName) {
+ var array = [1, 2, 3],
+ func = _[methodName],
+ isBy = /(^partition|By)$/.test(methodName),
+ isFind = /^find/.test(methodName),
+ isOmitPick = /^(?:omit|pick)By$/.test(methodName),
+ isSome = methodName == 'some';
+
+ QUnit.test('`_.' + methodName + '` should provide the correct iteratee arguments', function(assert) {
+ assert.expect(1);
+
+ if (func) {
+ var args,
+ expected = [1, 0, array];
+
+ func(array, function() {
+ args || (args = slice.call(arguments));
+ });
+
+ if (lodashStable.includes(rightMethods, methodName)) {
+ expected[0] = 3;
+ expected[1] = 2;
+ }
+ if (lodashStable.includes(objectMethods, methodName)) {
+ expected[1] += '';
+ }
+ if (isBy) {
+ expected.length = isOmitPick ? 2 : 1;
+ }
+ assert.deepEqual(args, expected);
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+
+ QUnit.test('`_.' + methodName + '` should treat sparse arrays as dense', function(assert) {
+ assert.expect(1);
+
+ if (func) {
+ var array = [1];
+ array[2] = 3;
+
+ var expected = lodashStable.includes(objectMethods, methodName)
+ ? [[1, '0', array], [undefined, '1', array], [3, '2', array]]
+ : [[1, 0, array], [undefined, 1, array], [3, 2, array]];
+
+ if (isBy) {
+ expected = lodashStable.map(expected, function(args) {
+ return args.slice(0, isOmitPick ? 2 : 1);
+ });
+ }
+ else if (lodashStable.includes(objectMethods, methodName)) {
+ expected = lodashStable.map(expected, function(args) {
+ args[1] += '';
+ return args;
+ });
+ }
+ if (lodashStable.includes(rightMethods, methodName)) {
+ expected.reverse();
+ }
+ var argsList = [];
+ func(array, function() {
+ argsList.push(slice.call(arguments));
+ return !(isFind || isSome);
+ });
+
+ assert.deepEqual(argsList, expected);
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+ });
+
+ lodashStable.each(lodashStable.difference(methods, objectMethods), function(methodName) {
+ var array = [1, 2, 3],
+ func = _[methodName],
+ isEvery = methodName == 'every';
+
+ array.a = 1;
+
+ QUnit.test('`_.' + methodName + '` should not iterate custom properties on arrays', function(assert) {
+ assert.expect(1);
+
+ if (func) {
+ var keys = [];
+ func(array, function(value, key) {
+ keys.push(key);
+ return isEvery;
+ });
+
+ assert.notOk(lodashStable.includes(keys, 'a'));
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+ });
+
+ lodashStable.each(lodashStable.difference(methods, unwrappedMethods), function(methodName) {
+ var array = [1, 2, 3],
+ isBaseEach = methodName == '_baseEach';
+
+ QUnit.test('`_.' + methodName + '` should return a wrapped value when implicitly chaining', function(assert) {
+ assert.expect(1);
+
+ if (!(isBaseEach || isNpm)) {
+ var wrapped = _(array)[methodName](noop);
+ assert.ok(wrapped instanceof _);
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+ });
+
+ lodashStable.each(unwrappedMethods, function(methodName) {
+ var array = [1, 2, 3];
+
+ QUnit.test('`_.' + methodName + '` should return an unwrapped value when implicitly chaining', function(assert) {
+ assert.expect(1);
+
+ if (!isNpm) {
+ var actual = _(array)[methodName](noop);
+ assert.notOk(actual instanceof _);
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+
+ QUnit.test('`_.' + methodName + '` should return a wrapped value when explicitly chaining', function(assert) {
+ assert.expect(2);
+
+ if (!isNpm) {
+ var wrapped = _(array).chain(),
+ actual = wrapped[methodName](noop);
+
+ assert.ok(actual instanceof _);
+ assert.notStrictEqual(actual, wrapped);
+ }
+ else {
+ skipAssert(assert, 2);
+ }
+ });
+ });
+
+ lodashStable.each(lodashStable.difference(methods, arrayMethods, forInMethods), function(methodName) {
+ var func = _[methodName];
+
+ QUnit.test('`_.' + methodName + '` iterates over own string keyed properties of objects', function(assert) {
+ assert.expect(1);
+
+ function Foo() {
+ this.a = 1;
+ }
+ Foo.prototype.b = 2;
+
+ if (func) {
+ var values = [];
+ func(new Foo, function(value) { values.push(value); });
+ assert.deepEqual(values, [1]);
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+ });
+
+ lodashStable.each(iterationMethods, function(methodName) {
+ var array = [1, 2, 3],
+ func = _[methodName];
+
+ QUnit.test('`_.' + methodName + '` should return the collection', function(assert) {
+ assert.expect(1);
+
+ if (func) {
+ assert.strictEqual(func(array, Boolean), array);
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+ });
+
+ lodashStable.each(collectionMethods, function(methodName) {
+ var func = _[methodName];
+
+ QUnit.test('`_.' + methodName + '` should use `isArrayLike` to determine whether a value is array-like', function(assert) {
+ assert.expect(3);
+
+ if (func) {
+ var isIteratedAsObject = function(object) {
+ var result = false;
+ func(object, function() { result = true; }, 0);
+ return result;
+ };
+
+ var values = [-1, '1', 1.1, Object(1), MAX_SAFE_INTEGER + 1],
+ expected = lodashStable.map(values, alwaysTrue);
+
+ var actual = lodashStable.map(values, function(length) {
+ return isIteratedAsObject({ 'length': length });
+ });
+
+ var Foo = function(a) {};
+ Foo.a = 1;
+
+ assert.deepEqual(actual, expected);
+ assert.ok(isIteratedAsObject(Foo));
+ assert.notOk(isIteratedAsObject({ 'length': 0 }));
+ }
+ else {
+ skipAssert(assert, 3);
+ }
+ });
+ });
+
+ lodashStable.each(methods, function(methodName) {
+ var func = _[methodName],
+ isFind = /^find/.test(methodName),
+ isSome = methodName == 'some',
+ isReduce = /^reduce/.test(methodName);
+
+ QUnit.test('`_.' + methodName + '` should ignore changes to `array.length`', function(assert) {
+ assert.expect(1);
+
+ if (func) {
+ var count = 0,
+ array = [1];
+
+ func(array, function() {
+ if (++count == 1) {
+ array.push(2);
+ }
+ return !(isFind || isSome);
+ }, isReduce ? array : null);
+
+ assert.strictEqual(count, 1);
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+ });
+
+ lodashStable.each(lodashStable.difference(lodashStable.union(methods, collectionMethods), arrayMethods), function(methodName) {
+ var func = _[methodName],
+ isFind = /^find/.test(methodName),
+ isSome = methodName == 'some',
+ isReduce = /^reduce/.test(methodName);
+
+ QUnit.test('`_.' + methodName + '` should ignore added `object` properties', function(assert) {
+ assert.expect(1);
+
+ if (func) {
+ var count = 0,
+ object = { 'a': 1 };
+
+ func(object, function() {
+ if (++count == 1) {
+ object.b = 2;
+ }
+ return !(isFind || isSome);
+ }, isReduce ? object : null);
+
+ assert.strictEqual(count, 1);
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('object assignments');
+
+ lodashStable.each(['assign', 'assignIn', 'defaults', 'merge'], function(methodName) {
+ var func = _[methodName],
+ isAssign = methodName == 'assign',
+ isDefaults = methodName == 'defaults';
+
+ QUnit.test('`_.' + methodName + '` should coerce primitives to objects', function(assert) {
+ assert.expect(1);
+
+ var expected = lodashStable.map(primitives, function(value) {
+ var object = Object(value);
+ object.a = 1;
+ return object;
+ });
+
+ var actual = lodashStable.map(primitives, function(value) {
+ return func(value, { 'a': 1 });
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('`_.' + methodName + '` should assign own ' + (isAssign ? '' : 'and inherited ') + 'string keyed source properties', function(assert) {
+ assert.expect(1);
+
+ function Foo() {
+ this.a = 1;
+ }
+ Foo.prototype.b = 2;
+
+ var expected = isAssign ? { 'a': 1 } : { 'a': 1, 'b': 2 };
+ assert.deepEqual(func({}, new Foo), expected);
+ });
+
+ QUnit.test('`_.' + methodName + '` should not error on nullish sources', function(assert) {
+ assert.expect(1);
+
+ try {
+ assert.deepEqual(func({ 'a': 1 }, undefined, { 'b': 2 }, null), { 'a': 1, 'b': 2 });
+ } catch (e) {
+ assert.ok(false, e.message);
+ }
+ });
+
+ QUnit.test('`_.' + methodName + '` should create an object when `object` is nullish', function(assert) {
+ assert.expect(2);
+
+ var source = { 'a': 1 },
+ values = [null, undefined],
+ expected = lodashStable.map(values, alwaysTrue);
+
+ var actual = lodashStable.map(values, function(value) {
+ var object = func(value, source);
+ return object !== source && lodashStable.isEqual(object, source);
+ });
+
+ assert.deepEqual(actual, expected);
+
+ actual = lodashStable.map(values, function(value) {
+ return lodashStable.isEqual(func(value), {});
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('`_.' + methodName + '` should work as an iteratee for methods like `_.reduce`', function(assert) {
+ assert.expect(2);
+
+ var array = [{ 'a': 1 }, { 'b': 2 }, { 'c': 3 }],
+ expected = { 'a': isDefaults ? 0 : 1, 'b': 2, 'c': 3 };
+
+ assert.deepEqual(lodashStable.reduce(array, func, { 'a': 0 }), expected);
+
+ var fn = function() {};
+ fn.a = array[0];
+ fn.b = array[1];
+ fn.c = array[2];
+
+ assert.deepEqual(_.reduce(fn, func, { 'a': 0 }), expected);
+ });
+
+ QUnit.test('`_.' + methodName + '` should not return the existing wrapped value when chaining', function(assert) {
+ assert.expect(1);
+
+ if (!isNpm) {
+ var wrapped = _({ 'a': 1 }),
+ actual = wrapped[methodName]({ 'b': 2 });
+
+ assert.notStrictEqual(actual, wrapped);
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+ });
+
+ lodashStable.each(['assign', 'assignIn', 'merge'], function(methodName) {
+ var func = _[methodName];
+
+ QUnit.test('`_.' + methodName + '` should not treat `object` as `source`', function(assert) {
+ assert.expect(1);
+
+ function Foo() {}
+ Foo.prototype.a = 1;
+
+ var actual = func(new Foo, { 'b': 2 });
+ assert.notOk(_.has(actual, 'a'));
+ });
+ });
+
+ lodashStable.each(['assign', 'assignIn', 'assignInWith', 'assignWith', 'defaults', 'merge', 'mergeWith'], function(methodName) {
+ var func = _[methodName];
+
+ QUnit.test('`_.' + methodName + '` should not assign values that are the same as their destinations', function(assert) {
+ assert.expect(4);
+
+ lodashStable.each(['a', ['a'], { 'a': 1 }, NaN], function(value) {
+ if (defineProperty) {
+ var object = {},
+ pass = true;
+
+ defineProperty(object, 'a', {
+ 'enumerable': true,
+ 'configurable': true,
+ 'get': lodashStable.constant(value),
+ 'set': function() { pass = false; }
+ });
+
+ func(object, { 'a': value });
+ assert.ok(pass);
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+ });
+ });
+
+ lodashStable.each(['assignWith', 'assignInWith', 'mergeWith'], function(methodName) {
+ var func = _[methodName],
+ isMergeWith = methodName == 'mergeWith';
+
+ QUnit.test('`_.' + methodName + '` should provide the correct `customizer` arguments', function(assert) {
+ assert.expect(3);
+
+ var args,
+ object = { 'a': 1 },
+ source = { 'a': 2 },
+ expected = lodashStable.map([1, 2, 'a', object, source], lodashStable.cloneDeep);
+
+ func(object, source, function() {
+ args || (args = lodashStable.map(slice.call(arguments, 0, 5), lodashStable.cloneDeep));
+ });
+
+ assert.deepEqual(args, expected, 'primitive property values');
+
+ args = undefined;
+ object = { 'a': 1 };
+ source = { 'b': 2 };
+ expected = lodashStable.map([undefined, 2, 'b', object, source], lodashStable.cloneDeep);
+
+ func(object, source, function() {
+ args || (args = lodashStable.map(slice.call(arguments, 0, 5), lodashStable.cloneDeep));
+ });
+
+ assert.deepEqual(args, expected, 'missing destination property');
+
+ var argsList = [],
+ objectValue = [1, 2],
+ sourceValue = { 'b': 2 };
+
+ object = { 'a': objectValue };
+ source = { 'a': sourceValue };
+ expected = [lodashStable.map([objectValue, sourceValue, 'a', object, source], lodashStable.cloneDeep)];
+
+ if (isMergeWith) {
+ expected.push(lodashStable.map([undefined, 2, 'b', objectValue, sourceValue], lodashStable.cloneDeep));
+ }
+ func(object, source, function() {
+ argsList.push(lodashStable.map(slice.call(arguments, 0, 5), lodashStable.cloneDeep));
+ });
+
+ assert.deepEqual(argsList, expected, 'object property values');
+ });
+
+ QUnit.test('`_.' + methodName + '` should not treat the second argument as a `customizer` callback', function(assert) {
+ assert.expect(2);
+
+ function callback() {}
+ callback.b = 2;
+
+ var actual = func({ 'a': 1 }, callback);
+ assert.deepEqual(actual, { 'a': 1, 'b': 2 });
+
+ actual = func({ 'a': 1 }, callback, { 'c': 3 });
+ assert.deepEqual(actual, { 'a': 1, 'b': 2, 'c': 3 });
+ });
+ });
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('exit early');
+
+ lodashStable.each(['_baseEach', 'forEach', 'forEachRight', 'forIn', 'forInRight', 'forOwn', 'forOwnRight', 'transform'], function(methodName) {
+ var func = _[methodName];
+
+ QUnit.test('`_.' + methodName + '` can exit early when iterating arrays', function(assert) {
+ assert.expect(1);
+
+ if (func) {
+ var array = [1, 2, 3],
+ values = [];
+
+ func(array, function(value, other) {
+ values.push(lodashStable.isArray(value) ? other : value);
+ return false;
+ });
+
+ assert.deepEqual(values, [lodashStable.endsWith(methodName, 'Right') ? 3 : 1]);
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+
+ QUnit.test('`_.' + methodName + '` can exit early when iterating objects', function(assert) {
+ assert.expect(1);
+
+ if (func) {
+ var object = { 'a': 1, 'b': 2, 'c': 3 },
+ values = [];
+
+ func(object, function(value, other) {
+ values.push(lodashStable.isArray(value) ? other : value);
+ return false;
+ });
+
+ assert.strictEqual(values.length, 1);
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+ });
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('`__proto__` property bugs');
+
+ (function() {
+ QUnit.test('internal data objects should work with the `__proto__` key', function(assert) {
+ assert.expect(4);
+
+ var stringLiteral = '__proto__',
+ stringObject = Object(stringLiteral),
+ expected = [stringLiteral, stringObject];
+
+ var largeArray = lodashStable.times(LARGE_ARRAY_SIZE, function(count) {
+ return isEven(count) ? stringLiteral : stringObject;
+ });
+
+ assert.deepEqual(_.difference(largeArray, largeArray), []);
+ assert.deepEqual(_.intersection(largeArray, largeArray), expected);
+ assert.deepEqual(_.uniq(largeArray), expected);
+ assert.deepEqual(_.without.apply(_, [largeArray].concat(largeArray)), []);
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.fromPairs');
+
+ (function() {
+ QUnit.test('should accept a two dimensional array', function(assert) {
+ assert.expect(1);
+
+ var array = [['a', 1], ['b', 2]],
+ object = { 'a': 1, 'b': 2 },
+ actual = _.fromPairs(array);
+
+ assert.deepEqual(actual, object);
+ });
+
+ QUnit.test('should accept a falsey `array` argument', function(assert) {
+ assert.expect(1);
+
+ var expected = lodashStable.map(falsey, alwaysEmptyObject);
+
+ var actual = lodashStable.map(falsey, function(array, index) {
+ try {
+ return index ? _.fromPairs(array) : _.fromPairs();
+ } catch (e) {}
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('should not support deep paths', function(assert) {
+ assert.expect(1);
+
+ var actual = _.fromPairs([['a.b', 1]]);
+ assert.deepEqual(actual, { 'a.b': 1 });
+ });
+
+ QUnit.test('should support consuming the return value of `_.toPairs`', function(assert) {
+ assert.expect(1);
+
+ var object = { 'a.b': 1 };
+ assert.deepEqual(_.fromPairs(_.toPairs(object)), object);
+ });
+
+ QUnit.test('should work in a lazy sequence', function(assert) {
+ assert.expect(1);
+
+ if (!isNpm) {
+ var array = lodashStable.times(LARGE_ARRAY_SIZE, function(index) {
+ return ['key' + index, index];
+ });
+
+ var actual = _(array).fromPairs().map(square).filter(isEven).take().value();
+
+ assert.deepEqual(actual, _.take(_.filter(_.map(_.fromPairs(array), square), isEven)));
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.functions');
+
+ (function() {
+ QUnit.test('should return the function names of an object', function(assert) {
+ assert.expect(1);
+
+ var object = { 'a': 'a', 'b': identity, 'c': /x/, 'd': noop },
+ actual = _.functions(object).sort();
+
+ assert.deepEqual(actual, ['b', 'd']);
+ });
+
+ QUnit.test('should not include inherited functions', function(assert) {
+ assert.expect(1);
+
+ function Foo() {
+ this.a = identity;
+ this.b = 'b';
+ }
+ Foo.prototype.c = noop;
+
+ assert.deepEqual(_.functions(new Foo), ['a']);
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.groupBy');
+
+ (function() {
+ var array = [6.1, 4.2, 6.3];
+
+ QUnit.test('should transform keys by `iteratee`', function(assert) {
+ assert.expect(1);
+
+ var actual = _.groupBy(array, Math.floor);
+ assert.deepEqual(actual, { '4': [4.2], '6': [6.1, 6.3] });
+ });
+
+ QUnit.test('should use `_.identity` when `iteratee` is nullish', function(assert) {
+ assert.expect(1);
+
+ var array = [6, 4, 6],
+ values = [, null, undefined],
+ expected = lodashStable.map(values, lodashStable.constant({ '4': [4], '6': [6, 6] }));
+
+ var actual = lodashStable.map(values, function(value, index) {
+ return index ? _.groupBy(array, value) : _.groupBy(array);
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('should work with `_.property` shorthands', function(assert) {
+ assert.expect(1);
+
+ var actual = _.groupBy(['one', 'two', 'three'], 'length');
+ assert.deepEqual(actual, { '3': ['one', 'two'], '5': ['three'] });
+ });
+
+ QUnit.test('should only add values to own, not inherited, properties', function(assert) {
+ assert.expect(2);
+
+ var actual = _.groupBy(array, function(n) {
+ return Math.floor(n) > 4 ? 'hasOwnProperty' : 'constructor';
+ });
+
+ assert.deepEqual(actual.constructor, [4.2]);
+ assert.deepEqual(actual.hasOwnProperty, [6.1, 6.3]);
+ });
+
+ QUnit.test('should work with a number for `iteratee`', function(assert) {
+ assert.expect(2);
+
+ var array = [
+ [1, 'a'],
+ [2, 'a'],
+ [2, 'b']
+ ];
+
+ assert.deepEqual(_.groupBy(array, 0), { '1': [[1, 'a']], '2': [[2, 'a'], [2, 'b']] });
+ assert.deepEqual(_.groupBy(array, 1), { 'a': [[1, 'a'], [2, 'a']], 'b': [[2, 'b']] });
+ });
+
+ QUnit.test('should work with an object for `collection`', function(assert) {
+ assert.expect(1);
+
+ var actual = _.groupBy({ 'a': 6.1, 'b': 4.2, 'c': 6.3 }, Math.floor);
+ assert.deepEqual(actual, { '4': [4.2], '6': [6.1, 6.3] });
+ });
+
+ QUnit.test('should work in a lazy sequence', function(assert) {
+ assert.expect(1);
+
+ if (!isNpm) {
+ var array = lodashStable.range(LARGE_ARRAY_SIZE).concat(
+ lodashStable.range(Math.floor(LARGE_ARRAY_SIZE / 2), LARGE_ARRAY_SIZE),
+ lodashStable.range(Math.floor(LARGE_ARRAY_SIZE / 1.5), LARGE_ARRAY_SIZE)
+ );
+
+ var iteratee = function(value) { value.push(value[0]); return value; },
+ predicate = function(value) { return isEven(value[0]); },
+ actual = _(array).groupBy().map(iteratee).filter(predicate).take().value();
+
+ assert.deepEqual(actual, _.take(_.filter(lodashStable.map(_.groupBy(array), iteratee), predicate)));
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.gt');
+
+ (function() {
+ QUnit.test('should return `true` if `value` > `other`', function(assert) {
+ assert.expect(2);
+
+ assert.strictEqual(_.gt(3, 1), true);
+ assert.strictEqual(_.gt('def', 'abc'), true);
+ });
+
+ QUnit.test('should return `false` if `value` is <= `other`', function(assert) {
+ assert.expect(4);
+
+ assert.strictEqual(_.gt(1, 3), false);
+ assert.strictEqual(_.gt(3, 3), false);
+ assert.strictEqual(_.gt('abc', 'def'), false);
+ assert.strictEqual(_.gt('def', 'def'), false);
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.gte');
+
+ (function() {
+ QUnit.test('should return `true` if `value` >= `other`', function(assert) {
+ assert.expect(4);
+
+ assert.strictEqual(_.gte(3, 1), true);
+ assert.strictEqual(_.gte(3, 3), true);
+ assert.strictEqual(_.gte('def', 'abc'), true);
+ assert.strictEqual(_.gte('def', 'def'), true);
+ });
+
+ QUnit.test('should return `false` if `value` is less than `other`', function(assert) {
+ assert.expect(2);
+
+ assert.strictEqual(_.gte(1, 3), false);
+ assert.strictEqual(_.gte('abc', 'def'), false);
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('has methods');
+
+ lodashStable.each(['has', 'hasIn'], function(methodName) {
+ var args = (function() { return arguments; }(1, 2, 3)),
+ func = _[methodName],
+ isHas = methodName == 'has';
+
+ QUnit.test('`_.' + methodName + '` should check for own properties', function(assert) {
+ assert.expect(2);
+
+ var object = { 'a': 1 };
+
+ lodashStable.each(['a', ['a']], function(path) {
+ assert.strictEqual(func(object, path), true);
+ });
+ });
+
+ QUnit.test('`_.' + methodName + '` should not use the `hasOwnProperty` method of the object', function(assert) {
+ assert.expect(1);
+
+ var object = { 'hasOwnProperty': null, 'a': 1 };
+ assert.strictEqual(func(object, 'a'), true);
+ });
+
+ QUnit.test('`_.' + methodName + '` should support deep paths', function(assert) {
+ assert.expect(4);
+
+ var object = { 'a': { 'b': 2 } };
+
+ lodashStable.each(['a.b', ['a', 'b']], function(path) {
+ assert.strictEqual(func(object, path), true);
+ });
+
+ lodashStable.each(['a.a', ['a', 'a']], function(path) {
+ assert.strictEqual(func(object, path), false);
+ });
+ });
+
+ QUnit.test('`_.' + methodName + '` should coerce `path` to a string', function(assert) {
+ assert.expect(1);
+
+ function fn() {}
+ fn.toString = lodashStable.constant('fn');
+
+ var expected = [1, 1, 2, 2, 3, 3, 4, 4],
+ objects = [{ 'null': 1 }, { 'undefined': 2 }, { 'fn': 3 }, { '[object Object]': 4 }],
+ values = [null, undefined, fn, {}];
+
+ var actual = lodashStable.transform(objects, function(result, object, index) {
+ var key = values[index];
+ lodashStable.each([key, [key]], function(path) {
+ var prop = _.property(key);
+ result.push(prop(object));
+ });
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('`_.' + methodName + '` should work with `arguments` objects', function(assert) {
+ assert.expect(1);
+
+ assert.strictEqual(func(args, 1), true);
+ });
+
+ QUnit.test('`_.' + methodName + '` should work with a non-string `path`', function(assert) {
+ assert.expect(2);
+
+ var array = [1, 2, 3];
+
+ lodashStable.each([1, [1]], function(path) {
+ assert.strictEqual(func(array, path), true);
+ });
+ });
+
+ QUnit.test('`_.' + methodName + '` should preserve the sign of `0`', function(assert) {
+ assert.expect(1);
+
+ var object = { '-0': 'a', '0': 'b' },
+ props = [-0, Object(-0), 0, Object(0)],
+ expected = lodashStable.map(props, alwaysTrue);
+
+ var actual = lodashStable.map(props, function(key) {
+ return func(object, key);
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('`_.' + methodName + '` should work with a symbol `path`', function(assert) {
+ assert.expect(1);
+
+ function Foo() {
+ this[symbol] = 1;
+ }
+
+ if (Symbol) {
+ var symbol2 = Symbol('b');
+ Foo.prototype[symbol2] = 2;
+ var path = isHas ? symbol : symbol2;
+
+ assert.strictEqual(func(new Foo, path), true);
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+
+ QUnit.test('`_.' + methodName + '` should work for objects with a `[[Prototype]]` of `null`', function(assert) {
+ assert.expect(1);
+
+ if (create) {
+ var object = create(null);
+ object[1] = 'a';
+ assert.strictEqual(func(object, 1), true);
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+
+ QUnit.test('`_.' + methodName + '` should check for a key over a path', function(assert) {
+ assert.expect(2);
+
+ var object = { 'a.b': 1 };
+
+ lodashStable.each(['a.b', ['a.b']], function(path) {
+ assert.strictEqual(func(object, path), true);
+ });
+ });
+
+ QUnit.test('`_.' + methodName + '` should return `' + (isHas ? 'false' : 'true') + '` for inherited properties', function(assert) {
+ assert.expect(2);
+
+ function Foo() {}
+ Foo.prototype.a = 1;
+
+ lodashStable.each(['a', ['a']], function(path) {
+ assert.strictEqual(func(new Foo, path), !isHas);
+ });
+ });
+
+ QUnit.test('`_.' + methodName + '` should return `' + (isHas ? 'false' : 'true') + '` for nested inherited properties', function(assert) {
+ assert.expect(2);
+
+ function Foo() {}
+ Foo.prototype.a = { 'b': 1 };
+
+ lodashStable.each(['a.b', ['a', 'b']], function(path) {
+ assert.strictEqual(func(new Foo, path), !isHas);
+ });
+ });
+
+ QUnit.test('`_.' + methodName + '` should return `true` for index values within bounds for arrays, `arguments` objects, and strings', function(assert) {
+ assert.expect(2);
+
+ var string = Object('abc');
+ delete args[0];
+ delete string[0];
+
+ var values = [Array(3), args, string],
+ expected = lodashStable.map(values, alwaysTrue);
+
+ var actual = lodashStable.map(values, function(value) {
+ return func(value, 0);
+ });
+
+ assert.deepEqual(actual, expected);
+
+ expected = lodashStable.map(values, lodashStable.constant([true, true]));
+
+ actual = lodashStable.map(values, function(value) {
+ return lodashStable.map(['a[0]', ['a', '0']], function(path) {
+ return func({ 'a': value }, path);
+ });
+ });
+
+ assert.deepEqual(actual, expected);
+ args[0] = 1;
+ });
+
+ QUnit.test('`_.' + methodName + '` should return `false` when `object` is nullish', function(assert) {
+ assert.expect(2);
+
+ var values = [null, undefined],
+ expected = lodashStable.map(values, alwaysFalse);
+
+ lodashStable.each(['constructor', ['constructor']], function(path) {
+ var actual = lodashStable.map(values, function(value) {
+ return func(value, path);
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+ });
+
+ QUnit.test('`_.' + methodName + '` should return `false` for deep paths when `object` is nullish', function(assert) {
+ assert.expect(2);
+
+ var values = [null, undefined],
+ expected = lodashStable.map(values, alwaysFalse);
+
+ lodashStable.each(['constructor.prototype.valueOf', ['constructor', 'prototype', 'valueOf']], function(path) {
+ var actual = lodashStable.map(values, function(value) {
+ return func(value, path);
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+ });
+
+ QUnit.test('`_.' + methodName + '` should return `false` for nullish values of nested objects', function(assert) {
+ assert.expect(2);
+
+ var values = [, null, undefined],
+ expected = lodashStable.map(values, alwaysFalse);
+
+ lodashStable.each(['a.b', ['a', 'b']], function(path) {
+ var actual = lodashStable.map(values, function(value, index) {
+ var object = index ? { 'a': value } : {};
+ return func(object, path);
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+ });
+ });
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.head');
+
+ (function() {
+ var array = [1, 2, 3, 4];
+
+ QUnit.test('should return the first element', function(assert) {
+ assert.expect(1);
+
+ assert.strictEqual(_.head(array), 1);
+ });
+
+ QUnit.test('should return `undefined` when querying empty arrays', function(assert) {
+ assert.expect(1);
+
+ arrayProto[0] = 1;
+ assert.strictEqual(_.head([]), undefined);
+ arrayProto.length = 0;
+ });
+
+ QUnit.test('should work as an iteratee for methods like `_.map`', function(assert) {
+ assert.expect(1);
+
+ var array = [[1, 2, 3], [4, 5, 6], [7, 8, 9]],
+ actual = lodashStable.map(array, _.head);
+
+ assert.deepEqual(actual, [1, 4, 7]);
+ });
+
+ QUnit.test('should return an unwrapped value when implicitly chaining', function(assert) {
+ assert.expect(1);
+
+ if (!isNpm) {
+ assert.strictEqual(_(array).head(), 1);
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+
+ QUnit.test('should return a wrapped value when explicitly chaining', function(assert) {
+ assert.expect(1);
+
+ if (!isNpm) {
+ assert.ok(_(array).chain().head() instanceof _);
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+
+ QUnit.test('should not execute immediately when explicitly chaining', function(assert) {
+ assert.expect(1);
+
+ if (!isNpm) {
+ var wrapped = _(array).chain().head();
+ assert.strictEqual(wrapped.__wrapped__, array);
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+
+ QUnit.test('should work in a lazy sequence', function(assert) {
+ assert.expect(2);
+
+ if (!isNpm) {
+ var largeArray = lodashStable.range(LARGE_ARRAY_SIZE),
+ smallArray = array;
+
+ lodashStable.times(2, function(index) {
+ var array = index ? largeArray : smallArray,
+ wrapped = _(array).filter(isEven);
+
+ assert.strictEqual(wrapped.head(), _.head(_.filter(array, isEven)));
+ });
+ }
+ else {
+ skipAssert(assert, 2);
+ }
+ });
+
+ QUnit.test('should be aliased', function(assert) {
+ assert.expect(1);
+
+ assert.strictEqual(_.first, _.head);
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.identity');
+
+ (function() {
+ QUnit.test('should return the first argument given', function(assert) {
+ assert.expect(1);
+
+ var object = { 'name': 'fred' };
+ assert.strictEqual(_.identity(object), object);
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.includes');
+
+ (function() {
+ lodashStable.each({
+ 'an `arguments` object': arguments,
+ 'an array': [1, 2, 3, 4],
+ 'an object': { 'a': 1, 'b': 2, 'c': 3, 'd': 4 },
+ 'a string': '1234'
+ },
+ function(collection, key) {
+ var isStr = typeof collection == 'string',
+ values = _.toArray(collection),
+ length = values.length;
+
+ QUnit.test('should work with ' + key + ' and return `true` for matched values', function(assert) {
+ assert.expect(1);
+
+ assert.strictEqual(_.includes(collection, 3), true);
+ });
+
+ QUnit.test('should work with ' + key + ' and return `false` for unmatched values', function(assert) {
+ assert.expect(1);
+
+ assert.strictEqual(_.includes(collection, 5), false);
+ });
+
+ QUnit.test('should work with ' + key + ' and a positive `fromIndex`', function(assert) {
+ assert.expect(2);
+
+ assert.strictEqual(_.includes(collection, values[2], 2), true);
+ assert.strictEqual(_.includes(collection, values[1], 2), false);
+ });
+
+ QUnit.test('should work with ' + key + ' and a `fromIndex` >= `collection.length`', function(assert) {
+ assert.expect(12);
+
+ lodashStable.each([4, 6, Math.pow(2, 32), Infinity], function(fromIndex) {
+ assert.strictEqual(_.includes(collection, 1, fromIndex), false);
+ assert.strictEqual(_.includes(collection, undefined, fromIndex), false);
+ assert.strictEqual(_.includes(collection, '', fromIndex), (isStr && fromIndex == length));
+ });
+ });
+
+ QUnit.test('should work with ' + key + ' and treat falsey `fromIndex` values as `0`', function(assert) {
+ assert.expect(1);
+
+ var expected = lodashStable.map(falsey, alwaysTrue);
+
+ var actual = lodashStable.map(falsey, function(fromIndex) {
+ return _.includes(collection, values[0], fromIndex);
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('should work with ' + key + ' and coerce non-integer `fromIndex` values to integers', function(assert) {
+ assert.expect(3);
+
+ assert.strictEqual(_.includes(collection, values[0], '1'), false);
+ assert.strictEqual(_.includes(collection, values[0], 0.1), true);
+ assert.strictEqual(_.includes(collection, values[0], NaN), true);
+ });
+
+ QUnit.test('should work with ' + key + ' and a negative `fromIndex`', function(assert) {
+ assert.expect(2);
+
+ assert.strictEqual(_.includes(collection, values[2], -2), true);
+ assert.strictEqual(_.includes(collection, values[1], -2), false);
+ });
+
+ QUnit.test('should work with ' + key + ' and a negative `fromIndex` <= negative `collection.length`', function(assert) {
+ assert.expect(3);
+
+ lodashStable.each([-4, -6, -Infinity], function(fromIndex) {
+ assert.strictEqual(_.includes(collection, values[0], fromIndex), true);
+ });
+ });
+
+ QUnit.test('should work with ' + key + ' and floor `position` values', function(assert) {
+ assert.expect(1);
+
+ assert.strictEqual(_.includes(collection, 2, 1.2), true);
+ });
+
+ QUnit.test('should work with ' + key + ' and return an unwrapped value implicitly when chaining', function(assert) {
+ assert.expect(1);
+
+ if (!isNpm) {
+ assert.strictEqual(_(collection).includes(3), true);
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+
+ QUnit.test('should work with ' + key + ' and return a wrapped value when explicitly chaining', function(assert) {
+ assert.expect(1);
+
+ if (!isNpm) {
+ assert.ok(_(collection).chain().includes(3) instanceof _);
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+ });
+
+ lodashStable.each({
+ 'literal': 'abc',
+ 'object': Object('abc')
+ },
+ function(collection, key) {
+ QUnit.test('should work with a string ' + key + ' for `collection`', function(assert) {
+ assert.expect(2);
+
+ assert.strictEqual(_.includes(collection, 'bc'), true);
+ assert.strictEqual(_.includes(collection, 'd'), false);
+ });
+ });
+
+ QUnit.test('should return `false` for empty collections', function(assert) {
+ assert.expect(1);
+
+ var expected = lodashStable.map(empties, alwaysFalse);
+
+ var actual = lodashStable.map(empties, function(value) {
+ try {
+ return _.includes(value);
+ } catch (e) {}
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('should match `NaN`', function(assert) {
+ assert.expect(1);
+
+ assert.strictEqual(_.includes([1, NaN, 3], NaN), true);
+ });
+
+ QUnit.test('should match `-0` as `0`', function(assert) {
+ assert.expect(2);
+
+ assert.strictEqual(_.includes([-0], 0), true);
+ assert.strictEqual(_.includes([0], -0), true);
+ });
+
+ QUnit.test('should work as an iteratee for methods like `_.every`', function(assert) {
+ assert.expect(1);
+
+ var array1 = [1, 2, 3],
+ array2 = [2, 3, 1];
+
+ assert.ok(lodashStable.every(array1, lodashStable.partial(_.includes, array2)));
+ });
+ }(1, 2, 3, 4));
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.indexOf');
+
+ (function() {
+ var array = [1, 2, 3, 1, 2, 3];
+
+ QUnit.test('should return the index of the first matched value', function(assert) {
+ assert.expect(1);
+
+ assert.strictEqual(_.indexOf(array, 3), 2);
+ });
+
+ QUnit.test('should work with a positive `fromIndex`', function(assert) {
+ assert.expect(1);
+
+ assert.strictEqual(_.indexOf(array, 1, 2), 3);
+ });
+
+ QUnit.test('should work with `fromIndex` >= `array.length`', function(assert) {
+ assert.expect(1);
+
+ var values = [6, 8, Math.pow(2, 32), Infinity],
+ expected = lodashStable.map(values, lodashStable.constant([-1, -1, -1]));
+
+ var actual = lodashStable.map(values, function(fromIndex) {
+ return [
+ _.indexOf(array, undefined, fromIndex),
+ _.indexOf(array, 1, fromIndex),
+ _.indexOf(array, '', fromIndex)
+ ];
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('should work with a negative `fromIndex`', function(assert) {
+ assert.expect(1);
+
+ assert.strictEqual(_.indexOf(array, 2, -3), 4);
+ });
+
+ QUnit.test('should work with a negative `fromIndex` <= `-array.length`', function(assert) {
+ assert.expect(1);
+
+ var values = [-6, -8, -Infinity],
+ expected = lodashStable.map(values, alwaysZero);
+
+ var actual = lodashStable.map(values, function(fromIndex) {
+ return _.indexOf(array, 1, fromIndex);
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('should treat falsey `fromIndex` values as `0`', function(assert) {
+ assert.expect(1);
+
+ var expected = lodashStable.map(falsey, alwaysZero);
+
+ var actual = lodashStable.map(falsey, function(fromIndex) {
+ return _.indexOf(array, 1, fromIndex);
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('should coerce `fromIndex` to an integer', function(assert) {
+ assert.expect(1);
+
+ assert.strictEqual(_.indexOf(array, 2, 1.2), 1);
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.initial');
+
+ (function() {
+ var array = [1, 2, 3];
+
+ QUnit.test('should accept a falsey `array` argument', function(assert) {
+ assert.expect(1);
+
+ var expected = lodashStable.map(falsey, alwaysEmptyArray);
+
+ var actual = lodashStable.map(falsey, function(array, index) {
+ try {
+ return index ? _.initial(array) : _.initial();
+ } catch (e) {}
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('should exclude last element', function(assert) {
+ assert.expect(1);
+
+ assert.deepEqual(_.initial(array), [1, 2]);
+ });
+
+ QUnit.test('should return an empty when querying empty arrays', function(assert) {
+ assert.expect(1);
+
+ assert.deepEqual(_.initial([]), []);
+ });
+
+ QUnit.test('should work as an iteratee for methods like `_.map`', function(assert) {
+ assert.expect(1);
+
+ var array = [[1, 2, 3], [4, 5, 6], [7, 8, 9]],
+ actual = lodashStable.map(array, _.initial);
+
+ assert.deepEqual(actual, [[1, 2], [4, 5], [7, 8]]);
+ });
+
+ QUnit.test('should work in a lazy sequence', function(assert) {
+ assert.expect(4);
+
+ if (!isNpm) {
+ var array = lodashStable.range(LARGE_ARRAY_SIZE),
+ values = [];
+
+ var actual = _(array).initial().filter(function(value) {
+ values.push(value);
+ return false;
+ })
+ .value();
+
+ assert.deepEqual(actual, []);
+ assert.deepEqual(values, _.initial(array));
+
+ values = [];
+
+ actual = _(array).filter(function(value) {
+ values.push(value);
+ return isEven(value);
+ })
+ .initial()
+ .value();
+
+ assert.deepEqual(actual, _.initial(lodashStable.filter(array, isEven)));
+ assert.deepEqual(values, array);
+ }
+ else {
+ skipAssert(assert, 4);
+ }
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.inRange');
+
+ (function() {
+ QUnit.test('should work with an `end` argument', function(assert) {
+ assert.expect(3);
+
+ assert.strictEqual(_.inRange(3, 5), true);
+ assert.strictEqual(_.inRange(5, 5), false);
+ assert.strictEqual(_.inRange(6, 5), false);
+ });
+
+ QUnit.test('should work with `start` and `end` arguments', function(assert) {
+ assert.expect(4);
+
+ assert.strictEqual(_.inRange(1, 1, 5), true);
+ assert.strictEqual(_.inRange(3, 1, 5), true);
+ assert.strictEqual(_.inRange(0, 1, 5), false);
+ assert.strictEqual(_.inRange(5, 1, 5), false);
+ });
+
+ QUnit.test('should treat falsey `start` arguments as `0`', function(assert) {
+ assert.expect(13);
+
+ lodashStable.each(falsey, function(value, index) {
+ if (index) {
+ assert.strictEqual(_.inRange(0, value), false);
+ assert.strictEqual(_.inRange(0, value, 1), true);
+ } else {
+ assert.strictEqual(_.inRange(0), false);
+ }
+ });
+ });
+
+ QUnit.test('should swap `start` and `end` when `start` > `end`', function(assert) {
+ assert.expect(2);
+
+ assert.strictEqual(_.inRange(2, 5, 1), true);
+ assert.strictEqual(_.inRange(-3, -2, -6), true);
+ });
+
+ QUnit.test('should work with a floating point `n` value', function(assert) {
+ assert.expect(4);
+
+ assert.strictEqual(_.inRange(0.5, 5), true);
+ assert.strictEqual(_.inRange(1.2, 1, 5), true);
+ assert.strictEqual(_.inRange(5.2, 5), false);
+ assert.strictEqual(_.inRange(0.5, 1, 5), false);
+ });
+
+ QUnit.test('should coerce arguments to finite numbers', function(assert) {
+ assert.expect(1);
+
+ var actual = [_.inRange(0, '0', 1), _.inRange(0, '1'), _.inRange(0, 0, '1'), _.inRange(0, NaN, 1), _.inRange(-1, -1, NaN)],
+ expected = lodashStable.map(actual, alwaysTrue);
+
+ assert.deepEqual(actual, expected);
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('intersection methods');
+
+ lodashStable.each(['intersection', 'intersectionBy', 'intersectionWith'], function(methodName) {
+ var args = (function() { return arguments; }(1, 2, 3)),
+ func = _[methodName];
+
+ QUnit.test('`_.' + methodName + '` should return the intersection of two arrays', function(assert) {
+ assert.expect(2);
+
+ var actual = func([1, 3, 2], [5, 2, 1, 4]);
+ assert.deepEqual(actual, [1, 2]);
+
+ actual = func([5, 2, 1, 4], [1, 3, 2]);
+ assert.deepEqual(actual, [2, 1]);
+ });
+
+ QUnit.test('`_.' + methodName + '` should return the intersection of multiple arrays', function(assert) {
+ assert.expect(2);
+
+ var actual = func([1, 3, 2], [5, 2, 1, 4], [2, 1]);
+ assert.deepEqual(actual, [1, 2]);
+
+ actual = func([5, 2, 1, 4], [2, 1], [1, 3, 2]);
+ assert.deepEqual(actual, [2, 1]);
+ });
+
+ QUnit.test('`_.' + methodName + '` should return an array of unique values', function(assert) {
+ assert.expect(1);
+
+ var actual = func([1, 1, 3, 2, 2], [5, 2, 2, 1, 4], [2, 1, 1]);
+ assert.deepEqual(actual, [1, 2]);
+ });
+
+ QUnit.test('`_.' + methodName + '` should work with a single array', function(assert) {
+ assert.expect(1);
+
+ var actual = func([1, 1, 3, 2, 2]);
+ assert.deepEqual(actual, [1, 3, 2]);
+ });
+
+ QUnit.test('`_.' + methodName + '` should work with `arguments` objects', function(assert) {
+ assert.expect(2);
+
+ var array = [0, 1, null, 3],
+ expected = [1, 3];
+
+ assert.deepEqual(func(array, args), expected);
+ assert.deepEqual(func(args, array), expected);
+ });
+
+ QUnit.test('`_.' + methodName + '` should treat `-0` as `0`', function(assert) {
+ assert.expect(1);
+
+ var values = [-0, 0],
+ expected = lodashStable.map(values, lodashStable.constant(['0']));
+
+ var actual = lodashStable.map(values, function(value) {
+ return lodashStable.map(func(values, [value]), lodashStable.toString);
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('`_.' + methodName + '` should match `NaN`', function(assert) {
+ assert.expect(1);
+
+ var actual = func([1, NaN, 3], [NaN, 5, NaN]);
+ assert.deepEqual(actual, [NaN]);
+ });
+
+ QUnit.test('`_.' + methodName + '` should work with large arrays of `-0` as `0`', function(assert) {
+ assert.expect(1);
+
+ var values = [-0, 0],
+ expected = lodashStable.map(values, lodashStable.constant(['0']));
+
+ var actual = lodashStable.map(values, function(value) {
+ var largeArray = lodashStable.times(LARGE_ARRAY_SIZE, lodashStable.constant(value));
+ return lodashStable.map(func(values, largeArray), lodashStable.toString);
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('`_.' + methodName + '` should work with large arrays of `NaN`', function(assert) {
+ assert.expect(1);
+
+ var largeArray = lodashStable.times(LARGE_ARRAY_SIZE, alwaysNaN);
+ assert.deepEqual(func([1, NaN, 3], largeArray), [NaN]);
+ });
+
+ QUnit.test('`_.' + methodName + '` should work with large arrays of objects', function(assert) {
+ assert.expect(2);
+
+ var object = {},
+ largeArray = lodashStable.times(LARGE_ARRAY_SIZE, lodashStable.constant(object));
+
+ assert.deepEqual(func([object], largeArray), [object]);
+ assert.deepEqual(func(lodashStable.range(LARGE_ARRAY_SIZE), [1]), [1]);
+ });
+
+ QUnit.test('`_.' + methodName + '` should treat values that are not arrays or `arguments` objects as empty', function(assert) {
+ assert.expect(3);
+
+ var array = [0, 1, null, 3];
+ assert.deepEqual(func(array, 3, { '0': 1 }, null), []);
+ assert.deepEqual(func(null, array, null, [2, 3]), []);
+ assert.deepEqual(func(array, null, args, null), []);
+ });
+
+ QUnit.test('`_.' + methodName + '` should return a wrapped value when chaining', function(assert) {
+ assert.expect(2);
+
+ if (!isNpm) {
+ var wrapped = _([1, 3, 2])[methodName]([5, 2, 1, 4]);
+ assert.ok(wrapped instanceof _);
+ assert.deepEqual(wrapped.value(), [1, 2]);
+ }
+ else {
+ skipAssert(assert, 2);
+ }
+ });
+ });
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.intersectionBy');
+
+ (function() {
+ QUnit.test('should accept an `iteratee` argument', function(assert) {
+ assert.expect(2);
+
+ var actual = _.intersectionBy([2.1, 1.2], [4.3, 2.4], Math.floor);
+ assert.deepEqual(actual, [2.1]);
+
+ actual = _.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
+ assert.deepEqual(actual, [{ 'x': 1 }]);
+ });
+
+ QUnit.test('should provide the correct `iteratee` arguments', function(assert) {
+ assert.expect(1);
+
+ var args;
+
+ _.intersectionBy([2.1, 1.2], [4.3, 2.4], function() {
+ args || (args = slice.call(arguments));
+ });
+
+ assert.deepEqual(args, [4.3]);
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.intersectionWith');
+
+ (function() {
+ QUnit.test('should work with a `comparator` argument', function(assert) {
+ assert.expect(1);
+
+ var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }],
+ others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }],
+ actual = _.intersectionWith(objects, others, lodashStable.isEqual);
+
+ assert.deepEqual(actual, [objects[0]]);
+ });
+
+ QUnit.test('should preserve the sign of `0`', function(assert) {
+ assert.expect(1);
+
+ var array = [-0],
+ largeArray = lodashStable.times(LARGE_ARRAY_SIZE, alwaysZero),
+ others = [[0], largeArray],
+ expected = lodashStable.map(others, lodashStable.constant(['-0']));
+
+ var actual = lodashStable.map(others, function(other) {
+ return lodashStable.map(_.intersectionWith(array, other, lodashStable.eq), lodashStable.toString);
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.invert');
+
+ (function() {
+ QUnit.test('should invert an object', function(assert) {
+ assert.expect(2);
+
+ var object = { 'a': 1, 'b': 2 },
+ actual = _.invert(object);
+
+ assert.deepEqual(actual, { '1': 'a', '2': 'b' });
+ assert.deepEqual(_.invert(actual), { 'a': '1', 'b': '2' });
+ });
+
+ QUnit.test('should work with values that shadow keys on `Object.prototype`', function(assert) {
+ assert.expect(1);
+
+ var object = { 'a': 'hasOwnProperty', 'b': 'constructor' };
+ assert.deepEqual(_.invert(object), { 'hasOwnProperty': 'a', 'constructor': 'b' });
+ });
+
+ QUnit.test('should work with an object that has a `length` property', function(assert) {
+ assert.expect(1);
+
+ var object = { '0': 'a', '1': 'b', 'length': 2 };
+ assert.deepEqual(_.invert(object), { 'a': '0', 'b': '1', '2': 'length' });
+ });
+
+ QUnit.test('should return a wrapped value when chaining', function(assert) {
+ assert.expect(2);
+
+ if (!isNpm) {
+ var object = { 'a': 1, 'b': 2 },
+ wrapped = _(object).invert();
+
+ assert.ok(wrapped instanceof _);
+ assert.deepEqual(wrapped.value(), { '1': 'a', '2': 'b' });
+ }
+ else {
+ skipAssert(assert, 2);
+ }
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.invertBy');
+
+ (function() {
+ var object = { 'a': 1, 'b': 2, 'c': 1 };
+
+ QUnit.test('should transform keys by `iteratee`', function(assert) {
+ assert.expect(1);
+
+ var expected = { 'group1': ['a', 'c'], 'group2': ['b'] };
+
+ var actual = _.invertBy(object, function(value) {
+ return 'group' + value;
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('should use `_.identity` when `iteratee` is nullish', function(assert) {
+ assert.expect(1);
+
+ var values = [, null, undefined],
+ expected = lodashStable.map(values, lodashStable.constant({ '1': ['a', 'c'], '2': ['b'] }));
+
+ var actual = lodashStable.map(values, function(value, index) {
+ return index ? _.invertBy(object, value) : _.invertBy(object);
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('should only add multiple values to own, not inherited, properties', function(assert) {
+ assert.expect(1);
+
+ var object = { 'a': 'hasOwnProperty', 'b': 'constructor' },
+ expected = { 'hasOwnProperty': ['a'], 'constructor': ['b'] };
+
+ assert.ok(lodashStable.isEqual(_.invertBy(object), expected));
+ });
+
+ QUnit.test('should return a wrapped value when chaining', function(assert) {
+ assert.expect(2);
+
+ if (!isNpm) {
+ var wrapped = _(object).invertBy();
+
+ assert.ok(wrapped instanceof _);
+ assert.deepEqual(wrapped.value(), { '1': ['a', 'c'], '2': ['b'] });
+ }
+ else {
+ skipAssert(assert, 2);
+ }
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.invoke');
+
+ (function() {
+ QUnit.test('should invoke a method on `object`', function(assert) {
+ assert.expect(1);
+
+ var object = { 'a': lodashStable.constant('A') },
+ actual = _.invoke(object, 'a');
+
+ assert.strictEqual(actual, 'A');
+ });
+
+ QUnit.test('should support invoking with arguments', function(assert) {
+ assert.expect(1);
+
+ var object = { 'a': function(a, b) { return [a, b]; } },
+ actual = _.invoke(object, 'a', 1, 2);
+
+ assert.deepEqual(actual, [1, 2]);
+ });
+
+ QUnit.test('should not error on nullish elements', function(assert) {
+ assert.expect(1);
+
+ var values = [null, undefined],
+ expected = lodashStable.map(values, noop);
+
+ var actual = lodashStable.map(values, function(value) {
+ try {
+ return _.invoke(value, 'a.b', 1, 2);
+ } catch (e) {}
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('should preserve the sign of `0`', function(assert) {
+ assert.expect(1);
+
+ var object = { '-0': alwaysA, '0': alwaysB },
+ props = [-0, Object(-0), 0, Object(0)];
+
+ var actual = lodashStable.map(props, function(key) {
+ return _.invoke(object, key);
+ });
+
+ assert.deepEqual(actual, ['a', 'a', 'b', 'b']);
+ });
+
+ QUnit.test('should support deep paths', function(assert) {
+ assert.expect(2);
+
+ var object = { 'a': { 'b': function(a, b) { return [a, b]; } } };
+
+ lodashStable.each(['a.b', ['a', 'b']], function(path) {
+ var actual = _.invoke(object, path, 1, 2);
+ assert.deepEqual(actual, [1, 2]);
+ });
+ });
+
+ QUnit.test('should invoke deep property methods with the correct `this` binding', function(assert) {
+ assert.expect(2);
+
+ var object = { 'a': { 'b': function() { return this.c; }, 'c': 1 } };
+
+ lodashStable.each(['a.b', ['a', 'b']], function(path) {
+ assert.deepEqual(_.invoke(object, path), 1);
+ });
+ });
+
+ QUnit.test('should return an unwrapped value when implicitly chaining', function(assert) {
+ assert.expect(1);
+
+ if (!isNpm) {
+ var object = { 'a': alwaysOne };
+ assert.strictEqual(_(object).invoke('a'), 1);
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+
+ QUnit.test('should return a wrapped value when explicitly chaining', function(assert) {
+ assert.expect(1);
+
+ if (!isNpm) {
+ var object = { 'a': alwaysOne };
+ assert.ok(_(object).chain().invoke('a') instanceof _);
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.invokeMap');
+
+ (function() {
+ QUnit.test('should invoke a methods on each element of `collection`', function(assert) {
+ assert.expect(1);
+
+ var array = ['a', 'b', 'c'],
+ actual = _.invokeMap(array, 'toUpperCase');
+
+ assert.deepEqual(actual, ['A', 'B', 'C']);
+ });
+
+ QUnit.test('should support invoking with arguments', function(assert) {
+ assert.expect(1);
+
+ var array = [function() { return slice.call(arguments); }],
+ actual = _.invokeMap(array, 'call', null, 'a', 'b', 'c');
+
+ assert.deepEqual(actual, [['a', 'b', 'c']]);
+ });
+
+ QUnit.test('should work with a function for `methodName`', function(assert) {
+ assert.expect(1);
+
+ var array = ['a', 'b', 'c'];
+
+ var actual = _.invokeMap(array, function(left, right) {
+ return left + this.toUpperCase() + right;
+ }, '(', ')');
+
+ assert.deepEqual(actual, ['(A)', '(B)', '(C)']);
+ });
+
+ QUnit.test('should work with an object for `collection`', function(assert) {
+ assert.expect(1);
+
+ var object = { 'a': 1, 'b': 2, 'c': 3 },
+ actual = _.invokeMap(object, 'toFixed', 1);
+
+ assert.deepEqual(actual, ['1.0', '2.0', '3.0']);
+ });
+
+ QUnit.test('should treat number values for `collection` as empty', function(assert) {
+ assert.expect(1);
+
+ assert.deepEqual(_.invokeMap(1), []);
+ });
+
+ QUnit.test('should not error on nullish elements', function(assert) {
+ assert.expect(1);
+
+ var array = ['a', null, undefined, 'd'];
+
+ try {
+ var actual = _.invokeMap(array, 'toUpperCase');
+ } catch (e) {}
+
+ assert.deepEqual(actual, ['A', undefined, undefined, 'D']);
+ });
+
+ QUnit.test('should not error on elements with missing properties', function(assert) {
+ assert.expect(1);
+
+ var objects = lodashStable.map([null, undefined, alwaysOne], function(value) {
+ return { 'a': value };
+ });
+
+ var expected = lodashStable.map(objects, function(object) {
+ return object.a ? object.a() : undefined;
+ });
+
+ try {
+ var actual = _.invokeMap(objects, 'a');
+ } catch (e) {}
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('should invoke deep property methods with the correct `this` binding', function(assert) {
+ assert.expect(2);
+
+ var object = { 'a': { 'b': function() { return this.c; }, 'c': 1 } };
+
+ lodashStable.each(['a.b', ['a', 'b']], function(path) {
+ assert.deepEqual(_.invokeMap([object], path), [1]);
+ });
+ });
+
+ QUnit.test('should return a wrapped value when chaining', function(assert) {
+ assert.expect(4);
+
+ if (!isNpm) {
+ var array = ['a', 'b', 'c'],
+ wrapped = _(array),
+ actual = wrapped.invokeMap('toUpperCase');
+
+ assert.ok(actual instanceof _);
+ assert.deepEqual(actual.valueOf(), ['A', 'B', 'C']);
+
+ actual = wrapped.invokeMap(function(left, right) {
+ return left + this.toUpperCase() + right;
+ }, '(', ')');
+
+ assert.ok(actual instanceof _);
+ assert.deepEqual(actual.valueOf(), ['(A)', '(B)', '(C)']);
+ }
+ else {
+ skipAssert(assert, 4);
+ }
+ });
+
+ QUnit.test('should support shortcut fusion', function(assert) {
+ assert.expect(2);
+
+ if (!isNpm) {
+ var count = 0,
+ method = function() { count++; return this.index; };
+
+ var array = lodashStable.times(LARGE_ARRAY_SIZE, function(index) {
+ return { 'index': index, 'method': method };
+ });
+
+ var actual = _(array).invokeMap('method').take(1).value();
+
+ assert.strictEqual(count, 1);
+ assert.deepEqual(actual, [0]);
+ }
+ else {
+ skipAssert(assert, 2);
+ }
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.isArguments');
+
+ (function() {
+ var args = (function() { return arguments; }(1, 2, 3)),
+ strictArgs = (function() { 'use strict'; return arguments; }(1, 2, 3));
+
+ QUnit.test('should return `true` for `arguments` objects', function(assert) {
+ assert.expect(2);
+
+ assert.strictEqual(_.isArguments(args), true);
+ assert.strictEqual(_.isArguments(strictArgs), true);
+ });
+
+ QUnit.test('should return `false` for non `arguments` objects', function(assert) {
+ assert.expect(12);
+
+ var expected = lodashStable.map(falsey, alwaysFalse);
+
+ var actual = lodashStable.map(falsey, function(value, index) {
+ return index ? _.isArguments(value) : _.isArguments();
+ });
+
+ assert.deepEqual(actual, expected);
+
+ assert.strictEqual(_.isArguments([1, 2, 3]), false);
+ assert.strictEqual(_.isArguments(true), false);
+ assert.strictEqual(_.isArguments(new Date), false);
+ assert.strictEqual(_.isArguments(new Error), false);
+ assert.strictEqual(_.isArguments(_), false);
+ assert.strictEqual(_.isArguments(slice), false);
+ assert.strictEqual(_.isArguments({ '0': 1, 'callee': noop, 'length': 1 }), false);
+ assert.strictEqual(_.isArguments(1), false);
+ assert.strictEqual(_.isArguments(/x/), false);
+ assert.strictEqual(_.isArguments('a'), false);
+ assert.strictEqual(_.isArguments(symbol), false);
+ });
+
+ QUnit.test('should work with an `arguments` object from another realm', function(assert) {
+ assert.expect(1);
+
+ if (realm.arguments) {
+ assert.strictEqual(_.isArguments(realm.arguments), true);
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.isArray');
+
+ (function() {
+ var args = arguments;
+
+ QUnit.test('should return `true` for arrays', function(assert) {
+ assert.expect(1);
+
+ assert.strictEqual(_.isArray([1, 2, 3]), true);
+ });
+
+ QUnit.test('should return `false` for non-arrays', function(assert) {
+ assert.expect(12);
+
+ var expected = lodashStable.map(falsey, alwaysFalse);
+
+ var actual = lodashStable.map(falsey, function(value, index) {
+ return index ? _.isArray(value) : _.isArray();
+ });
+
+ assert.deepEqual(actual, expected);
+
+ assert.strictEqual(_.isArray(args), false);
+ assert.strictEqual(_.isArray(true), false);
+ assert.strictEqual(_.isArray(new Date), false);
+ assert.strictEqual(_.isArray(new Error), false);
+ assert.strictEqual(_.isArray(_), false);
+ assert.strictEqual(_.isArray(slice), false);
+ assert.strictEqual(_.isArray({ '0': 1, 'length': 1 }), false);
+ assert.strictEqual(_.isArray(1), false);
+ assert.strictEqual(_.isArray(/x/), false);
+ assert.strictEqual(_.isArray('a'), false);
+ assert.strictEqual(_.isArray(symbol), false);
+ });
+
+ QUnit.test('should work with an array from another realm', function(assert) {
+ assert.expect(1);
+
+ if (realm.array) {
+ assert.strictEqual(_.isArray(realm.array), true);
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+ }(1, 2, 3));
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.isArrayBuffer');
+
+ (function() {
+ var args = arguments;
+
+ QUnit.test('should return `true` for array buffers', function(assert) {
+ assert.expect(1);
+
+ if (ArrayBuffer) {
+ assert.strictEqual(_.isArrayBuffer(arrayBuffer), true);
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+
+ QUnit.test('should return `false` for non array buffers', function(assert) {
+ assert.expect(13);
+
+ var expected = lodashStable.map(falsey, alwaysFalse);
+
+ var actual = lodashStable.map(falsey, function(value, index) {
+ return index ? _.isArrayBuffer(value) : _.isArrayBuffer();
+ });
+
+ assert.deepEqual(actual, expected);
+
+ assert.strictEqual(_.isArrayBuffer(args), false);
+ assert.strictEqual(_.isArrayBuffer([1, 2, 3]), false);
+ assert.strictEqual(_.isArrayBuffer(true), false);
+ assert.strictEqual(_.isArrayBuffer(new Date), false);
+ assert.strictEqual(_.isArrayBuffer(new Error), false);
+ assert.strictEqual(_.isArrayBuffer(_), false);
+ assert.strictEqual(_.isArrayBuffer(slice), false);
+ assert.strictEqual(_.isArrayBuffer({ 'a': 1 }), false);
+ assert.strictEqual(_.isArrayBuffer(1), false);
+ assert.strictEqual(_.isArrayBuffer(/x/), false);
+ assert.strictEqual(_.isArrayBuffer('a'), false);
+ assert.strictEqual(_.isArrayBuffer(symbol), false);
+ });
+
+ QUnit.test('should work with array buffers from another realm', function(assert) {
+ assert.expect(1);
+
+ if (realm.arrayBuffer) {
+ assert.strictEqual(_.isArrayBuffer(realm.arrayBuffer), true);
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+ }(1, 2, 3));
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.isArrayLike');
+
+ (function() {
+ var args = arguments;
+
+ QUnit.test('should return `true` for array-like values', function(assert) {
+ assert.expect(1);
+
+ var values = [args, [1, 2, 3], { '0': 1, 'length': 1 }, 'a'],
+ expected = lodashStable.map(values, alwaysTrue),
+ actual = lodashStable.map(values, _.isArrayLike);
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('should return `false` for non-arrays', function(assert) {
+ assert.expect(11);
+
+ var expected = lodashStable.map(falsey, function(value) {
+ return value === '';
+ });
+
+ var actual = lodashStable.map(falsey, function(value, index) {
+ return index ? _.isArrayLike(value) : _.isArrayLike();
+ });
+
+ assert.deepEqual(actual, expected);
+
+ assert.strictEqual(_.isArrayLike(true), false);
+ assert.strictEqual(_.isArrayLike(new Date), false);
+ assert.strictEqual(_.isArrayLike(new Error), false);
+ assert.strictEqual(_.isArrayLike(_), false);
+ assert.strictEqual(_.isArrayLike(generator), false);
+ assert.strictEqual(_.isArrayLike(slice), false);
+ assert.strictEqual(_.isArrayLike({ 'a': 1 }), false);
+ assert.strictEqual(_.isArrayLike(1), false);
+ assert.strictEqual(_.isArrayLike(/x/), false);
+ assert.strictEqual(_.isArrayLike(symbol), false);
+ });
+
+ QUnit.test('should work with an array from another realm', function(assert) {
+ assert.expect(1);
+
+ if (realm.object) {
+ var values = [realm.arguments, realm.array, realm.string],
+ expected = lodashStable.map(values, alwaysTrue),
+ actual = lodashStable.map(values, _.isArrayLike);
+
+ assert.deepEqual(actual, expected);
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+ }(1, 2, 3));
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.isBoolean');
+
+ (function() {
+ var args = arguments;
+
+ QUnit.test('should return `true` for booleans', function(assert) {
+ assert.expect(4);
+
+ assert.strictEqual(_.isBoolean(true), true);
+ assert.strictEqual(_.isBoolean(false), true);
+ assert.strictEqual(_.isBoolean(Object(true)), true);
+ assert.strictEqual(_.isBoolean(Object(false)), true);
+ });
+
+ QUnit.test('should return `false` for non-booleans', function(assert) {
+ assert.expect(12);
+
+ var expected = lodashStable.map(falsey, function(value) {
+ return value === false;
+ });
+
+ var actual = lodashStable.map(falsey, function(value, index) {
+ return index ? _.isBoolean(value) : _.isBoolean();
+ });
+
+ assert.deepEqual(actual, expected);
+
+ assert.strictEqual(_.isBoolean(args), false);
+ assert.strictEqual(_.isBoolean([1, 2, 3]), false);
+ assert.strictEqual(_.isBoolean(new Date), false);
+ assert.strictEqual(_.isBoolean(new Error), false);
+ assert.strictEqual(_.isBoolean(_), false);
+ assert.strictEqual(_.isBoolean(slice), false);
+ assert.strictEqual(_.isBoolean({ 'a': 1 }), false);
+ assert.strictEqual(_.isBoolean(1), false);
+ assert.strictEqual(_.isBoolean(/x/), false);
+ assert.strictEqual(_.isBoolean('a'), false);
+ assert.strictEqual(_.isBoolean(symbol), false);
+ });
+
+ QUnit.test('should work with a boolean from another realm', function(assert) {
+ assert.expect(1);
+
+ if (realm.boolean) {
+ assert.strictEqual(_.isBoolean(realm.boolean), true);
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+ }(1, 2, 3));
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.isBuffer');
+
+ (function() {
+ var args = arguments;
+
+ QUnit.test('should return `true` for buffers', function(assert) {
+ assert.expect(1);
+
+ if (Buffer) {
+ assert.strictEqual(_.isBuffer(new Buffer(2)), true);
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+
+ QUnit.test('should return `false` for non-buffers', function(assert) {
+ assert.expect(13);
+
+ var expected = lodashStable.map(falsey, alwaysFalse);
+
+ var actual = lodashStable.map(falsey, function(value, index) {
+ return index ? _.isBuffer(value) : _.isBuffer();
+ });
+
+ assert.deepEqual(actual, expected);
+
+ assert.strictEqual(_.isBuffer(args), false);
+ assert.strictEqual(_.isBuffer([1, 2, 3]), false);
+ assert.strictEqual(_.isBuffer(true), false);
+ assert.strictEqual(_.isBuffer(new Date), false);
+ assert.strictEqual(_.isBuffer(new Error), false);
+ assert.strictEqual(_.isBuffer(_), false);
+ assert.strictEqual(_.isBuffer(slice), false);
+ assert.strictEqual(_.isBuffer({ 'a': 1 }), false);
+ assert.strictEqual(_.isBuffer(1), false);
+ assert.strictEqual(_.isBuffer(/x/), false);
+ assert.strictEqual(_.isBuffer('a'), false);
+ assert.strictEqual(_.isBuffer(symbol), false);
+ });
+
+ QUnit.test('should return `false` if `Buffer` is not defined', function(assert) {
+ assert.expect(1);
+
+ if (!isStrict && Buffer && lodashBizarro) {
+ assert.strictEqual(lodashBizarro.isBuffer(new Buffer(2)), false);
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+ }(1, 2, 3));
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.isDate');
+
+ (function() {
+ var args = arguments;
+
+ QUnit.test('should return `true` for dates', function(assert) {
+ assert.expect(1);
+
+ assert.strictEqual(_.isDate(new Date), true);
+ });
+
+ QUnit.test('should return `false` for non-dates', function(assert) {
+ assert.expect(12);
+
+ var expected = lodashStable.map(falsey, alwaysFalse);
+
+ var actual = lodashStable.map(falsey, function(value, index) {
+ return index ? _.isDate(value) : _.isDate();
+ });
+
+ assert.deepEqual(actual, expected);
+
+ assert.strictEqual(_.isDate(args), false);
+ assert.strictEqual(_.isDate([1, 2, 3]), false);
+ assert.strictEqual(_.isDate(true), false);
+ assert.strictEqual(_.isDate(new Error), false);
+ assert.strictEqual(_.isDate(_), false);
+ assert.strictEqual(_.isDate(slice), false);
+ assert.strictEqual(_.isDate({ 'a': 1 }), false);
+ assert.strictEqual(_.isDate(1), false);
+ assert.strictEqual(_.isDate(/x/), false);
+ assert.strictEqual(_.isDate('a'), false);
+ assert.strictEqual(_.isDate(symbol), false);
+ });
+
+ QUnit.test('should work with a date object from another realm', function(assert) {
+ assert.expect(1);
+
+ if (realm.date) {
+ assert.strictEqual(_.isDate(realm.date), true);
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+ }(1, 2, 3));
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.isElement');
+
+ (function() {
+ var args = arguments;
+
+ function Element() {
+ this.nodeType = 1;
+ }
+
+ QUnit.test('should return `false` for plain objects', function(assert) {
+ assert.expect(7);
+
+ var element = body || new Element;
+
+ assert.strictEqual(_.isElement(element), true);
+ assert.strictEqual(_.isElement({ 'nodeType': 1 }), false);
+ assert.strictEqual(_.isElement({ 'nodeType': Object(1) }), false);
+ assert.strictEqual(_.isElement({ 'nodeType': true }), false);
+ assert.strictEqual(_.isElement({ 'nodeType': [1] }), false);
+ assert.strictEqual(_.isElement({ 'nodeType': '1' }), false);
+ assert.strictEqual(_.isElement({ 'nodeType': '001' }), false);
+ });
+
+ QUnit.test('should return `false` for non DOM elements', function(assert) {
+ assert.expect(13);
+
+ var expected = lodashStable.map(falsey, alwaysFalse);
+
+ var actual = lodashStable.map(falsey, function(value, index) {
+ return index ? _.isElement(value) : _.isElement();
+ });
+
+ assert.deepEqual(actual, expected);
+
+ assert.strictEqual(_.isElement(args), false);
+ assert.strictEqual(_.isElement([1, 2, 3]), false);
+ assert.strictEqual(_.isElement(true), false);
+ assert.strictEqual(_.isElement(new Date), false);
+ assert.strictEqual(_.isElement(new Error), false);
+ assert.strictEqual(_.isElement(_), false);
+ assert.strictEqual(_.isElement(slice), false);
+ assert.strictEqual(_.isElement({ 'a': 1 }), false);
+ assert.strictEqual(_.isElement(1), false);
+ assert.strictEqual(_.isElement(/x/), false);
+ assert.strictEqual(_.isElement('a'), false);
+ assert.strictEqual(_.isElement(symbol), false);
+ });
+
+ QUnit.test('should work with a DOM element from another realm', function(assert) {
+ assert.expect(1);
+
+ if (realm.element) {
+ assert.strictEqual(_.isElement(realm.element), true);
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+ }(1, 2, 3));
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.isEmpty');
+
+ (function() {
+ var args = arguments;
+
+ QUnit.test('should return `true` for empty values', function(assert) {
+ assert.expect(10);
+
+ var expected = lodashStable.map(empties, alwaysTrue),
+ actual = lodashStable.map(empties, _.isEmpty);
+
+ assert.deepEqual(actual, expected);
+
+ assert.strictEqual(_.isEmpty(true), true);
+ assert.strictEqual(_.isEmpty(slice), true);
+ assert.strictEqual(_.isEmpty(1), true);
+ assert.strictEqual(_.isEmpty(NaN), true);
+ assert.strictEqual(_.isEmpty(/x/), true);
+ assert.strictEqual(_.isEmpty(symbol), true);
+ assert.strictEqual(_.isEmpty(), true);
+
+ if (Buffer) {
+ assert.strictEqual(_.isEmpty(new Buffer(0)), true);
+ assert.strictEqual(_.isEmpty(new Buffer(1)), false);
+ }
+ else {
+ skipAssert(assert, 2);
+ }
+ });
+
+ QUnit.test('should return `false` for non-empty values', function(assert) {
+ assert.expect(3);
+
+ assert.strictEqual(_.isEmpty([0]), false);
+ assert.strictEqual(_.isEmpty({ 'a': 0 }), false);
+ assert.strictEqual(_.isEmpty('a'), false);
+ });
+
+ QUnit.test('should work with an object that has a `length` property', function(assert) {
+ assert.expect(1);
+
+ assert.strictEqual(_.isEmpty({ 'length': 0 }), false);
+ });
+
+ QUnit.test('should work with `arguments` objects', function(assert) {
+ assert.expect(1);
+
+ assert.strictEqual(_.isEmpty(args), false);
+ });
+
+ QUnit.test('should work with jQuery/MooTools DOM query collections', function(assert) {
+ assert.expect(1);
+
+ function Foo(elements) {
+ push.apply(this, elements);
+ }
+ Foo.prototype = { 'length': 0, 'splice': arrayProto.splice };
+
+ assert.strictEqual(_.isEmpty(new Foo([])), true);
+ });
+
+ QUnit.test('should work with maps', function(assert) {
+ assert.expect(4);
+
+ if (Map) {
+ lodashStable.each([new Map, realm.map], function(map) {
+ assert.strictEqual(_.isEmpty(map), true);
+ map.set('a', 1);
+ assert.strictEqual(_.isEmpty(map), false);
+ map.clear();
+ });
+ }
+ else {
+ skipAssert(assert, 4);
+ }
+ });
+
+ QUnit.test('should work with sets', function(assert) {
+ assert.expect(4);
+
+ if (Set) {
+ lodashStable.each([new Set, realm.set], function(set) {
+ assert.strictEqual(_.isEmpty(set), true);
+ set.add(1);
+ assert.strictEqual(_.isEmpty(set), false);
+ set.clear();
+ });
+ }
+ else {
+ skipAssert(assert, 4);
+ }
+ });
+
+ QUnit.test('should not treat objects with negative lengths as array-like', function(assert) {
+ assert.expect(1);
+
+ function Foo() {}
+ Foo.prototype.length = -1;
+
+ assert.strictEqual(_.isEmpty(new Foo), true);
+ });
+
+ QUnit.test('should not treat objects with lengths larger than `MAX_SAFE_INTEGER` as array-like', function(assert) {
+ assert.expect(1);
+
+ function Foo() {}
+ Foo.prototype.length = MAX_SAFE_INTEGER + 1;
+
+ assert.strictEqual(_.isEmpty(new Foo), true);
+ });
+
+ QUnit.test('should not treat objects with non-number lengths as array-like', function(assert) {
+ assert.expect(1);
+
+ assert.strictEqual(_.isEmpty({ 'length': '0' }), false);
+ });
+
+ QUnit.test('should return an unwrapped value when implicitly chaining', function(assert) {
+ assert.expect(1);
+
+ if (!isNpm) {
+ assert.strictEqual(_({}).isEmpty(), true);
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+
+ QUnit.test('should return a wrapped value when explicitly chaining', function(assert) {
+ assert.expect(1);
+
+ if (!isNpm) {
+ assert.ok(_({}).chain().isEmpty() instanceof _);
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+ }(1, 2, 3));
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.isEqual');
+
+ (function() {
+ var symbol1 = Symbol ? Symbol('a') : true,
+ symbol2 = Symbol ? Symbol('b') : false;
+
+ QUnit.test('should compare primitives', function(assert) {
+ assert.expect(1);
+
+ var pairs = [
+ [1, 1, true], [1, Object(1), true], [1, '1', false], [1, 2, false],
+ [-0, -0, true], [0, 0, true], [0, Object(0), true], [Object(0), Object(0), true], [-0, 0, true], [0, '0', false], [0, null, false],
+ [NaN, NaN, true], [NaN, Object(NaN), true], [Object(NaN), Object(NaN), true], [NaN, 'a', false], [NaN, Infinity, false],
+ ['a', 'a', true], ['a', Object('a'), true], [Object('a'), Object('a'), true], ['a', 'b', false], ['a', ['a'], false],
+ [true, true, true], [true, Object(true), true], [Object(true), Object(true), true], [true, 1, false], [true, 'a', false],
+ [false, false, true], [false, Object(false), true], [Object(false), Object(false), true], [false, 0, false], [false, '', false],
+ [symbol1, symbol1, true], [symbol1, Object(symbol1), true], [Object(symbol1), Object(symbol1), true], [symbol1, symbol2, false],
+ [null, null, true], [null, undefined, false], [null, {}, false], [null, '', false],
+ [undefined, undefined, true], [undefined, null, false], [undefined, '', false]
+ ];
+
+ var expected = lodashStable.map(pairs, function(pair) {
+ return pair[2];
+ });
+
+ var actual = lodashStable.map(pairs, function(pair) {
+ return _.isEqual(pair[0], pair[1]);
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('should compare arrays', function(assert) {
+ assert.expect(6);
+
+ var array1 = [true, null, 1, 'a', undefined],
+ array2 = [true, null, 1, 'a', undefined];
+
+ assert.strictEqual(_.isEqual(array1, array2), true);
+
+ array1 = [[1, 2, 3], new Date(2012, 4, 23), /x/, { 'e': 1 }];
+ array2 = [[1, 2, 3], new Date(2012, 4, 23), /x/, { 'e': 1 }];
+
+ assert.strictEqual(_.isEqual(array1, array2), true);
+
+ array1 = [1];
+ array1[2] = 3;
+
+ array2 = [1];
+ array2[1] = undefined;
+ array2[2] = 3;
+
+ assert.strictEqual(_.isEqual(array1, array2), true);
+
+ array1 = [Object(1), false, Object('a'), /x/, new Date(2012, 4, 23), ['a', 'b', [Object('c')]], { 'a': 1 }];
+ array2 = [1, Object(false), 'a', /x/, new Date(2012, 4, 23), ['a', Object('b'), ['c']], { 'a': 1 }];
+
+ assert.strictEqual(_.isEqual(array1, array2), true);
+
+ array1 = [1, 2, 3];
+ array2 = [3, 2, 1];
+
+ assert.strictEqual(_.isEqual(array1, array2), false);
+
+ array1 = [1, 2];
+ array2 = [1, 2, 3];
+
+ assert.strictEqual(_.isEqual(array1, array2), false);
+ });
+
+ QUnit.test('should treat arrays with identical values but different non-index properties as equal', function(assert) {
+ assert.expect(3);
+
+ var array1 = [1, 2, 3],
+ array2 = [1, 2, 3];
+
+ array1.every = array1.filter = array1.forEach =
+ array1.indexOf = array1.lastIndexOf = array1.map =
+ array1.some = array1.reduce = array1.reduceRight = null;
+
+ array2.concat = array2.join = array2.pop =
+ array2.reverse = array2.shift = array2.slice =
+ array2.sort = array2.splice = array2.unshift = null;
+
+ assert.strictEqual(_.isEqual(array1, array2), true);
+
+ array1 = [1, 2, 3];
+ array1.a = 1;
+
+ array2 = [1, 2, 3];
+ array2.b = 1;
+
+ assert.strictEqual(_.isEqual(array1, array2), true);
+
+ array1 = /c/.exec('abcde');
+ array2 = ['c'];
+
+ assert.strictEqual(_.isEqual(array1, array2), true);
+ });
+
+ QUnit.test('should compare sparse arrays', function(assert) {
+ assert.expect(3);
+
+ var array = Array(1);
+
+ assert.strictEqual(_.isEqual(array, Array(1)), true);
+ assert.strictEqual(_.isEqual(array, [undefined]), true);
+ assert.strictEqual(_.isEqual(array, Array(2)), false);
+ });
+
+ QUnit.test('should compare plain objects', function(assert) {
+ assert.expect(5);
+
+ var object1 = { 'a': true, 'b': null, 'c': 1, 'd': 'a', 'e': undefined },
+ object2 = { 'a': true, 'b': null, 'c': 1, 'd': 'a', 'e': undefined };
+
+ assert.strictEqual(_.isEqual(object1, object2), true);
+
+ object1 = { 'a': [1, 2, 3], 'b': new Date(2012, 4, 23), 'c': /x/, 'd': { 'e': 1 } };
+ object2 = { 'a': [1, 2, 3], 'b': new Date(2012, 4, 23), 'c': /x/, 'd': { 'e': 1 } };
+
+ assert.strictEqual(_.isEqual(object1, object2), true);
+
+ object1 = { 'a': 1, 'b': 2, 'c': 3 };
+ object2 = { 'a': 3, 'b': 2, 'c': 1 };
+
+ assert.strictEqual(_.isEqual(object1, object2), false);
+
+ object1 = { 'a': 1, 'b': 2, 'c': 3 };
+ object2 = { 'd': 1, 'e': 2, 'f': 3 };
+
+ assert.strictEqual(_.isEqual(object1, object2), false);
+
+ object1 = { 'a': 1, 'b': 2 };
+ object2 = { 'a': 1, 'b': 2, 'c': 3 };
+
+ assert.strictEqual(_.isEqual(object1, object2), false);
+ });
+
+ QUnit.test('should compare objects regardless of key order', function(assert) {
+ assert.expect(1);
+
+ var object1 = { 'a': 1, 'b': 2, 'c': 3 },
+ object2 = { 'c': 3, 'a': 1, 'b': 2 };
+
+ assert.strictEqual(_.isEqual(object1, object2), true);
+ });
+
+ QUnit.test('should compare nested objects', function(assert) {
+ assert.expect(1);
+
+ var object1 = {
+ 'a': [1, 2, 3],
+ 'b': true,
+ 'c': Object(1),
+ 'd': 'a',
+ 'e': {
+ 'f': ['a', Object('b'), 'c'],
+ 'g': Object(false),
+ 'h': new Date(2012, 4, 23),
+ 'i': noop,
+ 'j': 'a'
+ }
+ };
+
+ var object2 = {
+ 'a': [1, Object(2), 3],
+ 'b': Object(true),
+ 'c': 1,
+ 'd': Object('a'),
+ 'e': {
+ 'f': ['a', 'b', 'c'],
+ 'g': false,
+ 'h': new Date(2012, 4, 23),
+ 'i': noop,
+ 'j': 'a'
+ }
+ };
+
+ assert.strictEqual(_.isEqual(object1, object2), true);
+ });
+
+ QUnit.test('should compare object instances', function(assert) {
+ assert.expect(4);
+
+ function Foo() {
+ this.a = 1;
+ }
+ Foo.prototype.a = 1;
+
+ function Bar() {
+ this.a = 1;
+ }
+ Bar.prototype.a = 2;
+
+ assert.strictEqual(_.isEqual(new Foo, new Foo), true);
+ assert.strictEqual(_.isEqual(new Foo, new Bar), false);
+ assert.strictEqual(_.isEqual({ 'a': 1 }, new Foo), false);
+ assert.strictEqual(_.isEqual({ 'a': 2 }, new Bar), false);
+ });
+
+ QUnit.test('should compare objects with constructor properties', function(assert) {
+ assert.expect(5);
+
+ assert.strictEqual(_.isEqual({ 'constructor': 1 }, { 'constructor': 1 }), true);
+ assert.strictEqual(_.isEqual({ 'constructor': 1 }, { 'constructor': '1' }), false);
+ assert.strictEqual(_.isEqual({ 'constructor': [1] }, { 'constructor': [1] }), true);
+ assert.strictEqual(_.isEqual({ 'constructor': [1] }, { 'constructor': ['1'] }), false);
+ assert.strictEqual(_.isEqual({ 'constructor': Object }, {}), false);
+ });
+
+ QUnit.test('should compare arrays with circular references', function(assert) {
+ assert.expect(4);
+
+ var array1 = [],
+ array2 = [];
+
+ array1.push(array1);
+ array2.push(array2);
+
+ assert.strictEqual(_.isEqual(array1, array2), true);
+
+ array1.push('b');
+ array2.push('b');
+
+ assert.strictEqual(_.isEqual(array1, array2), true);
+
+ array1.push('c');
+ array2.push('d');
+
+ assert.strictEqual(_.isEqual(array1, array2), false);
+
+ array1 = ['a', 'b', 'c'];
+ array1[1] = array1;
+ array2 = ['a', ['a', 'b', 'c'], 'c'];
+
+ assert.strictEqual(_.isEqual(array1, array2), false);
+ });
+
+ QUnit.test('should compare objects with circular references', function(assert) {
+ assert.expect(4);
+
+ var object1 = {},
+ object2 = {};
+
+ object1.a = object1;
+ object2.a = object2;
+
+ assert.strictEqual(_.isEqual(object1, object2), true);
+
+ object1.b = 0;
+ object2.b = Object(0);
+
+ assert.strictEqual(_.isEqual(object1, object2), true);
+
+ object1.c = Object(1);
+ object2.c = Object(2);
+
+ assert.strictEqual(_.isEqual(object1, object2), false);
+
+ object1 = { 'a': 1, 'b': 2, 'c': 3 };
+ object1.b = object1;
+ object2 = { 'a': 1, 'b': { 'a': 1, 'b': 2, 'c': 3 }, 'c': 3 };
+
+ assert.strictEqual(_.isEqual(object1, object2), false);
+ });
+
+ QUnit.test('should compare objects with multiple circular references', function(assert) {
+ assert.expect(3);
+
+ var array1 = [{}],
+ array2 = [{}];
+
+ (array1[0].a = array1).push(array1);
+ (array2[0].a = array2).push(array2);
+
+ assert.strictEqual(_.isEqual(array1, array2), true);
+
+ array1[0].b = 0;
+ array2[0].b = Object(0);
+
+ assert.strictEqual(_.isEqual(array1, array2), true);
+
+ array1[0].c = Object(1);
+ array2[0].c = Object(2);
+
+ assert.strictEqual(_.isEqual(array1, array2), false);
+ });
+
+ QUnit.test('should compare objects with complex circular references', function(assert) {
+ assert.expect(1);
+
+ var object1 = {
+ 'foo': { 'b': { 'c': { 'd': {} } } },
+ 'bar': { 'a': 2 }
+ };
+
+ var object2 = {
+ 'foo': { 'b': { 'c': { 'd': {} } } },
+ 'bar': { 'a': 2 }
+ };
+
+ object1.foo.b.c.d = object1;
+ object1.bar.b = object1.foo.b;
+
+ object2.foo.b.c.d = object2;
+ object2.bar.b = object2.foo.b;
+
+ assert.strictEqual(_.isEqual(object1, object2), true);
+ });
+
+ QUnit.test('should compare objects with shared property values', function(assert) {
+ assert.expect(1);
+
+ var object1 = {
+ 'a': [1, 2]
+ };
+
+ var object2 = {
+ 'a': [1, 2],
+ 'b': [1, 2]
+ };
+
+ object1.b = object1.a;
+
+ assert.strictEqual(_.isEqual(object1, object2), true);
+ });
+
+ QUnit.test('should treat objects created by `Object.create(null)` like a plain object', function(assert) {
+ assert.expect(2);
+
+ function Foo() {
+ this.a = 1;
+ }
+ Foo.prototype.constructor = null;
+
+ var object2 = { 'a': 1 };
+ assert.strictEqual(_.isEqual(new Foo, object2), false);
+
+ if (create) {
+ var object1 = create(null);
+ object1.a = 1;
+ assert.strictEqual(_.isEqual(object1, object2), true);
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+
+ QUnit.test('should return `false` for objects with custom `toString` methods', function(assert) {
+ assert.expect(1);
+
+ var primitive,
+ object = { 'toString': function() { return primitive; } },
+ values = [true, null, 1, 'a', undefined],
+ expected = lodashStable.map(values, alwaysFalse);
+
+ var actual = lodashStable.map(values, function(value) {
+ primitive = value;
+ return _.isEqual(object, value);
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('should avoid common type coercions', function(assert) {
+ assert.expect(9);
+
+ assert.strictEqual(_.isEqual(true, Object(false)), false);
+ assert.strictEqual(_.isEqual(Object(false), Object(0)), false);
+ assert.strictEqual(_.isEqual(false, Object('')), false);
+ assert.strictEqual(_.isEqual(Object(36), Object('36')), false);
+ assert.strictEqual(_.isEqual(0, ''), false);
+ assert.strictEqual(_.isEqual(1, true), false);
+ assert.strictEqual(_.isEqual(1337756400000, new Date(2012, 4, 23)), false);
+ assert.strictEqual(_.isEqual('36', 36), false);
+ assert.strictEqual(_.isEqual(36, '36'), false);
+ });
+
+ QUnit.test('should compare `arguments` objects', function(assert) {
+ assert.expect(2);
+
+ var args1 = (function() { return arguments; }(1, 2, 3)),
+ args2 = (function() { return arguments; }(1, 2, 3)),
+ args3 = (function() { return arguments; }(1, 2));
+
+ assert.strictEqual(_.isEqual(args1, args2), true);
+ assert.strictEqual(_.isEqual(args1, args3), false);
+ });
+
+ QUnit.test('should treat `arguments` objects like `Object` objects', function(assert) {
+ assert.expect(4);
+
+ var args = (function() { return arguments; }(1, 2, 3)),
+ object = { '0': 1, '1': 2, '2': 3 };
+
+ function Foo() {}
+ Foo.prototype = object;
+
+ assert.strictEqual(_.isEqual(args, object), true);
+ assert.strictEqual(_.isEqual(object, args), true);
+
+ assert.strictEqual(_.isEqual(args, new Foo), false);
+ assert.strictEqual(_.isEqual(new Foo, args), false);
+ });
+
+ QUnit.test('should compare array buffers', function(assert) {
+ assert.expect(2);
+
+ if (ArrayBuffer) {
+ var buffer1 = new ArrayBuffer(4),
+ buffer2 = new ArrayBuffer(8);
+
+ assert.strictEqual(_.isEqual(buffer1, buffer2), false);
+
+ buffer1 = new Int8Array([-1]).buffer;
+ buffer2 = new Uint8Array([255]).buffer;
+
+ assert.strictEqual(_.isEqual(buffer1, buffer2), true);
+ }
+ else {
+ skipAssert(assert, 2);
+ }
+ });
+
+ QUnit.test('should compare array views', function(assert) {
+ assert.expect(2);
+
+ lodashStable.times(2, function(index) {
+ var ns = index ? realm : root;
+
+ var pairs = lodashStable.map(arrayViews, function(type, viewIndex) {
+ var otherType = arrayViews[(viewIndex + 1) % arrayViews.length],
+ CtorA = ns[type] || function(n) { this.n = n; },
+ CtorB = ns[otherType] || function(n) { this.n = n; },
+ bufferA = ns[type] ? new ns.ArrayBuffer(8) : 8,
+ bufferB = ns[otherType] ? new ns.ArrayBuffer(8) : 8,
+ bufferC = ns[otherType] ? new ns.ArrayBuffer(16) : 16;
+
+ return [new CtorA(bufferA), new CtorA(bufferA), new CtorB(bufferB), new CtorB(bufferC)];
+ });
+
+ var expected = lodashStable.map(pairs, lodashStable.constant([true, false, false]));
+
+ var actual = lodashStable.map(pairs, function(pair) {
+ return [_.isEqual(pair[0], pair[1]), _.isEqual(pair[0], pair[2]), _.isEqual(pair[2], pair[3])];
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+ });
+
+ QUnit.test('should compare date objects', function(assert) {
+ assert.expect(4);
+
+ var date = new Date(2012, 4, 23);
+
+ assert.strictEqual(_.isEqual(date, new Date(2012, 4, 23)), true);
+ assert.strictEqual(_.isEqual(date, new Date(2013, 3, 25)), false);
+ assert.strictEqual(_.isEqual(date, { 'getTime': lodashStable.constant(+date) }), false);
+ assert.strictEqual(_.isEqual(new Date('a'), new Date('a')), false);
+ });
+
+ QUnit.test('should compare error objects', function(assert) {
+ assert.expect(1);
+
+ var pairs = lodashStable.map([
+ 'Error',
+ 'EvalError',
+ 'RangeError',
+ 'ReferenceError',
+ 'SyntaxError',
+ 'TypeError',
+ 'URIError'
+ ], function(type, index, errorTypes) {
+ var otherType = errorTypes[++index % errorTypes.length],
+ CtorA = root[type],
+ CtorB = root[otherType];
+
+ return [new CtorA('a'), new CtorA('a'), new CtorB('a'), new CtorB('b')];
+ });
+
+ var expected = lodashStable.map(pairs, lodashStable.constant([true, false, false]));
+
+ var actual = lodashStable.map(pairs, function(pair) {
+ return [_.isEqual(pair[0], pair[1]), _.isEqual(pair[0], pair[2]), _.isEqual(pair[2], pair[3])];
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('should compare functions', function(assert) {
+ assert.expect(2);
+
+ function a() { return 1 + 2; }
+ function b() { return 1 + 2; }
+
+ assert.strictEqual(_.isEqual(a, a), true);
+ assert.strictEqual(_.isEqual(a, b), false);
+ });
+
+ QUnit.test('should compare maps', function(assert) {
+ assert.expect(8);
+
+ if (Map) {
+ lodashStable.each([[map, new Map], [map, realm.map]], function(maps) {
+ var map1 = maps[0],
+ map2 = maps[1];
+
+ map1.set('a', 1);
+ map2.set('b', 2);
+ assert.strictEqual(_.isEqual(map1, map2), false);
+
+ map1.set('b', 2);
+ map2.set('a', 1);
+ assert.strictEqual(_.isEqual(map1, map2), true);
+
+ map1['delete']('a');
+ map1.set('a', 1);
+ assert.strictEqual(_.isEqual(map1, map2), true);
+
+ map2['delete']('a');
+ assert.strictEqual(_.isEqual(map1, map2), false);
+
+ map1.clear();
+ map2.clear();
+ });
+ }
+ else {
+ skipAssert(assert, 8);
+ }
+ });
+
+ QUnit.test('should compare maps with circular references', function(assert) {
+ assert.expect(2);
+
+ if (Map) {
+ var map1 = new Map,
+ map2 = new Map;
+
+ map1.set('a', map1);
+ map2.set('a', map2);
+ assert.strictEqual(_.isEqual(map1, map2), true);
+
+ map1.set('b', 1);
+ map2.set('b', 2);
+ assert.strictEqual(_.isEqual(map1, map2), false);
+ }
+ else {
+ skipAssert(assert, 2);
+ }
+ });
+
+ QUnit.test('should compare promises by reference', function(assert) {
+ assert.expect(4);
+
+ if (promise) {
+ lodashStable.each([[promise, Promise.resolve(1)], [promise, realm.promise]], function(promises) {
+ var promise1 = promises[0],
+ promise2 = promises[1];
+
+ assert.strictEqual(_.isEqual(promise1, promise2), false);
+ assert.strictEqual(_.isEqual(promise1, promise1), true);
+ });
+ }
+ else {
+ skipAssert(assert, 4);
+ }
+ });
+
+ QUnit.test('should compare regexes', function(assert) {
+ assert.expect(5);
+
+ assert.strictEqual(_.isEqual(/x/gim, /x/gim), true);
+ assert.strictEqual(_.isEqual(/x/gim, /x/mgi), true);
+ assert.strictEqual(_.isEqual(/x/gi, /x/g), false);
+ assert.strictEqual(_.isEqual(/x/, /y/), false);
+ assert.strictEqual(_.isEqual(/x/g, { 'global': true, 'ignoreCase': false, 'multiline': false, 'source': 'x' }), false);
+ });
+
+ QUnit.test('should compare sets', function(assert) {
+ assert.expect(8);
+
+ if (Set) {
+ lodashStable.each([[set, new Set], [set, realm.set]], function(sets) {
+ var set1 = sets[0],
+ set2 = sets[1];
+
+ set1.add(1);
+ set2.add(2);
+ assert.strictEqual(_.isEqual(set1, set2), false);
+
+ set1.add(2);
+ set2.add(1);
+ assert.strictEqual(_.isEqual(set1, set2), true);
+
+ set1['delete'](1);
+ set1.add(1);
+ assert.strictEqual(_.isEqual(set1, set2), true);
+
+ set2['delete'](1);
+ assert.strictEqual(_.isEqual(set1, set2), false);
+
+ set1.clear();
+ set2.clear();
+ });
+ }
+ else {
+ skipAssert(assert, 8);
+ }
+ });
+
+ QUnit.test('should compare sets with circular references', function(assert) {
+ assert.expect(2);
+
+ if (Set) {
+ var set1 = new Set,
+ set2 = new Set;
+
+ set1.add(set1);
+ set2.add(set2);
+ assert.strictEqual(_.isEqual(set1, set2), true);
+
+ set1.add(1);
+ set2.add(2);
+ assert.strictEqual(_.isEqual(set1, set2), false);
+ }
+ else {
+ skipAssert(assert, 2);
+ }
+ });
+
+ QUnit.test('should work as an iteratee for `_.every`', function(assert) {
+ assert.expect(1);
+
+ var actual = lodashStable.every([1, 1, 1], lodashStable.partial(_.isEqual, 1));
+ assert.ok(actual);
+ });
+
+ QUnit.test('should return `true` for like-objects from different documents', function(assert) {
+ assert.expect(4);
+
+ if (realm.object) {
+ assert.strictEqual(_.isEqual([1], realm.array), true);
+ assert.strictEqual(_.isEqual([2], realm.array), false);
+ assert.strictEqual(_.isEqual({ 'a': 1 }, realm.object), true);
+ assert.strictEqual(_.isEqual({ 'a': 2 }, realm.object), false);
+ }
+ else {
+ skipAssert(assert, 4);
+ }
+ });
+
+ QUnit.test('should not error on DOM elements', function(assert) {
+ assert.expect(1);
+
+ if (document) {
+ var element1 = document.createElement('div'),
+ element2 = element1.cloneNode(true);
+
+ try {
+ assert.strictEqual(_.isEqual(element1, element2), false);
+ } catch (e) {
+ assert.ok(false, e.message);
+ }
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+
+ QUnit.test('should compare wrapped values', function(assert) {
+ assert.expect(32);
+
+ var stamp = +new Date;
+
+ var values = [
+ [[1, 2], [1, 2], [1, 2, 3]],
+ [true, true, false],
+ [new Date(stamp), new Date(stamp), new Date(stamp - 100)],
+ [{ 'a': 1, 'b': 2 }, { 'a': 1, 'b': 2 }, { 'a': 1, 'b': 1 }],
+ [1, 1, 2],
+ [NaN, NaN, Infinity],
+ [/x/, /x/, /x/i],
+ ['a', 'a', 'A']
+ ];
+
+ lodashStable.each(values, function(vals) {
+ if (!isNpm) {
+ var wrapped1 = _(vals[0]),
+ wrapped2 = _(vals[1]),
+ actual = wrapped1.isEqual(wrapped2);
+
+ assert.strictEqual(actual, true);
+ assert.strictEqual(_.isEqual(_(actual), _(true)), true);
+
+ wrapped1 = _(vals[0]);
+ wrapped2 = _(vals[2]);
+
+ actual = wrapped1.isEqual(wrapped2);
+ assert.strictEqual(actual, false);
+ assert.strictEqual(_.isEqual(_(actual), _(false)), true);
+ }
+ else {
+ skipAssert(assert, 4);
+ }
+ });
+ });
+
+ QUnit.test('should compare wrapped and non-wrapped values', function(assert) {
+ assert.expect(4);
+
+ if (!isNpm) {
+ var object1 = _({ 'a': 1, 'b': 2 }),
+ object2 = { 'a': 1, 'b': 2 };
+
+ assert.strictEqual(object1.isEqual(object2), true);
+ assert.strictEqual(_.isEqual(object1, object2), true);
+
+ object1 = _({ 'a': 1, 'b': 2 });
+ object2 = { 'a': 1, 'b': 1 };
+
+ assert.strictEqual(object1.isEqual(object2), false);
+ assert.strictEqual(_.isEqual(object1, object2), false);
+ }
+ else {
+ skipAssert(assert, 4);
+ }
+ });
+
+ QUnit.test('should return an unwrapped value when implicitly chaining', function(assert) {
+ assert.expect(1);
+
+ if (!isNpm) {
+ assert.strictEqual(_('a').isEqual('a'), true);
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+
+ QUnit.test('should return a wrapped value when explicitly chaining', function(assert) {
+ assert.expect(1);
+
+ if (!isNpm) {
+ assert.ok(_('a').chain().isEqual('a') instanceof _);
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.isEqualWith');
+
+ (function() {
+ QUnit.test('should provide the correct `customizer` arguments', function(assert) {
+ assert.expect(1);
+
+ var argsList = [],
+ object1 = { 'a': [1, 2], 'b': null },
+ object2 = { 'a': [1, 2], 'b': null };
+
+ object1.b = object2;
+ object2.b = object1;
+
+ var expected = [
+ [object1, object2],
+ [object1.a, object2.a, 'a', object1, object2],
+ [object1.a[0], object2.a[0], 0, object1.a, object2.a],
+ [object1.a[1], object2.a[1], 1, object1.a, object2.a],
+ [object1.b, object2.b, 'b', object1.b, object2.b],
+ [object1.b.a, object2.b.a, 'a', object1.b, object2.b],
+ [object1.b.a[0], object2.b.a[0], 0, object1.b.a, object2.b.a],
+ [object1.b.a[1], object2.b.a[1], 1, object1.b.a, object2.b.a],
+ [object1.b.b, object2.b.b, 'b', object1.b.b, object2.b.b]
+ ];
+
+ _.isEqualWith(object1, object2, function(assert) {
+ var length = arguments.length,
+ args = slice.call(arguments, 0, length - (length > 2 ? 1 : 0));
+
+ argsList.push(args);
+ });
+
+ assert.deepEqual(argsList, expected);
+ });
+
+ QUnit.test('should handle comparisons if `customizer` returns `undefined`', function(assert) {
+ assert.expect(3);
+
+ assert.strictEqual(_.isEqualWith('a', 'a', noop), true);
+ assert.strictEqual(_.isEqualWith(['a'], ['a'], noop), true);
+ assert.strictEqual(_.isEqualWith({ '0': 'a' }, { '0': 'a' }, noop), true);
+ });
+
+ QUnit.test('should not handle comparisons if `customizer` returns `true`', function(assert) {
+ assert.expect(3);
+
+ var customizer = function(value) {
+ return _.isString(value) || undefined;
+ };
+
+ assert.strictEqual(_.isEqualWith('a', 'b', customizer), true);
+ assert.strictEqual(_.isEqualWith(['a'], ['b'], customizer), true);
+ assert.strictEqual(_.isEqualWith({ '0': 'a' }, { '0': 'b' }, customizer), true);
+ });
+
+ QUnit.test('should not handle comparisons if `customizer` returns `false`', function(assert) {
+ assert.expect(3);
+
+ var customizer = function(value) {
+ return _.isString(value) ? false : undefined;
+ };
+
+ assert.strictEqual(_.isEqualWith('a', 'a', customizer), false);
+ assert.strictEqual(_.isEqualWith(['a'], ['a'], customizer), false);
+ assert.strictEqual(_.isEqualWith({ '0': 'a' }, { '0': 'a' }, customizer), false);
+ });
+
+ QUnit.test('should return a boolean value even if `customizer` does not', function(assert) {
+ assert.expect(2);
+
+ var actual = _.isEqualWith('a', 'b', alwaysC);
+ assert.strictEqual(actual, true);
+
+ var values = _.without(falsey, undefined),
+ expected = lodashStable.map(values, alwaysFalse);
+
+ actual = [];
+ lodashStable.each(values, function(value) {
+ actual.push(_.isEqualWith('a', 'a', lodashStable.constant(value)));
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('should ensure `customizer` is a function', function(assert) {
+ assert.expect(1);
+
+ var array = [1, 2, 3],
+ eq = _.partial(_.isEqualWith, array),
+ actual = lodashStable.map([array, [1, 0, 3]], eq);
+
+ assert.deepEqual(actual, [true, false]);
+ });
+
+ QUnit.test('should call `customizer` for values maps and sets', function(assert) {
+ assert.expect(2);
+
+ var value = { 'a': { 'b': 2 } };
+
+ if (Map) {
+ var map1 = new Map;
+ map1.set('a', value);
+
+ var map2 = new Map;
+ map2.set('a', value);
+ }
+ if (Set) {
+ var set1 = new Set;
+ set1.add(value);
+
+ var set2 = new Set;
+ set2.add(value);
+ }
+ lodashStable.each([[map1, map2], [set1, set2]], function(pair, index) {
+ if (pair[0]) {
+ var argsList = [],
+ array = _.toArray(pair[0]);
+
+ var expected = [
+ [pair[0], pair[1]],
+ [array[0], array[0], 0, array, array],
+ [array[0][0], array[0][0], 0, array[0], array[0]],
+ [array[0][1], array[0][1], 1, array[0], array[0]]
+ ];
+
+ if (index) {
+ expected.length = 2;
+ }
+ _.isEqualWith(pair[0], pair[1], function() {
+ var length = arguments.length,
+ args = slice.call(arguments, 0, length - (length > 2 ? 1 : 0));
+
+ argsList.push(args);
+ });
+
+ assert.deepEqual(argsList, expected, index ? 'Set' : 'Map');
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.isError');
+
+ (function() {
+ var args = arguments;
+
+ QUnit.test('should return `true` for error objects', function(assert) {
+ assert.expect(1);
+
+ var expected = lodashStable.map(errors, alwaysTrue);
+
+ var actual = lodashStable.map(errors, function(error) {
+ return _.isError(error) === true;
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('should return `true` for subclassed values', function(assert) {
+ assert.expect(1);
+
+ assert.strictEqual(_.isError(new CustomError('x')), true);
+ });
+
+ QUnit.test('should return `false` for non error objects', function(assert) {
+ assert.expect(12);
+
+ var expected = lodashStable.map(falsey, alwaysFalse);
+
+ var actual = lodashStable.map(falsey, function(value, index) {
+ return index ? _.isError(value) : _.isError();
+ });
+
+ assert.deepEqual(actual, expected);
+
+ assert.strictEqual(_.isError(args), false);
+ assert.strictEqual(_.isError([1, 2, 3]), false);
+ assert.strictEqual(_.isError(true), false);
+ assert.strictEqual(_.isError(new Date), false);
+ assert.strictEqual(_.isError(_), false);
+ assert.strictEqual(_.isError(slice), false);
+ assert.strictEqual(_.isError({ 'a': 1 }), false);
+ assert.strictEqual(_.isError(1), false);
+ assert.strictEqual(_.isError(/x/), false);
+ assert.strictEqual(_.isError('a'), false);
+ assert.strictEqual(_.isError(symbol), false);
+ });
+
+ QUnit.test('should work with an error object from another realm', function(assert) {
+ assert.expect(1);
+
+ if (realm.errors) {
+ var expected = lodashStable.map(realm.errors, alwaysTrue);
+
+ var actual = lodashStable.map(realm.errors, function(error) {
+ return _.isError(error) === true;
+ });
+
+ assert.deepEqual(actual, expected);
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+ }(1, 2, 3));
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.isFinite');
+
+ (function() {
+ var args = arguments;
+
+ QUnit.test('should return `true` for finite values', function(assert) {
+ assert.expect(1);
+
+ var values = [0, 1, 3.14, -1],
+ expected = lodashStable.map(values, alwaysTrue),
+ actual = lodashStable.map(values, _.isFinite);
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('should return `false` for non-finite values', function(assert) {
+ assert.expect(1);
+
+ var values = [NaN, Infinity, -Infinity, Object(1)],
+ expected = lodashStable.map(values, alwaysFalse),
+ actual = lodashStable.map(values, _.isFinite);
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('should return `false` for non-numeric values', function(assert) {
+ assert.expect(10);
+
+ var values = [undefined, [], true, '', ' ', '2px'],
+ expected = lodashStable.map(values, alwaysFalse),
+ actual = lodashStable.map(values, _.isFinite);
+
+ assert.deepEqual(actual, expected);
+
+ assert.strictEqual(_.isFinite(args), false);
+ assert.strictEqual(_.isFinite([1, 2, 3]), false);
+ assert.strictEqual(_.isFinite(true), false);
+ assert.strictEqual(_.isFinite(new Date), false);
+ assert.strictEqual(_.isFinite(new Error), false);
+ assert.strictEqual(_.isFinite({ 'a': 1 }), false);
+ assert.strictEqual(_.isFinite(/x/), false);
+ assert.strictEqual(_.isFinite('a'), false);
+ assert.strictEqual(_.isFinite(symbol), false);
+ });
+
+ QUnit.test('should return `false` for numeric string values', function(assert) {
+ assert.expect(1);
+
+ var values = ['2', '0', '08'],
+ expected = lodashStable.map(values, alwaysFalse),
+ actual = lodashStable.map(values, _.isFinite);
+
+ assert.deepEqual(actual, expected);
+ });
+ }(1, 2, 3));
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.isFunction');
+
+ (function() {
+ var args = arguments;
+
+ QUnit.test('should return `true` for functions', function(assert) {
+ assert.expect(2);
+
+ assert.strictEqual(_.isFunction(_), true);
+ assert.strictEqual(_.isFunction(slice), true);
+ });
+
+ QUnit.test('should return `true` for generator functions', function(assert) {
+ assert.expect(1);
+
+ assert.strictEqual(_.isFunction(generator), typeof generator == 'function');
+ });
+
+ QUnit.test('should return `true` for array view constructors', function(assert) {
+ assert.expect(1);
+
+ var expected = lodashStable.map(arrayViews, function(type) {
+ return objToString.call(root[type]) == funcTag;
+ });
+
+ var actual = lodashStable.map(arrayViews, function(type) {
+ return _.isFunction(root[type]);
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('should return `false` for non-functions', function(assert) {
+ assert.expect(12);
+
+ var expected = lodashStable.map(falsey, alwaysFalse);
+
+ var actual = lodashStable.map(falsey, function(value, index) {
+ return index ? _.isFunction(value) : _.isFunction();
+ });
+
+ assert.deepEqual(actual, expected);
+
+ assert.strictEqual(_.isFunction(args), false);
+ assert.strictEqual(_.isFunction([1, 2, 3]), false);
+ assert.strictEqual(_.isFunction(true), false);
+ assert.strictEqual(_.isFunction(new Date), false);
+ assert.strictEqual(_.isFunction(new Error), false);
+ assert.strictEqual(_.isFunction({ 'a': 1 }), false);
+ assert.strictEqual(_.isFunction(1), false);
+ assert.strictEqual(_.isFunction(/x/), false);
+ assert.strictEqual(_.isFunction('a'), false);
+ assert.strictEqual(_.isFunction(symbol), false);
+
+ if (document) {
+ assert.strictEqual(_.isFunction(document.getElementsByTagName('body')), false);
+ } else {
+ skipAssert(assert);
+ }
+ });
+
+ QUnit.test('should work with host objects in IE 8 document mode (test in IE 11)', function(assert) {
+ assert.expect(2);
+
+ // Trigger a Chakra JIT bug.
+ // See https://github.com/jashkenas/underscore/issues/1621.
+ lodashStable.each([body, xml], function(object) {
+ if (object) {
+ lodashStable.times(100, _.isFunction);
+ assert.strictEqual(_.isFunction(object), false);
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+ });
+
+ QUnit.test('should work with a function from another realm', function(assert) {
+ assert.expect(1);
+
+ if (realm.function) {
+ assert.strictEqual(_.isFunction(realm.function), true);
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+ }(1, 2, 3));
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('isInteger methods');
+
+ lodashStable.each(['isInteger', 'isSafeInteger'], function(methodName) {
+ var args = arguments,
+ func = _[methodName],
+ isSafe = methodName == 'isSafeInteger';
+
+ QUnit.test('`_.' + methodName + '` should return `true` for integer values', function(assert) {
+ assert.expect(2);
+
+ var values = [-1, 0, 1],
+ expected = lodashStable.map(values, alwaysTrue);
+
+ var actual = lodashStable.map(values, function(value) {
+ return func(value);
+ });
+
+ assert.deepEqual(actual, expected);
+ assert.strictEqual(func(MAX_INTEGER), !isSafe);
+ });
+
+ QUnit.test('should return `false` for non-integer number values', function(assert) {
+ assert.expect(1);
+
+ var values = [NaN, Infinity, -Infinity, Object(1), 3.14],
+ expected = lodashStable.map(values, alwaysFalse);
+
+ var actual = lodashStable.map(values, function(value) {
+ return func(value);
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('should return `false` for non-numeric values', function(assert) {
+ assert.expect(10);
+
+ var expected = lodashStable.map(falsey, function(value) {
+ return value === 0;
+ });
+
+ var actual = lodashStable.map(falsey, function(value, index) {
+ return index ? func(value) : func();
+ });
+
+ assert.deepEqual(actual, expected);
+
+ assert.strictEqual(func(args), false);
+ assert.strictEqual(func([1, 2, 3]), false);
+ assert.strictEqual(func(true), false);
+ assert.strictEqual(func(new Date), false);
+ assert.strictEqual(func(new Error), false);
+ assert.strictEqual(func({ 'a': 1 }), false);
+ assert.strictEqual(func(/x/), false);
+ assert.strictEqual(func('a'), false);
+ assert.strictEqual(func(symbol), false);
+ });
+ });
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.isLength');
+
+ (function() {
+ QUnit.test('should return `true` for lengths', function(assert) {
+ assert.expect(1);
+
+ var values = [0, 3, MAX_SAFE_INTEGER],
+ expected = lodashStable.map(values, alwaysTrue),
+ actual = lodashStable.map(values, _.isLength);
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('should return `false` for non-lengths', function(assert) {
+ assert.expect(1);
+
+ var values = [-1, '1', 1.1, MAX_SAFE_INTEGER + 1],
+ expected = lodashStable.map(values, alwaysFalse),
+ actual = lodashStable.map(values, _.isLength);
+
+ assert.deepEqual(actual, expected);
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.isMap');
+
+ (function() {
+ var args = arguments;
+
+ QUnit.test('should return `true` for maps', function(assert) {
+ assert.expect(1);
+
+ if (Map) {
+ assert.strictEqual(_.isMap(map), true);
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+
+ QUnit.test('should return `false` for non-maps', function(assert) {
+ assert.expect(14);
+
+ var expected = lodashStable.map(falsey, alwaysFalse);
+
+ var actual = lodashStable.map(falsey, function(value, index) {
+ return index ? _.isMap(value) : _.isMap();
+ });
+
+ assert.deepEqual(actual, expected);
+
+ assert.strictEqual(_.isMap(args), false);
+ assert.strictEqual(_.isMap([1, 2, 3]), false);
+ assert.strictEqual(_.isMap(true), false);
+ assert.strictEqual(_.isMap(new Date), false);
+ assert.strictEqual(_.isMap(new Error), false);
+ assert.strictEqual(_.isMap(_), false);
+ assert.strictEqual(_.isMap(slice), false);
+ assert.strictEqual(_.isMap({ 'a': 1 }), false);
+ assert.strictEqual(_.isMap(1), false);
+ assert.strictEqual(_.isMap(/x/), false);
+ assert.strictEqual(_.isMap('a'), false);
+ assert.strictEqual(_.isMap(symbol), false);
+ assert.strictEqual(_.isMap(weakMap), false);
+ });
+
+ QUnit.test('should work for objects with a non-function `constructor` (test in IE 11)', function(assert) {
+ assert.expect(1);
+
+ var values = [false, true],
+ expected = lodashStable.map(values, alwaysFalse);
+
+ var actual = lodashStable.map(values, function(value) {
+ return _.isMap({ 'constructor': value });
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('should work with maps from another realm', function(assert) {
+ assert.expect(1);
+
+ if (realm.map) {
+ assert.strictEqual(_.isMap(realm.map), true);
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+ }(1, 2, 3));
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.isMatch');
+
+ (function() {
+ QUnit.test('should perform a deep comparison between `object` and `source`', function(assert) {
+ assert.expect(5);
+
+ var object = { 'a': 1, 'b': 2, 'c': 3 };
+ assert.strictEqual(_.isMatch(object, { 'a': 1 }), true);
+ assert.strictEqual(_.isMatch(object, { 'b': 1 }), false);
+ assert.strictEqual(_.isMatch(object, { 'a': 1, 'c': 3 }), true);
+ assert.strictEqual(_.isMatch(object, { 'c': 3, 'd': 4 }), false);
+
+ object = { 'a': { 'b': { 'c': 1, 'd': 2 }, 'e': 3 }, 'f': 4 };
+ assert.strictEqual(_.isMatch(object, { 'a': { 'b': { 'c': 1 } } }), true);
+ });
+
+ QUnit.test('should match inherited string keyed `object` properties', function(assert) {
+ assert.expect(1);
+
+ function Foo() {
+ this.a = 1;
+ }
+ Foo.prototype.b = 2;
+
+ assert.strictEqual(_.isMatch({ 'a': new Foo }, { 'a': { 'b': 2 } }), true);
+ });
+
+ QUnit.test('should not match by inherited `source` properties', function(assert) {
+ assert.expect(1);
+
+ function Foo() {
+ this.a = 1;
+ }
+ Foo.prototype.b = 2;
+
+ var objects = [{ 'a': 1 }, { 'a': 1, 'b': 2 }],
+ source = new Foo,
+ expected = lodashStable.map(objects, alwaysTrue);
+
+ var actual = lodashStable.map(objects, function(object) {
+ return _.isMatch(object, source);
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('should compare a variety of `source` property values', function(assert) {
+ assert.expect(2);
+
+ var object1 = { 'a': false, 'b': true, 'c': '3', 'd': 4, 'e': [5], 'f': { 'g': 6 } },
+ object2 = { 'a': 0, 'b': 1, 'c': 3, 'd': '4', 'e': ['5'], 'f': { 'g': '6' } };
+
+ assert.strictEqual(_.isMatch(object1, object1), true);
+ assert.strictEqual(_.isMatch(object1, object2), false);
+ });
+
+ QUnit.test('should match `-0` as `0`', function(assert) {
+ assert.expect(2);
+
+ var object1 = { 'a': -0 },
+ object2 = { 'a': 0 };
+
+ assert.strictEqual(_.isMatch(object1, object2), true);
+ assert.strictEqual(_.isMatch(object2, object1), true);
+ });
+
+ QUnit.test('should compare functions by reference', function(assert) {
+ assert.expect(3);
+
+ var object1 = { 'a': lodashStable.noop },
+ object2 = { 'a': noop },
+ object3 = { 'a': {} };
+
+ assert.strictEqual(_.isMatch(object1, object1), true);
+ assert.strictEqual(_.isMatch(object2, object1), false);
+ assert.strictEqual(_.isMatch(object3, object1), false);
+ });
+
+ QUnit.test('should work with a function for `object`', function(assert) {
+ assert.expect(1);
+
+ function Foo() {}
+ Foo.a = { 'b': 1, 'c': 2 };
+
+ assert.strictEqual(_.isMatch(Foo, { 'a': { 'b': 1 } }), true);
+ });
+
+ QUnit.test('should work with a function for `source`', function(assert) {
+ assert.expect(1);
+
+ function Foo() {}
+ Foo.a = 1;
+ Foo.b = function() {};
+ Foo.c = 3;
+
+ var objects = [{ 'a': 1 }, { 'a': 1, 'b': Foo.b, 'c': 3 }];
+
+ var actual = lodashStable.map(objects, function(object) {
+ return _.isMatch(object, Foo);
+ });
+
+ assert.deepEqual(actual, [false, true]);
+ });
+
+ QUnit.test('should work with a non-plain `object`', function(assert) {
+ assert.expect(1);
+
+ function Foo(object) { lodashStable.assign(this, object); }
+
+ var object = new Foo({ 'a': new Foo({ 'b': 1, 'c': 2 }) });
+ assert.strictEqual(_.isMatch(object, { 'a': { 'b': 1 } }), true);
+ });
+
+ QUnit.test('should partial match arrays', function(assert) {
+ assert.expect(3);
+
+ var objects = [{ 'a': ['b'] }, { 'a': ['c', 'd'] }],
+ source = { 'a': ['d'] },
+ predicate = function(object) { return _.isMatch(object, source); },
+ actual = lodashStable.filter(objects, predicate);
+
+ assert.deepEqual(actual, [objects[1]]);
+
+ source = { 'a': ['b', 'd'] };
+ actual = lodashStable.filter(objects, predicate);
+
+ assert.deepEqual(actual, []);
+
+ source = { 'a': ['d', 'b'] };
+ actual = lodashStable.filter(objects, predicate);
+ assert.deepEqual(actual, []);
+ });
+
+ QUnit.test('should partial match arrays of objects', function(assert) {
+ assert.expect(1);
+
+ var source = { 'a': [{ 'b': 1 }, { 'b': 4, 'c': 5 }] };
+
+ var objects = [
+ { 'a': [{ 'b': 1, 'c': 2 }, { 'b': 4, 'c': 5, 'd': 6 }] },
+ { 'a': [{ 'b': 1, 'c': 2 }, { 'b': 4, 'c': 6, 'd': 7 }] }
+ ];
+
+ var actual = lodashStable.filter(objects, function(object) {
+ return _.isMatch(object, source);
+ });
+
+ assert.deepEqual(actual, [objects[0]]);
+ });
+
+ QUnit.test('should partial match maps', function(assert) {
+ assert.expect(3);
+
+ if (Map) {
+ var objects = [{ 'a': new Map }, { 'a': new Map }];
+ objects[0].a.set('a', 1);
+ objects[1].a.set('a', 1);
+ objects[1].a.set('b', 2);
+
+ var map = new Map;
+ map.set('b', 2);
+
+ var source = { 'a': map },
+ predicate = function(object) { return _.isMatch(object, source); },
+ actual = lodashStable.filter(objects, predicate);
+
+ assert.deepEqual(actual, [objects[1]]);
+
+ map['delete']('b');
+ actual = lodashStable.filter(objects, predicate);
+
+ assert.deepEqual(actual, objects);
+
+ map.set('c', 3);
+ actual = lodashStable.filter(objects, predicate);
+
+ assert.deepEqual(actual, []);
+ }
+ else {
+ skipAssert(assert, 3);
+ }
+ });
+
+ QUnit.test('should partial match sets', function(assert) {
+ assert.expect(3);
+
+ if (Set) {
+ var objects = [{ 'a': new Set }, { 'a': new Set }];
+ objects[0].a.add(1);
+ objects[1].a.add(1);
+ objects[1].a.add(2);
+
+ var set = new Set;
+ set.add(2);
+
+ var source = { 'a': set },
+ predicate = function(object) { return _.isMatch(object, source); },
+ actual = lodashStable.filter(objects, predicate);
+
+ assert.deepEqual(actual, [objects[1]]);
+
+ set['delete'](2);
+ actual = lodashStable.filter(objects, predicate);
+
+ assert.deepEqual(actual, objects);
+
+ set.add(3);
+ actual = lodashStable.filter(objects, predicate);
+
+ assert.deepEqual(actual, []);
+ }
+ else {
+ skipAssert(assert, 3);
+ }
+ });
+
+ QUnit.test('should match `undefined` values', function(assert) {
+ assert.expect(3);
+
+ var objects = [{ 'a': 1 }, { 'a': 1, 'b': 1 }, { 'a': 1, 'b': undefined }],
+ source = { 'b': undefined },
+ predicate = function(object) { return _.isMatch(object, source); },
+ actual = lodashStable.map(objects, predicate),
+ expected = [false, false, true];
+
+ assert.deepEqual(actual, expected);
+
+ source = { 'a': 1, 'b': undefined };
+ actual = lodashStable.map(objects, predicate);
+
+ assert.deepEqual(actual, expected);
+
+ objects = [{ 'a': { 'b': 1 } }, { 'a': { 'b': 1, 'c': 1 } }, { 'a': { 'b': 1, 'c': undefined } }];
+ source = { 'a': { 'c': undefined } };
+ actual = lodashStable.map(objects, predicate);
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('should match `undefined` values on primitives', function(assert) {
+ assert.expect(3);
+
+ numberProto.a = 1;
+ numberProto.b = undefined;
+
+ try {
+ assert.strictEqual(_.isMatch(1, { 'b': undefined }), true);
+ } catch (e) {
+ assert.ok(false, e.message);
+ }
+ try {
+ assert.strictEqual(_.isMatch(1, { 'a': 1, 'b': undefined }), true);
+ } catch (e) {
+ assert.ok(false, e.message);
+ }
+ numberProto.a = { 'b': 1, 'c': undefined };
+ try {
+ assert.strictEqual(_.isMatch(1, { 'a': { 'c': undefined } }), true);
+ } catch (e) {
+ assert.ok(false, e.message);
+ }
+ delete numberProto.a;
+ delete numberProto.b;
+ });
+
+ QUnit.test('should return `false` when `object` is nullish', function(assert) {
+ assert.expect(1);
+
+ var values = [null, undefined],
+ expected = lodashStable.map(values, alwaysFalse),
+ source = { 'a': 1 };
+
+ var actual = lodashStable.map(values, function(value) {
+ try {
+ return _.isMatch(value, source);
+ } catch (e) {}
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('should return `true` when comparing an empty `source` to a nullish `object`', function(assert) {
+ assert.expect(1);
+
+ var values = [null, undefined],
+ expected = lodashStable.map(values, alwaysTrue),
+ source = {};
+
+ var actual = lodashStable.map(values, function(value) {
+ try {
+ return _.isMatch(value, source);
+ } catch (e) {}
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('should return `true` when comparing an empty `source`', function(assert) {
+ assert.expect(1);
+
+ var object = { 'a': 1 },
+ expected = lodashStable.map(empties, alwaysTrue);
+
+ var actual = lodashStable.map(empties, function(value) {
+ return _.isMatch(object, value);
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('should return `true` when comparing a `source` of empty arrays and objects', function(assert) {
+ assert.expect(1);
+
+ var objects = [{ 'a': [1], 'b': { 'c': 1 } }, { 'a': [2, 3], 'b': { 'd': 2 } }],
+ source = { 'a': [], 'b': {} };
+
+ var actual = lodashStable.filter(objects, function(object) {
+ return _.isMatch(object, source);
+ });
+
+ assert.deepEqual(actual, objects);
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.isMatchWith');
+
+ (function() {
+ QUnit.test('should provide the correct `customizer` arguments', function(assert) {
+ assert.expect(1);
+
+ var argsList = [],
+ object1 = { 'a': [1, 2], 'b': null },
+ object2 = { 'a': [1, 2], 'b': null };
+
+ object1.b = object2;
+ object2.b = object1;
+
+ var expected = [
+ [object1.a, object2.a, 'a', object1, object2],
+ [object1.a[0], object2.a[0], 0, object1.a, object2.a],
+ [object1.a[1], object2.a[1], 1, object1.a, object2.a],
+ [object1.b, object2.b, 'b', object1, object2],
+ [object1.b.a, object2.b.a, 'a', object1.b, object2.b],
+ [object1.b.a[0], object2.b.a[0], 0, object1.b.a, object2.b.a],
+ [object1.b.a[1], object2.b.a[1], 1, object1.b.a, object2.b.a],
+ [object1.b.b, object2.b.b, 'b', object1.b, object2.b],
+ [object1.b.b.a, object2.b.b.a, 'a', object1.b.b, object2.b.b],
+ [object1.b.b.a[0], object2.b.b.a[0], 0, object1.b.b.a, object2.b.b.a],
+ [object1.b.b.a[1], object2.b.b.a[1], 1, object1.b.b.a, object2.b.b.a],
+ [object1.b.b.b, object2.b.b.b, 'b', object1.b.b, object2.b.b]
+ ];
+
+ _.isMatchWith(object1, object2, function(assert) {
+ argsList.push(slice.call(arguments, 0, -1));
+ });
+
+ assert.deepEqual(argsList, expected);
+ });
+
+ QUnit.test('should handle comparisons if `customizer` returns `undefined`', function(assert) {
+ assert.expect(1);
+
+ assert.strictEqual(_.isMatchWith({ 'a': 1 }, { 'a': 1 }, noop), true);
+ });
+
+ QUnit.test('should not handle comparisons if `customizer` returns `true`', function(assert) {
+ assert.expect(2);
+
+ var customizer = function(value) {
+ return _.isString(value) || undefined;
+ };
+
+ assert.strictEqual(_.isMatchWith(['a'], ['b'], customizer), true);
+ assert.strictEqual(_.isMatchWith({ '0': 'a' }, { '0': 'b' }, customizer), true);
+ });
+
+ QUnit.test('should not handle comparisons if `customizer` returns `false`', function(assert) {
+ assert.expect(2);
+
+ var customizer = function(value) {
+ return _.isString(value) ? false : undefined;
+ };
+
+ assert.strictEqual(_.isMatchWith(['a'], ['a'], customizer), false);
+ assert.strictEqual(_.isMatchWith({ '0': 'a' }, { '0': 'a' }, customizer), false);
+ });
+
+ QUnit.test('should return a boolean value even if `customizer` does not', function(assert) {
+ assert.expect(2);
+
+ var object = { 'a': 1 },
+ actual = _.isMatchWith(object, { 'a': 1 }, alwaysA);
+
+ assert.strictEqual(actual, true);
+
+ var expected = lodashStable.map(falsey, alwaysFalse);
+
+ actual = [];
+ lodashStable.each(falsey, function(value) {
+ actual.push(_.isMatchWith(object, { 'a': 2 }, lodashStable.constant(value)));
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('should ensure `customizer` is a function', function(assert) {
+ assert.expect(1);
+
+ var object = { 'a': 1 },
+ matches = _.partial(_.isMatchWith, object),
+ actual = lodashStable.map([object, { 'a': 2 }], matches);
+
+ assert.deepEqual(actual, [true, false]);
+ });
+
+ QUnit.test('should call `customizer` for values maps and sets', function(assert) {
+ assert.expect(2);
+
+ var value = { 'a': { 'b': 2 } };
+
+ if (Map) {
+ var map1 = new Map;
+ map1.set('a', value);
+
+ var map2 = new Map;
+ map2.set('a', value);
+ }
+ if (Set) {
+ var set1 = new Set;
+ set1.add(value);
+
+ var set2 = new Set;
+ set2.add(value);
+ }
+ lodashStable.each([[map1, map2], [set1, set2]], function(pair, index) {
+ if (pair[0]) {
+ var argsList = [],
+ array = _.toArray(pair[0]),
+ object1 = { 'a': pair[0] },
+ object2 = { 'a': pair[1] };
+
+ var expected = [
+ [pair[0], pair[1], 'a', object1, object2],
+ [array[0], array[0], 0, array, array],
+ [array[0][0], array[0][0], 0, array[0], array[0]],
+ [array[0][1], array[0][1], 1, array[0], array[0]]
+ ];
+
+ if (index) {
+ expected.length = 2;
+ }
+ _.isMatchWith({ 'a': pair[0] }, { 'a': pair[1] }, function() {
+ argsList.push(slice.call(arguments, 0, -1));
+ });
+
+ assert.deepEqual(argsList, expected, index ? 'Set' : 'Map');
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.isNaN');
+
+ (function() {
+ var args = arguments;
+
+ QUnit.test('should return `true` for NaNs', function(assert) {
+ assert.expect(2);
+
+ assert.strictEqual(_.isNaN(NaN), true);
+ assert.strictEqual(_.isNaN(Object(NaN)), true);
+ });
+
+ QUnit.test('should return `false` for non-NaNs', function(assert) {
+ assert.expect(14);
+
+ var expected = lodashStable.map(falsey, function(value) {
+ return value !== value;
+ });
+
+ var actual = lodashStable.map(falsey, function(value, index) {
+ return index ? _.isNaN(value) : _.isNaN();
+ });
+
+ assert.deepEqual(actual, expected);
+
+ assert.strictEqual(_.isNaN(args), false);
+ assert.strictEqual(_.isNaN([1, 2, 3]), false);
+ assert.strictEqual(_.isNaN(true), false);
+ assert.strictEqual(_.isNaN(new Date), false);
+ assert.strictEqual(_.isNaN(new Error), false);
+ assert.strictEqual(_.isNaN(_), false);
+ assert.strictEqual(_.isNaN(slice), false);
+ assert.strictEqual(_.isNaN({ 'a': 1 }), false);
+ assert.strictEqual(_.isNaN(1), false);
+ assert.strictEqual(_.isNaN(Object(1)), false);
+ assert.strictEqual(_.isNaN(/x/), false);
+ assert.strictEqual(_.isNaN('a'), false);
+ assert.strictEqual(_.isNaN(symbol), false);
+ });
+
+ QUnit.test('should work with `NaN` from another realm', function(assert) {
+ assert.expect(1);
+
+ if (realm.object) {
+ assert.strictEqual(_.isNaN(realm.nan), true);
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+ }(1, 2, 3));
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.isNative');
+
+ (function() {
+ var args = arguments;
+
+ QUnit.test('should return `true` for native methods', function(assert) {
+ assert.expect(1);
+
+ var values = [Array, body && body.cloneNode, create, root.encodeURI, Promise, slice, Uint8Array],
+ expected = lodashStable.map(values, Boolean),
+ actual = lodashStable.map(values, _.isNative);
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('should return `false` for non-native methods', function(assert) {
+ assert.expect(12);
+
+ var expected = lodashStable.map(falsey, alwaysFalse);
+
+ var actual = lodashStable.map(falsey, function(value, index) {
+ return index ? _.isNative(value) : _.isNative();
+ });
+
+ assert.deepEqual(actual, expected);
+
+ assert.strictEqual(_.isNative(args), false);
+ assert.strictEqual(_.isNative([1, 2, 3]), false);
+ assert.strictEqual(_.isNative(true), false);
+ assert.strictEqual(_.isNative(new Date), false);
+ assert.strictEqual(_.isNative(new Error), false);
+ assert.strictEqual(_.isNative(_), false);
+ assert.strictEqual(_.isNative({ 'a': 1 }), false);
+ assert.strictEqual(_.isNative(1), false);
+ assert.strictEqual(_.isNative(/x/), false);
+ assert.strictEqual(_.isNative('a'), false);
+ assert.strictEqual(_.isNative(symbol), false);
+ });
+
+ QUnit.test('should work with native functions from another realm', function(assert) {
+ assert.expect(2);
+
+ if (realm.element) {
+ assert.strictEqual(_.isNative(realm.element.cloneNode), true);
+ }
+ else {
+ skipAssert(assert);
+ }
+ if (realm.object) {
+ assert.strictEqual(_.isNative(realm.object.valueOf), true);
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+ }(1, 2, 3));
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.isNil');
+
+ (function() {
+ var args = arguments;
+
+ QUnit.test('should return `true` for nullish values', function(assert) {
+ assert.expect(3);
+
+ assert.strictEqual(_.isNil(null), true);
+ assert.strictEqual(_.isNil(), true);
+ assert.strictEqual(_.isNil(undefined), true);
+ });
+
+ QUnit.test('should return `false` for non-nullish values', function(assert) {
+ assert.expect(13);
+
+ var expected = lodashStable.map(falsey, function(value) {
+ return value == null;
+ });
+
+ var actual = lodashStable.map(falsey, function(value, index) {
+ return index ? _.isNil(value) : _.isNil();
+ });
+
+ assert.deepEqual(actual, expected);
+
+ assert.strictEqual(_.isNil(args), false);
+ assert.strictEqual(_.isNil([1, 2, 3]), false);
+ assert.strictEqual(_.isNil(true), false);
+ assert.strictEqual(_.isNil(new Date), false);
+ assert.strictEqual(_.isNil(new Error), false);
+ assert.strictEqual(_.isNil(_), false);
+ assert.strictEqual(_.isNil(slice), false);
+ assert.strictEqual(_.isNil({ 'a': 1 }), false);
+ assert.strictEqual(_.isNil(1), false);
+ assert.strictEqual(_.isNil(/x/), false);
+ assert.strictEqual(_.isNil('a'), false);
+
+ if (Symbol) {
+ assert.strictEqual(_.isNil(symbol), false);
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+
+ QUnit.test('should work with nulls from another realm', function(assert) {
+ assert.expect(2);
+
+ if (realm.object) {
+ assert.strictEqual(_.isNil(realm.null), true);
+ assert.strictEqual(_.isNil(realm.undefined), true);
+ }
+ else {
+ skipAssert(assert, 2);
+ }
+ });
+ }(1, 2, 3));
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.isNull');
+
+ (function() {
+ var args = arguments;
+
+ QUnit.test('should return `true` for `null` values', function(assert) {
+ assert.expect(1);
+
+ assert.strictEqual(_.isNull(null), true);
+ });
+
+ QUnit.test('should return `false` for non `null` values', function(assert) {
+ assert.expect(13);
+
+ var expected = lodashStable.map(falsey, function(value) {
+ return value === null;
+ });
+
+ var actual = lodashStable.map(falsey, function(value, index) {
+ return index ? _.isNull(value) : _.isNull();
+ });
+
+ assert.deepEqual(actual, expected);
+
+ assert.strictEqual(_.isNull(args), false);
+ assert.strictEqual(_.isNull([1, 2, 3]), false);
+ assert.strictEqual(_.isNull(true), false);
+ assert.strictEqual(_.isNull(new Date), false);
+ assert.strictEqual(_.isNull(new Error), false);
+ assert.strictEqual(_.isNull(_), false);
+ assert.strictEqual(_.isNull(slice), false);
+ assert.strictEqual(_.isNull({ 'a': 1 }), false);
+ assert.strictEqual(_.isNull(1), false);
+ assert.strictEqual(_.isNull(/x/), false);
+ assert.strictEqual(_.isNull('a'), false);
+ assert.strictEqual(_.isNull(symbol), false);
+ });
+
+ QUnit.test('should work with nulls from another realm', function(assert) {
+ assert.expect(1);
+
+ if (realm.object) {
+ assert.strictEqual(_.isNull(realm.null), true);
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+ }(1, 2, 3));
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.isNumber');
+
+ (function() {
+ var args = arguments;
+
+ QUnit.test('should return `true` for numbers', function(assert) {
+ assert.expect(3);
+
+ assert.strictEqual(_.isNumber(0), true);
+ assert.strictEqual(_.isNumber(Object(0)), true);
+ assert.strictEqual(_.isNumber(NaN), true);
+ });
+
+ QUnit.test('should return `false` for non-numbers', function(assert) {
+ assert.expect(12);
+
+ var expected = lodashStable.map(falsey, function(value) {
+ return typeof value == 'number';
+ });
+
+ var actual = lodashStable.map(falsey, function(value, index) {
+ return index ? _.isNumber(value) : _.isNumber();
+ });
+
+ assert.deepEqual(actual, expected);
+
+ assert.strictEqual(_.isNumber(args), false);
+ assert.strictEqual(_.isNumber([1, 2, 3]), false);
+ assert.strictEqual(_.isNumber(true), false);
+ assert.strictEqual(_.isNumber(new Date), false);
+ assert.strictEqual(_.isNumber(new Error), false);
+ assert.strictEqual(_.isNumber(_), false);
+ assert.strictEqual(_.isNumber(slice), false);
+ assert.strictEqual(_.isNumber({ 'a': 1 }), false);
+ assert.strictEqual(_.isNumber(/x/), false);
+ assert.strictEqual(_.isNumber('a'), false);
+ assert.strictEqual(_.isNumber(symbol), false);
+ });
+
+ QUnit.test('should work with numbers from another realm', function(assert) {
+ assert.expect(1);
+
+ if (realm.number) {
+ assert.strictEqual(_.isNumber(realm.number), true);
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+
+ QUnit.test('should avoid `[xpconnect wrapped native prototype]` in Firefox', function(assert) {
+ assert.expect(1);
+
+ assert.strictEqual(_.isNumber(+'2'), true);
+ });
+ }(1, 2, 3));
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.isObject');
+
+ (function() {
+ var args = arguments;
+
+ QUnit.test('should return `true` for objects', function(assert) {
+ assert.expect(13);
+
+ assert.strictEqual(_.isObject(args), true);
+ assert.strictEqual(_.isObject([1, 2, 3]), true);
+ assert.strictEqual(_.isObject(Object(false)), true);
+ assert.strictEqual(_.isObject(new Date), true);
+ assert.strictEqual(_.isObject(new Error), true);
+ assert.strictEqual(_.isObject(_), true);
+ assert.strictEqual(_.isObject(slice), true);
+ assert.strictEqual(_.isObject({ 'a': 1 }), true);
+ assert.strictEqual(_.isObject(Object(0)), true);
+ assert.strictEqual(_.isObject(/x/), true);
+ assert.strictEqual(_.isObject(Object('a')), true);
+
+ if (document) {
+ assert.strictEqual(_.isObject(body), true);
+ }
+ else {
+ skipAssert(assert);
+ }
+ if (Symbol) {
+ assert.strictEqual(_.isObject(Object(symbol)), true);
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+
+ QUnit.test('should return `false` for non-objects', function(assert) {
+ assert.expect(1);
+
+ var values = falsey.concat(true, 1, 'a', symbol),
+ expected = lodashStable.map(values, alwaysFalse);
+
+ var actual = lodashStable.map(values, function(value, index) {
+ return index ? _.isObject(value) : _.isObject();
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('should work with objects from another realm', function(assert) {
+ assert.expect(8);
+
+ if (realm.element) {
+ assert.strictEqual(_.isObject(realm.element), true);
+ }
+ else {
+ skipAssert(assert);
+ }
+ if (realm.object) {
+ assert.strictEqual(_.isObject(realm.boolean), true);
+ assert.strictEqual(_.isObject(realm.date), true);
+ assert.strictEqual(_.isObject(realm.function), true);
+ assert.strictEqual(_.isObject(realm.number), true);
+ assert.strictEqual(_.isObject(realm.object), true);
+ assert.strictEqual(_.isObject(realm.regexp), true);
+ assert.strictEqual(_.isObject(realm.string), true);
+ }
+ else {
+ skipAssert(assert, 7);
+ }
+ });
+
+ QUnit.test('should avoid V8 bug #2291 (test in Chrome 19-20)', function(assert) {
+ assert.expect(1);
+
+ // Trigger a V8 JIT bug.
+ // See https://code.google.com/p/v8/issues/detail?id=2291.
+ var object = {};
+
+ // First, have a comparison statement.
+ object == object;
+
+ // Then perform the check with `object`.
+ _.isObject(object);
+
+ assert.strictEqual(_.isObject('a'), false);
+ });
+ }(1, 2, 3));
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.isObjectLike');
+
+ (function() {
+ var args = arguments;
+
+ QUnit.test('should return `true` for objects', function(assert) {
+ assert.expect(9);
+
+ assert.strictEqual(_.isObjectLike(args), true);
+ assert.strictEqual(_.isObjectLike([1, 2, 3]), true);
+ assert.strictEqual(_.isObjectLike(Object(false)), true);
+ assert.strictEqual(_.isObjectLike(new Date), true);
+ assert.strictEqual(_.isObjectLike(new Error), true);
+ assert.strictEqual(_.isObjectLike({ 'a': 1 }), true);
+ assert.strictEqual(_.isObjectLike(Object(0)), true);
+ assert.strictEqual(_.isObjectLike(/x/), true);
+ assert.strictEqual(_.isObjectLike(Object('a')), true);
+ });
+
+ QUnit.test('should return `false` for non-objects', function(assert) {
+ assert.expect(1);
+
+ var values = falsey.concat(true, _, slice, 1, 'a', symbol),
+ expected = lodashStable.map(values, alwaysFalse);
+
+ var actual = lodashStable.map(values, function(value, index) {
+ return index ? _.isObjectLike(value) : _.isObjectLike();
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('should work with objects from another realm', function(assert) {
+ assert.expect(6);
+
+ if (realm.object) {
+ assert.strictEqual(_.isObjectLike(realm.boolean), true);
+ assert.strictEqual(_.isObjectLike(realm.date), true);
+ assert.strictEqual(_.isObjectLike(realm.number), true);
+ assert.strictEqual(_.isObjectLike(realm.object), true);
+ assert.strictEqual(_.isObjectLike(realm.regexp), true);
+ assert.strictEqual(_.isObjectLike(realm.string), true);
+ }
+ else {
+ skipAssert(assert, 6);
+ }
+ });
+ }(1, 2, 3));
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.isPlainObject');
+
+ (function() {
+ var element = document && document.createElement('div');
+
+ QUnit.test('should detect plain objects', function(assert) {
+ assert.expect(5);
+
+ function Foo(a) {
+ this.a = 1;
+ }
+
+ assert.strictEqual(_.isPlainObject({}), true);
+ assert.strictEqual(_.isPlainObject({ 'a': 1 }), true);
+ assert.strictEqual(_.isPlainObject({ 'constructor': Foo }), true);
+ assert.strictEqual(_.isPlainObject([1, 2, 3]), false);
+ assert.strictEqual(_.isPlainObject(new Foo(1)), false);
+ });
+
+ QUnit.test('should return `true` for objects with a `[[Prototype]]` of `null`', function(assert) {
+ assert.expect(2);
+
+ if (create) {
+ var object = create(null);
+ assert.strictEqual(_.isPlainObject(object), true);
+
+ object.constructor = objectProto.constructor;
+ assert.strictEqual(_.isPlainObject(object), true);
+ }
+ else {
+ skipAssert(assert, 2);
+ }
+ });
+
+ QUnit.test('should return `true` for plain objects with a custom `valueOf` property', function(assert) {
+ assert.expect(2);
+
+ assert.strictEqual(_.isPlainObject({ 'valueOf': 0 }), true);
+
+ if (element) {
+ var valueOf = element.valueOf;
+ element.valueOf = 0;
+
+ assert.strictEqual(_.isPlainObject(element), false);
+ element.valueOf = valueOf;
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+
+ QUnit.test('should return `false` for objects with a custom `[[Prototype]]`', function(assert) {
+ assert.expect(1);
+
+ if (create) {
+ var object = create({ 'a': 1 });
+ assert.strictEqual(_.isPlainObject(object), false);
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+
+ QUnit.test('should return `false` for DOM elements', function(assert) {
+ assert.expect(1);
+
+ if (element) {
+ assert.strictEqual(_.isPlainObject(element), false);
+ } else {
+ skipAssert(assert);
+ }
+ });
+
+ QUnit.test('should return `false` for Object objects without a `toStringTag` of "Object"', function(assert) {
+ assert.expect(3);
+
+ assert.strictEqual(_.isPlainObject(arguments), false);
+ assert.strictEqual(_.isPlainObject(Error), false);
+ assert.strictEqual(_.isPlainObject(Math), false);
+ });
+
+ QUnit.test('should return `false` for non-objects', function(assert) {
+ assert.expect(4);
+
+ var expected = lodashStable.map(falsey, alwaysFalse);
+
+ var actual = lodashStable.map(falsey, function(value, index) {
+ return index ? _.isPlainObject(value) : _.isPlainObject();
+ });
+
+ assert.deepEqual(actual, expected);
+
+ assert.strictEqual(_.isPlainObject(true), false);
+ assert.strictEqual(_.isPlainObject('a'), false);
+ assert.strictEqual(_.isPlainObject(symbol), false);
+ });
+
+ QUnit.test('should work with objects from another realm', function(assert) {
+ assert.expect(1);
+
+ if (realm.object) {
+ assert.strictEqual(_.isPlainObject(realm.object), true);
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.isRegExp');
+
+ (function() {
+ var args = arguments;
+
+ QUnit.test('should return `true` for regexes', function(assert) {
+ assert.expect(2);
+
+ assert.strictEqual(_.isRegExp(/x/), true);
+ assert.strictEqual(_.isRegExp(RegExp('x')), true);
+ });
+
+ QUnit.test('should return `false` for non-regexes', function(assert) {
+ assert.expect(12);
+
+ var expected = lodashStable.map(falsey, alwaysFalse);
+
+ var actual = lodashStable.map(falsey, function(value, index) {
+ return index ? _.isRegExp(value) : _.isRegExp();
+ });
+
+ assert.deepEqual(actual, expected);
+
+ assert.strictEqual(_.isRegExp(args), false);
+ assert.strictEqual(_.isRegExp([1, 2, 3]), false);
+ assert.strictEqual(_.isRegExp(true), false);
+ assert.strictEqual(_.isRegExp(new Date), false);
+ assert.strictEqual(_.isRegExp(new Error), false);
+ assert.strictEqual(_.isRegExp(_), false);
+ assert.strictEqual(_.isRegExp(slice), false);
+ assert.strictEqual(_.isRegExp({ 'a': 1 }), false);
+ assert.strictEqual(_.isRegExp(1), false);
+ assert.strictEqual(_.isRegExp('a'), false);
+ assert.strictEqual(_.isRegExp(symbol), false);
+ });
+
+ QUnit.test('should work with regexes from another realm', function(assert) {
+ assert.expect(1);
+
+ if (realm.regexp) {
+ assert.strictEqual(_.isRegExp(realm.regexp), true);
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+ }(1, 2, 3));
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.isSet');
+
+ (function() {
+ var args = arguments;
+
+ QUnit.test('should return `true` for sets', function(assert) {
+ assert.expect(1);
+
+ if (Set) {
+ assert.strictEqual(_.isSet(set), true);
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+
+ QUnit.test('should return `false` for non-sets', function(assert) {
+ assert.expect(14);
+
+ var expected = lodashStable.map(falsey, alwaysFalse);
+
+ var actual = lodashStable.map(falsey, function(value, index) {
+ return index ? _.isSet(value) : _.isSet();
+ });
+
+ assert.deepEqual(actual, expected);
+
+ assert.strictEqual(_.isSet(args), false);
+ assert.strictEqual(_.isSet([1, 2, 3]), false);
+ assert.strictEqual(_.isSet(true), false);
+ assert.strictEqual(_.isSet(new Date), false);
+ assert.strictEqual(_.isSet(new Error), false);
+ assert.strictEqual(_.isSet(_), false);
+ assert.strictEqual(_.isSet(slice), false);
+ assert.strictEqual(_.isSet({ 'a': 1 }), false);
+ assert.strictEqual(_.isSet(1), false);
+ assert.strictEqual(_.isSet(/x/), false);
+ assert.strictEqual(_.isSet('a'), false);
+ assert.strictEqual(_.isSet(symbol), false);
+ assert.strictEqual(_.isSet(weakSet), false);
+ });
+
+ QUnit.test('should work for objects with a non-function `constructor` (test in IE 11)', function(assert) {
+ assert.expect(1);
+
+ var values = [false, true],
+ expected = lodashStable.map(values, alwaysFalse);
+
+ var actual = lodashStable.map(values, function(value) {
+ return _.isSet({ 'constructor': value });
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('should work with weak sets from another realm', function(assert) {
+ assert.expect(1);
+
+ if (realm.set) {
+ assert.strictEqual(_.isSet(realm.set), true);
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+ }(1, 2, 3));
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.isString');
+
+ (function() {
+ var args = arguments;
+
+ QUnit.test('should return `true` for strings', function(assert) {
+ assert.expect(2);
+
+ assert.strictEqual(_.isString('a'), true);
+ assert.strictEqual(_.isString(Object('a')), true);
+ });
+
+ QUnit.test('should return `false` for non-strings', function(assert) {
+ assert.expect(12);
+
+ var expected = lodashStable.map(falsey, function(value) {
+ return value === '';
+ });
+
+ var actual = lodashStable.map(falsey, function(value, index) {
+ return index ? _.isString(value) : _.isString();
+ });
+
+ assert.deepEqual(actual, expected);
+
+ assert.strictEqual(_.isString(args), false);
+ assert.strictEqual(_.isString([1, 2, 3]), false);
+ assert.strictEqual(_.isString(true), false);
+ assert.strictEqual(_.isString(new Date), false);
+ assert.strictEqual(_.isString(new Error), false);
+ assert.strictEqual(_.isString(_), false);
+ assert.strictEqual(_.isString(slice), false);
+ assert.strictEqual(_.isString({ '0': 1, 'length': 1 }), false);
+ assert.strictEqual(_.isString(1), false);
+ assert.strictEqual(_.isString(/x/), false);
+ assert.strictEqual(_.isString(symbol), false);
+ });
+
+ QUnit.test('should work with strings from another realm', function(assert) {
+ assert.expect(1);
+
+ if (realm.string) {
+ assert.strictEqual(_.isString(realm.string), true);
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+ }(1, 2, 3));
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.isSymbol');
+
+ (function() {
+ var args = arguments;
+
+ QUnit.test('should return `true` for symbols', function(assert) {
+ assert.expect(2);
+
+ if (Symbol) {
+ assert.strictEqual(_.isSymbol(symbol), true);
+ assert.strictEqual(_.isSymbol(Object(symbol)), true);
+ }
+ else {
+ skipAssert(assert, 2);
+ }
+ });
+
+ QUnit.test('should return `false` for non-symbols', function(assert) {
+ assert.expect(12);
+
+ var expected = lodashStable.map(falsey, alwaysFalse);
+
+ var actual = lodashStable.map(falsey, function(value, index) {
+ return index ? _.isSymbol(value) : _.isSymbol();
+ });
+
+ assert.deepEqual(actual, expected);
+
+ assert.strictEqual(_.isSymbol(args), false);
+ assert.strictEqual(_.isSymbol([1, 2, 3]), false);
+ assert.strictEqual(_.isSymbol(true), false);
+ assert.strictEqual(_.isSymbol(new Date), false);
+ assert.strictEqual(_.isSymbol(new Error), false);
+ assert.strictEqual(_.isSymbol(_), false);
+ assert.strictEqual(_.isSymbol(slice), false);
+ assert.strictEqual(_.isSymbol({ '0': 1, 'length': 1 }), false);
+ assert.strictEqual(_.isSymbol(1), false);
+ assert.strictEqual(_.isSymbol(/x/), false);
+ assert.strictEqual(_.isSymbol('a'), false);
+ });
+
+ QUnit.test('should work with symbols from another realm', function(assert) {
+ assert.expect(1);
+
+ if (Symbol && realm.symbol) {
+ assert.strictEqual(_.isSymbol(realm.symbol), true);
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+ }(1, 2, 3));
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.isTypedArray');
+
+ (function() {
+ var args = arguments;
+
+ QUnit.test('should return `true` for typed arrays', function(assert) {
+ assert.expect(1);
+
+ var expected = lodashStable.map(typedArrays, function(type) {
+ return type in root;
+ });
+
+ var actual = lodashStable.map(typedArrays, function(type) {
+ var Ctor = root[type];
+ return Ctor ? _.isTypedArray(new Ctor(new ArrayBuffer(8))) : false;
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('should return `false` for non typed arrays', function(assert) {
+ assert.expect(13);
+
+ var expected = lodashStable.map(falsey, alwaysFalse);
+
+ var actual = lodashStable.map(falsey, function(value, index) {
+ return index ? _.isTypedArray(value) : _.isTypedArray();
+ });
+
+ assert.deepEqual(actual, expected);
+
+ assert.strictEqual(_.isTypedArray(args), false);
+ assert.strictEqual(_.isTypedArray([1, 2, 3]), false);
+ assert.strictEqual(_.isTypedArray(true), false);
+ assert.strictEqual(_.isTypedArray(new Date), false);
+ assert.strictEqual(_.isTypedArray(new Error), false);
+ assert.strictEqual(_.isTypedArray(_), false);
+ assert.strictEqual(_.isTypedArray(slice), false);
+ assert.strictEqual(_.isTypedArray({ 'a': 1 }), false);
+ assert.strictEqual(_.isTypedArray(1), false);
+ assert.strictEqual(_.isTypedArray(/x/), false);
+ assert.strictEqual(_.isTypedArray('a'), false);
+ assert.strictEqual(_.isTypedArray(symbol), false);
+ });
+
+ QUnit.test('should work with typed arrays from another realm', function(assert) {
+ assert.expect(1);
+
+ if (realm.object) {
+ var props = lodashStable.invokeMap(typedArrays, 'toLowerCase');
+
+ var expected = lodashStable.map(props, function(key) {
+ return realm[key] !== undefined;
+ });
+
+ var actual = lodashStable.map(props, function(key) {
+ var value = realm[key];
+ return value ? _.isTypedArray(value) : false;
+ });
+
+ assert.deepEqual(actual, expected);
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+ }(1, 2, 3));
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.isUndefined');
+
+ (function() {
+ var args = arguments;
+
+ QUnit.test('should return `true` for `undefined` values', function(assert) {
+ assert.expect(2);
+
+ assert.strictEqual(_.isUndefined(), true);
+ assert.strictEqual(_.isUndefined(undefined), true);
+ });
+
+ QUnit.test('should return `false` for non `undefined` values', function(assert) {
+ assert.expect(13);
+
+ var expected = lodashStable.map(falsey, function(value) {
+ return value === undefined;
+ });
+
+ var actual = lodashStable.map(falsey, function(value, index) {
+ return index ? _.isUndefined(value) : _.isUndefined();
+ });
+
+ assert.deepEqual(actual, expected);
+
+ assert.strictEqual(_.isUndefined(args), false);
+ assert.strictEqual(_.isUndefined([1, 2, 3]), false);
+ assert.strictEqual(_.isUndefined(true), false);
+ assert.strictEqual(_.isUndefined(new Date), false);
+ assert.strictEqual(_.isUndefined(new Error), false);
+ assert.strictEqual(_.isUndefined(_), false);
+ assert.strictEqual(_.isUndefined(slice), false);
+ assert.strictEqual(_.isUndefined({ 'a': 1 }), false);
+ assert.strictEqual(_.isUndefined(1), false);
+ assert.strictEqual(_.isUndefined(/x/), false);
+ assert.strictEqual(_.isUndefined('a'), false);
+
+ if (Symbol) {
+ assert.strictEqual(_.isUndefined(symbol), false);
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+
+ QUnit.test('should work with `undefined` from another realm', function(assert) {
+ assert.expect(1);
+
+ if (realm.object) {
+ assert.strictEqual(_.isUndefined(realm.undefined), true);
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+ }(1, 2, 3));
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.isWeakMap');
+
+ (function() {
+ var args = arguments;
+
+ QUnit.test('should return `true` for weak maps', function(assert) {
+ assert.expect(1);
+
+ if (WeakMap) {
+ assert.strictEqual(_.isWeakMap(weakMap), true);
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+
+ QUnit.test('should return `false` for non weak maps', function(assert) {
+ assert.expect(14);
+
+ var expected = lodashStable.map(falsey, alwaysFalse);
+
+ var actual = lodashStable.map(falsey, function(value, index) {
+ return index ? _.isWeakMap(value) : _.isWeakMap();
+ });
+
+ assert.deepEqual(actual, expected);
+
+ assert.strictEqual(_.isWeakMap(args), false);
+ assert.strictEqual(_.isWeakMap([1, 2, 3]), false);
+ assert.strictEqual(_.isWeakMap(true), false);
+ assert.strictEqual(_.isWeakMap(new Date), false);
+ assert.strictEqual(_.isWeakMap(new Error), false);
+ assert.strictEqual(_.isWeakMap(_), false);
+ assert.strictEqual(_.isWeakMap(slice), false);
+ assert.strictEqual(_.isWeakMap({ 'a': 1 }), false);
+ assert.strictEqual(_.isWeakMap(map), false);
+ assert.strictEqual(_.isWeakMap(1), false);
+ assert.strictEqual(_.isWeakMap(/x/), false);
+ assert.strictEqual(_.isWeakMap('a'), false);
+ assert.strictEqual(_.isWeakMap(symbol), false);
+ });
+
+ QUnit.test('should work for objects with a non-function `constructor` (test in IE 11)', function(assert) {
+ assert.expect(1);
+
+ var values = [false, true],
+ expected = lodashStable.map(values, alwaysFalse);
+
+ var actual = lodashStable.map(values, function(value) {
+ return _.isWeakMap({ 'constructor': value });
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('should work with weak maps from another realm', function(assert) {
+ assert.expect(1);
+
+ if (realm.weakMap) {
+ assert.strictEqual(_.isWeakMap(realm.weakMap), true);
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+ }(1, 2, 3));
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.isWeakSet');
+
+ (function() {
+ var args = arguments;
+
+ QUnit.test('should return `true` for weak sets', function(assert) {
+ assert.expect(1);
+
+ if (WeakSet) {
+ assert.strictEqual(_.isWeakSet(weakSet), true);
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+
+ QUnit.test('should return `false` for non weak sets', function(assert) {
+ assert.expect(14);
+
+ var expected = lodashStable.map(falsey, alwaysFalse);
+
+ var actual = lodashStable.map(falsey, function(value, index) {
+ return index ? _.isWeakSet(value) : _.isWeakSet();
+ });
+
+ assert.deepEqual(actual, expected);
+
+ assert.strictEqual(_.isWeakSet(args), false);
+ assert.strictEqual(_.isWeakSet([1, 2, 3]), false);
+ assert.strictEqual(_.isWeakSet(true), false);
+ assert.strictEqual(_.isWeakSet(new Date), false);
+ assert.strictEqual(_.isWeakSet(new Error), false);
+ assert.strictEqual(_.isWeakSet(_), false);
+ assert.strictEqual(_.isWeakSet(slice), false);
+ assert.strictEqual(_.isWeakSet({ 'a': 1 }), false);
+ assert.strictEqual(_.isWeakSet(1), false);
+ assert.strictEqual(_.isWeakSet(/x/), false);
+ assert.strictEqual(_.isWeakSet('a'), false);
+ assert.strictEqual(_.isWeakSet(set), false);
+ assert.strictEqual(_.isWeakSet(symbol), false);
+ });
+
+ QUnit.test('should work with weak sets from another realm', function(assert) {
+ assert.expect(1);
+
+ if (realm.weakSet) {
+ assert.strictEqual(_.isWeakSet(realm.weakSet), true);
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+ }(1, 2, 3));
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('isType checks');
+
+ (function() {
+ QUnit.test('should return `false` for subclassed values', function(assert) {
+ assert.expect(7);
+
+ var funcs = [
+ 'isArray', 'isBoolean', 'isDate', 'isFunction',
+ 'isNumber', 'isRegExp', 'isString'
+ ];
+
+ lodashStable.each(funcs, function(methodName) {
+ function Foo() {}
+ Foo.prototype = root[methodName.slice(2)].prototype;
+
+ var object = new Foo;
+ if (objToString.call(object) == objectTag) {
+ assert.strictEqual(_[methodName](object), false, '`_.' + methodName + '` returns `false`');
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+ });
+
+ QUnit.test('should not error on host objects (test in IE)', function(assert) {
+ assert.expect(26);
+
+ var funcs = [
+ 'isArguments', 'isArray', 'isArrayBuffer', 'isArrayLike', 'isBoolean',
+ 'isBuffer', 'isDate', 'isElement', 'isError', 'isFinite', 'isFunction',
+ 'isInteger', 'isMap', 'isNaN', 'isNil', 'isNull', 'isNumber', 'isObject',
+ 'isObjectLike', 'isRegExp', 'isSet', 'isSafeInteger', 'isString',
+ 'isUndefined', 'isWeakMap', 'isWeakSet'
+ ];
+
+ lodashStable.each(funcs, function(methodName) {
+ if (xml) {
+ var pass = true;
+
+ try {
+ _[methodName](xml);
+ } catch (e) {
+ pass = false;
+ }
+ assert.ok(pass, '`_.' + methodName + '` should not error');
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.iteratee');
+
+ (function() {
+ QUnit.test('should provide arguments to `func`', function(assert) {
+ assert.expect(1);
+
+ var fn = function() { return slice.call(arguments); },
+ iteratee = _.iteratee(fn),
+ actual = iteratee('a', 'b', 'c', 'd', 'e', 'f');
+
+ assert.deepEqual(actual, ['a', 'b', 'c', 'd', 'e', 'f']);
+ });
+
+ QUnit.test('should return `_.identity` when `func` is nullish', function(assert) {
+ assert.expect(1);
+
+ var object = {},
+ values = [, null, undefined],
+ expected = lodashStable.map(values, lodashStable.constant([!isNpm && _.identity, object]));
+
+ var actual = lodashStable.map(values, function(value, index) {
+ var identity = index ? _.iteratee(value) : _.iteratee();
+ return [!isNpm && identity, identity(object)];
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('should return an iteratee created by `_.matches` when `func` is an object', function(assert) {
+ assert.expect(2);
+
+ var matches = _.iteratee({ 'a': 1, 'b': 2 });
+ assert.strictEqual(matches({ 'a': 1, 'b': 2, 'c': 3 }), true);
+ assert.strictEqual(matches({ 'b': 2 }), false);
+ });
+
+ QUnit.test('should not change `_.matches` behavior if `source` is modified', function(assert) {
+ assert.expect(9);
+
+ var sources = [
+ { 'a': { 'b': 2, 'c': 3 } },
+ { 'a': 1, 'b': 2 },
+ { 'a': 1 }
+ ];
+
+ lodashStable.each(sources, function(source, index) {
+ var object = lodashStable.cloneDeep(source),
+ matches = _.iteratee(source);
+
+ assert.strictEqual(matches(object), true);
+
+ if (index) {
+ source.a = 2;
+ source.b = 1;
+ source.c = 3;
+ } else {
+ source.a.b = 1;
+ source.a.c = 2;
+ source.a.d = 3;
+ }
+ assert.strictEqual(matches(object), true);
+ assert.strictEqual(matches(source), false);
+ });
+ });
+
+ QUnit.test('should return an iteratee created by `_.matchesProperty` when `func` is an array', function(assert) {
+ assert.expect(3);
+
+ var array = ['a', undefined],
+ matches = _.iteratee([0, 'a']);
+
+ assert.strictEqual(matches(array), true);
+
+ matches = _.iteratee(['0', 'a']);
+ assert.strictEqual(matches(array), true);
+
+ matches = _.iteratee([1, undefined]);
+ assert.strictEqual(matches(array), true);
+ });
+
+ QUnit.test('should support deep paths for `_.matchesProperty` shorthands', function(assert) {
+ assert.expect(1);
+
+ var object = { 'a': { 'b': { 'c': 1, 'd': 2 } } },
+ matches = _.iteratee(['a.b', { 'c': 1 }]);
+
+ assert.strictEqual(matches(object), true);
+ });
+
+ QUnit.test('should not change `_.matchesProperty` behavior if `source` is modified', function(assert) {
+ assert.expect(9);
+
+ var sources = [
+ { 'a': { 'b': 2, 'c': 3 } },
+ { 'a': 1, 'b': 2 },
+ { 'a': 1 }
+ ];
+
+ lodashStable.each(sources, function(source, index) {
+ var object = { 'a': lodashStable.cloneDeep(source) },
+ matches = _.iteratee(['a', source]);
+
+ assert.strictEqual(matches(object), true);
+
+ if (index) {
+ source.a = 2;
+ source.b = 1;
+ source.c = 3;
+ } else {
+ source.a.b = 1;
+ source.a.c = 2;
+ source.a.d = 3;
+ }
+ assert.strictEqual(matches(object), true);
+ assert.strictEqual(matches({ 'a': source }), false);
+ });
+ });
+
+ QUnit.test('should return an iteratee created by `_.property` when `func` is a number or string', function(assert) {
+ assert.expect(2);
+
+ var array = ['a'],
+ prop = _.iteratee(0);
+
+ assert.strictEqual(prop(array), 'a');
+
+ prop = _.iteratee('0');
+ assert.strictEqual(prop(array), 'a');
+ });
+
+ QUnit.test('should support deep paths for `_.property` shorthands', function(assert) {
+ assert.expect(1);
+
+ var object = { 'a': { 'b': 2 } },
+ prop = _.iteratee('a.b');
+
+ assert.strictEqual(prop(object), 2);
+ });
+
+ QUnit.test('should work with functions created by `_.partial` and `_.partialRight`', function(assert) {
+ assert.expect(2);
+
+ var fn = function() {
+ var result = [this.a];
+ push.apply(result, arguments);
+ return result;
+ };
+
+ var expected = [1, 2, 3],
+ object = { 'a': 1 , 'iteratee': _.iteratee(_.partial(fn, 2)) };
+
+ assert.deepEqual(object.iteratee(3), expected);
+
+ object.iteratee = _.iteratee(_.partialRight(fn, 3));
+ assert.deepEqual(object.iteratee(2), expected);
+ });
+
+ QUnit.test('should use internal `iteratee` if external is unavailable', function(assert) {
+ assert.expect(1);
+
+ var iteratee = _.iteratee;
+ delete _.iteratee;
+
+ assert.deepEqual(_.map([{ 'a': 1 }], 'a'), [1]);
+
+ _.iteratee = iteratee;
+ });
+
+ QUnit.test('should work as an iteratee for methods like `_.map`', function(assert) {
+ assert.expect(1);
+
+ var fn = function() { return this instanceof Number; },
+ array = [fn, fn, fn],
+ iteratees = lodashStable.map(array, _.iteratee),
+ expected = lodashStable.map(array, alwaysFalse);
+
+ var actual = lodashStable.map(iteratees, function(iteratee) {
+ return iteratee();
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('custom `_.iteratee` methods');
+
+ (function() {
+ var array = ['one', 'two', 'three'],
+ getPropA = _.partial(_.property, 'a'),
+ getPropB = _.partial(_.property, 'b'),
+ getLength = _.partial(_.property, 'length'),
+ iteratee = _.iteratee;
+
+ var getSum = function() {
+ return function(result, object) {
+ return result + object.a;
+ };
+ };
+
+ var objects = [
+ { 'a': 0, 'b': 0 },
+ { 'a': 1, 'b': 0 },
+ { 'a': 1, 'b': 1 }
+ ];
+
+ QUnit.test('`_.countBy` should use `_.iteratee` internally', function(assert) {
+ assert.expect(1);
+
+ if (!isModularize) {
+ _.iteratee = getLength;
+ assert.deepEqual(_.countBy(array), { '3': 2, '5': 1 });
+ _.iteratee = iteratee;
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+
+ QUnit.test('`_.differenceBy` should use `_.iteratee` internally', function(assert) {
+ assert.expect(1);
+
+ if (!isModularize) {
+ _.iteratee = getPropA;
+ assert.deepEqual(_.differenceBy(objects, [objects[1]]), [objects[0]]);
+ _.iteratee = iteratee;
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+
+ QUnit.test('`_.dropRightWhile` should use `_.iteratee` internally', function(assert) {
+ assert.expect(1);
+
+ if (!isModularize) {
+ _.iteratee = getPropB;
+ assert.deepEqual(_.dropRightWhile(objects), objects.slice(0, 2));
+ _.iteratee = iteratee;
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+
+ QUnit.test('`_.dropWhile` should use `_.iteratee` internally', function(assert) {
+ assert.expect(1);
+
+ if (!isModularize) {
+ _.iteratee = getPropB;
+ assert.deepEqual(_.dropWhile(objects.reverse()).reverse(), objects.reverse().slice(0, 2));
+ _.iteratee = iteratee;
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+
+ QUnit.test('`_.every` should use `_.iteratee` internally', function(assert) {
+ assert.expect(1);
+
+ if (!isModularize) {
+ _.iteratee = getPropA;
+ assert.strictEqual(_.every(objects.slice(1)), true);
+ _.iteratee = iteratee;
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+
+ QUnit.test('`_.filter` should use `_.iteratee` internally', function(assert) {
+ assert.expect(1);
+
+ if (!isModularize) {
+ var objects = [{ 'a': 0 }, { 'a': 1 }];
+
+ _.iteratee = getPropA;
+ assert.deepEqual(_.filter(objects), [objects[1]]);
+ _.iteratee = iteratee;
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+
+ QUnit.test('`_.find` should use `_.iteratee` internally', function(assert) {
+ assert.expect(1);
+
+ if (!isModularize) {
+ _.iteratee = getPropA;
+ assert.strictEqual(_.find(objects), objects[1]);
+ _.iteratee = iteratee;
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+
+ QUnit.test('`_.findIndex` should use `_.iteratee` internally', function(assert) {
+ assert.expect(1);
+
+ if (!isModularize) {
+ _.iteratee = getPropA;
+ assert.strictEqual(_.findIndex(objects), 1);
+ _.iteratee = iteratee;
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+
+ QUnit.test('`_.findLast` should use `_.iteratee` internally', function(assert) {
+ assert.expect(1);
+
+ if (!isModularize) {
+ _.iteratee = getPropA;
+ assert.strictEqual(_.findLast(objects), objects[2]);
+ _.iteratee = iteratee;
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+
+ QUnit.test('`_.findLastIndex` should use `_.iteratee` internally', function(assert) {
+ assert.expect(1);
+
+ if (!isModularize) {
+ _.iteratee = getPropA;
+ assert.strictEqual(_.findLastIndex(objects), 2);
+ _.iteratee = iteratee;
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+
+ QUnit.test('`_.findKey` should use `_.iteratee` internally', function(assert) {
+ assert.expect(1);
+
+ if (!isModularize) {
+ _.iteratee = getPropB;
+ assert.strictEqual(_.findKey(objects), '2');
+ _.iteratee = iteratee;
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+
+ QUnit.test('`_.findLastKey` should use `_.iteratee` internally', function(assert) {
+ assert.expect(1);
+
+ if (!isModularize) {
+ _.iteratee = getPropB;
+ assert.strictEqual(_.findLastKey(objects), '2');
+ _.iteratee = iteratee;
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+
+ QUnit.test('`_.groupBy` should use `_.iteratee` internally', function(assert) {
+ assert.expect(1);
+
+ if (!isModularize) {
+ _.iteratee = getLength;
+ assert.deepEqual(_.groupBy(array), { '3': ['one', 'two'], '5': ['three'] });
+ _.iteratee = iteratee;
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+
+ QUnit.test('`_.intersectionBy` should use `_.iteratee` internally', function(assert) {
+ assert.expect(1);
+
+ if (!isModularize) {
+ _.iteratee = getPropA;
+ assert.deepEqual(_.intersectionBy(objects, [objects[2]]), [objects[1]]);
+ _.iteratee = iteratee;
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+
+ QUnit.test('`_.keyBy` should use `_.iteratee` internally', function(assert) {
+ assert.expect(1);
+
+ if (!isModularize) {
+ _.iteratee = getLength;
+ assert.deepEqual(_.keyBy(array), { '3': 'two', '5': 'three' });
+ _.iteratee = iteratee;
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+
+ QUnit.test('`_.map` should use `_.iteratee` internally', function(assert) {
+ assert.expect(1);
+
+ if (!isModularize) {
+ _.iteratee = getPropA;
+ assert.deepEqual(_.map(objects), [0, 1, 1]);
+ _.iteratee = iteratee;
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+
+ QUnit.test('`_.mapKeys` should use `_.iteratee` internally', function(assert) {
+ assert.expect(1);
+
+ if (!isModularize) {
+ _.iteratee = getPropB;
+ assert.deepEqual(_.mapKeys({ 'a': { 'b': 1 } }), { '1': { 'b': 1 } });
+ _.iteratee = iteratee;
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+
+ QUnit.test('`_.mapValues` should use `_.iteratee` internally', function(assert) {
+ assert.expect(1);
+
+ if (!isModularize) {
+ _.iteratee = getPropB;
+ assert.deepEqual(_.mapValues({ 'a': { 'b': 1 } }), { 'a': 1 });
+ _.iteratee = iteratee;
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+
+ QUnit.test('`_.maxBy` should use `_.iteratee` internally', function(assert) {
+ assert.expect(1);
+
+ if (!isModularize) {
+ _.iteratee = getPropB;
+ assert.deepEqual(_.maxBy(objects), objects[2]);
+ _.iteratee = iteratee;
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+
+ QUnit.test('`_.meanBy` should use `_.iteratee` internally', function(assert) {
+ assert.expect(1);
+
+ if (!isModularize) {
+ _.iteratee = getPropA;
+ assert.strictEqual(_.meanBy(objects), 2 / 3);
+ _.iteratee = iteratee;
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+
+ QUnit.test('`_.minBy` should use `_.iteratee` internally', function(assert) {
+ assert.expect(1);
+
+ if (!isModularize) {
+ _.iteratee = getPropB;
+ assert.deepEqual(_.minBy(objects), objects[0]);
+ _.iteratee = iteratee;
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+
+ QUnit.test('`_.partition` should use `_.iteratee` internally', function(assert) {
+ assert.expect(1);
+
+ if (!isModularize) {
+ var objects = [{ 'a': 1 }, { 'a': 1 }, { 'b': 2 }];
+
+ _.iteratee = getPropA;
+ assert.deepEqual(_.partition(objects), [objects.slice(0, 2), objects.slice(2)]);
+ _.iteratee = iteratee;
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+
+ QUnit.test('`_.pullAllBy` should use `_.iteratee` internally', function(assert) {
+ assert.expect(1);
+
+ if (!isModularize) {
+ _.iteratee = getPropA;
+ assert.deepEqual(_.pullAllBy(objects.slice(), [{ 'a': 1, 'b': 0 }]), [objects[0]]);
+ _.iteratee = iteratee;
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+
+ QUnit.test('`_.reduce` should use `_.iteratee` internally', function(assert) {
+ assert.expect(1);
+
+ if (!isModularize) {
+ _.iteratee = getSum;
+ assert.strictEqual(_.reduce(objects, undefined, 0), 2);
+ _.iteratee = iteratee;
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+
+ QUnit.test('`_.reduceRight` should use `_.iteratee` internally', function(assert) {
+ assert.expect(1);
+
+ if (!isModularize) {
+ _.iteratee = getSum;
+ assert.strictEqual(_.reduceRight(objects, undefined, 0), 2);
+ _.iteratee = iteratee;
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+
+ QUnit.test('`_.reject` should use `_.iteratee` internally', function(assert) {
+ assert.expect(1);
+
+ if (!isModularize) {
+ var objects = [{ 'a': 0 }, { 'a': 1 }];
+
+ _.iteratee = getPropA;
+ assert.deepEqual(_.reject(objects), [objects[0]]);
+ _.iteratee = iteratee;
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+
+ QUnit.test('`_.remove` should use `_.iteratee` internally', function(assert) {
+ assert.expect(1);
+
+ if (!isModularize) {
+ var objects = [{ 'a': 0 }, { 'a': 1 }];
+
+ _.iteratee = getPropA;
+ _.remove(objects);
+ assert.deepEqual(objects, [{ 'a': 0 }]);
+ _.iteratee = iteratee;
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+
+ QUnit.test('`_.some` should use `_.iteratee` internally', function(assert) {
+ assert.expect(1);
+
+ if (!isModularize) {
+ _.iteratee = getPropB;
+ assert.strictEqual(_.some(objects), true);
+ _.iteratee = iteratee;
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+
+ QUnit.test('`_.sortBy` should use `_.iteratee` internally', function(assert) {
+ assert.expect(1);
+
+ if (!isModularize) {
+ _.iteratee = getPropA;
+ assert.deepEqual(_.sortBy(objects.slice().reverse()), [objects[0], objects[2], objects[1]]);
+ _.iteratee = iteratee;
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+
+ QUnit.test('`_.sortedIndexBy` should use `_.iteratee` internally', function(assert) {
+ assert.expect(1);
+
+ if (!isModularize) {
+ var objects = [{ 'a': 30 }, { 'a': 50 }];
+
+ _.iteratee = getPropA;
+ assert.strictEqual(_.sortedIndexBy(objects, { 'a': 40 }), 1);
+ _.iteratee = iteratee;
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+
+ QUnit.test('`_.sortedLastIndexBy` should use `_.iteratee` internally', function(assert) {
+ assert.expect(1);
+
+ if (!isModularize) {
+ var objects = [{ 'a': 30 }, { 'a': 50 }];
+
+ _.iteratee = getPropA;
+ assert.strictEqual(_.sortedLastIndexBy(objects, { 'a': 40 }), 1);
+ _.iteratee = iteratee;
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+
+ QUnit.test('`_.sumBy` should use `_.iteratee` internally', function(assert) {
+ assert.expect(1);
+
+ if (!isModularize) {
+ _.iteratee = getPropB;
+ assert.strictEqual(_.sumBy(objects), 1);
+ _.iteratee = iteratee;
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+
+ QUnit.test('`_.takeRightWhile` should use `_.iteratee` internally', function(assert) {
+ assert.expect(1);
+
+ if (!isModularize) {
+ _.iteratee = getPropB;
+ assert.deepEqual(_.takeRightWhile(objects), objects.slice(2));
+ _.iteratee = iteratee;
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+
+ QUnit.test('`_.takeWhile` should use `_.iteratee` internally', function(assert) {
+ assert.expect(1);
+
+ if (!isModularize) {
+ _.iteratee = getPropB;
+ assert.deepEqual(_.takeWhile(objects.reverse()), objects.reverse().slice(2));
+ _.iteratee = iteratee;
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+
+ QUnit.test('`_.transform` should use `_.iteratee` internally', function(assert) {
+ assert.expect(1);
+
+ if (!isModularize) {
+ _.iteratee = function() {
+ return function(result, object) {
+ result.sum += object.a;
+ };
+ };
+
+ assert.deepEqual(_.transform(objects, undefined, { 'sum': 0 }), { 'sum': 2 });
+ _.iteratee = iteratee;
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+
+ QUnit.test('`_.uniqBy` should use `_.iteratee` internally', function(assert) {
+ assert.expect(1);
+
+ if (!isModularize) {
+ _.iteratee = getPropB;
+ assert.deepEqual(_.uniqBy(objects), [objects[0], objects[2]]);
+ _.iteratee = iteratee;
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+
+ QUnit.test('`_.unionBy` should use `_.iteratee` internally', function(assert) {
+ assert.expect(1);
+
+ if (!isModularize) {
+ _.iteratee = getPropB;
+ assert.deepEqual(_.unionBy(objects.slice(0, 1), [objects[2]]), [objects[0], objects[2]]);
+ _.iteratee = iteratee;
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+
+ QUnit.test('`_.xorBy` should use `_.iteratee` internally', function(assert) {
+ assert.expect(1);
+
+ if (!isModularize) {
+ _.iteratee = getPropA;
+ assert.deepEqual(_.xorBy(objects, objects.slice(1)), [objects[0]]);
+ _.iteratee = iteratee;
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.join');
+
+ (function() {
+ var array = ['a', 'b', 'c'];
+
+ QUnit.test('should return join all array elements into a string', function(assert) {
+ assert.expect(1);
+
+ assert.strictEqual(_.join(array, '~'), 'a~b~c');
+ });
+
+ QUnit.test('should return an unwrapped value when implicitly chaining', function(assert) {
+ assert.expect(2);
+
+ if (!isNpm) {
+ var wrapped = _(array);
+ assert.strictEqual(wrapped.join('~'), 'a~b~c');
+ assert.strictEqual(wrapped.value(), array);
+ }
+ else {
+ skipAssert(assert, 2);
+ }
+ });
+
+ QUnit.test('should return a wrapped value when explicitly chaining', function(assert) {
+ assert.expect(1);
+
+ if (!isNpm) {
+ assert.ok(_(array).chain().join('~') instanceof _);
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.keyBy');
+
+ (function() {
+ var array = [
+ { 'dir': 'left', 'code': 97 },
+ { 'dir': 'right', 'code': 100 }
+ ];
+
+ QUnit.test('should transform keys by `iteratee`', function(assert) {
+ assert.expect(1);
+
+ var expected = { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } };
+
+ var actual = _.keyBy(array, function(object) {
+ return String.fromCharCode(object.code);
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('should use `_.identity` when `iteratee` is nullish', function(assert) {
+ assert.expect(1);
+
+ var array = [4, 6, 6],
+ values = [, null, undefined],
+ expected = lodashStable.map(values, lodashStable.constant({ '4': 4, '6': 6 }));
+
+ var actual = lodashStable.map(values, function(value, index) {
+ return index ? _.keyBy(array, value) : _.keyBy(array);
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('should work with `_.property` shorthands', function(assert) {
+ assert.expect(1);
+
+ var expected = { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } },
+ actual = _.keyBy(array, 'dir');
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('should only add values to own, not inherited, properties', function(assert) {
+ assert.expect(2);
+
+ var actual = _.keyBy([6.1, 4.2, 6.3], function(n) {
+ return Math.floor(n) > 4 ? 'hasOwnProperty' : 'constructor';
+ });
+
+ assert.deepEqual(actual.constructor, 4.2);
+ assert.deepEqual(actual.hasOwnProperty, 6.3);
+ });
+
+ QUnit.test('should work with a number for `iteratee`', function(assert) {
+ assert.expect(2);
+
+ var array = [
+ [1, 'a'],
+ [2, 'a'],
+ [2, 'b']
+ ];
+
+ assert.deepEqual(_.keyBy(array, 0), { '1': [1, 'a'], '2': [2, 'b'] });
+ assert.deepEqual(_.keyBy(array, 1), { 'a': [2, 'a'], 'b': [2, 'b'] });
+ });
+
+ QUnit.test('should work with an object for `collection`', function(assert) {
+ assert.expect(1);
+
+ var actual = _.keyBy({ 'a': 6.1, 'b': 4.2, 'c': 6.3 }, Math.floor);
+ assert.deepEqual(actual, { '4': 4.2, '6': 6.3 });
+ });
+
+ QUnit.test('should work in a lazy sequence', function(assert) {
+ assert.expect(1);
+
+ if (!isNpm) {
+ var array = lodashStable.range(LARGE_ARRAY_SIZE).concat(
+ lodashStable.range(Math.floor(LARGE_ARRAY_SIZE / 2), LARGE_ARRAY_SIZE),
+ lodashStable.range(Math.floor(LARGE_ARRAY_SIZE / 1.5), LARGE_ARRAY_SIZE)
+ );
+
+ var actual = _(array).keyBy().map(square).filter(isEven).take().value();
+
+ assert.deepEqual(actual, _.take(_.filter(_.map(_.keyBy(array), square), isEven)));
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('keys methods');
+
+ lodashStable.each(['keys', 'keysIn'], function(methodName) {
+ var args = (function() { return arguments; }(1, 2, 3)),
+ strictArgs = (function() { 'use strict'; return arguments; }(1, 2, 3)),
+ func = _[methodName],
+ isKeys = methodName == 'keys';
+
+ QUnit.test('`_.' + methodName + '` should return the string keyed property names of `object`', function(assert) {
+ assert.expect(1);
+
+ var actual = func({ 'a': 1, 'b': 1 }).sort();
+
+ assert.deepEqual(actual, ['a', 'b']);
+ });
+
+ QUnit.test('`_.' + methodName + '` should ' + (isKeys ? 'not ' : '') + 'include inherited string keyed properties', function(assert) {
+ assert.expect(1);
+
+ function Foo() {
+ this.a = 1;
+ }
+ Foo.prototype.b = 2;
+
+ var expected = isKeys ? ['a'] : ['a', 'b'],
+ actual = func(new Foo).sort();
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('`_.' + methodName + '` should coerce primitives to objects (test in IE 9)', function(assert) {
+ assert.expect(2);
+
+ var expected = lodashStable.map(primitives, function(value) {
+ return typeof value == 'string' ? ['0'] : [];
+ });
+
+ var actual = lodashStable.map(primitives, func);
+ assert.deepEqual(actual, expected);
+
+ // IE 9 doesn't box numbers in for-in loops.
+ numberProto.a = 1;
+ assert.deepEqual(func(0), isKeys ? [] : ['a']);
+ delete numberProto.a;
+ });
+
+ QUnit.test('`_.' + methodName + '` should treat sparse arrays as dense', function(assert) {
+ assert.expect(1);
+
+ var array = [1];
+ array[2] = 3;
+
+ var actual = func(array).sort();
+
+ assert.deepEqual(actual, ['0', '1', '2']);
+ });
+
+ QUnit.test('`_.' + methodName + '` should not coerce nullish values to objects', function(assert) {
+ assert.expect(2);
+
+ objectProto.a = 1;
+ lodashStable.each([null, undefined], function(value) {
+ assert.deepEqual(func(value), []);
+ });
+ delete objectProto.a;
+ });
+
+ QUnit.test('`_.' + methodName + '` should return keys for custom properties on arrays', function(assert) {
+ assert.expect(1);
+
+ var array = [1];
+ array.a = 1;
+
+ var actual = func(array).sort();
+
+ assert.deepEqual(actual, ['0', 'a']);
+ });
+
+ QUnit.test('`_.' + methodName + '` should ' + (isKeys ? 'not ' : '') + 'include inherited string keyed properties of arrays', function(assert) {
+ assert.expect(1);
+
+ arrayProto.a = 1;
+
+ var expected = isKeys ? ['0'] : ['0', 'a'],
+ actual = func([1]).sort();
+
+ assert.deepEqual(actual, expected);
+
+ delete arrayProto.a;
+ });
+
+ QUnit.test('`_.' + methodName + '` should work with `arguments` objects', function(assert) {
+ assert.expect(1);
+
+ var values = [args, strictArgs],
+ expected = lodashStable.map(values, lodashStable.constant(['0', '1', '2']));
+
+ var actual = lodashStable.map(values, function(value) {
+ return func(value).sort();
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('`_.' + methodName + '` should return keys for custom properties on `arguments` objects', function(assert) {
+ assert.expect(1);
+
+ var values = [args, strictArgs],
+ expected = lodashStable.map(values, lodashStable.constant(['0', '1', '2', 'a']));
+
+ var actual = lodashStable.map(values, function(value) {
+ value.a = 1;
+ var result = func(value).sort();
+ delete value.a;
+ return result;
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('`_.' + methodName + '` should ' + (isKeys ? 'not ' : '') + 'include inherited string keyed properties of `arguments` objects', function(assert) {
+ assert.expect(1);
+
+ var values = [args, strictArgs],
+ expected = lodashStable.map(values, lodashStable.constant(isKeys ? ['0', '1', '2'] : ['0', '1', '2', 'a']));
+
+ var actual = lodashStable.map(values, function(value) {
+ objectProto.a = 1;
+ var result = func(value).sort();
+ delete objectProto.a;
+ return result;
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('`_.' + methodName + '` should work with string objects', function(assert) {
+ assert.expect(1);
+
+ var actual = func(Object('abc')).sort();
+
+ assert.deepEqual(actual, ['0', '1', '2']);
+ });
+
+ QUnit.test('`_.' + methodName + '` should return keys for custom properties on string objects', function(assert) {
+ assert.expect(1);
+
+ var object = Object('a');
+ object.a = 1;
+
+ var actual = func(object).sort();
+
+ assert.deepEqual(actual, ['0', 'a']);
+ });
+
+ QUnit.test('`_.' + methodName + '` should ' + (isKeys ? 'not ' : '') + 'include inherited string keyed properties of string objects', function(assert) {
+ assert.expect(1);
+
+ stringProto.a = 1;
+
+ var expected = isKeys ? ['0'] : ['0', 'a'],
+ actual = func(Object('a')).sort();
+
+ assert.deepEqual(actual, expected);
+
+ delete stringProto.a;
+ });
+
+ QUnit.test('`_.' + methodName + '` skips the `constructor` property on prototype objects', function(assert) {
+ assert.expect(3);
+
+ function Foo() {}
+ Foo.prototype.a = 1;
+
+ var expected = ['a'];
+ assert.deepEqual(func(Foo.prototype), expected);
+
+ Foo.prototype = { 'constructor': Foo, 'a': 1 };
+ assert.deepEqual(func(Foo.prototype), expected);
+
+ var Fake = { 'prototype': {} };
+ Fake.prototype.constructor = Fake;
+ assert.deepEqual(func(Fake.prototype), ['constructor']);
+ });
+ });
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.last');
+
+ (function() {
+ var array = [1, 2, 3, 4];
+
+ QUnit.test('should return the last element', function(assert) {
+ assert.expect(1);
+
+ assert.strictEqual(_.last(array), 4);
+ });
+
+ QUnit.test('should return `undefined` when querying empty arrays', function(assert) {
+ assert.expect(1);
+
+ var array = [];
+ array['-1'] = 1;
+
+ assert.strictEqual(_.last([]), undefined);
+ });
+
+ QUnit.test('should work as an iteratee for methods like `_.map`', function(assert) {
+ assert.expect(1);
+
+ var array = [[1, 2, 3], [4, 5, 6], [7, 8, 9]],
+ actual = lodashStable.map(array, _.last);
+
+ assert.deepEqual(actual, [3, 6, 9]);
+ });
+
+ QUnit.test('should return an unwrapped value when implicitly chaining', function(assert) {
+ assert.expect(1);
+
+ if (!isNpm) {
+ assert.strictEqual(_(array).last(), 4);
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+
+ QUnit.test('should return a wrapped value when explicitly chaining', function(assert) {
+ assert.expect(1);
+
+ if (!isNpm) {
+ assert.ok(_(array).chain().last() instanceof _);
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+
+ QUnit.test('should not execute immediately when explicitly chaining', function(assert) {
+ assert.expect(1);
+
+ if (!isNpm) {
+ var wrapped = _(array).chain().last();
+ assert.strictEqual(wrapped.__wrapped__, array);
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+
+ QUnit.test('should work in a lazy sequence', function(assert) {
+ assert.expect(2);
+
+ if (!isNpm) {
+ var largeArray = lodashStable.range(LARGE_ARRAY_SIZE),
+ smallArray = array;
+
+ lodashStable.times(2, function(index) {
+ var array = index ? largeArray : smallArray,
+ wrapped = _(array).filter(isEven);
+
+ assert.strictEqual(wrapped.last(), _.last(_.filter(array, isEven)));
+ });
+ }
+ else {
+ skipAssert(assert, 2);
+ }
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.lowerCase');
+
+ (function() {
+ QUnit.test('should lowercase as space-separated words', function(assert) {
+ assert.expect(3);
+
+ assert.strictEqual(_.lowerCase('--Foo-Bar--'), 'foo bar');
+ assert.strictEqual(_.lowerCase('fooBar'), 'foo bar');
+ assert.strictEqual(_.lowerCase('__FOO_BAR__'), 'foo bar');
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.lowerFirst');
+
+ (function() {
+ QUnit.test('should lowercase only the first character', function(assert) {
+ assert.expect(3);
+
+ assert.strictEqual(_.lowerFirst('fred'), 'fred');
+ assert.strictEqual(_.lowerFirst('Fred'), 'fred');
+ assert.strictEqual(_.lowerFirst('FRED'), 'fRED');
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.lt');
+
+ (function() {
+ QUnit.test('should return `true` if `value` is less than `other`', function(assert) {
+ assert.expect(2);
+
+ assert.strictEqual(_.lt(1, 3), true);
+ assert.strictEqual(_.lt('abc', 'def'), true);
+ });
+
+ QUnit.test('should return `false` if `value` >= `other`', function(assert) {
+ assert.expect(4);
+
+ assert.strictEqual(_.lt(3, 1), false);
+ assert.strictEqual(_.lt(3, 3), false);
+ assert.strictEqual(_.lt('def', 'abc'), false);
+ assert.strictEqual(_.lt('def', 'def'), false);
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.lte');
+
+ (function() {
+ QUnit.test('should return `true` if `value` is <= `other`', function(assert) {
+ assert.expect(4);
+
+ assert.strictEqual(_.lte(1, 3), true);
+ assert.strictEqual(_.lte(3, 3), true);
+ assert.strictEqual(_.lte('abc', 'def'), true);
+ assert.strictEqual(_.lte('def', 'def'), true);
+ });
+
+ QUnit.test('should return `false` if `value` > `other`', function(assert) {
+ assert.expect(2);
+
+ assert.strictEqual(_.lt(3, 1), false);
+ assert.strictEqual(_.lt('def', 'abc'), false);
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.lastIndexOf');
+
+ (function() {
+ var array = [1, 2, 3, 1, 2, 3];
+
+ QUnit.test('should return the index of the last matched value', function(assert) {
+ assert.expect(1);
+
+ assert.strictEqual(_.lastIndexOf(array, 3), 5);
+ });
+
+ QUnit.test('should work with a positive `fromIndex`', function(assert) {
+ assert.expect(1);
+
+ assert.strictEqual(_.lastIndexOf(array, 1, 2), 0);
+ });
+
+ QUnit.test('should work with `fromIndex` >= `array.length`', function(assert) {
+ assert.expect(1);
+
+ var values = [6, 8, Math.pow(2, 32), Infinity],
+ expected = lodashStable.map(values, lodashStable.constant([-1, 3, -1]));
+
+ var actual = lodashStable.map(values, function(fromIndex) {
+ return [
+ _.lastIndexOf(array, undefined, fromIndex),
+ _.lastIndexOf(array, 1, fromIndex),
+ _.lastIndexOf(array, '', fromIndex)
+ ];
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('should work with a negative `fromIndex`', function(assert) {
+ assert.expect(1);
+
+ assert.strictEqual(_.lastIndexOf(array, 2, -3), 1);
+ });
+
+ QUnit.test('should work with a negative `fromIndex` <= `-array.length`', function(assert) {
+ assert.expect(1);
+
+ var values = [-6, -8, -Infinity],
+ expected = lodashStable.map(values, alwaysZero);
+
+ var actual = lodashStable.map(values, function(fromIndex) {
+ return _.lastIndexOf(array, 1, fromIndex);
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('should treat falsey `fromIndex` values correctly', function(assert) {
+ assert.expect(1);
+
+ var expected = lodashStable.map(falsey, function(value) {
+ return value === undefined ? 5 : -1;
+ });
+
+ var actual = lodashStable.map(falsey, function(fromIndex) {
+ return _.lastIndexOf(array, 3, fromIndex);
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('should coerce `fromIndex` to an integer', function(assert) {
+ assert.expect(1);
+
+ assert.strictEqual(_.lastIndexOf(array, 2, 4.2), 4);
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('indexOf methods');
+
+ lodashStable.each(['indexOf', 'lastIndexOf', 'sortedIndexOf', 'sortedLastIndexOf'], function(methodName) {
+ var func = _[methodName],
+ isIndexOf = !/last/i.test(methodName),
+ isSorted = /^sorted/.test(methodName);
+
+ QUnit.test('`_.' + methodName + '` should accept a falsey `array` argument', function(assert) {
+ assert.expect(1);
+
+ var expected = lodashStable.map(falsey, lodashStable.constant(-1));
+
+ var actual = lodashStable.map(falsey, function(array, index) {
+ try {
+ return index ? func(array) : func();
+ } catch (e) {}
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('`_.' + methodName + '` should return `-1` for an unmatched value', function(assert) {
+ assert.expect(5);
+
+ var array = [1, 2, 3],
+ empty = [];
+
+ assert.strictEqual(func(array, 4), -1);
+ assert.strictEqual(func(array, 4, true), -1);
+ assert.strictEqual(func(array, undefined, true), -1);
+
+ assert.strictEqual(func(empty, undefined), -1);
+ assert.strictEqual(func(empty, undefined, true), -1);
+ });
+
+ QUnit.test('`_.' + methodName + '` should not match values on empty arrays', function(assert) {
+ assert.expect(2);
+
+ var array = [];
+ array[-1] = 0;
+
+ assert.strictEqual(func(array, undefined), -1);
+ assert.strictEqual(func(array, 0, true), -1);
+ });
+
+ QUnit.test('`_.' + methodName + '` should match `NaN`', function(assert) {
+ assert.expect(3);
+
+ var array = isSorted
+ ? [1, 2, NaN, NaN]
+ : [1, NaN, 3, NaN, 5, NaN];
+
+ if (isSorted) {
+ assert.strictEqual(func(array, NaN, true), isIndexOf ? 2 : 3);
+ skipAssert(assert, 2);
+ }
+ else {
+ assert.strictEqual(func(array, NaN), isIndexOf ? 1 : 5);
+ assert.strictEqual(func(array, NaN, 2), isIndexOf ? 3 : 1);
+ assert.strictEqual(func(array, NaN, -2), isIndexOf ? 5 : 3);
+ }
+ });
+
+ QUnit.test('`_.' + methodName + '` should match `-0` as `0`', function(assert) {
+ assert.expect(2);
+
+ assert.strictEqual(func([-0], 0), 0);
+ assert.strictEqual(func([0], -0), 0);
+ });
+ });
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.map');
+
+ (function() {
+ var array = [1, 2];
+
+ QUnit.test('should map values in `collection` to a new array', function(assert) {
+ assert.expect(2);
+
+ var object = { 'a': 1, 'b': 2 },
+ expected = ['1', '2'];
+
+ assert.deepEqual(_.map(array, String), expected);
+ assert.deepEqual(_.map(object, String), expected);
+ });
+
+ QUnit.test('should work with `_.property` shorthands', function(assert) {
+ assert.expect(1);
+
+ var objects = [{ 'a': 'x' }, { 'a': 'y' }];
+ assert.deepEqual(_.map(objects, 'a'), ['x', 'y']);
+ });
+
+ QUnit.test('should iterate over own string keyed properties of objects', function(assert) {
+ assert.expect(1);
+
+ function Foo() {
+ this.a = 1;
+ }
+ Foo.prototype.b = 2;
+
+ var actual = _.map(new Foo, identity);
+ assert.deepEqual(actual, [1]);
+ });
+
+ QUnit.test('should use `_.identity` when `iteratee` is nullish', function(assert) {
+ assert.expect(2);
+
+ var object = { 'a': 1, 'b': 2 },
+ values = [, null, undefined],
+ expected = lodashStable.map(values, lodashStable.constant([1, 2]));
+
+ lodashStable.each([array, object], function(collection) {
+ var actual = lodashStable.map(values, function(value, index) {
+ return index ? _.map(collection, value) : _.map(collection);
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+ });
+
+ QUnit.test('should accept a falsey `collection` argument', function(assert) {
+ assert.expect(1);
+
+ var expected = lodashStable.map(falsey, alwaysEmptyArray);
+
+ var actual = lodashStable.map(falsey, function(collection, index) {
+ try {
+ return index ? _.map(collection) : _.map();
+ } catch (e) {}
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('should treat number values for `collection` as empty', function(assert) {
+ assert.expect(1);
+
+ assert.deepEqual(_.map(1), []);
+ });
+
+ QUnit.test('should treat a nodelist as an array-like object', function(assert) {
+ assert.expect(1);
+
+ if (document) {
+ var actual = _.map(document.getElementsByTagName('body'), function(element) {
+ return element.nodeName.toLowerCase();
+ });
+
+ assert.deepEqual(actual, ['body']);
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+
+ QUnit.test('should work with objects with non-number length properties', function(assert) {
+ assert.expect(1);
+
+ var value = { 'value': 'x' },
+ object = { 'length': { 'value': 'x' } };
+
+ assert.deepEqual(_.map(object, identity), [value]);
+ });
+
+ QUnit.test('should return a wrapped value when chaining', function(assert) {
+ assert.expect(1);
+
+ if (!isNpm) {
+ assert.ok(_(array).map(noop) instanceof _);
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+
+ QUnit.test('should provide the correct `predicate` arguments in a lazy sequence', function(assert) {
+ assert.expect(5);
+
+ if (!isNpm) {
+ var args,
+ array = lodashStable.range(LARGE_ARRAY_SIZE + 1),
+ expected = [1, 0, _.map(array.slice(1), square)];
+
+ _(array).slice(1).map(function(value, index, array) {
+ args || (args = slice.call(arguments));
+ }).value();
+
+ assert.deepEqual(args, [1, 0, array.slice(1)]);
+
+ args = undefined;
+ _(array).slice(1).map(square).map(function(value, index, array) {
+ args || (args = slice.call(arguments));
+ }).value();
+
+ assert.deepEqual(args, expected);
+
+ args = undefined;
+ _(array).slice(1).map(square).map(function(value, index) {
+ args || (args = slice.call(arguments));
+ }).value();
+
+ assert.deepEqual(args, expected);
+
+ args = undefined;
+ _(array).slice(1).map(square).map(function(value) {
+ args || (args = slice.call(arguments));
+ }).value();
+
+ assert.deepEqual(args, [1]);
+
+ args = undefined;
+ _(array).slice(1).map(square).map(function() {
+ args || (args = slice.call(arguments));
+ }).value();
+
+ assert.deepEqual(args, expected);
+ }
+ else {
+ skipAssert(assert, 5);
+ }
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.mapKeys');
+
+ (function() {
+ var array = [1, 2],
+ object = { 'a': 1, 'b': 2 };
+
+ QUnit.test('should map keys in `object` to a new object', function(assert) {
+ assert.expect(1);
+
+ var actual = _.mapKeys(object, String);
+ assert.deepEqual(actual, { '1': 1, '2': 2 });
+ });
+
+ QUnit.test('should treat arrays like objects', function(assert) {
+ assert.expect(1);
+
+ var actual = _.mapKeys(array, String);
+ assert.deepEqual(actual, { '1': 1, '2': 2 });
+ });
+
+ QUnit.test('should work with `_.property` shorthands', function(assert) {
+ assert.expect(1);
+
+ var actual = _.mapKeys({ 'a': { 'b': 'c' } }, 'b');
+ assert.deepEqual(actual, { 'c': { 'b': 'c' } });
+ });
+
+ QUnit.test('should use `_.identity` when `iteratee` is nullish', function(assert) {
+ assert.expect(1);
+
+ var object = { 'a': 1, 'b': 2 },
+ values = [, null, undefined],
+ expected = lodashStable.map(values, lodashStable.constant({ '1': 1, '2': 2 }));
+
+ var actual = lodashStable.map(values, function(value, index) {
+ return index ? _.mapKeys(object, value) : _.mapKeys(object);
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.mapValues');
+
+ (function() {
+ var array = [1, 2],
+ object = { 'a': 1, 'b': 2 };
+
+ QUnit.test('should map values in `object` to a new object', function(assert) {
+ assert.expect(1);
+
+ var actual = _.mapValues(object, String);
+ assert.deepEqual(actual, { 'a': '1', 'b': '2' });
+ });
+
+ QUnit.test('should treat arrays like objects', function(assert) {
+ assert.expect(1);
+
+ var actual = _.mapValues(array, String);
+ assert.deepEqual(actual, { '0': '1', '1': '2' });
+ });
+
+ QUnit.test('should work with `_.property` shorthands', function(assert) {
+ assert.expect(1);
+
+ var actual = _.mapValues({ 'a': { 'b': 1 } }, 'b');
+ assert.deepEqual(actual, { 'a': 1 });
+ });
+
+ QUnit.test('should use `_.identity` when `iteratee` is nullish', function(assert) {
+ assert.expect(1);
+
+ var object = { 'a': 1, 'b': 2 },
+ values = [, null, undefined],
+ expected = lodashStable.map(values, lodashStable.constant([true, false]));
+
+ var actual = lodashStable.map(values, function(value, index) {
+ var result = index ? _.mapValues(object, value) : _.mapValues(object);
+ return [lodashStable.isEqual(result, object), result === object];
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.mapKeys and lodash.mapValues');
+
+ lodashStable.each(['mapKeys', 'mapValues'], function(methodName) {
+ var func = _[methodName],
+ object = { 'a': 1, 'b': 2 };
+
+ QUnit.test('`_.' + methodName + '` should iterate over own string keyed properties of objects', function(assert) {
+ assert.expect(1);
+
+ function Foo() {
+ this.a = 'a';
+ }
+ Foo.prototype.b = 'b';
+
+ var actual = func(new Foo, function(value, key) { return key; });
+ assert.deepEqual(actual, { 'a': 'a' });
+ });
+
+ QUnit.test('`_.' + methodName + '` should accept a falsey `object` argument', function(assert) {
+ assert.expect(1);
+
+ var expected = lodashStable.map(falsey, alwaysEmptyObject);
+
+ var actual = lodashStable.map(falsey, function(object, index) {
+ try {
+ return index ? func(object) : func();
+ } catch (e) {}
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('`_.' + methodName + '` should return a wrapped value when chaining', function(assert) {
+ assert.expect(1);
+
+ if (!isNpm) {
+ assert.ok(_(object)[methodName](noop) instanceof _);
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+ });
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.matches');
+
+ (function() {
+ QUnit.test('should create a function that performs a deep comparison between `source` and a given object', function(assert) {
+ assert.expect(6);
+
+ var object = { 'a': 1, 'b': 2, 'c': 3 },
+ matches = _.matches({ 'a': 1 });
+
+ assert.strictEqual(matches.length, 1);
+ assert.strictEqual(matches(object), true);
+
+ matches = _.matches({ 'b': 1 });
+ assert.strictEqual(matches(object), false);
+
+ matches = _.matches({ 'a': 1, 'c': 3 });
+ assert.strictEqual(matches(object), true);
+
+ matches = _.matches({ 'c': 3, 'd': 4 });
+ assert.strictEqual(matches(object), false);
+
+ object = { 'a': { 'b': { 'c': 1, 'd': 2 }, 'e': 3 }, 'f': 4 };
+ matches = _.matches({ 'a': { 'b': { 'c': 1 } } });
+
+ assert.strictEqual(matches(object), true);
+ });
+
+ QUnit.test('should match inherited string keyed `object` properties', function(assert) {
+ assert.expect(1);
+
+ function Foo() {
+ this.a = 1;
+ }
+ Foo.prototype.b = 2;
+
+ var object = { 'a': new Foo },
+ matches = _.matches({ 'a': { 'b': 2 } });
+
+ assert.strictEqual(matches(object), true);
+ });
+
+ QUnit.test('should not match by inherited `source` properties', function(assert) {
+ assert.expect(1);
+
+ function Foo() {
+ this.a = 1;
+ }
+ Foo.prototype.b = 2;
+
+ var objects = [{ 'a': 1 }, { 'a': 1, 'b': 2 }],
+ source = new Foo,
+ actual = lodashStable.map(objects, _.matches(source)),
+ expected = lodashStable.map(objects, alwaysTrue);
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('should compare a variety of `source` property values', function(assert) {
+ assert.expect(2);
+
+ var object1 = { 'a': false, 'b': true, 'c': '3', 'd': 4, 'e': [5], 'f': { 'g': 6 } },
+ object2 = { 'a': 0, 'b': 1, 'c': 3, 'd': '4', 'e': ['5'], 'f': { 'g': '6' } },
+ matches = _.matches(object1);
+
+ assert.strictEqual(matches(object1), true);
+ assert.strictEqual(matches(object2), false);
+ });
+
+ QUnit.test('should match `-0` as `0`', function(assert) {
+ assert.expect(2);
+
+ var object1 = { 'a': -0 },
+ object2 = { 'a': 0 },
+ matches = _.matches(object1);
+
+ assert.strictEqual(matches(object2), true);
+
+ matches = _.matches(object2);
+ assert.strictEqual(matches(object1), true);
+ });
+
+ QUnit.test('should compare functions by reference', function(assert) {
+ assert.expect(3);
+
+ var object1 = { 'a': lodashStable.noop },
+ object2 = { 'a': noop },
+ object3 = { 'a': {} },
+ matches = _.matches(object1);
+
+ assert.strictEqual(matches(object1), true);
+ assert.strictEqual(matches(object2), false);
+ assert.strictEqual(matches(object3), false);
+ });
+
+ QUnit.test('should work with a function for `object`', function(assert) {
+ assert.expect(1);
+
+ function Foo() {}
+ Foo.a = { 'b': 1, 'c': 2 };
+
+ var matches = _.matches({ 'a': { 'b': 1 } });
+ assert.strictEqual(matches(Foo), true);
+ });
+
+ QUnit.test('should work with a function for `source`', function(assert) {
+ assert.expect(1);
+
+ function Foo() {}
+ Foo.a = 1;
+ Foo.b = function() {};
+ Foo.c = 3;
+
+ var objects = [{ 'a': 1 }, { 'a': 1, 'b': Foo.b, 'c': 3 }],
+ actual = lodashStable.map(objects, _.matches(Foo));
+
+ assert.deepEqual(actual, [false, true]);
+ });
+
+ QUnit.test('should work with a non-plain `object`', function(assert) {
+ assert.expect(1);
+
+ function Foo(object) { lodashStable.assign(this, object); }
+
+ var object = new Foo({ 'a': new Foo({ 'b': 1, 'c': 2 }) }),
+ matches = _.matches({ 'a': { 'b': 1 } });
+
+ assert.strictEqual(matches(object), true);
+ });
+
+ QUnit.test('should partial match arrays', function(assert) {
+ assert.expect(3);
+
+ var objects = [{ 'a': ['b'] }, { 'a': ['c', 'd'] }],
+ actual = lodashStable.filter(objects, _.matches({ 'a': ['d'] }));
+
+ assert.deepEqual(actual, [objects[1]]);
+
+ actual = lodashStable.filter(objects, _.matches({ 'a': ['b', 'd'] }));
+ assert.deepEqual(actual, []);
+
+ actual = lodashStable.filter(objects, _.matches({ 'a': ['d', 'b'] }));
+ assert.deepEqual(actual, []);
+ });
+
+ QUnit.test('should partial match arrays of objects', function(assert) {
+ assert.expect(1);
+
+ var objects = [
+ { 'a': [{ 'b': 1, 'c': 2 }, { 'b': 4, 'c': 5, 'd': 6 }] },
+ { 'a': [{ 'b': 1, 'c': 2 }, { 'b': 4, 'c': 6, 'd': 7 }] }
+ ];
+
+ var actual = lodashStable.filter(objects, _.matches({ 'a': [{ 'b': 1 }, { 'b': 4, 'c': 5 }] }));
+ assert.deepEqual(actual, [objects[0]]);
+ });
+
+ QUnit.test('should partial match maps', function(assert) {
+ assert.expect(3);
+
+ if (Map) {
+ var objects = [{ 'a': new Map }, { 'a': new Map }];
+ objects[0].a.set('a', 1);
+ objects[1].a.set('a', 1);
+ objects[1].a.set('b', 2);
+
+ var map = new Map;
+ map.set('b', 2);
+ var actual = lodashStable.filter(objects, _.matches({ 'a': map }));
+
+ assert.deepEqual(actual, [objects[1]]);
+
+ map['delete']('b');
+ actual = lodashStable.filter(objects, _.matches({ 'a': map }));
+
+ assert.deepEqual(actual, objects);
+
+ map.set('c', 3);
+ actual = lodashStable.filter(objects, _.matches({ 'a': map }));
+
+ assert.deepEqual(actual, []);
+ }
+ else {
+ skipAssert(assert, 3);
+ }
+ });
+
+ QUnit.test('should partial match sets', function(assert) {
+ assert.expect(3);
+
+ if (Set) {
+ var objects = [{ 'a': new Set }, { 'a': new Set }];
+ objects[0].a.add(1);
+ objects[1].a.add(1);
+ objects[1].a.add(2);
+
+ var set = new Set;
+ set.add(2);
+ var actual = lodashStable.filter(objects, _.matches({ 'a': set }));
+
+ assert.deepEqual(actual, [objects[1]]);
+
+ set['delete'](2);
+ actual = lodashStable.filter(objects, _.matches({ 'a': set }));
+
+ assert.deepEqual(actual, objects);
+
+ set.add(3);
+ actual = lodashStable.filter(objects, _.matches({ 'a': set }));
+
+ assert.deepEqual(actual, []);
+ }
+ else {
+ skipAssert(assert, 3);
+ }
+ });
+
+ QUnit.test('should match `undefined` values', function(assert) {
+ assert.expect(3);
+
+ var objects = [{ 'a': 1 }, { 'a': 1, 'b': 1 }, { 'a': 1, 'b': undefined }],
+ actual = lodashStable.map(objects, _.matches({ 'b': undefined })),
+ expected = [false, false, true];
+
+ assert.deepEqual(actual, expected);
+
+ actual = lodashStable.map(objects, _.matches({ 'a': 1, 'b': undefined }));
+
+ assert.deepEqual(actual, expected);
+
+ objects = [{ 'a': { 'b': 1 } }, { 'a': { 'b': 1, 'c': 1 } }, { 'a': { 'b': 1, 'c': undefined } }];
+ actual = lodashStable.map(objects, _.matches({ 'a': { 'c': undefined } }));
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('should match `undefined` values on primitives', function(assert) {
+ assert.expect(3);
+
+ numberProto.a = 1;
+ numberProto.b = undefined;
+
+ try {
+ var matches = _.matches({ 'b': undefined });
+ assert.strictEqual(matches(1), true);
+ } catch (e) {
+ assert.ok(false, e.message);
+ }
+ try {
+ matches = _.matches({ 'a': 1, 'b': undefined });
+ assert.strictEqual(matches(1), true);
+ } catch (e) {
+ assert.ok(false, e.message);
+ }
+ numberProto.a = { 'b': 1, 'c': undefined };
+ try {
+ matches = _.matches({ 'a': { 'c': undefined } });
+ assert.strictEqual(matches(1), true);
+ } catch (e) {
+ assert.ok(false, e.message);
+ }
+ delete numberProto.a;
+ delete numberProto.b;
+ });
+
+ QUnit.test('should return `false` when `object` is nullish', function(assert) {
+ assert.expect(1);
+
+ var values = [, null, undefined],
+ expected = lodashStable.map(values, alwaysFalse),
+ matches = _.matches({ 'a': 1 });
+
+ var actual = lodashStable.map(values, function(value, index) {
+ try {
+ return index ? matches(value) : matches();
+ } catch (e) {}
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('should return `true` when comparing an empty `source` to a nullish `object`', function(assert) {
+ assert.expect(1);
+
+ var values = [, null, undefined],
+ expected = lodashStable.map(values, alwaysTrue),
+ matches = _.matches({});
+
+ var actual = lodashStable.map(values, function(value, index) {
+ try {
+ return index ? matches(value) : matches();
+ } catch (e) {}
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('should return `true` when comparing an empty `source`', function(assert) {
+ assert.expect(1);
+
+ var object = { 'a': 1 },
+ expected = lodashStable.map(empties, alwaysTrue);
+
+ var actual = lodashStable.map(empties, function(value) {
+ var matches = _.matches(value);
+ return matches(object);
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('should return `true` when comparing a `source` of empty arrays and objects', function(assert) {
+ assert.expect(1);
+
+ var objects = [{ 'a': [1], 'b': { 'c': 1 } }, { 'a': [2, 3], 'b': { 'd': 2 } }],
+ actual = lodashStable.filter(objects, _.matches({ 'a': [], 'b': {} }));
+
+ assert.deepEqual(actual, objects);
+ });
+
+ QUnit.test('should not change behavior if `source` is modified', function(assert) {
+ assert.expect(9);
+
+ var sources = [
+ { 'a': { 'b': 2, 'c': 3 } },
+ { 'a': 1, 'b': 2 },
+ { 'a': 1 }
+ ];
+
+ lodashStable.each(sources, function(source, index) {
+ var object = lodashStable.cloneDeep(source),
+ matches = _.matches(source);
+
+ assert.strictEqual(matches(object), true);
+
+ if (index) {
+ source.a = 2;
+ source.b = 1;
+ source.c = 3;
+ } else {
+ source.a.b = 1;
+ source.a.c = 2;
+ source.a.d = 3;
+ }
+ assert.strictEqual(matches(object), true);
+ assert.strictEqual(matches(source), false);
+ });
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.matchesProperty');
+
+ (function() {
+ QUnit.test('should create a function that performs a deep comparison between a property value and `srcValue`', function(assert) {
+ assert.expect(6);
+
+ var object = { 'a': 1, 'b': 2, 'c': 3 },
+ matches = _.matchesProperty('a', 1);
+
+ assert.strictEqual(matches.length, 1);
+ assert.strictEqual(matches(object), true);
+
+ matches = _.matchesProperty('b', 3);
+ assert.strictEqual(matches(object), false);
+
+ matches = _.matchesProperty('a', { 'a': 1, 'c': 3 });
+ assert.strictEqual(matches({ 'a': object }), true);
+
+ matches = _.matchesProperty('a', { 'c': 3, 'd': 4 });
+ assert.strictEqual(matches(object), false);
+
+ object = { 'a': { 'b': { 'c': 1, 'd': 2 }, 'e': 3 }, 'f': 4 };
+ matches = _.matchesProperty('a', { 'b': { 'c': 1 } });
+
+ assert.strictEqual(matches(object), true);
+ });
+
+ QUnit.test('should support deep paths', function(assert) {
+ assert.expect(2);
+
+ var object = { 'a': { 'b': 2 } };
+
+ lodashStable.each(['a.b', ['a', 'b']], function(path) {
+ var matches = _.matchesProperty(path, 2);
+ assert.strictEqual(matches(object), true);
+ });
+ });
+
+ QUnit.test('should work with a non-string `path`', function(assert) {
+ assert.expect(2);
+
+ var array = [1, 2, 3];
+
+ lodashStable.each([1, [1]], function(path) {
+ var matches = _.matchesProperty(path, 2);
+ assert.strictEqual(matches(array), true);
+ });
+ });
+
+ QUnit.test('should preserve the sign of `0`', function(assert) {
+ assert.expect(1);
+
+ var object1 = { '-0': 'a' },
+ object2 = { '0': 'b' },
+ pairs = [[object1, object2], [object1, object2], [object2, object1], [object2, object1]],
+ props = [-0, Object(-0), 0, Object(0)],
+ values = ['a', 'a', 'b', 'b'],
+ expected = lodashStable.map(props, lodashStable.constant([true, false]));
+
+ var actual = lodashStable.map(props, function(key, index) {
+ var matches = _.matchesProperty(key, values[index]),
+ pair = pairs[index];
+
+ return [matches(pair[0]), matches(pair[1])];
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('should coerce key to a string', function(assert) {
+ assert.expect(1);
+
+ function fn() {}
+ fn.toString = lodashStable.constant('fn');
+
+ var objects = [{ 'null': 1 }, { 'undefined': 2 }, { 'fn': 3 }, { '[object Object]': 4 }],
+ values = [null, undefined, fn, {}];
+
+ var expected = lodashStable.transform(values, function(result) {
+ result.push(true, true);
+ });
+
+ var actual = lodashStable.transform(objects, function(result, object, index) {
+ var key = values[index];
+ lodashStable.each([key, [key]], function(path) {
+ var matches = _.matchesProperty(path, object[key]);
+ result.push(matches(object));
+ });
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('should match a key over a path', function(assert) {
+ assert.expect(2);
+
+ var object = { 'a.b': 1, 'a': { 'b': 2 } };
+
+ lodashStable.each(['a.b', ['a.b']], function(path) {
+ var matches = _.matchesProperty(path, 1);
+ assert.strictEqual(matches(object), true);
+ });
+ });
+
+ QUnit.test('should return `false` if parts of `path` are missing', function(assert) {
+ assert.expect(4);
+
+ var object = {};
+
+ lodashStable.each(['a', 'a[1].b.c', ['a'], ['a', '1', 'b', 'c']], function(path) {
+ var matches = _.matchesProperty(path, 1);
+ assert.strictEqual(matches(object), false);
+ });
+ });
+
+ QUnit.test('should return `false` for deep paths when `object` is nullish', function(assert) {
+ assert.expect(2);
+
+ var values = [, null, undefined],
+ expected = lodashStable.map(values, alwaysFalse);
+
+ lodashStable.each(['constructor.prototype.valueOf', ['constructor', 'prototype', 'valueOf']], function(path) {
+ var matches = _.matchesProperty(path, 1);
+
+ var actual = lodashStable.map(values, function(value, index) {
+ try {
+ return index ? matches(value) : matches();
+ } catch (e) {}
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+ });
+
+ QUnit.test('should match inherited string keyed `srcValue` properties', function(assert) {
+ assert.expect(2);
+
+ function Foo() {}
+ Foo.prototype.b = 2;
+
+ var object = { 'a': new Foo };
+
+ lodashStable.each(['a', ['a']], function(path) {
+ var matches = _.matchesProperty(path, { 'b': 2 });
+ assert.strictEqual(matches(object), true);
+ });
+ });
+
+ QUnit.test('should not match by inherited `srcValue` properties', function(assert) {
+ assert.expect(2);
+
+ function Foo() {
+ this.a = 1;
+ }
+ Foo.prototype.b = 2;
+
+ var objects = [{ 'a': { 'a': 1 } }, { 'a': { 'a': 1, 'b': 2 } }],
+ expected = lodashStable.map(objects, alwaysTrue);
+
+ lodashStable.each(['a', ['a']], function(path) {
+ assert.deepEqual(lodashStable.map(objects, _.matchesProperty(path, new Foo)), expected);
+ });
+ });
+
+ QUnit.test('should compare a variety of values', function(assert) {
+ assert.expect(2);
+
+ var object1 = { 'a': false, 'b': true, 'c': '3', 'd': 4, 'e': [5], 'f': { 'g': 6 } },
+ object2 = { 'a': 0, 'b': 1, 'c': 3, 'd': '4', 'e': ['5'], 'f': { 'g': '6' } },
+ matches = _.matchesProperty('a', object1);
+
+ assert.strictEqual(matches({ 'a': object1 }), true);
+ assert.strictEqual(matches({ 'a': object2 }), false);
+ });
+
+ QUnit.test('should match `-0` as `0`', function(assert) {
+ assert.expect(2);
+
+ var matches = _.matchesProperty('a', -0);
+ assert.strictEqual(matches({ 'a': 0 }), true);
+
+ matches = _.matchesProperty('a', 0);
+ assert.strictEqual(matches({ 'a': -0 }), true);
+ });
+
+ QUnit.test('should compare functions by reference', function(assert) {
+ assert.expect(3);
+
+ var object1 = { 'a': lodashStable.noop },
+ object2 = { 'a': noop },
+ object3 = { 'a': {} },
+ matches = _.matchesProperty('a', object1);
+
+ assert.strictEqual(matches({ 'a': object1 }), true);
+ assert.strictEqual(matches({ 'a': object2 }), false);
+ assert.strictEqual(matches({ 'a': object3 }), false);
+ });
+
+ QUnit.test('should work with a function for `srcValue`', function(assert) {
+ assert.expect(1);
+
+ function Foo() {}
+ Foo.a = 1;
+ Foo.b = function() {};
+ Foo.c = 3;
+
+ var objects = [{ 'a': { 'a': 1 } }, { 'a': { 'a': 1, 'b': Foo.b, 'c': 3 } }],
+ actual = lodashStable.map(objects, _.matchesProperty('a', Foo));
+
+ assert.deepEqual(actual, [false, true]);
+ });
+
+ QUnit.test('should work with a non-plain `srcValue`', function(assert) {
+ assert.expect(1);
+
+ function Foo(object) { lodashStable.assign(this, object); }
+
+ var object = new Foo({ 'a': new Foo({ 'b': 1, 'c': 2 }) }),
+ matches = _.matchesProperty('a', { 'b': 1 });
+
+ assert.strictEqual(matches(object), true);
+ });
+
+ QUnit.test('should partial match arrays', function(assert) {
+ assert.expect(3);
+
+ var objects = [{ 'a': ['b'] }, { 'a': ['c', 'd'] }],
+ actual = lodashStable.filter(objects, _.matchesProperty('a', ['d']));
+
+ assert.deepEqual(actual, [objects[1]]);
+
+ actual = lodashStable.filter(objects, _.matchesProperty('a', ['b', 'd']));
+ assert.deepEqual(actual, []);
+
+ actual = lodashStable.filter(objects, _.matchesProperty('a', ['d', 'b']));
+ assert.deepEqual(actual, []);
+ });
+
+ QUnit.test('should partial match arrays of objects', function(assert) {
+ assert.expect(1);
+
+ var objects = [
+ { 'a': [{ 'a': 1, 'b': 2 }, { 'a': 4, 'b': 5, 'c': 6 }] },
+ { 'a': [{ 'a': 1, 'b': 2 }, { 'a': 4, 'b': 6, 'c': 7 }] }
+ ];
+
+ var actual = lodashStable.filter(objects, _.matchesProperty('a', [{ 'a': 1 }, { 'a': 4, 'b': 5 }]));
+ assert.deepEqual(actual, [objects[0]]);
+ });
+ QUnit.test('should partial match maps', function(assert) {
+ assert.expect(3);
+
+ if (Map) {
+ var objects = [{ 'a': new Map }, { 'a': new Map }];
+ objects[0].a.set('a', 1);
+ objects[1].a.set('a', 1);
+ objects[1].a.set('b', 2);
+
+ var map = new Map;
+ map.set('b', 2);
+ var actual = lodashStable.filter(objects, _.matchesProperty('a', map));
+
+ assert.deepEqual(actual, [objects[1]]);
+
+ map['delete']('b');
+ actual = lodashStable.filter(objects, _.matchesProperty('a', map));
+
+ assert.deepEqual(actual, objects);
+
+ map.set('c', 3);
+ actual = lodashStable.filter(objects, _.matchesProperty('a', map));
+
+ assert.deepEqual(actual, []);
+ }
+ else {
+ skipAssert(assert, 3);
+ }
+ });
+
+ QUnit.test('should partial match sets', function(assert) {
+ assert.expect(3);
+
+ if (Set) {
+ var objects = [{ 'a': new Set }, { 'a': new Set }];
+ objects[0].a.add(1);
+ objects[1].a.add(1);
+ objects[1].a.add(2);
+
+ var set = new Set;
+ set.add(2);
+ var actual = lodashStable.filter(objects, _.matchesProperty('a', set));
+
+ assert.deepEqual(actual, [objects[1]]);
+
+ set['delete'](2);
+ actual = lodashStable.filter(objects, _.matchesProperty('a', set));
+
+ assert.deepEqual(actual, objects);
+
+ set.add(3);
+ actual = lodashStable.filter(objects, _.matchesProperty('a', set));
+
+ assert.deepEqual(actual, []);
+ }
+ else {
+ skipAssert(assert, 3);
+ }
+ });
+
+ QUnit.test('should match `undefined` values', function(assert) {
+ assert.expect(2);
+
+ var objects = [{ 'a': 1 }, { 'a': 1, 'b': 1 }, { 'a': 1, 'b': undefined }],
+ actual = lodashStable.map(objects, _.matchesProperty('b', undefined)),
+ expected = [false, false, true];
+
+ assert.deepEqual(actual, expected);
+
+ objects = [{ 'a': { 'a': 1 } }, { 'a': { 'a': 1, 'b': 1 } }, { 'a': { 'a': 1, 'b': undefined } }];
+ actual = lodashStable.map(objects, _.matchesProperty('a', { 'b': undefined }));
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('should match `undefined` values of nested objects', function(assert) {
+ assert.expect(4);
+
+ var object = { 'a': { 'b': undefined } };
+
+ lodashStable.each(['a.b', ['a', 'b']], function(path) {
+ var matches = _.matchesProperty(path, undefined);
+ assert.strictEqual(matches(object), true);
+ });
+
+ lodashStable.each(['a.a', ['a', 'a']], function(path) {
+ var matches = _.matchesProperty(path, undefined);
+ assert.strictEqual(matches(object), false);
+ });
+ });
+
+ QUnit.test('should match `undefined` values on primitives', function(assert) {
+ assert.expect(2);
+
+ numberProto.a = 1;
+ numberProto.b = undefined;
+
+ try {
+ var matches = _.matchesProperty('b', undefined);
+ assert.strictEqual(matches(1), true);
+ } catch (e) {
+ assert.ok(false, e.message);
+ }
+ numberProto.a = { 'b': 1, 'c': undefined };
+ try {
+ matches = _.matchesProperty('a', { 'c': undefined });
+ assert.strictEqual(matches(1), true);
+ } catch (e) {
+ assert.ok(false, e.message);
+ }
+ delete numberProto.a;
+ delete numberProto.b;
+ });
+
+ QUnit.test('should return `false` when `object` is nullish', function(assert) {
+ assert.expect(2);
+
+ var values = [, null, undefined],
+ expected = lodashStable.map(values, alwaysFalse);
+
+ lodashStable.each(['constructor', ['constructor']], function(path) {
+ var matches = _.matchesProperty(path, 1);
+
+ var actual = lodashStable.map(values, function(value, index) {
+ try {
+ return index ? matches(value) : matches();
+ } catch (e) {}
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+ });
+
+ QUnit.test('should return `true` when comparing a `srcValue` of empty arrays and objects', function(assert) {
+ assert.expect(1);
+
+ var objects = [{ 'a': [1], 'b': { 'c': 1 } }, { 'a': [2, 3], 'b': { 'd': 2 } }],
+ matches = _.matchesProperty('a', { 'a': [], 'b': {} });
+
+ var actual = lodashStable.filter(objects, function(object) {
+ return matches({ 'a': object });
+ });
+
+ assert.deepEqual(actual, objects);
+ });
+
+ QUnit.test('should not change behavior if `srcValue` is modified', function(assert) {
+ assert.expect(9);
+
+ lodashStable.each([{ 'a': { 'b': 2, 'c': 3 } }, { 'a': 1, 'b': 2 }, { 'a': 1 }], function(source, index) {
+ var object = lodashStable.cloneDeep(source),
+ matches = _.matchesProperty('a', source);
+
+ assert.strictEqual(matches({ 'a': object }), true);
+
+ if (index) {
+ source.a = 2;
+ source.b = 1;
+ source.c = 3;
+ } else {
+ source.a.b = 1;
+ source.a.c = 2;
+ source.a.d = 3;
+ }
+ assert.strictEqual(matches({ 'a': object }), true);
+ assert.strictEqual(matches({ 'a': source }), false);
+ });
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.max');
+
+ (function() {
+ QUnit.test('should return the largest value from a collection', function(assert) {
+ assert.expect(1);
+
+ assert.strictEqual(_.max([1, 2, 3]), 3);
+ });
+
+ QUnit.test('should return `undefined` for empty collections', function(assert) {
+ assert.expect(1);
+
+ var values = falsey.concat([[]]),
+ expected = lodashStable.map(values, noop);
+
+ var actual = lodashStable.map(values, function(value, index) {
+ try {
+ return index ? _.max(value) : _.max();
+ } catch (e) {}
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('should work with non-numeric collection values', function(assert) {
+ assert.expect(1);
+
+ assert.strictEqual(_.max(['a', 'b']), 'b');
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.mean');
+
+ (function() {
+ QUnit.test('should return the mean of an array of numbers', function(assert) {
+ assert.expect(1);
+
+ var array = [4, 2, 8, 6];
+ assert.strictEqual(_.mean(array), 5);
+ });
+
+ QUnit.test('should return `NaN` when passing empty `array` values', function(assert) {
+ assert.expect(1);
+
+ var expected = lodashStable.map(empties, alwaysNaN),
+ actual = lodashStable.map(empties, _.mean);
+
+ assert.deepEqual(actual, expected);
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.meanBy');
+
+ (function() {
+ var objects = [{ 'a': 2 }, { 'a': 3 }, { 'a': 1 }];
+
+ QUnit.test('should work with an `iteratee` argument', function(assert) {
+ assert.expect(1);
+
+ var actual = _.meanBy(objects, function(object) {
+ return object.a;
+ });
+
+ assert.deepEqual(actual, 2);
+ });
+
+ QUnit.test('should provide the correct `iteratee` arguments', function(assert) {
+ assert.expect(1);
+
+ var args;
+
+ _.meanBy(objects, function() {
+ args || (args = slice.call(arguments));
+ });
+
+ assert.deepEqual(args, [{ 'a': 2 }]);
+ });
+
+ QUnit.test('should work with `_.property` shorthands', function(assert) {
+ assert.expect(2);
+
+ var arrays = [[2], [3], [1]];
+ assert.strictEqual(_.meanBy(arrays, 0), 2);
+ assert.strictEqual(_.meanBy(objects, 'a'), 2);
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.memoize');
+
+ (function() {
+ QUnit.test('should memoize results based on the first argument given', function(assert) {
+ assert.expect(2);
+
+ var memoized = _.memoize(function(a, b, c) {
+ return a + b + c;
+ });
+
+ assert.strictEqual(memoized(1, 2, 3), 6);
+ assert.strictEqual(memoized(1, 3, 5), 6);
+ });
+
+ QUnit.test('should support a `resolver` argument', function(assert) {
+ assert.expect(2);
+
+ var fn = function(a, b, c) { return a + b + c; },
+ memoized = _.memoize(fn, fn);
+
+ assert.strictEqual(memoized(1, 2, 3), 6);
+ assert.strictEqual(memoized(1, 3, 5), 9);
+ });
+
+ QUnit.test('should use `this` binding of function for `resolver`', function(assert) {
+ assert.expect(2);
+
+ var fn = function(a, b, c) { return a + this.b + this.c; },
+ memoized = _.memoize(fn, fn);
+
+ var object = { 'memoized': memoized, 'b': 2, 'c': 3 };
+ assert.strictEqual(object.memoized(1), 6);
+
+ object.b = 3;
+ object.c = 5;
+ assert.strictEqual(object.memoized(1), 9);
+ });
+
+ QUnit.test('should throw a TypeError if `resolve` is truthy and not a function', function(assert) {
+ assert.expect(1);
+
+ assert.raises(function() { _.memoize(noop, true); }, TypeError);
+ });
+
+ QUnit.test('should not error if `resolver` is falsey', function(assert) {
+ assert.expect(1);
+
+ var expected = lodashStable.map(falsey, alwaysTrue);
+
+ var actual = lodashStable.map(falsey, function(resolver, index) {
+ try {
+ return _.isFunction(index ? _.memoize(noop, resolver) : _.memoize(noop));
+ } catch (e) {}
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('should check cache for own properties', function(assert) {
+ assert.expect(1);
+
+ var props = [
+ 'constructor',
+ 'hasOwnProperty',
+ 'isPrototypeOf',
+ 'propertyIsEnumerable',
+ 'toLocaleString',
+ 'toString',
+ 'valueOf'
+ ];
+
+ var memoized = _.memoize(identity);
+
+ var actual = lodashStable.map(props, function(value) {
+ return memoized(value);
+ });
+
+ assert.deepEqual(actual, props);
+ });
+
+ QUnit.test('should cache the `__proto__` key', function(assert) {
+ assert.expect(8);
+
+ var array = [],
+ key = '__proto__';
+
+ lodashStable.times(2, function(index) {
+ var count = 0,
+ resolver = index && identity;
+
+ var memoized = _.memoize(function() {
+ count++;
+ return array;
+ }, resolver);
+
+ var cache = memoized.cache;
+
+ memoized(key);
+ memoized(key);
+
+ assert.strictEqual(count, 1);
+ assert.strictEqual(cache.get(key), array);
+ assert.notOk(cache.__data__ instanceof Array);
+ assert.strictEqual(cache['delete'](key), true);
+ });
+ });
+
+ QUnit.test('should allow `_.memoize.Cache` to be customized', function(assert) {
+ assert.expect(4);
+
+ var oldCache = _.memoize.Cache;
+
+ function Cache() {
+ this.__data__ = [];
+ }
+
+ Cache.prototype = {
+ 'get': function(key) {
+ var entry = _.find(this.__data__, function(entry) {
+ return key === entry.key;
+ });
+ return entry && entry.value;
+ },
+ 'has': function(key) {
+ return _.some(this.__data__, function(entry) {
+ return key === entry.key;
+ });
+ },
+ 'set': function(key, value) {
+ this.__data__.push({ 'key': key, 'value': value });
+ return this;
+ }
+ };
+
+ _.memoize.Cache = Cache;
+
+ var memoized = _.memoize(function(object) {
+ return 'value:' + object.id;
+ });
+
+ var cache = memoized.cache,
+ key1 = { 'id': 'a' },
+ key2 = { 'id': 'b' };
+
+ assert.strictEqual(memoized(key1), 'value:a');
+ assert.strictEqual(cache.has(key1), true);
+
+ assert.strictEqual(memoized(key2), 'value:b');
+ assert.strictEqual(cache.has(key2), true);
+
+ _.memoize.Cache = oldCache;
+ });
+
+ QUnit.test('should works with an immutable `_.memoize.Cache` ', function(assert) {
+ assert.expect(2);
+
+ var oldCache = _.memoize.Cache;
+
+ function Cache() {
+ this.__data__ = [];
+ }
+
+ Cache.prototype = {
+ 'get': function(key) {
+ return _.find(this.__data__, function(entry) {
+ return key === entry.key;
+ }).value;
+ },
+ 'has': function(key) {
+ return _.some(this.__data__, function(entry) {
+ return key === entry.key;
+ });
+ },
+ 'set': function(key, value) {
+ var result = new Cache;
+ result.__data__ = this.__data__.concat({ 'key': key, 'value': value });
+ return result;
+ }
+ };
+
+ _.memoize.Cache = Cache;
+
+ var memoized = _.memoize(function(object) {
+ return object.id;
+ });
+
+ var key1 = { 'id': 'a' },
+ key2 = { 'id': 'b' };
+
+ memoized(key1);
+ memoized(key2);
+
+ var cache = memoized.cache;
+ assert.strictEqual(cache.has(key1), true);
+ assert.strictEqual(cache.has(key2), true);
+
+ _.memoize.Cache = oldCache;
+ });
+
+ QUnit.test('should implement a `Map` interface on the cache object', function(assert) {
+ assert.expect(164);
+
+ var keys = [null, undefined, false, true, 1, -Infinity, NaN, {}, 'a', symbol || {}];
+
+ var pairs = lodashStable.map(keys, function(key, index) {
+ var lastIndex = keys.length - 1;
+ return [key, keys[lastIndex - index]];
+ });
+
+ lodashStable.times(2, function(index) {
+ var memoize = (index ? (lodashBizarro || {}) : _).memoize,
+ Cache = memoize ? memoize.Cache : undefined,
+ cache = Cache ? new Cache(pairs) : undefined;
+
+ lodashStable.each(keys, function(key, index) {
+ if (cache) {
+ var value = pairs[index][1];
+
+ assert.deepEqual(cache.get(key), value);
+ assert.strictEqual(cache.has(key), true);
+ assert.strictEqual(cache['delete'](key), true);
+ assert.strictEqual(cache.has(key), false);
+ assert.strictEqual(cache.get(key), undefined);
+ assert.strictEqual(cache['delete'](key), false);
+ assert.strictEqual(cache.set(key, value), cache);
+ assert.strictEqual(cache.has(key), true);
+ }
+ else {
+ skipAssert(assert, 8);
+ }
+ });
+
+ if (cache) {
+ assert.strictEqual(cache.clear(), undefined);
+ assert.ok(lodashStable.every(keys, function(key) {
+ return !cache.has(key);
+ }));
+ }
+ else {
+ skipAssert(assert, 2);
+ }
+ });
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.merge');
+
+ (function() {
+ var args = arguments;
+
+ QUnit.test('should merge `source` into `object`', function(assert) {
+ assert.expect(1);
+
+ var names = {
+ 'characters': [
+ { 'name': 'barney' },
+ { 'name': 'fred' }
+ ]
+ };
+
+ var ages = {
+ 'characters': [
+ { 'age': 36 },
+ { 'age': 40 }
+ ]
+ };
+
+ var heights = {
+ 'characters': [
+ { 'height': '5\'4"' },
+ { 'height': '5\'5"' }
+ ]
+ };
+
+ var expected = {
+ 'characters': [
+ { 'name': 'barney', 'age': 36, 'height': '5\'4"' },
+ { 'name': 'fred', 'age': 40, 'height': '5\'5"' }
+ ]
+ };
+
+ assert.deepEqual(_.merge(names, ages, heights), expected);
+ });
+
+ QUnit.test('should merge sources containing circular references', function(assert) {
+ assert.expect(2);
+
+ var object = {
+ 'foo': { 'a': 1 },
+ 'bar': { 'a': 2 }
+ };
+
+ var source = {
+ 'foo': { 'b': { 'c': { 'd': {} } } },
+ 'bar': {}
+ };
+
+ source.foo.b.c.d = source;
+ source.bar.b = source.foo.b;
+
+ var actual = _.merge(object, source);
+
+ assert.notStrictEqual(actual.bar.b, actual.foo.b);
+ assert.strictEqual(actual.foo.b.c.d, actual.foo.b.c.d.foo.b.c.d);
+ });
+
+ QUnit.test('should work with four arguments', function(assert) {
+ assert.expect(1);
+
+ var expected = { 'a': 4 },
+ actual = _.merge({ 'a': 1 }, { 'a': 2 }, { 'a': 3 }, expected);
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('should merge onto function `object` values', function(assert) {
+ assert.expect(2);
+
+ function Foo() {}
+
+ var source = { 'a': 1 },
+ actual = _.merge(Foo, source);
+
+ assert.strictEqual(actual, Foo);
+ assert.strictEqual(Foo.a, 1);
+ });
+
+ QUnit.test('should not merge onto nested function values', function(assert) {
+ assert.expect(3);
+
+ var source1 = { 'a': function() {} },
+ source2 = { 'a': { 'b': 1 } },
+ actual = _.merge({}, source1, source2),
+ expected = { 'a': { 'b': 1 } };
+
+ assert.deepEqual(actual, expected);
+
+ source1 = { 'a': function() {} };
+ source2 = { 'a': { 'b': 1 } };
+
+ expected = { 'a': function() {} };
+ expected.a.b = 1;
+
+ actual = _.merge(source1, source2);
+ assert.strictEqual(typeof actual.a, 'function');
+ assert.strictEqual(actual.a.b, 1);
+ });
+
+ QUnit.test('should merge onto non-plain `object` values', function(assert) {
+ assert.expect(2);
+
+ function Foo() {}
+
+ var object = new Foo,
+ actual = _.merge(object, { 'a': 1 });
+
+ assert.strictEqual(actual, object);
+ assert.strictEqual(object.a, 1);
+ });
+
+ QUnit.test('should treat sparse array sources as dense', function(assert) {
+ assert.expect(2);
+
+ var array = [1];
+ array[2] = 3;
+
+ var actual = _.merge([], array),
+ expected = array.slice();
+
+ expected[1] = undefined;
+
+ assert.ok('1' in actual);
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('should merge `arguments` objects', function(assert) {
+ assert.expect(7);
+
+ var object1 = { 'value': args },
+ object2 = { 'value': { '3': 4 } },
+ expected = { '0': 1, '1': 2, '2': 3, '3': 4 },
+ actual = _.merge(object1, object2);
+
+ assert.notOk('3' in args);
+ assert.notOk(_.isArguments(actual.value));
+ assert.deepEqual(actual.value, expected);
+ object1.value = args;
+
+ actual = _.merge(object2, object1);
+ assert.notOk(_.isArguments(actual.value));
+ assert.deepEqual(actual.value, expected);
+
+ expected = { '0': 1, '1': 2, '2': 3 };
+
+ actual = _.merge({}, object1);
+ assert.notOk(_.isArguments(actual.value));
+ assert.deepEqual(actual.value, expected);
+ });
+
+ QUnit.test('should merge typed arrays', function(assert) {
+ assert.expect(4);
+
+ var array1 = [0],
+ array2 = [0, 0],
+ array3 = [0, 0, 0, 0],
+ array4 = [0, 0, 0, 0, 0, 0, 0, 0];
+
+ var arrays = [array2, array1, array4, array3, array2, array4, array4, array3, array2],
+ buffer = ArrayBuffer && new ArrayBuffer(8);
+
+ // Juggle for `Float64Array` shim.
+ if (root.Float64Array && (new Float64Array(buffer)).length == 8) {
+ arrays[1] = array4;
+ }
+ var expected = lodashStable.map(typedArrays, function(type, index) {
+ var array = arrays[index].slice();
+ array[0] = 1;
+ return root[type] ? { 'value': array } : false;
+ });
+
+ var actual = lodashStable.map(typedArrays, function(type) {
+ var Ctor = root[type];
+ return Ctor ? _.merge({ 'value': new Ctor(buffer) }, { 'value': [1] }) : false;
+ });
+
+ assert.ok(lodashStable.isArray(actual));
+ assert.deepEqual(actual, expected);
+
+ expected = lodashStable.map(typedArrays, function(type, index) {
+ var array = arrays[index].slice();
+ array.push(1);
+ return root[type] ? { 'value': array } : false;
+ });
+
+ actual = lodashStable.map(typedArrays, function(type, index) {
+ var Ctor = root[type],
+ array = lodashStable.range(arrays[index].length);
+
+ array.push(1);
+ return Ctor ? _.merge({ 'value': array }, { 'value': new Ctor(buffer) }) : false;
+ });
+
+ assert.ok(lodashStable.isArray(actual));
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('should assign `null` values', function(assert) {
+ assert.expect(1);
+
+ var actual = _.merge({ 'a': 1 }, { 'a': null });
+ assert.strictEqual(actual.a, null);
+ });
+
+ QUnit.test('should assign non array/typed-array/plain-object sources directly', function(assert) {
+ assert.expect(1);
+
+ function Foo() {}
+
+ var values = [new Foo, new Boolean, new Date, Foo, new Number, new String, new RegExp],
+ expected = lodashStable.map(values, alwaysTrue);
+
+ var actual = lodashStable.map(values, function(value) {
+ var object = _.merge({}, { 'value': value });
+ return object.value === value;
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('should deep clone array/typed-array/plain-object sources', function(assert) {
+ assert.expect(1);
+
+ var typedArray = Uint8Array
+ ? new Uint8Array(new ArrayBuffer(2))
+ : { 'buffer': [0, 0] };
+
+ var props = ['0', 'a', 'buffer'],
+ values = [[{ 'a': 1 }], { 'a': [1] }, typedArray],
+ expected = lodashStable.map(values, alwaysTrue);
+
+ var actual = lodashStable.map(values, function(value, index) {
+ var key = props[index],
+ object = _.merge({}, { 'value': value }),
+ newValue = object.value;
+
+ return (
+ newValue !== value &&
+ newValue[key] !== value[key] &&
+ lodashStable.isEqual(newValue, value)
+ );
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('should not augment source objects', function(assert) {
+ assert.expect(6);
+
+ var source1 = { 'a': [{ 'a': 1 }] },
+ source2 = { 'a': [{ 'b': 2 }] },
+ actual = _.merge({}, source1, source2);
+
+ assert.deepEqual(source1.a, [{ 'a': 1 }]);
+ assert.deepEqual(source2.a, [{ 'b': 2 }]);
+ assert.deepEqual(actual.a, [{ 'a': 1, 'b': 2 }]);
+
+ var source1 = { 'a': [[1, 2, 3]] },
+ source2 = { 'a': [[3, 4]] },
+ actual = _.merge({}, source1, source2);
+
+ assert.deepEqual(source1.a, [[1, 2, 3]]);
+ assert.deepEqual(source2.a, [[3, 4]]);
+ assert.deepEqual(actual.a, [[3, 4, 3]]);
+ });
+
+ QUnit.test('should merge plain-objects onto non plain-objects', function(assert) {
+ assert.expect(4);
+
+ function Foo(object) {
+ lodashStable.assign(this, object);
+ }
+
+ var object = { 'a': 1 },
+ actual = _.merge(new Foo, object);
+
+ assert.ok(actual instanceof Foo);
+ assert.deepEqual(actual, new Foo(object));
+
+ actual = _.merge([new Foo], [object]);
+ assert.ok(actual[0] instanceof Foo);
+ assert.deepEqual(actual, [new Foo(object)]);
+ });
+
+ QUnit.test('should not assign `undefined` values', function(assert) {
+ assert.expect(1);
+
+ var actual = _.merge({ 'a': 1 }, { 'a': undefined, 'b': undefined });
+ assert.deepEqual(actual, { 'a': 1 });
+ });
+
+ QUnit.test('should skip `undefined` values in array sources if a destination value exists', function(assert) {
+ assert.expect(2);
+
+ var array = [1];
+ array[2] = 3;
+
+ var actual = _.merge([4, 5, 6], array),
+ expected = [1, 5, 3];
+
+ assert.deepEqual(actual, expected);
+
+ array = [1, , 3];
+ array[1] = undefined;
+
+ actual = _.merge([4, 5, 6], array);
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('should skip merging when `object` and `source` are the same value', function(assert) {
+ assert.expect(1);
+
+ if (defineProperty) {
+ var object = {},
+ pass = true;
+
+ defineProperty(object, 'a', {
+ 'enumerable': true,
+ 'configurable': true,
+ 'get': function() { pass = false; },
+ 'set': function() { pass = false; }
+ });
+
+ _.merge(object, object);
+ assert.ok(pass);
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+
+ QUnit.test('should convert values to arrays when merging arrays of `source`', function(assert) {
+ assert.expect(2);
+
+ var object = { 'a': { '1': 'y', 'b': 'z', 'length': 2 } },
+ actual = _.merge(object, { 'a': ['x'] });
+
+ assert.deepEqual(actual, { 'a': ['x', 'y'] });
+
+ actual = _.merge({ 'a': {} }, { 'a': [] });
+ assert.deepEqual(actual, { 'a': [] });
+ });
+
+ QUnit.test('should not convert strings to arrays when merging arrays of `source`', function(assert) {
+ assert.expect(1);
+
+ var object = { 'a': 'abcde' },
+ actual = _.merge(object, { 'a': ['x', 'y', 'z'] });
+
+ assert.deepEqual(actual, { 'a': ['x', 'y', 'z'] });
+ });
+
+ QUnit.test('should not error on DOM elements', function(assert) {
+ assert.expect(1);
+
+ var object1 = { 'el': document && document.createElement('div') },
+ object2 = { 'el': document && document.createElement('div') },
+ pairs = [[{}, object1], [object1, object2]],
+ expected = lodashStable.map(pairs, alwaysTrue);
+
+ var actual = lodashStable.map(pairs, function(pair) {
+ try {
+ return _.merge(pair[0], pair[1]).el === pair[1].el;
+ } catch (e) {}
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+ }(1, 2, 3));
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.mergeWith');
+
+ (function() {
+ QUnit.test('should handle merging if `customizer` returns `undefined`', function(assert) {
+ assert.expect(2);
+
+ var actual = _.mergeWith({ 'a': { 'b': [1, 1] } }, { 'a': { 'b': [0] } }, noop);
+ assert.deepEqual(actual, { 'a': { 'b': [0, 1] } });
+
+ actual = _.mergeWith([], [undefined], identity);
+ assert.deepEqual(actual, [undefined]);
+ });
+
+ QUnit.test('should defer to `customizer` when it returns a non `undefined` value', function(assert) {
+ assert.expect(1);
+
+ var actual = _.mergeWith({ 'a': { 'b': [0, 1] } }, { 'a': { 'b': [2] } }, function(a, b) {
+ return lodashStable.isArray(a) ? a.concat(b) : undefined;
+ });
+
+ assert.deepEqual(actual, { 'a': { 'b': [0, 1, 2] } });
+ });
+
+ QUnit.test('should overwrite primitives with source object clones', function(assert) {
+ assert.expect(1);
+
+ var actual = _.mergeWith({ 'a': 0 }, { 'a': { 'b': ['c'] } }, function(a, b) {
+ return lodashStable.isArray(a) ? a.concat(b) : undefined;
+ });
+
+ assert.deepEqual(actual, { 'a': { 'b': ['c'] } });
+ });
+
+ QUnit.test('should clone sources when `customizer` result is `undefined`', function(assert) {
+ assert.expect(1);
+
+ var source1 = { 'a': { 'b': { 'c': 1 } } },
+ source2 = { 'a': { 'b': { 'd': 2 } } };
+
+ _.mergeWith({}, source1, source2, noop);
+ assert.deepEqual(source1.a.b, { 'c': 1 });
+ });
+
+ QUnit.test('should pop the stack of sources for each sibling property', function(assert) {
+ assert.expect(1);
+
+ var array = ['b', 'c'],
+ object = { 'a': ['a'] },
+ source = { 'a': array, 'b': array };
+
+ var actual = _.mergeWith(object, source, function(a, b) {
+ return lodashStable.isArray(a) ? a.concat(b) : undefined;
+ });
+
+ assert.deepEqual(actual, { 'a': ['a', 'b', 'c'], 'b': ['b', 'c'] });
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.method');
+
+ (function() {
+ QUnit.test('should create a function that calls a method of a given object', function(assert) {
+ assert.expect(4);
+
+ var object = { 'a': alwaysOne };
+
+ lodashStable.each(['a', ['a']], function(path) {
+ var method = _.method(path);
+ assert.strictEqual(method.length, 1);
+ assert.strictEqual(method(object), 1);
+ });
+ });
+
+ QUnit.test('should work with deep property values', function(assert) {
+ assert.expect(2);
+
+ var object = { 'a': { 'b': alwaysTwo } };
+
+ lodashStable.each(['a.b', ['a', 'b']], function(path) {
+ var method = _.method(path);
+ assert.strictEqual(method(object), 2);
+ });
+ });
+
+ QUnit.test('should work with a non-string `path`', function(assert) {
+ assert.expect(2);
+
+ var array = lodashStable.times(3, _.constant);
+
+ lodashStable.each([1, [1]], function(path) {
+ var method = _.method(path);
+ assert.strictEqual(method(array), 1);
+ });
+ });
+
+ QUnit.test('should coerce key to a string', function(assert) {
+ assert.expect(1);
+
+ function fn() {}
+ fn.toString = lodashStable.constant('fn');
+
+ var expected = [1, 1, 2, 2, 3, 3, 4, 4],
+ objects = [{ 'null': alwaysOne }, { 'undefined': alwaysTwo }, { 'fn': alwaysThree }, { '[object Object]': alwaysFour }],
+ values = [null, undefined, fn, {}];
+
+ var actual = lodashStable.transform(objects, function(result, object, index) {
+ var key = values[index];
+ lodashStable.each([key, [key]], function(path) {
+ var method = _.method(key);
+ result.push(method(object));
+ });
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('should work with inherited property values', function(assert) {
+ assert.expect(2);
+
+ function Foo() {}
+ Foo.prototype.a = alwaysOne;
+
+ lodashStable.each(['a', ['a']], function(path) {
+ var method = _.method(path);
+ assert.strictEqual(method(new Foo), 1);
+ });
+ });
+
+ QUnit.test('should use a key over a path', function(assert) {
+ assert.expect(2);
+
+ var object = { 'a.b': alwaysOne, 'a': { 'b': alwaysTwo } };
+
+ lodashStable.each(['a.b', ['a.b']], function(path) {
+ var method = _.method(path);
+ assert.strictEqual(method(object), 1);
+ });
+ });
+
+ QUnit.test('should return `undefined` when `object` is nullish', function(assert) {
+ assert.expect(2);
+
+ var values = [, null, undefined],
+ expected = lodashStable.map(values, noop);
+
+ lodashStable.each(['constructor', ['constructor']], function(path) {
+ var method = _.method(path);
+
+ var actual = lodashStable.map(values, function(value, index) {
+ return index ? method(value) : method();
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+ });
+
+ QUnit.test('should return `undefined` with deep paths when `object` is nullish', function(assert) {
+ assert.expect(2);
+
+ var values = [, null, undefined],
+ expected = lodashStable.map(values, noop);
+
+ lodashStable.each(['constructor.prototype.valueOf', ['constructor', 'prototype', 'valueOf']], function(path) {
+ var method = _.method(path);
+
+ var actual = lodashStable.map(values, function(value, index) {
+ return index ? method(value) : method();
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+ });
+
+ QUnit.test('should return `undefined` if parts of `path` are missing', function(assert) {
+ assert.expect(4);
+
+ var object = {};
+
+ lodashStable.each(['a', 'a[1].b.c', ['a'], ['a', '1', 'b', 'c']], function(path) {
+ var method = _.method(path);
+ assert.strictEqual(method(object), undefined);
+ });
+ });
+
+ QUnit.test('should apply partial arguments to function', function(assert) {
+ assert.expect(2);
+
+ var object = {
+ 'fn': function() {
+ return slice.call(arguments);
+ }
+ };
+
+ lodashStable.each(['fn', ['fn']], function(path) {
+ var method = _.method(path, 1, 2, 3);
+ assert.deepEqual(method(object), [1, 2, 3]);
+ });
+ });
+
+ QUnit.test('should invoke deep property methods with the correct `this` binding', function(assert) {
+ assert.expect(2);
+
+ var object = { 'a': { 'b': function() { return this.c; }, 'c': 1 } };
+
+ lodashStable.each(['a.b', ['a', 'b']], function(path) {
+ var method = _.method(path);
+ assert.strictEqual(method(object), 1);
+ });
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.methodOf');
+
+ (function() {
+ QUnit.test('should create a function that calls a method of a given key', function(assert) {
+ assert.expect(4);
+
+ var object = { 'a': alwaysOne };
+
+ lodashStable.each(['a', ['a']], function(path) {
+ var methodOf = _.methodOf(object);
+ assert.strictEqual(methodOf.length, 1);
+ assert.strictEqual(methodOf(path), 1);
+ });
+ });
+
+ QUnit.test('should work with deep property values', function(assert) {
+ assert.expect(2);
+
+ var object = { 'a': { 'b': alwaysTwo } };
+
+ lodashStable.each(['a.b', ['a', 'b']], function(path) {
+ var methodOf = _.methodOf(object);
+ assert.strictEqual(methodOf(path), 2);
+ });
+ });
+
+ QUnit.test('should work with a non-string `path`', function(assert) {
+ assert.expect(2);
+
+ var array = lodashStable.times(3, _.constant);
+
+ lodashStable.each([1, [1]], function(path) {
+ var methodOf = _.methodOf(array);
+ assert.strictEqual(methodOf(path), 1);
+ });
+ });
+
+ QUnit.test('should coerce key to a string', function(assert) {
+ assert.expect(1);
+
+ function fn() {}
+ fn.toString = lodashStable.constant('fn');
+
+ var expected = [1, 1, 2, 2, 3, 3, 4, 4],
+ objects = [{ 'null': alwaysOne }, { 'undefined': alwaysTwo }, { 'fn': alwaysThree }, { '[object Object]': alwaysFour }],
+ values = [null, undefined, fn, {}];
+
+ var actual = lodashStable.transform(objects, function(result, object, index) {
+ var key = values[index];
+ lodashStable.each([key, [key]], function(path) {
+ var methodOf = _.methodOf(object);
+ result.push(methodOf(key));
+ });
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('should work with inherited property values', function(assert) {
+ assert.expect(2);
+
+ function Foo() {}
+ Foo.prototype.a = alwaysOne;
+
+ lodashStable.each(['a', ['a']], function(path) {
+ var methodOf = _.methodOf(new Foo);
+ assert.strictEqual(methodOf(path), 1);
+ });
+ });
+
+ QUnit.test('should use a key over a path', function(assert) {
+ assert.expect(2);
+
+ var object = { 'a.b': alwaysOne, 'a': { 'b': alwaysTwo } };
+
+ lodashStable.each(['a.b', ['a.b']], function(path) {
+ var methodOf = _.methodOf(object);
+ assert.strictEqual(methodOf(path), 1);
+ });
+ });
+
+ QUnit.test('should return `undefined` when `object` is nullish', function(assert) {
+ assert.expect(2);
+
+ var values = [, null, undefined],
+ expected = lodashStable.map(values, noop);
+
+ lodashStable.each(['constructor', ['constructor']], function(path) {
+ var actual = lodashStable.map(values, function(value, index) {
+ var methodOf = index ? _.methodOf() : _.methodOf(value);
+ return methodOf(path);
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+ });
+
+ QUnit.test('should return `undefined` with deep paths when `object` is nullish', function(assert) {
+ assert.expect(2);
+
+ var values = [, null, undefined],
+ expected = lodashStable.map(values, noop);
+
+ lodashStable.each(['constructor.prototype.valueOf', ['constructor', 'prototype', 'valueOf']], function(path) {
+ var actual = lodashStable.map(values, function(value, index) {
+ var methodOf = index ? _.methodOf() : _.methodOf(value);
+ return methodOf(path);
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+ });
+
+ QUnit.test('should return `undefined` if parts of `path` are missing', function(assert) {
+ assert.expect(4);
+
+ var object = {},
+ methodOf = _.methodOf(object);
+
+ lodashStable.each(['a', 'a[1].b.c', ['a'], ['a', '1', 'b', 'c']], function(path) {
+ assert.strictEqual(methodOf(path), undefined);
+ });
+ });
+
+ QUnit.test('should apply partial arguments to function', function(assert) {
+ assert.expect(2);
+
+ var object = {
+ 'fn': function() {
+ return slice.call(arguments);
+ }
+ };
+
+ var methodOf = _.methodOf(object, 1, 2, 3);
+
+ lodashStable.each(['fn', ['fn']], function(path) {
+ assert.deepEqual(methodOf(path), [1, 2, 3]);
+ });
+ });
+
+ QUnit.test('should invoke deep property methods with the correct `this` binding', function(assert) {
+ assert.expect(2);
+
+ var object = { 'a': { 'b': function() { return this.c; }, 'c': 1 } },
+ methodOf = _.methodOf(object);
+
+ lodashStable.each(['a.b', ['a', 'b']], function(path) {
+ assert.strictEqual(methodOf(path), 1);
+ });
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.min');
+
+ (function() {
+ QUnit.test('should return the smallest value from a collection', function(assert) {
+ assert.expect(1);
+
+ assert.strictEqual(_.min([1, 2, 3]), 1);
+ });
+
+ QUnit.test('should return `undefined` for empty collections', function(assert) {
+ assert.expect(1);
+
+ var values = falsey.concat([[]]),
+ expected = lodashStable.map(values, noop);
+
+ var actual = lodashStable.map(values, function(value, index) {
+ try {
+ return index ? _.min(value) : _.min();
+ } catch (e) {}
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('should work with non-numeric collection values', function(assert) {
+ assert.expect(1);
+
+ assert.strictEqual(_.min(['a', 'b']), 'a');
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('extremum methods');
+
+ lodashStable.each(['max', 'maxBy', 'min', 'minBy'], function(methodName) {
+ var func = _[methodName],
+ isMax = /^max/.test(methodName);
+
+ QUnit.test('`_.' + methodName + '` should work with Date objects', function(assert) {
+ assert.expect(1);
+
+ var curr = new Date,
+ past = new Date(0);
+
+ assert.strictEqual(func([curr, past]), isMax ? curr : past);
+ });
+
+ QUnit.test('`_.' + methodName + '` should work with extremely large arrays', function(assert) {
+ assert.expect(1);
+
+ var array = lodashStable.range(0, 5e5);
+ assert.strictEqual(func(array), isMax ? 499999 : 0);
+ });
+
+ QUnit.test('`_.' + methodName + '` should work when chaining on an array with only one value', function(assert) {
+ assert.expect(1);
+
+ if (!isNpm) {
+ var actual = _([40])[methodName]();
+ assert.strictEqual(actual, 40);
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+ });
+
+ lodashStable.each(['maxBy', 'minBy'], function(methodName) {
+ var array = [1, 2, 3],
+ func = _[methodName],
+ isMax = methodName == 'maxBy';
+
+ QUnit.test('`_.' + methodName + '` should work with an `iteratee` argument', function(assert) {
+ assert.expect(1);
+
+ var actual = func(array, function(n) {
+ return -n;
+ });
+
+ assert.strictEqual(actual, isMax ? 1 : 3);
+ });
+
+ QUnit.test('should work with `_.property` shorthands', function(assert) {
+ assert.expect(2);
+
+ var objects = [{ 'a': 2 }, { 'a': 3 }, { 'a': 1 }],
+ actual = func(objects, 'a');
+
+ assert.deepEqual(actual, objects[isMax ? 1 : 2]);
+
+ var arrays = [[2], [3], [1]];
+ actual = func(arrays, 0);
+
+ assert.deepEqual(actual, arrays[isMax ? 1 : 2]);
+ });
+
+ QUnit.test('`_.' + methodName + '` should work when `iteratee` returns +/-Infinity', function(assert) {
+ assert.expect(1);
+
+ var value = isMax ? -Infinity : Infinity,
+ object = { 'a': value };
+
+ var actual = func([object, { 'a': value }], function(object) {
+ return object.a;
+ });
+
+ assert.strictEqual(actual, object);
+ });
+ });
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.mixin');
+
+ (function() {
+ function reset(wrapper) {
+ delete wrapper.a;
+ delete wrapper.prototype.a;
+ delete wrapper.b;
+ delete wrapper.prototype.b;
+ }
+
+ function Wrapper(value) {
+ if (!(this instanceof Wrapper)) {
+ return new Wrapper(value);
+ }
+ if (_.has(value, '__wrapped__')) {
+ var actions = slice.call(value.__actions__),
+ chain = value.__chain__;
+
+ value = value.__wrapped__;
+ }
+ this.__wrapped__ = value;
+ this.__actions__ = actions || [];
+ this.__chain__ = chain || false;
+ }
+
+ Wrapper.prototype.value = function() {
+ return getUnwrappedValue(this);
+ };
+
+ var array = ['a'],
+ source = { 'a': function(array) { return array[0]; }, 'b': 'B' };
+
+ QUnit.test('should mixin `source` methods into lodash', function(assert) {
+ assert.expect(4);
+
+ if (!isNpm) {
+ _.mixin(source);
+
+ assert.strictEqual(_.a(array), 'a');
+ assert.strictEqual(_(array).a().value(), 'a');
+ assert.notOk('b' in _);
+ assert.notOk('b' in _.prototype);
+
+ reset(_);
+ }
+ else {
+ skipAssert(assert, 4);
+ }
+ });
+
+ QUnit.test('should mixin chaining methods by reference', function(assert) {
+ assert.expect(2);
+
+ if (!isNpm) {
+ _.mixin(source);
+ _.a = alwaysB;
+
+ assert.strictEqual(_.a(array), 'b');
+ assert.strictEqual(_(array).a().value(), 'a');
+
+ reset(_);
+ }
+ else {
+ skipAssert(assert, 2);
+ }
+ });
+
+ QUnit.test('should use a default `object` of `this`', function(assert) {
+ assert.expect(3);
+
+ var object = lodashStable.create(_);
+ object.mixin(source);
+
+ assert.strictEqual(object.a(array), 'a');
+ assert.notOk('a' in _);
+ assert.notOk('a' in _.prototype);
+
+ reset(_);
+ });
+
+ QUnit.test('should accept an `object` argument', function(assert) {
+ assert.expect(1);
+
+ var object = {};
+ _.mixin(object, source);
+ assert.strictEqual(object.a(array), 'a');
+ });
+
+ QUnit.test('should accept a function `object`', function(assert) {
+ assert.expect(2);
+
+ _.mixin(Wrapper, source);
+
+ var wrapped = Wrapper(array),
+ actual = wrapped.a();
+
+ assert.strictEqual(actual.value(), 'a');
+ assert.ok(actual instanceof Wrapper);
+
+ reset(Wrapper);
+ });
+
+ QUnit.test('should return `object`', function(assert) {
+ assert.expect(3);
+
+ var object = {};
+ assert.strictEqual(_.mixin(object, source), object);
+ assert.strictEqual(_.mixin(Wrapper, source), Wrapper);
+ assert.strictEqual(_.mixin(), _);
+
+ reset(Wrapper);
+ });
+
+ QUnit.test('should not assign inherited `source` methods', function(assert) {
+ assert.expect(1);
+
+ function Foo() {}
+ Foo.prototype.a = noop;
+
+ var object = {};
+ assert.strictEqual(_.mixin(object, new Foo), object);
+ });
+
+ QUnit.test('should accept an `options` argument', function(assert) {
+ assert.expect(8);
+
+ function message(func, chain) {
+ return (func === _ ? 'lodash' : 'given') + ' function should ' + (chain ? '' : 'not ') + 'chain';
+ }
+
+ lodashStable.each([_, Wrapper], function(func) {
+ lodashStable.each([{ 'chain': false }, { 'chain': true }], function(options) {
+ if (!isNpm) {
+ if (func === _) {
+ _.mixin(source, options);
+ } else {
+ _.mixin(func, source, options);
+ }
+ var wrapped = func(array),
+ actual = wrapped.a();
+
+ if (options.chain) {
+ assert.strictEqual(actual.value(), 'a', message(func, true));
+ assert.ok(actual instanceof func, message(func, true));
+ } else {
+ assert.strictEqual(actual, 'a', message(func, false));
+ assert.notOk(actual instanceof func, message(func, false));
+ }
+ reset(func);
+ }
+ else {
+ skipAssert(assert, 2);
+ }
+ });
+ });
+ });
+
+ QUnit.test('should not extend lodash when an `object` is given with an empty `options` object', function(assert) {
+ assert.expect(1);
+
+ _.mixin({ 'a': noop }, {});
+ assert.notOk('a' in _);
+ reset(_);
+ });
+
+ QUnit.test('should not error for non-object `options` values', function(assert) {
+ assert.expect(2);
+
+ var pass = true;
+
+ try {
+ _.mixin({}, source, 1);
+ } catch (e) {
+ pass = false;
+ }
+ assert.ok(pass);
+
+ pass = true;
+
+ try {
+ _.mixin(source, 1);
+ } catch (e) {
+ pass = false;
+ }
+ assert.ok(pass);
+
+ reset(_);
+ });
+
+ QUnit.test('should not return the existing wrapped value when chaining', function(assert) {
+ assert.expect(2);
+
+ lodashStable.each([_, Wrapper], function(func) {
+ if (!isNpm) {
+ if (func === _) {
+ var wrapped = _(source),
+ actual = wrapped.mixin();
+
+ assert.strictEqual(actual.value(), _);
+ }
+ else {
+ wrapped = _(func);
+ actual = wrapped.mixin(source);
+ assert.notStrictEqual(actual, wrapped);
+ }
+ reset(func);
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+ });
+
+ QUnit.test('should produce methods that work in a lazy sequence', function(assert) {
+ assert.expect(1);
+
+ if (!isNpm) {
+ _.mixin({ 'a': _.countBy, 'b': _.filter });
+
+ var array = lodashStable.range(LARGE_ARRAY_SIZE),
+ actual = _(array).a().map(square).b(isEven).take().value();
+
+ assert.deepEqual(actual, _.take(_.b(_.map(_.a(array), square), isEven)));
+
+ reset(_);
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.multiply');
+
+ (function() {
+ QUnit.test('should multiply two numbers', function(assert) {
+ assert.expect(3);
+
+ assert.strictEqual(_.multiply(6, 4), 24);
+ assert.strictEqual(_.multiply(-6, 4), -24);
+ assert.strictEqual(_.multiply(-6, -4), 24);
+ });
+
+ QUnit.test('should coerce arguments to numbers', function(assert) {
+ assert.expect(2);
+
+ assert.strictEqual(_.multiply('6', '4'), 24);
+ assert.deepEqual(_.multiply('x', 'y'), NaN);
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.orderBy');
+
+ (function() {
+ var objects = [
+ { 'a': 'x', 'b': 3 },
+ { 'a': 'y', 'b': 4 },
+ { 'a': 'x', 'b': 1 },
+ { 'a': 'y', 'b': 2 }
+ ];
+
+ QUnit.test('should sort by a single property by a specified order', function(assert) {
+ assert.expect(1);
+
+ var actual = _.orderBy(objects, 'a', 'desc');
+ assert.deepEqual(actual, [objects[1], objects[3], objects[0], objects[2]]);
+ });
+
+ QUnit.test('should sort by multiple properties by specified orders', function(assert) {
+ assert.expect(1);
+
+ var actual = _.orderBy(objects, ['a', 'b'], ['desc', 'asc']);
+ assert.deepEqual(actual, [objects[3], objects[1], objects[2], objects[0]]);
+ });
+
+ QUnit.test('should sort by a property in ascending order when its order is not specified', function(assert) {
+ assert.expect(2);
+
+ var expected = [objects[2], objects[0], objects[3], objects[1]],
+ actual = _.orderBy(objects, ['a', 'b']);
+
+ assert.deepEqual(actual, expected);
+
+ expected = lodashStable.map(falsey, lodashStable.constant([objects[3], objects[1], objects[2], objects[0]]));
+
+ actual = lodashStable.map(falsey, function(order, index) {
+ return _.orderBy(objects, ['a', 'b'], index ? ['desc', order] : ['desc']);
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('should work with `orders` specified as string objects', function(assert) {
+ assert.expect(1);
+
+ var actual = _.orderBy(objects, ['a'], [Object('desc')]);
+ assert.deepEqual(actual, [objects[1], objects[3], objects[0], objects[2]]);
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.overArgs');
+
+ (function() {
+ function fn() {
+ return slice.call(arguments);
+ }
+
+ QUnit.test('should transform each argument', function(assert) {
+ assert.expect(1);
+
+ var over = _.overArgs(fn, doubled, square);
+ assert.deepEqual(over(5, 10), [10, 100]);
+ });
+
+ QUnit.test('should use `_.identity` when a predicate is nullish', function(assert) {
+ assert.expect(1);
+
+ var over = _.overArgs(fn, undefined, null);
+ assert.deepEqual(over('a', 'b'), ['a', 'b']);
+ });
+
+ QUnit.test('should work with `_.property` shorthands', function(assert) {
+ assert.expect(1);
+
+ var over = _.overArgs(fn, 'b', 'a');
+ assert.deepEqual(over({ 'b': 2 }, { 'a': 1 }), [2, 1]);
+ });
+
+ QUnit.test('should work with `_.matches` shorthands', function(assert) {
+ assert.expect(1);
+
+ var over = _.overArgs(fn, { 'b': 1 }, { 'a': 1 });
+ assert.deepEqual(over({ 'b': 2 }, { 'a': 1 }), [false, true]);
+ });
+
+ QUnit.test('should work with `_.matchesProperty` shorthands', function(assert) {
+ assert.expect(1);
+
+ var over = _.overArgs(fn, ['b', 1], [['a', 1]]);
+ assert.deepEqual(over({ 'b': 2 }, { 'a': 1 }), [false, true]);
+ });
+
+ QUnit.test('should differentiate between `_.property` and `_.matchesProperty` shorthands', function(assert) {
+ assert.expect(2);
+
+ var over = _.overArgs(fn, ['a', 1]);
+ assert.deepEqual(over({ 'a': 1 }, { '1': 2 }), [1, 2]);
+
+ over = _.overArgs(fn, [['a', 1]]);
+ assert.deepEqual(over({ 'a': 1 }), [true]);
+ });
+
+ QUnit.test('should flatten `transforms`', function(assert) {
+ assert.expect(1);
+
+ var over = _.overArgs(fn, [doubled, square], String);
+ assert.deepEqual(over(5, 10, 15), [10, 100, '15']);
+ });
+
+ QUnit.test('should not transform any argument greater than the number of transforms', function(assert) {
+ assert.expect(1);
+
+ var over = _.overArgs(fn, doubled, square);
+ assert.deepEqual(over(5, 10, 18), [10, 100, 18]);
+ });
+
+ QUnit.test('should not transform any arguments if no transforms are given', function(assert) {
+ assert.expect(1);
+
+ var over = _.overArgs(fn);
+ assert.deepEqual(over(5, 10, 18), [5, 10, 18]);
+ });
+
+ QUnit.test('should not pass `undefined` if there are more transforms than arguments', function(assert) {
+ assert.expect(1);
+
+ var over = _.overArgs(fn, doubled, identity);
+ assert.deepEqual(over(5), [10]);
+ });
+
+ QUnit.test('should provide the correct argument to each transform', function(assert) {
+ assert.expect(1);
+
+ var argsList = [],
+ transform = function() { argsList.push(slice.call(arguments)); },
+ over = _.overArgs(noop, transform, transform, transform);
+
+ over('a', 'b');
+ assert.deepEqual(argsList, [['a'], ['b']]);
+ });
+
+ QUnit.test('should use `this` binding of function for `transforms`', function(assert) {
+ assert.expect(1);
+
+ var over = _.overArgs(function(x) {
+ return this[x];
+ }, function(x) {
+ return this === x;
+ });
+
+ var object = { 'over': over, 'true': 1 };
+ assert.strictEqual(object.over(object), 1);
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.negate');
+
+ (function() {
+ QUnit.test('should create a function that negates the result of `func`', function(assert) {
+ assert.expect(2);
+
+ var negate = _.negate(isEven);
+
+ assert.strictEqual(negate(1), true);
+ assert.strictEqual(negate(2), false);
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.noop');
+
+ (function() {
+ QUnit.test('should return `undefined`', function(assert) {
+ assert.expect(1);
+
+ var values = empties.concat(true, new Date, _, 1, /x/, 'a'),
+ expected = lodashStable.map(values, noop);
+
+ var actual = lodashStable.map(values, function(value, index) {
+ return index ? _.noop(value) : _.noop();
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.noConflict');
+
+ (function() {
+ QUnit.test('should return the `lodash` function', function(assert) {
+ assert.expect(2);
+
+ if (!isModularize) {
+ assert.strictEqual(_.noConflict(), oldDash);
+ assert.notStrictEqual(root._, oldDash);
+ root._ = oldDash;
+ }
+ else {
+ skipAssert(assert, 2);
+ }
+ });
+
+ QUnit.test('should restore `_` only if `lodash` is the current `_` value', function(assert) {
+ assert.expect(2);
+
+ if (!isModularize) {
+ var object = root._ = {};
+ assert.strictEqual(_.noConflict(), oldDash);
+ assert.strictEqual(root._, object);
+ root._ = oldDash;
+ }
+ else {
+ skipAssert(assert, 2);
+ }
+ });
+
+ QUnit.test('should work with a `root` of `this`', function(assert) {
+ assert.expect(2);
+
+ if (!isModularize && !coverage && (!document && realm.object)) {
+ var fs = require('fs'),
+ vm = require('vm'),
+ expected = {},
+ context = vm.createContext({ '_': expected, 'console': console }),
+ source = fs.readFileSync(filePath, 'utf8');
+
+ vm.runInContext(source + '\nthis.lodash = this._.noConflict()', context);
+
+ assert.strictEqual(context._, expected);
+ assert.ok(context.lodash);
+ }
+ else {
+ skipAssert(assert, 2);
+ }
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.now');
+
+ (function() {
+ QUnit.test('should return the number of milliseconds that have elapsed since the Unix epoch', function(assert) {
+ assert.expect(2);
+
+ var done = assert.async();
+
+ var stamp = +new Date,
+ actual = _.now();
+
+ assert.ok(actual >= stamp);
+
+ setTimeout(function() {
+ assert.ok(_.now() > actual);
+ done();
+ }, 32);
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.nth');
+
+ (function() {
+ var array = ['a', 'b', 'c', 'd'];
+
+ QUnit.test('should get the nth element of `array`', function(assert) {
+ assert.expect(1);
+
+ var actual = lodashStable.map(array, function(value, index) {
+ return _.nth(array, index);
+ });
+
+ assert.deepEqual(actual, array);
+ });
+
+ QUnit.test('should work with a negative `n`', function(assert) {
+ assert.expect(1);
+
+ var actual = lodashStable.map(lodashStable.range(1, array.length + 1), function(n) {
+ return _.nth(array, -n);
+ });
+
+ assert.deepEqual(actual, ['d', 'c', 'b', 'a']);
+ });
+
+ QUnit.test('should coerce `n` to an integer', function(assert) {
+ assert.expect(2);
+
+ var values = falsey,
+ expected = lodashStable.map(values, alwaysA);
+
+ var actual = lodashStable.map(values, function(n) {
+ return n ? _.nth(array, n) : _.nth(array);
+ });
+
+ assert.deepEqual(actual, expected);
+
+ values = ['1', 1.6];
+ expected = lodashStable.map(values, alwaysB);
+
+ actual = lodashStable.map(values, function(n) {
+ return _.nth(array, n);
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('should return `undefined` for empty arrays', function(assert) {
+ assert.expect(1);
+
+ var values = [null, undefined, []],
+ expected = lodashStable.map(values, noop);
+
+ var actual = lodashStable.map(values, function(array) {
+ return _.nth(array, 1);
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('should return `undefined` for non-indexes', function(assert) {
+ assert.expect(1);
+
+ var array = [1, 2],
+ values = [Infinity, array.length],
+ expected = lodashStable.map(values, noop);
+
+ array[-1] = 3;
+
+ var actual = lodashStable.map(values, function(n) {
+ return _.nth(array, n);
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.nthArg');
+
+ (function() {
+ var args = ['a', 'b', 'c', 'd'];
+
+ QUnit.test('should create a function that returns its nth argument', function(assert) {
+ assert.expect(1);
+
+ var actual = lodashStable.map(args, function(value, index) {
+ var func = _.nthArg(index);
+ return func.apply(undefined, args);
+ });
+
+ assert.deepEqual(actual, args);
+ });
+
+ QUnit.test('should work with a negative `n`', function(assert) {
+ assert.expect(1);
+
+ var actual = lodashStable.map(lodashStable.range(1, args.length + 1), function(n) {
+ var func = _.nthArg(-n);
+ return func.apply(undefined, args);
+ });
+
+ assert.deepEqual(actual, ['d', 'c', 'b', 'a']);
+ });
+
+ QUnit.test('should coerce `n` to an integer', function(assert) {
+ assert.expect(2);
+
+ var values = falsey,
+ expected = lodashStable.map(values, alwaysA);
+
+ var actual = lodashStable.map(values, function(n) {
+ var func = n ? _.nthArg(n) : _.nthArg();
+ return func.apply(undefined, args);
+ });
+
+ assert.deepEqual(actual, expected);
+
+ values = ['1', 1.6];
+ expected = lodashStable.map(values, alwaysB);
+
+ actual = lodashStable.map(values, function(n) {
+ var func = _.nthArg(n);
+ return func.apply(undefined, args);
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('should return `undefined` for empty arrays', function(assert) {
+ assert.expect(1);
+
+ var func = _.nthArg(1);
+ assert.strictEqual(func(), undefined);
+ });
+
+ QUnit.test('should return `undefined` for non-indexes', function(assert) {
+ assert.expect(1);
+
+ var values = [Infinity, args.length],
+ expected = lodashStable.map(values, noop);
+
+ var actual = lodashStable.map(values, function(n) {
+ var func = _.nthArg(n);
+ return func.apply(undefined, args);
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.omit');
+
+ (function() {
+ var args = arguments,
+ object = { 'a': 1, 'b': 2, 'c': 3, 'd': 4 };
+
+ QUnit.test('should flatten `props`', function(assert) {
+ assert.expect(2);
+
+ assert.deepEqual(_.omit(object, 'a', 'c'), { 'b': 2, 'd': 4 });
+ assert.deepEqual(_.omit(object, ['a', 'd'], 'c'), { 'b': 2 });
+ });
+
+ QUnit.test('should work with a primitive `object` argument', function(assert) {
+ assert.expect(1);
+
+ stringProto.a = 1;
+ stringProto.b = 2;
+
+ assert.deepEqual(_.omit('', 'b'), { 'a': 1 });
+
+ delete stringProto.a;
+ delete stringProto.b;
+ });
+
+ QUnit.test('should return an empty object when `object` is nullish', function(assert) {
+ assert.expect(2);
+
+ objectProto.a = 1;
+ lodashStable.each([null, undefined], function(value) {
+ assert.deepEqual(_.omit(value, 'valueOf'), {});
+ });
+ delete objectProto.a;
+ });
+
+ QUnit.test('should work with `arguments` objects as secondary arguments', function(assert) {
+ assert.expect(1);
+
+ assert.deepEqual(_.omit(object, args), { 'b': 2, 'd': 4 });
+ });
+
+ QUnit.test('should coerce property names to strings', function(assert) {
+ assert.expect(1);
+
+ assert.deepEqual(_.omit({ '0': 'a' }, 0), {});
+ });
+ }('a', 'c'));
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.omitBy');
+
+ (function() {
+ QUnit.test('should work with a predicate argument', function(assert) {
+ assert.expect(1);
+
+ var object = { 'a': 1, 'b': 2, 'c': 3, 'd': 4 };
+
+ var actual = _.omitBy(object, function(n) {
+ return n != 2 && n != 4;
+ });
+
+ assert.deepEqual(actual, { 'b': 2, 'd': 4 });
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('omit methods');
+
+ lodashStable.each(['omit', 'omitBy'], function(methodName) {
+ var expected = { 'b': 2, 'd': 4 },
+ func = _[methodName],
+ object = { 'a': 1, 'b': 2, 'c': 3, 'd': 4 },
+ prop = lodashStable.nthArg(1);
+
+ if (methodName == 'omitBy') {
+ prop = function(object, props) {
+ props = lodashStable.castArray(props);
+ return function(value) {
+ return lodashStable.some(props, function(key) {
+ key = lodashStable.isSymbol(key) ? key : lodashStable.toString(key);
+ return object[key] === value;
+ });
+ };
+ };
+ }
+ QUnit.test('`_.' + methodName + '` should create an object with omitted string keyed properties', function(assert) {
+ assert.expect(2);
+
+ assert.deepEqual(func(object, prop(object, 'a')), { 'b': 2, 'c': 3, 'd': 4 });
+ assert.deepEqual(func(object, prop(object, ['a', 'c'])), expected);
+ });
+
+ QUnit.test('`_.' + methodName + '` should include inherited string keyed properties', function(assert) {
+ assert.expect(1);
+
+ function Foo() {}
+ Foo.prototype = object;
+
+ assert.deepEqual(func(new Foo, prop(object, ['a', 'c'])), expected);
+ });
+
+ QUnit.test('`_.' + methodName + '` should preserve the sign of `0`', function(assert) {
+ assert.expect(1);
+
+ var object = { '-0': 'a', '0': 'b' },
+ props = [-0, Object(-0), 0, Object(0)],
+ expected = [{ '0': 'b' }, { '0': 'b' }, { '-0': 'a' }, { '-0': 'a' }];
+
+ var actual = lodashStable.map(props, function(key) {
+ return func(object, prop(object, key));
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('`_.' + methodName + '` should include symbol properties', function(assert) {
+ assert.expect(2);
+
+ function Foo() {
+ this.a = 0;
+ this[symbol] = 1;
+ }
+
+ if (Symbol) {
+ var symbol2 = Symbol('b');
+ Foo.prototype[symbol2] = 2;
+
+ var foo = new Foo,
+ actual = func(foo, prop(foo, 'a'));
+
+ assert.strictEqual(actual[symbol], 1);
+ assert.strictEqual(actual[symbol2], 2);
+ }
+ else {
+ skipAssert(assert, 2);
+ }
+ });
+
+ QUnit.test('`_.' + methodName + '` should create an object with omitted symbol properties', function(assert) {
+ assert.expect(6);
+
+ function Foo() {
+ this.a = 0;
+ this[symbol] = 1;
+ }
+
+ if (Symbol) {
+ var symbol2 = Symbol('b');
+ Foo.prototype[symbol2] = 2;
+
+ var foo = new Foo,
+ actual = func(foo, prop(foo, symbol));
+
+ assert.strictEqual(actual.a, 0);
+ assert.strictEqual(actual[symbol], undefined);
+ assert.strictEqual(actual[symbol2], 2);
+
+ actual = func(foo, prop(foo, symbol2));
+
+ assert.strictEqual(actual.a, 0);
+ assert.strictEqual(actual[symbol], 1);
+ assert.strictEqual(actual[symbol2], undefined);
+ }
+ else {
+ skipAssert(assert, 6);
+ }
+ });
+
+ QUnit.test('`_.' + methodName + '` should work with an array `object` argument', function(assert) {
+ assert.expect(1);
+
+ var array = [1, 2, 3];
+ assert.deepEqual(func(array, prop(array, ['0', '2'])), { '1': 2 });
+ });
+ });
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.once');
+
+ (function() {
+ QUnit.test('should invoke `func` once', function(assert) {
+ assert.expect(2);
+
+ var count = 0,
+ once = _.once(function() { return ++count; });
+
+ once();
+ assert.strictEqual(once(), 1);
+ assert.strictEqual(count, 1);
+ });
+
+ QUnit.test('should ignore recursive calls', function(assert) {
+ assert.expect(2);
+
+ var count = 0;
+
+ var once = _.once(function() {
+ once();
+ return ++count;
+ });
+
+ assert.strictEqual(once(), 1);
+ assert.strictEqual(count, 1);
+ });
+
+ QUnit.test('should not throw more than once', function(assert) {
+ assert.expect(2);
+
+ var pass = true;
+
+ var once = _.once(function() {
+ throw new Error;
+ });
+
+ assert.raises(once);
+
+ try {
+ once();
+ } catch (e) {
+ pass = false;
+ }
+ assert.ok(pass);
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.over');
+
+ (function() {
+ QUnit.test('should create a function that invokes `iteratees`', function(assert) {
+ assert.expect(1);
+
+ var over = _.over(Math.max, Math.min);
+ assert.deepEqual(over(1, 2, 3, 4), [4, 1]);
+ });
+
+ QUnit.test('should use `_.identity` when a predicate is nullish', function(assert) {
+ assert.expect(1);
+
+ var over = _.over(undefined, null);
+ assert.deepEqual(over('a', 'b', 'c'), ['a', 'a']);
+ });
+
+ QUnit.test('should work with `_.property` shorthands', function(assert) {
+ assert.expect(1);
+
+ var over = _.over('b', 'a');
+ assert.deepEqual(over({ 'a': 1, 'b': 2 }), [2, 1]);
+ });
+
+ QUnit.test('should work with `_.matches` shorthands', function(assert) {
+ assert.expect(1);
+
+ var over = _.over({ 'b': 1 }, { 'a': 1 });
+ assert.deepEqual(over({ 'a': 1, 'b': 2 }), [false, true]);
+ });
+
+ QUnit.test('should work with `_.matchesProperty` shorthands', function(assert) {
+ assert.expect(2);
+
+ var over = _.over(['b', 2], [['a', 2]]);
+
+ assert.deepEqual(over({ 'a': 1, 'b': 2 }), [true, false]);
+ assert.deepEqual(over({ 'a': 2, 'b': 1 }), [false, true]);
+ });
+
+ QUnit.test('should differentiate between `_.property` and `_.matchesProperty` shorthands', function(assert) {
+ assert.expect(4);
+
+ var over = _.over(['a', 1]);
+
+ assert.deepEqual(over({ 'a': 1, '1': 2 }), [1, 2]);
+ assert.deepEqual(over({ 'a': 2, '1': 1 }), [2, 1]);
+
+ over = _.over([['a', 1]]);
+
+ assert.deepEqual(over({ 'a': 1 }), [true]);
+ assert.deepEqual(over({ 'a': 2 }), [false]);
+ });
+
+ QUnit.test('should provide arguments to predicates', function(assert) {
+ assert.expect(1);
+
+ var over = _.over(function() {
+ return slice.call(arguments);
+ });
+
+ assert.deepEqual(over('a', 'b', 'c'), [['a', 'b', 'c']]);
+ });
+
+ QUnit.test('should use `this` binding of function for `iteratees`', function(assert) {
+ assert.expect(1);
+
+ var over = _.over(function() { return this.b; }, function() { return this.a; }),
+ object = { 'over': over, 'a': 1, 'b': 2 };
+
+ assert.deepEqual(object.over(), [2, 1]);
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.overEvery');
+
+ (function() {
+ QUnit.test('should create a function that returns `true` if all predicates return truthy', function(assert) {
+ assert.expect(1);
+
+ var over = _.overEvery(alwaysTrue, alwaysOne, alwaysA);
+ assert.strictEqual(over(), true);
+ });
+
+ QUnit.test('should return `false` as soon as a predicate returns falsey', function(assert) {
+ assert.expect(2);
+
+ var count = 0,
+ countFalse = function() { count++; return false; },
+ countTrue = function() { count++; return true; },
+ over = _.overEvery(countTrue, countFalse, countTrue);
+
+ assert.strictEqual(over(), false);
+ assert.strictEqual(count, 2);
+ });
+
+ QUnit.test('should use `_.identity` when a predicate is nullish', function(assert) {
+ assert.expect(2);
+
+ var over = _.overEvery(undefined, null);
+
+ assert.strictEqual(over(true), true);
+ assert.strictEqual(over(false), false);
+ });
+
+ QUnit.test('should work with `_.property` shorthands', function(assert) {
+ assert.expect(2);
+
+ var over = _.overEvery('b', 'a');
+
+ assert.strictEqual(over({ 'a': 1, 'b': 1 }), true);
+ assert.strictEqual(over({ 'a': 0, 'b': 1 }), false);
+ });
+
+ QUnit.test('should work with `_.matches` shorthands', function(assert) {
+ assert.expect(2);
+
+ var over = _.overEvery({ 'b': 2 }, { 'a': 1 });
+
+ assert.strictEqual(over({ 'a': 1, 'b': 2 }), true);
+ assert.strictEqual(over({ 'a': 0, 'b': 2 }), false);
+ });
+
+ QUnit.test('should work with `_.matchesProperty` shorthands', function(assert) {
+ assert.expect(2);
+
+ var over = _.overEvery(['b', 2], [['a', 1]]);
+
+ assert.strictEqual(over({ 'a': 1, 'b': 2 }), true);
+ assert.strictEqual(over({ 'a': 0, 'b': 2 }), false);
+ });
+
+ QUnit.test('should differentiate between `_.property` and `_.matchesProperty` shorthands', function(assert) {
+ assert.expect(5);
+
+ var over = _.overEvery(['a', 1]);
+
+ assert.strictEqual(over({ 'a': 1, '1': 1 }), true);
+ assert.strictEqual(over({ 'a': 1, '1': 0 }), false);
+ assert.strictEqual(over({ 'a': 0, '1': 1 }), false);
+
+ over = _.overEvery([['a', 1]]);
+
+ assert.strictEqual(over({ 'a': 1 }), true);
+ assert.strictEqual(over({ 'a': 2 }), false);
+ });
+
+ QUnit.test('should flatten `predicates`', function(assert) {
+ assert.expect(1);
+
+ var over = _.overEvery(alwaysTrue, [alwaysFalse]);
+ assert.strictEqual(over(), false);
+ });
+
+ QUnit.test('should provide arguments to predicates', function(assert) {
+ assert.expect(1);
+
+ var args;
+
+ var over = _.overEvery(function() {
+ args = slice.call(arguments);
+ });
+
+ over('a', 'b', 'c');
+ assert.deepEqual(args, ['a', 'b', 'c']);
+ });
+
+ QUnit.test('should use `this` binding of function for `predicates`', function(assert) {
+ assert.expect(2);
+
+ var over = _.overEvery(function() { return this.b; }, function() { return this.a; }),
+ object = { 'over': over, 'a': 1, 'b': 2 };
+
+ assert.strictEqual(object.over(), true);
+
+ object.a = 0;
+ assert.strictEqual(object.over(), false);
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.overSome');
+
+ (function() {
+ QUnit.test('should create a function that returns `true` if any predicates return truthy', function(assert) {
+ assert.expect(2);
+
+ var over = _.overSome(alwaysFalse, alwaysOne, alwaysEmptyString);
+ assert.strictEqual(over(), true);
+
+ over = _.overSome(alwaysNull, alwaysA, alwaysZero);
+ assert.strictEqual(over(), true);
+ });
+
+ QUnit.test('should return `true` as soon as `predicate` returns truthy', function(assert) {
+ assert.expect(2);
+
+ var count = 0,
+ countFalse = function() { count++; return false; },
+ countTrue = function() { count++; return true; },
+ over = _.overSome(countFalse, countTrue, countFalse);
+
+ assert.strictEqual(over(), true);
+ assert.strictEqual(count, 2);
+ });
+
+ QUnit.test('should return `false` if all predicates return falsey', function(assert) {
+ assert.expect(2);
+
+ var over = _.overSome(alwaysFalse, alwaysFalse, alwaysFalse);
+ assert.strictEqual(over(), false);
+
+ over = _.overSome(alwaysNull, alwaysZero, alwaysEmptyString);
+ assert.strictEqual(over(), false);
+ });
+
+ QUnit.test('should use `_.identity` when a predicate is nullish', function(assert) {
+ assert.expect(2);
+
+ var over = _.overSome(undefined, null);
+
+ assert.strictEqual(over(true), true);
+ assert.strictEqual(over(false), false);
+ });
+
+ QUnit.test('should work with `_.property` shorthands', function(assert) {
+ assert.expect(2);
+
+ var over = _.overSome('b', 'a');
+
+ assert.strictEqual(over({ 'a': 1, 'b': 0 }), true);
+ assert.strictEqual(over({ 'a': 0, 'b': 0 }), false);
+ });
+
+ QUnit.test('should work with `_.matches` shorthands', function(assert) {
+ assert.expect(2);
+
+ var over = _.overSome({ 'b': 2 }, { 'a': 1 });
+
+ assert.strictEqual(over({ 'a': 0, 'b': 2 }), true);
+ assert.strictEqual(over({ 'a': 0, 'b': 0 }), false);
+ });
+
+ QUnit.test('should work with `_.matchesProperty` shorthands', function(assert) {
+ assert.expect(2);
+
+ var over = _.overSome(['a', 1], [['b', 2]]);
+
+ assert.strictEqual(over({ 'a': 0, 'b': 2 }), true);
+ assert.strictEqual(over({ 'a': 0, 'b': 0 }), false);
+ });
+
+ QUnit.test('should differentiate between `_.property` and `_.matchesProperty` shorthands', function(assert) {
+ assert.expect(5);
+
+ var over = _.overSome(['a', 1]);
+
+ assert.strictEqual(over({ 'a': 0, '1': 0 }), false);
+ assert.strictEqual(over({ 'a': 1, '1': 0 }), true);
+ assert.strictEqual(over({ 'a': 0, '1': 1 }), true);
+
+ over = _.overSome([['a', 1]]);
+
+ assert.strictEqual(over({ 'a': 1 }), true);
+ assert.strictEqual(over({ 'a': 2 }), false);
+ });
+
+ QUnit.test('should flatten `predicates`', function(assert) {
+ assert.expect(1);
+
+ var over = _.overSome(alwaysFalse, [alwaysTrue]);
+ assert.strictEqual(over(), true);
+ });
+
+ QUnit.test('should provide arguments to predicates', function(assert) {
+ assert.expect(1);
+
+ var args;
+
+ var over = _.overSome(function() {
+ args = slice.call(arguments);
+ });
+
+ over('a', 'b', 'c');
+ assert.deepEqual(args, ['a', 'b', 'c']);
+ });
+
+ QUnit.test('should use `this` binding of function for `predicates`', function(assert) {
+ assert.expect(2);
+
+ var over = _.overSome(function() { return this.b; }, function() { return this.a; }),
+ object = { 'over': over, 'a': 1, 'b': 2 };
+
+ assert.strictEqual(object.over(), true);
+
+ object.a = object.b = 0;
+ assert.strictEqual(object.over(), false);
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.pad');
+
+ (function() {
+ var string = 'abc';
+
+ QUnit.test('should pad a string to a given length', function(assert) {
+ assert.expect(1);
+
+ var values = [, undefined],
+ expected = lodashStable.map(values, lodashStable.constant(' abc '));
+
+ var actual = lodashStable.map(values, function(value, index) {
+ return index ? _.pad(string, 6, value) : _.pad(string, 6);
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('should truncate pad characters to fit the pad length', function(assert) {
+ assert.expect(2);
+
+ assert.strictEqual(_.pad(string, 8), ' abc ');
+ assert.strictEqual(_.pad(string, 8, '_-'), '_-abc_-_');
+ });
+
+ QUnit.test('should coerce `string` to a string', function(assert) {
+ assert.expect(1);
+
+ var values = [Object(string), { 'toString': lodashStable.constant(string) }],
+ expected = lodashStable.map(values, alwaysTrue);
+
+ var actual = lodashStable.map(values, function(value) {
+ return _.pad(value, 6) === ' abc ';
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.padEnd');
+
+ (function() {
+ var string = 'abc';
+
+ QUnit.test('should pad a string to a given length', function(assert) {
+ assert.expect(1);
+
+ var values = [, undefined],
+ expected = lodashStable.map(values, lodashStable.constant('abc '));
+
+ var actual = lodashStable.map(values, function(value, index) {
+ return index ? _.padEnd(string, 6, value) : _.padEnd(string, 6);
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('should truncate pad characters to fit the pad length', function(assert) {
+ assert.expect(1);
+
+ assert.strictEqual(_.padEnd(string, 6, '_-'), 'abc_-_');
+ });
+
+ QUnit.test('should coerce `string` to a string', function(assert) {
+ assert.expect(1);
+
+ var values = [Object(string), { 'toString': lodashStable.constant(string) }],
+ expected = lodashStable.map(values, alwaysTrue);
+
+ var actual = lodashStable.map(values, function(value) {
+ return _.padEnd(value, 6) === 'abc ';
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.padStart');
+
+ (function() {
+ var string = 'abc';
+
+ QUnit.test('should pad a string to a given length', function(assert) {
+ assert.expect(1);
+
+ var values = [, undefined],
+ expected = lodashStable.map(values, lodashStable.constant(' abc'));
+
+ var actual = lodashStable.map(values, function(value, index) {
+ return index ? _.padStart(string, 6, value) : _.padStart(string, 6);
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('should truncate pad characters to fit the pad length', function(assert) {
+ assert.expect(1);
+
+ assert.strictEqual(_.padStart(string, 6, '_-'), '_-_abc');
+ });
+
+ QUnit.test('should coerce `string` to a string', function(assert) {
+ assert.expect(1);
+
+ var values = [Object(string), { 'toString': lodashStable.constant(string) }],
+ expected = lodashStable.map(values, alwaysTrue);
+
+ var actual = lodashStable.map(values, function(value) {
+ return _.padStart(value, 6) === ' abc';
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('pad methods');
+
+ lodashStable.each(['pad', 'padStart', 'padEnd'], function(methodName) {
+ var func = _[methodName],
+ isPad = methodName == 'pad',
+ isStart = methodName == 'padStart',
+ string = 'abc';
+
+ QUnit.test('`_.' + methodName + '` should not pad if string is >= `length`', function(assert) {
+ assert.expect(2);
+
+ assert.strictEqual(func(string, 2), string);
+ assert.strictEqual(func(string, 3), string);
+ });
+
+ QUnit.test('`_.' + methodName + '` should treat negative `length` as `0`', function(assert) {
+ assert.expect(2);
+
+ lodashStable.each([0, -2], function(length) {
+ assert.strictEqual(func(string, length), string);
+ });
+ });
+
+ QUnit.test('`_.' + methodName + '` should coerce `length` to a number', function(assert) {
+ assert.expect(2);
+
+ lodashStable.each(['', '4'], function(length) {
+ var actual = length ? (isStart ? ' abc' : 'abc ') : string;
+ assert.strictEqual(func(string, length), actual);
+ });
+ });
+
+ QUnit.test('`_.' + methodName + '` should treat nullish values as empty strings', function(assert) {
+ assert.expect(6);
+
+ lodashStable.each([undefined, '_-'], function(chars) {
+ var expected = chars ? (isPad ? '__' : chars) : ' ';
+ assert.strictEqual(func(null, 2, chars), expected);
+ assert.strictEqual(func(undefined, 2, chars), expected);
+ assert.strictEqual(func('', 2, chars), expected);
+ });
+ });
+
+ QUnit.test('`_.' + methodName + '` should return `string` when `chars` coerces to an empty string', function(assert) {
+ assert.expect(1);
+
+ var values = ['', Object('')],
+ expected = lodashStable.map(values, lodashStable.constant(string));
+
+ var actual = lodashStable.map(values, function(value) {
+ return _.pad(string, 6, value);
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+ });
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.parseInt');
+
+ (function() {
+ QUnit.test('should accept a `radix` argument', function(assert) {
+ assert.expect(1);
+
+ var expected = lodashStable.range(2, 37);
+
+ var actual = lodashStable.map(expected, function(radix) {
+ return _.parseInt('10', radix);
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('should use a radix of `10`, for non-hexadecimals, if `radix` is `undefined` or `0`', function(assert) {
+ assert.expect(4);
+
+ assert.strictEqual(_.parseInt('10'), 10);
+ assert.strictEqual(_.parseInt('10', 0), 10);
+ assert.strictEqual(_.parseInt('10', 10), 10);
+ assert.strictEqual(_.parseInt('10', undefined), 10);
+ });
+
+ QUnit.test('should use a radix of `16`, for hexadecimals, if `radix` is `undefined` or `0`', function(assert) {
+ assert.expect(8);
+
+ lodashStable.each(['0x20', '0X20'], function(string) {
+ assert.strictEqual(_.parseInt(string), 32);
+ assert.strictEqual(_.parseInt(string, 0), 32);
+ assert.strictEqual(_.parseInt(string, 16), 32);
+ assert.strictEqual(_.parseInt(string, undefined), 32);
+ });
+ });
+
+ QUnit.test('should use a radix of `10` for string with leading zeros', function(assert) {
+ assert.expect(2);
+
+ assert.strictEqual(_.parseInt('08'), 8);
+ assert.strictEqual(_.parseInt('08', 10), 8);
+ });
+
+ QUnit.test('should parse strings with leading whitespace (test in Chrome and Firefox)', function(assert) {
+ assert.expect(2);
+
+ var expected = [8, 8, 10, 10, 32, 32, 32, 32];
+
+ lodashStable.times(2, function(index) {
+ var actual = [],
+ func = (index ? (lodashBizarro || {}) : _).parseInt;
+
+ if (func) {
+ lodashStable.times(2, function(otherIndex) {
+ var string = otherIndex ? '10' : '08';
+ actual.push(
+ func(whitespace + string, 10),
+ func(whitespace + string)
+ );
+ });
+
+ lodashStable.each(['0x20', '0X20'], function(string) {
+ actual.push(
+ func(whitespace + string),
+ func(whitespace + string, 16)
+ );
+ });
+
+ assert.deepEqual(actual, expected);
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+ });
+
+ QUnit.test('should coerce `radix` to a number', function(assert) {
+ assert.expect(2);
+
+ var object = { 'valueOf': alwaysZero };
+ assert.strictEqual(_.parseInt('08', object), 8);
+ assert.strictEqual(_.parseInt('0x20', object), 32);
+ });
+
+ QUnit.test('should work as an iteratee for methods like `_.map`', function(assert) {
+ assert.expect(2);
+
+ var strings = lodashStable.map(['6', '08', '10'], Object),
+ actual = lodashStable.map(strings, _.parseInt);
+
+ assert.deepEqual(actual, [6, 8, 10]);
+
+ actual = lodashStable.map('123', _.parseInt);
+ assert.deepEqual(actual, [1, 2, 3]);
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('partial methods');
+
+ lodashStable.each(['partial', 'partialRight'], function(methodName) {
+ var func = _[methodName],
+ isPartial = methodName == 'partial',
+ ph = func.placeholder;
+
+ QUnit.test('`_.' + methodName + '` partially applies arguments', function(assert) {
+ assert.expect(1);
+
+ var par = func(identity, 'a');
+ assert.strictEqual(par(), 'a');
+ });
+
+ QUnit.test('`_.' + methodName + '` creates a function that can be invoked with additional arguments', function(assert) {
+ assert.expect(1);
+
+ var fn = function(a, b) { return [a, b]; },
+ par = func(fn, 'a'),
+ expected = isPartial ? ['a', 'b'] : ['b', 'a'];
+
+ assert.deepEqual(par('b'), expected);
+ });
+
+ QUnit.test('`_.' + methodName + '` works when there are no partially applied arguments and the created function is invoked without additional arguments', function(assert) {
+ assert.expect(1);
+
+ var fn = function() { return arguments.length; },
+ par = func(fn);
+
+ assert.strictEqual(par(), 0);
+ });
+
+ QUnit.test('`_.' + methodName + '` works when there are no partially applied arguments and the created function is invoked with additional arguments', function(assert) {
+ assert.expect(1);
+
+ var par = func(identity);
+ assert.strictEqual(par('a'), 'a');
+ });
+
+ QUnit.test('`_.' + methodName + '` should support placeholders', function(assert) {
+ assert.expect(4);
+
+ var fn = function() { return slice.call(arguments); },
+ par = func(fn, ph, 'b', ph);
+
+ assert.deepEqual(par('a', 'c'), ['a', 'b', 'c']);
+ assert.deepEqual(par('a'), ['a', 'b', undefined]);
+ assert.deepEqual(par(), [undefined, 'b', undefined]);
+
+ if (isPartial) {
+ assert.deepEqual(par('a', 'c', 'd'), ['a', 'b', 'c', 'd']);
+ } else {
+ par = func(fn, ph, 'c', ph);
+ assert.deepEqual(par('a', 'b', 'd'), ['a', 'b', 'c', 'd']);
+ }
+ });
+
+ QUnit.test('`_.' + methodName + '` should use `_.placeholder` when set', function(assert) {
+ assert.expect(1);
+
+ if (!isModularize) {
+ var _ph = _.placeholder = {},
+ fn = function() { return slice.call(arguments); },
+ par = func(fn, _ph, 'b', ph),
+ expected = isPartial ? ['a', 'b', ph, 'c'] : ['a', 'c', 'b', ph];
+
+ assert.deepEqual(par('a', 'c'), expected);
+ delete _.placeholder;
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+
+ QUnit.test('`_.' + methodName + '` creates a function with a `length` of `0`', function(assert) {
+ assert.expect(1);
+
+ var fn = function(a, b, c) {},
+ par = func(fn, 'a');
+
+ assert.strictEqual(par.length, 0);
+ });
+
+ QUnit.test('`_.' + methodName + '` should ensure `new par` is an instance of `func`', function(assert) {
+ assert.expect(2);
+
+ function Foo(value) {
+ return value && object;
+ }
+
+ var object = {},
+ par = func(Foo);
+
+ assert.ok(new par instanceof Foo);
+ assert.strictEqual(new par(true), object);
+ });
+
+ QUnit.test('`_.' + methodName + '` should clone metadata for created functions', function(assert) {
+ assert.expect(3);
+
+ function greet(greeting, name) {
+ return greeting + ' ' + name;
+ }
+
+ var par1 = func(greet, 'hi'),
+ par2 = func(par1, 'barney'),
+ par3 = func(par1, 'pebbles');
+
+ assert.strictEqual(par1('fred'), isPartial ? 'hi fred' : 'fred hi');
+ assert.strictEqual(par2(), isPartial ? 'hi barney' : 'barney hi');
+ assert.strictEqual(par3(), isPartial ? 'hi pebbles' : 'pebbles hi');
+ });
+
+ QUnit.test('`_.' + methodName + '` should work with curried functions', function(assert) {
+ assert.expect(2);
+
+ var fn = function(a, b, c) { return a + b + c; },
+ curried = _.curry(func(fn, 1), 2);
+
+ assert.strictEqual(curried(2, 3), 6);
+ assert.strictEqual(curried(2)(3), 6);
+ });
+
+ QUnit.test('should work with placeholders and curried functions', function(assert) {
+ assert.expect(1);
+
+ var fn = function() { return slice.call(arguments); },
+ curried = _.curry(fn),
+ par = func(curried, ph, 'b', ph, 'd');
+
+ assert.deepEqual(par('a', 'c'), ['a', 'b', 'c', 'd']);
+ });
+ });
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.partialRight');
+
+ (function() {
+ QUnit.test('should work as a deep `_.defaults`', function(assert) {
+ assert.expect(1);
+
+ var object = { 'a': { 'b': 1 } },
+ source = { 'a': { 'b': 2, 'c': 3 } },
+ expected = { 'a': { 'b': 1, 'c': 3 } };
+
+ var defaultsDeep = _.partialRight(_.mergeWith, function deep(value, other) {
+ return lodashStable.isObject(value) ? _.mergeWith(value, other, deep) : value;
+ });
+
+ assert.deepEqual(defaultsDeep(object, source), expected);
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('methods using `createWrapper`');
+
+ (function() {
+ function fn() {
+ return slice.call(arguments);
+ }
+
+ var ph1 = _.bind.placeholder,
+ ph2 = _.bindKey.placeholder,
+ ph3 = _.partial.placeholder,
+ ph4 = _.partialRight.placeholder;
+
+ QUnit.test('should work with combinations of partial functions', function(assert) {
+ assert.expect(1);
+
+ var a = _.partial(fn),
+ b = _.partialRight(a, 3),
+ c = _.partial(b, 1);
+
+ assert.deepEqual(c(2), [1, 2, 3]);
+ });
+
+ QUnit.test('should work with combinations of bound and partial functions', function(assert) {
+ assert.expect(3);
+
+ var fn = function() {
+ var result = [this.a];
+ push.apply(result, arguments);
+ return result;
+ };
+
+ var expected = [1, 2, 3, 4],
+ object = { 'a': 1, 'fn': fn };
+
+ var a = _.bindKey(object, 'fn'),
+ b = _.partialRight(a, 4),
+ c = _.partial(b, 2);
+
+ assert.deepEqual(c(3), expected);
+
+ a = _.bind(fn, object);
+ b = _.partialRight(a, 4);
+ c = _.partial(b, 2);
+
+ assert.deepEqual(c(3), expected);
+
+ a = _.partial(fn, 2);
+ b = _.bind(a, object);
+ c = _.partialRight(b, 4);
+
+ assert.deepEqual(c(3), expected);
+ });
+
+ QUnit.test('should ensure `new combo` is an instance of `func`', function(assert) {
+ assert.expect(2);
+
+ function Foo(a, b, c) {
+ return b === 0 && object;
+ }
+
+ var combo = _.partial(_.partialRight(Foo, 3), 1),
+ object = {};
+
+ assert.ok(new combo(2) instanceof Foo);
+ assert.strictEqual(new combo(0), object);
+ });
+
+ QUnit.test('should work with combinations of functions with placeholders', function(assert) {
+ assert.expect(3);
+
+ var expected = [1, 2, 3, 4, 5, 6],
+ object = { 'fn': fn };
+
+ var a = _.bindKey(object, 'fn', ph2, 2),
+ b = _.partialRight(a, ph4, 6),
+ c = _.partial(b, 1, ph3, 4);
+
+ assert.deepEqual(c(3, 5), expected);
+
+ a = _.bind(fn, object, ph1, 2);
+ b = _.partialRight(a, ph4, 6);
+ c = _.partial(b, 1, ph3, 4);
+
+ assert.deepEqual(c(3, 5), expected);
+
+ a = _.partial(fn, ph3, 2);
+ b = _.bind(a, object, 1, ph1, 4);
+ c = _.partialRight(b, ph4, 6);
+
+ assert.deepEqual(c(3, 5), expected);
+ });
+
+ QUnit.test('should work with combinations of functions with overlapping placeholders', function(assert) {
+ assert.expect(3);
+
+ var expected = [1, 2, 3, 4],
+ object = { 'fn': fn };
+
+ var a = _.bindKey(object, 'fn', ph2, 2),
+ b = _.partialRight(a, ph4, 4),
+ c = _.partial(b, ph3, 3);
+
+ assert.deepEqual(c(1), expected);
+
+ a = _.bind(fn, object, ph1, 2);
+ b = _.partialRight(a, ph4, 4);
+ c = _.partial(b, ph3, 3);
+
+ assert.deepEqual(c(1), expected);
+
+ a = _.partial(fn, ph3, 2);
+ b = _.bind(a, object, ph1, 3);
+ c = _.partialRight(b, ph4, 4);
+
+ assert.deepEqual(c(1), expected);
+ });
+
+ QUnit.test('should work with recursively bound functions', function(assert) {
+ assert.expect(1);
+
+ var fn = function() {
+ return this.a;
+ };
+
+ var a = _.bind(fn, { 'a': 1 }),
+ b = _.bind(a, { 'a': 2 }),
+ c = _.bind(b, { 'a': 3 });
+
+ assert.strictEqual(c(), 1);
+ });
+
+ QUnit.test('should work when hot', function(assert) {
+ assert.expect(12);
+
+ lodashStable.times(2, function(index) {
+ var fn = function() {
+ var result = [this];
+ push.apply(result, arguments);
+ return result;
+ };
+
+ var object = {},
+ bound1 = index ? _.bind(fn, object, 1) : _.bind(fn, object),
+ expected = [object, 1, 2, 3];
+
+ var actual = _.last(lodashStable.times(HOT_COUNT, function() {
+ var bound2 = index ? _.bind(bound1, null, 2) : _.bind(bound1);
+ return index ? bound2(3) : bound2(1, 2, 3);
+ }));
+
+ assert.deepEqual(actual, expected);
+
+ actual = _.last(lodashStable.times(HOT_COUNT, function() {
+ var bound1 = index ? _.bind(fn, object, 1) : _.bind(fn, object),
+ bound2 = index ? _.bind(bound1, null, 2) : _.bind(bound1);
+
+ return index ? bound2(3) : bound2(1, 2, 3);
+ }));
+
+ assert.deepEqual(actual, expected);
+ });
+
+ lodashStable.each(['curry', 'curryRight'], function(methodName, index) {
+ var fn = function(a, b, c) { return [a, b, c]; },
+ curried = _[methodName](fn),
+ expected = index ? [3, 2, 1] : [1, 2, 3];
+
+ var actual = _.last(lodashStable.times(HOT_COUNT, function() {
+ return curried(1)(2)(3);
+ }));
+
+ assert.deepEqual(actual, expected);
+
+ actual = _.last(lodashStable.times(HOT_COUNT, function() {
+ var curried = _[methodName](fn);
+ return curried(1)(2)(3);
+ }));
+
+ assert.deepEqual(actual, expected);
+ });
+
+ lodashStable.each(['partial', 'partialRight'], function(methodName, index) {
+ var func = _[methodName],
+ fn = function() { return slice.call(arguments); },
+ par1 = func(fn, 1),
+ expected = index ? [3, 2, 1] : [1, 2, 3];
+
+ var actual = _.last(lodashStable.times(HOT_COUNT, function() {
+ var par2 = func(par1, 2);
+ return par2(3);
+ }));
+
+ assert.deepEqual(actual, expected);
+
+ actual = _.last(lodashStable.times(HOT_COUNT, function() {
+ var par1 = func(fn, 1),
+ par2 = func(par1, 2);
+
+ return par2(3);
+ }));
+
+ assert.deepEqual(actual, expected);
+ });
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.partition');
+
+ (function() {
+ var array = [1, 0, 1];
+
+ QUnit.test('should split elements into two groups by `predicate`', function(assert) {
+ assert.expect(3);
+
+ assert.deepEqual(_.partition([], identity), [[], []]);
+ assert.deepEqual(_.partition(array, alwaysTrue), [array, []]);
+ assert.deepEqual(_.partition(array, alwaysFalse), [[], array]);
+ });
+
+ QUnit.test('should use `_.identity` when `predicate` is nullish', function(assert) {
+ assert.expect(1);
+
+ var values = [, null, undefined],
+ expected = lodashStable.map(values, lodashStable.constant([[1, 1], [0]]));
+
+ var actual = lodashStable.map(values, function(value, index) {
+ return index ? _.partition(array, value) : _.partition(array);
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('should work with `_.property` shorthands', function(assert) {
+ assert.expect(1);
+
+ var objects = [{ 'a': 1 }, { 'a': 1 }, { 'b': 2 }],
+ actual = _.partition(objects, 'a');
+
+ assert.deepEqual(actual, [objects.slice(0, 2), objects.slice(2)]);
+ });
+
+ QUnit.test('should work with a number for `predicate`', function(assert) {
+ assert.expect(2);
+
+ var array = [
+ [1, 0],
+ [0, 1],
+ [1, 0]
+ ];
+
+ assert.deepEqual(_.partition(array, 0), [[array[0], array[2]], [array[1]]]);
+ assert.deepEqual(_.partition(array, 1), [[array[1]], [array[0], array[2]]]);
+ });
+
+ QUnit.test('should work with an object for `collection`', function(assert) {
+ assert.expect(1);
+
+ var actual = _.partition({ 'a': 1.1, 'b': 0.2, 'c': 1.3 }, Math.floor);
+ assert.deepEqual(actual, [[1.1, 1.3], [0.2]]);
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.pick');
+
+ (function() {
+ var args = arguments,
+ object = { 'a': 1, 'b': 2, 'c': 3, 'd': 4 };
+
+ QUnit.test('should flatten `props`', function(assert) {
+ assert.expect(2);
+
+ assert.deepEqual(_.pick(object, 'a', 'c'), { 'a': 1, 'c': 3 });
+ assert.deepEqual(_.pick(object, ['a', 'd'], 'c'), { 'a': 1, 'c': 3, 'd': 4 });
+ });
+
+ QUnit.test('should work with a primitive `object` argument', function(assert) {
+ assert.expect(1);
+
+ assert.deepEqual(_.pick('', 'slice'), { 'slice': ''.slice });
+ });
+
+ QUnit.test('should return an empty object when `object` is nullish', function(assert) {
+ assert.expect(2);
+
+ lodashStable.each([null, undefined], function(value) {
+ assert.deepEqual(_.pick(value, 'valueOf'), {});
+ });
+ });
+
+ QUnit.test('should work with `arguments` objects as secondary arguments', function(assert) {
+ assert.expect(1);
+
+ assert.deepEqual(_.pick(object, args), { 'a': 1, 'c': 3 });
+ });
+
+ QUnit.test('should coerce property names to strings', function(assert) {
+ assert.expect(1);
+
+ assert.deepEqual(_.pick({ '0': 'a', '1': 'b' }, 0), { '0': 'a' });
+ });
+ }('a', 'c'));
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.pickBy');
+
+ (function() {
+ QUnit.test('should work with a predicate argument', function(assert) {
+ assert.expect(1);
+
+ var object = { 'a': 1, 'b': 2, 'c': 3, 'd': 4 };
+
+ var actual = _.pickBy(object, function(n) {
+ return n == 1 || n == 3;
+ });
+
+ assert.deepEqual(actual, { 'a': 1, 'c': 3 });
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('pick methods');
+
+ lodashStable.each(['pick', 'pickBy'], function(methodName) {
+ var expected = { 'a': 1, 'c': 3 },
+ func = _[methodName],
+ object = { 'a': 1, 'b': 2, 'c': 3, 'd': 4 },
+ prop = lodashStable.nthArg(1);
+
+ if (methodName == 'pickBy') {
+ prop = function(object, props) {
+ props = lodashStable.castArray(props);
+ return function(value) {
+ return lodashStable.some(props, function(key) {
+ key = lodashStable.isSymbol(key) ? key : lodashStable.toString(key);
+ return object[key] === value;
+ });
+ };
+ };
+ }
+ QUnit.test('`_.' + methodName + '` should create an object of picked string keyed properties', function(assert) {
+ assert.expect(2);
+
+ assert.deepEqual(func(object, prop(object, 'a')), { 'a': 1 });
+ assert.deepEqual(func(object, prop(object, ['a', 'c'])), expected);
+ });
+
+ QUnit.test('`_.' + methodName + '` should pick inherited string keyed properties', function(assert) {
+ assert.expect(1);
+
+ function Foo() {}
+ Foo.prototype = object;
+
+ var foo = new Foo;
+ assert.deepEqual(func(foo, prop(foo, ['a', 'c'])), expected);
+ });
+
+ QUnit.test('`_.' + methodName + '` should preserve the sign of `0`', function(assert) {
+ assert.expect(1);
+
+ var object = { '-0': 'a', '0': 'b' },
+ props = [-0, Object(-0), 0, Object(0)],
+ expected = [{ '-0': 'a' }, { '-0': 'a' }, { '0': 'b' }, { '0': 'b' }];
+
+ var actual = lodashStable.map(props, function(key) {
+ return func(object, prop(object, key));
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('`_.' + methodName + '` should pick symbol properties', function(assert) {
+ assert.expect(2);
+
+ function Foo() {
+ this[symbol] = 1;
+ }
+
+ if (Symbol) {
+ var symbol2 = Symbol('b');
+ Foo.prototype[symbol2] = 2;
+
+ var foo = new Foo,
+ actual = func(foo, prop(foo, [symbol, symbol2]));
+
+ assert.strictEqual(actual[symbol], 1);
+ assert.strictEqual(actual[symbol2], 2);
+ }
+ else {
+ skipAssert(assert, 2);
+ }
+ });
+
+ QUnit.test('`_.' + methodName + '` should work with an array `object` argument', function(assert) {
+ assert.expect(1);
+
+ var array = [1, 2, 3];
+ assert.deepEqual(func(array, prop(array, '1')), { '1': 2 });
+ });
+ });
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.property');
+
+ (function() {
+ QUnit.test('should create a function that plucks a property value of a given object', function(assert) {
+ assert.expect(4);
+
+ var object = { 'a': 1 };
+
+ lodashStable.each(['a', ['a']], function(path) {
+ var prop = _.property(path);
+ assert.strictEqual(prop.length, 1);
+ assert.strictEqual(prop(object), 1);
+ });
+ });
+
+ QUnit.test('should pluck deep property values', function(assert) {
+ assert.expect(2);
+
+ var object = { 'a': { 'b': 2 } };
+
+ lodashStable.each(['a.b', ['a', 'b']], function(path) {
+ var prop = _.property(path);
+ assert.strictEqual(prop(object), 2);
+ });
+ });
+
+ QUnit.test('should pluck inherited property values', function(assert) {
+ assert.expect(2);
+
+ function Foo() {}
+ Foo.prototype.a = 1;
+
+ lodashStable.each(['a', ['a']], function(path) {
+ var prop = _.property(path);
+ assert.strictEqual(prop(new Foo), 1);
+ });
+ });
+
+ QUnit.test('should work with a non-string `path`', function(assert) {
+ assert.expect(2);
+
+ var array = [1, 2, 3];
+
+ lodashStable.each([1, [1]], function(path) {
+ var prop = _.property(path);
+ assert.strictEqual(prop(array), 2);
+ });
+ });
+
+ QUnit.test('should preserve the sign of `0`', function(assert) {
+ assert.expect(1);
+
+ var object = { '-0': 'a', '0': 'b' },
+ props = [-0, Object(-0), 0, Object(0)];
+
+ var actual = lodashStable.map(props, function(key) {
+ var prop = _.property(key);
+ return prop(object);
+ });
+
+ assert.deepEqual(actual, ['a', 'a', 'b', 'b']);
+ });
+
+ QUnit.test('should coerce key to a string', function(assert) {
+ assert.expect(1);
+
+ function fn() {}
+ fn.toString = lodashStable.constant('fn');
+
+ var objects = [{ 'null': 1 }, { 'undefined': 2 }, { 'fn': 3 }, { '[object Object]': 4 }],
+ values = [null, undefined, fn, {}];
+
+ var actual = lodashStable.transform(objects, function(result, object, index) {
+ var key = values[index];
+ lodashStable.each([key, [key]], function(path) {
+ var prop = _.property(key);
+ result.push(prop(object));
+ });
+ });
+
+ assert.deepEqual(actual, [1, 1, 2, 2, 3, 3, 4, 4]);
+ });
+
+ QUnit.test('should pluck a key over a path', function(assert) {
+ assert.expect(2);
+
+ var object = { 'a.b': 1, 'a': { 'b': 2 } };
+
+ lodashStable.each(['a.b', ['a.b']], function(path) {
+ var prop = _.property(path);
+ assert.strictEqual(prop(object), 1);
+ });
+ });
+
+ QUnit.test('should return `undefined` when `object` is nullish', function(assert) {
+ assert.expect(2);
+
+ var values = [, null, undefined],
+ expected = lodashStable.map(values, noop);
+
+ lodashStable.each(['constructor', ['constructor']], function(path) {
+ var prop = _.property(path);
+
+ var actual = lodashStable.map(values, function(value, index) {
+ return index ? prop(value) : prop();
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+ });
+
+ QUnit.test('should return `undefined` with deep paths when `object` is nullish', function(assert) {
+ assert.expect(2);
+
+ var values = [, null, undefined],
+ expected = lodashStable.map(values, noop);
+
+ lodashStable.each(['constructor.prototype.valueOf', ['constructor', 'prototype', 'valueOf']], function(path) {
+ var prop = _.property(path);
+
+ var actual = lodashStable.map(values, function(value, index) {
+ return index ? prop(value) : prop();
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+ });
+
+ QUnit.test('should return `undefined` if parts of `path` are missing', function(assert) {
+ assert.expect(4);
+
+ var object = {};
+
+ lodashStable.each(['a', 'a[1].b.c', ['a'], ['a', '1', 'b', 'c']], function(path) {
+ var prop = _.property(path);
+ assert.strictEqual(prop(object), undefined);
+ });
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.propertyOf');
+
+ (function() {
+ QUnit.test('should create a function that plucks a property value of a given key', function(assert) {
+ assert.expect(3);
+
+ var object = { 'a': 1 },
+ propOf = _.propertyOf(object);
+
+ assert.strictEqual(propOf.length, 1);
+ lodashStable.each(['a', ['a']], function(path) {
+ assert.strictEqual(propOf(path), 1);
+ });
+ });
+
+ QUnit.test('should pluck deep property values', function(assert) {
+ assert.expect(2);
+
+ var object = { 'a': { 'b': 2 } },
+ propOf = _.propertyOf(object);
+
+ lodashStable.each(['a.b', ['a', 'b']], function(path) {
+ assert.strictEqual(propOf(path), 2);
+ });
+ });
+
+ QUnit.test('should pluck inherited property values', function(assert) {
+ assert.expect(2);
+
+ function Foo() {
+ this.a = 1;
+ }
+ Foo.prototype.b = 2;
+
+ var propOf = _.propertyOf(new Foo);
+
+ lodashStable.each(['b', ['b']], function(path) {
+ assert.strictEqual(propOf(path), 2);
+ });
+ });
+
+ QUnit.test('should work with a non-string `path`', function(assert) {
+ assert.expect(2);
+
+ var array = [1, 2, 3],
+ propOf = _.propertyOf(array);
+
+ lodashStable.each([1, [1]], function(path) {
+ assert.strictEqual(propOf(path), 2);
+ });
+ });
+
+ QUnit.test('should preserve the sign of `0`', function(assert) {
+ assert.expect(1);
+
+ var object = { '-0': 'a', '0': 'b' },
+ props = [-0, Object(-0), 0, Object(0)];
+
+ var actual = lodashStable.map(props, function(key) {
+ var propOf = _.propertyOf(object);
+ return propOf(key);
+ });
+
+ assert.deepEqual(actual, ['a', 'a', 'b', 'b']);
+ });
+
+ QUnit.test('should coerce key to a string', function(assert) {
+ assert.expect(1);
+
+ function fn() {}
+ fn.toString = lodashStable.constant('fn');
+
+ var objects = [{ 'null': 1 }, { 'undefined': 2 }, { 'fn': 3 }, { '[object Object]': 4 }],
+ values = [null, undefined, fn, {}];
+
+ var actual = lodashStable.transform(objects, function(result, object, index) {
+ var key = values[index];
+ lodashStable.each([key, [key]], function(path) {
+ var propOf = _.propertyOf(object);
+ result.push(propOf(key));
+ });
+ });
+
+ assert.deepEqual(actual, [1, 1, 2, 2, 3, 3, 4, 4]);
+ });
+
+ QUnit.test('should pluck a key over a path', function(assert) {
+ assert.expect(2);
+
+ var object = { 'a.b': 1, 'a': { 'b': 2 } },
+ propOf = _.propertyOf(object);
+
+ lodashStable.each(['a.b', ['a.b']], function(path) {
+ assert.strictEqual(propOf(path), 1);
+ });
+ });
+
+ QUnit.test('should return `undefined` when `object` is nullish', function(assert) {
+ assert.expect(2);
+
+ var values = [, null, undefined],
+ expected = lodashStable.map(values, noop);
+
+ lodashStable.each(['constructor', ['constructor']], function(path) {
+ var actual = lodashStable.map(values, function(value, index) {
+ var propOf = index ? _.propertyOf(value) : _.propertyOf();
+ return propOf(path);
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+ });
+
+ QUnit.test('should return `undefined` with deep paths when `object` is nullish', function(assert) {
+ assert.expect(2);
+
+ var values = [, null, undefined],
+ expected = lodashStable.map(values, noop);
+
+ lodashStable.each(['constructor.prototype.valueOf', ['constructor', 'prototype', 'valueOf']], function(path) {
+ var actual = lodashStable.map(values, function(value, index) {
+ var propOf = index ? _.propertyOf(value) : _.propertyOf();
+ return propOf(path);
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+ });
+
+ QUnit.test('should return `undefined` if parts of `path` are missing', function(assert) {
+ assert.expect(4);
+
+ var propOf = _.propertyOf({});
+
+ lodashStable.each(['a', 'a[1].b.c', ['a'], ['a', '1', 'b', 'c']], function(path) {
+ assert.strictEqual(propOf(path), undefined);
+ });
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.pullAllBy');
+
+ (function() {
+ QUnit.test('should accept an `iteratee` argument', function(assert) {
+ assert.expect(1);
+
+ var array = [{ 'x': 1 }, { 'x': 2 }, { 'x': 3 }, { 'x': 1 }];
+
+ var actual = _.pullAllBy(array, [{ 'x': 1 }, { 'x': 3 }], function(object) {
+ return object.x;
+ });
+
+ assert.deepEqual(actual, [{ 'x': 2 }]);
+ });
+
+ QUnit.test('should provide the correct `iteratee` arguments', function(assert) {
+ assert.expect(1);
+
+ var args,
+ array = [{ 'x': 1 }, { 'x': 2 }, { 'x': 3 }, { 'x': 1 }];
+
+ _.pullAllBy(array, [{ 'x': 1 }, { 'x': 3 }], function() {
+ args || (args = slice.call(arguments));
+ });
+
+ assert.deepEqual(args, [{ 'x': 1 }]);
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.pullAllWith');
+
+ (function() {
+ QUnit.test('should work with a `comparator` argument', function(assert) {
+ assert.expect(1);
+
+ var objects = [{ 'x': 1, 'y': 1 }, { 'x': 2, 'y': 2 }, { 'x': 3, 'y': 3 }],
+ expected = [objects[0], objects[2]],
+ actual = _.pullAllWith(objects, [{ 'x': 2, 'y': 2 }], lodashStable.isEqual);
+
+ assert.deepEqual(actual, expected);
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('pull methods');
+
+ lodashStable.each(['pull', 'pullAll', 'pullAllWith'], function(methodName) {
+ var func = _[methodName],
+ isPull = methodName == 'pull';
+
+ function pull(array, values) {
+ return isPull
+ ? func.apply(undefined, [array].concat(values))
+ : func(array, values);
+ }
+
+ QUnit.test('`_.' + methodName + '` should modify and return the array', function(assert) {
+ assert.expect(2);
+
+ var array = [1, 2, 3],
+ actual = pull(array, [1, 3]);
+
+ assert.deepEqual(array, [2]);
+ assert.ok(actual === array);
+ });
+
+ QUnit.test('`_.' + methodName + '` should preserve holes in arrays', function(assert) {
+ assert.expect(2);
+
+ var array = [1, 2, 3, 4];
+ delete array[1];
+ delete array[3];
+
+ pull(array, [1]);
+ assert.notOk('0' in array);
+ assert.notOk('2' in array);
+ });
+
+ QUnit.test('`_.' + methodName + '` should treat holes as `undefined`', function(assert) {
+ assert.expect(1);
+
+ var array = [1, 2, 3];
+ delete array[1];
+
+ pull(array, [undefined]);
+ assert.deepEqual(array, [1, 3]);
+ });
+
+ QUnit.test('`_.' + methodName + '` should match `NaN`', function(assert) {
+ assert.expect(1);
+
+ var array = [1, NaN, 3, NaN];
+
+ pull(array, [NaN]);
+ assert.deepEqual(array, [1, 3]);
+ });
+ });
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.pullAt');
+
+ (function() {
+ QUnit.test('should modify the array and return removed elements', function(assert) {
+ assert.expect(2);
+
+ var array = [1, 2, 3],
+ actual = _.pullAt(array, [0, 1]);
+
+ assert.deepEqual(array, [3]);
+ assert.deepEqual(actual, [1, 2]);
+ });
+
+ QUnit.test('should work with unsorted indexes', function(assert) {
+ assert.expect(2);
+
+ var array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12],
+ actual = _.pullAt(array, [1, 3, 11, 7, 5, 9]);
+
+ assert.deepEqual(array, [1, 3, 5, 7, 9, 11]);
+ assert.deepEqual(actual, [2, 4, 12, 8, 6, 10]);
+ });
+
+ QUnit.test('should work with repeated indexes', function(assert) {
+ assert.expect(2);
+
+ var array = [1, 2, 3, 4],
+ actual = _.pullAt(array, [0, 2, 0, 1, 0, 2]);
+
+ assert.deepEqual(array, [4]);
+ assert.deepEqual(actual, [1, 3, 1, 2, 1, 3]);
+ });
+
+ QUnit.test('should use `undefined` for nonexistent indexes', function(assert) {
+ assert.expect(2);
+
+ var array = ['a', 'b', 'c'],
+ actual = _.pullAt(array, [2, 4, 0]);
+
+ assert.deepEqual(array, ['b']);
+ assert.deepEqual(actual, ['c', undefined, 'a']);
+ });
+
+ QUnit.test('should flatten `indexes`', function(assert) {
+ assert.expect(4);
+
+ var array = ['a', 'b', 'c'];
+ assert.deepEqual(_.pullAt(array, 2, 0), ['c', 'a']);
+ assert.deepEqual(array, ['b']);
+
+ array = ['a', 'b', 'c', 'd'];
+ assert.deepEqual(_.pullAt(array, [3, 0], 2), ['d', 'a', 'c']);
+ assert.deepEqual(array, ['b']);
+ });
+
+ QUnit.test('should return an empty array when no indexes are given', function(assert) {
+ assert.expect(4);
+
+ var array = ['a', 'b', 'c'],
+ actual = _.pullAt(array);
+
+ assert.deepEqual(array, ['a', 'b', 'c']);
+ assert.deepEqual(actual, []);
+
+ actual = _.pullAt(array, [], []);
+
+ assert.deepEqual(array, ['a', 'b', 'c']);
+ assert.deepEqual(actual, []);
+ });
+
+ QUnit.test('should work with non-index paths', function(assert) {
+ assert.expect(2);
+
+ var values = lodashStable.reject(empties, function(value) {
+ return (value === 0) || lodashStable.isArray(value);
+ }).concat(-1, 1.1);
+
+ var array = lodashStable.transform(values, function(result, value) {
+ result[value] = 1;
+ }, []);
+
+ var expected = lodashStable.map(values, alwaysOne),
+ actual = _.pullAt(array, values);
+
+ assert.deepEqual(actual, expected);
+
+ expected = lodashStable.map(values, noop),
+ actual = lodashStable.at(array, values);
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('should preserve the sign of `0`', function(assert) {
+ assert.expect(1);
+
+ var props = [-0, Object(-0), 0, Object(0)];
+
+ var actual = lodashStable.map(props, function(key) {
+ var array = [-1];
+ array['-0'] = -2;
+ return _.pullAt(array, key);
+ });
+
+ assert.deepEqual(actual, [[-2], [-2], [-1], [-1]]);
+ });
+
+ QUnit.test('should work with deep paths', function(assert) {
+ assert.expect(3);
+
+ var array = [];
+ array.a = { 'b': 2 };
+
+ var actual = _.pullAt(array, 'a.b');
+
+ assert.deepEqual(actual, [2]);
+ assert.deepEqual(array.a, {});
+
+ try {
+ actual = _.pullAt(array, 'a.b.c');
+ } catch (e) {}
+
+ assert.deepEqual(actual, [undefined]);
+ });
+
+ QUnit.test('should work with a falsey `array` argument when keys are given', function(assert) {
+ assert.expect(1);
+
+ var values = falsey.slice(),
+ expected = lodashStable.map(values, lodashStable.constant(Array(4)));
+
+ var actual = lodashStable.map(values, function(array) {
+ try {
+ return _.pullAt(array, 0, 1, 'pop', 'push');
+ } catch (e) {}
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.random');
+
+ (function() {
+ var array = Array(1000);
+
+ QUnit.test('should return `0` or `1` when no arguments are given', function(assert) {
+ assert.expect(1);
+
+ var actual = lodashStable.uniq(lodashStable.map(array, function() {
+ return _.random();
+ })).sort();
+
+ assert.deepEqual(actual, [0, 1]);
+ });
+
+ QUnit.test('should support a `min` and `max` argument', function(assert) {
+ assert.expect(1);
+
+ var min = 5,
+ max = 10;
+
+ assert.ok(_.some(array, function() {
+ var result = _.random(min, max);
+ return result >= min && result <= max;
+ }));
+ });
+
+ QUnit.test('should support not providing a `max` argument', function(assert) {
+ assert.expect(1);
+
+ var min = 0,
+ max = 5;
+
+ assert.ok(_.some(array, function() {
+ var result = _.random(max);
+ return result >= min && result <= max;
+ }));
+ });
+
+ QUnit.test('should swap `min` and `max` when `min` > `max`', function(assert) {
+ assert.expect(1);
+
+ var min = 4,
+ max = 2,
+ expected = [2, 3, 4];
+
+ var actual = lodashStable.uniq(lodashStable.map(array, function() {
+ return _.random(min, max);
+ })).sort();
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('should support large integer values', function(assert) {
+ assert.expect(2);
+
+ var min = Math.pow(2, 31),
+ max = Math.pow(2, 62);
+
+ assert.ok(lodashStable.every(array, function() {
+ var result = _.random(min, max);
+ return result >= min && result <= max;
+ }));
+
+ assert.ok(_.some(array, function() {
+ return _.random(MAX_INTEGER) > 0;
+ }));
+ });
+
+ QUnit.test('should coerce arguments to finite numbers', function(assert) {
+ assert.expect(2);
+
+ assert.strictEqual(_.random('1', '1'), 1);
+ assert.strictEqual(_.random(NaN, NaN), 0);
+ });
+
+ QUnit.test('should support floats', function(assert) {
+ assert.expect(2);
+
+ var min = 1.5,
+ max = 1.6,
+ actual = _.random(min, max);
+
+ assert.ok(actual % 1);
+ assert.ok(actual >= min && actual <= max);
+ });
+
+ QUnit.test('should support providing a `floating` argument', function(assert) {
+ assert.expect(3);
+
+ var actual = _.random(true);
+ assert.ok(actual % 1 && actual >= 0 && actual <= 1);
+
+ actual = _.random(2, true);
+ assert.ok(actual % 1 && actual >= 0 && actual <= 2);
+
+ actual = _.random(2, 4, true);
+ assert.ok(actual % 1 && actual >= 2 && actual <= 4);
+ });
+
+ QUnit.test('should work as an iteratee for methods like `_.map`', function(assert) {
+ assert.expect(1);
+
+ var array = [1, 2, 3],
+ expected = lodashStable.map(array, alwaysTrue),
+ randoms = lodashStable.map(array, _.random);
+
+ var actual = lodashStable.map(randoms, function(result, index) {
+ return result >= 0 && result <= array[index] && (result % 1) == 0;
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('range methods');
+
+ lodashStable.each(['range', 'rangeRight'], function(methodName) {
+ var func = _[methodName],
+ isRange = methodName == 'range';
+
+ function resolve(range) {
+ return isRange ? range : range.reverse();
+ }
+
+ QUnit.test('`_.' + methodName + '` should infer the sign of `step` when only `end` is given', function(assert) {
+ assert.expect(2);
+
+ assert.deepEqual(func(4), resolve([0, 1, 2, 3]));
+ assert.deepEqual(func(-4), resolve([0, -1, -2, -3]));
+ });
+
+ QUnit.test('`_.' + methodName + '` should infer the sign of `step` when only `start` and `end` are given', function(assert) {
+ assert.expect(2);
+
+ assert.deepEqual(func(1, 5), resolve([1, 2, 3, 4]));
+ assert.deepEqual(func(5, 1), resolve([5, 4, 3, 2]));
+ });
+
+ QUnit.test('`_.' + methodName + '` should work with `start`, `end`, and `step` arguments', function(assert) {
+ assert.expect(3);
+
+ assert.deepEqual(func(0, -4, -1), resolve([0, -1, -2, -3]));
+ assert.deepEqual(func(5, 1, -1), resolve([5, 4, 3, 2]));
+ assert.deepEqual(func(0, 20, 5), resolve([0, 5, 10, 15]));
+ });
+
+ QUnit.test('`_.' + methodName + '` should support a `step` of `0`', function(assert) {
+ assert.expect(1);
+
+ assert.deepEqual(func(1, 4, 0), [1, 1, 1]);
+ });
+
+ QUnit.test('`_.' + methodName + '` should work with a `step` larger than `end`', function(assert) {
+ assert.expect(1);
+
+ assert.deepEqual(func(1, 5, 20), [1]);
+ });
+
+ QUnit.test('`_.' + methodName + '` should work with a negative `step`', function(assert) {
+ assert.expect(2);
+
+ assert.deepEqual(func(0, -4, -1), resolve([0, -1, -2, -3]));
+ assert.deepEqual(func(21, 10, -3), resolve([21, 18, 15, 12]));
+ });
+
+ QUnit.test('`_.' + methodName + '` should support `start` of `-0`', function(assert) {
+ assert.expect(1);
+
+ var actual = func(-0, 1);
+ assert.strictEqual(1 / actual[0], -Infinity);
+ });
+
+ QUnit.test('`_.' + methodName + '` should treat falsey `start` arguments as `0`', function(assert) {
+ assert.expect(13);
+
+ lodashStable.each(falsey, function(value, index) {
+ if (index) {
+ assert.deepEqual(func(value), []);
+ assert.deepEqual(func(value, 1), [0]);
+ } else {
+ assert.deepEqual(func(), []);
+ }
+ });
+ });
+
+ QUnit.test('`_.' + methodName + '` should coerce arguments to finite numbers', function(assert) {
+ assert.expect(1);
+
+ var actual = [func('0', 1), func('1'), func(0, 1, '1'), func(NaN), func(NaN, NaN)];
+ assert.deepEqual(actual, [[0], [0], [0], [], []]);
+ });
+
+ QUnit.test('`_.' + methodName + '` should work as an iteratee for methods like `_.map`', function(assert) {
+ assert.expect(2);
+
+ var array = [1, 2, 3],
+ object = { 'a': 1, 'b': 2, 'c': 3 },
+ expected = lodashStable.map([[0], [0, 1], [0, 1, 2]], resolve);
+
+ lodashStable.each([array, object], function(collection) {
+ var actual = lodashStable.map(collection, func);
+ assert.deepEqual(actual, expected);
+ });
+ });
+ });
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.rearg');
+
+ (function() {
+ function fn() {
+ return slice.call(arguments);
+ }
+
+ QUnit.test('should reorder arguments provided to `func`', function(assert) {
+ assert.expect(1);
+
+ var rearged = _.rearg(fn, [2, 0, 1]);
+ assert.deepEqual(rearged('b', 'c', 'a'), ['a', 'b', 'c']);
+ });
+
+ QUnit.test('should work with repeated indexes', function(assert) {
+ assert.expect(1);
+
+ var rearged = _.rearg(fn, [1, 1, 1]);
+ assert.deepEqual(rearged('c', 'a', 'b'), ['a', 'a', 'a']);
+ });
+
+ QUnit.test('should use `undefined` for nonexistent indexes', function(assert) {
+ assert.expect(1);
+
+ var rearged = _.rearg(fn, [1, 4]);
+ assert.deepEqual(rearged('b', 'a', 'c'), ['a', undefined, 'c']);
+ });
+
+ QUnit.test('should use `undefined` for non-index values', function(assert) {
+ assert.expect(1);
+
+ var values = lodashStable.reject(empties, function(value) {
+ return (value === 0) || lodashStable.isArray(value);
+ }).concat(-1, 1.1);
+
+ var expected = lodashStable.map(values, lodashStable.constant([undefined, 'b', 'c']));
+
+ var actual = lodashStable.map(values, function(value) {
+ var rearged = _.rearg(fn, [value]);
+ return rearged('a', 'b', 'c');
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('should not rearrange arguments when no indexes are given', function(assert) {
+ assert.expect(2);
+
+ var rearged = _.rearg(fn);
+ assert.deepEqual(rearged('a', 'b', 'c'), ['a', 'b', 'c']);
+
+ rearged = _.rearg(fn, [], []);
+ assert.deepEqual(rearged('a', 'b', 'c'), ['a', 'b', 'c']);
+ });
+
+ QUnit.test('should accept multiple index arguments', function(assert) {
+ assert.expect(1);
+
+ var rearged = _.rearg(fn, 2, 0, 1);
+ assert.deepEqual(rearged('b', 'c', 'a'), ['a', 'b', 'c']);
+ });
+
+ QUnit.test('should accept multiple arrays of indexes', function(assert) {
+ assert.expect(1);
+
+ var rearged = _.rearg(fn, [2], [0, 1]);
+ assert.deepEqual(rearged('b', 'c', 'a'), ['a', 'b', 'c']);
+ });
+
+ QUnit.test('should work with fewer indexes than arguments', function(assert) {
+ assert.expect(1);
+
+ var rearged = _.rearg(fn, [1, 0]);
+ assert.deepEqual(rearged('b', 'a', 'c'), ['a', 'b', 'c']);
+ });
+
+ QUnit.test('should work on functions that have been rearged', function(assert) {
+ assert.expect(1);
+
+ var rearged1 = _.rearg(fn, 2, 1, 0),
+ rearged2 = _.rearg(rearged1, 1, 0, 2);
+
+ assert.deepEqual(rearged2('b', 'c', 'a'), ['a', 'b', 'c']);
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.reduce');
+
+ (function() {
+ var array = [1, 2, 3];
+
+ QUnit.test('should use the first element of a collection as the default `accumulator`', function(assert) {
+ assert.expect(1);
+
+ assert.strictEqual(_.reduce(array), 1);
+ });
+
+ QUnit.test('should provide the correct `iteratee` arguments when iterating an array', function(assert) {
+ assert.expect(2);
+
+ var args;
+
+ _.reduce(array, function() {
+ args || (args = slice.call(arguments));
+ }, 0);
+
+ assert.deepEqual(args, [0, 1, 0, array]);
+
+ args = undefined;
+ _.reduce(array, function() {
+ args || (args = slice.call(arguments));
+ });
+
+ assert.deepEqual(args, [1, 2, 1, array]);
+ });
+
+ QUnit.test('should provide the correct `iteratee` arguments when iterating an object', function(assert) {
+ assert.expect(2);
+
+ var args,
+ object = { 'a': 1, 'b': 2 },
+ firstKey = _.head(_.keys(object));
+
+ var expected = firstKey == 'a'
+ ? [0, 1, 'a', object]
+ : [0, 2, 'b', object];
+
+ _.reduce(object, function() {
+ args || (args = slice.call(arguments));
+ }, 0);
+
+ assert.deepEqual(args, expected);
+
+ args = undefined;
+ expected = firstKey == 'a'
+ ? [1, 2, 'b', object]
+ : [2, 1, 'a', object];
+
+ _.reduce(object, function() {
+ args || (args = slice.call(arguments));
+ });
+
+ assert.deepEqual(args, expected);
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.reduceRight');
+
+ (function() {
+ var array = [1, 2, 3];
+
+ QUnit.test('should use the last element of a collection as the default `accumulator`', function(assert) {
+ assert.expect(1);
+
+ assert.strictEqual(_.reduceRight(array), 3);
+ });
+
+ QUnit.test('should provide the correct `iteratee` arguments when iterating an array', function(assert) {
+ assert.expect(2);
+
+ var args;
+
+ _.reduceRight(array, function() {
+ args || (args = slice.call(arguments));
+ }, 0);
+
+ assert.deepEqual(args, [0, 3, 2, array]);
+
+ args = undefined;
+ _.reduceRight(array, function() {
+ args || (args = slice.call(arguments));
+ });
+
+ assert.deepEqual(args, [3, 2, 1, array]);
+ });
+
+ QUnit.test('should provide the correct `iteratee` arguments when iterating an object', function(assert) {
+ assert.expect(2);
+
+ var args,
+ object = { 'a': 1, 'b': 2 },
+ isFIFO = lodashStable.keys(object)[0] == 'a';
+
+ var expected = isFIFO
+ ? [0, 2, 'b', object]
+ : [0, 1, 'a', object];
+
+ _.reduceRight(object, function() {
+ args || (args = slice.call(arguments));
+ }, 0);
+
+ assert.deepEqual(args, expected);
+
+ args = undefined;
+ expected = isFIFO
+ ? [2, 1, 'a', object]
+ : [1, 2, 'b', object];
+
+ _.reduceRight(object, function() {
+ args || (args = slice.call(arguments));
+ });
+
+ assert.deepEqual(args, expected);
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('reduce methods');
+
+ lodashStable.each(['reduce', 'reduceRight'], function(methodName) {
+ var func = _[methodName],
+ array = [1, 2, 3],
+ isReduce = methodName == 'reduce';
+
+ QUnit.test('`_.' + methodName + '` should reduce a collection to a single value', function(assert) {
+ assert.expect(1);
+
+ var actual = func(['a', 'b', 'c'], function(accumulator, value) {
+ return accumulator + value;
+ }, '');
+
+ assert.strictEqual(actual, isReduce ? 'abc' : 'cba');
+ });
+
+ QUnit.test('`_.' + methodName + '` should support empty collections without an initial `accumulator` value', function(assert) {
+ assert.expect(1);
+
+ var actual = [],
+ expected = lodashStable.map(empties, noop);
+
+ lodashStable.each(empties, function(value) {
+ try {
+ actual.push(func(value, noop));
+ } catch (e) {}
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('`_.' + methodName + '` should support empty collections with an initial `accumulator` value', function(assert) {
+ assert.expect(1);
+
+ var expected = lodashStable.map(empties, lodashStable.constant('x'));
+
+ var actual = lodashStable.map(empties, function(value) {
+ try {
+ return func(value, noop, 'x');
+ } catch (e) {}
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('`_.' + methodName + '` should handle an initial `accumulator` value of `undefined`', function(assert) {
+ assert.expect(1);
+
+ var actual = func([], noop, undefined);
+ assert.strictEqual(actual, undefined);
+ });
+
+ QUnit.test('`_.' + methodName + '` should return `undefined` for empty collections when no `accumulator` is given (test in IE > 9 and modern browsers)', function(assert) {
+ assert.expect(2);
+
+ var array = [],
+ object = { '0': 1, 'length': 0 };
+
+ if ('__proto__' in array) {
+ array.__proto__ = object;
+ assert.strictEqual(func(array, noop), undefined);
+ }
+ else {
+ skipAssert(assert);
+ }
+ assert.strictEqual(func(object, noop), undefined);
+ });
+
+ QUnit.test('`_.' + methodName + '` should return an unwrapped value when implicitly chaining', function(assert) {
+ assert.expect(1);
+
+ if (!isNpm) {
+ assert.strictEqual(_(array)[methodName](add), 6);
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+
+ QUnit.test('`_.' + methodName + '` should return a wrapped value when explicitly chaining', function(assert) {
+ assert.expect(1);
+
+ if (!isNpm) {
+ assert.ok(_(array).chain()[methodName](add) instanceof _);
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+ });
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.reject');
+
+ (function() {
+ var array = [1, 2, 3];
+
+ QUnit.test('should return elements the `predicate` returns falsey for', function(assert) {
+ assert.expect(1);
+
+ assert.deepEqual(_.reject(array, isEven), [1, 3]);
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('filter methods');
+
+ lodashStable.each(['filter', 'reject'], function(methodName) {
+ var array = [1, 2, 3, 4],
+ func = _[methodName],
+ isFilter = methodName == 'filter',
+ objects = [{ 'a': 0 }, { 'a': 1 }];
+
+ QUnit.test('`_.' + methodName + '` should not modify the resulting value from within `predicate`', function(assert) {
+ assert.expect(1);
+
+ var actual = func([0], function(value, index, array) {
+ array[index] = 1;
+ return isFilter;
+ });
+
+ assert.deepEqual(actual, [0]);
+ });
+
+ QUnit.test('`_.' + methodName + '` should work with `_.property` shorthands', function(assert) {
+ assert.expect(1);
+
+ assert.deepEqual(func(objects, 'a'), [objects[isFilter ? 1 : 0]]);
+ });
+
+ QUnit.test('`_.' + methodName + '` should work with `_.matches` shorthands', function(assert) {
+ assert.expect(1);
+
+ assert.deepEqual(func(objects, objects[1]), [objects[isFilter ? 1 : 0]]);
+ });
+
+ QUnit.test('`_.' + methodName + '` should not modify wrapped values', function(assert) {
+ assert.expect(2);
+
+ if (!isNpm) {
+ var wrapped = _(array);
+
+ var actual = wrapped[methodName](function(n) {
+ return n < 3;
+ });
+
+ assert.deepEqual(actual.value(), isFilter ? [1, 2] : [3, 4]);
+
+ actual = wrapped[methodName](function(n) {
+ return n > 2;
+ });
+
+ assert.deepEqual(actual.value(), isFilter ? [3, 4] : [1, 2]);
+ }
+ else {
+ skipAssert(assert, 2);
+ }
+ });
+
+ QUnit.test('`_.' + methodName + '` should work in a lazy sequence', function(assert) {
+ assert.expect(2);
+
+ if (!isNpm) {
+ var array = lodashStable.range(LARGE_ARRAY_SIZE + 1),
+ predicate = function(value) { return isFilter ? isEven(value) : !isEven(value); },
+ actual = _(array).slice(1).map(square)[methodName](predicate).value();
+
+ assert.deepEqual(actual, _[methodName](lodashStable.map(array.slice(1), square), predicate));
+
+ var object = lodashStable.zipObject(lodashStable.times(LARGE_ARRAY_SIZE, function(index) {
+ return ['key' + index, index];
+ }));
+
+ actual = _(object).mapValues(square)[methodName](predicate).value();
+ assert.deepEqual(actual, _[methodName](lodashStable.mapValues(object, square), predicate));
+ }
+ else {
+ skipAssert(assert, 2);
+ }
+ });
+
+ QUnit.test('`_.' + methodName + '` should provide the correct `predicate` arguments in a lazy sequence', function(assert) {
+ assert.expect(5);
+
+ if (!isNpm) {
+ var args,
+ array = lodashStable.range(LARGE_ARRAY_SIZE + 1),
+ expected = [1, 0, lodashStable.map(array.slice(1), square)];
+
+ _(array).slice(1)[methodName](function(value, index, array) {
+ args || (args = slice.call(arguments));
+ }).value();
+
+ assert.deepEqual(args, [1, 0, array.slice(1)]);
+
+ args = undefined;
+ _(array).slice(1).map(square)[methodName](function(value, index, array) {
+ args || (args = slice.call(arguments));
+ }).value();
+
+ assert.deepEqual(args, expected);
+
+ args = undefined;
+ _(array).slice(1).map(square)[methodName](function(value, index) {
+ args || (args = slice.call(arguments));
+ }).value();
+
+ assert.deepEqual(args, expected);
+
+ args = undefined;
+ _(array).slice(1).map(square)[methodName](function(value) {
+ args || (args = slice.call(arguments));
+ }).value();
+
+ assert.deepEqual(args, [1]);
+
+ args = undefined;
+ _(array).slice(1).map(square)[methodName](function() {
+ args || (args = slice.call(arguments));
+ }).value();
+
+ assert.deepEqual(args, expected);
+ }
+ else {
+ skipAssert(assert, 5);
+ }
+ });
+ });
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.remove');
+
+ (function() {
+ QUnit.test('should modify the array and return removed elements', function(assert) {
+ assert.expect(2);
+
+ var array = [1, 2, 3, 4];
+
+ var actual = _.remove(array, function(n) {
+ return n % 2 == 0;
+ });
+
+ assert.deepEqual(array, [1, 3]);
+ assert.deepEqual(actual, [2, 4]);
+ });
+
+ QUnit.test('should provide the correct `predicate` arguments', function(assert) {
+ assert.expect(1);
+
+ var argsList = [],
+ array = [1, 2, 3],
+ clone = array.slice();
+
+ _.remove(array, function(n, index) {
+ var args = slice.call(arguments);
+ args[2] = args[2].slice();
+ argsList.push(args);
+ return isEven(index);
+ });
+
+ assert.deepEqual(argsList, [[1, 0, clone], [2, 1, clone], [3, 2, clone]]);
+ });
+
+ QUnit.test('should work with `_.matches` shorthands', function(assert) {
+ assert.expect(1);
+
+ var objects = [{ 'a': 0, 'b': 1 }, { 'a': 1, 'b': 2 }];
+ _.remove(objects, { 'a': 1 });
+ assert.deepEqual(objects, [{ 'a': 0, 'b': 1 }]);
+ });
+
+ QUnit.test('should work with `_.matchesProperty` shorthands', function(assert) {
+ assert.expect(1);
+
+ var objects = [{ 'a': 0, 'b': 1 }, { 'a': 1, 'b': 2 }];
+ _.remove(objects, ['a', 1]);
+ assert.deepEqual(objects, [{ 'a': 0, 'b': 1 }]);
+ });
+
+ QUnit.test('should work with `_.property` shorthands', function(assert) {
+ assert.expect(1);
+
+ var objects = [{ 'a': 0 }, { 'a': 1 }];
+ _.remove(objects, 'a');
+ assert.deepEqual(objects, [{ 'a': 0 }]);
+ });
+
+ QUnit.test('should preserve holes in arrays', function(assert) {
+ assert.expect(2);
+
+ var array = [1, 2, 3, 4];
+ delete array[1];
+ delete array[3];
+
+ _.remove(array, function(n) {
+ return n === 1;
+ });
+
+ assert.notOk('0' in array);
+ assert.notOk('2' in array);
+ });
+
+ QUnit.test('should treat holes as `undefined`', function(assert) {
+ assert.expect(1);
+
+ var array = [1, 2, 3];
+ delete array[1];
+
+ _.remove(array, function(n) {
+ return n == null;
+ });
+
+ assert.deepEqual(array, [1, 3]);
+ });
+
+ QUnit.test('should not mutate the array until all elements to remove are determined', function(assert) {
+ assert.expect(1);
+
+ var array = [1, 2, 3];
+
+ _.remove(array, function(n, index) {
+ return isEven(index);
+ });
+
+ assert.deepEqual(array, [2]);
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.repeat');
+
+ (function() {
+ var string = 'abc';
+
+ QUnit.test('should repeat a string `n` times', function(assert) {
+ assert.expect(2);
+
+ assert.strictEqual(_.repeat('*', 3), '***');
+ assert.strictEqual(_.repeat(string, 2), 'abcabc');
+ });
+
+ QUnit.test('should treat falsey `n` values, except `undefined`, as `0`', function(assert) {
+ assert.expect(1);
+
+ var expected = lodashStable.map(falsey, function(value) {
+ return value === undefined ? string : '';
+ });
+
+ var actual = lodashStable.map(falsey, function(n, index) {
+ return index ? _.repeat(string, n) : _.repeat(string);
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('should return an empty string if `n` is <= `0`', function(assert) {
+ assert.expect(2);
+
+ assert.strictEqual(_.repeat(string, 0), '');
+ assert.strictEqual(_.repeat(string, -2), '');
+ });
+
+ QUnit.test('should coerce `n` to an integer', function(assert) {
+ assert.expect(3);
+
+ assert.strictEqual(_.repeat(string, '2'), 'abcabc');
+ assert.strictEqual(_.repeat(string, 2.6), 'abcabc');
+ assert.strictEqual(_.repeat('*', { 'valueOf': alwaysThree }), '***');
+ });
+
+ QUnit.test('should coerce `string` to a string', function(assert) {
+ assert.expect(2);
+
+ assert.strictEqual(_.repeat(Object(string), 2), 'abcabc');
+ assert.strictEqual(_.repeat({ 'toString': lodashStable.constant('*') }, 3), '***');
+ });
+
+ QUnit.test('should work as an iteratee for methods like `_.map`', function(assert) {
+ assert.expect(1);
+
+ var actual = lodashStable.map(['a', 'b', 'c'], _.repeat);
+ assert.deepEqual(actual, ['a', 'b', 'c']);
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.replace');
+
+ (function() {
+ QUnit.test('should replace the matched pattern', function(assert) {
+ assert.expect(2);
+
+ var string = 'abcde';
+ assert.strictEqual(_.replace(string, 'de', '123'), 'abc123');
+ assert.strictEqual(_.replace(string, /[bd]/g, '-'), 'a-c-e');
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.result');
+
+ (function() {
+ var object = { 'a': 1, 'b': alwaysB };
+
+ QUnit.test('should invoke function values', function(assert) {
+ assert.expect(1);
+
+ assert.strictEqual(_.result(object, 'b'), 'b');
+ });
+
+ QUnit.test('should invoke default function values', function(assert) {
+ assert.expect(1);
+
+ var actual = _.result(object, 'c', object.b);
+ assert.strictEqual(actual, 'b');
+ });
+
+ QUnit.test('should invoke nested function values', function(assert) {
+ assert.expect(2);
+
+ var value = { 'a': lodashStable.constant({ 'b': alwaysB }) };
+
+ lodashStable.each(['a.b', ['a', 'b']], function(path) {
+ assert.strictEqual(_.result(value, path), 'b');
+ });
+ });
+
+ QUnit.test('should invoke deep property methods with the correct `this` binding', function(assert) {
+ assert.expect(2);
+
+ var value = { 'a': { 'b': function() { return this.c; }, 'c': 1 } };
+
+ lodashStable.each(['a.b', ['a', 'b']], function(path) {
+ assert.strictEqual(_.result(value, path), 1);
+ });
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.get and lodash.result');
+
+ lodashStable.each(['get', 'result'], function(methodName) {
+ var func = _[methodName];
+
+ QUnit.test('`_.' + methodName + '` should get string keyed property values', function(assert) {
+ assert.expect(2);
+
+ var object = { 'a': 1 };
+
+ lodashStable.each(['a', ['a']], function(path) {
+ assert.strictEqual(func(object, path), 1);
+ });
+ });
+
+ QUnit.test('`_.' + methodName + '` should preserve the sign of `0`', function(assert) {
+ assert.expect(1);
+
+ var object = { '-0': 'a', '0': 'b' },
+ props = [-0, Object(-0), 0, Object(0)];
+
+ var actual = lodashStable.map(props, function(key) {
+ return func(object, key);
+ });
+
+ assert.deepEqual(actual, ['a', 'a', 'b', 'b']);
+ });
+
+ QUnit.test('`_.' + methodName + '` should get symbol keyed property values', function(assert) {
+ assert.expect(1);
+
+ if (Symbol) {
+ var object = {};
+ object[symbol] = 1;
+
+ assert.strictEqual(func(object, symbol), 1);
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+
+ QUnit.test('`_.' + methodName + '` should get deep property values', function(assert) {
+ assert.expect(2);
+
+ var object = { 'a': { 'b': 2 } };
+
+ lodashStable.each(['a.b', ['a', 'b']], function(path) {
+ assert.strictEqual(func(object, path), 2);
+ });
+ });
+
+ QUnit.test('`_.' + methodName + '` should get a key over a path', function(assert) {
+ assert.expect(2);
+
+ var object = { 'a.b': 1, 'a': { 'b': 2 } };
+
+ lodashStable.each(['a.b', ['a.b']], function(path) {
+ assert.strictEqual(func(object, path), 1);
+ });
+ });
+
+ QUnit.test('`_.' + methodName + '` should not coerce array paths to strings', function(assert) {
+ assert.expect(1);
+
+ var object = { 'a,b,c': 3, 'a': { 'b': { 'c': 4 } } };
+ assert.strictEqual(func(object, ['a', 'b', 'c']), 4);
+ });
+
+ QUnit.test('`_.' + methodName + '` should ignore empty brackets', function(assert) {
+ assert.expect(1);
+
+ var object = { 'a': 1 };
+ assert.strictEqual(func(object, 'a[]'), 1);
+ });
+
+ QUnit.test('`_.' + methodName + '` should handle empty paths', function(assert) {
+ assert.expect(4);
+
+ lodashStable.each([['', ''], [[], ['']]], function(pair) {
+ assert.strictEqual(func({}, pair[0]), undefined);
+ assert.strictEqual(func({ '': 3 }, pair[1]), 3);
+ });
+ });
+
+ QUnit.test('`_.' + methodName + '` should handle complex paths', function(assert) {
+ assert.expect(2);
+
+ var object = { 'a': { '-1.23': { '["b"]': { 'c': { "['d']": { '\ne\n': { 'f': { 'g': 8 } } } } } } } };
+
+ var paths = [
+ 'a[-1.23]["[\\"b\\"]"].c[\'[\\\'d\\\']\'][\ne\n][f].g',
+ ['a', '-1.23', '["b"]', 'c', "['d']", '\ne\n', 'f', 'g']
+ ];
+
+ lodashStable.each(paths, function(path) {
+ assert.strictEqual(func(object, path), 8);
+ });
+ });
+
+ QUnit.test('`_.' + methodName + '` should return `undefined` when `object` is nullish', function(assert) {
+ assert.expect(4);
+
+ lodashStable.each(['constructor', ['constructor']], function(path) {
+ assert.strictEqual(func(null, path), undefined);
+ assert.strictEqual(func(undefined, path), undefined);
+ });
+ });
+
+ QUnit.test('`_.' + methodName + '` should return `undefined` with deep paths when `object` is nullish', function(assert) {
+ assert.expect(2);
+
+ var values = [null, undefined],
+ expected = lodashStable.map(values, noop),
+ paths = ['constructor.prototype.valueOf', ['constructor', 'prototype', 'valueOf']];
+
+ lodashStable.each(paths, function(path) {
+ var actual = lodashStable.map(values, function(value) {
+ return func(value, path);
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+ });
+
+ QUnit.test('`_.' + methodName + '` should return `undefined` if parts of `path` are missing', function(assert) {
+ assert.expect(2);
+
+ var object = { 'a': [, null] };
+
+ lodashStable.each(['a[1].b.c', ['a', '1', 'b', 'c']], function(path) {
+ assert.strictEqual(func(object, path), undefined);
+ });
+ });
+
+ QUnit.test('`_.' + methodName + '` should be able to return `null` values', function(assert) {
+ assert.expect(2);
+
+ var object = { 'a': { 'b': null } };
+
+ lodashStable.each(['a.b', ['a', 'b']], function(path) {
+ assert.strictEqual(func(object, path), null);
+ });
+ });
+
+ QUnit.test('`_.' + methodName + '` should follow `path` over non-plain objects', function(assert) {
+ assert.expect(2);
+
+ var paths = ['a.b', ['a', 'b']];
+
+ lodashStable.each(paths, function(path) {
+ numberProto.a = { 'b': 2 };
+ assert.strictEqual(func(0, path), 2);
+ delete numberProto.a;
+ });
+ });
+
+ QUnit.test('`_.' + methodName + '` should return the default value for `undefined` values', function(assert) {
+ assert.expect(1);
+
+ var object = { 'a': {} },
+ values = empties.concat(true, new Date, 1, /x/, 'a');
+
+ var expected = lodashStable.transform(values, function(result, value) {
+ result.push(value, value, value, value);
+ });
+
+ var actual = lodashStable.transform(values, function(result, value) {
+ lodashStable.each(['a.b', ['a', 'b']], function(path) {
+ result.push(
+ func(object, path, value),
+ func(null, path, value)
+ );
+ });
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('`_.' + methodName + '` should return the default value when `path` is empty', function(assert) {
+ assert.expect(1);
+
+ assert.strictEqual(func({}, [], 'a'), 'a');
+ });
+ });
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.rest');
+
+ (function() {
+ function fn(a, b, c) {
+ return slice.call(arguments);
+ }
+
+ QUnit.test('should apply a rest parameter to `func`', function(assert) {
+ assert.expect(1);
+
+ var rest = _.rest(fn);
+ assert.deepEqual(rest(1, 2, 3, 4), [1, 2, [3, 4]]);
+ });
+
+ QUnit.test('should work with `start`', function(assert) {
+ assert.expect(1);
+
+ var rest = _.rest(fn, 1);
+ assert.deepEqual(rest(1, 2, 3, 4), [1, [2, 3, 4]]);
+ });
+
+ QUnit.test('should treat `start` as `0` for negative or `NaN` values', function(assert) {
+ assert.expect(1);
+
+ var values = [-1, NaN, 'a'],
+ expected = lodashStable.map(values, lodashStable.constant([[1, 2, 3, 4]]));
+
+ var actual = lodashStable.map(values, function(value) {
+ var rest = _.rest(fn, value);
+ return rest(1, 2, 3, 4);
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('should coerce `start` to an integer', function(assert) {
+ assert.expect(1);
+
+ var rest = _.rest(fn, 1.6);
+ assert.deepEqual(rest(1, 2, 3), [1, [2, 3]]);
+ });
+
+ QUnit.test('should use an empty array when `start` is not reached', function(assert) {
+ assert.expect(1);
+
+ var rest = _.rest(fn);
+ assert.deepEqual(rest(1), [1, undefined, []]);
+ });
+
+ QUnit.test('should work on functions with more than three parameters', function(assert) {
+ assert.expect(1);
+
+ var rest = _.rest(function(a, b, c, d) {
+ return slice.call(arguments);
+ });
+
+ assert.deepEqual(rest(1, 2, 3, 4, 5), [1, 2, 3, [4, 5]]);
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.reverse');
+
+ (function() {
+ var largeArray = lodashStable.range(LARGE_ARRAY_SIZE).concat(null),
+ smallArray = [0, 1, 2, null];
+
+ QUnit.test('should reverse `array`', function(assert) {
+ assert.expect(2);
+
+ var array = [1, 2, 3],
+ actual = _.reverse(array);
+
+ assert.deepEqual(array, [3, 2, 1]);
+ assert.strictEqual(actual, array);
+ });
+
+ QUnit.test('should return the wrapped reversed `array`', function(assert) {
+ assert.expect(6);
+
+ if (!isNpm) {
+ lodashStable.times(2, function(index) {
+ var array = (index ? largeArray : smallArray).slice(),
+ clone = array.slice(),
+ wrapped = _(array).reverse(),
+ actual = wrapped.value();
+
+ assert.ok(wrapped instanceof _);
+ assert.strictEqual(actual, array);
+ assert.deepEqual(actual, clone.slice().reverse());
+ });
+ }
+ else {
+ skipAssert(assert, 6);
+ }
+ });
+
+ QUnit.test('should work in a lazy sequence', function(assert) {
+ assert.expect(4);
+
+ if (!isNpm) {
+ lodashStable.times(2, function(index) {
+ var array = (index ? largeArray : smallArray).slice(),
+ expected = array.slice(),
+ actual = _(array).slice(1).reverse().value();
+
+ assert.deepEqual(actual, expected.slice(1).reverse());
+ assert.deepEqual(array, expected);
+ });
+ }
+ else {
+ skipAssert(assert, 4);
+ }
+ });
+
+ QUnit.test('should be lazy when in a lazy sequence', function(assert) {
+ assert.expect(3);
+
+ if (!isNpm) {
+ var spy = {
+ 'toString': function() {
+ throw new Error('spy was revealed');
+ }
+ };
+
+ var array = largeArray.concat(spy),
+ expected = array.slice();
+
+ try {
+ var wrapped = _(array).slice(1).map(String).reverse(),
+ actual = wrapped.last();
+ } catch (e) {}
+
+ assert.ok(wrapped instanceof _);
+ assert.strictEqual(actual, '1');
+ assert.deepEqual(array, expected);
+ }
+ else {
+ skipAssert(assert, 3);
+ }
+ });
+
+ QUnit.test('should work in a hybrid sequence', function(assert) {
+ assert.expect(8);
+
+ if (!isNpm) {
+ lodashStable.times(2, function(index) {
+ var clone = (index ? largeArray : smallArray).slice();
+
+ lodashStable.each(['map', 'filter'], function(methodName) {
+ var array = clone.slice(),
+ expected = clone.slice(1, -1).reverse(),
+ actual = _(array)[methodName](identity).thru(_.compact).reverse().value();
+
+ assert.deepEqual(actual, expected);
+
+ array = clone.slice();
+ actual = _(array).thru(_.compact)[methodName](identity).pull(1).push(3).reverse().value();
+
+ assert.deepEqual(actual, [3].concat(expected.slice(0, -1)));
+ });
+ });
+ }
+ else {
+ skipAssert(assert, 8);
+ }
+ });
+
+ QUnit.test('should track the `__chain__` value of a wrapper', function(assert) {
+ assert.expect(6);
+
+ if (!isNpm) {
+ lodashStable.times(2, function(index) {
+ var array = (index ? largeArray : smallArray).slice(),
+ expected = array.slice().reverse(),
+ wrapped = _(array).chain().reverse().head();
+
+ assert.ok(wrapped instanceof _);
+ assert.strictEqual(wrapped.value(), _.head(expected));
+ assert.deepEqual(array, expected);
+ });
+ }
+ else {
+ skipAssert(assert, 6);
+ }
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('round methods');
+
+ lodashStable.each(['ceil', 'floor', 'round'], function(methodName) {
+ var func = _[methodName],
+ isCeil = methodName == 'ceil',
+ isFloor = methodName == 'floor';
+
+ QUnit.test('`_.' + methodName + '` should return a rounded number without a precision', function(assert) {
+ assert.expect(1);
+
+ var actual = func(4.006);
+ assert.strictEqual(actual, isCeil ? 5 : 4);
+ });
+
+ QUnit.test('`_.' + methodName + '` should work with a precision of `0`', function(assert) {
+ assert.expect(1);
+
+ var actual = func(4.006, 0);
+ assert.strictEqual(actual, isCeil ? 5 : 4);
+ });
+
+ QUnit.test('`_.' + methodName + '` should work with a positive precision', function(assert) {
+ assert.expect(2);
+
+ var actual = func(4.016, 2);
+ assert.strictEqual(actual, isFloor ? 4.01 : 4.02);
+
+ actual = func(4.1, 2);
+ assert.strictEqual(actual, 4.1);
+ });
+
+ QUnit.test('`_.' + methodName + '` should work with a negative precision', function(assert) {
+ assert.expect(1);
+
+ var actual = func(4160, -2);
+ assert.strictEqual(actual, isFloor ? 4100 : 4200);
+ });
+
+ QUnit.test('`_.' + methodName + '` should coerce `precision` to an integer', function(assert) {
+ assert.expect(3);
+
+ var actual = func(4.006, NaN);
+ assert.strictEqual(actual, isCeil ? 5 : 4);
+
+ var expected = isFloor ? 4.01 : 4.02;
+
+ actual = func(4.016, 2.6);
+ assert.strictEqual(actual, expected);
+
+ actual = func(4.016, '+2');
+ assert.strictEqual(actual, expected);
+ });
+
+ QUnit.test('`_.' + methodName + '` should work with exponential notation and `precision`', function(assert) {
+ assert.expect(3);
+
+ var actual = func(5e1, 2);
+ assert.deepEqual(actual, 50);
+
+ actual = func('5e', 1);
+ assert.deepEqual(actual, NaN);
+
+ actual = func('5e1e1', 1);
+ assert.deepEqual(actual, NaN);
+ });
+
+ QUnit.test('`_.' + methodName + '` should preserve the sign of `0`', function(assert) {
+ assert.expect(1);
+
+ var values = [[0], [-0], ['0'], ['-0'], [0, 1], [-0, 1], ['0', 1], ['-0', 1]],
+ expected = [Infinity, -Infinity, Infinity, -Infinity, Infinity, -Infinity, Infinity, -Infinity];
+
+ var actual = lodashStable.map(values, function(args) {
+ return 1 / func.apply(undefined, args);
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+ });
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.runInContext');
+
+ (function() {
+ QUnit.test('should not require a fully populated `context` object', function(assert) {
+ assert.expect(1);
+
+ if (!isModularize) {
+ var lodash = _.runInContext({
+ 'setTimeout': function(callback) {
+ callback();
+ }
+ });
+
+ var pass = false;
+ lodash.delay(function() { pass = true; }, 32);
+ assert.ok(pass);
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+
+ QUnit.test('should use a zeroed `_.uniqueId` counter', function(assert) {
+ assert.expect(3);
+
+ if (!isModularize) {
+ lodashStable.times(2, _.uniqueId);
+
+ var oldId = Number(_.uniqueId()),
+ lodash = _.runInContext();
+
+ assert.ok(_.uniqueId() > oldId);
+
+ var id = lodash.uniqueId();
+ assert.strictEqual(id, '1');
+ assert.ok(id < oldId);
+ }
+ else {
+ skipAssert(assert, 3);
+ }
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.sample');
+
+ (function() {
+ var array = [1, 2, 3];
+
+ QUnit.test('should return a random element', function(assert) {
+ assert.expect(1);
+
+ var actual = _.sample(array);
+ assert.ok(lodashStable.includes(array, actual));
+ });
+
+ QUnit.test('should return `undefined` when sampling empty collections', function(assert) {
+ assert.expect(1);
+
+ var expected = lodashStable.map(empties, noop);
+
+ var actual = lodashStable.transform(empties, function(result, value) {
+ try {
+ result.push(_.sample(value));
+ } catch (e) {}
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('should sample an object', function(assert) {
+ assert.expect(1);
+
+ var object = { 'a': 1, 'b': 2, 'c': 3 },
+ actual = _.sample(object);
+
+ assert.ok(lodashStable.includes(array, actual));
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.sampleSize');
+
+ (function() {
+ var array = [1, 2, 3];
+
+ QUnit.test('should return an array of random elements', function(assert) {
+ assert.expect(2);
+
+ var actual = _.sampleSize(array, 2);
+
+ assert.strictEqual(actual.length, 2);
+ assert.deepEqual(lodashStable.difference(actual, array), []);
+ });
+
+ QUnit.test('should contain elements of the collection', function(assert) {
+ assert.expect(1);
+
+ var actual = _.sampleSize(array, array.length).sort();
+
+ assert.deepEqual(actual, array);
+ });
+
+ QUnit.test('should treat falsey `size` values, except `undefined`, as `0`', function(assert) {
+ assert.expect(1);
+
+ var expected = lodashStable.map(falsey, function(value) {
+ return value === undefined ? ['a'] : [];
+ });
+
+ var actual = lodashStable.map(falsey, function(size, index) {
+ return index ? _.sampleSize(['a'], size) : _.sampleSize(['a']);
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('should return an empty array when `n` < `1` or `NaN`', function(assert) {
+ assert.expect(3);
+
+ lodashStable.each([0, -1, -Infinity], function(n) {
+ assert.deepEqual(_.sampleSize(array, n), []);
+ });
+ });
+
+ QUnit.test('should return all elements when `n` >= `array.length`', function(assert) {
+ assert.expect(4);
+
+ lodashStable.each([3, 4, Math.pow(2, 32), Infinity], function(n) {
+ var actual = _.sampleSize(array, n).sort();
+ assert.deepEqual(actual, array);
+ });
+ });
+
+ QUnit.test('should coerce `n` to an integer', function(assert) {
+ assert.expect(1);
+
+ var actual = _.sampleSize(array, 1.6);
+ assert.strictEqual(actual.length, 1);
+ });
+
+ QUnit.test('should return an empty array for empty collections', function(assert) {
+ assert.expect(1);
+
+ var expected = lodashStable.map(empties, alwaysEmptyArray);
+
+ var actual = lodashStable.transform(empties, function(result, value) {
+ try {
+ result.push(_.sampleSize(value, 1));
+ } catch (e) {}
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('should sample an object', function(assert) {
+ assert.expect(2);
+
+ var object = { 'a': 1, 'b': 2, 'c': 3 },
+ actual = _.sampleSize(object, 2);
+
+ assert.strictEqual(actual.length, 2);
+ assert.deepEqual(lodashStable.difference(actual, lodashStable.values(object)), []);
+ });
+
+ QUnit.test('should work as an iteratee for methods like `_.map`', function(assert) {
+ assert.expect(1);
+
+ var actual = lodashStable.map([['a']], _.sampleSize);
+ assert.deepEqual(actual, [['a']]);
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.setWith');
+
+ (function() {
+ QUnit.test('should work with a `customizer` callback', function(assert) {
+ assert.expect(1);
+
+ var actual = _.setWith({ '0': {} }, '[0][1][2]', 3, function(value) {
+ return lodashStable.isObject(value) ? undefined : {};
+ });
+
+ assert.deepEqual(actual, { '0': { '1': { '2': 3 } } });
+ });
+
+ QUnit.test('should work with a `customizer` that returns `undefined`', function(assert) {
+ assert.expect(1);
+
+ var actual = _.setWith({}, 'a[0].b.c', 4, noop);
+ assert.deepEqual(actual, { 'a': [{ 'b': { 'c': 4 } }] });
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('set methods');
+
+ lodashStable.each(['update', 'updateWith', 'set', 'setWith'], function(methodName) {
+ var func = _[methodName],
+ isUpdate = methodName == 'update' || methodName == 'updateWith';
+
+ var oldValue = 1,
+ value = 2,
+ updater = isUpdate ? lodashStable.constant(value) : value;
+
+ QUnit.test('`_.' + methodName + '` should set property values', function(assert) {
+ assert.expect(4);
+
+ lodashStable.each(['a', ['a']], function(path) {
+ var object = { 'a': oldValue },
+ actual = func(object, path, updater);
+
+ assert.strictEqual(actual, object);
+ assert.strictEqual(object.a, value);
+ });
+ });
+
+ QUnit.test('`_.' + methodName + '` should preserve the sign of `0`', function(assert) {
+ assert.expect(1);
+
+ var props = [-0, Object(-0), 0, Object(0)],
+ expected = lodashStable.map(props, lodashStable.constant(value));
+
+ var actual = lodashStable.map(props, function(key) {
+ var object = { '-0': 'a', '0': 'b' };
+ func(object, key, updater);
+ return object[lodashStable.toString(key)];
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('`_.' + methodName + '` should unset symbol keyed property values', function(assert) {
+ assert.expect(2);
+
+ if (Symbol) {
+ var object = {};
+ object[symbol] = 1;
+
+ assert.strictEqual(_.unset(object, symbol), true);
+ assert.notOk(symbol in object);
+ }
+ else {
+ skipAssert(assert, 2);
+ }
+ });
+
+ QUnit.test('`_.' + methodName + '` should set deep property values', function(assert) {
+ assert.expect(4);
+
+ lodashStable.each(['a.b', ['a', 'b']], function(path) {
+ var object = { 'a': { 'b': oldValue } },
+ actual = func(object, path, updater);
+
+ assert.strictEqual(actual, object);
+ assert.strictEqual(object.a.b, value);
+ });
+ });
+
+ QUnit.test('`_.' + methodName + '` should set a key over a path', function(assert) {
+ assert.expect(4);
+
+ lodashStable.each(['a.b', ['a.b']], function(path) {
+ var object = { 'a.b': oldValue },
+ actual = func(object, path, updater);
+
+ assert.strictEqual(actual, object);
+ assert.deepEqual(object, { 'a.b': value });
+ });
+ });
+
+ QUnit.test('`_.' + methodName + '` should not coerce array paths to strings', function(assert) {
+ assert.expect(1);
+
+ var object = { 'a,b,c': 1, 'a': { 'b': { 'c': 1 } } };
+
+ func(object, ['a', 'b', 'c'], updater);
+ assert.strictEqual(object.a.b.c, value);
+ });
+
+ QUnit.test('`_.' + methodName + '` should ignore empty brackets', function(assert) {
+ assert.expect(1);
+
+ var object = {};
+
+ func(object, 'a[]', updater);
+ assert.deepEqual(object, { 'a': value });
+ });
+
+ QUnit.test('`_.' + methodName + '` should handle empty paths', function(assert) {
+ assert.expect(4);
+
+ lodashStable.each([['', ''], [[], ['']]], function(pair, index) {
+ var object = {};
+
+ func(object, pair[0], updater);
+ assert.deepEqual(object, index ? {} : { '': value });
+
+ func(object, pair[1], updater);
+ assert.deepEqual(object, { '': value });
+ });
+ });
+
+ QUnit.test('`_.' + methodName + '` should handle complex paths', function(assert) {
+ assert.expect(2);
+
+ var object = { 'a': { '1.23': { '["b"]': { 'c': { "['d']": { '\ne\n': { 'f': { 'g': oldValue } } } } } } } };
+
+ var paths = [
+ 'a[-1.23]["[\\"b\\"]"].c[\'[\\\'d\\\']\'][\ne\n][f].g',
+ ['a', '-1.23', '["b"]', 'c', "['d']", '\ne\n', 'f', 'g']
+ ];
+
+ lodashStable.each(paths, function(path) {
+ func(object, path, updater);
+ assert.strictEqual(object.a[-1.23]['["b"]'].c["['d']"]['\ne\n'].f.g, value);
+ object.a[-1.23]['["b"]'].c["['d']"]['\ne\n'].f.g = oldValue;
+ });
+ });
+
+ QUnit.test('`_.' + methodName + '` should create parts of `path` that are missing', function(assert) {
+ assert.expect(6);
+
+ var object = {};
+
+ lodashStable.each(['a[1].b.c', ['a', '1', 'b', 'c']], function(path) {
+ var actual = func(object, path, updater);
+
+ assert.strictEqual(actual, object);
+ assert.deepEqual(actual, { 'a': [undefined, { 'b': { 'c': value } }] });
+ assert.notOk('0' in object.a);
+
+ delete object.a;
+ });
+ });
+
+ QUnit.test('`_.' + methodName + '` should not error when `object` is nullish', function(assert) {
+ assert.expect(1);
+
+ var values = [null, undefined],
+ expected = [[null, null], [undefined, undefined]];
+
+ var actual = lodashStable.map(values, function(value) {
+ try {
+ return [func(value, 'a.b', updater), func(value, ['a', 'b'], updater)];
+ } catch (e) {
+ return e.message;
+ }
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('`_.' + methodName + '` should follow `path` over non-plain objects', function(assert) {
+ assert.expect(4);
+
+ var object = { 'a': '' },
+ paths = ['constructor.prototype.a', ['constructor', 'prototype', 'a']];
+
+ lodashStable.each(paths, function(path) {
+ func(0, path, updater);
+ assert.strictEqual(0..a, value);
+ delete numberProto.a;
+ });
+
+ lodashStable.each(['a.replace.b', ['a', 'replace', 'b']], function(path) {
+ func(object, path, updater);
+ assert.strictEqual(stringProto.replace.b, value);
+ delete stringProto.replace.b;
+ });
+ });
+
+ QUnit.test('`_.' + methodName + '` should not error on paths over primitives in strict mode', function(assert) {
+ 'use strict';
+
+ assert.expect(2);
+
+ lodashStable.each(['a', 'a.a.a'], function(path) {
+ numberProto.a = oldValue;
+ try {
+ func(0, path, updater);
+ assert.strictEqual(0..a, oldValue);
+ } catch (e) {
+ assert.ok(false, e.message);
+ }
+ });
+
+ delete numberProto.a;
+ });
+
+ QUnit.test('`_.' + methodName + '` should not create an array for missing non-index property names that start with numbers', function(assert) {
+ assert.expect(1);
+
+ var object = {};
+
+ func(object, ['1a', '2b', '3c'], updater);
+ assert.deepEqual(object, { '1a': { '2b': { '3c': value } } });
+ });
+
+ QUnit.test('`_.' + methodName + '` should not assign values that are the same as their destinations', function(assert) {
+ assert.expect(4);
+
+ lodashStable.each(['a', ['a'], { 'a': 1 }, NaN], function(value) {
+ if (defineProperty) {
+ var object = {},
+ pass = true,
+ updater = isUpdate ? lodashStable.constant(value) : value;
+
+ defineProperty(object, 'a', {
+ 'enumerable': true,
+ 'configurable': true,
+ 'get': lodashStable.constant(value),
+ 'set': function() { pass = false; }
+ });
+
+ func(object, 'a', updater);
+ assert.ok(pass);
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+ });
+ });
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.shuffle');
+
+ (function() {
+ var array = [1, 2, 3],
+ object = { 'a': 1, 'b': 2, 'c': 3 };
+
+ QUnit.test('should return a new array', function(assert) {
+ assert.expect(1);
+
+ assert.notStrictEqual(_.shuffle(array), array);
+ });
+
+ QUnit.test('should contain the same elements after a collection is shuffled', function(assert) {
+ assert.expect(2);
+
+ assert.deepEqual(_.shuffle(array).sort(), array);
+ assert.deepEqual(_.shuffle(object).sort(), array);
+ });
+
+ QUnit.test('should shuffle small collections', function(assert) {
+ assert.expect(1);
+
+ var actual = lodashStable.times(1000, function(assert) {
+ return _.shuffle([1, 2]);
+ });
+
+ assert.deepEqual(lodashStable.sortBy(lodashStable.uniqBy(actual, String), '0'), [[1, 2], [2, 1]]);
+ });
+
+ QUnit.test('should treat number values for `collection` as empty', function(assert) {
+ assert.expect(1);
+
+ assert.deepEqual(_.shuffle(1), []);
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.size');
+
+ (function() {
+ var args = arguments,
+ array = [1, 2, 3];
+
+ QUnit.test('should return the number of own enumerable string keyed properties of an object', function(assert) {
+ assert.expect(1);
+
+ assert.strictEqual(_.size({ 'one': 1, 'two': 2, 'three': 3 }), 3);
+ });
+
+ QUnit.test('should return the length of an array', function(assert) {
+ assert.expect(1);
+
+ assert.strictEqual(_.size(array), 3);
+ });
+
+ QUnit.test('should accept a falsey `object` argument', function(assert) {
+ assert.expect(1);
+
+ var expected = lodashStable.map(falsey, alwaysZero);
+
+ var actual = lodashStable.map(falsey, function(object, index) {
+ try {
+ return index ? _.size(object) : _.size();
+ } catch (e) {}
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('should work with `arguments` objects', function(assert) {
+ assert.expect(1);
+
+ assert.strictEqual(_.size(args), 3);
+ });
+
+ QUnit.test('should work with jQuery/MooTools DOM query collections', function(assert) {
+ assert.expect(1);
+
+ function Foo(elements) {
+ push.apply(this, elements);
+ }
+ Foo.prototype = { 'length': 0, 'splice': arrayProto.splice };
+
+ assert.strictEqual(_.size(new Foo(array)), 3);
+ });
+
+ QUnit.test('should work with maps', function(assert) {
+ assert.expect(2);
+
+ if (Map) {
+ lodashStable.each([new Map, realm.map], function(map) {
+ map.set('a', 1);
+ map.set('b', 2);
+ assert.strictEqual(_.size(map), 2);
+ map.clear();
+ });
+ }
+ else {
+ skipAssert(assert, 2);
+ }
+ });
+
+ QUnit.test('should work with sets', function(assert) {
+ assert.expect(2);
+
+ if (Set) {
+ lodashStable.each([new Set, realm.set], function(set) {
+ set.add(1);
+ set.add(2);
+ assert.strictEqual(_.size(set), 2);
+ set.clear();
+ });
+ }
+ else {
+ skipAssert(assert, 2);
+ }
+ });
+
+ QUnit.test('should not treat objects with negative lengths as array-like', function(assert) {
+ assert.expect(1);
+
+ assert.strictEqual(_.size({ 'length': -1 }), 1);
+ });
+
+ QUnit.test('should not treat objects with lengths larger than `MAX_SAFE_INTEGER` as array-like', function(assert) {
+ assert.expect(1);
+
+ assert.strictEqual(_.size({ 'length': MAX_SAFE_INTEGER + 1 }), 1);
+ });
+
+ QUnit.test('should not treat objects with non-number lengths as array-like', function(assert) {
+ assert.expect(1);
+
+ assert.strictEqual(_.size({ 'length': '0' }), 1);
+ });
+ }(1, 2, 3));
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.slice');
+
+ (function() {
+ var array = [1, 2, 3];
+
+ QUnit.test('should use a default `start` of `0` and a default `end` of `array.length`', function(assert) {
+ assert.expect(2);
+
+ var actual = _.slice(array);
+ assert.deepEqual(actual, array);
+ assert.notStrictEqual(actual, array);
+ });
+
+ QUnit.test('should work with a positive `start`', function(assert) {
+ assert.expect(2);
+
+ assert.deepEqual(_.slice(array, 1), [2, 3]);
+ assert.deepEqual(_.slice(array, 1, 3), [2, 3]);
+ });
+
+ QUnit.test('should work with a `start` >= `array.length`', function(assert) {
+ assert.expect(4);
+
+ lodashStable.each([3, 4, Math.pow(2, 32), Infinity], function(start) {
+ assert.deepEqual(_.slice(array, start), []);
+ });
+ });
+
+ QUnit.test('should treat falsey `start` values as `0`', function(assert) {
+ assert.expect(1);
+
+ var expected = lodashStable.map(falsey, lodashStable.constant(array));
+
+ var actual = lodashStable.map(falsey, function(start) {
+ return _.slice(array, start);
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('should work with a negative `start`', function(assert) {
+ assert.expect(1);
+
+ assert.deepEqual(_.slice(array, -1), [3]);
+ });
+
+ QUnit.test('should work with a negative `start` <= negative `array.length`', function(assert) {
+ assert.expect(3);
+
+ lodashStable.each([-3, -4, -Infinity], function(start) {
+ assert.deepEqual(_.slice(array, start), array);
+ });
+ });
+
+ QUnit.test('should work with `start` >= `end`', function(assert) {
+ assert.expect(2);
+
+ lodashStable.each([2, 3], function(start) {
+ assert.deepEqual(_.slice(array, start, 2), []);
+ });
+ });
+
+ QUnit.test('should work with a positive `end`', function(assert) {
+ assert.expect(1);
+
+ assert.deepEqual(_.slice(array, 0, 1), [1]);
+ });
+
+ QUnit.test('should work with a `end` >= `array.length`', function(assert) {
+ assert.expect(4);
+
+ lodashStable.each([3, 4, Math.pow(2, 32), Infinity], function(end) {
+ assert.deepEqual(_.slice(array, 0, end), array);
+ });
+ });
+
+ QUnit.test('should treat falsey `end` values, except `undefined`, as `0`', function(assert) {
+ assert.expect(1);
+
+ var expected = lodashStable.map(falsey, function(value) {
+ return value === undefined ? array : [];
+ });
+
+ var actual = lodashStable.map(falsey, function(end, index) {
+ return index ? _.slice(array, 0, end) : _.slice(array, 0);
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('should work with a negative `end`', function(assert) {
+ assert.expect(1);
+
+ assert.deepEqual(_.slice(array, 0, -1), [1, 2]);
+ });
+
+ QUnit.test('should work with a negative `end` <= negative `array.length`', function(assert) {
+ assert.expect(3);
+
+ lodashStable.each([-3, -4, -Infinity], function(end) {
+ assert.deepEqual(_.slice(array, 0, end), []);
+ });
+ });
+
+ QUnit.test('should coerce `start` and `end` to integers', function(assert) {
+ assert.expect(1);
+
+ var positions = [[0.1, 1.6], ['0', 1], [0, '1'], ['1'], [NaN, 1], [1, NaN]];
+
+ var actual = lodashStable.map(positions, function(pos) {
+ return _.slice.apply(_, [array].concat(pos));
+ });
+
+ assert.deepEqual(actual, [[1], [1], [1], [2, 3], [1], []]);
+ });
+
+ QUnit.test('should work as an iteratee for methods like `_.map`', function(assert) {
+ assert.expect(2);
+
+ var array = [[1], [2, 3]],
+ actual = lodashStable.map(array, _.slice);
+
+ assert.deepEqual(actual, array);
+ assert.notStrictEqual(actual, array);
+ });
+
+ QUnit.test('should work in a lazy sequence', function(assert) {
+ assert.expect(38);
+
+ if (!isNpm) {
+ var array = lodashStable.range(1, LARGE_ARRAY_SIZE + 1),
+ length = array.length,
+ wrapped = _(array);
+
+ lodashStable.each(['map', 'filter'], function(methodName) {
+ assert.deepEqual(wrapped[methodName]().slice(0, -1).value(), array.slice(0, -1));
+ assert.deepEqual(wrapped[methodName]().slice(1).value(), array.slice(1));
+ assert.deepEqual(wrapped[methodName]().slice(1, 3).value(), array.slice(1, 3));
+ assert.deepEqual(wrapped[methodName]().slice(-1).value(), array.slice(-1));
+
+ assert.deepEqual(wrapped[methodName]().slice(length).value(), array.slice(length));
+ assert.deepEqual(wrapped[methodName]().slice(3, 2).value(), array.slice(3, 2));
+ assert.deepEqual(wrapped[methodName]().slice(0, -length).value(), array.slice(0, -length));
+ assert.deepEqual(wrapped[methodName]().slice(0, null).value(), array.slice(0, null));
+
+ assert.deepEqual(wrapped[methodName]().slice(0, length).value(), array.slice(0, length));
+ assert.deepEqual(wrapped[methodName]().slice(-length).value(), array.slice(-length));
+ assert.deepEqual(wrapped[methodName]().slice(null).value(), array.slice(null));
+
+ assert.deepEqual(wrapped[methodName]().slice(0, 1).value(), array.slice(0, 1));
+ assert.deepEqual(wrapped[methodName]().slice(NaN, '1').value(), array.slice(NaN, '1'));
+
+ assert.deepEqual(wrapped[methodName]().slice(0.1, 1.1).value(), array.slice(0.1, 1.1));
+ assert.deepEqual(wrapped[methodName]().slice('0', 1).value(), array.slice('0', 1));
+ assert.deepEqual(wrapped[methodName]().slice(0, '1').value(), array.slice(0, '1'));
+ assert.deepEqual(wrapped[methodName]().slice('1').value(), array.slice('1'));
+ assert.deepEqual(wrapped[methodName]().slice(NaN, 1).value(), array.slice(NaN, 1));
+ assert.deepEqual(wrapped[methodName]().slice(1, NaN).value(), array.slice(1, NaN));
+ });
+ }
+ else {
+ skipAssert(assert, 38);
+ }
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.some');
+
+ (function() {
+ QUnit.test('should return `true` if `predicate` returns truthy for any element', function(assert) {
+ assert.expect(2);
+
+ assert.strictEqual(_.some([false, 1, ''], identity), true);
+ assert.strictEqual(_.some([null, 'a', 0], identity), true);
+ });
+
+ QUnit.test('should return `false` for empty collections', function(assert) {
+ assert.expect(1);
+
+ var expected = lodashStable.map(empties, alwaysFalse);
+
+ var actual = lodashStable.map(empties, function(value) {
+ try {
+ return _.some(value, identity);
+ } catch (e) {}
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('should return `true` as soon as `predicate` returns truthy', function(assert) {
+ assert.expect(2);
+
+ var count = 0;
+
+ assert.strictEqual(_.some([null, true, null], function(value) {
+ count++;
+ return value;
+ }), true);
+
+ assert.strictEqual(count, 2);
+ });
+
+ QUnit.test('should return `false` if `predicate` returns falsey for all elements', function(assert) {
+ assert.expect(2);
+
+ assert.strictEqual(_.some([false, false, false], identity), false);
+ assert.strictEqual(_.some([null, 0, ''], identity), false);
+ });
+
+ QUnit.test('should use `_.identity` when `predicate` is nullish', function(assert) {
+ assert.expect(2);
+
+ var values = [, null, undefined],
+ expected = lodashStable.map(values, alwaysFalse);
+
+ var actual = lodashStable.map(values, function(value, index) {
+ var array = [0, 0];
+ return index ? _.some(array, value) : _.some(array);
+ });
+
+ assert.deepEqual(actual, expected);
+
+ expected = lodashStable.map(values, alwaysTrue);
+ actual = lodashStable.map(values, function(value, index) {
+ var array = [0, 1];
+ return index ? _.some(array, value) : _.some(array);
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('should work with `_.property` shorthands', function(assert) {
+ assert.expect(2);
+
+ var objects = [{ 'a': 0, 'b': 0 }, { 'a': 0, 'b': 1 }];
+ assert.strictEqual(_.some(objects, 'a'), false);
+ assert.strictEqual(_.some(objects, 'b'), true);
+ });
+
+ QUnit.test('should work with `_.matches` shorthands', function(assert) {
+ assert.expect(2);
+
+ var objects = [{ 'a': 0, 'b': 0 }, { 'a': 1, 'b': 1}];
+ assert.strictEqual(_.some(objects, { 'a': 0 }), true);
+ assert.strictEqual(_.some(objects, { 'b': 2 }), false);
+ });
+
+ QUnit.test('should work as an iteratee for methods like `_.map`', function(assert) {
+ assert.expect(1);
+
+ var actual = lodashStable.map([[1]], _.some);
+ assert.deepEqual(actual, [true]);
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.sortBy');
+
+ (function() {
+ var objects = [
+ { 'a': 'x', 'b': 3 },
+ { 'a': 'y', 'b': 4 },
+ { 'a': 'x', 'b': 1 },
+ { 'a': 'y', 'b': 2 }
+ ];
+
+ QUnit.test('should sort in ascending order by `iteratee`', function(assert) {
+ assert.expect(1);
+
+ var actual = lodashStable.map(_.sortBy(objects, function(object) {
+ return object.b;
+ }), 'b');
+
+ assert.deepEqual(actual, [1, 2, 3, 4]);
+ });
+
+ QUnit.test('should use `_.identity` when `iteratee` is nullish', function(assert) {
+ assert.expect(1);
+
+ var array = [3, 2, 1],
+ values = [, null, undefined],
+ expected = lodashStable.map(values, lodashStable.constant([1, 2, 3]));
+
+ var actual = lodashStable.map(values, function(value, index) {
+ return index ? _.sortBy(array, value) : _.sortBy(array);
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('should work with `_.property` shorthands', function(assert) {
+ assert.expect(1);
+
+ var actual = lodashStable.map(_.sortBy(objects.concat(undefined), 'b'), 'b');
+ assert.deepEqual(actual, [1, 2, 3, 4, undefined]);
+ });
+
+ QUnit.test('should work with an object for `collection`', function(assert) {
+ assert.expect(1);
+
+ var actual = _.sortBy({ 'a': 1, 'b': 2, 'c': 3 }, Math.sin);
+ assert.deepEqual(actual, [3, 1, 2]);
+ });
+
+ QUnit.test('should move symbol, `null`, `undefined`, and `NaN` values to the end', function(assert) {
+ assert.expect(2);
+
+ var symbol1 = Symbol ? Symbol('a') : null,
+ symbol2 = Symbol ? Symbol('b') : null,
+ array = [NaN, undefined, null, 4, symbol1, null, 1, symbol2, undefined, 3, NaN, 2],
+ expected = [1, 2, 3, 4, symbol1, symbol2, null, null, undefined, undefined, NaN, NaN];
+
+ assert.deepEqual(_.sortBy(array), expected);
+
+ array = [NaN, undefined, symbol1, null, 'd', null, 'a', symbol2, undefined, 'c', NaN, 'b'];
+ expected = ['a', 'b', 'c', 'd', symbol1, symbol2, null, null, undefined, undefined, NaN, NaN];
+
+ assert.deepEqual(_.sortBy(array), expected);
+ });
+
+ QUnit.test('should treat number values for `collection` as empty', function(assert) {
+ assert.expect(1);
+
+ assert.deepEqual(_.sortBy(1), []);
+ });
+
+ QUnit.test('should coerce arrays returned from `iteratee`', function(assert) {
+ assert.expect(1);
+
+ var actual = _.sortBy(objects, function(object) {
+ var result = [object.a, object.b];
+ result.toString = function() { return String(this[0]); };
+ return result;
+ });
+
+ assert.deepEqual(actual, [objects[0], objects[2], objects[1], objects[3]]);
+ });
+
+ QUnit.test('should work as an iteratee for methods like `_.map`', function(assert) {
+ assert.expect(1);
+
+ var actual = lodashStable.map([[2, 1, 3], [3, 2, 1]], _.sortBy);
+ assert.deepEqual(actual, [[1, 2, 3], [1, 2, 3]]);
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('sortBy methods');
+
+ lodashStable.each(['orderBy', 'sortBy'], function(methodName) {
+ var func = _[methodName];
+
+ function Pair(a, b, c) {
+ this.a = a;
+ this.b = b;
+ this.c = c;
+ }
+
+ var objects = [
+ { 'a': 'x', 'b': 3 },
+ { 'a': 'y', 'b': 4 },
+ { 'a': 'x', 'b': 1 },
+ { 'a': 'y', 'b': 2 }
+ ];
+
+ var stableArray = [
+ new Pair(1, 1, 1), new Pair(1, 2, 1),
+ new Pair(1, 1, 1), new Pair(1, 2, 1),
+ new Pair(1, 3, 1), new Pair(1, 4, 1),
+ new Pair(1, 5, 1), new Pair(1, 6, 1),
+ new Pair(2, 1, 2), new Pair(2, 2, 2),
+ new Pair(2, 3, 2), new Pair(2, 4, 2),
+ new Pair(2, 5, 2), new Pair(2, 6, 2),
+ new Pair(undefined, 1, 1), new Pair(undefined, 2, 1),
+ new Pair(undefined, 3, 1), new Pair(undefined, 4, 1),
+ new Pair(undefined, 5, 1), new Pair(undefined, 6, 1)
+ ];
+
+ var stableObject = lodashStable.zipObject('abcdefghijklmnopqrst'.split(''), stableArray);
+
+ QUnit.test('`_.' + methodName + '` should sort multiple properties in ascending order', function(assert) {
+ assert.expect(1);
+
+ var actual = func(objects, ['a', 'b']);
+ assert.deepEqual(actual, [objects[2], objects[0], objects[3], objects[1]]);
+ });
+
+ QUnit.test('`_.' + methodName + '` should support iteratees', function(assert) {
+ assert.expect(1);
+
+ var actual = func(objects, ['a', function(object) { return object.b; }]);
+ assert.deepEqual(actual, [objects[2], objects[0], objects[3], objects[1]]);
+ });
+
+ QUnit.test('`_.' + methodName + '` should perform a stable sort (test in IE > 8 and V8)', function(assert) {
+ assert.expect(2);
+
+ lodashStable.each([stableArray, stableObject], function(value, index) {
+ var actual = func(value, ['a', 'c']);
+ assert.deepEqual(actual, stableArray, index ? 'object' : 'array');
+ });
+ });
+
+ QUnit.test('`_.' + methodName + '` should not error on nullish elements', function(assert) {
+ assert.expect(1);
+
+ try {
+ var actual = func(objects.concat(null, undefined), ['a', 'b']);
+ } catch (e) {}
+
+ assert.deepEqual(actual, [objects[2], objects[0], objects[3], objects[1], null, undefined]);
+ });
+
+ QUnit.test('`_.' + methodName + '` should work as an iteratee for methods like `_.reduce`', function(assert) {
+ assert.expect(3);
+
+ var objects = [
+ { 'a': 'x', '0': 3 },
+ { 'a': 'y', '0': 4 },
+ { 'a': 'x', '0': 1 },
+ { 'a': 'y', '0': 2 }
+ ];
+
+ var funcs = [func, lodashStable.partialRight(func, 'bogus')];
+
+ lodashStable.each(['a', 0, [0]], function(props, index) {
+ var expected = lodashStable.map(funcs, lodashStable.constant(
+ index
+ ? [objects[2], objects[3], objects[0], objects[1]]
+ : [objects[0], objects[2], objects[1], objects[3]]
+ ));
+
+ var actual = lodashStable.map(funcs, function(func) {
+ return lodashStable.reduce([props], func, objects);
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+ });
+ });
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('sortedIndex methods');
+
+ lodashStable.each(['sortedIndex', 'sortedLastIndex'], function(methodName) {
+ var func = _[methodName],
+ isSortedIndex = methodName == 'sortedIndex';
+
+ QUnit.test('`_.' + methodName + '` should return the insert index', function(assert) {
+ assert.expect(1);
+
+ var array = [30, 50],
+ values = [30, 40, 50],
+ expected = isSortedIndex ? [0, 1, 1] : [1, 1, 2];
+
+ var actual = lodashStable.map(values, function(value) {
+ return func(array, value);
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('`_.' + methodName + '` should work with an array of strings', function(assert) {
+ assert.expect(1);
+
+ var array = ['a', 'c'],
+ values = ['a', 'b', 'c'],
+ expected = isSortedIndex ? [0, 1, 1] : [1, 1, 2];
+
+ var actual = lodashStable.map(values, function(value) {
+ return func(array, value);
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('`_.' + methodName + '` should accept a falsey `array` argument and a `value`', function(assert) {
+ assert.expect(1);
+
+ var expected = lodashStable.map(falsey, lodashStable.constant([0, 0, 0]));
+
+ var actual = lodashStable.map(falsey, function(array) {
+ return [func(array, 1), func(array, undefined), func(array, NaN)];
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('`_.' + methodName + '` should align with `_.sortBy`', function(assert) {
+ assert.expect(12);
+
+ var symbol1 = Symbol ? Symbol('a') : null,
+ symbol2 = Symbol ? Symbol('b') : null,
+ expected = [1, '2', {}, symbol1, symbol2, null, undefined, NaN, NaN];
+
+ lodashStable.each([
+ [NaN, symbol1, null, 1, '2', {}, symbol2, NaN, undefined],
+ ['2', null, 1, symbol1, NaN, {}, NaN, symbol2, undefined]
+ ], function(array) {
+ assert.deepEqual(_.sortBy(array), expected);
+ assert.strictEqual(func(expected, 3), 2);
+ assert.strictEqual(func(expected, symbol1), (isSortedIndex ? 3 : (Symbol ? 5 : 6)));
+ assert.strictEqual(func(expected, null), (isSortedIndex ? (Symbol ? 5 : 3) : 6));
+ assert.strictEqual(func(expected, undefined), isSortedIndex ? 6 : 7);
+ assert.strictEqual(func(expected, NaN), isSortedIndex ? 7 : 9);
+ });
+ });
+ });
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('sortedIndexBy methods');
+
+ lodashStable.each(['sortedIndexBy', 'sortedLastIndexBy'], function(methodName) {
+ var func = _[methodName],
+ isSortedIndexBy = methodName == 'sortedIndexBy';
+
+ QUnit.test('`_.' + methodName + '` should provide the correct `iteratee` arguments', function(assert) {
+ assert.expect(1);
+
+ var args;
+
+ func([30, 50], 40, function(assert) {
+ args || (args = slice.call(arguments));
+ });
+
+ assert.deepEqual(args, [40]);
+ });
+
+ QUnit.test('`_.' + methodName + '` should work with `_.property` shorthands', function(assert) {
+ assert.expect(1);
+
+ var objects = [{ 'x': 30 }, { 'x': 50 }],
+ actual = func(objects, { 'x': 40 }, 'x');
+
+ assert.strictEqual(actual, 1);
+ });
+
+ QUnit.test('`_.' + methodName + '` should support arrays larger than `MAX_ARRAY_LENGTH / 2`', function(assert) {
+ assert.expect(12);
+
+ lodashStable.each([Math.ceil(MAX_ARRAY_LENGTH / 2), MAX_ARRAY_LENGTH], function(length) {
+ var array = [],
+ values = [MAX_ARRAY_LENGTH, NaN, undefined];
+
+ array.length = length;
+
+ lodashStable.each(values, function(value) {
+ var steps = 0;
+
+ var actual = func(array, value, function(value) {
+ steps++;
+ return value;
+ });
+
+ var expected = (isSortedIndexBy ? !lodashStable.isNaN(value) : lodashStable.isFinite(value))
+ ? 0
+ : Math.min(length, MAX_ARRAY_INDEX);
+
+ // Avoid false fails in older Firefox.
+ if (array.length == length) {
+ assert.ok(steps == 32 || steps == 33);
+ assert.strictEqual(actual, expected);
+ }
+ else {
+ skipAssert(assert, 2);
+ }
+ });
+ });
+ });
+ });
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('sortedIndexOf methods');
+
+ lodashStable.each(['sortedIndexOf', 'sortedLastIndexOf'], function(methodName) {
+ var func = _[methodName],
+ isSortedIndexOf = methodName == 'sortedIndexOf';
+
+ QUnit.test('`_.' + methodName + '` should perform a binary search', function(assert) {
+ assert.expect(1);
+
+ var sorted = [4, 4, 5, 5, 6, 6];
+ assert.deepEqual(func(sorted, 5), isSortedIndexOf ? 2 : 3);
+ });
+ });
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.sortedUniq');
+
+ (function() {
+ QUnit.test('should return unique values of a sorted array', function(assert) {
+ assert.expect(3);
+
+ var expected = [1, 2, 3];
+
+ lodashStable.each([[1, 2, 3], [1, 1, 2, 2, 3], [1, 2, 3, 3, 3, 3, 3]], function(array) {
+ assert.deepEqual(_.sortedUniq(array), expected);
+ });
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.split');
+
+ (function() {
+ QUnit.test('should split a string by `separator`', function(assert) {
+ assert.expect(3);
+
+ var string = 'abcde';
+ assert.deepEqual(_.split(string, 'c'), ['ab', 'de']);
+ assert.deepEqual(_.split(string, /[bd]/), ['a', 'c', 'e']);
+ assert.deepEqual(_.split(string, '', 2), ['a', 'b']);
+ });
+
+ QUnit.test('should return an array containing an empty string for empty values', function(assert) {
+ assert.expect(1);
+
+ var values = [, null, undefined, ''],
+ expected = lodashStable.map(values, lodashStable.constant(['']));
+
+ var actual = lodashStable.map(values, function(value, index) {
+ return index ? _.split(value) : _.split();
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('should work as an iteratee for methods like `_.map`', function(assert) {
+ assert.expect(1);
+
+ var strings = ['abc', 'def', 'ghi'],
+ actual = lodashStable.map(strings, _.split);
+
+ assert.deepEqual(actual, [['abc'], ['def'], ['ghi']]);
+ });
+
+ QUnit.test('should allow mixed string and array prototype methods', function(assert) {
+ assert.expect(1);
+
+ if (!isNpm) {
+ var wrapped = _('abc');
+ assert.strictEqual(wrapped.split('b').join(','), 'a,c');
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.spread');
+
+ (function() {
+ function fn(a, b, c) {
+ return slice.call(arguments);
+ }
+
+ QUnit.test('should spread arguments to `func`', function(assert) {
+ assert.expect(1);
+
+ var spread = _.spread(fn);
+ assert.deepEqual(spread([4, 2]), [4, 2]);
+ });
+
+ QUnit.test('should accept a falsey `array` argument', function(assert) {
+ assert.expect(1);
+
+ var spread = _.spread(alwaysTrue),
+ expected = lodashStable.map(falsey, alwaysTrue);
+
+ var actual = lodashStable.map(falsey, function(array, index) {
+ try {
+ return index ? spread(array) : spread();
+ } catch (e) {}
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('should provide the correct `func` arguments', function(assert) {
+ assert.expect(1);
+
+ var args;
+
+ var spread = _.spread(function() {
+ args = slice.call(arguments);
+ });
+
+ spread([4, 2], 'ignored');
+ assert.deepEqual(args, [4, 2]);
+ });
+
+ QUnit.test('should work with `start`', function(assert) {
+ assert.expect(1);
+
+ var spread = _.spread(fn, 1);
+ assert.deepEqual(spread(1, [2, 3, 4]), [1, 2, 3, 4]);
+ });
+
+ QUnit.test('should treat `start` as `0` for negative or `NaN` values', function(assert) {
+ assert.expect(1);
+
+ var values = [-1, NaN, 'a'],
+ expected = lodashStable.map(values, lodashStable.constant([1, 2, 3, 4]));
+
+ var actual = lodashStable.map(values, function(value) {
+ var spread = _.spread(fn, value);
+ return spread([1, 2, 3, 4]);
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('should coerce `start` to an integer', function(assert) {
+ assert.expect(1);
+
+ var spread = _.spread(fn, 1.6);
+ assert.deepEqual(spread(1, [2, 3]), [1, 2, 3]);
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.startCase');
+
+ (function() {
+ QUnit.test('should uppercase only the first character of each word', function(assert) {
+ assert.expect(3);
+
+ assert.strictEqual(_.startCase('--foo-bar--'), 'Foo Bar');
+ assert.strictEqual(_.startCase('fooBar'), 'Foo Bar');
+ assert.strictEqual(_.startCase('__FOO_BAR__'), 'FOO BAR');
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.startsWith');
+
+ (function() {
+ var string = 'abc';
+
+ QUnit.test('should return `true` if a string starts with `target`', function(assert) {
+ assert.expect(1);
+
+ assert.strictEqual(_.startsWith(string, 'a'), true);
+ });
+
+ QUnit.test('should return `false` if a string does not start with `target`', function(assert) {
+ assert.expect(1);
+
+ assert.strictEqual(_.startsWith(string, 'b'), false);
+ });
+
+ QUnit.test('should work with a `position` argument', function(assert) {
+ assert.expect(1);
+
+ assert.strictEqual(_.startsWith(string, 'b', 1), true);
+ });
+
+ QUnit.test('should work with `position` >= `string.length`', function(assert) {
+ assert.expect(4);
+
+ lodashStable.each([3, 5, MAX_SAFE_INTEGER, Infinity], function(position) {
+ assert.strictEqual(_.startsWith(string, 'a', position), false);
+ });
+ });
+
+ QUnit.test('should treat falsey `position` values as `0`', function(assert) {
+ assert.expect(1);
+
+ var expected = lodashStable.map(falsey, alwaysTrue);
+
+ var actual = lodashStable.map(falsey, function(position) {
+ return _.startsWith(string, 'a', position);
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('should treat a negative `position` as `0`', function(assert) {
+ assert.expect(6);
+
+ lodashStable.each([-1, -3, -Infinity], function(position) {
+ assert.strictEqual(_.startsWith(string, 'a', position), true);
+ assert.strictEqual(_.startsWith(string, 'b', position), false);
+ });
+ });
+
+ QUnit.test('should coerce `position` to an integer', function(assert) {
+ assert.expect(1);
+
+ assert.strictEqual(_.startsWith(string, 'bc', 1.2), true);
+ });
+
+ QUnit.test('should return `true` when `target` is an empty string regardless of `position`', function(assert) {
+ assert.expect(1);
+
+ assert.ok(lodashStable.every([-Infinity, NaN, -3, -1, 0, 1, 2, 3, 5, MAX_SAFE_INTEGER, Infinity], function(position) {
+ return _.startsWith(string, '', position, true);
+ }));
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.startsWith and lodash.endsWith');
+
+ lodashStable.each(['startsWith', 'endsWith'], function(methodName) {
+ var func = _[methodName],
+ isStartsWith = methodName == 'startsWith';
+
+ var string = 'abc',
+ chr = isStartsWith ? 'a' : 'c';
+
+ QUnit.test('`_.' + methodName + '` should coerce `string` to a string', function(assert) {
+ assert.expect(2);
+
+ assert.strictEqual(func(Object(string), chr), true);
+ assert.strictEqual(func({ 'toString': lodashStable.constant(string) }, chr), true);
+ });
+
+ QUnit.test('`_.' + methodName + '` should coerce `target` to a string', function(assert) {
+ assert.expect(2);
+
+ assert.strictEqual(func(string, Object(chr)), true);
+ assert.strictEqual(func(string, { 'toString': lodashStable.constant(chr) }), true);
+ });
+
+ QUnit.test('`_.' + methodName + '` should coerce `position` to a number', function(assert) {
+ assert.expect(2);
+
+ var position = isStartsWith ? 1 : 2;
+ assert.strictEqual(func(string, 'b', Object(position)), true);
+ assert.strictEqual(func(string, 'b', { 'toString': lodashStable.constant(String(position)) }), true);
+ });
+ });
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.subtract');
+
+ (function() {
+ QUnit.test('should subtract two numbers', function(assert) {
+ assert.expect(3);
+
+ assert.strictEqual(_.subtract(6, 4), 2);
+ assert.strictEqual(_.subtract(-6, 4), -10);
+ assert.strictEqual(_.subtract(-6, -4), -2);
+ });
+
+ QUnit.test('should coerce arguments to numbers', function(assert) {
+ assert.expect(2);
+
+ assert.strictEqual(_.subtract('6', '4'), 2);
+ assert.deepEqual(_.subtract('x', 'y'), NaN);
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('math operator methods');
+
+ lodashStable.each(['add', 'divide', 'multiply', 'subtract'], function(methodName) {
+ var func = _[methodName];
+
+ QUnit.test('`_.' + methodName + '` should return `0` when no arguments are given', function(assert) {
+ assert.expect(1);
+
+ assert.strictEqual(func(), 0);
+ });
+
+ QUnit.test('`_.' + methodName + '` should work with only one defined argument', function(assert) {
+ assert.expect(3);
+
+ assert.strictEqual(func(6), 6);
+ assert.strictEqual(func(6, undefined), 6);
+ assert.strictEqual(func(undefined, 4), 4);
+ });
+
+ QUnit.test('`_.' + methodName + '` should preserve the sign of `0`', function(assert) {
+ assert.expect(2);
+
+ var values = [0, '0', -0, '-0'],
+ expected = [[0, Infinity], ['0', Infinity], [-0, -Infinity], ['-0', -Infinity]];
+
+ lodashStable.times(2, function(index) {
+ var actual = lodashStable.map(values, function(value) {
+ var result = index ? func(undefined, value) : func(value);
+ return [result, 1 / result];
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+ });
+
+ QUnit.test('`_.' + methodName + '` should convert objects to `NaN`', function(assert) {
+ assert.expect(2);
+
+ assert.deepEqual(func(0, {}), NaN);
+ assert.deepEqual(func({}, 0), NaN);
+ });
+
+ QUnit.test('`_.' + methodName + '` should convert symbols to `NaN`', function(assert) {
+ assert.expect(2);
+
+ if (Symbol) {
+ assert.deepEqual(func(0, symbol), NaN);
+ assert.deepEqual(func(symbol, 0), NaN);
+ }
+ else {
+ skipAssert(assert, 2);
+ }
+ });
+
+ QUnit.test('`_.' + methodName + '` should return an unwrapped value when implicitly chaining', function(assert) {
+ assert.expect(1);
+
+ if (!isNpm) {
+ var actual = _(1)[methodName](2);
+ assert.notOk(actual instanceof _);
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+
+ QUnit.test('`_.' + methodName + '` should return a wrapped value when explicitly chaining', function(assert) {
+ assert.expect(1);
+
+ if (!isNpm) {
+ var actual = _(1).chain()[methodName](2);
+ assert.ok(actual instanceof _);
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+ });
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.sumBy');
+
+ (function() {
+ var array = [6, 4, 2],
+ objects = [{ 'a': 2 }, { 'a': 3 }, { 'a': 1 }];
+
+ QUnit.test('should work with an `iteratee` argument', function(assert) {
+ assert.expect(1);
+
+ var actual = _.sumBy(objects, function(object) {
+ return object.a;
+ });
+
+ assert.deepEqual(actual, 6);
+ });
+
+ QUnit.test('should provide the correct `iteratee` arguments', function(assert) {
+ assert.expect(1);
+
+ var args;
+
+ _.sumBy(array, function() {
+ args || (args = slice.call(arguments));
+ });
+
+ assert.deepEqual(args, [6]);
+ });
+
+ QUnit.test('should work with `_.property` shorthands', function(assert) {
+ assert.expect(2);
+
+ var arrays = [[2], [3], [1]];
+ assert.strictEqual(_.sumBy(arrays, 0), 6);
+ assert.strictEqual(_.sumBy(objects, 'a'), 6);
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('sum methods');
+
+ lodashStable.each(['sum', 'sumBy'], function(methodName) {
+ var array = [6, 4, 2],
+ func = _[methodName];
+
+ QUnit.test('`_.' + methodName + '` should return the sum of an array of numbers', function(assert) {
+ assert.expect(1);
+
+ assert.strictEqual(func(array), 12);
+ });
+
+ QUnit.test('`_.' + methodName + '` should return `0` when passing empty `array` values', function(assert) {
+ assert.expect(1);
+
+ var expected = lodashStable.map(empties, alwaysZero);
+
+ var actual = lodashStable.map(empties, function(value) {
+ return func(value);
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('`_.' + methodName + '` should skip `undefined` values', function(assert) {
+ assert.expect(1);
+
+ assert.strictEqual(func([1, undefined]), 1);
+ });
+
+ QUnit.test('`_.' + methodName + '` should not skip `NaN` values', function(assert) {
+ assert.expect(1);
+
+ assert.deepEqual(func([1, NaN]), NaN);
+ });
+
+ QUnit.test('`_.' + methodName + '` should not coerce values to numbers', function(assert) {
+ assert.expect(1);
+
+ assert.strictEqual(func(['1', '2']), '12');
+ });
+ });
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.tail');
+
+ (function() {
+ var array = [1, 2, 3];
+
+ QUnit.test('should accept a falsey `array` argument', function(assert) {
+ assert.expect(1);
+
+ var expected = lodashStable.map(falsey, alwaysEmptyArray);
+
+ var actual = lodashStable.map(falsey, function(array, index) {
+ try {
+ return index ? _.tail(array) : _.tail();
+ } catch (e) {}
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('should exclude the first element', function(assert) {
+ assert.expect(1);
+
+ assert.deepEqual(_.tail(array), [2, 3]);
+ });
+
+ QUnit.test('should return an empty when querying empty arrays', function(assert) {
+ assert.expect(1);
+
+ assert.deepEqual(_.tail([]), []);
+ });
+
+ QUnit.test('should work as an iteratee for methods like `_.map`', function(assert) {
+ assert.expect(1);
+
+ var array = [[1, 2, 3], [4, 5, 6], [7, 8, 9]],
+ actual = lodashStable.map(array, _.tail);
+
+ assert.deepEqual(actual, [[2, 3], [5, 6], [8, 9]]);
+ });
+
+ QUnit.test('should work in a lazy sequence', function(assert) {
+ assert.expect(4);
+
+ if (!isNpm) {
+ var array = lodashStable.range(LARGE_ARRAY_SIZE),
+ values = [];
+
+ var actual = _(array).tail().filter(function(value) {
+ values.push(value);
+ return false;
+ })
+ .value();
+
+ assert.deepEqual(actual, []);
+ assert.deepEqual(values, array.slice(1));
+
+ values = [];
+
+ actual = _(array).filter(function(value) {
+ values.push(value);
+ return isEven(value);
+ })
+ .tail()
+ .value();
+
+ assert.deepEqual(actual, _.tail(_.filter(array, isEven)));
+ assert.deepEqual(values, array);
+ }
+ else {
+ skipAssert(assert, 4);
+ }
+ });
+
+ QUnit.test('should not execute subsequent iteratees on an empty array in a lazy sequence', function(assert) {
+ assert.expect(4);
+
+ if (!isNpm) {
+ var array = lodashStable.range(LARGE_ARRAY_SIZE),
+ iteratee = function() { pass = false; },
+ pass = true,
+ actual = _(array).slice(0, 1).tail().map(iteratee).value();
+
+ assert.ok(pass);
+ assert.deepEqual(actual, []);
+
+ pass = true;
+ actual = _(array).filter().slice(0, 1).tail().map(iteratee).value();
+
+ assert.ok(pass);
+ assert.deepEqual(actual, []);
+ }
+ else {
+ skipAssert(assert, 4);
+ }
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.take');
+
+ (function() {
+ var array = [1, 2, 3];
+
+ QUnit.test('should take the first two elements', function(assert) {
+ assert.expect(1);
+
+ assert.deepEqual(_.take(array, 2), [1, 2]);
+ });
+
+ QUnit.test('should treat falsey `n` values, except `undefined`, as `0`', function(assert) {
+ assert.expect(1);
+
+ var expected = lodashStable.map(falsey, function(value) {
+ return value === undefined ? [1] : [];
+ });
+
+ var actual = lodashStable.map(falsey, function(n) {
+ return _.take(array, n);
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('should return an empty array when `n` < `1`', function(assert) {
+ assert.expect(3);
+
+ lodashStable.each([0, -1, -Infinity], function(n) {
+ assert.deepEqual(_.take(array, n), []);
+ });
+ });
+
+ QUnit.test('should return all elements when `n` >= `array.length`', function(assert) {
+ assert.expect(4);
+
+ lodashStable.each([3, 4, Math.pow(2, 32), Infinity], function(n) {
+ assert.deepEqual(_.take(array, n), array);
+ });
+ });
+
+ QUnit.test('should work as an iteratee for methods like `_.map`', function(assert) {
+ assert.expect(1);
+
+ var array = [[1, 2, 3], [4, 5, 6], [7, 8, 9]],
+ actual = lodashStable.map(array, _.take);
+
+ assert.deepEqual(actual, [[1], [4], [7]]);
+ });
+
+ QUnit.test('should work in a lazy sequence', function(assert) {
+ assert.expect(6);
+
+ if (!isNpm) {
+ var array = lodashStable.range(1, LARGE_ARRAY_SIZE + 1),
+ predicate = function(value) { values.push(value); return isEven(value); },
+ values = [],
+ actual = _(array).take(2).take().value();
+
+ assert.deepEqual(actual, _.take(_.take(array, 2)));
+
+ actual = _(array).filter(predicate).take(2).take().value();
+ assert.deepEqual(values, [1, 2]);
+ assert.deepEqual(actual, _.take(_.take(_.filter(array, predicate), 2)));
+
+ actual = _(array).take(6).takeRight(4).take(2).takeRight().value();
+ assert.deepEqual(actual, _.takeRight(_.take(_.takeRight(_.take(array, 6), 4), 2)));
+
+ values = [];
+
+ actual = _(array).take(array.length - 1).filter(predicate).take(6).takeRight(4).take(2).takeRight().value();
+ assert.deepEqual(values, [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]);
+ assert.deepEqual(actual, _.takeRight(_.take(_.takeRight(_.take(_.filter(_.take(array, array.length - 1), predicate), 6), 4), 2)));
+ }
+ else {
+ skipAssert(assert, 6);
+ }
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.takeRight');
+
+ (function() {
+ var array = [1, 2, 3];
+
+ QUnit.test('should take the last two elements', function(assert) {
+ assert.expect(1);
+
+ assert.deepEqual(_.takeRight(array, 2), [2, 3]);
+ });
+
+ QUnit.test('should treat falsey `n` values, except `undefined`, as `0`', function(assert) {
+ assert.expect(1);
+
+ var expected = lodashStable.map(falsey, function(value) {
+ return value === undefined ? [3] : [];
+ });
+
+ var actual = lodashStable.map(falsey, function(n) {
+ return _.takeRight(array, n);
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('should return an empty array when `n` < `1`', function(assert) {
+ assert.expect(3);
+
+ lodashStable.each([0, -1, -Infinity], function(n) {
+ assert.deepEqual(_.takeRight(array, n), []);
+ });
+ });
+
+ QUnit.test('should return all elements when `n` >= `array.length`', function(assert) {
+ assert.expect(4);
+
+ lodashStable.each([3, 4, Math.pow(2, 32), Infinity], function(n) {
+ assert.deepEqual(_.takeRight(array, n), array);
+ });
+ });
+
+ QUnit.test('should work as an iteratee for methods like `_.map`', function(assert) {
+ assert.expect(1);
+
+ var array = [[1, 2, 3], [4, 5, 6], [7, 8, 9]],
+ actual = lodashStable.map(array, _.takeRight);
+
+ assert.deepEqual(actual, [[3], [6], [9]]);
+ });
+
+ QUnit.test('should work in a lazy sequence', function(assert) {
+ assert.expect(6);
+
+ if (!isNpm) {
+ var array = lodashStable.range(LARGE_ARRAY_SIZE),
+ predicate = function(value) { values.push(value); return isEven(value); },
+ values = [],
+ actual = _(array).takeRight(2).takeRight().value();
+
+ assert.deepEqual(actual, _.takeRight(_.takeRight(array)));
+
+ actual = _(array).filter(predicate).takeRight(2).takeRight().value();
+ assert.deepEqual(values, array);
+ assert.deepEqual(actual, _.takeRight(_.takeRight(_.filter(array, predicate), 2)));
+
+ actual = _(array).takeRight(6).take(4).takeRight(2).take().value();
+ assert.deepEqual(actual, _.take(_.takeRight(_.take(_.takeRight(array, 6), 4), 2)));
+
+ values = [];
+
+ actual = _(array).filter(predicate).takeRight(6).take(4).takeRight(2).take().value();
+ assert.deepEqual(values, array);
+ assert.deepEqual(actual, _.take(_.takeRight(_.take(_.takeRight(_.filter(array, predicate), 6), 4), 2)));
+ }
+ else {
+ skipAssert(assert, 6);
+ }
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.takeRightWhile');
+
+ (function() {
+ var array = [1, 2, 3, 4];
+
+ var objects = [
+ { 'a': 0, 'b': 0 },
+ { 'a': 1, 'b': 1 },
+ { 'a': 2, 'b': 2 }
+ ];
+
+ QUnit.test('should take elements while `predicate` returns truthy', function(assert) {
+ assert.expect(1);
+
+ var actual = _.takeRightWhile(array, function(n) {
+ return n > 2;
+ });
+
+ assert.deepEqual(actual, [3, 4]);
+ });
+
+ QUnit.test('should provide the correct `predicate` arguments', function(assert) {
+ assert.expect(1);
+
+ var args;
+
+ _.takeRightWhile(array, function() {
+ args = slice.call(arguments);
+ });
+
+ assert.deepEqual(args, [4, 3, array]);
+ });
+
+ QUnit.test('should work with `_.matches` shorthands', function(assert) {
+ assert.expect(1);
+
+ assert.deepEqual(_.takeRightWhile(objects, { 'b': 2 }), objects.slice(2));
+ });
+
+ QUnit.test('should work with `_.matchesProperty` shorthands', function(assert) {
+ assert.expect(1);
+
+ assert.deepEqual(_.takeRightWhile(objects, ['b', 2]), objects.slice(2));
+ });
+
+ QUnit.test('should work with `_.property` shorthands', function(assert) {
+ assert.expect(1);
+
+ assert.deepEqual(_.takeRightWhile(objects, 'b'), objects.slice(1));
+ });
+
+ QUnit.test('should work in a lazy sequence', function(assert) {
+ assert.expect(3);
+
+ if (!isNpm) {
+ var array = lodashStable.range(LARGE_ARRAY_SIZE),
+ predicate = function(n) { return n > 2; },
+ expected = _.takeRightWhile(array, predicate),
+ wrapped = _(array).takeRightWhile(predicate);
+
+ assert.deepEqual(wrapped.value(), expected);
+ assert.deepEqual(wrapped.reverse().value(), expected.slice().reverse());
+ assert.strictEqual(wrapped.last(), _.last(expected));
+ }
+ else {
+ skipAssert(assert, 3);
+ }
+ });
+
+ QUnit.test('should provide the correct `predicate` arguments in a lazy sequence', function(assert) {
+ assert.expect(5);
+
+ if (!isNpm) {
+ var args,
+ array = lodashStable.range(LARGE_ARRAY_SIZE + 1),
+ expected = [square(LARGE_ARRAY_SIZE), LARGE_ARRAY_SIZE - 1, lodashStable.map(array.slice(1), square)];
+
+ _(array).slice(1).takeRightWhile(function(value, index, array) {
+ args = slice.call(arguments);
+ }).value();
+
+ assert.deepEqual(args, [LARGE_ARRAY_SIZE, LARGE_ARRAY_SIZE - 1, array.slice(1)]);
+
+ _(array).slice(1).map(square).takeRightWhile(function(value, index, array) {
+ args = slice.call(arguments);
+ }).value();
+
+ assert.deepEqual(args, expected);
+
+ _(array).slice(1).map(square).takeRightWhile(function(value, index) {
+ args = slice.call(arguments);
+ }).value();
+
+ assert.deepEqual(args, expected);
+
+ _(array).slice(1).map(square).takeRightWhile(function(index) {
+ args = slice.call(arguments);
+ }).value();
+
+ assert.deepEqual(args, [square(LARGE_ARRAY_SIZE)]);
+
+ _(array).slice(1).map(square).takeRightWhile(function() {
+ args = slice.call(arguments);
+ }).value();
+
+ assert.deepEqual(args, expected);
+ }
+ else {
+ skipAssert(assert, 5);
+ }
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.takeWhile');
+
+ (function() {
+ var array = [1, 2, 3, 4];
+
+ var objects = [
+ { 'a': 2, 'b': 2 },
+ { 'a': 1, 'b': 1 },
+ { 'a': 0, 'b': 0 }
+ ];
+
+ QUnit.test('should take elements while `predicate` returns truthy', function(assert) {
+ assert.expect(1);
+
+ var actual = _.takeWhile(array, function(n) {
+ return n < 3;
+ });
+
+ assert.deepEqual(actual, [1, 2]);
+ });
+
+ QUnit.test('should provide the correct `predicate` arguments', function(assert) {
+ assert.expect(1);
+
+ var args;
+
+ _.takeWhile(array, function() {
+ args = slice.call(arguments);
+ });
+
+ assert.deepEqual(args, [1, 0, array]);
+ });
+
+ QUnit.test('should work with `_.matches` shorthands', function(assert) {
+ assert.expect(1);
+
+ assert.deepEqual(_.takeWhile(objects, { 'b': 2 }), objects.slice(0, 1));
+ });
+
+ QUnit.test('should work with `_.matchesProperty` shorthands', function(assert) {
+ assert.expect(1);
+
+ assert.deepEqual(_.takeWhile(objects, ['b', 2]), objects.slice(0, 1));
+ });
+ QUnit.test('should work with `_.property` shorthands', function(assert) {
+ assert.expect(1);
+
+ assert.deepEqual(_.takeWhile(objects, 'b'), objects.slice(0, 2));
+ });
+
+ QUnit.test('should work in a lazy sequence', function(assert) {
+ assert.expect(3);
+
+ if (!isNpm) {
+ var array = lodashStable.range(LARGE_ARRAY_SIZE),
+ predicate = function(n) { return n < 3; },
+ expected = _.takeWhile(array, predicate),
+ wrapped = _(array).takeWhile(predicate);
+
+ assert.deepEqual(wrapped.value(), expected);
+ assert.deepEqual(wrapped.reverse().value(), expected.slice().reverse());
+ assert.strictEqual(wrapped.last(), _.last(expected));
+ }
+ else {
+ skipAssert(assert, 3);
+ }
+ });
+
+ QUnit.test('should work in a lazy sequence with `take`', function(assert) {
+ assert.expect(1);
+
+ if (!isNpm) {
+ var array = lodashStable.range(LARGE_ARRAY_SIZE);
+
+ var actual = _(array)
+ .takeWhile(function(n) { return n < 4; })
+ .take(2)
+ .takeWhile(function(n) { return n == 0; })
+ .value();
+
+ assert.deepEqual(actual, [0]);
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+
+ QUnit.test('should provide the correct `predicate` arguments in a lazy sequence', function(assert) {
+ assert.expect(5);
+
+ if (!isNpm) {
+ var args,
+ array = lodashStable.range(LARGE_ARRAY_SIZE + 1),
+ expected = [1, 0, lodashStable.map(array.slice(1), square)];
+
+ _(array).slice(1).takeWhile(function(value, index, array) {
+ args = slice.call(arguments);
+ }).value();
+
+ assert.deepEqual(args, [1, 0, array.slice(1)]);
+
+ _(array).slice(1).map(square).takeWhile(function(value, index, array) {
+ args = slice.call(arguments);
+ }).value();
+
+ assert.deepEqual(args, expected);
+
+ _(array).slice(1).map(square).takeWhile(function(value, index) {
+ args = slice.call(arguments);
+ }).value();
+
+ assert.deepEqual(args, expected);
+
+ _(array).slice(1).map(square).takeWhile(function(value) {
+ args = slice.call(arguments);
+ }).value();
+
+ assert.deepEqual(args, [1]);
+
+ _(array).slice(1).map(square).takeWhile(function() {
+ args = slice.call(arguments);
+ }).value();
+
+ assert.deepEqual(args, expected);
+ }
+ else {
+ skipAssert(assert, 5);
+ }
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.tap');
+
+ (function() {
+ QUnit.test('should intercept and return the given value', function(assert) {
+ assert.expect(2);
+
+ if (!isNpm) {
+ var intercepted,
+ array = [1, 2, 3];
+
+ var actual = _.tap(array, function(value) {
+ intercepted = value;
+ });
+
+ assert.strictEqual(actual, array);
+ assert.strictEqual(intercepted, array);
+ }
+ else {
+ skipAssert(assert, 2);
+ }
+ });
+
+ QUnit.test('should intercept unwrapped values and return wrapped values when chaining', function(assert) {
+ assert.expect(2);
+
+ if (!isNpm) {
+ var intercepted,
+ array = [1, 2, 3];
+
+ var wrapped = _(array).tap(function(value) {
+ intercepted = value;
+ value.pop();
+ });
+
+ assert.ok(wrapped instanceof _);
+
+ wrapped.value();
+ assert.strictEqual(intercepted, array);
+ }
+ else {
+ skipAssert(assert, 2);
+ }
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.template');
+
+ (function() {
+ QUnit.test('should escape values in "escape" delimiters', function(assert) {
+ assert.expect(1);
+
+ var strings = ['<p><%- value %></p>', '<p><%-value%></p>', '<p><%-\nvalue\n%></p>'],
+ expected = lodashStable.map(strings, lodashStable.constant('<p>&<>"'`\/</p>')),
+ data = { 'value': '&<>"\'`\/' };
+
+ var actual = lodashStable.map(strings, function(string) {
+ return _.template(string)(data);
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('should not reference `_.escape` when "escape" delimiters are not used', function(assert) {
+ assert.expect(1);
+
+ var compiled = _.template('<%= typeof __e %>');
+ assert.strictEqual(compiled({}), 'undefined');
+ });
+
+ QUnit.test('should evaluate JavaScript in "evaluate" delimiters', function(assert) {
+ assert.expect(1);
+
+ var compiled = _.template(
+ '<ul><%\
+ for (var key in collection) {\
+ %><li><%= collection[key] %></li><%\
+ } %></ul>'
+ );
+
+ var data = { 'collection': { 'a': 'A', 'b': 'B' } },
+ actual = compiled(data);
+
+ assert.strictEqual(actual, '<ul><li>A</li><li>B</li></ul>');
+ });
+
+ QUnit.test('should support "evaluate" delimiters with single line comments (test production builds)', function(assert) {
+ assert.expect(1);
+
+ var compiled = _.template('<% // A code comment. %><% if (value) { %>yap<% } else { %>nope<% } %>'),
+ data = { 'value': true };
+
+ assert.strictEqual(compiled(data), 'yap');
+ });
+
+ QUnit.test('should support referencing variables declared in "evaluate" delimiters from other delimiters', function(assert) {
+ assert.expect(1);
+
+ var compiled = _.template('<% var b = a; %><%= b.value %>'),
+ data = { 'a': { 'value': 1 } };
+
+ assert.strictEqual(compiled(data), '1');
+ });
+
+ QUnit.test('should interpolate data properties in "interpolate" delimiters', function(assert) {
+ assert.expect(1);
+
+ var strings = ['<%= a %>BC', '<%=a%>BC', '<%=\na\n%>BC'],
+ expected = lodashStable.map(strings, lodashStable.constant('ABC')),
+ data = { 'a': 'A' };
+
+ var actual = lodashStable.map(strings, function(string) {
+ return _.template(string)(data);
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('should support "interpolate" delimiters with escaped values', function(assert) {
+ assert.expect(1);
+
+ var compiled = _.template('<%= a ? "a=\\"A\\"" : "" %>'),
+ data = { 'a': true };
+
+ assert.strictEqual(compiled(data), 'a="A"');
+ });
+
+ QUnit.test('should support "interpolate" delimiters containing ternary operators', function(assert) {
+ assert.expect(1);
+
+ var compiled = _.template('<%= value ? value : "b" %>'),
+ data = { 'value': 'a' };
+
+ assert.strictEqual(compiled(data), 'a');
+ });
+
+ QUnit.test('should support "interpolate" delimiters containing global values', function(assert) {
+ assert.expect(1);
+
+ var compiled = _.template('<%= typeof Math.abs %>');
+
+ try {
+ var actual = compiled();
+ } catch (e) {}
+
+ assert.strictEqual(actual, 'function');
+ });
+
+ QUnit.test('should support complex "interpolate" delimiters', function(assert) {
+ assert.expect(22);
+
+ lodashStable.forOwn({
+ '<%= a + b %>': '3',
+ '<%= b - a %>': '1',
+ '<%= a = b %>': '2',
+ '<%= !a %>': 'false',
+ '<%= ~a %>': '-2',
+ '<%= a * b %>': '2',
+ '<%= a / b %>': '0.5',
+ '<%= a % b %>': '1',
+ '<%= a >> b %>': '0',
+ '<%= a << b %>': '4',
+ '<%= a & b %>': '0',
+ '<%= a ^ b %>': '3',
+ '<%= a | b %>': '3',
+ '<%= {}.toString.call(0) %>': numberTag,
+ '<%= a.toFixed(2) %>': '1.00',
+ '<%= obj["a"] %>': '1',
+ '<%= delete a %>': 'true',
+ '<%= "a" in obj %>': 'true',
+ '<%= obj instanceof Object %>': 'true',
+ '<%= new Boolean %>': 'false',
+ '<%= typeof a %>': 'number',
+ '<%= void a %>': ''
+ },
+ function(value, key) {
+ var compiled = _.template(key),
+ data = { 'a': 1, 'b': 2 };
+
+ assert.strictEqual(compiled(data), value, key);
+ });
+ });
+
+ QUnit.test('should support ES6 template delimiters', function(assert) {
+ assert.expect(2);
+
+ var data = { 'value': 2 };
+ assert.strictEqual(_.template('1${value}3')(data), '123');
+ assert.strictEqual(_.template('${"{" + value + "\\}"}')(data), '{2}');
+ });
+
+ QUnit.test('should support the "imports" option', function(assert) {
+ assert.expect(1);
+
+ var compiled = _.template('<%= a %>', { 'imports': { 'a': 1 } });
+ assert.strictEqual(compiled({}), '1');
+ });
+
+ QUnit.test('should support the "variable" options', function(assert) {
+ assert.expect(1);
+
+ var compiled = _.template(
+ '<% _.each( data.a, function( value ) { %>' +
+ '<%= value.valueOf() %>' +
+ '<% }) %>', { 'variable': 'data' }
+ );
+
+ var data = { 'a': [1, 2, 3] };
+
+ try {
+ assert.strictEqual(compiled(data), '123');
+ } catch (e) {
+ assert.ok(false, e.message);
+ }
+ });
+
+ QUnit.test('should support custom delimiters', function(assert) {
+ assert.expect(2);
+
+ lodashStable.times(2, function(index) {
+ var settingsClone = lodashStable.clone(_.templateSettings);
+
+ var settings = lodashStable.assign(index ? _.templateSettings : {}, {
+ 'escape': /\{\{-([\s\S]+?)\}\}/g,
+ 'evaluate': /\{\{([\s\S]+?)\}\}/g,
+ 'interpolate': /\{\{=([\s\S]+?)\}\}/g
+ });
+
+ var expected = '<ul><li>0: a & A</li><li>1: b & B</li></ul>',
+ compiled = _.template('<ul>{{ _.each(collection, function(value, index) {}}<li>{{= index }}: {{- value }}</li>{{}); }}</ul>', index ? null : settings),
+ data = { 'collection': ['a & A', 'b & B'] };
+
+ assert.strictEqual(compiled(data), expected);
+ lodashStable.assign(_.templateSettings, settingsClone);
+ });
+ });
+
+ QUnit.test('should support custom delimiters containing special characters', function(assert) {
+ assert.expect(2);
+
+ lodashStable.times(2, function(index) {
+ var settingsClone = lodashStable.clone(_.templateSettings);
+
+ var settings = lodashStable.assign(index ? _.templateSettings : {}, {
+ 'escape': /<\?-([\s\S]+?)\?>/g,
+ 'evaluate': /<\?([\s\S]+?)\?>/g,
+ 'interpolate': /<\?=([\s\S]+?)\?>/g
+ });
+
+ var expected = '<ul><li>0: a & A</li><li>1: b & B</li></ul>',
+ compiled = _.template('<ul><? _.each(collection, function(value, index) { ?><li><?= index ?>: <?- value ?></li><? }); ?></ul>', index ? null : settings),
+ data = { 'collection': ['a & A', 'b & B'] };
+
+ assert.strictEqual(compiled(data), expected);
+ lodashStable.assign(_.templateSettings, settingsClone);
+ });
+ });
+
+ QUnit.test('should use a `with` statement by default', function(assert) {
+ assert.expect(1);
+
+ var compiled = _.template('<%= index %><%= collection[index] %><% _.each(collection, function(value, index) { %><%= index %><% }); %>'),
+ actual = compiled({ 'index': 1, 'collection': ['a', 'b', 'c'] });
+
+ assert.strictEqual(actual, '1b012');
+ });
+
+ QUnit.test('should use `_.templateSettings.imports._.templateSettings`', function(assert) {
+ assert.expect(1);
+
+ var lodash = _.templateSettings.imports._,
+ settingsClone = lodashStable.clone(lodash.templateSettings);
+
+ lodash.templateSettings = lodashStable.assign(lodash.templateSettings, {
+ 'interpolate': /\{\{=([\s\S]+?)\}\}/g
+ });
+
+ var compiled = _.template('{{= a }}');
+ assert.strictEqual(compiled({ 'a': 1 }), '1');
+
+ if (settingsClone) {
+ lodashStable.assign(lodash.templateSettings, settingsClone);
+ } else {
+ delete lodash.templateSettings;
+ }
+ });
+
+ QUnit.test('should fallback to `_.templateSettings`', function(assert) {
+ assert.expect(1);
+
+ var lodash = _.templateSettings.imports._,
+ delimiter = _.templateSettings.interpolate;
+
+ _.templateSettings.imports._ = { 'escape': lodashStable.escape };
+ _.templateSettings.interpolate = /\{\{=([\s\S]+?)\}\}/g;
+
+ var compiled = _.template('{{= a }}');
+ assert.strictEqual(compiled({ 'a': 1 }), '1');
+
+ _.templateSettings.imports._ = lodash;
+ _.templateSettings.interpolate = delimiter;
+ });
+
+ QUnit.test('should ignore `null` delimiters', function(assert) {
+ assert.expect(3);
+
+ var delimiter = {
+ 'escape': /\{\{-([\s\S]+?)\}\}/g,
+ 'evaluate': /\{\{([\s\S]+?)\}\}/g,
+ 'interpolate': /\{\{=([\s\S]+?)\}\}/g
+ };
+
+ lodashStable.forOwn({
+ 'escape': '{{- a }}',
+ 'evaluate': '{{ print(a) }}',
+ 'interpolate': '{{= a }}'
+ },
+ function(value, key) {
+ var settings = { 'escape': null, 'evaluate': null, 'interpolate': null };
+ settings[key] = delimiter[key];
+
+ var expected = '1 <%- a %> <% print(a) %> <%= a %>',
+ compiled = _.template(value + ' <%- a %> <% print(a) %> <%= a %>', settings),
+ data = { 'a': 1 };
+
+ assert.strictEqual(compiled(data), expected);
+ });
+ });
+
+ QUnit.test('should work without delimiters', function(assert) {
+ assert.expect(1);
+
+ var expected = 'abc';
+ assert.strictEqual(_.template(expected)({}), expected);
+ });
+
+ QUnit.test('should work with `this` references', function(assert) {
+ assert.expect(2);
+
+ var compiled = _.template('a<%= this.String("b") %>c');
+ assert.strictEqual(compiled(), 'abc');
+
+ var object = { 'b': 'B' };
+ object.compiled = _.template('A<%= this.b %>C', { 'variable': 'obj' });
+ assert.strictEqual(object.compiled(), 'ABC');
+ });
+
+ QUnit.test('should work with backslashes', function(assert) {
+ assert.expect(1);
+
+ var compiled = _.template('<%= a %> \\b'),
+ data = { 'a': 'A' };
+
+ assert.strictEqual(compiled(data), 'A \\b');
+ });
+
+ QUnit.test('should work with escaped characters in string literals', function(assert) {
+ assert.expect(2);
+
+ var compiled = _.template('<% print("\'\\n\\r\\t\\u2028\\u2029\\\\") %>');
+ assert.strictEqual(compiled(), "'\n\r\t\u2028\u2029\\");
+
+ var data = { 'a': 'A' };
+ compiled = _.template('\'\n\r\t<%= a %>\u2028\u2029\\"');
+ assert.strictEqual(compiled(data), '\'\n\r\tA\u2028\u2029\\"');
+ });
+
+ QUnit.test('should handle \\u2028 & \\u2029 characters', function(assert) {
+ assert.expect(1);
+
+ var compiled = _.template('\u2028<%= "\\u2028\\u2029" %>\u2029');
+ assert.strictEqual(compiled(), '\u2028\u2028\u2029\u2029');
+ });
+
+ QUnit.test('should work with statements containing quotes', function(assert) {
+ assert.expect(1);
+
+ var compiled = _.template("<%\
+ if (a == 'A' || a == \"a\") {\
+ %>'a',\"A\"<%\
+ } %>"
+ );
+
+ var data = { 'a': 'A' };
+ assert.strictEqual(compiled(data), "'a',\"A\"");
+ });
+
+ QUnit.test('should work with templates containing newlines and comments', function(assert) {
+ assert.expect(1);
+
+ var compiled = _.template('<%\n\
+ // A code comment.\n\
+ if (value) { value += 3; }\n\
+ %><p><%= value %></p>'
+ );
+
+ assert.strictEqual(compiled({ 'value': 3 }), '<p>6</p>');
+ });
+
+ QUnit.test('should not error with IE conditional comments enabled (test with development build)', function(assert) {
+ assert.expect(1);
+
+ var compiled = _.template(''),
+ pass = true;
+
+ /*@cc_on @*/
+ try {
+ compiled();
+ } catch (e) {
+ pass = false;
+ }
+ assert.ok(pass);
+ });
+
+ QUnit.test('should tokenize delimiters', function(assert) {
+ assert.expect(1);
+
+ var compiled = _.template('<span class="icon-<%= type %>2"></span>'),
+ data = { 'type': 1 };
+
+ assert.strictEqual(compiled(data), '<span class="icon-12"></span>');
+ });
+
+ QUnit.test('should evaluate delimiters once', function(assert) {
+ assert.expect(1);
+
+ var actual = [],
+ compiled = _.template('<%= func("a") %><%- func("b") %><% func("c") %>'),
+ data = { 'func': function(value) { actual.push(value); } };
+
+ compiled(data);
+ assert.deepEqual(actual, ['a', 'b', 'c']);
+ });
+
+ QUnit.test('should match delimiters before escaping text', function(assert) {
+ assert.expect(1);
+
+ var compiled = _.template('<<\n a \n>>', { 'evaluate': /<<(.*?)>>/g });
+ assert.strictEqual(compiled(), '<<\n a \n>>');
+ });
+
+ QUnit.test('should resolve nullish values to an empty string', function(assert) {
+ assert.expect(3);
+
+ var compiled = _.template('<%= a %><%- a %>'),
+ data = { 'a': null };
+
+ assert.strictEqual(compiled(data), '');
+
+ data = { 'a': undefined };
+ assert.strictEqual(compiled(data), '');
+
+ data = { 'a': {} };
+ compiled = _.template('<%= a.b %><%- a.b %>');
+ assert.strictEqual(compiled(data), '');
+ });
+
+ QUnit.test('should return an empty string for empty values', function(assert) {
+ assert.expect(1);
+
+ var values = [, null, undefined, ''],
+ expected = lodashStable.map(values, alwaysEmptyString),
+ data = { 'a': 1 };
+
+ var actual = lodashStable.map(values, function(value, index) {
+ var compiled = index ? _.template(value) : _.template();
+ return compiled(data);
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('should parse delimiters without newlines', function(assert) {
+ assert.expect(1);
+
+ var expected = '<<\nprint("<p>" + (value ? "yes" : "no") + "</p>")\n>>',
+ compiled = _.template(expected, { 'evaluate': /<<(.+?)>>/g }),
+ data = { 'value': true };
+
+ assert.strictEqual(compiled(data), expected);
+ });
+
+ QUnit.test('should support recursive calls', function(assert) {
+ assert.expect(1);
+
+ var compiled = _.template('<%= a %><% a = _.template(c)(obj) %><%= a %>'),
+ data = { 'a': 'A', 'b': 'B', 'c': '<%= b %>' };
+
+ assert.strictEqual(compiled(data), 'AB');
+ });
+
+ QUnit.test('should coerce `text` argument to a string', function(assert) {
+ assert.expect(1);
+
+ var object = { 'toString': lodashStable.constant('<%= a %>') },
+ data = { 'a': 1 };
+
+ assert.strictEqual(_.template(object)(data), '1');
+ });
+
+ QUnit.test('should not modify the `options` object', function(assert) {
+ assert.expect(1);
+
+ var options = {};
+ _.template('', options);
+ assert.deepEqual(options, {});
+ });
+
+ QUnit.test('should not modify `_.templateSettings` when `options` are given', function(assert) {
+ assert.expect(2);
+
+ var data = { 'a': 1 };
+
+ assert.notOk('a' in _.templateSettings);
+ _.template('', {}, data);
+ assert.notOk('a' in _.templateSettings);
+
+ delete _.templateSettings.a;
+ });
+
+ QUnit.test('should not error for non-object `data` and `options` values', function(assert) {
+ assert.expect(2);
+
+ var pass = true;
+
+ try {
+ _.template('')(1);
+ } catch (e) {
+ pass = false;
+ }
+ assert.ok(pass, '`data` value');
+
+ pass = true;
+
+ try {
+ _.template('', 1)(1);
+ } catch (e) {
+ pass = false;
+ }
+ assert.ok(pass, '`options` value');
+ });
+
+ QUnit.test('should expose the source on compiled templates', function(assert) {
+ assert.expect(1);
+
+ var compiled = _.template('x'),
+ values = [String(compiled), compiled.source],
+ expected = lodashStable.map(values, alwaysTrue);
+
+ var actual = lodashStable.map(values, function(value) {
+ return lodashStable.includes(value, '__p');
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('should expose the source on SyntaxErrors', function(assert) {
+ assert.expect(1);
+
+ try {
+ _.template('<% if x %>');
+ } catch (e) {
+ var source = e.source;
+ }
+ assert.ok(lodashStable.includes(source, '__p'));
+ });
+
+ QUnit.test('should not include sourceURLs in the source', function(assert) {
+ assert.expect(1);
+
+ var options = { 'sourceURL': '/a/b/c' },
+ compiled = _.template('x', options),
+ values = [compiled.source, undefined];
+
+ try {
+ _.template('<% if x %>', options);
+ } catch (e) {
+ values[1] = e.source;
+ }
+ var expected = lodashStable.map(values, alwaysFalse);
+
+ var actual = lodashStable.map(values, function(value) {
+ return lodashStable.includes(value, 'sourceURL');
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('should work as an iteratee for methods like `_.map`', function(assert) {
+ assert.expect(1);
+
+ var array = ['<%= a %>', '<%- b %>', '<% print(c) %>'],
+ compiles = lodashStable.map(array, _.template),
+ data = { 'a': 'one', 'b': '`two`', 'c': 'three' };
+
+ var actual = lodashStable.map(compiles, function(compiled) {
+ return compiled(data);
+ });
+
+ assert.deepEqual(actual, ['one', '`two`', 'three']);
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.truncate');
+
+ (function() {
+ var string = 'hi-diddly-ho there, neighborino';
+
+ QUnit.test('should use a default `length` of `30`', function(assert) {
+ assert.expect(1);
+
+ assert.strictEqual(_.truncate(string), 'hi-diddly-ho there, neighbo...');
+ });
+
+ QUnit.test('should not truncate if `string` is <= `length`', function(assert) {
+ assert.expect(2);
+
+ assert.strictEqual(_.truncate(string, { 'length': string.length }), string);
+ assert.strictEqual(_.truncate(string, { 'length': string.length + 2 }), string);
+ });
+
+ QUnit.test('should truncate string the given length', function(assert) {
+ assert.expect(1);
+
+ assert.strictEqual(_.truncate(string, { 'length': 24 }), 'hi-diddly-ho there, n...');
+ });
+
+ QUnit.test('should support a `omission` option', function(assert) {
+ assert.expect(1);
+
+ assert.strictEqual(_.truncate(string, { 'omission': ' [...]' }), 'hi-diddly-ho there, neig [...]');
+ });
+
+ QUnit.test('should coerce nullish `omission` values to strings', function(assert) {
+ assert.expect(2);
+
+ assert.strictEqual(_.truncate(string, { 'omission': null }), 'hi-diddly-ho there, neighbnull');
+ assert.strictEqual(_.truncate(string, { 'omission': undefined }), 'hi-diddly-ho there, nundefined');
+ });
+
+ QUnit.test('should support a `length` option', function(assert) {
+ assert.expect(1);
+
+ assert.strictEqual(_.truncate(string, { 'length': 4 }), 'h...');
+ });
+
+ QUnit.test('should support a `separator` option', function(assert) {
+ assert.expect(3);
+
+ assert.strictEqual(_.truncate(string, { 'length': 24, 'separator': ' ' }), 'hi-diddly-ho there,...');
+ assert.strictEqual(_.truncate(string, { 'length': 24, 'separator': /,? +/ }), 'hi-diddly-ho there...');
+ assert.strictEqual(_.truncate(string, { 'length': 24, 'separator': /,? +/g }), 'hi-diddly-ho there...');
+ });
+
+ QUnit.test('should treat negative `length` as `0`', function(assert) {
+ assert.expect(2);
+
+ lodashStable.each([0, -2], function(length) {
+ assert.strictEqual(_.truncate(string, { 'length': length }), '...');
+ });
+ });
+
+ QUnit.test('should coerce `length` to an integer', function(assert) {
+ assert.expect(4);
+
+ lodashStable.each(['', NaN, 4.6, '4'], function(length, index) {
+ var actual = index > 1 ? 'h...' : '...';
+ assert.strictEqual(_.truncate(string, { 'length': { 'valueOf': lodashStable.constant(length) } }), actual);
+ });
+ });
+
+ QUnit.test('should coerce `string` to a string', function(assert) {
+ assert.expect(2);
+
+ assert.strictEqual(_.truncate(Object(string), { 'length': 4 }), 'h...');
+ assert.strictEqual(_.truncate({ 'toString': lodashStable.constant(string) }, { 'length': 5 }), 'hi...');
+ });
+
+ QUnit.test('should work as an iteratee for methods like `_.map`', function(assert) {
+ assert.expect(1);
+
+ var actual = lodashStable.map([string, string, string], _.truncate),
+ truncated = 'hi-diddly-ho there, neighbo...';
+
+ assert.deepEqual(actual, [truncated, truncated, truncated]);
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.throttle');
+
+ (function() {
+ QUnit.test('should throttle a function', function(assert) {
+ assert.expect(2);
+
+ var done = assert.async();
+
+ var callCount = 0,
+ throttled = _.throttle(function() { callCount++; }, 32);
+
+ throttled();
+ throttled();
+ throttled();
+
+ var lastCount = callCount;
+ assert.ok(callCount > 0);
+
+ setTimeout(function() {
+ assert.ok(callCount > lastCount);
+ done();
+ }, 64);
+ });
+
+ QUnit.test('subsequent calls should return the result of the first call', function(assert) {
+ assert.expect(5);
+
+ var done = assert.async();
+
+ var throttled = _.throttle(identity, 32),
+ result = [throttled('a'), throttled('b')];
+
+ assert.deepEqual(result, ['a', 'a']);
+
+ setTimeout(function() {
+ var result = [throttled('x'), throttled('y')];
+ assert.notEqual(result[0], 'a');
+ assert.notStrictEqual(result[0], undefined);
+
+ assert.notEqual(result[1], 'y');
+ assert.notStrictEqual(result[1], undefined);
+ done();
+ }, 64);
+ });
+
+ QUnit.test('should clear timeout when `func` is called', function(assert) {
+ assert.expect(1);
+
+ var done = assert.async();
+
+ if (!isModularize) {
+ var callCount = 0,
+ dateCount = 0;
+
+ var getTime = function() {
+ return ++dateCount == 5
+ ? Infinity
+ : +new Date;
+ };
+
+ var lodash = _.runInContext(lodashStable.assign({}, root, {
+ 'Date': lodashStable.assign(function() {
+ return { 'getTime': getTime };
+ }, {
+ 'now': Date.now
+ })
+ }));
+
+ var throttled = lodash.throttle(function() { callCount++; }, 32);
+
+ throttled();
+ throttled();
+
+ setTimeout(function() {
+ assert.strictEqual(callCount, 2);
+ done();
+ }, 64);
+ }
+ else {
+ skipAssert(assert);
+ done();
+ }
+ });
+
+ QUnit.test('should not trigger a trailing call when invoked once', function(assert) {
+ assert.expect(2);
+
+ var done = assert.async();
+
+ var callCount = 0,
+ throttled = _.throttle(function() { callCount++; }, 32);
+
+ throttled();
+ assert.strictEqual(callCount, 1);
+
+ setTimeout(function() {
+ assert.strictEqual(callCount, 1);
+ done();
+ }, 64);
+ });
+
+ lodashStable.times(2, function(index) {
+ QUnit.test('should trigger a call when invoked repeatedly' + (index ? ' and `leading` is `false`' : ''), function(assert) {
+ assert.expect(1);
+
+ var done = assert.async();
+
+ var callCount = 0,
+ limit = (argv || isPhantom) ? 1000 : 320,
+ options = index ? { 'leading': false } : {},
+ throttled = _.throttle(function() { callCount++; }, 32, options);
+
+ var start = +new Date;
+ while ((new Date - start) < limit) {
+ throttled();
+ }
+ var actual = callCount > 1;
+ setTimeout(function() {
+ assert.ok(actual);
+ done();
+ }, 1);
+ });
+ });
+
+ QUnit.test('should trigger a second throttled call as soon as possible', function(assert) {
+ assert.expect(3);
+
+ var done = assert.async();
+
+ var callCount = 0;
+
+ var throttled = _.throttle(function() {
+ callCount++;
+ }, 128, { 'leading': false });
+
+ throttled();
+
+ setTimeout(function() {
+ assert.strictEqual(callCount, 1);
+ throttled();
+ }, 192);
+
+ setTimeout(function() {
+ assert.strictEqual(callCount, 1);
+ }, 254);
+
+ setTimeout(function() {
+ assert.strictEqual(callCount, 2);
+ done();
+ }, 384);
+ });
+
+ QUnit.test('should apply default options', function(assert) {
+ assert.expect(2);
+
+ var done = assert.async();
+
+ var callCount = 0,
+ throttled = _.throttle(function() { callCount++; }, 32, {});
+
+ throttled();
+ throttled();
+ assert.strictEqual(callCount, 1);
+
+ setTimeout(function() {
+ assert.strictEqual(callCount, 2);
+ done();
+ }, 128);
+ });
+
+ QUnit.test('should support a `leading` option', function(assert) {
+ assert.expect(2);
+
+ var withLeading = _.throttle(identity, 32, { 'leading': true });
+ assert.strictEqual(withLeading('a'), 'a');
+
+ var withoutLeading = _.throttle(identity, 32, { 'leading': false });
+ assert.strictEqual(withoutLeading('a'), undefined);
+ });
+
+ QUnit.test('should support a `trailing` option', function(assert) {
+ assert.expect(6);
+
+ var done = assert.async();
+
+ var withCount = 0,
+ withoutCount = 0;
+
+ var withTrailing = _.throttle(function(value) {
+ withCount++;
+ return value;
+ }, 64, { 'trailing': true });
+
+ var withoutTrailing = _.throttle(function(value) {
+ withoutCount++;
+ return value;
+ }, 64, { 'trailing': false });
+
+ assert.strictEqual(withTrailing('a'), 'a');
+ assert.strictEqual(withTrailing('b'), 'a');
+
+ assert.strictEqual(withoutTrailing('a'), 'a');
+ assert.strictEqual(withoutTrailing('b'), 'a');
+
+ setTimeout(function() {
+ assert.strictEqual(withCount, 2);
+ assert.strictEqual(withoutCount, 1);
+ done();
+ }, 256);
+ });
+
+ QUnit.test('should not update `lastCalled`, at the end of the timeout, when `trailing` is `false`', function(assert) {
+ assert.expect(1);
+
+ var done = assert.async();
+
+ var callCount = 0;
+
+ var throttled = _.throttle(function() {
+ callCount++;
+ }, 64, { 'trailing': false });
+
+ throttled();
+ throttled();
+
+ setTimeout(function() {
+ throttled();
+ throttled();
+ }, 96);
+
+ setTimeout(function() {
+ assert.ok(callCount > 1);
+ done();
+ }, 192);
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.debounce and lodash.throttle');
+
+ lodashStable.each(['debounce', 'throttle'], function(methodName) {
+ var func = _[methodName],
+ isDebounce = methodName == 'debounce';
+
+ QUnit.test('`_.' + methodName + '` should not error for non-object `options` values', function(assert) {
+ assert.expect(1);
+
+ var pass = true;
+
+ try {
+ func(noop, 32, 1);
+ } catch (e) {
+ pass = false;
+ }
+ assert.ok(pass);
+ });
+
+ QUnit.test('`_.' + methodName + '` should use a default `wait` of `0`', function(assert) {
+ assert.expect(1);
+
+ var done = assert.async();
+
+ var callCount = 0,
+ funced = func(function() { callCount++; });
+
+ funced();
+
+ setTimeout(function() {
+ funced();
+ assert.strictEqual(callCount, isDebounce ? 1 : 2);
+ done();
+ }, 32);
+ });
+
+ QUnit.test('`_.' + methodName + '` should invoke `func` with the correct `this` binding', function(assert) {
+ assert.expect(1);
+
+ var done = assert.async();
+
+ var actual = [],
+ object = { 'funced': func(function() { actual.push(this); }, 32) },
+ expected = lodashStable.times(isDebounce ? 1 : 2, lodashStable.constant(object));
+
+ object.funced();
+ if (!isDebounce) {
+ object.funced();
+ }
+ setTimeout(function() {
+ assert.deepEqual(actual, expected);
+ done();
+ }, 64);
+ });
+
+ QUnit.test('`_.' + methodName + '` supports recursive calls', function(assert) {
+ assert.expect(2);
+
+ var done = assert.async();
+
+ var actual = [],
+ args = lodashStable.map(['a', 'b', 'c'], function(chr) { return [{}, chr]; }),
+ expected = args.slice(),
+ queue = args.slice();
+
+ var funced = func(function() {
+ var current = [this];
+ push.apply(current, arguments);
+ actual.push(current);
+
+ var next = queue.shift();
+ if (next) {
+ funced.call(next[0], next[1]);
+ }
+ }, 32);
+
+ var next = queue.shift();
+ funced.call(next[0], next[1]);
+ assert.deepEqual(actual, expected.slice(0, isDebounce ? 0 : 1));
+
+ setTimeout(function() {
+ assert.deepEqual(actual, expected.slice(0, actual.length));
+ done();
+ }, 256);
+ });
+
+ QUnit.test('`_.' + methodName + '` should work if the system time is set backwards', function(assert) {
+ assert.expect(1);
+
+ var done = assert.async();
+
+ if (!isModularize) {
+ var callCount = 0,
+ dateCount = 0;
+
+ var getTime = function() {
+ return ++dateCount === 4
+ ? +new Date(2012, 3, 23, 23, 27, 18)
+ : +new Date;
+ };
+
+ var lodash = _.runInContext(lodashStable.assign({}, root, {
+ 'Date': lodashStable.assign(function() {
+ return { 'getTime': getTime, 'valueOf': getTime };
+ }, {
+ 'now': Date.now
+ })
+ }));
+
+ var funced = lodash[methodName](function() {
+ callCount++;
+ }, 32);
+
+ funced();
+
+ setTimeout(function() {
+ funced();
+ assert.strictEqual(callCount, isDebounce ? 1 : 2);
+ done();
+ }, 64);
+ }
+ else {
+ skipAssert(assert);
+ done();
+ }
+ });
+
+ QUnit.test('`_.' + methodName + '` should support cancelling delayed calls', function(assert) {
+ assert.expect(1);
+
+ var done = assert.async();
+
+ var callCount = 0;
+
+ var funced = func(function() {
+ callCount++;
+ }, 32, { 'leading': false });
+
+ funced();
+ funced.cancel();
+
+ setTimeout(function() {
+ assert.strictEqual(callCount, 0);
+ done();
+ }, 64);
+ });
+
+ QUnit.test('`_.' + methodName + '` should reset `lastCalled` after cancelling', function(assert) {
+ assert.expect(3);
+
+ var done = assert.async();
+
+ var callCount = 0;
+
+ var funced = func(function() {
+ return ++callCount;
+ }, 32, { 'leading': true });
+
+ assert.strictEqual(funced(), 1);
+ funced.cancel();
+
+ assert.strictEqual(funced(), 2);
+ funced();
+
+ setTimeout(function() {
+ assert.strictEqual(callCount, 3);
+ done();
+ }, 64);
+ });
+
+ QUnit.test('`_.' + methodName + '` should support flushing delayed calls', function(assert) {
+ assert.expect(2);
+
+ var done = assert.async();
+
+ var callCount = 0;
+
+ var funced = func(function() {
+ return ++callCount;
+ }, 32, { 'leading': false });
+
+ funced();
+ assert.strictEqual(funced.flush(), 1);
+
+ setTimeout(function() {
+ assert.strictEqual(callCount, 1);
+ done();
+ }, 64);
+ });
+
+ QUnit.test('`_.' + methodName + '` should noop `cancel` and `flush` when nothing is queued', function(assert) {
+ assert.expect(2);
+
+ var done = assert.async();
+
+ var callCount = 0,
+ funced = func(function() { callCount++; }, 32);
+
+ funced.cancel();
+ assert.strictEqual(funced.flush(), undefined);
+
+ setTimeout(function() {
+ assert.strictEqual(callCount, 0);
+ done();
+ }, 64);
+ });
+ });
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.times');
+
+ (function() {
+ QUnit.test('should coerce non-finite `n` values to `0`', function(assert) {
+ assert.expect(3);
+
+ lodashStable.each([-Infinity, NaN, Infinity], function(n) {
+ assert.deepEqual(_.times(n), []);
+ });
+ });
+
+ QUnit.test('should coerce `n` to an integer', function(assert) {
+ assert.expect(1);
+
+ var actual = _.times(2.6, _.indentify);
+ assert.deepEqual(actual, [0, 1]);
+ });
+
+ QUnit.test('should provide the correct `iteratee` arguments', function(assert) {
+ assert.expect(1);
+
+ var args;
+
+ _.times(1, function(assert) {
+ args || (args = slice.call(arguments));
+ });
+
+ assert.deepEqual(args, [0]);
+ });
+
+ QUnit.test('should use `_.identity` when `iteratee` is nullish', function(assert) {
+ assert.expect(1);
+
+ var values = [, null, undefined],
+ expected = lodashStable.map(values, lodashStable.constant([0, 1, 2]));
+
+ var actual = lodashStable.map(values, function(value, index) {
+ return index ? _.times(3, value) : _.times(3);
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('should return an array of the results of each `iteratee` execution', function(assert) {
+ assert.expect(1);
+
+ assert.deepEqual(_.times(3, doubled), [0, 2, 4]);
+ });
+
+ QUnit.test('should return an empty array for falsey and negative `n` arguments', function(assert) {
+ assert.expect(1);
+
+ var values = falsey.concat(-1, -Infinity),
+ expected = lodashStable.map(values, alwaysEmptyArray);
+
+ var actual = lodashStable.map(values, function(value, index) {
+ return index ? _.times(value) : _.times();
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('should return an unwrapped value when implicitly chaining', function(assert) {
+ assert.expect(1);
+
+ if (!isNpm) {
+ assert.deepEqual(_(3).times(), [0, 1, 2]);
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+
+ QUnit.test('should return a wrapped value when explicitly chaining', function(assert) {
+ assert.expect(1);
+
+ if (!isNpm) {
+ assert.ok(_(3).chain().times() instanceof _);
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.toArray');
+
+ (function() {
+ QUnit.test('should convert objects to arrays', function(assert) {
+ assert.expect(1);
+
+ assert.deepEqual(_.toArray({ 'a': 1, 'b': 2 }), [1, 2]);
+ });
+
+ QUnit.test('should convert strings to arrays', function(assert) {
+ assert.expect(3);
+
+ assert.deepEqual(_.toArray(''), []);
+ assert.deepEqual(_.toArray('ab'), ['a', 'b']);
+ assert.deepEqual(_.toArray(Object('ab')), ['a', 'b']);
+ });
+
+ QUnit.test('should convert iterables to arrays', function(assert) {
+ assert.expect(1);
+
+ if (!isNpm && Symbol && Symbol.iterator) {
+ var object = { '0': 'a', 'length': 1 };
+ object[Symbol.iterator] = arrayProto[Symbol.iterator];
+
+ assert.deepEqual(_.toArray(object), ['a']);
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+
+ QUnit.test('should work in a lazy sequence', function(assert) {
+ assert.expect(2);
+
+ if (!isNpm) {
+ var array = lodashStable.range(LARGE_ARRAY_SIZE + 1),
+ actual = _(array).slice(1).map(String).toArray().value();
+
+ assert.deepEqual(actual, lodashStable.map(array.slice(1), String));
+
+ var object = lodashStable.zipObject(lodashStable.times(LARGE_ARRAY_SIZE, function(index) {
+ return ['key' + index, index];
+ }));
+
+ actual = _(object).toArray().slice(1).map(String).value();
+ assert.deepEqual(actual, _.map(_.toArray(object).slice(1), String));
+ }
+ else {
+ skipAssert(assert, 2);
+ }
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.toLower');
+
+ (function() {
+ QUnit.test('should convert whole string to lower case', function(assert) {
+ assert.expect(3);
+
+ assert.deepEqual(_.toLower('--Foo-Bar--'), '--foo-bar--');
+ assert.deepEqual(_.toLower('fooBar'), 'foobar');
+ assert.deepEqual(_.toLower('__FOO_BAR__'), '__foo_bar__');
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.toUpper');
+
+ (function() {
+ QUnit.test('should convert whole string to upper case', function(assert) {
+ assert.expect(3);
+
+ assert.deepEqual(_.toUpper('--Foo-Bar'), '--FOO-BAR');
+ assert.deepEqual(_.toUpper('fooBar'), 'FOOBAR');
+ assert.deepEqual(_.toUpper('__FOO_BAR__'), '__FOO_BAR__');
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.slice and lodash.toArray');
+
+ lodashStable.each(['slice', 'toArray'], function(methodName) {
+ var args = (function() { return arguments; }(1, 2, 3)),
+ array = [1, 2, 3],
+ func = _[methodName];
+
+ QUnit.test('`_.' + methodName + '` should return a dense array', function(assert) {
+ assert.expect(3);
+
+ var sparse = Array(3);
+ sparse[1] = 2;
+
+ var actual = func(sparse);
+
+ assert.ok('0' in actual);
+ assert.ok('2' in actual);
+ assert.deepEqual(actual, sparse);
+ });
+
+ QUnit.test('`_.' + methodName + '` should treat array-like objects like arrays', function(assert) {
+ assert.expect(2);
+
+ var object = { '0': 'a', '1': 'b', '2': 'c', 'length': 3 };
+ assert.deepEqual(func(object), ['a', 'b', 'c']);
+ assert.deepEqual(func(args), array);
+ });
+
+ QUnit.test('`_.' + methodName + '` should return a shallow clone of arrays', function(assert) {
+ assert.expect(2);
+
+ var actual = func(array);
+ assert.deepEqual(actual, array);
+ assert.notStrictEqual(actual, array);
+ });
+
+ QUnit.test('`_.' + methodName + '` should work with a node list for `collection`', function(assert) {
+ assert.expect(1);
+
+ if (document) {
+ try {
+ var actual = func(document.getElementsByTagName('body'));
+ } catch (e) {}
+
+ assert.deepEqual(actual, [body]);
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+ });
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('toInteger methods');
+
+ lodashStable.each(['toInteger', 'toSafeInteger'], function(methodName) {
+ var func = _[methodName],
+ isSafe = methodName == 'toSafeInteger';
+
+ QUnit.test('`_.' + methodName + '` should convert values to integers', function(assert) {
+ assert.expect(6);
+
+ assert.strictEqual(func(-5.6), -5);
+ assert.strictEqual(func('5.6'), 5);
+ assert.strictEqual(func(), 0);
+ assert.strictEqual(func(NaN), 0);
+
+ var expected = isSafe ? MAX_SAFE_INTEGER : MAX_INTEGER;
+ assert.strictEqual(func(Infinity), expected);
+ assert.strictEqual(func(-Infinity), -expected);
+ });
+
+ QUnit.test('`_.' + methodName + '` should support `value` of `-0`', function(assert) {
+ assert.expect(1);
+
+ assert.strictEqual(1 / func(-0), -Infinity);
+ });
+ });
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.toLength');
+
+ (function() {
+ QUnit.test('should return a valid length', function(assert) {
+ assert.expect(4);
+
+ assert.strictEqual(_.toLength(-1), 0);
+ assert.strictEqual(_.toLength('1'), 1);
+ assert.strictEqual(_.toLength(1.1), 1);
+ assert.strictEqual(_.toLength(MAX_INTEGER), MAX_ARRAY_LENGTH);
+ });
+
+ QUnit.test('should return `value` if a valid length', function(assert) {
+ assert.expect(3);
+
+ assert.strictEqual(_.toLength(0), 0);
+ assert.strictEqual(_.toLength(3), 3);
+ assert.strictEqual(_.toLength(MAX_ARRAY_LENGTH), MAX_ARRAY_LENGTH);
+ });
+
+ QUnit.test('should convert `-0` to `0`', function(assert) {
+ assert.expect(1);
+
+ assert.strictEqual(1 / _.toLength(-0), Infinity);
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('number coercion methods');
+
+ lodashStable.each(['toInteger', 'toNumber', 'toSafeInteger'], function(methodName) {
+ var func = _[methodName];
+
+ QUnit.test('`_.' + methodName + '` should preserve the sign of `0`', function(assert) {
+ assert.expect(2);
+
+ var values = [0, '0', -0, '-0'],
+ expected = [[0, Infinity], [0, Infinity], [-0, -Infinity], [-0, -Infinity]];
+
+ lodashStable.times(2, function(index) {
+ var others = lodashStable.map(values, index ? Object : identity);
+
+ var actual = lodashStable.map(others, function(value) {
+ var result = func(value);
+ return [result, 1 / result];
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+ });
+ });
+
+ lodashStable.each(['toInteger', 'toLength', 'toNumber', 'toSafeInteger'], function(methodName) {
+ var func = _[methodName],
+ isToLength = methodName == 'toLength',
+ isToNumber = methodName == 'toNumber',
+ isToSafeInteger = methodName == 'toSafeInteger';
+
+ function negative(string) {
+ return '-' + string;
+ }
+
+ function pad(string) {
+ return whitespace + string + whitespace;
+ }
+
+ function positive(string) {
+ return '+' + string;
+ }
+
+ QUnit.test('`_.' + methodName + '` should pass thru primitive number values', function(assert) {
+ assert.expect(1);
+
+ var values = [0, 1, NaN];
+
+ var expected = lodashStable.map(values, function(value) {
+ return (!isToNumber && value !== value) ? 0 : value;
+ });
+
+ var actual = lodashStable.map(values, func);
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('`_.' + methodName + '` should convert number primitives and objects to numbers', function(assert) {
+ assert.expect(1);
+
+ var values = [2, 1.2, MAX_SAFE_INTEGER, MAX_INTEGER, Infinity, NaN];
+
+ var expected = lodashStable.map(values, function(value) {
+ if (!isToNumber) {
+ if (value == 1.2) {
+ value = 1;
+ }
+ else if (value == Infinity) {
+ value = MAX_INTEGER;
+ }
+ else if (value !== value) {
+ value = 0;
+ }
+ if (isToLength || isToSafeInteger) {
+ value = Math.min(value, isToLength ? MAX_ARRAY_LENGTH : MAX_SAFE_INTEGER);
+ }
+ }
+ var neg = isToLength ? 0 : -value;
+ return [value, value, neg, neg];
+ });
+
+ var actual = lodashStable.map(values, function(value) {
+ return [func(value), func(Object(value)), func(-value), func(Object(-value))];
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('`_.' + methodName + '` should convert string primitives and objects to numbers', function(assert) {
+ assert.expect(1);
+
+ var transforms = [identity, pad, positive, negative];
+
+ var values = [
+ '10', '1.234567890', (MAX_SAFE_INTEGER + ''),
+ '1e+308', '1e308', '1E+308', '1E308',
+ '5e-324', '5E-324',
+ 'Infinity', 'NaN'
+ ];
+
+ var expected = lodashStable.map(values, function(value) {
+ var n = +value;
+ if (!isToNumber) {
+ if (n == 1.234567890) {
+ n = 1;
+ }
+ else if (n == Infinity) {
+ n = MAX_INTEGER;
+ }
+ else if (n == Number.MIN_VALUE || n !== n) {
+ n = 0;
+ }
+ if (isToLength || isToSafeInteger) {
+ n = Math.min(n, isToLength ? MAX_ARRAY_LENGTH : MAX_SAFE_INTEGER);
+ }
+ }
+ var neg = isToLength ? 0 : -n;
+ return [n, n, n, n, n, n, neg, neg];
+ });
+
+ var actual = lodashStable.map(values, function(value) {
+ return lodashStable.flatMap(transforms, function(mod) {
+ return [func(mod(value)), func(Object(mod(value)))];
+ });
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('`_.' + methodName + '` should convert binary/octal strings to numbers', function(assert) {
+ assert.expect(1);
+
+ var numbers = [42, 5349, 1715004],
+ transforms = [identity, pad],
+ values = ['0b101010', '0o12345', '0x1a2b3c'];
+
+ var expected = lodashStable.map(numbers, function(n) {
+ return lodashStable.times(8, lodashStable.constant(n));
+ });
+
+ var actual = lodashStable.map(values, function(value) {
+ var upper = value.toUpperCase();
+ return lodashStable.flatMap(transforms, function(mod) {
+ return [func(mod(value)), func(Object(mod(value))), func(mod(upper)), func(Object(mod(upper)))];
+ });
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('`_.' + methodName + '` should convert invalid binary/octal strings to `' + (isToNumber ? 'NaN' : '0') + '`', function(assert) {
+ assert.expect(1);
+
+ var transforms = [identity, pad, positive, negative],
+ values = ['0b', '0o', '0x', '0b1010102', '0o123458', '0x1a2b3x'];
+
+ var expected = lodashStable.map(values, function(n) {
+ return lodashStable.times(8, lodashStable.constant(isToNumber ? NaN : 0));
+ });
+
+ var actual = lodashStable.map(values, function(value) {
+ return lodashStable.flatMap(transforms, function(mod) {
+ return [func(mod(value)), func(Object(mod(value)))];
+ });
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('`_.' + methodName + '` should convert symbols to `' + (isToNumber ? 'NaN' : '0') + '`', function(assert) {
+ assert.expect(1);
+
+ if (Symbol) {
+ var object1 = Object(symbol),
+ object2 = Object(symbol),
+ values = [symbol, object1, object2],
+ expected = lodashStable.map(values, lodashStable.constant(isToNumber ? NaN : 0));
+
+ object2.valueOf = undefined;
+ var actual = lodashStable.map(values, func);
+
+ assert.deepEqual(actual, expected);
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+
+ QUnit.test('`_.' + methodName + '` should convert empty values to `0` or `NaN`', function(assert) {
+ assert.expect(1);
+
+ var values = falsey.concat(whitespace);
+
+ var expected = lodashStable.map(values, function(value) {
+ return (isToNumber && value !== whitespace) ? Number(value) : 0;
+ });
+
+ var actual = lodashStable.map(values, function(value, index) {
+ return index ? func(value) : func();
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('`_.' + methodName + '` should coerce objects to numbers', function(assert) {
+ assert.expect(1);
+
+ var values = [
+ {},
+ [],
+ [1],
+ [1, 2],
+ { 'valueOf': '1.1' },
+ { 'valueOf': '1.1', 'toString': lodashStable.constant('2.2') },
+ { 'valueOf': lodashStable.constant('1.1'), 'toString': '2.2' },
+ { 'valueOf': lodashStable.constant('1.1'), 'toString': lodashStable.constant('2.2') },
+ { 'valueOf': lodashStable.constant('-0x1a2b3c') },
+ { 'toString': lodashStable.constant('-0x1a2b3c') },
+ { 'valueOf': lodashStable.constant('0o12345') },
+ { 'toString': lodashStable.constant('0o12345') },
+ { 'valueOf': lodashStable.constant('0b101010') },
+ { 'toString': lodashStable.constant('0b101010') }
+ ];
+
+ var expected = [
+ NaN, 0, 1, NaN,
+ NaN, 2.2, 1.1, 1.1,
+ NaN, NaN,
+ 5349, 5349,
+ 42, 42
+ ];
+
+ if (!isToNumber) {
+ expected = [
+ 0, 0, 1, 0,
+ 0, 2, 1, 1,
+ 0, 0,
+ 5349, 5349,
+ 42, 42
+ ];
+ }
+ var actual = lodashStable.map(values, func);
+
+ assert.deepEqual(actual, expected);
+ });
+ });
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.toPairs');
+
+ (function() {
+ QUnit.test('should be aliased', function(assert) {
+ assert.expect(1);
+
+ assert.strictEqual(_.entries, _.toPairs);
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.toPairsIn');
+
+ (function() {
+ QUnit.test('should be aliased', function(assert) {
+ assert.expect(1);
+
+ assert.strictEqual(_.entriesIn, _.toPairsIn);
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('toPairs methods');
+
+ lodashStable.each(['toPairs', 'toPairsIn'], function(methodName) {
+ var func = _[methodName],
+ isToPairs = methodName == 'toPairs';
+
+ QUnit.test('`_.' + methodName + '` should create an array of string keyed-value pairs', function(assert) {
+ assert.expect(1);
+
+ var object = { 'a': 1, 'b': 2 },
+ actual = lodashStable.sortBy(func(object), 0);
+
+ assert.deepEqual(actual, [['a', 1], ['b', 2]]);
+ });
+
+ QUnit.test('`_.' + methodName + '` should work with an object that has a `length` property', function(assert) {
+ assert.expect(1);
+
+ var object = { '0': 'a', '1': 'b', 'length': 2 },
+ actual = lodashStable.sortBy(func(object), 0);
+
+ assert.deepEqual(actual, [['0', 'a'], ['1', 'b'], ['length', 2]]);
+ });
+
+ QUnit.test('`_.' + methodName + '` should ' + (isToPairs ? 'not ' : '') + 'include inherited string keyed property values', function(assert) {
+ assert.expect(1);
+
+ function Foo() {
+ this.a = 1;
+ }
+ Foo.prototype.b = 2;
+
+ var expected = isToPairs ? [['a', 1]] : [['a', 1], ['b', 2]],
+ actual = lodashStable.sortBy(func(new Foo), 0);
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('`_.' + methodName + '` should work with strings', function(assert) {
+ assert.expect(2);
+
+ lodashStable.each(['xo', Object('xo')], function(string) {
+ var actual = lodashStable.sortBy(func(string), 0);
+ assert.deepEqual(actual, [['0', 'x'], ['1', 'o']]);
+ });
+ });
+ });
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.toPath');
+
+ (function() {
+ QUnit.test('should convert a string to a path', function(assert) {
+ assert.expect(2);
+
+ assert.deepEqual(_.toPath('a.b.c'), ['a', 'b', 'c']);
+ assert.deepEqual(_.toPath('a[0].b.c'), ['a', '0', 'b', 'c']);
+ });
+
+ QUnit.test('should coerce array elements to strings', function(assert) {
+ assert.expect(4);
+
+ var array = ['a', 'b', 'c'];
+
+ lodashStable.each([array, lodashStable.map(array, Object)], function(value) {
+ var actual = _.toPath(value);
+ assert.deepEqual(actual, array);
+ assert.notStrictEqual(actual, array);
+ });
+ });
+
+ QUnit.test('should a new path array', function(assert) {
+ assert.expect(1);
+
+ assert.notStrictEqual(_.toPath('a.b.c'), _.toPath('a.b.c'));
+ });
+
+ QUnit.test('should not coerce symbols to strings', function(assert) {
+ assert.expect(4);
+
+ if (Symbol) {
+ var object = Object(symbol);
+ lodashStable.each([symbol, object, [symbol], [object]], function(value) {
+ var actual = _.toPath(value);
+ assert.ok(lodashStable.isSymbol(actual[0]));
+ });
+ }
+ else {
+ skipAssert(assert, 4);
+ }
+ });
+
+ QUnit.test('should handle complex paths', function(assert) {
+ assert.expect(1);
+
+ var actual = _.toPath('a[-1.23]["[\\"b\\"]"].c[\'[\\\'d\\\']\'][\ne\n][f].g');
+ assert.deepEqual(actual, ['a', '-1.23', '["b"]', 'c', "['d']", '\ne\n', 'f', 'g']);
+ });
+
+ QUnit.test('should ignore consecutive brackets and dots', function(assert) {
+ assert.expect(4);
+
+ var expected = ['a'];
+ assert.deepEqual(_.toPath('a.'), expected);
+ assert.deepEqual(_.toPath('a[]'), expected);
+
+ expected = ['a', 'b'];
+ assert.deepEqual(_.toPath('a..b'), expected);
+ assert.deepEqual(_.toPath('a[][]b'), expected);
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.toPlainObject');
+
+ (function() {
+ var args = arguments;
+
+ QUnit.test('should flatten inherited string keyed properties', function(assert) {
+ assert.expect(1);
+
+ function Foo() {
+ this.b = 2;
+ }
+ Foo.prototype.c = 3;
+
+ var actual = lodashStable.assign({ 'a': 1 }, _.toPlainObject(new Foo));
+ assert.deepEqual(actual, { 'a': 1, 'b': 2, 'c': 3 });
+ });
+
+ QUnit.test('should convert `arguments` objects to plain objects', function(assert) {
+ assert.expect(1);
+
+ var actual = _.toPlainObject(args),
+ expected = { '0': 1, '1': 2, '2': 3 };
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('should convert arrays to plain objects', function(assert) {
+ assert.expect(1);
+
+ var actual = _.toPlainObject(['a', 'b', 'c']),
+ expected = { '0': 'a', '1': 'b', '2': 'c' };
+
+ assert.deepEqual(actual, expected);
+ });
+ }(1, 2, 3));
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.toString');
+
+ (function() {
+ QUnit.test('should treat nullish values as empty strings', function(assert) {
+ assert.expect(1);
+
+ var values = [, null, undefined],
+ expected = lodashStable.map(values, alwaysEmptyString);
+
+ var actual = lodashStable.map(values, function(value, index) {
+ return index ? _.toString(value) : _.toString();
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('should preserve the sign of `0`', function(assert) {
+ assert.expect(1);
+
+ var values = [-0, Object(-0), 0, Object(0)],
+ expected = ['-0', '-0', '0', '0'],
+ actual = lodashStable.map(values, _.toString);
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('should not error on symbols', function(assert) {
+ assert.expect(1);
+
+ if (Symbol) {
+ try {
+ assert.strictEqual(_.toString(symbol), 'Symbol(a)');
+ } catch (e) {
+ assert.ok(false, e.message);
+ }
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+
+ QUnit.test('should return the `toString` result of the wrapped value', function(assert) {
+ assert.expect(1);
+
+ if (!isNpm) {
+ var wrapped = _([1, 2, 3]);
+ assert.strictEqual(wrapped.toString(), '1,2,3');
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.transform');
+
+ (function() {
+ function Foo() {
+ this.a = 1;
+ this.b = 2;
+ this.c = 3;
+ }
+
+ QUnit.test('should create an object with the same `[[Prototype]]` as `object` when `accumulator` is nullish', function(assert) {
+ assert.expect(4);
+
+ var accumulators = [, null, undefined],
+ object = new Foo,
+ expected = lodashStable.map(accumulators, alwaysTrue);
+
+ var iteratee = function(result, value, key) {
+ result[key] = square(value);
+ };
+
+ var mapper = function(accumulator, index) {
+ return index ? _.transform(object, iteratee, accumulator) : _.transform(object, iteratee);
+ };
+
+ var results = lodashStable.map(accumulators, mapper);
+
+ var actual = lodashStable.map(results, function(result) {
+ return result instanceof Foo;
+ });
+
+ assert.deepEqual(actual, expected);
+
+ expected = lodashStable.map(accumulators, lodashStable.constant({ 'a': 1, 'b': 4, 'c': 9 }));
+ actual = lodashStable.map(results, lodashStable.toPlainObject);
+
+ assert.deepEqual(actual, expected);
+
+ object = { 'a': 1, 'b': 2, 'c': 3 };
+ actual = lodashStable.map(accumulators, mapper);
+
+ assert.deepEqual(actual, expected);
+
+ object = [1, 2, 3];
+ expected = lodashStable.map(accumulators, lodashStable.constant([1, 4, 9]));
+ actual = lodashStable.map(accumulators, mapper);
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('should create regular arrays from typed arrays', function(assert) {
+ assert.expect(1);
+
+ var expected = lodashStable.map(typedArrays, alwaysTrue);
+
+ var actual = lodashStable.map(typedArrays, function(type) {
+ var Ctor = root[type],
+ array = Ctor ? new Ctor(new ArrayBuffer(24)) : [];
+
+ return lodashStable.isArray(_.transform(array, noop));
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('should support an `accumulator` value', function(assert) {
+ assert.expect(6);
+
+ var values = [new Foo, [1, 2, 3], { 'a': 1, 'b': 2, 'c': 3 }],
+ expected = lodashStable.map(values, lodashStable.constant([1, 4, 9]));
+
+ var actual = lodashStable.map(values, function(value) {
+ return _.transform(value, function(result, value) {
+ result.push(square(value));
+ }, []);
+ });
+
+ assert.deepEqual(actual, expected);
+
+ var object = { 'a': 1, 'b': 4, 'c': 9 },
+ expected = [object, { '0': 1, '1': 4, '2': 9 }, object];
+
+ actual = lodashStable.map(values, function(value) {
+ return _.transform(value, function(result, value, key) {
+ result[key] = square(value);
+ }, {});
+ });
+
+ assert.deepEqual(actual, expected);
+
+ lodashStable.each([[], {}], function(accumulator) {
+ var actual = lodashStable.map(values, function(value) {
+ return _.transform(value, noop, accumulator);
+ });
+
+ assert.ok(lodashStable.every(actual, function(result) {
+ return result === accumulator;
+ }));
+
+ assert.strictEqual(_.transform(null, null, accumulator), accumulator);
+ });
+ });
+
+ QUnit.test('should treat sparse arrays as dense', function(assert) {
+ assert.expect(1);
+
+ var actual = _.transform(Array(1), function(result, value, index) {
+ result[index] = String(value);
+ });
+
+ assert.deepEqual(actual, ['undefined']);
+ });
+
+ QUnit.test('should work without an `iteratee` argument', function(assert) {
+ assert.expect(1);
+
+ assert.ok(_.transform(new Foo) instanceof Foo);
+ });
+
+ QUnit.test('should ensure `object` is an object before using its `[[Prototype]]`', function(assert) {
+ assert.expect(2);
+
+ var Ctors = [Boolean, Boolean, Number, Number, Number, String, String],
+ values = [false, true, 0, 1, NaN, '', 'a'],
+ expected = lodashStable.map(values, alwaysEmptyObject);
+
+ var results = lodashStable.map(values, function(value) {
+ return _.transform(value);
+ });
+
+ assert.deepEqual(results, expected);
+
+ expected = lodashStable.map(values, alwaysFalse);
+
+ var actual = lodashStable.map(results, function(value, index) {
+ return value instanceof Ctors[index];
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('should ensure `object` constructor is a function before using its `[[Prototype]]`', function(assert) {
+ assert.expect(1);
+
+ Foo.prototype.constructor = null;
+ assert.notOk(_.transform(new Foo) instanceof Foo);
+ Foo.prototype.constructor = Foo;
+ });
+
+ QUnit.test('should create an empty object when given a falsey `object` argument', function(assert) {
+ assert.expect(1);
+
+ var expected = lodashStable.map(falsey, alwaysEmptyObject);
+
+ var actual = lodashStable.map(falsey, function(object, index) {
+ return index ? _.transform(object) : _.transform();
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ lodashStable.each({
+ 'array': [1, 2, 3],
+ 'object': { 'a': 1, 'b': 2, 'c': 3 }
+ },
+ function(object, key) {
+ QUnit.test('should provide the correct `iteratee` arguments when transforming an ' + key, function(assert) {
+ assert.expect(2);
+
+ var args;
+
+ _.transform(object, function() {
+ args || (args = slice.call(arguments));
+ });
+
+ var first = args[0];
+ if (key == 'array') {
+ assert.ok(first !== object && lodashStable.isArray(first));
+ assert.deepEqual(args, [first, 1, 0, object]);
+ } else {
+ assert.ok(first !== object && lodashStable.isPlainObject(first));
+ assert.deepEqual(args, [first, 1, 'a', object]);
+ }
+ });
+ });
+
+ QUnit.test('should create an object from the same realm as `object`', function(assert) {
+ assert.expect(1);
+
+ var objects = lodashStable.filter(realm, function(value) {
+ return lodashStable.isObject(value) && !lodashStable.isElement(value);
+ });
+
+ var expected = lodashStable.map(objects, alwaysTrue);
+
+ var actual = lodashStable.map(objects, function(object) {
+ var Ctor = object.constructor,
+ result = _.transform(object);
+
+ if (result === object) {
+ return false;
+ }
+ if (lodashStable.isTypedArray(object)) {
+ return result instanceof Array;
+ }
+ return result instanceof Ctor || !(new Ctor instanceof Ctor);
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('trim methods');
+
+ lodashStable.each(['trim', 'trimStart', 'trimEnd'], function(methodName, index) {
+ var func = _[methodName],
+ parts = [];
+
+ if (index != 2) {
+ parts.push('leading');
+ }
+ if (index != 1) {
+ parts.push('trailing');
+ }
+ parts = parts.join(' and ');
+
+ QUnit.test('`_.' + methodName + '` should remove ' + parts + ' whitespace', function(assert) {
+ assert.expect(1);
+
+ var string = whitespace + 'a b c' + whitespace,
+ expected = (index == 2 ? whitespace : '') + 'a b c' + (index == 1 ? whitespace : '');
+
+ assert.strictEqual(func(string), expected);
+ });
+
+ QUnit.test('`_.' + methodName + '` should coerce `string` to a string', function(assert) {
+ assert.expect(1);
+
+ var object = { 'toString': lodashStable.constant(whitespace + 'a b c' + whitespace) },
+ expected = (index == 2 ? whitespace : '') + 'a b c' + (index == 1 ? whitespace : '');
+
+ assert.strictEqual(func(object), expected);
+ });
+
+ QUnit.test('`_.' + methodName + '` should remove ' + parts + ' `chars`', function(assert) {
+ assert.expect(1);
+
+ var string = '-_-a-b-c-_-',
+ expected = (index == 2 ? '-_-' : '') + 'a-b-c' + (index == 1 ? '-_-' : '');
+
+ assert.strictEqual(func(string, '_-'), expected);
+ });
+
+ QUnit.test('`_.' + methodName + '` should coerce `chars` to a string', function(assert) {
+ assert.expect(1);
+
+ var object = { 'toString': lodashStable.constant('_-') },
+ string = '-_-a-b-c-_-',
+ expected = (index == 2 ? '-_-' : '') + 'a-b-c' + (index == 1 ? '-_-' : '');
+
+ assert.strictEqual(func(string, object), expected);
+ });
+
+ QUnit.test('`_.' + methodName + '` should return an empty string for empty values and `chars`', function(assert) {
+ assert.expect(6);
+
+ lodashStable.each([null, '_-'], function(chars) {
+ assert.strictEqual(func(null, chars), '');
+ assert.strictEqual(func(undefined, chars), '');
+ assert.strictEqual(func('', chars), '');
+ });
+ });
+
+ QUnit.test('`_.' + methodName + '` should work with `undefined` or empty string values for `chars`', function(assert) {
+ assert.expect(2);
+
+ var string = whitespace + 'a b c' + whitespace,
+ expected = (index == 2 ? whitespace : '') + 'a b c' + (index == 1 ? whitespace : '');
+
+ assert.strictEqual(func(string, undefined), expected);
+ assert.strictEqual(func(string, ''), string);
+ });
+
+ QUnit.test('`_.' + methodName + '` should work as an iteratee for methods like `_.map`', function(assert) {
+ assert.expect(1);
+
+ var string = Object(whitespace + 'a b c' + whitespace),
+ trimmed = (index == 2 ? whitespace : '') + 'a b c' + (index == 1 ? whitespace : ''),
+ actual = lodashStable.map([string, string, string], func);
+
+ assert.deepEqual(actual, [trimmed, trimmed, trimmed]);
+ });
+
+ QUnit.test('`_.' + methodName + '` should return an unwrapped value when implicitly chaining', function(assert) {
+ assert.expect(1);
+
+ if (!isNpm) {
+ var string = whitespace + 'a b c' + whitespace,
+ expected = (index == 2 ? whitespace : '') + 'a b c' + (index == 1 ? whitespace : '');
+
+ assert.strictEqual(_(string)[methodName](), expected);
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+
+ QUnit.test('`_.' + methodName + '` should return a wrapped value when explicitly chaining', function(assert) {
+ assert.expect(1);
+
+ if (!isNpm) {
+ var string = whitespace + 'a b c' + whitespace;
+ assert.ok(_(string).chain()[methodName]() instanceof _);
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+ });
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('uncommon symbols');
+
+ (function() {
+ var flag = '\ud83c\uddfa\ud83c\uddf8',
+ heart = '\u2764' + emojiVar,
+ hearts = '\ud83d\udc95',
+ comboGlyph = '\ud83d\udc68\u200d' + heart + '\u200d\ud83d\udc8B\u200d\ud83d\udc68',
+ hashKeycap = '#' + emojiVar + '\u20e3',
+ leafs = '\ud83c\udf42',
+ mic = '\ud83c\udf99',
+ noMic = mic + '\u20e0',
+ raisedHand = '\u270B' + emojiVar,
+ rocket = '\ud83d\ude80',
+ thumbsUp = '\ud83d\udc4d';
+
+ QUnit.test('should account for astral symbols', function(assert) {
+ assert.expect(34);
+
+ var allHearts = _.repeat(hearts, 10),
+ chars = hearts + comboGlyph,
+ string = 'A ' + leafs + ', ' + comboGlyph + ', and ' + rocket,
+ trimChars = comboGlyph + hearts,
+ trimString = trimChars + string + trimChars;
+
+ assert.strictEqual(_.camelCase(hearts + ' the ' + leafs), hearts + 'The' + leafs);
+ assert.strictEqual(_.camelCase(string), 'a' + leafs + comboGlyph + 'And' + rocket);
+ assert.strictEqual(_.capitalize(rocket), rocket);
+
+ assert.strictEqual(_.pad(string, 16), ' ' + string + ' ');
+ assert.strictEqual(_.padStart(string, 16), ' ' + string);
+ assert.strictEqual(_.padEnd(string, 16), string + ' ');
+
+ assert.strictEqual(_.pad(string, 16, chars), hearts + string + chars);
+ assert.strictEqual(_.padStart(string, 16, chars), chars + hearts + string);
+ assert.strictEqual(_.padEnd(string, 16, chars), string + chars + hearts);
+
+ assert.strictEqual(_.size(string), 13);
+ assert.deepEqual(_.split(string, ' '), ['A', leafs + ',', comboGlyph + ',', 'and', rocket]);
+ assert.deepEqual(_.split(string, ' ', 3), ['A', leafs + ',', comboGlyph + ',']);
+ assert.deepEqual(_.split(string, undefined), [string]);
+ assert.deepEqual(_.split(string, undefined, -1), [string]);
+ assert.deepEqual(_.split(string, undefined, 0), []);
+
+ var expected = ['A', ' ', leafs, ',', ' ', comboGlyph, ',', ' ', 'a', 'n', 'd', ' ', rocket];
+
+ assert.deepEqual(_.split(string, ''), expected);
+ assert.deepEqual(_.split(string, '', 6), expected.slice(0, 6));
+ assert.deepEqual(_.toArray(string), expected);
+
+ assert.strictEqual(_.trim(trimString, chars), string);
+ assert.strictEqual(_.trimStart(trimString, chars), string + trimChars);
+ assert.strictEqual(_.trimEnd(trimString, chars), trimChars + string);
+
+ assert.strictEqual(_.truncate(string, { 'length': 13 }), string);
+ assert.strictEqual(_.truncate(string, { 'length': 6 }), 'A ' + leafs + '...');
+
+ assert.deepEqual(_.words(string), ['A', leafs, comboGlyph, 'and', rocket]);
+ assert.deepEqual(_.toArray(hashKeycap), [hashKeycap]);
+ assert.deepEqual(_.toArray(noMic), [noMic]);
+
+ lodashStable.times(2, function(index) {
+ var separator = index ? RegExp(hearts) : hearts,
+ options = { 'length': 4, 'separator': separator },
+ actual = _.truncate(string, options);
+
+ assert.strictEqual(actual, 'A...');
+ assert.strictEqual(actual.length, 4);
+
+ actual = _.truncate(allHearts, options);
+ assert.strictEqual(actual, hearts + '...');
+ assert.strictEqual(actual.length, 5);
+ });
+ });
+
+ QUnit.test('should account for combining diacritical marks', function(assert) {
+ assert.expect(1);
+
+ var values = lodashStable.map(comboMarks, function(mark) {
+ return 'o' + mark;
+ });
+
+ var expected = lodashStable.map(values, function(value) {
+ return [1, [value], [value]];
+ });
+
+ var actual = lodashStable.map(values, function(value) {
+ return [_.size(value), _.toArray(value), _.words(value)];
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('should account for fitzpatrick modifiers', function(assert) {
+ assert.expect(1);
+
+ var values = lodashStable.map(fitzModifiers, function(modifier) {
+ return thumbsUp + modifier;
+ });
+
+ var expected = lodashStable.map(values, function(value) {
+ return [1, [value], [value]];
+ });
+
+ var actual = lodashStable.map(values, function(value) {
+ return [_.size(value), _.toArray(value), _.words(value)];
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('should account for regional symbols', function(assert) {
+ assert.expect(6);
+
+ var pair = flag.match(/\ud83c[\udde6-\uddff]/g),
+ regionals = pair.join(' ');
+
+ assert.strictEqual(_.size(flag), 1);
+ assert.strictEqual(_.size(regionals), 3);
+
+ assert.deepEqual(_.toArray(flag), [flag]);
+ assert.deepEqual(_.toArray(regionals), [pair[0], ' ', pair[1]]);
+
+ assert.deepEqual(_.words(flag), [flag]);
+ assert.deepEqual(_.words(regionals), [pair[0], pair[1]]);
+ });
+
+ QUnit.test('should account for variation selectors', function(assert) {
+ assert.expect(3);
+
+ assert.strictEqual(_.size(heart), 1);
+ assert.deepEqual(_.toArray(heart), [heart]);
+ assert.deepEqual(_.words(heart), [heart]);
+ });
+
+ QUnit.test('should account for variation selectors with fitzpatrick modifiers', function(assert) {
+ assert.expect(1);
+
+ var values = lodashStable.map(fitzModifiers, function(modifier) {
+ return raisedHand + modifier;
+ });
+
+ var expected = lodashStable.map(values, function(value) {
+ return [1, [value], [value]];
+ });
+
+ var actual = lodashStable.map(values, function(value) {
+ return [_.size(value), _.toArray(value), _.words(value)];
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('should match lone surrogates', function(assert) {
+ assert.expect(3);
+
+ var pair = hearts.split(''),
+ surrogates = pair[0] + ' ' + pair[1];
+
+ assert.strictEqual(_.size(surrogates), 3);
+ assert.deepEqual(_.toArray(surrogates), [pair[0], ' ', pair[1]]);
+ assert.deepEqual(_.words(surrogates), []);
+ });
+
+ QUnit.test('should match side by side fitzpatrick modifiers separately ', function(assert) {
+ assert.expect(1);
+
+ var string = fitzModifiers[0] + fitzModifiers[0];
+ assert.deepEqual(_.toArray(string), [fitzModifiers[0], fitzModifiers[0]]);
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.unary');
+
+ (function() {
+ function fn() {
+ return slice.call(arguments);
+ }
+
+ QUnit.test('should cap the number of arguments provided to `func`', function(assert) {
+ assert.expect(1);
+
+ var actual = lodashStable.map(['6', '8', '10'], _.unary(parseInt));
+ assert.deepEqual(actual, [6, 8, 10]);
+ });
+
+ QUnit.test('should work when provided less than the capped number of arguments', function(assert) {
+ assert.expect(1);
+
+ var capped = _.unary(fn);
+ assert.deepEqual(capped(), []);
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.unescape');
+
+ (function() {
+ var escaped = '&<>"'\/',
+ unescaped = '&<>"\'\/';
+
+ escaped += escaped;
+ unescaped += unescaped;
+
+ QUnit.test('should unescape entities in order', function(assert) {
+ assert.expect(1);
+
+ assert.strictEqual(_.unescape('&lt;'), '<');
+ });
+
+ QUnit.test('should unescape the proper entities', function(assert) {
+ assert.expect(1);
+
+ assert.strictEqual(_.unescape(escaped), unescaped);
+ });
+
+ QUnit.test('should not unescape the "/" entity', function(assert) {
+ assert.expect(1);
+
+ assert.strictEqual(_.unescape('/'), '/');
+ });
+
+ QUnit.test('should handle strings with nothing to unescape', function(assert) {
+ assert.expect(1);
+
+ assert.strictEqual(_.unescape('abc'), 'abc');
+ });
+
+ QUnit.test('should unescape the same characters escaped by `_.escape`', function(assert) {
+ assert.expect(1);
+
+ assert.strictEqual(_.unescape(_.escape(unescaped)), unescaped);
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.unionBy');
+
+ (function() {
+ QUnit.test('should accept an `iteratee` argument', function(assert) {
+ assert.expect(2);
+
+ var actual = _.unionBy([2.1, 1.2], [4.3, 2.4], Math.floor);
+ assert.deepEqual(actual, [2.1, 1.2, 4.3]);
+
+ actual = _.unionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
+ assert.deepEqual(actual, [{ 'x': 1 }, { 'x': 2 }]);
+ });
+
+ QUnit.test('should provide the correct `iteratee` arguments', function(assert) {
+ assert.expect(1);
+
+ var args;
+
+ _.unionBy([2.1, 1.2], [4.3, 2.4], function() {
+ args || (args = slice.call(arguments));
+ });
+
+ assert.deepEqual(args, [2.1]);
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.unionWith');
+
+ (function() {
+ QUnit.test('should work with a `comparator` argument', function(assert) {
+ assert.expect(1);
+
+ var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }],
+ others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }],
+ actual = _.unionWith(objects, others, lodashStable.isEqual);
+
+ assert.deepEqual(actual, [objects[0], objects[1], others[0]]);
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('union methods');
+
+ lodashStable.each(['union', 'unionBy', 'unionWith'], function(methodName) {
+ var args = (function() { return arguments; }(1, 2, 3)),
+ func = _[methodName];
+
+ QUnit.test('`_.' + methodName + '` should return the union of the given arrays', function(assert) {
+ assert.expect(1);
+
+ var actual = func([1, 3, 2], [5, 2, 1, 4], [2, 1]);
+ assert.deepEqual(actual, [1, 3, 2, 5, 4]);
+ });
+
+ QUnit.test('`_.' + methodName + '` should not flatten nested arrays', function(assert) {
+ assert.expect(1);
+
+ var actual = func([1, 3, 2], [1, [5]], [2, [4]]);
+ assert.deepEqual(actual, [1, 3, 2, [5], [4]]);
+ });
+
+ QUnit.test('`_.' + methodName + '` should ignore values that are not arrays or `arguments` objects', function(assert) {
+ assert.expect(3);
+
+ var array = [0];
+ assert.deepEqual(func(array, 3, { '0': 1 }, null), array);
+ assert.deepEqual(func(null, array, null, [2, 1]), [0, 2, 1]);
+ assert.deepEqual(func(array, null, args, null), [0, 1, 2, 3]);
+ });
+ });
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.uniq');
+
+ (function() {
+ QUnit.test('should perform an unsorted uniq when used as an iteratee for methods like `_.map`', function(assert) {
+ assert.expect(1);
+
+ var array = [[2, 1, 2], [1, 2, 1]],
+ actual = lodashStable.map(array, lodashStable.uniq);
+
+ assert.deepEqual(actual, [[2, 1], [1, 2]]);
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('uniqBy methods');
+
+ lodashStable.each(['uniqBy', 'sortedUniqBy'], function(methodName) {
+ var func = _[methodName],
+ isSorted = methodName == 'sortedUniqBy',
+ objects = [{ 'a': 2 }, { 'a': 3 }, { 'a': 1 }, { 'a': 2 }, { 'a': 3 }, { 'a': 1 }];
+
+ if (isSorted) {
+ objects = _.sortBy(objects, 'a');
+ }
+ QUnit.test('`_.' + methodName + '` should work with an `iteratee` argument', function(assert) {
+ assert.expect(1);
+
+ var expected = isSorted ? [{ 'a': 1 }, { 'a': 2 }, { 'a': 3 }] : objects.slice(0, 3);
+
+ var actual = func(objects, function(object) {
+ return object.a;
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('should work with large arrays', function(assert) {
+ assert.expect(2);
+
+ var largeArray = lodashStable.times(LARGE_ARRAY_SIZE, function() {
+ return [1, 2];
+ });
+
+ var actual = func(largeArray, String);
+
+ assert.deepEqual(actual, [[1, 2]]);
+ assert.strictEqual(actual[0], largeArray[0]);
+ });
+
+ QUnit.test('`_.' + methodName + '` should provide the correct `iteratee` arguments', function(assert) {
+ assert.expect(1);
+
+ var args;
+
+ func(objects, function() {
+ args || (args = slice.call(arguments));
+ });
+
+ assert.deepEqual(args, [objects[0]]);
+ });
+
+ QUnit.test('`_.' + methodName + '` should work with `_.property` shorthands', function(assert) {
+ assert.expect(2);
+
+ var expected = isSorted ? [{ 'a': 1 }, { 'a': 2 }, { 'a': 3 }] : objects.slice(0, 3),
+ actual = func(objects, 'a');
+
+ assert.deepEqual(actual, expected);
+
+ var arrays = [[2], [3], [1], [2], [3], [1]];
+ if (isSorted) {
+ arrays = lodashStable.sortBy(arrays, 0);
+ }
+ expected = isSorted ? [[1], [2], [3]] : arrays.slice(0, 3);
+ actual = func(arrays, 0);
+
+ assert.deepEqual(actual, expected);
+ });
+
+ lodashStable.each({
+ 'an array': [0, 'a'],
+ 'an object': { '0': 'a' },
+ 'a number': 0,
+ 'a string': '0'
+ },
+ function(iteratee, key) {
+ QUnit.test('`_.' + methodName + '` should work with ' + key + ' for `iteratee`', function(assert) {
+ assert.expect(1);
+
+ var actual = func([['a'], ['a'], ['b']], iteratee);
+ assert.deepEqual(actual, [['a'], ['b']]);
+ });
+ });
+ });
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.uniqWith');
+
+ (function() {
+ QUnit.test('should work with a `comparator` argument', function(assert) {
+ assert.expect(1);
+
+ var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 2 }],
+ actual = _.uniqWith(objects, lodashStable.isEqual);
+
+ assert.deepEqual(actual, [objects[0], objects[1]]);
+ });
+
+ QUnit.test('should preserve the sign of `0`', function(assert) {
+ assert.expect(1);
+
+ var largeArray = lodashStable.times(LARGE_ARRAY_SIZE, function(index) {
+ return isEven(index) ? -0 : 0;
+ });
+
+ var arrays = [[-0, 0], largeArray],
+ expected = lodashStable.map(arrays, lodashStable.constant(['-0']));
+
+ var actual = lodashStable.map(arrays, function(array) {
+ return lodashStable.map(_.uniqWith(array, lodashStable.eq), lodashStable.toString);
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('uniq methods');
+
+ lodashStable.each(['uniq', 'uniqBy', 'uniqWith', 'sortedUniq', 'sortedUniqBy'], function(methodName) {
+ var func = _[methodName],
+ isSorted = /^sorted/.test(methodName),
+ objects = [{ 'a': 2 }, { 'a': 3 }, { 'a': 1 }, { 'a': 2 }, { 'a': 3 }, { 'a': 1 }];
+
+ if (isSorted) {
+ objects = _.sortBy(objects, 'a');
+ }
+ else {
+ QUnit.test('`_.' + methodName + '` should return unique values of an unsorted array', function(assert) {
+ assert.expect(1);
+
+ var array = [2, 3, 1, 2, 3, 1];
+ assert.deepEqual(func(array), [2, 3, 1]);
+ });
+ }
+ QUnit.test('`_.' + methodName + '` should return unique values of a sorted array', function(assert) {
+ assert.expect(1);
+
+ var array = [1, 1, 2, 2, 3];
+ assert.deepEqual(func(array), [1, 2, 3]);
+ });
+
+ QUnit.test('`_.' + methodName + '` should treat object instances as unique', function(assert) {
+ assert.expect(1);
+
+ assert.deepEqual(func(objects), objects);
+ });
+
+ QUnit.test('`_.' + methodName + '` should treat `-0` as `0`', function(assert) {
+ assert.expect(1);
+
+ var actual = lodashStable.map(func([-0, 0]), lodashStable.toString);
+ assert.deepEqual(actual, ['0']);
+ });
+
+ QUnit.test('`_.' + methodName + '` should match `NaN`', function(assert) {
+ assert.expect(1);
+
+ assert.deepEqual(func([NaN, NaN]), [NaN]);
+ });
+
+ QUnit.test('`_.' + methodName + '` should work with large arrays', function(assert) {
+ assert.expect(1);
+
+ var largeArray = [],
+ expected = [0, {}, 'a'],
+ count = Math.ceil(LARGE_ARRAY_SIZE / expected.length);
+
+ lodashStable.each(expected, function(value) {
+ lodashStable.times(count, function() {
+ largeArray.push(value);
+ });
+ });
+
+ assert.deepEqual(func(largeArray), expected);
+ });
+
+ QUnit.test('`_.' + methodName + '` should work with large arrays of `-0` as `0`', function(assert) {
+ assert.expect(1);
+
+ var largeArray = lodashStable.times(LARGE_ARRAY_SIZE, function(index) {
+ return isEven(index) ? -0 : 0;
+ });
+
+ var actual = lodashStable.map(func(largeArray), lodashStable.toString);
+ assert.deepEqual(actual, ['0']);
+ });
+
+ QUnit.test('`_.' + methodName + '` should work with large arrays of boolean, `NaN`, and nullish values', function(assert) {
+ assert.expect(1);
+
+ var largeArray = [],
+ expected = [null, undefined, false, true, NaN],
+ count = Math.ceil(LARGE_ARRAY_SIZE / expected.length);
+
+ lodashStable.each(expected, function(value) {
+ lodashStable.times(count, function() {
+ largeArray.push(value);
+ });
+ });
+
+ assert.deepEqual(func(largeArray), expected);
+ });
+
+ QUnit.test('`_.' + methodName + '` should work with large arrays of symbols', function(assert) {
+ assert.expect(1);
+
+ if (Symbol) {
+ var largeArray = lodashStable.times(LARGE_ARRAY_SIZE, Symbol);
+ assert.deepEqual(func(largeArray), largeArray);
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+
+ QUnit.test('`_.' + methodName + '` should work with large arrays of well-known symbols', function(assert) {
+ assert.expect(1);
+
+ // See http://www.ecma-international.org/ecma-262/6.0/#sec-well-known-symbols.
+ if (Symbol) {
+ var expected = [
+ Symbol.hasInstance, Symbol.isConcatSpreadable, Symbol.iterator,
+ Symbol.match, Symbol.replace, Symbol.search, Symbol.species,
+ Symbol.split, Symbol.toPrimitive, Symbol.toStringTag, Symbol.unscopables
+ ];
+
+ var largeArray = [],
+ count = Math.ceil(LARGE_ARRAY_SIZE / expected.length);
+
+ expected = lodashStable.map(expected, function(symbol) {
+ return symbol || {};
+ });
+
+ lodashStable.each(expected, function(value) {
+ lodashStable.times(count, function() {
+ largeArray.push(value);
+ });
+ });
+
+ assert.deepEqual(func(largeArray), expected);
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+
+ QUnit.test('`_.' + methodName + '` should distinguish between numbers and numeric strings', function(assert) {
+ assert.expect(1);
+
+ var largeArray = [],
+ expected = ['2', 2, Object('2'), Object(2)],
+ count = Math.ceil(LARGE_ARRAY_SIZE / expected.length);
+
+ lodashStable.each(expected, function(value) {
+ lodashStable.times(count, function() {
+ largeArray.push(value);
+ });
+ });
+
+ assert.deepEqual(func(largeArray), expected);
+ });
+ });
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.uniqueId');
+
+ (function() {
+ QUnit.test('should generate unique ids', function(assert) {
+ assert.expect(1);
+
+ var actual = lodashStable.times(1000, function(assert) {
+ return _.uniqueId();
+ });
+
+ assert.strictEqual(lodashStable.uniq(actual).length, actual.length);
+ });
+
+ QUnit.test('should return a string value when not providing a prefix argument', function(assert) {
+ assert.expect(1);
+
+ assert.strictEqual(typeof _.uniqueId(), 'string');
+ });
+
+ QUnit.test('should coerce the prefix argument to a string', function(assert) {
+ assert.expect(1);
+
+ var actual = [_.uniqueId(3), _.uniqueId(2), _.uniqueId(1)];
+ assert.ok(/3\d+,2\d+,1\d+/.test(actual));
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.unset');
+
+ (function() {
+ QUnit.test('should unset property values', function(assert) {
+ assert.expect(4);
+
+ lodashStable.each(['a', ['a']], function(path) {
+ var object = { 'a': 1, 'c': 2 };
+ assert.strictEqual(_.unset(object, path), true);
+ assert.deepEqual(object, { 'c': 2 });
+ });
+ });
+
+ QUnit.test('should preserve the sign of `0`', function(assert) {
+ assert.expect(1);
+
+ var props = [-0, Object(-0), 0, Object(0)],
+ expected = lodashStable.map(props, lodashStable.constant([true, false]));
+
+ var actual = lodashStable.map(props, function(key) {
+ var object = { '-0': 'a', '0': 'b' };
+ return [_.unset(object, key), lodashStable.toString(key) in object];
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('should unset symbol keyed property values', function(assert) {
+ assert.expect(2);
+
+ if (Symbol) {
+ var object = {};
+ object[symbol] = 1;
+
+ assert.strictEqual(_.unset(object, symbol), true);
+ assert.notOk(symbol in object);
+ }
+ else {
+ skipAssert(assert, 2);
+ }
+ });
+
+ QUnit.test('should unset deep property values', function(assert) {
+ assert.expect(4);
+
+ lodashStable.each(['a.b', ['a', 'b']], function(path) {
+ var object = { 'a': { 'b': null } };
+ assert.strictEqual(_.unset(object, path), true);
+ assert.deepEqual(object, { 'a': {} });
+ });
+ });
+
+ QUnit.test('should handle complex paths', function(assert) {
+ assert.expect(4);
+
+ var paths = [
+ 'a[-1.23]["[\\"b\\"]"].c[\'[\\\'d\\\']\'][\ne\n][f].g',
+ ['a', '-1.23', '["b"]', 'c', "['d']", '\ne\n', 'f', 'g']
+ ];
+
+ lodashStable.each(paths, function(path) {
+ var object = { 'a': { '-1.23': { '["b"]': { 'c': { "['d']": { '\ne\n': { 'f': { 'g': 8 } } } } } } } };
+ assert.strictEqual(_.unset(object, path), true);
+ assert.notOk('g' in object.a[-1.23]['["b"]'].c["['d']"]['\ne\n'].f);
+ });
+ });
+
+ QUnit.test('should return `true` for nonexistent paths', function(assert) {
+ assert.expect(5);
+
+ var object = { 'a': { 'b': { 'c': null } } };
+
+ lodashStable.each(['z', 'a.z', 'a.b.z', 'a.b.c.z'], function(path) {
+ assert.strictEqual(_.unset(object, path), true);
+ });
+
+ assert.deepEqual(object, { 'a': { 'b': { 'c': null } } });
+ });
+
+ QUnit.test('should not error when `object` is nullish', function(assert) {
+ assert.expect(1);
+
+ var values = [null, undefined],
+ expected = [[true, true], [true, true]];
+
+ var actual = lodashStable.map(values, function(value) {
+ try {
+ return [_.unset(value, 'a.b'), _.unset(value, ['a', 'b'])];
+ } catch (e) {
+ return e.message;
+ }
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('should follow `path` over non-plain objects', function(assert) {
+ assert.expect(8);
+
+ var object = { 'a': '' },
+ paths = ['constructor.prototype.a', ['constructor', 'prototype', 'a']];
+
+ lodashStable.each(paths, function(path) {
+ numberProto.a = 1;
+
+ var actual = _.unset(0, path);
+ assert.strictEqual(actual, true);
+ assert.notOk('a' in numberProto);
+
+ delete numberProto.a;
+ });
+
+ lodashStable.each(['a.replace.b', ['a', 'replace', 'b']], function(path) {
+ stringProto.replace.b = 1;
+
+ var actual = _.unset(object, path);
+ assert.strictEqual(actual, true);
+ assert.notOk('a' in stringProto.replace);
+
+ delete stringProto.replace.b;
+ });
+ });
+
+ QUnit.test('should return `false` for non-configurable properties', function(assert) {
+ assert.expect(1);
+
+ var object = {};
+
+ if (!isStrict && defineProperty) {
+ defineProperty(object, 'a', {
+ 'configurable': false,
+ 'enumerable': true,
+ 'writable': true,
+ 'value': 1,
+ });
+ assert.strictEqual(_.unset(object, 'a'), false);
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.unzipWith');
+
+ (function() {
+ QUnit.test('should unzip arrays combining regrouped elements with `iteratee`', function(assert) {
+ assert.expect(1);
+
+ var array = [[1, 4], [2, 5], [3, 6]];
+
+ var actual = _.unzipWith(array, function(a, b, c) {
+ return a + b + c;
+ });
+
+ assert.deepEqual(actual, [6, 15]);
+ });
+
+ QUnit.test('should provide the correct `iteratee` arguments', function(assert) {
+ assert.expect(1);
+
+ var args;
+
+ _.unzipWith([[1, 3, 5], [2, 4, 6]], function() {
+ args || (args = slice.call(arguments));
+ });
+
+ assert.deepEqual(args, [1, 2]);
+ });
+
+ QUnit.test('should perform a basic unzip when `iteratee` is nullish', function(assert) {
+ assert.expect(1);
+
+ var array = [[1, 3], [2, 4]],
+ values = [, null, undefined],
+ expected = lodashStable.map(values, lodashStable.constant(_.unzip(array)));
+
+ var actual = lodashStable.map(values, function(value, index) {
+ return index ? _.unzipWith(array, value) : _.unzipWith(array);
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.updateWith');
+
+ (function() {
+ QUnit.test('should work with a `customizer` callback', function(assert) {
+ assert.expect(1);
+
+ var actual = _.updateWith({ '0': {} }, '[0][1][2]', alwaysThree, function(value) {
+ return lodashStable.isObject(value) ? undefined : {};
+ });
+
+ assert.deepEqual(actual, { '0': { '1': { '2': 3 } } });
+ });
+
+ QUnit.test('should work with a `customizer` that returns `undefined`', function(assert) {
+ assert.expect(1);
+
+ var actual = _.updateWith({}, 'a[0].b.c', alwaysFour, noop);
+ assert.deepEqual(actual, { 'a': [{ 'b': { 'c': 4 } }] });
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('update methods');
+
+ lodashStable.each(['update', 'updateWith'], function(methodName) {
+ var func = _[methodName],
+ oldValue = 1;
+
+ QUnit.test('`_.' + methodName + '` should invoke `updater` with the value on `path` of `object`', function(assert) {
+ assert.expect(4);
+
+ var object = { 'a': [{ 'b': { 'c': oldValue } }] },
+ expected = oldValue + 1;
+
+ lodashStable.each(['a[0].b.c', ['a', '0', 'b', 'c']], function(path) {
+ func(object, path, function(n) {
+ assert.strictEqual(n, oldValue);
+ return ++n;
+ });
+
+ assert.strictEqual(object.a[0].b.c, expected);
+ object.a[0].b.c = oldValue;
+ });
+ });
+ });
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.upperCase');
+
+ (function() {
+ QUnit.test('should uppercase as space-separated words', function(assert) {
+ assert.expect(3);
+
+ assert.strictEqual(_.upperCase('--foo-bar--'), 'FOO BAR');
+ assert.strictEqual(_.upperCase('fooBar'), 'FOO BAR');
+ assert.strictEqual(_.upperCase('__foo_bar__'), 'FOO BAR');
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.upperFirst');
+
+ (function() {
+ QUnit.test('should uppercase only the first character', function(assert) {
+ assert.expect(3);
+
+ assert.strictEqual(_.upperFirst('fred'), 'Fred');
+ assert.strictEqual(_.upperFirst('Fred'), 'Fred');
+ assert.strictEqual(_.upperFirst('FRED'), 'FRED');
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('values methods');
+
+ lodashStable.each(['values', 'valuesIn'], function(methodName) {
+ var args = (function() { return arguments; }(1, 2, 3)),
+ strictArgs = (function() { 'use strict'; return arguments; }(1, 2, 3)),
+ func = _[methodName],
+ isValues = methodName == 'values';
+
+ QUnit.test('`_.' + methodName + '` should get string keyed values of `object`', function(assert) {
+ assert.expect(1);
+
+ var object = { 'a': 1, 'b': 2 },
+ actual = func(object).sort();
+
+ assert.deepEqual(actual, [1, 2]);
+ });
+
+ QUnit.test('`_.' + methodName + '` should work with an object that has a `length` property', function(assert) {
+ assert.expect(1);
+
+ var object = { '0': 'a', '1': 'b', 'length': 2 },
+ actual = func(object).sort();
+
+ assert.deepEqual(actual, [2, 'a', 'b']);
+ });
+
+ QUnit.test('`_.' + methodName + '` should ' + (isValues ? 'not ' : '') + 'include inherited string keyed property values', function(assert) {
+ assert.expect(1);
+
+ function Foo() {
+ this.a = 1;
+ }
+ Foo.prototype.b = 2;
+
+ var expected = isValues ? [1] : [1, 2],
+ actual = func(new Foo).sort();
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('`_.' + methodName + '` should work with `arguments` objects', function(assert) {
+ assert.expect(1);
+
+ var values = [args, strictArgs],
+ expected = lodashStable.map(values, lodashStable.constant([1, 2, 3]));
+
+ var actual = lodashStable.map(values, function(value) {
+ return func(value).sort();
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+ });
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.without');
+
+ (function() {
+ QUnit.test('should use strict equality to determine the values to reject', function(assert) {
+ assert.expect(2);
+
+ var object1 = { 'a': 1 },
+ object2 = { 'b': 2 },
+ array = [object1, object2];
+
+ assert.deepEqual(_.without(array, { 'a': 1 }), array);
+ assert.deepEqual(_.without(array, object1), [object2]);
+ });
+
+ QUnit.test('should remove all occurrences of each value from an array', function(assert) {
+ assert.expect(1);
+
+ var array = [1, 2, 3, 1, 2, 3];
+ assert.deepEqual(_.without(array, 1, 2), [3, 3]);
+ });
+ }(1, 2, 3));
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.words');
+
+ (function() {
+ QUnit.test('should treat latin-1 supplementary letters as words', function(assert) {
+ assert.expect(1);
+
+ var expected = lodashStable.map(burredLetters, function(letter) {
+ return [letter];
+ });
+
+ var actual = lodashStable.map(burredLetters, function(letter) {
+ return _.words(letter);
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('should not treat mathematical operators as words', function(assert) {
+ assert.expect(1);
+
+ var operators = ['\xac', '\xb1', '\xd7', '\xf7'],
+ expected = lodashStable.map(operators, alwaysEmptyArray),
+ actual = lodashStable.map(operators, _.words);
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('should not treat punctuation as words', function(assert) {
+ assert.expect(1);
+
+ var marks = [
+ '\u2012', '\u2013', '\u2014', '\u2015',
+ '\u2024', '\u2025', '\u2026',
+ '\u205d', '\u205e'
+ ];
+
+ var expected = lodashStable.map(marks, alwaysEmptyArray),
+ actual = lodashStable.map(marks, _.words);
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('should support a `pattern` argument', function(assert) {
+ assert.expect(2);
+
+ assert.deepEqual(_.words('abcd', /ab|cd/g), ['ab', 'cd']);
+ assert.deepEqual(_.words('abcd', 'ab|cd'), ['ab']);
+ });
+
+ QUnit.test('should work with compound words', function(assert) {
+ assert.expect(12);
+
+ assert.deepEqual(_.words('12Feet'), ['12', 'Feet']);
+ assert.deepEqual(_.words('aeiouAreVowels'), ['aeiou', 'Are', 'Vowels']);
+ assert.deepEqual(_.words('enable 6h format'), ['enable', '6', 'h', 'format']);
+ assert.deepEqual(_.words('enable 24H format'), ['enable', '24', 'H', 'format']);
+ assert.deepEqual(_.words('isISO8601'), ['is', 'ISO', '8601']);
+ assert.deepEqual(_.words('LETTERSAeiouAreVowels'), ['LETTERS', 'Aeiou', 'Are', 'Vowels']);
+ assert.deepEqual(_.words('tooLegit2Quit'), ['too', 'Legit', '2', 'Quit']);
+ assert.deepEqual(_.words('walk500Miles'), ['walk', '500', 'Miles']);
+ assert.deepEqual(_.words('xhr2Request'), ['xhr', '2', 'Request']);
+ assert.deepEqual(_.words('XMLHttp'), ['XML', 'Http']);
+ assert.deepEqual(_.words('XmlHTTP'), ['Xml', 'HTTP']);
+ assert.deepEqual(_.words('XmlHttp'), ['Xml', 'Http']);
+ });
+
+ QUnit.test('should work with compound words containing diacritical marks', function(assert) {
+ assert.expect(3);
+
+ assert.deepEqual(_.words('LETTERSÆiouAreVowels'), ['LETTERS', 'Æiou', 'Are', 'Vowels']);
+ assert.deepEqual(_.words('æiouAreVowels'), ['æiou', 'Are', 'Vowels']);
+ assert.deepEqual(_.words('æiou2Consonants'), ['æiou', '2', 'Consonants']);
+ });
+
+ QUnit.test('should work with contractions', function(assert) {
+ assert.expect(2);
+
+ var postfixes = ['d', 'll', 'm', 're', 's', 't', 've'];
+
+ lodashStable.each(["'", '\u2019'], function(apos) {
+ var actual = lodashStable.map(postfixes, function(postfix) {
+ return _.words('a b' + apos + postfix + ' c');
+ });
+
+ var expected = lodashStable.map(postfixes, function(postfix) {
+ return ['a', 'b' + apos + postfix, 'c'];
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+ });
+
+ QUnit.test('should work as an iteratee for methods like `_.map`', function(assert) {
+ assert.expect(1);
+
+ var strings = lodashStable.map(['a', 'b', 'c'], Object),
+ actual = lodashStable.map(strings, _.words);
+
+ assert.deepEqual(actual, [['a'], ['b'], ['c']]);
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.wrap');
+
+ (function() {
+ QUnit.test('should create a wrapped function', function(assert) {
+ assert.expect(1);
+
+ var p = _.wrap(_.escape, function(func, text) {
+ return '<p>' + func(text) + '</p>';
+ });
+
+ assert.strictEqual(p('fred, barney, & pebbles'), '<p>fred, barney, & pebbles</p>');
+ });
+
+ QUnit.test('should provide the correct `wrapper` arguments', function(assert) {
+ assert.expect(1);
+
+ var args;
+
+ var wrapped = _.wrap(noop, function() {
+ args || (args = slice.call(arguments));
+ });
+
+ wrapped(1, 2, 3);
+ assert.deepEqual(args, [noop, 1, 2, 3]);
+ });
+
+ QUnit.test('should use `_.identity` when `wrapper` is nullish', function(assert) {
+ assert.expect(1);
+
+ var values = [, null, undefined],
+ expected = lodashStable.map(values, alwaysA);
+
+ var actual = lodashStable.map(values, function(value, index) {
+ var wrapped = index ? _.wrap('a', value) : _.wrap('a');
+ return wrapped('b', 'c');
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('should not set a `this` binding', function(assert) {
+ assert.expect(1);
+
+ var p = _.wrap(_.escape, function(func) {
+ return '<p>' + func(this.text) + '</p>';
+ });
+
+ var object = { 'p': p, 'text': 'fred, barney, & pebbles' };
+ assert.strictEqual(object.p(), '<p>fred, barney, & pebbles</p>');
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('xor methods');
+
+ lodashStable.each(['xor', 'xorBy', 'xorWith'], function(methodName) {
+ var args = (function() { return arguments; }(1, 2, 3)),
+ func = _[methodName];
+
+ QUnit.test('`_.' + methodName + '` should return the symmetric difference of the given arrays', function(assert) {
+ assert.expect(1);
+
+ var actual = func([1, 2, 5], [2, 3, 5], [3, 4, 5]);
+ assert.deepEqual(actual, [1, 4, 5]);
+ });
+
+ QUnit.test('`_.' + methodName + '` should return an array of unique values', function(assert) {
+ assert.expect(2);
+
+ var actual = func([1, 1, 2, 5], [2, 2, 3, 5], [3, 4, 5, 5]);
+ assert.deepEqual(actual, [1, 4, 5]);
+
+ actual = func([1, 1]);
+ assert.deepEqual(actual, [1]);
+ });
+
+ QUnit.test('`_.' + methodName + '` should return a new array when a single array is given', function(assert) {
+ assert.expect(1);
+
+ var array = [1];
+ assert.notStrictEqual(func(array), array);
+ });
+
+ QUnit.test('`_.' + methodName + '` should ignore individual secondary arguments', function(assert) {
+ assert.expect(1);
+
+ var array = [0];
+ assert.deepEqual(func(array, 3, null, { '0': 1 }), array);
+ });
+
+ QUnit.test('`_.' + methodName + '` should ignore values that are not arrays or `arguments` objects', function(assert) {
+ assert.expect(3);
+
+ var array = [1, 2];
+ assert.deepEqual(func(array, 3, { '0': 1 }, null), array);
+ assert.deepEqual(func(null, array, null, [2, 3]), [1, 3]);
+ assert.deepEqual(func(array, null, args, null), [3]);
+ });
+
+ QUnit.test('`_.' + methodName + '` should return a wrapped value when chaining', function(assert) {
+ assert.expect(1);
+
+ if (!isNpm) {
+ var wrapped = _([1, 2, 3])[methodName]([5, 2, 1, 4]);
+ assert.ok(wrapped instanceof _);
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+
+ QUnit.test('`_.' + methodName + '` should work when in a lazy sequence before `head` or `last`', function(assert) {
+ assert.expect(1);
+
+ if (!isNpm) {
+ var array = lodashStable.range(LARGE_ARRAY_SIZE + 1),
+ wrapped = _(array).slice(1)[methodName]([LARGE_ARRAY_SIZE, LARGE_ARRAY_SIZE + 1]);
+
+ var actual = lodashStable.map(['head', 'last'], function(methodName) {
+ return wrapped[methodName]();
+ });
+
+ assert.deepEqual(actual, [1, LARGE_ARRAY_SIZE + 1]);
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+ });
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.xorBy');
+
+ (function() {
+ QUnit.test('should accept an `iteratee` argument', function(assert) {
+ assert.expect(2);
+
+ var actual = _.xorBy([2.1, 1.2], [4.3, 2.4], Math.floor);
+ assert.deepEqual(actual, [1.2, 4.3]);
+
+ actual = _.xorBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
+ assert.deepEqual(actual, [{ 'x': 2 }]);
+ });
+
+ QUnit.test('should provide the correct `iteratee` arguments', function(assert) {
+ assert.expect(1);
+
+ var args;
+
+ _.xorBy([2.1, 1.2], [4.3, 2.4], function() {
+ args || (args = slice.call(arguments));
+ });
+
+ assert.deepEqual(args, [4.3]);
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.xorWith');
+
+ (function() {
+ QUnit.test('should work with a `comparator` argument', function(assert) {
+ assert.expect(1);
+
+ var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }],
+ others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }],
+ actual = _.xorWith(objects, others, lodashStable.isEqual);
+
+ assert.deepEqual(actual, [objects[1], others[0]]);
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('zipObject methods');
+
+ lodashStable.each(['zipObject', 'zipObjectDeep'], function(methodName) {
+ var func = _[methodName],
+ object = { 'barney': 36, 'fred': 40 },
+ isDeep = methodName == 'zipObjectDeep';
+
+ QUnit.test('`_.' + methodName + '` should zip together key/value arrays into an object', function(assert) {
+ assert.expect(1);
+
+ var actual = func(['barney', 'fred'], [36, 40]);
+ assert.deepEqual(actual, object);
+ });
+
+ QUnit.test('`_.' + methodName + '` should ignore extra `values`', function(assert) {
+ assert.expect(1);
+
+ assert.deepEqual(func(['a'], [1, 2]), { 'a': 1 });
+ });
+
+ QUnit.test('`_.' + methodName + '` should assign `undefined` values for extra `keys`', function(assert) {
+ assert.expect(1);
+
+ assert.deepEqual(func(['a', 'b'], [1]), { 'a': 1, 'b': undefined });
+ });
+
+ QUnit.test('`_.' + methodName + '` should ' + (isDeep ? '' : 'not ') + 'support deep paths', function(assert) {
+ assert.expect(2);
+
+ lodashStable.each(['a.b.c', ['a', 'b', 'c']], function(path, index) {
+ var expected = isDeep ? ({ 'a': { 'b': { 'c': 1 } } }) : (index ? { 'a,b,c': 1 } : { 'a.b.c': 1 });
+ assert.deepEqual(func([path], [1]), expected);
+ });
+ });
+
+ QUnit.test('`_.' + methodName + '` should work in a lazy sequence', function(assert) {
+ assert.expect(1);
+
+ if (!isNpm) {
+ var values = lodashStable.range(LARGE_ARRAY_SIZE),
+ props = lodashStable.map(values, function(value) { return 'key' + value; }),
+ actual = _(props)[methodName](values).map(square).filter(isEven).take().value();
+
+ assert.deepEqual(actual, _.take(_.filter(_.map(func(props, values), square), isEven)));
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+ });
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.zipWith');
+
+ (function() {
+ QUnit.test('should zip arrays combining grouped elements with `iteratee`', function(assert) {
+ assert.expect(2);
+
+ var array1 = [1, 2, 3],
+ array2 = [4, 5, 6],
+ array3 = [7, 8, 9];
+
+ var actual = _.zipWith(array1, array2, array3, function(a, b, c) {
+ return a + b + c;
+ });
+
+ assert.deepEqual(actual, [12, 15, 18]);
+
+ var actual = _.zipWith(array1, [], function(a, b) {
+ return a + (b || 0);
+ });
+
+ assert.deepEqual(actual, [1, 2, 3]);
+ });
+
+ QUnit.test('should provide the correct `iteratee` arguments', function(assert) {
+ assert.expect(1);
+
+ var args;
+
+ _.zipWith([1, 2], [3, 4], [5, 6], function() {
+ args || (args = slice.call(arguments));
+ });
+
+ assert.deepEqual(args, [1, 3, 5]);
+ });
+
+ QUnit.test('should perform a basic zip when `iteratee` is nullish', function(assert) {
+ assert.expect(1);
+
+ var array1 = [1, 2],
+ array2 = [3, 4],
+ values = [, null, undefined],
+ expected = lodashStable.map(values, lodashStable.constant(_.zip(array1, array2)));
+
+ var actual = lodashStable.map(values, function(value, index) {
+ return index ? _.zipWith(array1, array2, value) : _.zipWith(array1, array2);
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash.unzip and lodash.zip');
+
+ lodashStable.each(['unzip', 'zip'], function(methodName, index) {
+ var func = _[methodName];
+ func = lodashStable.bind(index ? func.apply : func.call, func, null);
+
+ var object = {
+ 'an empty array': [
+ [],
+ []
+ ],
+ '0-tuples': [
+ [[], []],
+ []
+ ],
+ '2-tuples': [
+ [['barney', 'fred'], [36, 40]],
+ [['barney', 36], ['fred', 40]]
+ ],
+ '3-tuples': [
+ [['barney', 'fred'], [36, 40], [false, true]],
+ [['barney', 36, false], ['fred', 40, true]]
+ ]
+ };
+
+ lodashStable.forOwn(object, function(pair, key) {
+ QUnit.test('`_.' + methodName + '` should work with ' + key, function(assert) {
+ assert.expect(2);
+
+ var actual = func(pair[0]);
+ assert.deepEqual(actual, pair[1]);
+ assert.deepEqual(func(actual), actual.length ? pair[0] : []);
+ });
+ });
+
+ QUnit.test('`_.' + methodName + '` should work with tuples of different lengths', function(assert) {
+ assert.expect(4);
+
+ var pair = [
+ [['barney', 36], ['fred', 40, false]],
+ [['barney', 'fred'], [36, 40], [undefined, false]]
+ ];
+
+ var actual = func(pair[0]);
+ assert.ok('0' in actual[2]);
+ assert.deepEqual(actual, pair[1]);
+
+ actual = func(actual);
+ assert.ok('2' in actual[0]);
+ assert.deepEqual(actual, [['barney', 36, undefined], ['fred', 40, false]]);
+ });
+
+ QUnit.test('`_.' + methodName + '` should treat falsey values as empty arrays', function(assert) {
+ assert.expect(1);
+
+ var expected = lodashStable.map(falsey, alwaysEmptyArray);
+
+ var actual = lodashStable.map(falsey, function(value) {
+ return func([value, value, value]);
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+
+ QUnit.test('`_.' + methodName + '` should ignore values that are not arrays or `arguments` objects', function(assert) {
+ assert.expect(1);
+
+ var array = [[1, 2], [3, 4], null, undefined, { '0': 1 }];
+ assert.deepEqual(func(array), [[1, 3], [2, 4]]);
+ });
+
+ QUnit.test('`_.' + methodName + '` should support consuming its return value', function(assert) {
+ assert.expect(1);
+
+ var expected = [['barney', 'fred'], [36, 40]];
+ assert.deepEqual(func(func(func(func(expected)))), expected);
+ });
+ });
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash(...).commit');
+
+ (function() {
+ QUnit.test('should execute the chained sequence and returns the wrapped result', function(assert) {
+ assert.expect(4);
+
+ if (!isNpm) {
+ var array = [1],
+ wrapped = _(array).push(2).push(3);
+
+ assert.deepEqual(array, [1]);
+
+ var otherWrapper = wrapped.commit();
+ assert.ok(otherWrapper instanceof _);
+ assert.deepEqual(otherWrapper.value(), [1, 2, 3]);
+ assert.deepEqual(wrapped.value(), [1, 2, 3, 2, 3]);
+ }
+ else {
+ skipAssert(assert, 4);
+ }
+ });
+
+ QUnit.test('should track the `__chain__` value of a wrapper', function(assert) {
+ assert.expect(2);
+
+ if (!isNpm) {
+ var wrapped = _([1]).chain().commit().head();
+ assert.ok(wrapped instanceof _);
+ assert.strictEqual(wrapped.value(), 1);
+ }
+ else {
+ skipAssert(assert, 2);
+ }
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash(...).next');
+
+ lodashStable.each([false, true], function(implict) {
+ function chain(value) {
+ return implict ? _(value) : _.chain(value);
+ }
+
+ var chainType = 'in an ' + (implict ? 'implict' : 'explict') + ' chain';
+
+ QUnit.test('should follow the iterator protocol ' + chainType, function(assert) {
+ assert.expect(3);
+
+ if (!isNpm) {
+ var wrapped = chain([1, 2]);
+
+ assert.deepEqual(wrapped.next(), { 'done': false, 'value': 1 });
+ assert.deepEqual(wrapped.next(), { 'done': false, 'value': 2 });
+ assert.deepEqual(wrapped.next(), { 'done': true, 'value': undefined });
+ }
+ else {
+ skipAssert(assert, 3);
+ }
+ });
+
+ QUnit.test('should act as an iterable ' + chainType, function(assert) {
+ assert.expect(2);
+
+ if (!isNpm && Symbol && Symbol.iterator) {
+ var array = [1, 2],
+ wrapped = chain(array);
+
+ assert.strictEqual(wrapped[Symbol.iterator](), wrapped);
+ assert.deepEqual(_.toArray(wrapped), array);
+ }
+ else {
+ skipAssert(assert, 2);
+ }
+ });
+
+ QUnit.test('should use `_.toArray` to generate the iterable result ' + chainType, function(assert) {
+ assert.expect(3);
+
+ if (!isNpm && Array.from) {
+ var hearts = '\ud83d\udc95',
+ values = [[1], { 'a': 1 }, hearts];
+
+ lodashStable.each(values, function(value) {
+ var wrapped = chain(value);
+ assert.deepEqual(Array.from(wrapped), _.toArray(value));
+ });
+ }
+ else {
+ skipAssert(assert, 3);
+ }
+ });
+
+ QUnit.test('should reset the iterator correctly ' + chainType, function(assert) {
+ assert.expect(4);
+
+ if (!isNpm && Symbol && Symbol.iterator) {
+ var array = [1, 2],
+ wrapped = chain(array);
+
+ assert.deepEqual(_.toArray(wrapped), array);
+ assert.deepEqual(_.toArray(wrapped), [], 'produces an empty array for exhausted iterator');
+
+ var other = wrapped.filter();
+ assert.deepEqual(_.toArray(other), array, 'reset for new chain segments');
+ assert.deepEqual(_.toArray(wrapped), [], 'iterator is still exhausted');
+ }
+ else {
+ skipAssert(assert, 4);
+ }
+ });
+
+ QUnit.test('should work in a lazy sequence ' + chainType, function(assert) {
+ assert.expect(3);
+
+ if (!isNpm && Symbol && Symbol.iterator) {
+ var array = lodashStable.range(LARGE_ARRAY_SIZE),
+ predicate = function(value) { values.push(value); return isEven(value); },
+ values = [],
+ wrapped = chain(array);
+
+ assert.deepEqual(_.toArray(wrapped), array);
+
+ wrapped = wrapped.filter(predicate);
+ assert.deepEqual(_.toArray(wrapped), _.filter(array, isEven), 'reset for new lazy chain segments');
+ assert.deepEqual(values, array, 'memoizes iterator values');
+ }
+ else {
+ skipAssert(assert, 3);
+ }
+ });
+ });
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash(...).plant');
+
+ (function() {
+ QUnit.test('should clone the chained sequence planting `value` as the wrapped value', function(assert) {
+ assert.expect(2);
+
+ if (!isNpm) {
+ var array1 = [5, null, 3, null, 1],
+ array2 = [10, null, 8, null, 6],
+ wrapped1 = _(array1).thru(_.compact).map(square).takeRight(2).sort(),
+ wrapped2 = wrapped1.plant(array2);
+
+ assert.deepEqual(wrapped2.value(), [36, 64]);
+ assert.deepEqual(wrapped1.value(), [1, 9]);
+ }
+ else {
+ skipAssert(assert, 2);
+ }
+ });
+
+ QUnit.test('should clone `chainAll` settings', function(assert) {
+ assert.expect(1);
+
+ if (!isNpm) {
+ var array1 = [2, 4],
+ array2 = [6, 8],
+ wrapped1 = _(array1).chain().map(square),
+ wrapped2 = wrapped1.plant(array2);
+
+ assert.deepEqual(wrapped2.head().value(), 36);
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+
+ QUnit.test('should reset iterator data on cloned sequences', function(assert) {
+ assert.expect(3);
+
+ if (!isNpm && Symbol && Symbol.iterator) {
+ var array1 = [2, 4],
+ array2 = [6, 8],
+ wrapped1 = _(array1).map(square);
+
+ assert.deepEqual(_.toArray(wrapped1), [4, 16]);
+ assert.deepEqual(_.toArray(wrapped1), []);
+
+ var wrapped2 = wrapped1.plant(array2);
+ assert.deepEqual(_.toArray(wrapped2), [36, 64]);
+ }
+ else {
+ skipAssert(assert, 3);
+ }
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash(...).pop');
+
+ (function() {
+ QUnit.test('should remove elements from the end of `array`', function(assert) {
+ assert.expect(5);
+
+ if (!isNpm) {
+ var array = [1, 2],
+ wrapped = _(array);
+
+ assert.strictEqual(wrapped.pop(), 2);
+ assert.deepEqual(wrapped.value(), [1]);
+ assert.strictEqual(wrapped.pop(), 1);
+
+ var actual = wrapped.value();
+ assert.deepEqual(actual, []);
+ assert.strictEqual(actual, array);
+ }
+ else {
+ skipAssert(assert, 5);
+ }
+ });
+
+ QUnit.test('should accept falsey arguments', function(assert) {
+ assert.expect(1);
+
+ if (!isNpm) {
+ var expected = lodashStable.map(falsey, alwaysTrue);
+
+ var actual = lodashStable.map(falsey, function(value, index) {
+ try {
+ var result = index ? _(value).pop() : _().pop();
+ return result === undefined;
+ } catch (e) {}
+ });
+
+ assert.deepEqual(actual, expected);
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash(...).push');
+
+ (function() {
+ QUnit.test('should append elements to `array`', function(assert) {
+ assert.expect(2);
+
+ if (!isNpm) {
+ var array = [1],
+ wrapped = _(array).push(2, 3),
+ actual = wrapped.value();
+
+ assert.strictEqual(actual, array);
+ assert.deepEqual(actual, [1, 2, 3]);
+ }
+ else {
+ skipAssert(assert, 2);
+ }
+ });
+
+ QUnit.test('should accept falsey arguments', function(assert) {
+ assert.expect(1);
+
+ if (!isNpm) {
+ var expected = lodashStable.map(falsey, alwaysTrue);
+
+ var actual = lodashStable.map(falsey, function(value, index) {
+ try {
+ var result = index ? _(value).push(1).value() : _().push(1).value();
+ return lodashStable.eq(result, value);
+ } catch (e) {}
+ });
+
+ assert.deepEqual(actual, expected);
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash(...).shift');
+
+ (function() {
+ QUnit.test('should remove elements from the front of `array`', function(assert) {
+ assert.expect(5);
+
+ if (!isNpm) {
+ var array = [1, 2],
+ wrapped = _(array);
+
+ assert.strictEqual(wrapped.shift(), 1);
+ assert.deepEqual(wrapped.value(), [2]);
+ assert.strictEqual(wrapped.shift(), 2);
+
+ var actual = wrapped.value();
+ assert.deepEqual(actual, []);
+ assert.strictEqual(actual, array);
+ }
+ else {
+ skipAssert(assert, 5);
+ }
+ });
+
+ QUnit.test('should accept falsey arguments', function(assert) {
+ assert.expect(1);
+
+ if (!isNpm) {
+ var expected = lodashStable.map(falsey, alwaysTrue);
+
+ var actual = lodashStable.map(falsey, function(value, index) {
+ try {
+ var result = index ? _(value).shift() : _().shift();
+ return result === undefined;
+ } catch (e) {}
+ });
+
+ assert.deepEqual(actual, expected);
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash(...).sort');
+
+ (function() {
+ QUnit.test('should return the wrapped sorted `array`', function(assert) {
+ assert.expect(2);
+
+ if (!isNpm) {
+ var array = [3, 1, 2],
+ wrapped = _(array).sort(),
+ actual = wrapped.value();
+
+ assert.strictEqual(actual, array);
+ assert.deepEqual(actual, [1, 2, 3]);
+ }
+ else {
+ skipAssert(assert, 2);
+ }
+ });
+
+ QUnit.test('should accept falsey arguments', function(assert) {
+ assert.expect(1);
+
+ if (!isNpm) {
+ var expected = lodashStable.map(falsey, alwaysTrue);
+
+ var actual = lodashStable.map(falsey, function(value, index) {
+ try {
+ var result = index ? _(value).sort().value() : _().sort().value();
+ return lodashStable.eq(result, value);
+ } catch (e) {}
+ });
+
+ assert.deepEqual(actual, expected);
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash(...).splice');
+
+ (function() {
+ QUnit.test('should support removing and inserting elements', function(assert) {
+ assert.expect(5);
+
+ if (!isNpm) {
+ var array = [1, 2],
+ wrapped = _(array);
+
+ assert.deepEqual(wrapped.splice(1, 1, 3).value(), [2]);
+ assert.deepEqual(wrapped.value(), [1, 3]);
+ assert.deepEqual(wrapped.splice(0, 2).value(), [1, 3]);
+
+ var actual = wrapped.value();
+ assert.deepEqual(actual, []);
+ assert.strictEqual(actual, array);
+ }
+ else {
+ skipAssert(assert, 5);
+ }
+ });
+
+ QUnit.test('should accept falsey arguments', function(assert) {
+ assert.expect(1);
+
+ if (!isNpm) {
+ var expected = lodashStable.map(falsey, alwaysTrue);
+
+ var actual = lodashStable.map(falsey, function(value, index) {
+ try {
+ var result = index ? _(value).splice(0, 1).value() : _().splice(0, 1).value();
+ return lodashStable.isEqual(result, []);
+ } catch (e) {}
+ });
+
+ assert.deepEqual(actual, expected);
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash(...).unshift');
+
+ (function() {
+ QUnit.test('should prepend elements to `array`', function(assert) {
+ assert.expect(2);
+
+ if (!isNpm) {
+ var array = [3],
+ wrapped = _(array).unshift(1, 2),
+ actual = wrapped.value();
+
+ assert.strictEqual(actual, array);
+ assert.deepEqual(actual, [1, 2, 3]);
+ }
+ else {
+ skipAssert(assert, 2);
+ }
+ });
+
+ QUnit.test('should accept falsey arguments', function(assert) {
+ assert.expect(1);
+
+ if (!isNpm) {
+ var expected = lodashStable.map(falsey, alwaysTrue);
+
+ var actual = lodashStable.map(falsey, function(value, index) {
+ try {
+ var result = index ? _(value).unshift(1).value() : _().unshift(1).value();
+ return lodashStable.eq(result, value);
+ } catch (e) {}
+ });
+
+ assert.deepEqual(actual, expected);
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash(...).value');
+
+ (function() {
+ QUnit.test('should execute the chained sequence and extract the unwrapped value', function(assert) {
+ assert.expect(4);
+
+ if (!isNpm) {
+ var array = [1],
+ wrapped = _(array).push(2).push(3);
+
+ assert.deepEqual(array, [1]);
+ assert.deepEqual(wrapped.value(), [1, 2, 3]);
+ assert.deepEqual(wrapped.value(), [1, 2, 3, 2, 3]);
+ assert.deepEqual(array, [1, 2, 3, 2, 3]);
+ }
+ else {
+ skipAssert(assert, 4);
+ }
+ });
+
+ QUnit.test('should return the `valueOf` result of the wrapped value', function(assert) {
+ assert.expect(1);
+
+ if (!isNpm) {
+ var wrapped = _(123);
+ assert.strictEqual(Number(wrapped), 123);
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+
+ QUnit.test('should stringify the wrapped value when used by `JSON.stringify`', function(assert) {
+ assert.expect(1);
+
+ if (!isNpm && JSON) {
+ var wrapped = _([1, 2, 3]);
+ assert.strictEqual(JSON.stringify(wrapped), '[1,2,3]');
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+
+ QUnit.test('should be aliased', function(assert) {
+ assert.expect(2);
+
+ if (!isNpm) {
+ var expected = _.prototype.value;
+ assert.strictEqual(_.prototype.toJSON, expected);
+ assert.strictEqual(_.prototype.valueOf, expected);
+ }
+ else {
+ skipAssert(assert, 2);
+ }
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash(...) methods that return the wrapped modified array');
+
+ (function() {
+ var funcs = [
+ 'push',
+ 'reverse',
+ 'sort',
+ 'unshift'
+ ];
+
+ lodashStable.each(funcs, function(methodName) {
+ QUnit.test('`_(...).' + methodName + '` should return a new wrapper', function(assert) {
+ assert.expect(2);
+
+ if (!isNpm) {
+ var array = [1, 2, 3],
+ wrapped = _(array),
+ actual = wrapped[methodName]();
+
+ assert.ok(actual instanceof _);
+ assert.notStrictEqual(actual, wrapped);
+ }
+ else {
+ skipAssert(assert, 2);
+ }
+ });
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash(...) methods that return new wrapped values');
+
+ (function() {
+ var funcs = [
+ 'castArray',
+ 'concat',
+ 'difference',
+ 'differenceBy',
+ 'differenceWith',
+ 'intersection',
+ 'intersectionBy',
+ 'intersectionWith',
+ 'pull',
+ 'pullAll',
+ 'pullAt',
+ 'sampleSize',
+ 'shuffle',
+ 'slice',
+ 'splice',
+ 'split',
+ 'toArray',
+ 'union',
+ 'unionBy',
+ 'unionWith',
+ 'uniq',
+ 'uniqBy',
+ 'uniqWith',
+ 'words',
+ 'xor',
+ 'xorBy',
+ 'xorWith'
+ ];
+
+ lodashStable.each(funcs, function(methodName) {
+ QUnit.test('`_(...).' + methodName + '` should return a new wrapped value', function(assert) {
+ assert.expect(2);
+
+ if (!isNpm) {
+ var value = methodName == 'split' ? 'abc' : [1, 2, 3],
+ wrapped = _(value),
+ actual = wrapped[methodName]();
+
+ assert.ok(actual instanceof _);
+ assert.notStrictEqual(actual, wrapped);
+ }
+ else {
+ skipAssert(assert, 2);
+ }
+ });
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash(...) methods that return unwrapped values');
+
+ (function() {
+ var funcs = [
+ 'add',
+ 'camelCase',
+ 'capitalize',
+ 'ceil',
+ 'clone',
+ 'deburr',
+ 'divide',
+ 'endsWith',
+ 'escape',
+ 'escapeRegExp',
+ 'every',
+ 'find',
+ 'floor',
+ 'has',
+ 'hasIn',
+ 'head',
+ 'includes',
+ 'isArguments',
+ 'isArray',
+ 'isArrayBuffer',
+ 'isArrayLike',
+ 'isBoolean',
+ 'isBuffer',
+ 'isDate',
+ 'isElement',
+ 'isEmpty',
+ 'isEqual',
+ 'isError',
+ 'isFinite',
+ 'isFunction',
+ 'isInteger',
+ 'isMap',
+ 'isNaN',
+ 'isNative',
+ 'isNil',
+ 'isNull',
+ 'isNumber',
+ 'isObject',
+ 'isObjectLike',
+ 'isPlainObject',
+ 'isRegExp',
+ 'isSafeInteger',
+ 'isSet',
+ 'isString',
+ 'isUndefined',
+ 'isWeakMap',
+ 'isWeakSet',
+ 'join',
+ 'kebabCase',
+ 'last',
+ 'lowerCase',
+ 'lowerFirst',
+ 'max',
+ 'maxBy',
+ 'min',
+ 'minBy',
+ 'multiply',
+ 'nth',
+ 'pad',
+ 'padEnd',
+ 'padStart',
+ 'parseInt',
+ 'pop',
+ 'random',
+ 'reduce',
+ 'reduceRight',
+ 'repeat',
+ 'replace',
+ 'round',
+ 'sample',
+ 'shift',
+ 'size',
+ 'snakeCase',
+ 'some',
+ 'startCase',
+ 'startsWith',
+ 'subtract',
+ 'sum',
+ 'toInteger',
+ 'toLower',
+ 'toNumber',
+ 'toSafeInteger',
+ 'toString',
+ 'toUpper',
+ 'trim',
+ 'trimEnd',
+ 'trimStart',
+ 'truncate',
+ 'unescape',
+ 'upperCase',
+ 'upperFirst'
+ ];
+
+ lodashStable.each(funcs, function(methodName) {
+ QUnit.test('`_(...).' + methodName + '` should return an unwrapped value when implicitly chaining', function(assert) {
+ assert.expect(1);
+
+ if (!isNpm) {
+ var actual = _()[methodName]();
+ assert.notOk(actual instanceof _);
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+
+ QUnit.test('`_(...).' + methodName + '` should return a wrapped value when explicitly chaining', function(assert) {
+ assert.expect(1);
+
+ if (!isNpm) {
+ var actual = _().chain()[methodName]();
+ assert.ok(actual instanceof _);
+ }
+ else {
+ skipAssert(assert);
+ }
+ });
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('"Arrays" category methods');
+
+ (function() {
+ var args = (function() { return arguments; }(1, null, [3], null, 5)),
+ sortedArgs = (function() { return arguments; }(1, [3], 5, null, null)),
+ array = [1, 2, 3, 4, 5, 6];
+
+ QUnit.test('should work with `arguments` objects', function(assert) {
+ assert.expect(30);
+
+ function message(methodName) {
+ return '`_.' + methodName + '` should work with `arguments` objects';
+ }
+
+ assert.deepEqual(_.difference(args, [null]), [1, [3], 5], message('difference'));
+ assert.deepEqual(_.difference(array, args), [2, 3, 4, 6], '_.difference should work with `arguments` objects as secondary arguments');
+
+ assert.deepEqual(_.union(args, [null, 6]), [1, null, [3], 5, 6], message('union'));
+ assert.deepEqual(_.union(array, args), array.concat([null, [3]]), '_.union should work with `arguments` objects as secondary arguments');
+
+ assert.deepEqual(_.compact(args), [1, [3], 5], message('compact'));
+ assert.deepEqual(_.drop(args, 3), [null, 5], message('drop'));
+ assert.deepEqual(_.dropRight(args, 3), [1, null], message('dropRight'));
+ assert.deepEqual(_.dropRightWhile(args,identity), [1, null, [3], null], message('dropRightWhile'));
+ assert.deepEqual(_.dropWhile(args,identity), [null, [3], null, 5], message('dropWhile'));
+ assert.deepEqual(_.findIndex(args, identity), 0, message('findIndex'));
+ assert.deepEqual(_.findLastIndex(args, identity), 4, message('findLastIndex'));
+ assert.deepEqual(_.flatten(args), [1, null, 3, null, 5], message('flatten'));
+ assert.deepEqual(_.head(args), 1, message('head'));
+ assert.deepEqual(_.indexOf(args, 5), 4, message('indexOf'));
+ assert.deepEqual(_.initial(args), [1, null, [3], null], message('initial'));
+ assert.deepEqual(_.intersection(args, [1]), [1], message('intersection'));
+ assert.deepEqual(_.last(args), 5, message('last'));
+ assert.deepEqual(_.lastIndexOf(args, 1), 0, message('lastIndexOf'));
+ assert.deepEqual(_.sortedIndex(sortedArgs, 6), 3, message('sortedIndex'));
+ assert.deepEqual(_.sortedIndexOf(sortedArgs, 5), 2, message('sortedIndexOf'));
+ assert.deepEqual(_.sortedLastIndex(sortedArgs, 5), 3, message('sortedLastIndex'));
+ assert.deepEqual(_.sortedLastIndexOf(sortedArgs, 1), 0, message('sortedLastIndexOf'));
+ assert.deepEqual(_.tail(args, 4), [null, [3], null, 5], message('tail'));
+ assert.deepEqual(_.take(args, 2), [1, null], message('take'));
+ assert.deepEqual(_.takeRight(args, 1), [5], message('takeRight'));
+ assert.deepEqual(_.takeRightWhile(args, identity), [5], message('takeRightWhile'));
+ assert.deepEqual(_.takeWhile(args, identity), [1], message('takeWhile'));
+ assert.deepEqual(_.uniq(args), [1, null, [3], 5], message('uniq'));
+ assert.deepEqual(_.without(args, null), [1, [3], 5], message('without'));
+ assert.deepEqual(_.zip(args, args), [[1, 1], [null, null], [[3], [3]], [null, null], [5, 5]], message('zip'));
+ });
+
+ QUnit.test('should accept falsey primary arguments', function(assert) {
+ assert.expect(4);
+
+ function message(methodName) {
+ return '`_.' + methodName + '` should accept falsey primary arguments';
+ }
+
+ assert.deepEqual(_.difference(null, array), [], message('difference'));
+ assert.deepEqual(_.intersection(null, array), [], message('intersection'));
+ assert.deepEqual(_.union(null, array), array, message('union'));
+ assert.deepEqual(_.xor(null, array), array, message('xor'));
+ });
+
+ QUnit.test('should accept falsey secondary arguments', function(assert) {
+ assert.expect(3);
+
+ function message(methodName) {
+ return '`_.' + methodName + '` should accept falsey secondary arguments';
+ }
+
+ assert.deepEqual(_.difference(array, null), array, message('difference'));
+ assert.deepEqual(_.intersection(array, null), [], message('intersection'));
+ assert.deepEqual(_.union(array, null), array, message('union'));
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('"Strings" category methods');
+
+ (function() {
+ var stringMethods = [
+ 'camelCase',
+ 'capitalize',
+ 'escape',
+ 'kebabCase',
+ 'lowerCase',
+ 'lowerFirst',
+ 'pad',
+ 'padEnd',
+ 'padStart',
+ 'repeat',
+ 'snakeCase',
+ 'toLower',
+ 'toUpper',
+ 'trim',
+ 'trimEnd',
+ 'trimStart',
+ 'truncate',
+ 'unescape',
+ 'upperCase',
+ 'upperFirst'
+ ];
+
+ lodashStable.each(stringMethods, function(methodName) {
+ var func = _[methodName];
+
+ QUnit.test('`_.' + methodName + '` should return an empty string for empty values', function(assert) {
+ assert.expect(1);
+
+ var values = [, null, undefined, ''],
+ expected = lodashStable.map(values, alwaysEmptyString);
+
+ var actual = lodashStable.map(values, function(value, index) {
+ return index ? func(value) : func();
+ });
+
+ assert.deepEqual(actual, expected);
+ });
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.module('lodash methods');
+
+ (function() {
+ var allMethods = lodashStable.reject(_.functions(_).sort(), function(methodName) {
+ return lodashStable.startsWith(methodName, '_');
+ });
+
+ var checkFuncs = [
+ 'after',
+ 'ary',
+ 'before',
+ 'bind',
+ 'curry',
+ 'curryRight',
+ 'debounce',
+ 'defer',
+ 'delay',
+ 'flip',
+ 'flow',
+ 'flowRight',
+ 'memoize',
+ 'negate',
+ 'once',
+ 'partial',
+ 'partialRight',
+ 'rearg',
+ 'rest',
+ 'spread',
+ 'throttle',
+ 'unary'
+ ];
+
+ var noBinding = [
+ 'flip',
+ 'memoize',
+ 'negate',
+ 'once',
+ 'overArgs',
+ 'partial',
+ 'partialRight',
+ 'rearg',
+ 'rest',
+ 'spread'
+ ];
+
+ var rejectFalsey = [
+ 'tap',
+ 'thru'
+ ].concat(checkFuncs);
+
+ var returnArrays = [
+ 'at',
+ 'chunk',
+ 'compact',
+ 'difference',
+ 'drop',
+ 'filter',
+ 'flatten',
+ 'functions',
+ 'initial',
+ 'intersection',
+ 'invokeMap',
+ 'keys',
+ 'map',
+ 'orderBy',
+ 'pull',
+ 'pullAll',
+ 'pullAt',
+ 'range',
+ 'rangeRight',
+ 'reject',
+ 'remove',
+ 'shuffle',
+ 'sortBy',
+ 'tail',
+ 'take',
+ 'times',
+ 'toArray',
+ 'toPairs',
+ 'toPairsIn',
+ 'union',
+ 'uniq',
+ 'values',
+ 'without',
+ 'xor',
+ 'zip'
+ ];
+
+ var acceptFalsey = lodashStable.difference(allMethods, rejectFalsey);
+
+ QUnit.test('should accept falsey arguments', function(assert) {
+ assert.expect(308);
+
+ var emptyArrays = lodashStable.map(falsey, alwaysEmptyArray);
+
+ lodashStable.each(acceptFalsey, function(methodName) {
+ var expected = emptyArrays,
+ func = _[methodName],
+ pass = true;
+
+ var actual = lodashStable.map(falsey, function(value, index) {
+ try {
+ return index ? func(value) : func();
+ } catch (e) {
+ pass = false;
+ }
+ });
+
+ if (methodName == 'noConflict') {
+ root._ = oldDash;
+ }
+ else if (methodName == 'pull' || methodName == 'pullAll') {
+ expected = falsey;
+ }
+ if (lodashStable.includes(returnArrays, methodName) && methodName != 'sample') {
+ assert.deepEqual(actual, expected, '_.' + methodName + ' returns an array');
+ }
+ assert.ok(pass, '`_.' + methodName + '` accepts falsey arguments');
+ });
+
+ // Skip tests for missing methods of modularized builds.
+ lodashStable.each(['chain', 'noConflict', 'runInContext'], function(methodName) {
+ if (!_[methodName]) {
+ skipAssert(assert);
+ }
+ });
+ });
+
+ QUnit.test('should return an array', function(assert) {
+ assert.expect(70);
+
+ var array = [1, 2, 3];
+
+ lodashStable.each(returnArrays, function(methodName) {
+ var actual,
+ func = _[methodName];
+
+ switch (methodName) {
+ case 'invokeMap':
+ actual = func(array, 'toFixed');
+ break;
+ case 'sample':
+ actual = func(array, 1);
+ break;
+ default:
+ actual = func(array);
+ }
+ assert.ok(lodashStable.isArray(actual), '_.' + methodName + ' returns an array');
+
+ var isPull = methodName == 'pull' || methodName == 'pullAll';
+ assert.strictEqual(actual === array, isPull, '_.' + methodName + ' should ' + (isPull ? '' : 'not ') + 'return the given array');
+ });
+ });
+
+ QUnit.test('should throw an error for falsey arguments', function(assert) {
+ assert.expect(24);
+
+ lodashStable.each(rejectFalsey, function(methodName) {
+ var expected = lodashStable.map(falsey, alwaysTrue),
+ func = _[methodName];
+
+ var actual = lodashStable.map(falsey, function(value, index) {
+ var pass = !index && /^(?:backflow|compose|cond|flow(Right)?|over(?:Every|Some)?)$/.test(methodName);
+
+ try {
+ index ? func(value) : func();
+ } catch (e) {
+ pass = !pass && (e instanceof TypeError) &&
+ (!lodashStable.includes(checkFuncs, methodName) || (e.message == FUNC_ERROR_TEXT));
+ }
+ return pass;
+ });
+
+ assert.deepEqual(actual, expected, '`_.' + methodName + '` rejects falsey arguments');
+ });
+ });
+
+ QUnit.test('should not set a `this` binding', function(assert) {
+ assert.expect(30);
+
+ lodashStable.each(noBinding, function(methodName) {
+ var fn = function() { return this.a; },
+ func = _[methodName],
+ isNegate = methodName == 'negate',
+ object = { 'a': 1 },
+ expected = isNegate ? false : 1;
+
+ var wrapper = func(_.bind(fn, object));
+ assert.strictEqual(wrapper(), expected, '`_.' + methodName + '` can consume a bound function');
+
+ wrapper = _.bind(func(fn), object);
+ assert.strictEqual(wrapper(), expected, '`_.' + methodName + '` can be bound');
+
+ object.wrapper = func(fn);
+ assert.strictEqual(object.wrapper(), expected, '`_.' + methodName + '` uses the `this` of its parent object');
+ });
+ });
+
+ QUnit.test('should not contain minified method names (test production builds)', function(assert) {
+ assert.expect(1);
+
+ var shortNames = ['_', 'at', 'eq', 'gt', 'lt'];
+ assert.ok(lodashStable.every(_.functions(_), function(methodName) {
+ return methodName.length > 2 || lodashStable.includes(shortNames, methodName);
+ }));
+ });
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ QUnit.config.asyncRetries = 10;
+ QUnit.config.hidepassed = true;
+
+ if (!document) {
+ QUnit.config.noglobals = true;
+ QUnit.load();
+ }
+}.call(this));
diff --git a/views/ngXosViews/serviceGrid/src/vendor/lodash/test/underscore.html b/views/ngXosViews/serviceGrid/src/vendor/lodash/test/underscore.html
new file mode 100644
index 0000000..a3e56e8
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/lodash/test/underscore.html
@@ -0,0 +1,484 @@
+<!doctype html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+ <title>Underscore Test Suite</title>
+ <link rel="stylesheet" href="../node_modules/qunitjs/qunit/qunit.css">
+ </head>
+ <body>
+ <div id="qunit"></div>
+ <script>
+ // Avoid reporting tests to Sauce Labs when script errors occur.
+ if (location.port == '9001') {
+ window.onerror = function(message) {
+ if (window.QUnit) {
+ QUnit.config.done.length = 0;
+ }
+ global_test_results = { 'message': message };
+ };
+ }
+ </script>
+ <script src="../node_modules/qunitjs/qunit/qunit.js"></script>
+ <script src="../node_modules/qunit-extras/qunit-extras.js"></script>
+ <script src="../node_modules/jquery/dist/jquery.js"></script>
+ <script src="../node_modules/platform/platform.js"></script>
+ <script src="./asset/test-ui.js"></script>
+ <script src="../lodash.js"></script>
+ <script>
+ QUnit.config.asyncRetries = 10;
+ QUnit.config.hidepassed = true;
+ QUnit.config.excused = {
+ 'Arrays': {
+ 'chunk': [
+ 'defaults to empty array (chunk size 0)'
+ ],
+ 'difference': [
+ 'can perform an OO-style difference'
+ ],
+ 'drop': [
+ 'is an alias for rest'
+ ],
+ 'first': [
+ 'returns an empty array when n <= 0 (0 case)',
+ 'returns an empty array when n <= 0 (negative case)',
+ 'can fetch the first n elements',
+ 'returns the whole array if n > length'
+ ],
+ 'findIndex': [
+ 'called with context'
+ ],
+ 'findLastIndex': [
+ 'called with context'
+ ],
+ 'flatten': [
+ 'supports empty arrays',
+ 'can flatten nested arrays',
+ 'works on an arguments object',
+ 'can handle very deep arrays'
+ ],
+ 'head': [
+ 'is an alias for first'
+ ],
+ 'indexOf': [
+ "sorted indexOf doesn't uses binary search",
+ '0'
+ ],
+ 'initial': [
+ 'returns all but the last n elements',
+ 'returns an empty array when n > length',
+ 'works on an arguments object'
+ ],
+ 'intersection': [
+ 'can perform an OO-style intersection'
+ ],
+ 'last': [
+ 'returns an empty array when n <= 0 (0 case)',
+ 'returns an empty array when n <= 0 (negative case)',
+ 'can fetch the last n elements',
+ 'returns the whole array if n > length'
+ ],
+ 'lastIndexOf': [
+ 'should treat falsey `fromIndex` values, except `0` and `NaN`, as `array.length`',
+ 'should treat non-number `fromIndex` values as `array.length`',
+ '[0,-1,-1]'
+ ],
+ 'object': [
+ 'an array of pairs zipped together into an object',
+ 'an object converted to pairs and back to an object'
+ ],
+ 'range': [
+ 'range with two arguments a & b, b<a generates an empty array'
+ ],
+ 'rest': [
+ 'returns the whole array when index is 0',
+ 'returns elements starting at the given index',
+ 'works on an arguments object'
+ ],
+ 'sortedIndex': [
+ '2',
+ '3'
+ ],
+ 'tail': [
+ 'is an alias for rest'
+ ],
+ 'take': [
+ 'is an alias for first'
+ ],
+ 'uniq': [
+ 'uses the result of `iterator` for uniqueness comparisons (unsorted case)',
+ '`sorted` argument defaults to false when omitted',
+ 'when `iterator` is a string, uses that key for comparisons (unsorted case)',
+ 'uses the result of `iterator` for uniqueness comparisons (sorted case)',
+ 'when `iterator` is a string, uses that key for comparisons (sorted case)',
+ 'can use falsey pluck like iterator'
+ ],
+ 'union': [
+ 'can perform an OO-style union'
+ ]
+ },
+ 'Chaining': {
+ 'pop': true,
+ 'shift': true,
+ 'splice': true,
+ 'reverse/concat/unshift/pop/map': [
+ 'can chain together array functions.'
+ ]
+ },
+ 'Collections': {
+ 'lookupIterator with contexts': true,
+ 'Iterating objects with sketchy length properties': true,
+ 'Resistant to collection length and properties changing while iterating': true,
+ 'countBy': [
+ 'true'
+ ],
+ 'each': [
+ 'context object property accessed'
+ ],
+ 'every': [
+ 'Can be called with object',
+ 'Died on test #15',
+ 'context works'
+ ],
+ 'filter': [
+ 'given context',
+ '[{"a":1,"b":2},{"a":1,"b":3},{"a":1,"b":4}]',
+ '[{"a":1,"b":2},{"a":2,"b":2}]',
+ 'Empty object accepts all items',
+ 'OO-filter'
+ ],
+ 'find': [
+ '{"a":1,"b":4}',
+ 'undefined when not found',
+ 'undefined when searching empty list',
+ 'works on objects',
+ 'undefined',
+ 'called with context'
+ ],
+ 'findWhere': [
+ 'checks properties given function'
+ ],
+ 'groupBy': [
+ 'true'
+ ],
+ 'includes': [
+ "doesn't delegate to binary search"
+ ],
+ 'invoke': [
+ 'handles null & undefined'
+ ],
+ 'map': [
+ 'tripled numbers with context',
+ 'OO-style doubled numbers'
+ ],
+ 'max': [
+ 'can handle null/undefined',
+ 'can perform a computation-based max',
+ 'Maximum value of an empty object',
+ 'Maximum value of an empty array',
+ 'Maximum value of a non-numeric collection',
+ 'Finds correct max in array starting with num and containing a NaN',
+ 'Finds correct max in array starting with NaN',
+ 'Respects iterator return value of -Infinity',
+ 'String keys use property iterator',
+ 'Iterator context',
+ 'Lookup falsy iterator'
+ ],
+ 'min': [
+ 'can handle null/undefined',
+ 'can perform a computation-based min',
+ 'Minimum value of an empty object',
+ 'Minimum value of an empty array',
+ 'Minimum value of a non-numeric collection',
+ 'Finds correct min in array starting with NaN',
+ 'Respects iterator return value of Infinity',
+ 'String keys use property iterator',
+ 'Iterator context',
+ 'Lookup falsy iterator'
+ ],
+ 'partition': [
+ 'can reference the array index',
+ 'Died on test #8',
+ 'partition takes a context argument',
+ 'function(a){[code]}'
+ ],
+ 'pluck': [
+ '[1]'
+ ],
+ 'reduce': [
+ 'can reduce with a context object'
+ ],
+ 'reject': [
+ 'Returns empty list given empty array'
+ ],
+ 'sample': [
+ 'behaves correctly on negative n',
+ 'Died on test #3'
+ ],
+ 'some': [
+ 'Can be called with object',
+ 'Died on test #17',
+ 'context works'
+ ],
+ 'where': [
+ 'checks properties given function'
+ ],
+ 'Can use various collection methods on NodeLists': [
+ '<span id="id2"></span>',
+ '<span id="id1"></span>'
+ ]
+ },
+ 'Functions': {
+ 'debounce asap': true,
+ 'debounce asap cancel': true,
+ 'debounce after system time is set backwards': true,
+ 'debounce asap recursively': true,
+ 'throttle repeatedly with results': true,
+ 'more throttle does not trigger leading call when leading is set to false': true,
+ 'throttle does not trigger trailing call when trailing is set to false': true,
+ 'before': [
+ 'stores a memo to the last value',
+ 'provides context'
+ ],
+ 'bind': [
+ 'Died on test #2'
+ ],
+ 'bindAll': [
+ 'throws an error for bindAll with no functions named'
+ ],
+ 'memoize': [
+ '{"bar":"BAR","foo":"FOO"}',
+ 'Died on test #8'
+ ],
+ 'partial':[
+ 'can partially apply with placeholders',
+ 'accepts more arguments than the number of placeholders',
+ 'accepts fewer arguments than the number of placeholders',
+ 'unfilled placeholders are undefined',
+ 'keeps prototype',
+ 'allows the placeholder to be swapped out'
+ ]
+ },
+ 'Objects': {
+ '#1929 Typed Array constructors are functions': true,
+ 'allKeys': [
+ 'is not fooled by sparse arrays; see issue #95',
+ 'is not fooled by sparse arrays with additional properties',
+ '[]'
+ ],
+ 'defaults': [
+ 'defaults skips nulls',
+ 'defaults skips undefined'
+ ],
+ 'extend': [
+ 'extending null results in null',
+ 'extending undefined results in undefined'
+ ],
+ 'extendOwn': [
+ 'extending non-objects results in returning the non-object value',
+ 'extending undefined results in undefined'
+ ],
+ 'functions': [
+ 'also looks up functions on the prototype'
+ ],
+ 'isEqual': [
+ '`0` is not equal to `-0`',
+ 'Commutative equality is implemented for `0` and `-0`',
+ '`new Number(0)` and `-0` are not equal',
+ 'Commutative equality is implemented for `new Number(0)` and `-0`',
+ 'false'
+ ],
+ 'isFinite': [
+ 'Numeric strings are numbers',
+ 'Number instances can be finite'
+ ],
+ 'isMatch': [
+ 'doesnt falsey match constructor on undefined/null'
+ ],
+ 'isSet': [
+ 'Died on test #9'
+ ],
+ 'findKey': [
+ 'called with context'
+ ],
+ 'keys': [
+ 'is not fooled by sparse arrays; see issue #95',
+ '[]'
+ ],
+ 'mapObject': [
+ 'keep context',
+ 'called with context',
+ 'mapValue identity'
+ ],
+ 'matcher': [
+ 'null matches null',
+ 'treats primitives as empty'
+ ],
+ 'omit': [
+ 'can accept a predicate',
+ 'function is given context'
+ ],
+ 'pick': [
+ 'can accept a predicate and context',
+ 'function is given context'
+ ]
+ },
+ 'Utility': {
+ 'noConflict (node vm)': true,
+ 'now': [
+ 'Produces the correct time in milliseconds'
+ ],
+ 'times': [
+ 'works as a wrapper'
+ ]
+ }
+ };
+
+ var mixinPrereqs = (function() {
+ var aliasToReal = {
+ 'all': 'every',
+ 'allKeys': 'keysIn',
+ 'any': 'some',
+ 'collect': 'map',
+ 'compose': 'flowRight',
+ 'contains': 'includes',
+ 'detect': 'find',
+ 'extendOwn': 'assign',
+ 'findWhere': 'find',
+ 'foldl': 'reduce',
+ 'foldr': 'reduceRight',
+ 'include': 'includes',
+ 'indexBy': 'keyBy',
+ 'inject': 'reduce',
+ 'invoke': 'invokeMap',
+ 'mapObject': 'mapValues',
+ 'matcher': 'matches',
+ 'methods': 'functions',
+ 'object': 'zipObject',
+ 'pairs': 'toPairs',
+ 'pluck': 'map',
+ 'restParam': 'restArgs',
+ 'select': 'filter',
+ 'unique': 'uniq',
+ 'where': 'filter'
+ };
+
+ var keyMap = {
+ 'rest': 'tail',
+ 'restArgs': 'rest'
+ };
+
+ var lodash = _.noConflict();
+
+ return function(_) {
+ lodash.defaultsDeep(_, { 'templateSettings': lodash.templateSettings });
+ lodash.mixin(_, lodash.pick(lodash, lodash.difference(lodash.functions(lodash), lodash.functions(_))));
+
+ lodash.forOwn(keyMap, function(realName, otherName) {
+ _[otherName] = lodash[realName];
+ _.prototype[otherName] = lodash.prototype[realName];
+ });
+
+ lodash.forOwn(aliasToReal, function(realName, alias) {
+ _[alias] = _[realName];
+ _.prototype[alias] = _.prototype[realName];
+ });
+ };
+ }());
+
+ // Only excuse in Sauce Labs.
+ if (!ui.isSauceLabs) {
+ delete QUnit.config.excused.Functions['throttle does not trigger trailing call when trailing is set to false'];
+ delete QUnit.config.excused.Utility.now;
+ }
+ // Load prerequisite scripts.
+ document.write(ui.urlParams.loader == 'none'
+ ? '<script src="' + ui.buildPath + '"><\/script>'
+ : '<script data-dojo-config="async:1" src="' + ui.loaderPath + '"><\/script>'
+ );
+ </script>
+ <script>
+ if (ui.urlParams.loader == 'none') {
+ mixinPrereqs(_);
+ document.write([
+ '<script src="../vendor/underscore/test/collections.js"><\/script>',
+ '<script src="../vendor/underscore/test/arrays.js"><\/script>',
+ '<script src="../vendor/underscore/test/functions.js"><\/script>',
+ '<script src="../vendor/underscore/test/objects.js"><\/script>',
+ '<script src="../vendor/underscore/test/cross-document.js"><\/script>',
+ '<script src="../vendor/underscore/test/utility.js"><\/script>',
+ '<script src="../vendor/underscore/test/chaining.js"><\/script>'
+ ].join('\n'));
+ }
+ </script>
+ <script>
+ (function() {
+ if (window.curl) {
+ curl.config({ 'apiName': 'require' });
+ }
+ if (!window.require) {
+ return;
+ }
+ // Wrap to work around tests assuming Node `require` use.
+ require = (function(func) {
+ return function() {
+ return arguments[0] === '..' ? window._ : func.apply(null, arguments);
+ };
+ }(require));
+
+ var reBasename = /[\w.-]+$/,
+ basePath = ('//' + location.host + location.pathname.replace(reBasename, '')).replace(/\btest\/$/, ''),
+ modulePath = ui.buildPath.replace(/\.js$/, ''),
+ locationPath = modulePath.replace(reBasename, '').replace(/^\/|\/$/g, ''),
+ moduleId = /\bunderscore\b/i.test(ui.buildPath) ? 'underscore' : 'lodash',
+ moduleMain = modulePath.match(reBasename)[0],
+ uid = +new Date;
+
+ function getConfig() {
+ var result = {
+ 'baseUrl': './',
+ 'urlArgs': 't=' + uid++,
+ 'waitSeconds': 0,
+ 'paths': {},
+ 'packages': [{
+ 'name': 'test',
+ 'location': '../vendor/underscore/test',
+ 'config': {
+ // Work around no global being exported.
+ 'exports': 'QUnit',
+ 'loader': 'curl/loader/legacy'
+ }
+ }]
+ };
+
+ if (ui.isModularize) {
+ result.packages.push({
+ 'name': moduleId,
+ 'location': locationPath,
+ 'main': moduleMain
+ });
+ } else {
+ result.paths[moduleId] = modulePath;
+ }
+ return result;
+ }
+
+ QUnit.config.autostart = false;
+
+ require(getConfig(), [moduleId], function(lodash) {
+ mixinPrereqs(lodash);
+ require(getConfig(), [
+ 'test/collections',
+ 'test/arrays',
+ 'test/functions',
+ 'test/objects',
+ 'test/cross-document',
+ 'test/utility',
+ 'test/chaining'
+ ], function() {
+ QUnit.start();
+ });
+ });
+ }());
+ </script>
+ </body>
+</html>
diff --git a/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/backbone/LICENSE b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/backbone/LICENSE
new file mode 100644
index 0000000..02c89b2
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/backbone/LICENSE
@@ -0,0 +1,22 @@
+Copyright (c) 2010-2016 Jeremy Ashkenas, DocumentCloud
+
+Permission is hereby granted, free of charge, to any person
+obtaining a copy of this software and associated documentation
+files (the "Software"), to deal in the Software without
+restriction, including without limitation the rights to use,
+copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following
+conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
diff --git a/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/backbone/backbone.js b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/backbone/backbone.js
new file mode 100644
index 0000000..55ccb22
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/backbone/backbone.js
@@ -0,0 +1,1920 @@
+// Backbone.js 1.3.3
+
+// (c) 2010-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+// Backbone may be freely distributed under the MIT license.
+// For all details and documentation:
+// http://backbonejs.org
+
+(function(factory) {
+
+ // Establish the root object, `window` (`self`) in the browser, or `global` on the server.
+ // We use `self` instead of `window` for `WebWorker` support.
+ var root = (typeof self == 'object' && self.self === self && self) ||
+ (typeof global == 'object' && global.global === global && global);
+
+ // Set up Backbone appropriately for the environment. Start with AMD.
+ if (typeof define === 'function' && define.amd) {
+ define(['underscore', 'jquery', 'exports'], function(_, $, exports) {
+ // Export global even in AMD case in case this script is loaded with
+ // others that may still expect a global Backbone.
+ root.Backbone = factory(root, exports, _, $);
+ });
+
+ // Next for Node.js or CommonJS. jQuery may not be needed as a module.
+ } else if (typeof exports !== 'undefined') {
+ var _ = require('underscore'), $;
+ try { $ = require('jquery'); } catch (e) {}
+ factory(root, exports, _, $);
+
+ // Finally, as a browser global.
+ } else {
+ root.Backbone = factory(root, {}, root._, (root.jQuery || root.Zepto || root.ender || root.$));
+ }
+
+})(function(root, Backbone, _, $) {
+
+ // Initial Setup
+ // -------------
+
+ // Save the previous value of the `Backbone` variable, so that it can be
+ // restored later on, if `noConflict` is used.
+ var previousBackbone = root.Backbone;
+
+ // Create a local reference to a common array method we'll want to use later.
+ var slice = Array.prototype.slice;
+
+ // Current version of the library. Keep in sync with `package.json`.
+ Backbone.VERSION = '1.3.3';
+
+ // For Backbone's purposes, jQuery, Zepto, Ender, or My Library (kidding) owns
+ // the `$` variable.
+ Backbone.$ = $;
+
+ // Runs Backbone.js in *noConflict* mode, returning the `Backbone` variable
+ // to its previous owner. Returns a reference to this Backbone object.
+ Backbone.noConflict = function() {
+ root.Backbone = previousBackbone;
+ return this;
+ };
+
+ // Turn on `emulateHTTP` to support legacy HTTP servers. Setting this option
+ // will fake `"PATCH"`, `"PUT"` and `"DELETE"` requests via the `_method` parameter and
+ // set a `X-Http-Method-Override` header.
+ Backbone.emulateHTTP = false;
+
+ // Turn on `emulateJSON` to support legacy servers that can't deal with direct
+ // `application/json` requests ... this will encode the body as
+ // `application/x-www-form-urlencoded` instead and will send the model in a
+ // form param named `model`.
+ Backbone.emulateJSON = false;
+
+ // Proxy Backbone class methods to Underscore functions, wrapping the model's
+ // `attributes` object or collection's `models` array behind the scenes.
+ //
+ // collection.filter(function(model) { return model.get('age') > 10 });
+ // collection.each(this.addView);
+ //
+ // `Function#apply` can be slow so we use the method's arg count, if we know it.
+ var addMethod = function(length, method, attribute) {
+ switch (length) {
+ case 1: return function() {
+ return _[method](this[attribute]);
+ };
+ case 2: return function(value) {
+ return _[method](this[attribute], value);
+ };
+ case 3: return function(iteratee, context) {
+ return _[method](this[attribute], cb(iteratee, this), context);
+ };
+ case 4: return function(iteratee, defaultVal, context) {
+ return _[method](this[attribute], cb(iteratee, this), defaultVal, context);
+ };
+ default: return function() {
+ var args = slice.call(arguments);
+ args.unshift(this[attribute]);
+ return _[method].apply(_, args);
+ };
+ }
+ };
+ var addUnderscoreMethods = function(Class, methods, attribute) {
+ _.each(methods, function(length, method) {
+ if (_[method]) Class.prototype[method] = addMethod(length, method, attribute);
+ });
+ };
+
+ // Support `collection.sortBy('attr')` and `collection.findWhere({id: 1})`.
+ var cb = function(iteratee, instance) {
+ if (_.isFunction(iteratee)) return iteratee;
+ if (_.isObject(iteratee) && !instance._isModel(iteratee)) return modelMatcher(iteratee);
+ if (_.isString(iteratee)) return function(model) { return model.get(iteratee); };
+ return iteratee;
+ };
+ var modelMatcher = function(attrs) {
+ var matcher = _.matches(attrs);
+ return function(model) {
+ return matcher(model.attributes);
+ };
+ };
+
+ // Backbone.Events
+ // ---------------
+
+ // A module that can be mixed in to *any object* in order to provide it with
+ // a custom event channel. You may bind a callback to an event with `on` or
+ // remove with `off`; `trigger`-ing an event fires all callbacks in
+ // succession.
+ //
+ // var object = {};
+ // _.extend(object, Backbone.Events);
+ // object.on('expand', function(){ alert('expanded'); });
+ // object.trigger('expand');
+ //
+ var Events = Backbone.Events = {};
+
+ // Regular expression used to split event strings.
+ var eventSplitter = /\s+/;
+
+ // Iterates over the standard `event, callback` (as well as the fancy multiple
+ // space-separated events `"change blur", callback` and jQuery-style event
+ // maps `{event: callback}`).
+ var eventsApi = function(iteratee, events, name, callback, opts) {
+ var i = 0, names;
+ if (name && typeof name === 'object') {
+ // Handle event maps.
+ if (callback !== void 0 && 'context' in opts && opts.context === void 0) opts.context = callback;
+ for (names = _.keys(name); i < names.length ; i++) {
+ events = eventsApi(iteratee, events, names[i], name[names[i]], opts);
+ }
+ } else if (name && eventSplitter.test(name)) {
+ // Handle space-separated event names by delegating them individually.
+ for (names = name.split(eventSplitter); i < names.length; i++) {
+ events = iteratee(events, names[i], callback, opts);
+ }
+ } else {
+ // Finally, standard events.
+ events = iteratee(events, name, callback, opts);
+ }
+ return events;
+ };
+
+ // Bind an event to a `callback` function. Passing `"all"` will bind
+ // the callback to all events fired.
+ Events.on = function(name, callback, context) {
+ return internalOn(this, name, callback, context);
+ };
+
+ // Guard the `listening` argument from the public API.
+ var internalOn = function(obj, name, callback, context, listening) {
+ obj._events = eventsApi(onApi, obj._events || {}, name, callback, {
+ context: context,
+ ctx: obj,
+ listening: listening
+ });
+
+ if (listening) {
+ var listeners = obj._listeners || (obj._listeners = {});
+ listeners[listening.id] = listening;
+ }
+
+ return obj;
+ };
+
+ // Inversion-of-control versions of `on`. Tell *this* object to listen to
+ // an event in another object... keeping track of what it's listening to
+ // for easier unbinding later.
+ Events.listenTo = function(obj, name, callback) {
+ if (!obj) return this;
+ var id = obj._listenId || (obj._listenId = _.uniqueId('l'));
+ var listeningTo = this._listeningTo || (this._listeningTo = {});
+ var listening = listeningTo[id];
+
+ // This object is not listening to any other events on `obj` yet.
+ // Setup the necessary references to track the listening callbacks.
+ if (!listening) {
+ var thisId = this._listenId || (this._listenId = _.uniqueId('l'));
+ listening = listeningTo[id] = {obj: obj, objId: id, id: thisId, listeningTo: listeningTo, count: 0};
+ }
+
+ // Bind callbacks on obj, and keep track of them on listening.
+ internalOn(obj, name, callback, this, listening);
+ return this;
+ };
+
+ // The reducing API that adds a callback to the `events` object.
+ var onApi = function(events, name, callback, options) {
+ if (callback) {
+ var handlers = events[name] || (events[name] = []);
+ var context = options.context, ctx = options.ctx, listening = options.listening;
+ if (listening) listening.count++;
+
+ handlers.push({callback: callback, context: context, ctx: context || ctx, listening: listening});
+ }
+ return events;
+ };
+
+ // Remove one or many callbacks. If `context` is null, removes all
+ // callbacks with that function. If `callback` is null, removes all
+ // callbacks for the event. If `name` is null, removes all bound
+ // callbacks for all events.
+ Events.off = function(name, callback, context) {
+ if (!this._events) return this;
+ this._events = eventsApi(offApi, this._events, name, callback, {
+ context: context,
+ listeners: this._listeners
+ });
+ return this;
+ };
+
+ // Tell this object to stop listening to either specific events ... or
+ // to every object it's currently listening to.
+ Events.stopListening = function(obj, name, callback) {
+ var listeningTo = this._listeningTo;
+ if (!listeningTo) return this;
+
+ var ids = obj ? [obj._listenId] : _.keys(listeningTo);
+
+ for (var i = 0; i < ids.length; i++) {
+ var listening = listeningTo[ids[i]];
+
+ // If listening doesn't exist, this object is not currently
+ // listening to obj. Break out early.
+ if (!listening) break;
+
+ listening.obj.off(name, callback, this);
+ }
+
+ return this;
+ };
+
+ // The reducing API that removes a callback from the `events` object.
+ var offApi = function(events, name, callback, options) {
+ if (!events) return;
+
+ var i = 0, listening;
+ var context = options.context, listeners = options.listeners;
+
+ // Delete all events listeners and "drop" events.
+ if (!name && !callback && !context) {
+ var ids = _.keys(listeners);
+ for (; i < ids.length; i++) {
+ listening = listeners[ids[i]];
+ delete listeners[listening.id];
+ delete listening.listeningTo[listening.objId];
+ }
+ return;
+ }
+
+ var names = name ? [name] : _.keys(events);
+ for (; i < names.length; i++) {
+ name = names[i];
+ var handlers = events[name];
+
+ // Bail out if there are no events stored.
+ if (!handlers) break;
+
+ // Replace events if there are any remaining. Otherwise, clean up.
+ var remaining = [];
+ for (var j = 0; j < handlers.length; j++) {
+ var handler = handlers[j];
+ if (
+ callback && callback !== handler.callback &&
+ callback !== handler.callback._callback ||
+ context && context !== handler.context
+ ) {
+ remaining.push(handler);
+ } else {
+ listening = handler.listening;
+ if (listening && --listening.count === 0) {
+ delete listeners[listening.id];
+ delete listening.listeningTo[listening.objId];
+ }
+ }
+ }
+
+ // Update tail event if the list has any events. Otherwise, clean up.
+ if (remaining.length) {
+ events[name] = remaining;
+ } else {
+ delete events[name];
+ }
+ }
+ return events;
+ };
+
+ // Bind an event to only be triggered a single time. After the first time
+ // the callback is invoked, its listener will be removed. If multiple events
+ // are passed in using the space-separated syntax, the handler will fire
+ // once for each event, not once for a combination of all events.
+ Events.once = function(name, callback, context) {
+ // Map the event into a `{event: once}` object.
+ var events = eventsApi(onceMap, {}, name, callback, _.bind(this.off, this));
+ if (typeof name === 'string' && context == null) callback = void 0;
+ return this.on(events, callback, context);
+ };
+
+ // Inversion-of-control versions of `once`.
+ Events.listenToOnce = function(obj, name, callback) {
+ // Map the event into a `{event: once}` object.
+ var events = eventsApi(onceMap, {}, name, callback, _.bind(this.stopListening, this, obj));
+ return this.listenTo(obj, events);
+ };
+
+ // Reduces the event callbacks into a map of `{event: onceWrapper}`.
+ // `offer` unbinds the `onceWrapper` after it has been called.
+ var onceMap = function(map, name, callback, offer) {
+ if (callback) {
+ var once = map[name] = _.once(function() {
+ offer(name, once);
+ callback.apply(this, arguments);
+ });
+ once._callback = callback;
+ }
+ return map;
+ };
+
+ // Trigger one or many events, firing all bound callbacks. Callbacks are
+ // passed the same arguments as `trigger` is, apart from the event name
+ // (unless you're listening on `"all"`, which will cause your callback to
+ // receive the true name of the event as the first argument).
+ Events.trigger = function(name) {
+ if (!this._events) return this;
+
+ var length = Math.max(0, arguments.length - 1);
+ var args = Array(length);
+ for (var i = 0; i < length; i++) args[i] = arguments[i + 1];
+
+ eventsApi(triggerApi, this._events, name, void 0, args);
+ return this;
+ };
+
+ // Handles triggering the appropriate event callbacks.
+ var triggerApi = function(objEvents, name, callback, args) {
+ if (objEvents) {
+ var events = objEvents[name];
+ var allEvents = objEvents.all;
+ if (events && allEvents) allEvents = allEvents.slice();
+ if (events) triggerEvents(events, args);
+ if (allEvents) triggerEvents(allEvents, [name].concat(args));
+ }
+ return objEvents;
+ };
+
+ // A difficult-to-believe, but optimized internal dispatch function for
+ // triggering events. Tries to keep the usual cases speedy (most internal
+ // Backbone events have 3 arguments).
+ var triggerEvents = function(events, args) {
+ var ev, i = -1, l = events.length, a1 = args[0], a2 = args[1], a3 = args[2];
+ switch (args.length) {
+ case 0: while (++i < l) (ev = events[i]).callback.call(ev.ctx); return;
+ case 1: while (++i < l) (ev = events[i]).callback.call(ev.ctx, a1); return;
+ case 2: while (++i < l) (ev = events[i]).callback.call(ev.ctx, a1, a2); return;
+ case 3: while (++i < l) (ev = events[i]).callback.call(ev.ctx, a1, a2, a3); return;
+ default: while (++i < l) (ev = events[i]).callback.apply(ev.ctx, args); return;
+ }
+ };
+
+ // Aliases for backwards compatibility.
+ Events.bind = Events.on;
+ Events.unbind = Events.off;
+
+ // Allow the `Backbone` object to serve as a global event bus, for folks who
+ // want global "pubsub" in a convenient place.
+ _.extend(Backbone, Events);
+
+ // Backbone.Model
+ // --------------
+
+ // Backbone **Models** are the basic data object in the framework --
+ // frequently representing a row in a table in a database on your server.
+ // A discrete chunk of data and a bunch of useful, related methods for
+ // performing computations and transformations on that data.
+
+ // Create a new model with the specified attributes. A client id (`cid`)
+ // is automatically generated and assigned for you.
+ var Model = Backbone.Model = function(attributes, options) {
+ var attrs = attributes || {};
+ options || (options = {});
+ this.cid = _.uniqueId(this.cidPrefix);
+ this.attributes = {};
+ if (options.collection) this.collection = options.collection;
+ if (options.parse) attrs = this.parse(attrs, options) || {};
+ var defaults = _.result(this, 'defaults');
+ attrs = _.defaults(_.extend({}, defaults, attrs), defaults);
+ this.set(attrs, options);
+ this.changed = {};
+ this.initialize.apply(this, arguments);
+ };
+
+ // Attach all inheritable methods to the Model prototype.
+ _.extend(Model.prototype, Events, {
+
+ // A hash of attributes whose current and previous value differ.
+ changed: null,
+
+ // The value returned during the last failed validation.
+ validationError: null,
+
+ // The default name for the JSON `id` attribute is `"id"`. MongoDB and
+ // CouchDB users may want to set this to `"_id"`.
+ idAttribute: 'id',
+
+ // The prefix is used to create the client id which is used to identify models locally.
+ // You may want to override this if you're experiencing name clashes with model ids.
+ cidPrefix: 'c',
+
+ // Initialize is an empty function by default. Override it with your own
+ // initialization logic.
+ initialize: function(){},
+
+ // Return a copy of the model's `attributes` object.
+ toJSON: function(options) {
+ return _.clone(this.attributes);
+ },
+
+ // Proxy `Backbone.sync` by default -- but override this if you need
+ // custom syncing semantics for *this* particular model.
+ sync: function() {
+ return Backbone.sync.apply(this, arguments);
+ },
+
+ // Get the value of an attribute.
+ get: function(attr) {
+ return this.attributes[attr];
+ },
+
+ // Get the HTML-escaped value of an attribute.
+ escape: function(attr) {
+ return _.escape(this.get(attr));
+ },
+
+ // Returns `true` if the attribute contains a value that is not null
+ // or undefined.
+ has: function(attr) {
+ return this.get(attr) != null;
+ },
+
+ // Special-cased proxy to underscore's `_.matches` method.
+ matches: function(attrs) {
+ return !!_.iteratee(attrs, this)(this.attributes);
+ },
+
+ // Set a hash of model attributes on the object, firing `"change"`. This is
+ // the core primitive operation of a model, updating the data and notifying
+ // anyone who needs to know about the change in state. The heart of the beast.
+ set: function(key, val, options) {
+ if (key == null) return this;
+
+ // Handle both `"key", value` and `{key: value}` -style arguments.
+ var attrs;
+ if (typeof key === 'object') {
+ attrs = key;
+ options = val;
+ } else {
+ (attrs = {})[key] = val;
+ }
+
+ options || (options = {});
+
+ // Run validation.
+ if (!this._validate(attrs, options)) return false;
+
+ // Extract attributes and options.
+ var unset = options.unset;
+ var silent = options.silent;
+ var changes = [];
+ var changing = this._changing;
+ this._changing = true;
+
+ if (!changing) {
+ this._previousAttributes = _.clone(this.attributes);
+ this.changed = {};
+ }
+
+ var current = this.attributes;
+ var changed = this.changed;
+ var prev = this._previousAttributes;
+
+ // For each `set` attribute, update or delete the current value.
+ for (var attr in attrs) {
+ val = attrs[attr];
+ if (!_.isEqual(current[attr], val)) changes.push(attr);
+ if (!_.isEqual(prev[attr], val)) {
+ changed[attr] = val;
+ } else {
+ delete changed[attr];
+ }
+ unset ? delete current[attr] : current[attr] = val;
+ }
+
+ // Update the `id`.
+ if (this.idAttribute in attrs) this.id = this.get(this.idAttribute);
+
+ // Trigger all relevant attribute changes.
+ if (!silent) {
+ if (changes.length) this._pending = options;
+ for (var i = 0; i < changes.length; i++) {
+ this.trigger('change:' + changes[i], this, current[changes[i]], options);
+ }
+ }
+
+ // You might be wondering why there's a `while` loop here. Changes can
+ // be recursively nested within `"change"` events.
+ if (changing) return this;
+ if (!silent) {
+ while (this._pending) {
+ options = this._pending;
+ this._pending = false;
+ this.trigger('change', this, options);
+ }
+ }
+ this._pending = false;
+ this._changing = false;
+ return this;
+ },
+
+ // Remove an attribute from the model, firing `"change"`. `unset` is a noop
+ // if the attribute doesn't exist.
+ unset: function(attr, options) {
+ return this.set(attr, void 0, _.extend({}, options, {unset: true}));
+ },
+
+ // Clear all attributes on the model, firing `"change"`.
+ clear: function(options) {
+ var attrs = {};
+ for (var key in this.attributes) attrs[key] = void 0;
+ return this.set(attrs, _.extend({}, options, {unset: true}));
+ },
+
+ // Determine if the model has changed since the last `"change"` event.
+ // If you specify an attribute name, determine if that attribute has changed.
+ hasChanged: function(attr) {
+ if (attr == null) return !_.isEmpty(this.changed);
+ return _.has(this.changed, attr);
+ },
+
+ // Return an object containing all the attributes that have changed, or
+ // false if there are no changed attributes. Useful for determining what
+ // parts of a view need to be updated and/or what attributes need to be
+ // persisted to the server. Unset attributes will be set to undefined.
+ // You can also pass an attributes object to diff against the model,
+ // determining if there *would be* a change.
+ changedAttributes: function(diff) {
+ if (!diff) return this.hasChanged() ? _.clone(this.changed) : false;
+ var old = this._changing ? this._previousAttributes : this.attributes;
+ var changed = {};
+ for (var attr in diff) {
+ var val = diff[attr];
+ if (_.isEqual(old[attr], val)) continue;
+ changed[attr] = val;
+ }
+ return _.size(changed) ? changed : false;
+ },
+
+ // Get the previous value of an attribute, recorded at the time the last
+ // `"change"` event was fired.
+ previous: function(attr) {
+ if (attr == null || !this._previousAttributes) return null;
+ return this._previousAttributes[attr];
+ },
+
+ // Get all of the attributes of the model at the time of the previous
+ // `"change"` event.
+ previousAttributes: function() {
+ return _.clone(this._previousAttributes);
+ },
+
+ // Fetch the model from the server, merging the response with the model's
+ // local attributes. Any changed attributes will trigger a "change" event.
+ fetch: function(options) {
+ options = _.extend({parse: true}, options);
+ var model = this;
+ var success = options.success;
+ options.success = function(resp) {
+ var serverAttrs = options.parse ? model.parse(resp, options) : resp;
+ if (!model.set(serverAttrs, options)) return false;
+ if (success) success.call(options.context, model, resp, options);
+ model.trigger('sync', model, resp, options);
+ };
+ wrapError(this, options);
+ return this.sync('read', this, options);
+ },
+
+ // Set a hash of model attributes, and sync the model to the server.
+ // If the server returns an attributes hash that differs, the model's
+ // state will be `set` again.
+ save: function(key, val, options) {
+ // Handle both `"key", value` and `{key: value}` -style arguments.
+ var attrs;
+ if (key == null || typeof key === 'object') {
+ attrs = key;
+ options = val;
+ } else {
+ (attrs = {})[key] = val;
+ }
+
+ options = _.extend({validate: true, parse: true}, options);
+ var wait = options.wait;
+
+ // If we're not waiting and attributes exist, save acts as
+ // `set(attr).save(null, opts)` with validation. Otherwise, check if
+ // the model will be valid when the attributes, if any, are set.
+ if (attrs && !wait) {
+ if (!this.set(attrs, options)) return false;
+ } else if (!this._validate(attrs, options)) {
+ return false;
+ }
+
+ // After a successful server-side save, the client is (optionally)
+ // updated with the server-side state.
+ var model = this;
+ var success = options.success;
+ var attributes = this.attributes;
+ options.success = function(resp) {
+ // Ensure attributes are restored during synchronous saves.
+ model.attributes = attributes;
+ var serverAttrs = options.parse ? model.parse(resp, options) : resp;
+ if (wait) serverAttrs = _.extend({}, attrs, serverAttrs);
+ if (serverAttrs && !model.set(serverAttrs, options)) return false;
+ if (success) success.call(options.context, model, resp, options);
+ model.trigger('sync', model, resp, options);
+ };
+ wrapError(this, options);
+
+ // Set temporary attributes if `{wait: true}` to properly find new ids.
+ if (attrs && wait) this.attributes = _.extend({}, attributes, attrs);
+
+ var method = this.isNew() ? 'create' : (options.patch ? 'patch' : 'update');
+ if (method === 'patch' && !options.attrs) options.attrs = attrs;
+ var xhr = this.sync(method, this, options);
+
+ // Restore attributes.
+ this.attributes = attributes;
+
+ return xhr;
+ },
+
+ // Destroy this model on the server if it was already persisted.
+ // Optimistically removes the model from its collection, if it has one.
+ // If `wait: true` is passed, waits for the server to respond before removal.
+ destroy: function(options) {
+ options = options ? _.clone(options) : {};
+ var model = this;
+ var success = options.success;
+ var wait = options.wait;
+
+ var destroy = function() {
+ model.stopListening();
+ model.trigger('destroy', model, model.collection, options);
+ };
+
+ options.success = function(resp) {
+ if (wait) destroy();
+ if (success) success.call(options.context, model, resp, options);
+ if (!model.isNew()) model.trigger('sync', model, resp, options);
+ };
+
+ var xhr = false;
+ if (this.isNew()) {
+ _.defer(options.success);
+ } else {
+ wrapError(this, options);
+ xhr = this.sync('delete', this, options);
+ }
+ if (!wait) destroy();
+ return xhr;
+ },
+
+ // Default URL for the model's representation on the server -- if you're
+ // using Backbone's restful methods, override this to change the endpoint
+ // that will be called.
+ url: function() {
+ var base =
+ _.result(this, 'urlRoot') ||
+ _.result(this.collection, 'url') ||
+ urlError();
+ if (this.isNew()) return base;
+ var id = this.get(this.idAttribute);
+ return base.replace(/[^\/]$/, '$&/') + encodeURIComponent(id);
+ },
+
+ // **parse** converts a response into the hash of attributes to be `set` on
+ // the model. The default implementation is just to pass the response along.
+ parse: function(resp, options) {
+ return resp;
+ },
+
+ // Create a new model with identical attributes to this one.
+ clone: function() {
+ return new this.constructor(this.attributes);
+ },
+
+ // A model is new if it has never been saved to the server, and lacks an id.
+ isNew: function() {
+ return !this.has(this.idAttribute);
+ },
+
+ // Check if the model is currently in a valid state.
+ isValid: function(options) {
+ return this._validate({}, _.extend({}, options, {validate: true}));
+ },
+
+ // Run validation against the next complete set of model attributes,
+ // returning `true` if all is well. Otherwise, fire an `"invalid"` event.
+ _validate: function(attrs, options) {
+ if (!options.validate || !this.validate) return true;
+ attrs = _.extend({}, this.attributes, attrs);
+ var error = this.validationError = this.validate(attrs, options) || null;
+ if (!error) return true;
+ this.trigger('invalid', this, error, _.extend(options, {validationError: error}));
+ return false;
+ }
+
+ });
+
+ // Underscore methods that we want to implement on the Model, mapped to the
+ // number of arguments they take.
+ var modelMethods = {keys: 1, values: 1, pairs: 1, invert: 1, pick: 0,
+ omit: 0, chain: 1, isEmpty: 1};
+
+ // Mix in each Underscore method as a proxy to `Model#attributes`.
+ addUnderscoreMethods(Model, modelMethods, 'attributes');
+
+ // Backbone.Collection
+ // -------------------
+
+ // If models tend to represent a single row of data, a Backbone Collection is
+ // more analogous to a table full of data ... or a small slice or page of that
+ // table, or a collection of rows that belong together for a particular reason
+ // -- all of the messages in this particular folder, all of the documents
+ // belonging to this particular author, and so on. Collections maintain
+ // indexes of their models, both in order, and for lookup by `id`.
+
+ // Create a new **Collection**, perhaps to contain a specific type of `model`.
+ // If a `comparator` is specified, the Collection will maintain
+ // its models in sort order, as they're added and removed.
+ var Collection = Backbone.Collection = function(models, options) {
+ options || (options = {});
+ if (options.model) this.model = options.model;
+ if (options.comparator !== void 0) this.comparator = options.comparator;
+ this._reset();
+ this.initialize.apply(this, arguments);
+ if (models) this.reset(models, _.extend({silent: true}, options));
+ };
+
+ // Default options for `Collection#set`.
+ var setOptions = {add: true, remove: true, merge: true};
+ var addOptions = {add: true, remove: false};
+
+ // Splices `insert` into `array` at index `at`.
+ var splice = function(array, insert, at) {
+ at = Math.min(Math.max(at, 0), array.length);
+ var tail = Array(array.length - at);
+ var length = insert.length;
+ var i;
+ for (i = 0; i < tail.length; i++) tail[i] = array[i + at];
+ for (i = 0; i < length; i++) array[i + at] = insert[i];
+ for (i = 0; i < tail.length; i++) array[i + length + at] = tail[i];
+ };
+
+ // Define the Collection's inheritable methods.
+ _.extend(Collection.prototype, Events, {
+
+ // The default model for a collection is just a **Backbone.Model**.
+ // This should be overridden in most cases.
+ model: Model,
+
+ // Initialize is an empty function by default. Override it with your own
+ // initialization logic.
+ initialize: function(){},
+
+ // The JSON representation of a Collection is an array of the
+ // models' attributes.
+ toJSON: function(options) {
+ return this.map(function(model) { return model.toJSON(options); });
+ },
+
+ // Proxy `Backbone.sync` by default.
+ sync: function() {
+ return Backbone.sync.apply(this, arguments);
+ },
+
+ // Add a model, or list of models to the set. `models` may be Backbone
+ // Models or raw JavaScript objects to be converted to Models, or any
+ // combination of the two.
+ add: function(models, options) {
+ return this.set(models, _.extend({merge: false}, options, addOptions));
+ },
+
+ // Remove a model, or a list of models from the set.
+ remove: function(models, options) {
+ options = _.extend({}, options);
+ var singular = !_.isArray(models);
+ models = singular ? [models] : models.slice();
+ var removed = this._removeModels(models, options);
+ if (!options.silent && removed.length) {
+ options.changes = {added: [], merged: [], removed: removed};
+ this.trigger('update', this, options);
+ }
+ return singular ? removed[0] : removed;
+ },
+
+ // Update a collection by `set`-ing a new list of models, adding new ones,
+ // removing models that are no longer present, and merging models that
+ // already exist in the collection, as necessary. Similar to **Model#set**,
+ // the core operation for updating the data contained by the collection.
+ set: function(models, options) {
+ if (models == null) return;
+
+ options = _.extend({}, setOptions, options);
+ if (options.parse && !this._isModel(models)) {
+ models = this.parse(models, options) || [];
+ }
+
+ var singular = !_.isArray(models);
+ models = singular ? [models] : models.slice();
+
+ var at = options.at;
+ if (at != null) at = +at;
+ if (at > this.length) at = this.length;
+ if (at < 0) at += this.length + 1;
+
+ var set = [];
+ var toAdd = [];
+ var toMerge = [];
+ var toRemove = [];
+ var modelMap = {};
+
+ var add = options.add;
+ var merge = options.merge;
+ var remove = options.remove;
+
+ var sort = false;
+ var sortable = this.comparator && at == null && options.sort !== false;
+ var sortAttr = _.isString(this.comparator) ? this.comparator : null;
+
+ // Turn bare objects into model references, and prevent invalid models
+ // from being added.
+ var model, i;
+ for (i = 0; i < models.length; i++) {
+ model = models[i];
+
+ // If a duplicate is found, prevent it from being added and
+ // optionally merge it into the existing model.
+ var existing = this.get(model);
+ if (existing) {
+ if (merge && model !== existing) {
+ var attrs = this._isModel(model) ? model.attributes : model;
+ if (options.parse) attrs = existing.parse(attrs, options);
+ existing.set(attrs, options);
+ toMerge.push(existing);
+ if (sortable && !sort) sort = existing.hasChanged(sortAttr);
+ }
+ if (!modelMap[existing.cid]) {
+ modelMap[existing.cid] = true;
+ set.push(existing);
+ }
+ models[i] = existing;
+
+ // If this is a new, valid model, push it to the `toAdd` list.
+ } else if (add) {
+ model = models[i] = this._prepareModel(model, options);
+ if (model) {
+ toAdd.push(model);
+ this._addReference(model, options);
+ modelMap[model.cid] = true;
+ set.push(model);
+ }
+ }
+ }
+
+ // Remove stale models.
+ if (remove) {
+ for (i = 0; i < this.length; i++) {
+ model = this.models[i];
+ if (!modelMap[model.cid]) toRemove.push(model);
+ }
+ if (toRemove.length) this._removeModels(toRemove, options);
+ }
+
+ // See if sorting is needed, update `length` and splice in new models.
+ var orderChanged = false;
+ var replace = !sortable && add && remove;
+ if (set.length && replace) {
+ orderChanged = this.length !== set.length || _.some(this.models, function(m, index) {
+ return m !== set[index];
+ });
+ this.models.length = 0;
+ splice(this.models, set, 0);
+ this.length = this.models.length;
+ } else if (toAdd.length) {
+ if (sortable) sort = true;
+ splice(this.models, toAdd, at == null ? this.length : at);
+ this.length = this.models.length;
+ }
+
+ // Silently sort the collection if appropriate.
+ if (sort) this.sort({silent: true});
+
+ // Unless silenced, it's time to fire all appropriate add/sort/update events.
+ if (!options.silent) {
+ for (i = 0; i < toAdd.length; i++) {
+ if (at != null) options.index = at + i;
+ model = toAdd[i];
+ model.trigger('add', model, this, options);
+ }
+ if (sort || orderChanged) this.trigger('sort', this, options);
+ if (toAdd.length || toRemove.length || toMerge.length) {
+ options.changes = {
+ added: toAdd,
+ removed: toRemove,
+ merged: toMerge
+ };
+ this.trigger('update', this, options);
+ }
+ }
+
+ // Return the added (or merged) model (or models).
+ return singular ? models[0] : models;
+ },
+
+ // When you have more items than you want to add or remove individually,
+ // you can reset the entire set with a new list of models, without firing
+ // any granular `add` or `remove` events. Fires `reset` when finished.
+ // Useful for bulk operations and optimizations.
+ reset: function(models, options) {
+ options = options ? _.clone(options) : {};
+ for (var i = 0; i < this.models.length; i++) {
+ this._removeReference(this.models[i], options);
+ }
+ options.previousModels = this.models;
+ this._reset();
+ models = this.add(models, _.extend({silent: true}, options));
+ if (!options.silent) this.trigger('reset', this, options);
+ return models;
+ },
+
+ // Add a model to the end of the collection.
+ push: function(model, options) {
+ return this.add(model, _.extend({at: this.length}, options));
+ },
+
+ // Remove a model from the end of the collection.
+ pop: function(options) {
+ var model = this.at(this.length - 1);
+ return this.remove(model, options);
+ },
+
+ // Add a model to the beginning of the collection.
+ unshift: function(model, options) {
+ return this.add(model, _.extend({at: 0}, options));
+ },
+
+ // Remove a model from the beginning of the collection.
+ shift: function(options) {
+ var model = this.at(0);
+ return this.remove(model, options);
+ },
+
+ // Slice out a sub-array of models from the collection.
+ slice: function() {
+ return slice.apply(this.models, arguments);
+ },
+
+ // Get a model from the set by id, cid, model object with id or cid
+ // properties, or an attributes object that is transformed through modelId.
+ get: function(obj) {
+ if (obj == null) return void 0;
+ return this._byId[obj] ||
+ this._byId[this.modelId(obj.attributes || obj)] ||
+ obj.cid && this._byId[obj.cid];
+ },
+
+ // Returns `true` if the model is in the collection.
+ has: function(obj) {
+ return this.get(obj) != null;
+ },
+
+ // Get the model at the given index.
+ at: function(index) {
+ if (index < 0) index += this.length;
+ return this.models[index];
+ },
+
+ // Return models with matching attributes. Useful for simple cases of
+ // `filter`.
+ where: function(attrs, first) {
+ return this[first ? 'find' : 'filter'](attrs);
+ },
+
+ // Return the first model with matching attributes. Useful for simple cases
+ // of `find`.
+ findWhere: function(attrs) {
+ return this.where(attrs, true);
+ },
+
+ // Force the collection to re-sort itself. You don't need to call this under
+ // normal circumstances, as the set will maintain sort order as each item
+ // is added.
+ sort: function(options) {
+ var comparator = this.comparator;
+ if (!comparator) throw new Error('Cannot sort a set without a comparator');
+ options || (options = {});
+
+ var length = comparator.length;
+ if (_.isFunction(comparator)) comparator = _.bind(comparator, this);
+
+ // Run sort based on type of `comparator`.
+ if (length === 1 || _.isString(comparator)) {
+ this.models = this.sortBy(comparator);
+ } else {
+ this.models.sort(comparator);
+ }
+ if (!options.silent) this.trigger('sort', this, options);
+ return this;
+ },
+
+ // Pluck an attribute from each model in the collection.
+ pluck: function(attr) {
+ return this.map(attr + '');
+ },
+
+ // Fetch the default set of models for this collection, resetting the
+ // collection when they arrive. If `reset: true` is passed, the response
+ // data will be passed through the `reset` method instead of `set`.
+ fetch: function(options) {
+ options = _.extend({parse: true}, options);
+ var success = options.success;
+ var collection = this;
+ options.success = function(resp) {
+ var method = options.reset ? 'reset' : 'set';
+ collection[method](resp, options);
+ if (success) success.call(options.context, collection, resp, options);
+ collection.trigger('sync', collection, resp, options);
+ };
+ wrapError(this, options);
+ return this.sync('read', this, options);
+ },
+
+ // Create a new instance of a model in this collection. Add the model to the
+ // collection immediately, unless `wait: true` is passed, in which case we
+ // wait for the server to agree.
+ create: function(model, options) {
+ options = options ? _.clone(options) : {};
+ var wait = options.wait;
+ model = this._prepareModel(model, options);
+ if (!model) return false;
+ if (!wait) this.add(model, options);
+ var collection = this;
+ var success = options.success;
+ options.success = function(m, resp, callbackOpts) {
+ if (wait) collection.add(m, callbackOpts);
+ if (success) success.call(callbackOpts.context, m, resp, callbackOpts);
+ };
+ model.save(null, options);
+ return model;
+ },
+
+ // **parse** converts a response into a list of models to be added to the
+ // collection. The default implementation is just to pass it through.
+ parse: function(resp, options) {
+ return resp;
+ },
+
+ // Create a new collection with an identical list of models as this one.
+ clone: function() {
+ return new this.constructor(this.models, {
+ model: this.model,
+ comparator: this.comparator
+ });
+ },
+
+ // Define how to uniquely identify models in the collection.
+ modelId: function(attrs) {
+ return attrs[this.model.prototype.idAttribute || 'id'];
+ },
+
+ // Private method to reset all internal state. Called when the collection
+ // is first initialized or reset.
+ _reset: function() {
+ this.length = 0;
+ this.models = [];
+ this._byId = {};
+ },
+
+ // Prepare a hash of attributes (or other model) to be added to this
+ // collection.
+ _prepareModel: function(attrs, options) {
+ if (this._isModel(attrs)) {
+ if (!attrs.collection) attrs.collection = this;
+ return attrs;
+ }
+ options = options ? _.clone(options) : {};
+ options.collection = this;
+ var model = new this.model(attrs, options);
+ if (!model.validationError) return model;
+ this.trigger('invalid', this, model.validationError, options);
+ return false;
+ },
+
+ // Internal method called by both remove and set.
+ _removeModels: function(models, options) {
+ var removed = [];
+ for (var i = 0; i < models.length; i++) {
+ var model = this.get(models[i]);
+ if (!model) continue;
+
+ var index = this.indexOf(model);
+ this.models.splice(index, 1);
+ this.length--;
+
+ // Remove references before triggering 'remove' event to prevent an
+ // infinite loop. #3693
+ delete this._byId[model.cid];
+ var id = this.modelId(model.attributes);
+ if (id != null) delete this._byId[id];
+
+ if (!options.silent) {
+ options.index = index;
+ model.trigger('remove', model, this, options);
+ }
+
+ removed.push(model);
+ this._removeReference(model, options);
+ }
+ return removed;
+ },
+
+ // Method for checking whether an object should be considered a model for
+ // the purposes of adding to the collection.
+ _isModel: function(model) {
+ return model instanceof Model;
+ },
+
+ // Internal method to create a model's ties to a collection.
+ _addReference: function(model, options) {
+ this._byId[model.cid] = model;
+ var id = this.modelId(model.attributes);
+ if (id != null) this._byId[id] = model;
+ model.on('all', this._onModelEvent, this);
+ },
+
+ // Internal method to sever a model's ties to a collection.
+ _removeReference: function(model, options) {
+ delete this._byId[model.cid];
+ var id = this.modelId(model.attributes);
+ if (id != null) delete this._byId[id];
+ if (this === model.collection) delete model.collection;
+ model.off('all', this._onModelEvent, this);
+ },
+
+ // Internal method called every time a model in the set fires an event.
+ // Sets need to update their indexes when models change ids. All other
+ // events simply proxy through. "add" and "remove" events that originate
+ // in other collections are ignored.
+ _onModelEvent: function(event, model, collection, options) {
+ if (model) {
+ if ((event === 'add' || event === 'remove') && collection !== this) return;
+ if (event === 'destroy') this.remove(model, options);
+ if (event === 'change') {
+ var prevId = this.modelId(model.previousAttributes());
+ var id = this.modelId(model.attributes);
+ if (prevId !== id) {
+ if (prevId != null) delete this._byId[prevId];
+ if (id != null) this._byId[id] = model;
+ }
+ }
+ }
+ this.trigger.apply(this, arguments);
+ }
+
+ });
+
+ // Underscore methods that we want to implement on the Collection.
+ // 90% of the core usefulness of Backbone Collections is actually implemented
+ // right here:
+ var collectionMethods = {forEach: 3, each: 3, map: 3, collect: 3, reduce: 0,
+ foldl: 0, inject: 0, reduceRight: 0, foldr: 0, find: 3, detect: 3, filter: 3,
+ select: 3, reject: 3, every: 3, all: 3, some: 3, any: 3, include: 3, includes: 3,
+ contains: 3, invoke: 0, max: 3, min: 3, toArray: 1, size: 1, first: 3,
+ head: 3, take: 3, initial: 3, rest: 3, tail: 3, drop: 3, last: 3,
+ without: 0, difference: 0, indexOf: 3, shuffle: 1, lastIndexOf: 3,
+ isEmpty: 1, chain: 1, sample: 3, partition: 3, groupBy: 3, countBy: 3,
+ sortBy: 3, indexBy: 3, findIndex: 3, findLastIndex: 3};
+
+ // Mix in each Underscore method as a proxy to `Collection#models`.
+ addUnderscoreMethods(Collection, collectionMethods, 'models');
+
+ // Backbone.View
+ // -------------
+
+ // Backbone Views are almost more convention than they are actual code. A View
+ // is simply a JavaScript object that represents a logical chunk of UI in the
+ // DOM. This might be a single item, an entire list, a sidebar or panel, or
+ // even the surrounding frame which wraps your whole app. Defining a chunk of
+ // UI as a **View** allows you to define your DOM events declaratively, without
+ // having to worry about render order ... and makes it easy for the view to
+ // react to specific changes in the state of your models.
+
+ // Creating a Backbone.View creates its initial element outside of the DOM,
+ // if an existing element is not provided...
+ var View = Backbone.View = function(options) {
+ this.cid = _.uniqueId('view');
+ _.extend(this, _.pick(options, viewOptions));
+ this._ensureElement();
+ this.initialize.apply(this, arguments);
+ };
+
+ // Cached regex to split keys for `delegate`.
+ var delegateEventSplitter = /^(\S+)\s*(.*)$/;
+
+ // List of view options to be set as properties.
+ var viewOptions = ['model', 'collection', 'el', 'id', 'attributes', 'className', 'tagName', 'events'];
+
+ // Set up all inheritable **Backbone.View** properties and methods.
+ _.extend(View.prototype, Events, {
+
+ // The default `tagName` of a View's element is `"div"`.
+ tagName: 'div',
+
+ // jQuery delegate for element lookup, scoped to DOM elements within the
+ // current view. This should be preferred to global lookups where possible.
+ $: function(selector) {
+ return this.$el.find(selector);
+ },
+
+ // Initialize is an empty function by default. Override it with your own
+ // initialization logic.
+ initialize: function(){},
+
+ // **render** is the core function that your view should override, in order
+ // to populate its element (`this.el`), with the appropriate HTML. The
+ // convention is for **render** to always return `this`.
+ render: function() {
+ return this;
+ },
+
+ // Remove this view by taking the element out of the DOM, and removing any
+ // applicable Backbone.Events listeners.
+ remove: function() {
+ this._removeElement();
+ this.stopListening();
+ return this;
+ },
+
+ // Remove this view's element from the document and all event listeners
+ // attached to it. Exposed for subclasses using an alternative DOM
+ // manipulation API.
+ _removeElement: function() {
+ this.$el.remove();
+ },
+
+ // Change the view's element (`this.el` property) and re-delegate the
+ // view's events on the new element.
+ setElement: function(element) {
+ this.undelegateEvents();
+ this._setElement(element);
+ this.delegateEvents();
+ return this;
+ },
+
+ // Creates the `this.el` and `this.$el` references for this view using the
+ // given `el`. `el` can be a CSS selector or an HTML string, a jQuery
+ // context or an element. Subclasses can override this to utilize an
+ // alternative DOM manipulation API and are only required to set the
+ // `this.el` property.
+ _setElement: function(el) {
+ this.$el = el instanceof Backbone.$ ? el : Backbone.$(el);
+ this.el = this.$el[0];
+ },
+
+ // Set callbacks, where `this.events` is a hash of
+ //
+ // *{"event selector": "callback"}*
+ //
+ // {
+ // 'mousedown .title': 'edit',
+ // 'click .button': 'save',
+ // 'click .open': function(e) { ... }
+ // }
+ //
+ // pairs. Callbacks will be bound to the view, with `this` set properly.
+ // Uses event delegation for efficiency.
+ // Omitting the selector binds the event to `this.el`.
+ delegateEvents: function(events) {
+ events || (events = _.result(this, 'events'));
+ if (!events) return this;
+ this.undelegateEvents();
+ for (var key in events) {
+ var method = events[key];
+ if (!_.isFunction(method)) method = this[method];
+ if (!method) continue;
+ var match = key.match(delegateEventSplitter);
+ this.delegate(match[1], match[2], _.bind(method, this));
+ }
+ return this;
+ },
+
+ // Add a single event listener to the view's element (or a child element
+ // using `selector`). This only works for delegate-able events: not `focus`,
+ // `blur`, and not `change`, `submit`, and `reset` in Internet Explorer.
+ delegate: function(eventName, selector, listener) {
+ this.$el.on(eventName + '.delegateEvents' + this.cid, selector, listener);
+ return this;
+ },
+
+ // Clears all callbacks previously bound to the view by `delegateEvents`.
+ // You usually don't need to use this, but may wish to if you have multiple
+ // Backbone views attached to the same DOM element.
+ undelegateEvents: function() {
+ if (this.$el) this.$el.off('.delegateEvents' + this.cid);
+ return this;
+ },
+
+ // A finer-grained `undelegateEvents` for removing a single delegated event.
+ // `selector` and `listener` are both optional.
+ undelegate: function(eventName, selector, listener) {
+ this.$el.off(eventName + '.delegateEvents' + this.cid, selector, listener);
+ return this;
+ },
+
+ // Produces a DOM element to be assigned to your view. Exposed for
+ // subclasses using an alternative DOM manipulation API.
+ _createElement: function(tagName) {
+ return document.createElement(tagName);
+ },
+
+ // Ensure that the View has a DOM element to render into.
+ // If `this.el` is a string, pass it through `$()`, take the first
+ // matching element, and re-assign it to `el`. Otherwise, create
+ // an element from the `id`, `className` and `tagName` properties.
+ _ensureElement: function() {
+ if (!this.el) {
+ var attrs = _.extend({}, _.result(this, 'attributes'));
+ if (this.id) attrs.id = _.result(this, 'id');
+ if (this.className) attrs['class'] = _.result(this, 'className');
+ this.setElement(this._createElement(_.result(this, 'tagName')));
+ this._setAttributes(attrs);
+ } else {
+ this.setElement(_.result(this, 'el'));
+ }
+ },
+
+ // Set attributes from a hash on this view's element. Exposed for
+ // subclasses using an alternative DOM manipulation API.
+ _setAttributes: function(attributes) {
+ this.$el.attr(attributes);
+ }
+
+ });
+
+ // Backbone.sync
+ // -------------
+
+ // Override this function to change the manner in which Backbone persists
+ // models to the server. You will be passed the type of request, and the
+ // model in question. By default, makes a RESTful Ajax request
+ // to the model's `url()`. Some possible customizations could be:
+ //
+ // * Use `setTimeout` to batch rapid-fire updates into a single request.
+ // * Send up the models as XML instead of JSON.
+ // * Persist models via WebSockets instead of Ajax.
+ //
+ // Turn on `Backbone.emulateHTTP` in order to send `PUT` and `DELETE` requests
+ // as `POST`, with a `_method` parameter containing the true HTTP method,
+ // as well as all requests with the body as `application/x-www-form-urlencoded`
+ // instead of `application/json` with the model in a param named `model`.
+ // Useful when interfacing with server-side languages like **PHP** that make
+ // it difficult to read the body of `PUT` requests.
+ Backbone.sync = function(method, model, options) {
+ var type = methodMap[method];
+
+ // Default options, unless specified.
+ _.defaults(options || (options = {}), {
+ emulateHTTP: Backbone.emulateHTTP,
+ emulateJSON: Backbone.emulateJSON
+ });
+
+ // Default JSON-request options.
+ var params = {type: type, dataType: 'json'};
+
+ // Ensure that we have a URL.
+ if (!options.url) {
+ params.url = _.result(model, 'url') || urlError();
+ }
+
+ // Ensure that we have the appropriate request data.
+ if (options.data == null && model && (method === 'create' || method === 'update' || method === 'patch')) {
+ params.contentType = 'application/json';
+ params.data = JSON.stringify(options.attrs || model.toJSON(options));
+ }
+
+ // For older servers, emulate JSON by encoding the request into an HTML-form.
+ if (options.emulateJSON) {
+ params.contentType = 'application/x-www-form-urlencoded';
+ params.data = params.data ? {model: params.data} : {};
+ }
+
+ // For older servers, emulate HTTP by mimicking the HTTP method with `_method`
+ // And an `X-HTTP-Method-Override` header.
+ if (options.emulateHTTP && (type === 'PUT' || type === 'DELETE' || type === 'PATCH')) {
+ params.type = 'POST';
+ if (options.emulateJSON) params.data._method = type;
+ var beforeSend = options.beforeSend;
+ options.beforeSend = function(xhr) {
+ xhr.setRequestHeader('X-HTTP-Method-Override', type);
+ if (beforeSend) return beforeSend.apply(this, arguments);
+ };
+ }
+
+ // Don't process data on a non-GET request.
+ if (params.type !== 'GET' && !options.emulateJSON) {
+ params.processData = false;
+ }
+
+ // Pass along `textStatus` and `errorThrown` from jQuery.
+ var error = options.error;
+ options.error = function(xhr, textStatus, errorThrown) {
+ options.textStatus = textStatus;
+ options.errorThrown = errorThrown;
+ if (error) error.call(options.context, xhr, textStatus, errorThrown);
+ };
+
+ // Make the request, allowing the user to override any Ajax options.
+ var xhr = options.xhr = Backbone.ajax(_.extend(params, options));
+ model.trigger('request', model, xhr, options);
+ return xhr;
+ };
+
+ // Map from CRUD to HTTP for our default `Backbone.sync` implementation.
+ var methodMap = {
+ 'create': 'POST',
+ 'update': 'PUT',
+ 'patch': 'PATCH',
+ 'delete': 'DELETE',
+ 'read': 'GET'
+ };
+
+ // Set the default implementation of `Backbone.ajax` to proxy through to `$`.
+ // Override this if you'd like to use a different library.
+ Backbone.ajax = function() {
+ return Backbone.$.ajax.apply(Backbone.$, arguments);
+ };
+
+ // Backbone.Router
+ // ---------------
+
+ // Routers map faux-URLs to actions, and fire events when routes are
+ // matched. Creating a new one sets its `routes` hash, if not set statically.
+ var Router = Backbone.Router = function(options) {
+ options || (options = {});
+ if (options.routes) this.routes = options.routes;
+ this._bindRoutes();
+ this.initialize.apply(this, arguments);
+ };
+
+ // Cached regular expressions for matching named param parts and splatted
+ // parts of route strings.
+ var optionalParam = /\((.*?)\)/g;
+ var namedParam = /(\(\?)?:\w+/g;
+ var splatParam = /\*\w+/g;
+ var escapeRegExp = /[\-{}\[\]+?.,\\\^$|#\s]/g;
+
+ // Set up all inheritable **Backbone.Router** properties and methods.
+ _.extend(Router.prototype, Events, {
+
+ // Initialize is an empty function by default. Override it with your own
+ // initialization logic.
+ initialize: function(){},
+
+ // Manually bind a single named route to a callback. For example:
+ //
+ // this.route('search/:query/p:num', 'search', function(query, num) {
+ // ...
+ // });
+ //
+ route: function(route, name, callback) {
+ if (!_.isRegExp(route)) route = this._routeToRegExp(route);
+ if (_.isFunction(name)) {
+ callback = name;
+ name = '';
+ }
+ if (!callback) callback = this[name];
+ var router = this;
+ Backbone.history.route(route, function(fragment) {
+ var args = router._extractParameters(route, fragment);
+ if (router.execute(callback, args, name) !== false) {
+ router.trigger.apply(router, ['route:' + name].concat(args));
+ router.trigger('route', name, args);
+ Backbone.history.trigger('route', router, name, args);
+ }
+ });
+ return this;
+ },
+
+ // Execute a route handler with the provided parameters. This is an
+ // excellent place to do pre-route setup or post-route cleanup.
+ execute: function(callback, args, name) {
+ if (callback) callback.apply(this, args);
+ },
+
+ // Simple proxy to `Backbone.history` to save a fragment into the history.
+ navigate: function(fragment, options) {
+ Backbone.history.navigate(fragment, options);
+ return this;
+ },
+
+ // Bind all defined routes to `Backbone.history`. We have to reverse the
+ // order of the routes here to support behavior where the most general
+ // routes can be defined at the bottom of the route map.
+ _bindRoutes: function() {
+ if (!this.routes) return;
+ this.routes = _.result(this, 'routes');
+ var route, routes = _.keys(this.routes);
+ while ((route = routes.pop()) != null) {
+ this.route(route, this.routes[route]);
+ }
+ },
+
+ // Convert a route string into a regular expression, suitable for matching
+ // against the current location hash.
+ _routeToRegExp: function(route) {
+ route = route.replace(escapeRegExp, '\\$&')
+ .replace(optionalParam, '(?:$1)?')
+ .replace(namedParam, function(match, optional) {
+ return optional ? match : '([^/?]+)';
+ })
+ .replace(splatParam, '([^?]*?)');
+ return new RegExp('^' + route + '(?:\\?([\\s\\S]*))?$');
+ },
+
+ // Given a route, and a URL fragment that it matches, return the array of
+ // extracted decoded parameters. Empty or unmatched parameters will be
+ // treated as `null` to normalize cross-browser behavior.
+ _extractParameters: function(route, fragment) {
+ var params = route.exec(fragment).slice(1);
+ return _.map(params, function(param, i) {
+ // Don't decode the search params.
+ if (i === params.length - 1) return param || null;
+ return param ? decodeURIComponent(param) : null;
+ });
+ }
+
+ });
+
+ // Backbone.History
+ // ----------------
+
+ // Handles cross-browser history management, based on either
+ // [pushState](http://diveintohtml5.info/history.html) and real URLs, or
+ // [onhashchange](https://developer.mozilla.org/en-US/docs/DOM/window.onhashchange)
+ // and URL fragments. If the browser supports neither (old IE, natch),
+ // falls back to polling.
+ var History = Backbone.History = function() {
+ this.handlers = [];
+ this.checkUrl = _.bind(this.checkUrl, this);
+
+ // Ensure that `History` can be used outside of the browser.
+ if (typeof window !== 'undefined') {
+ this.location = window.location;
+ this.history = window.history;
+ }
+ };
+
+ // Cached regex for stripping a leading hash/slash and trailing space.
+ var routeStripper = /^[#\/]|\s+$/g;
+
+ // Cached regex for stripping leading and trailing slashes.
+ var rootStripper = /^\/+|\/+$/g;
+
+ // Cached regex for stripping urls of hash.
+ var pathStripper = /#.*$/;
+
+ // Has the history handling already been started?
+ History.started = false;
+
+ // Set up all inheritable **Backbone.History** properties and methods.
+ _.extend(History.prototype, Events, {
+
+ // The default interval to poll for hash changes, if necessary, is
+ // twenty times a second.
+ interval: 50,
+
+ // Are we at the app root?
+ atRoot: function() {
+ var path = this.location.pathname.replace(/[^\/]$/, '$&/');
+ return path === this.root && !this.getSearch();
+ },
+
+ // Does the pathname match the root?
+ matchRoot: function() {
+ var path = this.decodeFragment(this.location.pathname);
+ var rootPath = path.slice(0, this.root.length - 1) + '/';
+ return rootPath === this.root;
+ },
+
+ // Unicode characters in `location.pathname` are percent encoded so they're
+ // decoded for comparison. `%25` should not be decoded since it may be part
+ // of an encoded parameter.
+ decodeFragment: function(fragment) {
+ return decodeURI(fragment.replace(/%25/g, '%2525'));
+ },
+
+ // In IE6, the hash fragment and search params are incorrect if the
+ // fragment contains `?`.
+ getSearch: function() {
+ var match = this.location.href.replace(/#.*/, '').match(/\?.+/);
+ return match ? match[0] : '';
+ },
+
+ // Gets the true hash value. Cannot use location.hash directly due to bug
+ // in Firefox where location.hash will always be decoded.
+ getHash: function(window) {
+ var match = (window || this).location.href.match(/#(.*)$/);
+ return match ? match[1] : '';
+ },
+
+ // Get the pathname and search params, without the root.
+ getPath: function() {
+ var path = this.decodeFragment(
+ this.location.pathname + this.getSearch()
+ ).slice(this.root.length - 1);
+ return path.charAt(0) === '/' ? path.slice(1) : path;
+ },
+
+ // Get the cross-browser normalized URL fragment from the path or hash.
+ getFragment: function(fragment) {
+ if (fragment == null) {
+ if (this._usePushState || !this._wantsHashChange) {
+ fragment = this.getPath();
+ } else {
+ fragment = this.getHash();
+ }
+ }
+ return fragment.replace(routeStripper, '');
+ },
+
+ // Start the hash change handling, returning `true` if the current URL matches
+ // an existing route, and `false` otherwise.
+ start: function(options) {
+ if (History.started) throw new Error('Backbone.history has already been started');
+ History.started = true;
+
+ // Figure out the initial configuration. Do we need an iframe?
+ // Is pushState desired ... is it available?
+ this.options = _.extend({root: '/'}, this.options, options);
+ this.root = this.options.root;
+ this._wantsHashChange = this.options.hashChange !== false;
+ this._hasHashChange = 'onhashchange' in window && (document.documentMode === void 0 || document.documentMode > 7);
+ this._useHashChange = this._wantsHashChange && this._hasHashChange;
+ this._wantsPushState = !!this.options.pushState;
+ this._hasPushState = !!(this.history && this.history.pushState);
+ this._usePushState = this._wantsPushState && this._hasPushState;
+ this.fragment = this.getFragment();
+
+ // Normalize root to always include a leading and trailing slash.
+ this.root = ('/' + this.root + '/').replace(rootStripper, '/');
+
+ // Transition from hashChange to pushState or vice versa if both are
+ // requested.
+ if (this._wantsHashChange && this._wantsPushState) {
+
+ // If we've started off with a route from a `pushState`-enabled
+ // browser, but we're currently in a browser that doesn't support it...
+ if (!this._hasPushState && !this.atRoot()) {
+ var rootPath = this.root.slice(0, -1) || '/';
+ this.location.replace(rootPath + '#' + this.getPath());
+ // Return immediately as browser will do redirect to new url
+ return true;
+
+ // Or if we've started out with a hash-based route, but we're currently
+ // in a browser where it could be `pushState`-based instead...
+ } else if (this._hasPushState && this.atRoot()) {
+ this.navigate(this.getHash(), {replace: true});
+ }
+
+ }
+
+ // Proxy an iframe to handle location events if the browser doesn't
+ // support the `hashchange` event, HTML5 history, or the user wants
+ // `hashChange` but not `pushState`.
+ if (!this._hasHashChange && this._wantsHashChange && !this._usePushState) {
+ this.iframe = document.createElement('iframe');
+ this.iframe.src = 'javascript:0';
+ this.iframe.style.display = 'none';
+ this.iframe.tabIndex = -1;
+ var body = document.body;
+ // Using `appendChild` will throw on IE < 9 if the document is not ready.
+ var iWindow = body.insertBefore(this.iframe, body.firstChild).contentWindow;
+ iWindow.document.open();
+ iWindow.document.close();
+ iWindow.location.hash = '#' + this.fragment;
+ }
+
+ // Add a cross-platform `addEventListener` shim for older browsers.
+ var addEventListener = window.addEventListener || function(eventName, listener) {
+ return attachEvent('on' + eventName, listener);
+ };
+
+ // Depending on whether we're using pushState or hashes, and whether
+ // 'onhashchange' is supported, determine how we check the URL state.
+ if (this._usePushState) {
+ addEventListener('popstate', this.checkUrl, false);
+ } else if (this._useHashChange && !this.iframe) {
+ addEventListener('hashchange', this.checkUrl, false);
+ } else if (this._wantsHashChange) {
+ this._checkUrlInterval = setInterval(this.checkUrl, this.interval);
+ }
+
+ if (!this.options.silent) return this.loadUrl();
+ },
+
+ // Disable Backbone.history, perhaps temporarily. Not useful in a real app,
+ // but possibly useful for unit testing Routers.
+ stop: function() {
+ // Add a cross-platform `removeEventListener` shim for older browsers.
+ var removeEventListener = window.removeEventListener || function(eventName, listener) {
+ return detachEvent('on' + eventName, listener);
+ };
+
+ // Remove window listeners.
+ if (this._usePushState) {
+ removeEventListener('popstate', this.checkUrl, false);
+ } else if (this._useHashChange && !this.iframe) {
+ removeEventListener('hashchange', this.checkUrl, false);
+ }
+
+ // Clean up the iframe if necessary.
+ if (this.iframe) {
+ document.body.removeChild(this.iframe);
+ this.iframe = null;
+ }
+
+ // Some environments will throw when clearing an undefined interval.
+ if (this._checkUrlInterval) clearInterval(this._checkUrlInterval);
+ History.started = false;
+ },
+
+ // Add a route to be tested when the fragment changes. Routes added later
+ // may override previous routes.
+ route: function(route, callback) {
+ this.handlers.unshift({route: route, callback: callback});
+ },
+
+ // Checks the current URL to see if it has changed, and if it has,
+ // calls `loadUrl`, normalizing across the hidden iframe.
+ checkUrl: function(e) {
+ var current = this.getFragment();
+
+ // If the user pressed the back button, the iframe's hash will have
+ // changed and we should use that for comparison.
+ if (current === this.fragment && this.iframe) {
+ current = this.getHash(this.iframe.contentWindow);
+ }
+
+ if (current === this.fragment) return false;
+ if (this.iframe) this.navigate(current);
+ this.loadUrl();
+ },
+
+ // Attempt to load the current URL fragment. If a route succeeds with a
+ // match, returns `true`. If no defined routes matches the fragment,
+ // returns `false`.
+ loadUrl: function(fragment) {
+ // If the root doesn't match, no routes can match either.
+ if (!this.matchRoot()) return false;
+ fragment = this.fragment = this.getFragment(fragment);
+ return _.some(this.handlers, function(handler) {
+ if (handler.route.test(fragment)) {
+ handler.callback(fragment);
+ return true;
+ }
+ });
+ },
+
+ // Save a fragment into the hash history, or replace the URL state if the
+ // 'replace' option is passed. You are responsible for properly URL-encoding
+ // the fragment in advance.
+ //
+ // The options object can contain `trigger: true` if you wish to have the
+ // route callback be fired (not usually desirable), or `replace: true`, if
+ // you wish to modify the current URL without adding an entry to the history.
+ navigate: function(fragment, options) {
+ if (!History.started) return false;
+ if (!options || options === true) options = {trigger: !!options};
+
+ // Normalize the fragment.
+ fragment = this.getFragment(fragment || '');
+
+ // Don't include a trailing slash on the root.
+ var rootPath = this.root;
+ if (fragment === '' || fragment.charAt(0) === '?') {
+ rootPath = rootPath.slice(0, -1) || '/';
+ }
+ var url = rootPath + fragment;
+
+ // Strip the hash and decode for matching.
+ fragment = this.decodeFragment(fragment.replace(pathStripper, ''));
+
+ if (this.fragment === fragment) return;
+ this.fragment = fragment;
+
+ // If pushState is available, we use it to set the fragment as a real URL.
+ if (this._usePushState) {
+ this.history[options.replace ? 'replaceState' : 'pushState']({}, document.title, url);
+
+ // If hash changes haven't been explicitly disabled, update the hash
+ // fragment to store history.
+ } else if (this._wantsHashChange) {
+ this._updateHash(this.location, fragment, options.replace);
+ if (this.iframe && fragment !== this.getHash(this.iframe.contentWindow)) {
+ var iWindow = this.iframe.contentWindow;
+
+ // Opening and closing the iframe tricks IE7 and earlier to push a
+ // history entry on hash-tag change. When replace is true, we don't
+ // want this.
+ if (!options.replace) {
+ iWindow.document.open();
+ iWindow.document.close();
+ }
+
+ this._updateHash(iWindow.location, fragment, options.replace);
+ }
+
+ // If you've told us that you explicitly don't want fallback hashchange-
+ // based history, then `navigate` becomes a page refresh.
+ } else {
+ return this.location.assign(url);
+ }
+ if (options.trigger) return this.loadUrl(fragment);
+ },
+
+ // Update the hash location, either replacing the current entry, or adding
+ // a new one to the browser history.
+ _updateHash: function(location, fragment, replace) {
+ if (replace) {
+ var href = location.href.replace(/(javascript:|#).*$/, '');
+ location.replace(href + '#' + fragment);
+ } else {
+ // Some browsers require that `hash` contains a leading #.
+ location.hash = '#' + fragment;
+ }
+ }
+
+ });
+
+ // Create the default Backbone.history.
+ Backbone.history = new History;
+
+ // Helpers
+ // -------
+
+ // Helper function to correctly set up the prototype chain for subclasses.
+ // Similar to `goog.inherits`, but uses a hash of prototype properties and
+ // class properties to be extended.
+ var extend = function(protoProps, staticProps) {
+ var parent = this;
+ var child;
+
+ // The constructor function for the new subclass is either defined by you
+ // (the "constructor" property in your `extend` definition), or defaulted
+ // by us to simply call the parent constructor.
+ if (protoProps && _.has(protoProps, 'constructor')) {
+ child = protoProps.constructor;
+ } else {
+ child = function(){ return parent.apply(this, arguments); };
+ }
+
+ // Add static properties to the constructor function, if supplied.
+ _.extend(child, parent, staticProps);
+
+ // Set the prototype chain to inherit from `parent`, without calling
+ // `parent`'s constructor function and add the prototype properties.
+ child.prototype = _.create(parent.prototype, protoProps);
+ child.prototype.constructor = child;
+
+ // Set a convenience property in case the parent's prototype is needed
+ // later.
+ child.__super__ = parent.prototype;
+
+ return child;
+ };
+
+ // Set up inheritance for the model, collection, router, view and history.
+ Model.extend = Collection.extend = Router.extend = View.extend = History.extend = extend;
+
+ // Throw an error when a URL is needed, and none is supplied.
+ var urlError = function() {
+ throw new Error('A "url" property or function must be specified');
+ };
+
+ // Wrap an optional error callback with a fallback error event.
+ var wrapError = function(model, options) {
+ var error = options.error;
+ options.error = function(resp) {
+ if (error) error.call(options.context, model, resp, options);
+ model.trigger('error', model, resp, options);
+ };
+ };
+
+ return Backbone;
+});
diff --git a/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/backbone/test/collection.js b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/backbone/test/collection.js
new file mode 100644
index 0000000..dd98aca
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/backbone/test/collection.js
@@ -0,0 +1,1998 @@
+(function() {
+
+ var a, b, c, d, e, col, otherCol;
+
+ QUnit.module('Backbone.Collection', {
+
+ beforeEach: function(assert) {
+ a = new Backbone.Model({id: 3, label: 'a'});
+ b = new Backbone.Model({id: 2, label: 'b'});
+ c = new Backbone.Model({id: 1, label: 'c'});
+ d = new Backbone.Model({id: 0, label: 'd'});
+ e = null;
+ col = new Backbone.Collection([a, b, c, d]);
+ otherCol = new Backbone.Collection();
+ }
+
+ });
+
+ QUnit.test('new and sort', function(assert) {
+ assert.expect(6);
+ var counter = 0;
+ col.on('sort', function(){ counter++; });
+ assert.deepEqual(col.pluck('label'), ['a', 'b', 'c', 'd']);
+ col.comparator = function(m1, m2) {
+ return m1.id > m2.id ? -1 : 1;
+ };
+ col.sort();
+ assert.equal(counter, 1);
+ assert.deepEqual(col.pluck('label'), ['a', 'b', 'c', 'd']);
+ col.comparator = function(model) { return model.id; };
+ col.sort();
+ assert.equal(counter, 2);
+ assert.deepEqual(col.pluck('label'), ['d', 'c', 'b', 'a']);
+ assert.equal(col.length, 4);
+ });
+
+ QUnit.test('String comparator.', function(assert) {
+ assert.expect(1);
+ var collection = new Backbone.Collection([
+ {id: 3},
+ {id: 1},
+ {id: 2}
+ ], {comparator: 'id'});
+ assert.deepEqual(collection.pluck('id'), [1, 2, 3]);
+ });
+
+ QUnit.test('new and parse', function(assert) {
+ assert.expect(3);
+ var Collection = Backbone.Collection.extend({
+ parse: function(data) {
+ return _.filter(data, function(datum) {
+ return datum.a % 2 === 0;
+ });
+ }
+ });
+ var models = [{a: 1}, {a: 2}, {a: 3}, {a: 4}];
+ var collection = new Collection(models, {parse: true});
+ assert.strictEqual(collection.length, 2);
+ assert.strictEqual(collection.first().get('a'), 2);
+ assert.strictEqual(collection.last().get('a'), 4);
+ });
+
+ QUnit.test('clone preserves model and comparator', function(assert) {
+ assert.expect(3);
+ var Model = Backbone.Model.extend();
+ var comparator = function(model){ return model.id; };
+
+ var collection = new Backbone.Collection([{id: 1}], {
+ model: Model,
+ comparator: comparator
+ }).clone();
+ collection.add({id: 2});
+ assert.ok(collection.at(0) instanceof Model);
+ assert.ok(collection.at(1) instanceof Model);
+ assert.strictEqual(collection.comparator, comparator);
+ });
+
+ QUnit.test('get', function(assert) {
+ assert.expect(6);
+ assert.equal(col.get(0), d);
+ assert.equal(col.get(d.clone()), d);
+ assert.equal(col.get(2), b);
+ assert.equal(col.get({id: 1}), c);
+ assert.equal(col.get(c.clone()), c);
+ assert.equal(col.get(col.first().cid), col.first());
+ });
+
+ QUnit.test('get with non-default ids', function(assert) {
+ assert.expect(5);
+ var MongoModel = Backbone.Model.extend({idAttribute: '_id'});
+ var model = new MongoModel({_id: 100});
+ var collection = new Backbone.Collection([model], {model: MongoModel});
+ assert.equal(collection.get(100), model);
+ assert.equal(collection.get(model.cid), model);
+ assert.equal(collection.get(model), model);
+ assert.equal(collection.get(101), void 0);
+
+ var collection2 = new Backbone.Collection();
+ collection2.model = MongoModel;
+ collection2.add(model.attributes);
+ assert.equal(collection2.get(model.clone()), collection2.first());
+ });
+
+ QUnit.test('has', function(assert) {
+ assert.expect(15);
+ assert.ok(col.has(a));
+ assert.ok(col.has(b));
+ assert.ok(col.has(c));
+ assert.ok(col.has(d));
+ assert.ok(col.has(a.id));
+ assert.ok(col.has(b.id));
+ assert.ok(col.has(c.id));
+ assert.ok(col.has(d.id));
+ assert.ok(col.has(a.cid));
+ assert.ok(col.has(b.cid));
+ assert.ok(col.has(c.cid));
+ assert.ok(col.has(d.cid));
+ var outsider = new Backbone.Model({id: 4});
+ assert.notOk(col.has(outsider));
+ assert.notOk(col.has(outsider.id));
+ assert.notOk(col.has(outsider.cid));
+ });
+
+ QUnit.test('update index when id changes', function(assert) {
+ assert.expect(4);
+ var collection = new Backbone.Collection();
+ collection.add([
+ {id: 0, name: 'one'},
+ {id: 1, name: 'two'}
+ ]);
+ var one = collection.get(0);
+ assert.equal(one.get('name'), 'one');
+ collection.on('change:name', function(model) { assert.ok(this.get(model)); });
+ one.set({name: 'dalmatians', id: 101});
+ assert.equal(collection.get(0), null);
+ assert.equal(collection.get(101).get('name'), 'dalmatians');
+ });
+
+ QUnit.test('at', function(assert) {
+ assert.expect(2);
+ assert.equal(col.at(2), c);
+ assert.equal(col.at(-2), c);
+ });
+
+ QUnit.test('pluck', function(assert) {
+ assert.expect(1);
+ assert.equal(col.pluck('label').join(' '), 'a b c d');
+ });
+
+ QUnit.test('add', function(assert) {
+ assert.expect(14);
+ var added, opts, secondAdded;
+ added = opts = secondAdded = null;
+ e = new Backbone.Model({id: 10, label: 'e'});
+ otherCol.add(e);
+ otherCol.on('add', function() {
+ secondAdded = true;
+ });
+ col.on('add', function(model, collection, options){
+ added = model.get('label');
+ opts = options;
+ });
+ col.add(e, {amazing: true});
+ assert.equal(added, 'e');
+ assert.equal(col.length, 5);
+ assert.equal(col.last(), e);
+ assert.equal(otherCol.length, 1);
+ assert.equal(secondAdded, null);
+ assert.ok(opts.amazing);
+
+ var f = new Backbone.Model({id: 20, label: 'f'});
+ var g = new Backbone.Model({id: 21, label: 'g'});
+ var h = new Backbone.Model({id: 22, label: 'h'});
+ var atCol = new Backbone.Collection([f, g, h]);
+ assert.equal(atCol.length, 3);
+ atCol.add(e, {at: 1});
+ assert.equal(atCol.length, 4);
+ assert.equal(atCol.at(1), e);
+ assert.equal(atCol.last(), h);
+
+ var coll = new Backbone.Collection(new Array(2));
+ var addCount = 0;
+ coll.on('add', function(){
+ addCount += 1;
+ });
+ coll.add([undefined, f, g]);
+ assert.equal(coll.length, 5);
+ assert.equal(addCount, 3);
+ coll.add(new Array(4));
+ assert.equal(coll.length, 9);
+ assert.equal(addCount, 7);
+ });
+
+ QUnit.test('add multiple models', function(assert) {
+ assert.expect(6);
+ var collection = new Backbone.Collection([{at: 0}, {at: 1}, {at: 9}]);
+ collection.add([{at: 2}, {at: 3}, {at: 4}, {at: 5}, {at: 6}, {at: 7}, {at: 8}], {at: 2});
+ for (var i = 0; i <= 5; i++) {
+ assert.equal(collection.at(i).get('at'), i);
+ }
+ });
+
+ QUnit.test('add; at should have preference over comparator', function(assert) {
+ assert.expect(1);
+ var Col = Backbone.Collection.extend({
+ comparator: function(m1, m2) {
+ return m1.id > m2.id ? -1 : 1;
+ }
+ });
+
+ var collection = new Col([{id: 2}, {id: 3}]);
+ collection.add(new Backbone.Model({id: 1}), {at: 1});
+
+ assert.equal(collection.pluck('id').join(' '), '3 1 2');
+ });
+
+ QUnit.test('add; at should add to the end if the index is out of bounds', function(assert) {
+ assert.expect(1);
+ var collection = new Backbone.Collection([{id: 2}, {id: 3}]);
+ collection.add(new Backbone.Model({id: 1}), {at: 5});
+
+ assert.equal(collection.pluck('id').join(' '), '2 3 1');
+ });
+
+ QUnit.test("can't add model to collection twice", function(assert) {
+ var collection = new Backbone.Collection([{id: 1}, {id: 2}, {id: 1}, {id: 2}, {id: 3}]);
+ assert.equal(collection.pluck('id').join(' '), '1 2 3');
+ });
+
+ QUnit.test("can't add different model with same id to collection twice", function(assert) {
+ assert.expect(1);
+ var collection = new Backbone.Collection;
+ collection.unshift({id: 101});
+ collection.add({id: 101});
+ assert.equal(collection.length, 1);
+ });
+
+ QUnit.test('merge in duplicate models with {merge: true}', function(assert) {
+ assert.expect(3);
+ var collection = new Backbone.Collection;
+ collection.add([{id: 1, name: 'Moe'}, {id: 2, name: 'Curly'}, {id: 3, name: 'Larry'}]);
+ collection.add({id: 1, name: 'Moses'});
+ assert.equal(collection.first().get('name'), 'Moe');
+ collection.add({id: 1, name: 'Moses'}, {merge: true});
+ assert.equal(collection.first().get('name'), 'Moses');
+ collection.add({id: 1, name: 'Tim'}, {merge: true, silent: true});
+ assert.equal(collection.first().get('name'), 'Tim');
+ });
+
+ QUnit.test('add model to multiple collections', function(assert) {
+ assert.expect(10);
+ var counter = 0;
+ var m = new Backbone.Model({id: 10, label: 'm'});
+ m.on('add', function(model, collection) {
+ counter++;
+ assert.equal(m, model);
+ if (counter > 1) {
+ assert.equal(collection, col2);
+ } else {
+ assert.equal(collection, col1);
+ }
+ });
+ var col1 = new Backbone.Collection([]);
+ col1.on('add', function(model, collection) {
+ assert.equal(m, model);
+ assert.equal(col1, collection);
+ });
+ var col2 = new Backbone.Collection([]);
+ col2.on('add', function(model, collection) {
+ assert.equal(m, model);
+ assert.equal(col2, collection);
+ });
+ col1.add(m);
+ assert.equal(m.collection, col1);
+ col2.add(m);
+ assert.equal(m.collection, col1);
+ });
+
+ QUnit.test('add model with parse', function(assert) {
+ assert.expect(1);
+ var Model = Backbone.Model.extend({
+ parse: function(obj) {
+ obj.value += 1;
+ return obj;
+ }
+ });
+
+ var Col = Backbone.Collection.extend({model: Model});
+ var collection = new Col;
+ collection.add({value: 1}, {parse: true});
+ assert.equal(collection.at(0).get('value'), 2);
+ });
+
+ QUnit.test('add with parse and merge', function(assert) {
+ var collection = new Backbone.Collection();
+ collection.parse = function(attrs) {
+ return _.map(attrs, function(model) {
+ if (model.model) return model.model;
+ return model;
+ });
+ };
+ collection.add({id: 1});
+ collection.add({model: {id: 1, name: 'Alf'}}, {parse: true, merge: true});
+ assert.equal(collection.first().get('name'), 'Alf');
+ });
+
+ QUnit.test('add model to collection with sort()-style comparator', function(assert) {
+ assert.expect(3);
+ var collection = new Backbone.Collection;
+ collection.comparator = function(m1, m2) {
+ return m1.get('name') < m2.get('name') ? -1 : 1;
+ };
+ var tom = new Backbone.Model({name: 'Tom'});
+ var rob = new Backbone.Model({name: 'Rob'});
+ var tim = new Backbone.Model({name: 'Tim'});
+ collection.add(tom);
+ collection.add(rob);
+ collection.add(tim);
+ assert.equal(collection.indexOf(rob), 0);
+ assert.equal(collection.indexOf(tim), 1);
+ assert.equal(collection.indexOf(tom), 2);
+ });
+
+ QUnit.test('comparator that depends on `this`', function(assert) {
+ assert.expect(2);
+ var collection = new Backbone.Collection;
+ collection.negative = function(num) {
+ return -num;
+ };
+ collection.comparator = function(model) {
+ return this.negative(model.id);
+ };
+ collection.add([{id: 1}, {id: 2}, {id: 3}]);
+ assert.deepEqual(collection.pluck('id'), [3, 2, 1]);
+ collection.comparator = function(m1, m2) {
+ return this.negative(m2.id) - this.negative(m1.id);
+ };
+ collection.sort();
+ assert.deepEqual(collection.pluck('id'), [1, 2, 3]);
+ });
+
+ QUnit.test('remove', function(assert) {
+ assert.expect(12);
+ var removed = null;
+ var result = null;
+ col.on('remove', function(model, collection, options) {
+ removed = model.get('label');
+ assert.equal(options.index, 3);
+ assert.equal(collection.get(model), undefined, '#3693: model cannot be fetched from collection');
+ });
+ result = col.remove(d);
+ assert.equal(removed, 'd');
+ assert.strictEqual(result, d);
+ //if we try to remove d again, it's not going to actually get removed
+ result = col.remove(d);
+ assert.strictEqual(result, undefined);
+ assert.equal(col.length, 3);
+ assert.equal(col.first(), a);
+ col.off();
+ result = col.remove([c, d]);
+ assert.equal(result.length, 1, 'only returns removed models');
+ assert.equal(result[0], c, 'only returns removed models');
+ result = col.remove([c, b]);
+ assert.equal(result.length, 1, 'only returns removed models');
+ assert.equal(result[0], b, 'only returns removed models');
+ result = col.remove([]);
+ assert.deepEqual(result, [], 'returns empty array when nothing removed');
+ });
+
+ QUnit.test('add and remove return values', function(assert) {
+ assert.expect(13);
+ var Even = Backbone.Model.extend({
+ validate: function(attrs) {
+ if (attrs.id % 2 !== 0) return 'odd';
+ }
+ });
+ var collection = new Backbone.Collection;
+ collection.model = Even;
+
+ var list = collection.add([{id: 2}, {id: 4}], {validate: true});
+ assert.equal(list.length, 2);
+ assert.ok(list[0] instanceof Backbone.Model);
+ assert.equal(list[1], collection.last());
+ assert.equal(list[1].get('id'), 4);
+
+ list = collection.add([{id: 3}, {id: 6}], {validate: true});
+ assert.equal(collection.length, 3);
+ assert.equal(list[0], false);
+ assert.equal(list[1].get('id'), 6);
+
+ var result = collection.add({id: 6});
+ assert.equal(result.cid, list[1].cid);
+
+ result = collection.remove({id: 6});
+ assert.equal(collection.length, 2);
+ assert.equal(result.id, 6);
+
+ list = collection.remove([{id: 2}, {id: 8}]);
+ assert.equal(collection.length, 1);
+ assert.equal(list[0].get('id'), 2);
+ assert.equal(list[1], null);
+ });
+
+ QUnit.test('shift and pop', function(assert) {
+ assert.expect(2);
+ var collection = new Backbone.Collection([{a: 'a'}, {b: 'b'}, {c: 'c'}]);
+ assert.equal(collection.shift().get('a'), 'a');
+ assert.equal(collection.pop().get('c'), 'c');
+ });
+
+ QUnit.test('slice', function(assert) {
+ assert.expect(2);
+ var collection = new Backbone.Collection([{a: 'a'}, {b: 'b'}, {c: 'c'}]);
+ var array = collection.slice(1, 3);
+ assert.equal(array.length, 2);
+ assert.equal(array[0].get('b'), 'b');
+ });
+
+ QUnit.test('events are unbound on remove', function(assert) {
+ assert.expect(3);
+ var counter = 0;
+ var dj = new Backbone.Model();
+ var emcees = new Backbone.Collection([dj]);
+ emcees.on('change', function(){ counter++; });
+ dj.set({name: 'Kool'});
+ assert.equal(counter, 1);
+ emcees.reset([]);
+ assert.equal(dj.collection, undefined);
+ dj.set({name: 'Shadow'});
+ assert.equal(counter, 1);
+ });
+
+ QUnit.test('remove in multiple collections', function(assert) {
+ assert.expect(7);
+ var modelData = {
+ id: 5,
+ title: 'Othello'
+ };
+ var passed = false;
+ var m1 = new Backbone.Model(modelData);
+ var m2 = new Backbone.Model(modelData);
+ m2.on('remove', function() {
+ passed = true;
+ });
+ var col1 = new Backbone.Collection([m1]);
+ var col2 = new Backbone.Collection([m2]);
+ assert.notEqual(m1, m2);
+ assert.ok(col1.length === 1);
+ assert.ok(col2.length === 1);
+ col1.remove(m1);
+ assert.equal(passed, false);
+ assert.ok(col1.length === 0);
+ col2.remove(m1);
+ assert.ok(col2.length === 0);
+ assert.equal(passed, true);
+ });
+
+ QUnit.test('remove same model in multiple collection', function(assert) {
+ assert.expect(16);
+ var counter = 0;
+ var m = new Backbone.Model({id: 5, title: 'Othello'});
+ m.on('remove', function(model, collection) {
+ counter++;
+ assert.equal(m, model);
+ if (counter > 1) {
+ assert.equal(collection, col1);
+ } else {
+ assert.equal(collection, col2);
+ }
+ });
+ var col1 = new Backbone.Collection([m]);
+ col1.on('remove', function(model, collection) {
+ assert.equal(m, model);
+ assert.equal(col1, collection);
+ });
+ var col2 = new Backbone.Collection([m]);
+ col2.on('remove', function(model, collection) {
+ assert.equal(m, model);
+ assert.equal(col2, collection);
+ });
+ assert.equal(col1, m.collection);
+ col2.remove(m);
+ assert.ok(col2.length === 0);
+ assert.ok(col1.length === 1);
+ assert.equal(counter, 1);
+ assert.equal(col1, m.collection);
+ col1.remove(m);
+ assert.equal(null, m.collection);
+ assert.ok(col1.length === 0);
+ assert.equal(counter, 2);
+ });
+
+ QUnit.test('model destroy removes from all collections', function(assert) {
+ assert.expect(3);
+ var m = new Backbone.Model({id: 5, title: 'Othello'});
+ m.sync = function(method, model, options) { options.success(); };
+ var col1 = new Backbone.Collection([m]);
+ var col2 = new Backbone.Collection([m]);
+ m.destroy();
+ assert.ok(col1.length === 0);
+ assert.ok(col2.length === 0);
+ assert.equal(undefined, m.collection);
+ });
+
+ QUnit.test('Collection: non-persisted model destroy removes from all collections', function(assert) {
+ assert.expect(3);
+ var m = new Backbone.Model({title: 'Othello'});
+ m.sync = function(method, model, options) { throw 'should not be called'; };
+ var col1 = new Backbone.Collection([m]);
+ var col2 = new Backbone.Collection([m]);
+ m.destroy();
+ assert.ok(col1.length === 0);
+ assert.ok(col2.length === 0);
+ assert.equal(undefined, m.collection);
+ });
+
+ QUnit.test('fetch', function(assert) {
+ assert.expect(4);
+ var collection = new Backbone.Collection;
+ collection.url = '/test';
+ collection.fetch();
+ assert.equal(this.syncArgs.method, 'read');
+ assert.equal(this.syncArgs.model, collection);
+ assert.equal(this.syncArgs.options.parse, true);
+
+ collection.fetch({parse: false});
+ assert.equal(this.syncArgs.options.parse, false);
+ });
+
+ QUnit.test('fetch with an error response triggers an error event', function(assert) {
+ assert.expect(1);
+ var collection = new Backbone.Collection();
+ collection.on('error', function() {
+ assert.ok(true);
+ });
+ collection.sync = function(method, model, options) { options.error(); };
+ collection.fetch();
+ });
+
+ QUnit.test('#3283 - fetch with an error response calls error with context', function(assert) {
+ assert.expect(1);
+ var collection = new Backbone.Collection();
+ var obj = {};
+ var options = {
+ context: obj,
+ error: function() {
+ assert.equal(this, obj);
+ }
+ };
+ collection.sync = function(method, model, opts) {
+ opts.error.call(opts.context);
+ };
+ collection.fetch(options);
+ });
+
+ QUnit.test('ensure fetch only parses once', function(assert) {
+ assert.expect(1);
+ var collection = new Backbone.Collection;
+ var counter = 0;
+ collection.parse = function(models) {
+ counter++;
+ return models;
+ };
+ collection.url = '/test';
+ collection.fetch();
+ this.syncArgs.options.success([]);
+ assert.equal(counter, 1);
+ });
+
+ QUnit.test('create', function(assert) {
+ assert.expect(4);
+ var collection = new Backbone.Collection;
+ collection.url = '/test';
+ var model = collection.create({label: 'f'}, {wait: true});
+ assert.equal(this.syncArgs.method, 'create');
+ assert.equal(this.syncArgs.model, model);
+ assert.equal(model.get('label'), 'f');
+ assert.equal(model.collection, collection);
+ });
+
+ QUnit.test('create with validate:true enforces validation', function(assert) {
+ assert.expect(3);
+ var ValidatingModel = Backbone.Model.extend({
+ validate: function(attrs) {
+ return 'fail';
+ }
+ });
+ var ValidatingCollection = Backbone.Collection.extend({
+ model: ValidatingModel
+ });
+ var collection = new ValidatingCollection();
+ collection.on('invalid', function(coll, error, options) {
+ assert.equal(error, 'fail');
+ assert.equal(options.validationError, 'fail');
+ });
+ assert.equal(collection.create({'foo': 'bar'}, {validate: true}), false);
+ });
+
+ QUnit.test('create will pass extra options to success callback', function(assert) {
+ assert.expect(1);
+ var Model = Backbone.Model.extend({
+ sync: function(method, model, options) {
+ _.extend(options, {specialSync: true});
+ return Backbone.Model.prototype.sync.call(this, method, model, options);
+ }
+ });
+
+ var Collection = Backbone.Collection.extend({
+ model: Model,
+ url: '/test'
+ });
+
+ var collection = new Collection;
+
+ var success = function(model, response, options) {
+ assert.ok(options.specialSync, 'Options were passed correctly to callback');
+ };
+
+ collection.create({}, {success: success});
+ this.ajaxSettings.success();
+ });
+
+ QUnit.test('create with wait:true should not call collection.parse', function(assert) {
+ assert.expect(0);
+ var Collection = Backbone.Collection.extend({
+ url: '/test',
+ parse: function() {
+ assert.ok(false);
+ }
+ });
+
+ var collection = new Collection;
+
+ collection.create({}, {wait: true});
+ this.ajaxSettings.success();
+ });
+
+ QUnit.test('a failing create returns model with errors', function(assert) {
+ var ValidatingModel = Backbone.Model.extend({
+ validate: function(attrs) {
+ return 'fail';
+ }
+ });
+ var ValidatingCollection = Backbone.Collection.extend({
+ model: ValidatingModel
+ });
+ var collection = new ValidatingCollection();
+ var m = collection.create({foo: 'bar'});
+ assert.equal(m.validationError, 'fail');
+ assert.equal(collection.length, 1);
+ });
+
+ QUnit.test('initialize', function(assert) {
+ assert.expect(1);
+ var Collection = Backbone.Collection.extend({
+ initialize: function() {
+ this.one = 1;
+ }
+ });
+ var coll = new Collection;
+ assert.equal(coll.one, 1);
+ });
+
+ QUnit.test('toJSON', function(assert) {
+ assert.expect(1);
+ assert.equal(JSON.stringify(col), '[{"id":3,"label":"a"},{"id":2,"label":"b"},{"id":1,"label":"c"},{"id":0,"label":"d"}]');
+ });
+
+ QUnit.test('where and findWhere', function(assert) {
+ assert.expect(8);
+ var model = new Backbone.Model({a: 1});
+ var coll = new Backbone.Collection([
+ model,
+ {a: 1},
+ {a: 1, b: 2},
+ {a: 2, b: 2},
+ {a: 3}
+ ]);
+ assert.equal(coll.where({a: 1}).length, 3);
+ assert.equal(coll.where({a: 2}).length, 1);
+ assert.equal(coll.where({a: 3}).length, 1);
+ assert.equal(coll.where({b: 1}).length, 0);
+ assert.equal(coll.where({b: 2}).length, 2);
+ assert.equal(coll.where({a: 1, b: 2}).length, 1);
+ assert.equal(coll.findWhere({a: 1}), model);
+ assert.equal(coll.findWhere({a: 4}), void 0);
+ });
+
+ QUnit.test('Underscore methods', function(assert) {
+ assert.expect(21);
+ assert.equal(col.map(function(model){ return model.get('label'); }).join(' '), 'a b c d');
+ assert.equal(col.some(function(model){ return model.id === 100; }), false);
+ assert.equal(col.some(function(model){ return model.id === 0; }), true);
+ assert.equal(col.reduce(function(m1, m2) {return m1.id > m2.id ? m1 : m2;}).id, 3);
+ assert.equal(col.reduceRight(function(m1, m2) {return m1.id > m2.id ? m1 : m2;}).id, 3);
+ assert.equal(col.indexOf(b), 1);
+ assert.equal(col.size(), 4);
+ assert.equal(col.rest().length, 3);
+ assert.ok(!_.includes(col.rest(), a));
+ assert.ok(_.includes(col.rest(), d));
+ assert.ok(!col.isEmpty());
+ assert.ok(!_.includes(col.without(d), d));
+
+ var wrapped = col.chain();
+ assert.equal(wrapped.map('id').max().value(), 3);
+ assert.equal(wrapped.map('id').min().value(), 0);
+ assert.deepEqual(wrapped
+ .filter(function(o){ return o.id % 2 === 0; })
+ .map(function(o){ return o.id * 2; })
+ .value(),
+ [4, 0]);
+ assert.deepEqual(col.difference([c, d]), [a, b]);
+ assert.ok(col.includes(col.sample()));
+
+ var first = col.first();
+ assert.deepEqual(col.groupBy(function(model){ return model.id; })[first.id], [first]);
+ assert.deepEqual(col.countBy(function(model){ return model.id; }), {0: 1, 1: 1, 2: 1, 3: 1});
+ assert.deepEqual(col.sortBy(function(model){ return model.id; })[0], col.at(3));
+ assert.ok(col.indexBy('id')[first.id] === first);
+ });
+
+ QUnit.test('Underscore methods with object-style and property-style iteratee', function(assert) {
+ assert.expect(26);
+ var model = new Backbone.Model({a: 4, b: 1, e: 3});
+ var coll = new Backbone.Collection([
+ {a: 1, b: 1},
+ {a: 2, b: 1, c: 1},
+ {a: 3, b: 1},
+ model
+ ]);
+ assert.equal(coll.find({a: 0}), undefined);
+ assert.deepEqual(coll.find({a: 4}), model);
+ assert.equal(coll.find('d'), undefined);
+ assert.deepEqual(coll.find('e'), model);
+ assert.equal(coll.filter({a: 0}), false);
+ assert.deepEqual(coll.filter({a: 4}), [model]);
+ assert.equal(coll.some({a: 0}), false);
+ assert.equal(coll.some({a: 1}), true);
+ assert.equal(coll.reject({a: 0}).length, 4);
+ assert.deepEqual(coll.reject({a: 4}), _.without(coll.models, model));
+ assert.equal(coll.every({a: 0}), false);
+ assert.equal(coll.every({b: 1}), true);
+ assert.deepEqual(coll.partition({a: 0})[0], []);
+ assert.deepEqual(coll.partition({a: 0})[1], coll.models);
+ assert.deepEqual(coll.partition({a: 4})[0], [model]);
+ assert.deepEqual(coll.partition({a: 4})[1], _.without(coll.models, model));
+ assert.deepEqual(coll.map({a: 2}), [false, true, false, false]);
+ assert.deepEqual(coll.map('a'), [1, 2, 3, 4]);
+ assert.deepEqual(coll.sortBy('a')[3], model);
+ assert.deepEqual(coll.sortBy('e')[0], model);
+ assert.deepEqual(coll.countBy({a: 4}), {'false': 3, 'true': 1});
+ assert.deepEqual(coll.countBy('d'), {'undefined': 4});
+ assert.equal(coll.findIndex({b: 1}), 0);
+ assert.equal(coll.findIndex({b: 9}), -1);
+ assert.equal(coll.findLastIndex({b: 1}), 3);
+ assert.equal(coll.findLastIndex({b: 9}), -1);
+ });
+
+ QUnit.test('reset', function(assert) {
+ assert.expect(16);
+
+ var resetCount = 0;
+ var models = col.models;
+ col.on('reset', function() { resetCount += 1; });
+ col.reset([]);
+ assert.equal(resetCount, 1);
+ assert.equal(col.length, 0);
+ assert.equal(col.last(), null);
+ col.reset(models);
+ assert.equal(resetCount, 2);
+ assert.equal(col.length, 4);
+ assert.equal(col.last(), d);
+ col.reset(_.map(models, function(m){ return m.attributes; }));
+ assert.equal(resetCount, 3);
+ assert.equal(col.length, 4);
+ assert.ok(col.last() !== d);
+ assert.ok(_.isEqual(col.last().attributes, d.attributes));
+ col.reset();
+ assert.equal(col.length, 0);
+ assert.equal(resetCount, 4);
+
+ var f = new Backbone.Model({id: 20, label: 'f'});
+ col.reset([undefined, f]);
+ assert.equal(col.length, 2);
+ assert.equal(resetCount, 5);
+
+ col.reset(new Array(4));
+ assert.equal(col.length, 4);
+ assert.equal(resetCount, 6);
+ });
+
+ QUnit.test('reset with different values', function(assert) {
+ var collection = new Backbone.Collection({id: 1});
+ collection.reset({id: 1, a: 1});
+ assert.equal(collection.get(1).get('a'), 1);
+ });
+
+ QUnit.test('same references in reset', function(assert) {
+ var model = new Backbone.Model({id: 1});
+ var collection = new Backbone.Collection({id: 1});
+ collection.reset(model);
+ assert.equal(collection.get(1), model);
+ });
+
+ QUnit.test('reset passes caller options', function(assert) {
+ assert.expect(3);
+ var Model = Backbone.Model.extend({
+ initialize: function(attrs, options) {
+ this.modelParameter = options.modelParameter;
+ }
+ });
+ var collection = new (Backbone.Collection.extend({model: Model}))();
+ collection.reset([{astring: 'green', anumber: 1}, {astring: 'blue', anumber: 2}], {modelParameter: 'model parameter'});
+ assert.equal(collection.length, 2);
+ collection.each(function(model) {
+ assert.equal(model.modelParameter, 'model parameter');
+ });
+ });
+
+ QUnit.test('reset does not alter options by reference', function(assert) {
+ assert.expect(2);
+ var collection = new Backbone.Collection([{id: 1}]);
+ var origOpts = {};
+ collection.on('reset', function(coll, opts){
+ assert.equal(origOpts.previousModels, undefined);
+ assert.equal(opts.previousModels[0].id, 1);
+ });
+ collection.reset([], origOpts);
+ });
+
+ QUnit.test('trigger custom events on models', function(assert) {
+ assert.expect(1);
+ var fired = null;
+ a.on('custom', function() { fired = true; });
+ a.trigger('custom');
+ assert.equal(fired, true);
+ });
+
+ QUnit.test('add does not alter arguments', function(assert) {
+ assert.expect(2);
+ var attrs = {};
+ var models = [attrs];
+ new Backbone.Collection().add(models);
+ assert.equal(models.length, 1);
+ assert.ok(attrs === models[0]);
+ });
+
+ QUnit.test('#714: access `model.collection` in a brand new model.', function(assert) {
+ assert.expect(2);
+ var collection = new Backbone.Collection;
+ collection.url = '/test';
+ var Model = Backbone.Model.extend({
+ set: function(attrs) {
+ assert.equal(attrs.prop, 'value');
+ assert.equal(this.collection, collection);
+ return this;
+ }
+ });
+ collection.model = Model;
+ collection.create({prop: 'value'});
+ });
+
+ QUnit.test('#574, remove its own reference to the .models array.', function(assert) {
+ assert.expect(2);
+ var collection = new Backbone.Collection([
+ {id: 1}, {id: 2}, {id: 3}, {id: 4}, {id: 5}, {id: 6}
+ ]);
+ assert.equal(collection.length, 6);
+ collection.remove(collection.models);
+ assert.equal(collection.length, 0);
+ });
+
+ QUnit.test('#861, adding models to a collection which do not pass validation, with validate:true', function(assert) {
+ assert.expect(2);
+ var Model = Backbone.Model.extend({
+ validate: function(attrs) {
+ if (attrs.id === 3) return "id can't be 3";
+ }
+ });
+
+ var Collection = Backbone.Collection.extend({
+ model: Model
+ });
+
+ var collection = new Collection;
+ collection.on('invalid', function() { assert.ok(true); });
+
+ collection.add([{id: 1}, {id: 2}, {id: 3}, {id: 4}, {id: 5}, {id: 6}], {validate: true});
+ assert.deepEqual(collection.pluck('id'), [1, 2, 4, 5, 6]);
+ });
+
+ QUnit.test('Invalid models are discarded with validate:true.', function(assert) {
+ assert.expect(5);
+ var collection = new Backbone.Collection;
+ collection.on('test', function() { assert.ok(true); });
+ collection.model = Backbone.Model.extend({
+ validate: function(attrs){ if (!attrs.valid) return 'invalid'; }
+ });
+ var model = new collection.model({id: 1, valid: true});
+ collection.add([model, {id: 2}], {validate: true});
+ model.trigger('test');
+ assert.ok(collection.get(model.cid));
+ assert.ok(collection.get(1));
+ assert.ok(!collection.get(2));
+ assert.equal(collection.length, 1);
+ });
+
+ QUnit.test('multiple copies of the same model', function(assert) {
+ assert.expect(3);
+ var collection = new Backbone.Collection();
+ var model = new Backbone.Model();
+ collection.add([model, model]);
+ assert.equal(collection.length, 1);
+ collection.add([{id: 1}, {id: 1}]);
+ assert.equal(collection.length, 2);
+ assert.equal(collection.last().id, 1);
+ });
+
+ QUnit.test('#964 - collection.get return inconsistent', function(assert) {
+ assert.expect(2);
+ var collection = new Backbone.Collection();
+ assert.ok(collection.get(null) === undefined);
+ assert.ok(collection.get() === undefined);
+ });
+
+ QUnit.test('#1112 - passing options.model sets collection.model', function(assert) {
+ assert.expect(2);
+ var Model = Backbone.Model.extend({});
+ var collection = new Backbone.Collection([{id: 1}], {model: Model});
+ assert.ok(collection.model === Model);
+ assert.ok(collection.at(0) instanceof Model);
+ });
+
+ QUnit.test('null and undefined are invalid ids.', function(assert) {
+ assert.expect(2);
+ var model = new Backbone.Model({id: 1});
+ var collection = new Backbone.Collection([model]);
+ model.set({id: null});
+ assert.ok(!collection.get('null'));
+ model.set({id: 1});
+ model.set({id: undefined});
+ assert.ok(!collection.get('undefined'));
+ });
+
+ QUnit.test('falsy comparator', function(assert) {
+ assert.expect(4);
+ var Col = Backbone.Collection.extend({
+ comparator: function(model){ return model.id; }
+ });
+ var collection = new Col();
+ var colFalse = new Col(null, {comparator: false});
+ var colNull = new Col(null, {comparator: null});
+ var colUndefined = new Col(null, {comparator: undefined});
+ assert.ok(collection.comparator);
+ assert.ok(!colFalse.comparator);
+ assert.ok(!colNull.comparator);
+ assert.ok(colUndefined.comparator);
+ });
+
+ QUnit.test('#1355 - `options` is passed to success callbacks', function(assert) {
+ assert.expect(2);
+ var m = new Backbone.Model({x: 1});
+ var collection = new Backbone.Collection();
+ var opts = {
+ opts: true,
+ success: function(coll, resp, options) {
+ assert.ok(options.opts);
+ }
+ };
+ collection.sync = m.sync = function( method, coll, options ){
+ options.success({});
+ };
+ collection.fetch(opts);
+ collection.create(m, opts);
+ });
+
+ QUnit.test("#1412 - Trigger 'request' and 'sync' events.", function(assert) {
+ assert.expect(4);
+ var collection = new Backbone.Collection;
+ collection.url = '/test';
+ Backbone.ajax = function(settings){ settings.success(); };
+
+ collection.on('request', function(obj, xhr, options) {
+ assert.ok(obj === collection, "collection has correct 'request' event after fetching");
+ });
+ collection.on('sync', function(obj, response, options) {
+ assert.ok(obj === collection, "collection has correct 'sync' event after fetching");
+ });
+ collection.fetch();
+ collection.off();
+
+ collection.on('request', function(obj, xhr, options) {
+ assert.ok(obj === collection.get(1), "collection has correct 'request' event after one of its models save");
+ });
+ collection.on('sync', function(obj, response, options) {
+ assert.ok(obj === collection.get(1), "collection has correct 'sync' event after one of its models save");
+ });
+ collection.create({id: 1});
+ collection.off();
+ });
+
+ QUnit.test('#3283 - fetch, create calls success with context', function(assert) {
+ assert.expect(2);
+ var collection = new Backbone.Collection;
+ collection.url = '/test';
+ Backbone.ajax = function(settings) {
+ settings.success.call(settings.context);
+ };
+ var obj = {};
+ var options = {
+ context: obj,
+ success: function() {
+ assert.equal(this, obj);
+ }
+ };
+
+ collection.fetch(options);
+ collection.create({id: 1}, options);
+ });
+
+ QUnit.test('#1447 - create with wait adds model.', function(assert) {
+ assert.expect(1);
+ var collection = new Backbone.Collection;
+ var model = new Backbone.Model;
+ model.sync = function(method, m, options){ options.success(); };
+ collection.on('add', function(){ assert.ok(true); });
+ collection.create(model, {wait: true});
+ });
+
+ QUnit.test('#1448 - add sorts collection after merge.', function(assert) {
+ assert.expect(1);
+ var collection = new Backbone.Collection([
+ {id: 1, x: 1},
+ {id: 2, x: 2}
+ ]);
+ collection.comparator = function(model){ return model.get('x'); };
+ collection.add({id: 1, x: 3}, {merge: true});
+ assert.deepEqual(collection.pluck('id'), [2, 1]);
+ });
+
+ QUnit.test('#1655 - groupBy can be used with a string argument.', function(assert) {
+ assert.expect(3);
+ var collection = new Backbone.Collection([{x: 1}, {x: 2}]);
+ var grouped = collection.groupBy('x');
+ assert.strictEqual(_.keys(grouped).length, 2);
+ assert.strictEqual(grouped[1][0].get('x'), 1);
+ assert.strictEqual(grouped[2][0].get('x'), 2);
+ });
+
+ QUnit.test('#1655 - sortBy can be used with a string argument.', function(assert) {
+ assert.expect(1);
+ var collection = new Backbone.Collection([{x: 3}, {x: 1}, {x: 2}]);
+ var values = _.map(collection.sortBy('x'), function(model) {
+ return model.get('x');
+ });
+ assert.deepEqual(values, [1, 2, 3]);
+ });
+
+ QUnit.test('#1604 - Removal during iteration.', function(assert) {
+ assert.expect(0);
+ var collection = new Backbone.Collection([{}, {}]);
+ collection.on('add', function() {
+ collection.at(0).destroy();
+ });
+ collection.add({}, {at: 0});
+ });
+
+ QUnit.test('#1638 - `sort` during `add` triggers correctly.', function(assert) {
+ var collection = new Backbone.Collection;
+ collection.comparator = function(model) { return model.get('x'); };
+ var added = [];
+ collection.on('add', function(model) {
+ model.set({x: 3});
+ collection.sort();
+ added.push(model.id);
+ });
+ collection.add([{id: 1, x: 1}, {id: 2, x: 2}]);
+ assert.deepEqual(added, [1, 2]);
+ });
+
+ QUnit.test('fetch parses models by default', function(assert) {
+ assert.expect(1);
+ var model = {};
+ var Collection = Backbone.Collection.extend({
+ url: 'test',
+ model: Backbone.Model.extend({
+ parse: function(resp) {
+ assert.strictEqual(resp, model);
+ }
+ })
+ });
+ new Collection().fetch();
+ this.ajaxSettings.success([model]);
+ });
+
+ QUnit.test("`sort` shouldn't always fire on `add`", function(assert) {
+ assert.expect(1);
+ var collection = new Backbone.Collection([{id: 1}, {id: 2}, {id: 3}], {
+ comparator: 'id'
+ });
+ collection.sort = function(){ assert.ok(true); };
+ collection.add([]);
+ collection.add({id: 1});
+ collection.add([{id: 2}, {id: 3}]);
+ collection.add({id: 4});
+ });
+
+ QUnit.test('#1407 parse option on constructor parses collection and models', function(assert) {
+ assert.expect(2);
+ var model = {
+ namespace: [{id: 1}, {id: 2}]
+ };
+ var Collection = Backbone.Collection.extend({
+ model: Backbone.Model.extend({
+ parse: function(m) {
+ m.name = 'test';
+ return m;
+ }
+ }),
+ parse: function(m) {
+ return m.namespace;
+ }
+ });
+ var collection = new Collection(model, {parse: true});
+
+ assert.equal(collection.length, 2);
+ assert.equal(collection.at(0).get('name'), 'test');
+ });
+
+ QUnit.test('#1407 parse option on reset parses collection and models', function(assert) {
+ assert.expect(2);
+ var model = {
+ namespace: [{id: 1}, {id: 2}]
+ };
+ var Collection = Backbone.Collection.extend({
+ model: Backbone.Model.extend({
+ parse: function(m) {
+ m.name = 'test';
+ return m;
+ }
+ }),
+ parse: function(m) {
+ return m.namespace;
+ }
+ });
+ var collection = new Collection();
+ collection.reset(model, {parse: true});
+
+ assert.equal(collection.length, 2);
+ assert.equal(collection.at(0).get('name'), 'test');
+ });
+
+
+ QUnit.test('Reset includes previous models in triggered event.', function(assert) {
+ assert.expect(1);
+ var model = new Backbone.Model();
+ var collection = new Backbone.Collection([model]);
+ collection.on('reset', function(coll, options) {
+ assert.deepEqual(options.previousModels, [model]);
+ });
+ collection.reset([]);
+ });
+
+ QUnit.test('set', function(assert) {
+ var m1 = new Backbone.Model();
+ var m2 = new Backbone.Model({id: 2});
+ var m3 = new Backbone.Model();
+ var collection = new Backbone.Collection([m1, m2]);
+
+ // Test add/change/remove events
+ collection.on('add', function(model) {
+ assert.strictEqual(model, m3);
+ });
+ collection.on('change', function(model) {
+ assert.strictEqual(model, m2);
+ });
+ collection.on('remove', function(model) {
+ assert.strictEqual(model, m1);
+ });
+
+ // remove: false doesn't remove any models
+ collection.set([], {remove: false});
+ assert.strictEqual(collection.length, 2);
+
+ // add: false doesn't add any models
+ collection.set([m1, m2, m3], {add: false});
+ assert.strictEqual(collection.length, 2);
+
+ // merge: false doesn't change any models
+ collection.set([m1, {id: 2, a: 1}], {merge: false});
+ assert.strictEqual(m2.get('a'), void 0);
+
+ // add: false, remove: false only merges existing models
+ collection.set([m1, {id: 2, a: 0}, m3, {id: 4}], {add: false, remove: false});
+ assert.strictEqual(collection.length, 2);
+ assert.strictEqual(m2.get('a'), 0);
+
+ // default options add/remove/merge as appropriate
+ collection.set([{id: 2, a: 1}, m3]);
+ assert.strictEqual(collection.length, 2);
+ assert.strictEqual(m2.get('a'), 1);
+
+ // Test removing models not passing an argument
+ collection.off('remove').on('remove', function(model) {
+ assert.ok(model === m2 || model === m3);
+ });
+ collection.set([]);
+ assert.strictEqual(collection.length, 0);
+
+ // Test null models on set doesn't clear collection
+ collection.off();
+ collection.set([{id: 1}]);
+ collection.set();
+ assert.strictEqual(collection.length, 1);
+ });
+
+ QUnit.test('set with only cids', function(assert) {
+ assert.expect(3);
+ var m1 = new Backbone.Model;
+ var m2 = new Backbone.Model;
+ var collection = new Backbone.Collection;
+ collection.set([m1, m2]);
+ assert.equal(collection.length, 2);
+ collection.set([m1]);
+ assert.equal(collection.length, 1);
+ collection.set([m1, m1, m1, m2, m2], {remove: false});
+ assert.equal(collection.length, 2);
+ });
+
+ QUnit.test('set with only idAttribute', function(assert) {
+ assert.expect(3);
+ var m1 = {_id: 1};
+ var m2 = {_id: 2};
+ var Col = Backbone.Collection.extend({
+ model: Backbone.Model.extend({
+ idAttribute: '_id'
+ })
+ });
+ var collection = new Col;
+ collection.set([m1, m2]);
+ assert.equal(collection.length, 2);
+ collection.set([m1]);
+ assert.equal(collection.length, 1);
+ collection.set([m1, m1, m1, m2, m2], {remove: false});
+ assert.equal(collection.length, 2);
+ });
+
+ QUnit.test('set + merge with default values defined', function(assert) {
+ var Model = Backbone.Model.extend({
+ defaults: {
+ key: 'value'
+ }
+ });
+ var m = new Model({id: 1});
+ var collection = new Backbone.Collection([m], {model: Model});
+ assert.equal(collection.first().get('key'), 'value');
+
+ collection.set({id: 1, key: 'other'});
+ assert.equal(collection.first().get('key'), 'other');
+
+ collection.set({id: 1, other: 'value'});
+ assert.equal(collection.first().get('key'), 'other');
+ assert.equal(collection.length, 1);
+ });
+
+ QUnit.test('merge without mutation', function(assert) {
+ var Model = Backbone.Model.extend({
+ initialize: function(attrs, options) {
+ if (attrs.child) {
+ this.set('child', new Model(attrs.child, options), options);
+ }
+ }
+ });
+ var Collection = Backbone.Collection.extend({model: Model});
+ var data = [{id: 1, child: {id: 2}}];
+ var collection = new Collection(data);
+ assert.equal(collection.first().id, 1);
+ collection.set(data);
+ assert.equal(collection.first().id, 1);
+ collection.set([{id: 2, child: {id: 2}}].concat(data));
+ assert.deepEqual(collection.pluck('id'), [2, 1]);
+ });
+
+ QUnit.test('`set` and model level `parse`', function(assert) {
+ var Model = Backbone.Model.extend({});
+ var Collection = Backbone.Collection.extend({
+ model: Model,
+ parse: function(res) { return _.map(res.models, 'model'); }
+ });
+ var model = new Model({id: 1});
+ var collection = new Collection(model);
+ collection.set({models: [
+ {model: {id: 1}},
+ {model: {id: 2}}
+ ]}, {parse: true});
+ assert.equal(collection.first(), model);
+ });
+
+ QUnit.test('`set` data is only parsed once', function(assert) {
+ var collection = new Backbone.Collection();
+ collection.model = Backbone.Model.extend({
+ parse: function(data) {
+ assert.equal(data.parsed, void 0);
+ data.parsed = true;
+ return data;
+ }
+ });
+ collection.set({}, {parse: true});
+ });
+
+ QUnit.test('`set` matches input order in the absence of a comparator', function(assert) {
+ var one = new Backbone.Model({id: 1});
+ var two = new Backbone.Model({id: 2});
+ var three = new Backbone.Model({id: 3});
+ var collection = new Backbone.Collection([one, two, three]);
+ collection.set([{id: 3}, {id: 2}, {id: 1}]);
+ assert.deepEqual(collection.models, [three, two, one]);
+ collection.set([{id: 1}, {id: 2}]);
+ assert.deepEqual(collection.models, [one, two]);
+ collection.set([two, three, one]);
+ assert.deepEqual(collection.models, [two, three, one]);
+ collection.set([{id: 1}, {id: 2}], {remove: false});
+ assert.deepEqual(collection.models, [two, three, one]);
+ collection.set([{id: 1}, {id: 2}, {id: 3}], {merge: false});
+ assert.deepEqual(collection.models, [one, two, three]);
+ collection.set([three, two, one, {id: 4}], {add: false});
+ assert.deepEqual(collection.models, [one, two, three]);
+ });
+
+ QUnit.test('#1894 - Push should not trigger a sort', function(assert) {
+ assert.expect(0);
+ var Collection = Backbone.Collection.extend({
+ comparator: 'id',
+ sort: function() { assert.ok(false); }
+ });
+ new Collection().push({id: 1});
+ });
+
+ QUnit.test('#2428 - push duplicate models, return the correct one', function(assert) {
+ assert.expect(1);
+ var collection = new Backbone.Collection;
+ var model1 = collection.push({id: 101});
+ var model2 = collection.push({id: 101});
+ assert.ok(model2.cid === model1.cid);
+ });
+
+ QUnit.test('`set` with non-normal id', function(assert) {
+ var Collection = Backbone.Collection.extend({
+ model: Backbone.Model.extend({idAttribute: '_id'})
+ });
+ var collection = new Collection({_id: 1});
+ collection.set([{_id: 1, a: 1}], {add: false});
+ assert.equal(collection.first().get('a'), 1);
+ });
+
+ QUnit.test('#1894 - `sort` can optionally be turned off', function(assert) {
+ assert.expect(0);
+ var Collection = Backbone.Collection.extend({
+ comparator: 'id',
+ sort: function() { assert.ok(false); }
+ });
+ new Collection().add({id: 1}, {sort: false});
+ });
+
+ QUnit.test('#1915 - `parse` data in the right order in `set`', function(assert) {
+ var collection = new (Backbone.Collection.extend({
+ parse: function(data) {
+ assert.strictEqual(data.status, 'ok');
+ return data.data;
+ }
+ }));
+ var res = {status: 'ok', data: [{id: 1}]};
+ collection.set(res, {parse: true});
+ });
+
+ QUnit.test('#1939 - `parse` is passed `options`', function(assert) {
+ var done = assert.async();
+ assert.expect(1);
+ var collection = new (Backbone.Collection.extend({
+ url: '/',
+ parse: function(data, options) {
+ assert.strictEqual(options.xhr.someHeader, 'headerValue');
+ return data;
+ }
+ }));
+ var ajax = Backbone.ajax;
+ Backbone.ajax = function(params) {
+ _.defer(params.success, []);
+ return {someHeader: 'headerValue'};
+ };
+ collection.fetch({
+ success: function() { done(); }
+ });
+ Backbone.ajax = ajax;
+ });
+
+ QUnit.test('fetch will pass extra options to success callback', function(assert) {
+ assert.expect(1);
+ var SpecialSyncCollection = Backbone.Collection.extend({
+ url: '/test',
+ sync: function(method, collection, options) {
+ _.extend(options, {specialSync: true});
+ return Backbone.Collection.prototype.sync.call(this, method, collection, options);
+ }
+ });
+
+ var collection = new SpecialSyncCollection();
+
+ var onSuccess = function(coll, resp, options) {
+ assert.ok(options.specialSync, 'Options were passed correctly to callback');
+ };
+
+ collection.fetch({success: onSuccess});
+ this.ajaxSettings.success();
+ });
+
+ QUnit.test('`add` only `sort`s when necessary', function(assert) {
+ assert.expect(2);
+ var collection = new (Backbone.Collection.extend({
+ comparator: 'a'
+ }))([{id: 1}, {id: 2}, {id: 3}]);
+ collection.on('sort', function() { assert.ok(true); });
+ collection.add({id: 4}); // do sort, new model
+ collection.add({id: 1, a: 1}, {merge: true}); // do sort, comparator change
+ collection.add({id: 1, b: 1}, {merge: true}); // don't sort, no comparator change
+ collection.add({id: 1, a: 1}, {merge: true}); // don't sort, no comparator change
+ collection.add(collection.models); // don't sort, nothing new
+ collection.add(collection.models, {merge: true}); // don't sort
+ });
+
+ QUnit.test('`add` only `sort`s when necessary with comparator function', function(assert) {
+ assert.expect(3);
+ var collection = new (Backbone.Collection.extend({
+ comparator: function(m1, m2) {
+ return m1.get('a') > m2.get('a') ? 1 : (m1.get('a') < m2.get('a') ? -1 : 0);
+ }
+ }))([{id: 1}, {id: 2}, {id: 3}]);
+ collection.on('sort', function() { assert.ok(true); });
+ collection.add({id: 4}); // do sort, new model
+ collection.add({id: 1, a: 1}, {merge: true}); // do sort, model change
+ collection.add({id: 1, b: 1}, {merge: true}); // do sort, model change
+ collection.add({id: 1, a: 1}, {merge: true}); // don't sort, no model change
+ collection.add(collection.models); // don't sort, nothing new
+ collection.add(collection.models, {merge: true}); // don't sort
+ });
+
+ QUnit.test('Attach options to collection.', function(assert) {
+ assert.expect(2);
+ var Model = Backbone.Model;
+ var comparator = function(){};
+
+ var collection = new Backbone.Collection([], {
+ model: Model,
+ comparator: comparator
+ });
+
+ assert.ok(collection.model === Model);
+ assert.ok(collection.comparator === comparator);
+ });
+
+ QUnit.test('Pass falsey for `models` for empty Col with `options`', function(assert) {
+ assert.expect(9);
+ var opts = {a: 1, b: 2};
+ _.forEach([undefined, null, false], function(falsey) {
+ var Collection = Backbone.Collection.extend({
+ initialize: function(models, options) {
+ assert.strictEqual(models, falsey);
+ assert.strictEqual(options, opts);
+ }
+ });
+
+ var collection = new Collection(falsey, opts);
+ assert.strictEqual(collection.length, 0);
+ });
+ });
+
+ QUnit.test('`add` overrides `set` flags', function(assert) {
+ var collection = new Backbone.Collection();
+ collection.once('add', function(model, coll, options) {
+ coll.add({id: 2}, options);
+ });
+ collection.set({id: 1});
+ assert.equal(collection.length, 2);
+ });
+
+ QUnit.test('#2606 - Collection#create, success arguments', function(assert) {
+ assert.expect(1);
+ var collection = new Backbone.Collection;
+ collection.url = 'test';
+ collection.create({}, {
+ success: function(model, resp, options) {
+ assert.strictEqual(resp, 'response');
+ }
+ });
+ this.ajaxSettings.success('response');
+ });
+
+ QUnit.test('#2612 - nested `parse` works with `Collection#set`', function(assert) {
+
+ var Job = Backbone.Model.extend({
+ constructor: function() {
+ this.items = new Items();
+ Backbone.Model.apply(this, arguments);
+ },
+ parse: function(attrs) {
+ this.items.set(attrs.items, {parse: true});
+ return _.omit(attrs, 'items');
+ }
+ });
+
+ var Item = Backbone.Model.extend({
+ constructor: function() {
+ this.subItems = new Backbone.Collection();
+ Backbone.Model.apply(this, arguments);
+ },
+ parse: function(attrs) {
+ this.subItems.set(attrs.subItems, {parse: true});
+ return _.omit(attrs, 'subItems');
+ }
+ });
+
+ var Items = Backbone.Collection.extend({
+ model: Item
+ });
+
+ var data = {
+ name: 'JobName',
+ id: 1,
+ items: [{
+ id: 1,
+ name: 'Sub1',
+ subItems: [
+ {id: 1, subName: 'One'},
+ {id: 2, subName: 'Two'}
+ ]
+ }, {
+ id: 2,
+ name: 'Sub2',
+ subItems: [
+ {id: 3, subName: 'Three'},
+ {id: 4, subName: 'Four'}
+ ]
+ }]
+ };
+
+ var newData = {
+ name: 'NewJobName',
+ id: 1,
+ items: [{
+ id: 1,
+ name: 'NewSub1',
+ subItems: [
+ {id: 1, subName: 'NewOne'},
+ {id: 2, subName: 'NewTwo'}
+ ]
+ }, {
+ id: 2,
+ name: 'NewSub2',
+ subItems: [
+ {id: 3, subName: 'NewThree'},
+ {id: 4, subName: 'NewFour'}
+ ]
+ }]
+ };
+
+ var job = new Job(data, {parse: true});
+ assert.equal(job.get('name'), 'JobName');
+ assert.equal(job.items.at(0).get('name'), 'Sub1');
+ assert.equal(job.items.length, 2);
+ assert.equal(job.items.get(1).subItems.get(1).get('subName'), 'One');
+ assert.equal(job.items.get(2).subItems.get(3).get('subName'), 'Three');
+ job.set(job.parse(newData, {parse: true}));
+ assert.equal(job.get('name'), 'NewJobName');
+ assert.equal(job.items.at(0).get('name'), 'NewSub1');
+ assert.equal(job.items.length, 2);
+ assert.equal(job.items.get(1).subItems.get(1).get('subName'), 'NewOne');
+ assert.equal(job.items.get(2).subItems.get(3).get('subName'), 'NewThree');
+ });
+
+ QUnit.test('_addReference binds all collection events & adds to the lookup hashes', function(assert) {
+ assert.expect(8);
+
+ var calls = {add: 0, remove: 0};
+
+ var Collection = Backbone.Collection.extend({
+
+ _addReference: function(model) {
+ Backbone.Collection.prototype._addReference.apply(this, arguments);
+ calls.add++;
+ assert.equal(model, this._byId[model.id]);
+ assert.equal(model, this._byId[model.cid]);
+ assert.equal(model._events.all.length, 1);
+ },
+
+ _removeReference: function(model) {
+ Backbone.Collection.prototype._removeReference.apply(this, arguments);
+ calls.remove++;
+ assert.equal(this._byId[model.id], void 0);
+ assert.equal(this._byId[model.cid], void 0);
+ assert.equal(model.collection, void 0);
+ }
+
+ });
+
+ var collection = new Collection();
+ var model = collection.add({id: 1});
+ collection.remove(model);
+
+ assert.equal(calls.add, 1);
+ assert.equal(calls.remove, 1);
+ });
+
+ QUnit.test('Do not allow duplicate models to be `add`ed or `set`', function(assert) {
+ var collection = new Backbone.Collection();
+
+ collection.add([{id: 1}, {id: 1}]);
+ assert.equal(collection.length, 1);
+ assert.equal(collection.models.length, 1);
+
+ collection.set([{id: 1}, {id: 1}]);
+ assert.equal(collection.length, 1);
+ assert.equal(collection.models.length, 1);
+ });
+
+ QUnit.test('#3020: #set with {add: false} should not throw.', function(assert) {
+ assert.expect(2);
+ var collection = new Backbone.Collection;
+ collection.set([{id: 1}], {add: false});
+ assert.strictEqual(collection.length, 0);
+ assert.strictEqual(collection.models.length, 0);
+ });
+
+ QUnit.test('create with wait, model instance, #3028', function(assert) {
+ assert.expect(1);
+ var collection = new Backbone.Collection();
+ var model = new Backbone.Model({id: 1});
+ model.sync = function(){
+ assert.equal(this.collection, collection);
+ };
+ collection.create(model, {wait: true});
+ });
+
+ QUnit.test('modelId', function(assert) {
+ var Stooge = Backbone.Model.extend();
+ var StoogeCollection = Backbone.Collection.extend({model: Stooge});
+
+ // Default to using `Collection::model::idAttribute`.
+ assert.equal(StoogeCollection.prototype.modelId({id: 1}), 1);
+ Stooge.prototype.idAttribute = '_id';
+ assert.equal(StoogeCollection.prototype.modelId({_id: 1}), 1);
+ });
+
+ QUnit.test('Polymorphic models work with "simple" constructors', function(assert) {
+ var A = Backbone.Model.extend();
+ var B = Backbone.Model.extend();
+ var C = Backbone.Collection.extend({
+ model: function(attrs) {
+ return attrs.type === 'a' ? new A(attrs) : new B(attrs);
+ }
+ });
+ var collection = new C([{id: 1, type: 'a'}, {id: 2, type: 'b'}]);
+ assert.equal(collection.length, 2);
+ assert.ok(collection.at(0) instanceof A);
+ assert.equal(collection.at(0).id, 1);
+ assert.ok(collection.at(1) instanceof B);
+ assert.equal(collection.at(1).id, 2);
+ });
+
+ QUnit.test('Polymorphic models work with "advanced" constructors', function(assert) {
+ var A = Backbone.Model.extend({idAttribute: '_id'});
+ var B = Backbone.Model.extend({idAttribute: '_id'});
+ var C = Backbone.Collection.extend({
+ model: Backbone.Model.extend({
+ constructor: function(attrs) {
+ return attrs.type === 'a' ? new A(attrs) : new B(attrs);
+ },
+
+ idAttribute: '_id'
+ })
+ });
+ var collection = new C([{_id: 1, type: 'a'}, {_id: 2, type: 'b'}]);
+ assert.equal(collection.length, 2);
+ assert.ok(collection.at(0) instanceof A);
+ assert.equal(collection.at(0), collection.get(1));
+ assert.ok(collection.at(1) instanceof B);
+ assert.equal(collection.at(1), collection.get(2));
+
+ C = Backbone.Collection.extend({
+ model: function(attrs) {
+ return attrs.type === 'a' ? new A(attrs) : new B(attrs);
+ },
+
+ modelId: function(attrs) {
+ return attrs.type + '-' + attrs.id;
+ }
+ });
+ collection = new C([{id: 1, type: 'a'}, {id: 1, type: 'b'}]);
+ assert.equal(collection.length, 2);
+ assert.ok(collection.at(0) instanceof A);
+ assert.equal(collection.at(0), collection.get('a-1'));
+ assert.ok(collection.at(1) instanceof B);
+ assert.equal(collection.at(1), collection.get('b-1'));
+ });
+
+ QUnit.test('Collection with polymorphic models receives default id from modelId', function(assert) {
+ assert.expect(6);
+ // When the polymorphic models use 'id' for the idAttribute, all is fine.
+ var C1 = Backbone.Collection.extend({
+ model: function(attrs) {
+ return new Backbone.Model(attrs);
+ }
+ });
+ var c1 = new C1({id: 1});
+ assert.equal(c1.get(1).id, 1);
+ assert.equal(c1.modelId({id: 1}), 1);
+
+ // If the polymorphic models define their own idAttribute,
+ // the modelId method should be overridden, for the reason below.
+ var M = Backbone.Model.extend({
+ idAttribute: '_id'
+ });
+ var C2 = Backbone.Collection.extend({
+ model: function(attrs) {
+ return new M(attrs);
+ }
+ });
+ var c2 = new C2({'_id': 1});
+ assert.equal(c2.get(1), void 0);
+ assert.equal(c2.modelId(c2.at(0).attributes), void 0);
+ var m = new M({'_id': 2});
+ c2.add(m);
+ assert.equal(c2.get(2), void 0);
+ assert.equal(c2.modelId(m.attributes), void 0);
+ });
+
+ QUnit.test('#3039 #3951: adding at index fires with correct at', function(assert) {
+ assert.expect(4);
+ var collection = new Backbone.Collection([{val: 0}, {val: 4}]);
+ collection.on('add', function(model, coll, options) {
+ assert.equal(model.get('val'), options.index);
+ });
+ collection.add([{val: 1}, {val: 2}, {val: 3}], {at: 1});
+ collection.add({val: 5}, {at: 10});
+ });
+
+ QUnit.test('#3039: index is not sent when at is not specified', function(assert) {
+ assert.expect(2);
+ var collection = new Backbone.Collection([{at: 0}]);
+ collection.on('add', function(model, coll, options) {
+ assert.equal(undefined, options.index);
+ });
+ collection.add([{at: 1}, {at: 2}]);
+ });
+
+ QUnit.test('#3199 - Order changing should trigger a sort', function(assert) {
+ assert.expect(1);
+ var one = new Backbone.Model({id: 1});
+ var two = new Backbone.Model({id: 2});
+ var three = new Backbone.Model({id: 3});
+ var collection = new Backbone.Collection([one, two, three]);
+ collection.on('sort', function() {
+ assert.ok(true);
+ });
+ collection.set([{id: 3}, {id: 2}, {id: 1}]);
+ });
+
+ QUnit.test('#3199 - Adding a model should trigger a sort', function(assert) {
+ assert.expect(1);
+ var one = new Backbone.Model({id: 1});
+ var two = new Backbone.Model({id: 2});
+ var three = new Backbone.Model({id: 3});
+ var collection = new Backbone.Collection([one, two, three]);
+ collection.on('sort', function() {
+ assert.ok(true);
+ });
+ collection.set([{id: 1}, {id: 2}, {id: 3}, {id: 0}]);
+ });
+
+ QUnit.test('#3199 - Order not changing should not trigger a sort', function(assert) {
+ assert.expect(0);
+ var one = new Backbone.Model({id: 1});
+ var two = new Backbone.Model({id: 2});
+ var three = new Backbone.Model({id: 3});
+ var collection = new Backbone.Collection([one, two, three]);
+ collection.on('sort', function() {
+ assert.ok(false);
+ });
+ collection.set([{id: 1}, {id: 2}, {id: 3}]);
+ });
+
+ QUnit.test('add supports negative indexes', function(assert) {
+ assert.expect(1);
+ var collection = new Backbone.Collection([{id: 1}]);
+ collection.add([{id: 2}, {id: 3}], {at: -1});
+ collection.add([{id: 2.5}], {at: -2});
+ collection.add([{id: 0.5}], {at: -6});
+ assert.equal(collection.pluck('id').join(','), '0.5,1,2,2.5,3');
+ });
+
+ QUnit.test('#set accepts options.at as a string', function(assert) {
+ assert.expect(1);
+ var collection = new Backbone.Collection([{id: 1}, {id: 2}]);
+ collection.add([{id: 3}], {at: '1'});
+ assert.deepEqual(collection.pluck('id'), [1, 3, 2]);
+ });
+
+ QUnit.test('adding multiple models triggers `update` event once', function(assert) {
+ assert.expect(1);
+ var collection = new Backbone.Collection;
+ collection.on('update', function() { assert.ok(true); });
+ collection.add([{id: 1}, {id: 2}, {id: 3}]);
+ });
+
+ QUnit.test('removing models triggers `update` event once', function(assert) {
+ assert.expect(1);
+ var collection = new Backbone.Collection([{id: 1}, {id: 2}, {id: 3}]);
+ collection.on('update', function() { assert.ok(true); });
+ collection.remove([{id: 1}, {id: 2}]);
+ });
+
+ QUnit.test('remove does not trigger `update` when nothing removed', function(assert) {
+ assert.expect(0);
+ var collection = new Backbone.Collection([{id: 1}, {id: 2}]);
+ collection.on('update', function() { assert.ok(false); });
+ collection.remove([{id: 3}]);
+ });
+
+ QUnit.test('set triggers `set` event once', function(assert) {
+ assert.expect(1);
+ var collection = new Backbone.Collection([{id: 1}, {id: 2}]);
+ collection.on('update', function() { assert.ok(true); });
+ collection.set([{id: 1}, {id: 3}]);
+ });
+
+ QUnit.test('set does not trigger `update` event when nothing added nor removed', function(assert) {
+ var collection = new Backbone.Collection([{id: 1}, {id: 2}]);
+ collection.on('update', function(coll, options) {
+ assert.equal(options.changes.added.length, 0);
+ assert.equal(options.changes.removed.length, 0);
+ assert.equal(options.changes.merged.length, 2);
+ });
+ collection.set([{id: 1}, {id: 2}]);
+ });
+
+ QUnit.test('#3610 - invoke collects arguments', function(assert) {
+ assert.expect(3);
+ var Model = Backbone.Model.extend({
+ method: function(x, y, z) {
+ assert.equal(x, 1);
+ assert.equal(y, 2);
+ assert.equal(z, 3);
+ }
+ });
+ var Collection = Backbone.Collection.extend({
+ model: Model
+ });
+ var collection = new Collection([{id: 1}]);
+ collection.invoke('method', 1, 2, 3);
+ });
+
+ QUnit.test('#3662 - triggering change without model will not error', function(assert) {
+ assert.expect(1);
+ var collection = new Backbone.Collection([{id: 1}]);
+ var model = collection.first();
+ collection.on('change', function(m) {
+ assert.equal(m, undefined);
+ });
+ model.trigger('change');
+ });
+
+ QUnit.test('#3871 - falsy parse result creates empty collection', function(assert) {
+ var collection = new (Backbone.Collection.extend({
+ parse: function(data, options) {}
+ }));
+ collection.set('', {parse: true});
+ assert.equal(collection.length, 0);
+ });
+
+ QUnit.test("#3711 - remove's `update` event returns one removed model", function(assert) {
+ var model = new Backbone.Model({id: 1, title: 'First Post'});
+ var collection = new Backbone.Collection([model]);
+ collection.on('update', function(context, options) {
+ var changed = options.changes;
+ assert.deepEqual(changed.added, []);
+ assert.deepEqual(changed.merged, []);
+ assert.strictEqual(changed.removed[0], model);
+ });
+ collection.remove(model);
+ });
+
+ QUnit.test("#3711 - remove's `update` event returns multiple removed models", function(assert) {
+ var model = new Backbone.Model({id: 1, title: 'First Post'});
+ var model2 = new Backbone.Model({id: 2, title: 'Second Post'});
+ var collection = new Backbone.Collection([model, model2]);
+ collection.on('update', function(context, options) {
+ var changed = options.changes;
+ assert.deepEqual(changed.added, []);
+ assert.deepEqual(changed.merged, []);
+ assert.ok(changed.removed.length === 2);
+
+ assert.ok(_.indexOf(changed.removed, model) > -1 && _.indexOf(changed.removed, model2) > -1);
+ });
+ collection.remove([model, model2]);
+ });
+
+ QUnit.test("#3711 - set's `update` event returns one added model", function(assert) {
+ var model = new Backbone.Model({id: 1, title: 'First Post'});
+ var collection = new Backbone.Collection();
+ collection.on('update', function(context, options) {
+ var addedModels = options.changes.added;
+ assert.ok(addedModels.length === 1);
+ assert.strictEqual(addedModels[0], model);
+ });
+ collection.set(model);
+ });
+
+ QUnit.test("#3711 - set's `update` event returns multiple added models", function(assert) {
+ var model = new Backbone.Model({id: 1, title: 'First Post'});
+ var model2 = new Backbone.Model({id: 2, title: 'Second Post'});
+ var collection = new Backbone.Collection();
+ collection.on('update', function(context, options) {
+ var addedModels = options.changes.added;
+ assert.ok(addedModels.length === 2);
+ assert.strictEqual(addedModels[0], model);
+ assert.strictEqual(addedModels[1], model2);
+ });
+ collection.set([model, model2]);
+ });
+
+ QUnit.test("#3711 - set's `update` event returns one removed model", function(assert) {
+ var model = new Backbone.Model({id: 1, title: 'First Post'});
+ var model2 = new Backbone.Model({id: 2, title: 'Second Post'});
+ var model3 = new Backbone.Model({id: 3, title: 'My Last Post'});
+ var collection = new Backbone.Collection([model]);
+ collection.on('update', function(context, options) {
+ var changed = options.changes;
+ assert.equal(changed.added.length, 2);
+ assert.equal(changed.merged.length, 0);
+ assert.ok(changed.removed.length === 1);
+ assert.strictEqual(changed.removed[0], model);
+ });
+ collection.set([model2, model3]);
+ });
+
+ QUnit.test("#3711 - set's `update` event returns multiple removed models", function(assert) {
+ var model = new Backbone.Model({id: 1, title: 'First Post'});
+ var model2 = new Backbone.Model({id: 2, title: 'Second Post'});
+ var model3 = new Backbone.Model({id: 3, title: 'My Last Post'});
+ var collection = new Backbone.Collection([model, model2]);
+ collection.on('update', function(context, options) {
+ var removedModels = options.changes.removed;
+ assert.ok(removedModels.length === 2);
+ assert.strictEqual(removedModels[0], model);
+ assert.strictEqual(removedModels[1], model2);
+ });
+ collection.set([model3]);
+ });
+
+ QUnit.test("#3711 - set's `update` event returns one merged model", function(assert) {
+ var model = new Backbone.Model({id: 1, title: 'First Post'});
+ var model2 = new Backbone.Model({id: 2, title: 'Second Post'});
+ var model2Update = new Backbone.Model({id: 2, title: 'Second Post V2'});
+ var collection = new Backbone.Collection([model, model2]);
+ collection.on('update', function(context, options) {
+ var mergedModels = options.changes.merged;
+ assert.ok(mergedModels.length === 1);
+ assert.strictEqual(mergedModels[0].get('title'), model2Update.get('title'));
+ });
+ collection.set([model2Update]);
+ });
+
+ QUnit.test("#3711 - set's `update` event returns multiple merged models", function(assert) {
+ var model = new Backbone.Model({id: 1, title: 'First Post'});
+ var modelUpdate = new Backbone.Model({id: 1, title: 'First Post V2'});
+ var model2 = new Backbone.Model({id: 2, title: 'Second Post'});
+ var model2Update = new Backbone.Model({id: 2, title: 'Second Post V2'});
+ var collection = new Backbone.Collection([model, model2]);
+ collection.on('update', function(context, options) {
+ var mergedModels = options.changes.merged;
+ assert.ok(mergedModels.length === 2);
+ assert.strictEqual(mergedModels[0].get('title'), model2Update.get('title'));
+ assert.strictEqual(mergedModels[1].get('title'), modelUpdate.get('title'));
+ });
+ collection.set([model2Update, modelUpdate]);
+ });
+
+ QUnit.test("#3711 - set's `update` event should not be triggered adding a model which already exists exactly alike", function(assert) {
+ var fired = false;
+ var model = new Backbone.Model({id: 1, title: 'First Post'});
+ var collection = new Backbone.Collection([model]);
+ collection.on('update', function(context, options) {
+ fired = true;
+ });
+ collection.set([model]);
+ assert.equal(fired, false);
+ });
+
+})();
diff --git a/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/backbone/test/events.js b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/backbone/test/events.js
new file mode 100644
index 0000000..544b39a
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/backbone/test/events.js
@@ -0,0 +1,706 @@
+(function() {
+
+ QUnit.module('Backbone.Events');
+
+ QUnit.test('on and trigger', function(assert) {
+ assert.expect(2);
+ var obj = {counter: 0};
+ _.extend(obj, Backbone.Events);
+ obj.on('event', function() { obj.counter += 1; });
+ obj.trigger('event');
+ assert.equal(obj.counter, 1, 'counter should be incremented.');
+ obj.trigger('event');
+ obj.trigger('event');
+ obj.trigger('event');
+ obj.trigger('event');
+ assert.equal(obj.counter, 5, 'counter should be incremented five times.');
+ });
+
+ QUnit.test('binding and triggering multiple events', function(assert) {
+ assert.expect(4);
+ var obj = {counter: 0};
+ _.extend(obj, Backbone.Events);
+
+ obj.on('a b c', function() { obj.counter += 1; });
+
+ obj.trigger('a');
+ assert.equal(obj.counter, 1);
+
+ obj.trigger('a b');
+ assert.equal(obj.counter, 3);
+
+ obj.trigger('c');
+ assert.equal(obj.counter, 4);
+
+ obj.off('a c');
+ obj.trigger('a b c');
+ assert.equal(obj.counter, 5);
+ });
+
+ QUnit.test('binding and triggering with event maps', function(assert) {
+ var obj = {counter: 0};
+ _.extend(obj, Backbone.Events);
+
+ var increment = function() {
+ this.counter += 1;
+ };
+
+ obj.on({
+ a: increment,
+ b: increment,
+ c: increment
+ }, obj);
+
+ obj.trigger('a');
+ assert.equal(obj.counter, 1);
+
+ obj.trigger('a b');
+ assert.equal(obj.counter, 3);
+
+ obj.trigger('c');
+ assert.equal(obj.counter, 4);
+
+ obj.off({
+ a: increment,
+ c: increment
+ }, obj);
+ obj.trigger('a b c');
+ assert.equal(obj.counter, 5);
+ });
+
+ QUnit.test('binding and triggering multiple event names with event maps', function(assert) {
+ var obj = {counter: 0};
+ _.extend(obj, Backbone.Events);
+
+ var increment = function() {
+ this.counter += 1;
+ };
+
+ obj.on({
+ 'a b c': increment
+ });
+
+ obj.trigger('a');
+ assert.equal(obj.counter, 1);
+
+ obj.trigger('a b');
+ assert.equal(obj.counter, 3);
+
+ obj.trigger('c');
+ assert.equal(obj.counter, 4);
+
+ obj.off({
+ 'a c': increment
+ });
+ obj.trigger('a b c');
+ assert.equal(obj.counter, 5);
+ });
+
+ QUnit.test('binding and trigger with event maps context', function(assert) {
+ assert.expect(2);
+ var obj = {counter: 0};
+ var context = {};
+ _.extend(obj, Backbone.Events);
+
+ obj.on({
+ a: function() {
+ assert.strictEqual(this, context, 'defaults `context` to `callback` param');
+ }
+ }, context).trigger('a');
+
+ obj.off().on({
+ a: function() {
+ assert.strictEqual(this, context, 'will not override explicit `context` param');
+ }
+ }, this, context).trigger('a');
+ });
+
+ QUnit.test('listenTo and stopListening', function(assert) {
+ assert.expect(1);
+ var a = _.extend({}, Backbone.Events);
+ var b = _.extend({}, Backbone.Events);
+ a.listenTo(b, 'all', function(){ assert.ok(true); });
+ b.trigger('anything');
+ a.listenTo(b, 'all', function(){ assert.ok(false); });
+ a.stopListening();
+ b.trigger('anything');
+ });
+
+ QUnit.test('listenTo and stopListening with event maps', function(assert) {
+ assert.expect(4);
+ var a = _.extend({}, Backbone.Events);
+ var b = _.extend({}, Backbone.Events);
+ var cb = function(){ assert.ok(true); };
+ a.listenTo(b, {event: cb});
+ b.trigger('event');
+ a.listenTo(b, {event2: cb});
+ b.on('event2', cb);
+ a.stopListening(b, {event2: cb});
+ b.trigger('event event2');
+ a.stopListening();
+ b.trigger('event event2');
+ });
+
+ QUnit.test('stopListening with omitted args', function(assert) {
+ assert.expect(2);
+ var a = _.extend({}, Backbone.Events);
+ var b = _.extend({}, Backbone.Events);
+ var cb = function() { assert.ok(true); };
+ a.listenTo(b, 'event', cb);
+ b.on('event', cb);
+ a.listenTo(b, 'event2', cb);
+ a.stopListening(null, {event: cb});
+ b.trigger('event event2');
+ b.off();
+ a.listenTo(b, 'event event2', cb);
+ a.stopListening(null, 'event');
+ a.stopListening();
+ b.trigger('event2');
+ });
+
+ QUnit.test('listenToOnce', function(assert) {
+ assert.expect(2);
+ // Same as the previous test, but we use once rather than having to explicitly unbind
+ var obj = {counterA: 0, counterB: 0};
+ _.extend(obj, Backbone.Events);
+ var incrA = function(){ obj.counterA += 1; obj.trigger('event'); };
+ var incrB = function(){ obj.counterB += 1; };
+ obj.listenToOnce(obj, 'event', incrA);
+ obj.listenToOnce(obj, 'event', incrB);
+ obj.trigger('event');
+ assert.equal(obj.counterA, 1, 'counterA should have only been incremented once.');
+ assert.equal(obj.counterB, 1, 'counterB should have only been incremented once.');
+ });
+
+ QUnit.test('listenToOnce and stopListening', function(assert) {
+ assert.expect(1);
+ var a = _.extend({}, Backbone.Events);
+ var b = _.extend({}, Backbone.Events);
+ a.listenToOnce(b, 'all', function() { assert.ok(true); });
+ b.trigger('anything');
+ b.trigger('anything');
+ a.listenToOnce(b, 'all', function() { assert.ok(false); });
+ a.stopListening();
+ b.trigger('anything');
+ });
+
+ QUnit.test('listenTo, listenToOnce and stopListening', function(assert) {
+ assert.expect(1);
+ var a = _.extend({}, Backbone.Events);
+ var b = _.extend({}, Backbone.Events);
+ a.listenToOnce(b, 'all', function() { assert.ok(true); });
+ b.trigger('anything');
+ b.trigger('anything');
+ a.listenTo(b, 'all', function() { assert.ok(false); });
+ a.stopListening();
+ b.trigger('anything');
+ });
+
+ QUnit.test('listenTo and stopListening with event maps', function(assert) {
+ assert.expect(1);
+ var a = _.extend({}, Backbone.Events);
+ var b = _.extend({}, Backbone.Events);
+ a.listenTo(b, {change: function(){ assert.ok(true); }});
+ b.trigger('change');
+ a.listenTo(b, {change: function(){ assert.ok(false); }});
+ a.stopListening();
+ b.trigger('change');
+ });
+
+ QUnit.test('listenTo yourself', function(assert) {
+ assert.expect(1);
+ var e = _.extend({}, Backbone.Events);
+ e.listenTo(e, 'foo', function(){ assert.ok(true); });
+ e.trigger('foo');
+ });
+
+ QUnit.test('listenTo yourself cleans yourself up with stopListening', function(assert) {
+ assert.expect(1);
+ var e = _.extend({}, Backbone.Events);
+ e.listenTo(e, 'foo', function(){ assert.ok(true); });
+ e.trigger('foo');
+ e.stopListening();
+ e.trigger('foo');
+ });
+
+ QUnit.test('stopListening cleans up references', function(assert) {
+ assert.expect(12);
+ var a = _.extend({}, Backbone.Events);
+ var b = _.extend({}, Backbone.Events);
+ var fn = function() {};
+ b.on('event', fn);
+ a.listenTo(b, 'event', fn).stopListening();
+ assert.equal(_.size(a._listeningTo), 0);
+ assert.equal(_.size(b._events.event), 1);
+ assert.equal(_.size(b._listeners), 0);
+ a.listenTo(b, 'event', fn).stopListening(b);
+ assert.equal(_.size(a._listeningTo), 0);
+ assert.equal(_.size(b._events.event), 1);
+ assert.equal(_.size(b._listeners), 0);
+ a.listenTo(b, 'event', fn).stopListening(b, 'event');
+ assert.equal(_.size(a._listeningTo), 0);
+ assert.equal(_.size(b._events.event), 1);
+ assert.equal(_.size(b._listeners), 0);
+ a.listenTo(b, 'event', fn).stopListening(b, 'event', fn);
+ assert.equal(_.size(a._listeningTo), 0);
+ assert.equal(_.size(b._events.event), 1);
+ assert.equal(_.size(b._listeners), 0);
+ });
+
+ QUnit.test('stopListening cleans up references from listenToOnce', function(assert) {
+ assert.expect(12);
+ var a = _.extend({}, Backbone.Events);
+ var b = _.extend({}, Backbone.Events);
+ var fn = function() {};
+ b.on('event', fn);
+ a.listenToOnce(b, 'event', fn).stopListening();
+ assert.equal(_.size(a._listeningTo), 0);
+ assert.equal(_.size(b._events.event), 1);
+ assert.equal(_.size(b._listeners), 0);
+ a.listenToOnce(b, 'event', fn).stopListening(b);
+ assert.equal(_.size(a._listeningTo), 0);
+ assert.equal(_.size(b._events.event), 1);
+ assert.equal(_.size(b._listeners), 0);
+ a.listenToOnce(b, 'event', fn).stopListening(b, 'event');
+ assert.equal(_.size(a._listeningTo), 0);
+ assert.equal(_.size(b._events.event), 1);
+ assert.equal(_.size(b._listeners), 0);
+ a.listenToOnce(b, 'event', fn).stopListening(b, 'event', fn);
+ assert.equal(_.size(a._listeningTo), 0);
+ assert.equal(_.size(b._events.event), 1);
+ assert.equal(_.size(b._listeners), 0);
+ });
+
+ QUnit.test('listenTo and off cleaning up references', function(assert) {
+ assert.expect(8);
+ var a = _.extend({}, Backbone.Events);
+ var b = _.extend({}, Backbone.Events);
+ var fn = function() {};
+ a.listenTo(b, 'event', fn);
+ b.off();
+ assert.equal(_.size(a._listeningTo), 0);
+ assert.equal(_.size(b._listeners), 0);
+ a.listenTo(b, 'event', fn);
+ b.off('event');
+ assert.equal(_.size(a._listeningTo), 0);
+ assert.equal(_.size(b._listeners), 0);
+ a.listenTo(b, 'event', fn);
+ b.off(null, fn);
+ assert.equal(_.size(a._listeningTo), 0);
+ assert.equal(_.size(b._listeners), 0);
+ a.listenTo(b, 'event', fn);
+ b.off(null, null, a);
+ assert.equal(_.size(a._listeningTo), 0);
+ assert.equal(_.size(b._listeners), 0);
+ });
+
+ QUnit.test('listenTo and stopListening cleaning up references', function(assert) {
+ assert.expect(2);
+ var a = _.extend({}, Backbone.Events);
+ var b = _.extend({}, Backbone.Events);
+ a.listenTo(b, 'all', function(){ assert.ok(true); });
+ b.trigger('anything');
+ a.listenTo(b, 'other', function(){ assert.ok(false); });
+ a.stopListening(b, 'other');
+ a.stopListening(b, 'all');
+ assert.equal(_.size(a._listeningTo), 0);
+ });
+
+ QUnit.test('listenToOnce without context cleans up references after the event has fired', function(assert) {
+ assert.expect(2);
+ var a = _.extend({}, Backbone.Events);
+ var b = _.extend({}, Backbone.Events);
+ a.listenToOnce(b, 'all', function(){ assert.ok(true); });
+ b.trigger('anything');
+ assert.equal(_.size(a._listeningTo), 0);
+ });
+
+ QUnit.test('listenToOnce with event maps cleans up references', function(assert) {
+ assert.expect(2);
+ var a = _.extend({}, Backbone.Events);
+ var b = _.extend({}, Backbone.Events);
+ a.listenToOnce(b, {
+ one: function() { assert.ok(true); },
+ two: function() { assert.ok(false); }
+ });
+ b.trigger('one');
+ assert.equal(_.size(a._listeningTo), 1);
+ });
+
+ QUnit.test('listenToOnce with event maps binds the correct `this`', function(assert) {
+ assert.expect(1);
+ var a = _.extend({}, Backbone.Events);
+ var b = _.extend({}, Backbone.Events);
+ a.listenToOnce(b, {
+ one: function() { assert.ok(this === a); },
+ two: function() { assert.ok(false); }
+ });
+ b.trigger('one');
+ });
+
+ QUnit.test("listenTo with empty callback doesn't throw an error", function(assert) {
+ assert.expect(1);
+ var e = _.extend({}, Backbone.Events);
+ e.listenTo(e, 'foo', null);
+ e.trigger('foo');
+ assert.ok(true);
+ });
+
+ QUnit.test('trigger all for each event', function(assert) {
+ assert.expect(3);
+ var a, b, obj = {counter: 0};
+ _.extend(obj, Backbone.Events);
+ obj.on('all', function(event) {
+ obj.counter++;
+ if (event === 'a') a = true;
+ if (event === 'b') b = true;
+ })
+ .trigger('a b');
+ assert.ok(a);
+ assert.ok(b);
+ assert.equal(obj.counter, 2);
+ });
+
+ QUnit.test('on, then unbind all functions', function(assert) {
+ assert.expect(1);
+ var obj = {counter: 0};
+ _.extend(obj, Backbone.Events);
+ var callback = function() { obj.counter += 1; };
+ obj.on('event', callback);
+ obj.trigger('event');
+ obj.off('event');
+ obj.trigger('event');
+ assert.equal(obj.counter, 1, 'counter should have only been incremented once.');
+ });
+
+ QUnit.test('bind two callbacks, unbind only one', function(assert) {
+ assert.expect(2);
+ var obj = {counterA: 0, counterB: 0};
+ _.extend(obj, Backbone.Events);
+ var callback = function() { obj.counterA += 1; };
+ obj.on('event', callback);
+ obj.on('event', function() { obj.counterB += 1; });
+ obj.trigger('event');
+ obj.off('event', callback);
+ obj.trigger('event');
+ assert.equal(obj.counterA, 1, 'counterA should have only been incremented once.');
+ assert.equal(obj.counterB, 2, 'counterB should have been incremented twice.');
+ });
+
+ QUnit.test('unbind a callback in the midst of it firing', function(assert) {
+ assert.expect(1);
+ var obj = {counter: 0};
+ _.extend(obj, Backbone.Events);
+ var callback = function() {
+ obj.counter += 1;
+ obj.off('event', callback);
+ };
+ obj.on('event', callback);
+ obj.trigger('event');
+ obj.trigger('event');
+ obj.trigger('event');
+ assert.equal(obj.counter, 1, 'the callback should have been unbound.');
+ });
+
+ QUnit.test('two binds that unbind themeselves', function(assert) {
+ assert.expect(2);
+ var obj = {counterA: 0, counterB: 0};
+ _.extend(obj, Backbone.Events);
+ var incrA = function(){ obj.counterA += 1; obj.off('event', incrA); };
+ var incrB = function(){ obj.counterB += 1; obj.off('event', incrB); };
+ obj.on('event', incrA);
+ obj.on('event', incrB);
+ obj.trigger('event');
+ obj.trigger('event');
+ obj.trigger('event');
+ assert.equal(obj.counterA, 1, 'counterA should have only been incremented once.');
+ assert.equal(obj.counterB, 1, 'counterB should have only been incremented once.');
+ });
+
+ QUnit.test('bind a callback with a default context when none supplied', function(assert) {
+ assert.expect(1);
+ var obj = _.extend({
+ assertTrue: function() {
+ assert.equal(this, obj, '`this` was bound to the callback');
+ }
+ }, Backbone.Events);
+
+ obj.once('event', obj.assertTrue);
+ obj.trigger('event');
+ });
+
+ QUnit.test('bind a callback with a supplied context', function(assert) {
+ assert.expect(1);
+ var TestClass = function() {
+ return this;
+ };
+ TestClass.prototype.assertTrue = function() {
+ assert.ok(true, '`this` was bound to the callback');
+ };
+
+ var obj = _.extend({}, Backbone.Events);
+ obj.on('event', function() { this.assertTrue(); }, new TestClass);
+ obj.trigger('event');
+ });
+
+ QUnit.test('nested trigger with unbind', function(assert) {
+ assert.expect(1);
+ var obj = {counter: 0};
+ _.extend(obj, Backbone.Events);
+ var incr1 = function(){ obj.counter += 1; obj.off('event', incr1); obj.trigger('event'); };
+ var incr2 = function(){ obj.counter += 1; };
+ obj.on('event', incr1);
+ obj.on('event', incr2);
+ obj.trigger('event');
+ assert.equal(obj.counter, 3, 'counter should have been incremented three times');
+ });
+
+ QUnit.test('callback list is not altered during trigger', function(assert) {
+ assert.expect(2);
+ var counter = 0, obj = _.extend({}, Backbone.Events);
+ var incr = function(){ counter++; };
+ var incrOn = function(){ obj.on('event all', incr); };
+ var incrOff = function(){ obj.off('event all', incr); };
+
+ obj.on('event all', incrOn).trigger('event');
+ assert.equal(counter, 0, 'on does not alter callback list');
+
+ obj.off().on('event', incrOff).on('event all', incr).trigger('event');
+ assert.equal(counter, 2, 'off does not alter callback list');
+ });
+
+ QUnit.test("#1282 - 'all' callback list is retrieved after each event.", function(assert) {
+ assert.expect(1);
+ var counter = 0;
+ var obj = _.extend({}, Backbone.Events);
+ var incr = function(){ counter++; };
+ obj.on('x', function() {
+ obj.on('y', incr).on('all', incr);
+ })
+ .trigger('x y');
+ assert.strictEqual(counter, 2);
+ });
+
+ QUnit.test('if no callback is provided, `on` is a noop', function(assert) {
+ assert.expect(0);
+ _.extend({}, Backbone.Events).on('test').trigger('test');
+ });
+
+ QUnit.test('if callback is truthy but not a function, `on` should throw an error just like jQuery', function(assert) {
+ assert.expect(1);
+ var view = _.extend({}, Backbone.Events).on('test', 'noop');
+ assert.raises(function() {
+ view.trigger('test');
+ });
+ });
+
+ QUnit.test('remove all events for a specific context', function(assert) {
+ assert.expect(4);
+ var obj = _.extend({}, Backbone.Events);
+ obj.on('x y all', function() { assert.ok(true); });
+ obj.on('x y all', function() { assert.ok(false); }, obj);
+ obj.off(null, null, obj);
+ obj.trigger('x y');
+ });
+
+ QUnit.test('remove all events for a specific callback', function(assert) {
+ assert.expect(4);
+ var obj = _.extend({}, Backbone.Events);
+ var success = function() { assert.ok(true); };
+ var fail = function() { assert.ok(false); };
+ obj.on('x y all', success);
+ obj.on('x y all', fail);
+ obj.off(null, fail);
+ obj.trigger('x y');
+ });
+
+ QUnit.test('#1310 - off does not skip consecutive events', function(assert) {
+ assert.expect(0);
+ var obj = _.extend({}, Backbone.Events);
+ obj.on('event', function() { assert.ok(false); }, obj);
+ obj.on('event', function() { assert.ok(false); }, obj);
+ obj.off(null, null, obj);
+ obj.trigger('event');
+ });
+
+ QUnit.test('once', function(assert) {
+ assert.expect(2);
+ // Same as the previous test, but we use once rather than having to explicitly unbind
+ var obj = {counterA: 0, counterB: 0};
+ _.extend(obj, Backbone.Events);
+ var incrA = function(){ obj.counterA += 1; obj.trigger('event'); };
+ var incrB = function(){ obj.counterB += 1; };
+ obj.once('event', incrA);
+ obj.once('event', incrB);
+ obj.trigger('event');
+ assert.equal(obj.counterA, 1, 'counterA should have only been incremented once.');
+ assert.equal(obj.counterB, 1, 'counterB should have only been incremented once.');
+ });
+
+ QUnit.test('once variant one', function(assert) {
+ assert.expect(3);
+ var f = function(){ assert.ok(true); };
+
+ var a = _.extend({}, Backbone.Events).once('event', f);
+ var b = _.extend({}, Backbone.Events).on('event', f);
+
+ a.trigger('event');
+
+ b.trigger('event');
+ b.trigger('event');
+ });
+
+ QUnit.test('once variant two', function(assert) {
+ assert.expect(3);
+ var f = function(){ assert.ok(true); };
+ var obj = _.extend({}, Backbone.Events);
+
+ obj
+ .once('event', f)
+ .on('event', f)
+ .trigger('event')
+ .trigger('event');
+ });
+
+ QUnit.test('once with off', function(assert) {
+ assert.expect(0);
+ var f = function(){ assert.ok(true); };
+ var obj = _.extend({}, Backbone.Events);
+
+ obj.once('event', f);
+ obj.off('event', f);
+ obj.trigger('event');
+ });
+
+ QUnit.test('once with event maps', function(assert) {
+ var obj = {counter: 0};
+ _.extend(obj, Backbone.Events);
+
+ var increment = function() {
+ this.counter += 1;
+ };
+
+ obj.once({
+ a: increment,
+ b: increment,
+ c: increment
+ }, obj);
+
+ obj.trigger('a');
+ assert.equal(obj.counter, 1);
+
+ obj.trigger('a b');
+ assert.equal(obj.counter, 2);
+
+ obj.trigger('c');
+ assert.equal(obj.counter, 3);
+
+ obj.trigger('a b c');
+ assert.equal(obj.counter, 3);
+ });
+
+ QUnit.test('bind a callback with a supplied context using once with object notation', function(assert) {
+ assert.expect(1);
+ var obj = {counter: 0};
+ var context = {};
+ _.extend(obj, Backbone.Events);
+
+ obj.once({
+ a: function() {
+ assert.strictEqual(this, context, 'defaults `context` to `callback` param');
+ }
+ }, context).trigger('a');
+ });
+
+ QUnit.test('once with off only by context', function(assert) {
+ assert.expect(0);
+ var context = {};
+ var obj = _.extend({}, Backbone.Events);
+ obj.once('event', function(){ assert.ok(false); }, context);
+ obj.off(null, null, context);
+ obj.trigger('event');
+ });
+
+ QUnit.test('Backbone object inherits Events', function(assert) {
+ assert.ok(Backbone.on === Backbone.Events.on);
+ });
+
+ QUnit.test('once with asynchronous events', function(assert) {
+ var done = assert.async();
+ assert.expect(1);
+ var func = _.debounce(function() { assert.ok(true); done(); }, 50);
+ var obj = _.extend({}, Backbone.Events).once('async', func);
+
+ obj.trigger('async');
+ obj.trigger('async');
+ });
+
+ QUnit.test('once with multiple events.', function(assert) {
+ assert.expect(2);
+ var obj = _.extend({}, Backbone.Events);
+ obj.once('x y', function() { assert.ok(true); });
+ obj.trigger('x y');
+ });
+
+ QUnit.test('Off during iteration with once.', function(assert) {
+ assert.expect(2);
+ var obj = _.extend({}, Backbone.Events);
+ var f = function(){ this.off('event', f); };
+ obj.on('event', f);
+ obj.once('event', function(){});
+ obj.on('event', function(){ assert.ok(true); });
+
+ obj.trigger('event');
+ obj.trigger('event');
+ });
+
+ QUnit.test('`once` on `all` should work as expected', function(assert) {
+ assert.expect(1);
+ Backbone.once('all', function() {
+ assert.ok(true);
+ Backbone.trigger('all');
+ });
+ Backbone.trigger('all');
+ });
+
+ QUnit.test('once without a callback is a noop', function(assert) {
+ assert.expect(0);
+ _.extend({}, Backbone.Events).once('event').trigger('event');
+ });
+
+ QUnit.test('listenToOnce without a callback is a noop', function(assert) {
+ assert.expect(0);
+ var obj = _.extend({}, Backbone.Events);
+ obj.listenToOnce(obj, 'event').trigger('event');
+ });
+
+ QUnit.test('event functions are chainable', function(assert) {
+ var obj = _.extend({}, Backbone.Events);
+ var obj2 = _.extend({}, Backbone.Events);
+ var fn = function() {};
+ assert.equal(obj, obj.trigger('noeventssetyet'));
+ assert.equal(obj, obj.off('noeventssetyet'));
+ assert.equal(obj, obj.stopListening('noeventssetyet'));
+ assert.equal(obj, obj.on('a', fn));
+ assert.equal(obj, obj.once('c', fn));
+ assert.equal(obj, obj.trigger('a'));
+ assert.equal(obj, obj.listenTo(obj2, 'a', fn));
+ assert.equal(obj, obj.listenToOnce(obj2, 'b', fn));
+ assert.equal(obj, obj.off('a c'));
+ assert.equal(obj, obj.stopListening(obj2, 'a'));
+ assert.equal(obj, obj.stopListening());
+ });
+
+ QUnit.test('#3448 - listenToOnce with space-separated events', function(assert) {
+ assert.expect(2);
+ var one = _.extend({}, Backbone.Events);
+ var two = _.extend({}, Backbone.Events);
+ var count = 1;
+ one.listenToOnce(two, 'x y', function(n) { assert.ok(n === count++); });
+ two.trigger('x', 1);
+ two.trigger('x', 1);
+ two.trigger('y', 2);
+ two.trigger('y', 2);
+ });
+
+})();
diff --git a/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/backbone/test/model.js b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/backbone/test/model.js
new file mode 100644
index 0000000..b73a1c7
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/backbone/test/model.js
@@ -0,0 +1,1418 @@
+(function() {
+
+ var ProxyModel = Backbone.Model.extend();
+ var Klass = Backbone.Collection.extend({
+ url: function() { return '/collection'; }
+ });
+ var doc, collection;
+
+ QUnit.module('Backbone.Model', {
+
+ beforeEach: function(assert) {
+ doc = new ProxyModel({
+ id: '1-the-tempest',
+ title: 'The Tempest',
+ author: 'Bill Shakespeare',
+ length: 123
+ });
+ collection = new Klass();
+ collection.add(doc);
+ }
+
+ });
+
+ QUnit.test('initialize', function(assert) {
+ assert.expect(3);
+ var Model = Backbone.Model.extend({
+ initialize: function() {
+ this.one = 1;
+ assert.equal(this.collection, collection);
+ }
+ });
+ var model = new Model({}, {collection: collection});
+ assert.equal(model.one, 1);
+ assert.equal(model.collection, collection);
+ });
+
+ QUnit.test('Object.prototype properties are overridden by attributes', function(assert) {
+ assert.expect(1);
+ var model = new Backbone.Model({hasOwnProperty: true});
+ assert.equal(model.get('hasOwnProperty'), true);
+ });
+
+ QUnit.test('initialize with attributes and options', function(assert) {
+ assert.expect(1);
+ var Model = Backbone.Model.extend({
+ initialize: function(attributes, options) {
+ this.one = options.one;
+ }
+ });
+ var model = new Model({}, {one: 1});
+ assert.equal(model.one, 1);
+ });
+
+ QUnit.test('initialize with parsed attributes', function(assert) {
+ assert.expect(1);
+ var Model = Backbone.Model.extend({
+ parse: function(attrs) {
+ attrs.value += 1;
+ return attrs;
+ }
+ });
+ var model = new Model({value: 1}, {parse: true});
+ assert.equal(model.get('value'), 2);
+ });
+
+ QUnit.test('parse can return null', function(assert) {
+ assert.expect(1);
+ var Model = Backbone.Model.extend({
+ parse: function(attrs) {
+ attrs.value += 1;
+ return null;
+ }
+ });
+ var model = new Model({value: 1}, {parse: true});
+ assert.equal(JSON.stringify(model.toJSON()), '{}');
+ });
+
+ QUnit.test('url', function(assert) {
+ assert.expect(3);
+ doc.urlRoot = null;
+ assert.equal(doc.url(), '/collection/1-the-tempest');
+ doc.collection.url = '/collection/';
+ assert.equal(doc.url(), '/collection/1-the-tempest');
+ doc.collection = null;
+ assert.raises(function() { doc.url(); });
+ doc.collection = collection;
+ });
+
+ QUnit.test('url when using urlRoot, and uri encoding', function(assert) {
+ assert.expect(2);
+ var Model = Backbone.Model.extend({
+ urlRoot: '/collection'
+ });
+ var model = new Model();
+ assert.equal(model.url(), '/collection');
+ model.set({id: '+1+'});
+ assert.equal(model.url(), '/collection/%2B1%2B');
+ });
+
+ QUnit.test('url when using urlRoot as a function to determine urlRoot at runtime', function(assert) {
+ assert.expect(2);
+ var Model = Backbone.Model.extend({
+ urlRoot: function() {
+ return '/nested/' + this.get('parentId') + '/collection';
+ }
+ });
+
+ var model = new Model({parentId: 1});
+ assert.equal(model.url(), '/nested/1/collection');
+ model.set({id: 2});
+ assert.equal(model.url(), '/nested/1/collection/2');
+ });
+
+ QUnit.test('underscore methods', function(assert) {
+ assert.expect(5);
+ var model = new Backbone.Model({foo: 'a', bar: 'b', baz: 'c'});
+ var model2 = model.clone();
+ assert.deepEqual(model.keys(), ['foo', 'bar', 'baz']);
+ assert.deepEqual(model.values(), ['a', 'b', 'c']);
+ assert.deepEqual(model.invert(), {a: 'foo', b: 'bar', c: 'baz'});
+ assert.deepEqual(model.pick('foo', 'baz'), {foo: 'a', baz: 'c'});
+ assert.deepEqual(model.omit('foo', 'bar'), {baz: 'c'});
+ });
+
+ QUnit.test('chain', function(assert) {
+ var model = new Backbone.Model({a: 0, b: 1, c: 2});
+ assert.deepEqual(model.chain().pick('a', 'b', 'c').values().compact().value(), [1, 2]);
+ });
+
+ QUnit.test('clone', function(assert) {
+ assert.expect(10);
+ var a = new Backbone.Model({foo: 1, bar: 2, baz: 3});
+ var b = a.clone();
+ assert.equal(a.get('foo'), 1);
+ assert.equal(a.get('bar'), 2);
+ assert.equal(a.get('baz'), 3);
+ assert.equal(b.get('foo'), a.get('foo'), 'Foo should be the same on the clone.');
+ assert.equal(b.get('bar'), a.get('bar'), 'Bar should be the same on the clone.');
+ assert.equal(b.get('baz'), a.get('baz'), 'Baz should be the same on the clone.');
+ a.set({foo: 100});
+ assert.equal(a.get('foo'), 100);
+ assert.equal(b.get('foo'), 1, 'Changing a parent attribute does not change the clone.');
+
+ var foo = new Backbone.Model({p: 1});
+ var bar = new Backbone.Model({p: 2});
+ bar.set(foo.clone().attributes, {unset: true});
+ assert.equal(foo.get('p'), 1);
+ assert.equal(bar.get('p'), undefined);
+ });
+
+ QUnit.test('isNew', function(assert) {
+ assert.expect(6);
+ var a = new Backbone.Model({foo: 1, bar: 2, baz: 3});
+ assert.ok(a.isNew(), 'it should be new');
+ a = new Backbone.Model({foo: 1, bar: 2, baz: 3, id: -5});
+ assert.ok(!a.isNew(), 'any defined ID is legal, negative or positive');
+ a = new Backbone.Model({foo: 1, bar: 2, baz: 3, id: 0});
+ assert.ok(!a.isNew(), 'any defined ID is legal, including zero');
+ assert.ok(new Backbone.Model().isNew(), 'is true when there is no id');
+ assert.ok(!new Backbone.Model({id: 2}).isNew(), 'is false for a positive integer');
+ assert.ok(!new Backbone.Model({id: -5}).isNew(), 'is false for a negative integer');
+ });
+
+ QUnit.test('get', function(assert) {
+ assert.expect(2);
+ assert.equal(doc.get('title'), 'The Tempest');
+ assert.equal(doc.get('author'), 'Bill Shakespeare');
+ });
+
+ QUnit.test('escape', function(assert) {
+ assert.expect(5);
+ assert.equal(doc.escape('title'), 'The Tempest');
+ doc.set({audience: 'Bill & Bob'});
+ assert.equal(doc.escape('audience'), 'Bill & Bob');
+ doc.set({audience: 'Tim > Joan'});
+ assert.equal(doc.escape('audience'), 'Tim > Joan');
+ doc.set({audience: 10101});
+ assert.equal(doc.escape('audience'), '10101');
+ doc.unset('audience');
+ assert.equal(doc.escape('audience'), '');
+ });
+
+ QUnit.test('has', function(assert) {
+ assert.expect(10);
+ var model = new Backbone.Model();
+
+ assert.strictEqual(model.has('name'), false);
+
+ model.set({
+ '0': 0,
+ '1': 1,
+ 'true': true,
+ 'false': false,
+ 'empty': '',
+ 'name': 'name',
+ 'null': null,
+ 'undefined': undefined
+ });
+
+ assert.strictEqual(model.has('0'), true);
+ assert.strictEqual(model.has('1'), true);
+ assert.strictEqual(model.has('true'), true);
+ assert.strictEqual(model.has('false'), true);
+ assert.strictEqual(model.has('empty'), true);
+ assert.strictEqual(model.has('name'), true);
+
+ model.unset('name');
+
+ assert.strictEqual(model.has('name'), false);
+ assert.strictEqual(model.has('null'), false);
+ assert.strictEqual(model.has('undefined'), false);
+ });
+
+ QUnit.test('matches', function(assert) {
+ assert.expect(4);
+ var model = new Backbone.Model();
+
+ assert.strictEqual(model.matches({name: 'Jonas', cool: true}), false);
+
+ model.set({name: 'Jonas', cool: true});
+
+ assert.strictEqual(model.matches({name: 'Jonas'}), true);
+ assert.strictEqual(model.matches({name: 'Jonas', cool: true}), true);
+ assert.strictEqual(model.matches({name: 'Jonas', cool: false}), false);
+ });
+
+ QUnit.test('matches with predicate', function(assert) {
+ var model = new Backbone.Model({a: 0});
+
+ assert.strictEqual(model.matches(function(attr) {
+ return attr.a > 1 && attr.b != null;
+ }), false);
+
+ model.set({a: 3, b: true});
+
+ assert.strictEqual(model.matches(function(attr) {
+ return attr.a > 1 && attr.b != null;
+ }), true);
+ });
+
+ QUnit.test('set and unset', function(assert) {
+ assert.expect(8);
+ var a = new Backbone.Model({id: 'id', foo: 1, bar: 2, baz: 3});
+ var changeCount = 0;
+ a.on('change:foo', function() { changeCount += 1; });
+ a.set({foo: 2});
+ assert.equal(a.get('foo'), 2, 'Foo should have changed.');
+ assert.equal(changeCount, 1, 'Change count should have incremented.');
+ // set with value that is not new shouldn't fire change event
+ a.set({foo: 2});
+ assert.equal(a.get('foo'), 2, 'Foo should NOT have changed, still 2');
+ assert.equal(changeCount, 1, 'Change count should NOT have incremented.');
+
+ a.validate = function(attrs) {
+ assert.equal(attrs.foo, void 0, 'validate:true passed while unsetting');
+ };
+ a.unset('foo', {validate: true});
+ assert.equal(a.get('foo'), void 0, 'Foo should have changed');
+ delete a.validate;
+ assert.equal(changeCount, 2, 'Change count should have incremented for unset.');
+
+ a.unset('id');
+ assert.equal(a.id, undefined, 'Unsetting the id should remove the id property.');
+ });
+
+ QUnit.test('#2030 - set with failed validate, followed by another set triggers change', function(assert) {
+ var attr = 0, main = 0, error = 0;
+ var Model = Backbone.Model.extend({
+ validate: function(attrs) {
+ if (attrs.x > 1) {
+ error++;
+ return 'this is an error';
+ }
+ }
+ });
+ var model = new Model({x: 0});
+ model.on('change:x', function() { attr++; });
+ model.on('change', function() { main++; });
+ model.set({x: 2}, {validate: true});
+ model.set({x: 1}, {validate: true});
+ assert.deepEqual([attr, main, error], [1, 1, 1]);
+ });
+
+ QUnit.test('set triggers changes in the correct order', function(assert) {
+ var value = null;
+ var model = new Backbone.Model;
+ model.on('last', function(){ value = 'last'; });
+ model.on('first', function(){ value = 'first'; });
+ model.trigger('first');
+ model.trigger('last');
+ assert.equal(value, 'last');
+ });
+
+ QUnit.test('set falsy values in the correct order', function(assert) {
+ assert.expect(2);
+ var model = new Backbone.Model({result: 'result'});
+ model.on('change', function() {
+ assert.equal(model.changed.result, void 0);
+ assert.equal(model.previous('result'), false);
+ });
+ model.set({result: void 0}, {silent: true});
+ model.set({result: null}, {silent: true});
+ model.set({result: false}, {silent: true});
+ model.set({result: void 0});
+ });
+
+ QUnit.test('nested set triggers with the correct options', function(assert) {
+ var model = new Backbone.Model();
+ var o1 = {};
+ var o2 = {};
+ var o3 = {};
+ model.on('change', function(__, options) {
+ switch (model.get('a')) {
+ case 1:
+ assert.equal(options, o1);
+ return model.set('a', 2, o2);
+ case 2:
+ assert.equal(options, o2);
+ return model.set('a', 3, o3);
+ case 3:
+ assert.equal(options, o3);
+ }
+ });
+ model.set('a', 1, o1);
+ });
+
+ QUnit.test('multiple unsets', function(assert) {
+ assert.expect(1);
+ var i = 0;
+ var counter = function(){ i++; };
+ var model = new Backbone.Model({a: 1});
+ model.on('change:a', counter);
+ model.set({a: 2});
+ model.unset('a');
+ model.unset('a');
+ assert.equal(i, 2, 'Unset does not fire an event for missing attributes.');
+ });
+
+ QUnit.test('unset and changedAttributes', function(assert) {
+ assert.expect(1);
+ var model = new Backbone.Model({a: 1});
+ model.on('change', function() {
+ assert.ok('a' in model.changedAttributes(), 'changedAttributes should contain unset properties');
+ });
+ model.unset('a');
+ });
+
+ QUnit.test('using a non-default id attribute.', function(assert) {
+ assert.expect(5);
+ var MongoModel = Backbone.Model.extend({idAttribute: '_id'});
+ var model = new MongoModel({id: 'eye-dee', _id: 25, title: 'Model'});
+ assert.equal(model.get('id'), 'eye-dee');
+ assert.equal(model.id, 25);
+ assert.equal(model.isNew(), false);
+ model.unset('_id');
+ assert.equal(model.id, undefined);
+ assert.equal(model.isNew(), true);
+ });
+
+ QUnit.test('setting an alternative cid prefix', function(assert) {
+ assert.expect(4);
+ var Model = Backbone.Model.extend({
+ cidPrefix: 'm'
+ });
+ var model = new Model();
+
+ assert.equal(model.cid.charAt(0), 'm');
+
+ model = new Backbone.Model();
+ assert.equal(model.cid.charAt(0), 'c');
+
+ var Collection = Backbone.Collection.extend({
+ model: Model
+ });
+ var col = new Collection([{id: 'c5'}, {id: 'c6'}, {id: 'c7'}]);
+
+ assert.equal(col.get('c6').cid.charAt(0), 'm');
+ col.set([{id: 'c6', value: 'test'}], {
+ merge: true,
+ add: true,
+ remove: false
+ });
+ assert.ok(col.get('c6').has('value'));
+ });
+
+ QUnit.test('set an empty string', function(assert) {
+ assert.expect(1);
+ var model = new Backbone.Model({name: 'Model'});
+ model.set({name: ''});
+ assert.equal(model.get('name'), '');
+ });
+
+ QUnit.test('setting an object', function(assert) {
+ assert.expect(1);
+ var model = new Backbone.Model({
+ custom: {foo: 1}
+ });
+ model.on('change', function() {
+ assert.ok(1);
+ });
+ model.set({
+ custom: {foo: 1} // no change should be fired
+ });
+ model.set({
+ custom: {foo: 2} // change event should be fired
+ });
+ });
+
+ QUnit.test('clear', function(assert) {
+ assert.expect(3);
+ var changed;
+ var model = new Backbone.Model({id: 1, name: 'Model'});
+ model.on('change:name', function(){ changed = true; });
+ model.on('change', function() {
+ var changedAttrs = model.changedAttributes();
+ assert.ok('name' in changedAttrs);
+ });
+ model.clear();
+ assert.equal(changed, true);
+ assert.equal(model.get('name'), undefined);
+ });
+
+ QUnit.test('defaults', function(assert) {
+ assert.expect(9);
+ var Defaulted = Backbone.Model.extend({
+ defaults: {
+ one: 1,
+ two: 2
+ }
+ });
+ var model = new Defaulted({two: undefined});
+ assert.equal(model.get('one'), 1);
+ assert.equal(model.get('two'), 2);
+ model = new Defaulted({two: 3});
+ assert.equal(model.get('one'), 1);
+ assert.equal(model.get('two'), 3);
+ Defaulted = Backbone.Model.extend({
+ defaults: function() {
+ return {
+ one: 3,
+ two: 4
+ };
+ }
+ });
+ model = new Defaulted({two: undefined});
+ assert.equal(model.get('one'), 3);
+ assert.equal(model.get('two'), 4);
+ Defaulted = Backbone.Model.extend({
+ defaults: {hasOwnProperty: true}
+ });
+ model = new Defaulted();
+ assert.equal(model.get('hasOwnProperty'), true);
+ model = new Defaulted({hasOwnProperty: undefined});
+ assert.equal(model.get('hasOwnProperty'), true);
+ model = new Defaulted({hasOwnProperty: false});
+ assert.equal(model.get('hasOwnProperty'), false);
+ });
+
+ QUnit.test('change, hasChanged, changedAttributes, previous, previousAttributes', function(assert) {
+ assert.expect(9);
+ var model = new Backbone.Model({name: 'Tim', age: 10});
+ assert.deepEqual(model.changedAttributes(), false);
+ model.on('change', function() {
+ assert.ok(model.hasChanged('name'), 'name changed');
+ assert.ok(!model.hasChanged('age'), 'age did not');
+ assert.ok(_.isEqual(model.changedAttributes(), {name: 'Rob'}), 'changedAttributes returns the changed attrs');
+ assert.equal(model.previous('name'), 'Tim');
+ assert.ok(_.isEqual(model.previousAttributes(), {name: 'Tim', age: 10}), 'previousAttributes is correct');
+ });
+ assert.equal(model.hasChanged(), false);
+ assert.equal(model.hasChanged(undefined), false);
+ model.set({name: 'Rob'});
+ assert.equal(model.get('name'), 'Rob');
+ });
+
+ QUnit.test('changedAttributes', function(assert) {
+ assert.expect(3);
+ var model = new Backbone.Model({a: 'a', b: 'b'});
+ assert.deepEqual(model.changedAttributes(), false);
+ assert.equal(model.changedAttributes({a: 'a'}), false);
+ assert.equal(model.changedAttributes({a: 'b'}).a, 'b');
+ });
+
+ QUnit.test('change with options', function(assert) {
+ assert.expect(2);
+ var value;
+ var model = new Backbone.Model({name: 'Rob'});
+ model.on('change', function(m, options) {
+ value = options.prefix + m.get('name');
+ });
+ model.set({name: 'Bob'}, {prefix: 'Mr. '});
+ assert.equal(value, 'Mr. Bob');
+ model.set({name: 'Sue'}, {prefix: 'Ms. '});
+ assert.equal(value, 'Ms. Sue');
+ });
+
+ QUnit.test('change after initialize', function(assert) {
+ assert.expect(1);
+ var changed = 0;
+ var attrs = {id: 1, label: 'c'};
+ var obj = new Backbone.Model(attrs);
+ obj.on('change', function() { changed += 1; });
+ obj.set(attrs);
+ assert.equal(changed, 0);
+ });
+
+ QUnit.test('save within change event', function(assert) {
+ assert.expect(1);
+ var env = this;
+ var model = new Backbone.Model({firstName: 'Taylor', lastName: 'Swift'});
+ model.url = '/test';
+ model.on('change', function() {
+ model.save();
+ assert.ok(_.isEqual(env.syncArgs.model, model));
+ });
+ model.set({lastName: 'Hicks'});
+ });
+
+ QUnit.test('validate after save', function(assert) {
+ assert.expect(2);
+ var lastError, model = new Backbone.Model();
+ model.validate = function(attrs) {
+ if (attrs.admin) return "Can't change admin status.";
+ };
+ model.sync = function(method, m, options) {
+ options.success.call(this, {admin: true});
+ };
+ model.on('invalid', function(m, error) {
+ lastError = error;
+ });
+ model.save(null);
+
+ assert.equal(lastError, "Can't change admin status.");
+ assert.equal(model.validationError, "Can't change admin status.");
+ });
+
+ QUnit.test('save', function(assert) {
+ assert.expect(2);
+ doc.save({title: 'Henry V'});
+ assert.equal(this.syncArgs.method, 'update');
+ assert.ok(_.isEqual(this.syncArgs.model, doc));
+ });
+
+ QUnit.test('save, fetch, destroy triggers error event when an error occurs', function(assert) {
+ assert.expect(3);
+ var model = new Backbone.Model();
+ model.on('error', function() {
+ assert.ok(true);
+ });
+ model.sync = function(method, m, options) {
+ options.error();
+ };
+ model.save({data: 2, id: 1});
+ model.fetch();
+ model.destroy();
+ });
+
+ QUnit.test('#3283 - save, fetch, destroy calls success with context', function(assert) {
+ assert.expect(3);
+ var model = new Backbone.Model();
+ var obj = {};
+ var options = {
+ context: obj,
+ success: function() {
+ assert.equal(this, obj);
+ }
+ };
+ model.sync = function(method, m, opts) {
+ opts.success.call(opts.context);
+ };
+ model.save({data: 2, id: 1}, options);
+ model.fetch(options);
+ model.destroy(options);
+ });
+
+ QUnit.test('#3283 - save, fetch, destroy calls error with context', function(assert) {
+ assert.expect(3);
+ var model = new Backbone.Model();
+ var obj = {};
+ var options = {
+ context: obj,
+ error: function() {
+ assert.equal(this, obj);
+ }
+ };
+ model.sync = function(method, m, opts) {
+ opts.error.call(opts.context);
+ };
+ model.save({data: 2, id: 1}, options);
+ model.fetch(options);
+ model.destroy(options);
+ });
+
+ QUnit.test('#3470 - save and fetch with parse false', function(assert) {
+ assert.expect(2);
+ var i = 0;
+ var model = new Backbone.Model();
+ model.parse = function() {
+ assert.ok(false);
+ };
+ model.sync = function(method, m, options) {
+ options.success({i: ++i});
+ };
+ model.fetch({parse: false});
+ assert.equal(model.get('i'), i);
+ model.save(null, {parse: false});
+ assert.equal(model.get('i'), i);
+ });
+
+ QUnit.test('save with PATCH', function(assert) {
+ doc.clear().set({id: 1, a: 1, b: 2, c: 3, d: 4});
+ doc.save();
+ assert.equal(this.syncArgs.method, 'update');
+ assert.equal(this.syncArgs.options.attrs, undefined);
+
+ doc.save({b: 2, d: 4}, {patch: true});
+ assert.equal(this.syncArgs.method, 'patch');
+ assert.equal(_.size(this.syncArgs.options.attrs), 2);
+ assert.equal(this.syncArgs.options.attrs.d, 4);
+ assert.equal(this.syncArgs.options.attrs.a, undefined);
+ assert.equal(this.ajaxSettings.data, '{"b":2,"d":4}');
+ });
+
+ QUnit.test('save with PATCH and different attrs', function(assert) {
+ doc.clear().save({b: 2, d: 4}, {patch: true, attrs: {B: 1, D: 3}});
+ assert.equal(this.syncArgs.options.attrs.D, 3);
+ assert.equal(this.syncArgs.options.attrs.d, undefined);
+ assert.equal(this.ajaxSettings.data, '{"B":1,"D":3}');
+ assert.deepEqual(doc.attributes, {b: 2, d: 4});
+ });
+
+ QUnit.test('save in positional style', function(assert) {
+ assert.expect(1);
+ var model = new Backbone.Model();
+ model.sync = function(method, m, options) {
+ options.success();
+ };
+ model.save('title', 'Twelfth Night');
+ assert.equal(model.get('title'), 'Twelfth Night');
+ });
+
+ QUnit.test('save with non-object success response', function(assert) {
+ assert.expect(2);
+ var model = new Backbone.Model();
+ model.sync = function(method, m, options) {
+ options.success('', options);
+ options.success(null, options);
+ };
+ model.save({testing: 'empty'}, {
+ success: function(m) {
+ assert.deepEqual(m.attributes, {testing: 'empty'});
+ }
+ });
+ });
+
+ QUnit.test('save with wait and supplied id', function(assert) {
+ var Model = Backbone.Model.extend({
+ urlRoot: '/collection'
+ });
+ var model = new Model();
+ model.save({id: 42}, {wait: true});
+ assert.equal(this.ajaxSettings.url, '/collection/42');
+ });
+
+ QUnit.test('save will pass extra options to success callback', function(assert) {
+ assert.expect(1);
+ var SpecialSyncModel = Backbone.Model.extend({
+ sync: function(method, m, options) {
+ _.extend(options, {specialSync: true});
+ return Backbone.Model.prototype.sync.call(this, method, m, options);
+ },
+ urlRoot: '/test'
+ });
+
+ var model = new SpecialSyncModel();
+
+ var onSuccess = function(m, response, options) {
+ assert.ok(options.specialSync, 'Options were passed correctly to callback');
+ };
+
+ model.save(null, {success: onSuccess});
+ this.ajaxSettings.success();
+ });
+
+ QUnit.test('fetch', function(assert) {
+ assert.expect(2);
+ doc.fetch();
+ assert.equal(this.syncArgs.method, 'read');
+ assert.ok(_.isEqual(this.syncArgs.model, doc));
+ });
+
+ QUnit.test('fetch will pass extra options to success callback', function(assert) {
+ assert.expect(1);
+ var SpecialSyncModel = Backbone.Model.extend({
+ sync: function(method, m, options) {
+ _.extend(options, {specialSync: true});
+ return Backbone.Model.prototype.sync.call(this, method, m, options);
+ },
+ urlRoot: '/test'
+ });
+
+ var model = new SpecialSyncModel();
+
+ var onSuccess = function(m, response, options) {
+ assert.ok(options.specialSync, 'Options were passed correctly to callback');
+ };
+
+ model.fetch({success: onSuccess});
+ this.ajaxSettings.success();
+ });
+
+ QUnit.test('destroy', function(assert) {
+ assert.expect(3);
+ doc.destroy();
+ assert.equal(this.syncArgs.method, 'delete');
+ assert.ok(_.isEqual(this.syncArgs.model, doc));
+
+ var newModel = new Backbone.Model;
+ assert.equal(newModel.destroy(), false);
+ });
+
+ QUnit.test('destroy will pass extra options to success callback', function(assert) {
+ assert.expect(1);
+ var SpecialSyncModel = Backbone.Model.extend({
+ sync: function(method, m, options) {
+ _.extend(options, {specialSync: true});
+ return Backbone.Model.prototype.sync.call(this, method, m, options);
+ },
+ urlRoot: '/test'
+ });
+
+ var model = new SpecialSyncModel({id: 'id'});
+
+ var onSuccess = function(m, response, options) {
+ assert.ok(options.specialSync, 'Options were passed correctly to callback');
+ };
+
+ model.destroy({success: onSuccess});
+ this.ajaxSettings.success();
+ });
+
+ QUnit.test('non-persisted destroy', function(assert) {
+ assert.expect(1);
+ var a = new Backbone.Model({foo: 1, bar: 2, baz: 3});
+ a.sync = function() { throw 'should not be called'; };
+ a.destroy();
+ assert.ok(true, 'non-persisted model should not call sync');
+ });
+
+ QUnit.test('validate', function(assert) {
+ var lastError;
+ var model = new Backbone.Model();
+ model.validate = function(attrs) {
+ if (attrs.admin !== this.get('admin')) return "Can't change admin status.";
+ };
+ model.on('invalid', function(m, error) {
+ lastError = error;
+ });
+ var result = model.set({a: 100});
+ assert.equal(result, model);
+ assert.equal(model.get('a'), 100);
+ assert.equal(lastError, undefined);
+ result = model.set({admin: true});
+ assert.equal(model.get('admin'), true);
+ result = model.set({a: 200, admin: false}, {validate: true});
+ assert.equal(lastError, "Can't change admin status.");
+ assert.equal(result, false);
+ assert.equal(model.get('a'), 100);
+ });
+
+ QUnit.test('validate on unset and clear', function(assert) {
+ assert.expect(6);
+ var error;
+ var model = new Backbone.Model({name: 'One'});
+ model.validate = function(attrs) {
+ if (!attrs.name) {
+ error = true;
+ return 'No thanks.';
+ }
+ };
+ model.set({name: 'Two'});
+ assert.equal(model.get('name'), 'Two');
+ assert.equal(error, undefined);
+ model.unset('name', {validate: true});
+ assert.equal(error, true);
+ assert.equal(model.get('name'), 'Two');
+ model.clear({validate: true});
+ assert.equal(model.get('name'), 'Two');
+ delete model.validate;
+ model.clear();
+ assert.equal(model.get('name'), undefined);
+ });
+
+ QUnit.test('validate with error callback', function(assert) {
+ assert.expect(8);
+ var lastError, boundError;
+ var model = new Backbone.Model();
+ model.validate = function(attrs) {
+ if (attrs.admin) return "Can't change admin status.";
+ };
+ model.on('invalid', function(m, error) {
+ boundError = true;
+ });
+ var result = model.set({a: 100}, {validate: true});
+ assert.equal(result, model);
+ assert.equal(model.get('a'), 100);
+ assert.equal(model.validationError, null);
+ assert.equal(boundError, undefined);
+ result = model.set({a: 200, admin: true}, {validate: true});
+ assert.equal(result, false);
+ assert.equal(model.get('a'), 100);
+ assert.equal(model.validationError, "Can't change admin status.");
+ assert.equal(boundError, true);
+ });
+
+ QUnit.test('defaults always extend attrs (#459)', function(assert) {
+ assert.expect(2);
+ var Defaulted = Backbone.Model.extend({
+ defaults: {one: 1},
+ initialize: function(attrs, opts) {
+ assert.equal(this.attributes.one, 1);
+ }
+ });
+ var providedattrs = new Defaulted({});
+ var emptyattrs = new Defaulted();
+ });
+
+ QUnit.test('Inherit class properties', function(assert) {
+ assert.expect(6);
+ var Parent = Backbone.Model.extend({
+ instancePropSame: function() {},
+ instancePropDiff: function() {}
+ }, {
+ classProp: function() {}
+ });
+ var Child = Parent.extend({
+ instancePropDiff: function() {}
+ });
+
+ var adult = new Parent;
+ var kid = new Child;
+
+ assert.equal(Child.classProp, Parent.classProp);
+ assert.notEqual(Child.classProp, undefined);
+
+ assert.equal(kid.instancePropSame, adult.instancePropSame);
+ assert.notEqual(kid.instancePropSame, undefined);
+
+ assert.notEqual(Child.prototype.instancePropDiff, Parent.prototype.instancePropDiff);
+ assert.notEqual(Child.prototype.instancePropDiff, undefined);
+ });
+
+ QUnit.test("Nested change events don't clobber previous attributes", function(assert) {
+ assert.expect(4);
+ new Backbone.Model()
+ .on('change:state', function(m, newState) {
+ assert.equal(m.previous('state'), undefined);
+ assert.equal(newState, 'hello');
+ // Fire a nested change event.
+ m.set({other: 'whatever'});
+ })
+ .on('change:state', function(m, newState) {
+ assert.equal(m.previous('state'), undefined);
+ assert.equal(newState, 'hello');
+ })
+ .set({state: 'hello'});
+ });
+
+ QUnit.test('hasChanged/set should use same comparison', function(assert) {
+ assert.expect(2);
+ var changed = 0, model = new Backbone.Model({a: null});
+ model.on('change', function() {
+ assert.ok(this.hasChanged('a'));
+ })
+ .on('change:a', function() {
+ changed++;
+ })
+ .set({a: undefined});
+ assert.equal(changed, 1);
+ });
+
+ QUnit.test('#582, #425, change:attribute callbacks should fire after all changes have occurred', function(assert) {
+ assert.expect(9);
+ var model = new Backbone.Model;
+
+ var assertion = function() {
+ assert.equal(model.get('a'), 'a');
+ assert.equal(model.get('b'), 'b');
+ assert.equal(model.get('c'), 'c');
+ };
+
+ model.on('change:a', assertion);
+ model.on('change:b', assertion);
+ model.on('change:c', assertion);
+
+ model.set({a: 'a', b: 'b', c: 'c'});
+ });
+
+ QUnit.test('#871, set with attributes property', function(assert) {
+ assert.expect(1);
+ var model = new Backbone.Model();
+ model.set({attributes: true});
+ assert.ok(model.has('attributes'));
+ });
+
+ QUnit.test('set value regardless of equality/change', function(assert) {
+ assert.expect(1);
+ var model = new Backbone.Model({x: []});
+ var a = [];
+ model.set({x: a});
+ assert.ok(model.get('x') === a);
+ });
+
+ QUnit.test('set same value does not trigger change', function(assert) {
+ assert.expect(0);
+ var model = new Backbone.Model({x: 1});
+ model.on('change change:x', function() { assert.ok(false); });
+ model.set({x: 1});
+ model.set({x: 1});
+ });
+
+ QUnit.test('unset does not fire a change for undefined attributes', function(assert) {
+ assert.expect(0);
+ var model = new Backbone.Model({x: undefined});
+ model.on('change:x', function(){ assert.ok(false); });
+ model.unset('x');
+ });
+
+ QUnit.test('set: undefined values', function(assert) {
+ assert.expect(1);
+ var model = new Backbone.Model({x: undefined});
+ assert.ok('x' in model.attributes);
+ });
+
+ QUnit.test('hasChanged works outside of change events, and true within', function(assert) {
+ assert.expect(6);
+ var model = new Backbone.Model({x: 1});
+ model.on('change:x', function() {
+ assert.ok(model.hasChanged('x'));
+ assert.equal(model.get('x'), 1);
+ });
+ model.set({x: 2}, {silent: true});
+ assert.ok(model.hasChanged());
+ assert.equal(model.hasChanged('x'), true);
+ model.set({x: 1});
+ assert.ok(model.hasChanged());
+ assert.equal(model.hasChanged('x'), true);
+ });
+
+ QUnit.test('hasChanged gets cleared on the following set', function(assert) {
+ assert.expect(4);
+ var model = new Backbone.Model;
+ model.set({x: 1});
+ assert.ok(model.hasChanged());
+ model.set({x: 1});
+ assert.ok(!model.hasChanged());
+ model.set({x: 2});
+ assert.ok(model.hasChanged());
+ model.set({});
+ assert.ok(!model.hasChanged());
+ });
+
+ QUnit.test('save with `wait` succeeds without `validate`', function(assert) {
+ assert.expect(1);
+ var model = new Backbone.Model();
+ model.url = '/test';
+ model.save({x: 1}, {wait: true});
+ assert.ok(this.syncArgs.model === model);
+ });
+
+ QUnit.test("save without `wait` doesn't set invalid attributes", function(assert) {
+ var model = new Backbone.Model();
+ model.validate = function() { return 1; };
+ model.save({a: 1});
+ assert.equal(model.get('a'), void 0);
+ });
+
+ QUnit.test("save doesn't validate twice", function(assert) {
+ var model = new Backbone.Model();
+ var times = 0;
+ model.sync = function() {};
+ model.validate = function() { ++times; };
+ model.save({});
+ assert.equal(times, 1);
+ });
+
+ QUnit.test('`hasChanged` for falsey keys', function(assert) {
+ assert.expect(2);
+ var model = new Backbone.Model();
+ model.set({x: true}, {silent: true});
+ assert.ok(!model.hasChanged(0));
+ assert.ok(!model.hasChanged(''));
+ });
+
+ QUnit.test('`previous` for falsey keys', function(assert) {
+ assert.expect(2);
+ var model = new Backbone.Model({'0': true, '': true});
+ model.set({'0': false, '': false}, {silent: true});
+ assert.equal(model.previous(0), true);
+ assert.equal(model.previous(''), true);
+ });
+
+ QUnit.test('`save` with `wait` sends correct attributes', function(assert) {
+ assert.expect(5);
+ var changed = 0;
+ var model = new Backbone.Model({x: 1, y: 2});
+ model.url = '/test';
+ model.on('change:x', function() { changed++; });
+ model.save({x: 3}, {wait: true});
+ assert.deepEqual(JSON.parse(this.ajaxSettings.data), {x: 3, y: 2});
+ assert.equal(model.get('x'), 1);
+ assert.equal(changed, 0);
+ this.syncArgs.options.success({});
+ assert.equal(model.get('x'), 3);
+ assert.equal(changed, 1);
+ });
+
+ QUnit.test("a failed `save` with `wait` doesn't leave attributes behind", function(assert) {
+ assert.expect(1);
+ var model = new Backbone.Model;
+ model.url = '/test';
+ model.save({x: 1}, {wait: true});
+ assert.equal(model.get('x'), void 0);
+ });
+
+ QUnit.test('#1030 - `save` with `wait` results in correct attributes if success is called during sync', function(assert) {
+ assert.expect(2);
+ var model = new Backbone.Model({x: 1, y: 2});
+ model.sync = function(method, m, options) {
+ options.success();
+ };
+ model.on('change:x', function() { assert.ok(true); });
+ model.save({x: 3}, {wait: true});
+ assert.equal(model.get('x'), 3);
+ });
+
+ QUnit.test('save with wait validates attributes', function(assert) {
+ var model = new Backbone.Model();
+ model.url = '/test';
+ model.validate = function() { assert.ok(true); };
+ model.save({x: 1}, {wait: true});
+ });
+
+ QUnit.test('save turns on parse flag', function(assert) {
+ var Model = Backbone.Model.extend({
+ sync: function(method, m, options) { assert.ok(options.parse); }
+ });
+ new Model().save();
+ });
+
+ QUnit.test("nested `set` during `'change:attr'`", function(assert) {
+ assert.expect(2);
+ var events = [];
+ var model = new Backbone.Model();
+ model.on('all', function(event) { events.push(event); });
+ model.on('change', function() {
+ model.set({z: true}, {silent: true});
+ });
+ model.on('change:x', function() {
+ model.set({y: true});
+ });
+ model.set({x: true});
+ assert.deepEqual(events, ['change:y', 'change:x', 'change']);
+ events = [];
+ model.set({z: true});
+ assert.deepEqual(events, []);
+ });
+
+ QUnit.test('nested `change` only fires once', function(assert) {
+ assert.expect(1);
+ var model = new Backbone.Model();
+ model.on('change', function() {
+ assert.ok(true);
+ model.set({x: true});
+ });
+ model.set({x: true});
+ });
+
+ QUnit.test("nested `set` during `'change'`", function(assert) {
+ assert.expect(6);
+ var count = 0;
+ var model = new Backbone.Model();
+ model.on('change', function() {
+ switch (count++) {
+ case 0:
+ assert.deepEqual(this.changedAttributes(), {x: true});
+ assert.equal(model.previous('x'), undefined);
+ model.set({y: true});
+ break;
+ case 1:
+ assert.deepEqual(this.changedAttributes(), {x: true, y: true});
+ assert.equal(model.previous('x'), undefined);
+ model.set({z: true});
+ break;
+ case 2:
+ assert.deepEqual(this.changedAttributes(), {x: true, y: true, z: true});
+ assert.equal(model.previous('y'), undefined);
+ break;
+ default:
+ assert.ok(false);
+ }
+ });
+ model.set({x: true});
+ });
+
+ QUnit.test('nested `change` with silent', function(assert) {
+ assert.expect(3);
+ var count = 0;
+ var model = new Backbone.Model();
+ model.on('change:y', function() { assert.ok(false); });
+ model.on('change', function() {
+ switch (count++) {
+ case 0:
+ assert.deepEqual(this.changedAttributes(), {x: true});
+ model.set({y: true}, {silent: true});
+ model.set({z: true});
+ break;
+ case 1:
+ assert.deepEqual(this.changedAttributes(), {x: true, y: true, z: true});
+ break;
+ case 2:
+ assert.deepEqual(this.changedAttributes(), {z: false});
+ break;
+ default:
+ assert.ok(false);
+ }
+ });
+ model.set({x: true});
+ model.set({z: false});
+ });
+
+ QUnit.test('nested `change:attr` with silent', function(assert) {
+ assert.expect(0);
+ var model = new Backbone.Model();
+ model.on('change:y', function(){ assert.ok(false); });
+ model.on('change', function() {
+ model.set({y: true}, {silent: true});
+ model.set({z: true});
+ });
+ model.set({x: true});
+ });
+
+ QUnit.test('multiple nested changes with silent', function(assert) {
+ assert.expect(1);
+ var model = new Backbone.Model();
+ model.on('change:x', function() {
+ model.set({y: 1}, {silent: true});
+ model.set({y: 2});
+ });
+ model.on('change:y', function(m, val) {
+ assert.equal(val, 2);
+ });
+ model.set({x: true});
+ });
+
+ QUnit.test('multiple nested changes with silent', function(assert) {
+ assert.expect(1);
+ var changes = [];
+ var model = new Backbone.Model();
+ model.on('change:b', function(m, val) { changes.push(val); });
+ model.on('change', function() {
+ model.set({b: 1});
+ });
+ model.set({b: 0});
+ assert.deepEqual(changes, [0, 1]);
+ });
+
+ QUnit.test('basic silent change semantics', function(assert) {
+ assert.expect(1);
+ var model = new Backbone.Model;
+ model.set({x: 1});
+ model.on('change', function(){ assert.ok(true); });
+ model.set({x: 2}, {silent: true});
+ model.set({x: 1});
+ });
+
+ QUnit.test('nested set multiple times', function(assert) {
+ assert.expect(1);
+ var model = new Backbone.Model();
+ model.on('change:b', function() {
+ assert.ok(true);
+ });
+ model.on('change:a', function() {
+ model.set({b: true});
+ model.set({b: true});
+ });
+ model.set({a: true});
+ });
+
+ QUnit.test('#1122 - clear does not alter options.', function(assert) {
+ assert.expect(1);
+ var model = new Backbone.Model();
+ var options = {};
+ model.clear(options);
+ assert.ok(!options.unset);
+ });
+
+ QUnit.test('#1122 - unset does not alter options.', function(assert) {
+ assert.expect(1);
+ var model = new Backbone.Model();
+ var options = {};
+ model.unset('x', options);
+ assert.ok(!options.unset);
+ });
+
+ QUnit.test('#1355 - `options` is passed to success callbacks', function(assert) {
+ assert.expect(3);
+ var model = new Backbone.Model();
+ var opts = {
+ success: function( m, resp, options ) {
+ assert.ok(options);
+ }
+ };
+ model.sync = function(method, m, options) {
+ options.success();
+ };
+ model.save({id: 1}, opts);
+ model.fetch(opts);
+ model.destroy(opts);
+ });
+
+ QUnit.test("#1412 - Trigger 'sync' event.", function(assert) {
+ assert.expect(3);
+ var model = new Backbone.Model({id: 1});
+ model.sync = function(method, m, options) { options.success(); };
+ model.on('sync', function(){ assert.ok(true); });
+ model.fetch();
+ model.save();
+ model.destroy();
+ });
+
+ QUnit.test('#1365 - Destroy: New models execute success callback.', function(assert) {
+ var done = assert.async();
+ assert.expect(2);
+ new Backbone.Model()
+ .on('sync', function() { assert.ok(false); })
+ .on('destroy', function(){ assert.ok(true); })
+ .destroy({success: function(){
+ assert.ok(true);
+ done();
+ }});
+ });
+
+ QUnit.test('#1433 - Save: An invalid model cannot be persisted.', function(assert) {
+ assert.expect(1);
+ var model = new Backbone.Model;
+ model.validate = function(){ return 'invalid'; };
+ model.sync = function(){ assert.ok(false); };
+ assert.strictEqual(model.save(), false);
+ });
+
+ QUnit.test("#1377 - Save without attrs triggers 'error'.", function(assert) {
+ assert.expect(1);
+ var Model = Backbone.Model.extend({
+ url: '/test/',
+ sync: function(method, m, options){ options.success(); },
+ validate: function(){ return 'invalid'; }
+ });
+ var model = new Model({id: 1});
+ model.on('invalid', function(){ assert.ok(true); });
+ model.save();
+ });
+
+ QUnit.test('#1545 - `undefined` can be passed to a model constructor without coersion', function(assert) {
+ var Model = Backbone.Model.extend({
+ defaults: {one: 1},
+ initialize: function(attrs, opts) {
+ assert.equal(attrs, undefined);
+ }
+ });
+ var emptyattrs = new Model();
+ var undefinedattrs = new Model(undefined);
+ });
+
+ QUnit.test('#1478 - Model `save` does not trigger change on unchanged attributes', function(assert) {
+ var done = assert.async();
+ assert.expect(0);
+ var Model = Backbone.Model.extend({
+ sync: function(method, m, options) {
+ setTimeout(function(){
+ options.success();
+ done();
+ }, 0);
+ }
+ });
+ new Model({x: true})
+ .on('change:x', function(){ assert.ok(false); })
+ .save(null, {wait: true});
+ });
+
+ QUnit.test('#1664 - Changing from one value, silently to another, back to original triggers a change.', function(assert) {
+ assert.expect(1);
+ var model = new Backbone.Model({x: 1});
+ model.on('change:x', function() { assert.ok(true); });
+ model.set({x: 2}, {silent: true});
+ model.set({x: 3}, {silent: true});
+ model.set({x: 1});
+ });
+
+ QUnit.test('#1664 - multiple silent changes nested inside a change event', function(assert) {
+ assert.expect(2);
+ var changes = [];
+ var model = new Backbone.Model();
+ model.on('change', function() {
+ model.set({a: 'c'}, {silent: true});
+ model.set({b: 2}, {silent: true});
+ model.unset('c', {silent: true});
+ });
+ model.on('change:a change:b change:c', function(m, val) { changes.push(val); });
+ model.set({a: 'a', b: 1, c: 'item'});
+ assert.deepEqual(changes, ['a', 1, 'item']);
+ assert.deepEqual(model.attributes, {a: 'c', b: 2});
+ });
+
+ QUnit.test('#1791 - `attributes` is available for `parse`', function(assert) {
+ var Model = Backbone.Model.extend({
+ parse: function() { this.has('a'); } // shouldn't throw an error
+ });
+ var model = new Model(null, {parse: true});
+ assert.expect(0);
+ });
+
+ QUnit.test('silent changes in last `change` event back to original triggers change', function(assert) {
+ assert.expect(2);
+ var changes = [];
+ var model = new Backbone.Model();
+ model.on('change:a change:b change:c', function(m, val) { changes.push(val); });
+ model.on('change', function() {
+ model.set({a: 'c'}, {silent: true});
+ });
+ model.set({a: 'a'});
+ assert.deepEqual(changes, ['a']);
+ model.set({a: 'a'});
+ assert.deepEqual(changes, ['a', 'a']);
+ });
+
+ QUnit.test('#1943 change calculations should use _.isEqual', function(assert) {
+ var model = new Backbone.Model({a: {key: 'value'}});
+ model.set('a', {key: 'value'}, {silent: true});
+ assert.equal(model.changedAttributes(), false);
+ });
+
+ QUnit.test('#1964 - final `change` event is always fired, regardless of interim changes', function(assert) {
+ assert.expect(1);
+ var model = new Backbone.Model();
+ model.on('change:property', function() {
+ model.set('property', 'bar');
+ });
+ model.on('change', function() {
+ assert.ok(true);
+ });
+ model.set('property', 'foo');
+ });
+
+ QUnit.test('isValid', function(assert) {
+ var model = new Backbone.Model({valid: true});
+ model.validate = function(attrs) {
+ if (!attrs.valid) return 'invalid';
+ };
+ assert.equal(model.isValid(), true);
+ assert.equal(model.set({valid: false}, {validate: true}), false);
+ assert.equal(model.isValid(), true);
+ model.set({valid: false});
+ assert.equal(model.isValid(), false);
+ assert.ok(!model.set('valid', false, {validate: true}));
+ });
+
+ QUnit.test('#1179 - isValid returns true in the absence of validate.', function(assert) {
+ assert.expect(1);
+ var model = new Backbone.Model();
+ model.validate = null;
+ assert.ok(model.isValid());
+ });
+
+ QUnit.test('#1961 - Creating a model with {validate:true} will call validate and use the error callback', function(assert) {
+ var Model = Backbone.Model.extend({
+ validate: function(attrs) {
+ if (attrs.id === 1) return "This shouldn't happen";
+ }
+ });
+ var model = new Model({id: 1}, {validate: true});
+ assert.equal(model.validationError, "This shouldn't happen");
+ });
+
+ QUnit.test('toJSON receives attrs during save(..., {wait: true})', function(assert) {
+ assert.expect(1);
+ var Model = Backbone.Model.extend({
+ url: '/test',
+ toJSON: function() {
+ assert.strictEqual(this.attributes.x, 1);
+ return _.clone(this.attributes);
+ }
+ });
+ var model = new Model;
+ model.save({x: 1}, {wait: true});
+ });
+
+ QUnit.test('#2034 - nested set with silent only triggers one change', function(assert) {
+ assert.expect(1);
+ var model = new Backbone.Model();
+ model.on('change', function() {
+ model.set({b: true}, {silent: true});
+ assert.ok(true);
+ });
+ model.set({a: true});
+ });
+
+ QUnit.test('#3778 - id will only be updated if it is set', function(assert) {
+ assert.expect(2);
+ var model = new Backbone.Model({id: 1});
+ model.id = 2;
+ model.set({foo: 'bar'});
+ assert.equal(model.id, 2);
+ model.set({id: 3});
+ assert.equal(model.id, 3);
+ });
+
+})();
diff --git a/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/backbone/test/noconflict.js b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/backbone/test/noconflict.js
new file mode 100644
index 0000000..9968f68
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/backbone/test/noconflict.js
@@ -0,0 +1,13 @@
+(function() {
+
+ QUnit.module('Backbone.noConflict');
+
+ QUnit.test('noConflict', function(assert) {
+ assert.expect(2);
+ var noconflictBackbone = Backbone.noConflict();
+ assert.equal(window.Backbone, undefined, 'Returned window.Backbone');
+ window.Backbone = noconflictBackbone;
+ assert.equal(window.Backbone, noconflictBackbone, 'Backbone is still pointing to the original Backbone');
+ });
+
+})();
diff --git a/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/backbone/test/router.js b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/backbone/test/router.js
new file mode 100644
index 0000000..13110c4
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/backbone/test/router.js
@@ -0,0 +1,1062 @@
+(function() {
+
+ var router = null;
+ var location = null;
+ var lastRoute = null;
+ var lastArgs = [];
+
+ var onRoute = function(routerParam, route, args) {
+ lastRoute = route;
+ lastArgs = args;
+ };
+
+ var Location = function(href) {
+ this.replace(href);
+ };
+
+ _.extend(Location.prototype, {
+
+ parser: document.createElement('a'),
+
+ replace: function(href) {
+ this.parser.href = href;
+ _.extend(this, _.pick(this.parser,
+ 'href',
+ 'hash',
+ 'host',
+ 'search',
+ 'fragment',
+ 'pathname',
+ 'protocol'
+ ));
+ // In IE, anchor.pathname does not contain a leading slash though
+ // window.location.pathname does.
+ if (!/^\//.test(this.pathname)) this.pathname = '/' + this.pathname;
+ },
+
+ toString: function() {
+ return this.href;
+ }
+
+ });
+
+ QUnit.module('Backbone.Router', {
+
+ setup: function() {
+ location = new Location('http://example.com');
+ Backbone.history = _.extend(new Backbone.History, {location: location});
+ router = new Router({testing: 101});
+ Backbone.history.interval = 9;
+ Backbone.history.start({pushState: false});
+ lastRoute = null;
+ lastArgs = [];
+ Backbone.history.on('route', onRoute);
+ },
+
+ teardown: function() {
+ Backbone.history.stop();
+ Backbone.history.off('route', onRoute);
+ }
+
+ });
+
+ var ExternalObject = {
+ value: 'unset',
+
+ routingFunction: function(value) {
+ this.value = value;
+ }
+ };
+ ExternalObject.routingFunction = _.bind(ExternalObject.routingFunction, ExternalObject);
+
+ var Router = Backbone.Router.extend({
+
+ count: 0,
+
+ routes: {
+ 'noCallback': 'noCallback',
+ 'counter': 'counter',
+ 'search/:query': 'search',
+ 'search/:query/p:page': 'search',
+ 'charñ': 'charUTF',
+ 'char%C3%B1': 'charEscaped',
+ 'contacts': 'contacts',
+ 'contacts/new': 'newContact',
+ 'contacts/:id': 'loadContact',
+ 'route-event/:arg': 'routeEvent',
+ 'optional(/:item)': 'optionalItem',
+ 'named/optional/(y:z)': 'namedOptional',
+ 'splat/*args/end': 'splat',
+ ':repo/compare/*from...*to': 'github',
+ 'decode/:named/*splat': 'decode',
+ '*first/complex-*part/*rest': 'complex',
+ 'query/:entity': 'query',
+ 'function/:value': ExternalObject.routingFunction,
+ '*anything': 'anything'
+ },
+
+ initialize: function(options) {
+ this.testing = options.testing;
+ this.route('implicit', 'implicit');
+ },
+
+ counter: function() {
+ this.count++;
+ },
+
+ implicit: function() {
+ this.count++;
+ },
+
+ search: function(query, page) {
+ this.query = query;
+ this.page = page;
+ },
+
+ charUTF: function() {
+ this.charType = 'UTF';
+ },
+
+ charEscaped: function() {
+ this.charType = 'escaped';
+ },
+
+ contacts: function(){
+ this.contact = 'index';
+ },
+
+ newContact: function(){
+ this.contact = 'new';
+ },
+
+ loadContact: function(){
+ this.contact = 'load';
+ },
+
+ optionalItem: function(arg){
+ this.arg = arg !== void 0 ? arg : null;
+ },
+
+ splat: function(args) {
+ this.args = args;
+ },
+
+ github: function(repo, from, to) {
+ this.repo = repo;
+ this.from = from;
+ this.to = to;
+ },
+
+ complex: function(first, part, rest) {
+ this.first = first;
+ this.part = part;
+ this.rest = rest;
+ },
+
+ query: function(entity, args) {
+ this.entity = entity;
+ this.queryArgs = args;
+ },
+
+ anything: function(whatever) {
+ this.anything = whatever;
+ },
+
+ namedOptional: function(z) {
+ this.z = z;
+ },
+
+ decode: function(named, path) {
+ this.named = named;
+ this.path = path;
+ },
+
+ routeEvent: function(arg) {
+ }
+
+ });
+
+ QUnit.test('initialize', function(assert) {
+ assert.expect(1);
+ assert.equal(router.testing, 101);
+ });
+
+ QUnit.test('routes (simple)', function(assert) {
+ assert.expect(4);
+ location.replace('http://example.com#search/news');
+ Backbone.history.checkUrl();
+ assert.equal(router.query, 'news');
+ assert.equal(router.page, void 0);
+ assert.equal(lastRoute, 'search');
+ assert.equal(lastArgs[0], 'news');
+ });
+
+ QUnit.test('routes (simple, but unicode)', function(assert) {
+ assert.expect(4);
+ location.replace('http://example.com#search/тест');
+ Backbone.history.checkUrl();
+ assert.equal(router.query, 'тест');
+ assert.equal(router.page, void 0);
+ assert.equal(lastRoute, 'search');
+ assert.equal(lastArgs[0], 'тест');
+ });
+
+ QUnit.test('routes (two part)', function(assert) {
+ assert.expect(2);
+ location.replace('http://example.com#search/nyc/p10');
+ Backbone.history.checkUrl();
+ assert.equal(router.query, 'nyc');
+ assert.equal(router.page, '10');
+ });
+
+ QUnit.test('routes via navigate', function(assert) {
+ assert.expect(2);
+ Backbone.history.navigate('search/manhattan/p20', {trigger: true});
+ assert.equal(router.query, 'manhattan');
+ assert.equal(router.page, '20');
+ });
+
+ QUnit.test('routes via navigate with params', function(assert) {
+ assert.expect(1);
+ Backbone.history.navigate('query/test?a=b', {trigger: true});
+ assert.equal(router.queryArgs, 'a=b');
+ });
+
+ QUnit.test('routes via navigate for backwards-compatibility', function(assert) {
+ assert.expect(2);
+ Backbone.history.navigate('search/manhattan/p20', true);
+ assert.equal(router.query, 'manhattan');
+ assert.equal(router.page, '20');
+ });
+
+ QUnit.test('reports matched route via nagivate', function(assert) {
+ assert.expect(1);
+ assert.ok(Backbone.history.navigate('search/manhattan/p20', true));
+ });
+
+ QUnit.test('route precedence via navigate', function(assert){
+ assert.expect(6);
+ // check both 0.9.x and backwards-compatibility options
+ _.each([{trigger: true}, true], function( options ){
+ Backbone.history.navigate('contacts', options);
+ assert.equal(router.contact, 'index');
+ Backbone.history.navigate('contacts/new', options);
+ assert.equal(router.contact, 'new');
+ Backbone.history.navigate('contacts/foo', options);
+ assert.equal(router.contact, 'load');
+ });
+ });
+
+ QUnit.test('loadUrl is not called for identical routes.', function(assert) {
+ assert.expect(0);
+ Backbone.history.loadUrl = function(){ assert.ok(false); };
+ location.replace('http://example.com#route');
+ Backbone.history.navigate('route');
+ Backbone.history.navigate('/route');
+ Backbone.history.navigate('/route');
+ });
+
+ QUnit.test('use implicit callback if none provided', function(assert) {
+ assert.expect(1);
+ router.count = 0;
+ router.navigate('implicit', {trigger: true});
+ assert.equal(router.count, 1);
+ });
+
+ QUnit.test('routes via navigate with {replace: true}', function(assert) {
+ assert.expect(1);
+ location.replace('http://example.com#start_here');
+ Backbone.history.checkUrl();
+ location.replace = function(href) {
+ assert.strictEqual(href, new Location('http://example.com#end_here').href);
+ };
+ Backbone.history.navigate('end_here', {replace: true});
+ });
+
+ QUnit.test('routes (splats)', function(assert) {
+ assert.expect(1);
+ location.replace('http://example.com#splat/long-list/of/splatted_99args/end');
+ Backbone.history.checkUrl();
+ assert.equal(router.args, 'long-list/of/splatted_99args');
+ });
+
+ QUnit.test('routes (github)', function(assert) {
+ assert.expect(3);
+ location.replace('http://example.com#backbone/compare/1.0...braddunbar:with/slash');
+ Backbone.history.checkUrl();
+ assert.equal(router.repo, 'backbone');
+ assert.equal(router.from, '1.0');
+ assert.equal(router.to, 'braddunbar:with/slash');
+ });
+
+ QUnit.test('routes (optional)', function(assert) {
+ assert.expect(2);
+ location.replace('http://example.com#optional');
+ Backbone.history.checkUrl();
+ assert.ok(!router.arg);
+ location.replace('http://example.com#optional/thing');
+ Backbone.history.checkUrl();
+ assert.equal(router.arg, 'thing');
+ });
+
+ QUnit.test('routes (complex)', function(assert) {
+ assert.expect(3);
+ location.replace('http://example.com#one/two/three/complex-part/four/five/six/seven');
+ Backbone.history.checkUrl();
+ assert.equal(router.first, 'one/two/three');
+ assert.equal(router.part, 'part');
+ assert.equal(router.rest, 'four/five/six/seven');
+ });
+
+ QUnit.test('routes (query)', function(assert) {
+ assert.expect(5);
+ location.replace('http://example.com#query/mandel?a=b&c=d');
+ Backbone.history.checkUrl();
+ assert.equal(router.entity, 'mandel');
+ assert.equal(router.queryArgs, 'a=b&c=d');
+ assert.equal(lastRoute, 'query');
+ assert.equal(lastArgs[0], 'mandel');
+ assert.equal(lastArgs[1], 'a=b&c=d');
+ });
+
+ QUnit.test('routes (anything)', function(assert) {
+ assert.expect(1);
+ location.replace('http://example.com#doesnt-match-a-route');
+ Backbone.history.checkUrl();
+ assert.equal(router.anything, 'doesnt-match-a-route');
+ });
+
+ QUnit.test('routes (function)', function(assert) {
+ assert.expect(3);
+ router.on('route', function(name) {
+ assert.ok(name === '');
+ });
+ assert.equal(ExternalObject.value, 'unset');
+ location.replace('http://example.com#function/set');
+ Backbone.history.checkUrl();
+ assert.equal(ExternalObject.value, 'set');
+ });
+
+ QUnit.test('Decode named parameters, not splats.', function(assert) {
+ assert.expect(2);
+ location.replace('http://example.com#decode/a%2Fb/c%2Fd/e');
+ Backbone.history.checkUrl();
+ assert.strictEqual(router.named, 'a/b');
+ assert.strictEqual(router.path, 'c/d/e');
+ });
+
+ QUnit.test("fires event when router doesn't have callback on it", function(assert) {
+ assert.expect(1);
+ router.on('route:noCallback', function(){ assert.ok(true); });
+ location.replace('http://example.com#noCallback');
+ Backbone.history.checkUrl();
+ });
+
+ QUnit.test('No events are triggered if #execute returns false.', function(assert) {
+ assert.expect(1);
+ var MyRouter = Backbone.Router.extend({
+
+ routes: {
+ foo: function() {
+ assert.ok(true);
+ }
+ },
+
+ execute: function(callback, args) {
+ callback.apply(this, args);
+ return false;
+ }
+
+ });
+
+ var myRouter = new MyRouter;
+
+ myRouter.on('route route:foo', function() {
+ assert.ok(false);
+ });
+
+ Backbone.history.on('route', function() {
+ assert.ok(false);
+ });
+
+ location.replace('http://example.com#foo');
+ Backbone.history.checkUrl();
+ });
+
+ QUnit.test('#933, #908 - leading slash', function(assert) {
+ assert.expect(2);
+ location.replace('http://example.com/root/foo');
+
+ Backbone.history.stop();
+ Backbone.history = _.extend(new Backbone.History, {location: location});
+ Backbone.history.start({root: '/root', hashChange: false, silent: true});
+ assert.strictEqual(Backbone.history.getFragment(), 'foo');
+
+ Backbone.history.stop();
+ Backbone.history = _.extend(new Backbone.History, {location: location});
+ Backbone.history.start({root: '/root/', hashChange: false, silent: true});
+ assert.strictEqual(Backbone.history.getFragment(), 'foo');
+ });
+
+ QUnit.test('#967 - Route callback gets passed encoded values.', function(assert) {
+ assert.expect(3);
+ var route = 'has%2Fslash/complex-has%23hash/has%20space';
+ Backbone.history.navigate(route, {trigger: true});
+ assert.strictEqual(router.first, 'has/slash');
+ assert.strictEqual(router.part, 'has#hash');
+ assert.strictEqual(router.rest, 'has space');
+ });
+
+ QUnit.test('correctly handles URLs with % (#868)', function(assert) {
+ assert.expect(3);
+ location.replace('http://example.com#search/fat%3A1.5%25');
+ Backbone.history.checkUrl();
+ location.replace('http://example.com#search/fat');
+ Backbone.history.checkUrl();
+ assert.equal(router.query, 'fat');
+ assert.equal(router.page, void 0);
+ assert.equal(lastRoute, 'search');
+ });
+
+ QUnit.test('#2666 - Hashes with UTF8 in them.', function(assert) {
+ assert.expect(2);
+ Backbone.history.navigate('charñ', {trigger: true});
+ assert.equal(router.charType, 'UTF');
+ Backbone.history.navigate('char%C3%B1', {trigger: true});
+ assert.equal(router.charType, 'UTF');
+ });
+
+ QUnit.test('#1185 - Use pathname when hashChange is not wanted.', function(assert) {
+ assert.expect(1);
+ Backbone.history.stop();
+ location.replace('http://example.com/path/name#hash');
+ Backbone.history = _.extend(new Backbone.History, {location: location});
+ Backbone.history.start({hashChange: false});
+ var fragment = Backbone.history.getFragment();
+ assert.strictEqual(fragment, location.pathname.replace(/^\//, ''));
+ });
+
+ QUnit.test('#1206 - Strip leading slash before location.assign.', function(assert) {
+ assert.expect(1);
+ Backbone.history.stop();
+ location.replace('http://example.com/root/');
+ Backbone.history = _.extend(new Backbone.History, {location: location});
+ Backbone.history.start({hashChange: false, root: '/root/'});
+ location.assign = function(pathname) {
+ assert.strictEqual(pathname, '/root/fragment');
+ };
+ Backbone.history.navigate('/fragment');
+ });
+
+ QUnit.test('#1387 - Root fragment without trailing slash.', function(assert) {
+ assert.expect(1);
+ Backbone.history.stop();
+ location.replace('http://example.com/root');
+ Backbone.history = _.extend(new Backbone.History, {location: location});
+ Backbone.history.start({hashChange: false, root: '/root/', silent: true});
+ assert.strictEqual(Backbone.history.getFragment(), '');
+ });
+
+ QUnit.test('#1366 - History does not prepend root to fragment.', function(assert) {
+ assert.expect(2);
+ Backbone.history.stop();
+ location.replace('http://example.com/root/');
+ Backbone.history = _.extend(new Backbone.History, {
+ location: location,
+ history: {
+ pushState: function(state, title, url) {
+ assert.strictEqual(url, '/root/x');
+ }
+ }
+ });
+ Backbone.history.start({
+ root: '/root/',
+ pushState: true,
+ hashChange: false
+ });
+ Backbone.history.navigate('x');
+ assert.strictEqual(Backbone.history.fragment, 'x');
+ });
+
+ QUnit.test('Normalize root.', function(assert) {
+ assert.expect(1);
+ Backbone.history.stop();
+ location.replace('http://example.com/root');
+ Backbone.history = _.extend(new Backbone.History, {
+ location: location,
+ history: {
+ pushState: function(state, title, url) {
+ assert.strictEqual(url, '/root/fragment');
+ }
+ }
+ });
+ Backbone.history.start({
+ pushState: true,
+ root: '/root',
+ hashChange: false
+ });
+ Backbone.history.navigate('fragment');
+ });
+
+ QUnit.test('Normalize root.', function(assert) {
+ assert.expect(1);
+ Backbone.history.stop();
+ location.replace('http://example.com/root#fragment');
+ Backbone.history = _.extend(new Backbone.History, {
+ location: location,
+ history: {
+ pushState: function(state, title, url) {},
+ replaceState: function(state, title, url) {
+ assert.strictEqual(url, '/root/fragment');
+ }
+ }
+ });
+ Backbone.history.start({
+ pushState: true,
+ root: '/root'
+ });
+ });
+
+ QUnit.test('Normalize root.', function(assert) {
+ assert.expect(1);
+ Backbone.history.stop();
+ location.replace('http://example.com/root');
+ Backbone.history = _.extend(new Backbone.History, {location: location});
+ Backbone.history.loadUrl = function() { assert.ok(true); };
+ Backbone.history.start({
+ pushState: true,
+ root: '/root'
+ });
+ });
+
+ QUnit.test('Normalize root - leading slash.', function(assert) {
+ assert.expect(1);
+ Backbone.history.stop();
+ location.replace('http://example.com/root');
+ Backbone.history = _.extend(new Backbone.History, {
+ location: location,
+ history: {
+ pushState: function(){},
+ replaceState: function(){}
+ }
+ });
+ Backbone.history.start({root: 'root'});
+ assert.strictEqual(Backbone.history.root, '/root/');
+ });
+
+ QUnit.test('Transition from hashChange to pushState.', function(assert) {
+ assert.expect(1);
+ Backbone.history.stop();
+ location.replace('http://example.com/root#x/y');
+ Backbone.history = _.extend(new Backbone.History, {
+ location: location,
+ history: {
+ pushState: function(){},
+ replaceState: function(state, title, url){
+ assert.strictEqual(url, '/root/x/y');
+ }
+ }
+ });
+ Backbone.history.start({
+ root: 'root',
+ pushState: true
+ });
+ });
+
+ QUnit.test('#1619: Router: Normalize empty root', function(assert) {
+ assert.expect(1);
+ Backbone.history.stop();
+ location.replace('http://example.com/');
+ Backbone.history = _.extend(new Backbone.History, {
+ location: location,
+ history: {
+ pushState: function(){},
+ replaceState: function(){}
+ }
+ });
+ Backbone.history.start({root: ''});
+ assert.strictEqual(Backbone.history.root, '/');
+ });
+
+ QUnit.test('#1619: Router: nagivate with empty root', function(assert) {
+ assert.expect(1);
+ Backbone.history.stop();
+ location.replace('http://example.com/');
+ Backbone.history = _.extend(new Backbone.History, {
+ location: location,
+ history: {
+ pushState: function(state, title, url) {
+ assert.strictEqual(url, '/fragment');
+ }
+ }
+ });
+ Backbone.history.start({
+ pushState: true,
+ root: '',
+ hashChange: false
+ });
+ Backbone.history.navigate('fragment');
+ });
+
+ QUnit.test('Transition from pushState to hashChange.', function(assert) {
+ assert.expect(1);
+ Backbone.history.stop();
+ location.replace('http://example.com/root/x/y?a=b');
+ location.replace = function(url) {
+ assert.strictEqual(url, '/root#x/y?a=b');
+ };
+ Backbone.history = _.extend(new Backbone.History, {
+ location: location,
+ history: {
+ pushState: null,
+ replaceState: null
+ }
+ });
+ Backbone.history.start({
+ root: 'root',
+ pushState: true
+ });
+ });
+
+ QUnit.test('#1695 - hashChange to pushState with search.', function(assert) {
+ assert.expect(1);
+ Backbone.history.stop();
+ location.replace('http://example.com/root#x/y?a=b');
+ Backbone.history = _.extend(new Backbone.History, {
+ location: location,
+ history: {
+ pushState: function(){},
+ replaceState: function(state, title, url){
+ assert.strictEqual(url, '/root/x/y?a=b');
+ }
+ }
+ });
+ Backbone.history.start({
+ root: 'root',
+ pushState: true
+ });
+ });
+
+ QUnit.test('#1746 - Router allows empty route.', function(assert) {
+ assert.expect(1);
+ var MyRouter = Backbone.Router.extend({
+ routes: {'': 'empty'},
+ empty: function(){},
+ route: function(route){
+ assert.strictEqual(route, '');
+ }
+ });
+ new MyRouter;
+ });
+
+ QUnit.test('#1794 - Trailing space in fragments.', function(assert) {
+ assert.expect(1);
+ var history = new Backbone.History;
+ assert.strictEqual(history.getFragment('fragment '), 'fragment');
+ });
+
+ QUnit.test('#1820 - Leading slash and trailing space.', 1, function(assert) {
+ var history = new Backbone.History;
+ assert.strictEqual(history.getFragment('/fragment '), 'fragment');
+ });
+
+ QUnit.test('#1980 - Optional parameters.', function(assert) {
+ assert.expect(2);
+ location.replace('http://example.com#named/optional/y');
+ Backbone.history.checkUrl();
+ assert.strictEqual(router.z, undefined);
+ location.replace('http://example.com#named/optional/y123');
+ Backbone.history.checkUrl();
+ assert.strictEqual(router.z, '123');
+ });
+
+ QUnit.test("#2062 - Trigger 'route' event on router instance.", function(assert) {
+ assert.expect(2);
+ router.on('route', function(name, args) {
+ assert.strictEqual(name, 'routeEvent');
+ assert.deepEqual(args, ['x', null]);
+ });
+ location.replace('http://example.com#route-event/x');
+ Backbone.history.checkUrl();
+ });
+
+ QUnit.test('#2255 - Extend routes by making routes a function.', function(assert) {
+ assert.expect(1);
+ var RouterBase = Backbone.Router.extend({
+ routes: function() {
+ return {
+ home: 'root',
+ index: 'index.html'
+ };
+ }
+ });
+
+ var RouterExtended = RouterBase.extend({
+ routes: function() {
+ var _super = RouterExtended.__super__.routes;
+ return _.extend(_super(), {show: 'show', search: 'search'});
+ }
+ });
+
+ var myRouter = new RouterExtended();
+ assert.deepEqual({home: 'root', index: 'index.html', show: 'show', search: 'search'}, myRouter.routes);
+ });
+
+ QUnit.test('#2538 - hashChange to pushState only if both requested.', function(assert) {
+ assert.expect(0);
+ Backbone.history.stop();
+ location.replace('http://example.com/root?a=b#x/y');
+ Backbone.history = _.extend(new Backbone.History, {
+ location: location,
+ history: {
+ pushState: function(){},
+ replaceState: function(){ assert.ok(false); }
+ }
+ });
+ Backbone.history.start({
+ root: 'root',
+ pushState: true,
+ hashChange: false
+ });
+ });
+
+ QUnit.test('No hash fallback.', function(assert) {
+ assert.expect(0);
+ Backbone.history.stop();
+ Backbone.history = _.extend(new Backbone.History, {
+ location: location,
+ history: {
+ pushState: function(){},
+ replaceState: function(){}
+ }
+ });
+
+ var MyRouter = Backbone.Router.extend({
+ routes: {
+ hash: function() { assert.ok(false); }
+ }
+ });
+ var myRouter = new MyRouter;
+
+ location.replace('http://example.com/');
+ Backbone.history.start({
+ pushState: true,
+ hashChange: false
+ });
+ location.replace('http://example.com/nomatch#hash');
+ Backbone.history.checkUrl();
+ });
+
+ QUnit.test('#2656 - No trailing slash on root.', function(assert) {
+ assert.expect(1);
+ Backbone.history.stop();
+ Backbone.history = _.extend(new Backbone.History, {
+ location: location,
+ history: {
+ pushState: function(state, title, url){
+ assert.strictEqual(url, '/root');
+ }
+ }
+ });
+ location.replace('http://example.com/root/path');
+ Backbone.history.start({pushState: true, hashChange: false, root: 'root'});
+ Backbone.history.navigate('');
+ });
+
+ QUnit.test('#2656 - No trailing slash on root.', function(assert) {
+ assert.expect(1);
+ Backbone.history.stop();
+ Backbone.history = _.extend(new Backbone.History, {
+ location: location,
+ history: {
+ pushState: function(state, title, url) {
+ assert.strictEqual(url, '/');
+ }
+ }
+ });
+ location.replace('http://example.com/path');
+ Backbone.history.start({pushState: true, hashChange: false});
+ Backbone.history.navigate('');
+ });
+
+ QUnit.test('#2656 - No trailing slash on root.', function(assert) {
+ assert.expect(1);
+ Backbone.history.stop();
+ Backbone.history = _.extend(new Backbone.History, {
+ location: location,
+ history: {
+ pushState: function(state, title, url){
+ assert.strictEqual(url, '/root?x=1');
+ }
+ }
+ });
+ location.replace('http://example.com/root/path');
+ Backbone.history.start({pushState: true, hashChange: false, root: 'root'});
+ Backbone.history.navigate('?x=1');
+ });
+
+ QUnit.test('#2765 - Fragment matching sans query/hash.', function(assert) {
+ assert.expect(2);
+ Backbone.history.stop();
+ Backbone.history = _.extend(new Backbone.History, {
+ location: location,
+ history: {
+ pushState: function(state, title, url) {
+ assert.strictEqual(url, '/path?query#hash');
+ }
+ }
+ });
+
+ var MyRouter = Backbone.Router.extend({
+ routes: {
+ path: function() { assert.ok(true); }
+ }
+ });
+ var myRouter = new MyRouter;
+
+ location.replace('http://example.com/');
+ Backbone.history.start({pushState: true, hashChange: false});
+ Backbone.history.navigate('path?query#hash', true);
+ });
+
+ QUnit.test('Do not decode the search params.', function(assert) {
+ assert.expect(1);
+ var MyRouter = Backbone.Router.extend({
+ routes: {
+ path: function(params){
+ assert.strictEqual(params, 'x=y%3Fz');
+ }
+ }
+ });
+ var myRouter = new MyRouter;
+ Backbone.history.navigate('path?x=y%3Fz', true);
+ });
+
+ QUnit.test('Navigate to a hash url.', function(assert) {
+ assert.expect(1);
+ Backbone.history.stop();
+ Backbone.history = _.extend(new Backbone.History, {location: location});
+ Backbone.history.start({pushState: true});
+ var MyRouter = Backbone.Router.extend({
+ routes: {
+ path: function(params) {
+ assert.strictEqual(params, 'x=y');
+ }
+ }
+ });
+ var myRouter = new MyRouter;
+ location.replace('http://example.com/path?x=y#hash');
+ Backbone.history.checkUrl();
+ });
+
+ QUnit.test('#navigate to a hash url.', function(assert) {
+ assert.expect(1);
+ Backbone.history.stop();
+ Backbone.history = _.extend(new Backbone.History, {location: location});
+ Backbone.history.start({pushState: true});
+ var MyRouter = Backbone.Router.extend({
+ routes: {
+ path: function(params) {
+ assert.strictEqual(params, 'x=y');
+ }
+ }
+ });
+ var myRouter = new MyRouter;
+ Backbone.history.navigate('path?x=y#hash', true);
+ });
+
+ QUnit.test('unicode pathname', function(assert) {
+ assert.expect(1);
+ location.replace('http://example.com/myyjä');
+ Backbone.history.stop();
+ Backbone.history = _.extend(new Backbone.History, {location: location});
+ var MyRouter = Backbone.Router.extend({
+ routes: {
+ myyjä: function() {
+ assert.ok(true);
+ }
+ }
+ });
+ new MyRouter;
+ Backbone.history.start({pushState: true});
+ });
+
+ QUnit.test('unicode pathname with % in a parameter', function(assert) {
+ assert.expect(1);
+ location.replace('http://example.com/myyjä/foo%20%25%3F%2f%40%25%20bar');
+ location.pathname = '/myyj%C3%A4/foo%20%25%3F%2f%40%25%20bar';
+ Backbone.history.stop();
+ Backbone.history = _.extend(new Backbone.History, {location: location});
+ var MyRouter = Backbone.Router.extend({
+ routes: {
+ 'myyjä/:query': function(query) {
+ assert.strictEqual(query, 'foo %?/@% bar');
+ }
+ }
+ });
+ new MyRouter;
+ Backbone.history.start({pushState: true});
+ });
+
+ QUnit.test('newline in route', function(assert) {
+ assert.expect(1);
+ location.replace('http://example.com/stuff%0Anonsense?param=foo%0Abar');
+ Backbone.history.stop();
+ Backbone.history = _.extend(new Backbone.History, {location: location});
+ var MyRouter = Backbone.Router.extend({
+ routes: {
+ 'stuff\nnonsense': function() {
+ assert.ok(true);
+ }
+ }
+ });
+ new MyRouter;
+ Backbone.history.start({pushState: true});
+ });
+
+ QUnit.test('Router#execute receives callback, args, name.', function(assert) {
+ assert.expect(3);
+ location.replace('http://example.com#foo/123/bar?x=y');
+ Backbone.history.stop();
+ Backbone.history = _.extend(new Backbone.History, {location: location});
+ var MyRouter = Backbone.Router.extend({
+ routes: {'foo/:id/bar': 'foo'},
+ foo: function(){},
+ execute: function(callback, args, name) {
+ assert.strictEqual(callback, this.foo);
+ assert.deepEqual(args, ['123', 'x=y']);
+ assert.strictEqual(name, 'foo');
+ }
+ });
+ var myRouter = new MyRouter;
+ Backbone.history.start();
+ });
+
+ QUnit.test('pushState to hashChange with only search params.', function(assert) {
+ assert.expect(1);
+ Backbone.history.stop();
+ location.replace('http://example.com?a=b');
+ location.replace = function(url) {
+ assert.strictEqual(url, '/#?a=b');
+ };
+ Backbone.history = _.extend(new Backbone.History, {
+ location: location,
+ history: null
+ });
+ Backbone.history.start({pushState: true});
+ });
+
+ QUnit.test('#3123 - History#navigate decodes before comparison.', function(assert) {
+ assert.expect(1);
+ Backbone.history.stop();
+ location.replace('http://example.com/shop/search?keyword=short%20dress');
+ Backbone.history = _.extend(new Backbone.History, {
+ location: location,
+ history: {
+ pushState: function(){ assert.ok(false); },
+ replaceState: function(){ assert.ok(false); }
+ }
+ });
+ Backbone.history.start({pushState: true});
+ Backbone.history.navigate('shop/search?keyword=short%20dress', true);
+ assert.strictEqual(Backbone.history.fragment, 'shop/search?keyword=short dress');
+ });
+
+ QUnit.test('#3175 - Urls in the params', function(assert) {
+ assert.expect(1);
+ Backbone.history.stop();
+ location.replace('http://example.com#login?a=value&backUrl=https%3A%2F%2Fwww.msn.com%2Fidp%2Fidpdemo%3Fspid%3Dspdemo%26target%3Db');
+ Backbone.history = _.extend(new Backbone.History, {location: location});
+ var myRouter = new Backbone.Router;
+ myRouter.route('login', function(params) {
+ assert.strictEqual(params, 'a=value&backUrl=https%3A%2F%2Fwww.msn.com%2Fidp%2Fidpdemo%3Fspid%3Dspdemo%26target%3Db');
+ });
+ Backbone.history.start();
+ });
+
+ QUnit.test('#3358 - pushState to hashChange transition with search params', function(assert) {
+ assert.expect(1);
+ Backbone.history.stop();
+ location.replace('http://example.com/root?foo=bar');
+ location.replace = function(url) {
+ assert.strictEqual(url, '/root#?foo=bar');
+ };
+ Backbone.history = _.extend(new Backbone.History, {
+ location: location,
+ history: {
+ pushState: undefined,
+ replaceState: undefined
+ }
+ });
+ Backbone.history.start({root: '/root', pushState: true});
+ });
+
+ QUnit.test("Paths that don't match the root should not match no root", function(assert) {
+ assert.expect(0);
+ location.replace('http://example.com/foo');
+ Backbone.history.stop();
+ Backbone.history = _.extend(new Backbone.History, {location: location});
+ var MyRouter = Backbone.Router.extend({
+ routes: {
+ foo: function(){
+ assert.ok(false, 'should not match unless root matches');
+ }
+ }
+ });
+ var myRouter = new MyRouter;
+ Backbone.history.start({root: 'root', pushState: true});
+ });
+
+ QUnit.test("Paths that don't match the root should not match roots of the same length", function(assert) {
+ assert.expect(0);
+ location.replace('http://example.com/xxxx/foo');
+ Backbone.history.stop();
+ Backbone.history = _.extend(new Backbone.History, {location: location});
+ var MyRouter = Backbone.Router.extend({
+ routes: {
+ foo: function(){
+ assert.ok(false, 'should not match unless root matches');
+ }
+ }
+ });
+ var myRouter = new MyRouter;
+ Backbone.history.start({root: 'root', pushState: true});
+ });
+
+ QUnit.test('roots with regex characters', function(assert) {
+ assert.expect(1);
+ location.replace('http://example.com/x+y.z/foo');
+ Backbone.history.stop();
+ Backbone.history = _.extend(new Backbone.History, {location: location});
+ var MyRouter = Backbone.Router.extend({
+ routes: {foo: function(){ assert.ok(true); }}
+ });
+ var myRouter = new MyRouter;
+ Backbone.history.start({root: 'x+y.z', pushState: true});
+ });
+
+ QUnit.test('roots with unicode characters', function(assert) {
+ assert.expect(1);
+ location.replace('http://example.com/®ooτ/foo');
+ Backbone.history.stop();
+ Backbone.history = _.extend(new Backbone.History, {location: location});
+ var MyRouter = Backbone.Router.extend({
+ routes: {foo: function(){ assert.ok(true); }}
+ });
+ var myRouter = new MyRouter;
+ Backbone.history.start({root: '®ooτ', pushState: true});
+ });
+
+ QUnit.test('roots without slash', function(assert) {
+ assert.expect(1);
+ location.replace('http://example.com/®ooτ');
+ Backbone.history.stop();
+ Backbone.history = _.extend(new Backbone.History, {location: location});
+ var MyRouter = Backbone.Router.extend({
+ routes: {'': function(){ assert.ok(true); }}
+ });
+ var myRouter = new MyRouter;
+ Backbone.history.start({root: '®ooτ', pushState: true});
+ });
+
+})();
diff --git a/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/backbone/test/setup/dom-setup.js b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/backbone/test/setup/dom-setup.js
new file mode 100644
index 0000000..f224228
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/backbone/test/setup/dom-setup.js
@@ -0,0 +1,4 @@
+$('body').append(
+ '<div id="qunit"></div>' +
+ '<div id="qunit-fixture"></div>'
+);
diff --git a/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/backbone/test/setup/environment.js b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/backbone/test/setup/environment.js
new file mode 100644
index 0000000..c2441ac
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/backbone/test/setup/environment.js
@@ -0,0 +1,45 @@
+(function() {
+
+ var sync = Backbone.sync;
+ var ajax = Backbone.ajax;
+ var emulateHTTP = Backbone.emulateHTTP;
+ var emulateJSON = Backbone.emulateJSON;
+ var history = window.history;
+ var pushState = history.pushState;
+ var replaceState = history.replaceState;
+
+ QUnit.config.noglobals = true;
+
+ QUnit.testStart(function() {
+ var env = QUnit.config.current.testEnvironment;
+
+ // We never want to actually call these during tests.
+ history.pushState = history.replaceState = function(){};
+
+ // Capture ajax settings for comparison.
+ Backbone.ajax = function(settings) {
+ env.ajaxSettings = settings;
+ };
+
+ // Capture the arguments to Backbone.sync for comparison.
+ Backbone.sync = function(method, model, options) {
+ env.syncArgs = {
+ method: method,
+ model: model,
+ options: options
+ };
+ sync.apply(this, arguments);
+ };
+
+ });
+
+ QUnit.testDone(function() {
+ Backbone.sync = sync;
+ Backbone.ajax = ajax;
+ Backbone.emulateHTTP = emulateHTTP;
+ Backbone.emulateJSON = emulateJSON;
+ history.pushState = pushState;
+ history.replaceState = replaceState;
+ });
+
+})();
diff --git a/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/backbone/test/sync.js b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/backbone/test/sync.js
new file mode 100644
index 0000000..8813f15
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/backbone/test/sync.js
@@ -0,0 +1,239 @@
+(function() {
+
+ var Library = Backbone.Collection.extend({
+ url: function() { return '/library'; }
+ });
+ var library;
+
+ var attrs = {
+ title: 'The Tempest',
+ author: 'Bill Shakespeare',
+ length: 123
+ };
+
+ QUnit.module('Backbone.sync', {
+
+ beforeEach: function(assert) {
+ library = new Library;
+ library.create(attrs, {wait: false});
+ },
+
+ afterEach: function(assert) {
+ Backbone.emulateHTTP = false;
+ }
+
+ });
+
+ QUnit.test('read', function(assert) {
+ assert.expect(4);
+ library.fetch();
+ assert.equal(this.ajaxSettings.url, '/library');
+ assert.equal(this.ajaxSettings.type, 'GET');
+ assert.equal(this.ajaxSettings.dataType, 'json');
+ assert.ok(_.isEmpty(this.ajaxSettings.data));
+ });
+
+ QUnit.test('passing data', function(assert) {
+ assert.expect(3);
+ library.fetch({data: {a: 'a', one: 1}});
+ assert.equal(this.ajaxSettings.url, '/library');
+ assert.equal(this.ajaxSettings.data.a, 'a');
+ assert.equal(this.ajaxSettings.data.one, 1);
+ });
+
+ QUnit.test('create', function(assert) {
+ assert.expect(6);
+ assert.equal(this.ajaxSettings.url, '/library');
+ assert.equal(this.ajaxSettings.type, 'POST');
+ assert.equal(this.ajaxSettings.dataType, 'json');
+ var data = JSON.parse(this.ajaxSettings.data);
+ assert.equal(data.title, 'The Tempest');
+ assert.equal(data.author, 'Bill Shakespeare');
+ assert.equal(data.length, 123);
+ });
+
+ QUnit.test('update', function(assert) {
+ assert.expect(7);
+ library.first().save({id: '1-the-tempest', author: 'William Shakespeare'});
+ assert.equal(this.ajaxSettings.url, '/library/1-the-tempest');
+ assert.equal(this.ajaxSettings.type, 'PUT');
+ assert.equal(this.ajaxSettings.dataType, 'json');
+ var data = JSON.parse(this.ajaxSettings.data);
+ assert.equal(data.id, '1-the-tempest');
+ assert.equal(data.title, 'The Tempest');
+ assert.equal(data.author, 'William Shakespeare');
+ assert.equal(data.length, 123);
+ });
+
+ QUnit.test('update with emulateHTTP and emulateJSON', function(assert) {
+ assert.expect(7);
+ library.first().save({id: '2-the-tempest', author: 'Tim Shakespeare'}, {
+ emulateHTTP: true,
+ emulateJSON: true
+ });
+ assert.equal(this.ajaxSettings.url, '/library/2-the-tempest');
+ assert.equal(this.ajaxSettings.type, 'POST');
+ assert.equal(this.ajaxSettings.dataType, 'json');
+ assert.equal(this.ajaxSettings.data._method, 'PUT');
+ var data = JSON.parse(this.ajaxSettings.data.model);
+ assert.equal(data.id, '2-the-tempest');
+ assert.equal(data.author, 'Tim Shakespeare');
+ assert.equal(data.length, 123);
+ });
+
+ QUnit.test('update with just emulateHTTP', function(assert) {
+ assert.expect(6);
+ library.first().save({id: '2-the-tempest', author: 'Tim Shakespeare'}, {
+ emulateHTTP: true
+ });
+ assert.equal(this.ajaxSettings.url, '/library/2-the-tempest');
+ assert.equal(this.ajaxSettings.type, 'POST');
+ assert.equal(this.ajaxSettings.contentType, 'application/json');
+ var data = JSON.parse(this.ajaxSettings.data);
+ assert.equal(data.id, '2-the-tempest');
+ assert.equal(data.author, 'Tim Shakespeare');
+ assert.equal(data.length, 123);
+ });
+
+ QUnit.test('update with just emulateJSON', function(assert) {
+ assert.expect(6);
+ library.first().save({id: '2-the-tempest', author: 'Tim Shakespeare'}, {
+ emulateJSON: true
+ });
+ assert.equal(this.ajaxSettings.url, '/library/2-the-tempest');
+ assert.equal(this.ajaxSettings.type, 'PUT');
+ assert.equal(this.ajaxSettings.contentType, 'application/x-www-form-urlencoded');
+ var data = JSON.parse(this.ajaxSettings.data.model);
+ assert.equal(data.id, '2-the-tempest');
+ assert.equal(data.author, 'Tim Shakespeare');
+ assert.equal(data.length, 123);
+ });
+
+ QUnit.test('read model', function(assert) {
+ assert.expect(3);
+ library.first().save({id: '2-the-tempest', author: 'Tim Shakespeare'});
+ library.first().fetch();
+ assert.equal(this.ajaxSettings.url, '/library/2-the-tempest');
+ assert.equal(this.ajaxSettings.type, 'GET');
+ assert.ok(_.isEmpty(this.ajaxSettings.data));
+ });
+
+ QUnit.test('destroy', function(assert) {
+ assert.expect(3);
+ library.first().save({id: '2-the-tempest', author: 'Tim Shakespeare'});
+ library.first().destroy({wait: true});
+ assert.equal(this.ajaxSettings.url, '/library/2-the-tempest');
+ assert.equal(this.ajaxSettings.type, 'DELETE');
+ assert.equal(this.ajaxSettings.data, null);
+ });
+
+ QUnit.test('destroy with emulateHTTP', function(assert) {
+ assert.expect(3);
+ library.first().save({id: '2-the-tempest', author: 'Tim Shakespeare'});
+ library.first().destroy({
+ emulateHTTP: true,
+ emulateJSON: true
+ });
+ assert.equal(this.ajaxSettings.url, '/library/2-the-tempest');
+ assert.equal(this.ajaxSettings.type, 'POST');
+ assert.equal(JSON.stringify(this.ajaxSettings.data), '{"_method":"DELETE"}');
+ });
+
+ QUnit.test('urlError', function(assert) {
+ assert.expect(2);
+ var model = new Backbone.Model();
+ assert.raises(function() {
+ model.fetch();
+ });
+ model.fetch({url: '/one/two'});
+ assert.equal(this.ajaxSettings.url, '/one/two');
+ });
+
+ QUnit.test('#1052 - `options` is optional.', function(assert) {
+ assert.expect(0);
+ var model = new Backbone.Model();
+ model.url = '/test';
+ Backbone.sync('create', model);
+ });
+
+ QUnit.test('Backbone.ajax', function(assert) {
+ assert.expect(1);
+ Backbone.ajax = function(settings){
+ assert.strictEqual(settings.url, '/test');
+ };
+ var model = new Backbone.Model();
+ model.url = '/test';
+ Backbone.sync('create', model);
+ });
+
+ QUnit.test('Call provided error callback on error.', function(assert) {
+ assert.expect(1);
+ var model = new Backbone.Model;
+ model.url = '/test';
+ Backbone.sync('read', model, {
+ error: function() { assert.ok(true); }
+ });
+ this.ajaxSettings.error();
+ });
+
+ QUnit.test('Use Backbone.emulateHTTP as default.', function(assert) {
+ assert.expect(2);
+ var model = new Backbone.Model;
+ model.url = '/test';
+
+ Backbone.emulateHTTP = true;
+ model.sync('create', model);
+ assert.strictEqual(this.ajaxSettings.emulateHTTP, true);
+
+ Backbone.emulateHTTP = false;
+ model.sync('create', model);
+ assert.strictEqual(this.ajaxSettings.emulateHTTP, false);
+ });
+
+ QUnit.test('Use Backbone.emulateJSON as default.', function(assert) {
+ assert.expect(2);
+ var model = new Backbone.Model;
+ model.url = '/test';
+
+ Backbone.emulateJSON = true;
+ model.sync('create', model);
+ assert.strictEqual(this.ajaxSettings.emulateJSON, true);
+
+ Backbone.emulateJSON = false;
+ model.sync('create', model);
+ assert.strictEqual(this.ajaxSettings.emulateJSON, false);
+ });
+
+ QUnit.test('#1756 - Call user provided beforeSend function.', function(assert) {
+ assert.expect(4);
+ Backbone.emulateHTTP = true;
+ var model = new Backbone.Model;
+ model.url = '/test';
+ var xhr = {
+ setRequestHeader: function(header, value) {
+ assert.strictEqual(header, 'X-HTTP-Method-Override');
+ assert.strictEqual(value, 'DELETE');
+ }
+ };
+ model.sync('delete', model, {
+ beforeSend: function(_xhr) {
+ assert.ok(_xhr === xhr);
+ return false;
+ }
+ });
+ assert.strictEqual(this.ajaxSettings.beforeSend(xhr), false);
+ });
+
+ QUnit.test('#2928 - Pass along `textStatus` and `errorThrown`.', function(assert) {
+ assert.expect(2);
+ var model = new Backbone.Model;
+ model.url = '/test';
+ model.on('error', function(m, xhr, options) {
+ assert.strictEqual(options.textStatus, 'textStatus');
+ assert.strictEqual(options.errorThrown, 'errorThrown');
+ });
+ model.fetch();
+ this.ajaxSettings.error({}, 'textStatus', 'errorThrown');
+ });
+
+})();
diff --git a/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/backbone/test/view.js b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/backbone/test/view.js
new file mode 100644
index 0000000..faf3445
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/backbone/test/view.js
@@ -0,0 +1,495 @@
+(function() {
+
+ var view;
+
+ QUnit.module('Backbone.View', {
+
+ beforeEach: function(assert) {
+ $('#qunit-fixture').append(
+ '<div id="testElement"><h1>Test</h1></div>'
+ );
+
+ view = new Backbone.View({
+ id: 'test-view',
+ className: 'test-view',
+ other: 'non-special-option'
+ });
+ },
+
+ afterEach: function() {
+ $('#testElement').remove();
+ $('#test-view').remove();
+ }
+
+ });
+
+ QUnit.test('constructor', function(assert) {
+ assert.expect(3);
+ assert.equal(view.el.id, 'test-view');
+ assert.equal(view.el.className, 'test-view');
+ assert.equal(view.el.other, void 0);
+ });
+
+ QUnit.test('$', function(assert) {
+ assert.expect(2);
+ var myView = new Backbone.View;
+ myView.setElement('<p><a><b>test</b></a></p>');
+ var result = myView.$('a b');
+
+ assert.strictEqual(result[0].innerHTML, 'test');
+ assert.ok(result.length === +result.length);
+ });
+
+ QUnit.test('$el', function(assert) {
+ assert.expect(3);
+ var myView = new Backbone.View;
+ myView.setElement('<p><a><b>test</b></a></p>');
+ assert.strictEqual(myView.el.nodeType, 1);
+
+ assert.ok(myView.$el instanceof Backbone.$);
+ assert.strictEqual(myView.$el[0], myView.el);
+ });
+
+ QUnit.test('initialize', function(assert) {
+ assert.expect(1);
+ var View = Backbone.View.extend({
+ initialize: function() {
+ this.one = 1;
+ }
+ });
+
+ assert.strictEqual(new View().one, 1);
+ });
+
+ QUnit.test('render', function(assert) {
+ assert.expect(1);
+ var myView = new Backbone.View;
+ assert.equal(myView.render(), myView, '#render returns the view instance');
+ });
+
+ QUnit.test('delegateEvents', function(assert) {
+ assert.expect(6);
+ var counter1 = 0, counter2 = 0;
+
+ var myView = new Backbone.View({el: '#testElement'});
+ myView.increment = function(){ counter1++; };
+ myView.$el.on('click', function(){ counter2++; });
+
+ var events = {'click h1': 'increment'};
+
+ myView.delegateEvents(events);
+ myView.$('h1').trigger('click');
+ assert.equal(counter1, 1);
+ assert.equal(counter2, 1);
+
+ myView.$('h1').trigger('click');
+ assert.equal(counter1, 2);
+ assert.equal(counter2, 2);
+
+ myView.delegateEvents(events);
+ myView.$('h1').trigger('click');
+ assert.equal(counter1, 3);
+ assert.equal(counter2, 3);
+ });
+
+ QUnit.test('delegate', function(assert) {
+ assert.expect(3);
+ var myView = new Backbone.View({el: '#testElement'});
+ myView.delegate('click', 'h1', function() {
+ assert.ok(true);
+ });
+ myView.delegate('click', function() {
+ assert.ok(true);
+ });
+ myView.$('h1').trigger('click');
+
+ assert.equal(myView.delegate(), myView, '#delegate returns the view instance');
+ });
+
+ QUnit.test('delegateEvents allows functions for callbacks', function(assert) {
+ assert.expect(3);
+ var myView = new Backbone.View({el: '<p></p>'});
+ myView.counter = 0;
+
+ var events = {
+ click: function() {
+ this.counter++;
+ }
+ };
+
+ myView.delegateEvents(events);
+ myView.$el.trigger('click');
+ assert.equal(myView.counter, 1);
+
+ myView.$el.trigger('click');
+ assert.equal(myView.counter, 2);
+
+ myView.delegateEvents(events);
+ myView.$el.trigger('click');
+ assert.equal(myView.counter, 3);
+ });
+
+
+ QUnit.test('delegateEvents ignore undefined methods', function(assert) {
+ assert.expect(0);
+ var myView = new Backbone.View({el: '<p></p>'});
+ myView.delegateEvents({'click': 'undefinedMethod'});
+ myView.$el.trigger('click');
+ });
+
+ QUnit.test('undelegateEvents', function(assert) {
+ assert.expect(7);
+ var counter1 = 0, counter2 = 0;
+
+ var myView = new Backbone.View({el: '#testElement'});
+ myView.increment = function(){ counter1++; };
+ myView.$el.on('click', function(){ counter2++; });
+
+ var events = {'click h1': 'increment'};
+
+ myView.delegateEvents(events);
+ myView.$('h1').trigger('click');
+ assert.equal(counter1, 1);
+ assert.equal(counter2, 1);
+
+ myView.undelegateEvents();
+ myView.$('h1').trigger('click');
+ assert.equal(counter1, 1);
+ assert.equal(counter2, 2);
+
+ myView.delegateEvents(events);
+ myView.$('h1').trigger('click');
+ assert.equal(counter1, 2);
+ assert.equal(counter2, 3);
+
+ assert.equal(myView.undelegateEvents(), myView, '#undelegateEvents returns the view instance');
+ });
+
+ QUnit.test('undelegate', function(assert) {
+ assert.expect(1);
+ var myView = new Backbone.View({el: '#testElement'});
+ myView.delegate('click', function() { assert.ok(false); });
+ myView.delegate('click', 'h1', function() { assert.ok(false); });
+
+ myView.undelegate('click');
+
+ myView.$('h1').trigger('click');
+ myView.$el.trigger('click');
+
+ assert.equal(myView.undelegate(), myView, '#undelegate returns the view instance');
+ });
+
+ QUnit.test('undelegate with passed handler', function(assert) {
+ assert.expect(1);
+ var myView = new Backbone.View({el: '#testElement'});
+ var listener = function() { assert.ok(false); };
+ myView.delegate('click', listener);
+ myView.delegate('click', function() { assert.ok(true); });
+ myView.undelegate('click', listener);
+ myView.$el.trigger('click');
+ });
+
+ QUnit.test('undelegate with selector', function(assert) {
+ assert.expect(2);
+ var myView = new Backbone.View({el: '#testElement'});
+ myView.delegate('click', function() { assert.ok(true); });
+ myView.delegate('click', 'h1', function() { assert.ok(false); });
+ myView.undelegate('click', 'h1');
+ myView.$('h1').trigger('click');
+ myView.$el.trigger('click');
+ });
+
+ QUnit.test('undelegate with handler and selector', function(assert) {
+ assert.expect(2);
+ var myView = new Backbone.View({el: '#testElement'});
+ myView.delegate('click', function() { assert.ok(true); });
+ var handler = function(){ assert.ok(false); };
+ myView.delegate('click', 'h1', handler);
+ myView.undelegate('click', 'h1', handler);
+ myView.$('h1').trigger('click');
+ myView.$el.trigger('click');
+ });
+
+ QUnit.test('tagName can be provided as a string', function(assert) {
+ assert.expect(1);
+ var View = Backbone.View.extend({
+ tagName: 'span'
+ });
+
+ assert.equal(new View().el.tagName, 'SPAN');
+ });
+
+ QUnit.test('tagName can be provided as a function', function(assert) {
+ assert.expect(1);
+ var View = Backbone.View.extend({
+ tagName: function() {
+ return 'p';
+ }
+ });
+
+ assert.ok(new View().$el.is('p'));
+ });
+
+ QUnit.test('_ensureElement with DOM node el', function(assert) {
+ assert.expect(1);
+ var View = Backbone.View.extend({
+ el: document.body
+ });
+
+ assert.equal(new View().el, document.body);
+ });
+
+ QUnit.test('_ensureElement with string el', function(assert) {
+ assert.expect(3);
+ var View = Backbone.View.extend({
+ el: 'body'
+ });
+ assert.strictEqual(new View().el, document.body);
+
+ View = Backbone.View.extend({
+ el: '#testElement > h1'
+ });
+ assert.strictEqual(new View().el, $('#testElement > h1').get(0));
+
+ View = Backbone.View.extend({
+ el: '#nonexistent'
+ });
+ assert.ok(!new View().el);
+ });
+
+ QUnit.test('with className and id functions', function(assert) {
+ assert.expect(2);
+ var View = Backbone.View.extend({
+ className: function() {
+ return 'className';
+ },
+ id: function() {
+ return 'id';
+ }
+ });
+
+ assert.strictEqual(new View().el.className, 'className');
+ assert.strictEqual(new View().el.id, 'id');
+ });
+
+ QUnit.test('with attributes', function(assert) {
+ assert.expect(2);
+ var View = Backbone.View.extend({
+ attributes: {
+ 'id': 'id',
+ 'class': 'class'
+ }
+ });
+
+ assert.strictEqual(new View().el.className, 'class');
+ assert.strictEqual(new View().el.id, 'id');
+ });
+
+ QUnit.test('with attributes as a function', function(assert) {
+ assert.expect(1);
+ var View = Backbone.View.extend({
+ attributes: function() {
+ return {'class': 'dynamic'};
+ }
+ });
+
+ assert.strictEqual(new View().el.className, 'dynamic');
+ });
+
+ QUnit.test('should default to className/id properties', function(assert) {
+ assert.expect(4);
+ var View = Backbone.View.extend({
+ className: 'backboneClass',
+ id: 'backboneId',
+ attributes: {
+ 'class': 'attributeClass',
+ 'id': 'attributeId'
+ }
+ });
+
+ var myView = new View;
+ assert.strictEqual(myView.el.className, 'backboneClass');
+ assert.strictEqual(myView.el.id, 'backboneId');
+ assert.strictEqual(myView.$el.attr('class'), 'backboneClass');
+ assert.strictEqual(myView.$el.attr('id'), 'backboneId');
+ });
+
+ QUnit.test('multiple views per element', function(assert) {
+ assert.expect(3);
+ var count = 0;
+ var $el = $('<p></p>');
+
+ var View = Backbone.View.extend({
+ el: $el,
+ events: {
+ click: function() {
+ count++;
+ }
+ }
+ });
+
+ var view1 = new View;
+ $el.trigger('click');
+ assert.equal(1, count);
+
+ var view2 = new View;
+ $el.trigger('click');
+ assert.equal(3, count);
+
+ view1.delegateEvents();
+ $el.trigger('click');
+ assert.equal(5, count);
+ });
+
+ QUnit.test('custom events', function(assert) {
+ assert.expect(2);
+ var View = Backbone.View.extend({
+ el: $('body'),
+ events: {
+ fake$event: function() { assert.ok(true); }
+ }
+ });
+
+ var myView = new View;
+ $('body').trigger('fake$event').trigger('fake$event');
+
+ $('body').off('fake$event');
+ $('body').trigger('fake$event');
+ });
+
+ QUnit.test('#1048 - setElement uses provided object.', function(assert) {
+ assert.expect(2);
+ var $el = $('body');
+
+ var myView = new Backbone.View({el: $el});
+ assert.ok(myView.$el === $el);
+
+ myView.setElement($el = $($el));
+ assert.ok(myView.$el === $el);
+ });
+
+ QUnit.test('#986 - Undelegate before changing element.', function(assert) {
+ assert.expect(1);
+ var button1 = $('<button></button>');
+ var button2 = $('<button></button>');
+
+ var View = Backbone.View.extend({
+ events: {
+ click: function(e) {
+ assert.ok(myView.el === e.target);
+ }
+ }
+ });
+
+ var myView = new View({el: button1});
+ myView.setElement(button2);
+
+ button1.trigger('click');
+ button2.trigger('click');
+ });
+
+ QUnit.test('#1172 - Clone attributes object', function(assert) {
+ assert.expect(2);
+ var View = Backbone.View.extend({
+ attributes: {foo: 'bar'}
+ });
+
+ var view1 = new View({id: 'foo'});
+ assert.strictEqual(view1.el.id, 'foo');
+
+ var view2 = new View();
+ assert.ok(!view2.el.id);
+ });
+
+ QUnit.test('views stopListening', function(assert) {
+ assert.expect(0);
+ var View = Backbone.View.extend({
+ initialize: function() {
+ this.listenTo(this.model, 'all x', function(){ assert.ok(false); });
+ this.listenTo(this.collection, 'all x', function(){ assert.ok(false); });
+ }
+ });
+
+ var myView = new View({
+ model: new Backbone.Model,
+ collection: new Backbone.Collection
+ });
+
+ myView.stopListening();
+ myView.model.trigger('x');
+ myView.collection.trigger('x');
+ });
+
+ QUnit.test('Provide function for el.', function(assert) {
+ assert.expect(2);
+ var View = Backbone.View.extend({
+ el: function() {
+ return '<p><a></a></p>';
+ }
+ });
+
+ var myView = new View;
+ assert.ok(myView.$el.is('p'));
+ assert.ok(myView.$el.has('a'));
+ });
+
+ QUnit.test('events passed in options', function(assert) {
+ assert.expect(1);
+ var counter = 0;
+
+ var View = Backbone.View.extend({
+ el: '#testElement',
+ increment: function() {
+ counter++;
+ }
+ });
+
+ var myView = new View({
+ events: {
+ 'click h1': 'increment'
+ }
+ });
+
+ myView.$('h1').trigger('click').trigger('click');
+ assert.equal(counter, 2);
+ });
+
+ QUnit.test('remove', function(assert) {
+ assert.expect(2);
+ var myView = new Backbone.View;
+ document.body.appendChild(view.el);
+
+ myView.delegate('click', function() { assert.ok(false); });
+ myView.listenTo(myView, 'all x', function() { assert.ok(false); });
+
+ assert.equal(myView.remove(), myView, '#remove returns the view instance');
+ myView.$el.trigger('click');
+ myView.trigger('x');
+
+ // In IE8 and below, parentNode still exists but is not document.body.
+ assert.notEqual(myView.el.parentNode, document.body);
+ });
+
+ QUnit.test('setElement', function(assert) {
+ assert.expect(3);
+ var myView = new Backbone.View({
+ events: {
+ click: function() { assert.ok(false); }
+ }
+ });
+ myView.events = {
+ click: function() { assert.ok(true); }
+ };
+ var oldEl = myView.el;
+ var $oldEl = myView.$el;
+
+ myView.setElement(document.createElement('div'));
+
+ $oldEl.click();
+ myView.$el.click();
+
+ assert.notEqual(oldEl, myView.el);
+ assert.notEqual($oldEl, myView.$el);
+ });
+
+})();
diff --git a/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/license.txt b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/license.txt
new file mode 100644
index 0000000..ba43b75
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/license.txt
@@ -0,0 +1,30 @@
+Software License Agreement (BSD License)
+
+Copyright (c) 2007, Parakey Inc.
+All rights reserved.
+
+Redistribution and use of this software in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of source code must retain the above
+ copyright notice, this list of conditions and the
+ following disclaimer.
+
+* Redistributions in binary form must reproduce the above
+ copyright notice, this list of conditions and the
+ following disclaimer in the documentation and/or other
+ materials provided with the distribution.
+
+* Neither the name of Parakey Inc. nor the names of its
+ contributors may be used to endorse or promote products
+ derived from this software without specific prior
+ written permission of Parakey Inc.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
+IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/blank.gif b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/blank.gif
new file mode 100644
index 0000000..6865c96
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/blank.gif
Binary files differ
diff --git a/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/buttonBg.png b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/buttonBg.png
new file mode 100644
index 0000000..f367b42
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/buttonBg.png
Binary files differ
diff --git a/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/buttonBgHover.png b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/buttonBgHover.png
new file mode 100644
index 0000000..cd37a0d
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/buttonBgHover.png
Binary files differ
diff --git a/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/debugger.css b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/debugger.css
new file mode 100644
index 0000000..ba55c7e
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/debugger.css
@@ -0,0 +1,331 @@
+/* See license.txt for terms of usage */
+
+.panelNode-script {
+ overflow: hidden;
+ font-family: monospace;
+}
+
+/************************************************************************************************/
+
+.scriptTooltip {
+ position: fixed;
+ z-index: 2147483647;
+ padding: 2px 3px;
+ border: 1px solid #CBE087;
+ background: LightYellow;
+ font-family: monospace;
+ color: #000000;
+}
+
+/************************************************************************************************/
+
+.sourceBox {
+ /* TODO: xxxpedro problem with sourceBox and scrolling elements */
+ /*overflow: scroll; /* see issue 1479 */
+ position: absolute;
+ left: 0;
+ top: 0;
+ width: 100%;
+ height: 100%;
+}
+
+.sourceRow {
+ white-space: nowrap;
+ -moz-user-select: text;
+}
+
+.sourceRow.hovered {
+ background-color: #EEEEEE;
+}
+
+/************************************************************************************************/
+
+.sourceLine {
+ -moz-user-select: none;
+ margin-right: 10px;
+ border-right: 1px solid #CCCCCC;
+ padding: 0px 4px 0 20px;
+ background: #EEEEEE no-repeat 2px 0px;
+ color: #888888;
+ white-space: pre;
+ font-family: monospace; /* see issue 2953 */
+}
+
+.noteInToolTip { /* below sourceLine, so it overrides it */
+ background-color: #FFD472;
+}
+
+.useA11y .sourceBox .sourceViewport:focus .sourceLine {
+ background-color: #FFFFC0;
+ color: navy;
+ border-right: 1px solid black;
+}
+
+.useA11y .sourceBox .sourceViewport:focus {
+ outline: none;
+}
+
+.a11y1emSize {
+ width: 1em;
+ height: 1em;
+ position: absolute;
+}
+
+.useA11y .panelStatusLabel:focus {
+ outline-offset: -2px !important;
+ }
+
+.sourceBox > .sourceRow > .sourceLine {
+ cursor: pointer;
+}
+
+.sourceLine:hover {
+ text-decoration: none;
+}
+
+.sourceRowText {
+ white-space: pre;
+}
+
+.sourceRow[exe_line="true"] {
+ outline: 1px solid #D9D9B6;
+ margin-right: 1px;
+ background-color: lightgoldenrodyellow;
+}
+
+.sourceRow[executable="true"] > .sourceLine {
+ content: "-";
+ color: #4AA02C; /* Spring Green */
+ font-weight: bold;
+}
+
+.sourceRow[exe_line="true"] > .sourceLine {
+ background-image: url(chrome://firebug/skin/exe.png);
+ color: #000000;
+}
+
+.sourceRow[breakpoint="true"] > .sourceLine {
+ background-image: url(chrome://firebug/skin/breakpoint.png);
+}
+
+.sourceRow[breakpoint="true"][condition="true"] > .sourceLine {
+ background-image: url(chrome://firebug/skin/breakpointCondition.png);
+}
+
+.sourceRow[breakpoint="true"][disabledBreakpoint="true"] > .sourceLine {
+ background-image: url(chrome://firebug/skin/breakpointDisabled.png);
+}
+
+.sourceRow[breakpoint="true"][exe_line="true"] > .sourceLine {
+ background-image: url(chrome://firebug/skin/breakpointExe.png);
+}
+
+.sourceRow[breakpoint="true"][exe_line="true"][disabledBreakpoint="true"] > .sourceLine {
+ background-image: url(chrome://firebug/skin/breakpointDisabledExe.png);
+}
+
+.sourceLine.editing {
+ background-image: url(chrome://firebug/skin/breakpoint.png);
+}
+
+/************************************************************************************************/
+
+.conditionEditor {
+ z-index: 2147483647;
+ position: absolute;
+ margin-top: 0;
+ left: 2px;
+ width: 90%;
+}
+
+.conditionEditorInner {
+ position: relative;
+ top: -26px;
+ height: 0;
+}
+
+.conditionCaption {
+ margin-bottom: 2px;
+ font-family: Lucida Grande, sans-serif;
+ font-weight: bold;
+ font-size: 11px;
+ color: #226679;
+}
+
+.conditionInput {
+ width: 100%;
+ border: 1px solid #0096C0;
+ font-family: monospace;
+ font-size: inherit;
+}
+
+.conditionEditorInner1 {
+ padding-left: 37px;
+ background: url(condBorders.png) repeat-y;
+}
+
+.conditionEditorInner2 {
+ padding-right: 25px;
+ background: url(condBorders.png) repeat-y 100% 0;
+}
+
+.conditionEditorTop1 {
+ background: url(condCorners.png) no-repeat 100% 0;
+ margin-left: 37px;
+ height: 35px;
+}
+
+.conditionEditorTop2 {
+ position: relative;
+ left: -37px;
+ width: 37px;
+ height: 35px;
+ background: url(condCorners.png) no-repeat;
+}
+
+.conditionEditorBottom1 {
+ background: url(condCorners.png) no-repeat 100% 100%;
+ margin-left: 37px;
+ height: 33px;
+}
+
+.conditionEditorBottom2 {
+ position: relative; left: -37px;
+ width: 37px;
+ height: 33px;
+ background: url(condCorners.png) no-repeat 0 100%;
+}
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+.upsideDown {
+ margin-top: 2px;
+}
+
+.upsideDown .conditionEditorInner {
+ top: -8px;
+}
+
+.upsideDown .conditionEditorInner1 {
+ padding-left: 33px;
+ background: url(condBordersUps.png) repeat-y;
+}
+
+.upsideDown .conditionEditorInner2 {
+ padding-right: 25px;
+ background: url(condBordersUps.png) repeat-y 100% 0;
+}
+
+.upsideDown .conditionEditorTop1 {
+ background: url(condCornersUps.png) no-repeat 100% 0;
+ margin-left: 33px;
+ height: 25px;
+}
+
+.upsideDown .conditionEditorTop2 {
+ position: relative;
+ left: -33px;
+ width: 33px;
+ height: 25px;
+ background: url(condCornersUps.png) no-repeat;
+}
+
+.upsideDown .conditionEditorBottom1 {
+ background: url(condCornersUps.png) no-repeat 100% 100%;
+ margin-left: 33px;
+ height: 43px;
+}
+
+.upsideDown .conditionEditorBottom2 {
+ position: relative;
+ left: -33px;
+ width: 33px;
+ height: 43px;
+ background: url(condCornersUps.png) no-repeat 0 100%;
+}
+
+/************************************************************************************************/
+
+.breakpointsGroupListBox {
+ overflow: hidden;
+}
+
+.breakpointBlockHead {
+ position: relative;
+ padding-top: 4px;
+}
+
+.breakpointBlockHead > .checkbox {
+ margin-right: 4px;
+}
+
+.breakpointBlockHead > .objectLink-sourceLink {
+ top: 4px;
+ right: 20px;
+ background-color: #FFFFFF; /* issue 3308 */
+}
+
+.breakpointBlockHead > .closeButton {
+ position: absolute;
+ top: 2px;
+ right: 2px;
+}
+
+.breakpointCheckbox {
+ margin-top: 0;
+ vertical-align: top;
+}
+
+.breakpointName {
+ margin-left: 4px;
+ font-weight: bold;
+}
+
+.breakpointRow[aria-checked="false"] > .breakpointBlockHead > *,
+.breakpointRow[aria-checked="false"] > .breakpointCode {
+ opacity: 0.5;
+}
+
+.breakpointRow[aria-checked="false"] .breakpointCheckbox,
+.breakpointRow[aria-checked="false"] .objectLink-sourceLink,
+.breakpointRow[aria-checked="false"] .closeButton,
+.breakpointRow[aria-checked="false"] .breakpointMutationType {
+ opacity: 1.0 !important;
+}
+
+.breakpointCode {
+ overflow: hidden;
+ white-space: nowrap;
+ padding-left: 24px;
+ padding-bottom: 2px;
+ border-bottom: 1px solid #D7D7D7;
+ font-family: monospace;
+ color: DarkGreen;
+}
+
+.breakpointCondition {
+ white-space: nowrap;
+ padding-left: 24px;
+ padding-bottom: 2px;
+ border-bottom: 1px solid #D7D7D7;
+ font-family: monospace;
+ color: Gray;
+}
+
+.breakpointBlock-breakpoints > .groupHeader {
+ display: none;
+}
+
+.breakpointBlock-monitors > .breakpointCode {
+ padding: 0;
+}
+
+.breakpointBlock-errorBreakpoints .breakpointCheckbox,
+.breakpointBlock-monitors .breakpointCheckbox {
+ display: none;
+}
+
+.breakpointHeader {
+ margin: 0 !important;
+ border-top: none !important;
+}
diff --git a/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/detach.png b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/detach.png
new file mode 100644
index 0000000..0ddb9a1
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/detach.png
Binary files differ
diff --git a/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/detachHover.png b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/detachHover.png
new file mode 100644
index 0000000..e419272
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/detachHover.png
Binary files differ
diff --git a/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/disable.gif b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/disable.gif
new file mode 100644
index 0000000..dd9eb0e
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/disable.gif
Binary files differ
diff --git a/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/disable.png b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/disable.png
new file mode 100644
index 0000000..c28bcdf
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/disable.png
Binary files differ
diff --git a/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/disableHover.gif b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/disableHover.gif
new file mode 100644
index 0000000..70565a8
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/disableHover.gif
Binary files differ
diff --git a/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/disableHover.png b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/disableHover.png
new file mode 100644
index 0000000..26fe375
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/disableHover.png
Binary files differ
diff --git a/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/down.png b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/down.png
new file mode 100644
index 0000000..acbbd30
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/down.png
Binary files differ
diff --git a/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/downActive.png b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/downActive.png
new file mode 100644
index 0000000..f4312b2
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/downActive.png
Binary files differ
diff --git a/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/downHover.png b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/downHover.png
new file mode 100644
index 0000000..8144e63
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/downHover.png
Binary files differ
diff --git a/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/errorIcon-sm.png b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/errorIcon-sm.png
new file mode 100644
index 0000000..0c377e3
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/errorIcon-sm.png
Binary files differ
diff --git a/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/errorIcon.gif b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/errorIcon.gif
new file mode 100644
index 0000000..8ee8116
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/errorIcon.gif
Binary files differ
diff --git a/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/errorIcon.png b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/errorIcon.png
new file mode 100644
index 0000000..2d75261
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/errorIcon.png
Binary files differ
diff --git a/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/firebug-1.3a2.css b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/firebug-1.3a2.css
new file mode 100644
index 0000000..42f9faf
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/firebug-1.3a2.css
@@ -0,0 +1,817 @@
+.fbBtnPressed {
+ background: #ECEBE3;
+ padding: 3px 6px 2px 7px !important;
+ margin: 1px 0 0 1px;
+ _margin: 1px -1px 0 1px;
+ border: 1px solid #ACA899 !important;
+ border-color: #ACA899 #ECEBE3 #ECEBE3 #ACA899 !important;
+}
+
+.fbToolbarButtons {
+ display: none;
+}
+
+#fbStatusBarBox {
+ display: none;
+}
+
+/************************************************************************************************
+ Error Popup
+*************************************************************************************************/
+#fbErrorPopup {
+ position: absolute;
+ right: 0;
+ bottom: 0;
+ height: 19px;
+ width: 75px;
+ background: url(sprite.png) #f1f2ee 0 0;
+ z-index: 999;
+}
+
+#fbErrorPopupContent {
+ position: absolute;
+ right: 0;
+ top: 1px;
+ height: 18px;
+ width: 75px;
+ _width: 74px;
+ border-left: 1px solid #aca899;
+}
+
+#fbErrorIndicator {
+ position: absolute;
+ top: 2px;
+ right: 5px;
+}
+
+
+
+
+
+
+
+
+
+
+.fbBtnInspectActive {
+ background: #aaa;
+ color: #fff !important;
+}
+
+/************************************************************************************************
+ General
+*************************************************************************************************/
+html, body {
+ margin: 0;
+ padding: 0;
+ overflow: hidden;
+}
+
+body {
+ font-family: Lucida Grande, Tahoma, sans-serif;
+ font-size: 11px;
+ background: #fff;
+}
+
+.clear {
+ clear: both;
+}
+
+/************************************************************************************************
+ Mini Chrome
+*************************************************************************************************/
+#fbMiniChrome {
+ display: none;
+ right: 0;
+ height: 27px;
+ background: url(sprite.png) #f1f2ee 0 0;
+ margin-left: 1px;
+}
+
+#fbMiniContent {
+ display: block;
+ position: relative;
+ left: -1px;
+ right: 0;
+ top: 1px;
+ height: 25px;
+ border-left: 1px solid #aca899;
+}
+
+#fbToolbarSearch {
+ float: right;
+ border: 1px solid #ccc;
+ margin: 0 5px 0 0;
+ background: #fff url(search.png) no-repeat 4px 2px;
+ padding-left: 20px;
+ font-size: 11px;
+}
+
+#fbToolbarErrors {
+ float: right;
+ margin: 1px 4px 0 0;
+ font-size: 11px;
+}
+
+#fbLeftToolbarErrors {
+ float: left;
+ margin: 7px 0px 0 5px;
+ font-size: 11px;
+}
+
+.fbErrors {
+ padding-left: 20px;
+ height: 14px;
+ background: url(errorIcon.png) no-repeat;
+ color: #f00;
+ font-weight: bold;
+}
+
+#fbMiniErrors {
+ display: inline;
+ display: none;
+ float: right;
+ margin: 5px 2px 0 5px;
+}
+
+#fbMiniIcon {
+ float: right;
+ margin: 3px 4px 0;
+ height: 20px;
+ width: 20px;
+ float: right;
+ background: url(sprite.png) 0 -135px;
+ cursor: pointer;
+}
+
+
+/************************************************************************************************
+ Master Layout
+*************************************************************************************************/
+#fbChrome {
+ position: fixed;
+ overflow: hidden;
+ height: 100%;
+ width: 100%;
+ border-collapse: collapse;
+ background: #fff;
+}
+
+#fbTop {
+ height: 49px;
+}
+
+#fbToolbar {
+ position: absolute;
+ z-index: 5;
+ width: 100%;
+ top: 0;
+ background: url(sprite.png) #f1f2ee 0 0;
+ height: 27px;
+ font-size: 11px;
+ overflow: hidden;
+}
+
+#fbPanelBarBox {
+ top: 27px;
+ position: absolute;
+ z-index: 8;
+ width: 100%;
+ background: url(sprite.png) #dbd9c9 0 -27px;
+ height: 22px;
+}
+
+#fbContent {
+ height: 100%;
+ vertical-align: top;
+}
+
+#fbBottom {
+ height: 18px;
+ background: #fff;
+}
+
+/************************************************************************************************
+ Sub-Layout
+*************************************************************************************************/
+
+/* fbToolbar
+*************************************************************************************************/
+#fbToolbarIcon {
+ float: left;
+ padding: 4px 5px 0;
+}
+
+#fbToolbarIcon a {
+ display: block;
+ height: 20px;
+ width: 20px;
+ background: url(sprite.png) 0 -135px;
+ text-decoration: none;
+ cursor: default;
+}
+
+#fbToolbarButtons {
+ float: left;
+ padding: 4px 2px 0 5px;
+}
+
+#fbToolbarButtons a {
+ text-decoration: none;
+ display: block;
+ float: left;
+ color: #000;
+ padding: 4px 8px 4px;
+ cursor: default;
+}
+
+#fbToolbarButtons a:hover {
+ color: #333;
+ padding: 3px 7px 3px;
+ border: 1px solid #fff;
+ border-bottom: 1px solid #bbb;
+ border-right: 1px solid #bbb;
+}
+
+#fbStatusBarBox {
+ position: relative;
+ top: 5px;
+ line-height: 19px;
+ cursor: default;
+}
+
+.fbToolbarSeparator{
+ overflow: hidden;
+ border: 1px solid;
+ border-color: transparent #fff transparent #777;
+ _border-color: #eee #fff #eee #777;
+ height: 7px;
+ margin: 10px 6px 0 0;
+ float: left;
+}
+
+.fbStatusBar span {
+ color: #808080;
+ padding: 0 4px 0 0;
+}
+
+.fbStatusBar span a {
+ text-decoration: none;
+ color: black;
+}
+
+.fbStatusBar span a:hover {
+ color: blue;
+ cursor: pointer;
+}
+
+
+#fbWindowButtons {
+ position: absolute;
+ white-space: nowrap;
+ right: 0;
+ top: 0;
+ height: 17px;
+ _width: 50px;
+ padding: 5px 0 5px 5px;
+ z-index: 6;
+ background: url(sprite.png) #f1f2ee 0 0;
+}
+
+/* fbPanelBarBox
+*************************************************************************************************/
+
+#fbPanelBar1 {
+ width: 255px; /* fixed width to avoid tabs breaking line */
+ z-index: 8;
+ left: 0;
+ white-space: nowrap;
+ background: url(sprite.png) #dbd9c9 0 -27px;
+ position: absolute;
+ left: 4px;
+}
+
+#fbPanelBar2Box {
+ background: url(sprite.png) #dbd9c9 0 -27px;
+ position: absolute;
+ height: 22px;
+ width: 300px; /* fixed width to avoid tabs breaking line */
+ z-index: 9;
+ right: 0;
+}
+
+#fbPanelBar2 {
+ position: absolute;
+ width: 290px; /* fixed width to avoid tabs breaking line */
+ height: 22px;
+ padding-left: 10px;
+}
+
+/* body
+*************************************************************************************************/
+.fbPanel {
+ display: none;
+}
+
+#fbPanelBox1, #fbPanelBox2 {
+ max-height: inherit;
+ height: 100%;
+ font-size: 11px;
+}
+
+#fbPanelBox2 {
+ background: #fff;
+}
+
+#fbPanelBox2 {
+ width: 300px;
+ background: #fff;
+}
+
+#fbPanel2 {
+ padding-left: 6px;
+ background: #fff;
+}
+
+.hide {
+ overflow: hidden !important;
+ position: fixed !important;
+ display: none !important;
+ visibility: hidden !important;
+}
+
+/* fbBottom
+*************************************************************************************************/
+
+#fbCommand {
+ height: 18px;
+}
+
+#fbCommandBox {
+ position: absolute;
+ width: 100%;
+ height: 18px;
+ bottom: 0;
+ overflow: hidden;
+ z-index: 9;
+ background: #fff;
+ border: 0;
+ border-top: 1px solid #ccc;
+}
+
+#fbCommandIcon {
+ position: absolute;
+ color: #00f;
+ top: 2px;
+ left: 7px;
+ display: inline;
+ font: 11px Monaco, monospace;
+ z-index: 10;
+}
+
+#fbCommandLine {
+ position: absolute;
+ width: 100%;
+ top: 0;
+ left: 0;
+ border: 0;
+ margin: 0;
+ padding: 2px 0 2px 32px;
+ font: 11px Monaco, monospace;
+ z-index: 9;
+}
+
+div.fbFitHeight {
+ overflow: auto;
+ _position: absolute;
+}
+
+
+/************************************************************************************************
+ Layout Controls
+*************************************************************************************************/
+
+/* fbToolbar buttons
+*************************************************************************************************/
+#fbWindowButtons a {
+ font-size: 1px;
+ width: 16px;
+ height: 16px;
+ display: block;
+ float: right;
+ margin-right: 4px;
+ text-decoration: none;
+ cursor: default;
+}
+
+#fbWindow_btClose {
+ background: url(sprite.png) 0 -119px;
+}
+
+#fbWindow_btClose:hover {
+ background: url(sprite.png) -16px -119px;
+}
+
+#fbWindow_btDetach {
+ background: url(sprite.png) -32px -119px;
+}
+
+#fbWindow_btDetach:hover {
+ background: url(sprite.png) -48px -119px;
+}
+
+/* fbPanelBarBox tabs
+*************************************************************************************************/
+.fbTab {
+ text-decoration: none;
+ display: none;
+ float: left;
+ width: auto;
+ float: left;
+ cursor: default;
+ font-family: Lucida Grande, Tahoma, sans-serif;
+ font-size: 11px;
+ font-weight: bold;
+ height: 22px;
+ color: #565656;
+}
+
+.fbPanelBar span {
+ display: block;
+ float: left;
+}
+
+.fbPanelBar .fbTabL,.fbPanelBar .fbTabR {
+ height: 22px;
+ width: 8px;
+}
+
+.fbPanelBar .fbTabText {
+ padding: 4px 1px 0;
+}
+
+a.fbTab:hover {
+ background: url(sprite.png) 0 -73px;
+}
+
+a.fbTab:hover .fbTabL {
+ background: url(sprite.png) -16px -96px;
+}
+
+a.fbTab:hover .fbTabR {
+ background: url(sprite.png) -24px -96px;
+}
+
+.fbSelectedTab {
+ background: url(sprite.png) #f1f2ee 0 -50px !important;
+ color: #000;
+}
+
+.fbSelectedTab .fbTabL {
+ background: url(sprite.png) 0 -96px !important;
+}
+
+.fbSelectedTab .fbTabR {
+ background: url(sprite.png) -8px -96px !important;
+}
+
+/* splitters
+*************************************************************************************************/
+#fbHSplitter {
+ position: absolute;
+ left: 0;
+ top: 0;
+ width: 100%;
+ height: 5px;
+ overflow: hidden;
+ cursor: n-resize !important;
+ background: url(pixel_transparent.gif);
+ z-index: 9;
+}
+
+#fbHSplitter.fbOnMovingHSplitter {
+ height: 100%;
+ z-index: 100;
+}
+
+.fbVSplitter {
+ background: #ece9d8;
+ color: #000;
+ border: 1px solid #716f64;
+ border-width: 0 1px;
+ border-left-color: #aca899;
+ width: 4px;
+ cursor: e-resize;
+ overflow: hidden;
+ right: 294px;
+ text-decoration: none;
+ z-index: 9;
+ position: absolute;
+ height: 100%;
+ top: 27px;
+ _width: 6px;
+}
+
+/************************************************************************************************/
+div.lineNo {
+ font: 11px Monaco, monospace;
+ float: left;
+ display: inline;
+ position: relative;
+ margin: 0;
+ padding: 0 5px 0 20px;
+ background: #eee;
+ color: #888;
+ border-right: 1px solid #ccc;
+ text-align: right;
+}
+
+pre.nodeCode {
+ font: 11px Monaco, monospace;
+ margin: 0;
+ padding-left: 10px;
+ overflow: hidden;
+ /*
+ _width: 100%;
+ /**/
+}
+
+/************************************************************************************************/
+.nodeControl {
+ margin-top: 3px;
+ margin-left: -14px;
+ float: left;
+ width: 9px;
+ height: 9px;
+ overflow: hidden;
+ cursor: default;
+ background: url(tree_open.gif);
+ _float: none;
+ _display: inline;
+ _position: absolute;
+}
+
+div.nodeMaximized {
+ background: url(tree_close.gif);
+}
+
+div.objectBox-element {
+ padding: 1px 3px;
+}
+.objectBox-selector{
+ cursor: default;
+}
+
+.selectedElement{
+ background: highlight;
+ /* background: url(roundCorner.svg); Opera */
+ color: #fff !important;
+}
+.selectedElement span{
+ color: #fff !important;
+}
+
+/* Webkit CSS Hack - bug in "highlight" named color */
+@media screen and (-webkit-min-device-pixel-ratio:0) {
+ .selectedElement{
+ background: #316AC5;
+ color: #fff !important;
+ }
+}
+
+/************************************************************************************************/
+/************************************************************************************************/
+.logRow * {
+ font-size: 11px;
+}
+
+.logRow {
+ position: relative;
+ border-bottom: 1px solid #D7D7D7;
+ padding: 2px 4px 1px 6px;
+ background-color: #FFFFFF;
+}
+
+.logRow-command {
+ font-family: Monaco, monospace;
+ color: blue;
+}
+
+.objectBox-string,
+.objectBox-text,
+.objectBox-number,
+.objectBox-function,
+.objectLink-element,
+.objectLink-textNode,
+.objectLink-function,
+.objectBox-stackTrace,
+.objectLink-profile {
+ font-family: Monaco, monospace;
+}
+
+.objectBox-null {
+ padding: 0 2px;
+ border: 1px solid #666666;
+ background-color: #888888;
+ color: #FFFFFF;
+}
+
+.objectBox-string {
+ color: red;
+ white-space: pre;
+}
+
+.objectBox-number {
+ color: #000088;
+}
+
+.objectBox-function {
+ color: DarkGreen;
+}
+
+.objectBox-object {
+ color: DarkGreen;
+ font-weight: bold;
+ font-family: Lucida Grande, sans-serif;
+}
+
+.objectBox-array {
+ color: #000;
+}
+
+/************************************************************************************************/
+.logRow-info,.logRow-error,.logRow-warning {
+ background: #fff no-repeat 2px 2px;
+ padding-left: 20px;
+ padding-bottom: 3px;
+}
+
+.logRow-info {
+ background-image: url(infoIcon.png);
+}
+
+.logRow-warning {
+ background-color: cyan;
+ background-image: url(warningIcon.png);
+}
+
+.logRow-error {
+ background-color: LightYellow;
+ background-image: url(errorIcon.png);
+ color: #f00;
+}
+
+.errorMessage {
+ vertical-align: top;
+ color: #f00;
+}
+
+.objectBox-sourceLink {
+ position: absolute;
+ right: 4px;
+ top: 2px;
+ padding-left: 8px;
+ font-family: Lucida Grande, sans-serif;
+ font-weight: bold;
+ color: #0000FF;
+}
+
+/************************************************************************************************/
+.logRow-group {
+ background: #EEEEEE;
+ border-bottom: none;
+}
+
+.logGroup {
+ background: #EEEEEE;
+}
+
+.logGroupBox {
+ margin-left: 24px;
+ border-top: 1px solid #D7D7D7;
+ border-left: 1px solid #D7D7D7;
+}
+
+/************************************************************************************************/
+.selectorTag,.selectorId,.selectorClass {
+ font-family: Monaco, monospace;
+ font-weight: normal;
+}
+
+.selectorTag {
+ color: #0000FF;
+}
+
+.selectorId {
+ color: DarkBlue;
+}
+
+.selectorClass {
+ color: red;
+}
+
+/************************************************************************************************/
+.objectBox-element {
+ font-family: Monaco, monospace;
+ color: #000088;
+}
+
+.nodeChildren {
+ padding-left: 26px;
+}
+
+.nodeTag {
+ color: blue;
+ cursor: pointer;
+}
+
+.nodeValue {
+ color: #FF0000;
+ font-weight: normal;
+}
+
+.nodeText,.nodeComment {
+ margin: 0 2px;
+ vertical-align: top;
+}
+
+.nodeText {
+ color: #333333;
+ font-family: Monaco, monospace;
+}
+
+.nodeComment {
+ color: DarkGreen;
+}
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+.nodeHidden, .nodeHidden * {
+ color: #888888;
+}
+
+.nodeHidden .nodeTag {
+ color: #5F82D9;
+}
+
+.nodeHidden .nodeValue {
+ color: #D86060;
+}
+
+.selectedElement .nodeHidden, .selectedElement .nodeHidden * {
+ color: SkyBlue !important;
+}
+
+
+/************************************************************************************************/
+.log-object {
+ /*
+ _position: relative;
+ _height: 100%;
+ /**/
+}
+
+.property {
+ position: relative;
+ clear: both;
+ height: 15px;
+}
+
+.propertyNameCell {
+ vertical-align: top;
+ float: left;
+ width: 28%;
+ position: absolute;
+ left: 0;
+ z-index: 0;
+}
+
+.propertyValueCell {
+ float: right;
+ width: 68%;
+ background: #fff;
+ position: absolute;
+ padding-left: 5px;
+ display: table-cell;
+ right: 0;
+ z-index: 1;
+ /*
+ _position: relative;
+ /**/
+}
+
+.propertyName {
+ font-weight: bold;
+}
+
+.FirebugPopup {
+ height: 100% !important;
+}
+
+.FirebugPopup #fbWindowButtons {
+ display: none !important;
+}
+
+.FirebugPopup #fbHSplitter {
+ display: none !important;
+}
diff --git a/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/firebug.IE6.css b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/firebug.IE6.css
new file mode 100644
index 0000000..13a41d2
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/firebug.IE6.css
@@ -0,0 +1,20 @@
+/************************************************************************************************/
+#fbToolbarSearch {
+ background-image: url(search.gif) !important;
+}
+/************************************************************************************************/
+.fbErrors {
+ background-image: url(errorIcon.gif) !important;
+}
+/************************************************************************************************/
+.logRow-info {
+ background-image: url(infoIcon.gif) !important;
+}
+
+.logRow-warning {
+ background-image: url(warningIcon.gif) !important;
+}
+
+.logRow-error {
+ background-image: url(errorIcon.gif) !important;
+}
diff --git a/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/firebug.css b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/firebug.css
new file mode 100644
index 0000000..a1465ec
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/firebug.css
@@ -0,0 +1,3147 @@
+/*************************************************************************************************/
+/*************************************************************************************************/
+/*************************************************************************************************/
+/*************************************************************************************************/
+/* Loose */
+/*************************************************************************************************/
+/*************************************************************************************************/
+/*************************************************************************************************/
+/*
+.netInfoResponseHeadersTitle, netInfoResponseHeadersBody {
+ display: none;
+}
+/**/
+
+.obscured {
+ left: -999999px !important;
+}
+
+/* IE6 need a separated rule, otherwise it will not recognize it */
+.collapsed {
+ display: none;
+}
+
+[collapsed="true"] {
+ display: none;
+}
+
+#fbCSS {
+ padding: 0 !important;
+}
+
+.cssPropDisable {
+ float: left;
+ display: block;
+ width: 2em;
+ cursor: default;
+}
+
+/*************************************************************************************************/
+/*************************************************************************************************/
+/*************************************************************************************************/
+/*************************************************************************************************/
+/* panelBase */
+/*************************************************************************************************/
+/*************************************************************************************************/
+/*************************************************************************************************/
+
+/************************************************************************************************/
+
+.infoTip {
+ z-index: 2147483647;
+ position: fixed;
+ padding: 2px 3px;
+ border: 1px solid #CBE087;
+ background: LightYellow;
+ font-family: Monaco, monospace;
+ color: #000000;
+ display: none;
+ white-space: nowrap;
+ pointer-events: none;
+}
+
+.infoTip[active="true"] {
+ display: block;
+}
+
+.infoTipLoading {
+ width: 16px;
+ height: 16px;
+ background: url(chrome://firebug/skin/loading_16.gif) no-repeat;
+}
+
+.infoTipImageBox {
+ font-size: 11px;
+ min-width: 100px;
+ text-align: center;
+}
+
+.infoTipCaption {
+ font-size: 11px;
+ font: Monaco, monospace;
+}
+
+.infoTipLoading > .infoTipImage,
+.infoTipLoading > .infoTipCaption {
+ display: none;
+}
+
+/************************************************************************************************/
+
+h1.groupHeader {
+ padding: 2px 4px;
+ margin: 0 0 4px 0;
+ border-top: 1px solid #CCCCCC;
+ border-bottom: 1px solid #CCCCCC;
+ background: #eee url(group.gif) repeat-x;
+ font-size: 11px;
+ font-weight: bold;
+ _position: relative;
+}
+
+/************************************************************************************************/
+
+.inlineEditor,
+.fixedWidthEditor {
+ z-index: 2147483647;
+ position: absolute;
+ display: none;
+}
+
+.inlineEditor {
+ margin-left: -6px;
+ margin-top: -3px;
+ /*
+ _margin-left: -7px;
+ _margin-top: -5px;
+ /**/
+}
+
+.textEditorInner,
+.fixedWidthEditor {
+ margin: 0 0 0 0 !important;
+ padding: 0;
+ border: none !important;
+ font: inherit;
+ text-decoration: inherit;
+ background-color: #FFFFFF;
+}
+
+.fixedWidthEditor {
+ border-top: 1px solid #888888 !important;
+ border-bottom: 1px solid #888888 !important;
+}
+
+.textEditorInner {
+ position: relative;
+ top: -7px;
+ left: -5px;
+
+ outline: none;
+ resize: none;
+
+ /*
+ _border: 1px solid #999 !important;
+ _padding: 1px !important;
+ _filter:progid:DXImageTransform.Microsoft.dropshadow(OffX=2, OffY=2, Color="#55404040");
+ /**/
+}
+
+.textEditorInner1 {
+ padding-left: 11px;
+ background: url(textEditorBorders.png) repeat-y;
+ _background: url(textEditorBorders.gif) repeat-y;
+ _overflow: hidden;
+}
+
+.textEditorInner2 {
+ position: relative;
+ padding-right: 2px;
+ background: url(textEditorBorders.png) repeat-y 100% 0;
+ _background: url(textEditorBorders.gif) repeat-y 100% 0;
+ _position: fixed;
+}
+
+.textEditorTop1 {
+ background: url(textEditorCorners.png) no-repeat 100% 0;
+ margin-left: 11px;
+ height: 10px;
+ _background: url(textEditorCorners.gif) no-repeat 100% 0;
+ _overflow: hidden;
+}
+
+.textEditorTop2 {
+ position: relative;
+ left: -11px;
+ width: 11px;
+ height: 10px;
+ background: url(textEditorCorners.png) no-repeat;
+ _background: url(textEditorCorners.gif) no-repeat;
+}
+
+.textEditorBottom1 {
+ position: relative;
+ background: url(textEditorCorners.png) no-repeat 100% 100%;
+ margin-left: 11px;
+ height: 12px;
+ _background: url(textEditorCorners.gif) no-repeat 100% 100%;
+}
+
+.textEditorBottom2 {
+ position: relative;
+ left: -11px;
+ width: 11px;
+ height: 12px;
+ background: url(textEditorCorners.png) no-repeat 0 100%;
+ _background: url(textEditorCorners.gif) no-repeat 0 100%;
+}
+
+
+/*************************************************************************************************/
+/*************************************************************************************************/
+/*************************************************************************************************/
+/*************************************************************************************************/
+/* CSS */
+/*************************************************************************************************/
+/*************************************************************************************************/
+/*************************************************************************************************/
+
+/* See license.txt for terms of usage */
+
+.panelNode-css {
+ overflow-x: hidden;
+}
+
+.cssSheet > .insertBefore {
+ height: 1.5em;
+}
+
+.cssRule {
+ position: relative;
+ margin: 0;
+ padding: 1em 0 0 6px;
+ font-family: Monaco, monospace;
+ color: #000000;
+}
+
+.cssRule:first-child {
+ padding-top: 6px;
+}
+
+.cssElementRuleContainer {
+ position: relative;
+}
+
+.cssHead {
+ padding-right: 150px;
+}
+
+.cssProp {
+ /*padding-left: 2em;*/
+}
+
+.cssPropName {
+ color: DarkGreen;
+}
+
+.cssPropValue {
+ margin-left: 8px;
+ color: DarkBlue;
+}
+
+.cssOverridden span {
+ text-decoration: line-through;
+}
+
+.cssInheritedRule {
+}
+
+.cssInheritLabel {
+ margin-right: 0.5em;
+ font-weight: bold;
+}
+
+.cssRule .objectLink-sourceLink {
+ top: 0;
+}
+
+.cssProp.editGroup:hover {
+ background: url(disable.png) no-repeat 2px 1px;
+ _background: url(disable.gif) no-repeat 2px 1px;
+}
+
+.cssProp.editGroup.editing {
+ background: none;
+}
+
+.cssProp.disabledStyle {
+ background: url(disableHover.png) no-repeat 2px 1px;
+ _background: url(disableHover.gif) no-repeat 2px 1px;
+ opacity: 1;
+ color: #CCCCCC;
+}
+
+.disabledStyle .cssPropName,
+.disabledStyle .cssPropValue {
+ color: #CCCCCC;
+}
+
+.cssPropValue.editing + .cssSemi,
+.inlineExpander + .cssSemi {
+ display: none;
+}
+
+.cssPropValue.editing {
+ white-space: nowrap;
+}
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+.stylePropName {
+ font-weight: bold;
+ padding: 0 4px 4px 4px;
+ width: 50%;
+}
+
+.stylePropValue {
+ width: 50%;
+}
+/*
+.useA11y .a11yCSSView .focusRow:focus {
+ outline: none;
+ background-color: transparent
+ }
+
+ .useA11y .a11yCSSView .focusRow:focus .cssSelector,
+ .useA11y .a11yCSSView .focusRow:focus .cssPropName,
+ .useA11y .a11yCSSView .focusRow:focus .cssPropValue,
+ .useA11y .a11yCSSView .computedStyleRow:focus,
+ .useA11y .a11yCSSView .groupHeader:focus {
+ outline: 2px solid #FF9933;
+ outline-offset: -2px;
+ background-color: #FFFFD6;
+ }
+
+ .useA11y .a11yCSSView .groupHeader:focus {
+ outline-offset: -2px;
+ }
+/**/
+
+
+/*************************************************************************************************/
+/*************************************************************************************************/
+/*************************************************************************************************/
+/*************************************************************************************************/
+/* Net */
+/*************************************************************************************************/
+/*************************************************************************************************/
+/*************************************************************************************************/
+
+/* See license.txt for terms of usage */
+
+.panelNode-net {
+ overflow-x: hidden;
+}
+
+.netTable {
+ width: 100%;
+}
+
+/************************************************************************************************/
+
+.hideCategory-undefined .category-undefined,
+.hideCategory-html .category-html,
+.hideCategory-css .category-css,
+.hideCategory-js .category-js,
+.hideCategory-image .category-image,
+.hideCategory-xhr .category-xhr,
+.hideCategory-flash .category-flash,
+.hideCategory-txt .category-txt,
+.hideCategory-bin .category-bin {
+ display: none;
+}
+
+/************************************************************************************************/
+
+.netHeadRow {
+ background: url(chrome://firebug/skin/group.gif) repeat-x #FFFFFF;
+}
+
+.netHeadCol {
+ border-bottom: 1px solid #CCCCCC;
+ padding: 2px 4px 2px 18px;
+ font-weight: bold;
+}
+
+.netHeadLabel {
+ white-space: nowrap;
+ overflow: hidden;
+}
+
+/************************************************************************************************/
+/* Header for Net panel table */
+
+.netHeaderRow {
+ height: 16px;
+}
+
+.netHeaderCell {
+ cursor: pointer;
+ -moz-user-select: none;
+ border-bottom: 1px solid #9C9C9C;
+ padding: 0 !important;
+ font-weight: bold;
+ background: #BBBBBB url(chrome://firebug/skin/tableHeader.gif) repeat-x;
+ white-space: nowrap;
+}
+
+.netHeaderRow > .netHeaderCell:first-child > .netHeaderCellBox {
+ padding: 2px 14px 2px 18px;
+}
+
+.netHeaderCellBox {
+ padding: 2px 14px 2px 10px;
+ border-left: 1px solid #D9D9D9;
+ border-right: 1px solid #9C9C9C;
+}
+
+.netHeaderCell:hover:active {
+ background: #959595 url(chrome://firebug/skin/tableHeaderActive.gif) repeat-x;
+}
+
+.netHeaderSorted {
+ background: #7D93B2 url(chrome://firebug/skin/tableHeaderSorted.gif) repeat-x;
+}
+
+.netHeaderSorted > .netHeaderCellBox {
+ border-right-color: #6B7C93;
+ background: url(chrome://firebug/skin/arrowDown.png) no-repeat right;
+}
+
+.netHeaderSorted.sortedAscending > .netHeaderCellBox {
+ background-image: url(chrome://firebug/skin/arrowUp.png);
+}
+
+.netHeaderSorted:hover:active {
+ background: #536B90 url(chrome://firebug/skin/tableHeaderSortedActive.gif) repeat-x;
+}
+
+/************************************************************************************************/
+/* Breakpoints */
+
+.panelNode-net .netRowHeader {
+ display: block;
+}
+
+.netRowHeader {
+ cursor: pointer;
+ display: none;
+ height: 15px;
+ margin-right: 0 !important;
+}
+
+/* Display brekpoint disc */
+.netRow .netRowHeader {
+ background-position: 5px 1px;
+}
+
+.netRow[breakpoint="true"] .netRowHeader {
+ background-image: url(chrome://firebug/skin/breakpoint.png);
+}
+
+.netRow[breakpoint="true"][disabledBreakpoint="true"] .netRowHeader {
+ background-image: url(chrome://firebug/skin/breakpointDisabled.png);
+}
+
+.netRow.category-xhr:hover .netRowHeader {
+ background-color: #F6F6F6;
+}
+
+#netBreakpointBar {
+ max-width: 38px;
+}
+
+#netHrefCol > .netHeaderCellBox {
+ border-left: 0px;
+}
+
+.netRow .netRowHeader {
+ width: 3px;
+}
+
+.netInfoRow .netRowHeader {
+ display: table-cell;
+}
+
+/************************************************************************************************/
+/* Column visibility */
+
+.netTable[hiddenCols~=netHrefCol] TD[id="netHrefCol"],
+.netTable[hiddenCols~=netHrefCol] TD.netHrefCol,
+.netTable[hiddenCols~=netStatusCol] TD[id="netStatusCol"],
+.netTable[hiddenCols~=netStatusCol] TD.netStatusCol,
+.netTable[hiddenCols~=netDomainCol] TD[id="netDomainCol"],
+.netTable[hiddenCols~=netDomainCol] TD.netDomainCol,
+.netTable[hiddenCols~=netSizeCol] TD[id="netSizeCol"],
+.netTable[hiddenCols~=netSizeCol] TD.netSizeCol,
+.netTable[hiddenCols~=netTimeCol] TD[id="netTimeCol"],
+.netTable[hiddenCols~=netTimeCol] TD.netTimeCol {
+ display: none;
+}
+
+/************************************************************************************************/
+
+.netRow {
+ background: LightYellow;
+}
+
+.netRow.loaded {
+ background: #FFFFFF;
+}
+
+.netRow.loaded:hover {
+ background: #EFEFEF;
+}
+
+.netCol {
+ padding: 0;
+ vertical-align: top;
+ border-bottom: 1px solid #EFEFEF;
+ white-space: nowrap;
+ height: 17px;
+}
+
+.netLabel {
+ width: 100%;
+}
+
+.netStatusCol {
+ padding-left: 10px;
+ color: rgb(128, 128, 128);
+}
+
+.responseError > .netStatusCol {
+ color: red;
+}
+
+.netDomainCol {
+ padding-left: 5px;
+}
+
+.netSizeCol {
+ text-align: right;
+ padding-right: 10px;
+}
+
+.netHrefLabel {
+ -moz-box-sizing: padding-box;
+ overflow: hidden;
+ z-index: 10;
+ position: absolute;
+ padding-left: 18px;
+ padding-top: 1px;
+ max-width: 15%;
+ font-weight: bold;
+}
+
+.netFullHrefLabel {
+ display: none;
+ -moz-user-select: none;
+ padding-right: 10px;
+ padding-bottom: 3px;
+ max-width: 100%;
+ background: #FFFFFF;
+ z-index: 200;
+}
+
+.netHrefCol:hover > .netFullHrefLabel {
+ display: block;
+}
+
+.netRow.loaded:hover .netCol > .netFullHrefLabel {
+ background-color: #EFEFEF;
+}
+
+.useA11y .a11yShowFullLabel {
+ display: block;
+ background-image: none !important;
+ border: 1px solid #CBE087;
+ background-color: LightYellow;
+ font-family: Monaco, monospace;
+ color: #000000;
+ font-size: 10px;
+ z-index: 2147483647;
+}
+
+.netSizeLabel {
+ padding-left: 6px;
+}
+
+.netStatusLabel,
+.netDomainLabel,
+.netSizeLabel,
+.netBar {
+ padding: 1px 0 2px 0 !important;
+}
+
+.responseError {
+ color: red;
+}
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+.hasHeaders .netHrefLabel:hover {
+ cursor: pointer;
+ color: blue;
+ text-decoration: underline;
+}
+
+/************************************************************************************************/
+
+.netLoadingIcon {
+ position: absolute;
+ border: 0;
+ margin-left: 14px;
+ width: 16px;
+ height: 16px;
+ background: transparent no-repeat 0 0;
+ background-image: url(chrome://firebug/skin/loading_16.gif);
+ display:inline-block;
+}
+
+.loaded .netLoadingIcon {
+ display: none;
+}
+
+/************************************************************************************************/
+
+.netBar, .netSummaryBar {
+ position: relative;
+ border-right: 50px solid transparent;
+}
+
+.netResolvingBar {
+ position: absolute;
+ left: 0;
+ top: 0;
+ bottom: 0;
+ background: #FFFFFF url(chrome://firebug/skin/netBarResolving.gif) repeat-x;
+ z-index:60;
+}
+
+.netConnectingBar {
+ position: absolute;
+ left: 0;
+ top: 0;
+ bottom: 0;
+ background: #FFFFFF url(chrome://firebug/skin/netBarConnecting.gif) repeat-x;
+ z-index:50;
+}
+
+.netBlockingBar {
+ position: absolute;
+ left: 0;
+ top: 0;
+ bottom: 0;
+ background: #FFFFFF url(chrome://firebug/skin/netBarWaiting.gif) repeat-x;
+ z-index:40;
+}
+
+.netSendingBar {
+ position: absolute;
+ left: 0;
+ top: 0;
+ bottom: 0;
+ background: #FFFFFF url(chrome://firebug/skin/netBarSending.gif) repeat-x;
+ z-index:30;
+}
+
+.netWaitingBar {
+ position: absolute;
+ left: 0;
+ top: 0;
+ bottom: 0;
+ background: #FFFFFF url(chrome://firebug/skin/netBarResponded.gif) repeat-x;
+ z-index:20;
+ min-width: 1px;
+}
+
+.netReceivingBar {
+ position: absolute;
+ left: 0;
+ top: 0;
+ bottom: 0;
+ background: #38D63B url(chrome://firebug/skin/netBarLoading.gif) repeat-x;
+ z-index:10;
+}
+
+.netWindowLoadBar,
+.netContentLoadBar {
+ position: absolute;
+ left: 0;
+ top: 0;
+ bottom: 0;
+ width: 1px;
+ background-color: red;
+ z-index: 70;
+ opacity: 0.5;
+ display: none;
+ margin-bottom:-1px;
+}
+
+.netContentLoadBar {
+ background-color: Blue;
+}
+
+.netTimeLabel {
+ -moz-box-sizing: padding-box;
+ position: absolute;
+ top: 1px;
+ left: 100%;
+ padding-left: 6px;
+ color: #444444;
+ min-width: 16px;
+}
+
+/*
+ * Timing info tip is reusing net timeline styles to display the same
+ * colors for individual request phases. Notice that the info tip must
+ * respect also loaded and fromCache styles that also modify the
+ * actual color. These are used both on the same element in case
+ * of the tooltip.
+ */
+.loaded .netReceivingBar,
+.loaded.netReceivingBar {
+ background: #B6B6B6 url(chrome://firebug/skin/netBarLoaded.gif) repeat-x;
+ border-color: #B6B6B6;
+}
+
+.fromCache .netReceivingBar,
+.fromCache.netReceivingBar {
+ background: #D6D6D6 url(chrome://firebug/skin/netBarCached.gif) repeat-x;
+ border-color: #D6D6D6;
+}
+
+.netSummaryRow .netTimeLabel,
+.loaded .netTimeLabel {
+ background: transparent;
+}
+
+/************************************************************************************************/
+/* Time Info tip */
+
+.timeInfoTip {
+ width: 150px;
+ height: 40px
+}
+
+.timeInfoTipBar,
+.timeInfoTipEventBar {
+ position: relative;
+ display: block;
+ margin: 0;
+ opacity: 1;
+ height: 15px;
+ width: 4px;
+}
+
+.timeInfoTipEventBar {
+ width: 1px !important;
+}
+
+.timeInfoTipCell.startTime {
+ padding-right: 8px;
+}
+
+.timeInfoTipCell.elapsedTime {
+ text-align: right;
+ padding-right: 8px;
+}
+
+/************************************************************************************************/
+/* Size Info tip */
+
+.sizeInfoLabelCol {
+ font-weight: bold;
+ padding-right: 10px;
+ font-family: Lucida Grande, Tahoma, sans-serif;
+ font-size: 11px;
+}
+
+.sizeInfoSizeCol {
+ font-weight: bold;
+}
+
+.sizeInfoDetailCol {
+ color: gray;
+ text-align: right;
+}
+
+.sizeInfoDescCol {
+ font-style: italic;
+}
+
+/************************************************************************************************/
+/* Summary */
+
+.netSummaryRow .netReceivingBar {
+ background: #BBBBBB;
+ border: none;
+}
+
+.netSummaryLabel {
+ color: #222222;
+}
+
+.netSummaryRow {
+ background: #BBBBBB !important;
+ font-weight: bold;
+}
+
+.netSummaryRow .netBar {
+ border-right-color: #BBBBBB;
+}
+
+.netSummaryRow > .netCol {
+ border-top: 1px solid #999999;
+ border-bottom: 2px solid;
+ -moz-border-bottom-colors: #EFEFEF #999999;
+ padding-top: 1px;
+ padding-bottom: 2px;
+}
+
+.netSummaryRow > .netHrefCol:hover {
+ background: transparent !important;
+}
+
+.netCountLabel {
+ padding-left: 18px;
+}
+
+.netTotalSizeCol {
+ text-align: right;
+ padding-right: 10px;
+}
+
+.netTotalTimeCol {
+ text-align: right;
+}
+
+.netCacheSizeLabel {
+ position: absolute;
+ z-index: 1000;
+ left: 0;
+ top: 0;
+}
+
+/************************************************************************************************/
+
+.netLimitRow {
+ background: rgb(255, 255, 225) !important;
+ font-weight:normal;
+ color: black;
+ font-weight:normal;
+}
+
+.netLimitLabel {
+ padding-left: 18px;
+}
+
+.netLimitRow > .netCol {
+ border-bottom: 2px solid;
+ -moz-border-bottom-colors: #EFEFEF #999999;
+ vertical-align: middle !important;
+ padding-top: 2px;
+ padding-bottom: 2px;
+}
+
+.netLimitButton {
+ font-size: 11px;
+ padding-top: 1px;
+ padding-bottom: 1px;
+}
+
+/************************************************************************************************/
+
+.netInfoCol {
+ border-top: 1px solid #EEEEEE;
+ background: url(chrome://firebug/skin/group.gif) repeat-x #FFFFFF;
+}
+
+.netInfoBody {
+ margin: 10px 0 4px 10px;
+}
+
+.netInfoTabs {
+ position: relative;
+ padding-left: 17px;
+}
+
+.netInfoTab {
+ position: relative;
+ top: -3px;
+ margin-top: 10px;
+ padding: 4px 6px;
+ border: 1px solid transparent;
+ border-bottom: none;
+ _border: none;
+ font-weight: bold;
+ color: #565656;
+ cursor: pointer;
+}
+
+/*.netInfoTab:hover {
+ cursor: pointer;
+}*/
+
+/* replaced by .netInfoTabSelected for IE6 support
+.netInfoTab[selected="true"] {
+ cursor: default !important;
+ border: 1px solid #D7D7D7 !important;
+ border-bottom: none !important;
+ -moz-border-radius: 4px 4px 0 0;
+ background-color: #FFFFFF;
+}
+/**/
+.netInfoTabSelected {
+ cursor: default !important;
+ border: 1px solid #D7D7D7 !important;
+ border-bottom: none !important;
+ -moz-border-radius: 4px 4px 0 0;
+ -webkit-border-radius: 4px 4px 0 0;
+ border-radius: 4px 4px 0 0;
+ background-color: #FFFFFF;
+}
+
+.logRow-netInfo.error .netInfoTitle {
+ color: red;
+}
+
+.logRow-netInfo.loading .netInfoResponseText {
+ font-style: italic;
+ color: #888888;
+}
+
+.loading .netInfoResponseHeadersTitle {
+ display: none;
+}
+
+.netInfoResponseSizeLimit {
+ font-family: Lucida Grande, Tahoma, sans-serif;
+ padding-top: 10px;
+ font-size: 11px;
+}
+
+.netInfoText {
+ display: none;
+ margin: 0;
+ border: 1px solid #D7D7D7;
+ border-right: none;
+ padding: 8px;
+ background-color: #FFFFFF;
+ font-family: Monaco, monospace;
+ white-space: pre-wrap;
+ /*overflow-x: auto; HTML is damaged in case of big (2-3MB) responses */
+}
+
+/* replaced by .netInfoTextSelected for IE6 support
+.netInfoText[selected="true"] {
+ display: block;
+}
+/**/
+.netInfoTextSelected {
+ display: block;
+}
+
+.netInfoParamName {
+ padding-right: 10px;
+ font-family: Lucida Grande, Tahoma, sans-serif;
+ font-weight: bold;
+ vertical-align: top;
+ text-align: right;
+ white-space: nowrap;
+}
+
+.netInfoPostText .netInfoParamName {
+ width: 1px; /* Google Chrome need this otherwise the first column of
+ the post variables table will be larger than expected */
+}
+
+.netInfoParamValue {
+ width: 100%;
+}
+
+.netInfoHeadersText,
+.netInfoPostText,
+.netInfoPutText {
+ padding-top: 0;
+}
+
+.netInfoHeadersGroup,
+.netInfoPostParams,
+.netInfoPostSource {
+ margin-bottom: 4px;
+ border-bottom: 1px solid #D7D7D7;
+ padding-top: 8px;
+ padding-bottom: 2px;
+ font-family: Lucida Grande, Tahoma, sans-serif;
+ font-weight: bold;
+ color: #565656;
+}
+
+.netInfoPostParamsTable,
+.netInfoPostPartsTable,
+.netInfoPostJSONTable,
+.netInfoPostXMLTable,
+.netInfoPostSourceTable {
+ margin-bottom: 10px;
+ width: 100%;
+}
+
+.netInfoPostContentType {
+ color: #bdbdbd;
+ padding-left: 50px;
+ font-weight: normal;
+}
+
+.netInfoHtmlPreview {
+ border: 0;
+ width: 100%;
+ height:100%;
+}
+
+/************************************************************************************************/
+/* Request & Response Headers */
+
+.netHeadersViewSource {
+ color: #bdbdbd;
+ margin-left: 200px;
+ font-weight: normal;
+}
+
+.netHeadersViewSource:hover {
+ color: blue;
+ cursor: pointer;
+}
+
+/************************************************************************************************/
+
+.netActivationRow,
+.netPageSeparatorRow {
+ background: rgb(229, 229, 229) !important;
+ font-weight: normal;
+ color: black;
+}
+
+.netActivationLabel {
+ background: url(chrome://firebug/skin/infoIcon.png) no-repeat 3px 2px;
+ padding-left: 22px;
+}
+
+/************************************************************************************************/
+
+.netPageSeparatorRow {
+ height: 5px !important;
+}
+
+.netPageSeparatorLabel {
+ padding-left: 22px;
+ height: 5px !important;
+}
+
+.netPageRow {
+ background-color: rgb(255, 255, 255);
+}
+
+.netPageRow:hover {
+ background: #EFEFEF;
+}
+
+.netPageLabel {
+ padding: 1px 0 2px 18px !important;
+ font-weight: bold;
+}
+
+/************************************************************************************************/
+
+.netActivationRow > .netCol {
+ border-bottom: 2px solid;
+ -moz-border-bottom-colors: #EFEFEF #999999;
+ padding-top: 2px;
+ padding-bottom: 3px;
+}
+/*
+.useA11y .panelNode-net .a11yFocus:focus,
+.useA11y .panelNode-net .focusRow:focus {
+ outline-offset: -2px;
+ background-color: #FFFFD6 !important;
+}
+
+.useA11y .panelNode-net .netHeaderCell:focus,
+.useA11y .panelNode-net :focus .netHeaderCell,
+.useA11y .panelNode-net :focus .netReceivingBar,
+.useA11y .netSummaryRow :focus .netBar,
+.useA11y .netSummaryRow:focus .netBar {
+ background-color: #FFFFD6;
+ background-image: none;
+ border-color: #FFFFD6;
+}
+/**/
+
+/*************************************************************************************************/
+/*************************************************************************************************/
+/*************************************************************************************************/
+/*************************************************************************************************/
+/* Windows */
+/*************************************************************************************************/
+/*************************************************************************************************/
+/*************************************************************************************************/
+
+
+/************************************************************************************************/
+/* Twisties */
+
+.twisty,
+.logRow-errorMessage > .hasTwisty > .errorTitle,
+.logRow-log > .objectBox-array.hasTwisty,
+.logRow-spy .spyHead .spyTitle,
+.logGroup > .logRow,
+.memberRow.hasChildren > .memberLabelCell > .memberLabel,
+.hasHeaders .netHrefLabel,
+.netPageRow > .netCol > .netPageTitle {
+ background-image: url(tree_open.gif);
+ background-repeat: no-repeat;
+ background-position: 2px 2px;
+ min-height: 12px;
+}
+
+.logRow-errorMessage > .hasTwisty.opened > .errorTitle,
+.logRow-log > .objectBox-array.hasTwisty.opened,
+.logRow-spy.opened .spyHead .spyTitle,
+.logGroup.opened > .logRow,
+.memberRow.hasChildren.opened > .memberLabelCell > .memberLabel,
+.nodeBox.highlightOpen > .nodeLabel > .twisty,
+.nodeBox.open > .nodeLabel > .twisty,
+.netRow.opened > .netCol > .netHrefLabel,
+.netPageRow.opened > .netCol > .netPageTitle {
+ background-image: url(tree_close.gif);
+}
+
+.twisty {
+ background-position: 4px 4px;
+}
+
+
+
+/************************************************************************************************/
+/* Twisties IE6 */
+
+/* IE6 has problems with > operator, and multiple classes */
+
+* html .logRow-spy .spyHead .spyTitle,
+* html .logGroup .logGroupLabel,
+* html .hasChildren .memberLabelCell .memberLabel,
+* html .hasHeaders .netHrefLabel {
+ background-image: url(tree_open.gif);
+ background-repeat: no-repeat;
+ background-position: 2px 2px;
+}
+
+* html .opened .spyHead .spyTitle,
+* html .opened .logGroupLabel,
+* html .opened .memberLabelCell .memberLabel {
+ background-image: url(tree_close.gif);
+ background-repeat: no-repeat;
+ background-position: 2px 2px;
+}
+
+
+
+/*************************************************************************************************/
+/*************************************************************************************************/
+/*************************************************************************************************/
+/*************************************************************************************************/
+/* Console */
+/*************************************************************************************************/
+/*************************************************************************************************/
+/*************************************************************************************************/
+
+
+/* See license.txt for terms of usage */
+
+.panelNode-console {
+ overflow-x: hidden;
+}
+
+.objectLink {
+ text-decoration: none;
+}
+
+.objectLink:hover {
+ cursor: pointer;
+ text-decoration: underline;
+}
+
+.logRow {
+ position: relative;
+ margin: 0;
+ border-bottom: 1px solid #D7D7D7;
+ padding: 2px 4px 1px 6px;
+ background-color: #FFFFFF;
+ overflow: hidden !important; /* IE need this to avoid disappearing bug with collapsed logs */
+}
+
+.useA11y .logRow:focus {
+ border-bottom: 1px solid #000000 !important;
+ outline: none !important;
+ background-color: #FFFFAD !important;
+}
+
+.useA11y .logRow:focus a.objectLink-sourceLink {
+ background-color: #FFFFAD;
+}
+
+.useA11y .a11yFocus:focus, .useA11y .objectBox:focus {
+ outline: 2px solid #FF9933;
+ background-color: #FFFFAD;
+}
+
+.useA11y .objectBox-null:focus, .useA11y .objectBox-undefined:focus{
+ background-color: #888888 !important;
+}
+
+.useA11y .logGroup.opened > .logRow {
+ border-bottom: 1px solid #ffffff;
+}
+
+.logGroup {
+ background: url(group.gif) repeat-x #FFFFFF;
+ padding: 0 !important;
+ border: none !important;
+}
+
+.logGroupBody {
+ display: none;
+ margin-left: 16px;
+ border-left: 1px solid #D7D7D7;
+ border-top: 1px solid #D7D7D7;
+ background: #FFFFFF;
+}
+
+.logGroup > .logRow {
+ background-color: transparent !important;
+ font-weight: bold;
+}
+
+.logGroup.opened > .logRow {
+ border-bottom: none;
+}
+
+.logGroup.opened > .logGroupBody {
+ display: block;
+}
+
+/*****************************************************************************************/
+
+.logRow-command > .objectBox-text {
+ font-family: Monaco, monospace;
+ color: #0000FF;
+ white-space: pre-wrap;
+}
+
+.logRow-info,
+.logRow-warn,
+.logRow-error,
+.logRow-assert,
+.logRow-warningMessage,
+.logRow-errorMessage {
+ padding-left: 22px;
+ background-repeat: no-repeat;
+ background-position: 4px 2px;
+}
+
+.logRow-assert,
+.logRow-warningMessage,
+.logRow-errorMessage {
+ padding-top: 0;
+ padding-bottom: 0;
+}
+
+.logRow-info,
+.logRow-info .objectLink-sourceLink {
+ background-color: #FFFFFF;
+}
+
+.logRow-warn,
+.logRow-warningMessage,
+.logRow-warn .objectLink-sourceLink,
+.logRow-warningMessage .objectLink-sourceLink {
+ background-color: cyan;
+}
+
+.logRow-error,
+.logRow-assert,
+.logRow-errorMessage,
+.logRow-error .objectLink-sourceLink,
+.logRow-errorMessage .objectLink-sourceLink {
+ background-color: LightYellow;
+}
+
+.logRow-error,
+.logRow-assert,
+.logRow-errorMessage {
+ color: #FF0000;
+}
+
+.logRow-info {
+ /*background-image: url(chrome://firebug/skin/infoIcon.png);*/
+}
+
+.logRow-warn,
+.logRow-warningMessage {
+ /*background-image: url(chrome://firebug/skin/warningIcon.png);*/
+}
+
+.logRow-error,
+.logRow-assert,
+.logRow-errorMessage {
+ /*background-image: url(chrome://firebug/skin/errorIcon.png);*/
+}
+
+/*****************************************************************************************/
+
+.objectBox-string,
+.objectBox-text,
+.objectBox-number,
+.objectLink-element,
+.objectLink-textNode,
+.objectLink-function,
+.objectBox-stackTrace,
+.objectLink-profile {
+ font-family: Monaco, monospace;
+}
+
+.objectBox-string,
+.objectBox-text,
+.objectLink-textNode {
+ white-space: pre-wrap;
+}
+
+.objectBox-number,
+.objectLink-styleRule,
+.objectLink-element,
+.objectLink-textNode {
+ color: #000088;
+}
+
+.objectBox-string {
+ color: #FF0000;
+}
+
+.objectLink-function,
+.objectBox-stackTrace,
+.objectLink-profile {
+ color: DarkGreen;
+}
+
+.objectBox-null,
+.objectBox-undefined {
+ padding: 0 2px;
+ border: 1px solid #666666;
+ background-color: #888888;
+ color: #FFFFFF;
+}
+
+.objectBox-exception {
+ padding: 0 2px 0 18px;
+ /*background: url(chrome://firebug/skin/errorIcon-sm.png) no-repeat 0 0;*/
+ color: red;
+}
+
+.objectLink-sourceLink {
+ position: absolute;
+ right: 4px;
+ top: 2px;
+ padding-left: 8px;
+ font-family: Lucida Grande, sans-serif;
+ font-weight: bold;
+ color: #0000FF;
+}
+
+/************************************************************************************************/
+
+.errorTitle {
+ margin-top: 0px;
+ margin-bottom: 1px;
+ padding-top: 2px;
+ padding-bottom: 2px;
+}
+
+.errorTrace {
+ margin-left: 17px;
+}
+
+.errorSourceBox {
+ margin: 2px 0;
+}
+
+.errorSource-none {
+ display: none;
+}
+
+.errorSource-syntax > .errorBreak {
+ visibility: hidden;
+}
+
+.errorSource {
+ cursor: pointer;
+ font-family: Monaco, monospace;
+ color: DarkGreen;
+}
+
+.errorSource:hover {
+ text-decoration: underline;
+}
+
+.errorBreak {
+ cursor: pointer;
+ display: none;
+ margin: 0 6px 0 0;
+ width: 13px;
+ height: 14px;
+ vertical-align: bottom;
+ /*background: url(chrome://firebug/skin/breakpoint.png) no-repeat;*/
+ opacity: 0.1;
+}
+
+.hasBreakSwitch .errorBreak {
+ display: inline;
+}
+
+.breakForError .errorBreak {
+ opacity: 1;
+}
+
+.assertDescription {
+ margin: 0;
+}
+
+/************************************************************************************************/
+
+.logRow-profile > .logRow > .objectBox-text {
+ font-family: Lucida Grande, Tahoma, sans-serif;
+ color: #000000;
+}
+
+.logRow-profile > .logRow > .objectBox-text:last-child {
+ color: #555555;
+ font-style: italic;
+}
+
+.logRow-profile.opened > .logRow {
+ padding-bottom: 4px;
+}
+
+.profilerRunning > .logRow {
+ /*background: transparent url(chrome://firebug/skin/loading_16.gif) no-repeat 2px 0 !important;*/
+ padding-left: 22px !important;
+}
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+.profileSizer {
+ width:100%;
+ overflow-x:auto;
+ overflow-y: scroll;
+}
+
+.profileTable {
+ border-bottom: 1px solid #D7D7D7;
+ padding: 0 0 4px 0;
+}
+
+.profileTable tr[odd="1"] {
+ background-color: #F5F5F5;
+ vertical-align:middle;
+}
+
+.profileTable a {
+ vertical-align:middle;
+}
+
+.profileTable td {
+ padding: 1px 4px 0 4px;
+}
+
+.headerCell {
+ cursor: pointer;
+ -moz-user-select: none;
+ border-bottom: 1px solid #9C9C9C;
+ padding: 0 !important;
+ font-weight: bold;
+ /*background: #BBBBBB url(chrome://firebug/skin/tableHeader.gif) repeat-x;*/
+}
+
+.headerCellBox {
+ padding: 2px 4px;
+ border-left: 1px solid #D9D9D9;
+ border-right: 1px solid #9C9C9C;
+}
+
+.headerCell:hover:active {
+ /*background: #959595 url(chrome://firebug/skin/tableHeaderActive.gif) repeat-x;*/
+}
+
+.headerSorted {
+ /*background: #7D93B2 url(chrome://firebug/skin/tableHeaderSorted.gif) repeat-x;*/
+}
+
+.headerSorted > .headerCellBox {
+ border-right-color: #6B7C93;
+ /*background: url(chrome://firebug/skin/arrowDown.png) no-repeat right;*/
+}
+
+.headerSorted.sortedAscending > .headerCellBox {
+ /*background-image: url(chrome://firebug/skin/arrowUp.png);*/
+}
+
+.headerSorted:hover:active {
+ /*background: #536B90 url(chrome://firebug/skin/tableHeaderSortedActive.gif) repeat-x;*/
+}
+
+.linkCell {
+ text-align: right;
+}
+
+.linkCell > .objectLink-sourceLink {
+ position: static;
+}
+
+/*****************************************************************************************/
+
+.logRow-stackTrace {
+ padding-top: 0;
+ background: #f8f8f8;
+}
+
+.logRow-stackTrace > .objectBox-stackFrame {
+ position: relative;
+ padding-top: 2px;
+}
+
+/************************************************************************************************/
+
+.objectLink-object {
+ font-family: Lucida Grande, sans-serif;
+ font-weight: bold;
+ color: DarkGreen;
+ white-space: pre-wrap;
+}
+
+/* xxxpedro reps object representation .................................... */
+.objectProp-object {
+ color: DarkGreen;
+}
+
+.objectProps {
+ color: #000;
+ font-weight: normal;
+}
+
+.objectPropName {
+ /*font-style: italic;*/
+ color: #777;
+}
+
+/*
+.objectProps .objectProp-string,
+.objectProps .objectProp-number,
+.objectProps .objectProp-object
+{
+ font-style: italic;
+}
+/**/
+
+.objectProps .objectProp-string
+{
+ /*font-family: Monaco, monospace;*/
+ color: #f55;
+}
+.objectProps .objectProp-number
+{
+ /*font-family: Monaco, monospace;*/
+ color: #55a;
+}
+.objectProps .objectProp-object
+{
+ /*font-family: Lucida Grande,sans-serif;*/
+ color: #585;
+}
+/* xxxpedro reps object representation .................................... */
+
+/************************************************************************************************/
+
+.selectorTag,
+.selectorId,
+.selectorClass {
+ font-family: Monaco, monospace;
+ font-weight: normal;
+}
+
+.selectorTag {
+ color: #0000FF;
+}
+
+.selectorId {
+ color: DarkBlue;
+}
+
+.selectorClass {
+ color: red;
+}
+
+.selectorHidden > .selectorTag {
+ color: #5F82D9;
+}
+
+.selectorHidden > .selectorId {
+ color: #888888;
+}
+
+.selectorHidden > .selectorClass {
+ color: #D86060;
+}
+
+.selectorValue {
+ font-family: Lucida Grande, sans-serif;
+ font-style: italic;
+ color: #555555;
+}
+
+/*****************************************************************************************/
+
+.panelNode.searching .logRow {
+ display: none;
+}
+
+.logRow.matched {
+ display: block !important;
+}
+
+.logRow.matching {
+ position: absolute;
+ left: -1000px;
+ top: -1000px;
+ max-width: 0;
+ max-height: 0;
+ overflow: hidden;
+}
+
+/*****************************************************************************************/
+
+.objectLeftBrace,
+.objectRightBrace,
+.objectEqual,
+.objectComma,
+.arrayLeftBracket,
+.arrayRightBracket,
+.arrayComma {
+ font-family: Monaco, monospace;
+}
+
+.objectLeftBrace,
+.objectRightBrace,
+.arrayLeftBracket,
+.arrayRightBracket {
+ font-weight: bold;
+}
+
+.objectLeftBrace,
+.arrayLeftBracket {
+ margin-right: 4px;
+}
+
+.objectRightBrace,
+.arrayRightBracket {
+ margin-left: 4px;
+}
+
+/*****************************************************************************************/
+
+.logRow-dir {
+ padding: 0;
+}
+
+/************************************************************************************************/
+
+/*
+.logRow-errorMessage > .hasTwisty > .errorTitle,
+.logRow-spy .spyHead .spyTitle,
+.logGroup > .logRow
+*/
+.logRow-errorMessage .hasTwisty .errorTitle,
+.logRow-spy .spyHead .spyTitle,
+.logGroup .logRow {
+ cursor: pointer;
+ padding-left: 18px;
+ background-repeat: no-repeat;
+ background-position: 3px 3px;
+}
+
+.logRow-errorMessage > .hasTwisty > .errorTitle {
+ background-position: 2px 3px;
+}
+
+.logRow-errorMessage > .hasTwisty > .errorTitle:hover,
+.logRow-spy .spyHead .spyTitle:hover,
+.logGroup > .logRow:hover {
+ text-decoration: underline;
+}
+
+/*****************************************************************************************/
+
+.logRow-spy {
+ padding: 0 !important;
+}
+
+.logRow-spy,
+.logRow-spy .objectLink-sourceLink {
+ background: url(group.gif) repeat-x #FFFFFF;
+ padding-right: 4px;
+ right: 0;
+}
+
+.logRow-spy.opened {
+ padding-bottom: 4px;
+ border-bottom: none;
+}
+
+.spyTitle {
+ color: #000000;
+ font-weight: bold;
+ -moz-box-sizing: padding-box;
+ overflow: hidden;
+ z-index: 100;
+ padding-left: 18px;
+}
+
+.spyCol {
+ padding: 0;
+ white-space: nowrap;
+ height: 16px;
+}
+
+.spyTitleCol:hover > .objectLink-sourceLink,
+.spyTitleCol:hover > .spyTime,
+.spyTitleCol:hover > .spyStatus,
+.spyTitleCol:hover > .spyTitle {
+ display: none;
+}
+
+.spyFullTitle {
+ display: none;
+ -moz-user-select: none;
+ max-width: 100%;
+ background-color: Transparent;
+}
+
+.spyTitleCol:hover > .spyFullTitle {
+ display: block;
+}
+
+.spyStatus {
+ padding-left: 10px;
+ color: rgb(128, 128, 128);
+}
+
+.spyTime {
+ margin-left:4px;
+ margin-right:4px;
+ color: rgb(128, 128, 128);
+}
+
+.spyIcon {
+ margin-right: 4px;
+ margin-left: 4px;
+ width: 16px;
+ height: 16px;
+ vertical-align: middle;
+ background: transparent no-repeat 0 0;
+ display: none;
+}
+
+.loading .spyHead .spyRow .spyIcon {
+ background-image: url(loading_16.gif);
+ display: block;
+}
+
+.logRow-spy.loaded:not(.error) .spyHead .spyRow .spyIcon {
+ width: 0;
+ margin: 0;
+}
+
+.logRow-spy.error .spyHead .spyRow .spyIcon {
+ background-image: url(errorIcon-sm.png);
+ display: block;
+ background-position: 2px 2px;
+}
+
+.logRow-spy .spyHead .netInfoBody {
+ display: none;
+}
+
+.logRow-spy.opened .spyHead .netInfoBody {
+ margin-top: 10px;
+ display: block;
+}
+
+.logRow-spy.error .spyTitle,
+.logRow-spy.error .spyStatus,
+.logRow-spy.error .spyTime {
+ color: red;
+}
+
+.logRow-spy.loading .spyResponseText {
+ font-style: italic;
+ color: #888888;
+}
+
+/************************************************************************************************/
+
+.caption {
+ font-family: Lucida Grande, Tahoma, sans-serif;
+ font-weight: bold;
+ color: #444444;
+}
+
+.warning {
+ padding: 10px;
+ font-family: Lucida Grande, Tahoma, sans-serif;
+ font-weight: bold;
+ color: #888888;
+}
+
+
+
+
+/*************************************************************************************************/
+/*************************************************************************************************/
+/*************************************************************************************************/
+/*************************************************************************************************/
+/* DOM */
+/*************************************************************************************************/
+/*************************************************************************************************/
+/*************************************************************************************************/
+
+
+/* See license.txt for terms of usage */
+
+.panelNode-dom {
+ overflow-x: hidden !important;
+}
+
+.domTable {
+ font-size: 1em;
+ width: 100%;
+ table-layout: fixed;
+ background: #fff;
+}
+
+.domTableIE {
+ width: auto;
+}
+
+.memberLabelCell {
+ padding: 2px 0 2px 0;
+ vertical-align: top;
+}
+
+.memberValueCell {
+ padding: 1px 0 1px 5px;
+ display: block;
+ overflow: hidden;
+}
+
+.memberLabel {
+ display: block;
+ cursor: default;
+ -moz-user-select: none;
+ overflow: hidden;
+ /*position: absolute;*/
+ padding-left: 18px;
+ /*max-width: 30%;*/
+ /*white-space: nowrap;*/
+ background-color: #FFFFFF;
+ text-decoration: none;
+}
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+.memberRow.hasChildren .memberLabelCell .memberLabel:hover {
+ cursor: pointer;
+ color: blue;
+ text-decoration: underline;
+}
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+.userLabel {
+ color: #000000;
+ font-weight: bold;
+}
+
+.userClassLabel {
+ color: #E90000;
+ font-weight: bold;
+}
+
+.userFunctionLabel {
+ color: #025E2A;
+ font-weight: bold;
+}
+
+.domLabel {
+ color: #000000;
+}
+
+.domFunctionLabel {
+ color: #025E2A;
+}
+
+.ordinalLabel {
+ color: SlateBlue;
+ font-weight: bold;
+}
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+.scopesRow {
+ padding: 2px 18px;
+ background-color: LightYellow;
+ border-bottom: 5px solid #BEBEBE;
+ color: #666666;
+}
+.scopesLabel {
+ background-color: LightYellow;
+}
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+.watchEditCell {
+ padding: 2px 18px;
+ background-color: LightYellow;
+ border-bottom: 1px solid #BEBEBE;
+ color: #666666;
+}
+
+.editor-watchNewRow,
+.editor-memberRow {
+ font-family: Monaco, monospace !important;
+}
+
+.editor-memberRow {
+ padding: 1px 0 !important;
+}
+
+.editor-watchRow {
+ padding-bottom: 0 !important;
+}
+
+.watchRow > .memberLabelCell {
+ font-family: Monaco, monospace;
+ padding-top: 1px;
+ padding-bottom: 1px;
+}
+
+.watchRow > .memberLabelCell > .memberLabel {
+ background-color: transparent;
+}
+
+.watchRow > .memberValueCell {
+ padding-top: 2px;
+ padding-bottom: 2px;
+}
+
+.watchRow > .memberLabelCell,
+.watchRow > .memberValueCell {
+ background-color: #F5F5F5;
+ border-bottom: 1px solid #BEBEBE;
+}
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+.watchToolbox {
+ z-index: 2147483647;
+ position: absolute;
+ right: 0;
+ padding: 1px 2px;
+}
+
+
+/*************************************************************************************************/
+/*************************************************************************************************/
+/*************************************************************************************************/
+/*************************************************************************************************/
+/*************************************************************************************************/
+/*************************************************************************************************/
+/*************************************************************************************************/
+/* FROM ORIGINAL FIREBUG */
+
+
+
+
+/************************************************************************************************
+ CSS Not organized
+*************************************************************************************************/
+#fbConsole {
+ overflow-x: hidden !important;
+}
+
+#fbCSS {
+ font: 1em Monaco, monospace;
+ padding: 0 7px;
+}
+
+#fbstylesheetButtons select, #fbScriptButtons select {
+ font: 11px Lucida Grande, Tahoma, sans-serif;
+ margin-top: 1px;
+ padding-left: 3px;
+ background: #fafafa;
+ border: 1px inset #fff;
+ width: 220px;
+ outline: none;
+}
+
+.Selector { margin-top:10px }
+.CSSItem {margin-left: 4% }
+.CSSText { padding-left:20px; }
+.CSSProperty { color:#005500; }
+.CSSValue { padding-left:5px; color:#000088; }
+
+
+/************************************************************************************************
+ Not organized
+*************************************************************************************************/
+
+#fbHTMLStatusBar {
+ display: inline;
+}
+
+.fbToolbarButtons {
+ display: none;
+}
+
+.fbStatusSeparator{
+ display: block;
+ float: left;
+ padding-top: 4px;
+}
+
+#fbStatusBarBox {
+ display: none;
+}
+
+#fbToolbarContent {
+ display: block;
+ position: absolute;
+ _position: absolute;
+ top: 0;
+ padding-top: 4px;
+ height: 23px;
+ clip: rect(0, 2048px, 27px, 0);
+}
+
+.fbTabMenuTarget {
+ display: none !important;
+ float: left;
+ width: 10px;
+ height: 10px;
+ margin-top: 6px;
+ background: url(tabMenuTarget.png);
+}
+
+.fbTabMenuTarget:hover {
+ background: url(tabMenuTargetHover.png);
+}
+
+.fbShadow {
+ float: left;
+ background: url(shadowAlpha.png) no-repeat bottom right !important;
+ background: url(shadow2.gif) no-repeat bottom right;
+ margin: 10px 0 0 10px !important;
+ margin: 10px 0 0 5px;
+}
+
+.fbShadowContent {
+ display: block;
+ position: relative;
+ background-color: #fff;
+ border: 1px solid #a9a9a9;
+ top: -6px;
+ left: -6px;
+}
+
+.fbMenu {
+ display: none;
+ position: absolute;
+ font-size: 11px;
+ line-height: 13px;
+ z-index: 2147483647;
+}
+
+.fbMenuContent {
+ padding: 2px;
+}
+
+.fbMenuSeparator {
+ display: block;
+ position: relative;
+ padding: 1px 18px 0;
+ text-decoration: none;
+ color: #000;
+ cursor: default;
+ background: #ACA899;
+ margin: 4px 0;
+}
+
+.fbMenuOption
+{
+ display: block;
+ position: relative;
+ padding: 2px 18px;
+ text-decoration: none;
+ color: #000;
+ cursor: default;
+}
+
+.fbMenuOption:hover
+{
+ color: #fff;
+ background: #316AC5;
+}
+
+.fbMenuGroup {
+ background: transparent url(tabMenuPin.png) no-repeat right 0;
+}
+
+.fbMenuGroup:hover {
+ background: #316AC5 url(tabMenuPin.png) no-repeat right -17px;
+}
+
+.fbMenuGroupSelected {
+ color: #fff;
+ background: #316AC5 url(tabMenuPin.png) no-repeat right -17px;
+}
+
+.fbMenuChecked {
+ background: transparent url(tabMenuCheckbox.png) no-repeat 4px 0;
+}
+
+.fbMenuChecked:hover {
+ background: #316AC5 url(tabMenuCheckbox.png) no-repeat 4px -17px;
+}
+
+.fbMenuRadioSelected {
+ background: transparent url(tabMenuRadio.png) no-repeat 4px 0;
+}
+
+.fbMenuRadioSelected:hover {
+ background: #316AC5 url(tabMenuRadio.png) no-repeat 4px -17px;
+}
+
+.fbMenuShortcut {
+ padding-right: 85px;
+}
+
+.fbMenuShortcutKey {
+ position: absolute;
+ right: 0;
+ top: 2px;
+ width: 77px;
+}
+
+#fbFirebugMenu {
+ top: 22px;
+ left: 0;
+}
+
+.fbMenuDisabled {
+ color: #ACA899 !important;
+}
+
+#fbFirebugSettingsMenu {
+ left: 245px;
+ top: 99px;
+}
+
+#fbConsoleMenu {
+ top: 42px;
+ left: 48px;
+}
+
+.fbIconButton {
+ display: block;
+}
+
+.fbIconButton {
+ display: block;
+}
+
+.fbIconButton {
+ display: block;
+ float: left;
+ height: 20px;
+ width: 20px;
+ color: #000;
+ margin-right: 2px;
+ text-decoration: none;
+ cursor: default;
+}
+
+.fbIconButton:hover {
+ position: relative;
+ top: -1px;
+ left: -1px;
+ margin-right: 0;
+ _margin-right: 1px;
+ color: #333;
+ border: 1px solid #fff;
+ border-bottom: 1px solid #bbb;
+ border-right: 1px solid #bbb;
+}
+
+.fbIconPressed {
+ position: relative;
+ margin-right: 0;
+ _margin-right: 1px;
+ top: 0 !important;
+ left: 0 !important;
+ height: 19px;
+ color: #333 !important;
+ border: 1px solid #bbb !important;
+ border-bottom: 1px solid #cfcfcf !important;
+ border-right: 1px solid #ddd !important;
+}
+
+
+
+/************************************************************************************************
+ Error Popup
+*************************************************************************************************/
+#fbErrorPopup {
+ position: absolute;
+ right: 0;
+ bottom: 0;
+ height: 19px;
+ width: 75px;
+ background: url(sprite.png) #f1f2ee 0 0;
+ z-index: 999;
+}
+
+#fbErrorPopupContent {
+ position: absolute;
+ right: 0;
+ top: 1px;
+ height: 18px;
+ width: 75px;
+ _width: 74px;
+ border-left: 1px solid #aca899;
+}
+
+#fbErrorIndicator {
+ position: absolute;
+ top: 2px;
+ right: 5px;
+}
+
+
+
+
+
+
+
+
+
+
+.fbBtnInspectActive {
+ background: #aaa;
+ color: #fff !important;
+}
+
+/************************************************************************************************
+ General
+*************************************************************************************************/
+.fbBody {
+ margin: 0;
+ padding: 0;
+ overflow: hidden;
+
+ font-family: Lucida Grande, Tahoma, sans-serif;
+ font-size: 11px;
+ background: #fff;
+}
+
+.clear {
+ clear: both;
+}
+
+/************************************************************************************************
+ Mini Chrome
+*************************************************************************************************/
+#fbMiniChrome {
+ display: none;
+ right: 0;
+ height: 27px;
+ background: url(sprite.png) #f1f2ee 0 0;
+ margin-left: 1px;
+}
+
+#fbMiniContent {
+ display: block;
+ position: relative;
+ left: -1px;
+ right: 0;
+ top: 1px;
+ height: 25px;
+ border-left: 1px solid #aca899;
+}
+
+#fbToolbarSearch {
+ float: right;
+ border: 1px solid #ccc;
+ margin: 0 5px 0 0;
+ background: #fff url(search.png) no-repeat 4px 2px !important;
+ background: #fff url(search.gif) no-repeat 4px 2px;
+ padding-left: 20px;
+ font-size: 11px;
+}
+
+#fbToolbarErrors {
+ float: right;
+ margin: 1px 4px 0 0;
+ font-size: 11px;
+}
+
+#fbLeftToolbarErrors {
+ float: left;
+ margin: 7px 0px 0 5px;
+ font-size: 11px;
+}
+
+.fbErrors {
+ padding-left: 20px;
+ height: 14px;
+ background: url(errorIcon.png) no-repeat !important;
+ background: url(errorIcon.gif) no-repeat;
+ color: #f00;
+ font-weight: bold;
+}
+
+#fbMiniErrors {
+ display: inline;
+ display: none;
+ float: right;
+ margin: 5px 2px 0 5px;
+}
+
+#fbMiniIcon {
+ float: right;
+ margin: 3px 4px 0;
+ height: 20px;
+ width: 20px;
+ float: right;
+ background: url(sprite.png) 0 -135px;
+ cursor: pointer;
+}
+
+
+/************************************************************************************************
+ Master Layout
+*************************************************************************************************/
+#fbChrome {
+ font-family: Lucida Grande, Tahoma, sans-serif;
+ font-size: 11px;
+ position: absolute;
+ _position: static;
+ top: 0;
+ left: 0;
+ height: 100%;
+ width: 100%;
+ border-collapse: collapse;
+ border-spacing: 0;
+ background: #fff;
+ overflow: hidden;
+}
+
+#fbChrome > tbody > tr > td {
+ padding: 0;
+}
+
+#fbTop {
+ height: 49px;
+}
+
+#fbToolbar {
+ background: url(sprite.png) #f1f2ee 0 0;
+ height: 27px;
+ font-size: 11px;
+ line-height: 13px;
+}
+
+#fbPanelBarBox {
+ background: url(sprite.png) #dbd9c9 0 -27px;
+ height: 22px;
+}
+
+#fbContent {
+ height: 100%;
+ vertical-align: top;
+}
+
+#fbBottom {
+ height: 18px;
+ background: #fff;
+}
+
+/************************************************************************************************
+ Sub-Layout
+*************************************************************************************************/
+
+/* fbToolbar
+*************************************************************************************************/
+#fbToolbarIcon {
+ float: left;
+ padding: 0 5px 0;
+}
+
+#fbToolbarIcon a {
+ background: url(sprite.png) 0 -135px;
+}
+
+#fbToolbarButtons {
+ padding: 0 2px 0 5px;
+}
+
+#fbToolbarButtons {
+ padding: 0 2px 0 5px;
+}
+/*
+#fbStatusBarBox a {
+ text-decoration: none;
+ display: block;
+ float: left;
+ color: #000;
+ padding: 4px 5px;
+ margin: 0 0 0 1px;
+ cursor: default;
+}
+
+#fbStatusBarBox a:hover {
+ color: #333;
+ padding: 3px 4px;
+ border: 1px solid #fff;
+ border-bottom: 1px solid #bbb;
+ border-right: 1px solid #bbb;
+}
+/**/
+
+.fbButton {
+ text-decoration: none;
+ display: block;
+ float: left;
+ color: #000;
+ padding: 4px 6px 4px 7px;
+ cursor: default;
+}
+
+.fbButton:hover {
+ color: #333;
+ background: #f5f5ef url(buttonBg.png);
+ padding: 3px 5px 3px 6px;
+ border: 1px solid #fff;
+ border-bottom: 1px solid #bbb;
+ border-right: 1px solid #bbb;
+}
+
+.fbBtnPressed {
+ background: #e3e3db url(buttonBgHover.png) !important;
+ padding: 3px 4px 2px 6px !important;
+ margin: 1px 0 0 1px !important;
+ border: 1px solid #ACA899 !important;
+ border-color: #ACA899 #ECEBE3 #ECEBE3 #ACA899 !important;
+}
+
+#fbStatusBarBox {
+ top: 4px;
+ cursor: default;
+}
+
+.fbToolbarSeparator {
+ overflow: hidden;
+ border: 1px solid;
+ border-color: transparent #fff transparent #777;
+ _border-color: #eee #fff #eee #777;
+ height: 7px;
+ margin: 6px 3px;
+ float: left;
+}
+
+.fbBtnSelected {
+ font-weight: bold;
+}
+
+.fbStatusBar {
+ color: #aca899;
+}
+
+.fbStatusBar a {
+ text-decoration: none;
+ color: black;
+}
+
+.fbStatusBar a:hover {
+ color: blue;
+ cursor: pointer;
+}
+
+
+#fbWindowButtons {
+ position: absolute;
+ white-space: nowrap;
+ right: 0;
+ top: 0;
+ height: 17px;
+ width: 48px;
+ padding: 5px;
+ z-index: 6;
+ background: url(sprite.png) #f1f2ee 0 0;
+}
+
+/* fbPanelBarBox
+*************************************************************************************************/
+
+#fbPanelBar1 {
+ width: 1024px; /* fixed width to avoid tabs breaking line */
+ z-index: 8;
+ left: 0;
+ white-space: nowrap;
+ background: url(sprite.png) #dbd9c9 0 -27px;
+ position: absolute;
+ left: 4px;
+}
+
+#fbPanelBar2Box {
+ background: url(sprite.png) #dbd9c9 0 -27px;
+ position: absolute;
+ height: 22px;
+ width: 300px; /* fixed width to avoid tabs breaking line */
+ z-index: 9;
+ right: 0;
+}
+
+#fbPanelBar2 {
+ position: absolute;
+ width: 290px; /* fixed width to avoid tabs breaking line */
+ height: 22px;
+ padding-left: 4px;
+}
+
+/* body
+*************************************************************************************************/
+.fbPanel {
+ display: none;
+}
+
+#fbPanelBox1, #fbPanelBox2 {
+ max-height: inherit;
+ height: 100%;
+ font-size: 1em;
+}
+
+#fbPanelBox2 {
+ background: #fff;
+}
+
+#fbPanelBox2 {
+ width: 300px;
+ background: #fff;
+}
+
+#fbPanel2 {
+ margin-left: 6px;
+ background: #fff;
+}
+
+#fbLargeCommandLine {
+ display: none;
+ position: absolute;
+ z-index: 9;
+ top: 27px;
+ right: 0;
+ width: 294px;
+ height: 201px;
+ border-width: 0;
+ margin: 0;
+ padding: 2px 0 0 2px;
+ resize: none;
+ outline: none;
+ font-size: 11px;
+ overflow: auto;
+ border-top: 1px solid #B9B7AF;
+ _right: -1px;
+ _border-left: 1px solid #fff;
+}
+
+#fbLargeCommandButtons {
+ display: none;
+ background: #ECE9D8;
+ bottom: 0;
+ right: 0;
+ width: 294px;
+ height: 21px;
+ padding-top: 1px;
+ position: fixed;
+ border-top: 1px solid #ACA899;
+ z-index: 9;
+}
+
+#fbSmallCommandLineIcon {
+ background: url(down.png) no-repeat;
+ position: absolute;
+ right: 2px;
+ bottom: 3px;
+
+ z-index: 99;
+}
+
+#fbSmallCommandLineIcon:hover {
+ background: url(downHover.png) no-repeat;
+}
+
+.hide {
+ overflow: hidden !important;
+ position: fixed !important;
+ display: none !important;
+ visibility: hidden !important;
+}
+
+/* fbBottom
+*************************************************************************************************/
+
+#fbCommand {
+ height: 18px;
+}
+
+#fbCommandBox {
+ position: fixed;
+ _position: absolute;
+ width: 100%;
+ height: 18px;
+ bottom: 0;
+ overflow: hidden;
+ z-index: 9;
+ background: #fff;
+ border: 0;
+ border-top: 1px solid #ccc;
+}
+
+#fbCommandIcon {
+ position: absolute;
+ color: #00f;
+ top: 2px;
+ left: 6px;
+ display: inline;
+ font: 11px Monaco, monospace;
+ z-index: 10;
+}
+
+#fbCommandLine {
+ position: absolute;
+ width: 100%;
+ top: 0;
+ left: 0;
+ border: 0;
+ margin: 0;
+ padding: 2px 0 2px 32px;
+ font: 11px Monaco, monospace;
+ z-index: 9;
+ outline: none;
+}
+
+#fbLargeCommandLineIcon {
+ background: url(up.png) no-repeat;
+ position: absolute;
+ right: 1px;
+ bottom: 1px;
+ z-index: 10;
+}
+
+#fbLargeCommandLineIcon:hover {
+ background: url(upHover.png) no-repeat;
+}
+
+div.fbFitHeight {
+ overflow: auto;
+ position: relative;
+}
+
+
+/************************************************************************************************
+ Layout Controls
+*************************************************************************************************/
+
+/* fbToolbar buttons
+*************************************************************************************************/
+.fbSmallButton {
+ overflow: hidden;
+ width: 16px;
+ height: 16px;
+ display: block;
+ text-decoration: none;
+ cursor: default;
+}
+
+#fbWindowButtons .fbSmallButton {
+ float: right;
+}
+
+#fbWindow_btClose {
+ background: url(min.png);
+}
+
+#fbWindow_btClose:hover {
+ background: url(minHover.png);
+}
+
+#fbWindow_btDetach {
+ background: url(detach.png);
+}
+
+#fbWindow_btDetach:hover {
+ background: url(detachHover.png);
+}
+
+#fbWindow_btDeactivate {
+ background: url(off.png);
+}
+
+#fbWindow_btDeactivate:hover {
+ background: url(offHover.png);
+}
+
+
+/* fbPanelBarBox tabs
+*************************************************************************************************/
+.fbTab {
+ text-decoration: none;
+ display: none;
+ float: left;
+ width: auto;
+ float: left;
+ cursor: default;
+ font-family: Lucida Grande, Tahoma, sans-serif;
+ font-size: 11px;
+ line-height: 13px;
+ font-weight: bold;
+ height: 22px;
+ color: #565656;
+}
+
+.fbPanelBar span {
+ /*display: block; TODO: safe to remove this? */
+ float: left;
+}
+
+.fbPanelBar .fbTabL,.fbPanelBar .fbTabR {
+ height: 22px;
+ width: 8px;
+}
+
+.fbPanelBar .fbTabText {
+ padding: 4px 1px 0;
+}
+
+a.fbTab:hover {
+ background: url(sprite.png) 0 -73px;
+}
+
+a.fbTab:hover .fbTabL {
+ background: url(sprite.png) -16px -96px;
+}
+
+a.fbTab:hover .fbTabR {
+ background: url(sprite.png) -24px -96px;
+}
+
+.fbSelectedTab {
+ background: url(sprite.png) #f1f2ee 0 -50px !important;
+ color: #000;
+}
+
+.fbSelectedTab .fbTabL {
+ background: url(sprite.png) 0 -96px !important;
+}
+
+.fbSelectedTab .fbTabR {
+ background: url(sprite.png) -8px -96px !important;
+}
+
+/* splitters
+*************************************************************************************************/
+#fbHSplitter {
+ position: fixed;
+ _position: absolute;
+ left: 0;
+ top: 0;
+ width: 100%;
+ height: 5px;
+ overflow: hidden;
+ cursor: n-resize !important;
+ background: url(pixel_transparent.gif);
+ z-index: 9;
+}
+
+#fbHSplitter.fbOnMovingHSplitter {
+ height: 100%;
+ z-index: 100;
+}
+
+.fbVSplitter {
+ background: #ece9d8;
+ color: #000;
+ border: 1px solid #716f64;
+ border-width: 0 1px;
+ border-left-color: #aca899;
+ width: 4px;
+ cursor: e-resize;
+ overflow: hidden;
+ right: 294px;
+ text-decoration: none;
+ z-index: 10;
+ position: absolute;
+ height: 100%;
+ top: 27px;
+}
+
+/************************************************************************************************/
+div.lineNo {
+ font: 1em/1.4545em Monaco, monospace;
+ position: relative;
+ float: left;
+ top: 0;
+ left: 0;
+ margin: 0 5px 0 0;
+ padding: 0 5px 0 10px;
+ background: #eee;
+ color: #888;
+ border-right: 1px solid #ccc;
+ text-align: right;
+}
+
+.sourceBox {
+ position: absolute;
+}
+
+.sourceCode {
+ font: 1em Monaco, monospace;
+ overflow: hidden;
+ white-space: pre;
+ display: inline;
+}
+
+/************************************************************************************************/
+.nodeControl {
+ margin-top: 3px;
+ margin-left: -14px;
+ float: left;
+ width: 9px;
+ height: 9px;
+ overflow: hidden;
+ cursor: default;
+ background: url(tree_open.gif);
+ _float: none;
+ _display: inline;
+ _position: absolute;
+}
+
+div.nodeMaximized {
+ background: url(tree_close.gif);
+}
+
+div.objectBox-element {
+ padding: 1px 3px;
+}
+.objectBox-selector{
+ cursor: default;
+}
+
+.selectedElement{
+ background: highlight;
+ /* background: url(roundCorner.svg); Opera */
+ color: #fff !important;
+}
+.selectedElement span{
+ color: #fff !important;
+}
+
+/* IE6 need this hack */
+* html .selectedElement {
+ position: relative;
+}
+
+/* Webkit CSS Hack - bug in "highlight" named color */
+@media screen and (-webkit-min-device-pixel-ratio:0) {
+ .selectedElement{
+ background: #316AC5;
+ color: #fff !important;
+ }
+}
+
+/************************************************************************************************/
+/************************************************************************************************/
+.logRow * {
+ font-size: 1em;
+}
+
+/* TODO: remove this? */
+/* TODO: xxxpedro - IE need this in windowless mode (cnn.com) check if the issue is related to
+position. if so, override it at chrome.js initialization when creating the div */
+.logRow {
+ position: relative;
+ border-bottom: 1px solid #D7D7D7;
+ padding: 2px 4px 1px 6px;
+ zbackground-color: #FFFFFF;
+}
+/**/
+
+.logRow-command {
+ font-family: Monaco, monospace;
+ color: blue;
+}
+
+.objectBox-string,
+.objectBox-text,
+.objectBox-number,
+.objectBox-function,
+.objectLink-element,
+.objectLink-textNode,
+.objectLink-function,
+.objectBox-stackTrace,
+.objectLink-profile {
+ font-family: Monaco, monospace;
+}
+
+.objectBox-null {
+ padding: 0 2px;
+ border: 1px solid #666666;
+ background-color: #888888;
+ color: #FFFFFF;
+}
+
+.objectBox-string {
+ color: red;
+
+ /* TODO: xxxpedro make long strings break line */
+ /*white-space: pre; */
+}
+
+.objectBox-number {
+ color: #000088;
+}
+
+.objectBox-function {
+ color: DarkGreen;
+}
+
+.objectBox-object {
+ color: DarkGreen;
+ font-weight: bold;
+ font-family: Lucida Grande, sans-serif;
+}
+
+.objectBox-array {
+ color: #000;
+}
+
+/************************************************************************************************/
+.logRow-info,.logRow-error,.logRow-warn {
+ background: #fff no-repeat 2px 2px;
+ padding-left: 20px;
+ padding-bottom: 3px;
+}
+
+.logRow-info {
+ background-image: url(infoIcon.png) !important;
+ background-image: url(infoIcon.gif);
+}
+
+.logRow-warn {
+ background-color: cyan;
+ background-image: url(warningIcon.png) !important;
+ background-image: url(warningIcon.gif);
+}
+
+.logRow-error {
+ background-color: LightYellow;
+ background-image: url(errorIcon.png) !important;
+ background-image: url(errorIcon.gif);
+ color: #f00;
+}
+
+.errorMessage {
+ vertical-align: top;
+ color: #f00;
+}
+
+.objectBox-sourceLink {
+ position: absolute;
+ right: 4px;
+ top: 2px;
+ padding-left: 8px;
+ font-family: Lucida Grande, sans-serif;
+ font-weight: bold;
+ color: #0000FF;
+}
+
+/************************************************************************************************/
+/*
+//TODO: remove this when console2 is finished
+*/
+/*
+.logRow-group {
+ background: #EEEEEE;
+ border-bottom: none;
+}
+
+.logGroup {
+ background: #EEEEEE;
+}
+
+.logGroupBox {
+ margin-left: 24px;
+ border-top: 1px solid #D7D7D7;
+ border-left: 1px solid #D7D7D7;
+}/**/
+
+/************************************************************************************************/
+.selectorTag,.selectorId,.selectorClass {
+ font-family: Monaco, monospace;
+ font-weight: normal;
+}
+
+.selectorTag {
+ color: #0000FF;
+}
+
+.selectorId {
+ color: DarkBlue;
+}
+
+.selectorClass {
+ color: red;
+}
+
+/************************************************************************************************/
+.objectBox-element {
+ font-family: Monaco, monospace;
+ color: #000088;
+}
+
+.nodeChildren {
+ padding-left: 26px;
+}
+
+.nodeTag {
+ color: blue;
+ cursor: pointer;
+}
+
+.nodeValue {
+ color: #FF0000;
+ font-weight: normal;
+}
+
+.nodeText,.nodeComment {
+ margin: 0 2px;
+ vertical-align: top;
+}
+
+.nodeText {
+ color: #333333;
+ font-family: Monaco, monospace;
+}
+
+.nodeComment {
+ color: DarkGreen;
+}
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+.nodeHidden, .nodeHidden * {
+ color: #888888;
+}
+
+.nodeHidden .nodeTag {
+ color: #5F82D9;
+}
+
+.nodeHidden .nodeValue {
+ color: #D86060;
+}
+
+.selectedElement .nodeHidden, .selectedElement .nodeHidden * {
+ color: SkyBlue !important;
+}
+
+
+/************************************************************************************************/
+.log-object {
+ /*
+ _position: relative;
+ _height: 100%;
+ /**/
+}
+
+.property {
+ position: relative;
+ clear: both;
+ height: 15px;
+}
+
+.propertyNameCell {
+ vertical-align: top;
+ float: left;
+ width: 28%;
+ position: absolute;
+ left: 0;
+ z-index: 0;
+}
+
+.propertyValueCell {
+ float: right;
+ width: 68%;
+ background: #fff;
+ position: absolute;
+ padding-left: 5px;
+ display: table-cell;
+ right: 0;
+ z-index: 1;
+ /*
+ _position: relative;
+ /**/
+}
+
+.propertyName {
+ font-weight: bold;
+}
+
+.FirebugPopup {
+ height: 100% !important;
+}
+
+.FirebugPopup #fbWindowButtons {
+ display: none !important;
+}
+
+.FirebugPopup #fbHSplitter {
+ display: none !important;
+}
diff --git a/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/firebug.html b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/firebug.html
new file mode 100644
index 0000000..aa07809
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/firebug.html
@@ -0,0 +1,215 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/DTD/strict.dtd">
+<html>
+<head>
+<meta http-equiv="content-type" content="text/html; charset=utf-8">
+<title>Firebug Lite</title>
+<!-- An empty script to avoid FOUC when loading the stylesheet -->
+<script type="text/javascript"></script>
+<style type="text/css" media="screen">@import "firebug.css";</style>
+<style>html,body{margin:0;padding:0;overflow:hidden;}</style>
+</head>
+<body class="fbBody">
+<table id="fbChrome" cellpadding="0" cellspacing="0" border="0">
+ <tbody>
+ <tr>
+ <!-- Interface - Top Area -->
+ <td id="fbTop" colspan="2">
+
+ <!--
+ <div>
+ --><!-- <span id="fbToolbarErrors" class="fbErrors">2 errors</span> --><!--
+ <input type="text" id="fbToolbarSearch" />
+ </div>
+ -->
+
+ <!-- Window Buttons -->
+ <div id="fbWindowButtons">
+ <a id="fbWindow_btDeactivate" class="fbSmallButton fbHover" title="Deactivate Firebug for this web page"> </a>
+ <a id="fbWindow_btDetach" class="fbSmallButton fbHover" title="Open Firebug in popup window"> </a>
+ <a id="fbWindow_btClose" class="fbSmallButton fbHover" title="Minimize Firebug"> </a>
+ </div>
+
+ <!-- Toolbar buttons and Status Bar -->
+ <div id="fbToolbar">
+ <div id="fbToolbarContent">
+
+ <!-- Firebug Button -->
+ <span id="fbToolbarIcon">
+ <a id="fbFirebugButton" class="fbIconButton" class="fbHover" target="_blank"> </a>
+ </span>
+
+ <!--
+ <span id="fbLeftToolbarErrors" class="fbErrors">2 errors</span>
+ -->
+
+ <!-- Toolbar Buttons -->
+ <span id="fbToolbarButtons">
+ <!-- Fixed Toolbar Buttons -->
+ <span id="fbFixedButtons">
+ <a id="fbChrome_btInspect" class="fbButton fbHover" title="Click an element in the page to inspect">Inspect</a>
+ </span>
+
+ <!-- Console Panel Toolbar Buttons -->
+ <span id="fbConsoleButtons" class="fbToolbarButtons">
+ <a id="fbConsole_btClear" class="fbButton fbHover" title="Clear the console">Clear</a>
+ </span>
+
+ <!-- HTML Panel Toolbar Buttons -->
+ <!--
+ <span id="fbHTMLButtons" class="fbToolbarButtons">
+ <a id="fbHTML_btEdit" class="fbHover" title="Edit this HTML">Edit</a>
+ </span>
+ -->
+ </span>
+
+ <!-- Status Bar -->
+ <span id="fbStatusBarBox">
+ <span class="fbToolbarSeparator"></span>
+ <!-- HTML Panel Status Bar -->
+ <!--
+ <span id="fbHTMLStatusBar" class="fbStatusBar fbToolbarButtons">
+ </span>
+ -->
+ </span>
+
+ </div>
+
+ </div>
+
+ <!-- PanelBars -->
+ <div id="fbPanelBarBox">
+
+ <!-- Main PanelBar -->
+ <div id="fbPanelBar1" class="fbPanelBar">
+ <a id="fbConsoleTab" class="fbTab fbHover">
+ <span class="fbTabL"></span>
+ <span class="fbTabText">Console</span>
+ <span class="fbTabMenuTarget"></span>
+ <span class="fbTabR"></span>
+ </a>
+ <a id="fbHTMLTab" class="fbTab fbHover">
+ <span class="fbTabL"></span>
+ <span class="fbTabText">HTML</span>
+ <span class="fbTabR"></span>
+ </a>
+ <a class="fbTab fbHover">
+ <span class="fbTabL"></span>
+ <span class="fbTabText">CSS</span>
+ <span class="fbTabR"></span>
+ </a>
+ <a class="fbTab fbHover">
+ <span class="fbTabL"></span>
+ <span class="fbTabText">Script</span>
+ <span class="fbTabR"></span>
+ </a>
+ <a class="fbTab fbHover">
+ <span class="fbTabL"></span>
+ <span class="fbTabText">DOM</span>
+ <span class="fbTabR"></span>
+ </a>
+ </div>
+
+ <!-- Side PanelBars -->
+ <div id="fbPanelBar2Box" class="hide">
+ <div id="fbPanelBar2" class="fbPanelBar">
+ <!--
+ <a class="fbTab fbHover">
+ <span class="fbTabL"></span>
+ <span class="fbTabText">Style</span>
+ <span class="fbTabR"></span>
+ </a>
+ <a class="fbTab fbHover">
+ <span class="fbTabL"></span>
+ <span class="fbTabText">Layout</span>
+ <span class="fbTabR"></span>
+ </a>
+ <a class="fbTab fbHover">
+ <span class="fbTabL"></span>
+ <span class="fbTabText">DOM</span>
+ <span class="fbTabR"></span>
+ </a>
+ -->
+ </div>
+ </div>
+
+ </div>
+
+ <!-- Horizontal Splitter -->
+ <div id="fbHSplitter"> </div>
+
+ </td>
+ </tr>
+
+ <!-- Interface - Main Area -->
+ <tr id="fbContent">
+
+ <!-- Panels -->
+ <td id="fbPanelBox1">
+ <div id="fbPanel1" class="fbFitHeight">
+ <div id="fbConsole" class="fbPanel"></div>
+ <div id="fbHTML" class="fbPanel"></div>
+ </div>
+ </td>
+
+ <!-- Side Panel Box -->
+ <td id="fbPanelBox2" class="hide">
+
+ <!-- VerticalSplitter -->
+ <div id="fbVSplitter" class="fbVSplitter"> </div>
+
+ <!-- Side Panels -->
+ <div id="fbPanel2" class="fbFitHeight">
+
+ <!-- HTML Side Panels -->
+ <div id="fbHTML_Style" class="fbPanel"></div>
+ <div id="fbHTML_Layout" class="fbPanel"></div>
+ <div id="fbHTML_DOM" class="fbPanel"></div>
+
+ </div>
+
+ <!-- Large Command Line -->
+ <textarea id="fbLargeCommandLine" class="fbFitHeight"></textarea>
+
+ <!-- Large Command Line Buttons -->
+ <div id="fbLargeCommandButtons">
+ <a id="fbCommand_btRun" class="fbButton fbHover">Run</a>
+ <a id="fbCommand_btClear" class="fbButton fbHover">Clear</a>
+
+ <a id="fbSmallCommandLineIcon" class="fbSmallButton fbHover"></a>
+ </div>
+
+ </td>
+
+ </tr>
+
+ <!-- Interface - Bottom Area -->
+ <tr id="fbBottom" class="hide">
+
+ <!-- Command Line -->
+ <td id="fbCommand" colspan="2">
+ <div id="fbCommandBox">
+ <div id="fbCommandIcon">>>></div>
+ <input id="fbCommandLine" name="fbCommandLine" type="text" />
+ <a id="fbLargeCommandLineIcon" class="fbSmallButton fbHover"></a>
+ </div>
+ </td>
+
+ </tr>
+
+ </tbody>
+</table>
+<span id="fbMiniChrome">
+ <span id="fbMiniContent">
+ <span id="fbMiniIcon" title="Open Firebug Lite"></span>
+ <span id="fbMiniErrors" class="fbErrors"><!-- 2 errors --></span>
+ </span>
+</span>
+<!--
+<div id="fbErrorPopup">
+ <div id="fbErrorPopupContent">
+ <div id="fbErrorIndicator" class="fbErrors">2 errors</div>
+ </div>
+</div>
+ -->
+</body>
+</html>
\ No newline at end of file
diff --git a/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/firebug.png b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/firebug.png
new file mode 100644
index 0000000..e10affe
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/firebug.png
Binary files differ
diff --git a/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/group.gif b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/group.gif
new file mode 100644
index 0000000..8db97c2
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/group.gif
Binary files differ
diff --git a/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/html.css b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/html.css
new file mode 100644
index 0000000..5b7c5f4
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/html.css
@@ -0,0 +1,272 @@
+/* See license.txt for terms of usage */
+
+.panelNode-html {
+ -moz-box-sizing: padding-box;
+ padding: 4px 0 0 2px;
+}
+
+.nodeBox {
+ position: relative;
+ font-family: Monaco, monospace;
+ padding-left: 13px;
+ -moz-user-select: -moz-none;
+}
+.nodeBox.search-selection {
+ -moz-user-select: text;
+}
+.twisty {
+ position: absolute;
+ left: 0px;
+ top: 0px;
+ width: 14px;
+ height: 14px;
+}
+
+.nodeChildBox {
+ margin-left: 12px;
+ display: none;
+}
+
+.nodeLabel,
+.nodeCloseLabel {
+ margin: -2px 2px 0 2px;
+ border: 2px solid transparent;
+ -moz-border-radius: 3px;
+ padding: 0 2px;
+ color: #000088;
+}
+
+.nodeCloseLabel {
+ display: none;
+}
+
+.nodeTag {
+ cursor: pointer;
+ color: blue;
+}
+
+.nodeValue {
+ color: #FF0000;
+ font-weight: normal;
+}
+
+.nodeText,
+.nodeComment {
+ margin: 0 2px;
+ vertical-align: top;
+}
+
+.nodeText {
+ color: #333333;
+}
+
+.nodeWhiteSpace {
+ border: 1px solid LightGray;
+ white-space: pre; /* otherwise the border will be collapsed around zero pixels */
+ margin-left: 1px;
+ color: gray;
+}
+
+
+.nodeWhiteSpace_Space {
+ border: 1px solid #ddd;
+}
+
+.nodeTextEntity {
+ border: 1px solid gray;
+ white-space: pre; /* otherwise the border will be collapsed around zero pixels */
+ margin-left: 1px;
+}
+
+.nodeComment {
+ color: DarkGreen;
+}
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+.nodeBox.highlightOpen > .nodeLabel {
+ background-color: #EEEEEE;
+}
+
+.nodeBox.highlightOpen > .nodeCloseLabel,
+.nodeBox.highlightOpen > .nodeChildBox,
+.nodeBox.open > .nodeCloseLabel,
+.nodeBox.open > .nodeChildBox {
+ display: block;
+}
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+.nodeBox.selected > .nodeLabel > .nodeLabelBox,
+.nodeBox.selected > .nodeLabel {
+ border-color: Highlight;
+ background-color: Highlight;
+ color: HighlightText !important;
+}
+
+.nodeBox.selected > .nodeLabel > .nodeLabelBox,
+.nodeBox.selected > .nodeLabel > .nodeLabelBox > .nodeTag,
+.nodeBox.selected > .nodeLabel > .nodeLabelBox > .nodeAttr > .nodeValue,
+.nodeBox.selected > .nodeLabel > .nodeLabelBox > .nodeText {
+ color: inherit !important;
+}
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+.nodeBox.highlighted > .nodeLabel {
+ border-color: Highlight !important;
+ background-color: cyan !important;
+ color: #000000 !important;
+}
+
+.nodeBox.highlighted > .nodeLabel > .nodeLabelBox,
+.nodeBox.highlighted > .nodeLabel > .nodeLabelBox > .nodeTag,
+.nodeBox.highlighted > .nodeLabel > .nodeLabelBox > .nodeAttr > .nodeValue,
+.nodeBox.highlighted > .nodeLabel > .nodeLabelBox > .nodeText {
+ color: #000000 !important;
+}
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+.nodeBox.nodeHidden .nodeLabel > .nodeLabelBox,
+.nodeBox.nodeHidden .nodeCloseLabel,
+.nodeBox.nodeHidden .nodeLabel > .nodeLabelBox > .nodeText,
+.nodeBox.nodeHidden .nodeText {
+ color: #888888;
+}
+
+.nodeBox.nodeHidden .nodeLabel > .nodeLabelBox > .nodeTag,
+.nodeBox.nodeHidden .nodeCloseLabel > .nodeCloseLabelBox > .nodeTag {
+ color: #5F82D9;
+}
+
+.nodeBox.nodeHidden .nodeLabel > .nodeLabelBox > .nodeAttr > .nodeValue {
+ color: #D86060;
+}
+
+.nodeBox.nodeHidden.selected > .nodeLabel > .nodeLabelBox,
+.nodeBox.nodeHidden.selected > .nodeLabel > .nodeLabelBox > .nodeTag,
+.nodeBox.nodeHidden.selected > .nodeLabel > .nodeLabelBox > .nodeAttr > .nodeValue,
+.nodeBox.nodeHidden.selected > .nodeLabel > .nodeLabelBox > .nodeText {
+ color: SkyBlue !important;
+}
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+.nodeBox.mutated > .nodeLabel,
+.nodeAttr.mutated,
+.nodeValue.mutated,
+.nodeText.mutated,
+.nodeBox.mutated > .nodeText {
+ background-color: #EFFF79;
+ color: #FF0000 !important;
+}
+
+.nodeBox.selected.mutated > .nodeLabel,
+.nodeBox.selected.mutated > .nodeLabel > .nodeLabelBox,
+.nodeBox.selected > .nodeLabel > .nodeLabelBox > .nodeAttr.mutated > .nodeValue,
+.nodeBox.selected > .nodeLabel > .nodeLabelBox > .nodeAttr > .nodeValue.mutated,
+.nodeBox.selected > .nodeLabel > .nodeLabelBox > .nodeText.mutated {
+ background-color: #EFFF79;
+ border-color: #EFFF79;
+ color: #FF0000 !important;
+}
+
+/************************************************************************************************/
+
+.logRow-dirxml {
+ padding-left: 0;
+}
+
+.soloElement > .nodeBox {
+ padding-left: 0;
+}
+
+.useA11y .nodeLabel.focused {
+ outline: 2px solid #FF9933;
+ -moz-outline-radius: 3px;
+ outline-offset: -2px;
+}
+
+.useA11y .nodeLabelBox:focus {
+ outline: none;
+}
+
+/************************************************************************************************/
+
+.breakpointCode .twisty {
+ display: none;
+}
+
+.breakpointCode .nodeBox.containerNodeBox,
+.breakpointCode .nodeLabel {
+ padding-left: 0px;
+ margin-left: 0px;
+ font-family: Monaco, monospace !important;
+}
+
+.breakpointCode .nodeTag,
+.breakpointCode .nodeAttr,
+.breakpointCode .nodeText,
+.breakpointCode .nodeValue,
+.breakpointCode .nodeLabel {
+ color: DarkGreen !important;
+}
+
+.breakpointMutationType {
+ position: absolute;
+ top: 4px;
+ right: 20px;
+ color: gray;
+}
+
+
+
+
+
+
+/************************************************************************************************/
+/************************************************************************************************/
+/************************************************************************************************/
+/************************************************************************************************/
+/************************************************************************************************/
+/************************************************************************************************/
+/************************************************************************************************/
+/************************************************************************************************/
+/************************************************************************************************/
+/************************************************************************************************/
+
+
+
+/************************************************************************************************/
+/* Twisties */
+
+.twisty,
+.logRow-errorMessage > .hasTwisty > .errorTitle,
+.logRow-log > .objectBox-array.hasTwisty,
+.logRow-spy .spyHead .spyTitle,
+.logGroup > .logRow,
+.memberRow.hasChildren > .memberLabelCell > .memberLabel,
+.hasHeaders .netHrefLabel,
+.netPageRow > .netCol > .netPageTitle {
+ background-image: url(twistyClosed.png);
+ background-repeat: no-repeat;
+ background-position: 2px 2px;
+ min-height: 12px;
+}
+
+.logRow-errorMessage > .hasTwisty.opened > .errorTitle,
+.logRow-log > .objectBox-array.hasTwisty.opened,
+.logRow-spy.opened .spyHead .spyTitle,
+.logGroup.opened > .logRow,
+.memberRow.hasChildren.opened > .memberLabelCell > .memberLabel,
+.nodeBox.highlightOpen > .nodeLabel > .twisty,
+.nodeBox.open > .nodeLabel > .twisty,
+.netRow.opened > .netCol > .netHrefLabel,
+.netPageRow.opened > .netCol > .netPageTitle {
+ background-image: url(twistyOpen.png);
+}
+
+.twisty {
+ background-position: 4px 4px;
+}
\ No newline at end of file
diff --git a/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/infoIcon.gif b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/infoIcon.gif
new file mode 100644
index 0000000..0618e20
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/infoIcon.gif
Binary files differ
diff --git a/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/infoIcon.png b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/infoIcon.png
new file mode 100644
index 0000000..da1e533
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/infoIcon.png
Binary files differ
diff --git a/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/loading_16.gif b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/loading_16.gif
new file mode 100644
index 0000000..085ccae
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/loading_16.gif
Binary files differ
diff --git a/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/min.png b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/min.png
new file mode 100644
index 0000000..1034d66
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/min.png
Binary files differ
diff --git a/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/minHover.png b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/minHover.png
new file mode 100644
index 0000000..b0d1e1a
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/minHover.png
Binary files differ
diff --git a/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/off.png b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/off.png
new file mode 100644
index 0000000..b70b1d2
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/off.png
Binary files differ
diff --git a/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/offHover.png b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/offHover.png
new file mode 100644
index 0000000..f3670f1
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/offHover.png
Binary files differ
diff --git a/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/pixel_transparent.gif b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/pixel_transparent.gif
new file mode 100644
index 0000000..6865c96
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/pixel_transparent.gif
Binary files differ
diff --git a/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/roundCorner.svg b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/roundCorner.svg
new file mode 100644
index 0000000..2dfa728
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/roundCorner.svg
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg xmlns="http://www.w3.org/2000/svg">
+ <rect fill="white" x="0" y="0" width="100%" height="100%" />
+ <rect fill="highlight" x="0" y="0" width="100%" height="100%" rx="2px"/>
+</svg>
+
diff --git a/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/search.gif b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/search.gif
new file mode 100644
index 0000000..2a62098
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/search.gif
Binary files differ
diff --git a/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/search.png b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/search.png
new file mode 100644
index 0000000..fba33b8
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/search.png
Binary files differ
diff --git a/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/shadow.gif b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/shadow.gif
new file mode 100644
index 0000000..af7f537
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/shadow.gif
Binary files differ
diff --git a/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/shadow2.gif b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/shadow2.gif
new file mode 100644
index 0000000..099cbf3
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/shadow2.gif
Binary files differ
diff --git a/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/shadowAlpha.png b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/shadowAlpha.png
new file mode 100644
index 0000000..a2561df
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/shadowAlpha.png
Binary files differ
diff --git a/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/sprite.png b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/sprite.png
new file mode 100644
index 0000000..33d2c4d
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/sprite.png
Binary files differ
diff --git a/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/tabHoverLeft.png b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/tabHoverLeft.png
new file mode 100644
index 0000000..0fb24d0
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/tabHoverLeft.png
Binary files differ
diff --git a/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/tabHoverMid.png b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/tabHoverMid.png
new file mode 100644
index 0000000..fbccab5
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/tabHoverMid.png
Binary files differ
diff --git a/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/tabHoverRight.png b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/tabHoverRight.png
new file mode 100644
index 0000000..3db0f36
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/tabHoverRight.png
Binary files differ
diff --git a/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/tabLeft.png b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/tabLeft.png
new file mode 100644
index 0000000..a6cc9e9
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/tabLeft.png
Binary files differ
diff --git a/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/tabMenuCheckbox.png b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/tabMenuCheckbox.png
new file mode 100644
index 0000000..4726e62
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/tabMenuCheckbox.png
Binary files differ
diff --git a/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/tabMenuPin.png b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/tabMenuPin.png
new file mode 100644
index 0000000..eb4b11e
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/tabMenuPin.png
Binary files differ
diff --git a/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/tabMenuRadio.png b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/tabMenuRadio.png
new file mode 100644
index 0000000..55b982d
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/tabMenuRadio.png
Binary files differ
diff --git a/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/tabMenuTarget.png b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/tabMenuTarget.png
new file mode 100644
index 0000000..957bd9f
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/tabMenuTarget.png
Binary files differ
diff --git a/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/tabMenuTargetHover.png b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/tabMenuTargetHover.png
new file mode 100644
index 0000000..200a370
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/tabMenuTargetHover.png
Binary files differ
diff --git a/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/tabMid.png b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/tabMid.png
new file mode 100644
index 0000000..68986c3
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/tabMid.png
Binary files differ
diff --git a/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/tabRight.png b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/tabRight.png
new file mode 100644
index 0000000..5011307
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/tabRight.png
Binary files differ
diff --git a/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/textEditorBorders.gif b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/textEditorBorders.gif
new file mode 100644
index 0000000..0ee5497
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/textEditorBorders.gif
Binary files differ
diff --git a/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/textEditorBorders.png b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/textEditorBorders.png
new file mode 100644
index 0000000..21682c3
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/textEditorBorders.png
Binary files differ
diff --git a/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/textEditorCorners.gif b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/textEditorCorners.gif
new file mode 100644
index 0000000..04f8421
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/textEditorCorners.gif
Binary files differ
diff --git a/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/textEditorCorners.png b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/textEditorCorners.png
new file mode 100644
index 0000000..a0f839d
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/textEditorCorners.png
Binary files differ
diff --git a/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/titlebarMid.png b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/titlebarMid.png
new file mode 100644
index 0000000..10998ae
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/titlebarMid.png
Binary files differ
diff --git a/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/toolbarMid.png b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/toolbarMid.png
new file mode 100644
index 0000000..aa21dee
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/toolbarMid.png
Binary files differ
diff --git a/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/tree_close.gif b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/tree_close.gif
new file mode 100644
index 0000000..e26728a
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/tree_close.gif
Binary files differ
diff --git a/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/tree_open.gif b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/tree_open.gif
new file mode 100644
index 0000000..edf662f
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/tree_open.gif
Binary files differ
diff --git a/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/twistyClosed.png b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/twistyClosed.png
new file mode 100644
index 0000000..f80319b
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/twistyClosed.png
Binary files differ
diff --git a/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/twistyOpen.png b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/twistyOpen.png
new file mode 100644
index 0000000..8680124
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/twistyOpen.png
Binary files differ
diff --git a/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/up.png b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/up.png
new file mode 100644
index 0000000..2174d03
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/up.png
Binary files differ
diff --git a/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/upActive.png b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/upActive.png
new file mode 100644
index 0000000..236cf67
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/upActive.png
Binary files differ
diff --git a/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/upHover.png b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/upHover.png
new file mode 100644
index 0000000..cd81317
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/upHover.png
Binary files differ
diff --git a/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/warningIcon.gif b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/warningIcon.gif
new file mode 100644
index 0000000..8497278
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/warningIcon.gif
Binary files differ
diff --git a/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/warningIcon.png b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/warningIcon.png
new file mode 100644
index 0000000..de51084
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/skin/xp/warningIcon.png
Binary files differ
diff --git a/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/src/firebug-lite-debug.js b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/src/firebug-lite-debug.js
new file mode 100644
index 0000000..40b1ae7
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/firebug-lite/src/firebug-lite-debug.js
@@ -0,0 +1,31176 @@
+(function(){
+
+/*!*************************************************************
+ *
+ * Firebug Lite 1.4.0
+ *
+ * Copyright (c) 2007, Parakey Inc.
+ * Released under BSD license.
+ * More information: http://getfirebug.com/firebuglite
+ *
+ **************************************************************/
+
+/*!
+ * CSS selectors powered by:
+ *
+ * Sizzle CSS Selector Engine - v1.0
+ * Copyright 2009, The Dojo Foundation
+ * Released under the MIT, BSD, and GPL Licenses.
+ * More information: http://sizzlejs.com/
+ */
+
+/** @namespace describe lib */
+
+// FIXME: xxxpedro if we use "var FBL = {}" the FBL won't appear in the DOM Panel in IE
+var FBL = {};
+
+( /** @scope s_lib @this FBL */ function() {
+// ************************************************************************************************
+
+// ************************************************************************************************
+// Constants
+
+var productionDir = "http://getfirebug.com/releases/lite/";
+var bookmarkletVersion = 4;
+
+// ************************************************************************************************
+
+var reNotWhitespace = /[^\s]/;
+var reSplitFile = /:\/{1,3}(.*?)\/([^\/]*?)\/?($|\?.*)/;
+
+// Globals
+this.reJavascript = /\s*javascript:\s*(.*)/;
+this.reChrome = /chrome:\/\/([^\/]*)\//;
+this.reFile = /file:\/\/([^\/]*)\//;
+
+
+// ************************************************************************************************
+// properties
+
+var userAgent = navigator.userAgent.toLowerCase();
+this.isFirefox = /firefox/.test(userAgent);
+this.isOpera = /opera/.test(userAgent);
+this.isSafari = /webkit/.test(userAgent);
+this.isIE = /msie/.test(userAgent) && !/opera/.test(userAgent);
+this.isIE6 = /msie 6/i.test(navigator.appVersion);
+this.browserVersion = (userAgent.match( /.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/ ) || [0,'0'])[1];
+this.isIElt8 = this.isIE && (this.browserVersion-0 < 8);
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+this.NS = null;
+this.pixelsPerInch = null;
+
+
+// ************************************************************************************************
+// Namespaces
+
+var namespaces = [];
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+this.ns = function(fn)
+{
+ var ns = {};
+ namespaces.push(fn, ns);
+ return ns;
+};
+
+var FBTrace = null;
+
+this.initialize = function()
+{
+ // Firebug Lite is already running in persistent mode so we just quit
+ if (window.firebug && firebug.firebuglite || window.console && console.firebuglite)
+ return;
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ // initialize environment
+
+ // point the FBTrace object to the local variable
+ if (FBL.FBTrace)
+ FBTrace = FBL.FBTrace;
+ else
+ FBTrace = FBL.FBTrace = {};
+
+ // check if the actual window is a persisted chrome context
+ var isChromeContext = window.Firebug && typeof window.Firebug.SharedEnv == "object";
+
+ // chrome context of the persistent application
+ if (isChromeContext)
+ {
+ // TODO: xxxpedro persist - make a better synchronization
+ sharedEnv = window.Firebug.SharedEnv;
+ delete window.Firebug.SharedEnv;
+
+ FBL.Env = sharedEnv;
+ FBL.Env.isChromeContext = true;
+ FBTrace.messageQueue = FBL.Env.traceMessageQueue;
+ }
+ // non-persistent application
+ else
+ {
+ FBL.NS = document.documentElement.namespaceURI;
+ FBL.Env.browser = window;
+ FBL.Env.destroy = destroyEnvironment;
+
+ if (document.documentElement.getAttribute("debug") == "true")
+ FBL.Env.Options.startOpened = true;
+
+ // find the URL location of the loaded application
+ findLocation();
+
+ // TODO: get preferences here...
+ // The problem is that we don't have the Firebug object yet, so we can't use
+ // Firebug.loadPrefs. We're using the Store module directly instead.
+ var prefs = FBL.Store.get("FirebugLite") || {};
+ FBL.Env.DefaultOptions = FBL.Env.Options;
+ FBL.Env.Options = FBL.extend(FBL.Env.Options, prefs.options || {});
+
+ if (FBL.isFirefox &&
+ typeof FBL.Env.browser.console == "object" &&
+ FBL.Env.browser.console.firebug &&
+ FBL.Env.Options.disableWhenFirebugActive)
+ return;
+ }
+
+ // exposes the FBL to the global namespace when in debug mode
+ if (FBL.Env.isDebugMode)
+ {
+ FBL.Env.browser.FBL = FBL;
+ }
+
+ // check browser compatibilities
+ this.isQuiksMode = FBL.Env.browser.document.compatMode == "BackCompat";
+ this.isIEQuiksMode = this.isIE && this.isQuiksMode;
+ this.isIEStantandMode = this.isIE && !this.isQuiksMode;
+
+ this.noFixedPosition = this.isIE6 || this.isIEQuiksMode;
+
+ // after creating/synchronizing the environment, initialize the FBTrace module
+ if (FBL.Env.Options.enableTrace) FBTrace.initialize();
+
+ if (FBTrace.DBG_INITIALIZE && isChromeContext) FBTrace.sysout("FBL.initialize - persistent application", "initialize chrome context");
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ // initialize namespaces
+
+ if (FBTrace.DBG_INITIALIZE) FBTrace.sysout("FBL.initialize", namespaces.length/2+" namespaces BEGIN");
+
+ for (var i = 0; i < namespaces.length; i += 2)
+ {
+ var fn = namespaces[i];
+ var ns = namespaces[i+1];
+ fn.apply(ns);
+ }
+
+ if (FBTrace.DBG_INITIALIZE) {
+ FBTrace.sysout("FBL.initialize", namespaces.length/2+" namespaces END");
+ FBTrace.sysout("FBL waitForDocument", "waiting document load");
+ }
+
+ FBL.Ajax.initialize();
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ // finish environment initialization
+ FBL.Firebug.loadPrefs();
+
+ if (FBL.Env.Options.enablePersistent)
+ {
+ // TODO: xxxpedro persist - make a better synchronization
+ if (isChromeContext)
+ {
+ FBL.FirebugChrome.clone(FBL.Env.FirebugChrome);
+ }
+ else
+ {
+ FBL.Env.FirebugChrome = FBL.FirebugChrome;
+ FBL.Env.traceMessageQueue = FBTrace.messageQueue;
+ }
+ }
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ // wait document load
+
+ waitForDocument();
+};
+
+var waitForDocument = function waitForDocument()
+{
+ // document.body not available in XML+XSL documents in Firefox
+ var doc = FBL.Env.browser.document;
+ var body = doc.getElementsByTagName("body")[0];
+
+ if (body)
+ {
+ calculatePixelsPerInch(doc, body);
+ onDocumentLoad();
+ }
+ else
+ setTimeout(waitForDocument, 50);
+};
+
+var onDocumentLoad = function onDocumentLoad()
+{
+ if (FBTrace.DBG_INITIALIZE) FBTrace.sysout("FBL onDocumentLoad", "document loaded");
+
+ // fix IE6 problem with cache of background images, causing a lot of flickering
+ if (FBL.isIE6)
+ fixIE6BackgroundImageCache();
+
+ // chrome context of the persistent application
+ if (FBL.Env.Options.enablePersistent && FBL.Env.isChromeContext)
+ {
+ // finally, start the application in the chrome context
+ FBL.Firebug.initialize();
+
+ // if is not development mode, remove the shared environment cache object
+ // used to synchronize the both persistent contexts
+ if (!FBL.Env.isDevelopmentMode)
+ {
+ sharedEnv.destroy();
+ sharedEnv = null;
+ }
+ }
+ // non-persistent application
+ else
+ {
+ FBL.FirebugChrome.create();
+ }
+};
+
+// ************************************************************************************************
+// Env
+
+var sharedEnv;
+
+this.Env =
+{
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ // Env Options (will be transported to Firebug options)
+ Options:
+ {
+ saveCookies: true,
+
+ saveWindowPosition: false,
+ saveCommandLineHistory: false,
+
+ startOpened: false,
+ startInNewWindow: false,
+ showIconWhenHidden: true,
+
+ overrideConsole: true,
+ ignoreFirebugElements: true,
+ disableWhenFirebugActive: true,
+
+ disableXHRListener: false,
+ disableResourceFetching: false,
+
+ enableTrace: false,
+ enablePersistent: false
+
+ },
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ // Library location
+ Location:
+ {
+ sourceDir: null,
+ baseDir: null,
+ skinDir: null,
+ skin: null,
+ app: null
+ },
+
+ skin: "xp",
+ useLocalSkin: false,
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ // Env states
+ isDevelopmentMode: false,
+ isDebugMode: false,
+ isChromeContext: false,
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ // Env references
+ browser: null,
+ chrome: null
+};
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+var destroyEnvironment = function destroyEnvironment()
+{
+ setTimeout(function()
+ {
+ FBL = null;
+ }, 100);
+};
+
+// ************************************************************************************************
+// Library location
+
+var findLocation = function findLocation()
+{
+ var reFirebugFile = /(firebug-lite(?:-\w+)?(?:\.js|\.jgz))(?:#(.+))?$/;
+ var reGetFirebugSite = /(?:http|https):\/\/getfirebug.com\//;
+ var isGetFirebugSite;
+
+ var rePath = /^(.*\/)/;
+ var reProtocol = /^\w+:\/\//;
+ var path = null;
+ var doc = document;
+
+ // Firebug Lite 1.3.0 bookmarklet identification
+ var script = doc.getElementById("FirebugLite");
+
+ var scriptSrc;
+ var hasSrcAttribute = true;
+
+ // If the script was loaded via bookmarklet, we already have the script tag
+ if (script)
+ {
+ scriptSrc = script.src;
+ file = reFirebugFile.exec(scriptSrc);
+
+ var version = script.getAttribute("FirebugLite");
+ var number = version ? parseInt(version) : 0;
+
+ if (!version || !number || number < bookmarkletVersion)
+ {
+ FBL.Env.bookmarkletOutdated = true;
+ }
+ }
+ // otherwise we must search for the correct script tag
+ else
+ {
+ for(var i=0, s=doc.getElementsByTagName("script"), si; si=s[i]; i++)
+ {
+ var file = null;
+ if ( si.nodeName.toLowerCase() == "script" )
+ {
+ if (file = reFirebugFile.exec(si.getAttribute("firebugSrc")))
+ {
+ scriptSrc = si.getAttribute("firebugSrc");
+ hasSrcAttribute = false;
+ }
+ else if (file = reFirebugFile.exec(si.src))
+ {
+ scriptSrc = si.src;
+ }
+ else
+ continue;
+
+ script = si;
+ break;
+ }
+ }
+ }
+
+ // mark the script tag to be ignored by Firebug Lite
+ if (script)
+ script.firebugIgnore = true;
+
+ if (file)
+ {
+ var fileName = file[1];
+ var fileOptions = file[2];
+
+ // absolute path
+ if (reProtocol.test(scriptSrc)) {
+ path = rePath.exec(scriptSrc)[1];
+
+ }
+ // relative path
+ else
+ {
+ var r = rePath.exec(scriptSrc);
+ var src = r ? r[1] : scriptSrc;
+ var backDir = /^((?:\.\.\/)+)(.*)/.exec(src);
+ var reLastDir = /^(.*\/)[^\/]+\/$/;
+ path = rePath.exec(location.href)[1];
+
+ // "../some/path"
+ if (backDir)
+ {
+ var j = backDir[1].length/3;
+ var p;
+ while (j-- > 0)
+ path = reLastDir.exec(path)[1];
+
+ path += backDir[2];
+ }
+
+ else if(src.indexOf("/") != -1)
+ {
+ // "./some/path"
+ if(/^\.\/./.test(src))
+ {
+ path += src.substring(2);
+ }
+ // "/some/path"
+ else if(/^\/./.test(src))
+ {
+ var domain = /^(\w+:\/\/[^\/]+)/.exec(path);
+ path = domain[1] + src;
+ }
+ // "some/path"
+ else
+ {
+ path += src;
+ }
+ }
+ }
+ }
+
+ FBL.Env.isChromeExtension = script && script.getAttribute("extension") == "Chrome";
+ if (FBL.Env.isChromeExtension)
+ {
+ path = productionDir;
+ FBL.Env.bookmarkletOutdated = false;
+ script = {innerHTML: "{showIconWhenHidden:false}"};
+ }
+
+ isGetFirebugSite = reGetFirebugSite.test(path);
+
+ if (isGetFirebugSite && path.indexOf("/releases/lite/") == -1)
+ {
+ // See Issue 4587 - If we are loading the script from getfirebug.com shortcut, like
+ // https://getfirebug.com/firebug-lite.js, then we must manually add the full path,
+ // otherwise the Env.Location will hold the wrong path, which will in turn lead to
+ // undesirable effects like the problem in Issue 4587
+ path += "releases/lite/" + (fileName == "firebug-lite-beta.js" ? "beta/" : "latest/");
+ }
+
+ var m = path && path.match(/([^\/]+)\/$/) || null;
+
+ if (path && m)
+ {
+ var Env = FBL.Env;
+
+ // Always use the local skin when running in the same domain
+ // See Issue 3554: Firebug Lite should use local images when loaded locally
+ Env.useLocalSkin = path.indexOf(location.protocol + "//" + location.host + "/") == 0 &&
+ // but we cannot use the locan skin when loaded from getfirebug.com, otherwise
+ // the bookmarklet won't work when visiting getfirebug.com
+ !isGetFirebugSite;
+
+ // detecting development and debug modes via file name
+ if (fileName == "firebug-lite-dev.js")
+ {
+ Env.isDevelopmentMode = true;
+ Env.isDebugMode = true;
+ }
+ else if (fileName == "firebug-lite-debug.js")
+ {
+ Env.isDebugMode = true;
+ }
+
+ // process the <html debug="true">
+ if (Env.browser.document.documentElement.getAttribute("debug") == "true")
+ {
+ Env.Options.startOpened = true;
+ }
+
+ // process the Script URL Options
+ if (fileOptions)
+ {
+ var options = fileOptions.split(",");
+
+ for (var i = 0, length = options.length; i < length; i++)
+ {
+ var option = options[i];
+ var name, value;
+
+ if (option.indexOf("=") != -1)
+ {
+ var parts = option.split("=");
+ name = parts[0];
+ value = eval(unescape(parts[1]));
+ }
+ else
+ {
+ name = option;
+ value = true;
+ }
+
+ if (name == "debug")
+ {
+ Env.isDebugMode = !!value;
+ }
+ else if (name in Env.Options)
+ {
+ Env.Options[name] = value;
+ }
+ else
+ {
+ Env[name] = value;
+ }
+ }
+ }
+
+ // process the Script JSON Options
+ if (hasSrcAttribute)
+ {
+ var innerOptions = FBL.trim(script.innerHTML);
+ if (innerOptions)
+ {
+ var innerOptionsObject = eval("(" + innerOptions + ")");
+
+ for (var name in innerOptionsObject)
+ {
+ var value = innerOptionsObject[name];
+
+ if (name == "debug")
+ {
+ Env.isDebugMode = !!value;
+ }
+ else if (name in Env.Options)
+ {
+ Env.Options[name] = value;
+ }
+ else
+ {
+ Env[name] = value;
+ }
+ }
+ }
+ }
+
+ if (!Env.Options.saveCookies)
+ FBL.Store.remove("FirebugLite");
+
+ // process the Debug Mode
+ if (Env.isDebugMode)
+ {
+ Env.Options.startOpened = true;
+ Env.Options.enableTrace = true;
+ Env.Options.disableWhenFirebugActive = false;
+ }
+
+ var loc = Env.Location;
+ var isProductionRelease = path.indexOf(productionDir) != -1;
+
+ loc.sourceDir = path;
+ loc.baseDir = path.substr(0, path.length - m[1].length - 1);
+ loc.skinDir = (isProductionRelease ? path : loc.baseDir) + "skin/" + Env.skin + "/";
+ loc.skin = loc.skinDir + "firebug.html";
+ loc.app = path + fileName;
+ }
+ else
+ {
+ throw new Error("Firebug Error: Library path not found");
+ }
+};
+
+// ************************************************************************************************
+// Basics
+
+this.bind = function() // fn, thisObject, args => thisObject.fn(args, arguments);
+{
+ var args = cloneArray(arguments), fn = args.shift(), object = args.shift();
+ return function() { return fn.apply(object, arrayInsert(cloneArray(args), 0, arguments)); };
+};
+
+this.bindFixed = function() // fn, thisObject, args => thisObject.fn(args);
+{
+ var args = cloneArray(arguments), fn = args.shift(), object = args.shift();
+ return function() { return fn.apply(object, args); };
+};
+
+this.extend = function(l, r)
+{
+ var newOb = {};
+ for (var n in l)
+ newOb[n] = l[n];
+ for (var n in r)
+ newOb[n] = r[n];
+ return newOb;
+};
+
+this.descend = function(prototypeParent, childProperties)
+{
+ function protoSetter() {};
+ protoSetter.prototype = prototypeParent;
+ var newOb = new protoSetter();
+ for (var n in childProperties)
+ newOb[n] = childProperties[n];
+ return newOb;
+};
+
+this.append = function(l, r)
+{
+ for (var n in r)
+ l[n] = r[n];
+
+ return l;
+};
+
+this.keys = function(map) // At least sometimes the keys will be on user-level window objects
+{
+ var keys = [];
+ try
+ {
+ for (var name in map) // enumeration is safe
+ keys.push(name); // name is string, safe
+ }
+ catch (exc)
+ {
+ // Sometimes we get exceptions trying to iterate properties
+ }
+
+ return keys; // return is safe
+};
+
+this.values = function(map)
+{
+ var values = [];
+ try
+ {
+ for (var name in map)
+ {
+ try
+ {
+ values.push(map[name]);
+ }
+ catch (exc)
+ {
+ // Sometimes we get exceptions trying to access properties
+ if (FBTrace.DBG_ERRORS)
+ FBTrace.sysout("lib.values FAILED ", exc);
+ }
+
+ }
+ }
+ catch (exc)
+ {
+ // Sometimes we get exceptions trying to iterate properties
+ if (FBTrace.DBG_ERRORS)
+ FBTrace.sysout("lib.values FAILED ", exc);
+ }
+
+ return values;
+};
+
+this.remove = function(list, item)
+{
+ for (var i = 0; i < list.length; ++i)
+ {
+ if (list[i] == item)
+ {
+ list.splice(i, 1);
+ break;
+ }
+ }
+};
+
+this.sliceArray = function(array, index)
+{
+ var slice = [];
+ for (var i = index; i < array.length; ++i)
+ slice.push(array[i]);
+
+ return slice;
+};
+
+function cloneArray(array, fn)
+{
+ var newArray = [];
+
+ if (fn)
+ for (var i = 0; i < array.length; ++i)
+ newArray.push(fn(array[i]));
+ else
+ for (var i = 0; i < array.length; ++i)
+ newArray.push(array[i]);
+
+ return newArray;
+}
+
+function extendArray(array, array2)
+{
+ var newArray = [];
+ newArray.push.apply(newArray, array);
+ newArray.push.apply(newArray, array2);
+ return newArray;
+}
+
+this.extendArray = extendArray;
+this.cloneArray = cloneArray;
+
+function arrayInsert(array, index, other)
+{
+ for (var i = 0; i < other.length; ++i)
+ array.splice(i+index, 0, other[i]);
+
+ return array;
+}
+
+// ************************************************************************************************
+
+this.createStyleSheet = function(doc, url)
+{
+ //TODO: xxxpedro
+ //var style = doc.createElementNS("http://www.w3.org/1999/xhtml", "style");
+ var style = this.createElement("link");
+ style.setAttribute("charset","utf-8");
+ style.firebugIgnore = true;
+ style.setAttribute("rel", "stylesheet");
+ style.setAttribute("type", "text/css");
+ style.setAttribute("href", url);
+
+ //TODO: xxxpedro
+ //style.innerHTML = this.getResource(url);
+ return style;
+};
+
+this.addStyleSheet = function(doc, style)
+{
+ var heads = doc.getElementsByTagName("head");
+ if (heads.length)
+ heads[0].appendChild(style);
+ else
+ doc.documentElement.appendChild(style);
+};
+
+this.appendStylesheet = function(doc, uri)
+{
+ // Make sure the stylesheet is not appended twice.
+ if (this.$(uri, doc))
+ return;
+
+ var styleSheet = this.createStyleSheet(doc, uri);
+ styleSheet.setAttribute("id", uri);
+ this.addStyleSheet(doc, styleSheet);
+};
+
+this.addScript = function(doc, id, src)
+{
+ var element = doc.createElementNS("http://www.w3.org/1999/xhtml", "html:script");
+ element.setAttribute("type", "text/javascript");
+ element.setAttribute("id", id);
+ if (!FBTrace.DBG_CONSOLE)
+ FBL.unwrapObject(element).firebugIgnore = true;
+
+ element.innerHTML = src;
+ if (doc.documentElement)
+ doc.documentElement.appendChild(element);
+ else
+ {
+ // See issue 1079, the svg test case gives this error
+ if (FBTrace.DBG_ERRORS)
+ FBTrace.sysout("lib.addScript doc has no documentElement:", doc);
+ }
+ return element;
+};
+
+
+// ************************************************************************************************
+
+this.getStyle = this.isIE ?
+ function(el, name)
+ {
+ return el.currentStyle[name] || el.style[name] || undefined;
+ }
+ :
+ function(el, name)
+ {
+ return el.ownerDocument.defaultView.getComputedStyle(el,null)[name]
+ || el.style[name] || undefined;
+ };
+
+
+// ************************************************************************************************
+// Whitespace and Entity conversions
+
+var entityConversionLists = this.entityConversionLists = {
+ normal : {
+ whitespace : {
+ '\t' : '\u200c\u2192',
+ '\n' : '\u200c\u00b6',
+ '\r' : '\u200c\u00ac',
+ ' ' : '\u200c\u00b7'
+ }
+ },
+ reverse : {
+ whitespace : {
+ '	' : '\t',
+ '
' : '\n',
+ '\u200c\u2192' : '\t',
+ '\u200c\u00b6' : '\n',
+ '\u200c\u00ac' : '\r',
+ '\u200c\u00b7' : ' '
+ }
+ }
+};
+
+var normal = entityConversionLists.normal,
+ reverse = entityConversionLists.reverse;
+
+function addEntityMapToList(ccode, entity)
+{
+ var lists = Array.prototype.slice.call(arguments, 2),
+ len = lists.length,
+ ch = String.fromCharCode(ccode);
+ for (var i = 0; i < len; i++)
+ {
+ var list = lists[i];
+ normal[list]=normal[list] || {};
+ normal[list][ch] = '&' + entity + ';';
+ reverse[list]=reverse[list] || {};
+ reverse[list]['&' + entity + ';'] = ch;
+ }
+};
+
+var e = addEntityMapToList,
+ white = 'whitespace',
+ text = 'text',
+ attr = 'attributes',
+ css = 'css',
+ editor = 'editor';
+
+e(0x0022, 'quot', attr, css);
+e(0x0026, 'amp', attr, text, css);
+e(0x0027, 'apos', css);
+e(0x003c, 'lt', attr, text, css);
+e(0x003e, 'gt', attr, text, css);
+e(0xa9, 'copy', text, editor);
+e(0xae, 'reg', text, editor);
+e(0x2122, 'trade', text, editor);
+
+// See http://en.wikipedia.org/wiki/Dash
+e(0x2012, '#8210', attr, text, editor); // figure dash
+e(0x2013, 'ndash', attr, text, editor); // en dash
+e(0x2014, 'mdash', attr, text, editor); // em dash
+e(0x2015, '#8213', attr, text, editor); // horizontal bar
+
+e(0x00a0, 'nbsp', attr, text, white, editor);
+e(0x2002, 'ensp', attr, text, white, editor);
+e(0x2003, 'emsp', attr, text, white, editor);
+e(0x2009, 'thinsp', attr, text, white, editor);
+e(0x200c, 'zwnj', attr, text, white, editor);
+e(0x200d, 'zwj', attr, text, white, editor);
+e(0x200e, 'lrm', attr, text, white, editor);
+e(0x200f, 'rlm', attr, text, white, editor);
+e(0x200b, '#8203', attr, text, white, editor); // zero-width space (ZWSP)
+
+//************************************************************************************************
+// Entity escaping
+
+var entityConversionRegexes = {
+ normal : {},
+ reverse : {}
+ };
+
+var escapeEntitiesRegEx = {
+ normal : function(list)
+ {
+ var chars = [];
+ for ( var ch in list)
+ {
+ chars.push(ch);
+ }
+ return new RegExp('([' + chars.join('') + '])', 'gm');
+ },
+ reverse : function(list)
+ {
+ var chars = [];
+ for ( var ch in list)
+ {
+ chars.push(ch);
+ }
+ return new RegExp('(' + chars.join('|') + ')', 'gm');
+ }
+};
+
+function getEscapeRegexp(direction, lists)
+{
+ var name = '', re;
+ var groups = [].concat(lists);
+ for (i = 0; i < groups.length; i++)
+ {
+ name += groups[i].group;
+ }
+ re = entityConversionRegexes[direction][name];
+ if (!re)
+ {
+ var list = {};
+ if (groups.length > 1)
+ {
+ for ( var i = 0; i < groups.length; i++)
+ {
+ var aList = entityConversionLists[direction][groups[i].group];
+ for ( var item in aList)
+ list[item] = aList[item];
+ }
+ } else if (groups.length==1)
+ {
+ list = entityConversionLists[direction][groups[0].group]; // faster for special case
+ } else {
+ list = {}; // perhaps should print out an error here?
+ }
+ re = entityConversionRegexes[direction][name] = escapeEntitiesRegEx[direction](list);
+ }
+ return re;
+};
+
+function createSimpleEscape(name, direction)
+{
+ return function(value)
+ {
+ var list = entityConversionLists[direction][name];
+ return String(value).replace(
+ getEscapeRegexp(direction, {
+ group : name,
+ list : list
+ }),
+ function(ch)
+ {
+ return list[ch];
+ }
+ );
+ };
+};
+
+function escapeGroupsForEntities(str, lists)
+{
+ lists = [].concat(lists);
+ var re = getEscapeRegexp('normal', lists),
+ split = String(str).split(re),
+ len = split.length,
+ results = [],
+ cur, r, i, ri = 0, l, list, last = '';
+ if (!len)
+ return [ {
+ str : String(str),
+ group : '',
+ name : ''
+ } ];
+ for (i = 0; i < len; i++)
+ {
+ cur = split[i];
+ if (cur == '')
+ continue;
+ for (l = 0; l < lists.length; l++)
+ {
+ list = lists[l];
+ r = entityConversionLists.normal[list.group][cur];
+ // if (cur == ' ' && list.group == 'whitespace' && last == ' ') // only show for runs of more than one space
+ // r = ' ';
+ if (r)
+ {
+ results[ri] = {
+ 'str' : r,
+ 'class' : list['class'],
+ 'extra' : list.extra[cur] ? list['class']
+ + list.extra[cur] : ''
+ };
+ break;
+ }
+ }
+ // last=cur;
+ if (!r)
+ results[ri] = {
+ 'str' : cur,
+ 'class' : '',
+ 'extra' : ''
+ };
+ ri++;
+ }
+ return results;
+};
+
+this.escapeGroupsForEntities = escapeGroupsForEntities;
+
+
+function unescapeEntities(str, lists)
+{
+ var re = getEscapeRegexp('reverse', lists),
+ split = String(str).split(re),
+ len = split.length,
+ results = [],
+ cur, r, i, ri = 0, l, list;
+ if (!len)
+ return str;
+ lists = [].concat(lists);
+ for (i = 0; i < len; i++)
+ {
+ cur = split[i];
+ if (cur == '')
+ continue;
+ for (l = 0; l < lists.length; l++)
+ {
+ list = lists[l];
+ r = entityConversionLists.reverse[list.group][cur];
+ if (r)
+ {
+ results[ri] = r;
+ break;
+ }
+ }
+ if (!r)
+ results[ri] = cur;
+ ri++;
+ }
+ return results.join('') || '';
+};
+
+
+// ************************************************************************************************
+// String escaping
+
+var escapeForTextNode = this.escapeForTextNode = createSimpleEscape('text', 'normal');
+var escapeForHtmlEditor = this.escapeForHtmlEditor = createSimpleEscape('editor', 'normal');
+var escapeForElementAttribute = this.escapeForElementAttribute = createSimpleEscape('attributes', 'normal');
+var escapeForCss = this.escapeForCss = createSimpleEscape('css', 'normal');
+
+// deprecated compatibility functions
+//this.deprecateEscapeHTML = createSimpleEscape('text', 'normal');
+//this.deprecatedUnescapeHTML = createSimpleEscape('text', 'reverse');
+//this.escapeHTML = deprecated("use appropriate escapeFor... function", this.deprecateEscapeHTML);
+//this.unescapeHTML = deprecated("use appropriate unescapeFor... function", this.deprecatedUnescapeHTML);
+
+var escapeForSourceLine = this.escapeForSourceLine = createSimpleEscape('text', 'normal');
+
+var unescapeWhitespace = createSimpleEscape('whitespace', 'reverse');
+
+this.unescapeForTextNode = function(str)
+{
+ if (Firebug.showTextNodesWithWhitespace)
+ str = unescapeWhitespace(str);
+ if (!Firebug.showTextNodesWithEntities)
+ str = escapeForElementAttribute(str);
+ return str;
+};
+
+this.escapeNewLines = function(value)
+{
+ return value.replace(/\r/g, "\\r").replace(/\n/g, "\\n");
+};
+
+this.stripNewLines = function(value)
+{
+ return typeof(value) == "string" ? value.replace(/[\r\n]/g, " ") : value;
+};
+
+this.escapeJS = function(value)
+{
+ return value.replace(/\r/g, "\\r").replace(/\n/g, "\\n").replace('"', '\\"', "g");
+};
+
+function escapeHTMLAttribute(value)
+{
+ function replaceChars(ch)
+ {
+ switch (ch)
+ {
+ case "&":
+ return "&";
+ case "'":
+ return apos;
+ case '"':
+ return quot;
+ }
+ return "?";
+ };
+ var apos = "'", quot = """, around = '"';
+ if( value.indexOf('"') == -1 ) {
+ quot = '"';
+ apos = "'";
+ } else if( value.indexOf("'") == -1 ) {
+ quot = '"';
+ around = "'";
+ }
+ return around + (String(value).replace(/[&'"]/g, replaceChars)) + around;
+}
+
+
+function escapeHTML(value)
+{
+ function replaceChars(ch)
+ {
+ switch (ch)
+ {
+ case "<":
+ return "<";
+ case ">":
+ return ">";
+ case "&":
+ return "&";
+ case "'":
+ return "'";
+ case '"':
+ return """;
+ }
+ return "?";
+ };
+ return String(value).replace(/[<>&"']/g, replaceChars);
+}
+
+this.escapeHTML = escapeHTML;
+
+this.cropString = function(text, limit)
+{
+ text = text + "";
+
+ if (!limit)
+ var halfLimit = 50;
+ else
+ var halfLimit = limit / 2;
+
+ if (text.length > limit)
+ return this.escapeNewLines(text.substr(0, halfLimit) + "..." + text.substr(text.length-halfLimit));
+ else
+ return this.escapeNewLines(text);
+};
+
+this.isWhitespace = function(text)
+{
+ return !reNotWhitespace.exec(text);
+};
+
+this.splitLines = function(text)
+{
+ var reSplitLines2 = /.*(:?\r\n|\n|\r)?/mg;
+ var lines;
+ if (text.match)
+ {
+ lines = text.match(reSplitLines2);
+ }
+ else
+ {
+ var str = text+"";
+ lines = str.match(reSplitLines2);
+ }
+ lines.pop();
+ return lines;
+};
+
+
+// ************************************************************************************************
+
+this.safeToString = function(ob)
+{
+ if (this.isIE)
+ {
+ try
+ {
+ // FIXME: xxxpedro this is failing in IE for the global "external" object
+ return ob + "";
+ }
+ catch(E)
+ {
+ FBTrace.sysout("Lib.safeToString() failed for ", ob);
+ return "";
+ }
+ }
+
+ try
+ {
+ if (ob && "toString" in ob && typeof ob.toString == "function")
+ return ob.toString();
+ }
+ catch (exc)
+ {
+ // xxxpedro it is not safe to use ob+""?
+ return ob + "";
+ ///return "[an object with no toString() function]";
+ }
+};
+
+// ************************************************************************************************
+
+this.hasProperties = function(ob)
+{
+ try
+ {
+ for (var name in ob)
+ return true;
+ } catch (exc) {}
+ return false;
+};
+
+// ************************************************************************************************
+// String Util
+
+var reTrim = /^\s+|\s+$/g;
+this.trim = function(s)
+{
+ return s.replace(reTrim, "");
+};
+
+
+// ************************************************************************************************
+// Empty
+
+this.emptyFn = function(){};
+
+
+
+// ************************************************************************************************
+// Visibility
+
+this.isVisible = function(elt)
+{
+ /*
+ if (elt instanceof XULElement)
+ {
+ //FBTrace.sysout("isVisible elt.offsetWidth: "+elt.offsetWidth+" offsetHeight:"+ elt.offsetHeight+" localName:"+ elt.localName+" nameSpace:"+elt.nameSpaceURI+"\n");
+ return (!elt.hidden && !elt.collapsed);
+ }
+ /**/
+
+ return this.getStyle(elt, "visibility") != "hidden" &&
+ ( elt.offsetWidth > 0 || elt.offsetHeight > 0
+ || elt.tagName in invisibleTags
+ || elt.namespaceURI == "http://www.w3.org/2000/svg"
+ || elt.namespaceURI == "http://www.w3.org/1998/Math/MathML" );
+};
+
+this.collapse = function(elt, collapsed)
+{
+ // IE6 doesn't support the [collapsed] CSS selector. IE7 does support the selector,
+ // but it is causing a bug (the element disappears when you set the "collapsed"
+ // attribute, but it doesn't appear when you remove the attribute. So, for those
+ // cases, we need to use the class attribute.
+ if (this.isIElt8)
+ {
+ if (collapsed)
+ this.setClass(elt, "collapsed");
+ else
+ this.removeClass(elt, "collapsed");
+ }
+ else
+ elt.setAttribute("collapsed", collapsed ? "true" : "false");
+};
+
+this.obscure = function(elt, obscured)
+{
+ if (obscured)
+ this.setClass(elt, "obscured");
+ else
+ this.removeClass(elt, "obscured");
+};
+
+this.hide = function(elt, hidden)
+{
+ elt.style.visibility = hidden ? "hidden" : "visible";
+};
+
+this.clearNode = function(node)
+{
+ var nodeName = " " + node.nodeName.toLowerCase() + " ";
+ var ignoreTags = " table tbody thead tfoot th tr td ";
+
+ // IE can't use innerHTML of table elements
+ if (this.isIE && ignoreTags.indexOf(nodeName) != -1)
+ this.eraseNode(node);
+ else
+ node.innerHTML = "";
+};
+
+this.eraseNode = function(node)
+{
+ while (node.lastChild)
+ node.removeChild(node.lastChild);
+};
+
+// ************************************************************************************************
+// Window iteration
+
+this.iterateWindows = function(win, handler)
+{
+ if (!win || !win.document)
+ return;
+
+ handler(win);
+
+ if (win == top || !win.frames) return; // XXXjjb hack for chromeBug
+
+ for (var i = 0; i < win.frames.length; ++i)
+ {
+ var subWin = win.frames[i];
+ if (subWin != win)
+ this.iterateWindows(subWin, handler);
+ }
+};
+
+this.getRootWindow = function(win)
+{
+ for (; win; win = win.parent)
+ {
+ if (!win.parent || win == win.parent || !this.instanceOf(win.parent, "Window"))
+ return win;
+ }
+ return null;
+};
+
+// ************************************************************************************************
+// Graphics
+
+this.getClientOffset = function(elt)
+{
+ var addOffset = function addOffset(elt, coords, view)
+ {
+ var p = elt.offsetParent;
+
+ ///var style = isIE ? elt.currentStyle : view.getComputedStyle(elt, "");
+ var chrome = Firebug.chrome;
+
+ if (elt.offsetLeft)
+ ///coords.x += elt.offsetLeft + parseInt(style.borderLeftWidth);
+ coords.x += elt.offsetLeft + chrome.getMeasurementInPixels(elt, "borderLeft");
+ if (elt.offsetTop)
+ ///coords.y += elt.offsetTop + parseInt(style.borderTopWidth);
+ coords.y += elt.offsetTop + chrome.getMeasurementInPixels(elt, "borderTop");
+
+ if (p)
+ {
+ if (p.nodeType == 1)
+ addOffset(p, coords, view);
+ }
+ else
+ {
+ var otherView = isIE ? elt.ownerDocument.parentWindow : elt.ownerDocument.defaultView;
+ // IE will fail when reading the frameElement property of a popup window.
+ // We don't need it anyway once it is outside the (popup) viewport, so we're
+ // ignoring the frameElement check when the window is a popup
+ if (!otherView.opener && otherView.frameElement)
+ addOffset(otherView.frameElement, coords, otherView);
+ }
+ };
+
+ var isIE = this.isIE;
+ var coords = {x: 0, y: 0};
+ if (elt)
+ {
+ var view = isIE ? elt.ownerDocument.parentWindow : elt.ownerDocument.defaultView;
+ addOffset(elt, coords, view);
+ }
+
+ return coords;
+};
+
+this.getViewOffset = function(elt, singleFrame)
+{
+ function addOffset(elt, coords, view)
+ {
+ var p = elt.offsetParent;
+ coords.x += elt.offsetLeft - (p ? p.scrollLeft : 0);
+ coords.y += elt.offsetTop - (p ? p.scrollTop : 0);
+
+ if (p)
+ {
+ if (p.nodeType == 1)
+ {
+ var parentStyle = view.getComputedStyle(p, "");
+ if (parentStyle.position != "static")
+ {
+ coords.x += parseInt(parentStyle.borderLeftWidth);
+ coords.y += parseInt(parentStyle.borderTopWidth);
+
+ if (p.localName == "TABLE")
+ {
+ coords.x += parseInt(parentStyle.paddingLeft);
+ coords.y += parseInt(parentStyle.paddingTop);
+ }
+ else if (p.localName == "BODY")
+ {
+ var style = view.getComputedStyle(elt, "");
+ coords.x += parseInt(style.marginLeft);
+ coords.y += parseInt(style.marginTop);
+ }
+ }
+ else if (p.localName == "BODY")
+ {
+ coords.x += parseInt(parentStyle.borderLeftWidth);
+ coords.y += parseInt(parentStyle.borderTopWidth);
+ }
+
+ var parent = elt.parentNode;
+ while (p != parent)
+ {
+ coords.x -= parent.scrollLeft;
+ coords.y -= parent.scrollTop;
+ parent = parent.parentNode;
+ }
+ addOffset(p, coords, view);
+ }
+ }
+ else
+ {
+ if (elt.localName == "BODY")
+ {
+ var style = view.getComputedStyle(elt, "");
+ coords.x += parseInt(style.borderLeftWidth);
+ coords.y += parseInt(style.borderTopWidth);
+
+ var htmlStyle = view.getComputedStyle(elt.parentNode, "");
+ coords.x -= parseInt(htmlStyle.paddingLeft);
+ coords.y -= parseInt(htmlStyle.paddingTop);
+ }
+
+ if (elt.scrollLeft)
+ coords.x += elt.scrollLeft;
+ if (elt.scrollTop)
+ coords.y += elt.scrollTop;
+
+ var win = elt.ownerDocument.defaultView;
+ if (win && (!singleFrame && win.frameElement))
+ addOffset(win.frameElement, coords, win);
+ }
+
+ }
+
+ var coords = {x: 0, y: 0};
+ if (elt)
+ addOffset(elt, coords, elt.ownerDocument.defaultView);
+
+ return coords;
+};
+
+this.getLTRBWH = function(elt)
+{
+ var bcrect,
+ dims = {"left": 0, "top": 0, "right": 0, "bottom": 0, "width": 0, "height": 0};
+
+ if (elt)
+ {
+ bcrect = elt.getBoundingClientRect();
+ dims.left = bcrect.left;
+ dims.top = bcrect.top;
+ dims.right = bcrect.right;
+ dims.bottom = bcrect.bottom;
+
+ if(bcrect.width)
+ {
+ dims.width = bcrect.width;
+ dims.height = bcrect.height;
+ }
+ else
+ {
+ dims.width = dims.right - dims.left;
+ dims.height = dims.bottom - dims.top;
+ }
+ }
+ return dims;
+};
+
+this.applyBodyOffsets = function(elt, clientRect)
+{
+ var od = elt.ownerDocument;
+ if (!od.body)
+ return clientRect;
+
+ var style = od.defaultView.getComputedStyle(od.body, null);
+
+ var pos = style.getPropertyValue('position');
+ if(pos === 'absolute' || pos === 'relative')
+ {
+ var borderLeft = parseInt(style.getPropertyValue('border-left-width').replace('px', ''),10) || 0;
+ var borderTop = parseInt(style.getPropertyValue('border-top-width').replace('px', ''),10) || 0;
+ var paddingLeft = parseInt(style.getPropertyValue('padding-left').replace('px', ''),10) || 0;
+ var paddingTop = parseInt(style.getPropertyValue('padding-top').replace('px', ''),10) || 0;
+ var marginLeft = parseInt(style.getPropertyValue('margin-left').replace('px', ''),10) || 0;
+ var marginTop = parseInt(style.getPropertyValue('margin-top').replace('px', ''),10) || 0;
+
+ var offsetX = borderLeft + paddingLeft + marginLeft;
+ var offsetY = borderTop + paddingTop + marginTop;
+
+ clientRect.left -= offsetX;
+ clientRect.top -= offsetY;
+ clientRect.right -= offsetX;
+ clientRect.bottom -= offsetY;
+ }
+
+ return clientRect;
+};
+
+this.getOffsetSize = function(elt)
+{
+ return {width: elt.offsetWidth, height: elt.offsetHeight};
+};
+
+this.getOverflowParent = function(element)
+{
+ for (var scrollParent = element.parentNode; scrollParent; scrollParent = scrollParent.offsetParent)
+ {
+ if (scrollParent.scrollHeight > scrollParent.offsetHeight)
+ return scrollParent;
+ }
+};
+
+this.isScrolledToBottom = function(element)
+{
+ var onBottom = (element.scrollTop + element.offsetHeight) == element.scrollHeight;
+ if (FBTrace.DBG_CONSOLE)
+ FBTrace.sysout("isScrolledToBottom offsetHeight: "+element.offsetHeight +" onBottom:"+onBottom);
+ return onBottom;
+};
+
+this.scrollToBottom = function(element)
+{
+ element.scrollTop = element.scrollHeight;
+
+ if (FBTrace.DBG_CONSOLE)
+ {
+ FBTrace.sysout("scrollToBottom reset scrollTop "+element.scrollTop+" = "+element.scrollHeight);
+ if (element.scrollHeight == element.offsetHeight)
+ FBTrace.sysout("scrollToBottom attempt to scroll non-scrollable element "+element, element);
+ }
+
+ return (element.scrollTop == element.scrollHeight);
+};
+
+this.move = function(element, x, y)
+{
+ element.style.left = x + "px";
+ element.style.top = y + "px";
+};
+
+this.resize = function(element, w, h)
+{
+ element.style.width = w + "px";
+ element.style.height = h + "px";
+};
+
+this.linesIntoCenterView = function(element, scrollBox) // {before: int, after: int}
+{
+ if (!scrollBox)
+ scrollBox = this.getOverflowParent(element);
+
+ if (!scrollBox)
+ return;
+
+ var offset = this.getClientOffset(element);
+
+ var topSpace = offset.y - scrollBox.scrollTop;
+ var bottomSpace = (scrollBox.scrollTop + scrollBox.clientHeight)
+ - (offset.y + element.offsetHeight);
+
+ if (topSpace < 0 || bottomSpace < 0)
+ {
+ var split = (scrollBox.clientHeight/2);
+ var centerY = offset.y - split;
+ scrollBox.scrollTop = centerY;
+ topSpace = split;
+ bottomSpace = split - element.offsetHeight;
+ }
+
+ return {before: Math.round((topSpace/element.offsetHeight) + 0.5),
+ after: Math.round((bottomSpace/element.offsetHeight) + 0.5) };
+};
+
+this.scrollIntoCenterView = function(element, scrollBox, notX, notY)
+{
+ if (!element)
+ return;
+
+ if (!scrollBox)
+ scrollBox = this.getOverflowParent(element);
+
+ if (!scrollBox)
+ return;
+
+ var offset = this.getClientOffset(element);
+
+ if (!notY)
+ {
+ var topSpace = offset.y - scrollBox.scrollTop;
+ var bottomSpace = (scrollBox.scrollTop + scrollBox.clientHeight)
+ - (offset.y + element.offsetHeight);
+
+ if (topSpace < 0 || bottomSpace < 0)
+ {
+ var centerY = offset.y - (scrollBox.clientHeight/2);
+ scrollBox.scrollTop = centerY;
+ }
+ }
+
+ if (!notX)
+ {
+ var leftSpace = offset.x - scrollBox.scrollLeft;
+ var rightSpace = (scrollBox.scrollLeft + scrollBox.clientWidth)
+ - (offset.x + element.clientWidth);
+
+ if (leftSpace < 0 || rightSpace < 0)
+ {
+ var centerX = offset.x - (scrollBox.clientWidth/2);
+ scrollBox.scrollLeft = centerX;
+ }
+ }
+ if (FBTrace.DBG_SOURCEFILES)
+ FBTrace.sysout("lib.scrollIntoCenterView ","Element:"+element.innerHTML);
+};
+
+
+// ************************************************************************************************
+// CSS
+
+var cssKeywordMap = null;
+var cssPropNames = null;
+var cssColorNames = null;
+var imageRules = null;
+
+this.getCSSKeywordsByProperty = function(propName)
+{
+ if (!cssKeywordMap)
+ {
+ cssKeywordMap = {};
+
+ for (var name in this.cssInfo)
+ {
+ var list = [];
+
+ var types = this.cssInfo[name];
+ for (var i = 0; i < types.length; ++i)
+ {
+ var keywords = this.cssKeywords[types[i]];
+ if (keywords)
+ list.push.apply(list, keywords);
+ }
+
+ cssKeywordMap[name] = list;
+ }
+ }
+
+ return propName in cssKeywordMap ? cssKeywordMap[propName] : [];
+};
+
+this.getCSSPropertyNames = function()
+{
+ if (!cssPropNames)
+ {
+ cssPropNames = [];
+
+ for (var name in this.cssInfo)
+ cssPropNames.push(name);
+ }
+
+ return cssPropNames;
+};
+
+this.isColorKeyword = function(keyword)
+{
+ if (keyword == "transparent")
+ return false;
+
+ if (!cssColorNames)
+ {
+ cssColorNames = [];
+
+ var colors = this.cssKeywords["color"];
+ for (var i = 0; i < colors.length; ++i)
+ cssColorNames.push(colors[i].toLowerCase());
+
+ var systemColors = this.cssKeywords["systemColor"];
+ for (var i = 0; i < systemColors.length; ++i)
+ cssColorNames.push(systemColors[i].toLowerCase());
+ }
+
+ return cssColorNames.indexOf ? // Array.indexOf is not available in IE
+ cssColorNames.indexOf(keyword.toLowerCase()) != -1 :
+ (" " + cssColorNames.join(" ") + " ").indexOf(" " + keyword.toLowerCase() + " ") != -1;
+};
+
+this.isImageRule = function(rule)
+{
+ if (!imageRules)
+ {
+ imageRules = [];
+
+ for (var i in this.cssInfo)
+ {
+ var r = i.toLowerCase();
+ var suffix = "image";
+ if (r.match(suffix + "$") == suffix || r == "background")
+ imageRules.push(r);
+ }
+ }
+
+ return imageRules.indexOf ? // Array.indexOf is not available in IE
+ imageRules.indexOf(rule.toLowerCase()) != -1 :
+ (" " + imageRules.join(" ") + " ").indexOf(" " + rule.toLowerCase() + " ") != -1;
+};
+
+this.copyTextStyles = function(fromNode, toNode, style)
+{
+ var view = this.isIE ?
+ fromNode.ownerDocument.parentWindow :
+ fromNode.ownerDocument.defaultView;
+
+ if (view)
+ {
+ if (!style)
+ style = this.isIE ? fromNode.currentStyle : view.getComputedStyle(fromNode, "");
+
+ toNode.style.fontFamily = style.fontFamily;
+
+ // TODO: xxxpedro need to create a FBL.getComputedStyle() because IE
+ // returns wrong computed styles for inherited properties (like font-*)
+ //
+ // Also would be good to create a FBL.getStyle()
+ toNode.style.fontSize = style.fontSize;
+ toNode.style.fontWeight = style.fontWeight;
+ toNode.style.fontStyle = style.fontStyle;
+
+ return style;
+ }
+};
+
+this.copyBoxStyles = function(fromNode, toNode, style)
+{
+ var view = this.isIE ?
+ fromNode.ownerDocument.parentWindow :
+ fromNode.ownerDocument.defaultView;
+
+ if (view)
+ {
+ if (!style)
+ style = this.isIE ? fromNode.currentStyle : view.getComputedStyle(fromNode, "");
+
+ toNode.style.marginTop = style.marginTop;
+ toNode.style.marginRight = style.marginRight;
+ toNode.style.marginBottom = style.marginBottom;
+ toNode.style.marginLeft = style.marginLeft;
+ toNode.style.borderTopWidth = style.borderTopWidth;
+ toNode.style.borderRightWidth = style.borderRightWidth;
+ toNode.style.borderBottomWidth = style.borderBottomWidth;
+ toNode.style.borderLeftWidth = style.borderLeftWidth;
+
+ return style;
+ }
+};
+
+this.readBoxStyles = function(style)
+{
+ var styleNames = {
+ "margin-top": "marginTop", "margin-right": "marginRight",
+ "margin-left": "marginLeft", "margin-bottom": "marginBottom",
+ "border-top-width": "borderTop", "border-right-width": "borderRight",
+ "border-left-width": "borderLeft", "border-bottom-width": "borderBottom",
+ "padding-top": "paddingTop", "padding-right": "paddingRight",
+ "padding-left": "paddingLeft", "padding-bottom": "paddingBottom",
+ "z-index": "zIndex"
+ };
+
+ var styles = {};
+ for (var styleName in styleNames)
+ styles[styleNames[styleName]] = parseInt(style.getPropertyCSSValue(styleName).cssText) || 0;
+ if (FBTrace.DBG_INSPECT)
+ FBTrace.sysout("readBoxStyles ", styles);
+ return styles;
+};
+
+this.getBoxFromStyles = function(style, element)
+{
+ var args = this.readBoxStyles(style);
+ args.width = element.offsetWidth
+ - (args.paddingLeft+args.paddingRight+args.borderLeft+args.borderRight);
+ args.height = element.offsetHeight
+ - (args.paddingTop+args.paddingBottom+args.borderTop+args.borderBottom);
+ return args;
+};
+
+this.getElementCSSSelector = function(element)
+{
+ var label = element.localName.toLowerCase();
+ if (element.id)
+ label += "#" + element.id;
+ if (element.hasAttribute("class"))
+ label += "." + element.getAttribute("class").split(" ")[0];
+
+ return label;
+};
+
+this.getURLForStyleSheet= function(styleSheet)
+{
+ //http://www.w3.org/TR/DOM-Level-2-Style/stylesheets.html#StyleSheets-StyleSheet. For inline style sheets, the value of this attribute is null.
+ return (styleSheet.href ? styleSheet.href : styleSheet.ownerNode.ownerDocument.URL);
+};
+
+this.getDocumentForStyleSheet = function(styleSheet)
+{
+ while (styleSheet.parentStyleSheet && !styleSheet.ownerNode)
+ {
+ styleSheet = styleSheet.parentStyleSheet;
+ }
+ if (styleSheet.ownerNode)
+ return styleSheet.ownerNode.ownerDocument;
+};
+
+/**
+ * Retrieves the instance number for a given style sheet. The instance number
+ * is sheet's index within the set of all other sheets whose URL is the same.
+ */
+this.getInstanceForStyleSheet = function(styleSheet, ownerDocument)
+{
+ // System URLs are always unique (or at least we are making this assumption)
+ if (FBL.isSystemStyleSheet(styleSheet))
+ return 0;
+
+ // ownerDocument is an optional hint for performance
+ if (FBTrace.DBG_CSS) FBTrace.sysout("getInstanceForStyleSheet: " + styleSheet.href + " " + styleSheet.media.mediaText + " " + (styleSheet.ownerNode && FBL.getElementXPath(styleSheet.ownerNode)), ownerDocument);
+ ownerDocument = ownerDocument || FBL.getDocumentForStyleSheet(styleSheet);
+
+ var ret = 0,
+ styleSheets = ownerDocument.styleSheets,
+ href = styleSheet.href;
+ for (var i = 0; i < styleSheets.length; i++)
+ {
+ var curSheet = styleSheets[i];
+ if (FBTrace.DBG_CSS) FBTrace.sysout("getInstanceForStyleSheet: compare href " + i + " " + curSheet.href + " " + curSheet.media.mediaText + " " + (curSheet.ownerNode && FBL.getElementXPath(curSheet.ownerNode)));
+ if (curSheet == styleSheet)
+ break;
+ if (curSheet.href == href)
+ ret++;
+ }
+ return ret;
+};
+
+// ************************************************************************************************
+// HTML and XML Serialization
+
+
+var getElementType = this.getElementType = function(node)
+{
+ if (isElementXUL(node))
+ return 'xul';
+ else if (isElementSVG(node))
+ return 'svg';
+ else if (isElementMathML(node))
+ return 'mathml';
+ else if (isElementXHTML(node))
+ return 'xhtml';
+ else if (isElementHTML(node))
+ return 'html';
+};
+
+var getElementSimpleType = this.getElementSimpleType = function(node)
+{
+ if (isElementSVG(node))
+ return 'svg';
+ else if (isElementMathML(node))
+ return 'mathml';
+ else
+ return 'html';
+};
+
+var isElementHTML = this.isElementHTML = function(node)
+{
+ return node.nodeName == node.nodeName.toUpperCase();
+};
+
+var isElementXHTML = this.isElementXHTML = function(node)
+{
+ return node.nodeName == node.nodeName.toLowerCase();
+};
+
+var isElementMathML = this.isElementMathML = function(node)
+{
+ return node.namespaceURI == 'http://www.w3.org/1998/Math/MathML';
+};
+
+var isElementSVG = this.isElementSVG = function(node)
+{
+ return node.namespaceURI == 'http://www.w3.org/2000/svg';
+};
+
+var isElementXUL = this.isElementXUL = function(node)
+{
+ return node instanceof XULElement;
+};
+
+this.isSelfClosing = function(element)
+{
+ if (isElementSVG(element) || isElementMathML(element))
+ return true;
+ var tag = element.localName.toLowerCase();
+ return (this.selfClosingTags.hasOwnProperty(tag));
+};
+
+this.getElementHTML = function(element)
+{
+ var self=this;
+ function toHTML(elt)
+ {
+ if (elt.nodeType == Node.ELEMENT_NODE)
+ {
+ if (unwrapObject(elt).firebugIgnore)
+ return;
+
+ html.push('<', elt.nodeName.toLowerCase());
+
+ for (var i = 0; i < elt.attributes.length; ++i)
+ {
+ var attr = elt.attributes[i];
+
+ // Hide attributes set by Firebug
+ if (attr.localName.indexOf("firebug-") == 0)
+ continue;
+
+ // MathML
+ if (attr.localName.indexOf("-moz-math") == 0)
+ {
+ // just hide for now
+ continue;
+ }
+
+ html.push(' ', attr.nodeName, '="', escapeForElementAttribute(attr.nodeValue),'"');
+ }
+
+ if (elt.firstChild)
+ {
+ html.push('>');
+
+ var pureText=true;
+ for (var child = element.firstChild; child; child = child.nextSibling)
+ pureText=pureText && (child.nodeType == Node.TEXT_NODE);
+
+ if (pureText)
+ html.push(escapeForHtmlEditor(elt.textContent));
+ else {
+ for (var child = elt.firstChild; child; child = child.nextSibling)
+ toHTML(child);
+ }
+
+ html.push('</', elt.nodeName.toLowerCase(), '>');
+ }
+ else if (isElementSVG(elt) || isElementMathML(elt))
+ {
+ html.push('/>');
+ }
+ else if (self.isSelfClosing(elt))
+ {
+ html.push((isElementXHTML(elt))?'/>':'>');
+ }
+ else
+ {
+ html.push('></', elt.nodeName.toLowerCase(), '>');
+ }
+ }
+ else if (elt.nodeType == Node.TEXT_NODE)
+ html.push(escapeForTextNode(elt.textContent));
+ else if (elt.nodeType == Node.CDATA_SECTION_NODE)
+ html.push('<![CDATA[', elt.nodeValue, ']]>');
+ else if (elt.nodeType == Node.COMMENT_NODE)
+ html.push('<!--', elt.nodeValue, '-->');
+ }
+
+ var html = [];
+ toHTML(element);
+ return html.join("");
+};
+
+this.getElementXML = function(element)
+{
+ function toXML(elt)
+ {
+ if (elt.nodeType == Node.ELEMENT_NODE)
+ {
+ if (unwrapObject(elt).firebugIgnore)
+ return;
+
+ xml.push('<', elt.nodeName.toLowerCase());
+
+ for (var i = 0; i < elt.attributes.length; ++i)
+ {
+ var attr = elt.attributes[i];
+
+ // Hide attributes set by Firebug
+ if (attr.localName.indexOf("firebug-") == 0)
+ continue;
+
+ // MathML
+ if (attr.localName.indexOf("-moz-math") == 0)
+ {
+ // just hide for now
+ continue;
+ }
+
+ xml.push(' ', attr.nodeName, '="', escapeForElementAttribute(attr.nodeValue),'"');
+ }
+
+ if (elt.firstChild)
+ {
+ xml.push('>');
+
+ for (var child = elt.firstChild; child; child = child.nextSibling)
+ toXML(child);
+
+ xml.push('</', elt.nodeName.toLowerCase(), '>');
+ }
+ else
+ xml.push('/>');
+ }
+ else if (elt.nodeType == Node.TEXT_NODE)
+ xml.push(elt.nodeValue);
+ else if (elt.nodeType == Node.CDATA_SECTION_NODE)
+ xml.push('<![CDATA[', elt.nodeValue, ']]>');
+ else if (elt.nodeType == Node.COMMENT_NODE)
+ xml.push('<!--', elt.nodeValue, '-->');
+ }
+
+ var xml = [];
+ toXML(element);
+ return xml.join("");
+};
+
+
+// ************************************************************************************************
+// CSS classes
+
+this.hasClass = function(node, name) // className, className, ...
+{
+ // TODO: xxxpedro when lib.hasClass is called with more than 2 arguments?
+ // this function can be optimized a lot if assumed 2 arguments only,
+ // which seems to be what happens 99% of the time
+ if (arguments.length == 2)
+ return (' '+node.className+' ').indexOf(' '+name+' ') != -1;
+
+ if (!node || node.nodeType != 1)
+ return false;
+ else
+ {
+ for (var i=1; i<arguments.length; ++i)
+ {
+ var name = arguments[i];
+ var re = new RegExp("(^|\\s)"+name+"($|\\s)");
+ if (!re.exec(node.className))
+ return false;
+ }
+
+ return true;
+ }
+};
+
+this.old_hasClass = function(node, name) // className, className, ...
+{
+ if (!node || node.nodeType != 1)
+ return false;
+ else
+ {
+ for (var i=1; i<arguments.length; ++i)
+ {
+ var name = arguments[i];
+ var re = new RegExp("(^|\\s)"+name+"($|\\s)");
+ if (!re.exec(node.className))
+ return false;
+ }
+
+ return true;
+ }
+};
+
+this.setClass = function(node, name)
+{
+ if (node && (' '+node.className+' ').indexOf(' '+name+' ') == -1)
+ ///if (node && !this.hasClass(node, name))
+ node.className += " " + name;
+};
+
+this.getClassValue = function(node, name)
+{
+ var re = new RegExp(name+"-([^ ]+)");
+ var m = re.exec(node.className);
+ return m ? m[1] : "";
+};
+
+this.removeClass = function(node, name)
+{
+ if (node && node.className)
+ {
+ var index = node.className.indexOf(name);
+ if (index >= 0)
+ {
+ var size = name.length;
+ node.className = node.className.substr(0,index-1) + node.className.substr(index+size);
+ }
+ }
+};
+
+this.toggleClass = function(elt, name)
+{
+ if ((' '+elt.className+' ').indexOf(' '+name+' ') != -1)
+ ///if (this.hasClass(elt, name))
+ this.removeClass(elt, name);
+ else
+ this.setClass(elt, name);
+};
+
+this.setClassTimed = function(elt, name, context, timeout)
+{
+ if (!timeout)
+ timeout = 1300;
+
+ if (elt.__setClassTimeout)
+ context.clearTimeout(elt.__setClassTimeout);
+ else
+ this.setClass(elt, name);
+
+ elt.__setClassTimeout = context.setTimeout(function()
+ {
+ delete elt.__setClassTimeout;
+
+ FBL.removeClass(elt, name);
+ }, timeout);
+};
+
+this.cancelClassTimed = function(elt, name, context)
+{
+ if (elt.__setClassTimeout)
+ {
+ FBL.removeClass(elt, name);
+ context.clearTimeout(elt.__setClassTimeout);
+ delete elt.__setClassTimeout;
+ }
+};
+
+
+// ************************************************************************************************
+// DOM queries
+
+this.$ = function(id, doc)
+{
+ if (doc)
+ return doc.getElementById(id);
+ else
+ {
+ return FBL.Firebug.chrome.document.getElementById(id);
+ }
+};
+
+this.$$ = function(selector, doc)
+{
+ if (doc || !FBL.Firebug.chrome)
+ return FBL.Firebug.Selector(selector, doc);
+ else
+ {
+ return FBL.Firebug.Selector(selector, FBL.Firebug.chrome.document);
+ }
+};
+
+this.getChildByClass = function(node) // ,classname, classname, classname...
+{
+ for (var i = 1; i < arguments.length; ++i)
+ {
+ var className = arguments[i];
+ var child = node.firstChild;
+ node = null;
+ for (; child; child = child.nextSibling)
+ {
+ if (this.hasClass(child, className))
+ {
+ node = child;
+ break;
+ }
+ }
+ }
+
+ return node;
+};
+
+this.getAncestorByClass = function(node, className)
+{
+ for (var parent = node; parent; parent = parent.parentNode)
+ {
+ if (this.hasClass(parent, className))
+ return parent;
+ }
+
+ return null;
+};
+
+
+this.getElementsByClass = function(node, className)
+{
+ var result = [];
+
+ for (var child = node.firstChild; child; child = child.nextSibling)
+ {
+ if (this.hasClass(child, className))
+ result.push(child);
+ }
+
+ return result;
+};
+
+this.getElementByClass = function(node, className) // className, className, ...
+{
+ var args = cloneArray(arguments); args.splice(0, 1);
+ for (var child = node.firstChild; child; child = child.nextSibling)
+ {
+ var args1 = cloneArray(args); args1.unshift(child);
+ if (FBL.hasClass.apply(null, args1))
+ return child;
+ else
+ {
+ var found = FBL.getElementByClass.apply(null, args1);
+ if (found)
+ return found;
+ }
+ }
+
+ return null;
+};
+
+this.isAncestor = function(node, potentialAncestor)
+{
+ for (var parent = node; parent; parent = parent.parentNode)
+ {
+ if (parent == potentialAncestor)
+ return true;
+ }
+
+ return false;
+};
+
+this.getNextElement = function(node)
+{
+ while (node && node.nodeType != 1)
+ node = node.nextSibling;
+
+ return node;
+};
+
+this.getPreviousElement = function(node)
+{
+ while (node && node.nodeType != 1)
+ node = node.previousSibling;
+
+ return node;
+};
+
+this.getBody = function(doc)
+{
+ if (doc.body)
+ return doc.body;
+
+ var body = doc.getElementsByTagName("body")[0];
+ if (body)
+ return body;
+
+ return doc.firstChild; // For non-HTML docs
+};
+
+this.findNextDown = function(node, criteria)
+{
+ if (!node)
+ return null;
+
+ for (var child = node.firstChild; child; child = child.nextSibling)
+ {
+ if (criteria(child))
+ return child;
+
+ var next = this.findNextDown(child, criteria);
+ if (next)
+ return next;
+ }
+};
+
+this.findPreviousUp = function(node, criteria)
+{
+ if (!node)
+ return null;
+
+ for (var child = node.lastChild; child; child = child.previousSibling)
+ {
+ var next = this.findPreviousUp(child, criteria);
+ if (next)
+ return next;
+
+ if (criteria(child))
+ return child;
+ }
+};
+
+this.findNext = function(node, criteria, upOnly, maxRoot)
+{
+ if (!node)
+ return null;
+
+ if (!upOnly)
+ {
+ var next = this.findNextDown(node, criteria);
+ if (next)
+ return next;
+ }
+
+ for (var sib = node.nextSibling; sib; sib = sib.nextSibling)
+ {
+ if (criteria(sib))
+ return sib;
+
+ var next = this.findNextDown(sib, criteria);
+ if (next)
+ return next;
+ }
+
+ if (node.parentNode && node.parentNode != maxRoot)
+ return this.findNext(node.parentNode, criteria, true);
+};
+
+this.findPrevious = function(node, criteria, downOnly, maxRoot)
+{
+ if (!node)
+ return null;
+
+ for (var sib = node.previousSibling; sib; sib = sib.previousSibling)
+ {
+ var prev = this.findPreviousUp(sib, criteria);
+ if (prev)
+ return prev;
+
+ if (criteria(sib))
+ return sib;
+ }
+
+ if (!downOnly)
+ {
+ var next = this.findPreviousUp(node, criteria);
+ if (next)
+ return next;
+ }
+
+ if (node.parentNode && node.parentNode != maxRoot)
+ {
+ if (criteria(node.parentNode))
+ return node.parentNode;
+
+ return this.findPrevious(node.parentNode, criteria, true);
+ }
+};
+
+this.getNextByClass = function(root, state)
+{
+ var iter = function iter(node) { return node.nodeType == 1 && FBL.hasClass(node, state); };
+ return this.findNext(root, iter);
+};
+
+this.getPreviousByClass = function(root, state)
+{
+ var iter = function iter(node) { return node.nodeType == 1 && FBL.hasClass(node, state); };
+ return this.findPrevious(root, iter);
+};
+
+this.isElement = function(o)
+{
+ try {
+ return o && this.instanceOf(o, "Element");
+ }
+ catch (ex) {
+ return false;
+ }
+};
+
+
+// ************************************************************************************************
+// DOM Modification
+
+// TODO: xxxpedro use doc fragments in Context API
+var appendFragment = null;
+
+this.appendInnerHTML = function(element, html, referenceElement)
+{
+ // if undefined, we must convert it to null otherwise it will throw an error in IE
+ // when executing element.insertBefore(firstChild, referenceElement)
+ referenceElement = referenceElement || null;
+
+ var doc = element.ownerDocument;
+
+ // doc.createRange not available in IE
+ if (doc.createRange)
+ {
+ var range = doc.createRange(); // a helper object
+ range.selectNodeContents(element); // the environment to interpret the html
+
+ var fragment = range.createContextualFragment(html); // parse
+ var firstChild = fragment.firstChild;
+ element.insertBefore(fragment, referenceElement);
+ }
+ else
+ {
+ if (!appendFragment || appendFragment.ownerDocument != doc)
+ appendFragment = doc.createDocumentFragment();
+
+ var div = doc.createElement("div");
+ div.innerHTML = html;
+
+ var firstChild = div.firstChild;
+ while (div.firstChild)
+ appendFragment.appendChild(div.firstChild);
+
+ element.insertBefore(appendFragment, referenceElement);
+
+ div = null;
+ }
+
+ return firstChild;
+};
+
+
+// ************************************************************************************************
+// DOM creation
+
+this.createElement = function(tagName, properties)
+{
+ properties = properties || {};
+ var doc = properties.document || FBL.Firebug.chrome.document;
+
+ var element = doc.createElement(tagName);
+
+ for(var name in properties)
+ {
+ if (name != "document")
+ {
+ element[name] = properties[name];
+ }
+ }
+
+ return element;
+};
+
+this.createGlobalElement = function(tagName, properties)
+{
+ properties = properties || {};
+ var doc = FBL.Env.browser.document;
+
+ var element = this.NS && doc.createElementNS ?
+ doc.createElementNS(FBL.NS, tagName) :
+ doc.createElement(tagName);
+
+ for(var name in properties)
+ {
+ var propname = name;
+ if (FBL.isIE && name == "class") propname = "className";
+
+ if (name != "document")
+ {
+ element.setAttribute(propname, properties[name]);
+ }
+ }
+
+ return element;
+};
+
+//************************************************************************************************
+
+this.safeGetWindowLocation = function(window)
+{
+ try
+ {
+ if (window)
+ {
+ if (window.closed)
+ return "(window.closed)";
+ if ("location" in window)
+ return window.location+"";
+ else
+ return "(no window.location)";
+ }
+ else
+ return "(no context.window)";
+ }
+ catch(exc)
+ {
+ if (FBTrace.DBG_WINDOWS || FBTrace.DBG_ERRORS)
+ FBTrace.sysout("TabContext.getWindowLocation failed "+exc, exc);
+ FBTrace.sysout("TabContext.getWindowLocation failed window:", window);
+ return "(getWindowLocation: "+exc+")";
+ }
+};
+
+// ************************************************************************************************
+// Events
+
+this.isLeftClick = function(event)
+{
+ return (this.isIE && event.type != "click" && event.type != "dblclick" ?
+ event.button == 1 : // IE "click" and "dblclick" button model
+ event.button == 0) && // others
+ this.noKeyModifiers(event);
+};
+
+this.isMiddleClick = function(event)
+{
+ return (this.isIE && event.type != "click" && event.type != "dblclick" ?
+ event.button == 4 : // IE "click" and "dblclick" button model
+ event.button == 1) &&
+ this.noKeyModifiers(event);
+};
+
+this.isRightClick = function(event)
+{
+ return (this.isIE && event.type != "click" && event.type != "dblclick" ?
+ event.button == 2 : // IE "click" and "dblclick" button model
+ event.button == 2) &&
+ this.noKeyModifiers(event);
+};
+
+this.noKeyModifiers = function(event)
+{
+ return !event.ctrlKey && !event.shiftKey && !event.altKey && !event.metaKey;
+};
+
+this.isControlClick = function(event)
+{
+ return (this.isIE && event.type != "click" && event.type != "dblclick" ?
+ event.button == 1 : // IE "click" and "dblclick" button model
+ event.button == 0) &&
+ this.isControl(event);
+};
+
+this.isShiftClick = function(event)
+{
+ return (this.isIE && event.type != "click" && event.type != "dblclick" ?
+ event.button == 1 : // IE "click" and "dblclick" button model
+ event.button == 0) &&
+ this.isShift(event);
+};
+
+this.isControl = function(event)
+{
+ return (event.metaKey || event.ctrlKey) && !event.shiftKey && !event.altKey;
+};
+
+this.isAlt = function(event)
+{
+ return event.altKey && !event.ctrlKey && !event.shiftKey && !event.metaKey;
+};
+
+this.isAltClick = function(event)
+{
+ return (this.isIE && event.type != "click" && event.type != "dblclick" ?
+ event.button == 1 : // IE "click" and "dblclick" button model
+ event.button == 0) &&
+ this.isAlt(event);
+};
+
+this.isControlShift = function(event)
+{
+ return (event.metaKey || event.ctrlKey) && event.shiftKey && !event.altKey;
+};
+
+this.isShift = function(event)
+{
+ return event.shiftKey && !event.metaKey && !event.ctrlKey && !event.altKey;
+};
+
+this.addEvent = function(object, name, handler, useCapture)
+{
+ if (object.addEventListener)
+ object.addEventListener(name, handler, useCapture);
+ else
+ object.attachEvent("on"+name, handler);
+};
+
+this.removeEvent = function(object, name, handler, useCapture)
+{
+ try
+ {
+ if (object.removeEventListener)
+ object.removeEventListener(name, handler, useCapture);
+ else
+ object.detachEvent("on"+name, handler);
+ }
+ catch(e)
+ {
+ if (FBTrace.DBG_ERRORS)
+ FBTrace.sysout("FBL.removeEvent error: ", object, name);
+ }
+};
+
+this.cancelEvent = function(e, preventDefault)
+{
+ if (!e) return;
+
+ if (preventDefault)
+ {
+ if (e.preventDefault)
+ e.preventDefault();
+ else
+ e.returnValue = false;
+ }
+
+ if (e.stopPropagation)
+ e.stopPropagation();
+ else
+ e.cancelBubble = true;
+};
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+this.addGlobalEvent = function(name, handler)
+{
+ var doc = this.Firebug.browser.document;
+ var frames = this.Firebug.browser.window.frames;
+
+ this.addEvent(doc, name, handler);
+
+ if (this.Firebug.chrome.type == "popup")
+ this.addEvent(this.Firebug.chrome.document, name, handler);
+
+ for (var i = 0, frame; frame = frames[i]; i++)
+ {
+ try
+ {
+ this.addEvent(frame.document, name, handler);
+ }
+ catch(E)
+ {
+ // Avoid acess denied
+ }
+ }
+};
+
+this.removeGlobalEvent = function(name, handler)
+{
+ var doc = this.Firebug.browser.document;
+ var frames = this.Firebug.browser.window.frames;
+
+ this.removeEvent(doc, name, handler);
+
+ if (this.Firebug.chrome.type == "popup")
+ this.removeEvent(this.Firebug.chrome.document, name, handler);
+
+ for (var i = 0, frame; frame = frames[i]; i++)
+ {
+ try
+ {
+ this.removeEvent(frame.document, name, handler);
+ }
+ catch(E)
+ {
+ // Avoid acess denied
+ }
+ }
+};
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+this.dispatch = function(listeners, name, args)
+{
+ if (!listeners) return;
+
+ try
+ {/**/
+ if (typeof listeners.length != "undefined")
+ {
+ if (FBTrace.DBG_DISPATCH) FBTrace.sysout("FBL.dispatch", name+" to "+listeners.length+" listeners");
+
+ for (var i = 0; i < listeners.length; ++i)
+ {
+ var listener = listeners[i];
+ if ( listener[name] )
+ listener[name].apply(listener, args);
+ }
+ }
+ else
+ {
+ if (FBTrace.DBG_DISPATCH) FBTrace.sysout("FBL.dispatch", name+" to listeners of an object");
+
+ for (var prop in listeners)
+ {
+ var listener = listeners[prop];
+ if ( listener[name] )
+ listener[name].apply(listener, args);
+ }
+ }
+ }
+ catch (exc)
+ {
+ if (FBTrace.DBG_ERRORS)
+ {
+ FBTrace.sysout(" Exception in lib.dispatch "+ name, exc);
+ //FBTrace.dumpProperties(" Exception in lib.dispatch listener", listener);
+ }
+ }
+ /**/
+};
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+var disableTextSelectionHandler = function(event)
+{
+ FBL.cancelEvent(event, true);
+
+ return false;
+};
+
+this.disableTextSelection = function(e)
+{
+ if (typeof e.onselectstart != "undefined") // IE
+ this.addEvent(e, "selectstart", disableTextSelectionHandler);
+
+ else // others
+ {
+ e.style.cssText = "user-select: none; -khtml-user-select: none; -moz-user-select: none;";
+
+ // canceling the event in FF will prevent the menu popups to close when clicking over
+ // text-disabled elements
+ if (!this.isFirefox)
+ this.addEvent(e, "mousedown", disableTextSelectionHandler);
+ }
+
+ e.style.cursor = "default";
+};
+
+this.restoreTextSelection = function(e)
+{
+ if (typeof e.onselectstart != "undefined") // IE
+ this.removeEvent(e, "selectstart", disableTextSelectionHandler);
+
+ else // others
+ {
+ e.style.cssText = "cursor: default;";
+
+ // canceling the event in FF will prevent the menu popups to close when clicking over
+ // text-disabled elements
+ if (!this.isFirefox)
+ this.removeEvent(e, "mousedown", disableTextSelectionHandler);
+ }
+};
+
+// ************************************************************************************************
+// DOM Events
+
+var eventTypes =
+{
+ composition: [
+ "composition",
+ "compositionstart",
+ "compositionend" ],
+ contextmenu: [
+ "contextmenu" ],
+ drag: [
+ "dragenter",
+ "dragover",
+ "dragexit",
+ "dragdrop",
+ "draggesture" ],
+ focus: [
+ "focus",
+ "blur" ],
+ form: [
+ "submit",
+ "reset",
+ "change",
+ "select",
+ "input" ],
+ key: [
+ "keydown",
+ "keyup",
+ "keypress" ],
+ load: [
+ "load",
+ "beforeunload",
+ "unload",
+ "abort",
+ "error" ],
+ mouse: [
+ "mousedown",
+ "mouseup",
+ "click",
+ "dblclick",
+ "mouseover",
+ "mouseout",
+ "mousemove" ],
+ mutation: [
+ "DOMSubtreeModified",
+ "DOMNodeInserted",
+ "DOMNodeRemoved",
+ "DOMNodeRemovedFromDocument",
+ "DOMNodeInsertedIntoDocument",
+ "DOMAttrModified",
+ "DOMCharacterDataModified" ],
+ paint: [
+ "paint",
+ "resize",
+ "scroll" ],
+ scroll: [
+ "overflow",
+ "underflow",
+ "overflowchanged" ],
+ text: [
+ "text" ],
+ ui: [
+ "DOMActivate",
+ "DOMFocusIn",
+ "DOMFocusOut" ],
+ xul: [
+ "popupshowing",
+ "popupshown",
+ "popuphiding",
+ "popuphidden",
+ "close",
+ "command",
+ "broadcast",
+ "commandupdate" ]
+};
+
+this.getEventFamily = function(eventType)
+{
+ if (!this.families)
+ {
+ this.families = {};
+
+ for (var family in eventTypes)
+ {
+ var types = eventTypes[family];
+ for (var i = 0; i < types.length; ++i)
+ this.families[types[i]] = family;
+ }
+ }
+
+ return this.families[eventType];
+};
+
+
+// ************************************************************************************************
+// URLs
+
+this.getFileName = function(url)
+{
+ var split = this.splitURLBase(url);
+ return split.name;
+};
+
+this.splitURLBase = function(url)
+{
+ if (this.isDataURL(url))
+ return this.splitDataURL(url);
+ return this.splitURLTrue(url);
+};
+
+this.splitDataURL = function(url)
+{
+ var mark = url.indexOf(':', 3);
+ if (mark != 4)
+ return false; // the first 5 chars must be 'data:'
+
+ var point = url.indexOf(',', mark+1);
+ if (point < mark)
+ return false; // syntax error
+
+ var props = { encodedContent: url.substr(point+1) };
+
+ var metadataBuffer = url.substr(mark+1, point);
+ var metadata = metadataBuffer.split(';');
+ for (var i = 0; i < metadata.length; i++)
+ {
+ var nv = metadata[i].split('=');
+ if (nv.length == 2)
+ props[nv[0]] = nv[1];
+ }
+
+ // Additional Firebug-specific properties
+ if (props.hasOwnProperty('fileName'))
+ {
+ var caller_URL = decodeURIComponent(props['fileName']);
+ var caller_split = this.splitURLTrue(caller_URL);
+
+ if (props.hasOwnProperty('baseLineNumber')) // this means it's probably an eval()
+ {
+ props['path'] = caller_split.path;
+ props['line'] = props['baseLineNumber'];
+ var hint = decodeURIComponent(props['encodedContent'].substr(0,200)).replace(/\s*$/, "");
+ props['name'] = 'eval->'+hint;
+ }
+ else
+ {
+ props['name'] = caller_split.name;
+ props['path'] = caller_split.path;
+ }
+ }
+ else
+ {
+ if (!props.hasOwnProperty('path'))
+ props['path'] = "data:";
+ if (!props.hasOwnProperty('name'))
+ props['name'] = decodeURIComponent(props['encodedContent'].substr(0,200)).replace(/\s*$/, "");
+ }
+
+ return props;
+};
+
+this.splitURLTrue = function(url)
+{
+ var m = reSplitFile.exec(url);
+ if (!m)
+ return {name: url, path: url};
+ else if (!m[2])
+ return {path: m[1], name: m[1]};
+ else
+ return {path: m[1], name: m[2]+m[3]};
+};
+
+this.getFileExtension = function(url)
+{
+ if (!url)
+ return null;
+
+ // Remove query string from the URL if any.
+ var queryString = url.indexOf("?");
+ if (queryString != -1)
+ url = url.substr(0, queryString);
+
+ // Now get the file extension.
+ var lastDot = url.lastIndexOf(".");
+ return url.substr(lastDot+1);
+};
+
+this.isSystemURL = function(url)
+{
+ if (!url) return true;
+ if (url.length == 0) return true;
+ if (url[0] == 'h') return false;
+ if (url.substr(0, 9) == "resource:")
+ return true;
+ else if (url.substr(0, 16) == "chrome://firebug")
+ return true;
+ else if (url == "XPCSafeJSObjectWrapper.cpp")
+ return true;
+ else if (url.substr(0, 6) == "about:")
+ return true;
+ else if (url.indexOf("firebug-service.js") != -1)
+ return true;
+ else
+ return false;
+};
+
+this.isSystemPage = function(win)
+{
+ try
+ {
+ var doc = win.document;
+ if (!doc)
+ return false;
+
+ // Detect pages for pretty printed XML
+ if ((doc.styleSheets.length && doc.styleSheets[0].href
+ == "chrome://global/content/xml/XMLPrettyPrint.css")
+ || (doc.styleSheets.length > 1 && doc.styleSheets[1].href
+ == "chrome://browser/skin/feeds/subscribe.css"))
+ return true;
+
+ return FBL.isSystemURL(win.location.href);
+ }
+ catch (exc)
+ {
+ // Sometimes documents just aren't ready to be manipulated here, but don't let that
+ // gum up the works
+ ERROR("tabWatcher.isSystemPage document not ready:"+ exc);
+ return false;
+ }
+};
+
+this.isSystemStyleSheet = function(sheet)
+{
+ var href = sheet && sheet.href;
+ return href && FBL.isSystemURL(href);
+};
+
+this.getURIHost = function(uri)
+{
+ try
+ {
+ if (uri)
+ return uri.host;
+ else
+ return "";
+ }
+ catch (exc)
+ {
+ return "";
+ }
+};
+
+this.isLocalURL = function(url)
+{
+ if (url.substr(0, 5) == "file:")
+ return true;
+ else if (url.substr(0, 8) == "wyciwyg:")
+ return true;
+ else
+ return false;
+};
+
+this.isDataURL = function(url)
+{
+ return (url && url.substr(0,5) == "data:");
+};
+
+this.getLocalPath = function(url)
+{
+ if (this.isLocalURL(url))
+ {
+ var fileHandler = ioService.getProtocolHandler("file").QueryInterface(Ci.nsIFileProtocolHandler);
+ var file = fileHandler.getFileFromURLSpec(url);
+ return file.path;
+ }
+};
+
+this.getURLFromLocalFile = function(file)
+{
+ var fileHandler = ioService.getProtocolHandler("file").QueryInterface(Ci.nsIFileProtocolHandler);
+ var URL = fileHandler.getURLSpecFromFile(file);
+ return URL;
+};
+
+this.getDataURLForContent = function(content, url)
+{
+ // data:text/javascript;fileName=x%2Cy.js;baseLineNumber=10,<the-url-encoded-data>
+ var uri = "data:text/html;";
+ uri += "fileName="+encodeURIComponent(url)+ ",";
+ uri += encodeURIComponent(content);
+ return uri;
+},
+
+this.getDomain = function(url)
+{
+ var m = /[^:]+:\/{1,3}([^\/]+)/.exec(url);
+ return m ? m[1] : "";
+};
+
+this.getURLPath = function(url)
+{
+ var m = /[^:]+:\/{1,3}[^\/]+(\/.*?)$/.exec(url);
+ return m ? m[1] : "";
+};
+
+this.getPrettyDomain = function(url)
+{
+ var m = /[^:]+:\/{1,3}(www\.)?([^\/]+)/.exec(url);
+ return m ? m[2] : "";
+};
+
+this.absoluteURL = function(url, baseURL)
+{
+ return this.absoluteURLWithDots(url, baseURL).replace("/./", "/", "g");
+};
+
+this.absoluteURLWithDots = function(url, baseURL)
+{
+ if (url[0] == "?")
+ return baseURL + url;
+
+ var reURL = /(([^:]+:)\/{1,2}[^\/]*)(.*?)$/;
+ var m = reURL.exec(url);
+ if (m)
+ return url;
+
+ var m = reURL.exec(baseURL);
+ if (!m)
+ return "";
+
+ var head = m[1];
+ var tail = m[3];
+ if (url.substr(0, 2) == "//")
+ return m[2] + url;
+ else if (url[0] == "/")
+ {
+ return head + url;
+ }
+ else if (tail[tail.length-1] == "/")
+ return baseURL + url;
+ else
+ {
+ var parts = tail.split("/");
+ return head + parts.slice(0, parts.length-1).join("/") + "/" + url;
+ }
+};
+
+this.normalizeURL = function(url) // this gets called a lot, any performance improvement welcome
+{
+ if (!url)
+ return "";
+ // Replace one or more characters that are not forward-slash followed by /.., by space.
+ if (url.length < 255) // guard against monsters.
+ {
+ // Replace one or more characters that are not forward-slash followed by /.., by space.
+ url = url.replace(/[^\/]+\/\.\.\//, "", "g");
+ // Issue 1496, avoid #
+ url = url.replace(/#.*/,"");
+ // For some reason, JSDS reports file URLs like "file:/" instead of "file:///", so they
+ // don't match up with the URLs we get back from the DOM
+ url = url.replace(/file:\/([^\/])/g, "file:///$1");
+ if (url.indexOf('chrome:')==0)
+ {
+ var m = reChromeCase.exec(url); // 1 is package name, 2 is path
+ if (m)
+ {
+ url = "chrome://"+m[1].toLowerCase()+"/"+m[2];
+ }
+ }
+ }
+ return url;
+};
+
+this.denormalizeURL = function(url)
+{
+ return url.replace(/file:\/\/\//g, "file:/");
+};
+
+this.parseURLParams = function(url)
+{
+ var q = url ? url.indexOf("?") : -1;
+ if (q == -1)
+ return [];
+
+ var search = url.substr(q+1);
+ var h = search.lastIndexOf("#");
+ if (h != -1)
+ search = search.substr(0, h);
+
+ if (!search)
+ return [];
+
+ return this.parseURLEncodedText(search);
+};
+
+this.parseURLEncodedText = function(text)
+{
+ var maxValueLength = 25000;
+
+ var params = [];
+
+ // Unescape '+' characters that are used to encode a space.
+ // See section 2.2.in RFC 3986: http://www.ietf.org/rfc/rfc3986.txt
+ text = text.replace(/\+/g, " ");
+
+ var args = text.split("&");
+ for (var i = 0; i < args.length; ++i)
+ {
+ try {
+ var parts = args[i].split("=");
+ if (parts.length == 2)
+ {
+ if (parts[1].length > maxValueLength)
+ parts[1] = this.$STR("LargeData");
+
+ params.push({name: decodeURIComponent(parts[0]), value: decodeURIComponent(parts[1])});
+ }
+ else
+ params.push({name: decodeURIComponent(parts[0]), value: ""});
+ }
+ catch (e)
+ {
+ if (FBTrace.DBG_ERRORS)
+ {
+ FBTrace.sysout("parseURLEncodedText EXCEPTION ", e);
+ FBTrace.sysout("parseURLEncodedText EXCEPTION URI", args[i]);
+ }
+ }
+ }
+
+ params.sort(function(a, b) { return a.name <= b.name ? -1 : 1; });
+
+ return params;
+};
+
+// TODO: xxxpedro lib. why loops in domplate are requiring array in parameters
+// as in response/request headers and get/post parameters in Net module?
+this.parseURLParamsArray = function(url)
+{
+ var q = url ? url.indexOf("?") : -1;
+ if (q == -1)
+ return [];
+
+ var search = url.substr(q+1);
+ var h = search.lastIndexOf("#");
+ if (h != -1)
+ search = search.substr(0, h);
+
+ if (!search)
+ return [];
+
+ return this.parseURLEncodedTextArray(search);
+};
+
+this.parseURLEncodedTextArray = function(text)
+{
+ var maxValueLength = 25000;
+
+ var params = [];
+
+ // Unescape '+' characters that are used to encode a space.
+ // See section 2.2.in RFC 3986: http://www.ietf.org/rfc/rfc3986.txt
+ text = text.replace(/\+/g, " ");
+
+ var args = text.split("&");
+ for (var i = 0; i < args.length; ++i)
+ {
+ try {
+ var parts = args[i].split("=");
+ if (parts.length == 2)
+ {
+ if (parts[1].length > maxValueLength)
+ parts[1] = this.$STR("LargeData");
+
+ params.push({name: decodeURIComponent(parts[0]), value: [decodeURIComponent(parts[1])]});
+ }
+ else
+ params.push({name: decodeURIComponent(parts[0]), value: [""]});
+ }
+ catch (e)
+ {
+ if (FBTrace.DBG_ERRORS)
+ {
+ FBTrace.sysout("parseURLEncodedText EXCEPTION ", e);
+ FBTrace.sysout("parseURLEncodedText EXCEPTION URI", args[i]);
+ }
+ }
+ }
+
+ params.sort(function(a, b) { return a.name <= b.name ? -1 : 1; });
+
+ return params;
+};
+
+this.reEncodeURL = function(file, text)
+{
+ var lines = text.split("\n");
+ var params = this.parseURLEncodedText(lines[lines.length-1]);
+
+ var args = [];
+ for (var i = 0; i < params.length; ++i)
+ args.push(encodeURIComponent(params[i].name)+"="+encodeURIComponent(params[i].value));
+
+ var url = file.href;
+ url += (url.indexOf("?") == -1 ? "?" : "&") + args.join("&");
+
+ return url;
+};
+
+this.getResource = function(aURL)
+{
+ try
+ {
+ var channel=ioService.newChannel(aURL,null,null);
+ var input=channel.open();
+ return FBL.readFromStream(input);
+ }
+ catch (e)
+ {
+ if (FBTrace.DBG_ERRORS)
+ FBTrace.sysout("lib.getResource FAILS for "+aURL, e);
+ }
+};
+
+this.parseJSONString = function(jsonString, originURL)
+{
+ // See if this is a Prototype style *-secure request.
+ var regex = new RegExp(/^\/\*-secure-([\s\S]*)\*\/\s*$/);
+ var matches = regex.exec(jsonString);
+
+ if (matches)
+ {
+ jsonString = matches[1];
+
+ if (jsonString[0] == "\\" && jsonString[1] == "n")
+ jsonString = jsonString.substr(2);
+
+ if (jsonString[jsonString.length-2] == "\\" && jsonString[jsonString.length-1] == "n")
+ jsonString = jsonString.substr(0, jsonString.length-2);
+ }
+
+ if (jsonString.indexOf("&&&START&&&"))
+ {
+ regex = new RegExp(/&&&START&&& (.+) &&&END&&&/);
+ matches = regex.exec(jsonString);
+ if (matches)
+ jsonString = matches[1];
+ }
+
+ // throw on the extra parentheses
+ jsonString = "(" + jsonString + ")";
+
+ ///var s = Components.utils.Sandbox(originURL);
+ var jsonObject = null;
+
+ try
+ {
+ ///jsonObject = Components.utils.evalInSandbox(jsonString, s);
+
+ //jsonObject = Firebug.context.eval(jsonString);
+ jsonObject = Firebug.context.evaluate(jsonString, null, null, function(){return null;});
+ }
+ catch(e)
+ {
+ /***
+ if (e.message.indexOf("is not defined"))
+ {
+ var parts = e.message.split(" ");
+ s[parts[0]] = function(str){ return str; };
+ try {
+ jsonObject = Components.utils.evalInSandbox(jsonString, s);
+ } catch(ex) {
+ if (FBTrace.DBG_ERRORS || FBTrace.DBG_JSONVIEWER)
+ FBTrace.sysout("jsonviewer.parseJSON EXCEPTION", e);
+ return null;
+ }
+ }
+ else
+ {/**/
+ if (FBTrace.DBG_ERRORS || FBTrace.DBG_JSONVIEWER)
+ FBTrace.sysout("jsonviewer.parseJSON EXCEPTION", e);
+ return null;
+ ///}
+ }
+
+ return jsonObject;
+};
+
+// ************************************************************************************************
+
+this.objectToString = function(object)
+{
+ try
+ {
+ return object+"";
+ }
+ catch (exc)
+ {
+ return null;
+ }
+};
+
+// ************************************************************************************************
+// Input Caret Position
+
+this.setSelectionRange = function(input, start, length)
+{
+ if (input.createTextRange)
+ {
+ var range = input.createTextRange();
+ range.moveStart("character", start);
+ range.moveEnd("character", length - input.value.length);
+ range.select();
+ }
+ else if (input.setSelectionRange)
+ {
+ input.setSelectionRange(start, length);
+ input.focus();
+ }
+};
+
+// ************************************************************************************************
+// Input Selection Start / Caret Position
+
+this.getInputSelectionStart = function(input)
+{
+ if (document.selection)
+ {
+ var range = input.ownerDocument.selection.createRange();
+ var text = range.text;
+
+ //console.log("range", range.text);
+
+ // if there is a selection, find the start position
+ if (text)
+ {
+ return input.value.indexOf(text);
+ }
+ // if there is no selection, find the caret position
+ else
+ {
+ range.moveStart("character", -input.value.length);
+
+ return range.text.length;
+ }
+ }
+ else if (typeof input.selectionStart != "undefined")
+ return input.selectionStart;
+
+ return 0;
+};
+
+// ************************************************************************************************
+// Opera Tab Fix
+
+function onOperaTabBlur(e)
+{
+ if (this.lastKey == 9)
+ this.focus();
+};
+
+function onOperaTabKeyDown(e)
+{
+ this.lastKey = e.keyCode;
+};
+
+function onOperaTabFocus(e)
+{
+ this.lastKey = null;
+};
+
+this.fixOperaTabKey = function(el)
+{
+ el.onfocus = onOperaTabFocus;
+ el.onblur = onOperaTabBlur;
+ el.onkeydown = onOperaTabKeyDown;
+};
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+this.Property = function(object, name)
+{
+ this.object = object;
+ this.name = name;
+
+ this.getObject = function()
+ {
+ return object[name];
+ };
+};
+
+this.ErrorCopy = function(message)
+{
+ this.message = message;
+};
+
+function EventCopy(event)
+{
+ // Because event objects are destroyed arbitrarily by Gecko, we must make a copy of them to
+ // represent them long term in the inspector.
+ for (var name in event)
+ {
+ try {
+ this[name] = event[name];
+ } catch (exc) { }
+ }
+}
+
+this.EventCopy = EventCopy;
+
+
+// ************************************************************************************************
+// Type Checking
+
+var toString = Object.prototype.toString;
+var reFunction = /^\s*function(\s+[\w_$][\w\d_$]*)?\s*\(/;
+
+this.isArray = function(object) {
+ return toString.call(object) === '[object Array]';
+};
+
+this.isFunction = function(object) {
+ if (!object) return false;
+
+ try
+ {
+ // FIXME: xxxpedro this is failing in IE for the global "external" object
+ return toString.call(object) === "[object Function]" ||
+ this.isIE && typeof object != "string" && reFunction.test(""+object);
+ }
+ catch (E)
+ {
+ FBTrace.sysout("Lib.isFunction() failed for ", object);
+ return false;
+ }
+};
+
+
+// ************************************************************************************************
+// Instance Checking
+
+this.instanceOf = function(object, className)
+{
+ if (!object || typeof object != "object")
+ return false;
+
+ // Try to use the native instanceof operator. We can only use it when we know
+ // exactly the window where the object is located at
+ if (object.ownerDocument)
+ {
+ // find the correct window of the object
+ var win = object.ownerDocument.defaultView || object.ownerDocument.parentWindow;
+
+ // if the class is accessible in the window, uses the native instanceof operator
+ // if the instanceof evaluates to "true" we can assume it is a instance, but if it
+ // evaluates to "false" we must continue with the duck type detection below because
+ // the native object may be extended, thus breaking the instanceof result
+ // See Issue 3524: Firebug Lite Style Panel doesn't work if the native Element is extended
+ if (className in win && object instanceof win[className])
+ return true;
+ }
+ // If the object doesn't have the ownerDocument property, we'll try to look at
+ // the current context's window
+ else
+ {
+ // TODO: xxxpedro context
+ // Since we're not using yet a Firebug.context, we'll just use the top window
+ // (browser) as a reference
+ var win = Firebug.browser.window;
+ if (className in win)
+ return object instanceof win[className];
+ }
+
+ // get the duck type model from the cache
+ var cache = instanceCheckMap[className];
+ if (!cache)
+ return false;
+
+ // starts the hacky duck type detection
+ for(var n in cache)
+ {
+ var obj = cache[n];
+ var type = typeof obj;
+ obj = type == "object" ? obj : [obj];
+
+ for(var name in obj)
+ {
+ // avoid problems with extended native objects
+ // See Issue 3524: Firebug Lite Style Panel doesn't work if the native Element is extended
+ if (!obj.hasOwnProperty(name))
+ continue;
+
+ var value = obj[name];
+
+ if( n == "property" && !(value in object) ||
+ n == "method" && !this.isFunction(object[value]) ||
+ n == "value" && (""+object[name]).toLowerCase() != (""+value).toLowerCase() )
+ return false;
+ }
+ }
+
+ return true;
+};
+
+var instanceCheckMap =
+{
+ // DuckTypeCheck:
+ // {
+ // property: ["window", "document"],
+ // method: "setTimeout",
+ // value: {nodeType: 1}
+ // },
+
+ Window:
+ {
+ property: ["window", "document"],
+ method: "setTimeout"
+ },
+
+ Document:
+ {
+ property: ["body", "cookie"],
+ method: "getElementById"
+ },
+
+ Node:
+ {
+ property: "ownerDocument",
+ method: "appendChild"
+ },
+
+ Element:
+ {
+ property: "tagName",
+ value: {nodeType: 1}
+ },
+
+ Location:
+ {
+ property: ["hostname", "protocol"],
+ method: "assign"
+ },
+
+ HTMLImageElement:
+ {
+ property: "useMap",
+ value:
+ {
+ nodeType: 1,
+ tagName: "img"
+ }
+ },
+
+ HTMLAnchorElement:
+ {
+ property: "hreflang",
+ value:
+ {
+ nodeType: 1,
+ tagName: "a"
+ }
+ },
+
+ HTMLInputElement:
+ {
+ property: "form",
+ value:
+ {
+ nodeType: 1,
+ tagName: "input"
+ }
+ },
+
+ HTMLButtonElement:
+ {
+ // ?
+ },
+
+ HTMLFormElement:
+ {
+ method: "submit",
+ value:
+ {
+ nodeType: 1,
+ tagName: "form"
+ }
+ },
+
+ HTMLBodyElement:
+ {
+
+ },
+
+ HTMLHtmlElement:
+ {
+
+ },
+
+ CSSStyleRule:
+ {
+ property: ["selectorText", "style"]
+ }
+
+};
+
+
+// ************************************************************************************************
+// DOM Constants
+
+/*
+
+Problems:
+
+ - IE does not have window.Node, window.Element, etc
+ - for (var name in Node.prototype) return nothing on FF
+
+*/
+
+
+var domMemberMap2 = {};
+
+var domMemberMap2Sandbox = null;
+
+var getDomMemberMap2 = function(name)
+{
+ if (!domMemberMap2Sandbox)
+ {
+ var doc = Firebug.chrome.document;
+ var frame = doc.createElement("iframe");
+
+ frame.id = "FirebugSandbox";
+ frame.style.display = "none";
+ frame.src = "about:blank";
+
+ doc.body.appendChild(frame);
+
+ domMemberMap2Sandbox = frame.window || frame.contentWindow;
+ }
+
+ var props = [];
+
+ //var object = domMemberMap2Sandbox[name];
+ //object = object.prototype || object;
+
+ var object = null;
+
+ if (name == "Window")
+ object = domMemberMap2Sandbox.window;
+
+ else if (name == "Document")
+ object = domMemberMap2Sandbox.document;
+
+ else if (name == "HTMLScriptElement")
+ object = domMemberMap2Sandbox.document.createElement("script");
+
+ else if (name == "HTMLAnchorElement")
+ object = domMemberMap2Sandbox.document.createElement("a");
+
+ else if (name.indexOf("Element") != -1)
+ {
+ object = domMemberMap2Sandbox.document.createElement("div");
+ }
+
+ if (object)
+ {
+ //object = object.prototype || object;
+
+ //props = 'addEventListener,document,location,navigator,window'.split(',');
+
+ for (var n in object)
+ props.push(n);
+ }
+ /**/
+
+ return props;
+ return extendArray(props, domMemberMap[name]);
+};
+
+// xxxpedro experimental get DOM members
+this.getDOMMembers = function(object)
+{
+ if (!domMemberCache)
+ {
+ FBL.domMemberCache = domMemberCache = {};
+
+ for (var name in domMemberMap)
+ {
+ var builtins = getDomMemberMap2(name);
+ var cache = domMemberCache[name] = {};
+
+ /*
+ if (name.indexOf("Element") != -1)
+ {
+ this.append(cache, this.getDOMMembers("Node"));
+ this.append(cache, this.getDOMMembers("Element"));
+ }
+ /**/
+
+ for (var i = 0; i < builtins.length; ++i)
+ cache[builtins[i]] = i;
+ }
+ }
+
+ try
+ {
+ if (this.instanceOf(object, "Window"))
+ { return domMemberCache.Window; }
+ else if (this.instanceOf(object, "Document") || this.instanceOf(object, "XMLDocument"))
+ { return domMemberCache.Document; }
+ else if (this.instanceOf(object, "Location"))
+ { return domMemberCache.Location; }
+ else if (this.instanceOf(object, "HTMLImageElement"))
+ { return domMemberCache.HTMLImageElement; }
+ else if (this.instanceOf(object, "HTMLAnchorElement"))
+ { return domMemberCache.HTMLAnchorElement; }
+ else if (this.instanceOf(object, "HTMLInputElement"))
+ { return domMemberCache.HTMLInputElement; }
+ else if (this.instanceOf(object, "HTMLButtonElement"))
+ { return domMemberCache.HTMLButtonElement; }
+ else if (this.instanceOf(object, "HTMLFormElement"))
+ { return domMemberCache.HTMLFormElement; }
+ else if (this.instanceOf(object, "HTMLBodyElement"))
+ { return domMemberCache.HTMLBodyElement; }
+ else if (this.instanceOf(object, "HTMLHtmlElement"))
+ { return domMemberCache.HTMLHtmlElement; }
+ else if (this.instanceOf(object, "HTMLScriptElement"))
+ { return domMemberCache.HTMLScriptElement; }
+ else if (this.instanceOf(object, "HTMLTableElement"))
+ { return domMemberCache.HTMLTableElement; }
+ else if (this.instanceOf(object, "HTMLTableRowElement"))
+ { return domMemberCache.HTMLTableRowElement; }
+ else if (this.instanceOf(object, "HTMLTableCellElement"))
+ { return domMemberCache.HTMLTableCellElement; }
+ else if (this.instanceOf(object, "HTMLIFrameElement"))
+ { return domMemberCache.HTMLIFrameElement; }
+ else if (this.instanceOf(object, "SVGSVGElement"))
+ { return domMemberCache.SVGSVGElement; }
+ else if (this.instanceOf(object, "SVGElement"))
+ { return domMemberCache.SVGElement; }
+ else if (this.instanceOf(object, "Element"))
+ { return domMemberCache.Element; }
+ else if (this.instanceOf(object, "Text") || this.instanceOf(object, "CDATASection"))
+ { return domMemberCache.Text; }
+ else if (this.instanceOf(object, "Attr"))
+ { return domMemberCache.Attr; }
+ else if (this.instanceOf(object, "Node"))
+ { return domMemberCache.Node; }
+ else if (this.instanceOf(object, "Event") || this.instanceOf(object, "EventCopy"))
+ { return domMemberCache.Event; }
+ else
+ return {};
+ }
+ catch(E)
+ {
+ if (FBTrace.DBG_ERRORS)
+ FBTrace.sysout("lib.getDOMMembers FAILED ", E);
+
+ return {};
+ }
+};
+
+
+/*
+this.getDOMMembers = function(object)
+{
+ if (!domMemberCache)
+ {
+ domMemberCache = {};
+
+ for (var name in domMemberMap)
+ {
+ var builtins = domMemberMap[name];
+ var cache = domMemberCache[name] = {};
+
+ for (var i = 0; i < builtins.length; ++i)
+ cache[builtins[i]] = i;
+ }
+ }
+
+ try
+ {
+ if (this.instanceOf(object, "Window"))
+ { return domMemberCache.Window; }
+ else if (object instanceof Document || object instanceof XMLDocument)
+ { return domMemberCache.Document; }
+ else if (object instanceof Location)
+ { return domMemberCache.Location; }
+ else if (object instanceof HTMLImageElement)
+ { return domMemberCache.HTMLImageElement; }
+ else if (object instanceof HTMLAnchorElement)
+ { return domMemberCache.HTMLAnchorElement; }
+ else if (object instanceof HTMLInputElement)
+ { return domMemberCache.HTMLInputElement; }
+ else if (object instanceof HTMLButtonElement)
+ { return domMemberCache.HTMLButtonElement; }
+ else if (object instanceof HTMLFormElement)
+ { return domMemberCache.HTMLFormElement; }
+ else if (object instanceof HTMLBodyElement)
+ { return domMemberCache.HTMLBodyElement; }
+ else if (object instanceof HTMLHtmlElement)
+ { return domMemberCache.HTMLHtmlElement; }
+ else if (object instanceof HTMLScriptElement)
+ { return domMemberCache.HTMLScriptElement; }
+ else if (object instanceof HTMLTableElement)
+ { return domMemberCache.HTMLTableElement; }
+ else if (object instanceof HTMLTableRowElement)
+ { return domMemberCache.HTMLTableRowElement; }
+ else if (object instanceof HTMLTableCellElement)
+ { return domMemberCache.HTMLTableCellElement; }
+ else if (object instanceof HTMLIFrameElement)
+ { return domMemberCache.HTMLIFrameElement; }
+ else if (object instanceof SVGSVGElement)
+ { return domMemberCache.SVGSVGElement; }
+ else if (object instanceof SVGElement)
+ { return domMemberCache.SVGElement; }
+ else if (object instanceof Element)
+ { return domMemberCache.Element; }
+ else if (object instanceof Text || object instanceof CDATASection)
+ { return domMemberCache.Text; }
+ else if (object instanceof Attr)
+ { return domMemberCache.Attr; }
+ else if (object instanceof Node)
+ { return domMemberCache.Node; }
+ else if (object instanceof Event || object instanceof EventCopy)
+ { return domMemberCache.Event; }
+ else
+ return {};
+ }
+ catch(E)
+ {
+ return {};
+ }
+};
+/**/
+
+this.isDOMMember = function(object, propName)
+{
+ var members = this.getDOMMembers(object);
+ return members && propName in members;
+};
+
+var domMemberCache = null;
+var domMemberMap = {};
+
+domMemberMap.Window =
+[
+ "document",
+ "frameElement",
+
+ "innerWidth",
+ "innerHeight",
+ "outerWidth",
+ "outerHeight",
+ "screenX",
+ "screenY",
+ "pageXOffset",
+ "pageYOffset",
+ "scrollX",
+ "scrollY",
+ "scrollMaxX",
+ "scrollMaxY",
+
+ "status",
+ "defaultStatus",
+
+ "parent",
+ "opener",
+ "top",
+ "window",
+ "content",
+ "self",
+
+ "location",
+ "history",
+ "frames",
+ "navigator",
+ "screen",
+ "menubar",
+ "toolbar",
+ "locationbar",
+ "personalbar",
+ "statusbar",
+ "directories",
+ "scrollbars",
+ "fullScreen",
+ "netscape",
+ "java",
+ "console",
+ "Components",
+ "controllers",
+ "closed",
+ "crypto",
+ "pkcs11",
+
+ "name",
+ "property",
+ "length",
+
+ "sessionStorage",
+ "globalStorage",
+
+ "setTimeout",
+ "setInterval",
+ "clearTimeout",
+ "clearInterval",
+ "addEventListener",
+ "removeEventListener",
+ "dispatchEvent",
+ "getComputedStyle",
+ "captureEvents",
+ "releaseEvents",
+ "routeEvent",
+ "enableExternalCapture",
+ "disableExternalCapture",
+ "moveTo",
+ "moveBy",
+ "resizeTo",
+ "resizeBy",
+ "scroll",
+ "scrollTo",
+ "scrollBy",
+ "scrollByLines",
+ "scrollByPages",
+ "sizeToContent",
+ "setResizable",
+ "getSelection",
+ "open",
+ "openDialog",
+ "close",
+ "alert",
+ "confirm",
+ "prompt",
+ "dump",
+ "focus",
+ "blur",
+ "find",
+ "back",
+ "forward",
+ "home",
+ "stop",
+ "print",
+ "atob",
+ "btoa",
+ "updateCommands",
+ "XPCNativeWrapper",
+ "GeckoActiveXObject",
+ "applicationCache" // FF3
+];
+
+domMemberMap.Location =
+[
+ "href",
+ "protocol",
+ "host",
+ "hostname",
+ "port",
+ "pathname",
+ "search",
+ "hash",
+
+ "assign",
+ "reload",
+ "replace"
+];
+
+domMemberMap.Node =
+[
+ "id",
+ "className",
+
+ "nodeType",
+ "tagName",
+ "nodeName",
+ "localName",
+ "prefix",
+ "namespaceURI",
+ "nodeValue",
+
+ "ownerDocument",
+ "parentNode",
+ "offsetParent",
+ "nextSibling",
+ "previousSibling",
+ "firstChild",
+ "lastChild",
+ "childNodes",
+ "attributes",
+
+ "dir",
+ "baseURI",
+ "textContent",
+ "innerHTML",
+
+ "addEventListener",
+ "removeEventListener",
+ "dispatchEvent",
+ "cloneNode",
+ "appendChild",
+ "insertBefore",
+ "replaceChild",
+ "removeChild",
+ "compareDocumentPosition",
+ "hasAttributes",
+ "hasChildNodes",
+ "lookupNamespaceURI",
+ "lookupPrefix",
+ "normalize",
+ "isDefaultNamespace",
+ "isEqualNode",
+ "isSameNode",
+ "isSupported",
+ "getFeature",
+ "getUserData",
+ "setUserData"
+];
+
+domMemberMap.Document = extendArray(domMemberMap.Node,
+[
+ "documentElement",
+ "body",
+ "title",
+ "location",
+ "referrer",
+ "cookie",
+ "contentType",
+ "lastModified",
+ "characterSet",
+ "inputEncoding",
+ "xmlEncoding",
+ "xmlStandalone",
+ "xmlVersion",
+ "strictErrorChecking",
+ "documentURI",
+ "URL",
+
+ "defaultView",
+ "doctype",
+ "implementation",
+ "styleSheets",
+ "images",
+ "links",
+ "forms",
+ "anchors",
+ "embeds",
+ "plugins",
+ "applets",
+
+ "width",
+ "height",
+
+ "designMode",
+ "compatMode",
+ "async",
+ "preferredStylesheetSet",
+
+ "alinkColor",
+ "linkColor",
+ "vlinkColor",
+ "bgColor",
+ "fgColor",
+ "domain",
+
+ "addEventListener",
+ "removeEventListener",
+ "dispatchEvent",
+ "captureEvents",
+ "releaseEvents",
+ "routeEvent",
+ "clear",
+ "open",
+ "close",
+ "execCommand",
+ "execCommandShowHelp",
+ "getElementsByName",
+ "getSelection",
+ "queryCommandEnabled",
+ "queryCommandIndeterm",
+ "queryCommandState",
+ "queryCommandSupported",
+ "queryCommandText",
+ "queryCommandValue",
+ "write",
+ "writeln",
+ "adoptNode",
+ "appendChild",
+ "removeChild",
+ "renameNode",
+ "cloneNode",
+ "compareDocumentPosition",
+ "createAttribute",
+ "createAttributeNS",
+ "createCDATASection",
+ "createComment",
+ "createDocumentFragment",
+ "createElement",
+ "createElementNS",
+ "createEntityReference",
+ "createEvent",
+ "createExpression",
+ "createNSResolver",
+ "createNodeIterator",
+ "createProcessingInstruction",
+ "createRange",
+ "createTextNode",
+ "createTreeWalker",
+ "domConfig",
+ "evaluate",
+ "evaluateFIXptr",
+ "evaluateXPointer",
+ "getAnonymousElementByAttribute",
+ "getAnonymousNodes",
+ "addBinding",
+ "removeBinding",
+ "getBindingParent",
+ "getBoxObjectFor",
+ "setBoxObjectFor",
+ "getElementById",
+ "getElementsByTagName",
+ "getElementsByTagNameNS",
+ "hasAttributes",
+ "hasChildNodes",
+ "importNode",
+ "insertBefore",
+ "isDefaultNamespace",
+ "isEqualNode",
+ "isSameNode",
+ "isSupported",
+ "load",
+ "loadBindingDocument",
+ "lookupNamespaceURI",
+ "lookupPrefix",
+ "normalize",
+ "normalizeDocument",
+ "getFeature",
+ "getUserData",
+ "setUserData"
+]);
+
+domMemberMap.Element = extendArray(domMemberMap.Node,
+[
+ "clientWidth",
+ "clientHeight",
+ "offsetLeft",
+ "offsetTop",
+ "offsetWidth",
+ "offsetHeight",
+ "scrollLeft",
+ "scrollTop",
+ "scrollWidth",
+ "scrollHeight",
+
+ "style",
+
+ "tabIndex",
+ "title",
+ "lang",
+ "align",
+ "spellcheck",
+
+ "addEventListener",
+ "removeEventListener",
+ "dispatchEvent",
+ "focus",
+ "blur",
+ "cloneNode",
+ "appendChild",
+ "insertBefore",
+ "replaceChild",
+ "removeChild",
+ "compareDocumentPosition",
+ "getElementsByTagName",
+ "getElementsByTagNameNS",
+ "getAttribute",
+ "getAttributeNS",
+ "getAttributeNode",
+ "getAttributeNodeNS",
+ "setAttribute",
+ "setAttributeNS",
+ "setAttributeNode",
+ "setAttributeNodeNS",
+ "removeAttribute",
+ "removeAttributeNS",
+ "removeAttributeNode",
+ "hasAttribute",
+ "hasAttributeNS",
+ "hasAttributes",
+ "hasChildNodes",
+ "lookupNamespaceURI",
+ "lookupPrefix",
+ "normalize",
+ "isDefaultNamespace",
+ "isEqualNode",
+ "isSameNode",
+ "isSupported",
+ "getFeature",
+ "getUserData",
+ "setUserData"
+]);
+
+domMemberMap.SVGElement = extendArray(domMemberMap.Element,
+[
+ "x",
+ "y",
+ "width",
+ "height",
+ "rx",
+ "ry",
+ "transform",
+ "href",
+
+ "ownerSVGElement",
+ "viewportElement",
+ "farthestViewportElement",
+ "nearestViewportElement",
+
+ "getBBox",
+ "getCTM",
+ "getScreenCTM",
+ "getTransformToElement",
+ "getPresentationAttribute",
+ "preserveAspectRatio"
+]);
+
+domMemberMap.SVGSVGElement = extendArray(domMemberMap.Element,
+[
+ "x",
+ "y",
+ "width",
+ "height",
+ "rx",
+ "ry",
+ "transform",
+
+ "viewBox",
+ "viewport",
+ "currentView",
+ "useCurrentView",
+ "pixelUnitToMillimeterX",
+ "pixelUnitToMillimeterY",
+ "screenPixelToMillimeterX",
+ "screenPixelToMillimeterY",
+ "currentScale",
+ "currentTranslate",
+ "zoomAndPan",
+
+ "ownerSVGElement",
+ "viewportElement",
+ "farthestViewportElement",
+ "nearestViewportElement",
+ "contentScriptType",
+ "contentStyleType",
+
+ "getBBox",
+ "getCTM",
+ "getScreenCTM",
+ "getTransformToElement",
+ "getEnclosureList",
+ "getIntersectionList",
+ "getViewboxToViewportTransform",
+ "getPresentationAttribute",
+ "getElementById",
+ "checkEnclosure",
+ "checkIntersection",
+ "createSVGAngle",
+ "createSVGLength",
+ "createSVGMatrix",
+ "createSVGNumber",
+ "createSVGPoint",
+ "createSVGRect",
+ "createSVGString",
+ "createSVGTransform",
+ "createSVGTransformFromMatrix",
+ "deSelectAll",
+ "preserveAspectRatio",
+ "forceRedraw",
+ "suspendRedraw",
+ "unsuspendRedraw",
+ "unsuspendRedrawAll",
+ "getCurrentTime",
+ "setCurrentTime",
+ "animationsPaused",
+ "pauseAnimations",
+ "unpauseAnimations"
+]);
+
+domMemberMap.HTMLImageElement = extendArray(domMemberMap.Element,
+[
+ "src",
+ "naturalWidth",
+ "naturalHeight",
+ "width",
+ "height",
+ "x",
+ "y",
+ "name",
+ "alt",
+ "longDesc",
+ "lowsrc",
+ "border",
+ "complete",
+ "hspace",
+ "vspace",
+ "isMap",
+ "useMap"
+]);
+
+domMemberMap.HTMLAnchorElement = extendArray(domMemberMap.Element,
+[
+ "name",
+ "target",
+ "accessKey",
+ "href",
+ "protocol",
+ "host",
+ "hostname",
+ "port",
+ "pathname",
+ "search",
+ "hash",
+ "hreflang",
+ "coords",
+ "shape",
+ "text",
+ "type",
+ "rel",
+ "rev",
+ "charset"
+]);
+
+domMemberMap.HTMLIFrameElement = extendArray(domMemberMap.Element,
+[
+ "contentDocument",
+ "contentWindow",
+ "frameBorder",
+ "height",
+ "longDesc",
+ "marginHeight",
+ "marginWidth",
+ "name",
+ "scrolling",
+ "src",
+ "width"
+]);
+
+domMemberMap.HTMLTableElement = extendArray(domMemberMap.Element,
+[
+ "bgColor",
+ "border",
+ "caption",
+ "cellPadding",
+ "cellSpacing",
+ "frame",
+ "rows",
+ "rules",
+ "summary",
+ "tBodies",
+ "tFoot",
+ "tHead",
+ "width",
+
+ "createCaption",
+ "createTFoot",
+ "createTHead",
+ "deleteCaption",
+ "deleteRow",
+ "deleteTFoot",
+ "deleteTHead",
+ "insertRow"
+]);
+
+domMemberMap.HTMLTableRowElement = extendArray(domMemberMap.Element,
+[
+ "bgColor",
+ "cells",
+ "ch",
+ "chOff",
+ "rowIndex",
+ "sectionRowIndex",
+ "vAlign",
+
+ "deleteCell",
+ "insertCell"
+]);
+
+domMemberMap.HTMLTableCellElement = extendArray(domMemberMap.Element,
+[
+ "abbr",
+ "axis",
+ "bgColor",
+ "cellIndex",
+ "ch",
+ "chOff",
+ "colSpan",
+ "headers",
+ "height",
+ "noWrap",
+ "rowSpan",
+ "scope",
+ "vAlign",
+ "width"
+
+]);
+
+domMemberMap.HTMLScriptElement = extendArray(domMemberMap.Element,
+[
+ "src"
+]);
+
+domMemberMap.HTMLButtonElement = extendArray(domMemberMap.Element,
+[
+ "accessKey",
+ "disabled",
+ "form",
+ "name",
+ "type",
+ "value",
+
+ "click"
+]);
+
+domMemberMap.HTMLInputElement = extendArray(domMemberMap.Element,
+[
+ "type",
+ "value",
+ "checked",
+ "accept",
+ "accessKey",
+ "alt",
+ "controllers",
+ "defaultChecked",
+ "defaultValue",
+ "disabled",
+ "form",
+ "maxLength",
+ "name",
+ "readOnly",
+ "selectionEnd",
+ "selectionStart",
+ "size",
+ "src",
+ "textLength",
+ "useMap",
+
+ "click",
+ "select",
+ "setSelectionRange"
+]);
+
+domMemberMap.HTMLFormElement = extendArray(domMemberMap.Element,
+[
+ "acceptCharset",
+ "action",
+ "author",
+ "elements",
+ "encoding",
+ "enctype",
+ "entry_id",
+ "length",
+ "method",
+ "name",
+ "post",
+ "target",
+ "text",
+ "url",
+
+ "reset",
+ "submit"
+]);
+
+domMemberMap.HTMLBodyElement = extendArray(domMemberMap.Element,
+[
+ "aLink",
+ "background",
+ "bgColor",
+ "link",
+ "text",
+ "vLink"
+]);
+
+domMemberMap.HTMLHtmlElement = extendArray(domMemberMap.Element,
+[
+ "version"
+]);
+
+domMemberMap.Text = extendArray(domMemberMap.Node,
+[
+ "data",
+ "length",
+
+ "appendData",
+ "deleteData",
+ "insertData",
+ "replaceData",
+ "splitText",
+ "substringData"
+]);
+
+domMemberMap.Attr = extendArray(domMemberMap.Node,
+[
+ "name",
+ "value",
+ "specified",
+ "ownerElement"
+]);
+
+domMemberMap.Event =
+[
+ "type",
+ "target",
+ "currentTarget",
+ "originalTarget",
+ "explicitOriginalTarget",
+ "relatedTarget",
+ "rangeParent",
+ "rangeOffset",
+ "view",
+
+ "keyCode",
+ "charCode",
+ "screenX",
+ "screenY",
+ "clientX",
+ "clientY",
+ "layerX",
+ "layerY",
+ "pageX",
+ "pageY",
+
+ "detail",
+ "button",
+ "which",
+ "ctrlKey",
+ "shiftKey",
+ "altKey",
+ "metaKey",
+
+ "eventPhase",
+ "timeStamp",
+ "bubbles",
+ "cancelable",
+ "cancelBubble",
+
+ "isTrusted",
+ "isChar",
+
+ "getPreventDefault",
+ "initEvent",
+ "initMouseEvent",
+ "initKeyEvent",
+ "initUIEvent",
+ "preventBubble",
+ "preventCapture",
+ "preventDefault",
+ "stopPropagation"
+];
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+this.domConstantMap =
+{
+ "ELEMENT_NODE": 1,
+ "ATTRIBUTE_NODE": 1,
+ "TEXT_NODE": 1,
+ "CDATA_SECTION_NODE": 1,
+ "ENTITY_REFERENCE_NODE": 1,
+ "ENTITY_NODE": 1,
+ "PROCESSING_INSTRUCTION_NODE": 1,
+ "COMMENT_NODE": 1,
+ "DOCUMENT_NODE": 1,
+ "DOCUMENT_TYPE_NODE": 1,
+ "DOCUMENT_FRAGMENT_NODE": 1,
+ "NOTATION_NODE": 1,
+
+ "DOCUMENT_POSITION_DISCONNECTED": 1,
+ "DOCUMENT_POSITION_PRECEDING": 1,
+ "DOCUMENT_POSITION_FOLLOWING": 1,
+ "DOCUMENT_POSITION_CONTAINS": 1,
+ "DOCUMENT_POSITION_CONTAINED_BY": 1,
+ "DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC": 1,
+
+ "UNKNOWN_RULE": 1,
+ "STYLE_RULE": 1,
+ "CHARSET_RULE": 1,
+ "IMPORT_RULE": 1,
+ "MEDIA_RULE": 1,
+ "FONT_FACE_RULE": 1,
+ "PAGE_RULE": 1,
+
+ "CAPTURING_PHASE": 1,
+ "AT_TARGET": 1,
+ "BUBBLING_PHASE": 1,
+
+ "SCROLL_PAGE_UP": 1,
+ "SCROLL_PAGE_DOWN": 1,
+
+ "MOUSEUP": 1,
+ "MOUSEDOWN": 1,
+ "MOUSEOVER": 1,
+ "MOUSEOUT": 1,
+ "MOUSEMOVE": 1,
+ "MOUSEDRAG": 1,
+ "CLICK": 1,
+ "DBLCLICK": 1,
+ "KEYDOWN": 1,
+ "KEYUP": 1,
+ "KEYPRESS": 1,
+ "DRAGDROP": 1,
+ "FOCUS": 1,
+ "BLUR": 1,
+ "SELECT": 1,
+ "CHANGE": 1,
+ "RESET": 1,
+ "SUBMIT": 1,
+ "SCROLL": 1,
+ "LOAD": 1,
+ "UNLOAD": 1,
+ "XFER_DONE": 1,
+ "ABORT": 1,
+ "ERROR": 1,
+ "LOCATE": 1,
+ "MOVE": 1,
+ "RESIZE": 1,
+ "FORWARD": 1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"DOM_VK_COMMA": 1,
+ "DOM_VK_PERIOD": 1,
+ "DOM_VK_SLASH": 1,
+ "DOM_VK_BACK_QUOTE": 1,
+ "DOM_VK_OPEN_BRACKET": 1,
+ "DOM_VK_BACK_SLASH": 1,
+ "DOM_VK_CLOSE_BRACKET": 1,
+ "DOM_VK_QUOTE": 1,
+ "DOM_VK_META": 1,
+
+ "SVG_ZOOMANDPAN_DISABLE": 1,
+ "SVG_ZOOMANDPAN_MAGNIFY": 1,
+ "SVG_ZOOMANDPAN_UNKNOWN": 1
+};
+
+this.cssInfo =
+{
+ "background": ["bgRepeat", "bgAttachment", "bgPosition", "color", "systemColor", "none"],
+ "background-attachment": ["bgAttachment"],
+ "background-color": ["color", "systemColor"],
+ "background-image": ["none"],
+ "background-position": ["bgPosition"],
+ "background-repeat": ["bgRepeat"],
+
+ "border": ["borderStyle", "thickness", "color", "systemColor", "none"],
+ "border-top": ["borderStyle", "borderCollapse", "color", "systemColor", "none"],
+ "border-right": ["borderStyle", "borderCollapse", "color", "systemColor", "none"],
+ "border-bottom": ["borderStyle", "borderCollapse", "color", "systemColor", "none"],
+ "border-left": ["borderStyle", "borderCollapse", "color", "systemColor", "none"],
+ "border-collapse": ["borderCollapse"],
+ "border-color": ["color", "systemColor"],
+ "border-top-color": ["color", "systemColor"],
+ "border-right-color": ["color", "systemColor"],
+ "border-bottom-color": ["color", "systemColor"],
+ "border-left-color": ["color", "systemColor"],
+ "border-spacing": [],
+ "border-style": ["borderStyle"],
+ "border-top-style": ["borderStyle"],
+ "border-right-style": ["borderStyle"],
+ "border-bottom-style": ["borderStyle"],
+ "border-left-style": ["borderStyle"],
+ "border-width": ["thickness"],
+ "border-top-width": ["thickness"],
+ "border-right-width": ["thickness"],
+ "border-bottom-width": ["thickness"],
+ "border-left-width": ["thickness"],
+
+ "bottom": ["auto"],
+ "caption-side": ["captionSide"],
+ "clear": ["clear", "none"],
+ "clip": ["auto"],
+ "color": ["color", "systemColor"],
+ "content": ["content"],
+ "counter-increment": ["none"],
+ "counter-reset": ["none"],
+ "cursor": ["cursor", "none"],
+ "direction": ["direction"],
+ "display": ["display", "none"],
+ "empty-cells": [],
+ "float": ["float", "none"],
+ "font": ["fontStyle", "fontVariant", "fontWeight", "fontFamily"],
+
+ "font-family": ["fontFamily"],
+ "font-size": ["fontSize"],
+ "font-size-adjust": [],
+ "font-stretch": [],
+ "font-style": ["fontStyle"],
+ "font-variant": ["fontVariant"],
+ "font-weight": ["fontWeight"],
+
+ "height": ["auto"],
+ "left": ["auto"],
+ "letter-spacing": [],
+ "line-height": [],
+
+ "list-style": ["listStyleType", "listStylePosition", "none"],
+ "list-style-image": ["none"],
+ "list-style-position": ["listStylePosition"],
+ "list-style-type": ["listStyleType", "none"],
+
+ "margin": [],
+ "margin-top": [],
+ "margin-right": [],
+ "margin-bottom": [],
+ "margin-left": [],
+
+ "marker-offset": ["auto"],
+ "min-height": ["none"],
+ "max-height": ["none"],
+ "min-width": ["none"],
+ "max-width": ["none"],
+
+ "outline": ["borderStyle", "color", "systemColor", "none"],
+ "outline-color": ["color", "systemColor"],
+ "outline-style": ["borderStyle"],
+ "outline-width": [],
+
+ "overflow": ["overflow", "auto"],
+ "overflow-x": ["overflow", "auto"],
+ "overflow-y": ["overflow", "auto"],
+
+ "padding": [],
+ "padding-top": [],
+ "padding-right": [],
+ "padding-bottom": [],
+ "padding-left": [],
+
+ "position": ["position"],
+ "quotes": ["none"],
+ "right": ["auto"],
+ "table-layout": ["tableLayout", "auto"],
+ "text-align": ["textAlign"],
+ "text-decoration": ["textDecoration", "none"],
+ "text-indent": [],
+ "text-shadow": [],
+ "text-transform": ["textTransform", "none"],
+ "top": ["auto"],
+ "unicode-bidi": [],
+ "vertical-align": ["verticalAlign"],
+ "white-space": ["whiteSpace"],
+ "width": ["auto"],
+ "word-spacing": [],
+ "z-index": [],
+
+ "-moz-appearance": ["mozAppearance"],
+ "-moz-border-radius": [],
+ "-moz-border-radius-bottomleft": [],
+ "-moz-border-radius-bottomright": [],
+ "-moz-border-radius-topleft": [],
+ "-moz-border-radius-topright": [],
+ "-moz-border-top-colors": ["color", "systemColor"],
+ "-moz-border-right-colors": ["color", "systemColor"],
+ "-moz-border-bottom-colors": ["color", "systemColor"],
+ "-moz-border-left-colors": ["color", "systemColor"],
+ "-moz-box-align": ["mozBoxAlign"],
+ "-moz-box-direction": ["mozBoxDirection"],
+ "-moz-box-flex": [],
+ "-moz-box-ordinal-group": [],
+ "-moz-box-orient": ["mozBoxOrient"],
+ "-moz-box-pack": ["mozBoxPack"],
+ "-moz-box-sizing": ["mozBoxSizing"],
+ "-moz-opacity": [],
+ "-moz-user-focus": ["userFocus", "none"],
+ "-moz-user-input": ["userInput"],
+ "-moz-user-modify": [],
+ "-moz-user-select": ["userSelect", "none"],
+ "-moz-background-clip": [],
+ "-moz-background-inline-policy": [],
+ "-moz-background-origin": [],
+ "-moz-binding": [],
+ "-moz-column-count": [],
+ "-moz-column-gap": [],
+ "-moz-column-width": [],
+ "-moz-image-region": []
+};
+
+this.inheritedStyleNames =
+{
+ "border-collapse": 1,
+ "border-spacing": 1,
+ "border-style": 1,
+ "caption-side": 1,
+ "color": 1,
+ "cursor": 1,
+ "direction": 1,
+ "empty-cells": 1,
+ "font": 1,
+ "font-family": 1,
+ "font-size-adjust": 1,
+ "font-size": 1,
+ "font-style": 1,
+ "font-variant": 1,
+ "font-weight": 1,
+ "letter-spacing": 1,
+ "line-height": 1,
+ "list-style": 1,
+ "list-style-image": 1,
+ "list-style-position": 1,
+ "list-style-type": 1,
+ "quotes": 1,
+ "text-align": 1,
+ "text-decoration": 1,
+ "text-indent": 1,
+ "text-shadow": 1,
+ "text-transform": 1,
+ "white-space": 1,
+ "word-spacing": 1
+};
+
+this.cssKeywords =
+{
+ "appearance":
+ [
+ "button",
+ "button-small",
+ "checkbox",
+ "checkbox-container",
+ "checkbox-small",
+ "dialog",
+ "listbox",
+ "menuitem",
+ "menulist",
+ "menulist-button",
+ "menulist-textfield",
+ "menupopup",
+ "progressbar",
+ "radio",
+ "radio-container",
+ "radio-small",
+ "resizer",
+ "scrollbar",
+ "scrollbarbutton-down",
+ "scrollbarbutton-left",
+ "scrollbarbutton-right",
+ "scrollbarbutton-up",
+ "scrollbartrack-horizontal",
+ "scrollbartrack-vertical",
+ "separator",
+ "statusbar",
+ "tab",
+ "tab-left-edge",
+ "tabpanels",
+ "textfield",
+ "toolbar",
+ "toolbarbutton",
+ "toolbox",
+ "tooltip",
+ "treeheadercell",
+ "treeheadersortarrow",
+ "treeitem",
+ "treetwisty",
+ "treetwistyopen",
+ "treeview",
+ "window"
+ ],
+
+ "systemColor":
+ [
+ "ActiveBorder",
+ "ActiveCaption",
+ "AppWorkspace",
+ "Background",
+ "ButtonFace",
+ "ButtonHighlight",
+ "ButtonShadow",
+ "ButtonText",
+ "CaptionText",
+ "GrayText",
+ "Highlight",
+ "HighlightText",
+ "InactiveBorder",
+ "InactiveCaption",
+ "InactiveCaptionText",
+ "InfoBackground",
+ "InfoText",
+ "Menu",
+ "MenuText",
+ "Scrollbar",
+ "ThreeDDarkShadow",
+ "ThreeDFace",
+ "ThreeDHighlight",
+ "ThreeDLightShadow",
+ "ThreeDShadow",
+ "Window",
+ "WindowFrame",
+ "WindowText",
+ "-moz-field",
+ "-moz-fieldtext",
+ "-moz-workspace",
+ "-moz-visitedhyperlinktext",
+ "-moz-use-text-color"
+ ],
+
+ "color":
+ [
+ "AliceBlue",
+ "AntiqueWhite",
+ "Aqua",
+ "Aquamarine",
+ "Azure",
+ "Beige",
+ "Bisque",
+ "Black",
+ "BlanchedAlmond",
+ "Blue",
+ "BlueViolet",
+ "Brown",
+ "BurlyWood",
+ "CadetBlue",
+ "Chartreuse",
+ "Chocolate",
+ "Coral",
+ "CornflowerBlue",
+ "Cornsilk",
+ "Crimson",
+ "Cyan",
+ "DarkBlue",
+ "DarkCyan",
+ "DarkGoldenRod",
+ "DarkGray",
+ "DarkGreen",
+ "DarkKhaki",
+ "DarkMagenta",
+ "DarkOliveGreen",
+ "DarkOrange",
+ "DarkOrchid",
+ "DarkRed",
+ "DarkSalmon",
+ "DarkSeaGreen",
+ "DarkSlateBlue",
+ "DarkSlateGray",
+ "DarkTurquoise",
+ "DarkViolet",
+ "DeepPink",
+ "DarkSkyBlue",
+ "DimGray",
+ "DodgerBlue",
+ "Feldspar",
+ "FireBrick",
+ "FloralWhite",
+ "ForestGreen",
+ "Fuchsia",
+ "Gainsboro",
+ "GhostWhite",
+ "Gold",
+ "GoldenRod",
+ "Gray",
+ "Green",
+ "GreenYellow",
+ "HoneyDew",
+ "HotPink",
+ "IndianRed",
+ "Indigo",
+ "Ivory",
+ "Khaki",
+ "Lavender",
+ "LavenderBlush",
+ "LawnGreen",
+ "LemonChiffon",
+ "LightBlue",
+ "LightCoral",
+ "LightCyan",
+ "LightGoldenRodYellow",
+ "LightGrey",
+ "LightGreen",
+ "LightPink",
+ "LightSalmon",
+ "LightSeaGreen",
+ "LightSkyBlue",
+ "LightSlateBlue",
+ "LightSlateGray",
+ "LightSteelBlue",
+ "LightYellow",
+ "Lime",
+ "LimeGreen",
+ "Linen",
+ "Magenta",
+ "Maroon",
+ "MediumAquaMarine",
+ "MediumBlue",
+ "MediumOrchid",
+ "MediumPurple",
+ "MediumSeaGreen",
+ "MediumSlateBlue",
+ "MediumSpringGreen",
+ "MediumTurquoise",
+ "MediumVioletRed",
+ "MidnightBlue",
+ "MintCream",
+ "MistyRose",
+ "Moccasin",
+ "NavajoWhite",
+ "Navy",
+ "OldLace",
+ "Olive",
+ "OliveDrab",
+ "Orange",
+ "OrangeRed",
+ "Orchid",
+ "PaleGoldenRod",
+ "PaleGreen",
+ "PaleTurquoise",
+ "PaleVioletRed",
+ "PapayaWhip",
+ "PeachPuff",
+ "Peru",
+ "Pink",
+ "Plum",
+ "PowderBlue",
+ "Purple",
+ "Red",
+ "RosyBrown",
+ "RoyalBlue",
+ "SaddleBrown",
+ "Salmon",
+ "SandyBrown",
+ "SeaGreen",
+ "SeaShell",
+ "Sienna",
+ "Silver",
+ "SkyBlue",
+ "SlateBlue",
+ "SlateGray",
+ "Snow",
+ "SpringGreen",
+ "SteelBlue",
+ "Tan",
+ "Teal",
+ "Thistle",
+ "Tomato",
+ "Turquoise",
+ "Violet",
+ "VioletRed",
+ "Wheat",
+ "White",
+ "WhiteSmoke",
+ "Yellow",
+ "YellowGreen",
+ "transparent",
+ "invert"
+ ],
+
+ "auto":
+ [
+ "auto"
+ ],
+
+ "none":
+ [
+ "none"
+ ],
+
+ "captionSide":
+ [
+ "top",
+ "bottom",
+ "left",
+ "right"
+ ],
+
+ "clear":
+ [
+ "left",
+ "right",
+ "both"
+ ],
+
+ "cursor":
+ [
+ "auto",
+ "cell",
+ "context-menu",
+ "crosshair",
+ "default",
+ "help",
+ "pointer",
+ "progress",
+ "move",
+ "e-resize",
+ "all-scroll",
+ "ne-resize",
+ "nw-resize",
+ "n-resize",
+ "se-resize",
+ "sw-resize",
+ "s-resize",
+ "w-resize",
+ "ew-resize",
+ "ns-resize",
+ "nesw-resize",
+ "nwse-resize",
+ "col-resize",
+ "row-resize",
+ "text",
+ "vertical-text",
+ "wait",
+ "alias",
+ "copy",
+ "move",
+ "no-drop",
+ "not-allowed",
+ "-moz-alias",
+ "-moz-cell",
+ "-moz-copy",
+ "-moz-grab",
+ "-moz-grabbing",
+ "-moz-contextmenu",
+ "-moz-zoom-in",
+ "-moz-zoom-out",
+ "-moz-spinning"
+ ],
+
+ "direction":
+ [
+ "ltr",
+ "rtl"
+ ],
+
+ "bgAttachment":
+ [
+ "scroll",
+ "fixed"
+ ],
+
+ "bgPosition":
+ [
+ "top",
+ "center",
+ "bottom",
+ "left",
+ "right"
+ ],
+
+ "bgRepeat":
+ [
+ "repeat",
+ "repeat-x",
+ "repeat-y",
+ "no-repeat"
+ ],
+
+ "borderStyle":
+ [
+ "hidden",
+ "dotted",
+ "dashed",
+ "solid",
+ "double",
+ "groove",
+ "ridge",
+ "inset",
+ "outset",
+ "-moz-bg-inset",
+ "-moz-bg-outset",
+ "-moz-bg-solid"
+ ],
+
+ "borderCollapse":
+ [
+ "collapse",
+ "separate"
+ ],
+
+ "overflow":
+ [
+ "visible",
+ "hidden",
+ "scroll",
+ "-moz-scrollbars-horizontal",
+ "-moz-scrollbars-none",
+ "-moz-scrollbars-vertical"
+ ],
+
+ "listStyleType":
+ [
+ "disc",
+ "circle",
+ "square",
+ "decimal",
+ "decimal-leading-zero",
+ "lower-roman",
+ "upper-roman",
+ "lower-greek",
+ "lower-alpha",
+ "lower-latin",
+ "upper-alpha",
+ "upper-latin",
+ "hebrew",
+ "armenian",
+ "georgian",
+ "cjk-ideographic",
+ "hiragana",
+ "katakana",
+ "hiragana-iroha",
+ "katakana-iroha",
+ "inherit"
+ ],
+
+ "listStylePosition":
+ [
+ "inside",
+ "outside"
+ ],
+
+ "content":
+ [
+ "open-quote",
+ "close-quote",
+ "no-open-quote",
+ "no-close-quote",
+ "inherit"
+ ],
+
+ "fontStyle":
+ [
+ "normal",
+ "italic",
+ "oblique",
+ "inherit"
+ ],
+
+ "fontVariant":
+ [
+ "normal",
+ "small-caps",
+ "inherit"
+ ],
+
+ "fontWeight":
+ [
+ "normal",
+ "bold",
+ "bolder",
+ "lighter",
+ "inherit"
+ ],
+
+ "fontSize":
+ [
+ "xx-small",
+ "x-small",
+ "small",
+ "medium",
+ "large",
+ "x-large",
+ "xx-large",
+ "smaller",
+ "larger"
+ ],
+
+ "fontFamily":
+ [
+ "Arial",
+ "Comic Sans MS",
+ "Georgia",
+ "Tahoma",
+ "Verdana",
+ "Times New Roman",
+ "Trebuchet MS",
+ "Lucida Grande",
+ "Helvetica",
+ "serif",
+ "sans-serif",
+ "cursive",
+ "fantasy",
+ "monospace",
+ "caption",
+ "icon",
+ "menu",
+ "message-box",
+ "small-caption",
+ "status-bar",
+ "inherit"
+ ],
+
+ "display":
+ [
+ "block",
+ "inline",
+ "inline-block",
+ "list-item",
+ "marker",
+ "run-in",
+ "compact",
+ "table",
+ "inline-table",
+ "table-row-group",
+ "table-column",
+ "table-column-group",
+ "table-header-group",
+ "table-footer-group",
+ "table-row",
+ "table-cell",
+ "table-caption",
+ "-moz-box",
+ "-moz-compact",
+ "-moz-deck",
+ "-moz-grid",
+ "-moz-grid-group",
+ "-moz-grid-line",
+ "-moz-groupbox",
+ "-moz-inline-block",
+ "-moz-inline-box",
+ "-moz-inline-grid",
+ "-moz-inline-stack",
+ "-moz-inline-table",
+ "-moz-marker",
+ "-moz-popup",
+ "-moz-runin",
+ "-moz-stack"
+ ],
+
+ "position":
+ [
+ "static",
+ "relative",
+ "absolute",
+ "fixed",
+ "inherit"
+ ],
+
+ "float":
+ [
+ "left",
+ "right"
+ ],
+
+ "textAlign":
+ [
+ "left",
+ "right",
+ "center",
+ "justify"
+ ],
+
+ "tableLayout":
+ [
+ "fixed"
+ ],
+
+ "textDecoration":
+ [
+ "underline",
+ "overline",
+ "line-through",
+ "blink"
+ ],
+
+ "textTransform":
+ [
+ "capitalize",
+ "lowercase",
+ "uppercase",
+ "inherit"
+ ],
+
+ "unicodeBidi":
+ [
+ "normal",
+ "embed",
+ "bidi-override"
+ ],
+
+ "whiteSpace":
+ [
+ "normal",
+ "pre",
+ "nowrap"
+ ],
+
+ "verticalAlign":
+ [
+ "baseline",
+ "sub",
+ "super",
+ "top",
+ "text-top",
+ "middle",
+ "bottom",
+ "text-bottom",
+ "inherit"
+ ],
+
+ "thickness":
+ [
+ "thin",
+ "medium",
+ "thick"
+ ],
+
+ "userFocus":
+ [
+ "ignore",
+ "normal"
+ ],
+
+ "userInput":
+ [
+ "disabled",
+ "enabled"
+ ],
+
+ "userSelect":
+ [
+ "normal"
+ ],
+
+ "mozBoxSizing":
+ [
+ "content-box",
+ "padding-box",
+ "border-box"
+ ],
+
+ "mozBoxAlign":
+ [
+ "start",
+ "center",
+ "end",
+ "baseline",
+ "stretch"
+ ],
+
+ "mozBoxDirection":
+ [
+ "normal",
+ "reverse"
+ ],
+
+ "mozBoxOrient":
+ [
+ "horizontal",
+ "vertical"
+ ],
+
+ "mozBoxPack":
+ [
+ "start",
+ "center",
+ "end"
+ ]
+};
+
+this.nonEditableTags =
+{
+ "HTML": 1,
+ "HEAD": 1,
+ "html": 1,
+ "head": 1
+};
+
+this.innerEditableTags =
+{
+ "BODY": 1,
+ "body": 1
+};
+
+this.selfClosingTags =
+{ // End tags for void elements are forbidden http://wiki.whatwg.org/wiki/HTML_vs._XHTML
+ "meta": 1,
+ "link": 1,
+ "area": 1,
+ "base": 1,
+ "col": 1,
+ "input": 1,
+ "img": 1,
+ "br": 1,
+ "hr": 1,
+ "param":1,
+ "embed":1
+};
+
+var invisibleTags = this.invisibleTags =
+{
+ "HTML": 1,
+ "HEAD": 1,
+ "TITLE": 1,
+ "META": 1,
+ "LINK": 1,
+ "STYLE": 1,
+ "SCRIPT": 1,
+ "NOSCRIPT": 1,
+ "BR": 1,
+ "PARAM": 1,
+ "COL": 1,
+
+ "html": 1,
+ "head": 1,
+ "title": 1,
+ "meta": 1,
+ "link": 1,
+ "style": 1,
+ "script": 1,
+ "noscript": 1,
+ "br": 1,
+ "param": 1,
+ "col": 1
+ /*
+ "window": 1,
+ "browser": 1,
+ "frame": 1,
+ "tabbrowser": 1,
+ "WINDOW": 1,
+ "BROWSER": 1,
+ "FRAME": 1,
+ "TABBROWSER": 1,
+ */
+};
+
+
+if (typeof KeyEvent == "undefined") {
+ this.KeyEvent = {
+ DOM_VK_CANCEL: 3,
+ DOM_VK_HELP: 6,
+ DOM_VK_BACK_SPACE: 8,
+ DOM_VK_TAB: 9,
+ DOM_VK_CLEAR: 12,
+ DOM_VK_RETURN: 13,
+ DOM_VK_ENTER: 14,
+ DOM_VK_SHIFT: 16,
+ DOM_VK_CONTROL: 17,
+ DOM_VK_ALT: 18,
+ DOM_VK_PAUSE: 19,
+ DOM_VK_CAPS_LOCK: 20,
+ DOM_VK_ESCAPE: 27,
+ DOM_VK_SPACE: 32,
+ DOM_VK_PAGE_UP: 33,
+ DOM_VK_PAGE_DOWN: 34,
+ D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EPARATOR: 108,
+ DOM_VK_SUBTRACT: 109,
+ DOM_VK_DECIMAL: 110,
+ DOM_VK_DIVIDE: 111,
+ DOM_VK_F1: 112,
+ DOM_VK_F2: 113,
+ DOM_VK_F3: 114,
+ DOM_VK_F4: 115,
+ DOM_VK_F5: 116,
+ DOM_VK_F6: 117,
+ DOM_VK_F7: 118,
+ DOM_VK_F8: 119,
+ DOM_VK_F9: 120,
+ DOM_VK_F10: 121,
+ DOM_VK_F11: 122,
+ DOM_VK_F12: 123,
+ DOM_VK_F13: 124,
+ DOM_VK_F14: 125,
+ DOM_VK_F15: 126,
+ DOM_VK_F16: 127,
+ DOM_VK_F17: 128,
+ DOM_VK_F18: 129,
+ DOM_VK_F19: 130,
+ DOM_VK_F20: 131,
+ DOM_VK_F21: 132,
+ DOM_VK_F22: 133,
+ DOM_VK_F23: 134,
+ DOM_VK_F24: 135,
+ DOM_VK_NUM_LOCK: 144,
+ DOM_VK_SCROLL_LOCK: 145,
+ DOM_VK_COMMA: 188,
+ DOM_VK_PERIOD: 190,
+ DOM_VK_SLASH: 191,
+ DOM_VK_BACK_QUOTE: 192,
+ DOM_VK_OPEN_BRACKET: 219,
+ DOM_VK_BACK_SLASH: 220,
+ DOM_VK_CLOSE_BRACKET: 221,
+ DOM_VK_QUOTE: 222,
+ DOM_VK_META: 224
+ };
+}
+
+
+// ************************************************************************************************
+// Ajax
+
+/**
+ * @namespace
+ */
+this.Ajax =
+{
+
+ requests: [],
+ transport: null,
+ states: ["Uninitialized","Loading","Loaded","Interactive","Complete"],
+
+ initialize: function()
+ {
+ this.transport = FBL.getNativeXHRObject();
+ },
+
+ getXHRObject: function()
+ {
+ var xhrObj = false;
+ try
+ {
+ xhrObj = new XMLHttpRequest();
+ }
+ catch(e)
+ {
+ var progid = [
+ "MSXML2.XMLHTTP.5.0", "MSXML2.XMLHTTP.4.0",
+ "MSXML2.XMLHTTP.3.0", "MSXML2.XMLHTTP", "Microsoft.XMLHTTP"
+ ];
+
+ for ( var i=0; i < progid.length; ++i ) {
+ try
+ {
+ xhrObj = new ActiveXObject(progid[i]);
+ }
+ catch(e)
+ {
+ continue;
+ }
+ break;
+ }
+ }
+ finally
+ {
+ return xhrObj;
+ }
+ },
+
+
+ /**
+ * Create a AJAX request.
+ *
+ * @name request
+ * @param {Object} options request options
+ * @param {String} options.url URL to be requested
+ * @param {String} options.type Request type ("get" ou "post"). Default is "get".
+ * @param {Boolean} options.async Asynchronous flag. Default is "true".
+ * @param {String} options.dataType Data type ("text", "html", "xml" or "json"). Default is "text".
+ * @param {String} options.contentType Content-type of the data being sent. Default is "application/x-www-form-urlencoded".
+ * @param {Function} options.onLoading onLoading callback
+ * @param {Function} options.onLoaded onLoaded callback
+ * @param {Function} options.onInteractive onInteractive callback
+ * @param {Function} options.onComplete onComplete callback
+ * @param {Function} options.onUpdate onUpdate callback
+ * @param {Function} options.onSuccess onSuccess callback
+ * @param {Function} options.onFailure onFailure callback
+ */
+ request: function(options)
+ {
+ // process options
+ var o = FBL.extend(
+ {
+ // default values
+ type: "get",
+ async: true,
+ dataType: "text",
+ contentType: "application/x-www-form-urlencoded"
+ },
+ options || {}
+ );
+
+ this.requests.push(o);
+
+ var s = this.getState();
+ if (s == "Uninitialized" || s == "Complete" || s == "Loaded")
+ this.sendRequest();
+ },
+
+ serialize: function(data)
+ {
+ var r = [""], rl = 0;
+ if (data) {
+ if (typeof data == "string") r[rl++] = data;
+
+ else if (data.innerHTML && data.elements) {
+ for (var i=0,el,l=(el=data.elements).length; i < l; i++)
+ if (el[i].name) {
+ r[rl++] = encodeURIComponent(el[i].name);
+ r[rl++] = "=";
+ r[rl++] = encodeURIComponent(el[i].value);
+ r[rl++] = "&";
+ }
+
+ } else
+ for(var param in data) {
+ r[rl++] = encodeURIComponent(param);
+ r[rl++] = "=";
+ r[rl++] = encodeURIComponent(data[param]);
+ r[rl++] = "&";
+ }
+ }
+ return r.join("").replace(/&$/, "");
+ },
+
+ sendRequest: function()
+ {
+ var t = FBL.Ajax.transport, r = FBL.Ajax.requests.shift(), data;
+
+ // open XHR object
+ t.open(r.type, r.url, r.async);
+
+ //setRequestHeaders();
+
+ // indicates that it is a XHR request to the server
+ t.setRequestHeader("X-Requested-With", "XMLHttpRequest");
+
+ // if data is being sent, sets the appropriate content-type
+ if (data = FBL.Ajax.serialize(r.data))
+ t.setRequestHeader("Content-Type", r.contentType);
+
+ /** @ignore */
+ // onreadystatechange handler
+ t.onreadystatechange = function()
+ {
+ FBL.Ajax.onStateChange(r);
+ };
+
+ // send the request
+ t.send(data);
+ },
+
+ /**
+ * Handles the state change
+ */
+ onStateChange: function(options)
+ {
+ var fn, o = options, t = this.transport;
+ var state = this.getState(t);
+
+ if (fn = o["on" + state]) fn(this.getResponse(o), o);
+
+ if (state == "Complete")
+ {
+ var success = t.status == 200, response = this.getResponse(o);
+
+ if (fn = o["onUpdate"])
+ fn(response, o);
+
+ if (fn = o["on" + (success ? "Success" : "Failure")])
+ fn(response, o);
+
+ t.onreadystatechange = FBL.emptyFn;
+
+ if (this.requests.length > 0)
+ setTimeout(this.sendRequest, 10);
+ }
+ },
+
+ /**
+ * gets the appropriate response value according the type
+ */
+ getResponse: function(options)
+ {
+ var t = this.transport, type = options.dataType;
+
+ if (t.status != 200) return t.statusText;
+ else if (type == "text") return t.responseText;
+ else if (type == "html") return t.responseText;
+ else if (type == "xml") return t.responseXML;
+ else if (type == "json") return eval("(" + t.responseText + ")");
+ },
+
+ /**
+ * returns the current state of the XHR object
+ */
+ getState: function()
+ {
+ return this.states[this.transport.readyState];
+ }
+
+};
+
+
+// ************************************************************************************************
+// Cookie, from http://www.quirksmode.org/js/cookies.html
+
+this.createCookie = function(name,value,days)
+{
+ if ('cookie' in document)
+ {
+ if (days)
+ {
+ var date = new Date();
+ date.setTime(date.getTime()+(days*24*60*60*1000));
+ var expires = "; expires="+date.toGMTString();
+ }
+ else
+ var expires = "";
+
+ document.cookie = name+"="+value+expires+"; path=/";
+ }
+};
+
+this.readCookie = function (name)
+{
+ if ('cookie' in document)
+ {
+ var nameEQ = name + "=";
+ var ca = document.cookie.split(';');
+
+ for(var i=0; i < ca.length; i++)
+ {
+ var c = ca[i];
+ while (c.charAt(0)==' ') c = c.substring(1,c.length);
+ if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
+ }
+ }
+
+ return null;
+};
+
+this.removeCookie = function(name)
+{
+ this.createCookie(name, "", -1);
+};
+
+
+// ************************************************************************************************
+// http://www.mister-pixel.com/#Content__state=is_that_simple
+var fixIE6BackgroundImageCache = function(doc)
+{
+ doc = doc || document;
+ try
+ {
+ doc.execCommand("BackgroundImageCache", false, true);
+ }
+ catch(E)
+ {
+
+ }
+};
+
+// ************************************************************************************************
+// calculatePixelsPerInch
+
+var resetStyle = "margin:0; padding:0; border:0; position:absolute; overflow:hidden; display:block;";
+
+var calculatePixelsPerInch = function calculatePixelsPerInch(doc, body)
+{
+ var inch = FBL.createGlobalElement("div");
+ inch.style.cssText = resetStyle + "width:1in; height:1in; position:absolute; top:-1234px; left:-1234px;";
+ body.appendChild(inch);
+
+ FBL.pixelsPerInch = {
+ x: inch.offsetWidth,
+ y: inch.offsetHeight
+ };
+
+ body.removeChild(inch);
+};
+
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+this.SourceLink = function(url, line, type, object, instance)
+{
+ this.href = url;
+ this.instance = instance;
+ this.line = line;
+ this.type = type;
+ this.object = object;
+};
+
+this.SourceLink.prototype =
+{
+ toString: function()
+ {
+ return this.href;
+ },
+ toJSON: function() // until 3.1...
+ {
+ return "{\"href\":\""+this.href+"\", "+
+ (this.line?("\"line\":"+this.line+","):"")+
+ (this.type?(" \"type\":\""+this.type+"\","):"")+
+ "}";
+ }
+
+};
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+this.SourceText = function(lines, owner)
+{
+ this.lines = lines;
+ this.owner = owner;
+};
+
+this.SourceText.getLineAsHTML = function(lineNo)
+{
+ return escapeForSourceLine(this.lines[lineNo-1]);
+};
+
+
+// ************************************************************************************************
+}).apply(FBL);
+
+/* See license.txt for terms of usage */
+
+FBL.ns( /** @scope s_i18n */ function() { with (FBL) {
+// ************************************************************************************************
+
+// TODO: xxxpedro localization
+var oSTR =
+{
+ "NoMembersWarning": "There are no properties to show for this object.",
+
+ "EmptyStyleSheet": "There are no rules in this stylesheet.",
+ "EmptyElementCSS": "This element has no style rules.",
+ "AccessRestricted": "Access to restricted URI denied.",
+
+ "net.label.Parameters": "Parameters",
+ "net.label.Source": "Source",
+ "URLParameters": "Params",
+
+ "EditStyle": "Edit Element Style...",
+ "NewRule": "New Rule...",
+
+ "NewProp": "New Property...",
+ "EditProp": 'Edit "%s"',
+ "DeleteProp": 'Delete "%s"',
+ "DisableProp": 'Disable "%s"'
+};
+
+// ************************************************************************************************
+
+FBL.$STR = function(name)
+{
+ return oSTR.hasOwnProperty(name) ? oSTR[name] : name;
+};
+
+FBL.$STRF = function(name, args)
+{
+ if (!oSTR.hasOwnProperty(name)) return name;
+
+ var format = oSTR[name];
+ var objIndex = 0;
+
+ var parts = parseFormat(format);
+ var trialIndex = objIndex;
+ var objects = args;
+
+ for (var i= 0; i < parts.length; i++)
+ {
+ var part = parts[i];
+ if (part && typeof(part) == "object")
+ {
+ if (++trialIndex > objects.length) // then too few parameters for format, assume unformatted.
+ {
+ format = "";
+ objIndex = -1;
+ parts.length = 0;
+ break;
+ }
+ }
+
+ }
+
+ var result = [];
+ for (var i = 0; i < parts.length; ++i)
+ {
+ var part = parts[i];
+ if (part && typeof(part) == "object")
+ {
+ result.push(""+args.shift());
+ }
+ else
+ result.push(part);
+ }
+
+ return result.join("");
+};
+
+// ************************************************************************************************
+
+var parseFormat = function parseFormat(format)
+{
+ var parts = [];
+ if (format.length <= 0)
+ return parts;
+
+ var reg = /((^%|.%)(\d+)?(\.)([a-zA-Z]))|((^%|.%)([a-zA-Z]))/;
+ for (var m = reg.exec(format); m; m = reg.exec(format))
+ {
+ if (m[0].substr(0, 2) == "%%")
+ {
+ parts.push(format.substr(0, m.index));
+ parts.push(m[0].substr(1));
+ }
+ else
+ {
+ var type = m[8] ? m[8] : m[5];
+ var precision = m[3] ? parseInt(m[3]) : (m[4] == "." ? -1 : 0);
+
+ var rep = null;
+ switch (type)
+ {
+ case "s":
+ rep = FirebugReps.Text;
+ break;
+ case "f":
+ case "i":
+ case "d":
+ rep = FirebugReps.Number;
+ break;
+ case "o":
+ rep = null;
+ break;
+ }
+
+ parts.push(format.substr(0, m[0][0] == "%" ? m.index : m.index+1));
+ parts.push({rep: rep, precision: precision, type: ("%" + type)});
+ }
+
+ format = format.substr(m.index+m[0].length);
+ }
+
+ parts.push(format);
+ return parts;
+};
+
+// ************************************************************************************************
+}});
+
+/* See license.txt for terms of usage */
+
+FBL.ns( /** @scope s_firebug */ function() { with (FBL) {
+// ************************************************************************************************
+
+// ************************************************************************************************
+// Globals
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+// Internals
+
+var modules = [];
+var panelTypes = [];
+var panelTypeMap = {};
+var reps = [];
+
+var parentPanelMap = {};
+
+
+// ************************************************************************************************
+// Firebug
+
+/**
+ * @namespace describe Firebug
+ * @exports FBL.Firebug as Firebug
+ */
+FBL.Firebug =
+{
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ version: "Firebug Lite 1.4.0",
+ revision: "$Revision$",
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ modules: modules,
+ panelTypes: panelTypes,
+ panelTypeMap: panelTypeMap,
+ reps: reps,
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ // Initialization
+
+ initialize: function()
+ {
+ if (FBTrace.DBG_INITIALIZE) FBTrace.sysout("Firebug.initialize", "initializing application");
+
+ Firebug.browser = new Context(Env.browser);
+ Firebug.context = Firebug.browser;
+
+ Firebug.loadPrefs();
+ Firebug.context.persistedState.isOpen = false;
+
+ // Document must be cached before chrome initialization
+ cacheDocument();
+
+ if (Firebug.Inspector && Firebug.Inspector.create)
+ Firebug.Inspector.create();
+
+ if (FBL.CssAnalyzer && FBL.CssAnalyzer.processAllStyleSheets)
+ FBL.CssAnalyzer.processAllStyleSheets(Firebug.browser.document);
+
+ FirebugChrome.initialize();
+
+ dispatch(modules, "initialize", []);
+
+ if (Firebug.disableResourceFetching)
+ Firebug.Console.logFormatted(["Some Firebug Lite features are not working because " +
+ "resource fetching is disabled. To enabled it set the Firebug Lite option " +
+ "\"disableResourceFetching\" to \"false\". More info at " +
+ "http://getfirebug.com/firebuglite#Options"],
+ Firebug.context, "warn");
+
+ if (Env.onLoad)
+ {
+ var onLoad = Env.onLoad;
+ delete Env.onLoad;
+
+ setTimeout(onLoad, 200);
+ }
+ },
+
+ shutdown: function()
+ {
+ if (Firebug.saveCookies)
+ Firebug.savePrefs();
+
+ if (Firebug.Inspector)
+ Firebug.Inspector.destroy();
+
+ dispatch(modules, "shutdown", []);
+
+ var chromeMap = FirebugChrome.chromeMap;
+
+ for (var name in chromeMap)
+ {
+ if (chromeMap.hasOwnProperty(name))
+ {
+ try
+ {
+ chromeMap[name].destroy();
+ }
+ catch(E)
+ {
+ if (FBTrace.DBG_ERRORS) FBTrace.sysout("chrome.destroy() failed to: " + name);
+ }
+ }
+ }
+
+ Firebug.Lite.Cache.Element.clear();
+ Firebug.Lite.Cache.StyleSheet.clear();
+
+ Firebug.browser = null;
+ Firebug.context = null;
+ },
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ // Registration
+
+ registerModule: function()
+ {
+ modules.push.apply(modules, arguments);
+
+ if (FBTrace.DBG_INITIALIZE) FBTrace.sysout("Firebug.registerModule");
+ },
+
+ registerPanel: function()
+ {
+ panelTypes.push.apply(panelTypes, arguments);
+
+ for (var i = 0, panelType; panelType = arguments[i]; ++i)
+ {
+ panelTypeMap[panelType.prototype.name] = arguments[i];
+
+ if (panelType.prototype.parentPanel)
+ parentPanelMap[panelType.prototype.parentPanel] = 1;
+ }
+
+ if (FBTrace.DBG_INITIALIZE)
+ for (var i = 0; i < arguments.length; ++i)
+ FBTrace.sysout("Firebug.registerPanel", arguments[i].prototype.name);
+ },
+
+ registerRep: function()
+ {
+ reps.push.apply(reps, arguments);
+ },
+
+ unregisterRep: function()
+ {
+ for (var i = 0; i < arguments.length; ++i)
+ remove(reps, arguments[i]);
+ },
+
+ setDefaultReps: function(funcRep, rep)
+ {
+ FBL.defaultRep = rep;
+ FBL.defaultFuncRep = funcRep;
+ },
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ // Reps
+
+ getRep: function(object)
+ {
+ var type = typeof object;
+ if (isIE && isFunction(object))
+ type = "function";
+
+ for (var i = 0; i < reps.length; ++i)
+ {
+ var rep = reps[i];
+ try
+ {
+ if (rep.supportsObject(object, type))
+ {
+ if (FBTrace.DBG_DOM)
+ FBTrace.sysout("getRep type: "+type+" object: "+object, rep);
+ return rep;
+ }
+ }
+ catch (exc)
+ {
+ if (FBTrace.DBG_ERRORS)
+ {
+ FBTrace.sysout("firebug.getRep FAILS: ", exc.message || exc);
+ FBTrace.sysout("firebug.getRep reps["+i+"/"+reps.length+"]: Rep="+reps[i].className);
+ // TODO: xxxpedro add trace to FBTrace logs like in Firebug
+ //firebug.trace();
+ }
+ }
+ }
+
+ return (type == 'function') ? defaultFuncRep : defaultRep;
+ },
+
+ getRepObject: function(node)
+ {
+ var target = null;
+ for (var child = node; child; child = child.parentNode)
+ {
+ if (hasClass(child, "repTarget"))
+ target = child;
+
+ if (child.repObject)
+ {
+ if (!target && hasClass(child, "repIgnore"))
+ break;
+ else
+ return child.repObject;
+ }
+ }
+ },
+
+ getRepNode: function(node)
+ {
+ for (var child = node; child; child = child.parentNode)
+ {
+ if (child.repObject)
+ return child;
+ }
+ },
+
+ getElementByRepObject: function(element, object)
+ {
+ for (var child = element.firstChild; child; child = child.nextSibling)
+ {
+ if (child.repObject == object)
+ return child;
+ }
+ },
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ // Preferences
+
+ getPref: function(name)
+ {
+ return Firebug[name];
+ },
+
+ setPref: function(name, value)
+ {
+ Firebug[name] = value;
+
+ Firebug.savePrefs();
+ },
+
+ setPrefs: function(prefs)
+ {
+ for (var name in prefs)
+ {
+ if (prefs.hasOwnProperty(name))
+ Firebug[name] = prefs[name];
+ }
+
+ Firebug.savePrefs();
+ },
+
+ restorePrefs: function()
+ {
+ var Options = Env.DefaultOptions;
+
+ for (var name in Options)
+ {
+ Firebug[name] = Options[name];
+ }
+ },
+
+ loadPrefs: function()
+ {
+ this.restorePrefs();
+
+ var prefs = Store.get("FirebugLite") || {};
+ var options = prefs.options;
+ var persistedState = prefs.persistedState || FBL.defaultPersistedState;
+
+ for (var name in options)
+ {
+ if (options.hasOwnProperty(name))
+ Firebug[name] = options[name];
+ }
+
+ if (Firebug.context && persistedState)
+ Firebug.context.persistedState = persistedState;
+ },
+
+ savePrefs: function()
+ {
+ var prefs = {
+ options: {}
+ };
+
+ var EnvOptions = Env.Options;
+ var options = prefs.options;
+ for (var name in EnvOptions)
+ {
+ if (EnvOptions.hasOwnProperty(name))
+ {
+ options[name] = Firebug[name];
+ }
+ }
+
+ var persistedState = Firebug.context.persistedState;
+ if (!persistedState)
+ {
+ persistedState = Firebug.context.persistedState = FBL.defaultPersistedState;
+ }
+
+ prefs.persistedState = persistedState;
+
+ Store.set("FirebugLite", prefs);
+ },
+
+ erasePrefs: function()
+ {
+ Store.remove("FirebugLite");
+ this.restorePrefs();
+ }
+};
+
+Firebug.restorePrefs();
+
+// xxxpedro should we remove this?
+window.Firebug = FBL.Firebug;
+
+if (!Env.Options.enablePersistent ||
+ Env.Options.enablePersistent && Env.isChromeContext ||
+ Env.isDebugMode)
+ Env.browser.window.Firebug = FBL.Firebug;
+
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+// Other methods
+
+FBL.cacheDocument = function cacheDocument()
+{
+ var ElementCache = Firebug.Lite.Cache.Element;
+ var els = Firebug.browser.document.getElementsByTagName("*");
+ for (var i=0, l=els.length, el; i<l; i++)
+ {
+ el = els[i];
+ ElementCache(el);
+ }
+};
+
+// ************************************************************************************************
+
+/**
+ * @class
+ *
+ * Support for listeners registration. This object also extended by Firebug.Module so,
+ * all modules supports listening automatically. Notice that array of listeners
+ * is created for each intance of a module within initialize method. Thus all derived
+ * module classes must ensure that Firebug.Module.initialize method is called for the
+ * super class.
+ */
+Firebug.Listener = function()
+{
+ // The array is created when the first listeners is added.
+ // It can't be created here since derived objects would share
+ // the same array.
+ this.fbListeners = null;
+};
+
+Firebug.Listener.prototype =
+{
+ addListener: function(listener)
+ {
+ if (!this.fbListeners)
+ this.fbListeners = []; // delay the creation until the objects are created so 'this' causes new array for each module
+
+ this.fbListeners.push(listener);
+ },
+
+ removeListener: function(listener)
+ {
+ remove(this.fbListeners, listener); // if this.fbListeners is null, remove is being called with no add
+ }
+};
+
+// ************************************************************************************************
+
+
+// ************************************************************************************************
+// Module
+
+/**
+ * @module Base class for all modules. Every derived module object must be registered using
+ * <code>Firebug.registerModule</code> method. There is always one instance of a module object
+ * per browser window.
+ * @extends Firebug.Listener
+ */
+Firebug.Module = extend(new Firebug.Listener(),
+/** @extend Firebug.Module */
+{
+ /**
+ * Called when the window is opened.
+ */
+ initialize: function()
+ {
+ },
+
+ /**
+ * Called when the window is closed.
+ */
+ shutdown: function()
+ {
+ },
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+ /**
+ * Called when a new context is created but before the page is loaded.
+ */
+ initContext: function(context)
+ {
+ },
+
+ /**
+ * Called after a context is detached to a separate window;
+ */
+ reattachContext: function(browser, context)
+ {
+ },
+
+ /**
+ * Called when a context is destroyed. Module may store info on persistedState for reloaded pages.
+ */
+ destroyContext: function(context, persistedState)
+ {
+ },
+
+ // Called when a FF tab is create or activated (user changes FF tab)
+ // Called after context is created or with context == null (to abort?)
+ showContext: function(browser, context)
+ {
+ },
+
+ /**
+ * Called after a context's page gets DOMContentLoaded
+ */
+ loadedContext: function(context)
+ {
+ },
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+ showPanel: function(browser, panel)
+ {
+ },
+
+ showSidePanel: function(browser, panel)
+ {
+ },
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+ updateOption: function(name, value)
+ {
+ },
+
+ getObjectByURL: function(context, url)
+ {
+ }
+});
+
+// ************************************************************************************************
+// Panel
+
+/**
+ * @panel Base class for all panels. Every derived panel must define a constructor and
+ * register with "Firebug.registerPanel" method. An instance of the panel
+ * object is created by the framework for each browser tab where Firebug is activated.
+ */
+Firebug.Panel =
+{
+ name: "HelloWorld",
+ title: "Hello World!",
+
+ parentPanel: null,
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+ options: {
+ hasCommandLine: false,
+ hasStatusBar: false,
+ hasToolButtons: false,
+
+ // Pre-rendered panels are those included in the skin file (firebug.html)
+ isPreRendered: false,
+ innerHTMLSync: false
+
+ /*
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ // To be used by external extensions
+ panelHTML: "",
+ panelCSS: "",
+
+ toolButtonsHTML: ""
+ /**/
+ },
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+ tabNode: null,
+ panelNode: null,
+ sidePanelNode: null,
+ statusBarNode: null,
+ toolButtonsNode: null,
+
+ panelBarNode: null,
+
+ sidePanelBarBoxNode: null,
+ sidePanelBarNode: null,
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+ sidePanelBar: null,
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+ searchable: false,
+ editable: true,
+ order: 2147483647,
+ statusSeparator: "<",
+
+ create: function(context, doc)
+ {
+ this.hasSidePanel = parentPanelMap.hasOwnProperty(this.name);
+
+ this.panelBarNode = $("fbPanelBar1");
+ this.sidePanelBarBoxNode = $("fbPanelBar2");
+
+ if (this.hasSidePanel)
+ {
+ this.sidePanelBar = extend({}, PanelBar);
+ this.sidePanelBar.create(this);
+ }
+
+ var options = this.options = extend(Firebug.Panel.options, this.options);
+ var panelId = "fb" + this.name;
+
+ if (options.isPreRendered)
+ {
+ this.panelNode = $(panelId);
+
+ this.tabNode = $(panelId + "Tab");
+ this.tabNode.style.display = "block";
+
+ if (options.hasToolButtons)
+ {
+ this.toolButtonsNode = $(panelId + "Buttons");
+ }
+
+ if (options.hasStatusBar)
+ {
+ this.statusBarBox = $("fbStatusBarBox");
+ this.statusBarNode = $(panelId + "StatusBar");
+ }
+ }
+ else
+ {
+ var containerSufix = this.parentPanel ? "2" : "1";
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ // Create Panel
+ var panelNode = this.panelNode = createElement("div", {
+ id: panelId,
+ className: "fbPanel"
+ });
+
+ $("fbPanel" + containerSufix).appendChild(panelNode);
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ // Create Panel Tab
+ var tabHTML = '<span class="fbTabL"></span><span class="fbTabText">' +
+ this.title + '</span><span class="fbTabR"></span>';
+
+ var tabNode = this.tabNode = createElement("a", {
+ id: panelId + "Tab",
+ className: "fbTab fbHover",
+ innerHTML: tabHTML
+ });
+
+ if (isIE6)
+ {
+ tabNode.href = "javascript:void(0)";
+ }
+
+ var panelBarNode = this.parentPanel ?
+ Firebug.chrome.getPanel(this.parentPanel).sidePanelBarNode :
+ this.panelBarNode;
+
+ panelBarNode.appendChild(tabNode);
+ tabNode.style.display = "block";
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ // create ToolButtons
+ if (options.hasToolButtons)
+ {
+ this.toolButtonsNode = createElement("span", {
+ id: panelId + "Buttons",
+ className: "fbToolbarButtons"
+ });
+
+ $("fbToolbarButtons").appendChild(this.toolButtonsNode);
+ }
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ // create StatusBar
+ if (options.hasStatusBar)
+ {
+ this.statusBarBox = $("fbStatusBarBox");
+
+ this.statusBarNode = createElement("span", {
+ id: panelId + "StatusBar",
+ className: "fbToolbarButtons fbStatusBar"
+ });
+
+ this.statusBarBox.appendChild(this.statusBarNode);
+ }
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ // create SidePanel
+ }
+
+ this.containerNode = this.panelNode.parentNode;
+
+ if (FBTrace.DBG_INITIALIZE) FBTrace.sysout("Firebug.Panel.create", this.name);
+
+ // xxxpedro contextMenu
+ this.onContextMenu = bind(this.onContextMenu, this);
+
+ /*
+ this.context = context;
+ this.document = doc;
+
+ this.panelNode = doc.createElement("div");
+ this.panelNode.ownerPanel = this;
+
+ setClass(this.panelNode, "panelNode panelNode-"+this.name+" contextUID="+context.uid);
+ doc.body.appendChild(this.panelNode);
+
+ if (FBTrace.DBG_INITIALIZE)
+ FBTrace.sysout("firebug.initialize panelNode for "+this.name+"\n");
+
+ this.initializeNode(this.panelNode);
+ /**/
+ },
+
+ destroy: function(state) // Panel may store info on state
+ {
+ if (FBTrace.DBG_INITIALIZE) FBTrace.sysout("Firebug.Panel.destroy", this.name);
+
+ if (this.hasSidePanel)
+ {
+ this.sidePanelBar.destroy();
+ this.sidePanelBar = null;
+ }
+
+ this.options = null;
+ this.name = null;
+ this.parentPanel = null;
+
+ this.tabNode = null;
+ this.panelNode = null;
+ this.containerNode = null;
+
+ this.toolButtonsNode = null;
+ this.statusBarBox = null;
+ this.statusBarNode = null;
+
+ //if (this.panelNode)
+ // delete this.panelNode.ownerPanel;
+
+ //this.destroyNode();
+ },
+
+ initialize: function()
+ {
+ if (FBTrace.DBG_INITIALIZE) FBTrace.sysout("Firebug.Panel.initialize", this.name);
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ if (this.hasSidePanel)
+ {
+ this.sidePanelBar.initialize();
+ }
+
+ var options = this.options = extend(Firebug.Panel.options, this.options);
+ var panelId = "fb" + this.name;
+
+ this.panelNode = $(panelId);
+
+ this.tabNode = $(panelId + "Tab");
+ this.tabNode.style.display = "block";
+
+ if (options.hasStatusBar)
+ {
+ this.statusBarBox = $("fbStatusBarBox");
+ this.statusBarNode = $(panelId + "StatusBar");
+ }
+
+ if (options.hasToolButtons)
+ {
+ this.toolButtonsNode = $(panelId + "Buttons");
+ }
+
+ this.containerNode = this.panelNode.parentNode;
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ // restore persistent state
+ this.containerNode.scrollTop = this.lastScrollTop;
+
+ // xxxpedro contextMenu
+ addEvent(this.containerNode, "contextmenu", this.onContextMenu);
+
+
+ /// TODO: xxxpedro infoTip Hack
+ Firebug.chrome.currentPanel =
+ Firebug.chrome.selectedPanel && Firebug.chrome.selectedPanel.sidePanelBar ?
+ Firebug.chrome.selectedPanel.sidePanelBar.selectedPanel :
+ Firebug.chrome.selectedPanel;
+
+ Firebug.showInfoTips = true;
+ if (Firebug.InfoTip)
+ Firebug.InfoTip.initializeBrowser(Firebug.chrome);
+ },
+
+ shutdown: function()
+ {
+ if (FBTrace.DBG_INITIALIZE) FBTrace.sysout("Firebug.Panel.shutdown", this.name);
+
+ /// TODO: xxxpedro infoTip Hack
+ if (Firebug.InfoTip)
+ Firebug.InfoTip.uninitializeBrowser(Firebug.chrome);
+
+ if (Firebug.chrome.largeCommandLineVisible)
+ Firebug.chrome.hideLargeCommandLine();
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ if (this.hasSidePanel)
+ {
+ // TODO: xxxpedro firebug1.3a6
+ // new PanelBar mechanism will need to call shutdown to hide the panels (so it
+ // doesn't appears in other panel's sidePanelBar. Therefore, we need to implement
+ // a "remember selected panel" feature in the sidePanelBar
+ //this.sidePanelBar.shutdown();
+ }
+
+ // store persistent state
+ this.lastScrollTop = this.containerNode.scrollTop;
+
+ // xxxpedro contextMenu
+ removeEvent(this.containerNode, "contextmenu", this.onContextMenu);
+ },
+
+ detach: function(oldChrome, newChrome)
+ {
+ if (oldChrome && oldChrome.selectedPanel && oldChrome.selectedPanel.name == this.name)
+ this.lastScrollTop = oldChrome.selectedPanel.containerNode.scrollTop;
+ },
+
+ reattach: function(doc)
+ {
+ if (this.options.innerHTMLSync)
+ this.synchronizeUI();
+ },
+
+ synchronizeUI: function()
+ {
+ this.containerNode.scrollTop = this.lastScrollTop || 0;
+ },
+
+ show: function(state)
+ {
+ var options = this.options;
+
+ if (options.hasStatusBar)
+ {
+ this.statusBarBox.style.display = "inline";
+ this.statusBarNode.style.display = "inline";
+ }
+
+ if (options.hasToolButtons)
+ {
+ this.toolButtonsNode.style.display = "inline";
+ }
+
+ this.panelNode.style.display = "block";
+
+ this.visible = true;
+
+ if (!this.parentPanel)
+ Firebug.chrome.layout(this);
+ },
+
+ hide: function(state)
+ {
+ var options = this.options;
+
+ if (options.hasStatusBar)
+ {
+ this.statusBarBox.style.display = "none";
+ this.statusBarNode.style.display = "none";
+ }
+
+ if (options.hasToolButtons)
+ {
+ this.toolButtonsNode.style.display = "none";
+ }
+
+ this.panelNode.style.display = "none";
+
+ this.visible = false;
+ },
+
+ watchWindow: function(win)
+ {
+ },
+
+ unwatchWindow: function(win)
+ {
+ },
+
+ updateOption: function(name, value)
+ {
+ },
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+ /**
+ * Toolbar helpers
+ */
+ showToolbarButtons: function(buttonsId, show)
+ {
+ try
+ {
+ if (!this.context.browser) // XXXjjb this is bug. Somehow the panel context is not FirebugContext.
+ {
+ if (FBTrace.DBG_ERRORS)
+ FBTrace.sysout("firebug.Panel showToolbarButtons this.context has no browser, this:", this);
+
+ return;
+ }
+ var buttons = this.context.browser.chrome.$(buttonsId);
+ if (buttons)
+ collapse(buttons, show ? "false" : "true");
+ }
+ catch (exc)
+ {
+ if (FBTrace.DBG_ERRORS)
+ {
+ FBTrace.dumpProperties("firebug.Panel showToolbarButtons FAILS", exc);
+ if (!this.context.browser)FBTrace.dumpStack("firebug.Panel showToolbarButtons no browser");
+ }
+ }
+ },
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+ /**
+ * Returns a number indicating the view's ability to inspect the object.
+ *
+ * Zero means not supported, and higher numbers indicate specificity.
+ */
+ supportsObject: function(object)
+ {
+ return 0;
+ },
+
+ hasObject: function(object) // beyond type testing, is this object selectable?
+ {
+ return false;
+ },
+
+ select: function(object, forceUpdate)
+ {
+ if (!object)
+ object = this.getDefaultSelection(this.context);
+
+ if(FBTrace.DBG_PANELS)
+ FBTrace.sysout("firebug.select "+this.name+" forceUpdate: "+forceUpdate+" "+object+((object==this.selection)?"==":"!=")+this.selection);
+
+ if (forceUpdate || object != this.selection)
+ {
+ this.selection = object;
+ this.updateSelection(object);
+
+ // TODO: xxxpedro
+ // XXXjoe This is kind of cheating, but, feh.
+ //Firebug.chrome.onPanelSelect(object, this);
+ //if (uiListeners.length > 0)
+ // dispatch(uiListeners, "onPanelSelect", [object, this]); // TODO: make Firebug.chrome a uiListener
+ }
+ },
+
+ updateSelection: function(object)
+ {
+ },
+
+ markChange: function(skipSelf)
+ {
+ if (this.dependents)
+ {
+ if (skipSelf)
+ {
+ for (var i = 0; i < this.dependents.length; ++i)
+ {
+ var panelName = this.dependents[i];
+ if (panelName != this.name)
+ this.context.invalidatePanels(panelName);
+ }
+ }
+ else
+ this.context.invalidatePanels.apply(this.context, this.dependents);
+ }
+ },
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+ startInspecting: function()
+ {
+ },
+
+ stopInspecting: function(object, cancelled)
+ {
+ },
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+ search: function(text, reverse)
+ {
+ },
+
+ /**
+ * Retrieves the search options that this modules supports.
+ * This is used by the search UI to present the proper options.
+ */
+ getSearchOptionsMenuItems: function()
+ {
+ return [
+ Firebug.Search.searchOptionMenu("search.Case Sensitive", "searchCaseSensitive")
+ ];
+ },
+
+ /**
+ * Navigates to the next document whose match parameter returns true.
+ */
+ navigateToNextDocument: function(match, reverse)
+ {
+ // This is an approximation of the UI that is displayed by the location
+ // selector. This should be close enough, although it may be better
+ // to simply generate the sorted list within the module, rather than
+ // sorting within the UI.
+ var self = this;
+ function compare(a, b) {
+ var locA = self.getObjectDescription(a);
+ var locB = self.getObjectDescription(b);
+ if(locA.path > locB.path)
+ return 1;
+ if(locA.path < locB.path)
+ return -1;
+ if(locA.name > locB.name)
+ return 1;
+ if(locA.name < locB.name)
+ return -1;
+ return 0;
+ }
+ var allLocs = this.getLocationList().sort(compare);
+ for (var curPos = 0; curPos < allLocs.length && allLocs[curPos] != this.location; curPos++);
+
+ function transformIndex(index) {
+ if (reverse) {
+ // For the reverse case we need to implement wrap around.
+ var intermediate = curPos - index - 1;
+ return (intermediate < 0 ? allLocs.length : 0) + intermediate;
+ } else {
+ return (curPos + index + 1) % allLocs.length;
+ }
+ };
+
+ for (var next = 0; next < allLocs.length - 1; next++)
+ {
+ var object = allLocs[transformIndex(next)];
+
+ if (match(object))
+ {
+ this.navigate(object);
+ return object;
+ }
+ }
+ },
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+ // Called when "Options" clicked. Return array of
+ // {label: 'name', nol10n: true, type: "checkbox", checked: <value>, command:function to set <value>}
+ getOptionsMenuItems: function()
+ {
+ return null;
+ },
+
+ /*
+ * Called by chrome.onContextMenu to build the context menu when this panel has focus.
+ * See also FirebugRep for a similar function also called by onContextMenu
+ * Extensions may monkey patch and chain off this call
+ * @param object: the 'realObject', a model value, eg a DOM property
+ * @param target: the HTML element clicked on.
+ * @return an array of menu items.
+ */
+ getContextMenuItems: function(object, target)
+ {
+ return [];
+ },
+
+ getBreakOnMenuItems: function()
+ {
+ return [];
+ },
+
+ getEditor: function(target, value)
+ {
+ },
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+ getDefaultSelection: function()
+ {
+ return null;
+ },
+
+ browseObject: function(object)
+ {
+ },
+
+ getPopupObject: function(target)
+ {
+ return Firebug.getRepObject(target);
+ },
+
+ getTooltipObject: function(target)
+ {
+ return Firebug.getRepObject(target);
+ },
+
+ showInfoTip: function(infoTip, x, y)
+ {
+
+ },
+
+ getObjectPath: function(object)
+ {
+ return null;
+ },
+
+ // An array of objects that can be passed to getObjectLocation.
+ // The list of things a panel can show, eg sourceFiles.
+ // Only shown if panel.location defined and supportsObject true
+ getLocationList: function()
+ {
+ return null;
+ },
+
+ getDefaultLocation: function()
+ {
+ return null;
+ },
+
+ getObjectLocation: function(object)
+ {
+ return "";
+ },
+
+ // Text for the location list menu eg script panel source file list
+ // return.path: group/category label, return.name: item label
+ getObjectDescription: function(object)
+ {
+ var url = this.getObjectLocation(object);
+ return FBL.splitURLBase(url);
+ },
+
+ /*
+ * UI signal that a tab needs attention, eg Script panel is currently stopped on a breakpoint
+ * @param: show boolean, true turns on.
+ */
+ highlight: function(show)
+ {
+ var tab = this.getTab();
+ if (!tab)
+ return;
+
+ if (show)
+ tab.setAttribute("highlight", "true");
+ else
+ tab.removeAttribute("highlight");
+ },
+
+ getTab: function()
+ {
+ var chrome = Firebug.chrome;
+
+ var tab = chrome.$("fbPanelBar2").getTab(this.name);
+ if (!tab)
+ tab = chrome.$("fbPanelBar1").getTab(this.name);
+ return tab;
+ },
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ // Support for Break On Next
+
+ /**
+ * Called by the framework when the user clicks on the Break On Next button.
+ * @param {Boolean} armed Set to true if the Break On Next feature is
+ * to be armed for action and set to false if the Break On Next should be disarmed.
+ * If 'armed' is true, then the next call to shouldBreakOnNext should be |true|.
+ */
+ breakOnNext: function(armed)
+ {
+ },
+
+ /**
+ * Called when a panel is selected/displayed. The method should return true
+ * if the Break On Next feature is currently armed for this panel.
+ */
+ shouldBreakOnNext: function()
+ {
+ return false;
+ },
+
+ /**
+ * Returns labels for Break On Next tooltip (one for enabled and one for disabled state).
+ * @param {Boolean} enabled Set to true if the Break On Next feature is
+ * currently activated for this panel.
+ */
+ getBreakOnNextTooltip: function(enabled)
+ {
+ return null;
+ },
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+ // xxxpedro contextMenu
+ onContextMenu: function(event)
+ {
+ if (!this.getContextMenuItems)
+ return;
+
+ cancelEvent(event, true);
+
+ var target = event.target || event.srcElement;
+
+ var menu = this.getContextMenuItems(this.selection, target);
+ if (!menu)
+ return;
+
+ var contextMenu = new Menu(
+ {
+ id: "fbPanelContextMenu",
+
+ items: menu
+ });
+
+ contextMenu.show(event.clientX, event.clientY);
+
+ return true;
+
+ /*
+ // TODO: xxxpedro move code to somewhere. code to get cross-browser
+ // window to screen coordinates
+ var box = Firebug.browser.getElementPosition(Firebug.chrome.node);
+
+ var screenY = 0;
+
+ // Firefox
+ if (typeof window.mozInnerScreenY != "undefined")
+ {
+ screenY = window.mozInnerScreenY;
+ }
+ // Chrome
+ else if (typeof window.innerHeight != "undefined")
+ {
+ screenY = window.outerHeight - window.innerHeight;
+ }
+ // IE
+ else if (typeof window.screenTop != "undefined")
+ {
+ screenY = window.screenTop;
+ }
+
+ contextMenu.show(event.screenX-box.left, event.screenY-screenY-box.top);
+ /**/
+ }
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+};
+
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+/**
+ * MeasureBox
+ * To get pixels size.width and size.height:
+ * <ul><li> this.startMeasuring(view); </li>
+ * <li> var size = this.measureText(lineNoCharsSpacer); </li>
+ * <li> this.stopMeasuring(); </li>
+ * </ul>
+ *
+ * @namespace
+ */
+Firebug.MeasureBox =
+{
+ startMeasuring: function(target)
+ {
+ if (!this.measureBox)
+ {
+ this.measureBox = target.ownerDocument.createElement("span");
+ this.measureBox.className = "measureBox";
+ }
+
+ copyTextStyles(target, this.measureBox);
+ target.ownerDocument.body.appendChild(this.measureBox);
+ },
+
+ getMeasuringElement: function()
+ {
+ return this.measureBox;
+ },
+
+ measureText: function(value)
+ {
+ this.measureBox.innerHTML = value ? escapeForSourceLine(value) : "m";
+ return {width: this.measureBox.offsetWidth, height: this.measureBox.offsetHeight-1};
+ },
+
+ measureInputText: function(value)
+ {
+ value = value ? escapeForTextNode(value) : "m";
+ if (!Firebug.showTextNodesWithWhitespace)
+ value = value.replace(/\t/g,'mmmmmm').replace(/\ /g,'m');
+ this.measureBox.innerHTML = value;
+ return {width: this.measureBox.offsetWidth, height: this.measureBox.offsetHeight-1};
+ },
+
+ getBox: function(target)
+ {
+ var style = this.measureBox.ownerDocument.defaultView.getComputedStyle(this.measureBox, "");
+ var box = getBoxFromStyles(style, this.measureBox);
+ return box;
+ },
+
+ stopMeasuring: function()
+ {
+ this.measureBox.parentNode.removeChild(this.measureBox);
+ }
+};
+
+
+// ************************************************************************************************
+if (FBL.domplate) Firebug.Rep = domplate(
+{
+ className: "",
+ inspectable: true,
+
+ supportsObject: function(object, type)
+ {
+ return false;
+ },
+
+ inspectObject: function(object, context)
+ {
+ Firebug.chrome.select(object);
+ },
+
+ browseObject: function(object, context)
+ {
+ },
+
+ persistObject: function(object, context)
+ {
+ },
+
+ getRealObject: function(object, context)
+ {
+ return object;
+ },
+
+ getTitle: function(object)
+ {
+ var label = safeToString(object);
+
+ var re = /\[object (.*?)\]/;
+ var m = re.exec(label);
+
+ ///return m ? m[1] : label;
+
+ // if the label is in the "[object TYPE]" format return its type
+ if (m)
+ {
+ return m[1];
+ }
+ // if it is IE we need to handle some special cases
+ else if (
+ // safeToString() fails to recognize some objects in IE
+ isIE &&
+ // safeToString() returns "[object]" for some objects like window.Image
+ (label == "[object]" ||
+ // safeToString() returns undefined for some objects like window.clientInformation
+ typeof object == "object" && typeof label == "undefined")
+ )
+ {
+ return "Object";
+ }
+ else
+ {
+ return label;
+ }
+ },
+
+ getTooltip: function(object)
+ {
+ return null;
+ },
+
+ getContextMenuItems: function(object, target, context)
+ {
+ return [];
+ },
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ // Convenience for domplates
+
+ STR: function(name)
+ {
+ return $STR(name);
+ },
+
+ cropString: function(text)
+ {
+ return cropString(text);
+ },
+
+ cropMultipleLines: function(text, limit)
+ {
+ return cropMultipleLines(text, limit);
+ },
+
+ toLowerCase: function(text)
+ {
+ return text ? text.toLowerCase() : text;
+ },
+
+ plural: function(n)
+ {
+ return n == 1 ? "" : "s";
+ }
+});
+
+// ************************************************************************************************
+
+
+// ************************************************************************************************
+}});
+
+/* See license.txt for terms of usage */
+
+FBL.ns( /** @scope s_gui */ function() { with (FBL) {
+// ************************************************************************************************
+
+// ************************************************************************************************
+// Controller
+
+/**@namespace*/
+FBL.Controller = {
+
+ controllers: null,
+ controllerContext: null,
+
+ initialize: function(context)
+ {
+ this.controllers = [];
+ this.controllerContext = context || Firebug.chrome;
+ },
+
+ shutdown: function()
+ {
+ this.removeControllers();
+
+ //this.controllers = null;
+ //this.controllerContext = null;
+ },
+
+ addController: function()
+ {
+ for (var i=0, arg; arg=arguments[i]; i++)
+ {
+ // If the first argument is a string, make a selector query
+ // within the controller node context
+ if (typeof arg[0] == "string")
+ {
+ arg[0] = $$(arg[0], this.controllerContext);
+ }
+
+ // bind the handler to the proper context
+ var handler = arg[2];
+ arg[2] = bind(handler, this);
+ // save the original handler as an extra-argument, so we can
+ // look for it later, when removing a particular controller
+ arg[3] = handler;
+
+ this.controllers.push(arg);
+ addEvent.apply(this, arg);
+ }
+ },
+
+ removeController: function()
+ {
+ for (var i=0, arg; arg=arguments[i]; i++)
+ {
+ for (var j=0, c; c=this.controllers[j]; j++)
+ {
+ if (arg[0] == c[0] && arg[1] == c[1] && arg[2] == c[3])
+ removeEvent.apply(this, c);
+ }
+ }
+ },
+
+ removeControllers: function()
+ {
+ for (var i=0, c; c=this.controllers[i]; i++)
+ {
+ removeEvent.apply(this, c);
+ }
+ }
+};
+
+
+// ************************************************************************************************
+// PanelBar
+
+/**@namespace*/
+FBL.PanelBar =
+{
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+ panelMap: null,
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+ selectedPanel: null,
+ parentPanelName: null,
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+ create: function(ownerPanel)
+ {
+ this.panelMap = {};
+ this.ownerPanel = ownerPanel;
+
+ if (ownerPanel)
+ {
+ ownerPanel.sidePanelBarNode = createElement("span");
+ ownerPanel.sidePanelBarNode.style.display = "none";
+ ownerPanel.sidePanelBarBoxNode.appendChild(ownerPanel.sidePanelBarNode);
+ }
+
+ var panels = Firebug.panelTypes;
+ for (var i=0, p; p=panels[i]; i++)
+ {
+ if ( // normal Panel of the Chrome's PanelBar
+ !ownerPanel && !p.prototype.parentPanel ||
+ // Child Panel of the current Panel's SidePanelBar
+ ownerPanel && p.prototype.parentPanel &&
+ ownerPanel.name == p.prototype.parentPanel)
+ {
+ this.addPanel(p.prototype.name);
+ }
+ }
+ },
+
+ destroy: function()
+ {
+ PanelBar.shutdown.call(this);
+
+ for (var name in this.panelMap)
+ {
+ this.removePanel(name);
+
+ var panel = this.panelMap[name];
+ panel.destroy();
+
+ this.panelMap[name] = null;
+ delete this.panelMap[name];
+ }
+
+ this.panelMap = null;
+ this.ownerPanel = null;
+ },
+
+ initialize: function()
+ {
+ if (this.ownerPanel)
+ this.ownerPanel.sidePanelBarNode.style.display = "inline";
+
+ for(var name in this.panelMap)
+ {
+ (function(self, name){
+
+ // tab click handler
+ var onTabClick = function onTabClick()
+ {
+ self.selectPanel(name);
+ return false;
+ };
+
+ Firebug.chrome.addController([self.panelMap[name].tabNode, "mousedown", onTabClick]);
+
+ })(this, name);
+ }
+ },
+
+ shutdown: function()
+ {
+ var selectedPanel = this.selectedPanel;
+
+ if (selectedPanel)
+ {
+ removeClass(selectedPanel.tabNode, "fbSelectedTab");
+ selectedPanel.hide();
+ selectedPanel.shutdown();
+ }
+
+ if (this.ownerPanel)
+ this.ownerPanel.sidePanelBarNode.style.display = "none";
+
+ this.selectedPanel = null;
+ },
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+ addPanel: function(panelName, parentPanel)
+ {
+ var PanelType = Firebug.panelTypeMap[panelName];
+ var panel = this.panelMap[panelName] = new PanelType();
+
+ panel.create();
+ },
+
+ removePanel: function(panelName)
+ {
+ var panel = this.panelMap[panelName];
+ if (panel.hasOwnProperty(panelName))
+ panel.destroy();
+ },
+
+ selectPanel: function(panelName)
+ {
+ var selectedPanel = this.selectedPanel;
+ var panel = this.panelMap[panelName];
+
+ if (panel && selectedPanel != panel)
+ {
+ if (selectedPanel)
+ {
+ removeClass(selectedPanel.tabNode, "fbSelectedTab");
+ selectedPanel.shutdown();
+ selectedPanel.hide();
+ }
+
+ if (!panel.parentPanel)
+ Firebug.context.persistedState.selectedPanelName = panelName;
+
+ this.selectedPanel = panel;
+
+ setClass(panel.tabNode, "fbSelectedTab");
+ panel.show();
+ panel.initialize();
+ }
+ },
+
+ getPanel: function(panelName)
+ {
+ var panel = this.panelMap[panelName];
+
+ return panel;
+ }
+
+};
+
+//************************************************************************************************
+// Button
+
+/**
+ * options.element
+ * options.caption
+ * options.title
+ *
+ * options.owner
+ * options.className
+ * options.pressedClassName
+ *
+ * options.onPress
+ * options.onUnpress
+ * options.onClick
+ *
+ * @class
+ * @extends FBL.Controller
+ *
+ */
+
+FBL.Button = function(options)
+{
+ options = options || {};
+
+ append(this, options);
+
+ this.state = "unpressed";
+ this.display = "unpressed";
+
+ if (this.element)
+ {
+ this.container = this.element.parentNode;
+ }
+ else
+ {
+ this.shouldDestroy = true;
+
+ this.container = this.owner.getPanel().toolButtonsNode;
+
+ this.element = createElement("a", {
+ className: this.baseClassName + " " + this.className + " fbHover",
+ innerHTML: this.caption
+ });
+
+ if (this.title)
+ this.element.title = this.title;
+
+ this.container.appendChild(this.element);
+ }
+};
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+Button.prototype = extend(Controller,
+/**@extend FBL.Button.prototype*/
+{
+ type: "normal",
+ caption: "caption",
+ title: null,
+
+ className: "", // custom class
+ baseClassName: "fbButton", // control class
+ pressedClassName: "fbBtnPressed", // control pressed class
+
+ element: null,
+ container: null,
+ owner: null,
+
+ state: null,
+ display: null,
+
+ destroy: function()
+ {
+ this.shutdown();
+
+ // only remove if it is a dynamically generated button (not pre-rendered)
+ if (this.shouldDestroy)
+ this.container.removeChild(this.element);
+
+ this.element = null;
+ this.container = null;
+ this.owner = null;
+ },
+
+ initialize: function()
+ {
+ Controller.initialize.apply(this);
+
+ var element = this.element;
+
+ this.addController([element, "mousedown", this.handlePress]);
+
+ if (this.type == "normal")
+ this.addController(
+ [element, "mouseup", this.handleUnpress],
+ [element, "mouseout", this.handleUnpress],
+ [element, "click", this.handleClick]
+ );
+ },
+
+ shutdown: function()
+ {
+ Controller.shutdown.apply(this);
+ },
+
+ restore: function()
+ {
+ this.changeState("unpressed");
+ },
+
+ changeState: function(state)
+ {
+ this.state = state;
+ this.changeDisplay(state);
+ },
+
+ changeDisplay: function(display)
+ {
+ if (display != this.display)
+ {
+ if (display == "pressed")
+ {
+ setClass(this.element, this.pressedClassName);
+ }
+ else if (display == "unpressed")
+ {
+ removeClass(this.element, this.pressedClassName);
+ }
+ this.display = display;
+ }
+ },
+
+ handlePress: function(event)
+ {
+ cancelEvent(event, true);
+
+ if (this.type == "normal")
+ {
+ this.changeDisplay("pressed");
+ this.beforeClick = true;
+ }
+ else if (this.type == "toggle")
+ {
+ if (this.state == "pressed")
+ {
+ this.changeState("unpressed");
+
+ if (this.onUnpress)
+ this.onUnpress.apply(this.owner, arguments);
+ }
+ else
+ {
+ this.changeState("pressed");
+
+ if (this.onPress)
+ this.onPress.apply(this.owner, arguments);
+ }
+
+ if (this.onClick)
+ this.onClick.apply(this.owner, arguments);
+ }
+
+ return false;
+ },
+
+ handleUnpress: function(event)
+ {
+ cancelEvent(event, true);
+
+ if (this.beforeClick)
+ this.changeDisplay("unpressed");
+
+ return false;
+ },
+
+ handleClick: function(event)
+ {
+ cancelEvent(event, true);
+
+ if (this.type == "normal")
+ {
+ if (this.onClick)
+ this.onClick.apply(this.owner);
+
+ this.changeState("unpressed");
+ }
+
+ this.beforeClick = false;
+
+ return false;
+ }
+});
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+/**
+ * @class
+ * @extends FBL.Button
+ */
+FBL.IconButton = function()
+{
+ Button.apply(this, arguments);
+};
+
+IconButton.prototype = extend(Button.prototype,
+/**@extend FBL.IconButton.prototype*/
+{
+ baseClassName: "fbIconButton",
+ pressedClassName: "fbIconPressed"
+});
+
+
+//************************************************************************************************
+// Menu
+
+var menuItemProps = {"class": "$item.className", type: "$item.type", value: "$item.value",
+ _command: "$item.command"};
+
+if (isIE6)
+ menuItemProps.href = "javascript:void(0)";
+
+// Allow GUI to be loaded even when Domplate module is not installed.
+if (FBL.domplate)
+var MenuPlate = domplate(Firebug.Rep,
+{
+ tag:
+ DIV({"class": "fbMenu fbShadow"},
+ DIV({"class": "fbMenuContent fbShadowContent"},
+ FOR("item", "$object.items|memberIterator",
+ TAG("$item.tag", {item: "$item"})
+ )
+ )
+ ),
+
+ itemTag:
+ A(menuItemProps,
+ "$item.label"
+ ),
+
+ checkBoxTag:
+ A(extend(menuItemProps, {checked : "$item.checked"}),
+
+ "$item.label"
+ ),
+
+ radioButtonTag:
+ A(extend(menuItemProps, {selected : "$item.selected"}),
+
+ "$item.label"
+ ),
+
+ groupTag:
+ A(extend(menuItemProps, {child: "$item.child"}),
+ "$item.label"
+ ),
+
+ shortcutTag:
+ A(menuItemProps,
+ "$item.label",
+ SPAN({"class": "fbMenuShortcutKey"},
+ "$item.key"
+ )
+ ),
+
+ separatorTag:
+ SPAN({"class": "fbMenuSeparator"}),
+
+ memberIterator: function(items)
+ {
+ var result = [];
+
+ for (var i=0, length=items.length; i<length; i++)
+ {
+ var item = items[i];
+
+ // separator representation
+ if (typeof item == "string" && item.indexOf("-") == 0)
+ {
+ result.push({tag: this.separatorTag});
+ continue;
+ }
+
+ item = extend(item, {});
+
+ item.type = item.type || "";
+ item.value = item.value || "";
+
+ var type = item.type;
+
+ // default item representation
+ item.tag = this.itemTag;
+
+ var className = item.className || "";
+
+ className += "fbMenuOption fbHover ";
+
+ // specific representations
+ if (type == "checkbox")
+ {
+ className += "fbMenuCheckBox ";
+ item.tag = this.checkBoxTag;
+ }
+ else if (type == "radiobutton")
+ {
+ className += "fbMenuRadioButton ";
+ item.tag = this.radioButtonTag;
+ }
+ else if (type == "group")
+ {
+ className += "fbMenuGroup ";
+ item.tag = this.groupTag;
+ }
+ else if (type == "shortcut")
+ {
+ className += "fbMenuShortcut ";
+ item.tag = this.shortcutTag;
+ }
+
+ if (item.checked)
+ className += "fbMenuChecked ";
+ else if (item.selected)
+ className += "fbMenuRadioSelected ";
+
+ if (item.disabled)
+ className += "fbMenuDisabled ";
+
+ item.className = className;
+
+ item.label = $STR(item.label);
+
+ result.push(item);
+ }
+
+ return result;
+ }
+});
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+/**
+ * options
+ * options.element
+ * options.id
+ * options.items
+ *
+ * item.label
+ * item.className
+ * item.type
+ * item.value
+ * item.disabled
+ * item.checked
+ * item.selected
+ * item.command
+ * item.child
+ *
+ *
+ * @class
+ * @extends FBL.Controller
+ *
+ */
+FBL.Menu = function(options)
+{
+ // if element is not pre-rendered, we must render it now
+ if (!options.element)
+ {
+ if (options.getItems)
+ options.items = options.getItems();
+
+ options.element = MenuPlate.tag.append(
+ {object: options},
+ getElementByClass(Firebug.chrome.document, "fbBody"),
+ MenuPlate
+ );
+ }
+
+ // extend itself with the provided options
+ append(this, options);
+
+ if (typeof this.element == "string")
+ {
+ this.id = this.element;
+ this.element = $(this.id);
+ }
+ else if (this.id)
+ {
+ this.element.id = this.id;
+ }
+
+ this.element.firebugIgnore = true;
+ this.elementStyle = this.element.style;
+
+ this.isVisible = false;
+
+ this.handleMouseDown = bind(this.handleMouseDown, this);
+ this.handleMouseOver = bind(this.handleMouseOver, this);
+ this.handleMouseOut = bind(this.handleMouseOut, this);
+
+ this.handleWindowMouseDown = bind(this.handleWindowMouseDown, this);
+};
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+var menuMap = {};
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+Menu.prototype = extend(Controller,
+/**@extend FBL.Menu.prototype*/
+{
+ destroy: function()
+ {
+ //if (this.element) console.log("destroy", this.element.id);
+
+ this.hide();
+
+ // if it is a childMenu, remove its reference from the parentMenu
+ if (this.parentMenu)
+ this.parentMenu.childMenu = null;
+
+ // remove the element from the document
+ this.element.parentNode.removeChild(this.element);
+
+ // clear references
+ this.element = null;
+ this.elementStyle = null;
+ this.parentMenu = null;
+ this.parentTarget = null;
+ },
+
+ initialize: function()
+ {
+ Controller.initialize.call(this);
+
+ this.addController(
+ [this.element, "mousedown", this.handleMouseDown],
+ [this.element, "mouseover", this.handleMouseOver]
+ );
+ },
+
+ shutdown: function()
+ {
+ Controller.shutdown.call(this);
+ },
+
+ show: function(x, y)
+ {
+ this.initialize();
+
+ if (this.isVisible) return;
+
+ //console.log("show", this.element.id);
+
+ x = x || 0;
+ y = y || 0;
+
+ if (this.parentMenu)
+ {
+ var oldChildMenu = this.parentMenu.childMenu;
+ if (oldChildMenu && oldChildMenu != this)
+ {
+ oldChildMenu.destroy();
+ }
+
+ this.parentMenu.childMenu = this;
+ }
+ else
+ addEvent(Firebug.chrome.document, "mousedown", this.handleWindowMouseDown);
+
+ this.elementStyle.display = "block";
+ this.elementStyle.visibility = "hidden";
+
+ var size = Firebug.chrome.getSize();
+
+ x = Math.min(x, size.width - this.element.clientWidth - 10);
+ x = Math.max(x, 0);
+
+ y = Math.min(y, size.height - this.element.clientHeight - 10);
+ y = Math.max(y, 0);
+
+ this.elementStyle.left = x + "px";
+ this.elementStyle.top = y + "px";
+
+ this.elementStyle.visibility = "visible";
+
+ this.isVisible = true;
+
+ if (isFunction(this.onShow))
+ this.onShow.apply(this, arguments);
+ },
+
+ hide: function()
+ {
+ this.clearHideTimeout();
+ this.clearShowChildTimeout();
+
+ if (!this.isVisible) return;
+
+ //console.log("hide", this.element.id);
+
+ this.elementStyle.display = "none";
+
+ if(this.childMenu)
+ {
+ this.childMenu.destroy();
+ this.childMenu = null;
+ }
+
+ if(this.parentTarget)
+ removeClass(this.parentTarget, "fbMenuGroupSelected");
+
+ this.isVisible = false;
+
+ this.shutdown();
+
+ if (isFunction(this.onHide))
+ this.onHide.apply(this, arguments);
+ },
+
+ showChildMenu: function(target)
+ {
+ var id = target.getAttribute("child");
+
+ var parent = this;
+ var target = target;
+
+ this.showChildTimeout = Firebug.chrome.window.setTimeout(function(){
+
+ //if (!parent.isVisible) return;
+
+ var box = Firebug.chrome.getElementBox(target);
+
+ var childMenuObject = menuMap.hasOwnProperty(id) ?
+ menuMap[id] : {element: $(id)};
+
+ var childMenu = new Menu(extend(childMenuObject,
+ {
+ parentMenu: parent,
+ parentTarget: target
+ }));
+
+ var offsetLeft = isIE6 ? -1 : -6; // IE6 problem with fixed position
+ childMenu.show(box.left + box.width + offsetLeft, box.top -6);
+ setClass(target, "fbMenuGroupSelected");
+
+ },350);
+ },
+
+ clearHideTimeout: function()
+ {
+ if (this.hideTimeout)
+ {
+ Firebug.chrome.window.clearTimeout(this.hideTimeout);
+ delete this.hideTimeout;
+ }
+ },
+
+ clearShowChildTimeout: function()
+ {
+ if(this.showChildTimeout)
+ {
+ Firebug.chrome.window.clearTimeout(this.showChildTimeout);
+ this.showChildTimeout = null;
+ }
+ },
+
+ handleMouseDown: function(event)
+ {
+ cancelEvent(event, true);
+
+ var topParent = this;
+ while (topParent.parentMenu)
+ topParent = topParent.parentMenu;
+
+ var target = event.target || event.srcElement;
+
+ target = getAncestorByClass(target, "fbMenuOption");
+
+ if(!target || hasClass(target, "fbMenuGroup"))
+ return false;
+
+ if (target && !hasClass(target, "fbMenuDisabled"))
+ {
+ var type = target.getAttribute("type");
+
+ if (type == "checkbox")
+ {
+ var checked = target.getAttribute("checked");
+ var value = target.getAttribute("value");
+ var wasChecked = hasClass(target, "fbMenuChecked");
+
+ if (wasChecked)
+ {
+ removeClass(target, "fbMenuChecked");
+ target.setAttribute("checked", "");
+ }
+ else
+ {
+ setClass(target, "fbMenuChecked");
+ target.setAttribute("checked", "true");
+ }
+
+ if (isFunction(this.onCheck))
+ this.onCheck.call(this, target, value, !wasChecked);
+ }
+
+ if (type == "radiobutton")
+ {
+ var selectedRadios = getElementsByClass(target.parentNode, "fbMenuRadioSelected");
+
+ var group = target.getAttribute("group");
+
+ for (var i = 0, length = selectedRadios.length; i < length; i++)
+ {
+ radio = selectedRadios[i];
+
+ if (radio.getAttribute("group") == group)
+ {
+ removeClass(radio, "fbMenuRadioSelected");
+ radio.setAttribute("selected", "");
+ }
+ }
+
+ setClass(target, "fbMenuRadioSelected");
+ target.setAttribute("selected", "true");
+ }
+
+ var handler = null;
+
+ // target.command can be a function or a string.
+ var cmd = target.command;
+
+ // If it is a function it will be used as the handler
+ if (isFunction(cmd))
+ handler = cmd;
+ // If it is a string it the property of the current menu object
+ // will be used as the handler
+ else if (typeof cmd == "string")
+ handler = this[cmd];
+
+ var closeMenu = true;
+
+ if (handler)
+ closeMenu = handler.call(this, target) !== false;
+
+ if (closeMenu)
+ topParent.hide();
+ }
+
+ return false;
+ },
+
+ handleWindowMouseDown: function(event)
+ {
+ //console.log("handleWindowMouseDown");
+
+ var target = event.target || event.srcElement;
+
+ target = getAncestorByClass(target, "fbMenu");
+
+ if (!target)
+ {
+ removeEvent(Firebug.chrome.document, "mousedown", this.handleWindowMouseDown);
+ this.hide();
+ }
+ },
+
+ handleMouseOver: function(event)
+ {
+ //console.log("handleMouseOver", this.element.id);
+
+ this.clearHideTimeout();
+ this.clearShowChildTimeout();
+
+ var target = event.target || event.srcElement;
+
+ target = getAncestorByClass(target, "fbMenuOption");
+
+ if(!target)
+ return;
+
+ var childMenu = this.childMenu;
+ if(childMenu)
+ {
+ removeClass(childMenu.parentTarget, "fbMenuGroupSelected");
+
+ if (childMenu.parentTarget != target && childMenu.isVisible)
+ {
+ childMenu.clearHideTimeout();
+ childMenu.hideTimeout = Firebug.chrome.window.setTimeout(function(){
+ childMenu.destroy();
+ },300);
+ }
+ }
+
+ if(hasClass(target, "fbMenuGroup"))
+ {
+ this.showChildMenu(target);
+ }
+ }
+});
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+append(Menu,
+/**@extend FBL.Menu*/
+{
+ register: function(object)
+ {
+ menuMap[object.id] = object;
+ },
+
+ check: function(element)
+ {
+ setClass(element, "fbMenuChecked");
+ element.setAttribute("checked", "true");
+ },
+
+ uncheck: function(element)
+ {
+ removeClass(element, "fbMenuChecked");
+ element.setAttribute("checked", "");
+ },
+
+ disable: function(element)
+ {
+ setClass(element, "fbMenuDisabled");
+ },
+
+ enable: function(element)
+ {
+ removeClass(element, "fbMenuDisabled");
+ }
+});
+
+
+//************************************************************************************************
+// Status Bar
+
+/**@class*/
+function StatusBar(){};
+
+StatusBar.prototype = extend(Controller, {
+
+});
+
+// ************************************************************************************************
+
+
+// ************************************************************************************************
+}});
+
+/* See license.txt for terms of usage */
+
+FBL.ns( /**@scope s_context*/ function() { with (FBL) {
+// ************************************************************************************************
+
+// ************************************************************************************************
+// Globals
+
+var refreshDelay = 300;
+
+// Opera and some versions of webkit returns the wrong value of document.elementFromPoint()
+// function, without taking into account the scroll position. Safari 4 (webkit/531.21.8)
+// still have this issue. Google Chrome 4 (webkit/532.5) does not. So, we're assuming this
+// issue was fixed in the 532 version
+var shouldFixElementFromPoint = isOpera || isSafari && browserVersion < "532";
+
+var evalError = "___firebug_evaluation_error___";
+var pixelsPerInch;
+
+var resetStyle = "margin:0; padding:0; border:0; position:absolute; overflow:hidden; display:block;";
+var offscreenStyle = resetStyle + "top:-1234px; left:-1234px;";
+
+
+// ************************************************************************************************
+// Context
+
+/** @class */
+FBL.Context = function(win)
+{
+ this.window = win.window;
+ this.document = win.document;
+
+ this.browser = Env.browser;
+
+ // Some windows in IE, like iframe, doesn't have the eval() method
+ if (isIE && !this.window.eval)
+ {
+ // But after executing the following line the method magically appears!
+ this.window.execScript("null");
+ // Just to make sure the "magic" really happened
+ if (!this.window.eval)
+ throw new Error("Firebug Error: eval() method not found in this window");
+ }
+
+ // Create a new "black-box" eval() method that runs in the global namespace
+ // of the context window, without exposing the local variables declared
+ // by the function that calls it
+ this.eval = this.window.eval("new Function('" +
+ "try{ return window.eval.apply(window,arguments) }catch(E){ E."+evalError+"=true; return E }" +
+ "')");
+};
+
+FBL.Context.prototype =
+{
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ // partial-port of Firebug tabContext.js
+
+ browser: null,
+ loaded: true,
+
+ setTimeout: function(fn, delay)
+ {
+ var win = this.window;
+
+ if (win.setTimeout == this.setTimeout)
+ throw new Error("setTimeout recursion");
+
+ var timeout = win.setTimeout.apply ? // IE doesn't have apply method on setTimeout
+ win.setTimeout.apply(win, arguments) :
+ win.setTimeout(fn, delay);
+
+ if (!this.timeouts)
+ this.timeouts = {};
+
+ this.timeouts[timeout] = 1;
+
+ return timeout;
+ },
+
+ clearTimeout: function(timeout)
+ {
+ clearTimeout(timeout);
+
+ if (this.timeouts)
+ delete this.timeouts[timeout];
+ },
+
+ setInterval: function(fn, delay)
+ {
+ var win = this.window;
+
+ var timeout = win.setInterval.apply ? // IE doesn't have apply method on setTimeout
+ win.setInterval.apply(win, arguments) :
+ win.setInterval(fn, delay);
+
+ if (!this.intervals)
+ this.intervals = {};
+
+ this.intervals[timeout] = 1;
+
+ return timeout;
+ },
+
+ clearInterval: function(timeout)
+ {
+ clearInterval(timeout);
+
+ if (this.intervals)
+ delete this.intervals[timeout];
+ },
+
+ invalidatePanels: function()
+ {
+ if (!this.invalidPanels)
+ this.invalidPanels = {};
+
+ for (var i = 0; i < arguments.length; ++i)
+ {
+ var panelName = arguments[i];
+
+ // avoid error. need to create a better getPanel() function as explained below
+ if (!Firebug.chrome || !Firebug.chrome.selectedPanel)
+ return;
+
+ //var panel = this.getPanel(panelName, true);
+ //TODO: xxxpedro context how to get all panels using a single function?
+ // the current workaround to make the invalidation works is invalidating
+ // only sidePanels. There's also a problem with panel name (LowerCase in Firebug Lite)
+ var panel = Firebug.chrome.selectedPanel.sidePanelBar ?
+ Firebug.chrome.selectedPanel.sidePanelBar.getPanel(panelName, true) :
+ null;
+
+ if (panel && !panel.noRefresh)
+ this.invalidPanels[panelName] = 1;
+ }
+
+ if (this.refreshTimeout)
+ {
+ this.clearTimeout(this.refreshTimeout);
+ delete this.refreshTimeout;
+ }
+
+ this.refreshTimeout = this.setTimeout(bindFixed(function()
+ {
+ var invalids = [];
+
+ for (var panelName in this.invalidPanels)
+ {
+ //var panel = this.getPanel(panelName, true);
+ //TODO: xxxpedro context how to get all panels using a single function?
+ // the current workaround to make the invalidation works is invalidating
+ // only sidePanels. There's also a problem with panel name (LowerCase in Firebug Lite)
+ var panel = Firebug.chrome.selectedPanel.sidePanelBar ?
+ Firebug.chrome.selectedPanel.sidePanelBar.getPanel(panelName, true) :
+ null;
+
+ if (panel)
+ {
+ if (panel.visible && !panel.editing)
+ panel.refresh();
+ else
+ panel.needsRefresh = true;
+
+ // If the panel is being edited, we'll keep trying to
+ // refresh it until editing is done
+ if (panel.editing)
+ invalids.push(panelName);
+ }
+ }
+
+ delete this.invalidPanels;
+ delete this.refreshTimeout;
+
+ // Keep looping until every tab is valid
+ if (invalids.length)
+ this.invalidatePanels.apply(this, invalids);
+ }, this), refreshDelay);
+ },
+
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ // Evalutation Method
+
+ /**
+ * Evaluates an expression in the current context window.
+ *
+ * @param {String} expr expression to be evaluated
+ *
+ * @param {String} context string indicating the global location
+ * of the object that will be used as the
+ * context. The context is referred in
+ * the expression as the "this" keyword.
+ * If no context is informed, the "window"
+ * context is used.
+ *
+ * @param {String} api string indicating the global location
+ * of the object that will be used as the
+ * api of the evaluation.
+ *
+ * @param {Function} errorHandler(message) error handler to be called
+ * if the evaluation fails.
+ */
+ evaluate: function(expr, context, api, errorHandler)
+ {
+ // the default context is the "window" object. It can be any string that represents
+ // a global accessible element as: "my.namespaced.object"
+ context = context || "window";
+
+ var isObjectLiteral = trim(expr).indexOf("{") == 0,
+ cmd,
+ result;
+
+ // if the context is the "window" object, we don't need a closure
+ if (context == "window")
+ {
+ // If it is an object literal, then wrap the expression with parenthesis so we can
+ // capture the return value
+ if (isObjectLiteral)
+ {
+ cmd = api ?
+ "with("+api+"){ ("+expr+") }" :
+ "(" + expr + ")";
+ }
+ else
+ {
+ cmd = api ?
+ "with("+api+"){ "+expr+" }" :
+ expr;
+ }
+ }
+ else
+ {
+ cmd = api ?
+ // with API and context, no return value
+ "(function(arguments){ with(" + api + "){ " +
+ expr +
+ " } }).call(" + context + ",undefined)"
+ :
+ // with context only, no return value
+ "(function(arguments){ " +
+ expr +
+ " }).call(" + context + ",undefined)";
+ }
+
+ result = this.eval(cmd);
+
+ if (result && result[evalError])
+ {
+ var msg = result.name ? (result.name + ": ") : "";
+ msg += result.message || result;
+
+ if (errorHandler)
+ result = errorHandler(msg);
+ else
+ result = msg;
+ }
+
+ return result;
+ },
+
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ // Window Methods
+
+ getWindowSize: function()
+ {
+ var width=0, height=0, el;
+
+ if (typeof this.window.innerWidth == "number")
+ {
+ width = this.window.innerWidth;
+ height = this.window.innerHeight;
+ }
+ else if ((el=this.document.documentElement) && (el.clientHeight || el.clientWidth))
+ {
+ width = el.clientWidth;
+ height = el.clientHeight;
+ }
+ else if ((el=this.document.body) && (el.clientHeight || el.clientWidth))
+ {
+ width = el.clientWidth;
+ height = el.clientHeight;
+ }
+
+ return {width: width, height: height};
+ },
+
+ getWindowScrollSize: function()
+ {
+ var width=0, height=0, el;
+
+ // first try the document.documentElement scroll size
+ if (!isIEQuiksMode && (el=this.document.documentElement) &&
+ (el.scrollHeight || el.scrollWidth))
+ {
+ width = el.scrollWidth;
+ height = el.scrollHeight;
+ }
+
+ // then we need to check if document.body has a bigger scroll size value
+ // because sometimes depending on the browser and the page, the document.body
+ // scroll size returns a smaller (and wrong) measure
+ if ((el=this.document.body) && (el.scrollHeight || el.scrollWidth) &&
+ (el.scrollWidth > width || el.scrollHeight > height))
+ {
+ width = el.scrollWidth;
+ height = el.scrollHeight;
+ }
+
+ return {width: width, height: height};
+ },
+
+ getWindowScrollPosition: function()
+ {
+ var top=0, left=0, el;
+
+ if(typeof this.window.pageYOffset == "number")
+ {
+ top = this.window.pageYOffset;
+ left = this.window.pageXOffset;
+ }
+ else if((el=this.document.body) && (el.scrollTop || el.scrollLeft))
+ {
+ top = el.scrollTop;
+ left = el.scrollLeft;
+ }
+ else if((el=this.document.documentElement) && (el.scrollTop || el.scrollLeft))
+ {
+ top = el.scrollTop;
+ left = el.scrollLeft;
+ }
+
+ return {top:top, left:left};
+ },
+
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ // Element Methods
+
+ getElementFromPoint: function(x, y)
+ {
+ if (shouldFixElementFromPoint)
+ {
+ var scroll = this.getWindowScrollPosition();
+ return this.document.elementFromPoint(x + scroll.left, y + scroll.top);
+ }
+ else
+ return this.document.elementFromPoint(x, y);
+ },
+
+ getElementPosition: function(el)
+ {
+ var left = 0;
+ var top = 0;
+
+ do
+ {
+ left += el.offsetLeft;
+ top += el.offsetTop;
+ }
+ while (el = el.offsetParent);
+
+ return {left:left, top:top};
+ },
+
+ getElementBox: function(el)
+ {
+ var result = {};
+
+ if (el.getBoundingClientRect)
+ {
+ var rect = el.getBoundingClientRect();
+
+ // fix IE problem with offset when not in fullscreen mode
+ var offset = isIE ? this.document.body.clientTop || this.document.documentElement.clientTop: 0;
+
+ var scroll = this.getWindowScrollPosition();
+
+ result.top = Math.round(rect.top - offset + scroll.top);
+ result.left = Math.round(rect.left - offset + scroll.left);
+ result.height = Math.round(rect.bottom - rect.top);
+ result.width = Math.round(rect.right - rect.left);
+ }
+ else
+ {
+ var position = this.getElementPosition(el);
+
+ result.top = position.top;
+ result.left = position.left;
+ result.height = el.offsetHeight;
+ result.width = el.offsetWidth;
+ }
+
+ return result;
+ },
+
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ // Measurement Methods
+
+ getMeasurement: function(el, name)
+ {
+ var result = {value: 0, unit: "px"};
+
+ var cssValue = this.getStyle(el, name);
+
+ if (!cssValue) return result;
+ if (cssValue.toLowerCase() == "auto") return result;
+
+ var reMeasure = /(\d+\.?\d*)(.*)/;
+ var m = cssValue.match(reMeasure);
+
+ if (m)
+ {
+ result.value = m[1]-0;
+ result.unit = m[2].toLowerCase();
+ }
+
+ return result;
+ },
+
+ getMeasurementInPixels: function(el, name)
+ {
+ if (!el) return null;
+
+ var m = this.getMeasurement(el, name);
+ var value = m.value;
+ var unit = m.unit;
+
+ if (unit == "px")
+ return value;
+
+ else if (unit == "pt")
+ return this.pointsToPixels(name, value);
+
+ else if (unit == "em")
+ return this.emToPixels(el, value);
+
+ else if (unit == "%")
+ return this.percentToPixels(el, value);
+
+ else if (unit == "ex")
+ return this.exToPixels(el, value);
+
+ // TODO: add other units. Maybe create a better general way
+ // to calculate measurements in different units.
+ },
+
+ getMeasurementBox1: function(el, name)
+ {
+ var sufixes = ["Top", "Left", "Bottom", "Right"];
+ var result = [];
+
+ for(var i=0, sufix; sufix=sufixes[i]; i++)
+ result[i] = Math.round(this.getMeasurementInPixels(el, name + sufix));
+
+ return {top:result[0], left:result[1], bottom:result[2], right:result[3]};
+ },
+
+ getMeasurementBox: function(el, name)
+ {
+ var result = [];
+ var sufixes = name == "border" ?
+ ["TopWidth", "LeftWidth", "BottomWidth", "RightWidth"] :
+ ["Top", "Left", "Bottom", "Right"];
+
+ if (isIE)
+ {
+ var propName, cssValue;
+ var autoMargin = null;
+
+ for(var i=0, sufix; sufix=sufixes[i]; i++)
+ {
+ propName = name + sufix;
+
+ cssValue = el.currentStyle[propName] || el.style[propName];
+
+ if (cssValue == "auto")
+ {
+ if (!autoMargin)
+ autoMargin = this.getCSSAutoMarginBox(el);
+
+ result[i] = autoMargin[sufix.toLowerCase()];
+ }
+ else
+ result[i] = this.getMeasurementInPixels(el, propName);
+
+ }
+
+ }
+ else
+ {
+ for(var i=0, sufix; sufix=sufixes[i]; i++)
+ result[i] = this.getMeasurementInPixels(el, name + sufix);
+ }
+
+ return {top:result[0], left:result[1], bottom:result[2], right:result[3]};
+ },
+
+ getCSSAutoMarginBox: function(el)
+ {
+ if (isIE && " meta title input script link a ".indexOf(" "+el.nodeName.toLowerCase()+" ") != -1)
+ return {top:0, left:0, bottom:0, right:0};
+ /**/
+
+ if (isIE && " h1 h2 h3 h4 h5 h6 h7 ul p ".indexOf(" "+el.nodeName.toLowerCase()+" ") == -1)
+ return {top:0, left:0, bottom:0, right:0};
+ /**/
+
+ var offsetTop = 0;
+ if (false && isIEStantandMode)
+ {
+ var scrollSize = Firebug.browser.getWindowScrollSize();
+ offsetTop = scrollSize.height;
+ }
+
+ var box = this.document.createElement("div");
+ //box.style.cssText = "margin:0; padding:1px; border: 0; position:static; overflow:hidden; visibility: hidden;";
+ box.style.cssText = "margin:0; padding:1px; border: 0; visibility: hidden;";
+
+ var clone = el.cloneNode(false);
+ var text = this.document.createTextNode(" ");
+ clone.appendChild(text);
+
+ box.appendChild(clone);
+
+ this.document.body.appendChild(box);
+
+ var marginTop = clone.offsetTop - box.offsetTop - 1;
+ var marginBottom = box.offsetHeight - clone.offsetHeight - 2 - marginTop;
+
+ var marginLeft = clone.offsetLeft - box.offsetLeft - 1;
+ var marginRight = box.offsetWidth - clone.offsetWidth - 2 - marginLeft;
+
+ this.document.body.removeChild(box);
+
+ return {top:marginTop+offsetTop, left:marginLeft, bottom:marginBottom-offsetTop, right:marginRight};
+ },
+
+ getFontSizeInPixels: function(el)
+ {
+ var size = this.getMeasurement(el, "fontSize");
+
+ if (size.unit == "px") return size.value;
+
+ // get font size, the dirty way
+ var computeDirtyFontSize = function(el, calibration)
+ {
+ var div = this.document.createElement("div");
+ var divStyle = offscreenStyle;
+
+ if (calibration)
+ divStyle += " font-size:"+calibration+"px;";
+
+ div.style.cssText = divStyle;
+ div.innerHTML = "A";
+ el.appendChild(div);
+
+ var value = div.offsetHeight;
+ el.removeChild(div);
+ return value;
+ };
+
+ /*
+ var calibrationBase = 200;
+ var calibrationValue = computeDirtyFontSize(el, calibrationBase);
+ var rate = calibrationBase / calibrationValue;
+ /**/
+
+ // the "dirty technique" fails in some environments, so we're using a static value
+ // based in some tests.
+ var rate = 200 / 225;
+
+ var value = computeDirtyFontSize(el);
+
+ return value * rate;
+ },
+
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ // Unit Funtions
+
+ pointsToPixels: function(name, value, returnFloat)
+ {
+ var axis = /Top$|Bottom$/.test(name) ? "y" : "x";
+
+ var result = value * pixelsPerInch[axis] / 72;
+
+ return returnFloat ? result : Math.round(result);
+ },
+
+ emToPixels: function(el, value)
+ {
+ if (!el) return null;
+
+ var fontSize = this.getFontSizeInPixels(el);
+
+ return Math.round(value * fontSize);
+ },
+
+ exToPixels: function(el, value)
+ {
+ if (!el) return null;
+
+ // get ex value, the dirty way
+ var div = this.document.createElement("div");
+ div.style.cssText = offscreenStyle + "width:"+value + "ex;";
+
+ el.appendChild(div);
+ var value = div.offsetWidth;
+ el.removeChild(div);
+
+ return value;
+ },
+
+ percentToPixels: function(el, value)
+ {
+ if (!el) return null;
+
+ // get % value, the dirty way
+ var div = this.document.createElement("div");
+ div.style.cssText = offscreenStyle + "width:"+value + "%;";
+
+ el.appendChild(div);
+ var value = div.offsetWidth;
+ el.removeChild(div);
+
+ return value;
+ },
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+ getStyle: isIE ? function(el, name)
+ {
+ return el.currentStyle[name] || el.style[name] || undefined;
+ }
+ : function(el, name)
+ {
+ return this.document.defaultView.getComputedStyle(el,null)[name]
+ || el.style[name] || undefined;
+ }
+
+};
+
+
+// ************************************************************************************************
+}});
+
+/* See license.txt for terms of usage */
+
+FBL.ns( /**@scope ns-chrome*/ function() { with (FBL) {
+// ************************************************************************************************
+
+// ************************************************************************************************
+// Globals
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+// Window Options
+
+var WindowDefaultOptions =
+ {
+ type: "frame",
+ id: "FirebugUI"
+ //height: 350 // obsolete
+ },
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+// Instantiated objects
+
+ commandLine,
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+// Interface Elements Cache
+
+ fbTop,
+ fbContent,
+ fbContentStyle,
+ fbBottom,
+ fbBtnInspect,
+
+ fbToolbar,
+
+ fbPanelBox1,
+ fbPanelBox1Style,
+ fbPanelBox2,
+ fbPanelBox2Style,
+ fbPanelBar2Box,
+ fbPanelBar2BoxStyle,
+
+ fbHSplitter,
+ fbVSplitter,
+ fbVSplitterStyle,
+
+ fbPanel1,
+ fbPanel1Style,
+ fbPanel2,
+ fbPanel2Style,
+
+ fbConsole,
+ fbConsoleStyle,
+ fbHTML,
+
+ fbCommandLine,
+ fbLargeCommandLine,
+ fbLargeCommandButtons,
+
+//* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+// Cached size values
+
+ topHeight,
+ topPartialHeight,
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+ chromeRedrawSkipRate = isIE ? 75 : isOpera ? 80 : 75,
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+ lastSelectedPanelName,
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+ focusCommandLineState = 0,
+ lastFocusedPanelName,
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+ lastHSplitterMouseMove = 0,
+ onHSplitterMouseMoveBuffer = null,
+ onHSplitterMouseMoveTimer = null,
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+ lastVSplitterMouseMove = 0;
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+
+// ************************************************************************************************
+// FirebugChrome
+
+FBL.defaultPersistedState =
+{
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ isOpen: false,
+ height: 300,
+ sidePanelWidth: 350,
+
+ selectedPanelName: "Console",
+ selectedHTMLElementId: null,
+
+ htmlSelectionStack: []
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+};
+
+/**@namespace*/
+FBL.FirebugChrome =
+{
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+ //isOpen: false,
+ //height: 300,
+ //sidePanelWidth: 350,
+
+ //selectedPanelName: "Console",
+ //selectedHTMLElementId: null,
+
+ chromeMap: {},
+
+ htmlSelectionStack: [],
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+ create: function()
+ {
+ if (FBTrace.DBG_INITIALIZE) FBTrace.sysout("FirebugChrome.create", "creating chrome window");
+
+ createChromeWindow();
+ },
+
+ initialize: function()
+ {
+ if (FBTrace.DBG_INITIALIZE) FBTrace.sysout("FirebugChrome.initialize", "initializing chrome window");
+
+ if (Env.chrome.type == "frame" || Env.chrome.type == "div")
+ ChromeMini.create(Env.chrome);
+
+ var chrome = Firebug.chrome = new Chrome(Env.chrome);
+ FirebugChrome.chromeMap[chrome.type] = chrome;
+
+ addGlobalEvent("keydown", onGlobalKeyDown);
+
+ if (Env.Options.enablePersistent && chrome.type == "popup")
+ {
+ // TODO: xxxpedro persist - revise chrome synchronization when in persistent mode
+ var frame = FirebugChrome.chromeMap.frame;
+ if (frame)
+ frame.close();
+
+ //chrome.reattach(frame, chrome);
+ //TODO: xxxpedro persist synchronize?
+ chrome.initialize();
+ }
+ },
+
+ clone: function(FBChrome)
+ {
+ for (var name in FBChrome)
+ {
+ var prop = FBChrome[name];
+ if (FBChrome.hasOwnProperty(name) && !isFunction(prop))
+ {
+ this[name] = prop;
+ }
+ }
+ }
+};
+
+
+
+// ************************************************************************************************
+// Chrome Window Creation
+
+var createChromeWindow = function(options)
+{
+ options = extend(WindowDefaultOptions, options || {});
+
+ //* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ // Locals
+
+ var browserWin = Env.browser.window;
+ var browserContext = new Context(browserWin);
+ var prefs = Store.get("FirebugLite");
+ var persistedState = prefs && prefs.persistedState || defaultPersistedState;
+
+ var chrome = {},
+
+ context = options.context || Env.browser,
+
+ type = chrome.type = Env.Options.enablePersistent ?
+ "popup" :
+ options.type,
+
+ isChromeFrame = type == "frame",
+
+ useLocalSkin = Env.useLocalSkin,
+
+ url = useLocalSkin ?
+ Env.Location.skin :
+ "about:blank",
+
+ // document.body not available in XML+XSL documents in Firefox
+ body = context.document.getElementsByTagName("body")[0],
+
+ formatNode = function(node)
+ {
+ if (!Env.isDebugMode)
+ {
+ node.firebugIgnore = true;
+ }
+
+ var browserWinSize = browserContext.getWindowSize();
+ var height = persistedState.height || 300;
+
+ height = Math.min(browserWinSize.height, height);
+ height = Math.max(200, height);
+
+ node.style.border = "0";
+ node.style.visibility = "hidden";
+ node.style.zIndex = "2147483647"; // MAX z-index = 2147483647
+ node.style.position = noFixedPosition ? "absolute" : "fixed";
+ node.style.width = "100%"; // "102%"; IE auto margin bug
+ node.style.left = "0";
+ node.style.bottom = noFixedPosition ? "-1px" : "0";
+ node.style.height = height + "px";
+
+ // avoid flickering during chrome rendering
+ //if (isFirefox)
+ // node.style.display = "none";
+ },
+
+ createChromeDiv = function()
+ {
+ //Firebug.Console.warn("Firebug Lite GUI is working in 'windowless mode'. It may behave slower and receive interferences from the page in which it is installed.");
+
+ var node = chrome.node = createGlobalElement("div"),
+ style = createGlobalElement("style"),
+
+ css = FirebugChrome.Skin.CSS
+ /*
+ .replace(/;/g, " !important;")
+ .replace(/!important\s!important/g, "!important")
+ .replace(/display\s*:\s*(\w+)\s*!important;/g, "display:$1;")*/,
+
+ // reset some styles to minimize interference from the main page's style
+ rules = ".fbBody *{margin:0;padding:0;font-size:11px;line-height:13px;color:inherit;}" +
+ // load the chrome styles
+ css +
+ // adjust some remaining styles
+ ".fbBody #fbHSplitter{position:absolute !important;} .fbBody #fbHTML span{line-height:14px;} .fbBody .lineNo div{line-height:inherit !important;}";
+ /*
+ if (isIE)
+ {
+ // IE7 CSS bug (FbChrome table bigger than its parent div)
+ rules += ".fbBody table.fbChrome{position: static !important;}";
+ }/**/
+
+ style.type = "text/css";
+
+ if (style.styleSheet)
+ style.styleSheet.cssText = rules;
+ else
+ style.appendChild(context.document.createTextNode(rules));
+
+ document.getElementsByTagName("head")[0].appendChild(style);
+
+ node.className = "fbBody";
+ node.style.overflow = "hidden";
+ node.innerHTML = getChromeDivTemplate();
+
+ if (isIE)
+ {
+ // IE7 CSS bug (FbChrome table bigger than its parent div)
+ setTimeout(function(){
+ node.firstChild.style.height = "1px";
+ node.firstChild.style.position = "static";
+ },0);
+ /**/
+ }
+
+ formatNode(node);
+
+ body.appendChild(node);
+
+ chrome.window = window;
+ chrome.document = document;
+ onChromeLoad(chrome);
+ };
+
+ //* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+ try
+ {
+ //* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ // create the Chrome as a "div" (windowless mode)
+ if (type == "div")
+ {
+ createChromeDiv();
+ return;
+ }
+
+ //* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ // cretate the Chrome as an "iframe"
+ else if (isChromeFrame)
+ {
+ // Create the Chrome Frame
+ var node = chrome.node = createGlobalElement("iframe");
+ node.setAttribute("src", url);
+ node.setAttribute("frameBorder", "0");
+
+ formatNode(node);
+
+ body.appendChild(node);
+
+ // must set the id after appending to the document, otherwise will cause an
+ // strange error in IE, making the iframe load the page in which the bookmarklet
+ // was created (like getfirebug.com), before loading the injected UI HTML,
+ // generating an "Access Denied" error.
+ node.id = options.id;
+ }
+
+ //* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ // create the Chrome as a "popup"
+ else
+ {
+ var height = persistedState.popupHeight || 300;
+ var browserWinSize = browserContext.getWindowSize();
+
+ var browserWinLeft = typeof browserWin.screenX == "number" ?
+ browserWin.screenX : browserWin.screenLeft;
+
+ var popupLeft = typeof persistedState.popupLeft == "number" ?
+ persistedState.popupLeft : browserWinLeft;
+
+ var browserWinTop = typeof browserWin.screenY == "number" ?
+ browserWin.screenY : browserWin.screenTop;
+
+ var popupTop = typeof persistedState.popupTop == "number" ?
+ persistedState.popupTop :
+ Math.max(
+ 0,
+ Math.min(
+ browserWinTop + browserWinSize.height - height,
+ // Google Chrome bug
+ screen.availHeight - height - 61
+ )
+ );
+
+ var popupWidth = typeof persistedState.popupWidth == "number" ?
+ persistedState.popupWidth :
+ Math.max(
+ 0,
+ Math.min(
+ browserWinSize.width,
+ // Opera opens popup in a new tab if it's too big!
+ screen.availWidth-10
+ )
+ );
+
+ var popupHeight = typeof persistedState.popupHeight == "number" ?
+ persistedState.popupHeight : 300;
+
+ var options = [
+ "true,top=", popupTop,
+ ",left=", popupLeft,
+ ",height=", popupHeight,
+ ",width=", popupWidth,
+ ",resizable"
+ ].join(""),
+
+ node = chrome.node = context.window.open(
+ url,
+ "popup",
+ options
+ );
+
+ if (node)
+ {
+ try
+ {
+ node.focus();
+ }
+ catch(E)
+ {
+ alert("Firebug Error: Firebug popup was blocked.");
+ return;
+ }
+ }
+ else
+ {
+ alert("Firebug Error: Firebug popup was blocked.");
+ return;
+ }
+ }
+
+ //* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ // Inject the interface HTML if it is not using the local skin
+
+ if (!useLocalSkin)
+ {
+ var tpl = getChromeTemplate(!isChromeFrame),
+ doc = isChromeFrame ? node.contentWindow.document : node.document;
+
+ doc.write(tpl);
+ doc.close();
+ }
+
+ //* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ // Wait the Window to be loaded
+
+ var win,
+
+ waitDelay = useLocalSkin ? isChromeFrame ? 200 : 300 : 100,
+
+ waitForWindow = function()
+ {
+ if ( // Frame loaded... OR
+ isChromeFrame && (win=node.contentWindow) &&
+ node.contentWindow.document.getElementById("fbCommandLine") ||
+
+ // Popup loaded
+ !isChromeFrame && (win=node.window) && node.document &&
+ node.document.getElementById("fbCommandLine") )
+ {
+ chrome.window = win.window;
+ chrome.document = win.document;
+
+ // Prevent getting the wrong chrome height in FF when opening a popup
+ setTimeout(function(){
+ onChromeLoad(chrome);
+ }, useLocalSkin ? 200 : 0);
+ }
+ else
+ setTimeout(waitForWindow, waitDelay);
+ };
+
+ waitForWindow();
+ }
+ catch(e)
+ {
+ var msg = e.message || e;
+
+ if (/access/i.test(msg))
+ {
+ // Firebug Lite could not create a window for its Graphical User Interface due to
+ // a access restriction. This happens in some pages, when loading via bookmarklet.
+ // In such cases, the only way is to load the GUI in a "windowless mode".
+
+ if (isChromeFrame)
+ body.removeChild(node);
+ else if(type == "popup")
+ node.close();
+
+ // Load the GUI in a "windowless mode"
+ createChromeDiv();
+ }
+ else
+ {
+ alert("Firebug Error: Firebug GUI could not be created.");
+ }
+ }
+};
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+var onChromeLoad = function onChromeLoad(chrome)
+{
+ Env.chrome = chrome;
+
+ if (FBTrace.DBG_INITIALIZE) FBTrace.sysout("Chrome onChromeLoad", "chrome window loaded");
+
+ if (Env.Options.enablePersistent)
+ {
+ // TODO: xxxpedro persist - make better chrome synchronization when in persistent mode
+ Env.FirebugChrome = FirebugChrome;
+
+ chrome.window.Firebug = chrome.window.Firebug || {};
+ chrome.window.Firebug.SharedEnv = Env;
+
+ if (Env.isDevelopmentMode)
+ {
+ Env.browser.window.FBDev.loadChromeApplication(chrome);
+ }
+ else
+ {
+ var doc = chrome.document;
+ var script = doc.createElement("script");
+ script.src = Env.Location.app + "#remote,persist";
+ doc.getElementsByTagName("head")[0].appendChild(script);
+ }
+ }
+ else
+ {
+ if (chrome.type == "frame" || chrome.type == "div")
+ {
+ // initialize the chrome application
+ setTimeout(function(){
+ FBL.Firebug.initialize();
+ },0);
+ }
+ else if (chrome.type == "popup")
+ {
+ var oldChrome = FirebugChrome.chromeMap.frame;
+
+ var newChrome = new Chrome(chrome);
+
+ // TODO: xxxpedro sync detach reattach attach
+ dispatch(newChrome.panelMap, "detach", [oldChrome, newChrome]);
+
+ newChrome.reattach(oldChrome, newChrome);
+ }
+ }
+};
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+var getChromeDivTemplate = function()
+{
+ return FirebugChrome.Skin.HTML;
+};
+
+var getChromeTemplate = function(isPopup)
+{
+ var tpl = FirebugChrome.Skin;
+ var r = [], i = -1;
+
+ r[++i] = '<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/DTD/strict.dtd">';
+ r[++i] = '<html><head><title>';
+ r[++i] = Firebug.version;
+
+ /*
+ r[++i] = '</title><link href="';
+ r[++i] = Env.Location.skinDir + 'firebug.css';
+ r[++i] = '" rel="stylesheet" type="text/css" />';
+ /**/
+
+ r[++i] = '</title><style>html,body{margin:0;padding:0;overflow:hidden;}';
+ r[++i] = tpl.CSS;
+ r[++i] = '</style>';
+ /**/
+
+ r[++i] = '</head><body class="fbBody' + (isPopup ? ' FirebugPopup' : '') + '">';
+ r[++i] = tpl.HTML;
+ r[++i] = '</body></html>';
+
+ return r.join("");
+};
+
+
+// ************************************************************************************************
+// Chrome Class
+
+/**@class*/
+var Chrome = function Chrome(chrome)
+{
+ var type = chrome.type;
+ var Base = type == "frame" || type == "div" ? ChromeFrameBase : ChromePopupBase;
+
+ append(this, Base); // inherit from base class (ChromeFrameBase or ChromePopupBase)
+ append(this, chrome); // inherit chrome window properties
+ append(this, new Context(chrome.window)); // inherit from Context class
+
+ FirebugChrome.chromeMap[type] = this;
+ Firebug.chrome = this;
+ Env.chrome = chrome.window;
+
+ this.commandLineVisible = false;
+ this.sidePanelVisible = false;
+
+ this.create();
+
+ return this;
+};
+
+// ************************************************************************************************
+// ChromeBase
+
+/**
+ * @namespace
+ * @extends FBL.Controller
+ * @extends FBL.PanelBar
+ **/
+var ChromeBase = {};
+append(ChromeBase, Controller);
+append(ChromeBase, PanelBar);
+append(ChromeBase,
+/**@extend ns-chrome-ChromeBase*/
+{
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ // inherited properties
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ // inherited from createChrome function
+
+ node: null,
+ type: null,
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ // inherited from Context.prototype
+
+ document: null,
+ window: null,
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ // value properties
+
+ sidePanelVisible: false,
+ commandLineVisible: false,
+ largeCommandLineVisible: false,
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ // object properties
+
+ inspectButton: null,
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+ create: function()
+ {
+ PanelBar.create.call(this);
+
+ if (Firebug.Inspector)
+ this.inspectButton = new Button({
+ type: "toggle",
+ element: $("fbChrome_btInspect"),
+ owner: Firebug.Inspector,
+
+ onPress: Firebug.Inspector.startInspecting,
+ onUnpress: Firebug.Inspector.stopInspecting
+ });
+ },
+
+ destroy: function()
+ {
+ if(Firebug.Inspector)
+ this.inspectButton.destroy();
+
+ PanelBar.destroy.call(this);
+
+ this.shutdown();
+ },
+
+ testMenu: function()
+ {
+ var firebugMenu = new Menu(
+ {
+ id: "fbFirebugMenu",
+
+ items:
+ [
+ {
+ label: "Open Firebug",
+ type: "shortcut",
+ key: isFirefox ? "Shift+F12" : "F12",
+ checked: true,
+ command: "toggleChrome"
+ },
+ {
+ label: "Open Firebug in New Window",
+ type: "shortcut",
+ key: isFirefox ? "Ctrl+Shift+F12" : "Ctrl+F12",
+ command: "openPopup"
+ },
+ {
+ label: "Inspect Element",
+ type: "shortcut",
+ key: "Ctrl+Shift+C",
+ command: "toggleInspect"
+ },
+ {
+ label: "Command Line",
+ type: "shortcut",
+ key: "Ctrl+Shift+L",
+ command: "focusCommandLine"
+ },
+ "-",
+ {
+ label: "Options",
+ type: "group",
+ child: "fbFirebugOptionsMenu"
+ },
+ "-",
+ {
+ label: "Firebug Lite Website...",
+ command: "visitWebsite"
+ },
+ {
+ label: "Discussion Group...",
+ command: "visitDiscussionGroup"
+ },
+ {
+ label: "Issue Tracker...",
+ command: "visitIssueTracker"
+ }
+ ],
+
+ onHide: function()
+ {
+ iconButton.restore();
+ },
+
+ toggleChrome: function()
+ {
+ Firebug.chrome.toggle();
+ },
+
+ openPopup: function()
+ {
+ Firebug.chrome.toggle(true, true);
+ },
+
+ toggleInspect: function()
+ {
+ Firebug.Inspector.toggleInspect();
+ },
+
+ focusCommandLine: function()
+ {
+ Firebug.chrome.focusCommandLine();
+ },
+
+ visitWebsite: function()
+ {
+ this.visit("http://getfirebug.com/lite.html");
+ },
+
+ visitDiscussionGroup: function()
+ {
+ this.visit("http://groups.google.com/group/firebug");
+ },
+
+ visitIssueTracker: function()
+ {
+ this.visit("http://code.google.com/p/fbug/issues/list");
+ },
+
+ visit: function(url)
+ {
+ window.open(url);
+ }
+
+ });
+
+ /**@private*/
+ var firebugOptionsMenu =
+ {
+ id: "fbFirebugOptionsMenu",
+
+ getItems: function()
+ {
+ var cookiesDisabled = !Firebug.saveCookies;
+
+ return [
+ {
+ label: "Start Opened",
+ type: "checkbox",
+ value: "startOpened",
+ checked: Firebug.startOpened,
+ disabled: cookiesDisabled
+ },
+ {
+ label: "Start in New Window",
+ type: "checkbox",
+ value: "startInNewWindow",
+ checked: Firebug.startInNewWindow,
+ disabled: cookiesDisabled
+ },
+ {
+ label: "Show Icon When Hidden",
+ type: "checkbox",
+ value: "showIconWhenHidden",
+ checked: Firebug.showIconWhenHidden,
+ disabled: cookiesDisabled
+ },
+ {
+ label: "Override Console Object",
+ type: "checkbox",
+ value: "overrideConsole",
+ checked: Firebug.overrideConsole,
+ disabled: cookiesDisabled
+ },
+ {
+ label: "Ignore Firebug Elements",
+ type: "checkbox",
+ value: "ignoreFirebugElements",
+ checked: Firebug.ignoreFirebugElements,
+ disabled: cookiesDisabled
+ },
+ {
+ label: "Disable When Firebug Active",
+ type: "checkbox",
+ value: "disableWhenFirebugActive",
+ checked: Firebug.disableWhenFirebugActive,
+ disabled: cookiesDisabled
+ },
+ {
+ label: "Disable XHR Listener",
+ type: "checkbox",
+ value: "disableXHRListener",
+ checked: Firebug.disableXHRListener,
+ disabled: cookiesDisabled
+ },
+ {
+ label: "Disable Resource Fetching",
+ type: "checkbox",
+ value: "disableResourceFetching",
+ checked: Firebug.disableResourceFetching,
+ disabled: cookiesDisabled
+ },
+ {
+ label: "Enable Trace Mode",
+ type: "checkbox",
+ value: "enableTrace",
+ checked: Firebug.enableTrace,
+ disabled: cookiesDisabled
+ },
+ {
+ label: "Enable Persistent Mode (experimental)",
+ type: "checkbox",
+ value: "enablePersistent",
+ checked: Firebug.enablePersistent,
+ disabled: cookiesDisabled
+ },
+ "-",
+ {
+ label: "Reset All Firebug Options",
+ command: "restorePrefs",
+ disabled: cookiesDisabled
+ }
+ ];
+ },
+
+ onCheck: function(target, value, checked)
+ {
+ Firebug.setPref(value, checked);
+ },
+
+ restorePrefs: function(target)
+ {
+ Firebug.erasePrefs();
+
+ if (target)
+ this.updateMenu(target);
+ },
+
+ updateMenu: function(target)
+ {
+ var options = getElementsByClass(target.parentNode, "fbMenuOption");
+
+ var firstOption = options[0];
+ var enabled = Firebug.saveCookies;
+ if (enabled)
+ Menu.check(firstOption);
+ else
+ Menu.uncheck(firstOption);
+
+ if (enabled)
+ Menu.check(options[0]);
+ else
+ Menu.uncheck(options[0]);
+
+ for (var i = 1, length = options.length; i < length; i++)
+ {
+ var option = options[i];
+
+ var value = option.getAttribute("value");
+ var pref = Firebug[value];
+
+ if (pref)
+ Menu.check(option);
+ else
+ Menu.uncheck(option);
+
+ if (enabled)
+ Menu.enable(option);
+ else
+ Menu.disable(option);
+ }
+ }
+ };
+
+ Menu.register(firebugOptionsMenu);
+
+ var menu = firebugMenu;
+
+ var testMenuClick = function(event)
+ {
+ //console.log("testMenuClick");
+ cancelEvent(event, true);
+
+ var target = event.target || event.srcElement;
+
+ if (menu.isVisible)
+ menu.hide();
+ else
+ {
+ var offsetLeft = isIE6 ? 1 : -4, // IE6 problem with fixed position
+
+ chrome = Firebug.chrome,
+
+ box = chrome.getElementBox(target),
+
+ offset = chrome.type == "div" ?
+ chrome.getElementPosition(chrome.node) :
+ {top: 0, left: 0};
+
+ menu.show(
+ box.left + offsetLeft - offset.left,
+ box.top + box.height -5 - offset.top
+ );
+ }
+
+ return false;
+ };
+
+ var iconButton = new IconButton({
+ type: "toggle",
+ element: $("fbFirebugButton"),
+
+ onClick: testMenuClick
+ });
+
+ iconButton.initialize();
+
+ //addEvent($("fbToolbarIcon"), "click", testMenuClick);
+ },
+
+ initialize: function()
+ {
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ if (Env.bookmarkletOutdated)
+ Firebug.Console.logFormatted([
+ "A new bookmarklet version is available. " +
+ "Please visit http://getfirebug.com/firebuglite#Install and update it."
+ ], Firebug.context, "warn");
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ if (Firebug.Console)
+ Firebug.Console.flush();
+
+ if (Firebug.Trace)
+ FBTrace.flush(Firebug.Trace);
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ if (FBTrace.DBG_INITIALIZE) FBTrace.sysout("Firebug.chrome.initialize", "initializing chrome application");
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ // initialize inherited classes
+ Controller.initialize.call(this);
+ PanelBar.initialize.call(this);
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ // create the interface elements cache
+
+ fbTop = $("fbTop");
+ fbContent = $("fbContent");
+ fbContentStyle = fbContent.style;
+ fbBottom = $("fbBottom");
+ fbBtnInspect = $("fbBtnInspect");
+
+ fbToolbar = $("fbToolbar");
+
+ fbPanelBox1 = $("fbPanelBox1");
+ fbPanelBox1Style = fbPanelBox1.style;
+ fbPanelBox2 = $("fbPanelBox2");
+ fbPanelBox2Style = fbPanelBox2.style;
+ fbPanelBar2Box = $("fbPanelBar2Box");
+ fbPanelBar2BoxStyle = fbPanelBar2Box.style;
+
+ fbHSplitter = $("fbHSplitter");
+ fbVSplitter = $("fbVSplitter");
+ fbVSplitterStyle = fbVSplitter.style;
+
+ fbPanel1 = $("fbPanel1");
+ fbPanel1Style = fbPanel1.style;
+ fbPanel2 = $("fbPanel2");
+ fbPanel2Style = fbPanel2.style;
+
+ fbConsole = $("fbConsole");
+ fbConsoleStyle = fbConsole.style;
+ fbHTML = $("fbHTML");
+
+ fbCommandLine = $("fbCommandLine");
+ fbLargeCommandLine = $("fbLargeCommandLine");
+ fbLargeCommandButtons = $("fbLargeCommandButtons");
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ // static values cache
+ topHeight = fbTop.offsetHeight;
+ topPartialHeight = fbToolbar.offsetHeight;
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+ disableTextSelection($("fbToolbar"));
+ disableTextSelection($("fbPanelBarBox"));
+ disableTextSelection($("fbPanelBar1"));
+ disableTextSelection($("fbPanelBar2"));
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ // Add the "javascript:void(0)" href attributes used to make the hover effect in IE6
+ if (isIE6 && Firebug.Selector)
+ {
+ // TODO: xxxpedro change to getElementsByClass
+ var as = $$(".fbHover");
+ for (var i=0, a; a=as[i]; i++)
+ {
+ a.setAttribute("href", "javascript:void(0)");
+ }
+ }
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ // initialize all panels
+ /*
+ var panelMap = Firebug.panelTypes;
+ for (var i=0, p; p=panelMap[i]; i++)
+ {
+ if (!p.parentPanel)
+ {
+ this.addPanel(p.prototype.name);
+ }
+ }
+ /**/
+
+ // ************************************************************************************************
+ // ************************************************************************************************
+ // ************************************************************************************************
+ // ************************************************************************************************
+
+ if(Firebug.Inspector)
+ this.inspectButton.initialize();
+
+ // ************************************************************************************************
+ // ************************************************************************************************
+ // ************************************************************************************************
+ // ************************************************************************************************
+
+ this.addController(
+ [$("fbLargeCommandLineIcon"), "click", this.showLargeCommandLine]
+ );
+
+ // ************************************************************************************************
+
+ // Select the first registered panel
+ // TODO: BUG IE7
+ var self = this;
+ setTimeout(function(){
+ self.selectPanel(Firebug.context.persistedState.selectedPanelName);
+
+ if (Firebug.context.persistedState.selectedPanelName == "Console" && Firebug.CommandLine)
+ Firebug.chrome.focusCommandLine();
+ },0);
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ //this.draw();
+
+
+
+
+
+
+
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+ var onPanelMouseDown = function onPanelMouseDown(event)
+ {
+ //console.log("onPanelMouseDown", event.target || event.srcElement, event);
+
+ var target = event.target || event.srcElement;
+
+ if (FBL.isLeftClick(event))
+ {
+ var editable = FBL.getAncestorByClass(target, "editable");
+
+ // if an editable element has been clicked then start editing
+ if (editable)
+ {
+ Firebug.Editor.startEditing(editable);
+ FBL.cancelEvent(event);
+ }
+ // if any other element has been clicked then stop editing
+ else
+ {
+ if (!hasClass(target, "textEditorInner"))
+ Firebug.Editor.stopEditing();
+ }
+ }
+ else if (FBL.isMiddleClick(event) && Firebug.getRepNode(target))
+ {
+ // Prevent auto-scroll when middle-clicking a rep object
+ FBL.cancelEvent(event);
+ }
+ };
+
+ Firebug.getElementPanel = function(element)
+ {
+ var panelNode = getAncestorByClass(element, "fbPanel");
+ var id = panelNode.id.substr(2);
+
+ var panel = Firebug.chrome.panelMap[id];
+
+ if (!panel)
+ {
+ if (Firebug.chrome.selectedPanel.sidePanelBar)
+ panel = Firebug.chrome.selectedPanel.sidePanelBar.panelMap[id];
+ }
+
+ return panel;
+ };
+
+
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+ // TODO: xxxpedro port to Firebug
+
+ // Improved window key code event listener. Only one "keydown" event will be attached
+ // to the window, and the onKeyCodeListen() function will delegate which listeners
+ // should be called according to the event.keyCode fired.
+ var onKeyCodeListenersMap = [];
+ var onKeyCodeListen = function(event)
+ {
+ for (var keyCode in onKeyCodeListenersMap)
+ {
+ var listeners = onKeyCodeListenersMap[keyCode];
+
+ for (var i = 0, listener; listener = listeners[i]; i++)
+ {
+ var filter = listener.filter || FBL.noKeyModifiers;
+
+ if (event.keyCode == keyCode && (!filter || filter(event)))
+ {
+ listener.listener();
+ FBL.cancelEvent(event, true);
+ return false;
+ }
+ }
+ }
+ };
+
+ addEvent(Firebug.chrome.document, "keydown", onKeyCodeListen);
+
+ /**
+ * @name keyCodeListen
+ * @memberOf FBL.FirebugChrome
+ */
+ Firebug.chrome.keyCodeListen = function(key, filter, listener, capture)
+ {
+ var keyCode = KeyEvent["DOM_VK_"+key];
+
+ if (!onKeyCodeListenersMap[keyCode])
+ onKeyCodeListenersMap[keyCode] = [];
+
+ onKeyCodeListenersMap[keyCode].push({
+ filter: filter,
+ listener: listener
+ });
+
+ return keyCode;
+ };
+
+ /**
+ * @name keyIgnore
+ * @memberOf FBL.FirebugChrome
+ */
+ Firebug.chrome.keyIgnore = function(keyCode)
+ {
+ onKeyCodeListenersMap[keyCode] = null;
+ delete onKeyCodeListenersMap[keyCode];
+ };
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+ /**/
+ // move to shutdown
+ //removeEvent(Firebug.chrome.document, "keydown", listener[0]);
+
+
+ /*
+ Firebug.chrome.keyCodeListen = function(key, filter, listener, capture)
+ {
+ if (!filter)
+ filter = FBL.noKeyModifiers;
+
+ var keyCode = KeyEvent["DOM_VK_"+key];
+
+ var fn = function fn(event)
+ {
+ if (event.keyCode == keyCode && (!filter || filter(event)))
+ {
+ listener();
+ FBL.cancelEvent(event, true);
+ return false;
+ }
+ }
+
+ addEvent(Firebug.chrome.document, "keydown", fn);
+
+ return [fn, capture];
+ };
+
+ Firebug.chrome.keyIgnore = function(listener)
+ {
+ removeEvent(Firebug.chrome.document, "keydown", listener[0]);
+ };
+ /**/
+
+
+ this.addController(
+ [fbPanel1, "mousedown", onPanelMouseDown],
+ [fbPanel2, "mousedown", onPanelMouseDown]
+ );
+/**/
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+
+ // menus can be used without domplate
+ if (FBL.domplate)
+ this.testMenu();
+ /**/
+
+ //test XHR
+ /*
+ setTimeout(function(){
+
+ FBL.Ajax.request({url: "../content/firebug/boot.js"});
+ FBL.Ajax.request({url: "../content/firebug/boot.js.invalid"});
+
+ },1000);
+ /**/
+ },
+
+ shutdown: function()
+ {
+ // ************************************************************************************************
+ // ************************************************************************************************
+ // ************************************************************************************************
+ // ************************************************************************************************
+
+ if(Firebug.Inspector)
+ this.inspectButton.shutdown();
+
+ // ************************************************************************************************
+ // ************************************************************************************************
+ // ************************************************************************************************
+ // ************************************************************************************************
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+ // remove disableTextSelection event handlers
+ restoreTextSelection($("fbToolbar"));
+ restoreTextSelection($("fbPanelBarBox"));
+ restoreTextSelection($("fbPanelBar1"));
+ restoreTextSelection($("fbPanelBar2"));
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ // shutdown inherited classes
+ Controller.shutdown.call(this);
+ PanelBar.shutdown.call(this);
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ // Remove the interface elements cache (this must happen after calling
+ // the shutdown method of all dependent components to avoid errors)
+
+ fbTop = null;
+ fbContent = null;
+ fbContentStyle = null;
+ fbBottom = null;
+ fbBtnInspect = null;
+
+ fbToolbar = null;
+
+ fbPanelBox1 = null;
+ fbPanelBox1Style = null;
+ fbPanelBox2 = null;
+ fbPanelBox2Style = null;
+ fbPanelBar2Box = null;
+ fbPanelBar2BoxStyle = null;
+
+ fbHSplitter = null;
+ fbVSplitter = null;
+ fbVSplitterStyle = null;
+
+ fbPanel1 = null;
+ fbPanel1Style = null;
+ fbPanel2 = null;
+
+ fbConsole = null;
+ fbConsoleStyle = null;
+ fbHTML = null;
+
+ fbCommandLine = null;
+ fbLargeCommandLine = null;
+ fbLargeCommandButtons = null;
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ // static values cache
+
+ topHeight = null;
+ topPartialHeight = null;
+ },
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+ toggle: function(forceOpen, popup)
+ {
+ if(popup)
+ {
+ this.detach();
+ }
+ else
+ {
+ if (isOpera && Firebug.chrome.type == "popup" && Firebug.chrome.node.closed)
+ {
+ var frame = FirebugChrome.chromeMap.frame;
+ frame.reattach();
+
+ FirebugChrome.chromeMap.popup = null;
+
+ frame.open();
+
+ return;
+ }
+
+ // If the context is a popup, ignores the toggle process
+ if (Firebug.chrome.type == "popup") return;
+
+ var shouldOpen = forceOpen || !Firebug.context.persistedState.isOpen;
+
+ if(shouldOpen)
+ this.open();
+ else
+ this.close();
+ }
+ },
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+ detach: function()
+ {
+ if(!FirebugChrome.chromeMap.popup)
+ {
+ this.close();
+ createChromeWindow({type: "popup"});
+ }
+ },
+
+ reattach: function(oldChrome, newChrome)
+ {
+ Firebug.browser.window.Firebug = Firebug;
+
+ // chrome synchronization
+ var newPanelMap = newChrome.panelMap;
+ var oldPanelMap = oldChrome.panelMap;
+
+ var panel;
+ for(var name in newPanelMap)
+ {
+ // TODO: xxxpedro innerHTML
+ panel = newPanelMap[name];
+ if (panel.options.innerHTMLSync)
+ panel.panelNode.innerHTML = oldPanelMap[name].panelNode.innerHTML;
+ }
+
+ Firebug.chrome = newChrome;
+
+ // TODO: xxxpedro sync detach reattach attach
+ //dispatch(Firebug.chrome.panelMap, "detach", [oldChrome, newChrome]);
+
+ if (newChrome.type == "popup")
+ {
+ newChrome.initialize();
+ //dispatch(Firebug.modules, "initialize", []);
+ }
+ else
+ {
+ // TODO: xxxpedro only needed in persistent
+ // should use FirebugChrome.clone, but popup FBChrome
+ // isn't acessible
+ Firebug.context.persistedState.selectedPanelName = oldChrome.selectedPanel.name;
+ }
+
+ dispatch(newPanelMap, "reattach", [oldChrome, newChrome]);
+ },
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+ draw: function()
+ {
+ var size = this.getSize();
+
+ // Height related values
+ var commandLineHeight = Firebug.chrome.commandLineVisible ? fbCommandLine.offsetHeight : 0,
+
+ y = Math.max(size.height /* chrome height */, topHeight),
+
+ heightValue = Math.max(y - topHeight - commandLineHeight /* fixed height */, 0),
+
+ height = heightValue + "px",
+
+ // Width related values
+ sideWidthValue = Firebug.chrome.sidePanelVisible ? Firebug.context.persistedState.sidePanelWidth : 0,
+
+ width = Math.max(size.width /* chrome width */ - sideWidthValue, 0) + "px";
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ // Height related rendering
+ fbPanelBox1Style.height = height;
+ fbPanel1Style.height = height;
+
+ if (isIE || isOpera)
+ {
+ // Fix IE and Opera problems with auto resizing the verticall splitter
+ fbVSplitterStyle.height = Math.max(y - topPartialHeight - commandLineHeight, 0) + "px";
+ }
+ //xxxpedro FF2 only?
+ /*
+ else if (isFirefox)
+ {
+ // Fix Firefox problem with table rows with 100% height (fit height)
+ fbContentStyle.maxHeight = Math.max(y - fixedHeight, 0)+ "px";
+ }/**/
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ // Width related rendering
+ fbPanelBox1Style.width = width;
+ fbPanel1Style.width = width;
+
+ // SidePanel rendering
+ if (Firebug.chrome.sidePanelVisible)
+ {
+ sideWidthValue = Math.max(sideWidthValue - 6, 0);
+
+ var sideWidth = sideWidthValue + "px";
+
+ fbPanelBox2Style.width = sideWidth;
+
+ fbVSplitterStyle.right = sideWidth;
+
+ if (Firebug.chrome.largeCommandLineVisible)
+ {
+ fbLargeCommandLine = $("fbLargeCommandLine");
+
+ fbLargeCommandLine.style.height = heightValue - 4 + "px";
+ fbLargeCommandLine.style.width = sideWidthValue - 2 + "px";
+
+ fbLargeCommandButtons = $("fbLargeCommandButtons");
+ fbLargeCommandButtons.style.width = sideWidth;
+ }
+ else
+ {
+ fbPanel2Style.height = height;
+ fbPanel2Style.width = sideWidth;
+
+ fbPanelBar2BoxStyle.width = sideWidth;
+ }
+ }
+ },
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+ getSize: function()
+ {
+ return this.type == "div" ?
+ {
+ height: this.node.offsetHeight,
+ width: this.node.offsetWidth
+ }
+ :
+ this.getWindowSize();
+ },
+
+ resize: function()
+ {
+ var self = this;
+
+ // avoid partial resize when maximizing window
+ setTimeout(function(){
+ self.draw();
+
+ if (noFixedPosition && (self.type == "frame" || self.type == "div"))
+ self.fixIEPosition();
+ }, 0);
+ },
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+ layout: function(panel)
+ {
+ if (FBTrace.DBG_CHROME) FBTrace.sysout("Chrome.layout", "");
+
+ var options = panel.options;
+
+ changeCommandLineVisibility(options.hasCommandLine);
+ changeSidePanelVisibility(panel.hasSidePanel);
+
+ Firebug.chrome.draw();
+ },
+
+ showLargeCommandLine: function(hideToggleIcon)
+ {
+ var chrome = Firebug.chrome;
+
+ if (!chrome.largeCommandLineVisible)
+ {
+ chrome.largeCommandLineVisible = true;
+
+ if (chrome.selectedPanel.options.hasCommandLine)
+ {
+ if (Firebug.CommandLine)
+ Firebug.CommandLine.blur();
+
+ changeCommandLineVisibility(false);
+ }
+
+ changeSidePanelVisibility(true);
+
+ fbLargeCommandLine.style.display = "block";
+ fbLargeCommandButtons.style.display = "block";
+
+ fbPanel2Style.display = "none";
+ fbPanelBar2BoxStyle.display = "none";
+
+ chrome.draw();
+
+ fbLargeCommandLine.focus();
+
+ if (Firebug.CommandLine)
+ Firebug.CommandLine.setMultiLine(true);
+ }
+ },
+
+ hideLargeCommandLine: function()
+ {
+ if (Firebug.chrome.largeCommandLineVisible)
+ {
+ Firebug.chrome.largeCommandLineVisible = false;
+
+ if (Firebug.CommandLine)
+ Firebug.CommandLine.setMultiLine(false);
+
+ fbLargeCommandLine.blur();
+
+ fbPanel2Style.display = "block";
+ fbPanelBar2BoxStyle.display = "block";
+
+ fbLargeCommandLine.style.display = "none";
+ fbLargeCommandButtons.style.display = "none";
+
+ changeSidePanelVisibility(false);
+
+ if (Firebug.chrome.selectedPanel.options.hasCommandLine)
+ changeCommandLineVisibility(true);
+
+ Firebug.chrome.draw();
+
+ }
+ },
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+ focusCommandLine: function()
+ {
+ var selectedPanelName = this.selectedPanel.name, panelToSelect;
+
+ if (focusCommandLineState == 0 || selectedPanelName != "Console")
+ {
+ focusCommandLineState = 0;
+ lastFocusedPanelName = selectedPanelName;
+
+ panelToSelect = "Console";
+ }
+ if (focusCommandLineState == 1)
+ {
+ panelToSelect = lastFocusedPanelName;
+ }
+
+ this.selectPanel(panelToSelect);
+
+ try
+ {
+ if (Firebug.CommandLine)
+ {
+ if (panelToSelect == "Console")
+ Firebug.CommandLine.focus();
+ else
+ Firebug.CommandLine.blur();
+ }
+ }
+ catch(e)
+ {
+ //TODO: xxxpedro trace error
+ }
+
+ focusCommandLineState = ++focusCommandLineState % 2;
+ }
+
+});
+
+// ************************************************************************************************
+// ChromeFrameBase
+
+/**
+ * @namespace
+ * @extends ns-chrome-ChromeBase
+ */
+var ChromeFrameBase = extend(ChromeBase,
+/**@extend ns-chrome-ChromeFrameBase*/
+{
+ create: function()
+ {
+ ChromeBase.create.call(this);
+
+ // restore display for the anti-flicker trick
+ if (isFirefox)
+ this.node.style.display = "block";
+
+ if (Env.Options.startInNewWindow)
+ {
+ this.close();
+ this.toggle(true, true);
+ return;
+ }
+
+ if (Env.Options.startOpened)
+ this.open();
+ else
+ this.close();
+ },
+
+ destroy: function()
+ {
+ var size = Firebug.chrome.getWindowSize();
+
+ Firebug.context.persistedState.height = size.height;
+
+ if (Firebug.saveCookies)
+ Firebug.savePrefs();
+
+ removeGlobalEvent("keydown", onGlobalKeyDown);
+
+ ChromeBase.destroy.call(this);
+
+ this.document = null;
+ delete this.document;
+
+ this.window = null;
+ delete this.window;
+
+ this.node.parentNode.removeChild(this.node);
+ this.node = null;
+ delete this.node;
+ },
+
+ initialize: function()
+ {
+ //FBTrace.sysout("Frame", "initialize();")
+ ChromeBase.initialize.call(this);
+
+ this.addController(
+ [Firebug.browser.window, "resize", this.resize],
+ [$("fbWindow_btClose"), "click", this.close],
+ [$("fbWindow_btDetach"), "click", this.detach],
+ [$("fbWindow_btDeactivate"), "click", this.deactivate]
+ );
+
+ if (!Env.Options.enablePersistent)
+ this.addController([Firebug.browser.window, "unload", Firebug.shutdown]);
+
+ if (noFixedPosition)
+ {
+ this.addController(
+ [Firebug.browser.window, "scroll", this.fixIEPosition]
+ );
+ }
+
+ fbVSplitter.onmousedown = onVSplitterMouseDown;
+ fbHSplitter.onmousedown = onHSplitterMouseDown;
+
+ this.isInitialized = true;
+ },
+
+ shutdown: function()
+ {
+ fbVSplitter.onmousedown = null;
+ fbHSplitter.onmousedown = null;
+
+ ChromeBase.shutdown.apply(this);
+
+ this.isInitialized = false;
+ },
+
+ reattach: function()
+ {
+ var frame = FirebugChrome.chromeMap.frame;
+
+ ChromeBase.reattach(FirebugChrome.chromeMap.popup, this);
+ },
+
+ open: function()
+ {
+ if (!Firebug.context.persistedState.isOpen)
+ {
+ Firebug.context.persistedState.isOpen = true;
+
+ if (Env.isChromeExtension)
+ localStorage.setItem("Firebug", "1,1");
+
+ var node = this.node;
+
+ node.style.visibility = "hidden"; // Avoid flickering
+
+ if (Firebug.showIconWhenHidden)
+ {
+ if (ChromeMini.isInitialized)
+ {
+ ChromeMini.shutdown();
+ }
+
+ }
+ else
+ node.style.display = "block";
+
+ var main = $("fbChrome");
+
+ // IE6 throws an error when setting this property! why?
+ //main.style.display = "table";
+ main.style.display = "";
+
+ var self = this;
+ /// TODO: xxxpedro FOUC
+ node.style.visibility = "visible";
+ setTimeout(function(){
+ ///node.style.visibility = "visible";
+
+ //dispatch(Firebug.modules, "initialize", []);
+ self.initialize();
+
+ if (noFixedPosition)
+ self.fixIEPosition();
+
+ self.draw();
+
+ }, 10);
+ }
+ },
+
+ close: function()
+ {
+ if (Firebug.context.persistedState.isOpen)
+ {
+ if (this.isInitialized)
+ {
+ //dispatch(Firebug.modules, "shutdown", []);
+ this.shutdown();
+ }
+
+ Firebug.context.persistedState.isOpen = false;
+
+ if (Env.isChromeExtension)
+ localStorage.setItem("Firebug", "1,0");
+
+ var node = this.node;
+
+ if (Firebug.showIconWhenHidden)
+ {
+ node.style.visibility = "hidden"; // Avoid flickering
+
+ // TODO: xxxpedro - persist IE fixed?
+ var main = $("fbChrome", FirebugChrome.chromeMap.frame.document);
+ main.style.display = "none";
+
+ ChromeMini.initialize();
+
+ node.style.visibility = "visible";
+ }
+ else
+ node.style.display = "none";
+ }
+ },
+
+ deactivate: function()
+ {
+ // if it is running as a Chrome extension, dispatch a message to the extension signaling
+ // that Firebug should be deactivated for the current tab
+ if (Env.isChromeExtension)
+ {
+ localStorage.removeItem("Firebug");
+ Firebug.GoogleChrome.dispatch("FB_deactivate");
+
+ // xxxpedro problem here regarding Chrome extension. We can't deactivate the whole
+ // app, otherwise it won't be able to be reactivated without reloading the page.
+ // but we need to stop listening global keys, otherwise the key activation won't work.
+ Firebug.chrome.close();
+ }
+ else
+ {
+ Firebug.shutdown();
+ }
+ },
+
+ fixIEPosition: function()
+ {
+ // fix IE problem with offset when not in fullscreen mode
+ var doc = this.document;
+ var offset = isIE ? doc.body.clientTop || doc.documentElement.clientTop: 0;
+
+ var size = Firebug.browser.getWindowSize();
+ var scroll = Firebug.browser.getWindowScrollPosition();
+ var maxHeight = size.height;
+ var height = this.node.offsetHeight;
+
+ var bodyStyle = doc.body.currentStyle;
+
+ this.node.style.top = maxHeight - height + scroll.top + "px";
+
+ if ((this.type == "frame" || this.type == "div") &&
+ (bodyStyle.marginLeft || bodyStyle.marginRight))
+ {
+ this.node.style.width = size.width + "px";
+ }
+
+ if (fbVSplitterStyle)
+ fbVSplitterStyle.right = Firebug.context.persistedState.sidePanelWidth + "px";
+
+ this.draw();
+ }
+
+});
+
+
+// ************************************************************************************************
+// ChromeMini
+
+/**
+ * @namespace
+ * @extends FBL.Controller
+ */
+var ChromeMini = extend(Controller,
+/**@extend ns-chrome-ChromeMini*/
+{
+ create: function(chrome)
+ {
+ append(this, chrome);
+ this.type = "mini";
+ },
+
+ initialize: function()
+ {
+ Controller.initialize.apply(this);
+
+ var doc = FirebugChrome.chromeMap.frame.document;
+
+ var mini = $("fbMiniChrome", doc);
+ mini.style.display = "block";
+
+ var miniIcon = $("fbMiniIcon", doc);
+ var width = miniIcon.offsetWidth + 10;
+ miniIcon.title = "Open " + Firebug.version;
+
+ var errors = $("fbMiniErrors", doc);
+ if (errors.offsetWidth)
+ width += errors.offsetWidth + 10;
+
+ var node = this.node;
+ node.style.height = "27px";
+ node.style.width = width + "px";
+ node.style.left = "";
+ node.style.right = 0;
+
+ if (this.node.nodeName.toLowerCase() == "iframe")
+ {
+ node.setAttribute("allowTransparency", "true");
+ this.document.body.style.backgroundColor = "transparent";
+ }
+ else
+ node.style.background = "transparent";
+
+ if (noFixedPosition)
+ this.fixIEPosition();
+
+ this.addController(
+ [$("fbMiniIcon", doc), "click", onMiniIconClick]
+ );
+
+ if (noFixedPosition)
+ {
+ this.addController(
+ [Firebug.browser.window, "scroll", this.fixIEPosition]
+ );
+ }
+
+ this.isInitialized = true;
+ },
+
+ shutdown: function()
+ {
+ var node = this.node;
+ node.style.height = Firebug.context.persistedState.height + "px";
+ node.style.width = "100%";
+ node.style.left = 0;
+ node.style.right = "";
+
+ if (this.node.nodeName.toLowerCase() == "iframe")
+ {
+ node.setAttribute("allowTransparency", "false");
+ this.document.body.style.backgroundColor = "#fff";
+ }
+ else
+ node.style.background = "#fff";
+
+ if (noFixedPosition)
+ this.fixIEPosition();
+
+ var doc = FirebugChrome.chromeMap.frame.document;
+
+ var mini = $("fbMiniChrome", doc);
+ mini.style.display = "none";
+
+ Controller.shutdown.apply(this);
+
+ this.isInitialized = false;
+ },
+
+ draw: function()
+ {
+
+ },
+
+ fixIEPosition: ChromeFrameBase.fixIEPosition
+
+});
+
+
+// ************************************************************************************************
+// ChromePopupBase
+
+/**
+ * @namespace
+ * @extends ns-chrome-ChromeBase
+ */
+var ChromePopupBase = extend(ChromeBase,
+/**@extend ns-chrome-ChromePopupBase*/
+{
+
+ initialize: function()
+ {
+ setClass(this.document.body, "FirebugPopup");
+
+ ChromeBase.initialize.call(this);
+
+ this.addController(
+ [Firebug.chrome.window, "resize", this.resize],
+ [Firebug.chrome.window, "unload", this.destroy]
+ //[Firebug.chrome.window, "beforeunload", this.destroy]
+ );
+
+ if (Env.Options.enablePersistent)
+ {
+ this.persist = bind(this.persist, this);
+ addEvent(Firebug.browser.window, "unload", this.persist);
+ }
+ else
+ this.addController(
+ [Firebug.browser.window, "unload", this.close]
+ );
+
+ fbVSplitter.onmousedown = onVSplitterMouseDown;
+ },
+
+ destroy: function()
+ {
+ var chromeWin = Firebug.chrome.window;
+ var left = chromeWin.screenX || chromeWin.screenLeft;
+ var top = chromeWin.screenY || chromeWin.screenTop;
+ var size = Firebug.chrome.getWindowSize();
+
+ Firebug.context.persistedState.popupTop = top;
+ Firebug.context.persistedState.popupLeft = left;
+ Firebug.context.persistedState.popupWidth = size.width;
+ Firebug.context.persistedState.popupHeight = size.height;
+
+ if (Firebug.saveCookies)
+ Firebug.savePrefs();
+
+ // TODO: xxxpedro sync detach reattach attach
+ var frame = FirebugChrome.chromeMap.frame;
+
+ if(frame)
+ {
+ dispatch(frame.panelMap, "detach", [this, frame]);
+
+ frame.reattach(this, frame);
+ }
+
+ if (Env.Options.enablePersistent)
+ {
+ removeEvent(Firebug.browser.window, "unload", this.persist);
+ }
+
+ ChromeBase.destroy.apply(this);
+
+ FirebugChrome.chromeMap.popup = null;
+
+ this.node.close();
+ },
+
+ persist: function()
+ {
+ persistTimeStart = new Date().getTime();
+
+ removeEvent(Firebug.browser.window, "unload", this.persist);
+
+ Firebug.Inspector.destroy();
+ Firebug.browser.window.FirebugOldBrowser = true;
+
+ var persistTimeStart = new Date().getTime();
+
+ var waitMainWindow = function()
+ {
+ var doc, head;
+
+ try
+ {
+ if (window.opener && !window.opener.FirebugOldBrowser && (doc = window.opener.document)/* &&
+ doc.documentElement && (head = doc.documentElement.firstChild)*/)
+ {
+
+ try
+ {
+ // exposes the FBL to the global namespace when in debug mode
+ if (Env.isDebugMode)
+ {
+ window.FBL = FBL;
+ }
+
+ window.Firebug = Firebug;
+ window.opener.Firebug = Firebug;
+
+ Env.browser = window.opener;
+ Firebug.browser = Firebug.context = new Context(Env.browser);
+ Firebug.loadPrefs();
+
+ registerConsole();
+
+ // the delay time should be calculated right after registering the
+ // console, once right after the console registration, call log messages
+ // will be properly handled
+ var persistDelay = new Date().getTime() - persistTimeStart;
+
+ var chrome = Firebug.chrome;
+ addEvent(Firebug.browser.window, "unload", chrome.persist);
+
+ FBL.cacheDocument();
+ Firebug.Inspector.create();
+
+ Firebug.Console.logFormatted(
+ ["Firebug could not capture console calls during " +
+ persistDelay + "ms"],
+ Firebug.context,
+ "info"
+ );
+
+ setTimeout(function(){
+ var htmlPanel = chrome.getPanel("HTML");
+ htmlPanel.createUI();
+ },50);
+
+ }
+ catch(pE)
+ {
+ alert("persist error: " + (pE.message || pE));
+ }
+
+ }
+ else
+ {
+ window.setTimeout(waitMainWindow, 0);
+ }
+
+ } catch (E) {
+ window.close();
+ }
+ };
+
+ waitMainWindow();
+ },
+
+ close: function()
+ {
+ this.destroy();
+ }
+
+});
+
+
+//************************************************************************************************
+// UI helpers
+
+var changeCommandLineVisibility = function changeCommandLineVisibility(visibility)
+{
+ var last = Firebug.chrome.commandLineVisible;
+ var visible = Firebug.chrome.commandLineVisible =
+ typeof visibility == "boolean" ? visibility : !Firebug.chrome.commandLineVisible;
+
+ if (visible != last)
+ {
+ if (visible)
+ {
+ fbBottom.className = "";
+
+ if (Firebug.CommandLine)
+ Firebug.CommandLine.activate();
+ }
+ else
+ {
+ if (Firebug.CommandLine)
+ Firebug.CommandLine.deactivate();
+
+ fbBottom.className = "hide";
+ }
+ }
+};
+
+var changeSidePanelVisibility = function changeSidePanelVisibility(visibility)
+{
+ var last = Firebug.chrome.sidePanelVisible;
+ Firebug.chrome.sidePanelVisible =
+ typeof visibility == "boolean" ? visibility : !Firebug.chrome.sidePanelVisible;
+
+ if (Firebug.chrome.sidePanelVisible != last)
+ {
+ fbPanelBox2.className = Firebug.chrome.sidePanelVisible ? "" : "hide";
+ fbPanelBar2Box.className = Firebug.chrome.sidePanelVisible ? "" : "hide";
+ }
+};
+
+
+// ************************************************************************************************
+// F12 Handler
+
+var onGlobalKeyDown = function onGlobalKeyDown(event)
+{
+ var keyCode = event.keyCode;
+ var shiftKey = event.shiftKey;
+ var ctrlKey = event.ctrlKey;
+
+ if (keyCode == 123 /* F12 */ && (!isFirefox && !shiftKey || shiftKey && isFirefox))
+ {
+ Firebug.chrome.toggle(false, ctrlKey);
+ cancelEvent(event, true);
+
+ // TODO: xxxpedro replace with a better solution. we're doing this
+ // to allow reactivating with the F12 key after being deactivated
+ if (Env.isChromeExtension)
+ {
+ Firebug.GoogleChrome.dispatch("FB_enableIcon");
+ }
+ }
+ else if (keyCode == 67 /* C */ && ctrlKey && shiftKey)
+ {
+ Firebug.Inspector.toggleInspect();
+ cancelEvent(event, true);
+ }
+ else if (keyCode == 76 /* L */ && ctrlKey && shiftKey)
+ {
+ Firebug.chrome.focusCommandLine();
+ cancelEvent(event, true);
+ }
+};
+
+var onMiniIconClick = function onMiniIconClick(event)
+{
+ Firebug.chrome.toggle(false, event.ctrlKey);
+ cancelEvent(event, true);
+};
+
+
+// ************************************************************************************************
+// Horizontal Splitter Handling
+
+var onHSplitterMouseDown = function onHSplitterMouseDown(event)
+{
+ addGlobalEvent("mousemove", onHSplitterMouseMove);
+ addGlobalEvent("mouseup", onHSplitterMouseUp);
+
+ if (isIE)
+ addEvent(Firebug.browser.document.documentElement, "mouseleave", onHSplitterMouseUp);
+
+ fbHSplitter.className = "fbOnMovingHSplitter";
+
+ return false;
+};
+
+var onHSplitterMouseMove = function onHSplitterMouseMove(event)
+{
+ cancelEvent(event, true);
+
+ var clientY = event.clientY;
+ var win = isIE
+ ? event.srcElement.ownerDocument.parentWindow
+ : event.target.defaultView || event.target.ownerDocument && event.target.ownerDocument.defaultView;
+
+ if (!win)
+ return;
+
+ if (win != win.parent)
+ {
+ var frameElement = win.frameElement;
+ if (frameElement)
+ {
+ var framePos = Firebug.browser.getElementPosition(frameElement).top;
+ clientY += framePos;
+
+ if (frameElement.style.position != "fixed")
+ clientY -= Firebug.browser.getWindowScrollPosition().top;
+ }
+ }
+
+ if (isOpera && isQuiksMode && win.frameElement.id == "FirebugUI")
+ {
+ clientY = Firebug.browser.getWindowSize().height - win.frameElement.offsetHeight + clientY;
+ }
+
+ /*
+ console.log(
+ typeof win.FBL != "undefined" ? "no-Chrome" : "Chrome",
+ //win.frameElement.id,
+ event.target,
+ clientY
+ );/**/
+
+ onHSplitterMouseMoveBuffer = clientY; // buffer
+
+ if (new Date().getTime() - lastHSplitterMouseMove > chromeRedrawSkipRate) // frame skipping
+ {
+ lastHSplitterMouseMove = new Date().getTime();
+ handleHSplitterMouseMove();
+ }
+ else
+ if (!onHSplitterMouseMoveTimer)
+ onHSplitterMouseMoveTimer = setTimeout(handleHSplitterMouseMove, chromeRedrawSkipRate);
+
+ // improving the resizing performance by canceling the mouse event.
+ // canceling events will prevent the page to receive such events, which would imply
+ // in more processing being expended.
+ cancelEvent(event, true);
+ return false;
+};
+
+var handleHSplitterMouseMove = function()
+{
+ if (onHSplitterMouseMoveTimer)
+ {
+ clearTimeout(onHSplitterMouseMoveTimer);
+ onHSplitterMouseMoveTimer = null;
+ }
+
+ var clientY = onHSplitterMouseMoveBuffer;
+
+ var windowSize = Firebug.browser.getWindowSize();
+ var scrollSize = Firebug.browser.getWindowScrollSize();
+
+ // compute chrome fixed size (top bar and command line)
+ var commandLineHeight = Firebug.chrome.commandLineVisible ? fbCommandLine.offsetHeight : 0;
+ var fixedHeight = topHeight + commandLineHeight;
+ var chromeNode = Firebug.chrome.node;
+
+ var scrollbarSize = !isIE && (scrollSize.width > windowSize.width) ? 17 : 0;
+
+ //var height = !isOpera ? chromeNode.offsetTop + chromeNode.clientHeight : windowSize.height;
+ var height = windowSize.height;
+
+ // compute the min and max size of the chrome
+ var chromeHeight = Math.max(height - clientY + 5 - scrollbarSize, fixedHeight);
+ chromeHeight = Math.min(chromeHeight, windowSize.height - scrollbarSize);
+
+ Firebug.context.persistedState.height = chromeHeight;
+ chromeNode.style.height = chromeHeight + "px";
+
+ if (noFixedPosition)
+ Firebug.chrome.fixIEPosition();
+
+ Firebug.chrome.draw();
+};
+
+var onHSplitterMouseUp = function onHSplitterMouseUp(event)
+{
+ removeGlobalEvent("mousemove", onHSplitterMouseMove);
+ removeGlobalEvent("mouseup", onHSplitterMouseUp);
+
+ if (isIE)
+ removeEvent(Firebug.browser.document.documentElement, "mouseleave", onHSplitterMouseUp);
+
+ fbHSplitter.className = "";
+
+ Firebug.chrome.draw();
+
+ // avoid text selection in IE when returning to the document
+ // after the mouse leaves the document during the resizing
+ return false;
+};
+
+
+// ************************************************************************************************
+// Vertical Splitter Handling
+
+var onVSplitterMouseDown = function onVSplitterMouseDown(event)
+{
+ addGlobalEvent("mousemove", onVSplitterMouseMove);
+ addGlobalEvent("mouseup", onVSplitterMouseUp);
+
+ return false;
+};
+
+var onVSplitterMouseMove = function onVSplitterMouseMove(event)
+{
+ if (new Date().getTime() - lastVSplitterMouseMove > chromeRedrawSkipRate) // frame skipping
+ {
+ var target = event.target || event.srcElement;
+ if (target && target.ownerDocument) // avoid error when cursor reaches out of the chrome
+ {
+ var clientX = event.clientX;
+ var win = document.all
+ ? event.srcElement.ownerDocument.parentWindow
+ : event.target.ownerDocument.defaultView;
+
+ if (win != win.parent)
+ clientX += win.frameElement ? win.frameElement.offsetLeft : 0;
+
+ var size = Firebug.chrome.getSize();
+ var x = Math.max(size.width - clientX + 3, 6);
+
+ Firebug.context.persistedState.sidePanelWidth = x;
+ Firebug.chrome.draw();
+ }
+
+ lastVSplitterMouseMove = new Date().getTime();
+ }
+
+ cancelEvent(event, true);
+ return false;
+};
+
+var onVSplitterMouseUp = function onVSplitterMouseUp(event)
+{
+ removeGlobalEvent("mousemove", onVSplitterMouseMove);
+ removeGlobalEvent("mouseup", onVSplitterMouseUp);
+
+ Firebug.chrome.draw();
+};
+
+
+// ************************************************************************************************
+}});
+
+/* See license.txt for terms of usage */
+
+FBL.ns(function() { with (FBL) {
+// ************************************************************************************************
+
+Firebug.Lite =
+{
+};
+
+// ************************************************************************************************
+}});
+
+
+/* See license.txt for terms of usage */
+
+FBL.ns(function() { with (FBL) {
+// ************************************************************************************************
+
+Firebug.Lite.Cache =
+{
+ ID: "firebug-" + new Date().getTime()
+};
+
+// ************************************************************************************************
+
+/**
+ * TODO: if a cached element is cloned, the expando property will be cloned too in IE
+ * which will result in a bug. Firebug Lite will think the new cloned node is the old
+ * one.
+ *
+ * TODO: Investigate a possibility of cache validation, to be customized by each
+ * kind of cache. For ElementCache it should validate if the element still is
+ * inserted at the DOM.
+ */
+var cacheUID = 0;
+var createCache = function()
+{
+ var map = {};
+ var data = {};
+
+ var CID = Firebug.Lite.Cache.ID;
+
+ // better detection
+ var supportsDeleteExpando = !document.all;
+
+ var cacheFunction = function(element)
+ {
+ return cacheAPI.set(element);
+ };
+
+ var cacheAPI =
+ {
+ get: function(key)
+ {
+ return map.hasOwnProperty(key) ?
+ map[key] :
+ null;
+ },
+
+ set: function(element)
+ {
+ var id = getValidatedKey(element);
+
+ if (!id)
+ {
+ id = ++cacheUID;
+ element[CID] = id;
+ }
+
+ if (!map.hasOwnProperty(id))
+ {
+ map[id] = element;
+ data[id] = {};
+ }
+
+ return id;
+ },
+
+ unset: function(element)
+ {
+ var id = getValidatedKey(element);
+
+ if (!id) return;
+
+ if (supportsDeleteExpando)
+ {
+ delete element[CID];
+ }
+ else if (element.removeAttribute)
+ {
+ element.removeAttribute(CID);
+ }
+
+ delete map[id];
+ delete data[id];
+
+ },
+
+ key: function(element)
+ {
+ return getValidatedKey(element);
+ },
+
+ has: function(element)
+ {
+ var id = getValidatedKey(element);
+ return id && map.hasOwnProperty(id);
+ },
+
+ each: function(callback)
+ {
+ for (var key in map)
+ {
+ if (map.hasOwnProperty(key))
+ {
+ callback(key, map[key]);
+ }
+ }
+ },
+
+ data: function(element, name, value)
+ {
+ // set data
+ if (value)
+ {
+ if (!name) return null;
+
+ var id = cacheAPI.set(element);
+
+ return data[id][name] = value;
+ }
+ // get data
+ else
+ {
+ var id = cacheAPI.key(element);
+
+ return data.hasOwnProperty(id) && data[id].hasOwnProperty(name) ?
+ data[id][name] :
+ null;
+ }
+ },
+
+ clear: function()
+ {
+ for (var id in map)
+ {
+ var element = map[id];
+ cacheAPI.unset(element);
+ }
+ }
+ };
+
+ var getValidatedKey = function(element)
+ {
+ var id = element[CID];
+
+ // If a cached element is cloned in IE, the expando property CID will be also
+ // cloned (differently than other browsers) resulting in a bug: Firebug Lite
+ // will think the new cloned node is the old one. To prevent this problem we're
+ // checking if the cached element matches the given element.
+ if (
+ !supportsDeleteExpando && // the problem happens when supportsDeleteExpando is false
+ id && // the element has the expando property
+ map.hasOwnProperty(id) && // there is a cached element with the same id
+ map[id] != element // but it is a different element than the current one
+ )
+ {
+ // remove the problematic property
+ element.removeAttribute(CID);
+
+ id = null;
+ }
+
+ return id;
+ };
+
+ FBL.append(cacheFunction, cacheAPI);
+
+ return cacheFunction;
+};
+
+// ************************************************************************************************
+
+// TODO: xxxpedro : check if we need really this on FBL scope
+Firebug.Lite.Cache.StyleSheet = createCache();
+Firebug.Lite.Cache.Element = createCache();
+
+// TODO: xxxpedro
+Firebug.Lite.Cache.Event = createCache();
+
+
+// ************************************************************************************************
+}});
+
+
+/* See license.txt for terms of usage */
+
+FBL.ns(function() { with (FBL) {
+// ************************************************************************************************
+
+// ************************************************************************************************
+var sourceMap = {};
+
+// ************************************************************************************************
+Firebug.Lite.Proxy =
+{
+ // jsonp callbacks
+ _callbacks: {},
+
+ /**
+ * Load a resource, either locally (directly) or externally (via proxy) using
+ * synchronous XHR calls. Loading external resources requires the proxy plugin to
+ * be installed and configured (see /plugin/proxy/proxy.php).
+ */
+ load: function(url)
+ {
+ var resourceDomain = getDomain(url);
+ var isLocalResource =
+ // empty domain means local URL
+ !resourceDomain ||
+ // same domain means local too
+ resourceDomain == Firebug.context.window.location.host; // TODO: xxxpedro context
+
+ return isLocalResource ? fetchResource(url) : fetchProxyResource(url);
+ },
+
+ /**
+ * Load a resource using JSONP technique.
+ */
+ loadJSONP: function(url, callback)
+ {
+ var script = createGlobalElement("script"),
+ doc = Firebug.context.document,
+
+ uid = "" + new Date().getTime(),
+ callbackName = "callback=Firebug.Lite.Proxy._callbacks." + uid,
+
+ jsonpURL = url.indexOf("?") != -1 ?
+ url + "&" + callbackName :
+ url + "?" + callbackName;
+
+ Firebug.Lite.Proxy._callbacks[uid] = function(data)
+ {
+ if (callback)
+ callback(data);
+
+ script.parentNode.removeChild(script);
+ delete Firebug.Lite.Proxy._callbacks[uid];
+ };
+
+ script.src = jsonpURL;
+
+ if (doc.documentElement)
+ doc.documentElement.appendChild(script);
+ },
+
+ /**
+ * Load a resource using YQL (not reliable).
+ */
+ YQL: function(url, callback)
+ {
+ var yql = "http://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20html%20where%20url%3D%22" +
+ encodeURIComponent(url) + "%22&format=xml";
+
+ this.loadJSONP(yql, function(data)
+ {
+ var source = data.results[0];
+
+ // clean up YQL bogus elements
+ var match = /<body>\s+<p>([\s\S]+)<\/p>\s+<\/body>$/.exec(source);
+ if (match)
+ source = match[1];
+
+ console.log(source);
+ });
+ }
+};
+
+// ************************************************************************************************
+
+Firebug.Lite.Proxy.fetchResourceDisabledMessage =
+ "/* Firebug Lite resource fetching is disabled.\n" +
+ "To enabled it set the Firebug Lite option \"disableResourceFetching\" to \"false\".\n" +
+ "More info at http://getfirebug.com/firebuglite#Options */";
+
+var fetchResource = function(url)
+{
+ if (Firebug.disableResourceFetching)
+ {
+ var source = sourceMap[url] = Firebug.Lite.Proxy.fetchResourceDisabledMessage;
+ return source;
+ }
+
+ if (sourceMap.hasOwnProperty(url))
+ return sourceMap[url];
+
+ // Getting the native XHR object so our calls won't be logged in the Console Panel
+ var xhr = FBL.getNativeXHRObject();
+ xhr.open("get", url, false);
+ xhr.send();
+
+ var source = sourceMap[url] = xhr.responseText;
+ return source;
+};
+
+var fetchProxyResource = function(url)
+{
+ if (sourceMap.hasOwnProperty(url))
+ return sourceMap[url];
+
+ var proxyURL = Env.Location.baseDir + "plugin/proxy/proxy.php?url=" + encodeURIComponent(url);
+ var response = fetchResource(proxyURL);
+
+ try
+ {
+ var data = eval("(" + response + ")");
+ }
+ catch(E)
+ {
+ return "ERROR: Firebug Lite Proxy plugin returned an invalid response.";
+ }
+
+ var source = data ? data.contents : "";
+ return source;
+};
+
+
+// ************************************************************************************************
+}});
+
+
+/* See license.txt for terms of usage */
+
+FBL.ns(function() { with (FBL) {
+// ************************************************************************************************
+
+Firebug.Lite.Style =
+{
+};
+
+// ************************************************************************************************
+}});
+
+
+/* See license.txt for terms of usage */
+
+FBL.ns(function() { with (FBL) {
+// ************************************************************************************************
+
+Firebug.Lite.Script = function(window)
+{
+ this.fileName = null;
+ this.isValid = null;
+ this.baseLineNumber = null;
+ this.lineExtent = null;
+ this.tag = null;
+
+ this.functionName = null;
+ this.functionSource = null;
+};
+
+Firebug.Lite.Script.prototype =
+{
+ isLineExecutable: function(){},
+ pcToLine: function(){},
+ lineToPc: function(){},
+
+ toString: function()
+ {
+ return "Firebug.Lite.Script";
+ }
+};
+
+// ************************************************************************************************
+}});
+
+
+/* See license.txt for terms of usage */
+
+FBL.ns(function() { with (FBL) {
+// ************************************************************************************************
+
+
+Firebug.Lite.Browser = function(window)
+{
+ this.contentWindow = window;
+ this.contentDocument = window.document;
+ this.currentURI =
+ {
+ spec: window.location.href
+ };
+};
+
+Firebug.Lite.Browser.prototype =
+{
+ toString: function()
+ {
+ return "Firebug.Lite.Browser";
+ }
+};
+
+
+// ************************************************************************************************
+}});
+
+
+/* See license.txt for terms of usage */
+
+/*
+ http://www.JSON.org/json2.js
+ 2010-03-20
+
+ Public Domain.
+
+ NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.
+
+ See http://www.JSON.org/js.html
+
+
+ This code should be minified before deployment.
+ See http://javascript.crockford.com/jsmin.html
+
+ USE YOUR OWN COPY. IT IS EXTREMELY UNWISE TO LOAD CODE FROM SERVERS YOU DO
+ NOT CONTROL.
+
+
+ This file creates a global JSON object containing two methods: stringify
+ and parse.
+
+ JSON.stringify(value, replacer, space)
+ value any JavaScript value, usually an object or array.
+
+ replacer an optional parameter that determines how object
+ values are stringified for objects. It can be a
+ function or an array of strings.
+
+ space an optional parameter that specifies the indentation
+ of nested structures. If it is omitted, the text will
+ be packed without extra whitespace. If it is a number,
+ it will specify the number of spaces to indent at each
+ level. If it is a string (such as '\t' or ' '),
+ it contains the characters used to indent at each level.
+
+ This method produces a JSON text from a JavaScript value.
+
+ When an object value is found, if the object contains a toJSON
+ method, its toJSON method will be called and the result will be
+ stringified. A toJSON method does not serialize: it returns the
+ value represented by the name/value pair that should be serialized,
+ or undefined if nothing should be serialized. The toJSON method
+ will be passed the key associated with the value, and this will be
+ bound to the value
+
+ For example, this would serialize Dates as ISO strings.
+
+ Date.prototype.toJSON = function (key) {
+ function f(n) {
+ // Format integers to have at least two digits.
+ return n < 10 ? '0' + n : n;
+ }
+
+ return this.getUTCFullYear() + '-' +
+ f(this.getUTCMonth() + 1) + '-' +
+ f(this.getUTCDate()) + 'T' +
+ f(this.getUTCHours()) + ':' +
+ f(this.getUTCMinutes()) + ':' +
+ f(this.getUTCSeconds()) + 'Z';
+ };
+
+ You can provide an optional replacer method. It will be passed the
+ key and value of each member, with this bound to the containing
+ object. The value that is returned from your method will be
+ serialized. If your method returns undefined, then the member will
+ be excluded from the serialization.
+
+ If the replacer parameter is an array of strings, then it will be
+ used to select the members to be serialized. It filters the results
+ such that only members with keys listed in the replacer array are
+ stringified.
+
+ Values that do not have JSON representations, such as undefined or
+ functions, will not be serialized. Such values in objects will be
+ dropped; in arrays they will be replaced with null. You can use
+ a replacer function to replace those with JSON values.
+ JSON.stringify(undefined) returns undefined.
+
+ The optional space parameter produces a stringification of the
+ value that is filled with line breaks and indentation to make it
+ easier to read.
+
+ If the space parameter is a non-empty string, then that string will
+ be used for indentation. If the space parameter is a number, then
+ the indentation will be that many spaces.
+
+ Example:
+
+ text = JSON.stringify(['e', {pluribus: 'unum'}]);
+ // text is '["e",{"pluribus":"unum"}]'
+
+
+ text = JSON.stringify(['e', {pluribus: 'unum'}], null, '\t');
+ // text is '[\n\t"e",\n\t{\n\t\t"pluribus": "unum"\n\t}\n]'
+
+ text = JSON.stringify([new Date()], function (key, value) {
+ return this[key] instanceof Date ?
+ 'Date(' + this[key] + ')' : value;
+ });
+ // text is '["Date(---current time---)"]'
+
+
+ JSON.parse(text, reviver)
+ This method parses a JSON text to produce an object or array.
+ It can throw a SyntaxError exception.
+
+ The optional reviver parameter is a function that can filter and
+ transform the results. It receives each of the keys and values,
+ and its return value is used instead of the original value.
+ If it returns what it received, then the structure is not modified.
+ If it returns undefined then the member is deleted.
+
+ Example:
+
+ // Parse the text. Values that look like ISO date strings will
+ // be converted to Date objects.
+
+ myData = JSON.parse(text, function (key, value) {
+ var a;
+ if (typeof value === 'string') {
+ a =
+/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2}(?:\.\d*)?)Z$/.exec(value);
+ if (a) {
+ return new Date(Date.UTC(+a[1], +a[2] - 1, +a[3], +a[4],
+ +a[5], +a[6]));
+ }
+ }
+ return value;
+ });
+
+ myData = JSON.parse('["Date(09/09/2001)"]', function (key, value) {
+ var d;
+ if (typeof value === 'string' &&
+ value.slice(0, 5) === 'Date(' &&
+ value.slice(-1) === ')') {
+ d = new Date(value.slice(5, -1));
+ if (d) {
+ return d;
+ }
+ }
+ return value;
+ });
+
+
+ This is a reference implementation. You are free to copy, modify, or
+ redistribute.
+*/
+
+/*jslint evil: true, strict: false */
+
+/*members "", "\b", "\t", "\n", "\f", "\r", "\"", JSON, "\\", apply,
+ call, charCodeAt, getUTCDate, getUTCFullYear, getUTCHours,
+ getUTCMinutes, getUTCMonth, getUTCSeconds, hasOwnProperty, join,
+ lastIndex, length, parse, prototype, push, replace, slice, stringify,
+ test, toJSON, toString, valueOf
+*/
+
+
+// Create a JSON object only if one does not already exist. We create the
+// methods in a closure to avoid creating global variables.
+
+// ************************************************************************************************
+
+var JSON = window.JSON || {};
+
+// ************************************************************************************************
+
+(function () {
+
+ function f(n) {
+ // Format integers to have at least two digits.
+ return n < 10 ? '0' + n : n;
+ }
+
+ if (typeof Date.prototype.toJSON !== 'function') {
+
+ Date.prototype.toJSON = function (key) {
+
+ return isFinite(this.valueOf()) ?
+ this.getUTCFullYear() + '-' +
+ f(this.getUTCMonth() + 1) + '-' +
+ f(this.getUTCDate()) + 'T' +
+ f(this.getUTCHours()) + ':' +
+ f(this.getUTCMinutes()) + ':' +
+ f(this.getUTCSeconds()) + 'Z' : null;
+ };
+
+ String.prototype.toJSON =
+ Number.prototype.toJSON =
+ Boolean.prototype.toJSON = function (key) {
+ return this.valueOf();
+ };
+ }
+
+ var cx = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
+ escapable = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
+ gap,
+ indent,
+ meta = { // table of character substitutions
+ '\b': '\\b',
+ '\t': '\\t',
+ '\n': '\\n',
+ '\f': '\\f',
+ '\r': '\\r',
+ '"' : '\\"',
+ '\\': '\\\\'
+ },
+ rep;
+
+
+ function quote(string) {
+
+// If the string contains no control characters, no quote characters, and no
+// backslash characters, then we can safely slap some quotes around it.
+// Otherwise we must also replace the offending characters with safe escape
+// sequences.
+
+ escapable.lastIndex = 0;
+ return escapable.test(string) ?
+ '"' + string.replace(escapable, function (a) {
+ var c = meta[a];
+ return typeof c === 'string' ? c :
+ '\\u' + ('0000' + a.charCodeAt(0).toString(16)).slice(-4);
+ }) + '"' :
+ '"' + string + '"';
+ }
+
+
+ function str(key, holder) {
+
+// Produce a string from holder[key].
+
+ var i, // The loop counter.
+ k, // The member key.
+ v, // The member value.
+ length,
+ mind = gap,
+ partial,
+ value = holder[key];
+
+// If the value has a toJSON method, call it to obtain a replacement value.
+
+ if (value && typeof value === 'object' &&
+ typeof value.toJSON === 'function') {
+ value = value.toJSON(key);
+ }
+
+// If we were called with a replacer function, then call the replacer to
+// obtain a replacement value.
+
+ if (typeof rep === 'function') {
+ value = rep.call(holder, key, value);
+ }
+
+// What happens next depends on the value's type.
+
+ switch (typeof value) {
+ case 'string':
+ return quote(value);
+
+ case 'number':
+
+// JSON numbers must be finite. Encode non-finite numbers as null.
+
+ return isFinite(value) ? String(value) : 'null';
+
+ case 'boolean':
+ case 'null':
+
+// If the value is a boolean or null, convert it to a string. Note:
+// typeof null does not produce 'null'. The case is included here in
+// the remote chance that this gets fixed someday.
+
+ return String(value);
+
+// If the type is 'object', we might be dealing with an object or an array or
+// null.
+
+ case 'object':
+
+// Due to a specification blunder in ECMAScript, typeof null is 'object',
+// so watch out for that case.
+
+ if (!value) {
+ return 'null';
+ }
+
+// Make an array to hold the partial results of stringifying this object value.
+
+ gap += indent;
+ partial = [];
+
+// Is the value an array?
+
+ if (Object.prototype.toString.apply(value) === '[object Array]') {
+
+// The value is an array. Stringify every element. Use null as a placeholder
+// for non-JSON values.
+
+ length = value.length;
+ for (i = 0; i < length; i += 1) {
+ partial[i] = str(i, value) || 'null';
+ }
+
+// Join all of the elements together, separated with commas, and wrap them in
+// brackets.
+
+ v = partial.length === 0 ? '[]' :
+ gap ? '[\n' + gap +
+ partial.join(',\n' + gap) + '\n' +
+ mind + ']' :
+ '[' + partial.join(',') + ']';
+ gap = mind;
+ return v;
+ }
+
+// If the replacer is an array, use it to select the members to be stringified.
+
+ if (rep && typeof rep === 'object') {
+ length = rep.length;
+ for (i = 0; i < length; i += 1) {
+ k = rep[i];
+ if (typeof k === 'string') {
+ v = str(k, value);
+ if (v) {
+ partial.push(quote(k) + (gap ? ': ' : ':') + v);
+ }
+ }
+ }
+ } else {
+
+// Otherwise, iterate through all of the keys in the object.
+
+ for (k in value) {
+ if (Object.hasOwnProperty.call(value, k)) {
+ v = str(k, value);
+ if (v) {
+ partial.push(quote(k) + (gap ? ': ' : ':') + v);
+ }
+ }
+ }
+ }
+
+// Join all of the member texts together, separated with commas,
+// and wrap them in braces.
+
+ v = partial.length === 0 ? '{}' :
+ gap ? '{\n' + gap + partial.join(',\n' + gap) + '\n' +
+ mind + '}' : '{' + partial.join(',') + '}';
+ gap = mind;
+ return v;
+ }
+ }
+
+// If the JSON object does not yet have a stringify method, give it one.
+
+ if (typeof JSON.stringify !== 'function') {
+ JSON.stringify = function (value, replacer, space) {
+
+// The stringify method takes a value and an optional replacer, and an optional
+// space parameter, and returns a JSON text. The replacer can be a function
+// that can replace values, or an array of strings that will select the keys.
+// A default replacer method can be provided. Use of the space parameter can
+// produce text that is more easily readable.
+
+ var i;
+ gap = '';
+ indent = '';
+
+// If the space parameter is a number, make an indent string containing that
+// many spaces.
+
+ if (typeof space === 'number') {
+ for (i = 0; i < space; i += 1) {
+ indent += ' ';
+ }
+
+// If the space parameter is a string, it will be used as the indent string.
+
+ } else if (typeof space === 'string') {
+ indent = space;
+ }
+
+// If there is a replacer, it must be a function or an array.
+// Otherwise, throw an error.
+
+ rep = replacer;
+ if (replacer && typeof replacer !== 'function' &&
+ (typeof replacer !== 'object' ||
+ typeof replacer.length !== 'number')) {
+ throw new Error('JSON.stringify');
+ }
+
+// Make a fake root object containing our value under the key of ''.
+// Return the result of stringifying the value.
+
+ return str('', {'': value});
+ };
+ }
+
+
+// If the JSON object does not yet have a parse method, give it one.
+
+ if (typeof JSON.parse !== 'function') {
+ JSON.parse = function (text, reviver) {
+
+// The parse method takes a text and an optional reviver function, and returns
+// a JavaScript value if the text is a valid JSON text.
+
+ var j;
+
+ function walk(holder, key) {
+
+// The walk method is used to recursively walk the resulting structure so
+// that modifications can be made.
+
+ var k, v, value = holder[key];
+ if (value && typeof value === 'object') {
+ for (k in value) {
+ if (Object.hasOwnProperty.call(value, k)) {
+ v = walk(value, k);
+ if (v !== undefined) {
+ value[k] = v;
+ } else {
+ delete value[k];
+ }
+ }
+ }
+ }
+ return reviver.call(holder, key, value);
+ }
+
+
+// Parsing happens in four stages. In the first stage, we replace certain
+// Unicode characters with escape sequences. JavaScript handles many characters
+// incorrectly, either silently deleting them, or treating them as line endings.
+
+ text = String(text);
+ cx.lastIndex = 0;
+ if (cx.test(text)) {
+ text = text.replace(cx, function (a) {
+ return '\\u' +
+ ('0000' + a.charCodeAt(0).toString(16)).slice(-4);
+ });
+ }
+
+// In the second stage, we run the text against regular expressions that look
+// for non-JSON patterns. We are especially concerned with '()' and 'new'
+// because they can cause invocation, and '=' because it can cause mutation.
+// But just to be safe, we want to reject all unexpected forms.
+
+// We split the second stage into 4 regexp operations in order to work around
+// crippling inefficiencies in IE's and Safari's regexp engines. First we
+// replace the JSON backslash pairs with '@' (a non-JSON character). Second, we
+// replace all simple value tokens with ']' characters. Third, we delete all
+// open brackets that follow a colon or comma or that begin the text. Finally,
+// we look to see that the remaining characters are only whitespace or ']' or
+// ',' or ':' or '{' or '}'. If that is so, then the text is safe for eval.
+
+ if (/^[\],:{}\s]*$/.
+test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, '@').
+replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, ']').
+replace(/(?:^|:|,)(?:\s*\[)+/g, ''))) {
+
+// In the third stage we use the eval function to compile the text into a
+// JavaScript structure. The '{' operator is subject to a syntactic ambiguity
+// in JavaScript: it can begin a block or an object literal. We wrap the text
+// in parens to eliminate the ambiguity.
+
+ j = eval('(' + text + ')');
+
+// In the optional fourth stage, we recursively walk the new structure, passing
+// each name/value pair to a reviver function for possible transformation.
+
+ return typeof reviver === 'function' ?
+ walk({'': j}, '') : j;
+ }
+
+// If the text is not JSON parseable, then a SyntaxError is thrown.
+
+ throw new SyntaxError('JSON.parse');
+ };
+ }
+
+// ************************************************************************************************
+// registration
+
+FBL.JSON = JSON;
+
+// ************************************************************************************************
+}());
+
+/* See license.txt for terms of usage */
+
+(function(){
+// ************************************************************************************************
+
+/* Copyright (c) 2010-2011 Marcus Westin
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+
+var store = (function(){
+ var api = {},
+ win = window,
+ doc = win.document,
+ localStorageName = 'localStorage',
+ globalStorageName = 'globalStorage',
+ namespace = '__firebug__storejs__',
+ storage
+
+ api.disabled = false
+ api.set = function(key, value) {}
+ api.get = function(key) {}
+ api.remove = function(key) {}
+ api.clear = function() {}
+ api.transact = function(key, transactionFn) {
+ var val = api.get(key)
+ if (typeof val == 'undefined') { val = {} }
+ transactionFn(val)
+ api.set(key, val)
+ }
+
+ api.serialize = function(value) {
+ return JSON.stringify(value)
+ }
+ api.deserialize = function(value) {
+ if (typeof value != 'string') { return undefined }
+ return JSON.parse(value)
+ }
+
+ // Functions to encapsulate questionable FireFox 3.6.13 behavior
+ // when about.config::dom.storage.enabled === false
+ // See https://github.com/marcuswestin/store.js/issues#issue/13
+ function isLocalStorageNameSupported() {
+ try { return (localStorageName in win && win[localStorageName]) }
+ catch(err) { return false }
+ }
+
+ function isGlobalStorageNameSupported() {
+ try { return (globalStorageName in win && win[globalStorageName] && win[globalStorageName][win.location.hostname]) }
+ catch(err) { return false }
+ }
+
+ if (isLocalStorageNameSupported()) {
+ storage = win[localStorageName]
+ api.set = function(key, val) { storage.setItem(key, api.serialize(val)) }
+ api.get = function(key) { return api.deserialize(storage.getItem(key)) }
+ api.remove = function(key) { storage.removeItem(key) }
+ api.clear = function() { storage.clear() }
+
+ } else if (isGlobalStorageNameSupported()) {
+ storage = win[globalStorageName][win.location.hostname]
+ api.set = function(key, val) { storage[key] = api.serialize(val) }
+ api.get = function(key) { return api.deserialize(storage[key] && storage[key].value) }
+ api.remove = function(key) { delete storage[key] }
+ api.clear = function() { for (var key in storage ) { delete storage[key] } }
+
+ } else if (doc.documentElement.addBehavior) {
+ var storage = doc.createElement('div')
+ function withIEStorage(storeFunction) {
+ return function() {
+ var args = Array.prototype.slice.call(arguments, 0)
+ args.unshift(storage)
+ // See http://msdn.microsoft.com/en-us/library/ms531081(v=VS.85).aspx
+ // and http://msdn.microsoft.com/en-us/library/ms531424(v=VS.85).aspx
+ // TODO: xxxpedro doc.body is not always available so we must use doc.documentElement.
+ // We need to make sure this change won't affect the behavior of this library.
+ doc.documentElement.appendChild(storage)
+ storage.addBehavior('#default#userData')
+ storage.load(localStorageName)
+ var result = storeFunction.apply(api, args)
+ doc.documentElement.removeChild(storage)
+ return result
+ }
+ }
+ api.set = withIEStorage(function(storage, key, val) {
+ storage.setAttribute(key, api.serialize(val))
+ storage.save(localStorageName)
+ })
+ api.get = withIEStorage(function(storage, key) {
+ return api.deserialize(storage.getAttribute(key))
+ })
+ api.remove = withIEStorage(function(storage, key) {
+ storage.removeAttribute(key)
+ storage.save(localStorageName)
+ })
+ api.clear = withIEStorage(function(storage) {
+ var attributes = storage.XMLDocument.documentElement.attributes
+ storage.load(localStorageName)
+ for (var i=0, attr; attr = attributes[i]; i++) {
+ storage.removeAttribute(attr.name)
+ }
+ storage.save(localStorageName)
+ })
+ }
+
+ try {
+ api.set(namespace, namespace)
+ if (api.get(namespace) != namespace) { api.disabled = true }
+ api.remove(namespace)
+ } catch(e) {
+ api.disabled = true
+ }
+
+ return api
+})();
+
+if (typeof module != 'undefined') { module.exports = store }
+
+
+// ************************************************************************************************
+// registration
+
+FBL.Store = store;
+
+// ************************************************************************************************
+})();
+
+/* See license.txt for terms of usage */
+
+FBL.ns( /**@scope s_selector*/ function() { with (FBL) {
+// ************************************************************************************************
+
+/*
+ * Sizzle CSS Selector Engine - v1.0
+ * Copyright 2009, The Dojo Foundation
+ * Released under the MIT, BSD, and GPL Licenses.
+ * More information: http://sizzlejs.com/
+ */
+
+var chunker = /((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,
+ done = 0,
+ toString = Object.prototype.toString,
+ hasDuplicate = false,
+ baseHasDuplicate = true;
+
+// Here we check if the JavaScript engine is using some sort of
+// optimization where it does not always call our comparision
+// function. If that is the case, discard the hasDuplicate value.
+// Thus far that includes Google Chrome.
+[0, 0].sort(function(){
+ baseHasDuplicate = false;
+ return 0;
+});
+
+/**
+ * @name Firebug.Selector
+ * @namespace
+ */
+
+/**
+ * @exports Sizzle as Firebug.Selector
+ */
+var Sizzle = function(selector, context, results, seed) {
+ results = results || [];
+ var origContext = context = context || document;
+
+ if ( context.nodeType !== 1 && context.nodeType !== 9 ) {
+ return [];
+ }
+
+ if ( !selector || typeof selector !== "string" ) {
+ return results;
+ }
+
+ var parts = [], m, set, checkSet, check, mode, extra, prune = true, contextXML = isXML(context),
+ soFar = selector;
+
+ // Reset the position of the chunker regexp (start from head)
+ while ( (chunker.exec(""), m = chunker.exec(soFar)) !== null ) {
+ soFar = m[3];
+
+ parts.push( m[1] );
+
+ if ( m[2] ) {
+ extra = m[3];
+ break;
+ }
+ }
+
+ if ( parts.length > 1 && origPOS.exec( selector ) ) {
+ if ( parts.length === 2 && Expr.relative[ parts[0] ] ) {
+ set = posProcess( parts[0] + parts[1], context );
+ } else {
+ set = Expr.relative[ parts[0] ] ?
+ [ context ] :
+ Sizzle( parts.shift(), context );
+
+ while ( parts.length ) {
+ selector = parts.shift();
+
+ if ( Expr.relative[ selector ] )
+ selector += parts.shift();
+
+ set = posProcess( selector, set );
+ }
+ }
+ } else {
+ // Take a shortcut and set the context if the root selector is an ID
+ // (but not if it'll be faster if the inner selector is an ID)
+ if ( !seed && parts.length > 1 && context.nodeType === 9 && !contextXML &&
+ Expr.match.ID.test(parts[0]) && !Expr.match.ID.test(parts[parts.length - 1]) ) {
+ var ret = Sizzle.find( parts.shift(), context, contextXML );
+ context = ret.expr ? Sizzle.filter( ret.expr, ret.set )[0] : ret.set[0];
+ }
+
+ if ( context ) {
+ var ret = seed ?
+ { expr: parts.pop(), set: makeArray(seed) } :
+ Sizzle.find( parts.pop(), parts.length === 1 && (parts[0] === "~" || parts[0] === "+") && context.parentNode ? context.parentNode : context, contextXML );
+ set = ret.expr ? Sizzle.filter( ret.expr, ret.set ) : ret.set;
+
+ if ( parts.length > 0 ) {
+ checkSet = makeArray(set);
+ } else {
+ prune = false;
+ }
+
+ while ( parts.length ) {
+ var cur = parts.pop(), pop = cur;
+
+ if ( !Expr.relative[ cur ] ) {
+ cur = "";
+ } else {
+ pop = parts.pop();
+ }
+
+ if ( pop == null ) {
+ pop = context;
+ }
+
+ Expr.relative[ cur ]( checkSet, pop, contextXML );
+ }
+ } else {
+ checkSet = parts = [];
+ }
+ }
+
+ if ( !checkSet ) {
+ checkSet = set;
+ }
+
+ if ( !checkSet ) {
+ throw "Syntax error, unrecognized expression: " + (cur || selector);
+ }
+
+ if ( toString.call(checkSet) === "[object Array]" ) {
+ if ( !prune ) {
+ results.push.apply( results, checkSet );
+ } else if ( context && context.nodeType === 1 ) {
+ for ( var i = 0; checkSet[i] != null; i++ ) {
+ if ( checkSet[i] && (checkSet[i] === true || checkSet[i].nodeType === 1 && contains(context, checkSet[i])) ) {
+ results.push( set[i] );
+ }
+ }
+ } else {
+ for ( var i = 0; checkSet[i] != null; i++ ) {
+ if ( checkSet[i] && checkSet[i].nodeType === 1 ) {
+ results.push( set[i] );
+ }
+ }
+ }
+ } else {
+ makeArray( checkSet, results );
+ }
+
+ if ( extra ) {
+ Sizzle( extra, origContext, results, seed );
+ Sizzle.uniqueSort( results );
+ }
+
+ return results;
+};
+
+Sizzle.uniqueSort = function(results){
+ if ( sortOrder ) {
+ hasDuplicate = baseHasDuplicate;
+ results.sort(sortOrder);
+
+ if ( hasDuplicate ) {
+ for ( var i = 1; i < results.length; i++ ) {
+ if ( results[i] === results[i-1] ) {
+ results.splice(i--, 1);
+ }
+ }
+ }
+ }
+
+ return results;
+};
+
+Sizzle.matches = function(expr, set){
+ return Sizzle(expr, null, null, set);
+};
+
+Sizzle.find = function(expr, context, isXML){
+ var set, match;
+
+ if ( !expr ) {
+ return [];
+ }
+
+ for ( var i = 0, l = Expr.order.length; i < l; i++ ) {
+ var type = Expr.order[i], match;
+
+ if ( (match = Expr.leftMatch[ type ].exec( expr )) ) {
+ var left = match[1];
+ match.splice(1,1);
+
+ if ( left.substr( left.length - 1 ) !== "\\" ) {
+ match[1] = (match[1] || "").replace(/\\/g, "");
+ set = Expr.find[ type ]( match, context, isXML );
+ if ( set != null ) {
+ expr = expr.replace( Expr.match[ type ], "" );
+ break;
+ }
+ }
+ }
+ }
+
+ if ( !set ) {
+ set = context.getElementsByTagName("*");
+ }
+
+ return {set: set, expr: expr};
+};
+
+Sizzle.filter = function(expr, set, inplace, not){
+ var old = expr, result = [], curLoop = set, match, anyFound,
+ isXMLFilter = set && set[0] && isXML(set[0]);
+
+ while ( expr && set.length ) {
+ for ( var type in Expr.filter ) {
+ if ( (match = Expr.match[ type ].exec( expr )) != null ) {
+ var filter = Expr.filter[ type ], found, item;
+ anyFound = false;
+
+ if ( curLoop == result ) {
+ result = [];
+ }
+
+ if ( Expr.preFilter[ type ] ) {
+ match = Expr.preFilter[ type ]( match, curLoop, inplace, result, not, isXMLFilter );
+
+ if ( !match ) {
+ anyFound = found = true;
+ } else if ( match === true ) {
+ continue;
+ }
+ }
+
+ if ( match ) {
+ for ( var i = 0; (item = curLoop[i]) != null; i++ ) {
+ if ( item ) {
+ found = filter( item, match, i, curLoop );
+ var pass = not ^ !!found;
+
+ if ( inplace && found != null ) {
+ if ( pass ) {
+ anyFound = true;
+ } else {
+ curLoop[i] = false;
+ }
+ } else if ( pass ) {
+ result.push( item );
+ anyFound = true;
+ }
+ }
+ }
+ }
+
+ if ( found !== undefined ) {
+ if ( !inplace ) {
+ curLoop = result;
+ }
+
+ expr = expr.replace( Expr.match[ type ], "" );
+
+ if ( !anyFound ) {
+ return [];
+ }
+
+ break;
+ }
+ }
+ }
+
+ // Improper expression
+ if ( expr == old ) {
+ if ( anyFound == null ) {
+ throw "Syntax error, unrecognized expression: " + expr;
+ } else {
+ break;
+ }
+ }
+
+ old = expr;
+ }
+
+ return curLoop;
+};
+
+/**#@+ @ignore */
+var Expr = Sizzle.selectors = {
+ order: [ "ID", "NAME", "TAG" ],
+ match: {
+ ID: /#((?:[\w\u00c0-\uFFFF-]|\\.)+)/,
+ CLASS: /\.((?:[\w\u00c0-\uFFFF-]|\\.)+)/,
+ NAME: /\[name=['"]*((?:[\w\u00c0-\uFFFF-]|\\.)+)['"]*\]/,
+ ATTR: /\[\s*((?:[\w\u00c0-\uFFFF-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,
+ TAG: /^((?:[\w\u00c0-\uFFFF\*-]|\\.)+)/,
+ CHILD: /:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,
+ POS: /:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,
+ PSEUDO: /:((?:[\w\u00c0-\uFFFF-]|\\.)+)(?:\((['"]*)((?:\([^\)]+\)|[^\2\(\)]*)+)\2\))?/
+ },
+ leftMatch: {},
+ attrMap: {
+ "class": "className",
+ "for": "htmlFor"
+ },
+ attrHandle: {
+ href: function(elem){
+ return elem.getAttribute("href");
+ }
+ },
+ relative: {
+ "+": function(checkSet, part, isXML){
+ var isPartStr = typeof part === "string",
+ isTag = isPartStr && !/\W/.test(part),
+ isPartStrNotTag = isPartStr && !isTag;
+
+ if ( isTag && !isXML ) {
+ part = part.toUpperCase();
+ }
+
+ for ( var i = 0, l = checkSet.length, elem; i < l; i++ ) {
+ if ( (elem = checkSet[i]) ) {
+ while ( (elem = elem.previousSibling) && elem.nodeType !== 1 ) {}
+
+ checkSet[i] = isPartStrNotTag || elem && elem.nodeName === part ?
+ elem || false :
+ elem === part;
+ }
+ }
+
+ if ( isPartStrNotTag ) {
+ Sizzle.filter( part, checkSet, true );
+ }
+ },
+ ">": function(checkSet, part, isXML){
+ var isPartStr = typeof part === "string";
+
+ if ( isPartStr && !/\W/.test(part) ) {
+ part = isXML ? part : part.toUpperCase();
+
+ for ( var i = 0, l = checkSet.length; i < l; i++ ) {
+ var elem = checkSet[i];
+ if ( elem ) {
+ var parent = elem.parentNode;
+ checkSet[i] = parent.nodeName === part ? parent : false;
+ }
+ }
+ } else {
+ for ( var i = 0, l = checkSet.length; i < l; i++ ) {
+ var elem = checkSet[i];
+ if ( elem ) {
+ checkSet[i] = isPartStr ?
+ elem.parentNode :
+ elem.parentNode === part;
+ }
+ }
+
+ if ( isPartStr ) {
+ Sizzle.filter( part, checkSet, true );
+ }
+ }
+ },
+ "": function(checkSet, part, isXML){
+ var doneName = done++, checkFn = dirCheck;
+
+ if ( !/\W/.test(part) ) {
+ var nodeCheck = part = isXML ? part : part.toUpperCase();
+ checkFn = dirNodeCheck;
+ }
+
+ checkFn("parentNode", part, doneName, checkSet, nodeCheck, isXML);
+ },
+ "~": function(checkSet, part, isXML){
+ var doneName = done++, checkFn = dirCheck;
+
+ if ( typeof part === "string" && !/\W/.test(part) ) {
+ var nodeCheck = part = isXML ? part : part.toUpperCase();
+ checkFn = dirNodeCheck;
+ }
+
+ checkFn("previousSibling", part, doneName, checkSet, nodeCheck, isXML);
+ }
+ },
+ find: {
+ ID: function(match, context, isXML){
+ if ( typeof context.getElementById !== "undefined" && !isXML ) {
+ var m = context.getElementById(match[1]);
+ return m ? [m] : [];
+ }
+ },
+ NAME: function(match, context, isXML){
+ if ( typeof context.getElementsByName !== "undefined" ) {
+ var ret = [], results = context.getElementsByName(match[1]);
+
+ for ( var i = 0, l = results.length; i < l; i++ ) {
+ if ( results[i].getAttribute("name") === match[1] ) {
+ ret.push( results[i] );
+ }
+ }
+
+ return ret.length === 0 ? null : ret;
+ }
+ },
+ TAG: function(match, context){
+ return context.getElementsByTagName(match[1]);
+ }
+ },
+ preFilter: {
+ CLASS: function(match, curLoop, inplace, result, not, isXML){
+ match = " " + match[1].replace(/\\/g, "") + " ";
+
+ if ( isXML ) {
+ return match;
+ }
+
+ for ( var i = 0, elem; (elem = curLoop[i]) != null; i++ ) {
+ if ( elem ) {
+ if ( not ^ (elem.className && (" " + elem.className + " ").indexOf(match) >= 0) ) {
+ if ( !inplace )
+ result.push( elem );
+ } else if ( inplace ) {
+ curLoop[i] = false;
+ }
+ }
+ }
+
+ return false;
+ },
+ ID: function(match){
+ return match[1].replace(/\\/g, "");
+ },
+ TAG: function(match, curLoop){
+ for ( var i = 0; curLoop[i] === false; i++ ){}
+ return curLoop[i] && isXML(curLoop[i]) ? match[1] : match[1].toUpperCase();
+ },
+ CHILD: function(match){
+ if ( match[1] == "nth" ) {
+ // parse equations like 'even', 'odd', '5', '2n', '3n+2', '4n-1', '-n+6'
+ var test = /(-?)(\d*)n((?:\+|-)?\d*)/.exec(
+ match[2] == "even" && "2n" || match[2] == "odd" && "2n+1" ||
+ !/\D/.test( match[2] ) && "0n+" + match[2] || match[2]);
+
+ // calculate the numbers (first)n+(last) including if they are negative
+ match[2] = (test[1] + (test[2] || 1)) - 0;
+ match[3] = test[3] - 0;
+ }
+
+ // TODO: Move to normal caching system
+ match[0] = done++;
+
+ return match;
+ },
+ ATTR: function(match, curLoop, inplace, result, not, isXML){
+ var name = match[1].replace(/\\/g, "");
+
+ if ( !isXML && Expr.attrMap[name] ) {
+ match[1] = Expr.attrMap[name];
+ }
+
+ if ( match[2] === "~=" ) {
+ match[4] = " " + match[4] + " ";
+ }
+
+ return match;
+ },
+ PSEUDO: function(match, curLoop, inplace, result, not){
+ if ( match[1] === "not" ) {
+ // If we're dealing with a complex expression, or a simple one
+ if ( ( chunker.exec(match[3]) || "" ).length > 1 || /^\w/.test(match[3]) ) {
+ match[3] = Sizzle(match[3], null, null, curLoop);
+ } else {
+ var ret = Sizzle.filter(match[3], curLoop, inplace, true ^ not);
+ if ( !inplace ) {
+ result.push.apply( result, ret );
+ }
+ return false;
+ }
+ } else if ( Expr.match.POS.test( match[0] ) || Expr.match.CHILD.test( match[0] ) ) {
+ return true;
+ }
+
+ return match;
+ },
+ POS: function(match){
+ match.unshift( true );
+ return match;
+ }
+ },
+ filters: {
+ enabled: function(elem){
+ return elem.disabled === false && elem.type !== "hidden";
+ },
+ disabled: function(elem){
+ return elem.disabled === true;
+ },
+ checked: function(elem){
+ return elem.checked === true;
+ },
+ selected: function(elem){
+ // Accessing this property makes selected-by-default
+ // options in Safari work properly
+ elem.parentNode.selectedIndex;
+ return elem.selected === true;
+ },
+ parent: function(elem){
+ return !!elem.firstChild;
+ },
+ empty: function(elem){
+ return !elem.firstChild;
+ },
+ has: function(elem, i, match){
+ return !!Sizzle( match[3], elem ).length;
+ },
+ header: function(elem){
+ return /h\d/i.test( elem.nodeName );
+ },
+ text: function(elem){
+ return "text" === elem.type;
+ },
+ radio: function(elem){
+ return "radio" === elem.type;
+ },
+ checkbox: function(elem){
+ return "checkbox" === elem.type;
+ },
+ file: function(elem){
+ return "file" === elem.type;
+ },
+ password: function(elem){
+ return "password" === elem.type;
+ },
+ submit: function(elem){
+ return "submit" === elem.type;
+ },
+ image: function(elem){
+ return "image" === elem.type;
+ },
+ reset: function(elem){
+ return "reset" === elem.type;
+ },
+ button: function(elem){
+ return "button" === elem.type || elem.nodeName.toUpperCase() === "BUTTON";
+ },
+ input: function(elem){
+ return /input|select|textarea|button/i.test(elem.nodeName);
+ }
+ },
+ setFilters: {
+ first: function(elem, i){
+ return i === 0;
+ },
+ last: function(elem, i, match, array){
+ return i === array.length - 1;
+ },
+ even: function(elem, i){
+ return i % 2 === 0;
+ },
+ odd: function(elem, i){
+ return i % 2 === 1;
+ },
+ lt: function(elem, i, match){
+ return i < match[3] - 0;
+ },
+ gt: function(elem, i, match){
+ return i > match[3] - 0;
+ },
+ nth: function(elem, i, match){
+ return match[3] - 0 == i;
+ },
+ eq: function(elem, i, match){
+ return match[3] - 0 == i;
+ }
+ },
+ filter: {
+ PSEUDO: function(elem, match, i, array){
+ var name = match[1], filter = Expr.filters[ name ];
+
+ if ( filter ) {
+ return filter( elem, i, match, array );
+ } else if ( name === "contains" ) {
+ return (elem.textContent || elem.innerText || "").indexOf(match[3]) >= 0;
+ } else if ( name === "not" ) {
+ var not = match[3];
+
+ for ( var i = 0, l = not.length; i < l; i++ ) {
+ if ( not[i] === elem ) {
+ return false;
+ }
+ }
+
+ return true;
+ }
+ },
+ CHILD: function(elem, match){
+ var type = match[1], node = elem;
+ switch (type) {
+ case 'only':
+ case 'first':
+ while ( (node = node.previousSibling) ) {
+ if ( node.nodeType === 1 ) return false;
+ }
+ if ( type == 'first') return true;
+ node = elem;
+ case 'last':
+ while ( (node = node.nextSibling) ) {
+ if ( node.nodeType === 1 ) return false;
+ }
+ return true;
+ case 'nth':
+ var first = match[2], last = match[3];
+
+ if ( first == 1 && last == 0 ) {
+ return true;
+ }
+
+ var doneName = match[0],
+ parent = elem.parentNode;
+
+ if ( parent && (parent.sizcache !== doneName || !elem.nodeIndex) ) {
+ var count = 0;
+ for ( node = parent.firstChild; node; node = node.nextSibling ) {
+ if ( node.nodeType === 1 ) {
+ node.nodeIndex = ++count;
+ }
+ }
+ parent.sizcache = doneName;
+ }
+
+ var diff = elem.nodeIndex - last;
+ if ( first == 0 ) {
+ return diff == 0;
+ } else {
+ return ( diff % first == 0 && diff / first >= 0 );
+ }
+ }
+ },
+ ID: function(elem, match){
+ return elem.nodeType === 1 && elem.getAttribute("id") === match;
+ },
+ TAG: function(elem, match){
+ return (match === "*" && elem.nodeType === 1) || elem.nodeName === match;
+ },
+ CLASS: function(elem, match){
+ return (" " + (elem.className || elem.getAttribute("class")) + " ")
+ .indexOf( match ) > -1;
+ },
+ ATTR: function(elem, match){
+ var name = match[1],
+ result = Expr.attrHandle[ name ] ?
+ Expr.attrHandle[ name ]( elem ) :
+ elem[ name ] != null ?
+ elem[ name ] :
+ elem.getAttribute( name ),
+ value = result + "",
+ type = match[2],
+ check = match[4];
+
+ return result == null ?
+ type === "!=" :
+ type === "=" ?
+ value === check :
+ type === "*=" ?
+ value.indexOf(check) >= 0 :
+ type === "~=" ?
+ (" " + value + " ").indexOf(check) >= 0 :
+ !check ?
+ value && result !== false :
+ type === "!=" ?
+ value != check :
+ type === "^=" ?
+ value.indexOf(check) === 0 :
+ type === "$=" ?
+ value.substr(value.length - check.length) === check :
+ type === "|=" ?
+ value === check || value.substr(0, check.length + 1) === check + "-" :
+ false;
+ },
+ POS: function(elem, match, i, array){
+ var name = match[2], filter = Expr.setFilters[ name ];
+
+ if ( filter ) {
+ return filter( elem, i, match, array );
+ }
+ }
+ }
+};
+
+var origPOS = Expr.match.POS;
+
+for ( var type in Expr.match ) {
+ Expr.match[ type ] = new RegExp( Expr.match[ type ].source + /(?![^\[]*\])(?![^\(]*\))/.source );
+ Expr.leftMatch[ type ] = new RegExp( /(^(?:.|\r|\n)*?)/.source + Expr.match[ type ].source );
+}
+
+var makeArray = function(array, results) {
+ array = Array.prototype.slice.call( array, 0 );
+
+ if ( results ) {
+ results.push.apply( results, array );
+ return results;
+ }
+
+ return array;
+};
+
+// Perform a simple check to determine if the browser is capable of
+// converting a NodeList to an array using builtin methods.
+try {
+ Array.prototype.slice.call( document.documentElement.childNodes, 0 );
+
+// Provide a fallback method if it does not work
+} catch(e){
+ makeArray = function(array, results) {
+ var ret = results || [];
+
+ if ( toString.call(array) === "[object Array]" ) {
+ Array.prototype.push.apply( ret, array );
+ } else {
+ if ( typeof array.length === "number" ) {
+ for ( var i = 0, l = array.length; i < l; i++ ) {
+ ret.push( array[i] );
+ }
+ } else {
+ for ( var i = 0; array[i]; i++ ) {
+ ret.push( array[i] );
+ }
+ }
+ }
+
+ return ret;
+ };
+}
+
+var sortOrder;
+
+if ( document.documentElement.compareDocumentPosition ) {
+ sortOrder = function( a, b ) {
+ if ( !a.compareDocumentPosition || !b.compareDocumentPosition ) {
+ if ( a == b ) {
+ hasDuplicate = true;
+ }
+ return 0;
+ }
+
+ var ret = a.compareDocumentPosition(b) & 4 ? -1 : a === b ? 0 : 1;
+ if ( ret === 0 ) {
+ hasDuplicate = true;
+ }
+ return ret;
+ };
+} else if ( "sourceIndex" in document.documentElement ) {
+ sortOrder = function( a, b ) {
+ if ( !a.sourceIndex || !b.sourceIndex ) {
+ if ( a == b ) {
+ hasDuplicate = true;
+ }
+ return 0;
+ }
+
+ var ret = a.sourceIndex - b.sourceIndex;
+ if ( ret === 0 ) {
+ hasDuplicate = true;
+ }
+ return ret;
+ };
+} else if ( document.createRange ) {
+ sortOrder = function( a, b ) {
+ if ( !a.ownerDocument || !b.ownerDocument ) {
+ if ( a == b ) {
+ hasDuplicate = true;
+ }
+ return 0;
+ }
+
+ var aRange = a.ownerDocument.createRange(), bRange = b.ownerDocument.createRange();
+ aRange.setStart(a, 0);
+ aRange.setEnd(a, 0);
+ bRange.setStart(b, 0);
+ bRange.setEnd(b, 0);
+ var ret = aRange.compareBoundaryPoints(Range.START_TO_END, bRange);
+ if ( ret === 0 ) {
+ hasDuplicate = true;
+ }
+ return ret;
+ };
+}
+
+// Check to see if the browser returns elements by name when
+// querying by getElementById (and provide a workaround)
+(function(){
+ // We're going to inject a fake input element with a specified name
+ var form = document.createElement("div"),
+ id = "script" + (new Date).getTime();
+ form.innerHTML = "<a name='" + id + "'/>";
+
+ // Inject it into the root element, check its status, and remove it quickly
+ var root = document.documentElement;
+ root.insertBefore( form, root.firstChild );
+
+ // The workaround has to do additional checks after a getElementById
+ // Which slows things down for other browsers (hence the branching)
+ if ( !!document.getElementById( id ) ) {
+ Expr.find.ID = function(match, context, isXML){
+ if ( typeof context.getElementById !== "undefined" && !isXML ) {
+ var m = context.getElementById(match[1]);
+ return m ? m.id === match[1] || typeof m.getAttributeNode !== "undefined" && m.getAttributeNode("id").nodeValue === match[1] ? [m] : undefined : [];
+ }
+ };
+
+ Expr.filter.ID = function(elem, match){
+ var node = typeof elem.getAttributeNode !== "undefined" && elem.getAttributeNode("id");
+ return elem.nodeType === 1 && node && node.nodeValue === match;
+ };
+ }
+
+ root.removeChild( form );
+ root = form = null; // release memory in IE
+})();
+
+(function(){
+ // Check to see if the browser returns only elements
+ // when doing getElementsByTagName("*")
+
+ // Create a fake element
+ var div = document.createElement("div");
+ div.appendChild( document.createComment("") );
+
+ // Make sure no comments are found
+ if ( div.getElementsByTagName("*").length > 0 ) {
+ Expr.find.TAG = function(match, context){
+ var results = context.getElementsByTagName(match[1]);
+
+ // Filter out possible comments
+ if ( match[1] === "*" ) {
+ var tmp = [];
+
+ for ( var i = 0; results[i]; i++ ) {
+ if ( results[i].nodeType === 1 ) {
+ tmp.push( results[i] );
+ }
+ }
+
+ results = tmp;
+ }
+
+ return results;
+ };
+ }
+
+ // Check to see if an attribute returns normalized href attributes
+ div.innerHTML = "<a href='#'></a>";
+ if ( div.firstChild && typeof div.firstChild.getAttribute !== "undefined" &&
+ div.firstChild.getAttribute("href") !== "#" ) {
+ Expr.attrHandle.href = function(elem){
+ return elem.getAttribute("href", 2);
+ };
+ }
+
+ div = null; // release memory in IE
+})();
+
+if ( document.querySelectorAll ) (function(){
+ var oldSizzle = Sizzle, div = document.createElement("div");
+ div.innerHTML = "<p class='TEST'></p>";
+
+ // Safari can't handle uppercase or unicode characters when
+ // in quirks mode.
+ if ( div.querySelectorAll && div.querySelectorAll(".TEST").length === 0 ) {
+ return;
+ }
+
+ Sizzle = function(query, context, extra, seed){
+ context = context || document;
+
+ // Only use querySelectorAll on non-XML documents
+ // (ID selectors don't work in non-HTML documents)
+ if ( !seed && context.nodeType === 9 && !isXML(context) ) {
+ try {
+ return makeArray( context.querySelectorAll(query), extra );
+ } catch(e){}
+ }
+
+ return oldSizzle(query, context, extra, seed);
+ };
+
+ for ( var prop in oldSizzle ) {
+ Sizzle[ prop ] = oldSizzle[ prop ];
+ }
+
+ div = null; // release memory in IE
+})();
+
+if ( document.getElementsByClassName && document.documentElement.getElementsByClassName ) (function(){
+ var div = document.createElement("div");
+ div.innerHTML = "<div class='test e'></div><div class='test'></div>";
+
+ // Opera can't find a second classname (in 9.6)
+ if ( div.getElementsByClassName("e").length === 0 )
+ return;
+
+ // Safari caches class attributes, doesn't catch changes (in 3.2)
+ div.lastChild.className = "e";
+
+ if ( div.getElementsByClassName("e").length === 1 )
+ return;
+
+ Expr.order.splice(1, 0, "CLASS");
+ Expr.find.CLASS = function(match, context, isXML) {
+ if ( typeof context.getElementsByClassName !== "undefined" && !isXML ) {
+ return context.getElementsByClassName(match[1]);
+ }
+ };
+
+ div = null; // release memory in IE
+})();
+
+function dirNodeCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) {
+ var sibDir = dir == "previousSibling" && !isXML;
+ for ( var i = 0, l = checkSet.length; i < l; i++ ) {
+ var elem = checkSet[i];
+ if ( elem ) {
+ if ( sibDir && elem.nodeType === 1 ){
+ elem.sizcache = doneName;
+ elem.sizset = i;
+ }
+ elem = elem[dir];
+ var match = false;
+
+ while ( elem ) {
+ if ( elem.sizcache === doneName ) {
+ match = checkSet[elem.sizset];
+ break;
+ }
+
+ if ( elem.nodeType === 1 && !isXML ){
+ elem.sizcache = doneName;
+ elem.sizset = i;
+ }
+
+ if ( elem.nodeName === cur ) {
+ match = elem;
+ break;
+ }
+
+ elem = elem[dir];
+ }
+
+ checkSet[i] = match;
+ }
+ }
+}
+
+function dirCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) {
+ var sibDir = dir == "previousSibling" && !isXML;
+ for ( var i = 0, l = checkSet.length; i < l; i++ ) {
+ var elem = checkSet[i];
+ if ( elem ) {
+ if ( sibDir && elem.nodeType === 1 ) {
+ elem.sizcache = doneName;
+ elem.sizset = i;
+ }
+ elem = elem[dir];
+ var match = false;
+
+ while ( elem ) {
+ if ( elem.sizcache === doneName ) {
+ match = checkSet[elem.sizset];
+ break;
+ }
+
+ if ( elem.nodeType === 1 ) {
+ if ( !isXML ) {
+ elem.sizcache = doneName;
+ elem.sizset = i;
+ }
+ if ( typeof cur !== "string" ) {
+ if ( elem === cur ) {
+ match = true;
+ break;
+ }
+
+ } else if ( Sizzle.filter( cur, [elem] ).length > 0 ) {
+ match = elem;
+ break;
+ }
+ }
+
+ elem = elem[dir];
+ }
+
+ checkSet[i] = match;
+ }
+ }
+}
+
+var contains = document.compareDocumentPosition ? function(a, b){
+ return a.compareDocumentPosition(b) & 16;
+} : function(a, b){
+ return a !== b && (a.contains ? a.contains(b) : true);
+};
+
+var isXML = function(elem){
+ return elem.nodeType === 9 && elem.documentElement.nodeName !== "HTML" ||
+ !!elem.ownerDocument && elem.ownerDocument.documentElement.nodeName !== "HTML";
+};
+
+var posProcess = function(selector, context){
+ var tmpSet = [], later = "", match,
+ root = context.nodeType ? [context] : context;
+
+ // Position selectors must be done after the filter
+ // And so must :not(positional) so we move all PSEUDOs to the end
+ while ( (match = Expr.match.PSEUDO.exec( selector )) ) {
+ later += match[0];
+ selector = selector.replace( Expr.match.PSEUDO, "" );
+ }
+
+ selector = Expr.relative[selector] ? selector + "*" : selector;
+
+ for ( var i = 0, l = root.length; i < l; i++ ) {
+ Sizzle( selector, root[i], tmpSet );
+ }
+
+ return Sizzle.filter( later, tmpSet );
+};
+
+// EXPOSE
+
+Firebug.Selector = Sizzle;
+
+/**#@-*/
+
+// ************************************************************************************************
+}});
+
+/* See license.txt for terms of usage */
+
+FBL.ns(function() { with (FBL) {
+// ************************************************************************************************
+
+// ************************************************************************************************
+// Inspector Module
+
+var ElementCache = Firebug.Lite.Cache.Element;
+
+var inspectorTS, inspectorTimer, isInspecting;
+
+Firebug.Inspector =
+{
+ create: function()
+ {
+ offlineFragment = Env.browser.document.createDocumentFragment();
+
+ createBoxModelInspector();
+ createOutlineInspector();
+ },
+
+ destroy: function()
+ {
+ destroyBoxModelInspector();
+ destroyOutlineInspector();
+
+ offlineFragment = null;
+ },
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ // Inspect functions
+
+ toggleInspect: function()
+ {
+ if (isInspecting)
+ {
+ this.stopInspecting();
+ }
+ else
+ {
+ Firebug.chrome.inspectButton.changeState("pressed");
+ this.startInspecting();
+ }
+ },
+
+ startInspecting: function()
+ {
+ isInspecting = true;
+
+ Firebug.chrome.selectPanel("HTML");
+
+ createInspectorFrame();
+
+ var size = Firebug.browser.getWindowScrollSize();
+
+ fbInspectFrame.style.width = size.width + "px";
+ fbInspectFrame.style.height = size.height + "px";
+
+ //addEvent(Firebug.browser.document.documentElement, "mousemove", Firebug.Inspector.onInspectingBody);
+
+ addEvent(fbInspectFrame, "mousemove", Firebug.Inspector.onInspecting);
+ addEvent(fbInspectFrame, "mousedown", Firebug.Inspector.onInspectingClick);
+ },
+
+ stopInspecting: function()
+ {
+ isInspecting = false;
+
+ if (outlineVisible) this.hideOutline();
+ removeEvent(fbInspectFrame, "mousemove", Firebug.Inspector.onInspecting);
+ removeEvent(fbInspectFrame, "mousedown", Firebug.Inspector.onInspectingClick);
+
+ destroyInspectorFrame();
+
+ Firebug.chrome.inspectButton.restore();
+
+ if (Firebug.chrome.type == "popup")
+ Firebug.chrome.node.focus();
+ },
+
+ onInspectingClick: function(e)
+ {
+ fbInspectFrame.style.display = "none";
+ var targ = Firebug.browser.getElementFromPoint(e.clientX, e.clientY);
+ fbInspectFrame.style.display = "block";
+
+ // Avoid inspecting the outline, and the FirebugUI
+ var id = targ.id;
+ if (id && /^fbOutline\w$/.test(id)) return;
+ if (id == "FirebugUI") return;
+
+ // Avoid looking at text nodes in Opera
+ while (targ.nodeType != 1) targ = targ.parentNode;
+
+ //Firebug.Console.log(targ);
+ Firebug.Inspector.stopInspecting();
+ },
+
+ onInspecting: function(e)
+ {
+ if (new Date().getTime() - lastInspecting > 30)
+ {
+ fbInspectFrame.style.display = "none";
+ var targ = Firebug.browser.getElementFromPoint(e.clientX, e.clientY);
+ fbInspectFrame.style.display = "block";
+
+ // Avoid inspecting the outline, and the FirebugUI
+ var id = targ.id;
+ if (id && /^fbOutline\w$/.test(id)) return;
+ if (id == "FirebugUI") return;
+
+ // Avoid looking at text nodes in Opera
+ while (targ.nodeType != 1) targ = targ.parentNode;
+
+ if (targ.nodeName.toLowerCase() == "body") return;
+
+ //Firebug.Console.log(e.clientX, e.clientY, targ);
+ Firebug.Inspector.drawOutline(targ);
+
+ if (ElementCache(targ))
+ {
+ var target = ""+ElementCache.key(targ);
+ var lazySelect = function()
+ {
+ inspectorTS = new Date().getTime();
+
+ if (Firebug.HTML)
+ Firebug.HTML.selectTreeNode(""+ElementCache.key(targ));
+ };
+
+ if (inspectorTimer)
+ {
+ clearTimeout(inspectorTimer);
+ inspectorTimer = null;
+ }
+
+ if (new Date().getTime() - inspectorTS > 200)
+ setTimeout(lazySelect, 0);
+ else
+ inspectorTimer = setTimeout(lazySelect, 300);
+ }
+
+ lastInspecting = new Date().getTime();
+ }
+ },
+
+ // TODO: xxxpedro remove this?
+ onInspectingBody: function(e)
+ {
+ if (new Date().getTime() - lastInspecting > 30)
+ {
+ var targ = e.target;
+
+ // Avoid inspecting the outline, and the FirebugUI
+ var id = targ.id;
+ if (id && /^fbOutline\w$/.test(id)) return;
+ if (id == "FirebugUI") return;
+
+ // Avoid looking at text nodes in Opera
+ while (targ.nodeType != 1) targ = targ.parentNode;
+
+ if (targ.nodeName.toLowerCase() == "body") return;
+
+ //Firebug.Console.log(e.clientX, e.clientY, targ);
+ Firebug.Inspector.drawOutline(targ);
+
+ if (ElementCache.has(targ))
+ FBL.Firebug.HTML.selectTreeNode(""+ElementCache.key(targ));
+
+ lastInspecting = new Date().getTime();
+ }
+ },
+
+ /**
+ *
+ * llttttttrr
+ * llttttttrr
+ * ll rr
+ * ll rr
+ * llbbbbbbrr
+ * llbbbbbbrr
+ */
+ drawOutline: function(el)
+ {
+ var border = 2;
+ var scrollbarSize = 17;
+
+ var windowSize = Firebug.browser.getWindowSize();
+ var scrollSize = Firebug.browser.getWindowScrollSize();
+ var scrollPosition = Firebug.browser.getWindowScrollPosition();
+
+ var box = Firebug.browser.getElementBox(el);
+
+ var top = box.top;
+ var left = box.left;
+ var height = box.height;
+ var width = box.width;
+
+ var freeHorizontalSpace = scrollPosition.left + windowSize.width - left - width -
+ (!isIE && scrollSize.height > windowSize.height ? // is *vertical* scrollbar visible
+ scrollbarSize : 0);
+
+ var freeVerticalSpace = scrollPosition.top + windowSize.height - top - height -
+ (!isIE && scrollSize.width > windowSize.width ? // is *horizontal* scrollbar visible
+ scrollbarSize : 0);
+
+ var numVerticalBorders = freeVerticalSpace > 0 ? 2 : 1;
+
+ var o = outlineElements;
+ var style;
+
+ style = o.fbOutlineT.style;
+ style.top = top-border + "px";
+ style.left = left + "px";
+ style.height = border + "px"; // TODO: on initialize()
+ style.width = width + "px";
+
+ style = o.fbOutlineL.style;
+ style.top = top-border + "px";
+ style.left = left-border + "px";
+ style.height = height+ numVerticalBorders*border + "px";
+ style.width = border + "px"; // TODO: on initialize()
+
+ style = o.fbOutlineB.style;
+ if (freeVerticalSpace > 0)
+ {
+ style.top = top+height + "px";
+ style.left = left + "px";
+ style.width = width + "px";
+ //style.height = border + "px"; // TODO: on initialize() or worst case?
+ }
+ else
+ {
+ style.top = -2*border + "px";
+ style.left = -2*border + "px";
+ style.width = border + "px";
+ //style.height = border + "px";
+ }
+
+ style = o.fbOutlineR.style;
+ if (freeHorizontalSpace > 0)
+ {
+ style.top = top-border + "px";
+ style.left = left+width + "px";
+ style.height = height + numVerticalBorders*border + "px";
+ style.width = (freeHorizontalSpace < border ? freeHorizontalSpace : border) + "px";
+ }
+ else
+ {
+ style.top = -2*border + "px";
+ style.left = -2*border + "px";
+ style.height = border + "px";
+ style.width = border + "px";
+ }
+
+ if (!outlineVisible) this.showOutline();
+ },
+
+ hideOutline: function()
+ {
+ if (!outlineVisible) return;
+
+ for (var name in outline)
+ offlineFragment.appendChild(outlineElements[name]);
+
+ outlineVisible = false;
+ },
+
+ showOutline: function()
+ {
+ if (outlineVisible) return;
+
+ if (boxModelVisible) this.hideBoxModel();
+
+ for (var name in outline)
+ Firebug.browser.document.getElementsByTagName("body")[0].appendChild(outlineElements[name]);
+
+ outlineVisible = true;
+ },
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ // Box Model
+
+ drawBoxModel: function(el)
+ {
+ // avoid error when the element is not attached a document
+ if (!el || !el.parentNode)
+ return;
+
+ var box = Firebug.browser.getElementBox(el);
+
+ var windowSize = Firebug.browser.getWindowSize();
+ var scrollPosition = Firebug.browser.getWindowScrollPosition();
+
+ // element may be occluded by the chrome, when in frame mode
+ var offsetHeight = Firebug.chrome.type == "frame" ? Firebug.context.persistedState.height : 0;
+
+ // if element box is not inside the viewport, don't draw the box model
+ if (box.top > scrollPosition.top + windowSize.height - offsetHeight ||
+ box.left > scrollPosition.left + windowSize.width ||
+ scrollPosition.top > box.top + box.height ||
+ scrollPosition.left > box.left + box.width )
+ return;
+
+ var top = box.top;
+ var left = box.left;
+ var height = box.height;
+ var width = box.width;
+
+ var margin = Firebug.browser.getMeasurementBox(el, "margin");
+ var padding = Firebug.browser.getMeasurementBox(el, "padding");
+ var border = Firebug.browser.getMeasurementBox(el, "border");
+
+ boxModelStyle.top = top - margin.top + "px";
+ boxModelStyle.left = left - margin.left + "px";
+ boxModelStyle.height = height + margin.top + margin.bottom + "px";
+ boxModelStyle.width = width + margin.left + margin.right + "px";
+
+ boxBorderStyle.top = margin.top + "px";
+ boxBorderStyle.left = margin.left + "px";
+ boxBorderStyle.height = height + "px";
+ boxBorderStyle.width = width + "px";
+
+ boxPaddingStyle.top = margin.top + border.top + "px";
+ boxPaddingStyle.left = margin.left + border.left + "px";
+ boxPaddingStyle.height = height - border.top - border.bottom + "px";
+ boxPaddingStyle.width = width - border.left - border.right + "px";
+
+ boxContentStyle.top = margin.top + border.top + padding.top + "px";
+ boxContentStyle.left = margin.left + border.left + padding.left + "px";
+ boxContentStyle.height = height - border.top - padding.top - padding.bottom - border.bottom + "px";
+ boxContentStyle.width = width - border.left - padding.left - padding.right - border.right + "px";
+
+ if (!boxModelVisible) this.showBoxModel();
+ },
+
+ hideBoxModel: function()
+ {
+ if (!boxModelVisible) return;
+
+ offlineFragment.appendChild(boxModel);
+ boxModelVisible = false;
+ },
+
+ showBoxModel: function()
+ {
+ if (boxModelVisible) return;
+
+ if (outlineVisible) this.hideOutline();
+
+ Firebug.browser.document.getElementsByTagName("body")[0].appendChild(boxModel);
+ boxModelVisible = true;
+ }
+
+};
+
+// ************************************************************************************************
+// Inspector Internals
+
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+// Shared variables
+
+
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+// Internal variables
+
+var offlineFragment = null;
+
+var boxModelVisible = false;
+
+var boxModel, boxModelStyle,
+ boxMargin, boxMarginStyle,
+ boxBorder, boxBorderStyle,
+ boxPadding, boxPaddingStyle,
+ boxContent, boxContentStyle;
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+var resetStyle = "margin:0; padding:0; border:0; position:absolute; overflow:hidden; display:block;";
+var offscreenStyle = resetStyle + "top:-1234px; left:-1234px;";
+
+var inspectStyle = resetStyle + "z-index: 2147483500;";
+var inspectFrameStyle = resetStyle + "z-index: 2147483550; top:0; left:0; background:url(" +
+ Env.Location.skinDir + "pixel_transparent.gif);";
+
+//if (Env.Options.enableTrace) inspectFrameStyle = resetStyle + "z-index: 2147483550; top: 0; left: 0; background: #ff0; opacity: 0.05; _filter: alpha(opacity=5);";
+
+var inspectModelOpacity = isIE ? "filter:alpha(opacity=80);" : "opacity:0.8;";
+var inspectModelStyle = inspectStyle + inspectModelOpacity;
+var inspectMarginStyle = inspectStyle + "background: #EDFF64; height:100%; width:100%;";
+var inspectBorderStyle = inspectStyle + "background: #666;";
+var inspectPaddingStyle = inspectStyle + "background: SlateBlue;";
+var inspectContentStyle = inspectStyle + "background: SkyBlue;";
+
+
+var outlineStyle = {
+ fbHorizontalLine: "background: #3875D7;height: 2px;",
+ fbVerticalLine: "background: #3875D7;width: 2px;"
+};
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+var lastInspecting = 0;
+var fbInspectFrame = null;
+
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+var outlineVisible = false;
+var outlineElements = {};
+var outline = {
+ "fbOutlineT": "fbHorizontalLine",
+ "fbOutlineL": "fbVerticalLine",
+ "fbOutlineB": "fbHorizontalLine",
+ "fbOutlineR": "fbVerticalLine"
+};
+
+
+var getInspectingTarget = function()
+{
+
+};
+
+// ************************************************************************************************
+// Section
+
+var createInspectorFrame = function createInspectorFrame()
+{
+ fbInspectFrame = createGlobalElement("div");
+ fbInspectFrame.id = "fbInspectFrame";
+ fbInspectFrame.firebugIgnore = true;
+ fbInspectFrame.style.cssText = inspectFrameStyle;
+ Firebug.browser.document.getElementsByTagName("body")[0].appendChild(fbInspectFrame);
+};
+
+var destroyInspectorFrame = function destroyInspectorFrame()
+{
+ if (fbInspectFrame)
+ {
+ Firebug.browser.document.getElementsByTagName("body")[0].removeChild(fbInspectFrame);
+ fbInspectFrame = null;
+ }
+};
+
+var createOutlineInspector = function createOutlineInspector()
+{
+ for (var name in outline)
+ {
+ var el = outlineElements[name] = createGlobalElement("div");
+ el.id = name;
+ el.firebugIgnore = true;
+ el.style.cssText = inspectStyle + outlineStyle[outline[name]];
+ offlineFragment.appendChild(el);
+ }
+};
+
+var destroyOutlineInspector = function destroyOutlineInspector()
+{
+ for (var name in outline)
+ {
+ var el = outlineElements[name];
+ el.parentNode.removeChild(el);
+ }
+};
+
+var createBoxModelInspector = function createBoxModelInspector()
+{
+ boxModel = createGlobalElement("div");
+ boxModel.id = "fbBoxModel";
+ boxModel.firebugIgnore = true;
+ boxModelStyle = boxModel.style;
+ boxModelStyle.cssText = inspectModelStyle;
+
+ boxMargin = createGlobalElement("div");
+ boxMargin.id = "fbBoxMargin";
+ boxMarginStyle = boxMargin.style;
+ boxMarginStyle.cssText = inspectMarginStyle;
+ boxModel.appendChild(boxMargin);
+
+ boxBorder = createGlobalElement("div");
+ boxBorder.id = "fbBoxBorder";
+ boxBorderStyle = boxBorder.style;
+ boxBorderStyle.cssText = inspectBorderStyle;
+ boxModel.appendChild(boxBorder);
+
+ boxPadding = createGlobalElement("div");
+ boxPadding.id = "fbBoxPadding";
+ boxPaddingStyle = boxPadding.style;
+ boxPaddingStyle.cssText = inspectPaddingStyle;
+ boxModel.appendChild(boxPadding);
+
+ boxContent = createGlobalElement("div");
+ boxContent.id = "fbBoxContent";
+ boxContentStyle = boxContent.style;
+ boxContentStyle.cssText = inspectContentStyle;
+ boxModel.appendChild(boxContent);
+
+ offlineFragment.appendChild(boxModel);
+};
+
+var destroyBoxModelInspector = function destroyBoxModelInspector()
+{
+ boxModel.parentNode.removeChild(boxModel);
+};
+
+// ************************************************************************************************
+// Section
+
+
+
+
+// ************************************************************************************************
+}});
+
+// Problems in IE
+// FIXED - eval return
+// FIXED - addEventListener problem in IE
+// FIXED doc.createRange?
+//
+// class reserved word
+// test all honza examples in IE6 and IE7
+
+
+/* See license.txt for terms of usage */
+
+( /** @scope s_domplate */ function() {
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+/** @class */
+FBL.DomplateTag = function DomplateTag(tagName)
+{
+ this.tagName = tagName;
+};
+
+/**
+ * @class
+ * @extends FBL.DomplateTag
+ */
+FBL.DomplateEmbed = function DomplateEmbed()
+{
+};
+
+/**
+ * @class
+ * @extends FBL.DomplateTag
+ */
+FBL.DomplateLoop = function DomplateLoop()
+{
+};
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+var DomplateTag = FBL.DomplateTag;
+var DomplateEmbed = FBL.DomplateEmbed;
+var DomplateLoop = FBL.DomplateLoop;
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+var womb = null;
+
+FBL.domplate = function()
+{
+ var lastSubject;
+ for (var i = 0; i < arguments.length; ++i)
+ lastSubject = lastSubject ? copyObject(lastSubject, arguments[i]) : arguments[i];
+
+ for (var name in lastSubject)
+ {
+ var val = lastSubject[name];
+ if (isTag(val))
+ val.tag.subject = lastSubject;
+ }
+
+ return lastSubject;
+};
+
+var domplate = FBL.domplate;
+
+FBL.domplate.context = function(context, fn)
+{
+ var lastContext = domplate.lastContext;
+ domplate.topContext = context;
+ fn.apply(context);
+ domplate.topContext = lastContext;
+};
+
+FBL.TAG = function()
+{
+ var embed = new DomplateEmbed();
+ return embed.merge(arguments);
+};
+
+FBL.FOR = function()
+{
+ var loop = new DomplateLoop();
+ return loop.merge(arguments);
+};
+
+FBL.DomplateTag.prototype =
+{
+ merge: function(args, oldTag)
+ {
+ if (oldTag)
+ this.tagName = oldTag.tagName;
+
+ this.context = oldTag ? oldTag.context : null;
+ this.subject = oldTag ? oldTag.subject : null;
+ this.attrs = oldTag ? copyObject(oldTag.attrs) : {};
+ this.classes = oldTag ? copyObject(oldTag.classes) : {};
+ this.props = oldTag ? copyObject(oldTag.props) : null;
+ this.listeners = oldTag ? copyArray(oldTag.listeners) : null;
+ this.children = oldTag ? copyArray(oldTag.children) : [];
+ this.vars = oldTag ? copyArray(oldTag.vars) : [];
+
+ var attrs = args.length ? args[0] : null;
+ var hasAttrs = typeof(attrs) == "object" && !isTag(attrs);
+
+ this.children = [];
+
+ if (domplate.topContext)
+ this.context = domplate.topContext;
+
+ if (args.length)
+ parseChildren(args, hasAttrs ? 1 : 0, this.vars, this.children);
+
+ if (hasAttrs)
+ this.parseAttrs(attrs);
+
+ return creator(this, DomplateTag);
+ },
+
+ parseAttrs: function(args)
+ {
+ for (var name in args)
+ {
+ var val = parseValue(args[name]);
+ readPartNames(val, this.vars);
+
+ if (name.indexOf("on") == 0)
+ {
+ var eventName = name.substr(2);
+ if (!this.listeners)
+ this.listeners = [];
+ this.listeners.push(eventName, val);
+ }
+ else if (name.indexOf("_") == 0)
+ {
+ var propName = name.substr(1);
+ if (!this.props)
+ this.props = {};
+ this.props[propName] = val;
+ }
+ else if (name.indexOf("$") == 0)
+ {
+ var className = name.substr(1);
+ if (!this.classes)
+ this.classes = {};
+ this.classes[className] = val;
+ }
+ else
+ {
+ if (name == "class" && this.attrs.hasOwnProperty(name) )
+ this.attrs[name] += " " + val;
+ else
+ this.attrs[name] = val;
+ }
+ }
+ },
+
+ compile: function()
+ {
+ if (this.renderMarkup)
+ return;
+
+ this.compileMarkup();
+ this.compileDOM();
+
+ //if (FBTrace.DBG_DOM) FBTrace.sysout("domplate renderMarkup: ", this.renderMarkup);
+ //if (FBTrace.DBG_DOM) FBTrace.sysout("domplate renderDOM:", this.renderDOM);
+ //if (FBTrace.DBG_DOM) FBTrace.sysout("domplate domArgs:", this.domArgs);
+ },
+
+ compileMarkup: function()
+ {
+ this.markupArgs = [];
+ var topBlock = [], topOuts = [], blocks = [], info = {args: this.markupArgs, argIndex: 0};
+
+ this.generateMarkup(topBlock, topOuts, blocks, info);
+ this.addCode(topBlock, topOuts, blocks);
+
+ var fnBlock = ['r=(function (__code__, __context__, __in__, __out__'];
+ for (var i = 0; i < info.argIndex; ++i)
+ fnBlock.push(', s', i);
+ fnBlock.push(') {');
+
+ if (this.subject)
+ fnBlock.push('with (this) {');
+ if (this.context)
+ fnBlock.push('with (__context__) {');
+ fnBlock.push('with (__in__) {');
+
+ fnBlock.push.apply(fnBlock, blocks);
+
+ if (this.subject)
+ fnBlock.push('}');
+ if (this.context)
+ fnBlock.push('}');
+
+ fnBlock.push('}})');
+
+ function __link__(tag, code, outputs, args)
+ {
+ if (!tag || !tag.tag)
+ return;
+
+ tag.tag.compile();
+
+ var tagOutputs = [];
+ var markupArgs = [code, tag.tag.context, args, tagOutputs];
+ markupArgs.push.apply(markupArgs, tag.tag.markupArgs);
+ tag.tag.renderMarkup.apply(tag.tag.subject, markupArgs);
+
+ outputs.push(tag);
+ outputs.push(tagOutputs);
+ }
+
+ function __escape__(value)
+ {
+ function replaceChars(ch)
+ {
+ switch (ch)
+ {
+ case "<":
+ return "<";
+ case ">":
+ return ">";
+ case "&":
+ return "&";
+ case "'":
+ return "'";
+ case '"':
+ return """;
+ }
+ return "?";
+ };
+ return String(value).replace(/[<>&"']/g, replaceChars);
+ }
+
+ function __loop__(iter, outputs, fn)
+ {
+ var iterOuts = [];
+ outputs.push(iterOuts);
+
+ if (iter instanceof Array)
+ iter = new ArrayIterator(iter);
+
+ try
+ {
+ while (1)
+ {
+ var value = iter.next();
+ var itemOuts = [0,0];
+ iterOuts.push(itemOuts);
+ fn.apply(this, [value, itemOuts]);
+ }
+ }
+ catch (exc)
+ {
+ if (exc != StopIteration)
+ throw exc;
+ }
+ }
+
+ var js = fnBlock.join("");
+ var r = null;
+ eval(js);
+ this.renderMarkup = r;
+ },
+
+ getVarNames: function(args)
+ {
+ if (this.vars)
+ args.push.apply(args, this.vars);
+
+ for (var i = 0; i < this.children.length; ++i)
+ {
+ var child = this.children[i];
+ if (isTag(child))
+ child.tag.getVarNames(args);
+ else if (child instanceof Parts)
+ {
+ for (var i = 0; i < child.parts.length; ++i)
+ {
+ if (child.parts[i] instanceof Variable)
+ {
+ var name = child.parts[i].name;
+ var names = name.split(".");
+ args.push(names[0]);
+ }
+ }
+ }
+ }
+ },
+
+ generateMarkup: function(topBlock, topOuts, blocks, info)
+ {
+ topBlock.push(',"<', this.tagName, '"');
+
+ for (var name in this.attrs)
+ {
+ if (name != "class")
+ {
+ var val = this.attrs[name];
+ topBlock.push(', " ', name, '=\\""');
+ addParts(val, ',', topBlock, info, true);
+ topBlock.push(', "\\""');
+ }
+ }
+
+ if (this.listeners)
+ {
+ for (var i = 0; i < this.listeners.length; i += 2)
+ readPartNames(this.listeners[i+1], topOuts);
+ }
+
+ if (this.props)
+ {
+ for (var name in this.props)
+ readPartNames(this.props[name], topOuts);
+ }
+
+ if ( this.attrs.hasOwnProperty("class") || this.classes)
+ {
+ topBlock.push(', " class=\\""');
+ if (this.attrs.hasOwnProperty("class"))
+ addParts(this.attrs["class"], ',', topBlock, info, true);
+ topBlock.push(', " "');
+ for (var name in this.classes)
+ {
+ topBlock.push(', (');
+ addParts(this.classes[name], '', topBlock, info);
+ topBlock.push(' ? "', name, '" + " " : "")');
+ }
+ topBlock.push(', "\\""');
+ }
+ topBlock.push(',">"');
+
+ this.generateChildMarkup(topBlock, topOuts, blocks, info);
+ topBlock.push(',"</', this.tagName, '>"');
+ },
+
+ generateChildMarkup: function(topBlock, topOuts, blocks, info)
+ {
+ for (var i = 0; i < this.children.length; ++i)
+ {
+ var child = this.children[i];
+ if (isTag(child))
+ child.tag.generateMarkup(topBlock, topOuts, blocks, info);
+ else
+ addParts(child, ',', topBlock, info, true);
+ }
+ },
+
+ addCode: function(topBlock, topOuts, blocks)
+ {
+ if (topBlock.length)
+ blocks.push('__code__.push(""', topBlock.join(""), ');');
+ if (topOuts.length)
+ blocks.push('__out__.push(', topOuts.join(","), ');');
+ topBlock.splice(0, topBlock.length);
+ topOuts.splice(0, topOuts.length);
+ },
+
+ addLocals: function(blocks)
+ {
+ var varNames = [];
+ this.getVarNames(varNames);
+
+ var map = {};
+ for (var i = 0; i < varNames.length; ++i)
+ {
+ var name = varNames[i];
+ if ( map.hasOwnProperty(name) )
+ continue;
+
+ map[name] = 1;
+ var names = name.split(".");
+ blocks.push('var ', names[0] + ' = ' + '__in__.' + names[0] + ';');
+ }
+ },
+
+ compileDOM: function()
+ {
+ var path = [];
+ var blocks = [];
+ this.domArgs = [];
+ path.embedIndex = 0;
+ path.loopIndex = 0;
+ path.staticIndex = 0;
+ path.renderIndex = 0;
+ var nodeCount = this.generateDOM(path, blocks, this.domArgs);
+
+ var fnBlock = ['r=(function (root, context, o'];
+
+ for (var i = 0; i < path.staticIndex; ++i)
+ fnBlock.push(', ', 's'+i);
+
+ for (var i = 0; i < path.renderIndex; ++i)
+ fnBlock.push(', ', 'd'+i);
+
+ fnBlock.push(') {');
+ for (var i = 0; i < path.loopIndex; ++i)
+ fnBlock.push('var l', i, ' = 0;');
+ for (var i = 0; i < path.embedIndex; ++i)
+ fnBlock.push('var e', i, ' = 0;');
+
+ if (this.subject)
+ fnBlock.push('with (this) {');
+ if (this.context)
+ fnBlock.push('with (context) {');
+
+ fnBlock.push(blocks.join(""));
+
+ if (this.subject)
+ fnBlock.push('}');
+ if (this.context)
+ fnBlock.push('}');
+
+ fnBlock.push('return ', nodeCount, ';');
+ fnBlock.push('})');
+
+ function __bind__(object, fn)
+ {
+ return function(event) { return fn.apply(object, [event]); };
+ }
+
+ function __link__(node, tag, args)
+ {
+ if (!tag || !tag.tag)
+ return;
+
+ tag.tag.compile();
+
+ var domArgs = [node, tag.tag.context, 0];
+ domArgs.push.apply(domArgs, tag.tag.domArgs);
+ domArgs.push.apply(domArgs, args);
+ //if (FBTrace.DBG_DOM) FBTrace.dumpProperties("domplate__link__ domArgs:", domArgs);
+ return tag.tag.renderDOM.apply(tag.tag.subject, domArgs);
+ }
+
+ var self = this;
+ function __loop__(iter, fn)
+ {
+ var nodeCount = 0;
+ for (var i = 0; i < iter.length; ++i)
+ {
+ iter[i][0] = i;
+ iter[i][1] = nodeCount;
+ nodeCount += fn.apply(this, iter[i]);
+ //if (FBTrace.DBG_DOM) FBTrace.sysout("nodeCount", nodeCount);
+ }
+ return nodeCount;
+ }
+
+ function __path__(parent, offset)
+ {
+ //if (FBTrace.DBG_DOM) FBTrace.sysout("domplate __path__ offset: "+ offset+"\n");
+ var root = parent;
+
+ for (var i = 2; i < arguments.length; ++i)
+ {
+ var index = arguments[i];
+ if (i == 3)
+ index += offset;
+
+ if (index == -1)
+ parent = parent.parentNode;
+ else
+ parent = parent.childNodes[index];
+ }
+
+ //if (FBTrace.DBG_DOM) FBTrace.sysout("domplate: "+arguments[2]+", root: "+ root+", parent: "+ parent+"\n");
+ return parent;
+ }
+
+ var js = fnBlock.join("");
+ //if (FBTrace.DBG_DOM) FBTrace.sysout(js.replace(/(\;|\{)/g, "$1\n"));
+ var r = null;
+ eval(js);
+ this.renderDOM = r;
+ },
+
+ generateDOM: function(path, blocks, args)
+ {
+ if (this.listeners || this.props)
+ this.generateNodePath(path, blocks);
+
+ if (this.listeners)
+ {
+ for (var i = 0; i < this.listeners.length; i += 2)
+ {
+ var val = this.listeners[i+1];
+ var arg = generateArg(val, path, args);
+ //blocks.push('node.addEventListener("', this.listeners[i], '", __bind__(this, ', arg, '), false);');
+ blocks.push('addEvent(node, "', this.listeners[i], '", __bind__(this, ', arg, '), false);');
+ }
+ }
+
+ if (this.props)
+ {
+ for (var name in this.props)
+ {
+ var val = this.props[name];
+ var arg = generateArg(val, path, args);
+ blocks.push('node.', name, ' = ', arg, ';');
+ }
+ }
+
+ this.generateChildDOM(path, blocks, args);
+ return 1;
+ },
+
+ generateNodePath: function(path, blocks)
+ {
+ blocks.push("var node = __path__(root, o");
+ for (var i = 0; i < path.length; ++i)
+ blocks.push(",", path[i]);
+ blocks.push(");");
+ },
+
+ generateChildDOM: function(path, blocks, args)
+ {
+ path.push(0);
+ for (var i = 0; i < this.children.length; ++i)
+ {
+ var child = this.children[i];
+ if (isTag(child))
+ path[path.length-1] += '+' + child.tag.generateDOM(path, blocks, args);
+ else
+ path[path.length-1] += '+1';
+ }
+ path.pop();
+ }
+};
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+FBL.DomplateEmbed.prototype = copyObject(FBL.DomplateTag.prototype,
+/** @lends FBL.DomplateEmbed.prototype */
+{
+ merge: function(args, oldTag)
+ {
+ this.value = oldTag ? oldTag.value : parseValue(args[0]);
+ this.attrs = oldTag ? oldTag.attrs : {};
+ this.vars = oldTag ? copyArray(oldTag.vars) : [];
+
+ var attrs = args[1];
+ for (var name in attrs)
+ {
+ var val = parseValue(attrs[name]);
+ this.attrs[name] = val;
+ readPartNames(val, this.vars);
+ }
+
+ return creator(this, DomplateEmbed);
+ },
+
+ getVarNames: function(names)
+ {
+ if (this.value instanceof Parts)
+ names.push(this.value.parts[0].name);
+
+ if (this.vars)
+ names.push.apply(names, this.vars);
+ },
+
+ generateMarkup: function(topBlock, topOuts, blocks, info)
+ {
+ this.addCode(topBlock, topOuts, blocks);
+
+ blocks.push('__link__(');
+ addParts(this.value, '', blocks, info);
+ blocks.push(', __code__, __out__, {');
+
+ var lastName = null;
+ for (var name in this.attrs)
+ {
+ if (lastName)
+ blocks.push(',');
+ lastName = name;
+
+ var val = this.attrs[name];
+ blocks.push('"', name, '":');
+ addParts(val, '', blocks, info);
+ }
+
+ blocks.push('});');
+ //this.generateChildMarkup(topBlock, topOuts, blocks, info);
+ },
+
+ generateDOM: function(path, blocks, args)
+ {
+ var embedName = 'e'+path.embedIndex++;
+
+ this.generateNodePath(path, blocks);
+
+ var valueName = 'd' + path.renderIndex++;
+ var argsName = 'd' + path.renderIndex++;
+ blocks.push(embedName + ' = __link__(node, ', valueName, ', ', argsName, ');');
+
+ return embedName;
+ }
+});
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+FBL.DomplateLoop.prototype = copyObject(FBL.DomplateTag.prototype,
+/** @lends FBL.DomplateLoop.prototype */
+{
+ merge: function(args, oldTag)
+ {
+ this.varName = oldTag ? oldTag.varName : args[0];
+ this.iter = oldTag ? oldTag.iter : parseValue(args[1]);
+ this.vars = [];
+
+ this.children = oldTag ? copyArray(oldTag.children) : [];
+
+ var offset = Math.min(args.length, 2);
+ parseChildren(args, offset, this.vars, this.children);
+
+ return creator(this, DomplateLoop);
+ },
+
+ getVarNames: function(names)
+ {
+ if (this.iter instanceof Parts)
+ names.push(this.iter.parts[0].name);
+
+ DomplateTag.prototype.getVarNames.apply(this, [names]);
+ },
+
+ generateMarkup: function(topBlock, topOuts, blocks, info)
+ {
+ this.addCode(topBlock, topOuts, blocks);
+
+ var iterName;
+ if (this.iter instanceof Parts)
+ {
+ var part = this.iter.parts[0];
+ iterName = part.name;
+
+ if (part.format)
+ {
+ for (var i = 0; i < part.format.length; ++i)
+ iterName = part.format[i] + "(" + iterName + ")";
+ }
+ }
+ else
+ iterName = this.iter;
+
+ blocks.push('__loop__.apply(this, [', iterName, ', __out__, function(', this.varName, ', __out__) {');
+ this.generateChildMarkup(topBlock, topOuts, blocks, info);
+ this.addCode(topBlock, topOuts, blocks);
+ blocks.push('}]);');
+ },
+
+ generateDOM: function(path, blocks, args)
+ {
+ var iterName = 'd'+path.renderIndex++;
+ var counterName = 'i'+path.loopIndex;
+ var loopName = 'l'+path.loopIndex++;
+
+ if (!path.length)
+ path.push(-1, 0);
+
+ var preIndex = path.renderIndex;
+ path.renderIndex = 0;
+
+ var nodeCount = 0;
+
+ var subBlocks = [];
+ var basePath = path[path.length-1];
+ for (var i = 0; i < this.children.length; ++i)
+ {
+ path[path.length-1] = basePath+'+'+loopName+'+'+nodeCount;
+
+ var child = this.children[i];
+ if (isTag(child))
+ nodeCount += '+' + child.tag.generateDOM(path, subBlocks, args);
+ else
+ nodeCount += '+1';
+ }
+
+ path[path.length-1] = basePath+'+'+loopName;
+
+ blocks.push(loopName,' = __loop__.apply(this, [', iterName, ', function(', counterName,',',loopName);
+ for (var i = 0; i < path.renderIndex; ++i)
+ blocks.push(',d'+i);
+ blocks.push(') {');
+ blocks.push(subBlocks.join(""));
+ blocks.push('return ', nodeCount, ';');
+ blocks.push('}]);');
+
+ path.renderIndex = preIndex;
+
+ return loopName;
+ }
+});
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+/** @class */
+function Variable(name, format)
+{
+ this.name = name;
+ this.format = format;
+}
+
+/** @class */
+function Parts(parts)
+{
+ this.parts = parts;
+}
+
+// ************************************************************************************************
+
+function parseParts(str)
+{
+ var re = /\$([_A-Za-z][_A-Za-z0-9.|]*)/g;
+ var index = 0;
+ var parts = [];
+
+ var m;
+ while (m = re.exec(str))
+ {
+ var pre = str.substr(index, (re.lastIndex-m[0].length)-index);
+ if (pre)
+ parts.push(pre);
+
+ var expr = m[1].split("|");
+ parts.push(new Variable(expr[0], expr.slice(1)));
+ index = re.lastIndex;
+ }
+
+ if (!index)
+ return str;
+
+ var post = str.substr(index);
+ if (post)
+ parts.push(post);
+
+ return new Parts(parts);
+}
+
+function parseValue(val)
+{
+ return typeof(val) == 'string' ? parseParts(val) : val;
+}
+
+function parseChildren(args, offset, vars, children)
+{
+ for (var i = offset; i < args.length; ++i)
+ {
+ var val = parseValue(args[i]);
+ children.push(val);
+ readPartNames(val, vars);
+ }
+}
+
+function readPartNames(val, vars)
+{
+ if (val instanceof Parts)
+ {
+ for (var i = 0; i < val.parts.length; ++i)
+ {
+ var part = val.parts[i];
+ if (part instanceof Variable)
+ vars.push(part.name);
+ }
+ }
+}
+
+function generateArg(val, path, args)
+{
+ if (val instanceof Parts)
+ {
+ var vals = [];
+ for (var i = 0; i < val.parts.length; ++i)
+ {
+ var part = val.parts[i];
+ if (part instanceof Variable)
+ {
+ var varName = 'd'+path.renderIndex++;
+ if (part.format)
+ {
+ for (var j = 0; j < part.format.length; ++j)
+ varName = part.format[j] + '(' + varName + ')';
+ }
+
+ vals.push(varName);
+ }
+ else
+ vals.push('"'+part.replace(/"/g, '\\"')+'"');
+ }
+
+ return vals.join('+');
+ }
+ else
+ {
+ args.push(val);
+ return 's' + path.staticIndex++;
+ }
+}
+
+function addParts(val, delim, block, info, escapeIt)
+{
+ var vals = [];
+ if (val instanceof Parts)
+ {
+ for (var i = 0; i < val.parts.length; ++i)
+ {
+ var part = val.parts[i];
+ if (part instanceof Variable)
+ {
+ var partName = part.name;
+ if (part.format)
+ {
+ for (var j = 0; j < part.format.length; ++j)
+ partName = part.format[j] + "(" + partName + ")";
+ }
+
+ if (escapeIt)
+ vals.push("__escape__(" + partName + ")");
+ else
+ vals.push(partName);
+ }
+ else
+ vals.push('"'+ part + '"');
+ }
+ }
+ else if (isTag(val))
+ {
+ info.args.push(val);
+ vals.push('s'+info.argIndex++);
+ }
+ else
+ vals.push('"'+ val + '"');
+
+ var parts = vals.join(delim);
+ if (parts)
+ block.push(delim, parts);
+}
+
+function isTag(obj)
+{
+ return (typeof(obj) == "function" || obj instanceof Function) && !!obj.tag;
+}
+
+function creator(tag, cons)
+{
+ var fn = new Function(
+ "var tag = arguments.callee.tag;" +
+ "var cons = arguments.callee.cons;" +
+ "var newTag = new cons();" +
+ "return newTag.merge(arguments, tag);");
+
+ fn.tag = tag;
+ fn.cons = cons;
+ extend(fn, Renderer);
+
+ return fn;
+}
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+function copyArray(oldArray)
+{
+ var ary = [];
+ if (oldArray)
+ for (var i = 0; i < oldArray.length; ++i)
+ ary.push(oldArray[i]);
+ return ary;
+}
+
+function copyObject(l, r)
+{
+ var m = {};
+ extend(m, l);
+ extend(m, r);
+ return m;
+}
+
+function extend(l, r)
+{
+ for (var n in r)
+ l[n] = r[n];
+}
+
+function addEvent(object, name, handler)
+{
+ if (document.all)
+ object.attachEvent("on"+name, handler);
+ else
+ object.addEventListener(name, handler, false);
+}
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+/** @class */
+function ArrayIterator(array)
+{
+ var index = -1;
+
+ this.next = function()
+ {
+ if (++index >= array.length)
+ throw StopIteration;
+
+ return array[index];
+ };
+}
+
+/** @class */
+function StopIteration() {}
+
+FBL.$break = function()
+{
+ throw StopIteration;
+};
+
+// ************************************************************************************************
+
+/** @namespace */
+var Renderer =
+{
+ renderHTML: function(args, outputs, self)
+ {
+ var code = [];
+ var markupArgs = [code, this.tag.context, args, outputs];
+ markupArgs.push.apply(markupArgs, this.tag.markupArgs);
+ this.tag.renderMarkup.apply(self ? self : this.tag.subject, markupArgs);
+ return code.join("");
+ },
+
+ insertRows: function(args, before, self)
+ {
+ this.tag.compile();
+
+ var outputs = [];
+ var html = this.renderHTML(args, outputs, self);
+
+ var doc = before.ownerDocument;
+ var div = doc.createElement("div");
+ div.innerHTML = "<table><tbody>"+html+"</tbody></table>";
+
+ var tbody = div.firstChild.firstChild;
+ var parent = before.tagName == "TR" ? before.parentNode : before;
+ var after = before.tagName == "TR" ? before.nextSibling : null;
+
+ var firstRow = tbody.firstChild, lastRow;
+ while (tbody.firstChild)
+ {
+ lastRow = tbody.firstChild;
+ if (after)
+ parent.insertBefore(lastRow, after);
+ else
+ parent.appendChild(lastRow);
+ }
+
+ var offset = 0;
+ if (before.tagName == "TR")
+ {
+ var node = firstRow.parentNode.firstChild;
+ for (; node && node != firstRow; node = node.nextSibling)
+ ++offset;
+ }
+
+ var domArgs = [firstRow, this.tag.context, offset];
+ domArgs.push.apply(domArgs, this.tag.domArgs);
+ domArgs.push.apply(domArgs, outputs);
+
+ this.tag.renderDOM.apply(self ? self : this.tag.subject, domArgs);
+ return [firstRow, lastRow];
+ },
+
+ insertBefore: function(args, before, self)
+ {
+ return this.insertNode(args, before.ownerDocument, before, false, self);
+ },
+
+ insertAfter: function(args, after, self)
+ {
+ return this.insertNode(args, after.ownerDocument, after, true, self);
+ },
+
+ insertNode: function(args, doc, element, isAfter, self)
+ {
+ if (!args)
+ args = {};
+
+ this.tag.compile();
+
+ var outputs = [];
+ var html = this.renderHTML(args, outputs, self);
+
+ //if (FBTrace.DBG_DOM)
+ // FBTrace.sysout("domplate.insertNode html: "+html+"\n");
+
+ var doc = element.ownerDocument;
+ if (!womb || womb.ownerDocument != doc)
+ womb = doc.createElement("div");
+
+ womb.innerHTML = html;
+
+ var root = womb.firstChild;
+ if (isAfter)
+ {
+ while (womb.firstChild)
+ if (element.nextSibling)
+ element.parentNode.insertBefore(womb.firstChild, element.nextSibling);
+ else
+ element.parentNode.appendChild(womb.firstChild);
+ }
+ else
+ {
+ while (womb.lastChild)
+ element.parentNode.insertBefore(womb.lastChild, element);
+ }
+
+ var domArgs = [root, this.tag.context, 0];
+ domArgs.push.apply(domArgs, this.tag.domArgs);
+ domArgs.push.apply(domArgs, outputs);
+
+ //if (FBTrace.DBG_DOM)
+ // FBTrace.sysout("domplate.insertNode domArgs:", domArgs);
+ this.tag.renderDOM.apply(self ? self : this.tag.subject, domArgs);
+
+ return root;
+ },
+ /**/
+
+ /*
+ insertAfter: function(args, before, self)
+ {
+ this.tag.compile();
+
+ var outputs = [];
+ var html = this.renderHTML(args, outputs, self);
+
+ var doc = before.ownerDocument;
+ if (!womb || womb.ownerDocument != doc)
+ womb = doc.createElement("div");
+
+ womb.innerHTML = html;
+
+ var root = womb.firstChild;
+ while (womb.firstChild)
+ if (before.nextSibling)
+ before.parentNode.insertBefore(womb.firstChild, before.nextSibling);
+ else
+ before.parentNode.appendChild(womb.firstChild);
+
+ var domArgs = [root, this.tag.context, 0];
+ domArgs.push.apply(domArgs, this.tag.domArgs);
+ domArgs.push.apply(domArgs, outputs);
+
+ this.tag.renderDOM.apply(self ? self : (this.tag.subject ? this.tag.subject : null),
+ domArgs);
+
+ return root;
+ },
+ /**/
+
+ replace: function(args, parent, self)
+ {
+ this.tag.compile();
+
+ var outputs = [];
+ var html = this.renderHTML(args, outputs, self);
+
+ var root;
+ if (parent.nodeType == 1)
+ {
+ parent.innerHTML = html;
+ root = parent.firstChild;
+ }
+ else
+ {
+ if (!parent || parent.nodeType != 9)
+ parent = document;
+
+ if (!womb || womb.ownerDocument != parent)
+ womb = parent.createElement("div");
+ womb.innerHTML = html;
+
+ root = womb.firstChild;
+ //womb.removeChild(root);
+ }
+
+ var domArgs = [root, this.tag.context, 0];
+ domArgs.push.apply(domArgs, this.tag.domArgs);
+ domArgs.push.apply(domArgs, outputs);
+ this.tag.renderDOM.apply(self ? self : this.tag.subject, domArgs);
+
+ return root;
+ },
+
+ append: function(args, parent, self)
+ {
+ this.tag.compile();
+
+ var outputs = [];
+ var html = this.renderHTML(args, outputs, self);
+ //if (FBTrace.DBG_DOM) FBTrace.sysout("domplate.append html: "+html+"\n");
+
+ if (!womb || womb.ownerDocument != parent.ownerDocument)
+ womb = parent.ownerDocument.createElement("div");
+ womb.innerHTML = html;
+
+ // TODO: xxxpedro domplate port to Firebug
+ var root = womb.firstChild;
+ while (womb.firstChild)
+ parent.appendChild(womb.firstChild);
+
+ // clearing element reference to avoid reference error in IE8 when switching contexts
+ womb = null;
+
+ var domArgs = [root, this.tag.context, 0];
+ domArgs.push.apply(domArgs, this.tag.domArgs);
+ domArgs.push.apply(domArgs, outputs);
+
+ //if (FBTrace.DBG_DOM) FBTrace.dumpProperties("domplate append domArgs:", domArgs);
+ this.tag.renderDOM.apply(self ? self : this.tag.subject, domArgs);
+
+ return root;
+ }
+};
+
+// ************************************************************************************************
+
+function defineTags()
+{
+ for (var i = 0; i < arguments.length; ++i)
+ {
+ var tagName = arguments[i];
+ var fn = new Function("var newTag = new arguments.callee.DomplateTag('"+tagName+"'); return newTag.merge(arguments);");
+ fn.DomplateTag = DomplateTag;
+
+ var fnName = tagName.toUpperCase();
+ FBL[fnName] = fn;
+ }
+}
+
+defineTags(
+ "a", "button", "br", "canvas", "code", "col", "colgroup", "div", "fieldset", "form", "h1", "h2", "h3", "hr",
+ "img", "input", "label", "legend", "li", "ol", "optgroup", "option", "p", "pre", "select",
+ "span", "strong", "table", "tbody", "td", "textarea", "tfoot", "th", "thead", "tr", "tt", "ul", "iframe"
+);
+
+})();
+
+
+/* See license.txt for terms of usage */
+
+var FirebugReps = FBL.ns(function() { with (FBL) {
+
+
+// ************************************************************************************************
+// Common Tags
+
+var OBJECTBOX = this.OBJECTBOX =
+ SPAN({"class": "objectBox objectBox-$className"});
+
+var OBJECTBLOCK = this.OBJECTBLOCK =
+ DIV({"class": "objectBox objectBox-$className"});
+
+var OBJECTLINK = this.OBJECTLINK = isIE6 ? // IE6 object link representation
+ A({
+ "class": "objectLink objectLink-$className a11yFocus",
+ href: "javascript:void(0)",
+ // workaround to show XPath (a better approach would use the tooltip on mouseover,
+ // so the XPath information would be calculated dynamically, but we need to create
+ // a tooltip class/wrapper around Menu or InfoTip)
+ title: "$object|FBL.getElementXPath",
+ _repObject: "$object"
+ })
+ : // Other browsers
+ A({
+ "class": "objectLink objectLink-$className a11yFocus",
+ // workaround to show XPath (a better approach would use the tooltip on mouseover,
+ // so the XPath information would be calculated dynamically, but we need to create
+ // a tooltip class/wrapper around Menu or InfoTip)
+ title: "$object|FBL.getElementXPath",
+ _repObject: "$object"
+ });
+
+
+// ************************************************************************************************
+
+this.Undefined = domplate(Firebug.Rep,
+{
+ tag: OBJECTBOX("undefined"),
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+ className: "undefined",
+
+ supportsObject: function(object, type)
+ {
+ return type == "undefined";
+ }
+});
+
+// ************************************************************************************************
+
+this.Null = domplate(Firebug.Rep,
+{
+ tag: OBJECTBOX("null"),
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+ className: "null",
+
+ supportsObject: function(object, type)
+ {
+ return object == null;
+ }
+});
+
+// ************************************************************************************************
+
+this.Nada = domplate(Firebug.Rep,
+{
+ tag: SPAN(""),
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+ className: "nada"
+});
+
+// ************************************************************************************************
+
+this.Number = domplate(Firebug.Rep,
+{
+ tag: OBJECTBOX("$object"),
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+ className: "number",
+
+ supportsObject: function(object, type)
+ {
+ return type == "boolean" || type == "number";
+ }
+});
+
+// ************************************************************************************************
+
+this.String = domplate(Firebug.Rep,
+{
+ tag: OBJECTBOX(""$object""),
+
+ shortTag: OBJECTBOX(""$object|cropString""),
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+ className: "string",
+
+ supportsObject: function(object, type)
+ {
+ return type == "string";
+ }
+});
+
+// ************************************************************************************************
+
+this.Text = domplate(Firebug.Rep,
+{
+ tag: OBJECTBOX("$object"),
+
+ shortTag: OBJECTBOX("$object|cropString"),
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+ className: "text"
+});
+
+// ************************************************************************************************
+
+this.Caption = domplate(Firebug.Rep,
+{
+ tag: SPAN({"class": "caption"}, "$object")
+});
+
+// ************************************************************************************************
+
+this.Warning = domplate(Firebug.Rep,
+{
+ tag: DIV({"class": "warning focusRow", role : 'listitem'}, "$object|STR")
+});
+
+// ************************************************************************************************
+
+this.Func = domplate(Firebug.Rep,
+{
+ tag:
+ OBJECTLINK("$object|summarizeFunction"),
+
+ summarizeFunction: function(fn)
+ {
+ var fnRegex = /function ([^(]+\([^)]*\)) \{/;
+ var fnText = safeToString(fn);
+
+ var m = fnRegex.exec(fnText);
+ return m ? m[1] : "function()";
+ },
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+ copySource: function(fn)
+ {
+ copyToClipboard(safeToString(fn));
+ },
+
+ monitor: function(fn, script, monitored)
+ {
+ if (monitored)
+ Firebug.Debugger.unmonitorScript(fn, script, "monitor");
+ else
+ Firebug.Debugger.monitorScript(fn, script, "monitor");
+ },
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+ className: "function",
+
+ supportsObject: function(object, type)
+ {
+ return isFunction(object);
+ },
+
+ inspectObject: function(fn, context)
+ {
+ var sourceLink = findSourceForFunction(fn, context);
+ if (sourceLink)
+ Firebug.chrome.select(sourceLink);
+ if (FBTrace.DBG_FUNCTION_NAME)
+ FBTrace.sysout("reps.function.inspectObject selected sourceLink is ", sourceLink);
+ },
+
+ getTooltip: function(fn, context)
+ {
+ var script = findScriptForFunctionInContext(context, fn);
+ if (script)
+ return $STRF("Line", [normalizeURL(script.fileName), script.baseLineNumber]);
+ else
+ if (fn.toString)
+ return fn.toString();
+ },
+
+ getTitle: function(fn, context)
+ {
+ var name = fn.name ? fn.name : "function";
+ return name + "()";
+ },
+
+ getContextMenuItems: function(fn, target, context, script)
+ {
+ if (!script)
+ script = findScriptForFunctionInContext(context, fn);
+ if (!script)
+ return;
+
+ var scriptInfo = getSourceFileAndLineByScript(context, script);
+ var monitored = scriptInfo ? fbs.isMonitored(scriptInfo.sourceFile.href, scriptInfo.lineNo) : false;
+
+ var name = script ? getFunctionName(script, context) : fn.name;
+ return [
+ {label: "CopySource", command: bindFixed(this.copySource, this, fn) },
+ "-",
+ {label: $STRF("ShowCallsInConsole", [name]), nol10n: true,
+ type: "checkbox", checked: monitored,
+ command: bindFixed(this.monitor, this, fn, script, monitored) }
+ ];
+ }
+});
+
+// ************************************************************************************************
+/*
+this.jsdScript = domplate(Firebug.Rep,
+{
+ copySource: function(script)
+ {
+ var fn = script.functionObject.getWrappedValue();
+ return FirebugReps.Func.copySource(fn);
+ },
+
+ monitor: function(fn, script, monitored)
+ {
+ fn = script.functionObject.getWrappedValue();
+ return FirebugReps.Func.monitor(fn, script, monitored);
+ },
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+ className: "jsdScript",
+ inspectable: false,
+
+ supportsObject: function(object, type)
+ {
+ return object instanceof jsdIScript;
+ },
+
+ inspectObject: function(script, context)
+ {
+ var sourceLink = getSourceLinkForScript(script, context);
+ if (sourceLink)
+ Firebug.chrome.select(sourceLink);
+ },
+
+ getRealObject: function(script, context)
+ {
+ return script;
+ },
+
+ getTooltip: function(script)
+ {
+ return $STRF("jsdIScript", [script.tag]);
+ },
+
+ getTitle: function(script, context)
+ {
+ var fn = script.functionObject.getWrappedValue();
+ return FirebugReps.Func.getTitle(fn, context);
+ },
+
+ getContextMenuItems: function(script, target, context)
+ {
+ var fn = script.functionObject.getWrappedValue();
+
+ var scriptInfo = getSourceFileAndLineByScript(context, script);
+ var monitored = scriptInfo ? fbs.isMonitored(scriptInfo.sourceFile.href, scriptInfo.lineNo) : false;
+
+ var name = getFunctionName(script, context);
+
+ return [
+ {label: "CopySource", command: bindFixed(this.copySource, this, script) },
+ "-",
+ {label: $STRF("ShowCallsInConsole", [name]), nol10n: true,
+ type: "checkbox", checked: monitored,
+ command: bindFixed(this.monitor, this, fn, script, monitored) }
+ ];
+ }
+});
+/**/
+//************************************************************************************************
+
+this.Obj = domplate(Firebug.Rep,
+{
+ tag:
+ OBJECTLINK(
+ SPAN({"class": "objectTitle"}, "$object|getTitle "),
+
+ SPAN({"class": "objectProps"},
+ SPAN({"class": "objectLeftBrace", role: "presentation"}, "{"),
+ FOR("prop", "$object|propIterator",
+ SPAN({"class": "objectPropName", role: "presentation"}, "$prop.name"),
+ SPAN({"class": "objectEqual", role: "presentation"}, "$prop.equal"),
+ TAG("$prop.tag", {object: "$prop.object"}),
+ SPAN({"class": "objectComma", role: "presentation"}, "$prop.delim")
+ ),
+ SPAN({"class": "objectRightBrace"}, "}")
+ )
+ ),
+
+ propNumberTag:
+ SPAN({"class": "objectProp-number"}, "$object"),
+
+ propStringTag:
+ SPAN({"class": "objectProp-string"}, ""$object""),
+
+ propObjectTag:
+ SPAN({"class": "objectProp-object"}, "$object"),
+
+ propIterator: function (object)
+ {
+ ///Firebug.ObjectShortIteratorMax;
+ var maxLength = 55; // default max length for long representation
+
+ if (!object)
+ return [];
+
+ var props = [];
+ var length = 0;
+
+ var numProperties = 0;
+ var numPropertiesShown = 0;
+ var maxLengthReached = false;
+
+ var lib = this;
+
+ var propRepsMap =
+ {
+ "boolean": this.propNumberTag,
+ "number": this.propNumberTag,
+ "string": this.propStringTag,
+ "object": this.propObjectTag
+ };
+
+ try
+ {
+ var title = Firebug.Rep.getTitle(object);
+ length += title.length;
+
+ for (var name in object)
+ {
+ var value;
+ try
+ {
+ value = object[name];
+ }
+ catch (exc)
+ {
+ continue;
+ }
+
+ var type = typeof(value);
+ if (type == "boolean" ||
+ type == "number" ||
+ (type == "string" && value) ||
+ (type == "object" && value && value.toString))
+ {
+ var tag = propRepsMap[type];
+
+ var value = (type == "object") ?
+ Firebug.getRep(value).getTitle(value) :
+ value + "";
+
+ length += name.length + value.length + 4;
+
+ if (length <= maxLength)
+ {
+ props.push({
+ tag: tag,
+ name: name,
+ object: value,
+ equal: "=",
+ delim: ", "
+ });
+
+ numPropertiesShown++;
+ }
+ else
+ maxLengthReached = true;
+
+ }
+
+ numProperties++;
+
+ if (maxLengthReached && numProperties > numPropertiesShown)
+ break;
+ }
+
+ if (numProperties > numPropertiesShown)
+ {
+ props.push({
+ object: "...", //xxxHonza localization
+ tag: FirebugReps.Caption.tag,
+ name: "",
+ equal:"",
+ delim:""
+ });
+ }
+ else if (props.length > 0)
+ {
+ props[props.length-1].delim = '';
+ }
+ }
+ catch (exc)
+ {
+ // Sometimes we get exceptions when trying to read from certain objects, like
+ // StorageList, but don't let that gum up the works
+ // XXXjjb also History.previous fails because object is a web-page object which does not have
+ // permission to read the history
+ }
+ return props;
+ },
+
+ fb_1_6_propIterator: function (object, max)
+ {
+ max = max || 3;
+ if (!object)
+ return [];
+
+ var props = [];
+ var len = 0, count = 0;
+
+ try
+ {
+ for (var name in object)
+ {
+ var value;
+ try
+ {
+ value = object[name];
+ }
+ catch (exc)
+ {
+ continue;
+ }
+
+ var t = typeof(value);
+ if (t == "boolean" || t == "number" || (t == "string" && value)
+ || (t == "object" && value && value.toString))
+ {
+ var rep = Firebug.getRep(value);
+ var tag = rep.shortTag || rep.tag;
+ if (t == "object")
+ {
+ value = rep.getTitle(value);
+ tag = rep.titleTag;
+ }
+ count++;
+ if (count <= max)
+ props.push({tag: tag, name: name, object: value, equal: "=", delim: ", "});
+ else
+ break;
+ }
+ }
+ if (count > max)
+ {
+ props[Math.max(1,max-1)] = {
+ object: "more...", //xxxHonza localization
+ tag: FirebugReps.Caption.tag,
+ name: "",
+ equal:"",
+ delim:""
+ };
+ }
+ else if (props.length > 0)
+ {
+ props[props.length-1].delim = '';
+ }
+ }
+ catch (exc)
+ {
+ // Sometimes we get exceptions when trying to read from certain objects, like
+ // StorageList, but don't let that gum up the works
+ // XXXjjb also History.previous fails because object is a web-page object which does not have
+ // permission to read the history
+ }
+ return props;
+ },
+
+ /*
+ propIterator: function (object)
+ {
+ if (!object)
+ return [];
+
+ var props = [];
+ var len = 0;
+
+ try
+ {
+ for (var name in object)
+ {
+ var val;
+ try
+ {
+ val = object[name];
+ }
+ catch (exc)
+ {
+ continue;
+ }
+
+ var t = typeof val;
+ if (t == "boolean" || t == "number" || (t == "string" && val)
+ || (t == "object" && !isFunction(val) && val && val.toString))
+ {
+ var title = (t == "object")
+ ? Firebug.getRep(val).getTitle(val)
+ : val+"";
+
+ len += name.length + title.length + 1;
+ if (len < 50)
+ props.push({name: name, value: title});
+ else
+ break;
+ }
+ }
+ }
+ catch (exc)
+ {
+ // Sometimes we get exceptions when trying to read from certain objects, like
+ // StorageList, but don't let that gum up the works
+ // XXXjjb also History.previous fails because object is a web-page object which does not have
+ // permission to read the history
+ }
+
+ return props;
+ },
+ /**/
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+ className: "object",
+
+ supportsObject: function(object, type)
+ {
+ return true;
+ }
+});
+
+
+// ************************************************************************************************
+
+this.Arr = domplate(Firebug.Rep,
+{
+ tag:
+ OBJECTBOX({_repObject: "$object"},
+ SPAN({"class": "arrayLeftBracket", role : "presentation"}, "["),
+ FOR("item", "$object|arrayIterator",
+ TAG("$item.tag", {object: "$item.object"}),
+ SPAN({"class": "arrayComma", role : "presentation"}, "$item.delim")
+ ),
+ SPAN({"class": "arrayRightBracket", role : "presentation"}, "]")
+ ),
+
+ shortTag:
+ OBJECTBOX({_repObject: "$object"},
+ SPAN({"class": "arrayLeftBracket", role : "presentation"}, "["),
+ FOR("item", "$object|shortArrayIterator",
+ TAG("$item.tag", {object: "$item.object"}),
+ SPAN({"class": "arrayComma", role : "presentation"}, "$item.delim")
+ ),
+ // TODO: xxxpedro - confirm this on Firebug
+ //FOR("prop", "$object|shortPropIterator",
+ // " $prop.name=",
+ // SPAN({"class": "objectPropValue"}, "$prop.value|cropString")
+ //),
+ SPAN({"class": "arrayRightBracket"}, "]")
+ ),
+
+ arrayIterator: function(array)
+ {
+ var items = [];
+ for (var i = 0; i < array.length; ++i)
+ {
+ var value = array[i];
+ var rep = Firebug.getRep(value);
+ var tag = rep.shortTag ? rep.shortTag : rep.tag;
+ var delim = (i == array.length-1 ? "" : ", ");
+
+ items.push({object: value, tag: tag, delim: delim});
+ }
+
+ return items;
+ },
+
+ shortArrayIterator: function(array)
+ {
+ var items = [];
+ for (var i = 0; i < array.length && i < 3; ++i)
+ {
+ var value = array[i];
+ var rep = Firebug.getRep(value);
+ var tag = rep.shortTag ? rep.shortTag : rep.tag;
+ var delim = (i == array.length-1 ? "" : ", ");
+
+ items.push({object: value, tag: tag, delim: delim});
+ }
+
+ if (array.length > 3)
+ items.push({object: (array.length-3) + " more...", tag: FirebugReps.Caption.tag, delim: ""});
+
+ return items;
+ },
+
+ shortPropIterator: this.Obj.propIterator,
+
+ getItemIndex: function(child)
+ {
+ var arrayIndex = 0;
+ for (child = child.previousSibling; child; child = child.previousSibling)
+ {
+ if (child.repObject)
+ ++arrayIndex;
+ }
+ return arrayIndex;
+ },
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+ className: "array",
+
+ supportsObject: function(object)
+ {
+ return this.isArray(object);
+ },
+
+ // http://code.google.com/p/fbug/issues/detail?id=874
+ // BEGIN Yahoo BSD Source (modified here) YAHOO.lang.isArray, YUI 2.2.2 June 2007
+ isArray: function(obj) {
+ try {
+ if (!obj)
+ return false;
+ else if (isIE && !isFunction(obj) && typeof obj == "object" && isFinite(obj.length) && obj.nodeType != 8)
+ return true;
+ else if (isFinite(obj.length) && isFunction(obj.splice))
+ return true;
+ else if (isFinite(obj.length) && isFunction(obj.callee)) // arguments
+ return true;
+ else if (instanceOf(obj, "HTMLCollection"))
+ return true;
+ else if (instanceOf(obj, "NodeList"))
+ return true;
+ else
+ return false;
+ }
+ catch(exc)
+ {
+ if (FBTrace.DBG_ERRORS)
+ {
+ FBTrace.sysout("isArray FAILS:", exc); /* Something weird: without the try/catch, OOM, with no exception?? */
+ FBTrace.sysout("isArray Fails on obj", obj);
+ }
+ }
+
+ return false;
+ },
+ // END Yahoo BSD SOURCE See license below.
+
+ getTitle: function(object, context)
+ {
+ return "[" + object.length + "]";
+ }
+});
+
+// ************************************************************************************************
+
+this.Property = domplate(Firebug.Rep,
+{
+ supportsObject: function(object)
+ {
+ return object instanceof Property;
+ },
+
+ getRealObject: function(prop, context)
+ {
+ return prop.object[prop.name];
+ },
+
+ getTitle: function(prop, context)
+ {
+ return prop.name;
+ }
+});
+
+// ************************************************************************************************
+
+this.NetFile = domplate(this.Obj,
+{
+ supportsObject: function(object)
+ {
+ return object instanceof Firebug.NetFile;
+ },
+
+ browseObject: function(file, context)
+ {
+ openNewTab(file.href);
+ return true;
+ },
+
+ getRealObject: function(file, context)
+ {
+ return null;
+ }
+});
+
+// ************************************************************************************************
+
+this.Except = domplate(Firebug.Rep,
+{
+ tag:
+ OBJECTBOX({_repObject: "$object"}, "$object.message"),
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+ className: "exception",
+
+ supportsObject: function(object)
+ {
+ return object instanceof ErrorCopy;
+ }
+});
+
+
+// ************************************************************************************************
+
+this.Element = domplate(Firebug.Rep,
+{
+ tag:
+ OBJECTLINK(
+ "<",
+ SPAN({"class": "nodeTag"}, "$object.nodeName|toLowerCase"),
+ FOR("attr", "$object|attrIterator",
+ " $attr.nodeName="", SPAN({"class": "nodeValue"}, "$attr.nodeValue"), """
+ ),
+ ">"
+ ),
+
+ shortTag:
+ OBJECTLINK(
+ SPAN({"class": "$object|getVisible"},
+ SPAN({"class": "selectorTag"}, "$object|getSelectorTag"),
+ SPAN({"class": "selectorId"}, "$object|getSelectorId"),
+ SPAN({"class": "selectorClass"}, "$object|getSelectorClass"),
+ SPAN({"class": "selectorValue"}, "$object|getValue")
+ )
+ ),
+
+ getVisible: function(elt)
+ {
+ return isVisible(elt) ? "" : "selectorHidden";
+ },
+
+ getSelectorTag: function(elt)
+ {
+ return elt.nodeName.toLowerCase();
+ },
+
+ getSelectorId: function(elt)
+ {
+ return elt.id ? "#" + elt.id : "";
+ },
+
+ getSelectorClass: function(elt)
+ {
+ return elt.className ? "." + elt.className.split(" ")[0] : "";
+ },
+
+ getValue: function(elt)
+ {
+ // TODO: xxxpedro
+ return "";
+ var value;
+ if (elt instanceof HTMLImageElement)
+ value = getFileName(elt.src);
+ else if (elt instanceof HTMLAnchorElement)
+ value = getFileName(elt.href);
+ else if (elt instanceof HTMLInputElement)
+ value = elt.value;
+ else if (elt instanceof HTMLFormElement)
+ value = getFileName(elt.action);
+ else if (elt instanceof HTMLScriptElement)
+ value = getFileName(elt.src);
+
+ return value ? " " + cropString(value, 20) : "";
+ },
+
+ attrIterator: function(elt)
+ {
+ var attrs = [];
+ var idAttr, classAttr;
+ if (elt.attributes)
+ {
+ for (var i = 0; i < elt.attributes.length; ++i)
+ {
+ var attr = elt.attributes[i];
+
+ // we must check if the attribute is specified otherwise IE will show them
+ if (!attr.specified || attr.nodeName && attr.nodeName.indexOf("firebug-") != -1)
+ continue;
+ else if (attr.nodeName == "id")
+ idAttr = attr;
+ else if (attr.nodeName == "class")
+ classAttr = attr;
+ else if (attr.nodeName == "style")
+ attrs.push({
+ nodeName: attr.nodeName,
+ nodeValue: attr.nodeValue ||
+ // IE won't recognize the attr.nodeValue of <style> nodes ...
+ // and will return CSS property names in upper case, so we need to convert them
+ elt.style.cssText.replace(/([^\s]+)\s*:/g,
+ function(m,g){return g.toLowerCase()+":"})
+ });
+ else
+ attrs.push(attr);
+ }
+ }
+ if (classAttr)
+ attrs.splice(0, 0, classAttr);
+ if (idAttr)
+ attrs.splice(0, 0, idAttr);
+
+ return attrs;
+ },
+
+ shortAttrIterator: function(elt)
+ {
+ var attrs = [];
+ if (elt.attributes)
+ {
+ for (var i = 0; i < elt.attributes.length; ++i)
+ {
+ var attr = elt.attributes[i];
+ if (attr.nodeName == "id" || attr.nodeName == "class")
+ attrs.push(attr);
+ }
+ }
+
+ return attrs;
+ },
+
+ getHidden: function(elt)
+ {
+ return isVisible(elt) ? "" : "nodeHidden";
+ },
+
+ getXPath: function(elt)
+ {
+ return getElementTreeXPath(elt);
+ },
+
+ // TODO: xxxpedro remove this?
+ getNodeText: function(element)
+ {
+ var text = element.textContent;
+ if (Firebug.showFullTextNodes)
+ return text;
+ else
+ return cropString(text, 50);
+ },
+ /**/
+
+ getNodeTextGroups: function(element)
+ {
+ var text = element.textContent;
+ if (!Firebug.showFullTextNodes)
+ {
+ text=cropString(text,50);
+ }
+
+ var escapeGroups=[];
+
+ if (Firebug.showTextNodesWithWhitespace)
+ escapeGroups.push({
+ 'group': 'whitespace',
+ 'class': 'nodeWhiteSpace',
+ 'extra': {
+ '\t': '_Tab',
+ '\n': '_Para',
+ ' ' : '_Space'
+ }
+ });
+ if (Firebug.showTextNodesWithEntities)
+ escapeGroups.push({
+ 'group':'text',
+ 'class':'nodeTextEntity',
+ 'extra':{}
+ });
+
+ if (escapeGroups.length)
+ return escapeGroupsForEntities(text, escapeGroups);
+ else
+ return [{str:text,'class':'',extra:''}];
+ },
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+ copyHTML: function(elt)
+ {
+ var html = getElementXML(elt);
+ copyToClipboard(html);
+ },
+
+ copyInnerHTML: function(elt)
+ {
+ copyToClipboard(elt.innerHTML);
+ },
+
+ copyXPath: function(elt)
+ {
+ var xpath = getElementXPath(elt);
+ copyToClipboard(xpath);
+ },
+
+ persistor: function(context, xpath)
+ {
+ var elts = xpath
+ ? getElementsByXPath(context.window.document, xpath)
+ : null;
+
+ return elts && elts.length ? elts[0] : null;
+ },
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+ className: "element",
+
+ supportsObject: function(object)
+ {
+ //return object instanceof Element || object.nodeType == 1 && typeof object.nodeName == "string";
+ return instanceOf(object, "Element");
+ },
+
+ browseObject: function(elt, context)
+ {
+ var tag = elt.nodeName.toLowerCase();
+ if (tag == "script")
+ openNewTab(elt.src);
+ else if (tag == "link")
+ openNewTab(elt.href);
+ else if (tag == "a")
+ openNewTab(elt.href);
+ else if (tag == "img")
+ openNewTab(elt.src);
+
+ return true;
+ },
+
+ persistObject: function(elt, context)
+ {
+ var xpath = getElementXPath(elt);
+
+ return bind(this.persistor, top, xpath);
+ },
+
+ getTitle: function(element, context)
+ {
+ return getElementCSSSelector(element);
+ },
+
+ getTooltip: function(elt)
+ {
+ return this.getXPath(elt);
+ },
+
+ getContextMenuItems: function(elt, target, context)
+ {
+ var monitored = areEventsMonitored(elt, null, context);
+
+ return [
+ {label: "CopyHTML", command: bindFixed(this.copyHTML, this, elt) },
+ {label: "CopyInnerHTML", command: bindFixed(this.copyInnerHTML, this, elt) },
+ {label: "CopyXPath", command: bindFixed(this.copyXPath, this, elt) },
+ "-",
+ {label: "ShowEventsInConsole", type: "checkbox", checked: monitored,
+ command: bindFixed(toggleMonitorEvents, FBL, elt, null, monitored, context) },
+ "-",
+ {label: "ScrollIntoView", command: bindFixed(elt.scrollIntoView, elt) }
+ ];
+ }
+});
+
+// ************************************************************************************************
+
+this.TextNode = domplate(Firebug.Rep,
+{
+ tag:
+ OBJECTLINK(
+ "<",
+ SPAN({"class": "nodeTag"}, "TextNode"),
+ " textContent="", SPAN({"class": "nodeValue"}, "$object.textContent|cropString"), """,
+ ">"
+ ),
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+ className: "textNode",
+
+ supportsObject: function(object)
+ {
+ return object instanceof Text;
+ }
+});
+
+// ************************************************************************************************
+
+this.Document = domplate(Firebug.Rep,
+{
+ tag:
+ OBJECTLINK("Document ", SPAN({"class": "objectPropValue"}, "$object|getLocation")),
+
+ getLocation: function(doc)
+ {
+ return doc.location ? getFileName(doc.location.href) : "";
+ },
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+ className: "object",
+
+ supportsObject: function(object)
+ {
+ //return object instanceof Document || object instanceof XMLDocument;
+ return instanceOf(object, "Document");
+ },
+
+ browseObject: function(doc, context)
+ {
+ openNewTab(doc.location.href);
+ return true;
+ },
+
+ persistObject: function(doc, context)
+ {
+ return this.persistor;
+ },
+
+ persistor: function(context)
+ {
+ return context.window.document;
+ },
+
+ getTitle: function(win, context)
+ {
+ return "document";
+ },
+
+ getTooltip: function(doc)
+ {
+ return doc.location.href;
+ }
+});
+
+// ************************************************************************************************
+
+this.StyleSheet = domplate(Firebug.Rep,
+{
+ tag:
+ OBJECTLINK("StyleSheet ", SPAN({"class": "objectPropValue"}, "$object|getLocation")),
+
+ getLocation: function(styleSheet)
+ {
+ return getFileName(styleSheet.href);
+ },
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+ copyURL: function(styleSheet)
+ {
+ copyToClipboard(styleSheet.href);
+ },
+
+ openInTab: function(styleSheet)
+ {
+ openNewTab(styleSheet.href);
+ },
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+ className: "object",
+
+ supportsObject: function(object)
+ {
+ //return object instanceof CSSStyleSheet;
+ return instanceOf(object, "CSSStyleSheet");
+ },
+
+ browseObject: function(styleSheet, context)
+ {
+ openNewTab(styleSheet.href);
+ return true;
+ },
+
+ persistObject: function(styleSheet, context)
+ {
+ return bind(this.persistor, top, styleSheet.href);
+ },
+
+ getTooltip: function(styleSheet)
+ {
+ return styleSheet.href;
+ },
+
+ getContextMenuItems: function(styleSheet, target, context)
+ {
+ return [
+ {label: "CopyLocation", command: bindFixed(this.copyURL, this, styleSheet) },
+ "-",
+ {label: "OpenInTab", command: bindFixed(this.openInTab, this, styleSheet) }
+ ];
+ },
+
+ persistor: function(context, href)
+ {
+ return getStyleSheetByHref(href, context);
+ }
+});
+
+// ************************************************************************************************
+
+this.Window = domplate(Firebug.Rep,
+{
+ tag:
+ OBJECTLINK("Window ", SPAN({"class": "objectPropValue"}, "$object|getLocation")),
+
+ getLocation: function(win)
+ {
+ try
+ {
+ return (win && win.location && !win.closed) ? getFileName(win.location.href) : "";
+ }
+ catch (exc)
+ {
+ if (FBTrace.DBG_ERRORS)
+ FBTrace.sysout("reps.Window window closed?");
+ }
+ },
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+ className: "object",
+
+ supportsObject: function(object)
+ {
+ return instanceOf(object, "Window");
+ },
+
+ browseObject: function(win, context)
+ {
+ openNewTab(win.location.href);
+ return true;
+ },
+
+ persistObject: function(win, context)
+ {
+ return this.persistor;
+ },
+
+ persistor: function(context)
+ {
+ return context.window;
+ },
+
+ getTitle: function(win, context)
+ {
+ return "window";
+ },
+
+ getTooltip: function(win)
+ {
+ if (win && !win.closed)
+ return win.location.href;
+ }
+});
+
+// ************************************************************************************************
+
+this.Event = domplate(Firebug.Rep,
+{
+ tag: TAG("$copyEventTag", {object: "$object|copyEvent"}),
+
+ copyEventTag:
+ OBJECTLINK("$object|summarizeEvent"),
+
+ summarizeEvent: function(event)
+ {
+ var info = [event.type, ' '];
+
+ var eventFamily = getEventFamily(event.type);
+ if (eventFamily == "mouse")
+ info.push("clientX=", event.clientX, ", clientY=", event.clientY);
+ else if (eventFamily == "key")
+ info.push("charCode=", event.charCode, ", keyCode=", event.keyCode);
+
+ return info.join("");
+ },
+
+ copyEvent: function(event)
+ {
+ return new EventCopy(event);
+ },
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+ className: "object",
+
+ supportsObject: function(object)
+ {
+ //return object instanceof Event || object instanceof EventCopy;
+ return instanceOf(object, "Event") || instanceOf(object, "EventCopy");
+ },
+
+ getTitle: function(event, context)
+ {
+ return "Event " + event.type;
+ }
+});
+
+// ************************************************************************************************
+
+this.SourceLink = domplate(Firebug.Rep,
+{
+ tag:
+ OBJECTLINK({$collapsed: "$object|hideSourceLink"}, "$object|getSourceLinkTitle"),
+
+ hideSourceLink: function(sourceLink)
+ {
+ return sourceLink ? sourceLink.href.indexOf("XPCSafeJSObjectWrapper") != -1 : true;
+ },
+
+ getSourceLinkTitle: function(sourceLink)
+ {
+ if (!sourceLink)
+ return "";
+
+ try
+ {
+ var fileName = getFileName(sourceLink.href);
+ fileName = decodeURIComponent(fileName);
+ fileName = cropString(fileName, 17);
+ }
+ catch(exc)
+ {
+ if (FBTrace.DBG_ERRORS)
+ FBTrace.sysout("reps.getSourceLinkTitle decodeURIComponent fails for \'"+fileName+"\': "+exc, exc);
+ }
+
+ return typeof sourceLink.line == "number" ?
+ fileName + " (line " + sourceLink.line + ")" :
+ fileName;
+
+ // TODO: xxxpedro
+ //return $STRF("Line", [fileName, sourceLink.line]);
+ },
+
+ copyLink: function(sourceLink)
+ {
+ copyToClipboard(sourceLink.href);
+ },
+
+ openInTab: function(sourceLink)
+ {
+ openNewTab(sourceLink.href);
+ },
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+ className: "sourceLink",
+
+ supportsObject: function(object)
+ {
+ return object instanceof SourceLink;
+ },
+
+ getTooltip: function(sourceLink)
+ {
+ return decodeURI(sourceLink.href);
+ },
+
+ inspectObject: function(sourceLink, context)
+ {
+ if (sourceLink.type == "js")
+ {
+ var scriptFile = getSourceFileByHref(sourceLink.href, context);
+ if (scriptFile)
+ return Firebug.chrome.select(sourceLink);
+ }
+ else if (sourceLink.type == "css")
+ {
+ // If an object is defined, treat it as the highest priority for
+ // inspect actions
+ if (sourceLink.object) {
+ Firebug.chrome.select(sourceLink.object);
+ return;
+ }
+
+ var stylesheet = getStyleSheetByHref(sourceLink.href, context);
+ if (stylesheet)
+ {
+ var ownerNode = stylesheet.ownerNode;
+ if (ownerNode)
+ {
+ Firebug.chrome.select(sourceLink, "html");
+ return;
+ }
+
+ var panel = context.getPanel("stylesheet");
+ if (panel && panel.getRuleByLine(stylesheet, sourceLink.line))
+ return Firebug.chrome.select(sourceLink);
+ }
+ }
+
+ // Fallback is to just open the view-source window on the file
+ viewSource(sourceLink.href, sourceLink.line);
+ },
+
+ browseObject: function(sourceLink, context)
+ {
+ openNewTab(sourceLink.href);
+ return true;
+ },
+
+ getContextMenuItems: function(sourceLink, target, context)
+ {
+ return [
+ {label: "CopyLocation", command: bindFixed(this.copyLink, this, sourceLink) },
+ "-",
+ {label: "OpenInTab", command: bindFixed(this.openInTab, this, sourceLink) }
+ ];
+ }
+});
+
+// ************************************************************************************************
+
+this.SourceFile = domplate(this.SourceLink,
+{
+ tag:
+ OBJECTLINK({$collapsed: "$object|hideSourceLink"}, "$object|getSourceLinkTitle"),
+
+ persistor: function(context, href)
+ {
+ return getSourceFileByHref(href, context);
+ },
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+ className: "sourceFile",
+
+ supportsObject: function(object)
+ {
+ return object instanceof SourceFile;
+ },
+
+ persistObject: function(sourceFile)
+ {
+ return bind(this.persistor, top, sourceFile.href);
+ },
+
+ browseObject: function(sourceLink, context)
+ {
+ },
+
+ getTooltip: function(sourceFile)
+ {
+ return sourceFile.href;
+ }
+});
+
+// ************************************************************************************************
+
+this.StackFrame = domplate(Firebug.Rep, // XXXjjb Since the repObject is fn the stack does not have correct line numbers
+{
+ tag:
+ OBJECTBLOCK(
+ A({"class": "objectLink objectLink-function focusRow a11yFocus", _repObject: "$object.fn"}, "$object|getCallName"),
+ " ( ",
+ FOR("arg", "$object|argIterator",
+ TAG("$arg.tag", {object: "$arg.value"}),
+ SPAN({"class": "arrayComma"}, "$arg.delim")
+ ),
+ " )",
+ SPAN({"class": "objectLink-sourceLink objectLink"}, "$object|getSourceLinkTitle")
+ ),
+
+ getCallName: function(frame)
+ {
+ //TODO: xxxpedro reps StackFrame
+ return frame.name || "anonymous";
+
+ //return getFunctionName(frame.script, frame.context);
+ },
+
+ getSourceLinkTitle: function(frame)
+ {
+ //TODO: xxxpedro reps StackFrame
+ var fileName = cropString(getFileName(frame.href), 20);
+ return fileName + (frame.lineNo ? " (line " + frame.lineNo + ")" : "");
+
+ var fileName = cropString(getFileName(frame.href), 17);
+ return $STRF("Line", [fileName, frame.lineNo]);
+ },
+
+ argIterator: function(frame)
+ {
+ if (!frame.args)
+ return [];
+
+ var items = [];
+
+ for (var i = 0; i < frame.args.length; ++i)
+ {
+ var arg = frame.args[i];
+
+ if (!arg)
+ break;
+
+ var rep = Firebug.getRep(arg.value);
+ var tag = rep.shortTag ? rep.shortTag : rep.tag;
+
+ var delim = (i == frame.args.length-1 ? "" : ", ");
+
+ items.push({name: arg.name, value: arg.value, tag: tag, delim: delim});
+ }
+
+ return items;
+ },
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+ className: "stackFrame",
+
+ supportsObject: function(object)
+ {
+ return object instanceof StackFrame;
+ },
+
+ inspectObject: function(stackFrame, context)
+ {
+ var sourceLink = new SourceLink(stackFrame.href, stackFrame.lineNo, "js");
+ Firebug.chrome.select(sourceLink);
+ },
+
+ getTooltip: function(stackFrame, context)
+ {
+ return $STRF("Line", [stackFrame.href, stackFrame.lineNo]);
+ }
+
+});
+
+// ************************************************************************************************
+
+this.StackTrace = domplate(Firebug.Rep,
+{
+ tag:
+ FOR("frame", "$object.frames focusRow",
+ TAG(this.StackFrame.tag, {object: "$frame"})
+ ),
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+ className: "stackTrace",
+
+ supportsObject: function(object)
+ {
+ return object instanceof StackTrace;
+ }
+});
+
+// ************************************************************************************************
+
+this.jsdStackFrame = domplate(Firebug.Rep,
+{
+ inspectable: false,
+
+ supportsObject: function(object)
+ {
+ return (object instanceof jsdIStackFrame) && (object.isValid);
+ },
+
+ getTitle: function(frame, context)
+ {
+ if (!frame.isValid) return "(invalid frame)"; // XXXjjb avoid frame.script == null
+ return getFunctionName(frame.script, context);
+ },
+
+ getTooltip: function(frame, context)
+ {
+ if (!frame.isValid) return "(invalid frame)"; // XXXjjb avoid frame.script == null
+ var sourceInfo = FBL.getSourceFileAndLineByScript(context, frame.script, frame);
+ if (sourceInfo)
+ return $STRF("Line", [sourceInfo.sourceFile.href, sourceInfo.lineNo]);
+ else
+ return $STRF("Line", [frame.script.fileName, frame.line]);
+ },
+
+ getContextMenuItems: function(frame, target, context)
+ {
+ var fn = frame.script.functionObject.getWrappedValue();
+ return FirebugReps.Func.getContextMenuItems(fn, target, context, frame.script);
+ }
+});
+
+// ************************************************************************************************
+
+this.ErrorMessage = domplate(Firebug.Rep,
+{
+ tag:
+ OBJECTBOX({
+ $hasTwisty: "$object|hasStackTrace",
+ $hasBreakSwitch: "$object|hasBreakSwitch",
+ $breakForError: "$object|hasErrorBreak",
+ _repObject: "$object",
+ _stackTrace: "$object|getLastErrorStackTrace",
+ onclick: "$onToggleError"},
+
+ DIV({"class": "errorTitle a11yFocus", role : 'checkbox', 'aria-checked' : 'false'},
+ "$object.message|getMessage"
+ ),
+ DIV({"class": "errorTrace"}),
+ DIV({"class": "errorSourceBox errorSource-$object|getSourceType"},
+ IMG({"class": "errorBreak a11yFocus", src:"blank.gif", role : 'checkbox', 'aria-checked':'false', title: "Break on this error"}),
+ A({"class": "errorSource a11yFocus"}, "$object|getLine")
+ ),
+ TAG(this.SourceLink.tag, {object: "$object|getSourceLink"})
+ ),
+
+ getLastErrorStackTrace: function(error)
+ {
+ return error.trace;
+ },
+
+ hasStackTrace: function(error)
+ {
+ var url = error.href.toString();
+ var fromCommandLine = (url.indexOf("XPCSafeJSObjectWrapper") != -1);
+ return !fromCommandLine && error.trace;
+ },
+
+ hasBreakSwitch: function(error)
+ {
+ return error.href && error.lineNo > 0;
+ },
+
+ hasErrorBreak: function(error)
+ {
+ return fbs.hasErrorBreakpoint(error.href, error.lineNo);
+ },
+
+ getMessage: function(message)
+ {
+ var re = /\[Exception... "(.*?)" nsresult:/;
+ var m = re.exec(message);
+ return m ? m[1] : message;
+ },
+
+ getLine: function(error)
+ {
+ if (error.category == "js")
+ {
+ if (error.source)
+ return cropString(error.source, 80);
+ else if (error.href && error.href.indexOf("XPCSafeJSObjectWrapper") == -1)
+ return cropString(error.getSourceLine(), 80);
+ }
+ },
+
+ getSourceLink: function(error)
+ {
+ var ext = error.category == "css" ? "css" : "js";
+ return error.lineNo ? new SourceLink(error.href, error.lineNo, ext) : null;
+ },
+
+ getSourceType: function(error)
+ {
+ // Errors occurring inside of HTML event handlers look like "foo.html (line 1)"
+ // so let's try to skip those
+ if (error.source)
+ return "syntax";
+ else if (error.lineNo == 1 && getFileExtension(error.href) != "js")
+ return "none";
+ else if (error.category == "css")
+ return "none";
+ else if (!error.href || !error.lineNo)
+ return "none";
+ else
+ return "exec";
+ },
+
+ onToggleError: function(event)
+ {
+ var target = event.currentTarget;
+ if (hasClass(event.target, "errorBreak"))
+ {
+ this.breakOnThisError(target.repObject);
+ }
+ else if (hasClass(event.target, "errorSource"))
+ {
+ var panel = Firebug.getElementPanel(event.target);
+ this.inspectObject(target.repObject, panel.context);
+ }
+ else if (hasClass(event.target, "errorTitle"))
+ {
+ var traceBox = target.childNodes[1];
+ toggleClass(target, "opened");
+ event.target.setAttribute('aria-checked', hasClass(target, "opened"));
+ if (hasClass(target, "opened"))
+ {
+ if (target.stackTrace)
+ var node = FirebugReps.StackTrace.tag.append({object: target.stackTrace}, traceBox);
+ if (Firebug.A11yModel.enabled)
+ {
+ var panel = Firebug.getElementPanel(event.target);
+ dispatch([Firebug.A11yModel], "onLogRowContentCreated", [panel , traceBox]);
+ }
+ }
+ else
+ clearNode(traceBox);
+ }
+ },
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+ copyError: function(error)
+ {
+ var message = [
+ this.getMessage(error.message),
+ error.href,
+ "Line " + error.lineNo
+ ];
+ copyToClipboard(message.join("\n"));
+ },
+
+ breakOnThisError: function(error)
+ {
+ if (this.hasErrorBreak(error))
+ Firebug.Debugger.clearErrorBreakpoint(error.href, error.lineNo);
+ else
+ Firebug.Debugger.setErrorBreakpoint(error.href, error.lineNo);
+ },
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+ className: "errorMessage",
+ inspectable: false,
+
+ supportsObject: function(object)
+ {
+ return object instanceof ErrorMessage;
+ },
+
+ inspectObject: function(error, context)
+ {
+ var sourceLink = this.getSourceLink(error);
+ FirebugReps.SourceLink.inspectObject(sourceLink, context);
+ },
+
+ getContextMenuItems: function(error, target, context)
+ {
+ var breakOnThisError = this.hasErrorBreak(error);
+
+ var items = [
+ {label: "CopyError", command: bindFixed(this.copyError, this, error) }
+ ];
+
+ if (error.category == "css")
+ {
+ items.push(
+ "-",
+ {label: "BreakOnThisError", type: "checkbox", checked: breakOnThisError,
+ command: bindFixed(this.breakOnThisError, this, error) },
+
+ optionMenu("BreakOnAllErrors", "breakOnErrors")
+ );
+ }
+
+ return items;
+ }
+});
+
+// ************************************************************************************************
+
+this.Assert = domplate(Firebug.Rep,
+{
+ tag:
+ DIV(
+ DIV({"class": "errorTitle"}),
+ DIV({"class": "assertDescription"})
+ ),
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+ className: "assert",
+
+ inspectObject: function(error, context)
+ {
+ var sourceLink = this.getSourceLink(error);
+ Firebug.chrome.select(sourceLink);
+ },
+
+ getContextMenuItems: function(error, target, context)
+ {
+ var breakOnThisError = this.hasErrorBreak(error);
+
+ return [
+ {label: "CopyError", command: bindFixed(this.copyError, this, error) },
+ "-",
+ {label: "BreakOnThisError", type: "checkbox", checked: breakOnThisError,
+ command: bindFixed(this.breakOnThisError, this, error) },
+ {label: "BreakOnAllErrors", type: "checkbox", checked: Firebug.breakOnErrors,
+ command: bindFixed(this.breakOnAllErrors, this, error) }
+ ];
+ }
+});
+
+// ************************************************************************************************
+
+this.SourceText = domplate(Firebug.Rep,
+{
+ tag:
+ DIV(
+ FOR("line", "$object|lineIterator",
+ DIV({"class": "sourceRow", role : "presentation"},
+ SPAN({"class": "sourceLine", role : "presentation"}, "$line.lineNo"),
+ SPAN({"class": "sourceRowText", role : "presentation"}, "$line.text")
+ )
+ )
+ ),
+
+ lineIterator: function(sourceText)
+ {
+ var maxLineNoChars = (sourceText.lines.length + "").length;
+ var list = [];
+
+ for (var i = 0; i < sourceText.lines.length; ++i)
+ {
+ // Make sure all line numbers are the same width (with a fixed-width font)
+ var lineNo = (i+1) + "";
+ while (lineNo.length < maxLineNoChars)
+ lineNo = " " + lineNo;
+
+ list.push({lineNo: lineNo, text: sourceText.lines[i]});
+ }
+
+ return list;
+ },
+
+ getHTML: function(sourceText)
+ {
+ return getSourceLineRange(sourceText, 1, sourceText.lines.length);
+ }
+});
+
+//************************************************************************************************
+this.nsIDOMHistory = domplate(Firebug.Rep,
+{
+ tag:OBJECTBOX({onclick: "$showHistory"},
+ OBJECTLINK("$object|summarizeHistory")
+ ),
+
+ className: "nsIDOMHistory",
+
+ summarizeHistory: function(history)
+ {
+ try
+ {
+ var items = history.length;
+ return items + " history entries";
+ }
+ catch(exc)
+ {
+ return "object does not support history (nsIDOMHistory)";
+ }
+ },
+
+ showHistory: function(history)
+ {
+ try
+ {
+ var items = history.length; // if this throws, then unsupported
+ Firebug.chrome.select(history);
+ }
+ catch (exc)
+ {
+ }
+ },
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+ supportsObject: function(object, type)
+ {
+ return (object instanceof Ci.nsIDOMHistory);
+ }
+});
+
+// ************************************************************************************************
+this.ApplicationCache = domplate(Firebug.Rep,
+{
+ tag:OBJECTBOX({onclick: "$showApplicationCache"},
+ OBJECTLINK("$object|summarizeCache")
+ ),
+
+ summarizeCache: function(applicationCache)
+ {
+ try
+ {
+ return applicationCache.length + " items in offline cache";
+ }
+ catch(exc)
+ {
+ return "https://bugzilla.mozilla.org/show_bug.cgi?id=422264";
+ }
+ },
+
+ showApplicationCache: function(event)
+ {
+ openNewTab("https://bugzilla.mozilla.org/show_bug.cgi?id=422264");
+ },
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+ className: "applicationCache",
+
+ supportsObject: function(object, type)
+ {
+ if (Ci.nsIDOMOfflineResourceList)
+ return (object instanceof Ci.nsIDOMOfflineResourceList);
+ }
+
+});
+
+this.Storage = domplate(Firebug.Rep,
+{
+ tag: OBJECTBOX({onclick: "$show"}, OBJECTLINK("$object|summarize")),
+
+ summarize: function(storage)
+ {
+ return storage.length +" items in Storage";
+ },
+ show: function(storage)
+ {
+ openNewTab("http://dev.w3.org/html5/webstorage/#storage-0");
+ },
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+ className: "Storage",
+
+ supportsObject: function(object, type)
+ {
+ return (object instanceof Storage);
+ }
+
+});
+
+// ************************************************************************************************
+Firebug.registerRep(
+ //this.nsIDOMHistory, // make this early to avoid exceptions
+ this.Undefined,
+ this.Null,
+ this.Number,
+ this.String,
+ this.Window,
+ //this.ApplicationCache, // must come before Arr (array) else exceptions.
+ //this.ErrorMessage,
+ this.Element,
+ //this.TextNode,
+ this.Document,
+ this.StyleSheet,
+ this.Event,
+ //this.SourceLink,
+ //this.SourceFile,
+ //this.StackTrace,
+ //this.StackFrame,
+ //this.jsdStackFrame,
+ //this.jsdScript,
+ //this.NetFile,
+ this.Property,
+ this.Except,
+ this.Arr
+);
+
+Firebug.setDefaultReps(this.Func, this.Obj);
+
+}});
+
+// ************************************************************************************************
+/*
+ * The following is http://developer.yahoo.com/yui/license.txt and applies to only code labeled "Yahoo BSD Source"
+ * in only this file reps.js. John J. Barton June 2007.
+ *
+Software License Agreement (BSD License)
+
+Copyright (c) 2006, Yahoo! Inc.
+All rights reserved.
+
+Redistribution and use of this software in source and binary forms, with or without modification, are
+permitted provided that the following conditions are met:
+
+* Redistributions of source code must retain the above
+ copyright notice, this list of conditions and the
+ following disclaimer.
+
+* Redistributions in binary form must reproduce the above
+ copyright notice, this list of conditions and the
+ following disclaimer in the documentation and/or other
+ materials provided with the distribution.
+
+* Neither the name of Yahoo! Inc. nor the names of its
+ contributors may be used to endorse or promote products
+ derived from this software without specific prior
+ written permission of Yahoo! Inc.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
+WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * /
+ */
+
+
+/* See license.txt for terms of usage */
+
+FBL.ns(function() { with (FBL) {
+
+// ************************************************************************************************
+// Constants
+
+var saveTimeout = 400;
+var pageAmount = 10;
+
+// ************************************************************************************************
+// Globals
+
+var currentTarget = null;
+var currentGroup = null;
+var currentPanel = null;
+var currentEditor = null;
+
+var defaultEditor = null;
+
+var originalClassName = null;
+
+var originalValue = null;
+var defaultValue = null;
+var previousValue = null;
+
+var invalidEditor = false;
+var ignoreNextInput = false;
+
+// ************************************************************************************************
+
+Firebug.Editor = extend(Firebug.Module,
+{
+ supportsStopEvent: true,
+
+ dispatchName: "editor",
+ tabCharacter: " ",
+
+ startEditing: function(target, value, editor)
+ {
+ this.stopEditing();
+
+ if (hasClass(target, "insertBefore") || hasClass(target, "insertAfter"))
+ return;
+
+ var panel = Firebug.getElementPanel(target);
+ if (!panel.editable)
+ return;
+
+ if (FBTrace.DBG_EDITOR)
+ FBTrace.sysout("editor.startEditing " + value, target);
+
+ defaultValue = target.getAttribute("defaultValue");
+ if (value == undefined)
+ {
+ var textContent = isIE ? "innerText" : "textContent";
+ value = target[textContent];
+ if (value == defaultValue)
+ value = "";
+ }
+
+ originalValue = previousValue = value;
+
+ invalidEditor = false;
+ currentTarget = target;
+ currentPanel = panel;
+ currentGroup = getAncestorByClass(target, "editGroup");
+
+ currentPanel.editing = true;
+
+ var panelEditor = currentPanel.getEditor(target, value);
+ currentEditor = editor ? editor : panelEditor;
+ if (!currentEditor)
+ currentEditor = getDefaultEditor(currentPanel);
+
+ var inlineParent = getInlineParent(target);
+ var targetSize = getOffsetSize(inlineParent);
+
+ setClass(panel.panelNode, "editing");
+ setClass(target, "editing");
+ if (currentGroup)
+ setClass(currentGroup, "editing");
+
+ currentEditor.show(target, currentPanel, value, targetSize);
+ //dispatch(this.fbListeners, "onBeginEditing", [currentPanel, currentEditor, target, value]);
+ currentEditor.beginEditing(target, value);
+ if (FBTrace.DBG_EDITOR)
+ FBTrace.sysout("Editor start panel "+currentPanel.name);
+ this.attachListeners(currentEditor, panel.context);
+ },
+
+ stopEditing: function(cancel)
+ {
+ if (!currentTarget)
+ return;
+
+ if (FBTrace.DBG_EDITOR)
+ FBTrace.sysout("editor.stopEditing cancel:" + cancel+" saveTimeout: "+this.saveTimeout);
+
+ clearTimeout(this.saveTimeout);
+ delete this.saveTimeout;
+
+ this.detachListeners(currentEditor, currentPanel.context);
+
+ removeClass(currentPanel.panelNode, "editing");
+ removeClass(currentTarget, "editing");
+ if (currentGroup)
+ removeClass(currentGroup, "editing");
+
+ var value = currentEditor.getValue();
+ if (value == defaultValue)
+ value = "";
+
+ var removeGroup = currentEditor.endEditing(currentTarget, value, cancel);
+
+ try
+ {
+ if (cancel)
+ {
+ //dispatch([Firebug.A11yModel], 'onInlineEditorClose', [currentPanel, currentTarget, removeGroup && !originalValue]);
+ if (value != originalValue)
+ this.saveEditAndNotifyListeners(currentTarget, originalValue, previousValue);
+
+ if (removeGroup && !originalValue && currentGroup)
+ currentGroup.parentNode.removeChild(currentGroup);
+ }
+ else if (!value)
+ {
+ this.saveEditAndNotifyListeners(currentTarget, null, previousValue);
+
+ if (removeGroup && currentGroup)
+ currentGroup.parentNode.removeChild(currentGroup);
+ }
+ else
+ this.save(value);
+ }
+ catch (exc)
+ {
+ //throw exc.message;
+ //ERROR(exc);
+ }
+
+ currentEditor.hide();
+ currentPanel.editing = false;
+
+ //dispatch(this.fbListeners, "onStopEdit", [currentPanel, currentEditor, currentTarget]);
+ //if (FBTrace.DBG_EDITOR)
+ // FBTrace.sysout("Editor stop panel "+currentPanel.name);
+
+ currentTarget = null;
+ currentGroup = null;
+ currentPanel = null;
+ currentEditor = null;
+ originalValue = null;
+ invalidEditor = false;
+
+ return value;
+ },
+
+ cancelEditing: function()
+ {
+ return this.stopEditing(true);
+ },
+
+ update: function(saveNow)
+ {
+ if (this.saveTimeout)
+ clearTimeout(this.saveTimeout);
+
+ invalidEditor = true;
+
+ currentEditor.layout();
+
+ if (saveNow)
+ this.save();
+ else
+ {
+ var context = currentPanel.context;
+ this.saveTimeout = context.setTimeout(bindFixed(this.save, this), saveTimeout);
+ if (FBTrace.DBG_EDITOR)
+ FBTrace.sysout("editor.update saveTimeout: "+this.saveTimeout);
+ }
+ },
+
+ save: function(value)
+ {
+ if (!invalidEditor)
+ return;
+
+ if (value == undefined)
+ value = currentEditor.getValue();
+ if (FBTrace.DBG_EDITOR)
+ FBTrace.sysout("editor.save saveTimeout: "+this.saveTimeout+" currentPanel: "+(currentPanel?currentPanel.name:"null"));
+ try
+ {
+ this.saveEditAndNotifyListeners(currentTarget, value, previousValue);
+
+ previousValue = value;
+ invalidEditor = false;
+ }
+ catch (exc)
+ {
+ if (FBTrace.DBG_ERRORS)
+ FBTrace.sysout("editor.save FAILS "+exc, exc);
+ }
+ },
+
+ saveEditAndNotifyListeners: function(currentTarget, value, previousValue)
+ {
+ currentEditor.saveEdit(currentTarget, value, previousValue);
+ //dispatch(this.fbListeners, "onSaveEdit", [currentPanel, currentEditor, currentTarget, value, previousValue]);
+ },
+
+ setEditTarget: function(element)
+ {
+ if (!element)
+ {
+ dispatch([Firebug.A11yModel], 'onInlineEditorClose', [currentPanel, currentTarget, true]);
+ this.stopEditing();
+ }
+ else if (hasClass(element, "insertBefore"))
+ this.insertRow(element, "before");
+ else if (hasClass(element, "insertAfter"))
+ this.insertRow(element, "after");
+ else
+ this.startEditing(element);
+ },
+
+ tabNextEditor: function()
+ {
+ if (!currentTarget)
+ return;
+
+ var value = currentEditor.getValue();
+ var nextEditable = currentTarget;
+ do
+ {
+ nextEditable = !value && currentGroup
+ ? getNextOutsider(nextEditable, currentGroup)
+ : getNextByClass(nextEditable, "editable");
+ }
+ while (nextEditable && !nextEditable.offsetHeight);
+
+ this.setEditTarget(nextEditable);
+ },
+
+ tabPreviousEditor: function()
+ {
+ if (!currentTarget)
+ return;
+
+ var value = currentEditor.getValue();
+ var prevEditable = currentTarget;
+ do
+ {
+ prevEditable = !value && currentGroup
+ ? getPreviousOutsider(prevEditable, currentGroup)
+ : getPreviousByClass(prevEditable, "editable");
+ }
+ while (prevEditable && !prevEditable.offsetHeight);
+
+ this.setEditTarget(prevEditable);
+ },
+
+ insertRow: function(relative, insertWhere)
+ {
+ var group =
+ relative || getAncestorByClass(currentTarget, "editGroup") || currentTarget;
+ var value = this.stopEditing();
+
+ currentPanel = Firebug.getElementPanel(group);
+
+ currentEditor = currentPanel.getEditor(group, value);
+ if (!currentEditor)
+ currentEditor = getDefaultEditor(currentPanel);
+
+ currentGroup = currentEditor.insertNewRow(group, insertWhere);
+ if (!currentGroup)
+ return;
+
+ var editable = hasClass(currentGroup, "editable")
+ ? currentGroup
+ : getNextByClass(currentGroup, "editable");
+
+ if (editable)
+ this.setEditTarget(editable);
+ },
+
+ insertRowForObject: function(relative)
+ {
+ var container = getAncestorByClass(relative, "insertInto");
+ if (container)
+ {
+ relative = getChildByClass(container, "insertBefore");
+ if (relative)
+ this.insertRow(relative, "before");
+ }
+ },
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+ attachListeners: function(editor, context)
+ {
+ var win = isIE ?
+ currentTarget.ownerDocument.parentWindow :
+ currentTarget.ownerDocument.defaultView;
+
+ addEvent(win, "resize", this.onResize);
+ addEvent(win, "blur", this.onBlur);
+
+ var chrome = Firebug.chrome;
+
+ this.listeners = [
+ chrome.keyCodeListen("ESCAPE", null, bind(this.cancelEditing, this))
+ ];
+
+ if (editor.arrowCompletion)
+ {
+ this.listeners.push(
+ chrome.keyCodeListen("UP", null, bindFixed(editor.completeValue, editor, -1)),
+ chrome.keyCodeListen("DOWN", null, bindFixed(editor.completeValue, editor, 1)),
+ chrome.keyCodeListen("PAGE_UP", null, bindFixed(editor.completeValue, editor, -pageAmount)),
+ chrome.keyCodeListen("PAGE_DOWN", null, bindFixed(editor.completeValue, editor, pageAmount))
+ );
+ }
+
+ if (currentEditor.tabNavigation)
+ {
+ this.listeners.push(
+ chrome.keyCodeListen("RETURN", null, bind(this.tabNextEditor, this)),
+ chrome.keyCodeListen("RETURN", isControl, bind(this.insertRow, this, null, "after")),
+ chrome.keyCodeListen("TAB", null, bind(this.tabNextEditor, this)),
+ chrome.keyCodeListen("TAB", isShift, bind(this.tabPreviousEditor, this))
+ );
+ }
+ else if (currentEditor.multiLine)
+ {
+ this.listeners.push(
+ chrome.keyCodeListen("TAB", null, insertTab)
+ );
+ }
+ else
+ {
+ this.listeners.push(
+ chrome.keyCodeListen("RETURN", null, bindFixed(this.stopEditing, this))
+ );
+
+ if (currentEditor.tabCompletion)
+ {
+ this.listeners.push(
+ chrome.keyCodeListen("TAB", null, bind(editor.completeValue, editor, 1)),
+ chrome.keyCodeListen("TAB", isShift, bind(editor.completeValue, editor, -1))
+ );
+ }
+ }
+ },
+
+ detachListeners: function(editor, context)
+ {
+ if (!this.listeners)
+ return;
+
+ var win = isIE ?
+ currentTarget.ownerDocument.parentWindow :
+ currentTarget.ownerDocument.defaultView;
+
+ removeEvent(win, "resize", this.onResize);
+ removeEvent(win, "blur", this.onBlur);
+
+ var chrome = Firebug.chrome;
+ if (chrome)
+ {
+ for (var i = 0; i < this.listeners.length; ++i)
+ chrome.keyIgnore(this.listeners[i]);
+ }
+
+ delete this.listeners;
+ },
+
+ onResize: function(event)
+ {
+ currentEditor.layout(true);
+ },
+
+ onBlur: function(event)
+ {
+ if (currentEditor.enterOnBlur && isAncestor(event.target, currentEditor.box))
+ this.stopEditing();
+ },
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ // extends Module
+
+ initialize: function()
+ {
+ Firebug.Module.initialize.apply(this, arguments);
+
+ this.onResize = bindFixed(this.onResize, this);
+ this.onBlur = bind(this.onBlur, this);
+ },
+
+ disable: function()
+ {
+ this.stopEditing();
+ },
+
+ showContext: function(browser, context)
+ {
+ this.stopEditing();
+ },
+
+ showPanel: function(browser, panel)
+ {
+ this.stopEditing();
+ }
+});
+
+// ************************************************************************************************
+// BaseEditor
+
+Firebug.BaseEditor = extend(Firebug.MeasureBox,
+{
+ getValue: function()
+ {
+ },
+
+ setValue: function(value)
+ {
+ },
+
+ show: function(target, panel, value, textSize, targetSize)
+ {
+ },
+
+ hide: function()
+ {
+ },
+
+ layout: function(forceAll)
+ {
+ },
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ // Support for context menus within inline editors.
+
+ getContextMenuItems: function(target)
+ {
+ var items = [];
+ items.push({label: "Cut", commandID: "cmd_cut"});
+ items.push({label: "Copy", commandID: "cmd_copy"});
+ items.push({label: "Paste", commandID: "cmd_paste"});
+ return items;
+ },
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ // Editor Module listeners will get "onBeginEditing" just before this call
+
+ beginEditing: function(target, value)
+ {
+ },
+
+ // Editor Module listeners will get "onSaveEdit" just after this call
+ saveEdit: function(target, value, previousValue)
+ {
+ },
+
+ endEditing: function(target, value, cancel)
+ {
+ // Remove empty groups by default
+ return true;
+ },
+
+ insertNewRow: function(target, insertWhere)
+ {
+ }
+});
+
+// ************************************************************************************************
+// InlineEditor
+
+// basic inline editor attributes
+var inlineEditorAttributes = {
+ "class": "textEditorInner",
+
+ type: "text",
+ spellcheck: "false",
+
+ onkeypress: "$onKeyPress",
+
+ onoverflow: "$onOverflow",
+ oncontextmenu: "$onContextMenu"
+};
+
+// IE does not support the oninput event, so we're using the onkeydown to signalize
+// the relevant keyboard events, and the onpropertychange to actually handle the
+// input event, which should happen after the onkeydown event is fired and after the
+// value of the input is updated, but before the onkeyup and before the input (with the
+// new value) is rendered
+if (isIE)
+{
+ inlineEditorAttributes.onpropertychange = "$onInput";
+ inlineEditorAttributes.onkeydown = "$onKeyDown";
+}
+// for other browsers we use the oninput event
+else
+{
+ inlineEditorAttributes.oninput = "$onInput";
+}
+
+Firebug.InlineEditor = function(doc)
+{
+ this.initializeInline(doc);
+};
+
+Firebug.InlineEditor.prototype = domplate(Firebug.BaseEditor,
+{
+ enterOnBlur: true,
+ outerMargin: 8,
+ shadowExpand: 7,
+
+ tag:
+ DIV({"class": "inlineEditor"},
+ DIV({"class": "textEditorTop1"},
+ DIV({"class": "textEditorTop2"})
+ ),
+ DIV({"class": "textEditorInner1"},
+ DIV({"class": "textEditorInner2"},
+ INPUT(
+ inlineEditorAttributes
+ )
+ )
+ ),
+ DIV({"class": "textEditorBottom1"},
+ DIV({"class": "textEditorBottom2"})
+ )
+ ),
+
+ inputTag :
+ INPUT({"class": "textEditorInner", type: "text",
+ /*oninput: "$onInput",*/ onkeypress: "$onKeyPress", onoverflow: "$onOverflow"}
+ ),
+
+ expanderTag:
+ IMG({"class": "inlineExpander", src: "blank.gif"}),
+
+ initialize: function()
+ {
+ this.fixedWidth = false;
+ this.completeAsYouType = true;
+ this.tabNavigation = true;
+ this.multiLine = false;
+ this.tabCompletion = false;
+ this.arrowCompletion = true;
+ this.noWrap = true;
+ this.numeric = false;
+ },
+
+ destroy: function()
+ {
+ this.destroyInput();
+ },
+
+ initializeInline: function(doc)
+ {
+ if (FBTrace.DBG_EDITOR)
+ FBTrace.sysout("Firebug.InlineEditor initializeInline()");
+
+ //this.box = this.tag.replace({}, doc, this);
+ this.box = this.tag.append({}, doc.body, this);
+
+ //this.input = this.box.childNodes[1].firstChild.firstChild; // XXXjjb childNode[1] required
+ this.input = this.box.getElementsByTagName("input")[0];
+
+ if (isIElt8)
+ {
+ this.input.style.top = "-8px";
+ }
+
+ this.expander = this.expanderTag.replace({}, doc, this);
+ this.initialize();
+ },
+
+ destroyInput: function()
+ {
+ // XXXjoe Need to remove input/keypress handlers to avoid leaks
+ },
+
+ getValue: function()
+ {
+ return this.input.value;
+ },
+
+ setValue: function(value)
+ {
+ // It's only a one-line editor, so new lines shouldn't be allowed
+ return this.input.value = stripNewLines(value);
+ },
+
+ show: function(target, panel, value, targetSize)
+ {
+ //dispatch([Firebug.A11yModel], "onInlineEditorShow", [panel, this]);
+ this.target = target;
+ this.panel = panel;
+
+ this.targetSize = targetSize;
+
+ // TODO: xxxpedro editor
+ //this.targetOffset = getClientOffset(target);
+
+ // Some browsers (IE, Google Chrome and Safari) will have problem trying to get the
+ // offset values of invisible elements, or empty elements. So, in order to get the
+ // correct values, we temporary inject a character in the innerHTML of the empty element,
+ // then we get the offset values, and next, we restore the original innerHTML value.
+ var innerHTML = target.innerHTML;
+ var isEmptyElement = !innerHTML;
+ if (isEmptyElement)
+ target.innerHTML = ".";
+
+ // Get the position of the target element (that is about to be edited)
+ this.targetOffset =
+ {
+ x: target.offsetLeft,
+ y: target.offsetTop
+ };
+
+ // Restore the original innerHTML value of the empty element
+ if (isEmptyElement)
+ target.innerHTML = innerHTML;
+
+ this.originalClassName = this.box.className;
+
+ var classNames = target.className.split(" ");
+ for (var i = 0; i < classNames.length; ++i)
+ setClass(this.box, "editor-" + classNames[i]);
+
+ // Make the editor match the target's font style
+ copyTextStyles(target, this.box);
+
+ this.setValue(value);
+
+ if (this.fixedWidth)
+ this.updateLayout(true);
+ else
+ {
+ this.startMeasuring(target);
+ this.textSize = this.measureInputText(value);
+
+ // Correct the height of the box to make the funky CSS drop-shadow line up
+ var parent = this.input.parentNode;
+ if (hasClass(parent, "textEditorInner2"))
+ {
+ var yDiff = this.textSize.height - this.shadowExpand;
+
+ // IE6 height offset
+ if (isIE6)
+ yDiff -= 2;
+
+ parent.style.height = yDiff + "px";
+ parent.parentNode.style.height = yDiff + "px";
+ }
+
+ this.updateLayout(true);
+ }
+
+ this.getAutoCompleter().reset();
+
+ if (isIElt8)
+ panel.panelNode.appendChild(this.box);
+ else
+ target.offsetParent.appendChild(this.box);
+
+ //console.log(target);
+ //this.input.select(); // it's called bellow, with setTimeout
+
+ if (isIE)
+ {
+ // reset input style
+ this.input.style.fontFamily = "Monospace";
+ this.input.style.fontSize = "11px";
+ }
+
+ // Insert the "expander" to cover the target element with white space
+ if (!this.fixedWidth)
+ {
+ copyBoxStyles(target, this.expander);
+
+ target.parentNode.replaceChild(this.expander, target);
+ collapse(target, true);
+ this.expander.parentNode.insertBefore(target, this.expander);
+ }
+
+ //TODO: xxxpedro
+ //scrollIntoCenterView(this.box, null, true);
+
+ // Display the editor after change its size and position to avoid flickering
+ this.box.style.display = "block";
+
+ // we need to call input.focus() and input.select() with a timeout,
+ // otherwise it won't work on all browsers due to timing issues
+ var self = this;
+ setTimeout(function(){
+ self.input.focus();
+ self.input.select();
+ },0);
+ },
+
+ hide: function()
+ {
+ this.box.className = this.originalClassName;
+
+ if (!this.fixedWidth)
+ {
+ this.stopMeasuring();
+
+ collapse(this.target, false);
+
+ if (this.expander.parentNode)
+ this.expander.parentNode.removeChild(this.expander);
+ }
+
+ if (this.box.parentNode)
+ {
+ ///setSelectionRange(this.input, 0, 0);
+ this.input.blur();
+
+ this.box.parentNode.removeChild(this.box);
+ }
+
+ delete this.target;
+ delete this.panel;
+ },
+
+ layout: function(forceAll)
+ {
+ if (!this.fixedWidth)
+ this.textSize = this.measureInputText(this.input.value);
+
+ if (forceAll)
+ this.targetOffset = getClientOffset(this.expander);
+
+ this.updateLayout(false, forceAll);
+ },
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+ beginEditing: function(target, value)
+ {
+ },
+
+ saveEdit: function(target, value, previousValue)
+ {
+ },
+
+ endEditing: function(target, value, cancel)
+ {
+ // Remove empty groups by default
+ return true;
+ },
+
+ insertNewRow: function(target, insertWhere)
+ {
+ },
+
+ advanceToNext: function(target, charCode)
+ {
+ return false;
+ },
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+ getAutoCompleteRange: function(value, offset)
+ {
+ },
+
+ getAutoCompleteList: function(preExpr, expr, postExpr)
+ {
+ },
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+ getAutoCompleter: function()
+ {
+ if (!this.autoCompleter)
+ {
+ this.autoCompleter = new Firebug.AutoCompleter(null,
+ bind(this.getAutoCompleteRange, this), bind(this.getAutoCompleteList, this),
+ true, false);
+ }
+
+ return this.autoCompleter;
+ },
+
+ completeValue: function(amt)
+ {
+ //console.log("completeValue");
+
+ var selectRangeCallback = this.getAutoCompleter().complete(currentPanel.context, this.input, true, amt < 0);
+
+ if (selectRangeCallback)
+ {
+ Firebug.Editor.update(true);
+
+ // We need to select the editor text after calling update in Safari/Chrome,
+ // otherwise the text won't be selected
+ if (isSafari)
+ setTimeout(selectRangeCallback,0);
+ else
+ selectRangeCallback();
+ }
+ else
+ this.incrementValue(amt);
+ },
+
+ incrementValue: function(amt)
+ {
+ var value = this.input.value;
+
+ // TODO: xxxpedro editor
+ if (isIE)
+ var start = getInputSelectionStart(this.input), end = start;
+ else
+ var start = this.input.selectionStart, end = this.input.selectionEnd;
+
+ //debugger;
+ var range = this.getAutoCompleteRange(value, start);
+ if (!range || range.type != "int")
+ range = {start: 0, end: value.length-1};
+
+ var expr = value.substr(range.start, range.end-range.start+1);
+ preExpr = value.substr(0, range.start);
+ postExpr = value.substr(range.end+1);
+
+ // See if the value is an integer, and if so increment it
+ var intValue = parseInt(expr);
+ if (!!intValue || intValue == 0)
+ {
+ var m = /\d+/.exec(expr);
+ var digitPost = expr.substr(m.index+m[0].length);
+
+ var completion = intValue-amt;
+ this.input.value = preExpr + completion + digitPost + postExpr;
+
+ setSelectionRange(this.input, start, end);
+
+ Firebug.Editor.update(true);
+
+ return true;
+ }
+ else
+ return false;
+ },
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+ onKeyPress: function(event)
+ {
+ //console.log("onKeyPress", event);
+ if (event.keyCode == 27 && !this.completeAsYouType)
+ {
+ var reverted = this.getAutoCompleter().revert(this.input);
+ if (reverted)
+ cancelEvent(event);
+ }
+ else if (event.charCode && this.advanceToNext(this.target, event.charCode))
+ {
+ Firebug.Editor.tabNextEditor();
+ cancelEvent(event);
+ }
+ else
+ {
+ if (this.numeric && event.charCode && (event.charCode < 48 || event.charCode > 57)
+ && event.charCode != 45 && event.charCode != 46)
+ FBL.cancelEvent(event);
+ else
+ {
+ // If the user backspaces, don't autocomplete after the upcoming input event
+ this.ignoreNextInput = event.keyCode == 8;
+ }
+ }
+ },
+
+ onOverflow: function()
+ {
+ this.updateLayout(false, false, 3);
+ },
+
+ onKeyDown: function(event)
+ {
+ //console.log("onKeyDown", event.keyCode);
+ if (event.keyCode > 46 || event.keyCode == 32 || event.keyCode == 8)
+ {
+ this.keyDownPressed = true;
+ }
+ },
+
+ onInput: function(event)
+ {
+ //debugger;
+
+ // skip not relevant onpropertychange calls on IE
+ if (isIE)
+ {
+ if (event.propertyName != "value" || !isVisible(this.input) || !this.keyDownPressed)
+ return;
+
+ this.keyDownPressed = false;
+ }
+
+ //console.log("onInput", event);
+ //console.trace();
+
+ var selectRangeCallback;
+
+ if (this.ignoreNextInput)
+ {
+ this.ignoreNextInput = false;
+ this.getAutoCompleter().reset();
+ }
+ else if (this.completeAsYouType)
+ selectRangeCallback = this.getAutoCompleter().complete(currentPanel.context, this.input, false);
+ else
+ this.getAutoCompleter().reset();
+
+ Firebug.Editor.update();
+
+ if (selectRangeCallback)
+ {
+ // We need to select the editor text after calling update in Safari/Chrome,
+ // otherwise the text won't be selected
+ if (isSafari)
+ setTimeout(selectRangeCallback,0);
+ else
+ selectRangeCallback();
+ }
+ },
+
+ onContextMenu: function(event)
+ {
+ cancelEvent(event);
+
+ var popup = $("fbInlineEditorPopup");
+ FBL.eraseNode(popup);
+
+ var target = event.target || event.srcElement;
+ var menu = this.getContextMenuItems(target);
+ if (menu)
+ {
+ for (var i = 0; i < menu.length; ++i)
+ FBL.createMenuItem(popup, menu[i]);
+ }
+
+ if (!popup.firstChild)
+ return false;
+
+ popup.openPopupAtScreen(event.screenX, event.screenY, true);
+ return true;
+ },
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+ updateLayout: function(initial, forceAll, extraWidth)
+ {
+ if (this.fixedWidth)
+ {
+ this.box.style.left = (this.targetOffset.x) + "px";
+ this.box.style.top = (this.targetOffset.y) + "px";
+
+ var w = this.target.offsetWidth;
+ var h = this.target.offsetHeight;
+ this.input.style.width = w + "px";
+ this.input.style.height = (h-3) + "px";
+ }
+ else
+ {
+ if (initial || forceAll)
+ {
+ this.box.style.left = this.targetOffset.x + "px";
+ this.box.style.top = this.targetOffset.y + "px";
+ }
+
+ var approxTextWidth = this.textSize.width;
+ var maxWidth = (currentPanel.panelNode.scrollWidth - this.targetOffset.x)
+ - this.outerMargin;
+
+ var wrapped = initial
+ ? this.noWrap && this.targetSize.height > this.textSize.height+3
+ : this.noWrap && approxTextWidth > maxWidth;
+
+ if (wrapped)
+ {
+ var style = isIE ?
+ this.target.currentStyle :
+ this.target.ownerDocument.defaultView.getComputedStyle(this.target, "");
+
+ targetMargin = parseInt(style.marginLeft) + parseInt(style.marginRight);
+
+ // Make the width fit the remaining x-space from the offset to the far right
+ approxTextWidth = maxWidth - targetMargin;
+
+ this.input.style.width = "100%";
+ this.box.style.width = approxTextWidth + "px";
+ }
+ else
+ {
+ // Make the input one character wider than the text value so that
+ // typing does not ever cause the textbox to scroll
+ var charWidth = this.measureInputText('m').width;
+
+ // Sometimes we need to make the editor a little wider, specifically when
+ // an overflow happens, otherwise it will scroll off some text on the left
+ if (extraWidth)
+ charWidth *= extraWidth;
+
+ var inputWidth = approxTextWidth + charWidth;
+
+ if (initial)
+ {
+ if (isIE)
+ {
+ // TODO: xxxpedro
+ var xDiff = 13;
+ this.box.style.width = (inputWidth + xDiff) + "px";
+ }
+ else
+ this.box.style.width = "auto";
+ }
+ else
+ {
+ // TODO: xxxpedro
+ var xDiff = isIE ? 13: this.box.scrollWidth - this.input.offsetWidth;
+ this.box.style.width = (inputWidth + xDiff) + "px";
+ }
+
+ this.input.style.width = inputWidth + "px";
+ }
+
+ this.expander.style.width = approxTextWidth + "px";
+ this.expander.style.height = Math.max(this.textSize.height-3,0) + "px";
+ }
+
+ if (forceAll)
+ scrollIntoCenterView(this.box, null, true);
+ }
+});
+
+// ************************************************************************************************
+// Autocompletion
+
+Firebug.AutoCompleter = function(getExprOffset, getRange, evaluator, selectMode, caseSensitive)
+{
+ var candidates = null;
+ var originalValue = null;
+ var originalOffset = -1;
+ var lastExpr = null;
+ var lastOffset = -1;
+ var exprOffset = 0;
+ var lastIndex = 0;
+ var preParsed = null;
+ var preExpr = null;
+ var postExpr = null;
+
+ this.revert = function(textBox)
+ {
+ if (originalOffset != -1)
+ {
+ textBox.value = originalValue;
+
+ setSelectionRange(textBox, originalOffset, originalOffset);
+
+ this.reset();
+ return true;
+ }
+ else
+ {
+ this.reset();
+ return false;
+ }
+ };
+
+ this.reset = function()
+ {
+ candidates = null;
+ originalValue = null;
+ originalOffset = -1;
+ lastExpr = null;
+ lastOffset = 0;
+ exprOffset = 0;
+ };
+
+ this.complete = function(context, textBox, cycle, reverse)
+ {
+ //console.log("complete", context, textBox, cycle, reverse);
+ // TODO: xxxpedro important port to firebug (variable leak)
+ //var value = lastValue = textBox.value;
+ var value = textBox.value;
+
+ //var offset = textBox.selectionStart;
+ var offset = getInputSelectionStart(textBox);
+
+ // The result of selectionStart() in Safari/Chrome is 1 unit less than the result
+ // in Firefox. Therefore, we need to manually adjust the value here.
+ if (isSafari && !cycle && offset >= 0) offset++;
+
+ if (!selectMode && originalOffset != -1)
+ offset = originalOffset;
+
+ if (!candidates || !cycle || offset != lastOffset)
+ {
+ originalOffset = offset;
+ originalValue = value;
+
+ // Find the part of the string that will be parsed
+ var parseStart = getExprOffset ? getExprOffset(value, offset, context) : 0;
+ preParsed = value.substr(0, parseStart);
+ var parsed = value.substr(parseStart);
+
+ // Find the part of the string that is being completed
+ var range = getRange ? getRange(parsed, offset-parseStart, context) : null;
+ if (!range)
+ range = {start: 0, end: parsed.length-1 };
+
+ var expr = parsed.substr(range.start, range.end-range.start+1);
+ preExpr = parsed.substr(0, range.start);
+ postExpr = parsed.substr(range.end+1);
+ exprOffset = parseStart + range.start;
+
+ if (!cycle)
+ {
+ if (!expr)
+ return;
+ else if (lastExpr && lastExpr.indexOf(expr) != 0)
+ {
+ candidates = null;
+ }
+ else if (lastExpr && lastExpr.length >= expr.length)
+ {
+ candidates = null;
+ lastExpr = expr;
+ return;
+ }
+ }
+
+ lastExpr = expr;
+ lastOffset = offset;
+
+ var searchExpr;
+
+ // Check if the cursor is at the very right edge of the expression, or
+ // somewhere in the middle of it
+ if (expr && offset != parseStart+range.end+1)
+ {
+ if (cycle)
+ {
+ // We are in the middle of the expression, but we can
+ // complete by cycling to the next item in the values
+ // list after the expression
+ offset = range.start;
+ searchExpr = expr;
+ expr = "";
+ }
+ else
+ {
+ // We can't complete unless we are at the ridge edge
+ return;
+ }
+ }
+
+ var values = evaluator(preExpr, expr, postExpr, context);
+ if (!values)
+ return;
+
+ if (expr)
+ {
+ // Filter the list of values to those which begin with expr. We
+ // will then go on to complete the first value in the resulting list
+ candidates = [];
+
+ if (caseSensitive)
+ {
+ for (var i = 0; i < values.length; ++i)
+ {
+ var name = values[i];
+ if (name.indexOf && name.indexOf(expr) == 0)
+ candidates.push(name);
+ }
+ }
+ else
+ {
+ var lowerExpr = caseSensitive ? expr : expr.toLowerCase();
+ for (var i = 0; i < values.length; ++i)
+ {
+ var name = values[i];
+ if (name.indexOf && name.toLowerCase().indexOf(lowerExpr) == 0)
+ candidates.push(name);
+ }
+ }
+
+ lastIndex = reverse ? candidates.length-1 : 0;
+ }
+ else if (searchExpr)
+ {
+ var searchIndex = -1;
+
+ // Find the first instance of searchExpr in the values list. We
+ // will then complete the string that is found
+ if (caseSensitive)
+ {
+ searchIndex = values.indexOf(expr);
+ }
+ else
+ {
+ var lowerExpr = searchExpr.toLowerCase();
+ for (var i = 0; i < values.length; ++i)
+ {
+ var name = values[i];
+ if (name && name.toLowerCase().indexOf(lowerExpr) == 0)
+ {
+ searchIndex = i;
+ break;
+ }
+ }
+ }
+
+ // Nothing found, so there's nothing to complete to
+ if (searchIndex == -1)
+ return this.reset();
+
+ expr = searchExpr;
+ candidates = cloneArray(values);
+ lastIndex = searchIndex;
+ }
+ else
+ {
+ expr = "";
+ candidates = [];
+ for (var i = 0; i < values.length; ++i)
+ {
+ if (values[i].substr)
+ candidates.push(values[i]);
+ }
+ lastIndex = -1;
+ }
+ }
+
+ if (cycle)
+ {
+ expr = lastExpr;
+ lastIndex += reverse ? -1 : 1;
+ }
+
+ if (!candidates.length)
+ return;
+
+ if (lastIndex >= candidates.length)
+ lastIndex = 0;
+ else if (lastIndex < 0)
+ lastIndex = candidates.length-1;
+
+ var completion = candidates[lastIndex];
+ var preCompletion = expr.substr(0, offset-exprOffset);
+ var postCompletion = completion.substr(offset-exprOffset);
+
+ textBox.value = preParsed + preExpr + preCompletion + postCompletion + postExpr;
+ var offsetEnd = preParsed.length + preExpr.length + completion.length;
+
+ // TODO: xxxpedro remove the following commented code, if the lib.setSelectionRange()
+ // is working well.
+ /*
+ if (textBox.setSelectionRange)
+ {
+ // we must select the range with a timeout, otherwise the text won't
+ // be properly selected (because after this function executes, the editor's
+ // input will be resized to fit the whole text)
+ setTimeout(function(){
+ if (selectMode)
+ textBox.setSelectionRange(offset, offsetEnd);
+ else
+ textBox.setSelectionRange(offsetEnd, offsetEnd);
+ },0);
+ }
+ /**/
+
+ // we must select the range with a timeout, otherwise the text won't
+ // be properly selected (because after this function executes, the editor's
+ // input will be resized to fit the whole text)
+ /*
+ setTimeout(function(){
+ if (selectMode)
+ setSelectionRange(textBox, offset, offsetEnd);
+ else
+ setSelectionRange(textBox, offsetEnd, offsetEnd);
+ },0);
+
+ return true;
+ /**/
+
+ // The editor text should be selected only after calling the editor.update()
+ // in Safari/Chrome, otherwise the text won't be selected. So, we're returning
+ // a function to be called later (in the proper time for all browsers).
+ //
+ // TODO: xxxpedro see if we can move the editor.update() calls to here, and avoid
+ // returning a closure. the complete() function seems to be called only twice in
+ // editor.js. See if this function is called anywhere else (like css.js for example).
+ return function(){
+ //console.log("autocomplete ", textBox, offset, offsetEnd);
+
+ if (selectMode)
+ setSelectionRange(textBox, offset, offsetEnd);
+ else
+ setSelectionRange(textBox, offsetEnd, offsetEnd);
+ };
+ /**/
+ };
+};
+
+// ************************************************************************************************
+// Local Helpers
+
+var getDefaultEditor = function getDefaultEditor(panel)
+{
+ if (!defaultEditor)
+ {
+ var doc = panel.document;
+ defaultEditor = new Firebug.InlineEditor(doc);
+ }
+
+ return defaultEditor;
+}
+
+/**
+ * An outsider is the first element matching the stepper element that
+ * is not an child of group. Elements tagged with insertBefore or insertAfter
+ * classes are also excluded from these results unless they are the sibling
+ * of group, relative to group's parent editGroup. This allows for the proper insertion
+ * rows when groups are nested.
+ */
+var getOutsider = function getOutsider(element, group, stepper)
+{
+ var parentGroup = getAncestorByClass(group.parentNode, "editGroup");
+ var next;
+ do
+ {
+ next = stepper(next || element);
+ }
+ while (isAncestor(next, group) || isGroupInsert(next, parentGroup));
+
+ return next;
+}
+
+var isGroupInsert = function isGroupInsert(next, group)
+{
+ return (!group || isAncestor(next, group))
+ && (hasClass(next, "insertBefore") || hasClass(next, "insertAfter"));
+}
+
+var getNextOutsider = function getNextOutsider(element, group)
+{
+ return getOutsider(element, group, bind(getNextByClass, FBL, "editable"));
+}
+
+var getPreviousOutsider = function getPreviousOutsider(element, group)
+{
+ return getOutsider(element, group, bind(getPreviousByClass, FBL, "editable"));
+}
+
+var getInlineParent = function getInlineParent(element)
+{
+ var lastInline = element;
+ for (; element; element = element.parentNode)
+ {
+ //var s = element.ownerDocument.defaultView.getComputedStyle(element, "");
+ var s = isIE ?
+ element.currentStyle :
+ element.ownerDocument.defaultView.getComputedStyle(element, "");
+
+ if (s.display != "inline")
+ return lastInline;
+ else
+ lastInline = element;
+ }
+ return null;
+}
+
+var insertTab = function insertTab()
+{
+ insertTextIntoElement(currentEditor.input, Firebug.Editor.tabCharacter);
+}
+
+// ************************************************************************************************
+
+Firebug.registerModule(Firebug.Editor);
+
+// ************************************************************************************************
+
+}});
+
+
+/* See license.txt for terms of usage */
+
+FBL.ns(function() { with (FBL) {
+// ************************************************************************************************
+
+if (Env.Options.disableXHRListener)
+ return;
+
+// ************************************************************************************************
+// XHRSpy
+
+var XHRSpy = function()
+{
+ this.requestHeaders = [];
+ this.responseHeaders = [];
+};
+
+XHRSpy.prototype =
+{
+ method: null,
+ url: null,
+ async: null,
+
+ xhrRequest: null,
+
+ href: null,
+
+ loaded: false,
+
+ logRow: null,
+
+ responseText: null,
+
+ requestHeaders: null,
+ responseHeaders: null,
+
+ sourceLink: null, // {href:"file.html", line: 22}
+
+ getURL: function()
+ {
+ return this.href;
+ }
+};
+
+// ************************************************************************************************
+// XMLHttpRequestWrapper
+
+var XMLHttpRequestWrapper = function(activeXObject)
+{
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ // XMLHttpRequestWrapper internal variables
+
+ var xhrRequest = typeof activeXObject != "undefined" ?
+ activeXObject :
+ new _XMLHttpRequest(),
+
+ spy = new XHRSpy(),
+
+ self = this,
+
+ reqType,
+ reqUrl,
+ reqStartTS;
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ // XMLHttpRequestWrapper internal methods
+
+ var updateSelfPropertiesIgnore = {
+ abort: 1,
+ channel: 1,
+ getAllResponseHeaders: 1,
+ getInterface: 1,
+ getResponseHeader: 1,
+ mozBackgroundRequest: 1,
+ multipart: 1,
+ onreadystatechange: 1,
+ open: 1,
+ send: 1,
+ setRequestHeader: 1
+ };
+
+ var updateSelfProperties = function()
+ {
+ if (supportsXHRIterator)
+ {
+ for (var propName in xhrRequest)
+ {
+ if (propName in updateSelfPropertiesIgnore)
+ continue;
+
+ try
+ {
+ var propValue = xhrRequest[propName];
+
+ if (propValue && !isFunction(propValue))
+ self[propName] = propValue;
+ }
+ catch(E)
+ {
+ //console.log(propName, E.message);
+ }
+ }
+ }
+ else
+ {
+ // will fail to read these xhrRequest properties if the request is not completed
+ if (xhrRequest.readyState == 4)
+ {
+ self.status = xhrRequest.status;
+ self.statusText = xhrRequest.statusText;
+ self.responseText = xhrRequest.responseText;
+ self.responseXML = xhrRequest.responseXML;
+ }
+ }
+ };
+
+ var updateXHRPropertiesIgnore = {
+ channel: 1,
+ onreadystatechange: 1,
+ readyState: 1,
+ responseBody: 1,
+ responseText: 1,
+ responseXML: 1,
+ status: 1,
+ statusText: 1,
+ upload: 1
+ };
+
+ var updateXHRProperties = function()
+ {
+ for (var propName in self)
+ {
+ if (propName in updateXHRPropertiesIgnore)
+ continue;
+
+ try
+ {
+ var propValue = self[propName];
+
+ if (propValue && !xhrRequest[propName])
+ {
+ xhrRequest[propName] = propValue;
+ }
+ }
+ catch(E)
+ {
+ //console.log(propName, E.message);
+ }
+ }
+ };
+
+ var logXHR = function()
+ {
+ var row = Firebug.Console.log(spy, null, "spy", Firebug.Spy.XHR);
+
+ if (row)
+ {
+ setClass(row, "loading");
+ spy.logRow = row;
+ }
+ };
+
+ var finishXHR = function()
+ {
+ var duration = new Date().getTime() - reqStartTS;
+ var success = xhrRequest.status == 200;
+
+ var responseHeadersText = xhrRequest.getAllResponseHeaders();
+ var responses = responseHeadersText ? responseHeadersText.split(/[\n\r]/) : [];
+ var reHeader = /^(\S+):\s*(.*)/;
+
+ for (var i=0, l=responses.length; i<l; i++)
+ {
+ var text = responses[i];
+ var match = text.match(reHeader);
+
+ if (match)
+ {
+ var name = match[1];
+ var value = match[2];
+
+ // update the spy mimeType property so we can detect when to show
+ // custom response viewers (such as HTML, XML or JSON viewer)
+ if (name == "Content-Type")
+ spy.mimeType = value;
+
+ /*
+ if (name == "Last Modified")
+ {
+ if (!spy.cacheEntry)
+ spy.cacheEntry = [];
+
+ spy.cacheEntry.push({
+ name: [name],
+ value: [value]
+ });
+ }
+ /**/
+
+ spy.responseHeaders.push({
+ name: [name],
+ value: [value]
+ });
+ }
+ }
+
+ with({
+ row: spy.logRow,
+ status: xhrRequest.status == 0 ?
+ // if xhrRequest.status == 0 then accessing xhrRequest.statusText
+ // will cause an error, so we must handle this case (Issue 3504)
+ "" : xhrRequest.status + " " + xhrRequest.statusText,
+ time: duration,
+ success: success
+ })
+ {
+ setTimeout(function(){
+
+ spy.responseText = xhrRequest.responseText;
+
+ // update row information to avoid "ethernal spinning gif" bug in IE
+ row = row || spy.logRow;
+
+ // if chrome document is not loaded, there will be no row yet, so just ignore
+ if (!row) return;
+
+ // update the XHR representation data
+ handleRequestStatus(success, status, time);
+
+ },200);
+ }
+
+ spy.loaded = true;
+ /*
+ // commented because they are being updated by the updateSelfProperties() function
+ self.status = xhrRequest.status;
+ self.statusText = xhrRequest.statusText;
+ self.responseText = xhrRequest.responseText;
+ self.responseXML = xhrRequest.responseXML;
+ /**/
+ updateSelfProperties();
+ };
+
+ var handleStateChange = function()
+ {
+ //Firebug.Console.log(["onreadystatechange", xhrRequest.readyState, xhrRequest.readyState == 4 && xhrRequest.status]);
+
+ self.readyState = xhrRequest.readyState;
+
+ if (xhrRequest.readyState == 4)
+ {
+ finishXHR();
+
+ xhrRequest.onreadystatechange = function(){};
+ }
+
+ //Firebug.Console.log(spy.url + ": " + xhrRequest.readyState);
+
+ self.onreadystatechange();
+ };
+
+ // update the XHR representation data
+ var handleRequestStatus = function(success, status, time)
+ {
+ var row = spy.logRow;
+ FBL.removeClass(row, "loading");
+
+ if (!success)
+ FBL.setClass(row, "error");
+
+ var item = FBL.$$(".spyStatus", row)[0];
+ item.innerHTML = status;
+
+ if (time)
+ {
+ var item = FBL.$$(".spyTime", row)[0];
+ item.innerHTML = time + "ms";
+ }
+ };
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ // XMLHttpRequestWrapper public properties and handlers
+
+ this.readyState = 0;
+
+ this.onreadystatechange = function(){};
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ // XMLHttpRequestWrapper public methods
+
+ this.open = function(method, url, async, user, password)
+ {
+ //Firebug.Console.log("xhrRequest open");
+
+ updateSelfProperties();
+
+ if (spy.loaded)
+ spy = new XHRSpy();
+
+ spy.method = method;
+ spy.url = url;
+ spy.async = async;
+ spy.href = url;
+ spy.xhrRequest = xhrRequest;
+ spy.urlParams = parseURLParamsArray(url);
+
+ try
+ {
+ // xhrRequest.open.apply may not be available in IE
+ if (supportsApply)
+ xhrRequest.open.apply(xhrRequest, arguments);
+ else
+ xhrRequest.open(method, url, async, user, password);
+ }
+ catch(e)
+ {
+ }
+
+ xhrRequest.onreadystatechange = handleStateChange;
+
+ };
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+ this.send = function(data)
+ {
+ //Firebug.Console.log("xhrRequest send");
+ spy.data = data;
+
+ reqStartTS = new Date().getTime();
+
+ updateXHRProperties();
+
+ try
+ {
+ xhrRequest.send(data);
+ }
+ catch(e)
+ {
+ // TODO: xxxpedro XHR throws or not?
+ //throw e;
+ }
+ finally
+ {
+ logXHR();
+
+ if (!spy.async)
+ {
+ self.readyState = xhrRequest.readyState;
+
+ // sometimes an error happens when calling finishXHR()
+ // Issue 3422: Firebug Lite breaks Google Instant Search
+ try
+ {
+ finishXHR();
+ }
+ catch(E)
+ {
+ }
+ }
+ }
+ };
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+ this.setRequestHeader = function(header, value)
+ {
+ spy.requestHeaders.push({name: [header], value: [value]});
+ return xhrRequest.setRequestHeader(header, value);
+ };
+
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+ this.abort = function()
+ {
+ xhrRequest.abort();
+ updateSelfProperties();
+ handleRequestStatus(false, "Aborted");
+ };
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+ this.getResponseHeader = function(header)
+ {
+ return xhrRequest.getResponseHeader(header);
+ };
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+ this.getAllResponseHeaders = function()
+ {
+ return xhrRequest.getAllResponseHeaders();
+ };
+
+ /**/
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ // Clone XHR object
+
+ // xhrRequest.open.apply not available in IE and will throw an error in
+ // IE6 by simply reading xhrRequest.open so we must sniff it
+ var supportsApply = !isIE6 &&
+ xhrRequest &&
+ xhrRequest.open &&
+ typeof xhrRequest.open.apply != "undefined";
+
+ var numberOfXHRProperties = 0;
+ for (var propName in xhrRequest)
+ {
+ numberOfXHRProperties++;
+
+ if (propName in updateSelfPropertiesIgnore)
+ continue;
+
+ try
+ {
+ var propValue = xhrRequest[propName];
+
+ if (isFunction(propValue))
+ {
+ if (typeof self[propName] == "undefined")
+ {
+ this[propName] = (function(name, xhr){
+
+ return supportsApply ?
+ // if the browser supports apply
+ function()
+ {
+ return xhr[name].apply(xhr, arguments);
+ }
+ :
+ function(a,b,c,d,e)
+ {
+ return xhr[name](a,b,c,d,e);
+ };
+
+ })(propName, xhrRequest);
+ }
+ }
+ else
+ this[propName] = propValue;
+ }
+ catch(E)
+ {
+ //console.log(propName, E.message);
+ }
+ }
+
+ // IE6 does not support for (var prop in XHR)
+ var supportsXHRIterator = numberOfXHRProperties > 0;
+
+ /**/
+
+ return this;
+};
+
+// ************************************************************************************************
+// ActiveXObject Wrapper (IE6 only)
+
+var _ActiveXObject;
+var isIE6 = /msie 6/i.test(navigator.appVersion);
+
+if (isIE6)
+{
+ _ActiveXObject = window.ActiveXObject;
+
+ var xhrObjects = " MSXML2.XMLHTTP.5.0 MSXML2.XMLHTTP.4.0 MSXML2.XMLHTTP.3.0 MSXML2.XMLHTTP Microsoft.XMLHTTP ";
+
+ window.ActiveXObject = function(name)
+ {
+ var error = null;
+
+ try
+ {
+ var activeXObject = new _ActiveXObject(name);
+ }
+ catch(e)
+ {
+ error = e;
+ }
+ finally
+ {
+ if (!error)
+ {
+ if (xhrObjects.indexOf(" " + name + " ") != -1)
+ return new XMLHttpRequestWrapper(activeXObject);
+ else
+ return activeXObject;
+ }
+ else
+ throw error.message;
+ }
+ };
+}
+
+// ************************************************************************************************
+
+// Register the XMLHttpRequestWrapper for non-IE6 browsers
+if (!isIE6)
+{
+ var _XMLHttpRequest = XMLHttpRequest;
+ window.XMLHttpRequest = function()
+ {
+ return new XMLHttpRequestWrapper();
+ };
+}
+
+//************************************************************************************************
+
+FBL.getNativeXHRObject = function()
+{
+ var xhrObj = false;
+ try
+ {
+ xhrObj = new _XMLHttpRequest();
+ }
+ catch(e)
+ {
+ var progid = [
+ "MSXML2.XMLHTTP.5.0", "MSXML2.XMLHTTP.4.0",
+ "MSXML2.XMLHTTP.3.0", "MSXML2.XMLHTTP", "Microsoft.XMLHTTP"
+ ];
+
+ for ( var i=0; i < progid.length; ++i ) {
+ try
+ {
+ xhrObj = new _ActiveXObject(progid[i]);
+ }
+ catch(e)
+ {
+ continue;
+ }
+ break;
+ }
+ }
+ finally
+ {
+ return xhrObj;
+ }
+};
+
+// ************************************************************************************************
+}});
+
+
+/* See license.txt for terms of usage */
+
+FBL.ns(function() { with (FBL) {
+// ************************************************************************************************
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+var reIgnore = /about:|javascript:|resource:|chrome:|jar:/;
+var layoutInterval = 300;
+var indentWidth = 18;
+
+var cacheSession = null;
+var contexts = new Array();
+var panelName = "net";
+var maxQueueRequests = 500;
+//var panelBar1 = $("fbPanelBar1"); // chrome not available at startup
+var activeRequests = [];
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+var mimeExtensionMap =
+{
+ "txt": "text/plain",
+ "html": "text/html",
+ "htm": "text/html",
+ "xhtml": "text/html",
+ "xml": "text/xml",
+ "css": "text/css",
+ "js": "application/x-javascript",
+ "jss": "application/x-javascript",
+ "jpg": "image/jpg",
+ "jpeg": "image/jpeg",
+ "gif": "image/gif",
+ "png": "image/png",
+ "bmp": "image/bmp",
+ "swf": "application/x-shockwave-flash",
+ "flv": "video/x-flv"
+};
+
+var fileCategories =
+{
+ "undefined": 1,
+ "html": 1,
+ "css": 1,
+ "js": 1,
+ "xhr": 1,
+ "image": 1,
+ "flash": 1,
+ "txt": 1,
+ "bin": 1
+};
+
+var textFileCategories =
+{
+ "txt": 1,
+ "html": 1,
+ "xhr": 1,
+ "css": 1,
+ "js": 1
+};
+
+var binaryFileCategories =
+{
+ "bin": 1,
+ "flash": 1
+};
+
+var mimeCategoryMap =
+{
+ "text/plain": "txt",
+ "application/octet-stream": "bin",
+ "text/html": "html",
+ "text/xml": "html",
+ "text/css": "css",
+ "application/x-javascript": "js",
+ "text/javascript": "js",
+ "application/javascript" : "js",
+ "image/jpeg": "image",
+ "image/jpg": "image",
+ "image/gif": "image",
+ "image/png": "image",
+ "image/bmp": "image",
+ "application/x-shockwave-flash": "flash",
+ "video/x-flv": "flash"
+};
+
+var binaryCategoryMap =
+{
+ "image": 1,
+ "flash" : 1
+};
+
+// ************************************************************************************************
+
+/**
+ * @module Represents a module object for the Net panel. This object is derived
+ * from <code>Firebug.ActivableModule</code> in order to support activation (enable/disable).
+ * This allows to avoid (performance) expensive features if the functionality is not necessary
+ * for the user.
+ */
+Firebug.NetMonitor = extend(Firebug.ActivableModule,
+{
+ dispatchName: "netMonitor",
+
+ clear: function(context)
+ {
+ // The user pressed a Clear button so, remove content of the panel...
+ var panel = context.getPanel(panelName, true);
+ if (panel)
+ panel.clear();
+ },
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ // extends Module
+
+ initialize: function()
+ {
+ return;
+
+ this.panelName = panelName;
+
+ Firebug.ActivableModule.initialize.apply(this, arguments);
+
+ if (Firebug.TraceModule)
+ Firebug.TraceModule.addListener(this.TraceListener);
+
+ // HTTP observer must be registered now (and not in monitorContext, since if a
+ // page is opened in a new tab the top document request would be missed otherwise.
+ NetHttpObserver.registerObserver();
+ NetHttpActivityObserver.registerObserver();
+
+ Firebug.Debugger.addListener(this.DebuggerListener);
+ },
+
+ shutdown: function()
+ {
+ return;
+
+ prefs.removeObserver(Firebug.prefDomain, this, false);
+ if (Firebug.TraceModule)
+ Firebug.TraceModule.removeListener(this.TraceListener);
+
+ NetHttpObserver.unregisterObserver();
+ NetHttpActivityObserver.unregisterObserver();
+
+ Firebug.Debugger.removeListener(this.DebuggerListener);
+ }
+});
+
+
+/**
+ * @domplate Represents a template that is used to reneder detailed info about a request.
+ * This template is rendered when a request is expanded.
+ */
+Firebug.NetMonitor.NetInfoBody = domplate(Firebug.Rep, new Firebug.Listener(),
+{
+ tag:
+ DIV({"class": "netInfoBody", _repObject: "$file"},
+ TAG("$infoTabs", {file: "$file"}),
+ TAG("$infoBodies", {file: "$file"})
+ ),
+
+ infoTabs:
+ DIV({"class": "netInfoTabs focusRow subFocusRow", "role": "tablist"},
+ A({"class": "netInfoParamsTab netInfoTab a11yFocus", onclick: "$onClickTab", "role": "tab",
+ view: "Params",
+ $collapsed: "$file|hideParams"},
+ $STR("URLParameters")
+ ),
+ A({"class": "netInfoHeadersTab netInfoTab a11yFocus", onclick: "$onClickTab", "role": "tab",
+ view: "Headers"},
+ $STR("Headers")
+ ),
+ A({"class": "netInfoPostTab netInfoTab a11yFocus", onclick: "$onClickTab", "role": "tab",
+ view: "Post",
+ $collapsed: "$file|hidePost"},
+ $STR("Post")
+ ),
+ A({"class": "netInfoPutTab netInfoTab a11yFocus", onclick: "$onClickTab", "role": "tab",
+ view: "Put",
+ $collapsed: "$file|hidePut"},
+ $STR("Put")
+ ),
+ A({"class": "netInfoResponseTab netInfoTab a11yFocus", onclick: "$onClickTab", "role": "tab",
+ view: "Response",
+ $collapsed: "$file|hideResponse"},
+ $STR("Response")
+ ),
+ A({"class": "netInfoCacheTab netInfoTab a11yFocus", onclick: "$onClickTab", "role": "tab",
+ view: "Cache",
+ $collapsed: "$file|hideCache"},
+ $STR("Cache")
+ ),
+ A({"class": "netInfoHtmlTab netInfoTab a11yFocus", onclick: "$onClickTab", "role": "tab",
+ view: "Html",
+ $collapsed: "$file|hideHtml"},
+ $STR("HTML")
+ )
+ ),
+
+ infoBodies:
+ DIV({"class": "netInfoBodies outerFocusRow"},
+ TABLE({"class": "netInfoParamsText netInfoText netInfoParamsTable", "role": "tabpanel",
+ cellpadding: 0, cellspacing: 0}, TBODY()),
+ DIV({"class": "netInfoHeadersText netInfoText", "role": "tabpanel"}),
+ DIV({"class": "netInfoPostText netInfoText", "role": "tabpanel"}),
+ DIV({"class": "netInfoPutText netInfoText", "role": "tabpanel"}),
+ PRE({"class": "netInfoResponseText netInfoText", "role": "tabpanel"}),
+ DIV({"class": "netInfoCacheText netInfoText", "role": "tabpanel"},
+ TABLE({"class": "netInfoCacheTable", cellpadding: 0, cellspacing: 0, "role": "presentation"},
+ TBODY({"role": "list", "aria-label": $STR("Cache")})
+ )
+ ),
+ DIV({"class": "netInfoHtmlText netInfoText", "role": "tabpanel"},
+ IFRAME({"class": "netInfoHtmlPreview", "role": "document"})
+ )
+ ),
+
+ headerDataTag:
+ FOR("param", "$headers",
+ TR({"role": "listitem"},
+ TD({"class": "netInfoParamName", "role": "presentation"},
+ TAG("$param|getNameTag", {param: "$param"})
+ ),
+ TD({"class": "netInfoParamValue", "role": "list", "aria-label": "$param.name"},
+ FOR("line", "$param|getParamValueIterator",
+ CODE({"class": "focusRow subFocusRow", "role": "listitem"}, "$line")
+ )
+ )
+ )
+ ),
+
+ customTab:
+ A({"class": "netInfo$tabId\\Tab netInfoTab", onclick: "$onClickTab", view: "$tabId", "role": "tab"},
+ "$tabTitle"
+ ),
+
+ customBody:
+ DIV({"class": "netInfo$tabId\\Text netInfoText", "role": "tabpanel"}),
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+ nameTag:
+ SPAN("$param|getParamName"),
+
+ nameWithTooltipTag:
+ SPAN({title: "$param.name"}, "$param|getParamName"),
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+ getNameTag: function(param)
+ {
+ return (this.getParamName(param) == param.name) ? this.nameTag : this.nameWithTooltipTag;
+ },
+
+ getParamName: function(param)
+ {
+ var limit = 25;
+ var name = param.name;
+ if (name.length > limit)
+ name = name.substr(0, limit) + "...";
+ return name;
+ },
+
+ getParamTitle: function(param)
+ {
+ var limit = 25;
+ var name = param.name;
+ if (name.length > limit)
+ return name;
+ return "";
+ },
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+ hideParams: function(file)
+ {
+ return !file.urlParams || !file.urlParams.length;
+ },
+
+ hidePost: function(file)
+ {
+ return file.method.toUpperCase() != "POST";
+ },
+
+ hidePut: function(file)
+ {
+ return file.method.toUpperCase() != "PUT";
+ },
+
+ hideResponse: function(file)
+ {
+ return false;
+ //return file.category in binaryFileCategories;
+ },
+
+ hideCache: function(file)
+ {
+ return true;
+ //xxxHonza: I don't see any reason why not to display the cache also info for images.
+ return !file.cacheEntry; // || file.category=="image";
+ },
+
+ hideHtml: function(file)
+ {
+ return (file.mimeType != "text/html") && (file.mimeType != "application/xhtml+xml");
+ },
+
+ onClickTab: function(event)
+ {
+ this.selectTab(event.currentTarget || event.srcElement);
+ },
+
+ getParamValueIterator: function(param)
+ {
+ // TODO: xxxpedro console2
+ return param.value;
+
+ // This value is inserted into CODE element and so, make sure the HTML isn't escaped (1210).
+ // This is why the second parameter is true.
+ // The CODE (with style white-space:pre) element preserves whitespaces so they are
+ // displayed the same, as they come from the server (1194).
+ // In case of a long header values of post parameters the value must be wrapped (2105).
+ return wrapText(param.value, true);
+ },
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+ appendTab: function(netInfoBox, tabId, tabTitle)
+ {
+ // Create new tab and body.
+ var args = {tabId: tabId, tabTitle: tabTitle};
+ ///this.customTab.append(args, netInfoBox.getElementsByClassName("netInfoTabs").item(0));
+ ///this.customBody.append(args, netInfoBox.getElementsByClassName("netInfoBodies").item(0));
+ this.customTab.append(args, $$(".netInfoTabs", netInfoBox)[0]);
+ this.customBody.append(args, $$(".netInfoBodies", netInfoBox)[0]);
+ },
+
+ selectTabByName: function(netInfoBox, tabName)
+ {
+ var tab = getChildByClass(netInfoBox, "netInfoTabs", "netInfo"+tabName+"Tab");
+ if (tab)
+ this.selectTab(tab);
+ },
+
+ selectTab: function(tab)
+ {
+ var view = tab.getAttribute("view");
+
+ var netInfoBox = getAncestorByClass(tab, "netInfoBody");
+
+ var selectedTab = netInfoBox.selectedTab;
+
+ if (selectedTab)
+ {
+ //netInfoBox.selectedText.removeAttribute("selected");
+ removeClass(netInfoBox.selectedText, "netInfoTextSelected");
+
+ removeClass(selectedTab, "netInfoTabSelected");
+ //selectedTab.removeAttribute("selected");
+ selectedTab.setAttribute("aria-selected", "false");
+ }
+
+ var textBodyName = "netInfo" + view + "Text";
+
+ selectedTab = netInfoBox.selectedTab = tab;
+
+ netInfoBox.selectedText = $$("."+textBodyName, netInfoBox)[0];
+ //netInfoBox.selectedText = netInfoBox.getElementsByClassName(textBodyName).item(0);
+
+ //netInfoBox.selectedText.setAttribute("selected", "true");
+ setClass(netInfoBox.selectedText, "netInfoTextSelected");
+
+ setClass(selectedTab, "netInfoTabSelected");
+ selectedTab.setAttribute("selected", "true");
+ selectedTab.setAttribute("aria-selected", "true");
+
+ var file = Firebug.getRepObject(netInfoBox);
+
+ //var context = Firebug.getElementPanel(netInfoBox).context;
+ var context = Firebug.chrome;
+
+ this.updateInfo(netInfoBox, file, context);
+ },
+
+ updateInfo: function(netInfoBox, file, context)
+ {
+ if (FBTrace.DBG_NET)
+ FBTrace.sysout("net.updateInfo; file", file);
+
+ if (!netInfoBox)
+ {
+ if (FBTrace.DBG_NET || FBTrace.DBG_ERRORS)
+ FBTrace.sysout("net.updateInfo; ERROR netInfo == null " + file.href, file);
+ return;
+ }
+
+ var tab = netInfoBox.selectedTab;
+
+ if (hasClass(tab, "netInfoParamsTab"))
+ {
+ if (file.urlParams && !netInfoBox.urlParamsPresented)
+ {
+ netInfoBox.urlParamsPresented = true;
+ this.insertHeaderRows(netInfoBox, file.urlParams, "Params");
+ }
+ }
+
+ else if (hasClass(tab, "netInfoHeadersTab"))
+ {
+ var headersText = $$(".netInfoHeadersText", netInfoBox)[0];
+ //var headersText = netInfoBox.getElementsByClassName("netInfoHeadersText").item(0);
+
+ if (file.responseHeaders && !netInfoBox.responseHeadersPresented)
+ {
+ netInfoBox.responseHeadersPresented = true;
+ NetInfoHeaders.renderHeaders(headersText, file.responseHeaders, "ResponseHeaders");
+ }
+
+ if (file.requestHeaders && !netInfoBox.requestHeadersPresented)
+ {
+ netInfoBox.requestHeadersPresented = true;
+ NetInfoHeaders.renderHeaders(headersText, file.requestHeaders, "RequestHeaders");
+ }
+ }
+
+ else if (hasClass(tab, "netInfoPostTab"))
+ {
+ if (!netInfoBox.postPresented)
+ {
+ netInfoBox.postPresented = true;
+ //var postText = netInfoBox.getElementsByClassName("netInfoPostText").item(0);
+ var postText = $$(".netInfoPostText", netInfoBox)[0];
+ NetInfoPostData.render(context, postText, file);
+ }
+ }
+
+ else if (hasClass(tab, "netInfoPutTab"))
+ {
+ if (!netInfoBox.putPresented)
+ {
+ netInfoBox.putPresented = true;
+ //var putText = netInfoBox.getElementsByClassName("netInfoPutText").item(0);
+ var putText = $$(".netInfoPutText", netInfoBox)[0];
+ NetInfoPostData.render(context, putText, file);
+ }
+ }
+
+ else if (hasClass(tab, "netInfoResponseTab") && file.loaded && !netInfoBox.responsePresented)
+ {
+ ///var responseTextBox = netInfoBox.getElementsByClassName("netInfoResponseText").item(0);
+ var responseTextBox = $$(".netInfoResponseText", netInfoBox)[0];
+ if (file.category == "image")
+ {
+ netInfoBox.responsePresented = true;
+
+ var responseImage = netInfoBox.ownerDocument.createElement("img");
+ responseImage.src = file.href;
+
+ clearNode(responseTextBox);
+ responseTextBox.appendChild(responseImage, responseTextBox);
+ }
+ else ///if (!(binaryCategoryMap.hasOwnProperty(file.category)))
+ {
+ this.setResponseText(file, netInfoBox, responseTextBox, context);
+ }
+ }
+
+ else if (hasClass(tab, "netInfoCacheTab") && file.loaded && !netInfoBox.cachePresented)
+ {
+ var responseTextBox = netInfoBox.getElementsByClassName("netInfoCacheText").item(0);
+ if (file.cacheEntry) {
+ netInfoBox.cachePresented = true;
+ this.insertHeaderRows(netInfoBox, file.cacheEntry, "Cache");
+ }
+ }
+
+ else if (hasClass(tab, "netInfoHtmlTab") && file.loaded && !netInfoBox.htmlPresented)
+ {
+ netInfoBox.htmlPresented = true;
+
+ var text = Utils.getResponseText(file, context);
+
+ ///var iframe = netInfoBox.getElementsByClassName("netInfoHtmlPreview").item(0);
+ var iframe = $$(".netInfoHtmlPreview", netInfoBox)[0];
+
+ ///iframe.contentWindow.document.body.innerHTML = text;
+
+ // TODO: xxxpedro net - remove scripts
+ var reScript = /<script(.|\s)*?\/script>/gi;
+
+ text = text.replace(reScript, "");
+
+ iframe.contentWindow.document.write(text);
+ iframe.contentWindow.document.close();
+ }
+
+ // Notify listeners about update so, content of custom tabs can be updated.
+ dispatch(NetInfoBody.fbListeners, "updateTabBody", [netInfoBox, file, context]);
+ },
+
+ setResponseText: function(file, netInfoBox, responseTextBox, context)
+ {
+ //**********************************************
+ //**********************************************
+ //**********************************************
+ netInfoBox.responsePresented = true;
+ // line breaks somehow are different in IE
+ // make this only once in the initialization? we don't have net panels and modules yet.
+ if (isIE)
+ responseTextBox.style.whiteSpace = "nowrap";
+
+ responseTextBox[
+ typeof responseTextBox.textContent != "undefined" ?
+ "textContent" :
+ "innerText"
+ ] = file.responseText;
+
+ return;
+ //**********************************************
+ //**********************************************
+ //**********************************************
+
+ // Get response text and make sure it doesn't exceed the max limit.
+ var text = Utils.getResponseText(file, context);
+ var limit = Firebug.netDisplayedResponseLimit + 15;
+ var limitReached = text ? (text.length > limit) : false;
+ if (limitReached)
+ text = text.substr(0, limit) + "...";
+
+ // Insert the response into the UI.
+ if (text)
+ insertWrappedText(text, responseTextBox);
+ else
+ insertWrappedText("", responseTextBox);
+
+ // Append a message informing the user that the response isn't fully displayed.
+ if (limitReached)
+ {
+ var object = {
+ text: $STR("net.responseSizeLimitMessage"),
+ onClickLink: function() {
+ var panel = context.getPanel("net", true);
+ panel.openResponseInTab(file);
+ }
+ };
+ Firebug.NetMonitor.ResponseSizeLimit.append(object, responseTextBox);
+ }
+
+ netInfoBox.responsePresented = true;
+
+ if (FBTrace.DBG_NET)
+ FBTrace.sysout("net.setResponseText; response text updated");
+ },
+
+ insertHeaderRows: function(netInfoBox, headers, tableName, rowName)
+ {
+ if (!headers.length)
+ return;
+
+ var headersTable = $$(".netInfo"+tableName+"Table", netInfoBox)[0];
+ //var headersTable = netInfoBox.getElementsByClassName("netInfo"+tableName+"Table").item(0);
+ var tbody = getChildByClass(headersTable, "netInfo" + rowName + "Body");
+ if (!tbody)
+ tbody = headersTable.firstChild;
+ var titleRow = getChildByClass(tbody, "netInfo" + rowName + "Title");
+
+ this.headerDataTag.insertRows({headers: headers}, titleRow ? titleRow : tbody);
+ removeClass(titleRow, "collapsed");
+ }
+});
+
+var NetInfoBody = Firebug.NetMonitor.NetInfoBody;
+
+// ************************************************************************************************
+
+/**
+ * @domplate Used within the Net panel to display raw source of request and response headers
+ * as well as pretty-formatted summary of these headers.
+ */
+Firebug.NetMonitor.NetInfoHeaders = domplate(Firebug.Rep, //new Firebug.Listener(),
+{
+ tag:
+ DIV({"class": "netInfoHeadersTable", "role": "tabpanel"},
+ DIV({"class": "netInfoHeadersGroup netInfoResponseHeadersTitle"},
+ SPAN($STR("ResponseHeaders")),
+ SPAN({"class": "netHeadersViewSource response collapsed", onclick: "$onViewSource",
+ _sourceDisplayed: false, _rowName: "ResponseHeaders"},
+ $STR("net.headers.view source")
+ )
+ ),
+ TABLE({cellpadding: 0, cellspacing: 0},
+ TBODY({"class": "netInfoResponseHeadersBody", "role": "list",
+ "aria-label": $STR("ResponseHeaders")})
+ ),
+ DIV({"class": "netInfoHeadersGroup netInfoRequestHeadersTitle"},
+ SPAN($STR("RequestHeaders")),
+ SPAN({"class": "netHeadersViewSource request collapsed", onclick: "$onViewSource",
+ _sourceDisplayed: false, _rowName: "RequestHeaders"},
+ $STR("net.headers.view source")
+ )
+ ),
+ TABLE({cellpadding: 0, cellspacing: 0},
+ TBODY({"class": "netInfoRequestHeadersBody", "role": "list",
+ "aria-label": $STR("RequestHeaders")})
+ )
+ ),
+
+ sourceTag:
+ TR({"role": "presentation"},
+ TD({colspan: 2, "role": "presentation"},
+ PRE({"class": "source"})
+ )
+ ),
+
+ onViewSource: function(event)
+ {
+ var target = event.target;
+ var requestHeaders = (target.rowName == "RequestHeaders");
+
+ var netInfoBox = getAncestorByClass(target, "netInfoBody");
+ var file = netInfoBox.repObject;
+
+ if (target.sourceDisplayed)
+ {
+ var headers = requestHeaders ? file.requestHeaders : file.responseHeaders;
+ this.insertHeaderRows(netInfoBox, headers, target.rowName);
+ target.innerHTML = $STR("net.headers.view source");
+ }
+ else
+ {
+ var source = requestHeaders ? file.requestHeadersText : file.responseHeadersText;
+ this.insertSource(netInfoBox, source, target.rowName);
+ target.innerHTML = $STR("net.headers.pretty print");
+ }
+
+ target.sourceDisplayed = !target.sourceDisplayed;
+
+ cancelEvent(event);
+ },
+
+ insertSource: function(netInfoBox, source, rowName)
+ {
+ // This breaks copy to clipboard.
+ //if (source)
+ // source = source.replace(/\r\n/gm, "<span style='color:lightgray'>\\r\\n</span>\r\n");
+
+ ///var tbody = netInfoBox.getElementsByClassName("netInfo" + rowName + "Body").item(0);
+ var tbody = $$(".netInfo" + rowName + "Body", netInfoBox)[0];
+ var node = this.sourceTag.replace({}, tbody);
+ ///var sourceNode = node.getElementsByClassName("source").item(0);
+ var sourceNode = $$(".source", node)[0];
+ sourceNode.innerHTML = source;
+ },
+
+ insertHeaderRows: function(netInfoBox, headers, rowName)
+ {
+ var headersTable = $$(".netInfoHeadersTable", netInfoBox)[0];
+ var tbody = $$(".netInfo" + rowName + "Body", headersTable)[0];
+
+ //var headersTable = netInfoBox.getElementsByClassName("netInfoHeadersTable").item(0);
+ //var tbody = headersTable.getElementsByClassName("netInfo" + rowName + "Body").item(0);
+
+ clearNode(tbody);
+
+ if (!headers.length)
+ return;
+
+ NetInfoBody.headerDataTag.insertRows({headers: headers}, tbody);
+
+ var titleRow = getChildByClass(headersTable, "netInfo" + rowName + "Title");
+ removeClass(titleRow, "collapsed");
+ },
+
+ init: function(parent)
+ {
+ var rootNode = this.tag.append({}, parent);
+
+ var netInfoBox = getAncestorByClass(parent, "netInfoBody");
+ var file = netInfoBox.repObject;
+
+ var viewSource;
+
+ viewSource = $$(".request", rootNode)[0];
+ //viewSource = rootNode.getElementsByClassName("netHeadersViewSource request").item(0);
+ if (file.requestHeadersText)
+ removeClass(viewSource, "collapsed");
+
+ viewSource = $$(".response", rootNode)[0];
+ //viewSource = rootNode.getElementsByClassName("netHeadersViewSource response").item(0);
+ if (file.responseHeadersText)
+ removeClass(viewSource, "collapsed");
+ },
+
+ renderHeaders: function(parent, headers, rowName)
+ {
+ if (!parent.firstChild)
+ this.init(parent);
+
+ this.insertHeaderRows(parent, headers, rowName);
+ }
+});
+
+var NetInfoHeaders = Firebug.NetMonitor.NetInfoHeaders;
+
+// ************************************************************************************************
+
+/**
+ * @domplate Represents posted data within request info (the info, which is visible when
+ * a request entry is expanded. This template renders content of the Post tab.
+ */
+Firebug.NetMonitor.NetInfoPostData = domplate(Firebug.Rep, /*new Firebug.Listener(),*/
+{
+ // application/x-www-form-urlencoded
+ paramsTable:
+ TABLE({"class": "netInfoPostParamsTable", cellpadding: 0, cellspacing: 0, "role": "presentation"},
+ TBODY({"role": "list", "aria-label": $STR("net.label.Parameters")},
+ TR({"class": "netInfoPostParamsTitle", "role": "presentation"},
+ TD({colspan: 3, "role": "presentation"},
+ DIV({"class": "netInfoPostParams"},
+ $STR("net.label.Parameters"),
+ SPAN({"class": "netInfoPostContentType"},
+ "application/x-www-form-urlencoded"
+ )
+ )
+ )
+ )
+ )
+ ),
+
+ // multipart/form-data
+ partsTable:
+ TABLE({"class": "netInfoPostPartsTable", cellpadding: 0, cellspacing: 0, "role": "presentation"},
+ TBODY({"role": "list", "aria-label": $STR("net.label.Parts")},
+ TR({"class": "netInfoPostPartsTitle", "role": "presentation"},
+ TD({colspan: 2, "role":"presentation" },
+ DIV({"class": "netInfoPostParams"},
+ $STR("net.label.Parts"),
+ SPAN({"class": "netInfoPostContentType"},
+ "multipart/form-data"
+ )
+ )
+ )
+ )
+ )
+ ),
+
+ // application/json
+ jsonTable:
+ TABLE({"class": "netInfoPostJSONTable", cellpadding: 0, cellspacing: 0, "role": "presentation"},
+ ///TBODY({"role": "list", "aria-label": $STR("jsonviewer.tab.JSON")},
+ TBODY({"role": "list", "aria-label": $STR("JSON")},
+ TR({"class": "netInfoPostJSONTitle", "role": "presentation"},
+ TD({"role": "presentation" },
+ DIV({"class": "netInfoPostParams"},
+ ///$STR("jsonviewer.tab.JSON")
+ $STR("JSON")
+ )
+ )
+ ),
+ TR(
+ TD({"class": "netInfoPostJSONBody"})
+ )
+ )
+ ),
+
+ // application/xml
+ xmlTable:
+ TABLE({"class": "netInfoPostXMLTable", cellpadding: 0, cellspacing: 0, "role": "presentation"},
+ TBODY({"role": "list", "aria-label": $STR("xmlviewer.tab.XML")},
+ TR({"class": "netInfoPostXMLTitle", "role": "presentation"},
+ TD({"role": "presentation" },
+ DIV({"class": "netInfoPostParams"},
+ $STR("xmlviewer.tab.XML")
+ )
+ )
+ ),
+ TR(
+ TD({"class": "netInfoPostXMLBody"})
+ )
+ )
+ ),
+
+ sourceTable:
+ TABLE({"class": "netInfoPostSourceTable", cellpadding: 0, cellspacing: 0, "role": "presentation"},
+ TBODY({"role": "list", "aria-label": $STR("net.label.Source")},
+ TR({"class": "netInfoPostSourceTitle", "role": "presentation"},
+ TD({colspan: 2, "role": "presentation"},
+ DIV({"class": "netInfoPostSource"},
+ $STR("net.label.Source")
+ )
+ )
+ )
+ )
+ ),
+
+ sourceBodyTag:
+ TR({"role": "presentation"},
+ TD({colspan: 2, "role": "presentation"},
+ FOR("line", "$param|getParamValueIterator",
+ CODE({"class":"focusRow subFocusRow" , "role": "listitem"},"$line")
+ )
+ )
+ ),
+
+ getParamValueIterator: function(param)
+ {
+ return NetInfoBody.getParamValueIterator(param);
+ },
+
+ render: function(context, parentNode, file)
+ {
+ //debugger;
+ var spy = getAncestorByClass(parentNode, "spyHead");
+ var spyObject = spy.repObject;
+ var data = spyObject.data;
+
+ ///var contentType = Utils.findHeader(file.requestHeaders, "content-type");
+ var contentType = file.mimeType;
+
+ ///var text = Utils.getPostText(file, context, true);
+ ///if (text == undefined)
+ /// return;
+
+ ///if (Utils.isURLEncodedRequest(file, context))
+ // fake Utils.isURLEncodedRequest identification
+ if (contentType && contentType == "application/x-www-form-urlencoded" ||
+ data && data.indexOf("=") != -1)
+ {
+ ///var lines = text.split("\n");
+ ///var params = parseURLEncodedText(lines[lines.length-1]);
+ var params = parseURLEncodedTextArray(data);
+ if (params)
+ this.insertParameters(parentNode, params);
+ }
+
+ ///if (Utils.isMultiPartRequest(file, context))
+ ///{
+ /// var data = this.parseMultiPartText(file, context);
+ /// if (data)
+ /// this.insertParts(parentNode, data);
+ ///}
+
+ // moved to the top
+ ///var contentType = Utils.findHeader(file.requestHeaders, "content-type");
+
+ ///if (Firebug.JSONViewerModel.isJSON(contentType))
+ var jsonData = {
+ responseText: data
+ };
+
+ if (Firebug.JSONViewerModel.isJSON(contentType, data))
+ ///this.insertJSON(parentNode, file, context);
+ this.insertJSON(parentNode, jsonData, context);
+
+ ///if (Firebug.XMLViewerModel.isXML(contentType))
+ /// this.insertXML(parentNode, file, context);
+
+ ///var postText = Utils.getPostText(file, context);
+ ///postText = Utils.formatPostText(postText);
+ var postText = data;
+ if (postText)
+ this.insertSource(parentNode, postText);
+ },
+
+ insertParameters: function(parentNode, params)
+ {
+ if (!params || !params.length)
+ return;
+
+ var paramTable = this.paramsTable.append({object:{}}, parentNode);
+ var row = $$(".netInfoPostParamsTitle", paramTable)[0];
+ //var paramTable = this.paramsTable.append(null, parentNode);
+ //var row = paramTable.getElementsByClassName("netInfoPostParamsTitle").item(0);
+
+ var tbody = paramTable.getElementsByTagName("tbody")[0];
+
+ NetInfoBody.headerDataTag.insertRows({headers: params}, row);
+ },
+
+ insertParts: function(parentNode, data)
+ {
+ if (!data.params || !data.params.length)
+ return;
+
+ var partsTable = this.partsTable.append({object:{}}, parentNode);
+ var row = $$(".netInfoPostPartsTitle", paramTable)[0];
+ //var partsTable = this.partsTable.append(null, parentNode);
+ //var row = partsTable.getElementsByClassName("netInfoPostPartsTitle").item(0);
+
+ NetInfoBody.headerDataTag.insertRows({headers: data.params}, row);
+ },
+
+ insertJSON: function(parentNode, file, context)
+ {
+ ///var text = Utils.getPostText(file, context);
+ var text = file.responseText;
+ ///var data = parseJSONString(text, "http://" + file.request.originalURI.host);
+ var data = parseJSONString(text);
+ if (!data)
+ return;
+
+ ///var jsonTable = this.jsonTable.append(null, parentNode);
+ var jsonTable = this.jsonTable.append({}, parentNode);
+ ///var jsonBody = jsonTable.getElementsByClassName("netInfoPostJSONBody").item(0);
+ var jsonBody = $$(".netInfoPostJSONBody", jsonTable)[0];
+
+ if (!this.toggles)
+ this.toggles = {};
+
+ Firebug.DOMPanel.DirTable.tag.replace(
+ {object: data, toggles: this.toggles}, jsonBody);
+ },
+
+ insertXML: function(parentNode, file, context)
+ {
+ var text = Utils.getPostText(file, context);
+
+ var jsonTable = this.xmlTable.append(null, parentNode);
+ ///var jsonBody = jsonTable.getElementsByClassName("netInfoPostXMLBody").item(0);
+ var jsonBody = $$(".netInfoPostXMLBody", jsonTable)[0];
+
+ Firebug.XMLViewerModel.insertXML(jsonBody, text);
+ },
+
+ insertSource: function(parentNode, text)
+ {
+ var sourceTable = this.sourceTable.append({object:{}}, parentNode);
+ var row = $$(".netInfoPostSourceTitle", sourceTable)[0];
+ //var sourceTable = this.sourceTable.append(null, parentNode);
+ //var row = sourceTable.getElementsByClassName("netInfoPostSourceTitle").item(0);
+
+ var param = {value: [text]};
+ this.sourceBodyTag.insertRows({param: param}, row);
+ },
+
+ parseMultiPartText: function(file, context)
+ {
+ var text = Utils.getPostText(file, context);
+ if (text == undefined)
+ return null;
+
+ FBTrace.sysout("net.parseMultiPartText; boundary: ", text);
+
+ var boundary = text.match(/\s*boundary=\s*(.*)/)[1];
+
+ var divider = "\r\n\r\n";
+ var bodyStart = text.indexOf(divider);
+ var body = text.substr(bodyStart + divider.length);
+
+ var postData = {};
+ postData.mimeType = "multipart/form-data";
+ postData.params = [];
+
+ var parts = body.split("--" + boundary);
+ for (var i=0; i<parts.length; i++)
+ {
+ var part = parts[i].split(divider);
+ if (part.length != 2)
+ continue;
+
+ var m = part[0].match(/\s*name=\"(.*)\"(;|$)/);
+ postData.params.push({
+ name: (m && m.length > 1) ? m[1] : "",
+ value: trim(part[1])
+ });
+ }
+
+ return postData;
+ }
+});
+
+var NetInfoPostData = Firebug.NetMonitor.NetInfoPostData;
+
+// ************************************************************************************************
+
+
+// TODO: xxxpedro net i18n
+var $STRP = function(a){return a;};
+
+Firebug.NetMonitor.NetLimit = domplate(Firebug.Rep,
+{
+ collapsed: true,
+
+ tableTag:
+ DIV(
+ TABLE({width: "100%", cellpadding: 0, cellspacing: 0},
+ TBODY()
+ )
+ ),
+
+ limitTag:
+ TR({"class": "netRow netLimitRow", $collapsed: "$isCollapsed"},
+ TD({"class": "netCol netLimitCol", colspan: 6},
+ TABLE({cellpadding: 0, cellspacing: 0},
+ TBODY(
+ TR(
+ TD(
+ SPAN({"class": "netLimitLabel"},
+ $STRP("plural.Limit_Exceeded", [0])
+ )
+ ),
+ TD({style: "width:100%"}),
+ TD(
+ BUTTON({"class": "netLimitButton", title: "$limitPrefsTitle",
+ onclick: "$onPreferences"},
+ $STR("LimitPrefs")
+ )
+ ),
+ TD(" ")
+ )
+ )
+ )
+ )
+ ),
+
+ isCollapsed: function()
+ {
+ return this.collapsed;
+ },
+
+ onPreferences: function(event)
+ {
+ openNewTab("about:config");
+ },
+
+ updateCounter: function(row)
+ {
+ removeClass(row, "collapsed");
+
+ // Update info within the limit row.
+ var limitLabel = row.getElementsByClassName("netLimitLabel").item(0);
+ limitLabel.firstChild.nodeValue = $STRP("plural.Limit_Exceeded", [row.limitInfo.totalCount]);
+ },
+
+ createTable: function(parent, limitInfo)
+ {
+ var table = this.tableTag.replace({}, parent);
+ var row = this.createRow(table.firstChild.firstChild, limitInfo);
+ return [table, row];
+ },
+
+ createRow: function(parent, limitInfo)
+ {
+ var row = this.limitTag.insertRows(limitInfo, parent, this)[0];
+ row.limitInfo = limitInfo;
+ return row;
+ },
+
+ // nsIPrefObserver
+ observe: function(subject, topic, data)
+ {
+ // We're observing preferences only.
+ if (topic != "nsPref:changed")
+ return;
+
+ if (data.indexOf("net.logLimit") != -1)
+ this.updateMaxLimit();
+ },
+
+ updateMaxLimit: function()
+ {
+ var value = Firebug.getPref(Firebug.prefDomain, "net.logLimit");
+ maxQueueRequests = value ? value : maxQueueRequests;
+ }
+});
+
+var NetLimit = Firebug.NetMonitor.NetLimit;
+
+// ************************************************************************************************
+
+Firebug.NetMonitor.ResponseSizeLimit = domplate(Firebug.Rep,
+{
+ tag:
+ DIV({"class": "netInfoResponseSizeLimit"},
+ SPAN("$object.beforeLink"),
+ A({"class": "objectLink", onclick: "$onClickLink"},
+ "$object.linkText"
+ ),
+ SPAN("$object.afterLink")
+ ),
+
+ reLink: /^(.*)<a>(.*)<\/a>(.*$)/,
+ append: function(obj, parent)
+ {
+ var m = obj.text.match(this.reLink);
+ return this.tag.append({onClickLink: obj.onClickLink,
+ object: {
+ beforeLink: m[1],
+ linkText: m[2],
+ afterLink: m[3]
+ }}, parent, this);
+ }
+});
+
+// ************************************************************************************************
+// ************************************************************************************************
+
+Firebug.NetMonitor.Utils =
+{
+ findHeader: function(headers, name)
+ {
+ if (!headers)
+ return null;
+
+ name = name.toLowerCase();
+ for (var i = 0; i < headers.length; ++i)
+ {
+ var headerName = headers[i].name.toLowerCase();
+ if (headerName == name)
+ return headers[i].value;
+ }
+ },
+
+ formatPostText: function(text)
+ {
+ if (text instanceof XMLDocument)
+ return getElementXML(text.documentElement);
+ else
+ return text;
+ },
+
+ getPostText: function(file, context, noLimit)
+ {
+ if (!file.postText)
+ {
+ file.postText = readPostTextFromRequest(file.request, context);
+
+ if (!file.postText && context)
+ file.postText = readPostTextFromPage(file.href, context);
+ }
+
+ if (!file.postText)
+ return file.postText;
+
+ var limit = Firebug.netDisplayedPostBodyLimit;
+ if (file.postText.length > limit && !noLimit)
+ {
+ return cropString(file.postText, limit,
+ "\n\n... " + $STR("net.postDataSizeLimitMessage") + " ...\n\n");
+ }
+
+ return file.postText;
+ },
+
+ getResponseText: function(file, context)
+ {
+ // The response can be also empty string so, check agains "undefined".
+ return (typeof(file.responseText) != "undefined")? file.responseText :
+ context.sourceCache.loadText(file.href, file.method, file);
+ },
+
+ isURLEncodedRequest: function(file, context)
+ {
+ var text = Utils.getPostText(file, context);
+ if (text && text.toLowerCase().indexOf("content-type: application/x-www-form-urlencoded") == 0)
+ return true;
+
+ // The header value doesn't have to be always exactly "application/x-www-form-urlencoded",
+ // there can be even charset specified. So, use indexOf rather than just "==".
+ var headerValue = Utils.findHeader(file.requestHeaders, "content-type");
+ if (headerValue && headerValue.indexOf("application/x-www-form-urlencoded") == 0)
+ return true;
+
+ return false;
+ },
+
+ isMultiPartRequest: function(file, context)
+ {
+ var text = Utils.getPostText(file, context);
+ if (text && text.toLowerCase().indexOf("content-type: multipart/form-data") == 0)
+ return true;
+ return false;
+ },
+
+ getMimeType: function(mimeType, uri)
+ {
+ if (!mimeType || !(mimeCategoryMap.hasOwnProperty(mimeType)))
+ {
+ var ext = getFileExtension(uri);
+ if (!ext)
+ return mimeType;
+ else
+ {
+ var extMimeType = mimeExtensionMap[ext.toLowerCase()];
+ return extMimeType ? extMimeType : mimeType;
+ }
+ }
+ else
+ return mimeType;
+ },
+
+ getDateFromSeconds: function(s)
+ {
+ var d = new Date();
+ d.setTime(s*1000);
+ return d;
+ },
+
+ getHttpHeaders: function(request, file)
+ {
+ try
+ {
+ var http = QI(request, Ci.nsIHttpChannel);
+ file.status = request.responseStatus;
+
+ // xxxHonza: is there any problem to do this in requestedFile method?
+ file.method = http.requestMethod;
+ file.urlParams = parseURLParams(file.href);
+ file.mimeType = Utils.getMimeType(request.contentType, request.name);
+
+ if (!file.responseHeaders && Firebug.collectHttpHeaders)
+ {
+ var requestHeaders = [], responseHeaders = [];
+
+ http.visitRequestHeaders({
+ visitHeader: function(name, value)
+ {
+ requestHeaders.push({name: name, value: value});
+ }
+ });
+ http.visitResponseHeaders({
+ visitHeader: function(name, value)
+ {
+ responseHeaders.push({name: name, value: value});
+ }
+ });
+
+ file.requestHeaders = requestHeaders;
+ file.responseHeaders = responseHeaders;
+ }
+ }
+ catch (exc)
+ {
+ // An exception can be throwed e.g. when the request is aborted and
+ // request.responseStatus is accessed.
+ if (FBTrace.DBG_ERRORS)
+ FBTrace.sysout("net.getHttpHeaders FAILS " + file.href, exc);
+ }
+ },
+
+ isXHR: function(request)
+ {
+ try
+ {
+ var callbacks = request.notificationCallbacks;
+ var xhrRequest = callbacks ? callbacks.getInterface(Ci.nsIXMLHttpRequest) : null;
+ if (FBTrace.DBG_NET)
+ FBTrace.sysout("net.isXHR; " + (xhrRequest != null) + ", " + safeGetName(request));
+
+ return (xhrRequest != null);
+ }
+ catch (exc)
+ {
+ }
+
+ return false;
+ },
+
+ getFileCategory: function(file)
+ {
+ if (file.category)
+ {
+ if (FBTrace.DBG_NET)
+ FBTrace.sysout("net.getFileCategory; current: " + file.category + " for: " + file.href, file);
+ return file.category;
+ }
+
+ if (file.isXHR)
+ {
+ if (FBTrace.DBG_NET)
+ FBTrace.sysout("net.getFileCategory; XHR for: " + file.href, file);
+ return file.category = "xhr";
+ }
+
+ if (!file.mimeType)
+ {
+ var ext = getFileExtension(file.href);
+ if (ext)
+ file.mimeType = mimeExtensionMap[ext.toLowerCase()];
+ }
+
+ /*if (FBTrace.DBG_NET)
+ FBTrace.sysout("net.getFileCategory; " + mimeCategoryMap[file.mimeType] +
+ ", mimeType: " + file.mimeType + " for: " + file.href, file);*/
+
+ if (!file.mimeType)
+ return "";
+
+ // Solve cases when charset is also specified, eg "text/html; charset=UTF-8".
+ var mimeType = file.mimeType;
+ if (mimeType)
+ mimeType = mimeType.split(";")[0];
+
+ return (file.category = mimeCategoryMap[mimeType]);
+ }
+};
+
+var Utils = Firebug.NetMonitor.Utils;
+
+// ************************************************************************************************
+
+//Firebug.registerRep(Firebug.NetMonitor.NetRequestTable);
+//Firebug.registerActivableModule(Firebug.NetMonitor);
+//Firebug.registerPanel(NetPanel);
+
+Firebug.registerModule(Firebug.NetMonitor);
+//Firebug.registerRep(Firebug.NetMonitor.BreakpointRep);
+
+// ************************************************************************************************
+}});
+
+
+/* See license.txt for terms of usage */
+
+FBL.ns(function() { with (FBL) {
+
+// ************************************************************************************************
+// Constants
+
+//const Cc = Components.classes;
+//const Ci = Components.interfaces;
+
+// List of contexts with XHR spy attached.
+var contexts = [];
+
+// ************************************************************************************************
+// Spy Module
+
+/**
+ * @module Represents a XHR Spy module. The main purpose of the XHR Spy feature is to monitor
+ * XHR activity of the current page and create appropriate log into the Console panel.
+ * This feature can be controlled by an option <i>Show XMLHttpRequests</i> (from within the
+ * console panel).
+ *
+ * The module is responsible for attaching/detaching a HTTP Observers when Firebug is
+ * activated/deactivated for a site.
+ */
+Firebug.Spy = extend(Firebug.Module,
+/** @lends Firebug.Spy */
+{
+ dispatchName: "spy",
+
+ initialize: function()
+ {
+ if (Firebug.TraceModule)
+ Firebug.TraceModule.addListener(this.TraceListener);
+
+ Firebug.Module.initialize.apply(this, arguments);
+ },
+
+ shutdown: function()
+ {
+ Firebug.Module.shutdown.apply(this, arguments);
+
+ if (Firebug.TraceModule)
+ Firebug.TraceModule.removeListener(this.TraceListener);
+ },
+
+ initContext: function(context)
+ {
+ context.spies = [];
+
+ if (Firebug.showXMLHttpRequests && Firebug.Console.isAlwaysEnabled())
+ this.attachObserver(context, context.window);
+
+ if (FBTrace.DBG_SPY)
+ FBTrace.sysout("spy.initContext " + contexts.length + " ", context.getName());
+ },
+
+ destroyContext: function(context)
+ {
+ // For any spies that are in progress, remove our listeners so that they don't leak
+ this.detachObserver(context, null);
+
+ if (FBTrace.DBG_SPY && context.spies.length)
+ FBTrace.sysout("spy.destroyContext; ERROR There are leaking Spies ("
+ + context.spies.length + ") " + context.getName());
+
+ delete context.spies;
+
+ if (FBTrace.DBG_SPY)
+ FBTrace.sysout("spy.destroyContext " + contexts.length + " ", context.getName());
+ },
+
+ watchWindow: function(context, win)
+ {
+ if (Firebug.showXMLHttpRequests && Firebug.Console.isAlwaysEnabled())
+ this.attachObserver(context, win);
+ },
+
+ unwatchWindow: function(context, win)
+ {
+ try
+ {
+ // This make sure that the existing context is properly removed from "contexts" array.
+ this.detachObserver(context, win);
+ }
+ catch (ex)
+ {
+ // Get exceptions here sometimes, so let's just ignore them
+ // since the window is going away anyhow
+ ERROR(ex);
+ }
+ },
+
+ updateOption: function(name, value)
+ {
+ // XXXjjb Honza, if Console.isEnabled(context) false, then this can't be called,
+ // but somehow seems not correct
+ if (name == "showXMLHttpRequests")
+ {
+ var tach = value ? this.attachObserver : this.detachObserver;
+ for (var i = 0; i < TabWatcher.contexts.length; ++i)
+ {
+ var context = TabWatcher.contexts[i];
+ iterateWindows(context.window, function(win)
+ {
+ tach.apply(this, [context, win]);
+ });
+ }
+ }
+ },
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ // Attaching Spy to XHR requests.
+
+ /**
+ * Returns false if Spy should not be attached to XHRs executed by the specified window.
+ */
+ skipSpy: function(win)
+ {
+ if (!win)
+ return true;
+
+ // Don't attach spy to chrome.
+ var uri = safeGetWindowLocation(win);
+ if (uri && (uri.indexOf("about:") == 0 || uri.indexOf("chrome:") == 0))
+ return true;
+ },
+
+ attachObserver: function(context, win)
+ {
+ if (Firebug.Spy.skipSpy(win))
+ return;
+
+ for (var i=0; i<contexts.length; ++i)
+ {
+ if ((contexts[i].context == context) && (contexts[i].win == win))
+ return;
+ }
+
+ // Register HTTP observers only once.
+ if (contexts.length == 0)
+ {
+ httpObserver.addObserver(SpyHttpObserver, "firebug-http-event", false);
+ SpyHttpActivityObserver.registerObserver();
+ }
+
+ contexts.push({context: context, win: win});
+
+ if (FBTrace.DBG_SPY)
+ FBTrace.sysout("spy.attachObserver (HTTP) " + contexts.length + " ", context.getName());
+ },
+
+ detachObserver: function(context, win)
+ {
+ for (var i=0; i<contexts.length; ++i)
+ {
+ if (contexts[i].context == context)
+ {
+ if (win && (contexts[i].win != win))
+ continue;
+
+ contexts.splice(i, 1);
+
+ // If no context is using spy, remvove the (only one) HTTP observer.
+ if (contexts.length == 0)
+ {
+ httpObserver.removeObserver(SpyHttpObserver, "firebug-http-event");
+ SpyHttpActivityObserver.unregisterObserver();
+ }
+
+ if (FBTrace.DBG_SPY)
+ FBTrace.sysout("spy.detachObserver (HTTP) " + contexts.length + " ",
+ context.getName());
+ return;
+ }
+ }
+ },
+
+ /**
+ * Return XHR object that is associated with specified request <i>nsIHttpChannel</i>.
+ * Returns null if the request doesn't represent XHR.
+ */
+ getXHR: function(request)
+ {
+ // Does also query-interface for nsIHttpChannel.
+ if (!(request instanceof Ci.nsIHttpChannel))
+ return null;
+
+ try
+ {
+ var callbacks = request.notificationCallbacks;
+ return (callbacks ? callbacks.getInterface(Ci.nsIXMLHttpRequest) : null);
+ }
+ catch (exc)
+ {
+ if (exc.name == "NS_NOINTERFACE")
+ {
+ if (FBTrace.DBG_SPY)
+ FBTrace.sysout("spy.getXHR; Request is not nsIXMLHttpRequest: " +
+ safeGetRequestName(request));
+ }
+ }
+
+ return null;
+ }
+});
+
+
+
+
+
+// ************************************************************************************************
+
+/*
+function getSpyForXHR(request, xhrRequest, context, noCreate)
+{
+ var spy = null;
+
+ // Iterate all existing spy objects in this context and look for one that is
+ // already created for this request.
+ var length = context.spies.length;
+ for (var i=0; i<length; i++)
+ {
+ spy = context.spies[i];
+ if (spy.request == request)
+ return spy;
+ }
+
+ if (noCreate)
+ return null;
+
+ spy = new Firebug.Spy.XMLHttpRequestSpy(request, xhrRequest, context);
+ context.spies.push(spy);
+
+ var name = request.URI.asciiSpec;
+ var origName = request.originalURI.asciiSpec;
+
+ // Attach spy only to the original request. Notice that there can be more network requests
+ // made by the same XHR if redirects are involved.
+ if (name == origName)
+ spy.attach();
+
+ if (FBTrace.DBG_SPY)
+ FBTrace.sysout("spy.getSpyForXHR; New spy object created (" +
+ (name == origName ? "new XHR" : "redirected XHR") + ") for: " + name, spy);
+
+ return spy;
+}
+/**/
+
+// ************************************************************************************************
+
+/**
+ * @class This class represents a Spy object that is attached to XHR. This object
+ * registers various listeners into the XHR in order to monitor various events fired
+ * during the request process (onLoad, onAbort, etc.)
+ */
+/*
+Firebug.Spy.XMLHttpRequestSpy = function(request, xhrRequest, context)
+{
+ this.request = request;
+ this.xhrRequest = xhrRequest;
+ this.context = context;
+ this.responseText = "";
+
+ // For compatibility with the Net templates.
+ this.isXHR = true;
+
+ // Support for activity-observer
+ this.transactionStarted = false;
+ this.transactionClosed = false;
+};
+/**/
+
+//Firebug.Spy.XMLHttpRequestSpy.prototype =
+/** @lends Firebug.Spy.XMLHttpRequestSpy */
+/*
+{
+ attach: function()
+ {
+ var spy = this;
+ this.onReadyStateChange = function(event) { onHTTPSpyReadyStateChange(spy, event); };
+ this.onLoad = function() { onHTTPSpyLoad(spy); };
+ this.onError = function() { onHTTPSpyError(spy); };
+ this.onAbort = function() { onHTTPSpyAbort(spy); };
+
+ // xxxHonza: #502959 is still failing on Fx 3.5
+ // Use activity distributor to identify 3.6
+ if (SpyHttpActivityObserver.getActivityDistributor())
+ {
+ this.onreadystatechange = this.xhrRequest.onreadystatechange;
+ this.xhrRequest.onreadystatechange = this.onReadyStateChange;
+ }
+
+ this.xhrRequest.addEventListener("load", this.onLoad, false);
+ this.xhrRequest.addEventListener("error", this.onError, false);
+ this.xhrRequest.addEventListener("abort", this.onAbort, false);
+
+ // xxxHonza: should be removed from FB 3.6
+ if (!SpyHttpActivityObserver.getActivityDistributor())
+ this.context.sourceCache.addListener(this);
+ },
+
+ detach: function()
+ {
+ // Bubble out if already detached.
+ if (!this.onLoad)
+ return;
+
+ // If the activity distributor is available, let's detach it when the XHR
+ // transaction is closed. Since, in case of multipart XHRs the onLoad method
+ // (readyState == 4) can be called mutliple times.
+ // Keep in mind:
+ // 1) It can happen that that the TRANSACTION_CLOSE event comes before
+ // the onLoad (if the XHR is made as part of the page load) so, detach if
+ // it's already closed.
+ // 2) In case of immediate cache responses, the transaction doesn't have to
+ // be started at all (or the activity observer is no available in Firefox 3.5).
+ // So, also detach in this case.
+ if (this.transactionStarted && !this.transactionClosed)
+ return;
+
+ if (FBTrace.DBG_SPY)
+ FBTrace.sysout("spy.detach; " + this.href);
+
+ // Remove itself from the list of active spies.
+ remove(this.context.spies, this);
+
+ if (this.onreadystatechange)
+ this.xhrRequest.onreadystatechange = this.onreadystatechange;
+
+ try { this.xhrRequest.removeEventListener("load", this.onLoad, false); } catch (e) {}
+ try { this.xhrRequest.removeEventListener("error", this.onError, false); } catch (e) {}
+ try { this.xhrRequest.removeEventListener("abort", this.onAbort, false); } catch (e) {}
+
+ this.onreadystatechange = null;
+ this.onLoad = null;
+ this.onError = null;
+ this.onAbort = null;
+
+ // xxxHonza: shouuld be removed from FB 1.6
+ if (!SpyHttpActivityObserver.getActivityDistributor())
+ this.context.sourceCache.removeListener(this);
+ },
+
+ getURL: function()
+ {
+ return this.xhrRequest.channel ? this.xhrRequest.channel.name : this.href;
+ },
+
+ // Cache listener
+ onStopRequest: function(context, request, responseText)
+ {
+ if (!responseText)
+ return;
+
+ if (request == this.request)
+ this.responseText = responseText;
+ },
+};
+/**/
+// ************************************************************************************************
+/*
+function onHTTPSpyReadyStateChange(spy, event)
+{
+ if (FBTrace.DBG_SPY)
+ FBTrace.sysout("spy.onHTTPSpyReadyStateChange " + spy.xhrRequest.readyState +
+ " (multipart: " + spy.xhrRequest.multipart + ")");
+
+ // Remember just in case spy is detached (readyState == 4).
+ var originalHandler = spy.onreadystatechange;
+
+ // Force response text to be updated in the UI (in case the console entry
+ // has been already expanded and the response tab selected).
+ if (spy.logRow && spy.xhrRequest.readyState >= 3)
+ {
+ var netInfoBox = getChildByClass(spy.logRow, "spyHead", "netInfoBody");
+ if (netInfoBox)
+ {
+ netInfoBox.htmlPresented = false;
+ netInfoBox.responsePresented = false;
+ }
+ }
+
+ // If the request is loading update the end time.
+ if (spy.xhrRequest.readyState == 3)
+ {
+ spy.responseTime = spy.endTime - spy.sendTime;
+ updateTime(spy);
+ }
+
+ // Request loaded. Get all the info from the request now, just in case the
+ // XHR would be aborted in the original onReadyStateChange handler.
+ if (spy.xhrRequest.readyState == 4)
+ {
+ // Cumulate response so, multipart response content is properly displayed.
+ if (SpyHttpActivityObserver.getActivityDistributor())
+ spy.responseText += spy.xhrRequest.responseText;
+ else
+ {
+ // xxxHonza: remove from FB 1.6
+ if (!spy.responseText)
+ spy.responseText = spy.xhrRequest.responseText;
+ }
+
+ // The XHR is loaded now (used also by the activity observer).
+ spy.loaded = true;
+
+ // Update UI.
+ updateHttpSpyInfo(spy);
+
+ // Notify Net pane about a request beeing loaded.
+ // xxxHonza: I don't think this is necessary.
+ var netProgress = spy.context.netProgress;
+ if (netProgress)
+ netProgress.post(netProgress.stopFile, [spy.request, spy.endTime, spy.postText, spy.responseText]);
+
+ // Notify registered listeners about finish of the XHR.
+ dispatch(Firebug.Spy.fbListeners, "onLoad", [spy.context, spy]);
+ }
+
+ // Pass the event to the original page handler.
+ callPageHandler(spy, event, originalHandler);
+}
+
+function onHTTPSpyLoad(spy)
+{
+ if (FBTrace.DBG_SPY)
+ FBTrace.sysout("spy.onHTTPSpyLoad: " + spy.href, spy);
+
+ // Detach must be done in onLoad (not in onreadystatechange) otherwise
+ // onAbort would not be handled.
+ spy.detach();
+
+ // xxxHonza: Still needed for Fx 3.5 (#502959)
+ if (!SpyHttpActivityObserver.getActivityDistributor())
+ onHTTPSpyReadyStateChange(spy, null);
+}
+
+function onHTTPSpyError(spy)
+{
+ if (FBTrace.DBG_SPY)
+ FBTrace.sysout("spy.onHTTPSpyError; " + spy.href, spy);
+
+ spy.detach();
+ spy.loaded = true;
+
+ if (spy.logRow)
+ {
+ removeClass(spy.logRow, "loading");
+ setClass(spy.logRow, "error");
+ }
+}
+
+function onHTTPSpyAbort(spy)
+{
+ if (FBTrace.DBG_SPY)
+ FBTrace.sysout("spy.onHTTPSpyAbort: " + spy.href, spy);
+
+ spy.detach();
+ spy.loaded = true;
+
+ if (spy.logRow)
+ {
+ removeClass(spy.logRow, "loading");
+ setClass(spy.logRow, "error");
+ }
+
+ spy.statusText = "Aborted";
+ updateLogRow(spy);
+
+ // Notify Net pane about a request beeing aborted.
+ // xxxHonza: the net panel shoud find out this itself.
+ var netProgress = spy.context.netProgress;
+ if (netProgress)
+ netProgress.post(netProgress.abortFile, [spy.request, spy.endTime, spy.postText, spy.responseText]);
+}
+/**/
+
+// ************************************************************************************************
+
+/**
+ * @domplate Represents a template for XHRs logged in the Console panel. The body of the
+ * log (displayed when expanded) is rendered using {@link Firebug.NetMonitor.NetInfoBody}.
+ */
+
+Firebug.Spy.XHR = domplate(Firebug.Rep,
+/** @lends Firebug.Spy.XHR */
+
+{
+ tag:
+ DIV({"class": "spyHead", _repObject: "$object"},
+ TABLE({"class": "spyHeadTable focusRow outerFocusRow", cellpadding: 0, cellspacing: 0,
+ "role": "listitem", "aria-expanded": "false"},
+ TBODY({"role": "presentation"},
+ TR({"class": "spyRow"},
+ TD({"class": "spyTitleCol spyCol", onclick: "$onToggleBody"},
+ DIV({"class": "spyTitle"},
+ "$object|getCaption"
+ ),
+ DIV({"class": "spyFullTitle spyTitle"},
+ "$object|getFullUri"
+ )
+ ),
+ TD({"class": "spyCol"},
+ DIV({"class": "spyStatus"}, "$object|getStatus")
+ ),
+ TD({"class": "spyCol"},
+ SPAN({"class": "spyIcon"})
+ ),
+ TD({"class": "spyCol"},
+ SPAN({"class": "spyTime"})
+ ),
+ TD({"class": "spyCol"},
+ TAG(FirebugReps.SourceLink.tag, {object: "$object.sourceLink"})
+ )
+ )
+ )
+ )
+ ),
+
+ getCaption: function(spy)
+ {
+ return spy.method.toUpperCase() + " " + cropString(spy.getURL(), 100);
+ },
+
+ getFullUri: function(spy)
+ {
+ return spy.method.toUpperCase() + " " + spy.getURL();
+ },
+
+ getStatus: function(spy)
+ {
+ var text = "";
+ if (spy.statusCode)
+ text += spy.statusCode + " ";
+
+ if (spy.statusText)
+ return text += spy.statusText;
+
+ return text;
+ },
+
+ onToggleBody: function(event)
+ {
+ var target = event.currentTarget || event.srcElement;
+ var logRow = getAncestorByClass(target, "logRow-spy");
+
+ if (isLeftClick(event))
+ {
+ toggleClass(logRow, "opened");
+
+ var spy = getChildByClass(logRow, "spyHead").repObject;
+ var spyHeadTable = getAncestorByClass(target, "spyHeadTable");
+
+ if (hasClass(logRow, "opened"))
+ {
+ updateHttpSpyInfo(spy, logRow);
+ if (spyHeadTable)
+ spyHeadTable.setAttribute('aria-expanded', 'true');
+ }
+ else
+ {
+ //var netInfoBox = getChildByClass(spy.logRow, "spyHead", "netInfoBody");
+ //dispatch(Firebug.NetMonitor.NetInfoBody.fbListeners, "destroyTabBody", [netInfoBox, spy]);
+ //if (spyHeadTable)
+ // spyHeadTable.setAttribute('aria-expanded', 'false');
+ }
+ }
+ },
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+ copyURL: function(spy)
+ {
+ copyToClipboard(spy.getURL());
+ },
+
+ copyParams: function(spy)
+ {
+ var text = spy.postText;
+ if (!text)
+ return;
+
+ var url = reEncodeURL(spy, text, true);
+ copyToClipboard(url);
+ },
+
+ copyResponse: function(spy)
+ {
+ copyToClipboard(spy.responseText);
+ },
+
+ openInTab: function(spy)
+ {
+ openNewTab(spy.getURL(), spy.postText);
+ },
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+ supportsObject: function(object)
+ {
+ // TODO: xxxpedro spy xhr
+ return false;
+
+ return object instanceof Firebug.Spy.XMLHttpRequestSpy;
+ },
+
+ browseObject: function(spy, context)
+ {
+ var url = spy.getURL();
+ openNewTab(url);
+ return true;
+ },
+
+ getRealObject: function(spy, context)
+ {
+ return spy.xhrRequest;
+ },
+
+ getContextMenuItems: function(spy)
+ {
+ var items = [
+ {label: "CopyLocation", command: bindFixed(this.copyURL, this, spy) }
+ ];
+
+ if (spy.postText)
+ {
+ items.push(
+ {label: "CopyLocationParameters", command: bindFixed(this.copyParams, this, spy) }
+ );
+ }
+
+ items.push(
+ {label: "CopyResponse", command: bindFixed(this.copyResponse, this, spy) },
+ "-",
+ {label: "OpenInTab", command: bindFixed(this.openInTab, this, spy) }
+ );
+
+ return items;
+ }
+});
+
+// ************************************************************************************************
+
+function updateTime(spy)
+{
+ var timeBox = spy.logRow.getElementsByClassName("spyTime").item(0);
+ if (spy.responseTime)
+ timeBox.textContent = " " + formatTime(spy.responseTime);
+}
+
+function updateLogRow(spy)
+{
+ updateTime(spy);
+
+ var statusBox = spy.logRow.getElementsByClassName("spyStatus").item(0);
+ statusBox.textContent = Firebug.Spy.XHR.getStatus(spy);
+
+ removeClass(spy.logRow, "loading");
+ setClass(spy.logRow, "loaded");
+
+ try
+ {
+ var errorRange = Math.floor(spy.xhrRequest.status/100);
+ if (errorRange == 4 || errorRange == 5)
+ setClass(spy.logRow, "error");
+ }
+ catch (exc)
+ {
+ }
+}
+
+var updateHttpSpyInfo = function updateHttpSpyInfo(spy, logRow)
+{
+ if (!spy.logRow && logRow)
+ spy.logRow = logRow;
+
+ if (!spy.logRow || !hasClass(spy.logRow, "opened"))
+ return;
+
+ if (!spy.params)
+ //spy.params = parseURLParams(spy.href+"");
+ spy.params = parseURLParams(spy.href+"");
+
+ if (!spy.requestHeaders)
+ spy.requestHeaders = getRequestHeaders(spy);
+
+ if (!spy.responseHeaders && spy.loaded)
+ spy.responseHeaders = getResponseHeaders(spy);
+
+ var template = Firebug.NetMonitor.NetInfoBody;
+ var netInfoBox = getChildByClass(spy.logRow, "spyHead", "netInfoBody");
+ if (!netInfoBox)
+ {
+ var head = getChildByClass(spy.logRow, "spyHead");
+ netInfoBox = template.tag.append({"file": spy}, head);
+ dispatch(template.fbListeners, "initTabBody", [netInfoBox, spy]);
+ template.selectTabByName(netInfoBox, "Response");
+ }
+ else
+ {
+ template.updateInfo(netInfoBox, spy, spy.context);
+ }
+};
+
+
+
+// ************************************************************************************************
+
+function getRequestHeaders(spy)
+{
+ var headers = [];
+
+ var channel = spy.xhrRequest.channel;
+ if (channel instanceof Ci.nsIHttpChannel)
+ {
+ channel.visitRequestHeaders({
+ visitHeader: function(name, value)
+ {
+ headers.push({name: name, value: value});
+ }
+ });
+ }
+
+ return headers;
+}
+
+function getResponseHeaders(spy)
+{
+ var headers = [];
+
+ try
+ {
+ var channel = spy.xhrRequest.channel;
+ if (channel instanceof Ci.nsIHttpChannel)
+ {
+ channel.visitResponseHeaders({
+ visitHeader: function(name, value)
+ {
+ headers.push({name: name, value: value});
+ }
+ });
+ }
+ }
+ catch (exc)
+ {
+ if (FBTrace.DBG_SPY || FBTrace.DBG_ERRORS)
+ FBTrace.sysout("spy.getResponseHeaders; EXCEPTION " +
+ safeGetRequestName(spy.request), exc);
+ }
+
+ return headers;
+}
+
+// ************************************************************************************************
+// Registration
+
+Firebug.registerModule(Firebug.Spy);
+//Firebug.registerRep(Firebug.Spy.XHR);
+
+// ************************************************************************************************
+}});
+
+
+/* See license.txt for terms of usage */
+
+FBL.ns(function() { with (FBL) {
+
+// ************************************************************************************************
+
+// List of JSON content types.
+var contentTypes =
+{
+ // TODO: create issue: jsonViewer will not try to evaluate the contents of the requested file
+ // if the content-type is set to "text/plain"
+ //"text/plain": 1,
+ "text/javascript": 1,
+ "text/x-javascript": 1,
+ "text/json": 1,
+ "text/x-json": 1,
+ "application/json": 1,
+ "application/x-json": 1,
+ "application/javascript": 1,
+ "application/x-javascript": 1,
+ "application/json-rpc": 1
+};
+
+// ************************************************************************************************
+// Model implementation
+
+Firebug.JSONViewerModel = extend(Firebug.Module,
+{
+ dispatchName: "jsonViewer",
+ initialize: function()
+ {
+ Firebug.NetMonitor.NetInfoBody.addListener(this);
+
+ // Used by Firebug.DOMPanel.DirTable domplate.
+ this.toggles = {};
+ },
+
+ shutdown: function()
+ {
+ Firebug.NetMonitor.NetInfoBody.removeListener(this);
+ },
+
+ initTabBody: function(infoBox, file)
+ {
+ if (FBTrace.DBG_JSONVIEWER)
+ FBTrace.sysout("jsonviewer.initTabBody", infoBox);
+
+ // Let listeners to parse the JSON.
+ dispatch(this.fbListeners, "onParseJSON", [file]);
+
+ // The JSON is still no there, try to parse most common cases.
+ if (!file.jsonObject)
+ {
+ ///if (this.isJSON(safeGetContentType(file.request), file.responseText))
+ if (this.isJSON(file.mimeType, file.responseText))
+ file.jsonObject = this.parseJSON(file);
+ }
+
+ // The jsonObject is created so, the JSON tab can be displayed.
+ if (file.jsonObject && hasProperties(file.jsonObject))
+ {
+ Firebug.NetMonitor.NetInfoBody.appendTab(infoBox, "JSON",
+ ///$STR("jsonviewer.tab.JSON"));
+ $STR("JSON"));
+
+ if (FBTrace.DBG_JSONVIEWER)
+ FBTrace.sysout("jsonviewer.initTabBody; JSON object available " +
+ (typeof(file.jsonObject) != "undefined"), file.jsonObject);
+ }
+ },
+
+ isJSON: function(contentType, data)
+ {
+ // Workaround for JSON responses without proper content type
+ // Let's consider all responses starting with "{" as JSON. In the worst
+ // case there will be an exception when parsing. This means that no-JSON
+ // responses (and post data) (with "{") can be parsed unnecessarily,
+ // which represents a little overhead, but this happens only if the request
+ // is actually expanded by the user in the UI (Net & Console panels).
+
+ ///var responseText = data ? trimLeft(data) : null;
+ ///if (responseText && responseText.indexOf("{") == 0)
+ /// return true;
+ var responseText = data ? trim(data) : null;
+ if (responseText && responseText.indexOf("{") == 0)
+ return true;
+
+ if (!contentType)
+ return false;
+
+ contentType = contentType.split(";")[0];
+ contentType = trim(contentType);
+ return contentTypes[contentType];
+ },
+
+ // Update listener for TabView
+ updateTabBody: function(infoBox, file, context)
+ {
+ var tab = infoBox.selectedTab;
+ ///var tabBody = infoBox.getElementsByClassName("netInfoJSONText").item(0);
+ var tabBody = $$(".netInfoJSONText", infoBox)[0];
+ if (!hasClass(tab, "netInfoJSONTab") || tabBody.updated)
+ return;
+
+ tabBody.updated = true;
+
+ if (file.jsonObject) {
+ Firebug.DOMPanel.DirTable.tag.replace(
+ {object: file.jsonObject, toggles: this.toggles}, tabBody);
+ }
+ },
+
+ parseJSON: function(file)
+ {
+ var jsonString = new String(file.responseText);
+ ///return parseJSONString(jsonString, "http://" + file.request.originalURI.host);
+ return parseJSONString(jsonString);
+ }
+});
+
+// ************************************************************************************************
+// Registration
+
+Firebug.registerModule(Firebug.JSONViewerModel);
+
+// ************************************************************************************************
+}});
+
+
+/* See license.txt for terms of usage */
+
+FBL.ns(function() { with (FBL) {
+
+// ************************************************************************************************
+// Constants
+
+// List of XML related content types.
+var xmlContentTypes =
+[
+ "text/xml",
+ "application/xml",
+ "application/xhtml+xml",
+ "application/rss+xml",
+ "application/atom+xml",,
+ "application/vnd.mozilla.maybe.feed",
+ "application/rdf+xml",
+ "application/vnd.mozilla.xul+xml"
+];
+
+// ************************************************************************************************
+// Model implementation
+
+/**
+ * @module Implements viewer for XML based network responses. In order to create a new
+ * tab wihin network request detail, a listener is registered into
+ * <code>Firebug.NetMonitor.NetInfoBody</code> object.
+ */
+Firebug.XMLViewerModel = extend(Firebug.Module,
+{
+ dispatchName: "xmlViewer",
+
+ initialize: function()
+ {
+ ///Firebug.ActivableModule.initialize.apply(this, arguments);
+ Firebug.Module.initialize.apply(this, arguments);
+ Firebug.NetMonitor.NetInfoBody.addListener(this);
+ },
+
+ shutdown: function()
+ {
+ ///Firebug.ActivableModule.shutdown.apply(this, arguments);
+ Firebug.Module.shutdown.apply(this, arguments);
+ Firebug.NetMonitor.NetInfoBody.removeListener(this);
+ },
+
+ /**
+ * Check response's content-type and if it's a XML, create a new tab with XML preview.
+ */
+ initTabBody: function(infoBox, file)
+ {
+ if (FBTrace.DBG_XMLVIEWER)
+ FBTrace.sysout("xmlviewer.initTabBody", infoBox);
+
+ // If the response is XML let's display a pretty preview.
+ ///if (this.isXML(safeGetContentType(file.request)))
+ if (this.isXML(file.mimeType, file.responseText))
+ {
+ Firebug.NetMonitor.NetInfoBody.appendTab(infoBox, "XML",
+ ///$STR("xmlviewer.tab.XML"));
+ $STR("XML"));
+
+ if (FBTrace.DBG_XMLVIEWER)
+ FBTrace.sysout("xmlviewer.initTabBody; XML response available");
+ }
+ },
+
+ isXML: function(contentType)
+ {
+ if (!contentType)
+ return false;
+
+ // Look if the response is XML based.
+ for (var i=0; i<xmlContentTypes.length; i++)
+ {
+ if (contentType.indexOf(xmlContentTypes[i]) == 0)
+ return true;
+ }
+
+ return false;
+ },
+
+ /**
+ * Parse XML response and render pretty printed preview.
+ */
+ updateTabBody: function(infoBox, file, context)
+ {
+ var tab = infoBox.selectedTab;
+ ///var tabBody = infoBox.getElementsByClassName("netInfoXMLText").item(0);
+ var tabBody = $$(".netInfoXMLText", infoBox)[0];
+ if (!hasClass(tab, "netInfoXMLTab") || tabBody.updated)
+ return;
+
+ tabBody.updated = true;
+
+ this.insertXML(tabBody, Firebug.NetMonitor.Utils.getResponseText(file, context));
+ },
+
+ insertXML: function(parentNode, text)
+ {
+ var xmlText = text.replace(/^\s*<?.+?>\s*/, "");
+
+ var div = parentNode.ownerDocument.createElement("div");
+ div.innerHTML = xmlText;
+
+ var root = div.getElementsByTagName("*")[0];
+
+ /***
+ var parser = CCIN("@mozilla.org/xmlextras/domparser;1", "nsIDOMParser");
+ var doc = parser.parseFromString(text, "text/xml");
+ var root = doc.documentElement;
+
+ // Error handling
+ var nsURI = "http://www.mozilla.org/newlayout/xml/parsererror.xml";
+ if (root.namespaceURI == nsURI && root.nodeName == "parsererror")
+ {
+ this.ParseError.tag.replace({error: {
+ message: root.firstChild.nodeValue,
+ source: root.lastChild.textContent
+ }}, parentNode);
+ return;
+ }
+ /**/
+
+ if (FBTrace.DBG_XMLVIEWER)
+ FBTrace.sysout("xmlviewer.updateTabBody; XML response parsed", doc);
+
+ // Override getHidden in these templates. The parsed XML documen is
+ // hidden, but we want to display it using 'visible' styling.
+ /*
+ var templates = [
+ Firebug.HTMLPanel.CompleteElement,
+ Firebug.HTMLPanel.Element,
+ Firebug.HTMLPanel.TextElement,
+ Firebug.HTMLPanel.EmptyElement,
+ Firebug.HTMLPanel.XEmptyElement,
+ ];
+
+ var originals = [];
+ for (var i=0; i<templates.length; i++)
+ {
+ originals[i] = templates[i].getHidden;
+ templates[i].getHidden = function() {
+ return "";
+ }
+ }
+ /**/
+
+ // Generate XML preview.
+ ///Firebug.HTMLPanel.CompleteElement.tag.replace({object: doc.documentElement}, parentNode);
+
+ // TODO: xxxpedro html3
+ ///Firebug.HTMLPanel.CompleteElement.tag.replace({object: root}, parentNode);
+ var html = [];
+ Firebug.Reps.appendNode(root, html);
+ parentNode.innerHTML = html.join("");
+
+
+ /*
+ for (var i=0; i<originals.length; i++)
+ templates[i].getHidden = originals[i];/**/
+ }
+});
+
+// ************************************************************************************************
+// Domplate
+
+/**
+ * @domplate Represents a template for displaying XML parser errors. Used by
+ * <code>Firebug.XMLViewerModel</code>.
+ */
+Firebug.XMLViewerModel.ParseError = domplate(Firebug.Rep,
+{
+ tag:
+ DIV({"class": "xmlInfoError"},
+ DIV({"class": "xmlInfoErrorMsg"}, "$error.message"),
+ PRE({"class": "xmlInfoErrorSource"}, "$error|getSource")
+ ),
+
+ getSource: function(error)
+ {
+ var parts = error.source.split("\n");
+ if (parts.length != 2)
+ return error.source;
+
+ var limit = 50;
+ var column = parts[1].length;
+ if (column >= limit) {
+ parts[0] = "..." + parts[0].substr(column - limit);
+ parts[1] = "..." + parts[1].substr(column - limit);
+ }
+
+ if (parts[0].length > 80)
+ parts[0] = parts[0].substr(0, 80) + "...";
+
+ return parts.join("\n");
+ }
+});
+
+// ************************************************************************************************
+// Registration
+
+Firebug.registerModule(Firebug.XMLViewerModel);
+
+}});
+
+
+/* See license.txt for terms of usage */
+
+// next-generation Console Panel (will override consoje.js)
+FBL.ns(function() { with (FBL) {
+// ************************************************************************************************
+
+// ************************************************************************************************
+// Constants
+
+/*
+const Cc = Components.classes;
+const Ci = Components.interfaces;
+const nsIPrefBranch2 = Ci.nsIPrefBranch2;
+const PrefService = Cc["@mozilla.org/preferences-service;1"];
+const prefs = PrefService.getService(nsIPrefBranch2);
+/**/
+/*
+
+// new offline message handler
+o = {x:1,y:2};
+
+r = Firebug.getRep(o);
+
+r.tag.tag.compile();
+
+outputs = [];
+html = r.tag.renderHTML({object:o}, outputs);
+
+
+// finish rendering the template (the DOM part)
+target = $("build");
+target.innerHTML = html;
+root = target.firstChild;
+
+domArgs = [root, r.tag.context, 0];
+domArgs.push.apply(domArgs, r.tag.domArgs);
+domArgs.push.apply(domArgs, outputs);
+r.tag.tag.renderDOM.apply(self ? self : r.tag.subject, domArgs);
+
+
+ */
+var consoleQueue = [];
+var lastHighlightedObject;
+var FirebugContext = Env.browser;
+
+// ************************************************************************************************
+
+var maxQueueRequests = 500;
+
+// ************************************************************************************************
+
+Firebug.ConsoleBase =
+{
+ log: function(object, context, className, rep, noThrottle, sourceLink)
+ {
+ //dispatch(this.fbListeners,"log",[context, object, className, sourceLink]);
+ return this.logRow(appendObject, object, context, className, rep, sourceLink, noThrottle);
+ },
+
+ logFormatted: function(objects, context, className, noThrottle, sourceLink)
+ {
+ //dispatch(this.fbListeners,"logFormatted",[context, objects, className, sourceLink]);
+ return this.logRow(appendFormatted, objects, context, className, null, sourceLink, noThrottle);
+ },
+
+ openGroup: function(objects, context, className, rep, noThrottle, sourceLink, noPush)
+ {
+ return this.logRow(appendOpenGroup, objects, context, className, rep, sourceLink, noThrottle);
+ },
+
+ closeGroup: function(context, noThrottle)
+ {
+ return this.logRow(appendCloseGroup, null, context, null, null, null, noThrottle, true);
+ },
+
+ logRow: function(appender, objects, context, className, rep, sourceLink, noThrottle, noRow)
+ {
+ // TODO: xxxpedro console console2
+ noThrottle = true; // xxxpedro forced because there is no TabContext yet
+
+ if (!context)
+ context = FirebugContext;
+
+ if (FBTrace.DBG_ERRORS && !context)
+ FBTrace.sysout("Console.logRow has no context, skipping objects", objects);
+
+ if (!context)
+ return;
+
+ if (noThrottle || !context)
+ {
+ var panel = this.getPanel(context);
+ if (panel)
+ {
+ var row = panel.append(appender, objects, className, rep, sourceLink, noRow);
+ var container = panel.panelNode;
+
+ // TODO: xxxpedro what is this? console console2
+ /*
+ var template = Firebug.NetMonitor.NetLimit;
+
+ while (container.childNodes.length > maxQueueRequests + 1)
+ {
+ clearDomplate(container.firstChild.nextSibling);
+ container.removeChild(container.firstChild.nextSibling);
+ panel.limit.limitInfo.totalCount++;
+ template.updateCounter(panel.limit);
+ }
+ dispatch([Firebug.A11yModel], "onLogRowCreated", [panel , row]);
+ /**/
+ return row;
+ }
+ else
+ {
+ consoleQueue.push([appender, objects, context, className, rep, sourceLink, noThrottle, noRow]);
+ }
+ }
+ else
+ {
+ if (!context.throttle)
+ {
+ //FBTrace.sysout("console.logRow has not context.throttle! ");
+ return;
+ }
+ var args = [appender, objects, context, className, rep, sourceLink, true, noRow];
+ context.throttle(this.logRow, this, args);
+ }
+ },
+
+ appendFormatted: function(args, row, context)
+ {
+ if (!context)
+ context = FirebugContext;
+
+ var panel = this.getPanel(context);
+ panel.appendFormatted(args, row);
+ },
+
+ clear: function(context)
+ {
+ if (!context)
+ //context = FirebugContext;
+ context = Firebug.context;
+
+ /*
+ if (context)
+ Firebug.Errors.clear(context);
+ /**/
+
+ var panel = this.getPanel(context, true);
+ if (panel)
+ {
+ panel.clear();
+ }
+ },
+
+ // Override to direct output to your panel
+ getPanel: function(context, noCreate)
+ {
+ //return context.getPanel("console", noCreate);
+ // TODO: xxxpedro console console2
+ return Firebug.chrome ? Firebug.chrome.getPanel("Console") : null;
+ }
+
+};
+
+// ************************************************************************************************
+
+//TODO: xxxpedro
+//var ActivableConsole = extend(Firebug.ActivableModule, Firebug.ConsoleBase);
+var ActivableConsole = extend(Firebug.ConsoleBase,
+{
+ isAlwaysEnabled: function()
+ {
+ return true;
+ }
+});
+
+Firebug.Console = Firebug.Console = extend(ActivableConsole,
+//Firebug.Console = extend(ActivableConsole,
+{
+ dispatchName: "console",
+
+ error: function()
+ {
+ Firebug.Console.logFormatted(arguments, Firebug.browser, "error");
+ },
+
+ flush: function()
+ {
+ dispatch(this.fbListeners,"flush",[]);
+
+ for (var i=0, length=consoleQueue.length; i<length; i++)
+ {
+ var args = consoleQueue[i];
+ this.logRow.apply(this, args);
+ }
+ },
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ // extends Module
+
+ showPanel: function(browser, panel)
+ {
+ },
+
+ getFirebugConsoleElement: function(context, win)
+ {
+ var element = win.document.getElementById("_firebugConsole");
+ if (!element)
+ {
+ if (FBTrace.DBG_CONSOLE)
+ FBTrace.sysout("getFirebugConsoleElement forcing element");
+ var elementForcer = "(function(){var r=null; try { r = window._getFirebugConsoleElement();}catch(exc){r=exc;} return r;})();"; // we could just add the elements here
+
+ if (context.stopped)
+ Firebug.Console.injector.evaluateConsoleScript(context); // todo evaluate consoleForcer on stack
+ else
+ var r = Firebug.CommandLine.evaluateInWebPage(elementForcer, context, win);
+
+ if (FBTrace.DBG_CONSOLE)
+ FBTrace.sysout("getFirebugConsoleElement forcing element result "+r, r);
+
+ var element = win.document.getElementById("_firebugConsole");
+ if (!element) // elementForce fails
+ {
+ if (FBTrace.DBG_ERRORS) FBTrace.sysout("console.getFirebugConsoleElement: no _firebugConsole in win:", win);
+ Firebug.Console.logFormatted(["Firebug cannot find _firebugConsole element", r, win], context, "error", true);
+ }
+ }
+
+ return element;
+ },
+
+ isReadyElsePreparing: function(context, win) // this is the only code that should call injector.attachIfNeeded
+ {
+ if (FBTrace.DBG_CONSOLE)
+ FBTrace.sysout("console.isReadyElsePreparing, win is " +
+ (win?"an argument: ":"null, context.window: ") +
+ (win?win.location:context.window.location), (win?win:context.window));
+
+ if (win)
+ return this.injector.attachIfNeeded(context, win);
+ else
+ {
+ var attached = true;
+ for (var i = 0; i < context.windows.length; i++)
+ attached = attached && this.injector.attachIfNeeded(context, context.windows[i]);
+ // already in the list above attached = attached && this.injector.attachIfNeeded(context, context.window);
+ if (context.windows.indexOf(context.window) == -1)
+ FBTrace.sysout("isReadyElsePreparing ***************** context.window not in context.windows");
+ if (FBTrace.DBG_CONSOLE)
+ FBTrace.sysout("console.isReadyElsePreparing attached to "+context.windows.length+" and returns "+attached);
+ return attached;
+ }
+ },
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ // extends ActivableModule
+
+ initialize: function()
+ {
+ this.panelName = "console";
+
+ //TODO: xxxpedro
+ //Firebug.ActivableModule.initialize.apply(this, arguments);
+ //Firebug.Debugger.addListener(this);
+ },
+
+ enable: function()
+ {
+ if (Firebug.Console.isAlwaysEnabled())
+ this.watchForErrors();
+ },
+
+ disable: function()
+ {
+ if (Firebug.Console.isAlwaysEnabled())
+ this.unwatchForErrors();
+ },
+
+ initContext: function(context, persistedState)
+ {
+ Firebug.ActivableModule.initContext.apply(this, arguments);
+ context.consoleReloadWarning = true; // mark as need to warn.
+ },
+
+ loadedContext: function(context)
+ {
+ for (var url in context.sourceFileMap)
+ return; // if there are any sourceFiles, then do nothing
+
+ // else we saw no JS, so the reload warning it not needed.
+ this.clearReloadWarning(context);
+ },
+
+ clearReloadWarning: function(context) // remove the warning about reloading.
+ {
+ if (context.consoleReloadWarning)
+ {
+ var panel = context.getPanel(this.panelName);
+ panel.clearReloadWarning();
+ delete context.consoleReloadWarning;
+ }
+ },
+
+ togglePersist: function(context)
+ {
+ var panel = context.getPanel(this.panelName);
+ panel.persistContent = panel.persistContent ? false : true;
+ Firebug.chrome.setGlobalAttribute("cmd_togglePersistConsole", "checked", panel.persistContent);
+ },
+
+ showContext: function(browser, context)
+ {
+ Firebug.chrome.setGlobalAttribute("cmd_clearConsole", "disabled", !context);
+
+ Firebug.ActivableModule.showContext.apply(this, arguments);
+ },
+
+ destroyContext: function(context, persistedState)
+ {
+ Firebug.Console.injector.detachConsole(context, context.window); // TODO iterate windows?
+ },
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+ onPanelEnable: function(panelName)
+ {
+ if (panelName != this.panelName) // we don't care about other panels
+ return;
+
+ if (FBTrace.DBG_CONSOLE)
+ FBTrace.sysout("console.onPanelEnable**************");
+
+ this.watchForErrors();
+ Firebug.Debugger.addDependentModule(this); // we inject the console during JS compiles so we need jsd
+ },
+
+ onPanelDisable: function(panelName)
+ {
+ if (panelName != this.panelName) // we don't care about other panels
+ return;
+
+ if (FBTrace.DBG_CONSOLE)
+ FBTrace.sysout("console.onPanelDisable**************");
+
+ Firebug.Debugger.removeDependentModule(this); // we inject the console during JS compiles so we need jsd
+ this.unwatchForErrors();
+
+ // Make sure possible errors coming from the page and displayed in the Firefox
+ // status bar are removed.
+ this.clear();
+ },
+
+ onSuspendFirebug: function()
+ {
+ if (FBTrace.DBG_CONSOLE)
+ FBTrace.sysout("console.onSuspendFirebug\n");
+ if (Firebug.Console.isAlwaysEnabled())
+ this.unwatchForErrors();
+ },
+
+ onResumeFirebug: function()
+ {
+ if (FBTrace.DBG_CONSOLE)
+ FBTrace.sysout("console.onResumeFirebug\n");
+ if (Firebug.Console.isAlwaysEnabled())
+ this.watchForErrors();
+ },
+
+ watchForErrors: function()
+ {
+ Firebug.Errors.checkEnabled();
+ $('fbStatusIcon').setAttribute("console", "on");
+ },
+
+ unwatchForErrors: function()
+ {
+ Firebug.Errors.checkEnabled();
+ $('fbStatusIcon').removeAttribute("console");
+ },
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ // Firebug.Debugger listener
+
+ onMonitorScript: function(context, frame)
+ {
+ Firebug.Console.log(frame, context);
+ },
+
+ onFunctionCall: function(context, frame, depth, calling)
+ {
+ if (calling)
+ Firebug.Console.openGroup([frame, "depth:"+depth], context);
+ else
+ Firebug.Console.closeGroup(context);
+ },
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+ logRow: function(appender, objects, context, className, rep, sourceLink, noThrottle, noRow)
+ {
+ if (!context)
+ context = FirebugContext;
+
+ if (FBTrace.DBG_WINDOWS && !context) FBTrace.sysout("Console.logRow: no context \n");
+
+ if (this.isAlwaysEnabled())
+ return Firebug.ConsoleBase.logRow.apply(this, arguments);
+ }
+});
+
+Firebug.ConsoleListener =
+{
+ log: function(context, object, className, sourceLink)
+ {
+ },
+
+ logFormatted: function(context, objects, className, sourceLink)
+ {
+ }
+};
+
+// ************************************************************************************************
+
+Firebug.ConsolePanel = function () {} // XXjjb attach Firebug so this panel can be extended.
+
+//TODO: xxxpedro
+//Firebug.ConsolePanel.prototype = extend(Firebug.ActivablePanel,
+Firebug.ConsolePanel.prototype = extend(Firebug.Panel,
+{
+ wasScrolledToBottom: false,
+ messageCount: 0,
+ lastLogTime: 0,
+ groups: null,
+ limit: null,
+
+ append: function(appender, objects, className, rep, sourceLink, noRow)
+ {
+ var container = this.getTopContainer();
+
+ if (noRow)
+ {
+ appender.apply(this, [objects]);
+ }
+ else
+ {
+ // xxxHonza: Don't update the this.wasScrolledToBottom flag now.
+ // At the beginning (when the first log is created) the isScrolledToBottom
+ // always returns true.
+ //if (this.panelNode.offsetHeight)
+ // this.wasScrolledToBottom = isScrolledToBottom(this.panelNode);
+
+ var row = this.createRow("logRow", className);
+ appender.apply(this, [objects, row, rep]);
+
+ if (sourceLink)
+ FirebugReps.SourceLink.tag.append({object: sourceLink}, row);
+
+ container.appendChild(row);
+
+ this.filterLogRow(row, this.wasScrolledToBottom);
+
+ if (this.wasScrolledToBottom)
+ scrollToBottom(this.panelNode);
+
+ return row;
+ }
+ },
+
+ clear: function()
+ {
+ if (this.panelNode)
+ {
+ if (FBTrace.DBG_CONSOLE)
+ FBTrace.sysout("ConsolePanel.clear");
+ clearNode(this.panelNode);
+ this.insertLogLimit(this.context);
+ }
+ },
+
+ insertLogLimit: function()
+ {
+ // Create limit row. This row is the first in the list of entries
+ // and initially hidden. It's displayed as soon as the number of
+ // entries reaches the limit.
+ var row = this.createRow("limitRow");
+
+ var limitInfo = {
+ totalCount: 0,
+ limitPrefsTitle: $STRF("LimitPrefsTitle", [Firebug.prefDomain+".console.logLimit"])
+ };
+
+ //TODO: xxxpedro console net limit!?
+ return;
+ var netLimitRep = Firebug.NetMonitor.NetLimit;
+ var nodes = netLimitRep.createTable(row, limitInfo);
+
+ this.limit = nodes[1];
+
+ var container = this.panelNode;
+ container.insertBefore(nodes[0], container.firstChild);
+ },
+
+ insertReloadWarning: function()
+ {
+ // put the message in, we will clear if the window console is injected.
+ this.warningRow = this.append(appendObject, $STR("message.Reload to activate window console"), "info");
+ },
+
+ clearReloadWarning: function()
+ {
+ if (this.warningRow)
+ {
+ this.warningRow.parentNode.removeChild(this.warningRow);
+ delete this.warningRow;
+ }
+ },
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+ appendObject: function(object, row, rep)
+ {
+ if (!rep)
+ rep = Firebug.getRep(object);
+ return rep.tag.append({object: object}, row);
+ },
+
+ appendFormatted: function(objects, row, rep)
+ {
+ if (!objects || !objects.length)
+ return;
+
+ function logText(text, row)
+ {
+ var node = row.ownerDocument.createTextNode(text);
+ row.appendChild(node);
+ }
+
+ var format = objects[0];
+ var objIndex = 0;
+
+ if (typeof(format) != "string")
+ {
+ format = "";
+ objIndex = -1;
+ }
+ else // a string
+ {
+ if (objects.length === 1) // then we have only a string...
+ {
+ if (format.length < 1) { // ...and it has no characters.
+ logText("(an empty string)", row);
+ return;
+ }
+ }
+ }
+
+ var parts = parseFormat(format);
+ var trialIndex = objIndex;
+ for (var i= 0; i < parts.length; i++)
+ {
+ var part = parts[i];
+ if (part && typeof(part) == "object")
+ {
+ if (++trialIndex > objects.length) // then too few parameters for format, assume unformatted.
+ {
+ format = "";
+ objIndex = -1;
+ parts.length = 0;
+ break;
+ }
+ }
+
+ }
+ for (var i = 0; i < parts.length; ++i)
+ {
+ var part = parts[i];
+ if (part && typeof(part) == "object")
+ {
+ var object = objects[++objIndex];
+ if (typeof(object) != "undefined")
+ this.appendObject(object, row, part.rep);
+ else
+ this.appendObject(part.type, row, FirebugReps.Text);
+ }
+ else
+ FirebugReps.Text.tag.append({object: part}, row);
+ }
+
+ for (var i = objIndex+1; i < objects.length; ++i)
+ {
+ logText(" ", row);
+ var object = objects[i];
+ if (typeof(object) == "string")
+ FirebugReps.Text.tag.append({object: object}, row);
+ else
+ this.appendObject(object, row);
+ }
+ },
+
+ appendOpenGroup: function(objects, row, rep)
+ {
+ if (!this.groups)
+ this.groups = [];
+
+ setClass(row, "logGroup");
+ setClass(row, "opened");
+
+ var innerRow = this.createRow("logRow");
+ setClass(innerRow, "logGroupLabel");
+ if (rep)
+ rep.tag.replace({"objects": objects}, innerRow);
+ else
+ this.appendFormatted(objects, innerRow, rep);
+ row.appendChild(innerRow);
+ //dispatch([Firebug.A11yModel], 'onLogRowCreated', [this, innerRow]);
+ var groupBody = this.createRow("logGroupBody");
+ row.appendChild(groupBody);
+ groupBody.setAttribute('role', 'group');
+ this.groups.push(groupBody);
+
+ addEvent(innerRow, "mousedown", function(event)
+ {
+ if (isLeftClick(event))
+ {
+ //console.log(event.currentTarget == event.target);
+
+ var target = event.target || event.srcElement;
+
+ target = getAncestorByClass(target, "logGroupLabel");
+
+ var groupRow = target.parentNode;
+
+ if (hasClass(groupRow, "opened"))
+ {
+ removeClass(groupRow, "opened");
+ target.setAttribute('aria-expanded', 'false');
+ }
+ else
+ {
+ setClass(groupRow, "opened");
+ target.setAttribute('aria-expanded', 'true');
+ }
+ }
+ });
+ },
+
+ appendCloseGroup: function(object, row, rep)
+ {
+ if (this.groups)
+ this.groups.pop();
+ },
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ // TODO: xxxpedro console2
+ onMouseMove: function(event)
+ {
+ if (!Firebug.Inspector) return;
+
+ var target = event.srcElement || event.target;
+
+ var object = getAncestorByClass(target, "objectLink-element");
+ object = object ? object.repObject : null;
+
+ if(object && instanceOf(object, "Element") && object.nodeType == 1)
+ {
+ if(object != lastHighlightedObject)
+ {
+ Firebug.Inspector.drawBoxModel(object);
+ object = lastHighlightedObject;
+ }
+ }
+ else
+ Firebug.Inspector.hideBoxModel();
+
+ },
+
+ onMouseDown: function(event)
+ {
+ var target = event.srcElement || event.target;
+
+ var object = getAncestorByClass(target, "objectLink");
+ var repObject = object ? object.repObject : null;
+
+ if (!repObject)
+ {
+ return;
+ }
+
+ if (hasClass(object, "objectLink-object"))
+ {
+ Firebug.chrome.selectPanel("DOM");
+ Firebug.chrome.getPanel("DOM").select(repObject, true);
+ }
+ else if (hasClass(object, "objectLink-element"))
+ {
+ Firebug.chrome.selectPanel("HTML");
+ Firebug.chrome.getPanel("HTML").select(repObject, true);
+ }
+
+ /*
+ if(object && instanceOf(object, "Element") && object.nodeType == 1)
+ {
+ if(object != lastHighlightedObject)
+ {
+ Firebug.Inspector.drawBoxModel(object);
+ object = lastHighlightedObject;
+ }
+ }
+ else
+ Firebug.Inspector.hideBoxModel();
+ /**/
+
+ },
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ // extends Panel
+
+ name: "Console",
+ title: "Console",
+ //searchable: true,
+ //breakable: true,
+ //editable: false,
+
+ options:
+ {
+ hasCommandLine: true,
+ hasToolButtons: true,
+ isPreRendered: true
+ },
+
+ create: function()
+ {
+ Firebug.Panel.create.apply(this, arguments);
+
+ this.context = Firebug.browser.window;
+ this.document = Firebug.chrome.document;
+ this.onMouseMove = bind(this.onMouseMove, this);
+ this.onMouseDown = bind(this.onMouseDown, this);
+
+ this.clearButton = new Button({
+ element: $("fbConsole_btClear"),
+ owner: Firebug.Console,
+ onClick: Firebug.Console.clear
+ });
+ },
+
+ initialize: function()
+ {
+ Firebug.Panel.initialize.apply(this, arguments); // loads persisted content
+ //Firebug.ActivablePanel.initialize.apply(this, arguments); // loads persisted content
+
+ if (!this.persistedContent && Firebug.Console.isAlwaysEnabled())
+ {
+ this.insertLogLimit(this.context);
+
+ // Initialize log limit and listen for changes.
+ this.updateMaxLimit();
+
+ if (this.context.consoleReloadWarning) // we have not yet injected the console
+ this.insertReloadWarning();
+ }
+
+ //Firebug.Console.injector.install(Firebug.browser.window);
+
+ addEvent(this.panelNode, "mouseover", this.onMouseMove);
+ addEvent(this.panelNode, "mousedown", this.onMouseDown);
+
+ this.clearButton.initialize();
+
+ //consolex.trace();
+ //TODO: xxxpedro remove this
+ /*
+ Firebug.Console.openGroup(["asd"], null, "group", null, false);
+ Firebug.Console.log("asd");
+ Firebug.Console.log("asd");
+ Firebug.Console.log("asd");
+ /**/
+
+ //TODO: xxxpedro preferences prefs
+ //prefs.addObserver(Firebug.prefDomain, this, false);
+ },
+
+ initializeNode : function()
+ {
+ //dispatch([Firebug.A11yModel], 'onInitializeNode', [this]);
+ if (FBTrace.DBG_CONSOLE)
+ {
+ this.onScroller = bind(this.onScroll, this);
+ addEvent(this.panelNode, "scroll", this.onScroller);
+ }
+
+ this.onResizer = bind(this.onResize, this);
+ this.resizeEventTarget = Firebug.chrome.$('fbContentBox');
+ addEvent(this.resizeEventTarget, "resize", this.onResizer);
+ },
+
+ destroyNode : function()
+ {
+ //dispatch([Firebug.A11yModel], 'onDestroyNode', [this]);
+ if (this.onScroller)
+ removeEvent(this.panelNode, "scroll", this.onScroller);
+
+ //removeEvent(this.resizeEventTarget, "resize", this.onResizer);
+ },
+
+ shutdown: function()
+ {
+ //TODO: xxxpedro console console2
+ this.clearButton.shutdown();
+
+ removeEvent(this.panelNode, "mousemove", this.onMouseMove);
+ removeEvent(this.panelNode, "mousedown", this.onMouseDown);
+
+ this.destroyNode();
+
+ Firebug.Panel.shutdown.apply(this, arguments);
+
+ //TODO: xxxpedro preferences prefs
+ //prefs.removeObserver(Firebug.prefDomain, this, false);
+ },
+
+ ishow: function(state)
+ {
+ if (FBTrace.DBG_CONSOLE)
+ FBTrace.sysout("Console.panel show; " + this.context.getName(), state);
+
+ var enabled = Firebug.Console.isAlwaysEnabled();
+ if (enabled)
+ {
+ Firebug.Console.disabledPanelPage.hide(this);
+ this.showCommandLine(true);
+ this.showToolbarButtons("fbConsoleButtons", true);
+ Firebug.chrome.setGlobalAttribute("cmd_togglePersistConsole", "checked", this.persistContent);
+
+ if (state && state.wasScrolledToBottom)
+ {
+ this.wasScrolledToBottom = state.wasScrolledToBottom;
+ delete state.wasScrolledToBottom;
+ }
+
+ if (this.wasScrolledToBottom)
+ scrollToBottom(this.panelNode);
+
+ if (FBTrace.DBG_CONSOLE)
+ FBTrace.sysout("console.show ------------------ wasScrolledToBottom: " +
+ this.wasScrolledToBottom + ", " + this.context.getName());
+ }
+ else
+ {
+ this.hide(state);
+ Firebug.Console.disabledPanelPage.show(this);
+ }
+ },
+
+ ihide: function(state)
+ {
+ if (FBTrace.DBG_CONSOLE)
+ FBTrace.sysout("Console.panel hide; " + this.context.getName(), state);
+
+ this.showToolbarButtons("fbConsoleButtons", false);
+ this.showCommandLine(false);
+
+ if (FBTrace.DBG_CONSOLE)
+ FBTrace.sysout("console.hide ------------------ wasScrolledToBottom: " +
+ this.wasScrolledToBottom + ", " + this.context.getName());
+ },
+
+ destroy: function(state)
+ {
+ if (this.panelNode.offsetHeight)
+ this.wasScrolledToBottom = isScrolledToBottom(this.panelNode);
+
+ if (state)
+ state.wasScrolledToBottom = this.wasScrolledToBottom;
+
+ if (FBTrace.DBG_CONSOLE)
+ FBTrace.sysout("console.destroy ------------------ wasScrolledToBottom: " +
+ this.wasScrolledToBottom + ", " + this.context.getName());
+ },
+
+ shouldBreakOnNext: function()
+ {
+ // xxxHonza: shouldn't the breakOnErrors be context related?
+ // xxxJJB, yes, but we can't support it because we can't yet tell
+ // which window the error is on.
+ return Firebug.getPref(Firebug.servicePrefDomain, "breakOnErrors");
+ },
+
+ getBreakOnNextTooltip: function(enabled)
+ {
+ return (enabled ? $STR("console.Disable Break On All Errors") :
+ $STR("console.Break On All Errors"));
+ },
+
+ enablePanel: function(module)
+ {
+ if (FBTrace.DBG_CONSOLE)
+ FBTrace.sysout("console.ConsolePanel.enablePanel; " + this.context.getName());
+
+ Firebug.ActivablePanel.enablePanel.apply(this, arguments);
+
+ this.showCommandLine(true);
+
+ if (this.wasScrolledToBottom)
+ scrollToBottom(this.panelNode);
+ },
+
+ disablePanel: function(module)
+ {
+ if (FBTrace.DBG_CONSOLE)
+ FBTrace.sysout("console.ConsolePanel.disablePanel; " + this.context.getName());
+
+ Firebug.ActivablePanel.disablePanel.apply(this, arguments);
+
+ this.showCommandLine(false);
+ },
+
+ getOptionsMenuItems: function()
+ {
+ return [
+ optionMenu("ShowJavaScriptErrors", "showJSErrors"),
+ optionMenu("ShowJavaScriptWarnings", "showJSWarnings"),
+ optionMenu("ShowCSSErrors", "showCSSErrors"),
+ optionMenu("ShowXMLErrors", "showXMLErrors"),
+ optionMenu("ShowXMLHttpRequests", "showXMLHttpRequests"),
+ optionMenu("ShowChromeErrors", "showChromeErrors"),
+ optionMenu("ShowChromeMessages", "showChromeMessages"),
+ optionMenu("ShowExternalErrors", "showExternalErrors"),
+ optionMenu("ShowNetworkErrors", "showNetworkErrors"),
+ this.getShowStackTraceMenuItem(),
+ this.getStrictOptionMenuItem(),
+ "-",
+ optionMenu("LargeCommandLine", "largeCommandLine")
+ ];
+ },
+
+ getShowStackTraceMenuItem: function()
+ {
+ var menuItem = serviceOptionMenu("ShowStackTrace", "showStackTrace");
+ if (FirebugContext && !Firebug.Debugger.isAlwaysEnabled())
+ menuItem.disabled = true;
+ return menuItem;
+ },
+
+ getStrictOptionMenuItem: function()
+ {
+ var strictDomain = "javascript.options";
+ var strictName = "strict";
+ var strictValue = prefs.getBoolPref(strictDomain+"."+strictName);
+ return {label: "JavascriptOptionsStrict", type: "checkbox", checked: strictValue,
+ command: bindFixed(Firebug.setPref, Firebug, strictDomain, strictName, !strictValue) };
+ },
+
+ getBreakOnMenuItems: function()
+ {
+ //xxxHonza: no BON options for now.
+ /*return [
+ optionMenu("console.option.Persist Break On Error", "persistBreakOnError")
+ ];*/
+ return [];
+ },
+
+ search: function(text)
+ {
+ if (!text)
+ return;
+
+ // Make previously visible nodes invisible again
+ if (this.matchSet)
+ {
+ for (var i in this.matchSet)
+ removeClass(this.matchSet[i], "matched");
+ }
+
+ this.matchSet = [];
+
+ function findRow(node) { return getAncestorByClass(node, "logRow"); }
+ var search = new TextSearch(this.panelNode, findRow);
+
+ var logRow = search.find(text);
+ if (!logRow)
+ {
+ dispatch([Firebug.A11yModel], 'onConsoleSearchMatchFound', [this, text, []]);
+ return false;
+ }
+ for (; logRow; logRow = search.findNext())
+ {
+ setClass(logRow, "matched");
+ this.matchSet.push(logRow);
+ }
+ dispatch([Firebug.A11yModel], 'onConsoleSearchMatchFound', [this, text, this.matchSet]);
+ return true;
+ },
+
+ breakOnNext: function(breaking)
+ {
+ Firebug.setPref(Firebug.servicePrefDomain, "breakOnErrors", breaking);
+ },
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ // private
+
+ createRow: function(rowName, className)
+ {
+ var elt = this.document.createElement("div");
+ elt.className = rowName + (className ? " " + rowName + "-" + className : "");
+ return elt;
+ },
+
+ getTopContainer: function()
+ {
+ if (this.groups && this.groups.length)
+ return this.groups[this.groups.length-1];
+ else
+ return this.panelNode;
+ },
+
+ filterLogRow: function(logRow, scrolledToBottom)
+ {
+ if (this.searchText)
+ {
+ setClass(logRow, "matching");
+ setClass(logRow, "matched");
+
+ // Search after a delay because we must wait for a frame to be created for
+ // the new logRow so that the finder will be able to locate it
+ setTimeout(bindFixed(function()
+ {
+ if (this.searchFilter(this.searchText, logRow))
+ this.matchSet.push(logRow);
+ else
+ removeClass(logRow, "matched");
+
+ removeClass(logRow, "matching");
+
+ if (scrolledToBottom)
+ scrollToBottom(this.panelNode);
+ }, this), 100);
+ }
+ },
+
+ searchFilter: function(text, logRow)
+ {
+ var count = this.panelNode.childNodes.length;
+ var searchRange = this.document.createRange();
+ searchRange.setStart(this.panelNode, 0);
+ searchRange.setEnd(this.panelNode, count);
+
+ var startPt = this.document.createRange();
+ startPt.setStartBefore(logRow);
+
+ var endPt = this.document.createRange();
+ endPt.setStartAfter(logRow);
+
+ return finder.Find(text, searchRange, startPt, endPt) != null;
+ },
+
+ // nsIPrefObserver
+ observe: function(subject, topic, data)
+ {
+ // We're observing preferences only.
+ if (topic != "nsPref:changed")
+ return;
+
+ // xxxHonza check this out.
+ var prefDomain = "Firebug.extension.";
+ var prefName = data.substr(prefDomain.length);
+ if (prefName == "console.logLimit")
+ this.updateMaxLimit();
+ },
+
+ updateMaxLimit: function()
+ {
+ var value = 1000;
+ //TODO: xxxpedro preferences log limit?
+ //var value = Firebug.getPref(Firebug.prefDomain, "console.logLimit");
+ maxQueueRequests = value ? value : maxQueueRequests;
+ },
+
+ showCommandLine: function(shouldShow)
+ {
+ //TODO: xxxpedro show command line important
+ return;
+
+ if (shouldShow)
+ {
+ collapse(Firebug.chrome.$("fbCommandBox"), false);
+ Firebug.CommandLine.setMultiLine(Firebug.largeCommandLine, Firebug.chrome);
+ }
+ else
+ {
+ // Make sure that entire content of the Console panel is hidden when
+ // the panel is disabled.
+ Firebug.CommandLine.setMultiLine(false, Firebug.chrome, Firebug.largeCommandLine);
+ collapse(Firebug.chrome.$("fbCommandBox"), true);
+ }
+ },
+
+ onScroll: function(event)
+ {
+ // Update the scroll position flag if the position changes.
+ this.wasScrolledToBottom = FBL.isScrolledToBottom(this.panelNode);
+
+ if (FBTrace.DBG_CONSOLE)
+ FBTrace.sysout("console.onScroll ------------------ wasScrolledToBottom: " +
+ this.wasScrolledToBottom + ", wasScrolledToBottom: " +
+ this.context.getName(), event);
+ },
+
+ onResize: function(event)
+ {
+ if (FBTrace.DBG_CONSOLE)
+ FBTrace.sysout("console.onResize ------------------ wasScrolledToBottom: " +
+ this.wasScrolledToBottom + ", offsetHeight: " + this.panelNode.offsetHeight +
+ ", scrollTop: " + this.panelNode.scrollTop + ", scrollHeight: " +
+ this.panelNode.scrollHeight + ", " + this.context.getName(), event);
+
+ if (this.wasScrolledToBottom)
+ scrollToBottom(this.panelNode);
+ }
+});
+
+// ************************************************************************************************
+
+function parseFormat(format)
+{
+ var parts = [];
+ if (format.length <= 0)
+ return parts;
+
+ var reg = /((^%|.%)(\d+)?(\.)([a-zA-Z]))|((^%|.%)([a-zA-Z]))/;
+ for (var m = reg.exec(format); m; m = reg.exec(format))
+ {
+ if (m[0].substr(0, 2) == "%%")
+ {
+ parts.push(format.substr(0, m.index));
+ parts.push(m[0].substr(1));
+ }
+ else
+ {
+ var type = m[8] ? m[8] : m[5];
+ var precision = m[3] ? parseInt(m[3]) : (m[4] == "." ? -1 : 0);
+
+ var rep = null;
+ switch (type)
+ {
+ case "s":
+ rep = FirebugReps.Text;
+ break;
+ case "f":
+ case "i":
+ case "d":
+ rep = FirebugReps.Number;
+ break;
+ case "o":
+ rep = null;
+ break;
+ }
+
+ parts.push(format.substr(0, m[0][0] == "%" ? m.index : m.index+1));
+ parts.push({rep: rep, precision: precision, type: ("%" + type)});
+ }
+
+ format = format.substr(m.index+m[0].length);
+ }
+
+ parts.push(format);
+ return parts;
+}
+
+// ************************************************************************************************
+
+var appendObject = Firebug.ConsolePanel.prototype.appendObject;
+var appendFormatted = Firebug.ConsolePanel.prototype.appendFormatted;
+var appendOpenGroup = Firebug.ConsolePanel.prototype.appendOpenGroup;
+var appendCloseGroup = Firebug.ConsolePanel.prototype.appendCloseGroup;
+
+// ************************************************************************************************
+
+//Firebug.registerActivableModule(Firebug.Console);
+Firebug.registerModule(Firebug.Console);
+Firebug.registerPanel(Firebug.ConsolePanel);
+
+// ************************************************************************************************
+}});
+
+
+/* See license.txt for terms of usage */
+
+FBL.ns(function() { with (FBL) {
+
+// ************************************************************************************************
+// Constants
+
+//const Cc = Components.classes;
+//const Ci = Components.interfaces;
+
+var frameCounters = {};
+var traceRecursion = 0;
+
+Firebug.Console.injector =
+{
+ install: function(context)
+ {
+ var win = context.window;
+
+ var consoleHandler = new FirebugConsoleHandler(context, win);
+
+ var properties =
+ [
+ "log",
+ "debug",
+ "info",
+ "warn",
+ "error",
+ "assert",
+ "dir",
+ "dirxml",
+ "group",
+ "groupCollapsed",
+ "groupEnd",
+ "time",
+ "timeEnd",
+ "count",
+ "trace",
+ "profile",
+ "profileEnd",
+ "clear",
+ "open",
+ "close"
+ ];
+
+ var Handler = function(name)
+ {
+ var c = consoleHandler;
+ var f = consoleHandler[name];
+ return function(){return f.apply(c,arguments);};
+ };
+
+ var installer = function(c)
+ {
+ for (var i=0, l=properties.length; i<l; i++)
+ {
+ var name = properties[i];
+ c[name] = new Handler(name);
+ c.firebuglite = Firebug.version;
+ }
+ };
+
+ var sandbox;
+
+ if (win.console)
+ {
+ if (Env.Options.overrideConsole)
+ sandbox = new win.Function("arguments.callee.install(window.console={})");
+ else
+ // if there's a console object and overrideConsole is false we should just quit
+ return;
+ }
+ else
+ {
+ try
+ {
+ // try overriding the console object
+ sandbox = new win.Function("arguments.callee.install(window.console={})");
+ }
+ catch(E)
+ {
+ // if something goes wrong create the firebug object instead
+ sandbox = new win.Function("arguments.callee.install(window.firebug={})");
+ }
+ }
+
+ sandbox.install = installer;
+ sandbox();
+ },
+
+ isAttached: function(context, win)
+ {
+ if (win.wrappedJSObject)
+ {
+ var attached = (win.wrappedJSObject._getFirebugConsoleElement ? true : false);
+ if (FBTrace.DBG_CONSOLE)
+ FBTrace.sysout("Console.isAttached:"+attached+" to win.wrappedJSObject "+safeGetWindowLocation(win.wrappedJSObject));
+
+ return attached;
+ }
+ else
+ {
+ if (FBTrace.DBG_CONSOLE)
+ FBTrace.sysout("Console.isAttached? to win "+win.location+" fnc:"+win._getFirebugConsoleElement);
+ return (win._getFirebugConsoleElement ? true : false);
+ }
+ },
+
+ attachIfNeeded: function(context, win)
+ {
+ if (FBTrace.DBG_CONSOLE)
+ FBTrace.sysout("Console.attachIfNeeded has win "+(win? ((win.wrappedJSObject?"YES":"NO")+" wrappedJSObject"):"null") );
+
+ if (this.isAttached(context, win))
+ return true;
+
+ if (FBTrace.DBG_CONSOLE)
+ FBTrace.sysout("Console.attachIfNeeded found isAttached false ");
+
+ this.attachConsoleInjector(context, win);
+ this.addConsoleListener(context, win);
+
+ Firebug.Console.clearReloadWarning(context);
+
+ var attached = this.isAttached(context, win);
+ if (attached)
+ dispatch(Firebug.Console.fbListeners, "onConsoleInjected", [context, win]);
+
+ return attached;
+ },
+
+ attachConsoleInjector: function(context, win)
+ {
+ var consoleInjection = this.getConsoleInjectionScript(); // Do it all here.
+
+ if (FBTrace.DBG_CONSOLE)
+ FBTrace.sysout("attachConsoleInjector evaluating in "+win.location, consoleInjection);
+
+ Firebug.CommandLine.evaluateInWebPage(consoleInjection, context, win);
+
+ if (FBTrace.DBG_CONSOLE)
+ FBTrace.sysout("attachConsoleInjector evaluation completed for "+win.location);
+ },
+
+ getConsoleInjectionScript: function() {
+ if (!this.consoleInjectionScript)
+ {
+ var script = "";
+ script += "window.__defineGetter__('console', function() {\n";
+ script += " return (window._firebug ? window._firebug : window.loadFirebugConsole()); })\n\n";
+
+ script += "window.loadFirebugConsole = function() {\n";
+ script += "window._firebug = new _FirebugConsole();";
+
+ if (FBTrace.DBG_CONSOLE)
+ script += " window.dump('loadFirebugConsole '+window.location+'\\n');\n";
+
+ script += " return window._firebug };\n";
+
+ var theFirebugConsoleScript = getResource("chrome://firebug/content/consoleInjected.js");
+ script += theFirebugConsoleScript;
+
+
+ this.consoleInjectionScript = script;
+ }
+ return this.consoleInjectionScript;
+ },
+
+ forceConsoleCompilationInPage: function(context, win)
+ {
+ if (!win)
+ {
+ if (FBTrace.DBG_CONSOLE)
+ FBTrace.sysout("no win in forceConsoleCompilationInPage!");
+ return;
+ }
+
+ var consoleForcer = "window.loadFirebugConsole();";
+
+ if (context.stopped)
+ Firebug.Console.injector.evaluateConsoleScript(context); // todo evaluate consoleForcer on stack
+ else
+ Firebug.CommandLine.evaluateInWebPage(consoleForcer, context, win);
+
+ if (FBTrace.DBG_CONSOLE)
+ FBTrace.sysout("forceConsoleCompilationInPage "+win.location, consoleForcer);
+ },
+
+ evaluateConsoleScript: function(context)
+ {
+ var scriptSource = this.getConsoleInjectionScript(); // TODO XXXjjb this should be getConsoleInjectionScript
+ Firebug.Debugger.evaluate(scriptSource, context);
+ },
+
+ addConsoleListener: function(context, win)
+ {
+ if (!context.activeConsoleHandlers) // then we have not been this way before
+ context.activeConsoleHandlers = [];
+ else
+ { // we've been this way before...
+ for (var i=0; i<context.activeConsoleHandlers.length; i++)
+ {
+ if (context.activeConsoleHandlers[i].window == win)
+ {
+ context.activeConsoleHandlers[i].detach();
+ if (FBTrace.DBG_CONSOLE)
+ FBTrace.sysout("consoleInjector addConsoleListener removed handler("+context.activeConsoleHandlers[i].handler_name+") from _firebugConsole in : "+win.location+"\n");
+ context.activeConsoleHandlers.splice(i,1);
+ }
+ }
+ }
+
+ // We need the element to attach our event listener.
+ var element = Firebug.Console.getFirebugConsoleElement(context, win);
+ if (element)
+ element.setAttribute("FirebugVersion", Firebug.version); // Initialize Firebug version.
+ else
+ return false;
+
+ var handler = new FirebugConsoleHandler(context, win);
+ handler.attachTo(element);
+
+ context.activeConsoleHandlers.push(handler);
+
+ if (FBTrace.DBG_CONSOLE)
+ FBTrace.sysout("consoleInjector addConsoleListener attached handler("+handler.handler_name+") to _firebugConsole in : "+win.location+"\n");
+ return true;
+ },
+
+ detachConsole: function(context, win)
+ {
+ if (win && win.document)
+ {
+ var element = win.document.getElementById("_firebugConsole");
+ if (element)
+ element.parentNode.removeChild(element);
+ }
+ }
+};
+
+var total_handlers = 0;
+var FirebugConsoleHandler = function FirebugConsoleHandler(context, win)
+{
+ this.window = win;
+
+ this.attachTo = function(element)
+ {
+ this.element = element;
+ // When raised on our injected element, callback to Firebug and append to console
+ this.boundHandler = bind(this.handleEvent, this);
+ this.element.addEventListener('firebugAppendConsole', this.boundHandler, true); // capturing
+ };
+
+ this.detach = function()
+ {
+ this.element.removeEventListener('firebugAppendConsole', this.boundHandler, true);
+ };
+
+ this.handler_name = ++total_handlers;
+ this.handleEvent = function(event)
+ {
+ if (FBTrace.DBG_CONSOLE)
+ FBTrace.sysout("FirebugConsoleHandler("+this.handler_name+") "+event.target.getAttribute("methodName")+", event", event);
+ if (!Firebug.CommandLine.CommandHandler.handle(event, this, win))
+ {
+ if (FBTrace.DBG_CONSOLE)
+ FBTrace.sysout("FirebugConsoleHandler", this);
+
+ var methodName = event.target.getAttribute("methodName");
+ Firebug.Console.log($STRF("console.MethodNotSupported", [methodName]));
+ }
+ };
+
+ this.firebuglite = Firebug.version;
+
+ this.init = function()
+ {
+ var consoleElement = win.document.getElementById('_firebugConsole');
+ consoleElement.setAttribute("FirebugVersion", Firebug.version);
+ };
+
+ this.log = function()
+ {
+ logFormatted(arguments, "log");
+ };
+
+ this.debug = function()
+ {
+ logFormatted(arguments, "debug", true);
+ };
+
+ this.info = function()
+ {
+ logFormatted(arguments, "info", true);
+ };
+
+ this.warn = function()
+ {
+ logFormatted(arguments, "warn", true);
+ };
+
+ this.error = function()
+ {
+ //TODO: xxxpedro console error
+ //if (arguments.length == 1)
+ //{
+ // logAssert("error", arguments); // add more info based on stack trace
+ //}
+ //else
+ //{
+ //Firebug.Errors.increaseCount(context);
+ logFormatted(arguments, "error", true); // user already added info
+ //}
+ };
+
+ this.exception = function()
+ {
+ logAssert("error", arguments);
+ };
+
+ this.assert = function(x)
+ {
+ if (!x)
+ {
+ var rest = [];
+ for (var i = 1; i < arguments.length; i++)
+ rest.push(arguments[i]);
+ logAssert("assert", rest);
+ }
+ };
+
+ this.dir = function(o)
+ {
+ Firebug.Console.log(o, context, "dir", Firebug.DOMPanel.DirTable);
+ };
+
+ this.dirxml = function(o)
+ {
+ ///if (o instanceof Window)
+ if (instanceOf(o, "Window"))
+ o = o.document.documentElement;
+ ///else if (o instanceof Document)
+ else if (instanceOf(o, "Document"))
+ o = o.documentElement;
+
+ Firebug.Console.log(o, context, "dirxml", Firebug.HTMLPanel.SoloElement);
+ };
+
+ this.group = function()
+ {
+ //TODO: xxxpedro;
+ //var sourceLink = getStackLink();
+ var sourceLink = null;
+ Firebug.Console.openGroup(arguments, null, "group", null, false, sourceLink);
+ };
+
+ this.groupEnd = function()
+ {
+ Firebug.Console.closeGroup(context);
+ };
+
+ this.groupCollapsed = function()
+ {
+ var sourceLink = getStackLink();
+ // noThrottle true is probably ok, openGroups will likely be short strings.
+ var row = Firebug.Console.openGroup(arguments, null, "group", null, true, sourceLink);
+ removeClass(row, "opened");
+ };
+
+ this.profile = function(title)
+ {
+ logFormatted(["console.profile() not supported."], "warn", true);
+
+ //Firebug.Profiler.startProfiling(context, title);
+ };
+
+ this.profileEnd = function()
+ {
+ logFormatted(["console.profile() not supported."], "warn", true);
+
+ //Firebug.Profiler.stopProfiling(context);
+ };
+
+ this.count = function(key)
+ {
+ // TODO: xxxpedro console2: is there a better way to find a unique ID for the coun() call?
+ var frameId = "0";
+ //var frameId = FBL.getStackFrameId();
+ if (frameId)
+ {
+ if (!frameCounters)
+ frameCounters = {};
+
+ if (key != undefined)
+ frameId += key;
+
+ var frameCounter = frameCounters[frameId];
+ if (!frameCounter)
+ {
+ var logRow = logFormatted(["0"], null, true, true);
+
+ frameCounter = {logRow: logRow, count: 1};
+ frameCounters[frameId] = frameCounter;
+ }
+ else
+ ++frameCounter.count;
+
+ var label = key == undefined
+ ? frameCounter.count
+ : key + " " + frameCounter.count;
+
+ frameCounter.logRow.firstChild.firstChild.nodeValue = label;
+ }
+ };
+
+ this.trace = function()
+ {
+ var getFuncName = function getFuncName (f)
+ {
+ if (f.getName instanceof Function)
+ {
+ return f.getName();
+ }
+ if (f.name) // in FireFox, Function objects have a name property...
+ {
+ return f.name;
+ }
+
+ var name = f.toString().match(/function\s*([_$\w\d]*)/)[1];
+ return name || "anonymous";
+ };
+
+ var wasVisited = function(fn)
+ {
+ for (var i=0, l=frames.length; i<l; i++)
+ {
+ if (frames[i].fn == fn)
+ {
+ return true;
+ }
+ }
+
+ return false;
+ };
+
+ traceRecursion++;
+
+ if (traceRecursion > 1)
+ {
+ traceRecursion--;
+ return;
+ }
+
+ var frames = [];
+
+ for (var fn = arguments.callee.caller.caller; fn; fn = fn.caller)
+ {
+ if (wasVisited(fn)) break;
+
+ var args = [];
+
+ for (var i = 0, l = fn.arguments.length; i < l; ++i)
+ {
+ args.push({value: fn.arguments[i]});
+ }
+
+ frames.push({fn: fn, name: getFuncName(fn), args: args});
+ }
+
+
+ // ****************************************************************************************
+
+ try
+ {
+ (0)();
+ }
+ catch(e)
+ {
+ var result = e;
+
+ var stack =
+ result.stack || // Firefox / Google Chrome
+ result.stacktrace || // Opera
+ "";
+
+ stack = stack.replace(/\n\r|\r\n/g, "\n"); // normalize line breaks
+ var items = stack.split(/[\n\r]/);
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ // Google Chrome
+ if (FBL.isSafari)
+ {
+ //var reChromeStackItem = /^\s+at\s+([^\(]+)\s\((.*)\)$/;
+ //var reChromeStackItem = /^\s+at\s+(.*)((?:http|https|ftp|file):\/\/.*)$/;
+ var reChromeStackItem = /^\s+at\s+(.*)((?:http|https|ftp|file):\/\/.*)$/;
+
+ var reChromeStackItemName = /\s*\($/;
+ var reChromeStackItemValue = /^(.+)\:(\d+\:\d+)\)?$/;
+
+ var framePos = 0;
+ for (var i=4, length=items.length; i<length; i++, framePos++)
+ {
+ var frame = frames[framePos];
+ var item = items[i];
+ var match = item.match(reChromeStackItem);
+
+ //Firebug.Console.log("["+ framePos +"]--------------------------");
+ //Firebug.Console.log(item);
+ //Firebug.Console.log("................");
+
+ if (match)
+ {
+ var name = match[1];
+ if (name)
+ {
+ name = name.replace(reChromeStackItemName, "");
+ frame.name = name;
+ }
+
+ //Firebug.Console.log("name: "+name);
+
+ var value = match[2].match(reChromeStackItemValue);
+ if (value)
+ {
+ frame.href = value[1];
+ frame.lineNo = value[2];
+
+ //Firebug.Console.log("url: "+value[1]);
+ //Firebug.Console.log("line: "+value[2]);
+ }
+ //else
+ // Firebug.Console.log(match[2]);
+
+ }
+ }
+ }
+ /**/
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ else if (FBL.isFirefox)
+ {
+ // Firefox
+ var reFirefoxStackItem = /^(.*)@(.*)$/;
+ var reFirefoxStackItemValue = /^(.+)\:(\d+)$/;
+
+ var framePos = 0;
+ for (var i=2, length=items.length; i<length; i++, framePos++)
+ {
+ var frame = frames[framePos] || {};
+ var item = items[i];
+ var match = item.match(reFirefoxStackItem);
+
+ if (match)
+ {
+ var name = match[1];
+
+ //Firebug.Console.logFormatted("name: "+name);
+
+ var value = match[2].match(reFirefoxStackItemValue);
+ if (value)
+ {
+ frame.href = value[1];
+ frame.lineNo = value[2];
+
+ //Firebug.Console.log("href: "+ value[1]);
+ //Firebug.Console.log("line: " + value[2]);
+ }
+ //else
+ // Firebug.Console.logFormatted([match[2]]);
+ }
+ }
+ }
+ /**/
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ /*
+ else if (FBL.isOpera)
+ {
+ // Opera
+ var reOperaStackItem = /^\s\s(?:\.\.\.\s\s)?Line\s(\d+)\sof\s(.+)$/;
+ var reOperaStackItemValue = /^linked\sscript\s(.+)$/;
+
+ for (var i=0, length=items.length; i<length; i+=2)
+ {
+ var item = items[i];
+
+ var match = item.match(reOperaStackItem);
+
+ if (match)
+ {
+ //Firebug.Console.log(match[1]);
+
+ var value = match[2].match(reOperaStackItemValue);
+
+ if (value)
+ {
+ //Firebug.Console.log(value[1]);
+ }
+ //else
+ // Firebug.Console.log(match[2]);
+
+ //Firebug.Console.log("--------------------------");
+ }
+ }
+ }
+ /**/
+ }
+
+ //console.log(stack);
+ //console.dir(frames);
+ Firebug.Console.log({frames: frames}, context, "stackTrace", FirebugReps.StackTrace);
+
+ traceRecursion--;
+ };
+
+ this.trace_ok = function()
+ {
+ var getFuncName = function getFuncName (f)
+ {
+ if (f.getName instanceof Function)
+ return f.getName();
+ if (f.name) // in FireFox, Function objects have a name property...
+ return f.name;
+
+ var name = f.toString().match(/function\s*([_$\w\d]*)/)[1];
+ return name || "anonymous";
+ };
+
+ var wasVisited = function(fn)
+ {
+ for (var i=0, l=frames.length; i<l; i++)
+ {
+ if (frames[i].fn == fn)
+ return true;
+ }
+
+ return false;
+ };
+
+ var frames = [];
+
+ for (var fn = arguments.callee.caller; fn; fn = fn.caller)
+ {
+ if (wasVisited(fn)) break;
+
+ var args = [];
+
+ for (var i = 0, l = fn.arguments.length; i < l; ++i)
+ {
+ args.push({value: fn.arguments[i]});
+ }
+
+ frames.push({fn: fn, name: getFuncName(fn), args: args});
+ }
+
+ Firebug.Console.log({frames: frames}, context, "stackTrace", FirebugReps.StackTrace);
+ };
+
+ this.clear = function()
+ {
+ Firebug.Console.clear(context);
+ };
+
+ this.time = function(name, reset)
+ {
+ if (!name)
+ return;
+
+ var time = new Date().getTime();
+
+ if (!this.timeCounters)
+ this.timeCounters = {};
+
+ var key = "KEY"+name.toString();
+
+ if (!reset && this.timeCounters[key])
+ return;
+
+ this.timeCounters[key] = time;
+ };
+
+ this.timeEnd = function(name)
+ {
+ var time = new Date().getTime();
+
+ if (!this.timeCounters)
+ return;
+
+ var key = "KEY"+name.toString();
+
+ var timeCounter = this.timeCounters[key];
+ if (timeCounter)
+ {
+ var diff = time - timeCounter;
+ var label = name + ": " + diff + "ms";
+
+ this.info(label);
+
+ delete this.timeCounters[key];
+ }
+ return diff;
+ };
+
+ // These functions are over-ridden by commandLine
+ this.evaluated = function(result, context)
+ {
+ if (FBTrace.DBG_CONSOLE)
+ FBTrace.sysout("consoleInjector.FirebugConsoleHandler evalutated default called", result);
+
+ Firebug.Console.log(result, context);
+ };
+ this.evaluateError = function(result, context)
+ {
+ Firebug.Console.log(result, context, "errorMessage");
+ };
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+ function logFormatted(args, className, linkToSource, noThrottle)
+ {
+ var sourceLink = linkToSource ? getStackLink() : null;
+ return Firebug.Console.logFormatted(args, context, className, noThrottle, sourceLink);
+ }
+
+ function logAssert(category, args)
+ {
+ Firebug.Errors.increaseCount(context);
+
+ if (!args || !args.length || args.length == 0)
+ var msg = [FBL.$STR("Assertion")];
+ else
+ var msg = args[0];
+
+ if (Firebug.errorStackTrace)
+ {
+ var trace = Firebug.errorStackTrace;
+ delete Firebug.errorStackTrace;
+ if (FBTrace.DBG_CONSOLE)
+ FBTrace.sysout("logAssert trace from errorStackTrace", trace);
+ }
+ else if (msg.stack)
+ {
+ var trace = parseToStackTrace(msg.stack);
+ if (FBTrace.DBG_CONSOLE)
+ FBTrace.sysout("logAssert trace from msg.stack", trace);
+ }
+ else
+ {
+ var trace = getJSDUserStack();
+ if (FBTrace.DBG_CONSOLE)
+ FBTrace.sysout("logAssert trace from getJSDUserStack", trace);
+ }
+
+ var errorObject = new FBL.ErrorMessage(msg, (msg.fileName?msg.fileName:win.location), (msg.lineNumber?msg.lineNumber:0), "", category, context, trace);
+
+
+ if (trace && trace.frames && trace.frames[0])
+ errorObject.correctWithStackTrace(trace);
+
+ errorObject.resetSource();
+
+ var objects = errorObject;
+ if (args.length > 1)
+ {
+ objects = [errorObject];
+ for (var i = 1; i < args.length; i++)
+ objects.push(args[i]);
+ }
+
+ var row = Firebug.Console.log(objects, context, "errorMessage", null, true); // noThrottle
+ row.scrollIntoView();
+ }
+
+ function getComponentsStackDump()
+ {
+ // Starting with our stack, walk back to the user-level code
+ var frame = Components.stack;
+ var userURL = win.location.href.toString();
+
+ if (FBTrace.DBG_CONSOLE)
+ FBTrace.sysout("consoleInjector.getComponentsStackDump initial stack for userURL "+userURL, frame);
+
+ // Drop frames until we get into user code.
+ while (frame && FBL.isSystemURL(frame.filename) )
+ frame = frame.caller;
+
+ // Drop two more frames, the injected console function and firebugAppendConsole()
+ if (frame)
+ frame = frame.caller;
+ if (frame)
+ frame = frame.caller;
+
+ if (FBTrace.DBG_CONSOLE)
+ FBTrace.sysout("consoleInjector.getComponentsStackDump final stack for userURL "+userURL, frame);
+
+ return frame;
+ }
+
+ function getStackLink()
+ {
+ // TODO: xxxpedro console2
+ return;
+ //return FBL.getFrameSourceLink(getComponentsStackDump());
+ }
+
+ function getJSDUserStack()
+ {
+ var trace = FBL.getCurrentStackTrace(context);
+
+ var frames = trace ? trace.frames : null;
+ if (frames && (frames.length > 0) )
+ {
+ var oldest = frames.length - 1; // 6 - 1 = 5
+ for (var i = 0; i < frames.length; i++)
+ {
+ if (frames[oldest - i].href.indexOf("chrome:") == 0) break;
+ var fn = frames[oldest - i].fn + "";
+ if (fn && (fn.indexOf("_firebugEvalEvent") != -1) ) break; // command line
+ }
+ FBTrace.sysout("consoleInjector getJSDUserStack: "+frames.length+" oldest: "+oldest+" i: "+i+" i - oldest + 2: "+(i - oldest + 2), trace);
+ trace.frames = trace.frames.slice(2 - i); // take the oldest frames, leave 2 behind they are injection code
+
+ return trace;
+ }
+ else
+ return "Firebug failed to get stack trace with any frames";
+ }
+};
+
+// ************************************************************************************************
+// Register console namespace
+
+FBL.registerConsole = function()
+{
+ var win = Env.browser.window;
+ Firebug.Console.injector.install(win);
+};
+
+registerConsole();
+
+}});
+
+
+/* See license.txt for terms of usage */
+
+FBL.ns(function() { with (FBL) {
+// ************************************************************************************************
+
+
+// ************************************************************************************************
+// Globals
+
+var commandPrefix = ">>>";
+var reOpenBracket = /[\[\(\{]/;
+var reCloseBracket = /[\]\)\}]/;
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+var commandHistory = [];
+var commandPointer = -1;
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+var isAutoCompleting = null;
+var autoCompletePrefix = null;
+var autoCompleteExpr = null;
+var autoCompleteBuffer = null;
+var autoCompletePosition = null;
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+var fbCommandLine = null;
+var fbLargeCommandLine = null;
+var fbLargeCommandButtons = null;
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+var _completion =
+{
+ window:
+ [
+ "console"
+ ],
+
+ document:
+ [
+ "getElementById",
+ "getElementsByTagName"
+ ]
+};
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+var _stack = function(command)
+{
+ Firebug.context.persistedState.commandHistory.push(command);
+ Firebug.context.persistedState.commandPointer =
+ Firebug.context.persistedState.commandHistory.length;
+};
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+// ************************************************************************************************
+// CommandLine
+
+Firebug.CommandLine = extend(Firebug.Module,
+{
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+ element: null,
+ isMultiLine: false,
+ isActive: false,
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+ initialize: function(doc)
+ {
+ this.clear = bind(this.clear, this);
+ this.enter = bind(this.enter, this);
+
+ this.onError = bind(this.onError, this);
+ this.onKeyDown = bind(this.onKeyDown, this);
+ this.onMultiLineKeyDown = bind(this.onMultiLineKeyDown, this);
+
+ addEvent(Firebug.browser.window, "error", this.onError);
+ addEvent(Firebug.chrome.window, "error", this.onError);
+ },
+
+ shutdown: function(doc)
+ {
+ this.deactivate();
+
+ removeEvent(Firebug.browser.window, "error", this.onError);
+ removeEvent(Firebug.chrome.window, "error", this.onError);
+ },
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+ activate: function(multiLine, hideToggleIcon, onRun)
+ {
+ defineCommandLineAPI();
+
+ Firebug.context.persistedState.commandHistory =
+ Firebug.context.persistedState.commandHistory || [];
+
+ Firebug.context.persistedState.commandPointer =
+ Firebug.context.persistedState.commandPointer || -1;
+
+ if (this.isActive)
+ {
+ if (this.isMultiLine == multiLine) return;
+
+ this.deactivate();
+ }
+
+ fbCommandLine = $("fbCommandLine");
+ fbLargeCommandLine = $("fbLargeCommandLine");
+ fbLargeCommandButtons = $("fbLargeCommandButtons");
+
+ if (multiLine)
+ {
+ onRun = onRun || this.enter;
+
+ this.isMultiLine = true;
+
+ this.element = fbLargeCommandLine;
+
+ addEvent(this.element, "keydown", this.onMultiLineKeyDown);
+
+ addEvent($("fbSmallCommandLineIcon"), "click", Firebug.chrome.hideLargeCommandLine);
+
+ this.runButton = new Button({
+ element: $("fbCommand_btRun"),
+ owner: Firebug.CommandLine,
+ onClick: onRun
+ });
+
+ this.runButton.initialize();
+
+ this.clearButton = new Button({
+ element: $("fbCommand_btClear"),
+ owner: Firebug.CommandLine,
+ onClick: this.clear
+ });
+
+ this.clearButton.initialize();
+ }
+ else
+ {
+ this.isMultiLine = false;
+ this.element = fbCommandLine;
+
+ if (!fbCommandLine)
+ return;
+
+ addEvent(this.element, "keydown", this.onKeyDown);
+ }
+
+ //Firebug.Console.log("activate", this.element);
+
+ if (isOpera)
+ fixOperaTabKey(this.element);
+
+ if(this.lastValue)
+ this.element.value = this.lastValue;
+
+ this.isActive = true;
+ },
+
+ deactivate: function()
+ {
+ if (!this.isActive) return;
+
+ //Firebug.Console.log("deactivate", this.element);
+
+ this.isActive = false;
+
+ this.lastValue = this.element.value;
+
+ if (this.isMultiLine)
+ {
+ removeEvent(this.element, "keydown", this.onMultiLineKeyDown);
+
+ removeEvent($("fbSmallCommandLineIcon"), "click", Firebug.chrome.hideLargeCommandLine);
+
+ this.runButton.destroy();
+ this.clearButton.destroy();
+ }
+ else
+ {
+ removeEvent(this.element, "keydown", this.onKeyDown);
+ }
+
+ this.element = null;
+ delete this.element;
+
+ fbCommandLine = null;
+ fbLargeCommandLine = null;
+ fbLargeCommandButtons = null;
+ },
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+ focus: function()
+ {
+ this.element.focus();
+ },
+
+ blur: function()
+ {
+ this.element.blur();
+ },
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+ clear: function()
+ {
+ this.element.value = "";
+ },
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+ evaluate: function(expr)
+ {
+ // TODO: need to register the API in console.firebug.commandLineAPI
+ var api = "Firebug.CommandLine.API";
+
+ var result = Firebug.context.evaluate(expr, "window", api, Firebug.Console.error);
+
+ return result;
+ },
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+ enter: function()
+ {
+ var command = this.element.value;
+
+ if (!command) return;
+
+ _stack(command);
+
+ Firebug.Console.log(commandPrefix + " " + stripNewLines(command),
+ Firebug.browser, "command", FirebugReps.Text);
+
+ var result = this.evaluate(command);
+
+ Firebug.Console.log(result);
+ },
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+ prevCommand: function()
+ {
+ if (Firebug.context.persistedState.commandPointer > 0 &&
+ Firebug.context.persistedState.commandHistory.length > 0)
+ {
+ this.element.value = Firebug.context.persistedState.commandHistory
+ [--Firebug.context.persistedState.commandPointer];
+ }
+ },
+
+ nextCommand: function()
+ {
+ var element = this.element;
+
+ var limit = Firebug.context.persistedState.commandHistory.length -1;
+ var i = Firebug.context.persistedState.commandPointer;
+
+ if (i < limit)
+ element.value = Firebug.context.persistedState.commandHistory
+ [++Firebug.context.persistedState.commandPointer];
+
+ else if (i == limit)
+ {
+ ++Firebug.context.persistedState.commandPointer;
+ element.value = "";
+ }
+ },
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+ autocomplete: function(reverse)
+ {
+ var element = this.element;
+
+ var command = element.value;
+ var offset = getExpressionOffset(command);
+
+ var valBegin = offset ? command.substr(0, offset) : "";
+ var val = command.substr(offset);
+
+ var buffer, obj, objName, commandBegin, result, prefix;
+
+ // if it is the beginning of the completion
+ if(!isAutoCompleting)
+ {
+
+ // group1 - command begin
+ // group2 - base object
+ // group3 - property prefix
+ var reObj = /(.*[^_$\w\d\.])?((?:[_$\w][_$\w\d]*\.)*)([_$\w][_$\w\d]*)?$/;
+ var r = reObj.exec(val);
+
+ // parse command
+ if (r[1] || r[2] || r[3])
+ {
+ commandBegin = r[1] || "";
+ objName = r[2] || "";
+ prefix = r[3] || "";
+ }
+ else if (val == "")
+ {
+ commandBegin = objName = prefix = "";
+ } else
+ return;
+
+ isAutoCompleting = true;
+
+ // find base object
+ if(objName == "")
+ obj = window;
+
+ else
+ {
+ objName = objName.replace(/\.$/, "");
+
+ var n = objName.split(".");
+ var target = window, o;
+
+ for (var i=0, ni; ni = n[i]; i++)
+ {
+ if (o = target[ni])
+ target = o;
+
+ else
+ {
+ target = null;
+ break;
+ }
+ }
+ obj = target;
+ }
+
+ // map base object
+ if(obj)
+ {
+ autoCompletePrefix = prefix;
+ autoCompleteExpr = valBegin + commandBegin + (objName ? objName + "." : "");
+ autoCompletePosition = -1;
+
+ buffer = autoCompleteBuffer = isIE ?
+ _completion[objName || "window"] || [] : [];
+
+ for(var p in obj)
+ buffer.push(p);
+ }
+
+ // if it is the continuation of the last completion
+ } else
+ buffer = autoCompleteBuffer;
+
+ if (buffer)
+ {
+ prefix = autoCompletePrefix;
+
+ var diff = reverse ? -1 : 1;
+
+ for(var i=autoCompletePosition+diff, l=buffer.length, bi; i>=0 && i<l; i+=diff)
+ {
+ bi = buffer[i];
+
+ if (bi.indexOf(prefix) == 0)
+ {
+ autoCompletePosition = i;
+ result = bi;
+ break;
+ }
+ }
+ }
+
+ if (result)
+ element.value = autoCompleteExpr + result;
+ },
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+ setMultiLine: function(multiLine)
+ {
+ if (multiLine == this.isMultiLine) return;
+
+ this.activate(multiLine);
+ },
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+ onError: function(msg, href, lineNo)
+ {
+ href = href || "";
+
+ var lastSlash = href.lastIndexOf("/");
+ var fileName = lastSlash == -1 ? href : href.substr(lastSlash+1);
+ var html = [
+ '<span class="errorMessage">', msg, '</span>',
+ '<div class="objectBox-sourceLink">', fileName, ' (line ', lineNo, ')</div>'
+ ];
+
+ // TODO: xxxpedro ajust to Console2
+ //Firebug.Console.writeRow(html, "error");
+ },
+
+ onKeyDown: function(e)
+ {
+ e = e || event;
+
+ var code = e.keyCode;
+
+ /*tab, shift, control, alt*/
+ if (code != 9 && code != 16 && code != 17 && code != 18)
+ {
+ isAutoCompleting = false;
+ }
+
+ if (code == 13 /* enter */)
+ {
+ this.enter();
+ this.clear();
+ }
+ else if (code == 27 /* ESC */)
+ {
+ setTimeout(this.clear, 0);
+ }
+ else if (code == 38 /* up */)
+ {
+ this.prevCommand();
+ }
+ else if (code == 40 /* down */)
+ {
+ this.nextCommand();
+ }
+ else if (code == 9 /* tab */)
+ {
+ this.autocomplete(e.shiftKey);
+ }
+ else
+ return;
+
+ cancelEvent(e, true);
+ return false;
+ },
+
+ onMultiLineKeyDown: function(e)
+ {
+ e = e || event;
+
+ var code = e.keyCode;
+
+ if (code == 13 /* enter */ && e.ctrlKey)
+ {
+ this.enter();
+ }
+ }
+});
+
+Firebug.registerModule(Firebug.CommandLine);
+
+
+// ************************************************************************************************
+//
+
+function getExpressionOffset(command)
+{
+ // XXXjoe This is kind of a poor-man's JavaScript parser - trying
+ // to find the start of the expression that the cursor is inside.
+ // Not 100% fool proof, but hey...
+
+ var bracketCount = 0;
+
+ var start = command.length-1;
+ for (; start >= 0; --start)
+ {
+ var c = command[start];
+ if ((c == "," || c == ";" || c == " ") && !bracketCount)
+ break;
+ if (reOpenBracket.test(c))
+ {
+ if (bracketCount)
+ --bracketCount;
+ else
+ break;
+ }
+ else if (reCloseBracket.test(c))
+ ++bracketCount;
+ }
+
+ return start + 1;
+}
+
+// ************************************************************************************************
+// CommandLine API
+
+var CommandLineAPI =
+{
+ $: function(id)
+ {
+ return Firebug.browser.document.getElementById(id);
+ },
+
+ $$: function(selector, context)
+ {
+ context = context || Firebug.browser.document;
+ return Firebug.Selector ?
+ Firebug.Selector(selector, context) :
+ Firebug.Console.error("Firebug.Selector module not loaded.");
+ },
+
+ $0: null,
+
+ $1: null,
+
+ dir: function(o)
+ {
+ Firebug.Console.log(o, Firebug.context, "dir", Firebug.DOMPanel.DirTable);
+ },
+
+ dirxml: function(o)
+ {
+ ///if (o instanceof Window)
+ if (instanceOf(o, "Window"))
+ o = o.document.documentElement;
+ ///else if (o instanceof Document)
+ else if (instanceOf(o, "Document"))
+ o = o.documentElement;
+
+ Firebug.Console.log(o, Firebug.context, "dirxml", Firebug.HTMLPanel.SoloElement);
+ }
+};
+
+// ************************************************************************************************
+
+var defineCommandLineAPI = function defineCommandLineAPI()
+{
+ Firebug.CommandLine.API = {};
+ for (var m in CommandLineAPI)
+ if (!Env.browser.window[m])
+ Firebug.CommandLine.API[m] = CommandLineAPI[m];
+
+ var stack = FirebugChrome.htmlSelectionStack;
+ if (stack)
+ {
+ Firebug.CommandLine.API.$0 = stack[0];
+ Firebug.CommandLine.API.$1 = stack[1];
+ }
+};
+
+// ************************************************************************************************
+}});
+
+/* See license.txt for terms of usage */
+
+FBL.ns(function() { with (FBL) {
+// ************************************************************************************************
+
+// ************************************************************************************************
+// Globals
+
+var ElementCache = Firebug.Lite.Cache.Element;
+var cacheID = Firebug.Lite.Cache.ID;
+
+var ignoreHTMLProps =
+{
+ // ignores the attributes injected by Sizzle, otherwise it will
+ // be visible on IE (when enumerating element.attributes)
+ sizcache: 1,
+ sizset: 1
+};
+
+if (Firebug.ignoreFirebugElements)
+ // ignores also the cache property injected by firebug
+ ignoreHTMLProps[cacheID] = 1;
+
+
+// ************************************************************************************************
+// HTML Module
+
+Firebug.HTML = extend(Firebug.Module,
+{
+ appendTreeNode: function(nodeArray, html)
+ {
+ var reTrim = /^\s+|\s+$/g;
+
+ if (!nodeArray.length) nodeArray = [nodeArray];
+
+ for (var n=0, node; node=nodeArray[n]; n++)
+ {
+ if (node.nodeType == 1)
+ {
+ if (Firebug.ignoreFirebugElements && node.firebugIgnore) continue;
+
+ var uid = ElementCache(node);
+ var child = node.childNodes;
+ var childLength = child.length;
+
+ var nodeName = node.nodeName.toLowerCase();
+
+ var nodeVisible = isVisible(node);
+
+ var hasSingleTextChild = childLength == 1 && node.firstChild.nodeType == 3 &&
+ nodeName != "script" && nodeName != "style";
+
+ var nodeControl = !hasSingleTextChild && childLength > 0 ?
+ ('<div class="nodeControl"></div>') : '';
+
+ // FIXME xxxpedro remove this
+ //var isIE = false;
+
+ if(isIE && nodeControl)
+ html.push(nodeControl);
+
+ if (typeof uid != 'undefined')
+ html.push(
+ '<div class="objectBox-element" ',
+ 'id="', uid,
+ '">',
+ !isIE && nodeControl ? nodeControl: "",
+ '<span ',
+ cacheID,
+ '="', uid,
+ '" class="nodeBox',
+ nodeVisible ? "" : " nodeHidden",
+ '"><<span class="nodeTag">', nodeName, '</span>'
+ );
+ else
+ html.push(
+ '<div class="objectBox-element"><span class="nodeBox',
+ nodeVisible ? "" : " nodeHidden",
+ '"><<span class="nodeTag">',
+ nodeName, '</span>'
+ );
+
+ for (var i = 0; i < node.attributes.length; ++i)
+ {
+ var attr = node.attributes[i];
+ if (!attr.specified ||
+ // Issue 4432: Firebug Lite: HTML is mixed-up with functions
+ // The problem here is that expando properties added to DOM elements in
+ // IE < 9 will behave like DOM attributes and so they'll show up when
+ // looking at element.attributes list.
+ isIE && (browserVersion-0<9) && typeof attr.nodeValue != "string" ||
+ Firebug.ignoreFirebugElements && ignoreHTMLProps.hasOwnProperty(attr.nodeName))
+ continue;
+
+ var name = attr.nodeName.toLowerCase();
+ var value = name == "style" ? formatStyles(node.style.cssText) : attr.nodeValue;
+
+ html.push(' <span class="nodeName">', name,
+ '</span>="<span class="nodeValue">', escapeHTML(value),
+ '</span>"');
+ }
+
+ /*
+ // source code nodes
+ if (nodeName == 'script' || nodeName == 'style')
+ {
+
+ if(document.all){
+ var src = node.innerHTML+'\n';
+
+ }else {
+ var src = '\n'+node.innerHTML+'\n';
+ }
+
+ var match = src.match(/\n/g);
+ var num = match ? match.length : 0;
+ var s = [], sl = 0;
+
+ for(var c=1; c<num; c++){
+ s[sl++] = '<div line="'+c+'">' + c + '</div>';
+ }
+
+ html.push('></div><div class="nodeGroup"><div class="nodeChildren"><div class="lineNo">',
+ s.join(''),
+ '</div><pre class="nodeCode">',
+ escapeHTML(src),
+ '</pre>',
+ '</div><div class="objectBox-element"></<span class="nodeTag">',
+ nodeName,
+ '</span>></div>',
+ '</div>'
+ );
+
+
+ }/**/
+
+ // Just a single text node child
+ if (hasSingleTextChild)
+ {
+ var value = child[0].nodeValue.replace(reTrim, '');
+ if(value)
+ {
+ html.push(
+ '><span class="nodeText">',
+ escapeHTML(value),
+ '</span></<span class="nodeTag">',
+ nodeName,
+ '</span>></span></div>'
+ );
+ }
+ else
+ html.push('/></span></div>'); // blank text, print as childless node
+
+ }
+ else if (childLength > 0)
+ {
+ html.push('></span></div>');
+ }
+ else
+ html.push('/></span></div>');
+
+ }
+ else if (node.nodeType == 3)
+ {
+ if ( node.parentNode && ( node.parentNode.nodeName.toLowerCase() == "script" ||
+ node.parentNode.nodeName.toLowerCase() == "style" ) )
+ {
+ var value = node.nodeValue.replace(reTrim, '');
+
+ if(isIE){
+ var src = value+'\n';
+
+ }else {
+ var src = '\n'+value+'\n';
+ }
+
+ var match = src.match(/\n/g);
+ var num = match ? match.length : 0;
+ var s = [], sl = 0;
+
+ for(var c=1; c<num; c++){
+ s[sl++] = '<div line="'+c+'">' + c + '</div>';
+ }
+
+ html.push('<div class="lineNo">',
+ s.join(''),
+ '</div><pre class="sourceCode">',
+ escapeHTML(src),
+ '</pre>'
+ );
+
+ }
+ else
+ {
+ var value = node.nodeValue.replace(reTrim, '');
+ if (value)
+ html.push('<div class="nodeText">', escapeHTML(value),'</div>');
+ }
+ }
+ }
+ },
+
+ appendTreeChildren: function(treeNode)
+ {
+ var doc = Firebug.chrome.document;
+ var uid = treeNode.id;
+ var parentNode = ElementCache.get(uid);
+
+ if (parentNode.childNodes.length == 0) return;
+
+ var treeNext = treeNode.nextSibling;
+ var treeParent = treeNode.parentNode;
+
+ // FIXME xxxpedro remove this
+ //var isIE = false;
+ var control = isIE ? treeNode.previousSibling : treeNode.firstChild;
+ control.className = 'nodeControl nodeMaximized';
+
+ var html = [];
+ var children = doc.createElement("div");
+ children.className = "nodeChildren";
+ this.appendTreeNode(parentNode.childNodes, html);
+ children.innerHTML = html.join("");
+
+ treeParent.insertBefore(children, treeNext);
+
+ var closeElement = doc.createElement("div");
+ closeElement.className = "objectBox-element";
+ closeElement.innerHTML = '</<span class="nodeTag">' +
+ parentNode.nodeName.toLowerCase() + '></span>';
+
+ treeParent.insertBefore(closeElement, treeNext);
+
+ },
+
+ removeTreeChildren: function(treeNode)
+ {
+ var children = treeNode.nextSibling;
+ var closeTag = children.nextSibling;
+
+ // FIXME xxxpedro remove this
+ //var isIE = false;
+ var control = isIE ? treeNode.previousSibling : treeNode.firstChild;
+ control.className = 'nodeControl';
+
+ children.parentNode.removeChild(children);
+ closeTag.parentNode.removeChild(closeTag);
+ },
+
+ isTreeNodeVisible: function(id)
+ {
+ return $(id);
+ },
+
+ select: function(el)
+ {
+ var id = el && ElementCache(el);
+ if (id)
+ this.selectTreeNode(id);
+ },
+
+ selectTreeNode: function(id)
+ {
+ id = ""+id;
+ var node, stack = [];
+ while(id && !this.isTreeNodeVisible(id))
+ {
+ stack.push(id);
+
+ var node = ElementCache.get(id).parentNode;
+
+ if (node)
+ id = ElementCache(node);
+ else
+ break;
+ }
+
+ stack.push(id);
+
+ while(stack.length > 0)
+ {
+ id = stack.pop();
+ node = $(id);
+
+ if (stack.length > 0 && ElementCache.get(id).childNodes.length > 0)
+ this.appendTreeChildren(node);
+ }
+
+ selectElement(node);
+
+ // TODO: xxxpedro
+ if (fbPanel1)
+ fbPanel1.scrollTop = Math.round(node.offsetTop - fbPanel1.clientHeight/2);
+ }
+
+});
+
+Firebug.registerModule(Firebug.HTML);
+
+// ************************************************************************************************
+// HTML Panel
+
+function HTMLPanel(){};
+
+HTMLPanel.prototype = extend(Firebug.Panel,
+{
+ name: "HTML",
+ title: "HTML",
+
+ options: {
+ hasSidePanel: true,
+ //hasToolButtons: true,
+ isPreRendered: !Firebug.flexChromeEnabled /* FIXME xxxpedro chromenew */,
+ innerHTMLSync: true
+ },
+
+ create: function(){
+ Firebug.Panel.create.apply(this, arguments);
+
+ this.panelNode.style.padding = "4px 3px 1px 15px";
+ this.panelNode.style.minWidth = "500px";
+
+ if (Env.Options.enablePersistent || Firebug.chrome.type != "popup")
+ this.createUI();
+
+ if(this.sidePanelBar && !this.sidePanelBar.selectedPanel)
+ {
+ this.sidePanelBar.selectPanel("css");
+ }
+ },
+
+ destroy: function()
+ {
+ selectedElement = null;
+ fbPanel1 = null;
+
+ selectedSidePanelTS = null;
+ selectedSidePanelTimer = null;
+
+ Firebug.Panel.destroy.apply(this, arguments);
+ },
+
+ createUI: function()
+ {
+ var rootNode = Firebug.browser.document.documentElement;
+ var html = [];
+ Firebug.HTML.appendTreeNode(rootNode, html);
+
+ this.panelNode.innerHTML = html.join("");
+ },
+
+ initialize: function()
+ {
+ Firebug.Panel.initialize.apply(this, arguments);
+ addEvent(this.panelNode, 'click', Firebug.HTML.onTreeClick);
+
+ fbPanel1 = $("fbPanel1");
+
+ if(!selectedElement)
+ {
+ Firebug.context.persistedState.selectedHTMLElementId =
+ Firebug.context.persistedState.selectedHTMLElementId &&
+ ElementCache.get(Firebug.context.persistedState.selectedHTMLElementId) ?
+ Firebug.context.persistedState.selectedHTMLElementId :
+ ElementCache(Firebug.browser.document.body);
+
+ Firebug.HTML.selectTreeNode(Firebug.context.persistedState.selectedHTMLElementId);
+ }
+
+ // TODO: xxxpedro
+ addEvent(fbPanel1, 'mousemove', Firebug.HTML.onListMouseMove);
+ addEvent($("fbContent"), 'mouseout', Firebug.HTML.onListMouseMove);
+ addEvent(Firebug.chrome.node, 'mouseout', Firebug.HTML.onListMouseMove);
+ },
+
+ shutdown: function()
+ {
+ // TODO: xxxpedro
+ removeEvent(fbPanel1, 'mousemove', Firebug.HTML.onListMouseMove);
+ removeEvent($("fbContent"), 'mouseout', Firebug.HTML.onListMouseMove);
+ removeEvent(Firebug.chrome.node, 'mouseout', Firebug.HTML.onListMouseMove);
+
+ removeEvent(this.panelNode, 'click', Firebug.HTML.onTreeClick);
+
+ fbPanel1 = null;
+
+ Firebug.Panel.shutdown.apply(this, arguments);
+ },
+
+ reattach: function()
+ {
+ // TODO: panel reattach
+ if(Firebug.context.persistedState.selectedHTMLElementId)
+ Firebug.HTML.selectTreeNode(Firebug.context.persistedState.selectedHTMLElementId);
+ },
+
+ updateSelection: function(object)
+ {
+ var id = ElementCache(object);
+
+ if (id)
+ {
+ Firebug.HTML.selectTreeNode(id);
+ }
+ }
+});
+
+Firebug.registerPanel(HTMLPanel);
+
+// ************************************************************************************************
+
+var formatStyles = function(styles)
+{
+ return isIE ?
+ // IE return CSS property names in upper case, so we need to convert them
+ styles.replace(/([^\s]+)\s*:/g, function(m,g){return g.toLowerCase()+":";}) :
+ // other browsers are just fine
+ styles;
+};
+
+// ************************************************************************************************
+
+var selectedElement = null;
+var fbPanel1 = null;
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+var selectedSidePanelTS, selectedSidePanelTimer;
+
+var selectElement= function selectElement(e)
+{
+ if (e != selectedElement)
+ {
+ if (selectedElement)
+ selectedElement.className = "objectBox-element";
+
+ e.className = e.className + " selectedElement";
+
+ if (FBL.isFirefox)
+ e.style.MozBorderRadius = "2px";
+
+ else if (FBL.isSafari)
+ e.style.WebkitBorderRadius = "2px";
+
+ e.style.borderRadius = "2px";
+
+ selectedElement = e;
+
+ Firebug.context.persistedState.selectedHTMLElementId = e.id;
+
+ var target = ElementCache.get(e.id);
+ var sidePanelBar = Firebug.chrome.getPanel("HTML").sidePanelBar;
+ var selectedSidePanel = sidePanelBar ? sidePanelBar.selectedPanel : null;
+
+ var stack = FirebugChrome.htmlSelectionStack;
+
+ stack.unshift(target);
+
+ if (stack.length > 2)
+ stack.pop();
+
+ var lazySelect = function()
+ {
+ selectedSidePanelTS = new Date().getTime();
+
+ if (selectedSidePanel)
+ selectedSidePanel.select(target, true);
+ };
+
+ if (selectedSidePanelTimer)
+ {
+ clearTimeout(selectedSidePanelTimer);
+ selectedSidePanelTimer = null;
+ }
+
+ if (new Date().getTime() - selectedSidePanelTS > 100)
+ setTimeout(lazySelect, 0);
+ else
+ selectedSidePanelTimer = setTimeout(lazySelect, 150);
+ }
+};
+
+
+// ************************************************************************************************
+// *** TODO: REFACTOR **************************************************************************
+// ************************************************************************************************
+Firebug.HTML.onTreeClick = function (e)
+{
+ e = e || event;
+ var targ;
+
+ if (e.target) targ = e.target;
+ else if (e.srcElement) targ = e.srcElement;
+ if (targ.nodeType == 3) // defeat Safari bug
+ targ = targ.parentNode;
+
+
+ if (targ.className.indexOf('nodeControl') != -1 || targ.className == 'nodeTag')
+ {
+ // FIXME xxxpedro remove this
+ //var isIE = false;
+
+ if(targ.className == 'nodeTag')
+ {
+ var control = isIE ? (targ.parentNode.previousSibling || targ) :
+ (targ.parentNode.previousSibling || targ);
+
+ selectElement(targ.parentNode.parentNode);
+
+ if (control.className.indexOf('nodeControl') == -1)
+ return;
+
+ } else
+ control = targ;
+
+ FBL.cancelEvent(e);
+
+ var treeNode = isIE ? control.nextSibling : control.parentNode;
+
+ //FBL.Firebug.Console.log(treeNode);
+
+ if (control.className.indexOf(' nodeMaximized') != -1) {
+ FBL.Firebug.HTML.removeTreeChildren(treeNode);
+ } else {
+ FBL.Firebug.HTML.appendTreeChildren(treeNode);
+ }
+ }
+ else if (targ.className == 'nodeValue' || targ.className == 'nodeName')
+ {
+ /*
+ var input = FBL.Firebug.chrome.document.getElementById('treeInput');
+
+ input.style.display = "block";
+ input.style.left = targ.offsetLeft + 'px';
+ input.style.top = FBL.topHeight + targ.offsetTop - FBL.fbPanel1.scrollTop + 'px';
+ input.style.width = targ.offsetWidth + 6 + 'px';
+ input.value = targ.textContent || targ.innerText;
+ input.focus();
+ /**/
+ }
+};
+
+function onListMouseOut(e)
+{
+ e = e || event || window;
+ var targ;
+
+ if (e.target) targ = e.target;
+ else if (e.srcElement) targ = e.srcElement;
+ if (targ.nodeType == 3) // defeat Safari bug
+ targ = targ.parentNode;
+
+ if (hasClass(targ, "fbPanel")) {
+ FBL.Firebug.Inspector.hideBoxModel();
+ hoverElement = null;
+ }
+};
+
+var hoverElement = null;
+var hoverElementTS = 0;
+
+Firebug.HTML.onListMouseMove = function onListMouseMove(e)
+{
+ try
+ {
+ e = e || event || window;
+ var targ;
+
+ if (e.target) targ = e.target;
+ else if (e.srcElement) targ = e.srcElement;
+ if (targ.nodeType == 3) // defeat Safari bug
+ targ = targ.parentNode;
+
+ var found = false;
+ while (targ && !found) {
+ if (!/\snodeBox\s|\sobjectBox-selector\s/.test(" " + targ.className + " "))
+ targ = targ.parentNode;
+ else
+ found = true;
+ }
+
+ if (!targ)
+ {
+ FBL.Firebug.Inspector.hideBoxModel();
+ hoverElement = null;
+ return;
+ }
+
+ /*
+ if (typeof targ.attributes[cacheID] == 'undefined') return;
+
+ var uid = targ.attributes[cacheID];
+ if (!uid) return;
+ /**/
+
+ if (typeof targ.attributes[cacheID] == 'undefined') return;
+
+ var uid = targ.attributes[cacheID];
+ if (!uid) return;
+
+ var el = ElementCache.get(uid.value);
+
+ var nodeName = el.nodeName.toLowerCase();
+
+ if (FBL.isIE && " meta title script link ".indexOf(" "+nodeName+" ") != -1)
+ return;
+
+ if (!/\snodeBox\s|\sobjectBox-selector\s/.test(" " + targ.className + " ")) return;
+
+ if (el.id == "FirebugUI" || " html head body br script link iframe ".indexOf(" "+nodeName+" ") != -1) {
+ FBL.Firebug.Inspector.hideBoxModel();
+ hoverElement = null;
+ return;
+ }
+
+ if ((new Date().getTime() - hoverElementTS > 40) && hoverElement != el) {
+ hoverElementTS = new Date().getTime();
+ hoverElement = el;
+ FBL.Firebug.Inspector.drawBoxModel(el);
+ }
+ }
+ catch(E)
+ {
+ }
+};
+
+
+// ************************************************************************************************
+
+Firebug.Reps = {
+
+ appendText: function(object, html)
+ {
+ html.push(escapeHTML(objectToString(object)));
+ },
+
+ appendNull: function(object, html)
+ {
+ html.push('<span class="objectBox-null">', escapeHTML(objectToString(object)), '</span>');
+ },
+
+ appendString: function(object, html)
+ {
+ html.push('<span class="objectBox-string">"', escapeHTML(objectToString(object)),
+ '"</span>');
+ },
+
+ appendInteger: function(object, html)
+ {
+ html.push('<span class="objectBox-number">', escapeHTML(objectToString(object)), '</span>');
+ },
+
+ appendFloat: function(object, html)
+ {
+ html.push('<span class="objectBox-number">', escapeHTML(objectToString(object)), '</span>');
+ },
+
+ appendFunction: function(object, html)
+ {
+ var reName = /function ?(.*?)\(/;
+ var m = reName.exec(objectToString(object));
+ var name = m && m[1] ? m[1] : "function";
+ html.push('<span class="objectBox-function">', escapeHTML(name), '()</span>');
+ },
+
+ appendObject: function(object, html)
+ {
+ /*
+ var rep = Firebug.getRep(object);
+ var outputs = [];
+
+ rep.tag.tag.compile();
+
+ var str = rep.tag.renderHTML({object: object}, outputs);
+ html.push(str);
+ /**/
+
+ try
+ {
+ if (object == undefined)
+ this.appendNull("undefined", html);
+ else if (object == null)
+ this.appendNull("null", html);
+ else if (typeof object == "string")
+ this.appendString(object, html);
+ else if (typeof object == "number")
+ this.appendInteger(object, html);
+ else if (typeof object == "boolean")
+ this.appendInteger(object, html);
+ else if (typeof object == "function")
+ this.appendFunction(object, html);
+ else if (object.nodeType == 1)
+ this.appendSelector(object, html);
+ else if (typeof object == "object")
+ {
+ if (typeof object.length != "undefined")
+ this.appendArray(object, html);
+ else
+ this.appendObjectFormatted(object, html);
+ }
+ else
+ this.appendText(object, html);
+ }
+ catch (exc)
+ {
+ }
+ /**/
+ },
+
+ appendObjectFormatted: function(object, html)
+ {
+ var text = objectToString(object);
+ var reObject = /\[object (.*?)\]/;
+
+ var m = reObject.exec(text);
+ html.push('<span class="objectBox-object">', m ? m[1] : text, '</span>');
+ },
+
+ appendSelector: function(object, html)
+ {
+ var uid = ElementCache(object);
+ var uidString = uid ? [cacheID, '="', uid, '"'].join("") : "";
+
+ html.push('<span class="objectBox-selector"', uidString, '>');
+
+ html.push('<span class="selectorTag">', escapeHTML(object.nodeName.toLowerCase()), '</span>');
+ if (object.id)
+ html.push('<span class="selectorId">#', escapeHTML(object.id), '</span>');
+ if (object.className)
+ html.push('<span class="selectorClass">.', escapeHTML(object.className), '</span>');
+
+ html.push('</span>');
+ },
+
+ appendNode: function(node, html)
+ {
+ if (node.nodeType == 1)
+ {
+ var uid = ElementCache(node);
+ var uidString = uid ? [cacheID, '="', uid, '"'].join("") : "";
+
+ html.push(
+ '<div class="objectBox-element"', uidString, '">',
+ '<span ', cacheID, '="', uid, '" class="nodeBox">',
+ '<<span class="nodeTag">', node.nodeName.toLowerCase(), '</span>');
+
+ for (var i = 0; i < node.attributes.length; ++i)
+ {
+ var attr = node.attributes[i];
+ if (!attr.specified || attr.nodeName == cacheID)
+ continue;
+
+ var name = attr.nodeName.toLowerCase();
+ var value = name == "style" ? node.style.cssText : attr.nodeValue;
+
+ html.push(' <span class="nodeName">', name,
+ '</span>="<span class="nodeValue">', escapeHTML(value),
+ '</span>"');
+ }
+
+ if (node.firstChild)
+ {
+ html.push('></div><div class="nodeChildren">');
+
+ for (var child = node.firstChild; child; child = child.nextSibling)
+ this.appendNode(child, html);
+
+ html.push('</div><div class="objectBox-element"></<span class="nodeTag">',
+ node.nodeName.toLowerCase(), '></span></span></div>');
+ }
+ else
+ html.push('/></span></div>');
+ }
+ else if (node.nodeType == 3)
+ {
+ var value = trim(node.nodeValue);
+ if (value)
+ html.push('<div class="nodeText">', escapeHTML(value),'</div>');
+ }
+ },
+
+ appendArray: function(object, html)
+ {
+ html.push('<span class="objectBox-array"><b>[</b> ');
+
+ for (var i = 0, l = object.length, obj; i < l; ++i)
+ {
+ this.appendObject(object[i], html);
+
+ if (i < l-1)
+ html.push(', ');
+ }
+
+ html.push(' <b>]</b></span>');
+ }
+
+};
+
+
+
+// ************************************************************************************************
+}});
+
+/* See license.txt for terms of usage */
+
+/*
+
+Hack:
+Firebug.chrome.currentPanel = Firebug.chrome.selectedPanel;
+Firebug.showInfoTips = true;
+Firebug.InfoTip.initializeBrowser(Firebug.chrome);
+
+/**/
+
+FBL.ns(function() { with (FBL) {
+
+// ************************************************************************************************
+// Constants
+
+var maxWidth = 100, maxHeight = 80;
+var infoTipMargin = 10;
+var infoTipWindowPadding = 25;
+
+// ************************************************************************************************
+
+Firebug.InfoTip = extend(Firebug.Module,
+{
+ dispatchName: "infoTip",
+ tags: domplate(
+ {
+ infoTipTag: DIV({"class": "infoTip"}),
+
+ colorTag:
+ DIV({style: "background: $rgbValue; width: 100px; height: 40px"}, " "),
+
+ imgTag:
+ DIV({"class": "infoTipImageBox infoTipLoading"},
+ IMG({"class": "infoTipImage", src: "$urlValue", repeat: "$repeat",
+ onload: "$onLoadImage"}),
+ IMG({"class": "infoTipBgImage", collapsed: true, src: "blank.gif"}),
+ DIV({"class": "infoTipCaption"})
+ ),
+
+ onLoadImage: function(event)
+ {
+ var img = event.currentTarget || event.srcElement;
+ ///var bgImg = img.nextSibling;
+ ///if (!bgImg)
+ /// return; // Sometimes gets called after element is dead
+
+ ///var caption = bgImg.nextSibling;
+ var innerBox = img.parentNode;
+
+ /// TODO: xxxpedro infoTip hack
+ var caption = getElementByClass(innerBox, "infoTipCaption");
+ var bgImg = getElementByClass(innerBox, "infoTipBgImage");
+ if (!bgImg)
+ return; // Sometimes gets called after element is dead
+
+ // TODO: xxxpedro infoTip IE and timing issue
+ // TODO: use offline document to avoid flickering
+ if (isIE)
+ removeClass(innerBox, "infoTipLoading");
+
+ var updateInfoTip = function(){
+
+ var w = img.naturalWidth || img.width || 10,
+ h = img.naturalHeight || img.height || 10;
+
+ var repeat = img.getAttribute("repeat");
+
+ if (repeat == "repeat-x" || (w == 1 && h > 1))
+ {
+ collapse(img, true);
+ collapse(bgImg, false);
+ bgImg.style.background = "url(" + img.src + ") repeat-x";
+ bgImg.style.width = maxWidth + "px";
+ if (h > maxHeight)
+ bgImg.style.height = maxHeight + "px";
+ else
+ bgImg.style.height = h + "px";
+ }
+ else if (repeat == "repeat-y" || (h == 1 && w > 1))
+ {
+ collapse(img, true);
+ collapse(bgImg, false);
+ bgImg.style.background = "url(" + img.src + ") repeat-y";
+ bgImg.style.height = maxHeight + "px";
+ if (w > maxWidth)
+ bgImg.style.width = maxWidth + "px";
+ else
+ bgImg.style.width = w + "px";
+ }
+ else if (repeat == "repeat" || (w == 1 && h == 1))
+ {
+ collapse(img, true);
+ collapse(bgImg, false);
+ bgImg.style.background = "url(" + img.src + ") repeat";
+ bgImg.style.width = maxWidth + "px";
+ bgImg.style.height = maxHeight + "px";
+ }
+ else
+ {
+ if (w > maxWidth || h > maxHeight)
+ {
+ if (w > h)
+ {
+ img.style.width = maxWidth + "px";
+ img.style.height = Math.round((h / w) * maxWidth) + "px";
+ }
+ else
+ {
+ img.style.width = Math.round((w / h) * maxHeight) + "px";
+ img.style.height = maxHeight + "px";
+ }
+ }
+ }
+
+ //caption.innerHTML = $STRF("Dimensions", [w, h]);
+ caption.innerHTML = $STRF(w + " x " + h);
+
+
+ };
+
+ if (isIE)
+ setTimeout(updateInfoTip, 0);
+ else
+ {
+ updateInfoTip();
+ removeClass(innerBox, "infoTipLoading");
+ }
+
+ ///
+ }
+
+ /*
+ /// onLoadImage original
+ onLoadImage: function(event)
+ {
+ var img = event.currentTarget;
+ var bgImg = img.nextSibling;
+ if (!bgImg)
+ return; // Sometimes gets called after element is dead
+
+ var caption = bgImg.nextSibling;
+ var innerBox = img.parentNode;
+
+ var w = img.naturalWidth, h = img.naturalHeight;
+ var repeat = img.getAttribute("repeat");
+
+ if (repeat == "repeat-x" || (w == 1 && h > 1))
+ {
+ collapse(img, true);
+ collapse(bgImg, false);
+ bgImg.style.background = "url(" + img.src + ") repeat-x";
+ bgImg.style.width = maxWidth + "px";
+ if (h > maxHeight)
+ bgImg.style.height = maxHeight + "px";
+ else
+ bgImg.style.height = h + "px";
+ }
+ else if (repeat == "repeat-y" || (h == 1 && w > 1))
+ {
+ collapse(img, true);
+ collapse(bgImg, false);
+ bgImg.style.background = "url(" + img.src + ") repeat-y";
+ bgImg.style.height = maxHeight + "px";
+ if (w > maxWidth)
+ bgImg.style.width = maxWidth + "px";
+ else
+ bgImg.style.width = w + "px";
+ }
+ else if (repeat == "repeat" || (w == 1 && h == 1))
+ {
+ collapse(img, true);
+ collapse(bgImg, false);
+ bgImg.style.background = "url(" + img.src + ") repeat";
+ bgImg.style.width = maxWidth + "px";
+ bgImg.style.height = maxHeight + "px";
+ }
+ else
+ {
+ if (w > maxWidth || h > maxHeight)
+ {
+ if (w > h)
+ {
+ img.style.width = maxWidth + "px";
+ img.style.height = Math.round((h / w) * maxWidth) + "px";
+ }
+ else
+ {
+ img.style.width = Math.round((w / h) * maxHeight) + "px";
+ img.style.height = maxHeight + "px";
+ }
+ }
+ }
+
+ caption.innerHTML = $STRF("Dimensions", [w, h]);
+
+ removeClass(innerBox, "infoTipLoading");
+ }
+ /**/
+
+ }),
+
+ initializeBrowser: function(browser)
+ {
+ browser.onInfoTipMouseOut = bind(this.onMouseOut, this, browser);
+ browser.onInfoTipMouseMove = bind(this.onMouseMove, this, browser);
+
+ ///var doc = browser.contentDocument;
+ var doc = browser.document;
+ if (!doc)
+ return;
+
+ ///doc.addEventListener("mouseover", browser.onInfoTipMouseMove, true);
+ ///doc.addEventListener("mouseout", browser.onInfoTipMouseOut, true);
+ ///doc.addEventListener("mousemove", browser.onInfoTipMouseMove, true);
+ addEvent(doc, "mouseover", browser.onInfoTipMouseMove);
+ addEvent(doc, "mouseout", browser.onInfoTipMouseOut);
+ addEvent(doc, "mousemove", browser.onInfoTipMouseMove);
+
+ return browser.infoTip = this.tags.infoTipTag.append({}, getBody(doc));
+ },
+
+ uninitializeBrowser: function(browser)
+ {
+ if (browser.infoTip)
+ {
+ ///var doc = browser.contentDocument;
+ var doc = browser.document;
+ ///doc.removeEventListener("mouseover", browser.onInfoTipMouseMove, true);
+ ///doc.removeEventListener("mouseout", browser.onInfoTipMouseOut, true);
+ ///doc.removeEventListener("mousemove", browser.onInfoTipMouseMove, true);
+ removeEvent(doc, "mouseover", browser.onInfoTipMouseMove);
+ removeEvent(doc, "mouseout", browser.onInfoTipMouseOut);
+ removeEvent(doc, "mousemove", browser.onInfoTipMouseMove);
+
+ browser.infoTip.parentNode.removeChild(browser.infoTip);
+ delete browser.infoTip;
+ delete browser.onInfoTipMouseMove;
+ }
+ },
+
+ showInfoTip: function(infoTip, panel, target, x, y, rangeParent, rangeOffset)
+ {
+ if (!Firebug.showInfoTips)
+ return;
+
+ var scrollParent = getOverflowParent(target);
+ var scrollX = x + (scrollParent ? scrollParent.scrollLeft : 0);
+
+ if (panel.showInfoTip(infoTip, target, scrollX, y, rangeParent, rangeOffset))
+ {
+ var htmlElt = infoTip.ownerDocument.documentElement;
+ var panelWidth = htmlElt.clientWidth;
+ var panelHeight = htmlElt.clientHeight;
+
+ if (x+infoTip.offsetWidth+infoTipMargin > panelWidth)
+ {
+ infoTip.style.left = Math.max(0, panelWidth-(infoTip.offsetWidth+infoTipMargin)) + "px";
+ infoTip.style.right = "auto";
+ }
+ else
+ {
+ infoTip.style.left = (x+infoTipMargin) + "px";
+ infoTip.style.right = "auto";
+ }
+
+ if (y+infoTip.offsetHeight+infoTipMargin > panelHeight)
+ {
+ infoTip.style.top = Math.max(0, panelHeight-(infoTip.offsetHeight+infoTipMargin)) + "px";
+ infoTip.style.bottom = "auto";
+ }
+ else
+ {
+ infoTip.style.top = (y+infoTipMargin) + "px";
+ infoTip.style.bottom = "auto";
+ }
+
+ if (FBTrace.DBG_INFOTIP)
+ FBTrace.sysout("infotip.showInfoTip; top: " + infoTip.style.top +
+ ", left: " + infoTip.style.left + ", bottom: " + infoTip.style.bottom +
+ ", right:" + infoTip.style.right + ", offsetHeight: " + infoTip.offsetHeight +
+ ", offsetWidth: " + infoTip.offsetWidth +
+ ", x: " + x + ", panelWidth: " + panelWidth +
+ ", y: " + y + ", panelHeight: " + panelHeight);
+
+ infoTip.setAttribute("active", "true");
+ }
+ else
+ this.hideInfoTip(infoTip);
+ },
+
+ hideInfoTip: function(infoTip)
+ {
+ if (infoTip)
+ infoTip.removeAttribute("active");
+ },
+
+ onMouseOut: function(event, browser)
+ {
+ if (!event.relatedTarget)
+ this.hideInfoTip(browser.infoTip);
+ },
+
+ onMouseMove: function(event, browser)
+ {
+ // Ignore if the mouse is moving over the existing info tip.
+ if (getAncestorByClass(event.target, "infoTip"))
+ return;
+
+ if (browser.currentPanel)
+ {
+ var x = event.clientX, y = event.clientY, target = event.target || event.srcElement;
+ this.showInfoTip(browser.infoTip, browser.currentPanel, target, x, y, event.rangeParent, event.rangeOffset);
+ }
+ else
+ this.hideInfoTip(browser.infoTip);
+ },
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+ populateColorInfoTip: function(infoTip, color)
+ {
+ this.tags.colorTag.replace({rgbValue: color}, infoTip);
+ return true;
+ },
+
+ populateImageInfoTip: function(infoTip, url, repeat)
+ {
+ if (!repeat)
+ repeat = "no-repeat";
+
+ this.tags.imgTag.replace({urlValue: url, repeat: repeat}, infoTip);
+
+ return true;
+ },
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ // extends Module
+
+ disable: function()
+ {
+ // XXXjoe For each browser, call uninitializeBrowser
+ },
+
+ showPanel: function(browser, panel)
+ {
+ if (panel)
+ {
+ var infoTip = panel.panelBrowser.infoTip;
+ if (!infoTip)
+ infoTip = this.initializeBrowser(panel.panelBrowser);
+ this.hideInfoTip(infoTip);
+ }
+
+ },
+
+ showSidePanel: function(browser, panel)
+ {
+ this.showPanel(browser, panel);
+ }
+});
+
+// ************************************************************************************************
+
+Firebug.registerModule(Firebug.InfoTip);
+
+// ************************************************************************************************
+
+}});
+
+
+/* See license.txt for terms of usage */
+
+FBL.ns(function() { with (FBL) {
+// ************************************************************************************************
+
+var CssParser = null;
+
+// ************************************************************************************************
+
+// Simple CSS stylesheet parser from:
+// https://github.com/sergeche/webkit-css
+
+/**
+ * Simple CSS stylesheet parser that remembers rule's lines in file
+ * @author Sergey Chikuyonok (serge.che@gmail.com)
+ * @link http://chikuyonok.ru
+ */
+CssParser = (function(){
+ /**
+ * Returns rule object
+ * @param {Number} start Character index where CSS rule definition starts
+ * @param {Number} body_start Character index where CSS rule's body starts
+ * @param {Number} end Character index where CSS rule definition ends
+ */
+ function rule(start, body_start, end) {
+ return {
+ start: start || 0,
+ body_start: body_start || 0,
+ end: end || 0,
+ line: -1,
+ selector: null,
+ parent: null,
+
+ /** @type {rule[]} */
+ children: [],
+
+ addChild: function(start, body_start, end) {
+ var r = rule(start, body_start, end);
+ r.parent = this;
+ this.children.push(r);
+ return r;
+ },
+ /**
+ * Returns last child element
+ * @return {rule}
+ */
+ lastChild: function() {
+ return this.children[this.children.length - 1];
+ }
+ };
+ }
+
+ /**
+ * Replaces all occurances of substring defined by regexp
+ * @param {String} str
+ * @return {RegExp} re
+ * @return {String}
+ */
+ function removeAll(str, re) {
+ var m;
+ while (m = str.match(re)) {
+ str = str.substring(m[0].length);
+ }
+
+ return str;
+ }
+
+ /**
+ * Trims whitespace from the beginning and the end of string
+ * @param {String} str
+ * @return {String}
+ */
+ function trim(str) {
+ return str.replace(/^\s+|\s+$/g, '');
+ }
+
+ /**
+ * Normalizes CSS rules selector
+ * @param {String} selector
+ */
+ function normalizeSelector(selector) {
+ // remove newlines
+ selector = selector.replace(/[\n\r]/g, ' ');
+
+ selector = trim(selector);
+
+ // remove spaces after commas
+ selector = selector.replace(/\s*,\s*/g, ',');
+
+ return selector;
+ }
+
+ /**
+ * Preprocesses parsed rules: adjusts char indexes, skipping whitespace and
+ * newlines, saves rule selector, removes comments, etc.
+ * @param {String} text CSS stylesheet
+ * @param {rule} rule_node CSS rule node
+ * @return {rule[]}
+ */
+ function preprocessRules(text, rule_node) {
+ for (var i = 0, il = rule_node.children.length; i < il; i++) {
+ var r = rule_node.children[i],
+ rule_start = text.substring(r.start, r.body_start),
+ cur_len = rule_start.length;
+
+ // remove newlines for better regexp matching
+ rule_start = rule_start.replace(/[\n\r]/g, ' ');
+
+ // remove @import rules
+// rule_start = removeAll(rule_start, /^\s*@import\s*url\((['"])?.+?\1?\)\;?/g);
+
+ // remove comments
+ rule_start = removeAll(rule_start, /^\s*\/\*.*?\*\/[\s\t]*/);
+
+ // remove whitespace
+ rule_start = rule_start.replace(/^[\s\t]+/, '');
+
+ r.start += (cur_len - rule_start.length);
+ r.selector = normalizeSelector(rule_start);
+ }
+
+ return rule_node;
+ }
+
+ /**
+ * Saves all lise starting indexes for faster search
+ * @param {String} text CSS stylesheet
+ * @return {Number[]}
+ */
+ function saveLineIndexes(text) {
+ var result = [0],
+ i = 0,
+ il = text.length,
+ ch, ch2;
+
+ while (i < il) {
+ ch = text.charAt(i);
+
+ if (ch == '\n' || ch == '\r') {
+ if (ch == '\r' && i < il - 1 && text.charAt(i + 1) == '\n') {
+ // windows line ending: CRLF. Skip next character
+ i++;
+ }
+
+ result.push(i + 1);
+ }
+
+ i++;
+ }
+
+ return result;
+ }
+
+ /**
+ * Saves line number for parsed rules
+ * @param {String} text CSS stylesheet
+ * @param {rule} rule_node Rule node
+ * @return {rule[]}
+ */
+ function saveLineNumbers(text, rule_node, line_indexes, startLine) {
+ preprocessRules(text, rule_node);
+
+ startLine = startLine || 0;
+
+ // remember lines start indexes, preserving line ending characters
+ if (!line_indexes)
+ var line_indexes = saveLineIndexes(text);
+
+ // now find each rule's line
+ for (var i = 0, il = rule_node.children.length; i < il; i++) {
+ var r = rule_node.children[i];
+ r.line = line_indexes.length + startLine;
+ for (var j = 0, jl = line_indexes.length - 1; j < jl; j++) {
+ var line_ix = line_indexes[j];
+ if (r.start >= line_indexes[j] && r.start < line_indexes[j + 1]) {
+ r.line = j + 1 + startLine;
+ break;
+ }
+ }
+
+ saveLineNumbers(text, r, line_indexes);
+ }
+
+ return rule_node;
+ }
+
+ return {
+ /**
+ * Parses text as CSS stylesheet, remembring each rule position inside
+ * text
+ * @param {String} text CSS stylesheet to parse
+ */
+ read: function(text, startLine) {
+ var rule_start = [],
+ rule_body_start = [],
+ rules = [],
+ in_comment = 0,
+ root = rule(),
+ cur_parent = root,
+ last_rule = null,
+ stack = [],
+ ch, ch2;
+
+ stack.last = function() {
+ return this[this.length - 1];
+ };
+
+ function hasStr(pos, substr) {
+ return text.substr(pos, substr.length) == substr;
+ }
+
+ for (var i = 0, il = text.length; i < il; i++) {
+ ch = text.charAt(i);
+ ch2 = i < il - 1 ? text.charAt(i + 1) : '';
+
+ if (!rule_start.length)
+ rule_start.push(i);
+
+ switch (ch) {
+ case '@':
+ if (!in_comment) {
+ if (hasStr(i, '@import')) {
+ var m = text.substr(i).match(/^@import\s*url\((['"])?.+?\1?\)\;?/);
+ if (m) {
+ cur_parent.addChild(i, i + 7, i + m[0].length);
+ i += m[0].length;
+ rule_start.pop();
+ }
+ break;
+ }
+ }
+ case '/':
+ // xxxpedro allowing comment inside comment
+ if (!in_comment && ch2 == '*') { // comment start
+ in_comment++;
+ }
+ break;
+
+ case '*':
+ if (ch2 == '/') { // comment end
+ in_comment--;
+ }
+ break;
+
+ case '{':
+ if (!in_comment) {
+ rule_body_start.push(i);
+
+ cur_parent = cur_parent.addChild(rule_start.pop());
+ stack.push(cur_parent);
+ }
+ break;
+
+ case '}':
+ // found the end of the rule
+ if (!in_comment) {
+ /** @type {rule} */
+ var last_rule = stack.pop();
+ rule_start.pop();
+ last_rule.body_start = rule_body_start.pop();
+ last_rule.end = i;
+ cur_parent = last_rule.parent || root;
+ }
+ break;
+ }
+
+ }
+
+ return saveLineNumbers(text, root, null, startLine);
+ },
+
+ normalizeSelector: normalizeSelector,
+
+ /**
+ * Find matched rule by selector.
+ * @param {rule} rule_node Parsed rule node
+ * @param {String} selector CSS selector
+ * @param {String} source CSS stylesheet source code
+ *
+ * @return {rule[]|null} Array of matched rules, sorted by priority (most
+ * recent on top)
+ */
+ findBySelector: function(rule_node, selector, source) {
+ var selector = normalizeSelector(selector),
+ result = [];
+
+ if (rule_node) {
+ for (var i = 0, il = rule_node.children.length; i < il; i++) {
+ /** @type {rule} */
+ var r = rule_node.children[i];
+ if (r.selector == selector) {
+ result.push(r);
+ }
+ }
+ }
+
+ if (result.length) {
+ return result;
+ } else {
+ return null;
+ }
+ }
+ };
+})();
+
+
+// ************************************************************************************************
+
+FBL.CssParser = CssParser;
+
+// ************************************************************************************************
+}});
+
+/* See license.txt for terms of usage */
+
+FBL.ns(function() { with (FBL) {
+
+// ************************************************************************************************
+// StyleSheet Parser
+
+var CssAnalyzer = {};
+
+// ************************************************************************************************
+// Locals
+
+var CSSRuleMap = {};
+var ElementCSSRulesMap = {};
+
+var internalStyleSheetIndex = -1;
+
+var reSelectorTag = /(^|\s)(?:\w+)/g;
+var reSelectorClass = /\.[\w\d_-]+/g;
+var reSelectorId = /#[\w\d_-]+/g;
+
+var globalCSSRuleIndex;
+
+var processAllStyleSheetsTimeout = null;
+
+var externalStyleSheetURLs = [];
+
+var ElementCache = Firebug.Lite.Cache.Element;
+var StyleSheetCache = Firebug.Lite.Cache.StyleSheet;
+
+//************************************************************************************************
+// CSS Analyzer templates
+
+CssAnalyzer.externalStyleSheetWarning = domplate(Firebug.Rep,
+{
+ tag:
+ DIV({"class": "warning focusRow", style: "font-weight:normal;", role: 'listitem'},
+ SPAN("$object|STR"),
+ A({"href": "$href", target:"_blank"}, "$link|STR")
+ )
+});
+
+// ************************************************************************************************
+// CSS Analyzer methods
+
+CssAnalyzer.processAllStyleSheets = function(doc, styleSheetIterator)
+{
+ try
+ {
+ processAllStyleSheets(doc, styleSheetIterator);
+ }
+ catch(e)
+ {
+ // TODO: FBTrace condition
+ FBTrace.sysout("CssAnalyzer.processAllStyleSheets fails: ", e);
+ }
+};
+
+/**
+ *
+ * @param element
+ * @returns {String[]} Array of IDs of CSS Rules
+ */
+CssAnalyzer.getElementCSSRules = function(element)
+{
+ try
+ {
+ return getElementCSSRules(element);
+ }
+ catch(e)
+ {
+ // TODO: FBTrace condition
+ FBTrace.sysout("CssAnalyzer.getElementCSSRules fails: ", e);
+ }
+};
+
+CssAnalyzer.getRuleData = function(ruleId)
+{
+ return CSSRuleMap[ruleId];
+};
+
+// TODO: do we need this?
+CssAnalyzer.getRuleLine = function()
+{
+};
+
+CssAnalyzer.hasExternalStyleSheet = function()
+{
+ return externalStyleSheetURLs.length > 0;
+};
+
+CssAnalyzer.parseStyleSheet = function(href)
+{
+ var sourceData = extractSourceData(href);
+ var parsedObj = CssParser.read(sourceData.source, sourceData.startLine);
+ var parsedRules = parsedObj.children;
+
+ // See: Issue 4776: [Firebug lite] CSS Media Types
+ //
+ // Ignore all special selectors like @media and @page
+ for(var i=0; i < parsedRules.length; )
+ {
+ if (parsedRules[i].selector.indexOf("@") != -1)
+ {
+ parsedRules.splice(i, 1);
+ }
+ else
+ i++;
+ }
+
+ return parsedRules;
+};
+
+//************************************************************************************************
+// Internals
+//************************************************************************************************
+
+// ************************************************************************************************
+// StyleSheet processing
+
+var processAllStyleSheets = function(doc, styleSheetIterator)
+{
+ styleSheetIterator = styleSheetIterator || processStyleSheet;
+
+ globalCSSRuleIndex = -1;
+
+ var styleSheets = doc.styleSheets;
+ var importedStyleSheets = [];
+
+ if (FBTrace.DBG_CSS)
+ var start = new Date().getTime();
+
+ for(var i=0, length=styleSheets.length; i<length; i++)
+ {
+ try
+ {
+ var styleSheet = styleSheets[i];
+
+ if ("firebugIgnore" in styleSheet) continue;
+
+ // we must read the length to make sure we have permission to read
+ // the stylesheet's content. If an error occurs here, we cannot
+ // read the stylesheet due to access restriction policy
+ var rules = isIE ? styleSheet.rules : styleSheet.cssRules;
+ rules.length;
+ }
+ catch(e)
+ {
+ externalStyleSheetURLs.push(styleSheet.href);
+ styleSheet.restricted = true;
+ var ssid = StyleSheetCache(styleSheet);
+
+ /// TODO: xxxpedro external css
+ //loadExternalStylesheet(doc, styleSheetIterator, styleSheet);
+ }
+
+ // process internal and external styleSheets
+ styleSheetIterator(doc, styleSheet);
+
+ var importedStyleSheet, importedRules;
+
+ // process imported styleSheets in IE
+ if (isIE)
+ {
+ var imports = styleSheet.imports;
+
+ for(var j=0, importsLength=imports.length; j<importsLength; j++)
+ {
+ try
+ {
+ importedStyleSheet = imports[j];
+ // we must read the length to make sure we have permission
+ // to read the imported stylesheet's content.
+ importedRules = importedStyleSheet.rules;
+ importedRules.length;
+ }
+ catch(e)
+ {
+ externalStyleSheetURLs.push(styleSheet.href);
+ importedStyleSheet.restricted = true;
+ var ssid = StyleSheetCache(importedStyleSheet);
+ }
+
+ styleSheetIterator(doc, importedStyleSheet);
+ }
+ }
+ // process imported styleSheets in other browsers
+ else if (rules)
+ {
+ for(var j=0, rulesLength=rules.length; j<rulesLength; j++)
+ {
+ try
+ {
+ var rule = rules[j];
+
+ importedStyleSheet = rule.styleSheet;
+
+ if (importedStyleSheet)
+ {
+ // we must read the length to make sure we have permission
+ // to read the imported stylesheet's content.
+ importedRules = importedStyleSheet.cssRules;
+ importedRules.length;
+ }
+ else
+ break;
+ }
+ catch(e)
+ {
+ externalStyleSheetURLs.push(styleSheet.href);
+ importedStyleSheet.restricted = true;
+ var ssid = StyleSheetCache(importedStyleSheet);
+ }
+
+ styleSheetIterator(doc, importedStyleSheet);
+ }
+ }
+ };
+
+ if (FBTrace.DBG_CSS)
+ {
+ FBTrace.sysout("FBL.processAllStyleSheets", "all stylesheet rules processed in " + (new Date().getTime() - start) + "ms");
+ }
+};
+
+// ************************************************************************************************
+
+var processStyleSheet = function(doc, styleSheet)
+{
+ if (styleSheet.restricted)
+ return;
+
+ var rules = isIE ? styleSheet.rules : styleSheet.cssRules;
+
+ var ssid = StyleSheetCache(styleSheet);
+
+ var href = styleSheet.href;
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ // CSS Parser
+ var shouldParseCSS = typeof CssParser != "undefined" && !Firebug.disableResourceFetching;
+ if (shouldParseCSS)
+ {
+ try
+ {
+ var parsedRules = CssAnalyzer.parseStyleSheet(href);
+ }
+ catch(e)
+ {
+ if (FBTrace.DBG_ERRORS) FBTrace.sysout("processStyleSheet FAILS", e.message || e);
+ shouldParseCSS = false;
+ }
+ finally
+ {
+ var parsedRulesIndex = 0;
+
+ var dontSupportGroupedRules = isIE && browserVersion < 9;
+ var group = [];
+ var groupItem;
+ }
+ }
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+ for (var i=0, length=rules.length; i<length; i++)
+ {
+ // TODO: xxxpedro is there a better way to cache CSS Rules? The problem is that
+ // we cannot add expando properties in the rule object in IE
+ var rid = ssid + ":" + i;
+ var rule = rules[i];
+ var selector = rule.selectorText || "";
+ var lineNo = null;
+
+ // See: Issue 4776: [Firebug lite] CSS Media Types
+ //
+ // Ignore all special selectors like @media and @page
+ if (!selector || selector.indexOf("@") != -1)
+ continue;
+
+ if (isIE)
+ selector = selector.replace(reSelectorTag, function(s){return s.toLowerCase();});
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ // CSS Parser
+ if (shouldParseCSS)
+ {
+ var parsedRule = parsedRules[parsedRulesIndex];
+ var parsedSelector = parsedRule.selector;
+
+ if (dontSupportGroupedRules && parsedSelector.indexOf(",") != -1 && group.length == 0)
+ group = parsedSelector.split(",");
+
+ if (dontSupportGroupedRules && group.length > 0)
+ {
+ groupItem = group.shift();
+
+ if (CssParser.normalizeSelector(selector) == groupItem)
+ lineNo = parsedRule.line;
+
+ if (group.length == 0)
+ parsedRulesIndex++;
+ }
+ else if (CssParser.normalizeSelector(selector) == parsedRule.selector)
+ {
+ lineNo = parsedRule.line;
+ parsedRulesIndex++;
+ }
+ }
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+ CSSRuleMap[rid] =
+ {
+ styleSheetId: ssid,
+ styleSheetIndex: i,
+ order: ++globalCSSRuleIndex,
+ specificity:
+ // See: Issue 4777: [Firebug lite] Specificity of CSS Rules
+ //
+ // if it is a normal selector then calculate the specificity
+ selector && selector.indexOf(",") == -1 ?
+ getCSSRuleSpecificity(selector) :
+ // See: Issue 3262: [Firebug lite] Specificity of grouped CSS Rules
+ //
+ // if it is a grouped selector, do not calculate the specificity
+ // because the correct value will depend of the matched element.
+ // The proper specificity value for grouped selectors are calculated
+ // via getElementCSSRules(element)
+ 0,
+
+ rule: rule,
+ lineNo: lineNo,
+ selector: selector,
+ cssText: rule.style ? rule.style.cssText : rule.cssText ? rule.cssText : ""
+ };
+
+ // TODO: what happens with elements added after this? Need to create a test case.
+ // Maybe we should place this at getElementCSSRules() but it will make the function
+ // a lot more expensive.
+ //
+ // Maybe add a "refresh" button?
+ var elements = Firebug.Selector(selector, doc);
+
+ for (var j=0, elementsLength=elements.length; j<elementsLength; j++)
+ {
+ var element = elements[j];
+ var eid = ElementCache(element);
+
+ if (!ElementCSSRulesMap[eid])
+ ElementCSSRulesMap[eid] = [];
+
+ ElementCSSRulesMap[eid].push(rid);
+ }
+
+ //console.log(selector, elements);
+ }
+};
+
+// ************************************************************************************************
+// External StyleSheet Loader
+
+var loadExternalStylesheet = function(doc, styleSheetIterator, styleSheet)
+{
+ var url = styleSheet.href;
+ styleSheet.firebugIgnore = true;
+
+ var source = Firebug.Lite.Proxy.load(url);
+
+ // TODO: check for null and error responses
+
+ // remove comments
+ //var reMultiComment = /(\/\*([^\*]|\*(?!\/))*\*\/)/g;
+ //source = source.replace(reMultiComment, "");
+
+ // convert relative addresses to absolute ones
+ source = source.replace(/url\(([^\)]+)\)/g, function(a,name){
+
+ var hasDomain = /\w+:\/\/./.test(name);
+
+ if (!hasDomain)
+ {
+ name = name.replace(/^(["'])(.+)\1$/, "$2");
+ var first = name.charAt(0);
+
+ // relative path, based on root
+ if (first == "/")
+ {
+ // TODO: xxxpedro move to lib or Firebug.Lite.something
+ // getURLRoot
+ var m = /^([^:]+:\/{1,3}[^\/]+)/.exec(url);
+
+ return m ?
+ "url(" + m[1] + name + ")" :
+ "url(" + name + ")";
+ }
+ // relative path, based on current location
+ else
+ {
+ // TODO: xxxpedro move to lib or Firebug.Lite.something
+ // getURLPath
+ var path = url.replace(/[^\/]+\.[\w\d]+(\?.+|#.+)?$/g, "");
+
+ path = path + name;
+
+ var reBack = /[^\/]+\/\.\.\//;
+ while(reBack.test(path))
+ {
+ path = path.replace(reBack, "");
+ }
+
+ //console.log("url(" + path + ")");
+
+ return "url(" + path + ")";
+ }
+ }
+
+ // if it is an absolute path, there is nothing to do
+ return a;
+ });
+
+ var oldStyle = styleSheet.ownerNode;
+
+ if (!oldStyle) return;
+
+ if (!oldStyle.parentNode) return;
+
+ var style = createGlobalElement("style");
+ style.setAttribute("charset","utf-8");
+ style.setAttribute("type", "text/css");
+ style.innerHTML = source;
+
+ //debugger;
+ oldStyle.parentNode.insertBefore(style, oldStyle.nextSibling);
+ oldStyle.parentNode.removeChild(oldStyle);
+
+ doc.styleSheets[doc.styleSheets.length-1].externalURL = url;
+
+ console.log(url, "call " + externalStyleSheetURLs.length, source);
+
+ externalStyleSheetURLs.pop();
+
+ if (processAllStyleSheetsTimeout)
+ {
+ clearTimeout(processAllStyleSheetsTimeout);
+ }
+
+ processAllStyleSheetsTimeout = setTimeout(function(){
+ console.log("processing");
+ FBL.processAllStyleSheets(doc, styleSheetIterator);
+ processAllStyleSheetsTimeout = null;
+ },200);
+
+};
+
+//************************************************************************************************
+// getElementCSSRules
+
+var getElementCSSRules = function(element)
+{
+ var eid = ElementCache(element);
+ var rules = ElementCSSRulesMap[eid];
+
+ if (!rules) return;
+
+ var arr = [element];
+ var Selector = Firebug.Selector;
+ var ruleId, rule;
+
+ // for the case of grouped selectors, we need to calculate the highest
+ // specificity within the selectors of the group that matches the element,
+ // so we can sort the rules properly without over estimating the specificity
+ // of grouped selectors
+ for (var i = 0, length = rules.length; i < length; i++)
+ {
+ ruleId = rules[i];
+ rule = CSSRuleMap[ruleId];
+
+ // check if it is a grouped selector
+ if (rule.selector.indexOf(",") != -1)
+ {
+ var selectors = rule.selector.split(",");
+ var maxSpecificity = -1;
+ var sel, spec, mostSpecificSelector;
+
+ // loop over all selectors in the group
+ for (var j, len = selectors.length; j < len; j++)
+ {
+ sel = selectors[j];
+
+ // find if the selector matches the element
+ if (Selector.matches(sel, arr).length == 1)
+ {
+ spec = getCSSRuleSpecificity(sel);
+
+ // find the most specific selector that macthes the element
+ if (spec > maxSpecificity)
+ {
+ maxSpecificity = spec;
+ mostSpecificSelector = sel;
+ }
+ }
+ }
+
+ rule.specificity = maxSpecificity;
+ }
+ }
+
+ rules.sort(sortElementRules);
+ //rules.sort(solveRulesTied);
+
+ return rules;
+};
+
+// ************************************************************************************************
+// Rule Specificity
+
+var sortElementRules = function(a, b)
+{
+ var ruleA = CSSRuleMap[a];
+ var ruleB = CSSRuleMap[b];
+
+ var specificityA = ruleA.specificity;
+ var specificityB = ruleB.specificity;
+
+ if (specificityA > specificityB)
+ return 1;
+
+ else if (specificityA < specificityB)
+ return -1;
+
+ else
+ return ruleA.order > ruleB.order ? 1 : -1;
+};
+
+var solveRulesTied = function(a, b)
+{
+ var ruleA = CSSRuleMap[a];
+ var ruleB = CSSRuleMap[b];
+
+ if (ruleA.specificity == ruleB.specificity)
+ return ruleA.order > ruleB.order ? 1 : -1;
+
+ return null;
+};
+
+var getCSSRuleSpecificity = function(selector)
+{
+ var match = selector.match(reSelectorTag);
+ var tagCount = match ? match.length : 0;
+
+ match = selector.match(reSelectorClass);
+ var classCount = match ? match.length : 0;
+
+ match = selector.match(reSelectorId);
+ var idCount = match ? match.length : 0;
+
+ return tagCount + 10*classCount + 100*idCount;
+};
+
+// ************************************************************************************************
+// StyleSheet data
+
+var extractSourceData = function(href)
+{
+ var sourceData =
+ {
+ source: null,
+ startLine: 0
+ };
+
+ if (href)
+ {
+ sourceData.source = Firebug.Lite.Proxy.load(href);
+ }
+ else
+ {
+ // TODO: create extractInternalSourceData(index)
+ // TODO: pre process the position of the inline styles so this will happen only once
+ // in case of having multiple inline styles
+ var index = 0;
+ var ssIndex = ++internalStyleSheetIndex;
+ var reStyleTag = /\<\s*style.*\>/gi;
+ var reEndStyleTag = /\<\/\s*style.*\>/gi;
+
+ var source = Firebug.Lite.Proxy.load(Env.browser.location.href);
+ source = source.replace(/\n\r|\r\n/g, "\n"); // normalize line breaks
+
+ var startLine = 0;
+
+ do
+ {
+ var matchStyleTag = source.match(reStyleTag);
+ var i0 = source.indexOf(matchStyleTag[0]) + matchStyleTag[0].length;
+
+ for (var i=0; i < i0; i++)
+ {
+ if (source.charAt(i) == "\n")
+ startLine++;
+ }
+
+ source = source.substr(i0);
+
+ index++;
+ }
+ while (index <= ssIndex);
+
+ var matchEndStyleTag = source.match(reEndStyleTag);
+ var i1 = source.indexOf(matchEndStyleTag[0]);
+
+ var extractedSource = source.substr(0, i1);
+
+ sourceData.source = extractedSource;
+ sourceData.startLine = startLine;
+ }
+
+ return sourceData;
+};
+
+// ************************************************************************************************
+// Registration
+
+FBL.CssAnalyzer = CssAnalyzer;
+
+// ************************************************************************************************
+}});
+
+
+/* See license.txt for terms of usage */
+
+// move to FBL
+(function() {
+
+// ************************************************************************************************
+// XPath
+
+/**
+ * Gets an XPath for an element which describes its hierarchical location.
+ */
+this.getElementXPath = function(element)
+{
+ try
+ {
+ if (element && element.id)
+ return '//*[@id="' + element.id + '"]';
+ else
+ return this.getElementTreeXPath(element);
+ }
+ catch(E)
+ {
+ // xxxpedro: trying to detect the mysterious error:
+ // Security error" code: "1000
+ //debugger;
+ }
+};
+
+this.getElementTreeXPath = function(element)
+{
+ var paths = [];
+
+ for (; element && element.nodeType == 1; element = element.parentNode)
+ {
+ var index = 0;
+ var nodeName = element.nodeName;
+
+ for (var sibling = element.previousSibling; sibling; sibling = sibling.previousSibling)
+ {
+ if (sibling.nodeType != 1) continue;
+
+ if (sibling.nodeName == nodeName)
+ ++index;
+ }
+
+ var tagName = element.nodeName.toLowerCase();
+ var pathIndex = (index ? "[" + (index+1) + "]" : "");
+ paths.splice(0, 0, tagName + pathIndex);
+ }
+
+ return paths.length ? "/" + paths.join("/") : null;
+};
+
+this.getElementsByXPath = function(doc, xpath)
+{
+ var nodes = [];
+
+ try {
+ var result = doc.evaluate(xpath, doc, null, XPathResult.ANY_TYPE, null);
+ for (var item = result.iterateNext(); item; item = result.iterateNext())
+ nodes.push(item);
+ }
+ catch (exc)
+ {
+ // Invalid xpath expressions make their way here sometimes. If that happens,
+ // we still want to return an empty set without an exception.
+ }
+
+ return nodes;
+};
+
+this.getRuleMatchingElements = function(rule, doc)
+{
+ var css = rule.selectorText;
+ var xpath = this.cssToXPath(css);
+ return this.getElementsByXPath(doc, xpath);
+};
+
+
+}).call(FBL);
+
+
+
+
+FBL.ns(function() { with (FBL) {
+
+// ************************************************************************************************
+// ************************************************************************************************
+// ************************************************************************************************
+// ************************************************************************************************
+// ************************************************************************************************
+
+var toCamelCase = function toCamelCase(s)
+{
+ return s.replace(reSelectorCase, toCamelCaseReplaceFn);
+};
+
+var toSelectorCase = function toSelectorCase(s)
+{
+ return s.replace(reCamelCase, "-$1").toLowerCase();
+
+};
+
+var reCamelCase = /([A-Z])/g;
+var reSelectorCase = /\-(.)/g;
+var toCamelCaseReplaceFn = function toCamelCaseReplaceFn(m,g)
+{
+ return g.toUpperCase();
+};
+
+// ************************************************************************************************
+
+var ElementCache = Firebug.Lite.Cache.Element;
+var StyleSheetCache = Firebug.Lite.Cache.StyleSheet;
+
+// ************************************************************************************************
+// ************************************************************************************************
+// ************************************************************************************************
+// ************************************************************************************************
+// ************************************************************************************************
+// ************************************************************************************************
+
+
+// ************************************************************************************************
+// Constants
+
+//const Cc = Components.classes;
+//const Ci = Components.interfaces;
+//const nsIDOMCSSStyleRule = Ci.nsIDOMCSSStyleRule;
+//const nsIInterfaceRequestor = Ci.nsIInterfaceRequestor;
+//const nsISelectionDisplay = Ci.nsISelectionDisplay;
+//const nsISelectionController = Ci.nsISelectionController;
+
+// See: http://mxr.mozilla.org/mozilla1.9.2/source/content/events/public/nsIEventStateManager.h#153
+//const STATE_ACTIVE = 0x01;
+//const STATE_FOCUS = 0x02;
+//const STATE_HOVER = 0x04;
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+Firebug.SourceBoxPanel = Firebug.Panel;
+
+var reSelectorTag = /(^|\s)(?:\w+)/g;
+
+var domUtils = null;
+
+var textContent = isIE ? "innerText" : "textContent";
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+var CSSDomplateBase = {
+ isEditable: function(rule)
+ {
+ return !rule.isSystemSheet;
+ },
+ isSelectorEditable: function(rule)
+ {
+ return rule.isSelectorEditable && this.isEditable(rule);
+ }
+};
+
+var CSSPropTag = domplate(CSSDomplateBase, {
+ tag: DIV({"class": "cssProp focusRow", $disabledStyle: "$prop.disabled",
+ $editGroup: "$rule|isEditable",
+ $cssOverridden: "$prop.overridden", role : "option"},
+ A({"class": "cssPropDisable"}, " "),
+ SPAN({"class": "cssPropName", $editable: "$rule|isEditable"}, "$prop.name"),
+ SPAN({"class": "cssColon"}, ":"),
+ SPAN({"class": "cssPropValue", $editable: "$rule|isEditable"}, "$prop.value$prop.important"),
+ SPAN({"class": "cssSemi"}, ";")
+ )
+});
+
+var CSSRuleTag =
+ TAG("$rule.tag", {rule: "$rule"});
+
+var CSSImportRuleTag = domplate({
+ tag: DIV({"class": "cssRule insertInto focusRow importRule", _repObject: "$rule.rule"},
+ "@import "",
+ A({"class": "objectLink", _repObject: "$rule.rule.styleSheet"}, "$rule.rule.href"),
+ "";"
+ )
+});
+
+var CSSStyleRuleTag = domplate(CSSDomplateBase, {
+ tag: DIV({"class": "cssRule insertInto",
+ $cssEditableRule: "$rule|isEditable",
+ $editGroup: "$rule|isSelectorEditable",
+ _repObject: "$rule.rule",
+ "ruleId": "$rule.id", role : 'presentation'},
+ DIV({"class": "cssHead focusRow", role : 'listitem'},
+ SPAN({"class": "cssSelector", $editable: "$rule|isSelectorEditable"}, "$rule.selector"), " {"
+ ),
+ DIV({role : 'group'},
+ DIV({"class": "cssPropertyListBox", role : 'listbox'},
+ FOR("prop", "$rule.props",
+ TAG(CSSPropTag.tag, {rule: "$rule", prop: "$prop"})
+ )
+ )
+ ),
+ DIV({"class": "editable insertBefore", role:"presentation"}, "}")
+ )
+});
+
+var reSplitCSS = /(url\("?[^"\)]+?"?\))|(rgb\(.*?\))|(#[\dA-Fa-f]+)|(-?\d+(\.\d+)?(%|[a-z]{1,2})?)|([^,\s]+)|"(.*?)"/;
+
+var reURL = /url\("?([^"\)]+)?"?\)/;
+
+var reRepeat = /no-repeat|repeat-x|repeat-y|repeat/;
+
+//const sothinkInstalled = !!$("swfcatcherKey_sidebar");
+var sothinkInstalled = false;
+var styleGroups =
+{
+ text: [
+ "font-family",
+ "font-size",
+ "font-weight",
+ "font-style",
+ "color",
+ "text-transform",
+ "text-decoration",
+ "letter-spacing",
+ "word-spacing",
+ "line-height",
+ "text-align",
+ "vertical-align",
+ "direction",
+ "column-count",
+ "column-gap",
+ "column-width"
+ ],
+
+ background: [
+ "background-color",
+ "background-image",
+ "background-repeat",
+ "background-position",
+ "background-attachment",
+ "opacity"
+ ],
+
+ box: [
+ "width",
+ "height",
+ "top",
+ "right",
+ "bottom",
+ "left",
+ "margin-top",
+ "margin-right",
+ "margin-bottom",
+ "margin-left",
+ "padding-top",
+ "padding-right",
+ "padding-bottom",
+ "padding-left",
+ "border-top-width",
+ "border-right-width",
+ "border-bottom-width",
+ "border-left-width",
+ "border-top-color",
+ "border-right-color",
+ "border-bottom-color",
+ "border-left-color",
+ "border-top-style",
+ "border-right-style",
+ "border-bottom-style",
+ "border-left-style",
+ "-moz-border-top-radius",
+ "-moz-border-right-radius",
+ "-moz-border-bottom-radius",
+ "-moz-border-left-radius",
+ "outline-top-width",
+ "outline-right-width",
+ "outline-bottom-width",
+ "outline-left-width",
+ "outline-top-color",
+ "outline-right-color",
+ "outline-bottom-color",
+ "outline-left-color",
+ "outline-top-style",
+ "outline-right-style",
+ "outline-bottom-style",
+ "outline-left-style"
+ ],
+
+ layout: [
+ "position",
+ "display",
+ "visibility",
+ "z-index",
+ "overflow-x", // http://www.w3.org/TR/2002/WD-css3-box-20021024/#overflow
+ "overflow-y",
+ "overflow-clip",
+ "white-space",
+ "clip",
+ "float",
+ "clear",
+ "-moz-box-sizing"
+ ],
+
+ other: [
+ "cursor",
+ "list-style-image",
+ "list-style-position",
+ "list-style-type",
+ "marker-offset",
+ "user-focus",
+ "user-select",
+ "user-modify",
+ "user-input"
+ ]
+};
+
+var styleGroupTitles =
+{
+ text: "Text",
+ background: "Background",
+ box: "Box Model",
+ layout: "Layout",
+ other: "Other"
+};
+
+Firebug.CSSModule = extend(Firebug.Module,
+{
+ freeEdit: function(styleSheet, value)
+ {
+ if (!styleSheet.editStyleSheet)
+ {
+ var ownerNode = getStyleSheetOwnerNode(styleSheet);
+ styleSheet.disabled = true;
+
+ var url = CCSV("@mozilla.org/network/standard-url;1", Components.interfaces.nsIURL);
+ url.spec = styleSheet.href;
+
+ var editStyleSheet = ownerNode.ownerDocument.createElementNS(
+ "http://www.w3.org/1999/xhtml",
+ "style");
+ unwrapObject(editStyleSheet).firebugIgnore = true;
+ editStyleSheet.setAttribute("type", "text/css");
+ editStyleSheet.setAttributeNS(
+ "http://www.w3.org/XML/1998/namespace",
+ "base",
+ url.directory);
+ if (ownerNode.hasAttribute("media"))
+ {
+ editStyleSheet.setAttribute("media", ownerNode.getAttribute("media"));
+ }
+
+ // Insert the edited stylesheet directly after the old one to ensure the styles
+ // cascade properly.
+ ownerNode.parentNode.insertBefore(editStyleSheet, ownerNode.nextSibling);
+
+ styleSheet.editStyleSheet = editStyleSheet;
+ }
+
+ styleSheet.editStyleSheet.innerHTML = value;
+ if (FBTrace.DBG_CSS)
+ FBTrace.sysout("css.saveEdit styleSheet.href:"+styleSheet.href+" got innerHTML:"+value+"\n");
+
+ dispatch(this.fbListeners, "onCSSFreeEdit", [styleSheet, value]);
+ },
+
+ insertRule: function(styleSheet, cssText, ruleIndex)
+ {
+ if (FBTrace.DBG_CSS) FBTrace.sysout("Insert: " + ruleIndex + " " + cssText);
+ var insertIndex = styleSheet.insertRule(cssText, ruleIndex);
+
+ dispatch(this.fbListeners, "onCSSInsertRule", [styleSheet, cssText, ruleIndex]);
+
+ return insertIndex;
+ },
+
+ deleteRule: function(styleSheet, ruleIndex)
+ {
+ if (FBTrace.DBG_CSS) FBTrace.sysout("deleteRule: " + ruleIndex + " " + styleSheet.cssRules.length, styleSheet.cssRules);
+ dispatch(this.fbListeners, "onCSSDeleteRule", [styleSheet, ruleIndex]);
+
+ styleSheet.deleteRule(ruleIndex);
+ },
+
+ setProperty: function(rule, propName, propValue, propPriority)
+ {
+ var style = rule.style || rule;
+
+ // Record the original CSS text for the inline case so we can reconstruct at a later
+ // point for diffing purposes
+ var baseText = style.cssText;
+
+ // good browsers
+ if (style.getPropertyValue)
+ {
+ var prevValue = style.getPropertyValue(propName);
+ var prevPriority = style.getPropertyPriority(propName);
+
+ // XXXjoe Gecko bug workaround: Just changing priority doesn't have any effect
+ // unless we remove the property first
+ style.removeProperty(propName);
+
+ style.setProperty(propName, propValue, propPriority);
+ }
+ // sad browsers
+ else
+ {
+ // TODO: xxxpedro parse CSS rule to find property priority in IE?
+ //console.log(propName, propValue);
+ style[toCamelCase(propName)] = propValue;
+ }
+
+ if (propName) {
+ dispatch(this.fbListeners, "onCSSSetProperty", [style, propName, propValue, propPriority, prevValue, prevPriority, rule, baseText]);
+ }
+ },
+
+ removeProperty: function(rule, propName, parent)
+ {
+ var style = rule.style || rule;
+
+ // Record the original CSS text for the inline case so we can reconstruct at a later
+ // point for diffing purposes
+ var baseText = style.cssText;
+
+ if (style.getPropertyValue)
+ {
+
+ var prevValue = style.getPropertyValue(propName);
+ var prevPriority = style.getPropertyPriority(propName);
+
+ style.removeProperty(propName);
+ }
+ else
+ {
+ style[toCamelCase(propName)] = "";
+ }
+
+ if (propName) {
+ dispatch(this.fbListeners, "onCSSRemoveProperty", [style, propName, prevValue, prevPriority, rule, baseText]);
+ }
+ }/*,
+
+ cleanupSheets: function(doc, context)
+ {
+ // Due to the manner in which the layout engine handles multiple
+ // references to the same sheet we need to kick it a little bit.
+ // The injecting a simple stylesheet then removing it will force
+ // Firefox to regenerate it's CSS hierarchy.
+ //
+ // WARN: This behavior was determined anecdotally.
+ // See http://code.google.com/p/fbug/issues/detail?id=2440
+ var style = doc.createElementNS("http://www.w3.org/1999/xhtml", "style");
+ style.setAttribute("charset","utf-8");
+ unwrapObject(style).firebugIgnore = true;
+ style.setAttribute("type", "text/css");
+ style.innerHTML = "#fbIgnoreStyleDO_NOT_USE {}";
+ addStyleSheet(doc, style);
+ style.parentNode.removeChild(style);
+
+ // https://bugzilla.mozilla.org/show_bug.cgi?id=500365
+ // This voodoo touches each style sheet to force some Firefox internal change to allow edits.
+ var styleSheets = getAllStyleSheets(context);
+ for(var i = 0; i < styleSheets.length; i++)
+ {
+ try
+ {
+ var rules = styleSheets[i].cssRules;
+ if (rules.length > 0)
+ var touch = rules[0];
+ if (FBTrace.DBG_CSS && touch)
+ FBTrace.sysout("css.show() touch "+typeof(touch)+" in "+(styleSheets[i].href?styleSheets[i].href:context.getName()));
+ }
+ catch(e)
+ {
+ if (FBTrace.DBG_ERRORS)
+ FBTrace.sysout("css.show: sheet.cssRules FAILS for "+(styleSheets[i]?styleSheets[i].href:"null sheet")+e, e);
+ }
+ }
+ },
+ cleanupSheetHandler: function(event, context)
+ {
+ var target = event.target || event.srcElement,
+ tagName = (target.tagName || "").toLowerCase();
+ if (tagName == "link")
+ {
+ this.cleanupSheets(target.ownerDocument, context);
+ }
+ },
+ watchWindow: function(context, win)
+ {
+ var cleanupSheets = bind(this.cleanupSheets, this),
+ cleanupSheetHandler = bind(this.cleanupSheetHandler, this, context),
+ doc = win.document;
+
+ //doc.addEventListener("DOMAttrModified", cleanupSheetHandler, false);
+ //doc.addEventListener("DOMNodeInserted", cleanupSheetHandler, false);
+ },
+ loadedContext: function(context)
+ {
+ var self = this;
+ iterateWindows(context.browser.contentWindow, function(subwin)
+ {
+ self.cleanupSheets(subwin.document, context);
+ });
+ }
+ /**/
+});
+
+// ************************************************************************************************
+
+Firebug.CSSStyleSheetPanel = function() {};
+
+Firebug.CSSStyleSheetPanel.prototype = extend(Firebug.SourceBoxPanel,
+{
+ template: domplate(
+ {
+ tag:
+ DIV({"class": "cssSheet insertInto a11yCSSView"},
+ FOR("rule", "$rules",
+ CSSRuleTag
+ ),
+ DIV({"class": "cssSheet editable insertBefore"}, "")
+ )
+ }),
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+ refresh: function()
+ {
+ if (this.location)
+ this.updateLocation(this.location);
+ else if (this.selection)
+ this.updateSelection(this.selection);
+ },
+
+ toggleEditing: function()
+ {
+ if (!this.stylesheetEditor)
+ this.stylesheetEditor = new StyleSheetEditor(this.document);
+
+ if (this.editing)
+ Firebug.Editor.stopEditing();
+ else
+ {
+ if (!this.location)
+ return;
+
+ var styleSheet = this.location.editStyleSheet
+ ? this.location.editStyleSheet.sheet
+ : this.location;
+
+ var css = getStyleSheetCSS(styleSheet, this.context);
+ //var topmost = getTopmostRuleLine(this.panelNode);
+
+ this.stylesheetEditor.styleSheet = this.location;
+ Firebug.Editor.startEditing(this.panelNode, css, this.stylesheetEditor);
+ //this.stylesheetEditor.scrollToLine(topmost.line, topmost.offset);
+ }
+ },
+
+ getStylesheetURL: function(rule)
+ {
+ if (this.location.href)
+ return this.location.href;
+ else
+ return this.context.window.location.href;
+ },
+
+ getRuleByLine: function(styleSheet, line)
+ {
+ if (!domUtils)
+ return null;
+
+ var cssRules = styleSheet.cssRules;
+ for (var i = 0; i < cssRules.length; ++i)
+ {
+ var rule = cssRules[i];
+ if (rule instanceof CSSStyleRule)
+ {
+ var ruleLine = domUtils.getRuleLine(rule);
+ if (ruleLine >= line)
+ return rule;
+ }
+ }
+ },
+
+ highlightRule: function(rule)
+ {
+ var ruleElement = Firebug.getElementByRepObject(this.panelNode.firstChild, rule);
+ if (ruleElement)
+ {
+ scrollIntoCenterView(ruleElement, this.panelNode);
+ setClassTimed(ruleElement, "jumpHighlight", this.context);
+ }
+ },
+
+ getStyleSheetRules: function(context, styleSheet)
+ {
+ var isSystemSheet = isSystemStyleSheet(styleSheet);
+
+ function appendRules(cssRules)
+ {
+ for (var i = 0; i < cssRules.length; ++i)
+ {
+ var rule = cssRules[i];
+
+ // TODO: xxxpedro opera instanceof stylesheet remove the following comments when
+ // the issue with opera and style sheet Classes has been solved.
+
+ //if (rule instanceof CSSStyleRule)
+ if (instanceOf(rule, "CSSStyleRule"))
+ {
+ var props = this.getRuleProperties(context, rule);
+ //var line = domUtils.getRuleLine(rule);
+ var line = null;
+
+ var selector = rule.selectorText;
+
+ if (isIE)
+ {
+ selector = selector.replace(reSelectorTag,
+ function(s){return s.toLowerCase();});
+ }
+
+ var ruleId = rule.selectorText+"/"+line;
+ rules.push({tag: CSSStyleRuleTag.tag, rule: rule, id: ruleId,
+ selector: selector, props: props,
+ isSystemSheet: isSystemSheet,
+ isSelectorEditable: true});
+ }
+ //else if (rule instanceof CSSImportRule)
+ else if (instanceOf(rule, "CSSImportRule"))
+ rules.push({tag: CSSImportRuleTag.tag, rule: rule});
+ //else if (rule instanceof CSSMediaRule)
+ else if (instanceOf(rule, "CSSMediaRule"))
+ appendRules.apply(this, [rule.cssRules]);
+ else
+ {
+ if (FBTrace.DBG_ERRORS || FBTrace.DBG_CSS)
+ FBTrace.sysout("css getStyleSheetRules failed to classify a rule ", rule);
+ }
+ }
+ }
+
+ var rules = [];
+ appendRules.apply(this, [styleSheet.cssRules || styleSheet.rules]);
+ return rules;
+ },
+
+ parseCSSProps: function(style, inheritMode)
+ {
+ var props = [];
+
+ if (Firebug.expandShorthandProps)
+ {
+ var count = style.length-1,
+ index = style.length;
+ while (index--)
+ {
+ var propName = style.item(count - index);
+ this.addProperty(propName, style.getPropertyValue(propName), !!style.getPropertyPriority(propName), false, inheritMode, props);
+ }
+ }
+ else
+ {
+ var lines = style.cssText.match(/(?:[^;\(]*(?:\([^\)]*?\))?[^;\(]*)*;?/g);
+ var propRE = /\s*([^:\s]*)\s*:\s*(.*?)\s*(! important)?;?$/;
+ var line,i=0;
+ // TODO: xxxpedro port to firebug: variable leaked into global namespace
+ var m;
+
+ while(line=lines[i++]){
+ m = propRE.exec(line);
+ if(!m)
+ continue;
+ //var name = m[1], value = m[2], important = !!m[3];
+ if (m[2])
+ this.addProperty(m[1], m[2], !!m[3], false, inheritMode, props);
+ };
+ }
+
+ return props;
+ },
+
+ getRuleProperties: function(context, rule, inheritMode)
+ {
+ var props = this.parseCSSProps(rule.style, inheritMode);
+
+ // TODO: xxxpedro port to firebug: variable leaked into global namespace
+ //var line = domUtils.getRuleLine(rule);
+ var line;
+ var ruleId = rule.selectorText+"/"+line;
+ this.addOldProperties(context, ruleId, inheritMode, props);
+ sortProperties(props);
+
+ return props;
+ },
+
+ addOldProperties: function(context, ruleId, inheritMode, props)
+ {
+ if (context.selectorMap && context.selectorMap.hasOwnProperty(ruleId) )
+ {
+ var moreProps = context.selectorMap[ruleId];
+ for (var i = 0; i < moreProps.length; ++i)
+ {
+ var prop = moreProps[i];
+ this.addProperty(prop.name, prop.value, prop.important, true, inheritMode, props);
+ }
+ }
+ },
+
+ addProperty: function(name, value, important, disabled, inheritMode, props)
+ {
+ name = name.toLowerCase();
+
+ if (inheritMode && !inheritedStyleNames[name])
+ return;
+
+ name = this.translateName(name, value);
+ if (name)
+ {
+ value = stripUnits(rgbToHex(value));
+ important = important ? " !important" : "";
+
+ var prop = {name: name, value: value, important: important, disabled: disabled};
+ props.push(prop);
+ }
+ },
+
+ translateName: function(name, value)
+ {
+ // Don't show these proprietary Mozilla properties
+ if ((value == "-moz-initial"
+ && (name == "-moz-background-clip" || name == "-moz-background-origin"
+ || name == "-moz-background-inline-policy"))
+ || (value == "physical"
+ && (name == "margin-left-ltr-source" || name == "margin-left-rtl-source"
+ || name == "margin-right-ltr-source" || name == "margin-right-rtl-source"))
+ || (value == "physical"
+ && (name == "padding-left-ltr-source" || name == "padding-left-rtl-source"
+ || name == "padding-right-ltr-source" || name == "padding-right-rtl-source")))
+ return null;
+
+ // Translate these back to the form the user probably expects
+ if (name == "margin-left-value")
+ return "margin-left";
+ else if (name == "margin-right-value")
+ return "margin-right";
+ else if (name == "margin-top-value")
+ return "margin-top";
+ else if (name == "margin-bottom-value")
+ return "margin-bottom";
+ else if (name == "padding-left-value")
+ return "padding-left";
+ else if (name == "padding-right-value")
+ return "padding-right";
+ else if (name == "padding-top-value")
+ return "padding-top";
+ else if (name == "padding-bottom-value")
+ return "padding-bottom";
+ // XXXjoe What about border!
+ else
+ return name;
+ },
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+ editElementStyle: function()
+ {
+ ///var rulesBox = this.panelNode.getElementsByClassName("cssElementRuleContainer")[0];
+ var rulesBox = $$(".cssElementRuleContainer", this.panelNode)[0];
+ var styleRuleBox = rulesBox && Firebug.getElementByRepObject(rulesBox, this.selection);
+ if (!styleRuleBox)
+ {
+ var rule = {rule: this.selection, inherited: false, selector: "element.style", props: []};
+ if (!rulesBox)
+ {
+ // The element did not have any displayed styles. We need to create the whole tree and remove
+ // the no styles message
+ styleRuleBox = this.template.cascadedTag.replace({
+ rules: [rule], inherited: [], inheritLabel: "Inherited from" // $STR("InheritedFrom")
+ }, this.panelNode);
+
+ ///styleRuleBox = styleRuleBox.getElementsByClassName("cssElementRuleContainer")[0];
+ styleRuleBox = $$(".cssElementRuleContainer", styleRuleBox)[0];
+ }
+ else
+ styleRuleBox = this.template.ruleTag.insertBefore({rule: rule}, rulesBox);
+
+ ///styleRuleBox = styleRuleBox.getElementsByClassName("insertInto")[0];
+ styleRuleBox = $$(".insertInto", styleRuleBox)[0];
+ }
+
+ Firebug.Editor.insertRowForObject(styleRuleBox);
+ },
+
+ insertPropertyRow: function(row)
+ {
+ Firebug.Editor.insertRowForObject(row);
+ },
+
+ insertRule: function(row)
+ {
+ var location = getAncestorByClass(row, "cssRule");
+ if (!location)
+ {
+ location = getChildByClass(this.panelNode, "cssSheet");
+ Firebug.Editor.insertRowForObject(location);
+ }
+ else
+ {
+ Firebug.Editor.insertRow(location, "before");
+ }
+ },
+
+ editPropertyRow: function(row)
+ {
+ var propValueBox = getChildByClass(row, "cssPropValue");
+ Firebug.Editor.startEditing(propValueBox);
+ },
+
+ deletePropertyRow: function(row)
+ {
+ var rule = Firebug.getRepObject(row);
+ var propName = getChildByClass(row, "cssPropName")[textContent];
+ Firebug.CSSModule.removeProperty(rule, propName);
+
+ // Remove the property from the selector map, if it was disabled
+ var ruleId = Firebug.getRepNode(row).getAttribute("ruleId");
+ if ( this.context.selectorMap && this.context.selectorMap.hasOwnProperty(ruleId) )
+ {
+ var map = this.context.selectorMap[ruleId];
+ for (var i = 0; i < map.length; ++i)
+ {
+ if (map[i].name == propName)
+ {
+ map.splice(i, 1);
+ break;
+ }
+ }
+ }
+ if (this.name == "stylesheet")
+ dispatch([Firebug.A11yModel], 'onInlineEditorClose', [this, row.firstChild, true]);
+ row.parentNode.removeChild(row);
+
+ this.markChange(this.name == "stylesheet");
+ },
+
+ disablePropertyRow: function(row)
+ {
+ toggleClass(row, "disabledStyle");
+
+ var rule = Firebug.getRepObject(row);
+ var propName = getChildByClass(row, "cssPropName")[textContent];
+
+ if (!this.context.selectorMap)
+ this.context.selectorMap = {};
+
+ // XXXjoe Generate unique key for elements too
+ var ruleId = Firebug.getRepNode(row).getAttribute("ruleId");
+ if (!(this.context.selectorMap.hasOwnProperty(ruleId)))
+ this.context.selectorMap[ruleId] = [];
+
+ var map = this.context.selectorMap[ruleId];
+ var propValue = getChildByClass(row, "cssPropValue")[textContent];
+ var parsedValue = parsePriority(propValue);
+ if (hasClass(row, "disabledStyle"))
+ {
+ Firebug.CSSModule.removeProperty(rule, propName);
+
+ map.push({"name": propName, "value": parsedValue.value,
+ "important": parsedValue.priority});
+ }
+ else
+ {
+ Firebug.CSSModule.setProperty(rule, propName, parsedValue.value, parsedValue.priority);
+
+ var index = findPropByName(map, propName);
+ map.splice(index, 1);
+ }
+
+ this.markChange(this.name == "stylesheet");
+ },
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+ onMouseDown: function(event)
+ {
+ //console.log("onMouseDown", event.target || event.srcElement, event);
+
+ // xxxpedro adjusting coordinates because the panel isn't a window yet
+ var offset = event.clientX - this.panelNode.parentNode.offsetLeft;
+
+ // XXjoe Hack to only allow clicking on the checkbox
+ if (!isLeftClick(event) || offset > 20)
+ return;
+
+ var target = event.target || event.srcElement;
+ if (hasClass(target, "textEditor"))
+ return;
+
+ var row = getAncestorByClass(target, "cssProp");
+ if (row && hasClass(row, "editGroup"))
+ {
+ this.disablePropertyRow(row);
+ cancelEvent(event);
+ }
+ },
+
+ onDoubleClick: function(event)
+ {
+ //console.log("onDoubleClick", event.target || event.srcElement, event);
+
+ // xxxpedro adjusting coordinates because the panel isn't a window yet
+ var offset = event.clientX - this.panelNode.parentNode.offsetLeft;
+
+ if (!isLeftClick(event) || offset <= 20)
+ return;
+
+ var target = event.target || event.srcElement;
+
+ //console.log("ok", target, hasClass(target, "textEditorInner"), !isLeftClick(event), offset <= 20);
+
+ // if the inline editor was clicked, don't insert a new rule
+ if (hasClass(target, "textEditorInner"))
+ return;
+
+ var row = getAncestorByClass(target, "cssRule");
+ if (row && !getAncestorByClass(target, "cssPropName")
+ && !getAncestorByClass(target, "cssPropValue"))
+ {
+ this.insertPropertyRow(row);
+ cancelEvent(event);
+ }
+ },
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ // extends Panel
+
+ name: "stylesheet",
+ title: "CSS",
+ parentPanel: null,
+ searchable: true,
+ dependents: ["css", "stylesheet", "dom", "domSide", "layout"],
+
+ options:
+ {
+ hasToolButtons: true
+ },
+
+ create: function()
+ {
+ Firebug.Panel.create.apply(this, arguments);
+
+ this.onMouseDown = bind(this.onMouseDown, this);
+ this.onDoubleClick = bind(this.onDoubleClick, this);
+
+ if (this.name == "stylesheet")
+ {
+ this.onChangeSelect = bind(this.onChangeSelect, this);
+
+ var doc = Firebug.browser.document;
+ var selectNode = this.selectNode = createElement("select");
+
+ CssAnalyzer.processAllStyleSheets(doc, function(doc, styleSheet)
+ {
+ var key = StyleSheetCache.key(styleSheet);
+ var fileName = getFileName(styleSheet.href) || getFileName(doc.location.href);
+ var option = createElement("option", {value: key});
+
+ option.appendChild(Firebug.chrome.document.createTextNode(fileName));
+ selectNode.appendChild(option);
+ });
+
+ this.toolButtonsNode.appendChild(selectNode);
+ }
+ /**/
+ },
+
+ onChangeSelect: function(event)
+ {
+ event = event || window.event;
+ var target = event.srcElement || event.currentTarget;
+ var key = target.value;
+ var styleSheet = StyleSheetCache.get(key);
+
+ this.updateLocation(styleSheet);
+ },
+
+ initialize: function()
+ {
+ Firebug.Panel.initialize.apply(this, arguments);
+
+ //if (!domUtils)
+ //{
+ // try {
+ // domUtils = CCSV("@mozilla.org/inspector/dom-utils;1", "inIDOMUtils");
+ // } catch (exc) {
+ // if (FBTrace.DBG_ERRORS)
+ // FBTrace.sysout("@mozilla.org/inspector/dom-utils;1 FAILED to load: "+exc, exc);
+ // }
+ //}
+
+ //TODO: xxxpedro
+ this.context = Firebug.chrome; // TODO: xxxpedro css2
+ this.document = Firebug.chrome.document; // TODO: xxxpedro css2
+
+ this.initializeNode();
+
+ if (this.name == "stylesheet")
+ {
+ var styleSheets = Firebug.browser.document.styleSheets;
+
+ if (styleSheets.length > 0)
+ {
+ addEvent(this.selectNode, "change", this.onChangeSelect);
+
+ this.updateLocation(styleSheets[0]);
+ }
+ }
+
+ //Firebug.SourceBoxPanel.initialize.apply(this, arguments);
+ },
+
+ shutdown: function()
+ {
+ // must destroy the editor when we leave the panel to avoid problems (Issue 2981)
+ Firebug.Editor.stopEditing();
+
+ if (this.name == "stylesheet")
+ {
+ removeEvent(this.selectNode, "change", this.onChangeSelect);
+ }
+
+ this.destroyNode();
+
+ Firebug.Panel.shutdown.apply(this, arguments);
+ },
+
+ destroy: function(state)
+ {
+ //state.scrollTop = this.panelNode.scrollTop ? this.panelNode.scrollTop : this.lastScrollTop;
+
+ //persistObjects(this, state);
+
+ // xxxpedro we are stopping the editor in the shutdown method already
+ //Firebug.Editor.stopEditing();
+ Firebug.Panel.destroy.apply(this, arguments);
+ },
+
+ initializeNode: function(oldPanelNode)
+ {
+ addEvent(this.panelNode, "mousedown", this.onMouseDown);
+ addEvent(this.panelNode, "dblclick", this.onDoubleClick);
+ //Firebug.SourceBoxPanel.initializeNode.apply(this, arguments);
+ //dispatch([Firebug.A11yModel], 'onInitializeNode', [this, 'css']);
+ },
+
+ destroyNode: function()
+ {
+ removeEvent(this.panelNode, "mousedown", this.onMouseDown);
+ removeEvent(this.panelNode, "dblclick", this.onDoubleClick);
+ //Firebug.SourceBoxPanel.destroyNode.apply(this, arguments);
+ //dispatch([Firebug.A11yModel], 'onDestroyNode', [this, 'css']);
+ },
+
+ ishow: function(state)
+ {
+ Firebug.Inspector.stopInspecting(true);
+
+ this.showToolbarButtons("fbCSSButtons", true);
+
+ if (this.context.loaded && !this.location) // wait for loadedContext to restore the panel
+ {
+ restoreObjects(this, state);
+
+ if (!this.location)
+ this.location = this.getDefaultLocation();
+
+ if (state && state.scrollTop)
+ this.panelNode.scrollTop = state.scrollTop;
+ }
+ },
+
+ ihide: function()
+ {
+ this.showToolbarButtons("fbCSSButtons", false);
+
+ this.lastScrollTop = this.panelNode.scrollTop;
+ },
+
+ supportsObject: function(object)
+ {
+ if (object instanceof CSSStyleSheet)
+ return 1;
+ else if (object instanceof CSSStyleRule)
+ return 2;
+ else if (object instanceof CSSStyleDeclaration)
+ return 2;
+ else if (object instanceof SourceLink && object.type == "css" && reCSS.test(object.href))
+ return 2;
+ else
+ return 0;
+ },
+
+ updateLocation: function(styleSheet)
+ {
+ if (!styleSheet)
+ return;
+ if (styleSheet.editStyleSheet)
+ styleSheet = styleSheet.editStyleSheet.sheet;
+
+ // if it is a restricted stylesheet, show the warning message and abort the update process
+ if (styleSheet.restricted)
+ {
+ FirebugReps.Warning.tag.replace({object: "AccessRestricted"}, this.panelNode);
+
+ // TODO: xxxpedro remove when there the external resource problem is fixed
+ CssAnalyzer.externalStyleSheetWarning.tag.append({
+ object: "The stylesheet could not be loaded due to access restrictions. ",
+ link: "more...",
+ href: "http://getfirebug.com/wiki/index.php/Firebug_Lite_FAQ#I_keep_seeing_.22Access_to_restricted_URI_denied.22"
+ }, this.panelNode);
+
+ return;
+ }
+
+ var rules = this.getStyleSheetRules(this.context, styleSheet);
+
+ var result;
+ if (rules.length)
+ // FIXME xxxpedro chromenew this is making iPad's Safari to crash
+ result = this.template.tag.replace({rules: rules}, this.panelNode);
+ else
+ result = FirebugReps.Warning.tag.replace({object: "EmptyStyleSheet"}, this.panelNode);
+
+ // TODO: xxxpedro need to fix showToolbarButtons function
+ //this.showToolbarButtons("fbCSSButtons", !isSystemStyleSheet(this.location));
+
+ //dispatch([Firebug.A11yModel], 'onCSSRulesAdded', [this, this.panelNode]);
+ },
+
+ updateSelection: function(object)
+ {
+ this.selection = null;
+
+ if (object instanceof CSSStyleDeclaration) {
+ object = object.parentRule;
+ }
+
+ if (object instanceof CSSStyleRule)
+ {
+ this.navigate(object.parentStyleSheet);
+ this.highlightRule(object);
+ }
+ else if (object instanceof CSSStyleSheet)
+ {
+ this.navigate(object);
+ }
+ else if (object instanceof SourceLink)
+ {
+ try
+ {
+ var sourceLink = object;
+
+ var sourceFile = getSourceFileByHref(sourceLink.href, this.context);
+ if (sourceFile)
+ {
+ clearNode(this.panelNode); // replace rendered stylesheets
+ this.showSourceFile(sourceFile);
+
+ var lineNo = object.line;
+ if (lineNo)
+ this.scrollToLine(lineNo, this.jumpHighlightFactory(lineNo, this.context));
+ }
+ else // XXXjjb we should not be taking this path
+ {
+ var stylesheet = getStyleSheetByHref(sourceLink.href, this.context);
+ if (stylesheet)
+ this.navigate(stylesheet);
+ else
+ {
+ if (FBTrace.DBG_CSS)
+ FBTrace.sysout("css.updateSelection no sourceFile for "+sourceLink.href, sourceLink);
+ }
+ }
+ }
+ catch(exc) {
+ if (FBTrace.DBG_CSS)
+ FBTrace.sysout("css.upDateSelection FAILS "+exc, exc);
+ }
+ }
+ },
+
+ updateOption: function(name, value)
+ {
+ if (name == "expandShorthandProps")
+ this.refresh();
+ },
+
+ getLocationList: function()
+ {
+ var styleSheets = getAllStyleSheets(this.context);
+ return styleSheets;
+ },
+
+ getOptionsMenuItems: function()
+ {
+ return [
+ {label: "Expand Shorthand Properties", type: "checkbox", checked: Firebug.expandShorthandProps,
+ command: bindFixed(Firebug.togglePref, Firebug, "expandShorthandProps") },
+ "-",
+ {label: "Refresh", command: bind(this.refresh, this) }
+ ];
+ },
+
+ getContextMenuItems: function(style, target)
+ {
+ var items = [];
+
+ if (this.infoTipType == "color")
+ {
+ items.push(
+ {label: "CopyColor",
+ command: bindFixed(copyToClipboard, FBL, this.infoTipObject) }
+ );
+ }
+ else if (this.infoTipType == "image")
+ {
+ items.push(
+ {label: "CopyImageLocation",
+ command: bindFixed(copyToClipboard, FBL, this.infoTipObject) },
+ {label: "OpenImageInNewTab",
+ command: bindFixed(openNewTab, FBL, this.infoTipObject) }
+ );
+ }
+
+ ///if (this.selection instanceof Element)
+ if (isElement(this.selection))
+ {
+ items.push(
+ //"-",
+ {label: "EditStyle",
+ command: bindFixed(this.editElementStyle, this) }
+ );
+ }
+ else if (!isSystemStyleSheet(this.selection))
+ {
+ items.push(
+ //"-",
+ {label: "NewRule",
+ command: bindFixed(this.insertRule, this, target) }
+ );
+ }
+
+ var cssRule = getAncestorByClass(target, "cssRule");
+ if (cssRule && hasClass(cssRule, "cssEditableRule"))
+ {
+ items.push(
+ "-",
+ {label: "NewProp",
+ command: bindFixed(this.insertPropertyRow, this, target) }
+ );
+
+ var propRow = getAncestorByClass(target, "cssProp");
+ if (propRow)
+ {
+ var propName = getChildByClass(propRow, "cssPropName")[textContent];
+ var isDisabled = hasClass(propRow, "disabledStyle");
+
+ items.push(
+ {label: $STRF("EditProp", [propName]), nol10n: true,
+ command: bindFixed(this.editPropertyRow, this, propRow) },
+ {label: $STRF("DeleteProp", [propName]), nol10n: true,
+ command: bindFixed(this.deletePropertyRow, this, propRow) },
+ {label: $STRF("DisableProp", [propName]), nol10n: true,
+ type: "checkbox", checked: isDisabled,
+ command: bindFixed(this.disablePropertyRow, this, propRow) }
+ );
+ }
+ }
+
+ items.push(
+ "-",
+ {label: "Refresh", command: bind(this.refresh, this) }
+ );
+
+ return items;
+ },
+
+ browseObject: function(object)
+ {
+ if (this.infoTipType == "image")
+ {
+ openNewTab(this.infoTipObject);
+ return true;
+ }
+ },
+
+ showInfoTip: function(infoTip, target, x, y)
+ {
+ var propValue = getAncestorByClass(target, "cssPropValue");
+ if (propValue)
+ {
+ var offset = getClientOffset(propValue);
+ var offsetX = x-offset.x;
+
+ var text = propValue[textContent];
+ var charWidth = propValue.offsetWidth/text.length;
+ var charOffset = Math.floor(offsetX/charWidth);
+
+ var cssValue = parseCSSValue(text, charOffset);
+ if (cssValue)
+ {
+ if (cssValue.value == this.infoTipValue)
+ return true;
+
+ this.infoTipValue = cssValue.value;
+
+ if (cssValue.type == "rgb" || (!cssValue.type && isColorKeyword(cssValue.value)))
+ {
+ this.infoTipType = "color";
+ this.infoTipObject = cssValue.value;
+
+ return Firebug.InfoTip.populateColorInfoTip(infoTip, cssValue.value);
+ }
+ else if (cssValue.type == "url")
+ {
+ ///var propNameNode = target.parentNode.getElementsByClassName("cssPropName").item(0);
+ var propNameNode = getElementByClass(target.parentNode, "cssPropName");
+ if (propNameNode && isImageRule(propNameNode[textContent]))
+ {
+ var rule = Firebug.getRepObject(target);
+ var baseURL = this.getStylesheetURL(rule);
+ var relURL = parseURLValue(cssValue.value);
+ var absURL = isDataURL(relURL) ? relURL:absoluteURL(relURL, baseURL);
+ var repeat = parseRepeatValue(text);
+
+ this.infoTipType = "image";
+ this.infoTipObject = absURL;
+
+ return Firebug.InfoTip.populateImageInfoTip(infoTip, absURL, repeat);
+ }
+ }
+ }
+ }
+
+ delete this.infoTipType;
+ delete this.infoTipValue;
+ delete this.infoTipObject;
+ },
+
+ getEditor: function(target, value)
+ {
+ if (target == this.panelNode
+ || hasClass(target, "cssSelector") || hasClass(target, "cssRule")
+ || hasClass(target, "cssSheet"))
+ {
+ if (!this.ruleEditor)
+ this.ruleEditor = new CSSRuleEditor(this.document);
+
+ return this.ruleEditor;
+ }
+ else
+ {
+ if (!this.editor)
+ this.editor = new CSSEditor(this.document);
+
+ return this.editor;
+ }
+ },
+
+ getDefaultLocation: function()
+ {
+ try
+ {
+ var styleSheets = this.context.window.document.styleSheets;
+ if (styleSheets.length)
+ {
+ var sheet = styleSheets[0];
+ return (Firebug.filterSystemURLs && isSystemURL(getURLForStyleSheet(sheet))) ? null : sheet;
+ }
+ }
+ catch (exc)
+ {
+ if (FBTrace.DBG_LOCATIONS)
+ FBTrace.sysout("css.getDefaultLocation FAILS "+exc, exc);
+ }
+ },
+
+ getObjectDescription: function(styleSheet)
+ {
+ var url = getURLForStyleSheet(styleSheet);
+ var instance = getInstanceForStyleSheet(styleSheet);
+
+ var baseDescription = splitURLBase(url);
+ if (instance) {
+ baseDescription.name = baseDescription.name + " #" + (instance + 1);
+ }
+ return baseDescription;
+ },
+
+ search: function(text, reverse)
+ {
+ var curDoc = this.searchCurrentDoc(!Firebug.searchGlobal, text, reverse);
+ if (!curDoc && Firebug.searchGlobal)
+ {
+ return this.searchOtherDocs(text, reverse);
+ }
+ return curDoc;
+ },
+
+ searchOtherDocs: function(text, reverse)
+ {
+ var scanRE = Firebug.Search.getTestingRegex(text);
+ function scanDoc(styleSheet) {
+ // we don't care about reverse here as we are just looking for existence,
+ // if we do have a result we will handle the reverse logic on display
+ for (var i = 0; i < styleSheet.cssRules.length; i++)
+ {
+ if (scanRE.test(styleSheet.cssRules[i].cssText))
+ {
+ return true;
+ }
+ }
+ }
+
+ if (this.navigateToNextDocument(scanDoc, reverse))
+ {
+ return this.searchCurrentDoc(true, text, reverse);
+ }
+ },
+
+ searchCurrentDoc: function(wrapSearch, text, reverse)
+ {
+ if (!text)
+ {
+ delete this.currentSearch;
+ return false;
+ }
+
+ var row;
+ if (this.currentSearch && text == this.currentSearch.text)
+ {
+ row = this.currentSearch.findNext(wrapSearch, false, reverse, Firebug.Search.isCaseSensitive(text));
+ }
+ else
+ {
+ if (this.editing)
+ {
+ this.currentSearch = new TextSearch(this.stylesheetEditor.box);
+ row = this.currentSearch.find(text, reverse, Firebug.Search.isCaseSensitive(text));
+
+ if (row)
+ {
+ var sel = this.document.defaultView.getSelection();
+ sel.removeAllRanges();
+ sel.addRange(this.currentSearch.range);
+ scrollSelectionIntoView(this);
+ return true;
+ }
+ else
+ return false;
+ }
+ else
+ {
+ function findRow(node) { return node.nodeType == 1 ? node : node.parentNode; }
+ this.currentSearch = new TextSearch(this.panelNode, findRow);
+ row = this.currentSearch.find(text, reverse, Firebug.Search.isCaseSensitive(text));
+ }
+ }
+
+ if (row)
+ {
+ this.document.defaultView.getSelection().selectAllChildren(row);
+ scrollIntoCenterView(row, this.panelNode);
+ dispatch([Firebug.A11yModel], 'onCSSSearchMatchFound', [this, text, row]);
+ return true;
+ }
+ else
+ {
+ dispatch([Firebug.A11yModel], 'onCSSSearchMatchFound', [this, text, null]);
+ return false;
+ }
+ },
+
+ getSearchOptionsMenuItems: function()
+ {
+ return [
+ Firebug.Search.searchOptionMenu("search.Case_Sensitive", "searchCaseSensitive"),
+ Firebug.Search.searchOptionMenu("search.Multiple_Files", "searchGlobal")
+ ];
+ }
+});
+/**/
+// ************************************************************************************************
+
+function CSSElementPanel() {}
+
+CSSElementPanel.prototype = extend(Firebug.CSSStyleSheetPanel.prototype,
+{
+ template: domplate(
+ {
+ cascadedTag:
+ DIV({"class": "a11yCSSView", role : 'presentation'},
+ DIV({role : 'list', 'aria-label' : $STR('aria.labels.style rules') },
+ FOR("rule", "$rules",
+ TAG("$ruleTag", {rule: "$rule"})
+ )
+ ),
+ DIV({role : "list", 'aria-label' :$STR('aria.labels.inherited style rules')},
+ FOR("section", "$inherited",
+ H1({"class": "cssInheritHeader groupHeader focusRow", role : 'listitem' },
+ SPAN({"class": "cssInheritLabel"}, "$inheritLabel"),
+ TAG(FirebugReps.Element.shortTag, {object: "$section.element"})
+ ),
+ DIV({role : 'group'},
+ FOR("rule", "$section.rules",
+ TAG("$ruleTag", {rule: "$rule"})
+ )
+ )
+ )
+ )
+ ),
+
+ ruleTag:
+ isIE ?
+ // IE needs the sourceLink first, otherwise it will be rendered outside the panel
+ DIV({"class": "cssElementRuleContainer"},
+ TAG(FirebugReps.SourceLink.tag, {object: "$rule.sourceLink"}),
+ TAG(CSSStyleRuleTag.tag, {rule: "$rule"})
+ )
+ :
+ // other browsers need the sourceLink last, otherwise it will cause an extra space
+ // before the rule representation
+ DIV({"class": "cssElementRuleContainer"},
+ TAG(CSSStyleRuleTag.tag, {rule: "$rule"}),
+ TAG(FirebugReps.SourceLink.tag, {object: "$rule.sourceLink"})
+ )
+ }),
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+ updateCascadeView: function(element)
+ {
+ //dispatch([Firebug.A11yModel], 'onBeforeCSSRulesAdded', [this]);
+ var rules = [], sections = [], usedProps = {};
+ this.getInheritedRules(element, sections, usedProps);
+ this.getElementRules(element, rules, usedProps);
+
+ if (rules.length || sections.length)
+ {
+ var inheritLabel = "Inherited from"; // $STR("InheritedFrom");
+ var result = this.template.cascadedTag.replace({rules: rules, inherited: sections,
+ inheritLabel: inheritLabel}, this.panelNode);
+ //dispatch([Firebug.A11yModel], 'onCSSRulesAdded', [this, result]);
+ }
+ else
+ {
+ var result = FirebugReps.Warning.tag.replace({object: "EmptyElementCSS"}, this.panelNode);
+ //dispatch([Firebug.A11yModel], 'onCSSRulesAdded', [this, result]);
+ }
+
+ // TODO: xxxpedro remove when there the external resource problem is fixed
+ if (CssAnalyzer.hasExternalStyleSheet())
+ CssAnalyzer.externalStyleSheetWarning.tag.append({
+ object: "The results here may be inaccurate because some " +
+ "stylesheets could not be loaded due to access restrictions. ",
+ link: "more...",
+ href: "http://getfirebug.com/wiki/index.php/Firebug_Lite_FAQ#I_keep_seeing_.22This_element_has_no_style_rules.22"
+ }, this.panelNode);
+ },
+
+ getStylesheetURL: function(rule)
+ {
+ // if the parentStyleSheet.href is null, CSS std says its inline style.
+ // TODO: xxxpedro IE doesn't have rule.parentStyleSheet so we must fall back to the doc.location
+ if (rule && rule.parentStyleSheet && rule.parentStyleSheet.href)
+ return rule.parentStyleSheet.href;
+ else
+ return this.selection.ownerDocument.location.href;
+ },
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+ getInheritedRules: function(element, sections, usedProps)
+ {
+ var parent = element.parentNode;
+ if (parent && parent.nodeType == 1)
+ {
+ this.getInheritedRules(parent, sections, usedProps);
+
+ var rules = [];
+ this.getElementRules(parent, rules, usedProps, true);
+
+ if (rules.length)
+ sections.splice(0, 0, {element: parent, rules: rules});
+ }
+ },
+
+ getElementRules: function(element, rules, usedProps, inheritMode)
+ {
+ var inspectedRules, displayedRules = {};
+
+ inspectedRules = CssAnalyzer.getElementCSSRules(element);
+
+ if (inspectedRules)
+ {
+ for (var i = 0, length=inspectedRules.length; i < length; ++i)
+ {
+ var ruleId = inspectedRules[i];
+ var ruleData = CssAnalyzer.getRuleData(ruleId);
+ var rule = ruleData.rule;
+
+ var ssid = ruleData.styleSheetId;
+ var parentStyleSheet = StyleSheetCache.get(ssid);
+
+ var href = parentStyleSheet.externalURL ? parentStyleSheet.externalURL : parentStyleSheet.href; // Null means inline
+
+ var instance = null;
+ //var instance = getInstanceForStyleSheet(rule.parentStyleSheet, element.ownerDocument);
+
+ var isSystemSheet = false;
+ //var isSystemSheet = isSystemStyleSheet(rule.parentStyleSheet);
+
+ if (!Firebug.showUserAgentCSS && isSystemSheet) // This removes user agent rules
+ continue;
+
+ if (!href)
+ href = element.ownerDocument.location.href; // http://code.google.com/p/fbug/issues/detail?id=452
+
+ var props = this.getRuleProperties(this.context, rule, inheritMode);
+ if (inheritMode && !props.length)
+ continue;
+
+ //
+ //var line = domUtils.getRuleLine(rule);
+ // TODO: xxxpedro CSS line number
+ var line = ruleData.lineNo;
+
+ var ruleId = rule.selectorText+"/"+line;
+ var sourceLink = new SourceLink(href, line, "css", rule, instance);
+
+ this.markOverridenProps(props, usedProps, inheritMode);
+
+ rules.splice(0, 0, {rule: rule, id: ruleId,
+ selector: ruleData.selector, sourceLink: sourceLink,
+ props: props, inherited: inheritMode,
+ isSystemSheet: isSystemSheet});
+ }
+ }
+
+ if (element.style)
+ this.getStyleProperties(element, rules, usedProps, inheritMode);
+
+ if (FBTrace.DBG_CSS)
+ FBTrace.sysout("getElementRules "+rules.length+" rules for "+getElementXPath(element), rules);
+ },
+ /*
+ getElementRules: function(element, rules, usedProps, inheritMode)
+ {
+ var inspectedRules, displayedRules = {};
+ try
+ {
+ inspectedRules = domUtils ? domUtils.getCSSStyleRules(element) : null;
+ } catch (exc) {}
+
+ if (inspectedRules)
+ {
+ for (var i = 0; i < inspectedRules.Count(); ++i)
+ {
+ var rule = QI(inspectedRules.GetElementAt(i), nsIDOMCSSStyleRule);
+
+ var href = rule.parentStyleSheet.href; // Null means inline
+
+ var instance = getInstanceForStyleSheet(rule.parentStyleSheet, element.ownerDocument);
+
+ var isSystemSheet = isSystemStyleSheet(rule.parentStyleSheet);
+ if (!Firebug.showUserAgentCSS && isSystemSheet) // This removes user agent rules
+ continue;
+ if (!href)
+ href = element.ownerDocument.location.href; // http://code.google.com/p/fbug/issues/detail?id=452
+
+ var props = this.getRuleProperties(this.context, rule, inheritMode);
+ if (inheritMode && !props.length)
+ continue;
+
+ var line = domUtils.getRuleLine(rule);
+ var ruleId = rule.selectorText+"/"+line;
+ var sourceLink = new SourceLink(href, line, "css", rule, instance);
+
+ this.markOverridenProps(props, usedProps, inheritMode);
+
+ rules.splice(0, 0, {rule: rule, id: ruleId,
+ selector: rule.selectorText, sourceLink: sourceLink,
+ props: props, inherited: inheritMode,
+ isSystemSheet: isSystemSheet});
+ }
+ }
+
+ if (element.style)
+ this.getStyleProperties(element, rules, usedProps, inheritMode);
+
+ if (FBTrace.DBG_CSS)
+ FBTrace.sysout("getElementRules "+rules.length+" rules for "+getElementXPath(element), rules);
+ },
+ /**/
+ markOverridenProps: function(props, usedProps, inheritMode)
+ {
+ for (var i = 0; i < props.length; ++i)
+ {
+ var prop = props[i];
+ if ( usedProps.hasOwnProperty(prop.name) )
+ {
+ var deadProps = usedProps[prop.name]; // all previous occurrences of this property
+ for (var j = 0; j < deadProps.length; ++j)
+ {
+ var deadProp = deadProps[j];
+ if (!deadProp.disabled && !deadProp.wasInherited && deadProp.important && !prop.important)
+ prop.overridden = true; // new occurrence overridden
+ else if (!prop.disabled)
+ deadProp.overridden = true; // previous occurrences overridden
+ }
+ }
+ else
+ usedProps[prop.name] = [];
+
+ prop.wasInherited = inheritMode ? true : false;
+ usedProps[prop.name].push(prop); // all occurrences of a property seen so far, by name
+ }
+ },
+
+ getStyleProperties: function(element, rules, usedProps, inheritMode)
+ {
+ var props = this.parseCSSProps(element.style, inheritMode);
+ this.addOldProperties(this.context, getElementXPath(element), inheritMode, props);
+
+ sortProperties(props);
+ this.markOverridenProps(props, usedProps, inheritMode);
+
+ if (props.length)
+ rules.splice(0, 0,
+ {rule: element, id: getElementXPath(element),
+ selector: "element.style", props: props, inherited: inheritMode});
+ },
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ // extends Panel
+
+ name: "css",
+ title: "Style",
+ parentPanel: "HTML",
+ order: 0,
+
+ initialize: function()
+ {
+ this.context = Firebug.chrome; // TODO: xxxpedro css2
+ this.document = Firebug.chrome.document; // TODO: xxxpedro css2
+
+ Firebug.CSSStyleSheetPanel.prototype.initialize.apply(this, arguments);
+
+ // TODO: xxxpedro css2
+ var selection = ElementCache.get(Firebug.context.persistedState.selectedHTMLElementId);
+ if (selection)
+ this.select(selection, true);
+
+ //this.updateCascadeView(document.getElementsByTagName("h1")[0]);
+ //this.updateCascadeView(document.getElementById("build"));
+
+ /*
+ this.onStateChange = bindFixed(this.contentStateCheck, this);
+ this.onHoverChange = bindFixed(this.contentStateCheck, this, STATE_HOVER);
+ this.onActiveChange = bindFixed(this.contentStateCheck, this, STATE_ACTIVE);
+ /**/
+ },
+
+ ishow: function(state)
+ {
+ },
+
+ watchWindow: function(win)
+ {
+ if (domUtils)
+ {
+ // Normally these would not be required, but in order to update after the state is set
+ // using the options menu we need to monitor these global events as well
+ var doc = win.document;
+ ///addEvent(doc, "mouseover", this.onHoverChange);
+ ///addEvent(doc, "mousedown", this.onActiveChange);
+ }
+ },
+ unwatchWindow: function(win)
+ {
+ var doc = win.document;
+ ///removeEvent(doc, "mouseover", this.onHoverChange);
+ ///removeEvent(doc, "mousedown", this.onActiveChange);
+
+ if (isAncestor(this.stateChangeEl, doc))
+ {
+ this.removeStateChangeHandlers();
+ }
+ },
+
+ supportsObject: function(object)
+ {
+ return object instanceof Element ? 1 : 0;
+ },
+
+ updateView: function(element)
+ {
+ this.updateCascadeView(element);
+ if (domUtils)
+ {
+ this.contentState = safeGetContentState(element);
+ this.addStateChangeHandlers(element);
+ }
+ },
+
+ updateSelection: function(element)
+ {
+ if ( !instanceOf(element , "Element") ) // html supports SourceLink
+ return;
+
+ if (sothinkInstalled)
+ {
+ FirebugReps.Warning.tag.replace({object: "SothinkWarning"}, this.panelNode);
+ return;
+ }
+
+ /*
+ if (!domUtils)
+ {
+ FirebugReps.Warning.tag.replace({object: "DOMInspectorWarning"}, this.panelNode);
+ return;
+ }
+ /**/
+
+ if (!element)
+ return;
+
+ this.updateView(element);
+ },
+
+ updateOption: function(name, value)
+ {
+ if (name == "showUserAgentCSS" || name == "expandShorthandProps")
+ this.refresh();
+ },
+
+ getOptionsMenuItems: function()
+ {
+ var ret = [
+ {label: "Show User Agent CSS", type: "checkbox", checked: Firebug.showUserAgentCSS,
+ command: bindFixed(Firebug.togglePref, Firebug, "showUserAgentCSS") },
+ {label: "Expand Shorthand Properties", type: "checkbox", checked: Firebug.expandShorthandProps,
+ command: bindFixed(Firebug.togglePref, Firebug, "expandShorthandProps") }
+ ];
+ if (domUtils && this.selection)
+ {
+ var state = safeGetContentState(this.selection);
+
+ ret.push("-");
+ ret.push({label: ":active", type: "checkbox", checked: state & STATE_ACTIVE,
+ command: bindFixed(this.updateContentState, this, STATE_ACTIVE, state & STATE_ACTIVE)});
+ ret.push({label: ":hover", type: "checkbox", checked: state & STATE_HOVER,
+ command: bindFixed(this.updateContentState, this, STATE_HOVER, state & STATE_HOVER)});
+ }
+ return ret;
+ },
+
+ updateContentState: function(state, remove)
+ {
+ domUtils.setContentState(remove ? this.selection.ownerDocument.documentElement : this.selection, state);
+ this.refresh();
+ },
+
+ addStateChangeHandlers: function(el)
+ {
+ this.removeStateChangeHandlers();
+
+ /*
+ addEvent(el, "focus", this.onStateChange);
+ addEvent(el, "blur", this.onStateChange);
+ addEvent(el, "mouseup", this.onStateChange);
+ addEvent(el, "mousedown", this.onStateChange);
+ addEvent(el, "mouseover", this.onStateChange);
+ addEvent(el, "mouseout", this.onStateChange);
+ /**/
+
+ this.stateChangeEl = el;
+ },
+
+ removeStateChangeHandlers: function()
+ {
+ var sel = this.stateChangeEl;
+ if (sel)
+ {
+ /*
+ removeEvent(sel, "focus", this.onStateChange);
+ removeEvent(sel, "blur", this.onStateChange);
+ removeEvent(sel, "mouseup", this.onStateChange);
+ removeEvent(sel, "mousedown", this.onStateChange);
+ removeEvent(sel, "mouseover", this.onStateChange);
+ removeEvent(sel, "mouseout", this.onStateChange);
+ /**/
+ }
+ },
+
+ contentStateCheck: function(state)
+ {
+ if (!state || this.contentState & state)
+ {
+ var timeoutRunner = bindFixed(function()
+ {
+ var newState = safeGetContentState(this.selection);
+ if (newState != this.contentState)
+ {
+ this.context.invalidatePanels(this.name);
+ }
+ }, this);
+
+ // Delay exec until after the event has processed and the state has been updated
+ setTimeout(timeoutRunner, 0);
+ }
+ }
+});
+
+function safeGetContentState(selection)
+{
+ try
+ {
+ return domUtils.getContentState(selection);
+ }
+ catch (e)
+ {
+ if (FBTrace.DBG_ERRORS)
+ FBTrace.sysout("css.safeGetContentState; EXCEPTION", e);
+ }
+}
+
+// ************************************************************************************************
+
+function CSSComputedElementPanel() {}
+
+CSSComputedElementPanel.prototype = extend(CSSElementPanel.prototype,
+{
+ template: domplate(
+ {
+ computedTag:
+ DIV({"class": "a11yCSSView", role : "list", "aria-label" : $STR('aria.labels.computed styles')},
+ FOR("group", "$groups",
+ H1({"class": "cssInheritHeader groupHeader focusRow", role : "listitem"},
+ SPAN({"class": "cssInheritLabel"}, "$group.title")
+ ),
+ TABLE({width: "100%", role : 'group'},
+ TBODY({role : 'presentation'},
+ FOR("prop", "$group.props",
+ TR({"class": 'focusRow computedStyleRow', role : 'listitem'},
+ TD({"class": "stylePropName", role : 'presentation'}, "$prop.name"),
+ TD({"class": "stylePropValue", role : 'presentation'}, "$prop.value")
+ )
+ )
+ )
+ )
+ )
+ )
+ }),
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+ updateComputedView: function(element)
+ {
+ var win = isIE ?
+ element.ownerDocument.parentWindow :
+ element.ownerDocument.defaultView;
+
+ var style = isIE ?
+ element.currentStyle :
+ win.getComputedStyle(element, "");
+
+ var groups = [];
+
+ for (var groupName in styleGroups)
+ {
+ // TODO: xxxpedro i18n $STR
+ //var title = $STR("StyleGroup-" + groupName);
+ var title = styleGroupTitles[groupName];
+ var group = {title: title, props: []};
+ groups.push(group);
+
+ var props = styleGroups[groupName];
+ for (var i = 0; i < props.length; ++i)
+ {
+ var propName = props[i];
+ var propValue = style.getPropertyValue ?
+ style.getPropertyValue(propName) :
+ ""+style[toCamelCase(propName)];
+
+ if (propValue === undefined || propValue === null)
+ continue;
+
+ propValue = stripUnits(rgbToHex(propValue));
+ if (propValue)
+ group.props.push({name: propName, value: propValue});
+ }
+ }
+
+ var result = this.template.computedTag.replace({groups: groups}, this.panelNode);
+ //dispatch([Firebug.A11yModel], 'onCSSRulesAdded', [this, result]);
+ },
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ // extends Panel
+
+ name: "computed",
+ title: "Computed",
+ parentPanel: "HTML",
+ order: 1,
+
+ updateView: function(element)
+ {
+ this.updateComputedView(element);
+ },
+
+ getOptionsMenuItems: function()
+ {
+ return [
+ {label: "Refresh", command: bind(this.refresh, this) }
+ ];
+ }
+});
+
+// ************************************************************************************************
+// CSSEditor
+
+function CSSEditor(doc)
+{
+ this.initializeInline(doc);
+}
+
+CSSEditor.prototype = domplate(Firebug.InlineEditor.prototype,
+{
+ insertNewRow: function(target, insertWhere)
+ {
+ var rule = Firebug.getRepObject(target);
+ var emptyProp =
+ {
+ // TODO: xxxpedro - uses charCode(255) to force the element being rendered,
+ // allowing webkit to get the correct position of the property name "span",
+ // when inserting a new CSS rule?
+ name: "",
+ value: "",
+ important: ""
+ };
+
+ if (insertWhere == "before")
+ return CSSPropTag.tag.insertBefore({prop: emptyProp, rule: rule}, target);
+ else
+ return CSSPropTag.tag.insertAfter({prop: emptyProp, rule: rule}, target);
+ },
+
+ saveEdit: function(target, value, previousValue)
+ {
+ // We need to check the value first in order to avoid a problem in IE8
+ // See Issue 3038: Empty (null) styles when adding CSS styles in Firebug Lite
+ if (!value) return;
+
+ target.innerHTML = escapeForCss(value);
+
+ var row = getAncestorByClass(target, "cssProp");
+ if (hasClass(row, "disabledStyle"))
+ toggleClass(row, "disabledStyle");
+
+ var rule = Firebug.getRepObject(target);
+
+ if (hasClass(target, "cssPropName"))
+ {
+ if (value && previousValue != value) // name of property has changed.
+ {
+ var propValue = getChildByClass(row, "cssPropValue")[textContent];
+ var parsedValue = parsePriority(propValue);
+
+ if (propValue && propValue != "undefined") {
+ if (FBTrace.DBG_CSS)
+ FBTrace.sysout("CSSEditor.saveEdit : "+previousValue+"->"+value+" = "+propValue+"\n");
+ if (previousValue)
+ Firebug.CSSModule.removeProperty(rule, previousValue);
+ Firebug.CSSModule.setProperty(rule, value, parsedValue.value, parsedValue.priority);
+ }
+ }
+ else if (!value) // name of the property has been deleted, so remove the property.
+ Firebug.CSSModule.removeProperty(rule, previousValue);
+ }
+ else if (getAncestorByClass(target, "cssPropValue"))
+ {
+ var propName = getChildByClass(row, "cssPropName")[textContent];
+ var propValue = getChildByClass(row, "cssPropValue")[textContent];
+
+ if (FBTrace.DBG_CSS)
+ {
+ FBTrace.sysout("CSSEditor.saveEdit propName=propValue: "+propName +" = "+propValue+"\n");
+ // FBTrace.sysout("CSSEditor.saveEdit BEFORE style:",style);
+ }
+
+ if (value && value != "null")
+ {
+ var parsedValue = parsePriority(value);
+ Firebug.CSSModule.setProperty(rule, propName, parsedValue.value, parsedValue.priority);
+ }
+ else if (previousValue && previousValue != "null")
+ Firebug.CSSModule.removeProperty(rule, propName);
+ }
+
+ this.panel.markChange(this.panel.name == "stylesheet");
+ },
+
+ advanceToNext: function(target, charCode)
+ {
+ if (charCode == 58 /*":"*/ && hasClass(target, "cssPropName"))
+ return true;
+ },
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+ getAutoCompleteRange: function(value, offset)
+ {
+ if (hasClass(this.target, "cssPropName"))
+ return {start: 0, end: value.length-1};
+ else
+ return parseCSSValue(value, offset);
+ },
+
+ getAutoCompleteList: function(preExpr, expr, postExpr)
+ {
+ if (hasClass(this.target, "cssPropName"))
+ {
+ return getCSSPropertyNames();
+ }
+ else
+ {
+ var row = getAncestorByClass(this.target, "cssProp");
+ var propName = getChildByClass(row, "cssPropName")[textContent];
+ return getCSSKeywordsByProperty(propName);
+ }
+ }
+});
+
+//************************************************************************************************
+//CSSRuleEditor
+
+function CSSRuleEditor(doc)
+{
+ this.initializeInline(doc);
+ this.completeAsYouType = false;
+}
+CSSRuleEditor.uniquifier = 0;
+CSSRuleEditor.prototype = domplate(Firebug.InlineEditor.prototype,
+{
+ insertNewRow: function(target, insertWhere)
+ {
+ var emptyRule = {
+ selector: "",
+ id: "",
+ props: [],
+ isSelectorEditable: true
+ };
+
+ if (insertWhere == "before")
+ return CSSStyleRuleTag.tag.insertBefore({rule: emptyRule}, target);
+ else
+ return CSSStyleRuleTag.tag.insertAfter({rule: emptyRule}, target);
+ },
+
+ saveEdit: function(target, value, previousValue)
+ {
+ if (FBTrace.DBG_CSS)
+ FBTrace.sysout("CSSRuleEditor.saveEdit: '" + value + "' '" + previousValue + "'", target);
+
+ target.innerHTML = escapeForCss(value);
+
+ if (value === previousValue) return;
+
+ var row = getAncestorByClass(target, "cssRule");
+ var styleSheet = this.panel.location;
+ styleSheet = styleSheet.editStyleSheet ? styleSheet.editStyleSheet.sheet : styleSheet;
+
+ var cssRules = styleSheet.cssRules;
+ var rule = Firebug.getRepObject(target), oldRule = rule;
+ var ruleIndex = cssRules.length;
+ if (rule || Firebug.getRepObject(row.nextSibling))
+ {
+ var searchRule = rule || Firebug.getRepObject(row.nextSibling);
+ for (ruleIndex=0; ruleIndex<cssRules.length && searchRule!=cssRules[ruleIndex]; ruleIndex++) {}
+ }
+
+ // Delete in all cases except for new add
+ // We want to do this before the insert to ease change tracking
+ if (oldRule)
+ {
+ Firebug.CSSModule.deleteRule(styleSheet, ruleIndex);
+ }
+
+ // Firefox does not follow the spec for the update selector text case.
+ // When attempting to update the value, firefox will silently fail.
+ // See https://bugzilla.mozilla.org/show_bug.cgi?id=37468 for the quite
+ // old discussion of this bug.
+ // As a result we need to recreate the style every time the selector
+ // changes.
+ if (value)
+ {
+ var cssText = [ value, "{" ];
+ var props = row.getElementsByClassName("cssProp");
+ for (var i = 0; i < props.length; i++) {
+ var propEl = props[i];
+ if (!hasClass(propEl, "disabledStyle")) {
+ cssText.push(getChildByClass(propEl, "cssPropName")[textContent]);
+ cssText.push(":");
+ cssText.push(getChildByClass(propEl, "cssPropValue")[textContent]);
+ cssText.push(";");
+ }
+ }
+ cssText.push("}");
+ cssText = cssText.join("");
+
+ try
+ {
+ var insertLoc = Firebug.CSSModule.insertRule(styleSheet, cssText, ruleIndex);
+ rule = cssRules[insertLoc];
+ ruleIndex++;
+ }
+ catch (err)
+ {
+ if (FBTrace.DBG_CSS || FBTrace.DBG_ERRORS)
+ FBTrace.sysout("CSS Insert Error: "+err, err);
+
+ target.innerHTML = escapeForCss(previousValue);
+ row.repObject = undefined;
+ return;
+ }
+ } else {
+ rule = undefined;
+ }
+
+ // Update the rep object
+ row.repObject = rule;
+ if (!oldRule)
+ {
+ // Who knows what the domutils will return for rule line
+ // for a recently created rule. To be safe we just generate
+ // a unique value as this is only used as an internal key.
+ var ruleId = "new/"+value+"/"+(++CSSRuleEditor.uniquifier);
+ row.setAttribute("ruleId", ruleId);
+ }
+
+ this.panel.markChange(this.panel.name == "stylesheet");
+ }
+});
+
+// ************************************************************************************************
+// StyleSheetEditor
+
+function StyleSheetEditor(doc)
+{
+ this.box = this.tag.replace({}, doc, this);
+ this.input = this.box.firstChild;
+}
+
+StyleSheetEditor.prototype = domplate(Firebug.BaseEditor,
+{
+ multiLine: true,
+
+ tag: DIV(
+ TEXTAREA({"class": "styleSheetEditor fullPanelEditor", oninput: "$onInput"})
+ ),
+
+ getValue: function()
+ {
+ return this.input.value;
+ },
+
+ setValue: function(value)
+ {
+ return this.input.value = value;
+ },
+
+ show: function(target, panel, value, textSize, targetSize)
+ {
+ this.target = target;
+ this.panel = panel;
+
+ this.panel.panelNode.appendChild(this.box);
+
+ this.input.value = value;
+ this.input.focus();
+
+ var command = Firebug.chrome.$("cmd_toggleCSSEditing");
+ command.setAttribute("checked", true);
+ },
+
+ hide: function()
+ {
+ var command = Firebug.chrome.$("cmd_toggleCSSEditing");
+ command.setAttribute("checked", false);
+
+ if (this.box.parentNode == this.panel.panelNode)
+ this.panel.panelNode.removeChild(this.box);
+
+ delete this.target;
+ delete this.panel;
+ delete this.styleSheet;
+ },
+
+ saveEdit: function(target, value, previousValue)
+ {
+ Firebug.CSSModule.freeEdit(this.styleSheet, value);
+ },
+
+ endEditing: function()
+ {
+ this.panel.refresh();
+ return true;
+ },
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+ onInput: function()
+ {
+ Firebug.Editor.update();
+ },
+
+ scrollToLine: function(line, offset)
+ {
+ this.startMeasuring(this.input);
+ var lineHeight = this.measureText().height;
+ this.stopMeasuring();
+
+ this.input.scrollTop = (line * lineHeight) + offset;
+ }
+});
+
+// ************************************************************************************************
+// Local Helpers
+
+var rgbToHex = function rgbToHex(value)
+{
+ return value.replace(/\brgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)/gi, rgbToHexReplacer);
+};
+
+var rgbToHexReplacer = function(_, r, g, b) {
+ return '#' + ((1 << 24) + (r << 16) + (g << 8) + (b << 0)).toString(16).substr(-6).toUpperCase();
+};
+
+var stripUnits = function stripUnits(value)
+{
+ // remove units from '0px', '0em' etc. leave non-zero units in-tact.
+ return value.replace(/(url\(.*?\)|[^0]\S*\s*)|0(%|em|ex|px|in|cm|mm|pt|pc)(\s|$)/gi, stripUnitsReplacer);
+};
+
+var stripUnitsReplacer = function(_, skip, remove, whitespace) {
+ return skip || ('0' + whitespace);
+};
+
+function parsePriority(value)
+{
+ var rePriority = /(.*?)\s*(!important)?$/;
+ var m = rePriority.exec(value);
+ var propValue = m ? m[1] : "";
+ var priority = m && m[2] ? "important" : "";
+ return {value: propValue, priority: priority};
+}
+
+function parseURLValue(value)
+{
+ var m = reURL.exec(value);
+ return m ? m[1] : "";
+}
+
+function parseRepeatValue(value)
+{
+ var m = reRepeat.exec(value);
+ return m ? m[0] : "";
+}
+
+function parseCSSValue(value, offset)
+{
+ var start = 0;
+ var m;
+ while (1)
+ {
+ m = reSplitCSS.exec(value);
+ if (m && m.index+m[0].length < offset)
+ {
+ value = value.substr(m.index+m[0].length);
+ start += m.index+m[0].length;
+ offset -= m.index+m[0].length;
+ }
+ else
+ break;
+ }
+
+ if (m)
+ {
+ var type;
+ if (m[1])
+ type = "url";
+ else if (m[2] || m[3])
+ type = "rgb";
+ else if (m[4])
+ type = "int";
+
+ return {value: m[0], start: start+m.index, end: start+m.index+(m[0].length-1), type: type};
+ }
+}
+
+function findPropByName(props, name)
+{
+ for (var i = 0; i < props.length; ++i)
+ {
+ if (props[i].name == name)
+ return i;
+ }
+}
+
+function sortProperties(props)
+{
+ props.sort(function(a, b)
+ {
+ return a.name > b.name ? 1 : -1;
+ });
+}
+
+function getTopmostRuleLine(panelNode)
+{
+ for (var child = panelNode.firstChild; child; child = child.nextSibling)
+ {
+ if (child.offsetTop+child.offsetHeight > panelNode.scrollTop)
+ {
+ var rule = child.repObject;
+ if (rule)
+ return {
+ line: domUtils.getRuleLine(rule),
+ offset: panelNode.scrollTop-child.offsetTop
+ };
+ }
+ }
+ return 0;
+}
+
+function getStyleSheetCSS(sheet, context)
+{
+ if (sheet.ownerNode instanceof HTMLStyleElement)
+ return sheet.ownerNode.innerHTML;
+ else
+ return context.sourceCache.load(sheet.href).join("");
+}
+
+function getStyleSheetOwnerNode(sheet) {
+ for (; sheet && !sheet.ownerNode; sheet = sheet.parentStyleSheet);
+
+ return sheet.ownerNode;
+}
+
+function scrollSelectionIntoView(panel)
+{
+ var selCon = getSelectionController(panel);
+ selCon.scrollSelectionIntoView(
+ nsISelectionController.SELECTION_NORMAL,
+ nsISelectionController.SELECTION_FOCUS_REGION, true);
+}
+
+function getSelectionController(panel)
+{
+ var browser = Firebug.chrome.getPanelBrowser(panel);
+ return browser.docShell.QueryInterface(nsIInterfaceRequestor)
+ .getInterface(nsISelectionDisplay)
+ .QueryInterface(nsISelectionController);
+}
+
+// ************************************************************************************************
+
+Firebug.registerModule(Firebug.CSSModule);
+Firebug.registerPanel(Firebug.CSSStyleSheetPanel);
+Firebug.registerPanel(CSSElementPanel);
+Firebug.registerPanel(CSSComputedElementPanel);
+
+// ************************************************************************************************
+
+}});
+
+
+/* See license.txt for terms of usage */
+
+FBL.ns(function() { with (FBL) {
+// ************************************************************************************************
+
+// ************************************************************************************************
+// Script Module
+
+Firebug.Script = extend(Firebug.Module,
+{
+ getPanel: function()
+ {
+ return Firebug.chrome ? Firebug.chrome.getPanel("Script") : null;
+ },
+
+ selectSourceCode: function(index)
+ {
+ this.getPanel().selectSourceCode(index);
+ }
+});
+
+Firebug.registerModule(Firebug.Script);
+
+
+// ************************************************************************************************
+// Script Panel
+
+function ScriptPanel(){};
+
+ScriptPanel.prototype = extend(Firebug.Panel,
+{
+ name: "Script",
+ title: "Script",
+
+ selectIndex: 0, // index of the current selectNode's option
+ sourceIndex: -1, // index of the script node, based in doc.getElementsByTagName("script")
+
+ options: {
+ hasToolButtons: true
+ },
+
+ create: function()
+ {
+ Firebug.Panel.create.apply(this, arguments);
+
+ this.onChangeSelect = bind(this.onChangeSelect, this);
+
+ var doc = Firebug.browser.document;
+ var scripts = doc.getElementsByTagName("script");
+ var selectNode = this.selectNode = createElement("select");
+
+ for(var i=0, script; script=scripts[i]; i++)
+ {
+ // Don't show Firebug Lite source code in the list of options
+ if (Firebug.ignoreFirebugElements && script.getAttribute("firebugIgnore"))
+ continue;
+
+ var fileName = getFileName(script.src) || getFileName(doc.location.href);
+ var option = createElement("option", {value:i});
+
+ option.appendChild(Firebug.chrome.document.createTextNode(fileName));
+ selectNode.appendChild(option);
+ };
+
+ this.toolButtonsNode.appendChild(selectNode);
+ },
+
+ initialize: function()
+ {
+ // we must render the code first, so the persistent state can be restore
+ this.selectSourceCode(this.selectIndex);
+
+ Firebug.Panel.initialize.apply(this, arguments);
+
+ addEvent(this.selectNode, "change", this.onChangeSelect);
+ },
+
+ shutdown: function()
+ {
+ removeEvent(this.selectNode, "change", this.onChangeSelect);
+
+ Firebug.Panel.shutdown.apply(this, arguments);
+ },
+
+ detach: function(oldChrome, newChrome)
+ {
+ Firebug.Panel.detach.apply(this, arguments);
+
+ var oldPanel = oldChrome.getPanel("Script");
+ var index = oldPanel.selectIndex;
+
+ this.selectNode.selectedIndex = index;
+ this.selectIndex = index;
+ this.sourceIndex = -1;
+ },
+
+ onChangeSelect: function(event)
+ {
+ var select = this.selectNode;
+
+ this.selectIndex = select.selectedIndex;
+
+ var option = select.options[select.selectedIndex];
+ if (!option)
+ return;
+
+ var selectedSourceIndex = parseInt(option.value);
+
+ this.renderSourceCode(selectedSourceIndex);
+ },
+
+ selectSourceCode: function(index)
+ {
+ var select = this.selectNode;
+ select.selectedIndex = index;
+
+ var option = select.options[index];
+ if (!option)
+ return;
+
+ var selectedSourceIndex = parseInt(option.value);
+
+ this.renderSourceCode(selectedSourceIndex);
+ },
+
+ renderSourceCode: function(index)
+ {
+ if (this.sourceIndex != index)
+ {
+ var renderProcess = function renderProcess(src)
+ {
+ var html = [],
+ hl = 0;
+
+ src = isIE && !isExternal ?
+ src+'\n' : // IE put an extra line when reading source of local resources
+ '\n'+src;
+
+ // find the number of lines of code
+ src = src.replace(/\n\r|\r\n/g, "\n");
+ var match = src.match(/[\n]/g);
+ var lines=match ? match.length : 0;
+
+ // render the full source code + line numbers html
+ html[hl++] = '<div><div class="sourceBox" style="left:';
+ html[hl++] = 35 + 7*(lines+'').length;
+ html[hl++] = 'px;"><pre class="sourceCode">';
+ html[hl++] = escapeHTML(src);
+ html[hl++] = '</pre></div><div class="lineNo">';
+
+ // render the line number divs
+ for(var l=1, lines; l<=lines; l++)
+ {
+ html[hl++] = '<div line="';
+ html[hl++] = l;
+ html[hl++] = '">';
+ html[hl++] = l;
+ html[hl++] = '</div>';
+ }
+
+ html[hl++] = '</div></div>';
+
+ updatePanel(html);
+ };
+
+ var updatePanel = function(html)
+ {
+ self.panelNode.innerHTML = html.join("");
+
+ // IE needs this timeout, otherwise the panel won't scroll
+ setTimeout(function(){
+ self.synchronizeUI();
+ },0);
+ };
+
+ var onFailure = function()
+ {
+ FirebugReps.Warning.tag.replace({object: "AccessRestricted"}, self.panelNode);
+ };
+
+ var self = this;
+
+ var doc = Firebug.browser.document;
+ var script = doc.getElementsByTagName("script")[index];
+ var url = getScriptURL(script);
+ var isExternal = url && url != doc.location.href;
+
+ try
+ {
+ if (Firebug.disableResourceFetching)
+ {
+ renderProcess(Firebug.Lite.Proxy.fetchResourceDisabledMessage);
+ }
+ else if (isExternal)
+ {
+ Ajax.request({url: url, onSuccess: renderProcess, onFailure: onFailure});
+ }
+ else
+ {
+ var src = script.innerHTML;
+ renderProcess(src);
+ }
+ }
+ catch(e)
+ {
+ onFailure();
+ }
+
+ this.sourceIndex = index;
+ }
+ }
+});
+
+Firebug.registerPanel(ScriptPanel);
+
+
+// ************************************************************************************************
+
+
+var getScriptURL = function getScriptURL(script)
+{
+ var reFile = /([^\/\?#]+)(#.+)?$/;
+ var rePath = /^(.*\/)/;
+ var reProtocol = /^\w+:\/\//;
+ var path = null;
+ var doc = Firebug.browser.document;
+
+ var file = reFile.exec(script.src);
+
+ if (file)
+ {
+ var fileName = file[1];
+ var fileOptions = file[2];
+
+ // absolute path
+ if (reProtocol.test(script.src)) {
+ path = rePath.exec(script.src)[1];
+
+ }
+ // relative path
+ else
+ {
+ var r = rePath.exec(script.src);
+ var src = r ? r[1] : script.src;
+ var backDir = /^((?:\.\.\/)+)(.*)/.exec(src);
+ var reLastDir = /^(.*\/)[^\/]+\/$/;
+ path = rePath.exec(doc.location.href)[1];
+
+ // "../some/path"
+ if (backDir)
+ {
+ var j = backDir[1].length/3;
+ var p;
+ while (j-- > 0)
+ path = reLastDir.exec(path)[1];
+
+ path += backDir[2];
+ }
+
+ else if(src.indexOf("/") != -1)
+ {
+ // "./some/path"
+ if(/^\.\/./.test(src))
+ {
+ path += src.substring(2);
+ }
+ // "/some/path"
+ else if(/^\/./.test(src))
+ {
+ var domain = /^(\w+:\/\/[^\/]+)/.exec(path);
+ path = domain[1] + src;
+ }
+ // "some/path"
+ else
+ {
+ path += src;
+ }
+ }
+ }
+ }
+
+ var m = path && path.match(/([^\/]+)\/$/) || null;
+
+ if (path && m)
+ {
+ return path + fileName;
+ }
+};
+
+var getFileName = function getFileName(path)
+{
+ if (!path) return "";
+
+ var match = path && path.match(/[^\/]+(\?.*)?(#.*)?$/);
+
+ return match && match[0] || path;
+};
+
+
+// ************************************************************************************************
+}});
+
+/* See license.txt for terms of usage */
+
+FBL.ns(function() { with (FBL) {
+// ************************************************************************************************
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+var ElementCache = Firebug.Lite.Cache.Element;
+
+var insertSliceSize = 18;
+var insertInterval = 40;
+
+var ignoreVars =
+{
+ "__firebug__": 1,
+ "eval": 1,
+
+ // We are forced to ignore Java-related variables, because
+ // trying to access them causes browser freeze
+ "java": 1,
+ "sun": 1,
+ "Packages": 1,
+ "JavaArray": 1,
+ "JavaMember": 1,
+ "JavaObject": 1,
+ "JavaClass": 1,
+ "JavaPackage": 1,
+ "_firebug": 1,
+ "_FirebugConsole": 1,
+ "_FirebugCommandLine": 1
+};
+
+if (Firebug.ignoreFirebugElements)
+ ignoreVars[Firebug.Lite.Cache.ID] = 1;
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+var memberPanelRep =
+ isIE6 ?
+ {"class": "memberLabel $member.type\\Label", href: "javacript:void(0)"}
+ :
+ {"class": "memberLabel $member.type\\Label"};
+
+var RowTag =
+ TR({"class": "memberRow $member.open $member.type\\Row", $hasChildren: "$member.hasChildren", role : 'presentation',
+ level: "$member.level"},
+ TD({"class": "memberLabelCell", style: "padding-left: $member.indent\\px", role : 'presentation'},
+ A(memberPanelRep,
+ SPAN({}, "$member.name")
+ )
+ ),
+ TD({"class": "memberValueCell", role : 'presentation'},
+ TAG("$member.tag", {object: "$member.value"})
+ )
+ );
+
+var WatchRowTag =
+ TR({"class": "watchNewRow", level: 0},
+ TD({"class": "watchEditCell", colspan: 2},
+ DIV({"class": "watchEditBox a11yFocusNoTab", role: "button", 'tabindex' : '0',
+ 'aria-label' : $STR('press enter to add new watch expression')},
+ $STR("NewWatch")
+ )
+ )
+ );
+
+var SizerRow =
+ TR({role : 'presentation'},
+ TD({width: "30%"}),
+ TD({width: "70%"})
+ );
+
+var domTableClass = isIElt8 ? "domTable domTableIE" : "domTable";
+var DirTablePlate = domplate(Firebug.Rep,
+{
+ tag:
+ TABLE({"class": domTableClass, cellpadding: 0, cellspacing: 0, onclick: "$onClick", role :"tree"},
+ TBODY({role: 'presentation'},
+ SizerRow,
+ FOR("member", "$object|memberIterator", RowTag)
+ )
+ ),
+
+ watchTag:
+ TABLE({"class": domTableClass, cellpadding: 0, cellspacing: 0,
+ _toggles: "$toggles", _domPanel: "$domPanel", onclick: "$onClick", role : 'tree'},
+ TBODY({role : 'presentation'},
+ SizerRow,
+ WatchRowTag
+ )
+ ),
+
+ tableTag:
+ TABLE({"class": domTableClass, cellpadding: 0, cellspacing: 0,
+ _toggles: "$toggles", _domPanel: "$domPanel", onclick: "$onClick", role : 'tree'},
+ TBODY({role : 'presentation'},
+ SizerRow
+ )
+ ),
+
+ rowTag:
+ FOR("member", "$members", RowTag),
+
+ memberIterator: function(object, level)
+ {
+ return getMembers(object, level);
+ },
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+ onClick: function(event)
+ {
+ if (!isLeftClick(event))
+ return;
+
+ var target = event.target || event.srcElement;
+
+ var row = getAncestorByClass(target, "memberRow");
+ var label = getAncestorByClass(target, "memberLabel");
+ if (label && hasClass(row, "hasChildren"))
+ {
+ var row = label.parentNode.parentNode;
+ this.toggleRow(row);
+ }
+ else
+ {
+ var object = Firebug.getRepObject(target);
+ if (typeof(object) == "function")
+ {
+ Firebug.chrome.select(object, "script");
+ cancelEvent(event);
+ }
+ else if (event.detail == 2 && !object)
+ {
+ var panel = row.parentNode.parentNode.domPanel;
+ if (panel)
+ {
+ var rowValue = panel.getRowPropertyValue(row);
+ if (typeof(rowValue) == "boolean")
+ panel.setPropertyValue(row, !rowValue);
+ else
+ panel.editProperty(row);
+
+ cancelEvent(event);
+ }
+ }
+ }
+
+ return false;
+ },
+
+ toggleRow: function(row)
+ {
+ var level = parseInt(row.getAttribute("level"));
+ var toggles = row.parentNode.parentNode.toggles;
+
+ if (hasClass(row, "opened"))
+ {
+ removeClass(row, "opened");
+
+ if (toggles)
+ {
+ var path = getPath(row);
+
+ // Remove the path from the toggle tree
+ for (var i = 0; i < path.length; ++i)
+ {
+ if (i == path.length-1)
+ delete toggles[path[i]];
+ else
+ toggles = toggles[path[i]];
+ }
+ }
+
+ var rowTag = this.rowTag;
+ var tbody = row.parentNode;
+
+ setTimeout(function()
+ {
+ for (var firstRow = row.nextSibling; firstRow; firstRow = row.nextSibling)
+ {
+ if (parseInt(firstRow.getAttribute("level")) <= level)
+ break;
+
+ tbody.removeChild(firstRow);
+ }
+ }, row.insertTimeout ? row.insertTimeout : 0);
+ }
+ else
+ {
+ setClass(row, "opened");
+
+ if (toggles)
+ {
+ var path = getPath(row);
+
+ // Mark the path in the toggle tree
+ for (var i = 0; i < path.length; ++i)
+ {
+ var name = path[i];
+ if (toggles.hasOwnProperty(name))
+ toggles = toggles[name];
+ else
+ toggles = toggles[name] = {};
+ }
+ }
+
+ var value = row.lastChild.firstChild.repObject;
+ var members = getMembers(value, level+1);
+
+ var rowTag = this.rowTag;
+ var lastRow = row;
+
+ var delay = 0;
+ //var setSize = members.length;
+ //var rowCount = 1;
+ while (members.length)
+ {
+ with({slice: members.splice(0, insertSliceSize), isLast: !members.length})
+ {
+ setTimeout(function()
+ {
+ if (lastRow.parentNode)
+ {
+ var result = rowTag.insertRows({members: slice}, lastRow);
+ lastRow = result[1];
+ //dispatch([Firebug.A11yModel], 'onMemberRowSliceAdded', [null, result, rowCount, setSize]);
+ //rowCount += insertSliceSize;
+ }
+ if (isLast)
+ row.removeAttribute("insertTimeout");
+ }, delay);
+ }
+
+ delay += insertInterval;
+ }
+
+ row.insertTimeout = delay;
+ }
+ }
+});
+
+
+
+// ************************************************************************************************
+
+Firebug.DOMBasePanel = function() {};
+
+Firebug.DOMBasePanel.prototype = extend(Firebug.Panel,
+{
+ tag: DirTablePlate.tableTag,
+
+ getRealObject: function(object)
+ {
+ // TODO: Move this to some global location
+ // TODO: Unwrapping should be centralized rather than sprinkling it around ad hoc.
+ // TODO: We might be able to make this check more authoritative with QueryInterface.
+ if (!object) return object;
+ if (object.wrappedJSObject) return object.wrappedJSObject;
+ return object;
+ },
+
+ rebuild: function(update, scrollTop)
+ {
+ //dispatch([Firebug.A11yModel], 'onBeforeDomUpdateSelection', [this]);
+ var members = getMembers(this.selection);
+ expandMembers(members, this.toggles, 0, 0);
+
+ this.showMembers(members, update, scrollTop);
+
+ //TODO: xxxpedro statusbar
+ if (!this.parentPanel)
+ updateStatusBar(this);
+ },
+
+ showMembers: function(members, update, scrollTop)
+ {
+ // If we are still in the midst of inserting rows, cancel all pending
+ // insertions here - this is a big speedup when stepping in the debugger
+ if (this.timeouts)
+ {
+ for (var i = 0; i < this.timeouts.length; ++i)
+ this.context.clearTimeout(this.timeouts[i]);
+ delete this.timeouts;
+ }
+
+ if (!members.length)
+ return this.showEmptyMembers();
+
+ var panelNode = this.panelNode;
+ var priorScrollTop = scrollTop == undefined ? panelNode.scrollTop : scrollTop;
+
+ // If we are asked to "update" the current view, then build the new table
+ // offscreen and swap it in when it's done
+ var offscreen = update && panelNode.firstChild;
+ var dest = offscreen ? panelNode.ownerDocument : panelNode;
+
+ var table = this.tag.replace({domPanel: this, toggles: this.toggles}, dest);
+ var tbody = table.lastChild;
+ var rowTag = DirTablePlate.rowTag;
+
+ // Insert the first slice immediately
+ //var slice = members.splice(0, insertSliceSize);
+ //var result = rowTag.insertRows({members: slice}, tbody.lastChild);
+
+ //var setSize = members.length;
+ //var rowCount = 1;
+
+ var panel = this;
+ var result;
+
+ //dispatch([Firebug.A11yModel], 'onMemberRowSliceAdded', [panel, result, rowCount, setSize]);
+ var timeouts = [];
+
+ var delay = 0;
+
+ // enable to measure rendering performance
+ var renderStart = new Date().getTime();
+ while (members.length)
+ {
+ with({slice: members.splice(0, insertSliceSize), isLast: !members.length})
+ {
+ timeouts.push(this.context.setTimeout(function()
+ {
+ // TODO: xxxpedro can this be a timing error related to the
+ // "iteration number" approach insted of "duration time"?
+ // avoid error in IE8
+ if (!tbody.lastChild) return;
+
+ result = rowTag.insertRows({members: slice}, tbody.lastChild);
+
+ //rowCount += insertSliceSize;
+ //dispatch([Firebug.A11yModel], 'onMemberRowSliceAdded', [panel, result, rowCount, setSize]);
+
+ if ((panelNode.scrollHeight+panelNode.offsetHeight) >= priorScrollTop)
+ panelNode.scrollTop = priorScrollTop;
+
+
+ // enable to measure rendering performance
+ //if (isLast) alert(new Date().getTime() - renderStart + "ms");
+
+
+ }, delay));
+
+ delay += insertInterval;
+ }
+ }
+
+ if (offscreen)
+ {
+ timeouts.push(this.context.setTimeout(function()
+ {
+ if (panelNode.firstChild)
+ panelNode.replaceChild(table, panelNode.firstChild);
+ else
+ panelNode.appendChild(table);
+
+ // Scroll back to where we were before
+ panelNode.scrollTop = priorScrollTop;
+ }, delay));
+ }
+ else
+ {
+ timeouts.push(this.context.setTimeout(function()
+ {
+ panelNode.scrollTop = scrollTop == undefined ? 0 : scrollTop;
+ }, delay));
+ }
+ this.timeouts = timeouts;
+ },
+
+ /*
+ // new
+ showMembers: function(members, update, scrollTop)
+ {
+ // If we are still in the midst of inserting rows, cancel all pending
+ // insertions here - this is a big speedup when stepping in the debugger
+ if (this.timeouts)
+ {
+ for (var i = 0; i < this.timeouts.length; ++i)
+ this.context.clearTimeout(this.timeouts[i]);
+ delete this.timeouts;
+ }
+
+ if (!members.length)
+ return this.showEmptyMembers();
+
+ var panelNode = this.panelNode;
+ var priorScrollTop = scrollTop == undefined ? panelNode.scrollTop : scrollTop;
+
+ // If we are asked to "update" the current view, then build the new table
+ // offscreen and swap it in when it's done
+ var offscreen = update && panelNode.firstChild;
+ var dest = offscreen ? panelNode.ownerDocument : panelNode;
+
+ var table = this.tag.replace({domPanel: this, toggles: this.toggles}, dest);
+ var tbody = table.lastChild;
+ var rowTag = DirTablePlate.rowTag;
+
+ // Insert the first slice immediately
+ //var slice = members.splice(0, insertSliceSize);
+ //var result = rowTag.insertRows({members: slice}, tbody.lastChild);
+
+ //var setSize = members.length;
+ //var rowCount = 1;
+
+ var panel = this;
+ var result;
+
+ //dispatch([Firebug.A11yModel], 'onMemberRowSliceAdded', [panel, result, rowCount, setSize]);
+ var timeouts = [];
+
+ var delay = 0;
+ var _insertSliceSize = insertSliceSize;
+ var _insertInterval = insertInterval;
+
+ // enable to measure rendering performance
+ var renderStart = new Date().getTime();
+ var lastSkip = renderStart, now;
+
+ while (members.length)
+ {
+ with({slice: members.splice(0, _insertSliceSize), isLast: !members.length})
+ {
+ var _tbody = tbody;
+ var _rowTag = rowTag;
+ var _panelNode = panelNode;
+ var _priorScrollTop = priorScrollTop;
+
+ timeouts.push(this.context.setTimeout(function()
+ {
+ // TODO: xxxpedro can this be a timing error related to the
+ // "iteration number" approach insted of "duration time"?
+ // avoid error in IE8
+ if (!_tbody.lastChild) return;
+
+ result = _rowTag.insertRows({members: slice}, _tbody.lastChild);
+
+ //rowCount += _insertSliceSize;
+ //dispatch([Firebug.A11yModel], 'onMemberRowSliceAdded', [panel, result, rowCount, setSize]);
+
+ if ((_panelNode.scrollHeight + _panelNode.offsetHeight) >= _priorScrollTop)
+ _panelNode.scrollTop = _priorScrollTop;
+
+
+ // enable to measure rendering performance
+ //alert("gap: " + (new Date().getTime() - lastSkip));
+ //lastSkip = new Date().getTime();
+
+ //if (isLast) alert("new: " + (new Date().getTime() - renderStart) + "ms");
+
+ }, delay));
+
+ delay += _insertInterval;
+ }
+ }
+
+ if (offscreen)
+ {
+ timeouts.push(this.context.setTimeout(function()
+ {
+ if (panelNode.firstChild)
+ panelNode.replaceChild(table, panelNode.firstChild);
+ else
+ panelNode.appendChild(table);
+
+ // Scroll back to where we were before
+ panelNode.scrollTop = priorScrollTop;
+ }, delay));
+ }
+ else
+ {
+ timeouts.push(this.context.setTimeout(function()
+ {
+ panelNode.scrollTop = scrollTop == undefined ? 0 : scrollTop;
+ }, delay));
+ }
+ this.timeouts = timeouts;
+ },
+ /**/
+
+ showEmptyMembers: function()
+ {
+ FirebugReps.Warning.tag.replace({object: "NoMembersWarning"}, this.panelNode);
+ },
+
+ findPathObject: function(object)
+ {
+ var pathIndex = -1;
+ for (var i = 0; i < this.objectPath.length; ++i)
+ {
+ // IE needs === instead of == or otherwise some objects will
+ // be considered equal to different objects, returning the
+ // wrong index of the objectPath array
+ if (this.getPathObject(i) === object)
+ return i;
+ }
+
+ return -1;
+ },
+
+ getPathObject: function(index)
+ {
+ var object = this.objectPath[index];
+
+ if (object instanceof Property)
+ return object.getObject();
+ else
+ return object;
+ },
+
+ getRowObject: function(row)
+ {
+ var object = getRowOwnerObject(row);
+ return object ? object : this.selection;
+ },
+
+ getRowPropertyValue: function(row)
+ {
+ var object = this.getRowObject(row);
+ object = this.getRealObject(object);
+ if (object)
+ {
+ var propName = getRowName(row);
+
+ if (object instanceof jsdIStackFrame)
+ return Firebug.Debugger.evaluate(propName, this.context);
+ else
+ return object[propName];
+ }
+ },
+ /*
+ copyProperty: function(row)
+ {
+ var value = this.getRowPropertyValue(row);
+ copyToClipboard(value);
+ },
+
+ editProperty: function(row, editValue)
+ {
+ if (hasClass(row, "watchNewRow"))
+ {
+ if (this.context.stopped)
+ Firebug.Editor.startEditing(row, "");
+ else if (Firebug.Console.isAlwaysEnabled()) // not stopped in debugger, need command line
+ {
+ if (Firebug.CommandLine.onCommandLineFocus())
+ Firebug.Editor.startEditing(row, "");
+ else
+ row.innerHTML = $STR("warning.Command line blocked?");
+ }
+ else
+ row.innerHTML = $STR("warning.Console must be enabled");
+ }
+ else if (hasClass(row, "watchRow"))
+ Firebug.Editor.startEditing(row, getRowName(row));
+ else
+ {
+ var object = this.getRowObject(row);
+ this.context.thisValue = object;
+
+ if (!editValue)
+ {
+ var propValue = this.getRowPropertyValue(row);
+
+ var type = typeof(propValue);
+ if (type == "undefined" || type == "number" || type == "boolean")
+ editValue = propValue;
+ else if (type == "string")
+ editValue = "\"" + escapeJS(propValue) + "\"";
+ else if (propValue == null)
+ editValue = "null";
+ else if (object instanceof Window || object instanceof jsdIStackFrame)
+ editValue = getRowName(row);
+ else
+ editValue = "this." + getRowName(row);
+ }
+
+
+ Firebug.Editor.startEditing(row, editValue);
+ }
+ },
+
+ deleteProperty: function(row)
+ {
+ if (hasClass(row, "watchRow"))
+ this.deleteWatch(row);
+ else
+ {
+ var object = getRowOwnerObject(row);
+ if (!object)
+ object = this.selection;
+ object = this.getRealObject(object);
+
+ if (object)
+ {
+ var name = getRowName(row);
+ try
+ {
+ delete object[name];
+ }
+ catch (exc)
+ {
+ return;
+ }
+
+ this.rebuild(true);
+ this.markChange();
+ }
+ }
+ },
+
+ setPropertyValue: function(row, value) // value must be string
+ {
+ if(FBTrace.DBG_DOM)
+ {
+ FBTrace.sysout("row: "+row);
+ FBTrace.sysout("value: "+value+" type "+typeof(value), value);
+ }
+
+ var name = getRowName(row);
+ if (name == "this")
+ return;
+
+ var object = this.getRowObject(row);
+ object = this.getRealObject(object);
+ if (object && !(object instanceof jsdIStackFrame))
+ {
+ // unwrappedJSObject.property = unwrappedJSObject
+ Firebug.CommandLine.evaluate(value, this.context, object, this.context.getGlobalScope(),
+ function success(result, context)
+ {
+ if (FBTrace.DBG_DOM)
+ FBTrace.sysout("setPropertyValue evaluate success object["+name+"]="+result+" type "+typeof(result), result);
+ object[name] = result;
+ },
+ function failed(exc, context)
+ {
+ try
+ {
+ if (FBTrace.DBG_DOM)
+ FBTrace.sysout("setPropertyValue evaluate failed with exc:"+exc+" object["+name+"]="+value+" type "+typeof(value), exc);
+ // If the value doesn't parse, then just store it as a string. Some users will
+ // not realize they're supposed to enter a JavaScript expression and just type
+ // literal text
+ object[name] = String(value); // unwrappedJSobject.property = string
+ }
+ catch (exc)
+ {
+ return;
+ }
+ }
+ );
+ }
+ else if (this.context.stopped)
+ {
+ try
+ {
+ Firebug.CommandLine.evaluate(name+"="+value, this.context);
+ }
+ catch (exc)
+ {
+ try
+ {
+ // See catch block above...
+ object[name] = String(value); // unwrappedJSobject.property = string
+ }
+ catch (exc)
+ {
+ return;
+ }
+ }
+ }
+
+ this.rebuild(true);
+ this.markChange();
+ },
+
+ highlightRow: function(row)
+ {
+ if (this.highlightedRow)
+ cancelClassTimed(this.highlightedRow, "jumpHighlight", this.context);
+
+ this.highlightedRow = row;
+
+ if (row)
+ setClassTimed(row, "jumpHighlight", this.context);
+ },/**/
+
+ onMouseMove: function(event)
+ {
+ var target = event.srcElement || event.target;
+
+ var object = getAncestorByClass(target, "objectLink-element");
+ object = object ? object.repObject : null;
+
+ if(object && instanceOf(object, "Element") && object.nodeType == 1)
+ {
+ if(object != lastHighlightedObject)
+ {
+ Firebug.Inspector.drawBoxModel(object);
+ object = lastHighlightedObject;
+ }
+ }
+ else
+ Firebug.Inspector.hideBoxModel();
+
+ },
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ // extends Panel
+
+ create: function()
+ {
+ // TODO: xxxpedro
+ this.context = Firebug.browser;
+
+ this.objectPath = [];
+ this.propertyPath = [];
+ this.viewPath = [];
+ this.pathIndex = -1;
+ this.toggles = {};
+
+ Firebug.Panel.create.apply(this, arguments);
+
+ this.panelNode.style.padding = "0 1px";
+ },
+
+ initialize: function(){
+ Firebug.Panel.initialize.apply(this, arguments);
+
+ addEvent(this.panelNode, "mousemove", this.onMouseMove);
+ },
+
+ shutdown: function()
+ {
+ removeEvent(this.panelNode, "mousemove", this.onMouseMove);
+
+ Firebug.Panel.shutdown.apply(this, arguments);
+ },
+
+ /*
+ destroy: function(state)
+ {
+ var view = this.viewPath[this.pathIndex];
+ if (view && this.panelNode.scrollTop)
+ view.scrollTop = this.panelNode.scrollTop;
+
+ if (this.pathIndex)
+ state.pathIndex = this.pathIndex;
+ if (this.viewPath)
+ state.viewPath = this.viewPath;
+ if (this.propertyPath)
+ state.propertyPath = this.propertyPath;
+
+ if (this.propertyPath.length > 0 && !this.propertyPath[1])
+ state.firstSelection = persistObject(this.getPathObject(1), this.context);
+
+ Firebug.Panel.destroy.apply(this, arguments);
+ },
+ /**/
+
+ ishow: function(state)
+ {
+ if (this.context.loaded && !this.selection)
+ {
+ if (!state)
+ {
+ this.select(null);
+ return;
+ }
+ if (state.viewPath)
+ this.viewPath = state.viewPath;
+ if (state.propertyPath)
+ this.propertyPath = state.propertyPath;
+
+ var defaultObject = this.getDefaultSelection(this.context);
+ var selectObject = defaultObject;
+
+ if (state.firstSelection)
+ {
+ var restored = state.firstSelection(this.context);
+ if (restored)
+ {
+ selectObject = restored;
+ this.objectPath = [defaultObject, restored];
+ }
+ else
+ this.objectPath = [defaultObject];
+ }
+ else
+ this.objectPath = [defaultObject];
+
+ if (this.propertyPath.length > 1)
+ {
+ for (var i = 1; i < this.propertyPath.length; ++i)
+ {
+ var name = this.propertyPath[i];
+ if (!name)
+ continue;
+
+ var object = selectObject;
+ try
+ {
+ selectObject = object[name];
+ }
+ catch (exc)
+ {
+ selectObject = null;
+ }
+
+ if (selectObject)
+ {
+ this.objectPath.push(new Property(object, name));
+ }
+ else
+ {
+ // If we can't access a property, just stop
+ this.viewPath.splice(i);
+ this.propertyPath.splice(i);
+ this.objectPath.splice(i);
+ selectObject = this.getPathObject(this.objectPath.length-1);
+ break;
+ }
+ }
+ }
+
+ var selection = state.pathIndex <= this.objectPath.length-1
+ ? this.getPathObject(state.pathIndex)
+ : this.getPathObject(this.objectPath.length-1);
+
+ this.select(selection);
+ }
+ },
+ /*
+ hide: function()
+ {
+ var view = this.viewPath[this.pathIndex];
+ if (view && this.panelNode.scrollTop)
+ view.scrollTop = this.panelNode.scrollTop;
+ },
+ /**/
+
+ supportsObject: function(object)
+ {
+ if (object == null)
+ return 1000;
+
+ if (typeof(object) == "undefined")
+ return 1000;
+ else if (object instanceof SourceLink)
+ return 0;
+ else
+ return 1; // just agree to support everything but not agressively.
+ },
+
+ refresh: function()
+ {
+ this.rebuild(true);
+ },
+
+ updateSelection: function(object)
+ {
+ var previousIndex = this.pathIndex;
+ var previousView = previousIndex == -1 ? null : this.viewPath[previousIndex];
+
+ var newPath = this.pathToAppend;
+ delete this.pathToAppend;
+
+ var pathIndex = this.findPathObject(object);
+ if (newPath || pathIndex == -1)
+ {
+ this.toggles = {};
+
+ if (newPath)
+ {
+ // Remove everything after the point where we are inserting, so we
+ // essentially replace it with the new path
+ if (previousView)
+ {
+ if (this.panelNode.scrollTop)
+ previousView.scrollTop = this.panelNode.scrollTop;
+
+ var start = previousIndex + 1,
+ // Opera needs the length argument in splice(), otherwise
+ // it will consider that only one element should be removed
+ length = this.objectPath.length - start;
+
+ this.objectPath.splice(start, length);
+ this.propertyPath.splice(start, length);
+ this.viewPath.splice(start, length);
+ }
+
+ var value = this.getPathObject(previousIndex);
+ if (!value)
+ {
+ if (FBTrace.DBG_ERRORS)
+ FBTrace.sysout("dom.updateSelection no pathObject for "+previousIndex+"\n");
+ return;
+ }
+
+ for (var i = 0, length = newPath.length; i < length; ++i)
+ {
+ var name = newPath[i];
+ var object = value;
+ try
+ {
+ value = value[name];
+ }
+ catch(exc)
+ {
+ if (FBTrace.DBG_ERRORS)
+ FBTrace.sysout("dom.updateSelection FAILS at path_i="+i+" for name:"+name+"\n");
+ return;
+ }
+
+ ++this.pathIndex;
+ this.objectPath.push(new Property(object, name));
+ this.propertyPath.push(name);
+ this.viewPath.push({toggles: this.toggles, scrollTop: 0});
+ }
+ }
+ else
+ {
+ this.toggles = {};
+
+ var win = Firebug.browser.window;
+ //var win = this.context.getGlobalScope();
+ if (object === win)
+ {
+ this.pathIndex = 0;
+ this.objectPath = [win];
+ this.propertyPath = [null];
+ this.viewPath = [{toggles: this.toggles, scrollTop: 0}];
+ }
+ else
+ {
+ this.pathIndex = 1;
+ this.objectPath = [win, object];
+ this.propertyPath = [null, null];
+ this.viewPath = [
+ {toggles: {}, scrollTop: 0},
+ {toggles: this.toggles, scrollTop: 0}
+ ];
+ }
+ }
+
+ this.panelNode.scrollTop = 0;
+ this.rebuild();
+ }
+ else
+ {
+ this.pathIndex = pathIndex;
+
+ var view = this.viewPath[pathIndex];
+ this.toggles = view.toggles;
+
+ // Persist the current scroll location
+ if (previousView && this.panelNode.scrollTop)
+ previousView.scrollTop = this.panelNode.scrollTop;
+
+ this.rebuild(false, view.scrollTop);
+ }
+ },
+
+ getObjectPath: function(object)
+ {
+ return this.objectPath;
+ },
+
+ getDefaultSelection: function()
+ {
+ return Firebug.browser.window;
+ //return this.context.getGlobalScope();
+ }/*,
+
+ updateOption: function(name, value)
+ {
+ const optionMap = {showUserProps: 1, showUserFuncs: 1, showDOMProps: 1,
+ showDOMFuncs: 1, showDOMConstants: 1};
+ if ( optionMap.hasOwnProperty(name) )
+ this.rebuild(true);
+ },
+
+ getOptionsMenuItems: function()
+ {
+ return [
+ optionMenu("ShowUserProps", "showUserProps"),
+ optionMenu("ShowUserFuncs", "showUserFuncs"),
+ optionMenu("ShowDOMProps", "showDOMProps"),
+ optionMenu("ShowDOMFuncs", "showDOMFuncs"),
+ optionMenu("ShowDOMConstants", "showDOMConstants"),
+ "-",
+ {label: "Refresh", command: bindFixed(this.rebuild, this, true) }
+ ];
+ },
+
+ getContextMenuItems: function(object, target)
+ {
+ var row = getAncestorByClass(target, "memberRow");
+
+ var items = [];
+
+ if (row)
+ {
+ var rowName = getRowName(row);
+ var rowObject = this.getRowObject(row);
+ var rowValue = this.getRowPropertyValue(row);
+
+ var isWatch = hasClass(row, "watchRow");
+ var isStackFrame = rowObject instanceof jsdIStackFrame;
+
+ if (typeof(rowValue) == "string" || typeof(rowValue) == "number")
+ {
+ // Functions already have a copy item in their context menu
+ items.push(
+ "-",
+ {label: "CopyValue",
+ command: bindFixed(this.copyProperty, this, row) }
+ );
+ }
+
+ items.push(
+ "-",
+ {label: isWatch ? "EditWatch" : (isStackFrame ? "EditVariable" : "EditProperty"),
+ command: bindFixed(this.editProperty, this, row) }
+ );
+
+ if (isWatch || (!isStackFrame && !isDOMMember(rowObject, rowName)))
+ {
+ items.push(
+ {label: isWatch ? "DeleteWatch" : "DeleteProperty",
+ command: bindFixed(this.deleteProperty, this, row) }
+ );
+ }
+ }
+
+ items.push(
+ "-",
+ {label: "Refresh", command: bindFixed(this.rebuild, this, true) }
+ );
+
+ return items;
+ },
+
+ getEditor: function(target, value)
+ {
+ if (!this.editor)
+ this.editor = new DOMEditor(this.document);
+
+ return this.editor;
+ }/**/
+});
+
+// ************************************************************************************************
+
+// TODO: xxxpedro statusbar
+var updateStatusBar = function(panel)
+{
+ var path = panel.propertyPath;
+ var index = panel.pathIndex;
+
+ var r = [];
+
+ for (var i=0, l=path.length; i<l; i++)
+ {
+ r.push(i==index ? '<a class="fbHover fbButton fbBtnSelected" ' : '<a class="fbHover fbButton" ');
+ r.push('pathIndex=');
+ r.push(i);
+
+ if(isIE6)
+ r.push(' href="javascript:void(0)"');
+
+ r.push('>');
+ r.push(i==0 ? "window" : path[i] || "Object");
+ r.push('</a>');
+
+ if(i < l-1)
+ r.push('<span class="fbStatusSeparator">></span>');
+ }
+ panel.statusBarNode.innerHTML = r.join("");
+};
+
+
+var DOMMainPanel = Firebug.DOMPanel = function () {};
+
+Firebug.DOMPanel.DirTable = DirTablePlate;
+
+DOMMainPanel.prototype = extend(Firebug.DOMBasePanel.prototype,
+{
+ onClickStatusBar: function(event)
+ {
+ var target = event.srcElement || event.target;
+ var element = getAncestorByClass(target, "fbHover");
+
+ if(element)
+ {
+ var pathIndex = element.getAttribute("pathIndex");
+
+ if(pathIndex)
+ {
+ this.select(this.getPathObject(pathIndex));
+ }
+ }
+ },
+
+ selectRow: function(row, target)
+ {
+ if (!target)
+ target = row.lastChild.firstChild;
+
+ if (!target || !target.repObject)
+ return;
+
+ this.pathToAppend = getPath(row);
+
+ // If the object is inside an array, look up its index
+ var valueBox = row.lastChild.firstChild;
+ if (hasClass(valueBox, "objectBox-array"))
+ {
+ var arrayIndex = FirebugReps.Arr.getItemIndex(target);
+ this.pathToAppend.push(arrayIndex);
+ }
+
+ // Make sure we get a fresh status path for the object, since otherwise
+ // it might find the object in the existing path and not refresh it
+ //Firebug.chrome.clearStatusPath();
+
+ this.select(target.repObject, true);
+ },
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+ onClick: function(event)
+ {
+ var target = event.srcElement || event.target;
+ var repNode = Firebug.getRepNode(target);
+ if (repNode)
+ {
+ var row = getAncestorByClass(target, "memberRow");
+ if (row)
+ {
+ this.selectRow(row, repNode);
+ cancelEvent(event);
+ }
+ }
+ },
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ // extends Panel
+
+ name: "DOM",
+ title: "DOM",
+ searchable: true,
+ statusSeparator: ">",
+
+ options: {
+ hasToolButtons: true,
+ hasStatusBar: true
+ },
+
+ create: function()
+ {
+ Firebug.DOMBasePanel.prototype.create.apply(this, arguments);
+
+ this.onClick = bind(this.onClick, this);
+
+ //TODO: xxxpedro
+ this.onClickStatusBar = bind(this.onClickStatusBar, this);
+
+ this.panelNode.style.padding = "0 1px";
+ },
+
+ initialize: function(oldPanelNode)
+ {
+ //this.panelNode.addEventListener("click", this.onClick, false);
+ //dispatch([Firebug.A11yModel], 'onInitializeNode', [this, 'console']);
+
+ Firebug.DOMBasePanel.prototype.initialize.apply(this, arguments);
+
+ addEvent(this.panelNode, "click", this.onClick);
+
+ // TODO: xxxpedro dom
+ this.ishow();
+
+ //TODO: xxxpedro
+ addEvent(this.statusBarNode, "click", this.onClickStatusBar);
+ },
+
+ shutdown: function()
+ {
+ //this.panelNode.removeEventListener("click", this.onClick, false);
+ //dispatch([Firebug.A11yModel], 'onDestroyNode', [this, 'console']);
+
+ removeEvent(this.panelNode, "click", this.onClick);
+
+ Firebug.DOMBasePanel.prototype.shutdown.apply(this, arguments);
+ }/*,
+
+ search: function(text, reverse)
+ {
+ if (!text)
+ {
+ delete this.currentSearch;
+ this.highlightRow(null);
+ return false;
+ }
+
+ var row;
+ if (this.currentSearch && text == this.currentSearch.text)
+ row = this.currentSearch.findNext(true, undefined, reverse, Firebug.searchCaseSensitive);
+ else
+ {
+ function findRow(node) { return getAncestorByClass(node, "memberRow"); }
+ this.currentSearch = new TextSearch(this.panelNode, findRow);
+ row = this.currentSearch.find(text, reverse, Firebug.searchCaseSensitive);
+ }
+
+ if (row)
+ {
+ var sel = this.document.defaultView.getSelection();
+ sel.removeAllRanges();
+ sel.addRange(this.currentSearch.range);
+
+ scrollIntoCenterView(row, this.panelNode);
+
+ this.highlightRow(row);
+ dispatch([Firebug.A11yModel], 'onDomSearchMatchFound', [this, text, row]);
+ return true;
+ }
+ else
+ {
+ dispatch([Firebug.A11yModel], 'onDomSearchMatchFound', [this, text, null]);
+ return false;
+ }
+ }/**/
+});
+
+Firebug.registerPanel(DOMMainPanel);
+
+
+// ************************************************************************************************
+
+
+
+// ************************************************************************************************
+// Local Helpers
+
+var getMembers = function getMembers(object, level) // we expect object to be user-level object wrapped in security blanket
+{
+ if (!level)
+ level = 0;
+
+ var ordinals = [], userProps = [], userClasses = [], userFuncs = [],
+ domProps = [], domFuncs = [], domConstants = [];
+
+ try
+ {
+ var domMembers = getDOMMembers(object);
+ //var domMembers = {}; // TODO: xxxpedro
+ //var domConstantMap = {}; // TODO: xxxpedro
+
+ if (object.wrappedJSObject)
+ var insecureObject = object.wrappedJSObject;
+ else
+ var insecureObject = object;
+
+ // IE function prototype is not listed in (for..in)
+ if (isIE && isFunction(object))
+ addMember("user", userProps, "prototype", object.prototype, level);
+
+ for (var name in insecureObject) // enumeration is safe
+ {
+ if (ignoreVars[name] == 1) // javascript.options.strict says ignoreVars is undefined.
+ continue;
+
+ var val;
+ try
+ {
+ val = insecureObject[name]; // getter is safe
+ }
+ catch (exc)
+ {
+ // Sometimes we get exceptions trying to access certain members
+ if (FBTrace.DBG_ERRORS && FBTrace.DBG_DOM)
+ FBTrace.sysout("dom.getMembers cannot access "+name, exc);
+ }
+
+ var ordinal = parseInt(name);
+ if (ordinal || ordinal == 0)
+ {
+ addMember("ordinal", ordinals, name, val, level);
+ }
+ else if (isFunction(val))
+ {
+ if (isClassFunction(val) && !(name in domMembers))
+ addMember("userClass", userClasses, name, val, level);
+ else if (name in domMembers)
+ addMember("domFunction", domFuncs, name, val, level, domMembers[name]);
+ else
+ addMember("userFunction", userFuncs, name, val, level);
+ }
+ else
+ {
+ //TODO: xxxpedro
+ /*
+ var getterFunction = insecureObject.__lookupGetter__(name),
+ setterFunction = insecureObject.__lookupSetter__(name),
+ prefix = "";
+
+ if(getterFunction && !setterFunction)
+ prefix = "get ";
+ /**/
+
+ var prefix = "";
+
+ if (name in domMembers && !(name in domConstantMap))
+ addMember("dom", domProps, (prefix+name), val, level, domMembers[name]);
+ else if (name in domConstantMap)
+ addMember("dom", domConstants, (prefix+name), val, level);
+ else
+ addMember("user", userProps, (prefix+name), val, level);
+ }
+ }
+ }
+ catch (exc)
+ {
+ // Sometimes we get exceptions just from trying to iterate the members
+ // of certain objects, like StorageList, but don't let that gum up the works
+ throw exc;
+ if (FBTrace.DBG_ERRORS && FBTrace.DBG_DOM)
+ FBTrace.sysout("dom.getMembers FAILS: ", exc);
+ //throw exc;
+ }
+
+ function sortName(a, b) { return a.name > b.name ? 1 : -1; }
+ function sortOrder(a, b) { return a.order > b.order ? 1 : -1; }
+
+ var members = [];
+
+ members.push.apply(members, ordinals);
+
+ Firebug.showUserProps = true; // TODO: xxxpedro
+ Firebug.showUserFuncs = true; // TODO: xxxpedro
+ Firebug.showDOMProps = true;
+ Firebug.showDOMFuncs = true;
+ Firebug.showDOMConstants = true;
+
+ if (Firebug.showUserProps)
+ {
+ userProps.sort(sortName);
+ members.push.apply(members, userProps);
+ }
+
+ if (Firebug.showUserFuncs)
+ {
+ userClasses.sort(sortName);
+ members.push.apply(members, userClasses);
+
+ userFuncs.sort(sortName);
+ members.push.apply(members, userFuncs);
+ }
+
+ if (Firebug.showDOMProps)
+ {
+ domProps.sort(sortName);
+ members.push.apply(members, domProps);
+ }
+
+ if (Firebug.showDOMFuncs)
+ {
+ domFuncs.sort(sortName);
+ members.push.apply(members, domFuncs);
+ }
+
+ if (Firebug.showDOMConstants)
+ members.push.apply(members, domConstants);
+
+ return members;
+};
+
+function expandMembers(members, toggles, offset, level) // recursion starts with offset=0, level=0
+{
+ var expanded = 0;
+ for (var i = offset; i < members.length; ++i)
+ {
+ var member = members[i];
+ if (member.level > level)
+ break;
+
+ if ( toggles.hasOwnProperty(member.name) )
+ {
+ member.open = "opened"; // member.level <= level && member.name in toggles.
+
+ var newMembers = getMembers(member.value, level+1); // sets newMembers.level to level+1
+
+ var args = [i+1, 0];
+ args.push.apply(args, newMembers);
+ members.splice.apply(members, args);
+
+ /*
+ if (FBTrace.DBG_DOM)
+ {
+ FBTrace.sysout("expandMembers member.name", member.name);
+ FBTrace.sysout("expandMembers toggles", toggles);
+ FBTrace.sysout("expandMembers toggles[member.name]", toggles[member.name]);
+ FBTrace.sysout("dom.expandedMembers level: "+level+" member", member);
+ }
+ /**/
+
+ expanded += newMembers.length;
+ i += newMembers.length + expandMembers(members, toggles[member.name], i+1, level+1);
+ }
+ }
+
+ return expanded;
+}
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+
+function isClassFunction(fn)
+{
+ try
+ {
+ for (var name in fn.prototype)
+ return true;
+ } catch (exc) {}
+ return false;
+}
+
+// FIXME: xxxpedro This function is already defined in Lib. If we keep this definition here, it
+// will crash IE9 when not running the IE Developer Tool with JavaScript Debugging enabled!!!
+// Check if this function is in fact defined in Firebug for Firefox. If so, we should remove
+// this from here. The only difference of this function is the IE hack to show up the prototype
+// of functions, but Firebug no longer shows the prototype for simple functions.
+//var hasProperties = function hasProperties(ob)
+//{
+// try
+// {
+// for (var name in ob)
+// return true;
+// } catch (exc) {}
+//
+// // IE function prototype is not listed in (for..in)
+// if (isFunction(ob)) return true;
+//
+// return false;
+//};
+
+FBL.ErrorCopy = function(message)
+{
+ this.message = message;
+};
+
+var addMember = function addMember(type, props, name, value, level, order)
+{
+ var rep = Firebug.getRep(value); // do this first in case a call to instanceof reveals contents
+ var tag = rep.shortTag ? rep.shortTag : rep.tag;
+
+ var ErrorCopy = function(){}; //TODO: xxxpedro
+
+ var valueType = typeof(value);
+ var hasChildren = hasProperties(value) && !(value instanceof ErrorCopy) &&
+ (isFunction(value) || (valueType == "object" && value != null)
+ || (valueType == "string" && value.length > Firebug.stringCropLength));
+
+ props.push({
+ name: name,
+ value: value,
+ type: type,
+ rowClass: "memberRow-"+type,
+ open: "",
+ order: order,
+ level: level,
+ indent: level*16,
+ hasChildren: hasChildren,
+ tag: tag
+ });
+};
+
+var getWatchRowIndex = function getWatchRowIndex(row)
+{
+ var index = -1;
+ for (; row && hasClass(row, "watchRow"); row = row.previousSibling)
+ ++index;
+ return index;
+};
+
+var getRowName = function getRowName(row)
+{
+ var node = row.firstChild;
+ return node.textContent ? node.textContent : node.innerText;
+};
+
+var getRowValue = function getRowValue(row)
+{
+ return row.lastChild.firstChild.repObject;
+};
+
+var getRowOwnerObject = function getRowOwnerObject(row)
+{
+ var parentRow = getParentRow(row);
+ if (parentRow)
+ return getRowValue(parentRow);
+};
+
+var getParentRow = function getParentRow(row)
+{
+ var level = parseInt(row.getAttribute("level"))-1;
+ for (row = row.previousSibling; row; row = row.previousSibling)
+ {
+ if (parseInt(row.getAttribute("level")) == level)
+ return row;
+ }
+};
+
+var getPath = function getPath(row)
+{
+ var name = getRowName(row);
+ var path = [name];
+
+ var level = parseInt(row.getAttribute("level"))-1;
+ for (row = row.previousSibling; row; row = row.previousSibling)
+ {
+ if (parseInt(row.getAttribute("level")) == level)
+ {
+ var name = getRowName(row);
+ path.splice(0, 0, name);
+
+ --level;
+ }
+ }
+
+ return path;
+};
+
+// ************************************************************************************************
+
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+
+// ************************************************************************************************
+// DOM Module
+
+Firebug.DOM = extend(Firebug.Module,
+{
+ getPanel: function()
+ {
+ return Firebug.chrome ? Firebug.chrome.getPanel("DOM") : null;
+ }
+});
+
+Firebug.registerModule(Firebug.DOM);
+
+
+// ************************************************************************************************
+// DOM Panel
+
+var lastHighlightedObject;
+
+function DOMSidePanel(){};
+
+DOMSidePanel.prototype = extend(Firebug.DOMBasePanel.prototype,
+{
+ selectRow: function(row, target)
+ {
+ if (!target)
+ target = row.lastChild.firstChild;
+
+ if (!target || !target.repObject)
+ return;
+
+ this.pathToAppend = getPath(row);
+
+ // If the object is inside an array, look up its index
+ var valueBox = row.lastChild.firstChild;
+ if (hasClass(valueBox, "objectBox-array"))
+ {
+ var arrayIndex = FirebugReps.Arr.getItemIndex(target);
+ this.pathToAppend.push(arrayIndex);
+ }
+
+ // Make sure we get a fresh status path for the object, since otherwise
+ // it might find the object in the existing path and not refresh it
+ //Firebug.chrome.clearStatusPath();
+
+ var object = target.repObject;
+
+ if (instanceOf(object, "Element"))
+ {
+ Firebug.HTML.selectTreeNode(ElementCache(object));
+ }
+ else
+ {
+ Firebug.chrome.selectPanel("DOM");
+ Firebug.chrome.getPanel("DOM").select(object, true);
+ }
+ },
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+ onClick: function(event)
+ {
+ /*
+ var target = event.srcElement || event.target;
+
+ var object = getAncestorByClass(target, "objectLink");
+ object = object ? object.repObject : null;
+
+ if(!object) return;
+
+ if (instanceOf(object, "Element"))
+ {
+ Firebug.HTML.selectTreeNode(ElementCache(object));
+ }
+ else
+ {
+ Firebug.chrome.selectPanel("DOM");
+ Firebug.chrome.getPanel("DOM").select(object, true);
+ }
+ /**/
+
+
+ var target = event.srcElement || event.target;
+ var repNode = Firebug.getRepNode(target);
+ if (repNode)
+ {
+ var row = getAncestorByClass(target, "memberRow");
+ if (row)
+ {
+ this.selectRow(row, repNode);
+ cancelEvent(event);
+ }
+ }
+ /**/
+ },
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ // extends Panel
+
+ name: "DOMSidePanel",
+ parentPanel: "HTML",
+ title: "DOM",
+
+ options: {
+ hasToolButtons: true
+ },
+
+ isInitialized: false,
+
+ create: function()
+ {
+ Firebug.DOMBasePanel.prototype.create.apply(this, arguments);
+
+ this.onClick = bind(this.onClick, this);
+ },
+
+ initialize: function(){
+ Firebug.DOMBasePanel.prototype.initialize.apply(this, arguments);
+
+ addEvent(this.panelNode, "click", this.onClick);
+
+ // TODO: xxxpedro css2
+ var selection = ElementCache.get(Firebug.context.persistedState.selectedHTMLElementId);
+ if (selection)
+ this.select(selection, true);
+ },
+
+ shutdown: function()
+ {
+ removeEvent(this.panelNode, "click", this.onClick);
+
+ Firebug.DOMBasePanel.prototype.shutdown.apply(this, arguments);
+ },
+
+ reattach: function(oldChrome)
+ {
+ //this.isInitialized = oldChrome.getPanel("DOM").isInitialized;
+ this.toggles = oldChrome.getPanel("DOMSidePanel").toggles;
+ }
+
+});
+
+Firebug.registerPanel(DOMSidePanel);
+
+
+// ************************************************************************************************
+}});
+
+/* See license.txt for terms of usage */
+
+FBL.FBTrace = {};
+
+(function() {
+// ************************************************************************************************
+
+var traceOptions = {
+ DBG_TIMESTAMP: 1,
+ DBG_INITIALIZE: 1,
+ DBG_CHROME: 1,
+ DBG_ERRORS: 1,
+ DBG_DISPATCH: 1,
+ DBG_CSS: 1
+};
+
+this.module = null;
+
+this.initialize = function()
+{
+ if (!this.messageQueue)
+ this.messageQueue = [];
+
+ for (var name in traceOptions)
+ this[name] = traceOptions[name];
+};
+
+// ************************************************************************************************
+// FBTrace API
+
+this.sysout = function()
+{
+ return this.logFormatted(arguments, "");
+};
+
+this.dumpProperties = function(title, object)
+{
+ return this.logFormatted("dumpProperties() not supported.", "warning");
+};
+
+this.dumpStack = function()
+{
+ return this.logFormatted("dumpStack() not supported.", "warning");
+};
+
+this.flush = function(module)
+{
+ this.module = module;
+
+ var queue = this.messageQueue;
+ this.messageQueue = [];
+
+ for (var i = 0; i < queue.length; ++i)
+ this.writeMessage(queue[i][0], queue[i][1], queue[i][2]);
+};
+
+this.getPanel = function()
+{
+ return this.module ? this.module.getPanel() : null;
+};
+
+//*************************************************************************************************
+
+this.logFormatted = function(objects, className)
+{
+ var html = this.DBG_TIMESTAMP ? [getTimestamp(), " | "] : [];
+ var length = objects.length;
+
+ for (var i = 0; i < length; ++i)
+ {
+ appendText(" ", html);
+
+ var object = objects[i];
+
+ if (i == 0)
+ {
+ html.push("<b>");
+ appendText(object, html);
+ html.push("</b>");
+ }
+ else
+ appendText(object, html);
+ }
+
+ return this.logRow(html, className);
+};
+
+this.logRow = function(message, className)
+{
+ var panel = this.getPanel();
+
+ if (panel && panel.panelNode)
+ this.writeMessage(message, className);
+ else
+ {
+ this.messageQueue.push([message, className]);
+ }
+
+ return this.LOG_COMMAND;
+};
+
+this.writeMessage = function(message, className)
+{
+ var container = this.getPanel().containerNode;
+ var isScrolledToBottom =
+ container.scrollTop + container.offsetHeight >= container.scrollHeight;
+
+ this.writeRow.call(this, message, className);
+
+ if (isScrolledToBottom)
+ container.scrollTop = container.scrollHeight - container.offsetHeight;
+};
+
+this.appendRow = function(row)
+{
+ var container = this.getPanel().panelNode;
+ container.appendChild(row);
+};
+
+this.writeRow = function(message, className)
+{
+ var row = this.getPanel().panelNode.ownerDocument.createElement("div");
+ row.className = "logRow" + (className ? " logRow-"+className : "");
+ row.innerHTML = message.join("");
+ this.appendRow(row);
+};
+
+//*************************************************************************************************
+
+function appendText(object, html)
+{
+ html.push(escapeHTML(objectToString(object)));
+};
+
+function getTimestamp()
+{
+ var now = new Date();
+ var ms = "" + (now.getMilliseconds() / 1000).toFixed(3);
+ ms = ms.substr(2);
+
+ return now.toLocaleTimeString() + "." + ms;
+};
+
+//*************************************************************************************************
+
+var HTMLtoEntity =
+{
+ "<": "<",
+ ">": ">",
+ "&": "&",
+ "'": "'",
+ '"': """
+};
+
+function replaceChars(ch)
+{
+ return HTMLtoEntity[ch];
+};
+
+function escapeHTML(value)
+{
+ return (value+"").replace(/[<>&"']/g, replaceChars);
+};
+
+//*************************************************************************************************
+
+function objectToString(object)
+{
+ try
+ {
+ return object+"";
+ }
+ catch (exc)
+ {
+ return null;
+ }
+};
+
+// ************************************************************************************************
+}).apply(FBL.FBTrace);
+
+/* See license.txt for terms of usage */
+
+FBL.ns(function() { with (FBL) {
+// ************************************************************************************************
+
+// If application isn't in trace mode, the FBTrace panel won't be loaded
+if (!Env.Options.enableTrace) return;
+
+// ************************************************************************************************
+// FBTrace Module
+
+Firebug.Trace = extend(Firebug.Module,
+{
+ getPanel: function()
+ {
+ return Firebug.chrome ? Firebug.chrome.getPanel("Trace") : null;
+ },
+
+ clear: function()
+ {
+ this.getPanel().panelNode.innerHTML = "";
+ }
+});
+
+Firebug.registerModule(Firebug.Trace);
+
+
+// ************************************************************************************************
+// FBTrace Panel
+
+function TracePanel(){};
+
+TracePanel.prototype = extend(Firebug.Panel,
+{
+ name: "Trace",
+ title: "Trace",
+
+ options: {
+ hasToolButtons: true,
+ innerHTMLSync: true
+ },
+
+ create: function(){
+ Firebug.Panel.create.apply(this, arguments);
+
+ this.clearButton = new Button({
+ caption: "Clear",
+ title: "Clear FBTrace logs",
+ owner: Firebug.Trace,
+ onClick: Firebug.Trace.clear
+ });
+ },
+
+ initialize: function(){
+ Firebug.Panel.initialize.apply(this, arguments);
+
+ this.clearButton.initialize();
+ },
+
+ shutdown: function()
+ {
+ this.clearButton.shutdown();
+
+ Firebug.Panel.shutdown.apply(this, arguments);
+ }
+
+});
+
+Firebug.registerPanel(TracePanel);
+
+// ************************************************************************************************
+}});
+
+/* See license.txt for terms of usage */
+
+FBL.ns(function() { with (FBL) {
+// ************************************************************************************************
+
+// ************************************************************************************************
+// Globals
+
+var modules = [];
+var panelTypes = [];
+var panelTypeMap = {};
+
+var parentPanelMap = {};
+
+
+var registerModule = Firebug.registerModule;
+var registerPanel = Firebug.registerPanel;
+
+// ************************************************************************************************
+append(Firebug,
+{
+ extend: function(fn)
+ {
+ if (Firebug.chrome && Firebug.chrome.addPanel)
+ {
+ var namespace = ns(fn);
+ fn.call(namespace, FBL);
+ }
+ else
+ {
+ setTimeout(function(){Firebug.extend(fn);},100);
+ }
+ },
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ // Registration
+
+ registerModule: function()
+ {
+ registerModule.apply(Firebug, arguments);
+
+ modules.push.apply(modules, arguments);
+
+ dispatch(modules, "initialize", []);
+
+ if (FBTrace.DBG_INITIALIZE) FBTrace.sysout("Firebug.registerModule");
+ },
+
+ registerPanel: function()
+ {
+ registerPanel.apply(Firebug, arguments);
+
+ panelTypes.push.apply(panelTypes, arguments);
+
+ for (var i = 0, panelType; panelType = arguments[i]; ++i)
+ {
+ // TODO: xxxpedro investigate why Dev Panel throws an error
+ if (panelType.prototype.name == "Dev") continue;
+
+ panelTypeMap[panelType.prototype.name] = arguments[i];
+
+ var parentPanelName = panelType.prototype.parentPanel;
+ if (parentPanelName)
+ {
+ parentPanelMap[parentPanelName] = 1;
+ }
+ else
+ {
+ var panelName = panelType.prototype.name;
+ var chrome = Firebug.chrome;
+ chrome.addPanel(panelName);
+
+ // tab click handler
+ var onTabClick = function onTabClick()
+ {
+ chrome.selectPanel(panelName);
+ return false;
+ };
+
+ chrome.addController([chrome.panelMap[panelName].tabNode, "mousedown", onTabClick]);
+ }
+ }
+
+ if (FBTrace.DBG_INITIALIZE)
+ for (var i = 0; i < arguments.length; ++i)
+ FBTrace.sysout("Firebug.registerPanel", arguments[i].prototype.name);
+ }
+
+});
+
+
+
+
+// ************************************************************************************************
+}});
+
+FBL.ns(function() { with (FBL) {
+// ************************************************************************************************
+
+FirebugChrome.Skin =
+{
+ CSS: '.obscured{left:-999999px !important;}.collapsed{display:none;}[collapsed="true"]{display:none;}#fbCSS{padding:0 !important;}.cssPropDisable{float:left;display:block;width:2em;cursor:default;}.infoTip{z-index:2147483647;position:fixed;padding:2px 3px;border:1px solid #CBE087;background:LightYellow;font-family:Monaco,monospace;color:#000000;display:none;white-space:nowrap;pointer-events:none;}.infoTip[active="true"]{display:block;}.infoTipLoading{width:16px;height:16px;background:url(https://getfirebug.com/releases/lite/latest/skin/xp/chrome://firebug/skin/loading_16.gif) no-repeat;}.infoTipImageBox{font-size:11px;min-width:100px;text-align:center;}.infoTipCaption{font-size:11px;font:Monaco,monospace;}.infoTipLoading > .infoTipImage,.infoTipLoading > .infoTipCaption{display:none;}h1.groupHeader{padding:2px 4px;margin:0 0 4px 0;border-top:1px solid #CCCCCC;border-bottom:1px solid #CCCCCC;background:#eee url(https://getfirebug.com/releases/lite/latest/skin/xp/group.gif) repeat-x;font-size:11px;font-weight:bold;_position:relative;}.inlineEditor,.fixedWidthEditor{z-index:2147483647;position:absolute;display:none;}.inlineEditor{margin-left:-6px;margin-top:-3px;}.textEditorInner,.fixedWidthEditor{margin:0 0 0 0 !important;padding:0;border:none !important;font:inherit;text-decoration:inherit;background-color:#FFFFFF;}.fixedWidthEditor{border-top:1px solid #888888 !important;border-bottom:1px solid #888888 !important;}.textEditorInner{position:relative;top:-7px;left:-5px;outline:none;resize:none;}.textEditorInner1{padding-left:11px;background:url(https://getfirebug.com/releases/lite/latest/skin/xp/textEditorBorders.png) repeat-y;_background:url(https://getfirebug.com/releases/lite/latest/skin/xp/textEditorBorders.gif) repeat-y;_overflow:hidden;}.textEditorInner2{position:relative;padding-right:2px;background:url(https://getfirebug.com/releases/lite/latest/skin/xp/textEditorBorders.png) repeat-y 100% 0;_background:url(https://getfirebug.com/releases/lite/latest/skin/xp/textEditorBorders.gif) repeat-y 100% 0;_position:fixed;}.textEditorTop1{background:url(https://getfirebug.com/releases/lite/latest/skin/xp/textEditorCorners.png) no-repeat 100% 0;margin-left:11px;height:10px;_background:url(https://getfirebug.com/releases/lite/latest/skin/xp/textEditorCorners.gif) no-repeat 100% 0;_overflow:hidden;}.textEditorTop2{position:relative;left:-11px;width:11px;height:10px;background:url(https://getfirebug.com/releases/lite/latest/skin/xp/textEditorCorners.png) no-repeat;_background:url(https://getfirebug.com/releases/lite/latest/skin/xp/textEditorCorners.gif) no-repeat;}.textEditorBottom1{position:relative;background:url(https://getfirebug.com/releases/lite/latest/skin/xp/textEditorCorners.png) no-repeat 100% 100%;margin-left:11px;height:12px;_background:url(https://getfirebug.com/releases/lite/latest/skin/xp/textEditorCorners.gif) no-repeat 100% 100%;}.textEditorBottom2{position:relative;left:-11px;width:11px;height:12px;background:url(https://getfirebug.com/releases/lite/latest/skin/xp/textEditorCorners.png) no-repeat 0 100%;_background:url(https://getfirebug.com/releases/lite/latest/skin/xp/textEditorCorners.gif) no-repeat 0 100%;}.panelNode-css{overflow-x:hidden;}.cssSheet > .insertBefore{height:1.5em;}.cssRule{position:relative;margin:0;padding:1em 0 0 6px;font-family:Monaco,monospace;color:#000000;}.cssRule:first-child{padding-top:6px;}.cssElementRuleContainer{position:relative;}.cssHead{padding-right:150px;}.cssProp{}.cssPropName{color:DarkGreen;}.cssPropValue{margin-left:8px;color:DarkBlue;}.cssOverridden span{text-decoration:line-through;}.cssInheritedRule{}.cssInheritLabel{margin-right:0.5em;font-weight:bold;}.cssRule .objectLink-sourceLink{top:0;}.cssProp.editGroup:hover{background:url(https://getfirebug.com/releases/lite/latest/skin/xp/disable.png) no-repeat 2px 1px;_background:url(https://getfirebug.com/releases/lite/latest/skin/xp/disable.gif) no-repeat 2px 1px;}.cssProp.editGroup.editing{background:none;}.cssProp.disabledStyle{background:url(https://getfirebug.com/releases/lite/latest/skin/xp/disableHover.png) no-repeat 2px 1px;_background:url(https://getfirebug.com/releases/lite/latest/skin/xp/disableHover.gif) no-repeat 2px 1px;opacity:1;color:#CCCCCC;}.disabledStyle .cssPropName,.disabledStyle .cssPropValue{color:#CCCCCC;}.cssPropValue.editing + .cssSemi,.inlineExpander + .cssSemi{display:none;}.cssPropValue.editing{white-space:nowrap;}.stylePropName{font-weight:bold;padding:0 4px 4px 4px;width:50%;}.stylePropValue{width:50%;}.panelNode-net{overflow-x:hidden;}.netTable{width:100%;}.hideCategory-undefined .category-undefined,.hideCategory-html .category-html,.hideCategory-css .category-css,.hideCategory-js .category-js,.hideCategory-image .category-image,.hideCategory-xhr .category-xhr,.hideCategory-flash .category-flash,.hideCategory-txt .category-txt,.hideCategory-bin .category-bin{display:none;}.netHeadRow{background:url(https://getfirebug.com/releases/lite/latest/skin/xp/chrome://firebug/skin/group.gif) repeat-x #FFFFFF;}.netHeadCol{border-bottom:1px solid #CCCCCC;padding:2px 4px 2px 18px;font-weight:bold;}.netHeadLabel{white-space:nowrap;overflow:hidden;}.netHeaderRow{height:16px;}.netHeaderCell{cursor:pointer;-moz-user-select:none;border-bottom:1px solid #9C9C9C;padding:0 !important;font-weight:bold;background:#BBBBBB url(https://getfirebug.com/releases/lite/latest/skin/xp/chrome://firebug/skin/tableHeader.gif) repeat-x;white-space:nowrap;}.netHeaderRow > .netHeaderCell:first-child > .netHeaderCellBox{padding:2px 14px 2px 18px;}.netHeaderCellBox{padding:2px 14px 2px 10px;border-left:1px solid #D9D9D9;border-right:1px solid #9C9C9C;}.netHeaderCell:hover:active{background:#959595 url(https://getfirebug.com/releases/lite/latest/skin/xp/chrome://firebug/skin/tableHeaderActive.gif) repeat-x;}.netHeaderSorted{background:#7D93B2 url(https://getfirebug.com/releases/lite/latest/skin/xp/chrome://firebug/skin/tableHeaderSorted.gif) repeat-x;}.netHeaderSorted > .netHeaderCellBox{border-right-color:#6B7C93;background:url(https://getfirebug.com/releases/lite/latest/skin/xp/chrome://firebug/skin/arrowDown.png) no-repeat right;}.netHeaderSorted.sortedAscending > .netHeaderCellBox{background-image:url(https://getfirebug.com/releases/lite/latest/skin/xp/chrome://firebug/skin/arrowUp.png);}.netHeaderSorted:hover:active{background:#536B90 url(https://getfirebug.com/releases/lite/latest/skin/xp/chrome://firebug/skin/tableHeaderSortedActive.gif) repeat-x;}.panelNode-net .netRowHeader{display:block;}.netRowHeader{cursor:pointer;display:none;height:15px;margin-right:0 !important;}.netRow .netRowHeader{background-position:5px 1px;}.netRow[breakpoint="true"] .netRowHeader{background-image:url(https://getfirebug.com/releases/lite/latest/skin/xp/chrome://firebug/skin/breakpoint.png);}.netRow[breakpoint="true"][disabledBreakpoint="true"] .netRowHeader{background-image:url(https://getfirebug.com/releases/lite/latest/skin/xp/chrome://firebug/skin/breakpointDisabled.png);}.netRow.category-xhr:hover .netRowHeader{background-color:#F6F6F6;}#netBreakpointBar{max-width:38px;}#netHrefCol > .netHeaderCellBox{border-left:0px;}.netRow .netRowHeader{width:3px;}.netInfoRow .netRowHeader{display:table-cell;}.netTable[hiddenCols~=netHrefCol] TD[id="netHrefCol"],.netTable[hiddenCols~=netHrefCol] TD.netHrefCol,.netTable[hiddenCols~=netStatusCol] TD[id="netStatusCol"],.netTable[hiddenCols~=netStatusCol] TD.netStatusCol,.netTable[hiddenCols~=netDomainCol] TD[id="netDomainCol"],.netTable[hiddenCols~=netDomainCol] TD.netDomainCol,.netTable[hiddenCols~=netSizeCol] TD[id="netSizeCol"],.netTable[hiddenCols~=netSizeCol] TD.netSizeCol,.netTable[hiddenCols~=netTimeCol] TD[id="netTimeCol"],.netTable[hiddenCols~=netTimeCol] TD.netTimeCol{display:none;}.netRow{background:LightYellow;}.netRow.loaded{background:#FFFFFF;}.netRow.loaded:hover{background:#EFEFEF;}.netCol{padding:0;vertical-align:top;border-bottom:1px solid #EFEFEF;white-space:nowrap;height:17px;}.netLabel{width:100%;}.netStatusCol{padding-left:10px;color:rgb(128,128,128);}.responseError > .netStatusCol{color:red;}.netDomainCol{padding-left:5px;}.netSizeCol{text-align:right;padding-right:10px;}.netHrefLabel{-moz-box-sizing:padding-box;overflow:hidden;z-index:10;position:absolute;padding-left:18px;padding-top:1px;max-width:15%;font-weight:bold;}.netFullHrefLabel{display:none;-moz-user-select:none;padding-right:10px;padding-bottom:3px;max-width:100%;background:#FFFFFF;z-index:200;}.netHrefCol:hover > .netFullHrefLabel{display:block;}.netRow.loaded:hover .netCol > .netFullHrefLabel{background-color:#EFEFEF;}.useA11y .a11yShowFullLabel{display:block;background-image:none !important;border:1px solid #CBE087;background-color:LightYellow;font-family:Monaco,monospace;color:#000000;font-size:10px;z-index:2147483647;}.netSizeLabel{padding-left:6px;}.netStatusLabel,.netDomainLabel,.netSizeLabel,.netBar{padding:1px 0 2px 0 !important;}.responseError{color:red;}.hasHeaders .netHrefLabel:hover{cursor:pointer;color:blue;text-decoration:underline;}.netLoadingIcon{position:absolute;border:0;margin-left:14px;width:16px;height:16px;background:transparent no-repeat 0 0;background-image:url(https://getfirebug.com/releases/lite/latest/skin/xp/chrome://firebug/skin/loading_16.gif);display:inline-block;}.loaded .netLoadingIcon{display:none;}.netBar,.netSummaryBar{position:relative;border-right:50px solid transparent;}.netResolvingBar{position:absolute;left:0;top:0;bottom:0;background:#FFFFFF url(https://getfirebug.com/releases/lite/latest/skin/xp/chrome://firebug/skin/netBarResolving.gif) repeat-x;z-index:60;}.netConnectingBar{position:absolute;left:0;top:0;bottom:0;background:#FFFFFF url(https://getfirebug.com/releases/lite/latest/skin/xp/chrome://firebug/skin/netBarConnecting.gif) repeat-x;z-index:50;}.netBlockingBar{position:absolute;left:0;top:0;bottom:0;background:#FFFFFF url(https://getfirebug.com/releases/lite/latest/skin/xp/chrome://firebug/skin/netBarWaiting.gif) repeat-x;z-index:40;}.netSendingBar{position:absolute;left:0;top:0;bottom:0;background:#FFFFFF url(https://getfirebug.com/releases/lite/latest/skin/xp/chrome://firebug/skin/netBarSending.gif) repeat-x;z-index:30;}.netWaitingBar{position:absolute;left:0;top:0;bottom:0;background:#FFFFFF url(https://getfirebug.com/releases/lite/latest/skin/xp/chrome://firebug/skin/netBarResponded.gif) repeat-x;z-index:20;min-width:1px;}.netReceivingBar{position:absolute;left:0;top:0;bottom:0;background:#38D63B url(https://getfirebug.com/releases/lite/latest/skin/xp/chrome://firebug/skin/netBarLoading.gif) repeat-x;z-index:10;}.netWindowLoadBar,.netContentLoadBar{position:absolute;left:0;top:0;bottom:0;width:1px;background-color:red;z-index:70;opacity:0.5;display:none;margin-bottom:-1px;}.netContentLoadBar{background-color:Blue;}.netTimeLabel{-moz-box-sizing:padding-box;position:absolute;top:1px;left:100%;padding-left:6px;color:#444444;min-width:16px;}.loaded .netReceivingBar,.loaded.netReceivingBar{background:#B6B6B6 url(https://getfirebug.com/releases/lite/latest/skin/xp/chrome://firebug/skin/netBarLoaded.gif) repeat-x;border-color:#B6B6B6;}.fromCache .netReceivingBar,.fromCache.netReceivingBar{background:#D6D6D6 url(https://getfirebug.com/releases/lite/latest/skin/xp/chrome://firebug/skin/netBarCached.gif) repeat-x;border-color:#D6D6D6;}.netSummaryRow .netTimeLabel,.loaded .netTimeLabel{background:transparent;}.timeInfoTip{width:150px; height:40px}.timeInfoTipBar,.timeInfoTipEventBar{position:relative;display:block;margin:0;opacity:1;height:15px;width:4px;}.timeInfoTipEventBar{width:1px !important;}.timeInfoTipCell.startTime{padding-right:8px;}.timeInfoTipCell.elapsedTime{text-align:right;padding-right:8px;}.sizeInfoLabelCol{font-weight:bold;padding-right:10px;font-family:Lucida Grande,Tahoma,sans-serif;font-size:11px;}.sizeInfoSizeCol{font-weight:bold;}.sizeInfoDetailCol{color:gray;text-align:right;}.sizeInfoDescCol{font-style:italic;}.netSummaryRow .netReceivingBar{background:#BBBBBB;border:none;}.netSummaryLabel{color:#222222;}.netSummaryRow{background:#BBBBBB !important;font-weight:bold;}.netSummaryRow .netBar{border-right-color:#BBBBBB;}.netSummaryRow > .netCol{border-top:1px solid #999999;border-bottom:2px solid;-moz-border-bottom-colors:#EFEFEF #999999;padding-top:1px;padding-bottom:2px;}.netSummaryRow > .netHrefCol:hover{background:transparent !important;}.netCountLabel{padding-left:18px;}.netTotalSizeCol{text-align:right;padding-right:10px;}.netTotalTimeCol{text-align:right;}.netCacheSizeLabel{position:absolute;z-index:1000;left:0;top:0;}.netLimitRow{background:rgb(255,255,225) !important;font-weight:normal;color:black;font-weight:normal;}.netLimitLabel{padding-left:18px;}.netLimitRow > .netCol{border-bottom:2px solid;-moz-border-bottom-colors:#EFEFEF #999999;vertical-align:middle !important;padding-top:2px;padding-bottom:2px;}.netLimitButton{font-size:11px;padding-top:1px;padding-bottom:1px;}.netInfoCol{border-top:1px solid #EEEEEE;background:url(https://getfirebug.com/releases/lite/latest/skin/xp/chrome://firebug/skin/group.gif) repeat-x #FFFFFF;}.netInfoBody{margin:10px 0 4px 10px;}.netInfoTabs{position:relative;padding-left:17px;}.netInfoTab{position:relative;top:-3px;margin-top:10px;padding:4px 6px;border:1px solid transparent;border-bottom:none;_border:none;font-weight:bold;color:#565656;cursor:pointer;}.netInfoTabSelected{cursor:default !important;border:1px solid #D7D7D7 !important;border-bottom:none !important;-moz-border-radius:4px 4px 0 0;-webkit-border-radius:4px 4px 0 0;border-radius:4px 4px 0 0;background-color:#FFFFFF;}.logRow-netInfo.error .netInfoTitle{color:red;}.logRow-netInfo.loading .netInfoResponseText{font-style:italic;color:#888888;}.loading .netInfoResponseHeadersTitle{display:none;}.netInfoResponseSizeLimit{font-family:Lucida Grande,Tahoma,sans-serif;padding-top:10px;font-size:11px;}.netInfoText{display:none;margin:0;border:1px solid #D7D7D7;border-right:none;padding:8px;background-color:#FFFFFF;font-family:Monaco,monospace;white-space:pre-wrap;}.netInfoTextSelected{display:block;}.netInfoParamName{padding-right:10px;font-family:Lucida Grande,Tahoma,sans-serif;font-weight:bold;vertical-align:top;text-align:right;white-space:nowrap;}.netInfoPostText .netInfoParamName{width:1px;}.netInfoParamValue{width:100%;}.netInfoHeadersText,.netInfoPostText,.netInfoPutText{padding-top:0;}.netInfoHeadersGroup,.netInfoPostParams,.netInfoPostSource{margin-bottom:4px;border-bottom:1px solid #D7D7D7;padding-top:8px;padding-bottom:2px;font-family:Lucida Grande,Tahoma,sans-serif;font-weight:bold;color:#565656;}.netInfoPostParamsTable,.netInfoPostPartsTable,.netInfoPostJSONTable,.netInfoPostXMLTable,.netInfoPostSourceTable{margin-bottom:10px;width:100%;}.netInfoPostContentType{color:#bdbdbd;padding-left:50px;font-weight:normal;}.netInfoHtmlPreview{border:0;width:100%;height:100%;}.netHeadersViewSource{color:#bdbdbd;margin-left:200px;font-weight:normal;}.netHeadersViewSource:hover{color:blue;cursor:pointer;}.netActivationRow,.netPageSeparatorRow{background:rgb(229,229,229) !important;font-weight:normal;color:black;}.netActivationLabel{background:url(https://getfirebug.com/releases/lite/latest/skin/xp/chrome://firebug/skin/infoIcon.png) no-repeat 3px 2px;padding-left:22px;}.netPageSeparatorRow{height:5px !important;}.netPageSeparatorLabel{padding-left:22px;height:5px !important;}.netPageRow{background-color:rgb(255,255,255);}.netPageRow:hover{background:#EFEFEF;}.netPageLabel{padding:1px 0 2px 18px !important;font-weight:bold;}.netActivationRow > .netCol{border-bottom:2px solid;-moz-border-bottom-colors:#EFEFEF #999999;padding-top:2px;padding-bottom:3px;}.twisty,.logRow-errorMessage > .hasTwisty > .errorTitle,.logRow-log > .objectBox-array.hasTwisty,.logRow-spy .spyHead .spyTitle,.logGroup > .logRow,.memberRow.hasChildren > .memberLabelCell > .memberLabel,.hasHeaders .netHrefLabel,.netPageRow > .netCol > .netPageTitle{background-image:url(https://getfirebug.com/releases/lite/latest/skin/xp/tree_open.gif);background-repeat:no-repeat;background-position:2px 2px;min-height:12px;}.logRow-errorMessage > .hasTwisty.opened > .errorTitle,.logRow-log > .objectBox-array.hasTwisty.opened,.logRow-spy.opened .spyHead .spyTitle,.logGroup.opened > .logRow,.memberRow.hasChildren.opened > .memberLabelCell > .memberLabel,.nodeBox.highlightOpen > .nodeLabel > .twisty,.nodeBox.open > .nodeLabel > .twisty,.netRow.opened > .netCol > .netHrefLabel,.netPageRow.opened > .netCol > .netPageTitle{background-image:url(https://getfirebug.com/releases/lite/latest/skin/xp/tree_close.gif);}.twisty{background-position:4px 4px;}* html .logRow-spy .spyHead .spyTitle,* html .logGroup .logGroupLabel,* html .hasChildren .memberLabelCell .memberLabel,* html .hasHeaders .netHrefLabel{background-image:url(https://getfirebug.com/releases/lite/latest/skin/xp/tree_open.gif);background-repeat:no-repeat;background-position:2px 2px;}* html .opened .spyHead .spyTitle,* html .opened .logGroupLabel,* html .opened .memberLabelCell .memberLabel{background-image:url(https://getfirebug.com/releases/lite/latest/skin/xp/tree_close.gif);background-repeat:no-repeat;background-position:2px 2px;}.panelNode-console{overflow-x:hidden;}.objectLink{text-decoration:none;}.objectLink:hover{cursor:pointer;text-decoration:underline;}.logRow{position:relative;margin:0;border-bottom:1px solid #D7D7D7;padding:2px 4px 1px 6px;background-color:#FFFFFF;overflow:hidden !important;}.useA11y .logRow:focus{border-bottom:1px solid #000000 !important;outline:none !important;background-color:#FFFFAD !important;}.useA11y .logRow:focus a.objectLink-sourceLink{background-color:#FFFFAD;}.useA11y .a11yFocus:focus,.useA11y .objectBox:focus{outline:2px solid #FF9933;background-color:#FFFFAD;}.useA11y .objectBox-null:focus,.useA11y .objectBox-undefined:focus{background-color:#888888 !important;}.useA11y .logGroup.opened > .logRow{border-bottom:1px solid #ffffff;}.logGroup{background:url(https://getfirebug.com/releases/lite/latest/skin/xp/group.gif) repeat-x #FFFFFF;padding:0 !important;border:none !important;}.logGroupBody{display:none;margin-left:16px;border-left:1px solid #D7D7D7;border-top:1px solid #D7D7D7;background:#FFFFFF;}.logGroup > .logRow{background-color:transparent !important;font-weight:bold;}.logGroup.opened > .logRow{border-bottom:none;}.logGroup.opened > .logGroupBody{display:block;}.logRow-command > .objectBox-text{font-family:Monaco,monospace;color:#0000FF;white-space:pre-wrap;}.logRow-info,.logRow-warn,.logRow-error,.logRow-assert,.logRow-warningMessage,.logRow-errorMessage{padding-left:22px;background-repeat:no-repeat;background-position:4px 2px;}.logRow-assert,.logRow-warningMessage,.logRow-errorMessage{padding-top:0;padding-bottom:0;}.logRow-info,.logRow-info .objectLink-sourceLink{background-color:#FFFFFF;}.logRow-warn,.logRow-warningMessage,.logRow-warn .objectLink-sourceLink,.logRow-warningMessage .objectLink-sourceLink{background-color:cyan;}.logRow-error,.logRow-assert,.logRow-errorMessage,.logRow-error .objectLink-sourceLink,.logRow-errorMessage .objectLink-sourceLink{background-color:LightYellow;}.logRow-error,.logRow-assert,.logRow-errorMessage{color:#FF0000;}.logRow-info{}.logRow-warn,.logRow-warningMessage{}.logRow-error,.logRow-assert,.logRow-errorMessage{}.objectBox-string,.objectBox-text,.objectBox-number,.objectLink-element,.objectLink-textNode,.objectLink-function,.objectBox-stackTrace,.objectLink-profile{font-family:Monaco,monospace;}.objectBox-string,.objectBox-text,.objectLink-textNode{white-space:pre-wrap;}.objectBox-number,.objectLink-styleRule,.objectLink-element,.objectLink-textNode{color:#000088;}.objectBox-string{color:#FF0000;}.objectLink-function,.objectBox-stackTrace,.objectLink-profile{color:DarkGreen;}.objectBox-null,.objectBox-undefined{padding:0 2px;border:1px solid #666666;background-color:#888888;color:#FFFFFF;}.objectBox-exception{padding:0 2px 0 18px;color:red;}.objectLink-sourceLink{position:absolute;right:4px;top:2px;padding-left:8px;font-family:Lucida Grande,sans-serif;font-weight:bold;color:#0000FF;}.errorTitle{margin-top:0px;margin-bottom:1px;padding-top:2px;padding-bottom:2px;}.errorTrace{margin-left:17px;}.errorSourceBox{margin:2px 0;}.errorSource-none{display:none;}.errorSource-syntax > .errorBreak{visibility:hidden;}.errorSource{cursor:pointer;font-family:Monaco,monospace;color:DarkGreen;}.errorSource:hover{text-decoration:underline;}.errorBreak{cursor:pointer;display:none;margin:0 6px 0 0;width:13px;height:14px;vertical-align:bottom;opacity:0.1;}.hasBreakSwitch .errorBreak{display:inline;}.breakForError .errorBreak{opacity:1;}.assertDescription{margin:0;}.logRow-profile > .logRow > .objectBox-text{font-family:Lucida Grande,Tahoma,sans-serif;color:#000000;}.logRow-profile > .logRow > .objectBox-text:last-child{color:#555555;font-style:italic;}.logRow-profile.opened > .logRow{padding-bottom:4px;}.profilerRunning > .logRow{padding-left:22px !important;}.profileSizer{width:100%;overflow-x:auto;overflow-y:scroll;}.profileTable{border-bottom:1px solid #D7D7D7;padding:0 0 4px 0;}.profileTable tr[odd="1"]{background-color:#F5F5F5;vertical-align:middle;}.profileTable a{vertical-align:middle;}.profileTable td{padding:1px 4px 0 4px;}.headerCell{cursor:pointer;-moz-user-select:none;border-bottom:1px solid #9C9C9C;padding:0 !important;font-weight:bold;}.headerCellBox{padding:2px 4px;border-left:1px solid #D9D9D9;border-right:1px solid #9C9C9C;}.headerCell:hover:active{}.headerSorted{}.headerSorted > .headerCellBox{border-right-color:#6B7C93;}.headerSorted.sortedAscending > .headerCellBox{}.headerSorted:hover:active{}.linkCell{text-align:right;}.linkCell > .objectLink-sourceLink{position:static;}.logRow-stackTrace{padding-top:0;background:#f8f8f8;}.logRow-stackTrace > .objectBox-stackFrame{position:relative;padding-top:2px;}.objectLink-object{font-family:Lucida Grande,sans-serif;font-weight:bold;color:DarkGreen;white-space:pre-wrap;}.objectProp-object{color:DarkGreen;}.objectProps{color:#000;font-weight:normal;}.objectPropName{color:#777;}.objectProps .objectProp-string{color:#f55;}.objectProps .objectProp-number{color:#55a;}.objectProps .objectProp-object{color:#585;}.selectorTag,.selectorId,.selectorClass{font-family:Monaco,monospace;font-weight:normal;}.selectorTag{color:#0000FF;}.selectorId{color:DarkBlue;}.selectorClass{color:red;}.selectorHidden > .selectorTag{color:#5F82D9;}.selectorHidden > .selectorId{color:#888888;}.selectorHidden > .selectorClass{color:#D86060;}.selectorValue{font-family:Lucida Grande,sans-serif;font-style:italic;color:#555555;}.panelNode.searching .logRow{display:none;}.logRow.matched{display:block !important;}.logRow.matching{position:absolute;left:-1000px;top:-1000px;max-width:0;max-height:0;overflow:hidden;}.objectLeftBrace,.objectRightBrace,.objectEqual,.objectComma,.arrayLeftBracket,.arrayRightBracket,.arrayComma{font-family:Monaco,monospace;}.objectLeftBrace,.objectRightBrace,.arrayLeftBracket,.arrayRightBracket{font-weight:bold;}.objectLeftBrace,.arrayLeftBracket{margin-right:4px;}.objectRightBrace,.arrayRightBracket{margin-left:4px;}.logRow-dir{padding:0;}.logRow-errorMessage .hasTwisty .errorTitle,.logRow-spy .spyHead .spyTitle,.logGroup .logRow{cursor:pointer;padding-left:18px;background-repeat:no-repeat;background-position:3px 3px;}.logRow-errorMessage > .hasTwisty > .errorTitle{background-position:2px 3px;}.logRow-errorMessage > .hasTwisty > .errorTitle:hover,.logRow-spy .spyHead .spyTitle:hover,.logGroup > .logRow:hover{text-decoration:underline;}.logRow-spy{padding:0 !important;}.logRow-spy,.logRow-spy .objectLink-sourceLink{background:url(https://getfirebug.com/releases/lite/latest/skin/xp/group.gif) repeat-x #FFFFFF;padding-right:4px;right:0;}.logRow-spy.opened{padding-bottom:4px;border-bottom:none;}.spyTitle{color:#000000;font-weight:bold;-moz-box-sizing:padding-box;overflow:hidden;z-index:100;padding-left:18px;}.spyCol{padding:0;white-space:nowrap;height:16px;}.spyTitleCol:hover > .objectLink-sourceLink,.spyTitleCol:hover > .spyTime,.spyTitleCol:hover > .spyStatus,.spyTitleCol:hover > .spyTitle{display:none;}.spyFullTitle{display:none;-moz-user-select:none;max-width:100%;background-color:Transparent;}.spyTitleCol:hover > .spyFullTitle{display:block;}.spyStatus{padding-left:10px;color:rgb(128,128,128);}.spyTime{margin-left:4px;margin-right:4px;color:rgb(128,128,128);}.spyIcon{margin-right:4px;margin-left:4px;width:16px;height:16px;vertical-align:middle;background:transparent no-repeat 0 0;display:none;}.loading .spyHead .spyRow .spyIcon{background-image:url(https://getfirebug.com/releases/lite/latest/skin/xp/loading_16.gif);display:block;}.logRow-spy.loaded:not(.error) .spyHead .spyRow .spyIcon{width:0;margin:0;}.logRow-spy.error .spyHead .spyRow .spyIcon{background-image:url(https://getfirebug.com/releases/lite/latest/skin/xp/errorIcon-sm.png);display:block;background-position:2px 2px;}.logRow-spy .spyHead .netInfoBody{display:none;}.logRow-spy.opened .spyHead .netInfoBody{margin-top:10px;display:block;}.logRow-spy.error .spyTitle,.logRow-spy.error .spyStatus,.logRow-spy.error .spyTime{color:red;}.logRow-spy.loading .spyResponseText{font-style:italic;color:#888888;}.caption{font-family:Lucida Grande,Tahoma,sans-serif;font-weight:bold;color:#444444;}.warning{padding:10px;font-family:Lucida Grande,Tahoma,sans-serif;font-weight:bold;color:#888888;}.panelNode-dom{overflow-x:hidden !important;}.domTable{font-size:1em;width:100%;table-layout:fixed;background:#fff;}.domTableIE{width:auto;}.memberLabelCell{padding:2px 0 2px 0;vertical-align:top;}.memberValueCell{padding:1px 0 1px 5px;display:block;overflow:hidden;}.memberLabel{display:block;cursor:default;-moz-user-select:none;overflow:hidden;padding-left:18px;background-color:#FFFFFF;text-decoration:none;}.memberRow.hasChildren .memberLabelCell .memberLabel:hover{cursor:pointer;color:blue;text-decoration:underline;}.userLabel{color:#000000;font-weight:bold;}.userClassLabel{color:#E90000;font-weight:bold;}.userFunctionLabel{color:#025E2A;font-weight:bold;}.domLabel{color:#000000;}.domFunctionLabel{color:#025E2A;}.ordinalLabel{color:SlateBlue;font-weight:bold;}.scopesRow{padding:2px 18px;background-color:LightYellow;border-bottom:5px solid #BEBEBE;color:#666666;}.scopesLabel{background-color:LightYellow;}.watchEditCell{padding:2px 18px;background-color:LightYellow;border-bottom:1px solid #BEBEBE;color:#666666;}.editor-watchNewRow,.editor-memberRow{font-family:Monaco,monospace !important;}.editor-memberRow{padding:1px 0 !important;}.editor-watchRow{padding-bottom:0 !important;}.watchRow > .memberLabelCell{font-family:Monaco,monospace;padding-top:1px;padding-bottom:1px;}.watchRow > .memberLabelCell > .memberLabel{background-color:transparent;}.watchRow > .memberValueCell{padding-top:2px;padding-bottom:2px;}.watchRow > .memberLabelCell,.watchRow > .memberValueCell{background-color:#F5F5F5;border-bottom:1px solid #BEBEBE;}.watchToolbox{z-index:2147483647;position:absolute;right:0;padding:1px 2px;}#fbConsole{overflow-x:hidden !important;}#fbCSS{font:1em Monaco,monospace;padding:0 7px;}#fbstylesheetButtons select,#fbScriptButtons select{font:11px Lucida Grande,Tahoma,sans-serif;margin-top:1px;padding-left:3px;background:#fafafa;border:1px inset #fff;width:220px;outline:none;}.Selector{margin-top:10px}.CSSItem{margin-left:4%}.CSSText{padding-left:20px;}.CSSProperty{color:#005500;}.CSSValue{padding-left:5px; color:#000088;}#fbHTMLStatusBar{display:inline;}.fbToolbarButtons{display:none;}.fbStatusSeparator{display:block;float:left;padding-top:4px;}#fbStatusBarBox{display:none;}#fbToolbarContent{display:block;position:absolute;_position:absolute;top:0;padding-top:4px;height:23px;clip:rect(0,2048px,27px,0);}.fbTabMenuTarget{display:none !important;float:left;width:10px;height:10px;margin-top:6px;background:url(https://getfirebug.com/releases/lite/latest/skin/xp/tabMenuTarget.png);}.fbTabMenuTarget:hover{background:url(https://getfirebug.com/releases/lite/latest/skin/xp/tabMenuTargetHover.png);}.fbShadow{float:left;background:url(https://getfirebug.com/releases/lite/latest/skin/xp/shadowAlpha.png) no-repeat bottom right !important;background:url(https://getfirebug.com/releases/lite/latest/skin/xp/shadow2.gif) no-repeat bottom right;margin:10px 0 0 10px !important;margin:10px 0 0 5px;}.fbShadowContent{display:block;position:relative;background-color:#fff;border:1px solid #a9a9a9;top:-6px;left:-6px;}.fbMenu{display:none;position:absolute;font-size:11px;line-height:13px;z-index:2147483647;}.fbMenuContent{padding:2px;}.fbMenuSeparator{display:block;position:relative;padding:1px 18px 0;text-decoration:none;color:#000;cursor:default;background:#ACA899;margin:4px 0;}.fbMenuOption{display:block;position:relative;padding:2px 18px;text-decoration:none;color:#000;cursor:default;}.fbMenuOption:hover{color:#fff;background:#316AC5;}.fbMenuGroup{background:transparent url(https://getfirebug.com/releases/lite/latest/skin/xp/tabMenuPin.png) no-repeat right 0;}.fbMenuGroup:hover{background:#316AC5 url(https://getfirebug.com/releases/lite/latest/skin/xp/tabMenuPin.png) no-repeat right -17px;}.fbMenuGroupSelected{color:#fff;background:#316AC5 url(https://getfirebug.com/releases/lite/latest/skin/xp/tabMenuPin.png) no-repeat right -17px;}.fbMenuChecked{background:transparent url(https://getfirebug.com/releases/lite/latest/skin/xp/tabMenuCheckbox.png) no-repeat 4px 0;}.fbMenuChecked:hover{background:#316AC5 url(https://getfirebug.com/releases/lite/latest/skin/xp/tabMenuCheckbox.png) no-repeat 4px -17px;}.fbMenuRadioSelected{background:transparent url(https://getfirebug.com/releases/lite/latest/skin/xp/tabMenuRadio.png) no-repeat 4px 0;}.fbMenuRadioSelected:hover{background:#316AC5 url(https://getfirebug.com/releases/lite/latest/skin/xp/tabMenuRadio.png) no-repeat 4px -17px;}.fbMenuShortcut{padding-right:85px;}.fbMenuShortcutKey{position:absolute;right:0;top:2px;width:77px;}#fbFirebugMenu{top:22px;left:0;}.fbMenuDisabled{color:#ACA899 !important;}#fbFirebugSettingsMenu{left:245px;top:99px;}#fbConsoleMenu{top:42px;left:48px;}.fbIconButton{display:block;}.fbIconButton{display:block;}.fbIconButton{display:block;float:left;height:20px;width:20px;color:#000;margin-right:2px;text-decoration:none;cursor:default;}.fbIconButton:hover{position:relative;top:-1px;left:-1px;margin-right:0;_margin-right:1px;color:#333;border:1px solid #fff;border-bottom:1px solid #bbb;border-right:1px solid #bbb;}.fbIconPressed{position:relative;margin-right:0;_margin-right:1px;top:0 !important;left:0 !important;height:19px;color:#333 !important;border:1px solid #bbb !important;border-bottom:1px solid #cfcfcf !important;border-right:1px solid #ddd !important;}#fbErrorPopup{position:absolute;right:0;bottom:0;height:19px;width:75px;background:url(https://getfirebug.com/releases/lite/latest/skin/xp/sprite.png) #f1f2ee 0 0;z-index:999;}#fbErrorPopupContent{position:absolute;right:0;top:1px;height:18px;width:75px;_width:74px;border-left:1px solid #aca899;}#fbErrorIndicator{position:absolute;top:2px;right:5px;}.fbBtnInspectActive{background:#aaa;color:#fff !important;}.fbBody{margin:0;padding:0;overflow:hidden;font-family:Lucida Grande,Tahoma,sans-serif;font-size:11px;background:#fff;}.clear{clear:both;}#fbMiniChrome{display:none;right:0;height:27px;background:url(https://getfirebug.com/releases/lite/latest/skin/xp/sprite.png) #f1f2ee 0 0;margin-left:1px;}#fbMiniContent{display:block;position:relative;left:-1px;right:0;top:1px;height:25px;border-left:1px solid #aca899;}#fbToolbarSearch{float:right;border:1px solid #ccc;margin:0 5px 0 0;background:#fff url(https://getfirebug.com/releases/lite/latest/skin/xp/search.png) no-repeat 4px 2px !important;background:#fff url(https://getfirebug.com/releases/lite/latest/skin/xp/search.gif) no-repeat 4px 2px;padding-left:20px;font-size:11px;}#fbToolbarErrors{float:right;margin:1px 4px 0 0;font-size:11px;}#fbLeftToolbarErrors{float:left;margin:7px 0px 0 5px;font-size:11px;}.fbErrors{padding-left:20px;height:14px;background:url(https://getfirebug.com/releases/lite/latest/skin/xp/errorIcon.png) no-repeat !important;background:url(https://getfirebug.com/releases/lite/latest/skin/xp/errorIcon.gif) no-repeat;color:#f00;font-weight:bold;}#fbMiniErrors{display:inline;display:none;float:right;margin:5px 2px 0 5px;}#fbMiniIcon{float:right;margin:3px 4px 0;height:20px;width:20px;float:right;background:url(https://getfirebug.com/releases/lite/latest/skin/xp/sprite.png) 0 -135px;cursor:pointer;}#fbChrome{font-family:Lucida Grande,Tahoma,sans-serif;font-size:11px;position:absolute;_position:static;top:0;left:0;height:100%;width:100%;border-collapse:collapse;border-spacing:0;background:#fff;overflow:hidden;}#fbChrome > tbody > tr > td{padding:0;}#fbTop{height:49px;}#fbToolbar{background:url(https://getfirebug.com/releases/lite/latest/skin/xp/sprite.png) #f1f2ee 0 0;height:27px;font-size:11px;line-height:13px;}#fbPanelBarBox{background:url(https://getfirebug.com/releases/lite/latest/skin/xp/sprite.png) #dbd9c9 0 -27px;height:22px;}#fbContent{height:100%;vertical-align:top;}#fbBottom{height:18px;background:#fff;}#fbToolbarIcon{float:left;padding:0 5px 0;}#fbToolbarIcon a{background:url(https://getfirebug.com/releases/lite/latest/skin/xp/sprite.png) 0 -135px;}#fbToolbarButtons{padding:0 2px 0 5px;}#fbToolbarButtons{padding:0 2px 0 5px;}.fbButton{text-decoration:none;display:block;float:left;color:#000;padding:4px 6px 4px 7px;cursor:default;}.fbButton:hover{color:#333;background:#f5f5ef url(https://getfirebug.com/releases/lite/latest/skin/xp/buttonBg.png);padding:3px 5px 3px 6px;border:1px solid #fff;border-bottom:1px solid #bbb;border-right:1px solid #bbb;}.fbBtnPressed{background:#e3e3db url(https://getfirebug.com/releases/lite/latest/skin/xp/buttonBgHover.png) !important;padding:3px 4px 2px 6px !important;margin:1px 0 0 1px !important;border:1px solid #ACA899 !important;border-color:#ACA899 #ECEBE3 #ECEBE3 #ACA899 !important;}#fbStatusBarBox{top:4px;cursor:default;}.fbToolbarSeparator{overflow:hidden;border:1px solid;border-color:transparent #fff transparent #777;_border-color:#eee #fff #eee #777;height:7px;margin:6px 3px;float:left;}.fbBtnSelected{font-weight:bold;}.fbStatusBar{color:#aca899;}.fbStatusBar a{text-decoration:none;color:black;}.fbStatusBar a:hover{color:blue;cursor:pointer;}#fbWindowButtons{position:absolute;white-space:nowrap;right:0;top:0;height:17px;width:48px;padding:5px;z-index:6;background:url(https://getfirebug.com/releases/lite/latest/skin/xp/sprite.png) #f1f2ee 0 0;}#fbPanelBar1{width:1024px; z-index:8;left:0;white-space:nowrap;background:url(https://getfirebug.com/releases/lite/latest/skin/xp/sprite.png) #dbd9c9 0 -27px;position:absolute;left:4px;}#fbPanelBar2Box{background:url(https://getfirebug.com/releases/lite/latest/skin/xp/sprite.png) #dbd9c9 0 -27px;position:absolute;height:22px;width:300px; z-index:9;right:0;}#fbPanelBar2{position:absolute;width:290px; height:22px;padding-left:4px;}.fbPanel{display:none;}#fbPanelBox1,#fbPanelBox2{max-height:inherit;height:100%;font-size:1em;}#fbPanelBox2{background:#fff;}#fbPanelBox2{width:300px;background:#fff;}#fbPanel2{margin-left:6px;background:#fff;}#fbLargeCommandLine{display:none;position:absolute;z-index:9;top:27px;right:0;width:294px;height:201px;border-width:0;margin:0;padding:2px 0 0 2px;resize:none;outline:none;font-size:11px;overflow:auto;border-top:1px solid #B9B7AF;_right:-1px;_border-left:1px solid #fff;}#fbLargeCommandButtons{display:none;background:#ECE9D8;bottom:0;right:0;width:294px;height:21px;padding-top:1px;position:fixed;border-top:1px solid #ACA899;z-index:9;}#fbSmallCommandLineIcon{background:url(https://getfirebug.com/releases/lite/latest/skin/xp/down.png) no-repeat;position:absolute;right:2px;bottom:3px;z-index:99;}#fbSmallCommandLineIcon:hover{background:url(https://getfirebug.com/releases/lite/latest/skin/xp/downHover.png) no-repeat;}.hide{overflow:hidden !important;position:fixed !important;display:none !important;visibility:hidden !important;}#fbCommand{height:18px;}#fbCommandBox{position:fixed;_position:absolute;width:100%;height:18px;bottom:0;overflow:hidden;z-index:9;background:#fff;border:0;border-top:1px solid #ccc;}#fbCommandIcon{position:absolute;color:#00f;top:2px;left:6px;display:inline;font:11px Monaco,monospace;z-index:10;}#fbCommandLine{position:absolute;width:100%;top:0;left:0;border:0;margin:0;padding:2px 0 2px 32px;font:11px Monaco,monospace;z-index:9;outline:none;}#fbLargeCommandLineIcon{background:url(https://getfirebug.com/releases/lite/latest/skin/xp/up.png) no-repeat;position:absolute;right:1px;bottom:1px;z-index:10;}#fbLargeCommandLineIcon:hover{background:url(https://getfirebug.com/releases/lite/latest/skin/xp/upHover.png) no-repeat;}div.fbFitHeight{overflow:auto;position:relative;}.fbSmallButton{overflow:hidden;width:16px;height:16px;display:block;text-decoration:none;cursor:default;}#fbWindowButtons .fbSmallButton{float:right;}#fbWindow_btClose{background:url(https://getfirebug.com/releases/lite/latest/skin/xp/min.png);}#fbWindow_btClose:hover{background:url(https://getfirebug.com/releases/lite/latest/skin/xp/minHover.png);}#fbWindow_btDetach{background:url(https://getfirebug.com/releases/lite/latest/skin/xp/detach.png);}#fbWindow_btDetach:hover{background:url(https://getfirebug.com/releases/lite/latest/skin/xp/detachHover.png);}#fbWindow_btDeactivate{background:url(https://getfirebug.com/releases/lite/latest/skin/xp/off.png);}#fbWindow_btDeactivate:hover{background:url(https://getfirebug.com/releases/lite/latest/skin/xp/offHover.png);}.fbTab{text-decoration:none;display:none;float:left;width:auto;float:left;cursor:default;font-family:Lucida Grande,Tahoma,sans-serif;font-size:11px;line-height:13px;font-weight:bold;height:22px;color:#565656;}.fbPanelBar span{float:left;}.fbPanelBar .fbTabL,.fbPanelBar .fbTabR{height:22px;width:8px;}.fbPanelBar .fbTabText{padding:4px 1px 0;}a.fbTab:hover{background:url(https://getfirebug.com/releases/lite/latest/skin/xp/sprite.png) 0 -73px;}a.fbTab:hover .fbTabL{background:url(https://getfirebug.com/releases/lite/latest/skin/xp/sprite.png) -16px -96px;}a.fbTab:hover .fbTabR{background:url(https://getfirebug.com/releases/lite/latest/skin/xp/sprite.png) -24px -96px;}.fbSelectedTab{background:url(https://getfirebug.com/releases/lite/latest/skin/xp/sprite.png) #f1f2ee 0 -50px !important;color:#000;}.fbSelectedTab .fbTabL{background:url(https://getfirebug.com/releases/lite/latest/skin/xp/sprite.png) 0 -96px !important;}.fbSelectedTab .fbTabR{background:url(https://getfirebug.com/releases/lite/latest/skin/xp/sprite.png) -8px -96px !important;}#fbHSplitter{position:fixed;_position:absolute;left:0;top:0;width:100%;height:5px;overflow:hidden;cursor:n-resize !important;background:url(https://getfirebug.com/releases/lite/latest/skin/xp/pixel_transparent.gif);z-index:9;}#fbHSplitter.fbOnMovingHSplitter{height:100%;z-index:100;}.fbVSplitter{background:#ece9d8;color:#000;border:1px solid #716f64;border-width:0 1px;border-left-color:#aca899;width:4px;cursor:e-resize;overflow:hidden;right:294px;text-decoration:none;z-index:10;position:absolute;height:100%;top:27px;}div.lineNo{font:1em/1.4545em Monaco,monospace;position:relative;float:left;top:0;left:0;margin:0 5px 0 0;padding:0 5px 0 10px;background:#eee;color:#888;border-right:1px solid #ccc;text-align:right;}.sourceBox{position:absolute;}.sourceCode{font:1em Monaco,monospace;overflow:hidden;white-space:pre;display:inline;}.nodeControl{margin-top:3px;margin-left:-14px;float:left;width:9px;height:9px;overflow:hidden;cursor:default;background:url(https://getfirebug.com/releases/lite/latest/skin/xp/tree_open.gif);_float:none;_display:inline;_position:absolute;}div.nodeMaximized{background:url(https://getfirebug.com/releases/lite/latest/skin/xp/tree_close.gif);}div.objectBox-element{padding:1px 3px;}.objectBox-selector{cursor:default;}.selectedElement{background:highlight;color:#fff !important;}.selectedElement span{color:#fff !important;}* html .selectedElement{position:relative;}@media screen and (-webkit-min-device-pixel-ratio:0){.selectedElement{background:#316AC5;color:#fff !important;}}.logRow *{font-size:1em;}.logRow{position:relative;border-bottom:1px solid #D7D7D7;padding:2px 4px 1px 6px;zbackground-color:#FFFFFF;}.logRow-command{font-family:Monaco,monospace;color:blue;}.objectBox-string,.objectBox-text,.objectBox-number,.objectBox-function,.objectLink-element,.objectLink-textNode,.objectLink-function,.objectBox-stackTrace,.objectLink-profile{font-family:Monaco,monospace;}.objectBox-null{padding:0 2px;border:1px solid #666666;background-color:#888888;color:#FFFFFF;}.objectBox-string{color:red;}.objectBox-number{color:#000088;}.objectBox-function{color:DarkGreen;}.objectBox-object{color:DarkGreen;font-weight:bold;font-family:Lucida Grande,sans-serif;}.objectBox-array{color:#000;}.logRow-info,.logRow-error,.logRow-warn{background:#fff no-repeat 2px 2px;padding-left:20px;padding-bottom:3px;}.logRow-info{background-image:url(https://getfirebug.com/releases/lite/latest/skin/xp/infoIcon.png) !important;background-image:url(https://getfirebug.com/releases/lite/latest/skin/xp/infoIcon.gif);}.logRow-warn{background-color:cyan;background-image:url(https://getfirebug.com/releases/lite/latest/skin/xp/warningIcon.png) !important;background-image:url(https://getfirebug.com/releases/lite/latest/skin/xp/warningIcon.gif);}.logRow-error{background-color:LightYellow;background-image:url(https://getfirebug.com/releases/lite/latest/skin/xp/errorIcon.png) !important;background-image:url(https://getfirebug.com/releases/lite/latest/skin/xp/errorIcon.gif);color:#f00;}.errorMessage{vertical-align:top;color:#f00;}.objectBox-sourceLink{position:absolute;right:4px;top:2px;padding-left:8px;font-family:Lucida Grande,sans-serif;font-weight:bold;color:#0000FF;}.selectorTag,.selectorId,.selectorClass{font-family:Monaco,monospace;font-weight:normal;}.selectorTag{color:#0000FF;}.selectorId{color:DarkBlue;}.selectorClass{color:red;}.objectBox-element{font-family:Monaco,monospace;color:#000088;}.nodeChildren{padding-left:26px;}.nodeTag{color:blue;cursor:pointer;}.nodeValue{color:#FF0000;font-weight:normal;}.nodeText,.nodeComment{margin:0 2px;vertical-align:top;}.nodeText{color:#333333;font-family:Monaco,monospace;}.nodeComment{color:DarkGreen;}.nodeHidden,.nodeHidden *{color:#888888;}.nodeHidden .nodeTag{color:#5F82D9;}.nodeHidden .nodeValue{color:#D86060;}.selectedElement .nodeHidden,.selectedElement .nodeHidden *{color:SkyBlue !important;}.log-object{}.property{position:relative;clear:both;height:15px;}.propertyNameCell{vertical-align:top;float:left;width:28%;position:absolute;left:0;z-index:0;}.propertyValueCell{float:right;width:68%;background:#fff;position:absolute;padding-left:5px;display:table-cell;right:0;z-index:1;}.propertyName{font-weight:bold;}.FirebugPopup{height:100% !important;}.FirebugPopup #fbWindowButtons{display:none !important;}.FirebugPopup #fbHSplitter{display:none !important;}',
+ HTML: '<table id="fbChrome" cellpadding="0" cellspacing="0" border="0"><tbody><tr><td id="fbTop" colspan="2"><div id="fbWindowButtons"><a id="fbWindow_btDeactivate" class="fbSmallButton fbHover" title="Deactivate Firebug for this web page"> </a><a id="fbWindow_btDetach" class="fbSmallButton fbHover" title="Open Firebug in popup window"> </a><a id="fbWindow_btClose" class="fbSmallButton fbHover" title="Minimize Firebug"> </a></div><div id="fbToolbar"><div id="fbToolbarContent"><span id="fbToolbarIcon"><a id="fbFirebugButton" class="fbIconButton" class="fbHover" target="_blank"> </a></span><span id="fbToolbarButtons"><span id="fbFixedButtons"><a id="fbChrome_btInspect" class="fbButton fbHover" title="Click an element in the page to inspect">Inspect</a></span><span id="fbConsoleButtons" class="fbToolbarButtons"><a id="fbConsole_btClear" class="fbButton fbHover" title="Clear the console">Clear</a></span></span><span id="fbStatusBarBox"><span class="fbToolbarSeparator"></span></span></div></div><div id="fbPanelBarBox"><div id="fbPanelBar1" class="fbPanelBar"><a id="fbConsoleTab" class="fbTab fbHover"><span class="fbTabL"></span><span class="fbTabText">Console</span><span class="fbTabMenuTarget"></span><span class="fbTabR"></span></a><a id="fbHTMLTab" class="fbTab fbHover"><span class="fbTabL"></span><span class="fbTabText">HTML</span><span class="fbTabR"></span></a><a class="fbTab fbHover"><span class="fbTabL"></span><span class="fbTabText">CSS</span><span class="fbTabR"></span></a><a class="fbTab fbHover"><span class="fbTabL"></span><span class="fbTabText">Script</span><span class="fbTabR"></span></a><a class="fbTab fbHover"><span class="fbTabL"></span><span class="fbTabText">DOM</span><span class="fbTabR"></span></a></div><div id="fbPanelBar2Box" class="hide"><div id="fbPanelBar2" class="fbPanelBar"></div></div></div><div id="fbHSplitter"> </div></td></tr><tr id="fbContent"><td id="fbPanelBox1"><div id="fbPanel1" class="fbFitHeight"><div id="fbConsole" class="fbPanel"></div><div id="fbHTML" class="fbPanel"></div></div></td><td id="fbPanelBox2" class="hide"><div id="fbVSplitter" class="fbVSplitter"> </div><div id="fbPanel2" class="fbFitHeight"><div id="fbHTML_Style" class="fbPanel"></div><div id="fbHTML_Layout" class="fbPanel"></div><div id="fbHTML_DOM" class="fbPanel"></div></div><textarea id="fbLargeCommandLine" class="fbFitHeight"></textarea><div id="fbLargeCommandButtons"><a id="fbCommand_btRun" class="fbButton fbHover">Run</a><a id="fbCommand_btClear" class="fbButton fbHover">Clear</a><a id="fbSmallCommandLineIcon" class="fbSmallButton fbHover"></a></div></td></tr><tr id="fbBottom" class="hide"><td id="fbCommand" colspan="2"><div id="fbCommandBox"><div id="fbCommandIcon">>>></div><input id="fbCommandLine" name="fbCommandLine" type="text"/><a id="fbLargeCommandLineIcon" class="fbSmallButton fbHover"></a></div></td></tr></tbody></table><span id="fbMiniChrome"><span id="fbMiniContent"><span id="fbMiniIcon" title="Open Firebug Lite"></span><span id="fbMiniErrors" class="fbErrors"></span></span></span>'
+};
+
+// ************************************************************************************************
+}});
+
+// ************************************************************************************************
+FBL.initialize();
+// ************************************************************************************************
+
+})();
\ No newline at end of file
diff --git a/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/json-js/json2.js b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/json-js/json2.js
new file mode 100644
index 0000000..5838457
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/json-js/json2.js
@@ -0,0 +1,519 @@
+/*
+ json2.js
+ 2015-05-03
+
+ Public Domain.
+
+ NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.
+
+ See http://www.JSON.org/js.html
+
+
+ This code should be minified before deployment.
+ See http://javascript.crockford.com/jsmin.html
+
+ USE YOUR OWN COPY. IT IS EXTREMELY UNWISE TO LOAD CODE FROM SERVERS YOU DO
+ NOT CONTROL.
+
+
+ This file creates a global JSON object containing two methods: stringify
+ and parse. This file is provides the ES5 JSON capability to ES3 systems.
+ If a project might run on IE8 or earlier, then this file should be included.
+ This file does nothing on ES5 systems.
+
+ JSON.stringify(value, replacer, space)
+ value any JavaScript value, usually an object or array.
+
+ replacer an optional parameter that determines how object
+ values are stringified for objects. It can be a
+ function or an array of strings.
+
+ space an optional parameter that specifies the indentation
+ of nested structures. If it is omitted, the text will
+ be packed without extra whitespace. If it is a number,
+ it will specify the number of spaces to indent at each
+ level. If it is a string (such as '\t' or ' '),
+ it contains the characters used to indent at each level.
+
+ This method produces a JSON text from a JavaScript value.
+
+ When an object value is found, if the object contains a toJSON
+ method, its toJSON method will be called and the result will be
+ stringified. A toJSON method does not serialize: it returns the
+ value represented by the name/value pair that should be serialized,
+ or undefined if nothing should be serialized. The toJSON method
+ will be passed the key associated with the value, and this will be
+ bound to the value
+
+ For example, this would serialize Dates as ISO strings.
+
+ Date.prototype.toJSON = function (key) {
+ function f(n) {
+ // Format integers to have at least two digits.
+ return n < 10
+ ? '0' + n
+ : n;
+ }
+
+ return this.getUTCFullYear() + '-' +
+ f(this.getUTCMonth() + 1) + '-' +
+ f(this.getUTCDate()) + 'T' +
+ f(this.getUTCHours()) + ':' +
+ f(this.getUTCMinutes()) + ':' +
+ f(this.getUTCSeconds()) + 'Z';
+ };
+
+ You can provide an optional replacer method. It will be passed the
+ key and value of each member, with this bound to the containing
+ object. The value that is returned from your method will be
+ serialized. If your method returns undefined, then the member will
+ be excluded from the serialization.
+
+ If the replacer parameter is an array of strings, then it will be
+ used to select the members to be serialized. It filters the results
+ such that only members with keys listed in the replacer array are
+ stringified.
+
+ Values that do not have JSON representations, such as undefined or
+ functions, will not be serialized. Such values in objects will be
+ dropped; in arrays they will be replaced with null. You can use
+ a replacer function to replace those with JSON values.
+ JSON.stringify(undefined) returns undefined.
+
+ The optional space parameter produces a stringification of the
+ value that is filled with line breaks and indentation to make it
+ easier to read.
+
+ If the space parameter is a non-empty string, then that string will
+ be used for indentation. If the space parameter is a number, then
+ the indentation will be that many spaces.
+
+ Example:
+
+ text = JSON.stringify(['e', {pluribus: 'unum'}]);
+ // text is '["e",{"pluribus":"unum"}]'
+
+
+ text = JSON.stringify(['e', {pluribus: 'unum'}], null, '\t');
+ // text is '[\n\t"e",\n\t{\n\t\t"pluribus": "unum"\n\t}\n]'
+
+ text = JSON.stringify([new Date()], function (key, value) {
+ return this[key] instanceof Date
+ ? 'Date(' + this[key] + ')'
+ : value;
+ });
+ // text is '["Date(---current time---)"]'
+
+
+ JSON.parse(text, reviver)
+ This method parses a JSON text to produce an object or array.
+ It can throw a SyntaxError exception.
+
+ The optional reviver parameter is a function that can filter and
+ transform the results. It receives each of the keys and values,
+ and its return value is used instead of the original value.
+ If it returns what it received, then the structure is not modified.
+ If it returns undefined then the member is deleted.
+
+ Example:
+
+ // Parse the text. Values that look like ISO date strings will
+ // be converted to Date objects.
+
+ myData = JSON.parse(text, function (key, value) {
+ var a;
+ if (typeof value === 'string') {
+ a =
+/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2}(?:\.\d*)?)Z$/.exec(value);
+ if (a) {
+ return new Date(Date.UTC(+a[1], +a[2] - 1, +a[3], +a[4],
+ +a[5], +a[6]));
+ }
+ }
+ return value;
+ });
+
+ myData = JSON.parse('["Date(09/09/2001)"]', function (key, value) {
+ var d;
+ if (typeof value === 'string' &&
+ value.slice(0, 5) === 'Date(' &&
+ value.slice(-1) === ')') {
+ d = new Date(value.slice(5, -1));
+ if (d) {
+ return d;
+ }
+ }
+ return value;
+ });
+
+
+ This is a reference implementation. You are free to copy, modify, or
+ redistribute.
+*/
+
+/*jslint
+ eval, for, this
+*/
+
+/*property
+ JSON, apply, call, charCodeAt, getUTCDate, getUTCFullYear, getUTCHours,
+ getUTCMinutes, getUTCMonth, getUTCSeconds, hasOwnProperty, join,
+ lastIndex, length, parse, prototype, push, replace, slice, stringify,
+ test, toJSON, toString, valueOf
+*/
+
+
+// Create a JSON object only if one does not already exist. We create the
+// methods in a closure to avoid creating global variables.
+
+if (typeof JSON !== 'object') {
+ JSON = {};
+}
+
+(function () {
+ 'use strict';
+
+ var rx_one = /^[\],:{}\s]*$/,
+ rx_two = /\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,
+ rx_three = /"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,
+ rx_four = /(?:^|:|,)(?:\s*\[)+/g,
+ rx_escapable = /[\\\"\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
+ rx_dangerous = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;
+
+ function f(n) {
+ // Format integers to have at least two digits.
+ return n < 10
+ ? '0' + n
+ : n;
+ }
+
+ function this_value() {
+ return this.valueOf();
+ }
+
+ if (typeof Date.prototype.toJSON !== 'function') {
+
+ Date.prototype.toJSON = function () {
+
+ return isFinite(this.valueOf())
+ ? this.getUTCFullYear() + '-' +
+ f(this.getUTCMonth() + 1) + '-' +
+ f(this.getUTCDate()) + 'T' +
+ f(this.getUTCHours()) + ':' +
+ f(this.getUTCMinutes()) + ':' +
+ f(this.getUTCSeconds()) + 'Z'
+ : null;
+ };
+
+ Boolean.prototype.toJSON = this_value;
+ Number.prototype.toJSON = this_value;
+ String.prototype.toJSON = this_value;
+ }
+
+ var gap,
+ indent,
+ meta,
+ rep;
+
+
+ function quote(string) {
+
+// If the string contains no control characters, no quote characters, and no
+// backslash characters, then we can safely slap some quotes around it.
+// Otherwise we must also replace the offending characters with safe escape
+// sequences.
+
+ rx_escapable.lastIndex = 0;
+ return rx_escapable.test(string)
+ ? '"' + string.replace(rx_escapable, function (a) {
+ var c = meta[a];
+ return typeof c === 'string'
+ ? c
+ : '\\u' + ('0000' + a.charCodeAt(0).toString(16)).slice(-4);
+ }) + '"'
+ : '"' + string + '"';
+ }
+
+
+ function str(key, holder) {
+
+// Produce a string from holder[key].
+
+ var i, // The loop counter.
+ k, // The member key.
+ v, // The member value.
+ length,
+ mind = gap,
+ partial,
+ value = holder[key];
+
+// If the value has a toJSON method, call it to obtain a replacement value.
+
+ if (value && typeof value === 'object' &&
+ typeof value.toJSON === 'function') {
+ value = value.toJSON(key);
+ }
+
+// If we were called with a replacer function, then call the replacer to
+// obtain a replacement value.
+
+ if (typeof rep === 'function') {
+ value = rep.call(holder, key, value);
+ }
+
+// What happens next depends on the value's type.
+
+ switch (typeof value) {
+ case 'string':
+ return quote(value);
+
+ case 'number':
+
+// JSON numbers must be finite. Encode non-finite numbers as null.
+
+ return isFinite(value)
+ ? String(value)
+ : 'null';
+
+ case 'boolean':
+ case 'null':
+
+// If the value is a boolean or null, convert it to a string. Note:
+// typeof null does not produce 'null'. The case is included here in
+// the remote chance that this gets fixed someday.
+
+ return String(value);
+
+// If the type is 'object', we might be dealing with an object or an array or
+// null.
+
+ case 'object':
+
+// Due to a specification blunder in ECMAScript, typeof null is 'object',
+// so watch out for that case.
+
+ if (!value) {
+ return 'null';
+ }
+
+// Make an array to hold the partial results of stringifying this object value.
+
+ gap += indent;
+ partial = [];
+
+// Is the value an array?
+
+ if (Object.prototype.toString.apply(value) === '[object Array]') {
+
+// The value is an array. Stringify every element. Use null as a placeholder
+// for non-JSON values.
+
+ length = value.length;
+ for (i = 0; i < length; i += 1) {
+ partial[i] = str(i, value) || 'null';
+ }
+
+// Join all of the elements together, separated with commas, and wrap them in
+// brackets.
+
+ v = partial.length === 0
+ ? '[]'
+ : gap
+ ? '[\n' + gap + partial.join(',\n' + gap) + '\n' + mind + ']'
+ : '[' + partial.join(',') + ']';
+ gap = mind;
+ return v;
+ }
+
+// If the replacer is an array, use it to select the members to be stringified.
+
+ if (rep && typeof rep === 'object') {
+ length = rep.length;
+ for (i = 0; i < length; i += 1) {
+ if (typeof rep[i] === 'string') {
+ k = rep[i];
+ v = str(k, value);
+ if (v) {
+ partial.push(quote(k) + (
+ gap
+ ? ': '
+ : ':'
+ ) + v);
+ }
+ }
+ }
+ } else {
+
+// Otherwise, iterate through all of the keys in the object.
+
+ for (k in value) {
+ if (Object.prototype.hasOwnProperty.call(value, k)) {
+ v = str(k, value);
+ if (v) {
+ partial.push(quote(k) + (
+ gap
+ ? ': '
+ : ':'
+ ) + v);
+ }
+ }
+ }
+ }
+
+// Join all of the member texts together, separated with commas,
+// and wrap them in braces.
+
+ v = partial.length === 0
+ ? '{}'
+ : gap
+ ? '{\n' + gap + partial.join(',\n' + gap) + '\n' + mind + '}'
+ : '{' + partial.join(',') + '}';
+ gap = mind;
+ return v;
+ }
+ }
+
+// If the JSON object does not yet have a stringify method, give it one.
+
+ if (typeof JSON.stringify !== 'function') {
+ meta = { // table of character substitutions
+ '\b': '\\b',
+ '\t': '\\t',
+ '\n': '\\n',
+ '\f': '\\f',
+ '\r': '\\r',
+ '"': '\\"',
+ '\\': '\\\\'
+ };
+ JSON.stringify = function (value, replacer, space) {
+
+// The stringify method takes a value and an optional replacer, and an optional
+// space parameter, and returns a JSON text. The replacer can be a function
+// that can replace values, or an array of strings that will select the keys.
+// A default replacer method can be provided. Use of the space parameter can
+// produce text that is more easily readable.
+
+ var i;
+ gap = '';
+ indent = '';
+
+// If the space parameter is a number, make an indent string containing that
+// many spaces.
+
+ if (typeof space === 'number') {
+ for (i = 0; i < space; i += 1) {
+ indent += ' ';
+ }
+
+// If the space parameter is a string, it will be used as the indent string.
+
+ } else if (typeof space === 'string') {
+ indent = space;
+ }
+
+// If there is a replacer, it must be a function or an array.
+// Otherwise, throw an error.
+
+ rep = replacer;
+ if (replacer && typeof replacer !== 'function' &&
+ (typeof replacer !== 'object' ||
+ typeof replacer.length !== 'number')) {
+ throw new Error('JSON.stringify');
+ }
+
+// Make a fake root object containing our value under the key of ''.
+// Return the result of stringifying the value.
+
+ return str('', {'': value});
+ };
+ }
+
+
+// If the JSON object does not yet have a parse method, give it one.
+
+ if (typeof JSON.parse !== 'function') {
+ JSON.parse = function (text, reviver) {
+
+// The parse method takes a text and an optional reviver function, and returns
+// a JavaScript value if the text is a valid JSON text.
+
+ var j;
+
+ function walk(holder, key) {
+
+// The walk method is used to recursively walk the resulting structure so
+// that modifications can be made.
+
+ var k, v, value = holder[key];
+ if (value && typeof value === 'object') {
+ for (k in value) {
+ if (Object.prototype.hasOwnProperty.call(value, k)) {
+ v = walk(value, k);
+ if (v !== undefined) {
+ value[k] = v;
+ } else {
+ delete value[k];
+ }
+ }
+ }
+ }
+ return reviver.call(holder, key, value);
+ }
+
+
+// Parsing happens in four stages. In the first stage, we replace certain
+// Unicode characters with escape sequences. JavaScript handles many characters
+// incorrectly, either silently deleting them, or treating them as line endings.
+
+ text = String(text);
+ rx_dangerous.lastIndex = 0;
+ if (rx_dangerous.test(text)) {
+ text = text.replace(rx_dangerous, function (a) {
+ return '\\u' +
+ ('0000' + a.charCodeAt(0).toString(16)).slice(-4);
+ });
+ }
+
+// In the second stage, we run the text against regular expressions that look
+// for non-JSON patterns. We are especially concerned with '()' and 'new'
+// because they can cause invocation, and '=' because it can cause mutation.
+// But just to be safe, we want to reject all unexpected forms.
+
+// We split the second stage into 4 regexp operations in order to work around
+// crippling inefficiencies in IE's and Safari's regexp engines. First we
+// replace the JSON backslash pairs with '@' (a non-JSON character). Second, we
+// replace all simple value tokens with ']' characters. Third, we delete all
+// open brackets that follow a colon or comma or that begin the text. Finally,
+// we look to see that the remaining characters are only whitespace or ']' or
+// ',' or ':' or '{' or '}'. If that is so, then the text is safe for eval.
+
+ if (
+ rx_one.test(
+ text
+ .replace(rx_two, '@')
+ .replace(rx_three, ']')
+ .replace(rx_four, '')
+ )
+ ) {
+
+// In the third stage we use the eval function to compile the text into a
+// JavaScript structure. The '{' operator is subject to a syntactic ambiguity
+// in JavaScript: it can begin a block or an object literal. We wrap the text
+// in parens to eliminate the ambiguity.
+
+ j = eval('(' + text + ')');
+
+// In the optional fourth stage, we recursively walk the new structure, passing
+// each name/value pair to a reviver function for possible transformation.
+
+ return typeof reviver === 'function'
+ ? walk({'': j}, '')
+ : j;
+ }
+
+// If the text is not JSON parseable, then a SyntaxError is thrown.
+
+ throw new SyntaxError('JSON.parse');
+ };
+ }
+}());
diff --git a/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/underscore/LICENSE b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/underscore/LICENSE
new file mode 100644
index 0000000..447239f
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/underscore/LICENSE
@@ -0,0 +1,23 @@
+Copyright (c) 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative
+Reporters & Editors
+
+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.
diff --git a/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/underscore/test/arrays.js b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/underscore/test/arrays.js
new file mode 100644
index 0000000..748edea
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/underscore/test/arrays.js
@@ -0,0 +1,555 @@
+(function() {
+ var _ = typeof require == 'function' ? require('..') : window._;
+
+ QUnit.module('Arrays');
+
+ QUnit.test('first', function(assert) {
+ assert.equal(_.first([1, 2, 3]), 1, 'can pull out the first element of an array');
+ assert.equal(_([1, 2, 3]).first(), 1, 'can perform OO-style "first()"');
+ assert.deepEqual(_.first([1, 2, 3], 0), [], 'returns an empty array when n <= 0 (0 case)');
+ assert.deepEqual(_.first([1, 2, 3], -1), [], 'returns an empty array when n <= 0 (negative case)');
+ assert.deepEqual(_.first([1, 2, 3], 2), [1, 2], 'can fetch the first n elements');
+ assert.deepEqual(_.first([1, 2, 3], 5), [1, 2, 3], 'returns the whole array if n > length');
+ var result = (function(){ return _.first(arguments); }(4, 3, 2, 1));
+ assert.equal(result, 4, 'works on an arguments object');
+ result = _.map([[1, 2, 3], [1, 2, 3]], _.first);
+ assert.deepEqual(result, [1, 1], 'works well with _.map');
+ assert.equal(_.first(null), void 0, 'returns undefined when called on null');
+ });
+
+ QUnit.test('head', function(assert) {
+ assert.strictEqual(_.head, _.first, 'is an alias for first');
+ });
+
+ QUnit.test('take', function(assert) {
+ assert.strictEqual(_.take, _.first, 'is an alias for first');
+ });
+
+ QUnit.test('rest', function(assert) {
+ var numbers = [1, 2, 3, 4];
+ assert.deepEqual(_.rest(numbers), [2, 3, 4], 'fetches all but the first element');
+ assert.deepEqual(_.rest(numbers, 0), [1, 2, 3, 4], 'returns the whole array when index is 0');
+ assert.deepEqual(_.rest(numbers, 2), [3, 4], 'returns elements starting at the given index');
+ var result = (function(){ return _(arguments).rest(); }(1, 2, 3, 4));
+ assert.deepEqual(result, [2, 3, 4], 'works on an arguments object');
+ result = _.map([[1, 2, 3], [1, 2, 3]], _.rest);
+ assert.deepEqual(_.flatten(result), [2, 3, 2, 3], 'works well with _.map');
+ });
+
+ QUnit.test('tail', function(assert) {
+ assert.strictEqual(_.tail, _.rest, 'is an alias for rest');
+ });
+
+ QUnit.test('drop', function(assert) {
+ assert.strictEqual(_.drop, _.rest, 'is an alias for rest');
+ });
+
+ QUnit.test('initial', function(assert) {
+ assert.deepEqual(_.initial([1, 2, 3, 4, 5]), [1, 2, 3, 4], 'returns all but the last element');
+ assert.deepEqual(_.initial([1, 2, 3, 4], 2), [1, 2], 'returns all but the last n elements');
+ assert.deepEqual(_.initial([1, 2, 3, 4], 6), [], 'returns an empty array when n > length');
+ var result = (function(){ return _(arguments).initial(); }(1, 2, 3, 4));
+ assert.deepEqual(result, [1, 2, 3], 'works on an arguments object');
+ result = _.map([[1, 2, 3], [1, 2, 3]], _.initial);
+ assert.deepEqual(_.flatten(result), [1, 2, 1, 2], 'works well with _.map');
+ });
+
+ QUnit.test('last', function(assert) {
+ assert.equal(_.last([1, 2, 3]), 3, 'can pull out the last element of an array');
+ assert.equal(_([1, 2, 3]).last(), 3, 'can perform OO-style "last()"');
+ assert.deepEqual(_.last([1, 2, 3], 0), [], 'returns an empty array when n <= 0 (0 case)');
+ assert.deepEqual(_.last([1, 2, 3], -1), [], 'returns an empty array when n <= 0 (negative case)');
+ assert.deepEqual(_.last([1, 2, 3], 2), [2, 3], 'can fetch the last n elements');
+ assert.deepEqual(_.last([1, 2, 3], 5), [1, 2, 3], 'returns the whole array if n > length');
+ var result = (function(){ return _(arguments).last(); }(1, 2, 3, 4));
+ assert.equal(result, 4, 'works on an arguments object');
+ result = _.map([[1, 2, 3], [1, 2, 3]], _.last);
+ assert.deepEqual(result, [3, 3], 'works well with _.map');
+ assert.equal(_.last(null), void 0, 'returns undefined when called on null');
+ });
+
+ QUnit.test('compact', function(assert) {
+ assert.deepEqual(_.compact([1, false, null, 0, '', void 0, NaN, 2]), [1, 2], 'removes all falsy values');
+ var result = (function(){ return _.compact(arguments); }(0, 1, false, 2, false, 3));
+ assert.deepEqual(result, [1, 2, 3], 'works on an arguments object');
+ result = _.map([[1, false, false], [false, false, 3]], _.compact);
+ assert.deepEqual(result, [[1], [3]], 'works well with _.map');
+ });
+
+ QUnit.test('flatten', function(assert) {
+ assert.deepEqual(_.flatten(null), [], 'supports null');
+ assert.deepEqual(_.flatten(void 0), [], 'supports undefined');
+
+ assert.deepEqual(_.flatten([[], [[]], []]), [], 'supports empty arrays');
+ assert.deepEqual(_.flatten([[], [[]], []], true), [[]], 'can shallowly flatten empty arrays');
+
+ var list = [1, [2], [3, [[[4]]]]];
+ assert.deepEqual(_.flatten(list), [1, 2, 3, 4], 'can flatten nested arrays');
+ assert.deepEqual(_.flatten(list, true), [1, 2, 3, [[[4]]]], 'can shallowly flatten nested arrays');
+ var result = (function(){ return _.flatten(arguments); }(1, [2], [3, [[[4]]]]));
+ assert.deepEqual(result, [1, 2, 3, 4], 'works on an arguments object');
+ list = [[1], [2], [3], [[4]]];
+ assert.deepEqual(_.flatten(list, true), [1, 2, 3, [4]], 'can shallowly flatten arrays containing only other arrays');
+
+ assert.equal(_.flatten([_.range(10), _.range(10), 5, 1, 3], true).length, 23, 'can flatten medium length arrays');
+ assert.equal(_.flatten([_.range(10), _.range(10), 5, 1, 3]).length, 23, 'can shallowly flatten medium length arrays');
+ assert.equal(_.flatten([new Array(1000000), _.range(56000), 5, 1, 3]).length, 1056003, 'can handle massive arrays');
+ assert.equal(_.flatten([new Array(1000000), _.range(56000), 5, 1, 3], true).length, 1056003, 'can handle massive arrays in shallow mode');
+
+ var x = _.range(100000);
+ for (var i = 0; i < 1000; i++) x = [x];
+ assert.deepEqual(_.flatten(x), _.range(100000), 'can handle very deep arrays');
+ assert.deepEqual(_.flatten(x, true), x[0], 'can handle very deep arrays in shallow mode');
+ });
+
+ QUnit.test('without', function(assert) {
+ var list = [1, 2, 1, 0, 3, 1, 4];
+ assert.deepEqual(_.without(list, 0, 1), [2, 3, 4], 'removes all instances of the given values');
+ var result = (function(){ return _.without(arguments, 0, 1); }(1, 2, 1, 0, 3, 1, 4));
+ assert.deepEqual(result, [2, 3, 4], 'works on an arguments object');
+
+ list = [{one: 1}, {two: 2}];
+ assert.deepEqual(_.without(list, {one: 1}), list, 'compares objects by reference (value case)');
+ assert.deepEqual(_.without(list, list[0]), [{two: 2}], 'compares objects by reference (reference case)');
+ });
+
+ QUnit.test('sortedIndex', function(assert) {
+ var numbers = [10, 20, 30, 40, 50];
+ var indexFor35 = _.sortedIndex(numbers, 35);
+ assert.equal(indexFor35, 3, 'finds the index at which a value should be inserted to retain order');
+ var indexFor30 = _.sortedIndex(numbers, 30);
+ assert.equal(indexFor30, 2, 'finds the smallest index at which a value could be inserted to retain order');
+
+ var objects = [{x: 10}, {x: 20}, {x: 30}, {x: 40}];
+ var iterator = function(obj){ return obj.x; };
+ assert.strictEqual(_.sortedIndex(objects, {x: 25}, iterator), 2, 'uses the result of `iterator` for order comparisons');
+ assert.strictEqual(_.sortedIndex(objects, {x: 35}, 'x'), 3, 'when `iterator` is a string, uses that key for order comparisons');
+
+ var context = {1: 2, 2: 3, 3: 4};
+ iterator = function(obj){ return this[obj]; };
+ assert.strictEqual(_.sortedIndex([1, 3], 2, iterator, context), 1, 'can execute its iterator in the given context');
+
+ var values = [0, 1, 3, 7, 15, 31, 63, 127, 255, 511, 1023, 2047, 4095, 8191, 16383, 32767, 65535, 131071, 262143, 524287,
+ 1048575, 2097151, 4194303, 8388607, 16777215, 33554431, 67108863, 134217727, 268435455, 536870911, 1073741823, 2147483647];
+ var largeArray = Array(Math.pow(2, 32) - 1);
+ var length = values.length;
+ // Sparsely populate `array`
+ while (length--) {
+ largeArray[values[length]] = values[length];
+ }
+ assert.equal(_.sortedIndex(largeArray, 2147483648), 2147483648, 'works with large indexes');
+ });
+
+ QUnit.test('uniq', function(assert) {
+ var list = [1, 2, 1, 3, 1, 4];
+ assert.deepEqual(_.uniq(list), [1, 2, 3, 4], 'can find the unique values of an unsorted array');
+ list = [1, 1, 1, 2, 2, 3];
+ assert.deepEqual(_.uniq(list, true), [1, 2, 3], 'can find the unique values of a sorted array faster');
+
+ list = [{name: 'Moe'}, {name: 'Curly'}, {name: 'Larry'}, {name: 'Curly'}];
+ var expected = [{name: 'Moe'}, {name: 'Curly'}, {name: 'Larry'}];
+ var iterator = function(stooge) { return stooge.name; };
+ assert.deepEqual(_.uniq(list, false, iterator), expected, 'uses the result of `iterator` for uniqueness comparisons (unsorted case)');
+ assert.deepEqual(_.uniq(list, iterator), expected, '`sorted` argument defaults to false when omitted');
+ assert.deepEqual(_.uniq(list, 'name'), expected, 'when `iterator` is a string, uses that key for comparisons (unsorted case)');
+
+ list = [{score: 8}, {score: 10}, {score: 10}];
+ expected = [{score: 8}, {score: 10}];
+ iterator = function(item) { return item.score; };
+ assert.deepEqual(_.uniq(list, true, iterator), expected, 'uses the result of `iterator` for uniqueness comparisons (sorted case)');
+ assert.deepEqual(_.uniq(list, true, 'score'), expected, 'when `iterator` is a string, uses that key for comparisons (sorted case)');
+
+ assert.deepEqual(_.uniq([{0: 1}, {0: 1}, {0: 1}, {0: 2}], 0), [{0: 1}, {0: 2}], 'can use falsey pluck like iterator');
+
+ var result = (function(){ return _.uniq(arguments); }(1, 2, 1, 3, 1, 4));
+ assert.deepEqual(result, [1, 2, 3, 4], 'works on an arguments object');
+
+ var a = {}, b = {}, c = {};
+ assert.deepEqual(_.uniq([a, b, a, b, c]), [a, b, c], 'works on values that can be tested for equivalency but not ordered');
+
+ assert.deepEqual(_.uniq(null), [], 'returns an empty array when `array` is not iterable');
+
+ var context = {};
+ list = [3];
+ _.uniq(list, function(value, index, array) {
+ assert.strictEqual(this, context, 'executes its iterator in the given context');
+ assert.strictEqual(value, 3, 'passes its iterator the value');
+ assert.strictEqual(index, 0, 'passes its iterator the index');
+ assert.strictEqual(array, list, 'passes its iterator the entire array');
+ }, context);
+
+ });
+
+ QUnit.test('unique', function(assert) {
+ assert.strictEqual(_.unique, _.uniq, 'is an alias for uniq');
+ });
+
+ QUnit.test('intersection', function(assert) {
+ var stooges = ['moe', 'curly', 'larry'], leaders = ['moe', 'groucho'];
+ assert.deepEqual(_.intersection(stooges, leaders), ['moe'], 'can find the set intersection of two arrays');
+ assert.deepEqual(_(stooges).intersection(leaders), ['moe'], 'can perform an OO-style intersection');
+ var result = (function(){ return _.intersection(arguments, leaders); }('moe', 'curly', 'larry'));
+ assert.deepEqual(result, ['moe'], 'works on an arguments object');
+ var theSixStooges = ['moe', 'moe', 'curly', 'curly', 'larry', 'larry'];
+ assert.deepEqual(_.intersection(theSixStooges, leaders), ['moe'], 'returns a duplicate-free array');
+ result = _.intersection([2, 4, 3, 1], [1, 2, 3]);
+ assert.deepEqual(result, [2, 3, 1], 'preserves the order of the first array');
+ result = _.intersection(null, [1, 2, 3]);
+ assert.deepEqual(result, [], 'returns an empty array when passed null as the first argument');
+ result = _.intersection([1, 2, 3], null);
+ assert.deepEqual(result, [], 'returns an empty array when passed null as an argument beyond the first');
+ });
+
+ QUnit.test('union', function(assert) {
+ var result = _.union([1, 2, 3], [2, 30, 1], [1, 40]);
+ assert.deepEqual(result, [1, 2, 3, 30, 40], 'can find the union of a list of arrays');
+
+ result = _([1, 2, 3]).union([2, 30, 1], [1, 40]);
+ assert.deepEqual(result, [1, 2, 3, 30, 40], 'can perform an OO-style union');
+
+ result = _.union([1, 2, 3], [2, 30, 1], [1, 40, [1]]);
+ assert.deepEqual(result, [1, 2, 3, 30, 40, [1]], 'can find the union of a list of nested arrays');
+
+ result = _.union([10, 20], [1, 30, 10], [0, 40]);
+ assert.deepEqual(result, [10, 20, 1, 30, 0, 40], 'orders values by their first encounter');
+
+ result = (function(){ return _.union(arguments, [2, 30, 1], [1, 40]); }(1, 2, 3));
+ assert.deepEqual(result, [1, 2, 3, 30, 40], 'works on an arguments object');
+
+ assert.deepEqual(_.union([1, 2, 3], 4), [1, 2, 3], 'restricts the union to arrays only');
+ });
+
+ QUnit.test('difference', function(assert) {
+ var result = _.difference([1, 2, 3], [2, 30, 40]);
+ assert.deepEqual(result, [1, 3], 'can find the difference of two arrays');
+
+ result = _([1, 2, 3]).difference([2, 30, 40]);
+ assert.deepEqual(result, [1, 3], 'can perform an OO-style difference');
+
+ result = _.difference([1, 2, 3, 4], [2, 30, 40], [1, 11, 111]);
+ assert.deepEqual(result, [3, 4], 'can find the difference of three arrays');
+
+ result = _.difference([8, 9, 3, 1], [3, 8]);
+ assert.deepEqual(result, [9, 1], 'preserves the order of the first array');
+
+ result = (function(){ return _.difference(arguments, [2, 30, 40]); }(1, 2, 3));
+ assert.deepEqual(result, [1, 3], 'works on an arguments object');
+
+ result = _.difference([1, 2, 3], 1);
+ assert.deepEqual(result, [1, 2, 3], 'restrict the difference to arrays only');
+ });
+
+ QUnit.test('zip', function(assert) {
+ var names = ['moe', 'larry', 'curly'], ages = [30, 40, 50], leaders = [true];
+ assert.deepEqual(_.zip(names, ages, leaders), [
+ ['moe', 30, true],
+ ['larry', 40, void 0],
+ ['curly', 50, void 0]
+ ], 'zipped together arrays of different lengths');
+
+ var stooges = _.zip(['moe', 30, 'stooge 1'], ['larry', 40, 'stooge 2'], ['curly', 50, 'stooge 3']);
+ assert.deepEqual(stooges, [['moe', 'larry', 'curly'], [30, 40, 50], ['stooge 1', 'stooge 2', 'stooge 3']], 'zipped pairs');
+
+ // In the case of different lengths of the tuples, undefined values
+ // should be used as placeholder
+ stooges = _.zip(['moe', 30], ['larry', 40], ['curly', 50, 'extra data']);
+ assert.deepEqual(stooges, [['moe', 'larry', 'curly'], [30, 40, 50], [void 0, void 0, 'extra data']], 'zipped pairs with empties');
+
+ var empty = _.zip([]);
+ assert.deepEqual(empty, [], 'unzipped empty');
+
+ assert.deepEqual(_.zip(null), [], 'handles null');
+ assert.deepEqual(_.zip(), [], '_.zip() returns []');
+ });
+
+ QUnit.test('unzip', function(assert) {
+ assert.deepEqual(_.unzip(null), [], 'handles null');
+
+ assert.deepEqual(_.unzip([['a', 'b'], [1, 2]]), [['a', 1], ['b', 2]]);
+
+ // complements zip
+ var zipped = _.zip(['fred', 'barney'], [30, 40], [true, false]);
+ assert.deepEqual(_.unzip(zipped), [['fred', 'barney'], [30, 40], [true, false]]);
+
+ zipped = _.zip(['moe', 30], ['larry', 40], ['curly', 50, 'extra data']);
+ assert.deepEqual(_.unzip(zipped), [['moe', 30, void 0], ['larry', 40, void 0], ['curly', 50, 'extra data']], 'Uses length of largest array');
+ });
+
+ QUnit.test('object', function(assert) {
+ var result = _.object(['moe', 'larry', 'curly'], [30, 40, 50]);
+ var shouldBe = {moe: 30, larry: 40, curly: 50};
+ assert.deepEqual(result, shouldBe, 'two arrays zipped together into an object');
+
+ result = _.object([['one', 1], ['two', 2], ['three', 3]]);
+ shouldBe = {one: 1, two: 2, three: 3};
+ assert.deepEqual(result, shouldBe, 'an array of pairs zipped together into an object');
+
+ var stooges = {moe: 30, larry: 40, curly: 50};
+ assert.deepEqual(_.object(_.pairs(stooges)), stooges, 'an object converted to pairs and back to an object');
+
+ assert.deepEqual(_.object(null), {}, 'handles nulls');
+ });
+
+ QUnit.test('indexOf', function(assert) {
+ var numbers = [1, 2, 3];
+ assert.equal(_.indexOf(numbers, 2), 1, 'can compute indexOf');
+ var result = (function(){ return _.indexOf(arguments, 2); }(1, 2, 3));
+ assert.equal(result, 1, 'works on an arguments object');
+
+ _.each([null, void 0, [], false], function(val) {
+ var msg = 'Handles: ' + (_.isArray(val) ? '[]' : val);
+ assert.equal(_.indexOf(val, 2), -1, msg);
+ assert.equal(_.indexOf(val, 2, -1), -1, msg);
+ assert.equal(_.indexOf(val, 2, -20), -1, msg);
+ assert.equal(_.indexOf(val, 2, 15), -1, msg);
+ });
+
+ var num = 35;
+ numbers = [10, 20, 30, 40, 50];
+ var index = _.indexOf(numbers, num, true);
+ assert.equal(index, -1, '35 is not in the list');
+
+ numbers = [10, 20, 30, 40, 50]; num = 40;
+ index = _.indexOf(numbers, num, true);
+ assert.equal(index, 3, '40 is in the list');
+
+ numbers = [1, 40, 40, 40, 40, 40, 40, 40, 50, 60, 70]; num = 40;
+ assert.equal(_.indexOf(numbers, num, true), 1, '40 is in the list');
+ assert.equal(_.indexOf(numbers, 6, true), -1, '6 isnt in the list');
+ assert.equal(_.indexOf([1, 2, 5, 4, 6, 7], 5, true), -1, 'sorted indexOf doesn\'t uses binary search');
+ assert.ok(_.every(['1', [], {}, null], function() {
+ return _.indexOf(numbers, num, {}) === 1;
+ }), 'non-nums as fromIndex make indexOf assume sorted');
+
+ numbers = [1, 2, 3, 1, 2, 3, 1, 2, 3];
+ index = _.indexOf(numbers, 2, 5);
+ assert.equal(index, 7, 'supports the fromIndex argument');
+
+ index = _.indexOf([,,, 0], void 0);
+ assert.equal(index, 0, 'treats sparse arrays as if they were dense');
+
+ var array = [1, 2, 3, 1, 2, 3];
+ assert.strictEqual(_.indexOf(array, 1, -3), 3, 'neg `fromIndex` starts at the right index');
+ assert.strictEqual(_.indexOf(array, 1, -2), -1, 'neg `fromIndex` starts at the right index');
+ assert.strictEqual(_.indexOf(array, 2, -3), 4);
+ _.each([-6, -8, -Infinity], function(fromIndex) {
+ assert.strictEqual(_.indexOf(array, 1, fromIndex), 0);
+ });
+ assert.strictEqual(_.indexOf([1, 2, 3], 1, true), 0);
+
+ index = _.indexOf([], void 0, true);
+ assert.equal(index, -1, 'empty array with truthy `isSorted` returns -1');
+ });
+
+ QUnit.test('indexOf with NaN', function(assert) {
+ assert.strictEqual(_.indexOf([1, 2, NaN, NaN], NaN), 2, 'Expected [1, 2, NaN] to contain NaN');
+ assert.strictEqual(_.indexOf([1, 2, Infinity], NaN), -1, 'Expected [1, 2, NaN] to contain NaN');
+
+ assert.strictEqual(_.indexOf([1, 2, NaN, NaN], NaN, 1), 2, 'startIndex does not affect result');
+ assert.strictEqual(_.indexOf([1, 2, NaN, NaN], NaN, -2), 2, 'startIndex does not affect result');
+
+ (function() {
+ assert.strictEqual(_.indexOf(arguments, NaN), 2, 'Expected arguments [1, 2, NaN] to contain NaN');
+ }(1, 2, NaN, NaN));
+ });
+
+ QUnit.test('indexOf with +- 0', function(assert) {
+ _.each([-0, +0], function(val) {
+ assert.strictEqual(_.indexOf([1, 2, val, val], val), 2);
+ assert.strictEqual(_.indexOf([1, 2, val, val], -val), 2);
+ });
+ });
+
+ QUnit.test('lastIndexOf', function(assert) {
+ var numbers = [1, 0, 1];
+ var falsey = [void 0, '', 0, false, NaN, null, void 0];
+ assert.equal(_.lastIndexOf(numbers, 1), 2);
+
+ numbers = [1, 0, 1, 0, 0, 1, 0, 0, 0];
+ numbers.lastIndexOf = null;
+ assert.equal(_.lastIndexOf(numbers, 1), 5, 'can compute lastIndexOf, even without the native function');
+ assert.equal(_.lastIndexOf(numbers, 0), 8, 'lastIndexOf the other element');
+ var result = (function(){ return _.lastIndexOf(arguments, 1); }(1, 0, 1, 0, 0, 1, 0, 0, 0));
+ assert.equal(result, 5, 'works on an arguments object');
+
+ _.each([null, void 0, [], false], function(val) {
+ var msg = 'Handles: ' + (_.isArray(val) ? '[]' : val);
+ assert.equal(_.lastIndexOf(val, 2), -1, msg);
+ assert.equal(_.lastIndexOf(val, 2, -1), -1, msg);
+ assert.equal(_.lastIndexOf(val, 2, -20), -1, msg);
+ assert.equal(_.lastIndexOf(val, 2, 15), -1, msg);
+ });
+
+ numbers = [1, 2, 3, 1, 2, 3, 1, 2, 3];
+ var index = _.lastIndexOf(numbers, 2, 2);
+ assert.equal(index, 1, 'supports the fromIndex argument');
+
+ var array = [1, 2, 3, 1, 2, 3];
+
+ assert.strictEqual(_.lastIndexOf(array, 1, 0), 0, 'starts at the correct from idx');
+ assert.strictEqual(_.lastIndexOf(array, 3), 5, 'should return the index of the last matched value');
+ assert.strictEqual(_.lastIndexOf(array, 4), -1, 'should return `-1` for an unmatched value');
+
+ assert.strictEqual(_.lastIndexOf(array, 1, 2), 0, 'should work with a positive `fromIndex`');
+
+ _.each([6, 8, Math.pow(2, 32), Infinity], function(fromIndex) {
+ assert.strictEqual(_.lastIndexOf(array, void 0, fromIndex), -1);
+ assert.strictEqual(_.lastIndexOf(array, 1, fromIndex), 3);
+ assert.strictEqual(_.lastIndexOf(array, '', fromIndex), -1);
+ });
+
+ var expected = _.map(falsey, function(value) {
+ return typeof value == 'number' ? -1 : 5;
+ });
+
+ var actual = _.map(falsey, function(fromIndex) {
+ return _.lastIndexOf(array, 3, fromIndex);
+ });
+
+ assert.deepEqual(actual, expected, 'should treat falsey `fromIndex` values, except `0` and `NaN`, as `array.length`');
+ assert.strictEqual(_.lastIndexOf(array, 3, '1'), 5, 'should treat non-number `fromIndex` values as `array.length`');
+ assert.strictEqual(_.lastIndexOf(array, 3, true), 5, 'should treat non-number `fromIndex` values as `array.length`');
+
+ assert.strictEqual(_.lastIndexOf(array, 2, -3), 1, 'should work with a negative `fromIndex`');
+ assert.strictEqual(_.lastIndexOf(array, 1, -3), 3, 'neg `fromIndex` starts at the right index');
+
+ assert.deepEqual(_.map([-6, -8, -Infinity], function(fromIndex) {
+ return _.lastIndexOf(array, 1, fromIndex);
+ }), [0, -1, -1]);
+ });
+
+ QUnit.test('lastIndexOf with NaN', function(assert) {
+ assert.strictEqual(_.lastIndexOf([1, 2, NaN, NaN], NaN), 3, 'Expected [1, 2, NaN] to contain NaN');
+ assert.strictEqual(_.lastIndexOf([1, 2, Infinity], NaN), -1, 'Expected [1, 2, NaN] to contain NaN');
+
+ assert.strictEqual(_.lastIndexOf([1, 2, NaN, NaN], NaN, 2), 2, 'fromIndex does not affect result');
+ assert.strictEqual(_.lastIndexOf([1, 2, NaN, NaN], NaN, -2), 2, 'fromIndex does not affect result');
+
+ (function() {
+ assert.strictEqual(_.lastIndexOf(arguments, NaN), 3, 'Expected arguments [1, 2, NaN] to contain NaN');
+ }(1, 2, NaN, NaN));
+ });
+
+ QUnit.test('lastIndexOf with +- 0', function(assert) {
+ _.each([-0, +0], function(val) {
+ assert.strictEqual(_.lastIndexOf([1, 2, val, val], val), 3);
+ assert.strictEqual(_.lastIndexOf([1, 2, val, val], -val), 3);
+ assert.strictEqual(_.lastIndexOf([-1, 1, 2], -val), -1);
+ });
+ });
+
+ QUnit.test('findIndex', function(assert) {
+ var objects = [
+ {a: 0, b: 0},
+ {a: 1, b: 1},
+ {a: 2, b: 2},
+ {a: 0, b: 0}
+ ];
+
+ assert.equal(_.findIndex(objects, function(obj) {
+ return obj.a === 0;
+ }), 0);
+
+ assert.equal(_.findIndex(objects, function(obj) {
+ return obj.b * obj.a === 4;
+ }), 2);
+
+ assert.equal(_.findIndex(objects, 'a'), 1, 'Uses lookupIterator');
+
+ assert.equal(_.findIndex(objects, function(obj) {
+ return obj.b * obj.a === 5;
+ }), -1);
+
+ assert.equal(_.findIndex(null, _.noop), -1);
+ assert.strictEqual(_.findIndex(objects, function(a) {
+ return a.foo === null;
+ }), -1);
+ _.findIndex([{a: 1}], function(a, key, obj) {
+ assert.equal(key, 0);
+ assert.deepEqual(obj, [{a: 1}]);
+ assert.strictEqual(this, objects, 'called with context');
+ }, objects);
+
+ var sparse = [];
+ sparse[20] = {a: 2, b: 2};
+ assert.equal(_.findIndex(sparse, function(obj) {
+ return obj && obj.b * obj.a === 4;
+ }), 20, 'Works with sparse arrays');
+
+ var array = [1, 2, 3, 4];
+ array.match = 55;
+ assert.strictEqual(_.findIndex(array, function(x) { return x === 55; }), -1, 'doesn\'t match array-likes keys');
+ });
+
+ QUnit.test('findLastIndex', function(assert) {
+ var objects = [
+ {a: 0, b: 0},
+ {a: 1, b: 1},
+ {a: 2, b: 2},
+ {a: 0, b: 0}
+ ];
+
+ assert.equal(_.findLastIndex(objects, function(obj) {
+ return obj.a === 0;
+ }), 3);
+
+ assert.equal(_.findLastIndex(objects, function(obj) {
+ return obj.b * obj.a === 4;
+ }), 2);
+
+ assert.equal(_.findLastIndex(objects, 'a'), 2, 'Uses lookupIterator');
+
+ assert.equal(_.findLastIndex(objects, function(obj) {
+ return obj.b * obj.a === 5;
+ }), -1);
+
+ assert.equal(_.findLastIndex(null, _.noop), -1);
+ assert.strictEqual(_.findLastIndex(objects, function(a) {
+ return a.foo === null;
+ }), -1);
+ _.findLastIndex([{a: 1}], function(a, key, obj) {
+ assert.equal(key, 0);
+ assert.deepEqual(obj, [{a: 1}]);
+ assert.strictEqual(this, objects, 'called with context');
+ }, objects);
+
+ var sparse = [];
+ sparse[20] = {a: 2, b: 2};
+ assert.equal(_.findLastIndex(sparse, function(obj) {
+ return obj && obj.b * obj.a === 4;
+ }), 20, 'Works with sparse arrays');
+
+ var array = [1, 2, 3, 4];
+ array.match = 55;
+ assert.strictEqual(_.findLastIndex(array, function(x) { return x === 55; }), -1, 'doesn\'t match array-likes keys');
+ });
+
+ QUnit.test('range', function(assert) {
+ assert.deepEqual(_.range(0), [], 'range with 0 as a first argument generates an empty array');
+ assert.deepEqual(_.range(4), [0, 1, 2, 3], 'range with a single positive argument generates an array of elements 0,1,2,...,n-1');
+ assert.deepEqual(_.range(5, 8), [5, 6, 7], 'range with two arguments a & b, a<b generates an array of elements a,a+1,a+2,...,b-2,b-1');
+ assert.deepEqual(_.range(3, 10, 3), [3, 6, 9], 'range with three arguments a & b & c, c < b-a, a < b generates an array of elements a,a+c,a+2c,...,b - (multiplier of a) < c');
+ assert.deepEqual(_.range(3, 10, 15), [3], 'range with three arguments a & b & c, c > b-a, a < b generates an array with a single element, equal to a');
+ assert.deepEqual(_.range(12, 7, -2), [12, 10, 8], 'range with three arguments a & b & c, a > b, c < 0 generates an array of elements a,a-c,a-2c and ends with the number not less than b');
+ assert.deepEqual(_.range(0, -10, -1), [0, -1, -2, -3, -4, -5, -6, -7, -8, -9], 'final example in the Python docs');
+ assert.strictEqual(1 / _.range(-0, 1)[0], -Infinity, 'should preserve -0');
+ assert.deepEqual(_.range(8, 5), [8, 7, 6], 'negative range generates descending array');
+ assert.deepEqual(_.range(-3), [0, -1, -2], 'negative range generates descending array');
+ });
+
+ QUnit.test('chunk', function(assert) {
+ assert.deepEqual(_.chunk([], 2), [], 'chunk for empty array returns an empty array');
+
+ assert.deepEqual(_.chunk([1, 2, 3], 0), [], 'chunk into parts of 0 elements returns empty array');
+ assert.deepEqual(_.chunk([1, 2, 3], -1), [], 'chunk into parts of negative amount of elements returns an empty array');
+ assert.deepEqual(_.chunk([1, 2, 3]), [], 'defaults to empty array (chunk size 0)');
+
+ assert.deepEqual(_.chunk([1, 2, 3], 1), [[1], [2], [3]], 'chunk into parts of 1 elements returns original array');
+
+ assert.deepEqual(_.chunk([1, 2, 3], 3), [[1, 2, 3]], 'chunk into parts of current array length elements returns the original array');
+ assert.deepEqual(_.chunk([1, 2, 3], 5), [[1, 2, 3]], 'chunk into parts of more then current array length elements returns the original array');
+
+ assert.deepEqual(_.chunk([10, 20, 30, 40, 50, 60, 70], 2), [[10, 20], [30, 40], [50, 60], [70]], 'chunk into parts of less then current array length elements');
+ assert.deepEqual(_.chunk([10, 20, 30, 40, 50, 60, 70], 3), [[10, 20, 30], [40, 50, 60], [70]], 'chunk into parts of less then current array length elements');
+ });
+}());
diff --git a/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/underscore/test/chaining.js b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/underscore/test/chaining.js
new file mode 100644
index 0000000..6ad21dc
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/underscore/test/chaining.js
@@ -0,0 +1,99 @@
+(function() {
+ var _ = typeof require == 'function' ? require('..') : window._;
+
+ QUnit.module('Chaining');
+
+ QUnit.test('map/flatten/reduce', function(assert) {
+ var lyrics = [
+ 'I\'m a lumberjack and I\'m okay',
+ 'I sleep all night and I work all day',
+ 'He\'s a lumberjack and he\'s okay',
+ 'He sleeps all night and he works all day'
+ ];
+ var counts = _(lyrics).chain()
+ .map(function(line) { return line.split(''); })
+ .flatten()
+ .reduce(function(hash, l) {
+ hash[l] = hash[l] || 0;
+ hash[l]++;
+ return hash;
+ }, {})
+ .value();
+ assert.equal(counts.a, 16, 'counted all the letters in the song');
+ assert.equal(counts.e, 10, 'counted all the letters in the song');
+ });
+
+ QUnit.test('select/reject/sortBy', function(assert) {
+ var numbers = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
+ numbers = _(numbers).chain().select(function(n) {
+ return n % 2 === 0;
+ }).reject(function(n) {
+ return n % 4 === 0;
+ }).sortBy(function(n) {
+ return -n;
+ }).value();
+ assert.deepEqual(numbers, [10, 6, 2], 'filtered and reversed the numbers');
+ });
+
+ QUnit.test('select/reject/sortBy in functional style', function(assert) {
+ var numbers = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
+ numbers = _.chain(numbers).select(function(n) {
+ return n % 2 === 0;
+ }).reject(function(n) {
+ return n % 4 === 0;
+ }).sortBy(function(n) {
+ return -n;
+ }).value();
+ assert.deepEqual(numbers, [10, 6, 2], 'filtered and reversed the numbers');
+ });
+
+ QUnit.test('reverse/concat/unshift/pop/map', function(assert) {
+ var numbers = [1, 2, 3, 4, 5];
+ numbers = _(numbers).chain()
+ .reverse()
+ .concat([5, 5, 5])
+ .unshift(17)
+ .pop()
+ .map(function(n){ return n * 2; })
+ .value();
+ assert.deepEqual(numbers, [34, 10, 8, 6, 4, 2, 10, 10], 'can chain together array functions.');
+ });
+
+ QUnit.test('splice', function(assert) {
+ var instance = _([1, 2, 3, 4, 5]).chain();
+ assert.deepEqual(instance.splice(1, 3).value(), [1, 5]);
+ assert.deepEqual(instance.splice(1, 0).value(), [1, 5]);
+ assert.deepEqual(instance.splice(1, 1).value(), [1]);
+ assert.deepEqual(instance.splice(0, 1).value(), [], '#397 Can create empty array');
+ });
+
+ QUnit.test('shift', function(assert) {
+ var instance = _([1, 2, 3]).chain();
+ assert.deepEqual(instance.shift().value(), [2, 3]);
+ assert.deepEqual(instance.shift().value(), [3]);
+ assert.deepEqual(instance.shift().value(), [], '#397 Can create empty array');
+ });
+
+ QUnit.test('pop', function(assert) {
+ var instance = _([1, 2, 3]).chain();
+ assert.deepEqual(instance.pop().value(), [1, 2]);
+ assert.deepEqual(instance.pop().value(), [1]);
+ assert.deepEqual(instance.pop().value(), [], '#397 Can create empty array');
+ });
+
+ QUnit.test('chaining works in small stages', function(assert) {
+ var o = _([1, 2, 3, 4]).chain();
+ assert.deepEqual(o.filter(function(i) { return i < 3; }).value(), [1, 2]);
+ assert.deepEqual(o.filter(function(i) { return i > 2; }).value(), [3, 4]);
+ });
+
+ QUnit.test('#1562: Engine proxies for chained functions', function(assert) {
+ var wrapped = _(512);
+ assert.strictEqual(wrapped.toJSON(), 512);
+ assert.strictEqual(wrapped.valueOf(), 512);
+ assert.strictEqual(+wrapped, 512);
+ assert.strictEqual(wrapped.toString(), '512');
+ assert.strictEqual('' + wrapped, '512');
+ });
+
+}());
diff --git a/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/underscore/test/collections.js b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/underscore/test/collections.js
new file mode 100644
index 0000000..182f7a2
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/underscore/test/collections.js
@@ -0,0 +1,896 @@
+(function() {
+ var _ = typeof require == 'function' ? require('..') : window._;
+
+ QUnit.module('Collections');
+
+ QUnit.test('each', function(assert) {
+ _.each([1, 2, 3], function(num, i) {
+ assert.equal(num, i + 1, 'each iterators provide value and iteration count');
+ });
+
+ var answers = [];
+ _.each([1, 2, 3], function(num){ answers.push(num * this.multiplier); }, {multiplier: 5});
+ assert.deepEqual(answers, [5, 10, 15], 'context object property accessed');
+
+ answers = [];
+ _.each([1, 2, 3], function(num){ answers.push(num); });
+ assert.deepEqual(answers, [1, 2, 3], 'can iterate a simple array');
+
+ answers = [];
+ var obj = {one: 1, two: 2, three: 3};
+ obj.constructor.prototype.four = 4;
+ _.each(obj, function(value, key){ answers.push(key); });
+ assert.deepEqual(answers, ['one', 'two', 'three'], 'iterating over objects works, and ignores the object prototype.');
+ delete obj.constructor.prototype.four;
+
+ // ensure the each function is JITed
+ _(1000).times(function() { _.each([], function(){}); });
+ var count = 0;
+ obj = {1: 'foo', 2: 'bar', 3: 'baz'};
+ _.each(obj, function(){ count++; });
+ assert.equal(count, 3, 'the fun should be called only 3 times');
+
+ var answer = null;
+ _.each([1, 2, 3], function(num, index, arr){ if (_.include(arr, num)) answer = true; });
+ assert.ok(answer, 'can reference the original collection from inside the iterator');
+
+ answers = 0;
+ _.each(null, function(){ ++answers; });
+ assert.equal(answers, 0, 'handles a null properly');
+
+ _.each(false, function(){});
+
+ var a = [1, 2, 3];
+ assert.strictEqual(_.each(a, function(){}), a);
+ assert.strictEqual(_.each(null, function(){}), null);
+ });
+
+ QUnit.test('forEach', function(assert) {
+ assert.strictEqual(_.forEach, _.each, 'is an alias for each');
+ });
+
+ QUnit.test('lookupIterator with contexts', function(assert) {
+ _.each([true, false, 'yes', '', 0, 1, {}], function(context) {
+ _.each([1], function() {
+ assert.equal(this, context);
+ }, context);
+ });
+ });
+
+ QUnit.test('Iterating objects with sketchy length properties', function(assert) {
+ var functions = [
+ 'each', 'map', 'filter', 'find',
+ 'some', 'every', 'max', 'min',
+ 'groupBy', 'countBy', 'partition', 'indexBy'
+ ];
+ var reducers = ['reduce', 'reduceRight'];
+
+ var tricks = [
+ {length: '5'},
+ {length: {valueOf: _.constant(5)}},
+ {length: Math.pow(2, 53) + 1},
+ {length: Math.pow(2, 53)},
+ {length: null},
+ {length: -2},
+ {length: new Number(15)}
+ ];
+
+ assert.expect(tricks.length * (functions.length + reducers.length + 4));
+
+ _.each(tricks, function(trick) {
+ var length = trick.length;
+ assert.strictEqual(_.size(trick), 1, 'size on obj with length: ' + length);
+ assert.deepEqual(_.toArray(trick), [length], 'toArray on obj with length: ' + length);
+ assert.deepEqual(_.shuffle(trick), [length], 'shuffle on obj with length: ' + length);
+ assert.deepEqual(_.sample(trick), length, 'sample on obj with length: ' + length);
+
+
+ _.each(functions, function(method) {
+ _[method](trick, function(val, key) {
+ assert.strictEqual(key, 'length', method + ': ran with length = ' + val);
+ });
+ });
+
+ _.each(reducers, function(method) {
+ assert.strictEqual(_[method](trick), trick.length, method);
+ });
+ });
+ });
+
+ QUnit.test('Resistant to collection length and properties changing while iterating', function(assert) {
+
+ var collection = [
+ 'each', 'map', 'filter', 'find',
+ 'some', 'every', 'max', 'min', 'reject',
+ 'groupBy', 'countBy', 'partition', 'indexBy',
+ 'reduce', 'reduceRight'
+ ];
+ var array = [
+ 'findIndex', 'findLastIndex'
+ ];
+ var object = [
+ 'mapObject', 'findKey', 'pick', 'omit'
+ ];
+
+ _.each(collection.concat(array), function(method) {
+ var sparseArray = [1, 2, 3];
+ sparseArray.length = 100;
+ var answers = 0;
+ _[method](sparseArray, function(){
+ ++answers;
+ return method === 'every' ? true : null;
+ }, {});
+ assert.equal(answers, 100, method + ' enumerates [0, length)');
+
+ var growingCollection = [1, 2, 3], count = 0;
+ _[method](growingCollection, function() {
+ if (count < 10) growingCollection.push(count++);
+ return method === 'every' ? true : null;
+ }, {});
+ assert.equal(count, 3, method + ' is resistant to length changes');
+ });
+
+ _.each(collection.concat(object), function(method) {
+ var changingObject = {0: 0, 1: 1}, count = 0;
+ _[method](changingObject, function(val) {
+ if (count < 10) changingObject[++count] = val + 1;
+ return method === 'every' ? true : null;
+ }, {});
+
+ assert.equal(count, 2, method + ' is resistant to property changes');
+ });
+ });
+
+ QUnit.test('map', function(assert) {
+ var doubled = _.map([1, 2, 3], function(num){ return num * 2; });
+ assert.deepEqual(doubled, [2, 4, 6], 'doubled numbers');
+
+ var tripled = _.map([1, 2, 3], function(num){ return num * this.multiplier; }, {multiplier: 3});
+ assert.deepEqual(tripled, [3, 6, 9], 'tripled numbers with context');
+
+ doubled = _([1, 2, 3]).map(function(num){ return num * 2; });
+ assert.deepEqual(doubled, [2, 4, 6], 'OO-style doubled numbers');
+
+ var ids = _.map({length: 2, 0: {id: '1'}, 1: {id: '2'}}, function(n){
+ return n.id;
+ });
+ assert.deepEqual(ids, ['1', '2'], 'Can use collection methods on Array-likes.');
+
+ assert.deepEqual(_.map(null, _.noop), [], 'handles a null properly');
+
+ assert.deepEqual(_.map([1], function() {
+ return this.length;
+ }, [5]), [1], 'called with context');
+
+ // Passing a property name like _.pluck.
+ var people = [{name: 'moe', age: 30}, {name: 'curly', age: 50}];
+ assert.deepEqual(_.map(people, 'name'), ['moe', 'curly'], 'predicate string map to object properties');
+ });
+
+ QUnit.test('collect', function(assert) {
+ assert.strictEqual(_.collect, _.map, 'is an alias for map');
+ });
+
+ QUnit.test('reduce', function(assert) {
+ var sum = _.reduce([1, 2, 3], function(memo, num){ return memo + num; }, 0);
+ assert.equal(sum, 6, 'can sum up an array');
+
+ var context = {multiplier: 3};
+ sum = _.reduce([1, 2, 3], function(memo, num){ return memo + num * this.multiplier; }, 0, context);
+ assert.equal(sum, 18, 'can reduce with a context object');
+
+ sum = _([1, 2, 3]).reduce(function(memo, num){ return memo + num; }, 0);
+ assert.equal(sum, 6, 'OO-style reduce');
+
+ sum = _.reduce([1, 2, 3], function(memo, num){ return memo + num; });
+ assert.equal(sum, 6, 'default initial value');
+
+ var prod = _.reduce([1, 2, 3, 4], function(memo, num){ return memo * num; });
+ assert.equal(prod, 24, 'can reduce via multiplication');
+
+ assert.ok(_.reduce(null, _.noop, 138) === 138, 'handles a null (with initial value) properly');
+ assert.equal(_.reduce([], _.noop, void 0), void 0, 'undefined can be passed as a special case');
+ assert.equal(_.reduce([_], _.noop), _, 'collection of length one with no initial value returns the first item');
+ assert.equal(_.reduce([], _.noop), void 0, 'returns undefined when collection is empty and no initial value');
+ });
+
+ QUnit.test('foldl', function(assert) {
+ assert.strictEqual(_.foldl, _.reduce, 'is an alias for reduce');
+ });
+
+ QUnit.test('inject', function(assert) {
+ assert.strictEqual(_.inject, _.reduce, 'is an alias for reduce');
+ });
+
+ QUnit.test('reduceRight', function(assert) {
+ var list = _.reduceRight(['foo', 'bar', 'baz'], function(memo, str){ return memo + str; }, '');
+ assert.equal(list, 'bazbarfoo', 'can perform right folds');
+
+ list = _.reduceRight(['foo', 'bar', 'baz'], function(memo, str){ return memo + str; });
+ assert.equal(list, 'bazbarfoo', 'default initial value');
+
+ var sum = _.reduceRight({a: 1, b: 2, c: 3}, function(memo, num){ return memo + num; });
+ assert.equal(sum, 6, 'default initial value on object');
+
+ assert.ok(_.reduceRight(null, _.noop, 138) === 138, 'handles a null (with initial value) properly');
+ assert.equal(_.reduceRight([_], _.noop), _, 'collection of length one with no initial value returns the first item');
+
+ assert.equal(_.reduceRight([], _.noop, void 0), void 0, 'undefined can be passed as a special case');
+ assert.equal(_.reduceRight([], _.noop), void 0, 'returns undefined when collection is empty and no initial value');
+
+ // Assert that the correct arguments are being passed.
+
+ var args,
+ init = {},
+ object = {a: 1, b: 2},
+ lastKey = _.keys(object).pop();
+
+ var expected = lastKey === 'a'
+ ? [init, 1, 'a', object]
+ : [init, 2, 'b', object];
+
+ _.reduceRight(object, function() {
+ if (!args) args = _.toArray(arguments);
+ }, init);
+
+ assert.deepEqual(args, expected);
+
+ // And again, with numeric keys.
+
+ object = {2: 'a', 1: 'b'};
+ lastKey = _.keys(object).pop();
+ args = null;
+
+ expected = lastKey === '2'
+ ? [init, 'a', '2', object]
+ : [init, 'b', '1', object];
+
+ _.reduceRight(object, function() {
+ if (!args) args = _.toArray(arguments);
+ }, init);
+
+ assert.deepEqual(args, expected);
+ });
+
+ QUnit.test('foldr', function(assert) {
+ assert.strictEqual(_.foldr, _.reduceRight, 'is an alias for reduceRight');
+ });
+
+ QUnit.test('find', function(assert) {
+ var array = [1, 2, 3, 4];
+ assert.strictEqual(_.find(array, function(n) { return n > 2; }), 3, 'should return first found `value`');
+ assert.strictEqual(_.find(array, function() { return false; }), void 0, 'should return `undefined` if `value` is not found');
+
+ array.dontmatch = 55;
+ assert.strictEqual(_.find(array, function(x) { return x === 55; }), void 0, 'iterates array-likes correctly');
+
+ // Matching an object like _.findWhere.
+ var list = [{a: 1, b: 2}, {a: 2, b: 2}, {a: 1, b: 3}, {a: 1, b: 4}, {a: 2, b: 4}];
+ assert.deepEqual(_.find(list, {a: 1}), {a: 1, b: 2}, 'can be used as findWhere');
+ assert.deepEqual(_.find(list, {b: 4}), {a: 1, b: 4});
+ assert.ok(!_.find(list, {c: 1}), 'undefined when not found');
+ assert.ok(!_.find([], {c: 1}), 'undefined when searching empty list');
+
+ var result = _.find([1, 2, 3], function(num){ return num * 2 === 4; });
+ assert.equal(result, 2, 'found the first "2" and broke the loop');
+
+ var obj = {
+ a: {x: 1, z: 3},
+ b: {x: 2, z: 2},
+ c: {x: 3, z: 4},
+ d: {x: 4, z: 1}
+ };
+
+ assert.deepEqual(_.find(obj, {x: 2}), {x: 2, z: 2}, 'works on objects');
+ assert.deepEqual(_.find(obj, {x: 2, z: 1}), void 0);
+ assert.deepEqual(_.find(obj, function(x) {
+ return x.x === 4;
+ }), {x: 4, z: 1});
+
+ _.findIndex([{a: 1}], function(a, key, o) {
+ assert.equal(key, 0);
+ assert.deepEqual(o, [{a: 1}]);
+ assert.strictEqual(this, _, 'called with context');
+ }, _);
+ });
+
+ QUnit.test('detect', function(assert) {
+ assert.strictEqual(_.detect, _.find, 'is an alias for find');
+ });
+
+ QUnit.test('filter', function(assert) {
+ var evenArray = [1, 2, 3, 4, 5, 6];
+ var evenObject = {one: 1, two: 2, three: 3};
+ var isEven = function(num){ return num % 2 === 0; };
+
+ assert.deepEqual(_.filter(evenArray, isEven), [2, 4, 6]);
+ assert.deepEqual(_.filter(evenObject, isEven), [2], 'can filter objects');
+ assert.deepEqual(_.filter([{}, evenObject, []], 'two'), [evenObject], 'predicate string map to object properties');
+
+ _.filter([1], function() {
+ assert.equal(this, evenObject, 'given context');
+ }, evenObject);
+
+ // Can be used like _.where.
+ var list = [{a: 1, b: 2}, {a: 2, b: 2}, {a: 1, b: 3}, {a: 1, b: 4}];
+ assert.deepEqual(_.filter(list, {a: 1}), [{a: 1, b: 2}, {a: 1, b: 3}, {a: 1, b: 4}]);
+ assert.deepEqual(_.filter(list, {b: 2}), [{a: 1, b: 2}, {a: 2, b: 2}]);
+ assert.deepEqual(_.filter(list, {}), list, 'Empty object accepts all items');
+ assert.deepEqual(_(list).filter({}), list, 'OO-filter');
+ });
+
+ QUnit.test('select', function(assert) {
+ assert.strictEqual(_.select, _.filter, 'is an alias for filter');
+ });
+
+ QUnit.test('reject', function(assert) {
+ var odds = _.reject([1, 2, 3, 4, 5, 6], function(num){ return num % 2 === 0; });
+ assert.deepEqual(odds, [1, 3, 5], 'rejected each even number');
+
+ var context = 'obj';
+
+ var evens = _.reject([1, 2, 3, 4, 5, 6], function(num){
+ assert.equal(context, 'obj');
+ return num % 2 !== 0;
+ }, context);
+ assert.deepEqual(evens, [2, 4, 6], 'rejected each odd number');
+
+ assert.deepEqual(_.reject([odds, {one: 1, two: 2, three: 3}], 'two'), [odds], 'predicate string map to object properties');
+
+ // Can be used like _.where.
+ var list = [{a: 1, b: 2}, {a: 2, b: 2}, {a: 1, b: 3}, {a: 1, b: 4}];
+ assert.deepEqual(_.reject(list, {a: 1}), [{a: 2, b: 2}]);
+ assert.deepEqual(_.reject(list, {b: 2}), [{a: 1, b: 3}, {a: 1, b: 4}]);
+ assert.deepEqual(_.reject(list, {}), [], 'Returns empty list given empty object');
+ assert.deepEqual(_.reject(list, []), [], 'Returns empty list given empty array');
+ });
+
+ QUnit.test('every', function(assert) {
+ assert.ok(_.every([], _.identity), 'the empty set');
+ assert.ok(_.every([true, true, true], _.identity), 'every true values');
+ assert.ok(!_.every([true, false, true], _.identity), 'one false value');
+ assert.ok(_.every([0, 10, 28], function(num){ return num % 2 === 0; }), 'even numbers');
+ assert.ok(!_.every([0, 11, 28], function(num){ return num % 2 === 0; }), 'an odd number');
+ assert.ok(_.every([1], _.identity) === true, 'cast to boolean - true');
+ assert.ok(_.every([0], _.identity) === false, 'cast to boolean - false');
+ assert.ok(!_.every([void 0, void 0, void 0], _.identity), 'works with arrays of undefined');
+
+ var list = [{a: 1, b: 2}, {a: 2, b: 2}, {a: 1, b: 3}, {a: 1, b: 4}];
+ assert.ok(!_.every(list, {a: 1, b: 2}), 'Can be called with object');
+ assert.ok(_.every(list, 'a'), 'String mapped to object property');
+
+ list = [{a: 1, b: 2}, {a: 2, b: 2, c: true}];
+ assert.ok(_.every(list, {b: 2}), 'Can be called with object');
+ assert.ok(!_.every(list, 'c'), 'String mapped to object property');
+
+ assert.ok(_.every({a: 1, b: 2, c: 3, d: 4}, _.isNumber), 'takes objects');
+ assert.ok(!_.every({a: 1, b: 2, c: 3, d: 4}, _.isObject), 'takes objects');
+ assert.ok(_.every(['a', 'b', 'c', 'd'], _.hasOwnProperty, {a: 1, b: 2, c: 3, d: 4}), 'context works');
+ assert.ok(!_.every(['a', 'b', 'c', 'd', 'f'], _.hasOwnProperty, {a: 1, b: 2, c: 3, d: 4}), 'context works');
+ });
+
+ QUnit.test('all', function(assert) {
+ assert.strictEqual(_.all, _.every, 'is an alias for every');
+ });
+
+ QUnit.test('some', function(assert) {
+ assert.ok(!_.some([]), 'the empty set');
+ assert.ok(!_.some([false, false, false]), 'all false values');
+ assert.ok(_.some([false, false, true]), 'one true value');
+ assert.ok(_.some([null, 0, 'yes', false]), 'a string');
+ assert.ok(!_.some([null, 0, '', false]), 'falsy values');
+ assert.ok(!_.some([1, 11, 29], function(num){ return num % 2 === 0; }), 'all odd numbers');
+ assert.ok(_.some([1, 10, 29], function(num){ return num % 2 === 0; }), 'an even number');
+ assert.ok(_.some([1], _.identity) === true, 'cast to boolean - true');
+ assert.ok(_.some([0], _.identity) === false, 'cast to boolean - false');
+ assert.ok(_.some([false, false, true]));
+
+ var list = [{a: 1, b: 2}, {a: 2, b: 2}, {a: 1, b: 3}, {a: 1, b: 4}];
+ assert.ok(!_.some(list, {a: 5, b: 2}), 'Can be called with object');
+ assert.ok(_.some(list, 'a'), 'String mapped to object property');
+
+ list = [{a: 1, b: 2}, {a: 2, b: 2, c: true}];
+ assert.ok(_.some(list, {b: 2}), 'Can be called with object');
+ assert.ok(!_.some(list, 'd'), 'String mapped to object property');
+
+ assert.ok(_.some({a: '1', b: '2', c: '3', d: '4', e: 6}, _.isNumber), 'takes objects');
+ assert.ok(!_.some({a: 1, b: 2, c: 3, d: 4}, _.isObject), 'takes objects');
+ assert.ok(_.some(['a', 'b', 'c', 'd'], _.hasOwnProperty, {a: 1, b: 2, c: 3, d: 4}), 'context works');
+ assert.ok(!_.some(['x', 'y', 'z'], _.hasOwnProperty, {a: 1, b: 2, c: 3, d: 4}), 'context works');
+ });
+
+ QUnit.test('any', function(assert) {
+ assert.strictEqual(_.any, _.some, 'is an alias for some');
+ });
+
+ QUnit.test('includes', function(assert) {
+ _.each([null, void 0, 0, 1, NaN, {}, []], function(val) {
+ assert.strictEqual(_.includes(val, 'hasOwnProperty'), false);
+ });
+ assert.strictEqual(_.includes([1, 2, 3], 2), true, 'two is in the array');
+ assert.ok(!_.includes([1, 3, 9], 2), 'two is not in the array');
+
+ assert.strictEqual(_.includes([5, 4, 3, 2, 1], 5, true), true, 'doesn\'t delegate to binary search');
+
+ assert.ok(_.includes({moe: 1, larry: 3, curly: 9}, 3) === true, '_.includes on objects checks their values');
+ assert.ok(_([1, 2, 3]).includes(2), 'OO-style includes');
+
+ var numbers = [1, 2, 3, 1, 2, 3, 1, 2, 3];
+ assert.strictEqual(_.includes(numbers, 1, 1), true, 'takes a fromIndex');
+ assert.strictEqual(_.includes(numbers, 1, -1), false, 'takes a fromIndex');
+ assert.strictEqual(_.includes(numbers, 1, -2), false, 'takes a fromIndex');
+ assert.strictEqual(_.includes(numbers, 1, -3), true, 'takes a fromIndex');
+ assert.strictEqual(_.includes(numbers, 1, 6), true, 'takes a fromIndex');
+ assert.strictEqual(_.includes(numbers, 1, 7), false, 'takes a fromIndex');
+
+ assert.ok(_.every([1, 2, 3], _.partial(_.includes, numbers)), 'fromIndex is guarded');
+ });
+
+ QUnit.test('include', function(assert) {
+ assert.strictEqual(_.include, _.includes, 'is an alias for includes');
+ });
+
+ QUnit.test('contains', function(assert) {
+ assert.strictEqual(_.contains, _.includes, 'is an alias for includes');
+
+ });
+
+ QUnit.test('includes with NaN', function(assert) {
+ assert.strictEqual(_.includes([1, 2, NaN, NaN], NaN), true, 'Expected [1, 2, NaN] to contain NaN');
+ assert.strictEqual(_.includes([1, 2, Infinity], NaN), false, 'Expected [1, 2, NaN] to contain NaN');
+ });
+
+ QUnit.test('includes with +- 0', function(assert) {
+ _.each([-0, +0], function(val) {
+ assert.strictEqual(_.includes([1, 2, val, val], val), true);
+ assert.strictEqual(_.includes([1, 2, val, val], -val), true);
+ assert.strictEqual(_.includes([-1, 1, 2], -val), false);
+ });
+ });
+
+
+ QUnit.test('invoke', function(assert) {
+ assert.expect(5);
+ var list = [[5, 1, 7], [3, 2, 1]];
+ var result = _.invoke(list, 'sort');
+ assert.deepEqual(result[0], [1, 5, 7], 'first array sorted');
+ assert.deepEqual(result[1], [1, 2, 3], 'second array sorted');
+
+ _.invoke([{
+ method: function() {
+ assert.deepEqual(_.toArray(arguments), [1, 2, 3], 'called with arguments');
+ }
+ }], 'method', 1, 2, 3);
+
+ assert.deepEqual(_.invoke([{a: null}, {}, {a: _.constant(1)}], 'a'), [null, void 0, 1], 'handles null & undefined');
+
+ assert.raises(function() {
+ _.invoke([{a: 1}], 'a');
+ }, TypeError, 'throws for non-functions');
+ });
+
+ QUnit.test('invoke w/ function reference', function(assert) {
+ var list = [[5, 1, 7], [3, 2, 1]];
+ var result = _.invoke(list, Array.prototype.sort);
+ assert.deepEqual(result[0], [1, 5, 7], 'first array sorted');
+ assert.deepEqual(result[1], [1, 2, 3], 'second array sorted');
+
+ assert.deepEqual(_.invoke([1, 2, 3], function(a) {
+ return a + this;
+ }, 5), [6, 7, 8], 'receives params from invoke');
+ });
+
+ // Relevant when using ClojureScript
+ QUnit.test('invoke when strings have a call method', function(assert) {
+ String.prototype.call = function() {
+ return 42;
+ };
+ var list = [[5, 1, 7], [3, 2, 1]];
+ var s = 'foo';
+ assert.equal(s.call(), 42, 'call function exists');
+ var result = _.invoke(list, 'sort');
+ assert.deepEqual(result[0], [1, 5, 7], 'first array sorted');
+ assert.deepEqual(result[1], [1, 2, 3], 'second array sorted');
+ delete String.prototype.call;
+ assert.equal(s.call, void 0, 'call function removed');
+ });
+
+ QUnit.test('pluck', function(assert) {
+ var people = [{name: 'moe', age: 30}, {name: 'curly', age: 50}];
+ assert.deepEqual(_.pluck(people, 'name'), ['moe', 'curly'], 'pulls names out of objects');
+ assert.deepEqual(_.pluck(people, 'address'), [void 0, void 0], 'missing properties are returned as undefined');
+ //compat: most flexible handling of edge cases
+ assert.deepEqual(_.pluck([{'[object Object]': 1}], {}), [1]);
+ });
+
+ QUnit.test('where', function(assert) {
+ var list = [{a: 1, b: 2}, {a: 2, b: 2}, {a: 1, b: 3}, {a: 1, b: 4}];
+ var result = _.where(list, {a: 1});
+ assert.equal(result.length, 3);
+ assert.equal(result[result.length - 1].b, 4);
+ result = _.where(list, {b: 2});
+ assert.equal(result.length, 2);
+ assert.equal(result[0].a, 1);
+ result = _.where(list, {});
+ assert.equal(result.length, list.length);
+
+ function test() {}
+ test.map = _.map;
+ assert.deepEqual(_.where([_, {a: 1, b: 2}, _], test), [_, _], 'checks properties given function');
+ });
+
+ QUnit.test('findWhere', function(assert) {
+ var list = [{a: 1, b: 2}, {a: 2, b: 2}, {a: 1, b: 3}, {a: 1, b: 4}, {a: 2, b: 4}];
+ var result = _.findWhere(list, {a: 1});
+ assert.deepEqual(result, {a: 1, b: 2});
+ result = _.findWhere(list, {b: 4});
+ assert.deepEqual(result, {a: 1, b: 4});
+
+ result = _.findWhere(list, {c: 1});
+ assert.ok(_.isUndefined(result), 'undefined when not found');
+
+ result = _.findWhere([], {c: 1});
+ assert.ok(_.isUndefined(result), 'undefined when searching empty list');
+
+ function test() {}
+ test.map = _.map;
+ assert.equal(_.findWhere([_, {a: 1, b: 2}, _], test), _, 'checks properties given function');
+
+ function TestClass() {
+ this.y = 5;
+ this.x = 'foo';
+ }
+ var expect = {c: 1, x: 'foo', y: 5};
+ assert.deepEqual(_.findWhere([{y: 5, b: 6}, expect], new TestClass()), expect, 'uses class instance properties');
+ });
+
+ QUnit.test('max', function(assert) {
+ assert.equal(-Infinity, _.max(null), 'can handle null/undefined');
+ assert.equal(-Infinity, _.max(void 0), 'can handle null/undefined');
+ assert.equal(-Infinity, _.max(null, _.identity), 'can handle null/undefined');
+
+ assert.equal(3, _.max([1, 2, 3]), 'can perform a regular Math.max');
+
+ var neg = _.max([1, 2, 3], function(num){ return -num; });
+ assert.equal(neg, 1, 'can perform a computation-based max');
+
+ assert.equal(-Infinity, _.max({}), 'Maximum value of an empty object');
+ assert.equal(-Infinity, _.max([]), 'Maximum value of an empty array');
+ assert.equal(_.max({a: 'a'}), -Infinity, 'Maximum value of a non-numeric collection');
+
+ assert.equal(299999, _.max(_.range(1, 300000)), 'Maximum value of a too-big array');
+
+ assert.equal(3, _.max([1, 2, 3, 'test']), 'Finds correct max in array starting with num and containing a NaN');
+ assert.equal(3, _.max(['test', 1, 2, 3]), 'Finds correct max in array starting with NaN');
+
+ assert.equal(3, _.max([1, 2, 3, null]), 'Finds correct max in array starting with num and containing a `null`');
+ assert.equal(3, _.max([null, 1, 2, 3]), 'Finds correct max in array starting with a `null`');
+
+ assert.equal(3, _.max([1, 2, 3, '']), 'Finds correct max in array starting with num and containing an empty string');
+ assert.equal(3, _.max(['', 1, 2, 3]), 'Finds correct max in array starting with an empty string');
+
+ assert.equal(3, _.max([1, 2, 3, false]), 'Finds correct max in array starting with num and containing a false');
+ assert.equal(3, _.max([false, 1, 2, 3]), 'Finds correct max in array starting with a false');
+
+ assert.equal(4, _.max([0, 1, 2, 3, 4]), 'Finds correct max in array containing a zero');
+ assert.equal(0, _.max([-3, -2, -1, 0]), 'Finds correct max in array containing negative numbers');
+
+ assert.deepEqual([3, 6], _.map([[1, 2, 3], [4, 5, 6]], _.max), 'Finds correct max in array when mapping through multiple arrays');
+
+ var a = {x: -Infinity};
+ var b = {x: -Infinity};
+ var iterator = function(o){ return o.x; };
+ assert.equal(_.max([a, b], iterator), a, 'Respects iterator return value of -Infinity');
+
+ assert.deepEqual(_.max([{a: 1}, {a: 0, b: 3}, {a: 4}, {a: 2}], 'a'), {a: 4}, 'String keys use property iterator');
+
+ assert.deepEqual(_.max([0, 2], function(c){ return c * this.x; }, {x: 1}), 2, 'Iterator context');
+ assert.deepEqual(_.max([[1], [2, 3], [-1, 4], [5]], 0), [5], 'Lookup falsy iterator');
+ assert.deepEqual(_.max([{0: 1}, {0: 2}, {0: -1}, {a: 1}], 0), {0: 2}, 'Lookup falsy iterator');
+ });
+
+ QUnit.test('min', function(assert) {
+ assert.equal(Infinity, _.min(null), 'can handle null/undefined');
+ assert.equal(Infinity, _.min(void 0), 'can handle null/undefined');
+ assert.equal(Infinity, _.min(null, _.identity), 'can handle null/undefined');
+
+ assert.equal(1, _.min([1, 2, 3]), 'can perform a regular Math.min');
+
+ var neg = _.min([1, 2, 3], function(num){ return -num; });
+ assert.equal(neg, 3, 'can perform a computation-based min');
+
+ assert.equal(Infinity, _.min({}), 'Minimum value of an empty object');
+ assert.equal(Infinity, _.min([]), 'Minimum value of an empty array');
+ assert.equal(_.min({a: 'a'}), Infinity, 'Minimum value of a non-numeric collection');
+
+ assert.deepEqual([1, 4], _.map([[1, 2, 3], [4, 5, 6]], _.min), 'Finds correct min in array when mapping through multiple arrays');
+
+ var now = new Date(9999999999);
+ var then = new Date(0);
+ assert.equal(_.min([now, then]), then);
+
+ assert.equal(1, _.min(_.range(1, 300000)), 'Minimum value of a too-big array');
+
+ assert.equal(1, _.min([1, 2, 3, 'test']), 'Finds correct min in array starting with num and containing a NaN');
+ assert.equal(1, _.min(['test', 1, 2, 3]), 'Finds correct min in array starting with NaN');
+
+ assert.equal(1, _.min([1, 2, 3, null]), 'Finds correct min in array starting with num and containing a `null`');
+ assert.equal(1, _.min([null, 1, 2, 3]), 'Finds correct min in array starting with a `null`');
+
+ assert.equal(0, _.min([0, 1, 2, 3, 4]), 'Finds correct min in array containing a zero');
+ assert.equal(-3, _.min([-3, -2, -1, 0]), 'Finds correct min in array containing negative numbers');
+
+ var a = {x: Infinity};
+ var b = {x: Infinity};
+ var iterator = function(o){ return o.x; };
+ assert.equal(_.min([a, b], iterator), a, 'Respects iterator return value of Infinity');
+
+ assert.deepEqual(_.min([{a: 1}, {a: 0, b: 3}, {a: 4}, {a: 2}], 'a'), {a: 0, b: 3}, 'String keys use property iterator');
+
+ assert.deepEqual(_.min([0, 2], function(c){ return c * this.x; }, {x: -1}), 2, 'Iterator context');
+ assert.deepEqual(_.min([[1], [2, 3], [-1, 4], [5]], 0), [-1, 4], 'Lookup falsy iterator');
+ assert.deepEqual(_.min([{0: 1}, {0: 2}, {0: -1}, {a: 1}], 0), {0: -1}, 'Lookup falsy iterator');
+ });
+
+ QUnit.test('sortBy', function(assert) {
+ var people = [{name: 'curly', age: 50}, {name: 'moe', age: 30}];
+ people = _.sortBy(people, function(person){ return person.age; });
+ assert.deepEqual(_.pluck(people, 'name'), ['moe', 'curly'], 'stooges sorted by age');
+
+ var list = [void 0, 4, 1, void 0, 3, 2];
+ assert.deepEqual(_.sortBy(list, _.identity), [1, 2, 3, 4, void 0, void 0], 'sortBy with undefined values');
+
+ list = ['one', 'two', 'three', 'four', 'five'];
+ var sorted = _.sortBy(list, 'length');
+ assert.deepEqual(sorted, ['one', 'two', 'four', 'five', 'three'], 'sorted by length');
+
+ function Pair(x, y) {
+ this.x = x;
+ this.y = y;
+ }
+
+ var stableArray = [
+ new Pair(1, 1), new Pair(1, 2),
+ new Pair(1, 3), new Pair(1, 4),
+ new Pair(1, 5), new Pair(1, 6),
+ new Pair(2, 1), new Pair(2, 2),
+ new Pair(2, 3), new Pair(2, 4),
+ new Pair(2, 5), new Pair(2, 6),
+ new Pair(void 0, 1), new Pair(void 0, 2),
+ new Pair(void 0, 3), new Pair(void 0, 4),
+ new Pair(void 0, 5), new Pair(void 0, 6)
+ ];
+
+ var stableObject = _.object('abcdefghijklmnopqr'.split(''), stableArray);
+
+ var actual = _.sortBy(stableArray, function(pair) {
+ return pair.x;
+ });
+
+ assert.deepEqual(actual, stableArray, 'sortBy should be stable for arrays');
+ assert.deepEqual(_.sortBy(stableArray, 'x'), stableArray, 'sortBy accepts property string');
+
+ actual = _.sortBy(stableObject, function(pair) {
+ return pair.x;
+ });
+
+ assert.deepEqual(actual, stableArray, 'sortBy should be stable for objects');
+
+ list = ['q', 'w', 'e', 'r', 't', 'y'];
+ assert.deepEqual(_.sortBy(list), ['e', 'q', 'r', 't', 'w', 'y'], 'uses _.identity if iterator is not specified');
+ });
+
+ QUnit.test('groupBy', function(assert) {
+ var parity = _.groupBy([1, 2, 3, 4, 5, 6], function(num){ return num % 2; });
+ assert.ok('0' in parity && '1' in parity, 'created a group for each value');
+ assert.deepEqual(parity[0], [2, 4, 6], 'put each even number in the right group');
+
+ var list = ['one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'ten'];
+ var grouped = _.groupBy(list, 'length');
+ assert.deepEqual(grouped['3'], ['one', 'two', 'six', 'ten']);
+ assert.deepEqual(grouped['4'], ['four', 'five', 'nine']);
+ assert.deepEqual(grouped['5'], ['three', 'seven', 'eight']);
+
+ var context = {};
+ _.groupBy([{}], function(){ assert.ok(this === context); }, context);
+
+ grouped = _.groupBy([4.2, 6.1, 6.4], function(num) {
+ return Math.floor(num) > 4 ? 'hasOwnProperty' : 'constructor';
+ });
+ assert.equal(grouped.constructor.length, 1);
+ assert.equal(grouped.hasOwnProperty.length, 2);
+
+ var array = [{}];
+ _.groupBy(array, function(value, index, obj){ assert.ok(obj === array); });
+
+ array = [1, 2, 1, 2, 3];
+ grouped = _.groupBy(array);
+ assert.equal(grouped['1'].length, 2);
+ assert.equal(grouped['3'].length, 1);
+
+ var matrix = [
+ [1, 2],
+ [1, 3],
+ [2, 3]
+ ];
+ assert.deepEqual(_.groupBy(matrix, 0), {1: [[1, 2], [1, 3]], 2: [[2, 3]]});
+ assert.deepEqual(_.groupBy(matrix, 1), {2: [[1, 2]], 3: [[1, 3], [2, 3]]});
+ });
+
+ QUnit.test('indexBy', function(assert) {
+ var parity = _.indexBy([1, 2, 3, 4, 5], function(num){ return num % 2 === 0; });
+ assert.equal(parity['true'], 4);
+ assert.equal(parity['false'], 5);
+
+ var list = ['one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'ten'];
+ var grouped = _.indexBy(list, 'length');
+ assert.equal(grouped['3'], 'ten');
+ assert.equal(grouped['4'], 'nine');
+ assert.equal(grouped['5'], 'eight');
+
+ var array = [1, 2, 1, 2, 3];
+ grouped = _.indexBy(array);
+ assert.equal(grouped['1'], 1);
+ assert.equal(grouped['2'], 2);
+ assert.equal(grouped['3'], 3);
+ });
+
+ QUnit.test('countBy', function(assert) {
+ var parity = _.countBy([1, 2, 3, 4, 5], function(num){ return num % 2 === 0; });
+ assert.equal(parity['true'], 2);
+ assert.equal(parity['false'], 3);
+
+ var list = ['one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'ten'];
+ var grouped = _.countBy(list, 'length');
+ assert.equal(grouped['3'], 4);
+ assert.equal(grouped['4'], 3);
+ assert.equal(grouped['5'], 3);
+
+ var context = {};
+ _.countBy([{}], function(){ assert.ok(this === context); }, context);
+
+ grouped = _.countBy([4.2, 6.1, 6.4], function(num) {
+ return Math.floor(num) > 4 ? 'hasOwnProperty' : 'constructor';
+ });
+ assert.equal(grouped.constructor, 1);
+ assert.equal(grouped.hasOwnProperty, 2);
+
+ var array = [{}];
+ _.countBy(array, function(value, index, obj){ assert.ok(obj === array); });
+
+ array = [1, 2, 1, 2, 3];
+ grouped = _.countBy(array);
+ assert.equal(grouped['1'], 2);
+ assert.equal(grouped['3'], 1);
+ });
+
+ QUnit.test('shuffle', function(assert) {
+ assert.deepEqual(_.shuffle([1]), [1], 'behaves correctly on size 1 arrays');
+ var numbers = _.range(20);
+ var shuffled = _.shuffle(numbers);
+ assert.notDeepEqual(numbers, shuffled, 'does change the order'); // Chance of false negative: 1 in ~2.4*10^18
+ assert.notStrictEqual(numbers, shuffled, 'original object is unmodified');
+ assert.deepEqual(numbers, _.sortBy(shuffled), 'contains the same members before and after shuffle');
+
+ shuffled = _.shuffle({a: 1, b: 2, c: 3, d: 4});
+ assert.equal(shuffled.length, 4);
+ assert.deepEqual(shuffled.sort(), [1, 2, 3, 4], 'works on objects');
+ });
+
+ QUnit.test('sample', function(assert) {
+ assert.strictEqual(_.sample([1]), 1, 'behaves correctly when no second parameter is given');
+ assert.deepEqual(_.sample([1, 2, 3], -2), [], 'behaves correctly on negative n');
+ var numbers = _.range(10);
+ var allSampled = _.sample(numbers, 10).sort();
+ assert.deepEqual(allSampled, numbers, 'contains the same members before and after sample');
+ allSampled = _.sample(numbers, 20).sort();
+ assert.deepEqual(allSampled, numbers, 'also works when sampling more objects than are present');
+ assert.ok(_.contains(numbers, _.sample(numbers)), 'sampling a single element returns something from the array');
+ assert.strictEqual(_.sample([]), void 0, 'sampling empty array with no number returns undefined');
+ assert.notStrictEqual(_.sample([], 5), [], 'sampling empty array with a number returns an empty array');
+ assert.notStrictEqual(_.sample([1, 2, 3], 0), [], 'sampling an array with 0 picks returns an empty array');
+ assert.deepEqual(_.sample([1, 2], -1), [], 'sampling a negative number of picks returns an empty array');
+ assert.ok(_.contains([1, 2, 3], _.sample({a: 1, b: 2, c: 3})), 'sample one value from an object');
+ var partialSample = _.sample(_.range(1000), 10);
+ var partialSampleSorted = partialSample.sort();
+ assert.notDeepEqual(partialSampleSorted, _.range(10), 'samples from the whole array, not just the beginning');
+ });
+
+ QUnit.test('toArray', function(assert) {
+ assert.ok(!_.isArray(arguments), 'arguments object is not an array');
+ assert.ok(_.isArray(_.toArray(arguments)), 'arguments object converted into array');
+ var a = [1, 2, 3];
+ assert.ok(_.toArray(a) !== a, 'array is cloned');
+ assert.deepEqual(_.toArray(a), [1, 2, 3], 'cloned array contains same elements');
+
+ var numbers = _.toArray({one: 1, two: 2, three: 3});
+ assert.deepEqual(numbers, [1, 2, 3], 'object flattened into array');
+
+ var hearts = '\uD83D\uDC95';
+ var pair = hearts.split('');
+ var expected = [pair[0], hearts, '&', hearts, pair[1]];
+ assert.deepEqual(_.toArray(expected.join('')), expected, 'maintains astral characters');
+ assert.deepEqual(_.toArray(''), [], 'empty string into empty array');
+
+ if (typeof document != 'undefined') {
+ // test in IE < 9
+ var actual;
+ try {
+ actual = _.toArray(document.childNodes);
+ } catch (e) { /* ignored */ }
+ assert.deepEqual(actual, _.map(document.childNodes, _.identity), 'works on NodeList');
+ }
+ });
+
+ QUnit.test('size', function(assert) {
+ assert.equal(_.size({one: 1, two: 2, three: 3}), 3, 'can compute the size of an object');
+ assert.equal(_.size([1, 2, 3]), 3, 'can compute the size of an array');
+ assert.equal(_.size({length: 3, 0: 0, 1: 0, 2: 0}), 3, 'can compute the size of Array-likes');
+
+ var func = function() {
+ return _.size(arguments);
+ };
+
+ assert.equal(func(1, 2, 3, 4), 4, 'can test the size of the arguments object');
+
+ assert.equal(_.size('hello'), 5, 'can compute the size of a string literal');
+ assert.equal(_.size(new String('hello')), 5, 'can compute the size of string object');
+
+ assert.equal(_.size(null), 0, 'handles nulls');
+ assert.equal(_.size(0), 0, 'handles numbers');
+ });
+
+ QUnit.test('partition', function(assert) {
+ var list = [0, 1, 2, 3, 4, 5];
+ assert.deepEqual(_.partition(list, function(x) { return x < 4; }), [[0, 1, 2, 3], [4, 5]], 'handles bool return values');
+ assert.deepEqual(_.partition(list, function(x) { return x & 1; }), [[1, 3, 5], [0, 2, 4]], 'handles 0 and 1 return values');
+ assert.deepEqual(_.partition(list, function(x) { return x - 3; }), [[0, 1, 2, 4, 5], [3]], 'handles other numeric return values');
+ assert.deepEqual(_.partition(list, function(x) { return x > 1 ? null : true; }), [[0, 1], [2, 3, 4, 5]], 'handles null return values');
+ assert.deepEqual(_.partition(list, function(x) { if (x < 2) return true; }), [[0, 1], [2, 3, 4, 5]], 'handles undefined return values');
+ assert.deepEqual(_.partition({a: 1, b: 2, c: 3}, function(x) { return x > 1; }), [[2, 3], [1]], 'handles objects');
+
+ assert.deepEqual(_.partition(list, function(x, index) { return index % 2; }), [[1, 3, 5], [0, 2, 4]], 'can reference the array index');
+ assert.deepEqual(_.partition(list, function(x, index, arr) { return x === arr.length - 1; }), [[5], [0, 1, 2, 3, 4]], 'can reference the collection');
+
+ // Default iterator
+ assert.deepEqual(_.partition([1, false, true, '']), [[1, true], [false, '']], 'Default iterator');
+ assert.deepEqual(_.partition([{x: 1}, {x: 0}, {x: 1}], 'x'), [[{x: 1}, {x: 1}], [{x: 0}]], 'Takes a string');
+
+ // Context
+ var predicate = function(x){ return x === this.x; };
+ assert.deepEqual(_.partition([1, 2, 3], predicate, {x: 2}), [[2], [1, 3]], 'partition takes a context argument');
+
+ assert.deepEqual(_.partition([{a: 1}, {b: 2}, {a: 1, b: 2}], {a: 1}), [[{a: 1}, {a: 1, b: 2}], [{b: 2}]], 'predicate can be object');
+
+ var object = {a: 1};
+ _.partition(object, function(val, key, obj) {
+ assert.equal(val, 1);
+ assert.equal(key, 'a');
+ assert.equal(obj, object);
+ assert.equal(this, predicate);
+ }, predicate);
+ });
+
+ if (typeof document != 'undefined') {
+ QUnit.test('Can use various collection methods on NodeLists', function(assert) {
+ var parent = document.createElement('div');
+ parent.innerHTML = '<span id=id1></span>textnode<span id=id2></span>';
+
+ var elementChildren = _.filter(parent.childNodes, _.isElement);
+ assert.equal(elementChildren.length, 2);
+
+ assert.deepEqual(_.map(elementChildren, 'id'), ['id1', 'id2']);
+ assert.deepEqual(_.map(parent.childNodes, 'nodeType'), [1, 3, 1]);
+
+ assert.ok(!_.every(parent.childNodes, _.isElement));
+ assert.ok(_.some(parent.childNodes, _.isElement));
+
+ function compareNode(node) {
+ return _.isElement(node) ? node.id.charAt(2) : void 0;
+ }
+ assert.equal(_.max(parent.childNodes, compareNode), _.last(parent.childNodes));
+ assert.equal(_.min(parent.childNodes, compareNode), _.first(parent.childNodes));
+ });
+ }
+
+}());
diff --git a/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/underscore/test/cross-document.js b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/underscore/test/cross-document.js
new file mode 100644
index 0000000..cb68a3d
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/underscore/test/cross-document.js
@@ -0,0 +1,141 @@
+(function() {
+ if (typeof document == 'undefined') return;
+
+ var _ = typeof require == 'function' ? require('..') : window._;
+
+ QUnit.module('Cross Document');
+ /* global iObject, iElement, iArguments, iFunction, iArray, iError, iString, iNumber, iBoolean, iDate, iRegExp, iNaN, iNull, iUndefined, ActiveXObject */
+
+ // Setup remote variables for iFrame tests.
+ var iframe = document.createElement('iframe');
+ iframe.frameBorder = iframe.height = iframe.width = 0;
+ document.body.appendChild(iframe);
+ var iDoc = (iDoc = iframe.contentDocument || iframe.contentWindow).document || iDoc;
+ iDoc.write(
+ [
+ '<script>',
+ 'parent.iElement = document.createElement("div");',
+ 'parent.iArguments = (function(){ return arguments; })(1, 2, 3);',
+ 'parent.iArray = [1, 2, 3];',
+ 'parent.iString = new String("hello");',
+ 'parent.iNumber = new Number(100);',
+ 'parent.iFunction = (function(){});',
+ 'parent.iDate = new Date();',
+ 'parent.iRegExp = /hi/;',
+ 'parent.iNaN = NaN;',
+ 'parent.iNull = null;',
+ 'parent.iBoolean = new Boolean(false);',
+ 'parent.iUndefined = undefined;',
+ 'parent.iObject = {};',
+ 'parent.iError = new Error();',
+ '</script>'
+ ].join('\n')
+ );
+ iDoc.close();
+
+ QUnit.test('isEqual', function(assert) {
+
+ assert.ok(!_.isEqual(iNumber, 101));
+ assert.ok(_.isEqual(iNumber, 100));
+
+ // Objects from another frame.
+ assert.ok(_.isEqual({}, iObject), 'Objects with equivalent members created in different documents are equal');
+
+ // Array from another frame.
+ assert.ok(_.isEqual([1, 2, 3], iArray), 'Arrays with equivalent elements created in different documents are equal');
+ });
+
+ QUnit.test('isEmpty', function(assert) {
+ assert.ok(!_([iNumber]).isEmpty(), '[1] is not empty');
+ assert.ok(!_.isEmpty(iArray), '[] is empty');
+ assert.ok(_.isEmpty(iObject), '{} is empty');
+ });
+
+ QUnit.test('isElement', function(assert) {
+ assert.ok(!_.isElement('div'), 'strings are not dom elements');
+ assert.ok(_.isElement(document.body), 'the body tag is a DOM element');
+ assert.ok(_.isElement(iElement), 'even from another frame');
+ });
+
+ QUnit.test('isArguments', function(assert) {
+ assert.ok(_.isArguments(iArguments), 'even from another frame');
+ });
+
+ QUnit.test('isObject', function(assert) {
+ assert.ok(_.isObject(iElement), 'even from another frame');
+ assert.ok(_.isObject(iFunction), 'even from another frame');
+ });
+
+ QUnit.test('isArray', function(assert) {
+ assert.ok(_.isArray(iArray), 'even from another frame');
+ });
+
+ QUnit.test('isString', function(assert) {
+ assert.ok(_.isString(iString), 'even from another frame');
+ });
+
+ QUnit.test('isNumber', function(assert) {
+ assert.ok(_.isNumber(iNumber), 'even from another frame');
+ });
+
+ QUnit.test('isBoolean', function(assert) {
+ assert.ok(_.isBoolean(iBoolean), 'even from another frame');
+ });
+
+ QUnit.test('isFunction', function(assert) {
+ assert.ok(_.isFunction(iFunction), 'even from another frame');
+ });
+
+ QUnit.test('isDate', function(assert) {
+ assert.ok(_.isDate(iDate), 'even from another frame');
+ });
+
+ QUnit.test('isRegExp', function(assert) {
+ assert.ok(_.isRegExp(iRegExp), 'even from another frame');
+ });
+
+ QUnit.test('isNaN', function(assert) {
+ assert.ok(_.isNaN(iNaN), 'even from another frame');
+ });
+
+ QUnit.test('isNull', function(assert) {
+ assert.ok(_.isNull(iNull), 'even from another frame');
+ });
+
+ QUnit.test('isUndefined', function(assert) {
+ assert.ok(_.isUndefined(iUndefined), 'even from another frame');
+ });
+
+ QUnit.test('isError', function(assert) {
+ assert.ok(_.isError(iError), 'even from another frame');
+ });
+
+ if (typeof ActiveXObject != 'undefined') {
+ QUnit.test('IE host objects', function(assert) {
+ var xml = new ActiveXObject('Msxml2.DOMDocument.3.0');
+ assert.ok(!_.isNumber(xml));
+ assert.ok(!_.isBoolean(xml));
+ assert.ok(!_.isNaN(xml));
+ assert.ok(!_.isFunction(xml));
+ assert.ok(!_.isNull(xml));
+ assert.ok(!_.isUndefined(xml));
+ });
+
+ QUnit.test('#1621 IE 11 compat mode DOM elements are not functions', function(assert) {
+ var fn = function() {};
+ var xml = new ActiveXObject('Msxml2.DOMDocument.3.0');
+ var div = document.createElement('div');
+
+ // JIT the function
+ var count = 200;
+ while (count--) {
+ _.isFunction(fn);
+ }
+
+ assert.equal(_.isFunction(xml), false);
+ assert.equal(_.isFunction(div), false);
+ assert.equal(_.isFunction(fn), true);
+ });
+ }
+
+}());
diff --git a/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/underscore/test/functions.js b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/underscore/test/functions.js
new file mode 100644
index 0000000..f696bd6
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/underscore/test/functions.js
@@ -0,0 +1,728 @@
+(function() {
+ var _ = typeof require == 'function' ? require('..') : window._;
+
+ QUnit.module('Functions');
+ QUnit.config.asyncRetries = 3;
+
+ QUnit.test('bind', function(assert) {
+ var context = {name: 'moe'};
+ var func = function(arg) { return 'name: ' + (this.name || arg); };
+ var bound = _.bind(func, context);
+ assert.equal(bound(), 'name: moe', 'can bind a function to a context');
+
+ bound = _(func).bind(context);
+ assert.equal(bound(), 'name: moe', 'can do OO-style binding');
+
+ bound = _.bind(func, null, 'curly');
+ var result = bound();
+ // Work around a PhantomJS bug when applying a function with null|undefined.
+ assert.ok(result === 'name: curly' || result === 'name: ' + window.name, 'can bind without specifying a context');
+
+ func = function(salutation, name) { return salutation + ': ' + name; };
+ func = _.bind(func, this, 'hello');
+ assert.equal(func('moe'), 'hello: moe', 'the function was partially applied in advance');
+
+ func = _.bind(func, this, 'curly');
+ assert.equal(func(), 'hello: curly', 'the function was completely applied in advance');
+
+ func = function(salutation, firstname, lastname) { return salutation + ': ' + firstname + ' ' + lastname; };
+ func = _.bind(func, this, 'hello', 'moe', 'curly');
+ assert.equal(func(), 'hello: moe curly', 'the function was partially applied in advance and can accept multiple arguments');
+
+ func = function(ctx, message) { assert.equal(this, ctx, message); };
+ _.bind(func, 0, 0, 'can bind a function to `0`')();
+ _.bind(func, '', '', 'can bind a function to an empty string')();
+ _.bind(func, false, false, 'can bind a function to `false`')();
+
+ // These tests are only meaningful when using a browser without a native bind function
+ // To test this with a modern browser, set underscore's nativeBind to undefined
+ var F = function() { return this; };
+ var boundf = _.bind(F, {hello: 'moe curly'});
+ var Boundf = boundf; // make eslint happy.
+ var newBoundf = new Boundf();
+ assert.equal(newBoundf.hello, void 0, 'function should not be bound to the context, to comply with ECMAScript 5');
+ assert.equal(boundf().hello, 'moe curly', "When called without the new operator, it's OK to be bound to the context");
+ assert.ok(newBoundf instanceof F, 'a bound instance is an instance of the original function');
+
+ assert.raises(function() { _.bind('notafunction'); }, TypeError, 'throws an error when binding to a non-function');
+ });
+
+ QUnit.test('partial', function(assert) {
+ var obj = {name: 'moe'};
+ var func = function() { return this.name + ' ' + _.toArray(arguments).join(' '); };
+
+ obj.func = _.partial(func, 'a', 'b');
+ assert.equal(obj.func('c', 'd'), 'moe a b c d', 'can partially apply');
+
+ obj.func = _.partial(func, _, 'b', _, 'd');
+ assert.equal(obj.func('a', 'c'), 'moe a b c d', 'can partially apply with placeholders');
+
+ func = _.partial(function() { return arguments.length; }, _, 'b', _, 'd');
+ assert.equal(func('a', 'c', 'e'), 5, 'accepts more arguments than the number of placeholders');
+ assert.equal(func('a'), 4, 'accepts fewer arguments than the number of placeholders');
+
+ func = _.partial(function() { return typeof arguments[2]; }, _, 'b', _, 'd');
+ assert.equal(func('a'), 'undefined', 'unfilled placeholders are undefined');
+
+ // passes context
+ function MyWidget(name, options) {
+ this.name = name;
+ this.options = options;
+ }
+ MyWidget.prototype.get = function() {
+ return this.name;
+ };
+ var MyWidgetWithCoolOpts = _.partial(MyWidget, _, {a: 1});
+ var widget = new MyWidgetWithCoolOpts('foo');
+ assert.ok(widget instanceof MyWidget, 'Can partially bind a constructor');
+ assert.equal(widget.get(), 'foo', 'keeps prototype');
+ assert.deepEqual(widget.options, {a: 1});
+
+ _.partial.placeholder = obj;
+ func = _.partial(function() { return arguments.length; }, obj, 'b', obj, 'd');
+ assert.equal(func('a'), 4, 'allows the placeholder to be swapped out');
+
+ _.partial.placeholder = {};
+ func = _.partial(function() { return arguments.length; }, obj, 'b', obj, 'd');
+ assert.equal(func('a'), 5, 'swapping the placeholder preserves previously bound arguments');
+
+ _.partial.placeholder = _;
+ });
+
+ QUnit.test('bindAll', function(assert) {
+ var curly = {name: 'curly'};
+ var moe = {
+ name: 'moe',
+ getName: function() { return 'name: ' + this.name; },
+ sayHi: function() { return 'hi: ' + this.name; }
+ };
+ curly.getName = moe.getName;
+ _.bindAll(moe, 'getName', 'sayHi');
+ curly.sayHi = moe.sayHi;
+ assert.equal(curly.getName(), 'name: curly', 'unbound function is bound to current object');
+ assert.equal(curly.sayHi(), 'hi: moe', 'bound function is still bound to original object');
+
+ curly = {name: 'curly'};
+ moe = {
+ name: 'moe',
+ getName: function() { return 'name: ' + this.name; },
+ sayHi: function() { return 'hi: ' + this.name; },
+ sayLast: function() { return this.sayHi(_.last(arguments)); }
+ };
+
+ assert.raises(function() { _.bindAll(moe); }, Error, 'throws an error for bindAll with no functions named');
+ assert.raises(function() { _.bindAll(moe, 'sayBye'); }, TypeError, 'throws an error for bindAll if the given key is undefined');
+ assert.raises(function() { _.bindAll(moe, 'name'); }, TypeError, 'throws an error for bindAll if the given key is not a function');
+
+ _.bindAll(moe, 'sayHi', 'sayLast');
+ curly.sayHi = moe.sayHi;
+ assert.equal(curly.sayHi(), 'hi: moe');
+
+ var sayLast = moe.sayLast;
+ assert.equal(sayLast(1, 2, 3, 4, 5, 6, 7, 'Tom'), 'hi: moe', 'createCallback works with any number of arguments');
+
+ _.bindAll(moe, ['getName']);
+ var getName = moe.getName;
+ assert.equal(getName(), 'name: moe', 'flattens arguments into a single list');
+ });
+
+ QUnit.test('memoize', function(assert) {
+ var fib = function(n) {
+ return n < 2 ? n : fib(n - 1) + fib(n - 2);
+ };
+ assert.equal(fib(10), 55, 'a memoized version of fibonacci produces identical results');
+ fib = _.memoize(fib); // Redefine `fib` for memoization
+ assert.equal(fib(10), 55, 'a memoized version of fibonacci produces identical results');
+
+ var o = function(str) {
+ return str;
+ };
+ var fastO = _.memoize(o);
+ assert.equal(o('toString'), 'toString', 'checks hasOwnProperty');
+ assert.equal(fastO('toString'), 'toString', 'checks hasOwnProperty');
+
+ // Expose the cache.
+ var upper = _.memoize(function(s) {
+ return s.toUpperCase();
+ });
+ assert.equal(upper('foo'), 'FOO');
+ assert.equal(upper('bar'), 'BAR');
+ assert.deepEqual(upper.cache, {foo: 'FOO', bar: 'BAR'});
+ upper.cache = {foo: 'BAR', bar: 'FOO'};
+ assert.equal(upper('foo'), 'BAR');
+ assert.equal(upper('bar'), 'FOO');
+
+ var hashed = _.memoize(function(key) {
+ //https://github.com/jashkenas/underscore/pull/1679#discussion_r13736209
+ assert.ok(/[a-z]+/.test(key), 'hasher doesn\'t change keys');
+ return key;
+ }, function(key) {
+ return key.toUpperCase();
+ });
+ hashed('yep');
+ assert.deepEqual(hashed.cache, {YEP: 'yep'}, 'takes a hasher');
+
+ // Test that the hash function can be used to swizzle the key.
+ var objCacher = _.memoize(function(value, key) {
+ return {key: key, value: value};
+ }, function(value, key) {
+ return key;
+ });
+ var myObj = objCacher('a', 'alpha');
+ var myObjAlias = objCacher('b', 'alpha');
+ assert.notStrictEqual(myObj, void 0, 'object is created if second argument used as key');
+ assert.strictEqual(myObj, myObjAlias, 'object is cached if second argument used as key');
+ assert.strictEqual(myObj.value, 'a', 'object is not modified if second argument used as key');
+ });
+
+ QUnit.test('delay', function(assert) {
+ assert.expect(2);
+ var done = assert.async();
+ var delayed = false;
+ _.delay(function(){ delayed = true; }, 100);
+ setTimeout(function(){ assert.ok(!delayed, "didn't delay the function quite yet"); }, 50);
+ setTimeout(function(){ assert.ok(delayed, 'delayed the function'); done(); }, 150);
+ });
+
+ QUnit.test('defer', function(assert) {
+ assert.expect(1);
+ var done = assert.async();
+ var deferred = false;
+ _.defer(function(bool){ deferred = bool; }, true);
+ _.delay(function(){ assert.ok(deferred, 'deferred the function'); done(); }, 50);
+ });
+
+ QUnit.test('throttle', function(assert) {
+ assert.expect(2);
+ var done = assert.async();
+ var counter = 0;
+ var incr = function(){ counter++; };
+ var throttledIncr = _.throttle(incr, 32);
+ throttledIncr(); throttledIncr();
+
+ assert.equal(counter, 1, 'incr was called immediately');
+ _.delay(function(){ assert.equal(counter, 2, 'incr was throttled'); done(); }, 64);
+ });
+
+ QUnit.test('throttle arguments', function(assert) {
+ assert.expect(2);
+ var done = assert.async();
+ var value = 0;
+ var update = function(val){ value = val; };
+ var throttledUpdate = _.throttle(update, 32);
+ throttledUpdate(1); throttledUpdate(2);
+ _.delay(function(){ throttledUpdate(3); }, 64);
+ assert.equal(value, 1, 'updated to latest value');
+ _.delay(function(){ assert.equal(value, 3, 'updated to latest value'); done(); }, 96);
+ });
+
+ QUnit.test('throttle once', function(assert) {
+ assert.expect(2);
+ var done = assert.async();
+ var counter = 0;
+ var incr = function(){ return ++counter; };
+ var throttledIncr = _.throttle(incr, 32);
+ var result = throttledIncr();
+ _.delay(function(){
+ assert.equal(result, 1, 'throttled functions return their value');
+ assert.equal(counter, 1, 'incr was called once'); done();
+ }, 64);
+ });
+
+ QUnit.test('throttle twice', function(assert) {
+ assert.expect(1);
+ var done = assert.async();
+ var counter = 0;
+ var incr = function(){ counter++; };
+ var throttledIncr = _.throttle(incr, 32);
+ throttledIncr(); throttledIncr();
+ _.delay(function(){ assert.equal(counter, 2, 'incr was called twice'); done(); }, 64);
+ });
+
+ QUnit.test('more throttling', function(assert) {
+ assert.expect(3);
+ var done = assert.async();
+ var counter = 0;
+ var incr = function(){ counter++; };
+ var throttledIncr = _.throttle(incr, 30);
+ throttledIncr(); throttledIncr();
+ assert.equal(counter, 1);
+ _.delay(function(){
+ assert.equal(counter, 2);
+ throttledIncr();
+ assert.equal(counter, 3);
+ done();
+ }, 85);
+ });
+
+ QUnit.test('throttle repeatedly with results', function(assert) {
+ assert.expect(6);
+ var done = assert.async();
+ var counter = 0;
+ var incr = function(){ return ++counter; };
+ var throttledIncr = _.throttle(incr, 100);
+ var results = [];
+ var saveResult = function() { results.push(throttledIncr()); };
+ saveResult(); saveResult();
+ _.delay(saveResult, 50);
+ _.delay(saveResult, 150);
+ _.delay(saveResult, 160);
+ _.delay(saveResult, 230);
+ _.delay(function() {
+ assert.equal(results[0], 1, 'incr was called once');
+ assert.equal(results[1], 1, 'incr was throttled');
+ assert.equal(results[2], 1, 'incr was throttled');
+ assert.equal(results[3], 2, 'incr was called twice');
+ assert.equal(results[4], 2, 'incr was throttled');
+ assert.equal(results[5], 3, 'incr was called trailing');
+ done();
+ }, 300);
+ });
+
+ QUnit.test('throttle triggers trailing call when invoked repeatedly', function(assert) {
+ assert.expect(2);
+ var done = assert.async();
+ var counter = 0;
+ var limit = 48;
+ var incr = function(){ counter++; };
+ var throttledIncr = _.throttle(incr, 32);
+
+ var stamp = new Date;
+ while (new Date - stamp < limit) {
+ throttledIncr();
+ }
+ var lastCount = counter;
+ assert.ok(counter > 1);
+
+ _.delay(function() {
+ assert.ok(counter > lastCount);
+ done();
+ }, 96);
+ });
+
+ QUnit.test('throttle does not trigger leading call when leading is set to false', function(assert) {
+ assert.expect(2);
+ var done = assert.async();
+ var counter = 0;
+ var incr = function(){ counter++; };
+ var throttledIncr = _.throttle(incr, 60, {leading: false});
+
+ throttledIncr(); throttledIncr();
+ assert.equal(counter, 0);
+
+ _.delay(function() {
+ assert.equal(counter, 1);
+ done();
+ }, 96);
+ });
+
+ QUnit.test('more throttle does not trigger leading call when leading is set to false', function(assert) {
+ assert.expect(3);
+ var done = assert.async();
+ var counter = 0;
+ var incr = function(){ counter++; };
+ var throttledIncr = _.throttle(incr, 100, {leading: false});
+
+ throttledIncr();
+ _.delay(throttledIncr, 50);
+ _.delay(throttledIncr, 60);
+ _.delay(throttledIncr, 200);
+ assert.equal(counter, 0);
+
+ _.delay(function() {
+ assert.equal(counter, 1);
+ }, 250);
+
+ _.delay(function() {
+ assert.equal(counter, 2);
+ done();
+ }, 350);
+ });
+
+ QUnit.test('one more throttle with leading: false test', function(assert) {
+ assert.expect(2);
+ var done = assert.async();
+ var counter = 0;
+ var incr = function(){ counter++; };
+ var throttledIncr = _.throttle(incr, 100, {leading: false});
+
+ var time = new Date;
+ while (new Date - time < 350) throttledIncr();
+ assert.ok(counter <= 3);
+
+ _.delay(function() {
+ assert.ok(counter <= 4);
+ done();
+ }, 200);
+ });
+
+ QUnit.test('throttle does not trigger trailing call when trailing is set to false', function(assert) {
+ assert.expect(4);
+ var done = assert.async();
+ var counter = 0;
+ var incr = function(){ counter++; };
+ var throttledIncr = _.throttle(incr, 60, {trailing: false});
+
+ throttledIncr(); throttledIncr(); throttledIncr();
+ assert.equal(counter, 1);
+
+ _.delay(function() {
+ assert.equal(counter, 1);
+
+ throttledIncr(); throttledIncr();
+ assert.equal(counter, 2);
+
+ _.delay(function() {
+ assert.equal(counter, 2);
+ done();
+ }, 96);
+ }, 96);
+ });
+
+ QUnit.test('throttle continues to function after system time is set backwards', function(assert) {
+ assert.expect(2);
+ var done = assert.async();
+ var counter = 0;
+ var incr = function(){ counter++; };
+ var throttledIncr = _.throttle(incr, 100);
+ var origNowFunc = _.now;
+
+ throttledIncr();
+ assert.equal(counter, 1);
+ _.now = function() {
+ return new Date(2013, 0, 1, 1, 1, 1);
+ };
+
+ _.delay(function() {
+ throttledIncr();
+ assert.equal(counter, 2);
+ done();
+ _.now = origNowFunc;
+ }, 200);
+ });
+
+ QUnit.test('throttle re-entrant', function(assert) {
+ assert.expect(2);
+ var done = assert.async();
+ var sequence = [
+ ['b1', 'b2'],
+ ['c1', 'c2']
+ ];
+ var value = '';
+ var throttledAppend;
+ var append = function(arg){
+ value += this + arg;
+ var args = sequence.pop();
+ if (args) {
+ throttledAppend.call(args[0], args[1]);
+ }
+ };
+ throttledAppend = _.throttle(append, 32);
+ throttledAppend.call('a1', 'a2');
+ assert.equal(value, 'a1a2');
+ _.delay(function(){
+ assert.equal(value, 'a1a2c1c2b1b2', 'append was throttled successfully');
+ done();
+ }, 100);
+ });
+
+ QUnit.test('throttle cancel', function(assert) {
+ var done = assert.async();
+ var counter = 0;
+ var incr = function(){ counter++; };
+ var throttledIncr = _.throttle(incr, 32);
+ throttledIncr();
+ throttledIncr.cancel();
+ throttledIncr();
+ throttledIncr();
+
+ assert.equal(counter, 2, 'incr was called immediately');
+ _.delay(function(){ assert.equal(counter, 3, 'incr was throttled'); done(); }, 64);
+ });
+
+ QUnit.test('throttle cancel with leading: false', function(assert) {
+ var done = assert.async();
+ var counter = 0;
+ var incr = function(){ counter++; };
+ var throttledIncr = _.throttle(incr, 32, {leading: false});
+ throttledIncr();
+ throttledIncr.cancel();
+
+ assert.equal(counter, 0, 'incr was throttled');
+ _.delay(function(){ assert.equal(counter, 0, 'incr was throttled'); done(); }, 64);
+ });
+
+ QUnit.test('debounce', function(assert) {
+ assert.expect(1);
+ var done = assert.async();
+ var counter = 0;
+ var incr = function(){ counter++; };
+ var debouncedIncr = _.debounce(incr, 32);
+ debouncedIncr(); debouncedIncr();
+ _.delay(debouncedIncr, 16);
+ _.delay(function(){ assert.equal(counter, 1, 'incr was debounced'); done(); }, 96);
+ });
+
+ QUnit.test('debounce cancel', function(assert) {
+ assert.expect(1);
+ var done = assert.async();
+ var counter = 0;
+ var incr = function(){ counter++; };
+ var debouncedIncr = _.debounce(incr, 32);
+ debouncedIncr();
+ debouncedIncr.cancel();
+ _.delay(function(){ assert.equal(counter, 0, 'incr was not called'); done(); }, 96);
+ });
+
+ QUnit.test('debounce asap', function(assert) {
+ assert.expect(6);
+ var done = assert.async();
+ var a, b, c;
+ var counter = 0;
+ var incr = function(){ return ++counter; };
+ var debouncedIncr = _.debounce(incr, 64, true);
+ a = debouncedIncr();
+ b = debouncedIncr();
+ assert.equal(a, 1);
+ assert.equal(b, 1);
+ assert.equal(counter, 1, 'incr was called immediately');
+ _.delay(debouncedIncr, 16);
+ _.delay(debouncedIncr, 32);
+ _.delay(debouncedIncr, 48);
+ _.delay(function(){
+ assert.equal(counter, 1, 'incr was debounced');
+ c = debouncedIncr();
+ assert.equal(c, 2);
+ assert.equal(counter, 2, 'incr was called again');
+ done();
+ }, 128);
+ });
+
+ QUnit.test('debounce asap cancel', function(assert) {
+ assert.expect(4);
+ var done = assert.async();
+ var a, b;
+ var counter = 0;
+ var incr = function(){ return ++counter; };
+ var debouncedIncr = _.debounce(incr, 64, true);
+ a = debouncedIncr();
+ debouncedIncr.cancel();
+ b = debouncedIncr();
+ assert.equal(a, 1);
+ assert.equal(b, 2);
+ assert.equal(counter, 2, 'incr was called immediately');
+ _.delay(debouncedIncr, 16);
+ _.delay(debouncedIncr, 32);
+ _.delay(debouncedIncr, 48);
+ _.delay(function(){ assert.equal(counter, 2, 'incr was debounced'); done(); }, 128);
+ });
+
+ QUnit.test('debounce asap recursively', function(assert) {
+ assert.expect(2);
+ var done = assert.async();
+ var counter = 0;
+ var debouncedIncr = _.debounce(function(){
+ counter++;
+ if (counter < 10) debouncedIncr();
+ }, 32, true);
+ debouncedIncr();
+ assert.equal(counter, 1, 'incr was called immediately');
+ _.delay(function(){ assert.equal(counter, 1, 'incr was debounced'); done(); }, 96);
+ });
+
+ QUnit.test('debounce after system time is set backwards', function(assert) {
+ assert.expect(2);
+ var done = assert.async();
+ var counter = 0;
+ var origNowFunc = _.now;
+ var debouncedIncr = _.debounce(function(){
+ counter++;
+ }, 100, true);
+
+ debouncedIncr();
+ assert.equal(counter, 1, 'incr was called immediately');
+
+ _.now = function() {
+ return new Date(2013, 0, 1, 1, 1, 1);
+ };
+
+ _.delay(function() {
+ debouncedIncr();
+ assert.equal(counter, 2, 'incr was debounced successfully');
+ done();
+ _.now = origNowFunc;
+ }, 200);
+ });
+
+ QUnit.test('debounce re-entrant', function(assert) {
+ assert.expect(2);
+ var done = assert.async();
+ var sequence = [
+ ['b1', 'b2']
+ ];
+ var value = '';
+ var debouncedAppend;
+ var append = function(arg){
+ value += this + arg;
+ var args = sequence.pop();
+ if (args) {
+ debouncedAppend.call(args[0], args[1]);
+ }
+ };
+ debouncedAppend = _.debounce(append, 32);
+ debouncedAppend.call('a1', 'a2');
+ assert.equal(value, '');
+ _.delay(function(){
+ assert.equal(value, 'a1a2b1b2', 'append was debounced successfully');
+ done();
+ }, 100);
+ });
+
+ QUnit.test('once', function(assert) {
+ var num = 0;
+ var increment = _.once(function(){ return ++num; });
+ increment();
+ increment();
+ assert.equal(num, 1);
+
+ assert.equal(increment(), 1, 'stores a memo to the last value');
+ });
+
+ QUnit.test('Recursive onced function.', function(assert) {
+ assert.expect(1);
+ var f = _.once(function(){
+ assert.ok(true);
+ f();
+ });
+ f();
+ });
+
+ QUnit.test('wrap', function(assert) {
+ var greet = function(name){ return 'hi: ' + name; };
+ var backwards = _.wrap(greet, function(func, name){ return func(name) + ' ' + name.split('').reverse().join(''); });
+ assert.equal(backwards('moe'), 'hi: moe eom', 'wrapped the salutation function');
+
+ var inner = function(){ return 'Hello '; };
+ var obj = {name: 'Moe'};
+ obj.hi = _.wrap(inner, function(fn){ return fn() + this.name; });
+ assert.equal(obj.hi(), 'Hello Moe');
+
+ var noop = function(){};
+ var wrapped = _.wrap(noop, function(){ return Array.prototype.slice.call(arguments, 0); });
+ var ret = wrapped(['whats', 'your'], 'vector', 'victor');
+ assert.deepEqual(ret, [noop, ['whats', 'your'], 'vector', 'victor']);
+ });
+
+ QUnit.test('negate', function(assert) {
+ var isOdd = function(n){ return n & 1; };
+ assert.equal(_.negate(isOdd)(2), true, 'should return the complement of the given function');
+ assert.equal(_.negate(isOdd)(3), false, 'should return the complement of the given function');
+ });
+
+ QUnit.test('compose', function(assert) {
+ var greet = function(name){ return 'hi: ' + name; };
+ var exclaim = function(sentence){ return sentence + '!'; };
+ var composed = _.compose(exclaim, greet);
+ assert.equal(composed('moe'), 'hi: moe!', 'can compose a function that takes another');
+
+ composed = _.compose(greet, exclaim);
+ assert.equal(composed('moe'), 'hi: moe!', 'in this case, the functions are also commutative');
+
+ // f(g(h(x, y, z)))
+ function h(x, y, z) {
+ assert.equal(arguments.length, 3, 'First function called with multiple args');
+ return z * y;
+ }
+ function g(x) {
+ assert.equal(arguments.length, 1, 'Composed function is called with 1 argument');
+ return x;
+ }
+ function f(x) {
+ assert.equal(arguments.length, 1, 'Composed function is called with 1 argument');
+ return x * 2;
+ }
+ composed = _.compose(f, g, h);
+ assert.equal(composed(1, 2, 3), 12);
+ });
+
+ QUnit.test('after', function(assert) {
+ var testAfter = function(afterAmount, timesCalled) {
+ var afterCalled = 0;
+ var after = _.after(afterAmount, function() {
+ afterCalled++;
+ });
+ while (timesCalled--) after();
+ return afterCalled;
+ };
+
+ assert.equal(testAfter(5, 5), 1, 'after(N) should fire after being called N times');
+ assert.equal(testAfter(5, 4), 0, 'after(N) should not fire unless called N times');
+ assert.equal(testAfter(0, 0), 0, 'after(0) should not fire immediately');
+ assert.equal(testAfter(0, 1), 1, 'after(0) should fire when first invoked');
+ });
+
+ QUnit.test('before', function(assert) {
+ var testBefore = function(beforeAmount, timesCalled) {
+ var beforeCalled = 0;
+ var before = _.before(beforeAmount, function() { beforeCalled++; });
+ while (timesCalled--) before();
+ return beforeCalled;
+ };
+
+ assert.equal(testBefore(5, 5), 4, 'before(N) should not fire after being called N times');
+ assert.equal(testBefore(5, 4), 4, 'before(N) should fire before being called N times');
+ assert.equal(testBefore(0, 0), 0, 'before(0) should not fire immediately');
+ assert.equal(testBefore(0, 1), 0, 'before(0) should not fire when first invoked');
+
+ var context = {num: 0};
+ var increment = _.before(3, function(){ return ++this.num; });
+ _.times(10, increment, context);
+ assert.equal(increment(), 2, 'stores a memo to the last value');
+ assert.equal(context.num, 2, 'provides context');
+ });
+
+ QUnit.test('iteratee', function(assert) {
+ var identity = _.iteratee();
+ assert.equal(identity, _.identity, '_.iteratee is exposed as an external function.');
+
+ function fn() {
+ return arguments;
+ }
+ _.each([_.iteratee(fn), _.iteratee(fn, {})], function(cb) {
+ assert.equal(cb().length, 0);
+ assert.deepEqual(_.toArray(cb(1, 2, 3)), _.range(1, 4));
+ assert.deepEqual(_.toArray(cb(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)), _.range(1, 11));
+ });
+
+ });
+
+ QUnit.test('restArgs', function(assert) {
+ assert.expect(10);
+ _.restArgs(function(a, args) {
+ assert.strictEqual(a, 1);
+ assert.deepEqual(args, [2, 3], 'collects rest arguments into an array');
+ })(1, 2, 3);
+
+ _.restArgs(function(a, args) {
+ assert.strictEqual(a, void 0);
+ assert.deepEqual(args, [], 'passes empty array if there are not enough arguments');
+ })();
+
+ _.restArgs(function(a, b, c, args) {
+ assert.strictEqual(arguments.length, 4);
+ assert.deepEqual(args, [4, 5], 'works on functions with many named parameters');
+ })(1, 2, 3, 4, 5);
+
+ var obj = {};
+ _.restArgs(function() {
+ assert.strictEqual(this, obj, 'invokes function with this context');
+ }).call(obj);
+
+ _.restArgs(function(array, iteratee, context) {
+ assert.deepEqual(array, [1, 2, 3, 4], 'startIndex can be used manually specify index of rest parameter');
+ assert.strictEqual(iteratee, void 0);
+ assert.strictEqual(context, void 0);
+ }, 0)(1, 2, 3, 4);
+ });
+
+}());
diff --git a/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/underscore/test/objects.js b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/underscore/test/objects.js
new file mode 100644
index 0000000..fa1d9e3
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/underscore/test/objects.js
@@ -0,0 +1,1102 @@
+(function() {
+ var _ = typeof require == 'function' ? require('..') : window._;
+
+ QUnit.module('Objects');
+
+ var testElement = typeof document === 'object' ? document.createElement('div') : void 0;
+
+ QUnit.test('keys', function(assert) {
+ assert.deepEqual(_.keys({one: 1, two: 2}), ['one', 'two'], 'can extract the keys from an object');
+ // the test above is not safe because it relies on for-in enumeration order
+ var a = []; a[1] = 0;
+ assert.deepEqual(_.keys(a), ['1'], 'is not fooled by sparse arrays; see issue #95');
+ assert.deepEqual(_.keys(null), []);
+ assert.deepEqual(_.keys(void 0), []);
+ assert.deepEqual(_.keys(1), []);
+ assert.deepEqual(_.keys('a'), []);
+ assert.deepEqual(_.keys(true), []);
+
+ // keys that may be missed if the implementation isn't careful
+ var trouble = {
+ constructor: Object,
+ valueOf: _.noop,
+ hasOwnProperty: null,
+ toString: 5,
+ toLocaleString: void 0,
+ propertyIsEnumerable: /a/,
+ isPrototypeOf: this,
+ __defineGetter__: Boolean,
+ __defineSetter__: {},
+ __lookupSetter__: false,
+ __lookupGetter__: []
+ };
+ var troubleKeys = ['constructor', 'valueOf', 'hasOwnProperty', 'toString', 'toLocaleString', 'propertyIsEnumerable',
+ 'isPrototypeOf', '__defineGetter__', '__defineSetter__', '__lookupSetter__', '__lookupGetter__'].sort();
+ assert.deepEqual(_.keys(trouble).sort(), troubleKeys, 'matches non-enumerable properties');
+ });
+
+ QUnit.test('allKeys', function(assert) {
+ assert.deepEqual(_.allKeys({one: 1, two: 2}), ['one', 'two'], 'can extract the allKeys from an object');
+ // the test above is not safe because it relies on for-in enumeration order
+ var a = []; a[1] = 0;
+ assert.deepEqual(_.allKeys(a), ['1'], 'is not fooled by sparse arrays; see issue #95');
+
+ a.a = a;
+ assert.deepEqual(_.allKeys(a), ['1', 'a'], 'is not fooled by sparse arrays with additional properties');
+
+ _.each([null, void 0, 1, 'a', true, NaN, {}, [], new Number(5), new Date(0)], function(val) {
+ assert.deepEqual(_.allKeys(val), []);
+ });
+
+ // allKeys that may be missed if the implementation isn't careful
+ var trouble = {
+ constructor: Object,
+ valueOf: _.noop,
+ hasOwnProperty: null,
+ toString: 5,
+ toLocaleString: void 0,
+ propertyIsEnumerable: /a/,
+ isPrototypeOf: this
+ };
+ var troubleKeys = ['constructor', 'valueOf', 'hasOwnProperty', 'toString', 'toLocaleString', 'propertyIsEnumerable',
+ 'isPrototypeOf'].sort();
+ assert.deepEqual(_.allKeys(trouble).sort(), troubleKeys, 'matches non-enumerable properties');
+
+ function A() {}
+ A.prototype.foo = 'foo';
+ var b = new A();
+ b.bar = 'bar';
+ assert.deepEqual(_.allKeys(b).sort(), ['bar', 'foo'], 'should include inherited keys');
+
+ function y() {}
+ y.x = 'z';
+ assert.deepEqual(_.allKeys(y), ['x'], 'should get keys from constructor');
+ });
+
+ QUnit.test('values', function(assert) {
+ assert.deepEqual(_.values({one: 1, two: 2}), [1, 2], 'can extract the values from an object');
+ assert.deepEqual(_.values({one: 1, two: 2, length: 3}), [1, 2, 3], '... even when one of them is "length"');
+ });
+
+ QUnit.test('pairs', function(assert) {
+ assert.deepEqual(_.pairs({one: 1, two: 2}), [['one', 1], ['two', 2]], 'can convert an object into pairs');
+ assert.deepEqual(_.pairs({one: 1, two: 2, length: 3}), [['one', 1], ['two', 2], ['length', 3]], '... even when one of them is "length"');
+ });
+
+ QUnit.test('invert', function(assert) {
+ var obj = {first: 'Moe', second: 'Larry', third: 'Curly'};
+ assert.deepEqual(_.keys(_.invert(obj)), ['Moe', 'Larry', 'Curly'], 'can invert an object');
+ assert.deepEqual(_.invert(_.invert(obj)), obj, 'two inverts gets you back where you started');
+
+ obj = {length: 3};
+ assert.equal(_.invert(obj)['3'], 'length', 'can invert an object with "length"');
+ });
+
+ QUnit.test('functions', function(assert) {
+ var obj = {a: 'dash', b: _.map, c: /yo/, d: _.reduce};
+ assert.deepEqual(['b', 'd'], _.functions(obj), 'can grab the function names of any passed-in object');
+
+ var Animal = function(){};
+ Animal.prototype.run = function(){};
+ assert.deepEqual(_.functions(new Animal), ['run'], 'also looks up functions on the prototype');
+ });
+
+ QUnit.test('methods', function(assert) {
+ assert.strictEqual(_.methods, _.functions, 'is an alias for functions');
+ });
+
+ QUnit.test('extend', function(assert) {
+ var result;
+ assert.equal(_.extend({}, {a: 'b'}).a, 'b', 'can extend an object with the attributes of another');
+ assert.equal(_.extend({a: 'x'}, {a: 'b'}).a, 'b', 'properties in source override destination');
+ assert.equal(_.extend({x: 'x'}, {a: 'b'}).x, 'x', "properties not in source don't get overriden");
+ result = _.extend({x: 'x'}, {a: 'a'}, {b: 'b'});
+ assert.deepEqual(result, {x: 'x', a: 'a', b: 'b'}, 'can extend from multiple source objects');
+ result = _.extend({x: 'x'}, {a: 'a', x: 2}, {a: 'b'});
+ assert.deepEqual(result, {x: 2, a: 'b'}, 'extending from multiple source objects last property trumps');
+ result = _.extend({}, {a: void 0, b: null});
+ assert.deepEqual(_.keys(result), ['a', 'b'], 'extend copies undefined values');
+
+ var F = function() {};
+ F.prototype = {a: 'b'};
+ var subObj = new F();
+ subObj.c = 'd';
+ assert.deepEqual(_.extend({}, subObj), {a: 'b', c: 'd'}, 'extend copies all properties from source');
+ _.extend(subObj, {});
+ assert.ok(!subObj.hasOwnProperty('a'), "extend does not convert destination object's 'in' properties to 'own' properties");
+
+ try {
+ result = {};
+ _.extend(result, null, void 0, {a: 1});
+ } catch (e) { /* ignored */ }
+
+ assert.equal(result.a, 1, 'should not error on `null` or `undefined` sources');
+
+ assert.strictEqual(_.extend(null, {a: 1}), null, 'extending null results in null');
+ assert.strictEqual(_.extend(void 0, {a: 1}), void 0, 'extending undefined results in undefined');
+ });
+
+ QUnit.test('extendOwn', function(assert) {
+ var result;
+ assert.equal(_.extendOwn({}, {a: 'b'}).a, 'b', 'can extend an object with the attributes of another');
+ assert.equal(_.extendOwn({a: 'x'}, {a: 'b'}).a, 'b', 'properties in source override destination');
+ assert.equal(_.extendOwn({x: 'x'}, {a: 'b'}).x, 'x', "properties not in source don't get overriden");
+ result = _.extendOwn({x: 'x'}, {a: 'a'}, {b: 'b'});
+ assert.deepEqual(result, {x: 'x', a: 'a', b: 'b'}, 'can extend from multiple source objects');
+ result = _.extendOwn({x: 'x'}, {a: 'a', x: 2}, {a: 'b'});
+ assert.deepEqual(result, {x: 2, a: 'b'}, 'extending from multiple source objects last property trumps');
+ assert.deepEqual(_.extendOwn({}, {a: void 0, b: null}), {a: void 0, b: null}, 'copies undefined values');
+
+ var F = function() {};
+ F.prototype = {a: 'b'};
+ var subObj = new F();
+ subObj.c = 'd';
+ assert.deepEqual(_.extendOwn({}, subObj), {c: 'd'}, 'copies own properties from source');
+
+ result = {};
+ assert.deepEqual(_.extendOwn(result, null, void 0, {a: 1}), {a: 1}, 'should not error on `null` or `undefined` sources');
+
+ _.each(['a', 5, null, false], function(val) {
+ assert.strictEqual(_.extendOwn(val, {a: 1}), val, 'extending non-objects results in returning the non-object value');
+ });
+
+ assert.strictEqual(_.extendOwn(void 0, {a: 1}), void 0, 'extending undefined results in undefined');
+
+ result = _.extendOwn({a: 1, 0: 2, 1: '5', length: 6}, {0: 1, 1: 2, length: 2});
+ assert.deepEqual(result, {a: 1, 0: 1, 1: 2, length: 2}, 'should treat array-like objects like normal objects');
+ });
+
+ QUnit.test('assign', function(assert) {
+ assert.strictEqual(_.assign, _.extendOwn, 'is an alias for extendOwn');
+ });
+
+ QUnit.test('pick', function(assert) {
+ var result;
+ result = _.pick({a: 1, b: 2, c: 3}, 'a', 'c');
+ assert.deepEqual(result, {a: 1, c: 3}, 'can restrict properties to those named');
+ result = _.pick({a: 1, b: 2, c: 3}, ['b', 'c']);
+ assert.deepEqual(result, {b: 2, c: 3}, 'can restrict properties to those named in an array');
+ result = _.pick({a: 1, b: 2, c: 3}, ['a'], 'b');
+ assert.deepEqual(result, {a: 1, b: 2}, 'can restrict properties to those named in mixed args');
+ result = _.pick(['a', 'b'], 1);
+ assert.deepEqual(result, {1: 'b'}, 'can pick numeric properties');
+
+ _.each([null, void 0], function(val) {
+ assert.deepEqual(_.pick(val, 'hasOwnProperty'), {}, 'Called with null/undefined');
+ assert.deepEqual(_.pick(val, _.constant(true)), {});
+ });
+ assert.deepEqual(_.pick(5, 'toString', 'b'), {toString: Number.prototype.toString}, 'can iterate primitives');
+
+ var data = {a: 1, b: 2, c: 3};
+ var callback = function(value, key, object) {
+ assert.strictEqual(key, {1: 'a', 2: 'b', 3: 'c'}[value]);
+ assert.strictEqual(object, data);
+ return value !== this.value;
+ };
+ result = _.pick(data, callback, {value: 2});
+ assert.deepEqual(result, {a: 1, c: 3}, 'can accept a predicate and context');
+
+ var Obj = function(){};
+ Obj.prototype = {a: 1, b: 2, c: 3};
+ var instance = new Obj();
+ assert.deepEqual(_.pick(instance, 'a', 'c'), {a: 1, c: 3}, 'include prototype props');
+
+ assert.deepEqual(_.pick(data, function(val, key) {
+ return this[key] === 3 && this === instance;
+ }, instance), {c: 3}, 'function is given context');
+
+ assert.ok(!_.has(_.pick({}, 'foo'), 'foo'), 'does not set own property if property not in object');
+ _.pick(data, function(value, key, obj) {
+ assert.equal(obj, data, 'passes same object as third parameter of iteratee');
+ });
+ });
+
+ QUnit.test('omit', function(assert) {
+ var result;
+ result = _.omit({a: 1, b: 2, c: 3}, 'b');
+ assert.deepEqual(result, {a: 1, c: 3}, 'can omit a single named property');
+ result = _.omit({a: 1, b: 2, c: 3}, 'a', 'c');
+ assert.deepEqual(result, {b: 2}, 'can omit several named properties');
+ result = _.omit({a: 1, b: 2, c: 3}, ['b', 'c']);
+ assert.deepEqual(result, {a: 1}, 'can omit properties named in an array');
+ result = _.omit(['a', 'b'], 0);
+ assert.deepEqual(result, {1: 'b'}, 'can omit numeric properties');
+
+ assert.deepEqual(_.omit(null, 'a', 'b'), {}, 'non objects return empty object');
+ assert.deepEqual(_.omit(void 0, 'toString'), {}, 'null/undefined return empty object');
+ assert.deepEqual(_.omit(5, 'toString', 'b'), {}, 'returns empty object for primitives');
+
+ var data = {a: 1, b: 2, c: 3};
+ var callback = function(value, key, object) {
+ assert.strictEqual(key, {1: 'a', 2: 'b', 3: 'c'}[value]);
+ assert.strictEqual(object, data);
+ return value !== this.value;
+ };
+ result = _.omit(data, callback, {value: 2});
+ assert.deepEqual(result, {b: 2}, 'can accept a predicate');
+
+ var Obj = function(){};
+ Obj.prototype = {a: 1, b: 2, c: 3};
+ var instance = new Obj();
+ assert.deepEqual(_.omit(instance, 'b'), {a: 1, c: 3}, 'include prototype props');
+
+ assert.deepEqual(_.omit(data, function(val, key) {
+ return this[key] === 3 && this === instance;
+ }, instance), {a: 1, b: 2}, 'function is given context');
+ });
+
+ QUnit.test('defaults', function(assert) {
+ var options = {zero: 0, one: 1, empty: '', nan: NaN, nothing: null};
+
+ _.defaults(options, {zero: 1, one: 10, twenty: 20, nothing: 'str'});
+ assert.equal(options.zero, 0, 'value exists');
+ assert.equal(options.one, 1, 'value exists');
+ assert.equal(options.twenty, 20, 'default applied');
+ assert.equal(options.nothing, null, "null isn't overridden");
+
+ _.defaults(options, {empty: 'full'}, {nan: 'nan'}, {word: 'word'}, {word: 'dog'});
+ assert.equal(options.empty, '', 'value exists');
+ assert.ok(_.isNaN(options.nan), "NaN isn't overridden");
+ assert.equal(options.word, 'word', 'new value is added, first one wins');
+
+ try {
+ options = {};
+ _.defaults(options, null, void 0, {a: 1});
+ } catch (e) { /* ignored */ }
+
+ assert.equal(options.a, 1, 'should not error on `null` or `undefined` sources');
+
+ assert.deepEqual(_.defaults(null, {a: 1}), {a: 1}, 'defaults skips nulls');
+ assert.deepEqual(_.defaults(void 0, {a: 1}), {a: 1}, 'defaults skips undefined');
+ });
+
+ QUnit.test('clone', function(assert) {
+ var moe = {name: 'moe', lucky: [13, 27, 34]};
+ var clone = _.clone(moe);
+ assert.equal(clone.name, 'moe', 'the clone as the attributes of the original');
+
+ clone.name = 'curly';
+ assert.ok(clone.name === 'curly' && moe.name === 'moe', 'clones can change shallow attributes without affecting the original');
+
+ clone.lucky.push(101);
+ assert.equal(_.last(moe.lucky), 101, 'changes to deep attributes are shared with the original');
+
+ assert.equal(_.clone(void 0), void 0, 'non objects should not be changed by clone');
+ assert.equal(_.clone(1), 1, 'non objects should not be changed by clone');
+ assert.equal(_.clone(null), null, 'non objects should not be changed by clone');
+ });
+
+ QUnit.test('create', function(assert) {
+ var Parent = function() {};
+ Parent.prototype = {foo: function() {}, bar: 2};
+
+ _.each(['foo', null, void 0, 1], function(val) {
+ assert.deepEqual(_.create(val), {}, 'should return empty object when a non-object is provided');
+ });
+
+ assert.ok(_.create([]) instanceof Array, 'should return new instance of array when array is provided');
+
+ var Child = function() {};
+ Child.prototype = _.create(Parent.prototype);
+ assert.ok(new Child instanceof Parent, 'object should inherit prototype');
+
+ var func = function() {};
+ Child.prototype = _.create(Parent.prototype, {func: func});
+ assert.strictEqual(Child.prototype.func, func, 'properties should be added to object');
+
+ Child.prototype = _.create(Parent.prototype, {constructor: Child});
+ assert.strictEqual(Child.prototype.constructor, Child);
+
+ Child.prototype.foo = 'foo';
+ var created = _.create(Child.prototype, new Child);
+ assert.ok(!created.hasOwnProperty('foo'), 'should only add own properties');
+ });
+
+ QUnit.test('isEqual', function(assert) {
+ function First() {
+ this.value = 1;
+ }
+ First.prototype.value = 1;
+ function Second() {
+ this.value = 1;
+ }
+ Second.prototype.value = 2;
+
+ // Basic equality and identity comparisons.
+ assert.ok(_.isEqual(null, null), '`null` is equal to `null`');
+ assert.ok(_.isEqual(), '`undefined` is equal to `undefined`');
+
+ assert.ok(!_.isEqual(0, -0), '`0` is not equal to `-0`');
+ assert.ok(!_.isEqual(-0, 0), 'Commutative equality is implemented for `0` and `-0`');
+ assert.ok(!_.isEqual(null, void 0), '`null` is not equal to `undefined`');
+ assert.ok(!_.isEqual(void 0, null), 'Commutative equality is implemented for `null` and `undefined`');
+
+ // String object and primitive comparisons.
+ assert.ok(_.isEqual('Curly', 'Curly'), 'Identical string primitives are equal');
+ assert.ok(_.isEqual(new String('Curly'), new String('Curly')), 'String objects with identical primitive values are equal');
+ assert.ok(_.isEqual(new String('Curly'), 'Curly'), 'String primitives and their corresponding object wrappers are equal');
+ assert.ok(_.isEqual('Curly', new String('Curly')), 'Commutative equality is implemented for string objects and primitives');
+
+ assert.ok(!_.isEqual('Curly', 'Larry'), 'String primitives with different values are not equal');
+ assert.ok(!_.isEqual(new String('Curly'), new String('Larry')), 'String objects with different primitive values are not equal');
+ assert.ok(!_.isEqual(new String('Curly'), {toString: function(){ return 'Curly'; }}), 'String objects and objects with a custom `toString` method are not equal');
+
+ // Number object and primitive comparisons.
+ assert.ok(_.isEqual(75, 75), 'Identical number primitives are equal');
+ assert.ok(_.isEqual(new Number(75), new Number(75)), 'Number objects with identical primitive values are equal');
+ assert.ok(_.isEqual(75, new Number(75)), 'Number primitives and their corresponding object wrappers are equal');
+ assert.ok(_.isEqual(new Number(75), 75), 'Commutative equality is implemented for number objects and primitives');
+ assert.ok(!_.isEqual(new Number(0), -0), '`new Number(0)` and `-0` are not equal');
+ assert.ok(!_.isEqual(0, new Number(-0)), 'Commutative equality is implemented for `new Number(0)` and `-0`');
+
+ assert.ok(!_.isEqual(new Number(75), new Number(63)), 'Number objects with different primitive values are not equal');
+ assert.ok(!_.isEqual(new Number(63), {valueOf: function(){ return 63; }}), 'Number objects and objects with a `valueOf` method are not equal');
+
+ // Comparisons involving `NaN`.
+ assert.ok(_.isEqual(NaN, NaN), '`NaN` is equal to `NaN`');
+ assert.ok(_.isEqual(new Number(NaN), NaN), 'Object(`NaN`) is equal to `NaN`');
+ assert.ok(!_.isEqual(61, NaN), 'A number primitive is not equal to `NaN`');
+ assert.ok(!_.isEqual(new Number(79), NaN), 'A number object is not equal to `NaN`');
+ assert.ok(!_.isEqual(Infinity, NaN), '`Infinity` is not equal to `NaN`');
+
+ // Boolean object and primitive comparisons.
+ assert.ok(_.isEqual(true, true), 'Identical boolean primitives are equal');
+ assert.ok(_.isEqual(new Boolean, new Boolean), 'Boolean objects with identical primitive values are equal');
+ assert.ok(_.isEqual(true, new Boolean(true)), 'Boolean primitives and their corresponding object wrappers are equal');
+ assert.ok(_.isEqual(new Boolean(true), true), 'Commutative equality is implemented for booleans');
+ assert.ok(!_.isEqual(new Boolean(true), new Boolean), 'Boolean objects with different primitive values are not equal');
+
+ // Common type coercions.
+ assert.ok(!_.isEqual(new Boolean(false), true), '`new Boolean(false)` is not equal to `true`');
+ assert.ok(!_.isEqual('75', 75), 'String and number primitives with like values are not equal');
+ assert.ok(!_.isEqual(new Number(63), new String(63)), 'String and number objects with like values are not equal');
+ assert.ok(!_.isEqual(75, '75'), 'Commutative equality is implemented for like string and number values');
+ assert.ok(!_.isEqual(0, ''), 'Number and string primitives with like values are not equal');
+ assert.ok(!_.isEqual(1, true), 'Number and boolean primitives with like values are not equal');
+ assert.ok(!_.isEqual(new Boolean(false), new Number(0)), 'Boolean and number objects with like values are not equal');
+ assert.ok(!_.isEqual(false, new String('')), 'Boolean primitives and string objects with like values are not equal');
+ assert.ok(!_.isEqual(12564504e5, new Date(2009, 9, 25)), 'Dates and their corresponding numeric primitive values are not equal');
+
+ // Dates.
+ assert.ok(_.isEqual(new Date(2009, 9, 25), new Date(2009, 9, 25)), 'Date objects referencing identical times are equal');
+ assert.ok(!_.isEqual(new Date(2009, 9, 25), new Date(2009, 11, 13)), 'Date objects referencing different times are not equal');
+ assert.ok(!_.isEqual(new Date(2009, 11, 13), {
+ getTime: function(){
+ return 12606876e5;
+ }
+ }), 'Date objects and objects with a `getTime` method are not equal');
+ assert.ok(!_.isEqual(new Date('Curly'), new Date('Curly')), 'Invalid dates are not equal');
+
+ // Functions.
+ assert.ok(!_.isEqual(First, Second), 'Different functions with identical bodies and source code representations are not equal');
+
+ // RegExps.
+ assert.ok(_.isEqual(/(?:)/gim, /(?:)/gim), 'RegExps with equivalent patterns and flags are equal');
+ assert.ok(_.isEqual(/(?:)/gi, /(?:)/ig), 'Flag order is not significant');
+ assert.ok(!_.isEqual(/(?:)/g, /(?:)/gi), 'RegExps with equivalent patterns and different flags are not equal');
+ assert.ok(!_.isEqual(/Moe/gim, /Curly/gim), 'RegExps with different patterns and equivalent flags are not equal');
+ assert.ok(!_.isEqual(/(?:)/gi, /(?:)/g), 'Commutative equality is implemented for RegExps');
+ assert.ok(!_.isEqual(/Curly/g, {source: 'Larry', global: true, ignoreCase: false, multiline: false}), 'RegExps and RegExp-like objects are not equal');
+
+ // Empty arrays, array-like objects, and object literals.
+ assert.ok(_.isEqual({}, {}), 'Empty object literals are equal');
+ assert.ok(_.isEqual([], []), 'Empty array literals are equal');
+ assert.ok(_.isEqual([{}], [{}]), 'Empty nested arrays and objects are equal');
+ assert.ok(!_.isEqual({length: 0}, []), 'Array-like objects and arrays are not equal.');
+ assert.ok(!_.isEqual([], {length: 0}), 'Commutative equality is implemented for array-like objects');
+
+ assert.ok(!_.isEqual({}, []), 'Object literals and array literals are not equal');
+ assert.ok(!_.isEqual([], {}), 'Commutative equality is implemented for objects and arrays');
+
+ // Arrays with primitive and object values.
+ assert.ok(_.isEqual([1, 'Larry', true], [1, 'Larry', true]), 'Arrays containing identical primitives are equal');
+ assert.ok(_.isEqual([/Moe/g, new Date(2009, 9, 25)], [/Moe/g, new Date(2009, 9, 25)]), 'Arrays containing equivalent elements are equal');
+
+ // Multi-dimensional arrays.
+ var a = [new Number(47), false, 'Larry', /Moe/, new Date(2009, 11, 13), ['running', 'biking', new String('programming')], {a: 47}];
+ var b = [new Number(47), false, 'Larry', /Moe/, new Date(2009, 11, 13), ['running', 'biking', new String('programming')], {a: 47}];
+ assert.ok(_.isEqual(a, b), 'Arrays containing nested arrays and objects are recursively compared');
+
+ // Overwrite the methods defined in ES 5.1 section 15.4.4.
+ a.forEach = a.map = a.filter = a.every = a.indexOf = a.lastIndexOf = a.some = a.reduce = a.reduceRight = null;
+ b.join = b.pop = b.reverse = b.shift = b.slice = b.splice = b.concat = b.sort = b.unshift = null;
+
+ // Array elements and properties.
+ assert.ok(_.isEqual(a, b), 'Arrays containing equivalent elements and different non-numeric properties are equal');
+ a.push('White Rocks');
+ assert.ok(!_.isEqual(a, b), 'Arrays of different lengths are not equal');
+ a.push('East Boulder');
+ b.push('Gunbarrel Ranch', 'Teller Farm');
+ assert.ok(!_.isEqual(a, b), 'Arrays of identical lengths containing different elements are not equal');
+
+ // Sparse arrays.
+ assert.ok(_.isEqual(Array(3), Array(3)), 'Sparse arrays of identical lengths are equal');
+ assert.ok(!_.isEqual(Array(3), Array(6)), 'Sparse arrays of different lengths are not equal when both are empty');
+
+ var sparse = [];
+ sparse[1] = 5;
+ assert.ok(_.isEqual(sparse, [void 0, 5]), 'Handles sparse arrays as dense');
+
+ // Simple objects.
+ assert.ok(_.isEqual({a: 'Curly', b: 1, c: true}, {a: 'Curly', b: 1, c: true}), 'Objects containing identical primitives are equal');
+ assert.ok(_.isEqual({a: /Curly/g, b: new Date(2009, 11, 13)}, {a: /Curly/g, b: new Date(2009, 11, 13)}), 'Objects containing equivalent members are equal');
+ assert.ok(!_.isEqual({a: 63, b: 75}, {a: 61, b: 55}), 'Objects of identical sizes with different values are not equal');
+ assert.ok(!_.isEqual({a: 63, b: 75}, {a: 61, c: 55}), 'Objects of identical sizes with different property names are not equal');
+ assert.ok(!_.isEqual({a: 1, b: 2}, {a: 1}), 'Objects of different sizes are not equal');
+ assert.ok(!_.isEqual({a: 1}, {a: 1, b: 2}), 'Commutative equality is implemented for objects');
+ assert.ok(!_.isEqual({x: 1, y: void 0}, {x: 1, z: 2}), 'Objects with identical keys and different values are not equivalent');
+
+ // `A` contains nested objects and arrays.
+ a = {
+ name: new String('Moe Howard'),
+ age: new Number(77),
+ stooge: true,
+ hobbies: ['acting'],
+ film: {
+ name: 'Sing a Song of Six Pants',
+ release: new Date(1947, 9, 30),
+ stars: [new String('Larry Fine'), 'Shemp Howard'],
+ minutes: new Number(16),
+ seconds: 54
+ }
+ };
+
+ // `B` contains equivalent nested objects and arrays.
+ b = {
+ name: new String('Moe Howard'),
+ age: new Number(77),
+ stooge: true,
+ hobbies: ['acting'],
+ film: {
+ name: 'Sing a Song of Six Pants',
+ release: new Date(1947, 9, 30),
+ stars: [new String('Larry Fine'), 'Shemp Howard'],
+ minutes: new Number(16),
+ seconds: 54
+ }
+ };
+ assert.ok(_.isEqual(a, b), 'Objects with nested equivalent members are recursively compared');
+
+ // Instances.
+ assert.ok(_.isEqual(new First, new First), 'Object instances are equal');
+ assert.ok(!_.isEqual(new First, new Second), 'Objects with different constructors and identical own properties are not equal');
+ assert.ok(!_.isEqual({value: 1}, new First), 'Object instances and objects sharing equivalent properties are not equal');
+ assert.ok(!_.isEqual({value: 2}, new Second), 'The prototype chain of objects should not be examined');
+
+ // Circular Arrays.
+ (a = []).push(a);
+ (b = []).push(b);
+ assert.ok(_.isEqual(a, b), 'Arrays containing circular references are equal');
+ a.push(new String('Larry'));
+ b.push(new String('Larry'));
+ assert.ok(_.isEqual(a, b), 'Arrays containing circular references and equivalent properties are equal');
+ a.push('Shemp');
+ b.push('Curly');
+ assert.ok(!_.isEqual(a, b), 'Arrays containing circular references and different properties are not equal');
+
+ // More circular arrays #767.
+ a = ['everything is checked but', 'this', 'is not'];
+ a[1] = a;
+ b = ['everything is checked but', ['this', 'array'], 'is not'];
+ assert.ok(!_.isEqual(a, b), 'Comparison of circular references with non-circular references are not equal');
+
+ // Circular Objects.
+ a = {abc: null};
+ b = {abc: null};
+ a.abc = a;
+ b.abc = b;
+ assert.ok(_.isEqual(a, b), 'Objects containing circular references are equal');
+ a.def = 75;
+ b.def = 75;
+ assert.ok(_.isEqual(a, b), 'Objects containing circular references and equivalent properties are equal');
+ a.def = new Number(75);
+ b.def = new Number(63);
+ assert.ok(!_.isEqual(a, b), 'Objects containing circular references and different properties are not equal');
+
+ // More circular objects #767.
+ a = {everything: 'is checked', but: 'this', is: 'not'};
+ a.but = a;
+ b = {everything: 'is checked', but: {that: 'object'}, is: 'not'};
+ assert.ok(!_.isEqual(a, b), 'Comparison of circular references with non-circular object references are not equal');
+
+ // Cyclic Structures.
+ a = [{abc: null}];
+ b = [{abc: null}];
+ (a[0].abc = a).push(a);
+ (b[0].abc = b).push(b);
+ assert.ok(_.isEqual(a, b), 'Cyclic structures are equal');
+ a[0].def = 'Larry';
+ b[0].def = 'Larry';
+ assert.ok(_.isEqual(a, b), 'Cyclic structures containing equivalent properties are equal');
+ a[0].def = new String('Larry');
+ b[0].def = new String('Curly');
+ assert.ok(!_.isEqual(a, b), 'Cyclic structures containing different properties are not equal');
+
+ // Complex Circular References.
+ a = {foo: {b: {foo: {c: {foo: null}}}}};
+ b = {foo: {b: {foo: {c: {foo: null}}}}};
+ a.foo.b.foo.c.foo = a;
+ b.foo.b.foo.c.foo = b;
+ assert.ok(_.isEqual(a, b), 'Cyclic structures with nested and identically-named properties are equal');
+
+ // Chaining.
+ assert.ok(!_.isEqual(_({x: 1, y: void 0}).chain(), _({x: 1, z: 2}).chain()), 'Chained objects containing different values are not equal');
+
+ a = _({x: 1, y: 2}).chain();
+ b = _({x: 1, y: 2}).chain();
+ assert.equal(_.isEqual(a.isEqual(b), _(true)), true, '`isEqual` can be chained');
+
+ // Objects without a `constructor` property
+ if (Object.create) {
+ a = Object.create(null, {x: {value: 1, enumerable: true}});
+ b = {x: 1};
+ assert.ok(_.isEqual(a, b), 'Handles objects without a constructor (e.g. from Object.create');
+ }
+
+ function Foo() { this.a = 1; }
+ Foo.prototype.constructor = null;
+
+ var other = {a: 1};
+ assert.strictEqual(_.isEqual(new Foo, other), false, 'Objects from different constructors are not equal');
+
+
+ // Tricky object cases val comparisions
+ assert.equal(_.isEqual([0], [-0]), false);
+ assert.equal(_.isEqual({a: 0}, {a: -0}), false);
+ assert.equal(_.isEqual([NaN], [NaN]), true);
+ assert.equal(_.isEqual({a: NaN}, {a: NaN}), true);
+
+ if (typeof Symbol !== 'undefined') {
+ var symbol = Symbol('x');
+ assert.strictEqual(_.isEqual(symbol, symbol), true, 'A symbol is equal to itself');
+ assert.strictEqual(_.isEqual(symbol, Object(symbol)), true, 'Even when wrapped in Object()');
+ assert.strictEqual(_.isEqual(symbol, null), false, 'Different types are not equal');
+ }
+
+ });
+
+ QUnit.test('isEmpty', function(assert) {
+ assert.ok(!_([1]).isEmpty(), '[1] is not empty');
+ assert.ok(_.isEmpty([]), '[] is empty');
+ assert.ok(!_.isEmpty({one: 1}), '{one: 1} is not empty');
+ assert.ok(_.isEmpty({}), '{} is empty');
+ assert.ok(_.isEmpty(new RegExp('')), 'objects with prototype properties are empty');
+ assert.ok(_.isEmpty(null), 'null is empty');
+ assert.ok(_.isEmpty(), 'undefined is empty');
+ assert.ok(_.isEmpty(''), 'the empty string is empty');
+ assert.ok(!_.isEmpty('moe'), 'but other strings are not');
+
+ var obj = {one: 1};
+ delete obj.one;
+ assert.ok(_.isEmpty(obj), 'deleting all the keys from an object empties it');
+
+ var args = function(){ return arguments; };
+ assert.ok(_.isEmpty(args()), 'empty arguments object is empty');
+ assert.ok(!_.isEmpty(args('')), 'non-empty arguments object is not empty');
+
+ // covers collecting non-enumerable properties in IE < 9
+ var nonEnumProp = {toString: 5};
+ assert.ok(!_.isEmpty(nonEnumProp), 'non-enumerable property is not empty');
+ });
+
+ if (typeof document === 'object') {
+ QUnit.test('isElement', function(assert) {
+ assert.ok(!_.isElement('div'), 'strings are not dom elements');
+ assert.ok(_.isElement(testElement), 'an element is a DOM element');
+ });
+ }
+
+ QUnit.test('isArguments', function(assert) {
+ var args = (function(){ return arguments; }(1, 2, 3));
+ assert.ok(!_.isArguments('string'), 'a string is not an arguments object');
+ assert.ok(!_.isArguments(_.isArguments), 'a function is not an arguments object');
+ assert.ok(_.isArguments(args), 'but the arguments object is an arguments object');
+ assert.ok(!_.isArguments(_.toArray(args)), 'but not when it\'s converted into an array');
+ assert.ok(!_.isArguments([1, 2, 3]), 'and not vanilla arrays.');
+ });
+
+ QUnit.test('isObject', function(assert) {
+ assert.ok(_.isObject(arguments), 'the arguments object is object');
+ assert.ok(_.isObject([1, 2, 3]), 'and arrays');
+ if (testElement) {
+ assert.ok(_.isObject(testElement), 'and DOM element');
+ }
+ assert.ok(_.isObject(function() {}), 'and functions');
+ assert.ok(!_.isObject(null), 'but not null');
+ assert.ok(!_.isObject(void 0), 'and not undefined');
+ assert.ok(!_.isObject('string'), 'and not string');
+ assert.ok(!_.isObject(12), 'and not number');
+ assert.ok(!_.isObject(true), 'and not boolean');
+ assert.ok(_.isObject(new String('string')), 'but new String()');
+ });
+
+ QUnit.test('isArray', function(assert) {
+ assert.ok(!_.isArray(void 0), 'undefined vars are not arrays');
+ assert.ok(!_.isArray(arguments), 'the arguments object is not an array');
+ assert.ok(_.isArray([1, 2, 3]), 'but arrays are');
+ });
+
+ QUnit.test('isString', function(assert) {
+ var obj = new String('I am a string object');
+ if (testElement) {
+ assert.ok(!_.isString(testElement), 'an element is not a string');
+ }
+ assert.ok(_.isString([1, 2, 3].join(', ')), 'but strings are');
+ assert.strictEqual(_.isString('I am a string literal'), true, 'string literals are');
+ assert.ok(_.isString(obj), 'so are String objects');
+ assert.strictEqual(_.isString(1), false);
+ });
+
+ QUnit.test('isSymbol', function(assert) {
+ assert.ok(!_.isSymbol(0), 'numbers are not symbols');
+ assert.ok(!_.isSymbol(''), 'strings are not symbols');
+ assert.ok(!_.isSymbol(_.isSymbol), 'functions are not symbols');
+ if (typeof Symbol === 'function') {
+ assert.ok(_.isSymbol(Symbol()), 'symbols are symbols');
+ assert.ok(_.isSymbol(Symbol('description')), 'described symbols are symbols');
+ assert.ok(_.isSymbol(Object(Symbol())), 'boxed symbols are symbols');
+ }
+ });
+
+ QUnit.test('isNumber', function(assert) {
+ assert.ok(!_.isNumber('string'), 'a string is not a number');
+ assert.ok(!_.isNumber(arguments), 'the arguments object is not a number');
+ assert.ok(!_.isNumber(void 0), 'undefined is not a number');
+ assert.ok(_.isNumber(3 * 4 - 7 / 10), 'but numbers are');
+ assert.ok(_.isNumber(NaN), 'NaN *is* a number');
+ assert.ok(_.isNumber(Infinity), 'Infinity is a number');
+ assert.ok(!_.isNumber('1'), 'numeric strings are not numbers');
+ });
+
+ QUnit.test('isBoolean', function(assert) {
+ assert.ok(!_.isBoolean(2), 'a number is not a boolean');
+ assert.ok(!_.isBoolean('string'), 'a string is not a boolean');
+ assert.ok(!_.isBoolean('false'), 'the string "false" is not a boolean');
+ assert.ok(!_.isBoolean('true'), 'the string "true" is not a boolean');
+ assert.ok(!_.isBoolean(arguments), 'the arguments object is not a boolean');
+ assert.ok(!_.isBoolean(void 0), 'undefined is not a boolean');
+ assert.ok(!_.isBoolean(NaN), 'NaN is not a boolean');
+ assert.ok(!_.isBoolean(null), 'null is not a boolean');
+ assert.ok(_.isBoolean(true), 'but true is');
+ assert.ok(_.isBoolean(false), 'and so is false');
+ });
+
+ QUnit.test('isMap', function(assert) {
+ assert.ok(!_.isMap('string'), 'a string is not a map');
+ assert.ok(!_.isMap(2), 'a number is not a map');
+ assert.ok(!_.isMap({}), 'an object is not a map');
+ assert.ok(!_.isMap(false), 'a boolean is not a map');
+ assert.ok(!_.isMap(void 0), 'undefined is not a map');
+ assert.ok(!_.isMap([1, 2, 3]), 'an array is not a map');
+ if (typeof Set === 'function') {
+ assert.ok(!_.isMap(new Set()), 'a set is not a map');
+ }
+ if (typeof WeakSet === 'function') {
+ assert.ok(!_.isMap(new WeakSet()), 'a weakset is not a map');
+ }
+ if (typeof WeakMap === 'function') {
+ assert.ok(!_.isMap(new WeakMap()), 'a weakmap is not a map');
+ }
+ if (typeof Map === 'function') {
+ var keyString = 'a string';
+ var obj = new Map();
+ obj.set(keyString, 'value');
+ assert.ok(_.isMap(obj), 'but a map is');
+ }
+ });
+
+ QUnit.test('isWeakMap', function(assert) {
+ assert.ok(!_.isWeakMap('string'), 'a string is not a weakmap');
+ assert.ok(!_.isWeakMap(2), 'a number is not a weakmap');
+ assert.ok(!_.isWeakMap({}), 'an object is not a weakmap');
+ assert.ok(!_.isWeakMap(false), 'a boolean is not a weakmap');
+ assert.ok(!_.isWeakMap(void 0), 'undefined is not a weakmap');
+ assert.ok(!_.isWeakMap([1, 2, 3]), 'an array is not a weakmap');
+ if (typeof Set === 'function') {
+ assert.ok(!_.isWeakMap(new Set()), 'a set is not a weakmap');
+ }
+ if (typeof WeakSet === 'function') {
+ assert.ok(!_.isWeakMap(new WeakSet()), 'a weakset is not a weakmap');
+ }
+ if (typeof Map === 'function') {
+ assert.ok(!_.isWeakMap(new Map()), 'a map is not a weakmap');
+ }
+ if (typeof WeakMap === 'function') {
+ var keyObj = {}, obj = new WeakMap();
+ obj.set(keyObj, 'value');
+ assert.ok(_.isWeakMap(obj), 'but a weakmap is');
+ }
+ });
+
+ QUnit.test('isSet', function(assert) {
+ assert.ok(!_.isSet('string'), 'a string is not a set');
+ assert.ok(!_.isSet(2), 'a number is not a set');
+ assert.ok(!_.isSet({}), 'an object is not a set');
+ assert.ok(!_.isSet(false), 'a boolean is not a set');
+ assert.ok(!_.isSet(void 0), 'undefined is not a set');
+ assert.ok(!_.isSet([1, 2, 3]), 'an array is not a set');
+ if (typeof Map === 'function') {
+ assert.ok(!_.isSet(new Map()), 'a map is not a set');
+ }
+ if (typeof WeakMap === 'function') {
+ assert.ok(!_.isSet(new WeakMap()), 'a weakmap is not a set');
+ }
+ if (typeof WeakSet === 'function') {
+ assert.ok(!_.isSet(new WeakSet()), 'a weakset is not a set');
+ }
+ if (typeof Set === 'function') {
+ var obj = new Set();
+ obj.add(1).add('string').add(false).add({});
+ assert.ok(_.isSet(obj), 'but a set is');
+ }
+ });
+
+ QUnit.test('isWeakSet', function(assert) {
+
+ assert.ok(!_.isWeakSet('string'), 'a string is not a weakset');
+ assert.ok(!_.isWeakSet(2), 'a number is not a weakset');
+ assert.ok(!_.isWeakSet({}), 'an object is not a weakset');
+ assert.ok(!_.isWeakSet(false), 'a boolean is not a weakset');
+ assert.ok(!_.isWeakSet(void 0), 'undefined is not a weakset');
+ assert.ok(!_.isWeakSet([1, 2, 3]), 'an array is not a weakset');
+ if (typeof Map === 'function') {
+ assert.ok(!_.isWeakSet(new Map()), 'a map is not a weakset');
+ }
+ if (typeof WeakMap === 'function') {
+ assert.ok(!_.isWeakSet(new WeakMap()), 'a weakmap is not a weakset');
+ }
+ if (typeof Set === 'function') {
+ assert.ok(!_.isWeakSet(new Set()), 'a set is not a weakset');
+ }
+ if (typeof WeakSet === 'function') {
+ var obj = new WeakSet();
+ obj.add({x: 1}, {y: 'string'}).add({y: 'string'}).add({z: [1, 2, 3]});
+ assert.ok(_.isWeakSet(obj), 'but a weakset is');
+ }
+ });
+
+ QUnit.test('isFunction', function(assert) {
+ assert.ok(!_.isFunction(void 0), 'undefined vars are not functions');
+ assert.ok(!_.isFunction([1, 2, 3]), 'arrays are not functions');
+ assert.ok(!_.isFunction('moe'), 'strings are not functions');
+ assert.ok(_.isFunction(_.isFunction), 'but functions are');
+ assert.ok(_.isFunction(function(){}), 'even anonymous ones');
+
+ if (testElement) {
+ assert.ok(!_.isFunction(testElement), 'elements are not functions');
+ }
+
+ var nodelist = typeof document != 'undefined' && document.childNodes;
+ if (nodelist) {
+ assert.ok(!_.isFunction(nodelist));
+ }
+ });
+
+ if (typeof Int8Array !== 'undefined') {
+ QUnit.test('#1929 Typed Array constructors are functions', function(assert) {
+ _.chain(['Float32Array', 'Float64Array', 'Int8Array', 'Int16Array', 'Int32Array', 'Uint8Array', 'Uint8ClampedArray', 'Uint16Array', 'Uint32Array'])
+ .map(_.propertyOf(typeof GLOBAL != 'undefined' ? GLOBAL : window))
+ .compact()
+ .each(function(TypedArray) {
+ // PhantomJS reports `typeof UInt8Array == 'object'` and doesn't report toString TypeArray
+ // as a function
+ assert.strictEqual(_.isFunction(TypedArray), Object.prototype.toString.call(TypedArray) === '[object Function]');
+ });
+ });
+ }
+
+ QUnit.test('isDate', function(assert) {
+ assert.ok(!_.isDate(100), 'numbers are not dates');
+ assert.ok(!_.isDate({}), 'objects are not dates');
+ assert.ok(_.isDate(new Date()), 'but dates are');
+ });
+
+ QUnit.test('isRegExp', function(assert) {
+ assert.ok(!_.isRegExp(_.identity), 'functions are not RegExps');
+ assert.ok(_.isRegExp(/identity/), 'but RegExps are');
+ });
+
+ QUnit.test('isFinite', function(assert) {
+ assert.ok(!_.isFinite(void 0), 'undefined is not finite');
+ assert.ok(!_.isFinite(null), 'null is not finite');
+ assert.ok(!_.isFinite(NaN), 'NaN is not finite');
+ assert.ok(!_.isFinite(Infinity), 'Infinity is not finite');
+ assert.ok(!_.isFinite(-Infinity), '-Infinity is not finite');
+ assert.ok(_.isFinite('12'), 'Numeric strings are numbers');
+ assert.ok(!_.isFinite('1a'), 'Non numeric strings are not numbers');
+ assert.ok(!_.isFinite(''), 'Empty strings are not numbers');
+ var obj = new Number(5);
+ assert.ok(_.isFinite(obj), 'Number instances can be finite');
+ assert.ok(_.isFinite(0), '0 is finite');
+ assert.ok(_.isFinite(123), 'Ints are finite');
+ assert.ok(_.isFinite(-12.44), 'Floats are finite');
+ if (typeof Symbol === 'function') {
+ assert.ok(!_.isFinite(Symbol()), 'symbols are not numbers');
+ assert.ok(!_.isFinite(Symbol('description')), 'described symbols are not numbers');
+ assert.ok(!_.isFinite(Object(Symbol())), 'boxed symbols are not numbers');
+ }
+ });
+
+ QUnit.test('isNaN', function(assert) {
+ assert.ok(!_.isNaN(void 0), 'undefined is not NaN');
+ assert.ok(!_.isNaN(null), 'null is not NaN');
+ assert.ok(!_.isNaN(0), '0 is not NaN');
+ assert.ok(!_.isNaN(new Number(0)), 'wrapped 0 is not NaN');
+ assert.ok(_.isNaN(NaN), 'but NaN is');
+ assert.ok(_.isNaN(new Number(NaN)), 'wrapped NaN is still NaN');
+ });
+
+ QUnit.test('isNull', function(assert) {
+ assert.ok(!_.isNull(void 0), 'undefined is not null');
+ assert.ok(!_.isNull(NaN), 'NaN is not null');
+ assert.ok(_.isNull(null), 'but null is');
+ });
+
+ QUnit.test('isUndefined', function(assert) {
+ assert.ok(!_.isUndefined(1), 'numbers are defined');
+ assert.ok(!_.isUndefined(null), 'null is defined');
+ assert.ok(!_.isUndefined(false), 'false is defined');
+ assert.ok(!_.isUndefined(NaN), 'NaN is defined');
+ assert.ok(_.isUndefined(), 'nothing is undefined');
+ assert.ok(_.isUndefined(void 0), 'undefined is undefined');
+ });
+
+ QUnit.test('isError', function(assert) {
+ assert.ok(!_.isError(1), 'numbers are not Errors');
+ assert.ok(!_.isError(null), 'null is not an Error');
+ assert.ok(!_.isError(Error), 'functions are not Errors');
+ assert.ok(_.isError(new Error()), 'Errors are Errors');
+ assert.ok(_.isError(new EvalError()), 'EvalErrors are Errors');
+ assert.ok(_.isError(new RangeError()), 'RangeErrors are Errors');
+ assert.ok(_.isError(new ReferenceError()), 'ReferenceErrors are Errors');
+ assert.ok(_.isError(new SyntaxError()), 'SyntaxErrors are Errors');
+ assert.ok(_.isError(new TypeError()), 'TypeErrors are Errors');
+ assert.ok(_.isError(new URIError()), 'URIErrors are Errors');
+ });
+
+ QUnit.test('tap', function(assert) {
+ var intercepted = null;
+ var interceptor = function(obj) { intercepted = obj; };
+ var returned = _.tap(1, interceptor);
+ assert.equal(intercepted, 1, 'passes tapped object to interceptor');
+ assert.equal(returned, 1, 'returns tapped object');
+
+ returned = _([1, 2, 3]).chain().
+ map(function(n){ return n * 2; }).
+ max().
+ tap(interceptor).
+ value();
+ assert.equal(returned, 6, 'can use tapped objects in a chain');
+ assert.equal(intercepted, returned, 'can use tapped objects in a chain');
+ });
+
+ QUnit.test('has', function(assert) {
+ var obj = {foo: 'bar', func: function(){}};
+ assert.ok(_.has(obj, 'foo'), 'has() checks that the object has a property.');
+ assert.ok(!_.has(obj, 'baz'), "has() returns false if the object doesn't have the property.");
+ assert.ok(_.has(obj, 'func'), 'has() works for functions too.');
+ obj.hasOwnProperty = null;
+ assert.ok(_.has(obj, 'foo'), 'has() works even when the hasOwnProperty method is deleted.');
+ var child = {};
+ child.prototype = obj;
+ assert.ok(!_.has(child, 'foo'), 'has() does not check the prototype chain for a property.');
+ assert.strictEqual(_.has(null, 'foo'), false, 'has() returns false for null');
+ assert.strictEqual(_.has(void 0, 'foo'), false, 'has() returns false for undefined');
+ });
+
+ QUnit.test('isMatch', function(assert) {
+ var moe = {name: 'Moe Howard', hair: true};
+ var curly = {name: 'Curly Howard', hair: false};
+
+ assert.equal(_.isMatch(moe, {hair: true}), true, 'Returns a boolean');
+ assert.equal(_.isMatch(curly, {hair: true}), false, 'Returns a boolean');
+
+ assert.equal(_.isMatch(5, {__x__: void 0}), false, 'can match undefined props on primitives');
+ assert.equal(_.isMatch({__x__: void 0}, {__x__: void 0}), true, 'can match undefined props');
+
+ assert.equal(_.isMatch(null, {}), true, 'Empty spec called with null object returns true');
+ assert.equal(_.isMatch(null, {a: 1}), false, 'Non-empty spec called with null object returns false');
+
+ _.each([null, void 0], function(item) { assert.strictEqual(_.isMatch(item, null), true, 'null matches null'); });
+ _.each([null, void 0], function(item) { assert.strictEqual(_.isMatch(item, null), true, 'null matches {}'); });
+ assert.strictEqual(_.isMatch({b: 1}, {a: void 0}), false, 'handles undefined values (1683)');
+
+ _.each([true, 5, NaN, null, void 0], function(item) {
+ assert.strictEqual(_.isMatch({a: 1}, item), true, 'treats primitives as empty');
+ });
+
+ function Prototest() {}
+ Prototest.prototype.x = 1;
+ var specObj = new Prototest;
+ assert.equal(_.isMatch({x: 2}, specObj), true, 'spec is restricted to own properties');
+
+ specObj.y = 5;
+ assert.equal(_.isMatch({x: 1, y: 5}, specObj), true);
+ assert.equal(_.isMatch({x: 1, y: 4}, specObj), false);
+
+ assert.ok(_.isMatch(specObj, {x: 1, y: 5}), 'inherited and own properties are checked on the test object');
+
+ Prototest.x = 5;
+ assert.ok(_.isMatch({x: 5, y: 1}, Prototest), 'spec can be a function');
+
+ //null edge cases
+ var oCon = {constructor: Object};
+ assert.deepEqual(_.map([null, void 0, 5, {}], _.partial(_.isMatch, _, oCon)), [false, false, false, true], 'doesnt falsey match constructor on undefined/null');
+ });
+
+ QUnit.test('matcher', function(assert) {
+ var moe = {name: 'Moe Howard', hair: true};
+ var curly = {name: 'Curly Howard', hair: false};
+ var stooges = [moe, curly];
+
+ assert.equal(_.matcher({hair: true})(moe), true, 'Returns a boolean');
+ assert.equal(_.matcher({hair: true})(curly), false, 'Returns a boolean');
+
+ assert.equal(_.matcher({__x__: void 0})(5), false, 'can match undefined props on primitives');
+ assert.equal(_.matcher({__x__: void 0})({__x__: void 0}), true, 'can match undefined props');
+
+ assert.equal(_.matcher({})(null), true, 'Empty spec called with null object returns true');
+ assert.equal(_.matcher({a: 1})(null), false, 'Non-empty spec called with null object returns false');
+
+ assert.ok(_.find(stooges, _.matcher({hair: false})) === curly, 'returns a predicate that can be used by finding functions.');
+ assert.ok(_.find(stooges, _.matcher(moe)) === moe, 'can be used to locate an object exists in a collection.');
+ assert.deepEqual(_.filter([null, void 0], _.matcher({a: 1})), [], 'Do not throw on null values.');
+
+ assert.deepEqual(_.filter([null, void 0], _.matcher(null)), [null, void 0], 'null matches null');
+ assert.deepEqual(_.filter([null, void 0], _.matcher({})), [null, void 0], 'null matches {}');
+ assert.deepEqual(_.filter([{b: 1}], _.matcher({a: void 0})), [], 'handles undefined values (1683)');
+
+ _.each([true, 5, NaN, null, void 0], function(item) {
+ assert.equal(_.matcher(item)({a: 1}), true, 'treats primitives as empty');
+ });
+
+ function Prototest() {}
+ Prototest.prototype.x = 1;
+ var specObj = new Prototest;
+ var protospec = _.matcher(specObj);
+ assert.equal(protospec({x: 2}), true, 'spec is restricted to own properties');
+
+ specObj.y = 5;
+ protospec = _.matcher(specObj);
+ assert.equal(protospec({x: 1, y: 5}), true);
+ assert.equal(protospec({x: 1, y: 4}), false);
+
+ assert.ok(_.matcher({x: 1, y: 5})(specObj), 'inherited and own properties are checked on the test object');
+
+ Prototest.x = 5;
+ assert.ok(_.matcher(Prototest)({x: 5, y: 1}), 'spec can be a function');
+
+ // #1729
+ var o = {b: 1};
+ var m = _.matcher(o);
+
+ assert.equal(m({b: 1}), true);
+ o.b = 2;
+ o.a = 1;
+ assert.equal(m({b: 1}), true, 'changing spec object doesnt change matches result');
+
+
+ //null edge cases
+ var oCon = _.matcher({constructor: Object});
+ assert.deepEqual(_.map([null, void 0, 5, {}], oCon), [false, false, false, true], 'doesnt falsey match constructor on undefined/null');
+ });
+
+ QUnit.test('matches', function(assert) {
+ assert.strictEqual(_.matches, _.matcher, 'is an alias for matcher');
+ });
+
+ QUnit.test('findKey', function(assert) {
+ var objects = {
+ a: {a: 0, b: 0},
+ b: {a: 1, b: 1},
+ c: {a: 2, b: 2}
+ };
+
+ assert.equal(_.findKey(objects, function(obj) {
+ return obj.a === 0;
+ }), 'a');
+
+ assert.equal(_.findKey(objects, function(obj) {
+ return obj.b * obj.a === 4;
+ }), 'c');
+
+ assert.equal(_.findKey(objects, 'a'), 'b', 'Uses lookupIterator');
+
+ assert.equal(_.findKey(objects, function(obj) {
+ return obj.b * obj.a === 5;
+ }), void 0);
+
+ assert.strictEqual(_.findKey([1, 2, 3, 4, 5, 6], function(obj) {
+ return obj === 3;
+ }), '2', 'Keys are strings');
+
+ assert.strictEqual(_.findKey(objects, function(a) {
+ return a.foo === null;
+ }), void 0);
+
+ _.findKey({a: {a: 1}}, function(a, key, obj) {
+ assert.equal(key, 'a');
+ assert.deepEqual(obj, {a: {a: 1}});
+ assert.strictEqual(this, objects, 'called with context');
+ }, objects);
+
+ var array = [1, 2, 3, 4];
+ array.match = 55;
+ assert.strictEqual(_.findKey(array, function(x) { return x === 55; }), 'match', 'matches array-likes keys');
+ });
+
+
+ QUnit.test('mapObject', function(assert) {
+ var obj = {a: 1, b: 2};
+ var objects = {
+ a: {a: 0, b: 0},
+ b: {a: 1, b: 1},
+ c: {a: 2, b: 2}
+ };
+
+ assert.deepEqual(_.mapObject(obj, function(val) {
+ return val * 2;
+ }), {a: 2, b: 4}, 'simple objects');
+
+ assert.deepEqual(_.mapObject(objects, function(val) {
+ return _.reduce(val, function(memo, v){
+ return memo + v;
+ }, 0);
+ }), {a: 0, b: 2, c: 4}, 'nested objects');
+
+ assert.deepEqual(_.mapObject(obj, function(val, key, o) {
+ return o[key] * 2;
+ }), {a: 2, b: 4}, 'correct keys');
+
+ assert.deepEqual(_.mapObject([1, 2], function(val) {
+ return val * 2;
+ }), {0: 2, 1: 4}, 'check behavior for arrays');
+
+ assert.deepEqual(_.mapObject(obj, function(val) {
+ return val * this.multiplier;
+ }, {multiplier: 3}), {a: 3, b: 6}, 'keep context');
+
+ assert.deepEqual(_.mapObject({a: 1}, function() {
+ return this.length;
+ }, [1, 2]), {a: 2}, 'called with context');
+
+ var ids = _.mapObject({length: 2, 0: {id: '1'}, 1: {id: '2'}}, function(n){
+ return n.id;
+ });
+ assert.deepEqual(ids, {length: void 0, 0: '1', 1: '2'}, 'Check with array-like objects');
+
+ // Passing a property name like _.pluck.
+ var people = {a: {name: 'moe', age: 30}, b: {name: 'curly', age: 50}};
+ assert.deepEqual(_.mapObject(people, 'name'), {a: 'moe', b: 'curly'}, 'predicate string map to object properties');
+
+ _.each([null, void 0, 1, 'abc', [], {}, void 0], function(val){
+ assert.deepEqual(_.mapObject(val, _.identity), {}, 'mapValue identity');
+ });
+
+ var Proto = function(){ this.a = 1; };
+ Proto.prototype.b = 1;
+ var protoObj = new Proto();
+ assert.deepEqual(_.mapObject(protoObj, _.identity), {a: 1}, 'ignore inherited values from prototypes');
+
+ });
+}());
diff --git a/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/underscore/test/utility.js b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/underscore/test/utility.js
new file mode 100644
index 0000000..fbd54df
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/underscore/test/utility.js
@@ -0,0 +1,420 @@
+(function() {
+ var _ = typeof require == 'function' ? require('..') : window._;
+ var templateSettings;
+
+ QUnit.module('Utility', {
+
+ beforeEach: function() {
+ templateSettings = _.clone(_.templateSettings);
+ },
+
+ afterEach: function() {
+ _.templateSettings = templateSettings;
+ }
+
+ });
+
+ if (typeof this == 'object') {
+ QUnit.test('noConflict', function(assert) {
+ var underscore = _.noConflict();
+ assert.equal(underscore.identity(1), 1);
+ if (typeof require != 'function') {
+ assert.equal(this._, void 0, 'global underscore is removed');
+ this._ = underscore;
+ } else if (typeof global !== 'undefined') {
+ delete global._;
+ }
+ });
+ }
+
+ if (typeof require == 'function') {
+ QUnit.test('noConflict (node vm)', function(assert) {
+ assert.expect(2);
+ var done = assert.async();
+ var fs = require('fs');
+ var vm = require('vm');
+ var filename = __dirname + '/../underscore.js';
+ fs.readFile(filename, function(err, content){
+ var sandbox = vm.createScript(
+ content + 'this.underscore = this._.noConflict();',
+ filename
+ );
+ var context = {_: 'oldvalue'};
+ sandbox.runInNewContext(context);
+ assert.equal(context._, 'oldvalue');
+ assert.equal(context.underscore.VERSION, _.VERSION);
+
+ done();
+ });
+ });
+ }
+
+ QUnit.test('#750 - Return _ instance.', function(assert) {
+ assert.expect(2);
+ var instance = _([]);
+ assert.ok(_(instance) === instance);
+ assert.ok(new _(instance) === instance);
+ });
+
+ QUnit.test('identity', function(assert) {
+ var stooge = {name: 'moe'};
+ assert.equal(_.identity(stooge), stooge, 'stooge is the same as his identity');
+ });
+
+ QUnit.test('constant', function(assert) {
+ var stooge = {name: 'moe'};
+ assert.equal(_.constant(stooge)(), stooge, 'should create a function that returns stooge');
+ });
+
+ QUnit.test('noop', function(assert) {
+ assert.strictEqual(_.noop('curly', 'larry', 'moe'), void 0, 'should always return undefined');
+ });
+
+ QUnit.test('property', function(assert) {
+ var stooge = {name: 'moe'};
+ assert.equal(_.property('name')(stooge), 'moe', 'should return the property with the given name');
+ assert.equal(_.property('name')(null), void 0, 'should return undefined for null values');
+ assert.equal(_.property('name')(void 0), void 0, 'should return undefined for undefined values');
+ });
+
+ QUnit.test('propertyOf', function(assert) {
+ var stoogeRanks = _.propertyOf({curly: 2, moe: 1, larry: 3});
+ assert.equal(stoogeRanks('curly'), 2, 'should return the property with the given name');
+ assert.equal(stoogeRanks(null), void 0, 'should return undefined for null values');
+ assert.equal(stoogeRanks(void 0), void 0, 'should return undefined for undefined values');
+
+ function MoreStooges() { this.shemp = 87; }
+ MoreStooges.prototype = {curly: 2, moe: 1, larry: 3};
+ var moreStoogeRanks = _.propertyOf(new MoreStooges());
+ assert.equal(moreStoogeRanks('curly'), 2, 'should return properties from further up the prototype chain');
+
+ var nullPropertyOf = _.propertyOf(null);
+ assert.equal(nullPropertyOf('curly'), void 0, 'should return undefined when obj is null');
+
+ var undefPropertyOf = _.propertyOf(void 0);
+ assert.equal(undefPropertyOf('curly'), void 0, 'should return undefined when obj is undefined');
+ });
+
+ QUnit.test('random', function(assert) {
+ var array = _.range(1000);
+ var min = Math.pow(2, 31);
+ var max = Math.pow(2, 62);
+
+ assert.ok(_.every(array, function() {
+ return _.random(min, max) >= min;
+ }), 'should produce a random number greater than or equal to the minimum number');
+
+ assert.ok(_.some(array, function() {
+ return _.random(Number.MAX_VALUE) > 0;
+ }), 'should produce a random number when passed `Number.MAX_VALUE`');
+ });
+
+ QUnit.test('now', function(assert) {
+ var diff = _.now() - new Date().getTime();
+ assert.ok(diff <= 0 && diff > -5, 'Produces the correct time in milliseconds');//within 5ms
+ });
+
+ QUnit.test('uniqueId', function(assert) {
+ var ids = [], i = 0;
+ while (i++ < 100) ids.push(_.uniqueId());
+ assert.equal(_.uniq(ids).length, ids.length, 'can generate a globally-unique stream of ids');
+ });
+
+ QUnit.test('times', function(assert) {
+ var vals = [];
+ _.times(3, function(i) { vals.push(i); });
+ assert.deepEqual(vals, [0, 1, 2], 'is 0 indexed');
+ //
+ vals = [];
+ _(3).times(function(i) { vals.push(i); });
+ assert.deepEqual(vals, [0, 1, 2], 'works as a wrapper');
+ // collects return values
+ assert.deepEqual([0, 1, 2], _.times(3, function(i) { return i; }), 'collects return values');
+
+ assert.deepEqual(_.times(0, _.identity), []);
+ assert.deepEqual(_.times(-1, _.identity), []);
+ assert.deepEqual(_.times(parseFloat('-Infinity'), _.identity), []);
+ });
+
+ QUnit.test('mixin', function(assert) {
+ _.mixin({
+ myReverse: function(string) {
+ return string.split('').reverse().join('');
+ }
+ });
+ assert.equal(_.myReverse('panacea'), 'aecanap', 'mixed in a function to _');
+ assert.equal(_('champ').myReverse(), 'pmahc', 'mixed in a function to the OOP wrapper');
+ });
+
+ QUnit.test('_.escape', function(assert) {
+ assert.equal(_.escape(null), '');
+ });
+
+ QUnit.test('_.unescape', function(assert) {
+ var string = 'Curly & Moe';
+ assert.equal(_.unescape(null), '');
+ assert.equal(_.unescape(_.escape(string)), string);
+ assert.equal(_.unescape(string), string, 'don\'t unescape unnecessarily');
+ });
+
+ // Don't care what they escape them to just that they're escaped and can be unescaped
+ QUnit.test('_.escape & unescape', function(assert) {
+ // test & (&) seperately obviously
+ var escapeCharacters = ['<', '>', '"', '\'', '`'];
+
+ _.each(escapeCharacters, function(escapeChar) {
+ var s = 'a ' + escapeChar + ' string escaped';
+ var e = _.escape(s);
+ assert.notEqual(s, e, escapeChar + ' is escaped');
+ assert.equal(s, _.unescape(e), escapeChar + ' can be unescaped');
+
+ s = 'a ' + escapeChar + escapeChar + escapeChar + 'some more string' + escapeChar;
+ e = _.escape(s);
+
+ assert.equal(e.indexOf(escapeChar), -1, 'can escape multiple occurances of ' + escapeChar);
+ assert.equal(_.unescape(e), s, 'multiple occurrences of ' + escapeChar + ' can be unescaped');
+ });
+
+ // handles multiple escape characters at once
+ var joiner = ' other stuff ';
+ var allEscaped = escapeCharacters.join(joiner);
+ allEscaped += allEscaped;
+ assert.ok(_.every(escapeCharacters, function(escapeChar) {
+ return allEscaped.indexOf(escapeChar) !== -1;
+ }), 'handles multiple characters');
+ assert.ok(allEscaped.indexOf(joiner) >= 0, 'can escape multiple escape characters at the same time');
+
+ // test & -> &
+ var str = 'some string & another string & yet another';
+ var escaped = _.escape(str);
+
+ assert.ok(escaped.indexOf('&') !== -1, 'handles & aka &');
+ assert.equal(_.unescape(str), str, 'can unescape &');
+ });
+
+ QUnit.test('template', function(assert) {
+ var basicTemplate = _.template("<%= thing %> is gettin' on my noives!");
+ var result = basicTemplate({thing: 'This'});
+ assert.equal(result, "This is gettin' on my noives!", 'can do basic attribute interpolation');
+
+ var sansSemicolonTemplate = _.template('A <% this %> B');
+ assert.equal(sansSemicolonTemplate(), 'A B');
+
+ var backslashTemplate = _.template('<%= thing %> is \\ridanculous');
+ assert.equal(backslashTemplate({thing: 'This'}), 'This is \\ridanculous');
+
+ var escapeTemplate = _.template('<%= a ? "checked=\\"checked\\"" : "" %>');
+ assert.equal(escapeTemplate({a: true}), 'checked="checked"', 'can handle slash escapes in interpolations.');
+
+ var fancyTemplate = _.template('<ul><% ' +
+ ' for (var key in people) { ' +
+ '%><li><%= people[key] %></li><% } %></ul>');
+ result = fancyTemplate({people: {moe: 'Moe', larry: 'Larry', curly: 'Curly'}});
+ assert.equal(result, '<ul><li>Moe</li><li>Larry</li><li>Curly</li></ul>', 'can run arbitrary javascript in templates');
+
+ var escapedCharsInJavascriptTemplate = _.template('<ul><% _.each(numbers.split("\\n"), function(item) { %><li><%= item %></li><% }) %></ul>');
+ result = escapedCharsInJavascriptTemplate({numbers: 'one\ntwo\nthree\nfour'});
+ assert.equal(result, '<ul><li>one</li><li>two</li><li>three</li><li>four</li></ul>', 'Can use escaped characters (e.g. \\n) in JavaScript');
+
+ var namespaceCollisionTemplate = _.template('<%= pageCount %> <%= thumbnails[pageCount] %> <% _.each(thumbnails, function(p) { %><div class="thumbnail" rel="<%= p %>"></div><% }); %>');
+ result = namespaceCollisionTemplate({
+ pageCount: 3,
+ thumbnails: {
+ 1: 'p1-thumbnail.gif',
+ 2: 'p2-thumbnail.gif',
+ 3: 'p3-thumbnail.gif'
+ }
+ });
+ assert.equal(result, '3 p3-thumbnail.gif <div class="thumbnail" rel="p1-thumbnail.gif"></div><div class="thumbnail" rel="p2-thumbnail.gif"></div><div class="thumbnail" rel="p3-thumbnail.gif"></div>');
+
+ var noInterpolateTemplate = _.template('<div><p>Just some text. Hey, I know this is silly but it aids consistency.</p></div>');
+ result = noInterpolateTemplate();
+ assert.equal(result, '<div><p>Just some text. Hey, I know this is silly but it aids consistency.</p></div>');
+
+ var quoteTemplate = _.template("It's its, not it's");
+ assert.equal(quoteTemplate({}), "It's its, not it's");
+
+ var quoteInStatementAndBody = _.template('<% ' +
+ " if(foo == 'bar'){ " +
+ "%>Statement quotes and 'quotes'.<% } %>");
+ assert.equal(quoteInStatementAndBody({foo: 'bar'}), "Statement quotes and 'quotes'.");
+
+ var withNewlinesAndTabs = _.template('This\n\t\tis: <%= x %>.\n\tok.\nend.');
+ assert.equal(withNewlinesAndTabs({x: 'that'}), 'This\n\t\tis: that.\n\tok.\nend.');
+
+ var template = _.template('<i><%- value %></i>');
+ result = template({value: '<script>'});
+ assert.equal(result, '<i><script></i>');
+
+ var stooge = {
+ name: 'Moe',
+ template: _.template("I'm <%= this.name %>")
+ };
+ assert.equal(stooge.template(), "I'm Moe");
+
+ template = _.template('\n ' +
+ ' <%\n ' +
+ ' // a comment\n ' +
+ ' if (data) { data += 12345; }; %>\n ' +
+ ' <li><%= data %></li>\n '
+ );
+ assert.equal(template({data: 12345}).replace(/\s/g, ''), '<li>24690</li>');
+
+ _.templateSettings = {
+ evaluate: /\{\{([\s\S]+?)\}\}/g,
+ interpolate: /\{\{=([\s\S]+?)\}\}/g
+ };
+
+ var custom = _.template('<ul>{{ for (var key in people) { }}<li>{{= people[key] }}</li>{{ } }}</ul>');
+ result = custom({people: {moe: 'Moe', larry: 'Larry', curly: 'Curly'}});
+ assert.equal(result, '<ul><li>Moe</li><li>Larry</li><li>Curly</li></ul>', 'can run arbitrary javascript in templates');
+
+ var customQuote = _.template("It's its, not it's");
+ assert.equal(customQuote({}), "It's its, not it's");
+
+ quoteInStatementAndBody = _.template("{{ if(foo == 'bar'){ }}Statement quotes and 'quotes'.{{ } }}");
+ assert.equal(quoteInStatementAndBody({foo: 'bar'}), "Statement quotes and 'quotes'.");
+
+ _.templateSettings = {
+ evaluate: /<\?([\s\S]+?)\?>/g,
+ interpolate: /<\?=([\s\S]+?)\?>/g
+ };
+
+ var customWithSpecialChars = _.template('<ul><? for (var key in people) { ?><li><?= people[key] ?></li><? } ?></ul>');
+ result = customWithSpecialChars({people: {moe: 'Moe', larry: 'Larry', curly: 'Curly'}});
+ assert.equal(result, '<ul><li>Moe</li><li>Larry</li><li>Curly</li></ul>', 'can run arbitrary javascript in templates');
+
+ var customWithSpecialCharsQuote = _.template("It's its, not it's");
+ assert.equal(customWithSpecialCharsQuote({}), "It's its, not it's");
+
+ quoteInStatementAndBody = _.template("<? if(foo == 'bar'){ ?>Statement quotes and 'quotes'.<? } ?>");
+ assert.equal(quoteInStatementAndBody({foo: 'bar'}), "Statement quotes and 'quotes'.");
+
+ _.templateSettings = {
+ interpolate: /\{\{(.+?)\}\}/g
+ };
+
+ var mustache = _.template('Hello {{planet}}!');
+ assert.equal(mustache({planet: 'World'}), 'Hello World!', 'can mimic mustache.js');
+
+ var templateWithNull = _.template('a null undefined {{planet}}');
+ assert.equal(templateWithNull({planet: 'world'}), 'a null undefined world', 'can handle missing escape and evaluate settings');
+ });
+
+ QUnit.test('_.template provides the generated function source, when a SyntaxError occurs', function(assert) {
+ var source;
+ try {
+ _.template('<b><%= if x %></b>');
+ } catch (ex) {
+ source = ex.source;
+ }
+ assert.ok(/__p/.test(source));
+ });
+
+ QUnit.test('_.template handles \\u2028 & \\u2029', function(assert) {
+ var tmpl = _.template('<p>\u2028<%= "\\u2028\\u2029" %>\u2029</p>');
+ assert.strictEqual(tmpl(), '<p>\u2028\u2028\u2029\u2029</p>');
+ });
+
+ QUnit.test('result calls functions and returns primitives', function(assert) {
+ var obj = {w: '', x: 'x', y: function(){ return this.x; }};
+ assert.strictEqual(_.result(obj, 'w'), '');
+ assert.strictEqual(_.result(obj, 'x'), 'x');
+ assert.strictEqual(_.result(obj, 'y'), 'x');
+ assert.strictEqual(_.result(obj, 'z'), void 0);
+ assert.strictEqual(_.result(null, 'x'), void 0);
+ });
+
+ QUnit.test('result returns a default value if object is null or undefined', function(assert) {
+ assert.strictEqual(_.result(null, 'b', 'default'), 'default');
+ assert.strictEqual(_.result(void 0, 'c', 'default'), 'default');
+ assert.strictEqual(_.result(''.match('missing'), 1, 'default'), 'default');
+ });
+
+ QUnit.test('result returns a default value if property of object is missing', function(assert) {
+ assert.strictEqual(_.result({d: null}, 'd', 'default'), null);
+ assert.strictEqual(_.result({e: false}, 'e', 'default'), false);
+ });
+
+ QUnit.test('result only returns the default value if the object does not have the property or is undefined', function(assert) {
+ assert.strictEqual(_.result({}, 'b', 'default'), 'default');
+ assert.strictEqual(_.result({d: void 0}, 'd', 'default'), 'default');
+ });
+
+ QUnit.test('result does not return the default if the property of an object is found in the prototype', function(assert) {
+ var Foo = function(){};
+ Foo.prototype.bar = 1;
+ assert.strictEqual(_.result(new Foo, 'bar', 2), 1);
+ });
+
+ QUnit.test('result does use the fallback when the result of invoking the property is undefined', function(assert) {
+ var obj = {a: function() {}};
+ assert.strictEqual(_.result(obj, 'a', 'failed'), void 0);
+ });
+
+ QUnit.test('result fallback can use a function', function(assert) {
+ var obj = {a: [1, 2, 3]};
+ assert.strictEqual(_.result(obj, 'b', _.constant(5)), 5);
+ assert.strictEqual(_.result(obj, 'b', function() {
+ return this.a;
+ }), obj.a, 'called with context');
+ });
+
+ QUnit.test('_.templateSettings.variable', function(assert) {
+ var s = '<%=data.x%>';
+ var data = {x: 'x'};
+ var tmp = _.template(s, {variable: 'data'});
+ assert.strictEqual(tmp(data), 'x');
+ _.templateSettings.variable = 'data';
+ assert.strictEqual(_.template(s)(data), 'x');
+ });
+
+ QUnit.test('#547 - _.templateSettings is unchanged by custom settings.', function(assert) {
+ assert.ok(!_.templateSettings.variable);
+ _.template('', {}, {variable: 'x'});
+ assert.ok(!_.templateSettings.variable);
+ });
+
+ QUnit.test('#556 - undefined template variables.', function(assert) {
+ var template = _.template('<%=x%>');
+ assert.strictEqual(template({x: null}), '');
+ assert.strictEqual(template({x: void 0}), '');
+
+ var templateEscaped = _.template('<%-x%>');
+ assert.strictEqual(templateEscaped({x: null}), '');
+ assert.strictEqual(templateEscaped({x: void 0}), '');
+
+ var templateWithProperty = _.template('<%=x.foo%>');
+ assert.strictEqual(templateWithProperty({x: {}}), '');
+ assert.strictEqual(templateWithProperty({x: {}}), '');
+
+ var templateWithPropertyEscaped = _.template('<%-x.foo%>');
+ assert.strictEqual(templateWithPropertyEscaped({x: {}}), '');
+ assert.strictEqual(templateWithPropertyEscaped({x: {}}), '');
+ });
+
+ QUnit.test('interpolate evaluates code only once.', function(assert) {
+ assert.expect(2);
+ var count = 0;
+ var template = _.template('<%= f() %>');
+ template({f: function(){ assert.ok(!count++); }});
+
+ var countEscaped = 0;
+ var templateEscaped = _.template('<%- f() %>');
+ templateEscaped({f: function(){ assert.ok(!countEscaped++); }});
+ });
+
+ QUnit.test('#746 - _.template settings are not modified.', function(assert) {
+ assert.expect(1);
+ var settings = {};
+ _.template('', null, settings);
+ assert.deepEqual(settings, {});
+ });
+
+ QUnit.test('#779 - delimeters are applied to unescaped text.', function(assert) {
+ assert.expect(1);
+ var template = _.template('<<\nx\n>>', null, {evaluate: /<<(.*?)>>/g});
+ assert.strictEqual(template(), '<<\nx\n>>');
+ });
+
+}());
diff --git a/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/underscore/underscore-min.js b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/underscore/underscore-min.js
new file mode 100644
index 0000000..f01025b
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/underscore/underscore-min.js
@@ -0,0 +1,6 @@
+// Underscore.js 1.8.3
+// http://underscorejs.org
+// (c) 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+// Underscore may be freely distributed under the MIT license.
+(function(){function n(n){function t(t,r,e,u,i,o){for(;i>=0&&o>i;i+=n){var a=u?u[i]:i;e=r(e,t[a],a,t)}return e}return function(r,e,u,i){e=b(e,i,4);var o=!k(r)&&m.keys(r),a=(o||r).length,c=n>0?0:a-1;return arguments.length<3&&(u=r[o?o[c]:c],c+=n),t(r,e,u,o,c,a)}}function t(n){return function(t,r,e){r=x(r,e);for(var u=O(t),i=n>0?0:u-1;i>=0&&u>i;i+=n)if(r(t[i],i,t))return i;return-1}}function r(n,t,r){return function(e,u,i){var o=0,a=O(e);if("number"==typeof i)n>0?o=i>=0?i:Math.max(i+a,o):a=i>=0?Math.min(i+1,a):i+a+1;else if(r&&i&&a)return i=r(e,u),e[i]===u?i:-1;if(u!==u)return i=t(l.call(e,o,a),m.isNaN),i>=0?i+o:-1;for(i=n>0?o:a-1;i>=0&&a>i;i+=n)if(e[i]===u)return i;return-1}}function e(n,t){var r=I.length,e=n.constructor,u=m.isFunction(e)&&e.prototype||a,i="constructor";for(m.has(n,i)&&!m.contains(t,i)&&t.push(i);r--;)i=I[r],i in n&&n[i]!==u[i]&&!m.contains(t,i)&&t.push(i)}var u=this,i=u._,o=Array.prototype,a=Object.prototype,c=Function.prototype,f=o.push,l=o.slice,s=a.toString,p=a.hasOwnProperty,h=Array.isArray,v=Object.keys,g=c.bind,y=Object.create,d=function(){},m=function(n){return n instanceof m?n:this instanceof m?void(this._wrapped=n):new m(n)};"undefined"!=typeof exports?("undefined"!=typeof module&&module.exports&&(exports=module.exports=m),exports._=m):u._=m,m.VERSION="1.8.3";var b=function(n,t,r){if(t===void 0)return n;switch(null==r?3:r){case 1:return function(r){return n.call(t,r)};case 2:return function(r,e){return n.call(t,r,e)};case 3:return function(r,e,u){return n.call(t,r,e,u)};case 4:return function(r,e,u,i){return n.call(t,r,e,u,i)}}return function(){return n.apply(t,arguments)}},x=function(n,t,r){return null==n?m.identity:m.isFunction(n)?b(n,t,r):m.isObject(n)?m.matcher(n):m.property(n)};m.iteratee=function(n,t){return x(n,t,1/0)};var _=function(n,t){return function(r){var e=arguments.length;if(2>e||null==r)return r;for(var u=1;e>u;u++)for(var i=arguments[u],o=n(i),a=o.length,c=0;a>c;c++){var f=o[c];t&&r[f]!==void 0||(r[f]=i[f])}return r}},j=function(n){if(!m.isObject(n))return{};if(y)return y(n);d.prototype=n;var t=new d;return d.prototype=null,t},w=function(n){return function(t){return null==t?void 0:t[n]}},A=Math.pow(2,53)-1,O=w("length"),k=function(n){var t=O(n);return"number"==typeof t&&t>=0&&A>=t};m.each=m.forEach=function(n,t,r){t=b(t,r);var e,u;if(k(n))for(e=0,u=n.length;u>e;e++)t(n[e],e,n);else{var i=m.keys(n);for(e=0,u=i.length;u>e;e++)t(n[i[e]],i[e],n)}return n},m.map=m.collect=function(n,t,r){t=x(t,r);for(var e=!k(n)&&m.keys(n),u=(e||n).length,i=Array(u),o=0;u>o;o++){var a=e?e[o]:o;i[o]=t(n[a],a,n)}return i},m.reduce=m.foldl=m.inject=n(1),m.reduceRight=m.foldr=n(-1),m.find=m.detect=function(n,t,r){var e;return e=k(n)?m.findIndex(n,t,r):m.findKey(n,t,r),e!==void 0&&e!==-1?n[e]:void 0},m.filter=m.select=function(n,t,r){var e=[];return t=x(t,r),m.each(n,function(n,r,u){t(n,r,u)&&e.push(n)}),e},m.reject=function(n,t,r){return m.filter(n,m.negate(x(t)),r)},m.every=m.all=function(n,t,r){t=x(t,r);for(var e=!k(n)&&m.keys(n),u=(e||n).length,i=0;u>i;i++){var o=e?e[i]:i;if(!t(n[o],o,n))return!1}return!0},m.some=m.any=function(n,t,r){t=x(t,r);for(var e=!k(n)&&m.keys(n),u=(e||n).length,i=0;u>i;i++){var o=e?e[i]:i;if(t(n[o],o,n))return!0}return!1},m.contains=m.includes=m.include=function(n,t,r,e){return k(n)||(n=m.values(n)),("number"!=typeof r||e)&&(r=0),m.indexOf(n,t,r)>=0},m.invoke=function(n,t){var r=l.call(arguments,2),e=m.isFunction(t);return m.map(n,function(n){var u=e?t:n[t];return null==u?u:u.apply(n,r)})},m.pluck=function(n,t){return m.map(n,m.property(t))},m.where=function(n,t){return m.filter(n,m.matcher(t))},m.findWhere=function(n,t){return m.find(n,m.matcher(t))},m.max=function(n,t,r){var e,u,i=-1/0,o=-1/0;if(null==t&&null!=n){n=k(n)?n:m.values(n);for(var a=0,c=n.length;c>a;a++)e=n[a],e>i&&(i=e)}else t=x(t,r),m.each(n,function(n,r,e){u=t(n,r,e),(u>o||u===-1/0&&i===-1/0)&&(i=n,o=u)});return i},m.min=function(n,t,r){var e,u,i=1/0,o=1/0;if(null==t&&null!=n){n=k(n)?n:m.values(n);for(var a=0,c=n.length;c>a;a++)e=n[a],i>e&&(i=e)}else t=x(t,r),m.each(n,function(n,r,e){u=t(n,r,e),(o>u||1/0===u&&1/0===i)&&(i=n,o=u)});return i},m.shuffle=function(n){for(var t,r=k(n)?n:m.values(n),e=r.length,u=Array(e),i=0;e>i;i++)t=m.random(0,i),t!==i&&(u[i]=u[t]),u[t]=r[i];return u},m.sample=function(n,t,r){return null==t||r?(k(n)||(n=m.values(n)),n[m.random(n.length-1)]):m.shuffle(n).slice(0,Math.max(0,t))},m.sortBy=function(n,t,r){return t=x(t,r),m.pluck(m.map(n,function(n,r,e){return{value:n,index:r,criteria:t(n,r,e)}}).sort(function(n,t){var r=n.criteria,e=t.criteria;if(r!==e){if(r>e||r===void 0)return 1;if(e>r||e===void 0)return-1}return n.index-t.index}),"value")};var F=function(n){return function(t,r,e){var u={};return r=x(r,e),m.each(t,function(e,i){var o=r(e,i,t);n(u,e,o)}),u}};m.groupBy=F(function(n,t,r){m.has(n,r)?n[r].push(t):n[r]=[t]}),m.indexBy=F(function(n,t,r){n[r]=t}),m.countBy=F(function(n,t,r){m.has(n,r)?n[r]++:n[r]=1}),m.toArray=function(n){return n?m.isArray(n)?l.call(n):k(n)?m.map(n,m.identity):m.values(n):[]},m.size=function(n){return null==n?0:k(n)?n.length:m.keys(n).length},m.partition=function(n,t,r){t=x(t,r);var e=[],u=[];return m.each(n,function(n,r,i){(t(n,r,i)?e:u).push(n)}),[e,u]},m.first=m.head=m.take=function(n,t,r){return null==n?void 0:null==t||r?n[0]:m.initial(n,n.length-t)},m.initial=function(n,t,r){return l.call(n,0,Math.max(0,n.length-(null==t||r?1:t)))},m.last=function(n,t,r){return null==n?void 0:null==t||r?n[n.length-1]:m.rest(n,Math.max(0,n.length-t))},m.rest=m.tail=m.drop=function(n,t,r){return l.call(n,null==t||r?1:t)},m.compact=function(n){return m.filter(n,m.identity)};var S=function(n,t,r,e){for(var u=[],i=0,o=e||0,a=O(n);a>o;o++){var c=n[o];if(k(c)&&(m.isArray(c)||m.isArguments(c))){t||(c=S(c,t,r));var f=0,l=c.length;for(u.length+=l;l>f;)u[i++]=c[f++]}else r||(u[i++]=c)}return u};m.flatten=function(n,t){return S(n,t,!1)},m.without=function(n){return m.difference(n,l.call(arguments,1))},m.uniq=m.unique=function(n,t,r,e){m.isBoolean(t)||(e=r,r=t,t=!1),null!=r&&(r=x(r,e));for(var u=[],i=[],o=0,a=O(n);a>o;o++){var c=n[o],f=r?r(c,o,n):c;t?(o&&i===f||u.push(c),i=f):r?m.contains(i,f)||(i.push(f),u.push(c)):m.contains(u,c)||u.push(c)}return u},m.union=function(){return m.uniq(S(arguments,!0,!0))},m.intersection=function(n){for(var t=[],r=arguments.length,e=0,u=O(n);u>e;e++){var i=n[e];if(!m.contains(t,i)){for(var o=1;r>o&&m.contains(arguments[o],i);o++);o===r&&t.push(i)}}return t},m.difference=function(n){var t=S(arguments,!0,!0,1);return m.filter(n,function(n){return!m.contains(t,n)})},m.zip=function(){return m.unzip(arguments)},m.unzip=function(n){for(var t=n&&m.max(n,O).length||0,r=Array(t),e=0;t>e;e++)r[e]=m.pluck(n,e);return r},m.object=function(n,t){for(var r={},e=0,u=O(n);u>e;e++)t?r[n[e]]=t[e]:r[n[e][0]]=n[e][1];return r},m.findIndex=t(1),m.findLastIndex=t(-1),m.sortedIndex=function(n,t,r,e){r=x(r,e,1);for(var u=r(t),i=0,o=O(n);o>i;){var a=Math.floor((i+o)/2);r(n[a])<u?i=a+1:o=a}return i},m.indexOf=r(1,m.findIndex,m.sortedIndex),m.lastIndexOf=r(-1,m.findLastIndex),m.range=function(n,t,r){null==t&&(t=n||0,n=0),r=r||1;for(var e=Math.max(Math.ceil((t-n)/r),0),u=Array(e),i=0;e>i;i++,n+=r)u[i]=n;return u};var E=function(n,t,r,e,u){if(!(e instanceof t))return n.apply(r,u);var i=j(n.prototype),o=n.apply(i,u);return m.isObject(o)?o:i};m.bind=function(n,t){if(g&&n.bind===g)return g.apply(n,l.call(arguments,1));if(!m.isFunction(n))throw new TypeError("Bind must be called on a function");var r=l.call(arguments,2),e=function(){return E(n,e,t,this,r.concat(l.call(arguments)))};return e},m.partial=function(n){var t=l.call(arguments,1),r=function(){for(var e=0,u=t.length,i=Array(u),o=0;u>o;o++)i[o]=t[o]===m?arguments[e++]:t[o];for(;e<arguments.length;)i.push(arguments[e++]);return E(n,r,this,this,i)};return r},m.bindAll=function(n){var t,r,e=arguments.length;if(1>=e)throw new Error("bindAll must be passed function names");for(t=1;e>t;t++)r=arguments[t],n[r]=m.bind(n[r],n);return n},m.memoize=function(n,t){var r=function(e){var u=r.cache,i=""+(t?t.apply(this,arguments):e);return m.has(u,i)||(u[i]=n.apply(this,arguments)),u[i]};return r.cache={},r},m.delay=function(n,t){var r=l.call(arguments,2);return setTimeout(function(){return n.apply(null,r)},t)},m.defer=m.partial(m.delay,m,1),m.throttle=function(n,t,r){var e,u,i,o=null,a=0;r||(r={});var c=function(){a=r.leading===!1?0:m.now(),o=null,i=n.apply(e,u),o||(e=u=null)};return function(){var f=m.now();a||r.leading!==!1||(a=f);var l=t-(f-a);return e=this,u=arguments,0>=l||l>t?(o&&(clearTimeout(o),o=null),a=f,i=n.apply(e,u),o||(e=u=null)):o||r.trailing===!1||(o=setTimeout(c,l)),i}},m.debounce=function(n,t,r){var e,u,i,o,a,c=function(){var f=m.now()-o;t>f&&f>=0?e=setTimeout(c,t-f):(e=null,r||(a=n.apply(i,u),e||(i=u=null)))};return function(){i=this,u=arguments,o=m.now();var f=r&&!e;return e||(e=setTimeout(c,t)),f&&(a=n.apply(i,u),i=u=null),a}},m.wrap=function(n,t){return m.partial(t,n)},m.negate=function(n){return function(){return!n.apply(this,arguments)}},m.compose=function(){var n=arguments,t=n.length-1;return function(){for(var r=t,e=n[t].apply(this,arguments);r--;)e=n[r].call(this,e);return e}},m.after=function(n,t){return function(){return--n<1?t.apply(this,arguments):void 0}},m.before=function(n,t){var r;return function(){return--n>0&&(r=t.apply(this,arguments)),1>=n&&(t=null),r}},m.once=m.partial(m.before,2);var M=!{toString:null}.propertyIsEnumerable("toString"),I=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"];m.keys=function(n){if(!m.isObject(n))return[];if(v)return v(n);var t=[];for(var r in n)m.has(n,r)&&t.push(r);return M&&e(n,t),t},m.allKeys=function(n){if(!m.isObject(n))return[];var t=[];for(var r in n)t.push(r);return M&&e(n,t),t},m.values=function(n){for(var t=m.keys(n),r=t.length,e=Array(r),u=0;r>u;u++)e[u]=n[t[u]];return e},m.mapObject=function(n,t,r){t=x(t,r);for(var e,u=m.keys(n),i=u.length,o={},a=0;i>a;a++)e=u[a],o[e]=t(n[e],e,n);return o},m.pairs=function(n){for(var t=m.keys(n),r=t.length,e=Array(r),u=0;r>u;u++)e[u]=[t[u],n[t[u]]];return e},m.invert=function(n){for(var t={},r=m.keys(n),e=0,u=r.length;u>e;e++)t[n[r[e]]]=r[e];return t},m.functions=m.methods=function(n){var t=[];for(var r in n)m.isFunction(n[r])&&t.push(r);return t.sort()},m.extend=_(m.allKeys),m.extendOwn=m.assign=_(m.keys),m.findKey=function(n,t,r){t=x(t,r);for(var e,u=m.keys(n),i=0,o=u.length;o>i;i++)if(e=u[i],t(n[e],e,n))return e},m.pick=function(n,t,r){var e,u,i={},o=n;if(null==o)return i;m.isFunction(t)?(u=m.allKeys(o),e=b(t,r)):(u=S(arguments,!1,!1,1),e=function(n,t,r){return t in r},o=Object(o));for(var a=0,c=u.length;c>a;a++){var f=u[a],l=o[f];e(l,f,o)&&(i[f]=l)}return i},m.omit=function(n,t,r){if(m.isFunction(t))t=m.negate(t);else{var e=m.map(S(arguments,!1,!1,1),String);t=function(n,t){return!m.contains(e,t)}}return m.pick(n,t,r)},m.defaults=_(m.allKeys,!0),m.create=function(n,t){var r=j(n);return t&&m.extendOwn(r,t),r},m.clone=function(n){return m.isObject(n)?m.isArray(n)?n.slice():m.extend({},n):n},m.tap=function(n,t){return t(n),n},m.isMatch=function(n,t){var r=m.keys(t),e=r.length;if(null==n)return!e;for(var u=Object(n),i=0;e>i;i++){var o=r[i];if(t[o]!==u[o]||!(o in u))return!1}return!0};var N=function(n,t,r,e){if(n===t)return 0!==n||1/n===1/t;if(null==n||null==t)return n===t;n instanceof m&&(n=n._wrapped),t instanceof m&&(t=t._wrapped);var u=s.call(n);if(u!==s.call(t))return!1;switch(u){case"[object RegExp]":case"[object String]":return""+n==""+t;case"[object Number]":return+n!==+n?+t!==+t:0===+n?1/+n===1/t:+n===+t;case"[object Date]":case"[object Boolean]":return+n===+t}var i="[object Array]"===u;if(!i){if("object"!=typeof n||"object"!=typeof t)return!1;var o=n.constructor,a=t.constructor;if(o!==a&&!(m.isFunction(o)&&o instanceof o&&m.isFunction(a)&&a instanceof a)&&"constructor"in n&&"constructor"in t)return!1}r=r||[],e=e||[];for(var c=r.length;c--;)if(r[c]===n)return e[c]===t;if(r.push(n),e.push(t),i){if(c=n.length,c!==t.length)return!1;for(;c--;)if(!N(n[c],t[c],r,e))return!1}else{var f,l=m.keys(n);if(c=l.length,m.keys(t).length!==c)return!1;for(;c--;)if(f=l[c],!m.has(t,f)||!N(n[f],t[f],r,e))return!1}return r.pop(),e.pop(),!0};m.isEqual=function(n,t){return N(n,t)},m.isEmpty=function(n){return null==n?!0:k(n)&&(m.isArray(n)||m.isString(n)||m.isArguments(n))?0===n.length:0===m.keys(n).length},m.isElement=function(n){return!(!n||1!==n.nodeType)},m.isArray=h||function(n){return"[object Array]"===s.call(n)},m.isObject=function(n){var t=typeof n;return"function"===t||"object"===t&&!!n},m.each(["Arguments","Function","String","Number","Date","RegExp","Error"],function(n){m["is"+n]=function(t){return s.call(t)==="[object "+n+"]"}}),m.isArguments(arguments)||(m.isArguments=function(n){return m.has(n,"callee")}),"function"!=typeof/./&&"object"!=typeof Int8Array&&(m.isFunction=function(n){return"function"==typeof n||!1}),m.isFinite=function(n){return isFinite(n)&&!isNaN(parseFloat(n))},m.isNaN=function(n){return m.isNumber(n)&&n!==+n},m.isBoolean=function(n){return n===!0||n===!1||"[object Boolean]"===s.call(n)},m.isNull=function(n){return null===n},m.isUndefined=function(n){return n===void 0},m.has=function(n,t){return null!=n&&p.call(n,t)},m.noConflict=function(){return u._=i,this},m.identity=function(n){return n},m.constant=function(n){return function(){return n}},m.noop=function(){},m.property=w,m.propertyOf=function(n){return null==n?function(){}:function(t){return n[t]}},m.matcher=m.matches=function(n){return n=m.extendOwn({},n),function(t){return m.isMatch(t,n)}},m.times=function(n,t,r){var e=Array(Math.max(0,n));t=b(t,r,1);for(var u=0;n>u;u++)e[u]=t(u);return e},m.random=function(n,t){return null==t&&(t=n,n=0),n+Math.floor(Math.random()*(t-n+1))},m.now=Date.now||function(){return(new Date).getTime()};var B={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},T=m.invert(B),R=function(n){var t=function(t){return n[t]},r="(?:"+m.keys(n).join("|")+")",e=RegExp(r),u=RegExp(r,"g");return function(n){return n=null==n?"":""+n,e.test(n)?n.replace(u,t):n}};m.escape=R(B),m.unescape=R(T),m.result=function(n,t,r){var e=null==n?void 0:n[t];return e===void 0&&(e=r),m.isFunction(e)?e.call(n):e};var q=0;m.uniqueId=function(n){var t=++q+"";return n?n+t:t},m.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var K=/(.)^/,z={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},D=/\\|'|\r|\n|\u2028|\u2029/g,L=function(n){return"\\"+z[n]};m.template=function(n,t,r){!t&&r&&(t=r),t=m.defaults({},t,m.templateSettings);var e=RegExp([(t.escape||K).source,(t.interpolate||K).source,(t.evaluate||K).source].join("|")+"|$","g"),u=0,i="__p+='";n.replace(e,function(t,r,e,o,a){return i+=n.slice(u,a).replace(D,L),u=a+t.length,r?i+="'+\n((__t=("+r+"))==null?'':_.escape(__t))+\n'":e?i+="'+\n((__t=("+e+"))==null?'':__t)+\n'":o&&(i+="';\n"+o+"\n__p+='"),t}),i+="';\n",t.variable||(i="with(obj||{}){\n"+i+"}\n"),i="var __t,__p='',__j=Array.prototype.join,"+"print=function(){__p+=__j.call(arguments,'');};\n"+i+"return __p;\n";try{var o=new Function(t.variable||"obj","_",i)}catch(a){throw a.source=i,a}var c=function(n){return o.call(this,n,m)},f=t.variable||"obj";return c.source="function("+f+"){\n"+i+"}",c},m.chain=function(n){var t=m(n);return t._chain=!0,t};var P=function(n,t){return n._chain?m(t).chain():t};m.mixin=function(n){m.each(m.functions(n),function(t){var r=m[t]=n[t];m.prototype[t]=function(){var n=[this._wrapped];return f.apply(n,arguments),P(this,r.apply(m,n))}})},m.mixin(m),m.each(["pop","push","reverse","shift","sort","splice","unshift"],function(n){var t=o[n];m.prototype[n]=function(){var r=this._wrapped;return t.apply(r,arguments),"shift"!==n&&"splice"!==n||0!==r.length||delete r[0],P(this,r)}}),m.each(["concat","join","slice"],function(n){var t=o[n];m.prototype[n]=function(){return P(this,t.apply(this._wrapped,arguments))}}),m.prototype.value=function(){return this._wrapped},m.prototype.valueOf=m.prototype.toJSON=m.prototype.value,m.prototype.toString=function(){return""+this._wrapped},"function"==typeof define&&define.amd&&define("underscore",[],function(){return m})}).call(this);
+//# sourceMappingURL=underscore-min.map
\ No newline at end of file
diff --git a/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/underscore/underscore.js b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/underscore/underscore.js
new file mode 100644
index 0000000..bddfdc9
--- /dev/null
+++ b/views/ngXosViews/serviceGrid/src/vendor/lodash/vendor/underscore/underscore.js
@@ -0,0 +1,1620 @@
+// Underscore.js 1.8.3
+// http://underscorejs.org
+// (c) 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+// Underscore may be freely distributed under the MIT license.
+
+(function() {
+
+ // Baseline setup
+ // --------------
+
+ // Establish the root object, `window` (`self`) in the browser, `global`
+ // on the server, or `this` in some virtual machines. We use `self`
+ // instead of `window` for `WebWorker` support.
+ var root = typeof self == 'object' && self.self === self && self ||
+ typeof global == 'object' && global.global === global && global ||
+ this;
+
+ // Save the previous value of the `_` variable.
+ var previousUnderscore = root._;
+
+ // Save bytes in the minified (but not gzipped) version:
+ var ArrayProto = Array.prototype, ObjProto = Object.prototype;
+ var SymbolProto = typeof Symbol !== 'undefined' ? Symbol.prototype : null;
+
+ // Create quick reference variables for speed access to core prototypes.
+ var push = ArrayProto.push,
+ slice = ArrayProto.slice,
+ toString = ObjProto.toString,
+ hasOwnProperty = ObjProto.hasOwnProperty;
+
+ // All **ECMAScript 5** native function implementations that we hope to use
+ // are declared here.
+ var nativeIsArray = Array.isArray,
+ nativeKeys = Object.keys,
+ nativeCreate = Object.create;
+
+ // Naked function reference for surrogate-prototype-swapping.
+ var Ctor = function(){};
+
+ // Create a safe reference to the Underscore object for use below.
+ var _ = function(obj) {
+ if (obj instanceof _) return obj;
+ if (!(this instanceof _)) return new _(obj);
+ this._wrapped = obj;
+ };
+
+ // Export the Underscore object for **Node.js**, with
+ // backwards-compatibility for their old module API. If we're in
+ // the browser, add `_` as a global object.
+ // (`nodeType` is checked to ensure that `module`
+ // and `exports` are not HTML elements.)
+ if (typeof exports != 'undefined' && !exports.nodeType) {
+ if (typeof module != 'undefined' && !module.nodeType && module.exports) {
+ exports = module.exports = _;
+ }
+ exports._ = _;
+ } else {
+ root._ = _;
+ }
+
+ // Current version.
+ _.VERSION = '1.8.3';
+
+ // Internal function that returns an efficient (for current engines) version
+ // of the passed-in callback, to be repeatedly applied in other Underscore
+ // functions.
+ var optimizeCb = function(func, context, argCount) {
+ if (context === void 0) return func;
+ switch (argCount == null ? 3 : argCount) {
+ case 1: return function(value) {
+ return func.call(context, value);
+ };
+ // The 2-parameter case has been omitted only because no current consumers
+ // made use of it.
+ case 3: return function(value, index, collection) {
+ return func.call(context, value, index, collection);
+ };
+ case 4: return function(accumulator, value, index, collection) {
+ return func.call(context, accumulator, value, index, collection);
+ };
+ }
+ return function() {
+ return func.apply(context, arguments);
+ };
+ };
+
+ // An internal function to generate callbacks that can be applied to each
+ // element in a collection, returning the desired result — either `identity`,
+ // an arbitrary callback, a property matcher, or a property accessor.
+ var cb = function(value, context, argCount) {
+ if (value == null) return _.identity;
+ if (_.isFunction(value)) return optimizeCb(value, context, argCount);
+ if (_.isObject(value)) return _.matcher(value);
+ return _.property(value);
+ };
+
+ // An external wrapper for the internal callback generator.
+ _.iteratee = function(value, context) {
+ return cb(value, context, Infinity);
+ };
+
+ // Similar to ES6's rest param (http://ariya.ofilabs.com/2013/03/es6-and-rest-parameter.html)
+ // This accumulates the arguments passed into an array, after a given index.
+ var restArgs = function(func, startIndex) {
+ startIndex = startIndex == null ? func.length - 1 : +startIndex;
+ return function() {
+ var length = Math.max(arguments.length - startIndex, 0);
+ var rest = Array(length);
+ for (var index = 0; index < length; index++) {
+ rest[index] = arguments[index + startIndex];
+ }
+ switch (startIndex) {
+ case 0: return func.call(this, rest);
+ case 1: return func.call(this, arguments[0], rest);
+ case 2: return func.call(this, arguments[0], arguments[1], rest);
+ }
+ var args = Array(startIndex + 1);
+ for (index = 0; index < startIndex; index++) {
+ args[index] = arguments[index];
+ }
+ args[startIndex] = rest;
+ return func.apply(this, args);
+ };
+ };
+
+ // An internal function for creating a new object that inherits from another.
+ var baseCreate = function(prototype) {
+ if (!_.isObject(prototype)) return {};
+ if (nativeCreate) return nativeCreate(prototype);
+ Ctor.prototype = prototype;
+ var result = new Ctor;
+ Ctor.prototype = null;
+ return result;
+ };
+
+ var property = function(key) {
+ return function(obj) {
+ return obj == null ? void 0 : obj[key];
+ };
+ };
+
+ // Helper for collection methods to determine whether a collection
+ // should be iterated as an array or as an object.
+ // Related: http://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength
+ // Avoids a very nasty iOS 8 JIT bug on ARM-64. #2094
+ var MAX_ARRAY_INDEX = Math.pow(2, 53) - 1;
+ var getLength = property('length');
+ var isArrayLike = function(collection) {
+ var length = getLength(collection);
+ return typeof length == 'number' && length >= 0 && length <= MAX_ARRAY_INDEX;
+ };
+
+ // Collection Functions
+ // --------------------
+
+ // The cornerstone, an `each` implementation, aka `forEach`.
+ // Handles raw objects in addition to array-likes. Treats all
+ // sparse array-likes as if they were dense.
+ _.each = _.forEach = function(obj, iteratee, context) {
+ iteratee = optimizeCb(iteratee, context);
+ var i, length;
+ if (isArrayLike(obj)) {
+ for (i = 0, length = obj.length; i < length; i++) {
+ iteratee(obj[i], i, obj);
+ }
+ } else {
+ var keys = _.keys(obj);
+ for (i = 0, length = keys.length; i < length; i++) {
+ iteratee(obj[keys[i]], keys[i], obj);
+ }
+ }
+ return obj;
+ };
+
+ // Return the results of applying the iteratee to each element.
+ _.map = _.collect = function(obj, iteratee, context) {
+ iteratee = cb(iteratee, context);
+ var keys = !isArrayLike(obj) && _.keys(obj),
+ length = (keys || obj).length,
+ results = Array(length);
+ for (var index = 0; index < length; index++) {
+ var currentKey = keys ? keys[index] : index;
+ results[index] = iteratee(obj[currentKey], currentKey, obj);
+ }
+ return results;
+ };
+
+ // Create a reducing function iterating left or right.
+ var createReduce = function(dir) {
+ // Wrap code that reassigns argument variables in a separate function than
+ // the one that accesses `arguments.length` to avoid a perf hit. (#1991)
+ var reducer = function(obj, iteratee, memo, initial) {
+ var keys = !isArrayLike(obj) && _.keys(obj),
+ length = (keys || obj).length,
+ index = dir > 0 ? 0 : length - 1;
+ if (!initial) {
+ memo = obj[keys ? keys[index] : index];
+ index += dir;
+ }
+ for (; index >= 0 && index < length; index += dir) {
+ var currentKey = keys ? keys[index] : index;
+ memo = iteratee(memo, obj[currentKey], currentKey, obj);
+ }
+ return memo;
+ };
+
+ return function(obj, iteratee, memo, context) {
+ var initial = arguments.length >= 3;
+ return reducer(obj, optimizeCb(iteratee, context, 4), memo, initial);
+ };
+ };
+
+ // **Reduce** builds up a single result from a list of values, aka `inject`,
+ // or `foldl`.
+ _.reduce = _.foldl = _.inject = createReduce(1);
+
+ // The right-associative version of reduce, also known as `foldr`.
+ _.reduceRight = _.foldr = createReduce(-1);
+
+ // Return the first value which passes a truth test. Aliased as `detect`.
+ _.find = _.detect = function(obj, predicate, context) {
+ var keyFinder = isArrayLike(obj) ? _.findIndex : _.findKey;
+ var key = keyFinder(obj, predicate, context);
+ if (key !== void 0 && key !== -1) return obj[key];
+ };
+
+ // Return all the elements that pass a truth test.
+ // Aliased as `select`.
+ _.filter = _.select = function(obj, predicate, context) {
+ var results = [];
+ predicate = cb(predicate, context);
+ _.each(obj, function(value, index, list) {
+ if (predicate(value, index, list)) results.push(value);
+ });
+ return results;
+ };
+
+ // Return all the elements for which a truth test fails.
+ _.reject = function(obj, predicate, context) {
+ return _.filter(obj, _.negate(cb(predicate)), context);
+ };
+
+ // Determine whether all of the elements match a truth test.
+ // Aliased as `all`.
+ _.every = _.all = function(obj, predicate, context) {
+ predicate = cb(predicate, context);
+ var keys = !isArrayLike(obj) && _.keys(obj),
+ length = (keys || obj).length;
+ for (var index = 0; index < length; index++) {
+ var currentKey = keys ? keys[index] : index;
+ if (!predicate(obj[currentKey], currentKey, obj)) return false;
+ }
+ return true;
+ };
+
+ // Determine if at least one element in the object matches a truth test.
+ // Aliased as `any`.
+ _.some = _.any = function(obj, predicate, context) {
+ predicate = cb(predicate, context);
+ var keys = !isArrayLike(obj) && _.keys(obj),
+ length = (keys || obj).length;
+ for (var index = 0; index < length; index++) {
+ var currentKey = keys ? keys[index] : index;
+ if (predicate(obj[currentKey], currentKey, obj)) return true;
+ }
+ return false;
+ };
+
+ // Determine if the array or object contains a given item (using `===`).
+ // Aliased as `includes` and `include`.
+ _.contains = _.includes = _.include = function(obj, item, fromIndex, guard) {
+ if (!isArrayLike(obj)) obj = _.values(obj);
+ if (typeof fromIndex != 'number' || guard) fromIndex = 0;
+ return _.indexOf(obj, item, fromIndex) >= 0;
+ };
+
+ // Invoke a method (with arguments) on every item in a collection.
+ _.invoke = restArgs(function(obj, method, args) {
+ var isFunc = _.isFunction(method);
+ return _.map(obj, function(value) {
+ var func = isFunc ? method : value[method];
+ return func == null ? func : func.apply(value, args);
+ });
+ });
+
+ // Convenience version of a common use case of `map`: fetching a property.
+ _.pluck = function(obj, key) {
+ return _.map(obj, _.property(key));
+ };
+
+ // Convenience version of a common use case of `filter`: selecting only objects
+ // containing specific `key:value` pairs.
+ _.where = function(obj, attrs) {
+ return _.filter(obj, _.matcher(attrs));
+ };
+
+ // Convenience version of a common use case of `find`: getting the first object
+ // containing specific `key:value` pairs.
+ _.findWhere = function(obj, attrs) {
+ return _.find(obj, _.matcher(attrs));
+ };
+
+ // Return the maximum element (or element-based computation).
+ _.max = function(obj, iteratee, context) {
+ var result = -Infinity, lastComputed = -Infinity,
+ value, computed;
+ if (iteratee == null || (typeof iteratee == 'number' && typeof obj[0] != 'object') && obj != null) {
+ obj = isArrayLike(obj) ? obj : _.values(obj);
+ for (var i = 0, length = obj.length; i < length; i++) {
+ value = obj[i];
+ if (value != null && value > result) {
+ result = value;
+ }
+ }
+ } else {
+ iteratee = cb(iteratee, context);
+ _.each(obj, function(v, index, list) {
+ computed = iteratee(v, index, list);
+ if (computed > lastComputed || computed === -Infinity && result === -Infinity) {
+ result = v;
+ lastComputed = computed;
+ }
+ });
+ }
+ return result;
+ };
+
+ // Return the minimum element (or element-based computation).
+ _.min = function(obj, iteratee, context) {
+ var result = Infinity, lastComputed = Infinity,
+ value, computed;
+ if (iteratee == null || (typeof iteratee == 'number' && typeof obj[0] != 'object') && obj != null) {
+ obj = isArrayLike(obj) ? obj : _.values(obj);
+ for (var i = 0, length = obj.length; i < length; i++) {
+ value = obj[i];
+ if (value != null && value < result) {
+ result = value;
+ }
+ }
+ } else {
+ iteratee = cb(iteratee, context);
+ _.each(obj, function(v, index, list) {
+ computed = iteratee(v, index, list);
+ if (computed < lastComputed || computed === Infinity && result === Infinity) {
+ result = v;
+ lastComputed = computed;
+ }
+ });
+ }
+ return result;
+ };
+
+ // Shuffle a collection.
+ _.shuffle = function(obj) {
+ return _.sample(obj, Infinity);
+ };
+
+ // Sample **n** random values from a collection using the modern version of the
+ // [Fisher-Yates shuffle](http://en.wikipedia.org/wiki/Fisher–Yates_shuffle).
+ // If **n** is not specified, returns a single random element.
+ // The internal `guard` argument allows it to work with `map`.
+ _.sample = function(obj, n, guard) {
+ if (n == null || guard) {
+ if (!isArrayLike(obj)) obj = _.values(obj);
+ return obj[_.random(obj.length - 1)];
+ }
+ var sample = isArrayLike(obj) ? _.clone(obj) : _.values(obj);
+ var length = getLength(sample);
+ n = Math.max(Math.min(n, length), 0);
+ var last = length - 1;
+ for (var index = 0; index < n; index++) {
+ var rand = _.random(index, last);
+ var temp = sample[index];
+ sample[index] = sample[rand];
+ sample[rand] = temp;
+ }
+ return sample.slice(0, n);
+ };
+
+ // Sort the object's values by a criterion produced by an iteratee.
+ _.sortBy = function(obj, iteratee, context) {
+ var index = 0;
+ iteratee = cb(iteratee, context);
+ return _.pluck(_.map(obj, function(value, key, list) {
+ return {
+ value: value,
+ index: index++,
+ criteria: iteratee(value, key, list)
+ };
+ }).sort(function(left, right) {
+ var a = left.criteria;
+ var b = right.criteria;
+ if (a !== b) {
+ if (a > b || a === void 0) return 1;
+ if (a < b || b === void 0) return -1;
+ }
+ return left.index - right.index;
+ }), 'value');
+ };
+
+ // An internal function used for aggregate "group by" operations.
+ var group = function(behavior, partition) {
+ return function(obj, iteratee, context) {
+ var result = partition ? [[], []] : {};
+ iteratee = cb(iteratee, context);
+ _.each(obj, function(value, index) {
+ var key = iteratee(value, index, obj);
+ behavior(result, value, key);
+ });
+ return result;
+ };
+ };
+
+ // Groups the object's values by a criterion. Pass either a string attribute
+ // to group by, or a function that returns the criterion.
+ _.groupBy = group(function(result, value, key) {
+ if (_.has(result, key)) result[key].push(value); else result[key] = [value];
+ });
+
+ // Indexes the object's values by a criterion, similar to `groupBy`, but for
+ // when you know that your index values will be unique.
+ _.indexBy = group(function(result, value, key) {
+ result[key] = value;
+ });
+
+ // Counts instances of an object that group by a certain criterion. Pass
+ // either a string attribute to count by, or a function that returns the
+ // criterion.
+ _.countBy = group(function(result, value, key) {
+ if (_.has(result, key)) result[key]++; else result[key] = 1;
+ });
+
+ var reStrSymbol = /[^\ud800-\udfff]|[\ud800-\udbff][\udc00-\udfff]|[\ud800-\udfff]/g;
+ // Safely create a real, live array from anything iterable.
+ _.toArray = function(obj) {
+ if (!obj) return [];
+ if (_.isArray(obj)) return slice.call(obj);
+ if (_.isString(obj)) {
+ // Keep surrogate pair characters together
+ return obj.match(reStrSymbol);
+ }
+ if (isArrayLike(obj)) return _.map(obj);
+ return _.values(obj);
+ };
+
+ // Return the number of elements in an object.
+ _.size = function(obj) {
+ if (obj == null) return 0;
+ return isArrayLike(obj) ? obj.length : _.keys(obj).length;
+ };
+
+ // Split a collection into two arrays: one whose elements all satisfy the given
+ // predicate, and one whose elements all do not satisfy the predicate.
+ _.partition = group(function(result, value, pass) {
+ result[pass ? 0 : 1].push(value);
+ }, true);
+
+ // Array Functions
+ // ---------------
+
+ // Get the first element of an array. Passing **n** will return the first N
+ // values in the array. Aliased as `head` and `take`. The **guard** check
+ // allows it to work with `_.map`.
+ _.first = _.head = _.take = function(array, n, guard) {
+ if (array == null) return void 0;
+ if (n == null || guard) return array[0];
+ return _.initial(array, array.length - n);
+ };
+
+ // Returns everything but the last entry of the array. Especially useful on
+ // the arguments object. Passing **n** will return all the values in
+ // the array, excluding the last N.
+ _.initial = function(array, n, guard) {
+ return slice.call(array, 0, Math.max(0, array.length - (n == null || guard ? 1 : n)));
+ };
+
+ // Get the last element of an array. Passing **n** will return the last N
+ // values in the array.
+ _.last = function(array, n, guard) {
+ if (array == null) return void 0;
+ if (n == null || guard) return array[array.length - 1];
+ return _.rest(array, Math.max(0, array.length - n));
+ };
+
+ // Returns everything but the first entry of the array. Aliased as `tail` and `drop`.
+ // Especially useful on the arguments object. Passing an **n** will return
+ // the rest N values in the array.
+ _.rest = _.tail = _.drop = function(array, n, guard) {
+ return slice.call(array, n == null || guard ? 1 : n);
+ };
+
+ // Trim out all falsy values from an array.
+ _.compact = function(array) {
+ return _.filter(array);
+ };
+
+ // Internal implementation of a recursive `flatten` function.
+ var flatten = function(input, shallow, strict, output) {
+ output = output || [];
+ var idx = output.length;
+ for (var i = 0, length = getLength(input); i < length; i++) {
+ var value = input[i];
+ if (isArrayLike(value) && (_.isArray(value) || _.isArguments(value))) {
+ // Flatten current level of array or arguments object.
+ if (shallow) {
+ var j = 0, len = value.length;
+ while (j < len) output[idx++] = value[j++];
+ } else {
+ flatten(value, shallow, strict, output);
+ idx = output.length;
+ }
+ } else if (!strict) {
+ output[idx++] = value;
+ }
+ }
+ return output;
+ };
+
+ // Flatten out an array, either recursively (by default), or just one level.
+ _.flatten = function(array, shallow) {
+ return flatten(array, shallow, false);
+ };
+
+ // Return a version of the array that does not contain the specified value(s).
+ _.without = restArgs(function(array, otherArrays) {
+ return _.difference(array, otherArrays);
+ });
+
+ // Produce a duplicate-free version of the array. If the array has already
+ // been sorted, you have the option of using a faster algorithm.
+ // Aliased as `unique`.
+ _.uniq = _.unique = function(array, isSorted, iteratee, context) {
+ if (!_.isBoolean(isSorted)) {
+ context = iteratee;
+ iteratee = isSorted;
+ isSorted = false;
+ }
+ if (iteratee != null) iteratee = cb(iteratee, context);
+ var result = [];
+ var seen = [];
+ for (var i = 0, length = getLength(array); i < length; i++) {
+ var value = array[i],
+ computed = iteratee ? iteratee(value, i, array) : value;
+ if (isSorted) {
+ if (!i || seen !== computed) result.push(value);
+ seen = computed;
+ } else if (iteratee) {
+ if (!_.contains(seen, computed)) {
+ seen.push(computed);
+ result.push(value);
+ }
+ } else if (!_.contains(result, value)) {
+ result.push(value);
+ }
+ }
+ return result;
+ };
+
+ // Produce an array that contains the union: each distinct element from all of
+ // the passed-in arrays.
+ _.union = restArgs(function(arrays) {
+ return _.uniq(flatten(arrays, true, true));
+ });
+
+ // Produce an array that contains every item shared between all the
+ // passed-in arrays.
+ _.intersection = function(array) {
+ var result = [];
+ var argsLength = arguments.length;
+ for (var i = 0, length = getLength(array); i < length; i++) {
+ var item = array[i];
+ if (_.contains(result, item)) continue;
+ var j;
+ for (j = 1; j < argsLength; j++) {
+ if (!_.contains(arguments[j], item)) break;
+ }
+ if (j === argsLength) result.push(item);
+ }
+ return result;
+ };
+
+ // Take the difference between one array and a number of other arrays.
+ // Only the elements present in just the first array will remain.
+ _.difference = restArgs(function(array, rest) {
+ rest = flatten(rest, true, true);
+ return _.filter(array, function(value){
+ return !_.contains(rest, value);
+ });
+ });
+
+ // Complement of _.zip. Unzip accepts an array of arrays and groups
+ // each array's elements on shared indices.
+ _.unzip = function(array) {
+ var length = array && _.max(array, getLength).length || 0;
+ var result = Array(length);
+
+ for (var index = 0; index < length; index++) {
+ result[index] = _.pluck(array, index);
+ }
+ return result;
+ };
+
+ // Zip together multiple lists into a single array -- elements that share
+ // an index go together.
+ _.zip = restArgs(_.unzip);
+
+ // Converts lists into objects. Pass either a single array of `[key, value]`
+ // pairs, or two parallel arrays of the same length -- one of keys, and one of
+ // the corresponding values.
+ _.object = function(list, values) {
+ var result = {};
+ for (var i = 0, length = getLength(list); i < length; i++) {
+ if (values) {
+ result[list[i]] = values[i];
+ } else {
+ result[list[i][0]] = list[i][1];
+ }
+ }
+ return result;
+ };
+
+ // Generator function to create the findIndex and findLastIndex functions.
+ var createPredicateIndexFinder = function(dir) {
+ return function(array, predicate, context) {
+ predicate = cb(predicate, context);
+ var length = getLength(array);
+ var index = dir > 0 ? 0 : length - 1;
+ for (; index >= 0 && index < length; index += dir) {
+ if (predicate(array[index], index, array)) return index;
+ }
+ return -1;
+ };
+ };
+
+ // Returns the first index on an array-like that passes a predicate test.
+ _.findIndex = createPredicateIndexFinder(1);
+ _.findLastIndex = createPredicateIndexFinder(-1);
+
+ // Use a comparator function to figure out the smallest index at which
+ // an object should be inserted so as to maintain order. Uses binary search.
+ _.sortedIndex = function(array, obj, iteratee, context) {
+ iteratee = cb(iteratee, context, 1);
+ var value = iteratee(obj);
+ var low = 0, high = getLength(array);
+ while (low < high) {
+ var mid = Math.floor((low + high) / 2);
+ if (iteratee(array[mid]) < value) low = mid + 1; else high = mid;
+ }
+ return low;
+ };
+
+ // Generator function to create the indexOf and lastIndexOf functions.
+ var createIndexFinder = function(dir, predicateFind, sortedIndex) {
+ return function(array, item, idx) {
+ var i = 0, length = getLength(array);
+ if (typeof idx == 'number') {
+ if (dir > 0) {
+ i = idx >= 0 ? idx : Math.max(idx + length, i);
+ } else {
+ length = idx >= 0 ? Math.min(idx + 1, length) : idx + length + 1;
+ }
+ } else if (sortedIndex && idx && length) {
+ idx = sortedIndex(array, item);
+ return array[idx] === item ? idx : -1;
+ }
+ if (item !== item) {
+ idx = predicateFind(slice.call(array, i, length), _.isNaN);
+ return idx >= 0 ? idx + i : -1;
+ }
+ for (idx = dir > 0 ? i : length - 1; idx >= 0 && idx < length; idx += dir) {
+ if (array[idx] === item) return idx;
+ }
+ return -1;
+ };
+ };
+
+ // Return the position of the first occurrence of an item in an array,
+ // or -1 if the item is not included in the array.
+ // If the array is large and already in sort order, pass `true`
+ // for **isSorted** to use binary search.
+ _.indexOf = createIndexFinder(1, _.findIndex, _.sortedIndex);
+ _.lastIndexOf = createIndexFinder(-1, _.findLastIndex);
+
+ // Generate an integer Array containing an arithmetic progression. A port of
+ // the native Python `range()` function. See
+ // [the Python documentation](http://docs.python.org/library/functions.html#range).
+ _.range = function(start, stop, step) {
+ if (stop == null) {
+ stop = start || 0;
+ start = 0;
+ }
+ if (!step) {
+ step = stop < start ? -1 : 1;
+ }
+
+ var length = Math.max(Math.ceil((stop - start) / step), 0);
+ var range = Array(length);
+
+ for (var idx = 0; idx < length; idx++, start += step) {
+ range[idx] = start;
+ }
+
+ return range;
+ };
+
+ // Split an **array** into several arrays containing **count** or less elements
+ // of initial array.
+ _.chunk = function(array, count) {
+ if (count == null || count < 1) return [];
+
+ var result = [];
+ var i = 0, length = array.length;
+ while (i < length) {
+ result.push(slice.call(array, i, i += count));
+ }
+ return result;
+ };
+
+ // Function (ahem) Functions
+ // ------------------
+
+ // Determines whether to execute a function as a constructor
+ // or a normal function with the provided arguments.
+ var executeBound = function(sourceFunc, boundFunc, context, callingContext, args) {
+ if (!(callingContext instanceof boundFunc)) return sourceFunc.apply(context, args);
+ var self = baseCreate(sourceFunc.prototype);
+ var result = sourceFunc.apply(self, args);
+ if (_.isObject(result)) return result;
+ return self;
+ };
+
+ // Create a function bound to a given object (assigning `this`, and arguments,
+ // optionally). Delegates to **ECMAScript 5**'s native `Function.bind` if
+ // available.
+ _.bind = restArgs(function(func, context, args) {
+ if (!_.isFunction(func)) throw new TypeError('Bind must be called on a function');
+ var bound = restArgs(function(callArgs) {
+ return executeBound(func, bound, context, this, args.concat(callArgs));
+ });
+ return bound;
+ });
+
+ // Partially apply a function by creating a version that has had some of its
+ // arguments pre-filled, without changing its dynamic `this` context. _ acts
+ // as a placeholder by default, allowing any combination of arguments to be
+ // pre-filled. Set `_.partial.placeholder` for a custom placeholder argument.
+ _.partial = restArgs(function(func, boundArgs) {
+ var placeholder = _.partial.placeholder;
+ var bound = function() {
+ var position = 0, length = boundArgs.length;
+ var args = Array(length);
+ for (var i = 0; i < length; i++) {
+ args[i] = boundArgs[i] === placeholder ? arguments[position++] : boundArgs[i];
+ }
+ while (position < arguments.length) args.push(arguments[position++]);
+ return executeBound(func, bound, this, this, args);
+ };
+ return bound;
+ });
+
+ _.partial.placeholder = _;
+
+ // Bind a number of an object's methods to that object. Remaining arguments
+ // are the method names to be bound. Useful for ensuring that all callbacks
+ // defined on an object belong to it.
+ _.bindAll = restArgs(function(obj, keys) {
+ keys = flatten(keys, false, false);
+ var index = keys.length;
+ if (index < 1) throw new Error('bindAll must be passed function names');
+ while (index--) {
+ var key = keys[index];
+ obj[key] = _.bind(obj[key], obj);
+ }
+ });
+
+ // Memoize an expensive function by storing its results.
+ _.memoize = function(func, hasher) {
+ var memoize = function(key) {
+ var cache = memoize.cache;
+ var address = '' + (hasher ? hasher.apply(this, arguments) : key);
+ if (!_.has(cache, address)) cache[address] = func.apply(this, arguments);
+ return cache[address];
+ };
+ memoize.cache = {};
+ return memoize;
+ };
+
+ // Delays a function for the given number of milliseconds, and then calls
+ // it with the arguments supplied.
+ _.delay = restArgs(function(func, wait, args) {
+ return setTimeout(function() {
+ return func.apply(null, args);
+ }, wait);
+ });
+
+ // Defers a function, scheduling it to run after the current call stack has
+ // cleared.
+ _.defer = _.partial(_.delay, _, 1);
+
+ // Returns a function, that, when invoked, will only be triggered at most once
+ // during a given window of time. Normally, the throttled function will run
+ // as much as it can, without ever going more than once per `wait` duration;
+ // but if you'd like to disable the execution on the leading edge, pass
+ // `{leading: false}`. To disable execution on the trailing edge, ditto.
+ _.throttle = function(func, wait, options) {
+ var timeout, context, args, result;
+ var previous = 0;
+ if (!options) options = {};
+
+ var later = function() {
+ previous = options.leading === false ? 0 : _.now();
+ timeout = null;
+ result = func.apply(context, args);
+ if (!timeout) context = args = null;
+ };
+
+ var throttled = function() {
+ var now = _.now();
+ if (!previous && options.leading === false) previous = now;
+ var remaining = wait - (now - previous);
+ context = this;
+ args = arguments;
+ if (remaining <= 0 || remaining > wait) {
+ if (timeout) {
+ clearTimeout(timeout);
+ timeout = null;
+ }
+ previous = now;
+ result = func.apply(context, args);
+ if (!timeout) context = args = null;
+ } else if (!timeout && options.trailing !== false) {
+ timeout = setTimeout(later, remaining);
+ }
+ return result;
+ };
+
+ throttled.cancel = function() {
+ clearTimeout(timeout);
+ previous = 0;
+ timeout = context = args = null;
+ };
+
+ return throttled;
+ };
+
+ // Returns a function, that, as long as it continues to be invoked, will not
+ // be triggered. The function will be called after it stops being called for
+ // N milliseconds. If `immediate` is passed, trigger the function on the
+ // leading edge, instead of the trailing.
+ _.debounce = function(func, wait, immediate) {
+ var timeout, result;
+
+ var later = function(context, args) {
+ timeout = null;
+ if (args) result = func.apply(context, args);
+ };
+
+ var debounced = restArgs(function(args) {
+ if (timeout) clearTimeout(timeout);
+ if (immediate) {
+ var callNow = !timeout;
+ timeout = setTimeout(later, wait);
+ if (callNow) result = func.apply(this, args);
+ } else {
+ timeout = _.delay(later, wait, this, args);
+ }
+
+ return result;
+ });
+
+ debounced.cancel = function() {
+ clearTimeout(timeout);
+ timeout = null;
+ };
+
+ return debounced;
+ };
+
+ // Returns the first function passed as an argument to the second,
+ // allowing you to adjust arguments, run code before and after, and
+ // conditionally execute the original function.
+ _.wrap = function(func, wrapper) {
+ return _.partial(wrapper, func);
+ };
+
+ // Returns a negated version of the passed-in predicate.
+ _.negate = function(predicate) {
+ return function() {
+ return !predicate.apply(this, arguments);
+ };
+ };
+
+ // Returns a function that is the composition of a list of functions, each
+ // consuming the return value of the function that follows.
+ _.compose = function() {
+ var args = arguments;
+ var start = args.length - 1;
+ return function() {
+ var i = start;
+ var result = args[start].apply(this, arguments);
+ while (i--) result = args[i].call(this, result);
+ return result;
+ };
+ };
+
+ // Returns a function that will only be executed on and after the Nth call.
+ _.after = function(times, func) {
+ return function() {
+ if (--times < 1) {
+ return func.apply(this, arguments);
+ }
+ };
+ };
+
+ // Returns a function that will only be executed up to (but not including) the Nth call.
+ _.before = function(times, func) {
+ var memo;
+ return function() {
+ if (--times > 0) {
+ memo = func.apply(this, arguments);
+ }
+ if (times <= 1) func = null;
+ return memo;
+ };
+ };
+
+ // Returns a function that will be executed at most one time, no matter how
+ // often you call it. Useful for lazy initialization.
+ _.once = _.partial(_.before, 2);
+
+ _.restArgs = restArgs;
+
+ // Object Functions
+ // ----------------
+
+ // Keys in IE < 9 that won't be iterated by `for key in ...` and thus missed.
+ var hasEnumBug = !{toString: null}.propertyIsEnumerable('toString');
+ var nonEnumerableProps = ['valueOf', 'isPrototypeOf', 'toString',
+ 'propertyIsEnumerable', 'hasOwnProperty', 'toLocaleString'];
+
+ var collectNonEnumProps = function(obj, keys) {
+ var nonEnumIdx = nonEnumerableProps.length;
+ var constructor = obj.constructor;
+ var proto = _.isFunction(constructor) && constructor.prototype || ObjProto;
+
+ // Constructor is a special case.
+ var prop = 'constructor';
+ if (_.has(obj, prop) && !_.contains(keys, prop)) keys.push(prop);
+
+ while (nonEnumIdx--) {
+ prop = nonEnumerableProps[nonEnumIdx];
+ if (prop in obj && obj[prop] !== proto[prop] && !_.contains(keys, prop)) {
+ keys.push(prop);
+ }
+ }
+ };
+
+ // Retrieve the names of an object's own properties.
+ // Delegates to **ECMAScript 5**'s native `Object.keys`.
+ _.keys = function(obj) {
+ if (!_.isObject(obj)) return [];
+ if (nativeKeys) return nativeKeys(obj);
+ var keys = [];
+ for (var key in obj) if (_.has(obj, key)) keys.push(key);
+ // Ahem, IE < 9.
+ if (hasEnumBug) collectNonEnumProps(obj, keys);
+ return keys;
+ };
+
+ // Retrieve all the property names of an object.
+ _.allKeys = function(obj) {
+ if (!_.isObject(obj)) return [];
+ var keys = [];
+ for (var key in obj) keys.push(key);
+ // Ahem, IE < 9.
+ if (hasEnumBug) collectNonEnumProps(obj, keys);
+ return keys;
+ };
+
+ // Retrieve the values of an object's properties.
+ _.values = function(obj) {
+ var keys = _.keys(obj);
+ var length = keys.length;
+ var values = Array(length);
+ for (var i = 0; i < length; i++) {
+ values[i] = obj[keys[i]];
+ }
+ return values;
+ };
+
+ // Returns the results of applying the iteratee to each element of the object.
+ // In contrast to _.map it returns an object.
+ _.mapObject = function(obj, iteratee, context) {
+ iteratee = cb(iteratee, context);
+ var keys = _.keys(obj),
+ length = keys.length,
+ results = {};
+ for (var index = 0; index < length; index++) {
+ var currentKey = keys[index];
+ results[currentKey] = iteratee(obj[currentKey], currentKey, obj);
+ }
+ return results;
+ };
+
+ // Convert an object into a list of `[key, value]` pairs.
+ _.pairs = function(obj) {
+ var keys = _.keys(obj);
+ var length = keys.length;
+ var pairs = Array(length);
+ for (var i = 0; i < length; i++) {
+ pairs[i] = [keys[i], obj[keys[i]]];
+ }
+ return pairs;
+ };
+
+ // Invert the keys and values of an object. The values must be serializable.
+ _.invert = function(obj) {
+ var result = {};
+ var keys = _.keys(obj);
+ for (var i = 0, length = keys.length; i < length; i++) {
+ result[obj[keys[i]]] = keys[i];
+ }
+ return result;
+ };
+
+ // Return a sorted list of the function names available on the object.
+ // Aliased as `methods`.
+ _.functions = _.methods = function(obj) {
+ var names = [];
+ for (var key in obj) {
+ if (_.isFunction(obj[key])) names.push(key);
+ }
+ return names.sort();
+ };
+
+ // An internal function for creating assigner functions.
+ var createAssigner = function(keysFunc, defaults) {
+ return function(obj) {
+ var length = arguments.length;
+ if (defaults) obj = Object(obj);
+ if (length < 2 || obj == null) return obj;
+ for (var index = 1; index < length; index++) {
+ var source = arguments[index],
+ keys = keysFunc(source),
+ l = keys.length;
+ for (var i = 0; i < l; i++) {
+ var key = keys[i];
+ if (!defaults || obj[key] === void 0) obj[key] = source[key];
+ }
+ }
+ return obj;
+ };
+ };
+
+ // Extend a given object with all the properties in passed-in object(s).
+ _.extend = createAssigner(_.allKeys);
+
+ // Assigns a given object with all the own properties in the passed-in object(s).
+ // (https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/assign)
+ _.extendOwn = _.assign = createAssigner(_.keys);
+
+ // Returns the first key on an object that passes a predicate test.
+ _.findKey = function(obj, predicate, context) {
+ predicate = cb(predicate, context);
+ var keys = _.keys(obj), key;
+ for (var i = 0, length = keys.length; i < length; i++) {
+ key = keys[i];
+ if (predicate(obj[key], key, obj)) return key;
+ }
+ };
+
+ // Internal pick helper function to determine if `obj` has key `key`.
+ var keyInObj = function(value, key, obj) {
+ return key in obj;
+ };
+
+ // Return a copy of the object only containing the whitelisted properties.
+ _.pick = restArgs(function(obj, keys) {
+ var result = {}, iteratee = keys[0];
+ if (obj == null) return result;
+ if (_.isFunction(iteratee)) {
+ if (keys.length > 1) iteratee = optimizeCb(iteratee, keys[1]);
+ keys = _.allKeys(obj);
+ } else {
+ iteratee = keyInObj;
+ keys = flatten(keys, false, false);
+ obj = Object(obj);
+ }
+ for (var i = 0, length = keys.length; i < length; i++) {
+ var key = keys[i];
+ var value = obj[key];
+ if (iteratee(value, key, obj)) result[key] = value;
+ }
+ return result;
+ });
+
+ // Return a copy of the object without the blacklisted properties.
+ _.omit = restArgs(function(obj, keys) {
+ var iteratee = keys[0], context;
+ if (_.isFunction(iteratee)) {
+ iteratee = _.negate(iteratee);
+ if (keys.length > 1) context = keys[1];
+ } else {
+ keys = _.map(flatten(keys, false, false), String);
+ iteratee = function(value, key) {
+ return !_.contains(keys, key);
+ };
+ }
+ return _.pick(obj, iteratee, context);
+ });
+
+ // Fill in a given object with default properties.
+ _.defaults = createAssigner(_.allKeys, true);
+
+ // Creates an object that inherits from the given prototype object.
+ // If additional properties are provided then they will be added to the
+ // created object.
+ _.create = function(prototype, props) {
+ var result = baseCreate(prototype);
+ if (props) _.extendOwn(result, props);
+ return result;
+ };
+
+ // Create a (shallow-cloned) duplicate of an object.
+ _.clone = function(obj) {
+ if (!_.isObject(obj)) return obj;
+ return _.isArray(obj) ? obj.slice() : _.extend({}, obj);
+ };
+
+ // Invokes interceptor with the obj, and then returns obj.
+ // The primary purpose of this method is to "tap into" a method chain, in
+ // order to perform operations on intermediate results within the chain.
+ _.tap = function(obj, interceptor) {
+ interceptor(obj);
+ return obj;
+ };
+
+ // Returns whether an object has a given set of `key:value` pairs.
+ _.isMatch = function(object, attrs) {
+ var keys = _.keys(attrs), length = keys.length;
+ if (object == null) return !length;
+ var obj = Object(object);
+ for (var i = 0; i < length; i++) {
+ var key = keys[i];
+ if (attrs[key] !== obj[key] || !(key in obj)) return false;
+ }
+ return true;
+ };
+
+
+ // Internal recursive comparison function for `isEqual`.
+ var eq, deepEq;
+ eq = function(a, b, aStack, bStack) {
+ // Identical objects are equal. `0 === -0`, but they aren't identical.
+ // See the [Harmony `egal` proposal](http://wiki.ecmascript.org/doku.php?id=harmony:egal).
+ if (a === b) return a !== 0 || 1 / a === 1 / b;
+ // A strict comparison is necessary because `null == undefined`.
+ if (a == null || b == null) return a === b;
+ // `NaN`s are equivalent, but non-reflexive.
+ if (a !== a) return b !== b;
+ // Exhaust primitive checks
+ var type = typeof a;
+ if (type !== 'function' && type !== 'object' && typeof b != 'object') return false;
+ return deepEq(a, b, aStack, bStack);
+ };
+
+ // Internal recursive comparison function for `isEqual`.
+ deepEq = function(a, b, aStack, bStack) {
+ // Unwrap any wrapped objects.
+ if (a instanceof _) a = a._wrapped;
+ if (b instanceof _) b = b._wrapped;
+ // Compare `[[Class]]` names.
+ var className = toString.call(a);
+ if (className !== toString.call(b)) return false;
+ switch (className) {
+ // Strings, numbers, regular expressions, dates, and booleans are compared by value.
+ case '[object RegExp]':
+ // RegExps are coerced to strings for comparison (Note: '' + /a/i === '/a/i')
+ case '[object String]':
+ // Primitives and their corresponding object wrappers are equivalent; thus, `"5"` is
+ // equivalent to `new String("5")`.
+ return '' + a === '' + b;
+ case '[object Number]':
+ // `NaN`s are equivalent, but non-reflexive.
+ // Object(NaN) is equivalent to NaN.
+ if (+a !== +a) return +b !== +b;
+ // An `egal` comparison is performed for other numeric values.
+ return +a === 0 ? 1 / +a === 1 / b : +a === +b;
+ case '[object Date]':
+ case '[object Boolean]':
+ // Coerce dates and booleans to numeric primitive values. Dates are compared by their
+ // millisecond representations. Note that invalid dates with millisecond representations
+ // of `NaN` are not equivalent.
+ return +a === +b;
+ case '[object Symbol]':
+ return SymbolProto.valueOf.call(a) === SymbolProto.valueOf.call(b);
+ }
+
+ var areArrays = className === '[object Array]';
+ if (!areArrays) {
+ if (typeof a != 'object' || typeof b != 'object') return false;
+
+ // Objects with different constructors are not equivalent, but `Object`s or `Array`s
+ // from different frames are.
+ var aCtor = a.constructor, bCtor = b.constructor;
+ if (aCtor !== bCtor && !(_.isFunction(aCtor) && aCtor instanceof aCtor &&
+ _.isFunction(bCtor) && bCtor instanceof bCtor)
+ && ('constructor' in a && 'constructor' in b)) {
+ return false;
+ }
+ }
+ // Assume equality for cyclic structures. The algorithm for detecting cyclic
+ // structures is adapted from ES 5.1 section 15.12.3, abstract operation `JO`.
+
+ // Initializing stack of traversed objects.
+ // It's done here since we only need them for objects and arrays comparison.
+ aStack = aStack || [];
+ bStack = bStack || [];
+ var length = aStack.length;
+ while (length--) {
+ // Linear search. Performance is inversely proportional to the number of
+ // unique nested structures.
+ if (aStack[length] === a) return bStack[length] === b;
+ }
+
+ // Add the first object to the stack of traversed objects.
+ aStack.push(a);
+ bStack.push(b);
+
+ // Recursively compare objects and arrays.
+ if (areArrays) {
+ // Compare array lengths to determine if a deep comparison is necessary.
+ length = a.length;
+ if (length !== b.length) return false;
+ // Deep compare the contents, ignoring non-numeric properties.
+ while (length--) {
+ if (!eq(a[length], b[length], aStack, bStack)) return false;
+ }
+ } else {
+ // Deep compare objects.
+ var keys = _.keys(a), key;
+ length = keys.length;
+ // Ensure that both objects contain the same number of properties before comparing deep equality.
+ if (_.keys(b).length !== length) return false;
+ while (length--) {
+ // Deep compare each member
+ key = keys[length];
+ if (!(_.has(b, key) && eq(a[key], b[key], aStack, bStack))) return false;
+ }
+ }
+ // Remove the first object from the stack of traversed objects.
+ aStack.pop();
+ bStack.pop();
+ return true;
+ };
+
+ // Perform a deep comparison to check if two objects are equal.
+ _.isEqual = function(a, b) {
+ return eq(a, b);
+ };
+
+ // Is a given array, string, or object empty?
+ // An "empty" object has no enumerable own-properties.
+ _.isEmpty = function(obj) {
+ if (obj == null) return true;
+ if (isArrayLike(obj) && (_.isArray(obj) || _.isString(obj) || _.isArguments(obj))) return obj.length === 0;
+ return _.keys(obj).length === 0;
+ };
+
+ // Is a given value a DOM element?
+ _.isElement = function(obj) {
+ return !!(obj && obj.nodeType === 1);
+ };
+
+ // Is a given value an array?
+ // Delegates to ECMA5's native Array.isArray
+ _.isArray = nativeIsArray || function(obj) {
+ return toString.call(obj) === '[object Array]';
+ };
+
+ // Is a given variable an object?
+ _.isObject = function(obj) {
+ var type = typeof obj;
+ return type === 'function' || type === 'object' && !!obj;
+ };
+
+ // Add some isType methods: isArguments, isFunction, isString, isNumber, isDate, isRegExp, isError, isMap, isWeakMap, isSet, isWeakSet.
+ _.each(['Arguments', 'Function', 'String', 'Number', 'Date', 'RegExp', 'Error', 'Symbol', 'Map', 'WeakMap', 'Set', 'WeakSet'], function(name) {
+ _['is' + name] = function(obj) {
+ return toString.call(obj) === '[object ' + name + ']';
+ };
+ });
+
+ // Define a fallback version of the method in browsers (ahem, IE < 9), where
+ // there isn't any inspectable "Arguments" type.
+ if (!_.isArguments(arguments)) {
+ _.isArguments = function(obj) {
+ return _.has(obj, 'callee');
+ };
+ }
+
+ // Optimize `isFunction` if appropriate. Work around some typeof bugs in old v8,
+ // IE 11 (#1621), Safari 8 (#1929), and PhantomJS (#2236).
+ var nodelist = root.document && root.document.childNodes;
+ if (typeof /./ != 'function' && typeof Int8Array != 'object' && typeof nodelist != 'function') {
+ _.isFunction = function(obj) {
+ return typeof obj == 'function' || false;
+ };
+ }
+
+ // Is a given object a finite number?
+ _.isFinite = function(obj) {
+ return !_.isSymbol(obj) && isFinite(obj) && !isNaN(parseFloat(obj));
+ };
+
+ // Is the given value `NaN`?
+ _.isNaN = function(obj) {
+ return _.isNumber(obj) && isNaN(obj);
+ };
+
+ // Is a given value a boolean?
+ _.isBoolean = function(obj) {
+ return obj === true || obj === false || toString.call(obj) === '[object Boolean]';
+ };
+
+ // Is a given value equal to null?
+ _.isNull = function(obj) {
+ return obj === null;
+ };
+
+ // Is a given variable undefined?
+ _.isUndefined = function(obj) {
+ return obj === void 0;
+ };
+
+ // Shortcut function for checking if an object has a given property directly
+ // on itself (in other words, not on a prototype).
+ _.has = function(obj, key) {
+ return obj != null && hasOwnProperty.call(obj, key);
+ };
+
+ // Utility Functions
+ // -----------------
+
+ // Run Underscore.js in *noConflict* mode, returning the `_` variable to its
+ // previous owner. Returns a reference to the Underscore object.
+ _.noConflict = function() {
+ root._ = previousUnderscore;
+ return this;
+ };
+
+ // Keep the identity function around for default iteratees.
+ _.identity = function(value) {
+ return value;
+ };
+
+ // Predicate-generating functions. Often useful outside of Underscore.
+ _.constant = function(value) {
+ return function() {
+ return value;
+ };
+ };
+
+ _.noop = function(){};
+
+ _.property = property;
+
+ // Generates a function for a given object that returns a given property.
+ _.propertyOf = function(obj) {
+ return obj == null ? function(){} : function(key) {
+ return obj[key];
+ };
+ };
+
+ // Returns a predicate for checking whether an object has a given set of
+ // `key:value` pairs.
+ _.matcher = _.matches = function(attrs) {
+ attrs = _.extendOwn({}, attrs);
+ return function(obj) {
+ return _.isMatch(obj, attrs);
+ };
+ };
+
+ // Run a function **n** times.
+ _.times = function(n, iteratee, context) {
+ var accum = Array(Math.max(0, n));
+ iteratee = optimizeCb(iteratee, context, 1);
+ for (var i = 0; i < n; i++) accum[i] = iteratee(i);
+ return accum;
+ };
+
+ // Return a random integer between min and max (inclusive).
+ _.random = function(min, max) {
+ if (max == null) {
+ max = min;
+ min = 0;
+ }
+ return min + Math.floor(Math.random() * (max - min + 1));
+ };
+
+ // A (possibly faster) way to get the current timestamp as an integer.
+ _.now = Date.now || function() {
+ return new Date().getTime();
+ };
+
+ // List of HTML entities for escaping.
+ var escapeMap = {
+ '&': '&',
+ '<': '<',
+ '>': '>',
+ '"': '"',
+ "'": ''',
+ '`': '`'
+ };
+ var unescapeMap = _.invert(escapeMap);
+
+ // Functions for escaping and unescaping strings to/from HTML interpolation.
+ var createEscaper = function(map) {
+ var escaper = function(match) {
+ return map[match];
+ };
+ // Regexes for identifying a key that needs to be escaped.
+ var source = '(?:' + _.keys(map).join('|') + ')';
+ var testRegexp = RegExp(source);
+ var replaceRegexp = RegExp(source, 'g');
+ return function(string) {
+ string = string == null ? '' : '' + string;
+ return testRegexp.test(string) ? string.replace(replaceRegexp, escaper) : string;
+ };
+ };
+ _.escape = createEscaper(escapeMap);
+ _.unescape = createEscaper(unescapeMap);
+
+ // If the value of the named `property` is a function then invoke it with the
+ // `object` as context; otherwise, return it.
+ _.result = function(object, prop, fallback) {
+ var value = object == null ? void 0 : object[prop];
+ if (value === void 0) {
+ value = fallback;
+ }
+ return _.isFunction(value) ? value.call(object) : value;
+ };
+
+ // Generate a unique integer id (unique within the entire client session).
+ // Useful for temporary DOM ids.
+ var idCounter = 0;
+ _.uniqueId = function(prefix) {
+ var id = ++idCounter + '';
+ return prefix ? prefix + id : id;
+ };
+
+ // By default, Underscore uses ERB-style template delimiters, change the
+ // following template settings to use alternative delimiters.
+ _.templateSettings = {
+ evaluate: /<%([\s\S]+?)%>/g,
+ interpolate: /<%=([\s\S]+?)%>/g,
+ escape: /<%-([\s\S]+?)%>/g
+ };
+
+ // When customizing `templateSettings`, if you don't want to define an
+ // interpolation, evaluation or escaping regex, we need one that is
+ // guaranteed not to match.
+ var noMatch = /(.)^/;
+
+ // Certain characters need to be escaped so that they can be put into a
+ // string literal.
+ var escapes = {
+ "'": "'",
+ '\\': '\\',
+ '\r': 'r',
+ '\n': 'n',
+ '\u2028': 'u2028',
+ '\u2029': 'u2029'
+ };
+
+ var escapeRegExp = /\\|'|\r|\n|\u2028|\u2029/g;
+
+ var escapeChar = function(match) {
+ return '\\' + escapes[match];
+ };
+
+ // JavaScript micro-templating, similar to John Resig's implementation.
+ // Underscore templating handles arbitrary delimiters, preserves whitespace,
+ // and correctly escapes quotes within interpolated code.
+ // NB: `oldSettings` only exists for backwards compatibility.
+ _.template = function(text, settings, oldSettings) {
+ if (!settings && oldSettings) settings = oldSettings;
+ settings = _.defaults({}, settings, _.templateSettings);
+
+ // Combine delimiters into one regular expression via alternation.
+ var matcher = RegExp([
+ (settings.escape || noMatch).source,
+ (settings.interpolate || noMatch).source,
+ (settings.evaluate || noMatch).source
+ ].join('|') + '|$', 'g');
+
+ // Compile the template source, escaping string literals appropriately.
+ var index = 0;
+ var source = "__p+='";
+ text.replace(matcher, function(match, escape, interpolate, evaluate, offset) {
+ source += text.slice(index, offset).replace(escapeRegExp, escapeChar);
+ index = offset + match.length;
+
+ if (escape) {
+ source += "'+\n((__t=(" + escape + "))==null?'':_.escape(__t))+\n'";
+ } else if (interpolate) {
+ source += "'+\n((__t=(" + interpolate + "))==null?'':__t)+\n'";
+ } else if (evaluate) {
+ source += "';\n" + evaluate + "\n__p+='";
+ }
+
+ // Adobe VMs need the match returned to produce the correct offset.
+ return match;
+ });
+ source += "';\n";
+
+ // If a variable is not specified, place data values in local scope.
+ if (!settings.variable) source = 'with(obj||{}){\n' + source + '}\n';
+
+ source = "var __t,__p='',__j=Array.prototype.join," +
+ "print=function(){__p+=__j.call(arguments,'');};\n" +
+ source + 'return __p;\n';
+
+ var render;
+ try {
+ render = new Function(settings.variable || 'obj', '_', source);
+ } catch (e) {
+ e.source = source;
+ throw e;
+ }
+
+ var template = function(data) {
+ return render.call(this, data, _);
+ };
+
+ // Provide the compiled source as a convenience for precompilation.
+ var argument = settings.variable || 'obj';
+ template.source = 'function(' + argument + '){\n' + source + '}';
+
+ return template;
+ };
+
+ // Add a "chain" function. Start chaining a wrapped Underscore object.
+ _.chain = function(obj) {
+ var instance = _(obj);
+ instance._chain = true;
+ return instance;
+ };
+
+ // OOP
+ // ---------------
+ // If Underscore is called as a function, it returns a wrapped object that
+ // can be used OO-style. This wrapper holds altered versions of all the
+ // underscore functions. Wrapped objects may be chained.
+
+ // Helper function to continue chaining intermediate results.
+ var chainResult = function(instance, obj) {
+ return instance._chain ? _(obj).chain() : obj;
+ };
+
+ // Add your own custom functions to the Underscore object.
+ _.mixin = function(obj) {
+ _.each(_.functions(obj), function(name) {
+ var func = _[name] = obj[name];
+ _.prototype[name] = function() {
+ var args = [this._wrapped];
+ push.apply(args, arguments);
+ return chainResult(this, func.apply(_, args));
+ };
+ });
+ };
+
+ // Add all of the Underscore functions to the wrapper object.
+ _.mixin(_);
+
+ // Add all mutator Array functions to the wrapper.
+ _.each(['pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift'], function(name) {
+ var method = ArrayProto[name];
+ _.prototype[name] = function() {
+ var obj = this._wrapped;
+ method.apply(obj, arguments);
+ if ((name === 'shift' || name === 'splice') && obj.length === 0) delete obj[0];
+ return chainResult(this, obj);
+ };
+ });
+
+ // Add all accessor Array functions to the wrapper.
+ _.each(['concat', 'join', 'slice'], function(name) {
+ var method = ArrayProto[name];
+ _.prototype[name] = function() {
+ return chainResult(this, method.apply(this._wrapped, arguments));
+ };
+ });
+
+ // Extracts the result from a wrapped and chained object.
+ _.prototype.value = function() {
+ return this._wrapped;
+ };
+
+ // Provide unwrapping proxy for some methods used in engine operations
+ // such as arithmetic and JSON stringification.
+ _.prototype.valueOf = _.prototype.toJSON = _.prototype.value;
+
+ _.prototype.toString = function() {
+ return '' + this._wrapped;
+ };
+
+ // AMD registration happens at the end for compatibility with AMD loaders
+ // that may not enforce next-turn semantics on modules. Even though general
+ // practice for AMD registration is to be anonymous, underscore registers
+ // as a named module because, like jQuery, it is a base library that is
+ // popular enough to be bundled in a third party lib, but not be part of
+ // an AMD load request. Those cases could generate an error when an
+ // anonymous define() is called outside of a loader request.
+ if (typeof define == 'function' && define.amd) {
+ define('underscore', [], function() {
+ return _;
+ });
+ }
+}());
diff --git a/views/ngXosViews/truckroll/bower.json b/views/ngXosViews/truckroll/bower.json
index a1000df..1208905 100644
--- a/views/ngXosViews/truckroll/bower.json
+++ b/views/ngXosViews/truckroll/bower.json
@@ -16,16 +16,18 @@
],
"dependencies": {},
"devDependencies": {
- "jquery": "~2.1.4",
- "angular-mocks": "~1.4.7",
- "angular": "~1.4.7",
- "angular-ui-router": "~0.2.15",
- "angular-cookies": "~1.4.7",
- "angular-resource": "~1.4.7",
- "ng-lodash": "~0.3.0",
- "bootstrap-css": "~3.3.6"
+ "jquery": "2.1.4",
+ "angular-mocks": "1.4.7",
+ "angular": "1.4.7",
+ "angular-ui-router": "0.2.15",
+ "angular-cookies": "1.4.7",
+ "angular-animate": "1.4.7",
+ "angular-resource": "1.4.7",
+ "lodash": "~4.11.1",
+ "bootstrap-css": "3.3.6",
+ "angular-chart.js": "~0.10.2"
},
"resolutions": {
- "angular": "~1.4.7"
+ "angular": "1.4.7"
}
}
diff --git a/views/ngXosViews/truckroll/env/default.js b/views/ngXosViews/truckroll/env/default.js
index 2236839..3cb3cc2 100644
--- a/views/ngXosViews/truckroll/env/default.js
+++ b/views/ngXosViews/truckroll/env/default.js
@@ -7,7 +7,7 @@
// (works only for local environment as both application are served on the same domain)
module.exports = {
- host: 'http://apt088.apt.emulab.net:9999/',
- xoscsrftoken: 'sBLEU3jBpCFVUSBrxZ3pFeGFV50LR1GE',
- xossessionid: 'n73jta6yf81hrgzmmut04vuens090kfc'
+ host: 'http://xos.dev:9999/',
+ xoscsrftoken: 'AJkHTtR8zZi8UAZsH7RjEj6qvvV8DjAL',
+ xossessionid: '1mtzd7n9l3qkck4hc8tmuii491ovg07w'
};
diff --git a/views/ngXosViews/truckroll/gulp/build.js b/views/ngXosViews/truckroll/gulp/build.js
index a8c04be..ff48fac 100644
--- a/views/ngXosViews/truckroll/gulp/build.js
+++ b/views/ngXosViews/truckroll/gulp/build.js
@@ -13,7 +13,7 @@
var uglify = require('gulp-uglify');
var templateCache = require('gulp-angular-templatecache');
var runSequence = require('run-sequence');
-var concat = require('gulp-concat');
+var concat = require('gulp-concat-util');
var del = require('del');
var wiredep = require('wiredep');
var angularFilesort = require('gulp-angular-filesort');
@@ -27,16 +27,22 @@
var mqpacker = require('css-mqpacker');
var csswring = require('csswring');
-var TEMPLATE_FOOTER = `}]);
-angular.module('xos.truckroll').run(function($location){$location.path('/')});
-angular.bootstrap(angular.element('#xosTruckroll'), ['xos.truckroll']);`;
+const TEMPLATE_FOOTER = `
+angular.module('xos.truckroll')
+.run(['$location', function(a){
+ a.path('/');
+}])
+`
module.exports = function(options){
// delete previous builded file
gulp.task('clean', function(){
return del(
- [options.dashboards + 'xosTruckroll.html'],
+ [
+ options.dashboards + 'xosTruckroll.html',
+ options.static + 'css/xosTruckroll.css'
+ ],
{force: true}
);
});
@@ -57,7 +63,8 @@
.pipe(gulp.dest(options.tmp + '/css/'));
});
- gulp.task('copyCss', ['css'], function(){
+ // copy css in correct folder
+ gulp.task('copyCss', ['wait'], function(){
return gulp.src([`${options.tmp}/css/*.css`])
.pipe(concat('xosTruckroll.css'))
.pipe(gulp.dest(options.static + 'css/'))
@@ -71,6 +78,8 @@
.pipe(ngAnnotate())
.pipe(angularFilesort())
.pipe(concat('xosTruckroll.js'))
+ .pipe(concat.header('//Autogenerated, do not edit!!!\n'))
+ .pipe(concat.footer(TEMPLATE_FOOTER))
.pipe(uglify())
.pipe(gulp.dest(options.static + 'js/'));
});
@@ -80,19 +89,17 @@
return gulp.src('./src/templates/*.html')
.pipe(templateCache({
module: 'xos.truckroll',
- root: 'templates/',
- templateFooter: TEMPLATE_FOOTER
+ root: 'templates/'
}))
.pipe(gulp.dest(options.tmp));
});
// copy html index to Django Folder
- gulp.task('copyHtml', ['clean'], function(){
+ gulp.task('copyHtml', function(){
return gulp.src(options.src + 'index.html')
// remove dev dependencies from html
- .pipe(replace(/<!-- bower:css -->(\n.*)*\n<!-- endbower --><!-- endcss -->/, ''))
- .pipe(replace(/<!-- bower:js -->(\n.*)*\n<!-- endbower --><!-- endjs -->/, ''))
- .pipe(replace(/ng-app=".*"\s/, ''))
+ .pipe(replace(/<!-- bower:css -->(\n^<link.*)*\n<!-- endbower -->/gmi, ''))
+ .pipe(replace(/<!-- bower:js -->(\n^<script.*)*\n<!-- endbower -->/gmi, ''))
// injecting minified files
.pipe(
inject(
@@ -133,15 +140,25 @@
.pipe(eslint.failAfterError());
});
+ gulp.task('wait', function (cb) {
+ // setTimeout could be any async task
+ setTimeout(function () {
+ cb();
+ }, 1000);
+ });
+
gulp.task('build', function() {
runSequence(
+ 'clean',
+ 'sass',
'templates',
'babel',
'scripts',
'wiredep',
+ 'css',
+ 'copyCss',
'copyHtml',
- 'cleanTmp',
- 'copyCss'
+ 'cleanTmp'
);
});
};
\ No newline at end of file
diff --git a/views/ngXosViews/truckroll/gulp/server.js b/views/ngXosViews/truckroll/gulp/server.js
index 7605294..c0678d9 100644
--- a/views/ngXosViews/truckroll/gulp/server.js
+++ b/views/ngXosViews/truckroll/gulp/server.js
@@ -9,6 +9,7 @@
var wiredep = require('wiredep').stream;
var httpProxy = require('http-proxy');
var del = require('del');
+var sass = require('gulp-sass');
const environment = process.env.NODE_ENV;
@@ -34,12 +35,8 @@
module.exports = function(options){
- // open in browser with sync and proxy to 0.0.0.0
gulp.task('browser', function() {
browserSync.init({
- // reloadDelay: 500,
- // logLevel: 'debug',
- // logConnections: true,
startPath: '#/',
snippetOptions: {
rule: {
@@ -49,14 +46,16 @@
server: {
baseDir: options.src,
routes: {
- '/api': options.api,
- '/xosHelpers/src': options.helpers
+ '/xos/core/xoslib/static/js/vendor': options.helpers,
+ '/xos/core/static': options.static + '../../static/'
},
middleware: function(req, res, next){
if(
- req.url.indexOf('/xos/') !== -1 ||
- req.url.indexOf('/xoslib/') !== -1 ||
- req.url.indexOf('/hpcapi/') !== -1
+ // to be removed, deprecated API
+ // req.url.indexOf('/xos/') !== -1 ||
+ // req.url.indexOf('/xoslib/') !== -1 ||
+ // req.url.indexOf('/hpcapi/') !== -1 ||
+ req.url.indexOf('/api/') !== -1
){
if(conf.xoscsrftoken && conf.xossessionid){
req.headers.cookie = `xoscsrftoken=${conf.xoscsrftoken}; xossessionid=${conf.xossessionid}`;
@@ -78,6 +77,26 @@
gulp.watch(options.src + '**/*.html', function(){
browserSync.reload();
});
+ gulp.watch(options.css + '**/*.css', function(){
+ browserSync.reload();
+ });
+ gulp.watch(`${options.sass}/**/*.scss`, ['sass'], function(){
+ browserSync.reload();
+ });
+
+ gulp.watch([
+ options.helpers + 'ngXosHelpers.js',
+ options.static + '../../static/xosNgLib.css'
+ ], function(){
+ browserSync.reload();
+ });
+ });
+
+ // compile sass
+ gulp.task('sass', function () {
+ return gulp.src(`${options.sass}/**/*.scss`)
+ .pipe(sass().on('error', sass.logError))
+ .pipe(gulp.dest(options.css));
});
// transpile js with sourceMaps
@@ -94,8 +113,7 @@
inject(
gulp.src([
options.tmp + '**/*.js',
- options.api + '*.js',
- options.helpers + '**/*.js'
+ options.helpers + 'ngXosHelpers.js'
])
.pipe(angularFilesort()),
{
@@ -111,7 +129,10 @@
return gulp.src(options.src + 'index.html')
.pipe(
inject(
- gulp.src(options.src + 'css/*.css'),
+ gulp.src([
+ options.src + 'css/*.css',
+ options.static + '../../static/xosNgLib.css'
+ ]),
{
ignorePath: [options.src]
}
@@ -137,6 +158,7 @@
gulp.task('serve', function() {
runSequence(
+ 'sass',
'bower',
'injectScript',
'injectCss',
diff --git a/views/ngXosViews/truckroll/gulpfile.js b/views/ngXosViews/truckroll/gulpfile.js
index a3523ee..08df554 100644
--- a/views/ngXosViews/truckroll/gulpfile.js
+++ b/views/ngXosViews/truckroll/gulpfile.js
@@ -6,11 +6,12 @@
var options = {
src: 'src/',
css: 'src/css/',
+ sass: 'src/sass/',
scripts: 'src/js/',
tmp: 'src/.tmp',
dist: 'dist/',
api: '../../ngXosLib/api/',
- helpers: '../../ngXosLib/xosHelpers/src/',
+ helpers: '../../../xos/core/xoslib/static/js/vendor/',
static: '../../../xos/core/xoslib/static/', // this is the django static folder
dashboards: '../../../xos/core/xoslib/dashboards/' // this is the django html folder
};
diff --git a/views/ngXosViews/truckroll/karma.conf.js b/views/ngXosViews/truckroll/karma.conf.js
index 83d3f63..4123be9 100644
--- a/views/ngXosViews/truckroll/karma.conf.js
+++ b/views/ngXosViews/truckroll/karma.conf.js
@@ -26,8 +26,8 @@
// list of files / patterns to load in the browser
files: bowerComponents.concat([
- '../../static/js/xosApi.js',
- '../../static/js/vendor/ngXosHelpers.js',
+ '../../../xos/core/xoslib/static/js/vendor/ngXosVendor.js',
+ '../../../xos/core/xoslib/static/js/vendor/ngXosHelpers.js',
'src/js/**/*.js',
'spec/**/*.mock.js',
'spec/**/*.test.js',
diff --git a/views/ngXosViews/truckroll/package.json b/views/ngXosViews/truckroll/package.json
index 9d8abe6..128a229 100644
--- a/views/ngXosViews/truckroll/package.json
+++ b/views/ngXosViews/truckroll/package.json
@@ -8,6 +8,7 @@
"prebuild": "npm install && bower install",
"build": "gulp",
"test": "karma start",
+ "test:ci": "karma start --single-run",
"lint": "eslint src/js/"
},
"keywords": [
@@ -24,6 +25,7 @@
"css-mqpacker": "^4.0.0",
"csswring": "^4.2.1",
"del": "^2.0.2",
+ "easy-mocker": "^1.2.0",
"eslint": "^1.8.0",
"eslint-plugin-angular": "linkmesrl/eslint-plugin-angular",
"gulp": "^3.9.0",
@@ -31,16 +33,28 @@
"gulp-angular-templatecache": "^1.8.0",
"gulp-babel": "^5.3.0",
"gulp-concat": "^2.6.0",
+ "gulp-concat-util": "^0.5.5",
"gulp-eslint": "^1.0.0",
"gulp-inject": "^3.0.0",
"gulp-minify-html": "^1.0.4",
"gulp-ng-annotate": "^1.1.0",
- "gulp-postcss": "^6.1.0",
+ "gulp-postcss": "^6.0.1",
"gulp-rename": "^1.2.2",
"gulp-replace": "^0.5.4",
+ "gulp-sass": "^2.2.0",
"gulp-uglify": "^1.4.2",
"http-proxy": "^1.12.0",
+ "ink-docstrap": "^0.5.2",
+ "jasmine-core": "~2.3.4",
+ "karma": "^0.13.14",
+ "karma-babel-preprocessor": "~5.2.2",
+ "karma-coverage": "^0.5.3",
+ "karma-jasmine": "~0.3.6",
+ "karma-mocha-reporter": "~1.1.1",
+ "karma-ng-html2js-preprocessor": "^0.2.0",
+ "karma-phantomjs-launcher": "~0.2.1",
"lodash": "^3.10.1",
+ "phantomjs": "^1.9.19",
"proxy-middleware": "^0.15.0",
"run-sequence": "^1.1.4",
"wiredep": "^3.0.0-beta",
diff --git a/views/ngXosViews/truckroll/spec/sample.test.js b/views/ngXosViews/truckroll/spec/sample.test.js
index cb9045d..75a8a56 100644
--- a/views/ngXosViews/truckroll/spec/sample.test.js
+++ b/views/ngXosViews/truckroll/spec/sample.test.js
@@ -11,7 +11,7 @@
httpBackend = $httpBackend;
// Setting up mock request
- $httpBackend.expectGET('/xos/users/?no_hyperlinks=1').respond([
+ $httpBackend.expectGET('/api/core/users/?no_hyperlinks=1').respond([
{
email: 'teo@onlab.us',
firstname: 'Matteo',
diff --git a/views/ngXosViews/truckroll/src/css/main.css b/views/ngXosViews/truckroll/src/css/main.css
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/views/ngXosViews/truckroll/src/css/main.css
diff --git a/views/ngXosViews/truckroll/src/index.html b/views/ngXosViews/truckroll/src/index.html
index 0b6606e..b10d06b 100644
--- a/views/ngXosViews/truckroll/src/index.html
+++ b/views/ngXosViews/truckroll/src/index.html
@@ -1,14 +1,18 @@
<!-- browserSync -->
<!-- bower:css -->
<link rel="stylesheet" href="vendor/bootstrap-css/css/bootstrap.min.css" />
-<!-- endbower --><!-- endcss -->
+<link rel="stylesheet" href="vendor/angular-chart.js/dist/angular-chart.css" />
+<!-- endbower -->
+<!-- endcss -->
<!-- inject:css -->
<link rel="stylesheet" href="/css/dev.css">
+<link rel="stylesheet" href="/css/main.css">
<link rel="stylesheet" href="/css/truckroll.css">
+<link rel="stylesheet" href="/../../../xos/core/static/xosNgLib.css">
<!-- endinject -->
-<div ng-app="xos.truckroll" id="xosTruckroll">
- <div ui-view></div>
+<div ng-app="xos.truckroll" id="xosTruckroll" class="container-fluid">
+ <div ui-view></div>
</div>
<!-- bower:js -->
@@ -17,17 +21,15 @@
<script src="vendor/angular-mocks/angular-mocks.js"></script>
<script src="vendor/angular-ui-router/release/angular-ui-router.js"></script>
<script src="vendor/angular-cookies/angular-cookies.js"></script>
+<script src="vendor/angular-animate/angular-animate.js"></script>
<script src="vendor/angular-resource/angular-resource.js"></script>
-<script src="vendor/ng-lodash/build/ng-lodash.js"></script>
+<script src="vendor/lodash/lodash.js"></script>
<script src="vendor/bootstrap-css/js/bootstrap.min.js"></script>
-<!-- endbower --><!-- endjs -->
+<script src="vendor/Chart.js/Chart.js"></script>
+<script src="vendor/angular-chart.js/dist/angular-chart.js"></script>
+<!-- endbower -->
+<!-- endjs -->
<!-- inject:js -->
-<script src="/xosHelpers/src/xosHelpers.module.js"></script>
-<script src="/xosHelpers/src/services/noHyperlinks.interceptor.js"></script>
-<script src="/xosHelpers/src/services/csrfToken.interceptor.js"></script>
-<script src="/xosHelpers/src/services/api.services.js"></script>
-<script src="/api/ng-xoslib.js"></script>
-<script src="/api/ng-xos.js"></script>
-<script src="/api/ng-hpcapi.js"></script>
+<script src="/../../../xos/core/xoslib/static/js/vendor/ngXosHelpers.js"></script>
<script src="/.tmp/main.js"></script>
-<!-- endinject -->
+<!-- endinject -->
\ No newline at end of file
diff --git a/views/ngXosViews/truckroll/src/js/main.js b/views/ngXosViews/truckroll/src/js/main.js
index 1cf51b9..20692c8 100644
--- a/views/ngXosViews/truckroll/src/js/main.js
+++ b/views/ngXosViews/truckroll/src/js/main.js
@@ -3,7 +3,6 @@
angular.module('xos.truckroll', [
'ngResource',
'ngCookies',
- 'ngLodash',
'ui.router',
'xos.helpers'
])
@@ -17,12 +16,6 @@
.config(function($httpProvider){
$httpProvider.interceptors.push('NoHyperlinks');
})
-.service('Subscribers', function($resource){
- return $resource('/xos/subscribers/:id');
-})
-.service('Truckroll', function($resource){
- return $resource('/xoslib/truckroll/:id');
-})
.directive('truckroll', function(){
return {
restrict: 'E',
@@ -30,12 +23,18 @@
bindToController: true,
controllerAs: 'vm',
templateUrl: 'templates/truckroll.tpl.html',
- controller: function($timeout, Subscribers, Truckroll){
+ controller: function($timeout, $log, Subscribers, Truckroll){
Subscribers.query().$promise
.then((subscribers) => {
this.subscribers = subscribers;
});
+ $log.log('Truckorll Component!');
+ $log.info('Truckorll Component!');
+ $log.warn('Truckorll Component!');
+ $log.error('Truckorll Component!');
+ $log.debug('Truckorll Component!');
+
this.loader = false;
this.runTest = () => {
diff --git a/views/ngXosViews/truckroll/src/sass/main.scss b/views/ngXosViews/truckroll/src/sass/main.scss
new file mode 100644
index 0000000..d87a953
--- /dev/null
+++ b/views/ngXosViews/truckroll/src/sass/main.scss
@@ -0,0 +1,5 @@
+@import '../../../../style/sass/lib/_variables.scss';
+
+#xosTruckroll {
+
+}
\ No newline at end of file
diff --git a/views/ngXosViews/truckroll/src/templates/users-list.tpl.html b/views/ngXosViews/truckroll/src/templates/users-list.tpl.html
new file mode 100644
index 0000000..1fee0e2
--- /dev/null
+++ b/views/ngXosViews/truckroll/src/templates/users-list.tpl.html
@@ -0,0 +1 @@
+<xos-table config="vm.tableConfig" data="vm.users"></xos-table>
\ No newline at end of file
diff --git a/xos/configurations/cord-pod/README-Tutorial.md b/xos/configurations/cord-pod/README-Tutorial.md
index 4bd68c5..94f5170 100644
--- a/xos/configurations/cord-pod/README-Tutorial.md
+++ b/xos/configurations/cord-pod/README-Tutorial.md
@@ -84,11 +84,9 @@
ubuntu@xos:~/xos/xos/configurations/cord-pod$ make exampleservice
```
-Next, in the XOS UI, create an ExampleTenant. Go to *http://xos/admin/exampleservice*
-([caveat](https://github.com/open-cloud/xos/blob/master/xos/configurations/cord-pod/README.md#logging-into-xos-on-cloudlab-or-any-remote-host))
-and add / save an Example Tenant. When creating the tenant, fill in a message that
-this tenant should display. This will cause an Instance to be created
-in the the *mysite_exampleservice* slice.
+This will add the ExampleService to XOS. It will also create an ExampleTenant,
+which causes a VM to be created with Apache running inside.
+
## Set up a Subscriber Device
diff --git a/xos/configurations/cord-pod/pod-exampleservice.yaml b/xos/configurations/cord-pod/pod-exampleservice.yaml
index ec45bb8..23add83 100644
--- a/xos/configurations/cord-pod/pod-exampleservice.yaml
+++ b/xos/configurations/cord-pod/pod-exampleservice.yaml
@@ -4,6 +4,7 @@
imports:
- custom_types/xos.yaml
+ - custom_types/exampleservice.yaml
topology_template:
node_templates:
@@ -73,6 +74,15 @@
kind: exampleservice
public_key: { get_artifact: [ SELF, pubkey, LOCAL_FILE] }
private_key_fn: /opt/xos/synchronizers/exampleservice/exampleservice_private_key
+ service_message: hello
artifacts:
pubkey: /opt/xos/synchronizers/exampleservice/exampleservice_public_key
+ tenant#exampletenant1:
+ type: tosca.nodes.ExampleTenant
+ properties:
+ tenant_message: world
+ requirements:
+ - tenant:
+ node: service#exampleservice
+ relationship: tosca.relationships.TenantOfService
diff --git a/xos/configurations/test-standalone/Makefile b/xos/configurations/test-standalone/Makefile
index 64335d3..1542d07 100644
--- a/xos/configurations/test-standalone/Makefile
+++ b/xos/configurations/test-standalone/Makefile
@@ -30,6 +30,7 @@
sudo docker exec teststandalone_xos_db_1 psql -U postgres -d xos -c "SELECT setval('core_tenant_id_seq', 1)" >/dev/null 2>&1
sudo docker exec teststandalone_xos_db_1 psql -U postgres -d xos -c "SELECT setval('core_deployment_id_seq', 1)" >/dev/null 2>&1
sudo docker exec teststandalone_xos_db_1 psql -U postgres -d xos -c "SELECT setval('core_flavor_id_seq', 1)" >/dev/null 2>&1
+ sudo docker exec teststandalone_xos_db_1 psql -U postgres -d xos -c "SELECT setval('core_service_id_seq', 1)" >/dev/null 2>&1
sudo docker-compose run xos python /opt/xos/manage.py --noobserver --nomodelpolicy loaddata /opt/xos/core/fixtures/core_initial_data.json
sudo docker-compose run xos python /opt/xos/tosca/run.py none /opt/xos/configurations/common/fixtures.yaml
sudo docker-compose run xos python /opt/xos/tosca/run.py none /opt/xos/configurations/common/mydeployment.yaml
diff --git a/xos/core/xoslib/dashboards/xosDeveloper_datatables.html b/xos/core/xoslib/dashboards/xosDeveloper_datatables.html
deleted file mode 100644
index 57777b7..0000000
--- a/xos/core/xoslib/dashboards/xosDeveloper_datatables.html
+++ /dev/null
@@ -1,17 +0,0 @@
-<script src="{{ STATIC_URL }}/js/vendor/underscore-min.js"></script>
-<script src="{{ STATIC_URL }}/js/vendor/backbone.js"></script>
-<script src="{{ STATIC_URL }}/js/vendor/backbone.wreqr.js"></script>
-<script src="{{ STATIC_URL }}/js/vendor/backbone.babysitter.js"></script>
-<script src="{{ STATIC_URL }}/js/vendor/backbone.marionette.js"></script>
-
-<script src="{{ STATIC_URL }}/js/xoslib/xos-defaults.js"></script>
-<script src="{{ STATIC_URL }}/js/xoslib/xos-backbone.js"></script>
-<script src="{{ STATIC_URL }}/js/xosDeveloper_datatables.js"></script>
-
-<div id="developerView">Loading...
-</div>
-
-<script type="text/template" id="developer-slicedetail-template">
- <td><a href="http://{{request.get_host}}/admin/core/slice/<%= id %>/"><%= name %></a></td><td><%= sliceInfo.roles[0] %></td><td><%= sliceInfo.instanceCount %></td><td><%= sliceInfo.siteCount %></td>
-</script>
-
diff --git a/xos/core/xoslib/static/js/vendor/ngXosHelpers.js b/xos/core/xoslib/static/js/vendor/ngXosHelpers.js
index 35b33dc..9a14abc 100644
--- a/xos/core/xoslib/static/js/vendor/ngXosHelpers.js
+++ b/xos/core/xoslib/static/js/vendor/ngXosHelpers.js
@@ -1,2223 +1 @@
-'use strict';
-
-/**
- * © OpenCORD
- *
- * Visit http://guide.xosproject.org/devguide/addview/ for more information
- *
- * Created by teone on 3/24/16.
- */
-
-(function () {
- 'use strict';
-
- /**
- * @ngdoc overview
- * @name xos.uiComponents
- * @description
- * A collection of UI components useful for Dashboard development.
- * Currently available components are:
- * - [xosAlert](/#/module/xos.uiComponents.directive:xosAlert)
- * - [xosForm](/#/module/xos.uiComponents.directive:xosForm)
- * - [xosPagination](/#/module/xos.uiComponents.directive:xosPagination)
- * - [xosSmartTable](/#/module/xos.uiComponents.directive:xosSmartTable)
- * - [xosTable](/#/module/xos.uiComponents.directive:xosTable)
- * - [xosValidation](/#/module/xos.uiComponents.directive:xosValidation)
- **/
-
- angular.module('xos.uiComponents', ['chart.js']);
-})();
-//# sourceMappingURL=../maps/ui_components/ui-components.module.js.map
-
-'use strict';
-
-/**
- * © OpenCORD
- *
- * Visit http://guide.xosproject.org/devguide/addview/ for more information
- *
- * Created by teone on 3/24/16.
- */
-
-(function () {
- 'use strict';
-
- angular.module('xos.uiComponents')
-
- /**
- * @ngdoc directive
- * @name xos.uiComponents.directive:xosSmartTable
- * @link xos.uiComponents.directive:xosTable xosTable
- * @link xos.uiComponents.directive:xosForm xosForm
- * @restrict E
- * @description The xos-table directive
- * @param {Object} config The configuration for the component,
- * it is composed by the name of an angular [$resource](https://docs.angularjs.org/api/ngResource/service/$resource)
- * and an array of fields that shouldn't be printed.
- * ```
- * {
- resource: 'Users',
- hiddenFields: []
- }
- * ```
- * @scope
- * @example
- <example module="sampleSmartTable">
- <file name="index.html">
- <div ng-controller="SampleCtrl as vm">
- <xos-smart-table config="vm.config"></xos-smart-table>
- </div>
- </file>
- <file name="script.js">
- angular.module('sampleSmartTable', ['xos.uiComponents', 'ngResource', 'ngMockE2E'])
- // This is only for documentation purpose
- .run(function($httpBackend, _){
- let datas = [{id: 1, name: 'Jhon', surname: 'Doe'}];
- let count = 1;
- let paramsUrl = new RegExp(/\/test\/(.+)/);
- $httpBackend.whenDELETE(paramsUrl, undefined, ['id']).respond((method, url, data, headers, params) => {
- data = angular.fromJson(data);
- let id = url.match(paramsUrl)[1];
- _.remove(datas, (d) => {
- return d.id === parseInt(id);
- })
- return [204];
- });
- $httpBackend.whenGET('/test').respond(200, datas)
- $httpBackend.whenPOST('/test').respond((method, url, data) => {
- data = angular.fromJson(data);
- data.id = ++count;
- datas.push(data);
- return [201, data, {}];
- });
- })
- .factory('_', function($window){
- return $window._;
- })
- .service('SampleResource', function($resource){
- return $resource('/test/:id', {id: '@id'});
- })
- // End of documentation purpose, example start
- .controller('SampleCtrl', function(){
- this.config = {
- resource: 'SampleResource'
- };
- });
- </file>
- </example>
- */
-
- .directive('xosSmartTable', function () {
- return {
- restrict: 'E',
- scope: {
- config: '='
- },
- template: '\n <div class="row" ng-show="vm.data.length > 0">\n <div class="col-xs-12 text-right">\n <a href="" class="btn btn-success" ng-click="vm.createItem()">\n Add\n </a>\n </div>\n </div>\n <div class="row">\n <div class="col-xs-12 table-responsive">\n <xos-table config="vm.tableConfig" data="vm.data"></xos-table>\n </div>\n </div>\n <div class="panel panel-default" ng-show="vm.detailedItem">\n <div class="panel-heading">\n <div class="row">\n <div class="col-xs-11">\n <h3 class="panel-title" ng-show="vm.detailedItem.id">Update {{vm.config.resource}} {{vm.detailedItem.id}}</h3>\n <h3 class="panel-title" ng-show="!vm.detailedItem.id">Create {{vm.config.resource}} item</h3>\n </div>\n <div class="col-xs-1">\n <a href="" ng-click="vm.cleanForm()">\n <i class="glyphicon glyphicon-remove pull-right"></i>\n </a>\n </div>\n </div>\n </div>\n <div class="panel-body">\n <xos-form config="vm.formConfig" ng-model="vm.detailedItem"></xos-form>\n </div>\n </div>\n <xos-alert config="{type: \'success\', closeBtn: true}" show="vm.responseMsg">{{vm.responseMsg}}</xos-alert>\n <xos-alert config="{type: \'danger\', closeBtn: true}" show="vm.responseErr">{{vm.responseErr}}</xos-alert>\n ',
- bindToController: true,
- controllerAs: 'vm',
- controller: ["$injector", "LabelFormatter", "_", "XosFormHelpers", function controller($injector, LabelFormatter, _, XosFormHelpers) {
- var _this = this;
-
- // TODO
- // - Validate the config (what if resource does not exist?)
-
- // NOTE
- // Corner case
- // - if response is empty, how can we generate a form ?
-
- this.responseMsg = false;
- this.responseErr = false;
-
- this.tableConfig = {
- columns: [],
- actions: [{
- label: 'delete',
- icon: 'remove',
- cb: function cb(item) {
- _this.Resource.delete({ id: item.id }).$promise.then(function () {
- _.remove(_this.data, function (d) {
- return d.id === item.id;
- });
- _this.responseMsg = _this.config.resource + ' with id ' + item.id + ' successfully deleted';
- }).catch(function (err) {
- _this.responseErr = err.data.detail || 'Error while deleting ' + _this.config.resource + ' with id ' + item.id;
- });
- },
- color: 'red'
- }, {
- label: 'details',
- icon: 'search',
- cb: function cb(item) {
- _this.detailedItem = item;
- }
- }],
- classes: 'table table-striped table-bordered table-responsive',
- filter: 'field',
- order: true,
- pagination: {
- pageSize: 10
- }
- };
-
- this.formConfig = {
- exclude: this.config.hiddenFields,
- fields: {},
- formName: this.config.resource + 'Form',
- actions: [{
- label: 'Save',
- icon: 'ok',
- cb: function cb(item) {
- var p = void 0;
- var isNew = true;
-
- if (item.id) {
- p = item.$update();
- isNew = false;
- } else {
- p = item.$save();
- }
-
- p.then(function (res) {
- if (isNew) {
- _this.data.push(angular.copy(res));
- }
- delete _this.detailedItem;
- _this.responseMsg = _this.config.resource + ' with id ' + item.id + ' successfully saved';
- }).catch(function (err) {
- _this.responseErr = err.data.detail || 'Error while saving ' + _this.config.resource + ' with id ' + item.id;
- });
- },
- class: 'success'
- }]
- };
-
- this.cleanForm = function () {
- delete _this.detailedItem;
- };
-
- this.createItem = function () {
- _this.detailedItem = new _this.Resource();
- };
-
- this.Resource = $injector.get(this.config.resource);
-
- var getData = function getData() {
- _this.Resource.query().$promise.then(function (res) {
-
- if (!res[0]) {
- return;
- }
-
- var item = res[0];
- var props = Object.keys(item);
-
- _.remove(props, function (p) {
- return p == 'id' || p == 'validators';
- });
-
- // TODO move out cb
- if (angular.isArray(_this.config.hiddenFields)) {
- props = _.difference(props, _this.config.hiddenFields);
- }
-
- var labels = props.map(function (p) {
- return LabelFormatter.format(p);
- });
-
- props.forEach(function (p, i) {
- _this.tableConfig.columns.push({
- label: labels[i],
- prop: p
- });
- });
-
- // build form structure
- props.forEach(function (p, i) {
- _this.formConfig.fields[p] = {
- label: LabelFormatter.format(labels[i]).replace(':', ''),
- type: XosFormHelpers._getFieldFormat(item[p])
- };
- });
-
- _this.data = res;
- });
- };
-
- getData();
- }]
- };
- });
-})();
-//# sourceMappingURL=../../../maps/ui_components/smartComponents/smartTable/smartTable.component.js.map
-
-'use strict';
-
-/**
- * © OpenCORD
- *
- * Visit http://guide.xosproject.org/devguide/addview/ for more information
- *
- * Created by teone on 3/24/16.
- */
-
-(function () {
- 'use strict';
-
- angular.module('xos.uiComponents')
- /**
- * @ngdoc directive
- * @name xos.uiComponents.directive:xosSmartPie
- * @restrict E
- * @description The xos-table directive
- * @param {Object} config The configuration for the component,
- * it is composed by the name of an angular [$resource](https://docs.angularjs.org/api/ngResource/service/$resource)
- * and a field name that is used to group the data.
- * ```
- * {
- resource: 'Users',
- groupBy: 'fieldName',
- classes: 'my-custom-class',
- labelFormatter: (labels) => {
- // here you can format your label,
- // you should return an array with the same order
- return labels;
- }
- }
- * ```
- * @scope
- * @example
-
- Displaying Local data
- <example module="sampleSmartPieLocal">
- <file name="index.html">
- <div ng-controller="SampleCtrlLocal as vm">
- <xos-smart-pie config="vm.configLocal"></xos-smart-pie>
- </div>
- </file>
- <file name="script.js">
- angular.module('sampleSmartPieLocal', ['xos.uiComponents'])
- .factory('_', function($window){
- return $window._;
- })
- .controller('SampleCtrlLocal', function($timeout){
-
- this.datas = [
- {id: 1, first_name: 'Jon', last_name: 'aaa', category: 2},
- {id: 2, first_name: 'Danaerys', last_name: 'Targaryen', category: 1},
- {id: 3, first_name: 'Aria', last_name: 'Stark', category: 2}
- ];
- this.configLocal = {
- data: [],
- groupBy: 'category',
- classes: 'local',
- labelFormatter: (labels) => {
- return labels.map(l => l === '1' ? 'North' : 'Dragon');
- }
- };
-
- $timeout(() => {
- // this need to be triggered in this way just because of ngDoc,
- // otherwise you can assign data directly in the config
- this.configLocal.data = this.datas;
- }, 1)
- });
- </file>
- </example>
- Fetching data from API
- <example module="sampleSmartPieResource">
- <file name="index.html">
- <div ng-controller="SampleCtrl as vm">
- <xos-smart-pie config="vm.config"></xos-smart-pie>
- </div>
- </file>
- <file name="script.js">
- angular.module('sampleSmartPieResource', ['xos.uiComponents', 'ngResource', 'ngMockE2E'])
- .controller('SampleCtrl', function(){
- this.config = {
- resource: 'SampleResource',
- groupBy: 'category',
- classes: 'resource',
- labelFormatter: (labels) => {
- return labels.map(l => l === '1' ? 'North' : 'Dragon');
- }
- };
- });
- </file>
- <file name="backendPoll.js">
- angular.module('sampleSmartPieResource')
- .run(function($httpBackend, _){
- let datas = [
- {id: 1, first_name: 'Jon', last_name: 'Snow', category: 1},
- {id: 2, first_name: 'Danaerys', last_name: 'Targaryen', category: 2},
- {id: 3, first_name: 'Aria', last_name: 'Stark', category: 1}
- ];
- $httpBackend.whenGET('/test').respond(200, datas)
- })
- .factory('_', function($window){
- return $window._;
- })
- .service('SampleResource', function($resource){
- return $resource('/test/:id', {id: '@id'});
- })
- </file>
- </example>
- Polling data from API
- <example module="sampleSmartPiePoll">
- <file name="index.html">
- <div ng-controller="SampleCtrl as vm">
- <xos-smart-pie config="vm.config"></xos-smart-pie>
- </div>
- </file>
- <file name="script.js">
- angular.module('sampleSmartPiePoll', ['xos.uiComponents', 'ngResource', 'ngMockE2E'])
- .controller('SampleCtrl', function(){
- this.config = {
- resource: 'SampleResource',
- groupBy: 'category',
- poll: 2,
- labelFormatter: (labels) => {
- return labels.map(l => l === '1' ? 'Active' : 'Banned');
- }
- };
- });
- </file>
- <file name="backend.js">
- angular.module('sampleSmartPiePoll')
- .run(function($httpBackend, _){
- let mock = [
- [
- {id: 1, first_name: 'Jon', last_name: 'Snow', category: 1},
- {id: 2, first_name: 'Danaerys', last_name: 'Targaryen', category: 2},
- {id: 3, first_name: 'Aria', last_name: 'Stark', category: 1},
- {id: 3, first_name: 'Tyrion', last_name: 'Lannister', category: 1}
- ],
- [
- {id: 1, first_name: 'Jon', last_name: 'Snow', category: 1},
- {id: 2, first_name: 'Danaerys', last_name: 'Targaryen', category: 2},
- {id: 3, first_name: 'Aria', last_name: 'Stark', category: 2},
- {id: 3, first_name: 'Tyrion', last_name: 'Lannister', category: 2}
- ],
- [
- {id: 1, first_name: 'Jon', last_name: 'Snow', category: 1},
- {id: 2, first_name: 'Danaerys', last_name: 'Targaryen', category: 2},
- {id: 3, first_name: 'Aria', last_name: 'Stark', category: 1},
- {id: 3, first_name: 'Tyrion', last_name: 'Lannister', category: 2}
- ]
- ];
- $httpBackend.whenGET('/test').respond(function(method, url, data, headers, params) {
- return [200, mock[Math.round(Math.random() * 3)]];
- });
- })
- .factory('_', function($window){
- return $window._;
- })
- .service('SampleResource', function($resource){
- return $resource('/test/:id', {id: '@id'});
- })
- </file>
- </example>
- */
- .directive('xosSmartPie', function () {
- return {
- restrict: 'E',
- scope: {
- config: '='
- },
- template: '\n <canvas\n class="chart chart-pie {{vm.config.classes}}"\n chart-data="vm.data" chart-labels="vm.labels"\n chart-legend="{{vm.config.legend}}">\n </canvas>\n ',
- bindToController: true,
- controllerAs: 'vm',
- controller: ["$injector", "$interval", "$scope", "$timeout", "_", function controller($injector, $interval, $scope, $timeout, _) {
- var _this = this;
-
- if (!this.config.resource && !this.config.data) {
- throw new Error('[xosSmartPie] Please provide a resource or an array of data in the configuration');
- }
-
- var groupData = function groupData(data) {
- return _.groupBy(data, _this.config.groupBy);
- };
- var formatData = function formatData(data) {
- return _.reduce(Object.keys(data), function (list, group) {
- return list.concat(data[group].length);
- }, []);
- };
- var formatLabels = function formatLabels(data) {
- return angular.isFunction(_this.config.labelFormatter) ? _this.config.labelFormatter(Object.keys(data)) : Object.keys(data);
- };
-
- var prepareData = function prepareData(data) {
- // $timeout(() => {
- // group data
- var grouped = groupData(data);
- _this.data = formatData(grouped);
- // create labels
- _this.labels = formatLabels(grouped);
- // }, 10);
- };
-
- if (this.config.resource) {
- (function () {
-
- _this.Resource = $injector.get(_this.config.resource);
- var getData = function getData() {
- _this.Resource.query().$promise.then(function (res) {
-
- if (!res[0]) {
- return;
- }
-
- prepareData(res);
- });
- };
-
- getData();
-
- if (_this.config.poll) {
- $interval(function () {
- getData();
- }, _this.config.poll * 1000);
- }
- })();
- } else {
- $scope.$watch(function () {
- return _this.config.data;
- }, function (data) {
- if (data) {
- prepareData(_this.config.data);
- }
- }, true);
- }
-
- $scope.$on('create', function (event, chart) {
- console.log('create: ' + chart.id);
- });
-
- $scope.$on('destroy', function (event, chart) {
- console.log('destroy: ' + chart.id);
- });
- }]
- };
- });
-})();
-//# sourceMappingURL=../../../maps/ui_components/smartComponents/smartPie/smartPie.component.js.map
-
-'use strict';
-
-/**
- * © OpenCORD
- *
- * Visit http://guide.xosproject.org/devguide/addview/ for more information
- *
- * Created by teone on 4/15/16.
- */
-
-(function () {
- 'use strict';
-
- angular.module('xos.uiComponents')
-
- /**
- * @ngdoc directive
- * @name xos.uiComponents.directive:xosValidation
- * @restrict E
- * @description The xos-validation directive
- * @param {Object} errors The error object
- * @element ANY
- * @scope
- * @example
- <example module="sampleValidation">
- <file name="index.html">
- <div ng-controller="SampleCtrl as vm">
- <div class="row">
- <div class="col-xs-12">
- <label>Set an error type:</label>
- </div>
- <div class="col-xs-2">
- <a class="btn"
- ng-click="vm.errors.required = !vm.errors.required"
- ng-class="{'btn-default': !vm.errors.required, 'btn-success': vm.errors.required}">
- Required
- </a>
- </div>
- <div class="col-xs-2">
- <a class="btn"
- ng-click="vm.errors.email = !vm.errors.email"
- ng-class="{'btn-default': !vm.errors.email, 'btn-success': vm.errors.email}">
- Email
- </a>
- </div>
- <div class="col-xs-2">
- <a class="btn"
- ng-click="vm.errors.minlength = !vm.errors.minlength"
- ng-class="{'btn-default': !vm.errors.minlength, 'btn-success': vm.errors.minlength}">
- Min Length
- </a>
- </div>
- <div class="col-xs-2">
- <a class="btn"
- ng-click="vm.errors.maxlength = !vm.errors.maxlength"
- ng-class="{'btn-default': !vm.errors.maxlength, 'btn-success': vm.errors.maxlength}">
- Max Length
- </a>
- </div>
- </div>
- <xos-validation errors="vm.errors"></xos-validation>
- </div>
- </file>
- <file name="script.js">
- angular.module('sampleValidation', ['xos.uiComponents'])
- .controller('SampleCtrl', function(){
- this.errors = {
- email: false
- }
- });
- </file>
- </example>
- */
-
- .directive('xosValidation', function () {
- return {
- restrict: 'E',
- scope: {
- errors: '='
- },
- template: '\n <div ng-cloak>\n <!-- <pre>{{vm.errors.email | json}}</pre> -->\n <xos-alert config="vm.config" show="vm.errors.required !== undefined && vm.errors.required !== false">\n Field required\n </xos-alert>\n <xos-alert config="vm.config" show="vm.errors.email !== undefined && vm.errors.email !== false">\n This is not a valid email\n </xos-alert>\n <xos-alert config="vm.config" show="vm.errors.minlength !== undefined && vm.errors.minlength !== false">\n Too short\n </xos-alert>\n <xos-alert config="vm.config" show="vm.errors.maxlength !== undefined && vm.errors.maxlength !== false">\n Too long\n </xos-alert>\n <xos-alert config="vm.config" show="vm.errors.custom !== undefined && vm.errors.custom !== false">\n Field invalid\n </xos-alert>\n </div>\n ',
- transclude: true,
- bindToController: true,
- controllerAs: 'vm',
- controller: function controller() {
- this.config = {
- type: 'danger'
- };
- }
- };
- });
-})();
-//# sourceMappingURL=../../../maps/ui_components/dumbComponents/validation/validation.component.js.map
-
-'use strict';
-
-/**
- * © OpenCORD
- *
- * Visit http://guide.xosproject.org/devguide/addview/ for more information
- *
- * Created by teone on 3/24/16.
- */
-
-(function () {
- 'use strict';
-
- angular.module('xos.uiComponents')
-
- /**
- * @ngdoc directive
- * @name xos.uiComponents.directive:xosTable
- * @restrict E
- * @description The xos-table directive
- * @param {Object} config The configuration for the component.
- * ```
- * {
- * columns: [
- * {
- * label: 'Human readable name',
- * prop: 'Property to read in the model object', // optional if type is custom
- * type: 'object' | 'array' | 'boolean' | 'date' | 'custom',
- * formatter: fn(), // receive the whole item if tipe is custom and return a string
- * link: fn() // receive the whole item and return an url
- * }
- * ],
- * classes: 'table table-striped table-bordered',
- * actions: [ // if defined add an action column
- {
- label: 'delete',
- icon: 'remove', // refers to bootstraps glyphicon
- cb: (user) => { // receive the model
- console.log(user);
- },
- color: 'red'
- }
- ],
- filter: 'field', // can be by `field` or `fulltext`
- order: true // whether to show ordering arrows
- * }
- * ```
- * @param {Array} data The data that should be rendered
- * @element ANY
- * @scope
- * @example
- # Basic usage
- <example module="sampleTable1">
- <file name="index.html">
- <div ng-controller="SampleCtrl1 as vm">
- <xos-table data="vm.data" config="vm.config"></xos-table>
- </div>
- </file>
- <file name="script.js">
- angular.module('sampleTable1', ['xos.uiComponents'])
- .factory('_', function($window){
- return $window._;
- })
- .controller('SampleCtrl1', function(){
- this.config = {
- columns: [
- {
- label: 'First Name', // column title
- prop: 'name' // property to read in the data array
- },
- {
- label: 'Last Name',
- prop: 'lastname'
- }
- ]
- };
- this.data = [
- {
- name: 'John',
- lastname: 'Doe'
- },
- {
- name: 'Gili',
- lastname: 'Fereydoun'
- }
- ]
- });
- </file>
- </example>
- # Filtering
- <example module="sampleTable2" animations="true">
- <file name="index.html">
- <div ng-controller="SampleCtrl2 as vm">
- <xos-table data="vm.data" config="vm.config"></xos-table>
- </div>
- </file>
- <file name="script.js">
- angular.module('sampleTable2', ['xos.uiComponents', 'ngAnimate'])
- .factory('_', function($window){
- return $window._;
- })
- .controller('SampleCtrl2', function(){
- this.config = {
- columns: [
- {
- label: 'First Name', // column title
- prop: 'name' // property to read in the data array
- },
- {
- label: 'Last Name',
- prop: 'lastname'
- }
- ],
- classes: 'table table-striped table-condensed', // table classes, default to `table table-striped table-bordered`
- actions: [ // if defined add an action column
- {
- label: 'delete', // label
- icon: 'remove', // icons, refers to bootstraps glyphicon
- cb: (user) => { // callback, get feeded with the full object
- console.log(user);
- },
- color: 'red' // icon color
- }
- ],
- filter: 'field', // can be by `field` or `fulltext`
- order: true
- };
- this.data = [
- {
- name: 'John',
- lastname: 'Doe'
- },
- {
- name: 'Gili',
- lastname: 'Fereydoun'
- }
- ]
- });
- </file>
- </example>
- # Pagination
- <example module="sampleTable3">
- <file name="index.html">
- <div ng-controller="SampleCtrl3 as vm">
- <xos-table data="vm.data" config="vm.config"></xos-table>
- </div>
- </file>
- <file name="script.js">
- angular.module('sampleTable3', ['xos.uiComponents'])
- .factory('_', function($window){
- return $window._;
- })
- .controller('SampleCtrl3', function(){
- this.config = {
- columns: [
- {
- label: 'First Name', // column title
- prop: 'name' // property to read in the data array
- },
- {
- label: 'Last Name',
- prop: 'lastname'
- }
- ],
- pagination: {
- pageSize: 2
- }
- };
- this.data = [
- {
- name: 'John',
- lastname: 'Doe'
- },
- {
- name: 'Gili',
- lastname: 'Fereydoun'
- },
- {
- name: 'Lucky',
- lastname: 'Clarkson'
- },
- {
- name: 'Tate',
- lastname: 'Spalding'
- }
- ]
- });
- </file>
- </example>
- # Field formatter
- <example module="sampleTable4">
- <file name="index.html">
- <div ng-controller="SampleCtrl as vm">
- <xos-table data="vm.data" config="vm.config"></xos-table>
- </div>
- </file>
- <file name="script.js">
- angular.module('sampleTable4', ['xos.uiComponents'])
- .factory('_', function($window){
- return $window._;
- })
- .controller('SampleCtrl', function(){
- this.config = {
- columns: [
- {
- label: 'First Name',
- prop: 'name',
- link: item => `https://www.google.it/#q=${item.name}`
- },
- {
- label: 'Enabled',
- prop: 'enabled',
- type: 'boolean'
- },
- {
- label: 'Services',
- prop: 'services',
- type: 'array'
- },
- {
- label: 'Details',
- prop: 'details',
- type: 'object'
- }
- ]
- };
- this.data = [
- {
- name: 'John',
- enabled: true,
- services: ['Cdn', 'IpTv'],
- details: {
- c_tag: '243',
- s_tag: '444'
- }
- },
- {
- name: 'Gili',
- enabled: false,
- services: ['Cdn', 'IpTv', 'Cache'],
- details: {
- c_tag: '675',
- s_tag: '893'
- }
- }
- ]
- });
- </file>
- </example>
- # Custom formatter
- <example module="sampleTable5">
- <file name="index.html">
- <div ng-controller="SampleCtrl as vm">
- <xos-table data="vm.data" config="vm.config"></xos-table>
- </div>
- </file>
- <file name="script.js">
- angular.module('sampleTable5', ['xos.uiComponents'])
- .factory('_', function($window){
- return $window._;
- })
- .controller('SampleCtrl', function(){
- this.config = {
- columns: [
- {
- label: 'Username',
- prop: 'username'
- },
- {
- label: 'Features',
- type: 'custom',
- formatter: (val) => {
-
- let cdnEnabled = val.features.cdn ? 'enabled' : 'disabled';
- return `
- Cdn is ${cdnEnabled},
- uplink speed is ${val.features.uplink_speed}
- and downlink speed is ${val.features.downlink_speed}
- `;
- }
- }
- ]
- };
- this.data = [
- {
- username: 'John',
- features: {
- "cdn": false,
- "uplink_speed": 1000000000,
- "downlink_speed": 1000000000,
- "uverse": true,
- "status": "enabled"
- }
- },
- {
- username: 'Gili',
- features: {
- "cdn": true,
- "uplink_speed": 3000000000,
- "downlink_speed": 2000000000,
- "uverse": true,
- "status": "enabled"
- }
- }
- ]
- });
- </file>
- </example>
- **/
-
- .directive('xosTable', function () {
- return {
- restrict: 'E',
- scope: {
- data: '=',
- config: '='
- },
- template: '\n <div ng-show="vm.data.length > 0">\n <div class="row" ng-if="vm.config.filter == \'fulltext\'">\n <div class="col-xs-12">\n <input\n class="form-control"\n placeholder="Type to search.."\n type="text"\n ng-model="vm.query"/>\n </div>\n </div>\n <table ng-class="vm.classes" ng-hide="vm.data.length == 0">\n <thead>\n <tr>\n <th ng-repeat="col in vm.columns">\n {{col.label}}\n <span ng-if="vm.config.order">\n <a href="" ng-click="vm.orderBy = col.prop; vm.reverse = false">\n <i class="glyphicon glyphicon-chevron-up"></i>\n </a>\n <a href="" ng-click="vm.orderBy = col.prop; vm.reverse = true">\n <i class="glyphicon glyphicon-chevron-down"></i>\n </a>\n </span>\n </th>\n <th ng-if="vm.config.actions">Actions:</th>\n </tr>\n </thead>\n <tbody ng-if="vm.config.filter == \'field\'">\n <tr>\n <td ng-repeat="col in vm.columns">\n <input\n class="form-control"\n placeholder="Type to search by {{col.label}}"\n type="text"\n ng-model="vm.query[col.prop]"/>\n </td>\n <td ng-if="vm.config.actions"></td>\n </tr>\n </tbody>\n <tbody>\n <tr ng-repeat="item in vm.data | filter:vm.query | orderBy:vm.orderBy:vm.reverse | pagination:vm.currentPage * vm.config.pagination.pageSize | limitTo: (vm.config.pagination.pageSize || vm.data.length) track by $index">\n <td ng-repeat="col in vm.columns" link-wrapper>\n <span ng-if="!col.type">{{item[col.prop]}}</span>\n <span ng-if="col.type === \'boolean\'">\n <i class="glyphicon"\n ng-class="{\'glyphicon-ok\': item[col.prop], \'glyphicon-remove\': !item[col.prop]}">\n </i>\n </span>\n <span ng-if="col.type === \'date\'">\n {{item[col.prop] | date:\'H:mm MMM d, yyyy\'}}\n </span>\n <span ng-if="col.type === \'array\'">\n {{item[col.prop] | arrayToList}}\n </span>\n <span ng-if="col.type === \'object\'">\n <dl class="dl-horizontal">\n <span ng-repeat="(k,v) in item[col.prop]">\n <dt>{{k}}</dt>\n <dd>{{v}}</dd>\n </span>\n </dl>\n </span>\n <span ng-if="col.type === \'custom\'">\n {{col.formatter(item)}}\n </span>\n </td>\n <td ng-if="vm.config.actions">\n <a href=""\n ng-repeat="action in vm.config.actions"\n ng-click="action.cb(item)"\n title="{{action.label}}">\n <i\n class="glyphicon glyphicon-{{action.icon}}"\n style="color: {{action.color}};"></i>\n </a>\n </td>\n </tr>\n </tbody>\n </table>\n <xos-pagination\n ng-if="vm.config.pagination"\n page-size="vm.config.pagination.pageSize"\n total-elements="vm.data.length"\n change="vm.goToPage">\n </xos-pagination>\n </div>\n <div ng-show="vm.data.length == 0 || !vm.data">\n <xos-alert config="{type: \'info\'}">\n No data to show.\n </xos-alert>\n </div>\n ',
- bindToController: true,
- controllerAs: 'vm',
- controller: ["_", function controller(_) {
- var _this = this;
-
- if (!this.config) {
- throw new Error('[xosTable] Please provide a configuration via the "config" attribute');
- }
-
- if (!this.config.columns) {
- throw new Error('[xosTable] Please provide a columns list in the configuration');
- }
-
- // if columns with type 'custom' are provide
- // check that a custom formatted is provided too
- var customCols = _.filter(this.config.columns, { type: 'custom' });
- if (angular.isArray(customCols) && customCols.length > 0) {
- _.forEach(customCols, function (col) {
- if (!col.formatter || !angular.isFunction(col.formatter)) {
- throw new Error('[xosTable] You have provided a custom field type, a formatter function should provided too.');
- }
- });
- }
-
- // if a link property is passed,
- // it should be a function
- var linkedColumns = _.filter(this.config.columns, function (col) {
- return angular.isDefined(col.link);
- });
- if (angular.isArray(linkedColumns) && linkedColumns.length > 0) {
- _.forEach(linkedColumns, function (col) {
- if (!angular.isFunction(col.link)) {
- throw new Error('[xosTable] The link property should be a function.');
- }
- });
- }
-
- this.columns = this.config.columns;
- this.classes = this.config.classes || 'table table-striped table-bordered';
-
- if (this.config.actions) {
- // TODO validate action format
- }
- if (this.config.pagination) {
- this.currentPage = 0;
- this.goToPage = function (n) {
- _this.currentPage = n;
- };
- }
- }]
- };
- })
- // TODO move in separate files
- // TODO test
- .filter('arrayToList', function () {
- return function (input) {
- if (!angular.isArray(input)) {
- return input;
- }
- return input.join(', ');
- };
- })
- // TODO test
- .directive('linkWrapper', function () {
- return {
- restrict: 'A',
- transclude: true,
- template: '\n <a ng-if="col.link" href="{{col.link(item)}}">\n <div ng-transclude></div>\n </a>\n <div ng-transclude ng-if="!col.link"></div>\n '
- };
- });
-})();
-//# sourceMappingURL=../../../maps/ui_components/dumbComponents/table/table.component.js.map
-
-'use strict';
-
-/**
- * © OpenCORD
- *
- * Visit http://guide.xosproject.org/devguide/addview/ for more information
- *
- * Created by teone on 4/15/16.
- */
-
-(function () {
- 'use strict';
-
- angular.module('xos.uiComponents')
-
- /**
- * @ngdoc directive
- * @name xos.uiComponents.directive:xosPagination
- * @restrict E
- * @description The xos-table directive
- * @param {Number} pageSize Number of elements per page
- * @param {Number} totalElements Number of total elements in the collection
- * @param {Function} change The callback to be triggered on page change.
- * * @element ANY
- * @scope
- * @example
- <example module="samplePagination">
- <file name="index.html">
- <div ng-controller="SampleCtrl1 as vm">
- <xos-pagination
- page-size="vm.pageSize"
- total-elements="vm.totalElements"
- change="vm.change">
- </xos-pagination>
- </div>
- </file>
- <file name="script.js">
- angular.module('samplePagination', ['xos.uiComponents'])
- .controller('SampleCtrl1', function(){
- this.pageSize = 10;
- this.totalElements = 35;
- this.change = (pageNumber) => {
- console.log(pageNumber);
- }
- });
- </file>
- </example>
- **/
-
- .directive('xosPagination', function () {
- return {
- restrict: 'E',
- scope: {
- pageSize: '=',
- totalElements: '=',
- change: '='
- },
- template: '\n <div class="row" ng-if="vm.pageList.length > 1">\n <div class="col-xs-12 text-center">\n <ul class="pagination">\n <li\n ng-click="vm.goToPage(vm.currentPage - 1)"\n ng-class="{disabled: vm.currentPage == 0}">\n <a href="" aria-label="Previous">\n <span aria-hidden="true">«</span>\n </a>\n </li>\n <li ng-repeat="i in vm.pageList" ng-class="{active: i === vm.currentPage}">\n <a href="" ng-click="vm.goToPage(i)">{{i + 1}}</a>\n </li>\n <li\n ng-click="vm.goToPage(vm.currentPage + 1)"\n ng-class="{disabled: vm.currentPage == vm.pages - 1}">\n <a href="" aria-label="Next">\n <span aria-hidden="true">»</span>\n </a>\n </li>\n </ul>\n </div>\n </div>\n ',
- bindToController: true,
- controllerAs: 'vm',
- controller: ["$scope", function controller($scope) {
- var _this = this;
-
- this.currentPage = 0;
-
- this.goToPage = function (n) {
- if (n < 0 || n === _this.pages) {
- return;
- }
- _this.currentPage = n;
- _this.change(n);
- };
-
- this.createPages = function (pages) {
- var arr = [];
- for (var i = 0; i < pages; i++) {
- arr.push(i);
- }
- return arr;
- };
-
- // watch for data changes
- $scope.$watch(function () {
- return _this.totalElements;
- }, function () {
- if (_this.totalElements) {
- _this.pages = Math.ceil(_this.totalElements / _this.pageSize);
- _this.pageList = _this.createPages(_this.pages);
- }
- });
- }]
- };
- }).filter('pagination', function () {
- return function (input, start) {
- if (!input || !angular.isArray(input)) {
- return input;
- }
- start = parseInt(start, 10);
- return input.slice(start);
- };
- });
-})();
-//# sourceMappingURL=../../../maps/ui_components/dumbComponents/pagination/pagination.component.js.map
-
-'use strict';
-
-var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; };
-
-/**
- * © OpenCORD
- *
- * Visit http://guide.xosproject.org/devguide/addview/ for more information
- *
- * Created by teone on 4/18/16.
- */
-
-(function () {
- 'use strict';
-
- angular.module('xos.uiComponents')
-
- /**
- * @ngdoc directive
- * @name xos.uiComponents.directive:xosForm
- * @restrict E
- * @description The xos-form directive.
- * This components have two usage, given a model it is able to autogenerate a form or it can be configured to create a custom form.
- * @param {Object} config The configuration object
- * ```
- * {
- * exclude: ['id', 'validators', 'created', 'updated', 'deleted'], //field to be skipped in the form, the provide values are concatenated
- * actions: [ // define the form buttons with related callback
- * {
- label: 'save',
- icon: 'ok', // refers to bootstraps glyphicon
- cb: (user) => { // receive the model
- console.log(user);
- },
- class: 'success'
- }
- * ],
- * fields: {
- * field_name: {
- * label: 'Field Label',
- * type: 'string' // options are: [date, boolean, number, email, string],
- * validators: {
- * minlength: number,
- maxlength: number,
- required: boolean,
- min: number,
- max: number
- * }
- * }
- * }
- * }
- * ```
- * @element ANY
- * @scope
- * @example
-
- Autogenerated form
- <example module="sampleForm">
- <file name="script.js">
- angular.module('sampleForm', ['xos.uiComponents'])
- .factory('_', function($window){
- return $window._;
- })
- .controller('SampleCtrl', function(){
- this.model = {
- first_name: 'Jhon',
- last_name: 'Doe',
- email: 'jhon.doe@sample.com',
- active: true,
- birthDate: '2015-02-17T22:06:38.059000Z'
- }
- this.config = {
- exclude: ['password', 'last_login'],
- formName: 'sampleForm',
- actions: [
- {
- label: 'Save',
- icon: 'ok', // refers to bootstraps glyphicon
- cb: (user) => { // receive the model
- console.log(user);
- },
- class: 'success'
- }
- ]
- };
- });
- </file>
- <file name="index.html">
- <div ng-controller="SampleCtrl as vm">
- <xos-form ng-model="vm.model" config="vm.config"></xos-form>
- </div>
- </file>
- </example>
- Configuration defined form
- <example module="sampleForm1">
- <file name="script.js">
- angular.module('sampleForm1', ['xos.uiComponents'])
- .factory('_', function($window){
- return $window._;
- })
- .controller('SampleCtrl1', function(){
- this.model = {
- };
- this.config = {
- exclude: ['password', 'last_login'],
- formName: 'sampleForm1',
- actions: [
- {
- label: 'Save',
- icon: 'ok', // refers to bootstraps glyphicon
- cb: (user) => { // receive the model
- console.log(user);
- },
- class: 'success'
- }
- ],
- fields: {
- first_name: {
- type: 'string',
- validators: {
- required: true
- }
- },
- last_name: {
- label: 'Surname',
- type: 'string',
- validators: {
- required: true,
- minlength: 10
- }
- },
- age: {
- type: 'number',
- validators: {
- required: true,
- min: 21
- }
- },
- }
- };
- });
- </file>
- <file name="index.html">
- <div ng-controller="SampleCtrl1 as vm">
- <xos-form ng-model="vm.model" config="vm.config"></xos-form>
- </div>
- </file>
- </example>
- **/
-
- .directive('xosForm', function () {
- return {
- restrict: 'E',
- scope: {
- config: '=',
- ngModel: '='
- },
- template: '\n <ng-form name="vm.{{vm.config.formName || \'form\'}}">\n <div class="form-group" ng-repeat="(name, field) in vm.formField">\n <label>{{field.label}}</label>\n <input\n ng-if="field.type !== \'boolean\'"\n type="{{field.type}}"\n name="{{name}}"\n class="form-control"\n ng-model="vm.ngModel[name]"\n ng-minlength="field.validators.minlength || 0"\n ng-maxlength="field.validators.maxlength || 2000"\n ng-required="field.validators.required || false" />\n <span class="boolean-field" ng-if="field.type === \'boolean\'">\n <button\n class="btn btn-success"\n ng-show="vm.ngModel[name]"\n ng-click="vm.ngModel[name] = false">\n <i class="glyphicon glyphicon-ok"></i>\n </button>\n <button\n class="btn btn-danger"\n ng-show="!vm.ngModel[name]"\n ng-click="vm.ngModel[name] = true">\n <i class="glyphicon glyphicon-remove"></i>\n </button>\n </span>\n <!-- <pre>{{vm[vm.config.formName][name].$error | json}}</pre> -->\n <xos-validation errors="vm[vm.config.formName || \'form\'][name].$error"></xos-validation>\n </div>\n <div class="form-group" ng-if="vm.config.actions">\n <button role="button" href=""\n ng-repeat="action in vm.config.actions"\n ng-click="action.cb(vm.ngModel)"\n class="btn btn-{{action.class}}"\n title="{{action.label}}">\n <i class="glyphicon glyphicon-{{action.icon}}"></i>\n {{action.label}}\n </button>\n </div>\n </ng-form>\n ',
- bindToController: true,
- controllerAs: 'vm',
- controller: ["$scope", "$log", "_", "XosFormHelpers", function controller($scope, $log, _, XosFormHelpers) {
- var _this = this;
-
- if (!this.config) {
- throw new Error('[xosForm] Please provide a configuration via the "config" attribute');
- }
-
- if (!this.config.actions) {
- throw new Error('[xosForm] Please provide an action list in the configuration');
- }
-
- this.excludedField = ['id', 'validators', 'created', 'updated', 'deleted', 'backend_status'];
- if (this.config && this.config.exclude) {
- this.excludedField = this.excludedField.concat(this.config.exclude);
- }
-
- this.formField = [];
- $scope.$watch(function () {
- return _this.ngModel;
- }, function (model) {
-
- // empty from old stuff
- _this.formField = {};
-
- if (!model) {
- return;
- }
-
- var diff = _.difference(Object.keys(model), _this.excludedField);
- var modelField = XosFormHelpers.parseModelField(diff);
- _this.formField = XosFormHelpers.buildFormStructure(modelField, _this.config.fields, model);
- });
- }]
- };
- }).service('XosFormHelpers', ["_", "LabelFormatter", function (_, LabelFormatter) {
- var _this2 = this;
-
- this._isEmail = function (text) {
- var re = /(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))/;
- return re.test(text);
- };
-
- this._getFieldFormat = function (value) {
-
- // check if is date
- if (_.isDate(value) || !Number.isNaN(Date.parse(value)) && new Date(value).getTime() > 631180800000) {
- return 'date';
- }
-
- // check if is boolean
- // isNaN(false) = false, false is a number (0), true is a number (1)
- if (typeof value === 'boolean') {
- return 'boolean';
- }
-
- // check if a string is a number
- if (!isNaN(value) && value !== null) {
- return 'number';
- }
-
- // check if a string is an email
- if (_this2._isEmail(value)) {
- return 'email';
- }
-
- // if null return string
- if (value === null) {
- return 'string';
- }
-
- return typeof value === 'undefined' ? 'undefined' : _typeof(value);
- };
-
- this.buildFormStructure = function (modelField, customField, model) {
-
- modelField = Object.keys(modelField).length > 0 ? modelField : customField; //if no model field are provided, check custom
- customField = customField || {};
-
- return _.reduce(Object.keys(modelField), function (form, f) {
-
- form[f] = {
- label: customField[f] && customField[f].label ? customField[f].label + ':' : LabelFormatter.format(f),
- type: customField[f] && customField[f].type ? customField[f].type : _this2._getFieldFormat(model[f]),
- validators: customField[f] && customField[f].validators ? customField[f].validators : {}
- };
-
- if (form[f].type === 'date') {
- model[f] = new Date(model[f]);
- }
-
- if (form[f].type === 'number') {
- model[f] = parseInt(model[f], 10);
- }
-
- return form;
- }, {});
- };
-
- this.parseModelField = function (fields) {
- return _.reduce(fields, function (form, f) {
- form[f] = {};
- return form;
- }, {});
- };
- }]);
-})();
-//# sourceMappingURL=../../../maps/ui_components/dumbComponents/form/form.component.js.map
-
-'use strict';
-
-/**
- * © OpenCORD
- *
- * Visit http://guide.xosproject.org/devguide/addview/ for more information
- *
- * Created by teone on 4/15/16.
- */
-
-(function () {
- 'use strict';
-
- angular.module('xos.uiComponents')
-
- /**
- * @ngdoc directive
- * @name xos.uiComponents.directive:xosAlert
- * @restrict E
- * @description The xos-alert directive
- * @param {Object} config The configuration object
- * ```
- * {
- * type: 'danger', //info, success, warning
- * closeBtn: true, //default false
- * autoHide: 3000 //delay to automatically hide the alert
- * }
- * ```
- * @param {Boolean=} show Binding to show and hide the alert, default to true
- * @element ANY
- * @scope
- * @example
- <example module="sampleAlert1">
- <file name="index.html">
- <div ng-controller="SampleCtrl1 as vm">
- <xos-alert config="vm.config1">
- A sample alert message
- </xos-alert>
- <xos-alert config="vm.config2">
- A sample alert message (with close button)
- </xos-alert>
- <xos-alert config="vm.config3">
- A sample info message
- </xos-alert>
- <xos-alert config="vm.config4">
- A sample success message
- </xos-alert>
- <xos-alert config="vm.config5">
- A sample warning message
- </xos-alert>
- </div>
- </file>
- <file name="script.js">
- angular.module('sampleAlert1', ['xos.uiComponents'])
- .controller('SampleCtrl1', function(){
- this.config1 = {
- type: 'danger'
- };
- this.config2 = {
- type: 'danger',
- closeBtn: true
- };
- this.config3 = {
- type: 'info'
- };
- this.config4 = {
- type: 'success'
- };
- this.config5 = {
- type: 'warning'
- };
- });
- </file>
- </example>
- <example module="sampleAlert2" animations="true">
- <file name="index.html">
- <div ng-controller="SampleCtrl as vm" class="row">
- <div class="col-sm-4">
- <a class="btn btn-default btn-block" ng-show="!vm.show" ng-click="vm.show = true">Show Alert</a>
- <a class="btn btn-default btn-block" ng-show="vm.show" ng-click="vm.show = false">Hide Alert</a>
- </div>
- <div class="col-sm-8">
- <xos-alert config="vm.config1" show="vm.show">
- A sample alert message, not displayed by default.
- </xos-alert>
- </div>
- </div>
- </file>
- <file name="script.js">
- angular.module('sampleAlert2', ['xos.uiComponents', 'ngAnimate'])
- .controller('SampleCtrl', function(){
- this.config1 = {
- type: 'success'
- };
- this.show = false;
- });
- </file>
- </example>
- **/
-
- .directive('xosAlert', function () {
- return {
- restrict: 'E',
- scope: {
- config: '=',
- show: '=?'
- },
- template: '\n <div ng-cloak class="alert alert-{{vm.config.type}}" ng-hide="!vm.show">\n <button type="button" class="close" ng-if="vm.config.closeBtn" ng-click="vm.dismiss()">\n <span aria-hidden="true">×</span>\n </button>\n <p ng-transclude></p>\n </div>\n ',
- transclude: true,
- bindToController: true,
- controllerAs: 'vm',
- controller: ["$timeout", function controller($timeout) {
- var _this = this;
-
- if (!this.config) {
- throw new Error('[xosAlert] Please provide a configuration via the "config" attribute');
- }
-
- // default the value to true
- this.show = this.show !== false;
-
- this.dismiss = function () {
- _this.show = false;
- };
-
- if (this.config.autoHide) {
- (function () {
- var to = $timeout(function () {
- _this.dismiss();
- $timeout.cancel(to);
- }, _this.config.autoHide);
- })();
- }
- }]
- };
- });
-})();
-//# sourceMappingURL=../../../maps/ui_components/dumbComponents/alert/alert.component.js.map
-
-'use strict';
-
-(function () {
- 'use strict';
-
- config.$inject = ["$httpProvider", "$interpolateProvider", "$resourceProvider"];
- angular.module('bugSnag', []).factory('$exceptionHandler', function () {
- return function (exception, cause) {
- if (window.Bugsnag) {
- Bugsnag.notifyException(exception, { diagnostics: { cause: cause } });
- } else {
- console.error(exception, cause, exception.stack);
- }
- };
- });
-
- /**
- * @ngdoc overview
- * @name xos.helpers
- * @description this is the module that group all the helpers service and components for XOS
- **/
-
- angular.module('xos.helpers', ['ngCookies', 'ngResource', 'ngAnimate', 'bugSnag', 'xos.uiComponents']).config(config).factory('_', ["$window", function ($window) {
- return $window._;
- }]);
-
- function config($httpProvider, $interpolateProvider, $resourceProvider) {
- $httpProvider.interceptors.push('SetCSRFToken');
-
- $interpolateProvider.startSymbol('{$');
- $interpolateProvider.endSymbol('$}');
-
- // NOTE http://www.masnun.com/2013/09/18/django-rest-framework-angularjs-resource-trailing-slash-problem.html
- $resourceProvider.defaults.stripTrailingSlashes = false;
- }
-})();
-//# sourceMappingURL=maps/xosHelpers.module.js.map
-
-'use strict';
-
-(function () {
- 'use strict';
-
- angular.module('xos.helpers')
- /**
- * @ngdoc service
- * @name xos.helpers.vSG-Collection
- * @description Angular resource to fetch /api/service/vsg/
- **/
- .service('vSG-Collection', ["$resource", function ($resource) {
- return $resource('/api/service/vsg/');
- }]);
-})();
-//# sourceMappingURL=../../maps/services/rest/vSG.js.map
-
-'use strict';
-
-(function () {
- 'use strict';
-
- angular.module('xos.helpers')
- /**
- * @ngdoc service
- * @name xos.helpers.vOLT-Collection
- * @description Angular resource to fetch /api/tenant/cord/volt/:volt_id/
- **/
- .service('vOLT-Collection', ["$resource", function ($resource) {
- return $resource('/api/tenant/cord/volt/:volt_id/', { volt_id: '@id' }, {
- update: { method: 'PUT' }
- });
- }]);
-})();
-//# sourceMappingURL=../../maps/services/rest/vOLT.js.map
-
-'use strict';
-
-(function () {
- 'use strict';
-
- angular.module('xos.helpers')
- /**
- * @ngdoc service
- * @name xos.helpers.Login
- * @description Angular resource to fetch /api/utility/login/
- **/
- .service('Login', ["$resource", function ($resource) {
- return $resource('/api/utility/login/');
- }])
- /**
- * @ngdoc service
- * @name xos.helpers.Logout
- * @description Angular resource to fetch /api/utility/logout/
- **/
- .service('Logout', ["$resource", function ($resource) {
- return $resource('/api/utility/logout/');
- }]);
-})();
-//# sourceMappingURL=../../maps/services/rest/Utility.js.map
-
-'use strict';
-
-(function () {
- 'use strict';
-
- angular.module('xos.helpers')
- /**
- * @ngdoc service
- * @name xos.helpers.Users
- * @description Angular resource to fetch /api/core/users/:id/
- **/
- .service('Users', ["$resource", function ($resource) {
- return $resource('/api/core/users/:id/', { id: '@id' }, {
- update: { method: 'PUT' }
- });
- }]);
-})();
-//# sourceMappingURL=../../maps/services/rest/Users.js.map
-
-'use strict';
-
-(function () {
- 'use strict';
-
- angular.module('xos.helpers')
- /**
- * @ngdoc service
- * @name xos.helpers.Truckroll-Collection
- * @description Angular resource to fetch /api/tenant/truckroll/:truckroll_id/
- **/
- .service('Truckroll-Collection', ["$resource", function ($resource) {
- return $resource('/api/tenant/truckroll/:truckroll_id/', { truckroll_id: '@id' }, {
- update: { method: 'PUT' }
- });
- }]);
-})();
-//# sourceMappingURL=../../maps/services/rest/Truckroll.js.map
-
-'use strict';
-
-(function () {
- 'use strict';
-
- angular.module('xos.helpers')
- /**
- * @ngdoc service
- * @name xos.helpers.Tenant
- * @description Angular resource to fetch /api/core/tenant/:id/
- **/
- .service('Tenants', ["$resource", function ($resource) {
- return $resource('/api/core/tenants/:id/', { id: '@id' }, {
- update: { method: 'PUT' }
- });
- }]);
-})();
-//# sourceMappingURL=../../maps/services/rest/Tenant.js.map
-
-'use strict';
-
-(function () {
- 'use strict';
-
- angular.module('xos.helpers')
- /**
- * @ngdoc service
- * @name xos.helpers.Subscribers
- * @description Angular resource to fetch Subscribers
- **/
- .service('Subscribers', ["$resource", function ($resource) {
- return $resource('/api/tenant/cord/subscriber/:id/', { id: '@id' }, {
- update: { method: 'PUT' },
- /**
- * @ngdoc method
- * @name xos.helpers.Subscribers#View-a-Subscriber-Features-Detail
- * @methodOf xos.helpers.Subscribers
- * @description
- * View-a-Subscriber-Features-Detail
- **/
- 'View-a-Subscriber-Features-Detail': {
- method: 'GET',
- isArray: false,
- url: '/api/tenant/cord/subscriber/:id/features/'
- },
- /**
- * @ngdoc method
- * @name xos.helpers.Subscribers#Read-Subscriber-uplink_speed
- * @methodOf xos.helpers.Subscribers
- * @description
- * Read-Subscriber-uplink_speed
- **/
- 'Read-Subscriber-uplink_speed': {
- method: 'GET',
- isArray: false,
- url: '/api/tenant/cord/subscriber/:id/features/uplink_speed/'
- },
- /**
- * @ngdoc method
- * @name xos.helpers.Subscribers#Update-Subscriber-uplink_speed
- * @methodOf xos.helpers.Subscribers
- * @description
- * Update-Subscriber-uplink_speed
- **/
- 'Update-Subscriber-uplink_speed': {
- method: 'PUT',
- isArray: false,
- url: '/api/tenant/cord/subscriber/:id/features/uplink_speed/'
- },
- /**
- * @ngdoc method
- * @name xos.helpers.Subscribers#Read-Subscriber-downlink_speed
- * @methodOf xos.helpers.Subscribers
- * @description
- * Read-Subscriber-downlink_speed
- **/
- 'Read-Subscriber-downlink_speed': {
- method: 'GET',
- isArray: false,
- url: '/api/tenant/cord/subscriber/:id/features/downlink_speed/'
- },
- /**
- * @ngdoc method
- * @name xos.helpers.Subscribers#Update-Subscriber-downlink_speed
- * @methodOf xos.helpers.Subscribers
- * @description
- * Update-Subscriber-downlink_speed
- **/
- 'Update-Subscriber-downlink_speed': {
- method: 'PUT',
- isArray: false,
- url: '/api/tenant/cord/subscriber/:id/features/downlink_speed/'
- },
- /**
- * @ngdoc method
- * @name xos.helpers.Subscribers#Read-Subscriber-cdn
- * @methodOf xos.helpers.Subscribers
- * @description
- * Read-Subscriber-cdn
- **/
- 'Read-Subscriber-cdn': {
- method: 'GET',
- isArray: false,
- url: '/api/tenant/cord/subscriber/:id/features/cdn/'
- },
- /**
- * @ngdoc method
- * @name xos.helpers.Subscribers#Update-Subscriber-cdn
- * @methodOf xos.helpers.Subscribers
- * @description
- * Update-Subscriber-cdn
- **/
- 'Update-Subscriber-cdn': {
- method: 'PUT',
- isArray: false,
- url: '/api/tenant/cord/subscriber/:id/features/cdn/'
- },
- /**
- * @ngdoc method
- * @name xos.helpers.Subscribers#Read-Subscriber-uverse
- * @methodOf xos.helpers.Subscribers
- * @description
- * Read-Subscriber-uverse
- **/
- 'Read-Subscriber-uverse': {
- method: 'GET',
- isArray: false,
- url: '/api/tenant/cord/subscriber/:id/features/uverse/'
- },
- /**
- * @ngdoc method
- * @name xos.helpers.Subscribers#Update-Subscriber-uverse
- * @methodOf xos.helpers.Subscribers
- * @description
- * Update-Subscriber-uverse
- **/
- 'Update-Subscriber-uverse': {
- method: 'PUT',
- isArray: false,
- url: '/api/tenant/cord/subscriber/:id/features/uverse/'
- },
- /**
- * @ngdoc method
- * @name xos.helpers.Subscribers#Read-Subscriber-status
- * @methodOf xos.helpers.Subscribers
- * @description
- * Read-Subscriber-status
- **/
- 'Read-Subscriber-status': {
- method: 'GET',
- isArray: false,
- url: '/api/tenant/cord/subscriber/:id/features/status/'
- },
- /**
- * @ngdoc method
- * @name xos.helpers.Subscribers#Update-Subscriber-status
- * @methodOf xos.helpers.Subscribers
- * @description
- * Update-Subscriber-status
- **/
- 'Update-Subscriber-status': {
- method: 'PUT',
- isArray: false,
- url: '/api/tenant/cord/subscriber/:id/features/status/'
- }
- });
- }]);
-})();
-//# sourceMappingURL=../../maps/services/rest/Subscribers.js.map
-
-'use strict';
-
-(function () {
- 'use strict';
-
- angular.module('xos.helpers')
- /**
- * @ngdoc service
- * @name xos.helpers.SlicesPlus
- * @description Angular resource to fetch /api/utility/slicesplus/
- * This is a read-only API and only the `query` method is currently supported.
- **/
- .service('SlicesPlus', ["$http", "$q", function ($http, $q) {
- this.query = function (params) {
- var deferred = $q.defer();
-
- $http.get('/api/utility/slicesplus/', { params: params }).then(function (res) {
- deferred.resolve(res.data);
- }).catch(function (res) {
- deferred.reject(res.data);
- });
-
- return { $promise: deferred.promise };
- };
- }]);
-})();
-//# sourceMappingURL=../../maps/services/rest/Slices_plus.js.map
-
-'use strict';
-
-(function () {
- 'use strict';
-
- angular.module('xos.helpers')
- /**
- * @ngdoc service
- * @name xos.helpers.Slices
- * @description Angular resource to fetch /api/core/slices/:id/
- **/
- .service('Slices', ["$resource", function ($resource) {
- return $resource('/api/core/slices/:id/', { id: '@id' }, {
- update: { method: 'PUT' }
- });
- }]);
-})();
-//# sourceMappingURL=../../maps/services/rest/Slices.js.map
-
-'use strict';
-
-(function () {
- 'use strict';
-
- angular.module('xos.helpers')
- /**
- * @ngdoc service
- * @name xos.helpers.Sites
- * @description Angular resource to fetch /api/core/sites/:id/
- **/
- .service('Sites', ["$resource", function ($resource) {
- return $resource('/api/core/sites/:id/', { id: '@id' }, {
- update: { method: 'PUT' }
- });
- }]);
-})();
-//# sourceMappingURL=../../maps/services/rest/Sites.js.map
-
-'use strict';
-
-(function () {
- 'use strict';
-
- angular.module('xos.helpers')
- /**
- * @ngdoc service
- * @name xos.helpers.Services
- * @description Angular resource to fetch /api/core/services/:id/
- **/
- .service('Services', ["$resource", function ($resource) {
- return $resource('/api/core/services/:id/', { id: '@id' }, {
- update: { method: 'PUT' }
- });
- }]);
-})();
-//# sourceMappingURL=../../maps/services/rest/Services.js.map
-
-'use strict';
-
-(function () {
- 'use strict';
-
- angular.module('xos.helpers')
- /**
- * @ngdoc service
- * @name xos.helpers.ONOS-Services-Collection
- * @description Angular resource to fetch /api/service/onos/
- **/
- .service('ONOS-Services-Collection', ["$resource", function ($resource) {
- return $resource('/api/service/onos/');
- }]);
-})();
-//# sourceMappingURL=../../maps/services/rest/ONOS-Services.js.map
-
-'use strict';
-
-(function () {
- 'use strict';
-
- angular.module('xos.helpers')
- /**
- * @ngdoc service
- * @name xos.helpers.ONOS-App-Collection
- * @description Angular resource to fetch /api/tenant/onos/app/
- **/
- .service('ONOS-App-Collection', ["$resource", function ($resource) {
- return $resource('/api/tenant/onos/app/');
- }]);
-})();
-//# sourceMappingURL=../../maps/services/rest/ONOS-Apps.js.map
-
-'use strict';
-
-(function () {
- 'use strict';
-
- angular.module('xos.helpers')
- /**
- * @ngdoc service
- * @name xos.helpers.Nodes
- * @description Angular resource to fetch /api/core/nodes/:id/
- **/
- .service('Nodes', ["$resource", function ($resource) {
- return $resource('/api/core/nodes/:id/', { id: '@id' }, {
- update: { method: 'PUT' }
- });
- }]);
-})();
-//# sourceMappingURL=../../maps/services/rest/Nodes.js.map
-
-'use strict';
-
-(function () {
- 'use strict';
-
- angular.module('xos.helpers')
- /**
- * @ngdoc service
- * @name xos.helpers.Networks
- * @description Angular resource to fetch /api/core/networks/:id/
- **/
- .service('Networks', ["$resource", function ($resource) {
- return $resource('/api/core/networks/:id/', { id: '@id' }, {
- update: { method: 'PUT' }
- });
- }]);
-})();
-//# sourceMappingURL=../../maps/services/rest/Networks.js.map
-
-'use strict';
-
-(function () {
- 'use strict';
-
- angular.module('xos.helpers')
- /**
- * @ngdoc service
- * @name xos.helpers.Instances
- * @description Angular resource to fetch /api/core/instances/:id/
- **/
- .service('Instances', ["$resource", function ($resource) {
- return $resource('/api/core/instances/:id/', { id: '@id' }, {
- update: { method: 'PUT' }
- });
- }]);
-})();
-//# sourceMappingURL=../../maps/services/rest/Instances.js.map
-
-'use strict';
-
-(function () {
- 'use strict';
-
- angular.module('xos.helpers')
- /**
- * @ngdoc service
- * @name xos.helpers.Flavors
- * @description Angular resource to fetch /api/core/flavors/:id/
- **/
- .service('Flavors', ["$resource", function ($resource) {
- return $resource('/api/core/flavors/:id/', { id: '@id' }, {
- update: { method: 'PUT' }
- });
- }]);
-})();
-//# sourceMappingURL=../../maps/services/rest/Flavors.js.map
-
-'use strict';
-
-(function () {
- 'use strict';
-
- angular.module('xos.helpers')
- /**
- * @ngdoc service
- * @name xos.helpers.Example-Services-Collection
- * @description Angular resource to fetch /api/service/exampleservice/
- **/
- .service('Example-Services-Collection', ["$resource", function ($resource) {
- return $resource('/api/service/exampleservice/');
- }]);
-})();
-//# sourceMappingURL=../../maps/services/rest/Example.js.map
-
-'use strict';
-
-(function () {
- 'use strict';
-
- angular.module('xos.helpers')
- /**
- * @ngdoc service
- * @name xos.helpers.Deployments
- * @description Angular resource to fetch /api/core/deployments/:id/
- **/
- .service('Deployments', ["$resource", function ($resource) {
- return $resource('/api/core/deployments/:id/', { id: '@id' }, {
- update: { method: 'PUT' }
- });
- }]);
-})();
-//# sourceMappingURL=../../maps/services/rest/Deployments.js.map
-
-'use strict';
-
-(function () {
- 'use strict';
-
- /**
- * @ngdoc service
- * @name xos.helpers.ServiceGraph
- * @description This factory define a set of helper function to query the service tenancy graph
- **/
-
- angular.module('xos.helpers').service('GraphService', ["$q", "Tenants", "Services", function ($q, Tenants, Services) {
- var _this = this;
-
- this.loadCoarseData = function () {
-
- var services = void 0;
-
- var deferred = $q.defer();
-
- Services.query().$promise.then(function (res) {
- services = res;
- return Tenants.query({ kind: 'coarse' }).$promise;
- }).then(function (tenants) {
- deferred.resolve({
- tenants: tenants,
- services: services
- });
- });
-
- return deferred.promise;
- };
-
- this.getCoarseGraph = function () {
- _this.loadCoarseData().then(function (res) {
- console.log(res);
- });
- return 'ciao';
- };
- }]);
-})();
-//# sourceMappingURL=../maps/services/service_graph.service.js.map
-
-'use strict';
-
-(function () {
- 'use strict';
-
- /**
- * @ngdoc service
- * @name xos.helpers.NoHyperlinks
- * @description This factory is automatically loaded trough xos.helpers and will add an $http interceptor that will add ?no_hyperlinks=1 to your api request, that is required by django
- **/
-
- angular.module('xos.helpers').factory('NoHyperlinks', noHyperlinks);
-
- function noHyperlinks() {
- return {
- request: function request(_request) {
- if (_request.url.indexOf('.html') === -1) {
- _request.url += '?no_hyperlinks=1';
- }
- return _request;
- }
- };
- }
-})();
-//# sourceMappingURL=../maps/services/noHyperlinks.interceptor.js.map
-
-'use strict';
-
-// TODO write tests for log
-
-angular.module('xos.helpers').config(['$provide', function ($provide) {
- // Use the `decorator` solution to substitute or attach behaviors to
- // original service instance; @see angular-mocks for more examples....
-
- $provide.decorator('$log', ['$delegate', function ($delegate) {
-
- var isLogEnabled = function isLogEnabled() {
- return window.location.href.indexOf('debug=true') >= 0;
- };
- // Save the original $log.debug()
- var debugFn = $delegate.info;
-
- // create the replacement function
- var replacement = function replacement(fn) {
- return function () {
- if (!isLogEnabled()) {
- console.log('logging is disabled');
- return;
- }
- var args = [].slice.call(arguments);
- var now = new Date();
-
- // Prepend timestamp
- args[0] = '[' + now.getHours() + ':' + now.getMinutes() + ':' + now.getSeconds() + '] ' + args[0];
-
- // Call the original with the output prepended with formatted timestamp
- fn.apply(null, args);
- };
- };
-
- $delegate.info = replacement(debugFn);
-
- return $delegate;
- }]);
-}]);
-//# sourceMappingURL=../maps/services/log.decorator.js.map
-
-'use strict';
-
-(function () {
- 'use strict';
-
- /**
- * @ngdoc service
- * @name xos.helpers.LabelFormatter
- * @description This factory define a set of helper function to format label started from an object property
- **/
-
- angular.module('xos.uiComponents').factory('LabelFormatter', labelFormatter);
-
- function labelFormatter() {
-
- var _formatByUnderscore = function _formatByUnderscore(string) {
- return string.split('_').join(' ').trim();
- };
-
- var _formatByUppercase = function _formatByUppercase(string) {
- return string.split(/(?=[A-Z])/).map(function (w) {
- return w.toLowerCase();
- }).join(' ');
- };
-
- var _capitalize = function _capitalize(string) {
- return string.slice(0, 1).toUpperCase() + string.slice(1);
- };
-
- var format = function format(string) {
- string = _formatByUnderscore(string);
- string = _formatByUppercase(string);
-
- string = _capitalize(string).replace(/\s\s+/g, ' ') + ':';
- return string.replace('::', ':');
- };
-
- return {
- // test export
- _formatByUnderscore: _formatByUnderscore,
- _formatByUppercase: _formatByUppercase,
- _capitalize: _capitalize,
- // export to use
- format: format
- };
- }
-})();
-//# sourceMappingURL=../maps/services/label_formatter.service.js.map
-
-'use strict';
-
-(function () {
- 'use strict';
-
- /**
- * @ngdoc service
- * @name xos.helpers.SetCSRFToken
- * @description This factory is automatically loaded trough xos.helpers and will add an $http interceptor that will the CSRF-Token to your request headers
- **/
-
- setCSRFToken.$inject = ["$cookies"];
- angular.module('xos.helpers').factory('SetCSRFToken', setCSRFToken);
-
- function setCSRFToken($cookies) {
- return {
- request: function request(_request) {
- if (_request.method !== 'GET') {
- _request.headers['X-CSRFToken'] = $cookies.get('xoscsrftoken');
- }
- return _request;
- }
- };
- }
-})();
-//# sourceMappingURL=../maps/services/csrfToken.interceptor.js.map
+"use strict";!function(){angular.module("xos.uiComponents",["chart.js"])}(),function(){angular.module("xos.uiComponents").directive("xosValidation",function(){return{restrict:"E",scope:{errors:"="},template:'\n <div ng-cloak>\n <!-- <pre>{{vm.errors.email | json}}</pre> -->\n <xos-alert config="vm.config" show="vm.errors.required !== undefined && vm.errors.required !== false">\n Field required\n </xos-alert>\n <xos-alert config="vm.config" show="vm.errors.email !== undefined && vm.errors.email !== false">\n This is not a valid email\n </xos-alert>\n <xos-alert config="vm.config" show="vm.errors.minlength !== undefined && vm.errors.minlength !== false">\n Too short\n </xos-alert>\n <xos-alert config="vm.config" show="vm.errors.maxlength !== undefined && vm.errors.maxlength !== false">\n Too long\n </xos-alert>\n <xos-alert config="vm.config" show="vm.errors.custom !== undefined && vm.errors.custom !== false">\n Field invalid\n </xos-alert>\n </div>\n ',transclude:!0,bindToController:!0,controllerAs:"vm",controller:function(){this.config={type:"danger"}}}})}(),function(){angular.module("xos.uiComponents").directive("xosTable",function(){return{restrict:"E",scope:{data:"=",config:"="},template:'\n <div ng-show="vm.data.length > 0">\n <div class="row" ng-if="vm.config.filter == \'fulltext\'">\n <div class="col-xs-12">\n <input\n class="form-control"\n placeholder="Type to search.."\n type="text"\n ng-model="vm.query"/>\n </div>\n </div>\n <table ng-class="vm.classes" ng-hide="vm.data.length == 0">\n <thead>\n <tr>\n <th ng-repeat="col in vm.columns">\n {{col.label}}\n <span ng-if="vm.config.order">\n <a href="" ng-click="vm.orderBy = col.prop; vm.reverse = false">\n <i class="glyphicon glyphicon-chevron-up"></i>\n </a>\n <a href="" ng-click="vm.orderBy = col.prop; vm.reverse = true">\n <i class="glyphicon glyphicon-chevron-down"></i>\n </a>\n </span>\n </th>\n <th ng-if="vm.config.actions">Actions:</th>\n </tr>\n </thead>\n <tbody ng-if="vm.config.filter == \'field\'">\n <tr>\n <td ng-repeat="col in vm.columns">\n <input\n class="form-control"\n placeholder="Type to search by {{col.label}}"\n type="text"\n ng-model="vm.query[col.prop]"/>\n </td>\n <td ng-if="vm.config.actions"></td>\n </tr>\n </tbody>\n <tbody>\n <tr ng-repeat="item in vm.data | filter:vm.query | orderBy:vm.orderBy:vm.reverse | pagination:vm.currentPage * vm.config.pagination.pageSize | limitTo: (vm.config.pagination.pageSize || vm.data.length) track by $index">\n <td ng-repeat="col in vm.columns" link-wrapper>\n <span ng-if="!col.type">{{item[col.prop]}}</span>\n <span ng-if="col.type === \'boolean\'">\n <i class="glyphicon"\n ng-class="{\'glyphicon-ok\': item[col.prop], \'glyphicon-remove\': !item[col.prop]}">\n </i>\n </span>\n <span ng-if="col.type === \'date\'">\n {{item[col.prop] | date:\'H:mm MMM d, yyyy\'}}\n </span>\n <span ng-if="col.type === \'array\'">\n {{item[col.prop] | arrayToList}}\n </span>\n <span ng-if="col.type === \'object\'">\n <dl class="dl-horizontal">\n <span ng-repeat="(k,v) in item[col.prop]">\n <dt>{{k}}</dt>\n <dd>{{v}}</dd>\n </span>\n </dl>\n </span>\n <span ng-if="col.type === \'custom\'">\n {{col.formatter(item)}}\n </span>\n <span ng-if="col.type === \'icon\'">\n <i class="glyphicon glyphicon-{{col.formatter(item)}}">\n </i>\n </span>\n </td>\n <td ng-if="vm.config.actions">\n <a href=""\n ng-repeat="action in vm.config.actions"\n ng-click="action.cb(item)"\n title="{{action.label}}">\n <i\n class="glyphicon glyphicon-{{action.icon}}"\n style="color: {{action.color}};"></i>\n </a>\n </td>\n </tr>\n </tbody>\n </table>\n <xos-pagination\n ng-if="vm.config.pagination"\n page-size="vm.config.pagination.pageSize"\n total-elements="vm.data.length"\n change="vm.goToPage">\n </xos-pagination>\n </div>\n <div ng-show="vm.data.length == 0 || !vm.data">\n <xos-alert config="{type: \'info\'}">\n No data to show.\n </xos-alert>\n </div>\n ',bindToController:!0,controllerAs:"vm",controller:["_",function(e){var n=this;if(!this.config)throw new Error('[xosTable] Please provide a configuration via the "config" attribute');if(!this.config.columns)throw new Error("[xosTable] Please provide a columns list in the configuration");this.config.order&&angular.isObject(this.config.order)&&(this.reverse=this.config.order.reverse||!1,this.orderBy=this.config.order.field||"id");var o=e.filter(this.config.columns,{type:"custom"});angular.isArray(o)&&o.length>0&&e.forEach(o,function(e){if(!e.formatter||!angular.isFunction(e.formatter))throw new Error("[xosTable] You have provided a custom field type, a formatter function should provided too.")});var r=e.filter(this.config.columns,{type:"icon"});angular.isArray(r)&&r.length>0&&e.forEach(r,function(e){if(!e.formatter||!angular.isFunction(e.formatter))throw new Error("[xosTable] You have provided an icon field type, a formatter function should provided too.")});var t=e.filter(this.config.columns,function(e){return angular.isDefined(e.link)});angular.isArray(t)&&t.length>0&&e.forEach(t,function(e){if(!angular.isFunction(e.link))throw new Error("[xosTable] The link property should be a function.")}),this.columns=this.config.columns,this.classes=this.config.classes||"table table-striped table-bordered",this.config.actions,this.config.pagination&&(this.currentPage=0,this.goToPage=function(e){n.currentPage=e})}]}}).filter("arrayToList",function(){return function(e){return angular.isArray(e)?e.join(", "):e}}).directive("linkWrapper",function(){return{restrict:"A",transclude:!0,template:'\n <a ng-if="col.link" href="{{col.link(item)}}">\n <div ng-transclude></div>\n </a>\n <div ng-transclude ng-if="!col.link"></div>\n '}})}(),function(){angular.module("xos.uiComponents").directive("xosPagination",function(){return{restrict:"E",scope:{pageSize:"=",totalElements:"=",change:"="},template:'\n <div class="row" ng-if="vm.pageList.length > 1">\n <div class="col-xs-12 text-center">\n <ul class="pagination">\n <li\n ng-click="vm.goToPage(vm.currentPage - 1)"\n ng-class="{disabled: vm.currentPage == 0}">\n <a href="" aria-label="Previous">\n <span aria-hidden="true">«</span>\n </a>\n </li>\n <li ng-repeat="i in vm.pageList" ng-class="{active: i === vm.currentPage}">\n <a href="" ng-click="vm.goToPage(i)">{{i + 1}}</a>\n </li>\n <li\n ng-click="vm.goToPage(vm.currentPage + 1)"\n ng-class="{disabled: vm.currentPage == vm.pages - 1}">\n <a href="" aria-label="Next">\n <span aria-hidden="true">»</span>\n </a>\n </li>\n </ul>\n </div>\n </div>\n ',bindToController:!0,controllerAs:"vm",controller:["$scope",function(e){var n=this;this.currentPage=0,this.goToPage=function(e){0>e||e===n.pages||(n.currentPage=e,n.change(e))},this.createPages=function(e){for(var n=[],o=0;e>o;o++)n.push(o);return n},e.$watch(function(){return n.totalElements},function(){n.totalElements&&(n.pages=Math.ceil(n.totalElements/n.pageSize),n.pageList=n.createPages(n.pages))})}]}}).filter("pagination",function(){return function(e,n){return e&&angular.isArray(e)?(n=parseInt(n,10),e.slice(n)):e}})}();var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};!function(){angular.module("xos.uiComponents").directive("xosForm",function(){return{restrict:"E",scope:{config:"=",ngModel:"="},template:'\n <ng-form name="vm.{{vm.config.formName || \'form\'}}">\n <div class="form-group" ng-repeat="(name, field) in vm.formField">\n <label>{{field.label}}</label>\n <input\n ng-if="field.type !== \'boolean\'"\n type="{{field.type}}"\n name="{{name}}"\n class="form-control"\n ng-model="vm.ngModel[name]"\n ng-minlength="field.validators.minlength || 0"\n ng-maxlength="field.validators.maxlength || 2000"\n ng-required="field.validators.required || false" />\n <span class="boolean-field" ng-if="field.type === \'boolean\'">\n <button\n class="btn btn-success"\n ng-show="vm.ngModel[name]"\n ng-click="vm.ngModel[name] = false">\n <i class="glyphicon glyphicon-ok"></i>\n </button>\n <button\n class="btn btn-danger"\n ng-show="!vm.ngModel[name]"\n ng-click="vm.ngModel[name] = true">\n <i class="glyphicon glyphicon-remove"></i>\n </button>\n </span>\n <!-- <pre>{{vm[vm.config.formName][name].$error | json}}</pre> -->\n <xos-validation errors="vm[vm.config.formName || \'form\'][name].$error"></xos-validation>\n </div>\n <div class="form-group" ng-if="vm.config.actions">\n <button role="button" href=""\n ng-repeat="action in vm.config.actions"\n ng-click="action.cb(vm.ngModel)"\n class="btn btn-{{action.class}}"\n title="{{action.label}}">\n <i class="glyphicon glyphicon-{{action.icon}}"></i>\n {{action.label}}\n </button>\n </div>\n </ng-form>\n ',bindToController:!0,controllerAs:"vm",controller:["$scope","$log","_","XosFormHelpers",function(e,n,o,r){var t=this;if(!this.config)throw new Error('[xosForm] Please provide a configuration via the "config" attribute');if(!this.config.actions)throw new Error("[xosForm] Please provide an action list in the configuration");this.excludedField=["id","validators","created","updated","deleted","backend_status"],this.config&&this.config.exclude&&(this.excludedField=this.excludedField.concat(this.config.exclude)),this.formField=[],e.$watch(function(){return t.ngModel},function(e){if(t.formField={},e){var n=o.difference(Object.keys(e),t.excludedField),i=r.parseModelField(n);t.formField=r.buildFormStructure(i,t.config.fields,e)}})}]}}).service("XosFormHelpers",["_","LabelFormatter",function(e,n){var o=this;this._isEmail=function(e){var n=/(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))/;return n.test(e)},this._getFieldFormat=function(n){return e.isDate(n)||!Number.isNaN(Date.parse(n))&&new Date(n).getTime()>6311808e5?"date":"boolean"==typeof n?"boolean":isNaN(n)||null===n?o._isEmail(n)?"email":null===n?"string":"undefined"==typeof n?"undefined":_typeof(n):"number"},this.buildFormStructure=function(r,t,i){return r=Object.keys(r).length>0?r:t,t=t||{},e.reduce(Object.keys(r),function(e,r){return e[r]={label:t[r]&&t[r].label?t[r].label+":":n.format(r),type:t[r]&&t[r].type?t[r].type:o._getFieldFormat(i[r]),validators:t[r]&&t[r].validators?t[r].validators:{}},"date"===e[r].type&&(i[r]=new Date(i[r])),"number"===e[r].type&&(i[r]=parseInt(i[r],10)),e},{})},this.parseModelField=function(n){return e.reduce(n,function(e,n){return e[n]={},e},{})}}])}(),function(){angular.module("xos.uiComponents").directive("xosAlert",function(){return{restrict:"E",scope:{config:"=",show:"=?"},template:'\n <div ng-cloak class="alert alert-{{vm.config.type}}" ng-hide="!vm.show">\n <button type="button" class="close" ng-if="vm.config.closeBtn" ng-click="vm.dismiss()">\n <span aria-hidden="true">×</span>\n </button>\n <p ng-transclude></p>\n </div>\n ',transclude:!0,bindToController:!0,controllerAs:"vm",controller:["$timeout",function(e){var n=this;if(!this.config)throw new Error('[xosAlert] Please provide a configuration via the "config" attribute');this.show=this.show!==!1,this.dismiss=function(){n.show=!1},this.config.autoHide&&!function(){var o=e(function(){n.dismiss(),e.cancel(o)},n.config.autoHide)}()}]}})}(),function(){angular.module("xos.uiComponents").directive("xosSmartTable",function(){return{restrict:"E",scope:{config:"="},template:'\n <div class="row" ng-show="vm.data.length > 0">\n <div class="col-xs-12 text-right">\n <a href="" class="btn btn-success" ng-click="vm.createItem()">\n Add\n </a>\n </div>\n </div>\n <div class="row">\n <div class="col-xs-12 table-responsive">\n <xos-table config="vm.tableConfig" data="vm.data"></xos-table>\n </div>\n </div>\n <div class="panel panel-default" ng-show="vm.detailedItem">\n <div class="panel-heading">\n <div class="row">\n <div class="col-xs-11">\n <h3 class="panel-title" ng-show="vm.detailedItem.id">Update {{vm.config.resource}} {{vm.detailedItem.id}}</h3>\n <h3 class="panel-title" ng-show="!vm.detailedItem.id">Create {{vm.config.resource}} item</h3>\n </div>\n <div class="col-xs-1">\n <a href="" ng-click="vm.cleanForm()">\n <i class="glyphicon glyphicon-remove pull-right"></i>\n </a>\n </div>\n </div>\n </div>\n <div class="panel-body">\n <xos-form config="vm.formConfig" ng-model="vm.detailedItem"></xos-form>\n </div>\n </div>\n <xos-alert config="{type: \'success\', closeBtn: true}" show="vm.responseMsg">{{vm.responseMsg}}</xos-alert>\n <xos-alert config="{type: \'danger\', closeBtn: true}" show="vm.responseErr">{{vm.responseErr}}</xos-alert>\n ',bindToController:!0,controllerAs:"vm",controller:["$injector","LabelFormatter","_","XosFormHelpers",function(e,n,o,r){var t=this;this.responseMsg=!1,this.responseErr=!1,this.tableConfig={columns:[],actions:[{label:"delete",icon:"remove",cb:function(e){t.Resource["delete"]({id:e.id}).$promise.then(function(){o.remove(t.data,function(n){return n.id===e.id}),t.responseMsg=t.config.resource+" with id "+e.id+" successfully deleted"})["catch"](function(n){t.responseErr=n.data.detail||"Error while deleting "+t.config.resource+" with id "+e.id})},color:"red"},{label:"details",icon:"search",cb:function(e){t.detailedItem=e}}],classes:"table table-striped table-bordered table-responsive",filter:"field",order:!0,pagination:{pageSize:10}},this.formConfig={exclude:this.config.hiddenFields,fields:{},formName:this.config.resource+"Form",actions:[{label:"Save",icon:"ok",cb:function(e){var n=void 0,o=!0;e.id?(n=e.$update(),o=!1):n=e.$save(),n.then(function(n){o&&t.data.push(angular.copy(n)),delete t.detailedItem,t.responseMsg=t.config.resource+" with id "+e.id+" successfully saved"})["catch"](function(n){t.responseErr=n.data.detail||"Error while saving "+t.config.resource+" with id "+e.id})},"class":"success"}]},this.cleanForm=function(){delete t.detailedItem},this.createItem=function(){t.detailedItem=new t.Resource},this.Resource=e.get(this.config.resource);var i=function(){t.Resource.query().$promise.then(function(e){if(e[0]){var i=e[0],a=Object.keys(i);o.remove(a,function(e){return"id"==e||"validators"==e}),angular.isArray(t.config.hiddenFields)&&(a=o.difference(a,t.config.hiddenFields));var s=a.map(function(e){return n.format(e)});a.forEach(function(e,n){t.tableConfig.columns.push({label:s[n],prop:e})}),a.forEach(function(e,o){t.formConfig.fields[e]={label:n.format(s[o]).replace(":",""),type:r._getFieldFormat(i[e])}}),t.data=e}})};i()}]}})}(),function(){angular.module("xos.uiComponents").directive("xosSmartPie",function(){return{restrict:"E",scope:{config:"="},template:'\n <canvas\n class="chart chart-pie {{vm.config.classes}}"\n chart-data="vm.data" chart-labels="vm.labels"\n chart-legend="{{vm.config.legend}}">\n </canvas>\n ',bindToController:!0,controllerAs:"vm",controller:["$injector","$interval","$scope","$timeout","_",function(e,n,o,r,t){var i=this;if(!this.config.resource&&!this.config.data)throw new Error("[xosSmartPie] Please provide a resource or an array of data in the configuration");var a=function(e){return t.groupBy(e,i.config.groupBy)},s=function(e){return t.reduce(Object.keys(e),function(n,o){return n.concat(e[o].length)},[])},c=function(e){return angular.isFunction(i.config.labelFormatter)?i.config.labelFormatter(Object.keys(e)):Object.keys(e)},l=function(e){var n=a(e);i.data=s(n),i.labels=c(n)};this.config.resource?!function(){i.Resource=e.get(i.config.resource);var o=function(){i.Resource.query().$promise.then(function(e){e[0]&&l(e)})};o(),i.config.poll&&n(function(){o()},1e3*i.config.poll)}():o.$watch(function(){return i.config.data},function(e){e&&l(i.config.data)},!0),o.$on("create",function(e,n){console.log("create: "+n.id)}),o.$on("destroy",function(e,n){console.log("destroy: "+n.id)})}]}})}(),function(){function e(e,n,o){e.interceptors.push("SetCSRFToken"),n.startSymbol("{$"),n.endSymbol("$}"),o.defaults.stripTrailingSlashes=!1}e.$inject=["$httpProvider","$interpolateProvider","$resourceProvider"],angular.module("bugSnag",[]).factory("$exceptionHandler",function(){return function(e,n){window.Bugsnag?Bugsnag.notifyException(e,{diagnostics:{cause:n}}):console.error(e,n,e.stack)}}),angular.module("xos.helpers",["ngCookies","ngResource","ngAnimate","bugSnag","xos.uiComponents"]).config(e).factory("_",["$window",function(e){return e._}])}(),function(){angular.module("xos.helpers").service("vSG-Collection",["$resource",function(e){return e("/api/service/vsg/")}])}(),function(){angular.module("xos.helpers").service("vOLT-Collection",["$resource",function(e){return e("/api/tenant/cord/volt/:volt_id/",{volt_id:"@id"},{update:{method:"PUT"}})}])}(),function(){angular.module("xos.helpers").service("Login",["$resource",function(e){return e("/api/utility/login/")}]).service("Logout",["$resource",function(e){return e("/api/utility/logout/")}])}(),function(){angular.module("xos.helpers").service("Users",["$resource",function(e){return e("/api/core/users/:id/",{id:"@id"},{update:{method:"PUT"}})}])}(),function(){angular.module("xos.helpers").service("Truckroll",["$resource",function(e){return e("/api/tenant/truckroll/:id/",{id:"@id"},{update:{method:"PUT"}})}])}(),function(){angular.module("xos.helpers").service("Tenants",["$resource",function(e){return e("/api/core/tenants/:id/",{id:"@id"},{update:{method:"PUT"}})}])}(),function(){angular.module("xos.helpers").service("Subscribers",["$resource",function(e){return e("/api/tenant/cord/subscriber/:id/",{id:"@id"},{update:{method:"PUT"},"View-a-Subscriber-Features-Detail":{method:"GET",isArray:!1,url:"/api/tenant/cord/subscriber/:id/features/"},"Read-Subscriber-uplink_speed":{method:"GET",isArray:!1,url:"/api/tenant/cord/subscriber/:id/features/uplink_speed/"},"Update-Subscriber-uplink_speed":{method:"PUT",isArray:!1,url:"/api/tenant/cord/subscriber/:id/features/uplink_speed/"},"Read-Subscriber-downlink_speed":{method:"GET",isArray:!1,url:"/api/tenant/cord/subscriber/:id/features/downlink_speed/"},"Update-Subscriber-downlink_speed":{method:"PUT",isArray:!1,url:"/api/tenant/cord/subscriber/:id/features/downlink_speed/"},"Read-Subscriber-cdn":{method:"GET",isArray:!1,url:"/api/tenant/cord/subscriber/:id/features/cdn/"},"Update-Subscriber-cdn":{method:"PUT",isArray:!1,url:"/api/tenant/cord/subscriber/:id/features/cdn/"},"Read-Subscriber-uverse":{method:"GET",isArray:!1,url:"/api/tenant/cord/subscriber/:id/features/uverse/"},"Update-Subscriber-uverse":{method:"PUT",isArray:!1,url:"/api/tenant/cord/subscriber/:id/features/uverse/"},"Read-Subscriber-status":{method:"GET",isArray:!1,url:"/api/tenant/cord/subscriber/:id/features/status/"},"Update-Subscriber-status":{method:"PUT",isArray:!1,url:"/api/tenant/cord/subscriber/:id/features/status/"}})}])}(),function(){angular.module("xos.helpers").service("SlicesPlus",["$http","$q",function(e,n){this.query=function(o){var r=n.defer();return e.get("/api/utility/slicesplus/",{params:o}).then(function(e){r.resolve(e.data)})["catch"](function(e){r.reject(e.data)}),{$promise:r.promise}}}])}(),function(){angular.module("xos.helpers").service("Slices",["$resource",function(e){return e("/api/core/slices/:id/",{id:"@id"},{update:{method:"PUT"}})}])}(),function(){angular.module("xos.helpers").service("Sites",["$resource",function(e){return e("/api/core/sites/:id/",{id:"@id"},{update:{method:"PUT"}})}])}(),function(){angular.module("xos.helpers").service("Services",["$resource",function(e){return e("/api/core/services/:id/",{id:"@id"},{update:{method:"PUT"}})}])}(),function(){angular.module("xos.helpers").service("ONOS-Services-Collection",["$resource",function(e){return e("/api/service/onos/")}])}(),function(){angular.module("xos.helpers").service("ONOS-App-Collection",["$resource",function(e){return e("/api/tenant/onos/app/")}])}(),function(){angular.module("xos.helpers").service("Nodes",["$resource",function(e){return e("/api/core/nodes/:id/",{id:"@id"},{update:{method:"PUT"}})}])}(),function(){angular.module("xos.helpers").service("Networks",["$resource",function(e){return e("/api/core/networks/:id/",{id:"@id"},{update:{method:"PUT"}})}])}(),function(){angular.module("xos.helpers").service("Instances",["$resource",function(e){return e("/api/core/instances/:id/",{id:"@id"},{update:{method:"PUT"}})}])}(),function(){angular.module("xos.helpers").service("Flavors",["$resource",function(e){return e("/api/core/flavors/:id/",{id:"@id"},{update:{method:"PUT"}})}])}(),function(){angular.module("xos.helpers").service("Example-Services-Collection",["$resource",function(e){return e("/api/service/exampleservice/")}])}(),function(){angular.module("xos.helpers").service("Deployments",["$resource",function(e){return e("/api/core/deployments/:id/",{id:"@id"},{update:{method:"PUT"}})}])}(),function(){angular.module("xos.helpers").service("GraphService",["$q","Tenants","Services",function(e,n,o){var r=this;this.loadCoarseData=function(){var r=void 0,t=e.defer();return o.query().$promise.then(function(e){return r=e,n.query({kind:"coarse"}).$promise}).then(function(e){t.resolve({tenants:e,services:r})}),t.promise},this.getCoarseGraph=function(){return r.loadCoarseData().then(function(e){console.log(e)}),"ciao"}}])}(),function(){function e(){return{request:function(e){return-1===e.url.indexOf(".html")&&(e.url+="?no_hyperlinks=1"),e}}}angular.module("xos.helpers").factory("NoHyperlinks",e)}(),angular.module("xos.helpers").config(["$provide",function(e){e.decorator("$log",["$delegate",function(e){var n=function(){return window.location.href.indexOf("debug=true")>=0},o=e.log,r=e.info,t=e.warn,i=e.error,a=e.debug,s=function(o){return function(){if(n()){var r=[].slice.call(arguments),t=new Date;r[0]="["+t.getHours()+":"+t.getMinutes()+":"+t.getSeconds()+"] "+r[0],"function"!=typeof e.reset||e.debug.logs instanceof Array||e.reset(),o.apply(null,r)}}};return e.info=s(r),e.log=s(o),e.warn=s(t),e.error=s(i),e.debug=s(a),e}])}]),function(){function e(){var e=function(e){return e.split("_").join(" ").trim()},n=function(e){return e.split(/(?=[A-Z])/).map(function(e){return e.toLowerCase()}).join(" ")},o=function(e){return e.slice(0,1).toUpperCase()+e.slice(1)},r=function(r){return r=e(r),r=n(r),r=o(r).replace(/\s\s+/g," ")+":",r.replace("::",":")};return{_formatByUnderscore:e,_formatByUppercase:n,_capitalize:o,format:r}}angular.module("xos.uiComponents").factory("LabelFormatter",e)}(),function(){function e(e){return{request:function(n){return"GET"!==n.method&&(n.headers["X-CSRFToken"]=e.get("xoscsrftoken")),n}}}e.$inject=["$cookies"],angular.module("xos.helpers").factory("SetCSRFToken",e)}();
\ No newline at end of file
diff --git a/xos/core/xoslib/static/js/vendor/ngXosVendor.js b/xos/core/xoslib/static/js/vendor/ngXosVendor.js
index ea7ffa1..ab8f370 100644
--- a/xos/core/xoslib/static/js/vendor/ngXosVendor.js
+++ b/xos/core/xoslib/static/js/vendor/ngXosVendor.js
@@ -1,18 +1,16 @@
-!function(t,n,e){"use strict";function r(t,n){return n=n||Error,function(){var e,r,i=2,o=arguments,a=o[0],u="["+(t?t+":":"")+a+"] ",s=o[1];for(u+=s.replace(/\{\d+\}/g,function(t){var n=+t.slice(1,-1),e=n+i;return e<o.length?$t(o[e]):t}),u+="\nhttp://errors.angularjs.org/1.4.7/"+(t?t+"/":"")+a,r=i,e="?";r<o.length;r++,e="&")u+=e+"p"+(r-i)+"="+encodeURIComponent($t(o[r]));return new n(u)}}function i(t){if(null==t||A(t))return!1;var n="length"in Object(t)&&t.length;return t.nodeType===Yr&&n?!0:_(t)||Dr(t)||0===n||"number"==typeof n&&n>0&&n-1 in t}function o(t,n,e){var r,a;if(t)if(M(t))for(r in t)"prototype"==r||"length"==r||"name"==r||t.hasOwnProperty&&!t.hasOwnProperty(r)||n.call(e,t[r],r,t);else if(Dr(t)||i(t)){var u="object"!=typeof t;for(r=0,a=t.length;a>r;r++)(u||r in t)&&n.call(e,t[r],r,t)}else if(t.forEach&&t.forEach!==o)t.forEach(n,e,t);else if(w(t))for(r in t)n.call(e,t[r],r,t);else if("function"==typeof t.hasOwnProperty)for(r in t)t.hasOwnProperty(r)&&n.call(e,t[r],r,t);else for(r in t)br.call(t,r)&&n.call(e,t[r],r,t);return t}function a(t,n,e){for(var r=Object.keys(t).sort(),i=0;i<r.length;i++)n.call(e,t[r[i]],r[i]);return r}function u(t){return function(n,e){t(e,n)}}function s(){return++Nr}function l(t,n){n?t.$$hashKey=n:delete t.$$hashKey}function c(t,n,e){for(var r=t.$$hashKey,i=0,o=n.length;o>i;++i){var a=n[i];if(b(a)||M(a))for(var u=Object.keys(a),s=0,f=u.length;f>s;s++){var h=u[s],p=a[h];e&&b(p)?S(p)?t[h]=new Date(p.valueOf()):k(p)?t[h]=new RegExp(p):(b(t[h])||(t[h]=Dr(p)?[]:{}),c(t[h],[p],!0)):t[h]=p}}return l(t,r),t}function f(t){return c(t,Er.call(arguments,1),!1)}function h(t){return c(t,Er.call(arguments,1),!0)}function p(t){return parseInt(t,10)}function d(t,n){return f(Object.create(t),n)}function v(){}function g(t){return t}function m(t){return function(){return t}}function y(t){return M(t.toString)&&t.toString!==Object.prototype.toString}function $(t){return"undefined"==typeof t}function x(t){return"undefined"!=typeof t}function b(t){return null!==t&&"object"==typeof t}function w(t){return null!==t&&"object"==typeof t&&!jr(t)}function _(t){return"string"==typeof t}function C(t){return"number"==typeof t}function S(t){return"[object Date]"===Tr.call(t)}function M(t){return"function"==typeof t}function k(t){return"[object RegExp]"===Tr.call(t)}function A(t){return t&&t.window===t}function E(t){return t&&t.$evalAsync&&t.$watch}function P(t){return"[object File]"===Tr.call(t)}function O(t){return"[object FormData]"===Tr.call(t)}function T(t){return"[object Blob]"===Tr.call(t)}function j(t){return"boolean"==typeof t}function L(t){return t&&M(t.then)}function R(t){return Ir.test(Tr.call(t))}function N(t){return!(!t||!(t.nodeName||t.prop&&t.attr&&t.find))}function F(t){var n,e={},r=t.split(",");for(n=0;n<r.length;n++)e[r[n]]=!0;return e}function D(t){return xr(t.nodeName||t[0]&&t[0].nodeName)}function I(t,n){var e=t.indexOf(n);return e>=0&&t.splice(e,1),e}function z(t,n,e,r){if(A(t)||E(t))throw Lr("cpws","Can't copy! Making copies of Window or Scope instances is not supported.");if(R(n))throw Lr("cpta","Can't copy! TypedArray destination cannot be mutated.");if(n){if(t===n)throw Lr("cpi","Can't copy! Source and destination are identical.");e=e||[],r=r||[],b(t)&&(e.push(t),r.push(n));var i;if(Dr(t)){n.length=0;for(var a=0;a<t.length;a++)n.push(z(t[a],null,e,r))}else{var u=n.$$hashKey;if(Dr(n)?n.length=0:o(n,function(t,e){delete n[e]}),w(t))for(i in t)n[i]=z(t[i],null,e,r);else if(t&&"function"==typeof t.hasOwnProperty)for(i in t)t.hasOwnProperty(i)&&(n[i]=z(t[i],null,e,r));else for(i in t)br.call(t,i)&&(n[i]=z(t[i],null,e,r));l(n,u)}}else if(n=t,b(t)){var s;if(e&&-1!==(s=e.indexOf(t)))return r[s];if(Dr(t))return z(t,[],e,r);if(R(t))n=new t.constructor(t);else if(S(t))n=new Date(t.getTime());else if(k(t))n=new RegExp(t.source,t.toString().match(/[^\/]*$/)[0]),n.lastIndex=t.lastIndex;else{if(!M(t.cloneNode)){var c=Object.create(jr(t));return z(t,c,e,r)}n=t.cloneNode(!0)}r&&(e.push(t),r.push(n))}return n}function q(t,n){if(Dr(t)){n=n||[];for(var e=0,r=t.length;r>e;e++)n[e]=t[e]}else if(b(t)){n=n||{};for(var i in t)"$"===i.charAt(0)&&"$"===i.charAt(1)||(n[i]=t[i])}return n||t}function V(t,n){if(t===n)return!0;if(null===t||null===n)return!1;if(t!==t&&n!==n)return!0;var e,r,i,o=typeof t,a=typeof n;if(o==a&&"object"==o){if(!Dr(t)){if(S(t))return S(n)?V(t.getTime(),n.getTime()):!1;if(k(t))return k(n)?t.toString()==n.toString():!1;if(E(t)||E(n)||A(t)||A(n)||Dr(n)||S(n)||k(n))return!1;i=gt();for(r in t)if("$"!==r.charAt(0)&&!M(t[r])){if(!V(t[r],n[r]))return!1;i[r]=!0}for(r in n)if(!(r in i)&&"$"!==r.charAt(0)&&x(n[r])&&!M(n[r]))return!1;return!0}if(!Dr(n))return!1;if((e=t.length)==n.length){for(r=0;e>r;r++)if(!V(t[r],n[r]))return!1;return!0}}return!1}function B(t,n,e){return t.concat(Er.call(n,e))}function W(t,n){return Er.call(t,n||0)}function U(t,n){var e=arguments.length>2?W(arguments,2):[];return!M(n)||n instanceof RegExp?n:e.length?function(){return arguments.length?n.apply(t,B(e,arguments,0)):n.apply(t,e)}:function(){return arguments.length?n.apply(t,arguments):n.call(t)}}function H(t,r){var i=r;return"string"==typeof t&&"$"===t.charAt(0)&&"$"===t.charAt(1)?i=e:A(r)?i="$WINDOW":r&&n===r?i="$DOCUMENT":E(r)&&(i="$SCOPE"),i}function Y(t,n){return"undefined"==typeof t?e:(C(n)||(n=n?2:null),JSON.stringify(t,H,n))}function G(t){return _(t)?JSON.parse(t):t}function X(t,n){var e=Date.parse("Jan 01, 1970 00:00:00 "+t)/6e4;return isNaN(e)?n:e}function Z(t,n){return t=new Date(t.getTime()),t.setMinutes(t.getMinutes()+n),t}function J(t,n,e){e=e?-1:1;var r=X(n,t.getTimezoneOffset());return Z(t,e*(r-t.getTimezoneOffset()))}function K(t){t=Mr(t).clone();try{t.empty()}catch(n){}var e=Mr("<div>").append(t).html();try{return t[0].nodeType===Xr?xr(e):e.match(/^(<[^>]+>)/)[1].replace(/^<([\w\-]+)/,function(t,n){return"<"+xr(n)})}catch(n){return xr(e)}}function Q(t){try{return decodeURIComponent(t)}catch(n){}}function tt(t){var n={};return o((t||"").split("&"),function(t){var e,r,i;t&&(r=t=t.replace(/\+/g,"%20"),e=t.indexOf("="),-1!==e&&(r=t.substring(0,e),i=t.substring(e+1)),r=Q(r),x(r)&&(i=x(i)?Q(i):!0,br.call(n,r)?Dr(n[r])?n[r].push(i):n[r]=[n[r],i]:n[r]=i))}),n}function nt(t){var n=[];return o(t,function(t,e){Dr(t)?o(t,function(t){n.push(rt(e,!0)+(t===!0?"":"="+rt(t,!0)))}):n.push(rt(e,!0)+(t===!0?"":"="+rt(t,!0)))}),n.length?n.join("&"):""}function et(t){return rt(t,!0).replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+")}function rt(t,n){return encodeURIComponent(t).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%3B/gi,";").replace(/%20/g,n?"%20":"+")}function it(t,n){var e,r,i=Wr.length;for(r=0;i>r;++r)if(e=Wr[r]+n,_(e=t.getAttribute(e)))return e;return null}function ot(t,n){var e,r,i={};o(Wr,function(n){var i=n+"app";!e&&t.hasAttribute&&t.hasAttribute(i)&&(e=t,r=t.getAttribute(i))}),o(Wr,function(n){var i,o=n+"app";!e&&(i=t.querySelector("["+o.replace(":","\\:")+"]"))&&(e=i,r=i.getAttribute(o))}),e&&(i.strictDi=null!==it(e,"strict-di"),n(e,r?[r]:[],i))}function at(e,r,i){b(i)||(i={});var a={strictDi:!1};i=f(a,i);var u=function(){if(e=Mr(e),e.injector()){var t=e[0]===n?"document":K(e);throw Lr("btstrpd","App Already Bootstrapped with this Element '{0}'",t.replace(/</,"<").replace(/>/,">"))}r=r||[],r.unshift(["$provide",function(t){t.value("$rootElement",e)}]),i.debugInfoEnabled&&r.push(["$compileProvider",function(t){t.debugInfoEnabled(!0)}]),r.unshift("ng");var o=Kt(r,i.strictDi);return o.invoke(["$rootScope","$rootElement","$compile","$injector",function(t,n,e,r){t.$apply(function(){n.data("$injector",r),e(n)(t)})}]),o},s=/^NG_ENABLE_DEBUG_INFO!/,l=/^NG_DEFER_BOOTSTRAP!/;return t&&s.test(t.name)&&(i.debugInfoEnabled=!0,t.name=t.name.replace(s,"")),t&&!l.test(t.name)?u():(t.name=t.name.replace(l,""),Rr.resumeBootstrap=function(t){return o(t,function(t){r.push(t)}),u()},void(M(Rr.resumeDeferredBootstrap)&&Rr.resumeDeferredBootstrap()))}function ut(){t.name="NG_ENABLE_DEBUG_INFO!"+t.name,t.location.reload()}function st(t){var n=Rr.element(t).injector();if(!n)throw Lr("test","no injector found for element argument to getTestability");return n.get("$$testability")}function lt(t,n){return n=n||"_",t.replace(Ur,function(t,e){return(e?n:"")+t.toLowerCase()})}function ct(){var n;if(!Hr){var r=Br();kr=$(r)?t.jQuery:r?t[r]:e,kr&&kr.fn.on?(Mr=kr,f(kr.fn,{scope:pi.scope,isolateScope:pi.isolateScope,controller:pi.controller,injector:pi.injector,inheritedData:pi.inheritedData}),n=kr.cleanData,kr.cleanData=function(t){var e;if(Fr)Fr=!1;else for(var r,i=0;null!=(r=t[i]);i++)e=kr._data(r,"events"),e&&e.$destroy&&kr(r).triggerHandler("$destroy");n(t)}):Mr=At,Rr.element=Mr,Hr=!0}}function ft(t,n,e){if(!t)throw Lr("areq","Argument '{0}' is {1}",n||"?",e||"required");return t}function ht(t,n,e){return e&&Dr(t)&&(t=t[t.length-1]),ft(M(t),n,"not a function, got "+(t&&"object"==typeof t?t.constructor.name||"Object":typeof t)),t}function pt(t,n){if("hasOwnProperty"===t)throw Lr("badname","hasOwnProperty is not a valid {0} name",n)}function dt(t,n,e){if(!n)return t;for(var r,i=n.split("."),o=t,a=i.length,u=0;a>u;u++)r=i[u],t&&(t=(o=t)[r]);return!e&&M(t)?U(o,t):t}function vt(t){for(var n,e=t[0],r=t[t.length-1],i=1;e!==r&&(e=e.nextSibling);i++)(n||t[i]!==e)&&(n||(n=Mr(Er.call(t,0,i))),n.push(e));return n||t}function gt(){return Object.create(null)}function mt(t){function n(t,n,e){return t[n]||(t[n]=e())}var e=r("$injector"),i=r("ng"),o=n(t,"angular",Object);return o.$$minErr=o.$$minErr||r,n(o,"module",function(){var t={};return function(r,o,a){var u=function(t,n){if("hasOwnProperty"===t)throw i("badname","hasOwnProperty is not a valid {0} name",n)};return u(r,"module"),o&&t.hasOwnProperty(r)&&(t[r]=null),n(t,r,function(){function t(t,n,e,r){return r||(r=i),function(){return r[e||"push"]([t,n,arguments]),c}}function n(t,n){return function(e,o){return o&&M(o)&&(o.$$moduleName=r),i.push([t,n,arguments]),c}}if(!o)throw e("nomod","Module '{0}' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.",r);var i=[],u=[],s=[],l=t("$injector","invoke","push",u),c={_invokeQueue:i,_configBlocks:u,_runBlocks:s,requires:o,name:r,provider:n("$provide","provider"),factory:n("$provide","factory"),service:n("$provide","service"),value:t("$provide","value"),constant:t("$provide","constant","unshift"),decorator:n("$provide","decorator"),animation:n("$animateProvider","register"),filter:n("$filterProvider","register"),controller:n("$controllerProvider","register"),directive:n("$compileProvider","directive"),config:l,run:function(t){return s.push(t),this}};return a&&l(a),c})}})}function yt(t){var n=[];return JSON.stringify(t,function(t,e){if(e=H(t,e),b(e)){if(n.indexOf(e)>=0)return"...";n.push(e)}return e})}function $t(t){return"function"==typeof t?t.toString().replace(/ \{[\s\S]*$/,""):$(t)?"undefined":"string"!=typeof t?yt(t):t}function xt(n){f(n,{bootstrap:at,copy:z,extend:f,merge:h,equals:V,element:Mr,forEach:o,injector:Kt,noop:v,bind:U,toJson:Y,fromJson:G,identity:g,isUndefined:$,isDefined:x,isString:_,isFunction:M,isObject:b,isNumber:C,isElement:N,isArray:Dr,version:Qr,isDate:S,lowercase:xr,uppercase:wr,callbacks:{counter:0},getTestability:st,$$minErr:r,$$csp:Vr,reloadWithDebugInfo:ut}),(Ar=mt(t))("ng",["ngLocale"],["$provide",function(t){t.provider({$$sanitizeUri:me}),t.provider("$compile",ln).directive({a:po,input:Oo,textarea:Oo,form:$o,script:_a,select:Ma,style:Aa,option:ka,ngBind:Lo,ngBindHtml:No,ngBindTemplate:Ro,ngClass:Do,ngClassEven:zo,ngClassOdd:Io,ngCloak:qo,ngController:Vo,ngForm:xo,ngHide:ma,ngIf:Uo,ngInclude:Ho,ngInit:Go,ngNonBindable:sa,ngPluralize:ha,ngRepeat:pa,ngShow:ga,ngStyle:ya,ngSwitch:$a,ngSwitchWhen:xa,ngSwitchDefault:ba,ngOptions:fa,ngTransclude:wa,ngModel:oa,ngList:Xo,ngChange:Fo,pattern:Pa,ngPattern:Pa,required:Ea,ngRequired:Ea,minlength:Ta,ngMinlength:Ta,maxlength:Oa,ngMaxlength:Oa,ngValue:jo,ngModelOptions:ua}).directive({ngInclude:Yo}).directive(vo).directive(Bo),t.provider({$anchorScroll:Qt,$animate:Ai,$animateCss:Ei,$$animateQueue:ki,$$AnimateRunner:Mi,$browser:an,$cacheFactory:un,$controller:dn,$document:vn,$exceptionHandler:gn,$filter:Oe,$$forceReflow:Li,$interpolate:Pn,$interval:On,$http:Mn,$httpParamSerializer:yn,$httpParamSerializerJQLike:$n,$httpBackend:An,$xhrFactory:kn,$location:Un,$log:Hn,$parse:fe,$rootScope:ge,$q:he,$$q:pe,$sce:be,$sceDelegate:xe,$sniffer:we,$templateCache:sn,$templateRequest:_e,$$testability:Ce,$timeout:Se,$window:Ae,$$rAF:ve,$$jqLite:Yt,$$HashMap:mi,$$cookieReader:Pe})}])}function bt(){return++ni}function wt(t){return t.replace(ii,function(t,n,e,r){return r?e.toUpperCase():e}).replace(oi,"Moz$1")}function _t(t){return!li.test(t)}function Ct(t){var n=t.nodeType;return n===Yr||!n||n===Jr}function St(t){for(var n in ti[t.ng339])return!0;return!1}function Mt(t,n){var e,r,i,a,u=n.createDocumentFragment(),s=[];if(_t(t))s.push(n.createTextNode(t));else{for(e=e||u.appendChild(n.createElement("div")),r=(ci.exec(t)||["",""])[1].toLowerCase(),i=hi[r]||hi._default,e.innerHTML=i[1]+t.replace(fi,"<$1></$2>")+i[2],a=i[0];a--;)e=e.lastChild;s=B(s,e.childNodes),e=u.firstChild,e.textContent=""}return u.textContent="",u.innerHTML="",o(s,function(t){u.appendChild(t)}),u}function kt(t,e){e=e||n;var r;return(r=si.exec(t))?[e.createElement(r[1])]:(r=Mt(t,e))?r.childNodes:[]}function At(t){if(t instanceof At)return t;var n;if(_(t)&&(t=zr(t),n=!0),!(this instanceof At)){if(n&&"<"!=t.charAt(0))throw ui("nosel","Looking up elements via selectors is not supported by jqLite! See: http://docs.angularjs.org/api/angular.element");return new At(t)}n?Dt(this,kt(t)):Dt(this,t)}function Et(t){return t.cloneNode(!0)}function Pt(t,n){if(n||Tt(t),t.querySelectorAll)for(var e=t.querySelectorAll("*"),r=0,i=e.length;i>r;r++)Tt(e[r])}function Ot(t,n,e,r){if(x(r))throw ui("offargs","jqLite#off() does not support the `selector` argument");var i=jt(t),a=i&&i.events,u=i&&i.handle;if(u)if(n)o(n.split(" "),function(n){if(x(e)){var r=a[n];if(I(r||[],e),r&&r.length>0)return}ri(t,n,u),delete a[n]});else for(n in a)"$destroy"!==n&&ri(t,n,u),delete a[n]}function Tt(t,n){var r=t.ng339,i=r&&ti[r];if(i){if(n)return void delete i.data[n];i.handle&&(i.events.$destroy&&i.handle({},"$destroy"),Ot(t)),delete ti[r],t.ng339=e}}function jt(t,n){var r=t.ng339,i=r&&ti[r];return n&&!i&&(t.ng339=r=bt(),i=ti[r]={events:{},data:{},handle:e}),i}function Lt(t,n,e){if(Ct(t)){var r=x(e),i=!r&&n&&!b(n),o=!n,a=jt(t,!i),u=a&&a.data;if(r)u[n]=e;else{if(o)return u;if(i)return u&&u[n];f(u,n)}}}function Rt(t,n){return t.getAttribute?(" "+(t.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").indexOf(" "+n+" ")>-1:!1}function Nt(t,n){n&&t.setAttribute&&o(n.split(" "),function(n){t.setAttribute("class",zr((" "+(t.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").replace(" "+zr(n)+" "," ")))})}function Ft(t,n){if(n&&t.setAttribute){var e=(" "+(t.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ");o(n.split(" "),function(t){t=zr(t),-1===e.indexOf(" "+t+" ")&&(e+=t+" ")}),t.setAttribute("class",zr(e))}}function Dt(t,n){if(n)if(n.nodeType)t[t.length++]=n;else{var e=n.length;if("number"==typeof e&&n.window!==n){if(e)for(var r=0;e>r;r++)t[t.length++]=n[r]}else t[t.length++]=n}}function It(t,n){return zt(t,"$"+(n||"ngController")+"Controller")}function zt(t,n,e){t.nodeType==Jr&&(t=t.documentElement);for(var r=Dr(n)?n:[n];t;){for(var i=0,o=r.length;o>i;i++)if(x(e=Mr.data(t,r[i])))return e;t=t.parentNode||t.nodeType===Kr&&t.host}}function qt(t){for(Pt(t,!0);t.firstChild;)t.removeChild(t.firstChild)}function Vt(t,n){n||Pt(t);var e=t.parentNode;e&&e.removeChild(t)}function Bt(n,e){e=e||t,"complete"===e.document.readyState?e.setTimeout(n):Mr(e).on("load",n)}function Wt(t,n){var e=di[n.toLowerCase()];return e&&vi[D(t)]&&e}function Ut(t){return gi[t]}function Ht(t,n){var e=function(e,r){e.isDefaultPrevented=function(){return e.defaultPrevented};var i=n[r||e.type],o=i?i.length:0;if(o){if($(e.immediatePropagationStopped)){var a=e.stopImmediatePropagation;e.stopImmediatePropagation=function(){e.immediatePropagationStopped=!0,e.stopPropagation&&e.stopPropagation(),a&&a.call(e)}}e.isImmediatePropagationStopped=function(){return e.immediatePropagationStopped===!0},o>1&&(i=q(i));for(var u=0;o>u;u++)e.isImmediatePropagationStopped()||i[u].call(t,e)}};return e.elem=t,e}function Yt(){this.$get=function(){return f(At,{hasClass:function(t,n){return t.attr&&(t=t[0]),Rt(t,n)},addClass:function(t,n){return t.attr&&(t=t[0]),Ft(t,n)},removeClass:function(t,n){return t.attr&&(t=t[0]),Nt(t,n)}})}}function Gt(t,n){var e=t&&t.$$hashKey;if(e)return"function"==typeof e&&(e=t.$$hashKey()),e;var r=typeof t;return e="function"==r||"object"==r&&null!==t?t.$$hashKey=r+":"+(n||s)():r+":"+t}function Xt(t,n){if(n){var e=0;this.nextUid=function(){return++e}}o(t,this.put,this)}function Zt(t){var n=t.toString().replace(bi,""),e=n.match(yi);return e?"function("+(e[1]||"").replace(/[\s\r\n]+/," ")+")":"fn"}function Jt(t,n,e){var r,i,a,u;if("function"==typeof t){if(!(r=t.$inject)){if(r=[],t.length){if(n)throw _(e)&&e||(e=t.name||Zt(t)),wi("strictdi","{0} is not using explicit annotation and cannot be invoked in strict mode",e);i=t.toString().replace(bi,""),a=i.match(yi),o(a[1].split($i),function(t){t.replace(xi,function(t,n,e){r.push(e)})})}t.$inject=r}}else Dr(t)?(u=t.length-1,ht(t[u],"fn"),r=t.slice(0,u)):ht(t,"fn",!0);return r}function Kt(t,n){function r(t){return function(n,e){return b(n)?void o(n,u(t)):t(n,e)}}function i(t,n){if(pt(t,"service"),(M(n)||Dr(n))&&(n=C.instantiate(n)),!n.$get)throw wi("pget","Provider '{0}' must define $get factory method.",t);return w[t+g]=n}function a(t,n){return function(){var e=k.invoke(n,this);if($(e))throw wi("undef","Provider '{0}' must return a value from $get factory method.",t);return e}}function s(t,n,e){return i(t,{$get:e!==!1?a(t,n):n})}function l(t,n){return s(t,["$injector",function(t){return t.instantiate(n)}])}function c(t,n){return s(t,m(n),!1)}function f(t,n){pt(t,"constant"),w[t]=n,S[t]=n}function h(t,n){var e=C.get(t+g),r=e.$get;e.$get=function(){var t=k.invoke(r,e);return k.invoke(n,null,{$delegate:t})}}function p(t){ft($(t)||Dr(t),"modulesToLoad","not an array");var n,e=[];return o(t,function(t){function r(t){var n,e;for(n=0,e=t.length;e>n;n++){var r=t[n],i=C.get(r[0]);i[r[1]].apply(i,r[2])}}if(!x.get(t)){x.put(t,!0);try{_(t)?(n=Ar(t),e=e.concat(p(n.requires)).concat(n._runBlocks),r(n._invokeQueue),r(n._configBlocks)):M(t)?e.push(C.invoke(t)):Dr(t)?e.push(C.invoke(t)):ht(t,"module")}catch(i){throw Dr(t)&&(t=t[t.length-1]),i.message&&i.stack&&-1==i.stack.indexOf(i.message)&&(i=i.message+"\n"+i.stack),wi("modulerr","Failed to instantiate module {0} due to:\n{1}",t,i.stack||i.message||i)}}}),e}function d(t,e){function r(n,r){if(t.hasOwnProperty(n)){if(t[n]===v)throw wi("cdep","Circular dependency found: {0}",n+" <- "+y.join(" <- "));return t[n]}try{return y.unshift(n),t[n]=v,t[n]=e(n,r)}catch(i){throw t[n]===v&&delete t[n],i}finally{y.shift()}}function i(t,e,i,o){"string"==typeof i&&(o=i,i=null);var a,u,s,l=[],c=Kt.$$annotate(t,n,o);for(u=0,a=c.length;a>u;u++){if(s=c[u],"string"!=typeof s)throw wi("itkn","Incorrect injection token! Expected service name as string, got {0}",s);l.push(i&&i.hasOwnProperty(s)?i[s]:r(s,o))}return Dr(t)&&(t=t[a]),t.apply(e,l)}function o(t,n,e){var r=Object.create((Dr(t)?t[t.length-1]:t).prototype||null),o=i(t,r,n,e);return b(o)||M(o)?o:r}return{invoke:i,instantiate:o,get:r,annotate:Kt.$$annotate,has:function(n){return w.hasOwnProperty(n+g)||t.hasOwnProperty(n)}}}n=n===!0;var v={},g="Provider",y=[],x=new Xt([],!0),w={$provide:{provider:r(i),factory:r(s),service:r(l),value:r(c),constant:r(f),decorator:h}},C=w.$injector=d(w,function(t,n){throw Rr.isString(n)&&y.push(n),wi("unpr","Unknown provider: {0}",y.join(" <- "))}),S={},k=S.$injector=d(S,function(t,n){var r=C.get(t+g,n);return k.invoke(r.$get,r,e,t)});return o(p(t),function(t){t&&k.invoke(t)}),k}function Qt(){var t=!0;this.disableAutoScrolling=function(){t=!1},this.$get=["$window","$location","$rootScope",function(n,e,r){function i(t){var n=null;return Array.prototype.some.call(t,function(t){return"a"===D(t)?(n=t,!0):void 0}),n}function o(){var t=u.yOffset;if(M(t))t=t();else if(N(t)){var e=t[0],r=n.getComputedStyle(e);t="fixed"!==r.position?0:e.getBoundingClientRect().bottom}else C(t)||(t=0);return t}function a(t){if(t){t.scrollIntoView();var e=o();if(e){var r=t.getBoundingClientRect().top;n.scrollBy(0,r-e)}}else n.scrollTo(0,0)}function u(t){t=_(t)?t:e.hash();var n;t?(n=s.getElementById(t))?a(n):(n=i(s.getElementsByName(t)))?a(n):"top"===t&&a(null):a(null)}var s=n.document;return t&&r.$watch(function(){return e.hash()},function(t,n){t===n&&""===t||Bt(function(){r.$evalAsync(u)})}),u}]}function tn(t,n){return t||n?t?n?(Dr(t)&&(t=t.join(" ")),Dr(n)&&(n=n.join(" ")),t+" "+n):t:n:""}function nn(t){for(var n=0;n<t.length;n++){var e=t[n];if(e.nodeType===Ci)return e}}function en(t){_(t)&&(t=t.split(" "));var n=gt();return o(t,function(t){t.length&&(n[t]=!0)}),n}function rn(t){return b(t)?t:{}}function on(t,n,e,r){function i(t){try{t.apply(null,W(arguments,1))}finally{if(y--,0===y)for(;x.length;)try{x.pop()()}catch(n){e.error(n)}}}function a(t){var n=t.indexOf("#");return-1===n?"":t.substr(n)}function u(){S=null,l(),c()}function s(){try{return p.state}catch(t){}}function l(){b=s(),b=$(b)?null:b,V(b,A)&&(b=A),A=b}function c(){_===f.url()&&w===b||(_=f.url(),w=b,o(M,function(t){t(f.url(),b)}))}var f=this,h=(n[0],t.location),p=t.history,d=t.setTimeout,g=t.clearTimeout,m={};f.isMock=!1;var y=0,x=[];f.$$completeOutstandingRequest=i,f.$$incOutstandingRequestCount=function(){y++},f.notifyWhenNoOutstandingRequests=function(t){0===y?t():x.push(t)};var b,w,_=h.href,C=n.find("base"),S=null;l(),w=b,f.url=function(n,e,i){if($(i)&&(i=null),h!==t.location&&(h=t.location),p!==t.history&&(p=t.history),n){var o=w===i;if(_===n&&(!r.history||o))return f;var u=_&&Nn(_)===Nn(n);return _=n,w=i,!r.history||u&&o?(u&&!S||(S=n),e?h.replace(n):u?h.hash=a(n):h.href=n,h.href!==n&&(S=n)):(p[e?"replaceState":"pushState"](i,"",n),l(),w=b),f}return S||h.href.replace(/%27/g,"'")},f.state=function(){return b};var M=[],k=!1,A=null;f.onUrlChange=function(n){return k||(r.history&&Mr(t).on("popstate",u),Mr(t).on("hashchange",u),k=!0),M.push(n),n},f.$$applicationDestroyed=function(){Mr(t).off("hashchange popstate",u)},f.$$checkUrlChange=c,f.baseHref=function(){var t=C.attr("href");return t?t.replace(/^(https?\:)?\/\/[^\/]*/,""):""},f.defer=function(t,n){var e;return y++,e=d(function(){delete m[e],i(t)},n||0),m[e]=!0,e},f.defer.cancel=function(t){return m[t]?(delete m[t],g(t),i(v),!0):!1}}function an(){this.$get=["$window","$log","$sniffer","$document",function(t,n,e,r){return new on(t,r,n,e)}]}function un(){this.$get=function(){function t(t,e){function i(t){t!=h&&(p?p==t&&(p=t.n):p=t,o(t.n,t.p),o(t,h),h=t,h.n=null)}function o(t,n){t!=n&&(t&&(t.p=n),n&&(n.n=t))}if(t in n)throw r("$cacheFactory")("iid","CacheId '{0}' is already taken!",t);var a=0,u=f({},e,{id:t}),s={},l=e&&e.capacity||Number.MAX_VALUE,c={},h=null,p=null;return n[t]={put:function(t,n){if(!$(n)){if(l<Number.MAX_VALUE){var e=c[t]||(c[t]={key:t});i(e)}return t in s||a++,s[t]=n,a>l&&this.remove(p.key),n}},get:function(t){if(l<Number.MAX_VALUE){var n=c[t];if(!n)return;i(n)}return s[t]},remove:function(t){if(l<Number.MAX_VALUE){var n=c[t];if(!n)return;n==h&&(h=n.p),n==p&&(p=n.n),o(n.n,n.p),delete c[t]}delete s[t],a--},removeAll:function(){s={},a=0,c={},h=p=null},destroy:function(){s=null,u=null,c=null,delete n[t]},info:function(){return f({},u,{size:a})}}}var n={};return t.info=function(){var t={};return o(n,function(n,e){t[e]=n.info()}),t},t.get=function(t){return n[t]},t}}function sn(){this.$get=["$cacheFactory",function(t){return t("templates")}]}function ln(t,r){function i(t,n,e){var r=/^\s*([@&]|=(\*?))(\??)\s*(\w*)\s*$/,i={};return o(t,function(t,o){var a=t.match(r);if(!a)throw Pi("iscp","Invalid {3} for directive '{0}'. Definition: {... {1}: '{2}' ...}",n,o,t,e?"controller bindings definition":"isolate scope definition");i[o]={mode:a[1][0],collection:"*"===a[2],optional:"?"===a[3],attrName:a[4]||o}}),i}function a(t,n){var e={isolateScope:null,bindToController:null};if(b(t.scope)&&(t.bindToController===!0?(e.bindToController=i(t.scope,n,!0),e.isolateScope={}):e.isolateScope=i(t.scope,n,!1)),b(t.bindToController)&&(e.bindToController=i(t.bindToController,n,!0)),b(e.bindToController)){var r=t.controller,o=t.controllerAs;if(!r)throw Pi("noctrl","Cannot bind to controller without directive '{0}'s controller.",n);if(!pn(r,o))throw Pi("noident","Cannot bind to controller without identifier for directive '{0}'.",n)}return e}function s(t){var n=t.charAt(0);if(!n||n!==xr(n))throw Pi("baddir","Directive name '{0}' is invalid. The first character must be a lowercase letter",t);if(t!==t.trim())throw Pi("baddir","Directive name '{0}' is invalid. The name should not contain leading or trailing whitespaces",t)}var l={},c="Directive",h=/^\s*directive\:\s*([\w\-]+)\s+(.*)$/,p=/(([\w\-]+)(?:\:([^;]+))?;?)/,y=F("ngSrc,ngSrcset,src,srcset"),w=/^(?:(\^\^?)?(\?)?(\^\^?)?)?/,C=/^(on[a-z]+|formaction)$/;this.directive=function k(n,e){return pt(n,"directive"),_(n)?(s(n),ft(e,"directiveFactory"),l.hasOwnProperty(n)||(l[n]=[],t.factory(n+c,["$injector","$exceptionHandler",function(t,e){var r=[];return o(l[n],function(i,o){try{var u=t.invoke(i);M(u)?u={compile:m(u)}:!u.compile&&u.link&&(u.compile=m(u.link)),u.priority=u.priority||0,u.index=o,u.name=u.name||n,u.require=u.require||u.controller&&u.name,u.restrict=u.restrict||"EA";var s=u.$$bindings=a(u,u.name);b(s.isolateScope)&&(u.$$isolateBindings=s.isolateScope),u.$$moduleName=i.$$moduleName,r.push(u)}catch(l){e(l)}}),r}])),l[n].push(e)):o(n,u(k)),this},this.aHrefSanitizationWhitelist=function(t){return x(t)?(r.aHrefSanitizationWhitelist(t),this):r.aHrefSanitizationWhitelist()},this.imgSrcSanitizationWhitelist=function(t){return x(t)?(r.imgSrcSanitizationWhitelist(t),this):r.imgSrcSanitizationWhitelist()};var S=!0;this.debugInfoEnabled=function(t){return x(t)?(S=t,this):S},this.$get=["$injector","$interpolate","$exceptionHandler","$templateRequest","$parse","$controller","$rootScope","$document","$sce","$animate","$$sanitizeUri",function(t,r,i,a,u,s,m,x,k,A,P){function O(t,n){try{t.addClass(n)}catch(e){}}function T(t,n,e,r,i){t instanceof Mr||(t=Mr(t)),o(t,function(n,e){n.nodeType==Xr&&n.nodeValue.match(/\S+/)&&(t[e]=Mr(n).wrap("<span></span>").parent()[0])});var a=L(t,n,t,e,r,i);T.$$addScopeClass(t);var u=null;return function(n,e,r){ft(n,"scope"),r=r||{};var i=r.parentBoundTranscludeFn,o=r.transcludeControllers,s=r.futureParentElement;i&&i.$$boundTransclude&&(i=i.$$boundTransclude),u||(u=j(s));var l;if(l="html"!==u?Mr(Q(u,Mr("<div>").append(t).html())):e?pi.clone.call(t):t,o)for(var c in o)l.data("$"+c+"Controller",o[c].instance);return T.$$addScopeInfo(l,n),e&&e(l,n),a&&a(n,l,l,i),l}}function j(t){var n=t&&t[0];return n&&"foreignobject"!==D(n)&&n.toString().match(/SVG/)?"svg":"html"}function L(t,n,r,i,o,a){function u(t,r,i,o){var a,u,s,l,c,f,h,p,g;if(d){var m=r.length;for(g=new Array(m),c=0;c<v.length;c+=3)h=v[c],g[h]=r[h]}else g=r;for(c=0,f=v.length;f>c;)if(s=g[v[c++]],a=v[c++],u=v[c++],a){if(a.scope){l=t.$new(),T.$$addScopeInfo(Mr(s),l);var y=a.$$destroyBindings;y&&(a.$$destroyBindings=null,l.$on("$destroyed",y))}else l=t;p=a.transcludeOnThisElement?R(t,a.transclude,o):!a.templateOnThisElement&&o?o:!o&&n?R(t,n):null,a(u,l,s,i,p,a)}else u&&u(t,s.childNodes,e,o)}for(var s,l,c,f,h,p,d,v=[],g=0;g<t.length;g++)s=new at,l=N(t[g],[],s,0===g?i:e,o),c=l.length?q(l,t[g],s,n,r,null,[],[],a):null,c&&c.scope&&T.$$addScopeClass(s.$$element),h=c&&c.terminal||!(f=t[g].childNodes)||!f.length?null:L(f,c?(c.transcludeOnThisElement||!c.templateOnThisElement)&&c.transclude:n),(c||h)&&(v.push(g,c,h),p=!0,d=d||c),a=null;return p?u:null}function R(t,n,e){var r=function(r,i,o,a,u){return r||(r=t.$new(!1,u),r.$$transcluded=!0),n(r,i,{parentBoundTranscludeFn:e,transcludeControllers:o,futureParentElement:a})};return r}function N(t,n,e,r,i){var o,a,u=t.nodeType,s=e.$attr;switch(u){case Yr:U(n,cn(D(t)),"E",r,i);for(var l,c,f,d,v,g,m=t.attributes,y=0,$=m&&m.length;$>y;y++){var x=!1,w=!1;l=m[y],c=l.name,v=zr(l.value),d=cn(c),(g=ht.test(d))&&(c=c.replace(Oi,"").substr(8).replace(/_(.)/g,function(t,n){return n.toUpperCase()}));var C=d.replace(/(Start|End)$/,"");H(C)&&d===C+"Start"&&(x=c,w=c.substr(0,c.length-5)+"end",c=c.substr(0,c.length-6)),f=cn(c.toLowerCase()),s[f]=c,!g&&e.hasOwnProperty(f)||(e[f]=v,Wt(t,f)&&(e[f]=!0)),nt(t,n,v,f,g),U(n,f,"A",r,i,x,w)}if(a=t.className,b(a)&&(a=a.animVal),_(a)&&""!==a)for(;o=p.exec(a);)f=cn(o[2]),U(n,f,"C",r,i)&&(e[f]=zr(o[3])),a=a.substr(o.index+o[0].length);break;case Xr:if(11===Sr)for(;t.parentNode&&t.nextSibling&&t.nextSibling.nodeType===Xr;)t.nodeValue=t.nodeValue+t.nextSibling.nodeValue,t.parentNode.removeChild(t.nextSibling);J(n,t.nodeValue);break;case Zr:try{o=h.exec(t.nodeValue),o&&(f=cn(o[1]),U(n,f,"M",r,i)&&(e[f]=zr(o[2])))}catch(S){}}return n.sort(X),n}function F(t,n,e){var r=[],i=0;if(n&&t.hasAttribute&&t.hasAttribute(n)){do{if(!t)throw Pi("uterdir","Unterminated attribute, found '{0}' but no matching '{1}' found.",n,e);t.nodeType==Yr&&(t.hasAttribute(n)&&i++,t.hasAttribute(e)&&i--),r.push(t),t=t.nextSibling}while(i>0)}else r.push(t);return Mr(r)}function z(t,n,e){return function(r,i,o,a,u){return i=F(i[0],n,e),t(r,i,o,a,u)}}function q(t,r,o,a,u,l,c,f,h){function p(t,n,e,r){t&&(e&&(t=z(t,e,r)),t.require=m.require,t.directiveName=y,(P===m||m.$$isolateScope)&&(t=rt(t,{isolateScope:!0})),c.push(t)),n&&(e&&(n=z(n,e,r)),n.require=m.require,n.directiveName=y,(P===m||m.$$isolateScope)&&(n=rt(n,{isolateScope:!0})),f.push(n))}function d(t,n,e,r){var i;if(_(n)){var o=n.match(w),a=n.substring(o[0].length),u=o[1]||o[3],s="?"===o[2];if("^^"===u?e=e.parent():(i=r&&r[a],i=i&&i.instance),!i){var l="$"+a+"Controller";i=u?e.inheritedData(l):e.data(l)}if(!i&&!s)throw Pi("ctreq","Controller '{0}', required by directive '{1}', can't be found!",a,t)}else if(Dr(n)){i=[];for(var c=0,f=n.length;f>c;c++)i[c]=d(t,n[c],e,r)}return i||null}function v(t,n,e,r,i,o){var a=gt();for(var u in r){var l=r[u],c={$scope:l===P||l.$$isolateScope?i:o,$element:t,$attrs:n,$transclude:e},f=l.controller;"@"==f&&(f=n[l.name]);var h=s(f,c,!0,l.controllerAs);a[l.name]=h,D||t.data("$"+l.name+"Controller",h.instance)}return a}function g(t,n,i,a,u,s){function l(t,n,r){var i;return E(t)||(r=n,n=t,t=e),D&&(i=$),r||(r=D?b.parent():b),u(t,n,i,r,j)}var h,p,g,m,y,$,x,b,w;if(r===i?(w=o,b=o.$$element):(b=Mr(i),w=new at(b,o)),P&&(y=n.$new(!0)),u&&(x=l,x.$$boundTransclude=u),A&&($=v(b,w,x,A,y,n)),P&&(T.$$addScopeInfo(b,y,!0,!(O&&(O===P||O===P.$$originalDirective))),T.$$addScopeClass(b,!0),y.$$isolateBindings=P.$$isolateBindings,ot(n,w,y,y.$$isolateBindings,P,y)),$){var _,C,S=P||k;S&&$[S.name]&&(_=S.$$bindings.bindToController,m=$[S.name],m&&m.identifier&&_&&(C=m,s.$$destroyBindings=ot(n,w,m.instance,_,S)));for(h in $){m=$[h];var M=m();M!==m.instance&&(m.instance=M,b.data("$"+h+"Controller",M),m===C&&(s.$$destroyBindings(),s.$$destroyBindings=ot(n,w,M,_,S)))}}for(h=0,p=c.length;p>h;h++)g=c[h],it(g,g.isolateScope?y:n,b,w,g.require&&d(g.directiveName,g.require,b,$),x);var j=n;for(P&&(P.template||null===P.templateUrl)&&(j=y),t&&t(j,i.childNodes,e,u),h=f.length-1;h>=0;h--)g=f[h],it(g,g.isolateScope?y:n,b,w,g.require&&d(g.directiveName,g.require,b,$),x)}h=h||{};for(var m,y,$,x,C,S=-Number.MAX_VALUE,k=h.newScopeDirective,A=h.controllerDirectives,P=h.newIsolateScopeDirective,O=h.templateDirective,j=h.nonTlbTranscludeDirective,L=!1,R=!1,D=h.hasElementTranscludeDirective,I=o.$$element=Mr(r),q=l,V=a,U=0,H=t.length;H>U;U++){m=t[U];var X=m.$$start,J=m.$$end;if(X&&(I=F(r,X,J)),$=e,S>m.priority)break;if((C=m.scope)&&(m.templateUrl||(b(C)?(Z("new/isolated scope",P||k,m,I),P=m):Z("new/isolated scope",P,m,I)),k=k||m),y=m.name,!m.templateUrl&&m.controller&&(C=m.controller,A=A||gt(),Z("'"+y+"' controller",A[y],m,I),
-A[y]=m),(C=m.transclude)&&(L=!0,m.$$tlb||(Z("transclusion",j,m,I),j=m),"element"==C?(D=!0,S=m.priority,$=I,I=o.$$element=Mr(n.createComment(" "+y+": "+o[y]+" ")),r=I[0],et(u,W($),r),V=T($,a,S,q&&q.name,{nonTlbTranscludeDirective:j})):($=Mr(Et(r)).contents(),I.empty(),V=T($,a))),m.template)if(R=!0,Z("template",O,m,I),O=m,C=M(m.template)?m.template(I,o):m.template,C=ct(C),m.replace){if(q=m,$=_t(C)?[]:hn(Q(m.templateNamespace,zr(C))),r=$[0],1!=$.length||r.nodeType!==Yr)throw Pi("tplrt","Template for directive '{0}' must have exactly one root element. {1}",y,"");et(u,I,r);var tt={$attr:{}},nt=N(r,[],tt),ut=t.splice(U+1,t.length-(U+1));P&&B(nt),t=t.concat(nt).concat(ut),Y(o,tt),H=t.length}else I.html(C);if(m.templateUrl)R=!0,Z("template",O,m,I),O=m,m.replace&&(q=m),g=G(t.splice(U,t.length-U),I,o,u,L&&V,c,f,{controllerDirectives:A,newScopeDirective:k!==m&&k,newIsolateScopeDirective:P,templateDirective:O,nonTlbTranscludeDirective:j}),H=t.length;else if(m.compile)try{x=m.compile(I,o,V),M(x)?p(null,x,X,J):x&&p(x.pre,x.post,X,J)}catch(st){i(st,K(I))}m.terminal&&(g.terminal=!0,S=Math.max(S,m.priority))}return g.scope=k&&k.scope===!0,g.transcludeOnThisElement=L,g.templateOnThisElement=R,g.transclude=V,h.hasElementTranscludeDirective=D,g}function B(t){for(var n=0,e=t.length;e>n;n++)t[n]=d(t[n],{$$isolateScope:!0})}function U(n,e,r,o,a,u,s){if(e===a)return null;var f=null;if(l.hasOwnProperty(e))for(var h,p=t.get(e+c),v=0,g=p.length;g>v;v++)try{h=p[v],($(o)||o>h.priority)&&-1!=h.restrict.indexOf(r)&&(u&&(h=d(h,{$$start:u,$$end:s})),n.push(h),f=h)}catch(m){i(m)}return f}function H(n){if(l.hasOwnProperty(n))for(var e,r=t.get(n+c),i=0,o=r.length;o>i;i++)if(e=r[i],e.multiElement)return!0;return!1}function Y(t,n){var e=n.$attr,r=t.$attr,i=t.$$element;o(t,function(r,i){"$"!=i.charAt(0)&&(n[i]&&n[i]!==r&&(r+=("style"===i?";":" ")+n[i]),t.$set(i,r,!0,e[i]))}),o(n,function(n,o){"class"==o?(O(i,n),t["class"]=(t["class"]?t["class"]+" ":"")+n):"style"==o?(i.attr("style",i.attr("style")+";"+n),t.style=(t.style?t.style+";":"")+n):"$"==o.charAt(0)||t.hasOwnProperty(o)||(t[o]=n,r[o]=e[o])})}function G(t,n,e,r,i,u,s,l){var c,f,h=[],p=n[0],v=t.shift(),g=d(v,{templateUrl:null,transclude:null,replace:null,$$originalDirective:v}),m=M(v.templateUrl)?v.templateUrl(n,e):v.templateUrl,y=v.templateNamespace;return n.empty(),a(m).then(function(a){var d,$,x,w;if(a=ct(a),v.replace){if(x=_t(a)?[]:hn(Q(y,zr(a))),d=x[0],1!=x.length||d.nodeType!==Yr)throw Pi("tplrt","Template for directive '{0}' must have exactly one root element. {1}",v.name,m);$={$attr:{}},et(r,n,d);var _=N(d,[],$);b(v.scope)&&B(_),t=_.concat(t),Y(e,$)}else d=p,n.html(a);for(t.unshift(g),c=q(t,d,e,i,n,v,u,s,l),o(r,function(t,e){t==d&&(r[e]=n[0])}),f=L(n[0].childNodes,i);h.length;){var C=h.shift(),S=h.shift(),M=h.shift(),k=h.shift(),A=n[0];if(!C.$$destroyed){if(S!==p){var E=S.className;l.hasElementTranscludeDirective&&v.replace||(A=Et(d)),et(M,Mr(S),A),O(Mr(A),E)}w=c.transcludeOnThisElement?R(C,c.transclude,k):k,c(f,C,A,r,w,c)}}h=null}),function(t,n,e,r,i){var o=i;n.$$destroyed||(h?h.push(n,e,r,o):(c.transcludeOnThisElement&&(o=R(n,c.transclude,i)),c(f,n,e,r,o,c)))}}function X(t,n){var e=n.priority-t.priority;return 0!==e?e:t.name!==n.name?t.name<n.name?-1:1:t.index-n.index}function Z(t,n,e,r){function i(t){return t?" (module: "+t+")":""}if(n)throw Pi("multidir","Multiple directives [{0}{1}, {2}{3}] asking for {4} on: {5}",n.name,i(n.$$moduleName),e.name,i(e.$$moduleName),t,K(r))}function J(t,n){var e=r(n,!0);e&&t.push({priority:0,compile:function(t){var n=t.parent(),r=!!n.length;return r&&T.$$addBindingClass(n),function(t,n){var i=n.parent();r||T.$$addBindingClass(i),T.$$addBindingInfo(i,e.expressions),t.$watch(e,function(t){n[0].nodeValue=t})}}})}function Q(t,e){switch(t=xr(t||"html")){case"svg":case"math":var r=n.createElement("div");return r.innerHTML="<"+t+">"+e+"</"+t+">",r.childNodes[0].childNodes;default:return e}}function tt(t,n){if("srcdoc"==n)return k.HTML;var e=D(t);return"xlinkHref"==n||"form"==e&&"action"==n||"img"!=e&&("src"==n||"ngSrc"==n)?k.RESOURCE_URL:void 0}function nt(t,n,e,i,o){var a=tt(t,i);o=y[i]||o;var u=r(e,!0,a,o);if(u){if("multiple"===i&&"select"===D(t))throw Pi("selmulti","Binding to the 'multiple' attribute is not supported. Element: {0}",K(t));n.push({priority:100,compile:function(){return{pre:function(t,n,s){var l=s.$$observers||(s.$$observers=gt());if(C.test(i))throw Pi("nodomevents","Interpolations for HTML DOM event attributes are disallowed. Please use the ng- versions (such as ng-click instead of onclick) instead.");var c=s[i];c!==e&&(u=c&&r(c,!0,a,o),e=c),u&&(s[i]=u(t),(l[i]||(l[i]=[])).$$inter=!0,(s.$$observers&&s.$$observers[i].$$scope||t).$watch(u,function(t,n){"class"===i&&t!=n?s.$updateClass(t,n):s.$set(i,t)}))}}}})}}function et(t,e,r){var i,o,a=e[0],u=e.length,s=a.parentNode;if(t)for(i=0,o=t.length;o>i;i++)if(t[i]==a){t[i++]=r;for(var l=i,c=l+u-1,f=t.length;f>l;l++,c++)f>c?t[l]=t[c]:delete t[l];t.length-=u-1,t.context===a&&(t.context=r);break}s&&s.replaceChild(r,a);var h=n.createDocumentFragment();h.appendChild(a),Mr.hasData(a)&&(Mr(r).data(Mr(a).data()),kr?(Fr=!0,kr.cleanData([a])):delete Mr.cache[a[Mr.expando]]);for(var p=1,d=e.length;d>p;p++){var v=e[p];Mr(v).remove(),h.appendChild(v),delete e[p]}e[0]=r,e.length=1}function rt(t,n){return f(function(){return t.apply(null,arguments)},t,n)}function it(t,n,e,r,o,a){try{t(n,e,r,o,a)}catch(u){i(u,K(e))}}function ot(t,n,e,i,a,s){var l;o(i,function(i,o){var s,c,f,h,p=i.attrName,d=i.optional,g=i.mode;switch(g){case"@":d||br.call(n,p)||(e[o]=n[p]=void 0),n.$observe(p,function(t){_(t)&&(e[o]=t)}),n.$$observers[p].$$scope=t,_(n[p])&&(e[o]=r(n[p])(t));break;case"=":if(!br.call(n,p)){if(d)break;n[p]=void 0}if(d&&!n[p])break;c=u(n[p]),h=c.literal?V:function(t,n){return t===n||t!==t&&n!==n},f=c.assign||function(){throw s=e[o]=c(t),Pi("nonassign","Expression '{0}' used with directive '{1}' is non-assignable!",n[p],a.name)},s=e[o]=c(t);var m=function(n){return h(n,e[o])||(h(n,s)?f(t,n=e[o]):e[o]=n),s=n};m.$stateful=!0;var y;y=i.collection?t.$watchCollection(n[p],m):t.$watch(u(n[p],m),null,c.literal),l=l||[],l.push(y);break;case"&":if(c=n.hasOwnProperty(p)?u(n[p]):v,c===v&&d)break;e[o]=function(n){return c(t,n)}}});var c=l?function(){for(var t=0,n=l.length;n>t;++t)l[t]()}:v;return s&&c!==v?(s.$on("$destroy",c),v):c}var at=function(t,n){if(n){var e,r,i,o=Object.keys(n);for(e=0,r=o.length;r>e;e++)i=o[e],this[i]=n[i]}else this.$attr={};this.$$element=t};at.prototype={$normalize:cn,$addClass:function(t){t&&t.length>0&&A.addClass(this.$$element,t)},$removeClass:function(t){t&&t.length>0&&A.removeClass(this.$$element,t)},$updateClass:function(t,n){var e=fn(t,n);e&&e.length&&A.addClass(this.$$element,e);var r=fn(n,t);r&&r.length&&A.removeClass(this.$$element,r)},$set:function(t,n,e,r){var a,u=this.$$element[0],s=Wt(u,t),l=Ut(t),c=t;if(s?(this.$$element.prop(t,n),r=s):l&&(this[l]=n,c=l),this[t]=n,r?this.$attr[t]=r:(r=this.$attr[t],r||(this.$attr[t]=r=lt(t,"-"))),a=D(this.$$element),"a"===a&&"href"===t||"img"===a&&"src"===t)this[t]=n=P(n,"src"===t);else if("img"===a&&"srcset"===t){for(var f="",h=zr(n),p=/(\s+\d+x\s*,|\s+\d+w\s*,|\s+,|,\s+)/,d=/\s/.test(h)?p:/(,)/,v=h.split(d),g=Math.floor(v.length/2),m=0;g>m;m++){var y=2*m;f+=P(zr(v[y]),!0),f+=" "+zr(v[y+1])}var x=zr(v[2*m]).split(/\s/);f+=P(zr(x[0]),!0),2===x.length&&(f+=" "+zr(x[1])),this[t]=n=f}e!==!1&&(null===n||$(n)?this.$$element.removeAttr(r):this.$$element.attr(r,n));var b=this.$$observers;b&&o(b[c],function(t){try{t(n)}catch(e){i(e)}})},$observe:function(t,n){var e=this,r=e.$$observers||(e.$$observers=gt()),i=r[t]||(r[t]=[]);return i.push(n),m.$evalAsync(function(){i.$$inter||!e.hasOwnProperty(t)||$(e[t])||n(e[t])}),function(){I(i,n)}}};var ut=r.startSymbol(),st=r.endSymbol(),ct="{{"==ut||"}}"==st?g:function(t){return t.replace(/\{\{/g,ut).replace(/}}/g,st)},ht=/^ngAttr[A-Z]/;return T.$$addBindingInfo=S?function(t,n){var e=t.data("$binding")||[];Dr(n)?e=e.concat(n):e.push(n),t.data("$binding",e)}:v,T.$$addBindingClass=S?function(t){O(t,"ng-binding")}:v,T.$$addScopeInfo=S?function(t,n,e,r){var i=e?r?"$isolateScopeNoTemplate":"$isolateScope":"$scope";t.data(i,n)}:v,T.$$addScopeClass=S?function(t,n){O(t,n?"ng-isolate-scope":"ng-scope")}:v,T}]}function cn(t){return wt(t.replace(Oi,""))}function fn(t,n){var e="",r=t.split(/\s+/),i=n.split(/\s+/);t:for(var o=0;o<r.length;o++){for(var a=r[o],u=0;u<i.length;u++)if(a==i[u])continue t;e+=(e.length>0?" ":"")+a}return e}function hn(t){t=Mr(t);var n=t.length;if(1>=n)return t;for(;n--;){var e=t[n];e.nodeType===Zr&&Pr.call(t,n,1)}return t}function pn(t,n){if(n&&_(n))return n;if(_(t)){var e=ji.exec(t);if(e)return e[3]}}function dn(){var t={},n=!1;this.register=function(n,e){pt(n,"controller"),b(n)?f(t,n):t[n]=e},this.allowGlobals=function(){n=!0},this.$get=["$injector","$window",function(i,o){function a(t,n,e,i){if(!t||!b(t.$scope))throw r("$controller")("noscp","Cannot export controller '{0}' as '{1}'! No $scope object provided via `locals`.",i,n);t.$scope[n]=e}return function(r,u,s,l){var c,h,p,d;if(s=s===!0,l&&_(l)&&(d=l),_(r)){if(h=r.match(ji),!h)throw Ti("ctrlfmt","Badly formed controller string '{0}'. Must match `__name__ as __id__` or `__name__`.",r);p=h[1],d=d||h[3],r=t.hasOwnProperty(p)?t[p]:dt(u.$scope,p,!0)||(n?dt(o,p,!0):e),ht(r,p,!0)}if(s){var v=(Dr(r)?r[r.length-1]:r).prototype;c=Object.create(v||null),d&&a(u,d,c,p||r.name);var g;return g=f(function(){var t=i.invoke(r,c,u,p);return t!==c&&(b(t)||M(t))&&(c=t,d&&a(u,d,c,p||r.name)),c},{instance:c,identifier:d})}return c=i.instantiate(r,u,p),d&&a(u,d,c,p||r.name),c}}]}function vn(){this.$get=["$window",function(t){return Mr(t.document)}]}function gn(){this.$get=["$log",function(t){return function(n,e){t.error.apply(t,arguments)}}]}function mn(t){return b(t)?S(t)?t.toISOString():Y(t):t}function yn(){this.$get=function(){return function(t){if(!t)return"";var n=[];return a(t,function(t,e){null===t||$(t)||(Dr(t)?o(t,function(t,r){n.push(rt(e)+"="+rt(mn(t)))}):n.push(rt(e)+"="+rt(mn(t))))}),n.join("&")}}}function $n(){this.$get=function(){return function(t){function n(t,r,i){null===t||$(t)||(Dr(t)?o(t,function(t,e){n(t,r+"["+(b(t)?e:"")+"]")}):b(t)&&!S(t)?a(t,function(t,e){n(t,r+(i?"":"[")+e+(i?"":"]"))}):e.push(rt(r)+"="+rt(mn(t))))}if(!t)return"";var e=[];return n(t,"",!0),e.join("&")}}}function xn(t,n){if(_(t)){var e=t.replace(Ii,"").trim();if(e){var r=n("Content-Type");(r&&0===r.indexOf(Ri)||bn(e))&&(t=G(e))}}return t}function bn(t){var n=t.match(Fi);return n&&Di[n[0]].test(t)}function wn(t){function n(t,n){t&&(r[t]=r[t]?r[t]+", "+n:n)}var e,r=gt();return _(t)?o(t.split("\n"),function(t){e=t.indexOf(":"),n(xr(zr(t.substr(0,e))),zr(t.substr(e+1)))}):b(t)&&o(t,function(t,e){n(xr(e),zr(t))}),r}function _n(t){var n;return function(e){if(n||(n=wn(t)),e){var r=n[xr(e)];return void 0===r&&(r=null),r}return n}}function Cn(t,n,e,r){return M(r)?r(t,n,e):(o(r,function(r){t=r(t,n,e)}),t)}function Sn(t){return t>=200&&300>t}function Mn(){var t=this.defaults={transformResponse:[xn],transformRequest:[function(t){return!b(t)||P(t)||T(t)||O(t)?t:Y(t)}],headers:{common:{Accept:"application/json, text/plain, */*"},post:q(Ni),put:q(Ni),patch:q(Ni)},xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",paramSerializer:"$httpParamSerializer"},n=!1;this.useApplyAsync=function(t){return x(t)?(n=!!t,this):n};var i=!0;this.useLegacyPromiseExtensions=function(t){return x(t)?(i=!!t,this):i};var a=this.interceptors=[];this.$get=["$httpBackend","$$cookieReader","$cacheFactory","$rootScope","$q","$injector",function(u,s,l,c,h,p){function d(n){function a(t){var n=f({},t);return t.data?n.data=Cn(t.data,t.headers,t.status,l.transformResponse):n.data=t.data,Sn(t.status)?n:h.reject(n)}function u(t,n){var e,r={};return o(t,function(t,i){M(t)?(e=t(n),null!=e&&(r[i]=e)):r[i]=t}),r}function s(n){var e,r,i,o=t.headers,a=f({},n.headers);o=f({},o.common,o[xr(n.method)]);t:for(e in o){r=xr(e);for(i in a)if(xr(i)===r)continue t;a[e]=o[e]}return u(a,q(n))}if(!Rr.isObject(n))throw r("$http")("badreq","Http request configuration must be an object. Received: {0}",n);var l=f({method:"get",transformRequest:t.transformRequest,transformResponse:t.transformResponse,paramSerializer:t.paramSerializer},n);l.headers=s(n),l.method=wr(l.method),l.paramSerializer=_(l.paramSerializer)?p.get(l.paramSerializer):l.paramSerializer;var c=function(n){var r=n.headers,i=Cn(n.data,_n(r),e,n.transformRequest);return $(i)&&o(r,function(t,n){"content-type"===xr(n)&&delete r[n]}),$(n.withCredentials)&&!$(t.withCredentials)&&(n.withCredentials=t.withCredentials),m(n,i).then(a,a)},d=[c,e],v=h.when(l);for(o(C,function(t){(t.request||t.requestError)&&d.unshift(t.request,t.requestError),(t.response||t.responseError)&&d.push(t.response,t.responseError)});d.length;){var g=d.shift(),y=d.shift();v=v.then(g,y)}return i?(v.success=function(t){return ht(t,"fn"),v.then(function(n){t(n.data,n.status,n.headers,l)}),v},v.error=function(t){return ht(t,"fn"),v.then(null,function(n){t(n.data,n.status,n.headers,l)}),v}):(v.success=qi("success"),v.error=qi("error")),v}function v(t){o(arguments,function(t){d[t]=function(n,e){return d(f({},e||{},{method:t,url:n}))}})}function g(t){o(arguments,function(t){d[t]=function(n,e,r){return d(f({},r||{},{method:t,url:n,data:e}))}})}function m(r,i){function o(t,e,r,i){function o(){a(e,t,r,i)}p&&(Sn(t)?p.put(C,[t,e,wn(r),i]):p.remove(C)),n?c.$applyAsync(o):(o(),c.$$phase||c.$apply())}function a(t,n,e,i){n=n>=-1?n:0,(Sn(n)?g.resolve:g.reject)({data:t,status:n,headers:_n(e),config:r,statusText:i})}function l(t){a(t.data,t.status,q(t.headers()),t.statusText)}function f(){var t=d.pendingRequests.indexOf(r);-1!==t&&d.pendingRequests.splice(t,1)}var p,v,g=h.defer(),m=g.promise,_=r.headers,C=y(r.url,r.paramSerializer(r.params));if(d.pendingRequests.push(r),m.then(f,f),!r.cache&&!t.cache||r.cache===!1||"GET"!==r.method&&"JSONP"!==r.method||(p=b(r.cache)?r.cache:b(t.cache)?t.cache:w),p&&(v=p.get(C),x(v)?L(v)?v.then(l,l):Dr(v)?a(v[1],v[0],q(v[2]),v[3]):a(v,200,{},"OK"):p.put(C,m)),$(v)){var S=ke(r.url)?s()[r.xsrfCookieName||t.xsrfCookieName]:e;S&&(_[r.xsrfHeaderName||t.xsrfHeaderName]=S),u(r.method,C,i,o,_,r.timeout,r.withCredentials,r.responseType)}return m}function y(t,n){return n.length>0&&(t+=(-1==t.indexOf("?")?"?":"&")+n),t}var w=l("$http");t.paramSerializer=_(t.paramSerializer)?p.get(t.paramSerializer):t.paramSerializer;var C=[];return o(a,function(t){C.unshift(_(t)?p.get(t):p.invoke(t))}),d.pendingRequests=[],v("get","delete","head","jsonp"),g("post","put","patch"),d.defaults=t,d}]}function kn(){this.$get=function(){return function(){return new t.XMLHttpRequest}}}function An(){this.$get=["$browser","$window","$document","$xhrFactory",function(t,n,e,r){return En(t,r,t.defer,n.angular.callbacks,e[0])}]}function En(t,n,e,r,i){function a(t,n,e){var o=i.createElement("script"),a=null;return o.type="text/javascript",o.src=t,o.async=!0,a=function(t){ri(o,"load",a),ri(o,"error",a),i.body.removeChild(o),o=null;var u=-1,s="unknown";t&&("load"!==t.type||r[n].called||(t={type:"error"}),s=t.type,u="error"===t.type?404:200),e&&e(u,s)},ei(o,"load",a),ei(o,"error",a),i.body.appendChild(o),a}return function(i,u,s,l,c,f,h,p){function d(){y&&y(),b&&b.abort()}function g(n,r,i,o,a){x(C)&&e.cancel(C),y=b=null,n(r,i,o,a),t.$$completeOutstandingRequest(v)}if(t.$$incOutstandingRequestCount(),u=u||t.url(),"jsonp"==xr(i)){var m="_"+(r.counter++).toString(36);r[m]=function(t){r[m].data=t,r[m].called=!0};var y=a(u.replace("JSON_CALLBACK","angular.callbacks."+m),m,function(t,n){g(l,t,r[m].data,"",n),r[m]=v})}else{var b=n(i,u);b.open(i,u,!0),o(c,function(t,n){x(t)&&b.setRequestHeader(n,t)}),b.onload=function(){var t=b.statusText||"",n="response"in b?b.response:b.responseText,e=1223===b.status?204:b.status;0===e&&(e=n?200:"file"==Me(u).protocol?404:0),g(l,e,n,b.getAllResponseHeaders(),t)};var w=function(){g(l,-1,null,null,"")};if(b.onerror=w,b.onabort=w,h&&(b.withCredentials=!0),p)try{b.responseType=p}catch(_){if("json"!==p)throw _}b.send($(s)?null:s)}if(f>0)var C=e(d,f);else L(f)&&f.then(d)}}function Pn(){var t="{{",n="}}";this.startSymbol=function(n){return n?(t=n,this):t},this.endSymbol=function(t){return t?(n=t,this):n},this.$get=["$parse","$exceptionHandler","$sce",function(e,r,i){function o(t){return"\\\\\\"+t}function a(e){return e.replace(h,t).replace(p,n)}function u(t){if(null==t)return"";switch(typeof t){case"string":break;case"number":t=""+t;break;default:t=Y(t)}return t}function s(o,s,h,p){function d(t){try{return t=A(t),p&&!x(t)?t:u(t)}catch(n){r(Vi.interr(o,n))}}p=!!p;for(var v,g,m,y=0,b=[],w=[],_=o.length,C=[],S=[];_>y;){if(-1==(v=o.indexOf(t,y))||-1==(g=o.indexOf(n,v+l))){y!==_&&C.push(a(o.substring(y)));break}y!==v&&C.push(a(o.substring(y,v))),m=o.substring(v+l,g),b.push(m),w.push(e(m,d)),y=g+c,S.push(C.length),C.push("")}if(h&&C.length>1&&Vi.throwNoconcat(o),!s||b.length){var k=function(t){for(var n=0,e=b.length;e>n;n++){if(p&&$(t[n]))return;C[S[n]]=t[n]}return C.join("")},A=function(t){return h?i.getTrusted(h,t):i.valueOf(t)};return f(function(t){var n=0,e=b.length,i=new Array(e);try{for(;e>n;n++)i[n]=w[n](t);return k(i)}catch(a){r(Vi.interr(o,a))}},{exp:o,expressions:b,$$watchDelegate:function(t,n){var e;return t.$watchGroup(w,function(r,i){var o=k(r);M(n)&&n.call(this,o,r!==i?e:o,t),e=o})}})}}var l=t.length,c=n.length,h=new RegExp(t.replace(/./g,o),"g"),p=new RegExp(n.replace(/./g,o),"g");return s.startSymbol=function(){return t},s.endSymbol=function(){return n},s}]}function On(){this.$get=["$rootScope","$window","$q","$$q",function(t,n,e,r){function i(i,a,u,s){var l=arguments.length>4,c=l?W(arguments,4):[],f=n.setInterval,h=n.clearInterval,p=0,d=x(s)&&!s,v=(d?r:e).defer(),g=v.promise;return u=x(u)?u:0,g.then(null,null,l?function(){i.apply(null,c)}:i),g.$$intervalId=f(function(){v.notify(p++),u>0&&p>=u&&(v.resolve(p),h(g.$$intervalId),delete o[g.$$intervalId]),d||t.$apply()},a),o[g.$$intervalId]=v,g}var o={};return i.cancel=function(t){return t&&t.$$intervalId in o?(o[t.$$intervalId].reject("canceled"),n.clearInterval(t.$$intervalId),delete o[t.$$intervalId],!0):!1},i}]}function Tn(t){for(var n=t.split("/"),e=n.length;e--;)n[e]=et(n[e]);return n.join("/")}function jn(t,n){var e=Me(t);n.$$protocol=e.protocol,n.$$host=e.hostname,n.$$port=p(e.port)||Wi[e.protocol]||null}function Ln(t,n){var e="/"!==t.charAt(0);e&&(t="/"+t);var r=Me(t);n.$$path=decodeURIComponent(e&&"/"===r.pathname.charAt(0)?r.pathname.substring(1):r.pathname),n.$$search=tt(r.search),n.$$hash=decodeURIComponent(r.hash),n.$$path&&"/"!=n.$$path.charAt(0)&&(n.$$path="/"+n.$$path)}function Rn(t,n){return 0===n.indexOf(t)?n.substr(t.length):void 0}function Nn(t){var n=t.indexOf("#");return-1==n?t:t.substr(0,n)}function Fn(t){return t.replace(/(#.+)|#$/,"$1")}function Dn(t){return t.substr(0,Nn(t).lastIndexOf("/")+1)}function In(t){return t.substring(0,t.indexOf("/",t.indexOf("//")+2))}function zn(t,n,e){this.$$html5=!0,e=e||"",jn(t,this),this.$$parse=function(t){var e=Rn(n,t);if(!_(e))throw Ui("ipthprfx",'Invalid url "{0}", missing path prefix "{1}".',t,n);Ln(e,this),this.$$path||(this.$$path="/"),this.$$compose()},this.$$compose=function(){var t=nt(this.$$search),e=this.$$hash?"#"+et(this.$$hash):"";this.$$url=Tn(this.$$path)+(t?"?"+t:"")+e,this.$$absUrl=n+this.$$url.substr(1)},this.$$parseLinkUrl=function(r,i){if(i&&"#"===i[0])return this.hash(i.slice(1)),!0;var o,a,u;return x(o=Rn(t,r))?(a=o,u=x(o=Rn(e,o))?n+(Rn("/",o)||o):t+a):x(o=Rn(n,r))?u=n+o:n==r+"/"&&(u=n),u&&this.$$parse(u),!!u}}function qn(t,n,e){jn(t,this),this.$$parse=function(r){function i(t,n,e){var r,i=/^\/[A-Z]:(\/.*)/;return 0===n.indexOf(e)&&(n=n.replace(e,"")),i.exec(n)?t:(r=i.exec(t),r?r[1]:t)}var o,a=Rn(t,r)||Rn(n,r);$(a)||"#"!==a.charAt(0)?this.$$html5?o=a:(o="",$(a)&&(t=r,this.replace())):(o=Rn(e,a),$(o)&&(o=a)),Ln(o,this),this.$$path=i(this.$$path,o,t),this.$$compose()},this.$$compose=function(){var n=nt(this.$$search),r=this.$$hash?"#"+et(this.$$hash):"";this.$$url=Tn(this.$$path)+(n?"?"+n:"")+r,this.$$absUrl=t+(this.$$url?e+this.$$url:"")},this.$$parseLinkUrl=function(n,e){return Nn(t)==Nn(n)?(this.$$parse(n),!0):!1}}function Vn(t,n,e){this.$$html5=!0,qn.apply(this,arguments),this.$$parseLinkUrl=function(r,i){if(i&&"#"===i[0])return this.hash(i.slice(1)),!0;var o,a;return t==Nn(r)?o=r:(a=Rn(n,r))?o=t+e+a:n===r+"/"&&(o=n),o&&this.$$parse(o),!!o},this.$$compose=function(){var n=nt(this.$$search),r=this.$$hash?"#"+et(this.$$hash):"";this.$$url=Tn(this.$$path)+(n?"?"+n:"")+r,this.$$absUrl=t+e+this.$$url}}function Bn(t){return function(){return this[t]}}function Wn(t,n){return function(e){return $(e)?this[t]:(this[t]=n(e),this.$$compose(),this)}}function Un(){var t="",n={enabled:!1,requireBase:!0,rewriteLinks:!0};this.hashPrefix=function(n){return x(n)?(t=n,this):t},this.html5Mode=function(t){return j(t)?(n.enabled=t,this):b(t)?(j(t.enabled)&&(n.enabled=t.enabled),j(t.requireBase)&&(n.requireBase=t.requireBase),j(t.rewriteLinks)&&(n.rewriteLinks=t.rewriteLinks),this):n},this.$get=["$rootScope","$browser","$sniffer","$rootElement","$window",function(e,r,i,o,a){function u(t,n,e){var i=l.url(),o=l.$$state;try{r.url(t,n,e),l.$$state=r.state()}catch(a){throw l.url(i),l.$$state=o,a}}function s(t,n){e.$broadcast("$locationChangeSuccess",l.absUrl(),t,l.$$state,n)}var l,c,f,h=r.baseHref(),p=r.url();if(n.enabled){if(!h&&n.requireBase)throw Ui("nobase","$location in HTML5 mode requires a <base> tag to be present!");f=In(p)+(h||"/"),c=i.history?zn:Vn}else f=Nn(p),c=qn;var d=Dn(f);l=new c(f,d,"#"+t),l.$$parseLinkUrl(p,p),l.$$state=r.state();var v=/^\s*(javascript|mailto):/i;o.on("click",function(t){if(n.rewriteLinks&&!t.ctrlKey&&!t.metaKey&&!t.shiftKey&&2!=t.which&&2!=t.button){for(var i=Mr(t.target);"a"!==D(i[0]);)if(i[0]===o[0]||!(i=i.parent())[0])return;var u=i.prop("href"),s=i.attr("href")||i.attr("xlink:href");b(u)&&"[object SVGAnimatedString]"===u.toString()&&(u=Me(u.animVal).href),v.test(u)||!u||i.attr("target")||t.isDefaultPrevented()||l.$$parseLinkUrl(u,s)&&(t.preventDefault(),l.absUrl()!=r.url()&&(e.$apply(),a.angular["ff-684208-preventDefault"]=!0))}}),Fn(l.absUrl())!=Fn(p)&&r.url(l.absUrl(),!0);var g=!0;return r.onUrlChange(function(t,n){return $(Rn(d,t))?void(a.location.href=t):(e.$evalAsync(function(){var r,i=l.absUrl(),o=l.$$state;l.$$parse(t),l.$$state=n,r=e.$broadcast("$locationChangeStart",t,i,n,o).defaultPrevented,l.absUrl()===t&&(r?(l.$$parse(i),l.$$state=o,u(i,!1,o)):(g=!1,s(i,o)))}),void(e.$$phase||e.$digest()))}),e.$watch(function(){var t=Fn(r.url()),n=Fn(l.absUrl()),o=r.state(),a=l.$$replace,c=t!==n||l.$$html5&&i.history&&o!==l.$$state;(g||c)&&(g=!1,e.$evalAsync(function(){var n=l.absUrl(),r=e.$broadcast("$locationChangeStart",n,t,l.$$state,o).defaultPrevented;l.absUrl()===n&&(r?(l.$$parse(t),l.$$state=o):(c&&u(n,a,o===l.$$state?null:l.$$state),s(t,o)))})),l.$$replace=!1}),l}]}function Hn(){var t=!0,n=this;this.debugEnabled=function(n){return x(n)?(t=n,this):t},this.$get=["$window",function(e){function r(t){return t instanceof Error&&(t.stack?t=t.message&&-1===t.stack.indexOf(t.message)?"Error: "+t.message+"\n"+t.stack:t.stack:t.sourceURL&&(t=t.message+"\n"+t.sourceURL+":"+t.line)),t}function i(t){var n=e.console||{},i=n[t]||n.log||v,a=!1;try{a=!!i.apply}catch(u){}return a?function(){var t=[];return o(arguments,function(n){t.push(r(n))}),i.apply(n,t)}:function(t,n){i(t,null==n?"":n)}}return{log:i("log"),info:i("info"),warn:i("warn"),error:i("error"),debug:function(){var e=i("debug");return function(){t&&e.apply(n,arguments)}}()}}]}function Yn(t,n){if("__defineGetter__"===t||"__defineSetter__"===t||"__lookupGetter__"===t||"__lookupSetter__"===t||"__proto__"===t)throw Yi("isecfld","Attempting to access a disallowed field in Angular expressions! Expression: {0}",n);return t}function Gn(t,n){if(t+="",!_(t))throw Yi("iseccst","Cannot convert object to primitive value! Expression: {0}",n);return t}function Xn(t,n){if(t){if(t.constructor===t)throw Yi("isecfn","Referencing Function in Angular expressions is disallowed! Expression: {0}",n);if(t.window===t)throw Yi("isecwindow","Referencing the Window in Angular expressions is disallowed! Expression: {0}",n);if(t.children&&(t.nodeName||t.prop&&t.attr&&t.find))throw Yi("isecdom","Referencing DOM nodes in Angular expressions is disallowed! Expression: {0}",n);if(t===Object)throw Yi("isecobj","Referencing Object in Angular expressions is disallowed! Expression: {0}",n)}return t}function Zn(t,n){if(t){if(t.constructor===t)throw Yi("isecfn","Referencing Function in Angular expressions is disallowed! Expression: {0}",n);if(t===Gi||t===Xi||t===Zi)throw Yi("isecff","Referencing call, apply or bind in Angular expressions is disallowed! Expression: {0}",n)}}function Jn(t,n){if(t&&(t===0..constructor||t===(!1).constructor||t==="".constructor||t==={}.constructor||t===[].constructor||t===Function.constructor))throw Yi("isecaf","Assigning to a constructor is disallowed! Expression: {0}",n)}function Kn(t,n){return"undefined"!=typeof t?t:n}function Qn(t,n){return"undefined"==typeof t?n:"undefined"==typeof n?t:t+n}function te(t,n){var e=t(n);return!e.$stateful}function ne(t,n){var e,r;switch(t.type){case to.Program:e=!0,o(t.body,function(t){ne(t.expression,n),e=e&&t.expression.constant}),t.constant=e;break;case to.Literal:t.constant=!0,t.toWatch=[];break;case to.UnaryExpression:ne(t.argument,n),t.constant=t.argument.constant,t.toWatch=t.argument.toWatch;break;case to.BinaryExpression:ne(t.left,n),ne(t.right,n),t.constant=t.left.constant&&t.right.constant,t.toWatch=t.left.toWatch.concat(t.right.toWatch);break;case to.LogicalExpression:ne(t.left,n),ne(t.right,n),t.constant=t.left.constant&&t.right.constant,t.toWatch=t.constant?[]:[t];break;case to.ConditionalExpression:ne(t.test,n),ne(t.alternate,n),ne(t.consequent,n),t.constant=t.test.constant&&t.alternate.constant&&t.consequent.constant,t.toWatch=t.constant?[]:[t];break;case to.Identifier:t.constant=!1,t.toWatch=[t];break;case to.MemberExpression:ne(t.object,n),t.computed&&ne(t.property,n),t.constant=t.object.constant&&(!t.computed||t.property.constant),t.toWatch=[t];break;case to.CallExpression:e=t.filter?te(n,t.callee.name):!1,r=[],o(t.arguments,function(t){ne(t,n),e=e&&t.constant,t.constant||r.push.apply(r,t.toWatch)}),t.constant=e,t.toWatch=t.filter&&te(n,t.callee.name)?r:[t];break;case to.AssignmentExpression:ne(t.left,n),ne(t.right,n),t.constant=t.left.constant&&t.right.constant,t.toWatch=[t];break;case to.ArrayExpression:e=!0,r=[],o(t.elements,function(t){ne(t,n),e=e&&t.constant,t.constant||r.push.apply(r,t.toWatch)}),t.constant=e,t.toWatch=r;break;case to.ObjectExpression:e=!0,r=[],o(t.properties,function(t){ne(t.value,n),e=e&&t.value.constant,t.value.constant||r.push.apply(r,t.value.toWatch)}),t.constant=e,t.toWatch=r;break;case to.ThisExpression:t.constant=!1,t.toWatch=[]}}function ee(t){if(1==t.length){var n=t[0].expression,r=n.toWatch;return 1!==r.length?r:r[0]!==n?r:e}}function re(t){return t.type===to.Identifier||t.type===to.MemberExpression}function ie(t){return 1===t.body.length&&re(t.body[0].expression)?{type:to.AssignmentExpression,left:t.body[0].expression,right:{type:to.NGValueParameter},operator:"="}:void 0}function oe(t){return 0===t.body.length||1===t.body.length&&(t.body[0].expression.type===to.Literal||t.body[0].expression.type===to.ArrayExpression||t.body[0].expression.type===to.ObjectExpression)}function ae(t){return t.constant}function ue(t,n){this.astBuilder=t,this.$filter=n}function se(t,n){this.astBuilder=t,this.$filter=n}function le(t){return"constructor"==t}function ce(t){return M(t.valueOf)?t.valueOf():eo.call(t)}function fe(){var t=gt(),n=gt();this.$get=["$filter",function(r){function i(t,n){return null==t||null==n?t===n:"object"==typeof t&&(t=ce(t),"object"==typeof t)?!1:t===n||t!==t&&n!==n}function a(t,n,r,o,a){var u,s=o.inputs;if(1===s.length){var l=i;return s=s[0],t.$watch(function(t){var n=s(t);return i(n,l)||(u=o(t,e,e,[n]),l=n&&ce(n)),u},n,r,a)}for(var c=[],f=[],h=0,p=s.length;p>h;h++)c[h]=i,f[h]=null;return t.$watch(function(t){for(var n=!1,r=0,a=s.length;a>r;r++){var l=s[r](t);(n||(n=!i(l,c[r])))&&(f[r]=l,c[r]=l&&ce(l))}return n&&(u=o(t,e,e,f)),u},n,r,a)}function u(t,n,e,r){var i,o;return i=t.$watch(function(t){return r(t)},function(t,e,r){o=t,M(n)&&n.apply(this,arguments),x(t)&&r.$$postDigest(function(){x(o)&&i()})},e)}function s(t,n,e,r){function i(t){var n=!0;return o(t,function(t){x(t)||(n=!1)}),n}var a,u;return a=t.$watch(function(t){return r(t)},function(t,e,r){u=t,M(n)&&n.call(this,t,e,r),i(t)&&r.$$postDigest(function(){i(u)&&a()})},e)}function l(t,n,e,r){var i;return i=t.$watch(function(t){return r(t)},function(t,e,r){M(n)&&n.apply(this,arguments),i()},e)}function c(t,n){if(!n)return t;var e=t.$$watchDelegate,r=e!==s&&e!==u,i=r?function(e,r,i,o){var a=t(e,r,i,o);return n(a,e,r)}:function(e,r,i,o){var a=t(e,r,i,o),u=n(a,e,r);return x(a)?u:a};return t.$$watchDelegate&&t.$$watchDelegate!==a?i.$$watchDelegate=t.$$watchDelegate:n.$stateful||(i.$$watchDelegate=a,i.inputs=t.inputs?t.inputs:[t]),i}var f=Vr().noUnsafeEval,h={csp:f,expensiveChecks:!1},p={csp:f,expensiveChecks:!0};return function(e,i,o){var f,d,g;switch(typeof e){case"string":e=e.trim(),g=e;var m=o?n:t;if(f=m[g],!f){":"===e.charAt(0)&&":"===e.charAt(1)&&(d=!0,e=e.substring(2));var y=o?p:h,$=new Qi(y),x=new no($,r,y);f=x.parse(e),f.constant?f.$$watchDelegate=l:d?f.$$watchDelegate=f.literal?s:u:f.inputs&&(f.$$watchDelegate=a),m[g]=f}return c(f,i);case"function":return c(e,i);default:return v}}}]}function he(){this.$get=["$rootScope","$exceptionHandler",function(t,n){return de(function(n){t.$evalAsync(n)},n)}]}function pe(){this.$get=["$browser","$exceptionHandler",function(t,n){return de(function(n){t.defer(n)},n)}]}function de(t,n){function i(t,n,e){function r(n){return function(e){i||(i=!0,n.call(t,e))}}var i=!1;return[r(n),r(e)]}function a(){this.$$state={status:0}}function u(t,n){return function(e){n.call(t,e)}}function s(t){var r,i,o;o=t.pending,t.processScheduled=!1,t.pending=e;for(var a=0,u=o.length;u>a;++a){i=o[a][0],r=o[a][t.status];try{M(r)?i.resolve(r(t.value)):1===t.status?i.resolve(t.value):i.reject(t.value)}catch(s){i.reject(s),n(s)}}}function l(n){!n.processScheduled&&n.pending&&(n.processScheduled=!0,t(function(){s(n)}))}function c(){this.promise=new a,this.resolve=u(this,this.resolve),this.reject=u(this,this.reject),this.notify=u(this,this.notify)}function h(t){var n=new c,e=0,r=Dr(t)?[]:{};return o(t,function(t,i){e++,y(t).then(function(t){r.hasOwnProperty(i)||(r[i]=t,--e||n.resolve(r))},function(t){r.hasOwnProperty(i)||n.reject(t)})}),0===e&&n.resolve(r),n.promise}var p=r("$q",TypeError),d=function(){return new c};f(a.prototype,{then:function(t,n,e){if($(t)&&$(n)&&$(e))return this;var r=new c;return this.$$state.pending=this.$$state.pending||[],this.$$state.pending.push([r,t,n,e]),this.$$state.status>0&&l(this.$$state),r.promise},"catch":function(t){return this.then(null,t)},"finally":function(t,n){return this.then(function(n){return m(n,!0,t)},function(n){return m(n,!1,t)},n)}}),f(c.prototype,{resolve:function(t){this.promise.$$state.status||(t===this.promise?this.$$reject(p("qcycle","Expected promise to be resolved with value other than itself '{0}'",t)):this.$$resolve(t))},$$resolve:function(t){var e,r;r=i(this,this.$$resolve,this.$$reject);try{(b(t)||M(t))&&(e=t&&t.then),M(e)?(this.promise.$$state.status=-1,e.call(t,r[0],r[1],this.notify)):(this.promise.$$state.value=t,this.promise.$$state.status=1,l(this.promise.$$state))}catch(o){r[1](o),n(o)}},reject:function(t){this.promise.$$state.status||this.$$reject(t)},$$reject:function(t){this.promise.$$state.value=t,this.promise.$$state.status=2,l(this.promise.$$state)},notify:function(e){var r=this.promise.$$state.pending;this.promise.$$state.status<=0&&r&&r.length&&t(function(){for(var t,i,o=0,a=r.length;a>o;o++){i=r[o][0],t=r[o][3];try{i.notify(M(t)?t(e):e)}catch(u){n(u)}}})}});var v=function(t){var n=new c;return n.reject(t),n.promise},g=function(t,n){var e=new c;return n?e.resolve(t):e.reject(t),e.promise},m=function(t,n,e){
-var r=null;try{M(e)&&(r=e())}catch(i){return g(i,!1)}return L(r)?r.then(function(){return g(t,n)},function(t){return g(t,!1)}):g(t,n)},y=function(t,n,e,r){var i=new c;return i.resolve(t),i.promise.then(n,e,r)},x=y,w=function _(t){function n(t){r.resolve(t)}function e(t){r.reject(t)}if(!M(t))throw p("norslvr","Expected resolverFn, got '{0}'",t);if(!(this instanceof _))return new _(t);var r=new c;return t(n,e),r.promise};return w.defer=d,w.reject=v,w.when=y,w.resolve=x,w.all=h,w}function ve(){this.$get=["$window","$timeout",function(t,n){var e=t.requestAnimationFrame||t.webkitRequestAnimationFrame,r=t.cancelAnimationFrame||t.webkitCancelAnimationFrame||t.webkitCancelRequestAnimationFrame,i=!!e,o=i?function(t){var n=e(t);return function(){r(n)}}:function(t){var e=n(t,16.66,!1);return function(){n.cancel(e)}};return o.supported=i,o}]}function ge(){function t(t){function n(){this.$$watchers=this.$$nextSibling=this.$$childHead=this.$$childTail=null,this.$$listeners={},this.$$listenerCount={},this.$$watchersCount=0,this.$id=s(),this.$$ChildScope=null}return n.prototype=t,n}var n=10,e=r("$rootScope"),a=null,u=null;this.digestTtl=function(t){return arguments.length&&(n=t),n},this.$get=["$injector","$exceptionHandler","$parse","$browser",function(r,l,c,f){function h(t){t.currentScope.$$destroyed=!0}function p(){this.$id=s(),this.$$phase=this.$parent=this.$$watchers=this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=null,this.$root=this,this.$$destroyed=!1,this.$$listeners={},this.$$listenerCount={},this.$$watchersCount=0,this.$$isolateBindings=null}function d(t){if(C.$$phase)throw e("inprog","{0} already in progress",C.$$phase);C.$$phase=t}function g(){C.$$phase=null}function m(t,n){do t.$$watchersCount+=n;while(t=t.$parent)}function y(t,n,e){do t.$$listenerCount[e]-=n,0===t.$$listenerCount[e]&&delete t.$$listenerCount[e];while(t=t.$parent)}function x(){}function w(){for(;A.length;)try{A.shift()()}catch(t){l(t)}u=null}function _(){null===u&&(u=f.defer(function(){C.$apply(w)}))}p.prototype={constructor:p,$new:function(n,e){var r;return e=e||this,n?(r=new p,r.$root=this.$root):(this.$$ChildScope||(this.$$ChildScope=t(this)),r=new this.$$ChildScope),r.$parent=e,r.$$prevSibling=e.$$childTail,e.$$childHead?(e.$$childTail.$$nextSibling=r,e.$$childTail=r):e.$$childHead=e.$$childTail=r,(n||e!=this)&&r.$on("$destroy",h),r},$watch:function(t,n,e,r){var i=c(t);if(i.$$watchDelegate)return i.$$watchDelegate(this,n,e,i,t);var o=this,u=o.$$watchers,s={fn:n,last:x,get:i,exp:r||t,eq:!!e};return a=null,M(n)||(s.fn=v),u||(u=o.$$watchers=[]),u.unshift(s),m(this,1),function(){I(u,s)>=0&&m(o,-1),a=null}},$watchGroup:function(t,n){function e(){s=!1,l?(l=!1,n(i,i,u)):n(i,r,u)}var r=new Array(t.length),i=new Array(t.length),a=[],u=this,s=!1,l=!0;if(!t.length){var c=!0;return u.$evalAsync(function(){c&&n(i,i,u)}),function(){c=!1}}return 1===t.length?this.$watch(t[0],function(t,e,o){i[0]=t,r[0]=e,n(i,t===e?i:r,o)}):(o(t,function(t,n){var o=u.$watch(t,function(t,o){i[n]=t,r[n]=o,s||(s=!0,u.$evalAsync(e))});a.push(o)}),function(){for(;a.length;)a.shift()()})},$watchCollection:function(t,n){function e(t){o=t;var n,e,r,u,s;if(!$(o)){if(b(o))if(i(o)){a!==p&&(a=p,g=a.length=0,f++),n=o.length,g!==n&&(f++,a.length=g=n);for(var l=0;n>l;l++)s=a[l],u=o[l],r=s!==s&&u!==u,r||s===u||(f++,a[l]=u)}else{a!==d&&(a=d={},g=0,f++),n=0;for(e in o)br.call(o,e)&&(n++,u=o[e],s=a[e],e in a?(r=s!==s&&u!==u,r||s===u||(f++,a[e]=u)):(g++,a[e]=u,f++));if(g>n){f++;for(e in a)br.call(o,e)||(g--,delete a[e])}}else a!==o&&(a=o,f++);return f}}function r(){if(v?(v=!1,n(o,o,s)):n(o,u,s),l)if(b(o))if(i(o)){u=new Array(o.length);for(var t=0;t<o.length;t++)u[t]=o[t]}else{u={};for(var e in o)br.call(o,e)&&(u[e]=o[e])}else u=o}e.$stateful=!0;var o,a,u,s=this,l=n.length>1,f=0,h=c(t,e),p=[],d={},v=!0,g=0;return this.$watch(h,r)},$digest:function(){var t,r,i,o,s,c,h,p,v,m,y=n,$=this,b=[];d("$digest"),f.$$checkUrlChange(),this===C&&null!==u&&(f.defer.cancel(u),w()),a=null;do{for(c=!1,p=$;S.length;){try{m=S.shift(),m.scope.$eval(m.expression,m.locals)}catch(_){l(_)}a=null}t:do{if(o=p.$$watchers)for(s=o.length;s--;)try{if(t=o[s])if((r=t.get(p))===(i=t.last)||(t.eq?V(r,i):"number"==typeof r&&"number"==typeof i&&isNaN(r)&&isNaN(i))){if(t===a){c=!1;break t}}else c=!0,a=t,t.last=t.eq?z(r,null):r,t.fn(r,i===x?r:i,p),5>y&&(v=4-y,b[v]||(b[v]=[]),b[v].push({msg:M(t.exp)?"fn: "+(t.exp.name||t.exp.toString()):t.exp,newVal:r,oldVal:i}))}catch(_){l(_)}if(!(h=p.$$watchersCount&&p.$$childHead||p!==$&&p.$$nextSibling))for(;p!==$&&!(h=p.$$nextSibling);)p=p.$parent}while(p=h);if((c||S.length)&&!y--)throw g(),e("infdig","{0} $digest() iterations reached. Aborting!\nWatchers fired in the last 5 iterations: {1}",n,b)}while(c||S.length);for(g();k.length;)try{k.shift()()}catch(_){l(_)}},$destroy:function(){if(!this.$$destroyed){var t=this.$parent;this.$broadcast("$destroy"),this.$$destroyed=!0,this===C&&f.$$applicationDestroyed(),m(this,-this.$$watchersCount);for(var n in this.$$listenerCount)y(this,this.$$listenerCount[n],n);t&&t.$$childHead==this&&(t.$$childHead=this.$$nextSibling),t&&t.$$childTail==this&&(t.$$childTail=this.$$prevSibling),this.$$prevSibling&&(this.$$prevSibling.$$nextSibling=this.$$nextSibling),this.$$nextSibling&&(this.$$nextSibling.$$prevSibling=this.$$prevSibling),this.$destroy=this.$digest=this.$apply=this.$evalAsync=this.$applyAsync=v,this.$on=this.$watch=this.$watchGroup=function(){return v},this.$$listeners={},this.$parent=this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=this.$root=this.$$watchers=null}},$eval:function(t,n){return c(t)(this,n)},$evalAsync:function(t,n){C.$$phase||S.length||f.defer(function(){S.length&&C.$digest()}),S.push({scope:this,expression:t,locals:n})},$$postDigest:function(t){k.push(t)},$apply:function(t){try{d("$apply");try{return this.$eval(t)}finally{g()}}catch(n){l(n)}finally{try{C.$digest()}catch(n){throw l(n),n}}},$applyAsync:function(t){function n(){e.$eval(t)}var e=this;t&&A.push(n),_()},$on:function(t,n){var e=this.$$listeners[t];e||(this.$$listeners[t]=e=[]),e.push(n);var r=this;do r.$$listenerCount[t]||(r.$$listenerCount[t]=0),r.$$listenerCount[t]++;while(r=r.$parent);var i=this;return function(){var r=e.indexOf(n);-1!==r&&(e[r]=null,y(i,1,t))}},$emit:function(t,n){var e,r,i,o=[],a=this,u=!1,s={name:t,targetScope:a,stopPropagation:function(){u=!0},preventDefault:function(){s.defaultPrevented=!0},defaultPrevented:!1},c=B([s],arguments,1);do{for(e=a.$$listeners[t]||o,s.currentScope=a,r=0,i=e.length;i>r;r++)if(e[r])try{e[r].apply(null,c)}catch(f){l(f)}else e.splice(r,1),r--,i--;if(u)return s.currentScope=null,s;a=a.$parent}while(a);return s.currentScope=null,s},$broadcast:function(t,n){var e=this,r=e,i=e,o={name:t,targetScope:e,preventDefault:function(){o.defaultPrevented=!0},defaultPrevented:!1};if(!e.$$listenerCount[t])return o;for(var a,u,s,c=B([o],arguments,1);r=i;){for(o.currentScope=r,a=r.$$listeners[t]||[],u=0,s=a.length;s>u;u++)if(a[u])try{a[u].apply(null,c)}catch(f){l(f)}else a.splice(u,1),u--,s--;if(!(i=r.$$listenerCount[t]&&r.$$childHead||r!==e&&r.$$nextSibling))for(;r!==e&&!(i=r.$$nextSibling);)r=r.$parent}return o.currentScope=null,o}};var C=new p,S=C.$$asyncQueue=[],k=C.$$postDigestQueue=[],A=C.$$applyAsyncQueue=[];return C}]}function me(){var t=/^\s*(https?|ftp|mailto|tel|file):/,n=/^\s*((https?|ftp|file|blob):|data:image\/)/;this.aHrefSanitizationWhitelist=function(n){return x(n)?(t=n,this):t},this.imgSrcSanitizationWhitelist=function(t){return x(t)?(n=t,this):n},this.$get=function(){return function(e,r){var i,o=r?n:t;return i=Me(e).href,""===i||i.match(o)?e:"unsafe:"+i}}}function ye(t){if("self"===t)return t;if(_(t)){if(t.indexOf("***")>-1)throw ro("iwcard","Illegal sequence *** in string matcher. String: {0}",t);return t=qr(t).replace("\\*\\*",".*").replace("\\*","[^:/.?&;]*"),new RegExp("^"+t+"$")}if(k(t))return new RegExp("^"+t.source+"$");throw ro("imatcher",'Matchers may only be "self", string patterns or RegExp objects')}function $e(t){var n=[];return x(t)&&o(t,function(t){n.push(ye(t))}),n}function xe(){this.SCE_CONTEXTS=io;var t=["self"],n=[];this.resourceUrlWhitelist=function(n){return arguments.length&&(t=$e(n)),t},this.resourceUrlBlacklist=function(t){return arguments.length&&(n=$e(t)),n},this.$get=["$injector",function(e){function r(t,n){return"self"===t?ke(n):!!t.exec(n.href)}function i(e){var i,o,a=Me(e.toString()),u=!1;for(i=0,o=t.length;o>i;i++)if(r(t[i],a)){u=!0;break}if(u)for(i=0,o=n.length;o>i;i++)if(r(n[i],a)){u=!1;break}return u}function o(t){var n=function(t){this.$$unwrapTrustedValue=function(){return t}};return t&&(n.prototype=new t),n.prototype.valueOf=function(){return this.$$unwrapTrustedValue()},n.prototype.toString=function(){return this.$$unwrapTrustedValue().toString()},n}function a(t,n){var e=f.hasOwnProperty(t)?f[t]:null;if(!e)throw ro("icontext","Attempted to trust a value in invalid context. Context: {0}; Value: {1}",t,n);if(null===n||$(n)||""===n)return n;if("string"!=typeof n)throw ro("itype","Attempted to trust a non-string value in a content requiring a string: Context: {0}",t);return new e(n)}function u(t){return t instanceof c?t.$$unwrapTrustedValue():t}function s(t,n){if(null===n||$(n)||""===n)return n;var e=f.hasOwnProperty(t)?f[t]:null;if(e&&n instanceof e)return n.$$unwrapTrustedValue();if(t===io.RESOURCE_URL){if(i(n))return n;throw ro("insecurl","Blocked loading resource from url not allowed by $sceDelegate policy. URL: {0}",n.toString())}if(t===io.HTML)return l(n);throw ro("unsafe","Attempting to use an unsafe value in a safe context.")}var l=function(t){throw ro("unsafe","Attempting to use an unsafe value in a safe context.")};e.has("$sanitize")&&(l=e.get("$sanitize"));var c=o(),f={};return f[io.HTML]=o(c),f[io.CSS]=o(c),f[io.URL]=o(c),f[io.JS]=o(c),f[io.RESOURCE_URL]=o(f[io.URL]),{trustAs:a,getTrusted:s,valueOf:u}}]}function be(){var t=!0;this.enabled=function(n){return arguments.length&&(t=!!n),t},this.$get=["$parse","$sceDelegate",function(n,e){if(t&&8>Sr)throw ro("iequirks","Strict Contextual Escaping does not support Internet Explorer version < 11 in quirks mode. You can fix this by adding the text <!doctype html> to the top of your HTML document. See http://docs.angularjs.org/api/ng.$sce for more information.");var r=q(io);r.isEnabled=function(){return t},r.trustAs=e.trustAs,r.getTrusted=e.getTrusted,r.valueOf=e.valueOf,t||(r.trustAs=r.getTrusted=function(t,n){return n},r.valueOf=g),r.parseAs=function(t,e){var i=n(e);return i.literal&&i.constant?i:n(e,function(n){return r.getTrusted(t,n)})};var i=r.parseAs,a=r.getTrusted,u=r.trustAs;return o(io,function(t,n){var e=xr(n);r[wt("parse_as_"+e)]=function(n){return i(t,n)},r[wt("get_trusted_"+e)]=function(n){return a(t,n)},r[wt("trust_as_"+e)]=function(n){return u(t,n)}}),r}]}function we(){this.$get=["$window","$document",function(t,n){var e,r,i={},o=p((/android (\d+)/.exec(xr((t.navigator||{}).userAgent))||[])[1]),a=/Boxee/i.test((t.navigator||{}).userAgent),u=n[0]||{},s=/^(Moz|webkit|ms)(?=[A-Z])/,l=u.body&&u.body.style,c=!1,f=!1;if(l){for(var h in l)if(r=s.exec(h)){e=r[0],e=e.substr(0,1).toUpperCase()+e.substr(1);break}e||(e="WebkitOpacity"in l&&"webkit"),c=!!("transition"in l||e+"Transition"in l),f=!!("animation"in l||e+"Animation"in l),!o||c&&f||(c=_(l.webkitTransition),f=_(l.webkitAnimation))}return{history:!(!t.history||!t.history.pushState||4>o||a),hasEvent:function(t){if("input"===t&&11>=Sr)return!1;if($(i[t])){var n=u.createElement("div");i[t]="on"+t in n}return i[t]},csp:Vr(),vendorPrefix:e,transitions:c,animations:f,android:o}}]}function _e(){this.$get=["$templateCache","$http","$q","$sce",function(t,n,e,r){function i(o,a){function u(t){if(!a)throw Pi("tpload","Failed to load template: {0} (HTTP status: {1} {2})",o,t.status,t.statusText);return e.reject(t)}i.totalPendingRequests++,_(o)&&t.get(o)||(o=r.getTrustedResourceUrl(o));var s=n.defaults&&n.defaults.transformResponse;Dr(s)?s=s.filter(function(t){return t!==xn}):s===xn&&(s=null);var l={cache:t,transformResponse:s};return n.get(o,l)["finally"](function(){i.totalPendingRequests--}).then(function(n){return t.put(o,n.data),n.data},u)}return i.totalPendingRequests=0,i}]}function Ce(){this.$get=["$rootScope","$browser","$location",function(t,n,e){var r={};return r.findBindings=function(t,n,e){var r=t.getElementsByClassName("ng-binding"),i=[];return o(r,function(t){var r=Rr.element(t).data("$binding");r&&o(r,function(r){if(e){var o=new RegExp("(^|\\s)"+qr(n)+"(\\s|\\||$)");o.test(r)&&i.push(t)}else-1!=r.indexOf(n)&&i.push(t)})}),i},r.findModels=function(t,n,e){for(var r=["ng-","data-ng-","ng\\:"],i=0;i<r.length;++i){var o=e?"=":"*=",a="["+r[i]+"model"+o+'"'+n+'"]',u=t.querySelectorAll(a);if(u.length)return u}},r.getLocation=function(){return e.url()},r.setLocation=function(n){n!==e.url()&&(e.url(n),t.$digest())},r.whenStable=function(t){n.notifyWhenNoOutstandingRequests(t)},r}]}function Se(){this.$get=["$rootScope","$browser","$q","$$q","$exceptionHandler",function(t,n,e,r,i){function o(o,u,s){M(o)||(s=u,u=o,o=v);var l,c=W(arguments,3),f=x(s)&&!s,h=(f?r:e).defer(),p=h.promise;return l=n.defer(function(){try{h.resolve(o.apply(null,c))}catch(n){h.reject(n),i(n)}finally{delete a[p.$$timeoutId]}f||t.$apply()},u),p.$$timeoutId=l,a[l]=h,p}var a={};return o.cancel=function(t){return t&&t.$$timeoutId in a?(a[t.$$timeoutId].reject("canceled"),delete a[t.$$timeoutId],n.defer.cancel(t.$$timeoutId)):!1},o}]}function Me(t){var n=t;return Sr&&(oo.setAttribute("href",n),n=oo.href),oo.setAttribute("href",n),{href:oo.href,protocol:oo.protocol?oo.protocol.replace(/:$/,""):"",host:oo.host,search:oo.search?oo.search.replace(/^\?/,""):"",hash:oo.hash?oo.hash.replace(/^#/,""):"",hostname:oo.hostname,port:oo.port,pathname:"/"===oo.pathname.charAt(0)?oo.pathname:"/"+oo.pathname}}function ke(t){var n=_(t)?Me(t):t;return n.protocol===ao.protocol&&n.host===ao.host}function Ae(){this.$get=m(t)}function Ee(t){function n(t){try{return decodeURIComponent(t)}catch(n){return t}}var e=t[0]||{},r={},i="";return function(){var t,o,a,u,s,l=e.cookie||"";if(l!==i)for(i=l,t=i.split("; "),r={},a=0;a<t.length;a++)o=t[a],u=o.indexOf("="),u>0&&(s=n(o.substring(0,u)),$(r[s])&&(r[s]=n(o.substring(u+1))));return r}}function Pe(){this.$get=Ee}function Oe(t){function n(r,i){if(b(r)){var a={};return o(r,function(t,e){a[e]=n(e,t)}),a}return t.factory(r+e,i)}var e="Filter";this.register=n,this.$get=["$injector",function(t){return function(n){return t.get(n+e)}}],n("currency",Ne),n("date",Xe),n("filter",Te),n("json",Ze),n("limitTo",Je),n("lowercase",fo),n("number",Fe),n("orderBy",Ke),n("uppercase",ho)}function Te(){return function(t,n,e){if(!i(t)){if(null==t)return t;throw r("filter")("notarray","Expected array but received: {0}",t)}var o,a,u=Re(n);switch(u){case"function":o=n;break;case"boolean":case"null":case"number":case"string":a=!0;case"object":o=je(n,e,a);break;default:return t}return Array.prototype.filter.call(t,o)}}function je(t,n,e){var r,i=b(t)&&"$"in t;return n===!0?n=V:M(n)||(n=function(t,n){return $(t)?!1:null===t||null===n?t===n:b(n)||b(t)&&!y(t)?!1:(t=xr(""+t),n=xr(""+n),-1!==t.indexOf(n))}),r=function(r){return i&&!b(r)?Le(r,t.$,n,!1):Le(r,t,n,e)}}function Le(t,n,e,r,i){var o=Re(t),a=Re(n);if("string"===a&&"!"===n.charAt(0))return!Le(t,n.substring(1),e,r);if(Dr(t))return t.some(function(t){return Le(t,n,e,r)});switch(o){case"object":var u;if(r){for(u in t)if("$"!==u.charAt(0)&&Le(t[u],n,e,!0))return!0;return i?!1:Le(t,n,e,!1)}if("object"===a){for(u in n){var s=n[u];if(!M(s)&&!$(s)){var l="$"===u,c=l?t:t[u];if(!Le(c,s,e,l,l))return!1}}return!0}return e(t,n);case"function":return!1;default:return e(t,n)}}function Re(t){return null===t?"null":typeof t}function Ne(t){var n=t.NUMBER_FORMATS;return function(t,e,r){return $(e)&&(e=n.CURRENCY_SYM),$(r)&&(r=n.PATTERNS[1].maxFrac),null==t?t:De(t,n.PATTERNS[1],n.GROUP_SEP,n.DECIMAL_SEP,r).replace(/\u00A4/g,e)}}function Fe(t){var n=t.NUMBER_FORMATS;return function(t,e){return null==t?t:De(t,n.PATTERNS[0],n.GROUP_SEP,n.DECIMAL_SEP,e)}}function De(t,n,e,r,i){if(b(t))return"";var o=0>t;t=Math.abs(t);var a=t===1/0;if(!a&&!isFinite(t))return"";var u=t+"",s="",l=!1,c=[];if(a&&(s="∞"),!a&&-1!==u.indexOf("e")){var f=u.match(/([\d\.]+)e(-?)(\d+)/);f&&"-"==f[2]&&f[3]>i+1?t=0:(s=u,l=!0)}if(a||l)i>0&&1>t&&(s=t.toFixed(i),t=parseFloat(s),s=s.replace(uo,r));else{var h=(u.split(uo)[1]||"").length;$(i)&&(i=Math.min(Math.max(n.minFrac,h),n.maxFrac)),t=+(Math.round(+(t.toString()+"e"+i)).toString()+"e"+-i);var p=(""+t).split(uo),d=p[0];p=p[1]||"";var v,g=0,m=n.lgSize,y=n.gSize;if(d.length>=m+y)for(g=d.length-m,v=0;g>v;v++)(g-v)%y===0&&0!==v&&(s+=e),s+=d.charAt(v);for(v=g;v<d.length;v++)(d.length-v)%m===0&&0!==v&&(s+=e),s+=d.charAt(v);for(;p.length<i;)p+="0";i&&"0"!==i&&(s+=r+p.substr(0,i))}return 0===t&&(o=!1),c.push(o?n.negPre:n.posPre,s,o?n.negSuf:n.posSuf),c.join("")}function Ie(t,n,e){var r="";for(0>t&&(r="-",t=-t),t=""+t;t.length<n;)t="0"+t;return e&&(t=t.substr(t.length-n)),r+t}function ze(t,n,e,r){return e=e||0,function(i){var o=i["get"+t]();return(e>0||o>-e)&&(o+=e),0===o&&-12==e&&(o=12),Ie(o,n,r)}}function qe(t,n){return function(e,r){var i=e["get"+t](),o=wr(n?"SHORT"+t:t);return r[o][i]}}function Ve(t,n,e){var r=-1*e,i=r>=0?"+":"";return i+=Ie(Math[r>0?"floor":"ceil"](r/60),2)+Ie(Math.abs(r%60),2)}function Be(t){var n=new Date(t,0,1).getDay();return new Date(t,0,(4>=n?5:12)-n)}function We(t){return new Date(t.getFullYear(),t.getMonth(),t.getDate()+(4-t.getDay()))}function Ue(t){return function(n){var e=Be(n.getFullYear()),r=We(n),i=+r-+e,o=1+Math.round(i/6048e5);return Ie(o,t)}}function He(t,n){return t.getHours()<12?n.AMPMS[0]:n.AMPMS[1]}function Ye(t,n){return t.getFullYear()<=0?n.ERAS[0]:n.ERAS[1]}function Ge(t,n){return t.getFullYear()<=0?n.ERANAMES[0]:n.ERANAMES[1]}function Xe(t){function n(t){var n;if(n=t.match(e)){var r=new Date(0),i=0,o=0,a=n[8]?r.setUTCFullYear:r.setFullYear,u=n[8]?r.setUTCHours:r.setHours;n[9]&&(i=p(n[9]+n[10]),o=p(n[9]+n[11])),a.call(r,p(n[1]),p(n[2])-1,p(n[3]));var s=p(n[4]||0)-i,l=p(n[5]||0)-o,c=p(n[6]||0),f=Math.round(1e3*parseFloat("0."+(n[7]||0)));return u.call(r,s,l,c,f),r}return t}var e=/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/;return function(e,r,i){var a,u,s="",l=[];if(r=r||"mediumDate",r=t.DATETIME_FORMATS[r]||r,_(e)&&(e=co.test(e)?p(e):n(e)),C(e)&&(e=new Date(e)),!S(e)||!isFinite(e.getTime()))return e;for(;r;)u=lo.exec(r),u?(l=B(l,u,1),r=l.pop()):(l.push(r),r=null);var c=e.getTimezoneOffset();return i&&(c=X(i,e.getTimezoneOffset()),e=J(e,i,!0)),o(l,function(n){a=so[n],s+=a?a(e,t.DATETIME_FORMATS,c):n.replace(/(^'|'$)/g,"").replace(/''/g,"'")}),s}}function Ze(){return function(t,n){return $(n)&&(n=2),Y(t,n)}}function Je(){return function(t,n,e){return n=Math.abs(Number(n))===1/0?Number(n):p(n),isNaN(n)?t:(C(t)&&(t=t.toString()),Dr(t)||_(t)?(e=!e||isNaN(e)?0:p(e),e=0>e&&e>=-t.length?t.length+e:e,n>=0?t.slice(e,e+n):0===e?t.slice(n,t.length):t.slice(Math.max(0,e+n),e)):t)}}function Ke(t){function n(n,e){return e=e?-1:1,n.map(function(n){var r=1,i=g;if(M(n))i=n;else if(_(n)&&("+"!=n.charAt(0)&&"-"!=n.charAt(0)||(r="-"==n.charAt(0)?-1:1,n=n.substring(1)),""!==n&&(i=t(n),i.constant))){var o=i();i=function(t){return t[o]}}return{get:i,descending:r*e}})}function e(t){switch(typeof t){case"number":case"boolean":case"string":return!0;default:return!1}}function r(t,n){return"function"==typeof t.valueOf&&(t=t.valueOf(),e(t))?t:y(t)&&(t=t.toString(),e(t))?t:n}function o(t,n){var e=typeof t;return null===t?(e="string",t="null"):"string"===e?t=t.toLowerCase():"object"===e&&(t=r(t,n)),{value:t,type:e}}function a(t,n){var e=0;return t.type===n.type?t.value!==n.value&&(e=t.value<n.value?-1:1):e=t.type<n.type?-1:1,e}return function(t,e,r){function u(t,n){return{value:t,predicateValues:l.map(function(e){return o(e.get(t),n)})}}function s(t,n){for(var e=0,r=0,i=l.length;i>r&&!(e=a(t.predicateValues[r],n.predicateValues[r])*l[r].descending);++r);return e}if(!i(t))return t;Dr(e)||(e=[e]),0===e.length&&(e=["+"]);var l=n(e,r);l.push({get:function(){return{}},descending:r?-1:1});var c=Array.prototype.map.call(t,u);return c.sort(s),t=c.map(function(t){return t.value})}}function Qe(t){return M(t)&&(t={link:t}),t.restrict=t.restrict||"AC",m(t)}function tr(t,n){t.$name=n}function nr(t,n,r,i,a){var u=this,s=[];u.$error={},u.$$success={},u.$pending=e,u.$name=a(n.name||n.ngForm||"")(r),u.$dirty=!1,u.$pristine=!0,u.$valid=!0,u.$invalid=!1,u.$submitted=!1,u.$$parentForm=go,u.$rollbackViewValue=function(){o(s,function(t){t.$rollbackViewValue()})},u.$commitViewValue=function(){o(s,function(t){t.$commitViewValue()})},u.$addControl=function(t){pt(t.$name,"input"),s.push(t),t.$name&&(u[t.$name]=t),t.$$parentForm=u},u.$$renameControl=function(t,n){var e=t.$name;u[e]===t&&delete u[e],u[n]=t,t.$name=n},u.$removeControl=function(t){t.$name&&u[t.$name]===t&&delete u[t.$name],o(u.$pending,function(n,e){u.$setValidity(e,null,t)}),o(u.$error,function(n,e){u.$setValidity(e,null,t)}),o(u.$$success,function(n,e){u.$setValidity(e,null,t)}),I(s,t),t.$$parentForm=go},gr({ctrl:this,$element:t,set:function(t,n,e){var r=t[n];if(r){var i=r.indexOf(e);-1===i&&r.push(e)}else t[n]=[e]},unset:function(t,n,e){var r=t[n];r&&(I(r,e),0===r.length&&delete t[n])},$animate:i}),u.$setDirty=function(){i.removeClass(t,Ko),i.addClass(t,Qo),u.$dirty=!0,u.$pristine=!1,u.$$parentForm.$setDirty()},u.$setPristine=function(){i.setClass(t,Ko,Qo+" "+mo),u.$dirty=!1,u.$pristine=!0,u.$submitted=!1,o(s,function(t){t.$setPristine()})},u.$setUntouched=function(){o(s,function(t){t.$setUntouched()})},u.$setSubmitted=function(){i.addClass(t,mo),u.$submitted=!0,u.$$parentForm.$setSubmitted()}}function er(t){t.$formatters.push(function(n){return t.$isEmpty(n)?n:n.toString()})}function rr(t,n,e,r,i,o){ir(t,n,e,r,i,o),er(r)}function ir(t,n,e,r,i,o){var a=xr(n[0].type);if(!i.android){var u=!1;n.on("compositionstart",function(t){u=!0}),n.on("compositionend",function(){u=!1,s()})}var s=function(t){if(l&&(o.defer.cancel(l),l=null),!u){var i=n.val(),s=t&&t.type;"password"===a||e.ngTrim&&"false"===e.ngTrim||(i=zr(i)),(r.$viewValue!==i||""===i&&r.$$hasNativeValidators)&&r.$setViewValue(i,s)}};if(i.hasEvent("input"))n.on("input",s);else{var l,c=function(t,n,e){l||(l=o.defer(function(){l=null,n&&n.value===e||s(t)}))};n.on("keydown",function(t){var n=t.keyCode;91===n||n>15&&19>n||n>=37&&40>=n||c(t,this,this.value)}),i.hasEvent("paste")&&n.on("paste cut",c)}n.on("change",s),r.$render=function(){var t=r.$isEmpty(r.$viewValue)?"":r.$viewValue;n.val()!==t&&n.val(t)}}function or(t,n){if(S(t))return t;if(_(t)){ko.lastIndex=0;var e=ko.exec(t);if(e){var r=+e[1],i=+e[2],o=0,a=0,u=0,s=0,l=Be(r),c=7*(i-1);return n&&(o=n.getHours(),a=n.getMinutes(),u=n.getSeconds(),s=n.getMilliseconds()),new Date(r,0,l.getDate()+c,o,a,u,s)}}return NaN}function ar(t,n){return function(e,r){var i,a;if(S(e))return e;if(_(e)){if('"'==e.charAt(0)&&'"'==e.charAt(e.length-1)&&(e=e.substring(1,e.length-1)),bo.test(e))return new Date(e);if(t.lastIndex=0,i=t.exec(e))return i.shift(),a=r?{yyyy:r.getFullYear(),MM:r.getMonth()+1,dd:r.getDate(),HH:r.getHours(),mm:r.getMinutes(),ss:r.getSeconds(),sss:r.getMilliseconds()/1e3}:{yyyy:1970,MM:1,dd:1,HH:0,mm:0,ss:0,sss:0},o(i,function(t,e){e<n.length&&(a[n[e]]=+t)}),new Date(a.yyyy,a.MM-1,a.dd,a.HH,a.mm,a.ss||0,1e3*a.sss||0)}return NaN}}function ur(t,n,r,i){return function(o,a,u,s,l,c,f){function h(t){return t&&!(t.getTime&&t.getTime()!==t.getTime())}function p(t){return x(t)&&!S(t)?r(t)||e:t}sr(o,a,u,s),ir(o,a,u,s,l,c);var d,v=s&&s.$options&&s.$options.timezone;if(s.$$parserName=t,s.$parsers.push(function(t){if(s.$isEmpty(t))return null;if(n.test(t)){var i=r(t,d);return v&&(i=J(i,v)),i}return e}),s.$formatters.push(function(t){if(t&&!S(t))throw ra("datefmt","Expected `{0}` to be a date",t);return h(t)?(d=t,d&&v&&(d=J(d,v,!0)),f("date")(t,i,v)):(d=null,"")}),x(u.min)||u.ngMin){var g;s.$validators.min=function(t){return!h(t)||$(g)||r(t)>=g},u.$observe("min",function(t){g=p(t),s.$validate()})}if(x(u.max)||u.ngMax){var m;s.$validators.max=function(t){return!h(t)||$(m)||r(t)<=m},u.$observe("max",function(t){m=p(t),s.$validate()})}}}function sr(t,n,r,i){var o=n[0],a=i.$$hasNativeValidators=b(o.validity);a&&i.$parsers.push(function(t){var r=n.prop($r)||{};return r.badInput&&!r.typeMismatch?e:t})}function lr(t,n,r,i,o,a){if(sr(t,n,r,i),ir(t,n,r,i,o,a),i.$$parserName="number",i.$parsers.push(function(t){return i.$isEmpty(t)?null:Co.test(t)?parseFloat(t):e}),i.$formatters.push(function(t){if(!i.$isEmpty(t)){if(!C(t))throw ra("numfmt","Expected `{0}` to be a number",t);t=t.toString()}return t}),x(r.min)||r.ngMin){var u;i.$validators.min=function(t){return i.$isEmpty(t)||$(u)||t>=u},r.$observe("min",function(t){x(t)&&!C(t)&&(t=parseFloat(t,10)),u=C(t)&&!isNaN(t)?t:e,i.$validate()})}if(x(r.max)||r.ngMax){var s;i.$validators.max=function(t){return i.$isEmpty(t)||$(s)||s>=t},r.$observe("max",function(t){x(t)&&!C(t)&&(t=parseFloat(t,10)),s=C(t)&&!isNaN(t)?t:e,i.$validate()})}}function cr(t,n,e,r,i,o){ir(t,n,e,r,i,o),er(r),r.$$parserName="url",r.$validators.url=function(t,n){var e=t||n;return r.$isEmpty(e)||wo.test(e)}}function fr(t,n,e,r,i,o){ir(t,n,e,r,i,o),er(r),r.$$parserName="email",r.$validators.email=function(t,n){var e=t||n;return r.$isEmpty(e)||_o.test(e)}}function hr(t,n,e,r){$(e.name)&&n.attr("name",s());var i=function(t){n[0].checked&&r.$setViewValue(e.value,t&&t.type)};n.on("click",i),r.$render=function(){var t=e.value;n[0].checked=t==r.$viewValue},e.$observe("value",r.$render)}function pr(t,n,e,r,i){var o;if(x(r)){if(o=t(r),!o.constant)throw ra("constexpr","Expected constant expression for `{0}`, but saw `{1}`.",e,r);return o(n)}return i}function dr(t,n,e,r,i,o,a,u){var s=pr(u,t,"ngTrueValue",e.ngTrueValue,!0),l=pr(u,t,"ngFalseValue",e.ngFalseValue,!1),c=function(t){r.$setViewValue(n[0].checked,t&&t.type)};n.on("click",c),r.$render=function(){n[0].checked=r.$viewValue},r.$isEmpty=function(t){return t===!1},r.$formatters.push(function(t){return V(t,s)}),r.$parsers.push(function(t){return t?s:l})}function vr(t,n){return t="ngClass"+t,["$animate",function(e){function r(t,n){var e=[];t:for(var r=0;r<t.length;r++){for(var i=t[r],o=0;o<n.length;o++)if(i==n[o])continue t;e.push(i)}return e}function i(t){var n=[];return Dr(t)?(o(t,function(t){n=n.concat(i(t))}),n):_(t)?t.split(" "):b(t)?(o(t,function(t,e){t&&(n=n.concat(e.split(" ")))}),n):t}return{restrict:"AC",link:function(a,u,s){function l(t){var n=f(t,1);s.$addClass(n)}function c(t){var n=f(t,-1);s.$removeClass(n)}function f(t,n){var e=u.data("$classCounts")||gt(),r=[];return o(t,function(t){(n>0||e[t])&&(e[t]=(e[t]||0)+n,e[t]===+(n>0)&&r.push(t))}),u.data("$classCounts",e),r.join(" ")}function h(t,n){var i=r(n,t),o=r(t,n);i=f(i,1),o=f(o,-1),i&&i.length&&e.addClass(u,i),o&&o.length&&e.removeClass(u,o)}function p(t){if(n===!0||a.$index%2===n){var e=i(t||[]);if(d){if(!V(t,d)){var r=i(d);h(r,e)}}else l(e)}d=q(t)}var d;a.$watch(s[t],p,!0),s.$observe("class",function(n){p(a.$eval(s[t]))}),"ngClass"!==t&&a.$watch("$index",function(e,r){var o=1&e;if(o!==(1&r)){var u=i(a.$eval(s[t]));o===n?l(u):c(u)}})}}}]}function gr(t){function n(t,n,s){$(n)?r("$pending",t,s):i("$pending",t,s),j(n)?n?(f(u.$error,t,s),c(u.$$success,t,s)):(c(u.$error,t,s),f(u.$$success,t,s)):(f(u.$error,t,s),f(u.$$success,t,s)),u.$pending?(o(ea,!0),u.$valid=u.$invalid=e,a("",null)):(o(ea,!1),u.$valid=mr(u.$error),u.$invalid=!u.$valid,a("",u.$valid));var l;l=u.$pending&&u.$pending[t]?e:u.$error[t]?!1:u.$$success[t]?!0:null,a(t,l),u.$$parentForm.$setValidity(t,l,u)}function r(t,n,e){u[t]||(u[t]={}),c(u[t],n,e)}function i(t,n,r){u[t]&&f(u[t],n,r),mr(u[t])&&(u[t]=e)}function o(t,n){n&&!l[t]?(h.addClass(s,t),l[t]=!0):!n&&l[t]&&(h.removeClass(s,t),l[t]=!1)}function a(t,n){t=t?"-"+lt(t,"-"):"",o(Zo+t,n===!0),o(Jo+t,n===!1)}var u=t.ctrl,s=t.$element,l={},c=t.set,f=t.unset,h=t.$animate;l[Jo]=!(l[Zo]=s.hasClass(Zo)),u.$setValidity=n}function mr(t){if(t)for(var n in t)if(t.hasOwnProperty(n))return!1;return!0}var yr=/^\/(.+)\/([a-z]*)$/,$r="validity",xr=function(t){return _(t)?t.toLowerCase():t},br=Object.prototype.hasOwnProperty,wr=function(t){return _(t)?t.toUpperCase():t},_r=function(t){return _(t)?t.replace(/[A-Z]/g,function(t){return String.fromCharCode(32|t.charCodeAt(0))}):t},Cr=function(t){return _(t)?t.replace(/[a-z]/g,function(t){return String.fromCharCode(-33&t.charCodeAt(0))}):t};"i"!=="I".toLowerCase()&&(xr=_r,wr=Cr);var Sr,Mr,kr,Ar,Er=[].slice,Pr=[].splice,Or=[].push,Tr=Object.prototype.toString,jr=Object.getPrototypeOf,Lr=r("ng"),Rr=t.angular||(t.angular={}),Nr=0;Sr=n.documentMode,v.$inject=[],g.$inject=[];var Fr,Dr=Array.isArray,Ir=/^\[object (Uint8(Clamped)?)|(Uint16)|(Uint32)|(Int8)|(Int16)|(Int32)|(Float(32)|(64))Array\]$/,zr=function(t){return _(t)?t.trim():t},qr=function(t){return t.replace(/([-()\[\]{}+?*.$\^|,:#<!\\])/g,"\\$1").replace(/\x08/g,"\\x08")},Vr=function(){function t(){try{return new Function(""),!1}catch(t){return!0}}if(!x(Vr.rules)){var e=n.querySelector("[ng-csp]")||n.querySelector("[data-ng-csp]");if(e){var r=e.getAttribute("ng-csp")||e.getAttribute("data-ng-csp");Vr.rules={noUnsafeEval:!r||-1!==r.indexOf("no-unsafe-eval"),noInlineStyle:!r||-1!==r.indexOf("no-inline-style")}}else Vr.rules={noUnsafeEval:t(),noInlineStyle:!1}}return Vr.rules},Br=function(){if(x(Br.name_))return Br.name_;var t,e,r,i,o=Wr.length;for(e=0;o>e;++e)if(r=Wr[e],t=n.querySelector("["+r.replace(":","\\:")+"jq]")){i=t.getAttribute(r+"jq");break}return Br.name_=i},Wr=["ng-","data-ng-","ng:","x-ng-"],Ur=/[A-Z]/g,Hr=!1,Yr=1,Gr=2,Xr=3,Zr=8,Jr=9,Kr=11,Qr={full:"1.4.7",major:1,minor:4,dot:7,codeName:"dark-luminescence"};At.expando="ng339";var ti=At.cache={},ni=1,ei=function(t,n,e){t.addEventListener(n,e,!1)},ri=function(t,n,e){t.removeEventListener(n,e,!1)};At._data=function(t){return this.cache[t[this.expando]]||{}};var ii=/([\:\-\_]+(.))/g,oi=/^moz([A-Z])/,ai={mouseleave:"mouseout",mouseenter:"mouseover"},ui=r("jqLite"),si=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,li=/<|&#?\w+;/,ci=/<([\w:-]+)/,fi=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,hi={option:[1,'<select multiple="multiple">',"</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};hi.optgroup=hi.option,hi.tbody=hi.tfoot=hi.colgroup=hi.caption=hi.thead,hi.th=hi.td;var pi=At.prototype={ready:function(e){function r(){i||(i=!0,e())}var i=!1;"complete"===n.readyState?setTimeout(r):(this.on("DOMContentLoaded",r),At(t).on("load",r))},toString:function(){var t=[];return o(this,function(n){t.push(""+n)}),"["+t.join(", ")+"]"},eq:function(t){return Mr(t>=0?this[t]:this[this.length+t])},length:0,push:Or,sort:[].sort,splice:[].splice},di={};o("multiple,selected,checked,disabled,readOnly,required,open".split(","),function(t){di[xr(t)]=t});var vi={};o("input,select,option,textarea,button,form,details".split(","),function(t){vi[t]=!0});var gi={ngMinlength:"minlength",ngMaxlength:"maxlength",ngMin:"min",ngMax:"max",ngPattern:"pattern"};o({data:Lt,removeData:Tt,hasData:St},function(t,n){At[n]=t}),o({data:Lt,inheritedData:zt,scope:function(t){return Mr.data(t,"$scope")||zt(t.parentNode||t,["$isolateScope","$scope"])},isolateScope:function(t){return Mr.data(t,"$isolateScope")||Mr.data(t,"$isolateScopeNoTemplate")},controller:It,injector:function(t){return zt(t,"$injector")},removeAttr:function(t,n){t.removeAttribute(n)},hasClass:Rt,css:function(t,n,e){return n=wt(n),x(e)?void(t.style[n]=e):t.style[n]},attr:function(t,n,r){var i=t.nodeType;if(i!==Xr&&i!==Gr&&i!==Zr){var o=xr(n);if(di[o]){if(!x(r))return t[n]||(t.attributes.getNamedItem(n)||v).specified?o:e;r?(t[n]=!0,t.setAttribute(n,o)):(t[n]=!1,t.removeAttribute(o))}else if(x(r))t.setAttribute(n,r);else if(t.getAttribute){var a=t.getAttribute(n,2);return null===a?e:a}}},prop:function(t,n,e){return x(e)?void(t[n]=e):t[n]},text:function(){function t(t,n){
-if($(n)){var e=t.nodeType;return e===Yr||e===Xr?t.textContent:""}t.textContent=n}return t.$dv="",t}(),val:function(t,n){if($(n)){if(t.multiple&&"select"===D(t)){var e=[];return o(t.options,function(t){t.selected&&e.push(t.value||t.text)}),0===e.length?null:e}return t.value}t.value=n},html:function(t,n){return $(n)?t.innerHTML:(Pt(t,!0),void(t.innerHTML=n))},empty:qt},function(t,n){At.prototype[n]=function(n,e){var r,i,o=this.length;if(t!==qt&&$(2==t.length&&t!==Rt&&t!==It?n:e)){if(b(n)){for(r=0;o>r;r++)if(t===Lt)t(this[r],n);else for(i in n)t(this[r],i,n[i]);return this}for(var a=t.$dv,u=$(a)?Math.min(o,1):o,s=0;u>s;s++){var l=t(this[s],n,e);a=a?a+l:l}return a}for(r=0;o>r;r++)t(this[r],n,e);return this}}),o({removeData:Tt,on:function ja(t,n,e,r){if(x(r))throw ui("onargs","jqLite#on() does not support the `selector` or `eventData` parameters");if(Ct(t)){var i=jt(t,!0),o=i.events,a=i.handle;a||(a=i.handle=Ht(t,o));for(var u=n.indexOf(" ")>=0?n.split(" "):[n],s=u.length;s--;){n=u[s];var l=o[n];l||(o[n]=[],"mouseenter"===n||"mouseleave"===n?ja(t,ai[n],function(t){var e=this,r=t.relatedTarget;r&&(r===e||e.contains(r))||a(t,n)}):"$destroy"!==n&&ei(t,n,a),l=o[n]),l.push(e)}}},off:Ot,one:function(t,n,e){t=Mr(t),t.on(n,function r(){t.off(n,e),t.off(n,r)}),t.on(n,e)},replaceWith:function(t,n){var e,r=t.parentNode;Pt(t),o(new At(n),function(n){e?r.insertBefore(n,e.nextSibling):r.replaceChild(n,t),e=n})},children:function(t){var n=[];return o(t.childNodes,function(t){t.nodeType===Yr&&n.push(t)}),n},contents:function(t){return t.contentDocument||t.childNodes||[]},append:function(t,n){var e=t.nodeType;if(e===Yr||e===Kr){n=new At(n);for(var r=0,i=n.length;i>r;r++){var o=n[r];t.appendChild(o)}}},prepend:function(t,n){if(t.nodeType===Yr){var e=t.firstChild;o(new At(n),function(n){t.insertBefore(n,e)})}},wrap:function(t,n){n=Mr(n).eq(0).clone()[0];var e=t.parentNode;e&&e.replaceChild(n,t),n.appendChild(t)},remove:Vt,detach:function(t){Vt(t,!0)},after:function(t,n){var e=t,r=t.parentNode;n=new At(n);for(var i=0,o=n.length;o>i;i++){var a=n[i];r.insertBefore(a,e.nextSibling),e=a}},addClass:Ft,removeClass:Nt,toggleClass:function(t,n,e){n&&o(n.split(" "),function(n){var r=e;$(r)&&(r=!Rt(t,n)),(r?Ft:Nt)(t,n)})},parent:function(t){var n=t.parentNode;return n&&n.nodeType!==Kr?n:null},next:function(t){return t.nextElementSibling},find:function(t,n){return t.getElementsByTagName?t.getElementsByTagName(n):[]},clone:Et,triggerHandler:function(t,n,e){var r,i,a,u=n.type||n,s=jt(t),l=s&&s.events,c=l&&l[u];c&&(r={preventDefault:function(){this.defaultPrevented=!0},isDefaultPrevented:function(){return this.defaultPrevented===!0},stopImmediatePropagation:function(){this.immediatePropagationStopped=!0},isImmediatePropagationStopped:function(){return this.immediatePropagationStopped===!0},stopPropagation:v,type:u,target:t},n.type&&(r=f(r,n)),i=q(c),a=e?[r].concat(e):[r],o(i,function(n){r.isImmediatePropagationStopped()||n.apply(t,a)}))}},function(t,n){At.prototype[n]=function(n,e,r){for(var i,o=0,a=this.length;a>o;o++)$(i)?(i=t(this[o],n,e,r),x(i)&&(i=Mr(i))):Dt(i,t(this[o],n,e,r));return x(i)?i:this},At.prototype.bind=At.prototype.on,At.prototype.unbind=At.prototype.off}),Xt.prototype={put:function(t,n){this[Gt(t,this.nextUid)]=n},get:function(t){return this[Gt(t,this.nextUid)]},remove:function(t){var n=this[t=Gt(t,this.nextUid)];return delete this[t],n}};var mi=[function(){this.$get=[function(){return Xt}]}],yi=/^[^\(]*\(\s*([^\)]*)\)/m,$i=/,/,xi=/^\s*(_?)(\S+?)\1\s*$/,bi=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/gm,wi=r("$injector");Kt.$$annotate=Jt;var _i=r("$animate"),Ci=1,Si="ng-animate",Mi=function(){this.$get=["$q","$$rAF",function(t,n){function e(){}return e.all=v,e.chain=v,e.prototype={end:v,cancel:v,resume:v,pause:v,complete:v,then:function(e,r){return t(function(t){n(function(){t()})}).then(e,r)}},e}]},ki=function(){var t=new Xt,n=[];this.$get=["$$AnimateRunner","$rootScope",function(e,r){function i(t,n,e){var r=!1;return n&&(n=_(n)?n.split(" "):Dr(n)?n:[],o(n,function(n){n&&(r=!0,t[n]=e)})),r}function a(){o(n,function(n){var e=t.get(n);if(e){var r=en(n.attr("class")),i="",a="";o(e,function(t,n){var e=!!r[n];t!==e&&(t?i+=(i.length?" ":"")+n:a+=(a.length?" ":"")+n)}),o(n,function(t){i&&Ft(t,i),a&&Nt(t,a)}),t.remove(n)}}),n.length=0}function u(e,o,u){var s=t.get(e)||{},l=i(s,o,!0),c=i(s,u,!1);(l||c)&&(t.put(e,s),n.push(e),1===n.length&&r.$$postDigest(a))}return{enabled:v,on:v,off:v,pin:v,push:function(t,n,r,i){return i&&i(),r=r||{},r.from&&t.css(r.from),r.to&&t.css(r.to),(r.addClass||r.removeClass)&&u(t,r.addClass,r.removeClass),new e}}}]},Ai=["$provide",function(t){var n=this;this.$$registeredAnimations=Object.create(null),this.register=function(e,r){if(e&&"."!==e.charAt(0))throw _i("notcsel","Expecting class selector starting with '.' got '{0}'.",e);var i=e+"-animation";n.$$registeredAnimations[e.substr(1)]=i,t.factory(i,r)},this.classNameFilter=function(t){if(1===arguments.length&&(this.$$classNameFilter=t instanceof RegExp?t:null,this.$$classNameFilter)){var n=new RegExp("(\\s+|\\/)"+Si+"(\\s+|\\/)");if(n.test(this.$$classNameFilter.toString()))throw _i("nongcls",'$animateProvider.classNameFilter(regex) prohibits accepting a regex value which matches/contains the "{0}" CSS class.',Si)}return this.$$classNameFilter},this.$get=["$$animateQueue",function(t){function n(t,n,e){if(e){var r=nn(e);!r||r.parentNode||r.previousElementSibling||(e=null)}e?e.after(t):n.prepend(t)}return{on:t.on,off:t.off,pin:t.pin,enabled:t.enabled,cancel:function(t){t.end&&t.end()},enter:function(e,r,i,o){return r=r&&Mr(r),i=i&&Mr(i),r=r||i.parent(),n(e,r,i),t.push(e,"enter",rn(o))},move:function(e,r,i,o){return r=r&&Mr(r),i=i&&Mr(i),r=r||i.parent(),n(e,r,i),t.push(e,"move",rn(o))},leave:function(n,e){return t.push(n,"leave",rn(e),function(){n.remove()})},addClass:function(n,e,r){return r=rn(r),r.addClass=tn(r.addclass,e),t.push(n,"addClass",r)},removeClass:function(n,e,r){return r=rn(r),r.removeClass=tn(r.removeClass,e),t.push(n,"removeClass",r)},setClass:function(n,e,r,i){return i=rn(i),i.addClass=tn(i.addClass,e),i.removeClass=tn(i.removeClass,r),t.push(n,"setClass",i)},animate:function(n,e,r,i,o){return o=rn(o),o.from=o.from?f(o.from,e):e,o.to=o.to?f(o.to,r):r,i=i||"ng-inline-animate",o.tempClasses=tn(o.tempClasses,i),t.push(n,"animate",o)}}}]}],Ei=function(){this.$get=["$$rAF","$q",function(t,n){var e=function(){};return e.prototype={done:function(t){this.defer&&this.defer[t===!0?"reject":"resolve"]()},end:function(){this.done()},cancel:function(){this.done(!0)},getPromise:function(){return this.defer||(this.defer=n.defer()),this.defer.promise},then:function(t,n){return this.getPromise().then(t,n)},"catch":function(t){return this.getPromise()["catch"](t)},"finally":function(t){return this.getPromise()["finally"](t)}},function(n,r){function i(){return t(function(){o(),a||u.done(),a=!0}),u}function o(){r.addClass&&(n.addClass(r.addClass),r.addClass=null),r.removeClass&&(n.removeClass(r.removeClass),r.removeClass=null),r.to&&(n.css(r.to),r.to=null)}r.cleanupStyles&&(r.from=r.to=null),r.from&&(n.css(r.from),r.from=null);var a,u=new e;return{start:i,end:i}}}]},Pi=r("$compile");ln.$inject=["$provide","$$sanitizeUriProvider"];var Oi=/^((?:x|data)[\:\-_])/i,Ti=r("$controller"),ji=/^(\S+)(\s+as\s+(\w+))?$/,Li=function(){this.$get=["$document",function(t){return function(n){return n?!n.nodeType&&n instanceof Mr&&(n=n[0]):n=t[0].body,n.offsetWidth+1}}]},Ri="application/json",Ni={"Content-Type":Ri+";charset=utf-8"},Fi=/^\[|^\{(?!\{)/,Di={"[":/]$/,"{":/}$/},Ii=/^\)\]\}',?\n/,zi=r("$http"),qi=function(t){return function(){throw zi("legacy","The method `{0}` on the promise returned from `$http` has been disabled.",t)}},Vi=Rr.$interpolateMinErr=r("$interpolate");Vi.throwNoconcat=function(t){throw Vi("noconcat","Error while interpolating: {0}\nStrict Contextual Escaping disallows interpolations that concatenate multiple expressions when a trusted value is required. See http://docs.angularjs.org/api/ng.$sce",t)},Vi.interr=function(t,n){return Vi("interr","Can't interpolate: {0}\n{1}",t,n.toString())};var Bi=/^([^\?#]*)(\?([^#]*))?(#(.*))?$/,Wi={http:80,https:443,ftp:21},Ui=r("$location"),Hi={$$html5:!1,$$replace:!1,absUrl:Bn("$$absUrl"),url:function(t){if($(t))return this.$$url;var n=Bi.exec(t);return(n[1]||""===t)&&this.path(decodeURIComponent(n[1])),(n[2]||n[1]||""===t)&&this.search(n[3]||""),this.hash(n[5]||""),this},protocol:Bn("$$protocol"),host:Bn("$$host"),port:Bn("$$port"),path:Wn("$$path",function(t){return t=null!==t?t.toString():"","/"==t.charAt(0)?t:"/"+t}),search:function(t,n){switch(arguments.length){case 0:return this.$$search;case 1:if(_(t)||C(t))t=t.toString(),this.$$search=tt(t);else{if(!b(t))throw Ui("isrcharg","The first argument of the `$location#search()` call must be a string or an object.");t=z(t,{}),o(t,function(n,e){null==n&&delete t[e]}),this.$$search=t}break;default:$(n)||null===n?delete this.$$search[t]:this.$$search[t]=n}return this.$$compose(),this},hash:Wn("$$hash",function(t){return null!==t?t.toString():""}),replace:function(){return this.$$replace=!0,this}};o([Vn,qn,zn],function(t){t.prototype=Object.create(Hi),t.prototype.state=function(n){if(!arguments.length)return this.$$state;if(t!==zn||!this.$$html5)throw Ui("nostate","History API state support is available only in HTML5 mode and only in browsers supporting HTML5 History API");return this.$$state=$(n)?null:n,this}});var Yi=r("$parse"),Gi=Function.prototype.call,Xi=Function.prototype.apply,Zi=Function.prototype.bind,Ji=gt();o("+ - * / % === !== == != < > <= >= && || ! = |".split(" "),function(t){Ji[t]=!0});var Ki={n:"\n",f:"\f",r:"\r",t:" ",v:"\x0B","'":"'",'"':'"'},Qi=function(t){this.options=t};Qi.prototype={constructor:Qi,lex:function(t){for(this.text=t,this.index=0,this.tokens=[];this.index<this.text.length;){var n=this.text.charAt(this.index);if('"'===n||"'"===n)this.readString(n);else if(this.isNumber(n)||"."===n&&this.isNumber(this.peek()))this.readNumber();else if(this.isIdent(n))this.readIdent();else if(this.is(n,"(){}[].,;:?"))this.tokens.push({index:this.index,text:n}),this.index++;else if(this.isWhitespace(n))this.index++;else{var e=n+this.peek(),r=e+this.peek(2),i=Ji[n],o=Ji[e],a=Ji[r];if(i||o||a){var u=a?r:o?e:n;this.tokens.push({index:this.index,text:u,operator:!0}),this.index+=u.length}else this.throwError("Unexpected next character ",this.index,this.index+1)}}return this.tokens},is:function(t,n){return-1!==n.indexOf(t)},peek:function(t){var n=t||1;return this.index+n<this.text.length?this.text.charAt(this.index+n):!1},isNumber:function(t){return t>="0"&&"9">=t&&"string"==typeof t},isWhitespace:function(t){return" "===t||"\r"===t||" "===t||"\n"===t||"\x0B"===t||" "===t},isIdent:function(t){return t>="a"&&"z">=t||t>="A"&&"Z">=t||"_"===t||"$"===t},isExpOperator:function(t){return"-"===t||"+"===t||this.isNumber(t)},throwError:function(t,n,e){e=e||this.index;var r=x(n)?"s "+n+"-"+this.index+" ["+this.text.substring(n,e)+"]":" "+e;throw Yi("lexerr","Lexer Error: {0} at column{1} in expression [{2}].",t,r,this.text)},readNumber:function(){for(var t="",n=this.index;this.index<this.text.length;){var e=xr(this.text.charAt(this.index));if("."==e||this.isNumber(e))t+=e;else{var r=this.peek();if("e"==e&&this.isExpOperator(r))t+=e;else if(this.isExpOperator(e)&&r&&this.isNumber(r)&&"e"==t.charAt(t.length-1))t+=e;else{if(!this.isExpOperator(e)||r&&this.isNumber(r)||"e"!=t.charAt(t.length-1))break;this.throwError("Invalid exponent")}}this.index++}this.tokens.push({index:n,text:t,constant:!0,value:Number(t)})},readIdent:function(){for(var t=this.index;this.index<this.text.length;){var n=this.text.charAt(this.index);if(!this.isIdent(n)&&!this.isNumber(n))break;this.index++}this.tokens.push({index:t,text:this.text.slice(t,this.index),identifier:!0})},readString:function(t){var n=this.index;this.index++;for(var e="",r=t,i=!1;this.index<this.text.length;){var o=this.text.charAt(this.index);if(r+=o,i){if("u"===o){var a=this.text.substring(this.index+1,this.index+5);a.match(/[\da-f]{4}/i)||this.throwError("Invalid unicode escape [\\u"+a+"]"),this.index+=4,e+=String.fromCharCode(parseInt(a,16))}else{var u=Ki[o];e+=u||o}i=!1}else if("\\"===o)i=!0;else{if(o===t)return this.index++,void this.tokens.push({index:n,text:r,constant:!0,value:e});e+=o}this.index++}this.throwError("Unterminated quote",n)}};var to=function(t,n){this.lexer=t,this.options=n};to.Program="Program",to.ExpressionStatement="ExpressionStatement",to.AssignmentExpression="AssignmentExpression",to.ConditionalExpression="ConditionalExpression",to.LogicalExpression="LogicalExpression",to.BinaryExpression="BinaryExpression",to.UnaryExpression="UnaryExpression",to.CallExpression="CallExpression",to.MemberExpression="MemberExpression",to.Identifier="Identifier",to.Literal="Literal",to.ArrayExpression="ArrayExpression",to.Property="Property",to.ObjectExpression="ObjectExpression",to.ThisExpression="ThisExpression",to.NGValueParameter="NGValueParameter",to.prototype={ast:function(t){this.text=t,this.tokens=this.lexer.lex(t);var n=this.program();return 0!==this.tokens.length&&this.throwError("is an unexpected token",this.tokens[0]),n},program:function(){for(var t=[];;)if(this.tokens.length>0&&!this.peek("}",")",";","]")&&t.push(this.expressionStatement()),!this.expect(";"))return{type:to.Program,body:t}},expressionStatement:function(){return{type:to.ExpressionStatement,expression:this.filterChain()}},filterChain:function(){for(var t,n=this.expression();t=this.expect("|");)n=this.filter(n);return n},expression:function(){return this.assignment()},assignment:function(){var t=this.ternary();return this.expect("=")&&(t={type:to.AssignmentExpression,left:t,right:this.assignment(),operator:"="}),t},ternary:function(){var t,n,e=this.logicalOR();return this.expect("?")&&(t=this.expression(),this.consume(":"))?(n=this.expression(),{type:to.ConditionalExpression,test:e,alternate:t,consequent:n}):e},logicalOR:function(){for(var t=this.logicalAND();this.expect("||");)t={type:to.LogicalExpression,operator:"||",left:t,right:this.logicalAND()};return t},logicalAND:function(){for(var t=this.equality();this.expect("&&");)t={type:to.LogicalExpression,operator:"&&",left:t,right:this.equality()};return t},equality:function(){for(var t,n=this.relational();t=this.expect("==","!=","===","!==");)n={type:to.BinaryExpression,operator:t.text,left:n,right:this.relational()};return n},relational:function(){for(var t,n=this.additive();t=this.expect("<",">","<=",">=");)n={type:to.BinaryExpression,operator:t.text,left:n,right:this.additive()};return n},additive:function(){for(var t,n=this.multiplicative();t=this.expect("+","-");)n={type:to.BinaryExpression,operator:t.text,left:n,right:this.multiplicative()};return n},multiplicative:function(){for(var t,n=this.unary();t=this.expect("*","/","%");)n={type:to.BinaryExpression,operator:t.text,left:n,right:this.unary()};return n},unary:function(){var t;return(t=this.expect("+","-","!"))?{type:to.UnaryExpression,operator:t.text,prefix:!0,argument:this.unary()}:this.primary()},primary:function(){var t;this.expect("(")?(t=this.filterChain(),this.consume(")")):this.expect("[")?t=this.arrayDeclaration():this.expect("{")?t=this.object():this.constants.hasOwnProperty(this.peek().text)?t=z(this.constants[this.consume().text]):this.peek().identifier?t=this.identifier():this.peek().constant?t=this.constant():this.throwError("not a primary expression",this.peek());for(var n;n=this.expect("(","[",".");)"("===n.text?(t={type:to.CallExpression,callee:t,arguments:this.parseArguments()},this.consume(")")):"["===n.text?(t={type:to.MemberExpression,object:t,property:this.expression(),computed:!0},this.consume("]")):"."===n.text?t={type:to.MemberExpression,object:t,property:this.identifier(),computed:!1}:this.throwError("IMPOSSIBLE");return t},filter:function(t){for(var n=[t],e={type:to.CallExpression,callee:this.identifier(),arguments:n,filter:!0};this.expect(":");)n.push(this.expression());return e},parseArguments:function(){var t=[];if(")"!==this.peekToken().text)do t.push(this.expression());while(this.expect(","));return t},identifier:function(){var t=this.consume();return t.identifier||this.throwError("is not a valid identifier",t),{type:to.Identifier,name:t.text}},constant:function(){return{type:to.Literal,value:this.consume().value}},arrayDeclaration:function(){var t=[];if("]"!==this.peekToken().text)do{if(this.peek("]"))break;t.push(this.expression())}while(this.expect(","));return this.consume("]"),{type:to.ArrayExpression,elements:t}},object:function(){var t,n=[];if("}"!==this.peekToken().text)do{if(this.peek("}"))break;t={type:to.Property,kind:"init"},this.peek().constant?t.key=this.constant():this.peek().identifier?t.key=this.identifier():this.throwError("invalid key",this.peek()),this.consume(":"),t.value=this.expression(),n.push(t)}while(this.expect(","));return this.consume("}"),{type:to.ObjectExpression,properties:n}},throwError:function(t,n){throw Yi("syntax","Syntax Error: Token '{0}' {1} at column {2} of the expression [{3}] starting at [{4}].",n.text,t,n.index+1,this.text,this.text.substring(n.index))},consume:function(t){if(0===this.tokens.length)throw Yi("ueoe","Unexpected end of expression: {0}",this.text);var n=this.expect(t);return n||this.throwError("is unexpected, expecting ["+t+"]",this.peek()),n},peekToken:function(){if(0===this.tokens.length)throw Yi("ueoe","Unexpected end of expression: {0}",this.text);return this.tokens[0]},peek:function(t,n,e,r){return this.peekAhead(0,t,n,e,r)},peekAhead:function(t,n,e,r,i){if(this.tokens.length>t){var o=this.tokens[t],a=o.text;if(a===n||a===e||a===r||a===i||!n&&!e&&!r&&!i)return o}return!1},expect:function(t,n,e,r){var i=this.peek(t,n,e,r);return i?(this.tokens.shift(),i):!1},constants:{"true":{type:to.Literal,value:!0},"false":{type:to.Literal,value:!1},"null":{type:to.Literal,value:null},undefined:{type:to.Literal,value:e},"this":{type:to.ThisExpression}}},ue.prototype={compile:function(t,n){var r=this,i=this.astBuilder.ast(t);this.state={nextId:0,filters:{},expensiveChecks:n,fn:{vars:[],body:[],own:{}},assign:{vars:[],body:[],own:{}},inputs:[]},ne(i,r.$filter);var a,u="";if(this.stage="assign",a=ie(i)){this.state.computing="assign";var s=this.nextId();this.recurse(a,s),this.return_(s),u="fn.assign="+this.generateFunction("assign","s,v,l")}var l=ee(i.body);r.stage="inputs",o(l,function(t,n){var e="fn"+n;r.state[e]={vars:[],body:[],own:{}},r.state.computing=e;var i=r.nextId();r.recurse(t,i),r.return_(i),r.state.inputs.push(e),t.watchId=n}),this.state.computing="fn",this.stage="main",this.recurse(i);var c='"'+this.USE+" "+this.STRICT+'";\n'+this.filterPrefix()+"var fn="+this.generateFunction("fn","s,l,a,i")+u+this.watchFns()+"return fn;",f=new Function("$filter","ensureSafeMemberName","ensureSafeObject","ensureSafeFunction","getStringValue","ensureSafeAssignContext","ifDefined","plus","text",c)(this.$filter,Yn,Xn,Zn,Gn,Jn,Kn,Qn,t);return this.state=this.stage=e,f.literal=oe(i),f.constant=ae(i),f},USE:"use",STRICT:"strict",watchFns:function(){var t=[],n=this.state.inputs,e=this;return o(n,function(n){t.push("var "+n+"="+e.generateFunction(n,"s"))}),n.length&&t.push("fn.inputs=["+n.join(",")+"];"),t.join("")},generateFunction:function(t,n){return"function("+n+"){"+this.varsPrefix(t)+this.body(t)+"};"},filterPrefix:function(){var t=[],n=this;return o(this.state.filters,function(e,r){t.push(e+"=$filter("+n.escape(r)+")")}),t.length?"var "+t.join(",")+";":""},varsPrefix:function(t){return this.state[t].vars.length?"var "+this.state[t].vars.join(",")+";":""},body:function(t){return this.state[t].body.join("")},recurse:function(t,n,r,i,a,u){var s,l,c,f,h=this;if(i=i||v,!u&&x(t.watchId))return n=n||this.nextId(),void this.if_("i",this.lazyAssign(n,this.computedMember("i",t.watchId)),this.lazyRecurse(t,n,r,i,a,!0));switch(t.type){case to.Program:o(t.body,function(n,r){h.recurse(n.expression,e,e,function(t){l=t}),r!==t.body.length-1?h.current().body.push(l,";"):h.return_(l)});break;case to.Literal:f=this.escape(t.value),this.assign(n,f),i(f);break;case to.UnaryExpression:this.recurse(t.argument,e,e,function(t){l=t}),f=t.operator+"("+this.ifDefined(l,0)+")",this.assign(n,f),i(f);break;case to.BinaryExpression:this.recurse(t.left,e,e,function(t){s=t}),this.recurse(t.right,e,e,function(t){l=t}),f="+"===t.operator?this.plus(s,l):"-"===t.operator?this.ifDefined(s,0)+t.operator+this.ifDefined(l,0):"("+s+")"+t.operator+"("+l+")",this.assign(n,f),i(f);break;case to.LogicalExpression:n=n||this.nextId(),h.recurse(t.left,n),h.if_("&&"===t.operator?n:h.not(n),h.lazyRecurse(t.right,n)),i(n);break;case to.ConditionalExpression:n=n||this.nextId(),h.recurse(t.test,n),h.if_(n,h.lazyRecurse(t.alternate,n),h.lazyRecurse(t.consequent,n)),i(n);break;case to.Identifier:n=n||this.nextId(),r&&(r.context="inputs"===h.stage?"s":this.assign(this.nextId(),this.getHasOwnProperty("l",t.name)+"?l:s"),r.computed=!1,r.name=t.name),Yn(t.name),h.if_("inputs"===h.stage||h.not(h.getHasOwnProperty("l",t.name)),function(){h.if_("inputs"===h.stage||"s",function(){a&&1!==a&&h.if_(h.not(h.nonComputedMember("s",t.name)),h.lazyAssign(h.nonComputedMember("s",t.name),"{}")),h.assign(n,h.nonComputedMember("s",t.name))})},n&&h.lazyAssign(n,h.nonComputedMember("l",t.name))),(h.state.expensiveChecks||le(t.name))&&h.addEnsureSafeObject(n),i(n);break;case to.MemberExpression:s=r&&(r.context=this.nextId())||this.nextId(),n=n||this.nextId(),h.recurse(t.object,s,e,function(){h.if_(h.notNull(s),function(){t.computed?(l=h.nextId(),h.recurse(t.property,l),h.getStringValue(l),h.addEnsureSafeMemberName(l),a&&1!==a&&h.if_(h.not(h.computedMember(s,l)),h.lazyAssign(h.computedMember(s,l),"{}")),f=h.ensureSafeObject(h.computedMember(s,l)),h.assign(n,f),r&&(r.computed=!0,r.name=l)):(Yn(t.property.name),a&&1!==a&&h.if_(h.not(h.nonComputedMember(s,t.property.name)),h.lazyAssign(h.nonComputedMember(s,t.property.name),"{}")),f=h.nonComputedMember(s,t.property.name),(h.state.expensiveChecks||le(t.property.name))&&(f=h.ensureSafeObject(f)),h.assign(n,f),r&&(r.computed=!1,r.name=t.property.name))},function(){h.assign(n,"undefined")}),i(n)},!!a);break;case to.CallExpression:n=n||this.nextId(),t.filter?(l=h.filter(t.callee.name),c=[],o(t.arguments,function(t){var n=h.nextId();h.recurse(t,n),c.push(n)}),f=l+"("+c.join(",")+")",h.assign(n,f),i(n)):(l=h.nextId(),s={},c=[],h.recurse(t.callee,l,s,function(){h.if_(h.notNull(l),function(){h.addEnsureSafeFunction(l),o(t.arguments,function(t){h.recurse(t,h.nextId(),e,function(t){c.push(h.ensureSafeObject(t))})}),s.name?(h.state.expensiveChecks||h.addEnsureSafeObject(s.context),f=h.member(s.context,s.name,s.computed)+"("+c.join(",")+")"):f=l+"("+c.join(",")+")",f=h.ensureSafeObject(f),h.assign(n,f)},function(){h.assign(n,"undefined")}),i(n)}));break;case to.AssignmentExpression:if(l=this.nextId(),s={},!re(t.left))throw Yi("lval","Trying to assing a value to a non l-value");this.recurse(t.left,e,s,function(){h.if_(h.notNull(s.context),function(){h.recurse(t.right,l),h.addEnsureSafeObject(h.member(s.context,s.name,s.computed)),h.addEnsureSafeAssignContext(s.context),f=h.member(s.context,s.name,s.computed)+t.operator+l,h.assign(n,f),i(n||f)})},1);break;case to.ArrayExpression:c=[],o(t.elements,function(t){h.recurse(t,h.nextId(),e,function(t){c.push(t)})}),f="["+c.join(",")+"]",this.assign(n,f),i(f);break;case to.ObjectExpression:c=[],o(t.properties,function(t){h.recurse(t.value,h.nextId(),e,function(n){c.push(h.escape(t.key.type===to.Identifier?t.key.name:""+t.key.value)+":"+n)})}),f="{"+c.join(",")+"}",this.assign(n,f),i(f);break;case to.ThisExpression:this.assign(n,"s"),i("s");break;case to.NGValueParameter:this.assign(n,"v"),i("v")}},getHasOwnProperty:function(t,n){var e=t+"."+n,r=this.current().own;return r.hasOwnProperty(e)||(r[e]=this.nextId(!1,t+"&&("+this.escape(n)+" in "+t+")")),r[e]},assign:function(t,n){return t?(this.current().body.push(t,"=",n,";"),t):void 0},filter:function(t){return this.state.filters.hasOwnProperty(t)||(this.state.filters[t]=this.nextId(!0)),this.state.filters[t]},ifDefined:function(t,n){return"ifDefined("+t+","+this.escape(n)+")"},plus:function(t,n){return"plus("+t+","+n+")"},return_:function(t){this.current().body.push("return ",t,";")},if_:function(t,n,e){if(t===!0)n();else{var r=this.current().body;r.push("if(",t,"){"),n(),r.push("}"),e&&(r.push("else{"),e(),r.push("}"))}},not:function(t){return"!("+t+")"},notNull:function(t){return t+"!=null"},nonComputedMember:function(t,n){return t+"."+n},computedMember:function(t,n){return t+"["+n+"]"},member:function(t,n,e){return e?this.computedMember(t,n):this.nonComputedMember(t,n)},addEnsureSafeObject:function(t){this.current().body.push(this.ensureSafeObject(t),";")},addEnsureSafeMemberName:function(t){this.current().body.push(this.ensureSafeMemberName(t),";")},addEnsureSafeFunction:function(t){this.current().body.push(this.ensureSafeFunction(t),";")},addEnsureSafeAssignContext:function(t){this.current().body.push(this.ensureSafeAssignContext(t),";")},ensureSafeObject:function(t){return"ensureSafeObject("+t+",text)"},ensureSafeMemberName:function(t){return"ensureSafeMemberName("+t+",text)"},ensureSafeFunction:function(t){return"ensureSafeFunction("+t+",text)"},getStringValue:function(t){this.assign(t,"getStringValue("+t+",text)")},ensureSafeAssignContext:function(t){return"ensureSafeAssignContext("+t+",text)"},lazyRecurse:function(t,n,e,r,i,o){var a=this;return function(){a.recurse(t,n,e,r,i,o)}},lazyAssign:function(t,n){var e=this;return function(){e.assign(t,n)}},stringEscapeRegex:/[^ a-zA-Z0-9]/g,stringEscapeFn:function(t){return"\\u"+("0000"+t.charCodeAt(0).toString(16)).slice(-4)},escape:function(t){if(_(t))return"'"+t.replace(this.stringEscapeRegex,this.stringEscapeFn)+"'";if(C(t))return t.toString();if(t===!0)return"true";if(t===!1)return"false";if(null===t)return"null";if("undefined"==typeof t)return"undefined";throw Yi("esc","IMPOSSIBLE")},nextId:function(t,n){var e="v"+this.state.nextId++;return t||this.current().vars.push(e+(n?"="+n:"")),e},current:function(){return this.state[this.state.computing]}},se.prototype={compile:function(t,n){var e=this,r=this.astBuilder.ast(t);this.expression=t,this.expensiveChecks=n,ne(r,e.$filter);var i,a;(i=ie(r))&&(a=this.recurse(i));var u,s=ee(r.body);s&&(u=[],o(s,function(t,n){var r=e.recurse(t);t.input=r,u.push(r),t.watchId=n}));var l=[];o(r.body,function(t){l.push(e.recurse(t.expression))});var c=0===r.body.length?function(){}:1===r.body.length?l[0]:function(t,n){var e;return o(l,function(r){e=r(t,n)}),e};return a&&(c.assign=function(t,n,e){return a(t,e,n)}),u&&(c.inputs=u),c.literal=oe(r),c.constant=ae(r),c},recurse:function(t,n,r){var i,a,u,s=this;if(t.input)return this.inputs(t.input,t.watchId);switch(t.type){case to.Literal:return this.value(t.value,n);case to.UnaryExpression:return a=this.recurse(t.argument),this["unary"+t.operator](a,n);case to.BinaryExpression:return i=this.recurse(t.left),a=this.recurse(t.right),this["binary"+t.operator](i,a,n);case to.LogicalExpression:return i=this.recurse(t.left),a=this.recurse(t.right),this["binary"+t.operator](i,a,n);case to.ConditionalExpression:return this["ternary?:"](this.recurse(t.test),this.recurse(t.alternate),this.recurse(t.consequent),n);case to.Identifier:return Yn(t.name,s.expression),s.identifier(t.name,s.expensiveChecks||le(t.name),n,r,s.expression);case to.MemberExpression:return i=this.recurse(t.object,!1,!!r),t.computed||(Yn(t.property.name,s.expression),a=t.property.name),t.computed&&(a=this.recurse(t.property)),t.computed?this.computedMember(i,a,n,r,s.expression):this.nonComputedMember(i,a,s.expensiveChecks,n,r,s.expression);case to.CallExpression:return u=[],o(t.arguments,function(t){u.push(s.recurse(t))}),t.filter&&(a=this.$filter(t.callee.name)),t.filter||(a=this.recurse(t.callee,!0)),t.filter?function(t,r,i,o){for(var s=[],l=0;l<u.length;++l)s.push(u[l](t,r,i,o));var c=a.apply(e,s,o);return n?{context:e,name:e,value:c}:c}:function(t,e,r,i){var o,l=a(t,e,r,i);if(null!=l.value){Xn(l.context,s.expression),Zn(l.value,s.expression);for(var c=[],f=0;f<u.length;++f)c.push(Xn(u[f](t,e,r,i),s.expression));o=Xn(l.value.apply(l.context,c),s.expression)}return n?{value:o}:o};case to.AssignmentExpression:return i=this.recurse(t.left,!0,1),a=this.recurse(t.right),function(t,e,r,o){var u=i(t,e,r,o),l=a(t,e,r,o);return Xn(u.value,s.expression),Jn(u.context),u.context[u.name]=l,n?{value:l}:l};case to.ArrayExpression:return u=[],o(t.elements,function(t){u.push(s.recurse(t))}),function(t,e,r,i){for(var o=[],a=0;a<u.length;++a)o.push(u[a](t,e,r,i));return n?{value:o}:o};case to.ObjectExpression:return u=[],o(t.properties,function(t){u.push({key:t.key.type===to.Identifier?t.key.name:""+t.key.value,value:s.recurse(t.value)})}),function(t,e,r,i){for(var o={},a=0;a<u.length;++a)o[u[a].key]=u[a].value(t,e,r,i);return n?{value:o}:o};case to.ThisExpression:return function(t){return n?{value:t}:t};case to.NGValueParameter:return function(t,e,r,i){return n?{value:r}:r}}},"unary+":function(t,n){return function(e,r,i,o){var a=t(e,r,i,o);return a=x(a)?+a:0,n?{value:a}:a}},"unary-":function(t,n){return function(e,r,i,o){var a=t(e,r,i,o);return a=x(a)?-a:0,n?{value:a}:a}},"unary!":function(t,n){return function(e,r,i,o){var a=!t(e,r,i,o);return n?{value:a}:a}},"binary+":function(t,n,e){return function(r,i,o,a){var u=t(r,i,o,a),s=n(r,i,o,a),l=Qn(u,s);return e?{value:l}:l}},"binary-":function(t,n,e){return function(r,i,o,a){var u=t(r,i,o,a),s=n(r,i,o,a),l=(x(u)?u:0)-(x(s)?s:0);return e?{value:l}:l}},"binary*":function(t,n,e){return function(r,i,o,a){var u=t(r,i,o,a)*n(r,i,o,a);return e?{value:u}:u}},"binary/":function(t,n,e){return function(r,i,o,a){var u=t(r,i,o,a)/n(r,i,o,a);return e?{value:u}:u}},"binary%":function(t,n,e){return function(r,i,o,a){var u=t(r,i,o,a)%n(r,i,o,a);return e?{value:u}:u}},"binary===":function(t,n,e){return function(r,i,o,a){var u=t(r,i,o,a)===n(r,i,o,a);return e?{value:u}:u}},"binary!==":function(t,n,e){return function(r,i,o,a){var u=t(r,i,o,a)!==n(r,i,o,a);return e?{value:u}:u}},"binary==":function(t,n,e){return function(r,i,o,a){var u=t(r,i,o,a)==n(r,i,o,a);return e?{value:u}:u}},"binary!=":function(t,n,e){return function(r,i,o,a){var u=t(r,i,o,a)!=n(r,i,o,a);return e?{value:u}:u}},"binary<":function(t,n,e){return function(r,i,o,a){var u=t(r,i,o,a)<n(r,i,o,a);return e?{value:u}:u}},"binary>":function(t,n,e){return function(r,i,o,a){var u=t(r,i,o,a)>n(r,i,o,a);return e?{value:u}:u}},"binary<=":function(t,n,e){return function(r,i,o,a){var u=t(r,i,o,a)<=n(r,i,o,a);return e?{value:u}:u}},"binary>=":function(t,n,e){return function(r,i,o,a){var u=t(r,i,o,a)>=n(r,i,o,a);return e?{value:u}:u}},"binary&&":function(t,n,e){return function(r,i,o,a){var u=t(r,i,o,a)&&n(r,i,o,a);return e?{value:u}:u}},"binary||":function(t,n,e){return function(r,i,o,a){var u=t(r,i,o,a)||n(r,i,o,a);return e?{value:u}:u}},"ternary?:":function(t,n,e,r){return function(i,o,a,u){var s=t(i,o,a,u)?n(i,o,a,u):e(i,o,a,u);return r?{value:s}:s}},value:function(t,n){return function(){return n?{context:e,name:e,value:t}:t}},identifier:function(t,n,r,i,o){return function(a,u,s,l){var c=u&&t in u?u:a;i&&1!==i&&c&&!c[t]&&(c[t]={});var f=c?c[t]:e;return n&&Xn(f,o),r?{context:c,name:t,value:f}:f}},computedMember:function(t,n,e,r,i){return function(o,a,u,s){var l,c,f=t(o,a,u,s);return null!=f&&(l=n(o,a,u,s),l=Gn(l),Yn(l,i),r&&1!==r&&f&&!f[l]&&(f[l]={}),c=f[l],Xn(c,i)),e?{context:f,name:l,value:c}:c}},nonComputedMember:function(t,n,r,i,o,a){return function(u,s,l,c){var f=t(u,s,l,c);o&&1!==o&&f&&!f[n]&&(f[n]={});var h=null!=f?f[n]:e;return(r||le(n))&&Xn(h,a),i?{context:f,name:n,value:h}:h}},inputs:function(t,n){return function(e,r,i,o){return o?o[n]:t(e,r,i)}}};var no=function(t,n,e){this.lexer=t,this.$filter=n,this.options=e,this.ast=new to(this.lexer),this.astCompiler=e.csp?new se(this.ast,n):new ue(this.ast,n)};no.prototype={constructor:no,parse:function(t){return this.astCompiler.compile(t,this.options.expensiveChecks)}};var eo=(gt(),gt(),Object.prototype.valueOf),ro=r("$sce"),io={
-HTML:"html",CSS:"css",URL:"url",RESOURCE_URL:"resourceUrl",JS:"js"},Pi=r("$compile"),oo=n.createElement("a"),ao=Me(t.location.href);Ee.$inject=["$document"],Oe.$inject=["$provide"],Ne.$inject=["$locale"],Fe.$inject=["$locale"];var uo=".",so={yyyy:ze("FullYear",4),yy:ze("FullYear",2,0,!0),y:ze("FullYear",1),MMMM:qe("Month"),MMM:qe("Month",!0),MM:ze("Month",2,1),M:ze("Month",1,1),dd:ze("Date",2),d:ze("Date",1),HH:ze("Hours",2),H:ze("Hours",1),hh:ze("Hours",2,-12),h:ze("Hours",1,-12),mm:ze("Minutes",2),m:ze("Minutes",1),ss:ze("Seconds",2),s:ze("Seconds",1),sss:ze("Milliseconds",3),EEEE:qe("Day"),EEE:qe("Day",!0),a:He,Z:Ve,ww:Ue(2),w:Ue(1),G:Ye,GG:Ye,GGG:Ye,GGGG:Ge},lo=/((?:[^yMdHhmsaZEwG']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|d+|H+|h+|m+|s+|a|Z|G+|w+))(.*)/,co=/^\-?\d+$/;Xe.$inject=["$locale"];var fo=m(xr),ho=m(wr);Ke.$inject=["$parse"];var po=m({restrict:"E",compile:function(t,n){return n.href||n.xlinkHref?void 0:function(t,n){if("a"===n[0].nodeName.toLowerCase()){var e="[object SVGAnimatedString]"===Tr.call(n.prop("href"))?"xlink:href":"href";n.on("click",function(t){n.attr(e)||t.preventDefault()})}}}}),vo={};o(di,function(t,n){function e(t,e,i){t.$watch(i[r],function(t){i.$set(n,!!t)})}if("multiple"!=t){var r=cn("ng-"+n),i=e;"checked"===t&&(i=function(t,n,i){i.ngModel!==i[r]&&e(t,n,i)}),vo[r]=function(){return{restrict:"A",priority:100,link:i}}}}),o(gi,function(t,n){vo[n]=function(){return{priority:100,link:function(t,e,r){if("ngPattern"===n&&"/"==r.ngPattern.charAt(0)){var i=r.ngPattern.match(yr);if(i)return void r.$set("ngPattern",new RegExp(i[1],i[2]))}t.$watch(r[n],function(t){r.$set(n,t)})}}}}),o(["src","srcset","href"],function(t){var n=cn("ng-"+t);vo[n]=function(){return{priority:99,link:function(e,r,i){var o=t,a=t;"href"===t&&"[object SVGAnimatedString]"===Tr.call(r.prop("href"))&&(a="xlinkHref",i.$attr[a]="xlink:href",o=null),i.$observe(n,function(n){return n?(i.$set(a,n),void(Sr&&o&&r.prop(o,i[a]))):void("href"===t&&i.$set(a,null))})}}}});var go={$addControl:v,$$renameControl:tr,$removeControl:v,$setValidity:v,$setDirty:v,$setPristine:v,$setSubmitted:v},mo="ng-submitted";nr.$inject=["$element","$attrs","$scope","$animate","$interpolate"];var yo=function(t){return["$timeout","$parse",function(n,r){function i(t){return""===t?r('this[""]').assign:r(t).assign||v}var o={name:"form",restrict:t?"EAC":"E",require:["form","^^?form"],controller:nr,compile:function(r,o){r.addClass(Ko).addClass(Zo);var a=o.name?"name":t&&o.ngForm?"ngForm":!1;return{pre:function(t,r,o,u){var s=u[0];if(!("action"in o)){var l=function(n){t.$apply(function(){s.$commitViewValue(),s.$setSubmitted()}),n.preventDefault()};ei(r[0],"submit",l),r.on("$destroy",function(){n(function(){ri(r[0],"submit",l)},0,!1)})}var c=u[1]||s.$$parentForm;c.$addControl(s);var h=a?i(s.$name):v;a&&(h(t,s),o.$observe(a,function(n){s.$name!==n&&(h(t,e),s.$$parentForm.$$renameControl(s,n),(h=i(s.$name))(t,s))})),r.on("$destroy",function(){s.$$parentForm.$removeControl(s),h(t,e),f(s,go)})}}}};return o}]},$o=yo(),xo=yo(!0),bo=/\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z)/,wo=/^(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?$/,_o=/^[a-z0-9!#$%&'*+\/=?^_`{|}~.-]+@[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$/i,Co=/^\s*(\-|\+)?(\d+|(\d*(\.\d*)))([eE][+-]?\d+)?\s*$/,So=/^(\d{4})-(\d{2})-(\d{2})$/,Mo=/^(\d{4})-(\d\d)-(\d\d)T(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,ko=/^(\d{4})-W(\d\d)$/,Ao=/^(\d{4})-(\d\d)$/,Eo=/^(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,Po={text:rr,date:ur("date",So,ar(So,["yyyy","MM","dd"]),"yyyy-MM-dd"),"datetime-local":ur("datetimelocal",Mo,ar(Mo,["yyyy","MM","dd","HH","mm","ss","sss"]),"yyyy-MM-ddTHH:mm:ss.sss"),time:ur("time",Eo,ar(Eo,["HH","mm","ss","sss"]),"HH:mm:ss.sss"),week:ur("week",ko,or,"yyyy-Www"),month:ur("month",Ao,ar(Ao,["yyyy","MM"]),"yyyy-MM"),number:lr,url:cr,email:fr,radio:hr,checkbox:dr,hidden:v,button:v,submit:v,reset:v,file:v},Oo=["$browser","$sniffer","$filter","$parse",function(t,n,e,r){return{restrict:"E",require:["?ngModel"],link:{pre:function(i,o,a,u){u[0]&&(Po[xr(a.type)]||Po.text)(i,o,a,u[0],n,t,e,r)}}}}],To=/^(true|false|\d+)$/,jo=function(){return{restrict:"A",priority:100,compile:function(t,n){return To.test(n.ngValue)?function(t,n,e){e.$set("value",t.$eval(e.ngValue))}:function(t,n,e){t.$watch(e.ngValue,function(t){e.$set("value",t)})}}}},Lo=["$compile",function(t){return{restrict:"AC",compile:function(n){return t.$$addBindingClass(n),function(n,e,r){t.$$addBindingInfo(e,r.ngBind),e=e[0],n.$watch(r.ngBind,function(t){e.textContent=$(t)?"":t})}}}}],Ro=["$interpolate","$compile",function(t,n){return{compile:function(e){return n.$$addBindingClass(e),function(e,r,i){var o=t(r.attr(i.$attr.ngBindTemplate));n.$$addBindingInfo(r,o.expressions),r=r[0],i.$observe("ngBindTemplate",function(t){r.textContent=$(t)?"":t})}}}}],No=["$sce","$parse","$compile",function(t,n,e){return{restrict:"A",compile:function(r,i){var o=n(i.ngBindHtml),a=n(i.ngBindHtml,function(t){return(t||"").toString()});return e.$$addBindingClass(r),function(n,r,i){e.$$addBindingInfo(r,i.ngBindHtml),n.$watch(a,function(){r.html(t.getTrustedHtml(o(n))||"")})}}}}],Fo=m({restrict:"A",require:"ngModel",link:function(t,n,e,r){r.$viewChangeListeners.push(function(){t.$eval(e.ngChange)})}}),Do=vr("",!0),Io=vr("Odd",0),zo=vr("Even",1),qo=Qe({compile:function(t,n){n.$set("ngCloak",e),t.removeClass("ng-cloak")}}),Vo=[function(){return{restrict:"A",scope:!0,controller:"@",priority:500}}],Bo={},Wo={blur:!0,focus:!0};o("click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave keydown keyup keypress submit focus blur copy cut paste".split(" "),function(t){var n=cn("ng-"+t);Bo[n]=["$parse","$rootScope",function(e,r){return{restrict:"A",compile:function(i,o){var a=e(o[n],null,!0);return function(n,e){e.on(t,function(e){var i=function(){a(n,{$event:e})};Wo[t]&&r.$$phase?n.$evalAsync(i):n.$apply(i)})}}}}]});var Uo=["$animate",function(t){return{multiElement:!0,transclude:"element",priority:600,terminal:!0,restrict:"A",$$tlb:!0,link:function(e,r,i,o,a){var u,s,l;e.$watch(i.ngIf,function(e){e?s||a(function(e,o){s=o,e[e.length++]=n.createComment(" end ngIf: "+i.ngIf+" "),u={clone:e},t.enter(e,r.parent(),r)}):(l&&(l.remove(),l=null),s&&(s.$destroy(),s=null),u&&(l=vt(u.clone),t.leave(l).then(function(){l=null}),u=null))})}}}],Ho=["$templateRequest","$anchorScroll","$animate",function(t,n,e){return{restrict:"ECA",priority:400,terminal:!0,transclude:"element",controller:Rr.noop,compile:function(r,i){var o=i.ngInclude||i.src,a=i.onload||"",u=i.autoscroll;return function(r,i,s,l,c){var f,h,p,d=0,v=function(){h&&(h.remove(),h=null),f&&(f.$destroy(),f=null),p&&(e.leave(p).then(function(){h=null}),h=p,p=null)};r.$watch(o,function(o){var s=function(){!x(u)||u&&!r.$eval(u)||n()},h=++d;o?(t(o,!0).then(function(t){if(h===d){var n=r.$new();l.template=t;var u=c(n,function(t){v(),e.enter(t,null,i).then(s)});f=n,p=u,f.$emit("$includeContentLoaded",o),r.$eval(a)}},function(){h===d&&(v(),r.$emit("$includeContentError",o))}),r.$emit("$includeContentRequested",o)):(v(),l.template=null)})}}}}],Yo=["$compile",function(t){return{restrict:"ECA",priority:-400,require:"ngInclude",link:function(e,r,i,o){return/SVG/.test(r[0].toString())?(r.empty(),void t(Mt(o.template,n).childNodes)(e,function(t){r.append(t)},{futureParentElement:r})):(r.html(o.template),void t(r.contents())(e))}}}],Go=Qe({priority:450,compile:function(){return{pre:function(t,n,e){t.$eval(e.ngInit)}}}}),Xo=function(){return{restrict:"A",priority:100,require:"ngModel",link:function(t,n,r,i){var a=n.attr(r.$attr.ngList)||", ",u="false"!==r.ngTrim,s=u?zr(a):a,l=function(t){if(!$(t)){var n=[];return t&&o(t.split(s),function(t){t&&n.push(u?zr(t):t)}),n}};i.$parsers.push(l),i.$formatters.push(function(t){return Dr(t)?t.join(a):e}),i.$isEmpty=function(t){return!t||!t.length}}}},Zo="ng-valid",Jo="ng-invalid",Ko="ng-pristine",Qo="ng-dirty",ta="ng-untouched",na="ng-touched",ea="ng-pending",ra=r("ngModel"),ia=["$scope","$exceptionHandler","$attrs","$element","$parse","$animate","$timeout","$rootScope","$q","$interpolate",function(t,n,r,i,a,u,s,l,c,f){this.$viewValue=Number.NaN,this.$modelValue=Number.NaN,this.$$rawModelValue=e,this.$validators={},this.$asyncValidators={},this.$parsers=[],this.$formatters=[],this.$viewChangeListeners=[],this.$untouched=!0,this.$touched=!1,this.$pristine=!0,this.$dirty=!1,this.$valid=!0,this.$invalid=!1,this.$error={},this.$$success={},this.$pending=e,this.$name=f(r.name||"",!1)(t),this.$$parentForm=go;var h,p=a(r.ngModel),d=p.assign,g=p,m=d,y=null,b=this;this.$$setOptions=function(t){if(b.$options=t,t&&t.getterSetter){var n=a(r.ngModel+"()"),e=a(r.ngModel+"($$$p)");g=function(t){var e=p(t);return M(e)&&(e=n(t)),e},m=function(t,n){M(p(t))?e(t,{$$$p:b.$modelValue}):d(t,b.$modelValue)}}else if(!p.assign)throw ra("nonassign","Expression '{0}' is non-assignable. Element: {1}",r.ngModel,K(i))},this.$render=v,this.$isEmpty=function(t){return $(t)||""===t||null===t||t!==t};var w=0;gr({ctrl:this,$element:i,set:function(t,n){t[n]=!0},unset:function(t,n){delete t[n]},$animate:u}),this.$setPristine=function(){b.$dirty=!1,b.$pristine=!0,u.removeClass(i,Qo),u.addClass(i,Ko)},this.$setDirty=function(){b.$dirty=!0,b.$pristine=!1,u.removeClass(i,Ko),u.addClass(i,Qo),b.$$parentForm.$setDirty()},this.$setUntouched=function(){b.$touched=!1,b.$untouched=!0,u.setClass(i,ta,na)},this.$setTouched=function(){b.$touched=!0,b.$untouched=!1,u.setClass(i,na,ta)},this.$rollbackViewValue=function(){s.cancel(y),b.$viewValue=b.$$lastCommittedViewValue,b.$render()},this.$validate=function(){if(!C(b.$modelValue)||!isNaN(b.$modelValue)){var t=b.$$lastCommittedViewValue,n=b.$$rawModelValue,r=b.$valid,i=b.$modelValue,o=b.$options&&b.$options.allowInvalid;b.$$runValidators(n,t,function(t){o||r===t||(b.$modelValue=t?n:e,b.$modelValue!==i&&b.$$writeModelToScope())})}},this.$$runValidators=function(t,n,r){function i(){var t=b.$$parserName||"parse";return $(h)?(s(t,null),!0):(h||(o(b.$validators,function(t,n){s(n,null)}),o(b.$asyncValidators,function(t,n){s(n,null)})),s(t,h),h)}function a(){var e=!0;return o(b.$validators,function(r,i){var o=r(t,n);e=e&&o,s(i,o)}),e?!0:(o(b.$asyncValidators,function(t,n){s(n,null)}),!1)}function u(){var r=[],i=!0;o(b.$asyncValidators,function(o,a){var u=o(t,n);if(!L(u))throw ra("$asyncValidators","Expected asynchronous validator to return a promise but got '{0}' instead.",u);s(a,e),r.push(u.then(function(){s(a,!0)},function(t){i=!1,s(a,!1)}))}),r.length?c.all(r).then(function(){l(i)},v):l(!0)}function s(t,n){f===w&&b.$setValidity(t,n)}function l(t){f===w&&r(t)}w++;var f=w;return i()&&a()?void u():void l(!1)},this.$commitViewValue=function(){var t=b.$viewValue;s.cancel(y),(b.$$lastCommittedViewValue!==t||""===t&&b.$$hasNativeValidators)&&(b.$$lastCommittedViewValue=t,b.$pristine&&this.$setDirty(),this.$$parseAndValidate())},this.$$parseAndValidate=function(){function n(){b.$modelValue!==a&&b.$$writeModelToScope()}var r=b.$$lastCommittedViewValue,i=r;if(h=$(i)?e:!0)for(var o=0;o<b.$parsers.length;o++)if(i=b.$parsers[o](i),$(i)){h=!1;break}C(b.$modelValue)&&isNaN(b.$modelValue)&&(b.$modelValue=g(t));var a=b.$modelValue,u=b.$options&&b.$options.allowInvalid;b.$$rawModelValue=i,u&&(b.$modelValue=i,n()),b.$$runValidators(i,b.$$lastCommittedViewValue,function(t){u||(b.$modelValue=t?i:e,n())})},this.$$writeModelToScope=function(){m(t,b.$modelValue),o(b.$viewChangeListeners,function(t){try{t()}catch(e){n(e)}})},this.$setViewValue=function(t,n){b.$viewValue=t,b.$options&&!b.$options.updateOnDefault||b.$$debounceViewValueCommit(n)},this.$$debounceViewValueCommit=function(n){var e,r=0,i=b.$options;i&&x(i.debounce)&&(e=i.debounce,C(e)?r=e:C(e[n])?r=e[n]:C(e["default"])&&(r=e["default"])),s.cancel(y),r?y=s(function(){b.$commitViewValue()},r):l.$$phase?b.$commitViewValue():t.$apply(function(){b.$commitViewValue()})},t.$watch(function(){var n=g(t);if(n!==b.$modelValue&&(b.$modelValue===b.$modelValue||n===n)){b.$modelValue=b.$$rawModelValue=n,h=e;for(var r=b.$formatters,i=r.length,o=n;i--;)o=r[i](o);b.$viewValue!==o&&(b.$viewValue=b.$$lastCommittedViewValue=o,b.$render(),b.$$runValidators(n,o,v))}return n})}],oa=["$rootScope",function(t){return{restrict:"A",require:["ngModel","^?form","^?ngModelOptions"],controller:ia,priority:1,compile:function(n){return n.addClass(Ko).addClass(ta).addClass(Zo),{pre:function(t,n,e,r){var i=r[0],o=r[1]||i.$$parentForm;i.$$setOptions(r[2]&&r[2].$options),o.$addControl(i),e.$observe("name",function(t){i.$name!==t&&i.$$parentForm.$$renameControl(i,t)}),t.$on("$destroy",function(){i.$$parentForm.$removeControl(i)})},post:function(n,e,r,i){var o=i[0];o.$options&&o.$options.updateOn&&e.on(o.$options.updateOn,function(t){o.$$debounceViewValueCommit(t&&t.type)}),e.on("blur",function(e){o.$touched||(t.$$phase?n.$evalAsync(o.$setTouched):n.$apply(o.$setTouched))})}}}}}],aa=/(\s+|^)default(\s+|$)/,ua=function(){return{restrict:"A",controller:["$scope","$attrs",function(t,n){var e=this;this.$options=z(t.$eval(n.ngModelOptions)),x(this.$options.updateOn)?(this.$options.updateOnDefault=!1,this.$options.updateOn=zr(this.$options.updateOn.replace(aa,function(){return e.$options.updateOnDefault=!0," "}))):this.$options.updateOnDefault=!0}]}},sa=Qe({terminal:!0,priority:1e3}),la=r("ngOptions"),ca=/^\s*([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+group\s+by\s+([\s\S]+?))?(?:\s+disable\s+when\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]+?))?$/,fa=["$compile","$parse",function(t,e){function r(t,n,r){function o(t,n,e,r,i){this.selectValue=t,this.viewValue=n,this.label=e,this.group=r,this.disabled=i}function a(t){var n;if(!l&&i(t))n=t;else{n=[];for(var e in t)t.hasOwnProperty(e)&&"$"!==e.charAt(0)&&n.push(e)}return n}var u=t.match(ca);if(!u)throw la("iexp","Expected expression in form of '_select_ (as _label_)? for (_key_,)?_value_ in _collection_' but got '{0}'. Element: {1}",t,K(n));var s=u[5]||u[7],l=u[6],c=/ as /.test(u[0])&&u[1],f=u[9],h=e(u[2]?u[1]:s),p=c&&e(c),d=p||h,v=f&&e(f),g=f?function(t,n){return v(r,n)}:function(t){return Gt(t)},m=function(t,n){return g(t,_(t,n))},y=e(u[2]||u[1]),$=e(u[3]||""),x=e(u[4]||""),b=e(u[8]),w={},_=l?function(t,n){return w[l]=n,w[s]=t,w}:function(t){return w[s]=t,w};return{trackBy:f,getTrackByValue:m,getWatchables:e(b,function(t){var n=[];t=t||[];for(var e=a(t),i=e.length,o=0;i>o;o++){var s=t===e?o:e[o],l=(t[s],_(t[s],s)),c=g(t[s],l);if(n.push(c),u[2]||u[1]){var f=y(r,l);n.push(f)}if(u[4]){var h=x(r,l);n.push(h)}}return n}),getOptions:function(){for(var t=[],n={},e=b(r)||[],i=a(e),u=i.length,s=0;u>s;s++){var l=e===i?s:i[s],c=e[l],h=_(c,l),p=d(r,h),v=g(p,h),w=y(r,h),C=$(r,h),S=x(r,h),M=new o(v,p,w,C,S);t.push(M),n[v]=M}return{items:t,selectValueMap:n,getOptionFromViewValue:function(t){return n[m(t)]},getViewValueFromOption:function(t){return f?Rr.copy(t.viewValue):t.viewValue}}}}}var a=n.createElement("option"),u=n.createElement("optgroup");return{restrict:"A",terminal:!0,require:["select","?ngModel"],link:function(n,e,i,s){function l(t,n){t.element=n,n.disabled=t.disabled,t.label!==n.label&&(n.label=t.label,n.textContent=t.label),t.value!==n.value&&(n.value=t.selectValue)}function c(t,n,e,r){var i;return n&&xr(n.nodeName)===e?i=n:(i=r.cloneNode(!1),n?t.insertBefore(i,n):t.appendChild(i)),i}function f(t){for(var n;t;)n=t.nextSibling,Vt(t),t=n}function h(t){var n=v&&v[0],e=w&&w[0];if(n||e)for(;t&&(t===n||t===e||n&&n.nodeType===Zr);)t=t.nextSibling;return t}function p(){var t=_&&g.readValue();_=C.getOptions();var n={},r=e[0].firstChild;if(b&&e.prepend(v),r=h(r),_.items.forEach(function(t){var i,o,s;t.group?(i=n[t.group],i||(o=c(e[0],r,"optgroup",u),r=o.nextSibling,o.label=t.group,i=n[t.group]={groupElement:o,currentOptionElement:o.firstChild}),s=c(i.groupElement,i.currentOptionElement,"option",a),l(t,s),i.currentOptionElement=s.nextSibling):(s=c(e[0],r,"option",a),l(t,s),r=s.nextSibling)}),Object.keys(n).forEach(function(t){f(n[t].currentOptionElement)}),f(r),d.$render(),!d.$isEmpty(t)){var i=g.readValue();(C.trackBy?V(t,i):t===i)||(d.$setViewValue(i),d.$render())}}var d=s[1];if(d){for(var v,g=s[0],m=i.multiple,y=0,$=e.children(),x=$.length;x>y;y++)if(""===$[y].value){v=$.eq(y);break}var b=!!v,w=Mr(a.cloneNode(!1));w.val("?");var _,C=r(i.ngOptions,e,n),S=function(){b||e.prepend(v),e.val(""),v.prop("selected",!0),v.attr("selected",!0)},M=function(){b||v.remove()},k=function(){e.prepend(w),e.val("?"),w.prop("selected",!0),w.attr("selected",!0)},A=function(){w.remove()};m?(d.$isEmpty=function(t){return!t||0===t.length},g.writeValue=function(t){_.items.forEach(function(t){t.element.selected=!1}),t&&t.forEach(function(t){var n=_.getOptionFromViewValue(t);n&&!n.disabled&&(n.element.selected=!0)})},g.readValue=function(){var t=e.val()||[],n=[];return o(t,function(t){var e=_.selectValueMap[t];e&&!e.disabled&&n.push(_.getViewValueFromOption(e))}),n},C.trackBy&&n.$watchCollection(function(){return Dr(d.$viewValue)?d.$viewValue.map(function(t){return C.getTrackByValue(t)}):void 0},function(){d.$render()})):(g.writeValue=function(t){var n=_.getOptionFromViewValue(t);n&&!n.disabled?e[0].value!==n.selectValue&&(A(),M(),e[0].value=n.selectValue,n.element.selected=!0,n.element.setAttribute("selected","selected")):null===t||b?(A(),S()):(M(),k())},g.readValue=function(){var t=_.selectValueMap[e.val()];return t&&!t.disabled?(M(),A(),_.getViewValueFromOption(t)):null},C.trackBy&&n.$watch(function(){return C.getTrackByValue(d.$viewValue)},function(){d.$render()})),b?(v.remove(),t(v)(n),v.removeClass("ng-scope")):v=Mr(a.cloneNode(!1)),p(),n.$watchCollection(C.getWatchables,p)}}}}],ha=["$locale","$interpolate","$log",function(t,n,e){var r=/{}/g,i=/^when(Minus)?(.+)$/;return{link:function(a,u,s){function l(t){u.text(t||"")}var c,f=s.count,h=s.$attr.when&&u.attr(s.$attr.when),p=s.offset||0,d=a.$eval(h)||{},g={},m=n.startSymbol(),y=n.endSymbol(),x=m+f+"-"+p+y,b=Rr.noop;o(s,function(t,n){var e=i.exec(n);if(e){var r=(e[1]?"-":"")+xr(e[2]);d[r]=u.attr(s.$attr[n])}}),o(d,function(t,e){g[e]=n(t.replace(r,x))}),a.$watch(f,function(n){var r=parseFloat(n),i=isNaN(r);if(i||r in d||(r=t.pluralCat(r-p)),r!==c&&!(i&&C(c)&&isNaN(c))){b();var o=g[r];$(o)?(null!=n&&e.debug("ngPluralize: no rule defined for '"+r+"' in "+h),b=v,l()):b=a.$watch(o,l),c=r}})}}}],pa=["$parse","$animate",function(t,a){var u="$$NG_REMOVED",s=r("ngRepeat"),l=function(t,n,e,r,i,o,a){t[e]=r,i&&(t[i]=o),t.$index=n,t.$first=0===n,t.$last=n===a-1,t.$middle=!(t.$first||t.$last),t.$odd=!(t.$even=0===(1&n))},c=function(t){return t.clone[0]},f=function(t){return t.clone[t.clone.length-1]};return{restrict:"A",multiElement:!0,transclude:"element",priority:1e3,terminal:!0,$$tlb:!0,compile:function(r,h){var p=h.ngRepeat,d=n.createComment(" end ngRepeat: "+p+" "),v=p.match(/^\s*([\s\S]+?)\s+in\s+([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+track\s+by\s+([\s\S]+?))?\s*$/);if(!v)throw s("iexp","Expected expression in form of '_item_ in _collection_[ track by _id_]' but got '{0}'.",p);var g=v[1],m=v[2],y=v[3],$=v[4];if(v=g.match(/^(?:(\s*[\$\w]+)|\(\s*([\$\w]+)\s*,\s*([\$\w]+)\s*\))$/),!v)throw s("iidexp","'_item_' in '_item_ in _collection_' should be an identifier or '(_key_, _value_)' expression, but got '{0}'.",g);var x=v[3]||v[1],b=v[2];if(y&&(!/^[$a-zA-Z_][$a-zA-Z0-9_]*$/.test(y)||/^(null|undefined|this|\$index|\$first|\$middle|\$last|\$even|\$odd|\$parent|\$root|\$id)$/.test(y)))throw s("badident","alias '{0}' is invalid --- must be a valid JS identifier which is not a reserved name.",y);var w,_,C,S,M={$id:Gt};return $?w=t($):(C=function(t,n){return Gt(n)},S=function(t){return t}),function(t,n,r,h,v){w&&(_=function(n,e,r){return b&&(M[b]=n),M[x]=e,M.$index=r,w(t,M)});var g=gt();t.$watchCollection(m,function(r){var h,m,$,w,M,k,A,E,P,O,T,j,L=n[0],R=gt();if(y&&(t[y]=r),i(r))P=r,E=_||C;else{E=_||S,P=[];for(var N in r)br.call(r,N)&&"$"!==N.charAt(0)&&P.push(N)}for(w=P.length,T=new Array(w),h=0;w>h;h++)if(M=r===P?h:P[h],k=r[M],A=E(M,k,h),g[A])O=g[A],delete g[A],R[A]=O,T[h]=O;else{if(R[A])throw o(T,function(t){t&&t.scope&&(g[t.id]=t)}),s("dupes","Duplicates in a repeater are not allowed. Use 'track by' expression to specify unique keys. Repeater: {0}, Duplicate key: {1}, Duplicate value: {2}",p,A,k);T[h]={id:A,scope:e,clone:e},R[A]=!0}for(var F in g){if(O=g[F],j=vt(O.clone),a.leave(j),j[0].parentNode)for(h=0,m=j.length;m>h;h++)j[h][u]=!0;O.scope.$destroy()}for(h=0;w>h;h++)if(M=r===P?h:P[h],k=r[M],O=T[h],O.scope){$=L;do $=$.nextSibling;while($&&$[u]);c(O)!=$&&a.move(vt(O.clone),null,Mr(L)),L=f(O),l(O.scope,h,x,k,b,M,w)}else v(function(t,n){O.scope=n;var e=d.cloneNode(!1);t[t.length++]=e,a.enter(t,null,Mr(L)),L=e,O.clone=t,R[O.id]=O,l(O.scope,h,x,k,b,M,w)});g=R})}}}}],da="ng-hide",va="ng-hide-animate",ga=["$animate",function(t){return{restrict:"A",multiElement:!0,link:function(n,e,r){n.$watch(r.ngShow,function(n){t[n?"removeClass":"addClass"](e,da,{tempClasses:va})})}}}],ma=["$animate",function(t){return{restrict:"A",multiElement:!0,link:function(n,e,r){n.$watch(r.ngHide,function(n){t[n?"addClass":"removeClass"](e,da,{tempClasses:va})})}}}],ya=Qe(function(t,n,e){t.$watch(e.ngStyle,function(t,e){e&&t!==e&&o(e,function(t,e){n.css(e,"")}),t&&n.css(t)},!0)}),$a=["$animate",function(t){return{require:"ngSwitch",controller:["$scope",function(){this.cases={}}],link:function(e,r,i,a){var u=i.ngSwitch||i.on,s=[],l=[],c=[],f=[],h=function(t,n){return function(){t.splice(n,1)}};e.$watch(u,function(e){var r,i;for(r=0,i=c.length;i>r;++r)t.cancel(c[r]);for(c.length=0,r=0,i=f.length;i>r;++r){var u=vt(l[r].clone);f[r].$destroy();var p=c[r]=t.leave(u);p.then(h(c,r))}l.length=0,f.length=0,(s=a.cases["!"+e]||a.cases["?"])&&o(s,function(e){e.transclude(function(r,i){f.push(i);var o=e.element;r[r.length++]=n.createComment(" end ngSwitchWhen: ");var a={clone:r};l.push(a),t.enter(r,o.parent(),o)})})})}}}],xa=Qe({transclude:"element",priority:1200,require:"^ngSwitch",multiElement:!0,link:function(t,n,e,r,i){r.cases["!"+e.ngSwitchWhen]=r.cases["!"+e.ngSwitchWhen]||[],r.cases["!"+e.ngSwitchWhen].push({transclude:i,element:n})}}),ba=Qe({transclude:"element",priority:1200,require:"^ngSwitch",multiElement:!0,link:function(t,n,e,r,i){r.cases["?"]=r.cases["?"]||[],r.cases["?"].push({transclude:i,element:n})}}),wa=Qe({restrict:"EAC",link:function(t,n,e,i,o){if(!o)throw r("ngTransclude")("orphan","Illegal use of ngTransclude directive in the template! No parent directive that requires a transclusion found. Element: {0}",K(n));o(function(t){n.empty(),n.append(t)})}}),_a=["$templateCache",function(t){return{restrict:"E",terminal:!0,compile:function(n,e){if("text/ng-template"==e.type){var r=e.id,i=n[0].text;t.put(r,i)}}}}],Ca={$setViewValue:v,$render:v},Sa=["$element","$scope","$attrs",function(t,r,i){var o=this,a=new Xt;o.ngModelCtrl=Ca,o.unknownOption=Mr(n.createElement("option")),o.renderUnknownOption=function(n){var e="? "+Gt(n)+" ?";o.unknownOption.val(e),t.prepend(o.unknownOption),t.val(e)},r.$on("$destroy",function(){o.renderUnknownOption=v}),o.removeUnknownOption=function(){o.unknownOption.parent()&&o.unknownOption.remove()},o.readValue=function(){return o.removeUnknownOption(),t.val()},o.writeValue=function(n){o.hasOption(n)?(o.removeUnknownOption(),t.val(n),""===n&&o.emptyOption.prop("selected",!0)):null==n&&o.emptyOption?(o.removeUnknownOption(),t.val("")):o.renderUnknownOption(n)},o.addOption=function(t,n){pt(t,'"option value"'),""===t&&(o.emptyOption=n);var e=a.get(t)||0;a.put(t,e+1)},o.removeOption=function(t){var n=a.get(t);n&&(1===n?(a.remove(t),""===t&&(o.emptyOption=e)):a.put(t,n-1))},o.hasOption=function(t){return!!a.get(t)}}],Ma=function(){return{restrict:"E",require:["select","?ngModel"],controller:Sa,link:function(t,n,e,r){var i=r[1];if(i){var a=r[0];if(a.ngModelCtrl=i,i.$render=function(){a.writeValue(i.$viewValue)},n.on("change",function(){t.$apply(function(){i.$setViewValue(a.readValue())})}),e.multiple){a.readValue=function(){var t=[];return o(n.find("option"),function(n){n.selected&&t.push(n.value)}),t},a.writeValue=function(t){var e=new Xt(t);o(n.find("option"),function(t){t.selected=x(e.get(t.value))})};var u,s=NaN;t.$watch(function(){s!==i.$viewValue||V(u,i.$viewValue)||(u=q(i.$viewValue),i.$render()),s=i.$viewValue}),i.$isEmpty=function(t){return!t||0===t.length}}}}}},ka=["$interpolate",function(t){function n(t){t[0].hasAttribute("selected")&&(t[0].selected=!0)}return{restrict:"E",priority:100,compile:function(e,r){if(x(r.value))var i=t(r.value,!0);else{var o=t(e.text(),!0);o||r.$set("value",e.text())}return function(t,e,r){function a(t){l.addOption(t,e),l.ngModelCtrl.$render(),n(e)}var u="$selectController",s=e.parent(),l=s.data(u)||s.parent().data(u);if(l&&l.ngModelCtrl){if(i){var c;r.$observe("value",function(t){x(c)&&l.removeOption(c),c=t,a(t)})}else o?t.$watch(o,function(t,n){r.$set("value",t),n!==t&&l.removeOption(n),a(t)}):a(r.value);e.on("$destroy",function(){l.removeOption(r.value),l.ngModelCtrl.$render()})}}}}}],Aa=m({restrict:"E",terminal:!1}),Ea=function(){return{restrict:"A",require:"?ngModel",link:function(t,n,e,r){r&&(e.required=!0,r.$validators.required=function(t,n){return!e.required||!r.$isEmpty(n)},e.$observe("required",function(){r.$validate()}))}}},Pa=function(){return{restrict:"A",require:"?ngModel",link:function(t,n,i,o){if(o){var a,u=i.ngPattern||i.pattern;i.$observe("pattern",function(t){if(_(t)&&t.length>0&&(t=new RegExp("^"+t+"$")),t&&!t.test)throw r("ngPattern")("noregexp","Expected {0} to be a RegExp but was {1}. Element: {2}",u,t,K(n));a=t||e,o.$validate()}),o.$validators.pattern=function(t,n){return o.$isEmpty(n)||$(a)||a.test(n)}}}}},Oa=function(){return{restrict:"A",require:"?ngModel",link:function(t,n,e,r){if(r){var i=-1;e.$observe("maxlength",function(t){var n=p(t);i=isNaN(n)?-1:n,r.$validate()}),r.$validators.maxlength=function(t,n){return 0>i||r.$isEmpty(n)||n.length<=i}}}}},Ta=function(){return{restrict:"A",require:"?ngModel",link:function(t,n,e,r){if(r){var i=0;e.$observe("minlength",function(t){i=p(t)||0,r.$validate()}),r.$validators.minlength=function(t,n){return r.$isEmpty(n)||n.length>=i}}}}};return t.angular.bootstrap?void console.log("WARNING: Tried to load angular more than once."):(ct(),xt(Rr),Rr.module("ngLocale",[],["$provide",function(t){function n(t){t+="";var n=t.indexOf(".");return-1==n?0:t.length-n-1}function r(t,r){var i=r;e===i&&(i=Math.min(n(t),3));var o=Math.pow(10,i),a=(t*o|0)%o;return{v:i,f:a}}var i={ZERO:"zero",ONE:"one",TWO:"two",FEW:"few",MANY:"many",OTHER:"other"};t.value("$locale",{DATETIME_FORMATS:{AMPMS:["AM","PM"],DAY:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],ERANAMES:["Before Christ","Anno Domini"],ERAS:["BC","AD"],FIRSTDAYOFWEEK:6,MONTH:["January","February","March","April","May","June","July","August","September","October","November","December"],SHORTDAY:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],SHORTMONTH:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],WEEKENDRANGE:[5,6],fullDate:"EEEE, MMMM d, y",longDate:"MMMM d, y",medium:"MMM d, y h:mm:ss a",mediumDate:"MMM d, y",mediumTime:"h:mm:ss a","short":"M/d/yy h:mm a",shortDate:"M/d/yy",shortTime:"h:mm a"},NUMBER_FORMATS:{CURRENCY_SYM:"$",DECIMAL_SEP:".",GROUP_SEP:",",PATTERNS:[{gSize:3,lgSize:3,maxFrac:3,minFrac:0,minInt:1,negPre:"-",negSuf:"",posPre:"",posSuf:""},{gSize:3,lgSize:3,maxFrac:2,minFrac:2,minInt:1,negPre:"-¤",negSuf:"",posPre:"¤",posSuf:""}]},id:"en-us",pluralCat:function(t,n){var e=0|t,o=r(t,n);return 1==e&&0==o.v?i.ONE:i.OTHER}})}]),void Mr(n).ready(function(){ot(n,at)}))}(window,document),!window.angular.$$csp().noInlineStyle&&window.angular.element(document.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:not(.ng-hide-animate){display:none !important;}ng\\:form{display:block;}.ng-animate-shim{visibility:hidden;}.ng-anchor{position:absolute;}</style>'),"undefined"!=typeof module&&"undefined"!=typeof exports&&module.exports===exports&&(module.exports="ui.router"),function(t,n,e){"use strict";function r(t,n){return I(new(I(function(){},{prototype:t})),n)}function i(t){return D(arguments,function(n){n!==t&&D(n,function(n,e){t.hasOwnProperty(e)||(t[e]=n)})}),t}function o(t,n){var e=[];for(var r in t.path){if(t.path[r]!==n.path[r])break;e.push(t.path[r])}return e}function a(t){if(Object.keys)return Object.keys(t);var n=[];return D(t,function(t,e){n.push(e)}),n}function u(t,n){if(Array.prototype.indexOf)return t.indexOf(n,Number(arguments[2])||0);var e=t.length>>>0,r=Number(arguments[2])||0;for(r=0>r?Math.ceil(r):Math.floor(r),0>r&&(r+=e);e>r;r++)if(r in t&&t[r]===n)return r;return-1}function s(t,n,e,r){var i,s=o(e,r),l={},c=[];for(var f in s)if(s[f].params&&(i=a(s[f].params),i.length))for(var h in i)u(c,i[h])>=0||(c.push(i[h]),l[i[h]]=t[i[h]]);return I({},l,n)}function l(t,n,e){if(!e){e=[];for(var r in t)e.push(r)}for(var i=0;i<e.length;i++){var o=e[i];if(t[o]!=n[o])return!1}return!0}function c(t,n){var e={};return D(t,function(t){e[t]=n[t]}),e}function f(t){var n={},e=Array.prototype.concat.apply(Array.prototype,Array.prototype.slice.call(arguments,1));return D(e,function(e){e in t&&(n[e]=t[e])}),n}function h(t){var n={},e=Array.prototype.concat.apply(Array.prototype,Array.prototype.slice.call(arguments,1));for(var r in t)-1==u(e,r)&&(n[r]=t[r]);return n}function p(t,n){var e=F(t),r=e?[]:{};return D(t,function(t,i){n(t,i)&&(r[e?r.length:i]=t)}),r}function d(t,n){var e=F(t)?[]:{};return D(t,function(t,r){e[r]=n(t,r)}),e}function v(t,n){var r=1,o=2,s={},l=[],c=s,f=I(t.when(s),{$$promises:s,$$values:s});this.study=function(s){function p(t,e){if(y[e]!==o){if(m.push(e),y[e]===r)throw m.splice(0,u(m,e)),new Error("Cyclic dependency: "+m.join(" -> "));if(y[e]=r,R(t))g.push(e,[function(){return n.get(t)}],l);else{var i=n.annotate(t);D(i,function(t){t!==e&&s.hasOwnProperty(t)&&p(s[t],t)}),g.push(e,t,i)}m.pop(),y[e]=o}}function d(t){return N(t)&&t.then&&t.$$promises}if(!N(s))throw new Error("'invocables' must be an object");var v=a(s||{}),g=[],m=[],y={};return D(s,p),s=m=y=null,function(r,o,a){function u(){--x||(b||i($,o.$$values),m.$$values=$,m.$$promises=m.$$promises||!0,delete m.$$inheritedValues,p.resolve($))}function s(t){m.$$failure=t,p.reject(t)}function l(e,i,o){function l(t){f.reject(t),s(t)}function c(){if(!j(m.$$failure))try{f.resolve(n.invoke(i,a,$)),f.promise.then(function(t){$[e]=t,u()},l)}catch(t){l(t)}}var f=t.defer(),h=0;D(o,function(t){y.hasOwnProperty(t)&&!r.hasOwnProperty(t)&&(h++,y[t].then(function(n){$[t]=n,--h||c()},l))}),h||c(),y[e]=f.promise}if(d(r)&&a===e&&(a=o,o=r,r=null),r){if(!N(r))throw new Error("'locals' must be an object")}else r=c;if(o){if(!d(o))throw new Error("'parent' must be a promise returned by $resolve.resolve()")}else o=f;var p=t.defer(),m=p.promise,y=m.$$promises={},$=I({},r),x=1+g.length/3,b=!1;if(j(o.$$failure))return s(o.$$failure),m;o.$$inheritedValues&&i($,h(o.$$inheritedValues,v)),I(y,o.$$promises),o.$$values?(b=i($,h(o.$$values,v)),m.$$inheritedValues=h(o.$$values,v),u()):(o.$$inheritedValues&&(m.$$inheritedValues=h(o.$$inheritedValues,v)),o.then(u,s));for(var w=0,_=g.length;_>w;w+=3)r.hasOwnProperty(g[w])?u():l(g[w],g[w+1],g[w+2]);return m}},this.resolve=function(t,n,e,r){return this.study(t)(n,e,r)}}function g(t,n,e){this.fromConfig=function(t,n,e){return j(t.template)?this.fromString(t.template,n):j(t.templateUrl)?this.fromUrl(t.templateUrl,n):j(t.templateProvider)?this.fromProvider(t.templateProvider,n,e):null},this.fromString=function(t,n){return L(t)?t(n):t},this.fromUrl=function(e,r){return L(e)&&(e=e(r)),null==e?null:t.get(e,{cache:n,headers:{Accept:"text/html"}}).then(function(t){return t.data})},this.fromProvider=function(t,n,r){return e.invoke(t,null,r||{params:n})}}function m(t,n,i){function o(n,e,r,i){if(g.push(n),d[n])return d[n];if(!/^\w+(-+\w+)*(?:\[\])?$/.test(n))throw new Error("Invalid parameter name '"+n+"' in pattern '"+t+"'");if(v[n])throw new Error("Duplicate parameter name '"+n+"' in pattern '"+t+"'");
-return v[n]=new q.Param(n,e,r,i),v[n]}function a(t,n,e,r){var i=["",""],o=t.replace(/[\\\[\]\^$*+?.()|{}]/g,"\\$&");if(!n)return o;switch(e){case!1:i=["(",")"+(r?"?":"")];break;case!0:i=["?(",")?"];break;default:i=["("+e+"|",")?"]}return o+i[0]+n+i[1]}function u(i,o){var a,u,s,l,c;return a=i[2]||i[3],c=n.params[a],s=t.substring(h,i.index),u=o?i[4]:i[4]||("*"==i[1]?".*":null),l=q.type(u||"string")||r(q.type("string"),{pattern:new RegExp(u,n.caseInsensitive?"i":e)}),{id:a,regexp:u,segment:s,type:l,cfg:c}}n=I({params:{}},N(n)?n:{});var s,l=/([:*])([\w\[\]]+)|\{([\w\[\]]+)(?:\:((?:[^{}\\]+|\\.|\{(?:[^{}\\]+|\\.)*\})+))?\}/g,c=/([:]?)([\w\[\]-]+)|\{([\w\[\]-]+)(?:\:((?:[^{}\\]+|\\.|\{(?:[^{}\\]+|\\.)*\})+))?\}/g,f="^",h=0,p=this.segments=[],d=i?i.params:{},v=this.params=i?i.params.$$new():new q.ParamSet,g=[];this.source=t;for(var m,y,$;(s=l.exec(t))&&(m=u(s,!1),!(m.segment.indexOf("?")>=0));)y=o(m.id,m.type,m.cfg,"path"),f+=a(m.segment,y.type.pattern.source,y.squash,y.isOptional),p.push(m.segment),h=l.lastIndex;$=t.substring(h);var x=$.indexOf("?");if(x>=0){var b=this.sourceSearch=$.substring(x);if($=$.substring(0,x),this.sourcePath=t.substring(0,h+x),b.length>0)for(h=0;s=c.exec(b);)m=u(s,!0),y=o(m.id,m.type,m.cfg,"search"),h=l.lastIndex}else this.sourcePath=t,this.sourceSearch="";f+=a($)+(n.strict===!1?"/?":"")+"$",p.push($),this.regexp=new RegExp(f,n.caseInsensitive?"i":e),this.prefix=p[0],this.$$paramNames=g}function y(t){I(this,t)}function $(){function t(t){return null!=t?t.toString().replace(/\//g,"%2F"):t}function i(t){return null!=t?t.toString().replace(/%2F/g,"/"):t}function o(){return{strict:v,caseInsensitive:h}}function s(t){return L(t)||F(t)&&L(t[t.length-1])}function l(){for(;w.length;){var t=w.shift();if(t.pattern)throw new Error("You cannot override a type's .pattern at runtime.");n.extend(x[t.name],f.invoke(t.def))}}function c(t){I(this,t||{})}q=this;var f,h=!1,v=!0,g=!1,x={},b=!0,w=[],_={string:{encode:t,decode:i,is:function(t){return null==t||!j(t)||"string"==typeof t},pattern:/[^\/]*/},"int":{encode:t,decode:function(t){return parseInt(t,10)},is:function(t){return j(t)&&this.decode(t.toString())===t},pattern:/\d+/},bool:{encode:function(t){return t?1:0},decode:function(t){return 0!==parseInt(t,10)},is:function(t){return t===!0||t===!1},pattern:/0|1/},date:{encode:function(t){return this.is(t)?[t.getFullYear(),("0"+(t.getMonth()+1)).slice(-2),("0"+t.getDate()).slice(-2)].join("-"):e},decode:function(t){if(this.is(t))return t;var n=this.capture.exec(t);return n?new Date(n[1],n[2]-1,n[3]):e},is:function(t){return t instanceof Date&&!isNaN(t.valueOf())},equals:function(t,n){return this.is(t)&&this.is(n)&&t.toISOString()===n.toISOString()},pattern:/[0-9]{4}-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])/,capture:/([0-9]{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])/},json:{encode:n.toJson,decode:n.fromJson,is:n.isObject,equals:n.equals,pattern:/[^\/]*/},any:{encode:n.identity,decode:n.identity,equals:n.equals,pattern:/.*/}};$.$$getDefaultValue=function(t){if(!s(t.value))return t.value;if(!f)throw new Error("Injectable functions cannot be called at configuration time");return f.invoke(t.value)},this.caseInsensitive=function(t){return j(t)&&(h=t),h},this.strictMode=function(t){return j(t)&&(v=t),v},this.defaultSquashPolicy=function(t){if(!j(t))return g;if(t!==!0&&t!==!1&&!R(t))throw new Error("Invalid squash policy: "+t+". Valid policies: false, true, arbitrary-string");return g=t,t},this.compile=function(t,n){return new m(t,I(o(),n))},this.isMatcher=function(t){if(!N(t))return!1;var n=!0;return D(m.prototype,function(e,r){L(e)&&(n=n&&j(t[r])&&L(t[r]))}),n},this.type=function(t,n,e){if(!j(n))return x[t];if(x.hasOwnProperty(t))throw new Error("A type named '"+t+"' has already been defined.");return x[t]=new y(I({name:t},n)),e&&(w.push({name:t,def:e}),b||l()),this},D(_,function(t,n){x[n]=new y(I({name:n},t))}),x=r(x,{}),this.$get=["$injector",function(t){return f=t,b=!1,l(),D(_,function(t,n){x[n]||(x[n]=new y(t))}),this}],this.Param=function(t,n,r,i){function o(t){var n=N(t)?a(t):[],e=-1===u(n,"value")&&-1===u(n,"type")&&-1===u(n,"squash")&&-1===u(n,"array");return e&&(t={value:t}),t.$$fn=s(t.value)?t.value:function(){return t.value},t}function l(n,e,r){if(n.type&&e)throw new Error("Param '"+t+"' has two type configurations.");return e?e:n.type?n.type instanceof y?n.type:new y(n.type):"config"===r?x.any:x.string}function c(){var n={array:"search"===i?"auto":!1},e=t.match(/\[\]$/)?{array:!0}:{};return I(n,e,r).array}function h(t,n){var e=t.squash;if(!n||e===!1)return!1;if(!j(e)||null==e)return g;if(e===!0||R(e))return e;throw new Error("Invalid squash policy: '"+e+"'. Valid policies: false, true, or arbitrary string")}function v(t,n,r,i){var o,a,s=[{from:"",to:r||n?e:""},{from:null,to:r||n?e:""}];return o=F(t.replace)?t.replace:[],R(i)&&o.push({from:i,to:e}),a=d(o,function(t){return t.from}),p(s,function(t){return-1===u(a,t.from)}).concat(o)}function m(){if(!f)throw new Error("Injectable functions cannot be called at configuration time");var t=f.invoke(r.$$fn);if(null!==t&&t!==e&&!w.type.is(t))throw new Error("Default value ("+t+") for parameter '"+w.id+"' is not an instance of Type ("+w.type.name+")");return t}function $(t){function n(t){return function(n){return n.from===t}}function e(t){var e=d(p(w.replace,n(t)),function(t){return t.to});return e.length?e[0]:t}return t=e(t),j(t)?w.type.$normalize(t):m()}function b(){return"{Param:"+t+" "+n+" squash: '"+S+"' optional: "+C+"}"}var w=this;r=o(r),n=l(r,n,i);var _=c();n=_?n.$asArray(_,"search"===i):n,"string"!==n.name||_||"path"!==i||r.value!==e||(r.value="");var C=r.value!==e,S=h(r,C),M=v(r,_,C,S);I(this,{id:t,type:n,location:i,array:_,squash:S,replace:M,isOptional:C,value:$,dynamic:e,config:r,toString:b})},c.prototype={$$new:function(){return r(this,I(new c,{$$parent:this}))},$$keys:function(){for(var t=[],n=[],e=this,r=a(c.prototype);e;)n.push(e),e=e.$$parent;return n.reverse(),D(n,function(n){D(a(n),function(n){-1===u(t,n)&&-1===u(r,n)&&t.push(n)})}),t},$$values:function(t){var n={},e=this;return D(e.$$keys(),function(r){n[r]=e[r].value(t&&t[r])}),n},$$equals:function(t,n){var e=!0,r=this;return D(r.$$keys(),function(i){var o=t&&t[i],a=n&&n[i];r[i].type.equals(o,a)||(e=!1)}),e},$$validates:function(t){var r,i,o,a,u,s=this.$$keys();for(r=0;r<s.length&&(i=this[s[r]],o=t[s[r]],o!==e&&null!==o||!i.isOptional);r++){if(a=i.type.$normalize(o),!i.type.is(a))return!1;if(u=i.type.encode(a),n.isString(u)&&!i.type.pattern.exec(u))return!1}return!0},$$parent:e},this.ParamSet=c}function x(t,r){function i(t){var n=/^\^((?:\\[^a-zA-Z0-9]|[^\\\[\]\^$*+?.()|{}]+)*)/.exec(t.source);return null!=n?n[1].replace(/\\(.)/g,"$1"):""}function o(t,n){return t.replace(/\$(\$|\d{1,2})/,function(t,e){return n["$"===e?0:Number(e)]})}function a(t,n,e){if(!e)return!1;var r=t.invoke(n,n,{$match:e});return j(r)?r:!0}function u(r,i,o,a){function u(t,n,e){return"/"===v?t:n?v.slice(0,-1)+t:e?v.slice(1)+t:t}function h(t){function n(t){var n=t(o,r);return n?(R(n)&&r.replace().url(n),!0):!1}if(!t||!t.defaultPrevented){d&&r.url()===d;d=e;var i,a=l.length;for(i=0;a>i;i++)if(n(l[i]))return;c&&n(c)}}function p(){return s=s||i.$on("$locationChangeSuccess",h)}var d,v=a.baseHref(),g=r.url();return f||p(),{sync:function(){h()},listen:function(){return p()},update:function(t){return t?void(g=r.url()):void(r.url()!==g&&(r.url(g),r.replace()))},push:function(t,n,i){var o=t.format(n||{});null!==o&&n&&n["#"]&&(o+="#"+n["#"]),r.url(o),d=i&&i.$$avoidResync?r.url():e,i&&i.replace&&r.replace()},href:function(e,i,o){if(!e.validates(i))return null;var a=t.html5Mode();n.isObject(a)&&(a=a.enabled);var s=e.format(i);if(o=o||{},a||null===s||(s="#"+t.hashPrefix()+s),null!==s&&i&&i["#"]&&(s+="#"+i["#"]),s=u(s,a,o.absolute),!o.absolute||!s)return s;var l=!a&&s?"/":"",c=r.port();return c=80===c||443===c?"":":"+c,[r.protocol(),"://",r.host(),c,l,s].join("")}}}var s,l=[],c=null,f=!1;this.rule=function(t){if(!L(t))throw new Error("'rule' must be a function");return l.push(t),this},this.otherwise=function(t){if(R(t)){var n=t;t=function(){return n}}else if(!L(t))throw new Error("'rule' must be a function");return c=t,this},this.when=function(t,n){var e,u=R(n);if(R(t)&&(t=r.compile(t)),!u&&!L(n)&&!F(n))throw new Error("invalid 'handler' in when()");var s={matcher:function(t,n){return u&&(e=r.compile(n),n=["$match",function(t){return e.format(t)}]),I(function(e,r){return a(e,n,t.exec(r.path(),r.search()))},{prefix:R(t.prefix)?t.prefix:""})},regex:function(t,n){if(t.global||t.sticky)throw new Error("when() RegExp must not be global or sticky");return u&&(e=n,n=["$match",function(t){return o(e,t)}]),I(function(e,r){return a(e,n,t.exec(r.path()))},{prefix:i(t)})}},l={matcher:r.isMatcher(t),regex:t instanceof RegExp};for(var c in l)if(l[c])return this.rule(s[c](t,n));throw new Error("invalid 'what' in when()")},this.deferIntercept=function(t){t===e&&(t=!0),f=t},this.$get=u,u.$inject=["$location","$rootScope","$injector","$browser"]}function b(t,i){function o(t){return 0===t.indexOf(".")||0===t.indexOf("^")}function h(t,n){if(!t)return e;var r=R(t),i=r?t:t.name,a=o(i);if(a){if(!n)throw new Error("No reference point given for path '"+i+"'");n=h(n);for(var u=i.split("."),s=0,l=u.length,c=n;l>s;s++)if(""!==u[s]||0!==s){if("^"!==u[s])break;if(!c.parent)throw new Error("Path '"+i+"' not valid for state '"+n.name+"'");c=c.parent}else c=n;u=u.slice(s).join("."),i=c.name+(c.name&&u?".":"")+u}var f=S[i];return!f||!r&&(r||f!==t&&f.self!==t)?e:f}function p(t,n){M[t]||(M[t]=[]),M[t].push(n)}function v(t){for(var n=M[t]||[];n.length;)g(n.shift())}function g(n){n=r(n,{self:n,resolve:n.resolve||{},toString:function(){return this.name}});var e=n.name;if(!R(e)||e.indexOf("@")>=0)throw new Error("State must have a valid name");if(S.hasOwnProperty(e))throw new Error("State '"+e+"'' is already defined");var i=-1!==e.indexOf(".")?e.substring(0,e.lastIndexOf(".")):R(n.parent)?n.parent:N(n.parent)&&R(n.parent.name)?n.parent.name:"";if(i&&!S[i])return p(i,n.self);for(var o in A)L(A[o])&&(n[o]=A[o](n,A.$delegates[o]));return S[e]=n,!n[k]&&n.url&&t.when(n.url,["$match","$stateParams",function(t,e){C.$current.navigable==n&&l(t,e)||C.transitionTo(n,t,{inherit:!0,location:!1})}]),v(e),n}function m(t){return t.indexOf("*")>-1}function y(t){for(var n=t.split("."),e=C.$current.name.split("."),r=0,i=n.length;i>r;r++)"*"===n[r]&&(e[r]="*");return"**"===n[0]&&(e=e.slice(u(e,n[1])),e.unshift("**")),"**"===n[n.length-1]&&(e.splice(u(e,n[n.length-2])+1,Number.MAX_VALUE),e.push("**")),n.length!=e.length?!1:e.join("")===n.join("")}function $(t,n){return R(t)&&!j(n)?A[t]:L(n)&&R(t)?(A[t]&&!A.$delegates[t]&&(A.$delegates[t]=A[t]),A[t]=n,this):this}function x(t,n){return N(t)?n=t:n.name=t,g(n),this}function b(t,i,o,u,f,p,v,g,$){function x(n,e,r,o){var a=t.$broadcast("$stateNotFound",n,e,r);if(a.defaultPrevented)return v.update(),E;if(!a.retry)return null;if(o.$retry)return v.update(),P;var u=C.transition=i.when(a.retry);return u.then(function(){return u!==C.transition?M:(n.options.$retry=!0,C.transitionTo(n.to,n.toParams,n.options))},function(){return E}),v.update(),u}function b(t,e,r,a,s,l){function h(){var e=[];return D(t.views,function(r,i){var a=r.resolve&&r.resolve!==t.resolve?r.resolve:{};a.$template=[function(){return o.load(i,{view:r,locals:s.globals,params:p,notify:l.notify})||""}],e.push(f.resolve(a,s.globals,s.resolve,t).then(function(e){if(L(r.controllerProvider)||F(r.controllerProvider)){var o=n.extend({},a,s.globals);e.$$controller=u.invoke(r.controllerProvider,null,o)}else e.$$controller=r.controller;e.$$state=t,e.$$controllerAs=r.controllerAs,s[i]=e}))}),i.all(e).then(function(){return s.globals})}var p=r?e:c(t.params.$$keys(),e),d={$stateParams:p};s.resolve=f.resolve(t.resolve,d,s.resolve,t);var v=[s.resolve.then(function(t){s.globals=t})];return a&&v.push(a),i.all(v).then(h).then(function(t){return s})}var M=i.reject(new Error("transition superseded")),A=i.reject(new Error("transition prevented")),E=i.reject(new Error("transition aborted")),P=i.reject(new Error("transition failed"));return _.locals={resolve:null,globals:{$stateParams:{}}},C={params:{},current:_.self,$current:_,transition:null},C.reload=function(t){return C.transitionTo(C.current,p,{reload:t||!0,inherit:!1,notify:!0})},C.go=function(t,n,e){return C.transitionTo(t,n,I({inherit:!0,relative:C.$current},e))},C.transitionTo=function(n,e,o){e=e||{},o=I({location:!0,inherit:!1,relative:null,notify:!0,reload:!1,$retry:!1},o||{});var a,l=C.$current,f=C.params,d=l.path,g=h(n,o.relative),m=e["#"];if(!j(g)){var y={to:n,toParams:e,options:o},$=x(y,l.self,f,o);if($)return $;if(n=y.to,e=y.toParams,o=y.options,g=h(n,o.relative),!j(g)){if(!o.relative)throw new Error("No such state '"+n+"'");throw new Error("Could not resolve '"+n+"' from state '"+o.relative+"'")}}if(g[k])throw new Error("Cannot transition to abstract state '"+n+"'");if(o.inherit&&(e=s(p,e||{},C.$current,g)),!g.params.$$validates(e))return P;e=g.params.$$values(e),n=g;var S=n.path,E=0,O=S[E],T=_.locals,L=[];if(o.reload){if(R(o.reload)||N(o.reload)){if(N(o.reload)&&!o.reload.name)throw new Error("Invalid reload state object");var F=o.reload===!0?d[0]:h(o.reload);if(o.reload&&!F)throw new Error("No such reload state '"+(R(o.reload)?o.reload:o.reload.name)+"'");for(;O&&O===d[E]&&O!==F;)T=L[E]=O.locals,E++,O=S[E]}}else for(;O&&O===d[E]&&O.ownParams.$$equals(e,f);)T=L[E]=O.locals,E++,O=S[E];if(w(n,e,l,f,T,o))return m&&(e["#"]=m),C.params=e,z(C.params,p),o.location&&n.navigable&&n.navigable.url&&(v.push(n.navigable.url,e,{$$avoidResync:!0,replace:"replace"===o.location}),v.update(!0)),C.transition=null,i.when(C.current);if(e=c(n.params.$$keys(),e||{}),o.notify&&t.$broadcast("$stateChangeStart",n.self,e,l.self,f).defaultPrevented)return t.$broadcast("$stateChangeCancel",n.self,e,l.self,f),v.update(),A;for(var D=i.when(T),q=E;q<S.length;q++,O=S[q])T=L[q]=r(T),D=b(O,e,O===n,D,T,o);var V=C.transition=D.then(function(){var r,i,a;if(C.transition!==V)return M;for(r=d.length-1;r>=E;r--)a=d[r],a.self.onExit&&u.invoke(a.self.onExit,a.self,a.locals.globals),a.locals=null;for(r=E;r<S.length;r++)i=S[r],i.locals=L[r],i.self.onEnter&&u.invoke(i.self.onEnter,i.self,i.locals.globals);return m&&(e["#"]=m),C.transition!==V?M:(C.$current=n,C.current=n.self,C.params=e,z(C.params,p),C.transition=null,o.location&&n.navigable&&v.push(n.navigable.url,n.navigable.locals.globals.$stateParams,{$$avoidResync:!0,replace:"replace"===o.location}),o.notify&&t.$broadcast("$stateChangeSuccess",n.self,e,l.self,f),v.update(!0),C.current)},function(r){return C.transition!==V?M:(C.transition=null,a=t.$broadcast("$stateChangeError",n.self,e,l.self,f,r),a.defaultPrevented||v.update(),i.reject(r))});return V},C.is=function(t,n,r){r=I({relative:C.$current},r||{});var i=h(t,r.relative);return j(i)?C.$current!==i?!1:n?l(i.params.$$values(n),p):!0:e},C.includes=function(t,n,r){if(r=I({relative:C.$current},r||{}),R(t)&&m(t)){if(!y(t))return!1;t=C.$current.name}var i=h(t,r.relative);return j(i)?j(C.$current.includes[i.name])?n?l(i.params.$$values(n),p,a(n)):!0:!1:e},C.href=function(t,n,r){r=I({lossy:!0,inherit:!0,absolute:!1,relative:C.$current},r||{});var i=h(t,r.relative);if(!j(i))return null;r.inherit&&(n=s(p,n||{},C.$current,i));var o=i&&r.lossy?i.navigable:i;return o&&o.url!==e&&null!==o.url?v.href(o.url,c(i.params.$$keys().concat("#"),n||{}),{absolute:r.absolute}):null},C.get=function(t,n){if(0===arguments.length)return d(a(S),function(t){return S[t].self});var e=h(t,n||C.$current);return e&&e.self?e.self:null},C}function w(t,n,e,r,i,o){function a(t,n,e){function r(n){return"search"!=t.params[n].location}var i=t.params.$$keys().filter(r),o=f.apply({},[t.params].concat(i)),a=new q.ParamSet(o);return a.$$equals(n,e)}return!o.reload&&t===e&&(i===e.locals||t.self.reloadOnSearch===!1&&a(e,r,n))?!0:void 0}var _,C,S={},M={},k="abstract",A={parent:function(t){if(j(t.parent)&&t.parent)return h(t.parent);var n=/^(.+)\.[^.]+$/.exec(t.name);return n?h(n[1]):_},data:function(t){return t.parent&&t.parent.data&&(t.data=t.self.data=I({},t.parent.data,t.data)),t.data},url:function(t){var n=t.url,e={params:t.params||{}};if(R(n))return"^"==n.charAt(0)?i.compile(n.substring(1),e):(t.parent.navigable||_).url.concat(n,e);if(!n||i.isMatcher(n))return n;throw new Error("Invalid url '"+n+"' in state '"+t+"'")},navigable:function(t){return t.url?t:t.parent?t.parent.navigable:null},ownParams:function(t){var n=t.url&&t.url.params||new q.ParamSet;return D(t.params||{},function(t,e){n[e]||(n[e]=new q.Param(e,null,t,"config"))}),n},params:function(t){return t.parent&&t.parent.params?I(t.parent.params.$$new(),t.ownParams):new q.ParamSet},views:function(t){var n={};return D(j(t.views)?t.views:{"":t},function(e,r){r.indexOf("@")<0&&(r+="@"+t.parent.name),n[r]=e}),n},path:function(t){return t.parent?t.parent.path.concat(t):[]},includes:function(t){var n=t.parent?I({},t.parent.includes):{};return n[t.name]=!0,n},$delegates:{}};_=g({name:"",url:"^",views:null,"abstract":!0}),_.navigable=null,this.decorator=$,this.state=x,this.$get=b,b.$inject=["$rootScope","$q","$view","$injector","$resolve","$stateParams","$urlRouter","$location","$urlMatcherFactory"]}function w(){function t(t,n){return{load:function(e,r){var i,o={template:null,controller:null,view:null,locals:null,notify:!0,async:!0,params:{}};return r=I(o,r),r.view&&(i=n.fromConfig(r.view,r.params,r.locals)),i&&r.notify&&t.$broadcast("$viewContentLoading",r),i}}}this.$get=t,t.$inject=["$rootScope","$templateFactory"]}function _(){var t=!1;this.useAnchorScroll=function(){t=!0},this.$get=["$anchorScroll","$timeout",function(n,e){return t?n:function(t){return e(function(){t[0].scrollIntoView()},0,!1)}}]}function C(t,e,r,i){function o(){return e.has?function(t){return e.has(t)?e.get(t):null}:function(t){try{return e.get(t)}catch(n){return null}}}function a(t,n){var e=function(){return{enter:function(t,n,e){n.after(t),e()},leave:function(t,n){t.remove(),n()}}};if(l)return{enter:function(t,n,e){var r=l.enter(t,null,n,e);r&&r.then&&r.then(e)},leave:function(t,n){var e=l.leave(t,n);e&&e.then&&e.then(n)}};if(s){var r=s&&s(n,t);return{enter:function(t,n,e){r.enter(t,null,n),e()},leave:function(t,n){r.leave(t),n()}}}return e()}var u=o(),s=u("$animator"),l=u("$animate"),c={restrict:"ECA",terminal:!0,priority:400,transclude:"element",compile:function(e,o,u){return function(e,o,s){function l(){f&&(f.remove(),f=null),p&&(p.$destroy(),p=null),h&&(m.leave(h,function(){f=null}),f=h,h=null)}function c(a){var c,f=M(e,s,o,i),y=f&&t.$current&&t.$current.locals[f];if(a||y!==d){c=e.$new(),d=t.$current.locals[f];var $=u(c,function(t){m.enter(t,o,function(){p&&p.$emit("$viewContentAnimationEnded"),(n.isDefined(g)&&!g||e.$eval(g))&&r(t)}),l()});h=$,p=c,p.$emit("$viewContentLoaded"),p.$eval(v)}}var f,h,p,d,v=s.onload||"",g=s.autoscroll,m=a(s,e);e.$on("$stateChangeSuccess",function(){c(!1)}),e.$on("$viewContentLoading",function(){c(!1)}),c(!0)}}};return c}function S(t,n,e,r){return{restrict:"ECA",priority:-400,compile:function(i){var o=i.html();return function(i,a,u){var s=e.$current,l=M(i,u,a,r),c=s&&s.locals[l];if(c){a.data("$uiView",{name:l,state:c.$$state}),a.html(c.$template?c.$template:o);var f=t(a.contents());if(c.$$controller){c.$scope=i,c.$element=a;var h=n(c.$$controller,c);c.$$controllerAs&&(i[c.$$controllerAs]=h),a.data("$ngControllerController",h),a.children().data("$ngControllerController",h)}f(i)}}}}}function M(t,n,e,r){var i=r(n.uiView||n.name||"")(t),o=e.inheritedData("$uiView");return i.indexOf("@")>=0?i:i+"@"+(o?o.state.name:"")}function k(t,n){var e,r=t.match(/^\s*({[^}]*})\s*$/);if(r&&(t=n+"("+r[1]+")"),e=t.replace(/\n/g," ").match(/^([^(]+?)\s*(\((.*)\))?$/),!e||4!==e.length)throw new Error("Invalid state ref '"+t+"'");return{state:e[1],paramExpr:e[3]||null}}function A(t){var n=t.parent().inheritedData("$uiView");return n&&n.state&&n.state.name?n.state:void 0}function E(t,e){var r=["location","inherit","reload","absolute"];return{restrict:"A",require:["?^uiSrefActive","?^uiSrefActiveEq"],link:function(i,o,a,u){var s=k(a.uiSref,t.current.name),l=null,c=A(o)||t.$current,f="[object SVGAnimatedString]"===Object.prototype.toString.call(o.prop("href"))?"xlink:href":"href",h=null,p="A"===o.prop("tagName").toUpperCase(),d="FORM"===o[0].nodeName,v=d?"action":f,g=!0,m={relative:c,inherit:!0},y=i.$eval(a.uiSrefOpts)||{};n.forEach(r,function(t){t in y&&(m[t]=y[t])});var $=function(e){if(e&&(l=n.copy(e)),g){h=t.href(s.state,l,m);var r=u[1]||u[0];return r&&r.$$addStateInfo(s.state,l),null===h?(g=!1,!1):void a.$set(v,h)}};s.paramExpr&&(i.$watch(s.paramExpr,function(t,n){t!==l&&$(t)},!0),l=n.copy(i.$eval(s.paramExpr))),$(),d||o.bind("click",function(n){var r=n.which||n.button;if(!(r>1||n.ctrlKey||n.metaKey||n.shiftKey||o.attr("target"))){var i=e(function(){t.go(s.state,l,m)});n.preventDefault();var a=p&&!h?1:0;n.preventDefault=function(){a--<=0&&e.cancel(i)}}})}}}function P(t,n,e){return{restrict:"A",controller:["$scope","$element","$attrs",function(n,r,i){function o(){a()?r.addClass(s):r.removeClass(s)}function a(){for(var t=0;t<l.length;t++)if(u(l[t].state,l[t].params))return!0;return!1}function u(n,e){return"undefined"!=typeof i.uiSrefActiveEq?t.is(n.name,e):t.includes(n.name,e)}var s,l=[];s=e(i.uiSrefActiveEq||i.uiSrefActive||"",!1)(n),this.$$addStateInfo=function(n,e){var i=t.get(n,A(r));l.push({state:i||{name:n},params:e}),o()},n.$on("$stateChangeSuccess",o)}]}}function O(t){var n=function(n){return t.is(n)};return n.$stateful=!0,n}function T(t){var n=function(n){return t.includes(n)};return n.$stateful=!0,n}var j=n.isDefined,L=n.isFunction,R=n.isString,N=n.isObject,F=n.isArray,D=n.forEach,I=n.extend,z=n.copy;n.module("ui.router.util",["ng"]),n.module("ui.router.router",["ui.router.util"]),n.module("ui.router.state",["ui.router.router","ui.router.util"]),n.module("ui.router",["ui.router.state"]),n.module("ui.router.compat",["ui.router"]),v.$inject=["$q","$injector"],n.module("ui.router.util").service("$resolve",v),g.$inject=["$http","$templateCache","$injector"],n.module("ui.router.util").service("$templateFactory",g);var q;m.prototype.concat=function(t,n){var e={caseInsensitive:q.caseInsensitive(),strict:q.strictMode(),squash:q.defaultSquashPolicy()};return new m(this.sourcePath+t+this.sourceSearch,I(e,n),this)},m.prototype.toString=function(){return this.source},m.prototype.exec=function(t,n){function e(t){function n(t){return t.split("").reverse().join("")}function e(t){return t.replace(/\\-/g,"-")}var r=n(t).split(/-(?!\\)/),i=d(r,n);return d(i,e).reverse()}var r=this.regexp.exec(t);if(!r)return null;n=n||{};var i,o,a,u=this.parameters(),s=u.length,l=this.segments.length-1,c={};if(l!==r.length-1)throw new Error("Unbalanced capture group in route '"+this.source+"'");for(i=0;l>i;i++){a=u[i];var f=this.params[a],h=r[i+1];for(o=0;o<f.replace;o++)f.replace[o].from===h&&(h=f.replace[o].to);h&&f.array===!0&&(h=e(h)),c[a]=f.value(h)}for(;s>i;i++)a=u[i],c[a]=this.params[a].value(n[a]);return c},m.prototype.parameters=function(t){return j(t)?this.params[t]||null:this.$$paramNames},m.prototype.validates=function(t){return this.params.$$validates(t)},m.prototype.format=function(t){function n(t){return encodeURIComponent(t).replace(/-/g,function(t){return"%5C%"+t.charCodeAt(0).toString(16).toUpperCase()})}t=t||{};var e=this.segments,r=this.parameters(),i=this.params;if(!this.validates(t))return null;var o,a=!1,u=e.length-1,s=r.length,l=e[0];for(o=0;s>o;o++){var c=u>o,f=r[o],h=i[f],p=h.value(t[f]),v=h.isOptional&&h.type.equals(h.value(),p),g=v?h.squash:!1,m=h.type.encode(p);if(c){var y=e[o+1];if(g===!1)null!=m&&(l+=F(m)?d(m,n).join("-"):encodeURIComponent(m)),l+=y;else if(g===!0){var $=l.match(/\/$/)?/\/?(.*)/:/(.*)/;l+=y.match($)[1]}else R(g)&&(l+=g+y)}else{if(null==m||v&&g!==!1)continue;F(m)||(m=[m]),m=d(m,encodeURIComponent).join("&"+f+"="),l+=(a?"&":"?")+(f+"="+m),a=!0}}return l},y.prototype.is=function(t,n){return!0},y.prototype.encode=function(t,n){return t},y.prototype.decode=function(t,n){return t},y.prototype.equals=function(t,n){return t==n},y.prototype.$subPattern=function(){var t=this.pattern.toString();return t.substr(1,t.length-2)},y.prototype.pattern=/.*/,y.prototype.toString=function(){return"{Type:"+this.name+"}"},y.prototype.$normalize=function(t){return this.is(t)?t:this.decode(t)},y.prototype.$asArray=function(t,n){function r(t,n){function r(t,n){return function(){return t[n].apply(t,arguments)}}function i(t){return F(t)?t:j(t)?[t]:[]}function o(t){switch(t.length){case 0:return e;case 1:return"auto"===n?t[0]:t;default:return t}}function a(t){return!t}function u(t,n){return function(e){e=i(e);var r=d(e,t);return n===!0?0===p(r,a).length:o(r)}}function s(t){return function(n,e){var r=i(n),o=i(e);if(r.length!==o.length)return!1;for(var a=0;a<r.length;a++)if(!t(r[a],o[a]))return!1;return!0}}this.encode=u(r(t,"encode")),this.decode=u(r(t,"decode")),this.is=u(r(t,"is"),!0),this.equals=s(r(t,"equals")),this.pattern=t.pattern,this.$normalize=u(r(t,"$normalize")),this.name=t.name,this.$arrayMode=n}if(!t)return this;if("auto"===t&&!n)throw new Error("'auto' array mode is for query parameters only");return new r(this,t)},n.module("ui.router.util").provider("$urlMatcherFactory",$),n.module("ui.router.util").run(["$urlMatcherFactory",function(t){}]),x.$inject=["$locationProvider","$urlMatcherFactoryProvider"],n.module("ui.router.router").provider("$urlRouter",x),b.$inject=["$urlRouterProvider","$urlMatcherFactoryProvider"],n.module("ui.router.state").value("$stateParams",{}).provider("$state",b),w.$inject=[],n.module("ui.router.state").provider("$view",w),n.module("ui.router.state").provider("$uiViewScroll",_),C.$inject=["$state","$injector","$uiViewScroll","$interpolate"],S.$inject=["$compile","$controller","$state","$interpolate"],n.module("ui.router.state").directive("uiView",C),n.module("ui.router.state").directive("uiView",S),E.$inject=["$state","$timeout"],P.$inject=["$state","$stateParams","$interpolate"],n.module("ui.router.state").directive("uiSref",E).directive("uiSrefActive",P).directive("uiSrefActiveEq",P),O.$inject=["$state"],T.$inject=["$state"],n.module("ui.router.state").filter("isState",O).filter("includedByState",T)}(window,window.angular),function(t,n,e){"use strict";function r(t){return null!=t&&""!==t&&"hasOwnProperty"!==t&&u.test("."+t)}function i(t,i){if(!r(i))throw a("badmember",'Dotted member path "@{0}" is invalid.',i);for(var o=i.split("."),u=0,s=o.length;s>u&&n.isDefined(t);u++){var l=o[u];t=null!==t?t[l]:e}return t}function o(t,e){e=e||{},n.forEach(e,function(t,n){delete e[n]});for(var r in t)!t.hasOwnProperty(r)||"$"===r.charAt(0)&&"$"===r.charAt(1)||(e[r]=t[r]);return e}var a=n.$$minErr("$resource"),u=/^(\.[a-zA-Z_$@][0-9a-zA-Z_$@]*)+$/;n.module("ngResource",["ng"]).provider("$resource",function(){var t=/^https?:\/\/[^\/]*/,r=this;this.defaults={stripTrailingSlashes:!0,actions:{get:{method:"GET"},save:{method:"POST"},query:{method:"GET",isArray:!0},remove:{method:"DELETE"},"delete":{method:"DELETE"}}},this.$get=["$http","$q",function(u,s){function l(t){return c(t,!0).replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+")}function c(t,n){return encodeURIComponent(t).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,n?"%20":"+")}function f(t,n){this.template=t,this.defaults=v({},r.defaults,n),this.urlParams={}}function h(t,l,c,y){function $(t,n){var e={};return n=v({},l,n),d(n,function(n,r){m(n)&&(n=n()),e[r]=n&&n.charAt&&"@"==n.charAt(0)?i(t,n.substr(1)):n}),e}function x(t){return t.resource}function b(t){o(t||{},this)}var w=new f(t,y);return c=v({},r.defaults.actions,c),b.prototype.toJSON=function(){var t=v({},this);return delete t.$promise,delete t.$resolved,t},d(c,function(t,r){var i=/^(POST|PUT|PATCH)$/i.test(t.method);b[r]=function(l,c,f,h){var y,_,C,S={};switch(arguments.length){case 4:C=h,_=f;case 3:case 2:if(!m(c)){S=l,y=c,_=f;break}if(m(l)){_=l,C=c;break}_=c,C=f;case 1:m(l)?_=l:i?y=l:S=l;break;case 0:break;default:throw a("badargs","Expected up to 4 arguments [params, data, success, error], got {0} arguments",arguments.length)}var M=this instanceof b,k=M?y:t.isArray?[]:new b(y),A={},E=t.interceptor&&t.interceptor.response||x,P=t.interceptor&&t.interceptor.responseError||e;d(t,function(t,n){"params"!=n&&"isArray"!=n&&"interceptor"!=n&&(A[n]=g(t))}),i&&(A.data=y),w.setUrlParams(A,v({},$(y,t.params||{}),S),t.url);var O=u(A).then(function(e){var i=e.data,u=k.$promise;if(i){if(n.isArray(i)!==!!t.isArray)throw a("badcfg","Error in resource configuration for action `{0}`. Expected response to contain an {1} but got an {2} (Request: {3} {4})",r,t.isArray?"array":"object",n.isArray(i)?"array":"object",A.method,A.url);t.isArray?(k.length=0,d(i,function(t){"object"==typeof t?k.push(new b(t)):k.push(t)})):(o(i,k),k.$promise=u)}return k.$resolved=!0,e.resource=k,e},function(t){return k.$resolved=!0,(C||p)(t),s.reject(t)});return O=O.then(function(t){var n=E(t);return(_||p)(n,t.headers),n},P),M?O:(k.$promise=O,k.$resolved=!1,k)},b.prototype["$"+r]=function(t,n,e){m(t)&&(e=n,n=t,t={});var i=b[r].call(this,t,this,n,e);return i.$promise||i}}),b.bind=function(n){return h(t,v({},l,n),c)},b}var p=n.noop,d=n.forEach,v=n.extend,g=n.copy,m=n.isFunction;return f.prototype={setUrlParams:function(e,r,i){var o,u,s=this,c=i||s.template,f="",h=s.urlParams={};d(c.split(/\W/),function(t){if("hasOwnProperty"===t)throw a("badname","hasOwnProperty is not a valid parameter name.");!new RegExp("^\\d+$").test(t)&&t&&new RegExp("(^|[^\\\\]):"+t+"(\\W|$)").test(c)&&(h[t]=!0)}),c=c.replace(/\\:/g,":"),c=c.replace(t,function(t){return f=t,""}),r=r||{},d(s.urlParams,function(t,e){o=r.hasOwnProperty(e)?r[e]:s.defaults[e],n.isDefined(o)&&null!==o?(u=l(o),c=c.replace(new RegExp(":"+e+"(\\W|$)","g"),function(t,n){return u+n})):c=c.replace(new RegExp("(/?):"+e+"(\\W|$)","g"),function(t,n,e){return"/"==e.charAt(0)?e:n+e})}),s.defaults.stripTrailingSlashes&&(c=c.replace(/\/+$/,"")||"/"),c=c.replace(/\/\.(?=\w+($|\?))/,"."),e.url=f+c.replace(/\/\\\./,"/."),d(r,function(t,n){s.urlParams[n]||(e.params=e.params||{},e.params[n]=t)})}},h}]})}(window,window.angular),angular.module("ngLodash",[]).constant("lodash",null).config(["$provide",function(t){function n(t,n){if(t!==n){var e=null===t,r=t===_,i=t===t,o=null===n,a=n===_,u=n===n;if(t>n&&!o||!i||e&&!a&&u||r&&u)return 1;if(n>t&&!e||!u||o&&!r&&i||a&&i)return-1}return 0}function e(t,n,e){for(var r=t.length,i=e?r:-1;e?i--:++i<r;)if(n(t[i],i,t))return i;return-1}function r(t,n,e){if(n!==n)return d(t,e);for(var r=e-1,i=t.length;++r<i;)if(t[r]===n)return r;return-1}function i(t){return"function"==typeof t||!1}function o(t){return null==t?"":t+""}function a(t,n){for(var e=-1,r=t.length;++e<r&&n.indexOf(t.charAt(e))>-1;);return e}function u(t,n){for(var e=t.length;e--&&n.indexOf(t.charAt(e))>-1;);return e}function s(t,e){return n(t.criteria,e.criteria)||t.index-e.index}function l(t,e,r){for(var i=-1,o=t.criteria,a=e.criteria,u=o.length,s=r.length;++i<u;){var l=n(o[i],a[i]);if(l){if(i>=s)return l;var c=r[i];return l*("asc"===c||c===!0?1:-1)}}return t.index-e.index}function c(t){return Vt[t]}function f(t){return Bt[t]}function h(t,n,e){return n?t=Ht[t]:e&&(t=Yt[t]),"\\"+t}function p(t){return"\\"+Yt[t]}function d(t,n,e){for(var r=t.length,i=n+(e?0:-1);e?i--:++i<r;){var o=t[i];if(o!==o)return i}return-1}function v(t){return!!t&&"object"==typeof t}function g(t){return 160>=t&&t>=9&&13>=t||32==t||160==t||5760==t||6158==t||t>=8192&&(8202>=t||8232==t||8233==t||8239==t||8287==t||12288==t||65279==t)}function m(t,n){for(var e=-1,r=t.length,i=-1,o=[];++e<r;)t[e]===n&&(t[e]=V,o[++i]=e);return o}function y(t,n){for(var e,r=-1,i=t.length,o=-1,a=[];++r<i;){var u=t[r],s=n?n(u,r,t):u;r&&e===s||(e=s,a[++o]=u)}return a}function $(t){for(var n=-1,e=t.length;++n<e&&g(t.charCodeAt(n)););return n}function x(t){for(var n=t.length;n--&&g(t.charCodeAt(n)););return n}function b(t){return Wt[t]}function w(t){function g(t){if(v(t)&&!Eu(t)&&!(t instanceof nt)){if(t instanceof Q)return t;if(na.call(t,"__chain__")&&na.call(t,"__wrapped__"))return pr(t);
-}return new Q(t)}function X(){}function Q(t,n,e){this.__wrapped__=t,this.__actions__=e||[],this.__chain__=!!n}function nt(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Aa,this.__views__=[]}function Vt(){var t=new nt(this.__wrapped__);return t.__actions__=en(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=en(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=en(this.__views__),t}function Bt(){if(this.__filtered__){var t=new nt(this);t.__dir__=-1,t.__filtered__=!0}else t=this.clone(),t.__dir__*=-1;return t}function Wt(){var t=this.__wrapped__.value(),n=this.__dir__,e=Eu(t),r=0>n,i=e?t.length:0,o=He(0,i,this.__views__),a=o.start,u=o.end,s=u-a,l=r?u:a-1,c=this.__iteratees__,f=c.length,h=0,p=_a(s,this.__takeCount__);if(!e||D>i||i==s&&p==s)return re(t,this.__actions__);var d=[];t:for(;s--&&p>h;){l+=n;for(var v=-1,g=t[l];++v<f;){var m=c[v],y=m.iteratee,$=m.type,x=y(g);if($==z)g=x;else if(!x){if($==I)continue t;break t}}d[h++]=g}return d}function Ut(){this.__data__={}}function Ht(t){return this.has(t)&&delete this.__data__[t]}function Yt(t){return"__proto__"==t?_:this.__data__[t]}function Gt(t){return"__proto__"!=t&&na.call(this.__data__,t)}function Xt(t,n){return"__proto__"!=t&&(this.__data__[t]=n),this}function Zt(t){var n=t?t.length:0;for(this.data={hash:ma(null),set:new fa};n--;)this.push(t[n])}function Jt(t,n){var e=t.data,r="string"==typeof n||Li(n)?e.set.has(n):e.hash[n];return r?0:-1}function Kt(t){var n=this.data;"string"==typeof t||Li(t)?n.set.add(t):n.hash[t]=!0}function Qt(t,n){for(var e=-1,r=t.length,i=-1,o=n.length,a=qo(r+o);++e<r;)a[e]=t[e];for(;++i<o;)a[e++]=n[i];return a}function en(t,n){var e=-1,r=t.length;for(n||(n=qo(r));++e<r;)n[e]=t[e];return n}function rn(t,n){for(var e=-1,r=t.length;++e<r&&n(t[e],e,t)!==!1;);return t}function on(t,n){for(var e=t.length;e--&&n(t[e],e,t)!==!1;);return t}function an(t,n){for(var e=-1,r=t.length;++e<r;)if(!n(t[e],e,t))return!1;return!0}function un(t,n,e,r){for(var i=-1,o=t.length,a=r,u=a;++i<o;){var s=t[i],l=+n(s);e(l,a)&&(a=l,u=s)}return u}function sn(t,n){for(var e=-1,r=t.length,i=-1,o=[];++e<r;){var a=t[e];n(a,e,t)&&(o[++i]=a)}return o}function ln(t,n){for(var e=-1,r=t.length,i=qo(r);++e<r;)i[e]=n(t[e],e,t);return i}function cn(t,n){for(var e=-1,r=n.length,i=t.length;++e<r;)t[i+e]=n[e];return t}function fn(t,n,e,r){var i=-1,o=t.length;for(r&&o&&(e=t[++i]);++i<o;)e=n(e,t[i],i,t);return e}function hn(t,n,e,r){var i=t.length;for(r&&i&&(e=t[--i]);i--;)e=n(e,t[i],i,t);return e}function pn(t,n){for(var e=-1,r=t.length;++e<r;)if(n(t[e],e,t))return!0;return!1}function dn(t,n){for(var e=t.length,r=0;e--;)r+=+n(t[e])||0;return r}function vn(t,n){return t===_?n:t}function gn(t,n,e,r){return t!==_&&na.call(r,e)?t:n}function mn(t,n,e){for(var r=-1,i=zu(n),o=i.length;++r<o;){var a=i[r],u=t[a],s=e(u,n[a],a,t,n);(s===s?s===u:u!==u)&&(u!==_||a in t)||(t[a]=s)}return t}function yn(t,n){return null==n?t:xn(n,zu(n),t)}function $n(t,n){for(var e=-1,r=null==t,i=!r&&Je(t),o=i?t.length:0,a=n.length,u=qo(a);++e<a;){var s=n[e];i?u[e]=Ke(s,o)?t[s]:_:u[e]=r?_:t[s]}return u}function xn(t,n,e){e||(e={});for(var r=-1,i=n.length;++r<i;){var o=n[r];e[o]=t[o]}return e}function bn(t,n,e){var r=typeof t;return"function"==r?n===_?t:ae(t,n,e):null==t?Ao:"object"==r?zn(t):n===_?Lo(t):qn(t,n)}function wn(t,n,e,r,i,o,a){var u;if(e&&(u=i?e(t,r,i):e(t)),u!==_)return u;if(!Li(t))return t;var s=Eu(t);if(s){if(u=Ye(t),!n)return en(t,u)}else{var l=ra.call(t),c=l==G;if(l!=J&&l!=B&&(!c||i))return qt[l]?Xe(t,l,n):i?t:{};if(u=Ge(c?{}:t),!n)return yn(u,t)}o||(o=[]),a||(a=[]);for(var f=o.length;f--;)if(o[f]==t)return a[f];return o.push(t),a.push(u),(s?rn:Tn)(t,function(r,i){u[i]=wn(r,n,e,i,t,o,a)}),u}function _n(t,n,e){if("function"!=typeof t)throw new Zo(q);return ha(function(){t.apply(_,e)},n)}function Cn(t,n){var e=t?t.length:0,i=[];if(!e)return i;var o=-1,a=Be(),u=a===r,s=u&&n.length>=D?ve(n):null,l=n.length;s&&(a=Jt,u=!1,n=s);t:for(;++o<e;){var c=t[o];if(u&&c===c){for(var f=l;f--;)if(n[f]===c)continue t;i.push(c)}else a(n,c,0)<0&&i.push(c)}return i}function Sn(t,n){var e=!0;return Na(t,function(t,r,i){return e=!!n(t,r,i)}),e}function Mn(t,n,e,r){var i=r,o=i;return Na(t,function(t,a,u){var s=+n(t,a,u);(e(s,i)||s===r&&s===o)&&(i=s,o=t)}),o}function kn(t,n,e,r){var i=t.length;for(e=null==e?0:+e||0,0>e&&(e=-e>i?0:i+e),r=r===_||r>i?i:+r||0,0>r&&(r+=i),i=e>r?0:r>>>0,e>>>=0;i>e;)t[e++]=n;return t}function An(t,n){var e=[];return Na(t,function(t,r,i){n(t,r,i)&&e.push(t)}),e}function En(t,n,e,r){var i;return e(t,function(t,e,o){return n(t,e,o)?(i=r?e:t,!1):void 0}),i}function Pn(t,n,e,r){r||(r=[]);for(var i=-1,o=t.length;++i<o;){var a=t[i];v(a)&&Je(a)&&(e||Eu(a)||Si(a))?n?Pn(a,n,e,r):cn(r,a):e||(r[r.length]=a)}return r}function On(t,n){return Da(t,n,to)}function Tn(t,n){return Da(t,n,zu)}function jn(t,n){return Ia(t,n,zu)}function Ln(t,n){for(var e=-1,r=n.length,i=-1,o=[];++e<r;){var a=n[e];ji(t[a])&&(o[++i]=a)}return o}function Rn(t,n,e){if(null!=t){e!==_&&e in fr(t)&&(n=[e]);for(var r=0,i=n.length;null!=t&&i>r;)t=t[n[r++]];return r&&r==i?t:_}}function Nn(t,n,e,r,i,o){return t===n?!0:null==t||null==n||!Li(t)&&!v(n)?t!==t&&n!==n:Fn(t,n,Nn,e,r,i,o)}function Fn(t,n,e,r,i,o,a){var u=Eu(t),s=Eu(n),l=W,c=W;u||(l=ra.call(t),l==B?l=J:l!=J&&(u=Bi(t))),s||(c=ra.call(n),c==B?c=J:c!=J&&(s=Bi(n)));var f=l==J,h=c==J,p=l==c;if(p&&!u&&!f)return Ie(t,n,l);if(!i){var d=f&&na.call(t,"__wrapped__"),v=h&&na.call(n,"__wrapped__");if(d||v)return e(d?t.value():t,v?n.value():n,r,i,o,a)}if(!p)return!1;o||(o=[]),a||(a=[]);for(var g=o.length;g--;)if(o[g]==t)return a[g]==n;o.push(t),a.push(n);var m=(u?De:ze)(t,n,e,r,i,o,a);return o.pop(),a.pop(),m}function Dn(t,n,e){var r=n.length,i=r,o=!e;if(null==t)return!i;for(t=fr(t);r--;){var a=n[r];if(o&&a[2]?a[1]!==t[a[0]]:!(a[0]in t))return!1}for(;++r<i;){a=n[r];var u=a[0],s=t[u],l=a[1];if(o&&a[2]){if(s===_&&!(u in t))return!1}else{var c=e?e(s,l,u):_;if(!(c===_?Nn(l,s,e,!0):c))return!1}}return!0}function In(t,n){var e=-1,r=Je(t)?qo(t.length):[];return Na(t,function(t,i,o){r[++e]=n(t,i,o)}),r}function zn(t){var n=We(t);if(1==n.length&&n[0][2]){var e=n[0][0],r=n[0][1];return function(t){return null==t?!1:t[e]===r&&(r!==_||e in fr(t))}}return function(t){return Dn(t,n)}}function qn(t,n){var e=Eu(t),r=tr(t)&&rr(n),i=t+"";return t=hr(t),function(o){if(null==o)return!1;var a=i;if(o=fr(o),(e||!r)&&!(a in o)){if(o=1==t.length?o:Rn(o,Xn(t,0,-1)),null==o)return!1;a=Mr(t),o=fr(o)}return o[a]===n?n!==_||a in o:Nn(n,o[a],_,!0)}}function Vn(t,n,e,r,i){if(!Li(t))return t;var o=Je(n)&&(Eu(n)||Bi(n)),a=o?_:zu(n);return rn(a||n,function(u,s){if(a&&(s=u,u=n[s]),v(u))r||(r=[]),i||(i=[]),Bn(t,n,s,Vn,e,r,i);else{var l=t[s],c=e?e(l,u,s,t,n):_,f=c===_;f&&(c=u),c===_&&(!o||s in t)||!f&&(c===c?c===l:l!==l)||(t[s]=c)}}),t}function Bn(t,n,e,r,i,o,a){for(var u=o.length,s=n[e];u--;)if(o[u]==s)return void(t[e]=a[u]);var l=t[e],c=i?i(l,s,e,t,n):_,f=c===_;f&&(c=s,Je(s)&&(Eu(s)||Bi(s))?c=Eu(l)?l:Je(l)?en(l):[]:zi(s)||Si(s)?c=Si(l)?Gi(l):zi(l)?l:{}:f=!1),o.push(s),a.push(c),f?t[e]=r(c,s,i,o,a):(c===c?c!==l:l===l)&&(t[e]=c)}function Wn(t){return function(n){return null==n?_:n[t]}}function Un(t){var n=t+"";return t=hr(t),function(e){return Rn(e,t,n)}}function Hn(t,n){for(var e=t?n.length:0;e--;){var r=n[e];if(r!=i&&Ke(r)){var i=r;pa.call(t,r,1)}}return t}function Yn(t,n){return t+ya(Ma()*(n-t+1))}function Gn(t,n,e,r,i){return i(t,function(t,i,o){e=r?(r=!1,t):n(e,t,i,o)}),e}function Xn(t,n,e){var r=-1,i=t.length;n=null==n?0:+n||0,0>n&&(n=-n>i?0:i+n),e=e===_||e>i?i:+e||0,0>e&&(e+=i),i=n>e?0:e-n>>>0,n>>>=0;for(var o=qo(i);++r<i;)o[r]=t[r+n];return o}function Zn(t,n){var e;return Na(t,function(t,r,i){return e=n(t,r,i),!e}),!!e}function Jn(t,n){var e=t.length;for(t.sort(n);e--;)t[e]=t[e].value;return t}function Kn(t,n,e){var r=qe(),i=-1;n=ln(n,function(t){return r(t)});var o=In(t,function(t){var e=ln(n,function(n){return n(t)});return{criteria:e,index:++i,value:t}});return Jn(o,function(t,n){return l(t,n,e)})}function Qn(t,n){var e=0;return Na(t,function(t,r,i){e+=+n(t,r,i)||0}),e}function te(t,n){var e=-1,i=Be(),o=t.length,a=i===r,u=a&&o>=D,s=u?ve():null,l=[];s?(i=Jt,a=!1):(u=!1,s=n?[]:l);t:for(;++e<o;){var c=t[e],f=n?n(c,e,t):c;if(a&&c===c){for(var h=s.length;h--;)if(s[h]===f)continue t;n&&s.push(f),l.push(c)}else i(s,f,0)<0&&((n||u)&&s.push(f),l.push(c))}return l}function ne(t,n){for(var e=-1,r=n.length,i=qo(r);++e<r;)i[e]=t[n[e]];return i}function ee(t,n,e,r){for(var i=t.length,o=r?i:-1;(r?o--:++o<i)&&n(t[o],o,t););return e?Xn(t,r?0:o,r?o+1:i):Xn(t,r?o+1:0,r?i:o)}function re(t,n){var e=t;e instanceof nt&&(e=e.value());for(var r=-1,i=n.length;++r<i;){var o=n[r];e=o.func.apply(o.thisArg,cn([e],o.args))}return e}function ie(t,n,e){var r=0,i=t?t.length:r;if("number"==typeof n&&n===n&&Oa>=i){for(;i>r;){var o=r+i>>>1,a=t[o];(e?n>=a:n>a)&&null!==a?r=o+1:i=o}return i}return oe(t,n,Ao,e)}function oe(t,n,e,r){n=e(n);for(var i=0,o=t?t.length:0,a=n!==n,u=null===n,s=n===_;o>i;){var l=ya((i+o)/2),c=e(t[l]),f=c!==_,h=c===c;if(a)var p=h||r;else p=u?h&&f&&(r||null!=c):s?h&&(r||f):null==c?!1:r?n>=c:n>c;p?i=l+1:o=l}return _a(o,Pa)}function ae(t,n,e){if("function"!=typeof t)return Ao;if(n===_)return t;switch(e){case 1:return function(e){return t.call(n,e)};case 3:return function(e,r,i){return t.call(n,e,r,i)};case 4:return function(e,r,i,o){return t.call(n,e,r,i,o)};case 5:return function(e,r,i,o,a){return t.call(n,e,r,i,o,a)}}return function(){return t.apply(n,arguments)}}function ue(t){var n=new aa(t.byteLength),e=new da(n);return e.set(new da(t)),n}function se(t,n,e){for(var r=e.length,i=-1,o=wa(t.length-r,0),a=-1,u=n.length,s=qo(u+o);++a<u;)s[a]=n[a];for(;++i<r;)s[e[i]]=t[i];for(;o--;)s[a++]=t[i++];return s}function le(t,n,e){for(var r=-1,i=e.length,o=-1,a=wa(t.length-i,0),u=-1,s=n.length,l=qo(a+s);++o<a;)l[o]=t[o];for(var c=o;++u<s;)l[c+u]=n[u];for(;++r<i;)l[c+e[r]]=t[o++];return l}function ce(t,n){return function(e,r,i){var o=n?n():{};if(r=qe(r,i,3),Eu(e))for(var a=-1,u=e.length;++a<u;){var s=e[a];t(o,s,r(s,a,e),e)}else Na(e,function(n,e,i){t(o,n,r(n,e,i),i)});return o}}function fe(t){return mi(function(n,e){var r=-1,i=null==n?0:e.length,o=i>2?e[i-2]:_,a=i>2?e[2]:_,u=i>1?e[i-1]:_;for("function"==typeof o?(o=ae(o,u,5),i-=2):(o="function"==typeof u?u:_,i-=o?1:0),a&&Qe(e[0],e[1],a)&&(o=3>i?_:o,i=1);++r<i;){var s=e[r];s&&t(n,s,o)}return n})}function he(t,n){return function(e,r){var i=e?Va(e):0;if(!er(i))return t(e,r);for(var o=n?i:-1,a=fr(e);(n?o--:++o<i)&&r(a[o],o,a)!==!1;);return e}}function pe(t){return function(n,e,r){for(var i=fr(n),o=r(n),a=o.length,u=t?a:-1;t?u--:++u<a;){var s=o[u];if(e(i[s],s,i)===!1)break}return n}}function de(t,n){function e(){var i=this&&this!==tn&&this instanceof e?r:t;return i.apply(n,arguments)}var r=me(t);return e}function ve(t){return ma&&fa?new Zt(t):null}function ge(t){return function(n){for(var e=-1,r=So(co(n)),i=r.length,o="";++e<i;)o=t(o,r[e],e);return o}}function me(t){return function(){var n=arguments;switch(n.length){case 0:return new t;case 1:return new t(n[0]);case 2:return new t(n[0],n[1]);case 3:return new t(n[0],n[1],n[2]);case 4:return new t(n[0],n[1],n[2],n[3]);case 5:return new t(n[0],n[1],n[2],n[3],n[4]);case 6:return new t(n[0],n[1],n[2],n[3],n[4],n[5]);case 7:return new t(n[0],n[1],n[2],n[3],n[4],n[5],n[6])}var e=Ra(t.prototype),r=t.apply(e,n);return Li(r)?r:e}}function ye(t){function n(e,r,i){i&&Qe(e,r,i)&&(r=_);var o=Fe(e,t,_,_,_,_,_,r);return o.placeholder=n.placeholder,o}return n}function $e(t,n){return mi(function(e){var r=e[0];return null==r?r:(e.push(n),t.apply(_,e))})}function xe(t,n){return function(e,r,i){if(i&&Qe(e,r,i)&&(r=_),r=qe(r,i,3),1==r.length){e=Eu(e)?e:cr(e);var o=un(e,r,t,n);if(!e.length||o!==n)return o}return Mn(e,r,t,n)}}function be(t,n){return function(r,i,o){if(i=qe(i,o,3),Eu(r)){var a=e(r,i,n);return a>-1?r[a]:_}return En(r,i,t)}}function we(t){return function(n,r,i){return n&&n.length?(r=qe(r,i,3),e(n,r,t)):-1}}function _e(t){return function(n,e,r){return e=qe(e,r,3),En(n,e,t,!0)}}function Ce(t){return function(){for(var n,e=arguments.length,r=t?e:-1,i=0,o=qo(e);t?r--:++r<e;){var a=o[i++]=arguments[r];if("function"!=typeof a)throw new Zo(q);!n&&Q.prototype.thru&&"wrapper"==Ve(a)&&(n=new Q([],!0))}for(r=n?-1:e;++r<e;){a=o[r];var u=Ve(a),s="wrapper"==u?qa(a):_;n=s&&nr(s[0])&&s[1]==(T|A|P|j)&&!s[4].length&&1==s[9]?n[Ve(s[0])].apply(n,s[3]):1==a.length&&nr(a)?n[u]():n.thru(a)}return function(){var t=arguments,r=t[0];if(n&&1==t.length&&Eu(r)&&r.length>=D)return n.plant(r).value();for(var i=0,a=e?o[i].apply(this,t):r;++i<e;)a=o[i].call(this,a);return a}}}function Se(t,n){return function(e,r,i){return"function"==typeof r&&i===_&&Eu(e)?t(e,r):n(e,ae(r,i,3))}}function Me(t){return function(n,e,r){return"function"==typeof e&&r===_||(e=ae(e,r,3)),t(n,e,to)}}function ke(t){return function(n,e,r){return"function"==typeof e&&r===_||(e=ae(e,r,3)),t(n,e)}}function Ae(t){return function(n,e,r){var i={};return e=qe(e,r,3),Tn(n,function(n,r,o){var a=e(n,r,o);r=t?a:r,n=t?n:a,i[r]=n}),i}}function Ee(t){return function(n,e,r){return n=o(n),(t?n:"")+je(n,e,r)+(t?"":n)}}function Pe(t){var n=mi(function(e,r){var i=m(r,n.placeholder);return Fe(e,t,_,r,i)});return n}function Oe(t,n){return function(e,r,i,o){var a=arguments.length<3;return"function"==typeof r&&o===_&&Eu(e)?t(e,r,i,a):Gn(e,qe(r,o,4),i,a,n)}}function Te(t,n,e,r,i,o,a,u,s,l){function c(){for(var $=arguments.length,x=$,b=qo($);x--;)b[x]=arguments[x];if(r&&(b=se(b,r,i)),o&&(b=le(b,o,a)),d||g){var w=c.placeholder,C=m(b,w);if($-=C.length,l>$){var k=u?en(u):_,A=wa(l-$,0),E=d?C:_,T=d?_:C,j=d?b:_,L=d?_:b;n|=d?P:O,n&=~(d?O:P),v||(n&=~(S|M));var R=[t,n,e,j,E,L,T,k,s,A],N=Te.apply(_,R);return nr(t)&&Ba(N,R),N.placeholder=w,N}}var F=h?e:this,D=p?F[t]:t;return u&&(b=sr(b,u)),f&&s<b.length&&(b.length=s),this&&this!==tn&&this instanceof c&&(D=y||me(t)),D.apply(F,b)}var f=n&T,h=n&S,p=n&M,d=n&A,v=n&k,g=n&E,y=p?_:me(t);return c}function je(t,n,e){var r=t.length;if(n=+n,r>=n||!xa(n))return"";var i=n-r;return e=null==e?" ":e+"",mo(e,ga(i/e.length)).slice(0,i)}function Le(t,n,e,r){function i(){for(var n=-1,u=arguments.length,s=-1,l=r.length,c=qo(l+u);++s<l;)c[s]=r[s];for(;u--;)c[s++]=arguments[++n];var f=this&&this!==tn&&this instanceof i?a:t;return f.apply(o?e:this,c)}var o=n&S,a=me(t);return i}function Re(t){var n=Uo[t];return function(t,e){return e=e===_?0:+e||0,e?(e=la(10,e),n(t*e)/e):n(t)}}function Ne(t){return function(n,e,r,i){var o=qe(r);return null==r&&o===bn?ie(n,e,t):oe(n,e,o(r,i,1),t)}}function Fe(t,n,e,r,i,o,a,u){var s=n&M;if(!s&&"function"!=typeof t)throw new Zo(q);var l=r?r.length:0;if(l||(n&=~(P|O),r=i=_),l-=i?i.length:0,n&O){var c=r,f=i;r=i=_}var h=s?_:qa(t),p=[t,n,e,r,i,c,f,o,a,u];if(h&&(ir(p,h),n=p[1],u=p[9]),p[9]=null==u?s?0:t.length:wa(u-l,0)||0,n==S)var d=de(p[0],p[2]);else d=n!=P&&n!=(S|P)||p[4].length?Te.apply(_,p):Le.apply(_,p);var v=h?za:Ba;return v(d,p)}function De(t,n,e,r,i,o,a){var u=-1,s=t.length,l=n.length;if(s!=l&&!(i&&l>s))return!1;for(;++u<s;){var c=t[u],f=n[u],h=r?r(i?f:c,i?c:f,u):_;if(h!==_){if(h)continue;return!1}if(i){if(!pn(n,function(t){return c===t||e(c,t,r,i,o,a)}))return!1}else if(c!==f&&!e(c,f,r,i,o,a))return!1}return!0}function Ie(t,n,e){switch(e){case U:case H:return+t==+n;case Y:return t.name==n.name&&t.message==n.message;case Z:return t!=+t?n!=+n:t==+n;case K:case tt:return t==n+""}return!1}function ze(t,n,e,r,i,o,a){var u=zu(t),s=u.length,l=zu(n),c=l.length;if(s!=c&&!i)return!1;for(var f=s;f--;){var h=u[f];if(!(i?h in n:na.call(n,h)))return!1}for(var p=i;++f<s;){h=u[f];var d=t[h],v=n[h],g=r?r(i?v:d,i?d:v,h):_;if(!(g===_?e(d,v,r,i,o,a):g))return!1;p||(p="constructor"==h)}if(!p){var m=t.constructor,y=n.constructor;if(m!=y&&"constructor"in t&&"constructor"in n&&!("function"==typeof m&&m instanceof m&&"function"==typeof y&&y instanceof y))return!1}return!0}function qe(t,n,e){var r=g.callback||Mo;return r=r===Mo?bn:r,e?r(t,n,e):r}function Ve(t){for(var n=t.name+"",e=La[n],r=e?e.length:0;r--;){var i=e[r],o=i.func;if(null==o||o==t)return i.name}return n}function Be(t,n,e){var i=g.indexOf||Cr;return i=i===Cr?r:i,t?i(t,n,e):i}function We(t){for(var n=no(t),e=n.length;e--;)n[e][2]=rr(n[e][1]);return n}function Ue(t,n){var e=null==t?_:t[n];return Fi(e)?e:_}function He(t,n,e){for(var r=-1,i=e.length;++r<i;){var o=e[r],a=o.size;switch(o.type){case"drop":t+=a;break;case"dropRight":n-=a;break;case"take":n=_a(n,t+a);break;case"takeRight":t=wa(t,n-a)}}return{start:t,end:n}}function Ye(t){var n=t.length,e=new t.constructor(n);return n&&"string"==typeof t[0]&&na.call(t,"index")&&(e.index=t.index,e.input=t.input),e}function Ge(t){var n=t.constructor;return"function"==typeof n&&n instanceof n||(n=Yo),new n}function Xe(t,n,e){var r=t.constructor;switch(n){case et:return ue(t);case U:case H:return new r(+t);case rt:case it:case ot:case at:case ut:case st:case lt:case ct:case ft:var i=t.buffer;return new r(e?ue(i):i,t.byteOffset,t.length);case Z:case tt:return new r(t);case K:var o=new r(t.source,Pt.exec(t));o.lastIndex=t.lastIndex}return o}function Ze(t,n,e){null==t||tr(n,t)||(n=hr(n),t=1==n.length?t:Rn(t,Xn(n,0,-1)),n=Mr(n));var r=null==t?t:t[n];return null==r?_:r.apply(t,e)}function Je(t){return null!=t&&er(Va(t))}function Ke(t,n){return t="number"==typeof t||jt.test(t)?+t:-1,n=null==n?Ta:n,t>-1&&t%1==0&&n>t}function Qe(t,n,e){if(!Li(e))return!1;var r=typeof n;if("number"==r?Je(e)&&Ke(n,e.length):"string"==r&&n in e){var i=e[n];return t===t?t===i:i!==i}return!1}function tr(t,n){var e=typeof t;if("string"==e&&_t.test(t)||"number"==e)return!0;if(Eu(t))return!1;var r=!wt.test(t);return r||null!=n&&t in fr(n)}function nr(t){var n=Ve(t),e=g[n];if("function"!=typeof e||!(n in nt.prototype))return!1;if(t===e)return!0;var r=qa(e);return!!r&&t===r[0]}function er(t){return"number"==typeof t&&t>-1&&t%1==0&&Ta>=t}function rr(t){return t===t&&!Li(t)}function ir(t,n){var e=t[1],r=n[1],i=e|r,o=T>i,a=r==T&&e==A||r==T&&e==j&&t[7].length<=n[8]||r==(T|j)&&e==A;if(!o&&!a)return t;r&S&&(t[2]=n[2],i|=e&S?0:k);var u=n[3];if(u){var s=t[3];t[3]=s?se(s,u,n[4]):en(u),t[4]=s?m(t[3],V):en(n[4])}return u=n[5],u&&(s=t[5],t[5]=s?le(s,u,n[6]):en(u),t[6]=s?m(t[5],V):en(n[6])),u=n[7],u&&(t[7]=en(u)),r&T&&(t[8]=null==t[8]?n[8]:_a(t[8],n[8])),null==t[9]&&(t[9]=n[9]),t[0]=n[0],t[1]=i,t}function or(t,n){return t===_?n:Pu(t,n,or)}function ar(t,n){t=fr(t);for(var e=-1,r=n.length,i={};++e<r;){var o=n[e];o in t&&(i[o]=t[o])}return i}function ur(t,n){var e={};return On(t,function(t,r,i){n(t,r,i)&&(e[r]=t)}),e}function sr(t,n){for(var e=t.length,r=_a(n.length,e),i=en(t);r--;){var o=n[r];t[r]=Ke(o,e)?i[o]:_}return t}function lr(t){for(var n=to(t),e=n.length,r=e&&t.length,i=!!r&&er(r)&&(Eu(t)||Si(t)),o=-1,a=[];++o<e;){var u=n[o];(i&&Ke(u,r)||na.call(t,u))&&a.push(u)}return a}function cr(t){return null==t?[]:Je(t)?Li(t)?t:Yo(t):oo(t)}function fr(t){return Li(t)?t:Yo(t)}function hr(t){if(Eu(t))return t;var n=[];return o(t).replace(Ct,function(t,e,r,i){n.push(r?i.replace(At,"$1"):e||t)}),n}function pr(t){return t instanceof nt?t.clone():new Q(t.__wrapped__,t.__chain__,en(t.__actions__))}function dr(t,n,e){n=(e?Qe(t,n,e):null==n)?1:wa(ya(n)||1,1);for(var r=0,i=t?t.length:0,o=-1,a=qo(ga(i/n));i>r;)a[++o]=Xn(t,r,r+=n);return a}function vr(t){for(var n=-1,e=t?t.length:0,r=-1,i=[];++n<e;){var o=t[n];o&&(i[++r]=o)}return i}function gr(t,n,e){var r=t?t.length:0;return r?((e?Qe(t,n,e):null==n)&&(n=1),Xn(t,0>n?0:n)):[]}function mr(t,n,e){var r=t?t.length:0;return r?((e?Qe(t,n,e):null==n)&&(n=1),n=r-(+n||0),Xn(t,0,0>n?0:n)):[]}function yr(t,n,e){return t&&t.length?ee(t,qe(n,e,3),!0,!0):[]}function $r(t,n,e){return t&&t.length?ee(t,qe(n,e,3),!0):[]}function xr(t,n,e,r){var i=t?t.length:0;return i?(e&&"number"!=typeof e&&Qe(t,n,e)&&(e=0,r=i),kn(t,n,e,r)):[]}function br(t){return t?t[0]:_}function wr(t,n,e){var r=t?t.length:0;return e&&Qe(t,n,e)&&(n=!1),r?Pn(t,n):[]}function _r(t){var n=t?t.length:0;return n?Pn(t,!0):[]}function Cr(t,n,e){var i=t?t.length:0;if(!i)return-1;if("number"==typeof e)e=0>e?wa(i+e,0):e;else if(e){var o=ie(t,n);return i>o&&(n===n?n===t[o]:t[o]!==t[o])?o:-1}return r(t,n,e||0)}function Sr(t){return mr(t,1)}function Mr(t){var n=t?t.length:0;return n?t[n-1]:_}function kr(t,n,e){var r=t?t.length:0;if(!r)return-1;var i=r;if("number"==typeof e)i=(0>e?wa(r+e,0):_a(e||0,r-1))+1;else if(e){i=ie(t,n,!0)-1;var o=t[i];return(n===n?n===o:o!==o)?i:-1}if(n!==n)return d(t,i,!0);for(;i--;)if(t[i]===n)return i;return-1}function Ar(){var t=arguments,n=t[0];if(!n||!n.length)return n;for(var e=0,r=Be(),i=t.length;++e<i;)for(var o=0,a=t[e];(o=r(n,a,o))>-1;)pa.call(n,o,1);return n}function Er(t,n,e){var r=[];if(!t||!t.length)return r;var i=-1,o=[],a=t.length;for(n=qe(n,e,3);++i<a;){var u=t[i];n(u,i,t)&&(r.push(u),o.push(i))}return Hn(t,o),r}function Pr(t){return gr(t,1)}function Or(t,n,e){var r=t?t.length:0;return r?(e&&"number"!=typeof e&&Qe(t,n,e)&&(n=0,e=r),Xn(t,n,e)):[]}function Tr(t,n,e){var r=t?t.length:0;return r?((e?Qe(t,n,e):null==n)&&(n=1),Xn(t,0,0>n?0:n)):[]}function jr(t,n,e){var r=t?t.length:0;return r?((e?Qe(t,n,e):null==n)&&(n=1),n=r-(+n||0),Xn(t,0>n?0:n)):[]}function Lr(t,n,e){return t&&t.length?ee(t,qe(n,e,3),!1,!0):[]}function Rr(t,n,e){return t&&t.length?ee(t,qe(n,e,3)):[]}function Nr(t,n,e,i){var o=t?t.length:0;if(!o)return[];null!=n&&"boolean"!=typeof n&&(i=e,e=Qe(t,n,i)?_:n,n=!1);var a=qe();return null==e&&a===bn||(e=a(e,i,3)),n&&Be()===r?y(t,e):te(t,e)}function Fr(t){if(!t||!t.length)return[];var n=-1,e=0;t=sn(t,function(t){return Je(t)?(e=wa(t.length,e),!0):void 0});for(var r=qo(e);++n<e;)r[n]=ln(t,Wn(n));return r}function Dr(t,n,e){var r=t?t.length:0;if(!r)return[];var i=Fr(t);return null==n?i:(n=ae(n,e,4),ln(i,function(t){return fn(t,n,_,!0)}))}function Ir(){for(var t=-1,n=arguments.length;++t<n;){var e=arguments[t];if(Je(e))var r=r?cn(Cn(r,e),Cn(e,r)):e}return r?te(r):[]}function zr(t,n){var e=-1,r=t?t.length:0,i={};for(!r||n||Eu(t[0])||(n=[]);++e<r;){var o=t[e];n?i[o]=n[e]:o&&(i[o[0]]=o[1])}return i}function qr(t){var n=g(t);return n.__chain__=!0,n}function Vr(t,n,e){return n.call(e,t),t}function Br(t,n,e){return n.call(e,t)}function Wr(){return qr(this)}function Ur(){return new Q(this.value(),this.__chain__)}function Hr(t){for(var n,e=this;e instanceof X;){var r=pr(e);n?i.__wrapped__=r:n=r;var i=r;e=e.__wrapped__}return i.__wrapped__=t,n}function Yr(){var t=this.__wrapped__,n=function(t){return t.reverse()};if(t instanceof nt){var e=t;return this.__actions__.length&&(e=new nt(this)),e=e.reverse(),e.__actions__.push({func:Br,args:[n],thisArg:_}),new Q(e,this.__chain__)}return this.thru(n)}function Gr(){return this.value()+""}function Xr(){return re(this.__wrapped__,this.__actions__)}function Zr(t,n,e){var r=Eu(t)?an:Sn;return e&&Qe(t,n,e)&&(n=_),"function"==typeof n&&e===_||(n=qe(n,e,3)),r(t,n)}function Jr(t,n,e){var r=Eu(t)?sn:An;return n=qe(n,e,3),r(t,n)}function Kr(t,n){return iu(t,zn(n))}function Qr(t,n,e,r){var i=t?Va(t):0;return er(i)||(t=oo(t),i=t.length),e="number"!=typeof e||r&&Qe(n,e,r)?0:0>e?wa(i+e,0):e||0,"string"==typeof t||!Eu(t)&&Vi(t)?i>=e&&t.indexOf(n,e)>-1:!!i&&Be(t,n,e)>-1}function ti(t,n,e){var r=Eu(t)?ln:In;return n=qe(n,e,3),r(t,n)}function ni(t,n){return ti(t,Lo(n))}function ei(t,n,e){var r=Eu(t)?sn:An;return n=qe(n,e,3),r(t,function(t,e,r){return!n(t,e,r)})}function ri(t,n,e){if(e?Qe(t,n,e):null==n){t=cr(t);var r=t.length;return r>0?t[Yn(0,r-1)]:_}var i=-1,o=Yi(t),r=o.length,a=r-1;for(n=_a(0>n?0:+n||0,r);++i<n;){var u=Yn(i,a),s=o[u];o[u]=o[i],o[i]=s}return o.length=n,o}function ii(t){return ri(t,Aa)}function oi(t){var n=t?Va(t):0;return er(n)?n:zu(t).length}function ai(t,n,e){var r=Eu(t)?pn:Zn;return e&&Qe(t,n,e)&&(n=_),"function"==typeof n&&e===_||(n=qe(n,e,3)),r(t,n)}function ui(t,n,e){if(null==t)return[];e&&Qe(t,n,e)&&(n=_);var r=-1;n=qe(n,e,3);var i=In(t,function(t,e,i){return{criteria:n(t,e,i),index:++r,value:t}});return Jn(i,s)}function si(t,n,e,r){return null==t?[]:(r&&Qe(n,e,r)&&(e=_),Eu(n)||(n=null==n?[]:[n]),Eu(e)||(e=null==e?[]:[e]),Kn(t,n,e))}function li(t,n){return Jr(t,zn(n))}function ci(t,n){if("function"!=typeof n){if("function"!=typeof t)throw new Zo(q);var e=t;t=n,n=e}return t=xa(t=+t)?t:0,function(){return--t<1?n.apply(this,arguments):void 0}}function fi(t,n,e){return e&&Qe(t,n,e)&&(n=_),n=t&&null==n?t.length:wa(+n||0,0),Fe(t,T,_,_,_,_,n)}function hi(t,n){var e;if("function"!=typeof n){if("function"!=typeof t)throw new Zo(q);var r=t;t=n,n=r}return function(){return--t>0&&(e=n.apply(this,arguments)),1>=t&&(n=_),e}}function pi(t,n,e){function r(){p&&ua(p),l&&ua(l),v=0,l=p=d=_}function i(n,e){e&&ua(e),l=p=d=_,n&&(v=vu(),c=t.apply(h,s),p||l||(s=h=_))}function o(){var t=n-(vu()-f);0>=t||t>n?i(d,l):p=ha(o,t)}function a(){i(m,p)}function u(){if(s=arguments,f=vu(),h=this,d=m&&(p||!y),g===!1)var e=y&&!p;else{l||y||(v=f);var r=g-(f-v),i=0>=r||r>g;i?(l&&(l=ua(l)),v=f,c=t.apply(h,s)):l||(l=ha(a,r))}return i&&p?p=ua(p):p||n===g||(p=ha(o,n)),e&&(i=!0,c=t.apply(h,s)),!i||p||l||(s=h=_),c}var s,l,c,f,h,p,d,v=0,g=!1,m=!0;if("function"!=typeof t)throw new Zo(q);if(n=0>n?0:+n||0,e===!0){var y=!0;m=!1}else Li(e)&&(y=!!e.leading,g="maxWait"in e&&wa(+e.maxWait||0,n),m="trailing"in e?!!e.trailing:m);return u.cancel=r,u}function di(t,n){if("function"!=typeof t||n&&"function"!=typeof n)throw new Zo(q);var e=function(){var r=arguments,i=n?n.apply(this,r):r[0],o=e.cache;if(o.has(i))return o.get(i);var a=t.apply(this,r);return e.cache=o.set(i,a),a};return e.cache=new di.Cache,e}function vi(t){if("function"!=typeof t)throw new Zo(q);return function(){return!t.apply(this,arguments)}}function gi(t){return hi(2,t)}function mi(t,n){if("function"!=typeof t)throw new Zo(q);return n=wa(n===_?t.length-1:+n||0,0),function(){for(var e=arguments,r=-1,i=wa(e.length-n,0),o=qo(i);++r<i;)o[r]=e[n+r];switch(n){case 0:return t.call(this,o);case 1:return t.call(this,e[0],o);case 2:return t.call(this,e[0],e[1],o)}var a=qo(n+1);for(r=-1;++r<n;)a[r]=e[r];return a[n]=o,t.apply(this,a)}}function yi(t){if("function"!=typeof t)throw new Zo(q);return function(n){return t.apply(this,n)}}function $i(t,n,e){var r=!0,i=!0;if("function"!=typeof t)throw new Zo(q);return e===!1?r=!1:Li(e)&&(r="leading"in e?!!e.leading:r,i="trailing"in e?!!e.trailing:i),pi(t,n,{leading:r,maxWait:+n,trailing:i})}function xi(t,n){return n=null==n?Ao:n,Fe(n,P,_,[t],[])}function bi(t,n,e,r){return n&&"boolean"!=typeof n&&Qe(t,n,e)?n=!1:"function"==typeof n&&(r=e,e=n,n=!1),"function"==typeof e?wn(t,n,ae(e,r,3)):wn(t,n)}function wi(t,n,e){return"function"==typeof n?wn(t,!0,ae(n,e,3)):wn(t,!0)}function _i(t,n){return t>n}function Ci(t,n){return t>=n}function Si(t){return v(t)&&Je(t)&&na.call(t,"callee")&&!ca.call(t,"callee")}function Mi(t){return t===!0||t===!1||v(t)&&ra.call(t)==U}function ki(t){return v(t)&&ra.call(t)==H}function Ai(t){return!!t&&1===t.nodeType&&v(t)&&!zi(t)}function Ei(t){return null==t?!0:Je(t)&&(Eu(t)||Vi(t)||Si(t)||v(t)&&ji(t.splice))?!t.length:!zu(t).length}function Pi(t,n,e,r){e="function"==typeof e?ae(e,r,3):_;var i=e?e(t,n):_;return i===_?Nn(t,n,e):!!i}function Oi(t){return v(t)&&"string"==typeof t.message&&ra.call(t)==Y}function Ti(t){return"number"==typeof t&&xa(t)}function ji(t){return Li(t)&&ra.call(t)==G}function Li(t){var n=typeof t;return!!t&&("object"==n||"function"==n)}function Ri(t,n,e,r){return e="function"==typeof e?ae(e,r,3):_,Dn(t,We(n),e)}function Ni(t){return Ii(t)&&t!=+t}function Fi(t){return null==t?!1:ji(t)?oa.test(ta.call(t)):v(t)&&Tt.test(t)}function Di(t){return null===t}function Ii(t){return"number"==typeof t||v(t)&&ra.call(t)==Z}function zi(t){var n;if(!v(t)||ra.call(t)!=J||Si(t)||!na.call(t,"constructor")&&(n=t.constructor,"function"==typeof n&&!(n instanceof n)))return!1;var e;return On(t,function(t,n){e=n}),e===_||na.call(t,e)}function qi(t){return Li(t)&&ra.call(t)==K}function Vi(t){return"string"==typeof t||v(t)&&ra.call(t)==tt}function Bi(t){return v(t)&&er(t.length)&&!!zt[ra.call(t)]}function Wi(t){return t===_}function Ui(t,n){return n>t}function Hi(t,n){return n>=t}function Yi(t){var n=t?Va(t):0;return er(n)?n?en(t):[]:oo(t)}function Gi(t){return xn(t,to(t))}function Xi(t,n,e){var r=Ra(t);return e&&Qe(t,n,e)&&(n=_),n?yn(r,n):r}function Zi(t){return Ln(t,to(t))}function Ji(t,n,e){var r=null==t?_:Rn(t,hr(n),n+"");return r===_?e:r}function Ki(t,n){if(null==t)return!1;var e=na.call(t,n);if(!e&&!tr(n)){if(n=hr(n),t=1==n.length?t:Rn(t,Xn(n,0,-1)),null==t)return!1;n=Mr(n),e=na.call(t,n)}return e||er(t.length)&&Ke(n,t.length)&&(Eu(t)||Si(t))}function Qi(t,n,e){e&&Qe(t,n,e)&&(n=_);for(var r=-1,i=zu(t),o=i.length,a={};++r<o;){var u=i[r],s=t[u];n?na.call(a,s)?a[s].push(u):a[s]=[u]:a[s]=u}return a}function to(t){if(null==t)return[];Li(t)||(t=Yo(t));var n=t.length;n=n&&er(n)&&(Eu(t)||Si(t))&&n||0;for(var e=t.constructor,r=-1,i="function"==typeof e&&e.prototype===t,o=qo(n),a=n>0;++r<n;)o[r]=r+"";for(var u in t)a&&Ke(u,n)||"constructor"==u&&(i||!na.call(t,u))||o.push(u);return o}function no(t){t=fr(t);for(var n=-1,e=zu(t),r=e.length,i=qo(r);++n<r;){var o=e[n];i[n]=[o,t[o]]}return i}function eo(t,n,e){var r=null==t?_:t[n];return r===_&&(null==t||tr(n,t)||(n=hr(n),t=1==n.length?t:Rn(t,Xn(n,0,-1)),r=null==t?_:t[Mr(n)]),r=r===_?e:r),ji(r)?r.call(t):r}function ro(t,n,e){if(null==t)return t;var r=n+"";n=null!=t[r]||tr(n,t)?[r]:hr(n);for(var i=-1,o=n.length,a=o-1,u=t;null!=u&&++i<o;){var s=n[i];Li(u)&&(i==a?u[s]=e:null==u[s]&&(u[s]=Ke(n[i+1])?[]:{})),u=u[s]}return t}function io(t,n,e,r){var i=Eu(t)||Bi(t);if(n=qe(n,r,4),null==e)if(i||Li(t)){var o=t.constructor;e=i?Eu(t)?new o:[]:Ra(ji(o)?o.prototype:_)}else e={};return(i?rn:Tn)(t,function(t,r,i){return n(e,t,r,i)}),e}function oo(t){return ne(t,zu(t))}function ao(t){return ne(t,to(t))}function uo(t,n,e){return n=+n||0,e===_?(e=n,n=0):e=+e||0,t>=_a(n,e)&&t<wa(n,e)}function so(t,n,e){e&&Qe(t,n,e)&&(n=e=_);var r=null==t,i=null==n;if(null==e&&(i&&"boolean"==typeof t?(e=t,t=1):"boolean"==typeof n&&(e=n,i=!0)),r&&i&&(n=1,i=!1),t=+t||0,i?(n=t,t=0):n=+n||0,e||t%1||n%1){var o=Ma();return _a(t+o*(n-t+sa("1e-"+((o+"").length-1))),n)}return Yn(t,n)}function lo(t){return t=o(t),t&&t.charAt(0).toUpperCase()+t.slice(1)}function co(t){return t=o(t),t&&t.replace(Lt,c).replace(kt,"")}function fo(t,n,e){t=o(t),n+="";var r=t.length;return e=e===_?r:_a(0>e?0:+e||0,r),e-=n.length,e>=0&&t.indexOf(n,e)==e}function ho(t){return t=o(t),t&&yt.test(t)?t.replace(gt,f):t}function po(t){return t=o(t),t&&Mt.test(t)?t.replace(St,h):t||"(?:)"}function vo(t,n,e){t=o(t),n=+n;var r=t.length;if(r>=n||!xa(n))return t;var i=(n-r)/2,a=ya(i),u=ga(i);return e=je("",u,e),e.slice(0,a)+t+e}function go(t,n,e){return(e?Qe(t,n,e):null==n)?n=0:n&&(n=+n),t=xo(t),Sa(t,n||(Ot.test(t)?16:10))}function mo(t,n){var e="";if(t=o(t),n=+n,1>n||!t||!xa(n))return e;do n%2&&(e+=t),n=ya(n/2),t+=t;while(n);return e}function yo(t,n,e){return t=o(t),e=null==e?0:_a(0>e?0:+e||0,t.length),t.lastIndexOf(n,e)==e}function $o(t,n,e){var r=g.templateSettings;e&&Qe(t,n,e)&&(n=e=_),t=o(t),n=mn(yn({},e||n),r,gn);var i,a,u=mn(yn({},n.imports),r.imports,gn),s=zu(u),l=ne(u,s),c=0,f=n.interpolate||Rt,h="__p += '",d=Go((n.escape||Rt).source+"|"+f.source+"|"+(f===bt?Et:Rt).source+"|"+(n.evaluate||Rt).source+"|$","g"),v="//# sourceURL="+("sourceURL"in n?n.sourceURL:"lodash.templateSources["+ ++It+"]")+"\n";t.replace(d,function(n,e,r,o,u,s){return r||(r=o),h+=t.slice(c,s).replace(Nt,p),e&&(i=!0,h+="' +\n__e("+e+") +\n'"),u&&(a=!0,h+="';\n"+u+";\n__p += '"),r&&(h+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),c=s+n.length,n}),h+="';\n";var m=n.variable;m||(h="with (obj) {\n"+h+"\n}\n"),h=(a?h.replace(ht,""):h).replace(pt,"$1").replace(dt,"$1;"),h="function("+(m||"obj")+") {\n"+(m?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(i?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+h+"return __p\n}";var y=Ju(function(){return Wo(s,v+"return "+h).apply(_,l)});if(y.source=h,Oi(y))throw y;return y}function xo(t,n,e){var r=t;return(t=o(t))?(e?Qe(r,n,e):null==n)?t.slice($(t),x(t)+1):(n+="",
-t.slice(a(t,n),u(t,n)+1)):t}function bo(t,n,e){var r=t;return t=o(t),t?(e?Qe(r,n,e):null==n)?t.slice($(t)):t.slice(a(t,n+"")):t}function wo(t,n,e){var r=t;return t=o(t),t?(e?Qe(r,n,e):null==n)?t.slice(0,x(t)+1):t.slice(0,u(t,n+"")+1):t}function _o(t,n,e){e&&Qe(t,n,e)&&(n=_);var r=L,i=R;if(null!=n)if(Li(n)){var a="separator"in n?n.separator:a;r="length"in n?+n.length||0:r,i="omission"in n?o(n.omission):i}else r=+n||0;if(t=o(t),r>=t.length)return t;var u=r-i.length;if(1>u)return i;var s=t.slice(0,u);if(null==a)return s+i;if(qi(a)){if(t.slice(u).search(a)){var l,c,f=t.slice(0,u);for(a.global||(a=Go(a.source,(Pt.exec(a)||"")+"g")),a.lastIndex=0;l=a.exec(f);)c=l.index;s=s.slice(0,null==c?u:c)}}else if(t.indexOf(a,u)!=u){var h=s.lastIndexOf(a);h>-1&&(s=s.slice(0,h))}return s+i}function Co(t){return t=o(t),t&&mt.test(t)?t.replace(vt,b):t}function So(t,n,e){return e&&Qe(t,n,e)&&(n=_),t=o(t),t.match(n||Ft)||[]}function Mo(t,n,e){return e&&Qe(t,n,e)&&(n=_),v(t)?Eo(t):bn(t,n)}function ko(t){return function(){return t}}function Ao(t){return t}function Eo(t){return zn(wn(t,!0))}function Po(t,n){return qn(t,wn(n,!0))}function Oo(t,n,e){if(null==e){var r=Li(n),i=r?zu(n):_,o=i&&i.length?Ln(n,i):_;(o?o.length:r)||(o=!1,e=n,n=t,t=this)}o||(o=Ln(n,zu(n)));var a=!0,u=-1,s=ji(t),l=o.length;e===!1?a=!1:Li(e)&&"chain"in e&&(a=e.chain);for(;++u<l;){var c=o[u],f=n[c];t[c]=f,s&&(t.prototype[c]=function(n){return function(){var e=this.__chain__;if(a||e){var r=t(this.__wrapped__),i=r.__actions__=en(this.__actions__);return i.push({func:n,args:arguments,thisArg:t}),r.__chain__=e,r}return n.apply(t,cn([this.value()],arguments))}}(f))}return t}function To(){return tn._=ia,this}function jo(){}function Lo(t){return tr(t)?Wn(t):Un(t)}function Ro(t){return function(n){return Rn(t,hr(n),n+"")}}function No(t,n,e){e&&Qe(t,n,e)&&(n=e=_),t=+t||0,e=null==e?1:+e||0,null==n?(n=t,t=0):n=+n||0;for(var r=-1,i=wa(ga((n-t)/(e||1)),0),o=qo(i);++r<i;)o[r]=t,t+=e;return o}function Fo(t,n,e){if(t=ya(t),1>t||!xa(t))return[];var r=-1,i=qo(_a(t,Ea));for(n=ae(n,e,1);++r<t;)Ea>r?i[r]=n(r):n(r);return i}function Do(t){var n=++ea;return o(t)+n}function Io(t,n){return(+t||0)+(+n||0)}function zo(t,n,e){return e&&Qe(t,n,e)&&(n=_),n=qe(n,e,3),1==n.length?dn(Eu(t)?t:cr(t),n):Qn(t,n)}t=t?nn.defaults(tn.Object(),t,nn.pick(tn,Dt)):tn;var qo=t.Array,Vo=t.Date,Bo=t.Error,Wo=t.Function,Uo=t.Math,Ho=t.Number,Yo=t.Object,Go=t.RegExp,Xo=t.String,Zo=t.TypeError,Jo=qo.prototype,Ko=Yo.prototype,Qo=Xo.prototype,ta=Wo.prototype.toString,na=Ko.hasOwnProperty,ea=0,ra=Ko.toString,ia=tn._,oa=Go("^"+ta.call(na).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),aa=t.ArrayBuffer,ua=t.clearTimeout,sa=t.parseFloat,la=Uo.pow,ca=Ko.propertyIsEnumerable,fa=Ue(t,"Set"),ha=t.setTimeout,pa=Jo.splice,da=t.Uint8Array,va=Ue(t,"WeakMap"),ga=Uo.ceil,ma=Ue(Yo,"create"),ya=Uo.floor,$a=Ue(qo,"isArray"),xa=t.isFinite,ba=Ue(Yo,"keys"),wa=Uo.max,_a=Uo.min,Ca=Ue(Vo,"now"),Sa=t.parseInt,Ma=Uo.random,ka=Ho.NEGATIVE_INFINITY,Aa=Ho.POSITIVE_INFINITY,Ea=4294967295,Pa=Ea-1,Oa=Ea>>>1,Ta=9007199254740991,ja=va&&new va,La={};g.support={};g.templateSettings={escape:$t,evaluate:xt,interpolate:bt,variable:"",imports:{_:g}};var Ra=function(){function t(){}return function(n){if(Li(n)){t.prototype=n;var e=new t;t.prototype=_}return e||{}}}(),Na=he(Tn),Fa=he(jn,!0),Da=pe(),Ia=pe(!0),za=ja?function(t,n){return ja.set(t,n),t}:Ao,qa=ja?function(t){return ja.get(t)}:jo,Va=Wn("length"),Ba=function(){var t=0,n=0;return function(e,r){var i=vu(),o=F-(i-n);if(n=i,o>0){if(++t>=N)return e}else t=0;return za(e,r)}}(),Wa=mi(function(t,n){return v(t)&&Je(t)?Cn(t,Pn(n,!1,!0)):[]}),Ua=we(),Ha=we(!0),Ya=mi(function(t){for(var n=t.length,e=n,i=qo(f),o=Be(),a=o===r,u=[];e--;){var s=t[e]=Je(s=t[e])?s:[];i[e]=a&&s.length>=120?ve(e&&s):null}var l=t[0],c=-1,f=l?l.length:0,h=i[0];t:for(;++c<f;)if(s=l[c],(h?Jt(h,s):o(u,s,0))<0){for(var e=n;--e;){var p=i[e];if((p?Jt(p,s):o(t[e],s,0))<0)continue t}h&&h.push(s),u.push(s)}return u}),Ga=mi(function(t,e){e=Pn(e);var r=$n(t,e);return Hn(t,e.sort(n)),r}),Xa=Ne(),Za=Ne(!0),Ja=mi(function(t){return te(Pn(t,!1,!0))}),Ka=mi(function(t,n){return Je(t)?Cn(t,n):[]}),Qa=mi(Fr),tu=mi(function(t){var n=t.length,e=n>2?t[n-2]:_,r=n>1?t[n-1]:_;return n>2&&"function"==typeof e?n-=2:(e=n>1&&"function"==typeof r?(--n,r):_,r=_),t.length=n,Dr(t,e,r)}),nu=mi(function(t){return t=Pn(t),this.thru(function(n){return Qt(Eu(n)?n:[fr(n)],t)})}),eu=mi(function(t,n){return $n(t,Pn(n))}),ru=ce(function(t,n,e){na.call(t,e)?++t[e]:t[e]=1}),iu=be(Na),ou=be(Fa,!0),au=Se(rn,Na),uu=Se(on,Fa),su=ce(function(t,n,e){na.call(t,e)?t[e].push(n):t[e]=[n]}),lu=ce(function(t,n,e){t[e]=n}),cu=mi(function(t,n,e){var r=-1,i="function"==typeof n,o=tr(n),a=Je(t)?qo(t.length):[];return Na(t,function(t){var u=i?n:o&&null!=t?t[n]:_;a[++r]=u?u.apply(t,e):Ze(t,n,e)}),a}),fu=ce(function(t,n,e){t[e?0:1].push(n)},function(){return[[],[]]}),hu=Oe(fn,Na),pu=Oe(hn,Fa),du=mi(function(t,n){if(null==t)return[];var e=n[2];return e&&Qe(n[0],n[1],e)&&(n.length=1),Kn(t,Pn(n),[])}),vu=Ca||function(){return(new Vo).getTime()},gu=mi(function(t,n,e){var r=S;if(e.length){var i=m(e,gu.placeholder);r|=P}return Fe(t,r,n,e,i)}),mu=mi(function(t,n){n=n.length?Pn(n):Zi(t);for(var e=-1,r=n.length;++e<r;){var i=n[e];t[i]=Fe(t[i],S,t)}return t}),yu=mi(function(t,n,e){var r=S|M;if(e.length){var i=m(e,yu.placeholder);r|=P}return Fe(n,r,t,e,i)}),$u=ye(A),xu=ye(E),bu=mi(function(t,n){return _n(t,1,n)}),wu=mi(function(t,n,e){return _n(t,n,e)}),_u=Ce(),Cu=Ce(!0),Su=mi(function(t,n){if(n=Pn(n),"function"!=typeof t||!an(n,i))throw new Zo(q);var e=n.length;return mi(function(r){for(var i=_a(r.length,e);i--;)r[i]=n[i](r[i]);return t.apply(this,r)})}),Mu=Pe(P),ku=Pe(O),Au=mi(function(t,n){return Fe(t,j,_,_,_,Pn(n))}),Eu=$a||function(t){return v(t)&&er(t.length)&&ra.call(t)==W},Pu=fe(Vn),Ou=fe(function(t,n,e){return e?mn(t,n,e):yn(t,n)}),Tu=$e(Ou,vn),ju=$e(Pu,or),Lu=_e(Tn),Ru=_e(jn),Nu=Me(Da),Fu=Me(Ia),Du=ke(Tn),Iu=ke(jn),zu=ba?function(t){var n=null==t?_:t.constructor;return"function"==typeof n&&n.prototype===t||"function"!=typeof t&&Je(t)?lr(t):Li(t)?ba(t):[]}:lr,qu=Ae(!0),Vu=Ae(),Bu=mi(function(t,n){if(null==t)return{};if("function"!=typeof n[0]){var n=ln(Pn(n),Xo);return ar(t,Cn(to(t),n))}var e=ae(n[0],n[1],3);return ur(t,function(t,n,r){return!e(t,n,r)})}),Wu=mi(function(t,n){return null==t?{}:"function"==typeof n[0]?ur(t,ae(n[0],n[1],3)):ar(t,Pn(n))}),Uu=ge(function(t,n,e){return n=n.toLowerCase(),t+(e?n.charAt(0).toUpperCase()+n.slice(1):n)}),Hu=ge(function(t,n,e){return t+(e?"-":"")+n.toLowerCase()}),Yu=Ee(),Gu=Ee(!0),Xu=ge(function(t,n,e){return t+(e?"_":"")+n.toLowerCase()}),Zu=ge(function(t,n,e){return t+(e?" ":"")+(n.charAt(0).toUpperCase()+n.slice(1))}),Ju=mi(function(t,n){try{return t.apply(_,n)}catch(e){return Oi(e)?e:new Bo(e)}}),Ku=mi(function(t,n){return function(e){return Ze(e,t,n)}}),Qu=mi(function(t,n){return function(e){return Ze(t,e,n)}}),ts=Re("ceil"),ns=Re("floor"),es=xe(_i,ka),rs=xe(Ui,Aa),is=Re("round");return g.prototype=X.prototype,Q.prototype=Ra(X.prototype),Q.prototype.constructor=Q,nt.prototype=Ra(X.prototype),nt.prototype.constructor=nt,Ut.prototype["delete"]=Ht,Ut.prototype.get=Yt,Ut.prototype.has=Gt,Ut.prototype.set=Xt,Zt.prototype.push=Kt,di.Cache=Ut,g.after=ci,g.ary=fi,g.assign=Ou,g.at=eu,g.before=hi,g.bind=gu,g.bindAll=mu,g.bindKey=yu,g.callback=Mo,g.chain=qr,g.chunk=dr,g.compact=vr,g.constant=ko,g.countBy=ru,g.create=Xi,g.curry=$u,g.curryRight=xu,g.debounce=pi,g.defaults=Tu,g.defaultsDeep=ju,g.defer=bu,g.delay=wu,g.difference=Wa,g.drop=gr,g.dropRight=mr,g.dropRightWhile=yr,g.dropWhile=$r,g.fill=xr,g.filter=Jr,g.flatten=wr,g.flattenDeep=_r,g.flow=_u,g.flowRight=Cu,g.forEach=au,g.forEachRight=uu,g.forIn=Nu,g.forInRight=Fu,g.forOwn=Du,g.forOwnRight=Iu,g.functions=Zi,g.groupBy=su,g.indexBy=lu,g.initial=Sr,g.intersection=Ya,g.invert=Qi,g.invoke=cu,g.keys=zu,g.keysIn=to,g.map=ti,g.mapKeys=qu,g.mapValues=Vu,g.matches=Eo,g.matchesProperty=Po,g.memoize=di,g.merge=Pu,g.method=Ku,g.methodOf=Qu,g.mixin=Oo,g.modArgs=Su,g.negate=vi,g.omit=Bu,g.once=gi,g.pairs=no,g.partial=Mu,g.partialRight=ku,g.partition=fu,g.pick=Wu,g.pluck=ni,g.property=Lo,g.propertyOf=Ro,g.pull=Ar,g.pullAt=Ga,g.range=No,g.rearg=Au,g.reject=ei,g.remove=Er,g.rest=Pr,g.restParam=mi,g.set=ro,g.shuffle=ii,g.slice=Or,g.sortBy=ui,g.sortByAll=du,g.sortByOrder=si,g.spread=yi,g.take=Tr,g.takeRight=jr,g.takeRightWhile=Lr,g.takeWhile=Rr,g.tap=Vr,g.throttle=$i,g.thru=Br,g.times=Fo,g.toArray=Yi,g.toPlainObject=Gi,g.transform=io,g.union=Ja,g.uniq=Nr,g.unzip=Fr,g.unzipWith=Dr,g.values=oo,g.valuesIn=ao,g.where=li,g.without=Ka,g.wrap=xi,g.xor=Ir,g.zip=Qa,g.zipObject=zr,g.zipWith=tu,g.backflow=Cu,g.collect=ti,g.compose=Cu,g.each=au,g.eachRight=uu,g.extend=Ou,g.iteratee=Mo,g.methods=Zi,g.object=zr,g.select=Jr,g.tail=Pr,g.unique=Nr,Oo(g,g),g.add=Io,g.attempt=Ju,g.camelCase=Uu,g.capitalize=lo,g.ceil=ts,g.clone=bi,g.cloneDeep=wi,g.deburr=co,g.endsWith=fo,g.escape=ho,g.escapeRegExp=po,g.every=Zr,g.find=iu,g.findIndex=Ua,g.findKey=Lu,g.findLast=ou,g.findLastIndex=Ha,g.findLastKey=Ru,g.findWhere=Kr,g.first=br,g.floor=ns,g.get=Ji,g.gt=_i,g.gte=Ci,g.has=Ki,g.identity=Ao,g.includes=Qr,g.indexOf=Cr,g.inRange=uo,g.isArguments=Si,g.isArray=Eu,g.isBoolean=Mi,g.isDate=ki,g.isElement=Ai,g.isEmpty=Ei,g.isEqual=Pi,g.isError=Oi,g.isFinite=Ti,g.isFunction=ji,g.isMatch=Ri,g.isNaN=Ni,g.isNative=Fi,g.isNull=Di,g.isNumber=Ii,g.isObject=Li,g.isPlainObject=zi,g.isRegExp=qi,g.isString=Vi,g.isTypedArray=Bi,g.isUndefined=Wi,g.kebabCase=Hu,g.last=Mr,g.lastIndexOf=kr,g.lt=Ui,g.lte=Hi,g.max=es,g.min=rs,g.noConflict=To,g.noop=jo,g.now=vu,g.pad=vo,g.padLeft=Yu,g.padRight=Gu,g.parseInt=go,g.random=so,g.reduce=hu,g.reduceRight=pu,g.repeat=mo,g.result=eo,g.round=is,g.runInContext=w,g.size=oi,g.snakeCase=Xu,g.some=ai,g.sortedIndex=Xa,g.sortedLastIndex=Za,g.startCase=Zu,g.startsWith=yo,g.sum=zo,g.template=$o,g.trim=xo,g.trimLeft=bo,g.trimRight=wo,g.trunc=_o,g.unescape=Co,g.uniqueId=Do,g.words=So,g.all=Zr,g.any=ai,g.contains=Qr,g.eq=Pi,g.detect=iu,g.foldl=hu,g.foldr=pu,g.head=br,g.include=Qr,g.inject=hu,Oo(g,function(){var t={};return Tn(g,function(n,e){g.prototype[e]||(t[e]=n)}),t}(),!1),g.sample=ri,g.prototype.sample=function(t){return this.__chain__||null!=t?this.thru(function(n){return ri(n,t)}):ri(this.value())},g.VERSION=C,rn(["bind","bindKey","curry","curryRight","partial","partialRight"],function(t){g[t].placeholder=g}),rn(["drop","take"],function(t,n){nt.prototype[t]=function(e){var r=this.__filtered__;if(r&&!n)return new nt(this);e=null==e?1:wa(ya(e)||0,0);var i=this.clone();return r?i.__takeCount__=_a(i.__takeCount__,e):i.__views__.push({size:e,type:t+(i.__dir__<0?"Right":"")}),i},nt.prototype[t+"Right"]=function(n){return this.reverse()[t](n).reverse()}}),rn(["filter","map","takeWhile"],function(t,n){var e=n+1,r=e!=z;nt.prototype[t]=function(t,n){var i=this.clone();return i.__iteratees__.push({iteratee:qe(t,n,1),type:e}),i.__filtered__=i.__filtered__||r,i}}),rn(["first","last"],function(t,n){var e="take"+(n?"Right":"");nt.prototype[t]=function(){return this[e](1).value()[0]}}),rn(["initial","rest"],function(t,n){var e="drop"+(n?"":"Right");nt.prototype[t]=function(){return this.__filtered__?new nt(this):this[e](1)}}),rn(["pluck","where"],function(t,n){var e=n?"filter":"map",r=n?zn:Lo;nt.prototype[t]=function(t){return this[e](r(t))}}),nt.prototype.compact=function(){return this.filter(Ao)},nt.prototype.reject=function(t,n){return t=qe(t,n,1),this.filter(function(n){return!t(n)})},nt.prototype.slice=function(t,n){t=null==t?0:+t||0;var e=this;return e.__filtered__&&(t>0||0>n)?new nt(e):(0>t?e=e.takeRight(-t):t&&(e=e.drop(t)),n!==_&&(n=+n||0,e=0>n?e.dropRight(-n):e.take(n-t)),e)},nt.prototype.takeRightWhile=function(t,n){return this.reverse().takeWhile(t,n).reverse()},nt.prototype.toArray=function(){return this.take(Aa)},Tn(nt.prototype,function(t,n){var e=/^(?:filter|map|reject)|While$/.test(n),r=/^(?:first|last)$/.test(n),i=g[r?"take"+("last"==n?"Right":""):n];i&&(g.prototype[n]=function(){var n=r?[1]:arguments,o=this.__chain__,a=this.__wrapped__,u=!!this.__actions__.length,s=a instanceof nt,l=n[0],c=s||Eu(a);c&&e&&"function"==typeof l&&1!=l.length&&(s=c=!1);var f=function(t){return r&&o?i(t,1)[0]:i.apply(_,cn([t],n))},h={func:Br,args:[f],thisArg:_},p=s&&!u;if(r&&!o)return p?(a=a.clone(),a.__actions__.push(h),t.call(a)):i.call(_,this.value())[0];if(!r&&c){a=p?a:new nt(this);var d=t.apply(a,n);return d.__actions__.push(h),new Q(d,o)}return this.thru(f)})}),rn(["join","pop","push","replace","shift","sort","splice","split","unshift"],function(t){var n=(/^(?:replace|split)$/.test(t)?Qo:Jo)[t],e=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",r=/^(?:join|pop|replace|shift)$/.test(t);g.prototype[t]=function(){var t=arguments;return r&&!this.__chain__?n.apply(this.value(),t):this[e](function(e){return n.apply(e,t)})}}),Tn(nt.prototype,function(t,n){var e=g[n];if(e){var r=e.name+"",i=La[r]||(La[r]=[]);i.push({name:n,func:e})}}),La[Te(_,M).name]=[{name:"wrapper",func:_}],nt.prototype.clone=Vt,nt.prototype.reverse=Bt,nt.prototype.value=Wt,g.prototype.chain=Wr,g.prototype.commit=Ur,g.prototype.concat=nu,g.prototype.plant=Hr,g.prototype.reverse=Yr,g.prototype.toString=Gr,g.prototype.run=g.prototype.toJSON=g.prototype.valueOf=g.prototype.value=Xr,g.prototype.collect=g.prototype.map,g.prototype.head=g.prototype.first,g.prototype.select=g.prototype.filter,g.prototype.tail=g.prototype.rest,g}var _,C="3.10.1",S=1,M=2,k=4,A=8,E=16,P=32,O=64,T=128,j=256,L=30,R="...",N=150,F=16,D=200,I=1,z=2,q="Expected a function",V="__lodash_placeholder__",B="[object Arguments]",W="[object Array]",U="[object Boolean]",H="[object Date]",Y="[object Error]",G="[object Function]",X="[object Map]",Z="[object Number]",J="[object Object]",K="[object RegExp]",Q="[object Set]",tt="[object String]",nt="[object WeakMap]",et="[object ArrayBuffer]",rt="[object Float32Array]",it="[object Float64Array]",ot="[object Int8Array]",at="[object Int16Array]",ut="[object Int32Array]",st="[object Uint8Array]",lt="[object Uint8ClampedArray]",ct="[object Uint16Array]",ft="[object Uint32Array]",ht=/\b__p \+= '';/g,pt=/\b(__p \+=) '' \+/g,dt=/(__e\(.*?\)|\b__t\)) \+\n'';/g,vt=/&(?:amp|lt|gt|quot|#39|#96);/g,gt=/[&<>"'`]/g,mt=RegExp(vt.source),yt=RegExp(gt.source),$t=/<%-([\s\S]+?)%>/g,xt=/<%([\s\S]+?)%>/g,bt=/<%=([\s\S]+?)%>/g,wt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\n\\]|\\.)*?\1)\]/,_t=/^\w*$/,Ct=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\n\\]|\\.)*?)\2)\]/g,St=/^[:!,]|[\\^$.*+?()[\]{}|\/]|(^[0-9a-fA-Fnrtuvx])|([\n\r\u2028\u2029])/g,Mt=RegExp(St.source),kt=/[\u0300-\u036f\ufe20-\ufe23]/g,At=/\\(\\)?/g,Et=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Pt=/\w*$/,Ot=/^0[xX]/,Tt=/^\[object .+?Constructor\]$/,jt=/^\d+$/,Lt=/[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g,Rt=/($^)/,Nt=/['\n\r\u2028\u2029\\]/g,Ft=function(){var t="[A-Z\\xc0-\\xd6\\xd8-\\xde]",n="[a-z\\xdf-\\xf6\\xf8-\\xff]+";return RegExp(t+"+(?="+t+n+")|"+t+"?"+n+"|"+t+"+|[0-9]+","g")}(),Dt=["Array","ArrayBuffer","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Math","Number","Object","RegExp","Set","String","_","clearTimeout","isFinite","parseFloat","parseInt","setTimeout","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap"],It=-1,zt={};zt[rt]=zt[it]=zt[ot]=zt[at]=zt[ut]=zt[st]=zt[lt]=zt[ct]=zt[ft]=!0,zt[B]=zt[W]=zt[et]=zt[U]=zt[H]=zt[Y]=zt[G]=zt[X]=zt[Z]=zt[J]=zt[K]=zt[Q]=zt[tt]=zt[nt]=!1;var qt={};qt[B]=qt[W]=qt[et]=qt[U]=qt[H]=qt[rt]=qt[it]=qt[ot]=qt[at]=qt[ut]=qt[Z]=qt[J]=qt[K]=qt[tt]=qt[st]=qt[lt]=qt[ct]=qt[ft]=!0,qt[Y]=qt[G]=qt[X]=qt[Q]=qt[nt]=!1;var Vt={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss"},Bt={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},Wt={"&":"&","<":"<",">":">",""":'"',"'":"'","`":"`"},Ut={"function":!0,object:!0},Ht={0:"x30",1:"x31",2:"x32",3:"x33",4:"x34",5:"x35",6:"x36",7:"x37",8:"x38",9:"x39",A:"x41",B:"x42",C:"x43",D:"x44",E:"x45",F:"x46",a:"x61",b:"x62",c:"x63",d:"x64",e:"x65",f:"x66",n:"x6e",r:"x72",t:"x74",u:"x75",v:"x76",x:"x78"},Yt={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Gt=Ut[typeof exports]&&exports&&!exports.nodeType&&exports,Xt=Ut[typeof module]&&module&&!module.nodeType&&module,Zt=Gt&&Xt&&"object"==typeof global&&global&&global.Object&&global,Jt=Ut[typeof self]&&self&&self.Object&&self,Kt=Ut[typeof window]&&window&&window.Object&&window,Qt=Xt&&Xt.exports===Gt&&Gt,tn=Zt||Kt!==(this&&this.window)&&Kt||Jt||this,nn=w();"function"==typeof define&&"object"==typeof define.amd&&define.amd?define(function(){return nn}):Gt&&Xt&&(Qt?(Xt.exports=nn)._=nn:Gt._=nn),t.constant("lodash",nn)}]),function(t,n,e){"use strict";function r(t,e,r){function i(t,r,i){var a,u;i=i||{},u=i.expires,a=n.isDefined(i.path)?i.path:o,n.isUndefined(r)&&(u="Thu, 01 Jan 1970 00:00:00 GMT",r=""),n.isString(u)&&(u=new Date(u));var s=encodeURIComponent(t)+"="+encodeURIComponent(r);s+=a?";path="+a:"",s+=i.domain?";domain="+i.domain:"",s+=u?";expires="+u.toUTCString():"",s+=i.secure?";secure":"";var l=s.length+1;return l>4096&&e.warn("Cookie '"+t+"' possibly not set or overflowed because it was too large ("+l+" > 4096 bytes)!"),s}var o=r.baseHref(),a=t[0];return function(t,n,e){a.cookie=i(t,n,e)}}n.module("ngCookies",["ng"]).provider("$cookies",[function(){function t(t){return t?n.extend({},r,t):r}var r=this.defaults={};this.$get=["$$cookieReader","$$cookieWriter",function(r,i){return{get:function(t){return r()[t]},getObject:function(t){var e=this.get(t);return e?n.fromJson(e):e},getAll:function(){return r()},put:function(n,e,r){i(n,e,t(r))},putObject:function(t,e,r){this.put(t,n.toJson(e),r)},remove:function(n,r){i(n,e,t(r))}}}]}]),n.module("ngCookies").factory("$cookieStore",["$cookies",function(t){return{get:function(n){return t.getObject(n)},put:function(n,e){t.putObject(n,e)},remove:function(n){t.remove(n)}}}]),r.$inject=["$document","$log","$browser"],n.module("ngCookies").provider("$$cookieWriter",function(){this.$get=r})}(window,window.angular),function(t,n,e){"use strict";function r(t,n,e){if(!t)throw ngMinErr("areq","Argument '{0}' is {1}",n||"?",e||"required");return t}function i(t,n){return t||n?t?n?(V(t)&&(t=t.join(" ")),V(n)&&(n=n.join(" ")),t+" "+n):t:n:""}function o(t){var n={};return t&&(t.to||t.from)&&(n.to=t.to,n.from=t.from),n}function a(t,n,e){var r="";return t=V(t)?t:t&&B(t)&&t.length?t.split(/\s+/):[],q(t,function(t,i){t&&t.length>0&&(r+=i>0?" ":"",r+=e?n+t:t+n)}),r}function u(t,n){var e=t.indexOf(n);n>=0&&t.splice(e,1)}function s(t){if(t instanceof z)switch(t.length){case 0:return[];case 1:if(t[0].nodeType===X)return t;break;default:return z(l(t))}return t.nodeType===X?z(t):void 0}function l(t){if(!t[0])return t;for(var n=0;n<t.length;n++){var e=t[n];if(e.nodeType==X)return e}}function c(t,n,e){q(n,function(n){t.addClass(n,e)})}function f(t,n,e){q(n,function(n){t.removeClass(n,e)})}function h(t){return function(n,e){e.addClass&&(c(t,n,e.addClass),e.addClass=null),e.removeClass&&(f(t,n,e.removeClass),e.removeClass=null)}}function p(t){if(t=t||{},!t.$$prepared){var n=t.domOperation||D;t.domOperation=function(){t.$$domOperationFired=!0,n(),n=D},t.$$prepared=!0}return t}function d(t,n){v(t,n),g(t,n)}function v(t,n){n.from&&(t.css(n.from),n.from=null)}function g(t,n){n.to&&(t.css(n.to),n.to=null)}function m(t,n,e){var r=(n.addClass||"")+" "+(e.addClass||""),i=(n.removeClass||"")+" "+(e.removeClass||""),o=y(t.attr("class"),r,i);e.preparationClasses&&(n.preparationClasses=S(e.preparationClasses,n.preparationClasses),delete e.preparationClasses);var a=n.domOperation!==D?n.domOperation:null;return I(n,e),a&&(n.domOperation=a),o.addClass?n.addClass=o.addClass:n.addClass=null,o.removeClass?n.removeClass=o.removeClass:n.removeClass=null,n}function y(t,n,e){function r(t){B(t)&&(t=t.split(" "));var n={};return q(t,function(t){t.length&&(n[t]=!0)}),n}var i=1,o=-1,a={};t=r(t),n=r(n),q(n,function(t,n){a[n]=i}),e=r(e),q(e,function(t,n){a[n]=a[n]===i?null:o});var u={addClass:"",removeClass:""};return q(a,function(n,e){var r,a;n===i?(r="addClass",a=!t[e]):n===o&&(r="removeClass",a=t[e]),a&&(u[r].length&&(u[r]+=" "),u[r]+=e)}),u}function $(t){return t instanceof n.element?t[0]:t}function x(t,n,e){var r="";n&&(r=a(n,K,!0)),e.addClass&&(r=S(r,a(e.addClass,Z))),e.removeClass&&(r=S(r,a(e.removeClass,J))),r.length&&(e.preparationClasses=r,t.addClass(r))}function b(t,n){n.preparationClasses&&(t.removeClass(n.preparationClasses),n.preparationClasses=null),n.activeClasses&&(t.removeClass(n.activeClasses),n.activeClasses=null)}function w(t,n){var e=n?"-"+n+"s":"";return C(t,[ht,e]),[ht,e]}function _(t,n){var e=n?"paused":"",r=N+st;return C(t,[r,e]),[r,e]}function C(t,n){var e=n[0],r=n[1];t.style[e]=r}function S(t,n){return t?n?t+" "+n:t:n}function M(t){return[ft,t+"s"]}function k(t,n){var e=n?ct:ht;return[e,t+"s"]}function A(t,n,e){var r=Object.create(null),i=t.getComputedStyle(n)||{};return q(e,function(t,n){var e=i[t];if(e){var o=e.charAt(0);("-"===o||"+"===o||o>=0)&&(e=E(e)),0===e&&(e=null),r[n]=e}}),r}function E(t){var n=0,e=t.split(/\s*,\s*/);return q(e,function(t){"s"==t.charAt(t.length-1)&&(t=t.substring(0,t.length-1)),t=parseFloat(t)||0,n=n?Math.max(t,n):t}),n}function P(t){return 0===t||null!=t}function O(t,n){var e=L,r=t+"s";return n?e+=rt:r+=" linear all",[e,r]}function T(){var t=Object.create(null);return{flush:function(){t=Object.create(null)},count:function(n){var e=t[n];return e?e.total:0},get:function(n){var e=t[n];return e&&e.value},put:function(n,e){t[n]?t[n].total++:t[n]={total:1,value:e}}}}function j(t,n,e){q(e,function(e){t[e]=H(t[e])?t[e]:n.style.getPropertyValue(e)})}var L,R,N,F,D=n.noop,I=n.extend,z=n.element,q=n.forEach,V=n.isArray,B=n.isString,W=n.isObject,U=n.isUndefined,H=n.isDefined,Y=n.isFunction,G=n.isElement,X=1,Z="-add",J="-remove",K="ng-",Q="-active",tt="ng-animate",nt="$$ngAnimateChildren",et="";U(t.ontransitionend)&&H(t.onwebkittransitionend)?(et="-webkit-",L="WebkitTransition",R="webkitTransitionEnd transitionend"):(L="transition",R="transitionend"),U(t.onanimationend)&&H(t.onwebkitanimationend)?(et="-webkit-",N="WebkitAnimation",F="webkitAnimationEnd animationend"):(N="animation",F="animationend");var rt="Duration",it="Property",ot="Delay",at="TimingFunction",ut="IterationCount",st="PlayState",lt=9999,ct=N+ot,ft=N+rt,ht=L+ot,pt=L+rt,dt=["$$rAF",function(t){function n(t){r=r.concat(t),e()}function e(){if(r.length){for(var n=r.shift(),o=0;o<n.length;o++)n[o]();i||t(function(){i||e()})}}var r,i;return r=n.queue=[],n.waitUntilQuiet=function(n){i&&i(),i=t(function(){i=null,n(),e()})},n}],vt=[function(){return function(t,e,r){var i=r.ngAnimateChildren;n.isString(i)&&0===i.length?e.data(nt,!0):r.$observe("ngAnimateChildren",function(t){t="on"===t||"true"===t,e.data(nt,t)})}}],gt="$$animateCss",mt=1e3,yt=3,$t=1.5,xt={transitionDuration:pt,transitionDelay:ht,transitionProperty:L+it,animationDuration:ft,animationDelay:ct,animationIterationCount:N+ut},bt={transitionDuration:pt,transitionDelay:ht,animationDuration:ft,animationDelay:ct},wt=["$animateProvider",function(t){var n=T(),e=T();this.$get=["$window","$$jqLite","$$AnimateRunner","$timeout","$$forceReflow","$sniffer","$$rAFScheduler","$animate",function(t,r,i,s,l,c,f,m){function y(t,n){var e="$$ngAnimateParentKey",r=t.parentNode,i=r[e]||(r[e]=++I);return i+"-"+t.getAttribute("class")+"-"+n}function x(e,r,i,o){var a=n.get(i);return a||(a=A(t,e,o),"infinite"===a.animationIterationCount&&(a.animationIterationCount=1)),n.put(i,a),a}function b(i,o,u,s){var l;if(n.count(u)>0&&(l=e.get(u),!l)){var c=a(o,"-stagger");r.addClass(i,c),l=A(t,i,s),l.animationDuration=Math.max(l.animationDuration,0),l.transitionDuration=Math.max(l.transitionDuration,0),r.removeClass(i,c),e.put(u,l)}return l||{}}function S(t){z.push(t),f.waitUntilQuiet(function(){n.flush(),e.flush();for(var t=l(),r=0;r<z.length;r++)z[r](t);z.length=0})}function E(t,n,e){var r=x(t,n,e,xt),i=r.animationDelay,o=r.transitionDelay;return r.maxDelay=i&&o?Math.max(i,o):i||o,r.maxDuration=Math.max(r.animationDuration*r.animationIterationCount,r.transitionDuration),r}var T=h(r),I=0,z=[];return function(t,e){function l(){h()}function f(){h(!0)}function h(n){W||H&&U||(W=!0,U=!1,e.$$skipPreparationClasses||r.removeClass(t,pt),r.removeClass(t,vt),_(B,!1),w(B,!1),q(rt,function(t){B.style[t[0]]=""}),T(t,e),d(t,e),Object.keys(z).length&&q(z,function(t,n){t?B.style.setProperty(n,t):B.style.removeProperty(n)}),e.onDone&&e.onDone(),Y&&Y.complete(!n))}function x(t){Lt.blockTransition&&w(B,t),Lt.blockKeyframeAnimation&&_(B,!!t)}function A(){return Y=new i({end:l,cancel:f}),S(D),h(),{$$willAnimate:!1,start:function(){return Y},end:l}}function I(){function n(){if(!W){if(x(!1),q(rt,function(t){var n=t[0],e=t[1];B.style[n]=e}),T(t,e),r.addClass(t,vt),Lt.recalculateTimingStyles){if(dt=B.className+" "+pt,_t=y(B,dt),Tt=E(B,dt,_t),jt=Tt.maxDelay,X=Math.max(jt,0),nt=Tt.maxDuration,0===nt)return void h();Lt.hasTransitions=Tt.transitionDuration>0,Lt.hasAnimations=Tt.animationDuration>0}if(Lt.applyAnimationDelay&&(jt="boolean"!=typeof e.delay&&P(e.delay)?parseFloat(e.delay):jt,X=Math.max(jt,0),Tt.animationDelay=jt,Rt=k(jt,!0),rt.push(Rt),B.style[Rt[0]]=Rt[1]),tt=X*mt,et=nt*mt,e.easing){var n,u=e.easing;Lt.hasTransitions&&(n=L+at,rt.push([n,u]),B.style[n]=u),Lt.hasAnimations&&(n=N+at,rt.push([n,u]),B.style[n]=u)}Tt.transitionDuration&&l.push(R),Tt.animationDuration&&l.push(F),a=Date.now();var c=tt+$t*et,f=a+c,p=t.data(gt)||[],d=!0;if(p.length){var v=p[0];d=f>v.expectedEndTime,d?s.cancel(v.timer):p.push(h)}if(d){var m=s(i,c,!1);p[0]={timer:m,expectedEndTime:f},p.push(h),t.data(gt,p)}t.on(l.join(" "),o),e.to&&(e.cleanupStyles&&j(z,B,Object.keys(e.to)),g(t,e))}}function i(){var n=t.data(gt);if(n){for(var e=1;e<n.length;e++)n[e]();t.removeData(gt)}}function o(t){t.stopPropagation();var n=t.originalEvent||t,e=n.$manualTimeStamp||n.timeStamp||Date.now(),r=parseFloat(n.elapsedTime.toFixed(yt));Math.max(e-a,0)>=tt&&r>=nt&&(H=!0,h())}if(!W){if(!B.parentNode)return void h();var a,l=[],c=function(t){if(H)U&&t&&(U=!1,h());else if(U=!t,Tt.animationDuration){var n=_(B,U);U?rt.push(n):u(rt,n)}},f=Pt>0&&(Tt.transitionDuration&&0===Ct.transitionDuration||Tt.animationDuration&&0===Ct.animationDuration)&&Math.max(Ct.animationDelay,Ct.transitionDelay);f?s(n,Math.floor(f*Pt*mt),!1):n(),G.resume=function(){c(!0)},G.pause=function(){c(!1)}}}var z={},B=$(t);if(!B||!B.parentNode||!m.enabled())return A();e=p(e);var W,U,H,Y,G,X,tt,nt,et,rt=[],ot=t.attr("class"),ut=o(e);if(0===e.duration||!c.animations&&!c.transitions)return A();var st=e.event&&V(e.event)?e.event.join(" "):e.event,ct=st&&e.structural,ft="",ht="";ct?ft=a(st,K,!0):st&&(ft=st),e.addClass&&(ht+=a(e.addClass,Z)),e.removeClass&&(ht.length&&(ht+=" "),ht+=a(e.removeClass,J)),e.applyClassesEarly&&ht.length&&T(t,e);var pt=[ft,ht].join(" ").trim(),dt=ot+" "+pt,vt=a(pt,Q),xt=ut.to&&Object.keys(ut.to).length>0,wt=(e.keyframeStyle||"").length>0;if(!wt&&!xt&&!pt)return A();var _t,Ct;if(e.stagger>0){var St=parseFloat(e.stagger);Ct={transitionDelay:St,animationDelay:St,transitionDuration:0,animationDuration:0}}else _t=y(B,dt),Ct=b(B,pt,_t,bt);e.$$skipPreparationClasses||r.addClass(t,pt);var Mt;if(e.transitionStyle){var kt=[L,e.transitionStyle];C(B,kt),rt.push(kt)}if(e.duration>=0){Mt=B.style[L].length>0;var At=O(e.duration,Mt);C(B,At),rt.push(At)}if(e.keyframeStyle){var Et=[N,e.keyframeStyle];C(B,Et),rt.push(Et)}var Pt=Ct?e.staggerIndex>=0?e.staggerIndex:n.count(_t):0,Ot=0===Pt;Ot&&!e.skipBlocking&&w(B,lt);var Tt=E(B,dt,_t),jt=Tt.maxDelay;X=Math.max(jt,0),nt=Tt.maxDuration;var Lt={};if(Lt.hasTransitions=Tt.transitionDuration>0,Lt.hasAnimations=Tt.animationDuration>0,Lt.hasTransitionAll=Lt.hasTransitions&&"all"==Tt.transitionProperty,Lt.applyTransitionDuration=xt&&(Lt.hasTransitions&&!Lt.hasTransitionAll||Lt.hasAnimations&&!Lt.hasTransitions),Lt.applyAnimationDuration=e.duration&&Lt.hasAnimations,Lt.applyTransitionDelay=P(e.delay)&&(Lt.applyTransitionDuration||Lt.hasTransitions),Lt.applyAnimationDelay=P(e.delay)&&Lt.hasAnimations,Lt.recalculateTimingStyles=ht.length>0,(Lt.applyTransitionDuration||Lt.applyAnimationDuration)&&(nt=e.duration?parseFloat(e.duration):nt,Lt.applyTransitionDuration&&(Lt.hasTransitions=!0,Tt.transitionDuration=nt,Mt=B.style[L+it].length>0,rt.push(O(nt,Mt))),Lt.applyAnimationDuration&&(Lt.hasAnimations=!0,Tt.animationDuration=nt,rt.push(M(nt)))),0===nt&&!Lt.recalculateTimingStyles)return A();if(null!=e.delay){var Rt=parseFloat(e.delay);Lt.applyTransitionDelay&&rt.push(k(Rt)),Lt.applyAnimationDelay&&rt.push(k(Rt,!0))}return null==e.duration&&Tt.transitionDuration>0&&(Lt.recalculateTimingStyles=Lt.recalculateTimingStyles||Ot),tt=X*mt,et=nt*mt,e.skipBlocking||(Lt.blockTransition=Tt.transitionDuration>0,Lt.blockKeyframeAnimation=Tt.animationDuration>0&&Ct.animationDelay>0&&0===Ct.animationDuration),e.from&&(e.cleanupStyles&&j(z,B,Object.keys(e.from)),v(t,e)),Lt.blockTransition||Lt.blockKeyframeAnimation?x(nt):e.skipBlocking||w(B,!1),{$$willAnimate:!0,end:l,start:function(){return W?void 0:(G={end:l,cancel:f,resume:null,pause:null},Y=new i(G),S(I),Y)}}}}]}],_t=["$$animationProvider",function(t){function n(t){return t.parentNode&&11===t.parentNode.nodeType}t.drivers.push("$$animateCssDriver");var e="ng-animate-shim",r="ng-anchor",i="ng-anchor-out",o="ng-anchor-in";this.$get=["$animateCss","$rootScope","$$AnimateRunner","$rootElement","$sniffer","$$jqLite","$document",function(t,a,u,s,l,c,f){function p(t){return t.replace(/\bng-\S+\b/g,"")}function d(t,n){return B(t)&&(t=t.split(" ")),B(n)&&(n=n.split(" ")),t.filter(function(t){return-1===n.indexOf(t)}).join(" ")}function v(n,a,s){function l(t){var n={},e=$(t).getBoundingClientRect();return q(["width","height","top","left"],function(t){var r=e[t];switch(t){case"top":r+=y.scrollTop;break;case"left":r+=y.scrollLeft}n[t]=Math.floor(r)+"px"}),n}function c(){var n=t(g,{addClass:i,delay:!0,from:l(a)});return n.$$willAnimate?n:null}function f(t){return t.attr("class")||""}function h(){var n=p(f(s)),e=d(n,m),r=d(m,n),a=t(g,{to:l(s),addClass:o+" "+e,removeClass:i+" "+r,delay:!0});return a.$$willAnimate?a:null}function v(){g.remove(),a.removeClass(e),s.removeClass(e)}var g=z($(a).cloneNode(!0)),m=p(f(g));a.addClass(e),s.addClass(e),g.addClass(r),b.append(g);var x,w=c();if(!w&&(x=h(),!x))return v();var _=w||x;return{start:function(){function t(){e&&e.end()}var n,e=_.start();return e.done(function(){return e=null,!x&&(x=h())?(e=x.start(),e.done(function(){e=null,v(),n.complete()}),e):(v(),void n.complete())}),n=new u({end:t,cancel:t})}}}function g(t,n,e,r){var i=m(t,D),o=m(n,D),a=[];return q(r,function(t){var n=t.out,r=t["in"],i=v(e,n,r);i&&a.push(i)}),i||o||0!==a.length?{start:function(){function t(){q(n,function(t){t.end()})}var n=[];i&&n.push(i.start()),o&&n.push(o.start()),q(a,function(t){n.push(t.start())});var e=new u({end:t,cancel:t});return u.all(n,function(t){e.complete(t)}),e}}:void 0}function m(n){var e=n.element,r=n.options||{};n.structural&&(r.event=n.event,r.structural=!0,r.applyClassesEarly=!0,"leave"===n.event&&(r.onDone=r.domOperation)),r.preparationClasses&&(r.event=S(r.event,r.preparationClasses));var i=t(e,r);return i.$$willAnimate?i:null}if(!l.animations&&!l.transitions)return D;var y=f[0].body,x=$(s),b=z(n(x)||y.contains(x)?x:y);h(c);return function(t){return t.from&&t.to?g(t.from,t.to,t.classes,t.anchors):m(t)}}]}],Ct=["$animateProvider",function(t){this.$get=["$injector","$$AnimateRunner","$$jqLite",function(n,e,r){function i(e){e=V(e)?e:e.split(" ");for(var r=[],i={},o=0;o<e.length;o++){
-var a=e[o],u=t.$$registeredAnimations[a];u&&!i[a]&&(r.push(n.get(u)),i[a]=!0)}return r}var o=h(r);return function(t,n,r,a){function u(){a.domOperation(),o(t,a)}function s(t,n,r,i,o){var a;switch(r){case"animate":a=[n,i.from,i.to,o];break;case"setClass":a=[n,v,g,o];break;case"addClass":a=[n,v,o];break;case"removeClass":a=[n,g,o];break;default:a=[n,o]}a.push(i);var u=t.apply(t,a);if(u)if(Y(u.start)&&(u=u.start()),u instanceof e)u.done(o);else if(Y(u))return u;return D}function l(t,n,r,i,o){var a=[];return q(i,function(i){var u=i[o];u&&a.push(function(){var i,o,a=!1,l=function(t){a||(a=!0,(o||D)(t),i.complete(!t))};return i=new e({end:function(){l()},cancel:function(){l(!0)}}),o=s(u,t,n,r,function(t){var n=t===!1;l(n)}),i})}),a}function c(t,n,r,i,o){var a=l(t,n,r,i,o);if(0===a.length){var u,s;"beforeSetClass"===o?(u=l(t,"removeClass",r,i,"beforeRemoveClass"),s=l(t,"addClass",r,i,"beforeAddClass")):"setClass"===o&&(u=l(t,"removeClass",r,i,"removeClass"),s=l(t,"addClass",r,i,"addClass")),u&&(a=a.concat(u)),s&&(a=a.concat(s))}if(0!==a.length)return function(t){var n=[];return a.length&&q(a,function(t){n.push(t())}),n.length?e.all(n,t):t(),function(t){q(n,function(n){t?n.cancel():n.end()})}}}3===arguments.length&&W(r)&&(a=r,r=null),a=p(a),r||(r=t.attr("class")||"",a.addClass&&(r+=" "+a.addClass),a.removeClass&&(r+=" "+a.removeClass));var f,h,v=a.addClass,g=a.removeClass,m=i(r);if(m.length){var y,$;"leave"==n?($="leave",y="afterLeave"):($="before"+n.charAt(0).toUpperCase()+n.substr(1),y=n),"enter"!==n&&"move"!==n&&(f=c(t,n,a,m,$)),h=c(t,n,a,m,y)}return f||h?{start:function(){function n(n){s=!0,u(),d(t,a),l.complete(n)}function r(t){s||((i||D)(t),n(t))}var i,o=[];f&&o.push(function(t){i=f(t)}),o.length?o.push(function(t){u(),t(!0)}):u(),h&&o.push(function(t){i=h(t)});var s=!1,l=new e({end:function(){r()},cancel:function(){r(!0)}});return e.chain(o,n),l}}:void 0}}]}],St=["$$animationProvider",function(t){t.drivers.push("$$animateJsDriver"),this.$get=["$$animateJs","$$AnimateRunner",function(t,n){function e(n){var e=n.element,r=n.event,i=n.options,o=n.classes;return t(e,r,o,i)}return function(t){if(t.from&&t.to){var r=e(t.from),i=e(t.to);if(!r&&!i)return;return{start:function(){function t(){return function(){q(o,function(t){t.end()})}}function e(t){a.complete(t)}var o=[];r&&o.push(r.start()),i&&o.push(i.start()),n.all(o,e);var a=new n({end:t(),cancel:t()});return a}}}return e(t)}}]}],Mt="data-ng-animate",kt="$ngAnimatePin",At=["$animateProvider",function(t){function n(t,n,e,r){return a[t].some(function(t){return t(n,e,r)})}function e(t,n){t=t||{};var e=(t.addClass||"").length>0,r=(t.removeClass||"").length>0;return n?e&&r:e||r}var i=1,o=2,a=this.rules={skip:[],cancel:[],join:[]};a.join.push(function(t,n,r){return!n.structural&&e(n.options)}),a.skip.push(function(t,n,r){return!n.structural&&!e(n.options)}),a.skip.push(function(t,n,e){return"leave"==e.event&&n.structural}),a.skip.push(function(t,n,e){return e.structural&&e.state===o&&!n.structural}),a.cancel.push(function(t,n,e){return e.structural&&n.structural}),a.cancel.push(function(t,n,e){return e.state===o&&n.structural}),a.cancel.push(function(t,n,e){var r=n.options,i=e.options;return r.addClass&&r.addClass===i.removeClass||r.removeClass&&r.removeClass===i.addClass}),this.$get=["$$rAF","$rootScope","$rootElement","$document","$$HashMap","$$animation","$$AnimateRunner","$templateRequest","$$jqLite","$$forceReflow",function(a,u,c,f,v,g,y,w,_,C){function S(){var t=!1;return function(n){t?n():u.$$postDigest(function(){t=!0,n()})}}function M(t,n){return m(t,n,{})}function k(t,n){var e=$(t),r=[],i=D[n];return i&&q(i,function(t){t.node.contains(e)&&r.push(t.callback)}),r}function A(t,r,l){function c(n,e,r,i){_(function(){var n=k(t,e);n.length&&a(function(){q(n,function(n){n(t,r,i)})})}),n.progress(e,r,i)}function f(n){b(t,l),J(t,l),d(t,l),l.domOperation(),w.complete(!n)}var h,v;t=s(t),t&&(h=$(t),v=t.parent()),l=p(l);var w=new y,_=S();if(V(l.addClass)&&(l.addClass=l.addClass.join(" ")),l.addClass&&!B(l.addClass)&&(l.addClass=null),V(l.removeClass)&&(l.removeClass=l.removeClass.join(" ")),l.removeClass&&!B(l.removeClass)&&(l.removeClass=null),l.from&&!W(l.from)&&(l.from=null),l.to&&!W(l.to)&&(l.to=null),!h)return f(),w;var C=[h.className,l.addClass,l.removeClass].join(" ");if(!Z(C))return f(),w;var A=["enter","move","leave"].indexOf(r)>=0,O=!N||R.get(h),F=!O&&L.get(h)||{},D=!!F.state;if(O||D&&F.state==i||(O=!T(t,v,r)),O)return f(),w;A&&E(t);var I={structural:A,element:t,event:r,close:f,options:l,runner:w};if(D){var z=n("skip",t,I,F);if(z)return F.state===o?(f(),w):(m(t,F.options,l),F.runner);var U=n("cancel",t,I,F);if(U)if(F.state===o)F.runner.end();else{if(!F.structural)return m(t,F.options,I.options),F.runner;F.close()}else{var H=n("join",t,I,F);if(H){if(F.state!==o)return x(t,A?r:null,l),r=I.event=F.event,l=m(t,F.options,I.options),F.runner;M(t,l)}}}else M(t,l);var Y=I.structural;if(Y||(Y="animate"===I.event&&Object.keys(I.options.to||{}).length>0||e(I.options)),!Y)return f(),P(t),w;var G=(F.counter||0)+1;return I.counter=G,j(t,i,I),u.$$postDigest(function(){var n=L.get(h),i=!n;n=n||{};var a=t.parent()||[],u=a.length>0&&("animate"===n.event||n.structural||e(n.options));if(i||n.counter!==G||!u)return i&&(J(t,l),d(t,l)),(i||A&&n.event!==r)&&(l.domOperation(),w.end()),void(u||P(t));r=!n.structural&&e(n.options,!0)?"setClass":n.event,j(t,o);var s=g(t,r,n.options);s.done(function(n){f(!n);var e=L.get(h);e&&e.counter===G&&P($(t)),c(w,r,"close",{})}),w.setHost(s),c(w,r,"start",{})}),w}function E(t){var n=$(t),e=n.querySelectorAll("["+Mt+"]");q(e,function(t){var n=parseInt(t.getAttribute(Mt)),e=L.get(t);switch(n){case o:e.runner.end();case i:e&&L.remove(t)}})}function P(t){var n=$(t);n.removeAttribute(Mt),L.remove(n)}function O(t,n){return $(t)===$(n)}function T(t,n,e){var r,i=z(f[0].body),o=O(t,i)||"HTML"===t[0].nodeName,a=O(t,c),u=!1,s=t.data(kt);for(s&&(n=s);n&&n.length;){a||(a=O(n,c));var l=n[0];if(l.nodeType!==X)break;var h=L.get(l)||{};if(u||(u=h.structural||R.get(l)),U(r)||r===!0){var p=n.data(nt);H(p)&&(r=p)}if(u&&r===!1)break;a||(a=O(n,c),a||(s=n.data(kt),s&&(n=s))),o||(o=O(n,i)),n=n.parent()}var d=!u||r;return d&&a&&o}function j(t,n,e){e=e||{},e.state=n;var r=$(t);r.setAttribute(Mt,n);var i=L.get(r),o=i?I(i,e):e;L.put(r,o)}var L=new v,R=new v,N=null,F=u.$watch(function(){return 0===w.totalPendingRequests},function(t){t&&(F(),u.$$postDigest(function(){u.$$postDigest(function(){null===N&&(N=!0)})}))}),D={},Y=t.classNameFilter(),Z=Y?function(t){return Y.test(t)}:function(){return!0},J=h(_);return{on:function(t,n,e){var r=l(n);D[t]=D[t]||[],D[t].push({node:r,callback:e})},off:function(t,n,e){function r(t,n,e){var r=l(n);return t.filter(function(t){var n=t.node===r&&(!e||t.callback===e);return!n})}var i=D[t];i&&(D[t]=1===arguments.length?null:r(i,n,e))},pin:function(t,n){r(G(t),"element","not an element"),r(G(n),"parentElement","not an element"),t.data(kt,n)},push:function(t,n,e,r){return e=e||{},e.domOperation=r,A(t,n,e)},enabled:function(t,n){var e=arguments.length;if(0===e)n=!!N;else{var r=G(t);if(r){var i=$(t),o=R.get(i);1===e?n=!o:(n=!!n,n?o&&R.remove(i):R.put(i,!0))}else n=N=!!t}return n}}}]}],Et=["$$rAF",function(t){function n(n){e.push(n),e.length>1||t(function(){for(var t=0;t<e.length;t++)e[t]();e=[]})}var e=[];return function(){var t=!1;return n(function(){t=!0}),function(e){t?e():n(e)}}}],Pt=["$q","$sniffer","$$animateAsyncRun",function(t,n,e){function r(t){this.setHost(t),this._doneCallbacks=[],this._runInAnimationFrame=e(),this._state=0}var i=0,o=1,a=2;return r.chain=function(t,n){function e(){return r===t.length?void n(!0):void t[r](function(t){return t===!1?void n(!1):(r++,void e())})}var r=0;e()},r.all=function(t,n){function e(e){i=i&&e,++r===t.length&&n(i)}var r=0,i=!0;q(t,function(t){t.done(e)})},r.prototype={setHost:function(t){this.host=t||{}},done:function(t){this._state===a?t():this._doneCallbacks.push(t)},progress:D,getPromise:function(){if(!this.promise){var n=this;this.promise=t(function(t,e){n.done(function(n){n===!1?e():t()})})}return this.promise},then:function(t,n){return this.getPromise().then(t,n)},"catch":function(t){return this.getPromise()["catch"](t)},"finally":function(t){return this.getPromise()["finally"](t)},pause:function(){this.host.pause&&this.host.pause()},resume:function(){this.host.resume&&this.host.resume()},end:function(){this.host.end&&this.host.end(),this._resolve(!0)},cancel:function(){this.host.cancel&&this.host.cancel(),this._resolve(!1)},complete:function(t){var n=this;n._state===i&&(n._state=o,n._runInAnimationFrame(function(){n._resolve(t)}))},_resolve:function(t){this._state!==a&&(q(this._doneCallbacks,function(n){n(t)}),this._doneCallbacks.length=0,this._state=a)}},r}],Ot=["$animateProvider",function(t){function n(t,n){t.data(u,n)}function e(t){t.removeData(u)}function r(t){return t.data(u)}var o="ng-animate-ref",a=this.drivers=[],u="$$animationRunner";this.$get=["$$jqLite","$rootScope","$injector","$$AnimateRunner","$$HashMap","$$rAFScheduler",function(t,u,s,l,c,f){function v(t){function n(t){if(t.processed)return t;t.processed=!0;var e=t.domNode,r=e.parentNode;o.put(e,t);for(var a;r;){if(a=o.get(r)){a.processed||(a=n(a));break}r=r.parentNode}return(a||i).children.push(t),t}function e(t){var n,e=[],r=[];for(n=0;n<t.children.length;n++)r.push(t.children[n]);var i=r.length,o=0,a=[];for(n=0;n<r.length;n++){var u=r[n];0>=i&&(i=o,o=0,e.push(a),a=[]),a.push(u.fn),u.children.forEach(function(t){o++,r.push(t)}),i--}return a.length&&e.push(a),e}var r,i={children:[]},o=new c;for(r=0;r<t.length;r++){var a=t[r];o.put(a.domNode,t[r]={domNode:a.domNode,fn:a.fn,children:[]})}for(r=0;r<t.length;r++)n(t[r]);return e(i)}var g=[],m=h(t);return function(c,h,y){function x(t){var n="["+o+"]",e=t.hasAttribute(o)?[t]:t.querySelectorAll(n),r=[];return q(e,function(t){var n=t.getAttribute(o);n&&n.length&&r.push(t)}),r}function b(t){var n=[],e={};q(t,function(t,r){var i=t.element,a=$(i),u=t.event,s=["enter","move"].indexOf(u)>=0,l=t.structural?x(a):[];if(l.length){var c=s?"to":"from";q(l,function(t){var n=t.getAttribute(o);e[n]=e[n]||{},e[n][c]={animationID:r,element:z(t)}})}else n.push(t)});var r={},i={};return q(e,function(e,o){var a=e.from,u=e.to;if(!a||!u){var s=a?a.animationID:u.animationID,l=s.toString();return void(r[l]||(r[l]=!0,n.push(t[s])))}var c=t[a.animationID],f=t[u.animationID],h=a.animationID.toString();if(!i[h]){var p=i[h]={structural:!0,beforeStart:function(){c.beforeStart(),f.beforeStart()},close:function(){c.close(),f.close()},classes:w(c.classes,f.classes),from:c,to:f,anchors:[]};p.classes.length?n.push(p):(n.push(c),n.push(f))}i[h].anchors.push({out:a.element,"in":u.element})}),n}function w(t,n){t=t.split(" "),n=n.split(" ");for(var e=[],r=0;r<t.length;r++){var i=t[r];if("ng-"!==i.substring(0,3))for(var o=0;o<n.length;o++)if(i===n[o]){e.push(i);break}}return e.join(" ")}function _(t){for(var n=a.length-1;n>=0;n--){var e=a[n];if(s.has(e)){var r=s.get(e),i=r(t);if(i)return i}}}function C(){c.addClass(tt),O&&t.addClass(c,O)}function S(t,n){function e(t){r(t).setHost(n)}t.from&&t.to?(e(t.from.element),e(t.to.element)):e(t.element)}function M(){var t=r(c);!t||"leave"===h&&y.$$domOperationFired||t.end()}function k(n){c.off("$destroy",M),e(c),m(c,y),d(c,y),y.domOperation(),O&&t.removeClass(c,O),c.removeClass(tt),E.complete(!n)}y=p(y);var A=["enter","move","leave"].indexOf(h)>=0,E=new l({end:function(){k()},cancel:function(){k(!0)}});if(!a.length)return k(),E;n(c,E);var P=i(c.attr("class"),i(y.addClass,y.removeClass)),O=y.tempClasses;return O&&(P+=" "+O,y.tempClasses=null),g.push({element:c,classes:P,event:h,structural:A,options:y,beforeStart:C,close:k}),c.on("$destroy",M),g.length>1?E:(u.$$postDigest(function(){var t=[];q(g,function(n){r(n.element)?t.push(n):n.close()}),g.length=0;var n=b(t),e=[];q(n,function(t){e.push({domNode:$(t.from?t.from.element:t.element),fn:function(){t.beforeStart();var n,e=t.close,i=t.anchors?t.from.element||t.to.element:t.element;if(r(i)){var o=_(t);o&&(n=o.start)}if(n){var a=n();a.done(function(t){e(!t)}),S(t,a)}else e()}})}),f(v(e))}),E)}}]}];n.module("ngAnimate",[]).directive("ngAnimateChildren",vt).factory("$$rAFScheduler",dt).factory("$$AnimateRunner",Pt).factory("$$animateAsyncRun",Et).provider("$$animateQueue",At).provider("$$animation",Ot).provider("$animateCss",wt).provider("$$animateCssDriver",_t).provider("$$animateJs",Ct).provider("$$animateJsDriver",St)}(window,window.angular),function(){function t(t,n){return t.set(n[0],n[1]),t}function n(t,n){return t.add(n),t}function e(t,n,e){var r=e.length;switch(r){case 0:return t.call(n);case 1:return t.call(n,e[0]);case 2:return t.call(n,e[0],e[1]);case 3:return t.call(n,e[0],e[1],e[2])}return t.apply(n,e)}function r(t,n,e,r){for(var i=-1,o=t.length;++i<o;){var a=t[i];n(r,a,e(a),t)}return r}function i(t,n){for(var e=-1,r=t.length,i=-1,o=n.length,a=Array(r+o);++e<r;)a[e]=t[e];for(;++i<o;)a[e++]=n[i];return a}function o(t,n){for(var e=-1,r=t.length;++e<r&&n(t[e],e,t)!==!1;);return t}function a(t,n){for(var e=t.length;e--&&n(t[e],e,t)!==!1;);return t}function u(t,n){for(var e=-1,r=t.length;++e<r;)if(!n(t[e],e,t))return!1;return!0}function s(t,n){for(var e=-1,r=t.length,i=0,o=[];++e<r;){var a=t[e];n(a,e,t)&&(o[i++]=a)}return o}function l(t,n){return!!t.length&&$(t,n,0)>-1}function c(t,n,e){for(var r=-1,i=t.length;++r<i;)if(e(n,t[r]))return!0;return!1}function f(t,n){for(var e=-1,r=t.length,i=Array(r);++e<r;)i[e]=n(t[e],e,t);return i}function h(t,n){for(var e=-1,r=n.length,i=t.length;++e<r;)t[i+e]=n[e];return t}function p(t,n,e,r){var i=-1,o=t.length;for(r&&o&&(e=t[++i]);++i<o;)e=n(e,t[i],i,t);return e}function d(t,n,e,r){var i=t.length;for(r&&i&&(e=t[--i]);i--;)e=n(e,t[i],i,t);return e}function v(t,n){for(var e=-1,r=t.length;++e<r;)if(n(t[e],e,t))return!0;return!1}function g(t,n,e){for(var r=-1,i=t.length;++r<i;){var o=t[r],a=n(o);if(null!=a&&(u===Z?a===a:e(a,u)))var u=a,s=o}return s}function m(t,n,e,r){var i;return e(t,function(t,e,o){return n(t,e,o)?(i=r?e:t,!1):void 0}),i}function y(t,n,e){for(var r=t.length,i=e?r:-1;e?i--:++i<r;)if(n(t[i],i,t))return i;return-1}function $(t,n,e){if(n!==n)return I(t,e);for(var r=e-1,i=t.length;++r<i;)if(t[r]===n)return r;return-1}function x(t,n,e,r){for(var i=e-1,o=t.length;++i<o;)if(r(t[i],n))return i;return-1}function b(t,n){var e=t?t.length:0;return e?C(t,n)/e:Ct}function w(t,n,e,r,i){return i(t,function(t,i,o){e=r?(r=!1,t):n(e,t,i,o)}),e}function _(t,n){var e=t.length;for(t.sort(n);e--;)t[e]=t[e].value;return t}function C(t,n){for(var e,r=-1,i=t.length;++r<i;){var o=n(t[r]);o!==Z&&(e=e===Z?o:e+o)}return e}function S(t,n){for(var e=-1,r=Array(t);++e<t;)r[e]=n(e);return r}function M(t,n){return f(n,function(n){return[n,t[n]]})}function k(t){return function(n){return t(n)}}function A(t,n){return f(n,function(n){return t[n]})}function E(t,n){for(var e=-1,r=t.length;++e<r&&$(n,t[e],0)>-1;);return e}function P(t,n){for(var e=t.length;e--&&$(n,t[e],0)>-1;);return e}function O(t){return t&&t.Object===Object?t:null}function T(t,n){if(t!==n){var e=null===t,r=t===Z,i=t===t,o=null===n,a=n===Z,u=n===n;if(t>n&&!o||!i||e&&!a&&u||r&&u)return 1;if(n>t&&!e||!u||o&&!r&&i||a&&i)return-1}return 0}function j(t,n,e){for(var r=-1,i=t.criteria,o=n.criteria,a=i.length,u=e.length;++r<a;){var s=T(i[r],o[r]);if(s){if(r>=u)return s;var l=e[r];return s*("desc"==l?-1:1)}}return t.index-n.index}function L(t,n){for(var e=t.length,r=0;e--;)t[e]===n&&r++;return r}function R(t){return function(n,e){var r;return n===Z&&e===Z?0:(n!==Z&&(r=n),e!==Z&&(r=r===Z?e:t(r,e)),r)}}function N(t){return ke[t]}function F(t){return Ae[t]}function D(t){return"\\"+Oe[t]}function I(t,n,e){for(var r=t.length,i=n+(e?0:-1);e?i--:++i<r;){var o=t[i];if(o!==o)return i}return-1}function z(t){var n=!1;if(null!=t&&"function"!=typeof t.toString)try{n=!!(t+"")}catch(e){}return n}function q(t,n){return t="number"==typeof t||Pn.test(t)?+t:-1,n=null==n?wt:n,t>-1&&t%1==0&&n>t}function V(t){for(var n,e=[];!(n=t.next()).done;)e.push(n.value);return e}function B(t){var n=-1,e=Array(t.size);return t.forEach(function(t,r){e[++n]=[r,t]}),e}function W(t,n){for(var e=-1,r=t.length,i=0,o=[];++e<r;){var a=t[e];a!==n&&a!==nt||(t[e]=nt,o[i++]=e)}return o}function U(t){var n=-1,e=Array(t.size);return t.forEach(function(t){e[++n]=t}),e}function H(t){if(!t||!be.test(t))return t.length;for(var n=$e.lastIndex=0;$e.test(t);)n++;return n}function Y(t){return t.match($e)}function G(t){return Ee[t]}function X(O){function Pn(t){if(au(t)&&!Jc(t)&&!(t instanceof Nn)){if(t instanceof Rn)return t;if(pl.call(t,"__wrapped__"))return Zi(t)}return new Rn(t)}function Ln(){}function Rn(t,n){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!n,this.__index__=0,this.__values__=Z}function Nn(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=St,this.__views__=[]}function Fn(){var t=new Nn(this.__wrapped__);return t.__actions__=Gr(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=Gr(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=Gr(this.__views__),t}function Dn(){if(this.__filtered__){var t=new Nn(this);t.__dir__=-1,t.__filtered__=!0}else t=this.clone(),t.__dir__*=-1;return t}function In(){var t=this.__wrapped__.value(),n=this.__dir__,e=Jc(t),r=0>n,i=e?t.length:0,o=Ei(0,i,this.__views__),a=o.start,u=o.end,s=u-a,l=r?u:a-1,c=this.__iteratees__,f=c.length,h=0,p=Dl(s,this.__takeCount__);if(!e||K>i||i==s&&p==s)return Or(t,this.__actions__);var d=[];t:for(;s--&&p>h;){l+=n;for(var v=-1,g=t[l];++v<f;){var m=c[v],y=m.iteratee,$=m.type,x=y(g);if($==$t)g=x;else if(!x){if($==yt)continue t;break t}}d[h++]=g}return d}function zn(){}function qn(t,n){return Bn(t,n)&&delete t[n]}function Vn(t,n){if(Xl){var e=t[n];return e===tt?Z:e}return pl.call(t,n)?t[n]:Z}function Bn(t,n){return Xl?t[n]!==Z:pl.call(t,n)}function Wn(t,n,e){t[n]=Xl&&e===Z?tt:e}function Un(t){var n=-1,e=t?t.length:0;for(this.clear();++n<e;){var r=t[n];this.set(r[0],r[1])}}function Hn(){this.__data__={hash:new zn,map:Ul?new Ul:[],string:new zn}}function Yn(t){var n=this.__data__;return Ii(t)?qn("string"==typeof t?n.string:n.hash,t):Ul?n.map["delete"](t):ae(n.map,t)}function Gn(t){var n=this.__data__;return Ii(t)?Vn("string"==typeof t?n.string:n.hash,t):Ul?n.map.get(t):ue(n.map,t)}function Xn(t){var n=this.__data__;return Ii(t)?Bn("string"==typeof t?n.string:n.hash,t):Ul?n.map.has(t):se(n.map,t)}function Zn(t,n){var e=this.__data__;return Ii(t)?Wn("string"==typeof t?e.string:e.hash,t,n):Ul?e.map.set(t,n):ce(e.map,t,n),this}function Jn(t){var n=-1,e=t?t.length:0;for(this.__data__=new Un;++n<e;)this.push(t[n])}function Kn(t,n){var e=t.__data__;if(Ii(n)){var r=e.__data__,i="string"==typeof n?r.string:r.hash;return i[n]===tt}return e.has(n)}function Qn(t){var n=this.__data__;if(Ii(t)){var e=n.__data__,r="string"==typeof t?e.string:e.hash;r[t]=tt}else n.set(t,tt)}function te(t){var n=-1,e=t?t.length:0;for(this.clear();++n<e;){var r=t[n];this.set(r[0],r[1])}}function ne(){this.__data__={array:[],map:null}}function ee(t){var n=this.__data__,e=n.array;return e?ae(e,t):n.map["delete"](t)}function re(t){var n=this.__data__,e=n.array;return e?ue(e,t):n.map.get(t)}function ie(t){var n=this.__data__,e=n.array;return e?se(e,t):n.map.has(t)}function oe(t,n){var e=this.__data__,r=e.array;r&&(r.length<K-1?ce(r,t,n):(e.array=null,e.map=new Un(r)));var i=e.map;return i&&i.set(t,n),this}function ae(t,n){var e=le(t,n);if(0>e)return!1;var r=t.length-1;return e==r?t.pop():Pl.call(t,e,1),!0}function ue(t,n){var e=le(t,n);return 0>e?Z:t[e][1]}function se(t,n){return le(t,n)>-1}function le(t,n){for(var e=t.length;e--;)if(qa(t[e][0],n))return e;return-1}function ce(t,n,e){var r=le(t,n);0>r?t.push([n,e]):t[r][1]=e}function fe(t,n,e,r){return t===Z||qa(t,cl[e])&&!pl.call(r,e)?n:t}function he(t,n,e){(e===Z||qa(t[n],e))&&("number"!=typeof n||e!==Z||n in t)||(t[n]=e)}function pe(t,n,e){var r=t[n];pl.call(t,n)&&qa(r,e)&&(e!==Z||n in t)||(t[n]=e)}function de(t,n,e,r){return uc(t,function(t,i,o){n(r,t,e(t),o)}),r}function ve(t,n){return t&&Xr(n,Hu(n),t)}function ge(t,n){for(var e=-1,r=null==t,i=n.length,o=Array(i);++e<i;)o[e]=r?Z:Bu(t,n[e]);return o}function $e(t,n,e){return t===t&&(e!==Z&&(t=e>=t?t:e),n!==Z&&(t=t>=n?t:n)),t}function ke(t,n,e,r,i,a,u){var s;if(r&&(s=a?r(t,i,a,u):r(t)),s!==Z)return s;if(!ou(t))return t;var l=Jc(t);if(l){if(s=Oi(t),!n)return Gr(t,s)}else{var c=Ai(t),f=c==jt||c==Lt;if(Kc(t))return Dr(t,n);if(c==Ft||c==At||f&&!a){if(z(t))return a?t:{};if(s=Ti(f?{}:t),!n)return Zr(t,ve(s,t))}else{if(!Me[c])return a?t:{};s=ji(t,c,ke,n)}}u||(u=new te);var h=u.get(t);if(h)return h;if(u.set(t,s),!l)var p=e?$i(t):Hu(t);return o(p||t,function(i,o){p&&(o=i,i=t[o]),pe(s,o,ke(i,n,e,r,o,t,u))}),s}function Ae(t){var n=Hu(t),e=n.length;return function(r){if(null==r)return!e;for(var i=e;i--;){var o=n[i],a=t[o],u=r[o];if(u===Z&&!(o in Object(r))||!a(u))return!1}return!0}}function Ee(t){return ou(t)?kl(t):{}}function Pe(t,n,e){if("function"!=typeof t)throw new sl(Q);return El(function(){t.apply(Z,e)},n)}function Oe(t,n,e,r){var i=-1,o=l,a=!0,u=t.length,s=[],h=n.length;if(!u)return s;e&&(n=f(n,k(e))),r?(o=c,a=!1):n.length>=K&&(o=Kn,a=!1,n=new Jn(n));t:for(;++i<u;){var p=t[i],d=e?e(p):p;if(a&&d===d){for(var v=h;v--;)if(n[v]===d)continue t;s.push(p)}else o(n,d,r)||s.push(p)}return s}function Le(t,n){var e=!0;return uc(t,function(t,r,i){return e=!!n(t,r,i)}),e}function Re(t,n,e,r){var i=t.length;for(e=Au(e),0>e&&(e=-e>i?0:i+e),r=r===Z||r>i?i:Au(r),0>r&&(r+=i),r=e>r?0:Eu(r);r>e;)t[e++]=n;return t}function Fe(t,n){var e=[];return uc(t,function(t,r,i){n(t,r,i)&&e.push(t)}),e}function De(t,n,e,r,i){var o=-1,a=t.length;for(e||(e=Ri),i||(i=[]);++o<a;){var u=t[o];n>0&&e(u)?n>1?De(u,n-1,e,r,i):h(i,u):r||(i[i.length]=u)}return i}function Ie(t,n){return t&&lc(t,n,Hu)}function ze(t,n){return t&&cc(t,n,Hu)}function Be(t,n){return s(n,function(n){return eu(t[n])})}function We(t,n){n=Di(n,t)?[n]:Nr(n);for(var e=0,r=n.length;null!=t&&r>e;)t=t[n[e++]];return e&&e==r?t:Z}function Ue(t,n,e){var r=n(t);return Jc(t)?r:h(r,e(t))}function He(t,n){return pl.call(t,n)||"object"==typeof t&&n in t&&null===Mi(t)}function Ye(t,n){return n in Object(t)}function Ge(t,n,e){return t>=Dl(n,e)&&t<Fl(n,e)}function Xe(t,n,e){for(var r=e?c:l,i=t[0].length,o=t.length,a=o,u=Array(o),s=1/0,h=[];a--;){var p=t[a];a&&n&&(p=f(p,k(n))),s=Dl(p.length,s),u[a]=!e&&(n||i>=120&&p.length>=120)?new Jn(a&&p):Z}p=t[0];var d=-1,v=u[0];t:for(;++d<i&&h.length<s;){var g=p[d],m=n?n(g):g;if(!(v?Kn(v,m):r(h,m,e))){for(a=o;--a;){var y=u[a];if(!(y?Kn(y,m):r(t[a],m,e)))continue t}v&&v.push(m),h.push(g)}}return h}function Ze(t,n,e,r){return Ie(t,function(t,i,o){n(r,e(t),i,o)}),r}function Je(t,n,r){Di(n,t)||(n=Nr(n),t=Hi(t,n),n=go(n));var i=null==t?t:t[n];return null==i?Z:e(i,t,r)}function Ke(t,n,e,r,i){return t===n?!0:null==t||null==n||!ou(t)&&!au(n)?t!==t&&n!==n:Qe(t,n,Ke,e,r,i)}function Qe(t,n,e,r,i,o){var a=Jc(t),u=Jc(n),s=Et,l=Et;a||(s=Ai(t),s=s==At?Ft:s),u||(l=Ai(n),l=l==At?Ft:l);var c=s==Ft&&!z(t),f=l==Ft&&!z(n),h=s==l;if(h&&!c)return o||(o=new te),a||bu(t)?gi(t,n,e,r,i,o):mi(t,n,s,e,r,i,o);if(!(i&pt)){var p=c&&pl.call(t,"__wrapped__"),d=f&&pl.call(n,"__wrapped__");if(p||d){var v=p?t.value():t,g=d?n.value():n;return o||(o=new te),e(v,g,r,i,o)}}return h?(o||(o=new te),yi(t,n,e,r,i,o)):!1}function tr(t,n,e,r){var i=e.length,o=i,a=!r;if(null==t)return!o;for(t=Object(t);i--;){var u=e[i];if(a&&u[2]?u[1]!==t[u[0]]:!(u[0]in t))return!1}for(;++i<o;){u=e[i];var s=u[0],l=t[s],c=u[1];if(a&&u[2]){if(l===Z&&!(s in t))return!1}else{var f=new te;if(r)var h=r(l,c,s,t,n,f);if(!(h===Z?Ke(c,l,r,ht|pt,f):h))return!1}}return!0}function nr(t){return"function"==typeof t?t:null==t?Fs:"object"==typeof t?Jc(t)?ar(t[0],t[1]):or(t):Us(t)}function er(t){return Nl(Object(t))}function rr(t){t=null==t?t:Object(t);var n=[];for(var e in t)n.push(e);return n}function ir(t,n){var e=-1,r=Ha(t)?Array(t.length):[];return uc(t,function(t,i,o){r[++e]=n(t,i,o)}),r}function or(t){var n=_i(t);return 1==n.length&&n[0][2]?Bi(n[0][0],n[0][1]):function(e){return e===t||tr(e,t,n)}}function ar(t,n){return Di(t)&&Vi(n)?Bi(t,n):function(e){var r=Bu(e,t);return r===Z&&r===n?Uu(e,t):Ke(n,r,Z,ht|pt)}}function ur(t,n,e,r,i){if(t!==n){if(!Jc(n)&&!bu(n))var a=Yu(n);o(a||n,function(o,u){if(a&&(u=o,o=n[u]),ou(o))i||(i=new te),sr(t,n,u,e,ur,r,i);else{var s=r?r(t[u],o,u+"",t,n,i):Z;s===Z&&(s=o),he(t,u,s)}})}}function sr(t,n,e,r,i,o,a){var u=t[e],s=n[e],l=a.get(s);if(l)return void he(t,e,l);var c=o?o(u,s,e+"",t,n,a):Z,f=c===Z;f&&(c=s,Jc(s)||bu(s)?Jc(u)?c=u:Ya(u)?c=Gr(u):(f=!1,c=ke(s,!0)):vu(s)||Wa(s)?Wa(u)?c=Ou(u):!ou(u)||r&&eu(u)?(f=!1,c=ke(s,!0)):c=u:f=!1),a.set(s,c),f&&i(c,s,r,o,a),a["delete"](s),he(t,e,c)}function lr(t,n){var e=t.length;if(e)return n+=0>n?e:0,q(n,e)?t[n]:Z}function cr(t,n,e){var r=-1;n=f(n.length?n:[Fs],k(wi()));var i=ir(t,function(t,e,i){var o=f(n,function(n){return n(t)});return{criteria:o,index:++r,value:t}});return _(i,function(t,n){return j(t,n,e)})}function fr(t,n){return t=Object(t),p(n,function(n,e){return e in t&&(n[e]=t[e]),n},{})}function hr(t,n){for(var e=-1,r=xi(t),i=r.length,o={};++e<i;){var a=r[e],u=t[a];n(u,a)&&(o[a]=u)}return o}function pr(t){return function(n){return null==n?Z:n[t]}}function dr(t){return function(n){return We(n,t)}}function vr(t,n,e,r){var i=r?x:$,o=-1,a=n.length,u=t;for(e&&(u=f(t,k(e)));++o<a;)for(var s=0,l=n[o],c=e?e(l):l;(s=i(u,c,s,r))>-1;)u!==t&&Pl.call(u,s,1),Pl.call(t,s,1);return t}function gr(t,n){for(var e=t?n.length:0,r=e-1;e--;){var i=n[e];if(r==e||i!=o){var o=i;if(q(i))Pl.call(t,i,1);else if(Di(i,t))delete t[i];else{var a=Nr(i),u=Hi(t,a);null!=u&&delete u[go(a)]}}}return t}function mr(t,n){return t+Tl(zl()*(n-t+1))}function yr(t,n,e,r){for(var i=-1,o=Fl(Ol((n-t)/(e||1)),0),a=Array(o);o--;)a[r?o:++i]=t,t+=e;return a}function $r(t,n){var e="";if(!t||1>n||n>wt)return e;do n%2&&(e+=t),n=Tl(n/2),n&&(t+=t);while(n);return e}function xr(t,n,e,r){n=Di(n,t)?[n]:Nr(n);for(var i=-1,o=n.length,a=o-1,u=t;null!=u&&++i<o;){var s=n[i];if(ou(u)){var l=e;if(i!=a){var c=u[s];l=r?r(c,s,u):Z,l===Z&&(l=null==c?q(n[i+1])?[]:{}:c)}pe(u,s,l)}u=u[s]}return t}function br(t,n,e){var r=-1,i=t.length;0>n&&(n=-n>i?0:i+n),e=e>i?i:e,0>e&&(e+=i),i=n>e?0:e-n>>>0,n>>>=0;for(var o=Array(i);++r<i;)o[r]=t[r+n];return o}function wr(t,n){var e;return uc(t,function(t,r,i){return e=n(t,r,i),!e}),!!e}function _r(t,n,e){var r=0,i=t?t.length:r;if("number"==typeof n&&n===n&&kt>=i){for(;i>r;){var o=r+i>>>1,a=t[o];(e?n>=a:n>a)&&null!==a?r=o+1:i=o}return i}return Cr(t,n,Fs,e)}function Cr(t,n,e,r){n=e(n);for(var i=0,o=t?t.length:0,a=n!==n,u=null===n,s=n===Z;o>i;){var l=Tl((i+o)/2),c=e(t[l]),f=c!==Z,h=c===c;if(a)var p=h||r;else p=u?h&&f&&(r||null!=c):s?h&&(r||f):null==c?!1:r?n>=c:n>c;p?i=l+1:o=l}return Dl(o,Mt)}function Sr(t){return Mr(t)}function Mr(t,n){for(var e=0,r=t.length,i=t[0],o=n?n(i):i,a=o,u=1,s=[i];++e<r;)i=t[e],o=n?n(i):i,qa(o,a)||(a=o,s[u++]=i);return s}function kr(t,n,e){var r=-1,i=l,o=t.length,a=!0,u=[],s=u;if(e)a=!1,i=c;else if(o>=K){var f=n?null:hc(t);if(f)return U(f);a=!1,i=Kn,s=new Jn}else s=n?[]:u;t:for(;++r<o;){var h=t[r],p=n?n(h):h;if(a&&p===p){for(var d=s.length;d--;)if(s[d]===p)continue t;n&&s.push(p),u.push(h)}else i(s,p,e)||(s!==u&&s.push(p),u.push(h))}return u}function Ar(t,n){n=Di(n,t)?[n]:Nr(n),t=Hi(t,n);var e=go(n);return null!=t&&Wu(t,e)?delete t[e]:!0}function Er(t,n,e,r){return xr(t,n,e(We(t,n)),r)}function Pr(t,n,e,r){for(var i=t.length,o=r?i:-1;(r?o--:++o<i)&&n(t[o],o,t););return e?br(t,r?0:o,r?o+1:i):br(t,r?o+1:0,r?i:o)}function Or(t,n){var e=t;return e instanceof Nn&&(e=e.value()),p(n,function(t,n){return n.func.apply(n.thisArg,h([t],n.args))},e)}function Tr(t,n,e){for(var r=-1,i=t.length;++r<i;)var o=o?h(Oe(o,t[r],n,e),Oe(t[r],o,n,e)):t[r];return o&&o.length?kr(o,n,e):[]}function jr(t,n,e){for(var r=-1,i=t.length,o=n.length,a={};++r<i;){var u=o>r?n[r]:Z;e(a,t[r],u)}return a}function Lr(t){return Ya(t)?t:[]}function Rr(t){return"function"==typeof t?t:Fs}function Nr(t){return Jc(t)?t:mc(t)}function Fr(t,n,e){var r=t.length;return e=e===Z?r:e,!n&&e>=r?t:br(t,n,e)}function Dr(t,n){if(n)return t.slice();var e=new t.constructor(t.length);return t.copy(e),e}function Ir(t){var n=new t.constructor(t.byteLength);return new wl(n).set(new wl(t)),n}function zr(t,n){var e=n?Ir(t.buffer):t.buffer;return new t.constructor(e,t.byteOffset,t.byteLength)}function qr(n,e,r){var i=e?r(B(n),!0):B(n);return p(i,t,new n.constructor)}function Vr(t){var n=new t.constructor(t.source,Cn.exec(t));return n.lastIndex=t.lastIndex,n}function Br(t,e,r){var i=e?r(U(t),!0):U(t);return p(i,n,new t.constructor)}function Wr(t){return oc?Object(oc.call(t)):{}}function Ur(t,n){var e=n?Ir(t.buffer):t.buffer;return new t.constructor(e,t.byteOffset,t.length)}function Hr(t,n,e,r){for(var i=-1,o=t.length,a=e.length,u=-1,s=n.length,l=Fl(o-a,0),c=Array(s+l),f=!r;++u<s;)c[u]=n[u];for(;++i<a;)(f||o>i)&&(c[e[i]]=t[i]);for(;l--;)c[u++]=t[i++];return c}function Yr(t,n,e,r){for(var i=-1,o=t.length,a=-1,u=e.length,s=-1,l=n.length,c=Fl(o-u,0),f=Array(c+l),h=!r;++i<c;)f[i]=t[i];for(var p=i;++s<l;)f[p+s]=n[s];for(;++a<u;)(h||o>i)&&(f[p+e[a]]=t[i++]);return f}function Gr(t,n){var e=-1,r=t.length;for(n||(n=Array(r));++e<r;)n[e]=t[e];return n}function Xr(t,n,e,r){e||(e={});for(var i=-1,o=n.length;++i<o;){var a=n[i],u=r?r(e[a],t[a],a,e,t):t[a];pe(e,a,u)}return e}function Zr(t,n){return Xr(t,ki(t),n)}function Jr(t,n){return function(e,i){var o=Jc(e)?r:de,a=n?n():{};return o(e,t,wi(i),a)}}function Kr(t){return Oa(function(n,e){var r=-1,i=e.length,o=i>1?e[i-1]:Z,a=i>2?e[2]:Z;for(o="function"==typeof o?(i--,o):Z,a&&Fi(e[0],e[1],a)&&(o=3>i?Z:o,i=1),n=Object(n);++r<i;){var u=e[r];u&&t(n,u,r,o)}return n})}function Qr(t,n){return function(e,r){if(null==e)return e;if(!Ha(e))return t(e,r);for(var i=e.length,o=n?i:-1,a=Object(e);(n?o--:++o<i)&&r(a[o],o,a)!==!1;);return e}}function ti(t){return function(n,e,r){for(var i=-1,o=Object(n),a=r(n),u=a.length;u--;){var s=a[t?u:++i];if(e(o[s],s,o)===!1)break}return n}}function ni(t,n,e){function r(){var n=this&&this!==qe&&this instanceof r?o:t;return n.apply(i?e:this,arguments)}var i=n&et,o=ii(t);return r}function ei(t){return function(n){n=ju(n);var e=be.test(n)?Y(n):Z,r=e?e[0]:n.charAt(0),i=e?Fr(e,1).join(""):n.slice(1);return r[t]()+i}}function ri(t){return function(n){return p(js(ps(n).replace(me,"")),t,"")}}function ii(t){return function(){var n=arguments;switch(n.length){case 0:return new t;case 1:return new t(n[0]);case 2:return new t(n[0],n[1]);case 3:return new t(n[0],n[1],n[2]);case 4:return new t(n[0],n[1],n[2],n[3]);case 5:return new t(n[0],n[1],n[2],n[3],n[4]);case 6:return new t(n[0],n[1],n[2],n[3],n[4],n[5]);case 7:return new t(n[0],n[1],n[2],n[3],n[4],n[5],n[6])}var e=Ee(t.prototype),r=t.apply(e,n);return ou(r)?r:e}}function oi(t,n,r){function i(){for(var a=arguments.length,u=Array(a),s=a,l=Si(i);s--;)u[s]=arguments[s];var c=3>a&&u[0]!==l&&u[a-1]!==l?[]:W(u,l);if(a-=c.length,r>a)return pi(t,n,ui,i.placeholder,Z,u,c,Z,Z,r-a);var f=this&&this!==qe&&this instanceof i?o:t;return e(f,this,u)}var o=ii(t);return i}function ai(t){return Oa(function(n){n=De(n,1);var e=n.length,r=e,i=Rn.prototype.thru;for(t&&n.reverse();r--;){var o=n[r];if("function"!=typeof o)throw new sl(Q);if(i&&!a&&"wrapper"==bi(o))var a=new Rn([],!0)}for(r=a?r:e;++r<e;){o=n[r];var u=bi(o),s="wrapper"==u?pc(o):Z;a=s&&zi(s[0])&&s[1]==(lt|ot|ut|ct)&&!s[4].length&&1==s[9]?a[bi(s[0])].apply(a,s[3]):1==o.length&&zi(o)?a[u]():a.thru(o)}return function(){var t=arguments,r=t[0];if(a&&1==t.length&&Jc(r)&&r.length>=K)return a.plant(r).value();for(var i=0,o=e?n[i].apply(this,t):r;++i<e;)o=n[i].call(this,o);return o}})}function ui(t,n,e,r,i,o,a,u,s,l){function c(){for(var m=arguments.length,y=m,$=Array(m);y--;)$[y]=arguments[y];if(d)var x=Si(c),b=L($,x);if(r&&($=Hr($,r,i,d)),o&&($=Yr($,o,a,d)),m-=b,d&&l>m){var w=W($,x);return pi(t,n,ui,c.placeholder,e,$,w,u,s,l-m)}var _=h?e:this,C=p?_[t]:t;return m=$.length,u?$=Yi($,u):v&&m>1&&$.reverse(),f&&m>s&&($.length=s),this&&this!==qe&&this instanceof c&&(C=g||ii(C)),
-C.apply(_,$)}var f=n<,h=n&et,p=n&rt,d=n&(ot|at),v=n&ft,g=p?Z:ii(t);return c}function si(t,n){return function(e,r){return Ze(e,t,n(r),{})}}function li(t){return Oa(function(n){return n=1==n.length&&Jc(n[0])?f(n[0],k(wi())):f(De(n,1,Ni),k(wi())),Oa(function(r){var i=this;return t(n,function(t){return e(t,i,r)})})})}function ci(t,n){n=n===Z?" ":n+"";var e=n.length;if(2>e)return e?$r(n,t):n;var r=$r(n,Ol(t/H(n)));return be.test(n)?Fr(Y(r),0,t).join(""):r.slice(0,t)}function fi(t,n,r,i){function o(){for(var n=-1,s=arguments.length,l=-1,c=i.length,f=Array(c+s),h=this&&this!==qe&&this instanceof o?u:t;++l<c;)f[l]=i[l];for(;s--;)f[l++]=arguments[++n];return e(h,a?r:this,f)}var a=n&et,u=ii(t);return o}function hi(t){return function(n,e,r){return r&&"number"!=typeof r&&Fi(n,e,r)&&(e=r=Z),n=Pu(n),n=n===n?n:0,e===Z?(e=n,n=0):e=Pu(e)||0,r=r===Z?e>n?1:-1:Pu(r)||0,yr(n,e,r,t)}}function pi(t,n,e,r,i,o,a,u,s,l){var c=n&ot,f=c?a:Z,h=c?Z:a,p=c?o:Z,d=c?Z:o;n|=c?ut:st,n&=~(c?st:ut),n&it||(n&=~(et|rt));var v=[t,n,i,p,f,d,h,u,s,l],g=e.apply(Z,v);return zi(t)&&gc(g,v),g.placeholder=r,g}function di(t){var n=al[t];return function(t,e){if(t=Pu(t),e=Au(e)){var r=(ju(t)+"e").split("e"),i=n(r[0]+"e"+(+r[1]+e));return r=(ju(i)+"e").split("e"),+(r[0]+"e"+(+r[1]-e))}return n(t)}}function vi(t,n,e,r,i,o,a,u){var s=n&rt;if(!s&&"function"!=typeof t)throw new sl(Q);var l=r?r.length:0;if(l||(n&=~(ut|st),r=i=Z),a=a===Z?a:Fl(Au(a),0),u=u===Z?u:Au(u),l-=i?i.length:0,n&st){var c=r,f=i;r=i=Z}var h=s?Z:pc(t),p=[t,n,e,r,i,c,f,o,a,u];if(h&&Wi(p,h),t=p[0],n=p[1],e=p[2],r=p[3],i=p[4],u=p[9]=null==p[9]?s?0:t.length:Fl(p[9]-l,0),!u&&n&(ot|at)&&(n&=~(ot|at)),n&&n!=et)d=n==ot||n==at?oi(t,n,u):n!=ut&&n!=(et|ut)||i.length?ui.apply(Z,p):fi(t,n,e,r);else var d=ni(t,n,e);var v=h?fc:gc;return v(d,p)}function gi(t,n,e,r,i,o){var a=-1,u=i&pt,s=i&ht,l=t.length,c=n.length;if(l!=c&&!(u&&c>l))return!1;var f=o.get(t);if(f)return f==n;var h=!0;for(o.set(t,n);++a<l;){var p=t[a],d=n[a];if(r)var g=u?r(d,p,a,n,t,o):r(p,d,a,t,n,o);if(g!==Z){if(g)continue;h=!1;break}if(s){if(!v(n,function(t){return p===t||e(p,t,r,i,o)})){h=!1;break}}else if(p!==d&&!e(p,d,r,i,o)){h=!1;break}}return o["delete"](t),h}function mi(t,n,e,r,i,o,a){switch(e){case Ht:if(t.byteLength!=n.byteLength||t.byteOffset!=n.byteOffset)return!1;t=t.buffer,n=n.buffer;case Ut:return!(t.byteLength!=n.byteLength||!r(new wl(t),new wl(n)));case Pt:case Ot:return+t==+n;case Tt:return t.name==n.name&&t.message==n.message;case Nt:return t!=+t?n!=+n:t==+n;case It:case qt:return t==n+"";case Rt:var u=B;case zt:var s=o&pt;if(u||(u=U),t.size!=n.size&&!s)return!1;var l=a.get(t);return l?l==n:(o|=ht,a.set(t,n),gi(u(t),u(n),r,i,o,a));case Vt:if(oc)return oc.call(t)==oc.call(n)}return!1}function yi(t,n,e,r,i,o){var a=i&pt,u=Hu(t),s=u.length,l=Hu(n),c=l.length;if(s!=c&&!a)return!1;for(var f=s;f--;){var h=u[f];if(!(a?h in n:He(n,h)))return!1}var p=o.get(t);if(p)return p==n;var d=!0;o.set(t,n);for(var v=a;++f<s;){h=u[f];var g=t[h],m=n[h];if(r)var y=a?r(m,g,h,n,t,o):r(g,m,h,t,n,o);if(!(y===Z?g===m||e(g,m,r,i,o):y)){d=!1;break}v||(v="constructor"==h)}if(d&&!v){var $=t.constructor,x=n.constructor;$!=x&&"constructor"in t&&"constructor"in n&&!("function"==typeof $&&$ instanceof $&&"function"==typeof x&&x instanceof x)&&(d=!1)}return o["delete"](t),d}function $i(t){return Ue(t,Hu,ki)}function xi(t){return Ue(t,Yu,vc)}function bi(t){for(var n=t.name+"",e=Kl[n],r=pl.call(Kl,n)?e.length:0;r--;){var i=e[r],o=i.func;if(null==o||o==t)return i.name}return n}function wi(){var t=Pn.iteratee||Ds;return t=t===Ds?nr:t,arguments.length?t(arguments[0],arguments[1]):t}function _i(t){for(var n=ns(t),e=n.length;e--;)n[e][2]=Vi(n[e][1]);return n}function Ci(t,n){var e=t[n];return fu(e)?e:Z}function Si(t){var n=pl.call(Pn,"placeholder")?Pn:t;return n.placeholder}function Mi(t){return jl(Object(t))}function ki(t){return Sl(Object(t))}function Ai(t){return gl.call(t)}function Ei(t,n,e){for(var r=-1,i=e.length;++r<i;){var o=e[r],a=o.size;switch(o.type){case"drop":t+=a;break;case"dropRight":n-=a;break;case"take":n=Dl(n,t+a);break;case"takeRight":t=Fl(t,n-a)}}return{start:t,end:n}}function Pi(t,n,e){n=Di(n,t)?[n]:Nr(n);for(var r,i=-1,o=n.length;++i<o;){var a=n[i];if(!(r=null!=t&&e(t,a)))break;t=t[a]}if(r)return r;var o=t?t.length:0;return!!o&&iu(o)&&q(a,o)&&(Jc(t)||$u(t)||Wa(t))}function Oi(t){var n=t.length,e=t.constructor(n);return n&&"string"==typeof t[0]&&pl.call(t,"index")&&(e.index=t.index,e.input=t.input),e}function Ti(t){return"function"!=typeof t.constructor||qi(t)?{}:Ee(Mi(t))}function ji(t,n,e,r){var i=t.constructor;switch(n){case Ut:return Ir(t);case Pt:case Ot:return new i(+t);case Ht:return zr(t,r);case Yt:case Gt:case Xt:case Zt:case Jt:case Kt:case Qt:case tn:case nn:return Ur(t,r);case Rt:return qr(t,r,e);case Nt:case qt:return new i(t);case It:return Vr(t);case zt:return Br(t,r,e);case Vt:return Wr(t)}}function Li(t){var n=t?t.length:Z;return iu(n)&&(Jc(t)||$u(t)||Wa(t))?S(n,String):null}function Ri(t){return Ya(t)&&(Jc(t)||Wa(t))}function Ni(t){return Jc(t)&&!(2==t.length&&!eu(t[0]))}function Fi(t,n,e){if(!ou(e))return!1;var r=typeof n;return("number"==r?Ha(e)&&q(n,e.length):"string"==r&&n in e)?qa(e[n],t):!1}function Di(t,n){var e=typeof t;return"number"==e||"symbol"==e?!0:!Jc(t)&&(xu(t)||dn.test(t)||!pn.test(t)||null!=n&&t in Object(n))}function Ii(t){var n=typeof t;return"number"==n||"boolean"==n||"string"==n&&"__proto__"!=t||null==t}function zi(t){var n=bi(t),e=Pn[n];if("function"!=typeof e||!(n in Nn.prototype))return!1;if(t===e)return!0;var r=pc(e);return!!r&&t===r[0]}function qi(t){var n=t&&t.constructor,e="function"==typeof n&&n.prototype||cl;return t===e}function Vi(t){return t===t&&!ou(t)}function Bi(t,n){return function(e){return null==e?!1:e[t]===n&&(n!==Z||t in Object(e))}}function Wi(t,n){var e=t[1],r=n[1],i=e|r,o=(et|rt|lt)>i,a=r==lt&&e==ot||r==lt&&e==ct&&t[7].length<=n[8]||r==(lt|ct)&&n[7].length<=n[8]&&e==ot;if(!o&&!a)return t;r&et&&(t[2]=n[2],i|=e&et?0:it);var u=n[3];if(u){var s=t[3];t[3]=s?Hr(s,u,n[4]):u,t[4]=s?W(t[3],nt):n[4]}return u=n[5],u&&(s=t[5],t[5]=s?Yr(s,u,n[6]):u,t[6]=s?W(t[5],nt):n[6]),u=n[7],u&&(t[7]=u),r<&&(t[8]=null==t[8]?n[8]:Dl(t[8],n[8])),null==t[9]&&(t[9]=n[9]),t[0]=n[0],t[1]=i,t}function Ui(t,n,e,r,i,o){return ou(t)&&ou(n)&&ur(t,n,Z,Ui,o.set(n,t)),t}function Hi(t,n){return 1==n.length?t:We(t,br(n,0,-1))}function Yi(t,n){for(var e=t.length,r=Dl(n.length,e),i=Gr(t);r--;){var o=n[r];t[r]=q(o,e)?i[o]:Z}return t}function Gi(t){return"string"==typeof t||xu(t)?t:t+""}function Xi(t){if(null!=t){try{return hl.call(t)}catch(n){}try{return t+""}catch(n){}}return""}function Zi(t){if(t instanceof Nn)return t.clone();var n=new Rn(t.__wrapped__,t.__chain__);return n.__actions__=Gr(t.__actions__),n.__index__=t.__index__,n.__values__=t.__values__,n}function Ji(t,n,e){n=(e?Fi(t,n,e):n===Z)?1:Fl(Au(n),0);var r=t?t.length:0;if(!r||1>n)return[];for(var i=0,o=0,a=Array(Ol(r/n));r>i;)a[o++]=br(t,i,i+=n);return a}function Ki(t){for(var n=-1,e=t?t.length:0,r=0,i=[];++n<e;){var o=t[n];o&&(i[r++]=o)}return i}function Qi(){var t=arguments.length,n=Na(arguments[0]);if(2>t)return t?Gr(n):[];for(var e=Array(t-1);t--;)e[t-1]=arguments[t];return i(n,De(e,1))}function to(t,n,e){var r=t?t.length:0;return r?(n=e||n===Z?1:Au(n),br(t,0>n?0:n,r)):[]}function no(t,n,e){var r=t?t.length:0;return r?(n=e||n===Z?1:Au(n),n=r-n,br(t,0,0>n?0:n)):[]}function eo(t,n){return t&&t.length?Pr(t,wi(n,3),!0,!0):[]}function ro(t,n){return t&&t.length?Pr(t,wi(n,3),!0):[]}function io(t,n,e,r){var i=t?t.length:0;return i?(e&&"number"!=typeof e&&Fi(t,n,e)&&(e=0,r=i),Re(t,n,e,r)):[]}function oo(t,n){return t&&t.length?y(t,wi(n,3)):-1}function ao(t,n){return t&&t.length?y(t,wi(n,3),!0):-1}function uo(t){var n=t?t.length:0;return n?De(t,1):[]}function so(t){var n=t?t.length:0;return n?De(t,bt):[]}function lo(t,n){var e=t?t.length:0;return e?(n=n===Z?1:Au(n),De(t,n)):[]}function co(t){for(var n=-1,e=t?t.length:0,r={};++n<e;){var i=t[n];r[i[0]]=i[1]}return r}function fo(t){return t&&t.length?t[0]:Z}function ho(t,n,e){var r=t?t.length:0;return r?(e=Au(e),0>e&&(e=Fl(r+e,0)),$(t,n,e)):-1}function po(t){return no(t,1)}function vo(t,n){return t?Rl.call(t,n):""}function go(t){var n=t?t.length:0;return n?t[n-1]:Z}function mo(t,n,e){var r=t?t.length:0;if(!r)return-1;var i=r;if(e!==Z&&(i=Au(e),i=(0>i?Fl(r+i,0):Dl(i,r-1))+1),n!==n)return I(t,i,!0);for(;i--;)if(t[i]===n)return i;return-1}function yo(t,n){return t&&t.length?lr(t,Au(n)):Z}function $o(t,n){return t&&t.length&&n&&n.length?vr(t,n):t}function xo(t,n,e){return t&&t.length&&n&&n.length?vr(t,n,wi(e)):t}function bo(t,n,e){return t&&t.length&&n&&n.length?vr(t,n,Z,e):t}function wo(t,n){var e=[];if(!t||!t.length)return e;var r=-1,i=[],o=t.length;for(n=wi(n,3);++r<o;){var a=t[r];n(a,r,t)&&(e.push(a),i.push(r))}return gr(t,i),e}function _o(t){return t?Vl.call(t):t}function Co(t,n,e){var r=t?t.length:0;return r?(e&&"number"!=typeof e&&Fi(t,n,e)?(n=0,e=r):(n=null==n?0:Au(n),e=e===Z?r:Au(e)),br(t,n,e)):[]}function So(t,n){return _r(t,n)}function Mo(t,n,e){return Cr(t,n,wi(e))}function ko(t,n){var e=t?t.length:0;if(e){var r=_r(t,n);if(e>r&&qa(t[r],n))return r}return-1}function Ao(t,n){return _r(t,n,!0)}function Eo(t,n,e){return Cr(t,n,wi(e),!0)}function Po(t,n){var e=t?t.length:0;if(e){var r=_r(t,n,!0)-1;if(qa(t[r],n))return r}return-1}function Oo(t){return t&&t.length?Sr(t):[]}function To(t,n){return t&&t.length?Mr(t,wi(n)):[]}function jo(t){return to(t,1)}function Lo(t,n,e){return t&&t.length?(n=e||n===Z?1:Au(n),br(t,0,0>n?0:n)):[]}function Ro(t,n,e){var r=t?t.length:0;return r?(n=e||n===Z?1:Au(n),n=r-n,br(t,0>n?0:n,r)):[]}function No(t,n){return t&&t.length?Pr(t,wi(n,3),!1,!0):[]}function Fo(t,n){return t&&t.length?Pr(t,wi(n,3)):[]}function Do(t){return t&&t.length?kr(t):[]}function Io(t,n){return t&&t.length?kr(t,wi(n)):[]}function zo(t,n){return t&&t.length?kr(t,Z,n):[]}function qo(t){if(!t||!t.length)return[];var n=0;return t=s(t,function(t){return Ya(t)?(n=Fl(t.length,n),!0):void 0}),S(n,function(n){return f(t,pr(n))})}function Vo(t,n){if(!t||!t.length)return[];var r=qo(t);return null==n?r:f(r,function(t){return e(n,Z,t)})}function Bo(t,n){return jr(t||[],n||[],pe)}function Wo(t,n){return jr(t||[],n||[],xr)}function Uo(t){var n=Pn(t);return n.__chain__=!0,n}function Ho(t,n){return n(t),t}function Yo(t,n){return n(t)}function Go(){return Uo(this)}function Xo(){return new Rn(this.value(),this.__chain__)}function Zo(){this.__values__===Z&&(this.__values__=ku(this.value()));var t=this.__index__>=this.__values__.length,n=t?Z:this.__values__[this.__index__++];return{done:t,value:n}}function Jo(){return this}function Ko(t){for(var n,e=this;e instanceof Ln;){var r=Zi(e);r.__index__=0,r.__values__=Z,n?i.__wrapped__=r:n=r;var i=r;e=e.__wrapped__}return i.__wrapped__=t,n}function Qo(){var t=this.__wrapped__;if(t instanceof Nn){var n=t;return this.__actions__.length&&(n=new Nn(this)),n=n.reverse(),n.__actions__.push({func:Yo,args:[_o],thisArg:Z}),new Rn(n,this.__chain__)}return this.thru(_o)}function ta(){return Or(this.__wrapped__,this.__actions__)}function na(t,n,e){var r=Jc(t)?u:Le;return e&&Fi(t,n,e)&&(n=Z),r(t,wi(n,3))}function ea(t,n){var e=Jc(t)?s:Fe;return e(t,wi(n,3))}function ra(t,n){if(n=wi(n,3),Jc(t)){var e=y(t,n);return e>-1?t[e]:Z}return m(t,n,uc)}function ia(t,n){if(n=wi(n,3),Jc(t)){var e=y(t,n,!0);return e>-1?t[e]:Z}return m(t,n,sc)}function oa(t,n){return De(fa(t,n),1)}function aa(t,n){return De(fa(t,n),bt)}function ua(t,n,e){return e=e===Z?1:Au(e),De(fa(t,n),e)}function sa(t,n){return"function"==typeof n&&Jc(t)?o(t,n):uc(t,wi(n))}function la(t,n){return"function"==typeof n&&Jc(t)?a(t,n):sc(t,wi(n))}function ca(t,n,e,r){t=Ha(t)?t:us(t),e=e&&!r?Au(e):0;var i=t.length;return 0>e&&(e=Fl(i+e,0)),$u(t)?i>=e&&t.indexOf(n,e)>-1:!!i&&$(t,n,e)>-1}function fa(t,n){var e=Jc(t)?f:ir;return e(t,wi(n,3))}function ha(t,n,e,r){return null==t?[]:(Jc(n)||(n=null==n?[]:[n]),e=r?Z:e,Jc(e)||(e=null==e?[]:[e]),cr(t,n,e))}function pa(t,n,e){var r=Jc(t)?p:w,i=arguments.length<3;return r(t,wi(n,4),e,i,uc)}function da(t,n,e){var r=Jc(t)?d:w,i=arguments.length<3;return r(t,wi(n,4),e,i,sc)}function va(t,n){var e=Jc(t)?s:Fe;return n=wi(n,3),e(t,function(t,e,r){return!n(t,e,r)})}function ga(t){var n=Ha(t)?t:us(t),e=n.length;return e>0?n[mr(0,e-1)]:Z}function ma(t,n,e){var r=-1,i=ku(t),o=i.length,a=o-1;for(n=(e?Fi(t,n,e):n===Z)?1:$e(Au(n),0,o);++r<n;){var u=mr(r,a),s=i[u];i[u]=i[r],i[r]=s}return i.length=n,i}function ya(t){return ma(t,St)}function $a(t){if(null==t)return 0;if(Ha(t)){var n=t.length;return n&&$u(t)?H(t):n}if(au(t)){var e=Ai(t);if(e==Rt||e==zt)return t.size}return Hu(t).length}function xa(t,n,e){var r=Jc(t)?v:wr;return e&&Fi(t,n,e)&&(n=Z),r(t,wi(n,3))}function ba(t,n){if("function"!=typeof n)throw new sl(Q);return t=Au(t),function(){return--t<1?n.apply(this,arguments):void 0}}function wa(t,n,e){return n=e?Z:n,n=t&&null==n?t.length:n,vi(t,lt,Z,Z,Z,Z,n)}function _a(t,n){var e;if("function"!=typeof n)throw new sl(Q);return t=Au(t),function(){return--t>0&&(e=n.apply(this,arguments)),1>=t&&(n=Z),e}}function Ca(t,n,e){n=e?Z:n;var r=vi(t,ot,Z,Z,Z,Z,Z,n);return r.placeholder=Ca.placeholder,r}function Sa(t,n,e){n=e?Z:n;var r=vi(t,at,Z,Z,Z,Z,Z,n);return r.placeholder=Sa.placeholder,r}function Ma(t,n,e){function r(n){var e=h,r=p;return h=p=Z,y=n,v=t.apply(r,e)}function i(t){return y=t,g=El(u,n),$?r(t):v}function o(t){var e=t-m,r=t-y,i=n-e;return x?Dl(i,d-r):i}function a(t){var e=t-m,r=t-y;return!m||e>=n||0>e||x&&r>=d}function u(){var t=Vc();return a(t)?s(t):void(g=El(u,o(t)))}function s(t){return _l(g),g=Z,b&&h?r(t):(h=p=Z,v)}function l(){g!==Z&&_l(g),m=y=0,h=p=g=Z}function c(){return g===Z?v:s(Vc())}function f(){var t=Vc(),e=a(t);if(h=arguments,p=this,m=t,e){if(g===Z)return i(m);if(x)return _l(g),g=El(u,n),r(m)}return g===Z&&(g=El(u,n)),v}var h,p,d,v,g,m=0,y=0,$=!1,x=!1,b=!0;if("function"!=typeof t)throw new sl(Q);return n=Pu(n)||0,ou(e)&&($=!!e.leading,x="maxWait"in e,d=x?Fl(Pu(e.maxWait)||0,n):d,b="trailing"in e?!!e.trailing:b),f.cancel=l,f.flush=c,f}function ka(t){return vi(t,ft)}function Aa(t,n){if("function"!=typeof t||n&&"function"!=typeof n)throw new sl(Q);var e=function(){var r=arguments,i=n?n.apply(this,r):r[0],o=e.cache;if(o.has(i))return o.get(i);var a=t.apply(this,r);return e.cache=o.set(i,a),a};return e.cache=new(Aa.Cache||Un),e}function Ea(t){if("function"!=typeof t)throw new sl(Q);return function(){return!t.apply(this,arguments)}}function Pa(t){return _a(2,t)}function Oa(t,n){if("function"!=typeof t)throw new sl(Q);return n=Fl(n===Z?t.length-1:Au(n),0),function(){for(var r=arguments,i=-1,o=Fl(r.length-n,0),a=Array(o);++i<o;)a[i]=r[n+i];switch(n){case 0:return t.call(this,a);case 1:return t.call(this,r[0],a);case 2:return t.call(this,r[0],r[1],a)}var u=Array(n+1);for(i=-1;++i<n;)u[i]=r[i];return u[n]=a,e(t,this,u)}}function Ta(t,n){if("function"!=typeof t)throw new sl(Q);return n=n===Z?0:Fl(Au(n),0),Oa(function(r){var i=r[n],o=Fr(r,0,n);return i&&h(o,i),e(t,this,o)})}function ja(t,n,e){var r=!0,i=!0;if("function"!=typeof t)throw new sl(Q);return ou(e)&&(r="leading"in e?!!e.leading:r,i="trailing"in e?!!e.trailing:i),Ma(t,n,{leading:r,maxWait:n,trailing:i})}function La(t){return wa(t,1)}function Ra(t,n){return n=null==n?Fs:n,Gc(n,t)}function Na(){if(!arguments.length)return[];var t=arguments[0];return Jc(t)?t:[t]}function Fa(t){return ke(t,!1,!0)}function Da(t,n){return ke(t,!1,!0,n)}function Ia(t){return ke(t,!0,!0)}function za(t,n){return ke(t,!0,!0,n)}function qa(t,n){return t===n||t!==t&&n!==n}function Va(t,n){return t>n}function Ba(t,n){return t>=n}function Wa(t){return Ya(t)&&pl.call(t,"callee")&&(!Al.call(t,"callee")||gl.call(t)==At)}function Ua(t){return au(t)&&gl.call(t)==Ut}function Ha(t){return null!=t&&iu(dc(t))&&!eu(t)}function Ya(t){return au(t)&&Ha(t)}function Ga(t){return t===!0||t===!1||au(t)&&gl.call(t)==Pt}function Xa(t){return au(t)&&gl.call(t)==Ot}function Za(t){return!!t&&1===t.nodeType&&au(t)&&!vu(t)}function Ja(t){if(Ha(t)&&(Jc(t)||$u(t)||eu(t.splice)||Wa(t)||Kc(t)))return!t.length;if(au(t)){var n=Ai(t);if(n==Rt||n==zt)return!t.size}for(var e in t)if(pl.call(t,e))return!1;return!(Jl&&Hu(t).length)}function Ka(t,n){return Ke(t,n)}function Qa(t,n,e){e="function"==typeof e?e:Z;var r=e?e(t,n):Z;return r===Z?Ke(t,n,e):!!r}function tu(t){return au(t)?gl.call(t)==Tt||"string"==typeof t.message&&"string"==typeof t.name:!1}function nu(t){return"number"==typeof t&&Ll(t)}function eu(t){var n=ou(t)?gl.call(t):"";return n==jt||n==Lt}function ru(t){return"number"==typeof t&&t==Au(t)}function iu(t){return"number"==typeof t&&t>-1&&t%1==0&&wt>=t}function ou(t){var n=typeof t;return!!t&&("object"==n||"function"==n)}function au(t){return!!t&&"object"==typeof t}function uu(t){return au(t)&&Ai(t)==Rt}function su(t,n){return t===n||tr(t,n,_i(n))}function lu(t,n,e){return e="function"==typeof e?e:Z,tr(t,n,_i(n),e)}function cu(t){return du(t)&&t!=+t}function fu(t){if(!ou(t))return!1;var n=eu(t)||z(t)?yl:An;return n.test(Xi(t))}function hu(t){return null===t}function pu(t){return null==t}function du(t){return"number"==typeof t||au(t)&&gl.call(t)==Nt}function vu(t){if(!au(t)||gl.call(t)!=Ft||z(t))return!1;var n=Mi(t);if(null===n)return!0;var e=pl.call(n,"constructor")&&n.constructor;return"function"==typeof e&&e instanceof e&&hl.call(e)==vl}function gu(t){return ou(t)&&gl.call(t)==It}function mu(t){return ru(t)&&t>=-wt&&wt>=t}function yu(t){return au(t)&&Ai(t)==zt}function $u(t){return"string"==typeof t||!Jc(t)&&au(t)&&gl.call(t)==qt}function xu(t){return"symbol"==typeof t||au(t)&&gl.call(t)==Vt}function bu(t){return au(t)&&iu(t.length)&&!!Se[gl.call(t)]}function wu(t){return t===Z}function _u(t){return au(t)&&Ai(t)==Bt}function Cu(t){return au(t)&&gl.call(t)==Wt}function Su(t,n){return n>t}function Mu(t,n){return n>=t}function ku(t){if(!t)return[];if(Ha(t))return $u(t)?Y(t):Gr(t);if(Ml&&t[Ml])return V(t[Ml]());var n=Ai(t),e=n==Rt?B:n==zt?U:us;return e(t)}function Au(t){if(!t)return 0===t?t:0;if(t=Pu(t),t===bt||t===-bt){var n=0>t?-1:1;return n*_t}var e=t%1;return t===t?e?t-e:t:0}function Eu(t){return t?$e(Au(t),0,St):0}function Pu(t){if("number"==typeof t)return t;if(xu(t))return Ct;if(ou(t)){var n=eu(t.valueOf)?t.valueOf():t;t=ou(n)?n+"":n}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(yn,"");var e=kn.test(t);return e||En.test(t)?je(t.slice(2),e?2:8):Mn.test(t)?Ct:+t}function Ou(t){return Xr(t,Yu(t))}function Tu(t){return $e(Au(t),-wt,wt)}function ju(t){if("string"==typeof t)return t;if(null==t)return"";if(xu(t))return ac?ac.call(t):"";var n=t+"";return"0"==n&&1/t==-bt?"-0":n}function Lu(t,n){var e=Ee(t);return n?ve(e,n):e}function Ru(t,n){return m(t,wi(n,3),Ie,!0)}function Nu(t,n){return m(t,wi(n,3),ze,!0)}function Fu(t,n){return null==t?t:lc(t,wi(n),Yu)}function Du(t,n){return null==t?t:cc(t,wi(n),Yu)}function Iu(t,n){return t&&Ie(t,wi(n))}function zu(t,n){return t&&ze(t,wi(n))}function qu(t){return null==t?[]:Be(t,Hu(t))}function Vu(t){return null==t?[]:Be(t,Yu(t))}function Bu(t,n,e){var r=null==t?Z:We(t,n);return r===Z?e:r}function Wu(t,n){return null!=t&&Pi(t,n,He)}function Uu(t,n){return null!=t&&Pi(t,n,Ye)}function Hu(t){var n=qi(t);if(!n&&!Ha(t))return er(t);var e=Li(t),r=!!e,i=e||[],o=i.length;for(var a in t)!He(t,a)||r&&("length"==a||q(a,o))||n&&"constructor"==a||i.push(a);return i}function Yu(t){for(var n=-1,e=qi(t),r=rr(t),i=r.length,o=Li(t),a=!!o,u=o||[],s=u.length;++n<i;){var l=r[n];a&&("length"==l||q(l,s))||"constructor"==l&&(e||!pl.call(t,l))||u.push(l)}return u}function Gu(t,n){var e={};return n=wi(n,3),Ie(t,function(t,r,i){e[n(t,r,i)]=t}),e}function Xu(t,n){var e={};return n=wi(n,3),Ie(t,function(t,r,i){e[r]=n(t,r,i)}),e}function Zu(t,n){return n=wi(n),hr(t,function(t,e){return!n(t,e)})}function Ju(t,n){return null==t?{}:hr(t,wi(n))}function Ku(t,n,e){n=Di(n,t)?[n]:Nr(n);var r=-1,i=n.length;for(i||(t=Z,i=1);++r<i;){var o=null==t?Z:t[n[r]];o===Z&&(r=i,o=e),t=eu(o)?o.call(t):o}return t}function Qu(t,n,e){return null==t?t:xr(t,n,e)}function ts(t,n,e,r){return r="function"==typeof r?r:Z,null==t?t:xr(t,n,e,r)}function ns(t){return M(t,Hu(t))}function es(t){return M(t,Yu(t))}function rs(t,n,e){var r=Jc(t)||bu(t);if(n=wi(n,4),null==e)if(r||ou(t)){var i=t.constructor;e=r?Jc(t)?new i:[]:eu(i)?Ee(Mi(t)):{}}else e={};return(r?o:Ie)(t,function(t,r,i){return n(e,t,r,i)}),e}function is(t,n){return null==t?!0:Ar(t,n)}function os(t,n,e){return null==t?t:Er(t,n,Rr(e))}function as(t,n,e,r){return r="function"==typeof r?r:Z,null==t?t:Er(t,n,Rr(e),r)}function us(t){return t?A(t,Hu(t)):[]}function ss(t){return null==t?[]:A(t,Yu(t))}function ls(t,n,e){return e===Z&&(e=n,n=Z),e!==Z&&(e=Pu(e),e=e===e?e:0),n!==Z&&(n=Pu(n),n=n===n?n:0),$e(Pu(t),n,e)}function cs(t,n,e){return n=Pu(n)||0,e===Z?(e=n,n=0):e=Pu(e)||0,t=Pu(t),Ge(t,n,e)}function fs(t,n,e){if(e&&"boolean"!=typeof e&&Fi(t,n,e)&&(n=e=Z),e===Z&&("boolean"==typeof n?(e=n,n=Z):"boolean"==typeof t&&(e=t,t=Z)),t===Z&&n===Z?(t=0,n=1):(t=Pu(t)||0,n===Z?(n=t,t=0):n=Pu(n)||0),t>n){var r=t;t=n,n=r}if(e||t%1||n%1){var i=zl();return Dl(t+i*(n-t+Te("1e-"+((i+"").length-1))),n)}return mr(t,n)}function hs(t){return bf(ju(t).toLowerCase())}function ps(t){return t=ju(t),t&&t.replace(On,N).replace(ye,"")}function ds(t,n,e){t=ju(t),n="string"==typeof n?n:n+"";var r=t.length;return e=e===Z?r:$e(Au(e),0,r),e-=n.length,e>=0&&t.indexOf(n,e)==e}function vs(t){return t=ju(t),t&&ln.test(t)?t.replace(un,F):t}function gs(t){return t=ju(t),t&&mn.test(t)?t.replace(gn,"\\$&"):t}function ms(t,n,e){t=ju(t),n=Au(n);var r=n?H(t):0;if(!n||r>=n)return t;var i=(n-r)/2;return ci(Tl(i),e)+t+ci(Ol(i),e)}function ys(t,n,e){t=ju(t),n=Au(n);var r=n?H(t):0;return n&&n>r?t+ci(n-r,e):t}function $s(t,n,e){t=ju(t),n=Au(n);var r=n?H(t):0;return n&&n>r?ci(n-r,e)+t:t}function xs(t,n,e){return e||null==n?n=0:n&&(n=+n),t=ju(t).replace(yn,""),Il(t,n||(Sn.test(t)?16:10))}function bs(t,n,e){return n=(e?Fi(t,n,e):n===Z)?1:Au(n),$r(ju(t),n)}function ws(){var t=arguments,n=ju(t[0]);return t.length<3?n:ql.call(n,t[1],t[2])}function _s(t,n,e){return e&&"number"!=typeof e&&Fi(t,n,e)&&(n=e=Z),(e=e===Z?St:e>>>0)?(t=ju(t),t&&("string"==typeof n||null!=n&&!gu(n))&&(n+="",""==n&&be.test(t))?Fr(Y(t),0,e):Bl.call(t,n,e)):[]}function Cs(t,n,e){return t=ju(t),e=$e(Au(e),0,t.length),t.lastIndexOf(n,e)==e}function Ss(t,n,e){var r=Pn.templateSettings;e&&Fi(t,n,e)&&(n=Z),t=ju(t),n=nf({},n,r,fe);var i,o,a=nf({},n.imports,r.imports,fe),u=Hu(a),s=A(a,u),l=0,c=n.interpolate||Tn,f="__p += '",h=ul((n.escape||Tn).source+"|"+c.source+"|"+(c===hn?_n:Tn).source+"|"+(n.evaluate||Tn).source+"|$","g"),p="//# sourceURL="+("sourceURL"in n?n.sourceURL:"lodash.templateSources["+ ++Ce+"]")+"\n";t.replace(h,function(n,e,r,a,u,s){return r||(r=a),f+=t.slice(l,s).replace(jn,D),e&&(i=!0,f+="' +\n__e("+e+") +\n'"),u&&(o=!0,f+="';\n"+u+";\n__p += '"),r&&(f+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),l=s+n.length,n}),f+="';\n";var d=n.variable;d||(f="with (obj) {\n"+f+"\n}\n"),f=(o?f.replace(en,""):f).replace(rn,"$1").replace(on,"$1;"),f="function("+(d||"obj")+") {\n"+(d?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(i?", __e = _.escape":"")+(o?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+f+"return __p\n}";var v=wf(function(){return Function(u,p+"return "+f).apply(Z,s)});if(v.source=f,tu(v))throw v;return v}function Ms(t){return ju(t).toLowerCase()}function ks(t){return ju(t).toUpperCase()}function As(t,n,e){if(t=ju(t),!t)return t;if(e||n===Z)return t.replace(yn,"");if(!(n+=""))return t;var r=Y(t),i=Y(n),o=E(r,i),a=P(r,i)+1;return Fr(r,o,a).join("")}function Es(t,n,e){if(t=ju(t),!t)return t;if(e||n===Z)return t.replace(xn,"");if(!(n+=""))return t;var r=Y(t),i=P(r,Y(n))+1;return Fr(r,0,i).join("")}function Ps(t,n,e){if(t=ju(t),!t)return t;if(e||n===Z)return t.replace($n,"");if(!(n+=""))return t;var r=Y(t),i=E(r,Y(n));return Fr(r,i).join("")}function Os(t,n){var e=dt,r=vt;if(ou(n)){var i="separator"in n?n.separator:i;e="length"in n?Au(n.length):e,r="omission"in n?ju(n.omission):r}t=ju(t);var o=t.length;if(be.test(t)){var a=Y(t);o=a.length}if(e>=o)return t;var u=e-H(r);if(1>u)return r;var s=a?Fr(a,0,u).join(""):t.slice(0,u);if(i===Z)return s+r;if(a&&(u+=s.length-u),gu(i)){if(t.slice(u).search(i)){var l,c=s;for(i.global||(i=ul(i.source,ju(Cn.exec(i))+"g")),i.lastIndex=0;l=i.exec(c);)var f=l.index;s=s.slice(0,f===Z?u:f)}}else if(t.indexOf(i,u)!=u){var h=s.lastIndexOf(i);h>-1&&(s=s.slice(0,h))}return s+r}function Ts(t){return t=ju(t),t&&sn.test(t)?t.replace(an,G):t}function js(t,n,e){return t=ju(t),n=e?Z:n,n===Z&&(n=we.test(t)?xe:bn),t.match(n)||[]}function Ls(t){var n=t?t.length:0,r=wi();return t=n?f(t,function(t){if("function"!=typeof t[1])throw new sl(Q);return[r(t[0]),t[1]]}):[],Oa(function(r){for(var i=-1;++i<n;){var o=t[i];if(e(o[0],this,r))return e(o[1],this,r)}})}function Rs(t){return Ae(ke(t,!0))}function Ns(t){return function(){return t}}function Fs(t){return t}function Ds(t){return nr("function"==typeof t?t:ke(t,!0))}function Is(t){return or(ke(t,!0))}function zs(t,n){return ar(t,ke(n,!0))}function qs(t,n,e){var r=Hu(n),i=Be(n,r);null!=e||ou(n)&&(i.length||!r.length)||(e=n,n=t,t=this,i=Be(n,Hu(n)));var a=!(ou(e)&&"chain"in e&&!e.chain),u=eu(t);return o(i,function(e){var r=n[e];t[e]=r,u&&(t.prototype[e]=function(){var n=this.__chain__;if(a||n){var e=t(this.__wrapped__),i=e.__actions__=Gr(this.__actions__);return i.push({func:r,args:arguments,thisArg:t}),e.__chain__=n,e}return r.apply(t,h([this.value()],arguments))})}),t}function Vs(){return qe._===this&&(qe._=ml),this}function Bs(){}function Ws(t){return t=Au(t),Oa(function(n){return lr(n,t)})}function Us(t){return Di(t)?pr(t):dr(t)}function Hs(t){return function(n){return null==t?Z:We(t,n)}}function Ys(t,n){if(t=Au(t),1>t||t>wt)return[];var e=St,r=Dl(t,St);n=wi(n),t-=St;for(var i=S(r,n);++e<t;)n(e);return i}function Gs(t){return Jc(t)?f(t,Gi):xu(t)?[t]:Gr(mc(t))}function Xs(t){var n=++dl;return ju(t)+n}function Zs(t){return t&&t.length?g(t,Fs,Va):Z}function Js(t,n){return t&&t.length?g(t,wi(n),Va):Z}function Ks(t){return b(t,Fs)}function Qs(t,n){return b(t,wi(n))}function tl(t){return t&&t.length?g(t,Fs,Su):Z}function nl(t,n){return t&&t.length?g(t,wi(n),Su):Z}function el(t){return t&&t.length?C(t,Fs):0}function rl(t,n){return t&&t.length?C(t,wi(n)):0}O=O?Ve.defaults({},O,Ve.pick(qe,_e)):qe;var il=O.Date,ol=O.Error,al=O.Math,ul=O.RegExp,sl=O.TypeError,ll=O.Array.prototype,cl=O.Object.prototype,fl=O.String.prototype,hl=O.Function.prototype.toString,pl=cl.hasOwnProperty,dl=0,vl=hl.call(Object),gl=cl.toString,ml=qe._,yl=ul("^"+hl.call(pl).replace(gn,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),$l=Ne?O.Buffer:Z,xl=O.Reflect,bl=O.Symbol,wl=O.Uint8Array,_l=O.clearTimeout,Cl=xl?xl.enumerate:Z,Sl=Object.getOwnPropertySymbols,Ml="symbol"==typeof(Ml=bl&&bl.iterator)?Ml:Z,kl=Object.create,Al=cl.propertyIsEnumerable,El=O.setTimeout,Pl=ll.splice,Ol=al.ceil,Tl=al.floor,jl=Object.getPrototypeOf,Ll=O.isFinite,Rl=ll.join,Nl=Object.keys,Fl=al.max,Dl=al.min,Il=O.parseInt,zl=al.random,ql=fl.replace,Vl=ll.reverse,Bl=fl.split,Wl=Ci(O,"DataView"),Ul=Ci(O,"Map"),Hl=Ci(O,"Promise"),Yl=Ci(O,"Set"),Gl=Ci(O,"WeakMap"),Xl=Ci(Object,"create"),Zl=Gl&&new Gl,Jl=!Al.call({valueOf:1},"valueOf"),Kl={},Ql=Xi(Wl),tc=Xi(Ul),nc=Xi(Hl),ec=Xi(Yl),rc=Xi(Gl),ic=bl?bl.prototype:Z,oc=ic?ic.valueOf:Z,ac=ic?ic.toString:Z;Pn.templateSettings={escape:cn,evaluate:fn,interpolate:hn,variable:"",imports:{_:Pn}},Pn.prototype=Ln.prototype,Pn.prototype.constructor=Pn,Rn.prototype=Ee(Ln.prototype),Rn.prototype.constructor=Rn,Nn.prototype=Ee(Ln.prototype),Nn.prototype.constructor=Nn,zn.prototype=Xl?Xl(null):cl,Un.prototype.clear=Hn,Un.prototype["delete"]=Yn,Un.prototype.get=Gn,Un.prototype.has=Xn,Un.prototype.set=Zn,Jn.prototype.push=Qn,te.prototype.clear=ne,te.prototype["delete"]=ee,te.prototype.get=re,te.prototype.has=ie,te.prototype.set=oe;var uc=Qr(Ie),sc=Qr(ze,!0),lc=ti(),cc=ti(!0);Cl&&!Al.call({valueOf:1},"valueOf")&&(rr=function(t){return V(Cl(t))});var fc=Zl?function(t,n){return Zl.set(t,n),t}:Fs,hc=Yl&&2===new Yl([1,2]).size?function(t){return new Yl(t)}:Bs,pc=Zl?function(t){return Zl.get(t)}:Bs,dc=pr("length");Sl||(ki=function(){return[]});var vc=Sl?function(t){for(var n=[];t;)h(n,ki(t)),t=Mi(t);return n}:ki;(Wl&&Ai(new Wl(new ArrayBuffer(1)))!=Ht||Ul&&Ai(new Ul)!=Rt||Hl&&Ai(Hl.resolve())!=Dt||Yl&&Ai(new Yl)!=zt||Gl&&Ai(new Gl)!=Bt)&&(Ai=function(t){var n=gl.call(t),e=n==Ft?t.constructor:Z,r=e?Xi(e):Z;if(r)switch(r){case Ql:return Ht;case tc:return Rt;case nc:return Dt;case ec:return zt;case rc:return Bt}return n});var gc=function(){var t=0,n=0;return function(e,r){var i=Vc(),o=mt-(i-n);if(n=i,o>0){if(++t>=gt)return e}else t=0;return fc(e,r)}}(),mc=Aa(function(t){var n=[];return ju(t).replace(vn,function(t,e,r,i){n.push(r?i.replace(wn,"$1"):e||t)}),n}),yc=Oa(function(t,n){return Ya(t)?Oe(t,De(n,1,Ya,!0)):[]}),$c=Oa(function(t,n){var e=go(n);return Ya(e)&&(e=Z),Ya(t)?Oe(t,De(n,1,Ya,!0),wi(e)):[]}),xc=Oa(function(t,n){var e=go(n);return Ya(e)&&(e=Z),Ya(t)?Oe(t,De(n,1,Ya,!0),Z,e):[]}),bc=Oa(function(t){var n=f(t,Lr);return n.length&&n[0]===t[0]?Xe(n):[]}),wc=Oa(function(t){var n=go(t),e=f(t,Lr);return n===go(e)?n=Z:e.pop(),e.length&&e[0]===t[0]?Xe(e,wi(n)):[]}),_c=Oa(function(t){var n=go(t),e=f(t,Lr);return n===go(e)?n=Z:e.pop(),e.length&&e[0]===t[0]?Xe(e,Z,n):[]}),Cc=Oa($o),Sc=Oa(function(t,n){n=f(De(n,1),String);var e=ge(t,n);return gr(t,n.sort(T)),e}),Mc=Oa(function(t){return kr(De(t,1,Ya,!0))}),kc=Oa(function(t){var n=go(t);return Ya(n)&&(n=Z),kr(De(t,1,Ya,!0),wi(n))}),Ac=Oa(function(t){var n=go(t);return Ya(n)&&(n=Z),kr(De(t,1,Ya,!0),Z,n)}),Ec=Oa(function(t,n){return Ya(t)?Oe(t,n):[]}),Pc=Oa(function(t){return Tr(s(t,Ya))}),Oc=Oa(function(t){var n=go(t);return Ya(n)&&(n=Z),Tr(s(t,Ya),wi(n))}),Tc=Oa(function(t){var n=go(t);return Ya(n)&&(n=Z),Tr(s(t,Ya),Z,n)}),jc=Oa(qo),Lc=Oa(function(t){var n=t.length,e=n>1?t[n-1]:Z;return e="function"==typeof e?(t.pop(),e):Z,Vo(t,e)}),Rc=Oa(function(t){t=De(t,1);var n=t.length,e=n?t[0]:0,r=this.__wrapped__,i=function(n){return ge(n,t)};return!(n>1||this.__actions__.length)&&r instanceof Nn&&q(e)?(r=r.slice(e,+e+(n?1:0)),r.__actions__.push({func:Yo,args:[i],thisArg:Z}),new Rn(r,this.__chain__).thru(function(t){return n&&!t.length&&t.push(Z),t})):this.thru(i)}),Nc=Jr(function(t,n,e){pl.call(t,e)?++t[e]:t[e]=1}),Fc=Jr(function(t,n,e){pl.call(t,e)?t[e].push(n):t[e]=[n]}),Dc=Oa(function(t,n,r){var i=-1,o="function"==typeof n,a=Di(n),u=Ha(t)?Array(t.length):[];return uc(t,function(t){var s=o?n:a&&null!=t?t[n]:Z;u[++i]=s?e(s,t,r):Je(t,n,r)}),u}),Ic=Jr(function(t,n,e){t[e]=n}),zc=Jr(function(t,n,e){t[e?0:1].push(n)},function(){return[[],[]]}),qc=Oa(function(t,n){if(null==t)return[];var e=n.length;return e>1&&Fi(t,n[0],n[1])?n=[]:e>2&&Fi(n[0],n[1],n[2])&&(n=[n[0]]),n=1==n.length&&Jc(n[0])?n[0]:De(n,1,Ni),cr(t,n,[])}),Vc=il.now,Bc=Oa(function(t,n,e){var r=et;if(e.length){var i=W(e,Si(Bc));r|=ut}return vi(t,r,n,e,i)}),Wc=Oa(function(t,n,e){var r=et|rt;if(e.length){var i=W(e,Si(Wc));r|=ut}return vi(n,r,t,e,i)}),Uc=Oa(function(t,n){return Pe(t,1,n)}),Hc=Oa(function(t,n,e){return Pe(t,Pu(n)||0,e)});Aa.Cache=Un;var Yc=Oa(function(t,n){n=1==n.length&&Jc(n[0])?f(n[0],k(wi())):f(De(n,1,Ni),k(wi()));var r=n.length;return Oa(function(i){for(var o=-1,a=Dl(i.length,r);++o<a;)i[o]=n[o].call(this,i[o]);return e(t,this,i)})}),Gc=Oa(function(t,n){var e=W(n,Si(Gc));return vi(t,ut,Z,n,e)}),Xc=Oa(function(t,n){var e=W(n,Si(Xc));return vi(t,st,Z,n,e)}),Zc=Oa(function(t,n){return vi(t,ct,Z,Z,Z,De(n,1))}),Jc=Array.isArray,Kc=$l?function(t){return t instanceof $l}:Ns(!1),Qc=Kr(function(t,n){if(Jl||qi(n)||Ha(n))return void Xr(n,Hu(n),t);for(var e in n)pl.call(n,e)&&pe(t,e,n[e])}),tf=Kr(function(t,n){if(Jl||qi(n)||Ha(n))return void Xr(n,Yu(n),t);for(var e in n)pe(t,e,n[e])}),nf=Kr(function(t,n,e,r){Xr(n,Yu(n),t,r)}),ef=Kr(function(t,n,e,r){Xr(n,Hu(n),t,r)}),rf=Oa(function(t,n){return ge(t,De(n,1))}),of=Oa(function(t){return t.push(Z,fe),e(nf,Z,t)}),af=Oa(function(t){return t.push(Z,Ui),e(ff,Z,t)}),uf=si(function(t,n,e){t[n]=e},Ns(Fs)),sf=si(function(t,n,e){
-pl.call(t,n)?t[n].push(e):t[n]=[e]},wi),lf=Oa(Je),cf=Kr(function(t,n,e){ur(t,n,e)}),ff=Kr(function(t,n,e,r){ur(t,n,e,r)}),hf=Oa(function(t,n){return null==t?{}:(n=f(De(n,1),Gi),fr(t,Oe(xi(t),n)))}),pf=Oa(function(t,n){return null==t?{}:fr(t,De(n,1))}),df=ri(function(t,n,e){return n=n.toLowerCase(),t+(e?hs(n):n)}),vf=ri(function(t,n,e){return t+(e?"-":"")+n.toLowerCase()}),gf=ri(function(t,n,e){return t+(e?" ":"")+n.toLowerCase()}),mf=ei("toLowerCase"),yf=ri(function(t,n,e){return t+(e?"_":"")+n.toLowerCase()}),$f=ri(function(t,n,e){return t+(e?" ":"")+bf(n)}),xf=ri(function(t,n,e){return t+(e?" ":"")+n.toUpperCase()}),bf=ei("toUpperCase"),wf=Oa(function(t,n){try{return e(t,Z,n)}catch(r){return tu(r)?r:new ol(r)}}),_f=Oa(function(t,n){return o(De(n,1),function(n){t[n]=Bc(t[n],t)}),t}),Cf=ai(),Sf=ai(!0),Mf=Oa(function(t,n){return function(e){return Je(e,t,n)}}),kf=Oa(function(t,n){return function(e){return Je(t,e,n)}}),Af=li(f),Ef=li(u),Pf=li(v),Of=hi(),Tf=hi(!0),jf=R(function(t,n){return t+n}),Lf=di("ceil"),Rf=R(function(t,n){return t/n}),Nf=di("floor"),Ff=R(function(t,n){return t*n}),Df=di("round"),If=R(function(t,n){return t-n});return Pn.after=ba,Pn.ary=wa,Pn.assign=Qc,Pn.assignIn=tf,Pn.assignInWith=nf,Pn.assignWith=ef,Pn.at=rf,Pn.before=_a,Pn.bind=Bc,Pn.bindAll=_f,Pn.bindKey=Wc,Pn.castArray=Na,Pn.chain=Uo,Pn.chunk=Ji,Pn.compact=Ki,Pn.concat=Qi,Pn.cond=Ls,Pn.conforms=Rs,Pn.constant=Ns,Pn.countBy=Nc,Pn.create=Lu,Pn.curry=Ca,Pn.curryRight=Sa,Pn.debounce=Ma,Pn.defaults=of,Pn.defaultsDeep=af,Pn.defer=Uc,Pn.delay=Hc,Pn.difference=yc,Pn.differenceBy=$c,Pn.differenceWith=xc,Pn.drop=to,Pn.dropRight=no,Pn.dropRightWhile=eo,Pn.dropWhile=ro,Pn.fill=io,Pn.filter=ea,Pn.flatMap=oa,Pn.flatMapDeep=aa,Pn.flatMapDepth=ua,Pn.flatten=uo,Pn.flattenDeep=so,Pn.flattenDepth=lo,Pn.flip=ka,Pn.flow=Cf,Pn.flowRight=Sf,Pn.fromPairs=co,Pn.functions=qu,Pn.functionsIn=Vu,Pn.groupBy=Fc,Pn.initial=po,Pn.intersection=bc,Pn.intersectionBy=wc,Pn.intersectionWith=_c,Pn.invert=uf,Pn.invertBy=sf,Pn.invokeMap=Dc,Pn.iteratee=Ds,Pn.keyBy=Ic,Pn.keys=Hu,Pn.keysIn=Yu,Pn.map=fa,Pn.mapKeys=Gu,Pn.mapValues=Xu,Pn.matches=Is,Pn.matchesProperty=zs,Pn.memoize=Aa,Pn.merge=cf,Pn.mergeWith=ff,Pn.method=Mf,Pn.methodOf=kf,Pn.mixin=qs,Pn.negate=Ea,Pn.nthArg=Ws,Pn.omit=hf,Pn.omitBy=Zu,Pn.once=Pa,Pn.orderBy=ha,Pn.over=Af,Pn.overArgs=Yc,Pn.overEvery=Ef,Pn.overSome=Pf,Pn.partial=Gc,Pn.partialRight=Xc,Pn.partition=zc,Pn.pick=pf,Pn.pickBy=Ju,Pn.property=Us,Pn.propertyOf=Hs,Pn.pull=Cc,Pn.pullAll=$o,Pn.pullAllBy=xo,Pn.pullAllWith=bo,Pn.pullAt=Sc,Pn.range=Of,Pn.rangeRight=Tf,Pn.rearg=Zc,Pn.reject=va,Pn.remove=wo,Pn.rest=Oa,Pn.reverse=_o,Pn.sampleSize=ma,Pn.set=Qu,Pn.setWith=ts,Pn.shuffle=ya,Pn.slice=Co,Pn.sortBy=qc,Pn.sortedUniq=Oo,Pn.sortedUniqBy=To,Pn.split=_s,Pn.spread=Ta,Pn.tail=jo,Pn.take=Lo,Pn.takeRight=Ro,Pn.takeRightWhile=No,Pn.takeWhile=Fo,Pn.tap=Ho,Pn.throttle=ja,Pn.thru=Yo,Pn.toArray=ku,Pn.toPairs=ns,Pn.toPairsIn=es,Pn.toPath=Gs,Pn.toPlainObject=Ou,Pn.transform=rs,Pn.unary=La,Pn.union=Mc,Pn.unionBy=kc,Pn.unionWith=Ac,Pn.uniq=Do,Pn.uniqBy=Io,Pn.uniqWith=zo,Pn.unset=is,Pn.unzip=qo,Pn.unzipWith=Vo,Pn.update=os,Pn.updateWith=as,Pn.values=us,Pn.valuesIn=ss,Pn.without=Ec,Pn.words=js,Pn.wrap=Ra,Pn.xor=Pc,Pn.xorBy=Oc,Pn.xorWith=Tc,Pn.zip=jc,Pn.zipObject=Bo,Pn.zipObjectDeep=Wo,Pn.zipWith=Lc,Pn.entries=ns,Pn.entriesIn=es,Pn.extend=tf,Pn.extendWith=nf,qs(Pn,Pn),Pn.add=jf,Pn.attempt=wf,Pn.camelCase=df,Pn.capitalize=hs,Pn.ceil=Lf,Pn.clamp=ls,Pn.clone=Fa,Pn.cloneDeep=Ia,Pn.cloneDeepWith=za,Pn.cloneWith=Da,Pn.deburr=ps,Pn.divide=Rf,Pn.endsWith=ds,Pn.eq=qa,Pn.escape=vs,Pn.escapeRegExp=gs,Pn.every=na,Pn.find=ra,Pn.findIndex=oo,Pn.findKey=Ru,Pn.findLast=ia,Pn.findLastIndex=ao,Pn.findLastKey=Nu,Pn.floor=Nf,Pn.forEach=sa,Pn.forEachRight=la,Pn.forIn=Fu,Pn.forInRight=Du,Pn.forOwn=Iu,Pn.forOwnRight=zu,Pn.get=Bu,Pn.gt=Va,Pn.gte=Ba,Pn.has=Wu,Pn.hasIn=Uu,Pn.head=fo,Pn.identity=Fs,Pn.includes=ca,Pn.indexOf=ho,Pn.inRange=cs,Pn.invoke=lf,Pn.isArguments=Wa,Pn.isArray=Jc,Pn.isArrayBuffer=Ua,Pn.isArrayLike=Ha,Pn.isArrayLikeObject=Ya,Pn.isBoolean=Ga,Pn.isBuffer=Kc,Pn.isDate=Xa,Pn.isElement=Za,Pn.isEmpty=Ja,Pn.isEqual=Ka,Pn.isEqualWith=Qa,Pn.isError=tu,Pn.isFinite=nu,Pn.isFunction=eu,Pn.isInteger=ru,Pn.isLength=iu,Pn.isMap=uu,Pn.isMatch=su,Pn.isMatchWith=lu,Pn.isNaN=cu,Pn.isNative=fu,Pn.isNil=pu,Pn.isNull=hu,Pn.isNumber=du,Pn.isObject=ou,Pn.isObjectLike=au,Pn.isPlainObject=vu,Pn.isRegExp=gu,Pn.isSafeInteger=mu,Pn.isSet=yu,Pn.isString=$u,Pn.isSymbol=xu,Pn.isTypedArray=bu,Pn.isUndefined=wu,Pn.isWeakMap=_u,Pn.isWeakSet=Cu,Pn.join=vo,Pn.kebabCase=vf,Pn.last=go,Pn.lastIndexOf=mo,Pn.lowerCase=gf,Pn.lowerFirst=mf,Pn.lt=Su,Pn.lte=Mu,Pn.max=Zs,Pn.maxBy=Js,Pn.mean=Ks,Pn.meanBy=Qs,Pn.min=tl,Pn.minBy=nl,Pn.multiply=Ff,Pn.nth=yo,Pn.noConflict=Vs,Pn.noop=Bs,Pn.now=Vc,Pn.pad=ms,Pn.padEnd=ys,Pn.padStart=$s,Pn.parseInt=xs,Pn.random=fs,Pn.reduce=pa,Pn.reduceRight=da,Pn.repeat=bs,Pn.replace=ws,Pn.result=Ku,Pn.round=Df,Pn.runInContext=X,Pn.sample=ga,Pn.size=$a,Pn.snakeCase=yf,Pn.some=xa,Pn.sortedIndex=So,Pn.sortedIndexBy=Mo,Pn.sortedIndexOf=ko,Pn.sortedLastIndex=Ao,Pn.sortedLastIndexBy=Eo,Pn.sortedLastIndexOf=Po,Pn.startCase=$f,Pn.startsWith=Cs,Pn.subtract=If,Pn.sum=el,Pn.sumBy=rl,Pn.template=Ss,Pn.times=Ys,Pn.toInteger=Au,Pn.toLength=Eu,Pn.toLower=Ms,Pn.toNumber=Pu,Pn.toSafeInteger=Tu,Pn.toString=ju,Pn.toUpper=ks,Pn.trim=As,Pn.trimEnd=Es,Pn.trimStart=Ps,Pn.truncate=Os,Pn.unescape=Ts,Pn.uniqueId=Xs,Pn.upperCase=xf,Pn.upperFirst=bf,Pn.each=sa,Pn.eachRight=la,Pn.first=fo,qs(Pn,function(){var t={};return Ie(Pn,function(n,e){pl.call(Pn.prototype,e)||(t[e]=n)}),t}(),{chain:!1}),Pn.VERSION=J,o(["bind","bindKey","curry","curryRight","partial","partialRight"],function(t){Pn[t].placeholder=Pn}),o(["drop","take"],function(t,n){Nn.prototype[t]=function(e){var r=this.__filtered__;if(r&&!n)return new Nn(this);e=e===Z?1:Fl(Au(e),0);var i=this.clone();return r?i.__takeCount__=Dl(e,i.__takeCount__):i.__views__.push({size:Dl(e,St),type:t+(i.__dir__<0?"Right":"")}),i},Nn.prototype[t+"Right"]=function(n){return this.reverse()[t](n).reverse()}}),o(["filter","map","takeWhile"],function(t,n){var e=n+1,r=e==yt||e==xt;Nn.prototype[t]=function(t){var n=this.clone();return n.__iteratees__.push({iteratee:wi(t,3),type:e}),n.__filtered__=n.__filtered__||r,n}}),o(["head","last"],function(t,n){var e="take"+(n?"Right":"");Nn.prototype[t]=function(){return this[e](1).value()[0]}}),o(["initial","tail"],function(t,n){var e="drop"+(n?"":"Right");Nn.prototype[t]=function(){return this.__filtered__?new Nn(this):this[e](1)}}),Nn.prototype.compact=function(){return this.filter(Fs)},Nn.prototype.find=function(t){return this.filter(t).head()},Nn.prototype.findLast=function(t){return this.reverse().find(t)},Nn.prototype.invokeMap=Oa(function(t,n){return"function"==typeof t?new Nn(this):this.map(function(e){return Je(e,t,n)})}),Nn.prototype.reject=function(t){return t=wi(t,3),this.filter(function(n){return!t(n)})},Nn.prototype.slice=function(t,n){t=Au(t);var e=this;return e.__filtered__&&(t>0||0>n)?new Nn(e):(0>t?e=e.takeRight(-t):t&&(e=e.drop(t)),n!==Z&&(n=Au(n),e=0>n?e.dropRight(-n):e.take(n-t)),e)},Nn.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},Nn.prototype.toArray=function(){return this.take(St)},Ie(Nn.prototype,function(t,n){var e=/^(?:filter|find|map|reject)|While$/.test(n),r=/^(?:head|last)$/.test(n),i=Pn[r?"take"+("last"==n?"Right":""):n],o=r||/^find/.test(n);i&&(Pn.prototype[n]=function(){var n=this.__wrapped__,a=r?[1]:arguments,u=n instanceof Nn,s=a[0],l=u||Jc(n),c=function(t){var n=i.apply(Pn,h([t],a));return r&&f?n[0]:n};l&&e&&"function"==typeof s&&1!=s.length&&(u=l=!1);var f=this.__chain__,p=!!this.__actions__.length,d=o&&!f,v=u&&!p;if(!o&&l){n=v?n:new Nn(this);var g=t.apply(n,a);return g.__actions__.push({func:Yo,args:[c],thisArg:Z}),new Rn(g,f)}return d&&v?t.apply(this,a):(g=this.thru(c),d?r?g.value()[0]:g.value():g)})}),o(["pop","push","shift","sort","splice","unshift"],function(t){var n=ll[t],e=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",r=/^(?:pop|shift)$/.test(t);Pn.prototype[t]=function(){var t=arguments;if(r&&!this.__chain__){var i=this.value();return n.apply(Jc(i)?i:[],t)}return this[e](function(e){return n.apply(Jc(e)?e:[],t)})}}),Ie(Nn.prototype,function(t,n){var e=Pn[n];if(e){var r=e.name+"",i=Kl[r]||(Kl[r]=[]);i.push({name:n,func:e})}}),Kl[ui(Z,rt).name]=[{name:"wrapper",func:Z}],Nn.prototype.clone=Fn,Nn.prototype.reverse=Dn,Nn.prototype.value=In,Pn.prototype.at=Rc,Pn.prototype.chain=Go,Pn.prototype.commit=Xo,Pn.prototype.next=Zo,Pn.prototype.plant=Ko,Pn.prototype.reverse=Qo,Pn.prototype.toJSON=Pn.prototype.valueOf=Pn.prototype.value=ta,Ml&&(Pn.prototype[Ml]=Jo),Pn}var Z,J="4.11.1",K=200,Q="Expected a function",tt="__lodash_hash_undefined__",nt="__lodash_placeholder__",et=1,rt=2,it=4,ot=8,at=16,ut=32,st=64,lt=128,ct=256,ft=512,ht=1,pt=2,dt=30,vt="...",gt=150,mt=16,yt=1,$t=2,xt=3,bt=1/0,wt=9007199254740991,_t=1.7976931348623157e308,Ct=NaN,St=4294967295,Mt=St-1,kt=St>>>1,At="[object Arguments]",Et="[object Array]",Pt="[object Boolean]",Ot="[object Date]",Tt="[object Error]",jt="[object Function]",Lt="[object GeneratorFunction]",Rt="[object Map]",Nt="[object Number]",Ft="[object Object]",Dt="[object Promise]",It="[object RegExp]",zt="[object Set]",qt="[object String]",Vt="[object Symbol]",Bt="[object WeakMap]",Wt="[object WeakSet]",Ut="[object ArrayBuffer]",Ht="[object DataView]",Yt="[object Float32Array]",Gt="[object Float64Array]",Xt="[object Int8Array]",Zt="[object Int16Array]",Jt="[object Int32Array]",Kt="[object Uint8Array]",Qt="[object Uint8ClampedArray]",tn="[object Uint16Array]",nn="[object Uint32Array]",en=/\b__p \+= '';/g,rn=/\b(__p \+=) '' \+/g,on=/(__e\(.*?\)|\b__t\)) \+\n'';/g,an=/&(?:amp|lt|gt|quot|#39|#96);/g,un=/[&<>"'`]/g,sn=RegExp(an.source),ln=RegExp(un.source),cn=/<%-([\s\S]+?)%>/g,fn=/<%([\s\S]+?)%>/g,hn=/<%=([\s\S]+?)%>/g,pn=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,dn=/^\w*$/,vn=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]/g,gn=/[\\^$.*+?()[\]{}|]/g,mn=RegExp(gn.source),yn=/^\s+|\s+$/g,$n=/^\s+/,xn=/\s+$/,bn=/[a-zA-Z0-9]+/g,wn=/\\(\\)?/g,_n=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Cn=/\w*$/,Sn=/^0x/i,Mn=/^[-+]0x[0-9a-f]+$/i,kn=/^0b[01]+$/i,An=/^\[object .+?Constructor\]$/,En=/^0o[0-7]+$/i,Pn=/^(?:0|[1-9]\d*)$/,On=/[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g,Tn=/($^)/,jn=/['\n\r\u2028\u2029\\]/g,Ln="\\ud800-\\udfff",Rn="\\u0300-\\u036f\\ufe20-\\ufe23",Nn="\\u20d0-\\u20f0",Fn="\\u2700-\\u27bf",Dn="a-z\\xdf-\\xf6\\xf8-\\xff",In="\\xac\\xb1\\xd7\\xf7",zn="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",qn="\\u2018\\u2019\\u201c\\u201d",Vn=" \\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",Bn="A-Z\\xc0-\\xd6\\xd8-\\xde",Wn="\\ufe0e\\ufe0f",Un=In+zn+qn+Vn,Hn="['’]",Yn="["+Ln+"]",Gn="["+Un+"]",Xn="["+Rn+Nn+"]",Zn="\\d+",Jn="["+Fn+"]",Kn="["+Dn+"]",Qn="[^"+Ln+Un+Zn+Fn+Dn+Bn+"]",te="\\ud83c[\\udffb-\\udfff]",ne="(?:"+Xn+"|"+te+")",ee="[^"+Ln+"]",re="(?:\\ud83c[\\udde6-\\uddff]){2}",ie="[\\ud800-\\udbff][\\udc00-\\udfff]",oe="["+Bn+"]",ae="\\u200d",ue="(?:"+Kn+"|"+Qn+")",se="(?:"+oe+"|"+Qn+")",le="(?:"+Hn+"(?:d|ll|m|re|s|t|ve))?",ce="(?:"+Hn+"(?:D|LL|M|RE|S|T|VE))?",fe=ne+"?",he="["+Wn+"]?",pe="(?:"+ae+"(?:"+[ee,re,ie].join("|")+")"+he+fe+")*",de=he+fe+pe,ve="(?:"+[Jn,re,ie].join("|")+")"+de,ge="(?:"+[ee+Xn+"?",Xn,re,ie,Yn].join("|")+")",me=RegExp(Hn,"g"),ye=RegExp(Xn,"g"),$e=RegExp(te+"(?="+te+")|"+ge+de,"g"),xe=RegExp([oe+"?"+Kn+"+"+le+"(?="+[Gn,oe,"$"].join("|")+")",se+"+"+ce+"(?="+[Gn,oe+ue,"$"].join("|")+")",oe+"?"+ue+"+"+le,oe+"+"+ce,Zn,ve].join("|"),"g"),be=RegExp("["+ae+Ln+Rn+Nn+Wn+"]"),we=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,_e=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","Reflect","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Ce=-1,Se={};Se[Yt]=Se[Gt]=Se[Xt]=Se[Zt]=Se[Jt]=Se[Kt]=Se[Qt]=Se[tn]=Se[nn]=!0,Se[At]=Se[Et]=Se[Ut]=Se[Pt]=Se[Ht]=Se[Ot]=Se[Tt]=Se[jt]=Se[Rt]=Se[Nt]=Se[Ft]=Se[It]=Se[zt]=Se[qt]=Se[Bt]=!1;var Me={};Me[At]=Me[Et]=Me[Ut]=Me[Ht]=Me[Pt]=Me[Ot]=Me[Yt]=Me[Gt]=Me[Xt]=Me[Zt]=Me[Jt]=Me[Rt]=Me[Nt]=Me[Ft]=Me[It]=Me[zt]=Me[qt]=Me[Vt]=Me[Kt]=Me[Qt]=Me[tn]=Me[nn]=!0,Me[Tt]=Me[jt]=Me[Bt]=!1;var ke={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss"},Ae={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},Ee={"&":"&","<":"<",">":">",""":'"',"'":"'","`":"`"},Pe={"function":!0,object:!0},Oe={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Te=parseFloat,je=parseInt,Le=Pe[typeof exports]&&exports&&!exports.nodeType?exports:Z,Re=Pe[typeof module]&&module&&!module.nodeType?module:Z,Ne=Re&&Re.exports===Le?Le:Z,Fe=O(Le&&Re&&"object"==typeof global&&global),De=O(Pe[typeof self]&&self),Ie=O(Pe[typeof window]&&window),ze=O(Pe[typeof this]&&this),qe=Fe||Ie!==(ze&&ze.window)&&Ie||De||ze||Function("return this")(),Ve=X();(Ie||De||{})._=Ve,"function"==typeof define&&"object"==typeof define.amd&&define.amd?define(function(){return Ve}):Le&&Re?(Ne&&((Re.exports=Ve)._=Ve),Le._=Ve):qe._=Ve}.call(this),function(){"use strict";var t=this,n=t.Chart,e=function(t){this.canvas=t.canvas,this.ctx=t;var n=function(t,n){return t["offset"+n]?t["offset"+n]:document.defaultView.getComputedStyle(t).getPropertyValue(n)};this.width=n(t.canvas,"Width")||t.canvas.width,this.height=n(t.canvas,"Height")||t.canvas.height;return this.aspectRatio=this.width/this.height,r.retinaScale(this),this};e.defaults={global:{animation:!0,animationSteps:60,animationEasing:"easeOutQuart",showScale:!0,scaleOverride:!1,scaleSteps:null,scaleStepWidth:null,scaleStartValue:null,scaleLineColor:"rgba(0,0,0,.1)",scaleLineWidth:1,scaleShowLabels:!0,scaleLabel:"<%=value%>",scaleIntegersOnly:!0,scaleBeginAtZero:!1,scaleFontFamily:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",scaleFontSize:12,scaleFontStyle:"normal",scaleFontColor:"#666",responsive:!1,maintainAspectRatio:!0,showTooltips:!0,customTooltips:!1,tooltipEvents:["mousemove","touchstart","touchmove","mouseout"],tooltipFillColor:"rgba(0,0,0,0.8)",tooltipFontFamily:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",tooltipFontSize:14,tooltipFontStyle:"normal",tooltipFontColor:"#fff",tooltipTitleFontFamily:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",tooltipTitleFontSize:14,tooltipTitleFontStyle:"bold",tooltipTitleFontColor:"#fff",tooltipTitleTemplate:"<%= label%>",tooltipYPadding:6,tooltipXPadding:6,tooltipCaretSize:8,tooltipCornerRadius:6,tooltipXOffset:10,tooltipTemplate:"<%if (label){%><%=label%>: <%}%><%= value %>",multiTooltipTemplate:"<%= datasetLabel %>: <%= value %>",multiTooltipKeyBackground:"#fff",segmentColorDefault:["#A6CEE3","#1F78B4","#B2DF8A","#33A02C","#FB9A99","#E31A1C","#FDBF6F","#FF7F00","#CAB2D6","#6A3D9A","#B4B482","#B15928"],segmentHighlightColorDefaults:["#CEF6FF","#47A0DC","#DAFFB2","#5BC854","#FFC2C1","#FF4244","#FFE797","#FFA728","#F2DAFE","#9265C2","#DCDCAA","#D98150"],onAnimationProgress:function(){},onAnimationComplete:function(){}}},e.types={};var r=e.helpers={},i=r.each=function(t,n,e){var r=Array.prototype.slice.call(arguments,3);if(t)if(t.length===+t.length){var i;for(i=0;i<t.length;i++)n.apply(e,[t[i],i].concat(r))}else for(var o in t)n.apply(e,[t[o],o].concat(r))},o=r.clone=function(t){var n={};return i(t,function(e,r){t.hasOwnProperty(r)&&(n[r]=e)}),n},a=r.extend=function(t){return i(Array.prototype.slice.call(arguments,1),function(n){i(n,function(e,r){n.hasOwnProperty(r)&&(t[r]=e)})}),t},u=r.merge=function(t,n){var e=Array.prototype.slice.call(arguments,0);return e.unshift({}),a.apply(null,e)},s=r.indexOf=function(t,n){if(Array.prototype.indexOf)return t.indexOf(n);for(var e=0;e<t.length;e++)if(t[e]===n)return e;return-1},l=(r.where=function(t,n){var e=[];return r.each(t,function(t){n(t)&&e.push(t)}),e},r.findNextWhere=function(t,n,e){e||(e=-1);for(var r=e+1;r<t.length;r++){var i=t[r];if(n(i))return i}},r.findPreviousWhere=function(t,n,e){e||(e=t.length);for(var r=e-1;r>=0;r--){var i=t[r];if(n(i))return i}},r.inherits=function(t){var n=this,e=t&&t.hasOwnProperty("constructor")?t.constructor:function(){return n.apply(this,arguments)},r=function(){this.constructor=e};return r.prototype=n.prototype,e.prototype=new r,e.extend=l,t&&a(e.prototype,t),e.__super__=n.prototype,e}),c=r.noop=function(){},f=r.uid=function(){var t=0;return function(){return"chart-"+t++}}(),h=r.warn=function(t){window.console&&"function"==typeof window.console.warn&&console.warn(t)},p=r.amd="function"==typeof define&&define.amd,d=r.isNumber=function(t){return!isNaN(parseFloat(t))&&isFinite(t)},v=r.max=function(t){return Math.max.apply(Math,t)},g=r.min=function(t){return Math.min.apply(Math,t)},m=(r.cap=function(t,n,e){if(d(n)){if(t>n)return n}else if(d(e)&&e>t)return e;return t},r.getDecimalPlaces=function(t){if(t%1!==0&&d(t)){var n=t.toString();if(n.indexOf("e-")<0)return n.split(".")[1].length;if(n.indexOf(".")<0)return parseInt(n.split("e-")[1]);var e=n.split(".")[1].split("e-");return e[0].length+parseInt(e[1])}return 0}),y=r.radians=function(t){return t*(Math.PI/180)},$=(r.getAngleFromPoint=function(t,n){var e=n.x-t.x,r=n.y-t.y,i=Math.sqrt(e*e+r*r),o=2*Math.PI+Math.atan2(r,e);return 0>e&&0>r&&(o+=2*Math.PI),{angle:o,distance:i}},r.aliasPixel=function(t){return t%2===0?0:.5}),x=(r.splineCurve=function(t,n,e,r){var i=Math.sqrt(Math.pow(n.x-t.x,2)+Math.pow(n.y-t.y,2)),o=Math.sqrt(Math.pow(e.x-n.x,2)+Math.pow(e.y-n.y,2)),a=r*i/(i+o),u=r*o/(i+o);return{inner:{x:n.x-a*(e.x-t.x),y:n.y-a*(e.y-t.y)},outer:{x:n.x+u*(e.x-t.x),y:n.y+u*(e.y-t.y)}}},r.calculateOrderOfMagnitude=function(t){return Math.floor(Math.log(t)/Math.LN10)}),b=(r.calculateScaleRange=function(t,n,e,r,o){var a=2,u=Math.floor(n/(1.5*e)),s=a>=u,l=[];i(t,function(t){null==t||l.push(t)});var c=g(l),f=v(l);f===c&&(f+=.5,c>=.5&&!r?c-=.5:f+=.5);for(var h=Math.abs(f-c),p=x(h),d=Math.ceil(f/(1*Math.pow(10,p)))*Math.pow(10,p),m=r?0:Math.floor(c/(1*Math.pow(10,p)))*Math.pow(10,p),y=d-m,$=Math.pow(10,p),b=Math.round(y/$);(b>u||u>2*b)&&!s;)if(b>u)$*=2,b=Math.round(y/$),b%1!==0&&(s=!0);else if(o&&p>=0){if($/2%1!==0)break;$/=2,b=Math.round(y/$)}else $/=2,b=Math.round(y/$);return s&&(b=a,$=y/b),{steps:b,stepValue:$,min:m,max:m+b*$}},r.template=function(t,n){function e(t,n){var e=/\W/.test(t)?new Function("obj","var p=[],print=function(){p.push.apply(p,arguments);};with(obj){p.push('"+t.replace(/[\r\t\n]/g," ").split("<%").join(" ").replace(/((^|%>)[^\t]*)'/g,"$1\r").replace(/\t=(.*?)%>/g,"',$1,'").split(" ").join("');").split("%>").join("p.push('").split("\r").join("\\'")+"');}return p.join('');"):r[t]=r[t];return n?e(n):e}if(t instanceof Function)return t(n);var r={};return e(t,n)}),w=(r.generateLabels=function(t,n,e,r){var o=new Array(n);return t&&i(o,function(n,i){o[i]=b(t,{value:e+r*(i+1)})}),o},r.easingEffects={linear:function(t){return t},easeInQuad:function(t){return t*t},easeOutQuad:function(t){return-1*t*(t-2)},easeInOutQuad:function(t){return(t/=.5)<1?.5*t*t:-0.5*(--t*(t-2)-1)},easeInCubic:function(t){return t*t*t},easeOutCubic:function(t){return 1*((t=t/1-1)*t*t+1)},easeInOutCubic:function(t){return(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},easeInQuart:function(t){return t*t*t*t},easeOutQuart:function(t){return-1*((t=t/1-1)*t*t*t-1)},easeInOutQuart:function(t){return(t/=.5)<1?.5*t*t*t*t:-0.5*((t-=2)*t*t*t-2)},easeInQuint:function(t){return 1*(t/=1)*t*t*t*t},easeOutQuint:function(t){return 1*((t=t/1-1)*t*t*t*t+1)},easeInOutQuint:function(t){return(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},easeInSine:function(t){return-1*Math.cos(t/1*(Math.PI/2))+1},easeOutSine:function(t){return 1*Math.sin(t/1*(Math.PI/2))},easeInOutSine:function(t){return-0.5*(Math.cos(Math.PI*t/1)-1)},easeInExpo:function(t){return 0===t?1:1*Math.pow(2,10*(t/1-1))},easeOutExpo:function(t){return 1===t?1:1*(-Math.pow(2,-10*t/1)+1)},easeInOutExpo:function(t){return 0===t?0:1===t?1:(t/=.5)<1?.5*Math.pow(2,10*(t-1)):.5*(-Math.pow(2,-10*--t)+2)},easeInCirc:function(t){return t>=1?t:-1*(Math.sqrt(1-(t/=1)*t)-1)},easeOutCirc:function(t){return 1*Math.sqrt(1-(t=t/1-1)*t)},easeInOutCirc:function(t){return(t/=.5)<1?-0.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},easeInElastic:function(t){var n=1.70158,e=0,r=1;return 0===t?0:1==(t/=1)?1:(e||(e=.3),r<Math.abs(1)?(r=1,n=e/4):n=e/(2*Math.PI)*Math.asin(1/r),-(r*Math.pow(2,10*(t-=1))*Math.sin((1*t-n)*(2*Math.PI)/e)))},easeOutElastic:function(t){var n=1.70158,e=0,r=1;return 0===t?0:1==(t/=1)?1:(e||(e=.3),r<Math.abs(1)?(r=1,n=e/4):n=e/(2*Math.PI)*Math.asin(1/r),r*Math.pow(2,-10*t)*Math.sin((1*t-n)*(2*Math.PI)/e)+1)},easeInOutElastic:function(t){var n=1.70158,e=0,r=1;return 0===t?0:2==(t/=.5)?1:(e||(e=1*(.3*1.5)),r<Math.abs(1)?(r=1,n=e/4):n=e/(2*Math.PI)*Math.asin(1/r),1>t?-.5*(r*Math.pow(2,10*(t-=1))*Math.sin((1*t-n)*(2*Math.PI)/e)):r*Math.pow(2,-10*(t-=1))*Math.sin((1*t-n)*(2*Math.PI)/e)*.5+1)},easeInBack:function(t){var n=1.70158;return 1*(t/=1)*t*((n+1)*t-n)},easeOutBack:function(t){var n=1.70158;return 1*((t=t/1-1)*t*((n+1)*t+n)+1)},easeInOutBack:function(t){var n=1.70158;return(t/=.5)<1?.5*(t*t*(((n*=1.525)+1)*t-n)):.5*((t-=2)*t*(((n*=1.525)+1)*t+n)+2)},easeInBounce:function(t){return 1-w.easeOutBounce(1-t)},easeOutBounce:function(t){return(t/=1)<1/2.75?1*(7.5625*t*t):2/2.75>t?1*(7.5625*(t-=1.5/2.75)*t+.75):2.5/2.75>t?1*(7.5625*(t-=2.25/2.75)*t+.9375):1*(7.5625*(t-=2.625/2.75)*t+.984375)},easeInOutBounce:function(t){return.5>t?.5*w.easeInBounce(2*t):.5*w.easeOutBounce(2*t-1)+.5}}),_=r.requestAnimFrame=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(t){return window.setTimeout(t,1e3/60)}}(),C=(r.cancelAnimFrame=function(){return window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||window.oCancelAnimationFrame||window.msCancelAnimationFrame||function(t){return window.clearTimeout(t,1e3/60)}}(),r.animationLoop=function(t,n,e,r,i,o){var a=0,u=w[e]||w.linear,s=function(){a++;var e=a/n,l=u(e);t.call(o,l,e,a),r.call(o,l,e),n>a?o.animationFrame=_(s):i.apply(o)};_(s)},r.getRelativePosition=function(t){var n,e,r=t.originalEvent||t,i=t.currentTarget||t.srcElement,o=i.getBoundingClientRect();return r.touches?(n=r.touches[0].clientX-o.left,e=r.touches[0].clientY-o.top):(n=r.clientX-o.left,e=r.clientY-o.top),{x:n,y:e}},r.addEvent=function(t,n,e){t.addEventListener?t.addEventListener(n,e):t.attachEvent?t.attachEvent("on"+n,e):t["on"+n]=e}),S=r.removeEvent=function(t,n,e){t.removeEventListener?t.removeEventListener(n,e,!1):t.detachEvent?t.detachEvent("on"+n,e):t["on"+n]=c},M=(r.bindEvents=function(t,n,e){t.events||(t.events={}),i(n,function(n){t.events[n]=function(){e.apply(t,arguments)},C(t.chart.canvas,n,t.events[n])})},r.unbindEvents=function(t,n){i(n,function(n,e){S(t.chart.canvas,e,n)})}),k=r.getMaximumWidth=function(t){var n=t.parentNode,e=parseInt(E(n,"padding-left"))+parseInt(E(n,"padding-right"));return n?n.clientWidth-e:0},A=r.getMaximumHeight=function(t){var n=t.parentNode,e=parseInt(E(n,"padding-bottom"))+parseInt(E(n,"padding-top"));return n?n.clientHeight-e:0},E=r.getStyle=function(t,n){return t.currentStyle?t.currentStyle[n]:document.defaultView.getComputedStyle(t,null).getPropertyValue(n)},P=(r.getMaximumSize=r.getMaximumWidth,r.retinaScale=function(t){var n=t.ctx,e=t.canvas.width,r=t.canvas.height;window.devicePixelRatio&&(n.canvas.style.width=e+"px",n.canvas.style.height=r+"px",n.canvas.height=r*window.devicePixelRatio,n.canvas.width=e*window.devicePixelRatio,n.scale(window.devicePixelRatio,window.devicePixelRatio))}),O=r.clear=function(t){t.ctx.clearRect(0,0,t.width,t.height)},T=r.fontString=function(t,n,e){return n+" "+t+"px "+e},j=r.longestText=function(t,n,e){t.font=n;var r=0;return i(e,function(n){var e=t.measureText(n).width;r=e>r?e:r}),r},L=r.drawRoundedRectangle=function(t,n,e,r,i,o){t.beginPath(),t.moveTo(n+o,e),t.lineTo(n+r-o,e),t.quadraticCurveTo(n+r,e,n+r,e+o),t.lineTo(n+r,e+i-o),t.quadraticCurveTo(n+r,e+i,n+r-o,e+i),t.lineTo(n+o,e+i),t.quadraticCurveTo(n,e+i,n,e+i-o),t.lineTo(n,e+o),t.quadraticCurveTo(n,e,n+o,e),t.closePath()};e.instances={},e.Type=function(t,n,r){this.options=n,this.chart=r,this.id=f(),e.instances[this.id]=this,n.responsive&&this.resize(),this.initialize.call(this,t)},a(e.Type.prototype,{initialize:function(){return this},clear:function(){return O(this.chart),this},stop:function(){return e.animationService.cancelAnimation(this),this},resize:function(t){this.stop();var n=this.chart.canvas,e=k(this.chart.canvas),r=this.options.maintainAspectRatio?e/this.chart.aspectRatio:A(this.chart.canvas);return n.width=this.chart.width=e,n.height=this.chart.height=r,P(this.chart),"function"==typeof t&&t.apply(this,Array.prototype.slice.call(arguments,1)),this},reflow:c,render:function(t){if(t&&this.reflow(),this.options.animation&&!t){var n=new e.Animation;n.numSteps=this.options.animationSteps,n.easing=this.options.animationEasing,n.render=function(t,n){var e=r.easingEffects[n.easing],i=n.currentStep/n.numSteps,o=e(i);t.draw(o,i,n.currentStep)},n.onAnimationProgress=this.options.onAnimationProgress,n.onAnimationComplete=this.options.onAnimationComplete,e.animationService.addAnimation(this,n)}else this.draw(),this.options.onAnimationComplete.call(this);return this},generateLegend:function(){return r.template(this.options.legendTemplate,this)},destroy:function(){this.stop(),this.clear(),M(this,this.events);var t=this.chart.canvas;t.width=this.chart.width,t.height=this.chart.height,t.style.removeProperty?(t.style.removeProperty("width"),t.style.removeProperty("height")):(t.style.removeAttribute("width"),t.style.removeAttribute("height")),delete e.instances[this.id]},showTooltip:function(t,n){"undefined"==typeof this.activeElements&&(this.activeElements=[]);var o=function(t){var n=!1;return t.length!==this.activeElements.length?n=!0:(i(t,function(t,e){t!==this.activeElements[e]&&(n=!0)},this),n)}.call(this,t);if(o||n){if(this.activeElements=t,this.draw(),this.options.customTooltips&&this.options.customTooltips(!1),t.length>0)if(this.datasets&&this.datasets.length>1){for(var a,u,l=this.datasets.length-1;l>=0&&(a=this.datasets[l].points||this.datasets[l].bars||this.datasets[l].segments,u=s(a,t[0]),-1===u);l--);var c=[],f=[],h=function(t){var n,e,i,o,a,s=[],l=[],h=[];return r.each(this.datasets,function(t){n=t.points||t.bars||t.segments,n[u]&&n[u].hasValue()&&s.push(n[u])}),r.each(s,function(t){l.push(t.x),h.push(t.y),c.push(r.template(this.options.multiTooltipTemplate,t)),f.push({fill:t._saved.fillColor||t.fillColor,stroke:t._saved.strokeColor||t.strokeColor})},this),a=g(h),i=v(h),o=g(l),e=v(l),{x:o>this.chart.width/2?o:e,y:(a+i)/2}}.call(this,u);new e.MultiTooltip({x:h.x,y:h.y,xPadding:this.options.tooltipXPadding,yPadding:this.options.tooltipYPadding,xOffset:this.options.tooltipXOffset,fillColor:this.options.tooltipFillColor,textColor:this.options.tooltipFontColor,fontFamily:this.options.tooltipFontFamily,fontStyle:this.options.tooltipFontStyle,fontSize:this.options.tooltipFontSize,titleTextColor:this.options.tooltipTitleFontColor,titleFontFamily:this.options.tooltipTitleFontFamily,titleFontStyle:this.options.tooltipTitleFontStyle,titleFontSize:this.options.tooltipTitleFontSize,cornerRadius:this.options.tooltipCornerRadius,labels:c,legendColors:f,legendColorBackground:this.options.multiTooltipKeyBackground,title:b(this.options.tooltipTitleTemplate,t[0]),chart:this.chart,ctx:this.chart.ctx,custom:this.options.customTooltips}).draw()}else i(t,function(t){var n=t.tooltipPosition();new e.Tooltip({x:Math.round(n.x),y:Math.round(n.y),xPadding:this.options.tooltipXPadding,yPadding:this.options.tooltipYPadding,fillColor:this.options.tooltipFillColor,textColor:this.options.tooltipFontColor,fontFamily:this.options.tooltipFontFamily,fontStyle:this.options.tooltipFontStyle,fontSize:this.options.tooltipFontSize,caretHeight:this.options.tooltipCaretSize,cornerRadius:this.options.tooltipCornerRadius,text:b(this.options.tooltipTemplate,t),chart:this.chart,custom:this.options.customTooltips}).draw()},this);return this}},toBase64Image:function(){return this.chart.canvas.toDataURL.apply(this.chart.canvas,arguments)}}),e.Type.extend=function(t){var n=this,r=function(){return n.apply(this,arguments)};if(r.prototype=o(n.prototype),a(r.prototype,t),r.extend=e.Type.extend,t.name||n.prototype.name){var i=t.name||n.prototype.name,s=e.defaults[n.prototype.name]?o(e.defaults[n.prototype.name]):{};e.defaults[i]=a(s,t.defaults),e.types[i]=r,e.prototype[i]=function(t,n){var o=u(e.defaults.global,e.defaults[i],n||{});return new r(t,o,this)}}else h("Name not provided for this chart, so it hasn't been registered");return n},e.Element=function(t){a(this,t),this.initialize.apply(this,arguments),this.save()},a(e.Element.prototype,{initialize:function(){},restore:function(t){return t?i(t,function(t){this[t]=this._saved[t]},this):a(this,this._saved),this},save:function(){return this._saved=o(this),delete this._saved._saved,this},update:function(t){return i(t,function(t,n){this._saved[n]=this[n],this[n]=t},this),this},transition:function(t,n){return i(t,function(t,e){this[e]=(t-this._saved[e])*n+this._saved[e]},this),this},tooltipPosition:function(){return{x:this.x,y:this.y}},hasValue:function(){return d(this.value)}}),e.Element.extend=l,e.Point=e.Element.extend({display:!0,inRange:function(t,n){var e=this.hitDetectionRadius+this.radius;return Math.pow(t-this.x,2)+Math.pow(n-this.y,2)<Math.pow(e,2)},draw:function(){if(this.display){var t=this.ctx;t.beginPath(),t.arc(this.x,this.y,this.radius,0,2*Math.PI),t.closePath(),t.strokeStyle=this.strokeColor,t.lineWidth=this.strokeWidth,t.fillStyle=this.fillColor,t.fill(),t.stroke()}}}),e.Arc=e.Element.extend({inRange:function(t,n){var e=r.getAngleFromPoint(this,{x:t,y:n}),i=e.angle%(2*Math.PI),o=(2*Math.PI+this.startAngle)%(2*Math.PI),a=(2*Math.PI+this.endAngle)%(2*Math.PI)||360,u=o>a?a>=i||i>=o:i>=o&&a>=i,s=e.distance>=this.innerRadius&&e.distance<=this.outerRadius;return u&&s},tooltipPosition:function(){var t=this.startAngle+(this.endAngle-this.startAngle)/2,n=(this.outerRadius-this.innerRadius)/2+this.innerRadius;return{x:this.x+Math.cos(t)*n,y:this.y+Math.sin(t)*n}},draw:function(t){var n=this.ctx;n.beginPath(),n.arc(this.x,this.y,this.outerRadius<0?0:this.outerRadius,this.startAngle,this.endAngle),n.arc(this.x,this.y,this.innerRadius<0?0:this.innerRadius,this.endAngle,this.startAngle,!0),n.closePath(),n.strokeStyle=this.strokeColor,n.lineWidth=this.strokeWidth,n.fillStyle=this.fillColor,n.fill(),n.lineJoin="bevel",this.showStroke&&n.stroke()}}),e.Rectangle=e.Element.extend({draw:function(){var t=this.ctx,n=this.width/2,e=this.x-n,r=this.x+n,i=this.base-(this.base-this.y),o=this.strokeWidth/2;this.showStroke&&(e+=o,r-=o,i+=o),t.beginPath(),t.fillStyle=this.fillColor,t.strokeStyle=this.strokeColor,t.lineWidth=this.strokeWidth,t.moveTo(e,this.base),t.lineTo(e,i),t.lineTo(r,i),t.lineTo(r,this.base),t.fill(),this.showStroke&&t.stroke()},height:function(){return this.base-this.y},inRange:function(t,n){return t>=this.x-this.width/2&&t<=this.x+this.width/2&&n>=this.y&&n<=this.base}}),e.Animation=e.Element.extend({currentStep:null,numSteps:60,easing:"",render:null,onAnimationProgress:null,onAnimationComplete:null}),e.Tooltip=e.Element.extend({draw:function(){var t=this.chart.ctx;
-t.font=T(this.fontSize,this.fontStyle,this.fontFamily),this.xAlign="center",this.yAlign="above";var n=this.caretPadding=2,e=t.measureText(this.text).width+2*this.xPadding,r=this.fontSize+2*this.yPadding,i=r+this.caretHeight+n;this.x+e/2>this.chart.width?this.xAlign="left":this.x-e/2<0&&(this.xAlign="right"),this.y-i<0&&(this.yAlign="below");var o=this.x-e/2,a=this.y-i;if(t.fillStyle=this.fillColor,this.custom)this.custom(this);else{switch(this.yAlign){case"above":t.beginPath(),t.moveTo(this.x,this.y-n),t.lineTo(this.x+this.caretHeight,this.y-(n+this.caretHeight)),t.lineTo(this.x-this.caretHeight,this.y-(n+this.caretHeight)),t.closePath(),t.fill();break;case"below":a=this.y+n+this.caretHeight,t.beginPath(),t.moveTo(this.x,this.y+n),t.lineTo(this.x+this.caretHeight,this.y+n+this.caretHeight),t.lineTo(this.x-this.caretHeight,this.y+n+this.caretHeight),t.closePath(),t.fill()}switch(this.xAlign){case"left":o=this.x-e+(this.cornerRadius+this.caretHeight);break;case"right":o=this.x-(this.cornerRadius+this.caretHeight)}L(t,o,a,e,r,this.cornerRadius),t.fill(),t.fillStyle=this.textColor,t.textAlign="center",t.textBaseline="middle",t.fillText(this.text,o+e/2,a+r/2)}}}),e.MultiTooltip=e.Element.extend({initialize:function(){this.font=T(this.fontSize,this.fontStyle,this.fontFamily),this.titleFont=T(this.titleFontSize,this.titleFontStyle,this.titleFontFamily),this.titleHeight=this.title?1.5*this.titleFontSize:0,this.height=this.labels.length*this.fontSize+(this.labels.length-1)*(this.fontSize/2)+2*this.yPadding+this.titleHeight,this.ctx.font=this.titleFont;var t=this.ctx.measureText(this.title).width,n=j(this.ctx,this.font,this.labels)+this.fontSize+3,e=v([n,t]);this.width=e+2*this.xPadding;var r=this.height/2;this.y-r<0?this.y=r:this.y+r>this.chart.height&&(this.y=this.chart.height-r),this.x>this.chart.width/2?this.x-=this.xOffset+this.width:this.x+=this.xOffset},getLineHeight:function(t){var n=this.y-this.height/2+this.yPadding,e=t-1;return 0===t?n+this.titleHeight/3:n+(1.5*this.fontSize*e+this.fontSize/2)+this.titleHeight},draw:function(){if(this.custom)this.custom(this);else{L(this.ctx,this.x,this.y-this.height/2,this.width,this.height,this.cornerRadius);var t=this.ctx;t.fillStyle=this.fillColor,t.fill(),t.closePath(),t.textAlign="left",t.textBaseline="middle",t.fillStyle=this.titleTextColor,t.font=this.titleFont,t.fillText(this.title,this.x+this.xPadding,this.getLineHeight(0)),t.font=this.font,r.each(this.labels,function(n,e){t.fillStyle=this.textColor,t.fillText(n,this.x+this.xPadding+this.fontSize+3,this.getLineHeight(e+1)),t.fillStyle=this.legendColorBackground,t.fillRect(this.x+this.xPadding,this.getLineHeight(e+1)-this.fontSize/2,this.fontSize,this.fontSize),t.fillStyle=this.legendColors[e].fill,t.fillRect(this.x+this.xPadding,this.getLineHeight(e+1)-this.fontSize/2,this.fontSize,this.fontSize)},this)}}}),e.Scale=e.Element.extend({initialize:function(){this.fit()},buildYLabels:function(){this.yLabels=[];for(var t=m(this.stepValue),n=0;n<=this.steps;n++)this.yLabels.push(b(this.templateString,{value:(this.min+n*this.stepValue).toFixed(t)}));this.yLabelWidth=this.display&&this.showLabels?j(this.ctx,this.font,this.yLabels)+10:0},addXLabel:function(t){this.xLabels.push(t),this.valuesCount++,this.fit()},removeXLabel:function(){this.xLabels.shift(),this.valuesCount--,this.fit()},fit:function(){this.startPoint=this.display?this.fontSize:0,this.endPoint=this.display?this.height-1.5*this.fontSize-5:this.height,this.startPoint+=this.padding,this.endPoint-=this.padding;var t,n=this.endPoint,e=this.endPoint-this.startPoint;for(this.calculateYRange(e),this.buildYLabels(),this.calculateXLabelRotation();e>this.endPoint-this.startPoint;)e=this.endPoint-this.startPoint,t=this.yLabelWidth,this.calculateYRange(e),this.buildYLabels(),t<this.yLabelWidth&&(this.endPoint=n,this.calculateXLabelRotation())},calculateXLabelRotation:function(){this.ctx.font=this.font;var t,n,e=this.ctx.measureText(this.xLabels[0]).width,r=this.ctx.measureText(this.xLabels[this.xLabels.length-1]).width;if(this.xScalePaddingRight=r/2+3,this.xScalePaddingLeft=e/2>this.yLabelWidth?e/2:this.yLabelWidth,this.xLabelRotation=0,this.display){var i,o=j(this.ctx,this.font,this.xLabels);this.xLabelWidth=o;for(var a=Math.floor(this.calculateX(1)-this.calculateX(0))-6;this.xLabelWidth>a&&0===this.xLabelRotation||this.xLabelWidth>a&&this.xLabelRotation<=90&&this.xLabelRotation>0;)i=Math.cos(y(this.xLabelRotation)),t=i*e,n=i*r,t+this.fontSize/2>this.yLabelWidth&&(this.xScalePaddingLeft=t+this.fontSize/2),this.xScalePaddingRight=this.fontSize/2,this.xLabelRotation++,this.xLabelWidth=i*o;this.xLabelRotation>0&&(this.endPoint-=Math.sin(y(this.xLabelRotation))*o+3)}else this.xLabelWidth=0,this.xScalePaddingRight=this.padding,this.xScalePaddingLeft=this.padding},calculateYRange:c,drawingArea:function(){return this.startPoint-this.endPoint},calculateY:function(t){var n=this.drawingArea()/(this.min-this.max);return this.endPoint-n*(t-this.min)},calculateX:function(t){var n=(this.xLabelRotation>0,this.width-(this.xScalePaddingLeft+this.xScalePaddingRight)),e=n/Math.max(this.valuesCount-(this.offsetGridLines?0:1),1),r=e*t+this.xScalePaddingLeft;return this.offsetGridLines&&(r+=e/2),Math.round(r)},update:function(t){r.extend(this,t),this.fit()},draw:function(){var t=this.ctx,n=(this.endPoint-this.startPoint)/this.steps,e=Math.round(this.xScalePaddingLeft);this.display&&(t.fillStyle=this.textColor,t.font=this.font,i(this.yLabels,function(i,o){var a=this.endPoint-n*o,u=Math.round(a),s=this.showHorizontalLines;t.textAlign="right",t.textBaseline="middle",this.showLabels&&t.fillText(i,e-10,a),0!==o||s||(s=!0),s&&t.beginPath(),o>0?(t.lineWidth=this.gridLineWidth,t.strokeStyle=this.gridLineColor):(t.lineWidth=this.lineWidth,t.strokeStyle=this.lineColor),u+=r.aliasPixel(t.lineWidth),s&&(t.moveTo(e,u),t.lineTo(this.width,u),t.stroke(),t.closePath()),t.lineWidth=this.lineWidth,t.strokeStyle=this.lineColor,t.beginPath(),t.moveTo(e-5,u),t.lineTo(e,u),t.stroke(),t.closePath()},this),i(this.xLabels,function(n,e){var r=this.calculateX(e)+$(this.lineWidth),i=this.calculateX(e-(this.offsetGridLines?.5:0))+$(this.lineWidth),o=this.xLabelRotation>0,a=this.showVerticalLines;0!==e||a||(a=!0),a&&t.beginPath(),e>0?(t.lineWidth=this.gridLineWidth,t.strokeStyle=this.gridLineColor):(t.lineWidth=this.lineWidth,t.strokeStyle=this.lineColor),a&&(t.moveTo(i,this.endPoint),t.lineTo(i,this.startPoint-3),t.stroke(),t.closePath()),t.lineWidth=this.lineWidth,t.strokeStyle=this.lineColor,t.beginPath(),t.moveTo(i,this.endPoint),t.lineTo(i,this.endPoint+5),t.stroke(),t.closePath(),t.save(),t.translate(r,o?this.endPoint+12:this.endPoint+8),t.rotate(-1*y(this.xLabelRotation)),t.font=this.font,t.textAlign=o?"right":"center",t.textBaseline=o?"middle":"top",t.fillText(n,0,0),t.restore()},this))}}),e.RadialScale=e.Element.extend({initialize:function(){this.size=g([this.height,this.width]),this.drawingArea=this.display?this.size/2-(this.fontSize/2+this.backdropPaddingY):this.size/2},calculateCenterOffset:function(t){var n=this.drawingArea/(this.max-this.min);return(t-this.min)*n},update:function(){this.lineArc?this.drawingArea=this.display?this.size/2-(this.fontSize/2+this.backdropPaddingY):this.size/2:this.setScaleSize(),this.buildYLabels()},buildYLabels:function(){this.yLabels=[];for(var t=m(this.stepValue),n=0;n<=this.steps;n++)this.yLabels.push(b(this.templateString,{value:(this.min+n*this.stepValue).toFixed(t)}))},getCircumference:function(){return 2*Math.PI/this.valuesCount},setScaleSize:function(){var t,n,e,r,i,o,a,u,s,l,c,f,h=g([this.height/2-this.pointLabelFontSize-5,this.width/2]),p=this.width,v=0;for(this.ctx.font=T(this.pointLabelFontSize,this.pointLabelFontStyle,this.pointLabelFontFamily),n=0;n<this.valuesCount;n++)t=this.getPointPosition(n,h),e=this.ctx.measureText(b(this.templateString,{value:this.labels[n]})).width+5,0===n||n===this.valuesCount/2?(r=e/2,t.x+r>p&&(p=t.x+r,i=n),t.x-r<v&&(v=t.x-r,a=n)):n<this.valuesCount/2?t.x+e>p&&(p=t.x+e,i=n):n>this.valuesCount/2&&t.x-e<v&&(v=t.x-e,a=n);s=v,l=Math.ceil(p-this.width),o=this.getIndexAngle(i),u=this.getIndexAngle(a),c=l/Math.sin(o+Math.PI/2),f=s/Math.sin(u+Math.PI/2),c=d(c)?c:0,f=d(f)?f:0,this.drawingArea=h-(f+c)/2,this.setCenterPoint(f,c)},setCenterPoint:function(t,n){var e=this.width-n-this.drawingArea,r=t+this.drawingArea;this.xCenter=(r+e)/2,this.yCenter=this.height/2},getIndexAngle:function(t){var n=2*Math.PI/this.valuesCount;return t*n-Math.PI/2},getPointPosition:function(t,n){var e=this.getIndexAngle(t);return{x:Math.cos(e)*n+this.xCenter,y:Math.sin(e)*n+this.yCenter}},draw:function(){if(this.display){var t=this.ctx;if(i(this.yLabels,function(n,e){if(e>0){var r,i=e*(this.drawingArea/this.steps),o=this.yCenter-i;if(this.lineWidth>0)if(t.strokeStyle=this.lineColor,t.lineWidth=this.lineWidth,this.lineArc)t.beginPath(),t.arc(this.xCenter,this.yCenter,i,0,2*Math.PI),t.closePath(),t.stroke();else{t.beginPath();for(var a=0;a<this.valuesCount;a++)r=this.getPointPosition(a,this.calculateCenterOffset(this.min+e*this.stepValue)),0===a?t.moveTo(r.x,r.y):t.lineTo(r.x,r.y);t.closePath(),t.stroke()}if(this.showLabels){if(t.font=T(this.fontSize,this.fontStyle,this.fontFamily),this.showLabelBackdrop){var u=t.measureText(n).width;t.fillStyle=this.backdropColor,t.fillRect(this.xCenter-u/2-this.backdropPaddingX,o-this.fontSize/2-this.backdropPaddingY,u+2*this.backdropPaddingX,this.fontSize+2*this.backdropPaddingY)}t.textAlign="center",t.textBaseline="middle",t.fillStyle=this.fontColor,t.fillText(n,this.xCenter,o)}}},this),!this.lineArc){t.lineWidth=this.angleLineWidth,t.strokeStyle=this.angleLineColor;for(var n=this.valuesCount-1;n>=0;n--){var e=null,r=null;if(this.angleLineWidth>0&&n%this.angleLineInterval===0&&(e=this.calculateCenterOffset(this.max),r=this.getPointPosition(n,e),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(r.x,r.y),t.stroke(),t.closePath()),this.backgroundColors&&this.backgroundColors.length==this.valuesCount){null==e&&(e=this.calculateCenterOffset(this.max)),null==r&&(r=this.getPointPosition(n,e));var o=this.getPointPosition(0===n?this.valuesCount-1:n-1,e),a=this.getPointPosition(n===this.valuesCount-1?0:n+1,e),u={x:(o.x+r.x)/2,y:(o.y+r.y)/2},s={x:(r.x+a.x)/2,y:(r.y+a.y)/2};t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(u.x,u.y),t.lineTo(r.x,r.y),t.lineTo(s.x,s.y),t.fillStyle=this.backgroundColors[n],t.fill(),t.closePath()}var l=this.getPointPosition(n,this.calculateCenterOffset(this.max)+5);t.font=T(this.pointLabelFontSize,this.pointLabelFontStyle,this.pointLabelFontFamily),t.fillStyle=this.pointLabelFontColor;var c=this.labels.length,f=this.labels.length/2,h=f/2,p=h>n||n>c-h,d=n===h||n===c-h;0===n?t.textAlign="center":n===f?t.textAlign="center":f>n?t.textAlign="left":t.textAlign="right",d?t.textBaseline="middle":p?t.textBaseline="bottom":t.textBaseline="top",t.fillText(this.labels[n],l.x,l.y)}}}}}),e.animationService={frameDuration:17,animations:[],dropFrames:0,addAnimation:function(t,n){for(var e=0;e<this.animations.length;++e)if(this.animations[e].chartInstance===t)return void(this.animations[e].animationObject=n);this.animations.push({chartInstance:t,animationObject:n}),1==this.animations.length&&r.requestAnimFrame.call(window,this.digestWrapper)},cancelAnimation:function(t){var n=r.findNextWhere(this.animations,function(n){return n.chartInstance===t});n&&this.animations.splice(n,1)},digestWrapper:function(){e.animationService.startDigest.call(e.animationService)},startDigest:function(){var t=Date.now(),n=0;this.dropFrames>1&&(n=Math.floor(this.dropFrames),this.dropFrames-=n);for(var e=0;e<this.animations.length;e++)null===this.animations[e].animationObject.currentStep&&(this.animations[e].animationObject.currentStep=0),this.animations[e].animationObject.currentStep+=1+n,this.animations[e].animationObject.currentStep>this.animations[e].animationObject.numSteps&&(this.animations[e].animationObject.currentStep=this.animations[e].animationObject.numSteps),this.animations[e].animationObject.render(this.animations[e].chartInstance,this.animations[e].animationObject),this.animations[e].animationObject.currentStep==this.animations[e].animationObject.numSteps&&(this.animations[e].animationObject.onAnimationComplete.call(this.animations[e].chartInstance),this.animations.splice(e,1),e--);var i=Date.now(),o=i-t-this.frameDuration,a=o/this.frameDuration;a>1&&(this.dropFrames+=a),this.animations.length>0&&r.requestAnimFrame.call(window,this.digestWrapper)}},r.addEvent(window,"resize",function(){var t;return function(){clearTimeout(t),t=setTimeout(function(){i(e.instances,function(t){t.options.responsive&&t.resize(t.render,!0)})},50)}}()),p?define("Chart",[],function(){return e}):"object"==typeof module&&module.exports&&(module.exports=e),t.Chart=e,e.noConflict=function(){return t.Chart=n,e}}.call(this),function(){"use strict";var t=this,n=t.Chart,e=n.helpers,r={scaleBeginAtZero:!0,scaleShowGridLines:!0,scaleGridLineColor:"rgba(0,0,0,.05)",scaleGridLineWidth:1,scaleShowHorizontalLines:!0,scaleShowVerticalLines:!0,barShowStroke:!0,barStrokeWidth:2,barValueSpacing:5,barDatasetSpacing:1,legendTemplate:'<ul class="<%=name.toLowerCase()%>-legend"><% for (var i=0; i<datasets.length; i++){%><li><span class="<%=name.toLowerCase()%>-legend-icon" style="background-color:<%=datasets[i].fillColor%>"></span><span class="<%=name.toLowerCase()%>-legend-text"><%if(datasets[i].label){%><%=datasets[i].label%><%}%></span></li><%}%></ul>'};n.Type.extend({name:"Bar",defaults:r,initialize:function(t){var r=this.options;this.ScaleClass=n.Scale.extend({offsetGridLines:!0,calculateBarX:function(t,n,e){var i=this.calculateBaseWidth(),o=this.calculateX(e)-i/2,a=this.calculateBarWidth(t);return o+a*n+n*r.barDatasetSpacing+a/2},calculateBaseWidth:function(){return this.calculateX(1)-this.calculateX(0)-2*r.barValueSpacing},calculateBarWidth:function(t){var n=this.calculateBaseWidth()-(t-1)*r.barDatasetSpacing;return n/t}}),this.datasets=[],this.options.showTooltips&&e.bindEvents(this,this.options.tooltipEvents,function(t){var n="mouseout"!==t.type?this.getBarsAtEvent(t):[];this.eachBars(function(t){t.restore(["fillColor","strokeColor"])}),e.each(n,function(t){t&&(t.fillColor=t.highlightFill,t.strokeColor=t.highlightStroke)}),this.showTooltip(n)}),this.BarClass=n.Rectangle.extend({strokeWidth:this.options.barStrokeWidth,showStroke:this.options.barShowStroke,ctx:this.chart.ctx}),e.each(t.datasets,function(n,r){var i={label:n.label||null,fillColor:n.fillColor,strokeColor:n.strokeColor,bars:[]};this.datasets.push(i),e.each(n.data,function(e,r){i.bars.push(new this.BarClass({value:e,label:t.labels[r],datasetLabel:n.label,strokeColor:"object"==typeof n.strokeColor?n.strokeColor[r]:n.strokeColor,fillColor:"object"==typeof n.fillColor?n.fillColor[r]:n.fillColor,highlightFill:n.highlightFill?"object"==typeof n.highlightFill?n.highlightFill[r]:n.highlightFill:"object"==typeof n.fillColor?n.fillColor[r]:n.fillColor,highlightStroke:n.highlightStroke?"object"==typeof n.highlightStroke?n.highlightStroke[r]:n.highlightStroke:"object"==typeof n.strokeColor?n.strokeColor[r]:n.strokeColor}))},this)},this),this.buildScale(t.labels),this.BarClass.prototype.base=this.scale.endPoint,this.eachBars(function(t,n,r){e.extend(t,{width:this.scale.calculateBarWidth(this.datasets.length),x:this.scale.calculateBarX(this.datasets.length,r,n),y:this.scale.endPoint}),t.save()},this),this.render()},update:function(){this.scale.update(),e.each(this.activeElements,function(t){t.restore(["fillColor","strokeColor"])}),this.eachBars(function(t){t.save()}),this.render()},eachBars:function(t){e.each(this.datasets,function(n,r){e.each(n.bars,t,this,r)},this)},getBarsAtEvent:function(t){for(var n,r=[],i=e.getRelativePosition(t),o=function(t){r.push(t.bars[n])},a=0;a<this.datasets.length;a++)for(n=0;n<this.datasets[a].bars.length;n++)if(this.datasets[a].bars[n].inRange(i.x,i.y))return e.each(this.datasets,o),r;return r},buildScale:function(t){var n=this,r=function(){var t=[];return n.eachBars(function(n){t.push(n.value)}),t},i={templateString:this.options.scaleLabel,height:this.chart.height,width:this.chart.width,ctx:this.chart.ctx,textColor:this.options.scaleFontColor,fontSize:this.options.scaleFontSize,fontStyle:this.options.scaleFontStyle,fontFamily:this.options.scaleFontFamily,valuesCount:t.length,beginAtZero:this.options.scaleBeginAtZero,integersOnly:this.options.scaleIntegersOnly,calculateYRange:function(t){var n=e.calculateScaleRange(r(),t,this.fontSize,this.beginAtZero,this.integersOnly);e.extend(this,n)},xLabels:t,font:e.fontString(this.options.scaleFontSize,this.options.scaleFontStyle,this.options.scaleFontFamily),lineWidth:this.options.scaleLineWidth,lineColor:this.options.scaleLineColor,showHorizontalLines:this.options.scaleShowHorizontalLines,showVerticalLines:this.options.scaleShowVerticalLines,gridLineWidth:this.options.scaleShowGridLines?this.options.scaleGridLineWidth:0,gridLineColor:this.options.scaleShowGridLines?this.options.scaleGridLineColor:"rgba(0,0,0,0)",padding:this.options.showScale?0:this.options.barShowStroke?this.options.barStrokeWidth:0,showLabels:this.options.scaleShowLabels,display:this.options.showScale};this.options.scaleOverride&&e.extend(i,{calculateYRange:e.noop,steps:this.options.scaleSteps,stepValue:this.options.scaleStepWidth,min:this.options.scaleStartValue,max:this.options.scaleStartValue+this.options.scaleSteps*this.options.scaleStepWidth}),this.scale=new this.ScaleClass(i)},addData:function(t,n){e.each(t,function(t,e){this.datasets[e].bars.push(new this.BarClass({value:t,label:n,datasetLabel:this.datasets[e].label,x:this.scale.calculateBarX(this.datasets.length,e,this.scale.valuesCount+1),y:this.scale.endPoint,width:this.scale.calculateBarWidth(this.datasets.length),base:this.scale.endPoint,strokeColor:this.datasets[e].strokeColor,fillColor:this.datasets[e].fillColor}))},this),this.scale.addXLabel(n),this.update()},removeData:function(){this.scale.removeXLabel(),e.each(this.datasets,function(t){t.bars.shift()},this),this.update()},reflow:function(){e.extend(this.BarClass.prototype,{y:this.scale.endPoint,base:this.scale.endPoint});var t=e.extend({height:this.chart.height,width:this.chart.width});this.scale.update(t)},draw:function(t){var n=t||1;this.clear();this.chart.ctx;this.scale.draw(n),e.each(this.datasets,function(t,r){e.each(t.bars,function(t,e){t.hasValue()&&(t.base=this.scale.endPoint,t.transition({x:this.scale.calculateBarX(this.datasets.length,r,e),y:this.scale.calculateY(t.value),width:this.scale.calculateBarWidth(this.datasets.length)},n).draw())},this)},this)}})}.call(this),function(){"use strict";var t=this,n=t.Chart,e=n.helpers,r={segmentShowStroke:!0,segmentStrokeColor:"#fff",segmentStrokeWidth:2,percentageInnerCutout:50,animationSteps:100,animationEasing:"easeOutBounce",animateRotate:!0,animateScale:!1,legendTemplate:'<ul class="<%=name.toLowerCase()%>-legend"><% for (var i=0; i<segments.length; i++){%><li><span class="<%=name.toLowerCase()%>-legend-icon" style="background-color:<%=segments[i].fillColor%>"></span><span class="<%=name.toLowerCase()%>-legend-text"><%if(segments[i].label){%><%=segments[i].label%><%}%></span></li><%}%></ul>'};n.Type.extend({name:"Doughnut",defaults:r,initialize:function(t){this.segments=[],this.outerRadius=(e.min([this.chart.width,this.chart.height])-this.options.segmentStrokeWidth/2)/2,this.SegmentArc=n.Arc.extend({ctx:this.chart.ctx,x:this.chart.width/2,y:this.chart.height/2}),this.options.showTooltips&&e.bindEvents(this,this.options.tooltipEvents,function(t){var n="mouseout"!==t.type?this.getSegmentsAtEvent(t):[];e.each(this.segments,function(t){t.restore(["fillColor"])}),e.each(n,function(t){t.fillColor=t.highlightColor}),this.showTooltip(n)}),this.calculateTotal(t),e.each(t,function(n,e){n.color||(n.color="hsl("+360*e/t.length+", 100%, 50%)"),this.addData(n,e,!0)},this),this.render()},getSegmentsAtEvent:function(t){var n=[],r=e.getRelativePosition(t);return e.each(this.segments,function(t){t.inRange(r.x,r.y)&&n.push(t)},this),n},addData:function(t,e,r){var i=void 0!==e?e:this.segments.length;"undefined"==typeof t.color&&(t.color=n.defaults.global.segmentColorDefault[i%n.defaults.global.segmentColorDefault.length],t.highlight=n.defaults.global.segmentHighlightColorDefaults[i%n.defaults.global.segmentHighlightColorDefaults.length]),this.segments.splice(i,0,new this.SegmentArc({value:t.value,outerRadius:this.options.animateScale?0:this.outerRadius,innerRadius:this.options.animateScale?0:this.outerRadius/100*this.options.percentageInnerCutout,fillColor:t.color,highlightColor:t.highlight||t.color,showStroke:this.options.segmentShowStroke,strokeWidth:this.options.segmentStrokeWidth,strokeColor:this.options.segmentStrokeColor,startAngle:1.5*Math.PI,circumference:this.options.animateRotate?0:this.calculateCircumference(t.value),label:t.label})),r||(this.reflow(),this.update())},calculateCircumference:function(t){return this.total>0?2*Math.PI*(t/this.total):0},calculateTotal:function(t){this.total=0,e.each(t,function(t){this.total+=Math.abs(t.value)},this)},update:function(){this.calculateTotal(this.segments),e.each(this.activeElements,function(t){t.restore(["fillColor"])}),e.each(this.segments,function(t){t.save()}),this.render()},removeData:function(t){var n=e.isNumber(t)?t:this.segments.length-1;this.segments.splice(n,1),this.reflow(),this.update()},reflow:function(){e.extend(this.SegmentArc.prototype,{x:this.chart.width/2,y:this.chart.height/2}),this.outerRadius=(e.min([this.chart.width,this.chart.height])-this.options.segmentStrokeWidth/2)/2,e.each(this.segments,function(t){t.update({outerRadius:this.outerRadius,innerRadius:this.outerRadius/100*this.options.percentageInnerCutout})},this)},draw:function(t){var n=t?t:1;this.clear(),e.each(this.segments,function(t,e){t.transition({circumference:this.calculateCircumference(t.value),outerRadius:this.outerRadius,innerRadius:this.outerRadius/100*this.options.percentageInnerCutout},n),t.endAngle=t.startAngle+t.circumference,t.draw(),0===e&&(t.startAngle=1.5*Math.PI),e<this.segments.length-1&&(this.segments[e+1].startAngle=t.endAngle)},this)}}),n.types.Doughnut.extend({name:"Pie",defaults:e.merge(r,{percentageInnerCutout:0})})}.call(this),function(){"use strict";var t=this,n=t.Chart,e=n.helpers,r={scaleShowGridLines:!0,scaleGridLineColor:"rgba(0,0,0,.05)",scaleGridLineWidth:1,scaleShowHorizontalLines:!0,scaleShowVerticalLines:!0,bezierCurve:!0,bezierCurveTension:.4,pointDot:!0,pointDotRadius:4,pointDotStrokeWidth:1,pointHitDetectionRadius:20,datasetStroke:!0,datasetStrokeWidth:2,datasetFill:!0,legendTemplate:'<ul class="<%=name.toLowerCase()%>-legend"><% for (var i=0; i<datasets.length; i++){%><li><span class="<%=name.toLowerCase()%>-legend-icon" style="background-color:<%=datasets[i].strokeColor%>"></span><span class="<%=name.toLowerCase()%>-legend-text"><%if(datasets[i].label){%><%=datasets[i].label%><%}%></span></li><%}%></ul>',offsetGridLines:!1};n.Type.extend({name:"Line",defaults:r,initialize:function(t){this.PointClass=n.Point.extend({offsetGridLines:this.options.offsetGridLines,strokeWidth:this.options.pointDotStrokeWidth,radius:this.options.pointDotRadius,display:this.options.pointDot,hitDetectionRadius:this.options.pointHitDetectionRadius,ctx:this.chart.ctx,inRange:function(t){return Math.pow(t-this.x,2)<Math.pow(this.radius+this.hitDetectionRadius,2)}}),this.datasets=[],this.options.showTooltips&&e.bindEvents(this,this.options.tooltipEvents,function(t){var n="mouseout"!==t.type?this.getPointsAtEvent(t):[];this.eachPoints(function(t){t.restore(["fillColor","strokeColor"])}),e.each(n,function(t){t.fillColor=t.highlightFill,t.strokeColor=t.highlightStroke}),this.showTooltip(n)}),e.each(t.datasets,function(n){var r={label:n.label||null,fillColor:n.fillColor,strokeColor:n.strokeColor,pointColor:n.pointColor,pointStrokeColor:n.pointStrokeColor,points:[]};this.datasets.push(r),e.each(n.data,function(e,i){r.points.push(new this.PointClass({value:e,label:t.labels[i],datasetLabel:n.label,strokeColor:n.pointStrokeColor,fillColor:n.pointColor,highlightFill:n.pointHighlightFill||n.pointColor,highlightStroke:n.pointHighlightStroke||n.pointStrokeColor}))},this),this.buildScale(t.labels),this.eachPoints(function(t,n){e.extend(t,{x:this.scale.calculateX(n),y:this.scale.endPoint}),t.save()},this)},this),this.render()},update:function(){this.scale.update(),e.each(this.activeElements,function(t){t.restore(["fillColor","strokeColor"])}),this.eachPoints(function(t){t.save()}),this.render()},eachPoints:function(t){e.each(this.datasets,function(n){e.each(n.points,t,this)},this)},getPointsAtEvent:function(t){var n=[],r=e.getRelativePosition(t);return e.each(this.datasets,function(t){e.each(t.points,function(t){t.inRange(r.x,r.y)&&n.push(t)})},this),n},buildScale:function(t){var r=this,i=function(){var t=[];return r.eachPoints(function(n){t.push(n.value)}),t},o={templateString:this.options.scaleLabel,height:this.chart.height,width:this.chart.width,ctx:this.chart.ctx,textColor:this.options.scaleFontColor,offsetGridLines:this.options.offsetGridLines,fontSize:this.options.scaleFontSize,fontStyle:this.options.scaleFontStyle,fontFamily:this.options.scaleFontFamily,valuesCount:t.length,beginAtZero:this.options.scaleBeginAtZero,integersOnly:this.options.scaleIntegersOnly,calculateYRange:function(t){var n=e.calculateScaleRange(i(),t,this.fontSize,this.beginAtZero,this.integersOnly);e.extend(this,n)},xLabels:t,font:e.fontString(this.options.scaleFontSize,this.options.scaleFontStyle,this.options.scaleFontFamily),lineWidth:this.options.scaleLineWidth,lineColor:this.options.scaleLineColor,showHorizontalLines:this.options.scaleShowHorizontalLines,showVerticalLines:this.options.scaleShowVerticalLines,gridLineWidth:this.options.scaleShowGridLines?this.options.scaleGridLineWidth:0,gridLineColor:this.options.scaleShowGridLines?this.options.scaleGridLineColor:"rgba(0,0,0,0)",padding:this.options.showScale?0:this.options.pointDotRadius+this.options.pointDotStrokeWidth,showLabels:this.options.scaleShowLabels,display:this.options.showScale};this.options.scaleOverride&&e.extend(o,{calculateYRange:e.noop,steps:this.options.scaleSteps,stepValue:this.options.scaleStepWidth,min:this.options.scaleStartValue,max:this.options.scaleStartValue+this.options.scaleSteps*this.options.scaleStepWidth}),this.scale=new n.Scale(o)},addData:function(t,n){e.each(t,function(t,e){this.datasets[e].points.push(new this.PointClass({value:t,label:n,datasetLabel:this.datasets[e].label,x:this.scale.calculateX(this.scale.valuesCount+1),y:this.scale.endPoint,strokeColor:this.datasets[e].pointStrokeColor,fillColor:this.datasets[e].pointColor}))},this),this.scale.addXLabel(n),this.update()},removeData:function(){this.scale.removeXLabel(),e.each(this.datasets,function(t){t.points.shift()},this),this.update()},reflow:function(){var t=e.extend({height:this.chart.height,width:this.chart.width});this.scale.update(t)},draw:function(t){var n=t||1;this.clear();var r=this.chart.ctx,i=function(t){return null!==t.value},o=function(t,n,r){return e.findNextWhere(n,i,r)||t},a=function(t,n,r){return e.findPreviousWhere(n,i,r)||t};this.scale&&(this.scale.draw(n),e.each(this.datasets,function(t){var u=e.where(t.points,i);e.each(t.points,function(t,e){t.hasValue()&&t.transition({y:this.scale.calculateY(t.value),x:this.scale.calculateX(e)},n)},this),this.options.bezierCurve&&e.each(u,function(t,n){var r=n>0&&n<u.length-1?this.options.bezierCurveTension:0;t.controlPoints=e.splineCurve(a(t,u,n),t,o(t,u,n),r),t.controlPoints.outer.y>this.scale.endPoint?t.controlPoints.outer.y=this.scale.endPoint:t.controlPoints.outer.y<this.scale.startPoint&&(t.controlPoints.outer.y=this.scale.startPoint),t.controlPoints.inner.y>this.scale.endPoint?t.controlPoints.inner.y=this.scale.endPoint:t.controlPoints.inner.y<this.scale.startPoint&&(t.controlPoints.inner.y=this.scale.startPoint)},this),r.lineWidth=this.options.datasetStrokeWidth,r.strokeStyle=t.strokeColor,r.beginPath(),e.each(u,function(t,n){if(0===n)r.moveTo(t.x,t.y);else if(this.options.bezierCurve){var e=a(t,u,n);r.bezierCurveTo(e.controlPoints.outer.x,e.controlPoints.outer.y,t.controlPoints.inner.x,t.controlPoints.inner.y,t.x,t.y)}else r.lineTo(t.x,t.y)},this),this.options.datasetStroke&&r.stroke(),this.options.datasetFill&&u.length>0&&(r.lineTo(u[u.length-1].x,this.scale.endPoint),r.lineTo(u[0].x,this.scale.endPoint),r.fillStyle=t.fillColor,r.closePath(),r.fill()),e.each(u,function(t){t.draw()})},this))}})}.call(this),function(){"use strict";var t=this,n=t.Chart,e=n.helpers,r={scaleShowLabelBackdrop:!0,scaleBackdropColor:"rgba(255,255,255,0.75)",scaleBeginAtZero:!0,scaleBackdropPaddingY:2,scaleBackdropPaddingX:2,scaleShowLine:!0,segmentShowStroke:!0,segmentStrokeColor:"#fff",segmentStrokeWidth:2,animationSteps:100,animationEasing:"easeOutBounce",animateRotate:!0,animateScale:!1,legendTemplate:'<ul class="<%=name.toLowerCase()%>-legend"><% for (var i=0; i<segments.length; i++){%><li><span class="<%=name.toLowerCase()%>-legend-icon" style="background-color:<%=segments[i].fillColor%>"></span><span class="<%=name.toLowerCase()%>-legend-text"><%if(segments[i].label){%><%=segments[i].label%><%}%></span></li><%}%></ul>'};n.Type.extend({name:"PolarArea",defaults:r,initialize:function(t){this.segments=[],this.SegmentArc=n.Arc.extend({showStroke:this.options.segmentShowStroke,strokeWidth:this.options.segmentStrokeWidth,strokeColor:this.options.segmentStrokeColor,ctx:this.chart.ctx,innerRadius:0,x:this.chart.width/2,y:this.chart.height/2}),this.scale=new n.RadialScale({display:this.options.showScale,fontStyle:this.options.scaleFontStyle,fontSize:this.options.scaleFontSize,fontFamily:this.options.scaleFontFamily,fontColor:this.options.scaleFontColor,showLabels:this.options.scaleShowLabels,showLabelBackdrop:this.options.scaleShowLabelBackdrop,backdropColor:this.options.scaleBackdropColor,backdropPaddingY:this.options.scaleBackdropPaddingY,backdropPaddingX:this.options.scaleBackdropPaddingX,lineWidth:this.options.scaleShowLine?this.options.scaleLineWidth:0,lineColor:this.options.scaleLineColor,lineArc:!0,width:this.chart.width,height:this.chart.height,xCenter:this.chart.width/2,yCenter:this.chart.height/2,ctx:this.chart.ctx,templateString:this.options.scaleLabel,valuesCount:t.length}),this.updateScaleRange(t),this.scale.update(),e.each(t,function(t,n){this.addData(t,n,!0)},this),this.options.showTooltips&&e.bindEvents(this,this.options.tooltipEvents,function(t){var n="mouseout"!==t.type?this.getSegmentsAtEvent(t):[];e.each(this.segments,function(t){t.restore(["fillColor"])}),e.each(n,function(t){t.fillColor=t.highlightColor}),this.showTooltip(n)}),this.render()},getSegmentsAtEvent:function(t){var n=[],r=e.getRelativePosition(t);return e.each(this.segments,function(t){t.inRange(r.x,r.y)&&n.push(t)},this),n},addData:function(t,n,e){var r=n||this.segments.length;this.segments.splice(r,0,new this.SegmentArc({fillColor:t.color,highlightColor:t.highlight||t.color,label:t.label,value:t.value,outerRadius:this.options.animateScale?0:this.scale.calculateCenterOffset(t.value),circumference:this.options.animateRotate?0:this.scale.getCircumference(),startAngle:1.5*Math.PI})),e||(this.reflow(),this.update())},removeData:function(t){var n=e.isNumber(t)?t:this.segments.length-1;this.segments.splice(n,1),this.reflow(),this.update()},calculateTotal:function(t){this.total=0,e.each(t,function(t){this.total+=t.value},this),this.scale.valuesCount=this.segments.length},updateScaleRange:function(t){var n=[];e.each(t,function(t){n.push(t.value)});var r=this.options.scaleOverride?{steps:this.options.scaleSteps,stepValue:this.options.scaleStepWidth,min:this.options.scaleStartValue,max:this.options.scaleStartValue+this.options.scaleSteps*this.options.scaleStepWidth}:e.calculateScaleRange(n,e.min([this.chart.width,this.chart.height])/2,this.options.scaleFontSize,this.options.scaleBeginAtZero,this.options.scaleIntegersOnly);e.extend(this.scale,r,{size:e.min([this.chart.width,this.chart.height]),xCenter:this.chart.width/2,yCenter:this.chart.height/2
-})},update:function(){this.calculateTotal(this.segments),e.each(this.segments,function(t){t.save()}),this.reflow(),this.render()},reflow:function(){e.extend(this.SegmentArc.prototype,{x:this.chart.width/2,y:this.chart.height/2}),this.updateScaleRange(this.segments),this.scale.update(),e.extend(this.scale,{xCenter:this.chart.width/2,yCenter:this.chart.height/2}),e.each(this.segments,function(t){t.update({outerRadius:this.scale.calculateCenterOffset(t.value)})},this)},draw:function(t){var n=t||1;this.clear(),e.each(this.segments,function(t,e){t.transition({circumference:this.scale.getCircumference(),outerRadius:this.scale.calculateCenterOffset(t.value)},n),t.endAngle=t.startAngle+t.circumference,0===e&&(t.startAngle=1.5*Math.PI),e<this.segments.length-1&&(this.segments[e+1].startAngle=t.endAngle),t.draw()},this),this.scale.draw()}})}.call(this),function(){"use strict";var t=this,n=t.Chart,e=n.helpers;n.Type.extend({name:"Radar",defaults:{scaleShowLine:!0,angleShowLineOut:!0,scaleShowLabels:!1,scaleBeginAtZero:!0,angleLineColor:"rgba(0,0,0,.1)",angleLineWidth:1,angleLineInterval:1,pointLabelFontFamily:"'Arial'",pointLabelFontStyle:"normal",pointLabelFontSize:10,pointLabelFontColor:"#666",pointDot:!0,pointDotRadius:3,pointDotStrokeWidth:1,pointHitDetectionRadius:20,datasetStroke:!0,datasetStrokeWidth:2,datasetFill:!0,legendTemplate:'<ul class="<%=name.toLowerCase()%>-legend"><% for (var i=0; i<datasets.length; i++){%><li><span class="<%=name.toLowerCase()%>-legend-icon" style="background-color:<%=datasets[i].strokeColor%>"></span><span class="<%=name.toLowerCase()%>-legend-text"><%if(datasets[i].label){%><%=datasets[i].label%><%}%></span></li><%}%></ul>'},initialize:function(t){this.PointClass=n.Point.extend({strokeWidth:this.options.pointDotStrokeWidth,radius:this.options.pointDotRadius,display:this.options.pointDot,hitDetectionRadius:this.options.pointHitDetectionRadius,ctx:this.chart.ctx}),this.datasets=[],this.buildScale(t),this.options.showTooltips&&e.bindEvents(this,this.options.tooltipEvents,function(t){var n="mouseout"!==t.type?this.getPointsAtEvent(t):[];this.eachPoints(function(t){t.restore(["fillColor","strokeColor"])}),e.each(n,function(t){t.fillColor=t.highlightFill,t.strokeColor=t.highlightStroke}),this.showTooltip(n)}),e.each(t.datasets,function(n){var r={label:n.label||null,fillColor:n.fillColor,strokeColor:n.strokeColor,pointColor:n.pointColor,pointStrokeColor:n.pointStrokeColor,points:[]};this.datasets.push(r),e.each(n.data,function(e,i){var o;this.scale.animation||(o=this.scale.getPointPosition(i,this.scale.calculateCenterOffset(e))),r.points.push(new this.PointClass({value:e,label:t.labels[i],datasetLabel:n.label,x:this.options.animation?this.scale.xCenter:o.x,y:this.options.animation?this.scale.yCenter:o.y,strokeColor:n.pointStrokeColor,fillColor:n.pointColor,highlightFill:n.pointHighlightFill||n.pointColor,highlightStroke:n.pointHighlightStroke||n.pointStrokeColor}))},this)},this),this.render()},eachPoints:function(t){e.each(this.datasets,function(n){e.each(n.points,t,this)},this)},getPointsAtEvent:function(t){var n=e.getRelativePosition(t),r=e.getAngleFromPoint({x:this.scale.xCenter,y:this.scale.yCenter},n),i=2*Math.PI/this.scale.valuesCount,o=Math.round((r.angle-1.5*Math.PI)/i),a=[];return(o>=this.scale.valuesCount||0>o)&&(o=0),r.distance<=this.scale.drawingArea&&e.each(this.datasets,function(t){a.push(t.points[o])}),a},buildScale:function(t){this.scale=new n.RadialScale({display:this.options.showScale,fontStyle:this.options.scaleFontStyle,fontSize:this.options.scaleFontSize,fontFamily:this.options.scaleFontFamily,fontColor:this.options.scaleFontColor,showLabels:this.options.scaleShowLabels,showLabelBackdrop:this.options.scaleShowLabelBackdrop,backdropColor:this.options.scaleBackdropColor,backgroundColors:this.options.scaleBackgroundColors,backdropPaddingY:this.options.scaleBackdropPaddingY,backdropPaddingX:this.options.scaleBackdropPaddingX,lineWidth:this.options.scaleShowLine?this.options.scaleLineWidth:0,lineColor:this.options.scaleLineColor,angleLineColor:this.options.angleLineColor,angleLineWidth:this.options.angleShowLineOut?this.options.angleLineWidth:0,angleLineInterval:this.options.angleLineInterval?this.options.angleLineInterval:1,pointLabelFontColor:this.options.pointLabelFontColor,pointLabelFontSize:this.options.pointLabelFontSize,pointLabelFontFamily:this.options.pointLabelFontFamily,pointLabelFontStyle:this.options.pointLabelFontStyle,height:this.chart.height,width:this.chart.width,xCenter:this.chart.width/2,yCenter:this.chart.height/2,ctx:this.chart.ctx,templateString:this.options.scaleLabel,labels:t.labels,valuesCount:t.datasets[0].data.length}),this.scale.setScaleSize(),this.updateScaleRange(t.datasets),this.scale.buildYLabels()},updateScaleRange:function(t){var n=function(){var n=[];return e.each(t,function(t){t.data?n=n.concat(t.data):e.each(t.points,function(t){n.push(t.value)})}),n}(),r=this.options.scaleOverride?{steps:this.options.scaleSteps,stepValue:this.options.scaleStepWidth,min:this.options.scaleStartValue,max:this.options.scaleStartValue+this.options.scaleSteps*this.options.scaleStepWidth}:e.calculateScaleRange(n,e.min([this.chart.width,this.chart.height])/2,this.options.scaleFontSize,this.options.scaleBeginAtZero,this.options.scaleIntegersOnly);e.extend(this.scale,r)},addData:function(t,n){this.scale.valuesCount++,e.each(t,function(t,e){var r=this.scale.getPointPosition(this.scale.valuesCount,this.scale.calculateCenterOffset(t));this.datasets[e].points.push(new this.PointClass({value:t,label:n,datasetLabel:this.datasets[e].label,x:r.x,y:r.y,strokeColor:this.datasets[e].pointStrokeColor,fillColor:this.datasets[e].pointColor}))},this),this.scale.labels.push(n),this.reflow(),this.update()},removeData:function(){this.scale.valuesCount--,this.scale.labels.shift(),e.each(this.datasets,function(t){t.points.shift()},this),this.reflow(),this.update()},update:function(){this.eachPoints(function(t){t.save()}),this.reflow(),this.render()},reflow:function(){e.extend(this.scale,{width:this.chart.width,height:this.chart.height,size:e.min([this.chart.width,this.chart.height]),xCenter:this.chart.width/2,yCenter:this.chart.height/2}),this.updateScaleRange(this.datasets),this.scale.setScaleSize(),this.scale.buildYLabels()},draw:function(t){var n=t||1,r=this.chart.ctx;this.clear(),this.scale.draw(),e.each(this.datasets,function(t){e.each(t.points,function(t,e){t.hasValue()&&t.transition(this.scale.getPointPosition(e,this.scale.calculateCenterOffset(t.value)),n)},this),r.lineWidth=this.options.datasetStrokeWidth,r.strokeStyle=t.strokeColor,r.beginPath(),e.each(t.points,function(t,n){0===n?r.moveTo(t.x,t.y):r.lineTo(t.x,t.y)},this),r.closePath(),r.stroke(),r.fillStyle=t.fillColor,this.options.datasetFill&&r.fill(),e.each(t.points,function(t){t.hasValue()&&t.draw()})},this)}})}.call(this),function(t){"use strict";"object"==typeof exports?module.exports=t("undefined"!=typeof angular?angular:require("angular"),"undefined"!=typeof Chart?Chart:require("chart.js")):"function"==typeof define&&define.amd?define(["angular","chart"],t):t(angular,Chart)}(function(t,n){"use strict";function e(){var e={},r={Chart:n,getOptions:function(n){var r=n&&e[n]||{};return t.extend({},e,r)}};this.setOptions=function(n,r){return r?void(e[n]=t.extend(e[n]||{},r)):(r=n,void(e=t.extend(e,r)))},this.$get=function(){return r}}function r(e,r){function o(t,n){return t&&n&&t.length&&n.length?Array.isArray(t[0])?t.length===n.length&&t.every(function(t,e){return t.length===n[e].length}):n.reduce(a,0)>0?t.length===n.length:!1:!1}function a(t,n){return t+n}function u(n,e,r,i){var o=null;return function(a){var u=e.getPointsAtEvent||e.getBarsAtEvent||e.getSegmentsAtEvent;if(u){var s=u.call(e,a);i!==!1&&t.equals(o,s)!==!1||(o=s,n[r](s,a),n.$apply())}}}function s(r,i){for(var o=!1,a=t.copy(i.colours||e.getOptions(r).colours||n.defaults.global.colours);a.length<i.data.length;)a.push(i.getColour()),o=!0;return o&&(i.colours=a),a.map(l)}function l(t){return"object"==typeof t&&null!==t?t:"string"==typeof t&&"#"===t[0]?f(d(t.substr(1))):c()}function c(){var t=[h(0,255),h(0,255),h(0,255)];return f(t)}function f(t){return{fillColor:p(t,.2),strokeColor:p(t,1),pointColor:p(t,1),pointStrokeColor:"#fff",pointHighlightFill:"#fff",pointHighlightStroke:p(t,.8)}}function h(t,n){return Math.floor(Math.random()*(n-t+1))+t}function p(t,n){return i?"rgb("+t.join(",")+")":"rgba("+t.concat(n).join(",")+")"}function d(t){var n=parseInt(t,16),e=n>>16&255,r=n>>8&255,i=255&n;return[e,r,i]}function v(n,e,r,i){return{labels:n,datasets:e.map(function(n,e){return t.extend({},i[e],{label:r[e],data:n})})}}function g(n,e,r){return n.map(function(n,i){return t.extend({},r[i],{label:n,value:e[i],color:r[i].strokeColor,highlight:r[i].pointHighlightStroke})})}function m(t,n){var e=t.parent(),r=e.find("chart-legend"),i="<chart-legend>"+n.generateLegend()+"</chart-legend>";r.length?r.replaceWith(i):e.append(i)}function y(t,n,e,r){Array.isArray(e.data[0])?t.datasets.forEach(function(t,e){(t.points||t.bars).forEach(function(t,r){t.value=n[e][r]})}):t.segments.forEach(function(t,e){t.value=n[e]}),t.update(),e.$emit("update",t),e.legend&&"false"!==e.legend&&m(r,t)}function $(t){return!t||Array.isArray(t)&&!t.length||"object"==typeof t&&!Object.keys(t).length}function x(r,i){var o=t.extend({},n.defaults.global,e.getOptions(r),i.options);return o.responsive}function b(t,n){t&&(t.destroy(),n.$emit("destroy",t))}return function(n){return{restrict:"CA",scope:{data:"=?",labels:"=?",options:"=?",series:"=?",colours:"=?",getColour:"=?",chartType:"=",legend:"@",click:"=?",hover:"=?",chartData:"=?",chartLabels:"=?",chartOptions:"=?",chartSeries:"=?",chartColours:"=?",chartLegend:"@",chartClick:"=?",chartHover:"=?"},link:function(a,l){function f(t,n){a.$watch(t,function(t){"undefined"!=typeof t&&(a[n]=t)})}function h(e,r){if(!$(e)&&!t.equals(e,r)){var i=n||a.chartType;i&&p(i)}}function p(n){if(x(n,a)&&0===l[0].clientHeight&&0===_.clientHeight)return r(function(){p(n)},50,!1);if(a.data&&a.data.length){a.getColour="function"==typeof a.getColour?a.getColour:c;var i=s(n,a),o=l[0],f=o.getContext("2d"),h=Array.isArray(a.data[0])?v(a.labels,a.data,a.series||[],i):g(a.labels,a.data,i),d=t.extend({},e.getOptions(n),a.options);b(w,a),w=new e.Chart(f)[n](h,d),a.$emit("create",w),o.onclick=a.click?u(a,w,"click",!1):t.noop,o.onmousemove=a.hover?u(a,w,"hover",!0):t.noop,a.legend&&"false"!==a.legend&&m(l,w)}}function d(t){if("undefined"!=typeof console&&"test"!==e.getOptions().env){var n="function"==typeof console.warn?console.warn:console.log;a[t]&&n.call(console,'"%s" is deprecated and will be removed in a future version. Please use "chart-%s" instead.',t,t)}}var w,_=document.createElement("div");_.className="chart-container",l.replaceWith(_),_.appendChild(l[0]),i&&window.G_vmlCanvasManager.initElement(l[0]),["data","labels","options","series","colours","legend","click","hover"].forEach(d),f("chartData","data"),f("chartLabels","labels"),f("chartOptions","options"),f("chartSeries","series"),f("chartColours","colours"),f("chartLegend","legend"),f("chartClick","click"),f("chartHover","hover"),a.$watch("data",function(t,e){if(!t||!t.length||Array.isArray(t[0])&&!t[0].length)return void b(w,a);var r=n||a.chartType;if(r)return w&&o(t,e)?y(w,t,a,l):void p(r)},!0),a.$watch("series",h,!0),a.$watch("labels",h,!0),a.$watch("options",h,!0),a.$watch("colours",h,!0),a.$watch("chartType",function(n,e){$(n)||t.equals(n,e)||p(n)}),a.$on("$destroy",function(){b(w,a)})}}}}n.defaults.global.responsive=!0,n.defaults.global.multiTooltipTemplate="<%if (datasetLabel){%><%=datasetLabel%>: <%}%><%= value %>",n.defaults.global.colours=["#97BBCD","#DCDCDC","#F7464A","#46BFBD","#FDB45C","#949FB1","#4D5360"];var i="object"==typeof window.G_vmlCanvasManager&&null!==window.G_vmlCanvasManager&&"function"==typeof window.G_vmlCanvasManager.initElement;return i&&(n.defaults.global.animation=!1),t.module("chart.js",[]).provider("ChartJs",e).factory("ChartJsFactory",["ChartJs","$timeout",r]).directive("chartBase",["ChartJsFactory",function(t){return new t}]).directive("chartLine",["ChartJsFactory",function(t){return new t("Line")}]).directive("chartBar",["ChartJsFactory",function(t){return new t("Bar")}]).directive("chartRadar",["ChartJsFactory",function(t){return new t("Radar")}]).directive("chartDoughnut",["ChartJsFactory",function(t){return new t("Doughnut")}]).directive("chartPie",["ChartJsFactory",function(t){return new t("Pie")}]).directive("chartPolarArea",["ChartJsFactory",function(t){return new t("PolarArea")}])}),!function(){function t(t){return t&&(t.ownerDocument||t.document||t).documentElement}function n(t){return t&&(t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView)}function e(t,n){return n>t?-1:t>n?1:t>=n?0:NaN}function r(t){return null===t?NaN:+t}function i(t){return!isNaN(t)}function o(t){return{left:function(n,e,r,i){for(arguments.length<3&&(r=0),arguments.length<4&&(i=n.length);i>r;){var o=r+i>>>1;t(n[o],e)<0?r=o+1:i=o}return r},right:function(n,e,r,i){for(arguments.length<3&&(r=0),arguments.length<4&&(i=n.length);i>r;){var o=r+i>>>1;t(n[o],e)>0?i=o:r=o+1}return r}}}function a(t){return t.length}function u(t){for(var n=1;t*n%1;)n*=10;return n}function s(t,n){for(var e in n)Object.defineProperty(t.prototype,e,{value:n[e],enumerable:!1})}function l(){this._=Object.create(null)}function c(t){return(t+="")===ba||t[0]===wa?wa+t:t}function f(t){return(t+="")[0]===wa?t.slice(1):t}function h(t){return c(t)in this._}function p(t){return(t=c(t))in this._&&delete this._[t]}function d(){var t=[];for(var n in this._)t.push(f(n));return t}function v(){var t=0;for(var n in this._)++t;return t}function g(){for(var t in this._)return!1;return!0}function m(){this._=Object.create(null)}function y(t){return t}function $(t,n,e){return function(){var r=e.apply(n,arguments);return r===n?t:r}}function x(t,n){if(n in t)return n;n=n.charAt(0).toUpperCase()+n.slice(1);for(var e=0,r=_a.length;r>e;++e){var i=_a[e]+n;if(i in t)return i}}function b(){}function w(){}function _(t){function n(){for(var n,r=e,i=-1,o=r.length;++i<o;)(n=r[i].on)&&n.apply(this,arguments);return t}var e=[],r=new l;return n.on=function(n,i){var o,a=r.get(n);return arguments.length<2?a&&a.on:(a&&(a.on=null,e=e.slice(0,o=e.indexOf(a)).concat(e.slice(o+1)),r.remove(n)),i&&e.push(r.set(n,{on:i})),t)},n}function C(){sa.event.preventDefault()}function S(){for(var t,n=sa.event;t=n.sourceEvent;)n=t;return n}function M(t){for(var n=new w,e=0,r=arguments.length;++e<r;)n[arguments[e]]=_(n);return n.of=function(e,r){return function(i){try{var o=i.sourceEvent=sa.event;i.target=t,sa.event=i,n[i.type].apply(e,r)}finally{sa.event=o}}},n}function k(t){return Sa(t,Ea),t}function A(t){return"function"==typeof t?t:function(){return Ma(t,this)}}function E(t){return"function"==typeof t?t:function(){return ka(t,this)}}function P(t,n){function e(){this.removeAttribute(t)}function r(){this.removeAttributeNS(t.space,t.local)}function i(){this.setAttribute(t,n)}function o(){this.setAttributeNS(t.space,t.local,n)}function a(){var e=n.apply(this,arguments);null==e?this.removeAttribute(t):this.setAttribute(t,e)}function u(){var e=n.apply(this,arguments);null==e?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,e)}return t=sa.ns.qualify(t),null==n?t.local?r:e:"function"==typeof n?t.local?u:a:t.local?o:i}function O(t){return t.trim().replace(/\s+/g," ")}function T(t){return new RegExp("(?:^|\\s+)"+sa.requote(t)+"(?:\\s+|$)","g")}function j(t){return(t+"").trim().split(/^|\s+/)}function L(t,n){function e(){for(var e=-1;++e<i;)t[e](this,n)}function r(){for(var e=-1,r=n.apply(this,arguments);++e<i;)t[e](this,r)}t=j(t).map(R);var i=t.length;return"function"==typeof n?r:e}function R(t){var n=T(t);return function(e,r){if(i=e.classList)return r?i.add(t):i.remove(t);var i=e.getAttribute("class")||"";r?(n.lastIndex=0,n.test(i)||e.setAttribute("class",O(i+" "+t))):e.setAttribute("class",O(i.replace(n," ")))}}function N(t,n,e){function r(){this.style.removeProperty(t)}function i(){this.style.setProperty(t,n,e)}function o(){var r=n.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,e)}return null==n?r:"function"==typeof n?o:i}function F(t,n){function e(){delete this[t]}function r(){this[t]=n}function i(){var e=n.apply(this,arguments);null==e?delete this[t]:this[t]=e}return null==n?e:"function"==typeof n?i:r}function D(t){function n(){var n=this.ownerDocument,e=this.namespaceURI;return e===Pa&&n.documentElement.namespaceURI===Pa?n.createElement(t):n.createElementNS(e,t)}function e(){return this.ownerDocument.createElementNS(t.space,t.local)}return"function"==typeof t?t:(t=sa.ns.qualify(t)).local?e:n}function I(){var t=this.parentNode;t&&t.removeChild(this)}function z(t){return{__data__:t}}function q(t){return function(){return Aa(this,t)}}function V(t){return arguments.length||(t=e),function(n,e){return n&&e?t(n.__data__,e.__data__):!n-!e}}function B(t,n){for(var e=0,r=t.length;r>e;e++)for(var i,o=t[e],a=0,u=o.length;u>a;a++)(i=o[a])&&n(i,a,e);return t}function W(t){return Sa(t,Ta),t}function U(t){var n,e;return function(r,i,o){var a,u=t[o].update,s=u.length;for(o!=e&&(e=o,n=0),i>=n&&(n=i+1);!(a=u[n])&&++n<s;);return a}}function H(t,n,e){function r(){var n=this[a];n&&(this.removeEventListener(t,n,n.$),delete this[a])}function i(){var i=s(n,ca(arguments));r.call(this),this.addEventListener(t,this[a]=i,i.$=e),i._=n}function o(){var n,e=new RegExp("^__on([^.]+)"+sa.requote(t)+"$");for(var r in this)if(n=r.match(e)){var i=this[r];this.removeEventListener(n[1],i,i.$),delete this[r]}}var a="__on"+t,u=t.indexOf("."),s=Y;u>0&&(t=t.slice(0,u));var l=ja.get(t);return l&&(t=l,s=G),u?n?i:r:n?b:o}function Y(t,n){return function(e){var r=sa.event;sa.event=e,n[0]=this.__data__;try{t.apply(this,n)}finally{sa.event=r}}}function G(t,n){var e=Y(t,n);return function(t){var n=this,r=t.relatedTarget;r&&(r===n||8&r.compareDocumentPosition(n))||e.call(n,t)}}function X(e){var r=".dragsuppress-"+ ++Ra,i="click"+r,o=sa.select(n(e)).on("touchmove"+r,C).on("dragstart"+r,C).on("selectstart"+r,C);if(null==La&&(La="onselectstart"in e?!1:x(e.style,"userSelect")),La){var a=t(e).style,u=a[La];a[La]="none"}return function(t){if(o.on(r,null),La&&(a[La]=u),t){var n=function(){o.on(i,null)};o.on(i,function(){C(),n()},!0),setTimeout(n,0)}}}function Z(t,e){e.changedTouches&&(e=e.changedTouches[0]);var r=t.ownerSVGElement||t;if(r.createSVGPoint){var i=r.createSVGPoint();if(0>Na){var o=n(t);if(o.scrollX||o.scrollY){r=sa.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var a=r[0][0].getScreenCTM();Na=!(a.f||a.e),r.remove()}}return Na?(i.x=e.pageX,i.y=e.pageY):(i.x=e.clientX,i.y=e.clientY),i=i.matrixTransform(t.getScreenCTM().inverse()),[i.x,i.y]}var u=t.getBoundingClientRect();return[e.clientX-u.left-t.clientLeft,e.clientY-u.top-t.clientTop]}function J(){return sa.event.changedTouches[0].identifier}function K(t){return t>0?1:0>t?-1:0}function Q(t,n,e){return(n[0]-t[0])*(e[1]-t[1])-(n[1]-t[1])*(e[0]-t[0])}function tt(t){return t>1?0:-1>t?Ia:Math.acos(t)}function nt(t){return t>1?Va:-1>t?-Va:Math.asin(t)}function et(t){return((t=Math.exp(t))-1/t)/2}function rt(t){return((t=Math.exp(t))+1/t)/2}function it(t){return((t=Math.exp(2*t))-1)/(t+1)}function ot(t){return(t=Math.sin(t/2))*t}function at(){}function ut(t,n,e){return this instanceof ut?(this.h=+t,this.s=+n,void(this.l=+e)):arguments.length<2?t instanceof ut?new ut(t.h,t.s,t.l):bt(""+t,wt,ut):new ut(t,n,e)}function st(t,n,e){function r(t){return t>360?t-=360:0>t&&(t+=360),60>t?o+(a-o)*t/60:180>t?a:240>t?o+(a-o)*(240-t)/60:o}function i(t){return Math.round(255*r(t))}var o,a;return t=isNaN(t)?0:(t%=360)<0?t+360:t,n=isNaN(n)?0:0>n?0:n>1?1:n,e=0>e?0:e>1?1:e,a=.5>=e?e*(1+n):e+n-e*n,o=2*e-a,new mt(i(t+120),i(t),i(t-120))}function lt(t,n,e){return this instanceof lt?(this.h=+t,this.c=+n,void(this.l=+e)):arguments.length<2?t instanceof lt?new lt(t.h,t.c,t.l):t instanceof ft?pt(t.l,t.a,t.b):pt((t=_t((t=sa.rgb(t)).r,t.g,t.b)).l,t.a,t.b):new lt(t,n,e)}function ct(t,n,e){return isNaN(t)&&(t=0),isNaN(n)&&(n=0),new ft(e,Math.cos(t*=Ba)*n,Math.sin(t)*n)}function ft(t,n,e){return this instanceof ft?(this.l=+t,this.a=+n,void(this.b=+e)):arguments.length<2?t instanceof ft?new ft(t.l,t.a,t.b):t instanceof lt?ct(t.h,t.c,t.l):_t((t=mt(t)).r,t.g,t.b):new ft(t,n,e)}function ht(t,n,e){var r=(t+16)/116,i=r+n/500,o=r-e/200;return i=dt(i)*tu,r=dt(r)*nu,o=dt(o)*eu,new mt(gt(3.2404542*i-1.5371385*r-.4985314*o),gt(-.969266*i+1.8760108*r+.041556*o),gt(.0556434*i-.2040259*r+1.0572252*o))}function pt(t,n,e){return t>0?new lt(Math.atan2(e,n)*Wa,Math.sqrt(n*n+e*e),t):new lt(NaN,NaN,t)}function dt(t){return t>.206893034?t*t*t:(t-4/29)/7.787037}function vt(t){return t>.008856?Math.pow(t,1/3):7.787037*t+4/29}function gt(t){return Math.round(255*(.00304>=t?12.92*t:1.055*Math.pow(t,1/2.4)-.055))}function mt(t,n,e){return this instanceof mt?(this.r=~~t,this.g=~~n,void(this.b=~~e)):arguments.length<2?t instanceof mt?new mt(t.r,t.g,t.b):bt(""+t,mt,st):new mt(t,n,e)}function yt(t){return new mt(t>>16,t>>8&255,255&t)}function $t(t){return yt(t)+""}function xt(t){return 16>t?"0"+Math.max(0,t).toString(16):Math.min(255,t).toString(16)}function bt(t,n,e){var r,i,o,a=0,u=0,s=0;if(r=/([a-z]+)\((.*)\)/.exec(t=t.toLowerCase()))switch(i=r[2].split(","),r[1]){case"hsl":return e(parseFloat(i[0]),parseFloat(i[1])/100,parseFloat(i[2])/100);case"rgb":return n(St(i[0]),St(i[1]),St(i[2]))}return(o=ou.get(t))?n(o.r,o.g,o.b):(null==t||"#"!==t.charAt(0)||isNaN(o=parseInt(t.slice(1),16))||(4===t.length?(a=(3840&o)>>4,a=a>>4|a,u=240&o,u=u>>4|u,s=15&o,s=s<<4|s):7===t.length&&(a=(16711680&o)>>16,u=(65280&o)>>8,s=255&o)),n(a,u,s))}function wt(t,n,e){var r,i,o=Math.min(t/=255,n/=255,e/=255),a=Math.max(t,n,e),u=a-o,s=(a+o)/2;return u?(i=.5>s?u/(a+o):u/(2-a-o),r=t==a?(n-e)/u+(e>n?6:0):n==a?(e-t)/u+2:(t-n)/u+4,r*=60):(r=NaN,i=s>0&&1>s?0:r),new ut(r,i,s)}function _t(t,n,e){t=Ct(t),n=Ct(n),e=Ct(e);var r=vt((.4124564*t+.3575761*n+.1804375*e)/tu),i=vt((.2126729*t+.7151522*n+.072175*e)/nu),o=vt((.0193339*t+.119192*n+.9503041*e)/eu);return ft(116*i-16,500*(r-i),200*(i-o))}function Ct(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function St(t){var n=parseFloat(t);return"%"===t.charAt(t.length-1)?Math.round(2.55*n):n}function Mt(t){return"function"==typeof t?t:function(){return t}}function kt(t){return function(n,e,r){return 2===arguments.length&&"function"==typeof e&&(r=e,e=null),At(n,e,t,r)}}function At(t,n,e,r){function i(){var t,n=s.status;if(!n&&Pt(s)||n>=200&&300>n||304===n){try{t=e.call(o,s)}catch(r){return void a.error.call(o,r)}a.load.call(o,t)}else a.error.call(o,s)}var o={},a=sa.dispatch("beforesend","progress","load","error"),u={},s=new XMLHttpRequest,l=null;return!this.XDomainRequest||"withCredentials"in s||!/^(http(s)?:)?\/\//.test(t)||(s=new XDomainRequest),"onload"in s?s.onload=s.onerror=i:s.onreadystatechange=function(){s.readyState>3&&i()},s.onprogress=function(t){var n=sa.event;sa.event=t;try{a.progress.call(o,s)}finally{sa.event=n}},o.header=function(t,n){return t=(t+"").toLowerCase(),arguments.length<2?u[t]:(null==n?delete u[t]:u[t]=n+"",o)},o.mimeType=function(t){return arguments.length?(n=null==t?null:t+"",o):n},o.responseType=function(t){return arguments.length?(l=t,o):l},o.response=function(t){return e=t,o},["get","post"].forEach(function(t){o[t]=function(){return o.send.apply(o,[t].concat(ca(arguments)))}}),o.send=function(e,r,i){if(2===arguments.length&&"function"==typeof r&&(i=r,r=null),s.open(e,t,!0),null==n||"accept"in u||(u.accept=n+",*/*"),s.setRequestHeader)for(var c in u)s.setRequestHeader(c,u[c]);return null!=n&&s.overrideMimeType&&s.overrideMimeType(n),null!=l&&(s.responseType=l),null!=i&&o.on("error",i).on("load",function(t){i(null,t)}),a.beforesend.call(o,s),s.send(null==r?null:r),o},o.abort=function(){return s.abort(),o},sa.rebind(o,a,"on"),null==r?o:o.get(Et(r))}function Et(t){return 1===t.length?function(n,e){t(null==n?e:null)}:t}function Pt(t){var n=t.responseType;return n&&"text"!==n?t.response:t.responseText}function Ot(t,n,e){var r=arguments.length;2>r&&(n=0),3>r&&(e=Date.now());var i=e+n,o={c:t,t:i,n:null};return uu?uu.n=o:au=o,uu=o,su||(lu=clearTimeout(lu),su=1,cu(Tt)),o}function Tt(){var t=jt(),n=Lt()-t;n>24?(isFinite(n)&&(clearTimeout(lu),lu=setTimeout(Tt,n)),su=0):(su=1,cu(Tt))}function jt(){for(var t=Date.now(),n=au;n;)t>=n.t&&n.c(t-n.t)&&(n.c=null),n=n.n;return t}function Lt(){for(var t,n=au,e=1/0;n;)n.c?(n.t<e&&(e=n.t),n=(t=n).n):n=t?t.n=n.n:au=n.n;return uu=t,e}function Rt(t,n){return n-(t?Math.ceil(Math.log(t)/Math.LN10):1)}function Nt(t,n){var e=Math.pow(10,3*xa(8-n));return{scale:n>8?function(t){return t/e}:function(t){return t*e},symbol:t}}function Ft(t){var n=t.decimal,e=t.thousands,r=t.grouping,i=t.currency,o=r&&e?function(t,n){for(var i=t.length,o=[],a=0,u=r[0],s=0;i>0&&u>0&&(s+u+1>n&&(u=Math.max(1,n-s)),o.push(t.substring(i-=u,i+u)),!((s+=u+1)>n));)u=r[a=(a+1)%r.length];return o.reverse().join(e)}:y;return function(t){var e=hu.exec(t),r=e[1]||" ",a=e[2]||">",u=e[3]||"-",s=e[4]||"",l=e[5],c=+e[6],f=e[7],h=e[8],p=e[9],d=1,v="",g="",m=!1,y=!0;switch(h&&(h=+h.substring(1)),(l||"0"===r&&"="===a)&&(l=r="0",a="="),p){case"n":f=!0,p="g";break;case"%":d=100,g="%",p="f";break;case"p":d=100,g="%",p="r";break;case"b":case"o":case"x":case"X":"#"===s&&(v="0"+p.toLowerCase());case"c":y=!1;case"d":m=!0,h=0;break;case"s":d=-1,p="r"}"$"===s&&(v=i[0],g=i[1]),"r"!=p||h||(p="g"),null!=h&&("g"==p?h=Math.max(1,Math.min(21,h)):"e"!=p&&"f"!=p||(h=Math.max(0,Math.min(20,h)))),p=pu.get(p)||Dt;var $=l&&f;return function(t){var e=g;if(m&&t%1)return"";var i=0>t||0===t&&0>1/t?(t=-t,"-"):"-"===u?"":u;if(0>d){var s=sa.formatPrefix(t,h);t=s.scale(t),e=s.symbol+g}else t*=d;t=p(t,h);var x,b,w=t.lastIndexOf(".");if(0>w){var _=y?t.lastIndexOf("e"):-1;0>_?(x=t,b=""):(x=t.substring(0,_),b=t.substring(_))}else x=t.substring(0,w),b=n+t.substring(w+1);!l&&f&&(x=o(x,1/0));var C=v.length+x.length+b.length+($?0:i.length),S=c>C?new Array(C=c-C+1).join(r):"";return $&&(x=o(S+x,S.length?c-b.length:1/0)),i+=v,t=x+b,("<"===a?i+t+S:">"===a?S+i+t:"^"===a?S.substring(0,C>>=1)+i+t+S.substring(C):i+($?t:S+t))+e}}}function Dt(t){return t+""}function It(){this._=new Date(arguments.length>1?Date.UTC.apply(this,arguments):arguments[0])}function zt(t,n,e){function r(n){var e=t(n),r=o(e,1);return r-n>n-e?e:r}function i(e){return n(e=t(new vu(e-1)),1),e}function o(t,e){return n(t=new vu(+t),e),t}function a(t,r,o){var a=i(t),u=[];if(o>1)for(;r>a;)e(a)%o||u.push(new Date(+a)),n(a,1);else for(;r>a;)u.push(new Date(+a)),n(a,1);return u}function u(t,n,e){try{vu=It;var r=new It;return r._=t,a(r,n,e)}finally{vu=Date}}t.floor=t,t.round=r,t.ceil=i,t.offset=o,t.range=a;var s=t.utc=qt(t);return s.floor=s,s.round=qt(r),s.ceil=qt(i),s.offset=qt(o),s.range=u,t}function qt(t){return function(n,e){try{vu=It;var r=new It;return r._=n,t(r,e)._}finally{vu=Date}}}function Vt(t){function n(t){function n(n){for(var e,i,o,a=[],u=-1,s=0;++u<r;)37===t.charCodeAt(u)&&(a.push(t.slice(s,u)),null!=(i=mu[e=t.charAt(++u)])&&(e=t.charAt(++u)),(o=A[e])&&(e=o(n,null==i?"e"===e?" ":"0":i)),a.push(e),s=u+1);return a.push(t.slice(s,u)),a.join("")}var r=t.length;return n.parse=function(n){var r={y:1900,m:0,d:1,H:0,M:0,S:0,L:0,Z:null},i=e(r,t,n,0);if(i!=n.length)return null;"p"in r&&(r.H=r.H%12+12*r.p);var o=null!=r.Z&&vu!==It,a=new(o?It:vu);return"j"in r?a.setFullYear(r.y,0,r.j):"W"in r||"U"in r?("w"in r||(r.w="W"in r?1:0),a.setFullYear(r.y,0,1),a.setFullYear(r.y,0,"W"in r?(r.w+6)%7+7*r.W-(a.getDay()+5)%7:r.w+7*r.U-(a.getDay()+6)%7)):a.setFullYear(r.y,r.m,r.d),a.setHours(r.H+(r.Z/100|0),r.M+r.Z%100,r.S,r.L),o?a._:a},n.toString=function(){return t},n}function e(t,n,e,r){for(var i,o,a,u=0,s=n.length,l=e.length;s>u;){if(r>=l)return-1;if(i=n.charCodeAt(u++),37===i){if(a=n.charAt(u++),o=E[a in mu?n.charAt(u++):a],!o||(r=o(t,e,r))<0)return-1}else if(i!=e.charCodeAt(r++))return-1}return r}function r(t,n,e){w.lastIndex=0;var r=w.exec(n.slice(e));return r?(t.w=_.get(r[0].toLowerCase()),e+r[0].length):-1}function i(t,n,e){x.lastIndex=0;var r=x.exec(n.slice(e));return r?(t.w=b.get(r[0].toLowerCase()),e+r[0].length):-1}function o(t,n,e){M.lastIndex=0;var r=M.exec(n.slice(e));return r?(t.m=k.get(r[0].toLowerCase()),e+r[0].length):-1}function a(t,n,e){C.lastIndex=0;var r=C.exec(n.slice(e));return r?(t.m=S.get(r[0].toLowerCase()),e+r[0].length):-1}function u(t,n,r){return e(t,A.c.toString(),n,r)}function s(t,n,r){return e(t,A.x.toString(),n,r)}function l(t,n,r){return e(t,A.X.toString(),n,r)}function c(t,n,e){var r=$.get(n.slice(e,e+=2).toLowerCase());return null==r?-1:(t.p=r,e)}var f=t.dateTime,h=t.date,p=t.time,d=t.periods,v=t.days,g=t.shortDays,m=t.months,y=t.shortMonths;n.utc=function(t){function e(t){try{vu=It;var n=new vu;return n._=t,r(n)}finally{vu=Date}}var r=n(t);return e.parse=function(t){try{vu=It;var n=r.parse(t);return n&&n._}finally{vu=Date}},e.toString=r.toString,e},n.multi=n.utc.multi=ln;var $=sa.map(),x=Wt(v),b=Ut(v),w=Wt(g),_=Ut(g),C=Wt(m),S=Ut(m),M=Wt(y),k=Ut(y);d.forEach(function(t,n){$.set(t.toLowerCase(),n)});var A={a:function(t){return g[t.getDay()]},A:function(t){return v[t.getDay()]},b:function(t){return y[t.getMonth()]},B:function(t){return m[t.getMonth()]},c:n(f),d:function(t,n){return Bt(t.getDate(),n,2)},e:function(t,n){return Bt(t.getDate(),n,2)},H:function(t,n){return Bt(t.getHours(),n,2)},I:function(t,n){return Bt(t.getHours()%12||12,n,2)},j:function(t,n){return Bt(1+du.dayOfYear(t),n,3)},L:function(t,n){return Bt(t.getMilliseconds(),n,3)},m:function(t,n){return Bt(t.getMonth()+1,n,2)},M:function(t,n){return Bt(t.getMinutes(),n,2)},p:function(t){return d[+(t.getHours()>=12)]},S:function(t,n){return Bt(t.getSeconds(),n,2)},U:function(t,n){return Bt(du.sundayOfYear(t),n,2)},w:function(t){return t.getDay()},W:function(t,n){return Bt(du.mondayOfYear(t),n,2)},x:n(h),X:n(p),y:function(t,n){return Bt(t.getFullYear()%100,n,2)},Y:function(t,n){return Bt(t.getFullYear()%1e4,n,4)},Z:un,"%":function(){return"%"}},E={a:r,A:i,b:o,B:a,c:u,d:tn,e:tn,H:en,I:en,j:nn,L:an,m:Qt,M:rn,p:c,S:on,U:Yt,w:Ht,W:Gt,x:s,X:l,y:Zt,Y:Xt,Z:Jt,"%":sn};return n}function Bt(t,n,e){var r=0>t?"-":"",i=(r?-t:t)+"",o=i.length;return r+(e>o?new Array(e-o+1).join(n)+i:i)}function Wt(t){return new RegExp("^(?:"+t.map(sa.requote).join("|")+")","i")}function Ut(t){for(var n=new l,e=-1,r=t.length;++e<r;)n.set(t[e].toLowerCase(),e);return n}function Ht(t,n,e){yu.lastIndex=0;var r=yu.exec(n.slice(e,e+1));return r?(t.w=+r[0],e+r[0].length):-1}function Yt(t,n,e){yu.lastIndex=0;var r=yu.exec(n.slice(e));return r?(t.U=+r[0],e+r[0].length):-1}function Gt(t,n,e){yu.lastIndex=0;var r=yu.exec(n.slice(e));return r?(t.W=+r[0],e+r[0].length):-1}function Xt(t,n,e){yu.lastIndex=0;var r=yu.exec(n.slice(e,e+4));return r?(t.y=+r[0],e+r[0].length):-1}function Zt(t,n,e){yu.lastIndex=0;var r=yu.exec(n.slice(e,e+2));return r?(t.y=Kt(+r[0]),e+r[0].length):-1}function Jt(t,n,e){return/^[+-]\d{4}$/.test(n=n.slice(e,e+5))?(t.Z=-n,e+5):-1}function Kt(t){return t+(t>68?1900:2e3)}function Qt(t,n,e){yu.lastIndex=0;var r=yu.exec(n.slice(e,e+2));return r?(t.m=r[0]-1,e+r[0].length):-1}function tn(t,n,e){yu.lastIndex=0;var r=yu.exec(n.slice(e,e+2));return r?(t.d=+r[0],e+r[0].length):-1}function nn(t,n,e){yu.lastIndex=0;var r=yu.exec(n.slice(e,e+3));return r?(t.j=+r[0],e+r[0].length):-1}function en(t,n,e){yu.lastIndex=0;var r=yu.exec(n.slice(e,e+2));return r?(t.H=+r[0],e+r[0].length):-1}function rn(t,n,e){yu.lastIndex=0;var r=yu.exec(n.slice(e,e+2));return r?(t.M=+r[0],e+r[0].length):-1}function on(t,n,e){yu.lastIndex=0;var r=yu.exec(n.slice(e,e+2));return r?(t.S=+r[0],e+r[0].length):-1}function an(t,n,e){yu.lastIndex=0;var r=yu.exec(n.slice(e,e+3));return r?(t.L=+r[0],e+r[0].length):-1}function un(t){var n=t.getTimezoneOffset(),e=n>0?"-":"+",r=xa(n)/60|0,i=xa(n)%60;return e+Bt(r,"0",2)+Bt(i,"0",2)}function sn(t,n,e){$u.lastIndex=0;var r=$u.exec(n.slice(e,e+1));return r?e+r[0].length:-1;
-}function ln(t){for(var n=t.length,e=-1;++e<n;)t[e][0]=this(t[e][0]);return function(n){for(var e=0,r=t[e];!r[1](n);)r=t[++e];return r[0](n)}}function cn(){}function fn(t,n,e){var r=e.s=t+n,i=r-t,o=r-i;e.t=t-o+(n-i)}function hn(t,n){t&&_u.hasOwnProperty(t.type)&&_u[t.type](t,n)}function pn(t,n,e){var r,i=-1,o=t.length-e;for(n.lineStart();++i<o;)r=t[i],n.point(r[0],r[1],r[2]);n.lineEnd()}function dn(t,n){var e=-1,r=t.length;for(n.polygonStart();++e<r;)pn(t[e],n,1);n.polygonEnd()}function vn(){function t(t,n){t*=Ba,n=n*Ba/2+Ia/4;var e=t-r,a=e>=0?1:-1,u=a*e,s=Math.cos(n),l=Math.sin(n),c=o*l,f=i*s+c*Math.cos(u),h=c*a*Math.sin(u);Su.add(Math.atan2(h,f)),r=t,i=s,o=l}var n,e,r,i,o;Mu.point=function(a,u){Mu.point=t,r=(n=a)*Ba,i=Math.cos(u=(e=u)*Ba/2+Ia/4),o=Math.sin(u)},Mu.lineEnd=function(){t(n,e)}}function gn(t){var n=t[0],e=t[1],r=Math.cos(e);return[r*Math.cos(n),r*Math.sin(n),Math.sin(e)]}function mn(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]}function yn(t,n){return[t[1]*n[2]-t[2]*n[1],t[2]*n[0]-t[0]*n[2],t[0]*n[1]-t[1]*n[0]]}function $n(t,n){t[0]+=n[0],t[1]+=n[1],t[2]+=n[2]}function xn(t,n){return[t[0]*n,t[1]*n,t[2]*n]}function bn(t){var n=Math.sqrt(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=n,t[1]/=n,t[2]/=n}function wn(t){return[Math.atan2(t[1],t[0]),nt(t[2])]}function _n(t,n){return xa(t[0]-n[0])<Fa&&xa(t[1]-n[1])<Fa}function Cn(t,n){t*=Ba;var e=Math.cos(n*=Ba);Sn(e*Math.cos(t),e*Math.sin(t),Math.sin(n))}function Sn(t,n,e){++ku,Eu+=(t-Eu)/ku,Pu+=(n-Pu)/ku,Ou+=(e-Ou)/ku}function Mn(){function t(t,i){t*=Ba;var o=Math.cos(i*=Ba),a=o*Math.cos(t),u=o*Math.sin(t),s=Math.sin(i),l=Math.atan2(Math.sqrt((l=e*s-r*u)*l+(l=r*a-n*s)*l+(l=n*u-e*a)*l),n*a+e*u+r*s);Au+=l,Tu+=l*(n+(n=a)),ju+=l*(e+(e=u)),Lu+=l*(r+(r=s)),Sn(n,e,r)}var n,e,r;Du.point=function(i,o){i*=Ba;var a=Math.cos(o*=Ba);n=a*Math.cos(i),e=a*Math.sin(i),r=Math.sin(o),Du.point=t,Sn(n,e,r)}}function kn(){Du.point=Cn}function An(){function t(t,n){t*=Ba;var e=Math.cos(n*=Ba),a=e*Math.cos(t),u=e*Math.sin(t),s=Math.sin(n),l=i*s-o*u,c=o*a-r*s,f=r*u-i*a,h=Math.sqrt(l*l+c*c+f*f),p=r*a+i*u+o*s,d=h&&-tt(p)/h,v=Math.atan2(h,p);Ru+=d*l,Nu+=d*c,Fu+=d*f,Au+=v,Tu+=v*(r+(r=a)),ju+=v*(i+(i=u)),Lu+=v*(o+(o=s)),Sn(r,i,o)}var n,e,r,i,o;Du.point=function(a,u){n=a,e=u,Du.point=t,a*=Ba;var s=Math.cos(u*=Ba);r=s*Math.cos(a),i=s*Math.sin(a),o=Math.sin(u),Sn(r,i,o)},Du.lineEnd=function(){t(n,e),Du.lineEnd=kn,Du.point=Cn}}function En(t,n){function e(e,r){return e=t(e,r),n(e[0],e[1])}return t.invert&&n.invert&&(e.invert=function(e,r){return e=n.invert(e,r),e&&t.invert(e[0],e[1])}),e}function Pn(){return!0}function On(t,n,e,r,i){var o=[],a=[];if(t.forEach(function(t){if(!((n=t.length-1)<=0)){var n,e=t[0],r=t[n];if(_n(e,r)){i.lineStart();for(var u=0;n>u;++u)i.point((e=t[u])[0],e[1]);return void i.lineEnd()}var s=new jn(e,t,null,!0),l=new jn(e,null,s,!1);s.o=l,o.push(s),a.push(l),s=new jn(r,t,null,!1),l=new jn(r,null,s,!0),s.o=l,o.push(s),a.push(l)}}),a.sort(n),Tn(o),Tn(a),o.length){for(var u=0,s=e,l=a.length;l>u;++u)a[u].e=s=!s;for(var c,f,h=o[0];;){for(var p=h,d=!0;p.v;)if((p=p.n)===h)return;c=p.z,i.lineStart();do{if(p.v=p.o.v=!0,p.e){if(d)for(var u=0,l=c.length;l>u;++u)i.point((f=c[u])[0],f[1]);else r(p.x,p.n.x,1,i);p=p.n}else{if(d){c=p.p.z;for(var u=c.length-1;u>=0;--u)i.point((f=c[u])[0],f[1])}else r(p.x,p.p.x,-1,i);p=p.p}p=p.o,c=p.z,d=!d}while(!p.v);i.lineEnd()}}}function Tn(t){if(n=t.length){for(var n,e,r=0,i=t[0];++r<n;)i.n=e=t[r],e.p=i,i=e;i.n=e=t[0],e.p=i}}function jn(t,n,e,r){this.x=t,this.z=n,this.o=e,this.e=r,this.v=!1,this.n=this.p=null}function Ln(t,n,e,r){return function(i,o){function a(n,e){var r=i(n,e);t(n=r[0],e=r[1])&&o.point(n,e)}function u(t,n){var e=i(t,n);g.point(e[0],e[1])}function s(){y.point=u,g.lineStart()}function l(){y.point=a,g.lineEnd()}function c(t,n){v.push([t,n]);var e=i(t,n);x.point(e[0],e[1])}function f(){x.lineStart(),v=[]}function h(){c(v[0][0],v[0][1]),x.lineEnd();var t,n=x.clean(),e=$.buffer(),r=e.length;if(v.pop(),d.push(v),v=null,r)if(1&n){t=e[0];var i,r=t.length-1,a=-1;if(r>0){for(b||(o.polygonStart(),b=!0),o.lineStart();++a<r;)o.point((i=t[a])[0],i[1]);o.lineEnd()}}else r>1&&2&n&&e.push(e.pop().concat(e.shift())),p.push(e.filter(Rn))}var p,d,v,g=n(o),m=i.invert(r[0],r[1]),y={point:a,lineStart:s,lineEnd:l,polygonStart:function(){y.point=c,y.lineStart=f,y.lineEnd=h,p=[],d=[]},polygonEnd:function(){y.point=a,y.lineStart=s,y.lineEnd=l,p=sa.merge(p);var t=qn(m,d);p.length?(b||(o.polygonStart(),b=!0),On(p,Fn,t,e,o)):t&&(b||(o.polygonStart(),b=!0),o.lineStart(),e(null,null,1,o),o.lineEnd()),b&&(o.polygonEnd(),b=!1),p=d=null},sphere:function(){o.polygonStart(),o.lineStart(),e(null,null,1,o),o.lineEnd(),o.polygonEnd()}},$=Nn(),x=n($),b=!1;return y}}function Rn(t){return t.length>1}function Nn(){var t,n=[];return{lineStart:function(){n.push(t=[])},point:function(n,e){t.push([n,e])},lineEnd:b,buffer:function(){var e=n;return n=[],t=null,e},rejoin:function(){n.length>1&&n.push(n.pop().concat(n.shift()))}}}function Fn(t,n){return((t=t.x)[0]<0?t[1]-Va-Fa:Va-t[1])-((n=n.x)[0]<0?n[1]-Va-Fa:Va-n[1])}function Dn(t){var n,e=NaN,r=NaN,i=NaN;return{lineStart:function(){t.lineStart(),n=1},point:function(o,a){var u=o>0?Ia:-Ia,s=xa(o-e);xa(s-Ia)<Fa?(t.point(e,r=(r+a)/2>0?Va:-Va),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(u,r),t.point(o,r),n=0):i!==u&&s>=Ia&&(xa(e-i)<Fa&&(e-=i*Fa),xa(o-u)<Fa&&(o-=u*Fa),r=In(e,r,o,a),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(u,r),n=0),t.point(e=o,r=a),i=u},lineEnd:function(){t.lineEnd(),e=r=NaN},clean:function(){return 2-n}}}function In(t,n,e,r){var i,o,a=Math.sin(t-e);return xa(a)>Fa?Math.atan((Math.sin(n)*(o=Math.cos(r))*Math.sin(e)-Math.sin(r)*(i=Math.cos(n))*Math.sin(t))/(i*o*a)):(n+r)/2}function zn(t,n,e,r){var i;if(null==t)i=e*Va,r.point(-Ia,i),r.point(0,i),r.point(Ia,i),r.point(Ia,0),r.point(Ia,-i),r.point(0,-i),r.point(-Ia,-i),r.point(-Ia,0),r.point(-Ia,i);else if(xa(t[0]-n[0])>Fa){var o=t[0]<n[0]?Ia:-Ia;i=e*o/2,r.point(-o,i),r.point(0,i),r.point(o,i)}else r.point(n[0],n[1])}function qn(t,n){var e=t[0],r=t[1],i=[Math.sin(e),-Math.cos(e),0],o=0,a=0;Su.reset();for(var u=0,s=n.length;s>u;++u){var l=n[u],c=l.length;if(c)for(var f=l[0],h=f[0],p=f[1]/2+Ia/4,d=Math.sin(p),v=Math.cos(p),g=1;;){g===c&&(g=0),t=l[g];var m=t[0],y=t[1]/2+Ia/4,$=Math.sin(y),x=Math.cos(y),b=m-h,w=b>=0?1:-1,_=w*b,C=_>Ia,S=d*$;if(Su.add(Math.atan2(S*w*Math.sin(_),v*x+S*Math.cos(_))),o+=C?b+w*za:b,C^h>=e^m>=e){var M=yn(gn(f),gn(t));bn(M);var k=yn(i,M);bn(k);var A=(C^b>=0?-1:1)*nt(k[2]);(r>A||r===A&&(M[0]||M[1]))&&(a+=C^b>=0?1:-1)}if(!g++)break;h=m,d=$,v=x,f=t}}return(-Fa>o||Fa>o&&-Fa>Su)^1&a}function Vn(t){function n(t,n){return Math.cos(t)*Math.cos(n)>o}function e(t){var e,o,s,l,c;return{lineStart:function(){l=s=!1,c=1},point:function(f,h){var p,d=[f,h],v=n(f,h),g=a?v?0:i(f,h):v?i(f+(0>f?Ia:-Ia),h):0;if(!e&&(l=s=v)&&t.lineStart(),v!==s&&(p=r(e,d),(_n(e,p)||_n(d,p))&&(d[0]+=Fa,d[1]+=Fa,v=n(d[0],d[1]))),v!==s)c=0,v?(t.lineStart(),p=r(d,e),t.point(p[0],p[1])):(p=r(e,d),t.point(p[0],p[1]),t.lineEnd()),e=p;else if(u&&e&&a^v){var m;g&o||!(m=r(d,e,!0))||(c=0,a?(t.lineStart(),t.point(m[0][0],m[0][1]),t.point(m[1][0],m[1][1]),t.lineEnd()):(t.point(m[1][0],m[1][1]),t.lineEnd(),t.lineStart(),t.point(m[0][0],m[0][1])))}!v||e&&_n(e,d)||t.point(d[0],d[1]),e=d,s=v,o=g},lineEnd:function(){s&&t.lineEnd(),e=null},clean:function(){return c|(l&&s)<<1}}}function r(t,n,e){var r=gn(t),i=gn(n),a=[1,0,0],u=yn(r,i),s=mn(u,u),l=u[0],c=s-l*l;if(!c)return!e&&t;var f=o*s/c,h=-o*l/c,p=yn(a,u),d=xn(a,f),v=xn(u,h);$n(d,v);var g=p,m=mn(d,g),y=mn(g,g),$=m*m-y*(mn(d,d)-1);if(!(0>$)){var x=Math.sqrt($),b=xn(g,(-m-x)/y);if($n(b,d),b=wn(b),!e)return b;var w,_=t[0],C=n[0],S=t[1],M=n[1];_>C&&(w=_,_=C,C=w);var k=C-_,A=xa(k-Ia)<Fa,E=A||Fa>k;if(!A&&S>M&&(w=S,S=M,M=w),E?A?S+M>0^b[1]<(xa(b[0]-_)<Fa?S:M):S<=b[1]&&b[1]<=M:k>Ia^(_<=b[0]&&b[0]<=C)){var P=xn(g,(-m+x)/y);return $n(P,d),[b,wn(P)]}}}function i(n,e){var r=a?t:Ia-t,i=0;return-r>n?i|=1:n>r&&(i|=2),-r>e?i|=4:e>r&&(i|=8),i}var o=Math.cos(t),a=o>0,u=xa(o)>Fa,s=ve(t,6*Ba);return Ln(n,e,s,a?[0,-t]:[-Ia,t-Ia])}function Bn(t,n,e,r){return function(i){var o,a=i.a,u=i.b,s=a.x,l=a.y,c=u.x,f=u.y,h=0,p=1,d=c-s,v=f-l;if(o=t-s,d||!(o>0)){if(o/=d,0>d){if(h>o)return;p>o&&(p=o)}else if(d>0){if(o>p)return;o>h&&(h=o)}if(o=e-s,d||!(0>o)){if(o/=d,0>d){if(o>p)return;o>h&&(h=o)}else if(d>0){if(h>o)return;p>o&&(p=o)}if(o=n-l,v||!(o>0)){if(o/=v,0>v){if(h>o)return;p>o&&(p=o)}else if(v>0){if(o>p)return;o>h&&(h=o)}if(o=r-l,v||!(0>o)){if(o/=v,0>v){if(o>p)return;o>h&&(h=o)}else if(v>0){if(h>o)return;p>o&&(p=o)}return h>0&&(i.a={x:s+h*d,y:l+h*v}),1>p&&(i.b={x:s+p*d,y:l+p*v}),i}}}}}}function Wn(t,n,e,r){function i(r,i){return xa(r[0]-t)<Fa?i>0?0:3:xa(r[0]-e)<Fa?i>0?2:1:xa(r[1]-n)<Fa?i>0?1:0:i>0?3:2}function o(t,n){return a(t.x,n.x)}function a(t,n){var e=i(t,1),r=i(n,1);return e!==r?e-r:0===e?n[1]-t[1]:1===e?t[0]-n[0]:2===e?t[1]-n[1]:n[0]-t[0]}return function(u){function s(t){for(var n=0,e=g.length,r=t[1],i=0;e>i;++i)for(var o,a=1,u=g[i],s=u.length,l=u[0];s>a;++a)o=u[a],l[1]<=r?o[1]>r&&Q(l,o,t)>0&&++n:o[1]<=r&&Q(l,o,t)<0&&--n,l=o;return 0!==n}function l(o,u,s,l){var c=0,f=0;if(null==o||(c=i(o,s))!==(f=i(u,s))||a(o,u)<0^s>0){do l.point(0===c||3===c?t:e,c>1?r:n);while((c=(c+s+4)%4)!==f)}else l.point(u[0],u[1])}function c(i,o){return i>=t&&e>=i&&o>=n&&r>=o}function f(t,n){c(t,n)&&u.point(t,n)}function h(){E.point=d,g&&g.push(m=[]),C=!0,_=!1,b=w=NaN}function p(){v&&(d(y,$),x&&_&&k.rejoin(),v.push(k.buffer())),E.point=f,_&&u.lineEnd()}function d(t,n){t=Math.max(-zu,Math.min(zu,t)),n=Math.max(-zu,Math.min(zu,n));var e=c(t,n);if(g&&m.push([t,n]),C)y=t,$=n,x=e,C=!1,e&&(u.lineStart(),u.point(t,n));else if(e&&_)u.point(t,n);else{var r={a:{x:b,y:w},b:{x:t,y:n}};A(r)?(_||(u.lineStart(),u.point(r.a.x,r.a.y)),u.point(r.b.x,r.b.y),e||u.lineEnd(),S=!1):e&&(u.lineStart(),u.point(t,n),S=!1)}b=t,w=n,_=e}var v,g,m,y,$,x,b,w,_,C,S,M=u,k=Nn(),A=Bn(t,n,e,r),E={point:f,lineStart:h,lineEnd:p,polygonStart:function(){u=k,v=[],g=[],S=!0},polygonEnd:function(){u=M,v=sa.merge(v);var n=s([t,r]),e=S&&n,i=v.length;(e||i)&&(u.polygonStart(),e&&(u.lineStart(),l(null,null,1,u),u.lineEnd()),i&&On(v,o,n,l,u),u.polygonEnd()),v=g=m=null}};return E}}function Un(t){var n=0,e=Ia/3,r=ue(t),i=r(n,e);return i.parallels=function(t){return arguments.length?r(n=t[0]*Ia/180,e=t[1]*Ia/180):[n/Ia*180,e/Ia*180]},i}function Hn(t,n){function e(t,n){var e=Math.sqrt(o-2*i*Math.sin(n))/i;return[e*Math.sin(t*=i),a-e*Math.cos(t)]}var r=Math.sin(t),i=(r+Math.sin(n))/2,o=1+r*(2*i-r),a=Math.sqrt(o)/i;return e.invert=function(t,n){var e=a-n;return[Math.atan2(t,e)/i,nt((o-(t*t+e*e)*i*i)/(2*i))]},e}function Yn(){function t(t,n){Vu+=i*t-r*n,r=t,i=n}var n,e,r,i;Yu.point=function(o,a){Yu.point=t,n=r=o,e=i=a},Yu.lineEnd=function(){t(n,e)}}function Gn(t,n){Bu>t&&(Bu=t),t>Uu&&(Uu=t),Wu>n&&(Wu=n),n>Hu&&(Hu=n)}function Xn(){function t(t,n){a.push("M",t,",",n,o)}function n(t,n){a.push("M",t,",",n),u.point=e}function e(t,n){a.push("L",t,",",n)}function r(){u.point=t}function i(){a.push("Z")}var o=Zn(4.5),a=[],u={point:t,lineStart:function(){u.point=n},lineEnd:r,polygonStart:function(){u.lineEnd=i},polygonEnd:function(){u.lineEnd=r,u.point=t},pointRadius:function(t){return o=Zn(t),u},result:function(){if(a.length){var t=a.join("");return a=[],t}}};return u}function Zn(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}function Jn(t,n){Eu+=t,Pu+=n,++Ou}function Kn(){function t(t,r){var i=t-n,o=r-e,a=Math.sqrt(i*i+o*o);Tu+=a*(n+t)/2,ju+=a*(e+r)/2,Lu+=a,Jn(n=t,e=r)}var n,e;Xu.point=function(r,i){Xu.point=t,Jn(n=r,e=i)}}function Qn(){Xu.point=Jn}function te(){function t(t,n){var e=t-r,o=n-i,a=Math.sqrt(e*e+o*o);Tu+=a*(r+t)/2,ju+=a*(i+n)/2,Lu+=a,a=i*t-r*n,Ru+=a*(r+t),Nu+=a*(i+n),Fu+=3*a,Jn(r=t,i=n)}var n,e,r,i;Xu.point=function(o,a){Xu.point=t,Jn(n=r=o,e=i=a)},Xu.lineEnd=function(){t(n,e)}}function ne(t){function n(n,e){t.moveTo(n+a,e),t.arc(n,e,a,0,za)}function e(n,e){t.moveTo(n,e),u.point=r}function r(n,e){t.lineTo(n,e)}function i(){u.point=n}function o(){t.closePath()}var a=4.5,u={point:n,lineStart:function(){u.point=e},lineEnd:i,polygonStart:function(){u.lineEnd=o},polygonEnd:function(){u.lineEnd=i,u.point=n},pointRadius:function(t){return a=t,u},result:b};return u}function ee(t){function n(t){return(u?r:e)(t)}function e(n){return oe(n,function(e,r){e=t(e,r),n.point(e[0],e[1])})}function r(n){function e(e,r){e=t(e,r),n.point(e[0],e[1])}function r(){$=NaN,C.point=o,n.lineStart()}function o(e,r){var o=gn([e,r]),a=t(e,r);i($,x,y,b,w,_,$=a[0],x=a[1],y=e,b=o[0],w=o[1],_=o[2],u,n),n.point($,x)}function a(){C.point=e,n.lineEnd()}function s(){r(),C.point=l,C.lineEnd=c}function l(t,n){o(f=t,h=n),p=$,d=x,v=b,g=w,m=_,C.point=o}function c(){i($,x,y,b,w,_,p,d,f,v,g,m,u,n),C.lineEnd=a,a()}var f,h,p,d,v,g,m,y,$,x,b,w,_,C={point:e,lineStart:r,lineEnd:a,polygonStart:function(){n.polygonStart(),C.lineStart=s},polygonEnd:function(){n.polygonEnd(),C.lineStart=r}};return C}function i(n,e,r,u,s,l,c,f,h,p,d,v,g,m){var y=c-n,$=f-e,x=y*y+$*$;if(x>4*o&&g--){var b=u+p,w=s+d,_=l+v,C=Math.sqrt(b*b+w*w+_*_),S=Math.asin(_/=C),M=xa(xa(_)-1)<Fa||xa(r-h)<Fa?(r+h)/2:Math.atan2(w,b),k=t(M,S),A=k[0],E=k[1],P=A-n,O=E-e,T=$*P-y*O;(T*T/x>o||xa((y*P+$*O)/x-.5)>.3||a>u*p+s*d+l*v)&&(i(n,e,r,u,s,l,A,E,M,b/=C,w/=C,_,g,m),m.point(A,E),i(A,E,M,b,w,_,c,f,h,p,d,v,g,m))}}var o=.5,a=Math.cos(30*Ba),u=16;return n.precision=function(t){return arguments.length?(u=(o=t*t)>0&&16,n):Math.sqrt(o)},n}function re(t){var n=ee(function(n,e){return t([n*Wa,e*Wa])});return function(t){return se(n(t))}}function ie(t){this.stream=t}function oe(t,n){return{point:n,sphere:function(){t.sphere()},lineStart:function(){t.lineStart()},lineEnd:function(){t.lineEnd()},polygonStart:function(){t.polygonStart()},polygonEnd:function(){t.polygonEnd()}}}function ae(t){return ue(function(){return t})()}function ue(t){function n(t){return t=u(t[0]*Ba,t[1]*Ba),[t[0]*h+s,l-t[1]*h]}function e(t){return t=u.invert((t[0]-s)/h,(l-t[1])/h),t&&[t[0]*Wa,t[1]*Wa]}function r(){u=En(a=fe(m,$,x),o);var t=o(v,g);return s=p-t[0]*h,l=d+t[1]*h,i()}function i(){return c&&(c.valid=!1,c=null),n}var o,a,u,s,l,c,f=ee(function(t,n){return t=o(t,n),[t[0]*h+s,l-t[1]*h]}),h=150,p=480,d=250,v=0,g=0,m=0,$=0,x=0,b=Iu,w=y,_=null,C=null;return n.stream=function(t){return c&&(c.valid=!1),c=se(b(a,f(w(t)))),c.valid=!0,c},n.clipAngle=function(t){return arguments.length?(b=null==t?(_=t,Iu):Vn((_=+t)*Ba),i()):_},n.clipExtent=function(t){return arguments.length?(C=t,w=t?Wn(t[0][0],t[0][1],t[1][0],t[1][1]):y,i()):C},n.scale=function(t){return arguments.length?(h=+t,r()):h},n.translate=function(t){return arguments.length?(p=+t[0],d=+t[1],r()):[p,d]},n.center=function(t){return arguments.length?(v=t[0]%360*Ba,g=t[1]%360*Ba,r()):[v*Wa,g*Wa]},n.rotate=function(t){return arguments.length?(m=t[0]%360*Ba,$=t[1]%360*Ba,x=t.length>2?t[2]%360*Ba:0,r()):[m*Wa,$*Wa,x*Wa]},sa.rebind(n,f,"precision"),function(){return o=t.apply(this,arguments),n.invert=o.invert&&e,r()}}function se(t){return oe(t,function(n,e){t.point(n*Ba,e*Ba)})}function le(t,n){return[t,n]}function ce(t,n){return[t>Ia?t-za:-Ia>t?t+za:t,n]}function fe(t,n,e){return t?n||e?En(pe(t),de(n,e)):pe(t):n||e?de(n,e):ce}function he(t){return function(n,e){return n+=t,[n>Ia?n-za:-Ia>n?n+za:n,e]}}function pe(t){var n=he(t);return n.invert=he(-t),n}function de(t,n){function e(t,n){var e=Math.cos(n),u=Math.cos(t)*e,s=Math.sin(t)*e,l=Math.sin(n),c=l*r+u*i;return[Math.atan2(s*o-c*a,u*r-l*i),nt(c*o+s*a)]}var r=Math.cos(t),i=Math.sin(t),o=Math.cos(n),a=Math.sin(n);return e.invert=function(t,n){var e=Math.cos(n),u=Math.cos(t)*e,s=Math.sin(t)*e,l=Math.sin(n),c=l*o-s*a;return[Math.atan2(s*o+l*a,u*r+c*i),nt(c*r-u*i)]},e}function ve(t,n){var e=Math.cos(t),r=Math.sin(t);return function(i,o,a,u){var s=a*n;null!=i?(i=ge(e,i),o=ge(e,o),(a>0?o>i:i>o)&&(i+=a*za)):(i=t+a*za,o=t-.5*s);for(var l,c=i;a>0?c>o:o>c;c-=s)u.point((l=wn([e,-r*Math.cos(c),-r*Math.sin(c)]))[0],l[1])}}function ge(t,n){var e=gn(n);e[0]-=t,bn(e);var r=tt(-e[1]);return((-e[2]<0?-r:r)+2*Math.PI-Fa)%(2*Math.PI)}function me(t,n,e){var r=sa.range(t,n-Fa,e).concat(n);return function(t){return r.map(function(n){return[t,n]})}}function ye(t,n,e){var r=sa.range(t,n-Fa,e).concat(n);return function(t){return r.map(function(n){return[n,t]})}}function $e(t){return t.source}function xe(t){return t.target}function be(t,n,e,r){var i=Math.cos(n),o=Math.sin(n),a=Math.cos(r),u=Math.sin(r),s=i*Math.cos(t),l=i*Math.sin(t),c=a*Math.cos(e),f=a*Math.sin(e),h=2*Math.asin(Math.sqrt(ot(r-n)+i*a*ot(e-t))),p=1/Math.sin(h),d=h?function(t){var n=Math.sin(t*=h)*p,e=Math.sin(h-t)*p,r=e*s+n*c,i=e*l+n*f,a=e*o+n*u;return[Math.atan2(i,r)*Wa,Math.atan2(a,Math.sqrt(r*r+i*i))*Wa]}:function(){return[t*Wa,n*Wa]};return d.distance=h,d}function we(){function t(t,i){var o=Math.sin(i*=Ba),a=Math.cos(i),u=xa((t*=Ba)-n),s=Math.cos(u);Zu+=Math.atan2(Math.sqrt((u=a*Math.sin(u))*u+(u=r*o-e*a*s)*u),e*o+r*a*s),n=t,e=o,r=a}var n,e,r;Ju.point=function(i,o){n=i*Ba,e=Math.sin(o*=Ba),r=Math.cos(o),Ju.point=t},Ju.lineEnd=function(){Ju.point=Ju.lineEnd=b}}function _e(t,n){function e(n,e){var r=Math.cos(n),i=Math.cos(e),o=t(r*i);return[o*i*Math.sin(n),o*Math.sin(e)]}return e.invert=function(t,e){var r=Math.sqrt(t*t+e*e),i=n(r),o=Math.sin(i),a=Math.cos(i);return[Math.atan2(t*o,r*a),Math.asin(r&&e*o/r)]},e}function Ce(t,n){function e(t,n){a>0?-Va+Fa>n&&(n=-Va+Fa):n>Va-Fa&&(n=Va-Fa);var e=a/Math.pow(i(n),o);return[e*Math.sin(o*t),a-e*Math.cos(o*t)]}var r=Math.cos(t),i=function(t){return Math.tan(Ia/4+t/2)},o=t===n?Math.sin(t):Math.log(r/Math.cos(n))/Math.log(i(n)/i(t)),a=r*Math.pow(i(t),o)/o;return o?(e.invert=function(t,n){var e=a-n,r=K(o)*Math.sqrt(t*t+e*e);return[Math.atan2(t,e)/o,2*Math.atan(Math.pow(a/r,1/o))-Va]},e):Me}function Se(t,n){function e(t,n){var e=o-n;return[e*Math.sin(i*t),o-e*Math.cos(i*t)]}var r=Math.cos(t),i=t===n?Math.sin(t):(r-Math.cos(n))/(n-t),o=r/i+t;return xa(i)<Fa?le:(e.invert=function(t,n){var e=o-n;return[Math.atan2(t,e)/i,o-K(i)*Math.sqrt(t*t+e*e)]},e)}function Me(t,n){return[t,Math.log(Math.tan(Ia/4+n/2))]}function ke(t){var n,e=ae(t),r=e.scale,i=e.translate,o=e.clipExtent;return e.scale=function(){var t=r.apply(e,arguments);return t===e?n?e.clipExtent(null):e:t},e.translate=function(){var t=i.apply(e,arguments);return t===e?n?e.clipExtent(null):e:t},e.clipExtent=function(t){var a=o.apply(e,arguments);if(a===e){if(n=null==t){var u=Ia*r(),s=i();o([[s[0]-u,s[1]-u],[s[0]+u,s[1]+u]])}}else n&&(a=null);return a},e.clipExtent(null)}function Ae(t,n){return[Math.log(Math.tan(Ia/4+n/2)),-t]}function Ee(t){return t[0]}function Pe(t){return t[1]}function Oe(t){for(var n=t.length,e=[0,1],r=2,i=2;n>i;i++){for(;r>1&&Q(t[e[r-2]],t[e[r-1]],t[i])<=0;)--r;e[r++]=i}return e.slice(0,r)}function Te(t,n){return t[0]-n[0]||t[1]-n[1]}function je(t,n,e){return(e[0]-n[0])*(t[1]-n[1])<(e[1]-n[1])*(t[0]-n[0])}function Le(t,n,e,r){var i=t[0],o=e[0],a=n[0]-i,u=r[0]-o,s=t[1],l=e[1],c=n[1]-s,f=r[1]-l,h=(u*(s-l)-f*(i-o))/(f*a-u*c);return[i+h*a,s+h*c]}function Re(t){var n=t[0],e=t[t.length-1];return!(n[0]-e[0]||n[1]-e[1])}function Ne(){rr(this),this.edge=this.site=this.circle=null}function Fe(t){var n=ls.pop()||new Ne;return n.site=t,n}function De(t){Ge(t),as.remove(t),ls.push(t),rr(t)}function Ie(t){var n=t.circle,e=n.x,r=n.cy,i={x:e,y:r},o=t.P,a=t.N,u=[t];De(t);for(var s=o;s.circle&&xa(e-s.circle.x)<Fa&&xa(r-s.circle.cy)<Fa;)o=s.P,u.unshift(s),De(s),s=o;u.unshift(s),Ge(s);for(var l=a;l.circle&&xa(e-l.circle.x)<Fa&&xa(r-l.circle.cy)<Fa;)a=l.N,u.push(l),De(l),l=a;u.push(l),Ge(l);var c,f=u.length;for(c=1;f>c;++c)l=u[c],s=u[c-1],tr(l.edge,s.site,l.site,i);s=u[0],l=u[f-1],l.edge=Ke(s.site,l.site,null,i),Ye(s),Ye(l)}function ze(t){for(var n,e,r,i,o=t.x,a=t.y,u=as._;u;)if(r=qe(u,a)-o,r>Fa)u=u.L;else{if(i=o-Ve(u,a),!(i>Fa)){r>-Fa?(n=u.P,e=u):i>-Fa?(n=u,e=u.N):n=e=u;break}if(!u.R){n=u;break}u=u.R}var s=Fe(t);if(as.insert(n,s),n||e){if(n===e)return Ge(n),e=Fe(n.site),as.insert(s,e),s.edge=e.edge=Ke(n.site,s.site),Ye(n),void Ye(e);if(!e)return void(s.edge=Ke(n.site,s.site));Ge(n),Ge(e);var l=n.site,c=l.x,f=l.y,h=t.x-c,p=t.y-f,d=e.site,v=d.x-c,g=d.y-f,m=2*(h*g-p*v),y=h*h+p*p,$=v*v+g*g,x={x:(g*y-p*$)/m+c,y:(h*$-v*y)/m+f};tr(e.edge,l,d,x),s.edge=Ke(l,t,null,x),e.edge=Ke(t,d,null,x),Ye(n),Ye(e)}}function qe(t,n){var e=t.site,r=e.x,i=e.y,o=i-n;if(!o)return r;var a=t.P;if(!a)return-(1/0);e=a.site;var u=e.x,s=e.y,l=s-n;if(!l)return u;var c=u-r,f=1/o-1/l,h=c/l;return f?(-h+Math.sqrt(h*h-2*f*(c*c/(-2*l)-s+l/2+i-o/2)))/f+r:(r+u)/2}function Ve(t,n){var e=t.N;if(e)return qe(e,n);var r=t.site;return r.y===n?r.x:1/0}function Be(t){this.site=t,this.edges=[]}function We(t){for(var n,e,r,i,o,a,u,s,l,c,f=t[0][0],h=t[1][0],p=t[0][1],d=t[1][1],v=os,g=v.length;g--;)if(o=v[g],o&&o.prepare())for(u=o.edges,s=u.length,a=0;s>a;)c=u[a].end(),r=c.x,i=c.y,l=u[++a%s].start(),n=l.x,e=l.y,(xa(r-n)>Fa||xa(i-e)>Fa)&&(u.splice(a,0,new nr(Qe(o.site,c,xa(r-f)<Fa&&d-i>Fa?{x:f,y:xa(n-f)<Fa?e:d}:xa(i-d)<Fa&&h-r>Fa?{x:xa(e-d)<Fa?n:h,y:d}:xa(r-h)<Fa&&i-p>Fa?{x:h,y:xa(n-h)<Fa?e:p}:xa(i-p)<Fa&&r-f>Fa?{x:xa(e-p)<Fa?n:f,y:p}:null),o.site,null)),++s)}function Ue(t,n){return n.angle-t.angle}function He(){rr(this),this.x=this.y=this.arc=this.site=this.cy=null}function Ye(t){var n=t.P,e=t.N;if(n&&e){var r=n.site,i=t.site,o=e.site;if(r!==o){var a=i.x,u=i.y,s=r.x-a,l=r.y-u,c=o.x-a,f=o.y-u,h=2*(s*f-l*c);if(!(h>=-Da)){var p=s*s+l*l,d=c*c+f*f,v=(f*p-l*d)/h,g=(s*d-c*p)/h,f=g+u,m=cs.pop()||new He;m.arc=t,m.site=i,m.x=v+a,m.y=f+Math.sqrt(v*v+g*g),m.cy=f,t.circle=m;for(var y=null,$=ss._;$;)if(m.y<$.y||m.y===$.y&&m.x<=$.x){if(!$.L){y=$.P;break}$=$.L}else{if(!$.R){y=$;break}$=$.R}ss.insert(y,m),y||(us=m)}}}}function Ge(t){var n=t.circle;n&&(n.P||(us=n.N),ss.remove(n),cs.push(n),rr(n),t.circle=null)}function Xe(t){for(var n,e=is,r=Bn(t[0][0],t[0][1],t[1][0],t[1][1]),i=e.length;i--;)n=e[i],(!Ze(n,t)||!r(n)||xa(n.a.x-n.b.x)<Fa&&xa(n.a.y-n.b.y)<Fa)&&(n.a=n.b=null,e.splice(i,1))}function Ze(t,n){var e=t.b;if(e)return!0;var r,i,o=t.a,a=n[0][0],u=n[1][0],s=n[0][1],l=n[1][1],c=t.l,f=t.r,h=c.x,p=c.y,d=f.x,v=f.y,g=(h+d)/2,m=(p+v)/2;if(v===p){if(a>g||g>=u)return;if(h>d){if(o){if(o.y>=l)return}else o={x:g,y:s};e={x:g,y:l}}else{if(o){if(o.y<s)return}else o={x:g,y:l};e={x:g,y:s}}}else if(r=(h-d)/(v-p),i=m-r*g,-1>r||r>1)if(h>d){if(o){if(o.y>=l)return}else o={x:(s-i)/r,y:s};e={x:(l-i)/r,y:l}}else{if(o){if(o.y<s)return}else o={x:(l-i)/r,y:l};e={x:(s-i)/r,y:s}}else if(v>p){if(o){if(o.x>=u)return}else o={x:a,y:r*a+i};e={x:u,y:r*u+i}}else{if(o){if(o.x<a)return}else o={x:u,y:r*u+i};e={x:a,y:r*a+i}}return t.a=o,t.b=e,!0}function Je(t,n){this.l=t,this.r=n,this.a=this.b=null}function Ke(t,n,e,r){var i=new Je(t,n);return is.push(i),e&&tr(i,t,n,e),r&&tr(i,n,t,r),os[t.i].edges.push(new nr(i,t,n)),os[n.i].edges.push(new nr(i,n,t)),i}function Qe(t,n,e){var r=new Je(t,null);return r.a=n,r.b=e,is.push(r),r}function tr(t,n,e,r){t.a||t.b?t.l===e?t.b=r:t.a=r:(t.a=r,t.l=n,t.r=e)}function nr(t,n,e){var r=t.a,i=t.b;this.edge=t,this.site=n,this.angle=e?Math.atan2(e.y-n.y,e.x-n.x):t.l===n?Math.atan2(i.x-r.x,r.y-i.y):Math.atan2(r.x-i.x,i.y-r.y)}function er(){this._=null}function rr(t){t.U=t.C=t.L=t.R=t.P=t.N=null}function ir(t,n){var e=n,r=n.R,i=e.U;i?i.L===e?i.L=r:i.R=r:t._=r,r.U=i,e.U=r,e.R=r.L,e.R&&(e.R.U=e),r.L=e}function or(t,n){var e=n,r=n.L,i=e.U;i?i.L===e?i.L=r:i.R=r:t._=r,r.U=i,e.U=r,e.L=r.R,e.L&&(e.L.U=e),r.R=e}function ar(t){for(;t.L;)t=t.L;return t}function ur(t,n){var e,r,i,o=t.sort(sr).pop();for(is=[],os=new Array(t.length),as=new er,ss=new er;;)if(i=us,o&&(!i||o.y<i.y||o.y===i.y&&o.x<i.x))o.x===e&&o.y===r||(os[o.i]=new Be(o),ze(o),e=o.x,r=o.y),o=t.pop();else{if(!i)break;Ie(i.arc)}n&&(Xe(n),We(n));var a={cells:os,edges:is};return as=ss=is=os=null,a}function sr(t,n){return n.y-t.y||n.x-t.x}function lr(t,n,e){return(t.x-e.x)*(n.y-t.y)-(t.x-n.x)*(e.y-t.y)}function cr(t){return t.x}function fr(t){return t.y}function hr(){return{leaf:!0,nodes:[],point:null,x:null,y:null}}function pr(t,n,e,r,i,o){if(!t(n,e,r,i,o)){var a=.5*(e+i),u=.5*(r+o),s=n.nodes;s[0]&&pr(t,s[0],e,r,a,u),s[1]&&pr(t,s[1],a,r,i,u),s[2]&&pr(t,s[2],e,u,a,o),s[3]&&pr(t,s[3],a,u,i,o)}}function dr(t,n,e,r,i,o,a){var u,s=1/0;return function l(t,c,f,h,p){if(!(c>o||f>a||r>h||i>p)){if(d=t.point){var d,v=n-t.x,g=e-t.y,m=v*v+g*g;if(s>m){var y=Math.sqrt(s=m);r=n-y,i=e-y,o=n+y,a=e+y,u=d}}for(var $=t.nodes,x=.5*(c+h),b=.5*(f+p),w=n>=x,_=e>=b,C=_<<1|w,S=C+4;S>C;++C)if(t=$[3&C])switch(3&C){case 0:l(t,c,f,x,b);break;case 1:l(t,x,f,h,b);break;case 2:l(t,c,b,x,p);break;case 3:l(t,x,b,h,p)}}}(t,r,i,o,a),u}function vr(t,n){t=sa.rgb(t),n=sa.rgb(n);var e=t.r,r=t.g,i=t.b,o=n.r-e,a=n.g-r,u=n.b-i;return function(t){return"#"+xt(Math.round(e+o*t))+xt(Math.round(r+a*t))+xt(Math.round(i+u*t))}}function gr(t,n){var e,r={},i={};for(e in t)e in n?r[e]=$r(t[e],n[e]):i[e]=t[e];for(e in n)e in t||(i[e]=n[e]);return function(t){for(e in r)i[e]=r[e](t);return i}}function mr(t,n){return t=+t,n=+n,function(e){return t*(1-e)+n*e}}function yr(t,n){var e,r,i,o=hs.lastIndex=ps.lastIndex=0,a=-1,u=[],s=[];for(t+="",n+="";(e=hs.exec(t))&&(r=ps.exec(n));)(i=r.index)>o&&(i=n.slice(o,i),u[a]?u[a]+=i:u[++a]=i),(e=e[0])===(r=r[0])?u[a]?u[a]+=r:u[++a]=r:(u[++a]=null,s.push({i:a,x:mr(e,r)})),o=ps.lastIndex;return o<n.length&&(i=n.slice(o),u[a]?u[a]+=i:u[++a]=i),u.length<2?s[0]?(n=s[0].x,function(t){return n(t)+""}):function(){return n}:(n=s.length,function(t){for(var e,r=0;n>r;++r)u[(e=s[r]).i]=e.x(t);return u.join("")})}function $r(t,n){for(var e,r=sa.interpolators.length;--r>=0&&!(e=sa.interpolators[r](t,n)););return e}function xr(t,n){var e,r=[],i=[],o=t.length,a=n.length,u=Math.min(t.length,n.length);for(e=0;u>e;++e)r.push($r(t[e],n[e]));for(;o>e;++e)i[e]=t[e];for(;a>e;++e)i[e]=n[e];return function(t){for(e=0;u>e;++e)i[e]=r[e](t);return i}}function br(t){return function(n){return 0>=n?0:n>=1?1:t(n)}}function wr(t){return function(n){return 1-t(1-n)}}function _r(t){return function(n){return.5*(.5>n?t(2*n):2-t(2-2*n))}}function Cr(t){return t*t}function Sr(t){return t*t*t}function Mr(t){if(0>=t)return 0;if(t>=1)return 1;var n=t*t,e=n*t;return 4*(.5>t?e:3*(t-n)+e-.75)}function kr(t){return function(n){return Math.pow(n,t)}}function Ar(t){return 1-Math.cos(t*Va)}function Er(t){return Math.pow(2,10*(t-1))}function Pr(t){return 1-Math.sqrt(1-t*t)}function Or(t,n){var e;return arguments.length<2&&(n=.45),arguments.length?e=n/za*Math.asin(1/t):(t=1,e=n/4),function(r){return 1+t*Math.pow(2,-10*r)*Math.sin((r-e)*za/n)}}function Tr(t){return t||(t=1.70158),function(n){return n*n*((t+1)*n-t)}}function jr(t){return 1/2.75>t?7.5625*t*t:2/2.75>t?7.5625*(t-=1.5/2.75)*t+.75:2.5/2.75>t?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375}function Lr(t,n){t=sa.hcl(t),n=sa.hcl(n);var e=t.h,r=t.c,i=t.l,o=n.h-e,a=n.c-r,u=n.l-i;return isNaN(a)&&(a=0,r=isNaN(r)?n.c:r),isNaN(o)?(o=0,e=isNaN(e)?n.h:e):o>180?o-=360:-180>o&&(o+=360),function(t){return ct(e+o*t,r+a*t,i+u*t)+""}}function Rr(t,n){t=sa.hsl(t),n=sa.hsl(n);var e=t.h,r=t.s,i=t.l,o=n.h-e,a=n.s-r,u=n.l-i;return isNaN(a)&&(a=0,r=isNaN(r)?n.s:r),isNaN(o)?(o=0,e=isNaN(e)?n.h:e):o>180?o-=360:-180>o&&(o+=360),function(t){return st(e+o*t,r+a*t,i+u*t)+""}}function Nr(t,n){t=sa.lab(t),n=sa.lab(n);var e=t.l,r=t.a,i=t.b,o=n.l-e,a=n.a-r,u=n.b-i;return function(t){return ht(e+o*t,r+a*t,i+u*t)+""}}function Fr(t,n){return n-=t,function(e){return Math.round(t+n*e)}}function Dr(t){var n=[t.a,t.b],e=[t.c,t.d],r=zr(n),i=Ir(n,e),o=zr(qr(e,n,-i))||0;n[0]*e[1]<e[0]*n[1]&&(n[0]*=-1,n[1]*=-1,r*=-1,i*=-1),this.rotate=(r?Math.atan2(n[1],n[0]):Math.atan2(-e[0],e[1]))*Wa,this.translate=[t.e,t.f],this.scale=[r,o],this.skew=o?Math.atan2(i,o)*Wa:0}function Ir(t,n){return t[0]*n[0]+t[1]*n[1]}function zr(t){var n=Math.sqrt(Ir(t,t));return n&&(t[0]/=n,t[1]/=n),n}function qr(t,n,e){return t[0]+=e*n[0],t[1]+=e*n[1],t}function Vr(t){return t.length?t.pop()+",":""}function Br(t,n,e,r){if(t[0]!==n[0]||t[1]!==n[1]){var i=e.push("translate(",null,",",null,")");r.push({i:i-4,x:mr(t[0],n[0])},{i:i-2,x:mr(t[1],n[1])})}else(n[0]||n[1])&&e.push("translate("+n+")")}function Wr(t,n,e,r){t!==n?(t-n>180?n+=360:n-t>180&&(t+=360),r.push({i:e.push(Vr(e)+"rotate(",null,")")-2,x:mr(t,n)})):n&&e.push(Vr(e)+"rotate("+n+")")}function Ur(t,n,e,r){t!==n?r.push({i:e.push(Vr(e)+"skewX(",null,")")-2,x:mr(t,n)}):n&&e.push(Vr(e)+"skewX("+n+")")}function Hr(t,n,e,r){if(t[0]!==n[0]||t[1]!==n[1]){var i=e.push(Vr(e)+"scale(",null,",",null,")");r.push({i:i-4,x:mr(t[0],n[0])},{i:i-2,x:mr(t[1],n[1])})}else 1===n[0]&&1===n[1]||e.push(Vr(e)+"scale("+n+")")}function Yr(t,n){var e=[],r=[];return t=sa.transform(t),n=sa.transform(n),Br(t.translate,n.translate,e,r),Wr(t.rotate,n.rotate,e,r),Ur(t.skew,n.skew,e,r),Hr(t.scale,n.scale,e,r),t=n=null,function(t){for(var n,i=-1,o=r.length;++i<o;)e[(n=r[i]).i]=n.x(t);return e.join("")}}function Gr(t,n){return n=(n-=t=+t)||1/n,function(e){return(e-t)/n}}function Xr(t,n){return n=(n-=t=+t)||1/n,function(e){return Math.max(0,Math.min(1,(e-t)/n))}}function Zr(t){for(var n=t.source,e=t.target,r=Kr(n,e),i=[n];n!==r;)n=n.parent,i.push(n);for(var o=i.length;e!==r;)i.splice(o,0,e),e=e.parent;return i}function Jr(t){for(var n=[],e=t.parent;null!=e;)n.push(t),t=e,e=e.parent;return n.push(t),n}function Kr(t,n){if(t===n)return t;for(var e=Jr(t),r=Jr(n),i=e.pop(),o=r.pop(),a=null;i===o;)a=i,i=e.pop(),o=r.pop();return a}function Qr(t){t.fixed|=2}function ti(t){t.fixed&=-7}function ni(t){t.fixed|=4,t.px=t.x,t.py=t.y}function ei(t){t.fixed&=-5}function ri(t,n,e){var r=0,i=0;if(t.charge=0,!t.leaf)for(var o,a=t.nodes,u=a.length,s=-1;++s<u;)o=a[s],null!=o&&(ri(o,n,e),t.charge+=o.charge,r+=o.charge*o.cx,i+=o.charge*o.cy);if(t.point){t.leaf||(t.point.x+=Math.random()-.5,t.point.y+=Math.random()-.5);var l=n*e[t.point.index];t.charge+=t.pointCharge=l,r+=l*t.point.x,i+=l*t.point.y}t.cx=r/t.charge,t.cy=i/t.charge}function ii(t,n){return sa.rebind(t,n,"sort","children","value"),t.nodes=t,t.links=ci,t}function oi(t,n){for(var e=[t];null!=(t=e.pop());)if(n(t),(i=t.children)&&(r=i.length))for(var r,i;--r>=0;)e.push(i[r])}function ai(t,n){for(var e=[t],r=[];null!=(t=e.pop());)if(r.push(t),(o=t.children)&&(i=o.length))for(var i,o,a=-1;++a<i;)e.push(o[a]);for(;null!=(t=r.pop());)n(t)}function ui(t){return t.children}function si(t){return t.value}function li(t,n){return n.value-t.value}function ci(t){return sa.merge(t.map(function(t){return(t.children||[]).map(function(n){return{source:t,target:n}})}))}function fi(t){return t.x}function hi(t){return t.y}function pi(t,n,e){t.y0=n,t.y=e}function di(t){return sa.range(t.length)}function vi(t){for(var n=-1,e=t[0].length,r=[];++n<e;)r[n]=0;return r}function gi(t){for(var n,e=1,r=0,i=t[0][1],o=t.length;o>e;++e)(n=t[e][1])>i&&(r=e,i=n);return r}function mi(t){return t.reduce(yi,0)}function yi(t,n){return t+n[1]}function $i(t,n){return xi(t,Math.ceil(Math.log(n.length)/Math.LN2+1))}function xi(t,n){for(var e=-1,r=+t[0],i=(t[1]-r)/n,o=[];++e<=n;)o[e]=i*e+r;return o}function bi(t){return[sa.min(t),sa.max(t)]}function wi(t,n){return t.value-n.value}function _i(t,n){var e=t._pack_next;t._pack_next=n,n._pack_prev=t,n._pack_next=e,e._pack_prev=n}function Ci(t,n){t._pack_next=n,n._pack_prev=t}function Si(t,n){var e=n.x-t.x,r=n.y-t.y,i=t.r+n.r;return.999*i*i>e*e+r*r}function Mi(t){function n(t){c=Math.min(t.x-t.r,c),f=Math.max(t.x+t.r,f),h=Math.min(t.y-t.r,h),p=Math.max(t.y+t.r,p)}if((e=t.children)&&(l=e.length)){var e,r,i,o,a,u,s,l,c=1/0,f=-(1/0),h=1/0,p=-(1/0);if(e.forEach(ki),r=e[0],r.x=-r.r,r.y=0,n(r),l>1&&(i=e[1],i.x=i.r,i.y=0,n(i),l>2))for(o=e[2],Pi(r,i,o),n(o),_i(r,o),r._pack_prev=o,_i(o,i),i=r._pack_next,a=3;l>a;a++){Pi(r,i,o=e[a]);var d=0,v=1,g=1;for(u=i._pack_next;u!==i;u=u._pack_next,v++)if(Si(u,o)){d=1;break}if(1==d)for(s=r._pack_prev;s!==u._pack_prev&&!Si(s,o);s=s._pack_prev,g++);d?(g>v||v==g&&i.r<r.r?Ci(r,i=u):Ci(r=s,i),a--):(_i(r,o),i=o,n(o))}var m=(c+f)/2,y=(h+p)/2,$=0;for(a=0;l>a;a++)o=e[a],o.x-=m,o.y-=y,$=Math.max($,o.r+Math.sqrt(o.x*o.x+o.y*o.y));t.r=$,e.forEach(Ai)}}function ki(t){t._pack_next=t._pack_prev=t}function Ai(t){delete t._pack_next,delete t._pack_prev}function Ei(t,n,e,r){var i=t.children;if(t.x=n+=r*t.x,t.y=e+=r*t.y,t.r*=r,i)for(var o=-1,a=i.length;++o<a;)Ei(i[o],n,e,r);
-}function Pi(t,n,e){var r=t.r+e.r,i=n.x-t.x,o=n.y-t.y;if(r&&(i||o)){var a=n.r+e.r,u=i*i+o*o;a*=a,r*=r;var s=.5+(r-a)/(2*u),l=Math.sqrt(Math.max(0,2*a*(r+u)-(r-=u)*r-a*a))/(2*u);e.x=t.x+s*i+l*o,e.y=t.y+s*o-l*i}else e.x=t.x+r,e.y=t.y}function Oi(t,n){return t.parent==n.parent?1:2}function Ti(t){var n=t.children;return n.length?n[0]:t.t}function ji(t){var n,e=t.children;return(n=e.length)?e[n-1]:t.t}function Li(t,n,e){var r=e/(n.i-t.i);n.c-=r,n.s+=e,t.c+=r,n.z+=e,n.m+=e}function Ri(t){for(var n,e=0,r=0,i=t.children,o=i.length;--o>=0;)n=i[o],n.z+=e,n.m+=e,e+=n.s+(r+=n.c)}function Ni(t,n,e){return t.a.parent===n.parent?t.a:e}function Fi(t){return 1+sa.max(t,function(t){return t.y})}function Di(t){return t.reduce(function(t,n){return t+n.x},0)/t.length}function Ii(t){var n=t.children;return n&&n.length?Ii(n[0]):t}function zi(t){var n,e=t.children;return e&&(n=e.length)?zi(e[n-1]):t}function qi(t){return{x:t.x,y:t.y,dx:t.dx,dy:t.dy}}function Vi(t,n){var e=t.x+n[3],r=t.y+n[0],i=t.dx-n[1]-n[3],o=t.dy-n[0]-n[2];return 0>i&&(e+=i/2,i=0),0>o&&(r+=o/2,o=0),{x:e,y:r,dx:i,dy:o}}function Bi(t){var n=t[0],e=t[t.length-1];return e>n?[n,e]:[e,n]}function Wi(t){return t.rangeExtent?t.rangeExtent():Bi(t.range())}function Ui(t,n,e,r){var i=e(t[0],t[1]),o=r(n[0],n[1]);return function(t){return o(i(t))}}function Hi(t,n){var e,r=0,i=t.length-1,o=t[r],a=t[i];return o>a&&(e=r,r=i,i=e,e=o,o=a,a=e),t[r]=n.floor(o),t[i]=n.ceil(a),t}function Yi(t){return t?{floor:function(n){return Math.floor(n/t)*t},ceil:function(n){return Math.ceil(n/t)*t}}:Cs}function Gi(t,n,e,r){var i=[],o=[],a=0,u=Math.min(t.length,n.length)-1;for(t[u]<t[0]&&(t=t.slice().reverse(),n=n.slice().reverse());++a<=u;)i.push(e(t[a-1],t[a])),o.push(r(n[a-1],n[a]));return function(n){var e=sa.bisect(t,n,1,u)-1;return o[e](i[e](n))}}function Xi(t,n,e,r){function i(){var i=Math.min(t.length,n.length)>2?Gi:Ui,s=r?Xr:Gr;return a=i(t,n,s,e),u=i(n,t,s,$r),o}function o(t){return a(t)}var a,u;return o.invert=function(t){return u(t)},o.domain=function(n){return arguments.length?(t=n.map(Number),i()):t},o.range=function(t){return arguments.length?(n=t,i()):n},o.rangeRound=function(t){return o.range(t).interpolate(Fr)},o.clamp=function(t){return arguments.length?(r=t,i()):r},o.interpolate=function(t){return arguments.length?(e=t,i()):e},o.ticks=function(n){return Qi(t,n)},o.tickFormat=function(n,e){return to(t,n,e)},o.nice=function(n){return Ji(t,n),i()},o.copy=function(){return Xi(t,n,e,r)},i()}function Zi(t,n){return sa.rebind(t,n,"range","rangeRound","interpolate","clamp")}function Ji(t,n){return Hi(t,Yi(Ki(t,n)[2])),Hi(t,Yi(Ki(t,n)[2])),t}function Ki(t,n){null==n&&(n=10);var e=Bi(t),r=e[1]-e[0],i=Math.pow(10,Math.floor(Math.log(r/n)/Math.LN10)),o=n/r*i;return.15>=o?i*=10:.35>=o?i*=5:.75>=o&&(i*=2),e[0]=Math.ceil(e[0]/i)*i,e[1]=Math.floor(e[1]/i)*i+.5*i,e[2]=i,e}function Qi(t,n){return sa.range.apply(sa,Ki(t,n))}function to(t,n,e){var r=Ki(t,n);if(e){var i=hu.exec(e);if(i.shift(),"s"===i[8]){var o=sa.formatPrefix(Math.max(xa(r[0]),xa(r[1])));return i[7]||(i[7]="."+no(o.scale(r[2]))),i[8]="f",e=sa.format(i.join("")),function(t){return e(o.scale(t))+o.symbol}}i[7]||(i[7]="."+eo(i[8],r)),e=i.join("")}else e=",."+no(r[2])+"f";return sa.format(e)}function no(t){return-Math.floor(Math.log(t)/Math.LN10+.01)}function eo(t,n){var e=no(n[2]);return t in Ss?Math.abs(e-no(Math.max(xa(n[0]),xa(n[1]))))+ +("e"!==t):e-2*("%"===t)}function ro(t,n,e,r){function i(t){return(e?Math.log(0>t?0:t):-Math.log(t>0?0:-t))/Math.log(n)}function o(t){return e?Math.pow(n,t):-Math.pow(n,-t)}function a(n){return t(i(n))}return a.invert=function(n){return o(t.invert(n))},a.domain=function(n){return arguments.length?(e=n[0]>=0,t.domain((r=n.map(Number)).map(i)),a):r},a.base=function(e){return arguments.length?(n=+e,t.domain(r.map(i)),a):n},a.nice=function(){var n=Hi(r.map(i),e?Math:ks);return t.domain(n),r=n.map(o),a},a.ticks=function(){var t=Bi(r),a=[],u=t[0],s=t[1],l=Math.floor(i(u)),c=Math.ceil(i(s)),f=n%1?2:n;if(isFinite(c-l)){if(e){for(;c>l;l++)for(var h=1;f>h;h++)a.push(o(l)*h);a.push(o(l))}else for(a.push(o(l));l++<c;)for(var h=f-1;h>0;h--)a.push(o(l)*h);for(l=0;a[l]<u;l++);for(c=a.length;a[c-1]>s;c--);a=a.slice(l,c)}return a},a.tickFormat=function(t,e){if(!arguments.length)return Ms;arguments.length<2?e=Ms:"function"!=typeof e&&(e=sa.format(e));var r=Math.max(1,n*t/a.ticks().length);return function(t){var a=t/o(Math.round(i(t)));return n-.5>a*n&&(a*=n),r>=a?e(t):""}},a.copy=function(){return ro(t.copy(),n,e,r)},Zi(a,t)}function io(t,n,e){function r(n){return t(i(n))}var i=oo(n),o=oo(1/n);return r.invert=function(n){return o(t.invert(n))},r.domain=function(n){return arguments.length?(t.domain((e=n.map(Number)).map(i)),r):e},r.ticks=function(t){return Qi(e,t)},r.tickFormat=function(t,n){return to(e,t,n)},r.nice=function(t){return r.domain(Ji(e,t))},r.exponent=function(a){return arguments.length?(i=oo(n=a),o=oo(1/n),t.domain(e.map(i)),r):n},r.copy=function(){return io(t.copy(),n,e)},Zi(r,t)}function oo(t){return function(n){return 0>n?-Math.pow(-n,t):Math.pow(n,t)}}function ao(t,n){function e(e){return o[((i.get(e)||("range"===n.t?i.set(e,t.push(e)):NaN))-1)%o.length]}function r(n,e){return sa.range(t.length).map(function(t){return n+e*t})}var i,o,a;return e.domain=function(r){if(!arguments.length)return t;t=[],i=new l;for(var o,a=-1,u=r.length;++a<u;)i.has(o=r[a])||i.set(o,t.push(o));return e[n.t].apply(e,n.a)},e.range=function(t){return arguments.length?(o=t,a=0,n={t:"range",a:arguments},e):o},e.rangePoints=function(i,u){arguments.length<2&&(u=0);var s=i[0],l=i[1],c=t.length<2?(s=(s+l)/2,0):(l-s)/(t.length-1+u);return o=r(s+c*u/2,c),a=0,n={t:"rangePoints",a:arguments},e},e.rangeRoundPoints=function(i,u){arguments.length<2&&(u=0);var s=i[0],l=i[1],c=t.length<2?(s=l=Math.round((s+l)/2),0):(l-s)/(t.length-1+u)|0;return o=r(s+Math.round(c*u/2+(l-s-(t.length-1+u)*c)/2),c),a=0,n={t:"rangeRoundPoints",a:arguments},e},e.rangeBands=function(i,u,s){arguments.length<2&&(u=0),arguments.length<3&&(s=u);var l=i[1]<i[0],c=i[l-0],f=i[1-l],h=(f-c)/(t.length-u+2*s);return o=r(c+h*s,h),l&&o.reverse(),a=h*(1-u),n={t:"rangeBands",a:arguments},e},e.rangeRoundBands=function(i,u,s){arguments.length<2&&(u=0),arguments.length<3&&(s=u);var l=i[1]<i[0],c=i[l-0],f=i[1-l],h=Math.floor((f-c)/(t.length-u+2*s));return o=r(c+Math.round((f-c-(t.length-u)*h)/2),h),l&&o.reverse(),a=Math.round(h*(1-u)),n={t:"rangeRoundBands",a:arguments},e},e.rangeBand=function(){return a},e.rangeExtent=function(){return Bi(n.a[0])},e.copy=function(){return ao(t,n)},e.domain(t)}function uo(t,n){function o(){var e=0,r=n.length;for(u=[];++e<r;)u[e-1]=sa.quantile(t,e/r);return a}function a(t){return isNaN(t=+t)?void 0:n[sa.bisect(u,t)]}var u;return a.domain=function(n){return arguments.length?(t=n.map(r).filter(i).sort(e),o()):t},a.range=function(t){return arguments.length?(n=t,o()):n},a.quantiles=function(){return u},a.invertExtent=function(e){return e=n.indexOf(e),0>e?[NaN,NaN]:[e>0?u[e-1]:t[0],e<u.length?u[e]:t[t.length-1]]},a.copy=function(){return uo(t,n)},o()}function so(t,n,e){function r(n){return e[Math.max(0,Math.min(a,Math.floor(o*(n-t))))]}function i(){return o=e.length/(n-t),a=e.length-1,r}var o,a;return r.domain=function(e){return arguments.length?(t=+e[0],n=+e[e.length-1],i()):[t,n]},r.range=function(t){return arguments.length?(e=t,i()):e},r.invertExtent=function(n){return n=e.indexOf(n),n=0>n?NaN:n/o+t,[n,n+1/o]},r.copy=function(){return so(t,n,e)},i()}function lo(t,n){function e(e){return e>=e?n[sa.bisect(t,e)]:void 0}return e.domain=function(n){return arguments.length?(t=n,e):t},e.range=function(t){return arguments.length?(n=t,e):n},e.invertExtent=function(e){return e=n.indexOf(e),[t[e-1],t[e]]},e.copy=function(){return lo(t,n)},e}function co(t){function n(t){return+t}return n.invert=n,n.domain=n.range=function(e){return arguments.length?(t=e.map(n),n):t},n.ticks=function(n){return Qi(t,n)},n.tickFormat=function(n,e){return to(t,n,e)},n.copy=function(){return co(t)},n}function fo(){return 0}function ho(t){return t.innerRadius}function po(t){return t.outerRadius}function vo(t){return t.startAngle}function go(t){return t.endAngle}function mo(t){return t&&t.padAngle}function yo(t,n,e,r){return(t-e)*n-(n-r)*t>0?0:1}function $o(t,n,e,r,i){var o=t[0]-n[0],a=t[1]-n[1],u=(i?r:-r)/Math.sqrt(o*o+a*a),s=u*a,l=-u*o,c=t[0]+s,f=t[1]+l,h=n[0]+s,p=n[1]+l,d=(c+h)/2,v=(f+p)/2,g=h-c,m=p-f,y=g*g+m*m,$=e-r,x=c*p-h*f,b=(0>m?-1:1)*Math.sqrt(Math.max(0,$*$*y-x*x)),w=(x*m-g*b)/y,_=(-x*g-m*b)/y,C=(x*m+g*b)/y,S=(-x*g+m*b)/y,M=w-d,k=_-v,A=C-d,E=S-v;return M*M+k*k>A*A+E*E&&(w=C,_=S),[[w-s,_-l],[w*e/$,_*e/$]]}function xo(t){function n(n){function a(){l.push("M",o(t(c),u))}for(var s,l=[],c=[],f=-1,h=n.length,p=Mt(e),d=Mt(r);++f<h;)i.call(this,s=n[f],f)?c.push([+p.call(this,s,f),+d.call(this,s,f)]):c.length&&(a(),c=[]);return c.length&&a(),l.length?l.join(""):null}var e=Ee,r=Pe,i=Pn,o=bo,a=o.key,u=.7;return n.x=function(t){return arguments.length?(e=t,n):e},n.y=function(t){return arguments.length?(r=t,n):r},n.defined=function(t){return arguments.length?(i=t,n):i},n.interpolate=function(t){return arguments.length?(a="function"==typeof t?o=t:(o=js.get(t)||bo).key,n):a},n.tension=function(t){return arguments.length?(u=t,n):u},n}function bo(t){return t.length>1?t.join("L"):t+"Z"}function wo(t){return t.join("L")+"Z"}function _o(t){for(var n=0,e=t.length,r=t[0],i=[r[0],",",r[1]];++n<e;)i.push("H",(r[0]+(r=t[n])[0])/2,"V",r[1]);return e>1&&i.push("H",r[0]),i.join("")}function Co(t){for(var n=0,e=t.length,r=t[0],i=[r[0],",",r[1]];++n<e;)i.push("V",(r=t[n])[1],"H",r[0]);return i.join("")}function So(t){for(var n=0,e=t.length,r=t[0],i=[r[0],",",r[1]];++n<e;)i.push("H",(r=t[n])[0],"V",r[1]);return i.join("")}function Mo(t,n){return t.length<4?bo(t):t[1]+Eo(t.slice(1,-1),Po(t,n))}function ko(t,n){return t.length<3?wo(t):t[0]+Eo((t.push(t[0]),t),Po([t[t.length-2]].concat(t,[t[1]]),n))}function Ao(t,n){return t.length<3?bo(t):t[0]+Eo(t,Po(t,n))}function Eo(t,n){if(n.length<1||t.length!=n.length&&t.length!=n.length+2)return bo(t);var e=t.length!=n.length,r="",i=t[0],o=t[1],a=n[0],u=a,s=1;if(e&&(r+="Q"+(o[0]-2*a[0]/3)+","+(o[1]-2*a[1]/3)+","+o[0]+","+o[1],i=t[1],s=2),n.length>1){u=n[1],o=t[s],s++,r+="C"+(i[0]+a[0])+","+(i[1]+a[1])+","+(o[0]-u[0])+","+(o[1]-u[1])+","+o[0]+","+o[1];for(var l=2;l<n.length;l++,s++)o=t[s],u=n[l],r+="S"+(o[0]-u[0])+","+(o[1]-u[1])+","+o[0]+","+o[1]}if(e){var c=t[s];r+="Q"+(o[0]+2*u[0]/3)+","+(o[1]+2*u[1]/3)+","+c[0]+","+c[1]}return r}function Po(t,n){for(var e,r=[],i=(1-n)/2,o=t[0],a=t[1],u=1,s=t.length;++u<s;)e=o,o=a,a=t[u],r.push([i*(a[0]-e[0]),i*(a[1]-e[1])]);return r}function Oo(t){if(t.length<3)return bo(t);var n=1,e=t.length,r=t[0],i=r[0],o=r[1],a=[i,i,i,(r=t[1])[0]],u=[o,o,o,r[1]],s=[i,",",o,"L",Ro(Ns,a),",",Ro(Ns,u)];for(t.push(t[e-1]);++n<=e;)r=t[n],a.shift(),a.push(r[0]),u.shift(),u.push(r[1]),No(s,a,u);return t.pop(),s.push("L",r),s.join("")}function To(t){if(t.length<4)return bo(t);for(var n,e=[],r=-1,i=t.length,o=[0],a=[0];++r<3;)n=t[r],o.push(n[0]),a.push(n[1]);for(e.push(Ro(Ns,o)+","+Ro(Ns,a)),--r;++r<i;)n=t[r],o.shift(),o.push(n[0]),a.shift(),a.push(n[1]),No(e,o,a);return e.join("")}function jo(t){for(var n,e,r=-1,i=t.length,o=i+4,a=[],u=[];++r<4;)e=t[r%i],a.push(e[0]),u.push(e[1]);for(n=[Ro(Ns,a),",",Ro(Ns,u)],--r;++r<o;)e=t[r%i],a.shift(),a.push(e[0]),u.shift(),u.push(e[1]),No(n,a,u);return n.join("")}function Lo(t,n){var e=t.length-1;if(e)for(var r,i,o=t[0][0],a=t[0][1],u=t[e][0]-o,s=t[e][1]-a,l=-1;++l<=e;)r=t[l],i=l/e,r[0]=n*r[0]+(1-n)*(o+i*u),r[1]=n*r[1]+(1-n)*(a+i*s);return Oo(t)}function Ro(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]+t[3]*n[3]}function No(t,n,e){t.push("C",Ro(Ls,n),",",Ro(Ls,e),",",Ro(Rs,n),",",Ro(Rs,e),",",Ro(Ns,n),",",Ro(Ns,e))}function Fo(t,n){return(n[1]-t[1])/(n[0]-t[0])}function Do(t){for(var n=0,e=t.length-1,r=[],i=t[0],o=t[1],a=r[0]=Fo(i,o);++n<e;)r[n]=(a+(a=Fo(i=o,o=t[n+1])))/2;return r[n]=a,r}function Io(t){for(var n,e,r,i,o=[],a=Do(t),u=-1,s=t.length-1;++u<s;)n=Fo(t[u],t[u+1]),xa(n)<Fa?a[u]=a[u+1]=0:(e=a[u]/n,r=a[u+1]/n,i=e*e+r*r,i>9&&(i=3*n/Math.sqrt(i),a[u]=i*e,a[u+1]=i*r));for(u=-1;++u<=s;)i=(t[Math.min(s,u+1)][0]-t[Math.max(0,u-1)][0])/(6*(1+a[u]*a[u])),o.push([i||0,a[u]*i||0]);return o}function zo(t){return t.length<3?bo(t):t[0]+Eo(t,Io(t))}function qo(t){for(var n,e,r,i=-1,o=t.length;++i<o;)n=t[i],e=n[0],r=n[1]-Va,n[0]=e*Math.cos(r),n[1]=e*Math.sin(r);return t}function Vo(t){function n(n){function s(){v.push("M",u(t(m),f),c,l(t(g.reverse()),f),"Z")}for(var h,p,d,v=[],g=[],m=[],y=-1,$=n.length,x=Mt(e),b=Mt(i),w=e===r?function(){return p}:Mt(r),_=i===o?function(){return d}:Mt(o);++y<$;)a.call(this,h=n[y],y)?(g.push([p=+x.call(this,h,y),d=+b.call(this,h,y)]),m.push([+w.call(this,h,y),+_.call(this,h,y)])):g.length&&(s(),g=[],m=[]);return g.length&&s(),v.length?v.join(""):null}var e=Ee,r=Ee,i=0,o=Pe,a=Pn,u=bo,s=u.key,l=u,c="L",f=.7;return n.x=function(t){return arguments.length?(e=r=t,n):r},n.x0=function(t){return arguments.length?(e=t,n):e},n.x1=function(t){return arguments.length?(r=t,n):r},n.y=function(t){return arguments.length?(i=o=t,n):o},n.y0=function(t){return arguments.length?(i=t,n):i},n.y1=function(t){return arguments.length?(o=t,n):o},n.defined=function(t){return arguments.length?(a=t,n):a},n.interpolate=function(t){return arguments.length?(s="function"==typeof t?u=t:(u=js.get(t)||bo).key,l=u.reverse||u,c=u.closed?"M":"L",n):s},n.tension=function(t){return arguments.length?(f=t,n):f},n}function Bo(t){return t.radius}function Wo(t){return[t.x,t.y]}function Uo(t){return function(){var n=t.apply(this,arguments),e=n[0],r=n[1]-Va;return[e*Math.cos(r),e*Math.sin(r)]}}function Ho(){return 64}function Yo(){return"circle"}function Go(t){var n=Math.sqrt(t/Ia);return"M0,"+n+"A"+n+","+n+" 0 1,1 0,"+-n+"A"+n+","+n+" 0 1,1 0,"+n+"Z"}function Xo(t){return function(){var n,e,r;(n=this[t])&&(r=n[e=n.active])&&(r.timer.c=null,r.timer.t=NaN,--n.count?delete n[e]:delete this[t],n.active+=.5,r.event&&r.event.interrupt.call(this,this.__data__,r.index))}}function Zo(t,n,e){return Sa(t,Bs),t.namespace=n,t.id=e,t}function Jo(t,n,e,r){var i=t.id,o=t.namespace;return B(t,"function"==typeof e?function(t,a,u){t[o][i].tween.set(n,r(e.call(t,t.__data__,a,u)))}:(e=r(e),function(t){t[o][i].tween.set(n,e)}))}function Ko(t){return null==t&&(t=""),function(){this.textContent=t}}function Qo(t){return null==t?"__transition__":"__transition_"+t+"__"}function ta(t,n,e,r,i){function o(t){var n=v.delay;return c.t=n+s,t>=n?a(t-n):void(c.c=a)}function a(e){var i=d.active,o=d[i];o&&(o.timer.c=null,o.timer.t=NaN,--d.count,delete d[i],o.event&&o.event.interrupt.call(t,t.__data__,o.index));for(var a in d)if(r>+a){var l=d[a];l.timer.c=null,l.timer.t=NaN,--d.count,delete d[a]}c.c=u,Ot(function(){return c.c&&u(e||1)&&(c.c=null,c.t=NaN),1},0,s),d.active=r,v.event&&v.event.start.call(t,t.__data__,n),p=[],v.tween.forEach(function(e,r){(r=r.call(t,t.__data__,n))&&p.push(r)}),h=v.ease,f=v.duration}function u(i){for(var o=i/f,a=h(o),u=p.length;u>0;)p[--u].call(t,a);return o>=1?(v.event&&v.event.end.call(t,t.__data__,n),--d.count?delete d[r]:delete t[e],1):void 0}var s,c,f,h,p,d=t[e]||(t[e]={active:0,count:0}),v=d[r];v||(s=i.time,c=Ot(o,0,s),v=d[r]={tween:new l,time:s,timer:c,delay:i.delay,duration:i.duration,ease:i.ease,index:n},i=null,++d.count)}function na(t,n,e){t.attr("transform",function(t){var r=n(t);return"translate("+(isFinite(r)?r:e(t))+",0)"})}function ea(t,n,e){t.attr("transform",function(t){var r=n(t);return"translate(0,"+(isFinite(r)?r:e(t))+")"})}function ra(t){return t.toISOString()}function ia(t,n,e){function r(n){return t(n)}function i(t,e){var r=t[1]-t[0],i=r/e,o=sa.bisect(Ks,i);return o==Ks.length?[n.year,Ki(t.map(function(t){return t/31536e6}),e)[2]]:o?n[i/Ks[o-1]<Ks[o]/i?o-1:o]:[nl,Ki(t,e)[2]]}return r.invert=function(n){return oa(t.invert(n))},r.domain=function(n){return arguments.length?(t.domain(n),r):t.domain().map(oa)},r.nice=function(t,n){function e(e){return!isNaN(e)&&!t.range(e,oa(+e+1),n).length}var o=r.domain(),a=Bi(o),u=null==t?i(a,10):"number"==typeof t&&i(a,t);return u&&(t=u[0],n=u[1]),r.domain(Hi(o,n>1?{floor:function(n){for(;e(n=t.floor(n));)n=oa(n-1);return n},ceil:function(n){for(;e(n=t.ceil(n));)n=oa(+n+1);return n}}:t))},r.ticks=function(t,n){var e=Bi(r.domain()),o=null==t?i(e,10):"number"==typeof t?i(e,t):!t.range&&[{range:t},n];return o&&(t=o[0],n=o[1]),t.range(e[0],oa(+e[1]+1),1>n?1:n)},r.tickFormat=function(){return e},r.copy=function(){return ia(t.copy(),n,e)},Zi(r,t)}function oa(t){return new Date(t)}function aa(t){return JSON.parse(t.responseText)}function ua(t){var n=fa.createRange();return n.selectNode(fa.body),n.createContextualFragment(t.responseText)}var sa={version:"3.5.17"},la=[].slice,ca=function(t){return la.call(t)},fa=this.document;if(fa)try{ca(fa.documentElement.childNodes)[0].nodeType}catch(ha){ca=function(t){for(var n=t.length,e=new Array(n);n--;)e[n]=t[n];return e}}if(Date.now||(Date.now=function(){return+new Date}),fa)try{fa.createElement("DIV").style.setProperty("opacity",0,"")}catch(pa){var da=this.Element.prototype,va=da.setAttribute,ga=da.setAttributeNS,ma=this.CSSStyleDeclaration.prototype,ya=ma.setProperty;da.setAttribute=function(t,n){va.call(this,t,n+"")},da.setAttributeNS=function(t,n,e){ga.call(this,t,n,e+"")},ma.setProperty=function(t,n,e){ya.call(this,t,n+"",e)}}sa.ascending=e,sa.descending=function(t,n){return t>n?-1:n>t?1:n>=t?0:NaN},sa.min=function(t,n){var e,r,i=-1,o=t.length;if(1===arguments.length){for(;++i<o;)if(null!=(r=t[i])&&r>=r){e=r;break}for(;++i<o;)null!=(r=t[i])&&e>r&&(e=r)}else{for(;++i<o;)if(null!=(r=n.call(t,t[i],i))&&r>=r){e=r;break}for(;++i<o;)null!=(r=n.call(t,t[i],i))&&e>r&&(e=r)}return e},sa.max=function(t,n){var e,r,i=-1,o=t.length;if(1===arguments.length){for(;++i<o;)if(null!=(r=t[i])&&r>=r){e=r;break}for(;++i<o;)null!=(r=t[i])&&r>e&&(e=r)}else{for(;++i<o;)if(null!=(r=n.call(t,t[i],i))&&r>=r){e=r;break}for(;++i<o;)null!=(r=n.call(t,t[i],i))&&r>e&&(e=r)}return e},sa.extent=function(t,n){var e,r,i,o=-1,a=t.length;if(1===arguments.length){for(;++o<a;)if(null!=(r=t[o])&&r>=r){e=i=r;break}for(;++o<a;)null!=(r=t[o])&&(e>r&&(e=r),r>i&&(i=r))}else{for(;++o<a;)if(null!=(r=n.call(t,t[o],o))&&r>=r){e=i=r;break}for(;++o<a;)null!=(r=n.call(t,t[o],o))&&(e>r&&(e=r),r>i&&(i=r))}return[e,i]},sa.sum=function(t,n){var e,r=0,o=t.length,a=-1;if(1===arguments.length)for(;++a<o;)i(e=+t[a])&&(r+=e);else for(;++a<o;)i(e=+n.call(t,t[a],a))&&(r+=e);return r},sa.mean=function(t,n){var e,o=0,a=t.length,u=-1,s=a;if(1===arguments.length)for(;++u<a;)i(e=r(t[u]))?o+=e:--s;else for(;++u<a;)i(e=r(n.call(t,t[u],u)))?o+=e:--s;return s?o/s:void 0},sa.quantile=function(t,n){var e=(t.length-1)*n+1,r=Math.floor(e),i=+t[r-1],o=e-r;return o?i+o*(t[r]-i):i},sa.median=function(t,n){var o,a=[],u=t.length,s=-1;if(1===arguments.length)for(;++s<u;)i(o=r(t[s]))&&a.push(o);else for(;++s<u;)i(o=r(n.call(t,t[s],s)))&&a.push(o);return a.length?sa.quantile(a.sort(e),.5):void 0},sa.variance=function(t,n){var e,o,a=t.length,u=0,s=0,l=-1,c=0;if(1===arguments.length)for(;++l<a;)i(e=r(t[l]))&&(o=e-u,u+=o/++c,s+=o*(e-u));else for(;++l<a;)i(e=r(n.call(t,t[l],l)))&&(o=e-u,u+=o/++c,s+=o*(e-u));return c>1?s/(c-1):void 0},sa.deviation=function(){var t=sa.variance.apply(this,arguments);return t?Math.sqrt(t):t};var $a=o(e);sa.bisectLeft=$a.left,sa.bisect=sa.bisectRight=$a.right,sa.bisector=function(t){return o(1===t.length?function(n,r){return e(t(n),r)}:t)},sa.shuffle=function(t,n,e){(o=arguments.length)<3&&(e=t.length,2>o&&(n=0));for(var r,i,o=e-n;o;)i=Math.random()*o--|0,r=t[o+n],t[o+n]=t[i+n],t[i+n]=r;return t},sa.permute=function(t,n){for(var e=n.length,r=new Array(e);e--;)r[e]=t[n[e]];return r},sa.pairs=function(t){for(var n,e=0,r=t.length-1,i=t[0],o=new Array(0>r?0:r);r>e;)o[e]=[n=i,i=t[++e]];return o},sa.transpose=function(t){if(!(i=t.length))return[];for(var n=-1,e=sa.min(t,a),r=new Array(e);++n<e;)for(var i,o=-1,u=r[n]=new Array(i);++o<i;)u[o]=t[o][n];return r},sa.zip=function(){return sa.transpose(arguments)},sa.keys=function(t){var n=[];for(var e in t)n.push(e);return n},sa.values=function(t){var n=[];for(var e in t)n.push(t[e]);return n},sa.entries=function(t){var n=[];for(var e in t)n.push({key:e,value:t[e]});return n},sa.merge=function(t){for(var n,e,r,i=t.length,o=-1,a=0;++o<i;)a+=t[o].length;for(e=new Array(a);--i>=0;)for(r=t[i],n=r.length;--n>=0;)e[--a]=r[n];return e};var xa=Math.abs;sa.range=function(t,n,e){if(arguments.length<3&&(e=1,arguments.length<2&&(n=t,t=0)),(n-t)/e===1/0)throw new Error("infinite range");var r,i=[],o=u(xa(e)),a=-1;if(t*=o,n*=o,e*=o,0>e)for(;(r=t+e*++a)>n;)i.push(r/o);else for(;(r=t+e*++a)<n;)i.push(r/o);return i},sa.map=function(t,n){var e=new l;if(t instanceof l)t.forEach(function(t,n){e.set(t,n)});else if(Array.isArray(t)){var r,i=-1,o=t.length;if(1===arguments.length)for(;++i<o;)e.set(i,t[i]);else for(;++i<o;)e.set(n.call(t,r=t[i],i),r)}else for(var a in t)e.set(a,t[a]);return e};var ba="__proto__",wa="\x00";s(l,{has:h,get:function(t){return this._[c(t)]},set:function(t,n){return this._[c(t)]=n},remove:p,keys:d,values:function(){var t=[];for(var n in this._)t.push(this._[n]);return t},entries:function(){var t=[];for(var n in this._)t.push({key:f(n),value:this._[n]});return t},size:v,empty:g,forEach:function(t){for(var n in this._)t.call(this,f(n),this._[n])}}),sa.nest=function(){function t(n,a,u){if(u>=o.length)return r?r.call(i,a):e?a.sort(e):a;for(var s,c,f,h,p=-1,d=a.length,v=o[u++],g=new l;++p<d;)(h=g.get(s=v(c=a[p])))?h.push(c):g.set(s,[c]);return n?(c=n(),f=function(e,r){c.set(e,t(n,r,u))}):(c={},f=function(e,r){c[e]=t(n,r,u)}),g.forEach(f),c}function n(t,e){if(e>=o.length)return t;var r=[],i=a[e++];return t.forEach(function(t,i){r.push({key:t,values:n(i,e)})}),i?r.sort(function(t,n){return i(t.key,n.key)}):r}var e,r,i={},o=[],a=[];return i.map=function(n,e){return t(e,n,0)},i.entries=function(e){return n(t(sa.map,e,0),0)},i.key=function(t){return o.push(t),i},i.sortKeys=function(t){return a[o.length-1]=t,i},i.sortValues=function(t){return e=t,i},i.rollup=function(t){return r=t,i},i},sa.set=function(t){var n=new m;if(t)for(var e=0,r=t.length;r>e;++e)n.add(t[e]);return n},s(m,{has:h,add:function(t){return this._[c(t+="")]=!0,t},remove:p,values:d,size:v,empty:g,forEach:function(t){for(var n in this._)t.call(this,f(n))}}),sa.behavior={},sa.rebind=function(t,n){for(var e,r=1,i=arguments.length;++r<i;)t[e=arguments[r]]=$(t,n,n[e]);return t};var _a=["webkit","ms","moz","Moz","o","O"];sa.dispatch=function(){for(var t=new w,n=-1,e=arguments.length;++n<e;)t[arguments[n]]=_(t);return t},w.prototype.on=function(t,n){var e=t.indexOf("."),r="";if(e>=0&&(r=t.slice(e+1),t=t.slice(0,e)),t)return arguments.length<2?this[t].on(r):this[t].on(r,n);if(2===arguments.length){if(null==n)for(t in this)this.hasOwnProperty(t)&&this[t].on(r,null);return this}},sa.event=null,sa.requote=function(t){return t.replace(Ca,"\\$&")};var Ca=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,Sa={}.__proto__?function(t,n){t.__proto__=n}:function(t,n){for(var e in n)t[e]=n[e]},Ma=function(t,n){return n.querySelector(t)},ka=function(t,n){return n.querySelectorAll(t)},Aa=function(t,n){var e=t.matches||t[x(t,"matchesSelector")];return(Aa=function(t,n){return e.call(t,n)})(t,n)};"function"==typeof Sizzle&&(Ma=function(t,n){return Sizzle(t,n)[0]||null},ka=Sizzle,Aa=Sizzle.matchesSelector),sa.selection=function(){return sa.select(fa.documentElement)};var Ea=sa.selection.prototype=[];Ea.select=function(t){var n,e,r,i,o=[];t=A(t);for(var a=-1,u=this.length;++a<u;){o.push(n=[]),n.parentNode=(r=this[a]).parentNode;for(var s=-1,l=r.length;++s<l;)(i=r[s])?(n.push(e=t.call(i,i.__data__,s,a)),e&&"__data__"in i&&(e.__data__=i.__data__)):n.push(null)}return k(o)},Ea.selectAll=function(t){var n,e,r=[];t=E(t);for(var i=-1,o=this.length;++i<o;)for(var a=this[i],u=-1,s=a.length;++u<s;)(e=a[u])&&(r.push(n=ca(t.call(e,e.__data__,u,i))),n.parentNode=e);return k(r)};var Pa="http://www.w3.org/1999/xhtml",Oa={svg:"http://www.w3.org/2000/svg",xhtml:Pa,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};sa.ns={prefix:Oa,qualify:function(t){var n=t.indexOf(":"),e=t;return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),Oa.hasOwnProperty(e)?{space:Oa[e],local:t}:t}},Ea.attr=function(t,n){if(arguments.length<2){if("string"==typeof t){var e=this.node();return t=sa.ns.qualify(t),t.local?e.getAttributeNS(t.space,t.local):e.getAttribute(t)}for(n in t)this.each(P(n,t[n]));return this}return this.each(P(t,n))},Ea.classed=function(t,n){if(arguments.length<2){if("string"==typeof t){var e=this.node(),r=(t=j(t)).length,i=-1;if(n=e.classList){for(;++i<r;)if(!n.contains(t[i]))return!1}else for(n=e.getAttribute("class");++i<r;)if(!T(t[i]).test(n))return!1;return!0}for(n in t)this.each(L(n,t[n]));return this}return this.each(L(t,n))},Ea.style=function(t,e,r){var i=arguments.length;if(3>i){if("string"!=typeof t){2>i&&(e="");for(r in t)this.each(N(r,t[r],e));return this}if(2>i){var o=this.node();return n(o).getComputedStyle(o,null).getPropertyValue(t)}r=""}return this.each(N(t,e,r))},Ea.property=function(t,n){if(arguments.length<2){if("string"==typeof t)return this.node()[t];for(n in t)this.each(F(n,t[n]));return this}return this.each(F(t,n))},Ea.text=function(t){return arguments.length?this.each("function"==typeof t?function(){var n=t.apply(this,arguments);this.textContent=null==n?"":n}:null==t?function(){this.textContent=""}:function(){this.textContent=t}):this.node().textContent},Ea.html=function(t){return arguments.length?this.each("function"==typeof t?function(){var n=t.apply(this,arguments);this.innerHTML=null==n?"":n}:null==t?function(){this.innerHTML=""}:function(){this.innerHTML=t}):this.node().innerHTML},Ea.append=function(t){return t=D(t),this.select(function(){return this.appendChild(t.apply(this,arguments))})},Ea.insert=function(t,n){return t=D(t),n=A(n),this.select(function(){return this.insertBefore(t.apply(this,arguments),n.apply(this,arguments)||null)})},Ea.remove=function(){return this.each(I)},Ea.data=function(t,n){function e(t,e){var r,i,o,a=t.length,f=e.length,h=Math.min(a,f),p=new Array(f),d=new Array(f),v=new Array(a);if(n){var g,m=new l,y=new Array(a);for(r=-1;++r<a;)(i=t[r])&&(m.has(g=n.call(i,i.__data__,r))?v[r]=i:m.set(g,i),y[r]=g);for(r=-1;++r<f;)(i=m.get(g=n.call(e,o=e[r],r)))?i!==!0&&(p[r]=i,i.__data__=o):d[r]=z(o),m.set(g,!0);for(r=-1;++r<a;)r in y&&m.get(y[r])!==!0&&(v[r]=t[r])}else{for(r=-1;++r<h;)i=t[r],o=e[r],i?(i.__data__=o,p[r]=i):d[r]=z(o);for(;f>r;++r)d[r]=z(e[r]);for(;a>r;++r)v[r]=t[r]}d.update=p,d.parentNode=p.parentNode=v.parentNode=t.parentNode,u.push(d),s.push(p),c.push(v)}var r,i,o=-1,a=this.length;if(!arguments.length){for(t=new Array(a=(r=this[0]).length);++o<a;)(i=r[o])&&(t[o]=i.__data__);return t}var u=W([]),s=k([]),c=k([]);if("function"==typeof t)for(;++o<a;)e(r=this[o],t.call(r,r.parentNode.__data__,o));else for(;++o<a;)e(r=this[o],t);return s.enter=function(){return u},s.exit=function(){return c},s},Ea.datum=function(t){return arguments.length?this.property("__data__",t):this.property("__data__")},Ea.filter=function(t){var n,e,r,i=[];"function"!=typeof t&&(t=q(t));for(var o=0,a=this.length;a>o;o++){i.push(n=[]),n.parentNode=(e=this[o]).parentNode;for(var u=0,s=e.length;s>u;u++)(r=e[u])&&t.call(r,r.__data__,u,o)&&n.push(r)}return k(i)},Ea.order=function(){for(var t=-1,n=this.length;++t<n;)for(var e,r=this[t],i=r.length-1,o=r[i];--i>=0;)(e=r[i])&&(o&&o!==e.nextSibling&&o.parentNode.insertBefore(e,o),o=e);return this},Ea.sort=function(t){t=V.apply(this,arguments);for(var n=-1,e=this.length;++n<e;)this[n].sort(t);return this.order()},Ea.each=function(t){return B(this,function(n,e,r){t.call(n,n.__data__,e,r)})},Ea.call=function(t){var n=ca(arguments);return t.apply(n[0]=this,n),this},Ea.empty=function(){return!this.node()},Ea.node=function(){for(var t=0,n=this.length;n>t;t++)for(var e=this[t],r=0,i=e.length;i>r;r++){var o=e[r];if(o)return o}return null},Ea.size=function(){var t=0;return B(this,function(){++t}),t};var Ta=[];sa.selection.enter=W,sa.selection.enter.prototype=Ta,Ta.append=Ea.append,Ta.empty=Ea.empty,Ta.node=Ea.node,Ta.call=Ea.call,Ta.size=Ea.size,Ta.select=function(t){for(var n,e,r,i,o,a=[],u=-1,s=this.length;++u<s;){r=(i=this[u]).update,a.push(n=[]),n.parentNode=i.parentNode;for(var l=-1,c=i.length;++l<c;)(o=i[l])?(n.push(r[l]=e=t.call(i.parentNode,o.__data__,l,u)),e.__data__=o.__data__):n.push(null)}return k(a)},Ta.insert=function(t,n){return arguments.length<2&&(n=U(this)),Ea.insert.call(this,t,n)},sa.select=function(n){var e;return"string"==typeof n?(e=[Ma(n,fa)],e.parentNode=fa.documentElement):(e=[n],e.parentNode=t(n)),k([e])},sa.selectAll=function(t){var n;return"string"==typeof t?(n=ca(ka(t,fa)),n.parentNode=fa.documentElement):(n=ca(t),n.parentNode=null),k([n])},Ea.on=function(t,n,e){var r=arguments.length;if(3>r){if("string"!=typeof t){2>r&&(n=!1);for(e in t)this.each(H(e,t[e],n));return this}if(2>r)return(r=this.node()["__on"+t])&&r._;e=!1}return this.each(H(t,n,e))};var ja=sa.map({mouseenter:"mouseover",mouseleave:"mouseout"});fa&&ja.forEach(function(t){"on"+t in fa&&ja.remove(t)});var La,Ra=0;sa.mouse=function(t){return Z(t,S())};var Na=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;sa.touch=function(t,n,e){if(arguments.length<3&&(e=n,n=S().changedTouches),n)for(var r,i=0,o=n.length;o>i;++i)if((r=n[i]).identifier===e)return Z(t,r)},sa.behavior.drag=function(){function t(){this.on("mousedown.drag",o).on("touchstart.drag",a)}function e(t,n,e,o,a){return function(){function u(){var t,e,r=n(h,v);r&&(t=r[0]-$[0],e=r[1]-$[1],d|=t|e,$=r,p({type:"drag",x:r[0]+l[0],y:r[1]+l[1],dx:t,dy:e}))}function s(){n(h,v)&&(m.on(o+g,null).on(a+g,null),y(d),p({type:"dragend"}))}var l,c=this,f=sa.event.target.correspondingElement||sa.event.target,h=c.parentNode,p=r.of(c,arguments),d=0,v=t(),g=".drag"+(null==v?"":"-"+v),m=sa.select(e(f)).on(o+g,u).on(a+g,s),y=X(f),$=n(h,v);i?(l=i.apply(c,arguments),l=[l.x-$[0],l.y-$[1]]):l=[0,0],p({type:"dragstart"})}}var r=M(t,"drag","dragstart","dragend"),i=null,o=e(b,sa.mouse,n,"mousemove","mouseup"),a=e(J,sa.touch,y,"touchmove","touchend");return t.origin=function(n){return arguments.length?(i=n,t):i},sa.rebind(t,r,"on")},sa.touches=function(t,n){return arguments.length<2&&(n=S().touches),n?ca(n).map(function(n){var e=Z(t,n);return e.identifier=n.identifier,e}):[]};var Fa=1e-6,Da=Fa*Fa,Ia=Math.PI,za=2*Ia,qa=za-Fa,Va=Ia/2,Ba=Ia/180,Wa=180/Ia,Ua=Math.SQRT2,Ha=2,Ya=4;sa.interpolateZoom=function(t,n){var e,r,i=t[0],o=t[1],a=t[2],u=n[0],s=n[1],l=n[2],c=u-i,f=s-o,h=c*c+f*f;if(Da>h)r=Math.log(l/a)/Ua,e=function(t){return[i+t*c,o+t*f,a*Math.exp(Ua*t*r)]};else{var p=Math.sqrt(h),d=(l*l-a*a+Ya*h)/(2*a*Ha*p),v=(l*l-a*a-Ya*h)/(2*l*Ha*p),g=Math.log(Math.sqrt(d*d+1)-d),m=Math.log(Math.sqrt(v*v+1)-v);r=(m-g)/Ua,e=function(t){var n=t*r,e=rt(g),u=a/(Ha*p)*(e*it(Ua*n+g)-et(g));return[i+u*c,o+u*f,a*e/rt(Ua*n+g)]}}return e.duration=1e3*r,e},sa.behavior.zoom=function(){function t(t){t.on(O,f).on(Xa+".zoom",p).on("dblclick.zoom",d).on(L,h)}function e(t){return[(t[0]-S.x)/S.k,(t[1]-S.y)/S.k]}function r(t){return[t[0]*S.k+S.x,t[1]*S.k+S.y]}function i(t){S.k=Math.max(A[0],Math.min(A[1],t))}function o(t,n){n=r(n),S.x+=t[0]-n[0],S.y+=t[1]-n[1]}function a(n,e,r,a){n.__chart__={x:S.x,y:S.y,k:S.k},i(Math.pow(2,a)),o(g=e,r),n=sa.select(n),E>0&&(n=n.transition().duration(E)),n.call(t.event)}function u(){b&&b.domain(x.range().map(function(t){return(t-S.x)/S.k}).map(x.invert)),_&&_.domain(w.range().map(function(t){return(t-S.y)/S.k}).map(w.invert))}function s(t){P++||t({type:"zoomstart"})}function l(t){u(),t({type:"zoom",scale:S.k,translate:[S.x,S.y]})}function c(t){--P||(t({type:"zoomend"}),g=null)}function f(){function t(){u=1,o(sa.mouse(i),h),l(a)}function r(){f.on(T,null).on(j,null),p(u),c(a)}var i=this,a=R.of(i,arguments),u=0,f=sa.select(n(i)).on(T,t).on(j,r),h=e(sa.mouse(i)),p=X(i);Vs.call(i),s(a)}function h(){function t(){var t=sa.touches(d);return p=S.k,t.forEach(function(t){t.identifier in g&&(g[t.identifier]=e(t));
-}),t}function n(){var n=sa.event.target;sa.select(n).on(x,r).on(b,u),w.push(n);for(var e=sa.event.changedTouches,i=0,o=e.length;o>i;++i)g[e[i].identifier]=null;var s=t(),l=Date.now();if(1===s.length){if(500>l-$){var c=s[0];a(d,c,g[c.identifier],Math.floor(Math.log(S.k)/Math.LN2)+1),C()}$=l}else if(s.length>1){var c=s[0],f=s[1],h=c[0]-f[0],p=c[1]-f[1];m=h*h+p*p}}function r(){var t,n,e,r,a=sa.touches(d);Vs.call(d);for(var u=0,s=a.length;s>u;++u,r=null)if(e=a[u],r=g[e.identifier]){if(n)break;t=e,n=r}if(r){var c=(c=e[0]-t[0])*c+(c=e[1]-t[1])*c,f=m&&Math.sqrt(c/m);t=[(t[0]+e[0])/2,(t[1]+e[1])/2],n=[(n[0]+r[0])/2,(n[1]+r[1])/2],i(f*p)}$=null,o(t,n),l(v)}function u(){if(sa.event.touches.length){for(var n=sa.event.changedTouches,e=0,r=n.length;r>e;++e)delete g[n[e].identifier];for(var i in g)return void t()}sa.selectAll(w).on(y,null),_.on(O,f).on(L,h),M(),c(v)}var p,d=this,v=R.of(d,arguments),g={},m=0,y=".zoom-"+sa.event.changedTouches[0].identifier,x="touchmove"+y,b="touchend"+y,w=[],_=sa.select(d),M=X(d);n(),s(v),_.on(O,null).on(L,n)}function p(){var t=R.of(this,arguments);y?clearTimeout(y):(Vs.call(this),v=e(g=m||sa.mouse(this)),s(t)),y=setTimeout(function(){y=null,c(t)},50),C(),i(Math.pow(2,.002*Ga())*S.k),o(g,v),l(t)}function d(){var t=sa.mouse(this),n=Math.log(S.k)/Math.LN2;a(this,t,e(t),sa.event.shiftKey?Math.ceil(n)-1:Math.floor(n)+1)}var v,g,m,y,$,x,b,w,_,S={x:0,y:0,k:1},k=[960,500],A=Za,E=250,P=0,O="mousedown.zoom",T="mousemove.zoom",j="mouseup.zoom",L="touchstart.zoom",R=M(t,"zoomstart","zoom","zoomend");return Xa||(Xa="onwheel"in fa?(Ga=function(){return-sa.event.deltaY*(sa.event.deltaMode?120:1)},"wheel"):"onmousewheel"in fa?(Ga=function(){return sa.event.wheelDelta},"mousewheel"):(Ga=function(){return-sa.event.detail},"MozMousePixelScroll")),t.event=function(t){t.each(function(){var t=R.of(this,arguments),n=S;zs?sa.select(this).transition().each("start.zoom",function(){S=this.__chart__||{x:0,y:0,k:1},s(t)}).tween("zoom:zoom",function(){var e=k[0],r=k[1],i=g?g[0]:e/2,o=g?g[1]:r/2,a=sa.interpolateZoom([(i-S.x)/S.k,(o-S.y)/S.k,e/S.k],[(i-n.x)/n.k,(o-n.y)/n.k,e/n.k]);return function(n){var r=a(n),u=e/r[2];this.__chart__=S={x:i-r[0]*u,y:o-r[1]*u,k:u},l(t)}}).each("interrupt.zoom",function(){c(t)}).each("end.zoom",function(){c(t)}):(this.__chart__=S,s(t),l(t),c(t))})},t.translate=function(n){return arguments.length?(S={x:+n[0],y:+n[1],k:S.k},u(),t):[S.x,S.y]},t.scale=function(n){return arguments.length?(S={x:S.x,y:S.y,k:null},i(+n),u(),t):S.k},t.scaleExtent=function(n){return arguments.length?(A=null==n?Za:[+n[0],+n[1]],t):A},t.center=function(n){return arguments.length?(m=n&&[+n[0],+n[1]],t):m},t.size=function(n){return arguments.length?(k=n&&[+n[0],+n[1]],t):k},t.duration=function(n){return arguments.length?(E=+n,t):E},t.x=function(n){return arguments.length?(b=n,x=n.copy(),S={x:0,y:0,k:1},t):b},t.y=function(n){return arguments.length?(_=n,w=n.copy(),S={x:0,y:0,k:1},t):_},sa.rebind(t,R,"on")};var Ga,Xa,Za=[0,1/0];sa.color=at,at.prototype.toString=function(){return this.rgb()+""},sa.hsl=ut;var Ja=ut.prototype=new at;Ja.brighter=function(t){return t=Math.pow(.7,arguments.length?t:1),new ut(this.h,this.s,this.l/t)},Ja.darker=function(t){return t=Math.pow(.7,arguments.length?t:1),new ut(this.h,this.s,t*this.l)},Ja.rgb=function(){return st(this.h,this.s,this.l)},sa.hcl=lt;var Ka=lt.prototype=new at;Ka.brighter=function(t){return new lt(this.h,this.c,Math.min(100,this.l+Qa*(arguments.length?t:1)))},Ka.darker=function(t){return new lt(this.h,this.c,Math.max(0,this.l-Qa*(arguments.length?t:1)))},Ka.rgb=function(){return ct(this.h,this.c,this.l).rgb()},sa.lab=ft;var Qa=18,tu=.95047,nu=1,eu=1.08883,ru=ft.prototype=new at;ru.brighter=function(t){return new ft(Math.min(100,this.l+Qa*(arguments.length?t:1)),this.a,this.b)},ru.darker=function(t){return new ft(Math.max(0,this.l-Qa*(arguments.length?t:1)),this.a,this.b)},ru.rgb=function(){return ht(this.l,this.a,this.b)},sa.rgb=mt;var iu=mt.prototype=new at;iu.brighter=function(t){t=Math.pow(.7,arguments.length?t:1);var n=this.r,e=this.g,r=this.b,i=30;return n||e||r?(n&&i>n&&(n=i),e&&i>e&&(e=i),r&&i>r&&(r=i),new mt(Math.min(255,n/t),Math.min(255,e/t),Math.min(255,r/t))):new mt(i,i,i)},iu.darker=function(t){return t=Math.pow(.7,arguments.length?t:1),new mt(t*this.r,t*this.g,t*this.b)},iu.hsl=function(){return wt(this.r,this.g,this.b)},iu.toString=function(){return"#"+xt(this.r)+xt(this.g)+xt(this.b)};var ou=sa.map({aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074});ou.forEach(function(t,n){ou.set(t,yt(n))}),sa.functor=Mt,sa.xhr=kt(y),sa.dsv=function(t,n){function e(t,e,o){arguments.length<3&&(o=e,e=null);var a=At(t,n,null==e?r:i(e),o);return a.row=function(t){return arguments.length?a.response(null==(e=t)?r:i(t)):e},a}function r(t){return e.parse(t.responseText)}function i(t){return function(n){return e.parse(n.responseText,t)}}function o(n){return n.map(a).join(t)}function a(t){return u.test(t)?'"'+t.replace(/\"/g,'""')+'"':t}var u=new RegExp('["'+t+"\n]"),s=t.charCodeAt(0);return e.parse=function(t,n){var r;return e.parseRows(t,function(t,e){if(r)return r(t,e-1);var i=new Function("d","return {"+t.map(function(t,n){return JSON.stringify(t)+": d["+n+"]"}).join(",")+"}");r=n?function(t,e){return n(i(t),e)}:i})},e.parseRows=function(t,n){function e(){if(c>=l)return a;if(i)return i=!1,o;var n=c;if(34===t.charCodeAt(n)){for(var e=n;e++<l;)if(34===t.charCodeAt(e)){if(34!==t.charCodeAt(e+1))break;++e}c=e+2;var r=t.charCodeAt(e+1);return 13===r?(i=!0,10===t.charCodeAt(e+2)&&++c):10===r&&(i=!0),t.slice(n+1,e).replace(/""/g,'"')}for(;l>c;){var r=t.charCodeAt(c++),u=1;if(10===r)i=!0;else if(13===r)i=!0,10===t.charCodeAt(c)&&(++c,++u);else if(r!==s)continue;return t.slice(n,c-u)}return t.slice(n)}for(var r,i,o={},a={},u=[],l=t.length,c=0,f=0;(r=e())!==a;){for(var h=[];r!==o&&r!==a;)h.push(r),r=e();n&&null==(h=n(h,f++))||u.push(h)}return u},e.format=function(n){if(Array.isArray(n[0]))return e.formatRows(n);var r=new m,i=[];return n.forEach(function(t){for(var n in t)r.has(n)||i.push(r.add(n))}),[i.map(a).join(t)].concat(n.map(function(n){return i.map(function(t){return a(n[t])}).join(t)})).join("\n")},e.formatRows=function(t){return t.map(o).join("\n")},e},sa.csv=sa.dsv(",","text/csv"),sa.tsv=sa.dsv(" ","text/tab-separated-values");var au,uu,su,lu,cu=this[x(this,"requestAnimationFrame")]||function(t){setTimeout(t,17)};sa.timer=function(){Ot.apply(this,arguments)},sa.timer.flush=function(){jt(),Lt()},sa.round=function(t,n){return n?Math.round(t*(n=Math.pow(10,n)))/n:Math.round(t)};var fu=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"].map(Nt);sa.formatPrefix=function(t,n){var e=0;return(t=+t)&&(0>t&&(t*=-1),n&&(t=sa.round(t,Rt(t,n))),e=1+Math.floor(1e-12+Math.log(t)/Math.LN10),e=Math.max(-24,Math.min(24,3*Math.floor((e-1)/3)))),fu[8+e/3]};var hu=/(?:([^{])?([<>=^]))?([+\- ])?([$#])?(0)?(\d+)?(,)?(\.-?\d+)?([a-z%])?/i,pu=sa.map({b:function(t){return t.toString(2)},c:function(t){return String.fromCharCode(t)},o:function(t){return t.toString(8)},x:function(t){return t.toString(16)},X:function(t){return t.toString(16).toUpperCase()},g:function(t,n){return t.toPrecision(n)},e:function(t,n){return t.toExponential(n)},f:function(t,n){return t.toFixed(n)},r:function(t,n){return(t=sa.round(t,Rt(t,n))).toFixed(Math.max(0,Math.min(20,Rt(t*(1+1e-15),n))))}}),du=sa.time={},vu=Date;It.prototype={getDate:function(){return this._.getUTCDate()},getDay:function(){return this._.getUTCDay()},getFullYear:function(){return this._.getUTCFullYear()},getHours:function(){return this._.getUTCHours()},getMilliseconds:function(){return this._.getUTCMilliseconds()},getMinutes:function(){return this._.getUTCMinutes()},getMonth:function(){return this._.getUTCMonth()},getSeconds:function(){return this._.getUTCSeconds()},getTime:function(){return this._.getTime()},getTimezoneOffset:function(){return 0},valueOf:function(){return this._.valueOf()},setDate:function(){gu.setUTCDate.apply(this._,arguments)},setDay:function(){gu.setUTCDay.apply(this._,arguments)},setFullYear:function(){gu.setUTCFullYear.apply(this._,arguments)},setHours:function(){gu.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){gu.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){gu.setUTCMinutes.apply(this._,arguments)},setMonth:function(){gu.setUTCMonth.apply(this._,arguments)},setSeconds:function(){gu.setUTCSeconds.apply(this._,arguments)},setTime:function(){gu.setTime.apply(this._,arguments)}};var gu=Date.prototype;du.year=zt(function(t){return t=du.day(t),t.setMonth(0,1),t},function(t,n){t.setFullYear(t.getFullYear()+n)},function(t){return t.getFullYear()}),du.years=du.year.range,du.years.utc=du.year.utc.range,du.day=zt(function(t){var n=new vu(2e3,0);return n.setFullYear(t.getFullYear(),t.getMonth(),t.getDate()),n},function(t,n){t.setDate(t.getDate()+n)},function(t){return t.getDate()-1}),du.days=du.day.range,du.days.utc=du.day.utc.range,du.dayOfYear=function(t){var n=du.year(t);return Math.floor((t-n-6e4*(t.getTimezoneOffset()-n.getTimezoneOffset()))/864e5)},["sunday","monday","tuesday","wednesday","thursday","friday","saturday"].forEach(function(t,n){n=7-n;var e=du[t]=zt(function(t){return(t=du.day(t)).setDate(t.getDate()-(t.getDay()+n)%7),t},function(t,n){t.setDate(t.getDate()+7*Math.floor(n))},function(t){var e=du.year(t).getDay();return Math.floor((du.dayOfYear(t)+(e+n)%7)/7)-(e!==n)});du[t+"s"]=e.range,du[t+"s"].utc=e.utc.range,du[t+"OfYear"]=function(t){var e=du.year(t).getDay();return Math.floor((du.dayOfYear(t)+(e+n)%7)/7)}}),du.week=du.sunday,du.weeks=du.sunday.range,du.weeks.utc=du.sunday.utc.range,du.weekOfYear=du.sundayOfYear;var mu={"-":"",_:" ",0:"0"},yu=/^\s*\d+/,$u=/^%/;sa.locale=function(t){return{numberFormat:Ft(t),timeFormat:Vt(t)}};var xu=sa.locale({decimal:".",thousands:",",grouping:[3],currency:["$",""],dateTime:"%a %b %e %X %Y",date:"%m/%d/%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});sa.format=xu.numberFormat,sa.geo={},cn.prototype={s:0,t:0,add:function(t){fn(t,this.t,bu),fn(bu.s,this.s,this),this.s?this.t+=bu.t:this.s=bu.t},reset:function(){this.s=this.t=0},valueOf:function(){return this.s}};var bu=new cn;sa.geo.stream=function(t,n){t&&wu.hasOwnProperty(t.type)?wu[t.type](t,n):hn(t,n)};var wu={Feature:function(t,n){hn(t.geometry,n)},FeatureCollection:function(t,n){for(var e=t.features,r=-1,i=e.length;++r<i;)hn(e[r].geometry,n)}},_u={Sphere:function(t,n){n.sphere()},Point:function(t,n){t=t.coordinates,n.point(t[0],t[1],t[2])},MultiPoint:function(t,n){for(var e=t.coordinates,r=-1,i=e.length;++r<i;)t=e[r],n.point(t[0],t[1],t[2])},LineString:function(t,n){pn(t.coordinates,n,0)},MultiLineString:function(t,n){for(var e=t.coordinates,r=-1,i=e.length;++r<i;)pn(e[r],n,0)},Polygon:function(t,n){dn(t.coordinates,n)},MultiPolygon:function(t,n){for(var e=t.coordinates,r=-1,i=e.length;++r<i;)dn(e[r],n)},GeometryCollection:function(t,n){for(var e=t.geometries,r=-1,i=e.length;++r<i;)hn(e[r],n)}};sa.geo.area=function(t){return Cu=0,sa.geo.stream(t,Mu),Cu};var Cu,Su=new cn,Mu={sphere:function(){Cu+=4*Ia},point:b,lineStart:b,lineEnd:b,polygonStart:function(){Su.reset(),Mu.lineStart=vn},polygonEnd:function(){var t=2*Su;Cu+=0>t?4*Ia+t:t,Mu.lineStart=Mu.lineEnd=Mu.point=b}};sa.geo.bounds=function(){function t(t,n){$.push(x=[c=t,h=t]),f>n&&(f=n),n>p&&(p=n)}function n(n,e){var r=gn([n*Ba,e*Ba]);if(m){var i=yn(m,r),o=[i[1],-i[0],0],a=yn(o,i);bn(a),a=wn(a);var s=n-d,l=s>0?1:-1,v=a[0]*Wa*l,g=xa(s)>180;if(g^(v>l*d&&l*n>v)){var y=a[1]*Wa;y>p&&(p=y)}else if(v=(v+360)%360-180,g^(v>l*d&&l*n>v)){var y=-a[1]*Wa;f>y&&(f=y)}else f>e&&(f=e),e>p&&(p=e);g?d>n?u(c,n)>u(c,h)&&(h=n):u(n,h)>u(c,h)&&(c=n):h>=c?(c>n&&(c=n),n>h&&(h=n)):n>d?u(c,n)>u(c,h)&&(h=n):u(n,h)>u(c,h)&&(c=n)}else t(n,e);m=r,d=n}function e(){b.point=n}function r(){x[0]=c,x[1]=h,b.point=t,m=null}function i(t,e){if(m){var r=t-d;y+=xa(r)>180?r+(r>0?360:-360):r}else v=t,g=e;Mu.point(t,e),n(t,e)}function o(){Mu.lineStart()}function a(){i(v,g),Mu.lineEnd(),xa(y)>Fa&&(c=-(h=180)),x[0]=c,x[1]=h,m=null}function u(t,n){return(n-=t)<0?n+360:n}function s(t,n){return t[0]-n[0]}function l(t,n){return n[0]<=n[1]?n[0]<=t&&t<=n[1]:t<n[0]||n[1]<t}var c,f,h,p,d,v,g,m,y,$,x,b={point:t,lineStart:e,lineEnd:r,polygonStart:function(){b.point=i,b.lineStart=o,b.lineEnd=a,y=0,Mu.polygonStart()},polygonEnd:function(){Mu.polygonEnd(),b.point=t,b.lineStart=e,b.lineEnd=r,0>Su?(c=-(h=180),f=-(p=90)):y>Fa?p=90:-Fa>y&&(f=-90),x[0]=c,x[1]=h}};return function(t){p=h=-(c=f=1/0),$=[],sa.geo.stream(t,b);var n=$.length;if(n){$.sort(s);for(var e,r=1,i=$[0],o=[i];n>r;++r)e=$[r],l(e[0],i)||l(e[1],i)?(u(i[0],e[1])>u(i[0],i[1])&&(i[1]=e[1]),u(e[0],i[1])>u(i[0],i[1])&&(i[0]=e[0])):o.push(i=e);for(var a,e,d=-(1/0),n=o.length-1,r=0,i=o[n];n>=r;i=e,++r)e=o[r],(a=u(i[1],e[0]))>d&&(d=a,c=e[0],h=i[1])}return $=x=null,c===1/0||f===1/0?[[NaN,NaN],[NaN,NaN]]:[[c,f],[h,p]]}}(),sa.geo.centroid=function(t){ku=Au=Eu=Pu=Ou=Tu=ju=Lu=Ru=Nu=Fu=0,sa.geo.stream(t,Du);var n=Ru,e=Nu,r=Fu,i=n*n+e*e+r*r;return Da>i&&(n=Tu,e=ju,r=Lu,Fa>Au&&(n=Eu,e=Pu,r=Ou),i=n*n+e*e+r*r,Da>i)?[NaN,NaN]:[Math.atan2(e,n)*Wa,nt(r/Math.sqrt(i))*Wa]};var ku,Au,Eu,Pu,Ou,Tu,ju,Lu,Ru,Nu,Fu,Du={sphere:b,point:Cn,lineStart:Mn,lineEnd:kn,polygonStart:function(){Du.lineStart=An},polygonEnd:function(){Du.lineStart=Mn}},Iu=Ln(Pn,Dn,zn,[-Ia,-Ia/2]),zu=1e9;sa.geo.clipExtent=function(){var t,n,e,r,i,o,a={stream:function(t){return i&&(i.valid=!1),i=o(t),i.valid=!0,i},extent:function(u){return arguments.length?(o=Wn(t=+u[0][0],n=+u[0][1],e=+u[1][0],r=+u[1][1]),i&&(i.valid=!1,i=null),a):[[t,n],[e,r]]}};return a.extent([[0,0],[960,500]])},(sa.geo.conicEqualArea=function(){return Un(Hn)}).raw=Hn,sa.geo.albers=function(){return sa.geo.conicEqualArea().rotate([96,0]).center([-.6,38.7]).parallels([29.5,45.5]).scale(1070)},sa.geo.albersUsa=function(){function t(t){var o=t[0],a=t[1];return n=null,e(o,a),n||(r(o,a),n)||i(o,a),n}var n,e,r,i,o=sa.geo.albers(),a=sa.geo.conicEqualArea().rotate([154,0]).center([-2,58.5]).parallels([55,65]),u=sa.geo.conicEqualArea().rotate([157,0]).center([-3,19.9]).parallels([8,18]),s={point:function(t,e){n=[t,e]}};return t.invert=function(t){var n=o.scale(),e=o.translate(),r=(t[0]-e[0])/n,i=(t[1]-e[1])/n;return(i>=.12&&.234>i&&r>=-.425&&-.214>r?a:i>=.166&&.234>i&&r>=-.214&&-.115>r?u:o).invert(t)},t.stream=function(t){var n=o.stream(t),e=a.stream(t),r=u.stream(t);return{point:function(t,i){n.point(t,i),e.point(t,i),r.point(t,i)},sphere:function(){n.sphere(),e.sphere(),r.sphere()},lineStart:function(){n.lineStart(),e.lineStart(),r.lineStart()},lineEnd:function(){n.lineEnd(),e.lineEnd(),r.lineEnd()},polygonStart:function(){n.polygonStart(),e.polygonStart(),r.polygonStart()},polygonEnd:function(){n.polygonEnd(),e.polygonEnd(),r.polygonEnd()}}},t.precision=function(n){return arguments.length?(o.precision(n),a.precision(n),u.precision(n),t):o.precision()},t.scale=function(n){return arguments.length?(o.scale(n),a.scale(.35*n),u.scale(n),t.translate(o.translate())):o.scale()},t.translate=function(n){if(!arguments.length)return o.translate();var l=o.scale(),c=+n[0],f=+n[1];return e=o.translate(n).clipExtent([[c-.455*l,f-.238*l],[c+.455*l,f+.238*l]]).stream(s).point,r=a.translate([c-.307*l,f+.201*l]).clipExtent([[c-.425*l+Fa,f+.12*l+Fa],[c-.214*l-Fa,f+.234*l-Fa]]).stream(s).point,i=u.translate([c-.205*l,f+.212*l]).clipExtent([[c-.214*l+Fa,f+.166*l+Fa],[c-.115*l-Fa,f+.234*l-Fa]]).stream(s).point,t},t.scale(1070)};var qu,Vu,Bu,Wu,Uu,Hu,Yu={point:b,lineStart:b,lineEnd:b,polygonStart:function(){Vu=0,Yu.lineStart=Yn},polygonEnd:function(){Yu.lineStart=Yu.lineEnd=Yu.point=b,qu+=xa(Vu/2)}},Gu={point:Gn,lineStart:b,lineEnd:b,polygonStart:b,polygonEnd:b},Xu={point:Jn,lineStart:Kn,lineEnd:Qn,polygonStart:function(){Xu.lineStart=te},polygonEnd:function(){Xu.point=Jn,Xu.lineStart=Kn,Xu.lineEnd=Qn}};sa.geo.path=function(){function t(t){return t&&("function"==typeof u&&o.pointRadius(+u.apply(this,arguments)),a&&a.valid||(a=i(o)),sa.geo.stream(t,a)),o.result()}function n(){return a=null,t}var e,r,i,o,a,u=4.5;return t.area=function(t){return qu=0,sa.geo.stream(t,i(Yu)),qu},t.centroid=function(t){return Eu=Pu=Ou=Tu=ju=Lu=Ru=Nu=Fu=0,sa.geo.stream(t,i(Xu)),Fu?[Ru/Fu,Nu/Fu]:Lu?[Tu/Lu,ju/Lu]:Ou?[Eu/Ou,Pu/Ou]:[NaN,NaN]},t.bounds=function(t){return Uu=Hu=-(Bu=Wu=1/0),sa.geo.stream(t,i(Gu)),[[Bu,Wu],[Uu,Hu]]},t.projection=function(t){return arguments.length?(i=(e=t)?t.stream||re(t):y,n()):e},t.context=function(t){return arguments.length?(o=null==(r=t)?new Xn:new ne(t),"function"!=typeof u&&o.pointRadius(u),n()):r},t.pointRadius=function(n){return arguments.length?(u="function"==typeof n?n:(o.pointRadius(+n),+n),t):u},t.projection(sa.geo.albersUsa()).context(null)},sa.geo.transform=function(t){return{stream:function(n){var e=new ie(n);for(var r in t)e[r]=t[r];return e}}},ie.prototype={point:function(t,n){this.stream.point(t,n)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}},sa.geo.projection=ae,sa.geo.projectionMutator=ue,(sa.geo.equirectangular=function(){return ae(le)}).raw=le.invert=le,sa.geo.rotation=function(t){function n(n){return n=t(n[0]*Ba,n[1]*Ba),n[0]*=Wa,n[1]*=Wa,n}return t=fe(t[0]%360*Ba,t[1]*Ba,t.length>2?t[2]*Ba:0),n.invert=function(n){return n=t.invert(n[0]*Ba,n[1]*Ba),n[0]*=Wa,n[1]*=Wa,n},n},ce.invert=le,sa.geo.circle=function(){function t(){var t="function"==typeof r?r.apply(this,arguments):r,n=fe(-t[0]*Ba,-t[1]*Ba,0).invert,i=[];return e(null,null,1,{point:function(t,e){i.push(t=n(t,e)),t[0]*=Wa,t[1]*=Wa}}),{type:"Polygon",coordinates:[i]}}var n,e,r=[0,0],i=6;return t.origin=function(n){return arguments.length?(r=n,t):r},t.angle=function(r){return arguments.length?(e=ve((n=+r)*Ba,i*Ba),t):n},t.precision=function(r){return arguments.length?(e=ve(n*Ba,(i=+r)*Ba),t):i},t.angle(90)},sa.geo.distance=function(t,n){var e,r=(n[0]-t[0])*Ba,i=t[1]*Ba,o=n[1]*Ba,a=Math.sin(r),u=Math.cos(r),s=Math.sin(i),l=Math.cos(i),c=Math.sin(o),f=Math.cos(o);return Math.atan2(Math.sqrt((e=f*a)*e+(e=l*c-s*f*u)*e),s*c+l*f*u)},sa.geo.graticule=function(){function t(){return{type:"MultiLineString",coordinates:n()}}function n(){return sa.range(Math.ceil(o/g)*g,i,g).map(h).concat(sa.range(Math.ceil(l/m)*m,s,m).map(p)).concat(sa.range(Math.ceil(r/d)*d,e,d).filter(function(t){return xa(t%g)>Fa}).map(c)).concat(sa.range(Math.ceil(u/v)*v,a,v).filter(function(t){return xa(t%m)>Fa}).map(f))}var e,r,i,o,a,u,s,l,c,f,h,p,d=10,v=d,g=90,m=360,y=2.5;return t.lines=function(){return n().map(function(t){return{type:"LineString",coordinates:t}})},t.outline=function(){return{type:"Polygon",coordinates:[h(o).concat(p(s).slice(1),h(i).reverse().slice(1),p(l).reverse().slice(1))]}},t.extent=function(n){return arguments.length?t.majorExtent(n).minorExtent(n):t.minorExtent()},t.majorExtent=function(n){return arguments.length?(o=+n[0][0],i=+n[1][0],l=+n[0][1],s=+n[1][1],o>i&&(n=o,o=i,i=n),l>s&&(n=l,l=s,s=n),t.precision(y)):[[o,l],[i,s]]},t.minorExtent=function(n){return arguments.length?(r=+n[0][0],e=+n[1][0],u=+n[0][1],a=+n[1][1],r>e&&(n=r,r=e,e=n),u>a&&(n=u,u=a,a=n),t.precision(y)):[[r,u],[e,a]]},t.step=function(n){return arguments.length?t.majorStep(n).minorStep(n):t.minorStep()},t.majorStep=function(n){return arguments.length?(g=+n[0],m=+n[1],t):[g,m]},t.minorStep=function(n){return arguments.length?(d=+n[0],v=+n[1],t):[d,v]},t.precision=function(n){return arguments.length?(y=+n,c=me(u,a,90),f=ye(r,e,y),h=me(l,s,90),p=ye(o,i,y),t):y},t.majorExtent([[-180,-90+Fa],[180,90-Fa]]).minorExtent([[-180,-80-Fa],[180,80+Fa]])},sa.geo.greatArc=function(){function t(){return{type:"LineString",coordinates:[n||r.apply(this,arguments),e||i.apply(this,arguments)]}}var n,e,r=$e,i=xe;return t.distance=function(){return sa.geo.distance(n||r.apply(this,arguments),e||i.apply(this,arguments))},t.source=function(e){return arguments.length?(r=e,n="function"==typeof e?null:e,t):r},t.target=function(n){return arguments.length?(i=n,e="function"==typeof n?null:n,t):i},t.precision=function(){return arguments.length?t:0},t},sa.geo.interpolate=function(t,n){return be(t[0]*Ba,t[1]*Ba,n[0]*Ba,n[1]*Ba)},sa.geo.length=function(t){return Zu=0,sa.geo.stream(t,Ju),Zu};var Zu,Ju={sphere:b,point:b,lineStart:we,lineEnd:b,polygonStart:b,polygonEnd:b},Ku=_e(function(t){return Math.sqrt(2/(1+t))},function(t){return 2*Math.asin(t/2)});(sa.geo.azimuthalEqualArea=function(){return ae(Ku)}).raw=Ku;var Qu=_e(function(t){var n=Math.acos(t);return n&&n/Math.sin(n)},y);(sa.geo.azimuthalEquidistant=function(){return ae(Qu)}).raw=Qu,(sa.geo.conicConformal=function(){return Un(Ce)}).raw=Ce,(sa.geo.conicEquidistant=function(){return Un(Se)}).raw=Se;var ts=_e(function(t){return 1/t},Math.atan);(sa.geo.gnomonic=function(){return ae(ts)}).raw=ts,Me.invert=function(t,n){return[t,2*Math.atan(Math.exp(n))-Va]},(sa.geo.mercator=function(){return ke(Me)}).raw=Me;var ns=_e(function(){return 1},Math.asin);(sa.geo.orthographic=function(){return ae(ns)}).raw=ns;var es=_e(function(t){return 1/(1+t)},function(t){return 2*Math.atan(t)});(sa.geo.stereographic=function(){return ae(es)}).raw=es,Ae.invert=function(t,n){return[-n,2*Math.atan(Math.exp(t))-Va]},(sa.geo.transverseMercator=function(){var t=ke(Ae),n=t.center,e=t.rotate;return t.center=function(t){return t?n([-t[1],t[0]]):(t=n(),[t[1],-t[0]])},t.rotate=function(t){return t?e([t[0],t[1],t.length>2?t[2]+90:90]):(t=e(),[t[0],t[1],t[2]-90])},e([0,0,90])}).raw=Ae,sa.geom={},sa.geom.hull=function(t){function n(t){if(t.length<3)return[];var n,i=Mt(e),o=Mt(r),a=t.length,u=[],s=[];for(n=0;a>n;n++)u.push([+i.call(this,t[n],n),+o.call(this,t[n],n),n]);for(u.sort(Te),n=0;a>n;n++)s.push([u[n][0],-u[n][1]]);var l=Oe(u),c=Oe(s),f=c[0]===l[0],h=c[c.length-1]===l[l.length-1],p=[];for(n=l.length-1;n>=0;--n)p.push(t[u[l[n]][2]]);for(n=+f;n<c.length-h;++n)p.push(t[u[c[n]][2]]);return p}var e=Ee,r=Pe;return arguments.length?n(t):(n.x=function(t){return arguments.length?(e=t,n):e},n.y=function(t){return arguments.length?(r=t,n):r},n)},sa.geom.polygon=function(t){return Sa(t,rs),t};var rs=sa.geom.polygon.prototype=[];rs.area=function(){for(var t,n=-1,e=this.length,r=this[e-1],i=0;++n<e;)t=r,r=this[n],i+=t[1]*r[0]-t[0]*r[1];return.5*i},rs.centroid=function(t){var n,e,r=-1,i=this.length,o=0,a=0,u=this[i-1];for(arguments.length||(t=-1/(6*this.area()));++r<i;)n=u,u=this[r],e=n[0]*u[1]-u[0]*n[1],o+=(n[0]+u[0])*e,a+=(n[1]+u[1])*e;return[o*t,a*t]},rs.clip=function(t){for(var n,e,r,i,o,a,u=Re(t),s=-1,l=this.length-Re(this),c=this[l-1];++s<l;){for(n=t.slice(),t.length=0,i=this[s],o=n[(r=n.length-u)-1],e=-1;++e<r;)a=n[e],je(a,c,i)?(je(o,c,i)||t.push(Le(o,a,c,i)),t.push(a)):je(o,c,i)&&t.push(Le(o,a,c,i)),o=a;u&&t.push(t[0]),c=i}return t};var is,os,as,us,ss,ls=[],cs=[];Be.prototype.prepare=function(){for(var t,n=this.edges,e=n.length;e--;)t=n[e].edge,t.b&&t.a||n.splice(e,1);return n.sort(Ue),n.length},nr.prototype={start:function(){return this.edge.l===this.site?this.edge.a:this.edge.b},end:function(){return this.edge.l===this.site?this.edge.b:this.edge.a}},er.prototype={insert:function(t,n){var e,r,i;if(t){if(n.P=t,n.N=t.N,t.N&&(t.N.P=n),t.N=n,t.R){for(t=t.R;t.L;)t=t.L;t.L=n}else t.R=n;e=t}else this._?(t=ar(this._),n.P=null,n.N=t,t.P=t.L=n,e=t):(n.P=n.N=null,this._=n,e=null);for(n.L=n.R=null,n.U=e,n.C=!0,t=n;e&&e.C;)r=e.U,e===r.L?(i=r.R,i&&i.C?(e.C=i.C=!1,r.C=!0,t=r):(t===e.R&&(ir(this,e),t=e,e=t.U),e.C=!1,r.C=!0,or(this,r))):(i=r.L,i&&i.C?(e.C=i.C=!1,r.C=!0,t=r):(t===e.L&&(or(this,e),t=e,e=t.U),e.C=!1,r.C=!0,ir(this,r))),e=t.U;this._.C=!1},remove:function(t){t.N&&(t.N.P=t.P),t.P&&(t.P.N=t.N),t.N=t.P=null;var n,e,r,i=t.U,o=t.L,a=t.R;if(e=o?a?ar(a):o:a,i?i.L===t?i.L=e:i.R=e:this._=e,o&&a?(r=e.C,e.C=t.C,e.L=o,o.U=e,e!==a?(i=e.U,e.U=t.U,t=e.R,i.L=t,e.R=a,a.U=e):(e.U=i,i=e,t=e.R)):(r=t.C,t=e),t&&(t.U=i),!r){if(t&&t.C)return void(t.C=!1);do{if(t===this._)break;if(t===i.L){if(n=i.R,n.C&&(n.C=!1,i.C=!0,ir(this,i),n=i.R),n.L&&n.L.C||n.R&&n.R.C){n.R&&n.R.C||(n.L.C=!1,n.C=!0,or(this,n),n=i.R),n.C=i.C,i.C=n.R.C=!1,ir(this,i),t=this._;break}}else if(n=i.L,n.C&&(n.C=!1,i.C=!0,or(this,i),n=i.L),n.L&&n.L.C||n.R&&n.R.C){n.L&&n.L.C||(n.R.C=!1,n.C=!0,ir(this,n),n=i.L),n.C=i.C,i.C=n.L.C=!1,or(this,i),t=this._;break}n.C=!0,t=i,i=i.U}while(!t.C);t&&(t.C=!1)}}},sa.geom.voronoi=function(t){function n(t){var n=new Array(t.length),r=u[0][0],i=u[0][1],o=u[1][0],a=u[1][1];return ur(e(t),u).cells.forEach(function(e,u){var s=e.edges,l=e.site,c=n[u]=s.length?s.map(function(t){var n=t.start();return[n.x,n.y]}):l.x>=r&&l.x<=o&&l.y>=i&&l.y<=a?[[r,a],[o,a],[o,i],[r,i]]:[];c.point=t[u]}),n}function e(t){return t.map(function(t,n){return{x:Math.round(o(t,n)/Fa)*Fa,y:Math.round(a(t,n)/Fa)*Fa,i:n}})}var r=Ee,i=Pe,o=r,a=i,u=fs;return t?n(t):(n.links=function(t){return ur(e(t)).edges.filter(function(t){return t.l&&t.r}).map(function(n){return{source:t[n.l.i],target:t[n.r.i]}})},n.triangles=function(t){var n=[];return ur(e(t)).cells.forEach(function(e,r){for(var i,o,a=e.site,u=e.edges.sort(Ue),s=-1,l=u.length,c=u[l-1].edge,f=c.l===a?c.r:c.l;++s<l;)i=c,o=f,c=u[s].edge,f=c.l===a?c.r:c.l,r<o.i&&r<f.i&&lr(a,o,f)<0&&n.push([t[r],t[o.i],t[f.i]])}),n},n.x=function(t){return arguments.length?(o=Mt(r=t),n):r},n.y=function(t){return arguments.length?(a=Mt(i=t),n):i},n.clipExtent=function(t){return arguments.length?(u=null==t?fs:t,n):u===fs?null:u},n.size=function(t){return arguments.length?n.clipExtent(t&&[[0,0],t]):u===fs?null:u&&u[1]},n)};var fs=[[-1e6,-1e6],[1e6,1e6]];sa.geom.delaunay=function(t){return sa.geom.voronoi().triangles(t)},sa.geom.quadtree=function(t,n,e,r,i){function o(t){function o(t,n,e,r,i,o,a,u){if(!isNaN(e)&&!isNaN(r))if(t.leaf){var s=t.x,c=t.y;if(null!=s)if(xa(s-e)+xa(c-r)<.01)l(t,n,e,r,i,o,a,u);else{var f=t.point;t.x=t.y=t.point=null,l(t,f,s,c,i,o,a,u),l(t,n,e,r,i,o,a,u)}else t.x=e,t.y=r,t.point=n}else l(t,n,e,r,i,o,a,u)}function l(t,n,e,r,i,a,u,s){var l=.5*(i+u),c=.5*(a+s),f=e>=l,h=r>=c,p=h<<1|f;t.leaf=!1,t=t.nodes[p]||(t.nodes[p]=hr()),f?i=l:u=l,h?a=c:s=c,o(t,n,e,r,i,a,u,s)}var c,f,h,p,d,v,g,m,y,$=Mt(u),x=Mt(s);if(null!=n)v=n,g=e,m=r,y=i;else if(m=y=-(v=g=1/0),f=[],h=[],d=t.length,a)for(p=0;d>p;++p)c=t[p],c.x<v&&(v=c.x),c.y<g&&(g=c.y),c.x>m&&(m=c.x),c.y>y&&(y=c.y),f.push(c.x),h.push(c.y);else for(p=0;d>p;++p){var b=+$(c=t[p],p),w=+x(c,p);v>b&&(v=b),g>w&&(g=w),b>m&&(m=b),w>y&&(y=w),f.push(b),h.push(w)}var _=m-v,C=y-g;_>C?y=g+_:m=v+C;var S=hr();if(S.add=function(t){o(S,t,+$(t,++p),+x(t,p),v,g,m,y)},S.visit=function(t){pr(t,S,v,g,m,y)},S.find=function(t){return dr(S,t[0],t[1],v,g,m,y)},p=-1,null==n){for(;++p<d;)o(S,t[p],f[p],h[p],v,g,m,y);--p}else t.forEach(S.add);return f=h=t=c=null,S}var a,u=Ee,s=Pe;return(a=arguments.length)?(u=cr,s=fr,3===a&&(i=e,r=n,e=n=0),o(t)):(o.x=function(t){return arguments.length?(u=t,o):u},o.y=function(t){return arguments.length?(s=t,o):s},o.extent=function(t){return arguments.length?(null==t?n=e=r=i=null:(n=+t[0][0],e=+t[0][1],r=+t[1][0],i=+t[1][1]),o):null==n?null:[[n,e],[r,i]]},o.size=function(t){return arguments.length?(null==t?n=e=r=i=null:(n=e=0,r=+t[0],i=+t[1]),o):null==n?null:[r-n,i-e]},o)},sa.interpolateRgb=vr,sa.interpolateObject=gr,sa.interpolateNumber=mr,sa.interpolateString=yr;var hs=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ps=new RegExp(hs.source,"g");sa.interpolate=$r,sa.interpolators=[function(t,n){var e=typeof n;return("string"===e?ou.has(n.toLowerCase())||/^(#|rgb\(|hsl\()/i.test(n)?vr:yr:n instanceof at?vr:Array.isArray(n)?xr:"object"===e&&isNaN(n)?gr:mr)(t,n)}],sa.interpolateArray=xr;var ds=function(){return y},vs=sa.map({linear:ds,poly:kr,quad:function(){return Cr},cubic:function(){return Sr},sin:function(){return Ar},exp:function(){return Er},circle:function(){return Pr},elastic:Or,back:Tr,bounce:function(){return jr}}),gs=sa.map({"in":y,out:wr,"in-out":_r,"out-in":function(t){return _r(wr(t))}});sa.ease=function(t){var n=t.indexOf("-"),e=n>=0?t.slice(0,n):t,r=n>=0?t.slice(n+1):"in";return e=vs.get(e)||ds,r=gs.get(r)||y,br(r(e.apply(null,la.call(arguments,1))))},sa.interpolateHcl=Lr,sa.interpolateHsl=Rr,sa.interpolateLab=Nr,sa.interpolateRound=Fr,sa.transform=function(t){var n=fa.createElementNS(sa.ns.prefix.svg,"g");return(sa.transform=function(t){if(null!=t){n.setAttribute("transform",t);var e=n.transform.baseVal.consolidate()}return new Dr(e?e.matrix:ms)})(t)},Dr.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var ms={a:1,b:0,c:0,d:1,e:0,f:0};sa.interpolateTransform=Yr,sa.layout={},sa.layout.bundle=function(){return function(t){for(var n=[],e=-1,r=t.length;++e<r;)n.push(Zr(t[e]));return n}},sa.layout.chord=function(){function t(){var t,l,f,h,p,d={},v=[],g=sa.range(o),m=[];for(e=[],r=[],t=0,h=-1;++h<o;){for(l=0,p=-1;++p<o;)l+=i[h][p];v.push(l),m.push(sa.range(o)),t+=l}for(a&&g.sort(function(t,n){return a(v[t],v[n])}),u&&m.forEach(function(t,n){t.sort(function(t,e){return u(i[n][t],i[n][e])})}),t=(za-c*o)/t,l=0,h=-1;++h<o;){for(f=l,p=-1;++p<o;){var y=g[h],$=m[y][p],x=i[y][$],b=l,w=l+=x*t;d[y+"-"+$]={
-index:y,subindex:$,startAngle:b,endAngle:w,value:x}}r[y]={index:y,startAngle:f,endAngle:l,value:v[y]},l+=c}for(h=-1;++h<o;)for(p=h-1;++p<o;){var _=d[h+"-"+p],C=d[p+"-"+h];(_.value||C.value)&&e.push(_.value<C.value?{source:C,target:_}:{source:_,target:C})}s&&n()}function n(){e.sort(function(t,n){return s((t.source.value+t.target.value)/2,(n.source.value+n.target.value)/2)})}var e,r,i,o,a,u,s,l={},c=0;return l.matrix=function(t){return arguments.length?(o=(i=t)&&i.length,e=r=null,l):i},l.padding=function(t){return arguments.length?(c=t,e=r=null,l):c},l.sortGroups=function(t){return arguments.length?(a=t,e=r=null,l):a},l.sortSubgroups=function(t){return arguments.length?(u=t,e=null,l):u},l.sortChords=function(t){return arguments.length?(s=t,e&&n(),l):s},l.chords=function(){return e||t(),e},l.groups=function(){return r||t(),r},l},sa.layout.force=function(){function t(t){return function(n,e,r,i){if(n.point!==t){var o=n.cx-t.x,a=n.cy-t.y,u=i-e,s=o*o+a*a;if(s>u*u/m){if(v>s){var l=n.charge/s;t.px-=o*l,t.py-=a*l}return!0}if(n.point&&s&&v>s){var l=n.pointCharge/s;t.px-=o*l,t.py-=a*l}}return!n.charge}}function n(t){t.px=sa.event.x,t.py=sa.event.y,s.resume()}var e,r,i,o,a,u,s={},l=sa.dispatch("start","tick","end"),c=[1,1],f=.9,h=ys,p=$s,d=-30,v=xs,g=.1,m=.64,$=[],x=[];return s.tick=function(){if((i*=.99)<.005)return e=null,l.end({type:"end",alpha:i=0}),!0;var n,r,s,h,p,v,m,y,b,w=$.length,_=x.length;for(r=0;_>r;++r)s=x[r],h=s.source,p=s.target,y=p.x-h.x,b=p.y-h.y,(v=y*y+b*b)&&(v=i*a[r]*((v=Math.sqrt(v))-o[r])/v,y*=v,b*=v,p.x-=y*(m=h.weight+p.weight?h.weight/(h.weight+p.weight):.5),p.y-=b*m,h.x+=y*(m=1-m),h.y+=b*m);if((m=i*g)&&(y=c[0]/2,b=c[1]/2,r=-1,m))for(;++r<w;)s=$[r],s.x+=(y-s.x)*m,s.y+=(b-s.y)*m;if(d)for(ri(n=sa.geom.quadtree($),i,u),r=-1;++r<w;)(s=$[r]).fixed||n.visit(t(s));for(r=-1;++r<w;)s=$[r],s.fixed?(s.x=s.px,s.y=s.py):(s.x-=(s.px-(s.px=s.x))*f,s.y-=(s.py-(s.py=s.y))*f);l.tick({type:"tick",alpha:i})},s.nodes=function(t){return arguments.length?($=t,s):$},s.links=function(t){return arguments.length?(x=t,s):x},s.size=function(t){return arguments.length?(c=t,s):c},s.linkDistance=function(t){return arguments.length?(h="function"==typeof t?t:+t,s):h},s.distance=s.linkDistance,s.linkStrength=function(t){return arguments.length?(p="function"==typeof t?t:+t,s):p},s.friction=function(t){return arguments.length?(f=+t,s):f},s.charge=function(t){return arguments.length?(d="function"==typeof t?t:+t,s):d},s.chargeDistance=function(t){return arguments.length?(v=t*t,s):Math.sqrt(v)},s.gravity=function(t){return arguments.length?(g=+t,s):g},s.theta=function(t){return arguments.length?(m=t*t,s):Math.sqrt(m)},s.alpha=function(t){return arguments.length?(t=+t,i?t>0?i=t:(e.c=null,e.t=NaN,e=null,l.end({type:"end",alpha:i=0})):t>0&&(l.start({type:"start",alpha:i=t}),e=Ot(s.tick)),s):i},s.start=function(){function t(t,r){if(!e){for(e=new Array(i),s=0;i>s;++s)e[s]=[];for(s=0;l>s;++s){var o=x[s];e[o.source.index].push(o.target),e[o.target.index].push(o.source)}}for(var a,u=e[n],s=-1,c=u.length;++s<c;)if(!isNaN(a=u[s][t]))return a;return Math.random()*r}var n,e,r,i=$.length,l=x.length,f=c[0],v=c[1];for(n=0;i>n;++n)(r=$[n]).index=n,r.weight=0;for(n=0;l>n;++n)r=x[n],"number"==typeof r.source&&(r.source=$[r.source]),"number"==typeof r.target&&(r.target=$[r.target]),++r.source.weight,++r.target.weight;for(n=0;i>n;++n)r=$[n],isNaN(r.x)&&(r.x=t("x",f)),isNaN(r.y)&&(r.y=t("y",v)),isNaN(r.px)&&(r.px=r.x),isNaN(r.py)&&(r.py=r.y);if(o=[],"function"==typeof h)for(n=0;l>n;++n)o[n]=+h.call(this,x[n],n);else for(n=0;l>n;++n)o[n]=h;if(a=[],"function"==typeof p)for(n=0;l>n;++n)a[n]=+p.call(this,x[n],n);else for(n=0;l>n;++n)a[n]=p;if(u=[],"function"==typeof d)for(n=0;i>n;++n)u[n]=+d.call(this,$[n],n);else for(n=0;i>n;++n)u[n]=d;return s.resume()},s.resume=function(){return s.alpha(.1)},s.stop=function(){return s.alpha(0)},s.drag=function(){return r||(r=sa.behavior.drag().origin(y).on("dragstart.force",Qr).on("drag.force",n).on("dragend.force",ti)),arguments.length?void this.on("mouseover.force",ni).on("mouseout.force",ei).call(r):r},sa.rebind(s,l,"on")};var ys=20,$s=1,xs=1/0;sa.layout.hierarchy=function(){function t(i){var o,a=[i],u=[];for(i.depth=0;null!=(o=a.pop());)if(u.push(o),(l=e.call(t,o,o.depth))&&(s=l.length)){for(var s,l,c;--s>=0;)a.push(c=l[s]),c.parent=o,c.depth=o.depth+1;r&&(o.value=0),o.children=l}else r&&(o.value=+r.call(t,o,o.depth)||0),delete o.children;return ai(i,function(t){var e,i;n&&(e=t.children)&&e.sort(n),r&&(i=t.parent)&&(i.value+=t.value)}),u}var n=li,e=ui,r=si;return t.sort=function(e){return arguments.length?(n=e,t):n},t.children=function(n){return arguments.length?(e=n,t):e},t.value=function(n){return arguments.length?(r=n,t):r},t.revalue=function(n){return r&&(oi(n,function(t){t.children&&(t.value=0)}),ai(n,function(n){var e;n.children||(n.value=+r.call(t,n,n.depth)||0),(e=n.parent)&&(e.value+=n.value)})),n},t},sa.layout.partition=function(){function t(n,e,r,i){var o=n.children;if(n.x=e,n.y=n.depth*i,n.dx=r,n.dy=i,o&&(a=o.length)){var a,u,s,l=-1;for(r=n.value?r/n.value:0;++l<a;)t(u=o[l],e,s=u.value*r,i),e+=s}}function n(t){var e=t.children,r=0;if(e&&(i=e.length))for(var i,o=-1;++o<i;)r=Math.max(r,n(e[o]));return 1+r}function e(e,o){var a=r.call(this,e,o);return t(a[0],0,i[0],i[1]/n(a[0])),a}var r=sa.layout.hierarchy(),i=[1,1];return e.size=function(t){return arguments.length?(i=t,e):i},ii(e,r)},sa.layout.pie=function(){function t(a){var u,s=a.length,l=a.map(function(e,r){return+n.call(t,e,r)}),c=+("function"==typeof r?r.apply(this,arguments):r),f=("function"==typeof i?i.apply(this,arguments):i)-c,h=Math.min(Math.abs(f)/s,+("function"==typeof o?o.apply(this,arguments):o)),p=h*(0>f?-1:1),d=sa.sum(l),v=d?(f-s*p)/d:0,g=sa.range(s),m=[];return null!=e&&g.sort(e===bs?function(t,n){return l[n]-l[t]}:function(t,n){return e(a[t],a[n])}),g.forEach(function(t){m[t]={data:a[t],value:u=l[t],startAngle:c,endAngle:c+=u*v+p,padAngle:h}}),m}var n=Number,e=bs,r=0,i=za,o=0;return t.value=function(e){return arguments.length?(n=e,t):n},t.sort=function(n){return arguments.length?(e=n,t):e},t.startAngle=function(n){return arguments.length?(r=n,t):r},t.endAngle=function(n){return arguments.length?(i=n,t):i},t.padAngle=function(n){return arguments.length?(o=n,t):o},t};var bs={};sa.layout.stack=function(){function t(u,s){if(!(h=u.length))return u;var l=u.map(function(e,r){return n.call(t,e,r)}),c=l.map(function(n){return n.map(function(n,e){return[o.call(t,n,e),a.call(t,n,e)]})}),f=e.call(t,c,s);l=sa.permute(l,f),c=sa.permute(c,f);var h,p,d,v,g=r.call(t,c,s),m=l[0].length;for(d=0;m>d;++d)for(i.call(t,l[0][d],v=g[d],c[0][d][1]),p=1;h>p;++p)i.call(t,l[p][d],v+=c[p-1][d][1],c[p][d][1]);return u}var n=y,e=di,r=vi,i=pi,o=fi,a=hi;return t.values=function(e){return arguments.length?(n=e,t):n},t.order=function(n){return arguments.length?(e="function"==typeof n?n:ws.get(n)||di,t):e},t.offset=function(n){return arguments.length?(r="function"==typeof n?n:_s.get(n)||vi,t):r},t.x=function(n){return arguments.length?(o=n,t):o},t.y=function(n){return arguments.length?(a=n,t):a},t.out=function(n){return arguments.length?(i=n,t):i},t};var ws=sa.map({"inside-out":function(t){var n,e,r=t.length,i=t.map(gi),o=t.map(mi),a=sa.range(r).sort(function(t,n){return i[t]-i[n]}),u=0,s=0,l=[],c=[];for(n=0;r>n;++n)e=a[n],s>u?(u+=o[e],l.push(e)):(s+=o[e],c.push(e));return c.reverse().concat(l)},reverse:function(t){return sa.range(t.length).reverse()},"default":di}),_s=sa.map({silhouette:function(t){var n,e,r,i=t.length,o=t[0].length,a=[],u=0,s=[];for(e=0;o>e;++e){for(n=0,r=0;i>n;n++)r+=t[n][e][1];r>u&&(u=r),a.push(r)}for(e=0;o>e;++e)s[e]=(u-a[e])/2;return s},wiggle:function(t){var n,e,r,i,o,a,u,s,l,c=t.length,f=t[0],h=f.length,p=[];for(p[0]=s=l=0,e=1;h>e;++e){for(n=0,i=0;c>n;++n)i+=t[n][e][1];for(n=0,o=0,u=f[e][0]-f[e-1][0];c>n;++n){for(r=0,a=(t[n][e][1]-t[n][e-1][1])/(2*u);n>r;++r)a+=(t[r][e][1]-t[r][e-1][1])/u;o+=a*t[n][e][1]}p[e]=s-=i?o/i*u:0,l>s&&(l=s)}for(e=0;h>e;++e)p[e]-=l;return p},expand:function(t){var n,e,r,i=t.length,o=t[0].length,a=1/i,u=[];for(e=0;o>e;++e){for(n=0,r=0;i>n;n++)r+=t[n][e][1];if(r)for(n=0;i>n;n++)t[n][e][1]/=r;else for(n=0;i>n;n++)t[n][e][1]=a}for(e=0;o>e;++e)u[e]=0;return u},zero:vi});sa.layout.histogram=function(){function t(t,o){for(var a,u,s=[],l=t.map(e,this),c=r.call(this,l,o),f=i.call(this,c,l,o),o=-1,h=l.length,p=f.length-1,d=n?1:1/h;++o<p;)a=s[o]=[],a.dx=f[o+1]-(a.x=f[o]),a.y=0;if(p>0)for(o=-1;++o<h;)u=l[o],u>=c[0]&&u<=c[1]&&(a=s[sa.bisect(f,u,1,p)-1],a.y+=d,a.push(t[o]));return s}var n=!0,e=Number,r=bi,i=$i;return t.value=function(n){return arguments.length?(e=n,t):e},t.range=function(n){return arguments.length?(r=Mt(n),t):r},t.bins=function(n){return arguments.length?(i="number"==typeof n?function(t){return xi(t,n)}:Mt(n),t):i},t.frequency=function(e){return arguments.length?(n=!!e,t):n},t},sa.layout.pack=function(){function t(t,o){var a=e.call(this,t,o),u=a[0],s=i[0],l=i[1],c=null==n?Math.sqrt:"function"==typeof n?n:function(){return n};if(u.x=u.y=0,ai(u,function(t){t.r=+c(t.value)}),ai(u,Mi),r){var f=r*(n?1:Math.max(2*u.r/s,2*u.r/l))/2;ai(u,function(t){t.r+=f}),ai(u,Mi),ai(u,function(t){t.r-=f})}return Ei(u,s/2,l/2,n?1:1/Math.max(2*u.r/s,2*u.r/l)),a}var n,e=sa.layout.hierarchy().sort(wi),r=0,i=[1,1];return t.size=function(n){return arguments.length?(i=n,t):i},t.radius=function(e){return arguments.length?(n=null==e||"function"==typeof e?e:+e,t):n},t.padding=function(n){return arguments.length?(r=+n,t):r},ii(t,e)},sa.layout.tree=function(){function t(t,i){var c=a.call(this,t,i),f=c[0],h=n(f);if(ai(h,e),h.parent.m=-h.z,oi(h,r),l)oi(f,o);else{var p=f,d=f,v=f;oi(f,function(t){t.x<p.x&&(p=t),t.x>d.x&&(d=t),t.depth>v.depth&&(v=t)});var g=u(p,d)/2-p.x,m=s[0]/(d.x+u(d,p)/2+g),y=s[1]/(v.depth||1);oi(f,function(t){t.x=(t.x+g)*m,t.y=t.depth*y})}return c}function n(t){for(var n,e={A:null,children:[t]},r=[e];null!=(n=r.pop());)for(var i,o=n.children,a=0,u=o.length;u>a;++a)r.push((o[a]=i={_:o[a],parent:n,children:(i=o[a].children)&&i.slice()||[],A:null,a:null,z:0,m:0,c:0,s:0,t:null,i:a}).a=i);return e.children[0]}function e(t){var n=t.children,e=t.parent.children,r=t.i?e[t.i-1]:null;if(n.length){Ri(t);var o=(n[0].z+n[n.length-1].z)/2;r?(t.z=r.z+u(t._,r._),t.m=t.z-o):t.z=o}else r&&(t.z=r.z+u(t._,r._));t.parent.A=i(t,r,t.parent.A||e[0])}function r(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function i(t,n,e){if(n){for(var r,i=t,o=t,a=n,s=i.parent.children[0],l=i.m,c=o.m,f=a.m,h=s.m;a=ji(a),i=Ti(i),a&&i;)s=Ti(s),o=ji(o),o.a=t,r=a.z+f-i.z-l+u(a._,i._),r>0&&(Li(Ni(a,t,e),t,r),l+=r,c+=r),f+=a.m,l+=i.m,h+=s.m,c+=o.m;a&&!ji(o)&&(o.t=a,o.m+=f-c),i&&!Ti(s)&&(s.t=i,s.m+=l-h,e=t)}return e}function o(t){t.x*=s[0],t.y=t.depth*s[1]}var a=sa.layout.hierarchy().sort(null).value(null),u=Oi,s=[1,1],l=null;return t.separation=function(n){return arguments.length?(u=n,t):u},t.size=function(n){return arguments.length?(l=null==(s=n)?o:null,t):l?null:s},t.nodeSize=function(n){return arguments.length?(l=null==(s=n)?null:o,t):l?s:null},ii(t,a)},sa.layout.cluster=function(){function t(t,o){var a,u=n.call(this,t,o),s=u[0],l=0;ai(s,function(t){var n=t.children;n&&n.length?(t.x=Di(n),t.y=Fi(n)):(t.x=a?l+=e(t,a):0,t.y=0,a=t)});var c=Ii(s),f=zi(s),h=c.x-e(c,f)/2,p=f.x+e(f,c)/2;return ai(s,i?function(t){t.x=(t.x-s.x)*r[0],t.y=(s.y-t.y)*r[1]}:function(t){t.x=(t.x-h)/(p-h)*r[0],t.y=(1-(s.y?t.y/s.y:1))*r[1]}),u}var n=sa.layout.hierarchy().sort(null).value(null),e=Oi,r=[1,1],i=!1;return t.separation=function(n){return arguments.length?(e=n,t):e},t.size=function(n){return arguments.length?(i=null==(r=n),t):i?null:r},t.nodeSize=function(n){return arguments.length?(i=null!=(r=n),t):i?r:null},ii(t,n)},sa.layout.treemap=function(){function t(t,n){for(var e,r,i=-1,o=t.length;++i<o;)r=(e=t[i]).value*(0>n?0:n),e.area=isNaN(r)||0>=r?0:r}function n(e){var o=e.children;if(o&&o.length){var a,u,s,l=f(e),c=[],h=o.slice(),d=1/0,v="slice"===p?l.dx:"dice"===p?l.dy:"slice-dice"===p?1&e.depth?l.dy:l.dx:Math.min(l.dx,l.dy);for(t(h,l.dx*l.dy/e.value),c.area=0;(s=h.length)>0;)c.push(a=h[s-1]),c.area+=a.area,"squarify"!==p||(u=r(c,v))<=d?(h.pop(),d=u):(c.area-=c.pop().area,i(c,v,l,!1),v=Math.min(l.dx,l.dy),c.length=c.area=0,d=1/0);c.length&&(i(c,v,l,!0),c.length=c.area=0),o.forEach(n)}}function e(n){var r=n.children;if(r&&r.length){var o,a=f(n),u=r.slice(),s=[];for(t(u,a.dx*a.dy/n.value),s.area=0;o=u.pop();)s.push(o),s.area+=o.area,null!=o.z&&(i(s,o.z?a.dx:a.dy,a,!u.length),s.length=s.area=0);r.forEach(e)}}function r(t,n){for(var e,r=t.area,i=0,o=1/0,a=-1,u=t.length;++a<u;)(e=t[a].area)&&(o>e&&(o=e),e>i&&(i=e));return r*=r,n*=n,r?Math.max(n*i*d/r,r/(n*o*d)):1/0}function i(t,n,e,r){var i,o=-1,a=t.length,u=e.x,l=e.y,c=n?s(t.area/n):0;if(n==e.dx){for((r||c>e.dy)&&(c=e.dy);++o<a;)i=t[o],i.x=u,i.y=l,i.dy=c,u+=i.dx=Math.min(e.x+e.dx-u,c?s(i.area/c):0);i.z=!0,i.dx+=e.x+e.dx-u,e.y+=c,e.dy-=c}else{for((r||c>e.dx)&&(c=e.dx);++o<a;)i=t[o],i.x=u,i.y=l,i.dx=c,l+=i.dy=Math.min(e.y+e.dy-l,c?s(i.area/c):0);i.z=!1,i.dy+=e.y+e.dy-l,e.x+=c,e.dx-=c}}function o(r){var i=a||u(r),o=i[0];return o.x=o.y=0,o.value?(o.dx=l[0],o.dy=l[1]):o.dx=o.dy=0,a&&u.revalue(o),t([o],o.dx*o.dy/o.value),(a?e:n)(o),h&&(a=i),i}var a,u=sa.layout.hierarchy(),s=Math.round,l=[1,1],c=null,f=qi,h=!1,p="squarify",d=.5*(1+Math.sqrt(5));return o.size=function(t){return arguments.length?(l=t,o):l},o.padding=function(t){function n(n){var e=t.call(o,n,n.depth);return null==e?qi(n):Vi(n,"number"==typeof e?[e,e,e,e]:e)}function e(n){return Vi(n,t)}if(!arguments.length)return c;var r;return f=null==(c=t)?qi:"function"==(r=typeof t)?n:"number"===r?(t=[t,t,t,t],e):e,o},o.round=function(t){return arguments.length?(s=t?Math.round:Number,o):s!=Number},o.sticky=function(t){return arguments.length?(h=t,a=null,o):h},o.ratio=function(t){return arguments.length?(d=t,o):d},o.mode=function(t){return arguments.length?(p=t+"",o):p},ii(o,u)},sa.random={normal:function(t,n){var e=arguments.length;return 2>e&&(n=1),1>e&&(t=0),function(){var e,r,i;do e=2*Math.random()-1,r=2*Math.random()-1,i=e*e+r*r;while(!i||i>1);return t+n*e*Math.sqrt(-2*Math.log(i)/i)}},logNormal:function(){var t=sa.random.normal.apply(sa,arguments);return function(){return Math.exp(t())}},bates:function(t){var n=sa.random.irwinHall(t);return function(){return n()/t}},irwinHall:function(t){return function(){for(var n=0,e=0;t>e;e++)n+=Math.random();return n}}},sa.scale={};var Cs={floor:y,ceil:y};sa.scale.linear=function(){return Xi([0,1],[0,1],$r,!1)};var Ss={s:1,g:1,p:1,r:1,e:1};sa.scale.log=function(){return ro(sa.scale.linear().domain([0,1]),10,!0,[1,10])};var Ms=sa.format(".0e"),ks={floor:function(t){return-Math.ceil(-t)},ceil:function(t){return-Math.floor(-t)}};sa.scale.pow=function(){return io(sa.scale.linear(),1,[0,1])},sa.scale.sqrt=function(){return sa.scale.pow().exponent(.5)},sa.scale.ordinal=function(){return ao([],{t:"range",a:[[]]})},sa.scale.category10=function(){return sa.scale.ordinal().range(As)},sa.scale.category20=function(){return sa.scale.ordinal().range(Es)},sa.scale.category20b=function(){return sa.scale.ordinal().range(Ps)},sa.scale.category20c=function(){return sa.scale.ordinal().range(Os)};var As=[2062260,16744206,2924588,14034728,9725885,9197131,14907330,8355711,12369186,1556175].map($t),Es=[2062260,11454440,16744206,16759672,2924588,10018698,14034728,16750742,9725885,12955861,9197131,12885140,14907330,16234194,8355711,13092807,12369186,14408589,1556175,10410725].map($t),Ps=[3750777,5395619,7040719,10264286,6519097,9216594,11915115,13556636,9202993,12426809,15186514,15190932,8666169,11356490,14049643,15177372,8077683,10834324,13528509,14589654].map($t),Os=[3244733,7057110,10406625,13032431,15095053,16616764,16625259,16634018,3253076,7652470,10607003,13101504,7695281,10394312,12369372,14342891,6513507,9868950,12434877,14277081].map($t);sa.scale.quantile=function(){return uo([],[])},sa.scale.quantize=function(){return so(0,1,[0,1])},sa.scale.threshold=function(){return lo([.5],[0,1])},sa.scale.identity=function(){return co([0,1])},sa.svg={},sa.svg.arc=function(){function t(){var t=Math.max(0,+e.apply(this,arguments)),l=Math.max(0,+r.apply(this,arguments)),c=a.apply(this,arguments)-Va,f=u.apply(this,arguments)-Va,h=Math.abs(f-c),p=c>f?0:1;if(t>l&&(d=l,l=t,t=d),h>=qa)return n(l,p)+(t?n(t,1-p):"")+"Z";var d,v,g,m,y,$,x,b,w,_,C,S,M=0,k=0,A=[];if((m=(+s.apply(this,arguments)||0)/2)&&(g=o===Ts?Math.sqrt(t*t+l*l):+o.apply(this,arguments),p||(k*=-1),l&&(k=nt(g/l*Math.sin(m))),t&&(M=nt(g/t*Math.sin(m)))),l){y=l*Math.cos(c+k),$=l*Math.sin(c+k),x=l*Math.cos(f-k),b=l*Math.sin(f-k);var E=Math.abs(f-c-2*k)<=Ia?0:1;if(k&&yo(y,$,x,b)===p^E){var P=(c+f)/2;y=l*Math.cos(P),$=l*Math.sin(P),x=b=null}}else y=$=0;if(t){w=t*Math.cos(f-M),_=t*Math.sin(f-M),C=t*Math.cos(c+M),S=t*Math.sin(c+M);var O=Math.abs(c-f+2*M)<=Ia?0:1;if(M&&yo(w,_,C,S)===1-p^O){var T=(c+f)/2;w=t*Math.cos(T),_=t*Math.sin(T),C=S=null}}else w=_=0;if(h>Fa&&(d=Math.min(Math.abs(l-t)/2,+i.apply(this,arguments)))>.001){v=l>t^p?0:1;var j=d,L=d;if(Ia>h){var R=null==C?[w,_]:null==x?[y,$]:Le([y,$],[C,S],[x,b],[w,_]),N=y-R[0],F=$-R[1],D=x-R[0],I=b-R[1],z=1/Math.sin(Math.acos((N*D+F*I)/(Math.sqrt(N*N+F*F)*Math.sqrt(D*D+I*I)))/2),q=Math.sqrt(R[0]*R[0]+R[1]*R[1]);L=Math.min(d,(t-q)/(z-1)),j=Math.min(d,(l-q)/(z+1))}if(null!=x){var V=$o(null==C?[w,_]:[C,S],[y,$],l,j,p),B=$o([x,b],[w,_],l,j,p);d===j?A.push("M",V[0],"A",j,",",j," 0 0,",v," ",V[1],"A",l,",",l," 0 ",1-p^yo(V[1][0],V[1][1],B[1][0],B[1][1]),",",p," ",B[1],"A",j,",",j," 0 0,",v," ",B[0]):A.push("M",V[0],"A",j,",",j," 0 1,",v," ",B[0])}else A.push("M",y,",",$);if(null!=C){var W=$o([y,$],[C,S],t,-L,p),U=$o([w,_],null==x?[y,$]:[x,b],t,-L,p);d===L?A.push("L",U[0],"A",L,",",L," 0 0,",v," ",U[1],"A",t,",",t," 0 ",p^yo(U[1][0],U[1][1],W[1][0],W[1][1]),",",1-p," ",W[1],"A",L,",",L," 0 0,",v," ",W[0]):A.push("L",U[0],"A",L,",",L," 0 0,",v," ",W[0])}else A.push("L",w,",",_)}else A.push("M",y,",",$),null!=x&&A.push("A",l,",",l," 0 ",E,",",p," ",x,",",b),A.push("L",w,",",_),null!=C&&A.push("A",t,",",t," 0 ",O,",",1-p," ",C,",",S);return A.push("Z"),A.join("")}function n(t,n){return"M0,"+t+"A"+t+","+t+" 0 1,"+n+" 0,"+-t+"A"+t+","+t+" 0 1,"+n+" 0,"+t}var e=ho,r=po,i=fo,o=Ts,a=vo,u=go,s=mo;return t.innerRadius=function(n){return arguments.length?(e=Mt(n),t):e},t.outerRadius=function(n){return arguments.length?(r=Mt(n),t):r},t.cornerRadius=function(n){return arguments.length?(i=Mt(n),t):i},t.padRadius=function(n){return arguments.length?(o=n==Ts?Ts:Mt(n),t):o},t.startAngle=function(n){return arguments.length?(a=Mt(n),t):a},t.endAngle=function(n){return arguments.length?(u=Mt(n),t):u},t.padAngle=function(n){return arguments.length?(s=Mt(n),t):s},t.centroid=function(){var t=(+e.apply(this,arguments)+ +r.apply(this,arguments))/2,n=(+a.apply(this,arguments)+ +u.apply(this,arguments))/2-Va;return[Math.cos(n)*t,Math.sin(n)*t]},t};var Ts="auto";sa.svg.line=function(){return xo(y)};var js=sa.map({linear:bo,"linear-closed":wo,step:_o,"step-before":Co,"step-after":So,basis:Oo,"basis-open":To,"basis-closed":jo,bundle:Lo,cardinal:Ao,"cardinal-open":Mo,"cardinal-closed":ko,monotone:zo});js.forEach(function(t,n){n.key=t,n.closed=/-closed$/.test(t)});var Ls=[0,2/3,1/3,0],Rs=[0,1/3,2/3,0],Ns=[0,1/6,2/3,1/6];sa.svg.line.radial=function(){var t=xo(qo);return t.radius=t.x,delete t.x,t.angle=t.y,delete t.y,t},Co.reverse=So,So.reverse=Co,sa.svg.area=function(){return Vo(y)},sa.svg.area.radial=function(){var t=Vo(qo);return t.radius=t.x,delete t.x,t.innerRadius=t.x0,delete t.x0,t.outerRadius=t.x1,delete t.x1,t.angle=t.y,delete t.y,t.startAngle=t.y0,delete t.y0,t.endAngle=t.y1,delete t.y1,t},sa.svg.chord=function(){function t(t,u){var s=n(this,o,t,u),l=n(this,a,t,u);return"M"+s.p0+r(s.r,s.p1,s.a1-s.a0)+(e(s,l)?i(s.r,s.p1,s.r,s.p0):i(s.r,s.p1,l.r,l.p0)+r(l.r,l.p1,l.a1-l.a0)+i(l.r,l.p1,s.r,s.p0))+"Z"}function n(t,n,e,r){var i=n.call(t,e,r),o=u.call(t,i,r),a=s.call(t,i,r)-Va,c=l.call(t,i,r)-Va;return{r:o,a0:a,a1:c,p0:[o*Math.cos(a),o*Math.sin(a)],p1:[o*Math.cos(c),o*Math.sin(c)]}}function e(t,n){return t.a0==n.a0&&t.a1==n.a1}function r(t,n,e){return"A"+t+","+t+" 0 "+ +(e>Ia)+",1 "+n}function i(t,n,e,r){return"Q 0,0 "+r}var o=$e,a=xe,u=Bo,s=vo,l=go;return t.radius=function(n){return arguments.length?(u=Mt(n),t):u},t.source=function(n){return arguments.length?(o=Mt(n),t):o},t.target=function(n){return arguments.length?(a=Mt(n),t):a},t.startAngle=function(n){return arguments.length?(s=Mt(n),t):s},t.endAngle=function(n){return arguments.length?(l=Mt(n),t):l},t},sa.svg.diagonal=function(){function t(t,i){var o=n.call(this,t,i),a=e.call(this,t,i),u=(o.y+a.y)/2,s=[o,{x:o.x,y:u},{x:a.x,y:u},a];return s=s.map(r),"M"+s[0]+"C"+s[1]+" "+s[2]+" "+s[3]}var n=$e,e=xe,r=Wo;return t.source=function(e){return arguments.length?(n=Mt(e),t):n},t.target=function(n){return arguments.length?(e=Mt(n),t):e},t.projection=function(n){return arguments.length?(r=n,t):r},t},sa.svg.diagonal.radial=function(){var t=sa.svg.diagonal(),n=Wo,e=t.projection;return t.projection=function(t){return arguments.length?e(Uo(n=t)):n},t},sa.svg.symbol=function(){function t(t,r){return(Fs.get(n.call(this,t,r))||Go)(e.call(this,t,r))}var n=Yo,e=Ho;return t.type=function(e){return arguments.length?(n=Mt(e),t):n},t.size=function(n){return arguments.length?(e=Mt(n),t):e},t};var Fs=sa.map({circle:Go,cross:function(t){var n=Math.sqrt(t/5)/2;return"M"+-3*n+","+-n+"H"+-n+"V"+-3*n+"H"+n+"V"+-n+"H"+3*n+"V"+n+"H"+n+"V"+3*n+"H"+-n+"V"+n+"H"+-3*n+"Z"},diamond:function(t){var n=Math.sqrt(t/(2*Is)),e=n*Is;return"M0,"+-n+"L"+e+",0 0,"+n+" "+-e+",0Z"},square:function(t){var n=Math.sqrt(t)/2;return"M"+-n+","+-n+"L"+n+","+-n+" "+n+","+n+" "+-n+","+n+"Z"},"triangle-down":function(t){var n=Math.sqrt(t/Ds),e=n*Ds/2;return"M0,"+e+"L"+n+","+-e+" "+-n+","+-e+"Z"},"triangle-up":function(t){var n=Math.sqrt(t/Ds),e=n*Ds/2;return"M0,"+-e+"L"+n+","+e+" "+-n+","+e+"Z"}});sa.svg.symbolTypes=Fs.keys();var Ds=Math.sqrt(3),Is=Math.tan(30*Ba);Ea.transition=function(t){for(var n,e,r=zs||++Ws,i=Qo(t),o=[],a=qs||{time:Date.now(),ease:Mr,delay:0,duration:250},u=-1,s=this.length;++u<s;){o.push(n=[]);for(var l=this[u],c=-1,f=l.length;++c<f;)(e=l[c])&&ta(e,c,i,r,a),n.push(e)}return Zo(o,i,r)},Ea.interrupt=function(t){return this.each(null==t?Vs:Xo(Qo(t)))};var zs,qs,Vs=Xo(Qo()),Bs=[],Ws=0;Bs.call=Ea.call,Bs.empty=Ea.empty,Bs.node=Ea.node,Bs.size=Ea.size,sa.transition=function(t,n){return t&&t.transition?zs?t.transition(n):t:sa.selection().transition(t)},sa.transition.prototype=Bs,Bs.select=function(t){var n,e,r,i=this.id,o=this.namespace,a=[];t=A(t);for(var u=-1,s=this.length;++u<s;){a.push(n=[]);for(var l=this[u],c=-1,f=l.length;++c<f;)(r=l[c])&&(e=t.call(r,r.__data__,c,u))?("__data__"in r&&(e.__data__=r.__data__),ta(e,c,o,i,r[o][i]),n.push(e)):n.push(null)}return Zo(a,o,i)},Bs.selectAll=function(t){var n,e,r,i,o,a=this.id,u=this.namespace,s=[];t=E(t);for(var l=-1,c=this.length;++l<c;)for(var f=this[l],h=-1,p=f.length;++h<p;)if(r=f[h]){o=r[u][a],e=t.call(r,r.__data__,h,l),s.push(n=[]);for(var d=-1,v=e.length;++d<v;)(i=e[d])&&ta(i,d,u,a,o),n.push(i)}return Zo(s,u,a)},Bs.filter=function(t){var n,e,r,i=[];"function"!=typeof t&&(t=q(t));for(var o=0,a=this.length;a>o;o++){i.push(n=[]);for(var e=this[o],u=0,s=e.length;s>u;u++)(r=e[u])&&t.call(r,r.__data__,u,o)&&n.push(r)}return Zo(i,this.namespace,this.id)},Bs.tween=function(t,n){var e=this.id,r=this.namespace;return arguments.length<2?this.node()[r][e].tween.get(t):B(this,null==n?function(n){n[r][e].tween.remove(t)}:function(i){i[r][e].tween.set(t,n)})},Bs.attr=function(t,n){function e(){this.removeAttribute(u)}function r(){this.removeAttributeNS(u.space,u.local)}function i(t){return null==t?e:(t+="",function(){var n,e=this.getAttribute(u);return e!==t&&(n=a(e,t),function(t){this.setAttribute(u,n(t))})})}function o(t){return null==t?r:(t+="",function(){var n,e=this.getAttributeNS(u.space,u.local);return e!==t&&(n=a(e,t),function(t){this.setAttributeNS(u.space,u.local,n(t))})})}if(arguments.length<2){for(n in t)this.attr(n,t[n]);return this}var a="transform"==t?Yr:$r,u=sa.ns.qualify(t);return Jo(this,"attr."+t,n,u.local?o:i)},Bs.attrTween=function(t,n){function e(t,e){var r=n.call(this,t,e,this.getAttribute(i));return r&&function(t){this.setAttribute(i,r(t))}}function r(t,e){var r=n.call(this,t,e,this.getAttributeNS(i.space,i.local));return r&&function(t){this.setAttributeNS(i.space,i.local,r(t))}}var i=sa.ns.qualify(t);return this.tween("attr."+t,i.local?r:e)},Bs.style=function(t,e,r){function i(){this.style.removeProperty(t)}function o(e){return null==e?i:(e+="",function(){var i,o=n(this).getComputedStyle(this,null).getPropertyValue(t);return o!==e&&(i=$r(o,e),function(n){this.style.setProperty(t,i(n),r)})})}var a=arguments.length;if(3>a){if("string"!=typeof t){2>a&&(e="");for(r in t)this.style(r,t[r],e);return this}r=""}return Jo(this,"style."+t,e,o)},Bs.styleTween=function(t,e,r){function i(i,o){var a=e.call(this,i,o,n(this).getComputedStyle(this,null).getPropertyValue(t));return a&&function(n){this.style.setProperty(t,a(n),r)}}return arguments.length<3&&(r=""),this.tween("style."+t,i)},Bs.text=function(t){return Jo(this,"text",t,Ko)},Bs.remove=function(){var t=this.namespace;return this.each("end.transition",function(){var n;this[t].count<2&&(n=this.parentNode)&&n.removeChild(this)})},Bs.ease=function(t){var n=this.id,e=this.namespace;return arguments.length<1?this.node()[e][n].ease:("function"!=typeof t&&(t=sa.ease.apply(sa,arguments)),B(this,function(r){r[e][n].ease=t}))},Bs.delay=function(t){var n=this.id,e=this.namespace;return arguments.length<1?this.node()[e][n].delay:B(this,"function"==typeof t?function(r,i,o){r[e][n].delay=+t.call(r,r.__data__,i,o)}:(t=+t,function(r){r[e][n].delay=t}))},Bs.duration=function(t){var n=this.id,e=this.namespace;return arguments.length<1?this.node()[e][n].duration:B(this,"function"==typeof t?function(r,i,o){r[e][n].duration=Math.max(1,t.call(r,r.__data__,i,o))}:(t=Math.max(1,t),function(r){r[e][n].duration=t}))},Bs.each=function(t,n){var e=this.id,r=this.namespace;if(arguments.length<2){var i=qs,o=zs;try{zs=e,B(this,function(n,i,o){qs=n[r][e],t.call(n,n.__data__,i,o)})}finally{qs=i,zs=o}}else B(this,function(i){var o=i[r][e];(o.event||(o.event=sa.dispatch("start","end","interrupt"))).on(t,n)});return this},Bs.transition=function(){for(var t,n,e,r,i=this.id,o=++Ws,a=this.namespace,u=[],s=0,l=this.length;l>s;s++){u.push(t=[]);for(var n=this[s],c=0,f=n.length;f>c;c++)(e=n[c])&&(r=e[a][i],ta(e,c,a,o,{time:r.time,ease:r.ease,delay:r.delay+r.duration,duration:r.duration})),t.push(e)}return Zo(u,a,o)},sa.svg.axis=function(){function t(t){t.each(function(){var t,l=sa.select(this),c=this.__chart__||e,f=this.__chart__=e.copy(),h=null==s?f.ticks?f.ticks.apply(f,u):f.domain():s,p=null==n?f.tickFormat?f.tickFormat.apply(f,u):y:n,d=l.selectAll(".tick").data(h,f),v=d.enter().insert("g",".domain").attr("class","tick").style("opacity",Fa),g=sa.transition(d.exit()).style("opacity",Fa).remove(),m=sa.transition(d.order()).style("opacity",1),$=Math.max(i,0)+a,x=Wi(f),b=l.selectAll(".domain").data([0]),w=(b.enter().append("path").attr("class","domain"),sa.transition(b));v.append("line"),v.append("text");var _,C,S,M,k=v.select("line"),A=m.select("line"),E=d.select("text").text(p),P=v.select("text"),O=m.select("text"),T="top"===r||"left"===r?-1:1;if("bottom"===r||"top"===r?(t=na,_="x",S="y",C="x2",M="y2",E.attr("dy",0>T?"0em":".71em").style("text-anchor","middle"),w.attr("d","M"+x[0]+","+T*o+"V0H"+x[1]+"V"+T*o)):(t=ea,_="y",S="x",C="y2",M="x2",E.attr("dy",".32em").style("text-anchor",0>T?"end":"start"),w.attr("d","M"+T*o+","+x[0]+"H0V"+x[1]+"H"+T*o)),k.attr(M,T*i),P.attr(S,T*$),A.attr(C,0).attr(M,T*i),O.attr(_,0).attr(S,T*$),f.rangeBand){var j=f,L=j.rangeBand()/2;c=f=function(t){return j(t)+L}}else c.rangeBand?c=f:g.call(t,f,c);v.call(t,c,f),m.call(t,f,f)})}var n,e=sa.scale.linear(),r=Us,i=6,o=6,a=3,u=[10],s=null;return t.scale=function(n){return arguments.length?(e=n,t):e},t.orient=function(n){return arguments.length?(r=n in Hs?n+"":Us,t):r},t.ticks=function(){return arguments.length?(u=ca(arguments),t):u},t.tickValues=function(n){return arguments.length?(s=n,t):s},t.tickFormat=function(e){return arguments.length?(n=e,t):n},t.tickSize=function(n){var e=arguments.length;return e?(i=+n,o=+arguments[e-1],t):i},t.innerTickSize=function(n){return arguments.length?(i=+n,t):i},t.outerTickSize=function(n){return arguments.length?(o=+n,t):o},t.tickPadding=function(n){return arguments.length?(a=+n,t):a},t.tickSubdivide=function(){return arguments.length&&t},t};var Us="bottom",Hs={top:1,right:1,bottom:1,left:1};sa.svg.brush=function(){function t(n){n.each(function(){var n=sa.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",o).on("touchstart.brush",o),a=n.selectAll(".background").data([0]);a.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),n.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var u=n.selectAll(".resize").data(v,y);u.exit().remove(),u.enter().append("g").attr("class",function(t){return"resize "+t}).style("cursor",function(t){return Ys[t]}).append("rect").attr("x",function(t){return/[ew]$/.test(t)?-3:null}).attr("y",function(t){return/^[ns]/.test(t)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),u.style("display",t.empty()?"none":null);var s,f=sa.transition(n),h=sa.transition(a);l&&(s=Wi(l),h.attr("x",s[0]).attr("width",s[1]-s[0]),r(f)),c&&(s=Wi(c),h.attr("y",s[0]).attr("height",s[1]-s[0]),i(f)),e(f)})}function e(t){t.selectAll(".resize").attr("transform",function(t){return"translate("+f[+/e$/.test(t)]+","+h[+/^s/.test(t)]+")"})}function r(t){t.select(".extent").attr("x",f[0]),t.selectAll(".extent,.n>rect,.s>rect").attr("width",f[1]-f[0])}function i(t){t.select(".extent").attr("y",h[0]),t.selectAll(".extent,.e>rect,.w>rect").attr("height",h[1]-h[0])}function o(){function o(){32==sa.event.keyCode&&(E||($=null,O[0]-=f[1],O[1]-=h[1],E=2),C())}function v(){32==sa.event.keyCode&&2==E&&(O[0]+=f[1],O[1]+=h[1],E=0,C())}function g(){var t=sa.mouse(b),n=!1;x&&(t[0]+=x[0],t[1]+=x[1]),E||(sa.event.altKey?($||($=[(f[0]+f[1])/2,(h[0]+h[1])/2]),O[0]=f[+(t[0]<$[0])],O[1]=h[+(t[1]<$[1])]):$=null),k&&m(t,l,0)&&(r(S),n=!0),A&&m(t,c,1)&&(i(S),n=!0),n&&(e(S),_({type:"brush",mode:E?"move":"resize"}))}function m(t,n,e){var r,i,o=Wi(n),s=o[0],l=o[1],c=O[e],v=e?h:f,g=v[1]-v[0];return E&&(s-=c,l-=g+c),r=(e?d:p)?Math.max(s,Math.min(l,t[e])):t[e],E?i=(r+=c)+g:($&&(c=Math.max(s,Math.min(l,2*$[e]-r))),r>c?(i=r,r=c):i=c),v[0]!=r||v[1]!=i?(e?u=null:a=null,v[0]=r,v[1]=i,!0):void 0}function y(){g(),S.style("pointer-events","all").selectAll(".resize").style("display",t.empty()?"none":null),sa.select("body").style("cursor",null),T.on("mousemove.brush",null).on("mouseup.brush",null).on("touchmove.brush",null).on("touchend.brush",null).on("keydown.brush",null).on("keyup.brush",null),P(),_({type:"brushend"})}var $,x,b=this,w=sa.select(sa.event.target),_=s.of(b,arguments),S=sa.select(b),M=w.datum(),k=!/^(n|s)$/.test(M)&&l,A=!/^(e|w)$/.test(M)&&c,E=w.classed("extent"),P=X(b),O=sa.mouse(b),T=sa.select(n(b)).on("keydown.brush",o).on("keyup.brush",v);if(sa.event.changedTouches?T.on("touchmove.brush",g).on("touchend.brush",y):T.on("mousemove.brush",g).on("mouseup.brush",y),S.interrupt().selectAll("*").interrupt(),E)O[0]=f[0]-O[0],O[1]=h[0]-O[1];else if(M){var j=+/w$/.test(M),L=+/^n/.test(M);x=[f[1-j]-O[0],h[1-L]-O[1]],O[0]=f[j],O[1]=h[L]}else sa.event.altKey&&($=O.slice());S.style("pointer-events","none").selectAll(".resize").style("display",null),sa.select("body").style("cursor",w.style("cursor")),_({type:"brushstart"}),g()}var a,u,s=M(t,"brushstart","brush","brushend"),l=null,c=null,f=[0,0],h=[0,0],p=!0,d=!0,v=Gs[0];return t.event=function(t){t.each(function(){var t=s.of(this,arguments),n={x:f,y:h,i:a,j:u},e=this.__chart__||n;this.__chart__=n,zs?sa.select(this).transition().each("start.brush",function(){a=e.i,u=e.j,f=e.x,h=e.y,t({type:"brushstart"})}).tween("brush:brush",function(){var e=xr(f,n.x),r=xr(h,n.y);
-return a=u=null,function(i){f=n.x=e(i),h=n.y=r(i),t({type:"brush",mode:"resize"})}}).each("end.brush",function(){a=n.i,u=n.j,t({type:"brush",mode:"resize"}),t({type:"brushend"})}):(t({type:"brushstart"}),t({type:"brush",mode:"resize"}),t({type:"brushend"}))})},t.x=function(n){return arguments.length?(l=n,v=Gs[!l<<1|!c],t):l},t.y=function(n){return arguments.length?(c=n,v=Gs[!l<<1|!c],t):c},t.clamp=function(n){return arguments.length?(l&&c?(p=!!n[0],d=!!n[1]):l?p=!!n:c&&(d=!!n),t):l&&c?[p,d]:l?p:c?d:null},t.extent=function(n){var e,r,i,o,s;return arguments.length?(l&&(e=n[0],r=n[1],c&&(e=e[0],r=r[0]),a=[e,r],l.invert&&(e=l(e),r=l(r)),e>r&&(s=e,e=r,r=s),e==f[0]&&r==f[1]||(f=[e,r])),c&&(i=n[0],o=n[1],l&&(i=i[1],o=o[1]),u=[i,o],c.invert&&(i=c(i),o=c(o)),i>o&&(s=i,i=o,o=s),i==h[0]&&o==h[1]||(h=[i,o])),t):(l&&(a?(e=a[0],r=a[1]):(e=f[0],r=f[1],l.invert&&(e=l.invert(e),r=l.invert(r)),e>r&&(s=e,e=r,r=s))),c&&(u?(i=u[0],o=u[1]):(i=h[0],o=h[1],c.invert&&(i=c.invert(i),o=c.invert(o)),i>o&&(s=i,i=o,o=s))),l&&c?[[e,i],[r,o]]:l?[e,r]:c&&[i,o])},t.clear=function(){return t.empty()||(f=[0,0],h=[0,0],a=u=null),t},t.empty=function(){return!!l&&f[0]==f[1]||!!c&&h[0]==h[1]},sa.rebind(t,s,"on")};var Ys={n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},Gs=[["n","e","s","w","nw","ne","se","sw"],["e","w"],["n","s"],[]],Xs=du.format=xu.timeFormat,Zs=Xs.utc,Js=Zs("%Y-%m-%dT%H:%M:%S.%LZ");Xs.iso=Date.prototype.toISOString&&+new Date("2000-01-01T00:00:00.000Z")?ra:Js,ra.parse=function(t){var n=new Date(t);return isNaN(n)?null:n},ra.toString=Js.toString,du.second=zt(function(t){return new vu(1e3*Math.floor(t/1e3))},function(t,n){t.setTime(t.getTime()+1e3*Math.floor(n))},function(t){return t.getSeconds()}),du.seconds=du.second.range,du.seconds.utc=du.second.utc.range,du.minute=zt(function(t){return new vu(6e4*Math.floor(t/6e4))},function(t,n){t.setTime(t.getTime()+6e4*Math.floor(n))},function(t){return t.getMinutes()}),du.minutes=du.minute.range,du.minutes.utc=du.minute.utc.range,du.hour=zt(function(t){var n=t.getTimezoneOffset()/60;return new vu(36e5*(Math.floor(t/36e5-n)+n))},function(t,n){t.setTime(t.getTime()+36e5*Math.floor(n))},function(t){return t.getHours()}),du.hours=du.hour.range,du.hours.utc=du.hour.utc.range,du.month=zt(function(t){return t=du.day(t),t.setDate(1),t},function(t,n){t.setMonth(t.getMonth()+n)},function(t){return t.getMonth()}),du.months=du.month.range,du.months.utc=du.month.utc.range;var Ks=[1e3,5e3,15e3,3e4,6e4,3e5,9e5,18e5,36e5,108e5,216e5,432e5,864e5,1728e5,6048e5,2592e6,7776e6,31536e6],Qs=[[du.second,1],[du.second,5],[du.second,15],[du.second,30],[du.minute,1],[du.minute,5],[du.minute,15],[du.minute,30],[du.hour,1],[du.hour,3],[du.hour,6],[du.hour,12],[du.day,1],[du.day,2],[du.week,1],[du.month,1],[du.month,3],[du.year,1]],tl=Xs.multi([[".%L",function(t){return t.getMilliseconds()}],[":%S",function(t){return t.getSeconds()}],["%I:%M",function(t){return t.getMinutes()}],["%I %p",function(t){return t.getHours()}],["%a %d",function(t){return t.getDay()&&1!=t.getDate()}],["%b %d",function(t){return 1!=t.getDate()}],["%B",function(t){return t.getMonth()}],["%Y",Pn]]),nl={range:function(t,n,e){return sa.range(Math.ceil(t/e)*e,+n,e).map(oa)},floor:y,ceil:y};Qs.year=du.year,du.scale=function(){return ia(sa.scale.linear(),Qs,tl)};var el=Qs.map(function(t){return[t[0].utc,t[1]]}),rl=Zs.multi([[".%L",function(t){return t.getUTCMilliseconds()}],[":%S",function(t){return t.getUTCSeconds()}],["%I:%M",function(t){return t.getUTCMinutes()}],["%I %p",function(t){return t.getUTCHours()}],["%a %d",function(t){return t.getUTCDay()&&1!=t.getUTCDate()}],["%b %d",function(t){return 1!=t.getUTCDate()}],["%B",function(t){return t.getUTCMonth()}],["%Y",Pn]]);el.year=du.year.utc,du.scale.utc=function(){return ia(sa.scale.linear(),el,rl)},sa.text=kt(function(t){return t.responseText}),sa.json=function(t,n){return At(t,"application/json",aa,n)},sa.html=function(t,n){return At(t,"text/html",ua,n)},sa.xml=kt(function(t){return t.responseXML}),"function"==typeof define&&define.amd?(this.d3=sa,define(sa)):"object"==typeof module&&module.exports?module.exports=sa:this.d3=sa}();
\ No newline at end of file
+!function(t,n,e){"use strict";function r(t,n){return n=n||Error,function(){var e,r,i=2,o=arguments,a=o[0],u="["+(t?t+":":"")+a+"] ",s=o[1];for(u+=s.replace(/\{\d+\}/g,function(t){var n=+t.slice(1,-1),e=n+i;return e<o.length?$t(o[e]):t}),u+="\nhttp://errors.angularjs.org/1.4.7/"+(t?t+"/":"")+a,r=i,e="?";r<o.length;r++,e="&")u+=e+"p"+(r-i)+"="+encodeURIComponent($t(o[r]));return new n(u)}}function i(t){if(null==t||A(t))return!1;var n="length"in Object(t)&&t.length;return t.nodeType===Yr&&n?!0:C(t)||Fr(t)||0===n||"number"==typeof n&&n>0&&n-1 in t}function o(t,n,e){var r,a;if(t)if(M(t))for(r in t)"prototype"==r||"length"==r||"name"==r||t.hasOwnProperty&&!t.hasOwnProperty(r)||n.call(e,t[r],r,t);else if(Fr(t)||i(t)){var u="object"!=typeof t;for(r=0,a=t.length;a>r;r++)(u||r in t)&&n.call(e,t[r],r,t)}else if(t.forEach&&t.forEach!==o)t.forEach(n,e,t);else if(w(t))for(r in t)n.call(e,t[r],r,t);else if("function"==typeof t.hasOwnProperty)for(r in t)t.hasOwnProperty(r)&&n.call(e,t[r],r,t);else for(r in t)br.call(t,r)&&n.call(e,t[r],r,t);return t}function a(t,n,e){for(var r=Object.keys(t).sort(),i=0;i<r.length;i++)n.call(e,t[r[i]],r[i]);return r}function u(t){return function(n,e){t(e,n)}}function s(){return++Rr}function l(t,n){n?t.$$hashKey=n:delete t.$$hashKey}function c(t,n,e){for(var r=t.$$hashKey,i=0,o=n.length;o>i;++i){var a=n[i];if(b(a)||M(a))for(var u=Object.keys(a),s=0,f=u.length;f>s;s++){var h=u[s],p=a[h];e&&b(p)?_(p)?t[h]=new Date(p.valueOf()):k(p)?t[h]=new RegExp(p):(b(t[h])||(t[h]=Fr(p)?[]:{}),c(t[h],[p],!0)):t[h]=p}}return l(t,r),t}function f(t){return c(t,Er.call(arguments,1),!1)}function h(t){return c(t,Er.call(arguments,1),!0)}function p(t){return parseInt(t,10)}function d(t,n){return f(Object.create(t),n)}function v(){}function g(t){return t}function m(t){return function(){return t}}function y(t){return M(t.toString)&&t.toString!==Object.prototype.toString}function $(t){return"undefined"==typeof t}function x(t){return"undefined"!=typeof t}function b(t){return null!==t&&"object"==typeof t}function w(t){return null!==t&&"object"==typeof t&&!Lr(t)}function C(t){return"string"==typeof t}function S(t){return"number"==typeof t}function _(t){return"[object Date]"===Tr.call(t)}function M(t){return"function"==typeof t}function k(t){return"[object RegExp]"===Tr.call(t)}function A(t){return t&&t.window===t}function E(t){return t&&t.$evalAsync&&t.$watch}function P(t){return"[object File]"===Tr.call(t)}function O(t){return"[object FormData]"===Tr.call(t)}function T(t){return"[object Blob]"===Tr.call(t)}function L(t){return"boolean"==typeof t}function j(t){return t&&M(t.then)}function N(t){return Ir.test(Tr.call(t))}function R(t){return!(!t||!(t.nodeName||t.prop&&t.attr&&t.find))}function D(t){var n,e={},r=t.split(",");for(n=0;n<r.length;n++)e[r[n]]=!0;return e}function F(t){return xr(t.nodeName||t[0]&&t[0].nodeName)}function I(t,n){var e=t.indexOf(n);return e>=0&&t.splice(e,1),e}function z(t,n,e,r){if(A(t)||E(t))throw jr("cpws","Can't copy! Making copies of Window or Scope instances is not supported.");if(N(n))throw jr("cpta","Can't copy! TypedArray destination cannot be mutated.");if(n){if(t===n)throw jr("cpi","Can't copy! Source and destination are identical.");e=e||[],r=r||[],b(t)&&(e.push(t),r.push(n));var i;if(Fr(t)){n.length=0;for(var a=0;a<t.length;a++)n.push(z(t[a],null,e,r))}else{var u=n.$$hashKey;if(Fr(n)?n.length=0:o(n,function(t,e){delete n[e]}),w(t))for(i in t)n[i]=z(t[i],null,e,r);else if(t&&"function"==typeof t.hasOwnProperty)for(i in t)t.hasOwnProperty(i)&&(n[i]=z(t[i],null,e,r));else for(i in t)br.call(t,i)&&(n[i]=z(t[i],null,e,r));l(n,u)}}else if(n=t,b(t)){var s;if(e&&-1!==(s=e.indexOf(t)))return r[s];if(Fr(t))return z(t,[],e,r);if(N(t))n=new t.constructor(t);else if(_(t))n=new Date(t.getTime());else if(k(t))n=new RegExp(t.source,t.toString().match(/[^\/]*$/)[0]),n.lastIndex=t.lastIndex;else{if(!M(t.cloneNode)){var c=Object.create(Lr(t));return z(t,c,e,r)}n=t.cloneNode(!0)}r&&(e.push(t),r.push(n))}return n}function q(t,n){if(Fr(t)){n=n||[];for(var e=0,r=t.length;r>e;e++)n[e]=t[e]}else if(b(t)){n=n||{};for(var i in t)"$"===i.charAt(0)&&"$"===i.charAt(1)||(n[i]=t[i])}return n||t}function V(t,n){if(t===n)return!0;if(null===t||null===n)return!1;if(t!==t&&n!==n)return!0;var e,r,i,o=typeof t,a=typeof n;if(o==a&&"object"==o){if(!Fr(t)){if(_(t))return _(n)?V(t.getTime(),n.getTime()):!1;if(k(t))return k(n)?t.toString()==n.toString():!1;if(E(t)||E(n)||A(t)||A(n)||Fr(n)||_(n)||k(n))return!1;i=gt();for(r in t)if("$"!==r.charAt(0)&&!M(t[r])){if(!V(t[r],n[r]))return!1;i[r]=!0}for(r in n)if(!(r in i)&&"$"!==r.charAt(0)&&x(n[r])&&!M(n[r]))return!1;return!0}if(!Fr(n))return!1;if((e=t.length)==n.length){for(r=0;e>r;r++)if(!V(t[r],n[r]))return!1;return!0}}return!1}function B(t,n,e){return t.concat(Er.call(n,e))}function W(t,n){return Er.call(t,n||0)}function U(t,n){var e=arguments.length>2?W(arguments,2):[];return!M(n)||n instanceof RegExp?n:e.length?function(){return arguments.length?n.apply(t,B(e,arguments,0)):n.apply(t,e)}:function(){return arguments.length?n.apply(t,arguments):n.call(t)}}function H(t,r){var i=r;return"string"==typeof t&&"$"===t.charAt(0)&&"$"===t.charAt(1)?i=e:A(r)?i="$WINDOW":r&&n===r?i="$DOCUMENT":E(r)&&(i="$SCOPE"),i}function Y(t,n){return"undefined"==typeof t?e:(S(n)||(n=n?2:null),JSON.stringify(t,H,n))}function G(t){return C(t)?JSON.parse(t):t}function X(t,n){var e=Date.parse("Jan 01, 1970 00:00:00 "+t)/6e4;return isNaN(e)?n:e}function Z(t,n){return t=new Date(t.getTime()),t.setMinutes(t.getMinutes()+n),t}function J(t,n,e){e=e?-1:1;var r=X(n,t.getTimezoneOffset());return Z(t,e*(r-t.getTimezoneOffset()))}function K(t){t=Mr(t).clone();try{t.empty()}catch(n){}var e=Mr("<div>").append(t).html();try{return t[0].nodeType===Xr?xr(e):e.match(/^(<[^>]+>)/)[1].replace(/^<([\w\-]+)/,function(t,n){return"<"+xr(n)})}catch(n){return xr(e)}}function Q(t){try{return decodeURIComponent(t)}catch(n){}}function tt(t){var n={};return o((t||"").split("&"),function(t){var e,r,i;t&&(r=t=t.replace(/\+/g,"%20"),e=t.indexOf("="),-1!==e&&(r=t.substring(0,e),i=t.substring(e+1)),r=Q(r),x(r)&&(i=x(i)?Q(i):!0,br.call(n,r)?Fr(n[r])?n[r].push(i):n[r]=[n[r],i]:n[r]=i))}),n}function nt(t){var n=[];return o(t,function(t,e){Fr(t)?o(t,function(t){n.push(rt(e,!0)+(t===!0?"":"="+rt(t,!0)))}):n.push(rt(e,!0)+(t===!0?"":"="+rt(t,!0)))}),n.length?n.join("&"):""}function et(t){return rt(t,!0).replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+")}function rt(t,n){return encodeURIComponent(t).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%3B/gi,";").replace(/%20/g,n?"%20":"+")}function it(t,n){var e,r,i=Wr.length;for(r=0;i>r;++r)if(e=Wr[r]+n,C(e=t.getAttribute(e)))return e;return null}function ot(t,n){var e,r,i={};o(Wr,function(n){var i=n+"app";!e&&t.hasAttribute&&t.hasAttribute(i)&&(e=t,r=t.getAttribute(i))}),o(Wr,function(n){var i,o=n+"app";!e&&(i=t.querySelector("["+o.replace(":","\\:")+"]"))&&(e=i,r=i.getAttribute(o))}),e&&(i.strictDi=null!==it(e,"strict-di"),n(e,r?[r]:[],i))}function at(e,r,i){b(i)||(i={});var a={strictDi:!1};i=f(a,i);var u=function(){if(e=Mr(e),e.injector()){var t=e[0]===n?"document":K(e);throw jr("btstrpd","App Already Bootstrapped with this Element '{0}'",t.replace(/</,"<").replace(/>/,">"))}r=r||[],r.unshift(["$provide",function(t){t.value("$rootElement",e)}]),i.debugInfoEnabled&&r.push(["$compileProvider",function(t){t.debugInfoEnabled(!0)}]),r.unshift("ng");var o=Kt(r,i.strictDi);return o.invoke(["$rootScope","$rootElement","$compile","$injector",function(t,n,e,r){t.$apply(function(){n.data("$injector",r),e(n)(t)})}]),o},s=/^NG_ENABLE_DEBUG_INFO!/,l=/^NG_DEFER_BOOTSTRAP!/;return t&&s.test(t.name)&&(i.debugInfoEnabled=!0,t.name=t.name.replace(s,"")),t&&!l.test(t.name)?u():(t.name=t.name.replace(l,""),Nr.resumeBootstrap=function(t){return o(t,function(t){r.push(t)}),u()},void(M(Nr.resumeDeferredBootstrap)&&Nr.resumeDeferredBootstrap()))}function ut(){t.name="NG_ENABLE_DEBUG_INFO!"+t.name,t.location.reload()}function st(t){var n=Nr.element(t).injector();if(!n)throw jr("test","no injector found for element argument to getTestability");return n.get("$$testability")}function lt(t,n){return n=n||"_",t.replace(Ur,function(t,e){return(e?n:"")+t.toLowerCase()})}function ct(){var n;if(!Hr){var r=Br();kr=$(r)?t.jQuery:r?t[r]:e,kr&&kr.fn.on?(Mr=kr,f(kr.fn,{scope:pi.scope,isolateScope:pi.isolateScope,controller:pi.controller,injector:pi.injector,inheritedData:pi.inheritedData}),n=kr.cleanData,kr.cleanData=function(t){var e;if(Dr)Dr=!1;else for(var r,i=0;null!=(r=t[i]);i++)e=kr._data(r,"events"),e&&e.$destroy&&kr(r).triggerHandler("$destroy");n(t)}):Mr=At,Nr.element=Mr,Hr=!0}}function ft(t,n,e){if(!t)throw jr("areq","Argument '{0}' is {1}",n||"?",e||"required");return t}function ht(t,n,e){return e&&Fr(t)&&(t=t[t.length-1]),ft(M(t),n,"not a function, got "+(t&&"object"==typeof t?t.constructor.name||"Object":typeof t)),t}function pt(t,n){if("hasOwnProperty"===t)throw jr("badname","hasOwnProperty is not a valid {0} name",n)}function dt(t,n,e){if(!n)return t;for(var r,i=n.split("."),o=t,a=i.length,u=0;a>u;u++)r=i[u],t&&(t=(o=t)[r]);return!e&&M(t)?U(o,t):t}function vt(t){for(var n,e=t[0],r=t[t.length-1],i=1;e!==r&&(e=e.nextSibling);i++)(n||t[i]!==e)&&(n||(n=Mr(Er.call(t,0,i))),n.push(e));return n||t}function gt(){return Object.create(null)}function mt(t){function n(t,n,e){return t[n]||(t[n]=e())}var e=r("$injector"),i=r("ng"),o=n(t,"angular",Object);return o.$$minErr=o.$$minErr||r,n(o,"module",function(){var t={};return function(r,o,a){var u=function(t,n){if("hasOwnProperty"===t)throw i("badname","hasOwnProperty is not a valid {0} name",n)};return u(r,"module"),o&&t.hasOwnProperty(r)&&(t[r]=null),n(t,r,function(){function t(t,n,e,r){return r||(r=i),function(){return r[e||"push"]([t,n,arguments]),c}}function n(t,n){return function(e,o){return o&&M(o)&&(o.$$moduleName=r),i.push([t,n,arguments]),c}}if(!o)throw e("nomod","Module '{0}' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.",r);var i=[],u=[],s=[],l=t("$injector","invoke","push",u),c={_invokeQueue:i,_configBlocks:u,_runBlocks:s,requires:o,name:r,provider:n("$provide","provider"),factory:n("$provide","factory"),service:n("$provide","service"),value:t("$provide","value"),constant:t("$provide","constant","unshift"),decorator:n("$provide","decorator"),animation:n("$animateProvider","register"),filter:n("$filterProvider","register"),controller:n("$controllerProvider","register"),directive:n("$compileProvider","directive"),config:l,run:function(t){return s.push(t),this}};return a&&l(a),c})}})}function yt(t){var n=[];return JSON.stringify(t,function(t,e){if(e=H(t,e),b(e)){if(n.indexOf(e)>=0)return"...";n.push(e)}return e})}function $t(t){return"function"==typeof t?t.toString().replace(/ \{[\s\S]*$/,""):$(t)?"undefined":"string"!=typeof t?yt(t):t}function xt(n){f(n,{bootstrap:at,copy:z,extend:f,merge:h,equals:V,element:Mr,forEach:o,injector:Kt,noop:v,bind:U,toJson:Y,fromJson:G,identity:g,isUndefined:$,isDefined:x,isString:C,isFunction:M,isObject:b,isNumber:S,isElement:R,isArray:Fr,version:Qr,isDate:_,lowercase:xr,uppercase:wr,callbacks:{counter:0},getTestability:st,$$minErr:r,$$csp:Vr,reloadWithDebugInfo:ut}),(Ar=mt(t))("ng",["ngLocale"],["$provide",function(t){t.provider({$$sanitizeUri:me}),t.provider("$compile",ln).directive({a:po,input:Oo,textarea:Oo,form:$o,script:Ca,select:Ma,style:Aa,option:ka,ngBind:jo,ngBindHtml:Ro,ngBindTemplate:No,ngClass:Fo,ngClassEven:zo,ngClassOdd:Io,ngCloak:qo,ngController:Vo,ngForm:xo,ngHide:ma,ngIf:Uo,ngInclude:Ho,ngInit:Go,ngNonBindable:sa,ngPluralize:ha,ngRepeat:pa,ngShow:ga,ngStyle:ya,ngSwitch:$a,ngSwitchWhen:xa,ngSwitchDefault:ba,ngOptions:fa,ngTransclude:wa,ngModel:oa,ngList:Xo,ngChange:Do,pattern:Pa,ngPattern:Pa,required:Ea,ngRequired:Ea,minlength:Ta,ngMinlength:Ta,maxlength:Oa,ngMaxlength:Oa,ngValue:Lo,ngModelOptions:ua}).directive({ngInclude:Yo}).directive(vo).directive(Bo),t.provider({$anchorScroll:Qt,$animate:Ai,$animateCss:Ei,$$animateQueue:ki,$$AnimateRunner:Mi,$browser:an,$cacheFactory:un,$controller:dn,$document:vn,$exceptionHandler:gn,$filter:Oe,$$forceReflow:ji,$interpolate:Pn,$interval:On,$http:Mn,$httpParamSerializer:yn,$httpParamSerializerJQLike:$n,$httpBackend:An,$xhrFactory:kn,$location:Un,$log:Hn,$parse:fe,$rootScope:ge,$q:he,$$q:pe,$sce:be,$sceDelegate:xe,$sniffer:we,$templateCache:sn,$templateRequest:Ce,$$testability:Se,$timeout:_e,$window:Ae,$$rAF:ve,$$jqLite:Yt,$$HashMap:mi,$$cookieReader:Pe})}])}function bt(){return++ni}function wt(t){return t.replace(ii,function(t,n,e,r){return r?e.toUpperCase():e}).replace(oi,"Moz$1")}function Ct(t){return!li.test(t)}function St(t){var n=t.nodeType;return n===Yr||!n||n===Jr}function _t(t){for(var n in ti[t.ng339])return!0;return!1}function Mt(t,n){var e,r,i,a,u=n.createDocumentFragment(),s=[];if(Ct(t))s.push(n.createTextNode(t));else{for(e=e||u.appendChild(n.createElement("div")),r=(ci.exec(t)||["",""])[1].toLowerCase(),i=hi[r]||hi._default,e.innerHTML=i[1]+t.replace(fi,"<$1></$2>")+i[2],a=i[0];a--;)e=e.lastChild;s=B(s,e.childNodes),e=u.firstChild,e.textContent=""}return u.textContent="",u.innerHTML="",o(s,function(t){u.appendChild(t)}),u}function kt(t,e){e=e||n;var r;return(r=si.exec(t))?[e.createElement(r[1])]:(r=Mt(t,e))?r.childNodes:[]}function At(t){if(t instanceof At)return t;var n;if(C(t)&&(t=zr(t),n=!0),!(this instanceof At)){if(n&&"<"!=t.charAt(0))throw ui("nosel","Looking up elements via selectors is not supported by jqLite! See: http://docs.angularjs.org/api/angular.element");return new At(t)}n?Ft(this,kt(t)):Ft(this,t)}function Et(t){return t.cloneNode(!0)}function Pt(t,n){if(n||Tt(t),t.querySelectorAll)for(var e=t.querySelectorAll("*"),r=0,i=e.length;i>r;r++)Tt(e[r])}function Ot(t,n,e,r){if(x(r))throw ui("offargs","jqLite#off() does not support the `selector` argument");var i=Lt(t),a=i&&i.events,u=i&&i.handle;if(u)if(n)o(n.split(" "),function(n){if(x(e)){var r=a[n];if(I(r||[],e),r&&r.length>0)return}ri(t,n,u),delete a[n]});else for(n in a)"$destroy"!==n&&ri(t,n,u),delete a[n]}function Tt(t,n){var r=t.ng339,i=r&&ti[r];if(i){if(n)return void delete i.data[n];i.handle&&(i.events.$destroy&&i.handle({},"$destroy"),Ot(t)),delete ti[r],t.ng339=e}}function Lt(t,n){var r=t.ng339,i=r&&ti[r];return n&&!i&&(t.ng339=r=bt(),i=ti[r]={events:{},data:{},handle:e}),i}function jt(t,n,e){if(St(t)){var r=x(e),i=!r&&n&&!b(n),o=!n,a=Lt(t,!i),u=a&&a.data;if(r)u[n]=e;else{if(o)return u;if(i)return u&&u[n];f(u,n)}}}function Nt(t,n){return t.getAttribute?(" "+(t.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").indexOf(" "+n+" ")>-1:!1}function Rt(t,n){n&&t.setAttribute&&o(n.split(" "),function(n){t.setAttribute("class",zr((" "+(t.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").replace(" "+zr(n)+" "," ")))})}function Dt(t,n){if(n&&t.setAttribute){var e=(" "+(t.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ");o(n.split(" "),function(t){t=zr(t),-1===e.indexOf(" "+t+" ")&&(e+=t+" ")}),t.setAttribute("class",zr(e))}}function Ft(t,n){if(n)if(n.nodeType)t[t.length++]=n;else{var e=n.length;if("number"==typeof e&&n.window!==n){if(e)for(var r=0;e>r;r++)t[t.length++]=n[r]}else t[t.length++]=n}}function It(t,n){return zt(t,"$"+(n||"ngController")+"Controller")}function zt(t,n,e){t.nodeType==Jr&&(t=t.documentElement);for(var r=Fr(n)?n:[n];t;){for(var i=0,o=r.length;o>i;i++)if(x(e=Mr.data(t,r[i])))return e;t=t.parentNode||t.nodeType===Kr&&t.host}}function qt(t){for(Pt(t,!0);t.firstChild;)t.removeChild(t.firstChild)}function Vt(t,n){n||Pt(t);var e=t.parentNode;e&&e.removeChild(t)}function Bt(n,e){e=e||t,"complete"===e.document.readyState?e.setTimeout(n):Mr(e).on("load",n)}function Wt(t,n){var e=di[n.toLowerCase()];return e&&vi[F(t)]&&e}function Ut(t){return gi[t]}function Ht(t,n){var e=function(e,r){e.isDefaultPrevented=function(){return e.defaultPrevented};var i=n[r||e.type],o=i?i.length:0;if(o){if($(e.immediatePropagationStopped)){var a=e.stopImmediatePropagation;e.stopImmediatePropagation=function(){e.immediatePropagationStopped=!0,e.stopPropagation&&e.stopPropagation(),a&&a.call(e)}}e.isImmediatePropagationStopped=function(){return e.immediatePropagationStopped===!0},o>1&&(i=q(i));for(var u=0;o>u;u++)e.isImmediatePropagationStopped()||i[u].call(t,e)}};return e.elem=t,e}function Yt(){this.$get=function(){return f(At,{hasClass:function(t,n){return t.attr&&(t=t[0]),Nt(t,n)},addClass:function(t,n){return t.attr&&(t=t[0]),Dt(t,n)},removeClass:function(t,n){return t.attr&&(t=t[0]),Rt(t,n)}})}}function Gt(t,n){var e=t&&t.$$hashKey;if(e)return"function"==typeof e&&(e=t.$$hashKey()),e;var r=typeof t;return e="function"==r||"object"==r&&null!==t?t.$$hashKey=r+":"+(n||s)():r+":"+t}function Xt(t,n){if(n){var e=0;this.nextUid=function(){return++e}}o(t,this.put,this)}function Zt(t){var n=t.toString().replace(bi,""),e=n.match(yi);return e?"function("+(e[1]||"").replace(/[\s\r\n]+/," ")+")":"fn"}function Jt(t,n,e){var r,i,a,u;if("function"==typeof t){if(!(r=t.$inject)){if(r=[],t.length){if(n)throw C(e)&&e||(e=t.name||Zt(t)),wi("strictdi","{0} is not using explicit annotation and cannot be invoked in strict mode",e);i=t.toString().replace(bi,""),a=i.match(yi),o(a[1].split($i),function(t){t.replace(xi,function(t,n,e){r.push(e)})})}t.$inject=r}}else Fr(t)?(u=t.length-1,ht(t[u],"fn"),r=t.slice(0,u)):ht(t,"fn",!0);return r}function Kt(t,n){function r(t){return function(n,e){return b(n)?void o(n,u(t)):t(n,e)}}function i(t,n){if(pt(t,"service"),(M(n)||Fr(n))&&(n=S.instantiate(n)),!n.$get)throw wi("pget","Provider '{0}' must define $get factory method.",t);return w[t+g]=n}function a(t,n){return function(){var e=k.invoke(n,this);if($(e))throw wi("undef","Provider '{0}' must return a value from $get factory method.",t);return e}}function s(t,n,e){return i(t,{$get:e!==!1?a(t,n):n})}function l(t,n){return s(t,["$injector",function(t){return t.instantiate(n)}])}function c(t,n){return s(t,m(n),!1)}function f(t,n){pt(t,"constant"),w[t]=n,_[t]=n}function h(t,n){var e=S.get(t+g),r=e.$get;e.$get=function(){var t=k.invoke(r,e);return k.invoke(n,null,{$delegate:t})}}function p(t){ft($(t)||Fr(t),"modulesToLoad","not an array");var n,e=[];return o(t,function(t){function r(t){var n,e;for(n=0,e=t.length;e>n;n++){var r=t[n],i=S.get(r[0]);i[r[1]].apply(i,r[2])}}if(!x.get(t)){x.put(t,!0);try{C(t)?(n=Ar(t),e=e.concat(p(n.requires)).concat(n._runBlocks),r(n._invokeQueue),r(n._configBlocks)):M(t)?e.push(S.invoke(t)):Fr(t)?e.push(S.invoke(t)):ht(t,"module")}catch(i){throw Fr(t)&&(t=t[t.length-1]),i.message&&i.stack&&-1==i.stack.indexOf(i.message)&&(i=i.message+"\n"+i.stack),wi("modulerr","Failed to instantiate module {0} due to:\n{1}",t,i.stack||i.message||i)}}}),e}function d(t,e){function r(n,r){if(t.hasOwnProperty(n)){if(t[n]===v)throw wi("cdep","Circular dependency found: {0}",n+" <- "+y.join(" <- "));return t[n]}try{return y.unshift(n),t[n]=v,t[n]=e(n,r)}catch(i){throw t[n]===v&&delete t[n],i}finally{y.shift()}}function i(t,e,i,o){"string"==typeof i&&(o=i,i=null);var a,u,s,l=[],c=Kt.$$annotate(t,n,o);for(u=0,a=c.length;a>u;u++){if(s=c[u],"string"!=typeof s)throw wi("itkn","Incorrect injection token! Expected service name as string, got {0}",s);l.push(i&&i.hasOwnProperty(s)?i[s]:r(s,o))}return Fr(t)&&(t=t[a]),t.apply(e,l)}function o(t,n,e){var r=Object.create((Fr(t)?t[t.length-1]:t).prototype||null),o=i(t,r,n,e);return b(o)||M(o)?o:r}return{invoke:i,instantiate:o,get:r,annotate:Kt.$$annotate,has:function(n){return w.hasOwnProperty(n+g)||t.hasOwnProperty(n)}}}n=n===!0;var v={},g="Provider",y=[],x=new Xt([],!0),w={$provide:{provider:r(i),factory:r(s),service:r(l),value:r(c),constant:r(f),decorator:h}},S=w.$injector=d(w,function(t,n){throw Nr.isString(n)&&y.push(n),wi("unpr","Unknown provider: {0}",y.join(" <- "))}),_={},k=_.$injector=d(_,function(t,n){var r=S.get(t+g,n);return k.invoke(r.$get,r,e,t)});return o(p(t),function(t){t&&k.invoke(t)}),k}function Qt(){var t=!0;this.disableAutoScrolling=function(){t=!1},this.$get=["$window","$location","$rootScope",function(n,e,r){function i(t){var n=null;return Array.prototype.some.call(t,function(t){return"a"===F(t)?(n=t,!0):void 0}),n}function o(){var t=u.yOffset;if(M(t))t=t();else if(R(t)){var e=t[0],r=n.getComputedStyle(e);t="fixed"!==r.position?0:e.getBoundingClientRect().bottom}else S(t)||(t=0);return t}function a(t){if(t){t.scrollIntoView();var e=o();if(e){var r=t.getBoundingClientRect().top;n.scrollBy(0,r-e)}}else n.scrollTo(0,0)}function u(t){t=C(t)?t:e.hash();var n;t?(n=s.getElementById(t))?a(n):(n=i(s.getElementsByName(t)))?a(n):"top"===t&&a(null):a(null)}var s=n.document;return t&&r.$watch(function(){return e.hash()},function(t,n){t===n&&""===t||Bt(function(){r.$evalAsync(u)})}),u}]}function tn(t,n){return t||n?t?n?(Fr(t)&&(t=t.join(" ")),Fr(n)&&(n=n.join(" ")),t+" "+n):t:n:""}function nn(t){for(var n=0;n<t.length;n++){var e=t[n];if(e.nodeType===Si)return e}}function en(t){C(t)&&(t=t.split(" "));var n=gt();return o(t,function(t){t.length&&(n[t]=!0)}),n}function rn(t){return b(t)?t:{}}function on(t,n,e,r){function i(t){try{t.apply(null,W(arguments,1))}finally{if(y--,0===y)for(;x.length;)try{x.pop()()}catch(n){e.error(n)}}}function a(t){var n=t.indexOf("#");return-1===n?"":t.substr(n)}function u(){_=null,l(),c()}function s(){try{return p.state}catch(t){}}function l(){b=s(),b=$(b)?null:b,V(b,A)&&(b=A),A=b}function c(){C===f.url()&&w===b||(C=f.url(),w=b,o(M,function(t){t(f.url(),b)}))}var f=this,h=(n[0],t.location),p=t.history,d=t.setTimeout,g=t.clearTimeout,m={};f.isMock=!1;var y=0,x=[];f.$$completeOutstandingRequest=i,f.$$incOutstandingRequestCount=function(){y++},f.notifyWhenNoOutstandingRequests=function(t){0===y?t():x.push(t)};var b,w,C=h.href,S=n.find("base"),_=null;l(),w=b,f.url=function(n,e,i){if($(i)&&(i=null),h!==t.location&&(h=t.location),p!==t.history&&(p=t.history),n){var o=w===i;if(C===n&&(!r.history||o))return f;var u=C&&Rn(C)===Rn(n);return C=n,w=i,!r.history||u&&o?(u&&!_||(_=n),e?h.replace(n):u?h.hash=a(n):h.href=n,h.href!==n&&(_=n)):(p[e?"replaceState":"pushState"](i,"",n),l(),w=b),f}return _||h.href.replace(/%27/g,"'")},f.state=function(){return b};var M=[],k=!1,A=null;f.onUrlChange=function(n){return k||(r.history&&Mr(t).on("popstate",u),Mr(t).on("hashchange",u),k=!0),M.push(n),n},f.$$applicationDestroyed=function(){Mr(t).off("hashchange popstate",u)},f.$$checkUrlChange=c,f.baseHref=function(){var t=S.attr("href");return t?t.replace(/^(https?\:)?\/\/[^\/]*/,""):""},f.defer=function(t,n){var e;return y++,e=d(function(){delete m[e],i(t)},n||0),m[e]=!0,e},f.defer.cancel=function(t){return m[t]?(delete m[t],g(t),i(v),!0):!1}}function an(){this.$get=["$window","$log","$sniffer","$document",function(t,n,e,r){return new on(t,r,n,e)}]}function un(){this.$get=function(){function t(t,e){function i(t){t!=h&&(p?p==t&&(p=t.n):p=t,o(t.n,t.p),o(t,h),h=t,h.n=null)}function o(t,n){t!=n&&(t&&(t.p=n),n&&(n.n=t))}if(t in n)throw r("$cacheFactory")("iid","CacheId '{0}' is already taken!",t);var a=0,u=f({},e,{id:t}),s={},l=e&&e.capacity||Number.MAX_VALUE,c={},h=null,p=null;return n[t]={put:function(t,n){if(!$(n)){if(l<Number.MAX_VALUE){var e=c[t]||(c[t]={key:t});i(e)}return t in s||a++,s[t]=n,a>l&&this.remove(p.key),n}},get:function(t){if(l<Number.MAX_VALUE){var n=c[t];if(!n)return;i(n)}return s[t]},remove:function(t){if(l<Number.MAX_VALUE){var n=c[t];if(!n)return;n==h&&(h=n.p),n==p&&(p=n.n),o(n.n,n.p),delete c[t]}delete s[t],a--},removeAll:function(){s={},a=0,c={},h=p=null},destroy:function(){s=null,u=null,c=null,delete n[t]},info:function(){return f({},u,{size:a})}}}var n={};return t.info=function(){var t={};return o(n,function(n,e){t[e]=n.info()}),t},t.get=function(t){return n[t]},t}}function sn(){this.$get=["$cacheFactory",function(t){return t("templates")}]}function ln(t,r){function i(t,n,e){var r=/^\s*([@&]|=(\*?))(\??)\s*(\w*)\s*$/,i={};return o(t,function(t,o){var a=t.match(r);if(!a)throw Pi("iscp","Invalid {3} for directive '{0}'. Definition: {... {1}: '{2}' ...}",n,o,t,e?"controller bindings definition":"isolate scope definition");i[o]={mode:a[1][0],collection:"*"===a[2],optional:"?"===a[3],attrName:a[4]||o}}),i}function a(t,n){var e={isolateScope:null,bindToController:null};if(b(t.scope)&&(t.bindToController===!0?(e.bindToController=i(t.scope,n,!0),e.isolateScope={}):e.isolateScope=i(t.scope,n,!1)),b(t.bindToController)&&(e.bindToController=i(t.bindToController,n,!0)),b(e.bindToController)){var r=t.controller,o=t.controllerAs;if(!r)throw Pi("noctrl","Cannot bind to controller without directive '{0}'s controller.",n);if(!pn(r,o))throw Pi("noident","Cannot bind to controller without identifier for directive '{0}'.",n)}return e}function s(t){var n=t.charAt(0);if(!n||n!==xr(n))throw Pi("baddir","Directive name '{0}' is invalid. The first character must be a lowercase letter",t);if(t!==t.trim())throw Pi("baddir","Directive name '{0}' is invalid. The name should not contain leading or trailing whitespaces",t)}var l={},c="Directive",h=/^\s*directive\:\s*([\w\-]+)\s+(.*)$/,p=/(([\w\-]+)(?:\:([^;]+))?;?)/,y=D("ngSrc,ngSrcset,src,srcset"),w=/^(?:(\^\^?)?(\?)?(\^\^?)?)?/,S=/^(on[a-z]+|formaction)$/;this.directive=function k(n,e){return pt(n,"directive"),C(n)?(s(n),ft(e,"directiveFactory"),l.hasOwnProperty(n)||(l[n]=[],t.factory(n+c,["$injector","$exceptionHandler",function(t,e){var r=[];return o(l[n],function(i,o){try{var u=t.invoke(i);M(u)?u={compile:m(u)}:!u.compile&&u.link&&(u.compile=m(u.link)),u.priority=u.priority||0,u.index=o,u.name=u.name||n,u.require=u.require||u.controller&&u.name,u.restrict=u.restrict||"EA";var s=u.$$bindings=a(u,u.name);b(s.isolateScope)&&(u.$$isolateBindings=s.isolateScope),u.$$moduleName=i.$$moduleName,r.push(u)}catch(l){e(l)}}),r}])),l[n].push(e)):o(n,u(k)),this},this.aHrefSanitizationWhitelist=function(t){return x(t)?(r.aHrefSanitizationWhitelist(t),this):r.aHrefSanitizationWhitelist()},this.imgSrcSanitizationWhitelist=function(t){return x(t)?(r.imgSrcSanitizationWhitelist(t),this):r.imgSrcSanitizationWhitelist()};var _=!0;this.debugInfoEnabled=function(t){return x(t)?(_=t,this):_},this.$get=["$injector","$interpolate","$exceptionHandler","$templateRequest","$parse","$controller","$rootScope","$document","$sce","$animate","$$sanitizeUri",function(t,r,i,a,u,s,m,x,k,A,P){function O(t,n){try{t.addClass(n)}catch(e){}}function T(t,n,e,r,i){t instanceof Mr||(t=Mr(t)),o(t,function(n,e){n.nodeType==Xr&&n.nodeValue.match(/\S+/)&&(t[e]=Mr(n).wrap("<span></span>").parent()[0])});var a=j(t,n,t,e,r,i);T.$$addScopeClass(t);var u=null;return function(n,e,r){ft(n,"scope"),r=r||{};var i=r.parentBoundTranscludeFn,o=r.transcludeControllers,s=r.futureParentElement;i&&i.$$boundTransclude&&(i=i.$$boundTransclude),u||(u=L(s));var l;if(l="html"!==u?Mr(Q(u,Mr("<div>").append(t).html())):e?pi.clone.call(t):t,o)for(var c in o)l.data("$"+c+"Controller",o[c].instance);return T.$$addScopeInfo(l,n),e&&e(l,n),a&&a(n,l,l,i),l}}function L(t){var n=t&&t[0];return n&&"foreignobject"!==F(n)&&n.toString().match(/SVG/)?"svg":"html"}function j(t,n,r,i,o,a){function u(t,r,i,o){var a,u,s,l,c,f,h,p,g;if(d){var m=r.length;for(g=new Array(m),c=0;c<v.length;c+=3)h=v[c],g[h]=r[h]}else g=r;for(c=0,f=v.length;f>c;)if(s=g[v[c++]],a=v[c++],u=v[c++],a){if(a.scope){l=t.$new(),T.$$addScopeInfo(Mr(s),l);var y=a.$$destroyBindings;y&&(a.$$destroyBindings=null,l.$on("$destroyed",y))}else l=t;p=a.transcludeOnThisElement?N(t,a.transclude,o):!a.templateOnThisElement&&o?o:!o&&n?N(t,n):null,a(u,l,s,i,p,a)}else u&&u(t,s.childNodes,e,o)}for(var s,l,c,f,h,p,d,v=[],g=0;g<t.length;g++)s=new at,l=R(t[g],[],s,0===g?i:e,o),c=l.length?q(l,t[g],s,n,r,null,[],[],a):null,c&&c.scope&&T.$$addScopeClass(s.$$element),h=c&&c.terminal||!(f=t[g].childNodes)||!f.length?null:j(f,c?(c.transcludeOnThisElement||!c.templateOnThisElement)&&c.transclude:n),(c||h)&&(v.push(g,c,h),p=!0,d=d||c),a=null;return p?u:null}function N(t,n,e){var r=function(r,i,o,a,u){return r||(r=t.$new(!1,u),r.$$transcluded=!0),n(r,i,{parentBoundTranscludeFn:e,transcludeControllers:o,futureParentElement:a})};return r}function R(t,n,e,r,i){var o,a,u=t.nodeType,s=e.$attr;switch(u){case Yr:U(n,cn(F(t)),"E",r,i);for(var l,c,f,d,v,g,m=t.attributes,y=0,$=m&&m.length;$>y;y++){var x=!1,w=!1;l=m[y],c=l.name,v=zr(l.value),d=cn(c),(g=ht.test(d))&&(c=c.replace(Oi,"").substr(8).replace(/_(.)/g,function(t,n){return n.toUpperCase()}));var S=d.replace(/(Start|End)$/,"");H(S)&&d===S+"Start"&&(x=c,w=c.substr(0,c.length-5)+"end",c=c.substr(0,c.length-6)),f=cn(c.toLowerCase()),s[f]=c,!g&&e.hasOwnProperty(f)||(e[f]=v,Wt(t,f)&&(e[f]=!0)),nt(t,n,v,f,g),U(n,f,"A",r,i,x,w)}if(a=t.className,b(a)&&(a=a.animVal),C(a)&&""!==a)for(;o=p.exec(a);)f=cn(o[2]),U(n,f,"C",r,i)&&(e[f]=zr(o[3])),a=a.substr(o.index+o[0].length);break;case Xr:if(11===_r)for(;t.parentNode&&t.nextSibling&&t.nextSibling.nodeType===Xr;)t.nodeValue=t.nodeValue+t.nextSibling.nodeValue,t.parentNode.removeChild(t.nextSibling);J(n,t.nodeValue);break;case Zr:try{o=h.exec(t.nodeValue),o&&(f=cn(o[1]),U(n,f,"M",r,i)&&(e[f]=zr(o[2])))}catch(_){}}return n.sort(X),n}function D(t,n,e){var r=[],i=0;if(n&&t.hasAttribute&&t.hasAttribute(n)){do{if(!t)throw Pi("uterdir","Unterminated attribute, found '{0}' but no matching '{1}' found.",n,e);t.nodeType==Yr&&(t.hasAttribute(n)&&i++,t.hasAttribute(e)&&i--),r.push(t),t=t.nextSibling}while(i>0)}else r.push(t);return Mr(r)}function z(t,n,e){return function(r,i,o,a,u){return i=D(i[0],n,e),t(r,i,o,a,u)}}function q(t,r,o,a,u,l,c,f,h){function p(t,n,e,r){t&&(e&&(t=z(t,e,r)),t.require=m.require,t.directiveName=y,(P===m||m.$$isolateScope)&&(t=rt(t,{isolateScope:!0})),c.push(t)),n&&(e&&(n=z(n,e,r)),n.require=m.require,n.directiveName=y,(P===m||m.$$isolateScope)&&(n=rt(n,{isolateScope:!0})),f.push(n))}function d(t,n,e,r){var i;if(C(n)){var o=n.match(w),a=n.substring(o[0].length),u=o[1]||o[3],s="?"===o[2];if("^^"===u?e=e.parent():(i=r&&r[a],i=i&&i.instance),!i){var l="$"+a+"Controller";i=u?e.inheritedData(l):e.data(l)}if(!i&&!s)throw Pi("ctreq","Controller '{0}', required by directive '{1}', can't be found!",a,t)}else if(Fr(n)){i=[];for(var c=0,f=n.length;f>c;c++)i[c]=d(t,n[c],e,r)}return i||null}function v(t,n,e,r,i,o){var a=gt();for(var u in r){var l=r[u],c={$scope:l===P||l.$$isolateScope?i:o,$element:t,$attrs:n,$transclude:e},f=l.controller;"@"==f&&(f=n[l.name]);var h=s(f,c,!0,l.controllerAs);a[l.name]=h,F||t.data("$"+l.name+"Controller",h.instance)}return a}function g(t,n,i,a,u,s){function l(t,n,r){var i;return E(t)||(r=n,n=t,t=e),F&&(i=$),r||(r=F?b.parent():b),u(t,n,i,r,L)}var h,p,g,m,y,$,x,b,w;if(r===i?(w=o,b=o.$$element):(b=Mr(i),w=new at(b,o)),P&&(y=n.$new(!0)),u&&(x=l,x.$$boundTransclude=u),A&&($=v(b,w,x,A,y,n)),P&&(T.$$addScopeInfo(b,y,!0,!(O&&(O===P||O===P.$$originalDirective))),T.$$addScopeClass(b,!0),y.$$isolateBindings=P.$$isolateBindings,ot(n,w,y,y.$$isolateBindings,P,y)),$){var C,S,_=P||k;_&&$[_.name]&&(C=_.$$bindings.bindToController,m=$[_.name],m&&m.identifier&&C&&(S=m,s.$$destroyBindings=ot(n,w,m.instance,C,_)));for(h in $){m=$[h];var M=m();M!==m.instance&&(m.instance=M,b.data("$"+h+"Controller",M),m===S&&(s.$$destroyBindings(),s.$$destroyBindings=ot(n,w,M,C,_)))}}for(h=0,p=c.length;p>h;h++)g=c[h],it(g,g.isolateScope?y:n,b,w,g.require&&d(g.directiveName,g.require,b,$),x);var L=n;for(P&&(P.template||null===P.templateUrl)&&(L=y),t&&t(L,i.childNodes,e,u),h=f.length-1;h>=0;h--)g=f[h],it(g,g.isolateScope?y:n,b,w,g.require&&d(g.directiveName,g.require,b,$),x)}h=h||{};for(var m,y,$,x,S,_=-Number.MAX_VALUE,k=h.newScopeDirective,A=h.controllerDirectives,P=h.newIsolateScopeDirective,O=h.templateDirective,L=h.nonTlbTranscludeDirective,j=!1,N=!1,F=h.hasElementTranscludeDirective,I=o.$$element=Mr(r),q=l,V=a,U=0,H=t.length;H>U;U++){m=t[U];var X=m.$$start,J=m.$$end;if(X&&(I=D(r,X,J)),$=e,_>m.priority)break;if((S=m.scope)&&(m.templateUrl||(b(S)?(Z("new/isolated scope",P||k,m,I),P=m):Z("new/isolated scope",P,m,I)),k=k||m),y=m.name,!m.templateUrl&&m.controller&&(S=m.controller,A=A||gt(),Z("'"+y+"' controller",A[y],m,I),
+A[y]=m),(S=m.transclude)&&(j=!0,m.$$tlb||(Z("transclusion",L,m,I),L=m),"element"==S?(F=!0,_=m.priority,$=I,I=o.$$element=Mr(n.createComment(" "+y+": "+o[y]+" ")),r=I[0],et(u,W($),r),V=T($,a,_,q&&q.name,{nonTlbTranscludeDirective:L})):($=Mr(Et(r)).contents(),I.empty(),V=T($,a))),m.template)if(N=!0,Z("template",O,m,I),O=m,S=M(m.template)?m.template(I,o):m.template,S=ct(S),m.replace){if(q=m,$=Ct(S)?[]:hn(Q(m.templateNamespace,zr(S))),r=$[0],1!=$.length||r.nodeType!==Yr)throw Pi("tplrt","Template for directive '{0}' must have exactly one root element. {1}",y,"");et(u,I,r);var tt={$attr:{}},nt=R(r,[],tt),ut=t.splice(U+1,t.length-(U+1));P&&B(nt),t=t.concat(nt).concat(ut),Y(o,tt),H=t.length}else I.html(S);if(m.templateUrl)N=!0,Z("template",O,m,I),O=m,m.replace&&(q=m),g=G(t.splice(U,t.length-U),I,o,u,j&&V,c,f,{controllerDirectives:A,newScopeDirective:k!==m&&k,newIsolateScopeDirective:P,templateDirective:O,nonTlbTranscludeDirective:L}),H=t.length;else if(m.compile)try{x=m.compile(I,o,V),M(x)?p(null,x,X,J):x&&p(x.pre,x.post,X,J)}catch(st){i(st,K(I))}m.terminal&&(g.terminal=!0,_=Math.max(_,m.priority))}return g.scope=k&&k.scope===!0,g.transcludeOnThisElement=j,g.templateOnThisElement=N,g.transclude=V,h.hasElementTranscludeDirective=F,g}function B(t){for(var n=0,e=t.length;e>n;n++)t[n]=d(t[n],{$$isolateScope:!0})}function U(n,e,r,o,a,u,s){if(e===a)return null;var f=null;if(l.hasOwnProperty(e))for(var h,p=t.get(e+c),v=0,g=p.length;g>v;v++)try{h=p[v],($(o)||o>h.priority)&&-1!=h.restrict.indexOf(r)&&(u&&(h=d(h,{$$start:u,$$end:s})),n.push(h),f=h)}catch(m){i(m)}return f}function H(n){if(l.hasOwnProperty(n))for(var e,r=t.get(n+c),i=0,o=r.length;o>i;i++)if(e=r[i],e.multiElement)return!0;return!1}function Y(t,n){var e=n.$attr,r=t.$attr,i=t.$$element;o(t,function(r,i){"$"!=i.charAt(0)&&(n[i]&&n[i]!==r&&(r+=("style"===i?";":" ")+n[i]),t.$set(i,r,!0,e[i]))}),o(n,function(n,o){"class"==o?(O(i,n),t["class"]=(t["class"]?t["class"]+" ":"")+n):"style"==o?(i.attr("style",i.attr("style")+";"+n),t.style=(t.style?t.style+";":"")+n):"$"==o.charAt(0)||t.hasOwnProperty(o)||(t[o]=n,r[o]=e[o])})}function G(t,n,e,r,i,u,s,l){var c,f,h=[],p=n[0],v=t.shift(),g=d(v,{templateUrl:null,transclude:null,replace:null,$$originalDirective:v}),m=M(v.templateUrl)?v.templateUrl(n,e):v.templateUrl,y=v.templateNamespace;return n.empty(),a(m).then(function(a){var d,$,x,w;if(a=ct(a),v.replace){if(x=Ct(a)?[]:hn(Q(y,zr(a))),d=x[0],1!=x.length||d.nodeType!==Yr)throw Pi("tplrt","Template for directive '{0}' must have exactly one root element. {1}",v.name,m);$={$attr:{}},et(r,n,d);var C=R(d,[],$);b(v.scope)&&B(C),t=C.concat(t),Y(e,$)}else d=p,n.html(a);for(t.unshift(g),c=q(t,d,e,i,n,v,u,s,l),o(r,function(t,e){t==d&&(r[e]=n[0])}),f=j(n[0].childNodes,i);h.length;){var S=h.shift(),_=h.shift(),M=h.shift(),k=h.shift(),A=n[0];if(!S.$$destroyed){if(_!==p){var E=_.className;l.hasElementTranscludeDirective&&v.replace||(A=Et(d)),et(M,Mr(_),A),O(Mr(A),E)}w=c.transcludeOnThisElement?N(S,c.transclude,k):k,c(f,S,A,r,w,c)}}h=null}),function(t,n,e,r,i){var o=i;n.$$destroyed||(h?h.push(n,e,r,o):(c.transcludeOnThisElement&&(o=N(n,c.transclude,i)),c(f,n,e,r,o,c)))}}function X(t,n){var e=n.priority-t.priority;return 0!==e?e:t.name!==n.name?t.name<n.name?-1:1:t.index-n.index}function Z(t,n,e,r){function i(t){return t?" (module: "+t+")":""}if(n)throw Pi("multidir","Multiple directives [{0}{1}, {2}{3}] asking for {4} on: {5}",n.name,i(n.$$moduleName),e.name,i(e.$$moduleName),t,K(r))}function J(t,n){var e=r(n,!0);e&&t.push({priority:0,compile:function(t){var n=t.parent(),r=!!n.length;return r&&T.$$addBindingClass(n),function(t,n){var i=n.parent();r||T.$$addBindingClass(i),T.$$addBindingInfo(i,e.expressions),t.$watch(e,function(t){n[0].nodeValue=t})}}})}function Q(t,e){switch(t=xr(t||"html")){case"svg":case"math":var r=n.createElement("div");return r.innerHTML="<"+t+">"+e+"</"+t+">",r.childNodes[0].childNodes;default:return e}}function tt(t,n){if("srcdoc"==n)return k.HTML;var e=F(t);return"xlinkHref"==n||"form"==e&&"action"==n||"img"!=e&&("src"==n||"ngSrc"==n)?k.RESOURCE_URL:void 0}function nt(t,n,e,i,o){var a=tt(t,i);o=y[i]||o;var u=r(e,!0,a,o);if(u){if("multiple"===i&&"select"===F(t))throw Pi("selmulti","Binding to the 'multiple' attribute is not supported. Element: {0}",K(t));n.push({priority:100,compile:function(){return{pre:function(t,n,s){var l=s.$$observers||(s.$$observers=gt());if(S.test(i))throw Pi("nodomevents","Interpolations for HTML DOM event attributes are disallowed. Please use the ng- versions (such as ng-click instead of onclick) instead.");var c=s[i];c!==e&&(u=c&&r(c,!0,a,o),e=c),u&&(s[i]=u(t),(l[i]||(l[i]=[])).$$inter=!0,(s.$$observers&&s.$$observers[i].$$scope||t).$watch(u,function(t,n){"class"===i&&t!=n?s.$updateClass(t,n):s.$set(i,t)}))}}}})}}function et(t,e,r){var i,o,a=e[0],u=e.length,s=a.parentNode;if(t)for(i=0,o=t.length;o>i;i++)if(t[i]==a){t[i++]=r;for(var l=i,c=l+u-1,f=t.length;f>l;l++,c++)f>c?t[l]=t[c]:delete t[l];t.length-=u-1,t.context===a&&(t.context=r);break}s&&s.replaceChild(r,a);var h=n.createDocumentFragment();h.appendChild(a),Mr.hasData(a)&&(Mr(r).data(Mr(a).data()),kr?(Dr=!0,kr.cleanData([a])):delete Mr.cache[a[Mr.expando]]);for(var p=1,d=e.length;d>p;p++){var v=e[p];Mr(v).remove(),h.appendChild(v),delete e[p]}e[0]=r,e.length=1}function rt(t,n){return f(function(){return t.apply(null,arguments)},t,n)}function it(t,n,e,r,o,a){try{t(n,e,r,o,a)}catch(u){i(u,K(e))}}function ot(t,n,e,i,a,s){var l;o(i,function(i,o){var s,c,f,h,p=i.attrName,d=i.optional,g=i.mode;switch(g){case"@":d||br.call(n,p)||(e[o]=n[p]=void 0),n.$observe(p,function(t){C(t)&&(e[o]=t)}),n.$$observers[p].$$scope=t,C(n[p])&&(e[o]=r(n[p])(t));break;case"=":if(!br.call(n,p)){if(d)break;n[p]=void 0}if(d&&!n[p])break;c=u(n[p]),h=c.literal?V:function(t,n){return t===n||t!==t&&n!==n},f=c.assign||function(){throw s=e[o]=c(t),Pi("nonassign","Expression '{0}' used with directive '{1}' is non-assignable!",n[p],a.name)},s=e[o]=c(t);var m=function(n){return h(n,e[o])||(h(n,s)?f(t,n=e[o]):e[o]=n),s=n};m.$stateful=!0;var y;y=i.collection?t.$watchCollection(n[p],m):t.$watch(u(n[p],m),null,c.literal),l=l||[],l.push(y);break;case"&":if(c=n.hasOwnProperty(p)?u(n[p]):v,c===v&&d)break;e[o]=function(n){return c(t,n)}}});var c=l?function(){for(var t=0,n=l.length;n>t;++t)l[t]()}:v;return s&&c!==v?(s.$on("$destroy",c),v):c}var at=function(t,n){if(n){var e,r,i,o=Object.keys(n);for(e=0,r=o.length;r>e;e++)i=o[e],this[i]=n[i]}else this.$attr={};this.$$element=t};at.prototype={$normalize:cn,$addClass:function(t){t&&t.length>0&&A.addClass(this.$$element,t)},$removeClass:function(t){t&&t.length>0&&A.removeClass(this.$$element,t)},$updateClass:function(t,n){var e=fn(t,n);e&&e.length&&A.addClass(this.$$element,e);var r=fn(n,t);r&&r.length&&A.removeClass(this.$$element,r)},$set:function(t,n,e,r){var a,u=this.$$element[0],s=Wt(u,t),l=Ut(t),c=t;if(s?(this.$$element.prop(t,n),r=s):l&&(this[l]=n,c=l),this[t]=n,r?this.$attr[t]=r:(r=this.$attr[t],r||(this.$attr[t]=r=lt(t,"-"))),a=F(this.$$element),"a"===a&&"href"===t||"img"===a&&"src"===t)this[t]=n=P(n,"src"===t);else if("img"===a&&"srcset"===t){for(var f="",h=zr(n),p=/(\s+\d+x\s*,|\s+\d+w\s*,|\s+,|,\s+)/,d=/\s/.test(h)?p:/(,)/,v=h.split(d),g=Math.floor(v.length/2),m=0;g>m;m++){var y=2*m;f+=P(zr(v[y]),!0),f+=" "+zr(v[y+1])}var x=zr(v[2*m]).split(/\s/);f+=P(zr(x[0]),!0),2===x.length&&(f+=" "+zr(x[1])),this[t]=n=f}e!==!1&&(null===n||$(n)?this.$$element.removeAttr(r):this.$$element.attr(r,n));var b=this.$$observers;b&&o(b[c],function(t){try{t(n)}catch(e){i(e)}})},$observe:function(t,n){var e=this,r=e.$$observers||(e.$$observers=gt()),i=r[t]||(r[t]=[]);return i.push(n),m.$evalAsync(function(){i.$$inter||!e.hasOwnProperty(t)||$(e[t])||n(e[t])}),function(){I(i,n)}}};var ut=r.startSymbol(),st=r.endSymbol(),ct="{{"==ut||"}}"==st?g:function(t){return t.replace(/\{\{/g,ut).replace(/}}/g,st)},ht=/^ngAttr[A-Z]/;return T.$$addBindingInfo=_?function(t,n){var e=t.data("$binding")||[];Fr(n)?e=e.concat(n):e.push(n),t.data("$binding",e)}:v,T.$$addBindingClass=_?function(t){O(t,"ng-binding")}:v,T.$$addScopeInfo=_?function(t,n,e,r){var i=e?r?"$isolateScopeNoTemplate":"$isolateScope":"$scope";t.data(i,n)}:v,T.$$addScopeClass=_?function(t,n){O(t,n?"ng-isolate-scope":"ng-scope")}:v,T}]}function cn(t){return wt(t.replace(Oi,""))}function fn(t,n){var e="",r=t.split(/\s+/),i=n.split(/\s+/);t:for(var o=0;o<r.length;o++){for(var a=r[o],u=0;u<i.length;u++)if(a==i[u])continue t;e+=(e.length>0?" ":"")+a}return e}function hn(t){t=Mr(t);var n=t.length;if(1>=n)return t;for(;n--;){var e=t[n];e.nodeType===Zr&&Pr.call(t,n,1)}return t}function pn(t,n){if(n&&C(n))return n;if(C(t)){var e=Li.exec(t);if(e)return e[3]}}function dn(){var t={},n=!1;this.register=function(n,e){pt(n,"controller"),b(n)?f(t,n):t[n]=e},this.allowGlobals=function(){n=!0},this.$get=["$injector","$window",function(i,o){function a(t,n,e,i){if(!t||!b(t.$scope))throw r("$controller")("noscp","Cannot export controller '{0}' as '{1}'! No $scope object provided via `locals`.",i,n);t.$scope[n]=e}return function(r,u,s,l){var c,h,p,d;if(s=s===!0,l&&C(l)&&(d=l),C(r)){if(h=r.match(Li),!h)throw Ti("ctrlfmt","Badly formed controller string '{0}'. Must match `__name__ as __id__` or `__name__`.",r);p=h[1],d=d||h[3],r=t.hasOwnProperty(p)?t[p]:dt(u.$scope,p,!0)||(n?dt(o,p,!0):e),ht(r,p,!0)}if(s){var v=(Fr(r)?r[r.length-1]:r).prototype;c=Object.create(v||null),d&&a(u,d,c,p||r.name);var g;return g=f(function(){var t=i.invoke(r,c,u,p);return t!==c&&(b(t)||M(t))&&(c=t,d&&a(u,d,c,p||r.name)),c},{instance:c,identifier:d})}return c=i.instantiate(r,u,p),d&&a(u,d,c,p||r.name),c}}]}function vn(){this.$get=["$window",function(t){return Mr(t.document)}]}function gn(){this.$get=["$log",function(t){return function(n,e){t.error.apply(t,arguments)}}]}function mn(t){return b(t)?_(t)?t.toISOString():Y(t):t}function yn(){this.$get=function(){return function(t){if(!t)return"";var n=[];return a(t,function(t,e){null===t||$(t)||(Fr(t)?o(t,function(t,r){n.push(rt(e)+"="+rt(mn(t)))}):n.push(rt(e)+"="+rt(mn(t))))}),n.join("&")}}}function $n(){this.$get=function(){return function(t){function n(t,r,i){null===t||$(t)||(Fr(t)?o(t,function(t,e){n(t,r+"["+(b(t)?e:"")+"]")}):b(t)&&!_(t)?a(t,function(t,e){n(t,r+(i?"":"[")+e+(i?"":"]"))}):e.push(rt(r)+"="+rt(mn(t))))}if(!t)return"";var e=[];return n(t,"",!0),e.join("&")}}}function xn(t,n){if(C(t)){var e=t.replace(Ii,"").trim();if(e){var r=n("Content-Type");(r&&0===r.indexOf(Ni)||bn(e))&&(t=G(e))}}return t}function bn(t){var n=t.match(Di);return n&&Fi[n[0]].test(t)}function wn(t){function n(t,n){t&&(r[t]=r[t]?r[t]+", "+n:n)}var e,r=gt();return C(t)?o(t.split("\n"),function(t){e=t.indexOf(":"),n(xr(zr(t.substr(0,e))),zr(t.substr(e+1)))}):b(t)&&o(t,function(t,e){n(xr(e),zr(t))}),r}function Cn(t){var n;return function(e){if(n||(n=wn(t)),e){var r=n[xr(e)];return void 0===r&&(r=null),r}return n}}function Sn(t,n,e,r){return M(r)?r(t,n,e):(o(r,function(r){t=r(t,n,e)}),t)}function _n(t){return t>=200&&300>t}function Mn(){var t=this.defaults={transformResponse:[xn],transformRequest:[function(t){return!b(t)||P(t)||T(t)||O(t)?t:Y(t)}],headers:{common:{Accept:"application/json, text/plain, */*"},post:q(Ri),put:q(Ri),patch:q(Ri)},xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",paramSerializer:"$httpParamSerializer"},n=!1;this.useApplyAsync=function(t){return x(t)?(n=!!t,this):n};var i=!0;this.useLegacyPromiseExtensions=function(t){return x(t)?(i=!!t,this):i};var a=this.interceptors=[];this.$get=["$httpBackend","$$cookieReader","$cacheFactory","$rootScope","$q","$injector",function(u,s,l,c,h,p){function d(n){function a(t){var n=f({},t);return t.data?n.data=Sn(t.data,t.headers,t.status,l.transformResponse):n.data=t.data,_n(t.status)?n:h.reject(n)}function u(t,n){var e,r={};return o(t,function(t,i){M(t)?(e=t(n),null!=e&&(r[i]=e)):r[i]=t}),r}function s(n){var e,r,i,o=t.headers,a=f({},n.headers);o=f({},o.common,o[xr(n.method)]);t:for(e in o){r=xr(e);for(i in a)if(xr(i)===r)continue t;a[e]=o[e]}return u(a,q(n))}if(!Nr.isObject(n))throw r("$http")("badreq","Http request configuration must be an object. Received: {0}",n);var l=f({method:"get",transformRequest:t.transformRequest,transformResponse:t.transformResponse,paramSerializer:t.paramSerializer},n);l.headers=s(n),l.method=wr(l.method),l.paramSerializer=C(l.paramSerializer)?p.get(l.paramSerializer):l.paramSerializer;var c=function(n){var r=n.headers,i=Sn(n.data,Cn(r),e,n.transformRequest);return $(i)&&o(r,function(t,n){"content-type"===xr(n)&&delete r[n]}),$(n.withCredentials)&&!$(t.withCredentials)&&(n.withCredentials=t.withCredentials),m(n,i).then(a,a)},d=[c,e],v=h.when(l);for(o(S,function(t){(t.request||t.requestError)&&d.unshift(t.request,t.requestError),(t.response||t.responseError)&&d.push(t.response,t.responseError)});d.length;){var g=d.shift(),y=d.shift();v=v.then(g,y)}return i?(v.success=function(t){return ht(t,"fn"),v.then(function(n){t(n.data,n.status,n.headers,l)}),v},v.error=function(t){return ht(t,"fn"),v.then(null,function(n){t(n.data,n.status,n.headers,l)}),v}):(v.success=qi("success"),v.error=qi("error")),v}function v(t){o(arguments,function(t){d[t]=function(n,e){return d(f({},e||{},{method:t,url:n}))}})}function g(t){o(arguments,function(t){d[t]=function(n,e,r){return d(f({},r||{},{method:t,url:n,data:e}))}})}function m(r,i){function o(t,e,r,i){function o(){a(e,t,r,i)}p&&(_n(t)?p.put(S,[t,e,wn(r),i]):p.remove(S)),n?c.$applyAsync(o):(o(),c.$$phase||c.$apply())}function a(t,n,e,i){n=n>=-1?n:0,(_n(n)?g.resolve:g.reject)({data:t,status:n,headers:Cn(e),config:r,statusText:i})}function l(t){a(t.data,t.status,q(t.headers()),t.statusText)}function f(){var t=d.pendingRequests.indexOf(r);-1!==t&&d.pendingRequests.splice(t,1)}var p,v,g=h.defer(),m=g.promise,C=r.headers,S=y(r.url,r.paramSerializer(r.params));if(d.pendingRequests.push(r),m.then(f,f),!r.cache&&!t.cache||r.cache===!1||"GET"!==r.method&&"JSONP"!==r.method||(p=b(r.cache)?r.cache:b(t.cache)?t.cache:w),p&&(v=p.get(S),x(v)?j(v)?v.then(l,l):Fr(v)?a(v[1],v[0],q(v[2]),v[3]):a(v,200,{},"OK"):p.put(S,m)),$(v)){var _=ke(r.url)?s()[r.xsrfCookieName||t.xsrfCookieName]:e;_&&(C[r.xsrfHeaderName||t.xsrfHeaderName]=_),u(r.method,S,i,o,C,r.timeout,r.withCredentials,r.responseType)}return m}function y(t,n){return n.length>0&&(t+=(-1==t.indexOf("?")?"?":"&")+n),t}var w=l("$http");t.paramSerializer=C(t.paramSerializer)?p.get(t.paramSerializer):t.paramSerializer;var S=[];return o(a,function(t){S.unshift(C(t)?p.get(t):p.invoke(t))}),d.pendingRequests=[],v("get","delete","head","jsonp"),g("post","put","patch"),d.defaults=t,d}]}function kn(){this.$get=function(){return function(){return new t.XMLHttpRequest}}}function An(){this.$get=["$browser","$window","$document","$xhrFactory",function(t,n,e,r){return En(t,r,t.defer,n.angular.callbacks,e[0])}]}function En(t,n,e,r,i){function a(t,n,e){var o=i.createElement("script"),a=null;return o.type="text/javascript",o.src=t,o.async=!0,a=function(t){ri(o,"load",a),ri(o,"error",a),i.body.removeChild(o),o=null;var u=-1,s="unknown";t&&("load"!==t.type||r[n].called||(t={type:"error"}),s=t.type,u="error"===t.type?404:200),e&&e(u,s)},ei(o,"load",a),ei(o,"error",a),i.body.appendChild(o),a}return function(i,u,s,l,c,f,h,p){function d(){y&&y(),b&&b.abort()}function g(n,r,i,o,a){x(S)&&e.cancel(S),y=b=null,n(r,i,o,a),t.$$completeOutstandingRequest(v)}if(t.$$incOutstandingRequestCount(),u=u||t.url(),"jsonp"==xr(i)){var m="_"+(r.counter++).toString(36);r[m]=function(t){r[m].data=t,r[m].called=!0};var y=a(u.replace("JSON_CALLBACK","angular.callbacks."+m),m,function(t,n){g(l,t,r[m].data,"",n),r[m]=v})}else{var b=n(i,u);b.open(i,u,!0),o(c,function(t,n){x(t)&&b.setRequestHeader(n,t)}),b.onload=function(){var t=b.statusText||"",n="response"in b?b.response:b.responseText,e=1223===b.status?204:b.status;0===e&&(e=n?200:"file"==Me(u).protocol?404:0),g(l,e,n,b.getAllResponseHeaders(),t)};var w=function(){g(l,-1,null,null,"")};if(b.onerror=w,b.onabort=w,h&&(b.withCredentials=!0),p)try{b.responseType=p}catch(C){if("json"!==p)throw C}b.send($(s)?null:s)}if(f>0)var S=e(d,f);else j(f)&&f.then(d)}}function Pn(){var t="{{",n="}}";this.startSymbol=function(n){return n?(t=n,this):t},this.endSymbol=function(t){return t?(n=t,this):n},this.$get=["$parse","$exceptionHandler","$sce",function(e,r,i){function o(t){return"\\\\\\"+t}function a(e){return e.replace(h,t).replace(p,n)}function u(t){if(null==t)return"";switch(typeof t){case"string":break;case"number":t=""+t;break;default:t=Y(t)}return t}function s(o,s,h,p){function d(t){try{return t=A(t),p&&!x(t)?t:u(t)}catch(n){r(Vi.interr(o,n))}}p=!!p;for(var v,g,m,y=0,b=[],w=[],C=o.length,S=[],_=[];C>y;){if(-1==(v=o.indexOf(t,y))||-1==(g=o.indexOf(n,v+l))){y!==C&&S.push(a(o.substring(y)));break}y!==v&&S.push(a(o.substring(y,v))),m=o.substring(v+l,g),b.push(m),w.push(e(m,d)),y=g+c,_.push(S.length),S.push("")}if(h&&S.length>1&&Vi.throwNoconcat(o),!s||b.length){var k=function(t){for(var n=0,e=b.length;e>n;n++){if(p&&$(t[n]))return;S[_[n]]=t[n]}return S.join("")},A=function(t){return h?i.getTrusted(h,t):i.valueOf(t)};return f(function(t){var n=0,e=b.length,i=new Array(e);try{for(;e>n;n++)i[n]=w[n](t);return k(i)}catch(a){r(Vi.interr(o,a))}},{exp:o,expressions:b,$$watchDelegate:function(t,n){var e;return t.$watchGroup(w,function(r,i){var o=k(r);M(n)&&n.call(this,o,r!==i?e:o,t),e=o})}})}}var l=t.length,c=n.length,h=new RegExp(t.replace(/./g,o),"g"),p=new RegExp(n.replace(/./g,o),"g");return s.startSymbol=function(){return t},s.endSymbol=function(){return n},s}]}function On(){this.$get=["$rootScope","$window","$q","$$q",function(t,n,e,r){function i(i,a,u,s){var l=arguments.length>4,c=l?W(arguments,4):[],f=n.setInterval,h=n.clearInterval,p=0,d=x(s)&&!s,v=(d?r:e).defer(),g=v.promise;return u=x(u)?u:0,g.then(null,null,l?function(){i.apply(null,c)}:i),g.$$intervalId=f(function(){v.notify(p++),u>0&&p>=u&&(v.resolve(p),h(g.$$intervalId),delete o[g.$$intervalId]),d||t.$apply()},a),o[g.$$intervalId]=v,g}var o={};return i.cancel=function(t){return t&&t.$$intervalId in o?(o[t.$$intervalId].reject("canceled"),n.clearInterval(t.$$intervalId),delete o[t.$$intervalId],!0):!1},i}]}function Tn(t){for(var n=t.split("/"),e=n.length;e--;)n[e]=et(n[e]);return n.join("/")}function Ln(t,n){var e=Me(t);n.$$protocol=e.protocol,n.$$host=e.hostname,n.$$port=p(e.port)||Wi[e.protocol]||null}function jn(t,n){var e="/"!==t.charAt(0);e&&(t="/"+t);var r=Me(t);n.$$path=decodeURIComponent(e&&"/"===r.pathname.charAt(0)?r.pathname.substring(1):r.pathname),n.$$search=tt(r.search),n.$$hash=decodeURIComponent(r.hash),n.$$path&&"/"!=n.$$path.charAt(0)&&(n.$$path="/"+n.$$path)}function Nn(t,n){return 0===n.indexOf(t)?n.substr(t.length):void 0}function Rn(t){var n=t.indexOf("#");return-1==n?t:t.substr(0,n)}function Dn(t){return t.replace(/(#.+)|#$/,"$1")}function Fn(t){return t.substr(0,Rn(t).lastIndexOf("/")+1)}function In(t){return t.substring(0,t.indexOf("/",t.indexOf("//")+2))}function zn(t,n,e){this.$$html5=!0,e=e||"",Ln(t,this),this.$$parse=function(t){var e=Nn(n,t);if(!C(e))throw Ui("ipthprfx",'Invalid url "{0}", missing path prefix "{1}".',t,n);jn(e,this),this.$$path||(this.$$path="/"),this.$$compose()},this.$$compose=function(){var t=nt(this.$$search),e=this.$$hash?"#"+et(this.$$hash):"";this.$$url=Tn(this.$$path)+(t?"?"+t:"")+e,this.$$absUrl=n+this.$$url.substr(1)},this.$$parseLinkUrl=function(r,i){if(i&&"#"===i[0])return this.hash(i.slice(1)),!0;var o,a,u;return x(o=Nn(t,r))?(a=o,u=x(o=Nn(e,o))?n+(Nn("/",o)||o):t+a):x(o=Nn(n,r))?u=n+o:n==r+"/"&&(u=n),u&&this.$$parse(u),!!u}}function qn(t,n,e){Ln(t,this),this.$$parse=function(r){function i(t,n,e){var r,i=/^\/[A-Z]:(\/.*)/;return 0===n.indexOf(e)&&(n=n.replace(e,"")),i.exec(n)?t:(r=i.exec(t),r?r[1]:t)}var o,a=Nn(t,r)||Nn(n,r);$(a)||"#"!==a.charAt(0)?this.$$html5?o=a:(o="",$(a)&&(t=r,this.replace())):(o=Nn(e,a),$(o)&&(o=a)),jn(o,this),this.$$path=i(this.$$path,o,t),this.$$compose()},this.$$compose=function(){var n=nt(this.$$search),r=this.$$hash?"#"+et(this.$$hash):"";this.$$url=Tn(this.$$path)+(n?"?"+n:"")+r,this.$$absUrl=t+(this.$$url?e+this.$$url:"")},this.$$parseLinkUrl=function(n,e){return Rn(t)==Rn(n)?(this.$$parse(n),!0):!1}}function Vn(t,n,e){this.$$html5=!0,qn.apply(this,arguments),this.$$parseLinkUrl=function(r,i){if(i&&"#"===i[0])return this.hash(i.slice(1)),!0;var o,a;return t==Rn(r)?o=r:(a=Nn(n,r))?o=t+e+a:n===r+"/"&&(o=n),o&&this.$$parse(o),!!o},this.$$compose=function(){var n=nt(this.$$search),r=this.$$hash?"#"+et(this.$$hash):"";this.$$url=Tn(this.$$path)+(n?"?"+n:"")+r,this.$$absUrl=t+e+this.$$url}}function Bn(t){return function(){return this[t]}}function Wn(t,n){return function(e){return $(e)?this[t]:(this[t]=n(e),this.$$compose(),this)}}function Un(){var t="",n={enabled:!1,requireBase:!0,rewriteLinks:!0};this.hashPrefix=function(n){return x(n)?(t=n,this):t},this.html5Mode=function(t){return L(t)?(n.enabled=t,this):b(t)?(L(t.enabled)&&(n.enabled=t.enabled),L(t.requireBase)&&(n.requireBase=t.requireBase),L(t.rewriteLinks)&&(n.rewriteLinks=t.rewriteLinks),this):n},this.$get=["$rootScope","$browser","$sniffer","$rootElement","$window",function(e,r,i,o,a){function u(t,n,e){var i=l.url(),o=l.$$state;try{r.url(t,n,e),l.$$state=r.state()}catch(a){throw l.url(i),l.$$state=o,a}}function s(t,n){e.$broadcast("$locationChangeSuccess",l.absUrl(),t,l.$$state,n)}var l,c,f,h=r.baseHref(),p=r.url();if(n.enabled){if(!h&&n.requireBase)throw Ui("nobase","$location in HTML5 mode requires a <base> tag to be present!");f=In(p)+(h||"/"),c=i.history?zn:Vn}else f=Rn(p),c=qn;var d=Fn(f);l=new c(f,d,"#"+t),l.$$parseLinkUrl(p,p),l.$$state=r.state();var v=/^\s*(javascript|mailto):/i;o.on("click",function(t){if(n.rewriteLinks&&!t.ctrlKey&&!t.metaKey&&!t.shiftKey&&2!=t.which&&2!=t.button){for(var i=Mr(t.target);"a"!==F(i[0]);)if(i[0]===o[0]||!(i=i.parent())[0])return;var u=i.prop("href"),s=i.attr("href")||i.attr("xlink:href");b(u)&&"[object SVGAnimatedString]"===u.toString()&&(u=Me(u.animVal).href),v.test(u)||!u||i.attr("target")||t.isDefaultPrevented()||l.$$parseLinkUrl(u,s)&&(t.preventDefault(),l.absUrl()!=r.url()&&(e.$apply(),a.angular["ff-684208-preventDefault"]=!0))}}),Dn(l.absUrl())!=Dn(p)&&r.url(l.absUrl(),!0);var g=!0;return r.onUrlChange(function(t,n){return $(Nn(d,t))?void(a.location.href=t):(e.$evalAsync(function(){var r,i=l.absUrl(),o=l.$$state;l.$$parse(t),l.$$state=n,r=e.$broadcast("$locationChangeStart",t,i,n,o).defaultPrevented,l.absUrl()===t&&(r?(l.$$parse(i),l.$$state=o,u(i,!1,o)):(g=!1,s(i,o)))}),void(e.$$phase||e.$digest()))}),e.$watch(function(){var t=Dn(r.url()),n=Dn(l.absUrl()),o=r.state(),a=l.$$replace,c=t!==n||l.$$html5&&i.history&&o!==l.$$state;(g||c)&&(g=!1,e.$evalAsync(function(){var n=l.absUrl(),r=e.$broadcast("$locationChangeStart",n,t,l.$$state,o).defaultPrevented;l.absUrl()===n&&(r?(l.$$parse(t),l.$$state=o):(c&&u(n,a,o===l.$$state?null:l.$$state),s(t,o)))})),l.$$replace=!1}),l}]}function Hn(){var t=!0,n=this;this.debugEnabled=function(n){return x(n)?(t=n,this):t},this.$get=["$window",function(e){function r(t){return t instanceof Error&&(t.stack?t=t.message&&-1===t.stack.indexOf(t.message)?"Error: "+t.message+"\n"+t.stack:t.stack:t.sourceURL&&(t=t.message+"\n"+t.sourceURL+":"+t.line)),t}function i(t){var n=e.console||{},i=n[t]||n.log||v,a=!1;try{a=!!i.apply}catch(u){}return a?function(){var t=[];return o(arguments,function(n){t.push(r(n))}),i.apply(n,t)}:function(t,n){i(t,null==n?"":n)}}return{log:i("log"),info:i("info"),warn:i("warn"),error:i("error"),debug:function(){var e=i("debug");return function(){t&&e.apply(n,arguments)}}()}}]}function Yn(t,n){if("__defineGetter__"===t||"__defineSetter__"===t||"__lookupGetter__"===t||"__lookupSetter__"===t||"__proto__"===t)throw Yi("isecfld","Attempting to access a disallowed field in Angular expressions! Expression: {0}",n);return t}function Gn(t,n){if(t+="",!C(t))throw Yi("iseccst","Cannot convert object to primitive value! Expression: {0}",n);return t}function Xn(t,n){if(t){if(t.constructor===t)throw Yi("isecfn","Referencing Function in Angular expressions is disallowed! Expression: {0}",n);if(t.window===t)throw Yi("isecwindow","Referencing the Window in Angular expressions is disallowed! Expression: {0}",n);if(t.children&&(t.nodeName||t.prop&&t.attr&&t.find))throw Yi("isecdom","Referencing DOM nodes in Angular expressions is disallowed! Expression: {0}",n);if(t===Object)throw Yi("isecobj","Referencing Object in Angular expressions is disallowed! Expression: {0}",n)}return t}function Zn(t,n){if(t){if(t.constructor===t)throw Yi("isecfn","Referencing Function in Angular expressions is disallowed! Expression: {0}",n);if(t===Gi||t===Xi||t===Zi)throw Yi("isecff","Referencing call, apply or bind in Angular expressions is disallowed! Expression: {0}",n)}}function Jn(t,n){if(t&&(t===0..constructor||t===(!1).constructor||t==="".constructor||t==={}.constructor||t===[].constructor||t===Function.constructor))throw Yi("isecaf","Assigning to a constructor is disallowed! Expression: {0}",n)}function Kn(t,n){return"undefined"!=typeof t?t:n}function Qn(t,n){return"undefined"==typeof t?n:"undefined"==typeof n?t:t+n}function te(t,n){var e=t(n);return!e.$stateful}function ne(t,n){var e,r;switch(t.type){case to.Program:e=!0,o(t.body,function(t){ne(t.expression,n),e=e&&t.expression.constant}),t.constant=e;break;case to.Literal:t.constant=!0,t.toWatch=[];break;case to.UnaryExpression:ne(t.argument,n),t.constant=t.argument.constant,t.toWatch=t.argument.toWatch;break;case to.BinaryExpression:ne(t.left,n),ne(t.right,n),t.constant=t.left.constant&&t.right.constant,t.toWatch=t.left.toWatch.concat(t.right.toWatch);break;case to.LogicalExpression:ne(t.left,n),ne(t.right,n),t.constant=t.left.constant&&t.right.constant,t.toWatch=t.constant?[]:[t];break;case to.ConditionalExpression:ne(t.test,n),ne(t.alternate,n),ne(t.consequent,n),t.constant=t.test.constant&&t.alternate.constant&&t.consequent.constant,t.toWatch=t.constant?[]:[t];break;case to.Identifier:t.constant=!1,t.toWatch=[t];break;case to.MemberExpression:ne(t.object,n),t.computed&&ne(t.property,n),t.constant=t.object.constant&&(!t.computed||t.property.constant),t.toWatch=[t];break;case to.CallExpression:e=t.filter?te(n,t.callee.name):!1,r=[],o(t.arguments,function(t){ne(t,n),e=e&&t.constant,t.constant||r.push.apply(r,t.toWatch)}),t.constant=e,t.toWatch=t.filter&&te(n,t.callee.name)?r:[t];break;case to.AssignmentExpression:ne(t.left,n),ne(t.right,n),t.constant=t.left.constant&&t.right.constant,t.toWatch=[t];break;case to.ArrayExpression:e=!0,r=[],o(t.elements,function(t){ne(t,n),e=e&&t.constant,t.constant||r.push.apply(r,t.toWatch)}),t.constant=e,t.toWatch=r;break;case to.ObjectExpression:e=!0,r=[],o(t.properties,function(t){ne(t.value,n),e=e&&t.value.constant,t.value.constant||r.push.apply(r,t.value.toWatch)}),t.constant=e,t.toWatch=r;break;case to.ThisExpression:t.constant=!1,t.toWatch=[]}}function ee(t){if(1==t.length){var n=t[0].expression,r=n.toWatch;return 1!==r.length?r:r[0]!==n?r:e}}function re(t){return t.type===to.Identifier||t.type===to.MemberExpression}function ie(t){return 1===t.body.length&&re(t.body[0].expression)?{type:to.AssignmentExpression,left:t.body[0].expression,right:{type:to.NGValueParameter},operator:"="}:void 0}function oe(t){return 0===t.body.length||1===t.body.length&&(t.body[0].expression.type===to.Literal||t.body[0].expression.type===to.ArrayExpression||t.body[0].expression.type===to.ObjectExpression)}function ae(t){return t.constant}function ue(t,n){this.astBuilder=t,this.$filter=n}function se(t,n){this.astBuilder=t,this.$filter=n}function le(t){return"constructor"==t}function ce(t){return M(t.valueOf)?t.valueOf():eo.call(t)}function fe(){var t=gt(),n=gt();this.$get=["$filter",function(r){function i(t,n){return null==t||null==n?t===n:"object"==typeof t&&(t=ce(t),"object"==typeof t)?!1:t===n||t!==t&&n!==n}function a(t,n,r,o,a){var u,s=o.inputs;if(1===s.length){var l=i;return s=s[0],t.$watch(function(t){var n=s(t);return i(n,l)||(u=o(t,e,e,[n]),l=n&&ce(n)),u},n,r,a)}for(var c=[],f=[],h=0,p=s.length;p>h;h++)c[h]=i,f[h]=null;return t.$watch(function(t){for(var n=!1,r=0,a=s.length;a>r;r++){var l=s[r](t);(n||(n=!i(l,c[r])))&&(f[r]=l,c[r]=l&&ce(l))}return n&&(u=o(t,e,e,f)),u},n,r,a)}function u(t,n,e,r){var i,o;return i=t.$watch(function(t){return r(t)},function(t,e,r){o=t,M(n)&&n.apply(this,arguments),x(t)&&r.$$postDigest(function(){x(o)&&i()})},e)}function s(t,n,e,r){function i(t){var n=!0;return o(t,function(t){x(t)||(n=!1)}),n}var a,u;return a=t.$watch(function(t){return r(t)},function(t,e,r){u=t,M(n)&&n.call(this,t,e,r),i(t)&&r.$$postDigest(function(){i(u)&&a()})},e)}function l(t,n,e,r){var i;return i=t.$watch(function(t){return r(t)},function(t,e,r){M(n)&&n.apply(this,arguments),i()},e)}function c(t,n){if(!n)return t;var e=t.$$watchDelegate,r=e!==s&&e!==u,i=r?function(e,r,i,o){var a=t(e,r,i,o);return n(a,e,r)}:function(e,r,i,o){var a=t(e,r,i,o),u=n(a,e,r);return x(a)?u:a};return t.$$watchDelegate&&t.$$watchDelegate!==a?i.$$watchDelegate=t.$$watchDelegate:n.$stateful||(i.$$watchDelegate=a,i.inputs=t.inputs?t.inputs:[t]),i}var f=Vr().noUnsafeEval,h={csp:f,expensiveChecks:!1},p={csp:f,expensiveChecks:!0};return function(e,i,o){var f,d,g;switch(typeof e){case"string":e=e.trim(),g=e;var m=o?n:t;if(f=m[g],!f){":"===e.charAt(0)&&":"===e.charAt(1)&&(d=!0,e=e.substring(2));var y=o?p:h,$=new Qi(y),x=new no($,r,y);f=x.parse(e),f.constant?f.$$watchDelegate=l:d?f.$$watchDelegate=f.literal?s:u:f.inputs&&(f.$$watchDelegate=a),m[g]=f}return c(f,i);case"function":return c(e,i);default:return v}}}]}function he(){this.$get=["$rootScope","$exceptionHandler",function(t,n){return de(function(n){t.$evalAsync(n)},n)}]}function pe(){this.$get=["$browser","$exceptionHandler",function(t,n){return de(function(n){t.defer(n)},n)}]}function de(t,n){function i(t,n,e){function r(n){return function(e){i||(i=!0,n.call(t,e))}}var i=!1;return[r(n),r(e)]}function a(){this.$$state={status:0}}function u(t,n){return function(e){n.call(t,e)}}function s(t){var r,i,o;o=t.pending,t.processScheduled=!1,t.pending=e;for(var a=0,u=o.length;u>a;++a){i=o[a][0],r=o[a][t.status];try{M(r)?i.resolve(r(t.value)):1===t.status?i.resolve(t.value):i.reject(t.value)}catch(s){i.reject(s),n(s)}}}function l(n){!n.processScheduled&&n.pending&&(n.processScheduled=!0,t(function(){s(n)}))}function c(){this.promise=new a,this.resolve=u(this,this.resolve),this.reject=u(this,this.reject),this.notify=u(this,this.notify)}function h(t){var n=new c,e=0,r=Fr(t)?[]:{};return o(t,function(t,i){e++,y(t).then(function(t){r.hasOwnProperty(i)||(r[i]=t,--e||n.resolve(r))},function(t){r.hasOwnProperty(i)||n.reject(t)})}),0===e&&n.resolve(r),n.promise}var p=r("$q",TypeError),d=function(){return new c};f(a.prototype,{then:function(t,n,e){if($(t)&&$(n)&&$(e))return this;var r=new c;return this.$$state.pending=this.$$state.pending||[],this.$$state.pending.push([r,t,n,e]),this.$$state.status>0&&l(this.$$state),r.promise},"catch":function(t){return this.then(null,t)},"finally":function(t,n){return this.then(function(n){return m(n,!0,t)},function(n){return m(n,!1,t)},n)}}),f(c.prototype,{resolve:function(t){this.promise.$$state.status||(t===this.promise?this.$$reject(p("qcycle","Expected promise to be resolved with value other than itself '{0}'",t)):this.$$resolve(t))},$$resolve:function(t){var e,r;r=i(this,this.$$resolve,this.$$reject);try{(b(t)||M(t))&&(e=t&&t.then),M(e)?(this.promise.$$state.status=-1,e.call(t,r[0],r[1],this.notify)):(this.promise.$$state.value=t,this.promise.$$state.status=1,l(this.promise.$$state))}catch(o){r[1](o),n(o)}},reject:function(t){this.promise.$$state.status||this.$$reject(t)},$$reject:function(t){this.promise.$$state.value=t,this.promise.$$state.status=2,l(this.promise.$$state)},notify:function(e){var r=this.promise.$$state.pending;this.promise.$$state.status<=0&&r&&r.length&&t(function(){for(var t,i,o=0,a=r.length;a>o;o++){i=r[o][0],t=r[o][3];try{i.notify(M(t)?t(e):e)}catch(u){n(u)}}})}});var v=function(t){var n=new c;return n.reject(t),n.promise},g=function(t,n){var e=new c;return n?e.resolve(t):e.reject(t),e.promise},m=function(t,n,e){
+var r=null;try{M(e)&&(r=e())}catch(i){return g(i,!1)}return j(r)?r.then(function(){return g(t,n)},function(t){return g(t,!1)}):g(t,n)},y=function(t,n,e,r){var i=new c;return i.resolve(t),i.promise.then(n,e,r)},x=y,w=function C(t){function n(t){r.resolve(t)}function e(t){r.reject(t)}if(!M(t))throw p("norslvr","Expected resolverFn, got '{0}'",t);if(!(this instanceof C))return new C(t);var r=new c;return t(n,e),r.promise};return w.defer=d,w.reject=v,w.when=y,w.resolve=x,w.all=h,w}function ve(){this.$get=["$window","$timeout",function(t,n){var e=t.requestAnimationFrame||t.webkitRequestAnimationFrame,r=t.cancelAnimationFrame||t.webkitCancelAnimationFrame||t.webkitCancelRequestAnimationFrame,i=!!e,o=i?function(t){var n=e(t);return function(){r(n)}}:function(t){var e=n(t,16.66,!1);return function(){n.cancel(e)}};return o.supported=i,o}]}function ge(){function t(t){function n(){this.$$watchers=this.$$nextSibling=this.$$childHead=this.$$childTail=null,this.$$listeners={},this.$$listenerCount={},this.$$watchersCount=0,this.$id=s(),this.$$ChildScope=null}return n.prototype=t,n}var n=10,e=r("$rootScope"),a=null,u=null;this.digestTtl=function(t){return arguments.length&&(n=t),n},this.$get=["$injector","$exceptionHandler","$parse","$browser",function(r,l,c,f){function h(t){t.currentScope.$$destroyed=!0}function p(){this.$id=s(),this.$$phase=this.$parent=this.$$watchers=this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=null,this.$root=this,this.$$destroyed=!1,this.$$listeners={},this.$$listenerCount={},this.$$watchersCount=0,this.$$isolateBindings=null}function d(t){if(S.$$phase)throw e("inprog","{0} already in progress",S.$$phase);S.$$phase=t}function g(){S.$$phase=null}function m(t,n){do t.$$watchersCount+=n;while(t=t.$parent)}function y(t,n,e){do t.$$listenerCount[e]-=n,0===t.$$listenerCount[e]&&delete t.$$listenerCount[e];while(t=t.$parent)}function x(){}function w(){for(;A.length;)try{A.shift()()}catch(t){l(t)}u=null}function C(){null===u&&(u=f.defer(function(){S.$apply(w)}))}p.prototype={constructor:p,$new:function(n,e){var r;return e=e||this,n?(r=new p,r.$root=this.$root):(this.$$ChildScope||(this.$$ChildScope=t(this)),r=new this.$$ChildScope),r.$parent=e,r.$$prevSibling=e.$$childTail,e.$$childHead?(e.$$childTail.$$nextSibling=r,e.$$childTail=r):e.$$childHead=e.$$childTail=r,(n||e!=this)&&r.$on("$destroy",h),r},$watch:function(t,n,e,r){var i=c(t);if(i.$$watchDelegate)return i.$$watchDelegate(this,n,e,i,t);var o=this,u=o.$$watchers,s={fn:n,last:x,get:i,exp:r||t,eq:!!e};return a=null,M(n)||(s.fn=v),u||(u=o.$$watchers=[]),u.unshift(s),m(this,1),function(){I(u,s)>=0&&m(o,-1),a=null}},$watchGroup:function(t,n){function e(){s=!1,l?(l=!1,n(i,i,u)):n(i,r,u)}var r=new Array(t.length),i=new Array(t.length),a=[],u=this,s=!1,l=!0;if(!t.length){var c=!0;return u.$evalAsync(function(){c&&n(i,i,u)}),function(){c=!1}}return 1===t.length?this.$watch(t[0],function(t,e,o){i[0]=t,r[0]=e,n(i,t===e?i:r,o)}):(o(t,function(t,n){var o=u.$watch(t,function(t,o){i[n]=t,r[n]=o,s||(s=!0,u.$evalAsync(e))});a.push(o)}),function(){for(;a.length;)a.shift()()})},$watchCollection:function(t,n){function e(t){o=t;var n,e,r,u,s;if(!$(o)){if(b(o))if(i(o)){a!==p&&(a=p,g=a.length=0,f++),n=o.length,g!==n&&(f++,a.length=g=n);for(var l=0;n>l;l++)s=a[l],u=o[l],r=s!==s&&u!==u,r||s===u||(f++,a[l]=u)}else{a!==d&&(a=d={},g=0,f++),n=0;for(e in o)br.call(o,e)&&(n++,u=o[e],s=a[e],e in a?(r=s!==s&&u!==u,r||s===u||(f++,a[e]=u)):(g++,a[e]=u,f++));if(g>n){f++;for(e in a)br.call(o,e)||(g--,delete a[e])}}else a!==o&&(a=o,f++);return f}}function r(){if(v?(v=!1,n(o,o,s)):n(o,u,s),l)if(b(o))if(i(o)){u=new Array(o.length);for(var t=0;t<o.length;t++)u[t]=o[t]}else{u={};for(var e in o)br.call(o,e)&&(u[e]=o[e])}else u=o}e.$stateful=!0;var o,a,u,s=this,l=n.length>1,f=0,h=c(t,e),p=[],d={},v=!0,g=0;return this.$watch(h,r)},$digest:function(){var t,r,i,o,s,c,h,p,v,m,y=n,$=this,b=[];d("$digest"),f.$$checkUrlChange(),this===S&&null!==u&&(f.defer.cancel(u),w()),a=null;do{for(c=!1,p=$;_.length;){try{m=_.shift(),m.scope.$eval(m.expression,m.locals)}catch(C){l(C)}a=null}t:do{if(o=p.$$watchers)for(s=o.length;s--;)try{if(t=o[s])if((r=t.get(p))===(i=t.last)||(t.eq?V(r,i):"number"==typeof r&&"number"==typeof i&&isNaN(r)&&isNaN(i))){if(t===a){c=!1;break t}}else c=!0,a=t,t.last=t.eq?z(r,null):r,t.fn(r,i===x?r:i,p),5>y&&(v=4-y,b[v]||(b[v]=[]),b[v].push({msg:M(t.exp)?"fn: "+(t.exp.name||t.exp.toString()):t.exp,newVal:r,oldVal:i}))}catch(C){l(C)}if(!(h=p.$$watchersCount&&p.$$childHead||p!==$&&p.$$nextSibling))for(;p!==$&&!(h=p.$$nextSibling);)p=p.$parent}while(p=h);if((c||_.length)&&!y--)throw g(),e("infdig","{0} $digest() iterations reached. Aborting!\nWatchers fired in the last 5 iterations: {1}",n,b)}while(c||_.length);for(g();k.length;)try{k.shift()()}catch(C){l(C)}},$destroy:function(){if(!this.$$destroyed){var t=this.$parent;this.$broadcast("$destroy"),this.$$destroyed=!0,this===S&&f.$$applicationDestroyed(),m(this,-this.$$watchersCount);for(var n in this.$$listenerCount)y(this,this.$$listenerCount[n],n);t&&t.$$childHead==this&&(t.$$childHead=this.$$nextSibling),t&&t.$$childTail==this&&(t.$$childTail=this.$$prevSibling),this.$$prevSibling&&(this.$$prevSibling.$$nextSibling=this.$$nextSibling),this.$$nextSibling&&(this.$$nextSibling.$$prevSibling=this.$$prevSibling),this.$destroy=this.$digest=this.$apply=this.$evalAsync=this.$applyAsync=v,this.$on=this.$watch=this.$watchGroup=function(){return v},this.$$listeners={},this.$parent=this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=this.$root=this.$$watchers=null}},$eval:function(t,n){return c(t)(this,n)},$evalAsync:function(t,n){S.$$phase||_.length||f.defer(function(){_.length&&S.$digest()}),_.push({scope:this,expression:t,locals:n})},$$postDigest:function(t){k.push(t)},$apply:function(t){try{d("$apply");try{return this.$eval(t)}finally{g()}}catch(n){l(n)}finally{try{S.$digest()}catch(n){throw l(n),n}}},$applyAsync:function(t){function n(){e.$eval(t)}var e=this;t&&A.push(n),C()},$on:function(t,n){var e=this.$$listeners[t];e||(this.$$listeners[t]=e=[]),e.push(n);var r=this;do r.$$listenerCount[t]||(r.$$listenerCount[t]=0),r.$$listenerCount[t]++;while(r=r.$parent);var i=this;return function(){var r=e.indexOf(n);-1!==r&&(e[r]=null,y(i,1,t))}},$emit:function(t,n){var e,r,i,o=[],a=this,u=!1,s={name:t,targetScope:a,stopPropagation:function(){u=!0},preventDefault:function(){s.defaultPrevented=!0},defaultPrevented:!1},c=B([s],arguments,1);do{for(e=a.$$listeners[t]||o,s.currentScope=a,r=0,i=e.length;i>r;r++)if(e[r])try{e[r].apply(null,c)}catch(f){l(f)}else e.splice(r,1),r--,i--;if(u)return s.currentScope=null,s;a=a.$parent}while(a);return s.currentScope=null,s},$broadcast:function(t,n){var e=this,r=e,i=e,o={name:t,targetScope:e,preventDefault:function(){o.defaultPrevented=!0},defaultPrevented:!1};if(!e.$$listenerCount[t])return o;for(var a,u,s,c=B([o],arguments,1);r=i;){for(o.currentScope=r,a=r.$$listeners[t]||[],u=0,s=a.length;s>u;u++)if(a[u])try{a[u].apply(null,c)}catch(f){l(f)}else a.splice(u,1),u--,s--;if(!(i=r.$$listenerCount[t]&&r.$$childHead||r!==e&&r.$$nextSibling))for(;r!==e&&!(i=r.$$nextSibling);)r=r.$parent}return o.currentScope=null,o}};var S=new p,_=S.$$asyncQueue=[],k=S.$$postDigestQueue=[],A=S.$$applyAsyncQueue=[];return S}]}function me(){var t=/^\s*(https?|ftp|mailto|tel|file):/,n=/^\s*((https?|ftp|file|blob):|data:image\/)/;this.aHrefSanitizationWhitelist=function(n){return x(n)?(t=n,this):t},this.imgSrcSanitizationWhitelist=function(t){return x(t)?(n=t,this):n},this.$get=function(){return function(e,r){var i,o=r?n:t;return i=Me(e).href,""===i||i.match(o)?e:"unsafe:"+i}}}function ye(t){if("self"===t)return t;if(C(t)){if(t.indexOf("***")>-1)throw ro("iwcard","Illegal sequence *** in string matcher. String: {0}",t);return t=qr(t).replace("\\*\\*",".*").replace("\\*","[^:/.?&;]*"),new RegExp("^"+t+"$")}if(k(t))return new RegExp("^"+t.source+"$");throw ro("imatcher",'Matchers may only be "self", string patterns or RegExp objects')}function $e(t){var n=[];return x(t)&&o(t,function(t){n.push(ye(t))}),n}function xe(){this.SCE_CONTEXTS=io;var t=["self"],n=[];this.resourceUrlWhitelist=function(n){return arguments.length&&(t=$e(n)),t},this.resourceUrlBlacklist=function(t){return arguments.length&&(n=$e(t)),n},this.$get=["$injector",function(e){function r(t,n){return"self"===t?ke(n):!!t.exec(n.href)}function i(e){var i,o,a=Me(e.toString()),u=!1;for(i=0,o=t.length;o>i;i++)if(r(t[i],a)){u=!0;break}if(u)for(i=0,o=n.length;o>i;i++)if(r(n[i],a)){u=!1;break}return u}function o(t){var n=function(t){this.$$unwrapTrustedValue=function(){return t}};return t&&(n.prototype=new t),n.prototype.valueOf=function(){return this.$$unwrapTrustedValue()},n.prototype.toString=function(){return this.$$unwrapTrustedValue().toString()},n}function a(t,n){var e=f.hasOwnProperty(t)?f[t]:null;if(!e)throw ro("icontext","Attempted to trust a value in invalid context. Context: {0}; Value: {1}",t,n);if(null===n||$(n)||""===n)return n;if("string"!=typeof n)throw ro("itype","Attempted to trust a non-string value in a content requiring a string: Context: {0}",t);return new e(n)}function u(t){return t instanceof c?t.$$unwrapTrustedValue():t}function s(t,n){if(null===n||$(n)||""===n)return n;var e=f.hasOwnProperty(t)?f[t]:null;if(e&&n instanceof e)return n.$$unwrapTrustedValue();if(t===io.RESOURCE_URL){if(i(n))return n;throw ro("insecurl","Blocked loading resource from url not allowed by $sceDelegate policy. URL: {0}",n.toString())}if(t===io.HTML)return l(n);throw ro("unsafe","Attempting to use an unsafe value in a safe context.")}var l=function(t){throw ro("unsafe","Attempting to use an unsafe value in a safe context.")};e.has("$sanitize")&&(l=e.get("$sanitize"));var c=o(),f={};return f[io.HTML]=o(c),f[io.CSS]=o(c),f[io.URL]=o(c),f[io.JS]=o(c),f[io.RESOURCE_URL]=o(f[io.URL]),{trustAs:a,getTrusted:s,valueOf:u}}]}function be(){var t=!0;this.enabled=function(n){return arguments.length&&(t=!!n),t},this.$get=["$parse","$sceDelegate",function(n,e){if(t&&8>_r)throw ro("iequirks","Strict Contextual Escaping does not support Internet Explorer version < 11 in quirks mode. You can fix this by adding the text <!doctype html> to the top of your HTML document. See http://docs.angularjs.org/api/ng.$sce for more information.");var r=q(io);r.isEnabled=function(){return t},r.trustAs=e.trustAs,r.getTrusted=e.getTrusted,r.valueOf=e.valueOf,t||(r.trustAs=r.getTrusted=function(t,n){return n},r.valueOf=g),r.parseAs=function(t,e){var i=n(e);return i.literal&&i.constant?i:n(e,function(n){return r.getTrusted(t,n)})};var i=r.parseAs,a=r.getTrusted,u=r.trustAs;return o(io,function(t,n){var e=xr(n);r[wt("parse_as_"+e)]=function(n){return i(t,n)},r[wt("get_trusted_"+e)]=function(n){return a(t,n)},r[wt("trust_as_"+e)]=function(n){return u(t,n)}}),r}]}function we(){this.$get=["$window","$document",function(t,n){var e,r,i={},o=p((/android (\d+)/.exec(xr((t.navigator||{}).userAgent))||[])[1]),a=/Boxee/i.test((t.navigator||{}).userAgent),u=n[0]||{},s=/^(Moz|webkit|ms)(?=[A-Z])/,l=u.body&&u.body.style,c=!1,f=!1;if(l){for(var h in l)if(r=s.exec(h)){e=r[0],e=e.substr(0,1).toUpperCase()+e.substr(1);break}e||(e="WebkitOpacity"in l&&"webkit"),c=!!("transition"in l||e+"Transition"in l),f=!!("animation"in l||e+"Animation"in l),!o||c&&f||(c=C(l.webkitTransition),f=C(l.webkitAnimation))}return{history:!(!t.history||!t.history.pushState||4>o||a),hasEvent:function(t){if("input"===t&&11>=_r)return!1;if($(i[t])){var n=u.createElement("div");i[t]="on"+t in n}return i[t]},csp:Vr(),vendorPrefix:e,transitions:c,animations:f,android:o}}]}function Ce(){this.$get=["$templateCache","$http","$q","$sce",function(t,n,e,r){function i(o,a){function u(t){if(!a)throw Pi("tpload","Failed to load template: {0} (HTTP status: {1} {2})",o,t.status,t.statusText);return e.reject(t)}i.totalPendingRequests++,C(o)&&t.get(o)||(o=r.getTrustedResourceUrl(o));var s=n.defaults&&n.defaults.transformResponse;Fr(s)?s=s.filter(function(t){return t!==xn}):s===xn&&(s=null);var l={cache:t,transformResponse:s};return n.get(o,l)["finally"](function(){i.totalPendingRequests--}).then(function(n){return t.put(o,n.data),n.data},u)}return i.totalPendingRequests=0,i}]}function Se(){this.$get=["$rootScope","$browser","$location",function(t,n,e){var r={};return r.findBindings=function(t,n,e){var r=t.getElementsByClassName("ng-binding"),i=[];return o(r,function(t){var r=Nr.element(t).data("$binding");r&&o(r,function(r){if(e){var o=new RegExp("(^|\\s)"+qr(n)+"(\\s|\\||$)");o.test(r)&&i.push(t)}else-1!=r.indexOf(n)&&i.push(t)})}),i},r.findModels=function(t,n,e){for(var r=["ng-","data-ng-","ng\\:"],i=0;i<r.length;++i){var o=e?"=":"*=",a="["+r[i]+"model"+o+'"'+n+'"]',u=t.querySelectorAll(a);if(u.length)return u}},r.getLocation=function(){return e.url()},r.setLocation=function(n){n!==e.url()&&(e.url(n),t.$digest())},r.whenStable=function(t){n.notifyWhenNoOutstandingRequests(t)},r}]}function _e(){this.$get=["$rootScope","$browser","$q","$$q","$exceptionHandler",function(t,n,e,r,i){function o(o,u,s){M(o)||(s=u,u=o,o=v);var l,c=W(arguments,3),f=x(s)&&!s,h=(f?r:e).defer(),p=h.promise;return l=n.defer(function(){try{h.resolve(o.apply(null,c))}catch(n){h.reject(n),i(n)}finally{delete a[p.$$timeoutId]}f||t.$apply()},u),p.$$timeoutId=l,a[l]=h,p}var a={};return o.cancel=function(t){return t&&t.$$timeoutId in a?(a[t.$$timeoutId].reject("canceled"),delete a[t.$$timeoutId],n.defer.cancel(t.$$timeoutId)):!1},o}]}function Me(t){var n=t;return _r&&(oo.setAttribute("href",n),n=oo.href),oo.setAttribute("href",n),{href:oo.href,protocol:oo.protocol?oo.protocol.replace(/:$/,""):"",host:oo.host,search:oo.search?oo.search.replace(/^\?/,""):"",hash:oo.hash?oo.hash.replace(/^#/,""):"",hostname:oo.hostname,port:oo.port,pathname:"/"===oo.pathname.charAt(0)?oo.pathname:"/"+oo.pathname}}function ke(t){var n=C(t)?Me(t):t;return n.protocol===ao.protocol&&n.host===ao.host}function Ae(){this.$get=m(t)}function Ee(t){function n(t){try{return decodeURIComponent(t)}catch(n){return t}}var e=t[0]||{},r={},i="";return function(){var t,o,a,u,s,l=e.cookie||"";if(l!==i)for(i=l,t=i.split("; "),r={},a=0;a<t.length;a++)o=t[a],u=o.indexOf("="),u>0&&(s=n(o.substring(0,u)),$(r[s])&&(r[s]=n(o.substring(u+1))));return r}}function Pe(){this.$get=Ee}function Oe(t){function n(r,i){if(b(r)){var a={};return o(r,function(t,e){a[e]=n(e,t)}),a}return t.factory(r+e,i)}var e="Filter";this.register=n,this.$get=["$injector",function(t){return function(n){return t.get(n+e)}}],n("currency",Re),n("date",Xe),n("filter",Te),n("json",Ze),n("limitTo",Je),n("lowercase",fo),n("number",De),n("orderBy",Ke),n("uppercase",ho)}function Te(){return function(t,n,e){if(!i(t)){if(null==t)return t;throw r("filter")("notarray","Expected array but received: {0}",t)}var o,a,u=Ne(n);switch(u){case"function":o=n;break;case"boolean":case"null":case"number":case"string":a=!0;case"object":o=Le(n,e,a);break;default:return t}return Array.prototype.filter.call(t,o)}}function Le(t,n,e){var r,i=b(t)&&"$"in t;return n===!0?n=V:M(n)||(n=function(t,n){return $(t)?!1:null===t||null===n?t===n:b(n)||b(t)&&!y(t)?!1:(t=xr(""+t),n=xr(""+n),-1!==t.indexOf(n))}),r=function(r){return i&&!b(r)?je(r,t.$,n,!1):je(r,t,n,e)}}function je(t,n,e,r,i){var o=Ne(t),a=Ne(n);if("string"===a&&"!"===n.charAt(0))return!je(t,n.substring(1),e,r);if(Fr(t))return t.some(function(t){return je(t,n,e,r)});switch(o){case"object":var u;if(r){for(u in t)if("$"!==u.charAt(0)&&je(t[u],n,e,!0))return!0;return i?!1:je(t,n,e,!1)}if("object"===a){for(u in n){var s=n[u];if(!M(s)&&!$(s)){var l="$"===u,c=l?t:t[u];if(!je(c,s,e,l,l))return!1}}return!0}return e(t,n);case"function":return!1;default:return e(t,n)}}function Ne(t){return null===t?"null":typeof t}function Re(t){var n=t.NUMBER_FORMATS;return function(t,e,r){return $(e)&&(e=n.CURRENCY_SYM),$(r)&&(r=n.PATTERNS[1].maxFrac),null==t?t:Fe(t,n.PATTERNS[1],n.GROUP_SEP,n.DECIMAL_SEP,r).replace(/\u00A4/g,e)}}function De(t){var n=t.NUMBER_FORMATS;return function(t,e){return null==t?t:Fe(t,n.PATTERNS[0],n.GROUP_SEP,n.DECIMAL_SEP,e)}}function Fe(t,n,e,r,i){if(b(t))return"";var o=0>t;t=Math.abs(t);var a=t===1/0;if(!a&&!isFinite(t))return"";var u=t+"",s="",l=!1,c=[];if(a&&(s="∞"),!a&&-1!==u.indexOf("e")){var f=u.match(/([\d\.]+)e(-?)(\d+)/);f&&"-"==f[2]&&f[3]>i+1?t=0:(s=u,l=!0)}if(a||l)i>0&&1>t&&(s=t.toFixed(i),t=parseFloat(s),s=s.replace(uo,r));else{var h=(u.split(uo)[1]||"").length;$(i)&&(i=Math.min(Math.max(n.minFrac,h),n.maxFrac)),t=+(Math.round(+(t.toString()+"e"+i)).toString()+"e"+-i);var p=(""+t).split(uo),d=p[0];p=p[1]||"";var v,g=0,m=n.lgSize,y=n.gSize;if(d.length>=m+y)for(g=d.length-m,v=0;g>v;v++)(g-v)%y===0&&0!==v&&(s+=e),s+=d.charAt(v);for(v=g;v<d.length;v++)(d.length-v)%m===0&&0!==v&&(s+=e),s+=d.charAt(v);for(;p.length<i;)p+="0";i&&"0"!==i&&(s+=r+p.substr(0,i))}return 0===t&&(o=!1),c.push(o?n.negPre:n.posPre,s,o?n.negSuf:n.posSuf),c.join("")}function Ie(t,n,e){var r="";for(0>t&&(r="-",t=-t),t=""+t;t.length<n;)t="0"+t;return e&&(t=t.substr(t.length-n)),r+t}function ze(t,n,e,r){return e=e||0,function(i){var o=i["get"+t]();return(e>0||o>-e)&&(o+=e),0===o&&-12==e&&(o=12),Ie(o,n,r)}}function qe(t,n){return function(e,r){var i=e["get"+t](),o=wr(n?"SHORT"+t:t);return r[o][i]}}function Ve(t,n,e){var r=-1*e,i=r>=0?"+":"";return i+=Ie(Math[r>0?"floor":"ceil"](r/60),2)+Ie(Math.abs(r%60),2)}function Be(t){var n=new Date(t,0,1).getDay();return new Date(t,0,(4>=n?5:12)-n)}function We(t){return new Date(t.getFullYear(),t.getMonth(),t.getDate()+(4-t.getDay()))}function Ue(t){return function(n){var e=Be(n.getFullYear()),r=We(n),i=+r-+e,o=1+Math.round(i/6048e5);return Ie(o,t)}}function He(t,n){return t.getHours()<12?n.AMPMS[0]:n.AMPMS[1]}function Ye(t,n){return t.getFullYear()<=0?n.ERAS[0]:n.ERAS[1]}function Ge(t,n){return t.getFullYear()<=0?n.ERANAMES[0]:n.ERANAMES[1]}function Xe(t){function n(t){var n;if(n=t.match(e)){var r=new Date(0),i=0,o=0,a=n[8]?r.setUTCFullYear:r.setFullYear,u=n[8]?r.setUTCHours:r.setHours;n[9]&&(i=p(n[9]+n[10]),o=p(n[9]+n[11])),a.call(r,p(n[1]),p(n[2])-1,p(n[3]));var s=p(n[4]||0)-i,l=p(n[5]||0)-o,c=p(n[6]||0),f=Math.round(1e3*parseFloat("0."+(n[7]||0)));return u.call(r,s,l,c,f),r}return t}var e=/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/;return function(e,r,i){var a,u,s="",l=[];if(r=r||"mediumDate",r=t.DATETIME_FORMATS[r]||r,C(e)&&(e=co.test(e)?p(e):n(e)),S(e)&&(e=new Date(e)),!_(e)||!isFinite(e.getTime()))return e;for(;r;)u=lo.exec(r),u?(l=B(l,u,1),r=l.pop()):(l.push(r),r=null);var c=e.getTimezoneOffset();return i&&(c=X(i,e.getTimezoneOffset()),e=J(e,i,!0)),o(l,function(n){a=so[n],s+=a?a(e,t.DATETIME_FORMATS,c):n.replace(/(^'|'$)/g,"").replace(/''/g,"'")}),s}}function Ze(){return function(t,n){return $(n)&&(n=2),Y(t,n)}}function Je(){return function(t,n,e){return n=Math.abs(Number(n))===1/0?Number(n):p(n),isNaN(n)?t:(S(t)&&(t=t.toString()),Fr(t)||C(t)?(e=!e||isNaN(e)?0:p(e),e=0>e&&e>=-t.length?t.length+e:e,n>=0?t.slice(e,e+n):0===e?t.slice(n,t.length):t.slice(Math.max(0,e+n),e)):t)}}function Ke(t){function n(n,e){return e=e?-1:1,n.map(function(n){var r=1,i=g;if(M(n))i=n;else if(C(n)&&("+"!=n.charAt(0)&&"-"!=n.charAt(0)||(r="-"==n.charAt(0)?-1:1,n=n.substring(1)),""!==n&&(i=t(n),i.constant))){var o=i();i=function(t){return t[o]}}return{get:i,descending:r*e}})}function e(t){switch(typeof t){case"number":case"boolean":case"string":return!0;default:return!1}}function r(t,n){return"function"==typeof t.valueOf&&(t=t.valueOf(),e(t))?t:y(t)&&(t=t.toString(),e(t))?t:n}function o(t,n){var e=typeof t;return null===t?(e="string",t="null"):"string"===e?t=t.toLowerCase():"object"===e&&(t=r(t,n)),{value:t,type:e}}function a(t,n){var e=0;return t.type===n.type?t.value!==n.value&&(e=t.value<n.value?-1:1):e=t.type<n.type?-1:1,e}return function(t,e,r){function u(t,n){return{value:t,predicateValues:l.map(function(e){return o(e.get(t),n)})}}function s(t,n){for(var e=0,r=0,i=l.length;i>r&&!(e=a(t.predicateValues[r],n.predicateValues[r])*l[r].descending);++r);return e}if(!i(t))return t;Fr(e)||(e=[e]),0===e.length&&(e=["+"]);var l=n(e,r);l.push({get:function(){return{}},descending:r?-1:1});var c=Array.prototype.map.call(t,u);return c.sort(s),t=c.map(function(t){return t.value})}}function Qe(t){return M(t)&&(t={link:t}),t.restrict=t.restrict||"AC",m(t)}function tr(t,n){t.$name=n}function nr(t,n,r,i,a){var u=this,s=[];u.$error={},u.$$success={},u.$pending=e,u.$name=a(n.name||n.ngForm||"")(r),u.$dirty=!1,u.$pristine=!0,u.$valid=!0,u.$invalid=!1,u.$submitted=!1,u.$$parentForm=go,u.$rollbackViewValue=function(){o(s,function(t){t.$rollbackViewValue()})},u.$commitViewValue=function(){o(s,function(t){t.$commitViewValue()})},u.$addControl=function(t){pt(t.$name,"input"),s.push(t),t.$name&&(u[t.$name]=t),t.$$parentForm=u},u.$$renameControl=function(t,n){var e=t.$name;u[e]===t&&delete u[e],u[n]=t,t.$name=n},u.$removeControl=function(t){t.$name&&u[t.$name]===t&&delete u[t.$name],o(u.$pending,function(n,e){u.$setValidity(e,null,t)}),o(u.$error,function(n,e){u.$setValidity(e,null,t)}),o(u.$$success,function(n,e){u.$setValidity(e,null,t)}),I(s,t),t.$$parentForm=go},gr({ctrl:this,$element:t,set:function(t,n,e){var r=t[n];if(r){var i=r.indexOf(e);-1===i&&r.push(e)}else t[n]=[e]},unset:function(t,n,e){var r=t[n];r&&(I(r,e),0===r.length&&delete t[n])},$animate:i}),u.$setDirty=function(){i.removeClass(t,Ko),i.addClass(t,Qo),u.$dirty=!0,u.$pristine=!1,u.$$parentForm.$setDirty()},u.$setPristine=function(){i.setClass(t,Ko,Qo+" "+mo),u.$dirty=!1,u.$pristine=!0,u.$submitted=!1,o(s,function(t){t.$setPristine()})},u.$setUntouched=function(){o(s,function(t){t.$setUntouched()})},u.$setSubmitted=function(){i.addClass(t,mo),u.$submitted=!0,u.$$parentForm.$setSubmitted()}}function er(t){t.$formatters.push(function(n){return t.$isEmpty(n)?n:n.toString()})}function rr(t,n,e,r,i,o){ir(t,n,e,r,i,o),er(r)}function ir(t,n,e,r,i,o){var a=xr(n[0].type);if(!i.android){var u=!1;n.on("compositionstart",function(t){u=!0}),n.on("compositionend",function(){u=!1,s()})}var s=function(t){if(l&&(o.defer.cancel(l),l=null),!u){var i=n.val(),s=t&&t.type;"password"===a||e.ngTrim&&"false"===e.ngTrim||(i=zr(i)),(r.$viewValue!==i||""===i&&r.$$hasNativeValidators)&&r.$setViewValue(i,s)}};if(i.hasEvent("input"))n.on("input",s);else{var l,c=function(t,n,e){l||(l=o.defer(function(){l=null,n&&n.value===e||s(t)}))};n.on("keydown",function(t){var n=t.keyCode;91===n||n>15&&19>n||n>=37&&40>=n||c(t,this,this.value)}),i.hasEvent("paste")&&n.on("paste cut",c)}n.on("change",s),r.$render=function(){var t=r.$isEmpty(r.$viewValue)?"":r.$viewValue;n.val()!==t&&n.val(t)}}function or(t,n){if(_(t))return t;if(C(t)){ko.lastIndex=0;var e=ko.exec(t);if(e){var r=+e[1],i=+e[2],o=0,a=0,u=0,s=0,l=Be(r),c=7*(i-1);return n&&(o=n.getHours(),a=n.getMinutes(),u=n.getSeconds(),s=n.getMilliseconds()),new Date(r,0,l.getDate()+c,o,a,u,s)}}return NaN}function ar(t,n){return function(e,r){var i,a;if(_(e))return e;if(C(e)){if('"'==e.charAt(0)&&'"'==e.charAt(e.length-1)&&(e=e.substring(1,e.length-1)),bo.test(e))return new Date(e);if(t.lastIndex=0,i=t.exec(e))return i.shift(),a=r?{yyyy:r.getFullYear(),MM:r.getMonth()+1,dd:r.getDate(),HH:r.getHours(),mm:r.getMinutes(),ss:r.getSeconds(),sss:r.getMilliseconds()/1e3}:{yyyy:1970,MM:1,dd:1,HH:0,mm:0,ss:0,sss:0},o(i,function(t,e){e<n.length&&(a[n[e]]=+t)}),new Date(a.yyyy,a.MM-1,a.dd,a.HH,a.mm,a.ss||0,1e3*a.sss||0)}return NaN}}function ur(t,n,r,i){return function(o,a,u,s,l,c,f){function h(t){return t&&!(t.getTime&&t.getTime()!==t.getTime())}function p(t){return x(t)&&!_(t)?r(t)||e:t}sr(o,a,u,s),ir(o,a,u,s,l,c);var d,v=s&&s.$options&&s.$options.timezone;if(s.$$parserName=t,s.$parsers.push(function(t){if(s.$isEmpty(t))return null;if(n.test(t)){var i=r(t,d);return v&&(i=J(i,v)),i}return e}),s.$formatters.push(function(t){if(t&&!_(t))throw ra("datefmt","Expected `{0}` to be a date",t);return h(t)?(d=t,d&&v&&(d=J(d,v,!0)),f("date")(t,i,v)):(d=null,"")}),x(u.min)||u.ngMin){var g;s.$validators.min=function(t){return!h(t)||$(g)||r(t)>=g},u.$observe("min",function(t){g=p(t),s.$validate()})}if(x(u.max)||u.ngMax){var m;s.$validators.max=function(t){return!h(t)||$(m)||r(t)<=m},u.$observe("max",function(t){m=p(t),s.$validate()})}}}function sr(t,n,r,i){var o=n[0],a=i.$$hasNativeValidators=b(o.validity);a&&i.$parsers.push(function(t){var r=n.prop($r)||{};return r.badInput&&!r.typeMismatch?e:t})}function lr(t,n,r,i,o,a){if(sr(t,n,r,i),ir(t,n,r,i,o,a),i.$$parserName="number",i.$parsers.push(function(t){return i.$isEmpty(t)?null:So.test(t)?parseFloat(t):e}),i.$formatters.push(function(t){if(!i.$isEmpty(t)){if(!S(t))throw ra("numfmt","Expected `{0}` to be a number",t);t=t.toString()}return t}),x(r.min)||r.ngMin){var u;i.$validators.min=function(t){return i.$isEmpty(t)||$(u)||t>=u},r.$observe("min",function(t){x(t)&&!S(t)&&(t=parseFloat(t,10)),u=S(t)&&!isNaN(t)?t:e,i.$validate()})}if(x(r.max)||r.ngMax){var s;i.$validators.max=function(t){return i.$isEmpty(t)||$(s)||s>=t},r.$observe("max",function(t){x(t)&&!S(t)&&(t=parseFloat(t,10)),s=S(t)&&!isNaN(t)?t:e,i.$validate()})}}function cr(t,n,e,r,i,o){ir(t,n,e,r,i,o),er(r),r.$$parserName="url",r.$validators.url=function(t,n){var e=t||n;return r.$isEmpty(e)||wo.test(e)}}function fr(t,n,e,r,i,o){ir(t,n,e,r,i,o),er(r),r.$$parserName="email",r.$validators.email=function(t,n){var e=t||n;return r.$isEmpty(e)||Co.test(e)}}function hr(t,n,e,r){$(e.name)&&n.attr("name",s());var i=function(t){n[0].checked&&r.$setViewValue(e.value,t&&t.type)};n.on("click",i),r.$render=function(){var t=e.value;n[0].checked=t==r.$viewValue},e.$observe("value",r.$render)}function pr(t,n,e,r,i){var o;if(x(r)){if(o=t(r),!o.constant)throw ra("constexpr","Expected constant expression for `{0}`, but saw `{1}`.",e,r);return o(n)}return i}function dr(t,n,e,r,i,o,a,u){var s=pr(u,t,"ngTrueValue",e.ngTrueValue,!0),l=pr(u,t,"ngFalseValue",e.ngFalseValue,!1),c=function(t){r.$setViewValue(n[0].checked,t&&t.type)};n.on("click",c),r.$render=function(){n[0].checked=r.$viewValue},r.$isEmpty=function(t){return t===!1},r.$formatters.push(function(t){return V(t,s)}),r.$parsers.push(function(t){return t?s:l})}function vr(t,n){return t="ngClass"+t,["$animate",function(e){function r(t,n){var e=[];t:for(var r=0;r<t.length;r++){for(var i=t[r],o=0;o<n.length;o++)if(i==n[o])continue t;e.push(i)}return e}function i(t){var n=[];return Fr(t)?(o(t,function(t){n=n.concat(i(t))}),n):C(t)?t.split(" "):b(t)?(o(t,function(t,e){t&&(n=n.concat(e.split(" ")))}),n):t}return{restrict:"AC",link:function(a,u,s){function l(t){var n=f(t,1);s.$addClass(n)}function c(t){var n=f(t,-1);s.$removeClass(n)}function f(t,n){var e=u.data("$classCounts")||gt(),r=[];return o(t,function(t){(n>0||e[t])&&(e[t]=(e[t]||0)+n,e[t]===+(n>0)&&r.push(t))}),u.data("$classCounts",e),r.join(" ")}function h(t,n){var i=r(n,t),o=r(t,n);i=f(i,1),o=f(o,-1),i&&i.length&&e.addClass(u,i),o&&o.length&&e.removeClass(u,o)}function p(t){if(n===!0||a.$index%2===n){var e=i(t||[]);if(d){if(!V(t,d)){var r=i(d);h(r,e)}}else l(e)}d=q(t)}var d;a.$watch(s[t],p,!0),s.$observe("class",function(n){p(a.$eval(s[t]))}),"ngClass"!==t&&a.$watch("$index",function(e,r){var o=1&e;if(o!==(1&r)){var u=i(a.$eval(s[t]));o===n?l(u):c(u)}})}}}]}function gr(t){function n(t,n,s){$(n)?r("$pending",t,s):i("$pending",t,s),L(n)?n?(f(u.$error,t,s),c(u.$$success,t,s)):(c(u.$error,t,s),f(u.$$success,t,s)):(f(u.$error,t,s),f(u.$$success,t,s)),u.$pending?(o(ea,!0),u.$valid=u.$invalid=e,a("",null)):(o(ea,!1),u.$valid=mr(u.$error),u.$invalid=!u.$valid,a("",u.$valid));var l;l=u.$pending&&u.$pending[t]?e:u.$error[t]?!1:u.$$success[t]?!0:null,a(t,l),u.$$parentForm.$setValidity(t,l,u)}function r(t,n,e){u[t]||(u[t]={}),c(u[t],n,e)}function i(t,n,r){u[t]&&f(u[t],n,r),mr(u[t])&&(u[t]=e)}function o(t,n){n&&!l[t]?(h.addClass(s,t),l[t]=!0):!n&&l[t]&&(h.removeClass(s,t),l[t]=!1)}function a(t,n){t=t?"-"+lt(t,"-"):"",o(Zo+t,n===!0),o(Jo+t,n===!1)}var u=t.ctrl,s=t.$element,l={},c=t.set,f=t.unset,h=t.$animate;l[Jo]=!(l[Zo]=s.hasClass(Zo)),u.$setValidity=n}function mr(t){if(t)for(var n in t)if(t.hasOwnProperty(n))return!1;return!0}var yr=/^\/(.+)\/([a-z]*)$/,$r="validity",xr=function(t){return C(t)?t.toLowerCase():t},br=Object.prototype.hasOwnProperty,wr=function(t){return C(t)?t.toUpperCase():t},Cr=function(t){return C(t)?t.replace(/[A-Z]/g,function(t){return String.fromCharCode(32|t.charCodeAt(0))}):t},Sr=function(t){return C(t)?t.replace(/[a-z]/g,function(t){return String.fromCharCode(-33&t.charCodeAt(0))}):t};"i"!=="I".toLowerCase()&&(xr=Cr,wr=Sr);var _r,Mr,kr,Ar,Er=[].slice,Pr=[].splice,Or=[].push,Tr=Object.prototype.toString,Lr=Object.getPrototypeOf,jr=r("ng"),Nr=t.angular||(t.angular={}),Rr=0;_r=n.documentMode,v.$inject=[],g.$inject=[];var Dr,Fr=Array.isArray,Ir=/^\[object (Uint8(Clamped)?)|(Uint16)|(Uint32)|(Int8)|(Int16)|(Int32)|(Float(32)|(64))Array\]$/,zr=function(t){return C(t)?t.trim():t},qr=function(t){return t.replace(/([-()\[\]{}+?*.$\^|,:#<!\\])/g,"\\$1").replace(/\x08/g,"\\x08")},Vr=function(){function t(){try{return new Function(""),!1}catch(t){return!0}}if(!x(Vr.rules)){var e=n.querySelector("[ng-csp]")||n.querySelector("[data-ng-csp]");if(e){var r=e.getAttribute("ng-csp")||e.getAttribute("data-ng-csp");Vr.rules={noUnsafeEval:!r||-1!==r.indexOf("no-unsafe-eval"),noInlineStyle:!r||-1!==r.indexOf("no-inline-style")}}else Vr.rules={noUnsafeEval:t(),noInlineStyle:!1}}return Vr.rules},Br=function(){if(x(Br.name_))return Br.name_;var t,e,r,i,o=Wr.length;for(e=0;o>e;++e)if(r=Wr[e],t=n.querySelector("["+r.replace(":","\\:")+"jq]")){i=t.getAttribute(r+"jq");break}return Br.name_=i},Wr=["ng-","data-ng-","ng:","x-ng-"],Ur=/[A-Z]/g,Hr=!1,Yr=1,Gr=2,Xr=3,Zr=8,Jr=9,Kr=11,Qr={full:"1.4.7",major:1,minor:4,dot:7,codeName:"dark-luminescence"};At.expando="ng339";var ti=At.cache={},ni=1,ei=function(t,n,e){t.addEventListener(n,e,!1)},ri=function(t,n,e){t.removeEventListener(n,e,!1)};At._data=function(t){return this.cache[t[this.expando]]||{}};var ii=/([\:\-\_]+(.))/g,oi=/^moz([A-Z])/,ai={mouseleave:"mouseout",mouseenter:"mouseover"},ui=r("jqLite"),si=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,li=/<|&#?\w+;/,ci=/<([\w:-]+)/,fi=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,hi={option:[1,'<select multiple="multiple">',"</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};hi.optgroup=hi.option,hi.tbody=hi.tfoot=hi.colgroup=hi.caption=hi.thead,hi.th=hi.td;var pi=At.prototype={ready:function(e){function r(){i||(i=!0,e())}var i=!1;"complete"===n.readyState?setTimeout(r):(this.on("DOMContentLoaded",r),At(t).on("load",r))},toString:function(){var t=[];return o(this,function(n){t.push(""+n)}),"["+t.join(", ")+"]"},eq:function(t){return Mr(t>=0?this[t]:this[this.length+t])},length:0,push:Or,sort:[].sort,splice:[].splice},di={};o("multiple,selected,checked,disabled,readOnly,required,open".split(","),function(t){di[xr(t)]=t});var vi={};o("input,select,option,textarea,button,form,details".split(","),function(t){vi[t]=!0});var gi={ngMinlength:"minlength",ngMaxlength:"maxlength",ngMin:"min",ngMax:"max",ngPattern:"pattern"};o({data:jt,removeData:Tt,hasData:_t},function(t,n){At[n]=t}),o({data:jt,inheritedData:zt,scope:function(t){return Mr.data(t,"$scope")||zt(t.parentNode||t,["$isolateScope","$scope"])},isolateScope:function(t){return Mr.data(t,"$isolateScope")||Mr.data(t,"$isolateScopeNoTemplate")},controller:It,injector:function(t){return zt(t,"$injector")},removeAttr:function(t,n){t.removeAttribute(n)},hasClass:Nt,css:function(t,n,e){return n=wt(n),x(e)?void(t.style[n]=e):t.style[n]},attr:function(t,n,r){var i=t.nodeType;if(i!==Xr&&i!==Gr&&i!==Zr){var o=xr(n);if(di[o]){if(!x(r))return t[n]||(t.attributes.getNamedItem(n)||v).specified?o:e;r?(t[n]=!0,t.setAttribute(n,o)):(t[n]=!1,t.removeAttribute(o))}else if(x(r))t.setAttribute(n,r);else if(t.getAttribute){var a=t.getAttribute(n,2);return null===a?e:a}}},prop:function(t,n,e){return x(e)?void(t[n]=e):t[n]},text:function(){function t(t,n){
+if($(n)){var e=t.nodeType;return e===Yr||e===Xr?t.textContent:""}t.textContent=n}return t.$dv="",t}(),val:function(t,n){if($(n)){if(t.multiple&&"select"===F(t)){var e=[];return o(t.options,function(t){t.selected&&e.push(t.value||t.text)}),0===e.length?null:e}return t.value}t.value=n},html:function(t,n){return $(n)?t.innerHTML:(Pt(t,!0),void(t.innerHTML=n))},empty:qt},function(t,n){At.prototype[n]=function(n,e){var r,i,o=this.length;if(t!==qt&&$(2==t.length&&t!==Nt&&t!==It?n:e)){if(b(n)){for(r=0;o>r;r++)if(t===jt)t(this[r],n);else for(i in n)t(this[r],i,n[i]);return this}for(var a=t.$dv,u=$(a)?Math.min(o,1):o,s=0;u>s;s++){var l=t(this[s],n,e);a=a?a+l:l}return a}for(r=0;o>r;r++)t(this[r],n,e);return this}}),o({removeData:Tt,on:function La(t,n,e,r){if(x(r))throw ui("onargs","jqLite#on() does not support the `selector` or `eventData` parameters");if(St(t)){var i=Lt(t,!0),o=i.events,a=i.handle;a||(a=i.handle=Ht(t,o));for(var u=n.indexOf(" ")>=0?n.split(" "):[n],s=u.length;s--;){n=u[s];var l=o[n];l||(o[n]=[],"mouseenter"===n||"mouseleave"===n?La(t,ai[n],function(t){var e=this,r=t.relatedTarget;r&&(r===e||e.contains(r))||a(t,n)}):"$destroy"!==n&&ei(t,n,a),l=o[n]),l.push(e)}}},off:Ot,one:function(t,n,e){t=Mr(t),t.on(n,function r(){t.off(n,e),t.off(n,r)}),t.on(n,e)},replaceWith:function(t,n){var e,r=t.parentNode;Pt(t),o(new At(n),function(n){e?r.insertBefore(n,e.nextSibling):r.replaceChild(n,t),e=n})},children:function(t){var n=[];return o(t.childNodes,function(t){t.nodeType===Yr&&n.push(t)}),n},contents:function(t){return t.contentDocument||t.childNodes||[]},append:function(t,n){var e=t.nodeType;if(e===Yr||e===Kr){n=new At(n);for(var r=0,i=n.length;i>r;r++){var o=n[r];t.appendChild(o)}}},prepend:function(t,n){if(t.nodeType===Yr){var e=t.firstChild;o(new At(n),function(n){t.insertBefore(n,e)})}},wrap:function(t,n){n=Mr(n).eq(0).clone()[0];var e=t.parentNode;e&&e.replaceChild(n,t),n.appendChild(t)},remove:Vt,detach:function(t){Vt(t,!0)},after:function(t,n){var e=t,r=t.parentNode;n=new At(n);for(var i=0,o=n.length;o>i;i++){var a=n[i];r.insertBefore(a,e.nextSibling),e=a}},addClass:Dt,removeClass:Rt,toggleClass:function(t,n,e){n&&o(n.split(" "),function(n){var r=e;$(r)&&(r=!Nt(t,n)),(r?Dt:Rt)(t,n)})},parent:function(t){var n=t.parentNode;return n&&n.nodeType!==Kr?n:null},next:function(t){return t.nextElementSibling},find:function(t,n){return t.getElementsByTagName?t.getElementsByTagName(n):[]},clone:Et,triggerHandler:function(t,n,e){var r,i,a,u=n.type||n,s=Lt(t),l=s&&s.events,c=l&&l[u];c&&(r={preventDefault:function(){this.defaultPrevented=!0},isDefaultPrevented:function(){return this.defaultPrevented===!0},stopImmediatePropagation:function(){this.immediatePropagationStopped=!0},isImmediatePropagationStopped:function(){return this.immediatePropagationStopped===!0},stopPropagation:v,type:u,target:t},n.type&&(r=f(r,n)),i=q(c),a=e?[r].concat(e):[r],o(i,function(n){r.isImmediatePropagationStopped()||n.apply(t,a)}))}},function(t,n){At.prototype[n]=function(n,e,r){for(var i,o=0,a=this.length;a>o;o++)$(i)?(i=t(this[o],n,e,r),x(i)&&(i=Mr(i))):Ft(i,t(this[o],n,e,r));return x(i)?i:this},At.prototype.bind=At.prototype.on,At.prototype.unbind=At.prototype.off}),Xt.prototype={put:function(t,n){this[Gt(t,this.nextUid)]=n},get:function(t){return this[Gt(t,this.nextUid)]},remove:function(t){var n=this[t=Gt(t,this.nextUid)];return delete this[t],n}};var mi=[function(){this.$get=[function(){return Xt}]}],yi=/^[^\(]*\(\s*([^\)]*)\)/m,$i=/,/,xi=/^\s*(_?)(\S+?)\1\s*$/,bi=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/gm,wi=r("$injector");Kt.$$annotate=Jt;var Ci=r("$animate"),Si=1,_i="ng-animate",Mi=function(){this.$get=["$q","$$rAF",function(t,n){function e(){}return e.all=v,e.chain=v,e.prototype={end:v,cancel:v,resume:v,pause:v,complete:v,then:function(e,r){return t(function(t){n(function(){t()})}).then(e,r)}},e}]},ki=function(){var t=new Xt,n=[];this.$get=["$$AnimateRunner","$rootScope",function(e,r){function i(t,n,e){var r=!1;return n&&(n=C(n)?n.split(" "):Fr(n)?n:[],o(n,function(n){n&&(r=!0,t[n]=e)})),r}function a(){o(n,function(n){var e=t.get(n);if(e){var r=en(n.attr("class")),i="",a="";o(e,function(t,n){var e=!!r[n];t!==e&&(t?i+=(i.length?" ":"")+n:a+=(a.length?" ":"")+n)}),o(n,function(t){i&&Dt(t,i),a&&Rt(t,a)}),t.remove(n)}}),n.length=0}function u(e,o,u){var s=t.get(e)||{},l=i(s,o,!0),c=i(s,u,!1);(l||c)&&(t.put(e,s),n.push(e),1===n.length&&r.$$postDigest(a))}return{enabled:v,on:v,off:v,pin:v,push:function(t,n,r,i){return i&&i(),r=r||{},r.from&&t.css(r.from),r.to&&t.css(r.to),(r.addClass||r.removeClass)&&u(t,r.addClass,r.removeClass),new e}}}]},Ai=["$provide",function(t){var n=this;this.$$registeredAnimations=Object.create(null),this.register=function(e,r){if(e&&"."!==e.charAt(0))throw Ci("notcsel","Expecting class selector starting with '.' got '{0}'.",e);var i=e+"-animation";n.$$registeredAnimations[e.substr(1)]=i,t.factory(i,r)},this.classNameFilter=function(t){if(1===arguments.length&&(this.$$classNameFilter=t instanceof RegExp?t:null,this.$$classNameFilter)){var n=new RegExp("(\\s+|\\/)"+_i+"(\\s+|\\/)");if(n.test(this.$$classNameFilter.toString()))throw Ci("nongcls",'$animateProvider.classNameFilter(regex) prohibits accepting a regex value which matches/contains the "{0}" CSS class.',_i)}return this.$$classNameFilter},this.$get=["$$animateQueue",function(t){function n(t,n,e){if(e){var r=nn(e);!r||r.parentNode||r.previousElementSibling||(e=null)}e?e.after(t):n.prepend(t)}return{on:t.on,off:t.off,pin:t.pin,enabled:t.enabled,cancel:function(t){t.end&&t.end()},enter:function(e,r,i,o){return r=r&&Mr(r),i=i&&Mr(i),r=r||i.parent(),n(e,r,i),t.push(e,"enter",rn(o))},move:function(e,r,i,o){return r=r&&Mr(r),i=i&&Mr(i),r=r||i.parent(),n(e,r,i),t.push(e,"move",rn(o))},leave:function(n,e){return t.push(n,"leave",rn(e),function(){n.remove()})},addClass:function(n,e,r){return r=rn(r),r.addClass=tn(r.addclass,e),t.push(n,"addClass",r)},removeClass:function(n,e,r){return r=rn(r),r.removeClass=tn(r.removeClass,e),t.push(n,"removeClass",r)},setClass:function(n,e,r,i){return i=rn(i),i.addClass=tn(i.addClass,e),i.removeClass=tn(i.removeClass,r),t.push(n,"setClass",i)},animate:function(n,e,r,i,o){return o=rn(o),o.from=o.from?f(o.from,e):e,o.to=o.to?f(o.to,r):r,i=i||"ng-inline-animate",o.tempClasses=tn(o.tempClasses,i),t.push(n,"animate",o)}}}]}],Ei=function(){this.$get=["$$rAF","$q",function(t,n){var e=function(){};return e.prototype={done:function(t){this.defer&&this.defer[t===!0?"reject":"resolve"]()},end:function(){this.done()},cancel:function(){this.done(!0)},getPromise:function(){return this.defer||(this.defer=n.defer()),this.defer.promise},then:function(t,n){return this.getPromise().then(t,n)},"catch":function(t){return this.getPromise()["catch"](t)},"finally":function(t){return this.getPromise()["finally"](t)}},function(n,r){function i(){return t(function(){o(),a||u.done(),a=!0}),u}function o(){r.addClass&&(n.addClass(r.addClass),r.addClass=null),r.removeClass&&(n.removeClass(r.removeClass),r.removeClass=null),r.to&&(n.css(r.to),r.to=null)}r.cleanupStyles&&(r.from=r.to=null),r.from&&(n.css(r.from),r.from=null);var a,u=new e;return{start:i,end:i}}}]},Pi=r("$compile");ln.$inject=["$provide","$$sanitizeUriProvider"];var Oi=/^((?:x|data)[\:\-_])/i,Ti=r("$controller"),Li=/^(\S+)(\s+as\s+(\w+))?$/,ji=function(){this.$get=["$document",function(t){return function(n){return n?!n.nodeType&&n instanceof Mr&&(n=n[0]):n=t[0].body,n.offsetWidth+1}}]},Ni="application/json",Ri={"Content-Type":Ni+";charset=utf-8"},Di=/^\[|^\{(?!\{)/,Fi={"[":/]$/,"{":/}$/},Ii=/^\)\]\}',?\n/,zi=r("$http"),qi=function(t){return function(){throw zi("legacy","The method `{0}` on the promise returned from `$http` has been disabled.",t)}},Vi=Nr.$interpolateMinErr=r("$interpolate");Vi.throwNoconcat=function(t){throw Vi("noconcat","Error while interpolating: {0}\nStrict Contextual Escaping disallows interpolations that concatenate multiple expressions when a trusted value is required. See http://docs.angularjs.org/api/ng.$sce",t)},Vi.interr=function(t,n){return Vi("interr","Can't interpolate: {0}\n{1}",t,n.toString())};var Bi=/^([^\?#]*)(\?([^#]*))?(#(.*))?$/,Wi={http:80,https:443,ftp:21},Ui=r("$location"),Hi={$$html5:!1,$$replace:!1,absUrl:Bn("$$absUrl"),url:function(t){if($(t))return this.$$url;var n=Bi.exec(t);return(n[1]||""===t)&&this.path(decodeURIComponent(n[1])),(n[2]||n[1]||""===t)&&this.search(n[3]||""),this.hash(n[5]||""),this},protocol:Bn("$$protocol"),host:Bn("$$host"),port:Bn("$$port"),path:Wn("$$path",function(t){return t=null!==t?t.toString():"","/"==t.charAt(0)?t:"/"+t}),search:function(t,n){switch(arguments.length){case 0:return this.$$search;case 1:if(C(t)||S(t))t=t.toString(),this.$$search=tt(t);else{if(!b(t))throw Ui("isrcharg","The first argument of the `$location#search()` call must be a string or an object.");t=z(t,{}),o(t,function(n,e){null==n&&delete t[e]}),this.$$search=t}break;default:$(n)||null===n?delete this.$$search[t]:this.$$search[t]=n}return this.$$compose(),this},hash:Wn("$$hash",function(t){return null!==t?t.toString():""}),replace:function(){return this.$$replace=!0,this}};o([Vn,qn,zn],function(t){t.prototype=Object.create(Hi),t.prototype.state=function(n){if(!arguments.length)return this.$$state;if(t!==zn||!this.$$html5)throw Ui("nostate","History API state support is available only in HTML5 mode and only in browsers supporting HTML5 History API");return this.$$state=$(n)?null:n,this}});var Yi=r("$parse"),Gi=Function.prototype.call,Xi=Function.prototype.apply,Zi=Function.prototype.bind,Ji=gt();o("+ - * / % === !== == != < > <= >= && || ! = |".split(" "),function(t){Ji[t]=!0});var Ki={n:"\n",f:"\f",r:"\r",t:" ",v:"\x0B","'":"'",'"':'"'},Qi=function(t){this.options=t};Qi.prototype={constructor:Qi,lex:function(t){for(this.text=t,this.index=0,this.tokens=[];this.index<this.text.length;){var n=this.text.charAt(this.index);if('"'===n||"'"===n)this.readString(n);else if(this.isNumber(n)||"."===n&&this.isNumber(this.peek()))this.readNumber();else if(this.isIdent(n))this.readIdent();else if(this.is(n,"(){}[].,;:?"))this.tokens.push({index:this.index,text:n}),this.index++;else if(this.isWhitespace(n))this.index++;else{var e=n+this.peek(),r=e+this.peek(2),i=Ji[n],o=Ji[e],a=Ji[r];if(i||o||a){var u=a?r:o?e:n;this.tokens.push({index:this.index,text:u,operator:!0}),this.index+=u.length}else this.throwError("Unexpected next character ",this.index,this.index+1)}}return this.tokens},is:function(t,n){return-1!==n.indexOf(t)},peek:function(t){var n=t||1;return this.index+n<this.text.length?this.text.charAt(this.index+n):!1},isNumber:function(t){return t>="0"&&"9">=t&&"string"==typeof t},isWhitespace:function(t){return" "===t||"\r"===t||" "===t||"\n"===t||"\x0B"===t||" "===t},isIdent:function(t){return t>="a"&&"z">=t||t>="A"&&"Z">=t||"_"===t||"$"===t},isExpOperator:function(t){return"-"===t||"+"===t||this.isNumber(t)},throwError:function(t,n,e){e=e||this.index;var r=x(n)?"s "+n+"-"+this.index+" ["+this.text.substring(n,e)+"]":" "+e;throw Yi("lexerr","Lexer Error: {0} at column{1} in expression [{2}].",t,r,this.text)},readNumber:function(){for(var t="",n=this.index;this.index<this.text.length;){var e=xr(this.text.charAt(this.index));if("."==e||this.isNumber(e))t+=e;else{var r=this.peek();if("e"==e&&this.isExpOperator(r))t+=e;else if(this.isExpOperator(e)&&r&&this.isNumber(r)&&"e"==t.charAt(t.length-1))t+=e;else{if(!this.isExpOperator(e)||r&&this.isNumber(r)||"e"!=t.charAt(t.length-1))break;this.throwError("Invalid exponent")}}this.index++}this.tokens.push({index:n,text:t,constant:!0,value:Number(t)})},readIdent:function(){for(var t=this.index;this.index<this.text.length;){var n=this.text.charAt(this.index);if(!this.isIdent(n)&&!this.isNumber(n))break;this.index++}this.tokens.push({index:t,text:this.text.slice(t,this.index),identifier:!0})},readString:function(t){var n=this.index;this.index++;for(var e="",r=t,i=!1;this.index<this.text.length;){var o=this.text.charAt(this.index);if(r+=o,i){if("u"===o){var a=this.text.substring(this.index+1,this.index+5);a.match(/[\da-f]{4}/i)||this.throwError("Invalid unicode escape [\\u"+a+"]"),this.index+=4,e+=String.fromCharCode(parseInt(a,16))}else{var u=Ki[o];e+=u||o}i=!1}else if("\\"===o)i=!0;else{if(o===t)return this.index++,void this.tokens.push({index:n,text:r,constant:!0,value:e});e+=o}this.index++}this.throwError("Unterminated quote",n)}};var to=function(t,n){this.lexer=t,this.options=n};to.Program="Program",to.ExpressionStatement="ExpressionStatement",to.AssignmentExpression="AssignmentExpression",to.ConditionalExpression="ConditionalExpression",to.LogicalExpression="LogicalExpression",to.BinaryExpression="BinaryExpression",to.UnaryExpression="UnaryExpression",to.CallExpression="CallExpression",to.MemberExpression="MemberExpression",to.Identifier="Identifier",to.Literal="Literal",to.ArrayExpression="ArrayExpression",to.Property="Property",to.ObjectExpression="ObjectExpression",to.ThisExpression="ThisExpression",to.NGValueParameter="NGValueParameter",to.prototype={ast:function(t){this.text=t,this.tokens=this.lexer.lex(t);var n=this.program();return 0!==this.tokens.length&&this.throwError("is an unexpected token",this.tokens[0]),n},program:function(){for(var t=[];;)if(this.tokens.length>0&&!this.peek("}",")",";","]")&&t.push(this.expressionStatement()),!this.expect(";"))return{type:to.Program,body:t}},expressionStatement:function(){return{type:to.ExpressionStatement,expression:this.filterChain()}},filterChain:function(){for(var t,n=this.expression();t=this.expect("|");)n=this.filter(n);return n},expression:function(){return this.assignment()},assignment:function(){var t=this.ternary();return this.expect("=")&&(t={type:to.AssignmentExpression,left:t,right:this.assignment(),operator:"="}),t},ternary:function(){var t,n,e=this.logicalOR();return this.expect("?")&&(t=this.expression(),this.consume(":"))?(n=this.expression(),{type:to.ConditionalExpression,test:e,alternate:t,consequent:n}):e},logicalOR:function(){for(var t=this.logicalAND();this.expect("||");)t={type:to.LogicalExpression,operator:"||",left:t,right:this.logicalAND()};return t},logicalAND:function(){for(var t=this.equality();this.expect("&&");)t={type:to.LogicalExpression,operator:"&&",left:t,right:this.equality()};return t},equality:function(){for(var t,n=this.relational();t=this.expect("==","!=","===","!==");)n={type:to.BinaryExpression,operator:t.text,left:n,right:this.relational()};return n},relational:function(){for(var t,n=this.additive();t=this.expect("<",">","<=",">=");)n={type:to.BinaryExpression,operator:t.text,left:n,right:this.additive()};return n},additive:function(){for(var t,n=this.multiplicative();t=this.expect("+","-");)n={type:to.BinaryExpression,operator:t.text,left:n,right:this.multiplicative()};return n},multiplicative:function(){for(var t,n=this.unary();t=this.expect("*","/","%");)n={type:to.BinaryExpression,operator:t.text,left:n,right:this.unary()};return n},unary:function(){var t;return(t=this.expect("+","-","!"))?{type:to.UnaryExpression,operator:t.text,prefix:!0,argument:this.unary()}:this.primary()},primary:function(){var t;this.expect("(")?(t=this.filterChain(),this.consume(")")):this.expect("[")?t=this.arrayDeclaration():this.expect("{")?t=this.object():this.constants.hasOwnProperty(this.peek().text)?t=z(this.constants[this.consume().text]):this.peek().identifier?t=this.identifier():this.peek().constant?t=this.constant():this.throwError("not a primary expression",this.peek());for(var n;n=this.expect("(","[",".");)"("===n.text?(t={type:to.CallExpression,callee:t,arguments:this.parseArguments()},this.consume(")")):"["===n.text?(t={type:to.MemberExpression,object:t,property:this.expression(),computed:!0},this.consume("]")):"."===n.text?t={type:to.MemberExpression,object:t,property:this.identifier(),computed:!1}:this.throwError("IMPOSSIBLE");return t},filter:function(t){for(var n=[t],e={type:to.CallExpression,callee:this.identifier(),arguments:n,filter:!0};this.expect(":");)n.push(this.expression());return e},parseArguments:function(){var t=[];if(")"!==this.peekToken().text)do t.push(this.expression());while(this.expect(","));return t},identifier:function(){var t=this.consume();return t.identifier||this.throwError("is not a valid identifier",t),{type:to.Identifier,name:t.text}},constant:function(){return{type:to.Literal,value:this.consume().value}},arrayDeclaration:function(){var t=[];if("]"!==this.peekToken().text)do{if(this.peek("]"))break;t.push(this.expression())}while(this.expect(","));return this.consume("]"),{type:to.ArrayExpression,elements:t}},object:function(){var t,n=[];if("}"!==this.peekToken().text)do{if(this.peek("}"))break;t={type:to.Property,kind:"init"},this.peek().constant?t.key=this.constant():this.peek().identifier?t.key=this.identifier():this.throwError("invalid key",this.peek()),this.consume(":"),t.value=this.expression(),n.push(t)}while(this.expect(","));return this.consume("}"),{type:to.ObjectExpression,properties:n}},throwError:function(t,n){throw Yi("syntax","Syntax Error: Token '{0}' {1} at column {2} of the expression [{3}] starting at [{4}].",n.text,t,n.index+1,this.text,this.text.substring(n.index))},consume:function(t){if(0===this.tokens.length)throw Yi("ueoe","Unexpected end of expression: {0}",this.text);var n=this.expect(t);return n||this.throwError("is unexpected, expecting ["+t+"]",this.peek()),n},peekToken:function(){if(0===this.tokens.length)throw Yi("ueoe","Unexpected end of expression: {0}",this.text);return this.tokens[0]},peek:function(t,n,e,r){return this.peekAhead(0,t,n,e,r)},peekAhead:function(t,n,e,r,i){if(this.tokens.length>t){var o=this.tokens[t],a=o.text;if(a===n||a===e||a===r||a===i||!n&&!e&&!r&&!i)return o}return!1},expect:function(t,n,e,r){var i=this.peek(t,n,e,r);return i?(this.tokens.shift(),i):!1},constants:{"true":{type:to.Literal,value:!0},"false":{type:to.Literal,value:!1},"null":{type:to.Literal,value:null},undefined:{type:to.Literal,value:e},"this":{type:to.ThisExpression}}},ue.prototype={compile:function(t,n){var r=this,i=this.astBuilder.ast(t);this.state={nextId:0,filters:{},expensiveChecks:n,fn:{vars:[],body:[],own:{}},assign:{vars:[],body:[],own:{}},inputs:[]},ne(i,r.$filter);var a,u="";if(this.stage="assign",a=ie(i)){this.state.computing="assign";var s=this.nextId();this.recurse(a,s),this.return_(s),u="fn.assign="+this.generateFunction("assign","s,v,l")}var l=ee(i.body);r.stage="inputs",o(l,function(t,n){var e="fn"+n;r.state[e]={vars:[],body:[],own:{}},r.state.computing=e;var i=r.nextId();r.recurse(t,i),r.return_(i),r.state.inputs.push(e),t.watchId=n}),this.state.computing="fn",this.stage="main",this.recurse(i);var c='"'+this.USE+" "+this.STRICT+'";\n'+this.filterPrefix()+"var fn="+this.generateFunction("fn","s,l,a,i")+u+this.watchFns()+"return fn;",f=new Function("$filter","ensureSafeMemberName","ensureSafeObject","ensureSafeFunction","getStringValue","ensureSafeAssignContext","ifDefined","plus","text",c)(this.$filter,Yn,Xn,Zn,Gn,Jn,Kn,Qn,t);return this.state=this.stage=e,f.literal=oe(i),f.constant=ae(i),f},USE:"use",STRICT:"strict",watchFns:function(){var t=[],n=this.state.inputs,e=this;return o(n,function(n){t.push("var "+n+"="+e.generateFunction(n,"s"))}),n.length&&t.push("fn.inputs=["+n.join(",")+"];"),t.join("")},generateFunction:function(t,n){return"function("+n+"){"+this.varsPrefix(t)+this.body(t)+"};"},filterPrefix:function(){var t=[],n=this;return o(this.state.filters,function(e,r){t.push(e+"=$filter("+n.escape(r)+")")}),t.length?"var "+t.join(",")+";":""},varsPrefix:function(t){return this.state[t].vars.length?"var "+this.state[t].vars.join(",")+";":""},body:function(t){return this.state[t].body.join("")},recurse:function(t,n,r,i,a,u){var s,l,c,f,h=this;if(i=i||v,!u&&x(t.watchId))return n=n||this.nextId(),void this.if_("i",this.lazyAssign(n,this.computedMember("i",t.watchId)),this.lazyRecurse(t,n,r,i,a,!0));switch(t.type){case to.Program:o(t.body,function(n,r){h.recurse(n.expression,e,e,function(t){l=t}),r!==t.body.length-1?h.current().body.push(l,";"):h.return_(l)});break;case to.Literal:f=this.escape(t.value),this.assign(n,f),i(f);break;case to.UnaryExpression:this.recurse(t.argument,e,e,function(t){l=t}),f=t.operator+"("+this.ifDefined(l,0)+")",this.assign(n,f),i(f);break;case to.BinaryExpression:this.recurse(t.left,e,e,function(t){s=t}),this.recurse(t.right,e,e,function(t){l=t}),f="+"===t.operator?this.plus(s,l):"-"===t.operator?this.ifDefined(s,0)+t.operator+this.ifDefined(l,0):"("+s+")"+t.operator+"("+l+")",this.assign(n,f),i(f);break;case to.LogicalExpression:n=n||this.nextId(),h.recurse(t.left,n),h.if_("&&"===t.operator?n:h.not(n),h.lazyRecurse(t.right,n)),i(n);break;case to.ConditionalExpression:n=n||this.nextId(),h.recurse(t.test,n),h.if_(n,h.lazyRecurse(t.alternate,n),h.lazyRecurse(t.consequent,n)),i(n);break;case to.Identifier:n=n||this.nextId(),r&&(r.context="inputs"===h.stage?"s":this.assign(this.nextId(),this.getHasOwnProperty("l",t.name)+"?l:s"),r.computed=!1,r.name=t.name),Yn(t.name),h.if_("inputs"===h.stage||h.not(h.getHasOwnProperty("l",t.name)),function(){h.if_("inputs"===h.stage||"s",function(){a&&1!==a&&h.if_(h.not(h.nonComputedMember("s",t.name)),h.lazyAssign(h.nonComputedMember("s",t.name),"{}")),h.assign(n,h.nonComputedMember("s",t.name))})},n&&h.lazyAssign(n,h.nonComputedMember("l",t.name))),(h.state.expensiveChecks||le(t.name))&&h.addEnsureSafeObject(n),i(n);break;case to.MemberExpression:s=r&&(r.context=this.nextId())||this.nextId(),n=n||this.nextId(),h.recurse(t.object,s,e,function(){h.if_(h.notNull(s),function(){t.computed?(l=h.nextId(),h.recurse(t.property,l),h.getStringValue(l),h.addEnsureSafeMemberName(l),a&&1!==a&&h.if_(h.not(h.computedMember(s,l)),h.lazyAssign(h.computedMember(s,l),"{}")),f=h.ensureSafeObject(h.computedMember(s,l)),h.assign(n,f),r&&(r.computed=!0,r.name=l)):(Yn(t.property.name),a&&1!==a&&h.if_(h.not(h.nonComputedMember(s,t.property.name)),h.lazyAssign(h.nonComputedMember(s,t.property.name),"{}")),f=h.nonComputedMember(s,t.property.name),(h.state.expensiveChecks||le(t.property.name))&&(f=h.ensureSafeObject(f)),h.assign(n,f),r&&(r.computed=!1,r.name=t.property.name))},function(){h.assign(n,"undefined")}),i(n)},!!a);break;case to.CallExpression:n=n||this.nextId(),t.filter?(l=h.filter(t.callee.name),c=[],o(t.arguments,function(t){var n=h.nextId();h.recurse(t,n),c.push(n)}),f=l+"("+c.join(",")+")",h.assign(n,f),i(n)):(l=h.nextId(),s={},c=[],h.recurse(t.callee,l,s,function(){h.if_(h.notNull(l),function(){h.addEnsureSafeFunction(l),o(t.arguments,function(t){h.recurse(t,h.nextId(),e,function(t){c.push(h.ensureSafeObject(t))})}),s.name?(h.state.expensiveChecks||h.addEnsureSafeObject(s.context),f=h.member(s.context,s.name,s.computed)+"("+c.join(",")+")"):f=l+"("+c.join(",")+")",f=h.ensureSafeObject(f),h.assign(n,f)},function(){h.assign(n,"undefined")}),i(n)}));break;case to.AssignmentExpression:if(l=this.nextId(),s={},!re(t.left))throw Yi("lval","Trying to assing a value to a non l-value");this.recurse(t.left,e,s,function(){h.if_(h.notNull(s.context),function(){h.recurse(t.right,l),h.addEnsureSafeObject(h.member(s.context,s.name,s.computed)),h.addEnsureSafeAssignContext(s.context),f=h.member(s.context,s.name,s.computed)+t.operator+l,h.assign(n,f),i(n||f)})},1);break;case to.ArrayExpression:c=[],o(t.elements,function(t){h.recurse(t,h.nextId(),e,function(t){c.push(t)})}),f="["+c.join(",")+"]",this.assign(n,f),i(f);break;case to.ObjectExpression:c=[],o(t.properties,function(t){h.recurse(t.value,h.nextId(),e,function(n){c.push(h.escape(t.key.type===to.Identifier?t.key.name:""+t.key.value)+":"+n)})}),f="{"+c.join(",")+"}",this.assign(n,f),i(f);break;case to.ThisExpression:this.assign(n,"s"),i("s");break;case to.NGValueParameter:this.assign(n,"v"),i("v")}},getHasOwnProperty:function(t,n){var e=t+"."+n,r=this.current().own;return r.hasOwnProperty(e)||(r[e]=this.nextId(!1,t+"&&("+this.escape(n)+" in "+t+")")),r[e]},assign:function(t,n){return t?(this.current().body.push(t,"=",n,";"),t):void 0},filter:function(t){return this.state.filters.hasOwnProperty(t)||(this.state.filters[t]=this.nextId(!0)),this.state.filters[t]},ifDefined:function(t,n){return"ifDefined("+t+","+this.escape(n)+")"},plus:function(t,n){return"plus("+t+","+n+")"},return_:function(t){this.current().body.push("return ",t,";")},if_:function(t,n,e){if(t===!0)n();else{var r=this.current().body;r.push("if(",t,"){"),n(),r.push("}"),e&&(r.push("else{"),e(),r.push("}"))}},not:function(t){return"!("+t+")"},notNull:function(t){return t+"!=null"},nonComputedMember:function(t,n){return t+"."+n},computedMember:function(t,n){return t+"["+n+"]"},member:function(t,n,e){return e?this.computedMember(t,n):this.nonComputedMember(t,n)},addEnsureSafeObject:function(t){this.current().body.push(this.ensureSafeObject(t),";")},addEnsureSafeMemberName:function(t){this.current().body.push(this.ensureSafeMemberName(t),";")},addEnsureSafeFunction:function(t){this.current().body.push(this.ensureSafeFunction(t),";")},addEnsureSafeAssignContext:function(t){this.current().body.push(this.ensureSafeAssignContext(t),";")},ensureSafeObject:function(t){return"ensureSafeObject("+t+",text)"},ensureSafeMemberName:function(t){return"ensureSafeMemberName("+t+",text)"},ensureSafeFunction:function(t){return"ensureSafeFunction("+t+",text)"},getStringValue:function(t){this.assign(t,"getStringValue("+t+",text)")},ensureSafeAssignContext:function(t){return"ensureSafeAssignContext("+t+",text)"},lazyRecurse:function(t,n,e,r,i,o){var a=this;return function(){a.recurse(t,n,e,r,i,o)}},lazyAssign:function(t,n){var e=this;return function(){e.assign(t,n)}},stringEscapeRegex:/[^ a-zA-Z0-9]/g,stringEscapeFn:function(t){return"\\u"+("0000"+t.charCodeAt(0).toString(16)).slice(-4)},escape:function(t){if(C(t))return"'"+t.replace(this.stringEscapeRegex,this.stringEscapeFn)+"'";if(S(t))return t.toString();if(t===!0)return"true";if(t===!1)return"false";if(null===t)return"null";if("undefined"==typeof t)return"undefined";throw Yi("esc","IMPOSSIBLE")},nextId:function(t,n){var e="v"+this.state.nextId++;return t||this.current().vars.push(e+(n?"="+n:"")),e},current:function(){return this.state[this.state.computing]}},se.prototype={compile:function(t,n){var e=this,r=this.astBuilder.ast(t);this.expression=t,this.expensiveChecks=n,ne(r,e.$filter);var i,a;(i=ie(r))&&(a=this.recurse(i));var u,s=ee(r.body);s&&(u=[],o(s,function(t,n){var r=e.recurse(t);t.input=r,u.push(r),t.watchId=n}));var l=[];o(r.body,function(t){l.push(e.recurse(t.expression))});var c=0===r.body.length?function(){}:1===r.body.length?l[0]:function(t,n){var e;return o(l,function(r){e=r(t,n)}),e};return a&&(c.assign=function(t,n,e){return a(t,e,n)}),u&&(c.inputs=u),c.literal=oe(r),c.constant=ae(r),c},recurse:function(t,n,r){var i,a,u,s=this;if(t.input)return this.inputs(t.input,t.watchId);switch(t.type){case to.Literal:return this.value(t.value,n);case to.UnaryExpression:return a=this.recurse(t.argument),this["unary"+t.operator](a,n);case to.BinaryExpression:return i=this.recurse(t.left),a=this.recurse(t.right),this["binary"+t.operator](i,a,n);case to.LogicalExpression:return i=this.recurse(t.left),a=this.recurse(t.right),this["binary"+t.operator](i,a,n);case to.ConditionalExpression:return this["ternary?:"](this.recurse(t.test),this.recurse(t.alternate),this.recurse(t.consequent),n);case to.Identifier:return Yn(t.name,s.expression),s.identifier(t.name,s.expensiveChecks||le(t.name),n,r,s.expression);case to.MemberExpression:return i=this.recurse(t.object,!1,!!r),t.computed||(Yn(t.property.name,s.expression),a=t.property.name),t.computed&&(a=this.recurse(t.property)),t.computed?this.computedMember(i,a,n,r,s.expression):this.nonComputedMember(i,a,s.expensiveChecks,n,r,s.expression);case to.CallExpression:return u=[],o(t.arguments,function(t){u.push(s.recurse(t))}),t.filter&&(a=this.$filter(t.callee.name)),t.filter||(a=this.recurse(t.callee,!0)),t.filter?function(t,r,i,o){for(var s=[],l=0;l<u.length;++l)s.push(u[l](t,r,i,o));var c=a.apply(e,s,o);return n?{context:e,name:e,value:c}:c}:function(t,e,r,i){var o,l=a(t,e,r,i);if(null!=l.value){Xn(l.context,s.expression),Zn(l.value,s.expression);for(var c=[],f=0;f<u.length;++f)c.push(Xn(u[f](t,e,r,i),s.expression));o=Xn(l.value.apply(l.context,c),s.expression)}return n?{value:o}:o};case to.AssignmentExpression:return i=this.recurse(t.left,!0,1),a=this.recurse(t.right),function(t,e,r,o){var u=i(t,e,r,o),l=a(t,e,r,o);return Xn(u.value,s.expression),Jn(u.context),u.context[u.name]=l,n?{value:l}:l};case to.ArrayExpression:return u=[],o(t.elements,function(t){u.push(s.recurse(t))}),function(t,e,r,i){for(var o=[],a=0;a<u.length;++a)o.push(u[a](t,e,r,i));return n?{value:o}:o};case to.ObjectExpression:return u=[],o(t.properties,function(t){u.push({key:t.key.type===to.Identifier?t.key.name:""+t.key.value,value:s.recurse(t.value)})}),function(t,e,r,i){for(var o={},a=0;a<u.length;++a)o[u[a].key]=u[a].value(t,e,r,i);return n?{value:o}:o};case to.ThisExpression:return function(t){return n?{value:t}:t};case to.NGValueParameter:return function(t,e,r,i){return n?{value:r}:r}}},"unary+":function(t,n){return function(e,r,i,o){var a=t(e,r,i,o);return a=x(a)?+a:0,n?{value:a}:a}},"unary-":function(t,n){return function(e,r,i,o){var a=t(e,r,i,o);return a=x(a)?-a:0,n?{value:a}:a}},"unary!":function(t,n){return function(e,r,i,o){var a=!t(e,r,i,o);return n?{value:a}:a}},"binary+":function(t,n,e){return function(r,i,o,a){var u=t(r,i,o,a),s=n(r,i,o,a),l=Qn(u,s);return e?{value:l}:l}},"binary-":function(t,n,e){return function(r,i,o,a){var u=t(r,i,o,a),s=n(r,i,o,a),l=(x(u)?u:0)-(x(s)?s:0);return e?{value:l}:l}},"binary*":function(t,n,e){return function(r,i,o,a){var u=t(r,i,o,a)*n(r,i,o,a);return e?{value:u}:u}},"binary/":function(t,n,e){return function(r,i,o,a){var u=t(r,i,o,a)/n(r,i,o,a);return e?{value:u}:u}},"binary%":function(t,n,e){return function(r,i,o,a){var u=t(r,i,o,a)%n(r,i,o,a);return e?{value:u}:u}},"binary===":function(t,n,e){return function(r,i,o,a){var u=t(r,i,o,a)===n(r,i,o,a);return e?{value:u}:u}},"binary!==":function(t,n,e){return function(r,i,o,a){var u=t(r,i,o,a)!==n(r,i,o,a);return e?{value:u}:u}},"binary==":function(t,n,e){return function(r,i,o,a){var u=t(r,i,o,a)==n(r,i,o,a);return e?{value:u}:u}},"binary!=":function(t,n,e){return function(r,i,o,a){var u=t(r,i,o,a)!=n(r,i,o,a);return e?{value:u}:u}},"binary<":function(t,n,e){return function(r,i,o,a){var u=t(r,i,o,a)<n(r,i,o,a);return e?{value:u}:u}},"binary>":function(t,n,e){return function(r,i,o,a){var u=t(r,i,o,a)>n(r,i,o,a);return e?{value:u}:u}},"binary<=":function(t,n,e){return function(r,i,o,a){var u=t(r,i,o,a)<=n(r,i,o,a);return e?{value:u}:u}},"binary>=":function(t,n,e){return function(r,i,o,a){var u=t(r,i,o,a)>=n(r,i,o,a);return e?{value:u}:u}},"binary&&":function(t,n,e){return function(r,i,o,a){var u=t(r,i,o,a)&&n(r,i,o,a);return e?{value:u}:u}},"binary||":function(t,n,e){return function(r,i,o,a){var u=t(r,i,o,a)||n(r,i,o,a);return e?{value:u}:u}},"ternary?:":function(t,n,e,r){return function(i,o,a,u){var s=t(i,o,a,u)?n(i,o,a,u):e(i,o,a,u);return r?{value:s}:s}},value:function(t,n){return function(){return n?{context:e,name:e,value:t}:t}},identifier:function(t,n,r,i,o){return function(a,u,s,l){var c=u&&t in u?u:a;i&&1!==i&&c&&!c[t]&&(c[t]={});var f=c?c[t]:e;return n&&Xn(f,o),r?{context:c,name:t,value:f}:f}},computedMember:function(t,n,e,r,i){return function(o,a,u,s){var l,c,f=t(o,a,u,s);return null!=f&&(l=n(o,a,u,s),l=Gn(l),Yn(l,i),r&&1!==r&&f&&!f[l]&&(f[l]={}),c=f[l],Xn(c,i)),e?{context:f,name:l,value:c}:c}},nonComputedMember:function(t,n,r,i,o,a){return function(u,s,l,c){var f=t(u,s,l,c);o&&1!==o&&f&&!f[n]&&(f[n]={});var h=null!=f?f[n]:e;return(r||le(n))&&Xn(h,a),i?{context:f,name:n,value:h}:h}},inputs:function(t,n){return function(e,r,i,o){return o?o[n]:t(e,r,i)}}};var no=function(t,n,e){this.lexer=t,this.$filter=n,this.options=e,this.ast=new to(this.lexer),this.astCompiler=e.csp?new se(this.ast,n):new ue(this.ast,n)};no.prototype={constructor:no,parse:function(t){return this.astCompiler.compile(t,this.options.expensiveChecks)}};var eo=(gt(),gt(),Object.prototype.valueOf),ro=r("$sce"),io={
+HTML:"html",CSS:"css",URL:"url",RESOURCE_URL:"resourceUrl",JS:"js"},Pi=r("$compile"),oo=n.createElement("a"),ao=Me(t.location.href);Ee.$inject=["$document"],Oe.$inject=["$provide"],Re.$inject=["$locale"],De.$inject=["$locale"];var uo=".",so={yyyy:ze("FullYear",4),yy:ze("FullYear",2,0,!0),y:ze("FullYear",1),MMMM:qe("Month"),MMM:qe("Month",!0),MM:ze("Month",2,1),M:ze("Month",1,1),dd:ze("Date",2),d:ze("Date",1),HH:ze("Hours",2),H:ze("Hours",1),hh:ze("Hours",2,-12),h:ze("Hours",1,-12),mm:ze("Minutes",2),m:ze("Minutes",1),ss:ze("Seconds",2),s:ze("Seconds",1),sss:ze("Milliseconds",3),EEEE:qe("Day"),EEE:qe("Day",!0),a:He,Z:Ve,ww:Ue(2),w:Ue(1),G:Ye,GG:Ye,GGG:Ye,GGGG:Ge},lo=/((?:[^yMdHhmsaZEwG']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|d+|H+|h+|m+|s+|a|Z|G+|w+))(.*)/,co=/^\-?\d+$/;Xe.$inject=["$locale"];var fo=m(xr),ho=m(wr);Ke.$inject=["$parse"];var po=m({restrict:"E",compile:function(t,n){return n.href||n.xlinkHref?void 0:function(t,n){if("a"===n[0].nodeName.toLowerCase()){var e="[object SVGAnimatedString]"===Tr.call(n.prop("href"))?"xlink:href":"href";n.on("click",function(t){n.attr(e)||t.preventDefault()})}}}}),vo={};o(di,function(t,n){function e(t,e,i){t.$watch(i[r],function(t){i.$set(n,!!t)})}if("multiple"!=t){var r=cn("ng-"+n),i=e;"checked"===t&&(i=function(t,n,i){i.ngModel!==i[r]&&e(t,n,i)}),vo[r]=function(){return{restrict:"A",priority:100,link:i}}}}),o(gi,function(t,n){vo[n]=function(){return{priority:100,link:function(t,e,r){if("ngPattern"===n&&"/"==r.ngPattern.charAt(0)){var i=r.ngPattern.match(yr);if(i)return void r.$set("ngPattern",new RegExp(i[1],i[2]))}t.$watch(r[n],function(t){r.$set(n,t)})}}}}),o(["src","srcset","href"],function(t){var n=cn("ng-"+t);vo[n]=function(){return{priority:99,link:function(e,r,i){var o=t,a=t;"href"===t&&"[object SVGAnimatedString]"===Tr.call(r.prop("href"))&&(a="xlinkHref",i.$attr[a]="xlink:href",o=null),i.$observe(n,function(n){return n?(i.$set(a,n),void(_r&&o&&r.prop(o,i[a]))):void("href"===t&&i.$set(a,null))})}}}});var go={$addControl:v,$$renameControl:tr,$removeControl:v,$setValidity:v,$setDirty:v,$setPristine:v,$setSubmitted:v},mo="ng-submitted";nr.$inject=["$element","$attrs","$scope","$animate","$interpolate"];var yo=function(t){return["$timeout","$parse",function(n,r){function i(t){return""===t?r('this[""]').assign:r(t).assign||v}var o={name:"form",restrict:t?"EAC":"E",require:["form","^^?form"],controller:nr,compile:function(r,o){r.addClass(Ko).addClass(Zo);var a=o.name?"name":t&&o.ngForm?"ngForm":!1;return{pre:function(t,r,o,u){var s=u[0];if(!("action"in o)){var l=function(n){t.$apply(function(){s.$commitViewValue(),s.$setSubmitted()}),n.preventDefault()};ei(r[0],"submit",l),r.on("$destroy",function(){n(function(){ri(r[0],"submit",l)},0,!1)})}var c=u[1]||s.$$parentForm;c.$addControl(s);var h=a?i(s.$name):v;a&&(h(t,s),o.$observe(a,function(n){s.$name!==n&&(h(t,e),s.$$parentForm.$$renameControl(s,n),(h=i(s.$name))(t,s))})),r.on("$destroy",function(){s.$$parentForm.$removeControl(s),h(t,e),f(s,go)})}}}};return o}]},$o=yo(),xo=yo(!0),bo=/\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z)/,wo=/^(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?$/,Co=/^[a-z0-9!#$%&'*+\/=?^_`{|}~.-]+@[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$/i,So=/^\s*(\-|\+)?(\d+|(\d*(\.\d*)))([eE][+-]?\d+)?\s*$/,_o=/^(\d{4})-(\d{2})-(\d{2})$/,Mo=/^(\d{4})-(\d\d)-(\d\d)T(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,ko=/^(\d{4})-W(\d\d)$/,Ao=/^(\d{4})-(\d\d)$/,Eo=/^(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,Po={text:rr,date:ur("date",_o,ar(_o,["yyyy","MM","dd"]),"yyyy-MM-dd"),"datetime-local":ur("datetimelocal",Mo,ar(Mo,["yyyy","MM","dd","HH","mm","ss","sss"]),"yyyy-MM-ddTHH:mm:ss.sss"),time:ur("time",Eo,ar(Eo,["HH","mm","ss","sss"]),"HH:mm:ss.sss"),week:ur("week",ko,or,"yyyy-Www"),month:ur("month",Ao,ar(Ao,["yyyy","MM"]),"yyyy-MM"),number:lr,url:cr,email:fr,radio:hr,checkbox:dr,hidden:v,button:v,submit:v,reset:v,file:v},Oo=["$browser","$sniffer","$filter","$parse",function(t,n,e,r){return{restrict:"E",require:["?ngModel"],link:{pre:function(i,o,a,u){u[0]&&(Po[xr(a.type)]||Po.text)(i,o,a,u[0],n,t,e,r)}}}}],To=/^(true|false|\d+)$/,Lo=function(){return{restrict:"A",priority:100,compile:function(t,n){return To.test(n.ngValue)?function(t,n,e){e.$set("value",t.$eval(e.ngValue))}:function(t,n,e){t.$watch(e.ngValue,function(t){e.$set("value",t)})}}}},jo=["$compile",function(t){return{restrict:"AC",compile:function(n){return t.$$addBindingClass(n),function(n,e,r){t.$$addBindingInfo(e,r.ngBind),e=e[0],n.$watch(r.ngBind,function(t){e.textContent=$(t)?"":t})}}}}],No=["$interpolate","$compile",function(t,n){return{compile:function(e){return n.$$addBindingClass(e),function(e,r,i){var o=t(r.attr(i.$attr.ngBindTemplate));n.$$addBindingInfo(r,o.expressions),r=r[0],i.$observe("ngBindTemplate",function(t){r.textContent=$(t)?"":t})}}}}],Ro=["$sce","$parse","$compile",function(t,n,e){return{restrict:"A",compile:function(r,i){var o=n(i.ngBindHtml),a=n(i.ngBindHtml,function(t){return(t||"").toString()});return e.$$addBindingClass(r),function(n,r,i){e.$$addBindingInfo(r,i.ngBindHtml),n.$watch(a,function(){r.html(t.getTrustedHtml(o(n))||"")})}}}}],Do=m({restrict:"A",require:"ngModel",link:function(t,n,e,r){r.$viewChangeListeners.push(function(){t.$eval(e.ngChange)})}}),Fo=vr("",!0),Io=vr("Odd",0),zo=vr("Even",1),qo=Qe({compile:function(t,n){n.$set("ngCloak",e),t.removeClass("ng-cloak")}}),Vo=[function(){return{restrict:"A",scope:!0,controller:"@",priority:500}}],Bo={},Wo={blur:!0,focus:!0};o("click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave keydown keyup keypress submit focus blur copy cut paste".split(" "),function(t){var n=cn("ng-"+t);Bo[n]=["$parse","$rootScope",function(e,r){return{restrict:"A",compile:function(i,o){var a=e(o[n],null,!0);return function(n,e){e.on(t,function(e){var i=function(){a(n,{$event:e})};Wo[t]&&r.$$phase?n.$evalAsync(i):n.$apply(i)})}}}}]});var Uo=["$animate",function(t){return{multiElement:!0,transclude:"element",priority:600,terminal:!0,restrict:"A",$$tlb:!0,link:function(e,r,i,o,a){var u,s,l;e.$watch(i.ngIf,function(e){e?s||a(function(e,o){s=o,e[e.length++]=n.createComment(" end ngIf: "+i.ngIf+" "),u={clone:e},t.enter(e,r.parent(),r)}):(l&&(l.remove(),l=null),s&&(s.$destroy(),s=null),u&&(l=vt(u.clone),t.leave(l).then(function(){l=null}),u=null))})}}}],Ho=["$templateRequest","$anchorScroll","$animate",function(t,n,e){return{restrict:"ECA",priority:400,terminal:!0,transclude:"element",controller:Nr.noop,compile:function(r,i){var o=i.ngInclude||i.src,a=i.onload||"",u=i.autoscroll;return function(r,i,s,l,c){var f,h,p,d=0,v=function(){h&&(h.remove(),h=null),f&&(f.$destroy(),f=null),p&&(e.leave(p).then(function(){h=null}),h=p,p=null)};r.$watch(o,function(o){var s=function(){!x(u)||u&&!r.$eval(u)||n()},h=++d;o?(t(o,!0).then(function(t){if(h===d){var n=r.$new();l.template=t;var u=c(n,function(t){v(),e.enter(t,null,i).then(s)});f=n,p=u,f.$emit("$includeContentLoaded",o),r.$eval(a)}},function(){h===d&&(v(),r.$emit("$includeContentError",o))}),r.$emit("$includeContentRequested",o)):(v(),l.template=null)})}}}}],Yo=["$compile",function(t){return{restrict:"ECA",priority:-400,require:"ngInclude",link:function(e,r,i,o){return/SVG/.test(r[0].toString())?(r.empty(),void t(Mt(o.template,n).childNodes)(e,function(t){r.append(t)},{futureParentElement:r})):(r.html(o.template),void t(r.contents())(e))}}}],Go=Qe({priority:450,compile:function(){return{pre:function(t,n,e){t.$eval(e.ngInit)}}}}),Xo=function(){return{restrict:"A",priority:100,require:"ngModel",link:function(t,n,r,i){var a=n.attr(r.$attr.ngList)||", ",u="false"!==r.ngTrim,s=u?zr(a):a,l=function(t){if(!$(t)){var n=[];return t&&o(t.split(s),function(t){t&&n.push(u?zr(t):t)}),n}};i.$parsers.push(l),i.$formatters.push(function(t){return Fr(t)?t.join(a):e}),i.$isEmpty=function(t){return!t||!t.length}}}},Zo="ng-valid",Jo="ng-invalid",Ko="ng-pristine",Qo="ng-dirty",ta="ng-untouched",na="ng-touched",ea="ng-pending",ra=r("ngModel"),ia=["$scope","$exceptionHandler","$attrs","$element","$parse","$animate","$timeout","$rootScope","$q","$interpolate",function(t,n,r,i,a,u,s,l,c,f){this.$viewValue=Number.NaN,this.$modelValue=Number.NaN,this.$$rawModelValue=e,this.$validators={},this.$asyncValidators={},this.$parsers=[],this.$formatters=[],this.$viewChangeListeners=[],this.$untouched=!0,this.$touched=!1,this.$pristine=!0,this.$dirty=!1,this.$valid=!0,this.$invalid=!1,this.$error={},this.$$success={},this.$pending=e,this.$name=f(r.name||"",!1)(t),this.$$parentForm=go;var h,p=a(r.ngModel),d=p.assign,g=p,m=d,y=null,b=this;this.$$setOptions=function(t){if(b.$options=t,t&&t.getterSetter){var n=a(r.ngModel+"()"),e=a(r.ngModel+"($$$p)");g=function(t){var e=p(t);return M(e)&&(e=n(t)),e},m=function(t,n){M(p(t))?e(t,{$$$p:b.$modelValue}):d(t,b.$modelValue)}}else if(!p.assign)throw ra("nonassign","Expression '{0}' is non-assignable. Element: {1}",r.ngModel,K(i))},this.$render=v,this.$isEmpty=function(t){return $(t)||""===t||null===t||t!==t};var w=0;gr({ctrl:this,$element:i,set:function(t,n){t[n]=!0},unset:function(t,n){delete t[n]},$animate:u}),this.$setPristine=function(){b.$dirty=!1,b.$pristine=!0,u.removeClass(i,Qo),u.addClass(i,Ko)},this.$setDirty=function(){b.$dirty=!0,b.$pristine=!1,u.removeClass(i,Ko),u.addClass(i,Qo),b.$$parentForm.$setDirty()},this.$setUntouched=function(){b.$touched=!1,b.$untouched=!0,u.setClass(i,ta,na)},this.$setTouched=function(){b.$touched=!0,b.$untouched=!1,u.setClass(i,na,ta)},this.$rollbackViewValue=function(){s.cancel(y),b.$viewValue=b.$$lastCommittedViewValue,b.$render()},this.$validate=function(){if(!S(b.$modelValue)||!isNaN(b.$modelValue)){var t=b.$$lastCommittedViewValue,n=b.$$rawModelValue,r=b.$valid,i=b.$modelValue,o=b.$options&&b.$options.allowInvalid;b.$$runValidators(n,t,function(t){o||r===t||(b.$modelValue=t?n:e,b.$modelValue!==i&&b.$$writeModelToScope())})}},this.$$runValidators=function(t,n,r){function i(){var t=b.$$parserName||"parse";return $(h)?(s(t,null),!0):(h||(o(b.$validators,function(t,n){s(n,null)}),o(b.$asyncValidators,function(t,n){s(n,null)})),s(t,h),h)}function a(){var e=!0;return o(b.$validators,function(r,i){var o=r(t,n);e=e&&o,s(i,o)}),e?!0:(o(b.$asyncValidators,function(t,n){s(n,null)}),!1)}function u(){var r=[],i=!0;o(b.$asyncValidators,function(o,a){var u=o(t,n);if(!j(u))throw ra("$asyncValidators","Expected asynchronous validator to return a promise but got '{0}' instead.",u);s(a,e),r.push(u.then(function(){s(a,!0)},function(t){i=!1,s(a,!1)}))}),r.length?c.all(r).then(function(){l(i)},v):l(!0)}function s(t,n){f===w&&b.$setValidity(t,n)}function l(t){f===w&&r(t)}w++;var f=w;return i()&&a()?void u():void l(!1)},this.$commitViewValue=function(){var t=b.$viewValue;s.cancel(y),(b.$$lastCommittedViewValue!==t||""===t&&b.$$hasNativeValidators)&&(b.$$lastCommittedViewValue=t,b.$pristine&&this.$setDirty(),this.$$parseAndValidate())},this.$$parseAndValidate=function(){function n(){b.$modelValue!==a&&b.$$writeModelToScope()}var r=b.$$lastCommittedViewValue,i=r;if(h=$(i)?e:!0)for(var o=0;o<b.$parsers.length;o++)if(i=b.$parsers[o](i),$(i)){h=!1;break}S(b.$modelValue)&&isNaN(b.$modelValue)&&(b.$modelValue=g(t));var a=b.$modelValue,u=b.$options&&b.$options.allowInvalid;b.$$rawModelValue=i,u&&(b.$modelValue=i,n()),b.$$runValidators(i,b.$$lastCommittedViewValue,function(t){u||(b.$modelValue=t?i:e,n())})},this.$$writeModelToScope=function(){m(t,b.$modelValue),o(b.$viewChangeListeners,function(t){try{t()}catch(e){n(e)}})},this.$setViewValue=function(t,n){b.$viewValue=t,b.$options&&!b.$options.updateOnDefault||b.$$debounceViewValueCommit(n)},this.$$debounceViewValueCommit=function(n){var e,r=0,i=b.$options;i&&x(i.debounce)&&(e=i.debounce,S(e)?r=e:S(e[n])?r=e[n]:S(e["default"])&&(r=e["default"])),s.cancel(y),r?y=s(function(){b.$commitViewValue()},r):l.$$phase?b.$commitViewValue():t.$apply(function(){b.$commitViewValue()})},t.$watch(function(){var n=g(t);if(n!==b.$modelValue&&(b.$modelValue===b.$modelValue||n===n)){b.$modelValue=b.$$rawModelValue=n,h=e;for(var r=b.$formatters,i=r.length,o=n;i--;)o=r[i](o);b.$viewValue!==o&&(b.$viewValue=b.$$lastCommittedViewValue=o,b.$render(),b.$$runValidators(n,o,v))}return n})}],oa=["$rootScope",function(t){return{restrict:"A",require:["ngModel","^?form","^?ngModelOptions"],controller:ia,priority:1,compile:function(n){return n.addClass(Ko).addClass(ta).addClass(Zo),{pre:function(t,n,e,r){var i=r[0],o=r[1]||i.$$parentForm;i.$$setOptions(r[2]&&r[2].$options),o.$addControl(i),e.$observe("name",function(t){i.$name!==t&&i.$$parentForm.$$renameControl(i,t)}),t.$on("$destroy",function(){i.$$parentForm.$removeControl(i)})},post:function(n,e,r,i){var o=i[0];o.$options&&o.$options.updateOn&&e.on(o.$options.updateOn,function(t){o.$$debounceViewValueCommit(t&&t.type)}),e.on("blur",function(e){o.$touched||(t.$$phase?n.$evalAsync(o.$setTouched):n.$apply(o.$setTouched))})}}}}}],aa=/(\s+|^)default(\s+|$)/,ua=function(){return{restrict:"A",controller:["$scope","$attrs",function(t,n){var e=this;this.$options=z(t.$eval(n.ngModelOptions)),x(this.$options.updateOn)?(this.$options.updateOnDefault=!1,this.$options.updateOn=zr(this.$options.updateOn.replace(aa,function(){return e.$options.updateOnDefault=!0," "}))):this.$options.updateOnDefault=!0}]}},sa=Qe({terminal:!0,priority:1e3}),la=r("ngOptions"),ca=/^\s*([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+group\s+by\s+([\s\S]+?))?(?:\s+disable\s+when\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]+?))?$/,fa=["$compile","$parse",function(t,e){function r(t,n,r){function o(t,n,e,r,i){this.selectValue=t,this.viewValue=n,this.label=e,this.group=r,this.disabled=i}function a(t){var n;if(!l&&i(t))n=t;else{n=[];for(var e in t)t.hasOwnProperty(e)&&"$"!==e.charAt(0)&&n.push(e)}return n}var u=t.match(ca);if(!u)throw la("iexp","Expected expression in form of '_select_ (as _label_)? for (_key_,)?_value_ in _collection_' but got '{0}'. Element: {1}",t,K(n));var s=u[5]||u[7],l=u[6],c=/ as /.test(u[0])&&u[1],f=u[9],h=e(u[2]?u[1]:s),p=c&&e(c),d=p||h,v=f&&e(f),g=f?function(t,n){return v(r,n)}:function(t){return Gt(t)},m=function(t,n){return g(t,C(t,n))},y=e(u[2]||u[1]),$=e(u[3]||""),x=e(u[4]||""),b=e(u[8]),w={},C=l?function(t,n){return w[l]=n,w[s]=t,w}:function(t){return w[s]=t,w};return{trackBy:f,getTrackByValue:m,getWatchables:e(b,function(t){var n=[];t=t||[];for(var e=a(t),i=e.length,o=0;i>o;o++){var s=t===e?o:e[o],l=(t[s],C(t[s],s)),c=g(t[s],l);if(n.push(c),u[2]||u[1]){var f=y(r,l);n.push(f)}if(u[4]){var h=x(r,l);n.push(h)}}return n}),getOptions:function(){for(var t=[],n={},e=b(r)||[],i=a(e),u=i.length,s=0;u>s;s++){var l=e===i?s:i[s],c=e[l],h=C(c,l),p=d(r,h),v=g(p,h),w=y(r,h),S=$(r,h),_=x(r,h),M=new o(v,p,w,S,_);t.push(M),n[v]=M}return{items:t,selectValueMap:n,getOptionFromViewValue:function(t){return n[m(t)]},getViewValueFromOption:function(t){return f?Nr.copy(t.viewValue):t.viewValue}}}}}var a=n.createElement("option"),u=n.createElement("optgroup");return{restrict:"A",terminal:!0,require:["select","?ngModel"],link:function(n,e,i,s){function l(t,n){t.element=n,n.disabled=t.disabled,t.label!==n.label&&(n.label=t.label,n.textContent=t.label),t.value!==n.value&&(n.value=t.selectValue)}function c(t,n,e,r){var i;return n&&xr(n.nodeName)===e?i=n:(i=r.cloneNode(!1),n?t.insertBefore(i,n):t.appendChild(i)),i}function f(t){for(var n;t;)n=t.nextSibling,Vt(t),t=n}function h(t){var n=v&&v[0],e=w&&w[0];if(n||e)for(;t&&(t===n||t===e||n&&n.nodeType===Zr);)t=t.nextSibling;return t}function p(){var t=C&&g.readValue();C=S.getOptions();var n={},r=e[0].firstChild;if(b&&e.prepend(v),r=h(r),C.items.forEach(function(t){var i,o,s;t.group?(i=n[t.group],i||(o=c(e[0],r,"optgroup",u),r=o.nextSibling,o.label=t.group,i=n[t.group]={groupElement:o,currentOptionElement:o.firstChild}),s=c(i.groupElement,i.currentOptionElement,"option",a),l(t,s),i.currentOptionElement=s.nextSibling):(s=c(e[0],r,"option",a),l(t,s),r=s.nextSibling)}),Object.keys(n).forEach(function(t){f(n[t].currentOptionElement)}),f(r),d.$render(),!d.$isEmpty(t)){var i=g.readValue();(S.trackBy?V(t,i):t===i)||(d.$setViewValue(i),d.$render())}}var d=s[1];if(d){for(var v,g=s[0],m=i.multiple,y=0,$=e.children(),x=$.length;x>y;y++)if(""===$[y].value){v=$.eq(y);break}var b=!!v,w=Mr(a.cloneNode(!1));w.val("?");var C,S=r(i.ngOptions,e,n),_=function(){b||e.prepend(v),e.val(""),v.prop("selected",!0),v.attr("selected",!0)},M=function(){b||v.remove()},k=function(){e.prepend(w),e.val("?"),w.prop("selected",!0),w.attr("selected",!0)},A=function(){w.remove()};m?(d.$isEmpty=function(t){return!t||0===t.length},g.writeValue=function(t){C.items.forEach(function(t){t.element.selected=!1}),t&&t.forEach(function(t){var n=C.getOptionFromViewValue(t);n&&!n.disabled&&(n.element.selected=!0)})},g.readValue=function(){var t=e.val()||[],n=[];return o(t,function(t){var e=C.selectValueMap[t];e&&!e.disabled&&n.push(C.getViewValueFromOption(e))}),n},S.trackBy&&n.$watchCollection(function(){return Fr(d.$viewValue)?d.$viewValue.map(function(t){return S.getTrackByValue(t)}):void 0},function(){d.$render()})):(g.writeValue=function(t){var n=C.getOptionFromViewValue(t);n&&!n.disabled?e[0].value!==n.selectValue&&(A(),M(),e[0].value=n.selectValue,n.element.selected=!0,n.element.setAttribute("selected","selected")):null===t||b?(A(),_()):(M(),k())},g.readValue=function(){var t=C.selectValueMap[e.val()];return t&&!t.disabled?(M(),A(),C.getViewValueFromOption(t)):null},S.trackBy&&n.$watch(function(){return S.getTrackByValue(d.$viewValue)},function(){d.$render()})),b?(v.remove(),t(v)(n),v.removeClass("ng-scope")):v=Mr(a.cloneNode(!1)),p(),n.$watchCollection(S.getWatchables,p)}}}}],ha=["$locale","$interpolate","$log",function(t,n,e){var r=/{}/g,i=/^when(Minus)?(.+)$/;return{link:function(a,u,s){function l(t){u.text(t||"")}var c,f=s.count,h=s.$attr.when&&u.attr(s.$attr.when),p=s.offset||0,d=a.$eval(h)||{},g={},m=n.startSymbol(),y=n.endSymbol(),x=m+f+"-"+p+y,b=Nr.noop;o(s,function(t,n){var e=i.exec(n);if(e){var r=(e[1]?"-":"")+xr(e[2]);d[r]=u.attr(s.$attr[n])}}),o(d,function(t,e){g[e]=n(t.replace(r,x))}),a.$watch(f,function(n){var r=parseFloat(n),i=isNaN(r);if(i||r in d||(r=t.pluralCat(r-p)),r!==c&&!(i&&S(c)&&isNaN(c))){b();var o=g[r];$(o)?(null!=n&&e.debug("ngPluralize: no rule defined for '"+r+"' in "+h),b=v,l()):b=a.$watch(o,l),c=r}})}}}],pa=["$parse","$animate",function(t,a){var u="$$NG_REMOVED",s=r("ngRepeat"),l=function(t,n,e,r,i,o,a){t[e]=r,i&&(t[i]=o),t.$index=n,t.$first=0===n,t.$last=n===a-1,t.$middle=!(t.$first||t.$last),t.$odd=!(t.$even=0===(1&n))},c=function(t){return t.clone[0]},f=function(t){return t.clone[t.clone.length-1]};return{restrict:"A",multiElement:!0,transclude:"element",priority:1e3,terminal:!0,$$tlb:!0,compile:function(r,h){var p=h.ngRepeat,d=n.createComment(" end ngRepeat: "+p+" "),v=p.match(/^\s*([\s\S]+?)\s+in\s+([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+track\s+by\s+([\s\S]+?))?\s*$/);if(!v)throw s("iexp","Expected expression in form of '_item_ in _collection_[ track by _id_]' but got '{0}'.",p);var g=v[1],m=v[2],y=v[3],$=v[4];if(v=g.match(/^(?:(\s*[\$\w]+)|\(\s*([\$\w]+)\s*,\s*([\$\w]+)\s*\))$/),!v)throw s("iidexp","'_item_' in '_item_ in _collection_' should be an identifier or '(_key_, _value_)' expression, but got '{0}'.",g);var x=v[3]||v[1],b=v[2];if(y&&(!/^[$a-zA-Z_][$a-zA-Z0-9_]*$/.test(y)||/^(null|undefined|this|\$index|\$first|\$middle|\$last|\$even|\$odd|\$parent|\$root|\$id)$/.test(y)))throw s("badident","alias '{0}' is invalid --- must be a valid JS identifier which is not a reserved name.",y);var w,C,S,_,M={$id:Gt};return $?w=t($):(S=function(t,n){return Gt(n)},_=function(t){return t}),function(t,n,r,h,v){w&&(C=function(n,e,r){return b&&(M[b]=n),M[x]=e,M.$index=r,w(t,M)});var g=gt();t.$watchCollection(m,function(r){var h,m,$,w,M,k,A,E,P,O,T,L,j=n[0],N=gt();if(y&&(t[y]=r),i(r))P=r,E=C||S;else{E=C||_,P=[];for(var R in r)br.call(r,R)&&"$"!==R.charAt(0)&&P.push(R)}for(w=P.length,T=new Array(w),h=0;w>h;h++)if(M=r===P?h:P[h],k=r[M],A=E(M,k,h),g[A])O=g[A],delete g[A],N[A]=O,T[h]=O;else{if(N[A])throw o(T,function(t){t&&t.scope&&(g[t.id]=t)}),s("dupes","Duplicates in a repeater are not allowed. Use 'track by' expression to specify unique keys. Repeater: {0}, Duplicate key: {1}, Duplicate value: {2}",p,A,k);T[h]={id:A,scope:e,clone:e},N[A]=!0}for(var D in g){if(O=g[D],L=vt(O.clone),a.leave(L),L[0].parentNode)for(h=0,m=L.length;m>h;h++)L[h][u]=!0;O.scope.$destroy()}for(h=0;w>h;h++)if(M=r===P?h:P[h],k=r[M],O=T[h],O.scope){$=j;do $=$.nextSibling;while($&&$[u]);c(O)!=$&&a.move(vt(O.clone),null,Mr(j)),j=f(O),l(O.scope,h,x,k,b,M,w)}else v(function(t,n){O.scope=n;var e=d.cloneNode(!1);t[t.length++]=e,a.enter(t,null,Mr(j)),j=e,O.clone=t,N[O.id]=O,l(O.scope,h,x,k,b,M,w)});g=N})}}}}],da="ng-hide",va="ng-hide-animate",ga=["$animate",function(t){return{restrict:"A",multiElement:!0,link:function(n,e,r){n.$watch(r.ngShow,function(n){t[n?"removeClass":"addClass"](e,da,{tempClasses:va})})}}}],ma=["$animate",function(t){return{restrict:"A",multiElement:!0,link:function(n,e,r){n.$watch(r.ngHide,function(n){t[n?"addClass":"removeClass"](e,da,{tempClasses:va})})}}}],ya=Qe(function(t,n,e){t.$watch(e.ngStyle,function(t,e){e&&t!==e&&o(e,function(t,e){n.css(e,"")}),t&&n.css(t)},!0)}),$a=["$animate",function(t){return{require:"ngSwitch",controller:["$scope",function(){this.cases={}}],link:function(e,r,i,a){var u=i.ngSwitch||i.on,s=[],l=[],c=[],f=[],h=function(t,n){return function(){t.splice(n,1)}};e.$watch(u,function(e){var r,i;for(r=0,i=c.length;i>r;++r)t.cancel(c[r]);for(c.length=0,r=0,i=f.length;i>r;++r){var u=vt(l[r].clone);f[r].$destroy();var p=c[r]=t.leave(u);p.then(h(c,r))}l.length=0,f.length=0,(s=a.cases["!"+e]||a.cases["?"])&&o(s,function(e){e.transclude(function(r,i){f.push(i);var o=e.element;r[r.length++]=n.createComment(" end ngSwitchWhen: ");var a={clone:r};l.push(a),t.enter(r,o.parent(),o)})})})}}}],xa=Qe({transclude:"element",priority:1200,require:"^ngSwitch",multiElement:!0,link:function(t,n,e,r,i){r.cases["!"+e.ngSwitchWhen]=r.cases["!"+e.ngSwitchWhen]||[],r.cases["!"+e.ngSwitchWhen].push({transclude:i,element:n})}}),ba=Qe({transclude:"element",priority:1200,require:"^ngSwitch",multiElement:!0,link:function(t,n,e,r,i){r.cases["?"]=r.cases["?"]||[],r.cases["?"].push({transclude:i,element:n})}}),wa=Qe({restrict:"EAC",link:function(t,n,e,i,o){if(!o)throw r("ngTransclude")("orphan","Illegal use of ngTransclude directive in the template! No parent directive that requires a transclusion found. Element: {0}",K(n));o(function(t){n.empty(),n.append(t)})}}),Ca=["$templateCache",function(t){return{restrict:"E",terminal:!0,compile:function(n,e){if("text/ng-template"==e.type){var r=e.id,i=n[0].text;t.put(r,i)}}}}],Sa={$setViewValue:v,$render:v},_a=["$element","$scope","$attrs",function(t,r,i){var o=this,a=new Xt;o.ngModelCtrl=Sa,o.unknownOption=Mr(n.createElement("option")),o.renderUnknownOption=function(n){var e="? "+Gt(n)+" ?";o.unknownOption.val(e),t.prepend(o.unknownOption),t.val(e)},r.$on("$destroy",function(){o.renderUnknownOption=v}),o.removeUnknownOption=function(){o.unknownOption.parent()&&o.unknownOption.remove()},o.readValue=function(){return o.removeUnknownOption(),t.val()},o.writeValue=function(n){o.hasOption(n)?(o.removeUnknownOption(),t.val(n),""===n&&o.emptyOption.prop("selected",!0)):null==n&&o.emptyOption?(o.removeUnknownOption(),t.val("")):o.renderUnknownOption(n)},o.addOption=function(t,n){pt(t,'"option value"'),""===t&&(o.emptyOption=n);var e=a.get(t)||0;a.put(t,e+1)},o.removeOption=function(t){var n=a.get(t);n&&(1===n?(a.remove(t),""===t&&(o.emptyOption=e)):a.put(t,n-1))},o.hasOption=function(t){return!!a.get(t)}}],Ma=function(){return{restrict:"E",require:["select","?ngModel"],controller:_a,link:function(t,n,e,r){var i=r[1];if(i){var a=r[0];if(a.ngModelCtrl=i,i.$render=function(){a.writeValue(i.$viewValue)},n.on("change",function(){t.$apply(function(){i.$setViewValue(a.readValue())})}),e.multiple){a.readValue=function(){var t=[];return o(n.find("option"),function(n){n.selected&&t.push(n.value)}),t},a.writeValue=function(t){var e=new Xt(t);o(n.find("option"),function(t){t.selected=x(e.get(t.value))})};var u,s=NaN;t.$watch(function(){s!==i.$viewValue||V(u,i.$viewValue)||(u=q(i.$viewValue),i.$render()),s=i.$viewValue}),i.$isEmpty=function(t){return!t||0===t.length}}}}}},ka=["$interpolate",function(t){function n(t){t[0].hasAttribute("selected")&&(t[0].selected=!0)}return{restrict:"E",priority:100,compile:function(e,r){if(x(r.value))var i=t(r.value,!0);else{var o=t(e.text(),!0);o||r.$set("value",e.text())}return function(t,e,r){function a(t){l.addOption(t,e),l.ngModelCtrl.$render(),n(e)}var u="$selectController",s=e.parent(),l=s.data(u)||s.parent().data(u);if(l&&l.ngModelCtrl){if(i){var c;r.$observe("value",function(t){x(c)&&l.removeOption(c),c=t,a(t)})}else o?t.$watch(o,function(t,n){r.$set("value",t),n!==t&&l.removeOption(n),a(t)}):a(r.value);e.on("$destroy",function(){l.removeOption(r.value),l.ngModelCtrl.$render()})}}}}}],Aa=m({restrict:"E",terminal:!1}),Ea=function(){return{restrict:"A",require:"?ngModel",link:function(t,n,e,r){r&&(e.required=!0,r.$validators.required=function(t,n){return!e.required||!r.$isEmpty(n)},e.$observe("required",function(){r.$validate()}))}}},Pa=function(){return{restrict:"A",require:"?ngModel",link:function(t,n,i,o){if(o){var a,u=i.ngPattern||i.pattern;i.$observe("pattern",function(t){if(C(t)&&t.length>0&&(t=new RegExp("^"+t+"$")),t&&!t.test)throw r("ngPattern")("noregexp","Expected {0} to be a RegExp but was {1}. Element: {2}",u,t,K(n));a=t||e,o.$validate()}),o.$validators.pattern=function(t,n){return o.$isEmpty(n)||$(a)||a.test(n)}}}}},Oa=function(){return{restrict:"A",require:"?ngModel",link:function(t,n,e,r){if(r){var i=-1;e.$observe("maxlength",function(t){var n=p(t);i=isNaN(n)?-1:n,r.$validate()}),r.$validators.maxlength=function(t,n){return 0>i||r.$isEmpty(n)||n.length<=i}}}}},Ta=function(){return{restrict:"A",require:"?ngModel",link:function(t,n,e,r){if(r){var i=0;e.$observe("minlength",function(t){i=p(t)||0,r.$validate()}),r.$validators.minlength=function(t,n){return r.$isEmpty(n)||n.length>=i}}}}};return t.angular.bootstrap?void console.log("WARNING: Tried to load angular more than once."):(ct(),xt(Nr),Nr.module("ngLocale",[],["$provide",function(t){function n(t){t+="";var n=t.indexOf(".");return-1==n?0:t.length-n-1}function r(t,r){var i=r;e===i&&(i=Math.min(n(t),3));var o=Math.pow(10,i),a=(t*o|0)%o;return{v:i,f:a}}var i={ZERO:"zero",ONE:"one",TWO:"two",FEW:"few",MANY:"many",OTHER:"other"};t.value("$locale",{DATETIME_FORMATS:{AMPMS:["AM","PM"],DAY:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],ERANAMES:["Before Christ","Anno Domini"],ERAS:["BC","AD"],FIRSTDAYOFWEEK:6,MONTH:["January","February","March","April","May","June","July","August","September","October","November","December"],SHORTDAY:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],SHORTMONTH:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],WEEKENDRANGE:[5,6],fullDate:"EEEE, MMMM d, y",longDate:"MMMM d, y",medium:"MMM d, y h:mm:ss a",mediumDate:"MMM d, y",mediumTime:"h:mm:ss a","short":"M/d/yy h:mm a",shortDate:"M/d/yy",shortTime:"h:mm a"},NUMBER_FORMATS:{CURRENCY_SYM:"$",DECIMAL_SEP:".",GROUP_SEP:",",PATTERNS:[{gSize:3,lgSize:3,maxFrac:3,minFrac:0,minInt:1,negPre:"-",negSuf:"",posPre:"",posSuf:""},{gSize:3,lgSize:3,maxFrac:2,minFrac:2,minInt:1,negPre:"-¤",negSuf:"",posPre:"¤",posSuf:""}]},id:"en-us",pluralCat:function(t,n){var e=0|t,o=r(t,n);return 1==e&&0==o.v?i.ONE:i.OTHER}})}]),void Mr(n).ready(function(){ot(n,at)}))}(window,document),!window.angular.$$csp().noInlineStyle&&window.angular.element(document.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:not(.ng-hide-animate){display:none !important;}ng\\:form{display:block;}.ng-animate-shim{visibility:hidden;}.ng-anchor{position:absolute;}</style>'),"undefined"!=typeof module&&"undefined"!=typeof exports&&module.exports===exports&&(module.exports="ui.router"),function(t,n,e){"use strict";function r(t,n){return I(new(I(function(){},{prototype:t})),n)}function i(t){return F(arguments,function(n){n!==t&&F(n,function(n,e){t.hasOwnProperty(e)||(t[e]=n)})}),t}function o(t,n){var e=[];for(var r in t.path){if(t.path[r]!==n.path[r])break;e.push(t.path[r])}return e}function a(t){if(Object.keys)return Object.keys(t);var n=[];return F(t,function(t,e){n.push(e)}),n}function u(t,n){if(Array.prototype.indexOf)return t.indexOf(n,Number(arguments[2])||0);var e=t.length>>>0,r=Number(arguments[2])||0;for(r=0>r?Math.ceil(r):Math.floor(r),0>r&&(r+=e);e>r;r++)if(r in t&&t[r]===n)return r;return-1}function s(t,n,e,r){var i,s=o(e,r),l={},c=[];for(var f in s)if(s[f].params&&(i=a(s[f].params),i.length))for(var h in i)u(c,i[h])>=0||(c.push(i[h]),l[i[h]]=t[i[h]]);return I({},l,n)}function l(t,n,e){if(!e){e=[];for(var r in t)e.push(r)}for(var i=0;i<e.length;i++){var o=e[i];if(t[o]!=n[o])return!1}return!0}function c(t,n){var e={};return F(t,function(t){e[t]=n[t]}),e}function f(t){var n={},e=Array.prototype.concat.apply(Array.prototype,Array.prototype.slice.call(arguments,1));return F(e,function(e){e in t&&(n[e]=t[e])}),n}function h(t){var n={},e=Array.prototype.concat.apply(Array.prototype,Array.prototype.slice.call(arguments,1));for(var r in t)-1==u(e,r)&&(n[r]=t[r]);return n}function p(t,n){var e=D(t),r=e?[]:{};return F(t,function(t,i){n(t,i)&&(r[e?r.length:i]=t)}),r}function d(t,n){var e=D(t)?[]:{};return F(t,function(t,r){e[r]=n(t,r)}),e}function v(t,n){var r=1,o=2,s={},l=[],c=s,f=I(t.when(s),{$$promises:s,$$values:s});this.study=function(s){function p(t,e){if(y[e]!==o){if(m.push(e),y[e]===r)throw m.splice(0,u(m,e)),new Error("Cyclic dependency: "+m.join(" -> "));if(y[e]=r,N(t))g.push(e,[function(){return n.get(t)}],l);else{var i=n.annotate(t);F(i,function(t){t!==e&&s.hasOwnProperty(t)&&p(s[t],t)}),g.push(e,t,i)}m.pop(),y[e]=o}}function d(t){return R(t)&&t.then&&t.$$promises}if(!R(s))throw new Error("'invocables' must be an object");var v=a(s||{}),g=[],m=[],y={};return F(s,p),s=m=y=null,function(r,o,a){function u(){--x||(b||i($,o.$$values),m.$$values=$,m.$$promises=m.$$promises||!0,delete m.$$inheritedValues,p.resolve($))}function s(t){m.$$failure=t,p.reject(t)}function l(e,i,o){function l(t){f.reject(t),s(t)}function c(){if(!L(m.$$failure))try{f.resolve(n.invoke(i,a,$)),f.promise.then(function(t){$[e]=t,u()},l)}catch(t){l(t)}}var f=t.defer(),h=0;F(o,function(t){y.hasOwnProperty(t)&&!r.hasOwnProperty(t)&&(h++,y[t].then(function(n){$[t]=n,--h||c()},l))}),h||c(),y[e]=f.promise}if(d(r)&&a===e&&(a=o,o=r,r=null),r){if(!R(r))throw new Error("'locals' must be an object")}else r=c;if(o){if(!d(o))throw new Error("'parent' must be a promise returned by $resolve.resolve()")}else o=f;var p=t.defer(),m=p.promise,y=m.$$promises={},$=I({},r),x=1+g.length/3,b=!1;if(L(o.$$failure))return s(o.$$failure),m;o.$$inheritedValues&&i($,h(o.$$inheritedValues,v)),I(y,o.$$promises),o.$$values?(b=i($,h(o.$$values,v)),m.$$inheritedValues=h(o.$$values,v),u()):(o.$$inheritedValues&&(m.$$inheritedValues=h(o.$$inheritedValues,v)),o.then(u,s));for(var w=0,C=g.length;C>w;w+=3)r.hasOwnProperty(g[w])?u():l(g[w],g[w+1],g[w+2]);return m}},this.resolve=function(t,n,e,r){return this.study(t)(n,e,r)}}function g(t,n,e){this.fromConfig=function(t,n,e){return L(t.template)?this.fromString(t.template,n):L(t.templateUrl)?this.fromUrl(t.templateUrl,n):L(t.templateProvider)?this.fromProvider(t.templateProvider,n,e):null},this.fromString=function(t,n){return j(t)?t(n):t},this.fromUrl=function(e,r){return j(e)&&(e=e(r)),null==e?null:t.get(e,{cache:n,headers:{Accept:"text/html"}}).then(function(t){return t.data})},this.fromProvider=function(t,n,r){return e.invoke(t,null,r||{params:n})}}function m(t,n,i){function o(n,e,r,i){if(g.push(n),d[n])return d[n];if(!/^\w+(-+\w+)*(?:\[\])?$/.test(n))throw new Error("Invalid parameter name '"+n+"' in pattern '"+t+"'");if(v[n])throw new Error("Duplicate parameter name '"+n+"' in pattern '"+t+"'");
+return v[n]=new q.Param(n,e,r,i),v[n]}function a(t,n,e,r){var i=["",""],o=t.replace(/[\\\[\]\^$*+?.()|{}]/g,"\\$&");if(!n)return o;switch(e){case!1:i=["(",")"+(r?"?":"")];break;case!0:i=["?(",")?"];break;default:i=["("+e+"|",")?"]}return o+i[0]+n+i[1]}function u(i,o){var a,u,s,l,c;return a=i[2]||i[3],c=n.params[a],s=t.substring(h,i.index),u=o?i[4]:i[4]||("*"==i[1]?".*":null),l=q.type(u||"string")||r(q.type("string"),{pattern:new RegExp(u,n.caseInsensitive?"i":e)}),{id:a,regexp:u,segment:s,type:l,cfg:c}}n=I({params:{}},R(n)?n:{});var s,l=/([:*])([\w\[\]]+)|\{([\w\[\]]+)(?:\:((?:[^{}\\]+|\\.|\{(?:[^{}\\]+|\\.)*\})+))?\}/g,c=/([:]?)([\w\[\]-]+)|\{([\w\[\]-]+)(?:\:((?:[^{}\\]+|\\.|\{(?:[^{}\\]+|\\.)*\})+))?\}/g,f="^",h=0,p=this.segments=[],d=i?i.params:{},v=this.params=i?i.params.$$new():new q.ParamSet,g=[];this.source=t;for(var m,y,$;(s=l.exec(t))&&(m=u(s,!1),!(m.segment.indexOf("?")>=0));)y=o(m.id,m.type,m.cfg,"path"),f+=a(m.segment,y.type.pattern.source,y.squash,y.isOptional),p.push(m.segment),h=l.lastIndex;$=t.substring(h);var x=$.indexOf("?");if(x>=0){var b=this.sourceSearch=$.substring(x);if($=$.substring(0,x),this.sourcePath=t.substring(0,h+x),b.length>0)for(h=0;s=c.exec(b);)m=u(s,!0),y=o(m.id,m.type,m.cfg,"search"),h=l.lastIndex}else this.sourcePath=t,this.sourceSearch="";f+=a($)+(n.strict===!1?"/?":"")+"$",p.push($),this.regexp=new RegExp(f,n.caseInsensitive?"i":e),this.prefix=p[0],this.$$paramNames=g}function y(t){I(this,t)}function $(){function t(t){return null!=t?t.toString().replace(/\//g,"%2F"):t}function i(t){return null!=t?t.toString().replace(/%2F/g,"/"):t}function o(){return{strict:v,caseInsensitive:h}}function s(t){return j(t)||D(t)&&j(t[t.length-1])}function l(){for(;w.length;){var t=w.shift();if(t.pattern)throw new Error("You cannot override a type's .pattern at runtime.");n.extend(x[t.name],f.invoke(t.def))}}function c(t){I(this,t||{})}q=this;var f,h=!1,v=!0,g=!1,x={},b=!0,w=[],C={string:{encode:t,decode:i,is:function(t){return null==t||!L(t)||"string"==typeof t},pattern:/[^\/]*/},"int":{encode:t,decode:function(t){return parseInt(t,10)},is:function(t){return L(t)&&this.decode(t.toString())===t},pattern:/\d+/},bool:{encode:function(t){return t?1:0},decode:function(t){return 0!==parseInt(t,10)},is:function(t){return t===!0||t===!1},pattern:/0|1/},date:{encode:function(t){return this.is(t)?[t.getFullYear(),("0"+(t.getMonth()+1)).slice(-2),("0"+t.getDate()).slice(-2)].join("-"):e},decode:function(t){if(this.is(t))return t;var n=this.capture.exec(t);return n?new Date(n[1],n[2]-1,n[3]):e},is:function(t){return t instanceof Date&&!isNaN(t.valueOf())},equals:function(t,n){return this.is(t)&&this.is(n)&&t.toISOString()===n.toISOString()},pattern:/[0-9]{4}-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])/,capture:/([0-9]{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])/},json:{encode:n.toJson,decode:n.fromJson,is:n.isObject,equals:n.equals,pattern:/[^\/]*/},any:{encode:n.identity,decode:n.identity,equals:n.equals,pattern:/.*/}};$.$$getDefaultValue=function(t){if(!s(t.value))return t.value;if(!f)throw new Error("Injectable functions cannot be called at configuration time");return f.invoke(t.value)},this.caseInsensitive=function(t){return L(t)&&(h=t),h},this.strictMode=function(t){return L(t)&&(v=t),v},this.defaultSquashPolicy=function(t){if(!L(t))return g;if(t!==!0&&t!==!1&&!N(t))throw new Error("Invalid squash policy: "+t+". Valid policies: false, true, arbitrary-string");return g=t,t},this.compile=function(t,n){return new m(t,I(o(),n))},this.isMatcher=function(t){if(!R(t))return!1;var n=!0;return F(m.prototype,function(e,r){j(e)&&(n=n&&L(t[r])&&j(t[r]))}),n},this.type=function(t,n,e){if(!L(n))return x[t];if(x.hasOwnProperty(t))throw new Error("A type named '"+t+"' has already been defined.");return x[t]=new y(I({name:t},n)),e&&(w.push({name:t,def:e}),b||l()),this},F(C,function(t,n){x[n]=new y(I({name:n},t))}),x=r(x,{}),this.$get=["$injector",function(t){return f=t,b=!1,l(),F(C,function(t,n){x[n]||(x[n]=new y(t))}),this}],this.Param=function(t,n,r,i){function o(t){var n=R(t)?a(t):[],e=-1===u(n,"value")&&-1===u(n,"type")&&-1===u(n,"squash")&&-1===u(n,"array");return e&&(t={value:t}),t.$$fn=s(t.value)?t.value:function(){return t.value},t}function l(n,e,r){if(n.type&&e)throw new Error("Param '"+t+"' has two type configurations.");return e?e:n.type?n.type instanceof y?n.type:new y(n.type):"config"===r?x.any:x.string}function c(){var n={array:"search"===i?"auto":!1},e=t.match(/\[\]$/)?{array:!0}:{};return I(n,e,r).array}function h(t,n){var e=t.squash;if(!n||e===!1)return!1;if(!L(e)||null==e)return g;if(e===!0||N(e))return e;throw new Error("Invalid squash policy: '"+e+"'. Valid policies: false, true, or arbitrary string")}function v(t,n,r,i){var o,a,s=[{from:"",to:r||n?e:""},{from:null,to:r||n?e:""}];return o=D(t.replace)?t.replace:[],N(i)&&o.push({from:i,to:e}),a=d(o,function(t){return t.from}),p(s,function(t){return-1===u(a,t.from)}).concat(o)}function m(){if(!f)throw new Error("Injectable functions cannot be called at configuration time");var t=f.invoke(r.$$fn);if(null!==t&&t!==e&&!w.type.is(t))throw new Error("Default value ("+t+") for parameter '"+w.id+"' is not an instance of Type ("+w.type.name+")");return t}function $(t){function n(t){return function(n){return n.from===t}}function e(t){var e=d(p(w.replace,n(t)),function(t){return t.to});return e.length?e[0]:t}return t=e(t),L(t)?w.type.$normalize(t):m()}function b(){return"{Param:"+t+" "+n+" squash: '"+_+"' optional: "+S+"}"}var w=this;r=o(r),n=l(r,n,i);var C=c();n=C?n.$asArray(C,"search"===i):n,"string"!==n.name||C||"path"!==i||r.value!==e||(r.value="");var S=r.value!==e,_=h(r,S),M=v(r,C,S,_);I(this,{id:t,type:n,location:i,array:C,squash:_,replace:M,isOptional:S,value:$,dynamic:e,config:r,toString:b})},c.prototype={$$new:function(){return r(this,I(new c,{$$parent:this}))},$$keys:function(){for(var t=[],n=[],e=this,r=a(c.prototype);e;)n.push(e),e=e.$$parent;return n.reverse(),F(n,function(n){F(a(n),function(n){-1===u(t,n)&&-1===u(r,n)&&t.push(n)})}),t},$$values:function(t){var n={},e=this;return F(e.$$keys(),function(r){n[r]=e[r].value(t&&t[r])}),n},$$equals:function(t,n){var e=!0,r=this;return F(r.$$keys(),function(i){var o=t&&t[i],a=n&&n[i];r[i].type.equals(o,a)||(e=!1)}),e},$$validates:function(t){var r,i,o,a,u,s=this.$$keys();for(r=0;r<s.length&&(i=this[s[r]],o=t[s[r]],o!==e&&null!==o||!i.isOptional);r++){if(a=i.type.$normalize(o),!i.type.is(a))return!1;if(u=i.type.encode(a),n.isString(u)&&!i.type.pattern.exec(u))return!1}return!0},$$parent:e},this.ParamSet=c}function x(t,r){function i(t){var n=/^\^((?:\\[^a-zA-Z0-9]|[^\\\[\]\^$*+?.()|{}]+)*)/.exec(t.source);return null!=n?n[1].replace(/\\(.)/g,"$1"):""}function o(t,n){return t.replace(/\$(\$|\d{1,2})/,function(t,e){return n["$"===e?0:Number(e)]})}function a(t,n,e){if(!e)return!1;var r=t.invoke(n,n,{$match:e});return L(r)?r:!0}function u(r,i,o,a){function u(t,n,e){return"/"===v?t:n?v.slice(0,-1)+t:e?v.slice(1)+t:t}function h(t){function n(t){var n=t(o,r);return n?(N(n)&&r.replace().url(n),!0):!1}if(!t||!t.defaultPrevented){d&&r.url()===d;d=e;var i,a=l.length;for(i=0;a>i;i++)if(n(l[i]))return;c&&n(c)}}function p(){return s=s||i.$on("$locationChangeSuccess",h)}var d,v=a.baseHref(),g=r.url();return f||p(),{sync:function(){h()},listen:function(){return p()},update:function(t){return t?void(g=r.url()):void(r.url()!==g&&(r.url(g),r.replace()))},push:function(t,n,i){var o=t.format(n||{});null!==o&&n&&n["#"]&&(o+="#"+n["#"]),r.url(o),d=i&&i.$$avoidResync?r.url():e,i&&i.replace&&r.replace()},href:function(e,i,o){if(!e.validates(i))return null;var a=t.html5Mode();n.isObject(a)&&(a=a.enabled);var s=e.format(i);if(o=o||{},a||null===s||(s="#"+t.hashPrefix()+s),null!==s&&i&&i["#"]&&(s+="#"+i["#"]),s=u(s,a,o.absolute),!o.absolute||!s)return s;var l=!a&&s?"/":"",c=r.port();return c=80===c||443===c?"":":"+c,[r.protocol(),"://",r.host(),c,l,s].join("")}}}var s,l=[],c=null,f=!1;this.rule=function(t){if(!j(t))throw new Error("'rule' must be a function");return l.push(t),this},this.otherwise=function(t){if(N(t)){var n=t;t=function(){return n}}else if(!j(t))throw new Error("'rule' must be a function");return c=t,this},this.when=function(t,n){var e,u=N(n);if(N(t)&&(t=r.compile(t)),!u&&!j(n)&&!D(n))throw new Error("invalid 'handler' in when()");var s={matcher:function(t,n){return u&&(e=r.compile(n),n=["$match",function(t){return e.format(t)}]),I(function(e,r){return a(e,n,t.exec(r.path(),r.search()))},{prefix:N(t.prefix)?t.prefix:""})},regex:function(t,n){if(t.global||t.sticky)throw new Error("when() RegExp must not be global or sticky");return u&&(e=n,n=["$match",function(t){return o(e,t)}]),I(function(e,r){return a(e,n,t.exec(r.path()))},{prefix:i(t)})}},l={matcher:r.isMatcher(t),regex:t instanceof RegExp};for(var c in l)if(l[c])return this.rule(s[c](t,n));throw new Error("invalid 'what' in when()")},this.deferIntercept=function(t){t===e&&(t=!0),f=t},this.$get=u,u.$inject=["$location","$rootScope","$injector","$browser"]}function b(t,i){function o(t){return 0===t.indexOf(".")||0===t.indexOf("^")}function h(t,n){if(!t)return e;var r=N(t),i=r?t:t.name,a=o(i);if(a){if(!n)throw new Error("No reference point given for path '"+i+"'");n=h(n);for(var u=i.split("."),s=0,l=u.length,c=n;l>s;s++)if(""!==u[s]||0!==s){if("^"!==u[s])break;if(!c.parent)throw new Error("Path '"+i+"' not valid for state '"+n.name+"'");c=c.parent}else c=n;u=u.slice(s).join("."),i=c.name+(c.name&&u?".":"")+u}var f=_[i];return!f||!r&&(r||f!==t&&f.self!==t)?e:f}function p(t,n){M[t]||(M[t]=[]),M[t].push(n)}function v(t){for(var n=M[t]||[];n.length;)g(n.shift())}function g(n){n=r(n,{self:n,resolve:n.resolve||{},toString:function(){return this.name}});var e=n.name;if(!N(e)||e.indexOf("@")>=0)throw new Error("State must have a valid name");if(_.hasOwnProperty(e))throw new Error("State '"+e+"'' is already defined");var i=-1!==e.indexOf(".")?e.substring(0,e.lastIndexOf(".")):N(n.parent)?n.parent:R(n.parent)&&N(n.parent.name)?n.parent.name:"";if(i&&!_[i])return p(i,n.self);for(var o in A)j(A[o])&&(n[o]=A[o](n,A.$delegates[o]));return _[e]=n,!n[k]&&n.url&&t.when(n.url,["$match","$stateParams",function(t,e){S.$current.navigable==n&&l(t,e)||S.transitionTo(n,t,{inherit:!0,location:!1})}]),v(e),n}function m(t){return t.indexOf("*")>-1}function y(t){for(var n=t.split("."),e=S.$current.name.split("."),r=0,i=n.length;i>r;r++)"*"===n[r]&&(e[r]="*");return"**"===n[0]&&(e=e.slice(u(e,n[1])),e.unshift("**")),"**"===n[n.length-1]&&(e.splice(u(e,n[n.length-2])+1,Number.MAX_VALUE),e.push("**")),n.length!=e.length?!1:e.join("")===n.join("")}function $(t,n){return N(t)&&!L(n)?A[t]:j(n)&&N(t)?(A[t]&&!A.$delegates[t]&&(A.$delegates[t]=A[t]),A[t]=n,this):this}function x(t,n){return R(t)?n=t:n.name=t,g(n),this}function b(t,i,o,u,f,p,v,g,$){function x(n,e,r,o){var a=t.$broadcast("$stateNotFound",n,e,r);if(a.defaultPrevented)return v.update(),E;if(!a.retry)return null;if(o.$retry)return v.update(),P;var u=S.transition=i.when(a.retry);return u.then(function(){return u!==S.transition?M:(n.options.$retry=!0,S.transitionTo(n.to,n.toParams,n.options))},function(){return E}),v.update(),u}function b(t,e,r,a,s,l){function h(){var e=[];return F(t.views,function(r,i){var a=r.resolve&&r.resolve!==t.resolve?r.resolve:{};a.$template=[function(){return o.load(i,{view:r,locals:s.globals,params:p,notify:l.notify})||""}],e.push(f.resolve(a,s.globals,s.resolve,t).then(function(e){if(j(r.controllerProvider)||D(r.controllerProvider)){var o=n.extend({},a,s.globals);e.$$controller=u.invoke(r.controllerProvider,null,o)}else e.$$controller=r.controller;e.$$state=t,e.$$controllerAs=r.controllerAs,s[i]=e}))}),i.all(e).then(function(){return s.globals})}var p=r?e:c(t.params.$$keys(),e),d={$stateParams:p};s.resolve=f.resolve(t.resolve,d,s.resolve,t);var v=[s.resolve.then(function(t){s.globals=t})];return a&&v.push(a),i.all(v).then(h).then(function(t){return s})}var M=i.reject(new Error("transition superseded")),A=i.reject(new Error("transition prevented")),E=i.reject(new Error("transition aborted")),P=i.reject(new Error("transition failed"));return C.locals={resolve:null,globals:{$stateParams:{}}},S={params:{},current:C.self,$current:C,transition:null},S.reload=function(t){return S.transitionTo(S.current,p,{reload:t||!0,inherit:!1,notify:!0})},S.go=function(t,n,e){return S.transitionTo(t,n,I({inherit:!0,relative:S.$current},e))},S.transitionTo=function(n,e,o){e=e||{},o=I({location:!0,inherit:!1,relative:null,notify:!0,reload:!1,$retry:!1},o||{});var a,l=S.$current,f=S.params,d=l.path,g=h(n,o.relative),m=e["#"];if(!L(g)){var y={to:n,toParams:e,options:o},$=x(y,l.self,f,o);if($)return $;if(n=y.to,e=y.toParams,o=y.options,g=h(n,o.relative),!L(g)){if(!o.relative)throw new Error("No such state '"+n+"'");throw new Error("Could not resolve '"+n+"' from state '"+o.relative+"'")}}if(g[k])throw new Error("Cannot transition to abstract state '"+n+"'");if(o.inherit&&(e=s(p,e||{},S.$current,g)),!g.params.$$validates(e))return P;e=g.params.$$values(e),n=g;var _=n.path,E=0,O=_[E],T=C.locals,j=[];if(o.reload){if(N(o.reload)||R(o.reload)){if(R(o.reload)&&!o.reload.name)throw new Error("Invalid reload state object");var D=o.reload===!0?d[0]:h(o.reload);if(o.reload&&!D)throw new Error("No such reload state '"+(N(o.reload)?o.reload:o.reload.name)+"'");for(;O&&O===d[E]&&O!==D;)T=j[E]=O.locals,E++,O=_[E]}}else for(;O&&O===d[E]&&O.ownParams.$$equals(e,f);)T=j[E]=O.locals,E++,O=_[E];if(w(n,e,l,f,T,o))return m&&(e["#"]=m),S.params=e,z(S.params,p),o.location&&n.navigable&&n.navigable.url&&(v.push(n.navigable.url,e,{$$avoidResync:!0,replace:"replace"===o.location}),v.update(!0)),S.transition=null,i.when(S.current);if(e=c(n.params.$$keys(),e||{}),o.notify&&t.$broadcast("$stateChangeStart",n.self,e,l.self,f).defaultPrevented)return t.$broadcast("$stateChangeCancel",n.self,e,l.self,f),v.update(),A;for(var F=i.when(T),q=E;q<_.length;q++,O=_[q])T=j[q]=r(T),F=b(O,e,O===n,F,T,o);var V=S.transition=F.then(function(){var r,i,a;if(S.transition!==V)return M;for(r=d.length-1;r>=E;r--)a=d[r],a.self.onExit&&u.invoke(a.self.onExit,a.self,a.locals.globals),a.locals=null;for(r=E;r<_.length;r++)i=_[r],i.locals=j[r],i.self.onEnter&&u.invoke(i.self.onEnter,i.self,i.locals.globals);return m&&(e["#"]=m),S.transition!==V?M:(S.$current=n,S.current=n.self,S.params=e,z(S.params,p),S.transition=null,o.location&&n.navigable&&v.push(n.navigable.url,n.navigable.locals.globals.$stateParams,{$$avoidResync:!0,replace:"replace"===o.location}),o.notify&&t.$broadcast("$stateChangeSuccess",n.self,e,l.self,f),v.update(!0),S.current)},function(r){return S.transition!==V?M:(S.transition=null,a=t.$broadcast("$stateChangeError",n.self,e,l.self,f,r),a.defaultPrevented||v.update(),i.reject(r))});return V},S.is=function(t,n,r){r=I({relative:S.$current},r||{});var i=h(t,r.relative);return L(i)?S.$current!==i?!1:n?l(i.params.$$values(n),p):!0:e},S.includes=function(t,n,r){if(r=I({relative:S.$current},r||{}),N(t)&&m(t)){if(!y(t))return!1;t=S.$current.name}var i=h(t,r.relative);return L(i)?L(S.$current.includes[i.name])?n?l(i.params.$$values(n),p,a(n)):!0:!1:e},S.href=function(t,n,r){r=I({lossy:!0,inherit:!0,absolute:!1,relative:S.$current},r||{});var i=h(t,r.relative);if(!L(i))return null;r.inherit&&(n=s(p,n||{},S.$current,i));var o=i&&r.lossy?i.navigable:i;return o&&o.url!==e&&null!==o.url?v.href(o.url,c(i.params.$$keys().concat("#"),n||{}),{absolute:r.absolute}):null},S.get=function(t,n){if(0===arguments.length)return d(a(_),function(t){return _[t].self});var e=h(t,n||S.$current);return e&&e.self?e.self:null},S}function w(t,n,e,r,i,o){function a(t,n,e){function r(n){return"search"!=t.params[n].location}var i=t.params.$$keys().filter(r),o=f.apply({},[t.params].concat(i)),a=new q.ParamSet(o);return a.$$equals(n,e)}return!o.reload&&t===e&&(i===e.locals||t.self.reloadOnSearch===!1&&a(e,r,n))?!0:void 0}var C,S,_={},M={},k="abstract",A={parent:function(t){if(L(t.parent)&&t.parent)return h(t.parent);var n=/^(.+)\.[^.]+$/.exec(t.name);return n?h(n[1]):C},data:function(t){return t.parent&&t.parent.data&&(t.data=t.self.data=I({},t.parent.data,t.data)),t.data},url:function(t){var n=t.url,e={params:t.params||{}};if(N(n))return"^"==n.charAt(0)?i.compile(n.substring(1),e):(t.parent.navigable||C).url.concat(n,e);if(!n||i.isMatcher(n))return n;throw new Error("Invalid url '"+n+"' in state '"+t+"'")},navigable:function(t){return t.url?t:t.parent?t.parent.navigable:null},ownParams:function(t){var n=t.url&&t.url.params||new q.ParamSet;return F(t.params||{},function(t,e){n[e]||(n[e]=new q.Param(e,null,t,"config"))}),n},params:function(t){return t.parent&&t.parent.params?I(t.parent.params.$$new(),t.ownParams):new q.ParamSet},views:function(t){var n={};return F(L(t.views)?t.views:{"":t},function(e,r){r.indexOf("@")<0&&(r+="@"+t.parent.name),n[r]=e}),n},path:function(t){return t.parent?t.parent.path.concat(t):[]},includes:function(t){var n=t.parent?I({},t.parent.includes):{};return n[t.name]=!0,n},$delegates:{}};C=g({name:"",url:"^",views:null,"abstract":!0}),C.navigable=null,this.decorator=$,this.state=x,this.$get=b,b.$inject=["$rootScope","$q","$view","$injector","$resolve","$stateParams","$urlRouter","$location","$urlMatcherFactory"]}function w(){function t(t,n){return{load:function(e,r){var i,o={template:null,controller:null,view:null,locals:null,notify:!0,async:!0,params:{}};return r=I(o,r),r.view&&(i=n.fromConfig(r.view,r.params,r.locals)),i&&r.notify&&t.$broadcast("$viewContentLoading",r),i}}}this.$get=t,t.$inject=["$rootScope","$templateFactory"]}function C(){var t=!1;this.useAnchorScroll=function(){t=!0},this.$get=["$anchorScroll","$timeout",function(n,e){return t?n:function(t){return e(function(){t[0].scrollIntoView()},0,!1)}}]}function S(t,e,r,i){function o(){return e.has?function(t){return e.has(t)?e.get(t):null}:function(t){try{return e.get(t)}catch(n){return null}}}function a(t,n){var e=function(){return{enter:function(t,n,e){n.after(t),e()},leave:function(t,n){t.remove(),n()}}};if(l)return{enter:function(t,n,e){var r=l.enter(t,null,n,e);r&&r.then&&r.then(e)},leave:function(t,n){var e=l.leave(t,n);e&&e.then&&e.then(n)}};if(s){var r=s&&s(n,t);return{enter:function(t,n,e){r.enter(t,null,n),e()},leave:function(t,n){r.leave(t),n()}}}return e()}var u=o(),s=u("$animator"),l=u("$animate"),c={restrict:"ECA",terminal:!0,priority:400,transclude:"element",compile:function(e,o,u){return function(e,o,s){function l(){f&&(f.remove(),f=null),p&&(p.$destroy(),p=null),h&&(m.leave(h,function(){f=null}),f=h,h=null)}function c(a){var c,f=M(e,s,o,i),y=f&&t.$current&&t.$current.locals[f];if(a||y!==d){c=e.$new(),d=t.$current.locals[f];var $=u(c,function(t){m.enter(t,o,function(){p&&p.$emit("$viewContentAnimationEnded"),(n.isDefined(g)&&!g||e.$eval(g))&&r(t)}),l()});h=$,p=c,p.$emit("$viewContentLoaded"),p.$eval(v)}}var f,h,p,d,v=s.onload||"",g=s.autoscroll,m=a(s,e);e.$on("$stateChangeSuccess",function(){c(!1)}),e.$on("$viewContentLoading",function(){c(!1)}),c(!0)}}};return c}function _(t,n,e,r){return{restrict:"ECA",priority:-400,compile:function(i){var o=i.html();return function(i,a,u){var s=e.$current,l=M(i,u,a,r),c=s&&s.locals[l];if(c){a.data("$uiView",{name:l,state:c.$$state}),a.html(c.$template?c.$template:o);var f=t(a.contents());if(c.$$controller){c.$scope=i,c.$element=a;var h=n(c.$$controller,c);c.$$controllerAs&&(i[c.$$controllerAs]=h),a.data("$ngControllerController",h),a.children().data("$ngControllerController",h)}f(i)}}}}}function M(t,n,e,r){var i=r(n.uiView||n.name||"")(t),o=e.inheritedData("$uiView");return i.indexOf("@")>=0?i:i+"@"+(o?o.state.name:"")}function k(t,n){var e,r=t.match(/^\s*({[^}]*})\s*$/);if(r&&(t=n+"("+r[1]+")"),e=t.replace(/\n/g," ").match(/^([^(]+?)\s*(\((.*)\))?$/),!e||4!==e.length)throw new Error("Invalid state ref '"+t+"'");return{state:e[1],paramExpr:e[3]||null}}function A(t){var n=t.parent().inheritedData("$uiView");return n&&n.state&&n.state.name?n.state:void 0}function E(t,e){var r=["location","inherit","reload","absolute"];return{restrict:"A",require:["?^uiSrefActive","?^uiSrefActiveEq"],link:function(i,o,a,u){var s=k(a.uiSref,t.current.name),l=null,c=A(o)||t.$current,f="[object SVGAnimatedString]"===Object.prototype.toString.call(o.prop("href"))?"xlink:href":"href",h=null,p="A"===o.prop("tagName").toUpperCase(),d="FORM"===o[0].nodeName,v=d?"action":f,g=!0,m={relative:c,inherit:!0},y=i.$eval(a.uiSrefOpts)||{};n.forEach(r,function(t){t in y&&(m[t]=y[t])});var $=function(e){if(e&&(l=n.copy(e)),g){h=t.href(s.state,l,m);var r=u[1]||u[0];return r&&r.$$addStateInfo(s.state,l),null===h?(g=!1,!1):void a.$set(v,h)}};s.paramExpr&&(i.$watch(s.paramExpr,function(t,n){t!==l&&$(t)},!0),l=n.copy(i.$eval(s.paramExpr))),$(),d||o.bind("click",function(n){var r=n.which||n.button;if(!(r>1||n.ctrlKey||n.metaKey||n.shiftKey||o.attr("target"))){var i=e(function(){t.go(s.state,l,m)});n.preventDefault();var a=p&&!h?1:0;n.preventDefault=function(){a--<=0&&e.cancel(i)}}})}}}function P(t,n,e){return{restrict:"A",controller:["$scope","$element","$attrs",function(n,r,i){function o(){a()?r.addClass(s):r.removeClass(s)}function a(){for(var t=0;t<l.length;t++)if(u(l[t].state,l[t].params))return!0;return!1}function u(n,e){return"undefined"!=typeof i.uiSrefActiveEq?t.is(n.name,e):t.includes(n.name,e)}var s,l=[];s=e(i.uiSrefActiveEq||i.uiSrefActive||"",!1)(n),this.$$addStateInfo=function(n,e){var i=t.get(n,A(r));l.push({state:i||{name:n},params:e}),o()},n.$on("$stateChangeSuccess",o)}]}}function O(t){var n=function(n){return t.is(n)};return n.$stateful=!0,n}function T(t){var n=function(n){return t.includes(n)};return n.$stateful=!0,n}var L=n.isDefined,j=n.isFunction,N=n.isString,R=n.isObject,D=n.isArray,F=n.forEach,I=n.extend,z=n.copy;n.module("ui.router.util",["ng"]),n.module("ui.router.router",["ui.router.util"]),n.module("ui.router.state",["ui.router.router","ui.router.util"]),n.module("ui.router",["ui.router.state"]),n.module("ui.router.compat",["ui.router"]),v.$inject=["$q","$injector"],n.module("ui.router.util").service("$resolve",v),g.$inject=["$http","$templateCache","$injector"],n.module("ui.router.util").service("$templateFactory",g);var q;m.prototype.concat=function(t,n){var e={caseInsensitive:q.caseInsensitive(),strict:q.strictMode(),squash:q.defaultSquashPolicy()};return new m(this.sourcePath+t+this.sourceSearch,I(e,n),this)},m.prototype.toString=function(){return this.source},m.prototype.exec=function(t,n){function e(t){function n(t){return t.split("").reverse().join("")}function e(t){return t.replace(/\\-/g,"-")}var r=n(t).split(/-(?!\\)/),i=d(r,n);return d(i,e).reverse()}var r=this.regexp.exec(t);if(!r)return null;n=n||{};var i,o,a,u=this.parameters(),s=u.length,l=this.segments.length-1,c={};if(l!==r.length-1)throw new Error("Unbalanced capture group in route '"+this.source+"'");for(i=0;l>i;i++){a=u[i];var f=this.params[a],h=r[i+1];for(o=0;o<f.replace;o++)f.replace[o].from===h&&(h=f.replace[o].to);h&&f.array===!0&&(h=e(h)),c[a]=f.value(h)}for(;s>i;i++)a=u[i],c[a]=this.params[a].value(n[a]);return c},m.prototype.parameters=function(t){return L(t)?this.params[t]||null:this.$$paramNames},m.prototype.validates=function(t){return this.params.$$validates(t)},m.prototype.format=function(t){function n(t){return encodeURIComponent(t).replace(/-/g,function(t){return"%5C%"+t.charCodeAt(0).toString(16).toUpperCase()})}t=t||{};var e=this.segments,r=this.parameters(),i=this.params;if(!this.validates(t))return null;var o,a=!1,u=e.length-1,s=r.length,l=e[0];for(o=0;s>o;o++){var c=u>o,f=r[o],h=i[f],p=h.value(t[f]),v=h.isOptional&&h.type.equals(h.value(),p),g=v?h.squash:!1,m=h.type.encode(p);if(c){var y=e[o+1];if(g===!1)null!=m&&(l+=D(m)?d(m,n).join("-"):encodeURIComponent(m)),l+=y;else if(g===!0){var $=l.match(/\/$/)?/\/?(.*)/:/(.*)/;l+=y.match($)[1]}else N(g)&&(l+=g+y)}else{if(null==m||v&&g!==!1)continue;D(m)||(m=[m]),m=d(m,encodeURIComponent).join("&"+f+"="),l+=(a?"&":"?")+(f+"="+m),a=!0}}return l},y.prototype.is=function(t,n){return!0},y.prototype.encode=function(t,n){return t},y.prototype.decode=function(t,n){return t},y.prototype.equals=function(t,n){return t==n},y.prototype.$subPattern=function(){var t=this.pattern.toString();return t.substr(1,t.length-2)},y.prototype.pattern=/.*/,y.prototype.toString=function(){return"{Type:"+this.name+"}"},y.prototype.$normalize=function(t){return this.is(t)?t:this.decode(t)},y.prototype.$asArray=function(t,n){function r(t,n){function r(t,n){return function(){return t[n].apply(t,arguments)}}function i(t){return D(t)?t:L(t)?[t]:[]}function o(t){switch(t.length){case 0:return e;case 1:return"auto"===n?t[0]:t;default:return t}}function a(t){return!t}function u(t,n){return function(e){e=i(e);var r=d(e,t);return n===!0?0===p(r,a).length:o(r)}}function s(t){return function(n,e){var r=i(n),o=i(e);if(r.length!==o.length)return!1;for(var a=0;a<r.length;a++)if(!t(r[a],o[a]))return!1;return!0}}this.encode=u(r(t,"encode")),this.decode=u(r(t,"decode")),this.is=u(r(t,"is"),!0),this.equals=s(r(t,"equals")),this.pattern=t.pattern,this.$normalize=u(r(t,"$normalize")),this.name=t.name,this.$arrayMode=n}if(!t)return this;if("auto"===t&&!n)throw new Error("'auto' array mode is for query parameters only");return new r(this,t)},n.module("ui.router.util").provider("$urlMatcherFactory",$),n.module("ui.router.util").run(["$urlMatcherFactory",function(t){}]),x.$inject=["$locationProvider","$urlMatcherFactoryProvider"],n.module("ui.router.router").provider("$urlRouter",x),b.$inject=["$urlRouterProvider","$urlMatcherFactoryProvider"],n.module("ui.router.state").value("$stateParams",{}).provider("$state",b),w.$inject=[],n.module("ui.router.state").provider("$view",w),n.module("ui.router.state").provider("$uiViewScroll",C),S.$inject=["$state","$injector","$uiViewScroll","$interpolate"],_.$inject=["$compile","$controller","$state","$interpolate"],n.module("ui.router.state").directive("uiView",S),n.module("ui.router.state").directive("uiView",_),E.$inject=["$state","$timeout"],P.$inject=["$state","$stateParams","$interpolate"],n.module("ui.router.state").directive("uiSref",E).directive("uiSrefActive",P).directive("uiSrefActiveEq",P),O.$inject=["$state"],T.$inject=["$state"],n.module("ui.router.state").filter("isState",O).filter("includedByState",T)}(window,window.angular),function(t,n,e){"use strict";function r(t){return null!=t&&""!==t&&"hasOwnProperty"!==t&&u.test("."+t)}function i(t,i){if(!r(i))throw a("badmember",'Dotted member path "@{0}" is invalid.',i);for(var o=i.split("."),u=0,s=o.length;s>u&&n.isDefined(t);u++){var l=o[u];t=null!==t?t[l]:e}return t}function o(t,e){e=e||{},n.forEach(e,function(t,n){delete e[n]});for(var r in t)!t.hasOwnProperty(r)||"$"===r.charAt(0)&&"$"===r.charAt(1)||(e[r]=t[r]);return e}var a=n.$$minErr("$resource"),u=/^(\.[a-zA-Z_$@][0-9a-zA-Z_$@]*)+$/;n.module("ngResource",["ng"]).provider("$resource",function(){var t=/^https?:\/\/[^\/]*/,r=this;this.defaults={stripTrailingSlashes:!0,actions:{get:{method:"GET"},save:{method:"POST"},query:{method:"GET",isArray:!0},remove:{method:"DELETE"},"delete":{method:"DELETE"}}},this.$get=["$http","$q",function(u,s){function l(t){return c(t,!0).replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+")}function c(t,n){return encodeURIComponent(t).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,n?"%20":"+")}function f(t,n){this.template=t,this.defaults=v({},r.defaults,n),this.urlParams={}}function h(t,l,c,y){function $(t,n){var e={};return n=v({},l,n),d(n,function(n,r){m(n)&&(n=n()),e[r]=n&&n.charAt&&"@"==n.charAt(0)?i(t,n.substr(1)):n}),e}function x(t){return t.resource}function b(t){o(t||{},this)}var w=new f(t,y);return c=v({},r.defaults.actions,c),b.prototype.toJSON=function(){var t=v({},this);return delete t.$promise,delete t.$resolved,t},d(c,function(t,r){var i=/^(POST|PUT|PATCH)$/i.test(t.method);b[r]=function(l,c,f,h){var y,C,S,_={};switch(arguments.length){case 4:S=h,C=f;case 3:case 2:if(!m(c)){_=l,y=c,C=f;break}if(m(l)){C=l,S=c;break}C=c,S=f;case 1:m(l)?C=l:i?y=l:_=l;break;case 0:break;default:throw a("badargs","Expected up to 4 arguments [params, data, success, error], got {0} arguments",arguments.length)}var M=this instanceof b,k=M?y:t.isArray?[]:new b(y),A={},E=t.interceptor&&t.interceptor.response||x,P=t.interceptor&&t.interceptor.responseError||e;d(t,function(t,n){"params"!=n&&"isArray"!=n&&"interceptor"!=n&&(A[n]=g(t))}),i&&(A.data=y),w.setUrlParams(A,v({},$(y,t.params||{}),_),t.url);var O=u(A).then(function(e){var i=e.data,u=k.$promise;if(i){if(n.isArray(i)!==!!t.isArray)throw a("badcfg","Error in resource configuration for action `{0}`. Expected response to contain an {1} but got an {2} (Request: {3} {4})",r,t.isArray?"array":"object",n.isArray(i)?"array":"object",A.method,A.url);t.isArray?(k.length=0,d(i,function(t){"object"==typeof t?k.push(new b(t)):k.push(t)})):(o(i,k),k.$promise=u)}return k.$resolved=!0,e.resource=k,e},function(t){return k.$resolved=!0,(S||p)(t),s.reject(t)});return O=O.then(function(t){var n=E(t);return(C||p)(n,t.headers),n},P),M?O:(k.$promise=O,k.$resolved=!1,k)},b.prototype["$"+r]=function(t,n,e){m(t)&&(e=n,n=t,t={});var i=b[r].call(this,t,this,n,e);return i.$promise||i}}),b.bind=function(n){return h(t,v({},l,n),c)},b}var p=n.noop,d=n.forEach,v=n.extend,g=n.copy,m=n.isFunction;return f.prototype={setUrlParams:function(e,r,i){var o,u,s=this,c=i||s.template,f="",h=s.urlParams={};d(c.split(/\W/),function(t){if("hasOwnProperty"===t)throw a("badname","hasOwnProperty is not a valid parameter name.");!new RegExp("^\\d+$").test(t)&&t&&new RegExp("(^|[^\\\\]):"+t+"(\\W|$)").test(c)&&(h[t]=!0)}),c=c.replace(/\\:/g,":"),c=c.replace(t,function(t){return f=t,""}),r=r||{},d(s.urlParams,function(t,e){o=r.hasOwnProperty(e)?r[e]:s.defaults[e],n.isDefined(o)&&null!==o?(u=l(o),c=c.replace(new RegExp(":"+e+"(\\W|$)","g"),function(t,n){return u+n})):c=c.replace(new RegExp("(/?):"+e+"(\\W|$)","g"),function(t,n,e){return"/"==e.charAt(0)?e:n+e})}),s.defaults.stripTrailingSlashes&&(c=c.replace(/\/+$/,"")||"/"),c=c.replace(/\/\.(?=\w+($|\?))/,"."),e.url=f+c.replace(/\/\\\./,"/."),d(r,function(t,n){s.urlParams[n]||(e.params=e.params||{},e.params[n]=t)})}},h}]})}(window,window.angular),function(t,n,e){"use strict";function r(t,e,r){function i(t,r,i){var a,u;i=i||{},u=i.expires,a=n.isDefined(i.path)?i.path:o,n.isUndefined(r)&&(u="Thu, 01 Jan 1970 00:00:00 GMT",r=""),n.isString(u)&&(u=new Date(u));var s=encodeURIComponent(t)+"="+encodeURIComponent(r);s+=a?";path="+a:"",s+=i.domain?";domain="+i.domain:"",s+=u?";expires="+u.toUTCString():"",s+=i.secure?";secure":"";var l=s.length+1;return l>4096&&e.warn("Cookie '"+t+"' possibly not set or overflowed because it was too large ("+l+" > 4096 bytes)!"),s}var o=r.baseHref(),a=t[0];return function(t,n,e){a.cookie=i(t,n,e)}}n.module("ngCookies",["ng"]).provider("$cookies",[function(){function t(t){return t?n.extend({},r,t):r}var r=this.defaults={};this.$get=["$$cookieReader","$$cookieWriter",function(r,i){return{get:function(t){return r()[t]},getObject:function(t){var e=this.get(t);return e?n.fromJson(e):e},getAll:function(){return r()},put:function(n,e,r){i(n,e,t(r))},putObject:function(t,e,r){this.put(t,n.toJson(e),r)},remove:function(n,r){i(n,e,t(r))}}}]}]),n.module("ngCookies").factory("$cookieStore",["$cookies",function(t){return{get:function(n){return t.getObject(n)},put:function(n,e){t.putObject(n,e)},remove:function(n){t.remove(n)}}}]),r.$inject=["$document","$log","$browser"],n.module("ngCookies").provider("$$cookieWriter",function(){this.$get=r})}(window,window.angular),function(t,n,e){"use strict";function r(t,n,e){if(!t)throw ngMinErr("areq","Argument '{0}' is {1}",n||"?",e||"required");return t}function i(t,n){return t||n?t?n?(V(t)&&(t=t.join(" ")),V(n)&&(n=n.join(" ")),t+" "+n):t:n:""}function o(t){var n={};return t&&(t.to||t.from)&&(n.to=t.to,n.from=t.from),n}function a(t,n,e){var r="";return t=V(t)?t:t&&B(t)&&t.length?t.split(/\s+/):[],q(t,function(t,i){t&&t.length>0&&(r+=i>0?" ":"",r+=e?n+t:t+n)}),r}function u(t,n){var e=t.indexOf(n);n>=0&&t.splice(e,1)}function s(t){if(t instanceof z)switch(t.length){
+case 0:return[];case 1:if(t[0].nodeType===X)return t;break;default:return z(l(t))}return t.nodeType===X?z(t):void 0}function l(t){if(!t[0])return t;for(var n=0;n<t.length;n++){var e=t[n];if(e.nodeType==X)return e}}function c(t,n,e){q(n,function(n){t.addClass(n,e)})}function f(t,n,e){q(n,function(n){t.removeClass(n,e)})}function h(t){return function(n,e){e.addClass&&(c(t,n,e.addClass),e.addClass=null),e.removeClass&&(f(t,n,e.removeClass),e.removeClass=null)}}function p(t){if(t=t||{},!t.$$prepared){var n=t.domOperation||F;t.domOperation=function(){t.$$domOperationFired=!0,n(),n=F},t.$$prepared=!0}return t}function d(t,n){v(t,n),g(t,n)}function v(t,n){n.from&&(t.css(n.from),n.from=null)}function g(t,n){n.to&&(t.css(n.to),n.to=null)}function m(t,n,e){var r=(n.addClass||"")+" "+(e.addClass||""),i=(n.removeClass||"")+" "+(e.removeClass||""),o=y(t.attr("class"),r,i);e.preparationClasses&&(n.preparationClasses=_(e.preparationClasses,n.preparationClasses),delete e.preparationClasses);var a=n.domOperation!==F?n.domOperation:null;return I(n,e),a&&(n.domOperation=a),o.addClass?n.addClass=o.addClass:n.addClass=null,o.removeClass?n.removeClass=o.removeClass:n.removeClass=null,n}function y(t,n,e){function r(t){B(t)&&(t=t.split(" "));var n={};return q(t,function(t){t.length&&(n[t]=!0)}),n}var i=1,o=-1,a={};t=r(t),n=r(n),q(n,function(t,n){a[n]=i}),e=r(e),q(e,function(t,n){a[n]=a[n]===i?null:o});var u={addClass:"",removeClass:""};return q(a,function(n,e){var r,a;n===i?(r="addClass",a=!t[e]):n===o&&(r="removeClass",a=t[e]),a&&(u[r].length&&(u[r]+=" "),u[r]+=e)}),u}function $(t){return t instanceof n.element?t[0]:t}function x(t,n,e){var r="";n&&(r=a(n,K,!0)),e.addClass&&(r=_(r,a(e.addClass,Z))),e.removeClass&&(r=_(r,a(e.removeClass,J))),r.length&&(e.preparationClasses=r,t.addClass(r))}function b(t,n){n.preparationClasses&&(t.removeClass(n.preparationClasses),n.preparationClasses=null),n.activeClasses&&(t.removeClass(n.activeClasses),n.activeClasses=null)}function w(t,n){var e=n?"-"+n+"s":"";return S(t,[ht,e]),[ht,e]}function C(t,n){var e=n?"paused":"",r=R+st;return S(t,[r,e]),[r,e]}function S(t,n){var e=n[0],r=n[1];t.style[e]=r}function _(t,n){return t?n?t+" "+n:t:n}function M(t){return[ft,t+"s"]}function k(t,n){var e=n?ct:ht;return[e,t+"s"]}function A(t,n,e){var r=Object.create(null),i=t.getComputedStyle(n)||{};return q(e,function(t,n){var e=i[t];if(e){var o=e.charAt(0);("-"===o||"+"===o||o>=0)&&(e=E(e)),0===e&&(e=null),r[n]=e}}),r}function E(t){var n=0,e=t.split(/\s*,\s*/);return q(e,function(t){"s"==t.charAt(t.length-1)&&(t=t.substring(0,t.length-1)),t=parseFloat(t)||0,n=n?Math.max(t,n):t}),n}function P(t){return 0===t||null!=t}function O(t,n){var e=j,r=t+"s";return n?e+=rt:r+=" linear all",[e,r]}function T(){var t=Object.create(null);return{flush:function(){t=Object.create(null)},count:function(n){var e=t[n];return e?e.total:0},get:function(n){var e=t[n];return e&&e.value},put:function(n,e){t[n]?t[n].total++:t[n]={total:1,value:e}}}}function L(t,n,e){q(e,function(e){t[e]=H(t[e])?t[e]:n.style.getPropertyValue(e)})}var j,N,R,D,F=n.noop,I=n.extend,z=n.element,q=n.forEach,V=n.isArray,B=n.isString,W=n.isObject,U=n.isUndefined,H=n.isDefined,Y=n.isFunction,G=n.isElement,X=1,Z="-add",J="-remove",K="ng-",Q="-active",tt="ng-animate",nt="$$ngAnimateChildren",et="";U(t.ontransitionend)&&H(t.onwebkittransitionend)?(et="-webkit-",j="WebkitTransition",N="webkitTransitionEnd transitionend"):(j="transition",N="transitionend"),U(t.onanimationend)&&H(t.onwebkitanimationend)?(et="-webkit-",R="WebkitAnimation",D="webkitAnimationEnd animationend"):(R="animation",D="animationend");var rt="Duration",it="Property",ot="Delay",at="TimingFunction",ut="IterationCount",st="PlayState",lt=9999,ct=R+ot,ft=R+rt,ht=j+ot,pt=j+rt,dt=["$$rAF",function(t){function n(t){r=r.concat(t),e()}function e(){if(r.length){for(var n=r.shift(),o=0;o<n.length;o++)n[o]();i||t(function(){i||e()})}}var r,i;return r=n.queue=[],n.waitUntilQuiet=function(n){i&&i(),i=t(function(){i=null,n(),e()})},n}],vt=[function(){return function(t,e,r){var i=r.ngAnimateChildren;n.isString(i)&&0===i.length?e.data(nt,!0):r.$observe("ngAnimateChildren",function(t){t="on"===t||"true"===t,e.data(nt,t)})}}],gt="$$animateCss",mt=1e3,yt=3,$t=1.5,xt={transitionDuration:pt,transitionDelay:ht,transitionProperty:j+it,animationDuration:ft,animationDelay:ct,animationIterationCount:R+ut},bt={transitionDuration:pt,transitionDelay:ht,animationDuration:ft,animationDelay:ct},wt=["$animateProvider",function(t){var n=T(),e=T();this.$get=["$window","$$jqLite","$$AnimateRunner","$timeout","$$forceReflow","$sniffer","$$rAFScheduler","$animate",function(t,r,i,s,l,c,f,m){function y(t,n){var e="$$ngAnimateParentKey",r=t.parentNode,i=r[e]||(r[e]=++I);return i+"-"+t.getAttribute("class")+"-"+n}function x(e,r,i,o){var a=n.get(i);return a||(a=A(t,e,o),"infinite"===a.animationIterationCount&&(a.animationIterationCount=1)),n.put(i,a),a}function b(i,o,u,s){var l;if(n.count(u)>0&&(l=e.get(u),!l)){var c=a(o,"-stagger");r.addClass(i,c),l=A(t,i,s),l.animationDuration=Math.max(l.animationDuration,0),l.transitionDuration=Math.max(l.transitionDuration,0),r.removeClass(i,c),e.put(u,l)}return l||{}}function _(t){z.push(t),f.waitUntilQuiet(function(){n.flush(),e.flush();for(var t=l(),r=0;r<z.length;r++)z[r](t);z.length=0})}function E(t,n,e){var r=x(t,n,e,xt),i=r.animationDelay,o=r.transitionDelay;return r.maxDelay=i&&o?Math.max(i,o):i||o,r.maxDuration=Math.max(r.animationDuration*r.animationIterationCount,r.transitionDuration),r}var T=h(r),I=0,z=[];return function(t,e){function l(){h()}function f(){h(!0)}function h(n){W||H&&U||(W=!0,U=!1,e.$$skipPreparationClasses||r.removeClass(t,pt),r.removeClass(t,vt),C(B,!1),w(B,!1),q(rt,function(t){B.style[t[0]]=""}),T(t,e),d(t,e),Object.keys(z).length&&q(z,function(t,n){t?B.style.setProperty(n,t):B.style.removeProperty(n)}),e.onDone&&e.onDone(),Y&&Y.complete(!n))}function x(t){jt.blockTransition&&w(B,t),jt.blockKeyframeAnimation&&C(B,!!t)}function A(){return Y=new i({end:l,cancel:f}),_(F),h(),{$$willAnimate:!1,start:function(){return Y},end:l}}function I(){function n(){if(!W){if(x(!1),q(rt,function(t){var n=t[0],e=t[1];B.style[n]=e}),T(t,e),r.addClass(t,vt),jt.recalculateTimingStyles){if(dt=B.className+" "+pt,Ct=y(B,dt),Tt=E(B,dt,Ct),Lt=Tt.maxDelay,X=Math.max(Lt,0),nt=Tt.maxDuration,0===nt)return void h();jt.hasTransitions=Tt.transitionDuration>0,jt.hasAnimations=Tt.animationDuration>0}if(jt.applyAnimationDelay&&(Lt="boolean"!=typeof e.delay&&P(e.delay)?parseFloat(e.delay):Lt,X=Math.max(Lt,0),Tt.animationDelay=Lt,Nt=k(Lt,!0),rt.push(Nt),B.style[Nt[0]]=Nt[1]),tt=X*mt,et=nt*mt,e.easing){var n,u=e.easing;jt.hasTransitions&&(n=j+at,rt.push([n,u]),B.style[n]=u),jt.hasAnimations&&(n=R+at,rt.push([n,u]),B.style[n]=u)}Tt.transitionDuration&&l.push(N),Tt.animationDuration&&l.push(D),a=Date.now();var c=tt+$t*et,f=a+c,p=t.data(gt)||[],d=!0;if(p.length){var v=p[0];d=f>v.expectedEndTime,d?s.cancel(v.timer):p.push(h)}if(d){var m=s(i,c,!1);p[0]={timer:m,expectedEndTime:f},p.push(h),t.data(gt,p)}t.on(l.join(" "),o),e.to&&(e.cleanupStyles&&L(z,B,Object.keys(e.to)),g(t,e))}}function i(){var n=t.data(gt);if(n){for(var e=1;e<n.length;e++)n[e]();t.removeData(gt)}}function o(t){t.stopPropagation();var n=t.originalEvent||t,e=n.$manualTimeStamp||n.timeStamp||Date.now(),r=parseFloat(n.elapsedTime.toFixed(yt));Math.max(e-a,0)>=tt&&r>=nt&&(H=!0,h())}if(!W){if(!B.parentNode)return void h();var a,l=[],c=function(t){if(H)U&&t&&(U=!1,h());else if(U=!t,Tt.animationDuration){var n=C(B,U);U?rt.push(n):u(rt,n)}},f=Pt>0&&(Tt.transitionDuration&&0===St.transitionDuration||Tt.animationDuration&&0===St.animationDuration)&&Math.max(St.animationDelay,St.transitionDelay);f?s(n,Math.floor(f*Pt*mt),!1):n(),G.resume=function(){c(!0)},G.pause=function(){c(!1)}}}var z={},B=$(t);if(!B||!B.parentNode||!m.enabled())return A();e=p(e);var W,U,H,Y,G,X,tt,nt,et,rt=[],ot=t.attr("class"),ut=o(e);if(0===e.duration||!c.animations&&!c.transitions)return A();var st=e.event&&V(e.event)?e.event.join(" "):e.event,ct=st&&e.structural,ft="",ht="";ct?ft=a(st,K,!0):st&&(ft=st),e.addClass&&(ht+=a(e.addClass,Z)),e.removeClass&&(ht.length&&(ht+=" "),ht+=a(e.removeClass,J)),e.applyClassesEarly&&ht.length&&T(t,e);var pt=[ft,ht].join(" ").trim(),dt=ot+" "+pt,vt=a(pt,Q),xt=ut.to&&Object.keys(ut.to).length>0,wt=(e.keyframeStyle||"").length>0;if(!wt&&!xt&&!pt)return A();var Ct,St;if(e.stagger>0){var _t=parseFloat(e.stagger);St={transitionDelay:_t,animationDelay:_t,transitionDuration:0,animationDuration:0}}else Ct=y(B,dt),St=b(B,pt,Ct,bt);e.$$skipPreparationClasses||r.addClass(t,pt);var Mt;if(e.transitionStyle){var kt=[j,e.transitionStyle];S(B,kt),rt.push(kt)}if(e.duration>=0){Mt=B.style[j].length>0;var At=O(e.duration,Mt);S(B,At),rt.push(At)}if(e.keyframeStyle){var Et=[R,e.keyframeStyle];S(B,Et),rt.push(Et)}var Pt=St?e.staggerIndex>=0?e.staggerIndex:n.count(Ct):0,Ot=0===Pt;Ot&&!e.skipBlocking&&w(B,lt);var Tt=E(B,dt,Ct),Lt=Tt.maxDelay;X=Math.max(Lt,0),nt=Tt.maxDuration;var jt={};if(jt.hasTransitions=Tt.transitionDuration>0,jt.hasAnimations=Tt.animationDuration>0,jt.hasTransitionAll=jt.hasTransitions&&"all"==Tt.transitionProperty,jt.applyTransitionDuration=xt&&(jt.hasTransitions&&!jt.hasTransitionAll||jt.hasAnimations&&!jt.hasTransitions),jt.applyAnimationDuration=e.duration&&jt.hasAnimations,jt.applyTransitionDelay=P(e.delay)&&(jt.applyTransitionDuration||jt.hasTransitions),jt.applyAnimationDelay=P(e.delay)&&jt.hasAnimations,jt.recalculateTimingStyles=ht.length>0,(jt.applyTransitionDuration||jt.applyAnimationDuration)&&(nt=e.duration?parseFloat(e.duration):nt,jt.applyTransitionDuration&&(jt.hasTransitions=!0,Tt.transitionDuration=nt,Mt=B.style[j+it].length>0,rt.push(O(nt,Mt))),jt.applyAnimationDuration&&(jt.hasAnimations=!0,Tt.animationDuration=nt,rt.push(M(nt)))),0===nt&&!jt.recalculateTimingStyles)return A();if(null!=e.delay){var Nt=parseFloat(e.delay);jt.applyTransitionDelay&&rt.push(k(Nt)),jt.applyAnimationDelay&&rt.push(k(Nt,!0))}return null==e.duration&&Tt.transitionDuration>0&&(jt.recalculateTimingStyles=jt.recalculateTimingStyles||Ot),tt=X*mt,et=nt*mt,e.skipBlocking||(jt.blockTransition=Tt.transitionDuration>0,jt.blockKeyframeAnimation=Tt.animationDuration>0&&St.animationDelay>0&&0===St.animationDuration),e.from&&(e.cleanupStyles&&L(z,B,Object.keys(e.from)),v(t,e)),jt.blockTransition||jt.blockKeyframeAnimation?x(nt):e.skipBlocking||w(B,!1),{$$willAnimate:!0,end:l,start:function(){return W?void 0:(G={end:l,cancel:f,resume:null,pause:null},Y=new i(G),_(I),Y)}}}}]}],Ct=["$$animationProvider",function(t){function n(t){return t.parentNode&&11===t.parentNode.nodeType}t.drivers.push("$$animateCssDriver");var e="ng-animate-shim",r="ng-anchor",i="ng-anchor-out",o="ng-anchor-in";this.$get=["$animateCss","$rootScope","$$AnimateRunner","$rootElement","$sniffer","$$jqLite","$document",function(t,a,u,s,l,c,f){function p(t){return t.replace(/\bng-\S+\b/g,"")}function d(t,n){return B(t)&&(t=t.split(" ")),B(n)&&(n=n.split(" ")),t.filter(function(t){return-1===n.indexOf(t)}).join(" ")}function v(n,a,s){function l(t){var n={},e=$(t).getBoundingClientRect();return q(["width","height","top","left"],function(t){var r=e[t];switch(t){case"top":r+=y.scrollTop;break;case"left":r+=y.scrollLeft}n[t]=Math.floor(r)+"px"}),n}function c(){var n=t(g,{addClass:i,delay:!0,from:l(a)});return n.$$willAnimate?n:null}function f(t){return t.attr("class")||""}function h(){var n=p(f(s)),e=d(n,m),r=d(m,n),a=t(g,{to:l(s),addClass:o+" "+e,removeClass:i+" "+r,delay:!0});return a.$$willAnimate?a:null}function v(){g.remove(),a.removeClass(e),s.removeClass(e)}var g=z($(a).cloneNode(!0)),m=p(f(g));a.addClass(e),s.addClass(e),g.addClass(r),b.append(g);var x,w=c();if(!w&&(x=h(),!x))return v();var C=w||x;return{start:function(){function t(){e&&e.end()}var n,e=C.start();return e.done(function(){return e=null,!x&&(x=h())?(e=x.start(),e.done(function(){e=null,v(),n.complete()}),e):(v(),void n.complete())}),n=new u({end:t,cancel:t})}}}function g(t,n,e,r){var i=m(t,F),o=m(n,F),a=[];return q(r,function(t){var n=t.out,r=t["in"],i=v(e,n,r);i&&a.push(i)}),i||o||0!==a.length?{start:function(){function t(){q(n,function(t){t.end()})}var n=[];i&&n.push(i.start()),o&&n.push(o.start()),q(a,function(t){n.push(t.start())});var e=new u({end:t,cancel:t});return u.all(n,function(t){e.complete(t)}),e}}:void 0}function m(n){var e=n.element,r=n.options||{};n.structural&&(r.event=n.event,r.structural=!0,r.applyClassesEarly=!0,"leave"===n.event&&(r.onDone=r.domOperation)),r.preparationClasses&&(r.event=_(r.event,r.preparationClasses));var i=t(e,r);return i.$$willAnimate?i:null}if(!l.animations&&!l.transitions)return F;var y=f[0].body,x=$(s),b=z(n(x)||y.contains(x)?x:y);h(c);return function(t){return t.from&&t.to?g(t.from,t.to,t.classes,t.anchors):m(t)}}]}],St=["$animateProvider",function(t){this.$get=["$injector","$$AnimateRunner","$$jqLite",function(n,e,r){function i(e){e=V(e)?e:e.split(" ");for(var r=[],i={},o=0;o<e.length;o++){var a=e[o],u=t.$$registeredAnimations[a];u&&!i[a]&&(r.push(n.get(u)),i[a]=!0)}return r}var o=h(r);return function(t,n,r,a){function u(){a.domOperation(),o(t,a)}function s(t,n,r,i,o){var a;switch(r){case"animate":a=[n,i.from,i.to,o];break;case"setClass":a=[n,v,g,o];break;case"addClass":a=[n,v,o];break;case"removeClass":a=[n,g,o];break;default:a=[n,o]}a.push(i);var u=t.apply(t,a);if(u)if(Y(u.start)&&(u=u.start()),u instanceof e)u.done(o);else if(Y(u))return u;return F}function l(t,n,r,i,o){var a=[];return q(i,function(i){var u=i[o];u&&a.push(function(){var i,o,a=!1,l=function(t){a||(a=!0,(o||F)(t),i.complete(!t))};return i=new e({end:function(){l()},cancel:function(){l(!0)}}),o=s(u,t,n,r,function(t){var n=t===!1;l(n)}),i})}),a}function c(t,n,r,i,o){var a=l(t,n,r,i,o);if(0===a.length){var u,s;"beforeSetClass"===o?(u=l(t,"removeClass",r,i,"beforeRemoveClass"),s=l(t,"addClass",r,i,"beforeAddClass")):"setClass"===o&&(u=l(t,"removeClass",r,i,"removeClass"),s=l(t,"addClass",r,i,"addClass")),u&&(a=a.concat(u)),s&&(a=a.concat(s))}if(0!==a.length)return function(t){var n=[];return a.length&&q(a,function(t){n.push(t())}),n.length?e.all(n,t):t(),function(t){q(n,function(n){t?n.cancel():n.end()})}}}3===arguments.length&&W(r)&&(a=r,r=null),a=p(a),r||(r=t.attr("class")||"",a.addClass&&(r+=" "+a.addClass),a.removeClass&&(r+=" "+a.removeClass));var f,h,v=a.addClass,g=a.removeClass,m=i(r);if(m.length){var y,$;"leave"==n?($="leave",y="afterLeave"):($="before"+n.charAt(0).toUpperCase()+n.substr(1),y=n),"enter"!==n&&"move"!==n&&(f=c(t,n,a,m,$)),h=c(t,n,a,m,y)}return f||h?{start:function(){function n(n){s=!0,u(),d(t,a),l.complete(n)}function r(t){s||((i||F)(t),n(t))}var i,o=[];f&&o.push(function(t){i=f(t)}),o.length?o.push(function(t){u(),t(!0)}):u(),h&&o.push(function(t){i=h(t)});var s=!1,l=new e({end:function(){r()},cancel:function(){r(!0)}});return e.chain(o,n),l}}:void 0}}]}],_t=["$$animationProvider",function(t){t.drivers.push("$$animateJsDriver"),this.$get=["$$animateJs","$$AnimateRunner",function(t,n){function e(n){var e=n.element,r=n.event,i=n.options,o=n.classes;return t(e,r,o,i)}return function(t){if(t.from&&t.to){var r=e(t.from),i=e(t.to);if(!r&&!i)return;return{start:function(){function t(){return function(){q(o,function(t){t.end()})}}function e(t){a.complete(t)}var o=[];r&&o.push(r.start()),i&&o.push(i.start()),n.all(o,e);var a=new n({end:t(),cancel:t()});return a}}}return e(t)}}]}],Mt="data-ng-animate",kt="$ngAnimatePin",At=["$animateProvider",function(t){function n(t,n,e,r){return a[t].some(function(t){return t(n,e,r)})}function e(t,n){t=t||{};var e=(t.addClass||"").length>0,r=(t.removeClass||"").length>0;return n?e&&r:e||r}var i=1,o=2,a=this.rules={skip:[],cancel:[],join:[]};a.join.push(function(t,n,r){return!n.structural&&e(n.options)}),a.skip.push(function(t,n,r){return!n.structural&&!e(n.options)}),a.skip.push(function(t,n,e){return"leave"==e.event&&n.structural}),a.skip.push(function(t,n,e){return e.structural&&e.state===o&&!n.structural}),a.cancel.push(function(t,n,e){return e.structural&&n.structural}),a.cancel.push(function(t,n,e){return e.state===o&&n.structural}),a.cancel.push(function(t,n,e){var r=n.options,i=e.options;return r.addClass&&r.addClass===i.removeClass||r.removeClass&&r.removeClass===i.addClass}),this.$get=["$$rAF","$rootScope","$rootElement","$document","$$HashMap","$$animation","$$AnimateRunner","$templateRequest","$$jqLite","$$forceReflow",function(a,u,c,f,v,g,y,w,C,S){function _(){var t=!1;return function(n){t?n():u.$$postDigest(function(){t=!0,n()})}}function M(t,n){return m(t,n,{})}function k(t,n){var e=$(t),r=[],i=F[n];return i&&q(i,function(t){t.node.contains(e)&&r.push(t.callback)}),r}function A(t,r,l){function c(n,e,r,i){C(function(){var n=k(t,e);n.length&&a(function(){q(n,function(n){n(t,r,i)})})}),n.progress(e,r,i)}function f(n){b(t,l),J(t,l),d(t,l),l.domOperation(),w.complete(!n)}var h,v;t=s(t),t&&(h=$(t),v=t.parent()),l=p(l);var w=new y,C=_();if(V(l.addClass)&&(l.addClass=l.addClass.join(" ")),l.addClass&&!B(l.addClass)&&(l.addClass=null),V(l.removeClass)&&(l.removeClass=l.removeClass.join(" ")),l.removeClass&&!B(l.removeClass)&&(l.removeClass=null),l.from&&!W(l.from)&&(l.from=null),l.to&&!W(l.to)&&(l.to=null),!h)return f(),w;var S=[h.className,l.addClass,l.removeClass].join(" ");if(!Z(S))return f(),w;var A=["enter","move","leave"].indexOf(r)>=0,O=!R||N.get(h),D=!O&&j.get(h)||{},F=!!D.state;if(O||F&&D.state==i||(O=!T(t,v,r)),O)return f(),w;A&&E(t);var I={structural:A,element:t,event:r,close:f,options:l,runner:w};if(F){var z=n("skip",t,I,D);if(z)return D.state===o?(f(),w):(m(t,D.options,l),D.runner);var U=n("cancel",t,I,D);if(U)if(D.state===o)D.runner.end();else{if(!D.structural)return m(t,D.options,I.options),D.runner;D.close()}else{var H=n("join",t,I,D);if(H){if(D.state!==o)return x(t,A?r:null,l),r=I.event=D.event,l=m(t,D.options,I.options),D.runner;M(t,l)}}}else M(t,l);var Y=I.structural;if(Y||(Y="animate"===I.event&&Object.keys(I.options.to||{}).length>0||e(I.options)),!Y)return f(),P(t),w;var G=(D.counter||0)+1;return I.counter=G,L(t,i,I),u.$$postDigest(function(){var n=j.get(h),i=!n;n=n||{};var a=t.parent()||[],u=a.length>0&&("animate"===n.event||n.structural||e(n.options));if(i||n.counter!==G||!u)return i&&(J(t,l),d(t,l)),(i||A&&n.event!==r)&&(l.domOperation(),w.end()),void(u||P(t));r=!n.structural&&e(n.options,!0)?"setClass":n.event,L(t,o);var s=g(t,r,n.options);s.done(function(n){f(!n);var e=j.get(h);e&&e.counter===G&&P($(t)),c(w,r,"close",{})}),w.setHost(s),c(w,r,"start",{})}),w}function E(t){var n=$(t),e=n.querySelectorAll("["+Mt+"]");q(e,function(t){var n=parseInt(t.getAttribute(Mt)),e=j.get(t);switch(n){case o:e.runner.end();case i:e&&j.remove(t)}})}function P(t){var n=$(t);n.removeAttribute(Mt),j.remove(n)}function O(t,n){return $(t)===$(n)}function T(t,n,e){var r,i=z(f[0].body),o=O(t,i)||"HTML"===t[0].nodeName,a=O(t,c),u=!1,s=t.data(kt);for(s&&(n=s);n&&n.length;){a||(a=O(n,c));var l=n[0];if(l.nodeType!==X)break;var h=j.get(l)||{};if(u||(u=h.structural||N.get(l)),U(r)||r===!0){var p=n.data(nt);H(p)&&(r=p)}if(u&&r===!1)break;a||(a=O(n,c),a||(s=n.data(kt),s&&(n=s))),o||(o=O(n,i)),n=n.parent()}var d=!u||r;return d&&a&&o}function L(t,n,e){e=e||{},e.state=n;var r=$(t);r.setAttribute(Mt,n);var i=j.get(r),o=i?I(i,e):e;j.put(r,o)}var j=new v,N=new v,R=null,D=u.$watch(function(){return 0===w.totalPendingRequests},function(t){t&&(D(),u.$$postDigest(function(){u.$$postDigest(function(){null===R&&(R=!0)})}))}),F={},Y=t.classNameFilter(),Z=Y?function(t){return Y.test(t)}:function(){return!0},J=h(C);return{on:function(t,n,e){var r=l(n);F[t]=F[t]||[],F[t].push({node:r,callback:e})},off:function(t,n,e){function r(t,n,e){var r=l(n);return t.filter(function(t){var n=t.node===r&&(!e||t.callback===e);return!n})}var i=F[t];i&&(F[t]=1===arguments.length?null:r(i,n,e))},pin:function(t,n){r(G(t),"element","not an element"),r(G(n),"parentElement","not an element"),t.data(kt,n)},push:function(t,n,e,r){return e=e||{},e.domOperation=r,A(t,n,e)},enabled:function(t,n){var e=arguments.length;if(0===e)n=!!R;else{var r=G(t);if(r){var i=$(t),o=N.get(i);1===e?n=!o:(n=!!n,n?o&&N.remove(i):N.put(i,!0))}else n=R=!!t}return n}}}]}],Et=["$$rAF",function(t){function n(n){e.push(n),e.length>1||t(function(){for(var t=0;t<e.length;t++)e[t]();e=[]})}var e=[];return function(){var t=!1;return n(function(){t=!0}),function(e){t?e():n(e)}}}],Pt=["$q","$sniffer","$$animateAsyncRun",function(t,n,e){function r(t){this.setHost(t),this._doneCallbacks=[],this._runInAnimationFrame=e(),this._state=0}var i=0,o=1,a=2;return r.chain=function(t,n){function e(){return r===t.length?void n(!0):void t[r](function(t){return t===!1?void n(!1):(r++,void e())})}var r=0;e()},r.all=function(t,n){function e(e){i=i&&e,++r===t.length&&n(i)}var r=0,i=!0;q(t,function(t){t.done(e)})},r.prototype={setHost:function(t){this.host=t||{}},done:function(t){this._state===a?t():this._doneCallbacks.push(t)},progress:F,getPromise:function(){if(!this.promise){var n=this;this.promise=t(function(t,e){n.done(function(n){n===!1?e():t()})})}return this.promise},then:function(t,n){return this.getPromise().then(t,n)},"catch":function(t){return this.getPromise()["catch"](t)},"finally":function(t){return this.getPromise()["finally"](t)},pause:function(){this.host.pause&&this.host.pause()},resume:function(){this.host.resume&&this.host.resume()},end:function(){this.host.end&&this.host.end(),this._resolve(!0)},cancel:function(){this.host.cancel&&this.host.cancel(),this._resolve(!1)},complete:function(t){var n=this;n._state===i&&(n._state=o,n._runInAnimationFrame(function(){n._resolve(t)}))},_resolve:function(t){this._state!==a&&(q(this._doneCallbacks,function(n){n(t)}),this._doneCallbacks.length=0,this._state=a)}},r}],Ot=["$animateProvider",function(t){function n(t,n){t.data(u,n)}function e(t){t.removeData(u)}function r(t){return t.data(u)}var o="ng-animate-ref",a=this.drivers=[],u="$$animationRunner";this.$get=["$$jqLite","$rootScope","$injector","$$AnimateRunner","$$HashMap","$$rAFScheduler",function(t,u,s,l,c,f){function v(t){function n(t){if(t.processed)return t;t.processed=!0;var e=t.domNode,r=e.parentNode;o.put(e,t);for(var a;r;){if(a=o.get(r)){a.processed||(a=n(a));break}r=r.parentNode}return(a||i).children.push(t),t}function e(t){var n,e=[],r=[];for(n=0;n<t.children.length;n++)r.push(t.children[n]);var i=r.length,o=0,a=[];for(n=0;n<r.length;n++){var u=r[n];0>=i&&(i=o,o=0,e.push(a),a=[]),a.push(u.fn),u.children.forEach(function(t){o++,r.push(t)}),i--}return a.length&&e.push(a),e}var r,i={children:[]},o=new c;for(r=0;r<t.length;r++){var a=t[r];o.put(a.domNode,t[r]={domNode:a.domNode,fn:a.fn,children:[]})}for(r=0;r<t.length;r++)n(t[r]);return e(i)}var g=[],m=h(t);return function(c,h,y){function x(t){var n="["+o+"]",e=t.hasAttribute(o)?[t]:t.querySelectorAll(n),r=[];return q(e,function(t){var n=t.getAttribute(o);n&&n.length&&r.push(t)}),r}function b(t){var n=[],e={};q(t,function(t,r){var i=t.element,a=$(i),u=t.event,s=["enter","move"].indexOf(u)>=0,l=t.structural?x(a):[];if(l.length){var c=s?"to":"from";q(l,function(t){var n=t.getAttribute(o);e[n]=e[n]||{},e[n][c]={animationID:r,element:z(t)}})}else n.push(t)});var r={},i={};return q(e,function(e,o){var a=e.from,u=e.to;if(!a||!u){var s=a?a.animationID:u.animationID,l=s.toString();return void(r[l]||(r[l]=!0,n.push(t[s])))}var c=t[a.animationID],f=t[u.animationID],h=a.animationID.toString();if(!i[h]){var p=i[h]={structural:!0,beforeStart:function(){c.beforeStart(),f.beforeStart()},close:function(){c.close(),f.close()},classes:w(c.classes,f.classes),from:c,to:f,anchors:[]};p.classes.length?n.push(p):(n.push(c),n.push(f))}i[h].anchors.push({out:a.element,"in":u.element})}),n}function w(t,n){t=t.split(" "),n=n.split(" ");for(var e=[],r=0;r<t.length;r++){var i=t[r];if("ng-"!==i.substring(0,3))for(var o=0;o<n.length;o++)if(i===n[o]){e.push(i);break}}return e.join(" ")}function C(t){for(var n=a.length-1;n>=0;n--){var e=a[n];if(s.has(e)){var r=s.get(e),i=r(t);if(i)return i}}}function S(){c.addClass(tt),O&&t.addClass(c,O)}function _(t,n){function e(t){r(t).setHost(n)}t.from&&t.to?(e(t.from.element),e(t.to.element)):e(t.element)}function M(){var t=r(c);!t||"leave"===h&&y.$$domOperationFired||t.end()}function k(n){c.off("$destroy",M),e(c),m(c,y),d(c,y),y.domOperation(),O&&t.removeClass(c,O),c.removeClass(tt),E.complete(!n)}y=p(y);var A=["enter","move","leave"].indexOf(h)>=0,E=new l({end:function(){k()},cancel:function(){k(!0)}});if(!a.length)return k(),E;n(c,E);var P=i(c.attr("class"),i(y.addClass,y.removeClass)),O=y.tempClasses;return O&&(P+=" "+O,y.tempClasses=null),g.push({element:c,classes:P,event:h,structural:A,options:y,beforeStart:S,close:k}),c.on("$destroy",M),g.length>1?E:(u.$$postDigest(function(){var t=[];q(g,function(n){r(n.element)?t.push(n):n.close()}),g.length=0;var n=b(t),e=[];q(n,function(t){e.push({domNode:$(t.from?t.from.element:t.element),fn:function(){t.beforeStart();var n,e=t.close,i=t.anchors?t.from.element||t.to.element:t.element;if(r(i)){var o=C(t);o&&(n=o.start)}if(n){var a=n();a.done(function(t){e(!t)}),_(t,a)}else e()}})}),f(v(e))}),E)}}]}];n.module("ngAnimate",[]).directive("ngAnimateChildren",vt).factory("$$rAFScheduler",dt).factory("$$AnimateRunner",Pt).factory("$$animateAsyncRun",Et).provider("$$animateQueue",At).provider("$$animation",Ot).provider("$animateCss",wt).provider("$$animateCssDriver",Ct).provider("$$animateJs",St).provider("$$animateJsDriver",_t)}(window,window.angular),function(){function t(t,n){return t.set(n[0],n[1]),t}function n(t,n){return t.add(n),t}function e(t,n,e){var r=e.length;switch(r){case 0:return t.call(n);case 1:return t.call(n,e[0]);case 2:return t.call(n,e[0],e[1]);case 3:return t.call(n,e[0],e[1],e[2])}return t.apply(n,e)}function r(t,n,e,r){for(var i=-1,o=t.length;++i<o;){var a=t[i];n(r,a,e(a),t)}return r}function i(t,n){for(var e=-1,r=t.length,i=-1,o=n.length,a=Array(r+o);++e<r;)a[e]=t[e];for(;++i<o;)a[e++]=n[i];return a}function o(t,n){for(var e=-1,r=t.length;++e<r&&n(t[e],e,t)!==!1;);return t}function a(t,n){for(var e=t.length;e--&&n(t[e],e,t)!==!1;);return t}function u(t,n){for(var e=-1,r=t.length;++e<r;)if(!n(t[e],e,t))return!1;return!0}function s(t,n){for(var e=-1,r=t.length,i=0,o=[];++e<r;){var a=t[e];n(a,e,t)&&(o[i++]=a)}return o}function l(t,n){return!!t.length&&y(t,n,0)>-1}function c(t,n,e){for(var r=-1,i=t.length;++r<i;)if(e(n,t[r]))return!0;return!1}function f(t,n){for(var e=-1,r=t.length,i=Array(r);++e<r;)i[e]=n(t[e],e,t);return i}function h(t,n){for(var e=-1,r=n.length,i=t.length;++e<r;)t[i+e]=n[e];return t}function p(t,n,e,r){var i=-1,o=t.length;for(r&&o&&(e=t[++i]);++i<o;)e=n(e,t[i],i,t);return e}function d(t,n,e,r){var i=t.length;for(r&&i&&(e=t[--i]);i--;)e=n(e,t[i],i,t);return e}function v(t,n){for(var e=-1,r=t.length;++e<r;)if(n(t[e],e,t))return!0;return!1}function g(t,n,e,r){var i;return e(t,function(t,e,o){return n(t,e,o)?(i=r?e:t,!1):void 0}),i}function m(t,n,e){for(var r=t.length,i=e?r:-1;e?i--:++i<r;)if(n(t[i],i,t))return i;return-1}function y(t,n,e){if(n!==n)return N(t,e);for(var r=e-1,i=t.length;++r<i;)if(t[r]===n)return r;return-1}function $(t,n,e,r){for(var i=e-1,o=t.length;++i<o;)if(r(t[i],n))return i;return-1}function x(t,n){var e=t?t.length:0;return e?C(t,n)/e:$t}function b(t,n,e,r,i){return i(t,function(t,i,o){e=r?(r=!1,t):n(e,t,i,o)}),e}function w(t,n){var e=t.length;for(t.sort(n);e--;)t[e]=t[e].value;return t}function C(t,n){for(var e,r=-1,i=t.length;++r<i;){var o=n(t[r]);o!==U&&(e=e===U?o:e+o)}return e}function S(t,n){for(var e=-1,r=Array(t);++e<t;)r[e]=n(e);return r}function _(t,n){return f(n,function(n){return[n,t[n]]})}function M(t){return function(n){return t(n)}}function k(t,n){return f(n,function(n){return t[n]})}function A(t,n){for(var e=-1,r=t.length;++e<r&&y(n,t[e],0)>-1;);return e}function E(t,n){for(var e=t.length;e--&&y(n,t[e],0)>-1;);return e}function P(t){return t&&t.Object===Object?t:null}function O(t,n){for(var e=t.length,r=0;e--;)t[e]===n&&r++;return r}function T(t){return we[t]}function L(t){return Ce[t]}function j(t){return"\\"+Me[t]}function N(t,n,e){for(var r=t.length,i=n+(e?0:-1);e?i--:++i<r;){var o=t[i];if(o!==o)return i}return-1}function R(t){var n=!1;if(null!=t&&"function"!=typeof t.toString)try{n=!!(t+"")}catch(e){}return n}function D(t){for(var n,e=[];!(n=t.next()).done;)e.push(n.value);return e}function F(t){var n=-1,e=Array(t.size);return t.forEach(function(t,r){e[++n]=[r,t]}),e}function I(t,n){for(var e=-1,r=t.length,i=0,o=[];++e<r;){var a=t[e];a!==n&&a!==Z||(t[e]=Z,o[i++]=e)}return o}function z(t){var n=-1,e=Array(t.size);return t.forEach(function(t){e[++n]=t}),e}function q(t){if(!t||!ge.test(t))return t.length;for(var n=de.lastIndex=0;de.test(t);)n++;return n}function V(t){return t.match(de)}function B(t){return Se[t]}function W(P){function En(t){if(lu(t)&&!tf(t)&&!(t instanceof Tn)){if(t instanceof On)return t;if(dl.call(t,"__wrapped__"))return no(t)}return new On(t)}function Pn(){}function On(t,n){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!n,this.__index__=0,this.__values__=U}function Tn(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=xt,this.__views__=[]}function Ln(){var t=new Tn(this.__wrapped__);return t.__actions__=Zr(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=Zr(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=Zr(this.__views__),t}function jn(){if(this.__filtered__){var t=new Tn(this);t.__dir__=-1,t.__filtered__=!0}else t=this.clone(),t.__dir__*=-1;return t}function Nn(){var t=this.__wrapped__.value(),n=this.__dir__,e=tf(t),r=0>n,i=e?t.length:0,o=Li(0,i,this.__views__),a=o.start,u=o.end,s=u-a,l=r?u:a-1,c=this.__iteratees__,f=c.length,h=0,p=Il(s,this.__takeCount__);if(!e||Y>i||i==s&&p==s)return Or(t,this.__actions__);var d=[];t:for(;s--&&p>h;){l+=n;for(var v=-1,g=t[l];++v<f;){var m=c[v],y=m.iteratee,$=m.type,x=y(g);if($==dt)g=x;else if(!x){if($==pt)continue t;break t}}d[h++]=g}return d}function Rn(){}function Dn(t,n){return In(t,n)&&delete t[n]}function Fn(t,n){if(Zl){var e=t[n];return e===X?U:e}return dl.call(t,n)?t[n]:U}function In(t,n){return Zl?t[n]!==U:dl.call(t,n)}function zn(t,n,e){t[n]=Zl&&e===U?X:e}function qn(t){var n=-1,e=t?t.length:0;for(this.clear();++n<e;){var r=t[n];this.set(r[0],r[1])}}function Vn(){this.__data__={hash:new Rn,map:Hl?new Hl:[],string:new Rn}}function Bn(t){var n=this.__data__;return Wi(t)?Dn("string"==typeof t?n.string:n.hash,t):Hl?n.map["delete"](t):ee(n.map,t)}function Wn(t){var n=this.__data__;return Wi(t)?Fn("string"==typeof t?n.string:n.hash,t):Hl?n.map.get(t):re(n.map,t)}function Un(t){var n=this.__data__;return Wi(t)?In("string"==typeof t?n.string:n.hash,t):Hl?n.map.has(t):ie(n.map,t)}function Hn(t,n){var e=this.__data__;return Wi(t)?zn("string"==typeof t?e.string:e.hash,t,n):Hl?e.map.set(t,n):ae(e.map,t,n),this}function Yn(t){var n=-1,e=t?t.length:0;for(this.__data__=new qn;++n<e;)this.push(t[n])}function Gn(t,n){var e=t.__data__;if(Wi(n)){var r=e.__data__,i="string"==typeof n?r.string:r.hash;return i[n]===X}return e.has(n)}function Xn(t){var n=this.__data__;if(Wi(t)){var e=n.__data__,r="string"==typeof t?e.string:e.hash;r[t]=X}else n.set(t,X)}function Zn(t){var n=-1,e=t?t.length:0;for(this.clear();++n<e;){var r=t[n];this.set(r[0],r[1])}}function Jn(){this.__data__={array:[],map:null}}function Kn(t){var n=this.__data__,e=n.array;return e?ee(e,t):n.map["delete"](t)}function Qn(t){var n=this.__data__,e=n.array;return e?re(e,t):n.map.get(t)}function te(t){var n=this.__data__,e=n.array;return e?ie(e,t):n.map.has(t)}function ne(t,n){var e=this.__data__,r=e.array;r&&(r.length<Y-1?ae(r,t,n):(e.array=null,e.map=new qn(r)));var i=e.map;return i&&i.set(t,n),this}function ee(t,n){var e=oe(t,n);if(0>e)return!1;var r=t.length-1;return e==r?t.pop():Ol.call(t,e,1),!0}function re(t,n){var e=oe(t,n);return 0>e?U:t[e][1]}function ie(t,n){return oe(t,n)>-1}function oe(t,n){for(var e=t.length;e--;)if(Ha(t[e][0],n))return e;return-1}function ae(t,n,e){var r=oe(t,n);0>r?t.push([n,e]):t[r][1]=e}function ue(t,n,e,r){
+return t===U||Ha(t,fl[e])&&!dl.call(r,e)?n:t}function se(t,n,e){(e===U||Ha(t[n],e))&&("number"!=typeof n||e!==U||n in t)||(t[n]=e)}function le(t,n,e){var r=t[n];dl.call(t,n)&&Ha(r,e)&&(e!==U||n in t)||(t[n]=e)}function ce(t,n,e,r){return sc(t,function(t,i,o){n(r,t,e(t),o)}),r}function fe(t,n){return t&&Jr(n,Yu(n),t)}function de(t,n){for(var e=-1,r=null==t,i=n.length,o=Array(i);++e<i;)o[e]=r?U:Wu(t,n[e]);return o}function we(t,n,e){return t===t&&(e!==U&&(t=e>=t?t:e),n!==U&&(t=t>=n?t:n)),t}function Ce(t,n,e,r,i,a,u){var s;if(r&&(s=a?r(t,i,a,u):r(t)),s!==U)return s;if(!su(t))return t;var l=tf(t);if(l){if(s=Ni(t),!n)return Zr(t,s)}else{var c=Ti(t),f=c==At||c==Et;if(nf(t))return Fr(t,n);if(c==Tt||c==Ct||f&&!a){if(R(t))return a?t:{};if(s=Ri(f?{}:t),!n)return Kr(t,fe(s,t))}else{if(!be[c])return a?t:{};s=Di(t,c,Ce,n)}}u||(u=new Zn);var h=u.get(t);if(h)return h;if(u.set(t,s),!l)var p=e?Ci(t):Yu(t);return o(p||t,function(i,o){p&&(o=i,i=t[o]),le(s,o,Ce(i,n,e,r,o,t,u))}),s}function Se(t){var n=Yu(t),e=n.length;return function(r){if(null==r)return!e;for(var i=e;i--;){var o=n[i],a=t[o],u=r[o];if(u===U&&!(o in Object(r))||!a(u))return!1}return!0}}function _e(t){return su(t)?Al(t):{}}function Me(t,n,e){if("function"!=typeof t)throw new ll(G);return Pl(function(){t.apply(U,e)},n)}function Ee(t,n,e,r){var i=-1,o=l,a=!0,u=t.length,s=[],h=n.length;if(!u)return s;e&&(n=f(n,M(e))),r?(o=c,a=!1):n.length>=Y&&(o=Gn,a=!1,n=new Yn(n));t:for(;++i<u;){var p=t[i],d=e?e(p):p;if(p=r||0!==p?p:0,a&&d===d){for(var v=h;v--;)if(n[v]===d)continue t;s.push(p)}else o(n,d,r)||s.push(p)}return s}function Pe(t,n){var e=!0;return sc(t,function(t,r,i){return e=!!n(t,r,i)}),e}function Te(t,n,e){for(var r=-1,i=t.length;++r<i;){var o=t[r],a=n(o);if(null!=a&&(u===U?a===a&&!Cu(a):e(a,u)))var u=a,s=o}return s}function Le(t,n,e,r){var i=t.length;for(e=Eu(e),0>e&&(e=-e>i?0:i+e),r=r===U||r>i?i:Eu(r),0>r&&(r+=i),r=e>r?0:Pu(r);r>e;)t[e++]=n;return t}function je(t,n){var e=[];return sc(t,function(t,r,i){n(t,r,i)&&e.push(t)}),e}function Ne(t,n,e,r,i){var o=-1,a=t.length;for(e||(e=Ii),i||(i=[]);++o<a;){var u=t[o];n>0&&e(u)?n>1?Ne(u,n-1,e,r,i):h(i,u):r||(i[i.length]=u)}return i}function Fe(t,n){return t&&cc(t,n,Yu)}function Ie(t,n){return t&&fc(t,n,Yu)}function ze(t,n){return s(n,function(n){return ou(t[n])})}function qe(t,n){n=Bi(n,t)?[n]:Rr(n);for(var e=0,r=n.length;null!=t&&r>e;)t=t[Qi(n[e++])];return e&&e==r?t:U}function Ve(t,n,e){var r=n(t);return tf(t)?r:h(r,e(t))}function Be(t,n){return t>n}function We(t,n){return dl.call(t,n)||"object"==typeof t&&n in t&&null===Pi(t)}function Ue(t,n){return n in Object(t)}function He(t,n,e){return t>=Il(n,e)&&t<Fl(n,e)}function Ye(t,n,e){for(var r=e?c:l,i=t[0].length,o=t.length,a=o,u=Array(o),s=1/0,h=[];a--;){var p=t[a];a&&n&&(p=f(p,M(n))),s=Il(p.length,s),u[a]=!e&&(n||i>=120&&p.length>=120)?new Yn(a&&p):U}p=t[0];var d=-1,v=u[0];t:for(;++d<i&&h.length<s;){var g=p[d],m=n?n(g):g;if(g=e||0!==g?g:0,!(v?Gn(v,m):r(h,m,e))){for(a=o;--a;){var y=u[a];if(!(y?Gn(y,m):r(t[a],m,e)))continue t}v&&v.push(m),h.push(g)}}return h}function Ge(t,n,e,r){return Fe(t,function(t,i,o){n(r,e(t),i,o)}),r}function Xe(t,n,r){Bi(n,t)||(n=Rr(n),t=Ji(t,n),n=bo(n));var i=null==t?t:t[Qi(n)];return null==i?U:e(i,t,r)}function Ze(t,n,e,r,i){return t===n?!0:null==t||null==n||!su(t)&&!lu(n)?t!==t&&n!==n:Je(t,n,Ze,e,r,i)}function Je(t,n,e,r,i,o){var a=tf(t),u=tf(n),s=St,l=St;a||(s=Ti(t),s=s==Ct?Tt:s),u||(l=Ti(n),l=l==Ct?Tt:l);var c=s==Tt&&!R(t),f=l==Tt&&!R(n),h=s==l;if(h&&!c)return o||(o=new Zn),a||Su(t)?xi(t,n,e,r,i,o):bi(t,n,s,e,r,i,o);if(!(i&st)){var p=c&&dl.call(t,"__wrapped__"),d=f&&dl.call(n,"__wrapped__");if(p||d){var v=p?t.value():t,g=d?n.value():n;return o||(o=new Zn),e(v,g,r,i,o)}}return h?(o||(o=new Zn),wi(t,n,e,r,i,o)):!1}function Ke(t,n,e,r){var i=e.length,o=i,a=!r;if(null==t)return!o;for(t=Object(t);i--;){var u=e[i];if(a&&u[2]?u[1]!==t[u[0]]:!(u[0]in t))return!1}for(;++i<o;){u=e[i];var s=u[0],l=t[s],c=u[1];if(a&&u[2]){if(l===U&&!(s in t))return!1}else{var f=new Zn;if(r)var h=r(l,c,s,t,n,f);if(!(h===U?Ze(c,l,r,ut|st,f):h))return!1}}return!0}function Qe(t){return"function"==typeof t?t:null==t?Fs:"object"==typeof t?tf(t)?or(t[0],t[1]):ir(t):Hs(t)}function tr(t){return Dl(Object(t))}function nr(t){t=null==t?t:Object(t);var n=[];for(var e in t)n.push(e);return n}function er(t,n){return n>t}function rr(t,n){var e=-1,r=Xa(t)?Array(t.length):[];return sc(t,function(t,i,o){r[++e]=n(t,i,o)}),r}function ir(t){var n=ki(t);return 1==n.length&&n[0][2]?Gi(n[0][0],n[0][1]):function(e){return e===t||Ke(e,t,n)}}function or(t,n){return Bi(t)&&Yi(n)?Gi(Qi(t),n):function(e){var r=Wu(e,t);return r===U&&r===n?Hu(e,t):Ze(n,r,U,ut|st)}}function ar(t,n,e,r,i){if(t!==n){if(!tf(n)&&!Su(n))var a=Gu(n);o(a||n,function(o,u){if(a&&(u=o,o=n[u]),su(o))i||(i=new Zn),ur(t,n,u,e,ar,r,i);else{var s=r?r(t[u],o,u+"",t,n,i):U;s===U&&(s=o),se(t,u,s)}})}}function ur(t,n,e,r,i,o,a){var u=t[e],s=n[e],l=a.get(s);if(l)return void se(t,e,l);var c=o?o(u,s,e+"",t,n,a):U,f=c===U;f&&(c=s,tf(s)||Su(s)?tf(u)?c=u:Za(u)?c=Zr(u):(f=!1,c=Ce(s,!0)):yu(s)||Ya(s)?Ya(u)?c=Tu(u):!su(u)||r&&ou(u)?(f=!1,c=Ce(s,!0)):c=u:f=!1),a.set(s,c),f&&i(c,s,r,o,a),a["delete"](s),se(t,e,c)}function sr(t,n){var e=t.length;if(e)return n+=0>n?e:0,qi(n,e)?t[n]:U}function lr(t,n,e){var r=-1;n=f(n.length?n:[Fs],M(Mi()));var i=rr(t,function(t,e,i){var o=f(n,function(n){return n(t)});return{criteria:o,index:++r,value:t}});return w(i,function(t,n){return Yr(t,n,e)})}function cr(t,n){return t=Object(t),p(n,function(n,e){return e in t&&(n[e]=t[e]),n},{})}function fr(t,n){for(var e=-1,r=Si(t),i=r.length,o={};++e<i;){var a=r[e],u=t[a];n(u,a)&&(o[a]=u)}return o}function hr(t){return function(n){return null==n?U:n[t]}}function pr(t){return function(n){return qe(n,t)}}function dr(t,n,e,r){var i=r?$:y,o=-1,a=n.length,u=t;for(e&&(u=f(t,M(e)));++o<a;)for(var s=0,l=n[o],c=e?e(l):l;(s=i(u,c,s,r))>-1;)u!==t&&Ol.call(u,s,1),Ol.call(t,s,1);return t}function vr(t,n){for(var e=t?n.length:0,r=e-1;e--;){var i=n[e];if(e==r||i!==o){var o=i;if(qi(i))Ol.call(t,i,1);else if(Bi(i,t))delete t[Qi(i)];else{var a=Rr(i),u=Ji(t,a);null!=u&&delete u[Qi(bo(a))]}}}return t}function gr(t,n){return t+Ll(ql()*(n-t+1))}function mr(t,n,e,r){for(var i=-1,o=Fl(Tl((n-t)/(e||1)),0),a=Array(o);o--;)a[r?o:++i]=t,t+=e;return a}function yr(t,n){var e="";if(!t||1>n||n>mt)return e;do n%2&&(e+=t),n=Ll(n/2),n&&(t+=t);while(n);return e}function $r(t,n,e,r){n=Bi(n,t)?[n]:Rr(n);for(var i=-1,o=n.length,a=o-1,u=t;null!=u&&++i<o;){var s=Qi(n[i]);if(su(u)){var l=e;if(i!=a){var c=u[s];l=r?r(c,s,u):U,l===U&&(l=null==c?qi(n[i+1])?[]:{}:c)}le(u,s,l)}u=u[s]}return t}function xr(t,n,e){var r=-1,i=t.length;0>n&&(n=-n>i?0:i+n),e=e>i?i:e,0>e&&(e+=i),i=n>e?0:e-n>>>0,n>>>=0;for(var o=Array(i);++r<i;)o[r]=t[r+n];return o}function br(t,n){var e;return sc(t,function(t,r,i){return e=n(t,r,i),!e}),!!e}function wr(t,n,e){var r=0,i=t?t.length:r;if("number"==typeof n&&n===n&&wt>=i){for(;i>r;){var o=r+i>>>1,a=t[o];null!==a&&!Cu(a)&&(e?n>=a:n>a)?r=o+1:i=o}return i}return Cr(t,n,Fs,e)}function Cr(t,n,e,r){n=e(n);for(var i=0,o=t?t.length:0,a=n!==n,u=null===n,s=Cu(n),l=n===U;o>i;){var c=Ll((i+o)/2),f=e(t[c]),h=f!==U,p=null===f,d=f===f,v=Cu(f);if(a)var g=r||d;else g=l?d&&(r||h):u?d&&h&&(r||!p):s?d&&h&&!p&&(r||!v):p||v?!1:r?n>=f:n>f;g?i=c+1:o=c}return Il(o,bt)}function Sr(t,n){for(var e=-1,r=t.length,i=0,o=[];++e<r;){var a=t[e],u=n?n(a):a;if(!e||!Ha(u,s)){var s=u;o[i++]=0===a?0:a}}return o}function _r(t){return"number"==typeof t?t:Cu(t)?$t:+t}function Mr(t){if("string"==typeof t)return t;if(Cu(t))return uc?uc.call(t):"";var n=t+"";return"0"==n&&1/t==-gt?"-0":n}function kr(t,n,e){var r=-1,i=l,o=t.length,a=!0,u=[],s=u;if(e)a=!1,i=c;else if(o>=Y){var f=n?null:pc(t);if(f)return z(f);a=!1,i=Gn,s=new Yn}else s=n?[]:u;t:for(;++r<o;){var h=t[r],p=n?n(h):h;if(h=e||0!==h?h:0,a&&p===p){for(var d=s.length;d--;)if(s[d]===p)continue t;n&&s.push(p),u.push(h)}else i(s,p,e)||(s!==u&&s.push(p),u.push(h))}return u}function Ar(t,n){n=Bi(n,t)?[n]:Rr(n),t=Ji(t,n);var e=Qi(bo(n));return!(null!=t&&We(t,e))||delete t[e]}function Er(t,n,e,r){return $r(t,n,e(qe(t,n)),r)}function Pr(t,n,e,r){for(var i=t.length,o=r?i:-1;(r?o--:++o<i)&&n(t[o],o,t););return e?xr(t,r?0:o,r?o+1:i):xr(t,r?o+1:0,r?i:o)}function Or(t,n){var e=t;return e instanceof Tn&&(e=e.value()),p(n,function(t,n){return n.func.apply(n.thisArg,h([t],n.args))},e)}function Tr(t,n,e){for(var r=-1,i=t.length;++r<i;)var o=o?h(Ee(o,t[r],n,e),Ee(t[r],o,n,e)):t[r];return o&&o.length?kr(o,n,e):[]}function Lr(t,n,e){for(var r=-1,i=t.length,o=n.length,a={};++r<i;){var u=o>r?n[r]:U;e(a,t[r],u)}return a}function jr(t){return Za(t)?t:[]}function Nr(t){return"function"==typeof t?t:Fs}function Rr(t){return tf(t)?t:yc(t)}function Dr(t,n,e){var r=t.length;return e=e===U?r:e,!n&&e>=r?t:xr(t,n,e)}function Fr(t,n){if(n)return t.slice();var e=new t.constructor(t.length);return t.copy(e),e}function Ir(t){var n=new t.constructor(t.byteLength);return new Cl(n).set(new Cl(t)),n}function zr(t,n){var e=n?Ir(t.buffer):t.buffer;return new t.constructor(e,t.byteOffset,t.byteLength)}function qr(n,e,r){var i=e?r(F(n),!0):F(n);return p(i,t,new n.constructor)}function Vr(t){var n=new t.constructor(t.source,$n.exec(t));return n.lastIndex=t.lastIndex,n}function Br(t,e,r){var i=e?r(z(t),!0):z(t);return p(i,n,new t.constructor)}function Wr(t){return ac?Object(ac.call(t)):{}}function Ur(t,n){var e=n?Ir(t.buffer):t.buffer;return new t.constructor(e,t.byteOffset,t.length)}function Hr(t,n){if(t!==n){var e=t!==U,r=null===t,i=t===t,o=Cu(t),a=n!==U,u=null===n,s=n===n,l=Cu(n);if(!u&&!l&&!o&&t>n||o&&a&&s&&!u&&!l||r&&a&&s||!e&&s||!i)return 1;if(!r&&!o&&!l&&n>t||l&&e&&i&&!r&&!o||u&&e&&i||!a&&i||!s)return-1}return 0}function Yr(t,n,e){for(var r=-1,i=t.criteria,o=n.criteria,a=i.length,u=e.length;++r<a;){var s=Hr(i[r],o[r]);if(s){if(r>=u)return s;var l=e[r];return s*("desc"==l?-1:1)}}return t.index-n.index}function Gr(t,n,e,r){for(var i=-1,o=t.length,a=e.length,u=-1,s=n.length,l=Fl(o-a,0),c=Array(s+l),f=!r;++u<s;)c[u]=n[u];for(;++i<a;)(f||o>i)&&(c[e[i]]=t[i]);for(;l--;)c[u++]=t[i++];return c}function Xr(t,n,e,r){for(var i=-1,o=t.length,a=-1,u=e.length,s=-1,l=n.length,c=Fl(o-u,0),f=Array(c+l),h=!r;++i<c;)f[i]=t[i];for(var p=i;++s<l;)f[p+s]=n[s];for(;++a<u;)(h||o>i)&&(f[p+e[a]]=t[i++]);return f}function Zr(t,n){var e=-1,r=t.length;for(n||(n=Array(r));++e<r;)n[e]=t[e];return n}function Jr(t,n,e,r){e||(e={});for(var i=-1,o=n.length;++i<o;){var a=n[i],u=r?r(e[a],t[a],a,e,t):t[a];le(e,a,u)}return e}function Kr(t,n){return Jr(t,Oi(t),n)}function Qr(t,n){return function(e,i){var o=tf(e)?r:ce,a=n?n():{};return o(e,t,Mi(i),a)}}function ti(t){return Ra(function(n,e){var r=-1,i=e.length,o=i>1?e[i-1]:U,a=i>2?e[2]:U;for(o="function"==typeof o?(i--,o):U,a&&Vi(e[0],e[1],a)&&(o=3>i?U:o,i=1),n=Object(n);++r<i;){var u=e[r];u&&t(n,u,r,o)}return n})}function ni(t,n){return function(e,r){if(null==e)return e;if(!Xa(e))return t(e,r);for(var i=e.length,o=n?i:-1,a=Object(e);(n?o--:++o<i)&&r(a[o],o,a)!==!1;);return e}}function ei(t){return function(n,e,r){for(var i=-1,o=Object(n),a=r(n),u=a.length;u--;){var s=a[t?u:++i];if(e(o[s],s,o)===!1)break}return n}}function ri(t,n,e){function r(){var n=this&&this!==Re&&this instanceof r?o:t;return n.apply(i?e:this,arguments)}var i=n&J,o=ai(t);return r}function ii(t){return function(n){n=ju(n);var e=ge.test(n)?V(n):U,r=e?e[0]:n.charAt(0),i=e?Dr(e,1).join(""):n.slice(1);return r[t]()+i}}function oi(t){return function(n){return p(js(ds(n).replace(he,"")),t,"")}}function ai(t){return function(){var n=arguments;switch(n.length){case 0:return new t;case 1:return new t(n[0]);case 2:return new t(n[0],n[1]);case 3:return new t(n[0],n[1],n[2]);case 4:return new t(n[0],n[1],n[2],n[3]);case 5:return new t(n[0],n[1],n[2],n[3],n[4]);case 6:return new t(n[0],n[1],n[2],n[3],n[4],n[5]);case 7:return new t(n[0],n[1],n[2],n[3],n[4],n[5],n[6])}var e=_e(t.prototype),r=t.apply(e,n);return su(r)?r:e}}function ui(t,n,r){function i(){for(var a=arguments.length,u=Array(a),s=a,l=Ei(i);s--;)u[s]=arguments[s];var c=3>a&&u[0]!==l&&u[a-1]!==l?[]:I(u,l);if(a-=c.length,r>a)return mi(t,n,li,i.placeholder,U,u,c,U,U,r-a);var f=this&&this!==Re&&this instanceof i?o:t;return e(f,this,u)}var o=ai(t);return i}function si(t){return Ra(function(n){n=Ne(n,1);var e=n.length,r=e,i=On.prototype.thru;for(t&&n.reverse();r--;){var o=n[r];if("function"!=typeof o)throw new ll(G);if(i&&!a&&"wrapper"==_i(o))var a=new On([],!0)}for(r=a?r:e;++r<e;){o=n[r];var u=_i(o),s="wrapper"==u?dc(o):U;a=s&&Ui(s[0])&&s[1]==(it|tt|et|ot)&&!s[4].length&&1==s[9]?a[_i(s[0])].apply(a,s[3]):1==o.length&&Ui(o)?a[u]():a.thru(o)}return function(){var t=arguments,r=t[0];if(a&&1==t.length&&tf(r)&&r.length>=Y)return a.plant(r).value();for(var i=0,o=e?n[i].apply(this,t):r;++i<e;)o=n[i].call(this,o);return o}})}function li(t,n,e,r,i,o,a,u,s,l){function c(){for(var m=arguments.length,y=m,$=Array(m);y--;)$[y]=arguments[y];if(d)var x=Ei(c),b=O($,x);if(r&&($=Gr($,r,i,d)),o&&($=Xr($,o,a,d)),m-=b,d&&l>m){var w=I($,x);return mi(t,n,li,c.placeholder,e,$,w,u,s,l-m)}var C=h?e:this,S=p?C[t]:t;return m=$.length,u?$=Ki($,u):v&&m>1&&$.reverse(),f&&m>s&&($.length=s),this&&this!==Re&&this instanceof c&&(S=g||ai(S)),S.apply(C,$)}var f=n&it,h=n&J,p=n&K,d=n&(tt|nt),v=n&at,g=p?U:ai(t);return c}function ci(t,n){return function(e,r){return Ge(e,t,n(r),{})}}function fi(t){return function(n,e){var r;if(n===U&&e===U)return 0;if(n!==U&&(r=n),e!==U){if(r===U)return e;"string"==typeof n||"string"==typeof e?(n=Mr(n),e=Mr(e)):(n=_r(n),e=_r(e)),r=t(n,e)}return r}}function hi(t){return Ra(function(n){return n=1==n.length&&tf(n[0])?f(n[0],M(Mi())):f(Ne(n,1,zi),M(Mi())),Ra(function(r){var i=this;return t(n,function(t){return e(t,i,r)})})})}function pi(t,n){n=n===U?" ":Mr(n);var e=n.length;if(2>e)return e?yr(n,t):n;var r=yr(n,Tl(t/q(n)));return ge.test(n)?Dr(V(r),0,t).join(""):r.slice(0,t)}function di(t,n,r,i){function o(){for(var n=-1,s=arguments.length,l=-1,c=i.length,f=Array(c+s),h=this&&this!==Re&&this instanceof o?u:t;++l<c;)f[l]=i[l];for(;s--;)f[l++]=arguments[++n];return e(h,a?r:this,f)}var a=n&J,u=ai(t);return o}function vi(t){return function(n,e,r){return r&&"number"!=typeof r&&Vi(n,e,r)&&(e=r=U),n=Ou(n),n=n===n?n:0,e===U?(e=n,n=0):e=Ou(e)||0,r=r===U?e>n?1:-1:Ou(r)||0,mr(n,e,r,t)}}function gi(t){return function(n,e){return"string"==typeof n&&"string"==typeof e||(n=Ou(n),e=Ou(e)),t(n,e)}}function mi(t,n,e,r,i,o,a,u,s,l){var c=n&tt,f=c?a:U,h=c?U:a,p=c?o:U,d=c?U:o;n|=c?et:rt,n&=~(c?rt:et),n&Q||(n&=~(J|K));var v=[t,n,i,p,f,d,h,u,s,l],g=e.apply(U,v);return Ui(t)&&mc(g,v),g.placeholder=r,g}function yi(t){var n=ul[t];return function(t,e){if(t=Ou(t),e=Eu(e)){var r=(ju(t)+"e").split("e"),i=n(r[0]+"e"+(+r[1]+e));return r=(ju(i)+"e").split("e"),+(r[0]+"e"+(+r[1]-e))}return n(t)}}function $i(t,n,e,r,i,o,a,u){var s=n&K;if(!s&&"function"!=typeof t)throw new ll(G);var l=r?r.length:0;if(l||(n&=~(et|rt),r=i=U),a=a===U?a:Fl(Eu(a),0),u=u===U?u:Eu(u),l-=i?i.length:0,n&rt){var c=r,f=i;r=i=U}var h=s?U:dc(t),p=[t,n,e,r,i,c,f,o,a,u];if(h&&Xi(p,h),t=p[0],n=p[1],e=p[2],r=p[3],i=p[4],u=p[9]=null==p[9]?s?0:t.length:Fl(p[9]-l,0),!u&&n&(tt|nt)&&(n&=~(tt|nt)),n&&n!=J)d=n==tt||n==nt?ui(t,n,u):n!=et&&n!=(J|et)||i.length?li.apply(U,p):di(t,n,e,r);else var d=ri(t,n,e);var v=h?hc:mc;return v(d,p)}function xi(t,n,e,r,i,o){var a=-1,u=i&st,s=i&ut,l=t.length,c=n.length;if(l!=c&&!(u&&c>l))return!1;var f=o.get(t);if(f)return f==n;var h=!0;for(o.set(t,n);++a<l;){var p=t[a],d=n[a];if(r)var g=u?r(d,p,a,n,t,o):r(p,d,a,t,n,o);if(g!==U){if(g)continue;h=!1;break}if(s){if(!v(n,function(t){return p===t||e(p,t,r,i,o)})){h=!1;break}}else if(p!==d&&!e(p,d,r,i,o)){h=!1;break}}return o["delete"](t),h}function bi(t,n,e,r,i,o,a){switch(e){case qt:if(t.byteLength!=n.byteLength||t.byteOffset!=n.byteOffset)return!1;t=t.buffer,n=n.buffer;case zt:return!(t.byteLength!=n.byteLength||!r(new Cl(t),new Cl(n)));case _t:case Mt:return+t==+n;case kt:return t.name==n.name&&t.message==n.message;case Ot:return t!=+t?n!=+n:t==+n;case jt:case Rt:return t==n+"";case Pt:var u=F;case Nt:var s=o&st;if(u||(u=z),t.size!=n.size&&!s)return!1;var l=a.get(t);return l?l==n:(o|=ut,a.set(t,n),xi(u(t),u(n),r,i,o,a));case Dt:if(ac)return ac.call(t)==ac.call(n)}return!1}function wi(t,n,e,r,i,o){var a=i&st,u=Yu(t),s=u.length,l=Yu(n),c=l.length;if(s!=c&&!a)return!1;for(var f=s;f--;){var h=u[f];if(!(a?h in n:We(n,h)))return!1}var p=o.get(t);if(p)return p==n;var d=!0;o.set(t,n);for(var v=a;++f<s;){h=u[f];var g=t[h],m=n[h];if(r)var y=a?r(m,g,h,n,t,o):r(g,m,h,t,n,o);if(!(y===U?g===m||e(g,m,r,i,o):y)){d=!1;break}v||(v="constructor"==h)}if(d&&!v){var $=t.constructor,x=n.constructor;$!=x&&"constructor"in t&&"constructor"in n&&!("function"==typeof $&&$ instanceof $&&"function"==typeof x&&x instanceof x)&&(d=!1)}return o["delete"](t),d}function Ci(t){return Ve(t,Yu,Oi)}function Si(t){return Ve(t,Gu,gc)}function _i(t){for(var n=t.name+"",e=Ql[n],r=dl.call(Ql,n)?e.length:0;r--;){var i=e[r],o=i.func;if(null==o||o==t)return i.name}return n}function Mi(){var t=En.iteratee||Is;return t=t===Is?Qe:t,arguments.length?t(arguments[0],arguments[1]):t}function ki(t){for(var n=es(t),e=n.length;e--;)n[e][2]=Yi(n[e][1]);return n}function Ai(t,n){var e=t[n];return du(e)?e:U}function Ei(t){var n=dl.call(En,"placeholder")?En:t;return n.placeholder}function Pi(t){return jl(Object(t))}function Oi(t){return Ml(Object(t))}function Ti(t){return ml.call(t)}function Li(t,n,e){for(var r=-1,i=e.length;++r<i;){var o=e[r],a=o.size;switch(o.type){case"drop":t+=a;break;case"dropRight":n-=a;break;case"take":n=Il(n,t+a);break;case"takeRight":t=Fl(t,n-a)}}return{start:t,end:n}}function ji(t,n,e){n=Bi(n,t)?[n]:Rr(n);for(var r,i=-1,o=n.length;++i<o;){var a=Qi(n[i]);if(!(r=null!=t&&e(t,a)))break;t=t[a]}if(r)return r;var o=t?t.length:0;return!!o&&uu(o)&&qi(a,o)&&(tf(t)||wu(t)||Ya(t))}function Ni(t){var n=t.length,e=t.constructor(n);return n&&"string"==typeof t[0]&&dl.call(t,"index")&&(e.index=t.index,e.input=t.input),e}function Ri(t){return"function"!=typeof t.constructor||Hi(t)?{}:_e(Pi(t))}function Di(t,n,e,r){var i=t.constructor;switch(n){case zt:return Ir(t);case _t:case Mt:return new i(+t);case qt:return zr(t,r);case Vt:case Bt:case Wt:case Ut:case Ht:case Yt:case Gt:case Xt:case Zt:return Ur(t,r);case Pt:return qr(t,r,e);case Ot:case Rt:return new i(t);case jt:return Vr(t);case Nt:return Br(t,r,e);case Dt:return Wr(t)}}function Fi(t){var n=t?t.length:U;return uu(n)&&(tf(t)||wu(t)||Ya(t))?S(n,String):null}function Ii(t){return Za(t)&&(tf(t)||Ya(t))}function zi(t){return tf(t)&&!(2==t.length&&!ou(t[0]))}function qi(t,n){return n=null==n?mt:n,!!n&&("number"==typeof t||_n.test(t))&&t>-1&&t%1==0&&n>t}function Vi(t,n,e){if(!su(e))return!1;var r=typeof n;return("number"==r?Xa(e)&&qi(n,e.length):"string"==r&&n in e)?Ha(e[n],t):!1}function Bi(t,n){if(tf(t))return!1;var e=typeof t;return"number"==e||"symbol"==e||"boolean"==e||null==t||Cu(t)?!0:ln.test(t)||!sn.test(t)||null!=n&&t in Object(n)}function Wi(t){var n=typeof t;return"string"==n||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==t:null===t}function Ui(t){var n=_i(t),e=En[n];if("function"!=typeof e||!(n in Tn.prototype))return!1;if(t===e)return!0;var r=dc(e);return!!r&&t===r[0]}function Hi(t){var n=t&&t.constructor,e="function"==typeof n&&n.prototype||fl;return t===e}function Yi(t){return t===t&&!su(t)}function Gi(t,n){return function(e){return null==e?!1:e[t]===n&&(n!==U||t in Object(e))}}function Xi(t,n){var e=t[1],r=n[1],i=e|r,o=(J|K|it)>i,a=r==it&&e==tt||r==it&&e==ot&&t[7].length<=n[8]||r==(it|ot)&&n[7].length<=n[8]&&e==tt;if(!o&&!a)return t;r&J&&(t[2]=n[2],i|=e&J?0:Q);var u=n[3];if(u){var s=t[3];t[3]=s?Gr(s,u,n[4]):u,t[4]=s?I(t[3],Z):n[4]}return u=n[5],u&&(s=t[5],t[5]=s?Xr(s,u,n[6]):u,t[6]=s?I(t[5],Z):n[6]),u=n[7],u&&(t[7]=u),r&it&&(t[8]=null==t[8]?n[8]:Il(t[8],n[8])),null==t[9]&&(t[9]=n[9]),t[0]=n[0],t[1]=i,t}function Zi(t,n,e,r,i,o){return su(t)&&su(n)&&ar(t,n,U,Zi,o.set(n,t)),t}function Ji(t,n){return 1==n.length?t:qe(t,xr(n,0,-1))}function Ki(t,n){for(var e=t.length,r=Il(n.length,e),i=Zr(t);r--;){var o=n[r];t[r]=qi(o,e)?i[o]:U}return t}function Qi(t){if("string"==typeof t||Cu(t))return t;var n=t+"";return"0"==n&&1/t==-gt?"-0":n}function to(t){if(null!=t){try{return pl.call(t)}catch(n){}try{return t+""}catch(n){}}return""}function no(t){if(t instanceof Tn)return t.clone();var n=new On(t.__wrapped__,t.__chain__);return n.__actions__=Zr(t.__actions__),n.__index__=t.__index__,n.__values__=t.__values__,n}function eo(t,n,e){n=(e?Vi(t,n,e):n===U)?1:Fl(Eu(n),0);var r=t?t.length:0;if(!r||1>n)return[];for(var i=0,o=0,a=Array(Tl(r/n));r>i;)a[o++]=xr(t,i,i+=n);return a}function ro(t){for(var n=-1,e=t?t.length:0,r=0,i=[];++n<e;){var o=t[n];o&&(i[r++]=o)}return i}function io(){var t=arguments.length,n=qa(arguments[0]);if(2>t)return t?Zr(n):[];for(var e=Array(t-1);t--;)e[t-1]=arguments[t];return i(n,Ne(e,1))}function oo(t,n,e){var r=t?t.length:0;return r?(n=e||n===U?1:Eu(n),xr(t,0>n?0:n,r)):[]}function ao(t,n,e){var r=t?t.length:0;return r?(n=e||n===U?1:Eu(n),n=r-n,xr(t,0,0>n?0:n)):[]}function uo(t,n){return t&&t.length?Pr(t,Mi(n,3),!0,!0):[]}function so(t,n){return t&&t.length?Pr(t,Mi(n,3),!0):[]}function lo(t,n,e,r){var i=t?t.length:0;return i?(e&&"number"!=typeof e&&Vi(t,n,e)&&(e=0,r=i),Le(t,n,e,r)):[]}function co(t,n){return t&&t.length?m(t,Mi(n,3)):-1}function fo(t,n){return t&&t.length?m(t,Mi(n,3),!0):-1}function ho(t){var n=t?t.length:0;return n?Ne(t,1):[]}function po(t){var n=t?t.length:0;return n?Ne(t,gt):[]}function vo(t,n){var e=t?t.length:0;return e?(n=n===U?1:Eu(n),Ne(t,n)):[]}function go(t){for(var n=-1,e=t?t.length:0,r={};++n<e;){var i=t[n];r[i[0]]=i[1]}return r}function mo(t){return t&&t.length?t[0]:U}function yo(t,n,e){var r=t?t.length:0;return r?(e=Eu(e),0>e&&(e=Fl(r+e,0)),y(t,n,e)):-1}function $o(t){return ao(t,1)}function xo(t,n){return t?Rl.call(t,n):""}function bo(t){var n=t?t.length:0;return n?t[n-1]:U}function wo(t,n,e){var r=t?t.length:0;if(!r)return-1;var i=r;if(e!==U&&(i=Eu(e),i=(0>i?Fl(r+i,0):Il(i,r-1))+1),n!==n)return N(t,i,!0);for(;i--;)if(t[i]===n)return i;return-1}function Co(t,n){return t&&t.length?sr(t,Eu(n)):U}function So(t,n){return t&&t.length&&n&&n.length?dr(t,n):t}function _o(t,n,e){return t&&t.length&&n&&n.length?dr(t,n,Mi(e)):t}function Mo(t,n,e){return t&&t.length&&n&&n.length?dr(t,n,U,e):t}function ko(t,n){var e=[];if(!t||!t.length)return e;var r=-1,i=[],o=t.length;for(n=Mi(n,3);++r<o;){var a=t[r];n(a,r,t)&&(e.push(a),i.push(r))}return vr(t,i),e}function Ao(t){return t?Bl.call(t):t}function Eo(t,n,e){var r=t?t.length:0;return r?(e&&"number"!=typeof e&&Vi(t,n,e)?(n=0,e=r):(n=null==n?0:Eu(n),e=e===U?r:Eu(e)),xr(t,n,e)):[]}function Po(t,n){return wr(t,n)}function Oo(t,n,e){return Cr(t,n,Mi(e))}function To(t,n){var e=t?t.length:0;if(e){var r=wr(t,n);if(e>r&&Ha(t[r],n))return r}return-1}function Lo(t,n){return wr(t,n,!0)}function jo(t,n,e){return Cr(t,n,Mi(e),!0)}function No(t,n){var e=t?t.length:0;if(e){var r=wr(t,n,!0)-1;if(Ha(t[r],n))return r}return-1}function Ro(t){return t&&t.length?Sr(t):[]}function Do(t,n){return t&&t.length?Sr(t,Mi(n)):[]}function Fo(t){return oo(t,1)}function Io(t,n,e){return t&&t.length?(n=e||n===U?1:Eu(n),xr(t,0,0>n?0:n)):[]}function zo(t,n,e){var r=t?t.length:0;return r?(n=e||n===U?1:Eu(n),n=r-n,xr(t,0>n?0:n,r)):[]}function qo(t,n){return t&&t.length?Pr(t,Mi(n,3),!1,!0):[]}function Vo(t,n){return t&&t.length?Pr(t,Mi(n,3)):[]}function Bo(t){return t&&t.length?kr(t):[]}function Wo(t,n){return t&&t.length?kr(t,Mi(n)):[]}function Uo(t,n){return t&&t.length?kr(t,U,n):[]}function Ho(t){if(!t||!t.length)return[];var n=0;return t=s(t,function(t){return Za(t)?(n=Fl(t.length,n),!0):void 0}),S(n,function(n){return f(t,hr(n))})}function Yo(t,n){if(!t||!t.length)return[];var r=Ho(t);return null==n?r:f(r,function(t){return e(n,U,t)})}function Go(t,n){return Lr(t||[],n||[],le)}function Xo(t,n){return Lr(t||[],n||[],$r)}function Zo(t){var n=En(t);return n.__chain__=!0,n}function Jo(t,n){return n(t),t}function Ko(t,n){return n(t)}function Qo(){return Zo(this)}function ta(){return new On(this.value(),this.__chain__)}function na(){this.__values__===U&&(this.__values__=Au(this.value()));var t=this.__index__>=this.__values__.length,n=t?U:this.__values__[this.__index__++];return{done:t,value:n}}function ea(){return this}function ra(t){for(var n,e=this;e instanceof Pn;){var r=no(e);r.__index__=0,r.__values__=U,n?i.__wrapped__=r:n=r;var i=r;e=e.__wrapped__}return i.__wrapped__=t,n}function ia(){var t=this.__wrapped__;if(t instanceof Tn){var n=t;return this.__actions__.length&&(n=new Tn(this)),n=n.reverse(),n.__actions__.push({func:Ko,args:[Ao],thisArg:U}),new On(n,this.__chain__)}return this.thru(Ao)}function oa(){return Or(this.__wrapped__,this.__actions__)}function aa(t,n,e){var r=tf(t)?u:Pe;return e&&Vi(t,n,e)&&(n=U),r(t,Mi(n,3))}function ua(t,n){var e=tf(t)?s:je;return e(t,Mi(n,3))}function sa(t,n){if(n=Mi(n,3),tf(t)){var e=m(t,n);return e>-1?t[e]:U}return g(t,n,sc)}function la(t,n){if(n=Mi(n,3),tf(t)){var e=m(t,n,!0);return e>-1?t[e]:U}return g(t,n,lc)}function ca(t,n){return Ne(ga(t,n),1)}function fa(t,n){return Ne(ga(t,n),gt)}function ha(t,n,e){return e=e===U?1:Eu(e),Ne(ga(t,n),e)}function pa(t,n){return"function"==typeof n&&tf(t)?o(t,n):sc(t,Mi(n))}function da(t,n){return"function"==typeof n&&tf(t)?a(t,n):lc(t,Mi(n))}function va(t,n,e,r){t=Xa(t)?t:ss(t),e=e&&!r?Eu(e):0;var i=t.length;return 0>e&&(e=Fl(i+e,0)),wu(t)?i>=e&&t.indexOf(n,e)>-1:!!i&&y(t,n,e)>-1}function ga(t,n){var e=tf(t)?f:rr;return e(t,Mi(n,3))}function ma(t,n,e,r){return null==t?[]:(tf(n)||(n=null==n?[]:[n]),e=r?U:e,tf(e)||(e=null==e?[]:[e]),lr(t,n,e))}function ya(t,n,e){var r=tf(t)?p:b,i=arguments.length<3;return r(t,Mi(n,4),e,i,sc)}function $a(t,n,e){var r=tf(t)?d:b,i=arguments.length<3;return r(t,Mi(n,4),e,i,lc)}function xa(t,n){var e=tf(t)?s:je;return n=Mi(n,3),e(t,function(t,e,r){return!n(t,e,r)})}function ba(t){var n=Xa(t)?t:ss(t),e=n.length;return e>0?n[gr(0,e-1)]:U}function wa(t,n,e){var r=-1,i=Au(t),o=i.length,a=o-1;for(n=(e?Vi(t,n,e):n===U)?1:we(Eu(n),0,o);++r<n;){var u=gr(r,a),s=i[u];i[u]=i[r],i[r]=s}return i.length=n,i}function Ca(t){return wa(t,xt)}function Sa(t){if(null==t)return 0;if(Xa(t)){var n=t.length;return n&&wu(t)?q(t):n}if(lu(t)){var e=Ti(t);if(e==Pt||e==Nt)return t.size}return Yu(t).length}function _a(t,n,e){var r=tf(t)?v:br;return e&&Vi(t,n,e)&&(n=U),r(t,Mi(n,3))}function Ma(t,n){if("function"!=typeof n)throw new ll(G);return t=Eu(t),function(){return--t<1?n.apply(this,arguments):void 0}}function ka(t,n,e){return n=e?U:n,n=t&&null==n?t.length:n,$i(t,it,U,U,U,U,n)}function Aa(t,n){var e;if("function"!=typeof n)throw new ll(G);return t=Eu(t),function(){return--t>0&&(e=n.apply(this,arguments)),1>=t&&(n=U),e}}function Ea(t,n,e){n=e?U:n;var r=$i(t,tt,U,U,U,U,U,n);return r.placeholder=Ea.placeholder,r}function Pa(t,n,e){n=e?U:n;var r=$i(t,nt,U,U,U,U,U,n);return r.placeholder=Pa.placeholder,r}function Oa(t,n,e){function r(n){var e=h,r=p;return h=p=U,y=n,v=t.apply(r,e)}function i(t){return y=t,g=Pl(u,n),$?r(t):v}function o(t){var e=t-m,r=t-y,i=n-e;return x?Il(i,d-r):i}function a(t){var e=t-m,r=t-y;return!m||e>=n||0>e||x&&r>=d}function u(){var t=Bc();return a(t)?s(t):void(g=Pl(u,o(t)))}function s(t){return Sl(g),g=U,b&&h?r(t):(h=p=U,v)}function l(){g!==U&&Sl(g),m=y=0,h=p=g=U}function c(){return g===U?v:s(Bc())}function f(){var t=Bc(),e=a(t);if(h=arguments,p=this,m=t,e){if(g===U)return i(m);if(x)return Sl(g),g=Pl(u,n),r(m)}return g===U&&(g=Pl(u,n)),v}var h,p,d,v,g,m=0,y=0,$=!1,x=!1,b=!0;if("function"!=typeof t)throw new ll(G);return n=Ou(n)||0,su(e)&&($=!!e.leading,x="maxWait"in e,d=x?Fl(Ou(e.maxWait)||0,n):d,b="trailing"in e?!!e.trailing:b),f.cancel=l,f.flush=c,f}function Ta(t){return $i(t,at)}function La(t,n){if("function"!=typeof t||n&&"function"!=typeof n)throw new ll(G);var e=function(){var r=arguments,i=n?n.apply(this,r):r[0],o=e.cache;if(o.has(i))return o.get(i);var a=t.apply(this,r);return e.cache=o.set(i,a),a};return e.cache=new(La.Cache||qn),e}function ja(t){if("function"!=typeof t)throw new ll(G);return function(){return!t.apply(this,arguments)}}function Na(t){return Aa(2,t)}function Ra(t,n){if("function"!=typeof t)throw new ll(G);return n=Fl(n===U?t.length-1:Eu(n),0),function(){for(var r=arguments,i=-1,o=Fl(r.length-n,0),a=Array(o);++i<o;)a[i]=r[n+i];switch(n){case 0:return t.call(this,a);case 1:return t.call(this,r[0],a);case 2:return t.call(this,r[0],r[1],a)}var u=Array(n+1);for(i=-1;++i<n;)u[i]=r[i];return u[n]=a,e(t,this,u)}}function Da(t,n){if("function"!=typeof t)throw new ll(G);return n=n===U?0:Fl(Eu(n),0),Ra(function(r){var i=r[n],o=Dr(r,0,n);return i&&h(o,i),e(t,this,o)})}function Fa(t,n,e){var r=!0,i=!0;if("function"!=typeof t)throw new ll(G);return su(e)&&(r="leading"in e?!!e.leading:r,i="trailing"in e?!!e.trailing:i),Oa(t,n,{leading:r,maxWait:n,trailing:i})}function Ia(t){return ka(t,1)}function za(t,n){return n=null==n?Fs:n,Xc(n,t)}function qa(){if(!arguments.length)return[];var t=arguments[0];return tf(t)?t:[t]}function Va(t){return Ce(t,!1,!0)}function Ba(t,n){return Ce(t,!1,!0,n)}function Wa(t){return Ce(t,!0,!0)}function Ua(t,n){return Ce(t,!0,!0,n)}function Ha(t,n){return t===n||t!==t&&n!==n}function Ya(t){return Za(t)&&dl.call(t,"callee")&&(!El.call(t,"callee")||ml.call(t)==Ct)}function Ga(t){return lu(t)&&ml.call(t)==zt}function Xa(t){return null!=t&&uu(vc(t))&&!ou(t)}function Za(t){return lu(t)&&Xa(t)}function Ja(t){return t===!0||t===!1||lu(t)&&ml.call(t)==_t}function Ka(t){return lu(t)&&ml.call(t)==Mt}function Qa(t){return!!t&&1===t.nodeType&&lu(t)&&!yu(t)}function tu(t){if(Xa(t)&&(tf(t)||wu(t)||ou(t.splice)||Ya(t)||nf(t)))return!t.length;if(lu(t)){var n=Ti(t);if(n==Pt||n==Nt)return!t.size}for(var e in t)if(dl.call(t,e))return!1;return!(Kl&&Yu(t).length)}function nu(t,n){return Ze(t,n)}function eu(t,n,e){e="function"==typeof e?e:U;var r=e?e(t,n):U;return r===U?Ze(t,n,e):!!r}function ru(t){return lu(t)?ml.call(t)==kt||"string"==typeof t.message&&"string"==typeof t.name:!1}function iu(t){return"number"==typeof t&&Nl(t)}function ou(t){var n=su(t)?ml.call(t):"";return n==At||n==Et}function au(t){return"number"==typeof t&&t==Eu(t)}function uu(t){return"number"==typeof t&&t>-1&&t%1==0&&mt>=t}function su(t){var n=typeof t;return!!t&&("object"==n||"function"==n)}function lu(t){return!!t&&"object"==typeof t}function cu(t){return lu(t)&&Ti(t)==Pt}function fu(t,n){return t===n||Ke(t,n,ki(n))}function hu(t,n,e){return e="function"==typeof e?e:U,Ke(t,n,ki(n),e)}function pu(t){return mu(t)&&t!=+t}function du(t){if(!su(t))return!1;var n=ou(t)||R(t)?$l:Cn;return n.test(to(t))}function vu(t){return null===t}function gu(t){return null==t}function mu(t){return"number"==typeof t||lu(t)&&ml.call(t)==Ot}function yu(t){if(!lu(t)||ml.call(t)!=Tt||R(t))return!1;var n=Pi(t);if(null===n)return!0;var e=dl.call(n,"constructor")&&n.constructor;return"function"==typeof e&&e instanceof e&&pl.call(e)==gl}function $u(t){return su(t)&&ml.call(t)==jt}function xu(t){return au(t)&&t>=-mt&&mt>=t}function bu(t){return lu(t)&&Ti(t)==Nt}function wu(t){return"string"==typeof t||!tf(t)&&lu(t)&&ml.call(t)==Rt}function Cu(t){return"symbol"==typeof t||lu(t)&&ml.call(t)==Dt}function Su(t){return lu(t)&&uu(t.length)&&!!xe[ml.call(t)]}function _u(t){return t===U}function Mu(t){return lu(t)&&Ti(t)==Ft}function ku(t){return lu(t)&&ml.call(t)==It}function Au(t){if(!t)return[];if(Xa(t))return wu(t)?V(t):Zr(t);if(kl&&t[kl])return D(t[kl]());var n=Ti(t),e=n==Pt?F:n==Nt?z:ss;return e(t)}function Eu(t){if(!t)return 0===t?t:0;if(t=Ou(t),t===gt||t===-gt){var n=0>t?-1:1;return n*yt}var e=t%1;return t===t?e?t-e:t:0}function Pu(t){return t?we(Eu(t),0,xt):0}function Ou(t){if("number"==typeof t)return t;if(Cu(t))return $t;if(su(t)){var n=ou(t.valueOf)?t.valueOf():t;t=su(n)?n+"":n}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(pn,"");var e=wn.test(t);return e||Sn.test(t)?Ae(t.slice(2),e?2:8):bn.test(t)?$t:+t}function Tu(t){return Jr(t,Gu(t))}function Lu(t){return we(Eu(t),-mt,mt)}function ju(t){return null==t?"":Mr(t)}function Nu(t,n){var e=_e(t);return n?fe(e,n):e}function Ru(t,n){return g(t,Mi(n,3),Fe,!0);
+}function Du(t,n){return g(t,Mi(n,3),Ie,!0)}function Fu(t,n){return null==t?t:cc(t,Mi(n),Gu)}function Iu(t,n){return null==t?t:fc(t,Mi(n),Gu)}function zu(t,n){return t&&Fe(t,Mi(n))}function qu(t,n){return t&&Ie(t,Mi(n))}function Vu(t){return null==t?[]:ze(t,Yu(t))}function Bu(t){return null==t?[]:ze(t,Gu(t))}function Wu(t,n,e){var r=null==t?U:qe(t,n);return r===U?e:r}function Uu(t,n){return null!=t&&ji(t,n,We)}function Hu(t,n){return null!=t&&ji(t,n,Ue)}function Yu(t){var n=Hi(t);if(!n&&!Xa(t))return tr(t);var e=Fi(t),r=!!e,i=e||[],o=i.length;for(var a in t)!We(t,a)||r&&("length"==a||qi(a,o))||n&&"constructor"==a||i.push(a);return i}function Gu(t){for(var n=-1,e=Hi(t),r=nr(t),i=r.length,o=Fi(t),a=!!o,u=o||[],s=u.length;++n<i;){var l=r[n];a&&("length"==l||qi(l,s))||"constructor"==l&&(e||!dl.call(t,l))||u.push(l)}return u}function Xu(t,n){var e={};return n=Mi(n,3),Fe(t,function(t,r,i){e[n(t,r,i)]=t}),e}function Zu(t,n){var e={};return n=Mi(n,3),Fe(t,function(t,r,i){e[r]=n(t,r,i)}),e}function Ju(t,n){return n=Mi(n),fr(t,function(t,e){return!n(t,e)})}function Ku(t,n){return null==t?{}:fr(t,Mi(n))}function Qu(t,n,e){n=Bi(n,t)?[n]:Rr(n);var r=-1,i=n.length;for(i||(t=U,i=1);++r<i;){var o=null==t?U:t[Qi(n[r])];o===U&&(r=i,o=e),t=ou(o)?o.call(t):o}return t}function ts(t,n,e){return null==t?t:$r(t,n,e)}function ns(t,n,e,r){return r="function"==typeof r?r:U,null==t?t:$r(t,n,e,r)}function es(t){return _(t,Yu(t))}function rs(t){return _(t,Gu(t))}function is(t,n,e){var r=tf(t)||Su(t);if(n=Mi(n,4),null==e)if(r||su(t)){var i=t.constructor;e=r?tf(t)?new i:[]:ou(i)?_e(Pi(t)):{}}else e={};return(r?o:Fe)(t,function(t,r,i){return n(e,t,r,i)}),e}function os(t,n){return null==t?!0:Ar(t,n)}function as(t,n,e){return null==t?t:Er(t,n,Nr(e))}function us(t,n,e,r){return r="function"==typeof r?r:U,null==t?t:Er(t,n,Nr(e),r)}function ss(t){return t?k(t,Yu(t)):[]}function ls(t){return null==t?[]:k(t,Gu(t))}function cs(t,n,e){return e===U&&(e=n,n=U),e!==U&&(e=Ou(e),e=e===e?e:0),n!==U&&(n=Ou(n),n=n===n?n:0),we(Ou(t),n,e)}function fs(t,n,e){return n=Ou(n)||0,e===U?(e=n,n=0):e=Ou(e)||0,t=Ou(t),He(t,n,e)}function hs(t,n,e){if(e&&"boolean"!=typeof e&&Vi(t,n,e)&&(n=e=U),e===U&&("boolean"==typeof n?(e=n,n=U):"boolean"==typeof t&&(e=t,t=U)),t===U&&n===U?(t=0,n=1):(t=Ou(t)||0,n===U?(n=t,t=0):n=Ou(n)||0),t>n){var r=t;t=n,n=r}if(e||t%1||n%1){var i=ql();return Il(t+i*(n-t+ke("1e-"+((i+"").length-1))),n)}return gr(t,n)}function ps(t){return Mf(ju(t).toLowerCase())}function ds(t){return t=ju(t),t&&t.replace(Mn,T).replace(pe,"")}function vs(t,n,e){t=ju(t),n=Mr(n);var r=t.length;return e=e===U?r:we(Eu(e),0,r),e-=n.length,e>=0&&t.indexOf(n,e)==e}function gs(t){return t=ju(t),t&&rn.test(t)?t.replace(nn,L):t}function ms(t){return t=ju(t),t&&hn.test(t)?t.replace(fn,"\\$&"):t}function ys(t,n,e){t=ju(t),n=Eu(n);var r=n?q(t):0;if(!n||r>=n)return t;var i=(n-r)/2;return pi(Ll(i),e)+t+pi(Tl(i),e)}function $s(t,n,e){t=ju(t),n=Eu(n);var r=n?q(t):0;return n&&n>r?t+pi(n-r,e):t}function xs(t,n,e){t=ju(t),n=Eu(n);var r=n?q(t):0;return n&&n>r?pi(n-r,e)+t:t}function bs(t,n,e){return e||null==n?n=0:n&&(n=+n),t=ju(t).replace(pn,""),zl(t,n||(xn.test(t)?16:10))}function ws(t,n,e){return n=(e?Vi(t,n,e):n===U)?1:Eu(n),yr(ju(t),n)}function Cs(){var t=arguments,n=ju(t[0]);return t.length<3?n:Vl.call(n,t[1],t[2])}function Ss(t,n,e){return e&&"number"!=typeof e&&Vi(t,n,e)&&(n=e=U),(e=e===U?xt:e>>>0)?(t=ju(t),t&&("string"==typeof n||null!=n&&!$u(n))&&(n=Mr(n),""==n&&ge.test(t))?Dr(V(t),0,e):Wl.call(t,n,e)):[]}function _s(t,n,e){return t=ju(t),e=we(Eu(e),0,t.length),t.lastIndexOf(Mr(n),e)==e}function Ms(t,n,e){var r=En.templateSettings;e&&Vi(t,n,e)&&(n=U),t=ju(t),n=uf({},n,r,ue);var i,o,a=uf({},n.imports,r.imports,ue),u=Yu(a),s=k(a,u),l=0,c=n.interpolate||kn,f="__p += '",h=sl((n.escape||kn).source+"|"+c.source+"|"+(c===un?yn:kn).source+"|"+(n.evaluate||kn).source+"|$","g"),p="//# sourceURL="+("sourceURL"in n?n.sourceURL:"lodash.templateSources["+ ++$e+"]")+"\n";t.replace(h,function(n,e,r,a,u,s){return r||(r=a),f+=t.slice(l,s).replace(An,j),e&&(i=!0,f+="' +\n__e("+e+") +\n'"),u&&(o=!0,f+="';\n"+u+";\n__p += '"),r&&(f+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),l=s+n.length,n}),f+="';\n";var d=n.variable;d||(f="with (obj) {\n"+f+"\n}\n"),f=(o?f.replace(Jt,""):f).replace(Kt,"$1").replace(Qt,"$1;"),f="function("+(d||"obj")+") {\n"+(d?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(i?", __e = _.escape":"")+(o?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+f+"return __p\n}";var v=kf(function(){return Function(u,p+"return "+f).apply(U,s)});if(v.source=f,ru(v))throw v;return v}function ks(t){return ju(t).toLowerCase()}function As(t){return ju(t).toUpperCase()}function Es(t,n,e){if(t=ju(t),t&&(e||n===U))return t.replace(pn,"");if(!t||!(n=Mr(n)))return t;var r=V(t),i=V(n),o=A(r,i),a=E(r,i)+1;return Dr(r,o,a).join("")}function Ps(t,n,e){if(t=ju(t),t&&(e||n===U))return t.replace(vn,"");if(!t||!(n=Mr(n)))return t;var r=V(t),i=E(r,V(n))+1;return Dr(r,0,i).join("")}function Os(t,n,e){if(t=ju(t),t&&(e||n===U))return t.replace(dn,"");if(!t||!(n=Mr(n)))return t;var r=V(t),i=A(r,V(n));return Dr(r,i).join("")}function Ts(t,n){var e=lt,r=ct;if(su(n)){var i="separator"in n?n.separator:i;e="length"in n?Eu(n.length):e,r="omission"in n?Mr(n.omission):r}t=ju(t);var o=t.length;if(ge.test(t)){var a=V(t);o=a.length}if(e>=o)return t;var u=e-q(r);if(1>u)return r;var s=a?Dr(a,0,u).join(""):t.slice(0,u);if(i===U)return s+r;if(a&&(u+=s.length-u),$u(i)){if(t.slice(u).search(i)){var l,c=s;for(i.global||(i=sl(i.source,ju($n.exec(i))+"g")),i.lastIndex=0;l=i.exec(c);)var f=l.index;s=s.slice(0,f===U?u:f)}}else if(t.indexOf(Mr(i),u)!=u){var h=s.lastIndexOf(i);h>-1&&(s=s.slice(0,h))}return s+r}function Ls(t){return t=ju(t),t&&en.test(t)?t.replace(tn,B):t}function js(t,n,e){return t=ju(t),n=e?U:n,n===U&&(n=me.test(t)?ve:gn),t.match(n)||[]}function Ns(t){var n=t?t.length:0,r=Mi();return t=n?f(t,function(t){if("function"!=typeof t[1])throw new ll(G);return[r(t[0]),t[1]]}):[],Ra(function(r){for(var i=-1;++i<n;){var o=t[i];if(e(o[0],this,r))return e(o[1],this,r)}})}function Rs(t){return Se(Ce(t,!0))}function Ds(t){return function(){return t}}function Fs(t){return t}function Is(t){return Qe("function"==typeof t?t:Ce(t,!0))}function zs(t){return ir(Ce(t,!0))}function qs(t,n){return or(t,Ce(n,!0))}function Vs(t,n,e){var r=Yu(n),i=ze(n,r);null!=e||su(n)&&(i.length||!r.length)||(e=n,n=t,t=this,i=ze(n,Yu(n)));var a=!(su(e)&&"chain"in e&&!e.chain),u=ou(t);return o(i,function(e){var r=n[e];t[e]=r,u&&(t.prototype[e]=function(){var n=this.__chain__;if(a||n){var e=t(this.__wrapped__),i=e.__actions__=Zr(this.__actions__);return i.push({func:r,args:arguments,thisArg:t}),e.__chain__=n,e}return r.apply(t,h([this.value()],arguments))})}),t}function Bs(){return Re._===this&&(Re._=yl),this}function Ws(){}function Us(t){return t=Eu(t),Ra(function(n){return sr(n,t)})}function Hs(t){return Bi(t)?hr(Qi(t)):pr(t)}function Ys(t){return function(n){return null==t?U:qe(t,n)}}function Gs(t,n){if(t=Eu(t),1>t||t>mt)return[];var e=xt,r=Il(t,xt);n=Mi(n),t-=xt;for(var i=S(r,n);++e<t;)n(e);return i}function Xs(t){return tf(t)?f(t,Qi):Cu(t)?[t]:Zr(yc(t))}function Zs(t){var n=++vl;return ju(t)+n}function Js(t){return t&&t.length?Te(t,Fs,Be):U}function Ks(t,n){return t&&t.length?Te(t,Mi(n),Be):U}function Qs(t){return x(t,Fs)}function tl(t,n){return x(t,Mi(n))}function nl(t){return t&&t.length?Te(t,Fs,er):U}function el(t,n){return t&&t.length?Te(t,Mi(n),er):U}function rl(t){return t&&t.length?C(t,Fs):0}function il(t,n){return t&&t.length?C(t,Mi(n)):0}P=P?De.defaults({},P,De.pick(Re,ye)):Re;var ol=P.Date,al=P.Error,ul=P.Math,sl=P.RegExp,ll=P.TypeError,cl=P.Array.prototype,fl=P.Object.prototype,hl=P.String.prototype,pl=P.Function.prototype.toString,dl=fl.hasOwnProperty,vl=0,gl=pl.call(Object),ml=fl.toString,yl=Re._,$l=sl("^"+pl.call(dl).replace(fn,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),xl=Oe?P.Buffer:U,bl=P.Reflect,wl=P.Symbol,Cl=P.Uint8Array,Sl=P.clearTimeout,_l=bl?bl.enumerate:U,Ml=Object.getOwnPropertySymbols,kl="symbol"==typeof(kl=wl&&wl.iterator)?kl:U,Al=Object.create,El=fl.propertyIsEnumerable,Pl=P.setTimeout,Ol=cl.splice,Tl=ul.ceil,Ll=ul.floor,jl=Object.getPrototypeOf,Nl=P.isFinite,Rl=cl.join,Dl=Object.keys,Fl=ul.max,Il=ul.min,zl=P.parseInt,ql=ul.random,Vl=hl.replace,Bl=cl.reverse,Wl=hl.split,Ul=Ai(P,"DataView"),Hl=Ai(P,"Map"),Yl=Ai(P,"Promise"),Gl=Ai(P,"Set"),Xl=Ai(P,"WeakMap"),Zl=Ai(Object,"create"),Jl=Xl&&new Xl,Kl=!El.call({valueOf:1},"valueOf"),Ql={},tc=to(Ul),nc=to(Hl),ec=to(Yl),rc=to(Gl),ic=to(Xl),oc=wl?wl.prototype:U,ac=oc?oc.valueOf:U,uc=oc?oc.toString:U;En.templateSettings={escape:on,evaluate:an,interpolate:un,variable:"",imports:{_:En}},En.prototype=Pn.prototype,En.prototype.constructor=En,On.prototype=_e(Pn.prototype),On.prototype.constructor=On,Tn.prototype=_e(Pn.prototype),Tn.prototype.constructor=Tn,Rn.prototype=Zl?Zl(null):fl,qn.prototype.clear=Vn,qn.prototype["delete"]=Bn,qn.prototype.get=Wn,qn.prototype.has=Un,qn.prototype.set=Hn,Yn.prototype.push=Xn,Zn.prototype.clear=Jn,Zn.prototype["delete"]=Kn,Zn.prototype.get=Qn,Zn.prototype.has=te,Zn.prototype.set=ne;var sc=ni(Fe),lc=ni(Ie,!0),cc=ei(),fc=ei(!0);_l&&!El.call({valueOf:1},"valueOf")&&(nr=function(t){return D(_l(t))});var hc=Jl?function(t,n){return Jl.set(t,n),t}:Fs,pc=Gl&&1/z(new Gl([,-0]))[1]==gt?function(t){return new Gl(t)}:Ws,dc=Jl?function(t){return Jl.get(t)}:Ws,vc=hr("length");Ml||(Oi=function(){return[]});var gc=Ml?function(t){for(var n=[];t;)h(n,Oi(t)),t=Pi(t);return n}:Oi;(Ul&&Ti(new Ul(new ArrayBuffer(1)))!=qt||Hl&&Ti(new Hl)!=Pt||Yl&&Ti(Yl.resolve())!=Lt||Gl&&Ti(new Gl)!=Nt||Xl&&Ti(new Xl)!=Ft)&&(Ti=function(t){var n=ml.call(t),e=n==Tt?t.constructor:U,r=e?to(e):U;if(r)switch(r){case tc:return qt;case nc:return Pt;case ec:return Lt;case rc:return Nt;case ic:return Ft}return n});var mc=function(){var t=0,n=0;return function(e,r){var i=Bc(),o=ht-(i-n);if(n=i,o>0){if(++t>=ft)return e}else t=0;return hc(e,r)}}(),yc=La(function(t){var n=[];return ju(t).replace(cn,function(t,e,r,i){n.push(r?i.replace(mn,"$1"):e||t)}),n}),$c=Ra(function(t,n){return Za(t)?Ee(t,Ne(n,1,Za,!0)):[]}),xc=Ra(function(t,n){var e=bo(n);return Za(e)&&(e=U),Za(t)?Ee(t,Ne(n,1,Za,!0),Mi(e)):[]}),bc=Ra(function(t,n){var e=bo(n);return Za(e)&&(e=U),Za(t)?Ee(t,Ne(n,1,Za,!0),U,e):[]}),wc=Ra(function(t){var n=f(t,jr);return n.length&&n[0]===t[0]?Ye(n):[]}),Cc=Ra(function(t){var n=bo(t),e=f(t,jr);return n===bo(e)?n=U:e.pop(),e.length&&e[0]===t[0]?Ye(e,Mi(n)):[]}),Sc=Ra(function(t){var n=bo(t),e=f(t,jr);return n===bo(e)?n=U:e.pop(),e.length&&e[0]===t[0]?Ye(e,U,n):[]}),_c=Ra(So),Mc=Ra(function(t,n){n=Ne(n,1);var e=t?t.length:0,r=de(t,n);return vr(t,f(n,function(t){return qi(t,e)?+t:t}).sort(Hr)),r}),kc=Ra(function(t){return kr(Ne(t,1,Za,!0))}),Ac=Ra(function(t){var n=bo(t);return Za(n)&&(n=U),kr(Ne(t,1,Za,!0),Mi(n))}),Ec=Ra(function(t){var n=bo(t);return Za(n)&&(n=U),kr(Ne(t,1,Za,!0),U,n)}),Pc=Ra(function(t,n){return Za(t)?Ee(t,n):[]}),Oc=Ra(function(t){return Tr(s(t,Za))}),Tc=Ra(function(t){var n=bo(t);return Za(n)&&(n=U),Tr(s(t,Za),Mi(n))}),Lc=Ra(function(t){var n=bo(t);return Za(n)&&(n=U),Tr(s(t,Za),U,n)}),jc=Ra(Ho),Nc=Ra(function(t){var n=t.length,e=n>1?t[n-1]:U;return e="function"==typeof e?(t.pop(),e):U,Yo(t,e)}),Rc=Ra(function(t){t=Ne(t,1);var n=t.length,e=n?t[0]:0,r=this.__wrapped__,i=function(n){return de(n,t)};return!(n>1||this.__actions__.length)&&r instanceof Tn&&qi(e)?(r=r.slice(e,+e+(n?1:0)),r.__actions__.push({func:Ko,args:[i],thisArg:U}),new On(r,this.__chain__).thru(function(t){return n&&!t.length&&t.push(U),t})):this.thru(i)}),Dc=Qr(function(t,n,e){dl.call(t,e)?++t[e]:t[e]=1}),Fc=Qr(function(t,n,e){dl.call(t,e)?t[e].push(n):t[e]=[n]}),Ic=Ra(function(t,n,r){var i=-1,o="function"==typeof n,a=Bi(n),u=Xa(t)?Array(t.length):[];return sc(t,function(t){var s=o?n:a&&null!=t?t[n]:U;u[++i]=s?e(s,t,r):Xe(t,n,r)}),u}),zc=Qr(function(t,n,e){t[e]=n}),qc=Qr(function(t,n,e){t[e?0:1].push(n)},function(){return[[],[]]}),Vc=Ra(function(t,n){if(null==t)return[];var e=n.length;return e>1&&Vi(t,n[0],n[1])?n=[]:e>2&&Vi(n[0],n[1],n[2])&&(n=[n[0]]),n=1==n.length&&tf(n[0])?n[0]:Ne(n,1,zi),lr(t,n,[])}),Bc=ol.now,Wc=Ra(function(t,n,e){var r=J;if(e.length){var i=I(e,Ei(Wc));r|=et}return $i(t,r,n,e,i)}),Uc=Ra(function(t,n,e){var r=J|K;if(e.length){var i=I(e,Ei(Uc));r|=et}return $i(n,r,t,e,i)}),Hc=Ra(function(t,n){return Me(t,1,n)}),Yc=Ra(function(t,n,e){return Me(t,Ou(n)||0,e)});La.Cache=qn;var Gc=Ra(function(t,n){n=1==n.length&&tf(n[0])?f(n[0],M(Mi())):f(Ne(n,1,zi),M(Mi()));var r=n.length;return Ra(function(i){for(var o=-1,a=Il(i.length,r);++o<a;)i[o]=n[o].call(this,i[o]);return e(t,this,i)})}),Xc=Ra(function(t,n){var e=I(n,Ei(Xc));return $i(t,et,U,n,e)}),Zc=Ra(function(t,n){var e=I(n,Ei(Zc));return $i(t,rt,U,n,e)}),Jc=Ra(function(t,n){return $i(t,ot,U,U,U,Ne(n,1))}),Kc=gi(Be),Qc=gi(function(t,n){return t>=n}),tf=Array.isArray,nf=xl?function(t){return t instanceof xl}:Ds(!1),ef=gi(er),rf=gi(function(t,n){return n>=t}),of=ti(function(t,n){if(Kl||Hi(n)||Xa(n))return void Jr(n,Yu(n),t);for(var e in n)dl.call(n,e)&&le(t,e,n[e])}),af=ti(function(t,n){if(Kl||Hi(n)||Xa(n))return void Jr(n,Gu(n),t);for(var e in n)le(t,e,n[e])}),uf=ti(function(t,n,e,r){Jr(n,Gu(n),t,r)}),sf=ti(function(t,n,e,r){Jr(n,Yu(n),t,r)}),lf=Ra(function(t,n){return de(t,Ne(n,1))}),cf=Ra(function(t){return t.push(U,ue),e(uf,U,t)}),ff=Ra(function(t){return t.push(U,Zi),e(gf,U,t)}),hf=ci(function(t,n,e){t[n]=e},Ds(Fs)),pf=ci(function(t,n,e){dl.call(t,n)?t[n].push(e):t[n]=[e]},Mi),df=Ra(Xe),vf=ti(function(t,n,e){ar(t,n,e)}),gf=ti(function(t,n,e,r){ar(t,n,e,r)}),mf=Ra(function(t,n){return null==t?{}:(n=f(Ne(n,1),Qi),cr(t,Ee(Si(t),n)))}),yf=Ra(function(t,n){return null==t?{}:cr(t,f(Ne(n,1),Qi))}),$f=oi(function(t,n,e){return n=n.toLowerCase(),t+(e?ps(n):n)}),xf=oi(function(t,n,e){return t+(e?"-":"")+n.toLowerCase()}),bf=oi(function(t,n,e){return t+(e?" ":"")+n.toLowerCase()}),wf=ii("toLowerCase"),Cf=oi(function(t,n,e){return t+(e?"_":"")+n.toLowerCase()}),Sf=oi(function(t,n,e){return t+(e?" ":"")+Mf(n)}),_f=oi(function(t,n,e){return t+(e?" ":"")+n.toUpperCase()}),Mf=ii("toUpperCase"),kf=Ra(function(t,n){try{return e(t,U,n)}catch(r){return ru(r)?r:new al(r)}}),Af=Ra(function(t,n){return o(Ne(n,1),function(n){n=Qi(n),t[n]=Wc(t[n],t)}),t}),Ef=si(),Pf=si(!0),Of=Ra(function(t,n){return function(e){return Xe(e,t,n)}}),Tf=Ra(function(t,n){return function(e){return Xe(t,e,n)}}),Lf=hi(f),jf=hi(u),Nf=hi(v),Rf=vi(),Df=vi(!0),Ff=fi(function(t,n){return t+n}),If=yi("ceil"),zf=fi(function(t,n){return t/n}),qf=yi("floor"),Vf=fi(function(t,n){return t*n}),Bf=yi("round"),Wf=fi(function(t,n){return t-n});return En.after=Ma,En.ary=ka,En.assign=of,En.assignIn=af,En.assignInWith=uf,En.assignWith=sf,En.at=lf,En.before=Aa,En.bind=Wc,En.bindAll=Af,En.bindKey=Uc,En.castArray=qa,En.chain=Zo,En.chunk=eo,En.compact=ro,En.concat=io,En.cond=Ns,En.conforms=Rs,En.constant=Ds,En.countBy=Dc,En.create=Nu,En.curry=Ea,En.curryRight=Pa,En.debounce=Oa,En.defaults=cf,En.defaultsDeep=ff,En.defer=Hc,En.delay=Yc,En.difference=$c,En.differenceBy=xc,En.differenceWith=bc,En.drop=oo,En.dropRight=ao,En.dropRightWhile=uo,En.dropWhile=so,En.fill=lo,En.filter=ua,En.flatMap=ca,En.flatMapDeep=fa,En.flatMapDepth=ha,En.flatten=ho,En.flattenDeep=po,En.flattenDepth=vo,En.flip=Ta,En.flow=Ef,En.flowRight=Pf,En.fromPairs=go,En.functions=Vu,En.functionsIn=Bu,En.groupBy=Fc,En.initial=$o,En.intersection=wc,En.intersectionBy=Cc,En.intersectionWith=Sc,En.invert=hf,En.invertBy=pf,En.invokeMap=Ic,En.iteratee=Is,En.keyBy=zc,En.keys=Yu,En.keysIn=Gu,En.map=ga,En.mapKeys=Xu,En.mapValues=Zu,En.matches=zs,En.matchesProperty=qs,En.memoize=La,En.merge=vf,En.mergeWith=gf,En.method=Of,En.methodOf=Tf,En.mixin=Vs,En.negate=ja,En.nthArg=Us,En.omit=mf,En.omitBy=Ju,En.once=Na,En.orderBy=ma,En.over=Lf,En.overArgs=Gc,En.overEvery=jf,En.overSome=Nf,En.partial=Xc,En.partialRight=Zc,En.partition=qc,En.pick=yf,En.pickBy=Ku,En.property=Hs,En.propertyOf=Ys,En.pull=_c,En.pullAll=So,En.pullAllBy=_o,En.pullAllWith=Mo,En.pullAt=Mc,En.range=Rf,En.rangeRight=Df,En.rearg=Jc,En.reject=xa,En.remove=ko,En.rest=Ra,En.reverse=Ao,En.sampleSize=wa,En.set=ts,En.setWith=ns,En.shuffle=Ca,En.slice=Eo,En.sortBy=Vc,En.sortedUniq=Ro,En.sortedUniqBy=Do,En.split=Ss,En.spread=Da,En.tail=Fo,En.take=Io,En.takeRight=zo,En.takeRightWhile=qo,En.takeWhile=Vo,En.tap=Jo,En.throttle=Fa,En.thru=Ko,En.toArray=Au,En.toPairs=es,En.toPairsIn=rs,En.toPath=Xs,En.toPlainObject=Tu,En.transform=is,En.unary=Ia,En.union=kc,En.unionBy=Ac,En.unionWith=Ec,En.uniq=Bo,En.uniqBy=Wo,En.uniqWith=Uo,En.unset=os,En.unzip=Ho,En.unzipWith=Yo,En.update=as,En.updateWith=us,En.values=ss,En.valuesIn=ls,En.without=Pc,En.words=js,En.wrap=za,En.xor=Oc,En.xorBy=Tc,En.xorWith=Lc,En.zip=jc,En.zipObject=Go,En.zipObjectDeep=Xo,En.zipWith=Nc,En.entries=es,En.entriesIn=rs,En.extend=af,En.extendWith=uf,Vs(En,En),En.add=Ff,En.attempt=kf,En.camelCase=$f,En.capitalize=ps,En.ceil=If,En.clamp=cs,En.clone=Va,En.cloneDeep=Wa,En.cloneDeepWith=Ua,En.cloneWith=Ba,En.deburr=ds,En.divide=zf,En.endsWith=vs,En.eq=Ha,En.escape=gs,En.escapeRegExp=ms,En.every=aa,En.find=sa,En.findIndex=co,En.findKey=Ru,En.findLast=la,En.findLastIndex=fo,En.findLastKey=Du,En.floor=qf,En.forEach=pa,En.forEachRight=da,En.forIn=Fu,En.forInRight=Iu,En.forOwn=zu,En.forOwnRight=qu,En.get=Wu,En.gt=Kc,En.gte=Qc,En.has=Uu,En.hasIn=Hu,En.head=mo,En.identity=Fs,En.includes=va,En.indexOf=yo,En.inRange=fs,En.invoke=df,En.isArguments=Ya,En.isArray=tf,En.isArrayBuffer=Ga,En.isArrayLike=Xa,En.isArrayLikeObject=Za,En.isBoolean=Ja,En.isBuffer=nf,En.isDate=Ka,En.isElement=Qa,En.isEmpty=tu,En.isEqual=nu,En.isEqualWith=eu,En.isError=ru,En.isFinite=iu,En.isFunction=ou,En.isInteger=au,En.isLength=uu,En.isMap=cu,En.isMatch=fu,En.isMatchWith=hu,En.isNaN=pu,En.isNative=du,En.isNil=gu,En.isNull=vu,En.isNumber=mu,En.isObject=su,En.isObjectLike=lu,En.isPlainObject=yu,En.isRegExp=$u,En.isSafeInteger=xu,En.isSet=bu,En.isString=wu,En.isSymbol=Cu,En.isTypedArray=Su,En.isUndefined=_u,En.isWeakMap=Mu,En.isWeakSet=ku,En.join=xo,En.kebabCase=xf,En.last=bo,En.lastIndexOf=wo,En.lowerCase=bf,En.lowerFirst=wf,En.lt=ef,En.lte=rf,En.max=Js,En.maxBy=Ks,En.mean=Qs,En.meanBy=tl,En.min=nl,En.minBy=el,En.multiply=Vf,En.nth=Co,En.noConflict=Bs,En.noop=Ws,En.now=Bc,En.pad=ys,En.padEnd=$s,En.padStart=xs,En.parseInt=bs,En.random=hs,En.reduce=ya,En.reduceRight=$a,En.repeat=ws,En.replace=Cs,En.result=Qu,En.round=Bf,En.runInContext=W,En.sample=ba,En.size=Sa,En.snakeCase=Cf,En.some=_a,En.sortedIndex=Po,En.sortedIndexBy=Oo,En.sortedIndexOf=To,En.sortedLastIndex=Lo,En.sortedLastIndexBy=jo,En.sortedLastIndexOf=No,En.startCase=Sf,En.startsWith=_s,En.subtract=Wf,En.sum=rl,En.sumBy=il,En.template=Ms,En.times=Gs,En.toInteger=Eu,En.toLength=Pu,En.toLower=ks,En.toNumber=Ou,En.toSafeInteger=Lu,En.toString=ju,En.toUpper=As,En.trim=Es,En.trimEnd=Ps,En.trimStart=Os,En.truncate=Ts,En.unescape=Ls,En.uniqueId=Zs,En.upperCase=_f,En.upperFirst=Mf,En.each=pa,En.eachRight=da,En.first=mo,Vs(En,function(){var t={};return Fe(En,function(n,e){dl.call(En.prototype,e)||(t[e]=n)}),t}(),{chain:!1}),En.VERSION=H,o(["bind","bindKey","curry","curryRight","partial","partialRight"],function(t){En[t].placeholder=En}),o(["drop","take"],function(t,n){Tn.prototype[t]=function(e){var r=this.__filtered__;if(r&&!n)return new Tn(this);e=e===U?1:Fl(Eu(e),0);var i=this.clone();return r?i.__takeCount__=Il(e,i.__takeCount__):i.__views__.push({size:Il(e,xt),type:t+(i.__dir__<0?"Right":"")}),i},Tn.prototype[t+"Right"]=function(n){return this.reverse()[t](n).reverse()}}),o(["filter","map","takeWhile"],function(t,n){var e=n+1,r=e==pt||e==vt;Tn.prototype[t]=function(t){var n=this.clone();return n.__iteratees__.push({iteratee:Mi(t,3),type:e}),n.__filtered__=n.__filtered__||r,n}}),o(["head","last"],function(t,n){var e="take"+(n?"Right":"");Tn.prototype[t]=function(){return this[e](1).value()[0]}}),o(["initial","tail"],function(t,n){var e="drop"+(n?"":"Right");Tn.prototype[t]=function(){return this.__filtered__?new Tn(this):this[e](1)}}),Tn.prototype.compact=function(){return this.filter(Fs)},Tn.prototype.find=function(t){return this.filter(t).head()},Tn.prototype.findLast=function(t){return this.reverse().find(t)},Tn.prototype.invokeMap=Ra(function(t,n){return"function"==typeof t?new Tn(this):this.map(function(e){return Xe(e,t,n)})}),Tn.prototype.reject=function(t){return t=Mi(t,3),this.filter(function(n){return!t(n)})},Tn.prototype.slice=function(t,n){t=Eu(t);var e=this;return e.__filtered__&&(t>0||0>n)?new Tn(e):(0>t?e=e.takeRight(-t):t&&(e=e.drop(t)),n!==U&&(n=Eu(n),e=0>n?e.dropRight(-n):e.take(n-t)),e)},Tn.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},Tn.prototype.toArray=function(){return this.take(xt)},Fe(Tn.prototype,function(t,n){var e=/^(?:filter|find|map|reject)|While$/.test(n),r=/^(?:head|last)$/.test(n),i=En[r?"take"+("last"==n?"Right":""):n],o=r||/^find/.test(n);i&&(En.prototype[n]=function(){var n=this.__wrapped__,a=r?[1]:arguments,u=n instanceof Tn,s=a[0],l=u||tf(n),c=function(t){var n=i.apply(En,h([t],a));return r&&f?n[0]:n};l&&e&&"function"==typeof s&&1!=s.length&&(u=l=!1);var f=this.__chain__,p=!!this.__actions__.length,d=o&&!f,v=u&&!p;if(!o&&l){n=v?n:new Tn(this);var g=t.apply(n,a);return g.__actions__.push({func:Ko,args:[c],thisArg:U}),new On(g,f)}return d&&v?t.apply(this,a):(g=this.thru(c),d?r?g.value()[0]:g.value():g)})}),o(["pop","push","shift","sort","splice","unshift"],function(t){var n=cl[t],e=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",r=/^(?:pop|shift)$/.test(t);En.prototype[t]=function(){var t=arguments;if(r&&!this.__chain__){var i=this.value();return n.apply(tf(i)?i:[],t)}return this[e](function(e){return n.apply(tf(e)?e:[],t)})}}),Fe(Tn.prototype,function(t,n){var e=En[n];if(e){var r=e.name+"",i=Ql[r]||(Ql[r]=[]);i.push({name:n,func:e})}}),Ql[li(U,K).name]=[{name:"wrapper",func:U}],Tn.prototype.clone=Ln,Tn.prototype.reverse=jn,Tn.prototype.value=Nn,En.prototype.at=Rc,En.prototype.chain=Qo,En.prototype.commit=ta,En.prototype.next=na,En.prototype.plant=ra,En.prototype.reverse=ia,En.prototype.toJSON=En.prototype.valueOf=En.prototype.value=oa,kl&&(En.prototype[kl]=ea),En}var U,H="4.11.2",Y=200,G="Expected a function",X="__lodash_hash_undefined__",Z="__lodash_placeholder__",J=1,K=2,Q=4,tt=8,nt=16,et=32,rt=64,it=128,ot=256,at=512,ut=1,st=2,lt=30,ct="...",ft=150,ht=16,pt=1,dt=2,vt=3,gt=1/0,mt=9007199254740991,yt=1.7976931348623157e308,$t=NaN,xt=4294967295,bt=xt-1,wt=xt>>>1,Ct="[object Arguments]",St="[object Array]",_t="[object Boolean]",Mt="[object Date]",kt="[object Error]",At="[object Function]",Et="[object GeneratorFunction]",Pt="[object Map]",Ot="[object Number]",Tt="[object Object]",Lt="[object Promise]",jt="[object RegExp]",Nt="[object Set]",Rt="[object String]",Dt="[object Symbol]",Ft="[object WeakMap]",It="[object WeakSet]",zt="[object ArrayBuffer]",qt="[object DataView]",Vt="[object Float32Array]",Bt="[object Float64Array]",Wt="[object Int8Array]",Ut="[object Int16Array]",Ht="[object Int32Array]",Yt="[object Uint8Array]",Gt="[object Uint8ClampedArray]",Xt="[object Uint16Array]",Zt="[object Uint32Array]",Jt=/\b__p \+= '';/g,Kt=/\b(__p \+=) '' \+/g,Qt=/(__e\(.*?\)|\b__t\)) \+\n'';/g,tn=/&(?:amp|lt|gt|quot|#39|#96);/g,nn=/[&<>"'`]/g,en=RegExp(tn.source),rn=RegExp(nn.source),on=/<%-([\s\S]+?)%>/g,an=/<%([\s\S]+?)%>/g,un=/<%=([\s\S]+?)%>/g,sn=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ln=/^\w*$/,cn=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]/g,fn=/[\\^$.*+?()[\]{}|]/g,hn=RegExp(fn.source),pn=/^\s+|\s+$/g,dn=/^\s+/,vn=/\s+$/,gn=/[a-zA-Z0-9]+/g,mn=/\\(\\)?/g,yn=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,$n=/\w*$/,xn=/^0x/i,bn=/^[-+]0x[0-9a-f]+$/i,wn=/^0b[01]+$/i,Cn=/^\[object .+?Constructor\]$/,Sn=/^0o[0-7]+$/i,_n=/^(?:0|[1-9]\d*)$/,Mn=/[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g,kn=/($^)/,An=/['\n\r\u2028\u2029\\]/g,En="\\ud800-\\udfff",Pn="\\u0300-\\u036f\\ufe20-\\ufe23",On="\\u20d0-\\u20f0",Tn="\\u2700-\\u27bf",Ln="a-z\\xdf-\\xf6\\xf8-\\xff",jn="\\xac\\xb1\\xd7\\xf7",Nn="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Rn="\\u2000-\\u206f",Dn=" \\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",Fn="A-Z\\xc0-\\xd6\\xd8-\\xde",In="\\ufe0e\\ufe0f",zn=jn+Nn+Rn+Dn,qn="['’]",Vn="["+En+"]",Bn="["+zn+"]",Wn="["+Pn+On+"]",Un="\\d+",Hn="["+Tn+"]",Yn="["+Ln+"]",Gn="[^"+En+zn+Un+Tn+Ln+Fn+"]",Xn="\\ud83c[\\udffb-\\udfff]",Zn="(?:"+Wn+"|"+Xn+")",Jn="[^"+En+"]",Kn="(?:\\ud83c[\\udde6-\\uddff]){2}",Qn="[\\ud800-\\udbff][\\udc00-\\udfff]",te="["+Fn+"]",ne="\\u200d",ee="(?:"+Yn+"|"+Gn+")",re="(?:"+te+"|"+Gn+")",ie="(?:"+qn+"(?:d|ll|m|re|s|t|ve))?",oe="(?:"+qn+"(?:D|LL|M|RE|S|T|VE))?",ae=Zn+"?",ue="["+In+"]?",se="(?:"+ne+"(?:"+[Jn,Kn,Qn].join("|")+")"+ue+ae+")*",le=ue+ae+se,ce="(?:"+[Hn,Kn,Qn].join("|")+")"+le,fe="(?:"+[Jn+Wn+"?",Wn,Kn,Qn,Vn].join("|")+")",he=RegExp(qn,"g"),pe=RegExp(Wn,"g"),de=RegExp(Xn+"(?="+Xn+")|"+fe+le,"g"),ve=RegExp([te+"?"+Yn+"+"+ie+"(?="+[Bn,te,"$"].join("|")+")",re+"+"+oe+"(?="+[Bn,te+ee,"$"].join("|")+")",te+"?"+ee+"+"+ie,te+"+"+oe,Un,ce].join("|"),"g"),ge=RegExp("["+ne+En+Pn+On+In+"]"),me=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,ye=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","Reflect","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],$e=-1,xe={};xe[Vt]=xe[Bt]=xe[Wt]=xe[Ut]=xe[Ht]=xe[Yt]=xe[Gt]=xe[Xt]=xe[Zt]=!0,xe[Ct]=xe[St]=xe[zt]=xe[_t]=xe[qt]=xe[Mt]=xe[kt]=xe[At]=xe[Pt]=xe[Ot]=xe[Tt]=xe[jt]=xe[Nt]=xe[Rt]=xe[Ft]=!1;var be={};be[Ct]=be[St]=be[zt]=be[qt]=be[_t]=be[Mt]=be[Vt]=be[Bt]=be[Wt]=be[Ut]=be[Ht]=be[Pt]=be[Ot]=be[Tt]=be[jt]=be[Nt]=be[Rt]=be[Dt]=be[Yt]=be[Gt]=be[Xt]=be[Zt]=!0,be[kt]=be[At]=be[Ft]=!1;var we={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss"},Ce={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},Se={"&":"&","<":"<",">":">",""":'"',"'":"'","`":"`"},_e={"function":!0,object:!0},Me={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ke=parseFloat,Ae=parseInt,Ee=_e[typeof exports]&&exports&&!exports.nodeType?exports:U,Pe=_e[typeof module]&&module&&!module.nodeType?module:U,Oe=Pe&&Pe.exports===Ee?Ee:U,Te=P(Ee&&Pe&&"object"==typeof global&&global),Le=P(_e[typeof self]&&self),je=P(_e[typeof window]&&window),Ne=P(_e[typeof this]&&this),Re=Te||je!==(Ne&&Ne.window)&&je||Le||Ne||Function("return this")(),De=W();(je||Le||{})._=De,"function"==typeof define&&"object"==typeof define.amd&&define.amd?define(function(){return De}):Ee&&Pe?(Oe&&((Pe.exports=De)._=De),Ee._=De):Re._=De}.call(this),function(){"use strict";var t=this,n=t.Chart,e=function(t){this.canvas=t.canvas,this.ctx=t;var n=function(t,n){return t["offset"+n]?t["offset"+n]:document.defaultView.getComputedStyle(t).getPropertyValue(n)};this.width=n(t.canvas,"Width")||t.canvas.width,this.height=n(t.canvas,"Height")||t.canvas.height;return this.aspectRatio=this.width/this.height,r.retinaScale(this),this};e.defaults={global:{animation:!0,animationSteps:60,animationEasing:"easeOutQuart",showScale:!0,scaleOverride:!1,scaleSteps:null,scaleStepWidth:null,scaleStartValue:null,scaleLineColor:"rgba(0,0,0,.1)",scaleLineWidth:1,scaleShowLabels:!0,scaleLabel:"<%=value%>",scaleIntegersOnly:!0,scaleBeginAtZero:!1,scaleFontFamily:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",scaleFontSize:12,scaleFontStyle:"normal",scaleFontColor:"#666",responsive:!1,maintainAspectRatio:!0,showTooltips:!0,customTooltips:!1,tooltipEvents:["mousemove","touchstart","touchmove","mouseout"],tooltipFillColor:"rgba(0,0,0,0.8)",tooltipFontFamily:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",tooltipFontSize:14,tooltipFontStyle:"normal",tooltipFontColor:"#fff",tooltipTitleFontFamily:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",tooltipTitleFontSize:14,tooltipTitleFontStyle:"bold",tooltipTitleFontColor:"#fff",tooltipTitleTemplate:"<%= label%>",tooltipYPadding:6,tooltipXPadding:6,tooltipCaretSize:8,tooltipCornerRadius:6,tooltipXOffset:10,tooltipTemplate:"<%if (label){%><%=label%>: <%}%><%= value %>",multiTooltipTemplate:"<%= datasetLabel %>: <%= value %>",multiTooltipKeyBackground:"#fff",segmentColorDefault:["#A6CEE3","#1F78B4","#B2DF8A","#33A02C","#FB9A99","#E31A1C","#FDBF6F","#FF7F00","#CAB2D6","#6A3D9A","#B4B482","#B15928"],segmentHighlightColorDefaults:["#CEF6FF","#47A0DC","#DAFFB2","#5BC854","#FFC2C1","#FF4244","#FFE797","#FFA728","#F2DAFE","#9265C2","#DCDCAA","#D98150"],onAnimationProgress:function(){},onAnimationComplete:function(){}}},e.types={};var r=e.helpers={},i=r.each=function(t,n,e){var r=Array.prototype.slice.call(arguments,3);if(t)if(t.length===+t.length){var i;for(i=0;i<t.length;i++)n.apply(e,[t[i],i].concat(r))}else for(var o in t)n.apply(e,[t[o],o].concat(r))},o=r.clone=function(t){var n={};return i(t,function(e,r){t.hasOwnProperty(r)&&(n[r]=e)}),n},a=r.extend=function(t){return i(Array.prototype.slice.call(arguments,1),function(n){i(n,function(e,r){n.hasOwnProperty(r)&&(t[r]=e)})}),t},u=r.merge=function(t,n){var e=Array.prototype.slice.call(arguments,0);return e.unshift({}),a.apply(null,e)},s=r.indexOf=function(t,n){if(Array.prototype.indexOf)return t.indexOf(n);for(var e=0;e<t.length;e++)if(t[e]===n)return e;return-1},l=(r.where=function(t,n){var e=[];return r.each(t,function(t){n(t)&&e.push(t)}),e},r.findNextWhere=function(t,n,e){e||(e=-1);for(var r=e+1;r<t.length;r++){var i=t[r];if(n(i))return i}},r.findPreviousWhere=function(t,n,e){e||(e=t.length);for(var r=e-1;r>=0;r--){var i=t[r];if(n(i))return i}},r.inherits=function(t){var n=this,e=t&&t.hasOwnProperty("constructor")?t.constructor:function(){return n.apply(this,arguments)},r=function(){this.constructor=e};return r.prototype=n.prototype,e.prototype=new r,e.extend=l,t&&a(e.prototype,t),e.__super__=n.prototype,e}),c=r.noop=function(){},f=r.uid=function(){var t=0;return function(){return"chart-"+t++}}(),h=r.warn=function(t){window.console&&"function"==typeof window.console.warn&&console.warn(t)},p=r.amd="function"==typeof define&&define.amd,d=r.isNumber=function(t){return!isNaN(parseFloat(t))&&isFinite(t)},v=r.max=function(t){return Math.max.apply(Math,t)},g=r.min=function(t){return Math.min.apply(Math,t)},m=(r.cap=function(t,n,e){if(d(n)){if(t>n)return n}else if(d(e)&&e>t)return e;return t},r.getDecimalPlaces=function(t){if(t%1!==0&&d(t)){var n=t.toString();if(n.indexOf("e-")<0)return n.split(".")[1].length;if(n.indexOf(".")<0)return parseInt(n.split("e-")[1]);var e=n.split(".")[1].split("e-");return e[0].length+parseInt(e[1])}return 0}),y=r.radians=function(t){return t*(Math.PI/180)},$=(r.getAngleFromPoint=function(t,n){var e=n.x-t.x,r=n.y-t.y,i=Math.sqrt(e*e+r*r),o=2*Math.PI+Math.atan2(r,e);return 0>e&&0>r&&(o+=2*Math.PI),{angle:o,distance:i}},r.aliasPixel=function(t){return t%2===0?0:.5}),x=(r.splineCurve=function(t,n,e,r){var i=Math.sqrt(Math.pow(n.x-t.x,2)+Math.pow(n.y-t.y,2)),o=Math.sqrt(Math.pow(e.x-n.x,2)+Math.pow(e.y-n.y,2)),a=r*i/(i+o),u=r*o/(i+o);return{inner:{x:n.x-a*(e.x-t.x),y:n.y-a*(e.y-t.y)},outer:{x:n.x+u*(e.x-t.x),y:n.y+u*(e.y-t.y)}}},r.calculateOrderOfMagnitude=function(t){return Math.floor(Math.log(t)/Math.LN10)}),b=(r.calculateScaleRange=function(t,n,e,r,o){var a=2,u=Math.floor(n/(1.5*e)),s=a>=u,l=[];i(t,function(t){null==t||l.push(t)});var c=g(l),f=v(l);f===c&&(f+=.5,
+c>=.5&&!r?c-=.5:f+=.5);for(var h=Math.abs(f-c),p=x(h),d=Math.ceil(f/(1*Math.pow(10,p)))*Math.pow(10,p),m=r?0:Math.floor(c/(1*Math.pow(10,p)))*Math.pow(10,p),y=d-m,$=Math.pow(10,p),b=Math.round(y/$);(b>u||u>2*b)&&!s;)if(b>u)$*=2,b=Math.round(y/$),b%1!==0&&(s=!0);else if(o&&p>=0){if($/2%1!==0)break;$/=2,b=Math.round(y/$)}else $/=2,b=Math.round(y/$);return s&&(b=a,$=y/b),{steps:b,stepValue:$,min:m,max:m+b*$}},r.template=function(t,n){function e(t,n){var e=/\W/.test(t)?new Function("obj","var p=[],print=function(){p.push.apply(p,arguments);};with(obj){p.push('"+t.replace(/[\r\t\n]/g," ").split("<%").join(" ").replace(/((^|%>)[^\t]*)'/g,"$1\r").replace(/\t=(.*?)%>/g,"',$1,'").split(" ").join("');").split("%>").join("p.push('").split("\r").join("\\'")+"');}return p.join('');"):r[t]=r[t];return n?e(n):e}if(t instanceof Function)return t(n);var r={};return e(t,n)}),w=(r.generateLabels=function(t,n,e,r){var o=new Array(n);return t&&i(o,function(n,i){o[i]=b(t,{value:e+r*(i+1)})}),o},r.easingEffects={linear:function(t){return t},easeInQuad:function(t){return t*t},easeOutQuad:function(t){return-1*t*(t-2)},easeInOutQuad:function(t){return(t/=.5)<1?.5*t*t:-0.5*(--t*(t-2)-1)},easeInCubic:function(t){return t*t*t},easeOutCubic:function(t){return 1*((t=t/1-1)*t*t+1)},easeInOutCubic:function(t){return(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},easeInQuart:function(t){return t*t*t*t},easeOutQuart:function(t){return-1*((t=t/1-1)*t*t*t-1)},easeInOutQuart:function(t){return(t/=.5)<1?.5*t*t*t*t:-0.5*((t-=2)*t*t*t-2)},easeInQuint:function(t){return 1*(t/=1)*t*t*t*t},easeOutQuint:function(t){return 1*((t=t/1-1)*t*t*t*t+1)},easeInOutQuint:function(t){return(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},easeInSine:function(t){return-1*Math.cos(t/1*(Math.PI/2))+1},easeOutSine:function(t){return 1*Math.sin(t/1*(Math.PI/2))},easeInOutSine:function(t){return-0.5*(Math.cos(Math.PI*t/1)-1)},easeInExpo:function(t){return 0===t?1:1*Math.pow(2,10*(t/1-1))},easeOutExpo:function(t){return 1===t?1:1*(-Math.pow(2,-10*t/1)+1)},easeInOutExpo:function(t){return 0===t?0:1===t?1:(t/=.5)<1?.5*Math.pow(2,10*(t-1)):.5*(-Math.pow(2,-10*--t)+2)},easeInCirc:function(t){return t>=1?t:-1*(Math.sqrt(1-(t/=1)*t)-1)},easeOutCirc:function(t){return 1*Math.sqrt(1-(t=t/1-1)*t)},easeInOutCirc:function(t){return(t/=.5)<1?-0.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},easeInElastic:function(t){var n=1.70158,e=0,r=1;return 0===t?0:1==(t/=1)?1:(e||(e=.3),r<Math.abs(1)?(r=1,n=e/4):n=e/(2*Math.PI)*Math.asin(1/r),-(r*Math.pow(2,10*(t-=1))*Math.sin((1*t-n)*(2*Math.PI)/e)))},easeOutElastic:function(t){var n=1.70158,e=0,r=1;return 0===t?0:1==(t/=1)?1:(e||(e=.3),r<Math.abs(1)?(r=1,n=e/4):n=e/(2*Math.PI)*Math.asin(1/r),r*Math.pow(2,-10*t)*Math.sin((1*t-n)*(2*Math.PI)/e)+1)},easeInOutElastic:function(t){var n=1.70158,e=0,r=1;return 0===t?0:2==(t/=.5)?1:(e||(e=1*(.3*1.5)),r<Math.abs(1)?(r=1,n=e/4):n=e/(2*Math.PI)*Math.asin(1/r),1>t?-.5*(r*Math.pow(2,10*(t-=1))*Math.sin((1*t-n)*(2*Math.PI)/e)):r*Math.pow(2,-10*(t-=1))*Math.sin((1*t-n)*(2*Math.PI)/e)*.5+1)},easeInBack:function(t){var n=1.70158;return 1*(t/=1)*t*((n+1)*t-n)},easeOutBack:function(t){var n=1.70158;return 1*((t=t/1-1)*t*((n+1)*t+n)+1)},easeInOutBack:function(t){var n=1.70158;return(t/=.5)<1?.5*(t*t*(((n*=1.525)+1)*t-n)):.5*((t-=2)*t*(((n*=1.525)+1)*t+n)+2)},easeInBounce:function(t){return 1-w.easeOutBounce(1-t)},easeOutBounce:function(t){return(t/=1)<1/2.75?1*(7.5625*t*t):2/2.75>t?1*(7.5625*(t-=1.5/2.75)*t+.75):2.5/2.75>t?1*(7.5625*(t-=2.25/2.75)*t+.9375):1*(7.5625*(t-=2.625/2.75)*t+.984375)},easeInOutBounce:function(t){return.5>t?.5*w.easeInBounce(2*t):.5*w.easeOutBounce(2*t-1)+.5}}),C=r.requestAnimFrame=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(t){return window.setTimeout(t,1e3/60)}}(),S=(r.cancelAnimFrame=function(){return window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||window.oCancelAnimationFrame||window.msCancelAnimationFrame||function(t){return window.clearTimeout(t,1e3/60)}}(),r.animationLoop=function(t,n,e,r,i,o){var a=0,u=w[e]||w.linear,s=function(){a++;var e=a/n,l=u(e);t.call(o,l,e,a),r.call(o,l,e),n>a?o.animationFrame=C(s):i.apply(o)};C(s)},r.getRelativePosition=function(t){var n,e,r=t.originalEvent||t,i=t.currentTarget||t.srcElement,o=i.getBoundingClientRect();return r.touches?(n=r.touches[0].clientX-o.left,e=r.touches[0].clientY-o.top):(n=r.clientX-o.left,e=r.clientY-o.top),{x:n,y:e}},r.addEvent=function(t,n,e){t.addEventListener?t.addEventListener(n,e):t.attachEvent?t.attachEvent("on"+n,e):t["on"+n]=e}),_=r.removeEvent=function(t,n,e){t.removeEventListener?t.removeEventListener(n,e,!1):t.detachEvent?t.detachEvent("on"+n,e):t["on"+n]=c},M=(r.bindEvents=function(t,n,e){t.events||(t.events={}),i(n,function(n){t.events[n]=function(){e.apply(t,arguments)},S(t.chart.canvas,n,t.events[n])})},r.unbindEvents=function(t,n){i(n,function(n,e){_(t.chart.canvas,e,n)})}),k=r.getMaximumWidth=function(t){var n=t.parentNode,e=parseInt(E(n,"padding-left"))+parseInt(E(n,"padding-right"));return n?n.clientWidth-e:0},A=r.getMaximumHeight=function(t){var n=t.parentNode,e=parseInt(E(n,"padding-bottom"))+parseInt(E(n,"padding-top"));return n?n.clientHeight-e:0},E=r.getStyle=function(t,n){return t.currentStyle?t.currentStyle[n]:document.defaultView.getComputedStyle(t,null).getPropertyValue(n)},P=(r.getMaximumSize=r.getMaximumWidth,r.retinaScale=function(t){var n=t.ctx,e=t.canvas.width,r=t.canvas.height;window.devicePixelRatio&&(n.canvas.style.width=e+"px",n.canvas.style.height=r+"px",n.canvas.height=r*window.devicePixelRatio,n.canvas.width=e*window.devicePixelRatio,n.scale(window.devicePixelRatio,window.devicePixelRatio))}),O=r.clear=function(t){t.ctx.clearRect(0,0,t.width,t.height)},T=r.fontString=function(t,n,e){return n+" "+t+"px "+e},L=r.longestText=function(t,n,e){t.font=n;var r=0;return i(e,function(n){var e=t.measureText(n).width;r=e>r?e:r}),r},j=r.drawRoundedRectangle=function(t,n,e,r,i,o){t.beginPath(),t.moveTo(n+o,e),t.lineTo(n+r-o,e),t.quadraticCurveTo(n+r,e,n+r,e+o),t.lineTo(n+r,e+i-o),t.quadraticCurveTo(n+r,e+i,n+r-o,e+i),t.lineTo(n+o,e+i),t.quadraticCurveTo(n,e+i,n,e+i-o),t.lineTo(n,e+o),t.quadraticCurveTo(n,e,n+o,e),t.closePath()};e.instances={},e.Type=function(t,n,r){this.options=n,this.chart=r,this.id=f(),e.instances[this.id]=this,n.responsive&&this.resize(),this.initialize.call(this,t)},a(e.Type.prototype,{initialize:function(){return this},clear:function(){return O(this.chart),this},stop:function(){return e.animationService.cancelAnimation(this),this},resize:function(t){this.stop();var n=this.chart.canvas,e=k(this.chart.canvas),r=this.options.maintainAspectRatio?e/this.chart.aspectRatio:A(this.chart.canvas);return n.width=this.chart.width=e,n.height=this.chart.height=r,P(this.chart),"function"==typeof t&&t.apply(this,Array.prototype.slice.call(arguments,1)),this},reflow:c,render:function(t){if(t&&this.reflow(),this.options.animation&&!t){var n=new e.Animation;n.numSteps=this.options.animationSteps,n.easing=this.options.animationEasing,n.render=function(t,n){var e=r.easingEffects[n.easing],i=n.currentStep/n.numSteps,o=e(i);t.draw(o,i,n.currentStep)},n.onAnimationProgress=this.options.onAnimationProgress,n.onAnimationComplete=this.options.onAnimationComplete,e.animationService.addAnimation(this,n)}else this.draw(),this.options.onAnimationComplete.call(this);return this},generateLegend:function(){return r.template(this.options.legendTemplate,this)},destroy:function(){this.stop(),this.clear(),M(this,this.events);var t=this.chart.canvas;t.width=this.chart.width,t.height=this.chart.height,t.style.removeProperty?(t.style.removeProperty("width"),t.style.removeProperty("height")):(t.style.removeAttribute("width"),t.style.removeAttribute("height")),delete e.instances[this.id]},showTooltip:function(t,n){"undefined"==typeof this.activeElements&&(this.activeElements=[]);var o=function(t){var n=!1;return t.length!==this.activeElements.length?n=!0:(i(t,function(t,e){t!==this.activeElements[e]&&(n=!0)},this),n)}.call(this,t);if(o||n){if(this.activeElements=t,this.draw(),this.options.customTooltips&&this.options.customTooltips(!1),t.length>0)if(this.datasets&&this.datasets.length>1){for(var a,u,l=this.datasets.length-1;l>=0&&(a=this.datasets[l].points||this.datasets[l].bars||this.datasets[l].segments,u=s(a,t[0]),-1===u);l--);var c=[],f=[],h=function(t){var n,e,i,o,a,s=[],l=[],h=[];return r.each(this.datasets,function(t){n=t.points||t.bars||t.segments,n[u]&&n[u].hasValue()&&s.push(n[u])}),r.each(s,function(t){l.push(t.x),h.push(t.y),c.push(r.template(this.options.multiTooltipTemplate,t)),f.push({fill:t._saved.fillColor||t.fillColor,stroke:t._saved.strokeColor||t.strokeColor})},this),a=g(h),i=v(h),o=g(l),e=v(l),{x:o>this.chart.width/2?o:e,y:(a+i)/2}}.call(this,u);new e.MultiTooltip({x:h.x,y:h.y,xPadding:this.options.tooltipXPadding,yPadding:this.options.tooltipYPadding,xOffset:this.options.tooltipXOffset,fillColor:this.options.tooltipFillColor,textColor:this.options.tooltipFontColor,fontFamily:this.options.tooltipFontFamily,fontStyle:this.options.tooltipFontStyle,fontSize:this.options.tooltipFontSize,titleTextColor:this.options.tooltipTitleFontColor,titleFontFamily:this.options.tooltipTitleFontFamily,titleFontStyle:this.options.tooltipTitleFontStyle,titleFontSize:this.options.tooltipTitleFontSize,cornerRadius:this.options.tooltipCornerRadius,labels:c,legendColors:f,legendColorBackground:this.options.multiTooltipKeyBackground,title:b(this.options.tooltipTitleTemplate,t[0]),chart:this.chart,ctx:this.chart.ctx,custom:this.options.customTooltips}).draw()}else i(t,function(t){var n=t.tooltipPosition();new e.Tooltip({x:Math.round(n.x),y:Math.round(n.y),xPadding:this.options.tooltipXPadding,yPadding:this.options.tooltipYPadding,fillColor:this.options.tooltipFillColor,textColor:this.options.tooltipFontColor,fontFamily:this.options.tooltipFontFamily,fontStyle:this.options.tooltipFontStyle,fontSize:this.options.tooltipFontSize,caretHeight:this.options.tooltipCaretSize,cornerRadius:this.options.tooltipCornerRadius,text:b(this.options.tooltipTemplate,t),chart:this.chart,custom:this.options.customTooltips}).draw()},this);return this}},toBase64Image:function(){return this.chart.canvas.toDataURL.apply(this.chart.canvas,arguments)}}),e.Type.extend=function(t){var n=this,r=function(){return n.apply(this,arguments)};if(r.prototype=o(n.prototype),a(r.prototype,t),r.extend=e.Type.extend,t.name||n.prototype.name){var i=t.name||n.prototype.name,s=e.defaults[n.prototype.name]?o(e.defaults[n.prototype.name]):{};e.defaults[i]=a(s,t.defaults),e.types[i]=r,e.prototype[i]=function(t,n){var o=u(e.defaults.global,e.defaults[i],n||{});return new r(t,o,this)}}else h("Name not provided for this chart, so it hasn't been registered");return n},e.Element=function(t){a(this,t),this.initialize.apply(this,arguments),this.save()},a(e.Element.prototype,{initialize:function(){},restore:function(t){return t?i(t,function(t){this[t]=this._saved[t]},this):a(this,this._saved),this},save:function(){return this._saved=o(this),delete this._saved._saved,this},update:function(t){return i(t,function(t,n){this._saved[n]=this[n],this[n]=t},this),this},transition:function(t,n){return i(t,function(t,e){this[e]=(t-this._saved[e])*n+this._saved[e]},this),this},tooltipPosition:function(){return{x:this.x,y:this.y}},hasValue:function(){return d(this.value)}}),e.Element.extend=l,e.Point=e.Element.extend({display:!0,inRange:function(t,n){var e=this.hitDetectionRadius+this.radius;return Math.pow(t-this.x,2)+Math.pow(n-this.y,2)<Math.pow(e,2)},draw:function(){if(this.display){var t=this.ctx;t.beginPath(),t.arc(this.x,this.y,this.radius,0,2*Math.PI),t.closePath(),t.strokeStyle=this.strokeColor,t.lineWidth=this.strokeWidth,t.fillStyle=this.fillColor,t.fill(),t.stroke()}}}),e.Arc=e.Element.extend({inRange:function(t,n){var e=r.getAngleFromPoint(this,{x:t,y:n}),i=e.angle%(2*Math.PI),o=(2*Math.PI+this.startAngle)%(2*Math.PI),a=(2*Math.PI+this.endAngle)%(2*Math.PI)||360,u=o>a?a>=i||i>=o:i>=o&&a>=i,s=e.distance>=this.innerRadius&&e.distance<=this.outerRadius;return u&&s},tooltipPosition:function(){var t=this.startAngle+(this.endAngle-this.startAngle)/2,n=(this.outerRadius-this.innerRadius)/2+this.innerRadius;return{x:this.x+Math.cos(t)*n,y:this.y+Math.sin(t)*n}},draw:function(t){var n=this.ctx;n.beginPath(),n.arc(this.x,this.y,this.outerRadius<0?0:this.outerRadius,this.startAngle,this.endAngle),n.arc(this.x,this.y,this.innerRadius<0?0:this.innerRadius,this.endAngle,this.startAngle,!0),n.closePath(),n.strokeStyle=this.strokeColor,n.lineWidth=this.strokeWidth,n.fillStyle=this.fillColor,n.fill(),n.lineJoin="bevel",this.showStroke&&n.stroke()}}),e.Rectangle=e.Element.extend({draw:function(){var t=this.ctx,n=this.width/2,e=this.x-n,r=this.x+n,i=this.base-(this.base-this.y),o=this.strokeWidth/2;this.showStroke&&(e+=o,r-=o,i+=o),t.beginPath(),t.fillStyle=this.fillColor,t.strokeStyle=this.strokeColor,t.lineWidth=this.strokeWidth,t.moveTo(e,this.base),t.lineTo(e,i),t.lineTo(r,i),t.lineTo(r,this.base),t.fill(),this.showStroke&&t.stroke()},height:function(){return this.base-this.y},inRange:function(t,n){return t>=this.x-this.width/2&&t<=this.x+this.width/2&&n>=this.y&&n<=this.base}}),e.Animation=e.Element.extend({currentStep:null,numSteps:60,easing:"",render:null,onAnimationProgress:null,onAnimationComplete:null}),e.Tooltip=e.Element.extend({draw:function(){var t=this.chart.ctx;t.font=T(this.fontSize,this.fontStyle,this.fontFamily),this.xAlign="center",this.yAlign="above";var n=this.caretPadding=2,e=t.measureText(this.text).width+2*this.xPadding,r=this.fontSize+2*this.yPadding,i=r+this.caretHeight+n;this.x+e/2>this.chart.width?this.xAlign="left":this.x-e/2<0&&(this.xAlign="right"),this.y-i<0&&(this.yAlign="below");var o=this.x-e/2,a=this.y-i;if(t.fillStyle=this.fillColor,this.custom)this.custom(this);else{switch(this.yAlign){case"above":t.beginPath(),t.moveTo(this.x,this.y-n),t.lineTo(this.x+this.caretHeight,this.y-(n+this.caretHeight)),t.lineTo(this.x-this.caretHeight,this.y-(n+this.caretHeight)),t.closePath(),t.fill();break;case"below":a=this.y+n+this.caretHeight,t.beginPath(),t.moveTo(this.x,this.y+n),t.lineTo(this.x+this.caretHeight,this.y+n+this.caretHeight),t.lineTo(this.x-this.caretHeight,this.y+n+this.caretHeight),t.closePath(),t.fill()}switch(this.xAlign){case"left":o=this.x-e+(this.cornerRadius+this.caretHeight);break;case"right":o=this.x-(this.cornerRadius+this.caretHeight)}j(t,o,a,e,r,this.cornerRadius),t.fill(),t.fillStyle=this.textColor,t.textAlign="center",t.textBaseline="middle",t.fillText(this.text,o+e/2,a+r/2)}}}),e.MultiTooltip=e.Element.extend({initialize:function(){this.font=T(this.fontSize,this.fontStyle,this.fontFamily),this.titleFont=T(this.titleFontSize,this.titleFontStyle,this.titleFontFamily),this.titleHeight=this.title?1.5*this.titleFontSize:0,this.height=this.labels.length*this.fontSize+(this.labels.length-1)*(this.fontSize/2)+2*this.yPadding+this.titleHeight,this.ctx.font=this.titleFont;var t=this.ctx.measureText(this.title).width,n=L(this.ctx,this.font,this.labels)+this.fontSize+3,e=v([n,t]);this.width=e+2*this.xPadding;var r=this.height/2;this.y-r<0?this.y=r:this.y+r>this.chart.height&&(this.y=this.chart.height-r),this.x>this.chart.width/2?this.x-=this.xOffset+this.width:this.x+=this.xOffset},getLineHeight:function(t){var n=this.y-this.height/2+this.yPadding,e=t-1;return 0===t?n+this.titleHeight/3:n+(1.5*this.fontSize*e+this.fontSize/2)+this.titleHeight},draw:function(){if(this.custom)this.custom(this);else{j(this.ctx,this.x,this.y-this.height/2,this.width,this.height,this.cornerRadius);var t=this.ctx;t.fillStyle=this.fillColor,t.fill(),t.closePath(),t.textAlign="left",t.textBaseline="middle",t.fillStyle=this.titleTextColor,t.font=this.titleFont,t.fillText(this.title,this.x+this.xPadding,this.getLineHeight(0)),t.font=this.font,r.each(this.labels,function(n,e){t.fillStyle=this.textColor,t.fillText(n,this.x+this.xPadding+this.fontSize+3,this.getLineHeight(e+1)),t.fillStyle=this.legendColorBackground,t.fillRect(this.x+this.xPadding,this.getLineHeight(e+1)-this.fontSize/2,this.fontSize,this.fontSize),t.fillStyle=this.legendColors[e].fill,t.fillRect(this.x+this.xPadding,this.getLineHeight(e+1)-this.fontSize/2,this.fontSize,this.fontSize)},this)}}}),e.Scale=e.Element.extend({initialize:function(){this.fit()},buildYLabels:function(){this.yLabels=[];for(var t=m(this.stepValue),n=0;n<=this.steps;n++)this.yLabels.push(b(this.templateString,{value:(this.min+n*this.stepValue).toFixed(t)}));this.yLabelWidth=this.display&&this.showLabels?L(this.ctx,this.font,this.yLabels)+10:0},addXLabel:function(t){this.xLabels.push(t),this.valuesCount++,this.fit()},removeXLabel:function(){this.xLabels.shift(),this.valuesCount--,this.fit()},fit:function(){this.startPoint=this.display?this.fontSize:0,this.endPoint=this.display?this.height-1.5*this.fontSize-5:this.height,this.startPoint+=this.padding,this.endPoint-=this.padding;var t,n=this.endPoint,e=this.endPoint-this.startPoint;for(this.calculateYRange(e),this.buildYLabels(),this.calculateXLabelRotation();e>this.endPoint-this.startPoint;)e=this.endPoint-this.startPoint,t=this.yLabelWidth,this.calculateYRange(e),this.buildYLabels(),t<this.yLabelWidth&&(this.endPoint=n,this.calculateXLabelRotation())},calculateXLabelRotation:function(){this.ctx.font=this.font;var t,n,e=this.ctx.measureText(this.xLabels[0]).width,r=this.ctx.measureText(this.xLabels[this.xLabels.length-1]).width;if(this.xScalePaddingRight=r/2+3,this.xScalePaddingLeft=e/2>this.yLabelWidth?e/2:this.yLabelWidth,this.xLabelRotation=0,this.display){var i,o=L(this.ctx,this.font,this.xLabels);this.xLabelWidth=o;for(var a=Math.floor(this.calculateX(1)-this.calculateX(0))-6;this.xLabelWidth>a&&0===this.xLabelRotation||this.xLabelWidth>a&&this.xLabelRotation<=90&&this.xLabelRotation>0;)i=Math.cos(y(this.xLabelRotation)),t=i*e,n=i*r,t+this.fontSize/2>this.yLabelWidth&&(this.xScalePaddingLeft=t+this.fontSize/2),this.xScalePaddingRight=this.fontSize/2,this.xLabelRotation++,this.xLabelWidth=i*o;this.xLabelRotation>0&&(this.endPoint-=Math.sin(y(this.xLabelRotation))*o+3)}else this.xLabelWidth=0,this.xScalePaddingRight=this.padding,this.xScalePaddingLeft=this.padding},calculateYRange:c,drawingArea:function(){return this.startPoint-this.endPoint},calculateY:function(t){var n=this.drawingArea()/(this.min-this.max);return this.endPoint-n*(t-this.min)},calculateX:function(t){var n=(this.xLabelRotation>0,this.width-(this.xScalePaddingLeft+this.xScalePaddingRight)),e=n/Math.max(this.valuesCount-(this.offsetGridLines?0:1),1),r=e*t+this.xScalePaddingLeft;return this.offsetGridLines&&(r+=e/2),Math.round(r)},update:function(t){r.extend(this,t),this.fit()},draw:function(){var t=this.ctx,n=(this.endPoint-this.startPoint)/this.steps,e=Math.round(this.xScalePaddingLeft);this.display&&(t.fillStyle=this.textColor,t.font=this.font,i(this.yLabels,function(i,o){var a=this.endPoint-n*o,u=Math.round(a),s=this.showHorizontalLines;t.textAlign="right",t.textBaseline="middle",this.showLabels&&t.fillText(i,e-10,a),0!==o||s||(s=!0),s&&t.beginPath(),o>0?(t.lineWidth=this.gridLineWidth,t.strokeStyle=this.gridLineColor):(t.lineWidth=this.lineWidth,t.strokeStyle=this.lineColor),u+=r.aliasPixel(t.lineWidth),s&&(t.moveTo(e,u),t.lineTo(this.width,u),t.stroke(),t.closePath()),t.lineWidth=this.lineWidth,t.strokeStyle=this.lineColor,t.beginPath(),t.moveTo(e-5,u),t.lineTo(e,u),t.stroke(),t.closePath()},this),i(this.xLabels,function(n,e){var r=this.calculateX(e)+$(this.lineWidth),i=this.calculateX(e-(this.offsetGridLines?.5:0))+$(this.lineWidth),o=this.xLabelRotation>0,a=this.showVerticalLines;0!==e||a||(a=!0),a&&t.beginPath(),e>0?(t.lineWidth=this.gridLineWidth,t.strokeStyle=this.gridLineColor):(t.lineWidth=this.lineWidth,t.strokeStyle=this.lineColor),a&&(t.moveTo(i,this.endPoint),t.lineTo(i,this.startPoint-3),t.stroke(),t.closePath()),t.lineWidth=this.lineWidth,t.strokeStyle=this.lineColor,t.beginPath(),t.moveTo(i,this.endPoint),t.lineTo(i,this.endPoint+5),t.stroke(),t.closePath(),t.save(),t.translate(r,o?this.endPoint+12:this.endPoint+8),t.rotate(-1*y(this.xLabelRotation)),t.font=this.font,t.textAlign=o?"right":"center",t.textBaseline=o?"middle":"top",t.fillText(n,0,0),t.restore()},this))}}),e.RadialScale=e.Element.extend({initialize:function(){this.size=g([this.height,this.width]),this.drawingArea=this.display?this.size/2-(this.fontSize/2+this.backdropPaddingY):this.size/2},calculateCenterOffset:function(t){var n=this.drawingArea/(this.max-this.min);return(t-this.min)*n},update:function(){this.lineArc?this.drawingArea=this.display?this.size/2-(this.fontSize/2+this.backdropPaddingY):this.size/2:this.setScaleSize(),this.buildYLabels()},buildYLabels:function(){this.yLabels=[];for(var t=m(this.stepValue),n=0;n<=this.steps;n++)this.yLabels.push(b(this.templateString,{value:(this.min+n*this.stepValue).toFixed(t)}))},getCircumference:function(){return 2*Math.PI/this.valuesCount},setScaleSize:function(){var t,n,e,r,i,o,a,u,s,l,c,f,h=g([this.height/2-this.pointLabelFontSize-5,this.width/2]),p=this.width,v=0;for(this.ctx.font=T(this.pointLabelFontSize,this.pointLabelFontStyle,this.pointLabelFontFamily),n=0;n<this.valuesCount;n++)t=this.getPointPosition(n,h),e=this.ctx.measureText(b(this.templateString,{value:this.labels[n]})).width+5,0===n||n===this.valuesCount/2?(r=e/2,t.x+r>p&&(p=t.x+r,i=n),t.x-r<v&&(v=t.x-r,a=n)):n<this.valuesCount/2?t.x+e>p&&(p=t.x+e,i=n):n>this.valuesCount/2&&t.x-e<v&&(v=t.x-e,a=n);s=v,l=Math.ceil(p-this.width),o=this.getIndexAngle(i),u=this.getIndexAngle(a),c=l/Math.sin(o+Math.PI/2),f=s/Math.sin(u+Math.PI/2),c=d(c)?c:0,f=d(f)?f:0,this.drawingArea=h-(f+c)/2,this.setCenterPoint(f,c)},setCenterPoint:function(t,n){var e=this.width-n-this.drawingArea,r=t+this.drawingArea;this.xCenter=(r+e)/2,this.yCenter=this.height/2},getIndexAngle:function(t){var n=2*Math.PI/this.valuesCount;return t*n-Math.PI/2},getPointPosition:function(t,n){var e=this.getIndexAngle(t);return{x:Math.cos(e)*n+this.xCenter,y:Math.sin(e)*n+this.yCenter}},draw:function(){if(this.display){var t=this.ctx;if(i(this.yLabels,function(n,e){if(e>0){var r,i=e*(this.drawingArea/this.steps),o=this.yCenter-i;if(this.lineWidth>0)if(t.strokeStyle=this.lineColor,t.lineWidth=this.lineWidth,this.lineArc)t.beginPath(),t.arc(this.xCenter,this.yCenter,i,0,2*Math.PI),t.closePath(),t.stroke();else{t.beginPath();for(var a=0;a<this.valuesCount;a++)r=this.getPointPosition(a,this.calculateCenterOffset(this.min+e*this.stepValue)),0===a?t.moveTo(r.x,r.y):t.lineTo(r.x,r.y);t.closePath(),t.stroke()}if(this.showLabels){if(t.font=T(this.fontSize,this.fontStyle,this.fontFamily),this.showLabelBackdrop){var u=t.measureText(n).width;t.fillStyle=this.backdropColor,t.fillRect(this.xCenter-u/2-this.backdropPaddingX,o-this.fontSize/2-this.backdropPaddingY,u+2*this.backdropPaddingX,this.fontSize+2*this.backdropPaddingY)}t.textAlign="center",t.textBaseline="middle",t.fillStyle=this.fontColor,t.fillText(n,this.xCenter,o)}}},this),!this.lineArc){t.lineWidth=this.angleLineWidth,t.strokeStyle=this.angleLineColor;for(var n=this.valuesCount-1;n>=0;n--){var e=null,r=null;if(this.angleLineWidth>0&&n%this.angleLineInterval===0&&(e=this.calculateCenterOffset(this.max),r=this.getPointPosition(n,e),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(r.x,r.y),t.stroke(),t.closePath()),this.backgroundColors&&this.backgroundColors.length==this.valuesCount){null==e&&(e=this.calculateCenterOffset(this.max)),null==r&&(r=this.getPointPosition(n,e));var o=this.getPointPosition(0===n?this.valuesCount-1:n-1,e),a=this.getPointPosition(n===this.valuesCount-1?0:n+1,e),u={x:(o.x+r.x)/2,y:(o.y+r.y)/2},s={x:(r.x+a.x)/2,y:(r.y+a.y)/2};t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(u.x,u.y),t.lineTo(r.x,r.y),t.lineTo(s.x,s.y),t.fillStyle=this.backgroundColors[n],t.fill(),t.closePath()}var l=this.getPointPosition(n,this.calculateCenterOffset(this.max)+5);t.font=T(this.pointLabelFontSize,this.pointLabelFontStyle,this.pointLabelFontFamily),t.fillStyle=this.pointLabelFontColor;var c=this.labels.length,f=this.labels.length/2,h=f/2,p=h>n||n>c-h,d=n===h||n===c-h;0===n?t.textAlign="center":n===f?t.textAlign="center":f>n?t.textAlign="left":t.textAlign="right",d?t.textBaseline="middle":p?t.textBaseline="bottom":t.textBaseline="top",t.fillText(this.labels[n],l.x,l.y)}}}}}),e.animationService={frameDuration:17,animations:[],dropFrames:0,addAnimation:function(t,n){for(var e=0;e<this.animations.length;++e)if(this.animations[e].chartInstance===t)return void(this.animations[e].animationObject=n);this.animations.push({chartInstance:t,animationObject:n}),1==this.animations.length&&r.requestAnimFrame.call(window,this.digestWrapper)},cancelAnimation:function(t){var n=r.findNextWhere(this.animations,function(n){return n.chartInstance===t});n&&this.animations.splice(n,1)},digestWrapper:function(){e.animationService.startDigest.call(e.animationService)},startDigest:function(){var t=Date.now(),n=0;this.dropFrames>1&&(n=Math.floor(this.dropFrames),this.dropFrames-=n);for(var e=0;e<this.animations.length;e++)null===this.animations[e].animationObject.currentStep&&(this.animations[e].animationObject.currentStep=0),this.animations[e].animationObject.currentStep+=1+n,this.animations[e].animationObject.currentStep>this.animations[e].animationObject.numSteps&&(this.animations[e].animationObject.currentStep=this.animations[e].animationObject.numSteps),this.animations[e].animationObject.render(this.animations[e].chartInstance,this.animations[e].animationObject),this.animations[e].animationObject.currentStep==this.animations[e].animationObject.numSteps&&(this.animations[e].animationObject.onAnimationComplete.call(this.animations[e].chartInstance),this.animations.splice(e,1),e--);var i=Date.now(),o=i-t-this.frameDuration,a=o/this.frameDuration;a>1&&(this.dropFrames+=a),this.animations.length>0&&r.requestAnimFrame.call(window,this.digestWrapper)}},r.addEvent(window,"resize",function(){var t;return function(){clearTimeout(t),t=setTimeout(function(){i(e.instances,function(t){t.options.responsive&&t.resize(t.render,!0)})},50)}}()),p?define("Chart",[],function(){return e}):"object"==typeof module&&module.exports&&(module.exports=e),t.Chart=e,e.noConflict=function(){return t.Chart=n,e}}.call(this),function(){"use strict";var t=this,n=t.Chart,e=n.helpers,r={scaleBeginAtZero:!0,scaleShowGridLines:!0,scaleGridLineColor:"rgba(0,0,0,.05)",scaleGridLineWidth:1,scaleShowHorizontalLines:!0,scaleShowVerticalLines:!0,barShowStroke:!0,barStrokeWidth:2,barValueSpacing:5,barDatasetSpacing:1,legendTemplate:'<ul class="<%=name.toLowerCase()%>-legend"><% for (var i=0; i<datasets.length; i++){%><li><span class="<%=name.toLowerCase()%>-legend-icon" style="background-color:<%=datasets[i].fillColor%>"></span><span class="<%=name.toLowerCase()%>-legend-text"><%if(datasets[i].label){%><%=datasets[i].label%><%}%></span></li><%}%></ul>'};n.Type.extend({name:"Bar",defaults:r,initialize:function(t){var r=this.options;this.ScaleClass=n.Scale.extend({offsetGridLines:!0,calculateBarX:function(t,n,e){var i=this.calculateBaseWidth(),o=this.calculateX(e)-i/2,a=this.calculateBarWidth(t);return o+a*n+n*r.barDatasetSpacing+a/2},calculateBaseWidth:function(){return this.calculateX(1)-this.calculateX(0)-2*r.barValueSpacing},calculateBarWidth:function(t){var n=this.calculateBaseWidth()-(t-1)*r.barDatasetSpacing;return n/t}}),this.datasets=[],this.options.showTooltips&&e.bindEvents(this,this.options.tooltipEvents,function(t){var n="mouseout"!==t.type?this.getBarsAtEvent(t):[];this.eachBars(function(t){t.restore(["fillColor","strokeColor"])}),e.each(n,function(t){t&&(t.fillColor=t.highlightFill,t.strokeColor=t.highlightStroke)}),this.showTooltip(n)}),this.BarClass=n.Rectangle.extend({strokeWidth:this.options.barStrokeWidth,showStroke:this.options.barShowStroke,ctx:this.chart.ctx}),e.each(t.datasets,function(n,r){var i={label:n.label||null,fillColor:n.fillColor,strokeColor:n.strokeColor,bars:[]};this.datasets.push(i),e.each(n.data,function(e,r){i.bars.push(new this.BarClass({value:e,label:t.labels[r],datasetLabel:n.label,strokeColor:"object"==typeof n.strokeColor?n.strokeColor[r]:n.strokeColor,fillColor:"object"==typeof n.fillColor?n.fillColor[r]:n.fillColor,highlightFill:n.highlightFill?"object"==typeof n.highlightFill?n.highlightFill[r]:n.highlightFill:"object"==typeof n.fillColor?n.fillColor[r]:n.fillColor,highlightStroke:n.highlightStroke?"object"==typeof n.highlightStroke?n.highlightStroke[r]:n.highlightStroke:"object"==typeof n.strokeColor?n.strokeColor[r]:n.strokeColor}))},this)},this),this.buildScale(t.labels),this.BarClass.prototype.base=this.scale.endPoint,this.eachBars(function(t,n,r){e.extend(t,{width:this.scale.calculateBarWidth(this.datasets.length),x:this.scale.calculateBarX(this.datasets.length,r,n),y:this.scale.endPoint}),t.save()},this),this.render()},update:function(){this.scale.update(),e.each(this.activeElements,function(t){t.restore(["fillColor","strokeColor"])}),this.eachBars(function(t){t.save()}),this.render()},eachBars:function(t){e.each(this.datasets,function(n,r){e.each(n.bars,t,this,r)},this)},getBarsAtEvent:function(t){for(var n,r=[],i=e.getRelativePosition(t),o=function(t){r.push(t.bars[n])},a=0;a<this.datasets.length;a++)for(n=0;n<this.datasets[a].bars.length;n++)if(this.datasets[a].bars[n].inRange(i.x,i.y))return e.each(this.datasets,o),r;return r},buildScale:function(t){var n=this,r=function(){var t=[];return n.eachBars(function(n){t.push(n.value)}),t},i={templateString:this.options.scaleLabel,height:this.chart.height,width:this.chart.width,ctx:this.chart.ctx,textColor:this.options.scaleFontColor,fontSize:this.options.scaleFontSize,fontStyle:this.options.scaleFontStyle,fontFamily:this.options.scaleFontFamily,valuesCount:t.length,beginAtZero:this.options.scaleBeginAtZero,integersOnly:this.options.scaleIntegersOnly,calculateYRange:function(t){var n=e.calculateScaleRange(r(),t,this.fontSize,this.beginAtZero,this.integersOnly);e.extend(this,n)},xLabels:t,font:e.fontString(this.options.scaleFontSize,this.options.scaleFontStyle,this.options.scaleFontFamily),lineWidth:this.options.scaleLineWidth,lineColor:this.options.scaleLineColor,showHorizontalLines:this.options.scaleShowHorizontalLines,showVerticalLines:this.options.scaleShowVerticalLines,gridLineWidth:this.options.scaleShowGridLines?this.options.scaleGridLineWidth:0,gridLineColor:this.options.scaleShowGridLines?this.options.scaleGridLineColor:"rgba(0,0,0,0)",padding:this.options.showScale?0:this.options.barShowStroke?this.options.barStrokeWidth:0,showLabels:this.options.scaleShowLabels,display:this.options.showScale};this.options.scaleOverride&&e.extend(i,{calculateYRange:e.noop,steps:this.options.scaleSteps,stepValue:this.options.scaleStepWidth,min:this.options.scaleStartValue,max:this.options.scaleStartValue+this.options.scaleSteps*this.options.scaleStepWidth}),this.scale=new this.ScaleClass(i)},addData:function(t,n){e.each(t,function(t,e){this.datasets[e].bars.push(new this.BarClass({value:t,label:n,datasetLabel:this.datasets[e].label,x:this.scale.calculateBarX(this.datasets.length,e,this.scale.valuesCount+1),y:this.scale.endPoint,width:this.scale.calculateBarWidth(this.datasets.length),base:this.scale.endPoint,strokeColor:this.datasets[e].strokeColor,fillColor:this.datasets[e].fillColor}))},this),this.scale.addXLabel(n),this.update()},removeData:function(){this.scale.removeXLabel(),e.each(this.datasets,function(t){t.bars.shift()},this),this.update()},reflow:function(){e.extend(this.BarClass.prototype,{y:this.scale.endPoint,base:this.scale.endPoint});var t=e.extend({height:this.chart.height,width:this.chart.width});this.scale.update(t)},draw:function(t){var n=t||1;this.clear();this.chart.ctx;this.scale.draw(n),e.each(this.datasets,function(t,r){e.each(t.bars,function(t,e){t.hasValue()&&(t.base=this.scale.endPoint,t.transition({x:this.scale.calculateBarX(this.datasets.length,r,e),y:this.scale.calculateY(t.value),
+width:this.scale.calculateBarWidth(this.datasets.length)},n).draw())},this)},this)}})}.call(this),function(){"use strict";var t=this,n=t.Chart,e=n.helpers,r={segmentShowStroke:!0,segmentStrokeColor:"#fff",segmentStrokeWidth:2,percentageInnerCutout:50,animationSteps:100,animationEasing:"easeOutBounce",animateRotate:!0,animateScale:!1,legendTemplate:'<ul class="<%=name.toLowerCase()%>-legend"><% for (var i=0; i<segments.length; i++){%><li><span class="<%=name.toLowerCase()%>-legend-icon" style="background-color:<%=segments[i].fillColor%>"></span><span class="<%=name.toLowerCase()%>-legend-text"><%if(segments[i].label){%><%=segments[i].label%><%}%></span></li><%}%></ul>'};n.Type.extend({name:"Doughnut",defaults:r,initialize:function(t){this.segments=[],this.outerRadius=(e.min([this.chart.width,this.chart.height])-this.options.segmentStrokeWidth/2)/2,this.SegmentArc=n.Arc.extend({ctx:this.chart.ctx,x:this.chart.width/2,y:this.chart.height/2}),this.options.showTooltips&&e.bindEvents(this,this.options.tooltipEvents,function(t){var n="mouseout"!==t.type?this.getSegmentsAtEvent(t):[];e.each(this.segments,function(t){t.restore(["fillColor"])}),e.each(n,function(t){t.fillColor=t.highlightColor}),this.showTooltip(n)}),this.calculateTotal(t),e.each(t,function(n,e){n.color||(n.color="hsl("+360*e/t.length+", 100%, 50%)"),this.addData(n,e,!0)},this),this.render()},getSegmentsAtEvent:function(t){var n=[],r=e.getRelativePosition(t);return e.each(this.segments,function(t){t.inRange(r.x,r.y)&&n.push(t)},this),n},addData:function(t,e,r){var i=void 0!==e?e:this.segments.length;"undefined"==typeof t.color&&(t.color=n.defaults.global.segmentColorDefault[i%n.defaults.global.segmentColorDefault.length],t.highlight=n.defaults.global.segmentHighlightColorDefaults[i%n.defaults.global.segmentHighlightColorDefaults.length]),this.segments.splice(i,0,new this.SegmentArc({value:t.value,outerRadius:this.options.animateScale?0:this.outerRadius,innerRadius:this.options.animateScale?0:this.outerRadius/100*this.options.percentageInnerCutout,fillColor:t.color,highlightColor:t.highlight||t.color,showStroke:this.options.segmentShowStroke,strokeWidth:this.options.segmentStrokeWidth,strokeColor:this.options.segmentStrokeColor,startAngle:1.5*Math.PI,circumference:this.options.animateRotate?0:this.calculateCircumference(t.value),label:t.label})),r||(this.reflow(),this.update())},calculateCircumference:function(t){return this.total>0?2*Math.PI*(t/this.total):0},calculateTotal:function(t){this.total=0,e.each(t,function(t){this.total+=Math.abs(t.value)},this)},update:function(){this.calculateTotal(this.segments),e.each(this.activeElements,function(t){t.restore(["fillColor"])}),e.each(this.segments,function(t){t.save()}),this.render()},removeData:function(t){var n=e.isNumber(t)?t:this.segments.length-1;this.segments.splice(n,1),this.reflow(),this.update()},reflow:function(){e.extend(this.SegmentArc.prototype,{x:this.chart.width/2,y:this.chart.height/2}),this.outerRadius=(e.min([this.chart.width,this.chart.height])-this.options.segmentStrokeWidth/2)/2,e.each(this.segments,function(t){t.update({outerRadius:this.outerRadius,innerRadius:this.outerRadius/100*this.options.percentageInnerCutout})},this)},draw:function(t){var n=t?t:1;this.clear(),e.each(this.segments,function(t,e){t.transition({circumference:this.calculateCircumference(t.value),outerRadius:this.outerRadius,innerRadius:this.outerRadius/100*this.options.percentageInnerCutout},n),t.endAngle=t.startAngle+t.circumference,t.draw(),0===e&&(t.startAngle=1.5*Math.PI),e<this.segments.length-1&&(this.segments[e+1].startAngle=t.endAngle)},this)}}),n.types.Doughnut.extend({name:"Pie",defaults:e.merge(r,{percentageInnerCutout:0})})}.call(this),function(){"use strict";var t=this,n=t.Chart,e=n.helpers,r={scaleShowGridLines:!0,scaleGridLineColor:"rgba(0,0,0,.05)",scaleGridLineWidth:1,scaleShowHorizontalLines:!0,scaleShowVerticalLines:!0,bezierCurve:!0,bezierCurveTension:.4,pointDot:!0,pointDotRadius:4,pointDotStrokeWidth:1,pointHitDetectionRadius:20,datasetStroke:!0,datasetStrokeWidth:2,datasetFill:!0,legendTemplate:'<ul class="<%=name.toLowerCase()%>-legend"><% for (var i=0; i<datasets.length; i++){%><li><span class="<%=name.toLowerCase()%>-legend-icon" style="background-color:<%=datasets[i].strokeColor%>"></span><span class="<%=name.toLowerCase()%>-legend-text"><%if(datasets[i].label){%><%=datasets[i].label%><%}%></span></li><%}%></ul>',offsetGridLines:!1};n.Type.extend({name:"Line",defaults:r,initialize:function(t){this.PointClass=n.Point.extend({offsetGridLines:this.options.offsetGridLines,strokeWidth:this.options.pointDotStrokeWidth,radius:this.options.pointDotRadius,display:this.options.pointDot,hitDetectionRadius:this.options.pointHitDetectionRadius,ctx:this.chart.ctx,inRange:function(t){return Math.pow(t-this.x,2)<Math.pow(this.radius+this.hitDetectionRadius,2)}}),this.datasets=[],this.options.showTooltips&&e.bindEvents(this,this.options.tooltipEvents,function(t){var n="mouseout"!==t.type?this.getPointsAtEvent(t):[];this.eachPoints(function(t){t.restore(["fillColor","strokeColor"])}),e.each(n,function(t){t.fillColor=t.highlightFill,t.strokeColor=t.highlightStroke}),this.showTooltip(n)}),e.each(t.datasets,function(n){var r={label:n.label||null,fillColor:n.fillColor,strokeColor:n.strokeColor,pointColor:n.pointColor,pointStrokeColor:n.pointStrokeColor,points:[]};this.datasets.push(r),e.each(n.data,function(e,i){r.points.push(new this.PointClass({value:e,label:t.labels[i],datasetLabel:n.label,strokeColor:n.pointStrokeColor,fillColor:n.pointColor,highlightFill:n.pointHighlightFill||n.pointColor,highlightStroke:n.pointHighlightStroke||n.pointStrokeColor}))},this),this.buildScale(t.labels),this.eachPoints(function(t,n){e.extend(t,{x:this.scale.calculateX(n),y:this.scale.endPoint}),t.save()},this)},this),this.render()},update:function(){this.scale.update(),e.each(this.activeElements,function(t){t.restore(["fillColor","strokeColor"])}),this.eachPoints(function(t){t.save()}),this.render()},eachPoints:function(t){e.each(this.datasets,function(n){e.each(n.points,t,this)},this)},getPointsAtEvent:function(t){var n=[],r=e.getRelativePosition(t);return e.each(this.datasets,function(t){e.each(t.points,function(t){t.inRange(r.x,r.y)&&n.push(t)})},this),n},buildScale:function(t){var r=this,i=function(){var t=[];return r.eachPoints(function(n){t.push(n.value)}),t},o={templateString:this.options.scaleLabel,height:this.chart.height,width:this.chart.width,ctx:this.chart.ctx,textColor:this.options.scaleFontColor,offsetGridLines:this.options.offsetGridLines,fontSize:this.options.scaleFontSize,fontStyle:this.options.scaleFontStyle,fontFamily:this.options.scaleFontFamily,valuesCount:t.length,beginAtZero:this.options.scaleBeginAtZero,integersOnly:this.options.scaleIntegersOnly,calculateYRange:function(t){var n=e.calculateScaleRange(i(),t,this.fontSize,this.beginAtZero,this.integersOnly);e.extend(this,n)},xLabels:t,font:e.fontString(this.options.scaleFontSize,this.options.scaleFontStyle,this.options.scaleFontFamily),lineWidth:this.options.scaleLineWidth,lineColor:this.options.scaleLineColor,showHorizontalLines:this.options.scaleShowHorizontalLines,showVerticalLines:this.options.scaleShowVerticalLines,gridLineWidth:this.options.scaleShowGridLines?this.options.scaleGridLineWidth:0,gridLineColor:this.options.scaleShowGridLines?this.options.scaleGridLineColor:"rgba(0,0,0,0)",padding:this.options.showScale?0:this.options.pointDotRadius+this.options.pointDotStrokeWidth,showLabels:this.options.scaleShowLabels,display:this.options.showScale};this.options.scaleOverride&&e.extend(o,{calculateYRange:e.noop,steps:this.options.scaleSteps,stepValue:this.options.scaleStepWidth,min:this.options.scaleStartValue,max:this.options.scaleStartValue+this.options.scaleSteps*this.options.scaleStepWidth}),this.scale=new n.Scale(o)},addData:function(t,n){e.each(t,function(t,e){this.datasets[e].points.push(new this.PointClass({value:t,label:n,datasetLabel:this.datasets[e].label,x:this.scale.calculateX(this.scale.valuesCount+1),y:this.scale.endPoint,strokeColor:this.datasets[e].pointStrokeColor,fillColor:this.datasets[e].pointColor}))},this),this.scale.addXLabel(n),this.update()},removeData:function(){this.scale.removeXLabel(),e.each(this.datasets,function(t){t.points.shift()},this),this.update()},reflow:function(){var t=e.extend({height:this.chart.height,width:this.chart.width});this.scale.update(t)},draw:function(t){var n=t||1;this.clear();var r=this.chart.ctx,i=function(t){return null!==t.value},o=function(t,n,r){return e.findNextWhere(n,i,r)||t},a=function(t,n,r){return e.findPreviousWhere(n,i,r)||t};this.scale&&(this.scale.draw(n),e.each(this.datasets,function(t){var u=e.where(t.points,i);e.each(t.points,function(t,e){t.hasValue()&&t.transition({y:this.scale.calculateY(t.value),x:this.scale.calculateX(e)},n)},this),this.options.bezierCurve&&e.each(u,function(t,n){var r=n>0&&n<u.length-1?this.options.bezierCurveTension:0;t.controlPoints=e.splineCurve(a(t,u,n),t,o(t,u,n),r),t.controlPoints.outer.y>this.scale.endPoint?t.controlPoints.outer.y=this.scale.endPoint:t.controlPoints.outer.y<this.scale.startPoint&&(t.controlPoints.outer.y=this.scale.startPoint),t.controlPoints.inner.y>this.scale.endPoint?t.controlPoints.inner.y=this.scale.endPoint:t.controlPoints.inner.y<this.scale.startPoint&&(t.controlPoints.inner.y=this.scale.startPoint)},this),r.lineWidth=this.options.datasetStrokeWidth,r.strokeStyle=t.strokeColor,r.beginPath(),e.each(u,function(t,n){if(0===n)r.moveTo(t.x,t.y);else if(this.options.bezierCurve){var e=a(t,u,n);r.bezierCurveTo(e.controlPoints.outer.x,e.controlPoints.outer.y,t.controlPoints.inner.x,t.controlPoints.inner.y,t.x,t.y)}else r.lineTo(t.x,t.y)},this),this.options.datasetStroke&&r.stroke(),this.options.datasetFill&&u.length>0&&(r.lineTo(u[u.length-1].x,this.scale.endPoint),r.lineTo(u[0].x,this.scale.endPoint),r.fillStyle=t.fillColor,r.closePath(),r.fill()),e.each(u,function(t){t.draw()})},this))}})}.call(this),function(){"use strict";var t=this,n=t.Chart,e=n.helpers,r={scaleShowLabelBackdrop:!0,scaleBackdropColor:"rgba(255,255,255,0.75)",scaleBeginAtZero:!0,scaleBackdropPaddingY:2,scaleBackdropPaddingX:2,scaleShowLine:!0,segmentShowStroke:!0,segmentStrokeColor:"#fff",segmentStrokeWidth:2,animationSteps:100,animationEasing:"easeOutBounce",animateRotate:!0,animateScale:!1,legendTemplate:'<ul class="<%=name.toLowerCase()%>-legend"><% for (var i=0; i<segments.length; i++){%><li><span class="<%=name.toLowerCase()%>-legend-icon" style="background-color:<%=segments[i].fillColor%>"></span><span class="<%=name.toLowerCase()%>-legend-text"><%if(segments[i].label){%><%=segments[i].label%><%}%></span></li><%}%></ul>'};n.Type.extend({name:"PolarArea",defaults:r,initialize:function(t){this.segments=[],this.SegmentArc=n.Arc.extend({showStroke:this.options.segmentShowStroke,strokeWidth:this.options.segmentStrokeWidth,strokeColor:this.options.segmentStrokeColor,ctx:this.chart.ctx,innerRadius:0,x:this.chart.width/2,y:this.chart.height/2}),this.scale=new n.RadialScale({display:this.options.showScale,fontStyle:this.options.scaleFontStyle,fontSize:this.options.scaleFontSize,fontFamily:this.options.scaleFontFamily,fontColor:this.options.scaleFontColor,showLabels:this.options.scaleShowLabels,showLabelBackdrop:this.options.scaleShowLabelBackdrop,backdropColor:this.options.scaleBackdropColor,backdropPaddingY:this.options.scaleBackdropPaddingY,backdropPaddingX:this.options.scaleBackdropPaddingX,lineWidth:this.options.scaleShowLine?this.options.scaleLineWidth:0,lineColor:this.options.scaleLineColor,lineArc:!0,width:this.chart.width,height:this.chart.height,xCenter:this.chart.width/2,yCenter:this.chart.height/2,ctx:this.chart.ctx,templateString:this.options.scaleLabel,valuesCount:t.length}),this.updateScaleRange(t),this.scale.update(),e.each(t,function(t,n){this.addData(t,n,!0)},this),this.options.showTooltips&&e.bindEvents(this,this.options.tooltipEvents,function(t){var n="mouseout"!==t.type?this.getSegmentsAtEvent(t):[];e.each(this.segments,function(t){t.restore(["fillColor"])}),e.each(n,function(t){t.fillColor=t.highlightColor}),this.showTooltip(n)}),this.render()},getSegmentsAtEvent:function(t){var n=[],r=e.getRelativePosition(t);return e.each(this.segments,function(t){t.inRange(r.x,r.y)&&n.push(t)},this),n},addData:function(t,n,e){var r=n||this.segments.length;this.segments.splice(r,0,new this.SegmentArc({fillColor:t.color,highlightColor:t.highlight||t.color,label:t.label,value:t.value,outerRadius:this.options.animateScale?0:this.scale.calculateCenterOffset(t.value),circumference:this.options.animateRotate?0:this.scale.getCircumference(),startAngle:1.5*Math.PI})),e||(this.reflow(),this.update())},removeData:function(t){var n=e.isNumber(t)?t:this.segments.length-1;this.segments.splice(n,1),this.reflow(),this.update()},calculateTotal:function(t){this.total=0,e.each(t,function(t){this.total+=t.value},this),this.scale.valuesCount=this.segments.length},updateScaleRange:function(t){var n=[];e.each(t,function(t){n.push(t.value)});var r=this.options.scaleOverride?{steps:this.options.scaleSteps,stepValue:this.options.scaleStepWidth,min:this.options.scaleStartValue,max:this.options.scaleStartValue+this.options.scaleSteps*this.options.scaleStepWidth}:e.calculateScaleRange(n,e.min([this.chart.width,this.chart.height])/2,this.options.scaleFontSize,this.options.scaleBeginAtZero,this.options.scaleIntegersOnly);e.extend(this.scale,r,{size:e.min([this.chart.width,this.chart.height]),xCenter:this.chart.width/2,yCenter:this.chart.height/2})},update:function(){this.calculateTotal(this.segments),e.each(this.segments,function(t){t.save()}),this.reflow(),this.render()},reflow:function(){e.extend(this.SegmentArc.prototype,{x:this.chart.width/2,y:this.chart.height/2}),this.updateScaleRange(this.segments),this.scale.update(),e.extend(this.scale,{xCenter:this.chart.width/2,yCenter:this.chart.height/2}),e.each(this.segments,function(t){t.update({outerRadius:this.scale.calculateCenterOffset(t.value)})},this)},draw:function(t){var n=t||1;this.clear(),e.each(this.segments,function(t,e){t.transition({circumference:this.scale.getCircumference(),outerRadius:this.scale.calculateCenterOffset(t.value)},n),t.endAngle=t.startAngle+t.circumference,0===e&&(t.startAngle=1.5*Math.PI),e<this.segments.length-1&&(this.segments[e+1].startAngle=t.endAngle),t.draw()},this),this.scale.draw()}})}.call(this),function(){"use strict";var t=this,n=t.Chart,e=n.helpers;n.Type.extend({name:"Radar",defaults:{scaleShowLine:!0,angleShowLineOut:!0,scaleShowLabels:!1,scaleBeginAtZero:!0,angleLineColor:"rgba(0,0,0,.1)",angleLineWidth:1,angleLineInterval:1,pointLabelFontFamily:"'Arial'",pointLabelFontStyle:"normal",pointLabelFontSize:10,pointLabelFontColor:"#666",pointDot:!0,pointDotRadius:3,pointDotStrokeWidth:1,pointHitDetectionRadius:20,datasetStroke:!0,datasetStrokeWidth:2,datasetFill:!0,legendTemplate:'<ul class="<%=name.toLowerCase()%>-legend"><% for (var i=0; i<datasets.length; i++){%><li><span class="<%=name.toLowerCase()%>-legend-icon" style="background-color:<%=datasets[i].strokeColor%>"></span><span class="<%=name.toLowerCase()%>-legend-text"><%if(datasets[i].label){%><%=datasets[i].label%><%}%></span></li><%}%></ul>'},initialize:function(t){this.PointClass=n.Point.extend({strokeWidth:this.options.pointDotStrokeWidth,radius:this.options.pointDotRadius,display:this.options.pointDot,hitDetectionRadius:this.options.pointHitDetectionRadius,ctx:this.chart.ctx}),this.datasets=[],this.buildScale(t),this.options.showTooltips&&e.bindEvents(this,this.options.tooltipEvents,function(t){var n="mouseout"!==t.type?this.getPointsAtEvent(t):[];this.eachPoints(function(t){t.restore(["fillColor","strokeColor"])}),e.each(n,function(t){t.fillColor=t.highlightFill,t.strokeColor=t.highlightStroke}),this.showTooltip(n)}),e.each(t.datasets,function(n){var r={label:n.label||null,fillColor:n.fillColor,strokeColor:n.strokeColor,pointColor:n.pointColor,pointStrokeColor:n.pointStrokeColor,points:[]};this.datasets.push(r),e.each(n.data,function(e,i){var o;this.scale.animation||(o=this.scale.getPointPosition(i,this.scale.calculateCenterOffset(e))),r.points.push(new this.PointClass({value:e,label:t.labels[i],datasetLabel:n.label,x:this.options.animation?this.scale.xCenter:o.x,y:this.options.animation?this.scale.yCenter:o.y,strokeColor:n.pointStrokeColor,fillColor:n.pointColor,highlightFill:n.pointHighlightFill||n.pointColor,highlightStroke:n.pointHighlightStroke||n.pointStrokeColor}))},this)},this),this.render()},eachPoints:function(t){e.each(this.datasets,function(n){e.each(n.points,t,this)},this)},getPointsAtEvent:function(t){var n=e.getRelativePosition(t),r=e.getAngleFromPoint({x:this.scale.xCenter,y:this.scale.yCenter},n),i=2*Math.PI/this.scale.valuesCount,o=Math.round((r.angle-1.5*Math.PI)/i),a=[];return(o>=this.scale.valuesCount||0>o)&&(o=0),r.distance<=this.scale.drawingArea&&e.each(this.datasets,function(t){a.push(t.points[o])}),a},buildScale:function(t){this.scale=new n.RadialScale({display:this.options.showScale,fontStyle:this.options.scaleFontStyle,fontSize:this.options.scaleFontSize,fontFamily:this.options.scaleFontFamily,fontColor:this.options.scaleFontColor,showLabels:this.options.scaleShowLabels,showLabelBackdrop:this.options.scaleShowLabelBackdrop,backdropColor:this.options.scaleBackdropColor,backgroundColors:this.options.scaleBackgroundColors,backdropPaddingY:this.options.scaleBackdropPaddingY,backdropPaddingX:this.options.scaleBackdropPaddingX,lineWidth:this.options.scaleShowLine?this.options.scaleLineWidth:0,lineColor:this.options.scaleLineColor,angleLineColor:this.options.angleLineColor,angleLineWidth:this.options.angleShowLineOut?this.options.angleLineWidth:0,angleLineInterval:this.options.angleLineInterval?this.options.angleLineInterval:1,pointLabelFontColor:this.options.pointLabelFontColor,pointLabelFontSize:this.options.pointLabelFontSize,pointLabelFontFamily:this.options.pointLabelFontFamily,pointLabelFontStyle:this.options.pointLabelFontStyle,height:this.chart.height,width:this.chart.width,xCenter:this.chart.width/2,yCenter:this.chart.height/2,ctx:this.chart.ctx,templateString:this.options.scaleLabel,labels:t.labels,valuesCount:t.datasets[0].data.length}),this.scale.setScaleSize(),this.updateScaleRange(t.datasets),this.scale.buildYLabels()},updateScaleRange:function(t){var n=function(){var n=[];return e.each(t,function(t){t.data?n=n.concat(t.data):e.each(t.points,function(t){n.push(t.value)})}),n}(),r=this.options.scaleOverride?{steps:this.options.scaleSteps,stepValue:this.options.scaleStepWidth,min:this.options.scaleStartValue,max:this.options.scaleStartValue+this.options.scaleSteps*this.options.scaleStepWidth}:e.calculateScaleRange(n,e.min([this.chart.width,this.chart.height])/2,this.options.scaleFontSize,this.options.scaleBeginAtZero,this.options.scaleIntegersOnly);e.extend(this.scale,r)},addData:function(t,n){this.scale.valuesCount++,e.each(t,function(t,e){var r=this.scale.getPointPosition(this.scale.valuesCount,this.scale.calculateCenterOffset(t));this.datasets[e].points.push(new this.PointClass({value:t,label:n,datasetLabel:this.datasets[e].label,x:r.x,y:r.y,strokeColor:this.datasets[e].pointStrokeColor,fillColor:this.datasets[e].pointColor}))},this),this.scale.labels.push(n),this.reflow(),this.update()},removeData:function(){this.scale.valuesCount--,this.scale.labels.shift(),e.each(this.datasets,function(t){t.points.shift()},this),this.reflow(),this.update()},update:function(){this.eachPoints(function(t){t.save()}),this.reflow(),this.render()},reflow:function(){e.extend(this.scale,{width:this.chart.width,height:this.chart.height,size:e.min([this.chart.width,this.chart.height]),xCenter:this.chart.width/2,yCenter:this.chart.height/2}),this.updateScaleRange(this.datasets),this.scale.setScaleSize(),this.scale.buildYLabels()},draw:function(t){var n=t||1,r=this.chart.ctx;this.clear(),this.scale.draw(),e.each(this.datasets,function(t){e.each(t.points,function(t,e){t.hasValue()&&t.transition(this.scale.getPointPosition(e,this.scale.calculateCenterOffset(t.value)),n)},this),r.lineWidth=this.options.datasetStrokeWidth,r.strokeStyle=t.strokeColor,r.beginPath(),e.each(t.points,function(t,n){0===n?r.moveTo(t.x,t.y):r.lineTo(t.x,t.y)},this),r.closePath(),r.stroke(),r.fillStyle=t.fillColor,this.options.datasetFill&&r.fill(),e.each(t.points,function(t){t.hasValue()&&t.draw()})},this)}})}.call(this),function(t){"use strict";"object"==typeof exports?module.exports=t("undefined"!=typeof angular?angular:require("angular"),"undefined"!=typeof Chart?Chart:require("chart.js")):"function"==typeof define&&define.amd?define(["angular","chart"],t):t(angular,Chart)}(function(t,n){"use strict";function e(){var e={},r={Chart:n,getOptions:function(n){var r=n&&e[n]||{};return t.extend({},e,r)}};this.setOptions=function(n,r){return r?void(e[n]=t.extend(e[n]||{},r)):(r=n,void(e=t.extend(e,r)))},this.$get=function(){return r}}function r(e,r){function o(t,n){return t&&n&&t.length&&n.length?Array.isArray(t[0])?t.length===n.length&&t.every(function(t,e){return t.length===n[e].length}):n.reduce(a,0)>0?t.length===n.length:!1:!1}function a(t,n){return t+n}function u(n,e,r,i){var o=null;return function(a){var u=e.getPointsAtEvent||e.getBarsAtEvent||e.getSegmentsAtEvent;if(u){var s=u.call(e,a);i!==!1&&t.equals(o,s)!==!1||(o=s,n[r](s,a),n.$apply())}}}function s(r,i){for(var o=!1,a=t.copy(i.colours||e.getOptions(r).colours||n.defaults.global.colours);a.length<i.data.length;)a.push(i.getColour()),o=!0;return o&&(i.colours=a),a.map(l)}function l(t){return"object"==typeof t&&null!==t?t:"string"==typeof t&&"#"===t[0]?f(d(t.substr(1))):c()}function c(){var t=[h(0,255),h(0,255),h(0,255)];return f(t)}function f(t){return{fillColor:p(t,.2),strokeColor:p(t,1),pointColor:p(t,1),pointStrokeColor:"#fff",pointHighlightFill:"#fff",pointHighlightStroke:p(t,.8)}}function h(t,n){return Math.floor(Math.random()*(n-t+1))+t}function p(t,n){return i?"rgb("+t.join(",")+")":"rgba("+t.concat(n).join(",")+")"}function d(t){var n=parseInt(t,16),e=n>>16&255,r=n>>8&255,i=255&n;return[e,r,i]}function v(n,e,r,i){return{labels:n,datasets:e.map(function(n,e){return t.extend({},i[e],{label:r[e],data:n})})}}function g(n,e,r){return n.map(function(n,i){return t.extend({},r[i],{label:n,value:e[i],color:r[i].strokeColor,highlight:r[i].pointHighlightStroke})})}function m(t,n){var e=t.parent(),r=e.find("chart-legend"),i="<chart-legend>"+n.generateLegend()+"</chart-legend>";r.length?r.replaceWith(i):e.append(i)}function y(t,n,e,r){Array.isArray(e.data[0])?t.datasets.forEach(function(t,e){(t.points||t.bars).forEach(function(t,r){t.value=n[e][r]})}):t.segments.forEach(function(t,e){t.value=n[e]}),t.update(),e.$emit("update",t),e.legend&&"false"!==e.legend&&m(r,t)}function $(t){return!t||Array.isArray(t)&&!t.length||"object"==typeof t&&!Object.keys(t).length}function x(r,i){var o=t.extend({},n.defaults.global,e.getOptions(r),i.options);return o.responsive}function b(t,n){t&&(t.destroy(),n.$emit("destroy",t))}return function(n){return{restrict:"CA",scope:{data:"=?",labels:"=?",options:"=?",series:"=?",colours:"=?",getColour:"=?",chartType:"=",legend:"@",click:"=?",hover:"=?",chartData:"=?",chartLabels:"=?",chartOptions:"=?",chartSeries:"=?",chartColours:"=?",chartLegend:"@",chartClick:"=?",chartHover:"=?"},link:function(a,l){function f(t,n){a.$watch(t,function(t){"undefined"!=typeof t&&(a[n]=t)})}function h(e,r){if(!$(e)&&!t.equals(e,r)){var i=n||a.chartType;i&&p(i)}}function p(n){if(x(n,a)&&0===l[0].clientHeight&&0===C.clientHeight)return r(function(){p(n)},50,!1);if(a.data&&a.data.length){a.getColour="function"==typeof a.getColour?a.getColour:c;var i=s(n,a),o=l[0],f=o.getContext("2d"),h=Array.isArray(a.data[0])?v(a.labels,a.data,a.series||[],i):g(a.labels,a.data,i),d=t.extend({},e.getOptions(n),a.options);b(w,a),w=new e.Chart(f)[n](h,d),a.$emit("create",w),o.onclick=a.click?u(a,w,"click",!1):t.noop,o.onmousemove=a.hover?u(a,w,"hover",!0):t.noop,a.legend&&"false"!==a.legend&&m(l,w)}}function d(t){if("undefined"!=typeof console&&"test"!==e.getOptions().env){var n="function"==typeof console.warn?console.warn:console.log;a[t]&&n.call(console,'"%s" is deprecated and will be removed in a future version. Please use "chart-%s" instead.',t,t)}}var w,C=document.createElement("div");C.className="chart-container",l.replaceWith(C),C.appendChild(l[0]),i&&window.G_vmlCanvasManager.initElement(l[0]),["data","labels","options","series","colours","legend","click","hover"].forEach(d),f("chartData","data"),f("chartLabels","labels"),f("chartOptions","options"),f("chartSeries","series"),f("chartColours","colours"),f("chartLegend","legend"),f("chartClick","click"),f("chartHover","hover"),a.$watch("data",function(t,e){if(!t||!t.length||Array.isArray(t[0])&&!t[0].length)return void b(w,a);var r=n||a.chartType;if(r)return w&&o(t,e)?y(w,t,a,l):void p(r)},!0),a.$watch("series",h,!0),a.$watch("labels",h,!0),a.$watch("options",h,!0),a.$watch("colours",h,!0),a.$watch("chartType",function(n,e){$(n)||t.equals(n,e)||p(n)}),a.$on("$destroy",function(){b(w,a)})}}}}n.defaults.global.responsive=!0,n.defaults.global.multiTooltipTemplate="<%if (datasetLabel){%><%=datasetLabel%>: <%}%><%= value %>",n.defaults.global.colours=["#97BBCD","#DCDCDC","#F7464A","#46BFBD","#FDB45C","#949FB1","#4D5360"];var i="object"==typeof window.G_vmlCanvasManager&&null!==window.G_vmlCanvasManager&&"function"==typeof window.G_vmlCanvasManager.initElement;return i&&(n.defaults.global.animation=!1),t.module("chart.js",[]).provider("ChartJs",e).factory("ChartJsFactory",["ChartJs","$timeout",r]).directive("chartBase",["ChartJsFactory",function(t){return new t}]).directive("chartLine",["ChartJsFactory",function(t){return new t("Line")}]).directive("chartBar",["ChartJsFactory",function(t){return new t("Bar")}]).directive("chartRadar",["ChartJsFactory",function(t){return new t("Radar")}]).directive("chartDoughnut",["ChartJsFactory",function(t){return new t("Doughnut")}]).directive("chartPie",["ChartJsFactory",function(t){return new t("Pie")}]).directive("chartPolarArea",["ChartJsFactory",function(t){return new t("PolarArea")}])}),!function(){function t(t){return t&&(t.ownerDocument||t.document||t).documentElement}function n(t){return t&&(t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView)}function e(t,n){return n>t?-1:t>n?1:t>=n?0:NaN}function r(t){return null===t?NaN:+t}function i(t){return!isNaN(t)}function o(t){return{left:function(n,e,r,i){for(arguments.length<3&&(r=0),arguments.length<4&&(i=n.length);i>r;){var o=r+i>>>1;t(n[o],e)<0?r=o+1:i=o}return r},right:function(n,e,r,i){for(arguments.length<3&&(r=0),arguments.length<4&&(i=n.length);i>r;){var o=r+i>>>1;t(n[o],e)>0?i=o:r=o+1}return r}}}function a(t){return t.length}function u(t){for(var n=1;t*n%1;)n*=10;return n}function s(t,n){for(var e in n)Object.defineProperty(t.prototype,e,{value:n[e],enumerable:!1})}function l(){this._=Object.create(null)}function c(t){return(t+="")===ba||t[0]===wa?wa+t:t}function f(t){return(t+="")[0]===wa?t.slice(1):t}function h(t){return c(t)in this._}function p(t){return(t=c(t))in this._&&delete this._[t]}function d(){var t=[];for(var n in this._)t.push(f(n));return t}function v(){var t=0;for(var n in this._)++t;return t}function g(){for(var t in this._)return!1;return!0}function m(){this._=Object.create(null)}function y(t){return t}function $(t,n,e){return function(){var r=e.apply(n,arguments);return r===n?t:r}}function x(t,n){if(n in t)return n;n=n.charAt(0).toUpperCase()+n.slice(1);for(var e=0,r=Ca.length;r>e;++e){var i=Ca[e]+n;if(i in t)return i}}function b(){}function w(){}function C(t){function n(){for(var n,r=e,i=-1,o=r.length;++i<o;)(n=r[i].on)&&n.apply(this,arguments);return t}var e=[],r=new l;return n.on=function(n,i){var o,a=r.get(n);return arguments.length<2?a&&a.on:(a&&(a.on=null,e=e.slice(0,o=e.indexOf(a)).concat(e.slice(o+1)),r.remove(n)),i&&e.push(r.set(n,{on:i})),t)},n}function S(){sa.event.preventDefault()}function _(){for(var t,n=sa.event;t=n.sourceEvent;)n=t;return n}function M(t){for(var n=new w,e=0,r=arguments.length;++e<r;)n[arguments[e]]=C(n);return n.of=function(e,r){return function(i){try{var o=i.sourceEvent=sa.event;i.target=t,sa.event=i,n[i.type].apply(e,r)}finally{sa.event=o}}},n}function k(t){return _a(t,Ea),t}function A(t){return"function"==typeof t?t:function(){return Ma(t,this)}}function E(t){return"function"==typeof t?t:function(){return ka(t,this)}}function P(t,n){function e(){this.removeAttribute(t)}function r(){this.removeAttributeNS(t.space,t.local)}function i(){this.setAttribute(t,n)}function o(){this.setAttributeNS(t.space,t.local,n)}function a(){var e=n.apply(this,arguments);null==e?this.removeAttribute(t):this.setAttribute(t,e)}function u(){var e=n.apply(this,arguments);null==e?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,e)}return t=sa.ns.qualify(t),null==n?t.local?r:e:"function"==typeof n?t.local?u:a:t.local?o:i}function O(t){return t.trim().replace(/\s+/g," ")}function T(t){return new RegExp("(?:^|\\s+)"+sa.requote(t)+"(?:\\s+|$)","g")}function L(t){return(t+"").trim().split(/^|\s+/)}function j(t,n){function e(){for(var e=-1;++e<i;)t[e](this,n)}function r(){for(var e=-1,r=n.apply(this,arguments);++e<i;)t[e](this,r)}t=L(t).map(N);var i=t.length;return"function"==typeof n?r:e}function N(t){var n=T(t);return function(e,r){if(i=e.classList)return r?i.add(t):i.remove(t);var i=e.getAttribute("class")||"";r?(n.lastIndex=0,n.test(i)||e.setAttribute("class",O(i+" "+t))):e.setAttribute("class",O(i.replace(n," ")))}}function R(t,n,e){function r(){this.style.removeProperty(t)}function i(){this.style.setProperty(t,n,e)}function o(){var r=n.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,e)}return null==n?r:"function"==typeof n?o:i}function D(t,n){function e(){delete this[t]}function r(){this[t]=n}function i(){var e=n.apply(this,arguments);null==e?delete this[t]:this[t]=e}return null==n?e:"function"==typeof n?i:r}function F(t){function n(){var n=this.ownerDocument,e=this.namespaceURI;return e===Pa&&n.documentElement.namespaceURI===Pa?n.createElement(t):n.createElementNS(e,t)}function e(){return this.ownerDocument.createElementNS(t.space,t.local)}return"function"==typeof t?t:(t=sa.ns.qualify(t)).local?e:n}function I(){var t=this.parentNode;t&&t.removeChild(this)}function z(t){return{__data__:t}}function q(t){return function(){return Aa(this,t)}}function V(t){return arguments.length||(t=e),function(n,e){return n&&e?t(n.__data__,e.__data__):!n-!e}}function B(t,n){for(var e=0,r=t.length;r>e;e++)for(var i,o=t[e],a=0,u=o.length;u>a;a++)(i=o[a])&&n(i,a,e);return t}function W(t){return _a(t,Ta),t}function U(t){var n,e;return function(r,i,o){var a,u=t[o].update,s=u.length;for(o!=e&&(e=o,n=0),i>=n&&(n=i+1);!(a=u[n])&&++n<s;);return a}}function H(t,n,e){function r(){var n=this[a];n&&(this.removeEventListener(t,n,n.$),delete this[a])}function i(){var i=s(n,ca(arguments));r.call(this),this.addEventListener(t,this[a]=i,i.$=e),i._=n}function o(){var n,e=new RegExp("^__on([^.]+)"+sa.requote(t)+"$");for(var r in this)if(n=r.match(e)){var i=this[r];this.removeEventListener(n[1],i,i.$),delete this[r]}}var a="__on"+t,u=t.indexOf("."),s=Y;u>0&&(t=t.slice(0,u));var l=La.get(t);return l&&(t=l,s=G),u?n?i:r:n?b:o}function Y(t,n){return function(e){var r=sa.event;sa.event=e,n[0]=this.__data__;try{t.apply(this,n)}finally{sa.event=r}}}function G(t,n){var e=Y(t,n);return function(t){var n=this,r=t.relatedTarget;r&&(r===n||8&r.compareDocumentPosition(n))||e.call(n,t)}}function X(e){var r=".dragsuppress-"+ ++Na,i="click"+r,o=sa.select(n(e)).on("touchmove"+r,S).on("dragstart"+r,S).on("selectstart"+r,S);if(null==ja&&(ja="onselectstart"in e?!1:x(e.style,"userSelect")),ja){var a=t(e).style,u=a[ja];a[ja]="none"}return function(t){if(o.on(r,null),ja&&(a[ja]=u),t){var n=function(){o.on(i,null)};o.on(i,function(){S(),n()},!0),setTimeout(n,0)}}}function Z(t,e){e.changedTouches&&(e=e.changedTouches[0]);var r=t.ownerSVGElement||t;if(r.createSVGPoint){var i=r.createSVGPoint();if(0>Ra){
+var o=n(t);if(o.scrollX||o.scrollY){r=sa.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var a=r[0][0].getScreenCTM();Ra=!(a.f||a.e),r.remove()}}return Ra?(i.x=e.pageX,i.y=e.pageY):(i.x=e.clientX,i.y=e.clientY),i=i.matrixTransform(t.getScreenCTM().inverse()),[i.x,i.y]}var u=t.getBoundingClientRect();return[e.clientX-u.left-t.clientLeft,e.clientY-u.top-t.clientTop]}function J(){return sa.event.changedTouches[0].identifier}function K(t){return t>0?1:0>t?-1:0}function Q(t,n,e){return(n[0]-t[0])*(e[1]-t[1])-(n[1]-t[1])*(e[0]-t[0])}function tt(t){return t>1?0:-1>t?Ia:Math.acos(t)}function nt(t){return t>1?Va:-1>t?-Va:Math.asin(t)}function et(t){return((t=Math.exp(t))-1/t)/2}function rt(t){return((t=Math.exp(t))+1/t)/2}function it(t){return((t=Math.exp(2*t))-1)/(t+1)}function ot(t){return(t=Math.sin(t/2))*t}function at(){}function ut(t,n,e){return this instanceof ut?(this.h=+t,this.s=+n,void(this.l=+e)):arguments.length<2?t instanceof ut?new ut(t.h,t.s,t.l):bt(""+t,wt,ut):new ut(t,n,e)}function st(t,n,e){function r(t){return t>360?t-=360:0>t&&(t+=360),60>t?o+(a-o)*t/60:180>t?a:240>t?o+(a-o)*(240-t)/60:o}function i(t){return Math.round(255*r(t))}var o,a;return t=isNaN(t)?0:(t%=360)<0?t+360:t,n=isNaN(n)?0:0>n?0:n>1?1:n,e=0>e?0:e>1?1:e,a=.5>=e?e*(1+n):e+n-e*n,o=2*e-a,new mt(i(t+120),i(t),i(t-120))}function lt(t,n,e){return this instanceof lt?(this.h=+t,this.c=+n,void(this.l=+e)):arguments.length<2?t instanceof lt?new lt(t.h,t.c,t.l):t instanceof ft?pt(t.l,t.a,t.b):pt((t=Ct((t=sa.rgb(t)).r,t.g,t.b)).l,t.a,t.b):new lt(t,n,e)}function ct(t,n,e){return isNaN(t)&&(t=0),isNaN(n)&&(n=0),new ft(e,Math.cos(t*=Ba)*n,Math.sin(t)*n)}function ft(t,n,e){return this instanceof ft?(this.l=+t,this.a=+n,void(this.b=+e)):arguments.length<2?t instanceof ft?new ft(t.l,t.a,t.b):t instanceof lt?ct(t.h,t.c,t.l):Ct((t=mt(t)).r,t.g,t.b):new ft(t,n,e)}function ht(t,n,e){var r=(t+16)/116,i=r+n/500,o=r-e/200;return i=dt(i)*tu,r=dt(r)*nu,o=dt(o)*eu,new mt(gt(3.2404542*i-1.5371385*r-.4985314*o),gt(-.969266*i+1.8760108*r+.041556*o),gt(.0556434*i-.2040259*r+1.0572252*o))}function pt(t,n,e){return t>0?new lt(Math.atan2(e,n)*Wa,Math.sqrt(n*n+e*e),t):new lt(NaN,NaN,t)}function dt(t){return t>.206893034?t*t*t:(t-4/29)/7.787037}function vt(t){return t>.008856?Math.pow(t,1/3):7.787037*t+4/29}function gt(t){return Math.round(255*(.00304>=t?12.92*t:1.055*Math.pow(t,1/2.4)-.055))}function mt(t,n,e){return this instanceof mt?(this.r=~~t,this.g=~~n,void(this.b=~~e)):arguments.length<2?t instanceof mt?new mt(t.r,t.g,t.b):bt(""+t,mt,st):new mt(t,n,e)}function yt(t){return new mt(t>>16,t>>8&255,255&t)}function $t(t){return yt(t)+""}function xt(t){return 16>t?"0"+Math.max(0,t).toString(16):Math.min(255,t).toString(16)}function bt(t,n,e){var r,i,o,a=0,u=0,s=0;if(r=/([a-z]+)\((.*)\)/.exec(t=t.toLowerCase()))switch(i=r[2].split(","),r[1]){case"hsl":return e(parseFloat(i[0]),parseFloat(i[1])/100,parseFloat(i[2])/100);case"rgb":return n(_t(i[0]),_t(i[1]),_t(i[2]))}return(o=ou.get(t))?n(o.r,o.g,o.b):(null==t||"#"!==t.charAt(0)||isNaN(o=parseInt(t.slice(1),16))||(4===t.length?(a=(3840&o)>>4,a=a>>4|a,u=240&o,u=u>>4|u,s=15&o,s=s<<4|s):7===t.length&&(a=(16711680&o)>>16,u=(65280&o)>>8,s=255&o)),n(a,u,s))}function wt(t,n,e){var r,i,o=Math.min(t/=255,n/=255,e/=255),a=Math.max(t,n,e),u=a-o,s=(a+o)/2;return u?(i=.5>s?u/(a+o):u/(2-a-o),r=t==a?(n-e)/u+(e>n?6:0):n==a?(e-t)/u+2:(t-n)/u+4,r*=60):(r=NaN,i=s>0&&1>s?0:r),new ut(r,i,s)}function Ct(t,n,e){t=St(t),n=St(n),e=St(e);var r=vt((.4124564*t+.3575761*n+.1804375*e)/tu),i=vt((.2126729*t+.7151522*n+.072175*e)/nu),o=vt((.0193339*t+.119192*n+.9503041*e)/eu);return ft(116*i-16,500*(r-i),200*(i-o))}function St(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function _t(t){var n=parseFloat(t);return"%"===t.charAt(t.length-1)?Math.round(2.55*n):n}function Mt(t){return"function"==typeof t?t:function(){return t}}function kt(t){return function(n,e,r){return 2===arguments.length&&"function"==typeof e&&(r=e,e=null),At(n,e,t,r)}}function At(t,n,e,r){function i(){var t,n=s.status;if(!n&&Pt(s)||n>=200&&300>n||304===n){try{t=e.call(o,s)}catch(r){return void a.error.call(o,r)}a.load.call(o,t)}else a.error.call(o,s)}var o={},a=sa.dispatch("beforesend","progress","load","error"),u={},s=new XMLHttpRequest,l=null;return!this.XDomainRequest||"withCredentials"in s||!/^(http(s)?:)?\/\//.test(t)||(s=new XDomainRequest),"onload"in s?s.onload=s.onerror=i:s.onreadystatechange=function(){s.readyState>3&&i()},s.onprogress=function(t){var n=sa.event;sa.event=t;try{a.progress.call(o,s)}finally{sa.event=n}},o.header=function(t,n){return t=(t+"").toLowerCase(),arguments.length<2?u[t]:(null==n?delete u[t]:u[t]=n+"",o)},o.mimeType=function(t){return arguments.length?(n=null==t?null:t+"",o):n},o.responseType=function(t){return arguments.length?(l=t,o):l},o.response=function(t){return e=t,o},["get","post"].forEach(function(t){o[t]=function(){return o.send.apply(o,[t].concat(ca(arguments)))}}),o.send=function(e,r,i){if(2===arguments.length&&"function"==typeof r&&(i=r,r=null),s.open(e,t,!0),null==n||"accept"in u||(u.accept=n+",*/*"),s.setRequestHeader)for(var c in u)s.setRequestHeader(c,u[c]);return null!=n&&s.overrideMimeType&&s.overrideMimeType(n),null!=l&&(s.responseType=l),null!=i&&o.on("error",i).on("load",function(t){i(null,t)}),a.beforesend.call(o,s),s.send(null==r?null:r),o},o.abort=function(){return s.abort(),o},sa.rebind(o,a,"on"),null==r?o:o.get(Et(r))}function Et(t){return 1===t.length?function(n,e){t(null==n?e:null)}:t}function Pt(t){var n=t.responseType;return n&&"text"!==n?t.response:t.responseText}function Ot(t,n,e){var r=arguments.length;2>r&&(n=0),3>r&&(e=Date.now());var i=e+n,o={c:t,t:i,n:null};return uu?uu.n=o:au=o,uu=o,su||(lu=clearTimeout(lu),su=1,cu(Tt)),o}function Tt(){var t=Lt(),n=jt()-t;n>24?(isFinite(n)&&(clearTimeout(lu),lu=setTimeout(Tt,n)),su=0):(su=1,cu(Tt))}function Lt(){for(var t=Date.now(),n=au;n;)t>=n.t&&n.c(t-n.t)&&(n.c=null),n=n.n;return t}function jt(){for(var t,n=au,e=1/0;n;)n.c?(n.t<e&&(e=n.t),n=(t=n).n):n=t?t.n=n.n:au=n.n;return uu=t,e}function Nt(t,n){return n-(t?Math.ceil(Math.log(t)/Math.LN10):1)}function Rt(t,n){var e=Math.pow(10,3*xa(8-n));return{scale:n>8?function(t){return t/e}:function(t){return t*e},symbol:t}}function Dt(t){var n=t.decimal,e=t.thousands,r=t.grouping,i=t.currency,o=r&&e?function(t,n){for(var i=t.length,o=[],a=0,u=r[0],s=0;i>0&&u>0&&(s+u+1>n&&(u=Math.max(1,n-s)),o.push(t.substring(i-=u,i+u)),!((s+=u+1)>n));)u=r[a=(a+1)%r.length];return o.reverse().join(e)}:y;return function(t){var e=hu.exec(t),r=e[1]||" ",a=e[2]||">",u=e[3]||"-",s=e[4]||"",l=e[5],c=+e[6],f=e[7],h=e[8],p=e[9],d=1,v="",g="",m=!1,y=!0;switch(h&&(h=+h.substring(1)),(l||"0"===r&&"="===a)&&(l=r="0",a="="),p){case"n":f=!0,p="g";break;case"%":d=100,g="%",p="f";break;case"p":d=100,g="%",p="r";break;case"b":case"o":case"x":case"X":"#"===s&&(v="0"+p.toLowerCase());case"c":y=!1;case"d":m=!0,h=0;break;case"s":d=-1,p="r"}"$"===s&&(v=i[0],g=i[1]),"r"!=p||h||(p="g"),null!=h&&("g"==p?h=Math.max(1,Math.min(21,h)):"e"!=p&&"f"!=p||(h=Math.max(0,Math.min(20,h)))),p=pu.get(p)||Ft;var $=l&&f;return function(t){var e=g;if(m&&t%1)return"";var i=0>t||0===t&&0>1/t?(t=-t,"-"):"-"===u?"":u;if(0>d){var s=sa.formatPrefix(t,h);t=s.scale(t),e=s.symbol+g}else t*=d;t=p(t,h);var x,b,w=t.lastIndexOf(".");if(0>w){var C=y?t.lastIndexOf("e"):-1;0>C?(x=t,b=""):(x=t.substring(0,C),b=t.substring(C))}else x=t.substring(0,w),b=n+t.substring(w+1);!l&&f&&(x=o(x,1/0));var S=v.length+x.length+b.length+($?0:i.length),_=c>S?new Array(S=c-S+1).join(r):"";return $&&(x=o(_+x,_.length?c-b.length:1/0)),i+=v,t=x+b,("<"===a?i+t+_:">"===a?_+i+t:"^"===a?_.substring(0,S>>=1)+i+t+_.substring(S):i+($?t:_+t))+e}}}function Ft(t){return t+""}function It(){this._=new Date(arguments.length>1?Date.UTC.apply(this,arguments):arguments[0])}function zt(t,n,e){function r(n){var e=t(n),r=o(e,1);return r-n>n-e?e:r}function i(e){return n(e=t(new vu(e-1)),1),e}function o(t,e){return n(t=new vu(+t),e),t}function a(t,r,o){var a=i(t),u=[];if(o>1)for(;r>a;)e(a)%o||u.push(new Date(+a)),n(a,1);else for(;r>a;)u.push(new Date(+a)),n(a,1);return u}function u(t,n,e){try{vu=It;var r=new It;return r._=t,a(r,n,e)}finally{vu=Date}}t.floor=t,t.round=r,t.ceil=i,t.offset=o,t.range=a;var s=t.utc=qt(t);return s.floor=s,s.round=qt(r),s.ceil=qt(i),s.offset=qt(o),s.range=u,t}function qt(t){return function(n,e){try{vu=It;var r=new It;return r._=n,t(r,e)._}finally{vu=Date}}}function Vt(t){function n(t){function n(n){for(var e,i,o,a=[],u=-1,s=0;++u<r;)37===t.charCodeAt(u)&&(a.push(t.slice(s,u)),null!=(i=mu[e=t.charAt(++u)])&&(e=t.charAt(++u)),(o=A[e])&&(e=o(n,null==i?"e"===e?" ":"0":i)),a.push(e),s=u+1);return a.push(t.slice(s,u)),a.join("")}var r=t.length;return n.parse=function(n){var r={y:1900,m:0,d:1,H:0,M:0,S:0,L:0,Z:null},i=e(r,t,n,0);if(i!=n.length)return null;"p"in r&&(r.H=r.H%12+12*r.p);var o=null!=r.Z&&vu!==It,a=new(o?It:vu);return"j"in r?a.setFullYear(r.y,0,r.j):"W"in r||"U"in r?("w"in r||(r.w="W"in r?1:0),a.setFullYear(r.y,0,1),a.setFullYear(r.y,0,"W"in r?(r.w+6)%7+7*r.W-(a.getDay()+5)%7:r.w+7*r.U-(a.getDay()+6)%7)):a.setFullYear(r.y,r.m,r.d),a.setHours(r.H+(r.Z/100|0),r.M+r.Z%100,r.S,r.L),o?a._:a},n.toString=function(){return t},n}function e(t,n,e,r){for(var i,o,a,u=0,s=n.length,l=e.length;s>u;){if(r>=l)return-1;if(i=n.charCodeAt(u++),37===i){if(a=n.charAt(u++),o=E[a in mu?n.charAt(u++):a],!o||(r=o(t,e,r))<0)return-1}else if(i!=e.charCodeAt(r++))return-1}return r}function r(t,n,e){w.lastIndex=0;var r=w.exec(n.slice(e));return r?(t.w=C.get(r[0].toLowerCase()),e+r[0].length):-1}function i(t,n,e){x.lastIndex=0;var r=x.exec(n.slice(e));return r?(t.w=b.get(r[0].toLowerCase()),e+r[0].length):-1}function o(t,n,e){M.lastIndex=0;var r=M.exec(n.slice(e));return r?(t.m=k.get(r[0].toLowerCase()),e+r[0].length):-1}function a(t,n,e){S.lastIndex=0;var r=S.exec(n.slice(e));return r?(t.m=_.get(r[0].toLowerCase()),e+r[0].length):-1}function u(t,n,r){return e(t,A.c.toString(),n,r)}function s(t,n,r){return e(t,A.x.toString(),n,r)}function l(t,n,r){return e(t,A.X.toString(),n,r)}function c(t,n,e){var r=$.get(n.slice(e,e+=2).toLowerCase());return null==r?-1:(t.p=r,e)}var f=t.dateTime,h=t.date,p=t.time,d=t.periods,v=t.days,g=t.shortDays,m=t.months,y=t.shortMonths;n.utc=function(t){function e(t){try{vu=It;var n=new vu;return n._=t,r(n)}finally{vu=Date}}var r=n(t);return e.parse=function(t){try{vu=It;var n=r.parse(t);return n&&n._}finally{vu=Date}},e.toString=r.toString,e},n.multi=n.utc.multi=ln;var $=sa.map(),x=Wt(v),b=Ut(v),w=Wt(g),C=Ut(g),S=Wt(m),_=Ut(m),M=Wt(y),k=Ut(y);d.forEach(function(t,n){$.set(t.toLowerCase(),n)});var A={a:function(t){return g[t.getDay()]},A:function(t){return v[t.getDay()]},b:function(t){return y[t.getMonth()]},B:function(t){return m[t.getMonth()]},c:n(f),d:function(t,n){return Bt(t.getDate(),n,2)},e:function(t,n){return Bt(t.getDate(),n,2)},H:function(t,n){return Bt(t.getHours(),n,2)},I:function(t,n){return Bt(t.getHours()%12||12,n,2)},j:function(t,n){return Bt(1+du.dayOfYear(t),n,3)},L:function(t,n){return Bt(t.getMilliseconds(),n,3)},m:function(t,n){return Bt(t.getMonth()+1,n,2)},M:function(t,n){return Bt(t.getMinutes(),n,2)},p:function(t){return d[+(t.getHours()>=12)]},S:function(t,n){return Bt(t.getSeconds(),n,2)},U:function(t,n){return Bt(du.sundayOfYear(t),n,2)},w:function(t){return t.getDay()},W:function(t,n){return Bt(du.mondayOfYear(t),n,2)},x:n(h),X:n(p),y:function(t,n){return Bt(t.getFullYear()%100,n,2)},Y:function(t,n){return Bt(t.getFullYear()%1e4,n,4)},Z:un,"%":function(){return"%"}},E={a:r,A:i,b:o,B:a,c:u,d:tn,e:tn,H:en,I:en,j:nn,L:an,m:Qt,M:rn,p:c,S:on,U:Yt,w:Ht,W:Gt,x:s,X:l,y:Zt,Y:Xt,Z:Jt,"%":sn};return n}function Bt(t,n,e){var r=0>t?"-":"",i=(r?-t:t)+"",o=i.length;return r+(e>o?new Array(e-o+1).join(n)+i:i)}function Wt(t){return new RegExp("^(?:"+t.map(sa.requote).join("|")+")","i")}function Ut(t){for(var n=new l,e=-1,r=t.length;++e<r;)n.set(t[e].toLowerCase(),e);return n}function Ht(t,n,e){yu.lastIndex=0;var r=yu.exec(n.slice(e,e+1));return r?(t.w=+r[0],e+r[0].length):-1}function Yt(t,n,e){yu.lastIndex=0;var r=yu.exec(n.slice(e));return r?(t.U=+r[0],e+r[0].length):-1}function Gt(t,n,e){yu.lastIndex=0;var r=yu.exec(n.slice(e));return r?(t.W=+r[0],e+r[0].length):-1}function Xt(t,n,e){yu.lastIndex=0;var r=yu.exec(n.slice(e,e+4));return r?(t.y=+r[0],e+r[0].length):-1}function Zt(t,n,e){yu.lastIndex=0;var r=yu.exec(n.slice(e,e+2));return r?(t.y=Kt(+r[0]),e+r[0].length):-1}function Jt(t,n,e){return/^[+-]\d{4}$/.test(n=n.slice(e,e+5))?(t.Z=-n,e+5):-1}function Kt(t){return t+(t>68?1900:2e3)}function Qt(t,n,e){yu.lastIndex=0;var r=yu.exec(n.slice(e,e+2));return r?(t.m=r[0]-1,e+r[0].length):-1}function tn(t,n,e){yu.lastIndex=0;var r=yu.exec(n.slice(e,e+2));return r?(t.d=+r[0],e+r[0].length):-1}function nn(t,n,e){yu.lastIndex=0;var r=yu.exec(n.slice(e,e+3));return r?(t.j=+r[0],e+r[0].length):-1}function en(t,n,e){yu.lastIndex=0;var r=yu.exec(n.slice(e,e+2));return r?(t.H=+r[0],e+r[0].length):-1}function rn(t,n,e){yu.lastIndex=0;var r=yu.exec(n.slice(e,e+2));return r?(t.M=+r[0],e+r[0].length):-1}function on(t,n,e){yu.lastIndex=0;var r=yu.exec(n.slice(e,e+2));return r?(t.S=+r[0],e+r[0].length):-1}function an(t,n,e){yu.lastIndex=0;var r=yu.exec(n.slice(e,e+3));return r?(t.L=+r[0],e+r[0].length):-1}function un(t){var n=t.getTimezoneOffset(),e=n>0?"-":"+",r=xa(n)/60|0,i=xa(n)%60;return e+Bt(r,"0",2)+Bt(i,"0",2)}function sn(t,n,e){$u.lastIndex=0;var r=$u.exec(n.slice(e,e+1));return r?e+r[0].length:-1}function ln(t){for(var n=t.length,e=-1;++e<n;)t[e][0]=this(t[e][0]);return function(n){for(var e=0,r=t[e];!r[1](n);)r=t[++e];return r[0](n)}}function cn(){}function fn(t,n,e){var r=e.s=t+n,i=r-t,o=r-i;e.t=t-o+(n-i)}function hn(t,n){t&&Cu.hasOwnProperty(t.type)&&Cu[t.type](t,n)}function pn(t,n,e){var r,i=-1,o=t.length-e;for(n.lineStart();++i<o;)r=t[i],n.point(r[0],r[1],r[2]);n.lineEnd()}function dn(t,n){var e=-1,r=t.length;for(n.polygonStart();++e<r;)pn(t[e],n,1);n.polygonEnd()}function vn(){function t(t,n){t*=Ba,n=n*Ba/2+Ia/4;var e=t-r,a=e>=0?1:-1,u=a*e,s=Math.cos(n),l=Math.sin(n),c=o*l,f=i*s+c*Math.cos(u),h=c*a*Math.sin(u);_u.add(Math.atan2(h,f)),r=t,i=s,o=l}var n,e,r,i,o;Mu.point=function(a,u){Mu.point=t,r=(n=a)*Ba,i=Math.cos(u=(e=u)*Ba/2+Ia/4),o=Math.sin(u)},Mu.lineEnd=function(){t(n,e)}}function gn(t){var n=t[0],e=t[1],r=Math.cos(e);return[r*Math.cos(n),r*Math.sin(n),Math.sin(e)]}function mn(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]}function yn(t,n){return[t[1]*n[2]-t[2]*n[1],t[2]*n[0]-t[0]*n[2],t[0]*n[1]-t[1]*n[0]]}function $n(t,n){t[0]+=n[0],t[1]+=n[1],t[2]+=n[2]}function xn(t,n){return[t[0]*n,t[1]*n,t[2]*n]}function bn(t){var n=Math.sqrt(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=n,t[1]/=n,t[2]/=n}function wn(t){return[Math.atan2(t[1],t[0]),nt(t[2])]}function Cn(t,n){return xa(t[0]-n[0])<Da&&xa(t[1]-n[1])<Da}function Sn(t,n){t*=Ba;var e=Math.cos(n*=Ba);_n(e*Math.cos(t),e*Math.sin(t),Math.sin(n))}function _n(t,n,e){++ku,Eu+=(t-Eu)/ku,Pu+=(n-Pu)/ku,Ou+=(e-Ou)/ku}function Mn(){function t(t,i){t*=Ba;var o=Math.cos(i*=Ba),a=o*Math.cos(t),u=o*Math.sin(t),s=Math.sin(i),l=Math.atan2(Math.sqrt((l=e*s-r*u)*l+(l=r*a-n*s)*l+(l=n*u-e*a)*l),n*a+e*u+r*s);Au+=l,Tu+=l*(n+(n=a)),Lu+=l*(e+(e=u)),ju+=l*(r+(r=s)),_n(n,e,r)}var n,e,r;Fu.point=function(i,o){i*=Ba;var a=Math.cos(o*=Ba);n=a*Math.cos(i),e=a*Math.sin(i),r=Math.sin(o),Fu.point=t,_n(n,e,r)}}function kn(){Fu.point=Sn}function An(){function t(t,n){t*=Ba;var e=Math.cos(n*=Ba),a=e*Math.cos(t),u=e*Math.sin(t),s=Math.sin(n),l=i*s-o*u,c=o*a-r*s,f=r*u-i*a,h=Math.sqrt(l*l+c*c+f*f),p=r*a+i*u+o*s,d=h&&-tt(p)/h,v=Math.atan2(h,p);Nu+=d*l,Ru+=d*c,Du+=d*f,Au+=v,Tu+=v*(r+(r=a)),Lu+=v*(i+(i=u)),ju+=v*(o+(o=s)),_n(r,i,o)}var n,e,r,i,o;Fu.point=function(a,u){n=a,e=u,Fu.point=t,a*=Ba;var s=Math.cos(u*=Ba);r=s*Math.cos(a),i=s*Math.sin(a),o=Math.sin(u),_n(r,i,o)},Fu.lineEnd=function(){t(n,e),Fu.lineEnd=kn,Fu.point=Sn}}function En(t,n){function e(e,r){return e=t(e,r),n(e[0],e[1])}return t.invert&&n.invert&&(e.invert=function(e,r){return e=n.invert(e,r),e&&t.invert(e[0],e[1])}),e}function Pn(){return!0}function On(t,n,e,r,i){var o=[],a=[];if(t.forEach(function(t){if(!((n=t.length-1)<=0)){var n,e=t[0],r=t[n];if(Cn(e,r)){i.lineStart();for(var u=0;n>u;++u)i.point((e=t[u])[0],e[1]);return void i.lineEnd()}var s=new Ln(e,t,null,!0),l=new Ln(e,null,s,!1);s.o=l,o.push(s),a.push(l),s=new Ln(r,t,null,!1),l=new Ln(r,null,s,!0),s.o=l,o.push(s),a.push(l)}}),a.sort(n),Tn(o),Tn(a),o.length){for(var u=0,s=e,l=a.length;l>u;++u)a[u].e=s=!s;for(var c,f,h=o[0];;){for(var p=h,d=!0;p.v;)if((p=p.n)===h)return;c=p.z,i.lineStart();do{if(p.v=p.o.v=!0,p.e){if(d)for(var u=0,l=c.length;l>u;++u)i.point((f=c[u])[0],f[1]);else r(p.x,p.n.x,1,i);p=p.n}else{if(d){c=p.p.z;for(var u=c.length-1;u>=0;--u)i.point((f=c[u])[0],f[1])}else r(p.x,p.p.x,-1,i);p=p.p}p=p.o,c=p.z,d=!d}while(!p.v);i.lineEnd()}}}function Tn(t){if(n=t.length){for(var n,e,r=0,i=t[0];++r<n;)i.n=e=t[r],e.p=i,i=e;i.n=e=t[0],e.p=i}}function Ln(t,n,e,r){this.x=t,this.z=n,this.o=e,this.e=r,this.v=!1,this.n=this.p=null}function jn(t,n,e,r){return function(i,o){function a(n,e){var r=i(n,e);t(n=r[0],e=r[1])&&o.point(n,e)}function u(t,n){var e=i(t,n);g.point(e[0],e[1])}function s(){y.point=u,g.lineStart()}function l(){y.point=a,g.lineEnd()}function c(t,n){v.push([t,n]);var e=i(t,n);x.point(e[0],e[1])}function f(){x.lineStart(),v=[]}function h(){c(v[0][0],v[0][1]),x.lineEnd();var t,n=x.clean(),e=$.buffer(),r=e.length;if(v.pop(),d.push(v),v=null,r)if(1&n){t=e[0];var i,r=t.length-1,a=-1;if(r>0){for(b||(o.polygonStart(),b=!0),o.lineStart();++a<r;)o.point((i=t[a])[0],i[1]);o.lineEnd()}}else r>1&&2&n&&e.push(e.pop().concat(e.shift())),p.push(e.filter(Nn))}var p,d,v,g=n(o),m=i.invert(r[0],r[1]),y={point:a,lineStart:s,lineEnd:l,polygonStart:function(){y.point=c,y.lineStart=f,y.lineEnd=h,p=[],d=[]},polygonEnd:function(){y.point=a,y.lineStart=s,y.lineEnd=l,p=sa.merge(p);var t=qn(m,d);p.length?(b||(o.polygonStart(),b=!0),On(p,Dn,t,e,o)):t&&(b||(o.polygonStart(),b=!0),o.lineStart(),e(null,null,1,o),o.lineEnd()),b&&(o.polygonEnd(),b=!1),p=d=null},sphere:function(){o.polygonStart(),o.lineStart(),e(null,null,1,o),o.lineEnd(),o.polygonEnd()}},$=Rn(),x=n($),b=!1;return y}}function Nn(t){return t.length>1}function Rn(){var t,n=[];return{lineStart:function(){n.push(t=[])},point:function(n,e){t.push([n,e])},lineEnd:b,buffer:function(){var e=n;return n=[],t=null,e},rejoin:function(){n.length>1&&n.push(n.pop().concat(n.shift()))}}}function Dn(t,n){return((t=t.x)[0]<0?t[1]-Va-Da:Va-t[1])-((n=n.x)[0]<0?n[1]-Va-Da:Va-n[1])}function Fn(t){var n,e=NaN,r=NaN,i=NaN;return{lineStart:function(){t.lineStart(),n=1},point:function(o,a){var u=o>0?Ia:-Ia,s=xa(o-e);xa(s-Ia)<Da?(t.point(e,r=(r+a)/2>0?Va:-Va),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(u,r),t.point(o,r),n=0):i!==u&&s>=Ia&&(xa(e-i)<Da&&(e-=i*Da),xa(o-u)<Da&&(o-=u*Da),r=In(e,r,o,a),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(u,r),n=0),t.point(e=o,r=a),i=u},lineEnd:function(){t.lineEnd(),e=r=NaN},clean:function(){return 2-n}}}function In(t,n,e,r){var i,o,a=Math.sin(t-e);return xa(a)>Da?Math.atan((Math.sin(n)*(o=Math.cos(r))*Math.sin(e)-Math.sin(r)*(i=Math.cos(n))*Math.sin(t))/(i*o*a)):(n+r)/2}function zn(t,n,e,r){var i;if(null==t)i=e*Va,r.point(-Ia,i),r.point(0,i),r.point(Ia,i),r.point(Ia,0),r.point(Ia,-i),r.point(0,-i),r.point(-Ia,-i),r.point(-Ia,0),r.point(-Ia,i);else if(xa(t[0]-n[0])>Da){var o=t[0]<n[0]?Ia:-Ia;i=e*o/2,r.point(-o,i),r.point(0,i),r.point(o,i)}else r.point(n[0],n[1])}function qn(t,n){var e=t[0],r=t[1],i=[Math.sin(e),-Math.cos(e),0],o=0,a=0;_u.reset();for(var u=0,s=n.length;s>u;++u){var l=n[u],c=l.length;if(c)for(var f=l[0],h=f[0],p=f[1]/2+Ia/4,d=Math.sin(p),v=Math.cos(p),g=1;;){g===c&&(g=0),t=l[g];var m=t[0],y=t[1]/2+Ia/4,$=Math.sin(y),x=Math.cos(y),b=m-h,w=b>=0?1:-1,C=w*b,S=C>Ia,_=d*$;if(_u.add(Math.atan2(_*w*Math.sin(C),v*x+_*Math.cos(C))),o+=S?b+w*za:b,S^h>=e^m>=e){var M=yn(gn(f),gn(t));bn(M);var k=yn(i,M);bn(k);var A=(S^b>=0?-1:1)*nt(k[2]);(r>A||r===A&&(M[0]||M[1]))&&(a+=S^b>=0?1:-1)}if(!g++)break;h=m,d=$,v=x,f=t}}return(-Da>o||Da>o&&-Da>_u)^1&a}function Vn(t){function n(t,n){return Math.cos(t)*Math.cos(n)>o}function e(t){var e,o,s,l,c;return{lineStart:function(){l=s=!1,c=1},point:function(f,h){var p,d=[f,h],v=n(f,h),g=a?v?0:i(f,h):v?i(f+(0>f?Ia:-Ia),h):0;if(!e&&(l=s=v)&&t.lineStart(),v!==s&&(p=r(e,d),(Cn(e,p)||Cn(d,p))&&(d[0]+=Da,d[1]+=Da,v=n(d[0],d[1]))),v!==s)c=0,v?(t.lineStart(),p=r(d,e),t.point(p[0],p[1])):(p=r(e,d),t.point(p[0],p[1]),t.lineEnd()),e=p;else if(u&&e&&a^v){var m;g&o||!(m=r(d,e,!0))||(c=0,a?(t.lineStart(),t.point(m[0][0],m[0][1]),t.point(m[1][0],m[1][1]),t.lineEnd()):(t.point(m[1][0],m[1][1]),t.lineEnd(),t.lineStart(),t.point(m[0][0],m[0][1])))}!v||e&&Cn(e,d)||t.point(d[0],d[1]),e=d,s=v,o=g},lineEnd:function(){s&&t.lineEnd(),e=null},clean:function(){return c|(l&&s)<<1}}}function r(t,n,e){var r=gn(t),i=gn(n),a=[1,0,0],u=yn(r,i),s=mn(u,u),l=u[0],c=s-l*l;if(!c)return!e&&t;var f=o*s/c,h=-o*l/c,p=yn(a,u),d=xn(a,f),v=xn(u,h);$n(d,v);var g=p,m=mn(d,g),y=mn(g,g),$=m*m-y*(mn(d,d)-1);if(!(0>$)){var x=Math.sqrt($),b=xn(g,(-m-x)/y);if($n(b,d),b=wn(b),!e)return b;var w,C=t[0],S=n[0],_=t[1],M=n[1];C>S&&(w=C,C=S,S=w);var k=S-C,A=xa(k-Ia)<Da,E=A||Da>k;if(!A&&_>M&&(w=_,_=M,M=w),E?A?_+M>0^b[1]<(xa(b[0]-C)<Da?_:M):_<=b[1]&&b[1]<=M:k>Ia^(C<=b[0]&&b[0]<=S)){var P=xn(g,(-m+x)/y);return $n(P,d),[b,wn(P)]}}}function i(n,e){var r=a?t:Ia-t,i=0;return-r>n?i|=1:n>r&&(i|=2),-r>e?i|=4:e>r&&(i|=8),i}var o=Math.cos(t),a=o>0,u=xa(o)>Da,s=ve(t,6*Ba);return jn(n,e,s,a?[0,-t]:[-Ia,t-Ia])}function Bn(t,n,e,r){return function(i){var o,a=i.a,u=i.b,s=a.x,l=a.y,c=u.x,f=u.y,h=0,p=1,d=c-s,v=f-l;if(o=t-s,d||!(o>0)){if(o/=d,0>d){if(h>o)return;p>o&&(p=o)}else if(d>0){if(o>p)return;o>h&&(h=o)}if(o=e-s,d||!(0>o)){if(o/=d,0>d){if(o>p)return;o>h&&(h=o)}else if(d>0){if(h>o)return;p>o&&(p=o)}if(o=n-l,v||!(o>0)){if(o/=v,0>v){if(h>o)return;p>o&&(p=o)}else if(v>0){if(o>p)return;o>h&&(h=o)}if(o=r-l,v||!(0>o)){if(o/=v,0>v){if(o>p)return;o>h&&(h=o)}else if(v>0){if(h>o)return;p>o&&(p=o)}return h>0&&(i.a={x:s+h*d,y:l+h*v}),1>p&&(i.b={x:s+p*d,y:l+p*v}),i}}}}}}function Wn(t,n,e,r){function i(r,i){return xa(r[0]-t)<Da?i>0?0:3:xa(r[0]-e)<Da?i>0?2:1:xa(r[1]-n)<Da?i>0?1:0:i>0?3:2}function o(t,n){return a(t.x,n.x)}function a(t,n){var e=i(t,1),r=i(n,1);return e!==r?e-r:0===e?n[1]-t[1]:1===e?t[0]-n[0]:2===e?t[1]-n[1]:n[0]-t[0]}return function(u){function s(t){for(var n=0,e=g.length,r=t[1],i=0;e>i;++i)for(var o,a=1,u=g[i],s=u.length,l=u[0];s>a;++a)o=u[a],l[1]<=r?o[1]>r&&Q(l,o,t)>0&&++n:o[1]<=r&&Q(l,o,t)<0&&--n,l=o;return 0!==n}function l(o,u,s,l){var c=0,f=0;if(null==o||(c=i(o,s))!==(f=i(u,s))||a(o,u)<0^s>0){do l.point(0===c||3===c?t:e,c>1?r:n);while((c=(c+s+4)%4)!==f)}else l.point(u[0],u[1])}function c(i,o){return i>=t&&e>=i&&o>=n&&r>=o}function f(t,n){c(t,n)&&u.point(t,n)}function h(){E.point=d,g&&g.push(m=[]),S=!0,C=!1,b=w=NaN}function p(){v&&(d(y,$),x&&C&&k.rejoin(),v.push(k.buffer())),E.point=f,C&&u.lineEnd()}function d(t,n){t=Math.max(-zu,Math.min(zu,t)),n=Math.max(-zu,Math.min(zu,n));var e=c(t,n);if(g&&m.push([t,n]),S)y=t,$=n,x=e,S=!1,e&&(u.lineStart(),u.point(t,n));else if(e&&C)u.point(t,n);else{var r={a:{x:b,y:w},b:{x:t,y:n}};A(r)?(C||(u.lineStart(),u.point(r.a.x,r.a.y)),u.point(r.b.x,r.b.y),e||u.lineEnd(),_=!1):e&&(u.lineStart(),u.point(t,n),_=!1)}b=t,w=n,C=e}var v,g,m,y,$,x,b,w,C,S,_,M=u,k=Rn(),A=Bn(t,n,e,r),E={point:f,lineStart:h,lineEnd:p,polygonStart:function(){u=k,v=[],g=[],_=!0},polygonEnd:function(){u=M,v=sa.merge(v);var n=s([t,r]),e=_&&n,i=v.length;(e||i)&&(u.polygonStart(),e&&(u.lineStart(),l(null,null,1,u),u.lineEnd()),i&&On(v,o,n,l,u),u.polygonEnd()),v=g=m=null}};return E}}function Un(t){var n=0,e=Ia/3,r=ue(t),i=r(n,e);return i.parallels=function(t){return arguments.length?r(n=t[0]*Ia/180,e=t[1]*Ia/180):[n/Ia*180,e/Ia*180]},i}function Hn(t,n){function e(t,n){var e=Math.sqrt(o-2*i*Math.sin(n))/i;return[e*Math.sin(t*=i),a-e*Math.cos(t)]}var r=Math.sin(t),i=(r+Math.sin(n))/2,o=1+r*(2*i-r),a=Math.sqrt(o)/i;return e.invert=function(t,n){var e=a-n;return[Math.atan2(t,e)/i,nt((o-(t*t+e*e)*i*i)/(2*i))]},e}function Yn(){function t(t,n){Vu+=i*t-r*n,r=t,i=n}var n,e,r,i;Yu.point=function(o,a){Yu.point=t,n=r=o,e=i=a},Yu.lineEnd=function(){t(n,e)}}function Gn(t,n){Bu>t&&(Bu=t),t>Uu&&(Uu=t),Wu>n&&(Wu=n),n>Hu&&(Hu=n)}function Xn(){function t(t,n){a.push("M",t,",",n,o)}function n(t,n){a.push("M",t,",",n),u.point=e}function e(t,n){a.push("L",t,",",n)}function r(){u.point=t}function i(){a.push("Z")}var o=Zn(4.5),a=[],u={point:t,lineStart:function(){u.point=n},lineEnd:r,polygonStart:function(){u.lineEnd=i},polygonEnd:function(){u.lineEnd=r,u.point=t},pointRadius:function(t){return o=Zn(t),u},result:function(){if(a.length){var t=a.join("");return a=[],t}}};return u}function Zn(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}function Jn(t,n){Eu+=t,Pu+=n,++Ou}function Kn(){function t(t,r){var i=t-n,o=r-e,a=Math.sqrt(i*i+o*o);Tu+=a*(n+t)/2,Lu+=a*(e+r)/2,ju+=a,Jn(n=t,e=r)}var n,e;Xu.point=function(r,i){Xu.point=t,Jn(n=r,e=i)}}function Qn(){Xu.point=Jn}function te(){function t(t,n){var e=t-r,o=n-i,a=Math.sqrt(e*e+o*o);Tu+=a*(r+t)/2,Lu+=a*(i+n)/2,ju+=a,a=i*t-r*n,Nu+=a*(r+t),Ru+=a*(i+n),Du+=3*a,Jn(r=t,i=n)}var n,e,r,i;Xu.point=function(o,a){Xu.point=t,Jn(n=r=o,e=i=a)},Xu.lineEnd=function(){t(n,e)}}function ne(t){function n(n,e){t.moveTo(n+a,e),t.arc(n,e,a,0,za)}function e(n,e){t.moveTo(n,e),u.point=r}function r(n,e){t.lineTo(n,e)}function i(){u.point=n}function o(){t.closePath()}var a=4.5,u={point:n,lineStart:function(){u.point=e},lineEnd:i,polygonStart:function(){u.lineEnd=o},polygonEnd:function(){u.lineEnd=i,u.point=n},pointRadius:function(t){return a=t,u},result:b};return u}function ee(t){function n(t){return(u?r:e)(t)}function e(n){return oe(n,function(e,r){e=t(e,r),n.point(e[0],e[1])})}function r(n){function e(e,r){e=t(e,r),n.point(e[0],e[1])}function r(){$=NaN,S.point=o,n.lineStart()}function o(e,r){var o=gn([e,r]),a=t(e,r);i($,x,y,b,w,C,$=a[0],x=a[1],y=e,b=o[0],w=o[1],C=o[2],u,n),n.point($,x)}function a(){S.point=e,n.lineEnd()}function s(){r(),S.point=l,S.lineEnd=c}function l(t,n){o(f=t,h=n),p=$,d=x,v=b,g=w,m=C,S.point=o}function c(){i($,x,y,b,w,C,p,d,f,v,g,m,u,n),S.lineEnd=a,a()}var f,h,p,d,v,g,m,y,$,x,b,w,C,S={point:e,lineStart:r,lineEnd:a,polygonStart:function(){n.polygonStart(),S.lineStart=s},polygonEnd:function(){n.polygonEnd(),S.lineStart=r}};return S}function i(n,e,r,u,s,l,c,f,h,p,d,v,g,m){var y=c-n,$=f-e,x=y*y+$*$;if(x>4*o&&g--){var b=u+p,w=s+d,C=l+v,S=Math.sqrt(b*b+w*w+C*C),_=Math.asin(C/=S),M=xa(xa(C)-1)<Da||xa(r-h)<Da?(r+h)/2:Math.atan2(w,b),k=t(M,_),A=k[0],E=k[1],P=A-n,O=E-e,T=$*P-y*O;(T*T/x>o||xa((y*P+$*O)/x-.5)>.3||a>u*p+s*d+l*v)&&(i(n,e,r,u,s,l,A,E,M,b/=S,w/=S,C,g,m),m.point(A,E),i(A,E,M,b,w,C,c,f,h,p,d,v,g,m))}}var o=.5,a=Math.cos(30*Ba),u=16;return n.precision=function(t){return arguments.length?(u=(o=t*t)>0&&16,n):Math.sqrt(o)},n}function re(t){var n=ee(function(n,e){return t([n*Wa,e*Wa])});return function(t){return se(n(t))}}function ie(t){this.stream=t}function oe(t,n){return{point:n,sphere:function(){t.sphere()},lineStart:function(){t.lineStart()},lineEnd:function(){t.lineEnd()},polygonStart:function(){t.polygonStart()},polygonEnd:function(){t.polygonEnd()}}}function ae(t){return ue(function(){return t})()}function ue(t){function n(t){return t=u(t[0]*Ba,t[1]*Ba),[t[0]*h+s,l-t[1]*h]}function e(t){return t=u.invert((t[0]-s)/h,(l-t[1])/h),t&&[t[0]*Wa,t[1]*Wa]}function r(){u=En(a=fe(m,$,x),o);var t=o(v,g);return s=p-t[0]*h,l=d+t[1]*h,i()}function i(){return c&&(c.valid=!1,c=null),n}var o,a,u,s,l,c,f=ee(function(t,n){return t=o(t,n),[t[0]*h+s,l-t[1]*h]}),h=150,p=480,d=250,v=0,g=0,m=0,$=0,x=0,b=Iu,w=y,C=null,S=null;return n.stream=function(t){return c&&(c.valid=!1),c=se(b(a,f(w(t)))),c.valid=!0,c},n.clipAngle=function(t){return arguments.length?(b=null==t?(C=t,Iu):Vn((C=+t)*Ba),i()):C},n.clipExtent=function(t){return arguments.length?(S=t,w=t?Wn(t[0][0],t[0][1],t[1][0],t[1][1]):y,i()):S},n.scale=function(t){return arguments.length?(h=+t,r()):h},n.translate=function(t){return arguments.length?(p=+t[0],d=+t[1],r()):[p,d]},n.center=function(t){return arguments.length?(v=t[0]%360*Ba,g=t[1]%360*Ba,r()):[v*Wa,g*Wa]},n.rotate=function(t){return arguments.length?(m=t[0]%360*Ba,$=t[1]%360*Ba,x=t.length>2?t[2]%360*Ba:0,r()):[m*Wa,$*Wa,x*Wa]},sa.rebind(n,f,"precision"),function(){return o=t.apply(this,arguments),n.invert=o.invert&&e,r()}}function se(t){return oe(t,function(n,e){t.point(n*Ba,e*Ba)})}function le(t,n){return[t,n]}function ce(t,n){return[t>Ia?t-za:-Ia>t?t+za:t,n]}function fe(t,n,e){return t?n||e?En(pe(t),de(n,e)):pe(t):n||e?de(n,e):ce}function he(t){return function(n,e){return n+=t,[n>Ia?n-za:-Ia>n?n+za:n,e]}}function pe(t){var n=he(t);return n.invert=he(-t),n}function de(t,n){function e(t,n){var e=Math.cos(n),u=Math.cos(t)*e,s=Math.sin(t)*e,l=Math.sin(n),c=l*r+u*i;return[Math.atan2(s*o-c*a,u*r-l*i),nt(c*o+s*a)]}var r=Math.cos(t),i=Math.sin(t),o=Math.cos(n),a=Math.sin(n);return e.invert=function(t,n){var e=Math.cos(n),u=Math.cos(t)*e,s=Math.sin(t)*e,l=Math.sin(n),c=l*o-s*a;return[Math.atan2(s*o+l*a,u*r+c*i),nt(c*r-u*i)]},e}function ve(t,n){var e=Math.cos(t),r=Math.sin(t);return function(i,o,a,u){var s=a*n;null!=i?(i=ge(e,i),o=ge(e,o),(a>0?o>i:i>o)&&(i+=a*za)):(i=t+a*za,o=t-.5*s);for(var l,c=i;a>0?c>o:o>c;c-=s)u.point((l=wn([e,-r*Math.cos(c),-r*Math.sin(c)]))[0],l[1])}}function ge(t,n){var e=gn(n);e[0]-=t,bn(e);var r=tt(-e[1]);return((-e[2]<0?-r:r)+2*Math.PI-Da)%(2*Math.PI)}function me(t,n,e){var r=sa.range(t,n-Da,e).concat(n);return function(t){return r.map(function(n){return[t,n]})}}function ye(t,n,e){var r=sa.range(t,n-Da,e).concat(n);return function(t){return r.map(function(n){return[n,t]})}}function $e(t){return t.source}function xe(t){return t.target}function be(t,n,e,r){var i=Math.cos(n),o=Math.sin(n),a=Math.cos(r),u=Math.sin(r),s=i*Math.cos(t),l=i*Math.sin(t),c=a*Math.cos(e),f=a*Math.sin(e),h=2*Math.asin(Math.sqrt(ot(r-n)+i*a*ot(e-t))),p=1/Math.sin(h),d=h?function(t){var n=Math.sin(t*=h)*p,e=Math.sin(h-t)*p,r=e*s+n*c,i=e*l+n*f,a=e*o+n*u;return[Math.atan2(i,r)*Wa,Math.atan2(a,Math.sqrt(r*r+i*i))*Wa]}:function(){return[t*Wa,n*Wa]};return d.distance=h,d}function we(){function t(t,i){var o=Math.sin(i*=Ba),a=Math.cos(i),u=xa((t*=Ba)-n),s=Math.cos(u);Zu+=Math.atan2(Math.sqrt((u=a*Math.sin(u))*u+(u=r*o-e*a*s)*u),e*o+r*a*s),n=t,e=o,r=a}var n,e,r;Ju.point=function(i,o){n=i*Ba,e=Math.sin(o*=Ba),r=Math.cos(o),Ju.point=t},Ju.lineEnd=function(){Ju.point=Ju.lineEnd=b}}function Ce(t,n){function e(n,e){var r=Math.cos(n),i=Math.cos(e),o=t(r*i);return[o*i*Math.sin(n),o*Math.sin(e)]}return e.invert=function(t,e){var r=Math.sqrt(t*t+e*e),i=n(r),o=Math.sin(i),a=Math.cos(i);return[Math.atan2(t*o,r*a),Math.asin(r&&e*o/r)]},e}function Se(t,n){function e(t,n){a>0?-Va+Da>n&&(n=-Va+Da):n>Va-Da&&(n=Va-Da);var e=a/Math.pow(i(n),o);return[e*Math.sin(o*t),a-e*Math.cos(o*t)]}var r=Math.cos(t),i=function(t){return Math.tan(Ia/4+t/2)},o=t===n?Math.sin(t):Math.log(r/Math.cos(n))/Math.log(i(n)/i(t)),a=r*Math.pow(i(t),o)/o;return o?(e.invert=function(t,n){var e=a-n,r=K(o)*Math.sqrt(t*t+e*e);return[Math.atan2(t,e)/o,2*Math.atan(Math.pow(a/r,1/o))-Va]},e):Me}function _e(t,n){function e(t,n){var e=o-n;return[e*Math.sin(i*t),o-e*Math.cos(i*t)]}var r=Math.cos(t),i=t===n?Math.sin(t):(r-Math.cos(n))/(n-t),o=r/i+t;return xa(i)<Da?le:(e.invert=function(t,n){var e=o-n;return[Math.atan2(t,e)/i,o-K(i)*Math.sqrt(t*t+e*e)]},e)}function Me(t,n){return[t,Math.log(Math.tan(Ia/4+n/2))]}function ke(t){var n,e=ae(t),r=e.scale,i=e.translate,o=e.clipExtent;return e.scale=function(){var t=r.apply(e,arguments);return t===e?n?e.clipExtent(null):e:t},e.translate=function(){var t=i.apply(e,arguments);return t===e?n?e.clipExtent(null):e:t},e.clipExtent=function(t){var a=o.apply(e,arguments);if(a===e){if(n=null==t){var u=Ia*r(),s=i();o([[s[0]-u,s[1]-u],[s[0]+u,s[1]+u]])}}else n&&(a=null);return a},e.clipExtent(null)}function Ae(t,n){return[Math.log(Math.tan(Ia/4+n/2)),-t]}function Ee(t){return t[0];
+}function Pe(t){return t[1]}function Oe(t){for(var n=t.length,e=[0,1],r=2,i=2;n>i;i++){for(;r>1&&Q(t[e[r-2]],t[e[r-1]],t[i])<=0;)--r;e[r++]=i}return e.slice(0,r)}function Te(t,n){return t[0]-n[0]||t[1]-n[1]}function Le(t,n,e){return(e[0]-n[0])*(t[1]-n[1])<(e[1]-n[1])*(t[0]-n[0])}function je(t,n,e,r){var i=t[0],o=e[0],a=n[0]-i,u=r[0]-o,s=t[1],l=e[1],c=n[1]-s,f=r[1]-l,h=(u*(s-l)-f*(i-o))/(f*a-u*c);return[i+h*a,s+h*c]}function Ne(t){var n=t[0],e=t[t.length-1];return!(n[0]-e[0]||n[1]-e[1])}function Re(){rr(this),this.edge=this.site=this.circle=null}function De(t){var n=ls.pop()||new Re;return n.site=t,n}function Fe(t){Ge(t),as.remove(t),ls.push(t),rr(t)}function Ie(t){var n=t.circle,e=n.x,r=n.cy,i={x:e,y:r},o=t.P,a=t.N,u=[t];Fe(t);for(var s=o;s.circle&&xa(e-s.circle.x)<Da&&xa(r-s.circle.cy)<Da;)o=s.P,u.unshift(s),Fe(s),s=o;u.unshift(s),Ge(s);for(var l=a;l.circle&&xa(e-l.circle.x)<Da&&xa(r-l.circle.cy)<Da;)a=l.N,u.push(l),Fe(l),l=a;u.push(l),Ge(l);var c,f=u.length;for(c=1;f>c;++c)l=u[c],s=u[c-1],tr(l.edge,s.site,l.site,i);s=u[0],l=u[f-1],l.edge=Ke(s.site,l.site,null,i),Ye(s),Ye(l)}function ze(t){for(var n,e,r,i,o=t.x,a=t.y,u=as._;u;)if(r=qe(u,a)-o,r>Da)u=u.L;else{if(i=o-Ve(u,a),!(i>Da)){r>-Da?(n=u.P,e=u):i>-Da?(n=u,e=u.N):n=e=u;break}if(!u.R){n=u;break}u=u.R}var s=De(t);if(as.insert(n,s),n||e){if(n===e)return Ge(n),e=De(n.site),as.insert(s,e),s.edge=e.edge=Ke(n.site,s.site),Ye(n),void Ye(e);if(!e)return void(s.edge=Ke(n.site,s.site));Ge(n),Ge(e);var l=n.site,c=l.x,f=l.y,h=t.x-c,p=t.y-f,d=e.site,v=d.x-c,g=d.y-f,m=2*(h*g-p*v),y=h*h+p*p,$=v*v+g*g,x={x:(g*y-p*$)/m+c,y:(h*$-v*y)/m+f};tr(e.edge,l,d,x),s.edge=Ke(l,t,null,x),e.edge=Ke(t,d,null,x),Ye(n),Ye(e)}}function qe(t,n){var e=t.site,r=e.x,i=e.y,o=i-n;if(!o)return r;var a=t.P;if(!a)return-(1/0);e=a.site;var u=e.x,s=e.y,l=s-n;if(!l)return u;var c=u-r,f=1/o-1/l,h=c/l;return f?(-h+Math.sqrt(h*h-2*f*(c*c/(-2*l)-s+l/2+i-o/2)))/f+r:(r+u)/2}function Ve(t,n){var e=t.N;if(e)return qe(e,n);var r=t.site;return r.y===n?r.x:1/0}function Be(t){this.site=t,this.edges=[]}function We(t){for(var n,e,r,i,o,a,u,s,l,c,f=t[0][0],h=t[1][0],p=t[0][1],d=t[1][1],v=os,g=v.length;g--;)if(o=v[g],o&&o.prepare())for(u=o.edges,s=u.length,a=0;s>a;)c=u[a].end(),r=c.x,i=c.y,l=u[++a%s].start(),n=l.x,e=l.y,(xa(r-n)>Da||xa(i-e)>Da)&&(u.splice(a,0,new nr(Qe(o.site,c,xa(r-f)<Da&&d-i>Da?{x:f,y:xa(n-f)<Da?e:d}:xa(i-d)<Da&&h-r>Da?{x:xa(e-d)<Da?n:h,y:d}:xa(r-h)<Da&&i-p>Da?{x:h,y:xa(n-h)<Da?e:p}:xa(i-p)<Da&&r-f>Da?{x:xa(e-p)<Da?n:f,y:p}:null),o.site,null)),++s)}function Ue(t,n){return n.angle-t.angle}function He(){rr(this),this.x=this.y=this.arc=this.site=this.cy=null}function Ye(t){var n=t.P,e=t.N;if(n&&e){var r=n.site,i=t.site,o=e.site;if(r!==o){var a=i.x,u=i.y,s=r.x-a,l=r.y-u,c=o.x-a,f=o.y-u,h=2*(s*f-l*c);if(!(h>=-Fa)){var p=s*s+l*l,d=c*c+f*f,v=(f*p-l*d)/h,g=(s*d-c*p)/h,f=g+u,m=cs.pop()||new He;m.arc=t,m.site=i,m.x=v+a,m.y=f+Math.sqrt(v*v+g*g),m.cy=f,t.circle=m;for(var y=null,$=ss._;$;)if(m.y<$.y||m.y===$.y&&m.x<=$.x){if(!$.L){y=$.P;break}$=$.L}else{if(!$.R){y=$;break}$=$.R}ss.insert(y,m),y||(us=m)}}}}function Ge(t){var n=t.circle;n&&(n.P||(us=n.N),ss.remove(n),cs.push(n),rr(n),t.circle=null)}function Xe(t){for(var n,e=is,r=Bn(t[0][0],t[0][1],t[1][0],t[1][1]),i=e.length;i--;)n=e[i],(!Ze(n,t)||!r(n)||xa(n.a.x-n.b.x)<Da&&xa(n.a.y-n.b.y)<Da)&&(n.a=n.b=null,e.splice(i,1))}function Ze(t,n){var e=t.b;if(e)return!0;var r,i,o=t.a,a=n[0][0],u=n[1][0],s=n[0][1],l=n[1][1],c=t.l,f=t.r,h=c.x,p=c.y,d=f.x,v=f.y,g=(h+d)/2,m=(p+v)/2;if(v===p){if(a>g||g>=u)return;if(h>d){if(o){if(o.y>=l)return}else o={x:g,y:s};e={x:g,y:l}}else{if(o){if(o.y<s)return}else o={x:g,y:l};e={x:g,y:s}}}else if(r=(h-d)/(v-p),i=m-r*g,-1>r||r>1)if(h>d){if(o){if(o.y>=l)return}else o={x:(s-i)/r,y:s};e={x:(l-i)/r,y:l}}else{if(o){if(o.y<s)return}else o={x:(l-i)/r,y:l};e={x:(s-i)/r,y:s}}else if(v>p){if(o){if(o.x>=u)return}else o={x:a,y:r*a+i};e={x:u,y:r*u+i}}else{if(o){if(o.x<a)return}else o={x:u,y:r*u+i};e={x:a,y:r*a+i}}return t.a=o,t.b=e,!0}function Je(t,n){this.l=t,this.r=n,this.a=this.b=null}function Ke(t,n,e,r){var i=new Je(t,n);return is.push(i),e&&tr(i,t,n,e),r&&tr(i,n,t,r),os[t.i].edges.push(new nr(i,t,n)),os[n.i].edges.push(new nr(i,n,t)),i}function Qe(t,n,e){var r=new Je(t,null);return r.a=n,r.b=e,is.push(r),r}function tr(t,n,e,r){t.a||t.b?t.l===e?t.b=r:t.a=r:(t.a=r,t.l=n,t.r=e)}function nr(t,n,e){var r=t.a,i=t.b;this.edge=t,this.site=n,this.angle=e?Math.atan2(e.y-n.y,e.x-n.x):t.l===n?Math.atan2(i.x-r.x,r.y-i.y):Math.atan2(r.x-i.x,i.y-r.y)}function er(){this._=null}function rr(t){t.U=t.C=t.L=t.R=t.P=t.N=null}function ir(t,n){var e=n,r=n.R,i=e.U;i?i.L===e?i.L=r:i.R=r:t._=r,r.U=i,e.U=r,e.R=r.L,e.R&&(e.R.U=e),r.L=e}function or(t,n){var e=n,r=n.L,i=e.U;i?i.L===e?i.L=r:i.R=r:t._=r,r.U=i,e.U=r,e.L=r.R,e.L&&(e.L.U=e),r.R=e}function ar(t){for(;t.L;)t=t.L;return t}function ur(t,n){var e,r,i,o=t.sort(sr).pop();for(is=[],os=new Array(t.length),as=new er,ss=new er;;)if(i=us,o&&(!i||o.y<i.y||o.y===i.y&&o.x<i.x))o.x===e&&o.y===r||(os[o.i]=new Be(o),ze(o),e=o.x,r=o.y),o=t.pop();else{if(!i)break;Ie(i.arc)}n&&(Xe(n),We(n));var a={cells:os,edges:is};return as=ss=is=os=null,a}function sr(t,n){return n.y-t.y||n.x-t.x}function lr(t,n,e){return(t.x-e.x)*(n.y-t.y)-(t.x-n.x)*(e.y-t.y)}function cr(t){return t.x}function fr(t){return t.y}function hr(){return{leaf:!0,nodes:[],point:null,x:null,y:null}}function pr(t,n,e,r,i,o){if(!t(n,e,r,i,o)){var a=.5*(e+i),u=.5*(r+o),s=n.nodes;s[0]&&pr(t,s[0],e,r,a,u),s[1]&&pr(t,s[1],a,r,i,u),s[2]&&pr(t,s[2],e,u,a,o),s[3]&&pr(t,s[3],a,u,i,o)}}function dr(t,n,e,r,i,o,a){var u,s=1/0;return function l(t,c,f,h,p){if(!(c>o||f>a||r>h||i>p)){if(d=t.point){var d,v=n-t.x,g=e-t.y,m=v*v+g*g;if(s>m){var y=Math.sqrt(s=m);r=n-y,i=e-y,o=n+y,a=e+y,u=d}}for(var $=t.nodes,x=.5*(c+h),b=.5*(f+p),w=n>=x,C=e>=b,S=C<<1|w,_=S+4;_>S;++S)if(t=$[3&S])switch(3&S){case 0:l(t,c,f,x,b);break;case 1:l(t,x,f,h,b);break;case 2:l(t,c,b,x,p);break;case 3:l(t,x,b,h,p)}}}(t,r,i,o,a),u}function vr(t,n){t=sa.rgb(t),n=sa.rgb(n);var e=t.r,r=t.g,i=t.b,o=n.r-e,a=n.g-r,u=n.b-i;return function(t){return"#"+xt(Math.round(e+o*t))+xt(Math.round(r+a*t))+xt(Math.round(i+u*t))}}function gr(t,n){var e,r={},i={};for(e in t)e in n?r[e]=$r(t[e],n[e]):i[e]=t[e];for(e in n)e in t||(i[e]=n[e]);return function(t){for(e in r)i[e]=r[e](t);return i}}function mr(t,n){return t=+t,n=+n,function(e){return t*(1-e)+n*e}}function yr(t,n){var e,r,i,o=hs.lastIndex=ps.lastIndex=0,a=-1,u=[],s=[];for(t+="",n+="";(e=hs.exec(t))&&(r=ps.exec(n));)(i=r.index)>o&&(i=n.slice(o,i),u[a]?u[a]+=i:u[++a]=i),(e=e[0])===(r=r[0])?u[a]?u[a]+=r:u[++a]=r:(u[++a]=null,s.push({i:a,x:mr(e,r)})),o=ps.lastIndex;return o<n.length&&(i=n.slice(o),u[a]?u[a]+=i:u[++a]=i),u.length<2?s[0]?(n=s[0].x,function(t){return n(t)+""}):function(){return n}:(n=s.length,function(t){for(var e,r=0;n>r;++r)u[(e=s[r]).i]=e.x(t);return u.join("")})}function $r(t,n){for(var e,r=sa.interpolators.length;--r>=0&&!(e=sa.interpolators[r](t,n)););return e}function xr(t,n){var e,r=[],i=[],o=t.length,a=n.length,u=Math.min(t.length,n.length);for(e=0;u>e;++e)r.push($r(t[e],n[e]));for(;o>e;++e)i[e]=t[e];for(;a>e;++e)i[e]=n[e];return function(t){for(e=0;u>e;++e)i[e]=r[e](t);return i}}function br(t){return function(n){return 0>=n?0:n>=1?1:t(n)}}function wr(t){return function(n){return 1-t(1-n)}}function Cr(t){return function(n){return.5*(.5>n?t(2*n):2-t(2-2*n))}}function Sr(t){return t*t}function _r(t){return t*t*t}function Mr(t){if(0>=t)return 0;if(t>=1)return 1;var n=t*t,e=n*t;return 4*(.5>t?e:3*(t-n)+e-.75)}function kr(t){return function(n){return Math.pow(n,t)}}function Ar(t){return 1-Math.cos(t*Va)}function Er(t){return Math.pow(2,10*(t-1))}function Pr(t){return 1-Math.sqrt(1-t*t)}function Or(t,n){var e;return arguments.length<2&&(n=.45),arguments.length?e=n/za*Math.asin(1/t):(t=1,e=n/4),function(r){return 1+t*Math.pow(2,-10*r)*Math.sin((r-e)*za/n)}}function Tr(t){return t||(t=1.70158),function(n){return n*n*((t+1)*n-t)}}function Lr(t){return 1/2.75>t?7.5625*t*t:2/2.75>t?7.5625*(t-=1.5/2.75)*t+.75:2.5/2.75>t?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375}function jr(t,n){t=sa.hcl(t),n=sa.hcl(n);var e=t.h,r=t.c,i=t.l,o=n.h-e,a=n.c-r,u=n.l-i;return isNaN(a)&&(a=0,r=isNaN(r)?n.c:r),isNaN(o)?(o=0,e=isNaN(e)?n.h:e):o>180?o-=360:-180>o&&(o+=360),function(t){return ct(e+o*t,r+a*t,i+u*t)+""}}function Nr(t,n){t=sa.hsl(t),n=sa.hsl(n);var e=t.h,r=t.s,i=t.l,o=n.h-e,a=n.s-r,u=n.l-i;return isNaN(a)&&(a=0,r=isNaN(r)?n.s:r),isNaN(o)?(o=0,e=isNaN(e)?n.h:e):o>180?o-=360:-180>o&&(o+=360),function(t){return st(e+o*t,r+a*t,i+u*t)+""}}function Rr(t,n){t=sa.lab(t),n=sa.lab(n);var e=t.l,r=t.a,i=t.b,o=n.l-e,a=n.a-r,u=n.b-i;return function(t){return ht(e+o*t,r+a*t,i+u*t)+""}}function Dr(t,n){return n-=t,function(e){return Math.round(t+n*e)}}function Fr(t){var n=[t.a,t.b],e=[t.c,t.d],r=zr(n),i=Ir(n,e),o=zr(qr(e,n,-i))||0;n[0]*e[1]<e[0]*n[1]&&(n[0]*=-1,n[1]*=-1,r*=-1,i*=-1),this.rotate=(r?Math.atan2(n[1],n[0]):Math.atan2(-e[0],e[1]))*Wa,this.translate=[t.e,t.f],this.scale=[r,o],this.skew=o?Math.atan2(i,o)*Wa:0}function Ir(t,n){return t[0]*n[0]+t[1]*n[1]}function zr(t){var n=Math.sqrt(Ir(t,t));return n&&(t[0]/=n,t[1]/=n),n}function qr(t,n,e){return t[0]+=e*n[0],t[1]+=e*n[1],t}function Vr(t){return t.length?t.pop()+",":""}function Br(t,n,e,r){if(t[0]!==n[0]||t[1]!==n[1]){var i=e.push("translate(",null,",",null,")");r.push({i:i-4,x:mr(t[0],n[0])},{i:i-2,x:mr(t[1],n[1])})}else(n[0]||n[1])&&e.push("translate("+n+")")}function Wr(t,n,e,r){t!==n?(t-n>180?n+=360:n-t>180&&(t+=360),r.push({i:e.push(Vr(e)+"rotate(",null,")")-2,x:mr(t,n)})):n&&e.push(Vr(e)+"rotate("+n+")")}function Ur(t,n,e,r){t!==n?r.push({i:e.push(Vr(e)+"skewX(",null,")")-2,x:mr(t,n)}):n&&e.push(Vr(e)+"skewX("+n+")")}function Hr(t,n,e,r){if(t[0]!==n[0]||t[1]!==n[1]){var i=e.push(Vr(e)+"scale(",null,",",null,")");r.push({i:i-4,x:mr(t[0],n[0])},{i:i-2,x:mr(t[1],n[1])})}else 1===n[0]&&1===n[1]||e.push(Vr(e)+"scale("+n+")")}function Yr(t,n){var e=[],r=[];return t=sa.transform(t),n=sa.transform(n),Br(t.translate,n.translate,e,r),Wr(t.rotate,n.rotate,e,r),Ur(t.skew,n.skew,e,r),Hr(t.scale,n.scale,e,r),t=n=null,function(t){for(var n,i=-1,o=r.length;++i<o;)e[(n=r[i]).i]=n.x(t);return e.join("")}}function Gr(t,n){return n=(n-=t=+t)||1/n,function(e){return(e-t)/n}}function Xr(t,n){return n=(n-=t=+t)||1/n,function(e){return Math.max(0,Math.min(1,(e-t)/n))}}function Zr(t){for(var n=t.source,e=t.target,r=Kr(n,e),i=[n];n!==r;)n=n.parent,i.push(n);for(var o=i.length;e!==r;)i.splice(o,0,e),e=e.parent;return i}function Jr(t){for(var n=[],e=t.parent;null!=e;)n.push(t),t=e,e=e.parent;return n.push(t),n}function Kr(t,n){if(t===n)return t;for(var e=Jr(t),r=Jr(n),i=e.pop(),o=r.pop(),a=null;i===o;)a=i,i=e.pop(),o=r.pop();return a}function Qr(t){t.fixed|=2}function ti(t){t.fixed&=-7}function ni(t){t.fixed|=4,t.px=t.x,t.py=t.y}function ei(t){t.fixed&=-5}function ri(t,n,e){var r=0,i=0;if(t.charge=0,!t.leaf)for(var o,a=t.nodes,u=a.length,s=-1;++s<u;)o=a[s],null!=o&&(ri(o,n,e),t.charge+=o.charge,r+=o.charge*o.cx,i+=o.charge*o.cy);if(t.point){t.leaf||(t.point.x+=Math.random()-.5,t.point.y+=Math.random()-.5);var l=n*e[t.point.index];t.charge+=t.pointCharge=l,r+=l*t.point.x,i+=l*t.point.y}t.cx=r/t.charge,t.cy=i/t.charge}function ii(t,n){return sa.rebind(t,n,"sort","children","value"),t.nodes=t,t.links=ci,t}function oi(t,n){for(var e=[t];null!=(t=e.pop());)if(n(t),(i=t.children)&&(r=i.length))for(var r,i;--r>=0;)e.push(i[r])}function ai(t,n){for(var e=[t],r=[];null!=(t=e.pop());)if(r.push(t),(o=t.children)&&(i=o.length))for(var i,o,a=-1;++a<i;)e.push(o[a]);for(;null!=(t=r.pop());)n(t)}function ui(t){return t.children}function si(t){return t.value}function li(t,n){return n.value-t.value}function ci(t){return sa.merge(t.map(function(t){return(t.children||[]).map(function(n){return{source:t,target:n}})}))}function fi(t){return t.x}function hi(t){return t.y}function pi(t,n,e){t.y0=n,t.y=e}function di(t){return sa.range(t.length)}function vi(t){for(var n=-1,e=t[0].length,r=[];++n<e;)r[n]=0;return r}function gi(t){for(var n,e=1,r=0,i=t[0][1],o=t.length;o>e;++e)(n=t[e][1])>i&&(r=e,i=n);return r}function mi(t){return t.reduce(yi,0)}function yi(t,n){return t+n[1]}function $i(t,n){return xi(t,Math.ceil(Math.log(n.length)/Math.LN2+1))}function xi(t,n){for(var e=-1,r=+t[0],i=(t[1]-r)/n,o=[];++e<=n;)o[e]=i*e+r;return o}function bi(t){return[sa.min(t),sa.max(t)]}function wi(t,n){return t.value-n.value}function Ci(t,n){var e=t._pack_next;t._pack_next=n,n._pack_prev=t,n._pack_next=e,e._pack_prev=n}function Si(t,n){t._pack_next=n,n._pack_prev=t}function _i(t,n){var e=n.x-t.x,r=n.y-t.y,i=t.r+n.r;return.999*i*i>e*e+r*r}function Mi(t){function n(t){c=Math.min(t.x-t.r,c),f=Math.max(t.x+t.r,f),h=Math.min(t.y-t.r,h),p=Math.max(t.y+t.r,p)}if((e=t.children)&&(l=e.length)){var e,r,i,o,a,u,s,l,c=1/0,f=-(1/0),h=1/0,p=-(1/0);if(e.forEach(ki),r=e[0],r.x=-r.r,r.y=0,n(r),l>1&&(i=e[1],i.x=i.r,i.y=0,n(i),l>2))for(o=e[2],Pi(r,i,o),n(o),Ci(r,o),r._pack_prev=o,Ci(o,i),i=r._pack_next,a=3;l>a;a++){Pi(r,i,o=e[a]);var d=0,v=1,g=1;for(u=i._pack_next;u!==i;u=u._pack_next,v++)if(_i(u,o)){d=1;break}if(1==d)for(s=r._pack_prev;s!==u._pack_prev&&!_i(s,o);s=s._pack_prev,g++);d?(g>v||v==g&&i.r<r.r?Si(r,i=u):Si(r=s,i),a--):(Ci(r,o),i=o,n(o))}var m=(c+f)/2,y=(h+p)/2,$=0;for(a=0;l>a;a++)o=e[a],o.x-=m,o.y-=y,$=Math.max($,o.r+Math.sqrt(o.x*o.x+o.y*o.y));t.r=$,e.forEach(Ai)}}function ki(t){t._pack_next=t._pack_prev=t}function Ai(t){delete t._pack_next,delete t._pack_prev}function Ei(t,n,e,r){var i=t.children;if(t.x=n+=r*t.x,t.y=e+=r*t.y,t.r*=r,i)for(var o=-1,a=i.length;++o<a;)Ei(i[o],n,e,r)}function Pi(t,n,e){var r=t.r+e.r,i=n.x-t.x,o=n.y-t.y;if(r&&(i||o)){var a=n.r+e.r,u=i*i+o*o;a*=a,r*=r;var s=.5+(r-a)/(2*u),l=Math.sqrt(Math.max(0,2*a*(r+u)-(r-=u)*r-a*a))/(2*u);e.x=t.x+s*i+l*o,e.y=t.y+s*o-l*i}else e.x=t.x+r,e.y=t.y}function Oi(t,n){return t.parent==n.parent?1:2}function Ti(t){var n=t.children;return n.length?n[0]:t.t}function Li(t){var n,e=t.children;return(n=e.length)?e[n-1]:t.t}function ji(t,n,e){var r=e/(n.i-t.i);n.c-=r,n.s+=e,t.c+=r,n.z+=e,n.m+=e}function Ni(t){for(var n,e=0,r=0,i=t.children,o=i.length;--o>=0;)n=i[o],n.z+=e,n.m+=e,e+=n.s+(r+=n.c)}function Ri(t,n,e){return t.a.parent===n.parent?t.a:e}function Di(t){return 1+sa.max(t,function(t){return t.y})}function Fi(t){return t.reduce(function(t,n){return t+n.x},0)/t.length}function Ii(t){var n=t.children;return n&&n.length?Ii(n[0]):t}function zi(t){var n,e=t.children;return e&&(n=e.length)?zi(e[n-1]):t}function qi(t){return{x:t.x,y:t.y,dx:t.dx,dy:t.dy}}function Vi(t,n){var e=t.x+n[3],r=t.y+n[0],i=t.dx-n[1]-n[3],o=t.dy-n[0]-n[2];return 0>i&&(e+=i/2,i=0),0>o&&(r+=o/2,o=0),{x:e,y:r,dx:i,dy:o}}function Bi(t){var n=t[0],e=t[t.length-1];return e>n?[n,e]:[e,n]}function Wi(t){return t.rangeExtent?t.rangeExtent():Bi(t.range())}function Ui(t,n,e,r){var i=e(t[0],t[1]),o=r(n[0],n[1]);return function(t){return o(i(t))}}function Hi(t,n){var e,r=0,i=t.length-1,o=t[r],a=t[i];return o>a&&(e=r,r=i,i=e,e=o,o=a,a=e),t[r]=n.floor(o),t[i]=n.ceil(a),t}function Yi(t){return t?{floor:function(n){return Math.floor(n/t)*t},ceil:function(n){return Math.ceil(n/t)*t}}:Ss}function Gi(t,n,e,r){var i=[],o=[],a=0,u=Math.min(t.length,n.length)-1;for(t[u]<t[0]&&(t=t.slice().reverse(),n=n.slice().reverse());++a<=u;)i.push(e(t[a-1],t[a])),o.push(r(n[a-1],n[a]));return function(n){var e=sa.bisect(t,n,1,u)-1;return o[e](i[e](n))}}function Xi(t,n,e,r){function i(){var i=Math.min(t.length,n.length)>2?Gi:Ui,s=r?Xr:Gr;return a=i(t,n,s,e),u=i(n,t,s,$r),o}function o(t){return a(t)}var a,u;return o.invert=function(t){return u(t)},o.domain=function(n){return arguments.length?(t=n.map(Number),i()):t},o.range=function(t){return arguments.length?(n=t,i()):n},o.rangeRound=function(t){return o.range(t).interpolate(Dr)},o.clamp=function(t){return arguments.length?(r=t,i()):r},o.interpolate=function(t){return arguments.length?(e=t,i()):e},o.ticks=function(n){return Qi(t,n)},o.tickFormat=function(n,e){return to(t,n,e)},o.nice=function(n){return Ji(t,n),i()},o.copy=function(){return Xi(t,n,e,r)},i()}function Zi(t,n){return sa.rebind(t,n,"range","rangeRound","interpolate","clamp")}function Ji(t,n){return Hi(t,Yi(Ki(t,n)[2])),Hi(t,Yi(Ki(t,n)[2])),t}function Ki(t,n){null==n&&(n=10);var e=Bi(t),r=e[1]-e[0],i=Math.pow(10,Math.floor(Math.log(r/n)/Math.LN10)),o=n/r*i;return.15>=o?i*=10:.35>=o?i*=5:.75>=o&&(i*=2),e[0]=Math.ceil(e[0]/i)*i,e[1]=Math.floor(e[1]/i)*i+.5*i,e[2]=i,e}function Qi(t,n){return sa.range.apply(sa,Ki(t,n))}function to(t,n,e){var r=Ki(t,n);if(e){var i=hu.exec(e);if(i.shift(),"s"===i[8]){var o=sa.formatPrefix(Math.max(xa(r[0]),xa(r[1])));return i[7]||(i[7]="."+no(o.scale(r[2]))),i[8]="f",e=sa.format(i.join("")),function(t){return e(o.scale(t))+o.symbol}}i[7]||(i[7]="."+eo(i[8],r)),e=i.join("")}else e=",."+no(r[2])+"f";return sa.format(e)}function no(t){return-Math.floor(Math.log(t)/Math.LN10+.01)}function eo(t,n){var e=no(n[2]);return t in _s?Math.abs(e-no(Math.max(xa(n[0]),xa(n[1]))))+ +("e"!==t):e-2*("%"===t)}function ro(t,n,e,r){function i(t){return(e?Math.log(0>t?0:t):-Math.log(t>0?0:-t))/Math.log(n)}function o(t){return e?Math.pow(n,t):-Math.pow(n,-t)}function a(n){return t(i(n))}return a.invert=function(n){return o(t.invert(n))},a.domain=function(n){return arguments.length?(e=n[0]>=0,t.domain((r=n.map(Number)).map(i)),a):r},a.base=function(e){return arguments.length?(n=+e,t.domain(r.map(i)),a):n},a.nice=function(){var n=Hi(r.map(i),e?Math:ks);return t.domain(n),r=n.map(o),a},a.ticks=function(){var t=Bi(r),a=[],u=t[0],s=t[1],l=Math.floor(i(u)),c=Math.ceil(i(s)),f=n%1?2:n;if(isFinite(c-l)){if(e){for(;c>l;l++)for(var h=1;f>h;h++)a.push(o(l)*h);a.push(o(l))}else for(a.push(o(l));l++<c;)for(var h=f-1;h>0;h--)a.push(o(l)*h);for(l=0;a[l]<u;l++);for(c=a.length;a[c-1]>s;c--);a=a.slice(l,c)}return a},a.tickFormat=function(t,e){if(!arguments.length)return Ms;arguments.length<2?e=Ms:"function"!=typeof e&&(e=sa.format(e));var r=Math.max(1,n*t/a.ticks().length);return function(t){var a=t/o(Math.round(i(t)));return n-.5>a*n&&(a*=n),r>=a?e(t):""}},a.copy=function(){return ro(t.copy(),n,e,r)},Zi(a,t)}function io(t,n,e){function r(n){return t(i(n))}var i=oo(n),o=oo(1/n);return r.invert=function(n){return o(t.invert(n))},r.domain=function(n){return arguments.length?(t.domain((e=n.map(Number)).map(i)),r):e},r.ticks=function(t){return Qi(e,t)},r.tickFormat=function(t,n){return to(e,t,n)},r.nice=function(t){return r.domain(Ji(e,t))},r.exponent=function(a){return arguments.length?(i=oo(n=a),o=oo(1/n),t.domain(e.map(i)),r):n},r.copy=function(){return io(t.copy(),n,e)},Zi(r,t)}function oo(t){return function(n){return 0>n?-Math.pow(-n,t):Math.pow(n,t)}}function ao(t,n){function e(e){return o[((i.get(e)||("range"===n.t?i.set(e,t.push(e)):NaN))-1)%o.length]}function r(n,e){return sa.range(t.length).map(function(t){return n+e*t})}var i,o,a;return e.domain=function(r){if(!arguments.length)return t;t=[],i=new l;for(var o,a=-1,u=r.length;++a<u;)i.has(o=r[a])||i.set(o,t.push(o));return e[n.t].apply(e,n.a)},e.range=function(t){return arguments.length?(o=t,a=0,n={t:"range",a:arguments},e):o},e.rangePoints=function(i,u){arguments.length<2&&(u=0);var s=i[0],l=i[1],c=t.length<2?(s=(s+l)/2,0):(l-s)/(t.length-1+u);return o=r(s+c*u/2,c),a=0,n={t:"rangePoints",a:arguments},e},e.rangeRoundPoints=function(i,u){arguments.length<2&&(u=0);var s=i[0],l=i[1],c=t.length<2?(s=l=Math.round((s+l)/2),0):(l-s)/(t.length-1+u)|0;return o=r(s+Math.round(c*u/2+(l-s-(t.length-1+u)*c)/2),c),a=0,n={t:"rangeRoundPoints",a:arguments},e},e.rangeBands=function(i,u,s){arguments.length<2&&(u=0),arguments.length<3&&(s=u);var l=i[1]<i[0],c=i[l-0],f=i[1-l],h=(f-c)/(t.length-u+2*s);return o=r(c+h*s,h),l&&o.reverse(),a=h*(1-u),n={t:"rangeBands",a:arguments},e},e.rangeRoundBands=function(i,u,s){arguments.length<2&&(u=0),arguments.length<3&&(s=u);var l=i[1]<i[0],c=i[l-0],f=i[1-l],h=Math.floor((f-c)/(t.length-u+2*s));return o=r(c+Math.round((f-c-(t.length-u)*h)/2),h),l&&o.reverse(),a=Math.round(h*(1-u)),n={t:"rangeRoundBands",a:arguments},e},e.rangeBand=function(){return a},e.rangeExtent=function(){return Bi(n.a[0])},e.copy=function(){return ao(t,n)},e.domain(t)}function uo(t,n){function o(){var e=0,r=n.length;for(u=[];++e<r;)u[e-1]=sa.quantile(t,e/r);return a}function a(t){return isNaN(t=+t)?void 0:n[sa.bisect(u,t)]}var u;return a.domain=function(n){return arguments.length?(t=n.map(r).filter(i).sort(e),o()):t},a.range=function(t){return arguments.length?(n=t,o()):n},a.quantiles=function(){return u},a.invertExtent=function(e){return e=n.indexOf(e),0>e?[NaN,NaN]:[e>0?u[e-1]:t[0],e<u.length?u[e]:t[t.length-1]]},a.copy=function(){return uo(t,n)},o()}function so(t,n,e){function r(n){return e[Math.max(0,Math.min(a,Math.floor(o*(n-t))))]}function i(){return o=e.length/(n-t),a=e.length-1,r}var o,a;return r.domain=function(e){return arguments.length?(t=+e[0],n=+e[e.length-1],i()):[t,n]},r.range=function(t){return arguments.length?(e=t,i()):e},r.invertExtent=function(n){return n=e.indexOf(n),n=0>n?NaN:n/o+t,[n,n+1/o]},r.copy=function(){return so(t,n,e)},i()}function lo(t,n){function e(e){return e>=e?n[sa.bisect(t,e)]:void 0}return e.domain=function(n){return arguments.length?(t=n,e):t},e.range=function(t){return arguments.length?(n=t,e):n},e.invertExtent=function(e){return e=n.indexOf(e),[t[e-1],t[e]]},e.copy=function(){return lo(t,n)},e}function co(t){function n(t){return+t}return n.invert=n,n.domain=n.range=function(e){return arguments.length?(t=e.map(n),n):t},n.ticks=function(n){return Qi(t,n)},n.tickFormat=function(n,e){return to(t,n,e)},n.copy=function(){return co(t)},n}function fo(){return 0}function ho(t){return t.innerRadius}function po(t){return t.outerRadius}function vo(t){return t.startAngle}function go(t){return t.endAngle}function mo(t){return t&&t.padAngle}function yo(t,n,e,r){return(t-e)*n-(n-r)*t>0?0:1}function $o(t,n,e,r,i){var o=t[0]-n[0],a=t[1]-n[1],u=(i?r:-r)/Math.sqrt(o*o+a*a),s=u*a,l=-u*o,c=t[0]+s,f=t[1]+l,h=n[0]+s,p=n[1]+l,d=(c+h)/2,v=(f+p)/2,g=h-c,m=p-f,y=g*g+m*m,$=e-r,x=c*p-h*f,b=(0>m?-1:1)*Math.sqrt(Math.max(0,$*$*y-x*x)),w=(x*m-g*b)/y,C=(-x*g-m*b)/y,S=(x*m+g*b)/y,_=(-x*g+m*b)/y,M=w-d,k=C-v,A=S-d,E=_-v;return M*M+k*k>A*A+E*E&&(w=S,C=_),[[w-s,C-l],[w*e/$,C*e/$]]}function xo(t){function n(n){function a(){l.push("M",o(t(c),u))}for(var s,l=[],c=[],f=-1,h=n.length,p=Mt(e),d=Mt(r);++f<h;)i.call(this,s=n[f],f)?c.push([+p.call(this,s,f),+d.call(this,s,f)]):c.length&&(a(),c=[]);return c.length&&a(),l.length?l.join(""):null}var e=Ee,r=Pe,i=Pn,o=bo,a=o.key,u=.7;return n.x=function(t){return arguments.length?(e=t,n):e},n.y=function(t){return arguments.length?(r=t,n):r},n.defined=function(t){return arguments.length?(i=t,n):i},n.interpolate=function(t){return arguments.length?(a="function"==typeof t?o=t:(o=Ls.get(t)||bo).key,n):a},n.tension=function(t){return arguments.length?(u=t,n):u},n}function bo(t){return t.length>1?t.join("L"):t+"Z"}function wo(t){return t.join("L")+"Z"}function Co(t){for(var n=0,e=t.length,r=t[0],i=[r[0],",",r[1]];++n<e;)i.push("H",(r[0]+(r=t[n])[0])/2,"V",r[1]);return e>1&&i.push("H",r[0]),i.join("")}function So(t){for(var n=0,e=t.length,r=t[0],i=[r[0],",",r[1]];++n<e;)i.push("V",(r=t[n])[1],"H",r[0]);return i.join("")}function _o(t){for(var n=0,e=t.length,r=t[0],i=[r[0],",",r[1]];++n<e;)i.push("H",(r=t[n])[0],"V",r[1]);return i.join("")}function Mo(t,n){return t.length<4?bo(t):t[1]+Eo(t.slice(1,-1),Po(t,n))}function ko(t,n){return t.length<3?wo(t):t[0]+Eo((t.push(t[0]),t),Po([t[t.length-2]].concat(t,[t[1]]),n))}function Ao(t,n){return t.length<3?bo(t):t[0]+Eo(t,Po(t,n))}function Eo(t,n){if(n.length<1||t.length!=n.length&&t.length!=n.length+2)return bo(t);var e=t.length!=n.length,r="",i=t[0],o=t[1],a=n[0],u=a,s=1;if(e&&(r+="Q"+(o[0]-2*a[0]/3)+","+(o[1]-2*a[1]/3)+","+o[0]+","+o[1],i=t[1],s=2),n.length>1){u=n[1],o=t[s],s++,r+="C"+(i[0]+a[0])+","+(i[1]+a[1])+","+(o[0]-u[0])+","+(o[1]-u[1])+","+o[0]+","+o[1];for(var l=2;l<n.length;l++,s++)o=t[s],u=n[l],r+="S"+(o[0]-u[0])+","+(o[1]-u[1])+","+o[0]+","+o[1]}if(e){var c=t[s];r+="Q"+(o[0]+2*u[0]/3)+","+(o[1]+2*u[1]/3)+","+c[0]+","+c[1]}return r}function Po(t,n){for(var e,r=[],i=(1-n)/2,o=t[0],a=t[1],u=1,s=t.length;++u<s;)e=o,o=a,a=t[u],r.push([i*(a[0]-e[0]),i*(a[1]-e[1])]);return r}function Oo(t){if(t.length<3)return bo(t);var n=1,e=t.length,r=t[0],i=r[0],o=r[1],a=[i,i,i,(r=t[1])[0]],u=[o,o,o,r[1]],s=[i,",",o,"L",No(Rs,a),",",No(Rs,u)];for(t.push(t[e-1]);++n<=e;)r=t[n],a.shift(),a.push(r[0]),u.shift(),u.push(r[1]),Ro(s,a,u);return t.pop(),s.push("L",r),s.join("")}function To(t){if(t.length<4)return bo(t);for(var n,e=[],r=-1,i=t.length,o=[0],a=[0];++r<3;)n=t[r],o.push(n[0]),a.push(n[1]);for(e.push(No(Rs,o)+","+No(Rs,a)),--r;++r<i;)n=t[r],o.shift(),o.push(n[0]),a.shift(),a.push(n[1]),Ro(e,o,a);return e.join("")}function Lo(t){for(var n,e,r=-1,i=t.length,o=i+4,a=[],u=[];++r<4;)e=t[r%i],a.push(e[0]),u.push(e[1]);for(n=[No(Rs,a),",",No(Rs,u)],--r;++r<o;)e=t[r%i],a.shift(),a.push(e[0]),u.shift(),u.push(e[1]),Ro(n,a,u);return n.join("")}function jo(t,n){var e=t.length-1;if(e)for(var r,i,o=t[0][0],a=t[0][1],u=t[e][0]-o,s=t[e][1]-a,l=-1;++l<=e;)r=t[l],i=l/e,r[0]=n*r[0]+(1-n)*(o+i*u),r[1]=n*r[1]+(1-n)*(a+i*s);return Oo(t)}function No(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]+t[3]*n[3]}function Ro(t,n,e){t.push("C",No(js,n),",",No(js,e),",",No(Ns,n),",",No(Ns,e),",",No(Rs,n),",",No(Rs,e))}function Do(t,n){return(n[1]-t[1])/(n[0]-t[0])}function Fo(t){for(var n=0,e=t.length-1,r=[],i=t[0],o=t[1],a=r[0]=Do(i,o);++n<e;)r[n]=(a+(a=Do(i=o,o=t[n+1])))/2;return r[n]=a,r}function Io(t){for(var n,e,r,i,o=[],a=Fo(t),u=-1,s=t.length-1;++u<s;)n=Do(t[u],t[u+1]),xa(n)<Da?a[u]=a[u+1]=0:(e=a[u]/n,r=a[u+1]/n,i=e*e+r*r,i>9&&(i=3*n/Math.sqrt(i),a[u]=i*e,a[u+1]=i*r));for(u=-1;++u<=s;)i=(t[Math.min(s,u+1)][0]-t[Math.max(0,u-1)][0])/(6*(1+a[u]*a[u])),o.push([i||0,a[u]*i||0]);return o}function zo(t){return t.length<3?bo(t):t[0]+Eo(t,Io(t))}function qo(t){for(var n,e,r,i=-1,o=t.length;++i<o;)n=t[i],e=n[0],r=n[1]-Va,n[0]=e*Math.cos(r),n[1]=e*Math.sin(r);return t}function Vo(t){function n(n){function s(){v.push("M",u(t(m),f),c,l(t(g.reverse()),f),"Z")}for(var h,p,d,v=[],g=[],m=[],y=-1,$=n.length,x=Mt(e),b=Mt(i),w=e===r?function(){return p}:Mt(r),C=i===o?function(){return d}:Mt(o);++y<$;)a.call(this,h=n[y],y)?(g.push([p=+x.call(this,h,y),d=+b.call(this,h,y)]),m.push([+w.call(this,h,y),+C.call(this,h,y)])):g.length&&(s(),g=[],m=[]);return g.length&&s(),v.length?v.join(""):null}var e=Ee,r=Ee,i=0,o=Pe,a=Pn,u=bo,s=u.key,l=u,c="L",f=.7;return n.x=function(t){return arguments.length?(e=r=t,n):r},n.x0=function(t){return arguments.length?(e=t,n):e},n.x1=function(t){return arguments.length?(r=t,n):r},n.y=function(t){return arguments.length?(i=o=t,n):o},n.y0=function(t){return arguments.length?(i=t,n):i},n.y1=function(t){return arguments.length?(o=t,n):o},n.defined=function(t){return arguments.length?(a=t,n):a},n.interpolate=function(t){return arguments.length?(s="function"==typeof t?u=t:(u=Ls.get(t)||bo).key,l=u.reverse||u,c=u.closed?"M":"L",n):s},n.tension=function(t){return arguments.length?(f=t,n):f},n}function Bo(t){return t.radius}function Wo(t){return[t.x,t.y]}function Uo(t){return function(){var n=t.apply(this,arguments),e=n[0],r=n[1]-Va;return[e*Math.cos(r),e*Math.sin(r)]}}function Ho(){return 64}function Yo(){return"circle"}function Go(t){var n=Math.sqrt(t/Ia);return"M0,"+n+"A"+n+","+n+" 0 1,1 0,"+-n+"A"+n+","+n+" 0 1,1 0,"+n+"Z"}function Xo(t){return function(){var n,e,r;(n=this[t])&&(r=n[e=n.active])&&(r.timer.c=null,r.timer.t=NaN,--n.count?delete n[e]:delete this[t],n.active+=.5,r.event&&r.event.interrupt.call(this,this.__data__,r.index))}}function Zo(t,n,e){return _a(t,Bs),t.namespace=n,t.id=e,t}function Jo(t,n,e,r){var i=t.id,o=t.namespace;return B(t,"function"==typeof e?function(t,a,u){t[o][i].tween.set(n,r(e.call(t,t.__data__,a,u)))}:(e=r(e),function(t){t[o][i].tween.set(n,e)}))}function Ko(t){return null==t&&(t=""),function(){this.textContent=t}}function Qo(t){return null==t?"__transition__":"__transition_"+t+"__"}function ta(t,n,e,r,i){function o(t){var n=v.delay;return c.t=n+s,t>=n?a(t-n):void(c.c=a)}function a(e){var i=d.active,o=d[i];o&&(o.timer.c=null,o.timer.t=NaN,--d.count,delete d[i],o.event&&o.event.interrupt.call(t,t.__data__,o.index));for(var a in d)if(r>+a){var l=d[a];l.timer.c=null,l.timer.t=NaN,--d.count,delete d[a]}c.c=u,Ot(function(){return c.c&&u(e||1)&&(c.c=null,c.t=NaN),1},0,s),d.active=r,v.event&&v.event.start.call(t,t.__data__,n),p=[],v.tween.forEach(function(e,r){(r=r.call(t,t.__data__,n))&&p.push(r)}),h=v.ease,f=v.duration}function u(i){for(var o=i/f,a=h(o),u=p.length;u>0;)p[--u].call(t,a);return o>=1?(v.event&&v.event.end.call(t,t.__data__,n),--d.count?delete d[r]:delete t[e],1):void 0}var s,c,f,h,p,d=t[e]||(t[e]={active:0,count:0}),v=d[r];v||(s=i.time,c=Ot(o,0,s),v=d[r]={tween:new l,time:s,timer:c,delay:i.delay,duration:i.duration,ease:i.ease,index:n},i=null,++d.count)}function na(t,n,e){t.attr("transform",function(t){var r=n(t);return"translate("+(isFinite(r)?r:e(t))+",0)"})}function ea(t,n,e){t.attr("transform",function(t){var r=n(t);return"translate(0,"+(isFinite(r)?r:e(t))+")"})}function ra(t){return t.toISOString()}function ia(t,n,e){function r(n){return t(n)}function i(t,e){var r=t[1]-t[0],i=r/e,o=sa.bisect(Ks,i);return o==Ks.length?[n.year,Ki(t.map(function(t){return t/31536e6}),e)[2]]:o?n[i/Ks[o-1]<Ks[o]/i?o-1:o]:[nl,Ki(t,e)[2]]}return r.invert=function(n){return oa(t.invert(n))},r.domain=function(n){return arguments.length?(t.domain(n),r):t.domain().map(oa)},r.nice=function(t,n){function e(e){return!isNaN(e)&&!t.range(e,oa(+e+1),n).length}var o=r.domain(),a=Bi(o),u=null==t?i(a,10):"number"==typeof t&&i(a,t);return u&&(t=u[0],n=u[1]),r.domain(Hi(o,n>1?{floor:function(n){for(;e(n=t.floor(n));)n=oa(n-1);return n},ceil:function(n){for(;e(n=t.ceil(n));)n=oa(+n+1);return n}}:t))},r.ticks=function(t,n){var e=Bi(r.domain()),o=null==t?i(e,10):"number"==typeof t?i(e,t):!t.range&&[{range:t},n];return o&&(t=o[0],n=o[1]),t.range(e[0],oa(+e[1]+1),1>n?1:n)},r.tickFormat=function(){return e},r.copy=function(){return ia(t.copy(),n,e)},Zi(r,t)}function oa(t){return new Date(t)}function aa(t){return JSON.parse(t.responseText)}function ua(t){var n=fa.createRange();return n.selectNode(fa.body),n.createContextualFragment(t.responseText)}var sa={version:"3.5.17"},la=[].slice,ca=function(t){return la.call(t)},fa=this.document;if(fa)try{ca(fa.documentElement.childNodes)[0].nodeType}catch(ha){ca=function(t){for(var n=t.length,e=new Array(n);n--;)e[n]=t[n];return e}}if(Date.now||(Date.now=function(){return+new Date}),fa)try{fa.createElement("DIV").style.setProperty("opacity",0,"")}catch(pa){var da=this.Element.prototype,va=da.setAttribute,ga=da.setAttributeNS,ma=this.CSSStyleDeclaration.prototype,ya=ma.setProperty;da.setAttribute=function(t,n){va.call(this,t,n+"")},da.setAttributeNS=function(t,n,e){ga.call(this,t,n,e+"")},ma.setProperty=function(t,n,e){ya.call(this,t,n+"",e)}}sa.ascending=e,sa.descending=function(t,n){return t>n?-1:n>t?1:n>=t?0:NaN},sa.min=function(t,n){var e,r,i=-1,o=t.length;if(1===arguments.length){for(;++i<o;)if(null!=(r=t[i])&&r>=r){e=r;break}for(;++i<o;)null!=(r=t[i])&&e>r&&(e=r)}else{for(;++i<o;)if(null!=(r=n.call(t,t[i],i))&&r>=r){e=r;break}for(;++i<o;)null!=(r=n.call(t,t[i],i))&&e>r&&(e=r)}return e},sa.max=function(t,n){var e,r,i=-1,o=t.length;if(1===arguments.length){for(;++i<o;)if(null!=(r=t[i])&&r>=r){e=r;break}for(;++i<o;)null!=(r=t[i])&&r>e&&(e=r)}else{for(;++i<o;)if(null!=(r=n.call(t,t[i],i))&&r>=r){e=r;break}for(;++i<o;)null!=(r=n.call(t,t[i],i))&&r>e&&(e=r)}return e},sa.extent=function(t,n){var e,r,i,o=-1,a=t.length;if(1===arguments.length){for(;++o<a;)if(null!=(r=t[o])&&r>=r){e=i=r;break}for(;++o<a;)null!=(r=t[o])&&(e>r&&(e=r),r>i&&(i=r))}else{for(;++o<a;)if(null!=(r=n.call(t,t[o],o))&&r>=r){e=i=r;break}for(;++o<a;)null!=(r=n.call(t,t[o],o))&&(e>r&&(e=r),r>i&&(i=r))}return[e,i]},sa.sum=function(t,n){var e,r=0,o=t.length,a=-1;if(1===arguments.length)for(;++a<o;)i(e=+t[a])&&(r+=e);else for(;++a<o;)i(e=+n.call(t,t[a],a))&&(r+=e);return r},sa.mean=function(t,n){
+var e,o=0,a=t.length,u=-1,s=a;if(1===arguments.length)for(;++u<a;)i(e=r(t[u]))?o+=e:--s;else for(;++u<a;)i(e=r(n.call(t,t[u],u)))?o+=e:--s;return s?o/s:void 0},sa.quantile=function(t,n){var e=(t.length-1)*n+1,r=Math.floor(e),i=+t[r-1],o=e-r;return o?i+o*(t[r]-i):i},sa.median=function(t,n){var o,a=[],u=t.length,s=-1;if(1===arguments.length)for(;++s<u;)i(o=r(t[s]))&&a.push(o);else for(;++s<u;)i(o=r(n.call(t,t[s],s)))&&a.push(o);return a.length?sa.quantile(a.sort(e),.5):void 0},sa.variance=function(t,n){var e,o,a=t.length,u=0,s=0,l=-1,c=0;if(1===arguments.length)for(;++l<a;)i(e=r(t[l]))&&(o=e-u,u+=o/++c,s+=o*(e-u));else for(;++l<a;)i(e=r(n.call(t,t[l],l)))&&(o=e-u,u+=o/++c,s+=o*(e-u));return c>1?s/(c-1):void 0},sa.deviation=function(){var t=sa.variance.apply(this,arguments);return t?Math.sqrt(t):t};var $a=o(e);sa.bisectLeft=$a.left,sa.bisect=sa.bisectRight=$a.right,sa.bisector=function(t){return o(1===t.length?function(n,r){return e(t(n),r)}:t)},sa.shuffle=function(t,n,e){(o=arguments.length)<3&&(e=t.length,2>o&&(n=0));for(var r,i,o=e-n;o;)i=Math.random()*o--|0,r=t[o+n],t[o+n]=t[i+n],t[i+n]=r;return t},sa.permute=function(t,n){for(var e=n.length,r=new Array(e);e--;)r[e]=t[n[e]];return r},sa.pairs=function(t){for(var n,e=0,r=t.length-1,i=t[0],o=new Array(0>r?0:r);r>e;)o[e]=[n=i,i=t[++e]];return o},sa.transpose=function(t){if(!(i=t.length))return[];for(var n=-1,e=sa.min(t,a),r=new Array(e);++n<e;)for(var i,o=-1,u=r[n]=new Array(i);++o<i;)u[o]=t[o][n];return r},sa.zip=function(){return sa.transpose(arguments)},sa.keys=function(t){var n=[];for(var e in t)n.push(e);return n},sa.values=function(t){var n=[];for(var e in t)n.push(t[e]);return n},sa.entries=function(t){var n=[];for(var e in t)n.push({key:e,value:t[e]});return n},sa.merge=function(t){for(var n,e,r,i=t.length,o=-1,a=0;++o<i;)a+=t[o].length;for(e=new Array(a);--i>=0;)for(r=t[i],n=r.length;--n>=0;)e[--a]=r[n];return e};var xa=Math.abs;sa.range=function(t,n,e){if(arguments.length<3&&(e=1,arguments.length<2&&(n=t,t=0)),(n-t)/e===1/0)throw new Error("infinite range");var r,i=[],o=u(xa(e)),a=-1;if(t*=o,n*=o,e*=o,0>e)for(;(r=t+e*++a)>n;)i.push(r/o);else for(;(r=t+e*++a)<n;)i.push(r/o);return i},sa.map=function(t,n){var e=new l;if(t instanceof l)t.forEach(function(t,n){e.set(t,n)});else if(Array.isArray(t)){var r,i=-1,o=t.length;if(1===arguments.length)for(;++i<o;)e.set(i,t[i]);else for(;++i<o;)e.set(n.call(t,r=t[i],i),r)}else for(var a in t)e.set(a,t[a]);return e};var ba="__proto__",wa="\x00";s(l,{has:h,get:function(t){return this._[c(t)]},set:function(t,n){return this._[c(t)]=n},remove:p,keys:d,values:function(){var t=[];for(var n in this._)t.push(this._[n]);return t},entries:function(){var t=[];for(var n in this._)t.push({key:f(n),value:this._[n]});return t},size:v,empty:g,forEach:function(t){for(var n in this._)t.call(this,f(n),this._[n])}}),sa.nest=function(){function t(n,a,u){if(u>=o.length)return r?r.call(i,a):e?a.sort(e):a;for(var s,c,f,h,p=-1,d=a.length,v=o[u++],g=new l;++p<d;)(h=g.get(s=v(c=a[p])))?h.push(c):g.set(s,[c]);return n?(c=n(),f=function(e,r){c.set(e,t(n,r,u))}):(c={},f=function(e,r){c[e]=t(n,r,u)}),g.forEach(f),c}function n(t,e){if(e>=o.length)return t;var r=[],i=a[e++];return t.forEach(function(t,i){r.push({key:t,values:n(i,e)})}),i?r.sort(function(t,n){return i(t.key,n.key)}):r}var e,r,i={},o=[],a=[];return i.map=function(n,e){return t(e,n,0)},i.entries=function(e){return n(t(sa.map,e,0),0)},i.key=function(t){return o.push(t),i},i.sortKeys=function(t){return a[o.length-1]=t,i},i.sortValues=function(t){return e=t,i},i.rollup=function(t){return r=t,i},i},sa.set=function(t){var n=new m;if(t)for(var e=0,r=t.length;r>e;++e)n.add(t[e]);return n},s(m,{has:h,add:function(t){return this._[c(t+="")]=!0,t},remove:p,values:d,size:v,empty:g,forEach:function(t){for(var n in this._)t.call(this,f(n))}}),sa.behavior={},sa.rebind=function(t,n){for(var e,r=1,i=arguments.length;++r<i;)t[e=arguments[r]]=$(t,n,n[e]);return t};var Ca=["webkit","ms","moz","Moz","o","O"];sa.dispatch=function(){for(var t=new w,n=-1,e=arguments.length;++n<e;)t[arguments[n]]=C(t);return t},w.prototype.on=function(t,n){var e=t.indexOf("."),r="";if(e>=0&&(r=t.slice(e+1),t=t.slice(0,e)),t)return arguments.length<2?this[t].on(r):this[t].on(r,n);if(2===arguments.length){if(null==n)for(t in this)this.hasOwnProperty(t)&&this[t].on(r,null);return this}},sa.event=null,sa.requote=function(t){return t.replace(Sa,"\\$&")};var Sa=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,_a={}.__proto__?function(t,n){t.__proto__=n}:function(t,n){for(var e in n)t[e]=n[e]},Ma=function(t,n){return n.querySelector(t)},ka=function(t,n){return n.querySelectorAll(t)},Aa=function(t,n){var e=t.matches||t[x(t,"matchesSelector")];return(Aa=function(t,n){return e.call(t,n)})(t,n)};"function"==typeof Sizzle&&(Ma=function(t,n){return Sizzle(t,n)[0]||null},ka=Sizzle,Aa=Sizzle.matchesSelector),sa.selection=function(){return sa.select(fa.documentElement)};var Ea=sa.selection.prototype=[];Ea.select=function(t){var n,e,r,i,o=[];t=A(t);for(var a=-1,u=this.length;++a<u;){o.push(n=[]),n.parentNode=(r=this[a]).parentNode;for(var s=-1,l=r.length;++s<l;)(i=r[s])?(n.push(e=t.call(i,i.__data__,s,a)),e&&"__data__"in i&&(e.__data__=i.__data__)):n.push(null)}return k(o)},Ea.selectAll=function(t){var n,e,r=[];t=E(t);for(var i=-1,o=this.length;++i<o;)for(var a=this[i],u=-1,s=a.length;++u<s;)(e=a[u])&&(r.push(n=ca(t.call(e,e.__data__,u,i))),n.parentNode=e);return k(r)};var Pa="http://www.w3.org/1999/xhtml",Oa={svg:"http://www.w3.org/2000/svg",xhtml:Pa,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};sa.ns={prefix:Oa,qualify:function(t){var n=t.indexOf(":"),e=t;return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),Oa.hasOwnProperty(e)?{space:Oa[e],local:t}:t}},Ea.attr=function(t,n){if(arguments.length<2){if("string"==typeof t){var e=this.node();return t=sa.ns.qualify(t),t.local?e.getAttributeNS(t.space,t.local):e.getAttribute(t)}for(n in t)this.each(P(n,t[n]));return this}return this.each(P(t,n))},Ea.classed=function(t,n){if(arguments.length<2){if("string"==typeof t){var e=this.node(),r=(t=L(t)).length,i=-1;if(n=e.classList){for(;++i<r;)if(!n.contains(t[i]))return!1}else for(n=e.getAttribute("class");++i<r;)if(!T(t[i]).test(n))return!1;return!0}for(n in t)this.each(j(n,t[n]));return this}return this.each(j(t,n))},Ea.style=function(t,e,r){var i=arguments.length;if(3>i){if("string"!=typeof t){2>i&&(e="");for(r in t)this.each(R(r,t[r],e));return this}if(2>i){var o=this.node();return n(o).getComputedStyle(o,null).getPropertyValue(t)}r=""}return this.each(R(t,e,r))},Ea.property=function(t,n){if(arguments.length<2){if("string"==typeof t)return this.node()[t];for(n in t)this.each(D(n,t[n]));return this}return this.each(D(t,n))},Ea.text=function(t){return arguments.length?this.each("function"==typeof t?function(){var n=t.apply(this,arguments);this.textContent=null==n?"":n}:null==t?function(){this.textContent=""}:function(){this.textContent=t}):this.node().textContent},Ea.html=function(t){return arguments.length?this.each("function"==typeof t?function(){var n=t.apply(this,arguments);this.innerHTML=null==n?"":n}:null==t?function(){this.innerHTML=""}:function(){this.innerHTML=t}):this.node().innerHTML},Ea.append=function(t){return t=F(t),this.select(function(){return this.appendChild(t.apply(this,arguments))})},Ea.insert=function(t,n){return t=F(t),n=A(n),this.select(function(){return this.insertBefore(t.apply(this,arguments),n.apply(this,arguments)||null)})},Ea.remove=function(){return this.each(I)},Ea.data=function(t,n){function e(t,e){var r,i,o,a=t.length,f=e.length,h=Math.min(a,f),p=new Array(f),d=new Array(f),v=new Array(a);if(n){var g,m=new l,y=new Array(a);for(r=-1;++r<a;)(i=t[r])&&(m.has(g=n.call(i,i.__data__,r))?v[r]=i:m.set(g,i),y[r]=g);for(r=-1;++r<f;)(i=m.get(g=n.call(e,o=e[r],r)))?i!==!0&&(p[r]=i,i.__data__=o):d[r]=z(o),m.set(g,!0);for(r=-1;++r<a;)r in y&&m.get(y[r])!==!0&&(v[r]=t[r])}else{for(r=-1;++r<h;)i=t[r],o=e[r],i?(i.__data__=o,p[r]=i):d[r]=z(o);for(;f>r;++r)d[r]=z(e[r]);for(;a>r;++r)v[r]=t[r]}d.update=p,d.parentNode=p.parentNode=v.parentNode=t.parentNode,u.push(d),s.push(p),c.push(v)}var r,i,o=-1,a=this.length;if(!arguments.length){for(t=new Array(a=(r=this[0]).length);++o<a;)(i=r[o])&&(t[o]=i.__data__);return t}var u=W([]),s=k([]),c=k([]);if("function"==typeof t)for(;++o<a;)e(r=this[o],t.call(r,r.parentNode.__data__,o));else for(;++o<a;)e(r=this[o],t);return s.enter=function(){return u},s.exit=function(){return c},s},Ea.datum=function(t){return arguments.length?this.property("__data__",t):this.property("__data__")},Ea.filter=function(t){var n,e,r,i=[];"function"!=typeof t&&(t=q(t));for(var o=0,a=this.length;a>o;o++){i.push(n=[]),n.parentNode=(e=this[o]).parentNode;for(var u=0,s=e.length;s>u;u++)(r=e[u])&&t.call(r,r.__data__,u,o)&&n.push(r)}return k(i)},Ea.order=function(){for(var t=-1,n=this.length;++t<n;)for(var e,r=this[t],i=r.length-1,o=r[i];--i>=0;)(e=r[i])&&(o&&o!==e.nextSibling&&o.parentNode.insertBefore(e,o),o=e);return this},Ea.sort=function(t){t=V.apply(this,arguments);for(var n=-1,e=this.length;++n<e;)this[n].sort(t);return this.order()},Ea.each=function(t){return B(this,function(n,e,r){t.call(n,n.__data__,e,r)})},Ea.call=function(t){var n=ca(arguments);return t.apply(n[0]=this,n),this},Ea.empty=function(){return!this.node()},Ea.node=function(){for(var t=0,n=this.length;n>t;t++)for(var e=this[t],r=0,i=e.length;i>r;r++){var o=e[r];if(o)return o}return null},Ea.size=function(){var t=0;return B(this,function(){++t}),t};var Ta=[];sa.selection.enter=W,sa.selection.enter.prototype=Ta,Ta.append=Ea.append,Ta.empty=Ea.empty,Ta.node=Ea.node,Ta.call=Ea.call,Ta.size=Ea.size,Ta.select=function(t){for(var n,e,r,i,o,a=[],u=-1,s=this.length;++u<s;){r=(i=this[u]).update,a.push(n=[]),n.parentNode=i.parentNode;for(var l=-1,c=i.length;++l<c;)(o=i[l])?(n.push(r[l]=e=t.call(i.parentNode,o.__data__,l,u)),e.__data__=o.__data__):n.push(null)}return k(a)},Ta.insert=function(t,n){return arguments.length<2&&(n=U(this)),Ea.insert.call(this,t,n)},sa.select=function(n){var e;return"string"==typeof n?(e=[Ma(n,fa)],e.parentNode=fa.documentElement):(e=[n],e.parentNode=t(n)),k([e])},sa.selectAll=function(t){var n;return"string"==typeof t?(n=ca(ka(t,fa)),n.parentNode=fa.documentElement):(n=ca(t),n.parentNode=null),k([n])},Ea.on=function(t,n,e){var r=arguments.length;if(3>r){if("string"!=typeof t){2>r&&(n=!1);for(e in t)this.each(H(e,t[e],n));return this}if(2>r)return(r=this.node()["__on"+t])&&r._;e=!1}return this.each(H(t,n,e))};var La=sa.map({mouseenter:"mouseover",mouseleave:"mouseout"});fa&&La.forEach(function(t){"on"+t in fa&&La.remove(t)});var ja,Na=0;sa.mouse=function(t){return Z(t,_())};var Ra=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;sa.touch=function(t,n,e){if(arguments.length<3&&(e=n,n=_().changedTouches),n)for(var r,i=0,o=n.length;o>i;++i)if((r=n[i]).identifier===e)return Z(t,r)},sa.behavior.drag=function(){function t(){this.on("mousedown.drag",o).on("touchstart.drag",a)}function e(t,n,e,o,a){return function(){function u(){var t,e,r=n(h,v);r&&(t=r[0]-$[0],e=r[1]-$[1],d|=t|e,$=r,p({type:"drag",x:r[0]+l[0],y:r[1]+l[1],dx:t,dy:e}))}function s(){n(h,v)&&(m.on(o+g,null).on(a+g,null),y(d),p({type:"dragend"}))}var l,c=this,f=sa.event.target.correspondingElement||sa.event.target,h=c.parentNode,p=r.of(c,arguments),d=0,v=t(),g=".drag"+(null==v?"":"-"+v),m=sa.select(e(f)).on(o+g,u).on(a+g,s),y=X(f),$=n(h,v);i?(l=i.apply(c,arguments),l=[l.x-$[0],l.y-$[1]]):l=[0,0],p({type:"dragstart"})}}var r=M(t,"drag","dragstart","dragend"),i=null,o=e(b,sa.mouse,n,"mousemove","mouseup"),a=e(J,sa.touch,y,"touchmove","touchend");return t.origin=function(n){return arguments.length?(i=n,t):i},sa.rebind(t,r,"on")},sa.touches=function(t,n){return arguments.length<2&&(n=_().touches),n?ca(n).map(function(n){var e=Z(t,n);return e.identifier=n.identifier,e}):[]};var Da=1e-6,Fa=Da*Da,Ia=Math.PI,za=2*Ia,qa=za-Da,Va=Ia/2,Ba=Ia/180,Wa=180/Ia,Ua=Math.SQRT2,Ha=2,Ya=4;sa.interpolateZoom=function(t,n){var e,r,i=t[0],o=t[1],a=t[2],u=n[0],s=n[1],l=n[2],c=u-i,f=s-o,h=c*c+f*f;if(Fa>h)r=Math.log(l/a)/Ua,e=function(t){return[i+t*c,o+t*f,a*Math.exp(Ua*t*r)]};else{var p=Math.sqrt(h),d=(l*l-a*a+Ya*h)/(2*a*Ha*p),v=(l*l-a*a-Ya*h)/(2*l*Ha*p),g=Math.log(Math.sqrt(d*d+1)-d),m=Math.log(Math.sqrt(v*v+1)-v);r=(m-g)/Ua,e=function(t){var n=t*r,e=rt(g),u=a/(Ha*p)*(e*it(Ua*n+g)-et(g));return[i+u*c,o+u*f,a*e/rt(Ua*n+g)]}}return e.duration=1e3*r,e},sa.behavior.zoom=function(){function t(t){t.on(O,f).on(Xa+".zoom",p).on("dblclick.zoom",d).on(j,h)}function e(t){return[(t[0]-_.x)/_.k,(t[1]-_.y)/_.k]}function r(t){return[t[0]*_.k+_.x,t[1]*_.k+_.y]}function i(t){_.k=Math.max(A[0],Math.min(A[1],t))}function o(t,n){n=r(n),_.x+=t[0]-n[0],_.y+=t[1]-n[1]}function a(n,e,r,a){n.__chart__={x:_.x,y:_.y,k:_.k},i(Math.pow(2,a)),o(g=e,r),n=sa.select(n),E>0&&(n=n.transition().duration(E)),n.call(t.event)}function u(){b&&b.domain(x.range().map(function(t){return(t-_.x)/_.k}).map(x.invert)),C&&C.domain(w.range().map(function(t){return(t-_.y)/_.k}).map(w.invert))}function s(t){P++||t({type:"zoomstart"})}function l(t){u(),t({type:"zoom",scale:_.k,translate:[_.x,_.y]})}function c(t){--P||(t({type:"zoomend"}),g=null)}function f(){function t(){u=1,o(sa.mouse(i),h),l(a)}function r(){f.on(T,null).on(L,null),p(u),c(a)}var i=this,a=N.of(i,arguments),u=0,f=sa.select(n(i)).on(T,t).on(L,r),h=e(sa.mouse(i)),p=X(i);Vs.call(i),s(a)}function h(){function t(){var t=sa.touches(d);return p=_.k,t.forEach(function(t){t.identifier in g&&(g[t.identifier]=e(t))}),t}function n(){var n=sa.event.target;sa.select(n).on(x,r).on(b,u),w.push(n);for(var e=sa.event.changedTouches,i=0,o=e.length;o>i;++i)g[e[i].identifier]=null;var s=t(),l=Date.now();if(1===s.length){if(500>l-$){var c=s[0];a(d,c,g[c.identifier],Math.floor(Math.log(_.k)/Math.LN2)+1),S()}$=l}else if(s.length>1){var c=s[0],f=s[1],h=c[0]-f[0],p=c[1]-f[1];m=h*h+p*p}}function r(){var t,n,e,r,a=sa.touches(d);Vs.call(d);for(var u=0,s=a.length;s>u;++u,r=null)if(e=a[u],r=g[e.identifier]){if(n)break;t=e,n=r}if(r){var c=(c=e[0]-t[0])*c+(c=e[1]-t[1])*c,f=m&&Math.sqrt(c/m);t=[(t[0]+e[0])/2,(t[1]+e[1])/2],n=[(n[0]+r[0])/2,(n[1]+r[1])/2],i(f*p)}$=null,o(t,n),l(v)}function u(){if(sa.event.touches.length){for(var n=sa.event.changedTouches,e=0,r=n.length;r>e;++e)delete g[n[e].identifier];for(var i in g)return void t()}sa.selectAll(w).on(y,null),C.on(O,f).on(j,h),M(),c(v)}var p,d=this,v=N.of(d,arguments),g={},m=0,y=".zoom-"+sa.event.changedTouches[0].identifier,x="touchmove"+y,b="touchend"+y,w=[],C=sa.select(d),M=X(d);n(),s(v),C.on(O,null).on(j,n)}function p(){var t=N.of(this,arguments);y?clearTimeout(y):(Vs.call(this),v=e(g=m||sa.mouse(this)),s(t)),y=setTimeout(function(){y=null,c(t)},50),S(),i(Math.pow(2,.002*Ga())*_.k),o(g,v),l(t)}function d(){var t=sa.mouse(this),n=Math.log(_.k)/Math.LN2;a(this,t,e(t),sa.event.shiftKey?Math.ceil(n)-1:Math.floor(n)+1)}var v,g,m,y,$,x,b,w,C,_={x:0,y:0,k:1},k=[960,500],A=Za,E=250,P=0,O="mousedown.zoom",T="mousemove.zoom",L="mouseup.zoom",j="touchstart.zoom",N=M(t,"zoomstart","zoom","zoomend");return Xa||(Xa="onwheel"in fa?(Ga=function(){return-sa.event.deltaY*(sa.event.deltaMode?120:1)},"wheel"):"onmousewheel"in fa?(Ga=function(){return sa.event.wheelDelta},"mousewheel"):(Ga=function(){return-sa.event.detail},"MozMousePixelScroll")),t.event=function(t){t.each(function(){var t=N.of(this,arguments),n=_;zs?sa.select(this).transition().each("start.zoom",function(){_=this.__chart__||{x:0,y:0,k:1},s(t)}).tween("zoom:zoom",function(){var e=k[0],r=k[1],i=g?g[0]:e/2,o=g?g[1]:r/2,a=sa.interpolateZoom([(i-_.x)/_.k,(o-_.y)/_.k,e/_.k],[(i-n.x)/n.k,(o-n.y)/n.k,e/n.k]);return function(n){var r=a(n),u=e/r[2];this.__chart__=_={x:i-r[0]*u,y:o-r[1]*u,k:u},l(t)}}).each("interrupt.zoom",function(){c(t)}).each("end.zoom",function(){c(t)}):(this.__chart__=_,s(t),l(t),c(t))})},t.translate=function(n){return arguments.length?(_={x:+n[0],y:+n[1],k:_.k},u(),t):[_.x,_.y]},t.scale=function(n){return arguments.length?(_={x:_.x,y:_.y,k:null},i(+n),u(),t):_.k},t.scaleExtent=function(n){return arguments.length?(A=null==n?Za:[+n[0],+n[1]],t):A},t.center=function(n){return arguments.length?(m=n&&[+n[0],+n[1]],t):m},t.size=function(n){return arguments.length?(k=n&&[+n[0],+n[1]],t):k},t.duration=function(n){return arguments.length?(E=+n,t):E},t.x=function(n){return arguments.length?(b=n,x=n.copy(),_={x:0,y:0,k:1},t):b},t.y=function(n){return arguments.length?(C=n,w=n.copy(),_={x:0,y:0,k:1},t):C},sa.rebind(t,N,"on")};var Ga,Xa,Za=[0,1/0];sa.color=at,at.prototype.toString=function(){return this.rgb()+""},sa.hsl=ut;var Ja=ut.prototype=new at;Ja.brighter=function(t){return t=Math.pow(.7,arguments.length?t:1),new ut(this.h,this.s,this.l/t)},Ja.darker=function(t){return t=Math.pow(.7,arguments.length?t:1),new ut(this.h,this.s,t*this.l)},Ja.rgb=function(){return st(this.h,this.s,this.l)},sa.hcl=lt;var Ka=lt.prototype=new at;Ka.brighter=function(t){return new lt(this.h,this.c,Math.min(100,this.l+Qa*(arguments.length?t:1)))},Ka.darker=function(t){return new lt(this.h,this.c,Math.max(0,this.l-Qa*(arguments.length?t:1)))},Ka.rgb=function(){return ct(this.h,this.c,this.l).rgb()},sa.lab=ft;var Qa=18,tu=.95047,nu=1,eu=1.08883,ru=ft.prototype=new at;ru.brighter=function(t){return new ft(Math.min(100,this.l+Qa*(arguments.length?t:1)),this.a,this.b)},ru.darker=function(t){return new ft(Math.max(0,this.l-Qa*(arguments.length?t:1)),this.a,this.b)},ru.rgb=function(){return ht(this.l,this.a,this.b)},sa.rgb=mt;var iu=mt.prototype=new at;iu.brighter=function(t){t=Math.pow(.7,arguments.length?t:1);var n=this.r,e=this.g,r=this.b,i=30;return n||e||r?(n&&i>n&&(n=i),e&&i>e&&(e=i),r&&i>r&&(r=i),new mt(Math.min(255,n/t),Math.min(255,e/t),Math.min(255,r/t))):new mt(i,i,i)},iu.darker=function(t){return t=Math.pow(.7,arguments.length?t:1),new mt(t*this.r,t*this.g,t*this.b)},iu.hsl=function(){return wt(this.r,this.g,this.b)},iu.toString=function(){return"#"+xt(this.r)+xt(this.g)+xt(this.b)};var ou=sa.map({aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074});ou.forEach(function(t,n){ou.set(t,yt(n))}),sa.functor=Mt,sa.xhr=kt(y),sa.dsv=function(t,n){function e(t,e,o){arguments.length<3&&(o=e,e=null);var a=At(t,n,null==e?r:i(e),o);return a.row=function(t){return arguments.length?a.response(null==(e=t)?r:i(t)):e},a}function r(t){return e.parse(t.responseText)}function i(t){return function(n){return e.parse(n.responseText,t)}}function o(n){return n.map(a).join(t)}function a(t){return u.test(t)?'"'+t.replace(/\"/g,'""')+'"':t}var u=new RegExp('["'+t+"\n]"),s=t.charCodeAt(0);return e.parse=function(t,n){var r;return e.parseRows(t,function(t,e){if(r)return r(t,e-1);var i=new Function("d","return {"+t.map(function(t,n){return JSON.stringify(t)+": d["+n+"]"}).join(",")+"}");r=n?function(t,e){return n(i(t),e)}:i})},e.parseRows=function(t,n){function e(){if(c>=l)return a;if(i)return i=!1,o;var n=c;if(34===t.charCodeAt(n)){for(var e=n;e++<l;)if(34===t.charCodeAt(e)){if(34!==t.charCodeAt(e+1))break;++e}c=e+2;var r=t.charCodeAt(e+1);return 13===r?(i=!0,10===t.charCodeAt(e+2)&&++c):10===r&&(i=!0),t.slice(n+1,e).replace(/""/g,'"')}for(;l>c;){var r=t.charCodeAt(c++),u=1;if(10===r)i=!0;else if(13===r)i=!0,10===t.charCodeAt(c)&&(++c,++u);else if(r!==s)continue;return t.slice(n,c-u)}return t.slice(n)}for(var r,i,o={},a={},u=[],l=t.length,c=0,f=0;(r=e())!==a;){for(var h=[];r!==o&&r!==a;)h.push(r),r=e();n&&null==(h=n(h,f++))||u.push(h)}return u},e.format=function(n){if(Array.isArray(n[0]))return e.formatRows(n);var r=new m,i=[];return n.forEach(function(t){for(var n in t)r.has(n)||i.push(r.add(n))}),[i.map(a).join(t)].concat(n.map(function(n){return i.map(function(t){return a(n[t])}).join(t)})).join("\n")},e.formatRows=function(t){return t.map(o).join("\n")},e},sa.csv=sa.dsv(",","text/csv"),sa.tsv=sa.dsv(" ","text/tab-separated-values");var au,uu,su,lu,cu=this[x(this,"requestAnimationFrame")]||function(t){setTimeout(t,17)};sa.timer=function(){Ot.apply(this,arguments)},sa.timer.flush=function(){Lt(),jt()},sa.round=function(t,n){return n?Math.round(t*(n=Math.pow(10,n)))/n:Math.round(t)};var fu=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"].map(Rt);sa.formatPrefix=function(t,n){var e=0;return(t=+t)&&(0>t&&(t*=-1),n&&(t=sa.round(t,Nt(t,n))),e=1+Math.floor(1e-12+Math.log(t)/Math.LN10),e=Math.max(-24,Math.min(24,3*Math.floor((e-1)/3)))),fu[8+e/3]};var hu=/(?:([^{])?([<>=^]))?([+\- ])?([$#])?(0)?(\d+)?(,)?(\.-?\d+)?([a-z%])?/i,pu=sa.map({b:function(t){return t.toString(2)},c:function(t){return String.fromCharCode(t)},o:function(t){return t.toString(8)},x:function(t){return t.toString(16)},X:function(t){return t.toString(16).toUpperCase()},g:function(t,n){return t.toPrecision(n)},e:function(t,n){return t.toExponential(n)},f:function(t,n){return t.toFixed(n)},r:function(t,n){return(t=sa.round(t,Nt(t,n))).toFixed(Math.max(0,Math.min(20,Nt(t*(1+1e-15),n))))}}),du=sa.time={},vu=Date;It.prototype={getDate:function(){return this._.getUTCDate()},getDay:function(){return this._.getUTCDay()},getFullYear:function(){return this._.getUTCFullYear()},getHours:function(){return this._.getUTCHours()},getMilliseconds:function(){return this._.getUTCMilliseconds()},getMinutes:function(){return this._.getUTCMinutes()},getMonth:function(){return this._.getUTCMonth()},getSeconds:function(){return this._.getUTCSeconds()},getTime:function(){return this._.getTime()},getTimezoneOffset:function(){return 0},valueOf:function(){return this._.valueOf()},setDate:function(){gu.setUTCDate.apply(this._,arguments)},setDay:function(){gu.setUTCDay.apply(this._,arguments)},setFullYear:function(){gu.setUTCFullYear.apply(this._,arguments)},setHours:function(){gu.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){gu.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){gu.setUTCMinutes.apply(this._,arguments)},setMonth:function(){gu.setUTCMonth.apply(this._,arguments)},setSeconds:function(){gu.setUTCSeconds.apply(this._,arguments)},setTime:function(){gu.setTime.apply(this._,arguments)}};var gu=Date.prototype;du.year=zt(function(t){return t=du.day(t),t.setMonth(0,1),t},function(t,n){t.setFullYear(t.getFullYear()+n)},function(t){return t.getFullYear()}),du.years=du.year.range,du.years.utc=du.year.utc.range,du.day=zt(function(t){var n=new vu(2e3,0);return n.setFullYear(t.getFullYear(),t.getMonth(),t.getDate()),n},function(t,n){t.setDate(t.getDate()+n)},function(t){return t.getDate()-1}),du.days=du.day.range,du.days.utc=du.day.utc.range,du.dayOfYear=function(t){var n=du.year(t);return Math.floor((t-n-6e4*(t.getTimezoneOffset()-n.getTimezoneOffset()))/864e5)},["sunday","monday","tuesday","wednesday","thursday","friday","saturday"].forEach(function(t,n){n=7-n;var e=du[t]=zt(function(t){return(t=du.day(t)).setDate(t.getDate()-(t.getDay()+n)%7),t},function(t,n){t.setDate(t.getDate()+7*Math.floor(n))},function(t){var e=du.year(t).getDay();return Math.floor((du.dayOfYear(t)+(e+n)%7)/7)-(e!==n)});du[t+"s"]=e.range,du[t+"s"].utc=e.utc.range,du[t+"OfYear"]=function(t){var e=du.year(t).getDay();return Math.floor((du.dayOfYear(t)+(e+n)%7)/7)}}),du.week=du.sunday,du.weeks=du.sunday.range,du.weeks.utc=du.sunday.utc.range,du.weekOfYear=du.sundayOfYear;var mu={"-":"",_:" ",0:"0"},yu=/^\s*\d+/,$u=/^%/;sa.locale=function(t){return{numberFormat:Dt(t),timeFormat:Vt(t)}};var xu=sa.locale({decimal:".",thousands:",",grouping:[3],currency:["$",""],dateTime:"%a %b %e %X %Y",date:"%m/%d/%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});sa.format=xu.numberFormat,sa.geo={},cn.prototype={s:0,t:0,add:function(t){fn(t,this.t,bu),fn(bu.s,this.s,this),this.s?this.t+=bu.t:this.s=bu.t},reset:function(){this.s=this.t=0},valueOf:function(){return this.s}};var bu=new cn;sa.geo.stream=function(t,n){t&&wu.hasOwnProperty(t.type)?wu[t.type](t,n):hn(t,n)};var wu={Feature:function(t,n){hn(t.geometry,n)},FeatureCollection:function(t,n){for(var e=t.features,r=-1,i=e.length;++r<i;)hn(e[r].geometry,n)}},Cu={Sphere:function(t,n){n.sphere()},Point:function(t,n){t=t.coordinates,n.point(t[0],t[1],t[2])},MultiPoint:function(t,n){for(var e=t.coordinates,r=-1,i=e.length;++r<i;)t=e[r],n.point(t[0],t[1],t[2])},LineString:function(t,n){pn(t.coordinates,n,0)},MultiLineString:function(t,n){for(var e=t.coordinates,r=-1,i=e.length;++r<i;)pn(e[r],n,0)},Polygon:function(t,n){dn(t.coordinates,n)},MultiPolygon:function(t,n){for(var e=t.coordinates,r=-1,i=e.length;++r<i;)dn(e[r],n)},GeometryCollection:function(t,n){for(var e=t.geometries,r=-1,i=e.length;++r<i;)hn(e[r],n)}};sa.geo.area=function(t){return Su=0,sa.geo.stream(t,Mu),Su};var Su,_u=new cn,Mu={sphere:function(){Su+=4*Ia},point:b,lineStart:b,lineEnd:b,polygonStart:function(){_u.reset(),Mu.lineStart=vn},polygonEnd:function(){var t=2*_u;Su+=0>t?4*Ia+t:t,Mu.lineStart=Mu.lineEnd=Mu.point=b}};sa.geo.bounds=function(){function t(t,n){$.push(x=[c=t,h=t]),f>n&&(f=n),n>p&&(p=n)}function n(n,e){var r=gn([n*Ba,e*Ba]);if(m){var i=yn(m,r),o=[i[1],-i[0],0],a=yn(o,i);bn(a),a=wn(a);var s=n-d,l=s>0?1:-1,v=a[0]*Wa*l,g=xa(s)>180;if(g^(v>l*d&&l*n>v)){var y=a[1]*Wa;y>p&&(p=y)}else if(v=(v+360)%360-180,g^(v>l*d&&l*n>v)){var y=-a[1]*Wa;f>y&&(f=y)}else f>e&&(f=e),e>p&&(p=e);g?d>n?u(c,n)>u(c,h)&&(h=n):u(n,h)>u(c,h)&&(c=n):h>=c?(c>n&&(c=n),n>h&&(h=n)):n>d?u(c,n)>u(c,h)&&(h=n):u(n,h)>u(c,h)&&(c=n)}else t(n,e);m=r,d=n}function e(){b.point=n}function r(){x[0]=c,x[1]=h,b.point=t,m=null}function i(t,e){if(m){var r=t-d;y+=xa(r)>180?r+(r>0?360:-360):r}else v=t,g=e;Mu.point(t,e),n(t,e)}function o(){Mu.lineStart()}function a(){i(v,g),Mu.lineEnd(),xa(y)>Da&&(c=-(h=180)),x[0]=c,x[1]=h,m=null}function u(t,n){return(n-=t)<0?n+360:n}function s(t,n){return t[0]-n[0]}function l(t,n){return n[0]<=n[1]?n[0]<=t&&t<=n[1]:t<n[0]||n[1]<t}var c,f,h,p,d,v,g,m,y,$,x,b={point:t,lineStart:e,lineEnd:r,polygonStart:function(){b.point=i,b.lineStart=o,b.lineEnd=a,y=0,Mu.polygonStart()},polygonEnd:function(){Mu.polygonEnd(),b.point=t,b.lineStart=e,b.lineEnd=r,0>_u?(c=-(h=180),f=-(p=90)):y>Da?p=90:-Da>y&&(f=-90),x[0]=c,x[1]=h}};return function(t){p=h=-(c=f=1/0),$=[],sa.geo.stream(t,b);var n=$.length;if(n){$.sort(s);for(var e,r=1,i=$[0],o=[i];n>r;++r)e=$[r],l(e[0],i)||l(e[1],i)?(u(i[0],e[1])>u(i[0],i[1])&&(i[1]=e[1]),u(e[0],i[1])>u(i[0],i[1])&&(i[0]=e[0])):o.push(i=e);for(var a,e,d=-(1/0),n=o.length-1,r=0,i=o[n];n>=r;i=e,++r)e=o[r],(a=u(i[1],e[0]))>d&&(d=a,c=e[0],h=i[1])}return $=x=null,c===1/0||f===1/0?[[NaN,NaN],[NaN,NaN]]:[[c,f],[h,p]]}}(),sa.geo.centroid=function(t){ku=Au=Eu=Pu=Ou=Tu=Lu=ju=Nu=Ru=Du=0,sa.geo.stream(t,Fu);var n=Nu,e=Ru,r=Du,i=n*n+e*e+r*r;return Fa>i&&(n=Tu,e=Lu,r=ju,Da>Au&&(n=Eu,e=Pu,r=Ou),i=n*n+e*e+r*r,Fa>i)?[NaN,NaN]:[Math.atan2(e,n)*Wa,nt(r/Math.sqrt(i))*Wa]};var ku,Au,Eu,Pu,Ou,Tu,Lu,ju,Nu,Ru,Du,Fu={sphere:b,point:Sn,lineStart:Mn,lineEnd:kn,polygonStart:function(){Fu.lineStart=An},polygonEnd:function(){Fu.lineStart=Mn}},Iu=jn(Pn,Fn,zn,[-Ia,-Ia/2]),zu=1e9;sa.geo.clipExtent=function(){var t,n,e,r,i,o,a={stream:function(t){return i&&(i.valid=!1),i=o(t),i.valid=!0,i},extent:function(u){return arguments.length?(o=Wn(t=+u[0][0],n=+u[0][1],e=+u[1][0],r=+u[1][1]),i&&(i.valid=!1,i=null),a):[[t,n],[e,r]]}};return a.extent([[0,0],[960,500]])},(sa.geo.conicEqualArea=function(){return Un(Hn)}).raw=Hn,sa.geo.albers=function(){return sa.geo.conicEqualArea().rotate([96,0]).center([-.6,38.7]).parallels([29.5,45.5]).scale(1070)},sa.geo.albersUsa=function(){function t(t){var o=t[0],a=t[1];return n=null,e(o,a),n||(r(o,a),n)||i(o,a),n}var n,e,r,i,o=sa.geo.albers(),a=sa.geo.conicEqualArea().rotate([154,0]).center([-2,58.5]).parallels([55,65]),u=sa.geo.conicEqualArea().rotate([157,0]).center([-3,19.9]).parallels([8,18]),s={point:function(t,e){n=[t,e]}};return t.invert=function(t){var n=o.scale(),e=o.translate(),r=(t[0]-e[0])/n,i=(t[1]-e[1])/n;return(i>=.12&&.234>i&&r>=-.425&&-.214>r?a:i>=.166&&.234>i&&r>=-.214&&-.115>r?u:o).invert(t)},t.stream=function(t){var n=o.stream(t),e=a.stream(t),r=u.stream(t);return{point:function(t,i){n.point(t,i),e.point(t,i),r.point(t,i)},sphere:function(){n.sphere(),e.sphere(),r.sphere()},lineStart:function(){n.lineStart(),e.lineStart(),r.lineStart()},lineEnd:function(){n.lineEnd(),e.lineEnd(),r.lineEnd()},polygonStart:function(){n.polygonStart(),e.polygonStart(),r.polygonStart()},polygonEnd:function(){n.polygonEnd(),e.polygonEnd(),r.polygonEnd()}}},t.precision=function(n){return arguments.length?(o.precision(n),a.precision(n),u.precision(n),t):o.precision()},t.scale=function(n){return arguments.length?(o.scale(n),a.scale(.35*n),u.scale(n),t.translate(o.translate())):o.scale()},t.translate=function(n){if(!arguments.length)return o.translate();var l=o.scale(),c=+n[0],f=+n[1];return e=o.translate(n).clipExtent([[c-.455*l,f-.238*l],[c+.455*l,f+.238*l]]).stream(s).point,r=a.translate([c-.307*l,f+.201*l]).clipExtent([[c-.425*l+Da,f+.12*l+Da],[c-.214*l-Da,f+.234*l-Da]]).stream(s).point,i=u.translate([c-.205*l,f+.212*l]).clipExtent([[c-.214*l+Da,f+.166*l+Da],[c-.115*l-Da,f+.234*l-Da]]).stream(s).point,t},t.scale(1070)};var qu,Vu,Bu,Wu,Uu,Hu,Yu={point:b,lineStart:b,lineEnd:b,polygonStart:function(){Vu=0,Yu.lineStart=Yn;
+},polygonEnd:function(){Yu.lineStart=Yu.lineEnd=Yu.point=b,qu+=xa(Vu/2)}},Gu={point:Gn,lineStart:b,lineEnd:b,polygonStart:b,polygonEnd:b},Xu={point:Jn,lineStart:Kn,lineEnd:Qn,polygonStart:function(){Xu.lineStart=te},polygonEnd:function(){Xu.point=Jn,Xu.lineStart=Kn,Xu.lineEnd=Qn}};sa.geo.path=function(){function t(t){return t&&("function"==typeof u&&o.pointRadius(+u.apply(this,arguments)),a&&a.valid||(a=i(o)),sa.geo.stream(t,a)),o.result()}function n(){return a=null,t}var e,r,i,o,a,u=4.5;return t.area=function(t){return qu=0,sa.geo.stream(t,i(Yu)),qu},t.centroid=function(t){return Eu=Pu=Ou=Tu=Lu=ju=Nu=Ru=Du=0,sa.geo.stream(t,i(Xu)),Du?[Nu/Du,Ru/Du]:ju?[Tu/ju,Lu/ju]:Ou?[Eu/Ou,Pu/Ou]:[NaN,NaN]},t.bounds=function(t){return Uu=Hu=-(Bu=Wu=1/0),sa.geo.stream(t,i(Gu)),[[Bu,Wu],[Uu,Hu]]},t.projection=function(t){return arguments.length?(i=(e=t)?t.stream||re(t):y,n()):e},t.context=function(t){return arguments.length?(o=null==(r=t)?new Xn:new ne(t),"function"!=typeof u&&o.pointRadius(u),n()):r},t.pointRadius=function(n){return arguments.length?(u="function"==typeof n?n:(o.pointRadius(+n),+n),t):u},t.projection(sa.geo.albersUsa()).context(null)},sa.geo.transform=function(t){return{stream:function(n){var e=new ie(n);for(var r in t)e[r]=t[r];return e}}},ie.prototype={point:function(t,n){this.stream.point(t,n)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}},sa.geo.projection=ae,sa.geo.projectionMutator=ue,(sa.geo.equirectangular=function(){return ae(le)}).raw=le.invert=le,sa.geo.rotation=function(t){function n(n){return n=t(n[0]*Ba,n[1]*Ba),n[0]*=Wa,n[1]*=Wa,n}return t=fe(t[0]%360*Ba,t[1]*Ba,t.length>2?t[2]*Ba:0),n.invert=function(n){return n=t.invert(n[0]*Ba,n[1]*Ba),n[0]*=Wa,n[1]*=Wa,n},n},ce.invert=le,sa.geo.circle=function(){function t(){var t="function"==typeof r?r.apply(this,arguments):r,n=fe(-t[0]*Ba,-t[1]*Ba,0).invert,i=[];return e(null,null,1,{point:function(t,e){i.push(t=n(t,e)),t[0]*=Wa,t[1]*=Wa}}),{type:"Polygon",coordinates:[i]}}var n,e,r=[0,0],i=6;return t.origin=function(n){return arguments.length?(r=n,t):r},t.angle=function(r){return arguments.length?(e=ve((n=+r)*Ba,i*Ba),t):n},t.precision=function(r){return arguments.length?(e=ve(n*Ba,(i=+r)*Ba),t):i},t.angle(90)},sa.geo.distance=function(t,n){var e,r=(n[0]-t[0])*Ba,i=t[1]*Ba,o=n[1]*Ba,a=Math.sin(r),u=Math.cos(r),s=Math.sin(i),l=Math.cos(i),c=Math.sin(o),f=Math.cos(o);return Math.atan2(Math.sqrt((e=f*a)*e+(e=l*c-s*f*u)*e),s*c+l*f*u)},sa.geo.graticule=function(){function t(){return{type:"MultiLineString",coordinates:n()}}function n(){return sa.range(Math.ceil(o/g)*g,i,g).map(h).concat(sa.range(Math.ceil(l/m)*m,s,m).map(p)).concat(sa.range(Math.ceil(r/d)*d,e,d).filter(function(t){return xa(t%g)>Da}).map(c)).concat(sa.range(Math.ceil(u/v)*v,a,v).filter(function(t){return xa(t%m)>Da}).map(f))}var e,r,i,o,a,u,s,l,c,f,h,p,d=10,v=d,g=90,m=360,y=2.5;return t.lines=function(){return n().map(function(t){return{type:"LineString",coordinates:t}})},t.outline=function(){return{type:"Polygon",coordinates:[h(o).concat(p(s).slice(1),h(i).reverse().slice(1),p(l).reverse().slice(1))]}},t.extent=function(n){return arguments.length?t.majorExtent(n).minorExtent(n):t.minorExtent()},t.majorExtent=function(n){return arguments.length?(o=+n[0][0],i=+n[1][0],l=+n[0][1],s=+n[1][1],o>i&&(n=o,o=i,i=n),l>s&&(n=l,l=s,s=n),t.precision(y)):[[o,l],[i,s]]},t.minorExtent=function(n){return arguments.length?(r=+n[0][0],e=+n[1][0],u=+n[0][1],a=+n[1][1],r>e&&(n=r,r=e,e=n),u>a&&(n=u,u=a,a=n),t.precision(y)):[[r,u],[e,a]]},t.step=function(n){return arguments.length?t.majorStep(n).minorStep(n):t.minorStep()},t.majorStep=function(n){return arguments.length?(g=+n[0],m=+n[1],t):[g,m]},t.minorStep=function(n){return arguments.length?(d=+n[0],v=+n[1],t):[d,v]},t.precision=function(n){return arguments.length?(y=+n,c=me(u,a,90),f=ye(r,e,y),h=me(l,s,90),p=ye(o,i,y),t):y},t.majorExtent([[-180,-90+Da],[180,90-Da]]).minorExtent([[-180,-80-Da],[180,80+Da]])},sa.geo.greatArc=function(){function t(){return{type:"LineString",coordinates:[n||r.apply(this,arguments),e||i.apply(this,arguments)]}}var n,e,r=$e,i=xe;return t.distance=function(){return sa.geo.distance(n||r.apply(this,arguments),e||i.apply(this,arguments))},t.source=function(e){return arguments.length?(r=e,n="function"==typeof e?null:e,t):r},t.target=function(n){return arguments.length?(i=n,e="function"==typeof n?null:n,t):i},t.precision=function(){return arguments.length?t:0},t},sa.geo.interpolate=function(t,n){return be(t[0]*Ba,t[1]*Ba,n[0]*Ba,n[1]*Ba)},sa.geo.length=function(t){return Zu=0,sa.geo.stream(t,Ju),Zu};var Zu,Ju={sphere:b,point:b,lineStart:we,lineEnd:b,polygonStart:b,polygonEnd:b},Ku=Ce(function(t){return Math.sqrt(2/(1+t))},function(t){return 2*Math.asin(t/2)});(sa.geo.azimuthalEqualArea=function(){return ae(Ku)}).raw=Ku;var Qu=Ce(function(t){var n=Math.acos(t);return n&&n/Math.sin(n)},y);(sa.geo.azimuthalEquidistant=function(){return ae(Qu)}).raw=Qu,(sa.geo.conicConformal=function(){return Un(Se)}).raw=Se,(sa.geo.conicEquidistant=function(){return Un(_e)}).raw=_e;var ts=Ce(function(t){return 1/t},Math.atan);(sa.geo.gnomonic=function(){return ae(ts)}).raw=ts,Me.invert=function(t,n){return[t,2*Math.atan(Math.exp(n))-Va]},(sa.geo.mercator=function(){return ke(Me)}).raw=Me;var ns=Ce(function(){return 1},Math.asin);(sa.geo.orthographic=function(){return ae(ns)}).raw=ns;var es=Ce(function(t){return 1/(1+t)},function(t){return 2*Math.atan(t)});(sa.geo.stereographic=function(){return ae(es)}).raw=es,Ae.invert=function(t,n){return[-n,2*Math.atan(Math.exp(t))-Va]},(sa.geo.transverseMercator=function(){var t=ke(Ae),n=t.center,e=t.rotate;return t.center=function(t){return t?n([-t[1],t[0]]):(t=n(),[t[1],-t[0]])},t.rotate=function(t){return t?e([t[0],t[1],t.length>2?t[2]+90:90]):(t=e(),[t[0],t[1],t[2]-90])},e([0,0,90])}).raw=Ae,sa.geom={},sa.geom.hull=function(t){function n(t){if(t.length<3)return[];var n,i=Mt(e),o=Mt(r),a=t.length,u=[],s=[];for(n=0;a>n;n++)u.push([+i.call(this,t[n],n),+o.call(this,t[n],n),n]);for(u.sort(Te),n=0;a>n;n++)s.push([u[n][0],-u[n][1]]);var l=Oe(u),c=Oe(s),f=c[0]===l[0],h=c[c.length-1]===l[l.length-1],p=[];for(n=l.length-1;n>=0;--n)p.push(t[u[l[n]][2]]);for(n=+f;n<c.length-h;++n)p.push(t[u[c[n]][2]]);return p}var e=Ee,r=Pe;return arguments.length?n(t):(n.x=function(t){return arguments.length?(e=t,n):e},n.y=function(t){return arguments.length?(r=t,n):r},n)},sa.geom.polygon=function(t){return _a(t,rs),t};var rs=sa.geom.polygon.prototype=[];rs.area=function(){for(var t,n=-1,e=this.length,r=this[e-1],i=0;++n<e;)t=r,r=this[n],i+=t[1]*r[0]-t[0]*r[1];return.5*i},rs.centroid=function(t){var n,e,r=-1,i=this.length,o=0,a=0,u=this[i-1];for(arguments.length||(t=-1/(6*this.area()));++r<i;)n=u,u=this[r],e=n[0]*u[1]-u[0]*n[1],o+=(n[0]+u[0])*e,a+=(n[1]+u[1])*e;return[o*t,a*t]},rs.clip=function(t){for(var n,e,r,i,o,a,u=Ne(t),s=-1,l=this.length-Ne(this),c=this[l-1];++s<l;){for(n=t.slice(),t.length=0,i=this[s],o=n[(r=n.length-u)-1],e=-1;++e<r;)a=n[e],Le(a,c,i)?(Le(o,c,i)||t.push(je(o,a,c,i)),t.push(a)):Le(o,c,i)&&t.push(je(o,a,c,i)),o=a;u&&t.push(t[0]),c=i}return t};var is,os,as,us,ss,ls=[],cs=[];Be.prototype.prepare=function(){for(var t,n=this.edges,e=n.length;e--;)t=n[e].edge,t.b&&t.a||n.splice(e,1);return n.sort(Ue),n.length},nr.prototype={start:function(){return this.edge.l===this.site?this.edge.a:this.edge.b},end:function(){return this.edge.l===this.site?this.edge.b:this.edge.a}},er.prototype={insert:function(t,n){var e,r,i;if(t){if(n.P=t,n.N=t.N,t.N&&(t.N.P=n),t.N=n,t.R){for(t=t.R;t.L;)t=t.L;t.L=n}else t.R=n;e=t}else this._?(t=ar(this._),n.P=null,n.N=t,t.P=t.L=n,e=t):(n.P=n.N=null,this._=n,e=null);for(n.L=n.R=null,n.U=e,n.C=!0,t=n;e&&e.C;)r=e.U,e===r.L?(i=r.R,i&&i.C?(e.C=i.C=!1,r.C=!0,t=r):(t===e.R&&(ir(this,e),t=e,e=t.U),e.C=!1,r.C=!0,or(this,r))):(i=r.L,i&&i.C?(e.C=i.C=!1,r.C=!0,t=r):(t===e.L&&(or(this,e),t=e,e=t.U),e.C=!1,r.C=!0,ir(this,r))),e=t.U;this._.C=!1},remove:function(t){t.N&&(t.N.P=t.P),t.P&&(t.P.N=t.N),t.N=t.P=null;var n,e,r,i=t.U,o=t.L,a=t.R;if(e=o?a?ar(a):o:a,i?i.L===t?i.L=e:i.R=e:this._=e,o&&a?(r=e.C,e.C=t.C,e.L=o,o.U=e,e!==a?(i=e.U,e.U=t.U,t=e.R,i.L=t,e.R=a,a.U=e):(e.U=i,i=e,t=e.R)):(r=t.C,t=e),t&&(t.U=i),!r){if(t&&t.C)return void(t.C=!1);do{if(t===this._)break;if(t===i.L){if(n=i.R,n.C&&(n.C=!1,i.C=!0,ir(this,i),n=i.R),n.L&&n.L.C||n.R&&n.R.C){n.R&&n.R.C||(n.L.C=!1,n.C=!0,or(this,n),n=i.R),n.C=i.C,i.C=n.R.C=!1,ir(this,i),t=this._;break}}else if(n=i.L,n.C&&(n.C=!1,i.C=!0,or(this,i),n=i.L),n.L&&n.L.C||n.R&&n.R.C){n.L&&n.L.C||(n.R.C=!1,n.C=!0,ir(this,n),n=i.L),n.C=i.C,i.C=n.L.C=!1,or(this,i),t=this._;break}n.C=!0,t=i,i=i.U}while(!t.C);t&&(t.C=!1)}}},sa.geom.voronoi=function(t){function n(t){var n=new Array(t.length),r=u[0][0],i=u[0][1],o=u[1][0],a=u[1][1];return ur(e(t),u).cells.forEach(function(e,u){var s=e.edges,l=e.site,c=n[u]=s.length?s.map(function(t){var n=t.start();return[n.x,n.y]}):l.x>=r&&l.x<=o&&l.y>=i&&l.y<=a?[[r,a],[o,a],[o,i],[r,i]]:[];c.point=t[u]}),n}function e(t){return t.map(function(t,n){return{x:Math.round(o(t,n)/Da)*Da,y:Math.round(a(t,n)/Da)*Da,i:n}})}var r=Ee,i=Pe,o=r,a=i,u=fs;return t?n(t):(n.links=function(t){return ur(e(t)).edges.filter(function(t){return t.l&&t.r}).map(function(n){return{source:t[n.l.i],target:t[n.r.i]}})},n.triangles=function(t){var n=[];return ur(e(t)).cells.forEach(function(e,r){for(var i,o,a=e.site,u=e.edges.sort(Ue),s=-1,l=u.length,c=u[l-1].edge,f=c.l===a?c.r:c.l;++s<l;)i=c,o=f,c=u[s].edge,f=c.l===a?c.r:c.l,r<o.i&&r<f.i&&lr(a,o,f)<0&&n.push([t[r],t[o.i],t[f.i]])}),n},n.x=function(t){return arguments.length?(o=Mt(r=t),n):r},n.y=function(t){return arguments.length?(a=Mt(i=t),n):i},n.clipExtent=function(t){return arguments.length?(u=null==t?fs:t,n):u===fs?null:u},n.size=function(t){return arguments.length?n.clipExtent(t&&[[0,0],t]):u===fs?null:u&&u[1]},n)};var fs=[[-1e6,-1e6],[1e6,1e6]];sa.geom.delaunay=function(t){return sa.geom.voronoi().triangles(t)},sa.geom.quadtree=function(t,n,e,r,i){function o(t){function o(t,n,e,r,i,o,a,u){if(!isNaN(e)&&!isNaN(r))if(t.leaf){var s=t.x,c=t.y;if(null!=s)if(xa(s-e)+xa(c-r)<.01)l(t,n,e,r,i,o,a,u);else{var f=t.point;t.x=t.y=t.point=null,l(t,f,s,c,i,o,a,u),l(t,n,e,r,i,o,a,u)}else t.x=e,t.y=r,t.point=n}else l(t,n,e,r,i,o,a,u)}function l(t,n,e,r,i,a,u,s){var l=.5*(i+u),c=.5*(a+s),f=e>=l,h=r>=c,p=h<<1|f;t.leaf=!1,t=t.nodes[p]||(t.nodes[p]=hr()),f?i=l:u=l,h?a=c:s=c,o(t,n,e,r,i,a,u,s)}var c,f,h,p,d,v,g,m,y,$=Mt(u),x=Mt(s);if(null!=n)v=n,g=e,m=r,y=i;else if(m=y=-(v=g=1/0),f=[],h=[],d=t.length,a)for(p=0;d>p;++p)c=t[p],c.x<v&&(v=c.x),c.y<g&&(g=c.y),c.x>m&&(m=c.x),c.y>y&&(y=c.y),f.push(c.x),h.push(c.y);else for(p=0;d>p;++p){var b=+$(c=t[p],p),w=+x(c,p);v>b&&(v=b),g>w&&(g=w),b>m&&(m=b),w>y&&(y=w),f.push(b),h.push(w)}var C=m-v,S=y-g;C>S?y=g+C:m=v+S;var _=hr();if(_.add=function(t){o(_,t,+$(t,++p),+x(t,p),v,g,m,y)},_.visit=function(t){pr(t,_,v,g,m,y)},_.find=function(t){return dr(_,t[0],t[1],v,g,m,y)},p=-1,null==n){for(;++p<d;)o(_,t[p],f[p],h[p],v,g,m,y);--p}else t.forEach(_.add);return f=h=t=c=null,_}var a,u=Ee,s=Pe;return(a=arguments.length)?(u=cr,s=fr,3===a&&(i=e,r=n,e=n=0),o(t)):(o.x=function(t){return arguments.length?(u=t,o):u},o.y=function(t){return arguments.length?(s=t,o):s},o.extent=function(t){return arguments.length?(null==t?n=e=r=i=null:(n=+t[0][0],e=+t[0][1],r=+t[1][0],i=+t[1][1]),o):null==n?null:[[n,e],[r,i]]},o.size=function(t){return arguments.length?(null==t?n=e=r=i=null:(n=e=0,r=+t[0],i=+t[1]),o):null==n?null:[r-n,i-e]},o)},sa.interpolateRgb=vr,sa.interpolateObject=gr,sa.interpolateNumber=mr,sa.interpolateString=yr;var hs=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ps=new RegExp(hs.source,"g");sa.interpolate=$r,sa.interpolators=[function(t,n){var e=typeof n;return("string"===e?ou.has(n.toLowerCase())||/^(#|rgb\(|hsl\()/i.test(n)?vr:yr:n instanceof at?vr:Array.isArray(n)?xr:"object"===e&&isNaN(n)?gr:mr)(t,n)}],sa.interpolateArray=xr;var ds=function(){return y},vs=sa.map({linear:ds,poly:kr,quad:function(){return Sr},cubic:function(){return _r},sin:function(){return Ar},exp:function(){return Er},circle:function(){return Pr},elastic:Or,back:Tr,bounce:function(){return Lr}}),gs=sa.map({"in":y,out:wr,"in-out":Cr,"out-in":function(t){return Cr(wr(t))}});sa.ease=function(t){var n=t.indexOf("-"),e=n>=0?t.slice(0,n):t,r=n>=0?t.slice(n+1):"in";return e=vs.get(e)||ds,r=gs.get(r)||y,br(r(e.apply(null,la.call(arguments,1))))},sa.interpolateHcl=jr,sa.interpolateHsl=Nr,sa.interpolateLab=Rr,sa.interpolateRound=Dr,sa.transform=function(t){var n=fa.createElementNS(sa.ns.prefix.svg,"g");return(sa.transform=function(t){if(null!=t){n.setAttribute("transform",t);var e=n.transform.baseVal.consolidate()}return new Fr(e?e.matrix:ms)})(t)},Fr.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var ms={a:1,b:0,c:0,d:1,e:0,f:0};sa.interpolateTransform=Yr,sa.layout={},sa.layout.bundle=function(){return function(t){for(var n=[],e=-1,r=t.length;++e<r;)n.push(Zr(t[e]));return n}},sa.layout.chord=function(){function t(){var t,l,f,h,p,d={},v=[],g=sa.range(o),m=[];for(e=[],r=[],t=0,h=-1;++h<o;){for(l=0,p=-1;++p<o;)l+=i[h][p];v.push(l),m.push(sa.range(o)),t+=l}for(a&&g.sort(function(t,n){return a(v[t],v[n])}),u&&m.forEach(function(t,n){t.sort(function(t,e){return u(i[n][t],i[n][e])})}),t=(za-c*o)/t,l=0,h=-1;++h<o;){for(f=l,p=-1;++p<o;){var y=g[h],$=m[y][p],x=i[y][$],b=l,w=l+=x*t;d[y+"-"+$]={index:y,subindex:$,startAngle:b,endAngle:w,value:x}}r[y]={index:y,startAngle:f,endAngle:l,value:v[y]},l+=c}for(h=-1;++h<o;)for(p=h-1;++p<o;){var C=d[h+"-"+p],S=d[p+"-"+h];(C.value||S.value)&&e.push(C.value<S.value?{source:S,target:C}:{source:C,target:S})}s&&n()}function n(){e.sort(function(t,n){return s((t.source.value+t.target.value)/2,(n.source.value+n.target.value)/2)})}var e,r,i,o,a,u,s,l={},c=0;return l.matrix=function(t){return arguments.length?(o=(i=t)&&i.length,e=r=null,l):i},l.padding=function(t){return arguments.length?(c=t,e=r=null,l):c},l.sortGroups=function(t){return arguments.length?(a=t,e=r=null,l):a},l.sortSubgroups=function(t){return arguments.length?(u=t,e=null,l):u},l.sortChords=function(t){return arguments.length?(s=t,e&&n(),l):s},l.chords=function(){return e||t(),e},l.groups=function(){return r||t(),r},l},sa.layout.force=function(){function t(t){return function(n,e,r,i){if(n.point!==t){var o=n.cx-t.x,a=n.cy-t.y,u=i-e,s=o*o+a*a;if(s>u*u/m){if(v>s){var l=n.charge/s;t.px-=o*l,t.py-=a*l}return!0}if(n.point&&s&&v>s){var l=n.pointCharge/s;t.px-=o*l,t.py-=a*l}}return!n.charge}}function n(t){t.px=sa.event.x,t.py=sa.event.y,s.resume()}var e,r,i,o,a,u,s={},l=sa.dispatch("start","tick","end"),c=[1,1],f=.9,h=ys,p=$s,d=-30,v=xs,g=.1,m=.64,$=[],x=[];return s.tick=function(){if((i*=.99)<.005)return e=null,l.end({type:"end",alpha:i=0}),!0;var n,r,s,h,p,v,m,y,b,w=$.length,C=x.length;for(r=0;C>r;++r)s=x[r],h=s.source,p=s.target,y=p.x-h.x,b=p.y-h.y,(v=y*y+b*b)&&(v=i*a[r]*((v=Math.sqrt(v))-o[r])/v,y*=v,b*=v,p.x-=y*(m=h.weight+p.weight?h.weight/(h.weight+p.weight):.5),p.y-=b*m,h.x+=y*(m=1-m),h.y+=b*m);if((m=i*g)&&(y=c[0]/2,b=c[1]/2,r=-1,m))for(;++r<w;)s=$[r],s.x+=(y-s.x)*m,s.y+=(b-s.y)*m;if(d)for(ri(n=sa.geom.quadtree($),i,u),r=-1;++r<w;)(s=$[r]).fixed||n.visit(t(s));for(r=-1;++r<w;)s=$[r],s.fixed?(s.x=s.px,s.y=s.py):(s.x-=(s.px-(s.px=s.x))*f,s.y-=(s.py-(s.py=s.y))*f);l.tick({type:"tick",alpha:i})},s.nodes=function(t){return arguments.length?($=t,s):$},s.links=function(t){return arguments.length?(x=t,s):x},s.size=function(t){return arguments.length?(c=t,s):c},s.linkDistance=function(t){return arguments.length?(h="function"==typeof t?t:+t,s):h},s.distance=s.linkDistance,s.linkStrength=function(t){return arguments.length?(p="function"==typeof t?t:+t,s):p},s.friction=function(t){return arguments.length?(f=+t,s):f},s.charge=function(t){return arguments.length?(d="function"==typeof t?t:+t,s):d},s.chargeDistance=function(t){return arguments.length?(v=t*t,s):Math.sqrt(v)},s.gravity=function(t){return arguments.length?(g=+t,s):g},s.theta=function(t){return arguments.length?(m=t*t,s):Math.sqrt(m)},s.alpha=function(t){return arguments.length?(t=+t,i?t>0?i=t:(e.c=null,e.t=NaN,e=null,l.end({type:"end",alpha:i=0})):t>0&&(l.start({type:"start",alpha:i=t}),e=Ot(s.tick)),s):i},s.start=function(){function t(t,r){if(!e){for(e=new Array(i),s=0;i>s;++s)e[s]=[];for(s=0;l>s;++s){var o=x[s];e[o.source.index].push(o.target),e[o.target.index].push(o.source)}}for(var a,u=e[n],s=-1,c=u.length;++s<c;)if(!isNaN(a=u[s][t]))return a;return Math.random()*r}var n,e,r,i=$.length,l=x.length,f=c[0],v=c[1];for(n=0;i>n;++n)(r=$[n]).index=n,r.weight=0;for(n=0;l>n;++n)r=x[n],"number"==typeof r.source&&(r.source=$[r.source]),"number"==typeof r.target&&(r.target=$[r.target]),++r.source.weight,++r.target.weight;for(n=0;i>n;++n)r=$[n],isNaN(r.x)&&(r.x=t("x",f)),isNaN(r.y)&&(r.y=t("y",v)),isNaN(r.px)&&(r.px=r.x),isNaN(r.py)&&(r.py=r.y);if(o=[],"function"==typeof h)for(n=0;l>n;++n)o[n]=+h.call(this,x[n],n);else for(n=0;l>n;++n)o[n]=h;if(a=[],"function"==typeof p)for(n=0;l>n;++n)a[n]=+p.call(this,x[n],n);else for(n=0;l>n;++n)a[n]=p;if(u=[],"function"==typeof d)for(n=0;i>n;++n)u[n]=+d.call(this,$[n],n);else for(n=0;i>n;++n)u[n]=d;return s.resume()},s.resume=function(){return s.alpha(.1)},s.stop=function(){return s.alpha(0)},s.drag=function(){return r||(r=sa.behavior.drag().origin(y).on("dragstart.force",Qr).on("drag.force",n).on("dragend.force",ti)),arguments.length?void this.on("mouseover.force",ni).on("mouseout.force",ei).call(r):r},sa.rebind(s,l,"on")};var ys=20,$s=1,xs=1/0;sa.layout.hierarchy=function(){function t(i){var o,a=[i],u=[];for(i.depth=0;null!=(o=a.pop());)if(u.push(o),(l=e.call(t,o,o.depth))&&(s=l.length)){for(var s,l,c;--s>=0;)a.push(c=l[s]),c.parent=o,c.depth=o.depth+1;r&&(o.value=0),o.children=l}else r&&(o.value=+r.call(t,o,o.depth)||0),delete o.children;return ai(i,function(t){var e,i;n&&(e=t.children)&&e.sort(n),r&&(i=t.parent)&&(i.value+=t.value)}),u}var n=li,e=ui,r=si;return t.sort=function(e){return arguments.length?(n=e,t):n},t.children=function(n){return arguments.length?(e=n,t):e},t.value=function(n){return arguments.length?(r=n,t):r},t.revalue=function(n){return r&&(oi(n,function(t){t.children&&(t.value=0)}),ai(n,function(n){var e;n.children||(n.value=+r.call(t,n,n.depth)||0),(e=n.parent)&&(e.value+=n.value)})),n},t},sa.layout.partition=function(){function t(n,e,r,i){var o=n.children;if(n.x=e,n.y=n.depth*i,n.dx=r,n.dy=i,o&&(a=o.length)){var a,u,s,l=-1;for(r=n.value?r/n.value:0;++l<a;)t(u=o[l],e,s=u.value*r,i),e+=s}}function n(t){var e=t.children,r=0;if(e&&(i=e.length))for(var i,o=-1;++o<i;)r=Math.max(r,n(e[o]));return 1+r}function e(e,o){var a=r.call(this,e,o);return t(a[0],0,i[0],i[1]/n(a[0])),a}var r=sa.layout.hierarchy(),i=[1,1];return e.size=function(t){return arguments.length?(i=t,e):i},ii(e,r)},sa.layout.pie=function(){function t(a){var u,s=a.length,l=a.map(function(e,r){return+n.call(t,e,r)}),c=+("function"==typeof r?r.apply(this,arguments):r),f=("function"==typeof i?i.apply(this,arguments):i)-c,h=Math.min(Math.abs(f)/s,+("function"==typeof o?o.apply(this,arguments):o)),p=h*(0>f?-1:1),d=sa.sum(l),v=d?(f-s*p)/d:0,g=sa.range(s),m=[];return null!=e&&g.sort(e===bs?function(t,n){return l[n]-l[t]}:function(t,n){return e(a[t],a[n])}),g.forEach(function(t){m[t]={data:a[t],value:u=l[t],startAngle:c,endAngle:c+=u*v+p,padAngle:h}}),m}var n=Number,e=bs,r=0,i=za,o=0;return t.value=function(e){return arguments.length?(n=e,t):n},t.sort=function(n){return arguments.length?(e=n,t):e},t.startAngle=function(n){return arguments.length?(r=n,t):r},t.endAngle=function(n){return arguments.length?(i=n,t):i},t.padAngle=function(n){return arguments.length?(o=n,t):o},t};var bs={};sa.layout.stack=function(){function t(u,s){if(!(h=u.length))return u;var l=u.map(function(e,r){return n.call(t,e,r)}),c=l.map(function(n){return n.map(function(n,e){return[o.call(t,n,e),a.call(t,n,e)]})}),f=e.call(t,c,s);l=sa.permute(l,f),c=sa.permute(c,f);var h,p,d,v,g=r.call(t,c,s),m=l[0].length;for(d=0;m>d;++d)for(i.call(t,l[0][d],v=g[d],c[0][d][1]),p=1;h>p;++p)i.call(t,l[p][d],v+=c[p-1][d][1],c[p][d][1]);return u}var n=y,e=di,r=vi,i=pi,o=fi,a=hi;return t.values=function(e){return arguments.length?(n=e,t):n},t.order=function(n){return arguments.length?(e="function"==typeof n?n:ws.get(n)||di,t):e},t.offset=function(n){return arguments.length?(r="function"==typeof n?n:Cs.get(n)||vi,t):r},t.x=function(n){return arguments.length?(o=n,t):o},t.y=function(n){return arguments.length?(a=n,t):a},t.out=function(n){return arguments.length?(i=n,t):i},t};var ws=sa.map({"inside-out":function(t){var n,e,r=t.length,i=t.map(gi),o=t.map(mi),a=sa.range(r).sort(function(t,n){return i[t]-i[n]}),u=0,s=0,l=[],c=[];for(n=0;r>n;++n)e=a[n],s>u?(u+=o[e],l.push(e)):(s+=o[e],c.push(e));return c.reverse().concat(l)},reverse:function(t){return sa.range(t.length).reverse()},"default":di}),Cs=sa.map({silhouette:function(t){var n,e,r,i=t.length,o=t[0].length,a=[],u=0,s=[];for(e=0;o>e;++e){for(n=0,r=0;i>n;n++)r+=t[n][e][1];r>u&&(u=r),a.push(r)}for(e=0;o>e;++e)s[e]=(u-a[e])/2;return s},wiggle:function(t){var n,e,r,i,o,a,u,s,l,c=t.length,f=t[0],h=f.length,p=[];for(p[0]=s=l=0,e=1;h>e;++e){for(n=0,i=0;c>n;++n)i+=t[n][e][1];for(n=0,o=0,u=f[e][0]-f[e-1][0];c>n;++n){for(r=0,a=(t[n][e][1]-t[n][e-1][1])/(2*u);n>r;++r)a+=(t[r][e][1]-t[r][e-1][1])/u;o+=a*t[n][e][1]}p[e]=s-=i?o/i*u:0,l>s&&(l=s)}for(e=0;h>e;++e)p[e]-=l;return p},expand:function(t){var n,e,r,i=t.length,o=t[0].length,a=1/i,u=[];for(e=0;o>e;++e){for(n=0,r=0;i>n;n++)r+=t[n][e][1];if(r)for(n=0;i>n;n++)t[n][e][1]/=r;else for(n=0;i>n;n++)t[n][e][1]=a}for(e=0;o>e;++e)u[e]=0;return u},zero:vi});sa.layout.histogram=function(){function t(t,o){for(var a,u,s=[],l=t.map(e,this),c=r.call(this,l,o),f=i.call(this,c,l,o),o=-1,h=l.length,p=f.length-1,d=n?1:1/h;++o<p;)a=s[o]=[],a.dx=f[o+1]-(a.x=f[o]),a.y=0;if(p>0)for(o=-1;++o<h;)u=l[o],u>=c[0]&&u<=c[1]&&(a=s[sa.bisect(f,u,1,p)-1],a.y+=d,a.push(t[o]));return s}var n=!0,e=Number,r=bi,i=$i;return t.value=function(n){return arguments.length?(e=n,t):e},t.range=function(n){return arguments.length?(r=Mt(n),t):r},t.bins=function(n){return arguments.length?(i="number"==typeof n?function(t){return xi(t,n)}:Mt(n),t):i},t.frequency=function(e){return arguments.length?(n=!!e,t):n},t},sa.layout.pack=function(){function t(t,o){var a=e.call(this,t,o),u=a[0],s=i[0],l=i[1],c=null==n?Math.sqrt:"function"==typeof n?n:function(){return n};if(u.x=u.y=0,ai(u,function(t){t.r=+c(t.value)}),ai(u,Mi),r){var f=r*(n?1:Math.max(2*u.r/s,2*u.r/l))/2;ai(u,function(t){t.r+=f}),ai(u,Mi),ai(u,function(t){t.r-=f})}return Ei(u,s/2,l/2,n?1:1/Math.max(2*u.r/s,2*u.r/l)),a}var n,e=sa.layout.hierarchy().sort(wi),r=0,i=[1,1];return t.size=function(n){return arguments.length?(i=n,t):i},t.radius=function(e){return arguments.length?(n=null==e||"function"==typeof e?e:+e,t):n},t.padding=function(n){return arguments.length?(r=+n,t):r},ii(t,e)},sa.layout.tree=function(){function t(t,i){var c=a.call(this,t,i),f=c[0],h=n(f);if(ai(h,e),h.parent.m=-h.z,oi(h,r),l)oi(f,o);else{var p=f,d=f,v=f;oi(f,function(t){t.x<p.x&&(p=t),t.x>d.x&&(d=t),t.depth>v.depth&&(v=t)});var g=u(p,d)/2-p.x,m=s[0]/(d.x+u(d,p)/2+g),y=s[1]/(v.depth||1);oi(f,function(t){t.x=(t.x+g)*m,t.y=t.depth*y})}return c}function n(t){for(var n,e={A:null,children:[t]},r=[e];null!=(n=r.pop());)for(var i,o=n.children,a=0,u=o.length;u>a;++a)r.push((o[a]=i={_:o[a],parent:n,children:(i=o[a].children)&&i.slice()||[],A:null,a:null,z:0,m:0,c:0,s:0,t:null,i:a}).a=i);return e.children[0]}function e(t){var n=t.children,e=t.parent.children,r=t.i?e[t.i-1]:null;if(n.length){Ni(t);var o=(n[0].z+n[n.length-1].z)/2;r?(t.z=r.z+u(t._,r._),t.m=t.z-o):t.z=o}else r&&(t.z=r.z+u(t._,r._));t.parent.A=i(t,r,t.parent.A||e[0])}function r(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function i(t,n,e){if(n){for(var r,i=t,o=t,a=n,s=i.parent.children[0],l=i.m,c=o.m,f=a.m,h=s.m;a=Li(a),i=Ti(i),a&&i;)s=Ti(s),o=Li(o),o.a=t,r=a.z+f-i.z-l+u(a._,i._),r>0&&(ji(Ri(a,t,e),t,r),l+=r,c+=r),f+=a.m,l+=i.m,h+=s.m,c+=o.m;a&&!Li(o)&&(o.t=a,o.m+=f-c),i&&!Ti(s)&&(s.t=i,s.m+=l-h,e=t)}return e}function o(t){t.x*=s[0],t.y=t.depth*s[1]}var a=sa.layout.hierarchy().sort(null).value(null),u=Oi,s=[1,1],l=null;return t.separation=function(n){return arguments.length?(u=n,t):u},t.size=function(n){return arguments.length?(l=null==(s=n)?o:null,t):l?null:s},t.nodeSize=function(n){return arguments.length?(l=null==(s=n)?null:o,t):l?s:null},ii(t,a)},sa.layout.cluster=function(){function t(t,o){var a,u=n.call(this,t,o),s=u[0],l=0;ai(s,function(t){var n=t.children;n&&n.length?(t.x=Fi(n),t.y=Di(n)):(t.x=a?l+=e(t,a):0,t.y=0,a=t)});var c=Ii(s),f=zi(s),h=c.x-e(c,f)/2,p=f.x+e(f,c)/2;return ai(s,i?function(t){t.x=(t.x-s.x)*r[0],t.y=(s.y-t.y)*r[1]}:function(t){t.x=(t.x-h)/(p-h)*r[0],t.y=(1-(s.y?t.y/s.y:1))*r[1]}),u}var n=sa.layout.hierarchy().sort(null).value(null),e=Oi,r=[1,1],i=!1;return t.separation=function(n){return arguments.length?(e=n,t):e},t.size=function(n){return arguments.length?(i=null==(r=n),t):i?null:r},t.nodeSize=function(n){return arguments.length?(i=null!=(r=n),t):i?r:null},ii(t,n)},sa.layout.treemap=function(){function t(t,n){for(var e,r,i=-1,o=t.length;++i<o;)r=(e=t[i]).value*(0>n?0:n),e.area=isNaN(r)||0>=r?0:r}function n(e){var o=e.children;if(o&&o.length){var a,u,s,l=f(e),c=[],h=o.slice(),d=1/0,v="slice"===p?l.dx:"dice"===p?l.dy:"slice-dice"===p?1&e.depth?l.dy:l.dx:Math.min(l.dx,l.dy);for(t(h,l.dx*l.dy/e.value),c.area=0;(s=h.length)>0;)c.push(a=h[s-1]),c.area+=a.area,"squarify"!==p||(u=r(c,v))<=d?(h.pop(),d=u):(c.area-=c.pop().area,i(c,v,l,!1),v=Math.min(l.dx,l.dy),c.length=c.area=0,d=1/0);c.length&&(i(c,v,l,!0),c.length=c.area=0),o.forEach(n)}}function e(n){var r=n.children;if(r&&r.length){var o,a=f(n),u=r.slice(),s=[];for(t(u,a.dx*a.dy/n.value),s.area=0;o=u.pop();)s.push(o),s.area+=o.area,null!=o.z&&(i(s,o.z?a.dx:a.dy,a,!u.length),s.length=s.area=0);r.forEach(e)}}function r(t,n){for(var e,r=t.area,i=0,o=1/0,a=-1,u=t.length;++a<u;)(e=t[a].area)&&(o>e&&(o=e),e>i&&(i=e));return r*=r,n*=n,r?Math.max(n*i*d/r,r/(n*o*d)):1/0}function i(t,n,e,r){var i,o=-1,a=t.length,u=e.x,l=e.y,c=n?s(t.area/n):0;if(n==e.dx){for((r||c>e.dy)&&(c=e.dy);++o<a;)i=t[o],i.x=u,i.y=l,i.dy=c,u+=i.dx=Math.min(e.x+e.dx-u,c?s(i.area/c):0);i.z=!0,i.dx+=e.x+e.dx-u,e.y+=c,e.dy-=c}else{for((r||c>e.dx)&&(c=e.dx);++o<a;)i=t[o],i.x=u,i.y=l,i.dx=c,l+=i.dy=Math.min(e.y+e.dy-l,c?s(i.area/c):0);i.z=!1,i.dy+=e.y+e.dy-l,e.x+=c,e.dx-=c}}function o(r){var i=a||u(r),o=i[0];return o.x=o.y=0,o.value?(o.dx=l[0],o.dy=l[1]):o.dx=o.dy=0,a&&u.revalue(o),t([o],o.dx*o.dy/o.value),(a?e:n)(o),h&&(a=i),i}var a,u=sa.layout.hierarchy(),s=Math.round,l=[1,1],c=null,f=qi,h=!1,p="squarify",d=.5*(1+Math.sqrt(5));return o.size=function(t){return arguments.length?(l=t,o):l},o.padding=function(t){function n(n){var e=t.call(o,n,n.depth);return null==e?qi(n):Vi(n,"number"==typeof e?[e,e,e,e]:e)}function e(n){return Vi(n,t)}if(!arguments.length)return c;var r;return f=null==(c=t)?qi:"function"==(r=typeof t)?n:"number"===r?(t=[t,t,t,t],e):e,o},o.round=function(t){return arguments.length?(s=t?Math.round:Number,o):s!=Number},o.sticky=function(t){return arguments.length?(h=t,a=null,o):h},o.ratio=function(t){return arguments.length?(d=t,o):d},o.mode=function(t){return arguments.length?(p=t+"",o):p},ii(o,u)},sa.random={normal:function(t,n){var e=arguments.length;return 2>e&&(n=1),1>e&&(t=0),function(){var e,r,i;do e=2*Math.random()-1,r=2*Math.random()-1,i=e*e+r*r;while(!i||i>1);return t+n*e*Math.sqrt(-2*Math.log(i)/i)}},logNormal:function(){var t=sa.random.normal.apply(sa,arguments);return function(){return Math.exp(t())}},bates:function(t){var n=sa.random.irwinHall(t);return function(){return n()/t}},irwinHall:function(t){return function(){for(var n=0,e=0;t>e;e++)n+=Math.random();return n}}},sa.scale={};var Ss={floor:y,ceil:y};sa.scale.linear=function(){return Xi([0,1],[0,1],$r,!1)};var _s={s:1,g:1,p:1,r:1,e:1};sa.scale.log=function(){return ro(sa.scale.linear().domain([0,1]),10,!0,[1,10])};var Ms=sa.format(".0e"),ks={floor:function(t){return-Math.ceil(-t)},ceil:function(t){return-Math.floor(-t)}};sa.scale.pow=function(){return io(sa.scale.linear(),1,[0,1])},sa.scale.sqrt=function(){return sa.scale.pow().exponent(.5)},sa.scale.ordinal=function(){return ao([],{t:"range",a:[[]]})},sa.scale.category10=function(){return sa.scale.ordinal().range(As)},sa.scale.category20=function(){return sa.scale.ordinal().range(Es)},sa.scale.category20b=function(){return sa.scale.ordinal().range(Ps)},sa.scale.category20c=function(){return sa.scale.ordinal().range(Os)};var As=[2062260,16744206,2924588,14034728,9725885,9197131,14907330,8355711,12369186,1556175].map($t),Es=[2062260,11454440,16744206,16759672,2924588,10018698,14034728,16750742,9725885,12955861,9197131,12885140,14907330,16234194,8355711,13092807,12369186,14408589,1556175,10410725].map($t),Ps=[3750777,5395619,7040719,10264286,6519097,9216594,11915115,13556636,9202993,12426809,15186514,15190932,8666169,11356490,14049643,15177372,8077683,10834324,13528509,14589654].map($t),Os=[3244733,7057110,10406625,13032431,15095053,16616764,16625259,16634018,3253076,7652470,10607003,13101504,7695281,10394312,12369372,14342891,6513507,9868950,12434877,14277081].map($t);sa.scale.quantile=function(){return uo([],[])},sa.scale.quantize=function(){return so(0,1,[0,1])},sa.scale.threshold=function(){return lo([.5],[0,1])},sa.scale.identity=function(){return co([0,1])},sa.svg={},sa.svg.arc=function(){function t(){var t=Math.max(0,+e.apply(this,arguments)),l=Math.max(0,+r.apply(this,arguments)),c=a.apply(this,arguments)-Va,f=u.apply(this,arguments)-Va,h=Math.abs(f-c),p=c>f?0:1;if(t>l&&(d=l,l=t,t=d),h>=qa)return n(l,p)+(t?n(t,1-p):"")+"Z";var d,v,g,m,y,$,x,b,w,C,S,_,M=0,k=0,A=[];if((m=(+s.apply(this,arguments)||0)/2)&&(g=o===Ts?Math.sqrt(t*t+l*l):+o.apply(this,arguments),p||(k*=-1),l&&(k=nt(g/l*Math.sin(m))),t&&(M=nt(g/t*Math.sin(m)))),l){y=l*Math.cos(c+k),$=l*Math.sin(c+k),x=l*Math.cos(f-k),b=l*Math.sin(f-k);var E=Math.abs(f-c-2*k)<=Ia?0:1;if(k&&yo(y,$,x,b)===p^E){var P=(c+f)/2;y=l*Math.cos(P),$=l*Math.sin(P),x=b=null}}else y=$=0;if(t){w=t*Math.cos(f-M),C=t*Math.sin(f-M),S=t*Math.cos(c+M),_=t*Math.sin(c+M);var O=Math.abs(c-f+2*M)<=Ia?0:1;if(M&&yo(w,C,S,_)===1-p^O){var T=(c+f)/2;w=t*Math.cos(T),C=t*Math.sin(T),S=_=null}}else w=C=0;if(h>Da&&(d=Math.min(Math.abs(l-t)/2,+i.apply(this,arguments)))>.001){v=l>t^p?0:1;var L=d,j=d;if(Ia>h){var N=null==S?[w,C]:null==x?[y,$]:je([y,$],[S,_],[x,b],[w,C]),R=y-N[0],D=$-N[1],F=x-N[0],I=b-N[1],z=1/Math.sin(Math.acos((R*F+D*I)/(Math.sqrt(R*R+D*D)*Math.sqrt(F*F+I*I)))/2),q=Math.sqrt(N[0]*N[0]+N[1]*N[1]);j=Math.min(d,(t-q)/(z-1)),L=Math.min(d,(l-q)/(z+1))}if(null!=x){var V=$o(null==S?[w,C]:[S,_],[y,$],l,L,p),B=$o([x,b],[w,C],l,L,p);d===L?A.push("M",V[0],"A",L,",",L," 0 0,",v," ",V[1],"A",l,",",l," 0 ",1-p^yo(V[1][0],V[1][1],B[1][0],B[1][1]),",",p," ",B[1],"A",L,",",L," 0 0,",v," ",B[0]):A.push("M",V[0],"A",L,",",L," 0 1,",v," ",B[0])}else A.push("M",y,",",$);if(null!=S){var W=$o([y,$],[S,_],t,-j,p),U=$o([w,C],null==x?[y,$]:[x,b],t,-j,p);d===j?A.push("L",U[0],"A",j,",",j," 0 0,",v," ",U[1],"A",t,",",t," 0 ",p^yo(U[1][0],U[1][1],W[1][0],W[1][1]),",",1-p," ",W[1],"A",j,",",j," 0 0,",v," ",W[0]):A.push("L",U[0],"A",j,",",j," 0 0,",v," ",W[0])}else A.push("L",w,",",C)}else A.push("M",y,",",$),null!=x&&A.push("A",l,",",l," 0 ",E,",",p," ",x,",",b),A.push("L",w,",",C),null!=S&&A.push("A",t,",",t," 0 ",O,",",1-p," ",S,",",_);return A.push("Z"),A.join("")}function n(t,n){return"M0,"+t+"A"+t+","+t+" 0 1,"+n+" 0,"+-t+"A"+t+","+t+" 0 1,"+n+" 0,"+t}var e=ho,r=po,i=fo,o=Ts,a=vo,u=go,s=mo;return t.innerRadius=function(n){return arguments.length?(e=Mt(n),t):e},t.outerRadius=function(n){return arguments.length?(r=Mt(n),t):r},t.cornerRadius=function(n){return arguments.length?(i=Mt(n),t):i},t.padRadius=function(n){return arguments.length?(o=n==Ts?Ts:Mt(n),t):o},t.startAngle=function(n){return arguments.length?(a=Mt(n),t):a;
+},t.endAngle=function(n){return arguments.length?(u=Mt(n),t):u},t.padAngle=function(n){return arguments.length?(s=Mt(n),t):s},t.centroid=function(){var t=(+e.apply(this,arguments)+ +r.apply(this,arguments))/2,n=(+a.apply(this,arguments)+ +u.apply(this,arguments))/2-Va;return[Math.cos(n)*t,Math.sin(n)*t]},t};var Ts="auto";sa.svg.line=function(){return xo(y)};var Ls=sa.map({linear:bo,"linear-closed":wo,step:Co,"step-before":So,"step-after":_o,basis:Oo,"basis-open":To,"basis-closed":Lo,bundle:jo,cardinal:Ao,"cardinal-open":Mo,"cardinal-closed":ko,monotone:zo});Ls.forEach(function(t,n){n.key=t,n.closed=/-closed$/.test(t)});var js=[0,2/3,1/3,0],Ns=[0,1/3,2/3,0],Rs=[0,1/6,2/3,1/6];sa.svg.line.radial=function(){var t=xo(qo);return t.radius=t.x,delete t.x,t.angle=t.y,delete t.y,t},So.reverse=_o,_o.reverse=So,sa.svg.area=function(){return Vo(y)},sa.svg.area.radial=function(){var t=Vo(qo);return t.radius=t.x,delete t.x,t.innerRadius=t.x0,delete t.x0,t.outerRadius=t.x1,delete t.x1,t.angle=t.y,delete t.y,t.startAngle=t.y0,delete t.y0,t.endAngle=t.y1,delete t.y1,t},sa.svg.chord=function(){function t(t,u){var s=n(this,o,t,u),l=n(this,a,t,u);return"M"+s.p0+r(s.r,s.p1,s.a1-s.a0)+(e(s,l)?i(s.r,s.p1,s.r,s.p0):i(s.r,s.p1,l.r,l.p0)+r(l.r,l.p1,l.a1-l.a0)+i(l.r,l.p1,s.r,s.p0))+"Z"}function n(t,n,e,r){var i=n.call(t,e,r),o=u.call(t,i,r),a=s.call(t,i,r)-Va,c=l.call(t,i,r)-Va;return{r:o,a0:a,a1:c,p0:[o*Math.cos(a),o*Math.sin(a)],p1:[o*Math.cos(c),o*Math.sin(c)]}}function e(t,n){return t.a0==n.a0&&t.a1==n.a1}function r(t,n,e){return"A"+t+","+t+" 0 "+ +(e>Ia)+",1 "+n}function i(t,n,e,r){return"Q 0,0 "+r}var o=$e,a=xe,u=Bo,s=vo,l=go;return t.radius=function(n){return arguments.length?(u=Mt(n),t):u},t.source=function(n){return arguments.length?(o=Mt(n),t):o},t.target=function(n){return arguments.length?(a=Mt(n),t):a},t.startAngle=function(n){return arguments.length?(s=Mt(n),t):s},t.endAngle=function(n){return arguments.length?(l=Mt(n),t):l},t},sa.svg.diagonal=function(){function t(t,i){var o=n.call(this,t,i),a=e.call(this,t,i),u=(o.y+a.y)/2,s=[o,{x:o.x,y:u},{x:a.x,y:u},a];return s=s.map(r),"M"+s[0]+"C"+s[1]+" "+s[2]+" "+s[3]}var n=$e,e=xe,r=Wo;return t.source=function(e){return arguments.length?(n=Mt(e),t):n},t.target=function(n){return arguments.length?(e=Mt(n),t):e},t.projection=function(n){return arguments.length?(r=n,t):r},t},sa.svg.diagonal.radial=function(){var t=sa.svg.diagonal(),n=Wo,e=t.projection;return t.projection=function(t){return arguments.length?e(Uo(n=t)):n},t},sa.svg.symbol=function(){function t(t,r){return(Ds.get(n.call(this,t,r))||Go)(e.call(this,t,r))}var n=Yo,e=Ho;return t.type=function(e){return arguments.length?(n=Mt(e),t):n},t.size=function(n){return arguments.length?(e=Mt(n),t):e},t};var Ds=sa.map({circle:Go,cross:function(t){var n=Math.sqrt(t/5)/2;return"M"+-3*n+","+-n+"H"+-n+"V"+-3*n+"H"+n+"V"+-n+"H"+3*n+"V"+n+"H"+n+"V"+3*n+"H"+-n+"V"+n+"H"+-3*n+"Z"},diamond:function(t){var n=Math.sqrt(t/(2*Is)),e=n*Is;return"M0,"+-n+"L"+e+",0 0,"+n+" "+-e+",0Z"},square:function(t){var n=Math.sqrt(t)/2;return"M"+-n+","+-n+"L"+n+","+-n+" "+n+","+n+" "+-n+","+n+"Z"},"triangle-down":function(t){var n=Math.sqrt(t/Fs),e=n*Fs/2;return"M0,"+e+"L"+n+","+-e+" "+-n+","+-e+"Z"},"triangle-up":function(t){var n=Math.sqrt(t/Fs),e=n*Fs/2;return"M0,"+-e+"L"+n+","+e+" "+-n+","+e+"Z"}});sa.svg.symbolTypes=Ds.keys();var Fs=Math.sqrt(3),Is=Math.tan(30*Ba);Ea.transition=function(t){for(var n,e,r=zs||++Ws,i=Qo(t),o=[],a=qs||{time:Date.now(),ease:Mr,delay:0,duration:250},u=-1,s=this.length;++u<s;){o.push(n=[]);for(var l=this[u],c=-1,f=l.length;++c<f;)(e=l[c])&&ta(e,c,i,r,a),n.push(e)}return Zo(o,i,r)},Ea.interrupt=function(t){return this.each(null==t?Vs:Xo(Qo(t)))};var zs,qs,Vs=Xo(Qo()),Bs=[],Ws=0;Bs.call=Ea.call,Bs.empty=Ea.empty,Bs.node=Ea.node,Bs.size=Ea.size,sa.transition=function(t,n){return t&&t.transition?zs?t.transition(n):t:sa.selection().transition(t)},sa.transition.prototype=Bs,Bs.select=function(t){var n,e,r,i=this.id,o=this.namespace,a=[];t=A(t);for(var u=-1,s=this.length;++u<s;){a.push(n=[]);for(var l=this[u],c=-1,f=l.length;++c<f;)(r=l[c])&&(e=t.call(r,r.__data__,c,u))?("__data__"in r&&(e.__data__=r.__data__),ta(e,c,o,i,r[o][i]),n.push(e)):n.push(null)}return Zo(a,o,i)},Bs.selectAll=function(t){var n,e,r,i,o,a=this.id,u=this.namespace,s=[];t=E(t);for(var l=-1,c=this.length;++l<c;)for(var f=this[l],h=-1,p=f.length;++h<p;)if(r=f[h]){o=r[u][a],e=t.call(r,r.__data__,h,l),s.push(n=[]);for(var d=-1,v=e.length;++d<v;)(i=e[d])&&ta(i,d,u,a,o),n.push(i)}return Zo(s,u,a)},Bs.filter=function(t){var n,e,r,i=[];"function"!=typeof t&&(t=q(t));for(var o=0,a=this.length;a>o;o++){i.push(n=[]);for(var e=this[o],u=0,s=e.length;s>u;u++)(r=e[u])&&t.call(r,r.__data__,u,o)&&n.push(r)}return Zo(i,this.namespace,this.id)},Bs.tween=function(t,n){var e=this.id,r=this.namespace;return arguments.length<2?this.node()[r][e].tween.get(t):B(this,null==n?function(n){n[r][e].tween.remove(t)}:function(i){i[r][e].tween.set(t,n)})},Bs.attr=function(t,n){function e(){this.removeAttribute(u)}function r(){this.removeAttributeNS(u.space,u.local)}function i(t){return null==t?e:(t+="",function(){var n,e=this.getAttribute(u);return e!==t&&(n=a(e,t),function(t){this.setAttribute(u,n(t))})})}function o(t){return null==t?r:(t+="",function(){var n,e=this.getAttributeNS(u.space,u.local);return e!==t&&(n=a(e,t),function(t){this.setAttributeNS(u.space,u.local,n(t))})})}if(arguments.length<2){for(n in t)this.attr(n,t[n]);return this}var a="transform"==t?Yr:$r,u=sa.ns.qualify(t);return Jo(this,"attr."+t,n,u.local?o:i)},Bs.attrTween=function(t,n){function e(t,e){var r=n.call(this,t,e,this.getAttribute(i));return r&&function(t){this.setAttribute(i,r(t))}}function r(t,e){var r=n.call(this,t,e,this.getAttributeNS(i.space,i.local));return r&&function(t){this.setAttributeNS(i.space,i.local,r(t))}}var i=sa.ns.qualify(t);return this.tween("attr."+t,i.local?r:e)},Bs.style=function(t,e,r){function i(){this.style.removeProperty(t)}function o(e){return null==e?i:(e+="",function(){var i,o=n(this).getComputedStyle(this,null).getPropertyValue(t);return o!==e&&(i=$r(o,e),function(n){this.style.setProperty(t,i(n),r)})})}var a=arguments.length;if(3>a){if("string"!=typeof t){2>a&&(e="");for(r in t)this.style(r,t[r],e);return this}r=""}return Jo(this,"style."+t,e,o)},Bs.styleTween=function(t,e,r){function i(i,o){var a=e.call(this,i,o,n(this).getComputedStyle(this,null).getPropertyValue(t));return a&&function(n){this.style.setProperty(t,a(n),r)}}return arguments.length<3&&(r=""),this.tween("style."+t,i)},Bs.text=function(t){return Jo(this,"text",t,Ko)},Bs.remove=function(){var t=this.namespace;return this.each("end.transition",function(){var n;this[t].count<2&&(n=this.parentNode)&&n.removeChild(this)})},Bs.ease=function(t){var n=this.id,e=this.namespace;return arguments.length<1?this.node()[e][n].ease:("function"!=typeof t&&(t=sa.ease.apply(sa,arguments)),B(this,function(r){r[e][n].ease=t}))},Bs.delay=function(t){var n=this.id,e=this.namespace;return arguments.length<1?this.node()[e][n].delay:B(this,"function"==typeof t?function(r,i,o){r[e][n].delay=+t.call(r,r.__data__,i,o)}:(t=+t,function(r){r[e][n].delay=t}))},Bs.duration=function(t){var n=this.id,e=this.namespace;return arguments.length<1?this.node()[e][n].duration:B(this,"function"==typeof t?function(r,i,o){r[e][n].duration=Math.max(1,t.call(r,r.__data__,i,o))}:(t=Math.max(1,t),function(r){r[e][n].duration=t}))},Bs.each=function(t,n){var e=this.id,r=this.namespace;if(arguments.length<2){var i=qs,o=zs;try{zs=e,B(this,function(n,i,o){qs=n[r][e],t.call(n,n.__data__,i,o)})}finally{qs=i,zs=o}}else B(this,function(i){var o=i[r][e];(o.event||(o.event=sa.dispatch("start","end","interrupt"))).on(t,n)});return this},Bs.transition=function(){for(var t,n,e,r,i=this.id,o=++Ws,a=this.namespace,u=[],s=0,l=this.length;l>s;s++){u.push(t=[]);for(var n=this[s],c=0,f=n.length;f>c;c++)(e=n[c])&&(r=e[a][i],ta(e,c,a,o,{time:r.time,ease:r.ease,delay:r.delay+r.duration,duration:r.duration})),t.push(e)}return Zo(u,a,o)},sa.svg.axis=function(){function t(t){t.each(function(){var t,l=sa.select(this),c=this.__chart__||e,f=this.__chart__=e.copy(),h=null==s?f.ticks?f.ticks.apply(f,u):f.domain():s,p=null==n?f.tickFormat?f.tickFormat.apply(f,u):y:n,d=l.selectAll(".tick").data(h,f),v=d.enter().insert("g",".domain").attr("class","tick").style("opacity",Da),g=sa.transition(d.exit()).style("opacity",Da).remove(),m=sa.transition(d.order()).style("opacity",1),$=Math.max(i,0)+a,x=Wi(f),b=l.selectAll(".domain").data([0]),w=(b.enter().append("path").attr("class","domain"),sa.transition(b));v.append("line"),v.append("text");var C,S,_,M,k=v.select("line"),A=m.select("line"),E=d.select("text").text(p),P=v.select("text"),O=m.select("text"),T="top"===r||"left"===r?-1:1;if("bottom"===r||"top"===r?(t=na,C="x",_="y",S="x2",M="y2",E.attr("dy",0>T?"0em":".71em").style("text-anchor","middle"),w.attr("d","M"+x[0]+","+T*o+"V0H"+x[1]+"V"+T*o)):(t=ea,C="y",_="x",S="y2",M="x2",E.attr("dy",".32em").style("text-anchor",0>T?"end":"start"),w.attr("d","M"+T*o+","+x[0]+"H0V"+x[1]+"H"+T*o)),k.attr(M,T*i),P.attr(_,T*$),A.attr(S,0).attr(M,T*i),O.attr(C,0).attr(_,T*$),f.rangeBand){var L=f,j=L.rangeBand()/2;c=f=function(t){return L(t)+j}}else c.rangeBand?c=f:g.call(t,f,c);v.call(t,c,f),m.call(t,f,f)})}var n,e=sa.scale.linear(),r=Us,i=6,o=6,a=3,u=[10],s=null;return t.scale=function(n){return arguments.length?(e=n,t):e},t.orient=function(n){return arguments.length?(r=n in Hs?n+"":Us,t):r},t.ticks=function(){return arguments.length?(u=ca(arguments),t):u},t.tickValues=function(n){return arguments.length?(s=n,t):s},t.tickFormat=function(e){return arguments.length?(n=e,t):n},t.tickSize=function(n){var e=arguments.length;return e?(i=+n,o=+arguments[e-1],t):i},t.innerTickSize=function(n){return arguments.length?(i=+n,t):i},t.outerTickSize=function(n){return arguments.length?(o=+n,t):o},t.tickPadding=function(n){return arguments.length?(a=+n,t):a},t.tickSubdivide=function(){return arguments.length&&t},t};var Us="bottom",Hs={top:1,right:1,bottom:1,left:1};sa.svg.brush=function(){function t(n){n.each(function(){var n=sa.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",o).on("touchstart.brush",o),a=n.selectAll(".background").data([0]);a.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),n.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var u=n.selectAll(".resize").data(v,y);u.exit().remove(),u.enter().append("g").attr("class",function(t){return"resize "+t}).style("cursor",function(t){return Ys[t]}).append("rect").attr("x",function(t){return/[ew]$/.test(t)?-3:null}).attr("y",function(t){return/^[ns]/.test(t)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),u.style("display",t.empty()?"none":null);var s,f=sa.transition(n),h=sa.transition(a);l&&(s=Wi(l),h.attr("x",s[0]).attr("width",s[1]-s[0]),r(f)),c&&(s=Wi(c),h.attr("y",s[0]).attr("height",s[1]-s[0]),i(f)),e(f)})}function e(t){t.selectAll(".resize").attr("transform",function(t){return"translate("+f[+/e$/.test(t)]+","+h[+/^s/.test(t)]+")"})}function r(t){t.select(".extent").attr("x",f[0]),t.selectAll(".extent,.n>rect,.s>rect").attr("width",f[1]-f[0])}function i(t){t.select(".extent").attr("y",h[0]),t.selectAll(".extent,.e>rect,.w>rect").attr("height",h[1]-h[0])}function o(){function o(){32==sa.event.keyCode&&(E||($=null,O[0]-=f[1],O[1]-=h[1],E=2),S())}function v(){32==sa.event.keyCode&&2==E&&(O[0]+=f[1],O[1]+=h[1],E=0,S())}function g(){var t=sa.mouse(b),n=!1;x&&(t[0]+=x[0],t[1]+=x[1]),E||(sa.event.altKey?($||($=[(f[0]+f[1])/2,(h[0]+h[1])/2]),O[0]=f[+(t[0]<$[0])],O[1]=h[+(t[1]<$[1])]):$=null),k&&m(t,l,0)&&(r(_),n=!0),A&&m(t,c,1)&&(i(_),n=!0),n&&(e(_),C({type:"brush",mode:E?"move":"resize"}))}function m(t,n,e){var r,i,o=Wi(n),s=o[0],l=o[1],c=O[e],v=e?h:f,g=v[1]-v[0];return E&&(s-=c,l-=g+c),r=(e?d:p)?Math.max(s,Math.min(l,t[e])):t[e],E?i=(r+=c)+g:($&&(c=Math.max(s,Math.min(l,2*$[e]-r))),r>c?(i=r,r=c):i=c),v[0]!=r||v[1]!=i?(e?u=null:a=null,v[0]=r,v[1]=i,!0):void 0}function y(){g(),_.style("pointer-events","all").selectAll(".resize").style("display",t.empty()?"none":null),sa.select("body").style("cursor",null),T.on("mousemove.brush",null).on("mouseup.brush",null).on("touchmove.brush",null).on("touchend.brush",null).on("keydown.brush",null).on("keyup.brush",null),P(),C({type:"brushend"})}var $,x,b=this,w=sa.select(sa.event.target),C=s.of(b,arguments),_=sa.select(b),M=w.datum(),k=!/^(n|s)$/.test(M)&&l,A=!/^(e|w)$/.test(M)&&c,E=w.classed("extent"),P=X(b),O=sa.mouse(b),T=sa.select(n(b)).on("keydown.brush",o).on("keyup.brush",v);if(sa.event.changedTouches?T.on("touchmove.brush",g).on("touchend.brush",y):T.on("mousemove.brush",g).on("mouseup.brush",y),_.interrupt().selectAll("*").interrupt(),E)O[0]=f[0]-O[0],O[1]=h[0]-O[1];else if(M){var L=+/w$/.test(M),j=+/^n/.test(M);x=[f[1-L]-O[0],h[1-j]-O[1]],O[0]=f[L],O[1]=h[j]}else sa.event.altKey&&($=O.slice());_.style("pointer-events","none").selectAll(".resize").style("display",null),sa.select("body").style("cursor",w.style("cursor")),C({type:"brushstart"}),g()}var a,u,s=M(t,"brushstart","brush","brushend"),l=null,c=null,f=[0,0],h=[0,0],p=!0,d=!0,v=Gs[0];return t.event=function(t){t.each(function(){var t=s.of(this,arguments),n={x:f,y:h,i:a,j:u},e=this.__chart__||n;this.__chart__=n,zs?sa.select(this).transition().each("start.brush",function(){a=e.i,u=e.j,f=e.x,h=e.y,t({type:"brushstart"})}).tween("brush:brush",function(){var e=xr(f,n.x),r=xr(h,n.y);return a=u=null,function(i){f=n.x=e(i),h=n.y=r(i),t({type:"brush",mode:"resize"})}}).each("end.brush",function(){a=n.i,u=n.j,t({type:"brush",mode:"resize"}),t({type:"brushend"})}):(t({type:"brushstart"}),t({type:"brush",mode:"resize"}),t({type:"brushend"}))})},t.x=function(n){return arguments.length?(l=n,v=Gs[!l<<1|!c],t):l},t.y=function(n){return arguments.length?(c=n,v=Gs[!l<<1|!c],t):c},t.clamp=function(n){return arguments.length?(l&&c?(p=!!n[0],d=!!n[1]):l?p=!!n:c&&(d=!!n),t):l&&c?[p,d]:l?p:c?d:null},t.extent=function(n){var e,r,i,o,s;return arguments.length?(l&&(e=n[0],r=n[1],c&&(e=e[0],r=r[0]),a=[e,r],l.invert&&(e=l(e),r=l(r)),e>r&&(s=e,e=r,r=s),e==f[0]&&r==f[1]||(f=[e,r])),c&&(i=n[0],o=n[1],l&&(i=i[1],o=o[1]),u=[i,o],c.invert&&(i=c(i),o=c(o)),i>o&&(s=i,i=o,o=s),i==h[0]&&o==h[1]||(h=[i,o])),t):(l&&(a?(e=a[0],r=a[1]):(e=f[0],r=f[1],l.invert&&(e=l.invert(e),r=l.invert(r)),e>r&&(s=e,e=r,r=s))),c&&(u?(i=u[0],o=u[1]):(i=h[0],o=h[1],c.invert&&(i=c.invert(i),o=c.invert(o)),i>o&&(s=i,i=o,o=s))),l&&c?[[e,i],[r,o]]:l?[e,r]:c&&[i,o])},t.clear=function(){return t.empty()||(f=[0,0],h=[0,0],a=u=null),t},t.empty=function(){return!!l&&f[0]==f[1]||!!c&&h[0]==h[1]},sa.rebind(t,s,"on")};var Ys={n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},Gs=[["n","e","s","w","nw","ne","se","sw"],["e","w"],["n","s"],[]],Xs=du.format=xu.timeFormat,Zs=Xs.utc,Js=Zs("%Y-%m-%dT%H:%M:%S.%LZ");Xs.iso=Date.prototype.toISOString&&+new Date("2000-01-01T00:00:00.000Z")?ra:Js,ra.parse=function(t){var n=new Date(t);return isNaN(n)?null:n},ra.toString=Js.toString,du.second=zt(function(t){return new vu(1e3*Math.floor(t/1e3))},function(t,n){t.setTime(t.getTime()+1e3*Math.floor(n))},function(t){return t.getSeconds()}),du.seconds=du.second.range,du.seconds.utc=du.second.utc.range,du.minute=zt(function(t){return new vu(6e4*Math.floor(t/6e4))},function(t,n){t.setTime(t.getTime()+6e4*Math.floor(n))},function(t){return t.getMinutes()}),du.minutes=du.minute.range,du.minutes.utc=du.minute.utc.range,du.hour=zt(function(t){var n=t.getTimezoneOffset()/60;return new vu(36e5*(Math.floor(t/36e5-n)+n))},function(t,n){t.setTime(t.getTime()+36e5*Math.floor(n))},function(t){return t.getHours()}),du.hours=du.hour.range,du.hours.utc=du.hour.utc.range,du.month=zt(function(t){return t=du.day(t),t.setDate(1),t},function(t,n){t.setMonth(t.getMonth()+n)},function(t){return t.getMonth()}),du.months=du.month.range,du.months.utc=du.month.utc.range;var Ks=[1e3,5e3,15e3,3e4,6e4,3e5,9e5,18e5,36e5,108e5,216e5,432e5,864e5,1728e5,6048e5,2592e6,7776e6,31536e6],Qs=[[du.second,1],[du.second,5],[du.second,15],[du.second,30],[du.minute,1],[du.minute,5],[du.minute,15],[du.minute,30],[du.hour,1],[du.hour,3],[du.hour,6],[du.hour,12],[du.day,1],[du.day,2],[du.week,1],[du.month,1],[du.month,3],[du.year,1]],tl=Xs.multi([[".%L",function(t){return t.getMilliseconds()}],[":%S",function(t){return t.getSeconds()}],["%I:%M",function(t){return t.getMinutes()}],["%I %p",function(t){return t.getHours()}],["%a %d",function(t){return t.getDay()&&1!=t.getDate()}],["%b %d",function(t){return 1!=t.getDate()}],["%B",function(t){return t.getMonth()}],["%Y",Pn]]),nl={range:function(t,n,e){return sa.range(Math.ceil(t/e)*e,+n,e).map(oa)},floor:y,ceil:y};Qs.year=du.year,du.scale=function(){return ia(sa.scale.linear(),Qs,tl)};var el=Qs.map(function(t){return[t[0].utc,t[1]]}),rl=Zs.multi([[".%L",function(t){return t.getUTCMilliseconds()}],[":%S",function(t){return t.getUTCSeconds()}],["%I:%M",function(t){return t.getUTCMinutes()}],["%I %p",function(t){return t.getUTCHours()}],["%a %d",function(t){return t.getUTCDay()&&1!=t.getUTCDate()}],["%b %d",function(t){return 1!=t.getUTCDate()}],["%B",function(t){return t.getUTCMonth()}],["%Y",Pn]]);el.year=du.year.utc,du.scale.utc=function(){return ia(sa.scale.linear(),el,rl)},sa.text=kt(function(t){return t.responseText}),sa.json=function(t,n){return At(t,"application/json",aa,n)},sa.html=function(t,n){return At(t,"text/html",ua,n)},sa.xml=kt(function(t){return t.responseXML}),"function"==typeof define&&define.amd?(this.d3=sa,define(sa)):"object"==typeof module&&module.exports?module.exports=sa:this.d3=sa}();
\ No newline at end of file
diff --git a/xos/core/xoslib/static/js/xosDeveloper_datatables.js b/xos/core/xoslib/static/js/xosDeveloper_datatables.js
deleted file mode 100644
index e3df4c3..0000000
--- a/xos/core/xoslib/static/js/xosDeveloper_datatables.js
+++ /dev/null
@@ -1,65 +0,0 @@
-/* eslint-disable guard-for-in, no-undef, indent, space-before-blocks*/
-
-// TODO write test and then fix lint errors
-
-/* This is an example that uses xoslib + datatables to display the developer
- view.
-
- For an example that uses xoslib + marionette, see xosDeveloper.js
-*/
-
-function updateSliceTable(data) {
- $('#developerView').html(
- '<table cellpadding="0" cellspacing="0" border="0" class="display" id="dynamicusersliceinfo"></table>'
- );
- var actualEntries = [];
-
- for (rowkey in data.models) {
- row = data.models[rowkey];
- slicename = row.get('name');
- sliceid = row.get('id');
- role = row.get('sliceInfo').roles[0] || '';
- instancecount = row.get('sliceInfo').instanceCount;
- sitecount = row.get('sliceInfo').siteCount;
- backendHtml = row.get('backendHtml');
-
- //if (! role) {
- // continue;
- //}
-
- if (! row.get('current_user_can_see')) {
- continue;
- }
-
- actualEntries.push([backendHtml +
- ' <a href="/admin/core/slice/' + sliceid + '">' +
- slicename + '</a>',
- role, instancecount, sitecount]);
- }
- oTable = $('#dynamicusersliceinfo').dataTable({
- 'bJQueryUI': true,
- 'aaData': actualEntries,
- 'bStateSave': true,
- 'aoColumns': [
- {'sTitle': 'Slice'},
- {'sTitle': 'Privilege' , sClass: 'alignCenter'},
- {'sTitle': 'Number of Instances' , sClass: 'alignCenter'},
- {'sTitle': 'Number of Sites' , sClass: 'alignCenter'},
- ]
- });
-}
-
-$(document).ready(function() {
- xos.slicesPlus.on('change', function() {
- updateSliceTable(xos.slicesPlus);
- });
- xos.slicesPlus.on('remove', function() {
- updateSliceTable(xos.slicesPlus);
- });
- xos.slicesPlus.on('sort', function() {
- updateSliceTable(xos.slicesPlus);
- });
-
- xos.slicesPlus.startPolling();
-});
-
diff --git a/xos/core/xoslib/static/js/xosServiceGrid.js b/xos/core/xoslib/static/js/xosServiceGrid.js
index 38f0f5f..dcc4b18 100644
--- a/xos/core/xoslib/static/js/xosServiceGrid.js
+++ b/xos/core/xoslib/static/js/xosServiceGrid.js
@@ -1 +1 @@
-"use strict";angular.module("xos.serviceGrid",["ngResource","ngCookies","ui.router","xos.helpers"]).config(["$stateProvider",function(e){e.state("serviceGrid",{url:"/",template:"<service-grid></service-grid>"}).state("serviceGraph",{url:"/graph",template:"<service-graph></service-graph>"})}]).config(["$httpProvider",function(e){e.interceptors.push("NoHyperlinks")}]).directive("serviceGrid",function(){return{restrict:"E",scope:{},bindToController:!0,controllerAs:"vm",templateUrl:"templates/service-grid.tpl.html",controller:["Services","_",function(e,t){var n=this;this.tableConfig={columns:[{label:"Status",prop:"status",type:"boolean"},{label:"Name",prop:"name",link:function(e){return""+e.view_url.replace(/\$[a-z]+\$/,e.id)}},{label:"Kind",prop:"kind"},{label:"Enabled",prop:"enabled",type:"boolean"}],filter:"field",order:!0},e.query().$promise.then(function(e){n.services=t.map(e,function(e){return e.status=0!==parseInt(e.backend_status.match(/^[0-9]/)[0]),e})})["catch"](function(e){throw new Error(e)})}]}}),angular.module("xos.serviceGrid").run(["$templateCache",function(e){e.put("templates/service-graph.tpl.html",'<div class="row">\n <div class="col-sm-10">\n <h1>Graph</h1>\n <ul>\n <li>Use D3 to create a service chart based on coarse services?</li>\n </ul>\n </div>\n <div class="col-sm-2">\n <a href="/admin/core/service/add" class="btn btn-success btn-block">\n <i class="glyphicon glyphicon-plus"></i>\n Add Service\n </a>\n <a href="#/" class="btn btn-default btn-block">\n Service List\n </a>\n </div>\n</div>'),e.put("templates/service-grid.tpl.html",'<div class="row">\n <div class="col-sm-10">\n <xos-table config="vm.tableConfig" data="vm.services"></xos-table>\n </div>\n <div class="col-sm-2">\n <a href="/admin/core/service/add" class="btn btn-success btn-block">\n <i class="glyphicon glyphicon-plus"></i>\n Add Service\n </a>\n <!-- <a href="#/graph" class="btn btn-default btn-block">\n Tenancy Graph\n </a> -->\n </div>\n</div>')}]),function(){angular.module("xos.serviceGrid").directive("serviceGraph",function(){return{restrict:"E",scope:{},bindToController:!0,controllerAs:"vm",templateUrl:"templates/service-graph.tpl.html",controller:["$element","GraphService",function(e,t){var n=void 0,r=e[0],i=void 0,s=void 0,c=function(e){i.attr({transform:function(e){return"translate("+e.x+", "+e.y+")"}}),s.attr("x1",function(e){return e.source.x}).attr("y1",function(e){return e.source.y}).attr("x2",function(e){return e.target.x}).attr("y2",function(e){return e.target.y})};t.loadCoarseData().then(function(e){e.tenants=e.tenants.map(function(e){return{source:e.provider_service,target:e.subscriber_service}}),e.services.push({name:"XOS","class":"xos",x:r.clientWidth/2,y:r.clientHeight/2,fixed:!0}),a(r);var t=d3.layout.force().nodes(e.services).links(e.tenants).charge(-1060).gravity(.1).linkDistance(200).size([r.clientWidth,r.clientHeight]).on("tick",c).start();s=n.selectAll(".link").data(e.tenants).enter().insert("line").attr("class","link"),i=n.selectAll(".node").data(e.services).enter().append("g").call(t.drag).on("mousedown",function(){d3.event.stopPropagation()}),i.append("circle").attr({"class":function(e){return"node "+(e["class"]||"")},r:10}),i.append("text").attr({"text-anchor":"middle"}).text(function(e){return e.name}),i.select("circle").attr({r:function(e){var t=d3.select(this).node().parentNode,n=d3.select(t).select("text").node().getBBox();return n.width/2+10}})});var a=function(e){d3.select(e).select("svg").remove(),n=d3.select(e).append("svg").style("width",e.clientWidth+"px").style("height",e.clientHeight+"px")}}]}})}(),angular.module("xos.serviceGrid").run(["$location",function(e){e.path("/")}]);
\ No newline at end of file
+"use strict";angular.module("xos.serviceGrid",["ngResource","ngCookies","ui.router","xos.helpers"]).config(["$stateProvider",function(e){e.state("serviceGrid",{url:"/",template:"<service-grid></service-grid>"}).state("serviceGraph",{url:"/graph",template:"<service-graph></service-graph>"})}]).config(["$httpProvider",function(e){e.interceptors.push("NoHyperlinks")}]).directive("serviceGrid",function(){return{restrict:"E",scope:{},bindToController:!0,controllerAs:"vm",templateUrl:"templates/service-grid.tpl.html",controller:["Services","_",function(e,t){var n=this;this.tableConfig={columns:[{label:"Status",prop:"status",type:"icon",formatter:function(e){var t=parseInt(e.backend_status.match(/^[0-9]/)[0]);switch(t){case 0:return"time";case 1:return"ok";case 2:return"remove"}}},{label:"Name",prop:"name",link:function(e){return""+e.view_url.replace(/\$[a-z]+\$/,e.id)}},{label:"Kind",prop:"kind"},{label:"Enabled",prop:"enabled",type:"boolean"}],filter:"field",order:{field:"name"}},e.query().$promise.then(function(e){n.services=t.map(e,function(e){return e.status=0!==parseInt(e.backend_status.match(/^[0-9]/)[0]),e})})["catch"](function(e){throw new Error(e)})}]}}),angular.module("xos.serviceGrid").run(["$templateCache",function(e){e.put("templates/service-graph.tpl.html",'<div class="row">\n <div class="col-sm-10">\n <h1>Graph</h1>\n <ul>\n <li>Use D3 to create a service chart based on coarse services?</li>\n </ul>\n </div>\n <div class="col-sm-2">\n <a href="/admin/core/service/add" class="btn btn-success btn-block">\n <i class="glyphicon glyphicon-plus"></i>\n Add Service\n </a>\n <a href="#/" class="btn btn-default btn-block">\n Service List\n </a>\n </div>\n</div>'),e.put("templates/service-grid.tpl.html",'<div class="row">\n <div class="col-sm-10">\n <xos-table config="vm.tableConfig" data="vm.services"></xos-table>\n </div>\n <div class="col-sm-2">\n <a href="/admin/core/service/add" class="btn btn-success btn-block">\n <i class="glyphicon glyphicon-plus"></i>\n Add Service\n </a>\n <!-- <a href="#/graph" class="btn btn-default btn-block">\n Tenancy Graph\n </a> -->\n </div>\n</div>')}]),function(){angular.module("xos.serviceGrid").directive("serviceGraph",function(){return{restrict:"E",scope:{},bindToController:!0,controllerAs:"vm",templateUrl:"templates/service-graph.tpl.html",controller:["$element","GraphService",function(e,t){var n=void 0,r=e[0],i=void 0,s=void 0,c=function(e){i.attr({transform:function(e){return"translate("+e.x+", "+e.y+")"}}),s.attr("x1",function(e){return e.source.x}).attr("y1",function(e){return e.source.y}).attr("x2",function(e){return e.target.x}).attr("y2",function(e){return e.target.y})};t.loadCoarseData().then(function(e){e.tenants=e.tenants.map(function(e){return{source:e.provider_service,target:e.subscriber_service}}),e.services.push({name:"XOS","class":"xos",x:r.clientWidth/2,y:r.clientHeight/2,fixed:!0}),a(r);var t=d3.layout.force().nodes(e.services).links(e.tenants).charge(-1060).gravity(.1).linkDistance(200).size([r.clientWidth,r.clientHeight]).on("tick",c).start();s=n.selectAll(".link").data(e.tenants).enter().insert("line").attr("class","link"),i=n.selectAll(".node").data(e.services).enter().append("g").call(t.drag).on("mousedown",function(){d3.event.stopPropagation()}),i.append("circle").attr({"class":function(e){return"node "+(e["class"]||"")},r:10}),i.append("text").attr({"text-anchor":"middle"}).text(function(e){return e.name}),i.select("circle").attr({r:function(e){var t=d3.select(this).node().parentNode,n=d3.select(t).select("text").node().getBBox();return n.width/2+10}})});var a=function(e){d3.select(e).select("svg").remove(),n=d3.select(e).append("svg").style("width",e.clientWidth+"px").style("height",e.clientHeight+"px")}}]}})}(),angular.module("xos.serviceGrid").run(["$location",function(e){e.path("/")}]);
\ No newline at end of file
diff --git a/xos/synchronizers/onos/steps/sync_onosapp.py b/xos/synchronizers/onos/steps/sync_onosapp.py
index 7b80641..64c9452 100644
--- a/xos/synchronizers/onos/steps/sync_onosapp.py
+++ b/xos/synchronizers/onos/steps/sync_onosapp.py
@@ -88,7 +88,7 @@
def get_cluster_configuration(self, o):
instance = self.get_instance(o)
if not instance:
- raise "No instance for ONOS App"
+ raise Exception("No instance for ONOS App")
node_ips = [socket.gethostbyname(instance.node.name)]
ipPrefix = ".".join(node_ips[0].split(".")[:3]) + ".*"
@@ -100,7 +100,7 @@
def get_dynamic_parameter_value(self, o, param):
instance = self.get_instance(o)
if not instance:
- raise "No instance for ONOS App"
+ raise Exception("No instance for ONOS App")
if param == 'rabbit_host':
return instance.controller.rabbit_host
if param == 'rabbit_user':
@@ -242,6 +242,100 @@
return json.dumps(data, indent=4, sort_keys=True)
+ def get_volt_network_config(self, o, attrs):
+ data = {
+ "devices" : {
+ "of:1000000000000001" : {
+ "accessDevice" : {
+ "uplink" : "2",
+ "vlan" : "222",
+ },
+ "basic" : {
+ "driver" : "pmc-olt"
+ }
+ }
+ }
+ }
+ return json.dumps(data, indent=4, sort_keys=True)
+
+ def get_volt_component_config(self, o, attrs):
+ data = {
+ "org.ciena.onos.ext_notifier.KafkaNotificationBridge":{
+ "rabbit.user": "<rabbit_user>",
+ "rabbit.password": "<rabbit_password>",
+ "rabbit.host": "<rabbit_host>",
+ "publish.kafka": "false",
+ "publish.rabbit": "true",
+ "volt.events.rabbit.topic": "notifications.info",
+ "volt.events.rabbit.exchange": "voltlistener",
+ "volt.events.opaque.info": "{project_id: <keystone_tenant_id>, user_id: <keystone_user_id>}",
+ "publish.volt.events": "true"
+ }
+ }
+ return json.dumps(data, indent=4, sort_keys=True)
+
+ def get_vrouter_network_config(self, o, attrs):
+ # From the onosproject wiki:
+ # https://wiki.onosproject.org/display/ONOS/vRouter
+ data = {
+ "devices" : {
+ "of:00000000000000b1" : {
+ "basic" : {
+ "driver" : "softrouter"
+ }
+ }
+ },
+ "ports" : {
+ "of:00000000000000b1/1" : {
+ "interfaces" : [
+ {
+ "name" : "b1-1",
+ "ips" : [ "10.0.1.2/24" ],
+ "mac" : "00:00:00:00:00:01"
+ }
+ ]
+ },
+ "of:00000000000000b1/2" : {
+ "interfaces" : [
+ {
+ "name" : "b1-2",
+ "ips" : [ "10.0.2.2/24" ],
+ "mac" : "00:00:00:00:00:01"
+ }
+ ]
+ },
+ "of:00000000000000b1/3" : {
+ "interfaces" : [
+ {
+ "name" : "b1-3",
+ "ips" : [ "10.0.3.2/24" ],
+ "mac" : "00:00:00:00:00:01"
+ }
+ ]
+ },
+ "of:00000000000000b1/4" : {
+ "interfaces" : [
+ {
+ "name" : "b1-4",
+ "ips" : [ "10.0.4.2/24" ],
+ "mac" : "00:00:00:00:00:02",
+ "vlan" : "100"
+ }
+ ]
+ }
+ },
+ "apps" : {
+ "org.onosproject.router" : {
+ "router" : {
+ "controlPlaneConnectPoint" : "of:00000000000000b1/5",
+ "ospfEnabled" : "true",
+ "interfaces" : [ "b1-1", "b1-2", "b1-2", "b1-4" ]
+ }
+ }
+ }
+ }
+ return json.dumps(data, indent=4, sort_keys=True)
+
def write_configs(self, o):
o.config_fns = []
o.rest_configs = []
@@ -279,17 +373,29 @@
o.early_rest_configs.append( {"endpoint": endpoint, "fn": fn} )
# Generate config files and save them to the appropriate tenant attributes
- autogen = []
+ configs = []
for key, value in attrs.iteritems():
if key == "autogenerate" and value:
- autogen.append(value)
- for label in autogen:
+ for config in value.split(','):
+ configs.append(config.strip())
+
+ for label in configs:
config = None
value = None
if label == "vtn-network-cfg":
- # Generate the VTN config file... where should this live?
+ # Generate the VTN config file... where should this live?
config = "rest_onos/v1/network/configuration/"
value = self.get_vtn_config(o, attrs)
+ elif label == "volt-network-cfg":
+ config = "rest_onos/v1/network/configuration/"
+ value = self.get_volt_network_config(o, attrs)
+ elif label == "volt-component-cfg":
+ config = "component_config"
+ value = self.get_volt_component_config(o, attrs)
+ elif label == "vrouter-network-cfg":
+ config = "rest_onos/v1/network/configuration/"
+ value = self.get_vrouter_network_config(o, attrs)
+
if config:
tas = TenantAttribute.objects.filter(tenant=o, name=config)
if tas:
diff --git a/xos/tests/api/helpers/before_test.py b/xos/tests/api/helpers/before_test.py
index 06e27bf..d45f4e5 100644
--- a/xos/tests/api/helpers/before_test.py
+++ b/xos/tests/api/helpers/before_test.py
@@ -277,13 +277,19 @@
instance.save()
+def createService():
+ service = Service(id=1)
+ service.name = 'test-service'
+ service.save()
+
# setupInstance()
# depl = createDeployment()
-createTestSubscriber()
+# createTestSubscriber()
# createInstance()
# createSlice()
# createNode(depl)
# createImage('test-image')
# createFlavors()
# createTruckroll()
-setUpTruckroll()
+# setUpTruckroll()
+createService()
diff --git a/xos/tests/api/hooks.py b/xos/tests/api/hooks.py
index 2a38d7a..9ad8e3a 100644
--- a/xos/tests/api/hooks.py
+++ b/xos/tests/api/hooks.py
@@ -277,6 +277,11 @@
instance.save()
+def createService():
+ service = Service(id=1)
+ service.name = 'test-service'
+ service.save()
+
@hooks.before_all
def my_before_all_hook(transactions):
# print "-------------------------------- Before All Hook --------------------------------"
@@ -300,6 +305,16 @@
# print "-------------------------------- Test end --------------------------------"
+@hooks.before("Services > Services > View a Service Detail")
+def get_service(transaction):
+ createService()
+
+
+@hooks.before("Services > Services > Delete a Service")
+def delete_service(transaction):
+ createService()
+
+
@hooks.before("Truckroll > Truckroll Collection > Create a Truckroll")
def test1(transaction):
setUpTruckroll()
diff --git a/xos/tosca/custom_types/exampleservice.m4 b/xos/tosca/custom_types/exampleservice.m4
new file mode 100644
index 0000000..720913e
--- /dev/null
+++ b/xos/tosca/custom_types/exampleservice.m4
@@ -0,0 +1,31 @@
+tosca_definitions_version: tosca_simple_yaml_1_0
+
+# compile this with "m4 exampleservice.m4 > exampleservice.yaml"
+
+# include macros
+include(macros.m4)
+
+node_types:
+ tosca.nodes.ExampleService:
+ derived_from: tosca.nodes.Root
+ description: >
+ Example Service
+ capabilities:
+ xos_base_service_caps
+ properties:
+ xos_base_props
+ xos_base_service_props
+ service_message:
+ type: string
+ required: false
+
+ tosca.nodes.ExampleTenant:
+ derived_from: tosca.nodes.Root
+ description: >
+ A Tenant of the example service
+ properties:
+ xos_base_tenant_props
+ tenant_message:
+ type: string
+ required: false
+
diff --git a/xos/tosca/custom_types/exampleservice.yaml b/xos/tosca/custom_types/exampleservice.yaml
new file mode 100644
index 0000000..2cd70dd
--- /dev/null
+++ b/xos/tosca/custom_types/exampleservice.yaml
@@ -0,0 +1,101 @@
+tosca_definitions_version: tosca_simple_yaml_1_0
+
+# compile this with "m4 exampleservice.m4 > exampleservice.yaml"
+
+# include macros
+# Note: Tosca derived_from isn't working the way I think it should, it's not
+# inheriting from the parent template. Until we get that figured out, use
+# m4 macros do our inheritance
+
+
+# Service
+
+
+# Subscriber
+
+
+
+
+# end m4 macros
+
+
+
+node_types:
+ tosca.nodes.ExampleService:
+ derived_from: tosca.nodes.Root
+ description: >
+ Example Service
+ capabilities:
+ scalable:
+ type: tosca.capabilities.Scalable
+ service:
+ type: tosca.capabilities.xos.Service
+ properties:
+ no-delete:
+ type: boolean
+ default: false
+ description: Do not allow Tosca to delete this object
+ no-create:
+ type: boolean
+ default: false
+ description: Do not allow Tosca to create this object
+ no-update:
+ type: boolean
+ default: false
+ description: Do not allow Tosca to update this object
+ replaces:
+ type: string
+ required: false
+ descrption: Replaces/renames this object
+ kind:
+ type: string
+ default: generic
+ description: Type of service.
+ view_url:
+ type: string
+ required: false
+ description: URL to follow when icon is clicked in the Service Directory.
+ icon_url:
+ type: string
+ required: false
+ description: ICON to display in the Service Directory.
+ enabled:
+ type: boolean
+ default: true
+ published:
+ type: boolean
+ default: true
+ description: If True then display this Service in the Service Directory.
+ public_key:
+ type: string
+ required: false
+ description: Public key to install into Instances to allows Services to SSH into them.
+ private_key_fn:
+ type: string
+ required: false
+ description: Location of private key file
+ versionNumber:
+ type: string
+ required: false
+ description: Version number of Service.
+ service_message:
+ type: string
+ required: false
+
+ tosca.nodes.ExampleTenant:
+ derived_from: tosca.nodes.Root
+ description: >
+ A Tenant of the example service
+ properties:
+ kind:
+ type: string
+ default: generic
+ description: Kind of tenant
+ service_specific_id:
+ type: string
+ required: false
+ description: Service specific ID opaque to XOS but meaningful to service
+ tenant_message:
+ type: string
+ required: false
+
diff --git a/xos/tosca/custom_types/macros.m4 b/xos/tosca/custom_types/macros.m4
new file mode 100644
index 0000000..1f48f10
--- /dev/null
+++ b/xos/tosca/custom_types/macros.m4
@@ -0,0 +1,84 @@
+# Note: Tosca derived_from isn't working the way I think it should, it's not
+# inheriting from the parent template. Until we get that figured out, use
+# m4 macros do our inheritance
+
+define(xos_base_props,
+ no-delete:
+ type: boolean
+ default: false
+ description: Do not allow Tosca to delete this object
+ no-create:
+ type: boolean
+ default: false
+ description: Do not allow Tosca to create this object
+ no-update:
+ type: boolean
+ default: false
+ description: Do not allow Tosca to update this object
+ replaces:
+ type: string
+ required: false
+ descrption: Replaces/renames this object)
+# Service
+define(xos_base_service_caps,
+ scalable:
+ type: tosca.capabilities.Scalable
+ service:
+ type: tosca.capabilities.xos.Service)
+define(xos_base_service_props,
+ kind:
+ type: string
+ default: generic
+ description: Type of service.
+ view_url:
+ type: string
+ required: false
+ description: URL to follow when icon is clicked in the Service Directory.
+ icon_url:
+ type: string
+ required: false
+ description: ICON to display in the Service Directory.
+ enabled:
+ type: boolean
+ default: true
+ published:
+ type: boolean
+ default: true
+ description: If True then display this Service in the Service Directory.
+ public_key:
+ type: string
+ required: false
+ description: Public key to install into Instances to allows Services to SSH into them.
+ private_key_fn:
+ type: string
+ required: false
+ description: Location of private key file
+ versionNumber:
+ type: string
+ required: false
+ description: Version number of Service.)
+# Subscriber
+define(xos_base_subscriber_caps,
+ subscriber:
+ type: tosca.capabilities.xos.Subscriber)
+define(xos_base_subscriber_props,
+ kind:
+ type: string
+ default: generic
+ description: Kind of subscriber
+ service_specific_id:
+ type: string
+ required: false
+ description: Service specific ID opaque to XOS but meaningful to service)
+define(xos_base_tenant_props,
+ kind:
+ type: string
+ default: generic
+ description: Kind of tenant
+ service_specific_id:
+ type: string
+ required: false
+ description: Service specific ID opaque to XOS but meaningful to service)
+
+# end m4 macros
+
diff --git a/xos/tosca/custom_types/xos.m4 b/xos/tosca/custom_types/xos.m4
index e83a22f..8503af2 100644
--- a/xos/tosca/custom_types/xos.m4
+++ b/xos/tosca/custom_types/xos.m4
@@ -1,90 +1,9 @@
tosca_definitions_version: tosca_simple_yaml_1_0
-# Note: Tosca derived_from isn't working the way I think it should, it's not
-# inheriting from the parent template. Until we get that figured out, use
-# m4 macros do our inheritance
+# compile this with "m4 xos.m4 > xos.yaml"
-define(xos_base_props,
- no-delete:
- type: boolean
- default: false
- description: Do not allow Tosca to delete this object
- no-create:
- type: boolean
- default: false
- description: Do not allow Tosca to create this object
- no-update:
- type: boolean
- default: false
- description: Do not allow Tosca to update this object
- replaces:
- type: string
- required: false
- descrption: Replaces/renames this object)
-# Service
-define(xos_base_service_caps,
- scalable:
- type: tosca.capabilities.Scalable
- service:
- type: tosca.capabilities.xos.Service)
-define(xos_base_service_props,
- kind:
- type: string
- default: generic
- description: Type of service.
- view_url:
- type: string
- required: false
- description: URL to follow when icon is clicked in the Service Directory.
- icon_url:
- type: string
- required: false
- description: ICON to display in the Service Directory.
- enabled:
- type: boolean
- default: true
- published:
- type: boolean
- default: true
- description: If True then display this Service in the Service Directory.
- public_key:
- type: string
- required: false
- description: Public key to install into Instances to allows Services to SSH into them.
- private_key_fn:
- type: string
- required: false
- description: Location of private key file
- versionNumber:
- type: string
- required: false
- description: Version number of Service.)
-# Subscriber
-define(xos_base_subscriber_caps,
- subscriber:
- type: tosca.capabilities.xos.Subscriber)
-define(xos_base_subscriber_props,
- kind:
- type: string
- default: generic
- description: Kind of subscriber
- service_specific_id:
- type: string
- required: false
- description: Service specific ID opaque to XOS but meaningful to service)
-define(xos_base_tenant_props,
- kind:
- type: string
- default: generic
- description: Kind of tenant
- service_specific_id:
- type: string
- required: false
- description: Service specific ID opaque to XOS but meaningful to service)
-
-# end m4 macros
-#
-# compile this with "m4 custom_types/xos.m4 > custom_types/xos.yaml"
+# include macros
+include(macros.m4)
node_types:
tosca.nodes.Service:
@@ -195,6 +114,9 @@
rest_onos/v1/network/configuration/:
type: string
required: false
+ autogenerate:
+ type: string
+ required: false
tosca.nodes.ONOSVTNApp:
derived_from: tosca.nodes.Root
@@ -212,6 +134,22 @@
type: string
required: false
+ tosca.nodes.ONOSvRouterApp:
+ derived_from: tosca.nodes.Root
+ description: >
+ An ONOS vRouter Application.
+ properties:
+ xos_base_tenant_props
+ dependencies:
+ type: string
+ required: false
+ rest_onos/v1/network/configuration/:
+ type: string
+ required: false
+ autogenerate:
+ type: string
+ required: false
+
tosca.nodes.VSGService:
description: >
CORD: The vSG Service.
@@ -317,17 +255,6 @@
xos_base_props
xos_base_service_props
- tosca.nodes.ExampleService:
- derived_from: tosca.nodes.Root
- description: >
- Example Service
- capabilities:
- xos_base_service_caps
- properties:
- xos_base_props
- xos_base_service_props
-
-
tosca.nodes.Subscriber:
derived_from: tosca.nodes.Root
description: XOS subscriber base class.
diff --git a/xos/tosca/custom_types/xos.yaml b/xos/tosca/custom_types/xos.yaml
index b41a6c7..bb4b740 100644
--- a/xos/tosca/custom_types/xos.yaml
+++ b/xos/tosca/custom_types/xos.yaml
@@ -1,5 +1,8 @@
tosca_definitions_version: tosca_simple_yaml_1_0
+# compile this with "m4 xos.m4 > xos.yaml"
+
+# include macros
# Note: Tosca derived_from isn't working the way I think it should, it's not
# inheriting from the parent template. Until we get that figured out, use
# m4 macros do our inheritance
@@ -14,8 +17,8 @@
# end m4 macros
-#
-# compile this with "m4 custom_types/xos.m4 > custom_types/xos.yaml"
+
+
node_types:
tosca.nodes.Service:
@@ -250,6 +253,9 @@
rest_onos/v1/network/configuration/:
type: string
required: false
+ autogenerate:
+ type: string
+ required: false
tosca.nodes.ONOSVTNApp:
derived_from: tosca.nodes.Root
@@ -274,6 +280,29 @@
type: string
required: false
+ tosca.nodes.ONOSvRouterApp:
+ derived_from: tosca.nodes.Root
+ description: >
+ An ONOS vRouter Application.
+ properties:
+ kind:
+ type: string
+ default: generic
+ description: Kind of tenant
+ service_specific_id:
+ type: string
+ required: false
+ description: Service specific ID opaque to XOS but meaningful to service
+ dependencies:
+ type: string
+ required: false
+ rest_onos/v1/network/configuration/:
+ type: string
+ required: false
+ autogenerate:
+ type: string
+ required: false
+
tosca.nodes.VSGService:
description: >
CORD: The vSG Service.
@@ -667,65 +696,6 @@
required: false
description: Version number of Service.
- tosca.nodes.ExampleService:
- derived_from: tosca.nodes.Root
- description: >
- Example Service
- capabilities:
- scalable:
- type: tosca.capabilities.Scalable
- service:
- type: tosca.capabilities.xos.Service
- properties:
- no-delete:
- type: boolean
- default: false
- description: Do not allow Tosca to delete this object
- no-create:
- type: boolean
- default: false
- description: Do not allow Tosca to create this object
- no-update:
- type: boolean
- default: false
- description: Do not allow Tosca to update this object
- replaces:
- type: string
- required: false
- descrption: Replaces/renames this object
- kind:
- type: string
- default: generic
- description: Type of service.
- view_url:
- type: string
- required: false
- description: URL to follow when icon is clicked in the Service Directory.
- icon_url:
- type: string
- required: false
- description: ICON to display in the Service Directory.
- enabled:
- type: boolean
- default: true
- published:
- type: boolean
- default: true
- description: If True then display this Service in the Service Directory.
- public_key:
- type: string
- required: false
- description: Public key to install into Instances to allows Services to SSH into them.
- private_key_fn:
- type: string
- required: false
- description: Location of private key file
- versionNumber:
- type: string
- required: false
- description: Version number of Service.
-
-
tosca.nodes.Subscriber:
derived_from: tosca.nodes.Root
description: XOS subscriber base class.
diff --git a/xos/tosca/destroy.py b/xos/tosca/destroy.py
index d7f8300..6fa9101 100644
--- a/xos/tosca/destroy.py
+++ b/xos/tosca/destroy.py
@@ -7,9 +7,6 @@
parentdir = os.path.dirname(currentdir)
sys.path.append(parentdir)
-# a bit of a hack for developing -- run m4 to generate xos.yaml from xos.m4
-os.system("m4 %s/custom_types/xos.m4 > %s/custom_types/xos.yaml" % (currentdir, currentdir))
-
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "xos.settings")
import django
django.setup()
diff --git a/xos/tosca/makedocs.py b/xos/tosca/makedocs.py
index 6a9e959..2db6db8 100644
--- a/xos/tosca/makedocs.py
+++ b/xos/tosca/makedocs.py
@@ -10,9 +10,6 @@
parentdir = os.path.dirname(currentdir)
sys.path.append(parentdir)
-# a bit of a hack for developing -- run m4 to generate xos.yaml from xos.m4
-os.system("m4 %s/custom_types/xos.m4 > %s/custom_types/xos.yaml" % (currentdir, currentdir))
-
"""
{'derived_from': 'tosca.nodes.Root', 'capabilities': {'scalable': {'type': 'tosca.capabilities.Scalable'},
'service': {'type': 'tosca.capabilities.xos.Service'}}, 'properties': {'icon_url': {'required': False,
diff --git a/xos/tosca/resources/exampleservice.py b/xos/tosca/resources/exampleservice.py
index 9d41807..f26b8b7 100644
--- a/xos/tosca/resources/exampleservice.py
+++ b/xos/tosca/resources/exampleservice.py
@@ -14,7 +14,7 @@
class XOSExampleService(XOSResource):
provides = "tosca.nodes.ExampleService"
xos_model = ExampleService
- copyin_props = ["view_url", "icon_url", "enabled", "published", "public_key", "private_key_fn", "versionNumber"]
+ copyin_props = ["view_url", "icon_url", "enabled", "published", "public_key", "private_key_fn", "versionNumber", "service_message"]
def postprocess(self, obj):
for provider_service_name in self.get_requirements("tosca.relationships.TenantOfService"):
diff --git a/xos/tosca/resources/exampletenant.py b/xos/tosca/resources/exampletenant.py
new file mode 100644
index 0000000..d9239f9
--- /dev/null
+++ b/xos/tosca/resources/exampletenant.py
@@ -0,0 +1,36 @@
+import importlib
+import os
+import pdb
+import sys
+import tempfile
+sys.path.append("/opt/tosca")
+from translator.toscalib.tosca_template import ToscaTemplate
+from core.models import Tenant, Service
+from services.exampleservice.models import ExampleTenant, SERVICE_NAME as EXAMPLETENANT_KIND
+
+from xosresource import XOSResource
+
+class XOSExampleTenant(XOSResource):
+ provides = "tosca.nodes.ExampleTenant"
+ xos_model = ExampleTenant
+ name_field = "service_specific_id"
+ copyin_props = ("tenant_message",)
+
+ def get_xos_args(self, throw_exception=True):
+ args = super(XOSExampleTenant, self).get_xos_args()
+
+ # ExampleTenant must always have a provider_service
+ provider_name = self.get_requirement("tosca.relationships.TenantOfService", throw_exception=True)
+ if provider_name:
+ args["provider_service"] = self.get_xos_object(Service, throw_exception=True, name=provider_name)
+
+ return args
+
+ def get_existing_objs(self):
+ args = self.get_xos_args(throw_exception=False)
+ return ExampleTenant.get_tenant_objects().filter(provider_service=args["provider_service"], service_specific_id=args["service_specific_id"])
+ return []
+
+ def can_delete(self, obj):
+ return super(XOSExampleTenant, self).can_delete(obj)
+
diff --git a/xos/tosca/resources/onosapp.py b/xos/tosca/resources/onosapp.py
index dccc8db..a65c717 100644
--- a/xos/tosca/resources/onosapp.py
+++ b/xos/tosca/resources/onosapp.py
@@ -12,7 +12,7 @@
from xosresource import XOSResource
class XOSONOSApp(XOSResource):
- provides = ["tosca.nodes.ONOSApp", "tosca.nodes.ONOSvBNGApp", "tosca.nodes.ONOSvOLTApp", "tosca.nodes.ONOSVTNApp"]
+ provides = ["tosca.nodes.ONOSApp", "tosca.nodes.ONOSvBNGApp", "tosca.nodes.ONOSvOLTApp", "tosca.nodes.ONOSVTNApp", "tosca.nodes.ONOSvRouterApp"]
xos_model = ONOSApp
copyin_props = ["service_specific_id", "dependencies", "install_dependencies"]
diff --git a/xos/tosca/run.py b/xos/tosca/run.py
index 58dc22b..0ba2df9 100644
--- a/xos/tosca/run.py
+++ b/xos/tosca/run.py
@@ -7,9 +7,6 @@
parentdir = os.path.dirname(currentdir)
sys.path.append(parentdir)
-# a bit of a hack for developing -- run m4 to generate xos.yaml from xos.m4
-os.system("m4 %s/custom_types/xos.m4 > %s/custom_types/xos.yaml" % (currentdir, currentdir))
-
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "xos.settings")
import django
django.setup()
diff --git a/xos/tosca/samples/exampleservice.yaml b/xos/tosca/samples/exampleservice.yaml
new file mode 100644
index 0000000..5b90ce2
--- /dev/null
+++ b/xos/tosca/samples/exampleservice.yaml
@@ -0,0 +1,47 @@
+tosca_definitions_version: tosca_simple_yaml_1_0
+
+description: Setup the ExampleService
+
+imports:
+ - custom_types/xos.yaml
+ - custom_types/exampleservice.yaml
+
+topology_template:
+ node_templates:
+
+ mysite:
+ type: tosca.nodes.Site
+
+ mysite_exampleservice:
+ description: This slice holds the ExampleService
+ type: tosca.nodes.Slice
+
+ requirements:
+ - site:
+ node: mysite
+ relationship: tosca.relationships.MemberOfSite
+ - exmapleserver:
+ node: service#exampleservice
+ relationship: tosca.relationships.MemberOfService
+
+ service#exampleservice:
+ type: tosca.nodes.ExampleService
+ properties:
+ view_url: /admin/exampleservice/exampleservice/$id$/
+ kind: exampleservice
+ public_key: { get_artifact: [ SELF, pubkey, LOCAL_FILE] }
+ private_key_fn: /opt/xos/synchronizers/exampleservice/exampleservice_private_key
+ service_message: hello
+ artifacts:
+ pubkey: /opt/xos/synchronizers/exampleservice/exampleservice_public_key
+
+
+ tenant#exampletenant1:
+ type: tosca.nodes.ExampleTenant
+ properties:
+ tenant_message: world
+ requirements:
+ - tenant:
+ node: service#exampleservice
+ relationship: tosca.relationships.TenantOfService
+